diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC10.bpk b/internal/x.46/ExpressCommon Library/Packages/dxComnC10.bpk deleted file mode 100644 index cbeb0203..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC10.bpk +++ /dev/null @@ -1,138 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxComnC10.bpl -OBJFILES = dxrgkeya.obj dxreged.obj dxCommon.obj dxComnC10.obj -MAINSOURCE = dxComnC10.cpp -RESFILES = dxComnC10.res -RESDEPEN = $(RESFILES) dxrgkeya.dfm dxreged.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib -PACKAGES = rtl.bpi vcl.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressCommonLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC10.cpp b/internal/x.46/ExpressCommon Library/Packages/dxComnC10.cpp deleted file mode 100644 index ea747e77..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC10.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxComnC10.res"); -USEPACKAGE("vcl.bpi"); -USEFORMNS("dxrgkeya.pas", Dxrgkeya, frmdxAddNewRegKey); -USEFORMNS("dxreged.pas", Dxreged, frmdxLibREgPathEditor); -USEUNIT("dxCommon.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC10.res b/internal/x.46/ExpressCommon Library/Packages/dxComnC10.res deleted file mode 100644 index f3ad5ba8..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnC10.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC11.bpk b/internal/x.46/ExpressCommon Library/Packages/dxComnC11.bpk deleted file mode 100644 index b88d4926..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC11.bpk +++ /dev/null @@ -1,138 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxComnC11.bpl -OBJFILES = dxrgkeya.obj dxreged.obj dxCommon.obj dxComnC11.obj -MAINSOURCE = dxComnC11.cpp -RESFILES = dxComnC11.res -RESDEPEN = $(RESFILES) dxrgkeya.dfm dxreged.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib -PACKAGES = rtl.bpi vcl.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressCommonLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC11.cpp b/internal/x.46/ExpressCommon Library/Packages/dxComnC11.cpp deleted file mode 100644 index 66a959e7..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC11.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxComnC11.res"); -USEPACKAGE("vcl.bpi"); -USEFORMNS("dxrgkeya.pas", Dxrgkeya, frmdxAddNewRegKey); -USEFORMNS("dxreged.pas", Dxreged, frmdxLibREgPathEditor); -USEUNIT("dxCommon.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC11.res b/internal/x.46/ExpressCommon Library/Packages/dxComnC11.res deleted file mode 100644 index 4e39c72f..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnC11.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC12.bpk b/internal/x.46/ExpressCommon Library/Packages/dxComnC12.bpk deleted file mode 100644 index 0392a985..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC12.bpk +++ /dev/null @@ -1,138 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxComnC12.bpl -OBJFILES = dxrgkeya.obj dxreged.obj dxCommon.obj dxComnC12.obj -MAINSOURCE = dxComnC12.cpp -RESFILES = dxComnC12.res -RESDEPEN = $(RESFILES) dxrgkeya.dfm dxreged.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib -PACKAGES = rtl.bpi vcl.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressCommonLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC12.cpp b/internal/x.46/ExpressCommon Library/Packages/dxComnC12.cpp deleted file mode 100644 index eaf4d961..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC12.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxComnC12.res"); -USEPACKAGE("vcl.bpi"); -USEFORMNS("dxrgkeya.pas", Dxrgkeya, frmdxAddNewRegKey); -USEFORMNS("dxreged.pas", Dxreged, frmdxLibREgPathEditor); -USEUNIT("dxCommon.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC12.res b/internal/x.46/ExpressCommon Library/Packages/dxComnC12.res deleted file mode 100644 index 86e2df10..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnC12.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC14.bpk b/internal/x.46/ExpressCommon Library/Packages/dxComnC14.bpk deleted file mode 100644 index 1232c9f1..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC14.bpk +++ /dev/null @@ -1,138 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxComnC14.bpl -OBJFILES = dxrgkeya.obj dxreged.obj dxCommon.obj dxComnC14.obj -MAINSOURCE = dxComnC14.cpp -RESFILES = dxComnC14.res -RESDEPEN = $(RESFILES) dxrgkeya.dfm dxreged.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib -PACKAGES = rtl.bpi vcl.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressCommonLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC14.cpp b/internal/x.46/ExpressCommon Library/Packages/dxComnC14.cpp deleted file mode 100644 index b29471d4..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC14.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxComnC14.res"); -USEPACKAGE("vcl.bpi"); -USEFORMNS("dxrgkeya.pas", Dxrgkeya, frmdxAddNewRegKey); -USEFORMNS("dxreged.pas", Dxreged, frmdxLibREgPathEditor); -USEUNIT("dxCommon.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC14.res b/internal/x.46/ExpressCommon Library/Packages/dxComnC14.res deleted file mode 100644 index b566d824..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnC14.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC5.bpk b/internal/x.46/ExpressCommon Library/Packages/dxComnC5.bpk deleted file mode 100644 index 8d2016ba..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC5.bpk +++ /dev/null @@ -1,137 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxComnC5.bpl -OBJFILES = dxrgkeya.obj dxreged.obj dxCommon.obj dxComnC5.obj -RESFILES = dxComnC5.res -RESDEPEN = $(RESFILES) dxrgkeya.dfm dxreged.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = Vcl50.lib -PACKAGES = vcl50.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressCommonLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC5.cpp b/internal/x.46/ExpressCommon Library/Packages/dxComnC5.cpp deleted file mode 100644 index 129fe729..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC5.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxComnC5.res"); -USEPACKAGE("vcl50.bpi"); -USEFORMNS("dxrgkeya.pas", Dxrgkeya, frmdxAddNewRegKey); -USEFORMNS("dxreged.pas", Dxreged, frmdxLibREgPathEditor); -USEUNIT("dxCommon.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC5.res b/internal/x.46/ExpressCommon Library/Packages/dxComnC5.res deleted file mode 100644 index 451ca5d4..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnC5.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC6.bpk b/internal/x.46/ExpressCommon Library/Packages/dxComnC6.bpk deleted file mode 100644 index 30964c91..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC6.bpk +++ /dev/null @@ -1,137 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxComnC6.bpl -OBJFILES = dxrgkeya.obj dxreged.obj dxCommon.obj dxComnC6.obj -RESFILES = dxComnC6.res -RESDEPEN = $(RESFILES) dxrgkeya.dfm dxreged.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib -PACKAGES = rtl.bpi vcl.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressCommonLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC6.cpp b/internal/x.46/ExpressCommon Library/Packages/dxComnC6.cpp deleted file mode 100644 index 9f95fc44..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnC6.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxComnC6.res"); -USEPACKAGE("vcl.bpi"); -USEFORMNS("dxrgkeya.pas", Dxrgkeya, frmdxAddNewRegKey); -USEFORMNS("dxreged.pas", Dxreged, frmdxLibREgPathEditor); -USEUNIT("dxCommon.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnC6.res b/internal/x.46/ExpressCommon Library/Packages/dxComnC6.res deleted file mode 100644 index 9ba6b57e..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnC6.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD10.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD10.dpk deleted file mode 100644 index e653ebdc..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD10.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxComnD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxRgKeya, - dxRegEd, - dxCommon; - -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD10.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD10.res deleted file mode 100644 index cd97a0a4..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD10.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD10NET.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD10NET.dpk deleted file mode 100644 index d6762d1f..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD10NET.dpk +++ /dev/null @@ -1,92 +0,0 @@ -package dxComnD10NET; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Vcl; - -contains - dxDateUtils; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD10NET.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD10NET.res deleted file mode 100644 index 2251c3a9..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD10NET.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD11.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD11.dpk deleted file mode 100644 index 601bb8c9..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD11.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxComnD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxRgKeya, - dxRegEd, - dxCommon; - -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD11.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD11.res deleted file mode 100644 index 0a368abe..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD11.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD12.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD12.dpk deleted file mode 100644 index 740761da..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD12.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxComnD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxRgKeya, - dxRegEd, - dxCommon; - -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD12.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD12.res deleted file mode 100644 index 60e2c9bd..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD12.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD13.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD13.dpk deleted file mode 100644 index 5dc58444..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD13.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxComnD13; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxRgKeya, - dxRegEd, - dxCommon; - -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD13.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD13.res deleted file mode 100644 index e62c5aea..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD13.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD14.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD14.dpk deleted file mode 100644 index d1ba74c6..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD14.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxComnD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxRgKeya, - dxRegEd, - dxCommon; - -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD14.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD14.res deleted file mode 100644 index 672bd99a..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD14.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD5.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD5.dpk deleted file mode 100644 index f1a6bc1f..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD5.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxcomnD5; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl50; - -contains - dxCommon, - dxreged, - dxrgkeya; - -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD5.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD5.res deleted file mode 100644 index fc140ec2..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD5.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD6.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD6.dpk deleted file mode 100644 index fde19f08..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxcomnd6; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxCommon, - dxreged, - dxrgkeya; - -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD6.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD6.res deleted file mode 100644 index 8f5f224b..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD6.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD7.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD7.dpk deleted file mode 100644 index 9a2e36a6..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxComnD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxRgKeya, - dxRegEd, - dxCommon; - -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD7.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD7.res deleted file mode 100644 index f8d0918c..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD7.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD8.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD8.dpk deleted file mode 100644 index f54b42c8..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD8.dpk +++ /dev/null @@ -1,92 +0,0 @@ -package dxComnD8; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Vcl; - -contains - dxDateUtils; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD8.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD8.res deleted file mode 100644 index a4ba84a2..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD8.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD9.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD9.dpk deleted file mode 100644 index 3ec99fe0..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD9.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxComnD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxRgKeya, - dxRegEd, - dxCommon; - -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD9.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD9.res deleted file mode 100644 index 520d525b..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD9.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD9NET.dpk b/internal/x.46/ExpressCommon Library/Packages/dxComnD9NET.dpk deleted file mode 100644 index 4f72baeb..00000000 --- a/internal/x.46/ExpressCommon Library/Packages/dxComnD9NET.dpk +++ /dev/null @@ -1,92 +0,0 @@ -package dxComnD9NET; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCommonLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Vcl; - -contains - dxDateUtils; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressCommon Library/Packages/dxComnD9NET.res b/internal/x.46/ExpressCommon Library/Packages/dxComnD9NET.res deleted file mode 100644 index 1081b020..00000000 Binary files a/internal/x.46/ExpressCommon Library/Packages/dxComnD9NET.res and /dev/null differ diff --git a/internal/x.46/ExpressCommon Library/Sources/cxVer.inc b/internal/x.46/ExpressCommon Library/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/ExpressCommon Library/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/ExpressCommon Library/Sources/dxCommon.pas b/internal/x.46/ExpressCommon Library/Sources/dxCommon.pas deleted file mode 100644 index 2b5c3077..00000000 --- a/internal/x.46/ExpressCommon Library/Sources/dxCommon.pas +++ /dev/null @@ -1,191 +0,0 @@ - -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCommon routines } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxCommon; - -{$I cxVer.inc} - -interface - -uses - Windows; - -type - TdxCorner = (coTopLeft, coTopRight, coBottomLeft, coBottomRight); - -function dxDropDownNCHeight: Integer; -function GetCornerForRects(const EditRect, DropDownRect: TRect): TdxCorner; -function GetHitTestByCorner(ACorner: TdxCorner): Longint; - -procedure DrawCloseButton(DC: HDC; var ARect: TRect; Selected, Pressed: Boolean; - ACorner: TdxCorner); -procedure DrawSizeGrip(DC: HDC; var ARect: TRect; ACorner: TdxCorner); - -implementation - -uses - Classes; - -function dxDropDownNCHeight: Integer; -begin - Result := 2 + GetSystemMetrics(SM_CYHSCROLL); - if Result < GetSystemMetrics(SM_CYSIZE) then - Result := GetSystemMetrics(SM_CYSIZE); - Inc(Result); -end; - -function GetCornerForRects(const EditRect, DropDownRect: TRect): TdxCorner; -const - Corners: array[Boolean, Boolean] of TdxCorner = - ((coTopLeft, coBottomLeft), (coTopRight, coBottomRight)); -begin - Result := - Corners[EditRect.Left < DropDownRect.Right, EditRect.Bottom < DropDownRect.Bottom]; -end; - -function GetHitTestByCorner(ACorner: TdxCorner): Longint; -const - HitTests: array[TdxCorner] of Longint = - (HTTOPLEFT, HTTOPRIGHT, HTBOTTOMLEFT, HTBOTTOMRIGHT); -begin - Result := HitTests[ACorner]; -end; - -procedure DrawCloseButton(DC: HDC; var ARect: TRect; Selected, Pressed: Boolean; - ACorner: TdxCorner); -const - Borders: array[Boolean] of Longint = (BDR_RAISEDINNER, BDR_SUNKENOUTER); - States: array[Boolean] of Longint = (0, DFCS_PUSHED); -var - Delta, SX, SY: Integer; - Rgn1, Rgn2: HRGN; - ClipRgnExists: Boolean; -begin - SX := GetSystemMetrics(SM_CXSIZE); - Delta := 1;//Byte(SX = 18); - SY := GetSystemMetrics(SM_CXSIZE) + Delta; - with ARect do - begin - if ACorner in [coTopRight, coBottomRight] then - Right := Left + SX - else - Left := Right - SX; - Top := (Top + Bottom - SY) div 2; - if ACorner in [coBottomLeft, coBottomRight] then Inc(Top, Delta); - Bottom := Top + SY; - end; - InflateRect(ARect, -1, -2); - if Selected then - DrawEdge(DC, ARect, Borders[Pressed], BF_RECT) - else - FrameRect(DC, ARect, GetSysColorBrush(COLOR_BTNFACE)); - InflateRect(ARect, -1, -1); - FrameRect(DC, ARect, GetSysColorBrush(COLOR_BTNFACE)); - - Rgn1 := CreateRectRgn(0, 0, 0, 0); - ClipRgnExists := GetClipRgn(DC, Rgn1) = 1; - with ARect do - Rgn2 := CreateRectRgn(Left + 1, Top + 1, Right - 1, Bottom - 1); - SelectClipRgn(DC, Rgn2); - DeleteObject(Rgn2); - InflateRect(ARect, 1, 1); - if SX <> 22 then Inc(ARect.Top, Delta); - DrawFrameControl(DC, ARect, DFC_CAPTION, DFCS_CAPTIONCLOSE or DFCS_FLAT or States[Pressed]); - if SX <> 22 then Dec(ARect.Top, Delta); - if ClipRgnExists then - SelectClipRgn(DC, Rgn1) - else - SelectClipRgn(DC, 0); - DeleteObject(Rgn1); -end; - -procedure DrawSizeGrip(DC: HDC; var ARect: TRect; ACorner: TdxCorner); -const - Offset = 2; -var - MirrorX, MirrorY: Boolean; - R: TRect; - X, Y: Integer; - MDC: HDC; - PrevB: HBITMAP; -begin - with ARect do - begin - if ACorner in [coTopRight, coBottomRight] then - Left := Right - GetSystemMetrics(SM_CXVSCROLL) - else - Right := Left + GetSystemMetrics(SM_CXVSCROLL); - if ACorner in [coBottomLeft, coBottomRight] then - Top := Bottom - GetSystemMetrics(SM_CYHSCROLL) - else - Bottom := Top + GetSystemMetrics(SM_CYHSCROLL); - MirrorX := ACorner in [coTopLeft, coBottomLeft]; - MirrorY := ACorner in [coTopLeft, coTopRight]; - end; - R := ARect; - with R do - begin - if MirrorX then - begin - Inc(Left, Offset); - FillRect(DC, Rect(ARect.Left, Top, Left, Bottom), COLOR_BTNFACE + 1); - end - else - begin - Dec(Right, Offset); - FillRect(DC, Rect(Right, Top, ARect.Right, Bottom), COLOR_BTNFACE + 1); - end; - if MirrorY then - begin - Inc(Top, Offset); - FillRect(DC, Rect(Left, ARect.Top, Right, Top), COLOR_BTNFACE + 1); - end - else - begin - Dec(Bottom, Offset); - FillRect(DC, Rect(Left, Bottom, Right, ARect.Bottom), COLOR_BTNFACE + 1); - end; - X := Left; - Y := Top; - OffsetRect(R, -Left, -Top); - end; - - MDC := CreateCompatibleDC(DC); - PrevB := SelectObject(MDC, CreateCompatibleBitmap(DC, R.Right, R.Bottom)); - DrawFrameControl(MDC, R, DFC_SCROLL, DFCS_SCROLLSIZEGRIP); - with R do - StretchBlt(DC, X, Y, Right, Bottom, - MDC, Byte(MirrorX) * (Right - 1), Byte(MirrorY) * (Bottom - 1), - (2 * Byte(not MirrorX) - 1) * Right, - (2 * Byte(not MirrorY) - 1) * Bottom, SRCCOPY); - DeleteObject(SelectObject(MDC, PrevB)); - DeleteDC(MDC); -end; - -end. diff --git a/internal/x.46/ExpressCommon Library/Sources/dxreged.dfm b/internal/x.46/ExpressCommon Library/Sources/dxreged.dfm deleted file mode 100644 index 68e7219b..00000000 --- a/internal/x.46/ExpressCommon Library/Sources/dxreged.dfm +++ /dev/null @@ -1,415 +0,0 @@ -object frmdxLibREgPathEditor: TfrmdxLibREgPathEditor - Left = 225 - Top = 106 - Width = 395 - Height = 365 - ActiveControl = TreeView - BorderIcons = [biSystemMenu, biMaximize] - Caption = 'Developer Express Registry path property editor' - Color = clBtnFace - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 0073701919190000073700000000000073700091910000073708000000000073 - 708077770000073700078888000073708077780880003708077780B080007000 - 78888888800008078800888070000078004000800000078078FF8F8F00000807 - 880000007000007888888807000007888888707000007000000007000000FC00 - 0000F8000000F0010000E0030000C00700008007000000030000000300000003 - 000000030000000300000007000000070000000F0000001F0000003F0000} - OldCreateOrder = True - Position = poScreenCenter - OnCreate = FormCreate - OnDestroy = FormDestroy - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Panel: TPanel - Left = 0 - Top = 289 - Width = 387 - Height = 49 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - object lbRegistry: TLabel - Left = 4 - Top = 6 - Width = 5 - Height = 13 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - end - object bOk: TButton - Left = 236 - Top = 25 - Width = 72 - Height = 22 - Caption = '&OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object bCancel: TButton - Left = 312 - Top = 25 - Width = 72 - Height = 22 - Cancel = True - Caption = '&Cancel' - ModalResult = 2 - TabOrder = 3 - end - object bNew: TButton - Left = 3 - Top = 25 - Width = 72 - Height = 22 - Caption = '&New' - TabOrder = 0 - OnClick = bNewClick - end - object bDelete: TButton - Left = 80 - Top = 25 - Width = 72 - Height = 22 - Caption = '&Delete' - TabOrder = 1 - OnClick = bDeleteClick - end - end - object TreeView: TTreeView - Left = 0 - Top = 0 - Width = 387 - Height = 289 - Align = alClient - HideSelection = False - Images = ImageList - Indent = 21 - ReadOnly = True - TabOrder = 1 - OnChange = TreeViewChange - OnCollapsed = TreeViewCollapsed - OnExpanded = TreeViewExpanded - OnGetImageIndex = TreeViewGetImageIndex - OnGetSelectedIndex = TreeViewGetSelectedIndex - end - object ImageList: TImageList - Width = 18 - Left = 114 - Top = 50 - Bitmap = { - 494C010102000500040012001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000480000002000000001002000000000000024 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080000000000000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF0080808000000000000000000000000000000000000000 - 000000000000808080000000000000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF008080800000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000000000C0C0 - C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C00000FFFF00C0C0C00080808000000000000000000000000000000000000000 - 0000808080000000000000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C00000FFFF00C0C0C00000FFFF00C0C0C0000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080000000000000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF0080808000000000000000000000000000000000000000 - 00008080800000000000C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF00C0C0C000808080000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000000000C0C0 - C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C00000FFFF00C0C0C00080808000000000000000000000000000000000008080 - 800000000000C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C00000FFFF00C0C0C00000FFFF00000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080000000000000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF0080808000000000000000000000000000000000008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000008080800000000000C0C0C00080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000000000C0C0 - C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C00000FFFF00C0C0C00080808000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000808080008080800000FFFF0080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080000000000000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF0080808000000000000000000000000000000000000000 - 00008080800000000000C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000808080000000000000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000FFFF00C0C0 - C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF0080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 00008080800000000000C0C0C00000FFFF00C0C0C00000FFFF00C0C0C0000000 - 0000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000008080800000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF008080800000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000808080008080800080808000808080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000048000000200000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFF000000000000000FFFFFFFF - F000000000000000C000FC0010000000000000008000F8001000000000000000 - A000FA001000000000000000A000F4001000000000000000A000F40010000000 - 00000000A000E8001000000000000000A000EFFC1000000000000000A000E000 - 1000000000000000A000F4001000000000000000BFFCF40F9000000000000000 - 8001F4103000000000000000C07FFBEFF000000000000000E0FFFC1FF0000000 - 00000000FFFFFFFFF000000000000000} - end -end diff --git a/internal/x.46/ExpressCommon Library/Sources/dxreged.pas b/internal/x.46/ExpressCommon Library/Sources/dxreged.pas deleted file mode 100644 index c3c44802..00000000 --- a/internal/x.46/ExpressCommon Library/Sources/dxreged.pas +++ /dev/null @@ -1,271 +0,0 @@ - -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Registry path property editor } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxRegEd; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, ComCtrls, ExtCtrls, Registry, ImgList; - -type - TfrmdxLibREgPathEditor = class(TForm) - Panel: TPanel; - TreeView: TTreeView; - bOk: TButton; - bCancel: TButton; - bNew: TButton; - ImageList: TImageList; - lbRegistry: TLabel; - bDelete: TButton; - procedure FormCreate(Sender: TObject); - procedure FormDestroy(Sender: TObject); - procedure TreeViewChange(Sender: TObject; Node: TTreeNode); - procedure bNewClick(Sender: TObject); - procedure TreeViewGetImageIndex(Sender: TObject; Node: TTreeNode); - procedure TreeViewGetSelectedIndex(Sender: TObject; Node: TTreeNode); - procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode); - procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode); - procedure bDeleteClick(Sender: TObject); - private - reg : TRegistry; - function GetFullText(Node : TTreeNode) : String; - procedure WMGetMinMaxInfo(var Message : TWMGetMinMaxInfo); message WM_GETMINMAXINFO; - public - end; - -function dxGetRegistryPath(Var APath : String) : Boolean; - -implementation - -uses - dxrgkeya; - -var - ATempPath : String; - -function dxGetRegistryPath(Var APath : String) : Boolean; -var - AForm : TfrmdxLibREgPathEditor; -begin - if (APath <> '') and (APath[1] = '\') then - ATempPath := Copy(APath, 2, 1000) - else ATempPath := APath; - AForm := TfrmdxLibREgPathEditor.Create(Nil); - AForm.ShowModal; - Result := AForm.ModalResult = mrOk; - if (Result) then - APath := AForm.lbRegistry.Caption; - AForm.Free; -end; - -{$R *.DFM} -function TfrmdxLibREgPathEditor.GetFullText(Node : TTreeNode) : String; -begin - if(Node = nil) then - begin - Result := ''; - exit; - end; - Result := Node.Text; - while Node.Parent <> nil do - begin - Node := Node.Parent; - Result := Node.Text + '\' + Result; - end; - Result := '\' + Result; -end; - -procedure TfrmdxLibREgPathEditor.FormCreate(Sender: TObject); -var - Sts : TStrings; - i : Integer; - - procedure FillRegistry(Node : TTreeNode; APath, ASt : String); - var - ANode : TTreeNode; - i : Integer; - ASts : TStrings; - Areg : TRegistry; - begin - ASts := TStringList.Create; - try - AReg := TRegistry.Create; - try - APath := APath + '\' + ASt; - AReg.OpenKey(APath, False); - AReg.GetKeyNames(ASts); - ANode := TreeView.Items.AddChild(Node, ASt); - if CompareText(APath, ATempPath) = 0 then - ANode.Selected := True; - finally - AReg.Free; - end; - for i := 0 to ASts.Count - 1 do - FillRegistry(ANode, APath, ASts[i]); - finally - ASts.Free; - end; - end; - -var - ANode : TTreeNode; -begin -{$IFDEF DELPHI9} - PopupMode := pmAuto; -{$ENDIF} - reg := TRegistry.Create; - reg.OpenKey('Software', False); - Sts := TStringList.Create; - reg.GetKeyNames(Sts); - TreeView.Items.BeginUpdate; - try - TreeView.Items.Clear; - ANode := TreeView.Items.Add(nil, 'Software'); - for i := 0 to Sts.Count - 1 do - FillRegistry(ANode, 'Software', Sts[i]); - if TreeView.Selected = nil then - begin - TreeView.Items[0].Expand(False); - TreeView.Selected := TreeView.Items[0]; - end; - finally - TreeView.Items.EndUpdate; - TreeView.Selected.MakeVisible; - Sts.Free; - end; -end; - -procedure TfrmdxLibREgPathEditor.FormDestroy(Sender: TObject); -begin - reg.Free; -end; - -procedure TfrmdxLibREgPathEditor.TreeViewChange(Sender: TObject; - Node: TTreeNode); -begin - if (Node <> nil) then - lbRegistry.Caption := GetFulltext(Node) - else lbRegistry.Caption := ''; - bNew.Enabled := (TreeView.Selected <> nil); - bDelete.Enabled := (TreeView.Selected <> nil) and (TreeView.Selected.Parent <> nil); - bOk.Enabled := bDelete.Enabled; -end; - -procedure TfrmdxLibREgPathEditor.bNewClick(Sender: TObject); -var - AReg : TRegistry; - St : String; - Node : TTreeNode; -begin - if(TreeView.Selected = Nil) then exit; - AReg := TRegistry.Create; - AReg.OpenKey(GetFullText(TreeView.Selected), False); - St := dxGetNewRegistryKey; - if(St <> '') then - begin - if(AReg.CreateKey(St)) then - begin - Node := TreeView.Items.AddChild(TreeView.Selected, St); - Node.Selected := True; - Node.MakeVisible; - end; - end; - AReg.Free; -end; - -procedure TfrmdxLibREgPathEditor.TreeViewGetImageIndex(Sender: TObject; - Node: TTreeNode); -begin - if Node.HasChildren and Node.Expanded then - Node.ImageIndex := 1 - else Node.ImageIndex := 0; - Node.SelectedIndex := Node.ImageIndex; -end; - -procedure TfrmdxLibREgPathEditor.TreeViewGetSelectedIndex(Sender: TObject; - Node: TTreeNode); -begin - TreeViewGetImageIndex(Sender, Node); -end; - -procedure TfrmdxLibREgPathEditor.TreeViewExpanded(Sender: TObject; - Node: TTreeNode); -begin - TreeView.Refresh; -end; - -procedure TfrmdxLibREgPathEditor.TreeViewCollapsed(Sender: TObject; - Node: TTreeNode); -begin - TreeView.Refresh; -end; - -procedure TfrmdxLibREgPathEditor.bDeleteClick(Sender: TObject); - - function DeleteNode(ANode : TTreeNode) : Boolean; - var - AReg : TRegistry; - begin - Result := True; - while ANode.Count > 0 do - begin - Result := DeleteNode(ANode.Item[0]); - if not Result then - Break; - end; - if Result then - begin - AReg := TRegistry.Create; - Result := AReg.DeleteKey(GetFullText(ANode)); - if Result then - ANode.Free; - AReg.Free; - end; - end; - -begin - if(TreeView.Selected = Nil) or (TreeView.Selected.Parent = Nil) then exit; - if (MessageBox(self.Handle, 'Are you sure you want delete this key?', - 'Confirm Key Delete', MB_ICONWARNING or MB_YESNO) = IDYES) - and (DeleteNode(TreeView.Selected)) then - TreeViewChange(Sender, TreeView.Selected) - else FormCreate(nil); -end; - -procedure TfrmdxLibREgPathEditor.WMGetMinMaxInfo(var Message : TWMGetMinMaxInfo); -begin - Message.MinMaxInfo^.ptMinTrackSize := Point(395, 365); - inherited; -end; - -end. diff --git a/internal/x.46/ExpressCommon Library/Sources/dxrgkeya.dfm b/internal/x.46/ExpressCommon Library/Sources/dxrgkeya.dfm deleted file mode 100644 index cef92805..00000000 --- a/internal/x.46/ExpressCommon Library/Sources/dxrgkeya.dfm +++ /dev/null @@ -1,51 +0,0 @@ -object frmdxAddNewRegKey: TfrmdxAddNewRegKey - Left = 195 - Top = 106 - BorderIcons = [biSystemMenu] - BorderStyle = bsDialog - Caption = 'Add a new registry key' - ClientHeight = 84 - ClientWidth = 279 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 120 - TextHeight = 16 - AutoScroll = False - object lblName: TLabel - Left = 2 - Top = 15 - Width = 37 - Height = 16 - Caption = 'Name' - end - object Edit: TEdit - Left = 66 - Top = 10 - Width = 210 - Height = 24 - TabOrder = 0 - OnChange = EditChange - end - object bOk: TButton - Left = 90 - Top = 49 - Width = 88 - Height = 27 - Caption = '&OK' - Default = True - Enabled = False - ModalResult = 1 - TabOrder = 1 - end - object bCancel: TButton - Left = 187 - Top = 49 - Width = 89 - Height = 27 - Cancel = True - Caption = '&Cancel' - ModalResult = 2 - TabOrder = 2 - end -end diff --git a/internal/x.46/ExpressCommon Library/Sources/dxrgkeya.pas b/internal/x.46/ExpressCommon Library/Sources/dxrgkeya.pas deleted file mode 100644 index 25fd5069..00000000 --- a/internal/x.46/ExpressCommon Library/Sources/dxrgkeya.pas +++ /dev/null @@ -1,71 +0,0 @@ - -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Regisry path property editor } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxRgKeya; - -interface - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls; - -type - TfrmdxAddNewRegKey = class(TForm) - Edit: TEdit; - lblName: TLabel; - bOk: TButton; - bCancel: TButton; - procedure EditChange(Sender: TObject); - private - public - end; - -function dxGetNewRegistryKey : String; - -implementation - -{$R *.DFM} -function dxGetNewRegistryKey : String; -var - AForm : TfrmdxAddNewRegKey; -begin - AForm := TfrmdxAddNewRegKey.Create(nil); - AForm.ShowModal; - if(AForm.ModalResult = mrOK) then - Result := AForm.Edit.Text - else Result := ''; - AForm.Free; -end; - -procedure TfrmdxAddNewRegKey.EditChange(Sender: TObject); -begin - bOk.Enabled := Edit.Text <> ''; -end; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC10.bpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC10.bpk deleted file mode 100644 index 85a78ebd..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC10.bpk +++ /dev/null @@ -1,128 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxCoreC10.bpl -OBJFILES = dxCoreReg.obj \ - dcldxCoreC10.obj -MAINSOURCE = dcldxCoreC10.cpp -RESFILES = dcldxCoreC10.res -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi vcl.bpi designide.bpi dxCoreC10.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressCoreLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpd -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC10.cpp b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC10.cpp deleted file mode 100644 index 04eaaaea..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC10.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxCoreC10.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEUNIT("dxCoreReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC10.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC10.res deleted file mode 100644 index edf067b6..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC10.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC11.bpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC11.bpk deleted file mode 100644 index abbd74c2..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC11.bpk +++ /dev/null @@ -1,128 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxCoreC11.bpl -OBJFILES = dxCoreReg.obj \ - dcldxCoreC11.obj -MAINSOURCE = dcldxCoreC11.cpp -RESFILES = dcldxCoreC11.res -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi vcl.bpi designide.bpi dxCoreC11.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressCoreLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpd -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC11.cpp b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC11.cpp deleted file mode 100644 index 15c26c1a..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC11.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxCoreC11.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEUNIT("dxCoreReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC11.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC11.res deleted file mode 100644 index 0d3aee52..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC11.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC12.bpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC12.bpk deleted file mode 100644 index 7007f9a4..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC12.bpk +++ /dev/null @@ -1,128 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxCoreC12.bpl -OBJFILES = dxCoreReg.obj \ - dcldxCoreC12.obj -MAINSOURCE = dcldxCoreC12.cpp -RESFILES = dcldxCoreC12.res -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi vcl.bpi designide.bpi dxCoreC12.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressCoreLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpd -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC12.cpp b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC12.cpp deleted file mode 100644 index 4f57aaa6..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC12.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxCoreC12.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEUNIT("dxCoreReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC12.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC12.res deleted file mode 100644 index 7f38b501..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC12.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC14.bpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC14.bpk deleted file mode 100644 index 1765cab2..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC14.bpk +++ /dev/null @@ -1,128 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxCoreC14.bpl -OBJFILES = dxCoreReg.obj \ - dcldxCoreC14.obj -MAINSOURCE = dcldxCoreC14.cpp -RESFILES = dcldxCoreC14.res -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi vcl.bpi designide.bpi dxCoreC14.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressCoreLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpd -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC14.cpp b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC14.cpp deleted file mode 100644 index fa83fc71..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC14.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxCoreC14.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEUNIT("dxCoreReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC14.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC14.res deleted file mode 100644 index 1c7506df..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC14.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC6.bpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC6.bpk deleted file mode 100644 index 4a77e7a9..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC6.bpk +++ /dev/null @@ -1,128 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxCoreC6.bpl -OBJFILES = dxCoreReg.obj \ - dcldxCoreC6.obj -MAINSOURCE = dcldxCoreC6.cpp -RESFILES = dcldxCoreC6.res -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi vcl.bpi designide.bpi dxCoreC6.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressCoreLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpd -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC6.cpp b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC6.cpp deleted file mode 100644 index 45a216ea..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC6.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxCoreC6.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEUNIT("dxCoreReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC6.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreC6.res deleted file mode 100644 index d6e983ed..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreC6.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD10.dpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD10.dpk deleted file mode 100644 index f1cc8924..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD10.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dcldxCoreD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD10; - -contains - dxCoreReg; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD10.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD10.res deleted file mode 100644 index 60da8441..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD10.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD11.dpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD11.dpk deleted file mode 100644 index 9b1d674b..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD11.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dcldxCoreD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD11; - -contains - dxCoreReg; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD11.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD11.res deleted file mode 100644 index 38e5956d..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD11.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD12.dpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD12.dpk deleted file mode 100644 index 70fcea69..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD12.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dcldxCoreD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD12; - -contains - dxCoreReg; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD12.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD12.res deleted file mode 100644 index 9c03b993..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD12.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD14.dpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD14.dpk deleted file mode 100644 index 384d3064..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD14.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dcldxCoreD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD14; - -contains - dxCoreReg; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD14.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD14.res deleted file mode 100644 index 6095613e..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD14.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD6.dpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD6.dpk deleted file mode 100644 index 5a239b6c..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dcldxCoreD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD6; - -contains - dxCoreReg; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD6.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD6.res deleted file mode 100644 index b2f83e03..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD6.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD7.dpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD7.dpk deleted file mode 100644 index 3c7f1be6..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dcldxCoreD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD7; - -contains - dxCoreReg; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD7.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD7.res deleted file mode 100644 index 2fe6e4c6..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD7.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD9.dpk b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD9.dpk deleted file mode 100644 index 02bac8eb..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD9.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dcldxCoreD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD9; - -contains - dxCoreReg; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD9.res b/internal/x.46/ExpressCore Library/Packages/dcldxCoreD9.res deleted file mode 100644 index b6dd30cd..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dcldxCoreD9.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC10.bpk b/internal/x.46/ExpressCore Library/Packages/dxCoreC10.bpk deleted file mode 100644 index 1bfec738..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreC10.bpk +++ /dev/null @@ -1,128 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxCoreC10.bpl -OBJFILES = dxCore.obj \ - dxCoreC10.obj -MAINSOURCE = dxCoreC10.cpp -RESFILES = dxCoreC10.res -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi vcl.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressCoreLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpr -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC10.cpp b/internal/x.46/ExpressCore Library/Packages/dxCoreC10.cpp deleted file mode 100644 index db0f5bb4..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreC10.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxCoreC10.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEUNIT("dxCore.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC10.res b/internal/x.46/ExpressCore Library/Packages/dxCoreC10.res deleted file mode 100644 index 2b665e7a..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreC10.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC11.bpk b/internal/x.46/ExpressCore Library/Packages/dxCoreC11.bpk deleted file mode 100644 index b907795e..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreC11.bpk +++ /dev/null @@ -1,128 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxCoreC11.bpl -OBJFILES = dxCore.obj \ - dxCoreC11.obj -MAINSOURCE = dxCoreC11.cpp -RESFILES = dxCoreC11.res -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi vcl.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressCoreLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpr -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC11.cpp b/internal/x.46/ExpressCore Library/Packages/dxCoreC11.cpp deleted file mode 100644 index 52aeca17..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreC11.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxCoreC11.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEUNIT("dxCore.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC11.res b/internal/x.46/ExpressCore Library/Packages/dxCoreC11.res deleted file mode 100644 index 4e3a1fe7..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreC11.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC12.bpk b/internal/x.46/ExpressCore Library/Packages/dxCoreC12.bpk deleted file mode 100644 index 2fd4b2be..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreC12.bpk +++ /dev/null @@ -1,128 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxCoreC12.bpl -OBJFILES = dxCore.obj \ - dxCoreC12.obj -MAINSOURCE = dxCoreC12.cpp -RESFILES = dxCoreC12.res -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi vcl.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressCoreLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpr -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC12.cpp b/internal/x.46/ExpressCore Library/Packages/dxCoreC12.cpp deleted file mode 100644 index 7a18aff9..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreC12.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxCoreC12.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEUNIT("dxCore.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC12.res b/internal/x.46/ExpressCore Library/Packages/dxCoreC12.res deleted file mode 100644 index e0ce0aee..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreC12.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC14.bpk b/internal/x.46/ExpressCore Library/Packages/dxCoreC14.bpk deleted file mode 100644 index f2d7cbfb..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreC14.bpk +++ /dev/null @@ -1,128 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxCoreC14.bpl -OBJFILES = dxCore.obj \ - dxCoreC14.obj -MAINSOURCE = dxCoreC14.cpp -RESFILES = dxCoreC14.res -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi vcl.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressCoreLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpr -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC14.cpp b/internal/x.46/ExpressCore Library/Packages/dxCoreC14.cpp deleted file mode 100644 index 76dea17f..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreC14.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxCoreC14.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEUNIT("dxCore.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC14.res b/internal/x.46/ExpressCore Library/Packages/dxCoreC14.res deleted file mode 100644 index f49cec69..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreC14.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC6.bpk b/internal/x.46/ExpressCore Library/Packages/dxCoreC6.bpk deleted file mode 100644 index 26ca5090..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreC6.bpk +++ /dev/null @@ -1,128 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxCoreC6.bpl -OBJFILES = dxCore.obj \ - dxCoreC6.obj -MAINSOURCE = dxCoreC6.cpp -RESFILES = dxCoreC6.res -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi vcl.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressCoreLibrary by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpr -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC6.cpp b/internal/x.46/ExpressCore Library/Packages/dxCoreC6.cpp deleted file mode 100644 index d3762def..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreC6.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxCoreC6.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEUNIT("dxCore.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreC6.res b/internal/x.46/ExpressCore Library/Packages/dxCoreC6.res deleted file mode 100644 index e98c7119..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreC6.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD10.dpk b/internal/x.46/ExpressCore Library/Packages/dxCoreD10.dpk deleted file mode 100644 index b6927416..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreD10.dpk +++ /dev/null @@ -1,36 +0,0 @@ -package dxCoreD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxCore; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD10.res b/internal/x.46/ExpressCore Library/Packages/dxCoreD10.res deleted file mode 100644 index 36bc34a5..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreD10.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD11.dpk b/internal/x.46/ExpressCore Library/Packages/dxCoreD11.dpk deleted file mode 100644 index 3f3f6b43..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreD11.dpk +++ /dev/null @@ -1,36 +0,0 @@ -package dxCoreD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxCore; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD11.res b/internal/x.46/ExpressCore Library/Packages/dxCoreD11.res deleted file mode 100644 index 4ca906bb..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreD11.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD12.dpk b/internal/x.46/ExpressCore Library/Packages/dxCoreD12.dpk deleted file mode 100644 index 795710b4..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreD12.dpk +++ /dev/null @@ -1,36 +0,0 @@ -package dxCoreD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxCore; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD12.res b/internal/x.46/ExpressCore Library/Packages/dxCoreD12.res deleted file mode 100644 index 0a7fc319..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreD12.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD14.dpk b/internal/x.46/ExpressCore Library/Packages/dxCoreD14.dpk deleted file mode 100644 index fe61314d..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreD14.dpk +++ /dev/null @@ -1,36 +0,0 @@ -package dxCoreD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxCore; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD14.res b/internal/x.46/ExpressCore Library/Packages/dxCoreD14.res deleted file mode 100644 index 2bb343d2..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreD14.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD6.dpk b/internal/x.46/ExpressCore Library/Packages/dxCoreD6.dpk deleted file mode 100644 index cb89cabc..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreD6.dpk +++ /dev/null @@ -1,36 +0,0 @@ -package dxCoreD6; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxCore; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD6.res b/internal/x.46/ExpressCore Library/Packages/dxCoreD6.res deleted file mode 100644 index 8734527b..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreD6.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD7.dpk b/internal/x.46/ExpressCore Library/Packages/dxCoreD7.dpk deleted file mode 100644 index 0a7717e8..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreD7.dpk +++ /dev/null @@ -1,36 +0,0 @@ -package dxCoreD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxCore; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD7.res b/internal/x.46/ExpressCore Library/Packages/dxCoreD7.res deleted file mode 100644 index 9a6f4c3d..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreD7.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD9.dpk b/internal/x.46/ExpressCore Library/Packages/dxCoreD9.dpk deleted file mode 100644 index 07b86816..00000000 --- a/internal/x.46/ExpressCore Library/Packages/dxCoreD9.dpk +++ /dev/null @@ -1,36 +0,0 @@ -package dxCoreD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressCoreLibrary by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxCore; - -end. diff --git a/internal/x.46/ExpressCore Library/Packages/dxCoreD9.res b/internal/x.46/ExpressCore Library/Packages/dxCoreD9.res deleted file mode 100644 index 2241e261..00000000 Binary files a/internal/x.46/ExpressCore Library/Packages/dxCoreD9.res and /dev/null differ diff --git a/internal/x.46/ExpressCore Library/Sources/cxVer.inc b/internal/x.46/ExpressCore Library/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/ExpressCore Library/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/ExpressCore Library/Sources/dxCore.pas b/internal/x.46/ExpressCore Library/Sources/dxCore.pas deleted file mode 100644 index 775cd90e..00000000 --- a/internal/x.46/ExpressCore Library/Sources/dxCore.pas +++ /dev/null @@ -1,1087 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCoreLibrary } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCORELIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxCore; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, SysUtils, Variants, Contnrs, Graphics; - -const - dxBuildNumber = 46; - dxUnicodePrefix: Word = $FEFF; - -type -{$IFNDEF DELPHI12} - TBytes = array of Byte; - TRecordBuffer = PAnsiChar; - TValueBuffer = Pointer; -{$ENDIF} - - IdxLocalizerListener = interface - ['{2E98333B-1A56-4599-8A85-C2540E182031}'] - procedure TranslationChanged; - end; - - TdxAnsiCharSet = set of AnsiChar; - - { TdxStream } - - TdxStream = class(TStream) - private - FIsUnicode: Boolean; - FStream: TStream; - protected - {$IFDEF DELPHI7} - function GetSize: Int64; override; - {$ENDIF} - public - constructor Create(AStream: TStream); virtual; - function Read(var Buffer; Count: Longint): Longint; override; - function Seek(Offset: Longint; Origin: Word): Longint; override; - function Write(const Buffer; Count: Longint): Longint; override; - - property IsUnicode: Boolean read FIsUnicode; - property Stream: TStream read FStream; - end; - - TdxProductResourceStrings = class; - - TdxAddResourceStringsProcedure = procedure(AProduct: TdxProductResourceStrings); - - TdxProductResourceStrings = class - private - FName: string; - FInitializeProc: TdxAddResourceStringsProcedure; - FResStringNames: TStrings; - - function GetNames(AIndex: Integer): string; - function GetResStringsCount: Integer; - procedure SetTranslation(AIndex: Integer); - function GetValues(AIndex: Integer): string; - procedure InitializeResStringNames; - protected - procedure Translate; - public - constructor Create(const AName: string; AInitializeProc: TdxAddResourceStringsProcedure); virtual; - destructor Destroy; override; - procedure Add(const AResStringName: string; AResStringAddr: Pointer); - procedure Clear; - function GetIndexByName(const AName: string): Integer; - - property Name: string read FName; - property Names[AIndex: Integer]: string read GetNames; - property ResStringsCount: Integer read GetResStringsCount; - property Values[AIndex: Integer]: string read GetValues; - end; - - TdxLocalizationTranslateResStringEvent = procedure(const AResStringName: string; AResString: Pointer) of object; - - TdxResourceStringsRepository = class - private - FListeners: TList; - FProducts: TObjectList; - FOnTranslateResString: TdxLocalizationTranslateResStringEvent; - - function GetProducts(AIndex: Integer): TdxProductResourceStrings; - function GetProductsCount: Integer; - public - constructor Create; virtual; - destructor Destroy; override; - - procedure AddListener(AListener: IdxLocalizerListener); - procedure RemoveListener(AListener: IdxLocalizerListener); - procedure NotifyListeners; - - procedure RegisterProduct(const AProductName: string; AAddStringsProc: TdxAddResourceStringsProcedure); - function GetProductIndexByName(AName: string): Integer; - function GetOriginalValue(const AName: string): string; - procedure Translate; - procedure UnRegisterProduct(const AProductName: string); - - property Products[Index: Integer]: TdxProductResourceStrings read GetProducts; - property ProductsCount: Integer read GetProductsCount; - property OnTranslateResString: TdxLocalizationTranslateResStringEvent read FOnTranslateResString write FOnTranslateResString; - end; - - EdxException = class(Exception); - - -// string functions -function dxBinToHex(const ABuffer: AnsiString): AnsiString; overload; -function dxBinToHex(const ABuffer: PAnsiChar; ABufSize: Integer): AnsiString; overload; -function dxHexToBin(const AText: AnsiString): AnsiString; overload; -function dxHexToBin(const AText: PAnsiChar): AnsiString; overload; -function dxCharInSet(C: Char; const ACharSet: TdxAnsiCharSet): Boolean; {$IFDEF DELPHI9} inline;{$ENDIF} -function dxStringSize(const S: string): Integer; {$IFDEF DELPHI9} inline;{$ENDIF} - -function dxAnsiIsAlpha(Ch: AnsiChar): Boolean; -function dxCharIsAlpha(Ch: Char): Boolean; -function dxWideIsAlpha(Ch: WideChar): Boolean; -function dxAnsiIsNumeric(Ch: AnsiChar): Boolean; -function dxCharIsNumeric(Ch: Char): Boolean; -function dxWideIsNumeric(Ch: WideChar): Boolean; - -function dxGetCodePageFromCharset(ACharset: Integer): Integer; - -// string conversions -function dxAnsiStringToWideString(const ASource: AnsiString; ACodePage: Cardinal = CP_ACP; - ASrcLength: Integer = -1): WideString; -function dxWideStringToAnsiString(const ASource: WideString; ACodePage: Cardinal = CP_ACP; - ASrcLength: Integer = -1): AnsiString; - -function dxAnsiStringToString(const S: AnsiString; ACodePage: Integer = CP_ACP): string; {$IFDEF DELPHI9} inline;{$ENDIF} -function dxStringToAnsiString(const S: string; ACodePage: Integer = CP_ACP): AnsiString; {$IFDEF DELPHI9} inline;{$ENDIF} - -function dxShortStringToString(const S: ShortString): string; {$IFDEF DELPHI9} inline;{$ENDIF} -function dxStringToShortString(const S: string): ShortString; {$IFDEF DELPHI9} inline;{$ENDIF} - -function dxStringToWideString(const S: string; ACodePage: Integer = CP_ACP): WideString; {$IFDEF DELPHI9} inline;{$ENDIF} -function dxWideStringToString(const S: WideString; ACodePage: Integer = CP_ACP): string; {$IFDEF DELPHI9} inline;{$ENDIF} - -function dxVariantToString(const V: Variant): string; -function dxVariantToAnsiString(const V: Variant): AnsiString; -function dxVariantToWideString(const V: Variant): WideString; - -function dxVarIsBlob(const V: Variant): Boolean; - -function dxConcatenateStrings(const AStrings: array of PChar): string; -procedure dxStringToBytes(const S: string; var Buf); - -function dxUTF8StringToAnsiString(const S: UTF8String): AnsiString; -function dxUTF8StringToWideString(const S: UTF8String): WideString; -function dxAnsiStringToUTF8String(const S: AnsiString): UTF8String; -function dxWideStringToUTF8String(const S: WideString): UTF8String; - -function dxColorToRGBQuad(AColor: TColor; AReserved: Byte = 0): TRGBQuad; - -// streaming -function dxIsUnicodeStream(AStream: TStream): Boolean; -procedure dxWriteStandardEncodingSignature(AStream: TStream); -procedure dxWriteStreamType(AStream: TStream); - -function dxReadStr(Stream: TStream; AIsUnicode: Boolean): string; -procedure dxWriteStr(Stream: TStream; const S: string); - -function dxResourceStringsRepository: TdxResourceStringsRepository; - -function dxGetStringTypeA(Locale: LCID; dwInfoType: DWORD; const lpSrcStr: PAnsiChar; - cchSrc: Integer; var lpCharType): BOOL; -function dxGetStringTypeW(dwInfoType: DWORD; const lpSrcStr: PWideChar; - cchSrc: Integer; var lpCharType): BOOL; -function dxGetAnsiCharCType1(Ch: AnsiChar): Word; -function dxGetWideCharCType1(Ch: WideChar): Word; - -// memory functions -procedure cxZeroMemory(ADestination: Pointer; ACount: Integer); -function cxAllocMem(Size: Cardinal): Pointer; -procedure cxFreeMem(P: Pointer); -procedure dxFillChar(var ADest; Count: Integer; const APattern: Char); - -procedure cxCopyData(ASource, ADestination: Pointer; ACount: Integer); overload; -procedure cxCopyData(ASource, ADestination: Pointer; ASourceOffSet, ADestinationOffSet, ACount: Integer); overload; -function ReadBoolean(ASource: Pointer; AOffset: Integer = 0): WordBool; -function ReadByte(ASource: Pointer; AOffset: Integer = 0): Byte; -function ReadInteger(ASource: Pointer; AOffset: Integer = 0): Integer; -function ReadPointer(ASource: Pointer): Pointer; -function ReadWord(ASource: Pointer; AOffset: Integer = 0): Word; -procedure WriteBoolean(ADestination: Pointer; AValue: WordBool; AOffset: Integer = 0); -procedure WriteByte(ADestination: Pointer; AValue: Byte; AOffset: Integer = 0); -procedure WriteInteger(ADestination: Pointer; AValue: Integer; AOffset: Integer = 0); -procedure WritePointer(ADestination: Pointer; AValue: Pointer); -procedure WriteWord(ADestination: Pointer; AValue: Word; AOffset: Integer = 0); - -function ReadBufferFromStream(AStream: TStream; ABuffer: Pointer; Count: Integer): Boolean; -function ReadStringFromStream(AStream: TStream; out AValue: AnsiString): Longint; -function WriteBufferToStream(AStream: TStream; ABuffer: Pointer; ACount: Longint): Longint; -function WriteCharToStream(AStream: TStream; AValue: AnsiChar): Longint; -function WriteDoubleToStream(AStream: TStream; AValue: Double): Longint; -function WriteIntegerToStream(AStream: TStream; AValue: Integer): Longint; -function WriteSmallIntToStream(AStream: TStream; AValue: SmallInt): Longint; -function WriteStringToStream(AStream: TStream; const AValue: AnsiString): Longint; - -procedure ExchangeLongWords(var AValue1, AValue2); -procedure Shift(var P: Pointer; AOffset: Integer); - -function dxElfHash(const S: AnsiString; ALangID: Cardinal = CP_ACP): Integer; overload; -function dxElfHash(const S: WideString; ALangID: Cardinal = CP_ACP): Integer; overload; -function dxElfHash(P: PWideChar; ALength: Integer; ALangID: Cardinal = CP_ACP): Integer; overload; -function dxElfHash(P: PWideChar; ALength: Integer; AUpperCaseBuffer: PWideChar; - AUpperCaseBufferLength: Integer; ALangID: Cardinal = CP_ACP): Integer; overload; - -// platform info -var - IsWin9X: Boolean; - IsWin95, IsWin98, IsWinMe: Boolean; - - IsWinNT: Boolean; - IsWin2K, IsWin2KOrLater: Boolean; - IsWinXP, IsWinXPOrLater: Boolean; - IsWin2KOrXP: Boolean; - - IsWinVista, IsWinVistaOrLater: Boolean; - - IsWOW64: Boolean; - -implementation - -type - TdxStreamHeader = array[0..5] of AnsiChar; - -const - StreamFormatANSI: TdxStreamHeader = 'DXAFMT'; - StreamFormatUNICODE: TdxStreamHeader = 'DXUFMT'; - -var - FdxResourceStringsRepository: TdxResourceStringsRepository; - -function GetStringTypeW(dwInfoType: DWORD; const lpSrcStr: PWideChar; - cchSrc: Integer; var lpCharType): BOOL; stdcall; external kernel32 name 'GetStringTypeW'; - -function GetStringTypeA(ALocale: Cardinal; dwInfoType: DWORD; const lpSrcStr: PAnsiChar; - cchSrc: Integer; var lpCharType): BOOL; stdcall; external kernel32 name 'GetStringTypeA'; - - - -function dxElfHash(const S: AnsiString; ALangID: Cardinal = CP_ACP): Integer; -begin - Result := dxElfHash(dxAnsiStringToWideString(S, ALangID), ALangID); -end; - -function dxElfHash(const S: WideString; ALangID: Cardinal = CP_ACP): Integer; -begin - Result := dxElfHash(PWideChar(S), Length(S), ALangID); -end; - -function dxElfHash(P: PWideChar; ALength: Integer; ALangID: Cardinal = CP_ACP): Integer; -var - ATempBuffer: PWideChar; -begin - ATempBuffer := AllocMem((ALength + 1) * SizeOf(WideChar)); - try - Result := dxElfHash(P, ALength, ATempBuffer, ALength + 1, ALangID); - finally - FreeMem(ATempBuffer); - end; -end; - -function dxElfHash(P: PWideChar; ALength: Integer; AUpperCaseBuffer: PWideChar; - AUpperCaseBufferLength: Integer; ALangID: Cardinal = CP_ACP): Integer; -var - I: Integer; -begin - Result := 0; - LCMapStringW(ALangID, LCMAP_UPPERCASE, P, ALength + 1, AUpperCaseBuffer, AUpperCaseBufferLength); - P := AUpperCaseBuffer; - while P^ <> #$00 do - begin - Result := (Result shl 4) + Ord(P^); - I := Result and $F0000000; - if (I <> 0) then - Result := Result xor (I shr 24); - Result := Result and (not I); - Inc(P); - end; -end; - -function dxBinToHex(const ABuffer: AnsiString): AnsiString; -begin - Result := dxBinToHex(PAnsiChar(ABuffer), Length(ABuffer)); -end; - -function dxBinToHex(const ABuffer: PAnsiChar; ABufSize: Integer): AnsiString; -begin - SetLength(Result, ABufSize * 2); - BinToHex(ABuffer, PAnsiChar(Result), ABufSize); -end; - -function dxHexToBin(const AText: AnsiString): AnsiString; -begin - Result := dxHexToBin(PAnsiChar(AText)); -end; - -function dxHexToBin(const AText: PAnsiChar): AnsiString; -begin - SetLength(Result, Length(AText) div 2); - HexToBin(AText, PAnsiChar(Result), Length(Result)); -end; - -function dxCharInSet(C: Char; const ACharSet: TdxAnsiCharSet): Boolean; -begin - {$IFDEF DELPHI12} - Result := CharInSet(C, ACharSet); - {$ELSE} - Result := C in ACharSet; - {$ENDIF} -end; - -function dxStringSize(const S: string): Integer; -begin - Result := Length(S) * SizeOf(Char); -end; - -function dxAnsiIsAlpha(Ch: AnsiChar): Boolean; -begin - Result := dxGetAnsiCharCType1(Ch) and C1_ALPHA > 0; -end; - -function dxCharIsAlpha(Ch: Char): Boolean; -begin - Result := {$IFDEF DELPHI12}dxWideIsAlpha{$ELSE}dxAnsiIsAlpha{$ENDIF}(Ch); -end; - -function dxWideIsAlpha(Ch: WideChar): Boolean; -begin - Result := dxGetWideCharCType1(Ch) and C1_ALPHA > 0; -end; - -function dxAnsiIsNumeric(Ch: AnsiChar): Boolean; -begin - Result := dxGetAnsiCharCType1(Ch) and C1_DIGIT > 0; -end; - -function dxCharIsNumeric(Ch: Char): Boolean; -begin - Result := {$IFDEF DELPHI12}dxWideIsNumeric{$ELSE}dxAnsiIsNumeric{$ENDIF}(Ch); -end; - -function dxWideIsNumeric(Ch: WideChar): Boolean; -begin - Result := dxGetWideCharCType1(Ch) and C1_DIGIT > 0; -end; - -function dxGetCodePageFromCharset(ACharset: Integer): Integer; -begin - if (ACharset = DEFAULT_CHARSET) or (ACharset = ANSI_CHARSET) then //speedup - begin - Result := 0; - Exit; - end; - case ACharset of - THAI_CHARSET: - Result := 874; - SHIFTJIS_CHARSET: - Result := 932; - GB2312_CHARSET: - Result := 936; - HANGEUL_CHARSET, JOHAB_CHARSET: - Result := 949; - CHINESEBIG5_CHARSET: - Result := 950; - EASTEUROPE_CHARSET: - Result := 1250; - RUSSIAN_CHARSET: - Result := 1251; - GREEK_CHARSET: - Result := 1253; - TURKISH_CHARSET: - Result := 1254; - HEBREW_CHARSET: - Result := 1255; - ARABIC_CHARSET: - Result := 1256; - BALTIC_CHARSET: - Result := 1257; - else - Result := 0; - end; -end; - -function dxAnsiStringToWideString(const ASource: AnsiString; ACodePage: Cardinal = CP_ACP; - ASrcLength: Integer = -1): WideString; -var - ADestLength: Integer; -begin - Result := ''; - if ASource = '' then Exit; - if ACodePage = CP_UTF8 then //CP_UTF8 not supported on Windows 95 - {$IFDEF DELPHI12} - Result := UTF8ToString(ASource) - {$ELSE} - Result := UTF8Decode(ASource) - {$ENDIF} - else - begin - if ASrcLength < 0 then - ASrcLength := Length(ASource); - ADestLength := MultiByteToWideChar(ACodePage, 0, PAnsiChar(ASource), ASrcLength, nil, 0); - SetLength(Result, ADestLength); - MultiByteToWideChar(ACodePage, MB_PRECOMPOSED, PAnsiChar(ASource), ASrcLength, PWideChar(Result), ADestLength); - end; -end; - -function dxWideStringToAnsiString(const ASource: WideString; ACodePage: Cardinal = CP_ACP; - ASrcLength: Integer = -1): AnsiString; -var - ADestLength: Integer; -begin - Result := ''; - if ASource = '' then Exit; - if ACodePage = CP_UTF8 then //CP_UTF8 not supported on Windows 95 - Result := UTF8Encode(ASource) - else - begin - if ASrcLength < 0 then - ASrcLength := Length(ASource); - ADestLength := WideCharToMultiByte(ACodePage, 0, PWideChar(ASource), ASrcLength, nil, 0, nil, nil); - SetLength(Result, ADestLength); - WideCharToMultiByte(ACodePage, 0, PWideChar(ASource), ASrcLength, PAnsiChar(Result), ADestLength, nil, nil); - end; -end; - -function dxStringToWideString(const S: string; ACodePage: Integer = CP_ACP): WideString; -begin - Result := {$IFDEF DELPHI12} S {$ELSE} dxAnsiStringToWideString(S, ACodePage) {$ENDIF}; -end; - -function dxWideStringToString(const S: WideString; ACodePage: Integer = CP_ACP): string; -begin - Result := {$IFDEF DELPHI12} S {$ELSE} dxWideStringToAnsiString(S, ACodePage) {$ENDIF}; -end; - -function dxConcatenateStrings(const AStrings: array of PChar): string; -var - I: Integer; -begin - for I := 0 to High(AStrings) - 1 do - Result := Result + AStrings[I]; -end; - -procedure dxStringToBytes(const S: string; var Buf); -begin - if Length(S) > 0 then - Move(S[1], Buf, dxStringSize(S)); -end; - -function dxUTF8StringToAnsiString(const S: UTF8String): AnsiString; -begin - Result := {$IFDEF DELPHI12}dxWideStringToAnsiString{$ENDIF}(Utf8ToAnsi(S)); -end; - -function dxUTF8StringToWideString(const S: UTF8String): WideString; -begin - Result := {$IFDEF DELPHI12}UTF8ToWideString{$ELSE}UTF8Decode{$ENDIF}(S); -end; - -function dxAnsiStringToUTF8String(const S: AnsiString): UTF8String; -begin - Result := UTF8Encode({$IFDEF DELPHI12}dxAnsiStringToWideString{$ENDIF}(S)); -end; - -function dxWideStringToUTF8String(const S: WideString): UTF8String; -begin - Result := UTF8Encode(S); -end; - -function dxColorToRGBQuad(AColor: TColor; AReserved: Byte = 0): TRGBQuad; -type - TRGBA = packed record - R: Byte; - G: Byte; - B: Byte; - A: Byte; - end; -var - ATemp: TRGBA; -begin - DWORD(ATemp) := ColorToRGB(AColor); - Result.rgbBlue := ATemp.B; - Result.rgbRed := ATemp.R; - Result.rgbGreen := ATemp.G; - Result.rgbReserved := AReserved; -end; - -function dxAnsiStringToString(const S: AnsiString; ACodePage: Integer = CP_ACP): string; -begin - Result := {$IFDEF DELPHI12} dxAnsiStringToWideString(S, ACodePage) {$ELSE} S {$ENDIF}; -end; - -function dxStringToAnsiString(const S: string; ACodePage: Integer = CP_ACP): AnsiString; -begin - Result := {$IFDEF DELPHI12} dxWideStringToAnsiString(S, ACodePage) {$ELSE} S {$ENDIF}; -end; - -function dxVariantToString(const V: Variant): string; -begin - Result := {$IFDEF DELPHI12}dxVariantToWideString{$ELSE}dxVariantToAnsiString{$ENDIF}(V); -end; - -function dxVariantToAnsiString(const V: Variant): AnsiString; -var - ASize: Integer; -begin - if VarIsArray(V) and (VarArrayDimCount(V) = 1) then - begin - ASize := VarArrayHighBound(V, 1) - VarArrayLowBound(V, 1) + 1; - SetLength(Result, ASize); - Move(VarArrayLock(V)^, Result[1], ASize); - VarArrayUnlock(V); - end - else - if VarType(V) = varString then - Result := AnsiString(TVarData(V).VString) - else - Result := dxStringToAnsiString(VarToStr(V)) -end; - -function dxVariantToWideString(const V: Variant): WideString; -begin - if VarIsStr(V) then - Result := VarToStr(V) - else - Result := dxAnsiStringToString(dxVariantToAnsiString(V)); -end; - -function dxVarIsBlob(const V: Variant): Boolean; -begin - Result := VarIsStr(V) or (VarIsArray(V) and (VarArrayDimCount(V) = 1)); -end; - -function dxShortStringToString(const S: ShortString): string; -begin - Result := {$IFDEF DELPHI12}UTF8ToString{$ENDIF}(S); -end; - -function dxStringToShortString(const S: string): ShortString; -begin - Result := {$IFDEF DELPHI12}UTF8EncodeToShortString{$ENDIF}(S); -end; - -function dxIsUnicodeStream(AStream: TStream): Boolean; -var - B: TdxStreamHeader; -begin - Result := False; - if (AStream.Size - AStream.Position) > SizeOf(TdxStreamHeader) then - begin - AStream.ReadBuffer(B, SizeOf(TdxStreamHeader)); - Result := B = StreamFormatUNICODE; - if not Result and (B <> StreamFormatANSI) then - AStream.Position := AStream.Position - SizeOf(TdxStreamHeader); - end; -end; - -procedure dxWriteStandardEncodingSignature(AStream: TStream); -begin -{$IFDEF DELPHI12} - AStream.WriteBuffer(dxUnicodePrefix, SizeOf(dxUnicodePrefix)); -{$ENDIF} -end; - -procedure dxWriteStreamType(AStream: TStream); -begin -{$IFNDEF STREAMANSIFORMAT} - {$IFDEF DELPHI12} - AStream.WriteBuffer(StreamFormatUNICODE, SizeOf(TdxStreamHeader)); - {$ELSE} - AStream.WriteBuffer(StreamFormatANSI, SizeOf(TdxStreamHeader)); - {$ENDIF} -{$ENDIF} -end; - -function dxReadStr(Stream: TStream; AIsUnicode: Boolean): string; -var - L: Word; - SA: AnsiString; - SW: WideString; -begin - Stream.ReadBuffer(L, SizeOf(Word)); - if AIsUnicode then - begin - SetLength(SW, L); - if L > 0 then Stream.ReadBuffer(SW[1], L * 2); - Result := SW; - end - else - begin - SetLength(SA, L); - if L > 0 then Stream.ReadBuffer(SA[1], L); - {$IFDEF DELPHI12} - Result := UTF8ToWideString(SA); - {$ELSE} - Result := SA; - {$ENDIF} - end; -end; - -procedure dxWriteStr(Stream: TStream; const S: string); -var - L: Integer; -{$IFDEF STREAMANSIFORMAT} - SA: AnsiString; -{$ENDIF} -begin - L := Length(S); - if L > $FFFF then L := $FFFF; - Stream.WriteBuffer(L, SizeOf(Word)); - if L > 0 then - begin - {$IFDEF STREAMANSIFORMAT} - {$IFDEF DELPHI12} - SA := UTF8Encode(S); - {$ELSE} - SA := S; - {$ENDIF} - Stream.WriteBuffer(SA[1], L); - {$ELSE} - Stream.WriteBuffer(S[1], L * SizeOf(Char)); - {$ENDIF} - end; -end; - -function dxResourceStringsRepository: TdxResourceStringsRepository; -begin - if FdxResourceStringsRepository = nil then - FdxResourceStringsRepository := TdxResourceStringsRepository.Create; - Result := FdxResourceStringsRepository; -end; - -function dxGetStringTypeA(Locale: LCID; dwInfoType: DWORD; const lpSrcStr: PAnsiChar; - cchSrc: Integer; var lpCharType): BOOL; -begin - Result := GetStringTypeA(Locale, dwInfoType, lpSrcStr, cchSrc, lpCharType); -end; - -function dxGetStringTypeW(dwInfoType: DWORD; const lpSrcStr: PWideChar; - cchSrc: Integer; var lpCharType): BOOL; -begin - Result := GetStringTypeW(dwInfoType, lpSrcStr, cchSrc, lpCharType); -end; - -function dxGetAnsiCharCType1(Ch: AnsiChar): Word; -begin - if not dxGetStringTypeA(GetThreadLocale, CT_CTYPE1, @Ch, 1, Result) then - Result := 0; -end; - -function dxGetWideCharCType1(Ch: WideChar): Word; -begin - if not dxGetStringTypeW(CT_CTYPE1, @Ch, 1, Result) then - Result := 0; -end; - -procedure cxZeroMemory(ADestination: Pointer; ACount: Integer); -begin - ZeroMemory(ADestination, ACount); -end; - -function cxAllocMem(Size: Cardinal): Pointer; -begin - GetMem(Result, Size); - cxZeroMemory(Result, Size); -end; - -procedure cxFreeMem(P: Pointer); -begin - FreeMem(P); -end; - -procedure dxFillChar(var ADest; Count: Integer; const APattern: Char); -{$IFDEF DELPHI12} -var - I: Integer; -begin - for I := 0 to Count - 1 do - PWordArray(@ADest)^[I] := Word(APattern); -{$ELSE} -begin - FillChar(ADest, Count, APattern); -{$ENDIF} -end; - -procedure cxCopyData(ASource, ADestination: Pointer; ACount: Integer); -begin - Move(ASource^, ADestination^, ACount); -end; - -procedure cxCopyData(ASource, ADestination: Pointer; ASourceOffSet, ADestinationOffSet, ACount: Integer); -begin - if ASourceOffSet > 0 then - Shift(ASource, ASourceOffSet); - if ADestinationOffSet > 0 then - Shift(ADestination, ADestinationOffSet); - cxCopyData(ASource, ADestination, ACount); -end; - -function ReadBoolean(ASource: Pointer; AOffset: Integer = 0): WordBool; -begin - cxCopyData(ASource, @Result, AOffset, 0, SizeOf(WordBool)); -end; - -function ReadByte(ASource: Pointer; AOffset: Integer = 0): Byte; -begin - cxCopyData(ASource, @Result, AOffset, 0, SizeOf(Byte)); -end; - -function ReadInteger(ASource: Pointer; AOffset: Integer = 0): Integer; -begin - cxCopyData(ASource, @Result, AOffset, 0, SizeOf(Integer)); -end; - -function ReadPointer(ASource: Pointer): Pointer; -begin - Result := Pointer(ASource^); -end; - -function ReadWord(ASource: Pointer; AOffset: Integer = 0): Word; -begin - cxCopyData(ASource, @Result, AOffset, 0, SizeOf(Word)); -end; - -procedure WriteBoolean(ADestination: Pointer; AValue: WordBool; AOffset: Integer = 0); -begin - cxCopyData(@AValue, ADestination, 0, AOffset, SizeOf(WordBool)); -end; - -procedure WriteByte(ADestination: Pointer; AValue: Byte; AOffset: Integer = 0); -begin - cxCopyData(@AValue, ADestination, 0, AOffset, SizeOf(Byte)); -end; - -procedure WriteInteger(ADestination: Pointer; AValue: Integer; AOffset: Integer = 0); -begin - cxCopyData(@AValue, ADestination, 0, AOffset, SizeOf(Integer)); -end; - -procedure WritePointer(ADestination: Pointer; AValue: Pointer); -begin - Pointer(ADestination^) := AValue; -end; - -procedure WriteWord(ADestination: Pointer; AValue: Word; AOffset: Integer = 0); -begin - cxCopyData(@AValue, ADestination, 0, AOffset, SizeOf(Word)); -end; - -function ReadBufferFromStream(AStream: TStream; ABuffer: Pointer; Count: Integer): Boolean; -begin - Result := AStream.Read(ABuffer^, Count) = Count; -end; - -function ReadStringFromStream(AStream: TStream; out AValue: AnsiString): Longint; -begin - SetLength(AValue, AStream.Size); - Result := AStream.Read(AValue[1], AStream.Size); -end; - -function WriteBufferToStream(AStream: TStream; ABuffer: Pointer; ACount: Longint): Longint; -var - AData: TBytes; -begin - SetLength(AData, ACount); - if ABuffer <> nil then - cxCopyData(ABuffer, AData, ACount); - - Result := AStream.Write(AData[0], ACount); -end; - -function WriteCharToStream(AStream: TStream; AValue: AnsiChar): Longint; -begin - Result := AStream.Write(AValue, 1); -end; - -function WriteDoubleToStream(AStream: TStream; AValue: Double): Longint; -begin - Result := AStream.Write(AValue, SizeOf(Double)); -end; - -function WriteIntegerToStream(AStream: TStream; AValue: Integer): Longint; -begin - Result := AStream.Write(AValue, SizeOf(Integer)); -end; - -function WriteSmallIntToStream(AStream: TStream; AValue: SmallInt): Longint; -begin - Result := AStream.Write(AValue, SizeOf(SmallInt)); -end; - -function WriteStringToStream(AStream: TStream; const AValue: AnsiString): Longint; -begin - Result := AStream.Write(PAnsiChar(AValue)^, Length(AValue)); -end; - -procedure ExchangeLongWords(var AValue1, AValue2); -var - ATempValue: LongWord; -begin - ATempValue := LongWord(AValue1); - LongWord(AValue1) := LongWord(AValue2); - LongWord(AValue2) := ATempValue; -end; - -procedure Shift(var P: Pointer; AOffset: Integer); -begin - P := Pointer(Integer(P) + AOffset); -end; - -{ TdxStream } - -constructor TdxStream.Create(AStream: TStream); -begin - FIsUnicode := dxIsUnicodeStream(AStream); - FStream := AStream; -end; - -{$IFDEF DELPHI7} - -function TdxStream.GetSize: Int64; -begin - Result := FStream.Size; -end; - -{$ENDIF} - -function TdxStream.Read(var Buffer; Count: Longint): Longint; -begin - Result := FStream.Read(Buffer, Count); -end; - -function TdxStream.Seek(Offset: Longint; Origin: Word): Longint; -begin - Result := FStream.Seek(Offset, Origin); -end; - -function TdxStream.Write(const Buffer; Count: Longint): Longint; -begin - Result := FStream.Write(Buffer, Count); -end; - - { TdxProductResourceStrings } - -constructor TdxProductResourceStrings.Create(const AName: string; AInitializeProc: TdxAddResourceStringsProcedure); -begin - FName := AName; - FResStringNames := TStringList.Create; - TStringList(FResStringNames).Sorted := True; - FInitializeProc := AInitializeProc; - InitializeResStringNames; -end; - -destructor TdxProductResourceStrings.Destroy; -begin - FInitializeProc := nil; - FResStringNames.Free; -end; - -procedure TdxProductResourceStrings.Add(const AResStringName: string; AResStringAddr: Pointer); -begin - FResStringNames.AddObject(AResStringName, AResStringAddr); -end; - -procedure TdxProductResourceStrings.Clear; -begin - FResStringNames.Clear; -end; - -function TdxProductResourceStrings.GetIndexByName(const AName: string): Integer; -begin - if not TStringList(FResStringNames).Find(AName, Result) then - Result := -1; -end; - -procedure TdxProductResourceStrings.Translate; -var - I: Integer; -begin - for I := 0 to ResStringsCount - 1 do - SetTranslation(I); -end; - -function TdxProductResourceStrings.GetNames(AIndex: Integer): string; -begin - Result := FResStringNames[AIndex]; -end; - -function TdxProductResourceStrings.GetResStringsCount: Integer; -begin - Result := FResStringNames.Count; -end; - -procedure TdxProductResourceStrings.SetTranslation(AIndex: Integer); -begin - dxResourceStringsRepository.OnTranslateResString(Names[AIndex], FResStringNames.Objects[AIndex]); -end; - -function TdxProductResourceStrings.GetValues(AIndex: Integer): string; -begin - Result := LoadResString(PResStringRec(FResStringNames.Objects[AIndex])); -end; - -procedure TdxProductResourceStrings.InitializeResStringNames; -begin - if Assigned(FInitializeProc) then - FInitializeProc(Self); -end; - - { TdxResourceStringsRepository } - -constructor TdxResourceStringsRepository.Create; -begin - FProducts := TObjectList.Create; - FListeners := TList.Create; -end; - -destructor TdxResourceStringsRepository.Destroy; -begin - FListeners.Free; - FProducts.Free; -end; - -procedure TdxResourceStringsRepository.AddListener(AListener: IdxLocalizerListener); -begin - if FListeners.IndexOf(Pointer(AListener)) = -1 then - FListeners.Add(Pointer(AListener)); -end; - -procedure TdxResourceStringsRepository.RemoveListener(AListener: IdxLocalizerListener); -begin - FListeners.Remove(Pointer(AListener)); -end; - -procedure TdxResourceStringsRepository.NotifyListeners; -var - I: Integer; -begin - for I := 0 to FListeners.Count - 1 do - IdxLocalizerListener(FListeners[I]).TranslationChanged; -end; - -procedure TdxResourceStringsRepository.RegisterProduct(const AProductName: string; AAddStringsProc: TdxAddResourceStringsProcedure); -begin - FProducts.Add(TdxProductResourceStrings.Create(AProductName, AAddStringsProc)); -end; - -function TdxResourceStringsRepository.GetProductIndexByName(AName: string): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to ProductsCount - 1 do - if Products[I].Name = AName then - begin - Result := I; - Break; - end; -end; - -function TdxResourceStringsRepository.GetOriginalValue(const AName: string): string; -var - I, AIndex: Integer; -begin - Result := ''; - for I := 0 to ProductsCount - 1 do - begin - AIndex := Products[I].GetIndexByName(AName); - if AIndex <> -1 then - begin - Result := Products[I].Values[AIndex]; - Break; - end; - end; -end; - -procedure TdxResourceStringsRepository.Translate; -var - I: Integer; -begin - if Assigned(FOnTranslateResString) then - begin - for I := 0 to ProductsCount - 1 do - Products[I].Translate; - end; -end; - -procedure TdxResourceStringsRepository.UnRegisterProduct(const AProductName: string); -var - AIndex: Integer; -begin - AIndex := GetProductIndexByName(AProductName); - if AIndex <> -1 then - FProducts.Delete(AIndex); -end; - -function TdxResourceStringsRepository.GetProducts(AIndex: Integer): TdxProductResourceStrings; -begin - Result := TdxProductResourceStrings(FProducts[AIndex]); -end; - -function TdxResourceStringsRepository.GetProductsCount: Integer; -begin - Result := FProducts.Count; -end; - -type - TIsWow64Process = function (AHandle: THandle; AWow64Process: PBOOL): BOOL; stdcall; - -procedure InitPlatformInfo; -var - AIsWow64Process: TIsWow64Process; - AIsWow64: BOOL; -begin - IsWin9X := Win32Platform = VER_PLATFORM_WIN32_WINDOWS; - - IsWin95 := IsWin9X and (Win32MinorVersion = 0); - IsWin98 := IsWin9X and (Win32MinorVersion = 10); - IsWinMe := IsWin9X and (Win32MinorVersion = 90); - - IsWinNT := Win32Platform = VER_PLATFORM_WIN32_NT; - - IsWin2K := IsWinNT and (Win32MajorVersion = 5) and (Win32MinorVersion = 0); - IsWin2KOrLater := IsWinNT and (Win32MajorVersion >= 5); - IsWinXP := IsWinNT and (Win32MajorVersion = 5) and (Win32MinorVersion > 0); - IsWinXPOrLater := IsWinNT and (Win32MajorVersion >= 5) and not IsWin2K; - IsWin2KOrXP := IsWin2K or IsWinXP; - - IsWinVista := IsWinNT and (Win32MajorVersion = 6); - IsWinVistaOrLater := IsWinNT and (Win32MajorVersion >= 6); - - // IsWow64Process - AIsWow64Process := GetProcAddress(GetModuleHandle('kernel32.dll'), 'IsWow64Process'); - if Assigned(AIsWow64Process) and AIsWow64Process(GetCurrentProcess, @AIsWow64) then - IsWow64 := AIsWow64 - else - IsWow64 := False; -end; - -initialization - InitPlatformInfo; - -finalization - FreeAndNil(FdxResourceStringsRepository); - -end. diff --git a/internal/x.46/ExpressCore Library/Sources/dxCoreReg.pas b/internal/x.46/ExpressCore Library/Sources/dxCoreReg.pas deleted file mode 100644 index ae13ca79..00000000 --- a/internal/x.46/ExpressCore Library/Sources/dxCoreReg.pas +++ /dev/null @@ -1,213 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCoreLibrary } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCORELIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxCoreReg; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils, Menus, TypInfo, - DesignIntf, DesignEditors, DesignConst, DesignMenus, dxCore; - -const - dxCompanyName = 'Developer Express Inc.'; - dxCompanyURL = 'www.devexpress.com'; - -type - TDesignMenuItem = {$IFDEF DELPHI6}DesignMenus.IMenuItem{$ELSE}TMenuItem{$ENDIF}; - - { TdxComponentEditor } - - TdxComponentEditor = class(TComponentEditor) - private - function GetBaseVerbCount: Integer; - - procedure AssignClick(Sender: TObject); - procedure CheckObjectsForAssign(const AObjectName: string); - procedure UpdateAssignableList; - protected - FAssignableObjects: TStringList; - - function IsAssignable: Boolean; virtual; - function IsObjectAssignable(AObject: TObject): Boolean; virtual; - procedure DoAssign(AObject: TObject); virtual; abstract; - function GetAssignItemCaption: string; virtual; - function GetAssignTypeClass: TClass; virtual; abstract; - - function GetProductMajorVersion: string; virtual; abstract; - function GetProductMinorVersion: string; virtual; - function GetProductName: string; virtual; abstract; - function InternalGetVerb(AIndex: Integer): string; virtual; - function InternalGetVerbCount: Integer; virtual; - procedure InternalExecuteVerb(AIndex: Integer); virtual; - public - constructor Create(AComponent: TComponent; ADesigner: IDesigner); override; - destructor Destroy; override; - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - procedure ExecuteVerb(Index: Integer); override; - - procedure PrepareItem(Index: Integer; const AItem: TDesignMenuItem); override; - end; - -implementation - -{ TdxComponentEditor } - -constructor TdxComponentEditor.Create(AComponent: TComponent; ADesigner: IDesigner); -begin - inherited; - - FAssignableObjects := TStringList.Create; - FAssignableObjects.Sorted := True; -end; - -destructor TdxComponentEditor.Destroy; -begin - FreeAndNil(FAssignableObjects); - inherited; -end; - -function TdxComponentEditor.GetVerb(Index: Integer): string; -begin - if Index < InternalGetVerbCount then - Result := InternalGetVerb(Index) - else - begin - Index := Index - InternalGetVerbCount; - if FAssignableObjects.Count = 0 then - Inc(Index); - case Index of - 0: Result := GetAssignItemCaption; - 1: Result := '-'; - 2: Result := GetProductName + ' ' + Format('%s.%s', [GetProductMajorVersion, GetProductMinorVersion]); - 3: Result := dxCompanyName; - 4: Result := dxCompanyURL; - end; - end; -end; - -function TdxComponentEditor.GetVerbCount: Integer; -begin - if IsAssignable then - UpdateAssignableList; - - Result := GetBaseVerbCount + InternalGetVerbCount; -end; - -procedure TdxComponentEditor.ExecuteVerb(Index: Integer); -begin - if Index < InternalGetVerbCount then - InternalExecuteVerb(Index); -end; - -procedure TdxComponentEditor.PrepareItem(Index: Integer; const AItem: TDesignMenuItem); -var - I: Integer; -begin - inherited; - if (FAssignableObjects.Count > 0) and (Index = InternalGetVerbCount) then - begin - for I := 0 to FAssignableObjects.Count - 1 do - AItem.AddItem(FAssignableObjects[I], 0, False, True, AssignClick); - end; -end; - -function TdxComponentEditor.InternalGetVerb(AIndex: Integer): string; -begin - Result := ''; -end; - -function TdxComponentEditor.IsAssignable: Boolean; -begin - Result := False; -end; - -function TdxComponentEditor.IsObjectAssignable(AObject: TObject): Boolean; -begin - Result := AObject <> Component; -end; - -function TdxComponentEditor.GetAssignItemCaption: string; -begin - Result := 'Assign From'; -end; - -function TdxComponentEditor.GetProductMinorVersion: string; -begin - Result := IntToStr(dxBuildNumber); -end; - -function TdxComponentEditor.InternalGetVerbCount: Integer; -begin - Result := 0; -end; - -procedure TdxComponentEditor.InternalExecuteVerb(AIndex: Integer); -begin -// do nothing -end; - -function TdxComponentEditor.GetBaseVerbCount: Integer; -begin - Result := 4; - if FAssignableObjects.Count > 0 then - Inc(Result); -end; - -procedure TdxComponentEditor.AssignClick(Sender: TObject); -begin - DoAssign(FAssignableObjects.Objects[((Sender as TMenuItem).MenuIndex)]); -end; - -procedure TdxComponentEditor.CheckObjectsForAssign(const AObjectName: string); -var - AObject: TObject; -begin - AObject := Designer.GetComponent(AObjectName); - if IsObjectAssignable(AObject) then - FAssignableObjects.AddObject(AObjectName, AObject); -end; - -procedure TdxComponentEditor.UpdateAssignableList; -begin - FAssignableObjects.Clear; - Designer.GetComponentNames(GetTypeData(GetAssignTypeClass.ClassInfo), CheckObjectsForAssign); -end; - -end. - diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC10.bpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC10.bpk deleted file mode 100644 index 5251a62c..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC10.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = cxADOAdaptersC10.bpl -OBJFILES = cxADOAdaptersC10.obj cxADOAdapters.obj -RESFILES = cxADOAdaptersC10.res -MAINSOURCE = cxADOAdaptersC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi adortl.bpi cxDataC10.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib dbrtl.lib adortl.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ADO Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC10.cpp b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC10.cpp deleted file mode 100644 index 37c5ddcb..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC10.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxADOAdaptersC10.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("adortl.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEUNIT("cxADOAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC10.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC10.res deleted file mode 100644 index b2d11d70..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC10.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC11.bpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC11.bpk deleted file mode 100644 index a8f3bc22..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC11.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = cxADOAdaptersC11.bpl -OBJFILES = cxADOAdaptersC11.obj cxADOAdapters.obj -RESFILES = cxADOAdaptersC11.res -MAINSOURCE = cxADOAdaptersC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi adortl.bpi cxDataC11.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib dbrtl.lib adortl.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ADO Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC11.cpp b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC11.cpp deleted file mode 100644 index c95e90ee..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxADOAdaptersC11.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("adortl.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEUNIT("cxADOAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC11.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC11.res deleted file mode 100644 index c385c965..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC11.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC12.bpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC12.bpk deleted file mode 100644 index c81d75a4..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC12.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = cxADOAdaptersC12.bpl -OBJFILES = cxADOAdaptersC12.obj cxADOAdapters.obj -RESFILES = cxADOAdaptersC12.res -MAINSOURCE = cxADOAdaptersC12.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi adortl.bpi cxDataC12.bpi dxCoreC12.bpi -SPARELIBS = rtl.lib dbrtl.lib adortl.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ADO Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC12.cpp b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC12.cpp deleted file mode 100644 index cd717c1c..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC12.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxADOAdaptersC12.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("adortl.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEUNIT("cxADOAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC12.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC12.res deleted file mode 100644 index 19e1480e..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC12.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC14.bpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC14.bpk deleted file mode 100644 index 0f22b17b..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC14.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = cxADOAdaptersC14.bpl -OBJFILES = cxADOAdaptersC14.obj cxADOAdapters.obj -RESFILES = cxADOAdaptersC14.res -MAINSOURCE = cxADOAdaptersC14.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi adortl.bpi cxDataC14.bpi dxCoreC14.bpi -SPARELIBS = rtl.lib dbrtl.lib adortl.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ADO Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC14.cpp b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC14.cpp deleted file mode 100644 index 5996da61..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC14.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxADOAdaptersC14.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("adortl.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEUNIT("cxADOAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC14.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC14.res deleted file mode 100644 index b60c4a5b..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC14.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC5.bpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC5.bpk deleted file mode 100644 index ad038589..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC5.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = cxADOAdaptersC5.bpl -OBJFILES = cxADOAdaptersC5.obj cxADOAdapters.obj -RESFILES = cxADOAdaptersC5.res -MAINSOURCE = cxADOAdaptersC5.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = vcl50.bpi vcldb50.bpi vclado50.bpi cxDataC5.bpi -SPARELIBS = vcl50.lib vcldb50.lib vclado50.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ADO Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC5.cpp b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC5.cpp deleted file mode 100644 index d0e038e7..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC5.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxADOAdaptersC5.res"); -USEPACKAGE("Vcldb50.bpi"); -USEPACKAGE("Vclado50.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEUNIT("cxADOAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC5.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC5.res deleted file mode 100644 index a97a118c..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC5.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC6.bpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC6.bpk deleted file mode 100644 index 98beec44..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC6.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = cxADOAdaptersC6.bpl -OBJFILES = cxADOAdaptersC6.obj cxADOAdapters.obj -RESFILES = cxADOAdaptersC6.res -MAINSOURCE = cxADOAdaptersC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi dxCoreC6.bpi adortl.bpi cxDataC6.bpi -SPARELIBS = rtl.lib dbrtl.lib adortl.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ADO Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC6.cpp b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC6.cpp deleted file mode 100644 index 3b47946a..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC6.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxADOAdaptersC6.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("adortl.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEUNIT("cxADOAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC6.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC6.res deleted file mode 100644 index 1d192e70..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersC6.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD10.dpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD10.dpk deleted file mode 100644 index d5730fab..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD10.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxADOAdaptersD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ADO Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - adortl, - cxDataD10; - -contains - cxADOAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD10.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD10.res deleted file mode 100644 index 595a742c..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD10.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD11.dpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD11.dpk deleted file mode 100644 index 2720ff09..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD11.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxADOAdaptersD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ADO Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - adortl, - cxDataD11; - -contains - cxADOAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD11.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD11.res deleted file mode 100644 index 092ccfc4..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD11.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD12.dpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD12.dpk deleted file mode 100644 index 51ec0779..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD12.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxADOAdaptersD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ADO Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - adortl, - cxDataD12; - -contains - cxADOAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD12.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD12.res deleted file mode 100644 index fe676b7f..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD12.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD14.dpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD14.dpk deleted file mode 100644 index f01cb5ef..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD14.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxADOAdaptersD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ADO Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - adortl, - cxDataD14; - -contains - cxADOAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD14.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD14.res deleted file mode 100644 index a05c7600..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD14.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD5.dpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD5.dpk deleted file mode 100644 index 676ad1e3..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD5.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxADOAdaptersD5; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ADO Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl50, - vcldb50, - vclado50, - cxDataD5; - -contains - cxADOAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD5.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD5.res deleted file mode 100644 index b203b0b5..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD5.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD6.dpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD6.dpk deleted file mode 100644 index a60af386..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxADOAdaptersD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ADO Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - adortl, - cxDataD6; - -contains - cxADOAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD6.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD6.res deleted file mode 100644 index 6ecd3a44..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD6.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD7.dpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD7.dpk deleted file mode 100644 index bd683aec..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxADOAdaptersD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ADO Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - adortl, - cxDataD7; - -contains - cxADOAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD7.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD7.res deleted file mode 100644 index 7a865b40..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD7.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD9.dpk b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD9.dpk deleted file mode 100644 index db2dfc3d..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD9.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxADOAdaptersD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ADO Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - adortl, - cxDataD9; - -contains - cxADOAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD9.res b/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD9.res deleted file mode 100644 index 88e38ff9..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxADOAdaptersD9.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC10.bpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC10.bpk deleted file mode 100644 index 4bf50c9c..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC10.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = cxBDEAdaptersC10.bpl -OBJFILES = cxBDEAdaptersC10.obj cxBDEAdapters.obj -RESFILES = cxBDEAdaptersC10.res -MAINSOURCE = cxBDEAdaptersC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi bdertl.bpi cxDataC10.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib dbrtl.lib bdertl.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"BDE Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC10.cpp b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC10.cpp deleted file mode 100644 index 4f7c6abd..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC10.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxBDEAdaptersC10.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("BDErtl.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEUNIT("cxBDEAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC10.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC10.res deleted file mode 100644 index 654b8ecf..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC10.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC11.bpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC11.bpk deleted file mode 100644 index dd351d83..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC11.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = cxBDEAdaptersC11.bpl -OBJFILES = cxBDEAdaptersC11.obj cxBDEAdapters.obj -RESFILES = cxBDEAdaptersC11.res -MAINSOURCE = cxBDEAdaptersC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi bdertl.bpi cxDataC11.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib dbrtl.lib bdertl.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"BDE Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC11.cpp b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC11.cpp deleted file mode 100644 index de6e9d06..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxBDEAdaptersC11.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("BDErtl.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEUNIT("cxBDEAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC11.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC11.res deleted file mode 100644 index 491497bc..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC11.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC12.bpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC12.bpk deleted file mode 100644 index 5b17f506..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC12.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = cxBDEAdaptersC12.bpl -OBJFILES = cxBDEAdaptersC12.obj cxBDEAdapters.obj -RESFILES = cxBDEAdaptersC12.res -MAINSOURCE = cxBDEAdaptersC12.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi bdertl.bpi cxDataC12.bpi dxCoreC12.bpi -SPARELIBS = rtl.lib dbrtl.lib bdertl.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"BDE Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC12.cpp b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC12.cpp deleted file mode 100644 index 5ec371bc..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC12.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxBDEAdaptersC12.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("BDErtl.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEUNIT("cxBDEAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC12.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC12.res deleted file mode 100644 index e0ec806d..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC12.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC14.bpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC14.bpk deleted file mode 100644 index 15c1592b..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC14.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = cxBDEAdaptersC14.bpl -OBJFILES = cxBDEAdaptersC14.obj cxBDEAdapters.obj -RESFILES = cxBDEAdaptersC14.res -MAINSOURCE = cxBDEAdaptersC14.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi bdertl.bpi cxDataC14.bpi dxCoreC14.bpi -SPARELIBS = rtl.lib dbrtl.lib bdertl.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"BDE Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC14.cpp b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC14.cpp deleted file mode 100644 index 56bc1c14..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC14.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxBDEAdaptersC14.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("BDErtl.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEUNIT("cxBDEAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC14.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC14.res deleted file mode 100644 index 71323ec2..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC14.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC5.bpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC5.bpk deleted file mode 100644 index 24377991..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC5.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = cxBDEAdaptersC5.bpl -OBJFILES = cxBDEAdaptersC5.obj cxBDEAdapters.obj -RESFILES = cxBDEAdaptersC5.res -MAINSOURCE = cxBDEAdaptersC5.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = vcl50.bpi vcldb50.bpi vclbde50.bpi cxDataC5.bpi -SPARELIBS = vcl50.lib vcldb50.lib vclbde50.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"BDE Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC5.cpp b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC5.cpp deleted file mode 100644 index 994a0657..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC5.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxBDEAdaptersC5.res"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("Vcldb50.bpi"); -USEPACKAGE("VCLBDE50.bpi"); -USEPACKAGE("vclib50"); -USEPACKAGE("cxDataC5.bpi"); -USEUNIT("cxBDEAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC5.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC5.res deleted file mode 100644 index 9ac8f60b..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC5.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC6.bpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC6.bpk deleted file mode 100644 index f4837d30..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC6.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = cxBDEAdaptersC6.bpl -OBJFILES = cxBDEAdaptersC6.obj cxBDEAdapters.obj -RESFILES = cxBDEAdaptersC6.res -MAINSOURCE = cxBDEAdaptersC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi bdertl.bpi cxDataC6.bpi dxCoreC6.bpi -SPARELIBS = rtl.lib dbrtl.lib bdertl.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"BDE Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC6.cpp b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC6.cpp deleted file mode 100644 index bd24109c..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC6.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxBDEAdaptersC6.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("BDErtl.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEUNIT("cxBDEAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC6.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC6.res deleted file mode 100644 index 0f0136f8..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersC6.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10.dpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10.dpk deleted file mode 100644 index 4753ffcc..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxBDEAdaptersD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'BDE Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - bdertl, - cxDataD10; - -contains - cxBDEAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10.res deleted file mode 100644 index a191a372..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10NET.dpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10NET.dpk deleted file mode 100644 index 740ccca8..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10NET.dpk +++ /dev/null @@ -1,95 +0,0 @@ -package cxBDEAdaptersD10NET; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'BDE Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - cxDataD10NET, - Borland.VclBdeRtl, - System.Drawing; - -contains - cxBDEAdapters; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10NET.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10NET.res deleted file mode 100644 index 3f6f456a..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD10NET.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD11.dpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD11.dpk deleted file mode 100644 index ad409b7e..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD11.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxBDEAdaptersD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'BDE Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - bdertl, - cxDataD11; - -contains - cxBDEAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD11.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD11.res deleted file mode 100644 index 098a7ecf..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD11.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD12.dpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD12.dpk deleted file mode 100644 index 97f73c64..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD12.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxBDEAdaptersD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'BDE Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - bdertl, - cxDataD12; - -contains - cxBDEAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD12.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD12.res deleted file mode 100644 index 7498ac1a..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD12.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD14.dpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD14.dpk deleted file mode 100644 index ba737441..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD14.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxBDEAdaptersD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'BDE Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - bdertl, - cxDataD14; - -contains - cxBDEAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD14.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD14.res deleted file mode 100644 index 5473ba76..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD14.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD5.dpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD5.dpk deleted file mode 100644 index 6016f0e8..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD5.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxBDEAdaptersD5; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'BDE Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl50, - vcldb50, - Vclbde50, - cxDataD5; - -contains - cxBDEAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD5.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD5.res deleted file mode 100644 index 02c274f2..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD5.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD6.dpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD6.dpk deleted file mode 100644 index a74bfeb1..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxBDEAdaptersD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'BDE Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - bdertl, - cxDataD6; - -contains - cxBDEAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD6.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD6.res deleted file mode 100644 index 88b1ea41..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD6.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD7.dpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD7.dpk deleted file mode 100644 index dd92c4b4..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxBDEAdaptersD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'BDE Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - bdertl, - cxDataD7; - -contains - cxBDEAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD7.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD7.res deleted file mode 100644 index e416da05..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD7.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD8.dpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD8.dpk deleted file mode 100644 index 01aab3f1..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD8.dpk +++ /dev/null @@ -1,95 +0,0 @@ -package cxBDEAdaptersD8; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'BDE Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - cxDataD8, - Borland.VclBdeRtl, - System.Drawing; - -contains - cxBDEAdapters; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD8.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD8.res deleted file mode 100644 index 2fe7391e..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD8.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9.dpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9.dpk deleted file mode 100644 index cdd1a6ac..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxBDEAdaptersD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'BDE Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - bdertl, - cxDataD9; - -contains - cxBDEAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9.res deleted file mode 100644 index 329081c6..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9NET.dpk b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9NET.dpk deleted file mode 100644 index 0e338355..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9NET.dpk +++ /dev/null @@ -1,95 +0,0 @@ -package cxBDEAdaptersD9NET; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'BDE Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - cxDataD9NET, - Borland.VclBdeRtl, - System.Drawing; - -contains - cxBDEAdapters; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9NET.res b/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9NET.res deleted file mode 100644 index 213bb5c8..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxBDEAdaptersD9NET.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC10.bpk b/internal/x.46/ExpressDataController/Packages/cxDataC10.bpk deleted file mode 100644 index 9f53f255..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC10.bpk +++ /dev/null @@ -1,199 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = cxDataC10.bpl -OBJFILES = cxDataC10.obj cxVariants.obj \ - cxCustomData.obj cxData.obj \ - cxDataConsts.obj cxDataStorage.obj \ - cxDataUtils.obj cxDB.obj \ - cxDBData.obj cxFilter.obj cxDBFilter.obj \ - cxFilterConsts.obj cxLike.obj -RESFILES = cxDataC10.res -MAINSOURCE = cxDataC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC10.cpp b/internal/x.46/ExpressDataController/Packages/cxDataC10.cpp deleted file mode 100644 index a070645b..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC10.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxDataC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxVariants.pas"); -USEUNIT("cxCustomData.pas"); -USEUNIT("cxData.pas"); -USEUNIT("cxDataConsts.pas"); -USEUNIT("cxDataStorage.pas"); -USEUNIT("cxDataUtils.pas"); -USEUNIT("cxDB.pas"); -USEUNIT("cxDBData.pas"); -USEUNIT("cxFilter.pas"); -USEUNIT("cxDBFilter.pas"); -USEUNIT("cxFilterConsts.pas"); -USEUNIT("cxLike.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC10.res b/internal/x.46/ExpressDataController/Packages/cxDataC10.res deleted file mode 100644 index 10ca0d5a..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataC10.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC11.bpk b/internal/x.46/ExpressDataController/Packages/cxDataC11.bpk deleted file mode 100644 index 0ece0e44..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC11.bpk +++ /dev/null @@ -1,199 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = cxDataC11.bpl -OBJFILES = cxDataC11.obj cxVariants.obj \ - cxCustomData.obj cxData.obj \ - cxDataConsts.obj cxDataStorage.obj \ - cxDataUtils.obj cxDB.obj \ - cxDBData.obj cxFilter.obj cxDBFilter.obj \ - cxFilterConsts.obj cxLike.obj -RESFILES = cxDataC11.res -MAINSOURCE = cxDataC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC11.cpp b/internal/x.46/ExpressDataController/Packages/cxDataC11.cpp deleted file mode 100644 index 29ef3975..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC11.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxDataC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxVariants.pas"); -USEUNIT("cxCustomData.pas"); -USEUNIT("cxData.pas"); -USEUNIT("cxDataConsts.pas"); -USEUNIT("cxDataStorage.pas"); -USEUNIT("cxDataUtils.pas"); -USEUNIT("cxDB.pas"); -USEUNIT("cxDBData.pas"); -USEUNIT("cxFilter.pas"); -USEUNIT("cxDBFilter.pas"); -USEUNIT("cxFilterConsts.pas"); -USEUNIT("cxLike.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC11.res b/internal/x.46/ExpressDataController/Packages/cxDataC11.res deleted file mode 100644 index 5b341563..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataC11.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC12.bpk b/internal/x.46/ExpressDataController/Packages/cxDataC12.bpk deleted file mode 100644 index 00aba9c0..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC12.bpk +++ /dev/null @@ -1,199 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = cxDataC12.bpl -OBJFILES = cxDataC12.obj cxVariants.obj \ - cxCustomData.obj cxData.obj \ - cxDataConsts.obj cxDataStorage.obj \ - cxDataUtils.obj cxDB.obj \ - cxDBData.obj cxFilter.obj cxDBFilter.obj \ - cxFilterConsts.obj cxLike.obj -RESFILES = cxDataC12.res -MAINSOURCE = cxDataC12.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxCoreC12.bpi -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC12.cpp b/internal/x.46/ExpressDataController/Packages/cxDataC12.cpp deleted file mode 100644 index 80fb483b..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC12.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxDataC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxVariants.pas"); -USEUNIT("cxCustomData.pas"); -USEUNIT("cxData.pas"); -USEUNIT("cxDataConsts.pas"); -USEUNIT("cxDataStorage.pas"); -USEUNIT("cxDataUtils.pas"); -USEUNIT("cxDB.pas"); -USEUNIT("cxDBData.pas"); -USEUNIT("cxFilter.pas"); -USEUNIT("cxDBFilter.pas"); -USEUNIT("cxFilterConsts.pas"); -USEUNIT("cxLike.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC12.res b/internal/x.46/ExpressDataController/Packages/cxDataC12.res deleted file mode 100644 index 45daf870..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataC12.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC14.bpk b/internal/x.46/ExpressDataController/Packages/cxDataC14.bpk deleted file mode 100644 index ba4073f8..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC14.bpk +++ /dev/null @@ -1,199 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = cxDataC14.bpl -OBJFILES = cxDataC14.obj cxVariants.obj \ - cxCustomData.obj cxData.obj \ - cxDataConsts.obj cxDataStorage.obj \ - cxDataUtils.obj cxDB.obj \ - cxDBData.obj cxFilter.obj cxDBFilter.obj \ - cxFilterConsts.obj cxLike.obj -RESFILES = cxDataC14.res -MAINSOURCE = cxDataC14.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxCoreC14.bpi -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC14.cpp b/internal/x.46/ExpressDataController/Packages/cxDataC14.cpp deleted file mode 100644 index c0e24438..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC14.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxDataC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxVariants.pas"); -USEUNIT("cxCustomData.pas"); -USEUNIT("cxData.pas"); -USEUNIT("cxDataConsts.pas"); -USEUNIT("cxDataStorage.pas"); -USEUNIT("cxDataUtils.pas"); -USEUNIT("cxDB.pas"); -USEUNIT("cxDBData.pas"); -USEUNIT("cxFilter.pas"); -USEUNIT("cxDBFilter.pas"); -USEUNIT("cxFilterConsts.pas"); -USEUNIT("cxLike.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC14.res b/internal/x.46/ExpressDataController/Packages/cxDataC14.res deleted file mode 100644 index eed12dd8..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataC14.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC5.bpk b/internal/x.46/ExpressDataController/Packages/cxDataC5.bpk deleted file mode 100644 index 8da3d019..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC5.bpk +++ /dev/null @@ -1,199 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = cxDataC5.bpl -OBJFILES = cxDataC5.obj cxVariants.obj \ - cxCustomData.obj cxData.obj \ - cxDataConsts.obj cxDataStorage.obj \ - cxDataUtils.obj cxDB.obj \ - cxDBData.obj cxFilter.obj cxDBFilter.obj \ - cxFilterConsts.obj cxLike.obj -RESFILES = cxDataC5.res -MAINSOURCE = cxDataC5.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = vcl50.bpi vcldb50.bpi -SPARELIBS = vcl50.lib vcldb50.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC5.cpp b/internal/x.46/ExpressDataController/Packages/cxDataC5.cpp deleted file mode 100644 index 820d63fe..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC5.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxDataC5.res"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("Vcldb50.bpi"); -USEUNIT("cxVariants.pas"); -USEUNIT("cxCustomData.pas"); -USEUNIT("cxData.pas"); -USEUNIT("cxDataConsts.pas"); -USEUNIT("cxDataStorage.pas"); -USEUNIT("cxDataUtils.pas"); -USEUNIT("cxDB.pas"); -USEUNIT("cxDBData.pas"); -USEUNIT("cxFilter.pas"); -USEUNIT("cxDBFilter.pas"); -USEUNIT("cxFilterConsts.pas"); -USEUNIT("cxLike.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC5.res b/internal/x.46/ExpressDataController/Packages/cxDataC5.res deleted file mode 100644 index c4f43f7c..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataC5.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC6.bpk b/internal/x.46/ExpressDataController/Packages/cxDataC6.bpk deleted file mode 100644 index aa31fb10..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC6.bpk +++ /dev/null @@ -1,199 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = cxDataC6.bpl -OBJFILES = cxDataC6.obj cxVariants.obj \ - cxCustomData.obj cxData.obj \ - cxDataConsts.obj cxDataStorage.obj \ - cxDataUtils.obj cxDB.obj \ - cxDBData.obj cxFilter.obj cxDBFilter.obj \ - cxFilterConsts.obj cxLike.obj -RESFILES = cxDataC6.res -MAINSOURCE = cxDataC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxCoreC6.bpi -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC6.cpp b/internal/x.46/ExpressDataController/Packages/cxDataC6.cpp deleted file mode 100644 index 94ef8615..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataC6.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxDataC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxVariants.pas"); -USEUNIT("cxCustomData.pas"); -USEUNIT("cxData.pas"); -USEUNIT("cxDataConsts.pas"); -USEUNIT("cxDataStorage.pas"); -USEUNIT("cxDataUtils.pas"); -USEUNIT("cxDB.pas"); -USEUNIT("cxDBData.pas"); -USEUNIT("cxFilter.pas"); -USEUNIT("cxDBFilter.pas"); -USEUNIT("cxFilterConsts.pas"); -USEUNIT("cxLike.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxDataC6.res b/internal/x.46/ExpressDataController/Packages/cxDataC6.res deleted file mode 100644 index c5ed9eba..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataC6.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD10.dpk b/internal/x.46/ExpressDataController/Packages/cxDataD10.dpk deleted file mode 100644 index 82defcb0..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataD10.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package cxDataD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxCoreD10, - dbrtl; - -contains - cxCustomData , - cxData , - cxDataConsts , - cxDataStorage , - cxDataUtils , - cxDB , - cxDBData , - cxFilter , - cxDBFilter, - cxFilterConsts, - cxLike , - cxVariants ; -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD10.res b/internal/x.46/ExpressDataController/Packages/cxDataD10.res deleted file mode 100644 index bba1f452..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataD10.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD10NET.dpk b/internal/x.46/ExpressDataController/Packages/cxDataD10NET.dpk deleted file mode 100644 index 57b1e2eb..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataD10NET.dpk +++ /dev/null @@ -1,104 +0,0 @@ -package cxDataD10NET; - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - Borland.VclDbRtl, - System.Drawing; - -contains - cxVariants, - cxCustomData, - cxData, - cxDataConsts, - cxDataUtils, - cxDB, - cxDBData, - cxDBFilter, - cxFilter, - cxFilterConsts, - cxLike, - cxDataStorage; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD10NET.res b/internal/x.46/ExpressDataController/Packages/cxDataD10NET.res deleted file mode 100644 index 3f422184..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataD10NET.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD11.dpk b/internal/x.46/ExpressDataController/Packages/cxDataD11.dpk deleted file mode 100644 index 3f5d3f72..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataD11.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package cxDataD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxCoreD11, - dbrtl; - -contains - cxCustomData , - cxData , - cxDataConsts , - cxDataStorage , - cxDataUtils , - cxDB , - cxDBData , - cxFilter , - cxDBFilter, - cxFilterConsts, - cxLike , - cxVariants ; -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD11.res b/internal/x.46/ExpressDataController/Packages/cxDataD11.res deleted file mode 100644 index a0925e10..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataD11.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD12.dpk b/internal/x.46/ExpressDataController/Packages/cxDataD12.dpk deleted file mode 100644 index 24787324..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataD12.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package cxDataD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxCoreD12, - dbrtl; - -contains - cxCustomData , - cxData , - cxDataConsts , - cxDataStorage , - cxDataUtils , - cxDB , - cxDBData , - cxFilter , - cxDBFilter, - cxFilterConsts, - cxLike , - cxVariants ; -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD12.res b/internal/x.46/ExpressDataController/Packages/cxDataD12.res deleted file mode 100644 index f6faca28..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataD12.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD14.dpk b/internal/x.46/ExpressDataController/Packages/cxDataD14.dpk deleted file mode 100644 index 0810cf07..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataD14.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package cxDataD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxCoreD14, - dbrtl; - -contains - cxCustomData , - cxData , - cxDataConsts , - cxDataStorage , - cxDataUtils , - cxDB , - cxDBData , - cxFilter , - cxDBFilter, - cxFilterConsts, - cxLike , - cxVariants ; -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD14.res b/internal/x.46/ExpressDataController/Packages/cxDataD14.res deleted file mode 100644 index d73fb8d6..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataD14.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD5.dpk b/internal/x.46/ExpressDataController/Packages/cxDataD5.dpk deleted file mode 100644 index bd09032e..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataD5.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package cxDataD5; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl50, - vcldb50; - -contains - cxCustomData, - cxData, - cxDataConsts, - cxDataStorage, - cxDataUtils, - cxDB, - cxDBData, - cxFilter, - cxDBFilter, - cxFilterConsts, - cxLike, - cxVariants; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD5.res b/internal/x.46/ExpressDataController/Packages/cxDataD5.res deleted file mode 100644 index d64f5810..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataD5.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD6.dpk b/internal/x.46/ExpressDataController/Packages/cxDataD6.dpk deleted file mode 100644 index caed7099..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataD6.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package cxDataD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxCoreD6, - dbrtl; - -contains - cxCustomData , - cxData , - cxDataConsts , - cxDataStorage , - cxDataUtils , - cxDB , - cxDBData , - cxFilter , - cxDBFilter, - cxFilterConsts, - cxLike , - cxVariants ; -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD6.res b/internal/x.46/ExpressDataController/Packages/cxDataD6.res deleted file mode 100644 index 49480046..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataD6.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD7.dpk b/internal/x.46/ExpressDataController/Packages/cxDataD7.dpk deleted file mode 100644 index 2ab51b73..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataD7.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package cxDataD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxCoreD7, - dbrtl; - -contains - cxCustomData , - cxData , - cxDataConsts , - cxDataStorage , - cxDataUtils , - cxDB , - cxDBData , - cxFilter , - cxDBFilter, - cxFilterConsts, - cxLike , - cxVariants ; -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD7.res b/internal/x.46/ExpressDataController/Packages/cxDataD7.res deleted file mode 100644 index 865793e3..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataD7.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD8.dpk b/internal/x.46/ExpressDataController/Packages/cxDataD8.dpk deleted file mode 100644 index aecfe9bb..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataD8.dpk +++ /dev/null @@ -1,104 +0,0 @@ -package cxDataD8; - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - Borland.VclDbRtl, - System.Drawing; - -contains - cxVariants, - cxCustomData, - cxData, - cxDataConsts, - cxDataUtils, - cxDB, - cxDBData, - cxDBFilter, - cxFilter, - cxFilterConsts, - cxLike, - cxDataStorage; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD8.res b/internal/x.46/ExpressDataController/Packages/cxDataD8.res deleted file mode 100644 index ba732c9c..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataD8.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD9.dpk b/internal/x.46/ExpressDataController/Packages/cxDataD9.dpk deleted file mode 100644 index f1ec47ee..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataD9.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package cxDataD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxCoreD9, - dbrtl; - -contains - cxCustomData , - cxData , - cxDataConsts , - cxDataStorage , - cxDataUtils , - cxDB , - cxDBData , - cxFilter , - cxDBFilter, - cxFilterConsts, - cxLike , - cxVariants ; -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD9.res b/internal/x.46/ExpressDataController/Packages/cxDataD9.res deleted file mode 100644 index cc2f4590..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataD9.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD9NET.dpk b/internal/x.46/ExpressDataController/Packages/cxDataD9NET.dpk deleted file mode 100644 index 96b44bc2..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxDataD9NET.dpk +++ /dev/null @@ -1,104 +0,0 @@ -package cxDataD9NET; - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - Borland.VclDbRtl, - System.Drawing; - -contains - cxVariants, - cxCustomData, - cxData, - cxDataConsts, - cxDataUtils, - cxDB, - cxDBData, - cxDBFilter, - cxFilter, - cxFilterConsts, - cxLike, - cxDataStorage; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxDataD9NET.res b/internal/x.46/ExpressDataController/Packages/cxDataD9NET.res deleted file mode 100644 index eb8950e6..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxDataD9NET.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC10.bpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC10.bpk deleted file mode 100644 index 0b09baa8..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC10.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = cxIBXAdaptersC10.bpl -OBJFILES = cxIBXAdaptersC10.obj cxIBXAdapters.obj -RESFILES = cxIBXAdaptersC10.res -MAINSOURCE = cxIBXAdaptersC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi ibxpress.bpi cxDataC10.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib dbrtl.lib ibxpress.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Interbase Express Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC10.cpp b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC10.cpp deleted file mode 100644 index 37623b18..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC10.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxIBXAdaptersC10.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("ibxpress.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEUNIT("cxIBXAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC10.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC10.res deleted file mode 100644 index d8056320..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC10.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC11.bpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC11.bpk deleted file mode 100644 index cca30a51..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC11.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = cxIBXAdaptersC11.bpl -OBJFILES = cxIBXAdaptersC11.obj cxIBXAdapters.obj -RESFILES = cxIBXAdaptersC11.res -MAINSOURCE = cxIBXAdaptersC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi ibxpress.bpi cxDataC11.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib dbrtl.lib ibxpress.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Interbase Express Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC11.cpp b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC11.cpp deleted file mode 100644 index 21a7f68f..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxIBXAdaptersC11.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("ibxpress.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEUNIT("cxIBXAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC11.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC11.res deleted file mode 100644 index 94894f79..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC11.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC12.bpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC12.bpk deleted file mode 100644 index d6660382..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC12.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = cxIBXAdaptersC12.bpl -OBJFILES = cxIBXAdaptersC12.obj cxIBXAdapters.obj -RESFILES = cxIBXAdaptersC12.res -MAINSOURCE = cxIBXAdaptersC12.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi ibxpress.bpi cxDataC12.bpi dxCoreC12.bpi -SPARELIBS = rtl.lib dbrtl.lib ibxpress.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Interbase Express Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC12.cpp b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC12.cpp deleted file mode 100644 index 33356cf5..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC12.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxIBXAdaptersC12.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("ibxpress.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEUNIT("cxIBXAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC12.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC12.res deleted file mode 100644 index b1ff9c48..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC12.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC14.bpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC14.bpk deleted file mode 100644 index f1f2c0d8..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC14.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = cxIBXAdaptersC14.bpl -OBJFILES = cxIBXAdaptersC14.obj cxIBXAdapters.obj -RESFILES = cxIBXAdaptersC14.res -MAINSOURCE = cxIBXAdaptersC14.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi ibxpress.bpi cxDataC14.bpi dxCoreC14.bpi -SPARELIBS = rtl.lib dbrtl.lib ibxpress.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Interbase Express Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC14.cpp b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC14.cpp deleted file mode 100644 index 875cf3c9..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC14.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxIBXAdaptersC14.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("ibxpress.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEUNIT("cxIBXAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC14.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC14.res deleted file mode 100644 index 78b3c0ef..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC14.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC5.bpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC5.bpk deleted file mode 100644 index 542a0c1a..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC5.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = cxIBXAdaptersC5.bpl -OBJFILES = cxIBXAdaptersC5.obj cxIBXAdapters.obj -RESFILES = cxIBXAdaptersC5.res -MAINSOURCE = cxIBXAdaptersC5.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = vcl50.bpi vcldb50.bpi vclib50.bpi cxDataC5.bpi -SPARELIBS = vcl50.lib vcldb50.lib vclib50.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Interbase Express Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC5.cpp b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC5.cpp deleted file mode 100644 index f27bd6a7..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC5.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxIBXAdaptersC5.res"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("Vcldb50.bpi"); -USEPACKAGE("vclib50.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEUNIT("cxIBXAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC5.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC5.res deleted file mode 100644 index ec2fa3d5..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC5.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC6.bpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC6.bpk deleted file mode 100644 index c59745c4..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC6.bpk +++ /dev/null @@ -1,194 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = cxIBXAdaptersC6.bpl -OBJFILES = cxIBXAdaptersC6.obj cxIBXAdapters.obj -RESFILES = cxIBXAdaptersC6.res -MAINSOURCE = cxIBXAdaptersC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi dbrtl.bpi ibxpress.bpi cxDataC6.bpi dxCoreC6.bpi -SPARELIBS = rtl.lib dbrtl.lib ibxpress.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Interbase Express Adapters for ExpressDataController by Developer Express Inc." -aa -Tpp -Gpr -x -Gn \ - -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC6.cpp b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC6.cpp deleted file mode 100644 index 7ec50be6..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC6.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxIBXAdaptersC6.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("ibxpress.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEUNIT("cxIBXAdapters.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC6.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC6.res deleted file mode 100644 index 6863bae3..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersC6.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10.dpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10.dpk deleted file mode 100644 index 6ac4f4a6..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxIBXAdaptersD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Interbase Express Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - ibxpress, - cxDataD10; - -contains - cxIBXAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10.res deleted file mode 100644 index d6723cf0..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10NET.dpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10NET.dpk deleted file mode 100644 index 81ef5bbe..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10NET.dpk +++ /dev/null @@ -1,95 +0,0 @@ -package cxIBXAdaptersD10NET; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Interbase Express Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - cxDataD10NET, - Borland.VclIBXpress, - System.Drawing; - -contains - cxIBXAdapters; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10NET.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10NET.res deleted file mode 100644 index eaad63a2..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD10NET.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD11.dpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD11.dpk deleted file mode 100644 index bd850424..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD11.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxIBXAdaptersD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Interbase Express Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - ibxpress, - cxDataD11; - -contains - cxIBXAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD11.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD11.res deleted file mode 100644 index 88fac0fb..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD11.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD12.dpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD12.dpk deleted file mode 100644 index 7ce70e88..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD12.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxIBXAdaptersD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Interbase Express Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - ibxpress, - cxDataD12; - -contains - cxIBXAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD12.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD12.res deleted file mode 100644 index 47f4a78f..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD12.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD14.dpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD14.dpk deleted file mode 100644 index 92c788ba..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD14.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxIBXAdaptersD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Interbase Express Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - ibxpress, - cxDataD14; - -contains - cxIBXAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD14.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD14.res deleted file mode 100644 index 7e4f0264..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD14.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD5.dpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD5.dpk deleted file mode 100644 index 9e1ac1f5..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD5.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxIBXAdaptersD5; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Interbase Express Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl50, - vcldb50, - vclib50, - cxDataD5; - -contains - cxIBXAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD5.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD5.res deleted file mode 100644 index 3e2dc8db..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD5.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD6.dpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD6.dpk deleted file mode 100644 index a3a513a4..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxIBXAdaptersD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Interbase Express Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - ibxpress, - cxDataD6; - -contains - cxIBXAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD6.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD6.res deleted file mode 100644 index 08609386..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD6.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD7.dpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD7.dpk deleted file mode 100644 index 54503d64..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxIBXAdaptersD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Interbase Express Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - ibxpress, - cxDataD7; - -contains - cxIBXAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD7.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD7.res deleted file mode 100644 index 4012137c..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD7.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD8.dpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD8.dpk deleted file mode 100644 index 38bd7c08..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD8.dpk +++ /dev/null @@ -1,95 +0,0 @@ -package cxIBXAdaptersD8; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Interbase Express Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - cxDataD8, - Borland.VclIBXpress, - System.Drawing; - -contains - cxIBXAdapters; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD8.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD8.res deleted file mode 100644 index e98c53e6..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD8.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9.dpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9.dpk deleted file mode 100644 index 898393d3..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package cxIBXAdaptersD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Interbase Express Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - ibxpress, - cxDataD9; - -contains - cxIBXAdapters; - -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9.res deleted file mode 100644 index 5f82bf87..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9NET.dpk b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9NET.dpk deleted file mode 100644 index 1ab4c28d..00000000 --- a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9NET.dpk +++ /dev/null @@ -1,95 +0,0 @@ -package cxIBXAdaptersD9NET; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Interbase Express Adapters for ExpressDataController by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - cxDataD9NET, - Borland.VclIBXpress, - System.Drawing; - -contains - cxIBXAdapters; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9NET.res b/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9NET.res deleted file mode 100644 index e3be9829..00000000 Binary files a/internal/x.46/ExpressDataController/Packages/cxIBXAdaptersD9NET.res and /dev/null differ diff --git a/internal/x.46/ExpressDataController/Sources/cxADOAdapters.pas b/internal/x.46/ExpressDataController/Sources/cxADOAdapters.pas deleted file mode 100644 index 890486a6..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxADOAdapters.pas +++ /dev/null @@ -1,141 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxADOAdapters; - -{$I cxVer.inc} - -interface - -uses - DB, cxDBData, cxFilter, cxDBFilter; - -type - { TcxADOProviderDetailFilterAdapter } - - TcxADOProviderDetailFilterAdapter = class(TcxDBProviderDetailFilterAdapter) - public - function IsCurrentQuery(ADataSet: TDataSet; const AParamNames: string; const AParamValues: Variant): Boolean; override; - procedure ReopenSQL(ADataSet: TDataSet; const AParamNames: string; const AParamValues: Variant; var AReopened: Boolean); override; - end; - - { TcxADOFilterOperatorAdapter } - - TcxADOFilterOperatorAdapter = class(TcxDBFilterOperatorAdapter) - public - procedure PrepareOperatorClass(ASender: TObject; ADataSet: TDataSet; - var AOperatorClass: TcxFilterOperatorClass); override; - end; - -implementation - -uses - TypInfo, ADODB, cxVariants; - -{ TcxADOProviderDetailFilterAdapter } - -function TcxADOProviderDetailFilterAdapter.IsCurrentQuery(ADataSet: TDataSet; - const AParamNames: string; const AParamValues: Variant): Boolean; -var - AParameters: TParameters; -begin - Result := False; - if IsPublishedProp(ADataSet, 'Parameters') then - begin - AParameters := GetObjectProp(ADataSet, 'Parameters') as TParameters; - if AParameters <> nil then - begin - if VarEquals(AParameters.ParamValues[AParamNames], AParamValues) then - Result := True; - end; - end; -end; - -procedure TcxADOProviderDetailFilterAdapter.ReopenSQL(ADataSet: TDataSet; - const AParamNames: string; const AParamValues: Variant; var AReopened: Boolean); -var - AParameters: TParameters; -begin - if IsPublishedProp(ADataSet, 'Parameters') then - begin - AParameters := GetObjectProp(ADataSet, 'Parameters') as TParameters; - if AParameters <> nil then - begin - if VarEquals(AParameters.ParamValues[AParamNames], AParamValues) then - ADataSet.First - else - begin - ADataSet.DisableControls; - try - ADataSet.Active := False; - AParameters.ParamValues[AParamNames] := AParamValues; - ADataSet.Active := True; - finally - ADataSet.EnableControls; - end; - AReopened := True; // set Flag if Query reopened - end; - end; - end; -end; - -{ TcxADOFilterOperatorAdapter } - -procedure TcxADOFilterOperatorAdapter.PrepareOperatorClass(ASender: TObject; - ADataSet: TDataSet; var AOperatorClass: TcxFilterOperatorClass); -begin - {if AOperatorClass.InheritsFrom(TcxFilterNullOperator) or - AOperatorClass.InheritsFrom(TcxFilterNotNullOperator) then - begin - if (ADataSet is TADOQuery) or - ((ADataSet is TADODataSet) and (TADODataSet(ADataSet).CommandType = cmdText)) then - begin - if AOperatorClass.InheritsFrom(TcxFilterNotNullOperator) then - AOperatorClass := TcxFilterSQLNotNullOperator - else - AOperatorClass := TcxFilterSQLNullOperator; - end; - end;} -end; - -initialization - cxDetailFilterControllers.RegisterAdapter(TCustomADODataSet, TcxADOProviderDetailFilterAdapter); - cxFilterOperatorAdapters.RegisterAdapter(TCustomADODataSet, TcxADOFilterOperatorAdapter); - -finalization - cxDetailFilterControllers.UnregisterAdapter(TCustomADODataSet, TcxADOProviderDetailFilterAdapter); - cxFilterOperatorAdapters.UnregisterAdapter(TCustomADODataSet, TcxADOFilterOperatorAdapter); - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxBDEAdapters.pas b/internal/x.46/ExpressDataController/Sources/cxBDEAdapters.pas deleted file mode 100644 index 70d67f58..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxBDEAdapters.pas +++ /dev/null @@ -1,83 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxBDEAdapters; - -{$I cxVer.inc} - -interface - -uses - DB, cxDBData, cxFilter, cxDBFilter; - -type - { TcxBDEFilterOperatorAdapter } - - TcxBDEFilterOperatorAdapter = class(TcxDBFilterOperatorAdapter) - public - procedure PrepareOperatorClass(ASender: TObject; ADataSet: TDataSet; - var AOperatorClass: TcxFilterOperatorClass); override; - end; - -implementation - -uses - TypInfo, DBTables, cxVariants; - -{ TcxBDEFilterOperatorAdapter } - -procedure TcxBDEFilterOperatorAdapter.PrepareOperatorClass(ASender: TObject; - ADataSet: TDataSet; var AOperatorClass: TcxFilterOperatorClass); -begin - if AOperatorClass.InheritsFrom(TcxFilterNullOperator) or - AOperatorClass.InheritsFrom(TcxFilterNotNullOperator) then - begin - if ADataSet is TQuery then - begin - if AOperatorClass.InheritsFrom(TcxFilterNotNullOperator) then - AOperatorClass := TcxFilterSQLNotNullOperator - else - AOperatorClass := TcxFilterSQLNullOperator; - end; - end; -end; - -initialization - cxFilterOperatorAdapters.RegisterAdapter(TQuery, TcxBDEFilterOperatorAdapter); - -finalization - cxFilterOperatorAdapters.UnregisterAdapter(TQuery, TcxBDEFilterOperatorAdapter); - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxCustomData.pas b/internal/x.46/ExpressDataController/Sources/cxCustomData.pas deleted file mode 100644 index ff342ed5..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxCustomData.pas +++ /dev/null @@ -1,13642 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxCustomData; - -{$I cxVer.inc} - -interface - -uses - SysUtils, Classes, {$IFDEF DELPHI6}Variants, {$ENDIF}cxVariants, - cxDataUtils, cxDataStorage, cxFilter, dxCore; - -const - cxNullEditingRecordIndex = -MaxInt; - -type - TcxCustomDataControllerInfo = class; - TcxCustomDataController = class; - TcxCustomDataProvider = class; - TcxCustomDataField = class; - TcxCustomDataFieldList = class; - TcxCustomDataRelationList = class; - TcxDataSummaryItem = class; - TcxDataSummaryItems = class; - TcxDataSummaryGroup = class; - TcxDataSummaryGroups = class; - TcxDataSummaryGroupItemLinks = class; - TcxDataSummary = class; - - EcxInvalidDataControllerOperation = class(EdxException); - - { TcxCustomDataSource } - - TcxDataRecordHandle = Pointer; - TcxDataItemHandle = Pointer; - - TcxCustomDataSource = class - private - FCurrentProvider: TcxCustomDataProvider; - FProvider: TcxCustomDataProvider; - FProviders: TList; - function GetDataController: TcxCustomDataController; - function GetProvider: TcxCustomDataProvider; - procedure AddProvider(AProvider: TcxCustomDataProvider); - procedure RemoveProvider(AProvider: TcxCustomDataProvider); - procedure RemoveFromProviders; - protected - function AppendRecord: TcxDataRecordHandle; virtual; // * - procedure CustomSort; virtual; // when IsCustomSorting = True - procedure DeleteRecord(ARecordHandle: TcxDataRecordHandle); virtual; // * - function GetDefaultItemID(AItemIndex: Integer): Integer; virtual; - function GetDetailHasChildren(ARecordIndex, ARelationIndex: Integer): Boolean; virtual; - function GetDisplayText(ARecordHandle: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle): string; virtual; - function GetInfoForCompare(ARecordHandle: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle; var PValueBuffer: PAnsiChar): Boolean; virtual; - function GetItemHandle(AItemIndex: Integer): TcxDataItemHandle; virtual; - function GetRecordCount: Integer; virtual; // * - function GetRecordId(ARecordHandle: TcxDataRecordHandle): Variant; virtual; // Save Keys Required - function GetRecordHandle(ARecordIndex: Integer): TcxDataRecordHandle; virtual; - function GetValue(ARecordHandle: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle): Variant; virtual; // * - function InsertRecord(ARecordHandle: TcxDataRecordHandle): TcxDataRecordHandle; virtual; // * - function IsCustomSorting: Boolean; virtual; - function IsNativeCompare: Boolean; virtual; - function IsNativeCompareFunc: Boolean; virtual; - function IsRecordIdSupported: Boolean; virtual; // Save Keys Required - procedure LoadRecordHandles; virtual; - function NativeCompareFunc(ARecordHandle1, ARecordHandle2: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle): Integer; virtual; - procedure SetRecordCount(ARecordCount: Integer); virtual; - procedure SetValue(ARecordHandle: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle; const AValue: Variant); virtual; // * - property CurrentProvider: TcxCustomDataProvider read FCurrentProvider write FCurrentProvider; - // tree - function AddRecordHandle(ARecordHandle: TcxDataRecordHandle): Integer; - public - destructor Destroy; override; - procedure DataChanged; virtual; - function GetRecordHandleByIndex(ARecordIndex: Integer): TcxDataRecordHandle; - function GetRecordIndexByHandle(ARecordHandle: TcxDataRecordHandle): Integer; - property DataController: TcxCustomDataController read GetDataController; - property Provider: TcxCustomDataProvider read GetProvider; - end; - - TcxCustomDataSourceClass = class of TcxCustomDataSource; - - { TcxCustomDataProvider } - - TcxDataChange = (dcField, dcRecord, dcNew, dcDeleted, dcTotal); - TcxDataChangeInfo = record - Kind: TcxDataChange; - ItemIndex: Integer; - RecordIndex: Integer; - end; - - TcxDataLayoutChange = (lcStructure, lcData); - TcxDataLayoutChanges = set of TcxDataLayoutChange; - - TcxDataSummaryCountValues = array of Integer; - TcxDataSummaryValues = array of Variant; - - TcxCustomDataProvider = class - private - FActiveChanging: Boolean; - FChanging: Boolean; - FCustomDataSource: TcxCustomDataSource; - FDataChangedLocked: Boolean; - FDataController: TcxCustomDataController; - FEditingRecordIndex: Integer; - FEditingRecordIndex1: Integer; // After - FEditingRecordIndex2: Integer; // Before - FInsertedRecordIndex: Integer; - FInUpdateData: Boolean; - FLocateCount: Integer; - FLockCount: Integer; - FModified: Boolean; - FRecreatedFieldsAfterFirst: Boolean; - FSavedRecordIndex: Integer; - procedure SetCustomDataSource(Value: TcxCustomDataSource); - protected - FInInserting: Boolean; - FInserting: Boolean; - FLoadAllNeeded: Boolean; - // Mode - procedure CustomSort; virtual; // when IsCustomSorting = True - function IsCustomDataSourceSupported: Boolean; virtual; - function IsCustomSorting: Boolean; virtual; - function IsGridMode: Boolean; virtual; - function IsDataSource: Boolean; virtual; - function IsOtherInsert: Boolean; virtual; - function IsRecordIdSupported: Boolean; virtual; - function IsSyncMode: Boolean; virtual; - // State - function IsActive: Boolean; virtual; - function IsActiveDataSet: Boolean; virtual; - function IsBOF: Boolean; virtual; - function IsChanging: Boolean; virtual; - function IsEditing: Boolean; virtual; - function IsEOF: Boolean; virtual; - function IsGridModeUpdating: Boolean; virtual; - function IsInserting: Boolean; virtual; - function IsModified: Boolean; virtual; - function IsUnboundColumnMode: Boolean; virtual; - // Navigation - procedure CorrectRecordIndex(ARecordIndex: Integer); virtual; - procedure First; virtual; - procedure Prev; virtual; - procedure Next; virtual; - procedure Last; virtual; - procedure MoveBy(ADistance: Integer); virtual; - procedure Scroll(ADistance: Integer); virtual; - procedure SavePos; virtual; - procedure RestorePos; virtual; - // Editing - function CanAppend: Boolean; virtual; - function CanDelete: Boolean; virtual; - function CanInitEditing(ARecordIndex: Integer): Boolean; virtual; - function CanInsert: Boolean; virtual; - function CanModify: Boolean; virtual; - - procedure Append; virtual; - procedure Cancel; virtual; - procedure DoUpdateData; virtual; - procedure Delete; virtual; - procedure DeleteRecords(AList: TList); virtual; - procedure DeleteSelection; virtual; - procedure Edit; virtual; - function GetEditValue(ARecordIndex: Integer; AField: TcxCustomDataField; AEditValueSource: TcxDataEditValueSource): Variant; virtual; - procedure Insert; virtual; - procedure Post(AForcePost: Boolean = False); virtual; - procedure PostEditingData; virtual; - function SetEditValue(ARecordIndex: Integer; AField: TcxCustomDataField; const AValue: Variant; AEditValueSource: TcxDataEditValueSource): Boolean; virtual; - - procedure BeginDeleting; virtual; - procedure EndDeleting; virtual; - - procedure AssignItemValue(ARecordIndex: Integer; AField: TcxCustomDataField; const AValue: Variant); virtual; - procedure ClearSavedRecord; - procedure CreateSavedRecord(ARecordIndex: Integer); - procedure DoInitInsertingRecord(AInsertingRecordIndex: Integer; const AGroupValues: TcxDataSummaryValues); virtual; - procedure EditingRecord; virtual; - procedure InsertingRecord(AIsAppending: Boolean); virtual; - procedure ResetChanging; virtual; - procedure ResetEditing; virtual; - procedure ResetModified; virtual; - procedure SetChanging; virtual; - procedure SetEditing; virtual; - procedure SetModified; virtual; - // Lock Notify - procedure BeginLocate; virtual; - procedure EndLocate; virtual; - procedure Freeze; virtual; - procedure Unfreeze; virtual; - // Data - function AddRecordHandle(AData: Pointer): Integer; - function AppendRecord: Integer; virtual; - procedure DeleteRecord(ARecordIndex: Integer); virtual; - function GetDetailHasChildren(ARecordIndex, ARelationIndex: Integer): Boolean; virtual; - function GetDisplayText(ARecordIndex: Integer; AField: TcxCustomDataField): string; virtual; -// function GetRecordCount: Integer; virtual; - function GetExternalDataDisplayText(ARecordIndex: Integer; AField: TcxCustomDataField): string; virtual; - function GetExternalDataValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; virtual; - function GetRecordId(ARecordIndex: Integer): Variant; virtual; - function GetRecordIndex: Integer; virtual; - function GetValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; virtual; - function GetValueDefReaderClass: TcxValueDefReaderClass; virtual; - function InsertRecord(ARecordIndex: Integer): Integer; virtual; - procedure LoadDataBuffer; virtual; - procedure LoadRecordHandles; - function NativeCompare(ARecordIndex1, ARecordIndex2: Integer; AField: TcxCustomDataField): Integer; virtual; - function NativeCompareFunc(ARecordIndex1, ARecordIndex2: Integer; AField: TcxCustomDataField): Integer; virtual; - procedure SetDisplayText(ARecordIndex: Integer; AField: TcxCustomDataField; const Value: string); virtual; - procedure SetRecordCount(ARecordCount: Integer); virtual; - procedure SetValue(ARecordIndex: Integer; AField: TcxCustomDataField; const Value: Variant); virtual; - // Notification - procedure ActiveChanged(AActive: Boolean); virtual; - procedure DataChanged(ADataChange: TcxDataChange; AItemIndex, ARecordIndex: Integer); virtual; - procedure DataScrolled(ADistance: Integer); virtual; - procedure LayoutChanged(ADataLayoutChanges: TcxDataLayoutChanges); virtual; - - property ActiveChanging: Boolean read FActiveChanging write FActiveChanging; - property CustomDataSource: TcxCustomDataSource read FCustomDataSource write SetCustomDataSource; - property DataController: TcxCustomDataController read FDataController; - property EditingRecordIndex: Integer read FEditingRecordIndex; - property InsertedRecordIndex: Integer read FInsertedRecordIndex; - property LocateCount: Integer read FLocateCount; - property LockCount: Integer read FLockCount; - property RecreatedFieldsAfterFirst: Boolean read FRecreatedFieldsAfterFirst write FRecreatedFieldsAfterFirst; - public - constructor Create(ADataController: TcxCustomDataController); virtual; - destructor Destroy; override; - end; - - TcxCustomDataProviderClass = class of TcxCustomDataProvider; - - { TcxCustomDataField } - - TcxCustomDataField = class - private - FFieldList: TcxCustomDataFieldList; - FIsInternal: Boolean; - FItem: TObject; - FLockRecreateData: Integer; - FNeedConversion: Boolean; - FNeedConversionFlag: Integer; // 0 - undefined; -1 - not needed; 1 - needed; 2 - SortByDisplayText - FPrepared: Boolean; - FReferenceField: TcxCustomDataField; - FTextStored: Boolean; - FValueDef: TcxValueDef; - FValueTypeClass: TcxValueTypeClass; - function GetDataController: TcxCustomDataController; - function GetIndex: Integer; - function GetNotifier: TComponent; - function GetTextStored: Boolean; - function GetValueDef: TcxValueDef; - function GetValueTypeClass: TcxValueTypeClass; - procedure SetIndex(Value: Integer); - procedure SetIsInternal(Value: Boolean); - procedure SetReferenceField(Value: TcxCustomDataField); - procedure SetTextStored(Value: Boolean); - procedure SetValueTypeClass(Value: TcxValueTypeClass); - protected - procedure BeginRecreateData; - procedure Changed; - procedure ClearData; - procedure CreateData; - procedure EndRecreateData; - procedure Reassign(ASource: TcxCustomDataField); virtual; - procedure RemoveNotification(AComponent: TComponent); virtual; - property FieldList: TcxCustomDataFieldList read FFieldList; - property NeedConversion: Boolean read FNeedConversion write FNeedConversion; - property Notifier: TComponent read GetNotifier; - property TextStored: Boolean read GetTextStored write SetTextStored; - property ValueDef: TcxValueDef read GetValueDef; - public - constructor Create(AFieldList: TcxCustomDataFieldList); virtual; - destructor Destroy; override; - function CanModify(AEditValueSource: TcxDataEditValueSource): Boolean; virtual; - function IsUnbound: Boolean; virtual; - function IsValueDefInternal: Boolean; virtual; - property DataController: TcxCustomDataController read GetDataController; - property Index: Integer read GetIndex write SetIndex; - property IsInternal: Boolean read FIsInternal write SetIsInternal; - property Item: TObject read FItem write FItem; - property ReferenceField: TcxCustomDataField read FReferenceField write SetReferenceField; - property ValueTypeClass: TcxValueTypeClass read GetValueTypeClass write SetValueTypeClass; - end; - - TcxCustomDataFieldClass = class of TcxCustomDataField; - - { TcxCustomDataFieldList } - - TcxCustomDataFieldList = class - private - FDataController: TcxCustomDataController; - FFieldDestroyed: Boolean; - FInternalCount: Integer; - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxCustomDataField; - function GetItemCount: Integer; - protected - procedure Add(AField: TcxCustomDataField); - procedure Clear; - procedure RemoveField(AField: TcxCustomDataField); - procedure RemoveNotification(AComponent: TComponent); virtual; - procedure Update; - public - constructor Create(ADataController: TcxCustomDataController); virtual; - destructor Destroy; override; - function FieldByItem(AItem: TObject): TcxCustomDataField; - procedure ReassignFields(ADestroyedField: TcxCustomDataField); - property Count: Integer read GetCount; - property DataController: TcxCustomDataController read FDataController; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TcxCustomDataField read GetItem; default; - end; - - { Master-Detail } - - TcxDetailInfoObject = class - LinkObject: TObject; - HasChildren: Boolean; - HasChildrenAssigned: Boolean; - public - destructor Destroy; override; - end; - - TcxDetailObject = class - private - FActiveRelationIndex: Integer; - FInfoObjects: TList; - FExpanded: Boolean; - function GetInfoObject(Index: Integer): TcxDetailInfoObject; - function GetInfoObjectCount: Integer; - function GetIsEmpty: Boolean; - function GetLinkObject(Index: Integer): TObject; - function GetLinkObjectCount: Integer; - procedure SetInfoObject(Index: Integer; Value: TcxDetailInfoObject); - procedure SetLinkObject(Index: Integer; Value: TObject); - protected - procedure CorrectCount(ARelations: TcxCustomDataRelationList); - public - constructor Create; - destructor Destroy; override; - procedure Clear; - function ClearHasChildrenFlag: Boolean; - procedure ClearInfoObject(AIndex: Integer); - property ActiveRelationIndex: Integer read FActiveRelationIndex write FActiveRelationIndex; - property Expanded: Boolean read FExpanded write FExpanded; - property InfoObjectCount: Integer read GetInfoObjectCount; - property InfoObjects[Index: Integer]: TcxDetailInfoObject read GetInfoObject write SetInfoObject; - property IsEmpty: Boolean read GetIsEmpty; - property LinkObjectCount: Integer read GetLinkObjectCount; - property LinkObjects[Index: Integer]: TObject read GetLinkObject write SetLinkObject; - end; - - { TcxCustomDataRelation } - - TcxCustomDataRelation = class - private - FDetailDataController: TcxCustomDataController; - FItem: TObject; - FRelationList: TcxCustomDataRelationList; - function GetDataController: TcxCustomDataController; - function GetIndex: Integer; - protected - procedure Changed; - procedure RemoveDataField(ADataField: TcxCustomDataField); virtual; - public - constructor Create(ARelationList: TcxCustomDataRelationList; AItem: TObject); virtual; - destructor Destroy; override; - procedure Assign(ASource: TcxCustomDataRelation); virtual; - property DataController: TcxCustomDataController read GetDataController; - property DetailDataController: TcxCustomDataController read FDetailDataController; - property Index: Integer read GetIndex; - property Item: TObject read FItem; - property RelationList: TcxCustomDataRelationList read FRelationList; - end; - - TcxCustomDataRelationClass = class of TcxCustomDataRelation; - - { TcxCustomDataRelationList } - - TcxCustomDataRelationList = class - private - FDataController: TcxCustomDataController; - FDataField: TcxCustomDataField; - FItems: TList; - FLockCount: Integer; - procedure AddItem(AItem: TcxCustomDataRelation); - function GetCount: Integer; - function GetItem(Index: Integer): TcxCustomDataRelation; - procedure RemoveItem(AItem: TcxCustomDataRelation); - protected - procedure Changed(ARelation: TcxCustomDataRelation); - function GetValueAsDetailObject(ARecordIndex: Integer): TcxDetailObject; - procedure RemoveDataField(ADataField: TcxCustomDataField); - procedure Update(ARelation: TcxCustomDataRelation); - - property DataController: TcxCustomDataController read FDataController; - property LockCount: Integer read FLockCount; - public - constructor Create(ADataController: TcxCustomDataController); - destructor Destroy; override; - function Add(AItem: TObject): TcxCustomDataRelation; - procedure Assign(ASource: TcxCustomDataRelationList); - procedure BeginUpdate; - procedure Clear; - function ClearDetailObject(ARecordIndex, ARelationIndex: Integer): Boolean; - procedure EndUpdate; - function FindByItem(AItem: TObject): TcxCustomDataRelation; - function GetDetailObject(ARecordIndex: Integer): TcxDetailObject; - function IsDetailObjectExist(ARecordIndex, ARelationIndex: Integer): Boolean; - function IsEmpty: Boolean; - procedure Move(ACurIndex, ANewIndex: Integer); - procedure RemoveByItem(AItem: TObject); - - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxCustomDataRelation read GetItem; default; - end; - - { TcxCustomDataController } - - { TcxSortingFieldList } - - TcxDataSortOrder = (soNone, soAscending, soDescending); - - TcxDataSortInfo = record - Field: TcxCustomDataField; - SortOrder: TcxDataSortOrder; - end; - PcxDataSortInfo = ^TcxDataSortInfo; - - TcxNoParamsEvent = procedure of object; - - TcxSortingFieldList = class - private - FItems: TList; - FOnChanged: TcxNoParamsEvent; - function GetCount: Integer; - function GetItem(Index: Integer): TcxDataSortInfo; - protected - procedure Add(AField: TcxCustomDataField; ASortOrder: TcxDataSortOrder); - procedure Changed; - procedure Delete(Index: Integer); - function Find(AField: TcxCustomDataField): Integer; - procedure Insert(Index: Integer; AField: TcxCustomDataField; ASortOrder: TcxDataSortOrder); - procedure Move(ACurIndex, ANewIndex: Integer); - procedure Remove(AField: TcxCustomDataField); - procedure SetSortOrder(Index: Integer; ASortOrder: TcxDataSortOrder); - public - constructor Create; - destructor Destroy; override; - procedure AppendFrom(AList: TcxSortingFieldList); - procedure ChangeSorting(AField: TcxCustomDataField; ASortOrder: TcxDataSortOrder); virtual; - procedure CheckField(AField: TcxCustomDataField); - procedure Clear; - function SortIndexByField(AField: TcxCustomDataField): Integer; - function SortOrderByField(AField: TcxCustomDataField): TcxDataSortOrder; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxDataSortInfo read GetItem; default; - property OnChanged: TcxNoParamsEvent read FOnChanged write FOnChanged; - end; - - TcxGroupingFieldList = class(TcxSortingFieldList) - public - procedure ChangeGrouping(AField: TcxCustomDataField; AGroupIndex: Integer); - procedure ChangeSorting(AField: TcxCustomDataField; ASortOrder: TcxDataSortOrder); override; - function GroupIndexByField(AField: TcxCustomDataField): Integer; - procedure UpdateSorting(ASortingFieldList: TcxSortingFieldList); - end; - - { TcxDataGroups } - - TcxDataGroupInfo = class - RowIndex: Integer; - Expanded: Boolean; - Level: Integer; - BeginRecordListIndex: Integer; - EndRecordListIndex: Integer; - SummaryValues: Variant; - end; - - TcxGroupsRowInfo = record - Expanded: Boolean; - Level: Integer; - RecordListIndex: Integer; - end; - - TcxDataGroups = class - private - FFields: TList; - FItems: TList; - - function GetField(Index: Integer): TcxCustomDataField; - function GetFieldCount: Integer; - function GetItem(Index: Integer): TcxDataGroupInfo; - function GetItemCount: Integer; - function GetRowCount: Integer; - function GetRowInfo(ARowIndex: Integer): TcxGroupsRowInfo; - function GetTopVisibleItem(ARowIndex: Integer; var ACurIndex: Integer): TcxDataGroupInfo; - protected - procedure Add(const ADataGroupInfo: TcxDataGroupInfo); - procedure AddField(AField: TcxCustomDataField); - function AddEmpty: TcxDataGroupInfo; - procedure Clear; - function Find(ARowIndex: Integer; var AItem: TcxDataGroupInfo): Integer; - function FindByIndex(ARecordListIndex, ALevel: Integer): Integer; - function IsVisible(AIndex: Integer): Boolean; - function MakeVisible(AIndex: Integer; AExpand: Boolean): Boolean; - - property FieldCount: Integer read GetFieldCount; - property Fields[Index: Integer]: TcxCustomDataField read GetField; - public - constructor Create; - destructor Destroy; override; - procedure ChangeExpanding(ARowIndex: Integer; AExpanded, ARecursive: Boolean); - procedure FullExpanding(AExpanded: Boolean); - function GetChildCount(AIndex: Integer): Integer; - function GetChildIndex(AParentIndex, AIndex: Integer): Integer; - function GetChildRecordListIndex(AParentIndex, AIndex: Integer): Integer; - function GetDataRecordListIndex(AInfo: TcxDataGroupInfo): Integer; - function GetFirstLevelCount: Integer; - function GetFirstLevelIndex(AIndex: Integer): Integer; - function GetIndexByRowIndex(ARowIndex: Integer): Integer; - function GetIndexByRowIndexLevel(ARowIndex, ALevel: Integer): Integer; - function GetLevel(AIndex: Integer): Integer; - function GetParentIndex(AChildIndex: Integer): Integer; - procedure Rebuild; - procedure SetItem(AIndex: Integer; AItem: TcxDataGroupInfo); - - property Count: Integer read GetItemCount; - property Items[Index: Integer]: TcxDataGroupInfo read GetItem; default; - property LevelCount: Integer read GetFieldCount; - property RowInfo[RowIndex: Integer]: TcxGroupsRowInfo read GetRowInfo; - property RowCount: Integer read GetRowCount; - end; - - { TcxCustomDataControllerInfo } - - TcxDataControllerInfoChange = (dcicLoad, dcicGrouping, dcicSorting, - dcicFocusedRow, dcicView, dcicExpanding, dcicResetFocusedRow, dcicSelection, - dcicSummary, dcicFocusedRecord); - TcxDataControllerInfoChanges = set of TcxDataControllerInfoChange; - - TcxRowInfo = record - Expanded: Boolean; - Level: Integer; - RecordIndex: Integer; - end; - - TcxDataFocusingInfo = class - private - FChangedFlag: Boolean; - FDataControllerInfo: TcxCustomDataControllerInfo; - FLevel: Integer; - FPrevNewItemRowFocused: Boolean; - FPrevRecordIndex: Integer; - FRecordIndex: Integer; - FRowIndex: Integer; - protected - procedure Assign(AFocusingInfo: TcxDataFocusingInfo); - procedure Clear; - function IsEqual(AFocusingInfo: TcxDataFocusingInfo): Boolean; - procedure ResetPos; - procedure SavePos; - property Level: Integer read FLevel write FLevel; - property RecordIndex: Integer read FRecordIndex write FRecordIndex; - property RowIndex: Integer read FRowIndex write FRowIndex; - public - constructor Create(ADataControllerInfo: TcxCustomDataControllerInfo); - end; - - TcxDataExpandingInfoState = (eisExpanded, eisSelected); - TcxDataExpandingInfoStateSet = set of TcxDataExpandingInfoState; - - TcxDataExpandingInfo = record - Level: Integer; - Value: Variant; - State: TcxDataExpandingInfoStateSet; - end; - PcxDataExpandingInfo = ^TcxDataExpandingInfo; - - TcxDataExpandingInfos = class - private - FFields: TList; - FItems: TList; - FSaveStates: TcxDataExpandingInfoStateSet; - function Find(AField: TcxCustomDataField): Integer; - function GetCount: Integer; - function GetEmpty: Boolean; - function GetField(Index: Integer): TcxCustomDataField; - function GetFieldCount: Integer; - function GetItem(Index: Integer): PcxDataExpandingInfo; - protected - procedure AddField(AField: TcxCustomDataField); - procedure AddItem(ALevel: Integer; const AValue: Variant; AState: TcxDataExpandingInfoStateSet); - procedure CheckField(AField: TcxCustomDataField); - procedure Clear; - procedure ClearFields; - procedure ClearValues; - public - constructor Create; - destructor Destroy; override; - property Count: Integer read GetCount; - property Empty: Boolean read GetEmpty; - property FieldCount: Integer read GetFieldCount; - property Fields[Index: Integer]: TcxCustomDataField read GetField; - property Items[Index: Integer]: PcxDataExpandingInfo read GetItem; default; - property SaveStates: TcxDataExpandingInfoStateSet read FSaveStates write FSaveStates; - end; - - TcxDataSelectionInfo = record - Level: Integer; - RecordIndex: Integer; // if Level = -1 then RecordIndex is GroupIndex (in DataGroups) - RowIndex: Integer; - end; - PcxDataSelectionInfo = ^TcxDataSelectionInfo; - - TcxDataSelection = class - private - FAnchorRowIndex: Integer; - FDataController: TcxCustomDataController; - FItems: TList; - FFields: TList; - FOnChanged: TcxNoParamsEvent; - function GetCount: Integer; - function GetField(Index: Integer): TcxCustomDataField; - function GetFieldCount: Integer; - function GetItem(Index: Integer): PcxDataSelectionInfo; - protected - procedure Changed; - procedure CheckAfterFiltering; - procedure ClearAnchor; virtual; - procedure InternalAdd(AIndex, ARowIndex, ARecordIndex, ALevel: Integer); virtual; - procedure InternalClear; virtual; - procedure InternalDelete(AIndex: Integer); virtual; - procedure SetInternalCount(ACount: Integer); virtual; - public - constructor Create(ADataController: TcxCustomDataController); virtual; - destructor Destroy; override; - procedure Add(AIndex, ARowIndex, ARecordIndex, ALevel: Integer); virtual; - procedure AddField(AField: TcxCustomDataField); - procedure Clear; - procedure ClearAll; - procedure ClearFields; - procedure Delete(AIndex: Integer); - function FindByGroupIndex(AGroupIndex: Integer): Integer; - function FindByRecordIndex(ARecordIndex: Integer): Integer; - function FindByRowIndex(ARowIndex: Integer; var AIndex: Integer): Boolean; virtual; - function IsRecordSelected(ARecordIndex: Integer): Boolean; - function IsRowSelected(ARowIndex: Integer): Boolean; - procedure Sort; - property Count: Integer read GetCount; - property DataController: TcxCustomDataController read FDataController; - property FieldCount: Integer read GetFieldCount; - property Fields[Index: Integer]: TcxCustomDataField read GetField; - property Items[Index: Integer]: PcxDataSelectionInfo read GetItem; default; - property AnchorRowIndex: Integer read FAnchorRowIndex; - property OnChanged: TcxNoParamsEvent read FOnChanged write FOnChanged; - end; - - TcxDataSelectionClass = class of TcxDataSelection; - - TcxCustomDataControllerInfo = class - private - FChanges: TcxDataControllerInfoChanges; - FDataController: TcxCustomDataController; - FDataGroups: TcxDataGroups; - FExpandingInfo: TcxDataExpandingInfos; - FExpandingFlag: Boolean; - FFocusingFlag: Boolean; - FFocusingInfo: TcxDataFocusingInfo; - FGroupingFieldList: TcxGroupingFieldList; - FInCanFocusedRowChanging: Boolean; - FInfoCalculation: Boolean; - FLockCount: Integer; - FPrevFocusingInfo: TcxDataFocusingInfo; - FRecordList: TList; - FSelection: TcxDataSelection; - FSortingFieldList: TcxSortingFieldList; - FTotalSortingFieldList: TcxSortingFieldList; - procedure CheckAfterCollapsing; - procedure CheckExpanding; - procedure CheckFocusing; - procedure CheckFocusingAfterFilter; - procedure CheckInfo; - procedure ClearInfo; - function CompareRecords(ARecord1, ARecord2: Pointer): Integer; - function GetFocusedRecordIndex: Integer; - function GetFocusedRowIndex: Integer; - function GetNewItemRowFocusingChanged: Boolean; - function GetPrevFocusedRecordIndex: Integer; - function GetPrevFocusedRowIndex: Integer; - procedure SaveInfo; - procedure SetFocusedRowIndex(Value: Integer); - protected - function CanFocusedRowChanging(ARowIndex: Integer): Boolean; - procedure CorrectFocusedRow(ARowIndex: Integer); - procedure DoChangeFocusedRow(AValue: Integer; AIsInternal: Boolean); - procedure DoFilter; - procedure DoGrouping; - procedure DoLoad; - procedure DoSort; - procedure DoBeginSummary; - procedure DoEndSummary; - function FindDataGroup(ARecordListIndex: Integer): Integer; - function FindFocusedRow(ANearest: Boolean): Integer; - procedure ForwardChanges; - function GetInternalRecordCount: Integer; - function GetInternalRecordListIndex(ARecordIndex: Integer): Integer; - function IsAlwaysExpanded: Boolean; - function IsGrouped: Boolean; - function IsSummaryForSelectedRecords: Boolean; - function LocateGroupByLevel(AGroupIndex, ALevel: Integer): Integer; - function LocateDetail(AGroupIndex, ARecordListIndex: Integer; AMakeVisible: Boolean): Integer; - procedure PrepareSorting; - procedure RecalcSelection; - procedure ResetFocusing; - procedure SaveExpanding(ASaveStates: TcxDataExpandingInfoStateSet); - procedure TruncateSelection; virtual; - procedure UnprepareSorting; - procedure Update; virtual; - // Sorting By Summary - procedure DoSortBySummary; - function IsSortingBySummary: Boolean; - - property SortingFieldList: TcxSortingFieldList read FSortingFieldList; - property TotalSortingFieldList: TcxSortingFieldList read FTotalSortingFieldList; - public - constructor Create(ADataController: TcxCustomDataController); virtual; - destructor Destroy; override; - procedure BeginUpdate; - procedure EndUpdate; - procedure CheckChanges; - procedure CheckRowIndex(ARowIndex: Integer); - function GetInternalRecordIndex(ARecordListIndex: Integer): Integer; - procedure Refresh; - procedure RefreshFocused; - procedure RefreshSummary(ARedrawOnly: Boolean); - procedure RefreshView; - // Notify - procedure ExpandingChanged; - procedure FocusedRecordChanged(AChangedFlag: Boolean); - procedure GroupingChanged; - procedure SelectionChanged; - procedure SortingChanged; - // Structure - procedure RemoveField(AField: TcxCustomDataField); - procedure UpdateField(AField: TcxCustomDataField); - // Sorting - procedure ChangeSortIndex(AField: TcxCustomDataField; ASortIndex: Integer); - procedure ChangeSorting(AField: TcxCustomDataField; ASortOrder: TcxDataSortOrder); - procedure ClearSorting(AKeepGroupedItems: Boolean); - // Grouping - procedure ChangeExpanding(ARowIndex: Integer; AExpanded, ARecursive: Boolean); - procedure ChangeGrouping(AField: TcxCustomDataField; AGroupIndex: Integer); - procedure ClearGrouping; - function CompareGroupRecords(ARecordIndex1, ARecordIndex2, AIndex: Integer): Integer; - procedure FullCollapse; - procedure FullExpand; - property DataGroups: TcxDataGroups read FDataGroups; - property GroupingFieldList: TcxGroupingFieldList read FGroupingFieldList; - // View Data - function GetNearestRowIndex(ARowIndex: Integer): Integer; - function GetRowCount: Integer; - function GetRowIndexByRecordIndex(ARecordIndex: Integer; AMakeVisible: Boolean): Integer; - function GetRowInfo(ARowIndex: Integer): TcxRowInfo; - // Selection - procedure ChangeRowSelection(ARowIndex: Integer; ASelection: Boolean); - procedure ClearSelection; - procedure ClearSelectionAnchor; - function GetSelectedCount: Integer; - function GetSelectedRowIndex(Index: Integer): Integer; - function IsRowSelected(ARowIndex: Integer): Boolean; - property Selection: TcxDataSelection read FSelection; - // Navigation - property FocusedRecordIndex: Integer read GetFocusedRecordIndex; - property FocusedRowIndex: Integer read GetFocusedRowIndex write SetFocusedRowIndex; - property NewItemRowFocusingChanged: Boolean read GetNewItemRowFocusingChanged; - property PrevFocusedRecordIndex: Integer read GetPrevFocusedRecordIndex; - property PrevFocusedRowIndex: Integer read GetPrevFocusedRowIndex; - - property DataController: TcxCustomDataController read FDataController; - property LockCount: Integer read FLockCount; - end; - - { Filter } - - TcxDataFilterCriteriaItem = class(TcxFilterCriteriaItem) - private - function GetDataController: TcxCustomDataController; - function GetField: TcxCustomDataField; - protected - function GetDataValue(AData: TObject): Variant; override; - function GetFieldCaption: string; override; - function GetFieldName: string; override; - function GetItemLink: TObject; override; - procedure SetItemLink(Value: TObject); override; - public - property DataController: TcxCustomDataController read GetDataController; - property Field: TcxCustomDataField read GetField; - end; - - TcxDataFilterValueList = class(TcxFilterValueList) - private - function GetDataController: TcxCustomDataController; - public - procedure Load(AItemIndex: Integer; AInitSortByDisplayText: Boolean = True; - AUseFilteredValues: Boolean = False); virtual; - property DataController: TcxCustomDataController read GetDataController; - end; - - TcxDataFilterGetValueListEvent = procedure(Sender: TcxFilterCriteria; - AItemIndex: Integer; AValueList: TcxDataFilterValueList) of object; - - TcxDataFilterCriteria = class(TcxFilterCriteria) - private - FActive: Boolean; - FDataController: TcxCustomDataController; - FDestroying: Boolean; - FOnGetValueList: TcxDataFilterGetValueListEvent; - procedure SetActive(Value: Boolean); - protected - procedure DefineProperties(Filer: TFiler); override; - function DoFilterRecord(ARecordIndex: Integer): Boolean; - function GetIDByItemLink(AItemLink: TObject): Integer; override; - function GetNameByItemLink(AItemLink: TObject): string; override; - function GetItemClass: TcxFilterCriteriaItemClass; override; - function GetItemLinkByID(AID: Integer): TObject; override; - function GetItemLinkByName(const AName: string): TObject; override; - function GetValueListClass: TcxFilterValueListClass; override; - function IsDestroying: Boolean; - function IsInternal: Boolean; - function IsLoading: Boolean; - procedure Update; override; - property Destroying: Boolean read FDestroying; - public - constructor Create(ADataController: TcxCustomDataController); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent; AIgnoreItemNames: Boolean = False); override; - procedure AssignEvents(Source: TPersistent); override; - function CreateValueList: TcxDataFilterValueList; virtual; - function FindItemByItemLink(AItemLink: TObject): TcxFilterCriteriaItem; override; - function IsFiltering: Boolean; virtual; - procedure RemoveItemByField(AField: TcxCustomDataField); - property DataController: TcxCustomDataController read FDataController; - published - property Active: Boolean read FActive write SetActive default False; - property OnGetValueList: TcxDataFilterGetValueListEvent read FOnGetValueList write FOnGetValueList; - end; - - TcxDataFilterCriteriaClass = class of TcxDataFilterCriteria; - - { Filters } - - TcxDataFilterList = class(TList) - private - function GetItem(Index: Integer): TcxDataFilterCriteria; - protected - procedure RemoveItemByField(AField: TcxCustomDataField); - public - procedure Clear; override; - property Items[Index: Integer]: TcxDataFilterCriteria read GetItem; default; - end; - - { Groups } - - TcxDataGroupIndex = Integer; - - TcxDataControllerGroups = class - private - FDataController: TcxCustomDataController; - function GetChildCount(DataGroupIndex: TcxDataGroupIndex): Integer; - function GetChildDataGroupIndex(ParentDataGroupIndex: TcxDataGroupIndex; ChildIndex: Integer): TcxDataGroupIndex; - function GetChildRecordIndex(ParentDataGroupIndex: TcxDataGroupIndex; ChildIndex: Integer): Integer; - function GetDataControllerInfo: TcxCustomDataControllerInfo; - function GetDataGroupIndexByRowIndex(RowIndex: Integer): TcxDataGroupIndex; - function GetDataGroups: TcxDataGroups; - function GetFieldGroupIndex(AField: TcxCustomDataField): Integer; - function GetGroupingItemCount: Integer; - function GetGroupingItemIndex(Index: Integer): Integer; - function GetGroupDisplayText(ADataGroupIndex: TcxDataGroupIndex): string; - function GetGroupValue(ADataGroupIndex: TcxDataGroupIndex): Variant; - function GetItemGroupIndex(AItemIndex: Integer): Integer; - function GetLevel(ADataGroupIndex: TcxDataGroupIndex): Integer; - function GetParentDataGroupIndex(ChildDataGroupIndex: TcxDataGroupIndex): TcxDataGroupIndex; - protected - function GetGroupRecordIndex(ADataGroupIndex: TcxDataGroupIndex): Integer; - property DataControllerInfo: TcxCustomDataControllerInfo read GetDataControllerInfo; - property DataGroups: TcxDataGroups read GetDataGroups; - property LevelCount: Integer read GetGroupingItemCount; - public - constructor Create(ADataController: TcxCustomDataController); - procedure ChangeExpanding(ARowIndex: Integer; AExpanded, ARecursive: Boolean); - procedure ChangeGrouping(AItemIndex, AGroupIndex: Integer); - procedure ClearGrouping; - procedure FullCollapse; - procedure FullExpand; - function GetDataGroupIndexByGroupValue(AParentDataGroupIndex: TcxDataGroupIndex; - const AGroupValue: Variant): TcxDataGroupIndex; - function HasAsParent(ARowIndex, AParentRowIndex: Integer): Boolean; - procedure LoadRecordIndexes(AList: TList; ADataGroupIndex: TcxDataGroupIndex); - procedure LoadRecordIndexesByRowIndex(AList: TList; ARowIndex: Integer); - - property DataController: TcxCustomDataController read FDataController; - // Grouping - property FieldGroupIndex[AField: TcxCustomDataField]: Integer read GetFieldGroupIndex; - property GroupingItemCount: Integer read GetGroupingItemCount; - property GroupingItemIndex[Index: Integer]: Integer read GetGroupingItemIndex; - property ItemGroupIndex[ItemIndex: Integer]: Integer read GetItemGroupIndex; - // Navigation - property DataGroupIndexByRowIndex[RowIndex: Integer]: TcxDataGroupIndex read GetDataGroupIndexByRowIndex; - property Level[ADataGroupIndex: TcxDataGroupIndex]: Integer read GetLevel; - property ChildCount[DataGroupIndex: TcxDataGroupIndex]: Integer read GetChildCount; // for Level = 0 DataGroupIndex = -1 - property ChildDataGroupIndex[ParentDataGroupIndex: TcxDataGroupIndex; ChildIndex: Integer]: TcxDataGroupIndex read GetChildDataGroupIndex; - property ChildRecordIndex[ParentDataGroupIndex: TcxDataGroupIndex; ChildIndex: Integer]: Integer read GetChildRecordIndex; - property ParentDataGroupIndex[ChildDataGroupIndex: TcxDataGroupIndex]: TcxDataGroupIndex read GetParentDataGroupIndex; - // Values - property GroupDisplayTexts[ADataGroupIndex: TcxDataGroupIndex]: string read GetGroupDisplayText; - property GroupValues[ADataGroupIndex: TcxDataGroupIndex]: Variant read GetGroupValue; - end; - - { Summary } - - TcxSummaryKind = (skNone, skSum, skMin, skMax, skCount, skAverage); - TcxSummaryKinds = set of TcxSummaryKind; - TcxSummaryValueType = (svtFloat, svtCurrency, svtDate); - - TcxCustomDataSummaryItem = class(TCollectionItem) - private - FField: TcxCustomDataField; - FFormat: string; - FKind: TcxSummaryKind; - function GetItemLink: TObject; - procedure SetFormat(const Value: string); - procedure SetItemLink(Value: TObject); - procedure SetKind(Value: TcxSummaryKind); - protected - procedure AssignValues(ASource: TcxCustomDataSummaryItem); virtual; - function GetDataController: TcxCustomDataController; virtual; abstract; - function GetValueFormat(AValueType: TcxSummaryValueType; const AValue: Variant; - AIsFooter: Boolean): string; virtual; - function GetValueType(AVarType: TVarType): TcxSummaryValueType; - function IsCurrency(AVarType: TVarType): Boolean; virtual; - procedure ItemLinkChanging(AField: TcxCustomDataField); virtual; - property Format: string read FFormat write SetFormat; - property Kind: TcxSummaryKind read FKind write SetKind default skNone; - public - procedure Assign(Source: TPersistent); override; - procedure BeginUpdate; - procedure EndUpdate; - function FormatValue(const AValue: Variant; AIsFooter: Boolean): string; virtual; - property DataController: TcxCustomDataController read GetDataController; - property ItemLink: TObject read GetItemLink write SetItemLink; - property Field: TcxCustomDataField read FField; - end; - - TcxSummaryOption = (soNullIgnore, soSelectedRecords, soMultipleSelectedRecords); - TcxSummaryOptions = set of TcxSummaryOption; - TcxSummaryPosition = (spGroup, spFooter); - - TcxSummaryProperty = (spFormat, spKind, spSorted); - TcxSummaryProperties = set of TcxSummaryProperty; - - TcxDataSummaryItemGetTextEvent = procedure(Sender: TcxDataSummaryItem; - const AValue: Variant; AIsFooter: Boolean; var AText: string) of object; - - TcxDataSummaryItem = class(TcxCustomDataSummaryItem) - private - FSorted: Boolean; - FOnGetText: TcxDataSummaryItemGetTextEvent; - function GetPosition: TcxSummaryPosition; - function GetSummaryItems: TcxDataSummaryItems; - procedure SetPosition(Value: TcxSummaryPosition); - procedure SetSorted(Value: Boolean); - protected - FPosition: TcxSummaryPosition; - procedure AssignValues(Source: TcxCustomDataSummaryItem); override; - function GetDataController: TcxCustomDataController; override; - function GetValueFormat(AValueType: TcxSummaryValueType; const AValue: Variant; - AIsFooter: Boolean): string; override; - function IsDataBinded: Boolean; virtual; - function IsPositionStored: Boolean; virtual; - public - destructor Destroy; override; - function DataField: TcxCustomDataField; virtual; - function FormatValue(const AValue: Variant; AIsFooter: Boolean): string; override; - property DataController: TcxCustomDataController read GetDataController; - property SummaryItems: TcxDataSummaryItems read GetSummaryItems; - property Sorted: Boolean read FSorted write SetSorted default False; - published - property Format; - property Kind; - property Position: TcxSummaryPosition read GetPosition write SetPosition stored IsPositionStored; - property OnGetText: TcxDataSummaryItemGetTextEvent read FOnGetText write FOnGetText; - end; - - TcxDataSummaryItemClass = class of TcxDataSummaryItem; - - TcxSummaryEventArguments = record - RecordIndex: Integer; - SummaryItem: TcxDataSummaryItem; - end; - - TcxSummaryEventOutArguments = record - Value: Variant; - SummaryValue: Variant; - CountValue: Integer; - Done: Boolean; - end; - - TcxSummaryEvent = procedure(ASender: TcxDataSummaryItems; - Arguments: TcxSummaryEventArguments; - var OutArguments: TcxSummaryEventOutArguments) of object; - - TcxDataSummaryItems = class(TcxCollection) - private - FSummary: TcxDataSummary; - FOnSummary: TcxSummaryEvent; - function GetDataController: TcxCustomDataController; - function GetItem(Index: Integer): TcxDataSummaryItem; - procedure SetItem(Index: Integer; Value: TcxDataSummaryItem); - protected - procedure BeforeSortingChange(AItem: TcxDataSummaryItem; AValue: Boolean); virtual; - procedure ChangedView; - function GetItemPosition(AItem: TcxDataSummaryItem): TcxSummaryPosition; virtual; - function GetOwner: TPersistent; override; - function IndexOfField(AField: TcxCustomDataField): Integer; - function IsPositionStored(AItem: TcxDataSummaryItem): Boolean; virtual; - function ItemOfField(AField: TcxCustomDataField): TcxDataSummaryItem; - procedure Update(Item: TCollectionItem); override; - // simple summary routines - function AddDataItem(AItemIndex: Integer; APosition: TcxSummaryPosition): TcxDataSummaryItem; - procedure CheckItemEmpty(AItem: TcxDataSummaryItem); - procedure GetDataItemProperties(AItemIndex: Integer; APosition: TcxSummaryPosition; - AProperties: TcxSummaryProperties; var AFormat: string; var AKind: TcxSummaryKind; - var ASorted: Boolean); - function IsPropertiesEmpty(AProperties: TcxSummaryProperties; const AFormat: string; - AKind: TcxSummaryKind; ASorted: Boolean): Boolean; virtual; - procedure SetDataItemProperties(AItemIndex: Integer; APosition: TcxSummaryPosition; - AProperties: TcxSummaryProperties; const AFormat: string; AKind: TcxSummaryKind; - ASorted: Boolean); - procedure SetItemProperties(AItem: TcxDataSummaryItem; APosition: TcxSummaryPosition; - AProperties: TcxSummaryProperties; const AFormat: string; AKind: TcxSummaryKind; - ASorted: Boolean); - public - constructor Create(ASummary: TcxDataSummary; AItemClass: TcxDataSummaryItemClass); virtual; - function Add: TcxDataSummaryItem; overload; - function Add(AItemLink: TObject; APosition: TcxSummaryPosition; - AKind: TcxSummaryKind; const AFormat: string = ''): TcxDataSummaryItem; overload; - procedure Assign(Source: TPersistent); override; - procedure AssignEvents(Source: TPersistent); virtual; - function DefaultFormat(AValueType: TcxSummaryValueType; ASummaryKind: TcxSummaryKind; AIsFooter: Boolean): string; virtual; - procedure DeleteItems(AItemLink: TObject; APosition: TcxSummaryPosition); - function GetGroupText(const ASummaryValues: Variant): string; virtual; - function IndexOf(AItem: TcxDataSummaryItem): Integer; - function IndexOfItemLink(AItemLink: TObject): Integer; - function ItemOfItemLink(AItemLink: TObject): TcxDataSummaryItem; - // simple summary - function GetDataItem(AItemIndex: Integer; APosition: TcxSummaryPosition; - ACheckKind: Boolean = False; AKind: TcxSummaryKind = skNone): TcxDataSummaryItem; virtual; - function GetDataItemFormat(AItemIndex: Integer; APosition: TcxSummaryPosition): string; - function GetDataItemKind(AItemIndex: Integer; APosition: TcxSummaryPosition): TcxSummaryKind; - function GetDataItemSorted(AItemIndex: Integer; APosition: TcxSummaryPosition): Boolean; - procedure SetDataItemFormat(AItemIndex: Integer; APosition: TcxSummaryPosition; const Value: string); - procedure SetDataItemKind(AItemIndex: Integer; APosition: TcxSummaryPosition; Value: TcxSummaryKind); - procedure SetDataItemSorted(AItemIndex: Integer; APosition: TcxSummaryPosition; Value: Boolean); - - property DataController: TcxCustomDataController read GetDataController; - property Items[Index: Integer]: TcxDataSummaryItem read GetItem write SetItem; default; - property Summary: TcxDataSummary read FSummary; - published - property OnSummary: TcxSummaryEvent read FOnSummary write FOnSummary; - end; - - TcxDataFooterSummaryItems = class(TcxDataSummaryItems) - protected - function GetItemPosition(AItem: TcxDataSummaryItem): TcxSummaryPosition; override; - function IsPositionStored(AItem: TcxDataSummaryItem): Boolean; override; - end; - - TcxDataGroupSummaryItems = class(TcxDataSummaryItems) - private - FBeginText: string; - FEndText: string; - FSeparator: string; - FOwner: TPersistent; - function IsBeginTextStored: Boolean; - function IsEndTextStored: Boolean; - function IsSeparatorStored: Boolean; - procedure SetBeginText(const Value: string); - procedure SetEndText(const Value: string); - procedure SetSeparator(const Value: string); - protected - procedure BeforeSortingChange(AItem: TcxDataSummaryItem; AValue: Boolean); override; - function GetOwner: TPersistent; override; - public - constructor Create(ASummary: TcxDataSummary; AItemClass: TcxDataSummaryItemClass); override; - procedure Assign(Source: TPersistent); override; - function GetGroupText(const ASummaryValues: Variant): string; override; - function SortedSummaryItem: TcxDataSummaryItem; - published - property BeginText: string read FBeginText write SetBeginText stored IsBeginTextStored; - property EndText: string read FEndText write SetEndText stored IsEndTextStored; - property Separator: string read FSeparator write SetSeparator stored IsSeparatorStored; - end; - - TcxDataSummaryGroupItemLink = class(TcxCustomDataSummaryItem) - private - function GetSummaryGroupItemLinks: TcxDataSummaryGroupItemLinks; - protected - function GetDataController: TcxCustomDataController; override; - procedure ItemLinkChanging(AField: TcxCustomDataField); override; - public - property SummaryGroupItemLinks: TcxDataSummaryGroupItemLinks read GetSummaryGroupItemLinks; - end; - - TcxDataSummaryGroupItemLinkClass = class of TcxDataSummaryGroupItemLink; - - TcxDataSummaryGroupItemLinks = class(TcxCollection) - private - FSummaryGroup: TcxDataSummaryGroup; - function GetItem(Index: Integer): TcxDataSummaryGroupItemLink; - procedure SetItem(Index: Integer; Value: TcxDataSummaryGroupItemLink); - protected - function GetOwner: TPersistent; override; - function IndexOfField(AField: TcxCustomDataField): Integer; - function ItemOfField(AField: TcxCustomDataField): TcxDataSummaryGroupItemLink; - procedure Update(Item: TCollectionItem); override; - public - constructor Create(ASummaryGroup: TcxDataSummaryGroup; AItemClass: TcxDataSummaryGroupItemLinkClass); virtual; - function Add: TcxDataSummaryGroupItemLink; - function IndexOfItemLink(AItemLink: TObject): Integer; - function ItemOfItemLink(AItemLink: TObject): TcxDataSummaryGroupItemLink; - property Items[Index: Integer]: TcxDataSummaryGroupItemLink read GetItem write SetItem; default; - property SummaryGroup: TcxDataSummaryGroup read FSummaryGroup; - end; - - TcxDataSummaryGroup = class(TCollectionItem) - private - FItemLinks: TcxDataSummaryGroupItemLinks; - FSummaryItems: TcxDataGroupSummaryItems; - function GetItemLinks: TcxDataSummaryGroupItemLinks; - function GetSummaryGroups: TcxDataSummaryGroups; - procedure SetItemLinks(Value: TcxDataSummaryGroupItemLinks); - procedure SetSummaryItems(Value: TcxDataGroupSummaryItems); - public - constructor Create(Collection: TCollection); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - property SummaryGroups: TcxDataSummaryGroups read GetSummaryGroups; - published - property Links: TcxDataSummaryGroupItemLinks read GetItemLinks write SetItemLinks; - property SummaryItems: TcxDataGroupSummaryItems read FSummaryItems write SetSummaryItems; - end; - - TcxDataSummaryGroups = class(TcxCollection) - private - FSummary: TcxDataSummary; - function GetItem(Index: Integer): TcxDataSummaryGroup; - procedure SetItem(Index: Integer; Value: TcxDataSummaryGroup); - protected - function GetOwner: TPersistent; override; - procedure Update(Item: TCollectionItem); override; - public - constructor Create(ASummary: TcxDataSummary); - function Add: TcxDataSummaryGroup; - function FindByItemLink(AItemLink: TObject): TcxDataSummaryGroup; - property Summary: TcxDataSummary read FSummary; - property Items[Index: Integer]: TcxDataSummaryGroup read GetItem write SetItem; default; - end; - - TcxAfterSummaryEvent = procedure(ASender: TcxDataSummary) of object; - - TcxDataSummary = class(TPersistent) - private - FDataController: TcxCustomDataController; - FDefaultGroupSummaryItems: TcxDataGroupSummaryItems; - FDestroying: Boolean; - FFooterSummaryItems: TcxDataFooterSummaryItems; - FFooterSummaryValues: Variant; // array of Variant - FInAfterSummary: Boolean; - FLockCount: Integer; - FOptions: TcxSummaryOptions; - FSetCustomSummary: Boolean; - FSummaryGroups: TcxDataSummaryGroups; - FOnAfterSummary: TcxAfterSummaryEvent; - function GetFooterSummaryValue(Index: Integer): Variant; - function GetFooterSummaryText(Index: Integer): string; - function GetGroupSummaryItems(Level: Integer): TcxDataGroupSummaryItems; - function GetGroupSummaryText(RowIndex: Integer): string; - function GetGroupSummaryDisplayValue(RowIndex, Level, Index: Integer): Variant; - function GetGroupSummaryValue(DataGroupIndex: TcxDataGroupIndex; Index: Integer): Variant; - function GetGroupFooterIndexOfItemLink(Level: Integer; ItemLink: TObject): Integer; - function GetGroupFooterSummaryText(RowIndex, Level, Index: Integer): string; - function GetOptions: TcxSummaryOptions; - procedure SetDefaultGroupSummaryItems(Value: TcxDataGroupSummaryItems); - procedure SetFooterSummaryItems(Value: TcxDataFooterSummaryItems); - procedure SetFooterSummaryValue(Index: Integer; Value: Variant); - procedure SetGroupSummaryDisplayValue(RowIndex, Level, Index: Integer; const Value: Variant); - procedure SetGroupSummaryValue(DataGroupIndex: TcxDataGroupIndex; Index: Integer; const Value: Variant); - procedure SetOptions(Value: TcxSummaryOptions); - procedure SetSummaryGroups(Value: TcxDataSummaryGroups); - protected - procedure BeginCalculateSummary(ASummaryItems: TcxDataSummaryItems; - var ACountValues: TcxDataSummaryCountValues; var ASummaryValues: TcxDataSummaryValues); virtual; - procedure CalculateSummary(ASummaryItems: TcxDataSummaryItems; - ABeginIndex, AEndIndex: Integer; var ACountValues: TcxDataSummaryCountValues; - var ASummaryValues: TcxDataSummaryValues; var SummaryValues: Variant); virtual; - procedure Changed(ARedrawOnly: Boolean); virtual; - procedure DoAfterSummary; virtual; - procedure DoFinishSummaryValue(ASummaryItem: TcxDataSummaryItem; - var SummaryValue: Variant; var CountValue: Integer); virtual; - procedure DoSummaryValue(ASummaryItem: TcxDataSummaryItem; ARecordIndex: Integer; - var SummaryValue: Variant; var CountValue: Integer); virtual; - procedure EndCalculateSummary(ASummaryItems: TcxDataSummaryItems; - var ACountValues: TcxDataSummaryCountValues; var ASummaryValues: TcxDataSummaryValues; - var SummaryValues: Variant); virtual; - function GetGroupSummaryValues(ADataGroupIndex: TcxDataGroupIndex): PVariant; - function GetOwner: TPersistent; override; - function GetRecordIndex(ARecordListIndex: Integer): Integer; virtual; - function GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; virtual; - function GetSummaryItemClass: TcxDataSummaryItemClass; virtual; - function IsValidSummaryValuesIndex(const ASummaryValues: Variant; AIndex: Integer): Boolean; virtual; - procedure Update(ARedrawOnly: Boolean); virtual; - property Destroying: Boolean read FDestroying; - property LockCount: Integer read FLockCount; - public - constructor Create(ADataController: TcxCustomDataController); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure AssignEvents(Source: TPersistent); virtual; - procedure BeginUpdate; - procedure BeginCalculate; virtual; - procedure EndCalculate; virtual; - procedure Calculate; virtual; - procedure CalculateFooterSummary; virtual; - procedure CalculateGroupSummary; virtual; - procedure CancelUpdate; - procedure EndUpdate; - function GetGroupSummaryInfo(ARowIndex: Integer; var ASummaryItems: TcxDataSummaryItems; - var ASummaryValues: PVariant): Boolean; - function GetPatternSummaryItems(APatternSummary: TcxDataSummary; ASummaryItems: TcxDataSummaryItems): TcxDataSummaryItems; - procedure Recalculate; - procedure RemoveItemByField(AField: TcxCustomDataField); - - property DataController: TcxCustomDataController read FDataController; - property FooterSummaryValues[Index: Integer]: Variant read GetFooterSummaryValue write SetFooterSummaryValue; - property FooterSummaryTexts[Index: Integer]: string read GetFooterSummaryText; - property GroupFooterIndexOfItemLink[Level: Integer; ItemLink: TObject]: Integer read GetGroupFooterIndexOfItemLink; - property GroupSummaryItems[Level: Integer]: TcxDataGroupSummaryItems read GetGroupSummaryItems; - // only for View - property GroupFooterSummaryTexts[RowIndex, Level, Index: Integer]: string read GetGroupFooterSummaryText; - property GroupSummaryText[RowIndex: Integer]: string read GetGroupSummaryText; - property GroupSummaryDisplayValues[RowIndex, Level, Index: Integer]: Variant read GetGroupSummaryDisplayValue write SetGroupSummaryDisplayValue; - // summary group values - property GroupSummaryValues[DataGroupIndex: TcxDataGroupIndex; Index: Integer]: Variant read GetGroupSummaryValue write SetGroupSummaryValue; - published - property DefaultGroupSummaryItems: TcxDataGroupSummaryItems read FDefaultGroupSummaryItems write SetDefaultGroupSummaryItems; - property FooterSummaryItems: TcxDataFooterSummaryItems read FFooterSummaryItems write SetFooterSummaryItems; - property SummaryGroups: TcxDataSummaryGroups read FSummaryGroups write SetSummaryGroups; - property Options: TcxSummaryOptions read GetOptions write SetOptions default []; - property OnAfterSummary: TcxAfterSummaryEvent read FOnAfterSummary write FOnAfterSummary; - end; - - TcxDataSummaryClass = class of TcxDataSummary; - - { Incremental Search } - - TcxDataControllerSearch = class - private - FDataController: TcxCustomDataController; - FLocked: Boolean; - function GetItemIndex: Integer; - function GetSearching: Boolean; - function GetSearchText: string; - procedure SetItemIndex(const Value: Integer); - protected - procedure DoFocusedRecord(AFilteredRecordIndex: Integer); virtual; - function DoSearch(AStartFilteredRecordIndex, AEndFilteredRecordIndex: Integer; - const ASubText: string; AForward: Boolean): Integer; virtual; - public - constructor Create(ADataController: TcxCustomDataController); virtual; - procedure Cancel; - function Locate(AItemIndex: Integer; const ASubText: string): Boolean; virtual; - function LocateNext(AForward: Boolean): Boolean; virtual; - procedure Lock; virtual; - procedure Unlock; virtual; - property DataController: TcxCustomDataController read FDataController; - property ItemIndex: Integer read GetItemIndex write SetItemIndex; - property Locked: Boolean read FLocked; - property Searching: Boolean read GetSearching; - property SearchText: string read GetSearchText; - end; - - TcxDataControllerSearchClass = class of TcxDataControllerSearch; - - { TcxCustomDataController } - // Changing Notification - - TcxDataControllerChange = (dccLayout, dccData, dccFocus, dccSelection, - dccDetail, dccSummary, dccSearch, dccSorting, dccGrouping, dccSyncMasterPos, - dccBookmark, dccUpdateRecord); - TcxDataControllerChanges = set of TcxDataControllerChange; - - TcxUpdateControlInfo = class - end; - - TcxUpdateControlInfoClass = class of TcxUpdateControlInfo; - - TcxFocusedRecordChangedInfo = class(TcxUpdateControlInfo) - private - FFocusedRecordIndex: Integer; - FPrevFocusedRecordIndex: Integer; - FFocusedRowIndex: Integer; - FPrevFocusedRowIndex: Integer; - FNewItemRowFocusingChanged: Boolean; - public - constructor Create(APrevFocusedRecordIndex, AFocusedRecordIndex, APrevFocusedRowIndex, AFocusedRowIndex: Integer; - ANewItemRowFocusingChanged: Boolean); - property FocusedRecordIndex: Integer read FFocusedRecordIndex; - property PrevFocusedRecordIndex: Integer read FPrevFocusedRecordIndex; - property FocusedRowIndex: Integer read FFocusedRowIndex; - property PrevFocusedRowIndex: Integer read FPrevFocusedRowIndex; - property NewItemRowFocusingChanged: Boolean read FNewItemRowFocusingChanged; - end; - - TcxFocusedRowChangedInfo = class(TcxUpdateControlInfo) - private - FFocusedRowIndex: Integer; - FPrevFocusedRowIndex: Integer; - public - constructor Create(APrevFocusedRowIndex, AFocusedRowIndex: Integer); - property FocusedRowIndex: Integer read FFocusedRowIndex; - property PrevFocusedRowIndex: Integer read FPrevFocusedRowIndex; - end; - - TcxGroupingChangingInfo = class(TcxUpdateControlInfo); - - TcxLayoutChangedInfo = class(TcxUpdateControlInfo) - { RowCount has not been changed } - end; - - TcxUpdateRecordInfo = class(TcxUpdateControlInfo) { Record is changed } - private - FRecordIndex: Integer; - public - constructor Create(ARecordIndex: Integer); - property RecordIndex: Integer read FRecordIndex; - end; - - TcxDataChangedInfo = class(TcxUpdateControlInfo) - { RowCount has been changed; Grouping/Expanding changed } - Kind: TcxDataChange; - ItemIndex: Integer; // Kind = dcField - RecordIndex: Integer; // Kind = dcRecord - end; - - TcxBookmarkChangedInfo = class(TcxUpdateControlInfo) - end; - - TcxSelectionChangedInfo = class(TcxUpdateControlInfo) - private - FRowIndexes: TList; - function GetCount: Integer; - function GetRowIndex(Index: Integer): Integer; - public - constructor Create; - constructor CreateEx(ARowIndex1, ARowIndex2: Integer); - destructor Destroy; override; - property Count: Integer read GetCount; - property RowIndexes[Index: Integer]: Integer read GetRowIndex; - end; - - TcxSearchChangedInfo = class(TcxUpdateControlInfo) - end; - - TcxDataSelectionChangedInfo = record - SelectedCount: Integer; - RowIndex: Integer; - end; - - TcxUpdateControlEvent = procedure(AInfo: TcxUpdateControlInfo) of object; - - TcxDataControllerLocateObject = class - private - FDataController: TcxCustomDataController; - FInternalRecordIndex: Integer; - protected - property DataController: TcxCustomDataController read FDataController; - property InternalRecordIndex: Integer read FInternalRecordIndex; - public - constructor Create(ADataController: TcxCustomDataController); virtual; - destructor Destroy; override; - procedure Clear; virtual; - function FindRecordIndex: Integer; virtual; abstract; - procedure ReadData(AValueDefReader: TcxValueDefReader); - end; - - TcxDataControllerKeyLocateObject = class(TcxDataControllerLocateObject) - private - FFields: TList; - public - constructor Create(ADataController: TcxCustomDataController); override; - destructor Destroy; override; - procedure AddField(AField: TcxCustomDataField); - procedure ClearFields; - function FindRecordIndex: Integer; override; - property FieldList: TList read FFields; - end; - - TcxDataControllerGroupLocateObject = class(TcxDataControllerLocateObject) - private - FIsGroupDataSorted: Boolean; - FLevel: Integer; - public - constructor Create(ADataController: TcxCustomDataController); override; - function FindRecordIndex: Integer; override; - property Level: Integer read FLevel write FLevel; - end; - - TcxValueDefUnboundReader = class(TcxValueDefReader) - private - FItems: TList; - FValues: TList; - public - constructor Create; override; - destructor Destroy; override; - procedure Clear; - function GetValue(AValueDef: TcxValueDef): Variant; override; - function IsInternal(AValueDef: TcxValueDef): Boolean; override; - procedure SetValue(AValueDef: TcxValueDef; const AValue: Variant); - procedure Truncate(AItemCount: Integer); - end; - - TcxValueDefRecordReader = class(TcxValueDefReader) - private - FDataController: TcxCustomDataController; - FRecordIndex: Integer; - public - constructor Create(ADataController: TcxCustomDataController; ARecordIndex: Integer); reintroduce; - function GetDisplayText(AValueDef: TcxValueDef): string; override; - function GetValue(AValueDef: TcxValueDef): Variant; override; - function IsInternal(AValueDef: TcxValueDef): Boolean; override; - end; - - TcxDataControllerComparisonMode = (dccmSorting, dccmGrouping, dccmOther); - - // Detail Mode - TcxDataControllerDetailMode = (dcdmNone, dcdmPattern, dcdmClone); - - TcxDataControllerEachDetailProc = procedure(ADataController: TcxCustomDataController) of object; - TcxDataControllerEachRowProc = procedure(ARowIndex: Integer; ARowInfo: TcxRowInfo) of object; - - TcxDataControllerNotifier = class(TComponent) // because TcxCustomDataController is TPersistent - private - FDataController: TcxCustomDataController; - protected - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - public - constructor Create(AOwner: TComponent; ADataController: TcxCustomDataController); reintroduce; - property DataController: TcxCustomDataController read FDataController; - end; - - TcxSortingBySummaryEngineClass = class of TcxSortingBySummaryEngine; - - TcxSortingBySummaryEngine = class - private - FDataControllerInfo: TcxCustomDataControllerInfo; - function GetDataController: TcxCustomDataController; - protected - property DataController: TcxCustomDataController read GetDataController; - public - constructor Create(ADataControllerInfo: TcxCustomDataControllerInfo); virtual; - procedure Sort; virtual; abstract; - property DataControllerInfo: TcxCustomDataControllerInfo read FDataControllerInfo; - end; - - TcxDataControllerCompareEvent = procedure(ADataController: TcxCustomDataController; - ARecordIndex1, ARecordIndex2, AItemIndex: Integer; const V1, V2: Variant; - var Compare: Integer) of object; - - TcxDataRecordChangedEvent = procedure(ADataController: TcxCustomDataController; - ARecordIndex, AItemIndex: Integer) of object; - TcxDataControllerNotifyEvent = procedure(ADataController: TcxCustomDataController) of object; - - TcxDataDetailExpandingEvent = procedure(ADataController: TcxCustomDataController; - ARecordIndex: Integer; var AAllow: Boolean) of object; - TcxDataDetailExpandedEvent = procedure(ADataController: TcxCustomDataController; - ARecordIndex: Integer) of object; - TcxDataRecordNotifyEvent = TcxDataDetailExpandedEvent; - - TcxDataControllerOption = (dcoAnsiSort, dcoCaseInsensitive, dcoAssignGroupingValues, - dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoSortByDisplayText, - dcoFocusTopRowAfterSorting, dcoGroupsAlwaysExpanded, dcoImmediatePost, - dcoInsertOnNewItemRowFocusing); - TcxDataControllerOptions = set of TcxDataControllerOption; - - TcxDataControllerEditKind = (dceInsert, dceEdit, dceChanging, dceModified); - TcxDataControllerEditState = set of TcxDataControllerEditKind; - - TcxDataControllerEditOperation = (dceoAppend, dceoDelete, dceoEdit, dceoInsert, - dceoShowEdit); - TcxDataControllerEditOperations = set of TcxDataControllerEditOperation; - - TcxDataListenerLink = class - Ref: TcxCustomDataController; - end; - - TcxDataFilterRecordEvent = procedure(ADataController: TcxCustomDataController; - ARecordIndex: Integer; var Accept: Boolean) of object; - - TcxCustomDataController = class(TPersistent, IUnknown) - private - FActive: Boolean; - FAfterSummaryFlag: Boolean; - FBookmarkRecordIndex: Integer; - FDataChangedFlag: Boolean; - FDataChangedLockCount: Integer; -// FDataChangeInfo: TcxDataChangeInfo; - FChanges: TcxDataControllerChanges; - FCheckFocusingAfterFilterNeeded: Boolean; - FCreatingDataController: TcxCustomDataController; - FCreatingLinkObject: Boolean; - FDataChangedListeners: TList; - FDataChangeRefCount: Integer; - FDataControllerInfo: TcxCustomDataControllerInfo; - FDataStorage: TcxDataStorage; - FDestroying: Boolean; - FGroupingChanged: Boolean; - FLoadedStorage: Boolean; - FGroups: TcxDataControllerGroups; - FFields: TcxCustomDataFieldList; - FFilter: TcxDataFilterCriteria; - FFilterChanged: Boolean; - FFilters: TcxDataFilterList; - FFocusedSelected: Boolean; - FIncrementalFilterField: TcxCustomDataField; - FIncrementalFilterText: string; - FIncrementalSearchField: TcxCustomDataField; - FIncrementalSearching: Boolean; - FIncrementalSearchText: string; - FInCancel: Boolean; - FInLoadStorage: Boolean; - FInNotifyControl: Boolean; - FInOnSortingChanged: Boolean; - FInternalFindRecord: Boolean; - FIsDetailExpanding: Boolean; - FIsPattern: Boolean; - FIsPatternSave: Boolean; - FInSetCustomDataSource: Boolean; - FInSmartLoad: Boolean; - FListenerLinks: TList; - FLockGridModeNotifyCount: Integer; - FLockUpdateFieldsCount: Integer; - FUpdateFieldsFlag: Boolean; - FNewItemRecordIndex: Integer; - FNewItemRowFocused: Boolean; - FMasterRecordIndex: Integer; - FMasterRelation: TcxCustomDataRelation; - FMultiSelect: Boolean; - FNotifier: TcxDataControllerNotifier; - FOptions: TcxDataControllerOptions; - FOwner: TComponent; - FPrevSelectionChangedInfo: TcxDataSelectionChangedInfo; - FProvider: TcxCustomDataProvider; - FRecordHandlesField: TcxCustomDataField; - FRecreatingLinkObject: Boolean; - FRelations: TcxCustomDataRelationList; - FSaveObject: TObject; - FSaveObjectLockCount: Integer; - FSearch: TcxDataControllerSearch; - FSelectionChangedInfo: TcxDataSelectionChangedInfo; - FSortingBySummaryChanged: Boolean; - FSortingBySummaryDataItemField: TcxCustomDataField; - FSortingChanged: Boolean; - FStructureChanged: Boolean; - FStructureRecreated: Boolean; - FSummary: TcxDataSummary; - FUpdateItems: Boolean; - FUseNewItemRowForEditing: Boolean; - FOnAfterCancel: TcxDataControllerNotifyEvent; - FOnAfterDelete: TcxDataControllerNotifyEvent; - FOnAfterInsert: TcxDataControllerNotifyEvent; - FOnAfterPost: TcxDataControllerNotifyEvent; - FOnBeforeCancel: TcxDataControllerNotifyEvent; - FOnBeforeDelete: TcxDataRecordNotifyEvent; - FOnBeforeInsert: TcxDataControllerNotifyEvent; - FOnBeforePost: TcxDataControllerNotifyEvent; - FOnFilterRecord: TcxDataFilterRecordEvent; - FOnNewRecord: TcxDataRecordNotifyEvent; - FOnCompare: TcxDataControllerCompareEvent; - FOnDataChanged: TNotifyEvent; - FOnDetailCollapsing: TcxDataDetailExpandingEvent; - FOnDetailCollapsed: TcxDataDetailExpandedEvent; - FOnDetailExpanding: TcxDataDetailExpandingEvent; - FOnDetailExpanded: TcxDataDetailExpandedEvent; - FOnGroupingChanged: TNotifyEvent; - FOnRecordChanged: TcxDataRecordChangedEvent; - FOnSortingChanged: TNotifyEvent; - FOnUpdateControl: TcxUpdateControlEvent; - function GetCustomDataSource: TcxCustomDataSource; - function GetDetailMode: TcxDataControllerDetailMode; - function GetFilteredIndexByRecordIndex(Index: Integer): Integer; - function GetFilteredRecordCount: Integer; - function GetFilteredRecordIndex(Index: Integer): Integer; - function GetIsEditing: Boolean; - function GetIsPattern: Boolean; - function GetIsRowInfoValid: Boolean; - function GetLockCount: Integer; - function GetNewItemRowFocused: Boolean; - function GetOptions: TcxDataControllerOptions; - function GetRelations: TcxCustomDataRelationList; - function GetSortingBySummaryDataItemIndex: Integer; - procedure SetCustomDataSource(Value: TcxCustomDataSource); - procedure SetIsPattern(Value: Boolean); - procedure SetFilter(Value: TcxDataFilterCriteria); - procedure SetFocusedRowIndex(Value: Integer); - procedure SetMultiSelect(Value: Boolean); - procedure SetNewItemRowFocused(Value: Boolean); - procedure SetOnFilterRecord(Value: TcxDataFilterRecordEvent); - procedure SetOptions(Value: TcxDataControllerOptions); - procedure SetSummary(Value: TcxDataSummary); - procedure SetUseNewItemRowForEditing(Value: Boolean); - procedure SetSortingBySummaryDataItemIndex(Value: Integer); - - procedure Update; - // Notify - procedure BeforeGroupingNotification; - procedure BookmarkNotification; - procedure DataNotification; - procedure DoGroupingChanged; - procedure DoSortingBySummaryChanged; - procedure DoSortingChanged; - procedure FocusedNotification; - procedure LayoutNotification; - procedure UpdateRecordNotification; - procedure SearchNotification; - procedure SelectionNotification; - procedure NotifyControl(AUpdateControlInfo: TcxUpdateControlInfo); - procedure NotifyListenerLinks; - procedure ResetDataChangeInfo; - protected - FDataChangeInfo: TcxDataChangeInfo; - FInDeleteSelection: Boolean; - FInFocusDetails: Boolean; - FNearestRecordIndex: Integer; - // IUnknown - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - // Based - function AddInternalField: TcxCustomDataField; virtual; - function AddField: TcxCustomDataField; virtual; - function AppendInSmartLoad: Integer; virtual; - procedure BeforeSorting; virtual; - function CalcEditingRecordIndex: Integer; virtual; - function CanChangeDetailExpanding(ARecordIndex: Integer; AExpanded: Boolean): Boolean; virtual; - function CanFocusRecord(ARecordIndex: Integer): Boolean; virtual; - function CanSelectRow(ARowIndex: Integer): Boolean; virtual; - procedure CheckChanges; - procedure Change(AChanges: TcxDataControllerChanges); - procedure CheckBookmarkValid(ADeletedRecordIndex: Integer); virtual; - procedure CheckDataSetCurrent; virtual; - procedure CheckEditingRecordIndex(ARecordIndex: Integer); virtual; - procedure CheckInternalRecordRange(ARecordIndex: Integer); - procedure CheckItemRange(AItemIndex: Integer); - function CheckDetailsBrowseMode: Boolean; virtual; - function CheckMasterBrowseMode: Boolean; virtual; - procedure CheckMode; - procedure CheckNearestFocusRow; - procedure CheckRange(ARecordIndex, AItemIndex: Integer); - procedure CheckRecordRange(ARecordIndex: Integer); - procedure CheckSelectedCount(ADeletedRecordIndex: Integer); // TODO: rename CheckRecordsAfterDelete - procedure ClearDataChangedListeners; - procedure ClearDetailsMasterRelation(ARelation: TcxCustomDataRelation); - procedure CopyRecord(AFromRecordIndex, AToRecordIndex: Integer); virtual; - procedure CorrectAfterInsert(ARecordIndex: Integer); virtual; - procedure CorrectAfterDelete(ARecordIndex: Integer); virtual; - procedure CorrectPrevSelectionChangedInfo; - procedure DeleteInSmartLoad(ARecordIndex: Integer); virtual; - procedure Unlocked; virtual; - - procedure DoAfterCancel; virtual; - procedure DoAfterDelete; virtual; - procedure DoAfterInsert; virtual; - procedure DoAfterPost; virtual; - procedure DoBeforeCancel; virtual; - procedure DoBeforeDelete(ARecordIndex: Integer); virtual; - procedure DoBeforeInsert; virtual; - procedure DoBeforePost; virtual; - function DoFilterRecord(ARecordIndex: Integer): Boolean; virtual; - function IsFilterRecord: Boolean; virtual; - procedure DoNewRecord(ARecordIndex: Integer); virtual; - - procedure DoDataChanged; virtual; - procedure DoDetailExpanding(ARecordIndex: Integer; var AAllow: Boolean); virtual; - procedure DoDetailExpanded(ARecordIndex: Integer); virtual; - procedure DoDetailCollapsing(ARecordIndex: Integer; var AAllow: Boolean); virtual; - procedure DoDetailCollapsed(ARecordIndex: Integer); virtual; - function DoIncrementalFilterRecord(ARecordIndex: Integer): Boolean; virtual; - procedure DoReadRecord(ARecordIndex: Integer); virtual; - function DoSearchInGridMode(const ASubText: string; AForward, ANext: Boolean): Boolean; virtual; - function FindItemByInternalID(AID: Integer): TObject; virtual; - function FindItemByName(const AName: string): TObject; virtual; - function FindProperItemLink(AItemLink: TObject): TObject; virtual; - function GetActiveRecordIndex: Integer; virtual; // GridMode - function GetDataProviderClass: TcxCustomDataProviderClass; virtual; - function GetDataSelectionClass: TcxDataSelectionClass; virtual; - function GetEditOperations: TcxDataControllerEditOperations; virtual; - function GetEditState: TcxDataControllerEditState; virtual; - function GetDefaultActiveRelationIndex: Integer; virtual; - function GetFieldClass: TcxCustomDataFieldClass; virtual; - function GetFilterCriteriaClass: TcxDataFilterCriteriaClass; virtual; - function GetInternalDisplayText(ARecordIndex: Integer; AField: TcxCustomDataField): string; virtual; - function GetItemID(AItem: TObject): Integer; virtual; - function GetItemName(AItem: TObject): string; virtual; - function GetInternalRecordId(ARecordIndex: Integer; AFieldList: TList): Variant; virtual; - function GetInternalValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; virtual; - procedure GetKeyFields(AList: TList); virtual; - function GetLastRecordIndex: Integer; - function GetRecordIndex: Integer; virtual; - function GetRelationClass: TcxCustomDataRelationClass; virtual; - function GetSearchClass: TcxDataControllerSearchClass; virtual; - function GetStoredDisplayText(ARecordIndex: Integer; AField: TcxCustomDataField): string; - function GetStoredValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; - function GetSummaryClass: TcxDataSummaryClass; virtual; - function GetSummaryItemClass: TcxDataSummaryItemClass; virtual; - function GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; virtual; - function InternalCheckBookmark(ADeletedRecordIndex: Integer): Boolean; virtual; - procedure InternalClearBookmark; virtual; - procedure InternalGotoBookmark; virtual; - function InternalSaveBookmark: Boolean; virtual; - function IsDataBound: Boolean; - function IsDataChangedListenersExist: Boolean; - function IsDataField(AField: TcxCustomDataField): Boolean; virtual; - function IsDestroying: Boolean; virtual; - function IsFocusedSelectedMode: Boolean; virtual; - function IsImmediatePost: Boolean; virtual; - function IsKeyNavigation: Boolean; virtual; - function IsLoading: Boolean; virtual; - function IsProviderDataSource: Boolean; virtual; // Data Aware / Unbound - function IsProviderMode: Boolean; virtual; - function IsRecordID: Boolean; - function IsSmartLoad: Boolean; virtual; - function IsSmartRefresh: Boolean; virtual; - function IsUnboundMode: Boolean; virtual; - procedure LoadStorage; virtual; - function IsNewItemRecordIndex(ARecordIndex: Integer): Boolean; - function LockOnAfterSummary: Boolean; virtual; - procedure NotifyDataChangedListeners; - procedure NotifyDataControllers; virtual; - procedure PrepareField(AField: TcxCustomDataField); virtual; - procedure ProviderValueDefSetProc(AValueDef: TcxValueDef; AFromRecordIndex, AToRecordIndex: Integer; AValueDefReader: TcxValueDefReader); virtual; - procedure RemoveNotification(AComponent: TComponent); virtual; - procedure ResetMasterHasChildrenFlag; - procedure ResetNewItemRowFocused; - procedure RestructData; virtual; - procedure SetStoredValue(ARecordIndex: Integer; AField: TcxCustomDataField; const Value: Variant); - function SyncDetailsFocusWithMaster: Boolean; virtual; - procedure SyncMasterPos; virtual; - procedure UpdateFields; virtual; - procedure UpdateFocused; virtual; - procedure UpdateRelations(ARelation: TcxCustomDataRelation); virtual; - procedure UpdateUseRecordIDState; - procedure UpdateStorage(AUpdateFields: Boolean); - function UseRecordID: Boolean; virtual; - // Notification for Self - class function AddListenerLink(ADataController: TcxCustomDataController): TcxDataListenerLink; - class procedure RemoveListenerLink(ALink: TcxDataListenerLink); - // Notification from DataStorage - procedure DataStorageClearInternalRecords(Sender: TObject); virtual; - // Notification from Fields - procedure RemoveField(ADataField: TcxCustomDataField); virtual; - // Notification from Filter - procedure FilterChanged; virtual; - procedure SummaryChanged(ARedrawOnly: Boolean); virtual; - // Notification from Provider - procedure ActiveChanged(AActive: Boolean); virtual; - procedure DataChanged(ADataChange: TcxDataChange; AItemIndex, ARecordIndex: Integer); virtual; - procedure DataScrolled(ADistance: Integer); virtual; - procedure LayoutChanged(ADataLayoutChanges: TcxDataLayoutChanges); virtual; - // Notification for Grid - procedure CustomDataSourceChanged; virtual; - procedure DoBeforeFocusedRowChange(ARowIndex: Integer); virtual; - procedure DoValueTypeClassChanged(AItemIndex: Integer); virtual; - procedure UpdateControl(AInfo: TcxUpdateControlInfo); virtual; - // methods for Grid -// function GetDisplayText(ARecordIndex, AItemIndex: Integer): string; virtual; - function GetIncrementalSearchText(ARecordIndex, AItemIndex: Integer): string; virtual; - function GetFilterDisplayText(ARecordIndex, AItemIndex: Integer): string; virtual; - // Compare - function CompareByField(ARecordIndex1, ARecordIndex2: Integer; - AField: TcxCustomDataField; AMode: TcxDataControllerComparisonMode): Integer; virtual; - function CompareEqualRecords(ARecordIndex1, ARecordIndex2: Integer): Integer; virtual; - function CompareRecords(ARecordIndex1, ARecordIndex2: Integer; - ASortInfo: TcxDataSortInfo; AMode: TcxDataControllerComparisonMode = dccmOther): Integer; virtual; - function FindGroupRecord(ABufferRecordIndex: Integer; AGroupItemCount: Integer; - AIsGroupDataSorted: Boolean): Integer; - function FindRecordByFields(ABufferRecordIndex: Integer; AFields: TList): Integer; - function GetComparedValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; virtual; - function IsConversionNeededForCompare(AField: TcxCustomDataField): Boolean; virtual; - function IsFilterItemSortByDisplayText(AItemIndex: Integer): Boolean; virtual; - function IsStringConversionNeeded(AField: TcxCustomDataField): Boolean; virtual; - function IsSortByDisplayTextNeeded(AField: TcxCustomDataField): Boolean; virtual; - function NativeCompare(ARecordIndex1, ARecordIndex2: Integer; AField: TcxCustomDataField): Integer; - // Internal Data - procedure DeleteFocusedRecord; - procedure DeleteRecords(AList: TList); - // Smart Load - procedure BeginSmartLoad; virtual; - procedure EndSmartLoad; virtual; - function LoadRecord(AData: Pointer): Integer; virtual; - // Locate - procedure BeginReadRecord; virtual; - procedure EndReadRecord; virtual; - // Sorting By Summary - function GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; virtual; - - property DataStorage: TcxDataStorage read FDataStorage; - property Fields: TcxCustomDataFieldList read FFields; - property Notifier: TcxDataControllerNotifier read FNotifier; - property Provider: TcxCustomDataProvider read FProvider; - property LockUpdateFieldsCount: Integer read FLockUpdateFieldsCount; - public - constructor Create(AOwner: TComponent); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure BeforeDestruction; override; - procedure Destroying; // for CLR - function GetOwner: TPersistent; override; - procedure BeginUpdate; - procedure EndUpdate; - procedure BeginFullUpdate; virtual; - procedure EndFullUpdate; virtual; - procedure BeginUpdateFields; - procedure EndUpdateFields; - procedure SaveKeys; - procedure RestoreKeys; - // internal for Grid - function CreateFilter: TcxDataFilterCriteria; virtual; - // Notification from Grid - function AddItem(AItem: TObject): TcxCustomDataField; virtual; - function ItemPropertiesChanged(AItemIndex: Integer): Boolean; virtual; - procedure Loaded; virtual; - procedure RemoveItem(AItem: TObject); virtual; - procedure UpdateItemIndexes; virtual; - procedure UpdateItems(AUpdateFields: Boolean); - function ExecuteAction(Action: TBasicAction): Boolean; virtual; - function UpdateAction(Action: TBasicAction): Boolean; virtual; - // Data Changed notify - procedure AddDataChangedListener(AInstance: TObject; ADataChangedEvent: TNotifyEvent); - procedure RemoveDataChangedListener(AInstance: TObject; ADataChangedEvent: TNotifyEvent); - procedure AddDataChangeRefCount; - procedure RemoveDataChangeRefCount; - function DataChangedNotifyLocked: Boolean; virtual; - function IsDataLoading: Boolean; - procedure LockDataChangedNotify; - procedure UnlockDataChangedNotify; - procedure LockGridModeNotify; - procedure UnlockGridModeNotify; - // Structure - procedure ChangeNeedConversion(AItemIndex: Integer; ANeedConversion: Boolean); virtual; - procedure ChangeTextStored(AItemIndex: Integer; ATextStored: Boolean); virtual; - procedure ChangeValueTypeClass(AItemIndex: Integer; AValueTypeClass: TcxValueTypeClass); virtual; - function GetItem(Index: Integer): TObject; virtual; abstract; - function GetItemCount: Integer; virtual; - function GetItemNeedConversion(AItemIndex: Integer): Boolean; virtual; - function GetItemTextStored(AItemIndex: Integer): Boolean; virtual; - function GetItemValueTypeClass(AItemIndex: Integer): TcxValueTypeClass; - function IsDisplayFormatDefined(AItemIndex: Integer; AIgnoreSimpleCurrency: Boolean): Boolean; virtual; - // Data - function AppendRecord: Integer; - procedure DeleteRecord(ARecordIndex: Integer); - function GetGroupValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; virtual; - procedure GetGroupValues(ARecordIndex: Integer; var AValues: TcxDataSummaryValues); virtual; - function GetDisplayText(ARecordIndex, AItemIndex: Integer): string; virtual; - function GetRecordCount: Integer; virtual; - function GetRecordId(ARecordIndex: Integer): Variant; virtual; - function GetValue(ARecordIndex, AItemIndex: Integer): Variant; virtual; - function InsertRecord(ARecordIndex: Integer): Integer; - procedure Refresh; virtual; - procedure SetDisplayText(ARecordIndex, AItemIndex: Integer; const Value: string); virtual; - procedure SetRecordCount(Value: Integer); virtual; - procedure SetValue(ARecordIndex, AItemIndex: Integer; const Value: Variant); virtual; - procedure SortByDisplayTextChanged; - // Data Editing - procedure Append; virtual; - procedure Cancel; virtual; - function CanInitEditing(AItemIndex: Integer): Boolean; virtual; - procedure CheckBrowseMode; virtual; - procedure DeleteFocused; virtual; - procedure DeleteSelection; virtual; - procedure Edit; virtual; - procedure FocusControl(AItemIndex: Integer; var Done: Boolean); virtual; - function GetEditValue(AItemIndex: Integer; AEditValueSource: TcxDataEditValueSource): Variant; virtual; - function GetItemValueSource(AItemIndex: Integer): TcxDataEditValueSource; virtual; - procedure Insert; virtual; - procedure Post(AForcePost: Boolean = False); virtual; - procedure PostEditingData; virtual; - procedure RefreshExternalData; virtual; - function SetEditValue(AItemIndex: Integer; const AValue: Variant; AEditValueSource: TcxDataEditValueSource): Boolean; virtual; - procedure UpdateData; virtual; - // Data New Item Row - function GetEditingRecordIndex: Integer; virtual; - function GetNewItemRecordIndex: Integer; virtual; - // Data Save/Load - procedure LoadFromStream(AStream: TStream); - procedure SaveToStream(AStream: TStream); - // Master-Detail: Relations - function GetMasterDataController: TcxCustomDataController; virtual; - function GetMasterRecordIndex: Integer; virtual; - function GetMasterRelation: TcxCustomDataRelation; virtual; - function GetPatternDataController: TcxCustomDataController; - function GetRootDataController: TcxCustomDataController; - function IsDetailMode: Boolean; virtual; - // Master-Detail: Grid override - function CreateDetailLinkObject(ARelation: TcxCustomDataRelation; ARecordIndex: Integer): TObject; virtual; - procedure FocusDetails(ARecordIndex: Integer); - function GetDetailDataControllerByLinkObject(ALinkObject: TObject): TcxCustomDataController; virtual; - // Master-Detail: Grid Notifications - procedure ResetRelationByItem(AItem: TObject); virtual; - procedure SetMasterMode(AMasterRelation: TcxCustomDataRelation; AIsPattern: Boolean); - procedure SetMasterRelation(AMasterRelation: TcxCustomDataRelation; AMasterRecordIndex: Integer); virtual; - // Master-Detail: View Data - procedure ChangeDetailActiveRelationIndex(ARecordIndex: Integer; ARelationIndex: Integer); - function ChangeDetailExpanding(ARecordIndex: Integer; AExpanded: Boolean): Boolean; - procedure ClearDetailLinkObject(ARecordIndex: Integer; ARelationIndex: Integer); - procedure ClearDetails; - procedure CollapseDetails; - procedure ForEachDetail(AMasterRelation: TcxCustomDataRelation; AProc: TcxDataControllerEachDetailProc); - function GetDetailActiveRelationIndex(ARecordIndex: Integer): Integer; - function GetDetailDataController(ARecordIndex: Integer; ARelationIndex: Integer): TcxCustomDataController; - function GetDetailExpanding(ARecordIndex: Integer): Boolean; - function GetDetailHasChildren(ARecordIndex, ARelationIndex: Integer): Boolean; - function GetDetailLinkObject(ARecordIndex: Integer; ARelationIndex: Integer): TObject; - function IsDetailDataControllerExist(ARecordIndex: Integer; ARelationIndex: Integer): Boolean; - procedure ResetHasChildrenFlag; - // View Data - procedure ForEachRow(ASelectedRows: Boolean; AProc: TcxDataControllerEachRowProc); virtual; - function GetNearestRowIndex(ARowIndex: Integer): Integer; - function GetRowCount: Integer; - function GetRowIndexByRecordIndex(ARecordIndex: Integer; AMakeVisible: Boolean): Integer; - function GetRowInfo(ARowIndex: Integer): TcxRowInfo; - function GetRowDisplayText(const ARowInfo: TcxRowInfo; var AItemIndex: Integer): string; - function GetRowValue(const ARowInfo: TcxRowInfo; AItemIndex: Integer): Variant; - procedure MakeRecordVisible(ARecordIndex: Integer); - // Export in GridMode - function FocusSelectedRow(ASelectedIndex: Integer): Boolean; virtual; - procedure RestoreDataSetPos; virtual; - procedure SaveDataSetPos; virtual; - // Navigation - procedure ChangeFocusedRecordIndex(ARecordIndex: Integer); - function ChangeFocusedRowIndex(ARowIndex: Integer): Boolean; - procedure CheckFocusedRow; - function GetFocusedRecordIndex: Integer; - function GetFocusedRowIndex: Integer; - procedure GotoFirst; - procedure GotoLast; - procedure GotoNext; - procedure GotoPrev; - function IsBOF: Boolean; - function IsEOF: Boolean; - function IsGridMode: Boolean; - procedure MoveBy(ADistance: Integer); - procedure Scroll(ADistance: Integer); - procedure SetFocus; virtual; - // Bookmark - procedure ClearBookmark; - procedure GotoBookmark; - function IsBookmarkAvailable: Boolean; virtual; - function IsBookmarkRow(ARowIndex: Integer): Boolean; virtual; - procedure SaveBookmark; - // Filtering - function GetFilterDataValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; virtual; - function GetFilterItemFieldCaption(AItem: TObject): string; virtual; - function GetFilterItemFieldName(AItem: TObject): string; virtual; - // Search - function ChangeIncrementalFilterText(const AText: string): Boolean; - function FindRecordIndexByText(AStartRecordIndex, AItemIndex: Integer; - const AText: string; APartialCompare, ACircular, AForward: Boolean): Integer; virtual; - function GetIncrementalFilterText: string; virtual; - function IsIncrementalFilter: Boolean; virtual; - procedure ResetIncrementalFilter; virtual; - function SetIncrementalFilter(AItemIndex: Integer; const AText: string): Integer; virtual; - // Sorting - procedure ChangeItemSortingIndex(AItemIndex: Integer; ASortingIndex: Integer); - procedure ChangeSorting(AItemIndex: Integer; ASortOrder: TcxDataSortOrder); - procedure ClearSorting(AKeepGroupedItems: Boolean); - function GetItemSortByDisplayText(AItemIndex: Integer; ASortByDisplayText: Boolean): Boolean; virtual; - function GetItemSortOrder(AItemIndex: Integer): TcxDataSortOrder; - function GetItemSortingIndex(AItemIndex: Integer): Integer; - function GetSortingItemCount: Integer; - function GetSortingItemIndex(Index: Integer): Integer; - // MultiSelect - procedure ChangeRowSelection(ARowIndex: Integer; ASelection: Boolean); virtual; - procedure CheckFocusedSelected; - procedure ClearSelection; - procedure ClearSelectionAnchor; virtual; - function GetRowId(ARowIndex: Integer): Variant; virtual; - function GetSelectedCount: Integer; - function GetSelectedRowIndex(Index: Integer): Integer; virtual; // Visible Order - function GetSelectionAnchorRowIndex: Integer; virtual; - function IsRowSelected(ARowIndex: Integer): Boolean; - function IsSelectionAnchorExist: Boolean; virtual; - procedure SelectAll; virtual; - procedure SelectFromAnchor(ARowIndex: Integer; AKeepSelection: Boolean); virtual; - procedure SelectRows(AStartRowIndex, AEndRowIndex: Integer); - procedure SetSelectionAnchor(ARowIndex: Integer); virtual; - procedure SyncSelected(ASelected: Boolean); // not MultiSelect only - procedure SyncSelectionFocusedRecord; virtual; - - property Active: Boolean read FActive; - property CustomDataSource: TcxCustomDataSource read GetCustomDataSource write SetCustomDataSource; - property DataControllerInfo: TcxCustomDataControllerInfo read FDataControllerInfo; - property DetailMode: TcxDataControllerDetailMode read GetDetailMode; - property DisplayTexts[RecordIndex, ItemIndex: Integer]: string read GetDisplayText write SetDisplayText; - property Groups: TcxDataControllerGroups read FGroups; - property EditingRecordIndex: Integer read GetEditingRecordIndex; - property EditOperations: TcxDataControllerEditOperations read GetEditOperations; - property EditState: TcxDataControllerEditState read GetEditState; - property Filter: TcxDataFilterCriteria read FFilter write SetFilter; - property FilteredIndexByRecordIndex[Index: Integer]: Integer read GetFilteredIndexByRecordIndex; - property FilteredRecordCount: Integer read GetFilteredRecordCount; - property FilteredRecordIndex[Index: Integer]: Integer read GetFilteredRecordIndex; - property FocusedRecordIndex: Integer read GetFocusedRecordIndex write ChangeFocusedRecordIndex; - property FocusedRowIndex: Integer read GetFocusedRowIndex write SetFocusedRowIndex; - property IsCreatingLinkObject: Boolean read FCreatingLinkObject; - property IsDetailExpanding: Boolean read FIsDetailExpanding; - property IsEditing: Boolean read GetIsEditing; - property IsPattern: Boolean read GetIsPattern write SetIsPattern; - property IsRowInfoValid: Boolean read GetIsRowInfoValid; - property IsUpdatingItems: Boolean read FUpdateItems; - property ItemCount: Integer read GetItemCount; - property LockCount: Integer read GetLockCount; - property LockGridModeNotifyCount: Integer read FLockGridModeNotifyCount; - property MultiSelect: Boolean read FMultiSelect write SetMultiSelect; - property NewItemRecordIndex: Integer read GetNewItemRecordIndex; - property NewItemRowFocused: Boolean read GetNewItemRowFocused write SetNewItemRowFocused; - property Options: TcxDataControllerOptions read GetOptions write SetOptions default [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding]; - property RecordCount: Integer read GetRecordCount write SetRecordCount; - property Relations: TcxCustomDataRelationList read GetRelations; - property RowCount: Integer read GetRowCount; - property Search: TcxDataControllerSearch read FSearch; - property Summary: TcxDataSummary read FSummary write SetSummary; - property UseNewItemRowForEditing: Boolean read FUseNewItemRowForEditing write SetUseNewItemRowForEditing; - property Values[RecordIndex, ItemIndex: Integer]: Variant read GetValue write SetValue; - // Sorting By Summary - property SortingBySummaryDataItemIndex: Integer read GetSortingBySummaryDataItemIndex write SetSortingBySummaryDataItemIndex; - - property OnAfterCancel: TcxDataControllerNotifyEvent read FOnAfterCancel write FOnAfterCancel; - property OnAfterDelete: TcxDataControllerNotifyEvent read FOnAfterDelete write FOnAfterDelete; - property OnAfterInsert: TcxDataControllerNotifyEvent read FOnAfterInsert write FOnAfterInsert; - property OnAfterPost: TcxDataControllerNotifyEvent read FOnAfterPost write FOnAfterPost; - property OnBeforeCancel: TcxDataControllerNotifyEvent read FOnBeforeCancel write FOnBeforeCancel; - property OnBeforeDelete: TcxDataRecordNotifyEvent read FOnBeforeDelete write FOnBeforeDelete; - property OnBeforeInsert: TcxDataControllerNotifyEvent read FOnBeforeInsert write FOnBeforeInsert; - property OnBeforePost: TcxDataControllerNotifyEvent read FOnBeforePost write FOnBeforePost; - property OnFilterRecord: TcxDataFilterRecordEvent read FOnFilterRecord write SetOnFilterRecord; - property OnNewRecord: TcxDataRecordNotifyEvent read FOnNewRecord write FOnNewRecord; - - property OnCompare: TcxDataControllerCompareEvent read FOnCompare write FOnCompare; - property OnDataChanged: TNotifyEvent read FOnDataChanged write FOnDataChanged; - property OnDetailCollapsing: TcxDataDetailExpandingEvent read FOnDetailCollapsing write FOnDetailCollapsing; - property OnDetailCollapsed: TcxDataDetailExpandedEvent read FOnDetailCollapsed write FOnDetailCollapsed; - property OnDetailExpanding: TcxDataDetailExpandingEvent read FOnDetailExpanding write FOnDetailExpanding; - property OnDetailExpanded: TcxDataDetailExpandedEvent read FOnDetailExpanded write FOnDetailExpanded; - property OnGroupingChanged: TNotifyEvent read FOnGroupingChanged write FOnGroupingChanged; - property OnRecordChanged: TcxDataRecordChangedEvent read FOnRecordChanged write FOnRecordChanged; - property OnSortingChanged: TNotifyEvent read FOnSortingChanged write FOnSortingChanged; - property OnUpdateControl: TcxUpdateControlEvent read FOnUpdateControl write FOnUpdateControl; - end; - - TcxCustomDataControllerClass = class of TcxCustomDataController; - - TcxCustomDataHelper = class - public - class function GetValueDef(AField: TcxCustomDataField): TcxValueDef; - class procedure SetTextStored(AField: TcxCustomDataField; ATextStored: Boolean); - end; - - TCompareItems = function (AItem1, AItem2: Pointer): Integer of object; - -procedure QuickSortList(ASortList: PPointerList; - L, R: Integer; ACompareFunc: TCompareItems); - -procedure InvalidOperation(const S: string); - -function cxDataGetDataSummaryValueDefaultFormat(AValueType: TcxSummaryValueType; - ASummaryKind: TcxSummaryKind; AIsFooter: Boolean): string; - -const - cxDataFilterVersion: Byte = 3; - -implementation - -uses -{$IFDEF DELPHI9} - Windows, -{$ENDIF} - cxDataConsts, cxFilterConsts; - -const - stDataControllerSignature = 'DataController1'; - stBeginText = '('; - stEndText = ')'; - stSeparator = ','; - NullRecordHandle: TcxDataRecordHandle = TcxDataRecordHandle(-1); - - {$IFNDEF DELPHI6} - // HRESULT value definitions from windows.pas - // Success codes - S_OK = $00000000; - S_FALSE = $00000001; - // No such interface supported - E_NOINTERFACE = HRESULT($80004002); - {$ENDIF} - -type - TNotifyEventItem = class - Instance: TObject; - Event: TNotifyEvent; - end; - - { Keys Storage } - - TcxSaveObject = class; - - TcxKeyInfo = class - Key: Variant; - end; - - TcxSelectedKeyInfo = class(TcxKeyInfo) - SelectedIndex: Integer; - end; - - TcxDetailKeyInfo = class(TcxKeyInfo) - ActiveRelationIndex: Integer; - SubDetail: TcxSaveObject; - end; - - TcxKeys = class - private - FDataController: TcxCustomDataController; - FKeyFields: TList; - FKeys: TList; - procedure SetDataController(Value: TcxCustomDataController); - protected - procedure DoRestore; virtual; - procedure DoSave; virtual; - function Find(ARecordIndex: Integer; var AIndex: Integer): Boolean; - procedure FreeKeyInfo(AKeyInfo: TObject); virtual; - property DataController: TcxCustomDataController read FDataController write SetDataController; - property Keys: TList read FKeys; - public - constructor Create; - destructor Destroy; override; - procedure Clear; virtual; - procedure Delete(AIndex: Integer); - procedure Restore(ADataController: TcxCustomDataController); - procedure Save(ADataController: TcxCustomDataController); - end; - - TcxDetailKeys = class(TcxKeys) - protected - procedure DoRestore; override; - procedure DoSave; override; - procedure FreeKeyInfo(AKeyInfo: TObject); override; - end; - - TcxSelectedKeys = class(TcxKeys) - protected - procedure DoRestore; override; - procedure DoSave; override; - procedure FreeKeyInfo(AKeyInfo: TObject); override; - end; - - TcxSaveObject = class - private - FDetailKeys: TcxDetailKeys; - FSelectedKeys: TcxSelectedKeys; - public - constructor Create; - destructor Destroy; override; - procedure Restore(ADataController: TcxCustomDataController); - procedure Save(ADataController: TcxCustomDataController); - end; - -function CompareByLinkObject(AItem1, AItem2: Pointer): Integer; -begin - Result := TcxCustomDataField(TcxValueDef(AItem1).LinkObject).Index - - TcxCustomDataField(TcxValueDef(AItem2).LinkObject).Index; -end; - -procedure InvalidOperation(const S: string); -begin - raise EcxInvalidDataControllerOperation.Create(S); -end; - -function cxDataGetDataSummaryValueDefaultFormat(AValueType: TcxSummaryValueType; - ASummaryKind: TcxSummaryKind; AIsFooter: Boolean): string; -const - ACurrencyFormats: array [Boolean, skSum..skAverage] of string = ( - ('SUM=%s;SUM=-%s', 'MIN=%s;MIN=-%s', 'MAX=%s;MAX=-%s', 'COUNT=0', 'AVG=%s;AVG=-%s'), - ('%s;-%s', 'MIN=%s;MIN=-%s', 'MAX=%s;MAX=-%s', '0', 'AVG=%s;AVG=-%s')); - ADateFormats: array [Boolean, skSum..skAverage] of string = ( - ('SUM=', 'MIN=', 'MAX=', 'COUNT=0', 'AVG='), - ('', 'MIN=', 'MAX=', '0', 'AVG=')); - AFloatFormats: array [Boolean, skSum..skAverage] of string = ( - ('SUM=0.00;SUM=-0.00', 'MIN=0.00;MIN=-0.00', 'MAX=0.00;MAX=-0.00', 'COUNT=0', 'AVG=0.00;AVG=-0.00'), - ('0.00;-0.00', 'MIN=0.00;MIN=-0.00', 'MAX=0.00;MAX=-0.00', '0', 'AVG=0.00;AVG=-0.00')); -var - S: string; -begin - Result := ''; - if ASummaryKind = skNone then Exit; - case AValueType of - svtCurrency: - begin - S := DefaultCurrencyDisplayFormat; - Result := Format(ACurrencyFormats[AIsFooter, ASummaryKind], [S, S]); - end; - svtDate: - Result := ADateFormats[AIsFooter, ASummaryKind]; - else - Result := AFloatFormats[AIsFooter, ASummaryKind]; - end; -end; - -function CompareSelectionList(AItem1, AItem2: Pointer): Integer; -begin - Result := PcxDataSelectionInfo(AItem1).RowIndex - PcxDataSelectionInfo(AItem2).RowIndex; -end; - -function CompareIntegers(AItem1, AItem2: Pointer): Integer; -begin - Result := Integer(AItem1) - Integer(AItem2); -end; - -function CompareByKey(AItem1, AItem2: Pointer): Integer; -begin - Result := VarCompare(TcxKeyInfo(AItem1).Key, TcxKeyInfo(AItem2).Key); -end; - -procedure QuickSortList(ASortList: PPointerList; - L, R: Integer; ACompareFunc: TCompareItems); -var - I, J: Integer; - P, T: Pointer; -begin - repeat - I := L; - J := R; - P := ASortList[(L + R) shr 1]; - repeat - while ACompareFunc(ASortList[I], P) < 0 do - Inc(I); - while ACompareFunc(ASortList[J], P) > 0 do - Dec(J); - if I <= J then - begin - T := ASortList[I]; - ASortList[I] := ASortList[J]; - ASortList[J] := T; - Inc(I); - Dec(J); - end; - until I > J; - if L < J then - QuickSortList(ASortList, L, J, ACompareFunc); - L := I; - until I >= R; -end; - -function IsValueDefInternal(AValueDef: TcxValueDef): Boolean; -begin - Result := (AValueDef.LinkObject is TcxCustomDataField) and - TcxCustomDataField(AValueDef.LinkObject).IsValueDefInternal; -end; - -procedure ListSetCount(AList: TList; ANewCount: Integer); -begin - AList.Count := ANewCount; -end; - -{ TcxKeys } - -constructor TcxKeys.Create; -begin - inherited Create; - FKeyFields := TList.Create; - FKeys := TList.Create; -end; - -destructor TcxKeys.Destroy; -begin - Clear; - FKeyFields.Free; - FKeys.Free; - inherited Destroy; -end; - -procedure TcxKeys.Clear; -var - I: Integer; -begin - for I := 0 to Keys.Count - 1 do - FreeKeyInfo(Keys[I]); - Keys.Clear; -end; - -procedure TcxKeys.Delete(AIndex: Integer); -begin - FreeKeyInfo(Keys[AIndex]); - Keys.Delete(AIndex); -end; - -procedure TcxKeys.Restore(ADataController: TcxCustomDataController); -begin - DataController := ADataController; - if Keys.Count > 0 then // !!! TODO - begin - DoRestore; - Clear; - end; -end; - -procedure TcxKeys.Save(ADataController: TcxCustomDataController); -begin - Clear; - DataController := ADataController; - DoSave; - Keys.Sort(CompareByKey); -end; - -procedure TcxKeys.DoRestore; -begin -end; - -procedure TcxKeys.DoSave; -begin -end; - -function TcxKeys.Find(ARecordIndex: Integer; var AIndex: Integer): Boolean; -var - I: Integer; - AKeyInfo: TcxKeyInfo; -begin - Result := False; - for I := 0 to Keys.Count - 1 do - begin - AKeyInfo := TcxKeyInfo(Keys[I]); - if VarEquals(DataController.GetInternalRecordId(ARecordIndex, FKeyFields), AKeyInfo.Key) then - begin - AIndex := I; - Result := True; - Break; - end; - end; -end; - -procedure TcxKeys.FreeKeyInfo(AKeyInfo: TObject); -begin - AKeyInfo.Free; -end; - -procedure TcxKeys.SetDataController(Value: TcxCustomDataController); -begin - FDataController := Value; - FKeyFields.Clear; - DataController.GetKeyFields(FKeyFields); -end; - -{ TcxDetailKeys } - -procedure TcxDetailKeys.DoRestore; -var - I, J: Integer; - ADetailKeyInfo: TcxDetailKeyInfo; - ADetailLinkObject: TObject; - ADataController: TcxCustomDataController; -begin - for I := 0 to DataController.RecordCount - 1 do - begin - if Find(I, J) then - begin - ADetailKeyInfo := TcxDetailKeyInfo(Keys[J]); - DataController.ChangeDetailExpanding(I, True); - DataController.ChangeDetailActiveRelationIndex(I, ADetailKeyInfo.ActiveRelationIndex); - if ADetailKeyInfo.SubDetail <> nil then - begin - if DataController.GetDetailExpanding(I) and - (DataController.GetDetailActiveRelationIndex(I) = ADetailKeyInfo.ActiveRelationIndex) then - begin - // WARNING: GetDetailDataController->nil ! - ADetailLinkObject := DataController.GetDetailLinkObject(I, ADetailKeyInfo.ActiveRelationIndex); - if ADetailLinkObject <> nil then - begin - ADataController := DataController.GetDetailDataControllerByLinkObject(ADetailLinkObject); - if ADataController.InheritsFrom(DataController.ClassType) then //if ADataController is TcxDBDataController then - ADetailKeyInfo.SubDetail.Restore(ADataController); - end; - end; - end; - end; - end; -end; - -procedure TcxDetailKeys.DoSave; -var - I: Integer; - ADetailKeyInfo: TcxDetailKeyInfo; - ADetailLinkObject: TObject; - ADataController: TcxCustomDataController; -begin - for I := 0 to DataController.RecordCount - 1 do - begin - if DataController.GetDetailExpanding(I) then - begin - ADetailKeyInfo := TcxDetailKeyInfo.Create; - Keys.Add(ADetailKeyInfo); - ADetailKeyInfo.Key := DataController.GetInternalRecordId(I, FKeyFields); - ADetailKeyInfo.ActiveRelationIndex := DataController.GetDetailActiveRelationIndex(I); - ADetailKeyInfo.SubDetail := TcxSaveObject.Create; - // WARNING: GetDetailDataController->nil ! - ADetailLinkObject := DataController.GetDetailLinkObject(I, ADetailKeyInfo.ActiveRelationIndex); - if ADetailLinkObject <> nil then - begin - ADataController := DataController.GetDetailDataControllerByLinkObject(ADetailLinkObject); - if ADataController.InheritsFrom(DataController.ClassType) then //if ADataController is TcxDBDataController then - ADetailKeyInfo.SubDetail.Save(ADataController); - end; - end; - end; -end; - -procedure TcxDetailKeys.FreeKeyInfo(AKeyInfo: TObject); -begin - if TcxDetailKeyInfo(AKeyInfo).SubDetail <> nil then - TcxDetailKeyInfo(AKeyInfo).SubDetail.Free; - AKeyInfo.Free; -end; - -{ TcxSelectedKeys } - -procedure TcxSelectedKeys.DoRestore; -var - I, J: Integer; - ASelection: TcxDataSelection; - ASelectedKeyInfo: TcxSelectedKeyInfo; -begin - ASelection := DataController.DataControllerInfo.Selection; - if ASelection.Count = 0 then Exit; - // TODO: Level check <> -1 - for I := 0 to DataController.RecordCount - 1 do - begin - if Find(I, J) then - begin - ASelectedKeyInfo := TcxSelectedKeyInfo(Keys[J]); - if ASelectedKeyInfo.SelectedIndex < ASelection.Count then - ASelection[ASelectedKeyInfo.SelectedIndex].RecordIndex := I; - Delete(J); - end; - end; - - for I := 0 to Keys.Count - 1 do - begin - ASelectedKeyInfo := TcxSelectedKeyInfo(Keys[I]); - if (0 <= ASelectedKeyInfo.SelectedIndex) and (ASelectedKeyInfo.SelectedIndex < ASelection.Count) then - ASelection[ASelectedKeyInfo.SelectedIndex].RecordIndex := -1; - end; - - for I := ASelection.Count - 1 downto 0 do - if ASelection[I].RecordIndex = -1 then - ASelection.Delete(I); - - DataController.DataControllerInfo.ExpandingChanged; -end; - -procedure TcxSelectedKeys.DoSave; -var - ASelection: TcxDataSelection; - I: Integer; - PSelectionInfo: PcxDataSelectionInfo; - ASelectedKeyInfo: TcxSelectedKeyInfo; -begin - ASelection := DataController.DataControllerInfo.Selection; - for I := 0 to ASelection.Count - 1 do - begin - PSelectionInfo := ASelection[I]; - if (PSelectionInfo.Level <> -1) and - (PSelectionInfo.RecordIndex < DataController.RecordCount) then - begin - ASelectedKeyInfo := TcxSelectedKeyInfo.Create; - Keys.Add(ASelectedKeyInfo); - ASelectedKeyInfo.SelectedIndex := I; - ASelectedKeyInfo.Key := DataController.GetInternalRecordId(PSelectionInfo.RecordIndex, FKeyFields); - end; - end; - DataController.DataControllerInfo.SaveExpanding([eisExpanded, eisSelected]); -end; - -procedure TcxSelectedKeys.FreeKeyInfo(AKeyInfo: TObject); -begin - AKeyInfo.Free; -end; - -{ TcxSaveObject } - -constructor TcxSaveObject.Create; -begin - inherited Create; - FDetailKeys := TcxDetailKeys.Create; - FSelectedKeys := TcxSelectedKeys.Create; -end; - -destructor TcxSaveObject.Destroy; -begin - FSelectedKeys.Free; - FDetailKeys.Free; - inherited Destroy; -end; - -procedure TcxSaveObject.Restore(ADataController: TcxCustomDataController); -begin - if ADataController.IsCreatingLinkObject then Exit; - if ADataController.IsKeyNavigation then - begin - FDetailKeys.Restore(ADataController); - FSelectedKeys.Restore(ADataController); - end - else - ADataController.CheckSelectedCount(-1); -end; - -procedure TcxSaveObject.Save(ADataController: TcxCustomDataController); -begin - if ADataController.IsCreatingLinkObject or - ADataController.IsDestroying then Exit; - if ADataController.IsKeyNavigation then - begin - FDetailKeys.Save(ADataController); - FSelectedKeys.Save(ADataController); - end; -end; - -{ TcxCustomDataSource } - -destructor TcxCustomDataSource.Destroy; -begin - RemoveFromProviders; - FProviders.Free; - FProviders := nil; -// if Assigned(FProvider) then -// FProvider.CustomDataSource := nil; - inherited Destroy; -end; - -procedure TcxCustomDataSource.DataChanged; -begin - if Provider = nil then Exit; - Provider.DataController.BeginFullUpdate; - try - Provider.DataChanged(dcTotal, -1, -1); - finally - Provider.DataController.EndFullUpdate; - end; -end; - -function TcxCustomDataSource.GetRecordHandleByIndex(ARecordIndex: Integer): TcxDataRecordHandle; -begin - Result := TcxDataRecordHandle(Integer(DataController.GetInternalValue(ARecordIndex, DataController.FRecordHandlesField))); -end; - -function TcxCustomDataSource.GetRecordIndexByHandle(ARecordHandle: TcxDataRecordHandle): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to DataController.RecordCount - 1 do - if GetRecordHandleByIndex(I) = ARecordHandle then - begin - Result := I; - Break; - end; -end; - -procedure TcxCustomDataSource.CustomSort; -begin -end; - -function TcxCustomDataSource.AppendRecord: TcxDataRecordHandle; -begin - Result := NullRecordHandle; - // IMPL: Add + Data Notify -end; - -procedure TcxCustomDataSource.DeleteRecord(ARecordHandle: TcxDataRecordHandle); -begin - // IMPL: Delete + Data Notify -end; - -function TcxCustomDataSource.GetDefaultItemID(AItemIndex: Integer): Integer; -begin - Result := DataController.GetItemID(DataController.GetItem(AItemIndex)); -end; - -function TcxCustomDataSource.GetDetailHasChildren(ARecordIndex, ARelationIndex: Integer): Boolean; -begin - Result := False; -end; - -function TcxCustomDataSource.GetDisplayText(ARecordHandle: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle): string; -begin - try - Result := VarToStr(GetValue(ARecordHandle, AItemHandle)); - except - on EVariantError do - Result := ''; - end; -end; - -function TcxCustomDataSource.GetInfoForCompare(ARecordHandle: TcxDataRecordHandle; - AItemHandle: TcxDataItemHandle; var PValueBuffer: PAnsiChar): Boolean; -begin - InvalidOperation(cxSDataCustomDataSourceInvalidCompare); - Result := False; // i.e. IS NULL -end; - -function TcxCustomDataSource.GetItemHandle(AItemIndex: Integer): TcxDataItemHandle; -begin - Result := TcxDataItemHandle(AItemIndex); -end; - -function TcxCustomDataSource.GetRecordCount: Integer; -begin - Result := 0; -end; - -function TcxCustomDataSource.GetRecordId(ARecordHandle: TcxDataRecordHandle): Variant; -begin - Result := Null; -end; - -function TcxCustomDataSource.GetRecordHandle(ARecordIndex: Integer): TcxDataRecordHandle; -begin - Result := TcxDataRecordHandle(ARecordIndex); -end; - -function TcxCustomDataSource.GetValue(ARecordHandle: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle): Variant; -begin - Result := Null; -end; - -function TcxCustomDataSource.InsertRecord(ARecordHandle: TcxDataRecordHandle): TcxDataRecordHandle; -begin - // IMPL: Insert + Data Notify - Result := AppendRecord; -end; - -function TcxCustomDataSource.IsCustomSorting: Boolean; -begin - Result := False; -end; - -function TcxCustomDataSource.IsNativeCompare: Boolean; -begin - Result := False; -end; - -function TcxCustomDataSource.IsNativeCompareFunc: Boolean; -begin - Result := False; -end; - -function TcxCustomDataSource.IsRecordIdSupported: Boolean; -begin - Result := False; -end; - -procedure TcxCustomDataSource.LoadRecordHandles; -var - I: Integer; -begin - DataController.DataStorage.Clear(Provider.FDataChangedLocked); - DataController.DataStorage.RecordCount := GetRecordCount; - for I := 0 to DataController.{DataStorage.}RecordCount - 1 do - DataController.SetStoredValue(I, DataController.FRecordHandlesField, Integer(GetRecordHandle(I))); -end; - -function TcxCustomDataSource.NativeCompareFunc(ARecordHandle1, ARecordHandle2: TcxDataRecordHandle; - AItemHandle: TcxDataItemHandle): Integer; -begin - Result := 0; -end; - -procedure TcxCustomDataSource.SetRecordCount(ARecordCount: Integer); -begin - // IMPL: change record count + Data Notify -end; - -procedure TcxCustomDataSource.SetValue(ARecordHandle: TcxDataRecordHandle; - AItemHandle: TcxDataItemHandle; const AValue: Variant); -begin - // IMPL: change Value + Data Notify -end; - -function TcxCustomDataSource.AddRecordHandle(ARecordHandle: TcxDataRecordHandle): Integer; -begin - Result := DataController.DataStorage.AppendRecord; - DataController.SetStoredValue(Result, DataController.FRecordHandlesField, Integer(ARecordHandle)); -end; - -function TcxCustomDataSource.GetDataController: TcxCustomDataController; -begin - Result := Provider.DataController; -end; - -function TcxCustomDataSource.GetProvider: TcxCustomDataProvider; -begin - if FCurrentProvider <> nil then - Result := FCurrentProvider - else - Result := FProvider; -end; - -procedure TcxCustomDataSource.AddProvider(AProvider: TcxCustomDataProvider); -begin - if FProviders = nil then - FProviders := TList.Create; - FProviders.Add(AProvider); -end; - -procedure TcxCustomDataSource.RemoveProvider(AProvider: TcxCustomDataProvider); -begin - if FProviders = nil then Exit; - FProviders.Remove(AProvider); - if CurrentProvider = AProvider then - CurrentProvider := nil; -end; - -procedure TcxCustomDataSource.RemoveFromProviders; -var - I: Integer; -begin - if FProviders = nil then Exit; - for I := FProviders.Count - 1 downto 0 do - if TcxCustomDataProvider(FProviders[I]).CustomDataSource = Self then - TcxCustomDataProvider(FProviders[I]).CustomDataSource := nil; -end; - -{ TcxCustomDataProvider } - -constructor TcxCustomDataProvider.Create(ADataController: TcxCustomDataController); -begin - inherited Create; - FDataController := ADataController; - FEditingRecordIndex := cxNullEditingRecordIndex; - FEditingRecordIndex1 := cxNullEditingRecordIndex; - FEditingRecordIndex2 := cxNullEditingRecordIndex; - FInsertedRecordIndex := -1; -end; - -destructor TcxCustomDataProvider.Destroy; -begin - ClearSavedRecord; - CustomDataSource := nil; - inherited Destroy; -end; - -// Mode - -procedure TcxCustomDataProvider.CustomSort; -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - CustomDataSource.CustomSort; - end; -end; - -function TcxCustomDataProvider.IsCustomDataSourceSupported: Boolean; -begin - Result := True; -end; - -function TcxCustomDataProvider.IsCustomSorting: Boolean; -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - Result := CustomDataSource.IsCustomSorting; - end - else - Result := False; -end; - -function TcxCustomDataProvider.IsGridMode: Boolean; -begin - Result := False; -end; - -function TcxCustomDataProvider.IsDataSource: Boolean; -begin - Result := False; -end; - -function TcxCustomDataProvider.IsOtherInsert: Boolean; -begin - Result := False; -end; - -function TcxCustomDataProvider.IsRecordIdSupported: Boolean; -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - Result := CustomDataSource.IsRecordIdSupported; - end - else - Result := False; -end; - -function TcxCustomDataProvider.IsSyncMode: Boolean; -begin - Result := False; -end; - -// State - -function TcxCustomDataProvider.IsActive: Boolean; -begin - Result := CustomDataSource <> nil; -end; - -function TcxCustomDataProvider.IsActiveDataSet: Boolean; -begin - Result := False; -end; - -function TcxCustomDataProvider.IsBOF: Boolean; -begin - Result := True; -end; - -function TcxCustomDataProvider.IsChanging: Boolean; -begin - Result := FChanging; -end; - -function TcxCustomDataProvider.IsEditing: Boolean; -begin - Result := FEditingRecordIndex <> cxNullEditingRecordIndex; -end; - -function TcxCustomDataProvider.IsEOF: Boolean; -begin - Result := True; -end; - -function TcxCustomDataProvider.IsGridModeUpdating: Boolean; -begin - Result := False; -end; - -function TcxCustomDataProvider.IsInserting: Boolean; -begin - Result := IsEditing and FInserting; -end; - -function TcxCustomDataProvider.IsModified: Boolean; -begin - Result := FModified; -end; - -function TcxCustomDataProvider.IsUnboundColumnMode: Boolean; -begin - Result := not CanModify; // !!! -end; - -// Navigation - -procedure TcxCustomDataProvider.CorrectRecordIndex(ARecordIndex: Integer); -begin -end; - -procedure TcxCustomDataProvider.First; -begin - FRecreatedFieldsAfterFirst := False; -end; - -procedure TcxCustomDataProvider.Prev; -begin -end; - -procedure TcxCustomDataProvider.Next; -begin -end; - -procedure TcxCustomDataProvider.Last; -begin -end; - -procedure TcxCustomDataProvider.MoveBy(ADistance: Integer); -begin -end; - -procedure TcxCustomDataProvider.Scroll(ADistance: Integer); -begin -end; - -procedure TcxCustomDataProvider.SavePos; -begin -end; - -procedure TcxCustomDataProvider.RestorePos; -begin -end; - -// Editing - -function TcxCustomDataProvider.CanAppend: Boolean; -begin - Result := CanModify; -end; - -function TcxCustomDataProvider.CanInsert: Boolean; -begin - Result := CanModify; -end; - -function TcxCustomDataProvider.CanDelete: Boolean; -begin - Result := DataController.FilteredRecordCount > 0; -end; - -function TcxCustomDataProvider.CanInitEditing(ARecordIndex: Integer): Boolean; -begin - DataController.CheckRecordRange(ARecordIndex); - if not IsEditing then - SetEditing; - if IsEditing then - SetChanging; - Result := True; -end; - -function TcxCustomDataProvider.CanModify: Boolean; -begin - Result := True; -end; - -procedure TcxCustomDataProvider.Append; -begin - InsertingRecord(True); -end; - -procedure TcxCustomDataProvider.Cancel; -var - ARecordIndex: Integer; -begin - DataController.DoBeforeCancel; - DataController.BeginUpdate; - try - if (FEditingRecordIndex <> cxNullEditingRecordIndex) and - ((FEditingRecordIndex < DataController.RecordCount) or - (FEditingRecordIndex = DataController.FNewItemRecordIndex)) then - begin - if IsInserting then - begin - DataController.FInSmartLoad := DataController.IsSmartLoad; - try - ARecordIndex := DataController.GetFocusedRecordIndex; - DataController.DeleteRecord(FEditingRecordIndex); - if not DataController.FInCancel and - (ARecordIndex >= DataController.RecordCount) then - DataController.ChangeFocusedRecordIndex(ARecordIndex - 1); - finally - DataController.FInSmartLoad := False; - end; - end - else - if FSavedRecordIndex < 0 then - begin - DataController.CopyRecord(FSavedRecordIndex, FEditingRecordIndex); - end; - end; - ResetEditing; - finally - DataController.EndUpdate; - end; - DataController.DoAfterCancel; -end; - -procedure TcxCustomDataProvider.DoUpdateData; -begin - if FInUpdateData then Exit; - FInUpdateData := True; - try - if IsChanging then - DataController.UpdateData; - finally - FInUpdateData := False; - end; -end; - -procedure TcxCustomDataProvider.Delete; -var - ARecordIndex: Integer; -begin - ARecordIndex := DataController.DataControllerInfo.FocusedRecordIndex; - if ARecordIndex <> -1 then - begin - DataController.DoBeforeDelete(ARecordIndex); - if DataController.IsProviderMode then - DataController.SaveKeys; - try - DataController.DeleteRecord(ARecordIndex); - DataController.CheckNearestFocusRow; - finally - if DataController.IsProviderMode then - DataController.RestoreKeys; - end; - DataController.DoAfterDelete; - end; -end; - -procedure TcxCustomDataProvider.DeleteRecords(AList: TList); -var - I, ARecordIndex: Integer; -begin - if DataController.IsProviderMode then - DataController.SaveKeys; - try - DataController.BeginFullUpdate; - try - for I := AList.Count - 1 downto 0 do - begin - ARecordIndex := Integer(AList[I]); - DataController.DoBeforeDelete(ARecordIndex); - DataController.DeleteRecord(ARecordIndex); - DataController.DoAfterDelete; - end; - if DataController.FInDeleteSelection then - DataController.ClearSelection; - finally - DataController.EndFullUpdate; - end; -// if DataController.LockCount = 0 then - DataController.CheckNearestFocusRow; - finally - if DataController.IsProviderMode then - DataController.RestoreKeys; - end; -end; - -procedure TcxCustomDataProvider.DeleteSelection; -var - AList: TList; - I, ARowIndex: Integer; - ARowInfo: TcxRowInfo; -begin - AList := TList.Create; - try - for I := 0 to DataController.GetSelectedCount - 1 do - begin - ARowIndex := DataController.GetSelectedRowIndex(I); - ARowInfo := DataController.GetRowInfo(ARowIndex); - if ARowInfo.Level < DataController.Groups.LevelCount then // It's Group Row - DataController.Groups.LoadRecordIndexesByRowIndex(AList, ARowIndex) - else - AList.Add(Pointer(ARowInfo.RecordIndex)); - end; - // Delete Records - DataController.FInDeleteSelection := True; - try - DataController.DeleteRecords(AList); - finally - DataController.FInDeleteSelection := False; - end; -// DataController.ClearSelection; - finally - AList.Free; - end; -end; - -procedure TcxCustomDataProvider.Edit; -begin - SetEditing; -end; - -function TcxCustomDataProvider.GetEditValue(ARecordIndex: Integer; AField: TcxCustomDataField; - AEditValueSource: TcxDataEditValueSource): Variant; -begin - if ARecordIndex <> cxNullEditingRecordIndex then - Result := DataController.GetInternalValue(ARecordIndex, AField) - else - begin - Result := Null; - InvalidOperation(cxSDataRecordIndexError); - end; -end; - -procedure TcxCustomDataProvider.Insert; -begin - InsertingRecord(False); -end; - -procedure TcxCustomDataProvider.Post(AForcePost: Boolean); -var - ARecordIndex: Integer; - APostFlag: Boolean; -begin - DataController.BeginFullUpdate; - try - ARecordIndex := -1; - APostFlag := False; - DoUpdateData; - if IsInserting and not IsModified and not AForcePost then - Cancel - else - begin - APostFlag := True; - DataController.DoBeforePost; - ARecordIndex := FEditingRecordIndex; - if IsInserting and DataController.UseNewItemRowForEditing and - (FEditingRecordIndex <> cxNullEditingRecordIndex) then - begin - FDataChangedLocked := CustomDataSource <> nil; - try - FInsertedRecordIndex := DataController.AppendRecord; - ARecordIndex := FInsertedRecordIndex; - finally - FDataChangedLocked := False; - end; - DataController.CopyRecord(FEditingRecordIndex, FInsertedRecordIndex); - end; - ResetEditing; - end; - DataController.DataChanged(dcRecord, -1, ARecordIndex); - if APostFlag then - DataController.DoAfterPost; - finally - DataController.EndFullUpdate; - end; -end; - -procedure TcxCustomDataProvider.PostEditingData; -begin - DoUpdateData; - ResetChanging; -end; - -function TcxCustomDataProvider.SetEditValue(ARecordIndex: Integer; AField: TcxCustomDataField; - const AValue: Variant; AEditValueSource: TcxDataEditValueSource): Boolean; -begin - if (AEditValueSource = evsText) and (VarToStr(AValue) = '') then - DataController.SetValue(ARecordIndex, AField.Index, Null) - else - DataController.SetValue(ARecordIndex, AField.Index, AValue); - SetModified; - Result := True; -end; - -procedure TcxCustomDataProvider.BeginDeleting; -var - ARowIndex: Integer; -begin - if not IsGridMode and (DataController.FocusedRowIndex <> -1) then - begin - ARowIndex := DataController.FocusedRowIndex; - if not DataController.MultiSelect or - (DataController.IsRowSelected(ARowIndex) or (DataController.GetSelectedCount = 0)) then - ARowIndex := DataController.GetNearestRowIndex(ARowIndex); - if ARowIndex <> -1 then - DataController.FNearestRecordIndex := DataController.GetRowInfo(ARowIndex).RecordIndex; - end; -end; - -procedure TcxCustomDataProvider.EndDeleting; -begin - DataController.FNearestRecordIndex := -1; -end; - -procedure TcxCustomDataProvider.AssignItemValue(ARecordIndex: Integer; - AField: TcxCustomDataField; const AValue: Variant); -begin - DataController.Values[ARecordIndex, AField.Index] := AValue; -end; - -procedure TcxCustomDataProvider.ClearSavedRecord; -begin - if FSavedRecordIndex < 0 then - begin - FDataController.DataStorage.DeleteRecord(FSavedRecordIndex); - FSavedRecordIndex := 0; - end; -end; - -procedure TcxCustomDataProvider.CreateSavedRecord(ARecordIndex: Integer); -begin - if FSavedRecordIndex = 0 then - FSavedRecordIndex := FDataController.DataStorage.AddInternalRecord; - FDataController.CopyRecord(ARecordIndex, FSavedRecordIndex); -end; - -procedure TcxCustomDataProvider.DoInitInsertingRecord(AInsertingRecordIndex: Integer; const AGroupValues: TcxDataSummaryValues); -var - I: Integer; -begin - if (DataController.Groups.GroupingItemCount > 0) and - (dcoAssignGroupingValues in DataController.Options) then - begin - for I := 0 to DataController.Groups.GroupingItemCount - 1 do - AssignItemValue(AInsertingRecordIndex, - DataController.Fields[DataController.Groups.GroupingItemIndex[I]], - AGroupValues[I]); - end; - DataController.DoNewRecord(AInsertingRecordIndex); -end; - -procedure TcxCustomDataProvider.EditingRecord; -var - ARowIndex: Integer; -begin - if DataController.UseNewItemRowForEditing and DataController.NewItemRowFocused and - not IsInserting then - begin - Insert; - Exit; - end; - FEditingRecordIndex := DataController.CalcEditingRecordIndex; - - if FEditingRecordIndex >= 0 then - begin - FEditingRecordIndex1 := cxNullEditingRecordIndex; - FEditingRecordIndex2 := cxNullEditingRecordIndex; - ARowIndex := DataController.GetFocusedRowIndex; - if ARowIndex <> -1 then - begin - if ARowIndex < (DataController.GetRowCount - 1) then - begin - ARowIndex := ARowIndex + 1; - FEditingRecordIndex2 := DataController.GetRowInfo(ARowIndex).RecordIndex; - end - else - begin - ARowIndex := ARowIndex - 1; - if 0 <= ARowIndex then - FEditingRecordIndex1 := DataController.GetRowInfo(ARowIndex).RecordIndex - else - FEditingRecordIndex1 := DataController.GetRowInfo(DataController.GetFocusedRowIndex).RecordIndex; - end; - end; - end; - - if FEditingRecordIndex = cxNullEditingRecordIndex then Exit; - if (not IsDataSource or DataController.IsSmartRefresh) and not IsInserting then // !!! - CreateSavedRecord(FEditingRecordIndex); - DataController.Change([dccUpdateRecord]); -end; - -procedure TcxCustomDataProvider.InsertingRecord(AIsAppending: Boolean); -var - ARowIndex, ARecordIndex: Integer; - AGroupValues: TcxDataSummaryValues; -begin - // TODO: proc - if not IsDataSource and IsInserting and not IsChanging and not IsModified then Exit; - if IsEditing and (IsChanging or IsModified) and not IsDataSource then - begin - if IsChanging then - PostEditingData; - Post; - end; - // - DataController.DoBeforeInsert; - DataController.BeginUpdate; - try - if DataController.UseNewItemRowForEditing then - begin - ARecordIndex := DataController.GetFocusedRecordIndex; - if (ARecordIndex < 0) and (DataController.GetRowCount > 0) then - ARecordIndex := DataController.GetRowInfo(0).RecordIndex; - FEditingRecordIndex := DataController.NewItemRecordIndex; - DataController.NewItemRowFocused := True; - DataController.GetGroupValues(ARecordIndex, AGroupValues); - end - else - begin - if not AIsAppending then - DataController.ClearSelection; // TODO: ? - if IsGridMode then - begin - ARecordIndex := DataController.GetActiveRecordIndex; //DataController.GetFocusedRecordIndex; - DataController.GetGroupValues(ARecordIndex, AGroupValues); - FEditingRecordIndex := ARecordIndex; - end - else - begin - if AIsAppending then - begin - ARecordIndex := DataController.GetLastRecordIndex; - DataController.GetGroupValues(ARecordIndex, AGroupValues); - FEditingRecordIndex := DataController.AppendRecord; - FEditingRecordIndex1 := ARecordIndex; - end - else - begin - ARowIndex := DataController.GetFocusedRowIndex; - if ARowIndex <> -1 then - ARecordIndex := DataController.GetRowInfo(ARowIndex).RecordIndex - else - ARecordIndex := 0; - DataController.GetGroupValues(ARecordIndex, AGroupValues); - FEditingRecordIndex := DataController.InsertRecord(ARecordIndex); - FEditingRecordIndex2 := ARecordIndex; - if (FEditingRecordIndex <= ARecordIndex) and - (FEditingRecordIndex2 < DataController.RecordCount - 1) then - Inc(FEditingRecordIndex2); - end; - end; - end; - DoInitInsertingRecord(FEditingRecordIndex, AGroupValues); - ResetChanging; - FInserting := True; - finally - DataController.EndUpdate; - end; - DataController.ChangeFocusedRecordIndex(FEditingRecordIndex); - DataController.DoAfterInsert; -end; - -procedure TcxCustomDataProvider.ResetChanging; -begin - FChanging := False; -end; - -procedure TcxCustomDataProvider.ResetEditing; -begin - if (FEditingRecordIndex <> cxNullEditingRecordIndex) and - (FEditingRecordIndex = DataController.FNewItemRecordIndex) and - (DataController.FNewItemRecordIndex < 0{is real new item row}) then - FDataController.DataStorage.DeleteRecord(FEditingRecordIndex); - FEditingRecordIndex := cxNullEditingRecordIndex; - FEditingRecordIndex1 := cxNullEditingRecordIndex; - FEditingRecordIndex2 := cxNullEditingRecordIndex; - FInserting := False; - ResetChanging; - ResetModified; - ClearSavedRecord; -end; - -procedure TcxCustomDataProvider.ResetModified; -begin - FModified := False; -end; - -procedure TcxCustomDataProvider.SetChanging; -begin - FChanging := True; -end; - -procedure TcxCustomDataProvider.SetEditing; -begin - EditingRecord; -end; - -procedure TcxCustomDataProvider.SetModified; -begin - FModified := True; -end; - -// Lock Notify - -procedure TcxCustomDataProvider.BeginLocate; -begin - Inc(FLocateCount); -end; - -procedure TcxCustomDataProvider.EndLocate; -begin - Dec(FLocateCount); -end; - -procedure TcxCustomDataProvider.Freeze; -begin - Inc(FLockCount); -end; - -procedure TcxCustomDataProvider.Unfreeze; -begin - Dec(FLockCount); -end; - -// Data - -function TcxCustomDataProvider.AddRecordHandle(AData: Pointer): Integer; -begin - Result := -1; - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - Result := CustomDataSource.AddRecordHandle(AData); - end; -end; - -function TcxCustomDataProvider.AppendRecord: Integer; -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - Result := CustomDataSource.GetRecordIndexByHandle(CustomDataSource.AppendRecord); - end - else - Result := -1; -end; - -procedure TcxCustomDataProvider.DeleteRecord(ARecordIndex: Integer); -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - CustomDataSource.DeleteRecord(CustomDataSource.GetRecordHandleByIndex(ARecordIndex)); - end; -end; - -function TcxCustomDataProvider.GetDetailHasChildren(ARecordIndex, ARelationIndex: Integer): Boolean; -begin - Result := False; - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - Result := CustomDataSource.GetDetailHasChildren(ARecordIndex, ARelationIndex); - end; -end; - -function TcxCustomDataProvider.GetDisplayText(ARecordIndex: Integer; AField: TcxCustomDataField): string; -var - ARecordHandle: TcxDataRecordHandle; - AItemHandle: TcxDataItemHandle; -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - ARecordHandle := CustomDataSource.GetRecordHandleByIndex(ARecordIndex); - AItemHandle := CustomDataSource.GetItemHandle(AField.Index); - Result := CustomDataSource.GetDisplayText(ARecordHandle, AItemHandle); - end - else - Result := ''; -end; - -{function TcxCustomDataProvider.GetRecordCount: Integer; -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - Result := CustomDataSource.GetRecordCount; - end - else - Result := 0; -end;} - -function TcxCustomDataProvider.GetExternalDataDisplayText(ARecordIndex: Integer; - AField: TcxCustomDataField): string; -begin - Result := ''; -end; - -function TcxCustomDataProvider.GetExternalDataValue(ARecordIndex: Integer; - AField: TcxCustomDataField): Variant; -begin - Result := Null; -end; - -function TcxCustomDataProvider.GetRecordId(ARecordIndex: Integer): Variant; -var - ARecordHandle: TcxDataRecordHandle; -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - ARecordHandle := CustomDataSource.GetRecordHandleByIndex(ARecordIndex); - Result := CustomDataSource.GetRecordId(ARecordHandle); - end - else - Result := Null; -end; - -function TcxCustomDataProvider.GetRecordIndex: Integer; -begin - Result := -1; -end; - -function TcxCustomDataProvider.GetValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; -var - ARecordHandle: TcxDataRecordHandle; - AItemHandle: TcxDataItemHandle; -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - ARecordHandle := CustomDataSource.GetRecordHandleByIndex(ARecordIndex); - AItemHandle := CustomDataSource.GetItemHandle(AField.Index); - Result := CustomDataSource.GetValue(ARecordHandle, AItemHandle); - end - else - Result := Null; -end; - -function TcxCustomDataProvider.GetValueDefReaderClass: TcxValueDefReaderClass; -begin - Result := TcxValueDefReader; -end; - -function TcxCustomDataProvider.InsertRecord(ARecordIndex: Integer): Integer; -var - ARecordHandle: TcxDataRecordHandle; -begin - Result := -1; - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - if CustomDataSource.GetRecordCount = 0 then - ARecordHandle := CustomDataSource.AppendRecord - else - ARecordHandle := CustomDataSource.InsertRecord(CustomDataSource.GetRecordHandleByIndex(ARecordIndex)); - Result := CustomDataSource.GetRecordIndexByHandle(ARecordHandle); - end; -end; - -procedure TcxCustomDataProvider.LoadDataBuffer; -begin -end; - -procedure TcxCustomDataProvider.LoadRecordHandles; -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - CustomDataSource.LoadRecordHandles; - end; -end; - -function TcxCustomDataProvider.NativeCompare(ARecordIndex1, ARecordIndex2: Integer; - AField: TcxCustomDataField): Integer; - - procedure GetCompareInfo(ARecordIndex: Integer; var IsNull: Boolean; var P: PAnsiChar); - var - ARecordHandle: TcxDataRecordHandle; - AItemHandle: TcxDataItemHandle; - begin - if ARecordIndex <= -1 then // internal record - IsNull := DataController.DataStorage.GetCompareInfo(ARecordIndex, AField.ValueDef, P) - else - begin - ARecordHandle := CustomDataSource.GetRecordHandleByIndex(ARecordIndex); - AItemHandle := CustomDataSource.GetItemHandle(AField.Index); - IsNull := not CustomDataSource.GetInfoForCompare(ARecordHandle, AItemHandle, P); - end; - end; - -var - AIsNull1, AIsNull2: Boolean; - P1, P2: PAnsiChar; -begin - if (ARecordIndex1 <= -1) and (ARecordIndex2 <= -1) then - Result := DataController.DataStorage.CompareRecords(ARecordIndex1, ARecordIndex2, AField.ValueDef) - else - begin - CustomDataSource.CurrentProvider := Self; - GetCompareInfo(ARecordIndex1, AIsNull1, P1); - GetCompareInfo(ARecordIndex2, AIsNull2, P2); - Result := AField.ValueDef.CompareValues(AIsNull1, AIsNull2, P1, P2); - end; -end; - -function TcxCustomDataProvider.NativeCompareFunc(ARecordIndex1, ARecordIndex2: Integer; - AField: TcxCustomDataField): Integer; -begin - CustomDataSource.CurrentProvider := Self; - with CustomDataSource do - Result := NativeCompareFunc(GetRecordHandleByIndex(ARecordIndex1), - GetRecordHandleByIndex(ARecordIndex2), GetItemHandle(AField.Index)); -end; - -procedure TcxCustomDataProvider.SetDisplayText(ARecordIndex: Integer; - AField: TcxCustomDataField; const Value: string); -begin -end; - -procedure TcxCustomDataProvider.SetRecordCount(ARecordCount: Integer); -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - CustomDataSource.SetRecordCount(ARecordCount); - end; -end; - -procedure TcxCustomDataProvider.SetValue(ARecordIndex: Integer; - AField: TcxCustomDataField; const Value: Variant); -var - ARecordHandle: TcxDataRecordHandle; - AItemHandle: TcxDataItemHandle; -begin - if CustomDataSource <> nil then - begin - CustomDataSource.CurrentProvider := Self; - ARecordHandle := CustomDataSource.GetRecordHandleByIndex(ARecordIndex); - AItemHandle := CustomDataSource.GetItemHandle(AField.Index); - CustomDataSource.SetValue(ARecordHandle, AItemHandle, Value); - end; -end; - -// Notification - -procedure TcxCustomDataProvider.ActiveChanged(AActive: Boolean); -begin - DataController.ActiveChanged(AActive); - ResetEditing; -end; - -procedure TcxCustomDataProvider.DataChanged(ADataChange: TcxDataChange; - AItemIndex, ARecordIndex: Integer); -begin - if (LockCount = 0) {and (LocateCount = 0) }then - DataController.DataChanged(ADataChange, AItemIndex, ARecordIndex); - if FDataChangedLocked then - ResetChanging - else - ResetEditing; -end; - -procedure TcxCustomDataProvider.DataScrolled(ADistance: Integer); -begin - DataController.DataScrolled(ADistance); - ResetChanging; -end; - -procedure TcxCustomDataProvider.LayoutChanged(ADataLayoutChanges: TcxDataLayoutChanges); -begin - DataController.LayoutChanged(ADataLayoutChanges); -end; - -procedure TcxCustomDataProvider.SetCustomDataSource(Value: TcxCustomDataSource); -begin - if not IsCustomDataSourceSupported then Exit; - if FCustomDataSource <> Value then - begin - if FCustomDataSource <> nil then - FCustomDataSource.RemoveProvider(Self); - FCustomDataSource := Value; - if FCustomDataSource <> nil then - FCustomDataSource.AddProvider(Self); - - DataController.FInSetCustomDataSource := True; - try - if not DataController.FDestroying then - DataController.RestructData; - finally - DataController.FInSetCustomDataSource := False; - end; - end; -end; - -{ TcxCustomDataField } - -constructor TcxCustomDataField.Create(AFieldList: TcxCustomDataFieldList); -begin - inherited Create; - FFieldList := AFieldList; -end; - -destructor TcxCustomDataField.Destroy; -begin - FieldList.RemoveField(Self); - ClearData; - inherited Destroy; -end; - -function TcxCustomDataField.CanModify(AEditValueSource: TcxDataEditValueSource): Boolean; -begin - Result := Assigned(ValueDef) - or DataController.IsProviderMode {don't support cancel for ValueDef = nil}; -end; - -function TcxCustomDataField.IsUnbound: Boolean; -begin - Result := False; -end; - -function TcxCustomDataField.IsValueDefInternal: Boolean; -begin - Result := IsInternal; -end; - -procedure TcxCustomDataField.BeginRecreateData; -begin - if FLockRecreateData = 0 then - ClearData; - Inc(FLockRecreateData); -end; - -procedure TcxCustomDataField.Changed; -begin - if (FieldList.DataController.Provider.LockCount = 0) then - FieldList.DataController.Provider.LayoutChanged([lcStructure]); -end; - -procedure TcxCustomDataField.ClearData; -begin - if Assigned(FReferenceField) then Exit; - if Assigned(FValueDef) then - begin - FValueDef.Free; - FValueDef := nil; - end; -end; - -procedure TcxCustomDataField.CreateData; -var - ADataStorage: TcxDataStorage; -begin - if Assigned(FReferenceField) or (FValueTypeClass = nil) then Exit; - ClearData; - ADataStorage := FieldList.DataController.DataStorage; - FValueDef := ADataStorage.ValueDefs.Add(FValueTypeClass, IsInternal, TextStored, Self); -end; - -procedure TcxCustomDataField.EndRecreateData; -begin - Dec(FLockRecreateData); - if FLockRecreateData = 0 then - CreateData; -end; - -procedure TcxCustomDataField.Reassign(ASource: TcxCustomDataField); -begin - FReferenceField := nil; - FValueDef := ASource.FValueDef; - if FValueDef <> nil then - FValueDef.LinkObject := Self; - FValueTypeClass := ASource.FValueTypeClass; - ASource.FValueDef := nil; - ASource.FValueTypeClass := nil; -end; - -procedure TcxCustomDataField.RemoveNotification(AComponent: TComponent); -begin -end; - -function TcxCustomDataField.GetDataController: TcxCustomDataController; -begin - Result := FieldList.DataController; -end; - -function TcxCustomDataField.GetIndex: Integer; -begin - Result := FieldList.FItems.IndexOf(Self); -end; - -function TcxCustomDataField.GetNotifier: TComponent; -begin - Result := FieldList.DataController.Notifier; -end; - -function TcxCustomDataField.GetTextStored: Boolean; -begin - if Assigned(FReferenceField) then - Result := FReferenceField.TextStored - else - Result := FTextStored; -end; - -function TcxCustomDataField.GetValueDef: TcxValueDef; -begin - if Assigned(FReferenceField) then - Result := FReferenceField.ValueDef - else - Result := FValueDef; -end; - -function TcxCustomDataField.GetValueTypeClass: TcxValueTypeClass; -begin - if Assigned(FReferenceField) then - Result := FReferenceField.ValueTypeClass - else - Result := FValueTypeClass; -end; - -procedure TcxCustomDataField.SetIndex(Value: Integer); -var - ACurIndex: Integer; -begin - ACurIndex := Index; - if ACurIndex <> Value then - FieldList.FItems.Move(ACurIndex, Value); -end; - -procedure TcxCustomDataField.SetIsInternal(Value: Boolean); -begin - if FIsInternal <> Value then - begin - FIsInternal := Value; - FieldList.Update; - end; -end; - -procedure TcxCustomDataField.SetReferenceField(Value: TcxCustomDataField); -begin - if FReferenceField <> Value then - begin - if Value <> nil then - begin - while Value.FReferenceField <> nil do - Value := Value.FReferenceField; - end; - if Value <> Self then - begin - if FReferenceField = nil then - ValueTypeClass := nil; - FReferenceField := Value; - end; - end; -end; - -procedure TcxCustomDataField.SetTextStored(Value: Boolean); -begin - if Assigned(FReferenceField) then Exit; - if FTextStored <> Value then - begin - BeginRecreateData; - try - FTextStored := Value; - finally - EndRecreateData; - end; - end; -end; - -procedure TcxCustomDataField.SetValueTypeClass(Value: TcxValueTypeClass); -begin - if Assigned(FReferenceField) then Exit; - if FValueTypeClass <> Value then - begin - BeginRecreateData; - try - FValueTypeClass := Value; - finally - EndRecreateData; - end; - end; -end; - -{ TcxCustomDataFieldList } - -constructor TcxCustomDataFieldList.Create(ADataController: TcxCustomDataController); -begin - inherited Create; - FItems := TList.Create; - FDataController := ADataController; -end; - -destructor TcxCustomDataFieldList.Destroy; -begin - Clear; - FItems.Free; - inherited Destroy; -end; - -function TcxCustomDataFieldList.FieldByItem(AItem: TObject): TcxCustomDataField; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - if Items[I].Item = AItem then - begin - Result := Items[I]; - Break; - end; -end; - -procedure TcxCustomDataFieldList.ReassignFields(ADestroyedField: TcxCustomDataField); -var - I: Integer; - ACurrentField, ANewReferenceField: TcxCustomDataField; -begin - ANewReferenceField := nil; - for I := 0 to Count - 1 do - begin - ACurrentField := Items[I]; - if ACurrentField.ReferenceField = ADestroyedField then - begin - if ANewReferenceField = nil then - begin - ANewReferenceField := ACurrentField; - ACurrentField.Reassign(ADestroyedField); - end - else - ACurrentField.ReferenceField := ANewReferenceField; - end; - end; -end; - -procedure TcxCustomDataFieldList.Add(AField: TcxCustomDataField); -begin - if not AField.IsInternal then - FItems.Insert(ItemCount, AField) // Before Internal Fields - else - FItems.Add(AField); - Update; -end; - -procedure TcxCustomDataFieldList.Clear; -begin - while FItems.Count > 0 do - TcxCustomDataField(FItems.Last).Free; -end; - -procedure TcxCustomDataFieldList.RemoveField(AField: TcxCustomDataField); -var - ASavedField: TcxCustomDataField; -begin - FFieldDestroyed := True; - ASavedField := AField; -// DataController.RemoveField(AField); - ReassignFields(AField); - FItems.Remove(AField); - DataController.RemoveField(ASavedField); - Update; -end; - -procedure TcxCustomDataFieldList.RemoveNotification(AComponent: TComponent); -var - I: Integer; -begin - I := 0; - while I < Count do - begin - Items[I].RemoveNotification(AComponent); - Inc(I); - end; -end; - -procedure TcxCustomDataFieldList.Update; -var - I: Integer; -begin - FInternalCount := 0; - for I := 0 to Count - 1 do - if Items[I].IsInternal then - Inc(FInternalCount); -end; - -function TcxCustomDataFieldList.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxCustomDataFieldList.GetItem(Index: Integer): TcxCustomDataField; -begin - Result := TcxCustomDataField(FItems[Index]); -end; - -function TcxCustomDataFieldList.GetItemCount: Integer; -begin - Result := FItems.Count - FInternalCount; -end; - -{ TcxDetailInfoObject } - -destructor TcxDetailInfoObject.Destroy; -begin - LinkObject.Free; - inherited Destroy;; -end; - -{ TcxDetailObject } - -constructor TcxDetailObject.Create; -begin - inherited Create; - FActiveRelationIndex := -1; - FInfoObjects := TList.Create; -end; - -destructor TcxDetailObject.Destroy; -begin - Clear; - FInfoObjects.Free; - inherited Destroy; -end; - -procedure TcxDetailObject.Clear; -var - I: Integer; - AObject: TObject; -begin - for I := 0 to FInfoObjects.Count - 1 do - begin - AObject := TObject(FInfoObjects[I]); - FInfoObjects[I] := nil; - AObject.Free; - end; - FInfoObjects.Clear; -end; - -function TcxDetailObject.ClearHasChildrenFlag: Boolean; -var - I: Integer; - AInfoObject: TcxDetailInfoObject; -begin - Result := False; - for I := 0 to FInfoObjects.Count - 1 do - begin - AInfoObject := TcxDetailInfoObject(FInfoObjects[I]); - if AInfoObject <> nil then - begin - if not Result and AInfoObject.HasChildrenAssigned then - Result := True; - AInfoObject.HasChildrenAssigned := False; - end; - end; -end; - -procedure TcxDetailObject.ClearInfoObject(AIndex: Integer); -begin - TObject(FInfoObjects[AIndex]).Free; - FInfoObjects[AIndex] := nil; -end; - -procedure TcxDetailObject.CorrectCount(ARelations: TcxCustomDataRelationList); -var - I: Integer; -begin - if FInfoObjects.Count < ARelations.Count then - ListSetCount(FInfoObjects, ARelations.Count); - if FInfoObjects.Count > 0 then - begin - if FActiveRelationIndex < 0 then - FActiveRelationIndex := 0; - if FActiveRelationIndex >= ARelations.Count then // !!! - FActiveRelationIndex := ARelations.Count - 1; - // Check Hidden Levels - if ARelations[FActiveRelationIndex].DetailDataController = nil then - for I := 0 to ARelations.Count - 1 do - if ARelations[I].DetailDataController <> nil then - begin - FActiveRelationIndex := I; - Break; - end; - end - else - FActiveRelationIndex := -1; -end; - -function TcxDetailObject.GetInfoObject(Index: Integer): TcxDetailInfoObject; -begin - if (0 <= Index) and (Index < FInfoObjects.Count) then - Result := TcxDetailInfoObject(FInfoObjects[Index]) - else - Result := nil; -end; - -function TcxDetailObject.GetInfoObjectCount: Integer; -begin - if FInfoObjects <> nil then - Result := FInfoObjects.Count - else - Result := 0; -end; - -function TcxDetailObject.GetIsEmpty: Boolean; -var - I: Integer; -begin - Result := True; - for I := 0 to LinkObjectCount - 1 do - if LinkObjects[I] <> nil then - begin - Result := False; - Break; - end; -end; - -function TcxDetailObject.GetLinkObject(Index: Integer): TObject; -var - AInfoObject: TcxDetailInfoObject; -begin - Result := nil; - if (0 <= Index) and (Index < InfoObjectCount) then - begin - AInfoObject := InfoObjects[Index]; - if AInfoObject <> nil then - Result := AInfoObject.LinkObject; - end; -end; - -function TcxDetailObject.GetLinkObjectCount: Integer; -begin - Result := InfoObjectCount; -end; - -procedure TcxDetailObject.SetInfoObject(Index: Integer; Value: TcxDetailInfoObject); -begin - if Index >= FInfoObjects.Count then - ListSetCount(FInfoObjects, Index + 1); - FInfoObjects[Index] := Value; -end; - -procedure TcxDetailObject.SetLinkObject(Index: Integer; Value: TObject); -begin - if Index >= FInfoObjects.Count then - ListSetCount(FInfoObjects, Index + 1); - if FInfoObjects[Index] = nil then - FInfoObjects[Index] := TcxDetailInfoObject.Create; - TcxDetailInfoObject(FInfoObjects[Index]).LinkObject := Value; -end; - -{ TcxCustomDataRelation } - -constructor TcxCustomDataRelation.Create(ARelationList: TcxCustomDataRelationList; - AItem: TObject); -begin - inherited Create; - FItem := AItem; - ARelationList.AddItem(Self); -end; - -destructor TcxCustomDataRelation.Destroy; -begin - if FDetailDataController <> nil then - begin - FDetailDataController.SetMasterMode(nil, FDetailDataController.IsPattern); - FDetailDataController := nil; - end; - FRelationList.RemoveItem(Self); - inherited Destroy; -end; - -procedure TcxCustomDataRelation.Assign(ASource: TcxCustomDataRelation); -begin -end; - -procedure TcxCustomDataRelation.Changed; -begin - FRelationList.Changed(Self); -end; - -procedure TcxCustomDataRelation.RemoveDataField(ADataField: TcxCustomDataField); -begin -end; - -function TcxCustomDataRelation.GetDataController: TcxCustomDataController; -begin - Result := FRelationList.DataController; -end; - -function TcxCustomDataRelation.GetIndex: Integer; -begin - Result := FRelationList.FItems.IndexOf(Self); -end; - -{ TcxCustomDataRelationList } - -constructor TcxCustomDataRelationList.Create(ADataController: TcxCustomDataController); -begin - inherited Create; - FItems := TList.Create; - FDataController := ADataController; -end; - -destructor TcxCustomDataRelationList.Destroy; -begin - Clear; - FItems.Free; - inherited Destroy; -end; - -function TcxCustomDataRelationList.Add(AItem: TObject): TcxCustomDataRelation; -begin - Result := DataController.GetRelationClass.Create(Self, AItem); -end; - -procedure TcxCustomDataRelationList.Assign(ASource: TcxCustomDataRelationList); -var - I: Integer; -begin - BeginUpdate; - try - Clear; - for I := 0 to ASource.Count - 1 do - Add(ASource[I].Item).Assign(ASource[I]); - finally - EndUpdate; - end; -end; - -procedure TcxCustomDataRelationList.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TcxCustomDataRelationList.Clear; -var - I: Integer; -begin - BeginUpdate; - try - for I := Count - 1 downto 0 do - Items[I].Free; - finally - EndUpdate; - end; -end; - -function TcxCustomDataRelationList.ClearDetailObject(ARecordIndex, ARelationIndex: Integer): Boolean; -var - ADetailObject: TcxDetailObject; -begin - Result := False; - DataController.CheckRecordRange(ARecordIndex); - if Assigned(FDataField) then - begin - ADetailObject := GetValueAsDetailObject(ARecordIndex); - if Assigned(ADetailObject) then - begin - if ARelationIndex = -1 then - ADetailObject.Clear - else - ADetailObject.ClearInfoObject(ARelationIndex); - Result := True; - end; - end; -end; - -procedure TcxCustomDataRelationList.EndUpdate; -begin - Dec(FLockCount); - Changed(nil); -end; - -function TcxCustomDataRelationList.FindByItem(AItem: TObject): TcxCustomDataRelation; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - begin - if Items[I].Item = AItem then - begin - Result := Items[I]; - Break; - end; - end; -end; - -function TcxCustomDataRelationList.GetDetailObject(ARecordIndex: Integer): TcxDetailObject; - - procedure ResetMasterRelations(ADetailObject: TcxDetailObject); - var - I: Integer; - ADetailLinkObject: TObject; - begin - for I := 0 to ADetailObject.LinkObjectCount - 1 do - begin - ADetailLinkObject := ADetailObject.LinkObjects[I]; - if ADetailLinkObject <> nil then - DataController.GetDetailDataControllerByLinkObject(ADetailLinkObject).FMasterRelation := nil; - end; - end; - -begin - DataController.CheckRecordRange(ARecordIndex); - if Assigned(FDataField) then - begin - Result := GetValueAsDetailObject(ARecordIndex); - if IsEmpty then - begin - if Result <> nil then - begin - ResetMasterRelations(Result); - Result.Free; - Result := nil; - DataController.SetStoredValue(ARecordIndex, FDataField, - Integer(Result)); - end; - Exit; - end; - if Result = nil then - begin - Result := TcxDetailObject.Create; - Result.ActiveRelationIndex := DataController.GetDefaultActiveRelationIndex; - DataController.SetStoredValue(ARecordIndex, FDataField, - Integer(Result)); - end; - Result.CorrectCount(Self); - end - else - Result := nil; -end; - -function TcxCustomDataRelationList.IsDetailObjectExist(ARecordIndex, ARelationIndex: Integer): Boolean; -var - ADetailObject: TcxDetailObject; -begin - DataController.CheckRecordRange(ARecordIndex); - Result := False; - if Assigned(FDataField) then - begin - ADetailObject := GetValueAsDetailObject(ARecordIndex); - Result := Assigned(ADetailObject) and - (((ARelationIndex = -1) and not ADetailObject.IsEmpty) or - ((ARelationIndex <> -1) and (ADetailObject.LinkObjects[ARelationIndex] <> nil))); - end; -end; - -function TcxCustomDataRelationList.IsEmpty: Boolean; -var - APatternRelations: TcxCustomDataRelationList; - I: Integer; -begin - Result := True; - if DataController.GetPatternDataController <> nil then - begin - APatternRelations := DataController.GetPatternDataController.Relations; - for I := 0 to APatternRelations.Count - 1 do - if APatternRelations[I].DetailDataController <> nil then - begin - Result := False; - Break; - end; - end; -end; - -procedure TcxCustomDataRelationList.Move(ACurIndex, ANewIndex: Integer); -var - ARelation: TcxCustomDataRelation; -begin - if ACurIndex <> ANewIndex then - begin - ARelation := TcxCustomDataRelation(FItems[ACurIndex]); - FItems.Delete(ACurIndex); - FItems.Insert(ANewIndex, ARelation); - Changed(nil); - end; -end; - -procedure TcxCustomDataRelationList.RemoveByItem(AItem: TObject); -var - ARelation: TcxCustomDataRelation; -begin - ARelation := FindByItem(AItem); - if ARelation <> nil then - ARelation.Free; -end; - -procedure TcxCustomDataRelationList.Changed(ARelation: TcxCustomDataRelation); -begin - if LockCount = 0 then - Update(ARelation); -end; - -function TcxCustomDataRelationList.GetValueAsDetailObject(ARecordIndex: Integer): TcxDetailObject; -var - AValue: Variant; -begin - AValue := DataController.GetInternalValue(ARecordIndex, FDataField); - if VarIsNull(AValue) then - Result := nil - else - Result := TcxDetailObject(Integer(AValue)); -end; - -procedure TcxCustomDataRelationList.RemoveDataField(ADataField: TcxCustomDataField); -var - I: Integer; -begin - if ADataField = FDataField then - FDataField := nil; - for I := 0 to Count - 1 do - Items[I].RemoveDataField(ADataField); -end; - -procedure TcxCustomDataRelationList.Update(ARelation: TcxCustomDataRelation); -begin - DataController.BeginUpdate; - try - if Count = 0 then - FDataField.Free // FDataField <- nil (in RemoveDataField method) - else - if FDataField <> nil then - begin - DataController.ClearDetails; - end - else - begin - FDataField := DataController.AddInternalField; - FDataField.ValueTypeClass := TcxObjectValueType; - end; - DataController.UpdateRelations(ARelation); - finally - DataController.EndUpdate; - end; -end; - -procedure TcxCustomDataRelationList.AddItem(AItem: TcxCustomDataRelation); -begin - FItems.Add(AItem); - AItem.FRelationList := Self; - Changed(AItem); -end; - -function TcxCustomDataRelationList.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxCustomDataRelationList.GetItem(Index: Integer): TcxCustomDataRelation; -begin - Result := TcxCustomDataRelation(FItems[Index]); -end; - -procedure TcxCustomDataRelationList.RemoveItem(AItem: TcxCustomDataRelation); -begin - DataController.ClearDetailsMasterRelation(AItem); - FItems.Remove(AItem); - AItem.FRelationList := nil; - Changed(AItem); -end; - -{ TcxSortingFieldList } - -constructor TcxSortingFieldList.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TcxSortingFieldList.Destroy; -begin - Clear; - FItems.Free; - inherited Destroy; -end; - -procedure TcxSortingFieldList.AppendFrom(AList: TcxSortingFieldList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - if Find(AList[I].Field) = -1 then - Add(AList[I].Field, AList[I].SortOrder); -end; - -procedure TcxSortingFieldList.ChangeSorting(AField: TcxCustomDataField; ASortOrder: TcxDataSortOrder); -var - AIndex: Integer; -begin - AIndex := Find(AField); - if AIndex = -1 then - begin - if ASortOrder <> soNone then - Add(AField, ASortOrder); - end - else - if ASortOrder = soNone then - Delete(AIndex) - else - SetSortOrder(AIndex, ASortOrder); -end; - -procedure TcxSortingFieldList.CheckField(AField: TcxCustomDataField); -begin - if Find(AField) <> -1 then - Changed; -end; - -procedure TcxSortingFieldList.Clear; -begin - while Count > 0 do - Delete(0); -end; - -function TcxSortingFieldList.SortIndexByField(AField: TcxCustomDataField): Integer; -begin - Result := Find(AField); -end; - -function TcxSortingFieldList.SortOrderByField(AField: TcxCustomDataField): TcxDataSortOrder; -var - AIndex: Integer; -begin - AIndex := SortIndexByField(AField); - if AIndex <> -1 then - Result := Items[AIndex].SortOrder - else - Result := soNone; -end; - -procedure TcxSortingFieldList.Add(AField: TcxCustomDataField; ASortOrder: TcxDataSortOrder); -var - PInfo: PcxDataSortInfo; -begin - New(PInfo); - PInfo.Field := AField; - PInfo.SortOrder := ASortOrder; - FItems.Add(PInfo); - Changed; -end; - -procedure TcxSortingFieldList.Changed; -begin - if Assigned(FOnChanged) then FOnChanged; -end; - -procedure TcxSortingFieldList.Delete(Index: Integer); -begin - Dispose(PcxDataSortInfo(FItems[Index])); - FItems.Delete(Index); - Changed; -end; - -function TcxSortingFieldList.Find(AField: TcxCustomDataField): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if Items[I].Field = AField then - begin - Result := I; - Break; - end; -end; - -procedure TcxSortingFieldList.Insert(Index: Integer; AField: TcxCustomDataField; - ASortOrder: TcxDataSortOrder); -var - PInfo: PcxDataSortInfo; -begin - New(PInfo); - PInfo.Field := AField; - PInfo.SortOrder := ASortOrder; - FItems.Insert(Index, PInfo); - Changed; -end; - -procedure TcxSortingFieldList.Move(ACurIndex, ANewIndex: Integer); -begin - if ACurIndex <> ANewIndex then - begin - FItems.Move(ACurIndex, ANewIndex); - Changed; - end; -end; - -procedure TcxSortingFieldList.Remove(AField: TcxCustomDataField); -var - AIndex: Integer; -begin - AIndex := Find(AField); - if AIndex <> -1 then - Delete(AIndex); -end; - -procedure TcxSortingFieldList.SetSortOrder(Index: Integer; ASortOrder: TcxDataSortOrder); -begin - if PcxDataSortInfo(FItems[Index]).SortOrder <> ASortOrder then - begin - PcxDataSortInfo(FItems[Index]).SortOrder := ASortOrder; - Changed; - end; -end; - -function TcxSortingFieldList.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxSortingFieldList.GetItem(Index: Integer): TcxDataSortInfo; -begin - Result := PcxDataSortInfo(FItems[Index])^; -end; - -{ TcxGroupingFieldList } - -procedure TcxGroupingFieldList.ChangeGrouping(AField: TcxCustomDataField; AGroupIndex: Integer); -var - AIndex, ANewIndex: Integer; -begin - if AGroupIndex < 0 then - Remove(AField) - else - begin - ANewIndex := AGroupIndex; - AIndex := Find(AField); - if AIndex = -1 then - begin - if ANewIndex > Count then - ANewIndex := Count; - Insert(ANewIndex, AField, soAscending); - end - else - begin - if ANewIndex > (Count - 1) then - ANewIndex := Count - 1; - Move(AIndex, ANewIndex); - end; - end; -end; - -procedure TcxGroupingFieldList.ChangeSorting(AField: TcxCustomDataField; ASortOrder: TcxDataSortOrder); -begin - if ASortOrder = soNone then - ASortOrder := soAscending; - inherited ChangeSorting(AField, ASortOrder); -end; - -function TcxGroupingFieldList.GroupIndexByField(AField: TcxCustomDataField): Integer; -begin - Result := Find(AField); -end; - -procedure TcxGroupingFieldList.UpdateSorting(ASortingFieldList: TcxSortingFieldList); -var - I, AIndex: Integer; -begin - for I := 0 to Count - 1 do - begin - AIndex := ASortingFieldList.Find(Items[I].Field); - if AIndex <> -1 then - SetSortOrder(I, ASortingFieldList[AIndex].SortOrder) - else - SetSortOrder(I, soAscending); - end; -end; - -{ TcxDataGroups } - -constructor TcxDataGroups.Create; -begin - inherited Create; - FFields := TList.Create; - FItems := TList.Create; -end; - -destructor TcxDataGroups.Destroy; -begin - Clear; - FFields.Free; - FItems.Free; - inherited Destroy; -end; - -procedure TcxDataGroups.ChangeExpanding(ARowIndex: Integer; AExpanded, ARecursive: Boolean); -var - AItem: TcxDataGroupInfo; - I: Integer; -begin - if (Find(ARowIndex, AItem) <> -1) and Assigned(AItem) then - begin - AItem.Expanded := AExpanded; - if ARecursive and (AItem.Level < (LevelCount - 1)) then - begin - for I := AItem.BeginRecordListIndex to Count - 1 do - if Items[I].Level > AItem.Level then - Items[I].Expanded := AExpanded - else - Break; - end; - Rebuild; - end; -end; - -procedure TcxDataGroups.FullExpanding(AExpanded: Boolean); -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Expanded := AExpanded; - Rebuild; -end; - -function TcxDataGroups.GetChildCount(AIndex: Integer): Integer; -var - I, L: Integer; -begin - if AIndex = -1 then - Result := GetFirstLevelCount - else - begin - Result := 0; - if (0 <= AIndex) and (AIndex < Count) then - begin - L := Items[AIndex].Level + 1; - if L = LevelCount then - Result := Items[AIndex].EndRecordListIndex - Items[AIndex].BeginRecordListIndex + 1 - else - for I := Items[AIndex].BeginRecordListIndex to Items[AIndex].EndRecordListIndex do - if Items[I].Level = L then - Inc(Result); - end; - end; -end; - -function TcxDataGroups.GetChildIndex(AParentIndex, AIndex: Integer): Integer; -var - I, J, L: Integer; -begin - if AParentIndex = -1 then - Result := GetFirstLevelIndex(AIndex) - else - begin - Result := -1; - if (0 <= AParentIndex) and (AParentIndex < Count) and - (Items[AParentIndex].Level < (LevelCount - 1)) and - (0 <= AIndex) and (AIndex <= (Items[AParentIndex].EndRecordListIndex - Items[AParentIndex].BeginRecordListIndex)) then -// (Items[AParentIndex].BeginRecordListIndex <= AIndex) and -// (AIndex <= Items[AParentIndex].EndRecordListIndex) then - begin - L := Items[AParentIndex].Level + 1; - J := -1; - for I := Items[AParentIndex].BeginRecordListIndex to Items[AParentIndex].EndRecordListIndex do - if Items[I].Level = L then - begin - Inc(J); - if J = AIndex then - begin - Result := I; - Break; - end; - end; - end; - end; -end; - -function TcxDataGroups.GetChildRecordListIndex(AParentIndex, AIndex: Integer): Integer; -begin - Result := -1; - if (0 <= AParentIndex) and (AParentIndex < Count) and - (Items[AParentIndex].Level = (LevelCount - 1)) and - (0 <= AIndex) and (AIndex <= (Items[AParentIndex].EndRecordListIndex - Items[AParentIndex].BeginRecordListIndex)) then - begin - Result := Items[AParentIndex].BeginRecordListIndex + AIndex; - end; -end; - -function TcxDataGroups.GetDataRecordListIndex(AInfo: TcxDataGroupInfo): Integer; -begin - while AInfo.Level < LevelCount - 1 do - AInfo := Items[AInfo.BeginRecordListIndex]; - Result := AInfo.BeginRecordListIndex; -end; - -function TcxDataGroups.GetFirstLevelCount: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - if Items[I].Level = 0 then - Inc(Result); -end; - -function TcxDataGroups.GetFirstLevelIndex(AIndex: Integer): Integer; -var - I, J: Integer; -begin - Result := -1; - J := -1; - for I := 0 to Count - 1 do - if Items[I].Level = 0 then - begin - Inc(J); - if J = AIndex then - begin - Result := I; - Break; - end; - end; -end; - -function TcxDataGroups.GetIndexByRowIndex(ARowIndex: Integer): Integer; -begin - Result := GetIndexByRowIndexLevel(ARowIndex, -1); -end; - -function TcxDataGroups.GetIndexByRowIndexLevel(ARowIndex, ALevel: Integer): Integer; -var - AIndex: Integer; - AItem: TcxDataGroupInfo; -begin - Result := Find(ARowIndex, AItem); - if (Result = -1) and (AItem <> nil) then // if it is a data row, go to the nearest top group row - begin - ARowIndex := AItem.RowIndex; - Result := Find(ARowIndex, AItem); - end; - if (Result <> -1) and (ALevel <> -1) then - begin - AIndex := Result; - Result := -1; - if Items[AIndex].Level < ALevel then - begin - while AIndex < Count do - begin - AItem := Items[AIndex]; - if AItem.Level = ALevel then - begin - Result := AIndex; - Break; - end; - Inc(AIndex); - end; - end - else - begin - while AIndex >= 0 do - begin - AItem := Items[AIndex]; - if AItem.Level = ALevel then - begin - Result := AIndex; - Break; - end; - Dec(AIndex); - end; - end; - end; -end; - -function TcxDataGroups.GetLevel(AIndex: Integer): Integer; -begin - if (0 <= AIndex) and (AIndex < Count) then - Result := Items[AIndex].Level - else - Result := -1; -end; - -function TcxDataGroups.GetParentIndex(AChildIndex: Integer): Integer; -var - ALevel: Integer; -begin - Result := -1; - if (0 <= AChildIndex) and (AChildIndex < Count) then - begin - ALevel := Items[AChildIndex].Level; - while AChildIndex >= 0 do - begin - if Items[AChildIndex].Level < ALevel then - begin - Result := AChildIndex; - Break; - end - else - if ALevel = 0 then - Break; - Dec(AChildIndex); - end; - end; -end; - -procedure TcxDataGroups.Add(const ADataGroupInfo: TcxDataGroupInfo); -begin - with AddEmpty do - begin - RowIndex := ADataGroupInfo.RowIndex; - Expanded := ADataGroupInfo.Expanded; - Level := ADataGroupInfo.Level; - BeginRecordListIndex := ADataGroupInfo.BeginRecordListIndex; - EndRecordListIndex := ADataGroupInfo.EndRecordListIndex; - SummaryValues := ADataGroupInfo.SummaryValues; - end; -end; - -procedure TcxDataGroups.AddField(AField: TcxCustomDataField); -begin - FFields.Add(AField); -end; - -function TcxDataGroups.AddEmpty: TcxDataGroupInfo; -begin - Result := TcxDataGroupInfo.Create; - FItems.Add(Result); -end; - -procedure TcxDataGroups.Clear; -var - I: Integer; - AInfo: TcxDataGroupInfo; -begin - FFields.Clear; - for I := 0 to FItems.Count - 1 do - begin - AInfo := TcxDataGroupInfo(FItems[I]); - AInfo.Free; - end; - FItems.Clear; -end; - -function TcxDataGroups.Find(ARowIndex: Integer; var AItem: TcxDataGroupInfo): Integer; -var - L, H, I, C: Integer; -begin - AItem := nil; - Result := -1; - L := 0; - H := Count - 1; - if L <= H then - repeat - I := (L + H) div 2; - AItem := Items[I]; - C := AItem.RowIndex - ARowIndex; - if C = 0 then // It's Group - begin - AItem := GetTopVisibleItem(ARowIndex, I); - Result := I; - Break; - end - else - if C < 0 then - L := I + 1 - else - H := I - 1; - if L > H then - begin - AItem := Items[L - 1]; - Break; - end; - until False; -end; - -function TcxDataGroups.FindByIndex(ARecordListIndex, ALevel: Integer): Integer; -var - I, ALastLevel, AAnchor: Integer; - AItem: TcxDataGroupInfo; -begin - Result := -1; - AAnchor := -1; - ALastLevel := LevelCount - 1; - for I := 0 to Count - 1 do - begin - AItem := Items[I]; - if AItem.Level = ALevel then - AAnchor := I; - if (AItem.Level = ALastLevel) and - (AItem.BeginRecordListIndex <= ARecordListIndex) and - (ARecordListIndex <= AItem.EndRecordListIndex) then // only for Data rows - begin - Result := AAnchor; - Break; - end; - end; -end; - -function TcxDataGroups.IsVisible(AIndex: Integer): Boolean; -var - I: Integer; -begin - I := AIndex; - GetTopVisibleItem(Items[AIndex].RowIndex, I); - Result := I = AIndex; -end; - -function TcxDataGroups.MakeVisible(AIndex: Integer; AExpand: Boolean): Boolean; - - procedure ExpandItem(AItem: TcxDataGroupInfo); - begin - if not AItem.Expanded then - begin - AItem.Expanded := True; - Result := True; - end; - end; - -var - I, ALevel: Integer; - AItem: TcxDataGroupInfo; -begin - Result := False; - I := AIndex; - repeat - AItem := Items[I]; - if AExpand then - ExpandItem(AItem); - AExpand := True; - ALevel := AItem.Level; - if ALevel = 0 then - Break - else - while I > 0 do - begin - Dec(I); - if Items[I].Level < ALevel then - Break; - end; - until False; - if Result then - Rebuild; -end; - -function TcxDataGroups.GetField(Index: Integer): TcxCustomDataField; -begin - Result := TcxCustomDataField(FFields[Index]); -end; - -function TcxDataGroups.GetFieldCount: Integer; -begin - Result := FFields.Count; -end; - -function TcxDataGroups.GetItem(Index: Integer): TcxDataGroupInfo; -begin - Result := TcxDataGroupInfo(FItems[Index]); -end; - -function TcxDataGroups.GetItemCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxDataGroups.GetRowCount: Integer; -var - AItem: TcxDataGroupInfo; - I, ARowIndex: Integer; -begin - if Count > 0 then - begin - I := Count - 1; - AItem := Items[I]; - ARowIndex := AItem.RowIndex; - Result := ARowIndex + 1; - AItem := GetTopVisibleItem(ARowIndex, I); - if AItem.Expanded then - Inc(Result, AItem.EndRecordListIndex - AItem.BeginRecordListIndex + 1); // only for Data rows - end - else - Result := 0; -end; - -function TcxDataGroups.GetRowInfo(ARowIndex: Integer): TcxGroupsRowInfo; -var - AItem: TcxDataGroupInfo; -begin - Result.Expanded := False; - Result.Level := 0; - Result.RecordListIndex := 0; - if Find(ARowIndex, AItem) <> -1 then // Group - begin - Result.Level := AItem.Level; - Result.Expanded := AItem.Expanded; - Result.RecordListIndex := GetDataRecordListIndex(AItem); - end - else - if AItem <> nil then - begin - Result.Level := LevelCount; - Result.Expanded := False; - Result.RecordListIndex := AItem.BeginRecordListIndex + (ARowIndex - AItem.RowIndex - 1); - end; -end; - -function TcxDataGroups.GetTopVisibleItem(ARowIndex: Integer; var ACurIndex: Integer): TcxDataGroupInfo; -var - I, J: Integer; - AMaxLevel: Integer; - AItem: TcxDataGroupInfo; -begin - I := ACurIndex; - J := I; - AMaxLevel := Items[I].Level; - repeat - AItem := Items[I]; - if AItem.RowIndex <> ARowIndex then - Break; - // check level - if AItem.Level < AMaxLevel then - begin - AMaxLevel := AItem.Level; - if not AItem.Expanded then - J := I; - end; - if AItem.Level = 0 then - Break; - Dec(I); - until False; - Result := Items[J]; - ACurIndex := J; -end; - -procedure TcxDataGroups.Rebuild; -var - ACurIndex, ARowIndex: Integer; - - procedure SubItems(ALevel: Integer; AVisible: Boolean); - var - AItem: TcxDataGroupInfo; - begin - Inc(ACurIndex); - while ACurIndex < Count do - begin - AItem := Items[ACurIndex]; - if AItem.Level = ALevel then - begin - AItem.RowIndex := ARowIndex; - if AVisible and AItem.Expanded and (AItem.Level = (LevelCount - 1)) then - Inc(ARowIndex, AItem.EndRecordListIndex - AItem.BeginRecordListIndex + 1) - else - begin - if AVisible and AItem.Expanded then - Inc(ARowIndex); - SubItems(AItem.Level + 1, AVisible and AItem.Expanded); - end; - end - else - begin - if AVisible then Dec(ARowIndex); - Dec(ACurIndex); - Break; - end; - Inc(ACurIndex); - if AVisible then Inc(ARowIndex); - end; - end; - -begin - ACurIndex := -1; - ARowIndex := 0; - SubItems(0, True); -end; - -procedure TcxDataGroups.SetItem(AIndex: Integer; AItem: TcxDataGroupInfo); -begin - FItems[AIndex] := AItem; -end; - -{ TcxDataFocusingInfo } - -constructor TcxDataFocusingInfo.Create(ADataControllerInfo: TcxCustomDataControllerInfo); -begin - inherited Create; - FDataControllerInfo := ADataControllerInfo; - FLevel := -1; - FPrevRecordIndex := -1; - FRecordIndex := -1; - FRowIndex := -1; -end; - -procedure TcxDataFocusingInfo.Assign(AFocusingInfo: TcxDataFocusingInfo); -begin - FLevel := AFocusingInfo.Level; - FPrevRecordIndex := AFocusingInfo.FPrevRecordIndex; - FRecordIndex := AFocusingInfo.RecordIndex; - FRowIndex := AFocusingInfo.RowIndex; - FChangedFlag := False; - FPrevNewItemRowFocused := False; -end; - -procedure TcxDataFocusingInfo.Clear; -begin - FLevel := -1; - FRecordIndex := -1; - FRowIndex := -1; -end; - -function TcxDataFocusingInfo.IsEqual(AFocusingInfo: TcxDataFocusingInfo): Boolean; -begin - Result := (Self.RecordIndex = AFocusingInfo.RecordIndex) and - (Self.Level = AFocusingInfo.Level) {and - (Self.RowIndex = AFocusingInfo.RowIndex)}; - if Result and (dcicSorting in FDataControllerInfo.FChanges) and - (Self.RowIndex <> AFocusingInfo.RowIndex) then - Result := False; -end; - -procedure TcxDataFocusingInfo.ResetPos; -begin - FLevel := -1; - FRecordIndex := FDataControllerInfo.DataController.GetRecordIndex; -end; - -procedure TcxDataFocusingInfo.SavePos; -begin - if RowIndex <> -1 then - begin - Level := FDataControllerInfo.GetRowInfo(RowIndex).Level; - RecordIndex := FDataControllerInfo.DataController.GetRecordIndex; - end - else - begin - Level := -1; - RecordIndex := -1; - end; - FPrevRecordIndex := FRecordIndex; -end; - -{ TcxDataExpandingInfos } - -constructor TcxDataExpandingInfos.Create; -begin - inherited Create; - FFields := TList.Create; - FItems := TList.Create; -end; - -destructor TcxDataExpandingInfos.Destroy; -begin - Clear; - FItems.Free; - FFields.Free; - inherited Destroy; -end; - -procedure TcxDataExpandingInfos.AddField(AField: TcxCustomDataField); -begin - if Find(AField) = -1 then - begin - FFields.Add(AField); - ClearValues; - end - else - InvalidOperation(cxSDataItemExistError); -end; - -procedure TcxDataExpandingInfos.AddItem(ALevel: Integer; const AValue: Variant; - AState: TcxDataExpandingInfoStateSet); -var - P: PcxDataExpandingInfo; -begin - New(P); - FItems.Add(P); - P.Level := ALevel; - P.Value := AValue; - P.State := AState; -end; - -procedure TcxDataExpandingInfos.CheckField(AField: TcxCustomDataField); -var - I: Integer; -begin - for I := 0 to FieldCount - 1 do - if Fields[I] = AField then - begin - Clear; - Exit; - end; -end; - -procedure TcxDataExpandingInfos.Clear; -begin - ClearFields; - ClearValues; - FSaveStates := []; -end; - -procedure TcxDataExpandingInfos.ClearFields; -begin - FFields.Clear; -end; - -procedure TcxDataExpandingInfos.ClearValues; -var - I: Integer; -begin - for I := 0 to FItems.Count - 1 do - Dispose(PcxDataExpandingInfo(FItems[I])); - FItems.Clear; -end; - -function TcxDataExpandingInfos.Find(AField: TcxCustomDataField): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to FieldCount - 1 do - if Fields[I] = AField then - begin - Result := I; - Break; - end; -end; - -function TcxDataExpandingInfos.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxDataExpandingInfos.GetEmpty: Boolean; -begin - Result := (Count = 0) or (FieldCount = 0); -end; - -function TcxDataExpandingInfos.GetFieldCount: Integer; -begin - Result := FFields.Count; -end; - -function TcxDataExpandingInfos.GetField(Index: Integer): TcxCustomDataField; -begin - Result := TcxCustomDataField(FFields[Index]); -end; - -function TcxDataExpandingInfos.GetItem(Index: Integer): PcxDataExpandingInfo; -begin - Result := PcxDataExpandingInfo(FItems[Index]); -end; - -{ TcxDataSelection } - -constructor TcxDataSelection.Create(ADataController: TcxCustomDataController); -begin - inherited Create; - FDataController := ADataController; - FFields := TList.Create; - FItems := TList.Create; - FAnchorRowIndex := -1; -end; - -destructor TcxDataSelection.Destroy; -begin - Clear; - FItems.Free; - FFields.Free; - inherited Destroy; -end; - -procedure TcxDataSelection.Add(AIndex, ARowIndex, ARecordIndex, ALevel: Integer); -begin - InternalAdd(AIndex, ARowIndex, ARecordIndex, ALevel); - Changed; -end; - -procedure TcxDataSelection.AddField(AField: TcxCustomDataField); -begin - FFields.Add(AField); -end; - -procedure TcxDataSelection.Clear; -begin - InternalClear; - Changed; -end; - -procedure TcxDataSelection.ClearAll; -begin - ClearAnchor; - InternalClear; - Changed; -end; - -procedure TcxDataSelection.ClearFields; -begin - FFields.Clear; -end; - -procedure TcxDataSelection.Delete(AIndex: Integer); -begin - InternalDelete(AIndex); - Changed; -end; - -function TcxDataSelection.FindByGroupIndex(AGroupIndex: Integer): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if (Items[I].Level = -1) {It's Group} and - (Items[I].RecordIndex = AGroupIndex) then - begin - Result := I; - Break; - end; -end; - -function TcxDataSelection.FindByRecordIndex(ARecordIndex: Integer): Integer; -var - I: Integer; -begin - // TODO: to optimize - Result := -1; - for I := 0 to Count - 1 do - if (Items[I].Level <> -1) {It's Detail} and - (Items[I].RecordIndex = ARecordIndex) then - begin - Result := I; - Break; - end; -end; - -function TcxDataSelection.FindByRowIndex(ARowIndex: Integer; var AIndex: Integer): Boolean; -var - L, H, I, C: Integer; -begin - AIndex := 0; - Result := False; - L := 0; - H := Count - 1; - if L <= H then - repeat - I := (L + H) div 2; - C := Items[I].RowIndex - ARowIndex; - if C = 0 then - begin - AIndex := I; - Result := True; - Break; - end - else - if C < 0 then - L := I + 1 - else - H := I - 1; - if L > H then - begin - AIndex := L; - Break; - end; - until False; -end; - -function TcxDataSelection.IsRecordSelected(ARecordIndex: Integer): Boolean; -begin - Result := FindByRecordIndex(ARecordIndex) <> -1; -end; - -function TcxDataSelection.IsRowSelected(ARowIndex: Integer): Boolean; -var - I: Integer; -begin - Result := FindByRowIndex(ARowIndex, I); -end; - -procedure TcxDataSelection.Sort; -begin - FItems.Sort(CompareSelectionList); -end; - -procedure TcxDataSelection.Changed; -begin - if Assigned(FOnChanged) then FOnChanged; -end; - -procedure TcxDataSelection.CheckAfterFiltering; -var - I: Integer; -begin - // TODO: opt - for I := Count - 1 downto 0 do - if Items[I].Level <> -1 then - if DataController.DataControllerInfo.GetInternalRecordListIndex(Items[I].RecordIndex) = -1 then - Delete(I); -end; - -procedure TcxDataSelection.ClearAnchor; -begin - FAnchorRowIndex := -1; -end; - -procedure TcxDataSelection.InternalAdd(AIndex, ARowIndex, ARecordIndex, ALevel: Integer); -var - P: PcxDataSelectionInfo; -begin - New(P); - P.Level := ALevel; - P.RecordIndex := ARecordIndex; - P.RowIndex := ARowIndex; - if AIndex = -1 then - FItems.Add(P) - else - FItems.Insert(AIndex, P); -end; - -procedure TcxDataSelection.InternalClear; -var - I: Integer; -begin - ClearFields; - for I := 0 to FItems.Count - 1 do - Dispose(PcxDataSelectioninfo(FItems[I])); - FItems.Clear; -end; - -procedure TcxDataSelection.InternalDelete(AIndex: Integer); -var - PInfo: PcxDataSelectioninfo; -begin - PInfo := PcxDataSelectioninfo(FItems[AIndex]); - if PInfo.RowIndex = FAnchorRowIndex then - ClearAnchor; - Dispose(PInfo); - FItems.Delete(AIndex); -end; - -procedure TcxDataSelection.SetInternalCount(ACount: Integer); -var - I: Integer; -begin - if ACount < Count then - begin - for I := Count - 1 downto ACount do - InternalDelete(I); - end - else - if ACount > Count then - begin - for I := Count to ACount - 1 do - InternalAdd(-1, I, I, 0); - end; -end; - -function TcxDataSelection.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxDataSelection.GetField(Index: Integer): TcxCustomDataField; -begin - Result := TcxCustomDataField(FFields[Index]); -end; - -function TcxDataSelection.GetFieldCount: Integer; -begin - Result := FFields.Count; -end; - -function TcxDataSelection.GetItem(Index: Integer): PcxDataSelectionInfo; -begin - Result := PcxDataSelectionInfo(FItems[Index]); -end; - -{ TcxCustomDataControllerInfo } - -constructor TcxCustomDataControllerInfo.Create(ADataController: TcxCustomDataController); -begin - inherited Create; - FDataController := ADataController; - FRecordList := TList.Create; - FGroupingFieldList := TcxGroupingFieldList.Create; - FGroupingFieldList.OnChanged := GroupingChanged; - FSortingFieldList := TcxSortingFieldList.Create; - FSortingFieldList.OnChanged := SortingChanged; - FTotalSortingFieldList := TcxSortingFieldList.Create; - FDataGroups := TcxDataGroups.Create; - FExpandingInfo := TcxDataExpandingInfos.Create; - FFocusingInfo := TcxDataFocusingInfo.Create(Self); - FPrevFocusingInfo := TcxDataFocusingInfo.Create(Self); - FSelection := DataController.GetDataSelectionClass.Create(DataController); - FSelection.OnChanged := SelectionChanged; -end; - -destructor TcxCustomDataControllerInfo.Destroy; -begin - FDataGroups.Free; - FTotalSortingFieldList.Free; - FSortingFieldList.Free; - FGroupingFieldList.Free; - FRecordList.Free; - FFocusingInfo.Free; - FPrevFocusingInfo.Free; - FExpandingInfo.Free; - FSelection.Free; - inherited Destroy; -end; - -procedure TcxCustomDataControllerInfo.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TcxCustomDataControllerInfo.EndUpdate; -begin - Dec(FLockCount); - CheckChanges; -end; - -procedure TcxCustomDataControllerInfo.CheckChanges; -begin - if (FChanges <> []) and (LockCount = 0) then - Update; -end; - -procedure TcxCustomDataControllerInfo.CheckRowIndex(ARowIndex: Integer); -begin - if not ((0 <= ARowIndex) and (ARowIndex < GetRowCount)) then - InvalidOperation(cxSDataRowIndexError); -end; - -procedure TcxCustomDataControllerInfo.Refresh; -begin - FChanges := FChanges + [dcicLoad]; - if not DataController.LockOnAfterSummary then - FChanges := FChanges + [dcicSummary]; - if SortingFieldList.Count <> 0 then - FChanges := FChanges + [dcicSorting]; - if GroupingFieldList.Count <> 0 then - FChanges := FChanges + [dcicGrouping]; - CheckChanges; -end; - -procedure TcxCustomDataControllerInfo.RefreshFocused; -begin - FChanges := FChanges + [dcicResetFocusedRow]; - FFocusingInfo.ResetPos; - CheckChanges; -end; - -procedure TcxCustomDataControllerInfo.RefreshSummary(ARedrawOnly: Boolean); -begin - if ARedrawOnly and not IsSortingBySummary then - FChanges := FChanges + [dcicView] - else - FChanges := FChanges + [dcicSummary]; - if IsSortingBySummary then - FChanges := FChanges + [dcicGrouping]; -{ if IsSortBySummary <> FIsSortBySummary then - begin - FIsSortBySummary := IsSortBySummary; - DataController.DoSortBySummaryChanged; - //FChanges := FChanges + [dcicGrouping]; - end;} - CheckChanges; -end; - -procedure TcxCustomDataControllerInfo.RefreshView; -begin - FChanges := FChanges + [dcicView]; - if not FInfoCalculation then - CheckChanges; -end; - -// Notify - -procedure TcxCustomDataControllerInfo.ExpandingChanged; -begin - FChanges := FChanges + [dcicExpanding]; - FExpandingFlag := True; -end; - -procedure TcxCustomDataControllerInfo.FocusedRecordChanged(AChangedFlag: Boolean); -begin - FChanges := FChanges + [dcicFocusedRecord]; //? - if AChangedFlag then - FPrevFocusingInfo.FChangedFlag := True; -end; - -procedure TcxCustomDataControllerInfo.GroupingChanged; -begin - FChanges := FChanges + [dcicSorting, dcicGrouping, dcicSummary]; -end; - -procedure TcxCustomDataControllerInfo.SelectionChanged; -begin - FChanges := FChanges + [dcicSelection]; - if [soSelectedRecords, soMultipleSelectedRecords] * DataController.Summary.Options <> [] then - FChanges := FChanges + [dcicSummary]; -end; - -procedure TcxCustomDataControllerInfo.SortingChanged; -begin - FChanges := FChanges + [dcicSorting]; -end; - -// Structure - -procedure TcxCustomDataControllerInfo.RemoveField(AField: TcxCustomDataField); -begin - FSortingFieldList.ChangeSorting(AField, soNone); - if FGroupingFieldList.Find(AField) <> -1 then FSelection.ClearAll; - FGroupingFieldList.ChangeGrouping(AField, -1); - FGroupingFieldList.UpdateSorting(FSortingFieldList); - FExpandingInfo.CheckField(AField); - CheckChanges; -end; - -procedure TcxCustomDataControllerInfo.UpdateField(AField: TcxCustomDataField); -begin - FChanges := FChanges + [dcicView]; - FSortingFieldList.CheckField(AField); - if FGroupingFieldList.Find(AField) <> -1 then FSelection.ClearAll; - FGroupingFieldList.CheckField(AField); - FExpandingInfo.CheckField(AField); - CheckChanges; -end; - -// Sorting - -procedure TcxCustomDataControllerInfo.ChangeSortIndex(AField: TcxCustomDataField; ASortIndex: Integer); -var - ACurIndex: Integer; -begin - ACurIndex := FSortingFieldList.Find(AField); - if ASortIndex < 0 then ASortIndex := 0; - if ASortIndex >= FSortingFieldList.Count then - ASortIndex := FSortingFieldList.Count - 1; - if ACurIndex <> ASortIndex then - begin - FSortingFieldList.Move(ACurIndex, ASortIndex); - DataController.BeforeSorting; - DataController.FSortingChanged := True; - CheckChanges; - end; -end; - -procedure TcxCustomDataControllerInfo.ChangeSorting(AField: TcxCustomDataField; - ASortOrder: TcxDataSortOrder); -begin - FSortingFieldList.ChangeSorting(AField, ASortOrder); - FGroupingFieldList.UpdateSorting(FSortingFieldList); - CheckChanges; -end; - -procedure TcxCustomDataControllerInfo.ClearSorting(AKeepGroupedItems: Boolean); -var - I, APrevCount: Integer; -begin - APrevCount := FSortingFieldList.Count; - if AKeepGroupedItems then - begin - for I := FSortingFieldList.Count - 1 downto 0 do - if FGroupingFieldList.Find(FSortingFieldList[I].Field) = -1 then - FSortingFieldList.Delete(I); - end - else - begin - FSortingFieldList.Clear; - FGroupingFieldList.UpdateSorting(FSortingFieldList); - end; - if FSortingFieldList.Count <> APrevCount then - begin - DataController.BeforeSorting; - DataController.FSortingChanged := True; - end; - CheckChanges; -end; - -// Grouping - -procedure TcxCustomDataControllerInfo.ChangeExpanding(ARowIndex: Integer; - AExpanded, ARecursive: Boolean); -begin - CheckRowIndex(ARowIndex); - if IsGrouped and not IsAlwaysExpanded then - begin - // TODO: CheckBrowseMode; if needed - if not AExpanded and (FocusedRowIndex <> -1) and - DataController.Groups.HasAsParent(FocusedRowIndex, ARowIndex) then - DataController.CheckBrowseMode; - DataGroups.ChangeExpanding(ARowIndex, AExpanded, ARecursive); - ExpandingChanged; - BeginUpdate; - try - if not AExpanded then - CheckAfterCollapsing; - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomDataControllerInfo.ChangeGrouping(AField: TcxCustomDataField; - AGroupIndex: Integer); -begin - FGroupingFieldList.ChangeGrouping(AField, AGroupIndex); - FGroupingFieldList.UpdateSorting(FSortingFieldList); - CheckChanges; -end; - -procedure TcxCustomDataControllerInfo.ClearGrouping; -begin - FGroupingFieldList.Clear; - CheckChanges; -end; - -procedure TcxCustomDataControllerInfo.FullCollapse; -begin - if IsGrouped and not IsAlwaysExpanded then - begin - DataGroups.FullExpanding(False); - ExpandingChanged; - BeginUpdate; - try - CheckAfterCollapsing; - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomDataControllerInfo.FullExpand; -begin - if IsGrouped and not IsAlwaysExpanded then - begin - DataGroups.FullExpanding(True); - ExpandingChanged; - CheckChanges; - end; -end; - -// View Data - -function TcxCustomDataControllerInfo.GetNearestRowIndex(ARowIndex: Integer): Integer; -begin - // TODO: ADeleteSelection - CheckRowIndex(ARowIndex); - if not IsGrouped then - begin - if (ARowIndex + 1) > (GetRowCount - 1) then // is last - Result := ARowIndex - 1 - else - Result := ARowIndex + 1; - end - else - begin - if ((ARowIndex + 1) <= (GetRowCount - 1)) and - (GetRowInfo(ARowIndex + 1).Level = GetRowInfo(ARowIndex).Level) then - Result := ARowIndex + 1 - else - begin - if ((ARowIndex - 1) >= 0) and - (GetRowInfo(ARowIndex - 1).Level = GetRowInfo(ARowIndex).Level) then - Result := ARowIndex - 1 - else - if (ARowIndex + 1) <= (GetRowCount - 1) then - Result := ARowIndex + 1 - else - if (ARowIndex - 1) >= 0 then - Result := ARowIndex - 1 - else - Result := ARowIndex; - end; - end; -end; - -function TcxCustomDataControllerInfo.GetRowCount: Integer; -begin - if IsGrouped then - Result := DataGroups.RowCount - else - Result := FRecordList.Count; -end; - -function TcxCustomDataControllerInfo.GetRowIndexByRecordIndex(ARecordIndex: Integer; - AMakeVisible: Boolean): Integer; -var - ARecordListIndex, AGroupIndex: Integer; -begin - Result := -1; - ARecordListIndex := GetInternalRecordListIndex(ARecordIndex); - if IsGrouped then - begin - AGroupIndex := DataGroups.FindByIndex(ARecordListIndex, DataGroups.LevelCount - 1); - if AGroupIndex <> -1 then - Result := LocateDetail(AGroupIndex, ARecordListIndex, AMakeVisible); - end - else - Result := ARecordListIndex; - if FExpandingFlag and AMakeVisible then - CheckChanges; -end; - -function TcxCustomDataControllerInfo.GetRowInfo(ARowIndex: Integer): TcxRowInfo; -var - AGroupsRowInfo: TcxGroupsRowInfo; -begin - CheckRowIndex(ARowIndex); - if IsGrouped then - AGroupsRowInfo := DataGroups.RowInfo[ARowIndex] - else - begin - AGroupsRowInfo.Level := 0; - AGroupsRowInfo.Expanded := False; - AGroupsRowInfo.RecordListIndex := ARowIndex; - end; - Result.Expanded := AGroupsRowInfo.Expanded; - Result.Level := AGroupsRowInfo.Level; - Result.RecordIndex := GetInternalRecordIndex(AGroupsRowInfo.RecordListIndex); -end; - -// Selection - -procedure TcxCustomDataControllerInfo.ChangeRowSelection(ARowIndex: Integer; ASelection: Boolean); -var - AIndex, AGroupIndex: Integer; - ARowInfo: TcxRowInfo; - AItem: TcxDataGroupInfo; -begin - CheckRowIndex(ARowIndex); - if Selection.FindByRowIndex(ARowIndex, AIndex) then - begin - if not ASelection then - Selection.Delete(AIndex); - end - else - begin - if ASelection and DataController.CanSelectRow(ARowIndex) then - begin - AGroupIndex := DataGroups.Find(ARowIndex, AItem); - if AGroupIndex <> -1 then // It's Group - Selection.Add(AIndex, ARowIndex, AGroupIndex, -1) - else - begin - ARowInfo := GetRowInfo(ARowIndex); - Selection.Add(AIndex, ARowIndex, ARowInfo.RecordIndex, ARowInfo.Level); - end; - end; - end; - CheckChanges; -end; - -procedure TcxCustomDataControllerInfo.ClearSelection; -begin - Selection.Clear; - CheckChanges; -end; - -procedure TcxCustomDataControllerInfo.ClearSelectionAnchor; -begin - Selection.ClearAnchor; -end; - -function TcxCustomDataControllerInfo.GetSelectedCount: Integer; -begin - Result := FSelection.Count; -end; - -function TcxCustomDataControllerInfo.GetSelectedRowIndex(Index: Integer): Integer; -begin - Result := Selection[Index].RowIndex; -end; - -function TcxCustomDataControllerInfo.IsRowSelected(ARowIndex: Integer): Boolean; -begin - CheckRowIndex(ARowIndex); - Result := Selection.IsRowSelected(ARowIndex); -end; - -function TcxCustomDataControllerInfo.CanFocusedRowChanging(ARowIndex: Integer): Boolean; -begin - FInCanFocusedRowChanging := True; - try - if ARowIndex <> -1 then - Result := DataController.CanFocusRecord(GetRowInfo(ARowIndex).RecordIndex) - else - Result := DataController.CanFocusRecord(-1); - finally - FInCanFocusedRowChanging := False; - end; -end; - -procedure TcxCustomDataControllerInfo.CorrectFocusedRow(ARowIndex: Integer); -begin - FFocusingInfo.Clear; - DoChangeFocusedRow(ARowIndex, False); -end; - -procedure TcxCustomDataControllerInfo.DoChangeFocusedRow(AValue: Integer; AIsInternal: Boolean); - - procedure CheckFocusedRanges(AFocusingInfo: TcxDataFocusingInfo); - begin - if AFocusingInfo.FRowIndex > (GetRowCount - 1) then - AFocusingInfo.FRowIndex := -1; - end; - - procedure SaveFocusedPos; - begin - FFocusingInfo.SavePos; - if (FFocusingInfo.RowIndex <> -1) and - (GetRowInfo(FFocusingInfo.RowIndex).RecordIndex <> FFocusingInfo.RecordIndex) then - begin - { error locate - Tried to set focus on a row, but it turned out, - that another row was focused (it is possible for DB, for example: - the key field is incorrect) } - FFocusingInfo.FRowIndex := FindFocusedRow(False); - CheckFocusedRanges(FFocusingInfo); - end; - end; - -var - AAllowChangeFocusedRow: Boolean; -begin - if AValue < -1 then AValue := -1; - if AValue > (GetRowCount - 1) then AValue := GetRowCount - 1; - if FFocusingInfo.RowIndex <> AValue then - begin - FFocusingFlag := True; - AAllowChangeFocusedRow := False; - try - if not (dcicFocusedRow in FChanges) then - FPrevFocusingInfo.Assign(FFocusingInfo); - AAllowChangeFocusedRow := AIsInternal or CanFocusedRowChanging(AValue); - if AAllowChangeFocusedRow then - begin - DataController.DoBeforeFocusedRowChange(AValue); - FFocusingInfo.FRowIndex := AValue; - end; - finally - CheckFocusedRanges(FPrevFocusingInfo); - CheckFocusedRanges(FFocusingInfo); - if (FPrevFocusingInfo.FRowIndex <> -1) or AAllowChangeFocusedRow then - SaveFocusedPos; - if not FFocusingInfo.IsEqual(FPrevFocusingInfo) then - begin - FChanges := FChanges + [dcicFocusedRecord, dcicFocusedRow]; - if DataController.IsFocusedSelectedMode and - (soSelectedRecords in DataController.Summary.Options) then - FChanges := FChanges + [dcicSummary]; - DataController.ResetNewItemRowFocused; - DataController.CheckDataSetCurrent; - DataController.SyncSelected(True); - end; - FFocusingFlag := False; - end; - end; -end; - -procedure TcxCustomDataControllerInfo.DoFilter; -var - I, APrevRecordCount: Integer; - AIsIncrementalFilter, AIsFiltering, AIsOnFilterRecord: Boolean; -begin - AIsIncrementalFilter := DataController.IsIncrementalFilter; - AIsFiltering := DataController.Filter.IsFiltering; - AIsOnFilterRecord := not DataController.IsGridMode and DataController.IsFilterRecord; - if not (AIsIncrementalFilter or AIsFiltering or AIsOnFilterRecord) then Exit; - APrevRecordCount := FRecordList.Count; - for I := FRecordList.Count - 1 downto 0 do - if I <> DataController.Provider.FEditingRecordIndex then // TODO: - begin - if AIsOnFilterRecord and - not DataController.DoFilterRecord(I) then - begin - FRecordList.Delete(I); - Continue; - end; - if AIsIncrementalFilter and - not DataController.DoIncrementalFilterRecord(I) then - begin - FRecordList.Delete(I); - Continue; - end; - if AIsFiltering and - not DataController.Filter.DoFilterRecord(I) then - begin - FRecordList.Delete(I); - Continue; - end; - end; - if FRecordList.Count <> APrevRecordCount then - begin - FSelection.CheckAfterFiltering; - if DataController.FCheckFocusingAfterFilterNeeded then - begin - DataController.FCheckFocusingAfterFilterNeeded := False; - DataController.FFilterChanged := True; - end; - end; -end; - -type - TcxDataGroupCompareInfo = record - Info: TcxDataGroupInfo; - RecordIndex: Integer; - end; - PcxDataGroupCompareInfo = ^TcxDataGroupCompareInfo; - -procedure TcxCustomDataControllerInfo.DoGrouping; -var - ACurLevels: TList; - ARowIndex: Integer; - ARecordIndex: Integer; - I, J: Integer; - - procedure BeginBuilding; - var - I: Integer; - ARecordIndex: Integer; - PCompareInfo: PcxDataGroupCompareInfo; - begin - ACurLevels := TList.Create; - ARecordIndex := GetInternalRecordIndex(0); - for I := 0 to FDataGroups.LevelCount - 1 do - begin - New(PCompareInfo); - PCompareInfo.RecordIndex := ARecordIndex; - PCompareInfo.Info := DataGroups.AddEmpty; - PCompareInfo.Info.RowIndex := ARowIndex; - PCompareInfo.Info.Expanded := False; - PCompareInfo.Info.Level := I; - if I < (FDataGroups.LevelCount - 1) then - PCompareInfo.Info.BeginRecordListIndex := I + 1 - else - PCompareInfo.Info.BeginRecordListIndex := 0; - ACurLevels.Add(PCompareInfo); - end; - end; - - procedure CloseGroups(ARecordListIndex, ALevelIndex: Integer); - begin - if ALevelIndex >= (FDataGroups.LevelCount - 1) then - begin - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info.EndRecordListIndex := ARecordListIndex - 1; - - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info := DataGroups.AddEmpty; - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info.RowIndex := ARowIndex; - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info.Expanded := False; - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info.Level := ALevelIndex; - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info.BeginRecordListIndex := ARecordListIndex; - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).RecordIndex := ARecordIndex; - end - else - begin - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info.EndRecordListIndex := DataGroups.Count - 1; - - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info := DataGroups.AddEmpty; - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info.RowIndex := ARowIndex; - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info.Expanded := False; - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info.Level := ALevelIndex; - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).Info.BeginRecordListIndex := DataGroups.Count; - PcxDataGroupCompareInfo(ACurLevels[ALevelIndex]).RecordIndex := ARecordIndex; - CloseGroups(ARecordListIndex, ALevelIndex + 1); - end; - end; - - procedure CloseBuilding; - var - I, AEndRecordListIndex: Integer; - begin - AEndRecordListIndex := FRecordList.Count - 1; - for I := FDataGroups.LevelCount - 1 downto 0 do - begin - PcxDataGroupCompareInfo(ACurLevels[I]).Info.EndRecordListIndex := AEndRecordListIndex; - if I = (FDataGroups.LevelCount - 1) then - AEndRecordListIndex := DataGroups.Count - 1 - else - AEndRecordListIndex := PcxDataGroupCompareInfo(ACurLevels[I]).Info.BeginRecordListIndex - 1; - end; - end; - - procedure EndBuilding; - var - I: Integer; - begin - for I := 0 to ACurLevels.Count - 1 do - Dispose(PcxDataGroupCompareInfo(ACurLevels[I])); - ACurLevels.Free; - end; - -begin - FDataGroups.Clear; - for I := 0 to GroupingFieldList.Count - 1 do - FDataGroups.AddField(GroupingFieldList[I].Field); - if (FRecordList.Count > 0) and (FDataGroups.LevelCount > 0) then - begin - ARowIndex := 0; - BeginBuilding; - try - PrepareSorting; - try - for I := 1 to FRecordList.Count - 1 do - begin - ARecordIndex := GetInternalRecordIndex(I); - for J := 0 to FDataGroups.LevelCount - 1 do - begin - if CompareGroupRecords(PcxDataGroupCompareInfo(ACurLevels[J]).RecordIndex, ARecordIndex, J) <> 0 then - begin - if J = 0 then Inc(ARowIndex); - CloseGroups(I, J); - Break; - end; - end; - end; - finally - UnprepareSorting; - end; - CloseBuilding; - finally - EndBuilding; - end; - end; -end; - -procedure TcxCustomDataControllerInfo.DoLoad; -var - I: Integer; -begin - ListSetCount(FRecordList, DataController.RecordCount); - for I := 0 to FRecordList.Count - 1 do - FRecordList[I] := Pointer(I); -end; - -procedure TcxCustomDataControllerInfo.DoSort; -begin - FTotalSortingFieldList.Clear; - FTotalSortingFieldList.AppendFrom(GroupingFieldList); - FTotalSortingFieldList.AppendFrom(SortingFieldList); - if not DataController.IsGridMode and (FRecordList.Count > 0) then - begin - PrepareSorting; - try - if DataController.IsProviderMode and - DataController.Provider.IsCustomSorting then - DataController.Provider.CustomSort - else - QuickSortList(FRecordList.List, 0, FRecordList.Count - 1, CompareRecords); - finally - UnprepareSorting; - end; - end; -end; - -procedure TcxCustomDataControllerInfo.DoBeginSummary; -begin - // Footer Summary can be calculated before DoSort if soSelectedRecords=False - if not IsSummaryForSelectedRecords then - DataController.Summary.BeginCalculate; -end; - -procedure TcxCustomDataControllerInfo.DoEndSummary; -begin - if not IsSummaryForSelectedRecords then - DataController.Summary.EndCalculate - else - DataController.Summary.Calculate; -end; - -function TcxCustomDataControllerInfo.FindDataGroup(ARecordListIndex: Integer): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to DataGroups.Count - 1 do - if (DataGroups[I].Level = (DataGroups.LevelCount - 1)) and - (DataGroups[I].BeginRecordListIndex <= ARecordListIndex) and - (ARecordListIndex <= DataGroups[I].EndRecordListIndex) then - begin - Result := I; - Break; - end; -end; - -function TcxCustomDataControllerInfo.FindFocusedRow(ANearest: Boolean): Integer; - - function FindFocused(ARecordListIndex, AGroupIndex: Integer): Integer; - begin - if FFocusingInfo.Level = -1 then - begin - if DataGroups[AGroupIndex].BeginRecordListIndex <> ARecordListIndex then // Seek Detail - Result := LocateDetail(AGroupIndex, ARecordListIndex, True) - else - Result := LocateGroupByLevel(AGroupIndex, -1); - end - else - begin - if FFocusingInfo.Level = DataGroups.LevelCount then // Seek Detail - Result := LocateDetail(AGroupIndex, ARecordListIndex, True) - else - begin - if DataGroups[AGroupIndex].BeginRecordListIndex = ARecordListIndex then - Result := LocateGroupByLevel(AGroupIndex, FFocusingInfo.Level) - else - Result := LocateDetail(AGroupIndex, ARecordListIndex, True) - end; - end; - end; - - function FindParentGroup(AIndex, ALevel: Integer): Integer; - var - I: Integer; - begin - Result := -1; - for I := AIndex downto 0 do - if DataGroups[I].Level = ALevel then - begin - Result := I; - Break; - end; - end; - - function FindNearest(ARecordListIndex, AGroupIndex: Integer): Integer; - var - I, ALevel: Integer; - AItem: TcxDataGroupInfo; - begin - if AGroupIndex <> -1 then - begin - I := AGroupIndex; - AItem := DataGroups.GetTopVisibleItem(DataGroups[AGroupIndex].RowIndex, I); - ALevel := FFocusingInfo.Level; - if ALevel = DataGroups.LevelCount then // Detail - begin - if (AGroupIndex = I) and DataGroups[AGroupIndex].Expanded then - begin - Result := AItem.RowIndex; - Inc(Result, ARecordListIndex - AItem.BeginRecordListIndex + 1); - Exit; - end - else - Dec(ALevel); - end; - if (ALevel < 0) and (AGroupIndex = I) then - begin - Result := AItem.RowIndex; - Exit; - end; - AGroupIndex := FindParentGroup(AGroupIndex, ALevel); - if AGroupIndex <> -1 then - Result := DataGroups[AGroupIndex].RowIndex - else - Result := -1; - end - else - Result := -1; - end; - -var - I: Integer; - ARecordListIndex, AGroupIndex: Integer; -begin - Result := -1; - if FFocusingInfo.RecordIndex < 0 then Exit; - ARecordListIndex := -1; - for I := 0 to FRecordList.Count - 1 do - if GetInternalRecordIndex(I) = FFocusingInfo.RecordIndex then - begin - ARecordListIndex := I; - Break; - end; - if ARecordListIndex <> -1 then - if IsGrouped then - begin - AGroupIndex := FindDataGroup(ARecordListIndex); // LastLevel Group - if ANearest then - Result := FindNearest(ARecordListIndex, AGroupIndex) - else - Result := FindFocused(ARecordListIndex, AGroupIndex); - end - else - Result := ARecordListIndex; -end; - -procedure TcxCustomDataControllerInfo.ForwardChanges; -var - ADataControllerChanges: TcxDataControllerChanges; -begin - ADataControllerChanges := []; - if [dcicSorting, dcicView] * FChanges <> [] then - ADataControllerChanges := [dccLayout]; - if [dcicLoad, dcicGrouping, dcicExpanding] * FChanges <> [] then - ADataControllerChanges := ADataControllerChanges + [dccData]; - if [dcicFocusedRow, dcicResetFocusedRow, dcicFocusedRecord] * FChanges <> [] then - ADataControllerChanges := ADataControllerChanges + [dccFocus]; - if dcicSelection in FChanges then - ADataControllerChanges := ADataControllerChanges + [dccSelection]; - if dcicSummary in FChanges then - ADataControllerChanges := ADataControllerChanges + [dccSummary]; - if DataController.FGroupingChanged then - ADataControllerChanges := ADataControllerChanges + [dccGrouping]; - if DataController.FSortingChanged then - ADataControllerChanges := ADataControllerChanges + [dccSorting]; - FChanges := []; - DataController.FGroupingChanged := False; - DataController.FSortingChanged := False; - DataController.FFilterChanged := False; - DataController.FSortingBySummaryChanged := False; - DataController.Change(ADataControllerChanges); - DataController.FLoadedStorage := False; -end; - -function TcxCustomDataControllerInfo.GetInternalRecordCount: Integer; -begin - Result := FRecordList.Count; -end; - -function TcxCustomDataControllerInfo.GetInternalRecordIndex(ARecordListIndex: Integer): Integer; -begin - Result := Integer(FRecordList[ARecordListIndex]); -end; - -function TcxCustomDataControllerInfo.GetInternalRecordListIndex(ARecordIndex: Integer): Integer; -begin - Result := FRecordList.IndexOf(Pointer(ARecordIndex)); -end; - -function TcxCustomDataControllerInfo.IsAlwaysExpanded: Boolean; -begin - Result := dcoGroupsAlwaysExpanded in DataController.Options; -end; - -function TcxCustomDataControllerInfo.IsGrouped: Boolean; -begin - Result := FDataGroups.Count > 0; -end; - -function TcxCustomDataControllerInfo.IsSummaryForSelectedRecords: Boolean; -begin - Result := (soSelectedRecords in DataController.Summary.Options) or - ((soMultipleSelectedRecords in DataController.Summary.Options) and (GetSelectedCount > 1)) -end; - -function TcxCustomDataControllerInfo.LocateGroupByLevel(AGroupIndex, ALevel: Integer): Integer; - - function FindParentGroup(AIndex: Integer): Integer; - var - I, ALevel: Integer; - begin - Result := -1; - ALevel := DataGroups[AIndex].Level - 1; - for I := AIndex downto 0 do - if DataGroups[I].Level = ALevel then - begin - Result := I; - Break; - end; - end; - -var - AParentGroupIndex: Integer; -begin - repeat - if DataGroups[AGroupIndex].Level = ALevel then - Break; - AParentGroupIndex := FindParentGroup(AGroupIndex); - if (AParentGroupIndex <> -1) and (DataGroups[AParentGroupIndex].BeginRecordListIndex = AGroupIndex) then - AGroupIndex := AParentGroupIndex - else - Break; - until False; - if DataGroups.MakeVisible(AGroupIndex, False) then - ExpandingChanged; - Result := DataGroups[AGroupIndex].RowIndex; -end; - -function TcxCustomDataControllerInfo.LocateDetail(AGroupIndex, ARecordListIndex: Integer; - AMakeVisible: Boolean): Integer; -begin - if not AMakeVisible and - not (DataGroups.IsVisible(AGroupIndex) and DataGroups[AGroupIndex].Expanded) then - Result := -1 - else - begin - if AMakeVisible and DataGroups.MakeVisible(AGroupIndex, True) then - ExpandingChanged; - Result := DataGroups[AGroupIndex].RowIndex + - ARecordListIndex - DataGroups[AGroupIndex].BeginRecordListIndex + 1; - end; -end; - -procedure TcxCustomDataControllerInfo.PrepareSorting; -var - I: Integer; -begin - for I := 0 to FTotalSortingFieldList.Count - 1 do - if DataController.IsConversionNeededForCompare(FTotalSortingFieldList[I].Field) then - begin - if DataController.IsSortByDisplayTextNeeded(FTotalSortingFieldList[I].Field) then - FTotalSortingFieldList[I].Field.FNeedConversionFlag := 2 - else - FTotalSortingFieldList[I].Field.FNeedConversionFlag := 1; - end - else - FTotalSortingFieldList[I].Field.FNeedConversionFlag := -1; -end; - -procedure TcxCustomDataControllerInfo.RecalcSelection; -var - I: Integer; -begin - for I := 0 to Selection.Count - 1 do - begin - if Selection[I].Level = -1 then // It's Group - Selection[I].RowIndex := DataGroups[Selection[I].RecordIndex].RowIndex - else - Selection[I].RowIndex := GetRowIndexByRecordIndex(Selection[I].RecordIndex, False); - end; -end; - -procedure TcxCustomDataControllerInfo.ResetFocusing; -begin - if DataController.FInNotifyControl then Exit; - if (dcoFocusTopRowAfterSorting in DataController.Options) and - (DataController.FGroupingChanged or DataController.FSortingChanged or - DataController.FLoadedStorage) then - begin - DataController.FLoadedStorage := False; - FFocusingInfo.Clear; - DoChangeFocusedRow(0, False); - if Selection.Count > 0 then - Selection.ClearAll; - end; -end; - -procedure TcxCustomDataControllerInfo.SaveExpanding(ASaveStates: TcxDataExpandingInfoStateSet); - - function IsValidInfo: Boolean; - var - I: Integer; - begin - Result := (DataGroups.FieldCount = GroupingFieldList.Count) and - (DataController.RecordCount > 0); - if Result then - for I := 0 to GroupingFieldList.Count - 1 do - if DataGroups.Fields[I] <> GroupingFieldList[I].Field then - begin - Result := False; - Break; - end; - end; - - procedure AddGroup(ADataGroupInfo: TcxDataGroupInfo; AGroupIndex: Integer; AExpanded: Boolean); - var - ARecordIndex: Integer; - AInfo: TcxDataGroupInfo; - AStateSet: TcxDataExpandingInfoStateSet; - begin - // begin proc - AInfo := ADataGroupInfo; - while AInfo.Level < (DataGroups.LevelCount - 1) do - AInfo := DataGroups[AInfo.BeginRecordListIndex]; - ARecordIndex := GetInternalRecordIndex(AInfo.BeginRecordListIndex); -// if DataController.Provider.IsInserting then // !!! -// begin -// if ARecordIndex >= DataController.Provider.FEditingRecordIndex then -// Inc(ARecordIndex); -// end; -// if ARecordIndex >= DataController.FDeletingRecordIndex then -// Dec(ARecordIndex); // !!! - // end proc - if ARecordIndex < DataController.RecordCount then - begin - AStateSet := []; - if AExpanded and ((Selection.Count > 0) or not IsAlwaysExpanded) then - AStateSet := AStateSet + [eisExpanded]; - if (eisSelected in FExpandingInfo.SaveStates) and - (Selection.FindByGroupIndex(AGroupIndex) <> -1) then - AStateSet := AStateSet + [eisSelected]; - if AStateSet <> [] then - FExpandingInfo.AddItem(ADataGroupInfo.Level, - DataController.GetComparedValue(ARecordIndex, GroupingFieldList[ADataGroupInfo.Level].Field), - AStateSet); - end; - end; - - procedure AddGroups; - var - I, AVisibleLevel: Integer; - ADataGroupInfo: TcxDataGroupInfo; - begin - I := 0; - AVisibleLevel := 0; - while I < DataGroups.Count do - begin - ADataGroupInfo := DataGroups[I]; - if ADataGroupInfo.Level <= AVisibleLevel then - begin - if ADataGroupInfo.Expanded then - begin - AddGroup(ADataGroupInfo, I, True); - AVisibleLevel := ADataGroupInfo.Level + 1; - end - else - begin - if eisSelected in FExpandingInfo.SaveStates then - AddGroup(ADataGroupInfo, I, False); - AVisibleLevel := ADataGroupInfo.Level; - end; - end; - Inc(I); - end; - end; - -var - I: Integer; -begin - if FExpandingInfo.SaveStates <> ASaveStates then - begin - if (ASaveStates <> []) and IsValidInfo then - begin - FExpandingInfo.SaveStates := ASaveStates; - FExpandingInfo.ClearFields; - for I := 0 to DataGroups.FieldCount - 1 do - FExpandingInfo.AddField(DataGroups.Fields[I]); - if IsGrouped then - AddGroups; - end - else - begin - FExpandingInfo.Clear; - FExpandingInfo.SaveStates := ASaveStates; - end; - end; -end; - -procedure TcxCustomDataControllerInfo.TruncateSelection; -var - I, ARecordCount: Integer; -begin - if FSelection.Count = 0 then Exit; - ARecordCount := DataController.RecordCount; - if ARecordCount = 0 then - FSelection.ClearAll - else - if (not DataController.FInDeleteSelection or DataController.FInLoadStorage) and - (not DataController.IsKeyNavigation or DataController.IsSmartRefresh or DataController.IsProviderMode) then - begin - for I := FSelection.Count - 1 downto 0 do - if FSelection[I].RecordIndex >= ARecordCount then - FSelection.Delete(I); - end; -end; - -procedure TcxCustomDataControllerInfo.UnprepareSorting; -var - I: Integer; -begin - for I := 0 to FTotalSortingFieldList.Count - 1 do - FTotalSortingFieldList[I].Field.FNeedConversionFlag := 0; -end; - -procedure TcxCustomDataControllerInfo.Update; -var - ASummaryChanged: Boolean; -begin - FInfoCalculation := True; - DataController.CheckMode; - if DataController.FSortingBySummaryChanged then - begin - FChanges := FChanges + [dcicSorting{, dcicGrouping, dcicSummary}]; - if not IsSortingBySummary then - FChanges := FChanges + [dcicGrouping, dcicSummary]; - end; - ASummaryChanged := ((dcicSummary in FChanges) {or SortBySummaryChanged}) and - ([csDestroying, csReading] * DataController.FOwner.ComponentState = []); - FExpandingFlag := False; - SaveInfo; - try - if dcicLoad in FChanges then - begin - DoLoad; - DoFilter; - end; - if ASummaryChanged then - DoBeginSummary; - if ([dcicSorting, dcicGrouping] * FChanges <> []) then - DoSort; - if dcicGrouping in FChanges then - begin - DataController.BeforeGroupingNotification; - DoGrouping; - end; - if ([dcicSorting, dcicGrouping] * FChanges <> []) then - ResetFocusing; - - CheckInfo; // AB7162 - if ASummaryChanged then - DoEndSummary; - if (([dcicSorting, dcicGrouping] * FChanges <> []) or ASummaryChanged) and - IsSortingBySummary then - begin - DoSortBySummary; - CheckInfo; // AB7162 - end; - - //CheckInfo; AB7162 - finally - ClearInfo; - if FExpandingFlag then - RecalcSelection; - if [dcicSorting, dcicExpanding] * FChanges <> [] then - DataController.CorrectPrevSelectionChangedInfo; - FInfoCalculation := False; - ForwardChanges; - end; -end; - -procedure TcxCustomDataControllerInfo.DoSortBySummary; -var - AEngine: TcxSortingBySummaryEngine; -begin - if DataController.GetSortingBySummaryEngineClass = nil then Exit; - AEngine := DataController.GetSortingBySummaryEngineClass.Create(Self); - try - AEngine.Sort; - finally - AEngine.Free; - end; -end; - -function TcxCustomDataControllerInfo.IsSortingBySummary: Boolean; -var - I: Integer; -begin - Result := False; - if DataController.Summary.Options * [soSelectedRecords, soMultipleSelectedRecords] <> [] then - Exit; - for I := 0 to GroupingFieldList.Count - 1 do - if DataController.Summary.GroupSummaryItems[I].SortedSummaryItem <> nil then - begin - Result := True; - Break; - end; -end; - -procedure TcxCustomDataControllerInfo.CheckAfterCollapsing; -var - ANewFocusedRowIndex: Integer; -begin - ANewFocusedRowIndex := FindFocusedRow(True); - if FFocusingInfo.RowIndex <> ANewFocusedRowIndex then - begin - if DataController.IsSmartRefresh then - CorrectFocusedRow(ANewFocusedRowIndex) - else - DoChangeFocusedRow(ANewFocusedRowIndex, False); - end; -// RecalcSelection; // TODO: check selection -end; - -procedure TcxCustomDataControllerInfo.CheckExpanding; -var - ASelectionCount, ACurIndex: Integer; - - function IsEqualFields: Boolean; - var - I: Integer; - begin - Result := FExpandingInfo.FieldCount = DataGroups.FieldCount; - if Result then - for I := 0 to DataGroups.FieldCount - 1 do - if FExpandingInfo.Fields[I] <> DataGroups.Fields[I] then - begin - Result := False; - Break; - end; - end; - - procedure PrepareSelection; - var - I, ALevel, ALevelCount: Integer; - begin - // Clear Groups - ALevelCount := DataGroups.LevelCount; - for I := Selection.Count - 1 downto 0 do - begin - ALevel := Selection[I].Level; - if (ALevel = -1) or (ALevel <> ALevelCount) then - Selection.Delete(I); - end; - end; - - function GroupNeedsRestoration(AExpandingInfo: PcxDataExpandingInfo): Boolean; - begin - Result := - (eisExpanded in AExpandingInfo.State) and (eisExpanded in FExpandingInfo.SaveStates) or - (eisSelected in AExpandingInfo.State); - end; - - procedure ExpandGroup(ARecordIndex, ALevel: Integer; AStateSet: TcxDataExpandingInfoStateSet); - var - I, ARecordListIndex: Integer; - begin - // begin proc - ARecordListIndex := GetInternalRecordListIndex(ARecordIndex); - I := DataGroups.FindByIndex(ARecordListIndex, ALevel); - // end proc - if I <> -1 then - begin - if (eisExpanded in AStateSet) and (eisExpanded in FExpandingInfo.SaveStates) then - DataGroups[I].Expanded := True; - if eisSelected in AStateSet then - Selection.Add(-1, -1, I, -1); - end; - end; - - procedure ExpandGroups; - var - ALocateObject: TcxDataControllerGroupLocateObject; - AValueDefReader: TcxValueDefUnboundReader; - I, ARecordIndex: Integer; - PExpandingInfo: PcxDataExpandingInfo; - begin - ALocateObject := TcxDataControllerGroupLocateObject.Create(DataController); - try - AValueDefReader := TcxValueDefUnboundReader.Create; - try - ALocateObject.Level := 0; - for I := 0 to FExpandingInfo.Count - 1 do - begin - PExpandingInfo := FExpandingInfo[I]; - if PExpandingInfo.Level < ALocateObject.Level then - AValueDefReader.Truncate(PExpandingInfo.Level); - AValueDefReader.SetValue(FExpandingInfo.Fields[PExpandingInfo.Level].ValueDef, - PExpandingInfo.Value); - if GroupNeedsRestoration(PExpandingInfo) then - begin - ALocateObject.Level := PExpandingInfo.Level; - ALocateObject.ReadData(AValueDefReader); - ARecordIndex := ALocateObject.FindRecordIndex; - if ARecordIndex <> -1 then - ExpandGroup(ARecordIndex, ALocateObject.Level, PExpandingInfo.State); - end; - end; - finally - AValueDefReader.Free; - end; - finally - ALocateObject.Free; - end; - end; - - procedure RebuildSelection; - - procedure CheckGroup(ADataGroupInfo: TcxDataGroupInfo); - begin - if (ADataGroupInfo.Level = (DataGroups.LevelCount - 1)) then - begin - // Delete Hidden - while (ACurIndex < ASelectionCount) and - (Selection[ACurIndex].RowIndex < ADataGroupInfo.BeginRecordListIndex) do - begin - Selection.Delete(ACurIndex); - Dec(ASelectionCount); - end; - // Skip Visible - if ADataGroupInfo.Expanded then - while (ACurIndex < ASelectionCount) and - (ADataGroupInfo.BeginRecordListIndex <= Selection[ACurIndex].RowIndex) and - (Selection[ACurIndex].RowIndex <= ADataGroupInfo.EndRecordListIndex) do - begin - Selection[ACurIndex].RowIndex := ADataGroupInfo.RowIndex + - (Selection[ACurIndex].RowIndex - ADataGroupInfo.BeginRecordListIndex + 1); - Inc(ACurIndex); - end; - end; - end; - - var - I, AVisibleLevel, AStartIndex: Integer; - ADataGroupInfo: TcxDataGroupInfo; - begin - if Selection.Count = 0 then Exit; - { - 1 - first is groups (with RowIndex = -1), second - Data Rows (with RowIndex = RecordListIndex) - 2 - locate begin of Data Rows - 3 - process Data Rows - if visible then correct RowIndex - else delete - 4 - fill RowIndex for Groups (Level = -1) - sort by RowIndex - } - // 1 - Sort Selection By : write RecordListIndex -> RowIndex (temporal) - for I := 0 to Selection.Count - 1 do - if Selection[I].Level <> -1 then - Selection[I].RowIndex := GetInternalRecordListIndex(Selection[I].RecordIndex) - else - Selection[I].RowIndex := -1; - Selection.Sort; - // 2 - - ASelectionCount := Selection.Count; - AStartIndex := ASelectionCount; - for I := 0 to ASelectionCount - 1 do - if Selection[I].RowIndex > -1 then - begin - AStartIndex := I; - Break; - end; - // 3 - - I := 0; - ACurIndex := AStartIndex; - AVisibleLevel := 0; - while (I < DataGroups.Count) and (ACurIndex < ASelectionCount) do - begin - ADataGroupInfo := DataGroups[I]; - if ADataGroupInfo.Level <= AVisibleLevel then - begin - CheckGroup(ADataGroupInfo); - if ADataGroupInfo.Expanded then - AVisibleLevel := ADataGroupInfo.Level + 1 - else - AVisibleLevel := ADataGroupInfo.Level; - end; - Inc(I); - end; - // Clear Hidden - for I := ACurIndex to ASelectionCount - 1 do - begin - Selection.Delete(ACurIndex); - Dec(ASelectionCount); - end; - // 4 - - for I := 0 to AStartIndex - 1 do // for Group's - Selection[I].RowIndex := DataGroups[Selection[I].RecordIndex].RowIndex; - Selection.Sort; - end; - - procedure RestoreRowsSelection; - var - I: Integer; - begin - if DataController.IsGridMode then Exit; - for I := 0 to Selection.Count - 1 do - Selection[I].RowIndex := GetInternalRecordListIndex(Selection[I].RecordIndex); - Selection.Sort; - end; - -var - ATempIndex: Integer; -begin - if IsGrouped and IsAlwaysExpanded then - DataGroups.FullExpanding(True); - if FExpandingInfo.SaveStates <> [] then - begin - if IsEqualFields then - begin - PrepareSelection; - if IsGrouped then - begin - try -// if not IsAlwaysExpanded then - ExpandGroups; - finally - if not IsAlwaysExpanded and (eisExpanded in FExpandingInfo.SaveStates) then - DataGroups.Rebuild; - RebuildSelection; - end; - end - else - if eisSelected in FExpandingInfo.SaveStates then - RestoreRowsSelection; - // check Selection Anchor - if (Selection.AnchorRowIndex <> -1) and - not Selection.FindByRowIndex(Selection.AnchorRowIndex, ATempIndex) then - Selection.ClearAnchor; - end - else - begin - if eisSelected in FExpandingInfo.SaveStates then - Selection.ClearAll; - end; - end; -end; - -procedure TcxCustomDataControllerInfo.CheckFocusing; -var - ANewFocusedRowIndex: Integer; -begin - ANewFocusedRowIndex := FindFocusedRow(False); - if FFocusingInfo.RowIndex <> ANewFocusedRowIndex then - begin - // check old row index - if (0 <= FFocusingInfo.RowIndex) and (FFocusingInfo.RowIndex < GetRowCount) and - (FFocusingInfo.RecordIndex = GetRowInfo(FFocusingInfo.RowIndex).RecordIndex) then - // do nothing - else - DoChangeFocusedRow(ANewFocusedRowIndex, True); - end; - if (dcicFocusedRow in FChanges) and (FPrevFocusingInfo.RowIndex >= GetRowCount) then - FPrevFocusingInfo.RowIndex := -1; - - if DataController.FFilterChanged then - CheckFocusingAfterFilter; -end; - -procedure TcxCustomDataControllerInfo.CheckFocusingAfterFilter; -begin - if (FocusedRowIndex = -1) and not DataController.NewItemRowFocused then - begin - DataController.FFilterChanged := False; - if {DataController.IsSmartRefresh and} (DataController.Provider.LocateCount = 0) then - CorrectFocusedRow(0); - end; -end; - -procedure TcxCustomDataControllerInfo.CheckInfo; -begin - CheckExpanding; - CheckFocusing; - DataController.CheckBookmarkValid(-1); -end; - -procedure TcxCustomDataControllerInfo.ClearInfo; -begin - FExpandingInfo.Clear; -end; - -function TcxCustomDataControllerInfo.CompareGroupRecords(ARecordIndex1, ARecordIndex2, AIndex: Integer): Integer; -var - AI, A1, A2: Integer; -begin - Result := 0; - if ARecordIndex1 = ARecordIndex2 then - Exit; - - if DataController.Provider.FSavedRecordIndex <> 0 then - begin - if ARecordIndex1 = DataController.Provider.FEditingRecordIndex then - ARecordIndex1 := DataController.Provider.FSavedRecordIndex - else - if ARecordIndex2 = DataController.Provider.FEditingRecordIndex then - ARecordIndex2 := DataController.Provider.FSavedRecordIndex; - end - else - begin - // check Inserting - see CompareRecords - A1 := DataController.Provider.FEditingRecordIndex1; - A2 := DataController.Provider.FEditingRecordIndex2; - if (A1 <> cxNullEditingRecordIndex) or (A2 <> cxNullEditingRecordIndex) then - begin - AI := DataController.Provider.FEditingRecordIndex; - if ARecordIndex1 = AI then - begin - if A1 <> cxNullEditingRecordIndex then // appending - begin - Result := 0; // !!! - Exit; - end - else // inserting - if ARecordIndex2 = A2 then - begin - Result := 0; // !!! - Exit; - end - else - ARecordIndex1 := A2; - end - else - if ARecordIndex2 = AI then - begin - if A1 <> cxNullEditingRecordIndex then // appending - begin - Result := 0; // !!! - Exit; - end - else // inserting - if ARecordIndex1 = A2 then - begin - Result := 0; // !!! - Exit; - end - else - ARecordIndex2 := A2; - end; - end; - end; - // compare - Result := DataController.CompareRecords(ARecordIndex1, ARecordIndex2, - FTotalSortingFieldList[AIndex], dccmGrouping); -end; - -function TcxCustomDataControllerInfo.CompareRecords(ARecord1, ARecord2: Pointer): Integer; -var - I, AI, A1, A2: Integer; -begin - Result := 0; - if ARecord1 = ARecord2 then - Exit; - - // check Inserting - A1 := DataController.Provider.FEditingRecordIndex1; - A2 := DataController.Provider.FEditingRecordIndex2; - if (A1 <> cxNullEditingRecordIndex) or (A2 <> cxNullEditingRecordIndex) then - begin - AI := DataController.Provider.FEditingRecordIndex; - if Integer(ARecord1) = AI then - begin - if A1 <> cxNullEditingRecordIndex then // appending - begin - Result := 1; - Exit; - end - else // inserting - if Integer(ARecord2) = A2 then - begin - Result := -1; - Exit; - end - else - Integer(ARecord1) := A2; - end - else - if Integer(ARecord2) = AI then - begin - if A1 <> cxNullEditingRecordIndex then // appending - begin - Result := -1; - Exit; - end - else // inserting - if Integer(ARecord1) = A2 then - begin - Result := 1; - Exit; - end - else - Integer(ARecord2) := A2; - end; - end; - - // compare - for I := 0 to FTotalSortingFieldList.Count - 1 do - begin - Result := DataController.CompareRecords(Integer(ARecord1), Integer(ARecord2), - FTotalSortingFieldList[I], dccmSorting); - if Result <> 0 then Exit; - end; - if Result = 0 then - Result := DataController.CompareEqualRecords(Integer(ARecord1), Integer(ARecord2)); -end; - -function TcxCustomDataControllerInfo.GetFocusedRecordIndex: Integer; -begin - if FFocusingInfo.RowIndex <> -1 then - Result := GetRowInfo(FFocusingInfo.RowIndex).RecordIndex - else - Result := -1; -end; - -function TcxCustomDataControllerInfo.GetFocusedRowIndex: Integer; -begin - Result := FFocusingInfo.RowIndex; -end; - -function TcxCustomDataControllerInfo.GetNewItemRowFocusingChanged: Boolean; -begin - Result := FPrevFocusingInfo.FChangedFlag; -end; - -function TcxCustomDataControllerInfo.GetPrevFocusedRecordIndex: Integer; -begin - Result := FPrevFocusingInfo.FPrevRecordIndex; -end; - -function TcxCustomDataControllerInfo.GetPrevFocusedRowIndex: Integer; -begin - Result := FPrevFocusingInfo.RowIndex; -end; - -procedure TcxCustomDataControllerInfo.SaveInfo; -var - ASaveStates: TcxDataExpandingInfoStateSet; -begin - ASaveStates := []; - if (dcoSaveExpanding in DataController.Options) or (Selection.Count > 0) then - begin - if (dcoSaveExpanding in DataController.Options) and - ([dcicLoad, dcicGrouping] * FChanges <> []) then - ASaveStates := ASaveStates + [eisExpanded]; - if (Selection.Count > 0) and - ([dcicLoad, dcicGrouping, dcicSorting, dcicExpanding] * FChanges <> []) then - ASaveStates := ASaveStates + [eisSelected]; - end; - SaveExpanding(ASaveStates); -end; - -procedure TcxCustomDataControllerInfo.SetFocusedRowIndex(Value: Integer); -begin - DataController.BeginFullUpdate; - //BeginUpdate; - try - DoChangeFocusedRow(Value, False); - finally -// EndUpdate; - DataController.EndFullUpdate; - end; -end; - -{ TcxDataFilterCriteriaItem } - -function TcxDataFilterCriteriaItem.GetDataValue(AData: TObject): Variant; -begin - if Assigned(Field) then - Result := DataController.GetFilterDataValue(Integer(AData), Field) - else - Result := Null; -end; - -function TcxDataFilterCriteriaItem.GetFieldCaption: string; -begin - if Assigned(Field) and (Field.Item <> nil) then - Result := DataController.GetFilterItemFieldCaption(Field.Item) - else - Result := ''; -end; - -function TcxDataFilterCriteriaItem.GetFieldName: string; -begin - if Assigned(Field) and (Field.Item <> nil) then - Result := DataController.GetFilterItemFieldName(Field.Item) - else - Result := ''; -end; - -function TcxDataFilterCriteriaItem.GetItemLink: TObject; -begin - if Assigned(Field) then - Result := Field.Item - else - Result := nil; // !!! -end; - -procedure TcxDataFilterCriteriaItem.SetItemLink(Value: TObject); -begin - if not (Value is TcxCustomDataField) then - Value := DataController.Fields.FieldByItem(Value); - inherited; -end; - -function TcxDataFilterCriteriaItem.GetDataController: TcxCustomDataController; -begin - Result := (Criteria as TcxDataFilterCriteria).DataController; -end; - -function TcxDataFilterCriteriaItem.GetField: TcxCustomDataField; -begin - Result := inherited GetItemLink as TcxCustomDataField; -end; - -{ TcxDataFilterValueList } - -procedure TcxDataFilterValueList.Load(AItemIndex: Integer; AInitSortByDisplayText: Boolean = True; - AUseFilteredValues: Boolean = False); - - procedure LoadRecords(var AUseFilteredRecords: Boolean; out ANullExists: Boolean); - var - AField: TcxCustomDataField; - I, ARecordIndex: Integer; - V: Variant; - begin - ANullExists := False; - AField := DataController.Fields[AItemIndex]; - if AUseFilteredRecords and (DataController.FilteredRecordCount <> 0) then - I := DataController.FilteredRecordCount - else - begin - AUseFilteredRecords := False; - I := DataController.RecordCount; - end; - for I := 0 to I - 1 do - begin - // TODO: ignore editing record - if AUseFilteredRecords then - ARecordIndex := DataController.FilteredRecordIndex[I] - else - ARecordIndex := I; - V := DataController.GetFilterDataValue(ARecordIndex, AField); - if Criteria.ValueIsNull(V) then - ANullExists := True - else - Add(fviValue, V, DataController.GetFilterDisplayText(ARecordIndex, AItemIndex), False); - end; - end; - - function NonBlanksFilterApplied: Boolean; - var - ACriteriaItem: TcxFilterCriteriaItem; - begin - ACriteriaItem := Criteria.FindItemByItemLink(DataController.GetItem(AItemIndex)); - Result := (ACriteriaItem <> nil) and (ACriteriaItem.Operator is TcxFilterNotNullOperator); - end; - -var - ANullExists: Boolean; -begin - Clear; - if AInitSortByDisplayText then - // SortByDisplayText := DataController.GetItemValueSource(AItemIndex) <> evsText; // TODO: Text for Lookup Field!!! - SortByDisplayText := DataController.IsFilterItemSortByDisplayText(AItemIndex); - Add(fviAll, Null, cxSFilterString(@cxSFilterBoxAllCaption), False); - Add(fviCustom, Null, cxSFilterString(@cxSFilterBoxCustomCaption), False); - if DataController.IsGridMode then - ANullExists := True // custom loading - else - LoadRecords(AUseFilteredValues, ANullExists); - if ANullExists then - Add(fviBlanks, Null, cxSFilterString(@cxSFilterBoxBlanksCaption), False); - if ANullExists or AUseFilteredValues and NonBlanksFilterApplied then - Add(fviNonBlanks, Null, cxSFilterString(@cxSFilterBoxNonBlanksCaption), False); - if Assigned((Criteria as TcxDataFilterCriteria).FOnGetValueList) then - (Criteria as TcxDataFilterCriteria).FOnGetValueList(Criteria, AItemIndex, Self); -end; - -function TcxDataFilterValueList.GetDataController: TcxCustomDataController; -begin - Result := (Criteria as TcxDataFilterCriteria).DataController; -end; - -{ TcxDataFilterCriteria } - -constructor TcxDataFilterCriteria.Create(ADataController: TcxCustomDataController); -begin - inherited Create; - FDataController := ADataController; - Version := cxDataFilterVersion; -end; - -destructor TcxDataFilterCriteria.Destroy; -begin - FDestroying := True; - if (FDataController <> nil) and (FDataController.FFilters <> nil) then - FDataController.FFilters.Remove(Self); - Active := False; - inherited Destroy; -end; - -procedure TcxDataFilterCriteria.Assign(Source: TPersistent; AIgnoreItemNames: Boolean = False); -begin - if Source is TcxDataFilterCriteria then - begin - BeginUpdate; - try - inherited; - Active := TcxDataFilterCriteria(Source).Active; - finally - EndUpdate; - end; - end - else - inherited; -end; - -procedure TcxDataFilterCriteria.AssignEvents(Source: TPersistent); -begin - inherited AssignEvents(Source); - if Source is TcxDataFilterCriteria then - OnGetValueList := TcxDataFilterCriteria(Source).OnGetValueList; -end; - -function TcxDataFilterCriteria.CreateValueList: TcxDataFilterValueList; -begin - Result := GetValueListClass.Create(Self) as TcxDataFilterValueList; -end; - -function TcxDataFilterCriteria.FindItemByItemLink(AItemLink: TObject): TcxFilterCriteriaItem; -begin - if not (AItemLink is TcxCustomDataField) then - AItemLink := DataController.Fields.FieldByItem(AItemLink); - Result := inherited FindItemByItemLink(AItemLink); -end; - -function TcxDataFilterCriteria.IsFiltering: Boolean; -begin - Result := Active and not IsEmpty and not DataController.IsGridMode; -end; - -procedure TcxDataFilterCriteria.RemoveItemByField(AField: TcxCustomDataField); -begin - RemoveItemByItemLink(AField); -end; - -procedure TcxDataFilterCriteria.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); - Filer.DefineBinaryProperty('Criteria', ReadData, WriteData, IsStore); -end; - -function TcxDataFilterCriteria.DoFilterRecord(ARecordIndex: Integer): Boolean; -begin - Result := DoFilterData(TObject(ARecordIndex)); -end; - -function TcxDataFilterCriteria.GetIDByItemLink(AItemLink: TObject): Integer; -begin - Result := DataController.GetItemID(AItemLink); -end; - -function TcxDataFilterCriteria.GetNameByItemLink(AItemLink: TObject): string; -begin - Result := DataController.GetItemName(AItemLink); -end; - -function TcxDataFilterCriteria.GetItemClass: TcxFilterCriteriaItemClass; -begin - Result := TcxDataFilterCriteriaItem; -end; - -function TcxDataFilterCriteria.GetItemLinkByID(AID: Integer): TObject; -begin - Result := DataController.FindItemByInternalID(AID); -end; - -function TcxDataFilterCriteria.GetItemLinkByName(const AName: string): TObject; -begin - Result := DataController.FindItemByName(AName); -end; - -function TcxDataFilterCriteria.GetValueListClass: TcxFilterValueListClass; -begin - Result := TcxDataFilterValueList; -end; - -function TcxDataFilterCriteria.IsDestroying: Boolean; -begin - Result := Destroying or DataController.IsDestroying; -end; - -function TcxDataFilterCriteria.IsInternal: Boolean; -begin - Result := (DataController <> nil) and (DataController.FFilters.IndexOf(Self) <> -1); -end; - -function TcxDataFilterCriteria.IsLoading: Boolean; -begin - Result := DataController.IsLoading; -end; - -procedure TcxDataFilterCriteria.Update; -begin - if not (IsInternal or IsDestroying or IsLoading) then - begin - if not DataController.Provider.IsDataSource then - DataController.Post; - DataController.FilterChanged; - if Assigned(OnChanged) then - OnChanged(Self); - end; -end; - -procedure TcxDataFilterCriteria.SetActive(Value: Boolean); -begin - if FActive <> Value then - begin - FActive := Value; - Changed; - end; -end; - -{ TcxDataFilterList } - -procedure TcxDataFilterList.Clear; -begin - while Count > 0 do - Items[Count - 1].Free; - inherited Clear; -end; - -procedure TcxDataFilterList.RemoveItemByField(AField: TcxCustomDataField); -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].RemoveItemByField(AField); -end; - -function TcxDataFilterList.GetItem(Index: Integer): TcxDataFilterCriteria; -begin - Result := TcxDataFilterCriteria(inherited Items[Index]); -end; - -{ TcxDataControllerGroups } - -constructor TcxDataControllerGroups.Create(ADataController: TcxCustomDataController); -begin - inherited Create; - FDataController := ADataController; -end; - -procedure TcxDataControllerGroups.ChangeExpanding(ARowIndex: Integer; - AExpanded, ARecursive: Boolean); -begin - DataControllerInfo.ChangeExpanding(ARowIndex, AExpanded, ARecursive); -end; - -procedure TcxDataControllerGroups.ChangeGrouping(AItemIndex, AGroupIndex: Integer); -begin - DataController.CheckItemRange(AItemIndex); - if GetItemGroupIndex(AItemIndex) <> AGroupIndex then - begin - DataController.BeforeSorting; - DataController.FGroupingChanged := True; - DataControllerInfo.ChangeGrouping(DataController.Fields[AItemIndex], AGroupIndex); - end; -end; - -procedure TcxDataControllerGroups.ClearGrouping; -begin - if GetGroupingItemCount > 0 then - begin - DataController.BeforeSorting; - DataController.FGroupingChanged := True; - end; - DataControllerInfo.ClearGrouping; -end; - -procedure TcxDataControllerGroups.FullCollapse; -begin - DataControllerInfo.FullCollapse; -end; - -procedure TcxDataControllerGroups.FullExpand; -begin - DataControllerInfo.FullExpand; -end; - -function TcxDataControllerGroups.GetDataGroupIndexByGroupValue(AParentDataGroupIndex: TcxDataGroupIndex; - const AGroupValue: Variant): TcxDataGroupIndex; -var - I: Integer; - AChildDataGroupIndex: TcxDataGroupIndex; -begin - Result := -1; -{ if (DataControllerInfo.LockCount > 0) and (DataControllerInfo.FChanges <> []) then - Exit; // !!!} - - DataControllerInfo.PrepareSorting; - try - for I := 0 to ChildCount[AParentDataGroupIndex] - 1 do - begin - AChildDataGroupIndex := ChildDataGroupIndex[AParentDataGroupIndex, I]; - if VarEquals(GroupValues[AChildDataGroupIndex] , AGroupValue) then - begin - Result := AChildDataGroupIndex; - Break; - end; - end; - finally - DataControllerInfo.UnprepareSorting; - end; -end; - -function TcxDataControllerGroups.HasAsParent(ARowIndex, AParentRowIndex: Integer): Boolean; -var - AIndex, AParentIndex: TcxDataGroupIndex; -begin - if LevelCount = 0 then - begin - Result := False; - Exit; - end; - AParentIndex := DataGroupIndexByRowIndex[AParentRowIndex]; - AIndex := DataGroupIndexByRowIndex[ARowIndex]; - Result := (AParentIndex = AIndex) or - ((Level[AParentIndex] < Level[AIndex]) and - (DataGroups[AParentIndex].BeginRecordListIndex <= AIndex) and - (AIndex <= DataGroups[AParentIndex].EndRecordListIndex)); -end; - -procedure TcxDataControllerGroups.LoadRecordIndexes(AList: TList; ADataGroupIndex: TcxDataGroupIndex); -var - I, AChildCount: Integer; -begin - AChildCount := ChildCount[ADataGroupIndex]; - if Level[ADataGroupIndex] < LevelCount - 1 then // It's Sub Groups - begin - for I := 0 to AChildCount - 1 do - LoadRecordIndexes(AList, ChildDataGroupIndex[ADataGroupIndex, I]); - end - else - for I := 0 to AChildCount - 1 do - AList.Add(Pointer(ChildRecordIndex[ADataGroupIndex, I])); -end; - -procedure TcxDataControllerGroups.LoadRecordIndexesByRowIndex(AList: TList; ARowIndex: Integer); -begin - LoadRecordIndexes(AList, DataGroupIndexByRowIndex[ARowIndex]); -end; - -function TcxDataControllerGroups.GetGroupRecordIndex(ADataGroupIndex: TcxDataGroupIndex): Integer; -var - ARecordDataGroupIndex: TcxDataGroupIndex; -begin - ARecordDataGroupIndex := ADataGroupIndex; - while Level[ARecordDataGroupIndex] < LevelCount - 1 do // It's Sub Groups - ARecordDataGroupIndex := ChildDataGroupIndex[ARecordDataGroupIndex, 0]; - Result := ChildRecordIndex[ARecordDataGroupIndex, 0]; -end; - -function TcxDataControllerGroups.GetChildCount(DataGroupIndex: TcxDataGroupIndex): Integer; -begin - Result := DataControllerInfo.DataGroups.GetChildCount(DataGroupIndex); -end; - -function TcxDataControllerGroups.GetChildDataGroupIndex(ParentDataGroupIndex: TcxDataGroupIndex; ChildIndex: Integer): TcxDataGroupIndex; -begin - Result := DataControllerInfo.DataGroups.GetChildIndex(ParentDataGroupIndex, ChildIndex); -end; - -function TcxDataControllerGroups.GetChildRecordIndex(ParentDataGroupIndex: TcxDataGroupIndex; - ChildIndex: Integer): Integer; -var - I: Integer; -begin - I := DataControllerInfo.DataGroups.GetChildRecordListIndex(ParentDataGroupIndex, ChildIndex); - if I <> -1 then - Result := DataControllerInfo.GetInternalRecordIndex(I) - else - Result := -1; -end; - -function TcxDataControllerGroups.GetDataControllerInfo: TcxCustomDataControllerInfo; -begin - Result := DataController.DataControllerInfo; -end; - -function TcxDataControllerGroups.GetDataGroupIndexByRowIndex(RowIndex: Integer): TcxDataGroupIndex; -begin - Result := DataControllerInfo.DataGroups.GetIndexByRowIndex(RowIndex); -end; - -function TcxDataControllerGroups.GetDataGroups: TcxDataGroups; -begin - Result := DataControllerInfo.DataGroups; -end; - -function TcxDataControllerGroups.GetFieldGroupIndex(AField: TcxCustomDataField): Integer; -begin - Result := DataControllerInfo.GroupingFieldList.GroupIndexByField(AField); -end; - -function TcxDataControllerGroups.GetGroupingItemCount: Integer; -begin - Result := DataControllerInfo.GroupingFieldList.Count; -end; - -function TcxDataControllerGroups.GetGroupingItemIndex(Index: Integer): Integer; -begin - Result := DataControllerInfo.GroupingFieldList[Index].Field.Index; -end; - -function TcxDataControllerGroups.GetGroupDisplayText(ADataGroupIndex: TcxDataGroupIndex): string; -var - ARecordIndex, ALevel: Integer; - AField: TcxCustomDataField; -begin - ARecordIndex := GetGroupRecordIndex(ADataGroupIndex); - ALevel := Level[ADataGroupIndex]; - AField := DataControllerInfo.GroupingFieldList[ALevel].Field; - - Result := DataController.GetDisplayText(ARecordIndex, AField.Index); -end; - -function TcxDataControllerGroups.GetGroupValue(ADataGroupIndex: TcxDataGroupIndex): Variant; -var - ARecordIndex, ALevel: Integer; - AField: TcxCustomDataField; -begin - ARecordIndex := GetGroupRecordIndex(ADataGroupIndex); - ALevel := Level[ADataGroupIndex]; - AField := DataControllerInfo.GroupingFieldList[ALevel].Field; - - Result := DataController.GetComparedValue(ARecordIndex, AField); -end; - -function TcxDataControllerGroups.GetItemGroupIndex(AItemIndex: Integer): Integer; -begin - DataController.CheckItemRange(AItemIndex); - Result := FieldGroupIndex[DataController.Fields[AItemIndex]]; -end; - -function TcxDataControllerGroups.GetLevel(ADataGroupIndex: TcxDataGroupIndex): Integer; -begin - Result := DataControllerInfo.DataGroups.GetLevel(ADataGroupIndex); -end; - -function TcxDataControllerGroups.GetParentDataGroupIndex(ChildDataGroupIndex: TcxDataGroupIndex): TcxDataGroupIndex; -begin - Result := DataControllerInfo.DataGroups.GetParentIndex(ChildDataGroupIndex); -end; - -{ TcxCustomDataSummaryItem } - -procedure TcxCustomDataSummaryItem.Assign(Source: TPersistent); -begin - if Source is TcxCustomDataSummaryItem then - begin - BeginUpdate; - try - AssignValues(TcxCustomDataSummaryItem(Source)); - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxCustomDataSummaryItem.BeginUpdate; -begin - if Assigned(Collection) then Collection.BeginUpdate; -end; - -procedure TcxCustomDataSummaryItem.EndUpdate; -begin - if Assigned(Collection) then Collection.EndUpdate; -end; - -function TcxCustomDataSummaryItem.FormatValue(const AValue: Variant; - AIsFooter: Boolean): string; -var - S: string; -begin - if not VarIsNull(AValue) then - begin - if Kind <> skNone then - begin - S := GetValueFormat(GetValueType(VarType(AValue)), Kind, AIsFooter); - if (VarType(AValue) = varDate) and (Kind <> skCount) then - begin - if TimeOf(AValue) = 0 then - Result := DateToStr(AValue) - else - if DateOf(AValue) = 0 then - Result := TimeToStr(AValue) - else - Result := DateTimeToStr(AValue); - Result := S + Result; - end - else - Result := FormatFloat(S, AValue); - end - else - Result := VarToStr(AValue); - end - else - Result := ''; -end; - -procedure TcxCustomDataSummaryItem.AssignValues(ASource: TcxCustomDataSummaryItem); -begin - if DataController <> nil then - ItemLink := DataController.FindProperItemLink(ASource.ItemLink); - Format := ASource.Format; - Kind := ASource.Kind; -end; - -function TcxCustomDataSummaryItem.GetValueFormat(AValueType: TcxSummaryValueType; - const AValue: Variant; AIsFooter: Boolean): string; -begin - Result := Format; -end; - -function TcxCustomDataSummaryItem.GetValueType( - AVarType: TVarType): TcxSummaryValueType; -begin - if IsCurrency(AVarType) then - Result := svtCurrency - else - begin - case AVarType of - varDate: - Result := svtDate; - else - Result := svtFloat; - end; - end; -end; - -function TcxCustomDataSummaryItem.IsCurrency(AVarType: TVarType): Boolean; -begin - Result := VarTypeIsCurrency(AVarType); -end; - -procedure TcxCustomDataSummaryItem.ItemLinkChanging(AField: TcxCustomDataField); -begin -end; - -function TcxCustomDataSummaryItem.GetItemLink: TObject; -begin - if Assigned(Field) then - Result := Field.Item - else - Result := nil; -end; - -procedure TcxCustomDataSummaryItem.SetFormat(const Value: string); -begin - if FFormat <> Value then - begin - FFormat := Value; - Changed(False); - end; -end; - -procedure TcxCustomDataSummaryItem.SetItemLink(Value: TObject); -var - AField: TcxCustomDataField; -begin - if DataController = nil then Exit; - if ItemLink <> Value then - begin - AField := DataController.Fields.FieldByItem(Value); - BeginUpdate; - try - ItemLinkChanging(AField); - FField := AField; - Changed(True); - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomDataSummaryItem.SetKind(Value: TcxSummaryKind); -begin - if FKind <> Value then - begin - FKind := Value; - Changed(True); - end; -end; - -{ TcxDataSummaryItem } - -destructor TcxDataSummaryItem.Destroy; -begin - Sorted := False; - inherited Destroy; -end; - -function TcxDataSummaryItem.DataField: TcxCustomDataField; -begin - Result := Field; -end; - -function TcxDataSummaryItem.FormatValue(const AValue: Variant; AIsFooter: Boolean): string; -begin - Result := inherited FormatValue(AValue, AIsFooter); - if Assigned(FOnGetText) then - FOnGetText(Self, AValue, AIsFooter, Result); -end; - -procedure TcxDataSummaryItem.AssignValues(Source: TcxCustomDataSummaryItem); -begin - inherited; - Position := TcxDataSummaryItem(Source).Position; - Sorted := TcxDataSummaryItem(Source).Sorted; - OnGetText := TcxDataSummaryItem(Source).OnGetText; -end; - -function TcxDataSummaryItem.GetDataController: TcxCustomDataController; -begin - Result := SummaryItems.DataController; -end; - -function TcxDataSummaryItem.GetValueFormat(AValueType: TcxSummaryValueType; const AValue: Variant; - AIsFooter: Boolean): string; -begin - Result := inherited GetValueFormat(AValueType, AValue, AIsFooter); - if Result = '' then - Result := SummaryItems.DefaultFormat(AValueType, Kind, AIsFooter); -end; - -function TcxDataSummaryItem.IsDataBinded: Boolean; -begin - Result := (DataField <> nil) or ((Kind = skCount) and (Position = spGroup)); -end; - -function TcxDataSummaryItem.IsPositionStored: Boolean; -begin - Result := SummaryItems.IsPositionStored(Self); -end; - -function TcxDataSummaryItem.GetPosition: TcxSummaryPosition; -begin - Result := SummaryItems.GetItemPosition(Self); -end; - -function TcxDataSummaryItem.GetSummaryItems: TcxDataSummaryItems; -begin - if Assigned(Collection) and (Collection is TcxDataSummaryItems) then - Result := TcxDataSummaryItems(Collection) - else - Result := nil; -end; - -procedure TcxDataSummaryItem.SetPosition(Value: TcxSummaryPosition); -begin - if Position <> Value then - begin - FPosition := Value; - Changed(False); - end; -end; - -procedure TcxDataSummaryItem.SetSorted(Value: Boolean); -begin - if DataController.SortingBySummaryDataItemIndex <> -1 then Exit; - if FSorted <> Value then - begin - BeginUpdate; - try - SummaryItems.BeforeSortingChange(Self, Value); - FSorted := Value; - DataController.DoSortingBySummaryChanged; - Changed(True); - finally - EndUpdate; - end; - end; -end; - -{ TcxDataSummaryItems } - -constructor TcxDataSummaryItems.Create(ASummary: TcxDataSummary; AItemClass: TcxDataSummaryItemClass); -begin - inherited Create(AItemClass); - FSummary := ASummary; -end; - -function TcxDataSummaryItems.Add: TcxDataSummaryItem; -begin - Result := TcxDataSummaryItem(inherited Add); -end; - -function TcxDataSummaryItems.Add(AItemLink: TObject; APosition: TcxSummaryPosition; - AKind: TcxSummaryKind; const AFormat: string = ''): TcxDataSummaryItem; -begin - BeginUpdate; - try - Result := Add; - Result.ItemLink := AItemLink; - Result.Position := APosition; - Result.Kind := AKind; - Result.Format := AFormat; - finally - EndUpdate; - end; -end; - -procedure TcxDataSummaryItems.Assign(Source: TPersistent); -begin - inherited Assign(Source); - AssignEvents(Source); -end; - -procedure TcxDataSummaryItems.AssignEvents(Source: TPersistent); -begin - if Source is TcxDataSummaryItems then - OnSummary := TcxDataSummaryItems(Source).OnSummary; -end; - -function TcxDataSummaryItems.DefaultFormat(AValueType: TcxSummaryValueType; - ASummaryKind: TcxSummaryKind; AIsFooter: Boolean): string; -begin - Result := cxDataGetDataSummaryValueDefaultFormat(AValueType, ASummaryKind, AIsFooter); -end; - -procedure TcxDataSummaryItems.DeleteItems(AItemLink: TObject; APosition: TcxSummaryPosition); -var - I: Integer; - AItem: TcxDataSummaryItem; -begin - BeginUpdate; - try - for I := Count - 1 downto 0 do - begin - AItem := Items[I]; - if (AItem.ItemLink = AItemLink) and (AItem.Position = APosition) then - AItem.Free; - end; - finally - EndUpdate; - end; -end; - -function TcxDataSummaryItems.GetGroupText(const ASummaryValues: Variant): string; -begin - Result := ''; -end; - -function TcxDataSummaryItems.IndexOf(AItem: TcxDataSummaryItem): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if Items[I] = AItem then - begin - Result := I; - Break; - end; -end; - -function TcxDataSummaryItems.IndexOfItemLink(AItemLink: TObject): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if Items[I].ItemLink = AItemLink then - begin - Result := I; - Break; - end; -end; - -function TcxDataSummaryItems.ItemOfItemLink(AItemLink: TObject): TcxDataSummaryItem; -var - AIndex: Integer; -begin - AIndex := IndexOfItemLink(AItemLink); - if AIndex <> -1 then - Result := Items[AIndex] - else - Result := nil; -end; - -function TcxDataSummaryItems.GetDataItem(AItemIndex: Integer; APosition: TcxSummaryPosition; - ACheckKind: Boolean = False; AKind: TcxSummaryKind = skNone): TcxDataSummaryItem; -var - I: Integer; - AField: TcxCustomDataField; -begin - DataController.CheckItemRange(AItemIndex); - Result := nil; - AField := DataController.Fields[AItemIndex]; - for I := 0 to Count - 1 do - if (Items[I].Field = AField) and (Items[I].Position = APosition) and - (not ACheckKind or (Items[I].Kind = AKind)) then - begin - Result := Items[I]; - Break; - end; -end; - -function TcxDataSummaryItems.GetDataItemFormat(AItemIndex: Integer; - APosition: TcxSummaryPosition): string; -var - AKind: TcxSummaryKind; - ASorted: Boolean; -begin - GetDataItemProperties(AItemIndex, APosition, [spFormat], Result, AKind, ASorted); -end; - -function TcxDataSummaryItems.GetDataItemKind(AItemIndex: Integer; - APosition: TcxSummaryPosition): TcxSummaryKind; -var - AFormat: string; - ASorted: Boolean; -begin - GetDataItemProperties(AItemIndex, APosition, [spKind], AFormat, Result, ASorted); -end; - -function TcxDataSummaryItems.GetDataItemSorted(AItemIndex: Integer; - APosition: TcxSummaryPosition): Boolean; -var - AFormat: string; - AKind: TcxSummaryKind; -begin - GetDataItemProperties(AItemIndex, APosition, [spSorted], AFormat, AKind, Result); -end; - -procedure TcxDataSummaryItems.SetDataItemFormat(AItemIndex: Integer; - APosition: TcxSummaryPosition; const Value: string); -begin - SetDataItemProperties(AItemIndex, APosition, [spFormat], Value, skNone, False); -end; - -procedure TcxDataSummaryItems.SetDataItemKind(AItemIndex: Integer; - APosition: TcxSummaryPosition; Value: TcxSummaryKind); -begin - SetDataItemProperties(AItemIndex, APosition, [spKind], '', Value, False); -end; - -procedure TcxDataSummaryItems.SetDataItemSorted(AItemIndex: Integer; - APosition: TcxSummaryPosition; Value: Boolean); -begin - SetDataItemProperties(AItemIndex, APosition, [spSorted], '', skNone, Value); -end; - -procedure TcxDataSummaryItems.BeforeSortingChange(AItem: TcxDataSummaryItem; AValue: Boolean); -begin -end; - -procedure TcxDataSummaryItems.ChangedView; -begin - if Count > 0 then - Update(Items[0]); -// Items[0].Changed(False); -end; - -function TcxDataSummaryItems.GetItemPosition(AItem: TcxDataSummaryItem): TcxSummaryPosition; -begin - Result := AItem.FPosition; -end; - -function TcxDataSummaryItems.IsPositionStored(AItem: TcxDataSummaryItem): Boolean; -begin - Result := AItem.Position <> TcxSummaryPosition(0); -end; - -function TcxDataSummaryItems.GetOwner: TPersistent; -begin - Result := FSummary; -end; - -function TcxDataSummaryItems.IndexOfField(AField: TcxCustomDataField): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if Items[I].Field = AField then - begin - Result := I; - Break; - end; -end; - -function TcxDataSummaryItems.ItemOfField(AField: TcxCustomDataField): TcxDataSummaryItem; -var - AIndex: Integer; -begin - AIndex := IndexOfField(AField); - if AIndex <> -1 then - Result := Items[AIndex] - else - Result := nil; -end; - -procedure TcxDataSummaryItems.Update(Item: TCollectionItem); -begin - FSummary.Changed(Item <> nil); -end; - -function TcxDataSummaryItems.AddDataItem(AItemIndex: Integer; - APosition: TcxSummaryPosition): TcxDataSummaryItem; -begin - Result := Add(DataController.GetItem(AItemIndex), APosition, skNone); -end; - -procedure TcxDataSummaryItems.CheckItemEmpty(AItem: TcxDataSummaryItem); -begin - if IsPropertiesEmpty([spFormat, spKind, spSorted], AItem.Format, AItem.Kind, AItem.Sorted) then - AItem.Free; - // TODO: Modified -end; - -procedure TcxDataSummaryItems.GetDataItemProperties(AItemIndex: Integer; - APosition: TcxSummaryPosition; AProperties: TcxSummaryProperties; - var AFormat: string; var AKind: TcxSummaryKind; var ASorted: Boolean); -var - AItem: TcxDataSummaryItem; -begin - AItem := GetDataItem(AItemIndex, APosition); - if AItem <> nil then - begin - if spFormat in AProperties then AFormat := AItem.Format; - if spKind in AProperties then AKind := AItem.Kind; - if spSorted in AProperties then ASorted := AItem.Sorted; - end - else - begin - AFormat := ''; - AKind := skNone; - ASorted := False; - end; -end; - -function TcxDataSummaryItems.IsPropertiesEmpty(AProperties: TcxSummaryProperties; - const AFormat: string; AKind: TcxSummaryKind; ASorted: Boolean): Boolean; -begin - Result := True; - if (spFormat in AProperties) and (AFormat <> '') then - Result := False; - if (spKind in AProperties) and (AKind <> skNone) then - Result := False; - if (spSorted in AProperties) and ASorted then - Result := False; -end; - -procedure TcxDataSummaryItems.SetDataItemProperties(AItemIndex: Integer; - APosition: TcxSummaryPosition; AProperties: TcxSummaryProperties; - const AFormat: string; AKind: TcxSummaryKind; ASorted: Boolean); -var - AItem: TcxDataSummaryItem; -begin - AItem := GetDataItem(AItemIndex, APosition); - if AItem <> nil then - begin - SetItemProperties(AItem, APosition, AProperties, AFormat, AKind, ASorted); - CheckItemEmpty(AItem); - end - else - if not IsPropertiesEmpty(AProperties, AFormat, AKind, ASorted) then - begin - AItem := AddDataItem(AItemIndex, APosition); - SetItemProperties(AItem, APosition, AProperties, AFormat, AKind, ASorted); - end; - // TODO: Modified -end; - -procedure TcxDataSummaryItems.SetItemProperties(AItem: TcxDataSummaryItem; - APosition: TcxSummaryPosition; AProperties: TcxSummaryProperties; - const AFormat: string; AKind: TcxSummaryKind; ASorted: Boolean); -begin - if spFormat in AProperties then AItem.Format := AFormat; - if spKind in AProperties then AItem.Kind := AKind; - if spSorted in AProperties then AItem.Sorted := ASorted; -end; - -function TcxDataSummaryItems.GetDataController: TcxCustomDataController; -begin - Result := Summary.DataController; -end; - -function TcxDataSummaryItems.GetItem(Index: Integer): TcxDataSummaryItem; -begin - Result := TcxDataSummaryItem(inherited GetItem(Index)); -end; - -procedure TcxDataSummaryItems.SetItem(Index: Integer; Value: TcxDataSummaryItem); -begin - inherited SetItem(Index, Value); -end; - -{ TcxDataFooterSummaryItems } - -function TcxDataFooterSummaryItems.GetItemPosition(AItem: TcxDataSummaryItem): TcxSummaryPosition; -begin - Result := spFooter; -end; - -function TcxDataFooterSummaryItems.IsPositionStored(AItem: TcxDataSummaryItem): Boolean; -begin - Result := False; -end; - -{ TcxDataGroupSummaryItems } - -constructor TcxDataGroupSummaryItems.Create(ASummary: TcxDataSummary; - AItemClass: TcxDataSummaryItemClass); -begin - inherited Create(ASummary, AItemClass); - FBeginText := stBeginText; - FEndText := stEndText; - FSeparator := stSeparator; -end; - -procedure TcxDataGroupSummaryItems.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxDataGroupSummaryItems then - with TcxDataGroupSummaryItems(Source) do - begin - Self.BeginText := BeginText; - Self.EndText := EndText; - Self.Separator := Separator; - end; -end; - -function TcxDataGroupSummaryItems.GetGroupText(const ASummaryValues: Variant): string; -var - I: Integer; - S: string; -begin - Result := ''; - for I := 0 to Count - 1 do - if Items[I].Position = spGroup then - begin - S := Items[I].FormatValue(ASummaryValues[I], False); - if Result = '' then - Result := S - else - Result := Result + Separator + ' ' + S; - end; - if Result <> '' then - begin - if FBeginText <> '' then - Result := FBeginText + Result; - if FEndText <> '' then - Result := Result + FEndText; - end; -end; - -function TcxDataGroupSummaryItems.SortedSummaryItem: TcxDataSummaryItem; -var - I, ASortingBySummaryDataItemIndex: Integer; -begin - Result := nil; - ASortingBySummaryDataItemIndex := DataController.SortingBySummaryDataItemIndex; - if ASortingBySummaryDataItemIndex <> -1 then - Result := ItemOfItemLink(DataController.GetItem(ASortingBySummaryDataItemIndex)) - else - for I := 0 to Count - 1 do - if Items[I].Sorted then - begin - Result := Items[I]; - Break; - end; -end; - -procedure TcxDataGroupSummaryItems.BeforeSortingChange(AItem: TcxDataSummaryItem; - AValue: Boolean); -begin - inherited; - if AValue and (SortedSummaryItem <> nil) then - SortedSummaryItem.Sorted := False; -end; - -function TcxDataGroupSummaryItems.GetOwner: TPersistent; -begin - if FOwner <> nil then - Result := FOwner - else - Result := inherited GetOwner; -end; - -function TcxDataGroupSummaryItems.IsBeginTextStored: Boolean; -begin - Result := FBeginText <> stBeginText; -end; - -function TcxDataGroupSummaryItems.IsEndTextStored: Boolean; -begin - Result := FEndText <> stEndText; -end; - -function TcxDataGroupSummaryItems.IsSeparatorStored: Boolean; -begin - Result := FSeparator <> stSeparator; -end; - -procedure TcxDataGroupSummaryItems.SetBeginText(const Value: string); -begin - if FBeginText <> Value then - begin - FBeginText := Value; - ChangedView; - end; -end; - -procedure TcxDataGroupSummaryItems.SetEndText(const Value: string); -begin - if FEndText <> Value then - begin - FEndText := Value; - ChangedView; - end; -end; - -procedure TcxDataGroupSummaryItems.SetSeparator(const Value: string); -begin - if FSeparator <> Value then - begin - FSeparator := Value; - ChangedView; - end; -end; - -{ TcxDataSummaryGroupItemLink } - -function TcxDataSummaryGroupItemLink.GetSummaryGroupItemLinks: TcxDataSummaryGroupItemLinks; -begin - if Assigned(Collection) and (Collection is TcxDataSummaryGroupItemLinks) then - Result := TcxDataSummaryGroupItemLinks(Collection) - else - Result := nil; -end; - -function TcxDataSummaryGroupItemLink.GetDataController: TcxCustomDataController; -begin - Result := SummaryGroupItemLinks.SummaryGroup.SummaryGroups.Summary.DataController; -end; - -procedure TcxDataSummaryGroupItemLink.ItemLinkChanging(AField: TcxCustomDataField); -var - I: Integer; - ASummaryGroups: TcxDataSummaryGroups; - ASummaryGroup: TcxDataSummaryGroup; - AItem: TcxDataSummaryGroupItemLink; -begin - BeginUpdate; - try - ASummaryGroups := SummaryGroupItemLinks.SummaryGroup.SummaryGroups; - for I := 0 to ASummaryGroups.Count - 1 do - begin - ASummaryGroup := ASummaryGroups[I]; - AItem := ASummaryGroup.Links.ItemOfField(AField); - if AItem <> nil then - AItem.ItemLink := nil; - end; - finally - EndUpdate; - end; -end; - -{ TcxDataSummaryGroupItemLinks } - -constructor TcxDataSummaryGroupItemLinks.Create(ASummaryGroup: TcxDataSummaryGroup; - AItemClass: TcxDataSummaryGroupItemLinkClass); -begin - inherited Create(AItemClass); - FSummaryGroup := ASummaryGroup; -end; - -function TcxDataSummaryGroupItemLinks.Add: TcxDataSummaryGroupItemLink; -begin - Result := TcxDataSummaryGroupItemLink(inherited Add); -end; - -function TcxDataSummaryGroupItemLinks.IndexOfItemLink(AItemLink: TObject): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if Items[I].ItemLink = AItemLink then - begin - Result := I; - Break; - end; -end; - -function TcxDataSummaryGroupItemLinks.ItemOfItemLink(AItemLink: TObject): TcxDataSummaryGroupItemLink; -var - AIndex: Integer; -begin - AIndex := IndexOfItemLink(AItemLink); - if AIndex <> -1 then - Result := Items[AIndex] - else - Result := nil; -end; - -function TcxDataSummaryGroupItemLinks.GetOwner: TPersistent; -begin - Result := FSummaryGroup; -end; - -function TcxDataSummaryGroupItemLinks.IndexOfField(AField: TcxCustomDataField): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if Items[I].Field = AField then - begin - Result := I; - Break; - end; -end; - -function TcxDataSummaryGroupItemLinks.ItemOfField(AField: TcxCustomDataField): TcxDataSummaryGroupItemLink; -var - AIndex: Integer; -begin - AIndex := IndexOfField(AField); - if AIndex <> -1 then - Result := Items[AIndex] - else - Result := nil; -end; - -procedure TcxDataSummaryGroupItemLinks.Update(Item: TCollectionItem); -begin -// FSummaryGroup.Changed(Item <> nil); - FSummaryGroup.SummaryGroups.Update(nil); -end; - -function TcxDataSummaryGroupItemLinks.GetItem(Index: Integer): TcxDataSummaryGroupItemLink; -begin - Result := TcxDataSummaryGroupItemLink(inherited GetItem(Index)); -end; - -procedure TcxDataSummaryGroupItemLinks.SetItem(Index: Integer; Value: TcxDataSummaryGroupItemLink); -begin - inherited SetItem(Index, Value); -end; - -{ TcxDataSummaryGroup } - -constructor TcxDataSummaryGroup.Create(Collection: TCollection); -begin - FSummaryItems := TcxDataGroupSummaryItems.Create({SummaryGroups}(Collection as TcxDataSummaryGroups).Summary, - {SummaryGroups}(Collection as TcxDataSummaryGroups).Summary.GetSummaryItemClass); - FSummaryItems.FOwner := Self; - inherited Create(Collection); -end; - -destructor TcxDataSummaryGroup.Destroy; -begin - FSummaryItems.Free; - FSummaryItems := nil; - FItemLinks.Free; - FItemLinks := nil; - inherited Destroy; -end; - -procedure TcxDataSummaryGroup.Assign(Source: TPersistent); -begin - if Source is TcxDataSummaryGroup then - begin - Links := TcxDataSummaryGroup(Source).Links; - SummaryItems := TcxDataSummaryGroup(Source).SummaryItems; - end - else - inherited Assign(Source); -end; - -function TcxDataSummaryGroup.GetItemLinks: TcxDataSummaryGroupItemLinks; -begin - if not Assigned(FItemLinks) then - FItemLinks := TcxDataSummaryGroupItemLinks.Create(Self, - {SummaryGroups}(Collection as TcxDataSummaryGroups).Summary.GetSummaryGroupItemLinkClass); - Result := FItemLinks; -end; - -function TcxDataSummaryGroup.GetSummaryGroups: TcxDataSummaryGroups; -begin - if Assigned(Collection) and (Collection is TcxDataSummaryGroups) then - Result := TcxDataSummaryGroups(Collection) - else - Result := nil; -end; - -procedure TcxDataSummaryGroup.SetItemLinks(Value: TcxDataSummaryGroupItemLinks); -begin - Links.Assign(Value); -end; - -procedure TcxDataSummaryGroup.SetSummaryItems(Value: TcxDataGroupSummaryItems); -begin - SummaryItems.Assign(Value); -end; - -{ TcxDataSummaryGroups } - -constructor TcxDataSummaryGroups.Create(ASummary: TcxDataSummary); -begin - inherited Create(TcxDataSummaryGroup); - FSummary := ASummary; -end; - -function TcxDataSummaryGroups.Add: TcxDataSummaryGroup; -begin - Result := TcxDataSummaryGroup(inherited Add); -end; - -function TcxDataSummaryGroups.FindByItemLink(AItemLink: TObject): TcxDataSummaryGroup; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - if Items[I].Links.IndexOfItemLink(AItemLink) <> -1 then - begin - Result := Items[I]; - Break; - end; -end; - -function TcxDataSummaryGroups.GetOwner: TPersistent; -begin - Result := FSummary; -end; - -procedure TcxDataSummaryGroups.Update(Item: TCollectionItem); -begin - Summary.Changed(False); -end; - -function TcxDataSummaryGroups.GetItem(Index: Integer): TcxDataSummaryGroup; -begin - Result := TcxDataSummaryGroup(inherited GetItem(Index)); -end; - -procedure TcxDataSummaryGroups.SetItem(Index: Integer; Value: TcxDataSummaryGroup); -begin - inherited SetItem(Index, Value); -end; - -{ TcxDataSummary } - -constructor TcxDataSummary.Create(ADataController: TcxCustomDataController); -begin - inherited Create; - FDataController := ADataController; - FDefaultGroupSummaryItems := TcxDataGroupSummaryItems.Create(Self, GetSummaryItemClass); - FFooterSummaryItems := TcxDataFooterSummaryItems.Create(Self, GetSummaryItemClass); - FSummaryGroups := TcxDataSummaryGroups.Create(Self); -end; - -destructor TcxDataSummary.Destroy; -begin - FDestroying := True; - FDefaultGroupSummaryItems.Free; - FDefaultGroupSummaryItems := nil; - FFooterSummaryItems.Free; - FFooterSummaryItems := nil; - FSummaryGroups.Free; - FSummaryGroups := nil; - inherited Destroy; -end; - -procedure TcxDataSummary.Assign(Source: TPersistent); -begin - if Source is TcxDataSummary then - begin - BeginUpdate; - try - DefaultGroupSummaryItems := TcxDataSummary(Source).DefaultGroupSummaryItems; - FooterSummaryItems := TcxDataSummary(Source).FooterSummaryItems; - SummaryGroups := TcxDataSummary(Source).SummaryGroups; - Options := TcxDataSummary(Source).Options; - AssignEvents(Source); // TODO: option? - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxDataSummary.AssignEvents(Source: TPersistent); -begin - if Source is TcxDataSummary then - OnAfterSummary := TcxDataSummary(Source).OnAfterSummary; -end; - -procedure TcxDataSummary.BeginUpdate; -begin - DataController.BeginUpdate; - Inc(FLockCount); -end; - -procedure TcxDataSummary.BeginCalculate; -begin - if FSetCustomSummary then Exit; - CalculateFooterSummary; -end; - -procedure TcxDataSummary.EndCalculate; -begin - if FSetCustomSummary then Exit; - CalculateGroupSummary; - DoAfterSummary; -end; - -procedure TcxDataSummary.Calculate; -begin - BeginCalculate; - EndCalculate; -end; - -procedure TcxDataSummary.CalculateFooterSummary; -var - ACountValues: TcxDataSummaryCountValues; - ASummaryValues: TcxDataSummaryValues; -begin - BeginCalculateSummary(FooterSummaryItems, ACountValues, ASummaryValues); - if not DataController.IsGridMode then - CalculateSummary(FooterSummaryItems, 0, DataController.DataControllerInfo.GetInternalRecordCount - 1, - ACountValues, ASummaryValues, FFooterSummaryValues); - EndCalculateSummary(FooterSummaryItems, ACountValues, ASummaryValues, FFooterSummaryValues); -end; - -procedure TcxDataSummary.CalculateGroupSummary; - - procedure CalcLevel(ADataGroups: TcxDataGroups; ALevel: Integer); - var - ASummaryItems: TcxDataSummaryItems; - ACurIndex, AGroupIndex: Integer; - ACountValues: TcxDataSummaryCountValues; - ASummaryValues: TcxDataSummaryValues; - SV: Variant; - begin - ASummaryItems := GroupSummaryItems[ALevel]; - ACurIndex := 0; - AGroupIndex := -1; - while ACurIndex < ADataGroups.Count do - begin - if ADataGroups[ACurIndex].Level = ALevel then - begin - if AGroupIndex <> -1 then // close summary - begin - SV := ADataGroups[AGroupIndex].SummaryValues; - EndCalculateSummary(ASummaryItems, ACountValues, ASummaryValues, SV); - ADataGroups[AGroupIndex].SummaryValues := SV; - end; - AGroupIndex := ACurIndex; - BeginCalculateSummary(ASummaryItems, ACountValues, ASummaryValues); - end; - if ADataGroups[ACurIndex].Level = (ADataGroups.LevelCount - 1) then - begin - SV := ADataGroups[ACurIndex].SummaryValues; - CalculateSummary(ASummaryItems, ADataGroups[ACurIndex].BeginRecordListIndex, - ADataGroups[ACurIndex].EndRecordListIndex, ACountValues, ASummaryValues, - SV); - ADataGroups[ACurIndex].SummaryValues := SV; - end; - Inc(ACurIndex); - end; - if AGroupIndex <> -1 then // close summary - begin - SV := ADataGroups[AGroupIndex].SummaryValues; - EndCalculateSummary(ASummaryItems, ACountValues, ASummaryValues, SV); - ADataGroups[AGroupIndex].SummaryValues := SV; - end; - end; - -var - I: Integer; -begin - for I := 0 to DataController.DataControllerInfo.GroupingFieldList.Count - 1 do - CalcLevel(DataController.DataControllerInfo.DataGroups, I); -end; - -procedure TcxDataSummary.CancelUpdate; -begin - DataController.EndUpdate; //? - Dec(FLockCount); -end; - -procedure TcxDataSummary.EndUpdate; -begin - Dec(FLockCount); - Changed(False); - DataController.EndUpdate; -end; - -function TcxDataSummary.GetGroupSummaryInfo(ARowIndex: Integer; var ASummaryItems: TcxDataSummaryItems; - var ASummaryValues: PVariant): Boolean; -var - ADataGroupIndex, ALevel: Integer; -begin - ADataGroupIndex := DataController.DataControllerInfo.DataGroups.GetIndexByRowIndex(ARowIndex); - Result := ADataGroupIndex <> -1; - if Result then - begin - ALevel := DataController.DataControllerInfo.DataGroups[ADataGroupIndex].Level; - ASummaryItems := GroupSummaryItems[ALevel]; - ASummaryValues := GetGroupSummaryValues(ADataGroupIndex); - Result := (ASummaryItems <> nil) and (ASummaryValues <> nil) and - not VarIsEmpty(ASummaryValues^); - end; -end; - -function TcxDataSummary.GetPatternSummaryItems(APatternSummary: TcxDataSummary; - ASummaryItems: TcxDataSummaryItems): TcxDataSummaryItems; -begin - if ASummaryItems = FooterSummaryItems then - Result := APatternSummary.FooterSummaryItems - else - if ASummaryItems = DefaultGroupSummaryItems then - Result := APatternSummary.DefaultGroupSummaryItems - else - Result := APatternSummary.SummaryGroups[(ASummaryItems.Owner as TcxDataSummaryGroup).Index].SummaryItems; -end; - -procedure TcxDataSummary.Recalculate; -begin - Changed(False); -// BeginUpdate; -// EndUpdate; -end; - -procedure TcxDataSummary.RemoveItemByField(AField: TcxCustomDataField); - - function RemoveInSummaryItems(ASummaryItems: TcxDataSummaryItems): Boolean; - var - AItem: TcxDataSummaryItem; - begin - Result := False; - repeat - AItem := ASummaryItems.ItemOfField(AField); - if AItem <> nil then - begin - //AItem.Free; - AItem.FField := nil; - Result := True; - end; - until AItem = nil; - end; - - function RemoveInLinks(ALinks: TcxDataSummaryGroupItemLinks): Boolean; - var - AItem: TcxDataSummaryGroupItemLink; - begin - Result := False; - repeat - AItem := ALinks.ItemOfField(AField); - if AItem <> nil then - begin - //AItem.Free; - AItem.FField := nil; - Result := True; - end; - until AItem = nil; - end; - - function RemoveInSummaryGroup(ASummaryGroup: TcxDataSummaryGroup): Boolean; - begin - Result := False; - if RemoveInSummaryItems(ASummaryGroup.SummaryItems) then - Result := True; - if RemoveInLinks(ASummaryGroup.Links) then - Result := True; - end; - - function RemoveInSummaryGroups: Boolean; - var - I: Integer; - begin - Result := False; - for I := 0 to SummaryGroups.Count - 1 do - if RemoveInSummaryGroup(SummaryGroups[I]) then - Result := True; - end; - -var - AChanged: Boolean; -begin - BeginUpdate; - AChanged := False; - try - if RemoveInSummaryItems(FooterSummaryItems) then - AChanged := True; - if RemoveInSummaryItems(DefaultGroupSummaryItems) then - AChanged := True; - if RemoveInSummaryGroups then - AChanged := True; - finally - if AChanged then - EndUpdate - else - CancelUpdate; - end; -end; - -procedure TcxDataSummary.BeginCalculateSummary(ASummaryItems: TcxDataSummaryItems; - var ACountValues: TcxDataSummaryCountValues; var ASummaryValues: TcxDataSummaryValues); -var - I: Integer; -begin - SetLength(ASummaryValues, 0); // Clear - SetLength(ACountValues, 0); // Clear - SetLength(ASummaryValues, ASummaryItems.Count); - SetLength(ACountValues, ASummaryItems.Count); // for Average - for I := 0 to ASummaryItems.Count - 1 do - ACountValues[I] := 0; -end; - -procedure TcxDataSummary.CalculateSummary(ASummaryItems: TcxDataSummaryItems; - ABeginIndex, AEndIndex: Integer; var ACountValues: TcxDataSummaryCountValues; - var ASummaryValues: TcxDataSummaryValues; var SummaryValues: Variant); -var - I, J, ARecordIndex: Integer; -begin - for I := ABeginIndex to AEndIndex do - begin - ARecordIndex := GetRecordIndex(I); - if ARecordIndex <> -1 then - for J := 0 to ASummaryItems.Count - 1 do - DoSummaryValue(ASummaryItems[J], ARecordIndex, ASummaryValues[J], ACountValues[J]); - end; -end; - -procedure TcxDataSummary.Changed(ARedrawOnly: Boolean); -begin - if FInAfterSummary then Exit; - if LockCount = 0 then - Update(ARedrawOnly); -end; - -procedure TcxDataSummary.DoAfterSummary; -begin - if Assigned(FOnAfterSummary) then - begin - if DataController.IsLoading then - DataController.FAfterSummaryFlag := True - else - begin - DataController.FAfterSummaryFlag := False; - FInAfterSummary := True; - try - if not DataController.IsPattern and not DataController.LockOnAfterSummary then - FOnAfterSummary(Self); - finally - FInAfterSummary := False; - end; - end; - end; -end; - -procedure TcxDataSummary.DoFinishSummaryValue(ASummaryItem: TcxDataSummaryItem; - var SummaryValue: Variant; var CountValue: Integer); -var - AVarIsDate: Boolean; -begin - if not ASummaryItem.IsDataBinded then Exit; - if VarIsEmpty(SummaryValue) then - SummaryValue := Null; - case ASummaryItem.Kind of - skCount: - SummaryValue := CountValue; - skAverage: - if (CountValue > 0) and not VarIsEmpty(SummaryValue) then - begin - AVarIsDate := VarIsDate(SummaryValue); - SummaryValue := SummaryValue / CountValue; - if AVarIsDate then - VarCast(SummaryValue, SummaryValue, varDate); // WORKAROUND - end; - end; -end; - -procedure TcxDataSummary.DoSummaryValue(ASummaryItem: TcxDataSummaryItem; - ARecordIndex: Integer; var SummaryValue: Variant; var CountValue: Integer); -var - AArguments: TcxSummaryEventArguments; - AOutArguments: TcxSummaryEventOutArguments; -begin - if not ASummaryItem.IsDataBinded then Exit; - if ASummaryItem.DataField <> nil then - AOutArguments.Value := DataController.GetInternalValue(ARecordIndex, ASummaryItem.DataField) - else - AOutArguments.Value := Null; - AOutArguments.Done := False; - if Assigned(ASummaryItem.SummaryItems.FOnSummary) then - begin - AArguments.RecordIndex := ARecordIndex; - AArguments.SummaryItem := ASummaryItem; - AOutArguments.SummaryValue := SummaryValue; - AOutArguments.CountValue := CountValue; - ASummaryItem.SummaryItems.FOnSummary(ASummaryItem.SummaryItems, - AArguments, AOutArguments); - SummaryValue := AOutArguments.SummaryValue; - CountValue := AOutArguments.CountValue; - end; - if not AOutArguments.Done and (ASummaryItem.Kind <> skNone) and - not ((soNullIgnore in Options) and VarIsNull(AOutArguments.Value)) then - begin - if VarIsEmpty(SummaryValue) then - begin - if ASummaryItem.Kind <> skCount then - begin - if not (VarIsNull(AOutArguments.Value) and (ASummaryItem.Kind in [skMin, skMax])) then - begin - SummaryValue := AOutArguments.Value; - if VarIsNull(SummaryValue) and (ASummaryItem.Kind in [skSum, skAverage]) then - SummaryValue := 0; - end; - end; - end - else - if not VarIsNull(AOutArguments.Value) and not VarIsNull(SummaryValue) then - begin - case ASummaryItem.Kind of - skSum, skAverage: - SummaryValue := SummaryValue + AOutArguments.Value; - skMin: - if AOutArguments.Value < SummaryValue then - SummaryValue := AOutArguments.Value; - skMax: - if AOutArguments.Value > SummaryValue then - SummaryValue := AOutArguments.Value; - end; - end; - Inc(CountValue); - end; -end; - -procedure TcxDataSummary.EndCalculateSummary(ASummaryItems: TcxDataSummaryItems; - var ACountValues: TcxDataSummaryCountValues; var ASummaryValues: TcxDataSummaryValues; - var SummaryValues: Variant); -var - J: Integer; -begin - for J := 0 to ASummaryItems.Count - 1 do - DoFinishSummaryValue(ASummaryItems[J], ASummaryValues[J], ACountValues[J]); -// {$IFDEF DELPHI5} -// SummaryValues := Variant(ASummaryValues); -// {$ELSE} - if Length(ASummaryValues) = 0 then - SummaryValues := Null - else - SummaryValues := Variant(ASummaryValues); -// {$ENDIF} -end; - -function TcxDataSummary.GetGroupSummaryValues(ADataGroupIndex: TcxDataGroupIndex): PVariant; -begin - if ADataGroupIndex <> -1 then - Result := @DataController.DataControllerInfo.DataGroups[ADataGroupIndex].SummaryValues - else - Result := nil; -end; - -function TcxDataSummary.GetOwner: TPersistent; -begin - Result := FDataController; -end; - -function TcxDataSummary.GetRecordIndex(ARecordListIndex: Integer): Integer; -begin - Result := DataController.DataControllerInfo.GetInternalRecordIndex(ARecordListIndex); - if DataController.DataControllerInfo.IsSummaryForSelectedRecords then - begin - if DataController.IsFocusedSelectedMode then - begin - if Result <> DataController.DataControllerInfo.FocusedRecordIndex then - Result := -1; - end - else - if not DataController.DataControllerInfo.Selection.IsRecordSelected(Result) then - Result := -1; - end; -end; - -function TcxDataSummary.GetSummaryItemClass: TcxDataSummaryItemClass; -begin - Result := DataController.GetSummaryItemClass; -end; - -function TcxDataSummary.GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; -begin - Result := DataController.GetSummaryGroupItemLinkClass; -end; - -function TcxDataSummary.IsValidSummaryValuesIndex(const ASummaryValues: Variant; - AIndex: Integer): Boolean; -begin - Result := VarIsArray(ASummaryValues) and - (VarArrayLowBound(ASummaryValues, 1) <= AIndex) and - (AIndex <= VarArrayHighBound(ASummaryValues, 1)); -end; - -procedure TcxDataSummary.Update(ARedrawOnly: Boolean); -begin - if not FDestroying then - DataController.SummaryChanged(ARedrawOnly); -end; - -function TcxDataSummary.GetFooterSummaryValue(Index: Integer): Variant; -begin - Result := Null; - if IsValidSummaryValuesIndex(FFooterSummaryValues, Index) then - Result := FFooterSummaryValues[Index]; -end; - -function TcxDataSummary.GetFooterSummaryText(Index: Integer): string; -begin - Result := FooterSummaryItems[Index].FormatValue(FooterSummaryValues[Index], True); -end; - -function TcxDataSummary.GetGroupSummaryItems(Level: Integer): TcxDataGroupSummaryItems; -var - ASummaryGroup: TcxDataSummaryGroup; -begin - if (0 <= Level) and (Level < DataController.DataControllerInfo.GroupingFieldList.Count) then - begin - ASummaryGroup := SummaryGroups.FindByItemLink(DataController.DataControllerInfo.GroupingFieldList[Level].Field.Item); -// ASummaryGroup := SummaryGroups.FindByItemLink(DataController.DataControllerInfo.DataGroups.Fields[Level].Item); - if ASummaryGroup <> nil then - Result := ASummaryGroup.SummaryItems - else - Result := DefaultGroupSummaryItems; - end - else - Result := nil; -end; - -function TcxDataSummary.GetGroupSummaryText(RowIndex: Integer): string; -var - ASummaryItems: TcxDataSummaryItems; - PSummaryValues: PVariant; -begin - if GetGroupSummaryInfo(RowIndex, ASummaryItems, PSummaryValues) then - Result := ASummaryItems.GetGroupText(PSummaryValues^) - else - Result := ''; -end; - -function TcxDataSummary.GetGroupSummaryDisplayValue(RowIndex, Level, Index: Integer): Variant; -var - ADataGroupIndex: Integer; -begin - ADataGroupIndex := DataController.DataControllerInfo.DataGroups.GetIndexByRowIndexLevel(RowIndex, Level); - Result := GroupSummaryValues[ADataGroupIndex, Index]; -end; - -function TcxDataSummary.GetGroupSummaryValue(DataGroupIndex: TcxDataGroupIndex; - Index: Integer): Variant; -var - PSummaryValues: PVariant; -begin - PSummaryValues := GetGroupSummaryValues(DataGroupIndex); - if (PSummaryValues <> nil) and IsValidSummaryValuesIndex(PSummaryValues^, Index) then - Result := PSummaryValues^[Index] - else - Result := Null; -end; - -function TcxDataSummary.GetGroupFooterIndexOfItemLink(Level: Integer; ItemLink: TObject): Integer; -var - ASummaryItems: TcxDataSummaryItems; - I: Integer; -begin - Result := -1; - ASummaryItems := GroupSummaryItems[Level]; - if ASummaryItems <> nil then - for I := 0 to ASummaryItems.Count - 1 do - if (ASummaryItems[I].Position = spFooter) and (ASummaryItems[I].ItemLink = ItemLink) then - begin - Result := I; - Break; - end; -end; - -function TcxDataSummary.GetGroupFooterSummaryText(RowIndex, Level, Index: Integer): string; -var - ADataGroupIndex: Integer; - ASummaryItems: TcxDataSummaryItems; - PSummaryValues: PVariant; -begin - Result := ''; - ADataGroupIndex := DataController.DataControllerInfo.DataGroups.GetIndexByRowIndexLevel(RowIndex, Level); - if ADataGroupIndex <> -1 then - begin - ASummaryItems := GroupSummaryItems[Level]; - PSummaryValues := GetGroupSummaryValues(ADataGroupIndex); - if (ASummaryItems <> nil) and (PSummaryValues <> nil) and - IsValidSummaryValuesIndex(PSummaryValues^, Index) then - Result := ASummaryItems[Index].FormatValue(PSummaryValues^[Index], True); - end; -end; - -function TcxDataSummary.GetOptions: TcxSummaryOptions; -begin - Result := FOptions; -end; - -procedure TcxDataSummary.SetDefaultGroupSummaryItems(Value: TcxDataGroupSummaryItems); -begin - FDefaultGroupSummaryItems.Assign(Value); -end; - -procedure TcxDataSummary.SetFooterSummaryItems(Value: TcxDataFooterSummaryItems); -begin - FFooterSummaryItems.Assign(Value); -end; - -procedure TcxDataSummary.SetFooterSummaryValue(Index: Integer; Value: Variant); -begin - if FooterSummaryValues[Index] <> Value then - begin - if IsValidSummaryValuesIndex(FFooterSummaryValues, Index) then - begin - FSetCustomSummary := True; - try - FFooterSummaryValues[Index] := Value; - Changed(True); - finally - FSetCustomSummary := False; - end; - end; - end; -end; - -procedure TcxDataSummary.SetGroupSummaryDisplayValue(RowIndex, Level, Index: Integer; const Value: Variant); -var - ADataGroupIndex: Integer; -begin - ADataGroupIndex := DataController.DataControllerInfo.DataGroups.GetIndexByRowIndexLevel(RowIndex, Level); - GroupSummaryValues[ADataGroupIndex, Index] := Value; -end; - -procedure TcxDataSummary.SetGroupSummaryValue(DataGroupIndex: TcxDataGroupIndex; - Index: Integer; const Value: Variant); -var - PSummaryValues: PVariant; -begin - if GetGroupSummaryValue(DataGroupIndex, Index) <> Value then - begin - PSummaryValues := GetGroupSummaryValues(DataGroupIndex); - if (PSummaryValues <> nil) and IsValidSummaryValuesIndex(PSummaryValues^, Index) then - begin - FSetCustomSummary := True; - try - PSummaryValues^[Index] := Value; - Changed(True); - finally - FSetCustomSummary := False; - end; - end; - end; -end; - -procedure TcxDataSummary.SetOptions(Value: TcxSummaryOptions); -begin - if FOptions <> Value then - begin - // only one: soSelectedRecords or soSelections - if Value * [soSelectedRecords, soMultipleSelectedRecords] = [soSelectedRecords, soMultipleSelectedRecords] then - begin - if soMultipleSelectedRecords in FOptions then - Value := Value - [soMultipleSelectedRecords] - else - Value := Value - [soSelectedRecords]; - end; - FOptions := Value; - Changed(False); - end; -end; - -procedure TcxDataSummary.SetSummaryGroups(Value: TcxDataSummaryGroups); -begin - SummaryGroups.Assign(Value); -end; - -{ TcxDataControllerSearch } - -constructor TcxDataControllerSearch.Create(ADataController: TcxCustomDataController); -begin - inherited Create; - FDataController := ADataController; -end; - -procedure TcxDataControllerSearch.Cancel; -begin - if Locked then Exit; - if DataController.FIncrementalSearching then - begin - DataController.FIncrementalSearchText := ''; - DataController.FIncrementalSearching := False; - DataController.Change([dccSearch]); - end; -end; - -function TcxDataControllerSearch.Locate(AItemIndex: Integer; const ASubText: string): Boolean; -var - AFilteredRecordIndex, AStartFilteredRecordIndex, AEndFilteredRecordIndex, AFocusedRecordIndex: Integer; -begin - Result := False; - if (ASubText = '') or (DataController.FilteredRecordCount = 0) then Exit; - ItemIndex := AItemIndex; - if DataController.IsGridMode then - Result := DataController.DoSearchInGridMode(ASubText, True, False) - else - begin - AFocusedRecordIndex := DataController.GetFocusedRecordIndex; - if AFocusedRecordIndex < 0 then - AStartFilteredRecordIndex := 0 - else - AStartFilteredRecordIndex := DataController.FilteredIndexByRecordIndex[AFocusedRecordIndex]; - AFilteredRecordIndex := DoSearch(AStartFilteredRecordIndex, -1, ASubText, True); - if AFilteredRecordIndex = -1 then - begin - AEndFilteredRecordIndex := AStartFilteredRecordIndex - 1; - AStartFilteredRecordIndex := 0; - AFilteredRecordIndex := DoSearch(AStartFilteredRecordIndex, AEndFilteredRecordIndex, ASubText, True); - end; - if AFilteredRecordIndex <> -1 then - begin - DoFocusedRecord(AFilteredRecordIndex); - Result := True; - end; - end; - if Result then - begin - DataController.FIncrementalSearching := True; - DataController.FIncrementalSearchText := ASubText; - DataController.Change([dccSearch]); - DataController.CheckFocusedSelected; - end; -end; - -function TcxDataControllerSearch.LocateNext(AForward: Boolean): Boolean; -var - AFilteredRecordIndex, AFocusedRecordIndex: Integer; -begin - Result := False; - if not Searching or (SearchText = '') or (ItemIndex = -1) or - (DataController.FilteredRecordCount = 0) then Exit; - if DataController.IsGridMode then - Result := DataController.DoSearchInGridMode(SearchText, AForward, True) - else - begin - AFocusedRecordIndex := DataController.GetFocusedRecordIndex; - if AFocusedRecordIndex < 0 then Exit; - if AForward then - begin - AFilteredRecordIndex := DataController.FilteredIndexByRecordIndex[AFocusedRecordIndex] + 1; - if AFilteredRecordIndex >= DataController.FilteredRecordCount then Exit; - end - else - begin - AFilteredRecordIndex := DataController.FilteredIndexByRecordIndex[AFocusedRecordIndex] - 1; - if AFilteredRecordIndex < 0 then Exit; - end; - AFilteredRecordIndex := DoSearch(AFilteredRecordIndex, -1, SearchText, AForward); - if AFilteredRecordIndex <> -1 then - begin - DoFocusedRecord(AFilteredRecordIndex); - Result := True; - end; - end; - if Result then - DataController.CheckFocusedSelected; -end; - -procedure TcxDataControllerSearch.Lock; -begin - FLocked := True; -end; - -procedure TcxDataControllerSearch.Unlock; -begin - FLocked := False; -end; - -procedure TcxDataControllerSearch.DoFocusedRecord(AFilteredRecordIndex: Integer); -var - AFocusedRecordIndex: Integer; -begin - AFocusedRecordIndex := DataController.FilteredRecordIndex[AFilteredRecordIndex]; - Lock; - try - DataController.ChangeFocusedRecordIndex(AFocusedRecordIndex); - DataController.SyncSelectionFocusedRecord; - finally - Unlock; - end; -end; - -function TcxDataControllerSearch.DoSearch(AStartFilteredRecordIndex, AEndFilteredRecordIndex: Integer; - const ASubText: string; AForward: Boolean): Integer; -var - I, ARecordIndex, AFieldIndex: Integer; - S: string; -begin - Result := -1; - if AEndFilteredRecordIndex = -1 then // auto - begin - if AForward then - AEndFilteredRecordIndex := DataController.FilteredRecordCount - 1 - else - AEndFilteredRecordIndex := 0; - end; - AFieldIndex := DataController.FIncrementalSearchField.Index; - I := AStartFilteredRecordIndex; - while (AForward and (I <= AEndFilteredRecordIndex)) or - (not AForward and (I >= AEndFilteredRecordIndex)) do - begin - ARecordIndex := DataController.FilteredRecordIndex[I]; - S := DataController.GetIncrementalSearchText(ARecordIndex, AFieldIndex); - if DataCompareText(S, ASubText, True) then - begin - Result := I; - Break; - end; - if AForward then - Inc(I) - else - Dec(I); - end; -end; - -function TcxDataControllerSearch.GetItemIndex: Integer; -begin - if DataController.FIncrementalSearchField <> nil then - Result := DataController.FIncrementalSearchField.Index - else - Result := -1; -end; - -function TcxDataControllerSearch.GetSearching: Boolean; -begin - Result := DataController.FIncrementalSearching; -end; - -function TcxDataControllerSearch.GetSearchText: string; -begin - Result := DataController.FIncrementalSearchText; -end; - -procedure TcxDataControllerSearch.SetItemIndex(const Value: Integer); -begin - DataController.CheckItemRange(Value); - DataController.FIncrementalSearchField := DataController.Fields[Value]; -end; - -{ TcxFocusedRecordChangedInfo } - -constructor TcxFocusedRecordChangedInfo.Create(APrevFocusedRecordIndex, AFocusedRecordIndex, - APrevFocusedRowIndex, AFocusedRowIndex: Integer; ANewItemRowFocusingChanged: Boolean); -begin - inherited Create; - FFocusedRecordIndex := APrevFocusedRecordIndex; - FPrevFocusedRecordIndex := AFocusedRecordIndex; - FPrevFocusedRowIndex := APrevFocusedRowIndex; - FFocusedRowIndex := AFocusedRowIndex; - FNewItemRowFocusingChanged := ANewItemRowFocusingChanged; -end; - -{ TcxFocusedRowChangedInfo } - -constructor TcxFocusedRowChangedInfo.Create(APrevFocusedRowIndex, AFocusedRowIndex: Integer); -begin - inherited Create; - FFocusedRowIndex := AFocusedRowIndex; - FPrevFocusedRowIndex := APrevFocusedRowIndex; -end; - -{ TcxUpdateRecordInfo } - -constructor TcxUpdateRecordInfo.Create(ARecordIndex: Integer); -begin - inherited Create; - FRecordIndex := ARecordIndex; -end; - -{ TcxSelectionChangedInfo } - -constructor TcxSelectionChangedInfo.Create; -begin - inherited Create; - FRowIndexes := TList.Create; -end; - -constructor TcxSelectionChangedInfo.CreateEx(ARowIndex1, ARowIndex2: Integer); -begin - Create; - if ARowIndex1 <> -1 then - FRowIndexes.Add(Pointer(ARowIndex1)); - if (ARowIndex2 <> -1) and (ARowIndex2 <> ARowIndex1) then - FRowIndexes.Add(Pointer(ARowIndex2)); -end; - -destructor TcxSelectionChangedInfo.Destroy; -begin - FRowIndexes.Free; - inherited Destroy; -end; - -function TcxSelectionChangedInfo.GetCount: Integer; -begin - Result := FRowIndexes.Count; -end; - -function TcxSelectionChangedInfo.GetRowIndex(Index: Integer): Integer; -begin - Result := Integer(FRowIndexes[Index]); -end; - -{ TcxDataControllerLocateObject } - -constructor TcxDataControllerLocateObject.Create(ADataController: TcxCustomDataController); -begin - inherited Create; - FDataController := ADataController; -end; - -destructor TcxDataControllerLocateObject.Destroy; -begin - Clear; - inherited Destroy; -end; - -procedure TcxDataControllerLocateObject.Clear; -begin - if FInternalRecordIndex < 0 then - begin - FDataController.DataStorage.DeleteRecord(FInternalRecordIndex); - FInternalRecordIndex := 0; - end; -end; - -procedure TcxDataControllerLocateObject.ReadData(AValueDefReader: TcxValueDefReader); -begin - if FInternalRecordIndex = 0 then - FInternalRecordIndex := FDataController.DataStorage.AddInternalRecord; - FDataController.BeginReadRecord; - try - FDataController.DataStorage.ReadRecord(FInternalRecordIndex, AValueDefReader); - finally - FDataController.EndReadRecord; - end; -end; - -{ TcxDataControllerKeyLocateObject } - -constructor TcxDataControllerKeyLocateObject.Create(ADataController: TcxCustomDataController); -begin - inherited Create(ADataController); - FFields := TList.Create; -end; - -destructor TcxDataControllerKeyLocateObject.Destroy; -begin - Clear; - FFields.Free; - inherited Destroy; -end; - -procedure TcxDataControllerKeyLocateObject.AddField(AField: TcxCustomDataField); -begin - FFields.Add(AField); -end; - -procedure TcxDataControllerKeyLocateObject.ClearFields; -begin - FFields.Clear; -end; - -function TcxDataControllerKeyLocateObject.FindRecordIndex: Integer; -begin - if InternalRecordIndex < 0 then - Result := FDataController.FindRecordByFields(InternalRecordIndex, FFields) - else - Result := -1; -end; - -{ TcxDataControllerGroupLocateObject } - -constructor TcxDataControllerGroupLocateObject.Create(ADataController: TcxCustomDataController); -var - I: Integer; - AField: TcxCustomDataField; -begin - inherited Create(ADataController); - FIsGroupDataSorted := True; - for I := 0 to DataController.Groups.GroupingItemCount - 1 do - begin - AField := DataController.Fields[DataController.Groups.GroupingItemIndex[I]]; - if DataController.IsSortByDisplayTextNeeded(AField) then - begin - FIsGroupDataSorted := False; - Break; - end; - end; -end; - -function TcxDataControllerGroupLocateObject.FindRecordIndex: Integer; -begin - if InternalRecordIndex < 0 then - begin - FDataController.FInternalFindRecord := True; - try - Result := FDataController.FindGroupRecord(InternalRecordIndex, Level + 1, FIsGroupDataSorted); - finally - FDataController.FInternalFindRecord := False; - end; - end - else - Result := -1; -end; - -{ TcxValueDefUnboundReader } - -constructor TcxValueDefUnboundReader.Create; -begin - inherited Create; - FItems := TList.Create; - FValues := TList.Create; -end; - -destructor TcxValueDefUnboundReader.Destroy; -begin - Clear; - FValues.Free; - FItems.Free; - inherited Destroy; -end; - -procedure TcxValueDefUnboundReader.Clear; -begin - Truncate(0); -end; - -function TcxValueDefUnboundReader.GetValue(AValueDef: TcxValueDef): Variant; -var - I: Integer; - P: PVariant; -begin - if AValueDef is TcxInternalValueDef then - AValueDef := TcxInternalValueDef(AValueDef).GetValueDef; - I := FItems.IndexOf(AValueDef); - if I <> -1 then - begin - P := PVariant(FValues[I]); - if P <> nil then - Result := P^ - else - Result := Null; - end - else - Result := Null; -end; - -function TcxValueDefUnboundReader.IsInternal(AValueDef: TcxValueDef): Boolean; -begin - Result := IsValueDefInternal(AValueDef); -end; - -procedure TcxValueDefUnboundReader.SetValue(AValueDef: TcxValueDef; const AValue: Variant); -var - I: Integer; - P: PVariant; -begin - I := FItems.IndexOf(AValueDef); - if I = -1 then - I := FItems.Add(AValueDef); - while FValues.Count < FItems.Count do - FValues.Add(nil); - P := PVariant(FValues[I]); - if P = nil then - begin - New(P); - FValues[I] := P; - end; - P^ := AValue; -end; - -procedure TcxValueDefUnboundReader.Truncate(AItemCount: Integer); -var - I: Integer; -begin - for I := FValues.Count - 1 downto AItemCount do - begin - if PVariant(FValues[I]) <> nil then - Dispose(PVariant(FValues[I])); - FValues.Delete(I); - end; -end; - -{ TcxValueDefRecordReader } - -constructor TcxValueDefRecordReader.Create(ADataController: TcxCustomDataController; - ARecordIndex: Integer); -begin - inherited Create; - FDataController := ADataController; - FRecordIndex := ARecordIndex; -end; - -function TcxValueDefRecordReader.GetDisplayText(AValueDef: TcxValueDef): string; -var - AField: TcxCustomDataField; -begin - AField := AValueDef.LinkObject as TcxCustomDataField; - if not AField.IsInternal then - Result := FDataController.GetInternalDisplayText(FRecordIndex, AField) - else - Result := ''; -end; - -function TcxValueDefRecordReader.GetValue(AValueDef: TcxValueDef): Variant; -var - AField: TcxCustomDataField; -begin - AField := AValueDef.LinkObject as TcxCustomDataField; -// if not AField.IsInternal then -// Result := FDataController.GetInternalValue(FRecordIndex, AField) -// else -// Result := Null; - Result := FDataController.GetInternalValue(FRecordIndex, AField); -end; - -function TcxValueDefRecordReader.IsInternal(AValueDef: TcxValueDef): Boolean; -begin - Result := IsValueDefInternal(AValueDef); -end; - -{ TcxDataControllerNotifier } - -constructor TcxDataControllerNotifier.Create(AOwner: TComponent; ADataController: TcxCustomDataController); -begin - inherited Create(AOwner); - FDataController := ADataController; -end; - -procedure TcxDataControllerNotifier.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and - not ((AComponent = Self) and (csDestroying in ComponentState)) then - DataController.RemoveNotification(AComponent); -end; - -{ TcxSortingBySummaryEngine } - -constructor TcxSortingBySummaryEngine.Create(ADataControllerInfo: TcxCustomDataControllerInfo); -begin - inherited Create; - FDataControllerInfo := ADataControllerInfo; -end; - -function TcxSortingBySummaryEngine.GetDataController: TcxCustomDataController; -begin - Result := FDataControllerInfo.DataController; -end; - -{ TcxCustomDataController } - -constructor TcxCustomDataController.Create(AOwner: TComponent); -begin - inherited Create; - FOwner := AOwner; - FFocusedSelected := True; - FOptions := [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding]; - FDataChangedListeners := TList.Create; - FDataStorage := TcxDataStorage.Create; - FGroups := TcxDataControllerGroups.Create(Self); - FFields := TcxCustomDataFieldList.Create(Self); - FFilters := TcxDataFilterList.Create; - FFilter := GetFilterCriteriaClass.Create(Self); - FSearch := GetSearchClass.Create(Self); - FSummary := GetSummaryClass.Create(Self); - FProvider := GetDataProviderClass.Create(Self); - FDataControllerInfo := TcxCustomDataControllerInfo.Create(Self); - FMasterRecordIndex := -1; - FBookmarkRecordIndex := -1; - FNearestRecordIndex := -1; - ResetDataChangeInfo; - FNotifier := TcxDataControllerNotifier.Create(nil, Self); - FDataStorage.OnClearInternalRecords := DataStorageClearInternalRecords; - UpdateUseRecordIDState; - FListenerLinks := TList.Create; -end; - -destructor TcxCustomDataController.Destroy; -begin - Destroying; // for CLR - FNotifier.Free; - FNotifier := nil; - FRelations.Free; - FRelations := nil; - FDataControllerInfo.Free; - FSummary.Free; - FSummary := nil; - FFilter.Free; - FFilter := nil; - FFilters.Free; - FFilters := nil; - FDataStorage.Clear(False); - FGroups.Free; - FFields.Free; - FDataStorage.Free; - FProvider.Free; - FSearch.Free; - ClearDataChangedListeners; - FDataChangedListeners.Free; - NotifyListenerLinks; - FListenerLinks.Free; - FListenerLinks := nil; - inherited Destroy; -end; - -procedure TcxCustomDataController.Assign(Source: TPersistent); -begin - if Source is TcxCustomDataController then - begin - Options := TcxCustomDataController(Source).Options; - //Filter := TcxCustomDataController(Source).Filter; - Filter.Assign(TcxCustomDataController(Source).Filter, True); - Summary := TcxCustomDataController(Source).Summary; - - OnAfterCancel := TcxCustomDataController(Source).OnAfterCancel; - OnAfterDelete := TcxCustomDataController(Source).OnAfterDelete; - OnAfterInsert := TcxCustomDataController(Source).OnAfterInsert; - OnAfterPost := TcxCustomDataController(Source).OnAfterPost; - OnBeforeCancel := TcxCustomDataController(Source).OnBeforeCancel; - OnBeforeDelete := TcxCustomDataController(Source).OnBeforeDelete; - OnBeforeInsert := TcxCustomDataController(Source).OnBeforeInsert; - OnBeforePost := TcxCustomDataController(Source).OnBeforePost; - OnFilterRecord := TcxCustomDataController(Source).OnFilterRecord; - OnNewRecord := TcxCustomDataController(Source).OnNewRecord; - - OnCompare := TcxCustomDataController(Source).OnCompare; - OnDataChanged := TcxCustomDataController(Source).OnDataChanged; - OnDetailCollapsing := TcxCustomDataController(Source).OnDetailCollapsing; - OnDetailCollapsed := TcxCustomDataController(Source).OnDetailCollapsed; - OnDetailExpanding := TcxCustomDataController(Source).OnDetailExpanding; - OnDetailExpanded := TcxCustomDataController(Source).OnDetailExpanded; - OnGroupingChanged := TcxCustomDataController(Source).OnGroupingChanged; - OnRecordChanged := TcxCustomDataController(Source).OnRecordChanged; - OnSortingChanged := TcxCustomDataController(Source).OnSortingChanged; - end - else - inherited Assign(Source); -end; - -procedure TcxCustomDataController.BeforeDestruction; -begin - inherited BeforeDestruction; - FDestroying := True; -end; - -procedure TcxCustomDataController.Destroying; -begin -end; - -function TcxCustomDataController.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -procedure TcxCustomDataController.BeginUpdate; -begin - DataControllerInfo.BeginUpdate; -end; - -procedure TcxCustomDataController.EndUpdate; -begin - DataControllerInfo.EndUpdate; - CheckChanges; -end; - -procedure TcxCustomDataController.BeginFullUpdate; -begin - BeginUpdate; -end; - -procedure TcxCustomDataController.EndFullUpdate; -begin - EndUpdate; -end; - -procedure TcxCustomDataController.BeginUpdateFields; -begin - Inc(FLockUpdateFieldsCount); -end; - -procedure TcxCustomDataController.EndUpdateFields; -begin - Dec(FLockUpdateFieldsCount); - if (FLockUpdateFieldsCount = 0) and FUpdateFieldsFlag then - begin - FUpdateFieldsFlag := False; - LayoutChanged([lcStructure]); - end; -end; - -procedure TcxCustomDataController.SaveKeys; -begin - if FSaveObjectLockCount = 0 then - begin - BeginFullUpdate; - FSaveObject := TcxSaveObject.Create; - TcxSaveObject(FSaveObject).Save(Self); - end; - Inc(FSaveObjectLockCount); -end; - -procedure TcxCustomDataController.RestoreKeys; -begin - Dec(FSaveObjectLockCount); - if FSaveObjectLockCount = 0 then - begin - try - TcxSaveObject(FSaveObject).Restore(Self); - FSaveObject.Free; - FSaveObject := nil; - finally - EndFullUpdate; - end; - end; -end; - -function TcxCustomDataController.CreateFilter: TcxDataFilterCriteria; -begin - Result := GetFilterCriteriaClass.Create(Self); - FFilters.Add(Result); -end; - -function TcxCustomDataController.AddItem(AItem: TObject): TcxCustomDataField; -begin - if (AItem <> nil) and (Fields.FieldByItem(AItem) <> nil) then - InvalidOperation(cxSDataItemExistError); - Result := AddField; - Result.Item := AItem; -end; - -function TcxCustomDataController.ItemPropertiesChanged(AItemIndex: Integer): Boolean; -begin - Result := (AItemIndex = -1) or (GetItemSortOrder(AItemIndex) <> soNone); - if Result then - Refresh; -end; - -procedure TcxCustomDataController.Loaded; -begin - if FDataChangedFlag then - DoDataChanged; - if FAfterSummaryFlag then - Summary.DoAfterSummary; -end; - -procedure TcxCustomDataController.RemoveItem(AItem: TObject); -var - AField: TcxCustomDataField; -begin - AField := Fields.FieldByItem(AItem); - if AField <> nil then - begin - BeginUpdate; - try - DataControllerInfo.RemoveField(AField); - AField.Free; - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomDataController.UpdateItemIndexes; -var - I: Integer; - AField: TcxCustomDataField; -begin - for I := 0 to ItemCount - 1 do - begin - AField := Fields.FieldByItem(GetItem(I)); - AField.Index := I; - end; - Change([dccLayout]); -end; - -procedure TcxCustomDataController.UpdateItems(AUpdateFields: Boolean); -begin - if FUpdateItems then Exit; - FUpdateItems := True; - try - if LockCount <> 0 then - FStructureChanged := True; - if IsProviderDataSource then - UpdateStorage(AUpdateFields); - finally - FUpdateItems := False; - end; -end; - -function TcxCustomDataController.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := False; -end; - -function TcxCustomDataController.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := False; -end; - -// Data Changed notify - -procedure TcxCustomDataController.AddDataChangedListener(AInstance: TObject; - ADataChangedEvent: TNotifyEvent); -var - E: TNotifyEventItem; -begin - E := TNotifyEventItem.Create; - E.Instance := AInstance; - E.Event := ADataChangedEvent; - FDataChangedListeners.Add(E); -end; - -procedure TcxCustomDataController.RemoveDataChangedListener(AInstance: TObject; - ADataChangedEvent: TNotifyEvent); -var - I: Integer; - E: TNotifyEventItem; -begin - for I := 0 to FDataChangedListeners.Count - 1 do - begin - E := TNotifyEventItem(FDataChangedListeners[I]); - if (E.Instance = AInstance) and (@E.Event = @ADataChangedEvent) then - begin - E.Free; - FDataChangedListeners.Delete(I); - Break; - end; - end; -end; - -procedure TcxCustomDataController.AddDataChangeRefCount; -begin - Inc(FDataChangeRefCount); - IsPattern := FIsPatternSave; -end; - -procedure TcxCustomDataController.RemoveDataChangeRefCount; -begin - Dec(FDataChangeRefCount); - IsPattern := FIsPatternSave; -end; - -function TcxCustomDataController.DataChangedNotifyLocked: Boolean; -begin - Result := FDataChangedLockCount <> 0; -end; - -function TcxCustomDataController.IsDataLoading: Boolean; -begin - Result := (Provider <> nil) and (Provider.LockCount <> 0); -end; - -procedure TcxCustomDataController.LockDataChangedNotify; -begin - Inc(FDataChangedLockCount); -end; - -procedure TcxCustomDataController.UnlockDataChangedNotify; -begin - Dec(FDataChangedLockCount); -end; - -procedure TcxCustomDataController.LockGridModeNotify; -begin - Inc(FLockGridModeNotifyCount); - Provider.BeginLocate; -end; - -procedure TcxCustomDataController.UnlockGridModeNotify; -begin - Provider.EndLocate; - Dec(FLockGridModeNotifyCount); -end; - -// Structure - -procedure TcxCustomDataController.ChangeNeedConversion(AItemIndex: Integer; - ANeedConversion: Boolean); -begin - CheckItemRange(AItemIndex); - if GetItemNeedConversion(AItemIndex) <> ANeedConversion then - begin - Fields[AItemIndex].NeedConversion := ANeedConversion; - DataControllerInfo.UpdateField(Fields[AItemIndex]); - end; -end; - -procedure TcxCustomDataController.ChangeTextStored(AItemIndex: Integer; - ATextStored: Boolean); -begin - CheckItemRange(AItemIndex); - if GetItemTextStored(AItemIndex) <> ATextStored then - begin - Fields[AItemIndex].TextStored := ATextStored; - DataControllerInfo.UpdateField(Fields[AItemIndex]); - end; -end; - -procedure TcxCustomDataController.ChangeValueTypeClass(AItemIndex: Integer; - AValueTypeClass: TcxValueTypeClass); -begin - CheckItemRange(AItemIndex); - if GetItemValueTypeClass(AItemIndex) <> AValueTypeClass then - begin - Fields[AItemIndex].ValueTypeClass := AValueTypeClass; - if IsProviderMode then - RestructData; - DataControllerInfo.UpdateField(Fields[AItemIndex]); - DoValueTypeClassChanged(AItemIndex); - end; -end; - -function TcxCustomDataController.GetItemCount: Integer; -begin - Result := Fields.ItemCount; -end; - -function TcxCustomDataController.GetItemNeedConversion(AItemIndex: Integer): Boolean; -begin - Result := False; -end; - -function TcxCustomDataController.GetItemTextStored(AItemIndex: Integer): Boolean; -begin - CheckItemRange(AItemIndex); - Result := Fields[AItemIndex].TextStored; -end; - -function TcxCustomDataController.GetItemValueTypeClass(AItemIndex: Integer): TcxValueTypeClass; -begin - CheckItemRange(AItemIndex); - Result := Fields[AItemIndex].ValueTypeClass; -end; - -function TcxCustomDataController.IsDisplayFormatDefined(AItemIndex: Integer; - AIgnoreSimpleCurrency: Boolean): Boolean; -begin - Result := GetItemTextStored(AItemIndex); -end; - -// Data - -function TcxCustomDataController.AppendRecord: Integer; - - function DataStorageAppendRecord: Integer; - begin - Result := DataStorage.AppendRecord; - DataChanged(dcNew, -1, -1); - end; - -begin - if IsSmartLoad then - Result := AppendInSmartLoad - else - if IsProviderMode then - Result := Provider.AppendRecord - else - Result := DataStorageAppendRecord; -end; - -procedure TcxCustomDataController.DeleteRecord(ARecordIndex: Integer); - - procedure DataStorageDeleteRecord(ARecordIndex: Integer); - begin - DataStorage.DeleteRecord(ARecordIndex); - CorrectAfterDelete(ARecordIndex); - CheckSelectedCount(ARecordIndex); - CheckInternalRecordRange(ARecordIndex); - DataChanged(dcDeleted, -1, -1); - end; - -begin - CheckRecordRange(ARecordIndex); - if IsSmartLoad and FInSmartLoad then - DeleteInSmartLoad(ARecordIndex) - else - begin - if Provider.EditingRecordIndex = ARecordIndex then - Provider.FEditingRecordIndex := cxNullEditingRecordIndex; - if IsProviderMode and (ARecordIndex >= 0) then - Provider.DeleteRecord(ARecordIndex) - else - DataStorageDeleteRecord(ARecordIndex); - end; -end; - -function TcxCustomDataController.GetGroupValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; -begin - Result := GetInternalValue(ARecordIndex, AField); -end; - -procedure TcxCustomDataController.GetGroupValues(ARecordIndex: Integer; var AValues: TcxDataSummaryValues); -var - I: Integer; -begin - // Clear - SetLength(AValues, 0); - SetLength(AValues, Groups.GroupingItemCount); - for I := 0 to Groups.GroupingItemCount - 1 do - AValues[I] := Null; - // Load Values - if (0 <= ARecordIndex) and (ARecordIndex < RecordCount) then - for I := 0 to Groups.GroupingItemCount - 1 do - AValues[I] := GetGroupValue(ARecordIndex, Fields[Groups.GroupingItemIndex[I]]); -end; - -function TcxCustomDataController.GetDisplayText(ARecordIndex, AItemIndex: Integer): string; -begin - CheckRange(ARecordIndex, AItemIndex); - Result := GetInternalDisplayText(ARecordIndex, Fields[AItemIndex]); -end; - -function TcxCustomDataController.GetRecordCount: Integer; -begin -{ if IsProviderMode then - Result := Provider.GetRecordCount - else} - Result := DataStorage.RecordCount; -end; - -function TcxCustomDataController.GetRecordId(ARecordIndex: Integer): Variant; -begin - if not ((0 <= ARecordIndex) and (ARecordIndex < RecordCount)) then - InvalidOperation(cxSDataRecordIndexError); - if IsRecordID then - Result := DataStorage.GetRecordID(ARecordIndex) - else - begin - if IsProviderMode and Provider.IsRecordIdSupported then - Result := Provider.GetRecordId(ARecordIndex) - else - Result := Null; - end; -end; - -function TcxCustomDataController.GetValue(ARecordIndex, AItemIndex: Integer): Variant; -begin - CheckRange(ARecordIndex, AItemIndex); - Result := GetInternalValue(ARecordIndex, Fields[AItemIndex]); -end; - -function TcxCustomDataController.InsertRecord(ARecordIndex: Integer): Integer; - - function DataStorageInsertRecord(ARecordIndex: Integer): Integer; - begin - Result := ARecordIndex; - DataStorage.InsertRecord(ARecordIndex); - CorrectAfterInsert(ARecordIndex); - DataChanged(dcNew, -1, -1); - end; - -begin - if (ARecordIndex < 0) or (ARecordIndex > RecordCount) then - InvalidOperation(cxSDataRecordIndexError); - if IsSmartLoad then - Result := AppendInSmartLoad - else - if IsProviderMode then - Result := Provider.InsertRecord(ARecordIndex) - else - Result := DataStorageInsertRecord(ARecordIndex); -end; - -procedure TcxCustomDataController.Refresh; -begin - BeginUpdate; - try - DataControllerInfo.Refresh; - finally - EndUpdate; - end; -end; - -procedure TcxCustomDataController.SetDisplayText(ARecordIndex, AItemIndex: Integer; - const Value: string); -begin - if IsGridMode then Exit; - CheckRange(ARecordIndex, AItemIndex); - if IsProviderMode and (ARecordIndex >= 0) then - begin - Provider.SetDisplayText(ARecordIndex, Fields[AItemIndex], Value); - DataChanged(dcField, AItemIndex, ARecordIndex); - end - else - begin - if Fields[AItemIndex].ValueDef <> nil then - begin - DataStorage.SetDisplayText(ARecordIndex, Fields[AItemIndex].ValueDef, Value); - DataChanged(dcField, AItemIndex, ARecordIndex); - end; - end; -end; - -procedure TcxCustomDataController.SetRecordCount(Value: Integer); - - procedure SetDataStorageRecordCount; - const - DataChangeA: array[Boolean] of TcxDataChange = (dcDeleted , dcNew); - var - PrevRecordCount, RealRecordCount: Integer; - begin - PrevRecordCount := DataStorage.RecordCount; - DataStorage.RecordCount := Value; - RealRecordCount := DataStorage.RecordCount; - if RealRecordCount <> PrevRecordCount then - begin - CheckSelectedCount(-1); - CheckEditingRecordIndex(-1); - DataChanged(DataChangeA[RealRecordCount > PrevRecordCount], -1, -1); - end; - end; - -begin - if IsGridMode then Exit; - if Value < 0 then Value := 0; - if RecordCount <> Value then - begin - if IsProviderMode then - Provider.SetRecordCount(Value) - else - SetDataStorageRecordCount; - end; -end; - -procedure TcxCustomDataController.SetValue(ARecordIndex, AItemIndex: Integer; const Value: Variant); -begin - if IsGridMode then Exit; - CheckRange(ARecordIndex, AItemIndex); - if IsProviderMode and (ARecordIndex >= 0) then - begin - Provider.SetValue(ARecordIndex, Fields[AItemIndex], Value); - DataChanged(dcField, AItemIndex, ARecordIndex); - end - else - begin - if Fields[AItemIndex].ValueDef <> nil then - begin - SetStoredValue(ARecordIndex, Fields[AItemIndex], Value); -// DataStorage.SetValue(ARecordIndex, Fields[AItemIndex].ValueDef, Value); - DataChanged(dcField, AItemIndex, ARecordIndex); - end; - end; -end; - -procedure TcxCustomDataController.SortByDisplayTextChanged; -begin -// if dcoSortByDisplayText in Options then - Refresh; -end; - -// Data Editing - -procedure TcxCustomDataController.Append; -begin - if Provider.CanAppend then - Provider.Append; -end; - -procedure TcxCustomDataController.Cancel; -var - APrevRowIndex: Integer; -begin - if FInCancel then Exit; - FInCancel := True; - try - APrevRowIndex := FocusedRowIndex; - if Provider.IsEditing then - Provider.Cancel; - if APrevRowIndex > (GetRowCount - 1) then - APrevRowIndex := (GetRowCount - 1); - if not DataControllerInfo.FInCanFocusedRowChanging then - FocusedRowIndex := APrevRowIndex; - finally - FInCancel := False; - end; -end; - -function TcxCustomDataController.CanInitEditing(AItemIndex: Integer): Boolean; -begin - Result := False; - CheckItemRange(AItemIndex); - if (Provider.CanModify or Fields[AItemIndex].IsUnbound) and - Fields[AItemIndex].CanModify(GetItemValueSource(AItemIndex)) then - Result := Provider.CanInitEditing(EditingRecordIndex); -end; - -procedure TcxCustomDataController.CheckBrowseMode; -begin -end; - -procedure TcxCustomDataController.DeleteFocused; -var - AList: TList; - ARowIndex: Integer; -begin - ARowIndex := GetFocusedRowIndex; - if (ARowIndex <> -1) and Provider.CanDelete then - begin - Provider.BeginDeleting; - try - if GetRowInfo(ARowIndex).Level < Groups.LevelCount then // It's Group Row - begin - AList := TList.Create; - try - Groups.LoadRecordIndexesByRowIndex(AList, ARowIndex); - DeleteRecords(AList); - finally - AList.Free; - end; - end - else - DeleteFocusedRecord; - ClearSelection; // !!! - finally - Provider.EndDeleting; - end; - end; -end; - -procedure TcxCustomDataController.DeleteSelection; -begin - if (GetSelectedCount > 0) and Provider.CanDelete then - begin - Provider.BeginDeleting; - try - if IsFocusedSelectedMode then - DeleteFocusedRecord - else - Provider.DeleteSelection; - finally - Provider.EndDeleting; - end; - end; -end; - -procedure TcxCustomDataController.Edit; -begin - if Provider.CanModify then - Provider.Edit; -end; - -procedure TcxCustomDataController.FocusControl(AItemIndex: Integer; var Done: Boolean); -begin - Done := False; -end; - -function TcxCustomDataController.GetEditValue(AItemIndex: Integer; - AEditValueSource: TcxDataEditValueSource): Variant; -begin - CheckItemRange(AItemIndex); - if UseNewItemRowForEditing and NewItemRowFocused and not Provider.IsEditing then - Result := Null - else - Result := Provider.GetEditValue(EditingRecordIndex, Fields[AItemIndex], AEditValueSource); -end; - -function TcxCustomDataController.GetItemValueSource(AItemIndex: Integer): TcxDataEditValueSource; -begin - Result := evsText; -end; - -procedure TcxCustomDataController.Insert; -begin - if Provider.CanInsert then - Provider.Insert; -end; - -procedure TcxCustomDataController.Post(AForcePost: Boolean); -var - ALink: TcxDataListenerLink; -begin - ALink := AddListenerLink(Self); - try - FCheckFocusingAfterFilterNeeded := True; - if Provider.IsEditing then - Provider.Post(AForcePost); - finally - if ALink.Ref <> nil then - Provider.FInsertedRecordIndex := -1; - RemoveListenerLink(ALink); - end; -end; - -procedure TcxCustomDataController.PostEditingData; -begin - Provider.PostEditingData; -end; - -procedure TcxCustomDataController.RefreshExternalData; -begin -end; - -function TcxCustomDataController.SetEditValue(AItemIndex: Integer; - const AValue: Variant; AEditValueSource: TcxDataEditValueSource): Boolean; -begin - if CanInitEditing(AItemIndex) then - Result := Provider.SetEditValue(EditingRecordIndex, Fields[AItemIndex], AValue, AEditValueSource) - else - Result := False; - // Immediate Post - if Result and IsImmediatePost then - Post; -end; - -procedure TcxCustomDataController.UpdateData; -begin -end; - -// New Item Row - -function TcxCustomDataController.GetEditingRecordIndex: Integer; -begin - if Provider.FEditingRecordIndex <> cxNullEditingRecordIndex then - Result := Provider.FEditingRecordIndex - else - Result := CalcEditingRecordIndex; -end; - -function TcxCustomDataController.GetNewItemRecordIndex: Integer; -begin - if FNewItemRecordIndex = 0 then - FNewItemRecordIndex := DataStorage.AddInternalRecord; - Result := FNewItemRecordIndex; -end; - -// Data Save/Load - -procedure TcxCustomDataController.LoadFromStream(AStream: TStream); -var - S: AnsiString; - I, AValueCount, ADataValueCount: Integer; - AValueDef: TcxValueDef; - AReader: TcxReader; -begin - if IsProviderMode then - InvalidOperation(cxSDataProviderModeError); - AReader := TcxReader.Create(AStream); - try - if AReader.ReadAnsiString <> stDataControllerSignature then - InvalidOperation(cxSDataInvalidStreamFormat); - // ValueCount - AValueCount := AReader.ReadInteger; - // ValueDefs -// if AValueCount > 0 then - begin - ADataValueCount := 0; - for I := 0 to DataStorage.ValueDefs.Count - 1 do - begin - AValueDef := DataStorage.ValueDefs[I]; - AValueDef.StreamStored := not IsValueDefInternal(AValueDef); - if AValueDef.StreamStored then - Inc(ADataValueCount); - end; - if ADataValueCount <> AValueCount then - InvalidOperation(cxSDataInvalidStreamFormat); - - DataStorage.BeginStreaming(CompareByLinkObject); - try - // ValueDefs - for I := 0 to DataStorage.ValueDefs.Count - 1 do - begin - AValueDef := DataStorage.ValueDefs[I]; - if AValueDef.StreamStored then - begin - ReadAnsiStringProc(AStream, S); - if AValueDef.ValueTypeClass.ClassName <> dxAnsiStringToString(S) then - InvalidOperation(cxSDataInvalidStreamFormat); - end; - end; - BeginUpdate; - try - ClearSelection; - // RecordCount - RecordCount := AReader.ReadInteger; - // Records - for I := 0 to RecordCount - 1 do - DataStorage.ReadData(I, AStream); - DataControllerInfo.Refresh; - finally - EndUpdate; - end; - finally - DataStorage.EndStreaming; - end; - end; - finally - AReader.Free; - end; -end; - -procedure TcxCustomDataController.SaveToStream(AStream: TStream); -var - I, AValueCount: Integer; - AValueDef: TcxValueDef; - AWriter: TcxWriter; -begin - AWriter := TcxWriter.Create(AStream); - try - AWriter.WriteAnsiString(stDataControllerSignature); - // ValueCount - AValueCount := 0; - if not IsProviderMode then - begin - for I := 0 to DataStorage.ValueDefs.Count - 1 do - begin - AValueDef := DataStorage.ValueDefs[I]; - AValueDef.StreamStored := not IsValueDefInternal(AValueDef); - if AValueDef.StreamStored then - Inc(AValueCount); - end; - end; - AWriter.WriteInteger(AValueCount); -// if AValueCount > 0 then - begin - DataStorage.BeginStreaming(CompareByLinkObject); - try - // ValueDefs - for I := 0 to DataStorage.ValueDefs.Count - 1 do - begin - AValueDef := DataStorage.ValueDefs[I]; - if AValueDef.StreamStored then - AWriter.WriteAnsiString(dxStringToAnsiString(AValueDef.ValueTypeClass.ClassName)); - end; - // RecordCount - AWriter.WriteInteger(RecordCount); - // Records - for I := 0 to RecordCount - 1 do - DataStorage.WriteData(I, AStream); - finally - DataStorage.EndStreaming; - end; - end; - finally - AWriter.Free; - end; -end; - -// Master-Detail: Relations - -function TcxCustomDataController.GetMasterDataController: TcxCustomDataController; -var - AMasterRelation: TcxCustomDataRelation; -begin - AMasterRelation := GetMasterRelation; - if AMasterRelation <> nil then - Result := AMasterRelation.DataController - else - Result := nil; -end; - -function TcxCustomDataController.GetMasterRecordIndex: Integer; -begin - Result := FMasterRecordIndex; -end; - -function TcxCustomDataController.GetMasterRelation: TcxCustomDataRelation; -begin - Result := FMasterRelation; -end; - -function TcxCustomDataController.GetPatternDataController: TcxCustomDataController; - - function FindByItem(ADataController: TcxCustomDataController; AItem: TObject): TcxCustomDataController; - var - I: Integer; - ARelation: TcxCustomDataRelation; - begin - ARelation := ADataController.Relations.FindByItem(AItem); - if ARelation <> nil then - Result := ARelation.DetailDataController - else - begin - Result := nil; - for I := 0 to ADataController.Relations.Count - 1 do - if ADataController.Relations[I].DetailDataController <> nil then - begin - Result := FindByItem(ADataController.Relations[I].DetailDataController, AItem); - if Result <> nil then - Break; - end; - end; - end; - -begin - if FMasterRelation <> nil then - Result := FindByItem(GetRootDataController, FMasterRelation.Item) - else - Result := Self; -end; - -function TcxCustomDataController.GetRootDataController: TcxCustomDataController; -begin - Result := Self; - while Result.FMasterRelation <> nil do - Result := Result.FMasterRelation.DataController; -end; - -function TcxCustomDataController.IsDetailMode: Boolean; -begin - Result := (FMasterRelation <> nil); -end; - -function TcxCustomDataController.CreateDetailLinkObject(ARelation: TcxCustomDataRelation; ARecordIndex: Integer): TObject; -begin - Result := nil; -end; - -procedure TcxCustomDataController.FocusDetails(ARecordIndex: Integer); -var - I: Integer; - ADataController: TcxCustomDataController; -begin - for I := 0 to Relations.Count - 1 do - if IsDetailDataControllerExist(ARecordIndex, I) and - (GetDetailActiveRelationIndex(ARecordIndex) = I) then - begin - ADataController := GetDetailDataController(ARecordIndex, I); - ADataController.CheckFocusedRow; - Break; - end; -end; - -function TcxCustomDataController.GetDetailDataControllerByLinkObject(ALinkObject: TObject): TcxCustomDataController; -begin - Result := nil; -end; - -// Master-Detail: Grid Notifications - -procedure TcxCustomDataController.ResetRelationByItem(AItem: TObject); - - procedure FindAndReset(ADataController: TcxCustomDataController); // TODO: ref FindAndReset + FindAndRemove - var - I, J: Integer; - ARelation: TcxCustomDataRelation; - begin - with ADataController do - begin - ARelation := Relations.FindByItem(AItem); - if ARelation <> nil then - ClearDetails - else - begin - for I := 0 to DataStorage.RecordCount - 1 do - for J := 0 to Relations.Count - 1 do - begin - if IsDetailDataControllerExist(I, J) then - FindAndReset(GetDetailDataController(I, J)); - end; - end; - end; - end; - -begin - FindAndReset(Self); -end; - -procedure TcxCustomDataController.SetMasterMode(AMasterRelation: TcxCustomDataRelation; AIsPattern: Boolean); -begin - BeginFullUpdate; - try - SetMasterRelation(AMasterRelation, -1); - IsPattern := AIsPattern; - finally - EndFullUpdate; - end; -end; - -procedure TcxCustomDataController.SetMasterRelation(AMasterRelation: TcxCustomDataRelation; - AMasterRecordIndex: Integer); -begin - if (AMasterRelation = nil) and (FMasterRelation = nil) and - (AMasterRecordIndex = -1) and (FMasterRecordIndex = -1) then - Exit; - BeginUpdate; - try - if FMasterRelation <> nil then - begin - if (FMasterRelation.FDetailDataController = Self) and (AMasterRecordIndex = -1) then // It's Pattern - FMasterRelation.FDetailDataController := nil - else - CustomDataSource := nil; - if (FMasterRelation <> nil) and (FMasterRelation.DataController <> nil) and - (FMasterRelation.DataController.FCreatingDataController = Self) then - FMasterRelation.DataController.FCreatingDataController := nil; - Relations.Changed(nil); // Reset Details - end; - FMasterRelation := AMasterRelation; - if (FMasterRelation <> nil) and (AMasterRecordIndex = -1) then // It's Pattern - begin - FMasterRelation.FDetailDataController := Self; - FMasterRelation.Changed; - end; - if (FMasterRelation <> nil) and (AMasterRecordIndex <> -1) then // Isn't Pattern - begin - CustomDataSource := GetPatternDataController.CustomDataSource; - if (FMasterRelation <> nil) and (FMasterRelation.DataController <> nil) then - FMasterRelation.DataController.FCreatingDataController := Self; - end; - FMasterRecordIndex := AMasterRecordIndex; - LayoutChanged([lcData]); - finally - EndUpdate; - end; -end; - -// Master-Detail: View Data - -procedure TcxCustomDataController.ChangeDetailActiveRelationIndex(ARecordIndex: Integer; ARelationIndex: Integer); -var - ADetailObject: TcxDetailObject; -begin - if GetDetailActiveRelationIndex(ARecordIndex) <> ARelationIndex then - begin - CheckBrowseMode; - ADetailObject := Relations.GetDetailObject(ARecordIndex); - if Assigned(ADetailObject) then - begin - ADetailObject.ActiveRelationIndex := ARelationIndex; - Change([dccDetail]); - end; - end; -end; - -function TcxCustomDataController.ChangeDetailExpanding(ARecordIndex: Integer; - AExpanded: Boolean): Boolean; -var - ADetailObject: TcxDetailObject; -begin - if GetDetailExpanding(ARecordIndex) <> AExpanded then - begin - Result := False; - FIsDetailExpanding := True; - try - CheckBrowseMode; - if (0 <= ARecordIndex) and (ARecordIndex < RecordCount) then - begin - ADetailObject := Relations.GetDetailObject(ARecordIndex); - if Assigned(ADetailObject) and CanChangeDetailExpanding(ARecordIndex, AExpanded) then - begin - ADetailObject.Expanded := AExpanded; - Result := True; - if (GetMasterDataController = nil) or (GetMasterDataController.LockCount = 0) then - Change([dccDetail]); - if AExpanded then - DoDetailExpanded(ARecordIndex) - else - DoDetailCollapsed(ARecordIndex); - end; - end; - finally - FIsDetailExpanding := False; - end; - end - else - Result := True; -end; - -procedure TcxCustomDataController.ClearDetailLinkObject(ARecordIndex: Integer; ARelationIndex: Integer); -begin - if Relations.ClearDetailObject(ARecordIndex, ARelationIndex) then - Change([dccDetail]); -end; - -procedure TcxCustomDataController.ClearDetails; -var - I: Integer; -begin - BeginUpdate; - try - for I := 0 to DataStorage.RecordCount - 1 do - ClearDetailLinkObject(I, -1); - finally - EndUpdate; - end; -end; - -procedure TcxCustomDataController.CollapseDetails; -var - I: Integer; - ADetailObject: TcxDetailObject; -begin - CheckBrowseMode; - BeginUpdate; - try - for I := 0 to DataStorage.RecordCount - 1 do - begin - ClearDetailLinkObject(I, -1); - ADetailObject := Relations.GetDetailObject(I); - if Assigned(ADetailObject) then - begin - ADetailObject.Expanded := False; - Change([dccDetail]); - end; - end; - finally - EndUpdate; - end; -end; - -procedure TcxCustomDataController.ForEachDetail(AMasterRelation: TcxCustomDataRelation; - AProc: TcxDataControllerEachDetailProc); -var - ARelationIndexes: TList; - - procedure ForEach(ADataController: TcxCustomDataController; AIndex: Integer); - var - ARelationIndex, I: Integer; - ADetailDataController: TcxCustomDataController; - begin - ARelationIndex := Integer(ARelationIndexes[AIndex]); - with ADataController do - begin - for I := 0 to DataStorage.RecordCount - 1 do - begin - if IsDetailDataControllerExist(I, ARelationIndex) then - ADetailDataController := GetDetailDataController(I, ARelationIndex) - else - if FCreatingDataController <> nil then - ADetailDataController := FCreatingDataController - else - ADetailDataController := nil; - if ADetailDataController <> nil then - begin - if AIndex = (ARelationIndexes.Count - 1) then - AProc(ADetailDataController) - else - ForEach(ADetailDataController, AIndex + 1); - end; - end; - end; - end; - -var - ARootDataController: TcxCustomDataController; -begin - ARelationIndexes := TList.Create; - try - ARootDataController := nil; - while AMasterRelation <> nil do - begin - ARootDataController := AMasterRelation.DataController; - ARelationIndexes.Insert(0, Pointer(AMasterRelation.Index)); - AMasterRelation := ARootDataController.FMasterRelation; - end; - if ARootDataController <> nil then - ForEach(ARootDataController, 0); - finally - ARelationIndexes.Free; - end; -end; - -function TcxCustomDataController.GetDetailActiveRelationIndex(ARecordIndex: Integer): Integer; -var - ADetailObject: TcxDetailObject; -begin - Result := -1; - if Relations.IsEmpty then Exit; - ADetailObject := Relations.GetDetailObject(ARecordIndex); - if Assigned(ADetailObject) then - Result := ADetailObject.ActiveRelationIndex; -end; - -function TcxCustomDataController.GetDetailDataController(ARecordIndex: Integer; ARelationIndex: Integer): TcxCustomDataController; -begin - Result := GetDetailDataControllerByLinkObject(GetDetailLinkObject(ARecordIndex, ARelationIndex)); -end; - -function TcxCustomDataController.GetDetailExpanding(ARecordIndex: Integer): Boolean; -var - ADetailObject: TcxDetailObject; -begin - ADetailObject := Relations.GetDetailObject(ARecordIndex); - if Assigned(ADetailObject) then - Result := ADetailObject.Expanded - else - Result := False; -{ -if Result then - if (Relations.Count > 0) and (Relations[0].DataController.GetPatternDataController.Relations[0].FDetailDataController = nil) then - begin - Result := False; - Exit; - end; - } -end; - -function TcxCustomDataController.GetDetailHasChildren(ARecordIndex, ARelationIndex: Integer): Boolean; -var - AIsBound: Boolean; - ADetailObject: TcxDetailObject; - AInfoObject: TcxDetailInfoObject; -begin - // TODO: DB!!! - AIsBound := IsDataBound; - if IsDetailDataControllerExist(ARecordIndex, ARelationIndex) then - Result := GetDetailDataController(ARecordIndex, ARelationIndex).RecordCount <> 0 - else - begin - Result := AIsBound; - if AIsBound then - begin - ADetailObject := Relations.GetDetailObject(ARecordIndex); - if Assigned(ADetailObject) then - begin - AInfoObject := ADetailObject.InfoObjects[ARelationIndex]; - if AInfoObject = nil then - begin - AInfoObject := TcxDetailInfoObject.Create; - ADetailObject.InfoObjects[ARelationIndex] := AInfoObject; - end; - if not AInfoObject.HasChildrenAssigned then - begin - AInfoObject.HasChildren := Provider.GetDetailHasChildren(ARecordIndex, ARelationIndex); - AInfoObject.HasChildrenAssigned := True; - end; - Result := AInfoObject.HasChildren; - end; - end; - end; -end; - -function TcxCustomDataController.GetDetailLinkObject(ARecordIndex: Integer; ARelationIndex: Integer): TObject; - - function IsDetailObjectDestroyed(ADetailObject: TcxDetailObject): Boolean; - begin - // dataset in edit mode - Result := not ((0 <= ARecordIndex) and (ARecordIndex < RecordCount) and - (ADetailObject = Relations.GetDetailObject(ARecordIndex))); - end; - -var - ADetailObject: TcxDetailObject; -begin - ADetailObject := Relations.GetDetailObject(ARecordIndex); - if Assigned(ADetailObject) then - begin - Result := ADetailObject.LinkObjects[ARelationIndex]; - if Result = nil then - begin - if FCreatingLinkObject then Exit; - FCreatingLinkObject := True; - if GetPatternDataController <> nil then - GetPatternDataController.FCreatingLinkObject := True; - try - Result := CreateDetailLinkObject(Relations[ARelationIndex], ARecordIndex); - FCreatingDataController := nil; // !!! - if IsDetailObjectDestroyed(ADetailObject) then - begin - Result.Free; - Result := nil; - // DataNotify - end - else - ADetailObject.LinkObjects[ARelationIndex] := Result; - finally - if GetPatternDataController <> nil then - GetPatternDataController.FCreatingLinkObject := False; - FCreatingLinkObject := False; - end; - end; - if (Result = nil) and not FRecreatingLinkObject then // recreate DetailObject - begin - FRecreatingLinkObject := True; - try - Result := GetDetailLinkObject(ARecordIndex, ARelationIndex); - finally - FRecreatingLinkObject := False; - end; - end; - end - else - Result := nil; -end; - -function TcxCustomDataController.IsDetailDataControllerExist(ARecordIndex: Integer; ARelationIndex: Integer): Boolean; -begin - Result := Relations.IsDetailObjectExist(ARecordIndex, ARelationIndex); -end; - -procedure TcxCustomDataController.ResetHasChildrenFlag; -var - I: Integer; - ADetailObject: TcxDetailObject; - AChanged: Boolean; -begin - AChanged := False; - for I := 0 to RecordCount - 1 do - begin - ADetailObject := Relations.GetDetailObject(I); - if Assigned(ADetailObject) then - begin - if ADetailObject.ClearHasChildrenFlag then - AChanged := True; - end; - end; - if AChanged then - DataControllerInfo.RefreshView; -end; - -// View Data - -procedure TcxCustomDataController.ForEachRow(ASelectedRows: Boolean; AProc: TcxDataControllerEachRowProc); -var - I, J: Integer; -begin - if ASelectedRows then - begin - for I := 0 to GetSelectedCount - 1 do - begin - J := GetSelectedRowIndex(I); - AProc(J, GetRowInfo(J)); - end; - end - else - begin - for I := 0 to GetRowCount - 1 do - AProc(I, GetRowInfo(I)); - end; -end; - -function TcxCustomDataController.GetNearestRowIndex(ARowIndex: Integer): Integer; -begin - Result := DataControllerInfo.GetNearestRowIndex(ARowIndex); -end; - -function TcxCustomDataController.GetRowCount: Integer; -begin - Result := DataControllerInfo.GetRowCount; -end; - -function TcxCustomDataController.GetRowIndexByRecordIndex(ARecordIndex: Integer; - AMakeVisible: Boolean): Integer; -begin - CheckRecordRange(ARecordIndex); - Result := DataControllerInfo.GetRowIndexByRecordIndex(ARecordIndex, AMakeVisible); -end; - -function TcxCustomDataController.GetRowInfo(ARowIndex: Integer): TcxRowInfo; -begin - Result := DataControllerInfo.GetRowInfo(ARowIndex); -end; - -function TcxCustomDataController.GetRowDisplayText(const ARowInfo: TcxRowInfo; - var AItemIndex: Integer): string; -begin - if (ARowInfo.RecordIndex <> NewItemRecordIndex) and (ARowInfo.Level < Groups.GetGroupingItemCount) then - AItemIndex := Groups.GetGroupingItemIndex(ARowInfo.Level); - Result := GetDisplayText(ARowInfo.RecordIndex, AItemIndex); -end; - -function TcxCustomDataController.GetRowValue(const ARowInfo: TcxRowInfo; AItemIndex: Integer): Variant; -begin - if (ARowInfo.RecordIndex <> NewItemRecordIndex) and (ARowInfo.Level < Groups.GetGroupingItemCount) then - AItemIndex := Groups.GetGroupingItemIndex(ARowInfo.Level); - Result := GetValue(ARowInfo.RecordIndex, AItemIndex); -end; - -procedure TcxCustomDataController.MakeRecordVisible(ARecordIndex: Integer); -begin - GetRowIndexByRecordIndex(ARecordIndex, True); -end; - -function TcxCustomDataController.FocusSelectedRow(ASelectedIndex: Integer): Boolean; -var - ARowIndex: Integer; -begin - ARowIndex := GetSelectedRowIndex(ASelectedIndex); - FocusedRowIndex := ARowIndex; - Result := FocusedRowIndex = ARowIndex; -end; - -procedure TcxCustomDataController.RestoreDataSetPos; -begin - Provider.RestorePos; -end; - -procedure TcxCustomDataController.SaveDataSetPos; -begin - Provider.SavePos; -end; - -// Navigation - -procedure TcxCustomDataController.ChangeFocusedRecordIndex(ARecordIndex: Integer); -var - ARowIndex: Integer; -begin - ARowIndex := GetRowIndexByRecordIndex(ARecordIndex, True); - ChangeFocusedRowIndex(ARowIndex); -end; - -function TcxCustomDataController.ChangeFocusedRowIndex(ARowIndex: Integer): Boolean; -var - AIsFocusedRowIndexChanging: Boolean; -begin - Result := False; - if Provider.IsSyncMode and not Provider.FInInserting and - (DataControllerInfo.FocusedRowIndex <> ARowIndex) and not CheckMasterBrowseMode then - Exit; - if DataControllerInfo.FocusedRowIndex <> ARowIndex then - CheckDetailsBrowseMode; - - AIsFocusedRowIndexChanging := DataControllerInfo.FocusedRowIndex <> ARowIndex; - DataControllerInfo.FocusedRowIndex := ARowIndex; - // TODO: check - if AIsFocusedRowIndexChanging and Provider.IsSyncMode and SyncDetailsFocusWithMaster and - (FocusedRecordIndex <> -1) then - begin - FInFocusDetails := True; - try - FocusDetails(FocusedRecordIndex); - finally - FInFocusDetails := False; - end; - end; - Result := True; -end; - -procedure TcxCustomDataController.CheckFocusedRow; -begin - if (FocusedRowIndex = -1) and not NewItemRowFocused then - FocusedRowIndex := 0; -end; - -function TcxCustomDataController.GetFocusedRecordIndex: Integer; -begin - Result := DataControllerInfo.FocusedRecordIndex; -end; - -function TcxCustomDataController.GetFocusedRowIndex: Integer; -begin - Result := DataControllerInfo.FocusedRowIndex; -end; - -procedure TcxCustomDataController.GotoFirst; -begin - if IsGridMode then - Provider.First - else - ChangeFocusedRowIndex(0); -end; - -procedure TcxCustomDataController.GotoLast; -begin - if IsGridMode then - Provider.Last - else - ChangeFocusedRowIndex(GetRowCount - 1); -end; - -procedure TcxCustomDataController.GotoNext; -var - AFocusedRowIndex: Integer; -begin - if IsGridMode then - Provider.Next - else - begin - AFocusedRowIndex := GetFocusedRowIndex + 1; - ChangeFocusedRowIndex(AFocusedRowIndex); - end; -end; - -procedure TcxCustomDataController.GotoPrev; -var - AFocusedRowIndex: Integer; -begin - if IsGridMode then - Provider.Prev - else - begin - AFocusedRowIndex := GetFocusedRowIndex - 1; - if AFocusedRowIndex < 0 then AFocusedRowIndex := 0; - ChangeFocusedRowIndex(AFocusedRowIndex); - end; -end; - -function TcxCustomDataController.IsBOF: Boolean; -begin - if IsGridMode {and not Provider.IsInserting} then - Result := Provider.IsBOF - else - Result := (GetFocusedRowIndex = 0) or (GetRowCount = 0); -end; - -function TcxCustomDataController.IsEOF: Boolean; -var - ARowCount: Integer; -begin - if IsGridMode then - Result := Provider.IsEOF - else - begin - ARowCount := GetRowCount; - Result := (ARowCount = 0) or - ({(ARowCount > 1) and} (GetFocusedRowIndex = (ARowCount - 1))); - end; -end; - -function TcxCustomDataController.IsGridMode: Boolean; -begin - Result := Provider.IsGridMode; -end; - -procedure TcxCustomDataController.MoveBy(ADistance: Integer); -var - ARowIndex: Integer; -begin - if IsGridMode then - Provider.MoveBy(ADistance) - else - begin - ARowIndex := GetFocusedRowIndex + ADistance; - if ARowIndex < 0 then ARowIndex := 0; - ChangeFocusedRowIndex(ARowIndex); - end; -end; - -procedure TcxCustomDataController.Scroll(ADistance: Integer); -begin - if IsGridMode then - Provider.Scroll(ADistance); -end; - -procedure TcxCustomDataController.SetFocus; -begin -end; - -procedure TcxCustomDataController.ClearBookmark; -var - APrevBookmarkAvailable: Boolean; -begin - APrevBookmarkAvailable := IsBookmarkAvailable; - InternalClearBookmark; - if IsBookmarkAvailable <> APrevBookmarkAvailable then - Change([dccBookmark]); -end; - -procedure TcxCustomDataController.GotoBookmark; -begin - if IsBookmarkAvailable then - InternalGotoBookmark; -end; - -function TcxCustomDataController.IsBookmarkAvailable: Boolean; -begin - Result := FBookmarkRecordIndex <> -1; -end; - -function TcxCustomDataController.IsBookmarkRow(ARowIndex: Integer): Boolean; -begin - Result := IsBookmarkAvailable and - (GetRowInfo(ARowIndex).RecordIndex = FBookmarkRecordIndex); -end; - -procedure TcxCustomDataController.SaveBookmark; -begin - if InternalSaveBookmark then - Change([dccBookmark]); -end; - -// Filtering - -function TcxCustomDataController.GetFilterDataValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; -begin - Result := GetInternalValue(ARecordIndex, AField); -end; - -function TcxCustomDataController.GetFilterItemFieldCaption(AItem: TObject): string; -begin - Result := ''; -end; - -function TcxCustomDataController.GetFilterItemFieldName(AItem: TObject): string; -begin - Result := GetFilterItemFieldCaption(AItem); -end; - -// Search - -function TcxCustomDataController.ChangeIncrementalFilterText(const AText: string): Boolean; -begin - Result := Assigned(FIncrementalFilterField) and (FIncrementalFilterText <> AText); - if Result then - SetIncrementalFilter(FIncrementalFilterField.Index, AText); -end; - -function TcxCustomDataController.FindRecordIndexByText(AStartRecordIndex, AItemIndex: Integer; - const AText: string; APartialCompare, ACircular, AForward: Boolean): Integer; -var - AField: TcxCustomDataField; - ARecordCount: Integer; - - function Find(AStartIndex, AEndIndex: Integer): Integer; - var - I: Integer; - S: string; - ARecordIndex: Integer; - begin - Result := -1; - I := AStartIndex; - while (AForward and (I <= AEndIndex)) or - (not AForward and (I >= AEndIndex)) do - begin - ARecordIndex := FilteredRecordIndex[I]; - S := GetInternalDisplayText(ARecordIndex, AField); - if DataCompareText(S, AText, APartialCompare) then - begin - Result := ARecordIndex; - Break; - end; - if AForward then - Inc(I) - else - Dec(I); - end; - end; - -begin - CheckItemRange(AItemIndex); - AField := Fields[AItemIndex]; - ARecordCount := FilteredRecordCount; - Result := -1; - if (AStartRecordIndex < 0) or (AStartRecordIndex >= ARecordCount) then Exit; - if AForward then - begin - Result := Find(AStartRecordIndex, ARecordCount - 1); - if (Result = -1) and (AStartRecordIndex <> 0) and ACircular then - Result := Find(0, AStartRecordIndex - 1); - end - else - begin - Result := Find(AStartRecordIndex, 0); - if (Result = -1) and (AStartRecordIndex <> 0) and ACircular then - Result := Find(ARecordCount - 1, AStartRecordIndex + 1); - end; -end; - -function TcxCustomDataController.GetIncrementalFilterText: string; -begin - Result := FIncrementalFilterText; -end; - -function TcxCustomDataController.IsIncrementalFilter: Boolean; -begin - Result := Assigned(FIncrementalFilterField) and (FIncrementalFilterText <> ''); -end; - -procedure TcxCustomDataController.ResetIncrementalFilter; -var - AIsIncrementalFilter: Boolean; -begin - AIsIncrementalFilter := IsIncrementalFilter; - FIncrementalFilterField := nil; - FIncrementalFilterText := ''; - if AIsIncrementalFilter and not (csDestroying in FOwner.ComponentState) then - Refresh; -end; - -function TcxCustomDataController.SetIncrementalFilter(AItemIndex: Integer; - const AText: string): Integer; -begin - CheckItemRange(AItemIndex); - FIncrementalFilterField := Fields[AItemIndex]; - FIncrementalFilterText := AText; - Refresh; - if FilteredRecordCount > 0 then - Result := FilteredRecordIndex[0] - else - Result := -1; -end; - -// Sorting - -procedure TcxCustomDataController.ChangeItemSortingIndex(AItemIndex: Integer; ASortingIndex: Integer); -begin - CheckItemRange(AItemIndex); - if GetItemSortingIndex(AItemIndex) <> ASortingIndex then - begin - BeginUpdate; - try - if (Groups.ItemGroupIndex[AItemIndex] <> -1) and - (GetItemSortOrder(AItemIndex) = soAscending) and - (ASortingIndex = -1) then - ChangeSorting(AItemIndex, soNone) - else - begin - if GetItemSortingIndex(AItemIndex) = -1 then // grouped - ChangeSorting(AItemIndex, GetItemSortOrder(AItemIndex)); - if GetItemSortOrder(AItemIndex) <> soNone then - DataControllerInfo.ChangeSortIndex(Fields[AItemIndex], ASortingIndex); - end; - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomDataController.ChangeSorting(AItemIndex: Integer; ASortOrder: TcxDataSortOrder); -begin - CheckItemRange(AItemIndex); -// if GetItemSortOrder(AItemIndex) <> ASortOrder then - if DataControllerInfo.SortingFieldList.SortOrderByField(Fields[AItemIndex]) <> ASortOrder then - begin - BeforeSorting; - FSortingChanged := True; - DataControllerInfo.ChangeSorting(Fields[AItemIndex], ASortOrder); - end; -end; - -procedure TcxCustomDataController.ClearSorting(AKeepGroupedItems: Boolean); -begin - DataControllerInfo.ClearSorting(AKeepGroupedItems); -end; - -function TcxCustomDataController.GetItemSortByDisplayText(AItemIndex: Integer; - ASortByDisplayText: Boolean): Boolean; -begin - Result := False; -end; - -function TcxCustomDataController.GetItemSortOrder(AItemIndex: Integer): TcxDataSortOrder; -var - I: Integer; -begin - CheckItemRange(AItemIndex); - I := DataControllerInfo.SortingFieldList.SortIndexByField(Fields[AItemIndex]); - if I <> -1 then - Result := DataControllerInfo.SortingFieldList[I].SortOrder - else - begin - I := DataControllerInfo.GroupingFieldList.SortIndexByField(Fields[AItemIndex]); - if I <> -1 then - Result := DataControllerInfo.GroupingFieldList[I].SortOrder - else - Result := soNone; - end; -// Result := DataControllerInfo.TotalSortingFieldList.SortOrderByField(Fields[AItemIndex]); -end; - -function TcxCustomDataController.GetItemSortingIndex(AItemIndex: Integer): Integer; -begin - CheckItemRange(AItemIndex); - Result := DataControllerInfo.SortingFieldList.SortIndexByField(Fields[AItemIndex]); -end; - -function TcxCustomDataController.GetSortingItemCount: Integer; -begin - Result := DataControllerInfo.SortingFieldList.Count; -end; - -function TcxCustomDataController.GetSortingItemIndex(Index: Integer): Integer; -begin - Result := DataControllerInfo.SortingFieldList[Index].Field.Index; -end; - -// MultiSelect - -procedure TcxCustomDataController.ChangeRowSelection(ARowIndex: Integer; ASelection: Boolean); -begin - if not MultiSelect then Exit; - DataControllerInfo.ChangeRowSelection(ARowIndex, ASelection); -end; - -procedure TcxCustomDataController.CheckFocusedSelected; -var - ARowIndex: Integer; -begin - if not MultiSelect then Exit; - BeginUpdate; - try - ClearSelection; - ARowIndex := GetFocusedRowIndex; - if ARowIndex <> -1 then - ChangeRowSelection(ARowIndex, True); - finally - EndUpdate; - end; -end; - -procedure TcxCustomDataController.ClearSelection; -begin - DataControllerInfo.ClearSelection; -end; - -procedure TcxCustomDataController.ClearSelectionAnchor; -begin - DataControllerInfo.ClearSelectionAnchor; -end; - -function TcxCustomDataController.GetRowId(ARowIndex: Integer): Variant; -begin - Result := ARowIndex; -end; - -function TcxCustomDataController.GetSelectedCount: Integer; -begin - if IsFocusedSelectedMode then - begin - if FFocusedSelected and (GetFocusedRowIndex <> -1) then - Result := 1 - else - Result := 0; - end - else - Result := DataControllerInfo.GetSelectedCount; -end; - -function TcxCustomDataController.GetSelectedRowIndex(Index: Integer): Integer; -begin - if IsFocusedSelectedMode then - begin - if FFocusedSelected and (Index = 0) then - Result := GetFocusedRowIndex - else - Result := -1; - end - else - Result := DataControllerInfo.GetSelectedRowIndex(Index); -end; - -function TcxCustomDataController.GetSelectionAnchorRowIndex: Integer; -begin - Result := DataControllerInfo.Selection.AnchorRowIndex; -end; - -function TcxCustomDataController.IsRowSelected(ARowIndex: Integer): Boolean; -begin - if IsFocusedSelectedMode then - Result := FFocusedSelected and (GetFocusedRowIndex = ARowIndex) - else - Result := DataControllerInfo.IsRowSelected(ARowIndex); -end; - -function TcxCustomDataController.IsSelectionAnchorExist: Boolean; -begin - Result := GetSelectionAnchorRowIndex <> -1; -end; - -procedure TcxCustomDataController.SelectAll; -var - ARowCount: Integer; -begin - ARowCount := GetRowCount; - if ARowCount > 0 then - SelectRows(0, ARowCount - 1); -end; - -procedure TcxCustomDataController.SelectRows(AStartRowIndex, AEndRowIndex: Integer); -var - I: Integer; -begin - if not MultiSelect then Exit; - if AStartRowIndex > AEndRowIndex then - begin - I := AEndRowIndex; - AEndRowIndex := AStartRowIndex; - AStartRowIndex := I; - end; - BeginUpdate; - try - for I := AStartRowIndex to AEndRowIndex do - ChangeRowSelection(I, True); - finally - EndUpdate; - end; -end; - -procedure TcxCustomDataController.SelectFromAnchor(ARowIndex: Integer; AKeepSelection: Boolean); -var - ASelectionAnchorRowIndex: Integer; -begin - ASelectionAnchorRowIndex := GetSelectionAnchorRowIndex; - if ASelectionAnchorRowIndex <> -1 then - begin - BeginUpdate; - try - if not AKeepSelection then - ClearSelection; - SelectRows(ASelectionAnchorRowIndex, ARowIndex); - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomDataController.SetSelectionAnchor(ARowIndex: Integer); -begin - // TODO: check? - DataControllerInfo.CheckRowIndex(ARowIndex); - DataControllerInfo.Selection.FAnchorRowIndex := ARowIndex; -end; - -procedure TcxCustomDataController.SyncSelected(ASelected: Boolean); -var - AFocusedRowIndex: Integer; -begin - if not IsFocusedSelectedMode then Exit; - if FFocusedSelected <> ASelected then - begin - FFocusedSelected := ASelected; - AFocusedRowIndex := GetFocusedRowIndex; - if AFocusedRowIndex <> -1 then - begin - FPrevSelectionChangedInfo.SelectedCount := 1; - FPrevSelectionChangedInfo.RowIndex := AFocusedRowIndex; - Change([dccSelection]); - end; - end; -end; - -procedure TcxCustomDataController.SyncSelectionFocusedRecord; -var - AFocusedRowIndex: Integer; -begin - AFocusedRowIndex := GetFocusedRowIndex; - if AFocusedRowIndex = -1 then - ClearSelection - else - begin - SetSelectionAnchor(AFocusedRowIndex); - SelectFromAnchor(AFocusedRowIndex, False); - end; -end; - -// IUnknown - -function TcxCustomDataController.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := S_OK - else - Result := E_NOINTERFACE; -end; - -function TcxCustomDataController._AddRef: Integer; -begin - Result := -1; // -1 indicates no reference counting is taking Position -end; - -function TcxCustomDataController._Release: Integer; -begin - Result := -1; // -1 indicates no reference counting is taking Position -end; - -// Based - -function TcxCustomDataController.AddInternalField: TcxCustomDataField; -begin - Result := GetFieldClass.Create(Fields); - Result.IsInternal := True; - Fields.Add(Result); -end; - -function TcxCustomDataController.AddField: TcxCustomDataField; -begin - Result := GetFieldClass.Create(Fields); - Fields.Add(Result); -end; - -function TcxCustomDataController.AppendInSmartLoad: Integer; -var - AValueDefReader: TcxValueDefReader; -begin - FInSmartLoad := True; - try - if IsProviderMode then - Result := LoadRecord(CustomDataSource.AppendRecord) - else - begin - AValueDefReader := Provider.GetValueDefReaderClass.Create; - try - Result := LoadRecord(AValueDefReader); - DataChanged(dcNew, -1, -1); - finally - AValueDefReader.Free; - end; - end; - finally - FInSmartLoad := False; - end; -end; - -procedure TcxCustomDataController.BeforeSorting; -begin - if IsEditing then - Post; // ! -end; - -function TcxCustomDataController.CalcEditingRecordIndex: Integer; -begin - if NewItemRowFocused then - Result := NewItemRecordIndex - else - if GetFocusedRowIndex <> -1 then - Result := GetRowInfo(GetFocusedRowIndex).RecordIndex - else - Result := cxNullEditingRecordIndex; -end; - -function TcxCustomDataController.CanChangeDetailExpanding(ARecordIndex: Integer; - AExpanded: Boolean): Boolean; -begin - Result := True; - if AExpanded then - DoDetailExpanding(ARecordIndex, Result) - else - DoDetailCollapsing(ARecordIndex, Result); -end; - -function TcxCustomDataController.CanFocusRecord(ARecordIndex: Integer): Boolean; -begin - if not Provider.IsDataSource and (Provider.EditingRecordIndex <> ARecordIndex) then - Post; - Result := True; -end; - -function TcxCustomDataController.CanSelectRow(ARowIndex: Integer): Boolean; -begin - Result := True; // override in grid for Event -end; - -procedure TcxCustomDataController.CheckChanges; -begin - if LockCount = 0 then - begin - Unlocked; - if FChanges <> [] then - begin - if FStructureChanged then - begin - FStructureChanged := False; - LayoutChanged([lcStructure]); - end; - Update; - end; - end; -end; - -procedure TcxCustomDataController.Change(AChanges: TcxDataControllerChanges); -begin - FChanges := FChanges + AChanges; - CheckChanges; -end; - -procedure TcxCustomDataController.CheckBookmarkValid(ADeletedRecordIndex: Integer); -begin - if not IsBookmarkAvailable then Exit; - if InternalCheckBookmark(ADeletedRecordIndex) then - begin - InternalClearBookmark; - Change([dccBookmark]); - end; -end; - -procedure TcxCustomDataController.CheckDataSetCurrent; -begin -end; - -procedure TcxCustomDataController.CheckEditingRecordIndex(ARecordIndex: Integer); -begin - if ((ARecordIndex >= 0) and (ARecordIndex <= Provider.EditingRecordIndex)) or - (RecordCount <= Provider.EditingRecordIndex) then - Provider.ResetEditing; -end; - -procedure TcxCustomDataController.CheckInternalRecordRange(ARecordIndex: Integer); -begin - if FNewItemRecordIndex = ARecordIndex then - FNewItemRecordIndex := 0; -end; - -procedure TcxCustomDataController.CheckItemRange(AItemIndex: Integer); -begin - if not ((0 <= AItemIndex) and (AItemIndex < ItemCount)) then - InvalidOperation(cxSDataItemIndexError); -end; - -function TcxCustomDataController.CheckDetailsBrowseMode: Boolean; -var - I, J: Integer; - ADataController: TcxCustomDataController; -begin - for I := 0 to RecordCount - 1 do - for J := 0 to Relations.Count - 1 do - begin - if IsDetailDataControllerExist(I, J) then - begin - ADataController := GetDetailDataController(I, J); - ADataController.CheckBrowseMode; - end; - end; - Result := True; -end; - -function TcxCustomDataController.CheckMasterBrowseMode: Boolean; -begin - Result := True; -end; - -procedure TcxCustomDataController.CheckMode; -var - APrevGridMode: Boolean; -begin - APrevGridMode := IsGridMode; - Provider.FLoadAllNeeded := Groups.GroupingItemCount > 0; - if APrevGridMode <> Provider.IsGridMode then - RestructData; -end; - -procedure TcxCustomDataController.CheckNearestFocusRow; -var - ARecordIndex: Integer; -begin - if FNearestRecordIndex <> -1 then // !!! - begin - if FNearestRecordIndex < RecordCount then - ChangeFocusedRecordIndex(FNearestRecordIndex); - Exit; - end; - - if (LockCount = 0) and (GetFocusedRecordIndex = -1) then - begin - ARecordIndex := GetLastRecordIndex; - ChangeFocusedRecordIndex(ARecordIndex); - end; -end; - -procedure TcxCustomDataController.CheckRange(ARecordIndex, AItemIndex: Integer); -begin - CheckRecordRange(ARecordIndex); - CheckItemRange(AItemIndex); -end; - -procedure TcxCustomDataController.CheckRecordRange(ARecordIndex: Integer); -begin - NewItemRecordIndex; - if not (((0 <= ARecordIndex) and (ARecordIndex < RecordCount)) or - (ARecordIndex = FNewItemRecordIndex) or (ARecordIndex = Provider.FSavedRecordIndex)) then - InvalidOperation(cxSDataRecordIndexError); -end; - -procedure TcxCustomDataController.CheckSelectedCount(ADeletedRecordIndex: Integer); -begin - DataControllerInfo.TruncateSelection; - CheckBookmarkValid(ADeletedRecordIndex); -end; - -procedure TcxCustomDataController.ClearDataChangedListeners; -var - I: Integer; -begin - // TODO: TcxEventList? - for I := 0 to FDataChangedListeners.Count - 1 do - TNotifyEventItem(FDataChangedListeners[I]).Free; - FDataChangedListeners.Clear; -end; - -procedure TcxCustomDataController.ClearDetailsMasterRelation(ARelation: TcxCustomDataRelation); -var - ARelationIndex, I: Integer; - ADetailLinkObject: TObject; -begin - // Relation Destroying - ARelationIndex := ARelation.Index; - for I := 0 to DataStorage.RecordCount - 1 do - if IsDetailDataControllerExist(I, ARelationIndex) then - begin - ADetailLinkObject := GetDetailLinkObject(I, ARelationIndex); - if ADetailLinkObject <> nil then - GetDetailDataControllerByLinkObject(ADetailLinkObject).FMasterRelation := nil; - end; -end; - -procedure TcxCustomDataController.ProviderValueDefSetProc(AValueDef: TcxValueDef; - AFromRecordIndex, AToRecordIndex: Integer; AValueDefReader: TcxValueDefReader); -var - AField: TcxCustomDataField; -begin - AField := TcxCustomDataField(AValueDef.LinkObject); - if AField.IsValueDefInternal then Exit; - Provider.SetValue(AToRecordIndex, AField, DataStorage.GetValue(AFromRecordIndex, AValueDef)); - if AValueDef.TextStored then - Provider.SetDisplayText(AToRecordIndex, AField, DataStorage.GetDisplayText(AFromRecordIndex, AValueDef)); -end; - -procedure TcxCustomDataController.CopyRecord(AFromRecordIndex, AToRecordIndex: Integer); -var - AValueDefReader: TcxValueDefRecordReader; -begin - AValueDefReader := TcxValueDefRecordReader.Create(Self, AFromRecordIndex); - try - if IsProviderMode and (AToRecordIndex >= 0) then - DataStorage.ReadRecordFrom(AFromRecordIndex, AToRecordIndex, AValueDefReader, ProviderValueDefSetProc) - else - DataStorage.ReadRecord(AToRecordIndex, AValueDefReader); - finally - AValueDefReader.Free; - end; - if AToRecordIndex >= 0 then // not internal - DataChanged(dcRecord, -1, -1); -end; - -procedure TcxCustomDataController.CorrectAfterInsert(ARecordIndex: Integer); -var - I, J: Integer; -begin - for I := ARecordIndex + 1 to DataStorage.RecordCount - 1 do - for J := 0 to Relations.Count - 1 do - if IsDetailDataControllerExist(I, J) then - Inc(GetDetailDataController(I, J).FMasterRecordIndex); -end; - -procedure TcxCustomDataController.CorrectAfterDelete(ARecordIndex: Integer); -var - I, J: Integer; -begin - if ARecordIndex < 0 then Exit; - CheckEditingRecordIndex(ARecordIndex); - if Relations.Count > 0 then - begin - for I := ARecordIndex {+ 1} to DataStorage.RecordCount - 1 do - for J := 0 to Relations.Count - 1 do - if IsDetailDataControllerExist(I, J) then - Dec(GetDetailDataController(I, J).FMasterRecordIndex); - end; -end; - -procedure TcxCustomDataController.CorrectPrevSelectionChangedInfo; -begin - if FPrevSelectionChangedInfo.SelectedCount = 1 then - begin - FPrevSelectionChangedInfo.SelectedCount := GetSelectedCount; - if FPrevSelectionChangedInfo.SelectedCount = 1 then - FPrevSelectionChangedInfo.RowIndex := GetSelectedRowIndex(0) - else - FPrevSelectionChangedInfo.RowIndex := -1; - // TODO: flag reset? - end; -end; - -procedure TcxCustomDataController.DeleteInSmartLoad(ARecordIndex: Integer); -begin - if IsProviderMode then - Provider.DeleteRecord(ARecordIndex); - DataStorage.DeleteRecord(ARecordIndex); -end; - -procedure TcxCustomDataController.Unlocked; -begin -end; - -procedure TcxCustomDataController.DoAfterCancel; -begin - if Assigned(FOnAfterCancel) then - FOnAfterCancel(Self); -end; - -procedure TcxCustomDataController.DoAfterDelete; -begin - if Assigned(FOnAfterDelete) then - FOnAfterDelete(Self); -end; - -procedure TcxCustomDataController.DoAfterInsert; -begin - if Assigned(FOnAfterInsert) then - FOnAfterInsert(Self); -end; - -procedure TcxCustomDataController.DoAfterPost; -begin - if Assigned(FOnAfterPost) then - FOnAfterPost(Self); -end; - -procedure TcxCustomDataController.DoBeforeCancel; -begin - if Assigned(FOnBeforeCancel) then - FOnBeforeCancel(Self); -end; - -procedure TcxCustomDataController.DoBeforeDelete(ARecordIndex: Integer); -begin - if Assigned(FOnBeforeDelete) then - FOnBeforeDelete(Self, ARecordIndex); -end; - -procedure TcxCustomDataController.DoBeforeInsert; -begin - if Assigned(FOnBeforeInsert) then - FOnBeforeInsert(Self); -end; - -procedure TcxCustomDataController.DoBeforePost; -begin - if Assigned(FOnBeforePost) then - FOnBeforePost(Self); -end; - -function TcxCustomDataController.DoFilterRecord(ARecordIndex: Integer): Boolean; -begin - Result := True; - if Assigned(FOnFilterRecord) then - FOnFilterRecord(Self, ARecordIndex, Result); -end; - -function TcxCustomDataController.IsFilterRecord: Boolean; -begin - Result := Assigned(FOnFilterRecord); -end; - -procedure TcxCustomDataController.DoNewRecord(ARecordIndex: Integer); -begin - if Assigned(FOnNewRecord) then - FOnNewRecord(Self, ARecordIndex); -end; - -procedure TcxCustomDataController.DoDataChanged; -begin - if not (csDestroying in FOwner.ComponentState) and IsDataChangedListenersExist then - begin - if IsLoading then - FDataChangedFlag := True - else - begin - FDataChangedFlag := False; - NotifyDataChangedListeners; - end; - end; -end; - -procedure TcxCustomDataController.DoDetailExpanding(ARecordIndex: Integer; var AAllow: Boolean); -begin - if Assigned(FOnDetailExpanding) then - FOnDetailExpanding(Self, ARecordIndex, AAllow); -end; - -procedure TcxCustomDataController.DoDetailExpanded(ARecordIndex: Integer); -begin - if Assigned(FOnDetailExpanded) then - FOnDetailExpanded(Self, ARecordIndex); -end; - -procedure TcxCustomDataController.DoDetailCollapsing(ARecordIndex: Integer; var AAllow: Boolean); -begin - if Assigned(FOnDetailCollapsing) then - FOnDetailCollapsing(Self, ARecordIndex, AAllow); -end; - -procedure TcxCustomDataController.DoDetailCollapsed(ARecordIndex: Integer); -begin - if Assigned(FOnDetailCollapsed) then - FOnDetailCollapsed(Self, ARecordIndex); -end; - -function TcxCustomDataController.DoIncrementalFilterRecord(ARecordIndex: Integer): Boolean; -var - S: string; -begin - S := GetInternalDisplayText(ARecordIndex, FIncrementalFilterField); - Result := DataCompareText(S, FIncrementalFilterText, True); -end; - -procedure TcxCustomDataController.DoReadRecord(ARecordIndex: Integer); -begin - Provider.CorrectRecordIndex(ARecordIndex); -end; - -function TcxCustomDataController.DoSearchInGridMode(const ASubText: string; - AForward, ANext: Boolean): Boolean; -begin - Result := False; -end; - -function TcxCustomDataController.FindItemByInternalID(AID: Integer): TObject; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - begin - Result := GetItem(I); - if GetItemID(Result) = AID then - Exit; - end; - Result := nil; -end; - -function TcxCustomDataController.FindItemByName(const AName: string): TObject; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - begin - Result := GetItem(I); - if SameText(GetItemName(Result), AName) then - Exit; - end; - Result := nil; -end; - -function TcxCustomDataController.FindProperItemLink(AItemLink: TObject): TObject; -begin - Result := FindItemByInternalID(GetItemID(AItemLink)); -end; - -function TcxCustomDataController.GetActiveRecordIndex: Integer; -begin - Result := GetFocusedRecordIndex; -end; - -function TcxCustomDataController.GetDataProviderClass: TcxCustomDataProviderClass; -begin - Result := TcxCustomDataProvider; -end; - -function TcxCustomDataController.GetDataSelectionClass: TcxDataSelectionClass; -begin - Result := TcxDataSelection; -end; - -function TcxCustomDataController.GetEditOperations: TcxDataControllerEditOperations; -begin - Result := []; - if Provider.CanAppend then - Result := Result + [dceoAppend]; - if Provider.CanDelete then - Result := Result + [dceoDelete]; - if Provider.CanModify then - Result := Result + [dceoEdit]; - if Provider.CanInsert then - Result := Result + [dceoInsert]; - if not Provider.IsDataSource or Provider.IsSyncMode then - Result := Result + [dceoShowEdit]; -end; - -function TcxCustomDataController.GetEditState: TcxDataControllerEditState; -begin - Result := []; - if Provider.IsInserting then - Result := Result + [dceInsert] - else - if Provider.IsEditing then - Result := Result + [dceEdit]; - if (Result <> []) and Provider.IsChanging then - Result := Result + [dceChanging]; - if (Result <> []) and Provider.IsModified then - Result := Result + [dceModified]; -end; - -function TcxCustomDataController.GetDefaultActiveRelationIndex: Integer; -begin - Result := 0; -end; - -function TcxCustomDataController.GetFieldClass: TcxCustomDataFieldClass; -begin - Result := TcxCustomDataField; -end; - -function TcxCustomDataController.GetFilterCriteriaClass: TcxDataFilterCriteriaClass; -begin - Result := TcxDataFilterCriteria; -end; - -function TcxCustomDataController.GetInternalDisplayText(ARecordIndex: Integer; - AField: TcxCustomDataField): string; -begin - if (ARecordIndex >= 0) and IsProviderMode and IsDataField(AField) then - Result := Provider.GetDisplayText(ARecordIndex, AField) - else - Result := GetStoredDisplayText(ARecordIndex, AField); -end; - -function TcxCustomDataController.GetItemID(AItem: TObject): Integer; -begin - Result := -1; -end; - -function TcxCustomDataController.GetItemName(AItem: TObject): string; -begin - if AItem is TComponent then - Result := TComponent(AItem).Name - else - Result := ''; -end; - -function TcxCustomDataController.GetInternalRecordId(ARecordIndex: Integer; - AFieldList: TList): Variant; -var - I: Integer; -begin - if AFieldList.Count > 0 then - begin - if AFieldList.Count > 1 then - begin - Result := VarArrayCreate([0, AFieldList.Count - 1], varVariant); - for I := 0 to AFieldList.Count - 1 do - Result[I] := GetInternalValue(ARecordIndex, TcxCustomDataField(AFieldList[I])); - end - else - Result := GetInternalValue(ARecordIndex, TcxCustomDataField(AFieldList[0])); - end - else - begin - if IsProviderMode then - Result := Provider.GetRecordId(ARecordIndex) - else - Result := Null; - end; -end; - -function TcxCustomDataController.GetInternalValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; -begin - if (ARecordIndex >= 0) and IsProviderMode and IsDataField(AField) then - Result := Provider.GetValue(ARecordIndex, AField) - else - Result := GetStoredValue(ARecordIndex, AField); -end; - -procedure TcxCustomDataController.GetKeyFields(AList: TList); -begin -end; - -function TcxCustomDataController.GetLastRecordIndex: Integer; -var - ARowIndex: Integer; -begin - Result := -1; - ARowIndex := GetRowCount - 1; - if ARowIndex <> -1 then - Result := GetRowInfo(ARowIndex).RecordIndex; -end; - -function TcxCustomDataController.GetRecordIndex: Integer; -begin - if Provider.IsDataSource and Provider.IsSyncMode then - Result := Provider.GetRecordIndex - else - Result := DataControllerInfo.FocusedRecordIndex; -end; - -function TcxCustomDataController.GetRelationClass: TcxCustomDataRelationClass; -begin - Result := TcxCustomDataRelation; -end; - -function TcxCustomDataController.GetSearchClass: TcxDataControllerSearchClass; -begin - Result := TcxDataControllerSearch; -end; - -function TcxCustomDataController.GetStoredDisplayText(ARecordIndex: Integer; - AField: TcxCustomDataField): string; -begin -// if not AField.IsInternal and IsGridMode then - if IsDataField(AField) and IsGridMode then - Result := Provider.GetExternalDataDisplayText(ARecordIndex, AField) - else - if AField.ValueDef <> nil then - Result := DataStorage.GetDisplayText(ARecordIndex, AField.ValueDef) - else - Result := ''; -end; - -function TcxCustomDataController.GetStoredValue(ARecordIndex: Integer; - AField: TcxCustomDataField): Variant; -begin -// if not AField.IsInternal and IsGridMode then - if IsDataField(AField) and IsGridMode then - Result := Provider.GetExternalDataValue(ARecordIndex, AField) - else - if AField.ValueDef <> nil then - Result := DataStorage.GetValue(ARecordIndex, AField.ValueDef) - else - Result := Null; -end; - -function TcxCustomDataController.GetSummaryClass: TcxDataSummaryClass; -begin - Result := TcxDataSummary; -end; - -function TcxCustomDataController.GetSummaryItemClass: TcxDataSummaryItemClass; -begin - Result := TcxDataSummaryItem; -end; - -function TcxCustomDataController.GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; -begin - Result := TcxDataSummaryGroupItemLink; -end; - -function TcxCustomDataController.InternalCheckBookmark(ADeletedRecordIndex: Integer): Boolean; -begin - if (ADeletedRecordIndex <> -1) and (FBookmarkRecordIndex = ADeletedRecordIndex) then - Result := True - else - Result := GetFilteredIndexByRecordIndex(FBookmarkRecordIndex) = -1; -end; - -procedure TcxCustomDataController.InternalClearBookmark; -begin - FBookmarkRecordIndex := -1; -end; - -procedure TcxCustomDataController.InternalGotoBookmark; -begin - FocusedRecordIndex := FBookmarkRecordIndex; -end; - -function TcxCustomDataController.InternalSaveBookmark: Boolean; -var - ARecordIndex: Integer; -begin - Result := False; - ARecordIndex := FocusedRecordIndex; - if FBookmarkRecordIndex <> ARecordIndex then - begin - FBookmarkRecordIndex := ARecordIndex; - Result := True; - end; -end; - -function TcxCustomDataController.IsDataBound: Boolean; -begin - Result := IsProviderMode or Provider.IsDataSource; -end; - -function TcxCustomDataController.IsDataChangedListenersExist: Boolean; -begin - Result := Assigned(FOnDataChanged) or Assigned(FOnRecordChanged) or - (FDataChangedListeners.Count > 0); -end; - -function TcxCustomDataController.IsDataField(AField: TcxCustomDataField): Boolean; -begin - Result := not AField.IsInternal or - (Assigned(AField.FReferenceField) and not AField.FReferenceField.IsInternal); -end; - -function TcxCustomDataController.IsDestroying: Boolean; -begin - Result := csDestroying in FOwner.ComponentState; -end; - -function TcxCustomDataController.IsFocusedSelectedMode: Boolean; -begin - Result := not MultiSelect{ and FFocusedSelected}; // TODO:? -end; - -function TcxCustomDataController.IsImmediatePost: Boolean; -begin - Result := (dcoImmediatePost in Options) or Provider.IsUnboundColumnMode; -end; - -function TcxCustomDataController.IsKeyNavigation: Boolean; -begin - if IsProviderMode then - Result := Provider.IsRecordIdSupported - else - Result := False; -end; - -function TcxCustomDataController.IsLoading: Boolean; -begin - Result := csLoading in FOwner.ComponentState; -end; - -function TcxCustomDataController.IsProviderDataSource: Boolean; -begin - Result := IsProviderMode or FStructureRecreated; -end; - -function TcxCustomDataController.IsProviderMode: Boolean; -begin - Result := Provider.CustomDataSource <> nil; -end; - -function TcxCustomDataController.IsRecordID: Boolean; -begin - Result := IsUnboundMode and UseRecordID; -end; - -function TcxCustomDataController.IsSmartLoad: Boolean; -begin - Result := False; -end; - -function TcxCustomDataController.IsSmartRefresh: Boolean; -begin - Result := False; -end; - -function TcxCustomDataController.IsUnboundMode: Boolean; -begin - Result := Provider.IsCustomDataSourceSupported and not IsProviderMode; // ? -end; - -procedure TcxCustomDataController.LoadStorage; - - procedure LoadData; - var - AValueDefReader: TcxValueDefReader; - ARecordIndex: Integer; - begin - with Provider do - begin - if IsGridMode then - begin - DataStorage.BeginLoad; - try - LoadDataBuffer; - finally - DataStorage.EndLoad; - end; - end - else - begin - Freeze; - try - SavePos; - First; // possible to recreate Fields in dbX and Query Reopen - if RecreatedFieldsAfterFirst then - UpdateFields; - DataStorage.BeginLoad; - try - if IsProviderMode then - LoadRecordHandles - else - begin - AValueDefReader := GetValueDefReaderClass.Create; - try - while not IsEOF do - begin - ARecordIndex := DataStorage.AppendRecord; - DataStorage.ReadRecord(ARecordIndex, AValueDefReader); - Self.DoReadRecord(ARecordIndex); - Next; - end; - finally - AValueDefReader.Free; - end; - end; - finally - DataStorage.EndLoad; - end; - FLoadedStorage := Provider.ActiveChanging; - RestorePos; - finally - Unfreeze; - end; - end; - end; - end; - - procedure CheckAfterLoad; - begin - FInLoadStorage := True; - try - CheckSelectedCount(-1); - finally - FInLoadStorage := False; - end; - UpdateFocused; - end; - -begin - if not (IsSmartLoad and FInSmartLoad) then - DataStorage.Clear(Provider.FDataChangedLocked); - if Provider.IsActive and not IsSmartLoad then - begin - if DetailMode <> dcdmPattern then - LoadData; - CheckAfterLoad; - end; - Change([dccData]); - SyncMasterPos; -end; - -function TcxCustomDataController.IsNewItemRecordIndex(ARecordIndex: Integer): Boolean; -begin - Result := UseNewItemRowForEditing and (ARecordIndex = NewItemRecordIndex); -end; - -function TcxCustomDataController.LockOnAfterSummary: Boolean; -begin - Result := IsGridMode and FStructureChanged; -end; - -procedure TcxCustomDataController.NotifyDataChangedListeners; -var - I: Integer; - E: TNotifyEventItem; -begin - if not IsPattern then - begin - if (FDataChangeInfo.Kind in [dcField, dcRecord]) and - ((FDataChangeInfo.RecordIndex <> -1) or IsNewItemRecordIndex(FDataChangeInfo.RecordIndex)) then - begin - if Assigned(FOnRecordChanged) then - FOnRecordChanged(Self, FDataChangeInfo.RecordIndex, FDataChangeInfo.ItemIndex); - end; - if Assigned(FOnDataChanged) then - FOnDataChanged(Self); - end; - - if IsGridMode and (Provider.LocateCount <> 0) then Exit; // TODO: !!! - for I := 0 to FDataChangedListeners.Count - 1 do - begin - E := TNotifyEventItem(FDataChangedListeners[I]); - E.Event(Self); - end; -end; - -procedure TcxCustomDataController.NotifyDataControllers; -begin -end; - -procedure TcxCustomDataController.PrepareField(AField: TcxCustomDataField); -begin -end; - -procedure TcxCustomDataController.RemoveNotification(AComponent: TComponent); -begin - Fields.RemoveNotification(AComponent); -end; - -procedure TcxCustomDataController.ResetMasterHasChildrenFlag; -var - AMasterDataController: TcxCustomDataController; -begin - if IsDataBound then - begin - AMasterDataController := GetMasterDataController; - if (AMasterDataController <> nil) and (EditState * [dceInsert, dceEdit] = []) then - AMasterDataController.ResetHasChildrenFlag; - end; -end; - -procedure TcxCustomDataController.ResetNewItemRowFocused; -begin - if FNewItemRowFocused then - DataControllerInfo.FPrevFocusingInfo.FChangedFlag := True; - FNewItemRowFocused := False; -end; - -procedure TcxCustomDataController.RestructData; -begin - //BeginUpdate; - BeginFullUpdate; - try - Provider.ResetEditing; -// if not IsUnboundMode then - if not IsUnboundMode or (FInSetCustomDataSource and (CustomDataSource = nil)) then - DataStorage.Clear(False); - InternalClearBookmark; - CheckSelectedCount(-1); // <- Clear Selection - DataStorage.StoredValuesOnly := IsProviderMode or IsGridMode; - UpdateUseRecordIDState; - if CustomDataSource <> nil then - begin - if FRecordHandlesField = nil then - begin - FRecordHandlesField := AddInternalField; - FRecordHandlesField.ValueTypeClass := TcxIntegerValueType; - end; - end - else - begin - FRecordHandlesField.Free; // FRecordHandlesField <- nil (in RemoveDataField method) - end; - FStructureRecreated := True; - LayoutChanged([lcData]); - finally - EndFullUpdate; - //EndUpdate; - end; -end; - -procedure TcxCustomDataController.SetStoredValue(ARecordIndex: Integer; - AField: TcxCustomDataField; const Value: Variant); -begin - if AField.ValueDef <> nil then - DataStorage.SetValue(ARecordIndex, AField.ValueDef, Value); -end; - -function TcxCustomDataController.SyncDetailsFocusWithMaster: Boolean; -begin - Result := False; -end; - -procedure TcxCustomDataController.SyncMasterPos; -begin - if DetailMode = dcdmClone then - Change([dccSyncMasterPos]); - NotifyDataControllers; -end; - -procedure TcxCustomDataController.UpdateFields; -var - I: Integer; - AField: TcxCustomDataField; - APreparedAll: Boolean; -begin - for I := 0 to Fields.Count - 1 do - Fields[I].FPrepared := False; - repeat - Fields.FFieldDestroyed := False; - for I := 0 to Fields.Count - 1 do - begin - AField := Fields[I]; - if AField.FPrepared then Continue; - PrepareField(AField); - AField.FPrepared := True; - if Fields.FFieldDestroyed then Break; - end; - // check Finish - APreparedAll := True; - for I := 0 to Fields.Count - 1 do - if not Fields[I].FPrepared then - begin - APreparedAll := False; - Break; - end; - until APreparedAll; -// for I := 0 to Fields.Count - 1 do -// PrepareField(Fields[I]); -end; - -procedure TcxCustomDataController.UpdateFocused; -begin - if (Provider.LocateCount = 0) or not DataControllerInfo.FFocusingFlag then - DataControllerInfo.RefreshFocused; -end; - -procedure TcxCustomDataController.UpdateRelations(ARelation: TcxCustomDataRelation); -var - ARootDataController: TcxCustomDataController; -begin - if FDestroying then Exit; - if DetailMode = dcdmPattern then - begin - ARootDataController := GetRootDataController; - if FMasterRelation <> nil then - ARootDataController.ResetRelationByItem(FMasterRelation.Item); - end - else - Change([dccData{dccDetail}]); -end; - -procedure TcxCustomDataController.UpdateUseRecordIDState; -begin - DataStorage.UseRecordID := IsRecordID; -end; - -procedure TcxCustomDataController.UpdateStorage(AUpdateFields: Boolean); -begin - BeginFullUpdate; // !!! see also 22299 - try - if IsProviderDataSource then - begin - if AUpdateFields or Provider.IsActiveDataSet then - begin - if LockUpdateFieldsCount <> 0 then - FUpdateFieldsFlag := True - else - begin - if Provider.IsGridModeUpdating and - ((EditState * [dceInsert] <> []) or // appending record - FFields.FFieldDestroyed) then // Filter.OnBeforeChange - // do nothing - else - UpdateFields; - end; - end; - if not FStructureChanged then - LoadStorage; - end; - DataControllerInfo.Refresh; - FUpdateItems := False; - FStructureRecreated := False; - finally - EndFullUpdate; - end; -end; - -function TcxCustomDataController.UseRecordID: Boolean; -begin - Result := False; -end; - -class function TcxCustomDataController.AddListenerLink(ADataController: TcxCustomDataController): TcxDataListenerLink; -begin - Result := TcxDataListenerLink.Create; - Result.Ref := ADataController; - ADataController.FListenerLinks.Add(Result); -end; - -class procedure TcxCustomDataController.RemoveListenerLink(ALink: TcxDataListenerLink); -begin - if ALink.Ref <> nil then - ALink.Ref.FListenerLinks.Remove(ALink); - ALink.Free; -end; - -procedure TcxCustomDataController.DataStorageClearInternalRecords(Sender: TObject); -begin - Provider.FSavedRecordIndex := 0; - FNewItemRecordIndex := 0; -end; - -procedure TcxCustomDataController.RemoveField(ADataField: TcxCustomDataField); -begin - if FRecordHandlesField = ADataField then - FRecordHandlesField := nil; - if Assigned(FRelations) then - Relations.RemoveDataField(ADataField); - if Assigned(FFilters) then - FFilters.RemoveItemByField(ADataField); - if Assigned(FFilter) then - Filter.RemoveItemByField(ADataField); - if Assigned(FSummary) then - Summary.RemoveItemByField(ADataField); - if FIncrementalFilterField = ADataField then - ResetIncrementalFilter; - if FSortingBySummaryDataItemField = ADataField then - SortingBySummaryDataItemIndex := -1; - if FIncrementalSearchField = ADataField then - begin - Search.Cancel; - FIncrementalSearchField := nil; - end; -end; - -procedure TcxCustomDataController.FilterChanged; -begin -// !!! filter custom! - FCheckFocusingAfterFilterNeeded := True; - Cancel; - Refresh; - CheckBookmarkValid(-1); - CorrectPrevSelectionChangedInfo; -end; - -procedure TcxCustomDataController.SummaryChanged(ARedrawOnly: Boolean); -begin - DataControllerInfo.RefreshSummary(ARedrawOnly); -end; - -procedure TcxCustomDataController.ActiveChanged(AActive: Boolean); -begin - FActive := AActive; - UpdateItems(Provider.IsActive); - ResetMasterHasChildrenFlag; -end; - -procedure TcxCustomDataController.DataChanged(ADataChange: TcxDataChange; - AItemIndex, ARecordIndex: Integer); -begin - if ((FDataChangeInfo.RecordIndex <> -1) or IsNewItemRecordIndex(FDataChangeInfo.RecordIndex)) and - (FDataChangeInfo.RecordIndex <> ARecordIndex) then - FDataChangeInfo.Kind := dcTotal - else - if (ADataChange = dcField) and (FDataChangeInfo.ItemIndex <> -1) and - (FDataChangeInfo.ItemIndex <> AItemIndex) then - begin - FDataChangeInfo.Kind := dcRecord; - AItemIndex := -1; - end - else - FDataChangeInfo.Kind := ADataChange; - FDataChangeInfo.ItemIndex := AItemIndex; - FDataChangeInfo.RecordIndex := ARecordIndex; - if (ADataChange = dcTotal) then - UpdateStorage(False) - else - begin - if ADataChange in [dcNew, dcDeleted] then - DataControllerInfo.FocusedRecordChanged(False); - DataControllerInfo.Refresh; - end; - ResetMasterHasChildrenFlag; -end; - -procedure TcxCustomDataController.DataScrolled(ADistance: Integer); -begin - UpdateFocused; -end; - -procedure TcxCustomDataController.LayoutChanged(ADataLayoutChanges: TcxDataLayoutChanges); -begin - UpdateItems(Provider.IsActive); -end; - -procedure TcxCustomDataController.CustomDataSourceChanged; -begin -end; - -procedure TcxCustomDataController.DoBeforeFocusedRowChange(ARowIndex: Integer); -begin -end; - -procedure TcxCustomDataController.DoValueTypeClassChanged(AItemIndex: Integer); -begin -end; - -procedure TcxCustomDataController.UpdateControl(AInfo: TcxUpdateControlInfo); -begin - if Assigned(FOnUpdateControl) then FOnUpdateControl(AInfo); -end; - -function TcxCustomDataController.GetIncrementalSearchText(ARecordIndex, AItemIndex: Integer): string; -begin - Result := GetDisplayText(ARecordIndex, AItemIndex); -end; - -function TcxCustomDataController.GetFilterDisplayText(ARecordIndex, AItemIndex: Integer): string; -begin - Result := GetDisplayText(ARecordIndex, AItemIndex); -end; - -// Compare - -function TcxCustomDataController.CompareByField(ARecordIndex1, ARecordIndex2: Integer; - AField: TcxCustomDataField; AMode: TcxDataControllerComparisonMode): Integer; - -{ function CompareStrEx(const S1, S2: string): Integer; - begin - if S1 = S2 then - Result := 0 - else - if S1 < S2 then - Result := -1 - else - Result := 1; - end;} - - function StringCompare(const V1, V2: Variant): Integer; - begin - if dcoAnsiSort in Options then - begin - if dcoCaseInsensitive in Options then - Result := AnsiCompareText(V1, V2) - else - Result := AnsiCompareStr(V1, V2); - end - else - begin - if dcoCaseInsensitive in Options then - //TODO: Option -> CompareText(V1, V2); -// Result := CompareText(AnsiUpperCase(V1), AnsiUpperCase(V2)) - Result := CompareStr(AnsiUpperCase(V1), AnsiUpperCase(V2)) -// Result := CompareStrEx(AnsiUpperCase(V1), AnsiUpperCase(V2)) - else - Result := VarCompare(V1, V2); - end; - end; - -var - V1, V2: Variant; -begin - if (Assigned(FOnCompare) and not AField.IsInternal) or IsConversionNeededForCompare(AField) then - begin - if not Assigned(FOnCompare) and IsProviderMode and - Provider.CustomDataSource.IsNativeCompareFunc and - (ARecordIndex1 >= 0) and (ARecordIndex2 >= 0) then - begin - Result := Provider.NativeCompareFunc(ARecordIndex1, ARecordIndex2, AField); - end - else - begin - V1 := GetComparedValue(ARecordIndex1, AField); - V2 := GetComparedValue(ARecordIndex2, AField); - if Assigned(FOnCompare) then - begin - Result := 0; - FOnCompare(Self, ARecordIndex1, ARecordIndex2, AField.Index, V1, V2, Result); - end - else - begin - if VarIsStr(V1) and VarIsStr(V2) then - Result := StringCompare(VarToStr(V1), VarToStr(V2)) - else - Result := VarCompare(V1, V2); - // 2 Result := StringCompare(VarToStr(V1), VarToStr(V2)); - { 1 - if IsStringConversionNeeded(AField) then - Result := StringCompare(VarToStr(V1), VarToStr(V2)) - else - Result := VarCompare(V1, V2); - } - end; - end; - end - else - Result := NativeCompare(ARecordIndex1, ARecordIndex2, AField); -end; - -function TcxCustomDataController.CompareEqualRecords(ARecordIndex1, ARecordIndex2: Integer): Integer; -begin - Result := ARecordIndex1 - ARecordIndex2; -end; - -function TcxCustomDataController.CompareRecords(ARecordIndex1, ARecordIndex2: Integer; - ASortInfo: TcxDataSortInfo; AMode: TcxDataControllerComparisonMode = dccmOther): Integer; -begin - Result := CompareByField(ARecordIndex1, ARecordIndex2, ASortInfo.Field, AMode); - if ASortInfo.SortOrder = soDescending then - Result := -Result; -end; - -function TcxCustomDataController.FindGroupRecord(ABufferRecordIndex: Integer; - AGroupItemCount: Integer; AIsGroupDataSorted: Boolean): Integer; - - function Compare(ARecordListIndex: Integer): Integer; - var - ARecordIndex, I: Integer; - begin - ARecordIndex := DataControllerInfo.GetInternalRecordIndex(ARecordListIndex); - for I := 0 to AGroupItemCount - 1 do - begin - Result := DataControllerInfo.CompareGroupRecords(ARecordIndex, ABufferRecordIndex, I); - if Result <> 0 then - Exit; - end; - Result := 0; - end; - - function FindGroupRecordInSortedGroupData: Integer; - var - L, H, I, C: Integer; - begin - Result := -1; - L := 0; - H := DataControllerInfo.GetInternalRecordCount - 1; - if L <= H then - repeat - I := (L + H) div 2; - C := Compare(I); - if C = 0 then - begin - Result := DataControllerInfo.GetInternalRecordIndex(I); - Break; - end - else - if C < 0 then - L := I + 1 - else - H := I - 1; - if L > H then - Break; - until False; - end; - - function FindGroupRecordInUnsortedGroupData: Integer; - var - I: Integer; - begin - Result := -1; - for I := 0 to DataControllerInfo.GetInternalRecordCount - 1 do - if Compare(I) = 0 then - begin - Result := DataControllerInfo.GetInternalRecordIndex(I); - Break; - end; - end; - -begin - DataControllerInfo.PrepareSorting; - try - if AIsGroupDataSorted then - Result := FindGroupRecordInSortedGroupData - else - Result := FindGroupRecordInUnsortedGroupData; - finally - DataControllerInfo.UnprepareSorting; - end; -end; - -function TcxCustomDataController.FindRecordByFields(ABufferRecordIndex: Integer; - AFields: TList): Integer; - - function IsEqual(ARecordIndex: Integer): Boolean; - var - I: Integer; - begin - Result := AFields.Count > 0; - for I := 0 to AFields.Count - 1 do - if CompareByField(ARecordIndex, ABufferRecordIndex, TcxCustomDataField(AFields[I]), dccmOther) <> 0 then - begin - Result := False; - Break; - end; - end; - -var - I: Integer; -begin - Result := -1; - DataControllerInfo.PrepareSorting; - try - for I := 0 to RecordCount - 1 do - if IsEqual(I) then - begin - Result := I; - Break; - end; - finally - DataControllerInfo.UnprepareSorting; - end; -end; - -function TcxCustomDataController.GetComparedValue(ARecordIndex: Integer; - AField: TcxCustomDataField): Variant; -begin - if (AField.FNeedConversionFlag = 2) then - Result := GetDisplayText(ARecordIndex, AField.Index) - else - Result := GetInternalValue(ARecordIndex, AField); -end; - -function TcxCustomDataController.IsConversionNeededForCompare(AField: TcxCustomDataField): Boolean; -begin - if AField.FNeedConversionFlag <> 0 then - begin - Result := AField.FNeedConversionFlag >= 1; - Exit; - end; - Result := AField.NeedConversion or IsStringConversionNeeded(AField) or - IsSortByDisplayTextNeeded(AField); - if not Result and IsProviderMode then - Result := not Provider.CustomDataSource.IsNativeCompare; -end; - -function TcxCustomDataController.IsFilterItemSortByDisplayText(AItemIndex: Integer): Boolean; -var - AField: TcxCustomDataField; -begin - Result := GetItemSortByDisplayText(AItemIndex, True); - if not Result and (Options * [dcoAnsiSort] <> []) then - begin - AField := Fields[AItemIndex]; - Result := Assigned(AField.ValueDef) and AField.ValueDef.IsNeedConversion; - end; -end; - -function TcxCustomDataController.IsStringConversionNeeded(AField: TcxCustomDataField): Boolean; -begin - Result := (Options * [dcoAnsiSort, dcoCaseInsensitive] <> []) and - Assigned(AField.ValueDef) and AField.ValueDef.IsNeedConversion; -end; - -function TcxCustomDataController.IsSortByDisplayTextNeeded(AField: TcxCustomDataField): Boolean; -begin - Result := not FInternalFindRecord and not AField.IsInternal and - GetItemSortByDisplayText(AField.Index, dcoSortByDisplayText in Options); -end; - -function TcxCustomDataController.NativeCompare(ARecordIndex1, ARecordIndex2: Integer; - AField: TcxCustomDataField): Integer; -begin - if Assigned(AField.ValueDef) then - begin - if not IsProviderMode then - Result := DataStorage.CompareRecords(ARecordIndex1, ARecordIndex2, AField.ValueDef) - else - Result := Provider.NativeCompare(ARecordIndex1, ARecordIndex2, AField); - end - else - Result := 0; -end; - -procedure TcxCustomDataController.DeleteFocusedRecord; -begin - if FNearestRecordIndex >= FocusedRecordIndex then - Dec(FNearestRecordIndex); - try - Provider.Delete; - except - FNearestRecordIndex := FocusedRecordIndex; - raise; - end; -end; - -procedure TcxCustomDataController.DeleteRecords(AList: TList); -var - I, J, AOldNearestRecordIndex: Integer; -begin - // Prepare List - sort and delete duplicates - AList.Sort(CompareIntegers); - for I := AList.Count - 2 downto 0 do - begin - J := I + 1; - if AList[I] = AList[J] then - AList.Delete(J); - end; - - AOldNearestRecordIndex := FNearestRecordIndex; - if AOldNearestRecordIndex <> -1 then - begin - for I := 0 to AList.Count - 1 do - begin - if AOldNearestRecordIndex >= Integer(AList[I]) then - Dec(FNearestRecordIndex); - end; - end; - - try - Provider.DeleteRecords(AList); - except - FNearestRecordIndex := FocusedRecordIndex; - raise; - end; -end; - -procedure TcxCustomDataController.BeginSmartLoad; -begin - with Provider do - begin - Freeze; - SavePos; - DataStorage.BeginLoad; - end; -end; - -procedure TcxCustomDataController.EndSmartLoad; -begin - with Provider do - begin - DataStorage.EndLoad; - RestorePos; - Unfreeze; - end; - UpdateFocused; - DataControllerInfo.Refresh; -end; - -function TcxCustomDataController.LoadRecord(AData: Pointer): Integer; -begin - if IsProviderMode then - Result := Provider.AddRecordHandle(AData) - else - begin - Result := DataStorage.AppendRecord; - DataStorage.ReadRecord(Result, TcxValueDefReader(AData)); - DoReadRecord(Result); - end; -end; - -procedure TcxCustomDataController.BeginReadRecord; -begin -end; - -procedure TcxCustomDataController.EndReadRecord; -begin -end; - -function TcxCustomDataController.GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; -begin - Result := nil; -end; - -function TcxCustomDataController.GetCustomDataSource: TcxCustomDataSource; -begin - Result := Provider.CustomDataSource; -end; - -function TcxCustomDataController.GetDetailMode: TcxDataControllerDetailMode; -begin - if FMasterRelation <> nil then - begin - if FMasterRecordIndex <> -1 then - Result := dcdmClone - else - Result := dcdmPattern; - end - else - if FIsPattern then - Result := dcdmPattern - else - Result := dcdmNone; -end; - -function TcxCustomDataController.GetFilteredIndexByRecordIndex(Index: Integer): Integer; -begin - Result := DataControllerInfo.GetInternalRecordListIndex(Index); -end; - -function TcxCustomDataController.GetFilteredRecordCount: Integer; -begin - Result := DataControllerInfo.GetInternalRecordCount; -end; - -function TcxCustomDataController.GetFilteredRecordIndex(Index: Integer): Integer; -begin - Result := DataControllerInfo.GetInternalRecordIndex(Index); -end; - -function TcxCustomDataController.GetIsEditing: Boolean; -begin - Result := EditState * [dceInsert, dceEdit] <> []; - Result := Result and (Provider.FEditingRecordIndex <> cxNullEditingRecordIndex); -end; - -function TcxCustomDataController.GetIsPattern: Boolean; -begin - Result := DetailMode = dcdmPattern; -end; - -function TcxCustomDataController.GetIsRowInfoValid: Boolean; -begin - Result := not DataControllerInfo.FInfoCalculation; -end; - -function TcxCustomDataController.GetLockCount: Integer; -begin - Result := DataControllerInfo.LockCount; -end; - -function TcxCustomDataController.GetNewItemRowFocused: Boolean; -begin - Result := FNewItemRowFocused and UseNewItemRowForEditing and - (DataControllerInfo.FocusedRecordIndex = -1); -end; - -function TcxCustomDataController.GetOptions: TcxDataControllerOptions; -begin - Result := FOptions; -end; - -function TcxCustomDataController.GetRelations: TcxCustomDataRelationList; -begin - if FRelations = nil then - FRelations := TcxCustomDataRelationList.Create(Self); - Result := FRelations; -end; - -function TcxCustomDataController.GetSortingBySummaryDataItemIndex: Integer; -begin - if FSortingBySummaryDataItemField <> nil then - Result := FSortingBySummaryDataItemField.Index - else - Result := -1; -end; - -procedure TcxCustomDataController.SetCustomDataSource(Value: TcxCustomDataSource); -begin - if CustomDataSource <> Value then - begin - Provider.CustomDataSource := Value; - CustomDataSourceChanged; - end; -end; - -procedure TcxCustomDataController.SetIsPattern(Value: Boolean); -var - APrevIsPattern: Boolean; -begin - if Value and (FDataChangeRefCount <> 0) and (FMasterRelation <> nil) then - raise EdxException.Create('!'); - APrevIsPattern := IsPattern; - FIsPatternSave := Value; - FIsPattern := FIsPatternSave and (FDataChangeRefCount = 0); - if IsPattern <> APrevIsPattern then - if not (csDestroying in FOwner.ComponentState) then - RestructData; -end; - -procedure TcxCustomDataController.SetFilter(Value: TcxDataFilterCriteria); -begin - FFilter.Assign(Value); -end; - -procedure TcxCustomDataController.SetFocusedRowIndex(Value: Integer); -begin - ChangeFocusedRowIndex(Value); -end; - -procedure TcxCustomDataController.SetMultiSelect(Value: Boolean); -begin - if FMultiSelect <> Value then - begin - FMultiSelect := Value; - FFocusedSelected := True; // reset - BeginUpdate; - try - if not Value then - ClearSelection - else - if FocusedRowIndex <> -1 then - ChangeRowSelection(FocusedRowIndex, True); - if [soSelectedRecords, soMultipleSelectedRecords] * Summary.Options <> [] then - Summary.Changed(False); - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomDataController.SetNewItemRowFocused(Value: Boolean); -begin - if FNewItemRowFocused <> Value then - begin - BeginUpdate; - try - if FNewItemRowFocused then - begin - if not (csDestroying in FOwner.ComponentState) then - Post; - end - else - ChangeFocusedRowIndex(-1); - DataControllerInfo.FocusedRecordChanged(True); //? - FNewItemRowFocused := Value; // Notification - finally - EndUpdate; - end; - if (dcoInsertOnNewItemRowFocusing in Options) and - NewItemRowFocused and not Provider.IsInserting then - Insert; - end; -end; - -procedure TcxCustomDataController.SetOnFilterRecord(Value: TcxDataFilterRecordEvent); -begin - if @FOnFilterRecord <> @Value then - begin - FOnFilterRecord := Value; - Filter.Changed; - end; -end; - -procedure TcxCustomDataController.SetOptions(Value: TcxDataControllerOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - Refresh; - end; -end; - -procedure TcxCustomDataController.SetSummary(Value: TcxDataSummary); -begin - FSummary.Assign(Value); -end; - -procedure TcxCustomDataController.SetUseNewItemRowForEditing(Value: Boolean); -begin - if FUseNewItemRowForEditing <> Value then - begin - Cancel; - ClearSelection; - FUseNewItemRowForEditing := Value; - Change([dccData]); - end; -end; - -procedure TcxCustomDataController.SetSortingBySummaryDataItemIndex(Value: Integer); -begin - if GetSortingBySummaryDataItemIndex <> Value then - begin - if Value = -1 then - FSortingBySummaryDataItemField := nil - else - begin - CheckItemRange(Value); - FSortingBySummaryDataItemField := Fields[Value]; - end; - DoSortingBySummaryChanged; - end; -end; - -procedure TcxCustomDataController.Update; -var - AChanges: TcxDataControllerChanges; -begin - AChanges := FChanges; - FChanges := []; - if dccData in AChanges then - DataNotification - else - if AChanges * [dccLayout, dccDetail, dccSummary] <> [] then - LayoutNotification - else - if dccUpdateRecord in AChanges then - UpdateRecordNotification; - if dccFocus in AChanges then - FocusedNotification; - if dccSelection in AChanges then - SelectionNotification; - if dccSearch in AChanges then - SearchNotification; - if dccBookmark in AChanges then - BookmarkNotification; - // events - if dccGrouping in AChanges then - DoGroupingChanged; - if dccSorting in AChanges then - DoSortingChanged; - // master-detail sync - if dccSyncMasterPos in AChanges then - begin - if DetailMode = dcdmClone then - GetPatternDataController.UpdateFocused; - end; -end; - -procedure TcxCustomDataController.BeforeGroupingNotification; -begin - NotifyControl(TcxGroupingChangingInfo.Create); -end; - -procedure TcxCustomDataController.BookmarkNotification; -begin - NotifyControl(TcxBookmarkChangedInfo.Create); -end; - -procedure TcxCustomDataController.DataNotification; -var - ADataChangedInfo: TcxDataChangedInfo; -begin - try - ADataChangedInfo := TcxDataChangedInfo.Create; - if (FDataChangeInfo.Kind = dcField) and (FDataChangeInfo.ItemIndex = -1) then - FDataChangeInfo.Kind := dcRecord; - if (FDataChangeInfo.Kind in [dcField, dcRecord]) and - ((FDataChangeInfo.RecordIndex = -1) and not IsNewItemRecordIndex(FDataChangeInfo.RecordIndex)) then - FDataChangeInfo.Kind := dcTotal; - ADataChangedInfo.Kind := FDataChangeInfo.Kind; - ADataChangedInfo.ItemIndex := FDataChangeInfo.ItemIndex; - ADataChangedInfo.RecordIndex := FDataChangeInfo.RecordIndex; - NotifyControl(ADataChangedInfo); - DoDataChanged; - finally - ResetDataChangeInfo; - end; -end; - -procedure TcxCustomDataController.DoGroupingChanged; -begin - if [csReading{csLoading}] * FOwner.ComponentState <> [] then Exit; // TODO: collection -> lookup grid // // TODO: method IsLoading/Destroying - if Assigned(FOnGroupingChanged) then FOnGroupingChanged(Self); -end; - -procedure TcxCustomDataController.DoSortingBySummaryChanged; -begin - if IsDestroying then - Exit; - FSortingBySummaryChanged := True; - Change([dccSorting{dccGrouping}]); -end; - -procedure TcxCustomDataController.DoSortingChanged; -begin - if [csReading{csLoading}] * FOwner.ComponentState <> [] then Exit; // TODO: collection -> lookup grid // // TODO: method IsLoading/Destroying - if FInOnSortingChanged then Exit; - FInOnSortingChanged := True; - try - if Assigned(FOnSortingChanged) then FOnSortingChanged(Self); - finally - FInOnSortingChanged := False; - end; -end; - -procedure TcxCustomDataController.FocusedNotification; -begin - if DataControllerInfo.PrevFocusedRowIndex <> DataControllerInfo.FocusedRowIndex then - NotifyControl(TcxFocusedRowChangedInfo.Create(DataControllerInfo.PrevFocusedRowIndex, - DataControllerInfo.FocusedRowIndex)); - if (DataControllerInfo.PrevFocusedRecordIndex >= 0) or - (DataControllerInfo.FocusedRecordIndex >= 0) or - DataControllerInfo.FPrevFocusingInfo.FChangedFlag then - begin -// !!! -// if (DataControllerInfo.PrevFocusedRecordIndex <> DataControllerInfo.FocusedRecordIndex) and -// not DataControllerInfo.FPrevFocusingInfo.FChangedFlag then - NotifyControl(TcxFocusedRecordChangedInfo.Create(DataControllerInfo.PrevFocusedRecordIndex, - DataControllerInfo.FocusedRecordIndex, DataControllerInfo.PrevFocusedRowIndex, - DataControllerInfo.FocusedRowIndex, DataControllerInfo.NewItemRowFocusingChanged)); - Search.Cancel; - end; - DataControllerInfo.FPrevFocusingInfo.Assign(DataControllerInfo.FFocusingInfo); -end; - -procedure TcxCustomDataController.LayoutNotification; -begin - NotifyControl(TcxLayoutChangedInfo.Create); -end; - -procedure TcxCustomDataController.UpdateRecordNotification; -begin - NotifyControl(TcxUpdateRecordInfo.Create(FocusedRecordIndex)); - Search.Cancel; -end; - -procedure TcxCustomDataController.SearchNotification; -begin - NotifyControl(TcxSearchChangedInfo.Create); -end; - -procedure TcxCustomDataController.SelectionNotification; -var - AInfo: TcxSelectionChangedInfo; - ARowIndex1, ARowIndex2: Integer; -begin - ARowIndex1 := -1; - ARowIndex2 := -1; - FSelectionChangedInfo.SelectedCount := GetSelectedCount; - if FSelectionChangedInfo.SelectedCount <= 1 then - begin - if FSelectionChangedInfo.SelectedCount = 1 then - FSelectionChangedInfo.RowIndex := GetSelectedRowIndex(0) - else - FSelectionChangedInfo.RowIndex := -1; - if FPrevSelectionChangedInfo.SelectedCount <= 1 then - begin - if FPrevSelectionChangedInfo.SelectedCount = 1 then - ARowIndex1 := FPrevSelectionChangedInfo.RowIndex - else - ARowIndex1 := -1; - ARowIndex2 := FSelectionChangedInfo.RowIndex; - end; - end; - AInfo := TcxSelectionChangedInfo.CreateEx(ARowIndex1, ARowIndex2); - NotifyControl(AInfo); - FPrevSelectionChangedInfo := FSelectionChangedInfo; -end; - -procedure TcxCustomDataController.NotifyControl(AUpdateControlInfo: TcxUpdateControlInfo); -begin - FInNotifyControl := True; - try - UpdateControl(AUpdateControlInfo); - finally - AUpdateControlInfo.Free; - FInNotifyControl := False; - end; -end; - -procedure TcxCustomDataController.NotifyListenerLinks; -var - I: Integer; - ALink: TcxDataListenerLink; -begin - for I := FListenerLinks.Count - 1 downto 0 do - begin - ALink := TcxDataListenerLink(FListenerLinks[I]); - ALink.Ref := nil; - FListenerLinks.Delete(I); - end; -end; - -procedure TcxCustomDataController.ResetDataChangeInfo; -begin - FDataChangeInfo.Kind := dcTotal; - FDataChangeInfo.ItemIndex := -1; - FDataChangeInfo.RecordIndex := -1; -end; - -{ TcxCustomDataHelper } - -class function TcxCustomDataHelper.GetValueDef(AField: TcxCustomDataField): TcxValueDef; -begin - Result := AField.ValueDef; -end; - -class procedure TcxCustomDataHelper.SetTextStored(AField: TcxCustomDataField; ATextStored: Boolean); -begin - AField.FTextStored := ATextStored; -end; - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxDB.pas b/internal/x.46/ExpressDataController/Sources/cxDB.pas deleted file mode 100644 index 4a76127e..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxDB.pas +++ /dev/null @@ -1,873 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDB; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils, {$IFDEF DELPHI6}Variants, {$ENDIF} DB, - cxDataUtils; - -type - { TcxDBAdapterList } - - TDataSetClass = class of TDataSet; - - TcxDBAdapterItem = class - private - FDataSetClass: TDataSetClass; - public - constructor Create(ADataSetClass: TDataSetClass); virtual; - property DataSetClass: TDataSetClass read FDataSetClass; - end; - - TcxDBAdapterItemClass = class of TcxDBAdapterItem; - - TcxDBAdapterList = class - private - FItems: TList; - function GetItem(Index: Integer): TcxDBAdapterItem; - function GetItemCount: Integer; - public - constructor Create; - destructor Destroy; override; - procedure Clear; - function FindAdapter(ADataSetClass: TDataSetClass; var AIndex: Integer): Boolean; virtual; - procedure RegisterAdapter(ADataSetClass: TDataSetClass; AItemClass: TcxDBAdapterItemClass); virtual; - procedure UnregisterAdapter(ADataSetClass: TDataSetClass; AItemClass: TcxDBAdapterItemClass); virtual; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TcxDBAdapterItem read GetItem; default; - end; - - { TcxCustomFieldDataLink } - - TcxCustomDBDataBinding = class; - - TcxCustomFieldDataLink = class(TDataLink) - private - FField: TField; - FFieldName: string; - FEditing: Boolean; - FModified: Boolean; - function GetCanModify: Boolean; - function GetDataComponent: TComponent; - procedure SetEditing(Value: Boolean); - procedure SetField(Value: TField); - procedure SetFieldName(const Value: string); - procedure UpdateField; - protected - FDataBinding: TcxCustomDBDataBinding; - procedure ActiveChanged; override; - procedure DataEvent(Event: TDataEvent; Info: Longint); override; - procedure EditingChanged; override; - procedure LayoutChanged; override; - procedure RecordChanged(Field: TField); override; - procedure UpdateData; override; - procedure DataComponentChanged; virtual; - procedure UpdateRightToLeft; virtual; - procedure VisualControlChanged; virtual; - property DataBinding: TcxCustomDBDataBinding read FDataBinding; - property DataComponent: TComponent read GetDataComponent; - public - constructor Create(ADataBinding: TcxCustomDBDataBinding); virtual; - function Edit: Boolean; - procedure Modified; - procedure Reset; - property CanModify: Boolean read GetCanModify; - property Editing: Boolean read FEditing; - property Field: TField read FField; - property FieldName: string read FFieldName write SetFieldName; - end; - - TcxCustomFieldDataLinkClass = class of TcxCustomFieldDataLink; - - { TcxCustomDBDataBinding } - - TcxCustomDBDataBinding = class(TcxCustomDataBinding) - private - FRefreshCount: Integer; - function GetDataField: string; - function GetDataSource: TDataSource; - function GetField: TField; - procedure InternalDataChange; - procedure SetDataField(const Value: string); - procedure SetDataSource(Value: TDataSource); - protected - FDataLink: TcxCustomFieldDataLink; - function GetModified: Boolean; override; - function GetReadOnly: Boolean; override; - procedure SetReadOnly(Value: Boolean); override; - procedure VisualControlChanged; override; - procedure DisableRefresh; - procedure EnableRefresh; - function GetDataLinkClass: TcxCustomFieldDataLinkClass; virtual; - function IsRefreshDisabled: Boolean; - public - constructor Create(AOwner, ADataComponent: TComponent); override; - destructor Destroy; override; - function CanModify: Boolean; override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function GetStoredValue(AValueSource: TcxDataEditValueSource; AFocused: Boolean): Variant; override; - function IsControlReadOnly: Boolean; override; - function IsDataSourceLive: Boolean; override; - function IsDataStorage: Boolean; override; - procedure Reset; override; - function SetEditMode: Boolean; override; - procedure SetStoredValue(AValueSource: TcxDataEditValueSource; const Value: Variant); override; - function UpdateAction(Action: TBasicAction): Boolean; override; - procedure UpdateDataSource; override; - property Field: TField read GetField; - property DataSource: TDataSource read GetDataSource write SetDataSource; - property DataField: string read GetDataField write SetDataField; - property DataLink: TcxCustomFieldDataLink read FDataLink; - end; - -function CanModifyLookupField(AField: TField): Boolean; -procedure CheckFilterFieldName(var AFieldName: string); -function GetDataSetValues(ADataSet: TDataSet; AFields: TList): Variant; -function GetFilterFieldName(AField: TField; AIgnoreOrigin: Boolean): string; -function IsEqualFieldNames(const AFieldName1, AFieldName2: string): Boolean; -function IsFieldCanModify(AField: TField; AIsValueSource: Boolean): Boolean; -function IsFieldFormatted(AField: TField; AIsTextEdit: Boolean): Boolean; -function IsMultipleFieldNames(const AFieldNames: string): Boolean; -function IsSimpleCurrencyField(AField: TField): Boolean; -function GetFieldNamesCount(const AFieldNames: string): Integer; -procedure GetFieldNames(const AFieldNames: string; AList: TStrings); -function GetFieldValue(AField: TField): Variant; -procedure SetDataSetValues(ADataSet: TDataSet; AFields: TList; const AValues: Variant); -procedure SetFieldValue(AField: TField; const AValue: Variant); - -implementation - -uses - cxVariants; - -function CanModifyLookupField(AField: TField): Boolean; -var - AMasterFields: TList; - I: Integer; -begin - Result := False; - if Assigned(AField.DataSet) then - begin - AMasterFields := TList.Create; - try - AField.DataSet.GetFieldList(AMasterFields, AField.KeyFields); - Result := AMasterFields.Count > 0; - for I := 0 to AMasterFields.Count - 1 do - Result := Result and TField(AMasterFields[I]).CanModify; - finally - AMasterFields.Free; - end; - end; -end; - -procedure CheckFilterFieldName(var AFieldName: string); -begin - if not IsValidIdent(AFieldName) then - AFieldName := '[' + AFieldName + ']'; -end; - -function GetDataSetValues(ADataSet: TDataSet; AFields: TList): Variant; -var - I: Integer; -begin - if AFields.Count > 0 then - begin - if AFields.Count > 1 then - begin - Result := VarArrayCreate([0, AFields.Count - 1], varVariant); - for I := 0 to AFields.Count - 1 do - Result[I] := TField(AFields[I]).Value; - end - else - Result := TField(AFields[0]).Value; - end - else - Result := Null; -end; - -function GetFilterFieldName(AField: TField; AIgnoreOrigin: Boolean): string; -begin - Result := ''; - if Assigned(AField) then - begin - if not AIgnoreOrigin then - Result := AField.Origin; - if Result = '' then - begin - Result := AField.FieldName; - CheckFilterFieldName(Result); - end; - end; -end; - -function IsEqualFieldNames(const AFieldName1, AFieldName2: string): Boolean; -begin - Result := AnsiUpperCase(AFieldName1) = AnsiUpperCase(AFieldName2); -end; - -function IsFieldCanModify(AField: TField; AIsValueSource: Boolean): Boolean; -begin - Result := AField.CanModify and - (AIsValueSource or not (AField.DataType in ftNonTextTypes) or Assigned(AField.OnSetText)); -end; - -function IsFieldFormatted(AField: TField; AIsTextEdit: Boolean): Boolean; -begin - Result := Assigned(AField.OnGetText) or (AField.EditMask <> ''); - if not Result then - begin - if AField.DataType in ftNonTextTypes then - Result := AIsTextEdit // Field.DisplayText! - else - if AField is TBooleanField then - Result := AIsTextEdit // TODO: compare DisplayValues - else - if AField is TNumericField then - begin - Result := ((AField as TNumericField).DisplayFormat <> '') or - ((AField as TNumericField).EditFormat <> ''); - if not Result then - begin - if AField is TFloatField then - Result := (AField as TFloatField).Currency - else - if AField is TBCDField then - Result := (AField as TBCDField).Currency - {$IFDEF DELPHI6} - else - if AField is TFMTBCDField then - Result := (AField as TFMTBCDField).Currency - {$ENDIF} - end; - end - else - if AField is TDateTimeField then - Result := (AField as TDateTimeField).DisplayFormat <> '' - else - {$IFDEF DELPHI5} - if AField is TAggregateField then - Result := ((AField as TAggregateField).DisplayFormat <> '') or - (AField as TAggregateField).Currency - else - {$IFDEF DELPHI6} - if AField is TSQLTimeStampField then - Result := (AField as TSQLTimeStampField).DisplayFormat <> ''; - {$ENDIF} - {$ENDIF} - end; -end; - -function IsMultipleFieldNames(const AFieldNames: string): Boolean; -var - APos: Integer; -begin - APos := 1; -{$WARNINGS OFF} - ExtractFieldName(AFieldNames, APos); -{$WARNINGS ON} - Result := APos <= Length(AFieldNames); -end; - -function IsSimpleCurrencyField(AField: TField): Boolean; -begin - Result := False; - if AField is TNumericField then - begin - if AField is TFloatField then - Result := (AField as TFloatField).Currency - else - begin - if AField is TBCDField then - Result := (AField as TBCDField).Currency - {$IFDEF DELPHI6} - else - if AField is TFMTBCDField then - Result := (AField as TFMTBCDField).Currency; - {$ENDIF} - end; - if Result then - begin - if ((AField as TNumericField).DisplayFormat <> '') or Assigned(AField.OnGetText) then - Result := False; - end; - end; -end; - -function GetFieldNamesCount(const AFieldNames: string): Integer; -var - APos: Integer; -begin - Result := 0; // TODO: use GetFieldNames? - APos := 1; - while APos <= Length(AFieldNames) do - begin - Inc(Result); - {$WARNINGS OFF} - ExtractFieldName(AFieldNames, APos); - {$WARNINGS ON} - end; -end; - -procedure GetFieldNames(const AFieldNames: string; AList: TStrings); -var - APos: Integer; -begin - AList.Clear; - APos := 1; - while APos <= Length(AFieldNames) do - {$WARNINGS OFF} - AList.Add(ExtractFieldName(AFieldNames, APos)) - {$WARNINGS ON} -end; - -function GetFieldValue(AField: TField): Variant; -begin - if AField is TAggregateField then // bug in Delphi (IsNull = True!) - Result := AField.Value - else - if AField.IsNull then - Result := Null - else - begin - {$IFDEF DELPHI5} - if AField is TWideStringField then // bug in Delphi - Result := TWideStringField(AField).Value - else - {$ENDIF} - Result := AField.Value; - end; -end; - -procedure SetDataSetValues(ADataSet: TDataSet; AFields: TList; - const AValues: Variant); -var - I: Integer; -begin - if AFields.Count > 0 then - begin - if AFields.Count > 1 then - begin - for I := 0 to AFields.Count - 1 do - TField(AFields[I]).Value := AValues[I]; - end - else - TField(AFields[0]).Value := AValues; - end; -end; - -procedure SetFieldValue(AField: TField; const AValue: Variant); -begin - if (AField is TDateTimeField) and (VarType(AValue) = varDouble) then // bug in Delphi - TDateTimeField(AField).Value := AValue - else - AField.Value := AValue; -end; - -{ TcxDBAdapterItem } - -constructor TcxDBAdapterItem.Create(ADataSetClass: TDataSetClass); -begin - inherited Create; - FDataSetClass := ADataSetClass; -end; - -{ TcxDBAdapterList } - -constructor TcxDBAdapterList.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TcxDBAdapterList.Destroy; -begin - Clear; - FItems.Free; - FItems := nil; - inherited Destroy; -end; - -procedure TcxDBAdapterList.Clear; -var - I: Integer; -begin - for I := 0 to FItems.Count - 1 do - TObject(FItems[I]).Free; - FItems.Clear; -end; - -function TcxDBAdapterList.FindAdapter(ADataSetClass: TDataSetClass; - var AIndex: Integer): Boolean; -var - I: Integer; - AItem: TcxDBAdapterItem; -begin - Result := False; - for I := FItems.Count - 1 downto 0 do - begin - AItem := TcxDBAdapterItem(FItems[I]); - if ADataSetClass.InheritsFrom(AItem.DataSetClass) then - begin - AIndex := I; - Result := True; - Break; - end - else - if AItem.DataSetClass.InheritsFrom(ADataSetClass) then - AIndex := I; - end; -end; - -procedure TcxDBAdapterList.RegisterAdapter(ADataSetClass: TDataSetClass; - AItemClass: TcxDBAdapterItemClass); -var - AIndex: Integer; -begin - AIndex := -1; - if FindAdapter(ADataSetClass, AIndex) then - FItems.Insert(AIndex + 1, AItemClass.Create(ADataSetClass)) - else - if AIndex <> -1 then - FItems.Insert(AIndex, AItemClass.Create(ADataSetClass)) - else - FItems.Add(AItemClass.Create(ADataSetClass)); -end; - -procedure TcxDBAdapterList.UnregisterAdapter(ADataSetClass: TDataSetClass; - AItemClass: TcxDBAdapterItemClass); -var - I: Integer; - AItem: TcxDBAdapterItem; -begin - for I := FItems.Count - 1 downto 0 do - begin - AItem := TcxDBAdapterItem(FItems[I]); - if (AItem.DataSetClass = ADataSetClass) and (AItem.ClassType = AItemClass) then - begin - AItem.Free; - FItems.Delete(I); - end; - end; -end; - -function TcxDBAdapterList.GetItem(Index: Integer): TcxDBAdapterItem; -begin - Result := TcxDBAdapterItem(FItems[Index]); -end; - -function TcxDBAdapterList.GetItemCount: Integer; -begin - Result := FItems.Count; -end; - -{ TcxCustomFieldDataLink } - -constructor TcxCustomFieldDataLink.Create(ADataBinding: TcxCustomDBDataBinding); -begin - inherited Create; - VisualControl := False; - FDataBinding := ADataBinding; -end; - -function TcxCustomFieldDataLink.Edit: Boolean; -begin - if CanModify then - inherited Edit; - Result := FEditing; -end; - -procedure TcxCustomFieldDataLink.Modified; -begin - FModified := True; -end; - -procedure TcxCustomFieldDataLink.Reset; -begin - RecordChanged(nil); -end; - -procedure TcxCustomFieldDataLink.ActiveChanged; -begin - UpdateField; - FDataBinding.DataSetChange; -end; - -procedure TcxCustomFieldDataLink.DataEvent(Event: TDataEvent; - Info: Longint); -begin - if Event = deDataSetChange then - UpdateField; - inherited DataEvent(Event, Info); - if Event = deDataSetChange then - FDataBinding.DataSetChange; -end; - -procedure TcxCustomFieldDataLink.EditingChanged; -begin - SetEditing(inherited Editing and CanModify); -end; - -(*procedure TcxCustomFieldDataLink.FocusControl(Field: TFieldRef); -begin - if (Field^ <> nil) and (Field^ = FField) and (FDataComponent is TWinControl) then - if TWinControl(FDataComponent).CanFocus then - begin - Field^ := nil; - TWinControl(FDataComponent).SetFocus; - end; -end;*) - -procedure TcxCustomFieldDataLink.LayoutChanged; -begin - UpdateField; -end; - -procedure TcxCustomFieldDataLink.RecordChanged(Field: TField); -begin - if (Field = nil) or (Field = FField) then - begin - FDataBinding.InternalDataChange; - if not FDataBinding.IsRefreshDisabled then - FModified := False; - end; -end; - -procedure TcxCustomFieldDataLink.UpdateData; -begin - if FModified then - begin - if Field <> nil then - FDataBinding.UpdateData; - if not FDataBinding.IsRefreshDisabled then - FModified := False; - end; -end; - -procedure TcxCustomFieldDataLink.DataComponentChanged; -begin -end; - -procedure TcxCustomFieldDataLink.UpdateRightToLeft; -begin -end; - -procedure TcxCustomFieldDataLink.VisualControlChanged; -begin -end; - -function TcxCustomFieldDataLink.GetCanModify: Boolean; -begin - Result := not ReadOnly and (Field <> nil) and (Field.CanModify or - (Field.Lookup and CanModifyLookupField(Field))); -end; - -function TcxCustomFieldDataLink.GetDataComponent: TComponent; -begin - Result := FDataBinding.DataComponent; -end; - -procedure TcxCustomFieldDataLink.SetEditing(Value: Boolean); -begin - if FEditing <> Value then - begin - FEditing := Value; - if not FDataBinding.IsRefreshDisabled then - FModified := False; - end; -end; - -procedure TcxCustomFieldDataLink.SetField(Value: TField); -begin - if FField <> Value then - begin - FField := Value; - FDataBinding.DataSetChange; - EditingChanged; - RecordChanged(nil); - UpdateRightToLeft; - end; -end; - -procedure TcxCustomFieldDataLink.SetFieldName(const Value: string); -begin - if FFieldName <> Value then - begin - FFieldName := Value; - UpdateField; - end; -end; - -procedure TcxCustomFieldDataLink.UpdateField; -begin - if Active and (FFieldName <> '') then - begin - FField := nil; - if Assigned(DataComponent) then - SetField(GetFieldProperty(DataSource.DataSet, DataComponent, FFieldName)) - else - SetField(DataSource.DataSet.FieldByName(FFieldName)); - end - else - SetField(nil); -end; - -{ TcxCustomDBDataBinding } - -constructor TcxCustomDBDataBinding.Create(AOwner, ADataComponent: TComponent); -begin - inherited Create(AOwner, ADataComponent); - FDataLink := GetDataLinkClass.Create(Self); -// TODO SetReplicatable -end; - -destructor TcxCustomDBDataBinding.Destroy; -begin - FDataLink.Free; - inherited Destroy; -end; - -function TcxCustomDBDataBinding.CanModify: Boolean; -begin - Result := IsDataSourceLive and not Field.ReadOnly; - Result := Result and (Field.CanModify or (Field.Lookup and CanModifyLookupField(Field))); -end; - -function TcxCustomDBDataBinding.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := FDataLink.ExecuteAction(Action); -end; - -function TcxCustomDBDataBinding.IsControlReadOnly: Boolean; -begin - Result := ReadOnly; - if not Result and IsDataSourceLive then - Result := Field.ReadOnly; -end; - -function TcxCustomDBDataBinding.IsDataSourceLive: Boolean; -begin - Result := (FDataLink.FField <> nil) and (FDataLink.FField <> nil) and - (FDataLink.FField.DataSet.State <> dsInactive); -end; - -function TcxCustomDBDataBinding.IsDataStorage: Boolean; -begin - Result := True; -end; - -procedure TcxCustomDBDataBinding.Reset; -begin - FDataLink.Reset; -end; - -function TcxCustomDBDataBinding.SetEditMode: Boolean; -begin - Result := inherited SetEditMode; - if not Result then - Exit; - - DisableRefresh; - try - FDatalink.Edit; - Result := FDatalink.Editing; - if Result then - FDatalink.Modified; - finally - EnableRefresh; - end; -end; - -procedure TcxCustomDBDataBinding.UpdateDataSource; -begin - FDataLink.UpdateRecord; -end; - -function TcxCustomDBDataBinding.GetModified: Boolean; -begin - Result := IsDataSourceLive and FDataLink.Editing and FDataLink.FModified; -end; - -function TcxCustomDBDataBinding.GetReadOnly: Boolean; -begin - Result := FDataLink.ReadOnly; -end; - -function TcxCustomDBDataBinding.GetStoredValue(AValueSource: TcxDataEditValueSource; - AFocused: Boolean): Variant; -begin - if not IsDataSourceLive or (Field.IsNull and (AValueSource <> evsText)) then - Result := Null - else - case AValueSource of - evsKey: - if Field.KeyFields <> '' then - Result := Field.DataSet.FieldValues[Field.KeyFields] - else - Result := Field.Value; - evsText: - if AFocused and FDataLink.CanModify then - Result := Field.Text - else - Result := Field.DisplayText; - else {evsValue:} - Result := Field.Value; - end; -end; - -procedure TcxCustomDBDataBinding.SetReadOnly(Value: Boolean); -begin - if Value <> ReadOnly then - begin - FDataLink.ReadOnly := Value; - DataSetChange; - end; -end; - -procedure TcxCustomDBDataBinding.VisualControlChanged; -begin - FDataLink.VisualControlChanged; -end; - -procedure TcxCustomDBDataBinding.SetStoredValue(AValueSource: TcxDataEditValueSource; - const Value: Variant); - - procedure SetFieldValueEx(AField: TField; const AValue: Variant); - begin - if VarIsStr(Value) and (Value = '') and not(Field.DataType in [ftString{$IFDEF DELPHI4}, ftWideString{$ENDIF}]) then - AField.Value := Null - else - AField.Value := Value; - end; - -var - AFieldList: TList; - I: Integer; -begin - if IsDataSourceLive then - begin - DisableRefresh; - try - if FDataLink.Edit then - begin - if (*(*)AValueSource = evsText(*) or Assigned(Field.OnSetText)*) then - Field.Text := VarToStr(Value) - else - if (AValueSource = evsKey) and (Field.KeyFields <> '') then - if Pos(';', Field.KeyFields) = 0 then - SetFieldValueEx(Field.DataSet.FieldByName(Field.KeyFields), Value) - else - begin - AFieldList := TList.Create; - try - Field.DataSet.GetFieldList(AFieldList, Field.KeyFields); - for I := 0 to AFieldList.Count - 1 do - SetFieldValueEx(TField(AFieldList[I]), Value[I]); - finally - AFieldList.Free; - end; - Field.DataSet.FieldValues[Field.KeyFields] := Value; - end - else - SetFieldValueEx(Field, Value); - end; - finally - EnableRefresh; - end; - end; -end; - -function TcxCustomDBDataBinding.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := FDataLink.UpdateAction(Action); -end; - -procedure TcxCustomDBDataBinding.DisableRefresh; -begin - Inc(FRefreshCount); -end; - -procedure TcxCustomDBDataBinding.EnableRefresh; -begin - if FRefreshCount > 0 then - Dec(FRefreshCount); -end; - -function TcxCustomDBDataBinding.GetDataLinkClass: TcxCustomFieldDataLinkClass; -begin - Result := TcxCustomFieldDataLink; -end; - -function TcxCustomDBDataBinding.IsRefreshDisabled: Boolean; -begin - Result := FRefreshCount > 0; -end; - -function TcxCustomDBDataBinding.GetDataField: string; -begin - Result := FDataLink.FieldName; -end; - -function TcxCustomDBDataBinding.GetDataSource: TDataSource; -begin - Result := FDataLink.DataSource; -end; - -function TcxCustomDBDataBinding.GetField: TField; -begin - Result := FDataLink.Field; -end; - -procedure TcxCustomDBDataBinding.InternalDataChange; -begin - if not IsRefreshDisabled then - DataChange; -end; - -procedure TcxCustomDBDataBinding.SetDataField(const Value: string); -begin - FDataLink.FieldName := Value; -end; - -procedure TcxCustomDBDataBinding.SetDataSource(Value: TDataSource); -begin - FDataLink.DataSource := Value; -end; - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxDBData.pas b/internal/x.46/ExpressDataController/Sources/cxDBData.pas deleted file mode 100644 index f25171aa..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxDBData.pas +++ /dev/null @@ -1,5417 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBData; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - SysUtils, Classes, DB, dxCore, cxDataUtils, cxCustomData, cxDataStorage, - cxVariants, cxFilter, cxDBFilter, cxDB; - -type - TcxBookmark = {$IFDEF DELPHI12} TBookmark {$ELSE} TBookmarkStr {$ENDIF}; - TcxDBDataController = class; - TcxDBDataProvider = class; - TcxDBDataModeController = class; - TcxDBDataFilterCriteria = class; - TGetListProc = procedure(AList: TList) of object; - - { TcxDBProviderDetailFilterAdapter } - - TcxDBProviderDetailFilterAdapter = class(TcxDBAdapterItem) - public - function IsCurrentQuery(ADataSet: TDataSet; const AParamNames: string; const AParamValues: Variant): Boolean; virtual; - procedure ReopenSQL(ADataSet: TDataSet; const AParamNames: string; const AParamValues: Variant; var AReopened: Boolean); virtual; - procedure SetFilter(ADataSet: TDataSet; const AMasterDetailKeyFieldNames: string; - const AMasterDetailKeyValues: Variant; AIsSQLMode: Boolean; var AReopened: Boolean); virtual; - end; - - { TcxDBDataLink } - - TcxDBDataLink = class(TDataLink) - private - {$IFDEF DELPHI7} - FLayoutChangedFlag: Boolean; - FPreventLayoutChanged: Boolean; - {$ENDIF} - FProvider: TcxDBDataProvider; - procedure DoInsertingRecord; - protected - procedure ActiveChanged; override; - {$IFDEF DELPHI7} - procedure DataEvent(Event: TDataEvent; Info: Integer); override; - {$ENDIF} - procedure DataSetChanged; override; - procedure DataSetScrolled(Distance: Integer); override; - procedure EditingChanged; override; - procedure FocusControl(Field: TFieldRef); override; - procedure LayoutChanged; override; - procedure RecordChanged(Field: TField); override; - procedure UpdateData; override; - property Provider: TcxDBDataProvider read FProvider; - public - constructor Create(AProvider: TcxDBDataProvider); - end; - - { TcxDBDataProvider } - - TcxDBDataProviderSavePosInfo = record - Bookmark: TcxBookmark; - Bof: Boolean; // conflicts with C++ macro - Eof: Boolean; // conflicts with C++ macro - ActiveRecord: Integer; - end; - - TcxDBDataAssignedFields = class - private - FFields: TList; - public - constructor Create; - destructor Destroy; override; - procedure AddField(AField: TField); - procedure AddFieldsByFieldList(AFieldList: TList); - procedure AddFieldsByFieldNames(ADataSet: TDataSet; const AFieldNames: string); - procedure Clear; - function IsEmpty: Boolean; - function IsFieldExists(AField: TField): Boolean; - end; - - TcxDBDataProvider = class(TcxCustomDataProvider) - private - FAssignedFields: TcxDBDataAssignedFields; - FDataLink: TcxDBDataLink; - FInCanInitEditing: Boolean; - FInSetDataSource: Boolean; - FIncrementalSearching: Boolean; - FInFirst: Boolean; - FInInsert: Boolean; - FInsertOperation: Boolean; - FInUpdateGridMode: Boolean; - FIsDataSetCurrent: Boolean; - FInNotify: Boolean; - FListeners: TList; - FPostLocateFlag: Boolean; - FRecordIndex: Integer; -// FNearestRecordID: Variant; - FSavePosInfo: TcxDBDataProviderSavePosInfo; - FUpdatingPrevFocusedRecordIndex: Integer; - FUpdatingRecordIndex: Integer; - FUpdatingRecordIsInserting: Boolean; - FUpdatingNewRecordIndex: Integer; - procedure AddNewRecord(AOperation: TDataOperation); - function GetDataController: TcxDBDataController; - function GetDataSet: TDataSet; - function GetDataSource: TDataSource; - function GetIsDataSetCurrent: Boolean; - function GetIsSmartRefresh: Boolean; - procedure RemoveFromListeners; - procedure SetDataSource(Value: TDataSource); - procedure SetIsDataSetCurrent(Value: Boolean); - protected - function IsCustomDataSourceSupported: Boolean; override; - function IsGridMode: Boolean; override; - function IsDataSource: Boolean; override; - function IsKeyNavigation: Boolean; - function IsOtherInsert: Boolean; override; - function IsSyncInsert: Boolean; - function IsSyncMode: Boolean; override; - // DataSet - function DataSet_ActiveRecord: Integer; - function DataSet_BookmarkAvailable: Boolean; - function DataSet_BufferCount: Integer; - // State - function IsActive: Boolean; override; - function IsActiveDataSet: Boolean; override; - function IsBOF: Boolean; override; - function IsChanging: Boolean; override; - function IsEditing: Boolean; override; - function IsEOF: Boolean; override; - function IsGridModeUpdating: Boolean; override; - function IsInserting: Boolean; override; - function IsModified: Boolean; override; - function IsDataSetModified: Boolean; virtual; - // Navigation - function BookmarkValid(const ABookmark: TcxBookmark): Boolean; virtual; - function CompareBookmarks(const AItem1, AItem2: TcxBookmark): Integer; virtual; - procedure CorrectRecordIndex(ARecordIndex: Integer); override; - procedure First; override; - procedure Prev; override; - procedure Next; override; - procedure Last; override; - procedure MoveBy(ADistance: Integer); override; - procedure Scroll(ADistance: Integer); override; - procedure SavePos; override; - procedure RestorePos; override; - // Editing - function CanDelete: Boolean; override; - function CanInitEditing(ARecordIndex: Integer): Boolean; override; - function CanModify: Boolean; override; - - procedure Append; override; - procedure InternalCancel; virtual; - procedure Cancel; override; - procedure Delete; override; - procedure DeleteRecords(AList: TList); override; - procedure DeleteSelection; override; - procedure Edit; override; - function GetEditValue(ARecordIndex: Integer; AField: TcxCustomDataField; - AEditValueSource: TcxDataEditValueSource): Variant; override; - procedure Insert; override; - procedure Post(AForcePost: Boolean = False); override; - procedure PostEditingData; override; - function SetEditValue(ARecordIndex: Integer; AField: TcxCustomDataField; const AValue: Variant; AEditValueSource: TcxDataEditValueSource): Boolean; override; - - procedure BeginDeleting; override; - procedure EndDeleting; override; - - procedure AssignItemValue(ARecordIndex: Integer; AField: TcxCustomDataField; const AValue: Variant); override; - procedure DoInitInsertingRecord(AInsertingRecordIndex: Integer; const AGroupValues: TcxDataSummaryValues); override; - // Notification - procedure ActiveChanged(AActive: Boolean); override; - procedure AddListener(AProvider: TcxDBDataProvider); - procedure BeginLocate; override; - procedure DataScrolled(ADistance: Integer); override; - procedure Freeze; override; - procedure LayoutChanged(ADataLayoutChanges: TcxDataLayoutChanges); override; - procedure RecordChanged(Field: TField); virtual; - procedure ResetPostLocateFlag; - procedure ResetSmartRefresh; - procedure SetPostLocateFlag; - procedure Unfreeze; override; - // Smart Refesh - procedure SmartDataChanged; - // GridMode - procedure CheckExpandedDetails; - function DoLocate(const ASubText: string; AForward, ANext: Boolean): Boolean; - function GetDataBufferCount: Integer; - function GetDataRecordCount: Integer; - function GetExternalDataDisplayText(ARecordIndex: Integer; AField: TcxCustomDataField): string; override; - function GetExternalDataValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; override; - procedure LoadDataBuffer; override; - procedure UpdateGridMode; - // Master Detail - function GetDetailHasChildren(ARecordIndex: Integer; ARelationIndex: Integer): Boolean; override; - // Structure - function GetRecordIndex: Integer; override; - function GetValueDefReaderClass: TcxValueDefReaderClass; override; - property DataController: TcxDBDataController read GetDataController; - property DataLink: TcxDBDataLink read FDataLink; - property UpdatingRecordIndex: Integer read FUpdatingRecordIndex; - public - constructor Create(ADataController: TcxCustomDataController); override; - destructor Destroy; override; - function IsCanInitEditingBusy: Boolean; - function IsDataSetBusy: Boolean; - function IsDetailDataSetBusy: Boolean; - function IsOtherDataControllerUpdating: Boolean; - function IsOtherDetailDataSetInInsert: Boolean; - function IsOtherDetailChanged: Boolean; - function IsUniDirectional: Boolean; - property DataSet: TDataSet read GetDataSet; - property DataSource: TDataSource read GetDataSource write SetDataSource; - property IsDataSetCurrent: Boolean read GetIsDataSetCurrent write SetIsDataSetCurrent; - property IsSmartRefresh: Boolean read GetIsSmartRefresh; - end; - - TcxValueDefDBReader = class(TcxValueDefReader) - public - function GetDisplayText(AValueDef: TcxValueDef): string; override; - function GetValue(AValueDef: TcxValueDef): Variant; override; - function IsInternal(AValueDef: TcxValueDef): Boolean; override; - end; - - { TcxDBDataField } - - TcxDBDataField = class(TcxCustomDataField) - private - FField: TField; - FFieldName: string; - FFields: TList; - FIsCurrency: Boolean; - FParentField: TcxDBDataField; - function GetDataController: TcxDBDataController; - function GetField: TField; - function GetFieldItem(Index: Integer): TcxDBDataField; - function GetFieldCount: Integer; - function GetIsLookup: Boolean; - function GetProvider: TcxDBDataProvider; - procedure SetField(Value: TField); - protected - procedure AddField(ADataField: TcxDBDataField); - procedure ClearFields; - procedure DoPropertiesChanged; - procedure Reassign(ASource: TcxCustomDataField); override; - procedure RemoveField(ADataField: TcxDBDataField); - procedure RemoveNotification(AComponent: TComponent); override; - procedure SetPropertiesByField(AField: TField; AFieldChanged: Boolean); - property DataController: TcxDBDataController read GetDataController; - property Field: TField read GetField write SetField; - property FieldCount: Integer read GetFieldCount; - property FieldName: string read FFieldName write FFieldName; - property Fields[Index: Integer]: TcxDBDataField read GetFieldItem; default; - property IsCurrency: Boolean read FIsCurrency; - property IsLookup: Boolean read GetIsLookup; - property ParentField: TcxDBDataField read FParentField; - property Provider: TcxDBDataProvider read GetProvider; - public - destructor Destroy; override; - function CanModify(AEditValueSource: TcxDataEditValueSource): Boolean; override; - function IsUnbound: Boolean; override; - function IsValueDefInternal: Boolean; override; - end; - - { TcxDBDataRelation } - - TcxDBDataRelation = class(TcxCustomDataRelation) - private - FMasterKeyField: TcxDBDataField; - function GetDataController: TcxDBDataController; - function GetDetailKeyFieldNames: string; - function GetMasterKeyFieldNames: string; - protected - procedure GetMasterKeyFields(AList: TList); - function IsLinked: Boolean; virtual; - procedure RemoveDataField(ADataField: TcxCustomDataField); override; - procedure RemoveMasterKeyField; - procedure UpdateMasterDetailKeyFieldNames; - public - destructor Destroy; override; - function GetMasterRecordID(ARecordIndex: Integer): Variant; - property DataController: TcxDBDataController read GetDataController; - property DetailKeyFieldNames: string read GetDetailKeyFieldNames; - property MasterKeyFieldNames: string read GetMasterKeyFieldNames; - end; - - { DB Filter } - - TcxDBDataFilterCriteriaItem = class(TcxDataFilterCriteriaItem) - private - function GetDataController: TcxDBDataController; - function GetDBField: TcxDBDataField; - protected - function GetFilterOperatorClass: TcxFilterOperatorClass; override; - public - property DataController: TcxDBDataController read GetDataController; - property DBField: TcxDBDataField read GetDBField; - end; - - TcxDBDataFilterBeforeChangeEvent = procedure(Sender: TcxDBDataFilterCriteria; - ADataSet: TDataSet; const AFilterText: string) of object; - TcxDBDataFilterFormatFilterTextValueEvent = procedure(Sender: TcxDBDataFilterCriteria; - const AValue: Variant; var ADisplayValue: string) of object; - - TcxDBDataFilterCriteria = class(TcxDataFilterCriteria) - private - FAutoDataSetFilter: Boolean; - FIgnoreOrigin: Boolean; - FOnBeforeChange: TcxDBDataFilterBeforeChangeEvent; - FOnFormatFilterTextValue: TcxDBDataFilterFormatFilterTextValueEvent; - function GetDataController: TcxDBDataController; - procedure SetAutoDataSetFilter(Value: Boolean); - procedure SetIgnoreOrigin(Value: Boolean); - protected - procedure FormatFilterTextValue(AItem: TcxFilterCriteriaItem; const AValue: Variant; - var ADisplayValue: string); override; - function GetItemClass: TcxFilterCriteriaItemClass; override; - procedure Update; override; - public - constructor Create(ADataController: TcxCustomDataController); override; - procedure Assign(Source: TPersistent; AIgnoreItemNames: Boolean = False); override; - procedure AssignEvents(Source: TPersistent); override; - function IsAutoDataSetFilter: Boolean; - function IsFiltering: Boolean; override; - procedure RestoreDefaults; override; - property DataController: TcxDBDataController read GetDataController; - published - // TODO: add property CustomFiltering -> IsFiltering = False! - property AutoDataSetFilter: Boolean read FAutoDataSetFilter write SetAutoDataSetFilter default False; - property DateTimeFormat; - property IgnoreOrigin: Boolean read FIgnoreOrigin write SetIgnoreOrigin default True; - property TranslateBetween; - property TranslateIn; - property TranslateLike; - property SupportedLike; - property OnBeforeChange: TcxDBDataFilterBeforeChangeEvent read FOnBeforeChange write FOnBeforeChange; - property OnFormatFilterTextValue: TcxDBDataFilterFormatFilterTextValueEvent read FOnFormatFilterTextValue write FOnFormatFilterTextValue; - end; - - { DB Summary } - - TcxDBDataSummaryItem = class(TcxDataSummaryItem) - private - FDataField: TcxDBDataField; - FFieldName: string; - function GetDBDataController: TcxDBDataController; - procedure SetFieldName(const Value: string); - protected - function IsCurrency(AVarType: TVarType): Boolean; override; - public - procedure Assign(Source: TPersistent); override; - property DataController: TcxDBDataController read GetDBDataController; - function DataField: TcxCustomDataField; override; - published - property FieldName: string read FFieldName write SetFieldName; - end; - - { TcxDBDataModeController } - - TcxDBDataModeControllerDetailIsCurrentQueryEvent = function(Sender: TcxDBDataModeController; - ADataSet: TDataSet; const AMasterDetailKeyFieldNames: string; - const AMasterDetailKeyValues: Variant): Boolean of object; - - TcxDBDataModeControllerDetailFirstEvent = procedure(Sender: TcxDBDataModeController; - ADataSet: TDataSet; const AMasterDetailKeyFieldNames: string; - const AMasterDetailKeyValues: Variant; var AReopened: Boolean) of object; - - TcxDBDataModeController = class(TPersistent) - private - FDataController: TcxDBDataController; - FDetailInSQLMode: Boolean; - FDetailInSyncMode: Boolean; - FGridMode: Boolean; - FGridModeBufferCount: Integer; - FSmartRefresh: Boolean; - FSyncInsert: Boolean; - FSyncMode: Boolean; - FOnDetailFirst: TcxDBDataModeControllerDetailFirstEvent; - FOnDetailIsCurrentQuery: TcxDBDataModeControllerDetailIsCurrentQueryEvent; - procedure SetGridMode(Value: Boolean); - procedure SetGridModeBufferCount(Value: Integer); - procedure SetSmartRefresh(Value: Boolean); - procedure SetSyncMode(Value: Boolean); - protected - function DetailIsCurrentQuery(const AMasterDetailKeyFieldNames: string; const AMasterDetailKeyValues: Variant): Boolean; virtual; - procedure DoDetailFirst(const AMasterDetailKeyFieldNames: string; const AMasterDetailKeyValues: Variant; var AReopened: Boolean); virtual; - property DetailInSyncMode: Boolean read FDetailInSyncMode write FDetailInSyncMode default True; - public - constructor Create(ADataController: TcxDBDataController); - procedure Assign(Source: TPersistent); override; - property DataController: TcxDBDataController read FDataController; - property SyncInsert: Boolean read FSyncInsert write FSyncInsert default True; - published - property DetailInSQLMode: Boolean read FDetailInSQLMode write FDetailInSQLMode default False; - property GridMode: Boolean read FGridMode write SetGridMode default False; - property GridModeBufferCount: Integer read FGridModeBufferCount write SetGridModeBufferCount default 0; - property SmartRefresh: Boolean read FSmartRefresh write SetSmartRefresh default False; - property SyncMode: Boolean read FSyncMode write SetSyncMode default True; - property OnDetailFirst: TcxDBDataModeControllerDetailFirstEvent read FOnDetailFirst write FOnDetailFirst; - property OnDetailIsCurrentQuery: TcxDBDataModeControllerDetailIsCurrentQueryEvent read FOnDetailIsCurrentQuery write FOnDetailIsCurrentQuery; - end; - - { TcxBookmarkList } - -{$IFDEF DELPHI12} - TcxBookmarkList = class - private - FItems: array of TcxBookmark; - function GetCount: Integer; - function GetItem(AIndex: Integer): TcxBookmark; - public - constructor Create; - destructor Destroy; override; - procedure Clear; - procedure Add(AItem: TcxBookmark); - procedure Insert(AIndex: Integer; AItem: TcxBookmark); - procedure Delete(AIndex: Integer); - - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxBookmark read GetItem; default; - end; -{$ELSE} - TcxBookmarkList = class(TStringList); -{$ENDIF} - - { TcxDBDataSelection } - - TcxDBDataSelection = class(TcxDataSelection) - private - FAnchorBookmark: TcxBookmark; - FBookmarks: TcxBookmarkList; - FInSelectAll: Boolean; - function GetDataController: TcxDBDataController; - protected - procedure ClearAnchor; override; - function CompareBookmarks(const AItem1, AItem2: TcxBookmark): Integer; - procedure InternalAdd(AIndex, ARowIndex, ARecordIndex, ALevel: Integer); override; - procedure InternalClear; override; - procedure InternalDelete(AIndex: Integer); override; - function FindBookmark(const ABookmark: TcxBookmark; var AIndex: Integer): Boolean; - function GetRowBookmark(ARowIndex: Integer): TcxBookmark; - function RefreshBookmarks: Boolean; - procedure SyncCount; - public - constructor Create(ADataController: TcxCustomDataController); override; - destructor Destroy; override; - function FindByRowIndex(ARowIndex: Integer; var AIndex: Integer): Boolean; override; - procedure SelectAll; - procedure SelectFromAnchor(AToBookmark: TcxBookmark; AKeepSelection: Boolean); - property DataController: TcxDBDataController read GetDataController; - end; - - { TcxDBDataController } - - TcxDBDataDetailHasChildrenEvent = procedure(Sender: TcxDBDataController; - ARecordIndex, ARelationIndex: Integer; const AMasterDetailKeyFieldNames: string; - const AMasterDetailKeyValues: Variant; var HasChildren: Boolean) of object; - - TcxDBDataController = class(TcxCustomDataController) - private - FBookmark: TcxBookmark; - FCreatedDataController: TcxCustomDataController; - FDataModeController: TcxDBDataModeController; - FDetailKeyFieldNames: string; - FInCheckBrowseMode: Boolean; - FInCheckCurrentQuery: Boolean; - FInResetDataSetCurrent: Boolean; - FInUnboundCopy: Boolean; - FInUpdateGridModeBufferCount: Boolean; - FKeyField: TcxDBDataField; - FKeyFieldNames: string; - FLoaded: Boolean; - FMasterDetailKeyFields: TList; - FMasterDetailKeyValues: Variant; - FMasterKeyFieldNames: string; - FResetDBFields: Boolean; - FUpdateDataSetPos: Boolean; - FOnDetailHasChildren: TcxDBDataDetailHasChildrenEvent; - function AddInternalDBField: TcxDBDataField; - function GetDataSet: TDataSet; - function GetDataSetRecordCount: Integer; - function GetDataSource: TDataSource; - function GetDBField(Index: Integer): TcxDBDataField; - function GetDBSelection: TcxDBDataSelection; - function GetFilter: TcxDBDataFilterCriteria; - function GetMasterDetailKeyFieldNames: string; - function GetMasterDetailKeyFields: TList; - function GetProvider: TcxDBDataProvider; - function GetRecNo: Integer; - procedure MasterDetailKeyFieldsRemoveNotification(AComponent: TComponent); - procedure RemoveKeyField; - procedure SetDataModeController(Value: TcxDBDataModeController); - procedure SetDataSource(Value: TDataSource); - procedure SetDetailKeyFieldNames(const Value: string); - procedure SetFilter(Value: TcxDBDataFilterCriteria); - procedure SetKeyFieldNames(const Value: string); - procedure SetMasterKeyFieldNames(const Value: string); - procedure SetRecNo(Value: Integer); - procedure SyncDataSetPos; - function SyncMasterDetail: TcxCustomDataController; - procedure SyncMasterDetailDataSetPos; - procedure UpdateRelationFields; - protected - procedure ActiveChanged(AActive: Boolean); override; - function CanChangeDetailExpanding(ARecordIndex: Integer; AExpanded: Boolean): Boolean; override; - function CanFocusRecord(ARecordIndex: Integer): Boolean; override; - procedure CheckDataSetCurrent; override; - function CheckMasterBrowseMode: Boolean; override; - procedure ClearMasterDetailKeyFields; - procedure CorrectAfterDelete(ARecordIndex: Integer); override; - procedure DoDataSetCurrentChanged(AIsCurrent: Boolean); virtual; - procedure DoDataSourceChanged; virtual; - procedure DoInitInsertingRecord(AInsertingRecordIndex: Integer); virtual; - function DoSearchInGridMode(const ASubText: string; AForward, ANext: Boolean): Boolean; override; - function FindRecordIndexInGridMode(const AKeyFieldValues: Variant): Integer; - function GetActiveRecordIndex: Integer; override; - function GetDataProviderClass: TcxCustomDataProviderClass; override; - function GetDataSelectionClass: TcxDataSelectionClass; override; - function GetDefaultGridModeBufferCount: Integer; virtual; - function GetFieldClass: TcxCustomDataFieldClass; override; - function GetFilterCriteriaClass: TcxDataFilterCriteriaClass; override; - procedure GetKeyFields(AList: TList); override; - function GetRelationClass: TcxCustomDataRelationClass; override; - function GetSummaryItemClass: TcxDataSummaryItemClass; override; - function InternalCheckBookmark(ADeletedRecordIndex: Integer): Boolean; override; - procedure InternalClearBookmark; override; - procedure InternalGotoBookmark; override; - function InternalSaveBookmark: Boolean; override; - procedure InvalidateDataBuffer; virtual; - function IsDataField(AField: TcxCustomDataField): Boolean; override; - function IsKeyNavigation: Boolean; override; - function IsOtherDetailChanged: Boolean; - function IsOtherDetailCreating: Boolean; - function IsProviderDataSource: Boolean; override; - function IsSmartRefresh: Boolean; override; - procedure LoadStorage; override; - function LocateRecordIndex(AGetFieldsProc: TGetListProc): Integer; virtual; - function LockOnAfterSummary: Boolean; override; - procedure NotifyDataControllers; override; - procedure NotifyDetailAfterFieldsRecreating(ADataController: TcxCustomDataController); - procedure NotifyDetailsAfterFieldsRecreating(ACreatingLinkObject: Boolean); - procedure PrepareField(AField: TcxCustomDataField); override; - procedure RemoveNotification(AComponent: TComponent); override; - procedure ResetDataSetCurrent(ADataController: TcxCustomDataController); - procedure ResetDBFields; - procedure RestructData; override; - procedure ResyncDBFields; - procedure RetrieveField(ADataField: TcxDBDataField; AIsLookupKeyOnly: Boolean); - function TryFocusRecord(ARecordIndex: Integer): Boolean; virtual; - procedure UpdateEditingRecord; - procedure UpdateField(ADataField: TcxDBDataField; const AFieldNames: string; AIsLookup: Boolean); - procedure UpdateFields; override; - procedure UpdateFocused; override; - procedure UpdateInternalKeyFields(const AFieldNames: string; var AField: TcxDBDataField); - procedure UpdateLookupFields; - procedure UpdateRelations(ARelation: TcxCustomDataRelation); override; - procedure UpdateScrollBars; virtual; - // Locate - procedure BeginReadRecord; override; - procedure EndReadRecord; override; - - property DBFields[Index: Integer]: TcxDBDataField read GetDBField; - property DBSelection: TcxDBDataSelection read GetDBSelection; - property KeyField: TcxDBDataField read FKeyField; - property MasterDetailKeyFieldNames: string read GetMasterDetailKeyFieldNames; - property MasterDetailKeyFields: TList read GetMasterDetailKeyFields; - property MasterDetailKeyValues: Variant read FMasterDetailKeyValues; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - // Actions - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - // Structure - procedure ChangeFieldName(AItemIndex: Integer; const AFieldName: string); - procedure ChangeValueTypeClass(AItemIndex: Integer; AValueTypeClass: TcxValueTypeClass); override; - function GetItemByFieldName(const AFieldName: string): TObject; - function GetItemField(AItemIndex: Integer): TField; - function GetItemFieldName(AItemIndex: Integer): string; - function IsDisplayFormatDefined(AItemIndex: Integer; AIgnoreSimpleCurrency: Boolean): Boolean; override; - procedure Loaded; override; - // Data - procedure BeginLocate; - procedure EndLocate; - procedure DoUpdateRecord(ARecordIndex: Integer); - function GetGroupValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; override; - procedure GetKeyDBFields(AList: TList); - function GetKeyFieldsValues: Variant; - function GetRecordId(ARecordIndex: Integer): Variant; override; - procedure UpdateGridModeBufferCount; - // Data Editing - procedure CheckBrowseMode; override; - function DataChangedNotifyLocked: Boolean; override; - procedure RefreshExternalData; override; - // Navigation - procedure SetFocus; override; - // Bookmark - function IsBookmarkAvailable: Boolean; override; - function IsBookmarkRow(ARowIndex: Integer): Boolean; override; - // Filter - function GetFilterDataValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; override; - function GetFilterItemFieldName(AItem: TObject): string; override; - // Search - function FindRecordIndexByKey(const AKeyFieldValues: Variant): Integer; - function LocateByKey(const AKeyFieldValues: Variant): Boolean; - // Master-Detail - procedure CheckCurrentQuery; - function GetDetailFilterAdapter: TcxDBProviderDetailFilterAdapter; virtual; - procedure SetMasterRelation(AMasterRelation: TcxCustomDataRelation; AMasterRecordIndex: Integer); override; - // MultiSelect in GridMode - function GetRowId(ARowIndex: Integer): Variant; override; - function GetSelectedBookmark(Index: Integer): TcxBookmark; - function GetSelectedRowIndex(Index: Integer): Integer; override; - function GetSelectionAnchorBookmark: TcxBookmark; - function GetSelectionAnchorRowIndex: Integer; override; - function IsSelectionAnchorExist: Boolean; override; - procedure SelectAll; override; - procedure SelectFromAnchor(ARowIndex: Integer; AKeepSelection: Boolean); override; - procedure SetSelectionAnchor(ARowIndex: Integer); override; - // Export - function FocusSelectedRow(ASelectedIndex: Integer): Boolean; override; - // View Data - procedure ForEachRow(ASelectedRows: Boolean; AProc: TcxDataControllerEachRowProc); override; - function IsSequenced: Boolean; - - property DataModeController: TcxDBDataModeController read FDataModeController write SetDataModeController; - property DataSet: TDataSet read GetDataSet; - property DataSource: TDataSource read GetDataSource write SetDataSource; - property DetailKeyFieldNames: string read FDetailKeyFieldNames write SetDetailKeyFieldNames; - property Filter: TcxDBDataFilterCriteria read GetFilter write SetFilter; - property KeyFieldNames: string read FKeyFieldNames write SetKeyFieldNames; - property MasterKeyFieldNames: string read FMasterKeyFieldNames write SetMasterKeyFieldNames; - property Provider: TcxDBDataProvider read GetProvider; - property RecNo: Integer read GetRecNo write SetRecNo; // Sequenced - property DataSetRecordCount: Integer read GetDataSetRecordCount; // Sequenced - property OnDetailHasChildren: TcxDBDataDetailHasChildrenEvent read FOnDetailHasChildren write FOnDetailHasChildren; - end; - -var - cxDetailFilterControllers: TcxDBAdapterList; - -function CanCallDataSetLocate(ADataSet: TDataSet; const AKeyFieldNames: string; - const AValue: Variant): Boolean; -function GetValueTypeClassByField(AField: TField): TcxValueTypeClass; - -implementation - -uses -{$IFDEF DELPHI9} - Windows, -{$ENDIF} - TypInfo, RTLConsts, Contnrs, cxDataConsts; - -type - TDataSetAccess = class(TDataSet); - -var - DBDataProviders: TList; - -procedure GetInternalKeyFields(ADataField: TcxDBDataField; AList: TList); -var - I: Integer; -begin - if Assigned(ADataField) then - begin - if ADataField.FieldCount = 0 then - AList.Add(ADataField) - else - for I := 0 to ADataField.FieldCount - 1 do - AList.Add(ADataField.Fields[I]); - end; -end; - -function CanCallDataSetLocate(ADataSet: TDataSet; const AKeyFieldNames: string; - const AValue: Variant): Boolean; - - function TryGetFieldList(ADataSet: TDataSet; - const AFieldNames: WideString; AList: TList): Boolean; - var - AField: TField; - APos: Integer; - begin - Result := True; - APos := 1; - while APos <= Length(AFieldNames) do - begin - AField := ADataSet.FindField(ExtractFieldName(AFieldNames, APos)); - Result := AField <> nil; - if not Result then - Break; - AList.Add(AField); - end; - end; - - function IsNullValidToLocate(AField: TField): Boolean; - begin - Result := not (AField is TAutoIncField); - end; - -var - AArrayLowBound, I: Integer; - AField: TField; - AFieldList: TObjectList; -begin - if VarIsArray(AValue) then - begin - AFieldList := TObjectList.Create(False); - try - AArrayLowBound := VarArrayLowBound(AValue, 1); - Result := TryGetFieldList(ADataSet, AKeyFieldNames, AFieldList) and - (AFieldList.Count = VarArrayHighBound(AValue, 1) - AArrayLowBound + 1); - if Result then - for I := 0 to AFieldList.Count - 1 do - begin - Result := not VarIsNull(AValue[I + AArrayLowBound]) or - IsNullValidToLocate(TField(AFieldList[I])); - if not Result then - Break; - end; - finally - AFieldList.Free; - end; - end - else - begin - AField := nil; - if Pos(';', AKeyFieldNames) = 0 then - AField := ADataSet.FindField(AKeyFieldNames); - Result := (AField <> nil) and (not VarIsNull(AValue) or - IsNullValidToLocate(AField)); - end; -end; - -function GetValueTypeClassByField(AField: TField): TcxValueTypeClass; -begin - if AField = nil then - Result := TcxStringValueType - else - begin - case AField.DataType of - ftString: - Result := TcxStringValueType; - ftWideString: - Result := TcxWideStringValueType; - ftSmallint: - Result := TcxSmallintValueType; - ftInteger, ftAutoInc: - Result := TcxIntegerValueType; - ftWord: - Result := TcxWordValueType; - ftBoolean: - Result := TcxBooleanValueType; - ftCurrency, ftFloat: - Result := TcxFloatValueType; - {ftCurrency, }ftBCD: - Result := TcxCurrencyValueType; - ftDate, ftTime, ftDateTime: - Result := TcxDateTimeValueType; - {$IFDEF DELPHI6} - ftFMTBcd: - Result := TcxFMTBcdValueType; - ftLargeint: - Result := TcxLargeIntValueType; - ftTimeStamp: - Result := TcxSQLTimeStampValueType; - {$ENDIF} - else - Result := TcxVariantValueType; - end; - end; -end; - -{$IFNDEF DELPHI5} - -function IsPublishedProp(Instance: TObject; const PropName: string): Boolean; -begin - Result := GetPropInfo(Instance.ClassInfo, PropName) <> nil; -end; - -function GetObjectProp(Instance: TObject; const PropName: string): TObject; -var - PropInfo: PPropInfo; -begin - Result := nil; - PropInfo := TypInfo.GetPropInfo(Instance.ClassInfo, PropName); - if (PropInfo <> nil) and (PropInfo^.PropType^.Kind = tkClass) then - Result := TObject(GetOrdProp(Instance, PropInfo)); -end; - -{$ENDIF} - -{ TcxDBProviderDetailFilterAdapter } - -function TcxDBProviderDetailFilterAdapter.IsCurrentQuery(ADataSet: TDataSet; - const AParamNames: string; const AParamValues: Variant): Boolean; -var - AParams: TParams; -begin - Result := False; - if IsPublishedProp(ADataSet, 'Params') then - begin - AParams := GetObjectProp(ADataSet, 'Params') as TParams; - if AParams <> nil then - begin - if VarEquals(AParams.ParamValues[AParamNames], AParamValues) then - Result := True; - end; - end; -end; - -procedure TcxDBProviderDetailFilterAdapter.ReopenSQL(ADataSet: TDataSet; - const AParamNames: string; const AParamValues: Variant; var AReopened: Boolean); -var - AParams: TParams; -begin - if IsPublishedProp(ADataSet, 'Params') then - begin - AParams := GetObjectProp(ADataSet, 'Params') as TParams; - if AParams <> nil then - begin - if VarEquals(AParams.ParamValues[AParamNames], AParamValues) then - ADataSet.First // TODO: Update method - for Query with Post - else - begin - ADataSet.DisableControls; - try - ADataSet.Active := False; - AParams.ParamValues[AParamNames] := AParamValues; - ADataSet.Active := True; - finally - ADataSet.EnableControls; - end; - AReopened := True; // set Flag if Query reopened - end; - end; - end; -end; - -procedure TcxDBProviderDetailFilterAdapter.SetFilter(ADataSet: TDataSet; - const AMasterDetailKeyFieldNames: string; const AMasterDetailKeyValues: Variant; - AIsSQLMode: Boolean; var AReopened: Boolean); -begin - if AIsSQLMode then - ReopenSQL(ADataSet, AMasterDetailKeyFieldNames, AMasterDetailKeyValues, AReopened) - else - ADataSet.Locate(AMasterDetailKeyFieldNames, AMasterDetailKeyValues, []); // must be sort by Detail Keys -end; - -{ TcxDBDataModeController } - -constructor TcxDBDataModeController.Create(ADataController: TcxDBDataController); -begin - inherited Create; - FDetailInSyncMode := True; - FDataController := ADataController; - FGridModeBufferCount := 0; - FSyncInsert := True; - FSyncMode := True; -end; - -procedure TcxDBDataModeController.Assign(Source: TPersistent); -begin - if Source is TcxDBDataModeController then - begin - DetailInSQLMode := TcxDBDataModeController(Source).DetailInSQLMode; - DetailInSyncMode := TcxDBDataModeController(Source).DetailInSyncMode; - GridMode := TcxDBDataModeController(Source).GridMode; - GridModeBufferCount := TcxDBDataModeController(Source).GridModeBufferCount; - SmartRefresh := TcxDBDataModeController(Source).SmartRefresh; - SyncInsert := TcxDBDataModeController(Source).SyncInsert; - SyncMode := TcxDBDataModeController(Source).SyncMode; - OnDetailFirst := TcxDBDataModeController(Source).OnDetailFirst; - OnDetailIsCurrentQuery := TcxDBDataModeController(Source).OnDetailIsCurrentQuery; - end - else - inherited Assign(Source); -end; - -function TcxDBDataModeController.DetailIsCurrentQuery(const AMasterDetailKeyFieldNames: string; - const AMasterDetailKeyValues: Variant): Boolean; -var - ADetailFilterAdapter: TcxDBProviderDetailFilterAdapter; -begin - if Assigned(FOnDetailIsCurrentQuery) then - Result := FOnDetailIsCurrentQuery(Self, DataController.DataSet, - AMasterDetailKeyFieldNames, AMasterDetailKeyValues) - else - begin - ADetailFilterAdapter := DataController.GetDetailFilterAdapter; - Result := ADetailFilterAdapter.IsCurrentQuery(DataController.DataSet, - AMasterDetailKeyFieldNames, AMasterDetailKeyValues); - end; -end; - -procedure TcxDBDataModeController.DoDetailFirst(const AMasterDetailKeyFieldNames: string; - const AMasterDetailKeyValues: Variant; var AReopened: Boolean); -var - ADetailFilterAdapter: TcxDBProviderDetailFilterAdapter; -begin - AReopened := False; - if Assigned(FOnDetailFirst) then - FOnDetailFirst(Self, DataController.DataSet, AMasterDetailKeyFieldNames, - AMasterDetailKeyValues, AReopened) - else - begin - ADetailFilterAdapter := DataController.GetDetailFilterAdapter; - ADetailFilterAdapter.SetFilter(DataController.DataSet, AMasterDetailKeyFieldNames, - AMasterDetailKeyValues, DetailInSQLMode, AReopened); - end; -end; - -procedure TcxDBDataModeController.SetGridMode(Value: Boolean); -var - APrevGridMode: Boolean; -begin - APrevGridMode := DataController.IsGridMode; - if FGridMode <> Value then - begin - FGridMode := Value; - if DataController.IsGridMode <> APrevGridMode then - DataController.RestructData; - end; -end; - -procedure TcxDBDataModeController.SetGridModeBufferCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FGridModeBufferCount <> Value then - begin - FGridModeBufferCount := Value; - DataController.UpdateGridModeBufferCount; - end; -end; - -procedure TcxDBDataModeController.SetSmartRefresh(Value: Boolean); -begin - if FSmartRefresh <> Value then - begin - FSmartRefresh := Value; - if not DataController.Provider.IsGridMode then - DataController.Provider.DataScrolled(0); - end; -end; - -procedure TcxDBDataModeController.SetSyncMode(Value: Boolean); -begin - if FSyncMode <> Value then - begin - FSyncMode := Value; - if DataController.Provider.IsActive then - DataController.Provider.DataScrolled(0); - end; -end; - -{$IFDEF DELPHI12} - -{ TcxBookmarkList } - -constructor TcxBookmarkList.Create; -begin - inherited Create; - SetLength(FItems, 0); -end; - -destructor TcxBookmarkList.Destroy; -begin - Clear; - inherited Destroy; -end; - -procedure TcxBookmarkList.Add(AItem: TcxBookmark); -begin - Insert(Count, AItem); -end; - -procedure TcxBookmarkList.Clear; -begin - if Length(FItems) = 0 then Exit; - SetLength(FItems, 0); -end; - -procedure TcxBookmarkList.Delete(AIndex: Integer); -begin - if (AIndex < 0) or (AIndex >= Count) then - raise EListError.Create(SListIndexError); - FItems[AIndex] := nil; - if AIndex < Count - 1 then - begin - System.Move(FItems[AIndex + 1], FItems[AIndex], - (Count - AIndex - 1) * SizeOf(Pointer)); - PPointer(@FItems[Count - 1])^ := nil; - end; - SetLength(FItems, Count - 1); -end; - -function TcxBookmarkList.GetCount: Integer; -begin - Result := Length(FItems); -end; - -function TcxBookmarkList.GetItem(AIndex: Integer): TcxBookmark; -begin - Result := FItems[AIndex]; -end; - -procedure TcxBookmarkList.Insert(AIndex: Integer; AItem: TcxBookmark); -begin - if (AIndex < 0) or (AIndex > Count) then - raise EListError.Create(SListIndexError); - SetLength(FItems, Count + 1); - if AIndex < Count - 1 then - begin - Move(FItems[AIndex], FItems[AIndex + 1], - (Count - AIndex - 1) * SizeOf(Pointer)); - PPointer(@FItems[AIndex])^ := nil; - end; - FItems[AIndex] := AItem; -end; -{$ENDIF} - -{ TcxDBDataSelection } - -constructor TcxDBDataSelection.Create(ADataController: TcxCustomDataController); -begin - inherited Create(ADataController); - FBookmarks := TcxBookmarkList.Create; -end; - -destructor TcxDBDataSelection.Destroy; -begin - FBookmarks.Free; - FBookmarks := nil; - inherited Destroy; -end; - -function TcxDBDataSelection.FindByRowIndex(ARowIndex: Integer; var AIndex: Integer): Boolean; -begin - if DataController.IsGridMode then - Result := FindBookmark(GetRowBookmark(ARowIndex), AIndex) - else - Result := inherited FindByRowIndex(ARowIndex, AIndex); -end; - -procedure TcxDBDataSelection.SelectAll; -begin - if DataController.IsGridMode and Assigned(DataController.DataSet) then - begin - with DataController.Provider do - begin - Freeze; - try - SavePos; - First; - InternalClear; - try - while not IsEOF do - begin - if DataController.CanSelectRow(-1) then - FBookmarks.Add(DataSet.Bookmark); - Next; - end; - SyncCount; - except - FBookmarks.Clear; - SyncCount; - raise; - end; - RestorePos; - finally - Unfreeze; - Changed; - DataController.DataControllerInfo.CheckChanges; - DataController.SyncMasterPos; - end; - end; - end; -end; - -procedure TcxDBDataSelection.SelectFromAnchor(AToBookmark: TcxBookmark; AKeepSelection: Boolean); - - function CheckBookmarks(const ABkm1, ABkm2: TcxBookmark; ADirectionDown: Boolean): Boolean; - begin - Result := False; - if AKeepSelection or (FBookmarks.Count = 0) then Exit; - with DataController.Provider do - begin - if CompareBookmarks(ABkm1, ABkm2) = 0 then - begin - FBookmarks.Clear; - if DataController.CanSelectRow(-1) then - FBookmarks.Add(ABkm1); - Result := True; - end - else - if ADirectionDown then - begin - if (FBookmarks.Count > 1) and - (CompareBookmarks(FBookmarks[FBookmarks.Count - 2], ABkm2) = 0) then // dec last - begin - if CompareBookmarks(FBookmarks[0], ABkm1) = 0 then - begin - FBookmarks.Delete(FBookmarks.Count - 1); - Result := True; - end; - end - else - begin - DataSet.Bookmark := ABkm2; - DataSet.Prior; - if CompareBookmarks(FBookmarks[FBookmarks.Count - 1], DataSet.Bookmark) = 0 then // inc - begin - if CompareBookmarks(FBookmarks[0], ABkm1) = 0 then - begin - DataSet.Bookmark := ABkm2; // for OnCanSelectRow event - if DataController.CanSelectRow(-1) then - FBookmarks.Add(ABkm2); - Result := True; - end; - end; - end; - end - else - begin - if (FBookmarks.Count > 1) and - (CompareBookmarks(FBookmarks[1], ABkm1) = 0) then // dec top - begin - if CompareBookmarks(FBookmarks[FBookmarks.Count - 1], ABkm2) = 0 then - begin - FBookmarks.Delete(0); - Result := True; - end; - end - else - begin - DataSet.Bookmark := ABkm1; - DataSet.Next; - if CompareBookmarks(FBookmarks[0], DataSet.Bookmark) = 0 then // inc - begin - if CompareBookmarks(FBookmarks[FBookmarks.Count - 1], ABkm2) = 0 then - begin - DataSet.Bookmark := ABkm1; // for OnCanSelectRow event - if DataController.CanSelectRow(-1) then - FBookmarks.Insert(0, ABkm1); - Result := True; - end; - end; - end; - end; - end; - end; - - procedure LoadBookmarks(const ABkm1, ABkm2: TcxBookmark); - var - ABkm: TcxBookmark; - ACheckNeeded, AFound: Boolean; - I, C, AIndex1, AIndex2: Integer; - begin - with DataController.Provider do - begin - if not AKeepSelection then - FBookmarks.Clear; - try - ACheckNeeded := FBookmarks.Count > 0; - if ACheckNeeded then - begin - FindBookmark(ABkm1, AIndex1); - FindBookmark(ABkm2, AIndex2); - if AIndex1 = FBookmarks.Count then - ACheckNeeded := False; - end; - DataSet.Bookmark := ABkm1; - while not IsEOF do - begin - ABkm := DataSet.Bookmark; - if ACheckNeeded then - begin - AFound := False; - for I := AIndex1 to AIndex2 do - begin - if I >= FBookmarks.Count then - Break; - C := -CompareBookmarks(FBookmarks[I], ABkm); - if C < 0 then - begin - if DataController.CanSelectRow(-1) then - FBookmarks.Insert(I, ABkm); - Inc(AIndex1); - Inc(AIndex2); - AFound := True; - Break; - end - else - if C = 0 then - begin - Inc(AIndex1); - AFound := True; - Break; - end; - end; - if not AFound then - begin - if DataController.CanSelectRow(-1) then - FBookmarks.Add(ABkm); - end; - end - else - begin - if DataController.CanSelectRow(-1) then - FBookmarks.Add(ABkm); - end; - if CompareBookmarks(ABkm, ABkm2) = 0 then - Break; - Next; - end; - except - FBookmarks.Clear; - SyncCount; - raise; - end; - end; - end; - -var - ABkm1, ABkm2: TcxBookmark; - ADirectionDown: Boolean; -begin - // TODO: optimize - Do Selection (up/down) - if DataController.IsGridMode and Assigned(DataController.DataSet) then - begin - with DataController.Provider do - begin - if (DataSet.State = dsInsert) and DataSet.Eof then - Exit; - Freeze; - try - SavePos; - ABkm1 := FAnchorBookmark; - ABkm2 := AToBookmark; - ADirectionDown := CompareBookmarks(ABkm1, ABkm2) < 0; - if not ADirectionDown then - begin - ABkm2 := FAnchorBookmark; - ABkm1 := AToBookmark; - end; - // check - select shift + up/down - if not CheckBookmarks(ABkm1, ABkm2, ADirectionDown) then - LoadBookmarks(ABkm1, ABkm2); - SyncCount; - RestorePos; - finally - Unfreeze; - Changed; - DataController.DataControllerInfo.CheckChanges; - DataController.SyncMasterPos; - end; - end; - end; -end; - -procedure TcxDBDataSelection.ClearAnchor; -begin - inherited ClearAnchor; - SetLength(FAnchorBookmark, 0); -end; - -function TcxDBDataSelection.CompareBookmarks(const AItem1, AItem2: TcxBookmark): Integer; -begin - Result := DataController.Provider.CompareBookmarks(AItem1, AItem2); -end; - -procedure TcxDBDataSelection.InternalAdd(AIndex, ARowIndex, ARecordIndex, ALevel: Integer); -begin - inherited InternalAdd(AIndex, ARowIndex, ARecordIndex, ALevel); - if not DataController.IsGridMode or FInSelectAll then Exit; - FBookmarks.Insert(AIndex, GetRowBookmark(ARowIndex)); -end; - -procedure TcxDBDataSelection.InternalClear; -begin - inherited InternalClear; - if FBookmarks <> nil then - FBookmarks.Clear; -end; - -procedure TcxDBDataSelection.InternalDelete(AIndex: Integer); -begin - inherited InternalDelete(AIndex); - if not DataController.IsGridMode or FInSelectAll then Exit; - if CompareBookmarks(FBookmarks[AIndex], FAnchorBookmark) = 0 then - ClearAnchor; - FBookmarks.Delete(AIndex); -end; - -function TcxDBDataSelection.FindBookmark(const ABookmark: TcxBookmark; var AIndex: Integer): Boolean; -var - L, H, I, C: Integer; -begin - AIndex := 0; - Result := False; - L := 0; - H := FBookmarks.Count - 1; - if L <= H then - repeat - I := (L + H) div 2; - C := CompareBookmarks(FBookmarks[I], ABookmark); - if C = 0 then - begin - AIndex := I; - Result := True; - Break; - end - else - if C < 0 then - L := I + 1 - else - H := I - 1; - if L > H then - begin - AIndex := L; - Break; - end; - until False; -end; - -function TcxDBDataSelection.GetRowBookmark(ARowIndex: Integer): TcxBookmark; -var - APrevActiveRecord: Integer; -begin - SetLength(Result, 0); - if not DataController.IsGridMode then Exit; - APrevActiveRecord := DataController.Provider.DataLink.ActiveRecord; - try - DataController.Provider.DataLink.ActiveRecord := ARowIndex; - Result := DataController.DataSet.Bookmark; - finally - DataController.Provider.DataLink.ActiveRecord := APrevActiveRecord; - end; -end; - -function TcxDBDataSelection.RefreshBookmarks: Boolean; -var - I: Integer; - ADataSet: TDataSet; -begin - Result := False; - if not DataController.IsGridMode then Exit; - ADataSet := DataController.DataSet; - if Assigned(ADataSet) then - begin - if (Length(FAnchorBookmark) <> 0) and - not DataController.Provider.BookmarkValid(FAnchorBookmark) then - begin - Result := True; - ClearAnchor; - end; - for I := Count - 1 downto 0 do - if (Length(FBookmarks[I]) = 0) or - not DataController.Provider.BookmarkValid(FBookmarks[I]) then - begin - Result := True; - Delete(I); - end; - end; -end; - -procedure TcxDBDataSelection.SyncCount; -begin - FInSelectAll := True; - try - SetInternalCount(FBookmarks.Count); - finally - FInSelectAll := False; - end; -end; - -function TcxDBDataSelection.GetDataController: TcxDBDataController; -begin - Result := inherited DataController as TcxDBDataController; -end; - -{ TcxDBDataLink } - -constructor TcxDBDataLink.Create(AProvider: TcxDBDataProvider); -begin - inherited Create; - FProvider := AProvider; - VisualControl := True; -end; - -procedure TcxDBDataLink.ActiveChanged; -begin - Provider.ActiveChanging := True; - try - Provider.ActiveChanged(Active); - if Provider.DataController.IsLoading then - Provider.DataController.FLoaded := True; - finally - Provider.ActiveChanging := False; - end; - Provider.FInSetDataSource := Assigned(DataSet) and (DataSet.State = dsInsert); -{$IFDEF DELPHI7} - if not Active then - FLayoutChangedFlag := False; -{$ENDIF} -end; - -{$IFDEF DELPHI7} -procedure TcxDBDataLink.DataEvent(Event: TDataEvent; - Info: Integer); -begin - inherited DataEvent(Event, Info); - if (Event = deDisabledStateChange) and not Boolean(Info) then - FLayoutChangedFlag := True; -end; -{$ENDIF} - -procedure TcxDBDataLink.DataSetChanged; -begin - {$IFDEF DELPHI7} - if FLayoutChangedFlag then - begin - LayoutChanged; - Exit; - end; - {$ENDIF} - if Provider.IsOtherDataControllerUpdating then Exit; - if Provider.IsOtherDetailChanged then Exit; -{ - if Provider.IsGridMode and Provider.DataController.IsDetailMode and - not VarEquals(GetDataSetValues(DataSet, Provider.DataController.MasterDetailKeyFields), - Provider.DataController.MasterDetailKeyValues) then - Exit; -} - if Provider.IsDataSetBusy then - DataSetScrolled(0) - else - begin - if Provider.IsGridMode then - begin - Provider.FInUpdateGridMode := True; - try - Provider.DataController.BeginFullUpdate; - try - Provider.UpdateGridMode; - if Provider.DataController.MultiSelect then - Provider.DataController.DBSelection.RefreshBookmarks; - Provider.DataController.CheckBookmarkValid(-1); - if DataSet.State = dsInsert then - DoInsertingRecord; - finally - Provider.DataController.EndFullUpdate; - end; - Provider.CheckExpandedDetails; - finally - Provider.FInUpdateGridMode := False; - end; -// if DataSet.State = dsInsert then -// Provider.InsertingRecord(Provider.IsEOF); - end - else - begin - if not (DataSet.State in dsEditModes) then - begin - if Provider.IsSmartRefresh then - begin - Provider.SmartDataChanged; - DataSetScrolled(0); - end - else - begin - Provider.DataChanged(dcTotal, -1, -1); - DataSetScrolled(0); // AB16340 (alternative: Provider.DataController.UpdateFocused;) - end; - Provider.ResetSmartRefresh; - end - else - if (DataSet.State = dsInsert) and not Provider.FInserting then - begin - if (not Provider.DataController.IsDetailMode or Provider.IsDataSetCurrent) and - Provider.IsSyncInsert and not Provider.FInInserting then - DoInsertingRecord; - end; - end; - end; -end; - -procedure TcxDBDataLink.DataSetScrolled(Distance: Integer); -begin - Provider.DataScrolled(Distance); -end; - -procedure TcxDBDataLink.EditingChanged; -begin - if not Provider.IsSyncMode then Exit; - if not Active or not (DataSet.State in dsEditModes) then - begin - if {not Provider.IsGridMode and} Provider.IsSmartRefresh and - (Provider.EditingRecordIndex <> cxNullEditingRecordIndex) and - (Provider.EditingRecordIndex = Provider.DataController.NewItemRecordIndex) then - begin - if Provider.FUpdatingRecordIsInserting then - begin - Provider.DataController.FInUnboundCopy := True; // !!! - try - Provider.FUpdatingNewRecordIndex := Provider.DataController.AppendRecord; - Provider.DataController.CopyRecord(Provider.DataController.NewItemRecordIndex, - Provider.FUpdatingNewRecordIndex); - finally - Provider.DataController.FInUnboundCopy := False; - end; - end; - end; - Provider.ResetEditing; - end - else - begin - if DataSet.State = dsEdit then - begin - Provider.DataController.FInUnboundCopy := TRue; - try - Provider.EditingRecord; - finally - Provider.DataController.FInUnboundCopy := False; - end; - end - else - if (DataSet.State = dsInsert) and not DataSet.ControlsDisabled and - (Provider.FInSetDataSource or Provider.DataController.FInUpdateGridModeBufferCount) then - begin - if Provider.IsGridMode and not Provider.FInInsert then - DoInsertingRecord; - end; - end; - Provider.FInSetDataSource := False; -end; - -procedure TcxDBDataLink.FocusControl(Field: TFieldRef); - - function FindItemIndex(AField: TField): Integer; - var - I: Integer; - ADataField: TcxDBDataField; - begin - Result := -1; - for I := 0 to Provider.DataController.Fields.Count - 1 do - begin - ADataField := Provider.DataController.DBFields[I]; - if not ADataField.IsInternal and (ADataField.Field = AField) then - begin - Result := I; - Break; - end; - end; - end; - -var - ADone: Boolean; - AItemIndex: Integer; -begin - if Assigned(Field) and Assigned(Field^) then - begin - ADone := False; - AItemIndex := FindItemIndex(Field^); - if (AItemIndex <> -1) and (AItemIndex < Provider.DataController.GetItemCount) then - begin - Provider.DataController.FocusControl(AItemIndex, ADone); - if ADone then - Field^ := nil; - end; - end; -end; - -procedure TcxDBDataLink.LayoutChanged; -begin - {$IFDEF DELPHI7} // bug in Delphi 7 with update pack 1 - if (DataSet.State = dsInsert) or - (Provider.IsSmartRefresh and FPreventLayoutChanged) then - begin - {$IFDEF DELPHI7} - FLayoutChangedFlag := False; - {$ENDIF} - DataSetChanged; - Exit; - end; - {$ENDIF} - Provider.LayoutChanged([lcStructure, lcData]); - {$IFDEF DELPHI7} - FLayoutChangedFlag := False; - {$ENDIF} -end; - -procedure TcxDBDataLink.RecordChanged(Field: TField); -begin - Provider.RecordChanged(Field); -end; - -procedure TcxDBDataLink.UpdateData; -begin - Provider.DoUpdateData; - // A2136!!! -// if Provider.IsSmartRefresh then - RecordChanged(nil); - Provider.ResetChanging; -end; - -procedure TcxDBDataLink.DoInsertingRecord; -begin - Provider.FInInserting := True; - try - Provider.InsertingRecord(Provider.IsEOF and not Provider.FInsertOperation); - finally - Provider.FInInserting := False; - end; -end; - -{ TcxDBDataAssignedFieldNames } - -constructor TcxDBDataAssignedFields.Create; -begin - inherited; - FFields := TList.Create; -end; - -destructor TcxDBDataAssignedFields.Destroy; -begin - FFields.Free; - FFields := nil; - inherited Destroy; -end; - -procedure TcxDBDataAssignedFields.AddField(AField: TField); -begin - if FFields.IndexOf(AField) = -1 then - FFields.Add(AField); -end; - -procedure TcxDBDataAssignedFields.AddFieldsByFieldList(AFieldList: TList); -var - I: Integer; -begin - for I := 0 to AFieldList.Count - 1 do - if AFieldList[I] <> nil then - FFields.Add(AFieldList[I]); -end; - -procedure TcxDBDataAssignedFields.AddFieldsByFieldNames(ADataSet: TDataSet; const AFieldNames: string); -begin - ADataSet.GetFieldList(FFields, AFieldNames); -end; - -procedure TcxDBDataAssignedFields.Clear; -begin - FFields.Clear; -end; - -function TcxDBDataAssignedFields.IsEmpty: Boolean; -begin - Result := FFields.Count = 0; -end; - -function TcxDBDataAssignedFields.IsFieldExists(AField: TField): Boolean; -begin - Result := FFields.IndexOf(AField) <> -1; -end; - -{ TcxDBDataProvider } - -constructor TcxDBDataProvider.Create(ADataController: TcxCustomDataController); -begin - inherited Create(ADataController); - FAssignedFields := TcxDBDataAssignedFields.Create; - if DBDataProviders = nil then - DBDataProviders := TList.Create; - DBDataProviders.Add(Self); - FDataLink := TcxDBDataLink.Create(Self); - FUpdatingRecordIndex := cxNullEditingRecordIndex; - FUpdatingNewRecordIndex := -1; - FListeners := TList.Create; -end; - -destructor TcxDBDataProvider.Destroy; -begin - RemoveFromListeners; - FListeners.Free; - FListeners := nil; - FDataLink.Free; - FDataLink := nil; - DBDataProviders.Remove(Self); - if DBDataProviders.Count = 0 then - begin - DBDataProviders.Free; - DBDataProviders := nil; - end; - FAssignedFields.Free; - FAssignedFields := nil; - inherited Destroy; -end; - -function TcxDBDataProvider.IsCanInitEditingBusy: Boolean; -var - I: Integer; - ADBDataProvider: TcxDBDataProvider; -begin - Result := False; - for I := 0 to DBDataProviders.Count - 1 do - begin - ADBDataProvider := TcxDBDataProvider(DBDataProviders[I]); - if (ADBDataProvider.DataSet = Self.DataSet) and - ADBDataProvider.FInCanInitEditing then - begin - Result := True; - Break; - end; - end; -end; - -function TcxDBDataProvider.IsDataSetBusy: Boolean; -var - I: Integer; - ADBDataProvider: TcxDBDataProvider; -begin - Result := False; - for I := 0 to DBDataProviders.Count - 1 do - begin - ADBDataProvider := TcxDBDataProvider(DBDataProviders[I]); - if {(ADBDataProvider <> Self) and} - (ADBDataProvider.DataSet = Self.DataSet) and - ((ADBDataProvider.LockCount <> 0) or ADBDataProvider.FInNotify or - ((Self.IsKeyNavigation or Self.DataController.IsGridMode) and (ADBDataProvider.LocateCount <> 0))) then - begin - if ADBDataProvider.FInNotify then - begin - if not FPostLocateFlag then - Result := True; - end - else - if not FPostLocateFlag then - begin - Result := True; - if Self.DataController.IsGridMode and (Self.DataController.LockGridModeNotifyCount <> 0) then - Result := False; - end; - Break; - end; - end; -end; - -function TcxDBDataProvider.IsDetailDataSetBusy: Boolean; -var - I: Integer; - ADBDataProvider: TcxDBDataProvider; -begin - Result := False; - for I := 0 to DBDataProviders.Count - 1 do - begin - ADBDataProvider := TcxDBDataProvider(DBDataProviders[I]); - if (ADBDataProvider.DataSet = Self.DataSet) and - ((ADBDataProvider.LockCount <> 0){ or ADBDataProvider.FInFirst}) and - ADBDataProvider.DataController.IsDetailMode {ADBDataProvider.FInFirst} then - begin - Result := True; - Break; - end; - end; -end; - -function TcxDBDataProvider.IsOtherDataControllerUpdating: Boolean; -var - I: Integer; - ADBDataProvider: TcxDBDataProvider; -begin - Result := False; - for I := 0 to DBDataProviders.Count - 1 do - begin - ADBDataProvider := TcxDBDataProvider(DBDataProviders[I]); - if (ADBDataProvider <> Self) and - (ADBDataProvider.DataSet = Self.DataSet) and - ((ADBDataProvider.LockCount <> 0) or - (Self.IsKeyNavigation and (ADBDataProvider.LocateCount <> 0))) then - begin - if ADBDataProvider.DataController.LockGridModeNotifyCount = 0 then - ADBDataProvider.AddListener(Self); - Result := True; - Break; - end; - end; -end; - -function TcxDBDataProvider.IsOtherDetailDataSetInInsert: Boolean; -var - I: Integer; - ADBDataProvider: TcxDBDataProvider; -begin - Result := False; - for I := 0 to DBDataProviders.Count - 1 do - begin - ADBDataProvider := TcxDBDataProvider(DBDataProviders[I]); - if (ADBDataProvider <> Self) and (ADBDataProvider.DataSet = Self.DataSet) and - ADBDataProvider.FInInsert then - begin - Result := True; - Break; - end; - end; -end; - -function TcxDBDataProvider.IsOtherDetailChanged: Boolean; -begin - Result := DataController.IsOtherDetailChanged; -end; - -function TcxDBDataProvider.IsUniDirectional: Boolean; -begin - {$IFDEF DELPHI6} - if Assigned(DataSet) and DataSet.IsUniDirectional then - Result := True - else - {$ENDIF} - Result := False; -end; - -function TcxDBDataProvider.IsCustomDataSourceSupported: Boolean; -begin - Result := False; -end; - -function TcxDBDataProvider.IsGridMode: Boolean; -begin - Result := DataController.DataModeController.GridMode and - not IsUniDirectional and not FLoadAllNeeded and - {not DataController.IsDetailMode} - (DataController.DetailMode <> dcdmPattern); -end; - -function TcxDBDataProvider.IsDataSource: Boolean; -begin - Result := (DataSet <> nil) and (DataSet.State <> dsInactive); -end; - -function TcxDBDataProvider.IsKeyNavigation: Boolean; -begin - Result := DataController.IsKeyNavigation; -end; - -function TcxDBDataProvider.IsOtherInsert: Boolean; -var - I: Integer; - ADBDataProvider: TcxDBDataProvider; -begin - Result := False; - for I := 0 to DBDataProviders.Count - 1 do - begin - ADBDataProvider := TcxDBDataProvider(DBDataProviders[I]); - if (ADBDataProvider <> Self) and - (ADBDataProvider.DataSet = Self.DataSet) and ADBDataProvider.FInInsert then - begin - Result := True; - Break; - end; - end; -end; - -function TcxDBDataProvider.IsSyncInsert: Boolean; -begin - Result := not DataController.IsPattern and - DataController.DataModeController.SyncInsert and - IsSyncMode; -end; - -function TcxDBDataProvider.IsSyncMode: Boolean; -begin - Result := Assigned(DataSet) and DataSet.Active and - (IsGridMode or DataController.DataModeController.SyncMode) and - not IsUniDirectional; - if DataController.IsDetailMode then - begin - if not DataController.DataModeController.DetailInSyncMode then - Result := False - else - if DataController.DataModeController.DetailInSQLMode then - begin - if not IsDataSetCurrent then - Result := False; - end - else - if not (IsKeyNavigation or IsGridMode) then - Result := False; - end; -end; - -function TcxDBDataProvider.DataSet_ActiveRecord: Integer; -begin - Result := TDataSetAccess(DataSet).ActiveRecord; -end; - -function TcxDBDataProvider.DataSet_BookmarkAvailable: Boolean; -begin - Result := TDataSetAccess(DataSet).BookmarkAvailable; -end; - -function TcxDBDataProvider.DataSet_BufferCount: Integer; -begin - Result := TDataSetAccess(DataSet).BufferCount; -end; - -function TcxDBDataProvider.IsActive: Boolean; -begin - Result := Assigned(DataSet) and DataSet.Active; // WARNING: DataLink.Active <> DataSet.Active! - Result := Result and not DataSet.ControlsDisabled; -end; - -function TcxDBDataProvider.IsActiveDataSet: Boolean; -begin - Result := Assigned(DataSet) and (DataSet.FieldCount > 0) and - (DataSet.Active or not DataSet.DefaultFields); -end; - -function TcxDBDataProvider.IsBOF: Boolean; -begin - if Assigned(DataSet) then - Result := DataSet.BOF or not DataLink.Active - else - Result := inherited IsBOF; -end; - -function TcxDBDataProvider.IsChanging: Boolean; -begin - Result := inherited IsChanging; -end; - -function TcxDBDataProvider.IsEditing: Boolean; -begin - if IsUnboundColumnMode then - Result := inherited IsEditing - else - Result := Assigned(DataSet) and (DataSet.State in dsEditModes); -end; - -function TcxDBDataProvider.IsEOF: Boolean; -begin - if Assigned(DataSet) then - begin - with DataController do - begin - if IsDetailMode and not IsGridMode then - begin - if not VarIsEmpty(MasterDetailKeyValues) then - Result := DataSet.EOF or - (not (DataSet.State in dsEditModes) and - not VarEquals(GetDataSetValues(DataSet, MasterDetailKeyFields), MasterDetailKeyValues)) - else - Result := True; - end - else - Result := DataSet.EOF or not DataLink.Active; - end; - end - else - Result := inherited IsEOF; -end; - -function TcxDBDataProvider.IsGridModeUpdating: Boolean; -begin - Result := IsGridMode and FInUpdateGridMode; -end; - -function TcxDBDataProvider.IsInserting: Boolean; -begin - Result := Assigned(DataSet) and (DataSet.State = dsInsert); -end; - -function TcxDBDataProvider.IsModified: Boolean; -begin - Result := inherited IsModified {for Unbound column} or - IsDataSetModified; -end; - -function TcxDBDataProvider.IsDataSetModified: Boolean; -var - I: Integer; -begin - Result := Assigned(DataSet) and DataSet.Modified; - if Result and not FAssignedFields.IsEmpty then // check Null values - begin - Result := False; - for I := 0 to DataSet.FieldCount - 1 do - if not FAssignedFields.IsFieldExists(DataSet.Fields[I]) and - not VarIsNull(GetFieldValue(DataSet.Fields[I])) then - begin - Result := True; - Break; - end; - end; - // check unbound column - if not Result and (inherited IsModified) then - begin - for I := 0 to DataController.ItemCount - 1 do - if DataController.Fields[I].IsUnbound and - not VarIsNull(DataController.GetEditValue(I, evsValue)) then - begin - Result := True; - Break; - end; - end; -end; - -function TcxDBDataProvider.BookmarkValid(const ABookmark: TcxBookmark): Boolean; -begin - Result := Dataset.BookmarkValid(TBookmark(ABookmark)); -end; - -function TcxDBDataProvider.CompareBookmarks(const AItem1, AItem2: TcxBookmark): Integer; -begin - if not DataLink.Active then - Result := -1 - else - Result := Dataset.CompareBookmarks(TBookmark(AItem1), TBookmark(AItem2)); -end; - -procedure TcxDBDataProvider.CorrectRecordIndex(ARecordIndex: Integer); -begin - if Assigned(DataSet) then - begin - if not IsKeyNavigation and (Length(FSavePosInfo.Bookmark) <> 0) and - (CompareBookmarks(FSavePosInfo.Bookmark, DataSet.Bookmark) = 0) then - FRecordIndex := ARecordIndex; - end; -end; - -procedure TcxDBDataProvider.First; -var - AReopened: Boolean; -begin - FInFirst := True; - try - inherited First; - if Assigned(DataSet) then - with DataController do - if IsDetailMode and not IsGridMode then - begin - if not VarIsEmpty(MasterDetailKeyValues) then - begin - DataModeController.DoDetailFirst(MasterDetailKeyFieldNames, - MasterDetailKeyValues, AReopened); - if AReopened then - SavePos; - IsDataSetCurrent := True; - if RecreatedFieldsAfterFirst then - NotifyDetailsAfterFieldsRecreating(not DataController.FInCheckCurrentQuery); - end; - end - else - if DataSet.Active then - DataSet.First; - finally - FInFirst := False; - end; -end; - -procedure TcxDBDataProvider.Prev; -begin - if Assigned(DataSet) then - DataSet.Prior; -end; - -procedure TcxDBDataProvider.Next; -begin - if Assigned(DataSet) then - DataSet.Next; -end; - -procedure TcxDBDataProvider.Last; -begin - if Assigned(DataSet) and DataSet.Active then - DataSet.Last; -end; - -procedure TcxDBDataProvider.MoveBy(ADistance: Integer); -begin - if Assigned(DataSet) then - DataSet.MoveBy(ADistance); -end; - -procedure TcxDBDataProvider.Scroll(ADistance: Integer); -var - ARecordIndex: Integer; -begin - if not IsGridMode or (ADistance = 0) or not IsActive then Exit; - if ADistance < 0 then - begin - ARecordIndex := (ADistance - DataLink.ActiveRecord); - DataSet.MoveBy(ARecordIndex); - end - else - begin - ARecordIndex := DataLink.RecordCount - DataLink.ActiveRecord - 1 + ADistance; - DataSet.MoveBy(ARecordIndex); - end; - DataController.CorrectPrevSelectionChangedInfo; - DataController.SyncSelected(True); -end; - -procedure TcxDBDataProvider.SavePos; -begin - if Assigned(DataSet) then - with DataSet do - begin - if DataSet_BookmarkAvailable then - FSavePosInfo.Bookmark := Bookmark - else - SetLength(FSavePosInfo.Bookmark, 0); - FSavePosInfo.ActiveRecord := DataSet_ActiveRecord; // save offset in DataSet buffer - FSavePosInfo.BOF := BOF; - FSavePosInfo.EOF := EOF; - end; -end; - -procedure TcxDBDataProvider.RestorePos; -begin - if Assigned(DataSet) then - with DataSet do - begin - if (Length(FSavePosInfo.Bookmark) <> 0) and - Self.BookmarkValid(FSavePosInfo.Bookmark) then - begin - try - Bookmark := FSavePosInfo.Bookmark; - // restore offset in DataSet buffer - if DataSet_ActiveRecord > FSavePosInfo.ActiveRecord then - begin - MoveBy(DataSet_BufferCount - DataSet_ActiveRecord - 1 + DataSet_ActiveRecord - FSavePosInfo.ActiveRecord); - MoveBy(FSavePosInfo.ActiveRecord - DataSet_BufferCount + 1); - end - else - if DataSet_ActiveRecord < FSavePosInfo.ActiveRecord then - begin - MoveBy(-DataSet_ActiveRecord + DataSet_ActiveRecord - FSavePosInfo.ActiveRecord); - MoveBy(FSavePosInfo.ActiveRecord); - end; - // BOF and EOF - if FSavePosInfo.BOF and not BOF then Prior; - if FSavePosInfo.EOF and not EOF then Next; - except - on EDatabaseError do; - end; - end; - end; -end; - -function TcxDBDataProvider.CanDelete: Boolean; -begin - Result := inherited CanDelete and CanModify; -end; - -function TcxDBDataProvider.CanInitEditing(ARecordIndex: Integer): Boolean; -begin - if IsUnboundColumnMode then - Result := inherited CanInitEditing(ARecordIndex) - else - begin - FInCanInitEditing := True; - try - // bug in Delphi 7 with update pack 1 - if DataController.UseNewItemRowForEditing and DataController.NewItemRowFocused and - not IsInserting then - begin - Insert; - Result := True; - end - else - Result := DataLink.Edit; - if Result then - begin - SetChanging; - // Update Navigator - if DataController.UseNewItemRowForEditing and DataController.NewItemRowFocused then - DataController.Change([dccUpdateRecord]); - end; - finally - FInCanInitEditing := False; - end; - end; -end; - -function TcxDBDataProvider.CanModify: Boolean; -begin - Result := Assigned(DataSet) and DataSet.Active and DataSet.CanModify and IsSyncMode; -end; - -procedure TcxDBDataProvider.Append; -begin - if Assigned(DataSet) then - AddNewRecord(DataSet.Append); -end; - -procedure TcxDBDataProvider.InternalCancel; -var - ARecordIndex: Integer; - ARecordId: Variant; -begin - if not Assigned(DataSet) then Exit; - if DataController.IsDetailMode and IsEOF then // Appending in M-D - begin - DataSet.DisableControls; - try - if (DataController.GetRowCount - 2) >= 0 then - begin - ARecordIndex := DataController.GetRowInfo(DataController.GetRowCount - 2).RecordIndex; - ARecordId := DataController.GetRecordId(ARecordIndex); - end - else - ARecordIndex := -1; - DataSet.Cancel; - if ARecordIndex <> -1 then - DataSet.Locate(DataController.KeyFieldNames, ARecordId, []); - finally - DataSet.EnableControls; - end; - end - else - DataSet.Cancel; -end; - -procedure TcxDBDataProvider.Cancel; -begin - if IsUnboundColumnMode then - inherited Cancel - else - begin - if DataController.IsSmartRefresh then // !!! - begin - DataController.FInUnboundCopy := True; - try - inherited Cancel; - finally - DataController.FInUnboundCopy := False; - end; - end; - InternalCancel; - end; -end; - -procedure TcxDBDataProvider.Delete; -begin - if Assigned(DataSet) then - begin - if DataController.GetFocusedRecordIndex <> -1 then - begin - if IsSmartRefresh then - FUpdatingPrevFocusedRecordIndex := DataController.GetFocusedRecordIndex; - - DataSet.DisableControls; - try - DataSet.Delete; - {$IFDEF DELPHI7} // bug in Delphi 7 with update pack 1 - DataLink.FPreventLayoutChanged := True; - {$ENDIF} - if DataController.FNearestRecordIndex <> -1 then - DataController.TryFocusRecord(DataController.FNearestRecordIndex); - finally - DataSet.EnableControls; - {$IFDEF DELPHI7} // bug in Delphi 7 with update pack 1 - DataLink.FPreventLayoutChanged := False; - {$ENDIF} - end; - - if IsSmartRefresh then - begin - if FUpdatingPrevFocusedRecordIndex < DataController.RecordCount then - DataController.DeleteRecord(FUpdatingPrevFocusedRecordIndex); - DataController.UpdateFocused; - end; - end; - end; -end; - -procedure TcxDBDataProvider.DeleteRecords(AList: TList); - - procedure InternalDelete(AUpdateFocused: Boolean); - var - ARecordIndex: Integer; - begin - if IsSmartRefresh then - begin - ARecordIndex := DataController.LocateRecordIndex(DataController.GetKeyFields); - if ARecordIndex <> -1 then - begin - DataSet.Delete; - DataController.DeleteRecord(ARecordIndex); - end; - end - else - DataSet.Delete; - end; - - procedure DeleteWithLocate; - var - AKeyList: TList; - AFieldList: TList; - I: Integer; - P: PVariant; - begin - AKeyList := TList.Create; - AFieldList := TList.Create; - try - DataController.GetKeyFields(AFieldList); - for I := 0 to AList.Count - 1 do - begin - New(P); - P^ := DataController.GetInternalRecordId(Integer(AList[I]), AFieldList); - AKeyList.Add(P); - end; - for I := AKeyList.Count - 1 downto 0 do - begin - P := PVariant(AKeyList[I]); - if DataSet.Locate(DataController.KeyFieldNames, P^, []) then - InternalDelete(False); - end; - if IsSmartRefresh then - DataController.UpdateFocused; - finally - for I := 0 to AKeyList.Count - 1 do - begin - P := AKeyList[I]; - Dispose(P); - end; - AKeyList.Free; - AFieldList.Free; - end; - end; - - procedure DeleteWithMoveBy; - var - I, AAnchorRecordIndex, J, ARecordCount: Integer; - begin - AAnchorRecordIndex := Integer(AList[AList.Count - 1]); - ARecordCount := DataController.RecordCount; - J := 0; - if DataController.CanFocusRecord(AAnchorRecordIndex) then - for I := AList.Count - 1 downto 0 do - begin - DataSet.MoveBy(Integer(AList[I]) - AAnchorRecordIndex + J); - DataSet.Delete; - AAnchorRecordIndex := Integer(AList[I]); - if AAnchorRecordIndex = (ARecordCount - 1) then - J := 1 - else - J := 0; - Dec(ARecordCount); - end; - end; - -begin - if Assigned(DataSet) then - begin - DataSet.DisableControls; - try - if DataController.IsSmartRefresh then - DataController.BeginFullUpdate; - try - if IsKeyNavigation then - DeleteWithLocate - else - DeleteWithMoveBy; - finally - if DataController.IsSmartRefresh then - begin - if DataController.FInDeleteSelection then - DataController.ClearSelection; - DataController.EndFullUpdate; - end - else - if not DataController.IsKeyNavigation then - DataController.ClearSelection; - end; - finally - DataSet.EnableControls; - end; - end; -end; - -procedure TcxDBDataProvider.DeleteSelection; -var - I: Integer; - ASelection: TcxDBDataSelection; -begin - if IsGridMode then - begin - if Assigned(DataSet) then - begin - ASelection := DataController.DBSelection; - DataSet.DisableControls; - try - for I := ASelection.Count - 1 downto 0 do - begin - DataSet.Bookmark := ASelection.FBookmarks[I]; - DataSet.Delete; - ASelection.Delete(I); - end; - finally - DataSet.EnableControls; - end; - end; - end - else - inherited DeleteSelection; -end; - -procedure TcxDBDataProvider.Edit; -begin - if IsUnboundColumnMode then - inherited Edit - else - if Assigned(DataSet) then - DataSet.Edit; -end; - -function TcxDBDataProvider.GetEditValue(ARecordIndex: Integer; AField: TcxCustomDataField; - AEditValueSource: TcxDataEditValueSource): Variant; -var - ADataSetField: TField; -begin - Result := Null; - ADataSetField := TcxDBDataField(AField).Field; - if Assigned(ADataSetField) then - begin - if AEditValueSource = evsText then - begin - if ADataSetField.IsNull and not Assigned(ADataSetField.OnGetText) then - Result := Null - else - Result := ADataSetField.Text; - end - else - if (AEditValueSource = evsKey) and (ADataSetField.KeyFields <> '') then - Result := ADataSetField.DataSet.FieldValues[ADataSetField.KeyFields] - else - if not ADataSetField.IsNull then - Result := ADataSetField.Value; // evsValue - end - else - if AField.IsUnbound then - Result := inherited GetEditValue(ARecordIndex, AField, AEditValueSource); -end; - -procedure TcxDBDataProvider.Insert; -begin - if Assigned(DataSet) then - begin - FInsertOperation := True; - try - AddNewRecord(DataSet.Insert); - finally - FInsertOperation := False; - end; - end; -end; - -procedure TcxDBDataProvider.Post(AForcePost: Boolean); -var - ALock: Boolean; -begin - if IsUnboundColumnMode then - inherited Post(AForcePost) - else - if Assigned(DataSet) then - begin - ALock := not IsSmartRefresh; - if ALock then - DataController.BeginFullUpdate; - try - if AForcePost then - DataSet.Post - else - DataSet.CheckBrowseMode; // DataSet.Post; - finally - if ALock then - DataController.EndFullUpdate; - end; - end; -end; - -procedure TcxDBDataProvider.PostEditingData; -begin - if DataLink.Active then - DataLink.UpdateData; -end; - -procedure TcxDBDataProvider.AssignItemValue(ARecordIndex: Integer; AField: TcxCustomDataField; - const AValue: Variant); -var - ADBField: TcxDBDataField; - ADataSetField: TField; -begin - ADBField := AField as TcxDBDataField; - ADataSetField := ADBField.Field; - if Assigned(ADataSetField) then - begin - if ADBField.IsLookup and (ADataSetField.KeyFields <> '') then - begin - ADataSetField.DataSet.FieldValues[ADataSetField.KeyFields] := AValue; - FAssignedFields.AddFieldsByFieldNames(ADataSetField.DataSet, ADataSetField.KeyFields); - end - else - begin - ADataSetField.Value := AValue; // SetFieldValue(ADataSetField, AValue);? - FAssignedFields.AddField(ADataSetField); - end; - end; -end; - -procedure TcxDBDataProvider.DoInitInsertingRecord(AInsertingRecordIndex: Integer; - const AGroupValues: TcxDataSummaryValues); -begin - if not (FInInsert or FInCanInitEditing or IsOtherInsert) then - begin - DataController.UpdateEditingRecord; - Exit; - end; - FAssignedFields.Clear; // reset assigned field names - inherited DoInitInsertingRecord(AInsertingRecordIndex, AGroupValues); - if (dcoAssignMasterDetailKeys in DataController.Options) and DataController.IsDetailMode then - begin - SetDataSetValues(DataSet, DataController.MasterDetailKeyFields, DataController.MasterDetailKeyValues); - FAssignedFields.AddFieldsByFieldList(DataController.MasterDetailKeyFields); - end; - DataController.DoInitInsertingRecord(AInsertingRecordIndex); - DataController.UpdateEditingRecord; -end; - -function TcxDBDataProvider.SetEditValue(ARecordIndex: Integer; AField: TcxCustomDataField; - const AValue: Variant; AEditValueSource: TcxDataEditValueSource): Boolean; -var - ADataSetField: TField; -begin - Result := False; - ADataSetField := TcxDBDataField(AField).Field; - if Assigned(ADataSetField) then - begin - if (AEditValueSource = evsText) or Assigned(ADataSetField.OnSetText) then - ADataSetField.Text := VarToStr(AValue) - else - if (AEditValueSource = evsKey) and (ADataSetField.KeyFields <> '') then - ADataSetField.DataSet.FieldValues[ADataSetField.KeyFields] := AValue - else - SetFieldValue(ADataSetField, AValue); - Result := True; - end - else - if AField.IsUnbound then - Result := inherited SetEditValue(ARecordIndex, AField, AValue, AEditValueSource); -end; - -procedure TcxDBDataProvider.BeginDeleting; -//var -// ARowIndex: Integer; -begin - inherited; -{ - if IsKeyNavigation and (DataController.FocusedRowIndex <> -1) then - begin - ARowIndex := DataController.GetNearestRowIndex(DataController.FocusedRowIndex, ASelection); - if ARowIndex <> -1 then - begin - DataController.FDeletingRecordIndex := DataController.GetRowInfo(ARowIndex).RecordIndex; - FNearestRecordID := DataController.GetRecordId(DataController.FDeletingRecordIndex); - end; - end; - } -end; - -procedure TcxDBDataProvider.EndDeleting; -begin - try - if DataController.FNearestRecordIndex <> -1 then - begin - if DataController.FNearestRecordIndex < DataController.RecordCount then - DataController.ChangeFocusedRecordIndex(DataController.FNearestRecordIndex); - end; - finally - inherited; - end; - -{ - DataController.FDeletingRecordIndex := -1; - FNearestRecordID := Unassigned; -} -end; - -procedure TcxDBDataProvider.ActiveChanged(AActive: Boolean); -begin - inherited ActiveChanged(AActive); - if Assigned(DataSet) and not DataSet.Active and DataSet.DefaultFields then - DataController.ResetDBFields; -end; - -procedure TcxDBDataProvider.AddListener(AProvider: TcxDBDataProvider); -begin - if FListeners.IndexOf(AProvider) = -1 then - FListeners.Add(AProvider); -end; - -procedure TcxDBDataProvider.BeginLocate; -begin - inherited BeginLocate; - if Assigned(DataSet) and (DataSet.State in dsEditModes) then - SetPostLocateFlag; -end; - -procedure TcxDBDataProvider.DataScrolled(ADistance: Integer); -begin - if IsGridMode then - begin - FRecordIndex := DataLink.ActiveRecord; - DataController.BeginUpdate; - try - if ADistance <> 0 then - DataController.InvalidateDataBuffer; - if not DataController.Relations.IsEmpty then - DataController.CollapseDetails; - finally - DataController.EndUpdate; - end; - end - else - Inc(FRecordIndex, ADistance); - inherited DataScrolled(ADistance); - if IsGridMode and DataController.IsSequenced then - DataController.UpdateScrollBars; -end; - -procedure TcxDBDataProvider.Freeze; -begin - inherited Freeze; - if Assigned(DataSet) then - begin - DataSet.DisableControls; - if DataSet.Active and (DataSet.State in dsEditModes) then - begin - SetPostLocateFlag; - DataSet.Cancel; - end; - end; -end; - -procedure TcxDBDataProvider.LayoutChanged(ADataLayoutChanges: TcxDataLayoutChanges); -begin - if IsDetailDataSetBusy then - begin - if IsActive then - DataController.ResyncDBFields; - Exit; - end; - inherited LayoutChanged(ADataLayoutChanges); -end; - -procedure TcxDBDataProvider.RecordChanged(Field: TField); -var - AIsDataSetCurrent: Boolean; -begin - if DataController.IsDetailMode and DataController.DataModeController.DetailInSyncMode and - not IsDataSetCurrent then - AIsDataSetCurrent := False - else - AIsDataSetCurrent := True; - if IsEditing and AIsDataSetCurrent then - DataController.UpdateEditingRecord; - ResetChanging; -end; - -procedure TcxDBDataProvider.ResetPostLocateFlag; -begin - FPostLocateFlag := False; -end; - -procedure TcxDBDataProvider.ResetSmartRefresh; -begin - FUpdatingRecordIndex := cxNullEditingRecordIndex; - FUpdatingNewRecordIndex := -1; - FUpdatingRecordIsInserting := False; -end; - -procedure TcxDBDataProvider.SetPostLocateFlag; -var - I: Integer; - ADBDataProvider: TcxDBDataProvider; -begin - for I := 0 to DBDataProviders.Count - 1 do - begin - ADBDataProvider := TcxDBDataProvider(DBDataProviders[I]); - if (ADBDataProvider.DataSet = Self.DataSet) and - (ADBDataProvider.DataController.DetailMode <> dcdmPattern) then - ADBDataProvider.FPostLocateFlag := True; - end; -end; - -procedure TcxDBDataProvider.Unfreeze; -begin - if Assigned(DataSet) then - DataSet.EnableControls; - inherited Unfreeze; -end; - -procedure TcxDBDataProvider.SmartDataChanged; - - function IsKeyFieldAutoInc: Boolean; - var - AKeyFields: TList; - begin - Result := False; - AKeyFields := TList.Create; - try - DataController.GetKeyDBFields(AKeyFields); - if (AKeyFields.Count = 1) and (TField(AKeyFields[0]).DataType = ftAutoInc) then - Result := True; - finally - AKeyFields.Free; - end; - end; - - function IsNewRecordInserted(const AFocusedRecordValues, AKeyFieldsValues: Variant): Boolean; - begin - Result := False; - if not FUpdatingRecordIsInserting then Exit; - // check auto inc - if VarEquals(AFocusedRecordValues, Null) and IsKeyFieldAutoInc then - begin - if DataController.FindRecordIndexByKey(AKeyFieldsValues) = -1 then - Result := True; - end; - // new item ? - end; - -var - AFocusedRecordIndex, ARecordIndex: Integer; - AFocusedRecordValues, AKeyFieldsValues: Variant; - ADataChangeInfo: TcxDataChangeInfo; -begin - if FUpdatingRecordIndex <> cxNullEditingRecordIndex then - begin - AFocusedRecordIndex := DataController.GetFocusedRecordIndex; - if AFocusedRecordIndex = FUpdatingRecordIndex then - begin - if (AFocusedRecordIndex < 0) and (FUpdatingNewRecordIndex <> -1) then - AFocusedRecordIndex := FUpdatingNewRecordIndex; - AFocusedRecordValues := DataController.GetRecordId(AFocusedRecordIndex); - AKeyFieldsValues := DataController.GetKeyFieldsValues; - if not VarEquals(AFocusedRecordValues, AKeyFieldsValues) then - begin - if IsNewRecordInserted(AFocusedRecordValues, AKeyFieldsValues) then - begin - if DataController.NewItemRowFocused then - begin - if FUpdatingNewRecordIndex <> -1 then - AFocusedRecordIndex := FUpdatingNewRecordIndex - else - begin - AFocusedRecordIndex := DataController.AppendRecord; - DataController.CopyRecord(DataController.NewItemRecordIndex, AFocusedRecordIndex); - end; - end; - DataController.DoUpdateRecord(AFocusedRecordIndex); - end - else - begin - ARecordIndex := DataController.FindRecordIndexByKey(AFocusedRecordValues); - if (ARecordIndex = -1) or (ARecordIndex = AFocusedRecordIndex) then - begin - if AFocusedRecordIndex <> -1 then - DataController.DeleteRecord(AFocusedRecordIndex); - DataController.UpdateFocused; - end; - end; - end - else - DataController.DoUpdateRecord(AFocusedRecordIndex); - end; - // record changed notify - if AFocusedRecordIndex <> -1 then - begin - ADataChangeInfo := DataController.FDataChangeInfo; - ADataChangeInfo.Kind := dcRecord; - ADataChangeInfo.RecordIndex := AFocusedRecordIndex; - DataController.FDataChangeInfo := ADataChangeInfo; - end; - end; - DataController.FilterChanged; - DataController.SummaryChanged(False); - ResetPostLocateFlag; // ? -end; - -procedure TcxDBDataProvider.CheckExpandedDetails; -var - I, AFocusedRecordIndex: Integer; -begin - AFocusedRecordIndex := DataController.FocusedRecordIndex; - for I := 0 to DataController.RecordCount - 1 do - if (I <> AFocusedRecordIndex) and DataController.IsDetailDataControllerExist(I, -1) then - begin - DataController.CollapseDetails; - Break; - end; -end; - -function TcxDBDataProvider.DoLocate(const ASubText: string; AForward, ANext: Boolean): Boolean; -var - ASearchItemIndex: Integer; - AStartPos: TcxBookmark; - AExit, AStartEOF: Boolean; - - function IsCurrentEqual: Boolean; - var - S: string; - begin - FIncrementalSearching := True; - try - S := DataController.GetIncrementalSearchText(-1{set FIncrementalSearching flag!}, ASearchItemIndex); - Result := DataCompareText(S, ASubText, True); - finally - FIncrementalSearching := False; - end; - end; - - procedure CalcNextRecord; - begin - with DataSet do - if not AForward then - begin - Prior; - if BOF then - begin - if not ANext then - Last - else - AExit := True; - AStartPos := FSavePosInfo.Bookmark; - end; - end - else - begin - Next; - if EOF then - begin - if not ANext then - First - else - AExit := True; - AStartPos := FSavePosInfo.Bookmark; - end; - end; - end; - -begin - Result := False; - if not Assigned(DataSet) or IsEditing then Exit; - with DataSet do - begin - if Active and not (BOF and EOF) then - begin - ASearchItemIndex := DataController.Search.ItemIndex; - Result := not ANext and IsCurrentEqual; - if Result then - DataController.UpdateFocused - else - begin - Freeze; - try - SavePos; - SetLength(AStartPos, 0); - AExit := False; - AStartEOF := False; - if ANext then - CalcNextRecord - else - if EOF then - AStartEOF := True; - while (not EOF or ANext or AStartEOF) and - ((Length(AStartPos) = 0) or (Self.CompareBookmarks(Bookmark, AStartPos) <> 0)) do - begin - AStartEOF := False; - if IsCurrentEqual then - begin - Result := True; - Break; - end; - CalcNextRecord; - if AExit then Break; - end; - if not Result then - RestorePos; - finally - Unfreeze; // Invalidate disabled - end; - if Result then - begin - DataController.CorrectPrevSelectionChangedInfo; - DataController.Change([dccLayout]); // Invalidate - end; - DataController.SyncMasterPos; - end; - end; - end; -end; - -function TcxDBDataProvider.GetDataBufferCount: Integer; -begin - if DataController.DataModeController.GridModeBufferCount = 0 then - Result := DataController.GetDefaultGridModeBufferCount - else - Result := DataController.DataModeController.GridModeBufferCount; -end; - -function TcxDBDataProvider.GetDataRecordCount: Integer; -begin - Result := DataLink.RecordCount; -end; - -function TcxDBDataProvider.GetExternalDataDisplayText(ARecordIndex: Integer; - AField: TcxCustomDataField): string; -var - ADataSetField: TField; - APrevActiveRecord: Integer; -begin - ADataSetField := TcxDBDataField(AField).Field; - if Assigned(ADataSetField) then - begin - if (0 <= ARecordIndex) and (ARecordIndex < DataLink.RecordCount) then - begin - APrevActiveRecord := DataLink.ActiveRecord; - try - DataLink.ActiveRecord := ARecordIndex; - Result := ADataSetField.DisplayText; - finally - DataLink.ActiveRecord := APrevActiveRecord; - end; - end - else - if IsInserting or FIncrementalSearching then - Result := ADataSetField.DisplayText - else - Result := ''; - end - else - Result := inherited GetExternalDataDisplayText(ARecordIndex, AField); -end; - -function TcxDBDataProvider.GetExternalDataValue(ARecordIndex: Integer; - AField: TcxCustomDataField): Variant; - - function GetFieldValue(AField: TField): Variant; - begin - if AField.IsNull then - Result := Null - else - Result := AField.Value; - end; - -var - ADataSetField: TField; - APrevActiveRecord: Integer; -begin - ADataSetField := TcxDBDataField(AField).Field; - if Assigned(ADataSetField) then - begin - if (0 <= ARecordIndex) and (ARecordIndex < DataLink.RecordCount) then - begin - APrevActiveRecord := DataLink.ActiveRecord; - try - DataLink.ActiveRecord := ARecordIndex; - Result := GetFieldValue(ADataSetField); - finally - DataLink.ActiveRecord := APrevActiveRecord; - end; - end - else - if IsInserting or FIncrementalSearching then - Result := GetFieldValue(ADataSetField) - else - Result := Null; - end - else - Result := inherited GetExternalDataValue(ARecordIndex, AField); -end; - -procedure TcxDBDataProvider.LoadDataBuffer; -begin - if DataLink.Active and IsGridMode then - begin - DataLink.BufferCount := GetDataBufferCount; - DataController.DataStorage.Clear(False); - DataController.DataStorage.RecordCount := GetDataRecordCount; - FRecordIndex := DataLink.ActiveRecord; - end; - inherited LoadDataBuffer; -end; - -procedure TcxDBDataProvider.UpdateGridMode; -var - APrevRecordCount: Integer; -begin - if DataLink.Active and IsGridMode then - begin - APrevRecordCount := DataController.RecordCount; - DataLink.BufferCount := GetDataBufferCount; - FRecordIndex := DataLink.ActiveRecord; - if ((APrevRecordCount <> GetDataRecordCount) or IsInserting) {and - not DataController.FInUpdateGridModeBufferCount} then // !!! - begin - DataChanged(dcTotal, -1, -1); - if DataController.FInUpdateGridModeBufferCount and - (DataSet.State in dsEditModes) and not DataLink.ReadOnly then - DataLink.EditingChanged; - end - else - begin - if not IsEditing then - DataChanged(dcRecord, -1, -1); - DataController.UpdateFocused; - end; - end; -end; - -function TcxDBDataProvider.GetDetailHasChildren(ARecordIndex: Integer; ARelationIndex: Integer): Boolean; -var - ARelation: TcxDBDataRelation; - APatternDataController, ADetailDataController: TcxCustomDataController; - ADataController: TcxDBDataController; - AMasterDetailKeyValues: Variant; -begin - APatternDataController := DataController.GetPatternDataController; - if APatternDataController <> nil then - ADetailDataController := APatternDataController.Relations[ARelationIndex].DetailDataController - else - ADetailDataController := nil; //!!! - if ADetailDataController is TcxDBDataController then - begin - Result := True; - ADataController := TcxDBDataController(ADetailDataController); - ARelation := TcxDBDataRelation(DataController.Relations[ARelationIndex]); - // event - AMasterDetailKeyValues := ARelation.GetMasterRecordID(ARecordIndex); - if Assigned(DataController.FOnDetailHasChildren) then - DataController.FOnDetailHasChildren(DataController, ARecordIndex, ARelationIndex, - ADataController.MasterDetailKeyFieldNames, AMasterDetailKeyValues, Result) - else - if not (ADataController.IsGridMode or ADataController.DataModeController.DetailInSQLMode) then - begin - if Assigned(ADataController.DataSet) and ADataController.DataSet.Active then - begin - ADataController.Provider.Freeze; - try - ADataController.Provider.SavePos; - try - Result := ADataController.DataSet.Locate(ADataController.MasterDetailKeyFieldNames, - AMasterDetailKeyValues, []); // must be sort by Detail Keys - finally - ADataController.Provider.RestorePos; - end; - finally - ADataController.Provider.Unfreeze; - ADataController.SyncMasterPos; - end; - end - else - Result := False; - end; - end - else - Result := inherited GetDetailHasChildren(ARecordIndex, ARelationIndex); -end; - -function TcxDBDataProvider.GetRecordIndex: Integer; -begin - if not FInUpdateGridMode and IsInserting then - Result := EditingRecordIndex - else - if FInUpdateGridMode and IsInserting and DataController.NewItemRowFocused then - Result := DataController.NewItemRecordIndex - else - Result := FRecordIndex; -end; - -function TcxDBDataProvider.GetValueDefReaderClass: TcxValueDefReaderClass; -begin - Result := TcxValueDefDBReader; -end; - -procedure TcxDBDataProvider.AddNewRecord(AOperation: TDataOperation); - - procedure CheckDataSetBrowseMode; - begin - DataSet.CheckBrowseMode; - SmartDataChanged; - ResetSmartRefresh; - ResetEditing; - end; - -begin - if Assigned(DataSet) then - begin - FInInsert := True; - try - if DataSet.State in dsEditModes then - begin - if not IsSmartRefresh and (DataSet.State = dsInsert) then - DataController.CheckBrowseMode; - - if DataSet.State in dsEditModes then - DataLink.UpdateRecord; - - if IsSmartRefresh then - DataSet.DisableControls; - try - if IsSmartRefresh then - CheckDataSetBrowseMode; - AOperation; - finally - if IsSmartRefresh then - DataSet.EnableControls; - end; - end - else - AOperation; - finally - FInInsert := False; - end; - end; -end; - -function TcxDBDataProvider.GetDataController: TcxDBDataController; -begin - Result := inherited DataController as TcxDBDataController; -end; - -function TcxDBDataProvider.GetDataSet: TDataSet; -begin - if Assigned(DataLink) then - Result := DataLink.DataSet - else - Result := nil; -end; - -function TcxDBDataProvider.GetDataSource: TDataSource; -begin - if Assigned(DataLink) then - Result := DataLink.DataSource - else - Result := nil; -end; - -function TcxDBDataProvider.GetIsDataSetCurrent: Boolean; -begin - if DataController.IsDetailMode and not DataController.DataModeController.DetailInSQLMode and IsSyncMode then - Result := FInCanInitEditing or - ((FInInsert or - (((DataController.GetFocusedRowIndex <> -1) or FIsDataSetCurrent) and not IsOtherDetailDataSetInInsert) or - (DataController.UseNewItemRowForEditing and DataController.NewItemRowFocused and IsInserting)) and - not IsCanInitEditingBusy - ) - else - Result := FIsDataSetCurrent; -end; - -function TcxDBDataProvider.GetIsSmartRefresh: Boolean; -begin - Result := IsKeyNavigation and not IsGridMode and - DataController.DataModeController.SmartRefresh; -end; - -procedure TcxDBDataProvider.RemoveFromListeners; -var - I: Integer; - ADBDataProvider: TcxDBDataProvider; -begin - if DataSet = nil then Exit; - for I := 0 to DBDataProviders.Count - 1 do - begin - ADBDataProvider := TcxDBDataProvider(DBDataProviders[I]); - if (ADBDataProvider <> Self) and - (ADBDataProvider.DataSet = Self.DataSet) then - ADBDataProvider.FListeners.Remove(Self); - end; -end; - -procedure TcxDBDataProvider.SetDataSource(Value: TDataSource); -var - APrevDataLinkActive: Boolean; -begin - if Assigned(DataLink) and (DataLink.DataSource <> Value) then - begin -// FInSetDataSource := True; - try - APrevDataLinkActive := DataLink.Active; - DataLink.DataSource := Value; - if DataLink.Active = APrevDataLinkActive then - DataController.UpdateFields; - finally -// FInSetDataSource := False; - end; - end; -end; - -procedure TcxDBDataProvider.SetIsDataSetCurrent(Value: Boolean); -begin - if FIsDataSetCurrent <> Value then - begin - if Value then - DataController.ForEachDetail(DataController.GetMasterRelation, - DataController.ResetDataSetCurrent); - FIsDataSetCurrent := Value; - // Reopen? - DataController.DoDataSetCurrentChanged(Value); - end; -end; - -{ TcxValueDefDBReader } - -function TcxValueDefDBReader.GetDisplayText(AValueDef: TcxValueDef): string; -var - AField: TField; -begin - AField := TcxDBDataField(AValueDef.LinkObject).Field; - if Assigned(AField) then - Result := AField.DisplayText - else - Result := inherited GetDisplayText(AValueDef); -end; - -function TcxValueDefDBReader.GetValue(AValueDef: TcxValueDef): Variant; -var - AField: TField; -begin - AField := TcxDBDataField(AValueDef.LinkObject).Field; - if Assigned(AField) then - Result := GetFieldValue(AField) - else - Result := inherited GetValue(AValueDef); -end; - -function TcxValueDefDBReader.IsInternal(AValueDef: TcxValueDef): Boolean; -begin - Result := TcxDBDataField(AValueDef.LinkObject).IsValueDefInternal; -end; - -{ TcxDBDataField } - -destructor TcxDBDataField.Destroy; -begin - if Assigned(ParentField) then - ParentField.RemoveField(Self); - ClearFields; - inherited Destroy; -end; - -function TcxDBDataField.CanModify(AEditValueSource: TcxDataEditValueSource): Boolean; - - function IsLookupCanModify: Boolean; - var - I: Integer; - begin - Result := True; - for I := 0 to FieldCount - 1 do - if not Fields[I].CanModify(evsValue) then - begin - Result := False; - Break; - end; - end; - -begin - Result := inherited CanModify(AEditValueSource); - if not IsUnbound then - begin -// Result := inherited CanModify(AEditValueSource) and Assigned(Field); - Result := Result and Assigned(Field); - if Result then - begin - if IsLookup then - Result := (AEditValueSource = evsKey) and IsLookupCanModify - else - Result := IsFieldCanModify(Field, AEditValueSource = evsValue); - end; - end; -end; - -function TcxDBDataField.IsUnbound: Boolean; -begin - Result := not IsInternal and (FieldName = '') and - (Field = nil) and (ValueDef <> nil); -end; - -function TcxDBDataField.IsValueDefInternal: Boolean; -begin - Result := ((Field = nil) or DataController.IsGridMode) and - (not (IsUnbound and DataController.FInUnboundCopy)); -end; - -procedure TcxDBDataField.AddField(ADataField: TcxDBDataField); -begin - if FFields = nil then - FFields := TList.Create; - if FFields.IndexOf(ADataField) = -1 then - begin - if ADataField.FParentField <> nil then - InvalidOperation('ADataField.FParentField <> nil'); - FFields.Add(ADataField); - ADataField.FParentField := Self; - end; -end; - -procedure TcxDBDataField.ClearFields; -var - I: Integer; -begin - if FFields <> nil then - begin - for I := FFields.Count - 1 downto 0 do - TcxDBDataField(FFields[I]).Free; - FFields.Free; - FFields := nil; - end; -end; - -procedure TcxDBDataField.DoPropertiesChanged; - - procedure NotifyReferenceFields; - var - I: Integer; - begin - for I := 0 to FieldList.Count - 1 do - if (FieldList[I].ReferenceField = Self) and not FieldList[I].IsInternal then - DataController.DoValueTypeClassChanged(I); - end; - -begin - if not IsInternal then - DataController.DoValueTypeClassChanged(Index); - NotifyReferenceFields; -end; - -procedure TcxDBDataField.Reassign(ASource: TcxCustomDataField); -begin - inherited Reassign(ASource); - if ASource is TcxDBDataField then - begin - FField := TcxDBDataField(ASource).FField; - FFields := TcxDBDataField(ASource).FFields; - TcxDBDataField(ASource).FField := nil; - TcxDBDataField(ASource).FFields := nil; - end; -end; - -procedure TcxDBDataField.RemoveField(ADataField: TcxDBDataField); -begin - if FFields <> nil then - FFields.Remove(ADataField); - ADataField.FParentField := nil; -end; - -procedure TcxDBDataField.RemoveNotification(AComponent: TComponent); -begin - if Assigned(ReferenceField) then Exit; - inherited RemoveNotification(AComponent); - if Field = AComponent then - begin - if Provider.FInFirst and Provider.DataLink.Active and - not Provider.DataSet.Active then - Provider.RecreatedFieldsAfterFirst := True; - Field := nil; - Changed; - end; -end; - -procedure TcxDBDataField.SetPropertiesByField(AField: TField; AFieldChanged: Boolean); -var - ATextStored, AIsCurrency, AValueTypeClassChanged: Boolean; - AValueTypeClass: TcxValueTypeClass; - AChanged: Boolean; -begin - if Assigned(ReferenceField) then Exit; - repeat - if not IsInternal then - ATextStored := IsFieldFormatted(AField, DataController.GetItemValueSource(Index) = evsText) - else - ATextStored := IsFieldFormatted(AField, False); - AValueTypeClass := GetValueTypeClassByField(AField); - AIsCurrency := IsSimpleCurrencyField(AField); - AValueTypeClassChanged := (ValueTypeClass <> AValueTypeClass) or (IsCurrency <> AIsCurrency); - AChanged := AValueTypeClassChanged or (TextStored <> ATextStored); - if AChanged then - begin - BeginRecreateData; - try - TextStored := ATextStored; - ValueTypeClass := AValueTypeClass; - FIsCurrency := AIsCurrency; - finally - EndRecreateData; - end; - if AValueTypeClassChanged then - begin - DoPropertiesChanged; - AFieldChanged := False; - end; - end - else - if AFieldChanged then - DoPropertiesChanged; - until not AChanged; -end; - -function TcxDBDataField.GetDataController: TcxDBDataController; -begin - Result := inherited DataController as TcxDBDataController; -end; - -function TcxDBDataField.GetField: TField; -begin - if Assigned(ReferenceField) then - Result := (ReferenceField as TcxDBDataField).Field - else - Result := FField; -end; - -function TcxDBDataField.GetFieldItem(Index: Integer): TcxDBDataField; -begin - if Assigned(ReferenceField) then - Result := (ReferenceField as TcxDBDataField).Fields[Index] - else - Result := TcxDBDataField(FFields[Index]); -end; - -function TcxDBDataField.GetFieldCount: Integer; -begin - if Assigned(ReferenceField) then - Result := (ReferenceField as TcxDBDataField).FieldCount - else - if FFields <> nil then - Result := FFields.Count - else - Result := 0; -end; - -function TcxDBDataField.GetIsLookup: Boolean; -begin - Result := Assigned(Field) and Field.Lookup; -end; - -function TcxDBDataField.GetProvider: TcxDBDataProvider; -begin - Result := DataController.Provider; -end; - -procedure TcxDBDataField.SetField(Value: TField); -begin - if Assigned(ReferenceField) then Exit; - if (Value <> nil) and (csDestroying in Value.ComponentState) then - Value := nil; - if FField <> Value then - begin - FField := Value; - if Assigned(Value) then - Value.FreeNotification(Notifier); - ClearFields; - end; -end; - -{ TcxDBDataRelation } - -destructor TcxDBDataRelation.Destroy; -begin - RemoveMasterKeyField; - inherited Destroy; -end; - -function TcxDBDataRelation.GetMasterRecordID(ARecordIndex: Integer): Variant; -var - AList: TList; -begin - DataController.CheckRecordRange(ARecordIndex); - Result := Unassigned; - if IsLinked then - begin - AList := TList.Create; - try - GetMasterKeyFields(AList); - Result := DataController.GetInternalRecordId(ARecordIndex, AList); - finally - AList.Free; - end; - end; -end; - -procedure TcxDBDataRelation.GetMasterKeyFields(AList: TList); -begin - GetInternalKeyFields(FMasterKeyField, AList); -end; - -function TcxDBDataRelation.IsLinked: Boolean; -begin - Result := Assigned(FMasterKeyField) and (DetailKeyFieldNames <> ''); -end; - -procedure TcxDBDataRelation.RemoveDataField(ADataField: TcxCustomDataField); -begin - inherited RemoveDataField(ADataField); - if FMasterKeyField = ADataField then - FMasterKeyField := nil; -end; - -procedure TcxDBDataRelation.RemoveMasterKeyField; -begin - FMasterKeyField.Free; - FMasterKeyField := nil; -end; - -procedure TcxDBDataRelation.UpdateMasterDetailKeyFieldNames; -begin - if DataController.DetailMode = dcdmClone then Exit; - Changed; -end; - -function TcxDBDataRelation.GetDataController: TcxDBDataController; -begin - Result := inherited DataController as TcxDBDataController; -end; - -function TcxDBDataRelation.GetDetailKeyFieldNames: string; -var - ADataController: TcxCustomDataController; -begin - ADataController := DataController.GetPatternDataController; - if ADataController <> nil then - ADataController := ADataController.Relations[Self.Index].DetailDataController; - if (ADataController <> nil) and (ADataController is TcxDBDataController) then - Result := (ADataController as TcxDBDataController).DetailKeyFieldNames - else - Result := ''; -end; - -function TcxDBDataRelation.GetMasterKeyFieldNames: string; -var - ADataController: TcxCustomDataController; -begin - ADataController := DataController.GetPatternDataController; - if ADataController <> nil then - ADataController := ADataController.Relations[Self.Index].DetailDataController; - if (ADataController <> nil) and (ADataController is TcxDBDataController) then - Result := (ADataController as TcxDBDataController).MasterKeyFieldNames - else - Result := ''; -end; - -{ TcxDBDataFilterCriteriaItem } - -function TcxDBDataFilterCriteriaItem.GetFilterOperatorClass: TcxFilterOperatorClass; -var - ADataSet: TDataSet; - AOperatorAdapter: TcxDBFilterOperatorAdapter; -begin - Result := inherited GetFilterOperatorClass; - ADataSet := DataController.Provider.DataSet; - AOperatorAdapter := cxGetFilterOperatorAdapter(ADataSet); - if Assigned(AOperatorAdapter) then - AOperatorAdapter.PrepareOperatorClass(Self, ADataSet, Result); -end; - -function TcxDBDataFilterCriteriaItem.GetDataController: TcxDBDataController; -begin - Result := inherited DataController as TcxDBDataController; -end; - -function TcxDBDataFilterCriteriaItem.GetDBField: TcxDBDataField; -begin - Result := Field as TcxDBDataField; -end; - -{ TcxDBDataFilterCriteria } - -constructor TcxDBDataFilterCriteria.Create(ADataController: TcxCustomDataController); -begin - inherited Create(ADataController); - FIgnoreOrigin := True; -end; - -procedure TcxDBDataFilterCriteria.Assign(Source: TPersistent; AIgnoreItemNames: Boolean = False); -begin - if Source is TcxDBDataFilterCriteria then - begin - BeginUpdate; - try - inherited; - AutoDataSetFilter := TcxDBDataFilterCriteria(Source).AutoDataSetFilter; - IgnoreOrigin := TcxDBDataFilterCriteria(Source).IgnoreOrigin; - finally - EndUpdate; - end; - end - else - inherited; -end; - -procedure TcxDBDataFilterCriteria.AssignEvents(Source: TPersistent); -begin - inherited AssignEvents(Source); - if Source is TcxDBDataFilterCriteria then - begin - OnBeforeChange := TcxDBDataFilterCriteria(Source).OnBeforeChange; - OnFormatFilterTextValue := TcxDBDataFilterCriteria(Source).OnFormatFilterTextValue; - end; -end; - -function TcxDBDataFilterCriteria.IsAutoDataSetFilter: Boolean; -begin - Result := AutoDataSetFilter and not DataController.Provider.IsSmartRefresh; -end; - -function TcxDBDataFilterCriteria.IsFiltering: Boolean; -begin - Result := inherited IsFiltering and - not (Assigned(FOnBeforeChange) or IsAutoDataSetFilter); -end; - -procedure TcxDBDataFilterCriteria.RestoreDefaults; -begin - BeginUpdate; - try - inherited RestoreDefaults; - AutoDataSetFilter := False; - IgnoreOrigin := True; - finally - EndUpdate; - end; -end; - -procedure TcxDBDataFilterCriteria.FormatFilterTextValue(AItem: TcxFilterCriteriaItem; - const AValue: Variant; var ADisplayValue: string); -begin - if Assigned(FOnFormatFilterTextValue) then - FOnFormatFilterTextValue(Self, AValue, ADisplayValue); -end; - -function TcxDBDataFilterCriteria.GetItemClass: TcxFilterCriteriaItemClass; -begin - Result := TcxDBDataFilterCriteriaItem; -end; - -procedure TcxDBDataFilterCriteria.Update; -var - ADataSet: TDataSet; - AFilterText: string; - AFilterOptions: TFilterOptions; - AFilterActive: Boolean; -begin - if IsInternal then Exit; - if not IsDestroying then - begin - ADataSet := DataController.Provider.DataSet; - if Assigned(ADataSet) and (ADataSet.State in dsEditModes) then - try - DataController.CheckBrowseMode; - except - Active := False; - raise; - end; - if {Active and }Assigned(FOnBeforeChange) and not IsLoading then - FOnBeforeChange(Self, ADataSet, FilterText); - - if IsAutoDataSetFilter and Assigned(ADataSet) then - begin - AFilterText := FilterText; - AFilterOptions := []; - if fcoCaseInsensitive in Options then - AFilterOptions := AFilterOptions + [foCaseInsensitive] - else - AFilterOptions := AFilterOptions - [foCaseInsensitive]; - AFilterActive := Active and (AFilterText <> ''); - - if (ADataSet.Filter <> AFilterText) or (ADataSet.FilterOptions <> AFilterOptions) or - (ADataSet.Filtered <> AFilterActive) then - begin - ADataSet.DisableControls; - try - ADataSet.Filter := AFilterText; - ADataSet.FilterOptions := AFilterOptions; - ADataSet.Filtered := AFilterActive; - finally - ADataSet.EnableControls; - end; - end; - end; - end; - - inherited Update; - if not IsDestroying and DataController.Provider.IsSyncMode then - DataController.CheckFocusedRow; -end; - -function TcxDBDataFilterCriteria.GetDataController: TcxDBDataController; -begin - Result := inherited DataController as TcxDBDataController; -end; - -procedure TcxDBDataFilterCriteria.SetAutoDataSetFilter(Value: Boolean); -begin - if FAutoDataSetFilter <> Value then - begin - FAutoDataSetFilter := Value; - Changed; - end; -end; - -procedure TcxDBDataFilterCriteria.SetIgnoreOrigin(Value: Boolean); -begin - if FIgnoreOrigin <> Value then - begin - FIgnoreOrigin := Value; - Changed; - end; -end; - -{ TcxDBDataSummaryItem } - -procedure TcxDBDataSummaryItem.Assign(Source: TPersistent); -begin - if Source is TcxDBDataSummaryItem then - begin - BeginUpdate; - try - inherited Assign(Source); - FieldName := TcxDBDataSummaryItem(Source).FieldName; - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -function TcxDBDataSummaryItem.DataField: TcxCustomDataField; -begin - if Assigned(FDataField) then - Result := FDataField - else - Result := inherited DataField; -end; - -function TcxDBDataSummaryItem.IsCurrency(AVarType: TVarType): Boolean; -begin - Result := inherited IsCurrency(AVarType); - if (DataField <> nil) and - (DataController.DBFields[DataField.Index].Field <> nil) then - Result := DataController.DBFields[DataField.Index].IsCurrency; -end; - -function TcxDBDataSummaryItem.GetDBDataController: TcxDBDataController; -begin - Result := inherited DataController as TcxDBDataController; -end; - -procedure TcxDBDataSummaryItem.SetFieldName(const Value: string); -begin - if FFieldName <> Value then - begin - FFieldName := Value; - DataController.UpdateInternalKeyFields(FFieldName, FDataField); - end; -end; - -{ TcxDBDataController } - -constructor TcxDBDataController.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FDataModeController := TcxDBDataModeController.Create(Self); -end; - -destructor TcxDBDataController.Destroy; -begin - Destroying; // for CLR - ClearMasterDetailKeyFields; - RemoveKeyField; - FDataModeController.Free; - FDataModeController := nil; - inherited Destroy; -end; - -procedure TcxDBDataController.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxDBDataController then - begin - DataModeController := TcxDBDataController(Source).DataModeController; - DataSource := TcxDBDataController(Source).DataSource; - KeyFieldNames := TcxDBDataController(Source).KeyFieldNames; - DetailKeyFieldNames := TcxDBDataController(Source).DetailKeyFieldNames; - MasterKeyFieldNames := TcxDBDataController(Source).MasterKeyFieldNames; - OnDetailHasChildren := TcxDBDataController(Source).OnDetailHasChildren; - end; -end; - -function TcxDBDataController.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or Provider.DataLink.ExecuteAction(Action); -end; - -function TcxDBDataController.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or Provider.DataLink.UpdateAction(Action); -end; - -procedure TcxDBDataController.ActiveChanged(AActive: Boolean); -begin - // IsGridMode can change when DataSet is set (for unidirectional datasets) - if AActive then - RestructData; - inherited; -end; - -function TcxDBDataController.CanChangeDetailExpanding(ARecordIndex: Integer; - AExpanded: Boolean): Boolean; -begin - if IsGridMode and AExpanded then - begin - ChangeFocusedRecordIndex(ARecordIndex); - if FocusedRecordIndex <> ARecordIndex then // scroll by - begin - ChangeFocusedRecordIndex(ARecordIndex); - if FocusedRecordIndex <> ARecordIndex then - begin - Result := False; - Exit; - end; - end; - end; - Result := inherited CanChangeDetailExpanding(ARecordIndex, AExpanded); -end; - -function TcxDBDataController.CanFocusRecord(ARecordIndex: Integer): Boolean; -var - AInResetDataSetCurrent: Boolean; -begin - if (Provider.IsInserting and (ARecordIndex = Provider.EditingRecordIndex)) or - (UseNewItemRowForEditing and (ARecordIndex < 0)) then - begin - if not Provider.IsInserting and (ARecordIndex < 0) then - Post; - Result := True; - Exit; - end; - Provider.BeginLocate; - try - AInResetDataSetCurrent := False; - if IsDetailMode and DataModeController.DetailInSyncMode then - begin - if FInResetDataSetCurrent then - AInResetDataSetCurrent := True - else - CheckCurrentQuery; - end; - if not AInResetDataSetCurrent and Provider.IsSyncMode then - Result := TryFocusRecord(ARecordIndex) - else - Result := inherited CanFocusRecord(ARecordIndex); - finally - Provider.EndLocate; - end; - SyncMasterPos; -end; - -procedure TcxDBDataController.CheckDataSetCurrent; -begin - if FocusedRecordIndex <> -1 then - begin - FInResetDataSetCurrent := True; - try - Provider.IsDataSetCurrent := True; - finally - FInResetDataSetCurrent := False; - end; - end; -end; - -function TcxDBDataController.CheckMasterBrowseMode: Boolean; -var - AMasterRelation: TcxDBDataRelation; - AMasterDataController: TcxDBDataController; - ADataController: TcxDBDataController; - ALink, AMasterLink: TcxDataListenerLink; -begin - if FInResetDataSetCurrent then - begin - Result := True; - Exit; - end; - AMasterRelation := GetMasterRelation as TcxDBDataRelation; - if AMasterRelation <> nil then - begin - Result := False; - AMasterDataController := AMasterRelation.DataController; - if AMasterDataController.CheckMasterBrowseMode then - begin - ADataController := Self; - ALink := AddListenerLink(ADataController); - AMasterLink := AddListenerLink(AMasterDataController); - try - AMasterDataController.CheckBrowseMode; - if ALink.Ref <> nil then - begin - ADataController.CheckBrowseMode; - if (ALink.Ref <> nil) and (AMasterLink.Ref <> nil) then - Result := True; - end; - finally - RemoveListenerLink(AMasterLink); - RemoveListenerLink(ALink); - end; - end; - end - else - Result := True; -end; - -procedure TcxDBDataController.ClearMasterDetailKeyFields; -begin - FMasterDetailKeyFields.Free; - FMasterDetailKeyFields := nil; -end; - -procedure TcxDBDataController.CorrectAfterDelete(ARecordIndex: Integer); -begin - inherited CorrectAfterDelete(ARecordIndex); - if Provider.FUpdatingRecordIndex = ARecordIndex then - Provider.ResetSmartRefresh; - if Provider.FUpdatingPrevFocusedRecordIndex = ARecordIndex then - Provider.FUpdatingPrevFocusedRecordIndex := -1; -end; - -procedure TcxDBDataController.DoDataSetCurrentChanged(AIsCurrent: Boolean); -begin -end; - -procedure TcxDBDataController.DoDataSourceChanged; -begin -end; - -procedure TcxDBDataController.DoInitInsertingRecord(AInsertingRecordIndex: Integer); -begin -end; - -function TcxDBDataController.DoSearchInGridMode(const ASubText: string; - AForward, ANext: Boolean): Boolean; -begin - Search.Lock; - try - Result := Provider.DoLocate(ASubText, AForward, ANext); - if Result then - SyncSelectionFocusedRecord; - finally - Search.Unlock; - end; -end; - -function TcxDBDataController.FindRecordIndexInGridMode(const AKeyFieldValues: Variant): Integer; -var - AFieldList: TList; - I: Integer; -begin - Result := -1; - AFieldList := TList.Create; - try - GetKeyFields(AFieldList); - for I := 0 to RecordCount - 1 do - begin - if VarEquals(GetInternalRecordId(I, AFieldList), AKeyFieldValues) then - begin - Result := I; - Break; - end; - end; - finally - AFieldList.Free; - end; -end; - -procedure TcxDBDataController.DoUpdateRecord(ARecordIndex: Integer); -var - AValueDefReader: TcxValueDefReader; -begin - AValueDefReader := Provider.GetValueDefReaderClass.Create; - try - DataStorage.ReadRecord(ARecordIndex, AValueDefReader); - DoReadRecord(ARecordIndex); - finally - AValueDefReader.Free; - end; - if not Provider.FInCanInitEditing then - Change([dccUpdateRecord]); -end; - -function TcxDBDataController.GetActiveRecordIndex: Integer; -begin - if IsGridMode then - Result := Provider.DataLink.ActiveRecord - else - Result := inherited GetActiveRecordIndex; -end; - -function TcxDBDataController.GetDataProviderClass: TcxCustomDataProviderClass; -begin - Result := TcxDBDataProvider; -end; - -function TcxDBDataController.GetDataSelectionClass: TcxDataSelectionClass; -begin - Result := TcxDBDataSelection; -end; - -function TcxDBDataController.GetDefaultGridModeBufferCount: Integer; -begin - Result := 100; -end; - -function TcxDBDataController.GetFieldClass: TcxCustomDataFieldClass; -begin - Result := TcxDBDataField; -end; - -function TcxDBDataController.GetFilterCriteriaClass: TcxDataFilterCriteriaClass; -begin - Result := TcxDBDataFilterCriteria; -end; - -procedure TcxDBDataController.UpdateEditingRecord; -begin - if Provider.EditingRecordIndex = cxNullEditingRecordIndex then Exit; - Provider.FUpdatingRecordIndex := Provider.EditingRecordIndex; - Provider.FUpdatingRecordIsInserting := Provider.IsInserting; - DoUpdateRecord(Provider.EditingRecordIndex); -end; - -procedure TcxDBDataController.UpdateField(ADataField: TcxDBDataField; const AFieldNames: string; AIsLookup: Boolean); - - function CheckExistField(const AFieldName: string): Boolean; - var - I: Integer; - ACurrentField: TcxDBDataField; - APrevValueTypeClass: TcxValueTypeClass; - begin - APrevValueTypeClass := ADataField.ValueTypeClass; - ADataField.ReferenceField := nil; - Result := False; - if ADataField.FieldName = '' then - ADataField.ValueTypeClass := nil - else - begin - for I := 0 to Fields.Count - 1 do - begin - ACurrentField := DBFields[I]; - if ACurrentField <> ADataField then - begin - if IsEqualFieldNames(ACurrentField.FieldName, ADataField.FieldName) then - begin - ADataField.ReferenceField := ACurrentField; - Result := True; - Break; - end; - end; - end; - end; - if (ADataField.ValueTypeClass <> APrevValueTypeClass) and not ADataField.IsInternal then - DoValueTypeClassChanged(ADataField.Index); - end; - -var - APos: Integer; - ASubDataField: TcxDBDataField; -begin - ADataField.ClearFields; - if not AIsLookup then - begin - if ADataField.FieldName <> AFieldNames then - Fields.ReassignFields(ADataField); - ADataField.FieldName := AFieldNames; - end; - if AIsLookup or IsMultipleFieldNames(AFieldNames) then - begin - BeginUpdate; - try - ADataField.ReferenceField := nil; - APos := 1; - while APos <= Length(AFieldNames) do - begin - ASubDataField := AddInternalDBField; - ADataField.AddField(ASubDataField); - {$WARNINGS OFF} - UpdateField(ASubDataField, ExtractFieldName(AFieldNames, APos), False); - {$WARNINGS ON} - end; - finally - EndUpdate; - end; - end - else - begin - if CheckExistField(AFieldNames) then - Change([dccData]) - else - LayoutChanged([lcStructure]); - end; -end; - -procedure TcxDBDataController.ChangeFieldName(AItemIndex: Integer; const AFieldName: string); -begin - CheckItemRange(AItemIndex); - if GetItemFieldName(AItemIndex) <> AFieldName then - UpdateField(DBFields[AItemIndex], AFieldName, False); -end; - -function TcxDBDataController.GetItemByFieldName(const AFieldName: string): TObject; -var - I: Integer; -begin - Result := nil; - for I := 0 to ItemCount - 1 do - if AnsiCompareText(GetItemFieldName(I), AFieldName) = 0 then - begin - Result := GetItem(I); - Break; - end; -end; - -function TcxDBDataController.GetItemField(AItemIndex: Integer): TField; -begin - CheckItemRange(AItemIndex); - Result := DBFields[AItemIndex].Field; -end; - -function TcxDBDataController.GetItemFieldName(AItemIndex: Integer): string; -begin - CheckItemRange(AItemIndex); - Result := DBFields[AItemIndex].FieldName; -end; - -function TcxDBDataController.IsDisplayFormatDefined(AItemIndex: Integer; - AIgnoreSimpleCurrency: Boolean): Boolean; -begin - Result := inherited IsDisplayFormatDefined(AItemIndex, AIgnoreSimpleCurrency); - if Result and AIgnoreSimpleCurrency and (GetItemField(AItemIndex) <> nil) and - IsSimpleCurrencyField(GetItemField(AItemIndex)) then - Result := False; -end; - -procedure TcxDBDataController.Loaded; -begin - if not FLoaded and Provider.IsActiveDataSet then - LayoutChanged([lcStructure]); - inherited; - FLoaded := True; -end; - -procedure TcxDBDataController.BeginLocate; -begin - Provider.BeginLocate; -end; - -procedure TcxDBDataController.EndLocate; -begin - Provider.EndLocate; -end; - -function TcxDBDataController.GetGroupValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; -var - ADBField: TcxDBDataField; - I: Integer; - V: array of Variant; -begin - ADBField := AField as TcxDBDataField; - if ADBField.IsLookup then - begin - if ADBField.FieldCount = 1 then - Result := inherited GetGroupValue(ARecordIndex, ADBField[0]) - else - begin - SetLength(V, ADBField.FieldCount); - for I := 0 to ADBField.FieldCount - 1 do - V[I] := inherited GetGroupValue(ARecordIndex, ADBField[I]); - Result := V; - end; - end - else - Result := inherited GetGroupValue(ARecordIndex, AField); -end; - -procedure TcxDBDataController.GetKeyDBFields(AList: TList); -var - I: Integer; -begin - GetKeyFields(AList); - for I := 0 to AList.Count - 1 do - begin - AList[I] := TcxDBDataField(AList[I]).Field; - if AList[I] = nil then - InvalidOperation(cxSDBKeyFieldNotFound); - end; -end; - -function TcxDBDataController.GetKeyFieldsValues: Variant; -var - AKeyFields: TList; -begin - AKeyFields := TList.Create; - try - GetKeyDBFields(AKeyFields); - Result := GetDataSetValues(DataSet, AKeyFields); - finally - AKeyFields.Free; - end; -end; - -function TcxDBDataController.GetRecordId(ARecordIndex: Integer): Variant; -var - AList: TList; -begin - CheckRecordRange(ARecordIndex); - AList := TList.Create; - try - GetKeyFields(AList); - Result := GetInternalRecordId(ARecordIndex, AList); - finally - AList.Free; - end; -end; - -procedure TcxDBDataController.UpdateGridModeBufferCount; -begin - if IsGridMode then - begin - FInUpdateGridModeBufferCount := True; - try - Provider.UpdateGridMode; - finally - FInUpdateGridModeBufferCount := False; - end; - end; -end; - -procedure TcxDBDataController.CheckBrowseMode; -begin - FInCheckBrowseMode := True; - try - if Assigned(DataSet) then - begin -// if IsSmartRefresh or IsDetaimMOde then // !!! - if True then // !!! - begin - if DataSet.State <> dsInactive then - TDataSetAccess(DataSet).DataEvent(deCheckBrowseMode, 0); - if DataSet.State in [dsEdit, dsInsert] then - begin - DataSet.UpdateRecord; - if Provider.IsDataSetModified {DataSet.Modified} then - begin - if not IsSmartRefresh and not IsGridMode then - DataSet.DisableControls; // support AfterPost Requery - try - DataSet.Post; - finally - if not IsSmartRefresh and not IsGridMode then - DataSet.EnableControls; - end; - end - else - Cancel; - end; - end - else - DataSet.CheckBrowseMode; - end; - CheckDetailsBrowseMode; - finally - FInCheckBrowseMode := False; - end; -end; - -function TcxDBDataController.DataChangedNotifyLocked: Boolean; -begin - Result := inherited DataChangedNotifyLocked; - if not Result and IsGridMode and Assigned(DataSet) and - (DataSet.State = dsInsert) then - Result := True; -end; - -procedure TcxDBDataController.RefreshExternalData; -begin - if Assigned(DataSet) then - DataSet.Refresh; -end; - -procedure TcxDBDataController.SetFocus; -begin - if IsDetailMode and DataModeController.DetailInSyncMode then - CheckCurrentQuery; -end; - -function TcxDBDataController.IsBookmarkAvailable: Boolean; -begin - if IsGridMode then - Result := Length(FBookmark) <> 0 - else - Result := inherited IsBookmarkAvailable; -end; - -function TcxDBDataController.IsBookmarkRow(ARowIndex: Integer): Boolean; -var - ABookmark: TcxBookmark; -begin - if IsGridMode then - begin - Result := False; - if IsBookmarkAvailable and Assigned(DataSet) then - begin - ABookmark := DBSelection.GetRowBookmark(ARowIndex); - if Provider.CompareBookmarks(FBookmark, ABookmark) = 0 then - Result := True; - end; - end - else - Result := inherited IsBookmarkRow(ARowIndex); -end; - -function TcxDBDataController.GetFilterDataValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; -var - ADBField: TcxDBDataField; - I, AFieldCount: Integer; -begin - ADBField := AField as TcxDBDataField; - if Assigned(ADBField) and ADBField.IsLookup then - begin - AFieldCount := ADBField.FieldCount; - if AFieldCount > 0 then - begin - if AFieldCount = 1 then - Result := GetFilterDataValue(ARecordIndex, ADBField[0]) - else - begin - // Multiply Lookup Keys - Result := VarArrayCreate([0, AFieldCount - 1], varVariant); - for I := 0 to AFieldCount - 1 do - Result[I] := GetFilterDataValue(ARecordIndex, ADBField[I]); - end; - end - else - Result := Null; - end - else - Result := inherited GetFilterDataValue(ARecordIndex, AField); -end; - -function TcxDBDataController.GetFilterItemFieldName(AItem: TObject): string; -var - ADBField: TcxDBDataField; - I, AFieldCount: Integer; -begin - Result := ''; - ADBField := Fields.FieldByItem(AItem) as TcxDBDataField; - if Assigned(ADBField) then - if Assigned(ADBField.Field) then - if ADBField.IsLookup then - begin - AFieldCount := ADBField.FieldCount; - if ADBField.FieldCount > 0 then - if AFieldCount = 1 then - Result := GetFilterFieldName(ADBField[0].Field, Filter.IgnoreOrigin) - else - begin - // Multiply Lookup Keys - Result := GetFilterFieldName(ADBField[0].Field, Filter.IgnoreOrigin); - for I := 1 to AFieldCount - 1 do - Result := Result + ';' + GetFilterFieldName(ADBField[I].Field, Filter.IgnoreOrigin); - end - else - Result := ''; - end - else - Result := GetFilterFieldName(ADBField.Field, Filter.IgnoreOrigin) - else - Result := ADBField.FieldName; -end; - -function TcxDBDataController.FindRecordIndexByKey(const AKeyFieldValues: Variant): Integer; - - function GetVarArrayElementCount(const AVarArray: Variant): Integer; - begin - Result := VarArrayHighBound(AVarArray, 1) - VarArrayLowBound(AVarArray, 1) + 1; - end; - -var - ALocateObject: TcxDataControllerKeyLocateObject; - AValueDefReader: TcxValueDefUnboundReader; - I: Integer; -begin - if IsGridMode then - Result := FindRecordIndexInGridMode(AKeyFieldValues) - else - begin - ALocateObject := TcxDataControllerKeyLocateObject.Create(Self); - try - AValueDefReader := TcxValueDefUnboundReader.Create; - try - GetKeyFields(ALocateObject.FieldList); - if (ALocateObject.FieldList.Count = 1) and VarIsArray(AKeyFieldValues) or - (ALocateObject.FieldList.Count <> 1) and (not VarIsArray(AKeyFieldValues) or (GetVarArrayElementCount(AKeyFieldValues) < ALocateObject.FieldList.Count)) then - begin - Result := -1; - Exit; - end; - if ALocateObject.FieldList.Count = 1 then - AValueDefReader.SetValue(TcxDBDataField(ALocateObject.FieldList[0]).ValueDef, AKeyFieldValues) - else - begin - for I := 0 to ALocateObject.FieldList.Count - 1 do - AValueDefReader.SetValue(TcxDBDataField(ALocateObject.FieldList[I]).ValueDef, AKeyFieldValues[I]); - end; - ALocateObject.ReadData(AValueDefReader); - Result := ALocateObject.FindRecordIndex; - finally - AValueDefReader.Free; - end; - finally - ALocateObject.Free; - end; - end; -end; - -function TcxDBDataController.LocateByKey(const AKeyFieldValues: Variant): Boolean; - - function TryLocateInGridMode: Boolean; - begin - Result := False; - BeginLocate; - try - if DataSet <> nil then - Result := CanCallDataSetLocate(DataSet, KeyFieldNames, AKeyFieldValues) and - DataSet.Locate(KeyFieldNames, AKeyFieldValues, []); - finally - EndLocate; - end; - end; - -var - ARecordIndex, ARowIndex: Integer; -begin - ARecordIndex := FindRecordIndexByKey(AKeyFieldValues); - if (ARecordIndex = -1) and IsGridMode then - begin - Result := TryLocateInGridMode; - if Result then - SyncSelected(True); - Exit; - end; - ARowIndex := -1; - if ARecordIndex <> -1 then - ARowIndex := GetRowIndexByRecordIndex(ARecordIndex, True); - ChangeFocusedRowIndex(ARowIndex); - Result := ARowIndex <> -1; -end; - -procedure TcxDBDataController.CheckCurrentQuery; -begin - if DataModeController.DetailInSQLMode and - not DataModeController.DetailIsCurrentQuery(MasterDetailKeyFieldNames, - MasterDetailKeyValues) then - with Provider do - begin - Freeze; - FInCheckCurrentQuery := True; - try - First; - SavePos; - RestorePos; - FRecordIndex := 0; - finally - Unfreeze; - FInCheckCurrentQuery := False; - end; - end; -end; - -function TcxDBDataController.GetDetailFilterAdapter: TcxDBProviderDetailFilterAdapter; -var - AIndex: Integer; -begin - if cxDetailFilterControllers.FindAdapter(TDataSetClass(DataSet.ClassType), AIndex) then - Result := cxDetailFilterControllers[AIndex] as TcxDBProviderDetailFilterAdapter - else - begin - Result := nil; - InvalidOperation(cxSDBDetailFilterControllerNotFound); - end; -end; - -procedure TcxDBDataController.SetMasterRelation(AMasterRelation: TcxCustomDataRelation; - AMasterRecordIndex: Integer); -var - ARelation: TcxDBDataRelation; -begin - BeginUpdate; - try - inherited SetMasterRelation(AMasterRelation, AMasterRecordIndex); - if (AMasterRelation <> nil) and (AMasterRecordIndex <> -1) and - (AMasterRelation is TcxDBDataRelation) then - begin - ARelation := AMasterRelation as TcxDBDataRelation; - FMasterDetailKeyValues := ARelation.GetMasterRecordID(AMasterRecordIndex); - LayoutChanged([lcData]); - end; - finally - EndUpdate; - end; -end; - -function TcxDBDataController.GetRowId(ARowIndex: Integer): Variant; -begin - if not IsGridMode or (ARowIndex < 0) then - Result := inherited GetRowId(ARowIndex) - else - Result := DBSelection.GetRowBookmark(ARowIndex); -end; - -function TcxDBDataController.GetSelectedBookmark(Index: Integer): TcxBookmark; -begin - if not IsGridMode then InvalidOperation(cxSDBNotInGridMode); - if IsFocusedSelectedMode then - Result := DBSelection.GetRowBookmark(FocusedRowIndex) - else - Result := DBSelection.FBookmarks[Index]; -end; - -function TcxDBDataController.GetSelectedRowIndex(Index: Integer): Integer; -var - ASelection: TcxDBDataSelection; - I, ARowCount: Integer; - ABookmark: TcxBookmark; -begin - if not IsGridMode or IsFocusedSelectedMode then - Result := inherited GetSelectedRowIndex(Index) - else - begin - Result := -1; - ASelection := DBSelection; - ARowCount := GetRowCount; - ABookmark := ASelection.FBookmarks[Index]; -// bug in BDEDataSet.CachedUpdates mode - if (ASelection.CompareBookmarks(ASelection.GetRowBookmark(0), ABookmark) <= 0) and - (ASelection.CompareBookmarks(ABookmark, ASelection.GetRowBookmark(ARowCount - 1)) <= 0) then - begin - for I := 0 to ARowCount - 1 do - if ASelection.CompareBookmarks(ASelection.GetRowBookmark(I), ABookmark) = 0 then - begin - Result := I; - Break; - end; - end; - end; -end; - -function TcxDBDataController.GetSelectionAnchorBookmark: TcxBookmark; -begin - if not IsGridMode then InvalidOperation(cxSDBNotInGridMode); - Result := DBSelection.FAnchorBookmark; -end; - -function TcxDBDataController.GetSelectionAnchorRowIndex: Integer; -begin - if not IsGridMode then - Result := inherited GetSelectionAnchorRowIndex - else - Result := -1; -end; - -function TcxDBDataController.IsSelectionAnchorExist: Boolean; -begin - if not IsGridMode then - Result := inherited IsSelectionAnchorExist - else - Result := Length(GetSelectionAnchorBookmark) <> 0; -end; - -procedure TcxDBDataController.SelectAll; -begin - if not IsGridMode then - inherited SelectAll - else - DBSelection.SelectAll; -end; - -procedure TcxDBDataController.SelectFromAnchor(ARowIndex: Integer; AKeepSelection: Boolean); -var - ASelectionAnchorBookmark: TcxBookmark; - ASelection: TcxDBDataSelection; -begin - if not IsGridMode then - inherited SelectFromAnchor(ARowIndex, AKeepSelection) - else - begin - DataControllerInfo.CheckRowIndex(ARowIndex); - ASelectionAnchorBookmark := GetSelectionAnchorBookmark; - if Length(ASelectionAnchorBookmark) <> 0 then - begin - ASelection := DBSelection; - ASelection.SelectFromAnchor(ASelection.GetRowBookmark(ARowIndex), AKeepSelection); - end; - end; -end; - -procedure TcxDBDataController.SetSelectionAnchor(ARowIndex: Integer); -var - ASelection: TcxDBDataSelection; -begin - if not IsGridMode then - inherited SetSelectionAnchor(ARowIndex) - else - begin - DataControllerInfo.CheckRowIndex(ARowIndex); - ASelection := DBSelection; - ASelection.FAnchorBookmark := ASelection.GetRowBookmark(ARowIndex); - end; -end; - -function TcxDBDataController.FocusSelectedRow(ASelectedIndex: Integer): Boolean; -begin - Result := False; - if Assigned(DataSet) then // DataSet_BookmarkAvailable - begin - DataSet.Bookmark := GetSelectedBookmark(ASelectedIndex); - Result := True; - end; -end; - -procedure TcxDBDataController.ForEachRow(ASelectedRows: Boolean; AProc: TcxDataControllerEachRowProc); - - procedure DoProc; - var - ARowIndex: Integer; - begin - ARowIndex := GetFocusedRowIndex; - AProc(ARowIndex, GetRowInfo(ARowIndex)); - end; - -var - I: Integer; -begin - if not IsGridMode then - inherited ForEachRow(ASelectedRows, AProc) - else - if DataSet <> nil then - begin - if ASelectedRows then - begin - if IsFocusedSelectedMode then - if GetFocusedRowIndex <> -1 then - DoProc - else - else - for I := 0 to GetSelectedCount - 1 do - begin - DataSet.Bookmark := GetSelectedBookmark(I); - DoProc; - end; - end - else - begin - DataSet.First; - while not DataSet.EOF do - begin - DoProc; - DataSet.Next; - end; - end; - end; -end; - -function TcxDBDataController.IsSequenced: Boolean; -begin - Result := Assigned(DataSet) and DataSet.IsSequenced; -end; - -procedure TcxDBDataController.ChangeValueTypeClass(AItemIndex: Integer; - AValueTypeClass: TcxValueTypeClass); -begin - CheckItemRange(AItemIndex); - if not Assigned(DBFields[AItemIndex].Field) then - inherited ChangeValueTypeClass(AItemIndex, AValueTypeClass); -end; - -procedure TcxDBDataController.GetKeyFields(AList: TList); -begin - GetInternalKeyFields(FKeyField, AList); -end; - -function TcxDBDataController.GetRelationClass: TcxCustomDataRelationClass; -begin - Result := TcxDBDataRelation; -end; - -function TcxDBDataController.GetSummaryItemClass: TcxDataSummaryItemClass; -begin - Result := TcxDBDataSummaryItem; -end; - -procedure TcxDBDataController.InvalidateDataBuffer; -begin - Change([dccLayout]); -end; - -function TcxDBDataController.InternalCheckBookmark(ADeletedRecordIndex: Integer): Boolean; -begin - if IsGridMode then - Result := not (Assigned(DataSet) and Provider.BookmarkValid(FBookmark)) - else - Result := inherited InternalCheckBookmark(ADeletedRecordIndex); -end; - -procedure TcxDBDataController.InternalClearBookmark; -begin - SetLength(FBookmark, 0); - inherited InternalClearBookmark; -end; - -procedure TcxDBDataController.InternalGotoBookmark; -begin - if IsGridMode then - begin - if Assigned(DataSet) then - begin - DataSet.Bookmark := FBookmark; - CorrectPrevSelectionChangedInfo; - end; - end - else - inherited InternalGotoBookmark; -end; - -function TcxDBDataController.InternalSaveBookmark: Boolean; -var - ABookmark: TcxBookmark; -begin - if IsGridMode then - begin - Result := False; - if Assigned(DataSet) then - begin - ABookmark := DataSet.Bookmark; - if (Length(FBookmark) = 0) or - (Provider.CompareBookmarks(FBookmark, ABookmark) <> 0) then - FBookmark := ABookmark; - end; - end - else - Result := inherited InternalSaveBookmark; -end; - -function TcxDBDataController.IsDataField(AField: TcxCustomDataField): Boolean; -begin - Result := inherited IsDataField(AField) or - (TcxDBDataField(AField).Field <> nil); -end; - -function TcxDBDataController.IsKeyNavigation: Boolean; -begin - Result := (FKeyField <> nil) and not IsGridMode; -end; - -function TcxDBDataController.LocateRecordIndex(AGetFieldsProc: TGetListProc): Integer; -var - ALocateObject: TcxDataControllerKeyLocateObject; - AValueDefReader: TcxValueDefReader; -begin - ALocateObject := TcxDataControllerKeyLocateObject.Create(Self); - try - AGetFieldsProc(ALocateObject.FieldList); - AValueDefReader := Provider.GetValueDefReaderClass.Create; - try - ALocateObject.ReadData(AValueDefReader); - finally - AValueDefReader.Free; - end; - Result := ALocateObject.FindRecordIndex; - finally - ALocateObject.Free; - end; -end; - -function TcxDBDataController.LockOnAfterSummary: Boolean; -begin - Result := inherited LockOnAfterSummary or FInUpdateGridModeBufferCount or - ((DataSet <> nil) and not DataSet.Active and DataSet.DefaultFields and - ((Provider.ActiveChanging and FResetDBFields) or DataSet.ControlsDisabled)); - { - if not Result and IsGridMode and IsDetailMode and not IsPattern and - DataSet.Active then - begin - if not VarEquals(GetDataSetValues(DataSet, MasterDetailKeyFields), MasterDetailKeyValues) then - Result := True; - end; - } -end; - -procedure TcxDBDataController.NotifyDataControllers; -var - I: Integer; -begin - if Provider.FInNotify then Exit; - Provider.FInNotify := True; - try - for I := Provider.FListeners.Count - 1 downto 0 do - begin - TcxDBDataProvider(Provider.FListeners[I]).DataLink.DataSetChanged; - Provider.FListeners.Delete(I); - end; - finally - Provider.FInNotify := False; - end; -end; - -procedure TcxDBDataController.NotifyDetailAfterFieldsRecreating(ADataController: TcxCustomDataController); -var - ADBDataController: TcxDBDataController; -begin - if ADataController = FCreatedDataController then Exit; - ADBDataController := ADataController as TcxDBDataController; - ADBDataController.UpdateFields; - ADBDataController.Change([dccData]); // for Grid -end; - -procedure TcxDBDataController.NotifyDetailsAfterFieldsRecreating(ACreatingLinkObject: Boolean); -begin - if ACreatingLinkObject then - FCreatedDataController := Self - else - FCreatedDataController := nil; - ForEachDetail(GetMasterRelation, NotifyDetailAfterFieldsRecreating); -end; - -procedure TcxDBDataController.PrepareField(AField: TcxCustomDataField); -begin - inherited PrepareField(AField); - RetrieveField(AField as TcxDBDataField, False); -end; - -procedure TcxDBDataController.RemoveNotification(AComponent: TComponent); -begin - inherited RemoveNotification(AComponent); - MasterDetailKeyFieldsRemoveNotification(AComponent); -end; - -procedure TcxDBDataController.ResetDataSetCurrent(ADataController: TcxCustomDataController); -var - ADBDataController: TcxDBDataController; -begin - ADBDataController := ADataController as TcxDBDataController; - if ADBDataController.FInResetDataSetCurrent then Exit; - ADBDataController.FInResetDataSetCurrent := True; - try - ADBDataController.Provider.IsDataSetCurrent := False; - ADBDataController.ChangeFocusedRecordIndex(-1); - finally - ADBDataController.FInResetDataSetCurrent := False; - end; -end; - -procedure TcxDBDataController.ResetDBFields; -begin - FResetDBFields := True; - try - UpdateFields; - finally - FResetDBFields := False; - end; -end; - -procedure TcxDBDataController.RestructData; -begin - if not IsGridMode then - Provider.DataLink.BufferCount := 1; - inherited RestructData; -end; - -procedure TcxDBDataController.ResyncDBFields; -begin - UpdateFields; -end; - -function TcxDBDataController.IsOtherDetailChanged: Boolean; -begin - Result := IsDetailMode and DataModeController.DetailInSQLMode and - (not DataModeController.DetailInSyncMode or - (not Provider.IsDataSetCurrent and not VarIsEmpty(MasterDetailKeyValues) and - not VarEquals(GetDataSetValues(DataSet, MasterDetailKeyFields), MasterDetailKeyValues)) - ); -end; - -function TcxDBDataController.IsOtherDetailCreating: Boolean; -var - I: Integer; - ADBDataProvider: TcxDBDataProvider; -begin - Result := False; - for I := 0 to DBDataProviders.Count - 1 do - begin - ADBDataProvider := TcxDBDataProvider(DBDataProviders[I]); - if {(ADBDataProvider <> Provider) and} - (ADBDataProvider.DataSet = Provider.DataSet) then - begin - if ADBDataProvider.DataController.FInCheckCurrentQuery or - ((ADBDataProvider.DataController.GetMasterDataController <> nil) and - ADBDataProvider.DataController.GetMasterDataController.IsCreatingLinkObject) then - begin - Result := True; - Break; - end; - end; - end; -end; - -function TcxDBDataController.IsProviderDataSource: Boolean; -begin - Result := True; -end; - -function TcxDBDataController.IsSmartRefresh: Boolean; -begin - Result := Provider.IsSmartRefresh; -end; - -procedure TcxDBDataController.LoadStorage; -begin - SaveKeys; - try - inherited LoadStorage; - Provider.ResetPostLocateFlag; - finally - RestoreKeys; - end; -end; - -procedure TcxDBDataController.RetrieveField(ADataField: TcxDBDataField; AIsLookupKeyOnly: Boolean); - - function IsLookupKeyField(ADataField: TcxDBDataField): Boolean; - begin - Result := Assigned(ADataField.ParentField) and Assigned(ADataField.ParentField.Field) and - ADataField.ParentField.Field.Lookup; - end; - -var - APrevField: TField; -begin - if Assigned(ADataField.ReferenceField) then Exit; - if AIsLookupKeyOnly and not IsLookupKeyField(ADataField) then Exit; - if Assigned(Provider.DataSet) then - begin - APrevField := ADataField.Field; - if not FResetDBFields then - begin - ADataField.Field := Provider.DataSet.Fields.FindField(ADataField.FieldName); - if ADataField.Field = nil then - ADataField.Field := Provider.DataSet.AggFields.FindField(ADataField.FieldName); - end - else - ADataField.Field := nil; - if Assigned(ADataField.Field) then - begin - if (ADataField.Field = APrevField) and IsOtherDetailCreating then - Exit; - ADataField.SetPropertiesByField(ADataField.Field, ADataField.Field <> APrevField); - if ADataField.Field.Lookup then - UpdateField(ADataField, ADataField.Field.KeyFields, True); - end - else - ADataField.DoPropertiesChanged; - end; -end; - -function TcxDBDataController.TryFocusRecord(ARecordIndex: Integer): Boolean; -var - ARecordId: Variant; -begin - if ARecordIndex < 0 then - Result := False - else - begin - if IsKeyNavigation then - begin - // check Equals before Locate - ARecordId := GetRecordId(ARecordIndex); - if VarEquals(ARecordId, GetKeyFieldsValues) and - (Provider.FRecordIndex = ARecordIndex) then - begin - CheckBrowseMode; // !!!!! - Result := True; - end - else - begin - CheckBrowseMode; // !!!!! - Result := Provider.DataSet.Locate(KeyFieldNames, ARecordId, []); - end; -// Result := (VarEquals(ARecordId, GetKeyFieldsValues) and (Provider.FRecordIndex = ARecordIndex)) or -// Provider.DataSet.Locate(KeyFieldNames, GetRecordId(ARecordIndex), []); - end - else - begin - CheckBrowseMode; // !!!!! - Provider.MoveBy(ARecordIndex - Provider.FRecordIndex); - Result := True; - end; - end; -end; - -function TcxDBDataController.AddInternalDBField: TcxDBDataField; -begin - Result := AddInternalField as TcxDBDataField; -end; - -procedure TcxDBDataController.UpdateFields; -begin - inherited UpdateFields; - UpdateLookupFields; -end; - -procedure TcxDBDataController.UpdateFocused; -begin - BeginUpdate; - try - inherited UpdateFocused; - if Provider.IsSyncMode then - SyncDataSetPos; - finally - EndUpdate; - end; -end; - -procedure TcxDBDataController.UpdateInternalKeyFields(const AFieldNames: string; - var AField: TcxDBDataField); -begin - if AFieldNames = '' then - begin - AField.Free; - AField := nil; - Change([dccData]); - end - else - begin - if AField = nil then - AField := AddInternalDBField; - UpdateField(AField, AFieldNames, False); - end; -end; - -procedure TcxDBDataController.UpdateLookupFields; -var - I: Integer; -begin - for I := 0 to Fields.Count - 1 do - RetrieveField(DBFields[I], True); -end; - -procedure TcxDBDataController.UpdateRelations(ARelation: TcxCustomDataRelation); -begin - inherited UpdateRelations(ARelation); - UpdateRelationFields; -end; - -procedure TcxDBDataController.UpdateScrollBars; -begin -end; - -procedure TcxDBDataController.BeginReadRecord; -begin - FInUnboundCopy := True; -end; - -procedure TcxDBDataController.EndReadRecord; -begin - FInUnboundCopy := False; -end; - -function TcxDBDataController.GetDataSet: TDataSet; -begin - Result := Provider.DataSet; -end; - -function TcxDBDataController.GetDataSetRecordCount: Integer; -begin - if Assigned(DataSet) and DataSet.Active then - Result := DataSet.RecordCount - else - Result := 0; -end; - -function TcxDBDataController.GetDataSource: TDataSource; -begin - Result := Provider.DataSource; -end; - -function TcxDBDataController.GetDBField(Index: Integer): TcxDBDataField; -begin - Result := Fields[Index] as TcxDBDataField; -end; - -function TcxDBDataController.GetDBSelection: TcxDBDataSelection; -begin - Result := DataControllerInfo.Selection as TcxDBDataSelection; -end; - -function TcxDBDataController.GetFilter: TcxDBDataFilterCriteria; -begin - Result := inherited Filter as TcxDBDataFilterCriteria; -end; - -function TcxDBDataController.GetMasterDetailKeyFieldNames: string; -begin - if MasterKeyFieldNames <> '' then - Result := DetailKeyFieldNames - else - Result := ''; -end; - -function TcxDBDataController.GetMasterDetailKeyFields: TList; -var - I: Integer; -begin - if FMasterDetailKeyFields = nil then - begin - FMasterDetailKeyFields := TList.Create; - if Assigned(Provider.DataSet) then - begin - Provider.DataSet.GetFieldList(FMasterDetailKeyFields, MasterDetailKeyFieldNames); - for I := 0 to FMasterDetailKeyFields.Count - 1 do - if FMasterDetailKeyFields[I] <> nil then - TField(FMasterDetailKeyFields[I]).FreeNotification(Notifier); - end; - end; - Result := FMasterDetailKeyFields; -end; - -function TcxDBDataController.GetProvider: TcxDBDataProvider; -begin - Result := inherited Provider as TcxDBDataProvider; -end; - -function TcxDBDataController.GetRecNo: Integer; -begin - if DataSet.Active then - Result := DataSet.RecNo - else - Result := -1; -end; - -procedure TcxDBDataController.MasterDetailKeyFieldsRemoveNotification(AComponent: TComponent); -begin - if Assigned(FMasterDetailKeyFields) and - (FMasterDetailKeyFields.IndexOf(AComponent) <> -1) then - ClearMasterDetailKeyFields; -end; - -procedure TcxDBDataController.RemoveKeyField; -begin - FKeyField.Free; - FKeyField := nil; -end; - -procedure TcxDBDataController.SetDataModeController(Value: TcxDBDataModeController); -begin - FDataModeController.Assign(Value); -end; - -procedure TcxDBDataController.SetDataSource(Value: TDataSource); -var - APrevDataSource: TDataSource; -begin - APrevDataSource := DataSource; - Provider.DataSource := Value; - if DataSource <> APrevDataSource then - DoDataSourceChanged; -end; - -procedure TcxDBDataController.SetDetailKeyFieldNames(const Value: string); -begin - if FDetailKeyFieldNames <> Value then - begin - FDetailKeyFieldNames := Value; - if GetMasterRelation <> nil then - (GetMasterRelation as TcxDBDataRelation).UpdateMasterDetailKeyFieldNames; - end; -end; - -procedure TcxDBDataController.SetFilter(Value: TcxDBDataFilterCriteria); -begin - inherited Filter := Value; -end; - -procedure TcxDBDataController.SetKeyFieldNames(const Value: string); -begin - if FKeyFieldNames <> Value then - begin - FKeyFieldNames := Value; - UpdateInternalKeyFields(FKeyFieldNames, FKeyField); - end; -end; - -procedure TcxDBDataController.SetMasterKeyFieldNames(const Value: string); -begin - if FMasterKeyFieldNames <> Value then - begin - FMasterKeyFieldNames := Value; - if GetMasterRelation <> nil then - (GetMasterRelation as TcxDBDataRelation).UpdateMasterDetailKeyFieldNames; - end; -end; - -procedure TcxDBDataController.SetRecNo(Value: Integer); -begin - DataSet.RecNo := Value; -end; - -procedure TcxDBDataController.SyncDataSetPos; -var - APrevRecordIndex: Integer; -begin - if DetailMode = dcdmPattern then - begin - if not IsLoading and not Provider.ActiveChanging and not Provider.IsDataSetBusy then // !!! - SyncMasterDetailDataSetPos; - end - else - if IsKeyNavigation then - begin - APrevRecordIndex := Provider.FRecordIndex; - Provider.FRecordIndex := LocateRecordIndex(GetKeyFields); - if APrevRecordIndex <> Provider.FRecordIndex then - UpdateFocused; - end; -end; - -function TcxDBDataController.SyncMasterDetail: TcxCustomDataController; - - function ExpandDetails(ADataController: TcxCustomDataController; - ARelationIndex: Integer; const AMasterKeyValues: Variant): TcxCustomDataController; - var - ARowIndex, ARecordIndex, ACurRelationIndex: Integer; - ACurDetailDataController: TcxDBDataController; - ACurMasterRelation: TcxDBDataRelation; - ACurMasterDetailKeyValues: Variant; - begin - Result := nil; - ARowIndex := ADataController.GetFocusedRowIndex; - if ARowIndex <> -1 then - begin - ARecordIndex := ADataController.GetRowInfo(ARowIndex).RecordIndex; - ADataController.ChangeDetailExpanding(ARecordIndex, True); - if ADataController.GetDetailExpanding(ARecordIndex) then - begin - // Check current detail - ACurRelationIndex := ADataController.GetDetailActiveRelationIndex(ARecordIndex); - if ARelationIndex <> ACurRelationIndex then - begin - ACurDetailDataController := ADataController.GetDetailDataController(ARecordIndex, ACurRelationIndex) as TcxDBDataController; - ACurMasterRelation := ACurDetailDataController.GetMasterRelation as TcxDBDataRelation; - ACurMasterDetailKeyValues := ACurDetailDataController.Provider.DataSet.FieldValues[ACurMasterRelation.DetailKeyFieldNames]; - if VarEquals(AMasterKeyValues, ACurMasterDetailKeyValues) then - begin - Result := ACurDetailDataController; - Exit; - end; - end; - ADataController.ChangeDetailActiveRelationIndex(ARecordIndex, ARelationIndex); - Result := ADataController.GetDetailDataController(ARecordIndex, ARelationIndex) - end; - end; - end; - - function IsMastersInSyncMode(AMasterDataController: TcxDBDataController): Boolean; - var - AMasterRelation: TcxDBDataRelation; - begin - Result := AMasterDataController.Provider.IsSyncMode and - AMasterDataController.IsKeyNavigation and - not AMasterDataController.Provider.IsEditing; - if Result then - begin - AMasterRelation := AMasterDataController.GetMasterRelation as TcxDBDataRelation; - if AMasterRelation <> nil then - Result := IsMastersInSyncMode(AMasterRelation.DataController); - end; - end; - -var - AMasterRelation: TcxDBDataRelation; - AMasterDetailKeyValues, AMasterKeyValues: Variant; - AMasterDataController: TcxDBDataController; - ADataController: TcxCustomDataController; - AEqualFlag: Boolean; -begin - if (GetMasterRelation <> nil) and (MasterDetailKeyFieldNames <> '') then - begin - Result := nil; - if not (GetMasterRelation is TcxDBDataRelation) then Exit; - - AMasterRelation := GetMasterRelation as TcxDBDataRelation; - AMasterDataController := AMasterRelation.DataController; - - if Provider.IsSyncMode and IsMastersInSyncMode(AMasterDataController) and - not AMasterDataController.IsCreatingLinkObject then - begin - AMasterDataController.FUpdateDataSetPos := True; - try - AMasterDetailKeyValues := Provider.DataSet.FieldValues[AMasterRelation.DetailKeyFieldNames]; - AMasterKeyValues := AMasterDataController.Provider.DataSet.FieldValues[AMasterRelation.MasterKeyFieldNames]; - AEqualFlag := VarEquals(AMasterKeyValues, AMasterDetailKeyValues); - if not (AEqualFlag and AMasterDataController.FInFocusDetails) then // !!! - begin - if not AEqualFlag then - begin - AMasterDataController.Provider.BeginLocate; - try - AEqualFlag := AMasterDataController.Provider.DataSet.Locate(AMasterRelation.MasterKeyFieldNames, - AMasterDetailKeyValues, []); - finally - AMasterDataController.Provider.EndLocate; - end; - end; - if AEqualFlag then - begin - ADataController := AMasterDataController.SyncMasterDetail; - if ADataController <> nil then - Result := ExpandDetails(ADataController, AMasterRelation.Index, AMasterKeyValues); - SyncMasterPos; - end; - end; - finally - AMasterDataController.FUpdateDataSetPos := False; - end; - end; - end - else - Result := Self; -end; - -procedure TcxDBDataController.SyncMasterDetailDataSetPos; -begin - if FUpdateDataSetPos or FInCheckBrowseMode then Exit; - SyncMasterDetail; -end; - -procedure TcxDBDataController.UpdateRelationFields; -var - I: Integer; - AMasterKeyFieldNames: string; - AMasterKeyField: TcxDBDataField; -begin - for I := 0 to Relations.Count - 1 do - if Relations[I] is TcxDBDataRelation then - begin - AMasterKeyFieldNames := (Relations[I] as TcxDBDataRelation).MasterKeyFieldNames; - AMasterKeyField := (Relations[I] as TcxDBDataRelation).FMasterKeyField; - UpdateInternalKeyFields(AMasterKeyFieldNames, AMasterKeyField); - (Relations[I] as TcxDBDataRelation).FMasterKeyField := AMasterKeyField; - end; -end; - -initialization - cxDetailFilterControllers := TcxDBAdapterList.Create; - cxDetailFilterControllers.RegisterAdapter(TDataSet, TcxDBProviderDetailFilterAdapter); - -finalization - cxDetailFilterControllers.Free; - cxDetailFilterControllers := nil; - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxDBFilter.pas b/internal/x.46/ExpressDataController/Sources/cxDBFilter.pas deleted file mode 100644 index 23515bcc..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxDBFilter.pas +++ /dev/null @@ -1,126 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBFilter; - -{$I cxVer.inc} - -interface - -uses - DB, cxFilter, cxDB; - -type - { TcxFilterSQLNullOperator } - - TcxFilterSQLNullOperator = class(TcxFilterNullOperator) - public - function FilterText: string; override; - end; - - { TcxFilterSQLNotNullOperator } - - TcxFilterSQLNotNullOperator = class(TcxFilterNotNullOperator) - public - function FilterText: string; override; - end; - - { TcxDBFilterOperatorAdapter } - - TcxDBFilterOperatorAdapter = class(TcxDBAdapterItem) - public - procedure PrepareOperatorClass(ASender: TObject; ADataSet: TDataSet; - var AOperatorClass: TcxFilterOperatorClass); virtual; - end; - -function cxGetFilterOperatorAdapter(ADataSet: TDataSet): TcxDBFilterOperatorAdapter; - -var - cxFilterOperatorAdapters: TcxDBAdapterList; - -implementation - -uses - SysUtils; - -function cxGetFilterOperatorAdapter(ADataSet: TDataSet): TcxDBFilterOperatorAdapter; -var - AIndex: Integer; -begin - if Assigned(ADataSet) and cxFilterOperatorAdapters.FindAdapter(TDataSetClass(ADataSet.ClassType), AIndex) then - Result := cxFilterOperatorAdapters[AIndex] as TcxDBFilterOperatorAdapter - else - Result := nil; -end; - -{ TcxFilterSQLNullOperator } - -function TcxFilterSQLNullOperator.FilterText: string; -begin - Result := 'IS'; -end; - -{ TcxFilterSQLNotNullOperator } - -function TcxFilterSQLNotNullOperator.FilterText: string; -begin - Result := 'IS NOT'; -end; - -{ TcxDBFilterOperatorAdapter } - -procedure TcxDBFilterOperatorAdapter.PrepareOperatorClass(ASender: TObject; - ADataSet: TDataSet; var AOperatorClass: TcxFilterOperatorClass); -begin - if AOperatorClass.InheritsFrom(TcxFilterNullOperator) or - AOperatorClass.InheritsFrom(TcxFilterNotNullOperator) then - begin - if Pos(AnsiUpperCase('Query'), AnsiUpperCase(ADataSet.ClassName)) <> 0 then - if AOperatorClass.InheritsFrom(TcxFilterNotNullOperator) then - AOperatorClass := TcxFilterSQLNotNullOperator - else - AOperatorClass := TcxFilterSQLNullOperator; - end; -end; - -initialization - cxFilterOperatorAdapters := TcxDBAdapterList.Create; - cxFilterOperatorAdapters.RegisterAdapter(TDataSet, TcxDBFilterOperatorAdapter); - -finalization - cxFilterOperatorAdapters.Free; - cxFilterOperatorAdapters := nil; - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxData.pas b/internal/x.46/ExpressDataController/Sources/cxData.pas deleted file mode 100644 index 648d872e..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxData.pas +++ /dev/null @@ -1,70 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxData; - -{$I cxVer.inc} - -interface - -uses - Classes, cxCustomData; - -type - { TcxDataController } - - TcxDataController = class(TcxCustomDataController) - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - end; - -implementation - -{ TcxDataController } - -constructor TcxDataController.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ActiveChanged(True); -end; - -destructor TcxDataController.Destroy; -begin -// ActiveChanged(False); - inherited Destroy; -end; - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxDataConsts.pas b/internal/x.46/ExpressDataController/Sources/cxDataConsts.pas deleted file mode 100644 index e6470f8e..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxDataConsts.pas +++ /dev/null @@ -1,95 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDataConsts; - -{$I cxVer.inc} - -interface - -resourcestring - // Data - cxSDataReadError = 'Stream read error'; - cxSDataWriteError = 'Stream write error'; - cxSDataItemExistError = 'Item already exists'; - cxSDataRecordIndexError = 'RecordIndex out of range'; - cxSDataItemIndexError = 'ItemIndex out of range'; - cxSDataProviderModeError = 'This operation is not supported in provider mode'; - cxSDataInvalidStreamFormat = 'Invalid stream format'; - cxSDataRowIndexError = 'RowIndex out of range'; -// cxSDataRelationItemExistError = 'Relation Item already exists'; -// cxSDataRelationCircularReference = 'Circular Reference on Detail DataController'; -// cxSDataRelationMultiReferenceError = 'Reference on Detail DataController already exists'; - cxSDataCustomDataSourceInvalidCompare = 'GetInfoForCompare not implemented'; - // DB -// cxSDBDataSetNil = 'DataSet is nil'; - cxSDBDetailFilterControllerNotFound = 'DetailFilterController not found'; - cxSDBNotInGridMode = 'DataController not in GridMode'; - cxSDBKeyFieldNotFound = 'Key Field not found'; - -implementation - -uses - dxCore; - -procedure AddExpressDataControllerResourceStringNames(AProduct: TdxProductResourceStrings); - - procedure InternalAdd(const AResourceStringName: string; AAdress: Pointer); - begin - AProduct.Add(AResourceStringName, AAdress); - end; - -begin - InternalAdd('cxSDataReadError', @cxSDataReadError); - InternalAdd('cxSDataWriteError', @cxSDataWriteError); - InternalAdd('cxSDataItemExistError', @cxSDataItemExistError); - InternalAdd('cxSDataRecordIndexError', @cxSDataRecordIndexError); - InternalAdd('cxSDataItemIndexError', @cxSDataItemIndexError); - InternalAdd('cxSDataProviderModeError', @cxSDataProviderModeError); - InternalAdd('cxSDataInvalidStreamFormat', @cxSDataInvalidStreamFormat); - InternalAdd('cxSDataRowIndexError', @cxSDataRowIndexError); - InternalAdd('cxSDataCustomDataSourceInvalidCompare', @cxSDataCustomDataSourceInvalidCompare); - InternalAdd('cxSDBDetailFilterControllerNotFound', @cxSDBDetailFilterControllerNotFound); - InternalAdd('cxSDBNotInGridMode', @cxSDBNotInGridMode); - InternalAdd('cxSDBKeyFieldNotFound', @cxSDBKeyFieldNotFound); -end; - -initialization - dxResourceStringsRepository.RegisterProduct('ExpressDataController', @AddExpressDataControllerResourceStringNames); - -finalization - dxResourceStringsRepository.UnRegisterProduct('ExpressDataController'); - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxDataStorage.pas b/internal/x.46/ExpressDataController/Sources/cxDataStorage.pas deleted file mode 100644 index 75997788..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxDataStorage.pas +++ /dev/null @@ -1,2793 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDataStorage; - -{$I cxVer.inc} - -interface - -uses - SysUtils, Classes, cxVariants, dxCore{$IFDEF DELPHI6},Variants - {$IFNDEF NONDB},FMTBcd, SqlTimSt{$ENDIF}{$ENDIF}; - -type -{$IFNDEF DELPHI6} - PPointer = ^Pointer; - PSmallInt = ^SmallInt; - PInteger = ^Integer; - PWord = ^Word; - PBoolean = ^Boolean; - PDouble =^Double; - PByte = ^Byte; -{$ELSE} - LargeInt = Int64; - PLargeInt = ^LargeInt; -{$ENDIF} - - { Value Types } - - - PStringValue = PString; - PWideStringValue = PWideString; - - TcxValueType = class - protected - class function Compare(P1, P2: Pointer): Integer; virtual; - class procedure FreeBuffer(PBuffer: PAnsiChar); virtual; - class procedure FreeTextBuffer(PBuffer: PAnsiChar); virtual; - class function GetDataSize: Integer; virtual; - class function GetDataValue(PBuffer: PAnsiChar): Variant; virtual; - class function GetDefaultDisplayText(PBuffer: PAnsiChar): string; virtual; - class function GetDisplayText(PBuffer: PAnsiChar): string; virtual; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); virtual; - class procedure ReadDisplayText(PBuffer: PAnsiChar; AStream: TdxStream); virtual; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); virtual; - class procedure SetDisplayText(PBuffer: PAnsiChar; const DisplayText: string); virtual; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); virtual; - class procedure WriteDisplayText(PBuffer: PAnsiChar; AStream: TdxStream); virtual; - public - class function Caption: string; virtual; - class function CompareValues(P1, P2: Pointer): Integer; virtual; - class function GetValue(PBuffer: PAnsiChar): Variant; virtual; - class function GetVarType: Integer; virtual; - class function IsValueValid(var{const }Value: Variant): Boolean; virtual; - class function IsString: Boolean; virtual; - class procedure PrepareValueBuffer(var PBuffer: PAnsiChar); virtual; - end; - - TcxValueTypeClass = class of TcxValueType; - - TcxStringValueType = class(TcxValueType) - protected - class function Compare(P1, P2: Pointer): Integer; override; - class procedure FreeBuffer(PBuffer: PAnsiChar); override; - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetValue(PBuffer: PAnsiChar): Variant; override; - class function GetVarType: Integer; override; - class function IsString: Boolean; override; - class procedure PrepareValueBuffer(var PBuffer: PAnsiChar); override; - end; - - TcxWideStringValueType = class(TcxStringValueType) - protected - class function Compare(P1, P2: Pointer): Integer; override; - class procedure FreeBuffer(PBuffer: PAnsiChar); override; - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetValue(PBuffer: PAnsiChar): Variant; override; - class function GetVarType: Integer; override; - class function IsString: Boolean; override; - class procedure PrepareValueBuffer(var PBuffer: PAnsiChar); override; - end; - - TcxSmallintValueType = class(TcxValueType) - protected - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetVarType: Integer; override; - end; - - TcxIntegerValueType = class(TcxValueType) - protected - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetVarType: Integer; override; - end; - - TcxWordValueType = class(TcxValueType) - protected - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetVarType: Integer; override; - end; - - TcxBooleanValueType = class(TcxValueType) - protected - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class function GetDefaultDisplayText(PBuffer: PAnsiChar): string; override; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetVarType: Integer; override; - end; - - TcxFloatValueType = class(TcxValueType) // TODO: Double or Extended? - protected - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetVarType: Integer; override; - end; - - TcxCurrencyValueType = class(TcxValueType) - protected - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetVarType: Integer; override; - end; - - TcxDateTimeValueType = class(TcxValueType) - private - class function GetDateTime(PBuffer: PAnsiChar): TDateTime; - protected - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class function GetDefaultDisplayText(PBuffer: PAnsiChar): string; override; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetVarType: Integer; override; - end; - -{$IFDEF DELPHI6} - TcxLargeIntValueType = class(TcxValueType) - protected - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetVarType: Integer; override; - end; - - {$IFNDEF NONDB} - TcxFMTBcdValueType = class(TcxValueType) - protected - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class function GetDefaultDisplayText(PBuffer: PAnsiChar): string; override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetVarType: Integer; override; - end; - - TcxSQLTimeStampValueType = class(TcxValueType) - protected - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetVarType: Integer; override; - end; - {$ENDIF} - {$ENDIF} - - TcxVariantValueType = class(TcxValueType) - protected - class function Compare(P1, P2: Pointer): Integer; override; - class procedure FreeBuffer(PBuffer: PAnsiChar); override; - class function GetDataSize: Integer; override; - class function GetDataValue(PBuffer: PAnsiChar): Variant; override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - public - class function CompareValues(P1, P2: Pointer): Integer; override; - class function GetValue(PBuffer: PAnsiChar): Variant; override; - class procedure PrepareValueBuffer(var PBuffer: PAnsiChar); override; - end; - - TcxObjectValueType = class(TcxIntegerValueType) - protected - class procedure FreeBuffer(PBuffer: PAnsiChar); override; - class procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - class procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); override; - class procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); override; - end; - - { TcxDataStorage } - - TcxDataStorage = class; - TcxValueDefs = class; - - TcxValueDef = class - private - FBufferSize: Integer; - FDataSize: Integer; - FStored: Boolean; - FLinkObject: TObject; - FOffset: Integer; - FStreamStored: Boolean; - FTextStored: Boolean; - FValueDefs: TcxValueDefs; - FValueTypeClass: TcxValueTypeClass; - function GetIsNeedConversion: Boolean; - function GetTextStored: Boolean; - procedure SetStored(Value: Boolean); - procedure SetTextStored(Value: Boolean); - procedure SetValueTypeClass(Value: TcxValueTypeClass); - protected - procedure Changed(AResyncNeeded: Boolean); - function Compare(P1, P2: PAnsiChar): Integer; - procedure FreeBuffer(PBuffer: PAnsiChar); - procedure FreeTextBuffer(PBuffer: PAnsiChar); - function GetDataValue(PBuffer: PAnsiChar): Variant; - function GetDisplayText(PBuffer: PAnsiChar): string; - function GetLinkObject: TObject; virtual; - function GetStored: Boolean; virtual; - procedure Init(var AOffset: Integer); - function IsNullValue(PBuffer: PAnsiChar): Boolean; - function IsNullValueEx(PBuffer: PAnsiChar; AOffset: Integer): Boolean; - procedure ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); - procedure ReadDisplayText(PBuffer: PAnsiChar; AStream: TdxStream); - procedure SetDataValue(PBuffer: PAnsiChar; const Value: Variant); - procedure SetDisplayText(PBuffer: PAnsiChar; const DisplayText: string); - procedure SetLinkObject(Value: TObject); virtual; - procedure SetNull(PBuffer: PAnsiChar; IsNull: Boolean); - procedure WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); - procedure WriteDisplayText(PBuffer: PAnsiChar; AStream: TdxStream); - public - constructor Create(AValueDefs: TcxValueDefs; AValueTypeClass: TcxValueTypeClass); virtual; - destructor Destroy; override; - procedure Assign(ASource: TcxValueDef); virtual; - function CompareValues(AIsNull1, AIsNull2: Boolean; P1, P2: PAnsiChar): Integer; - - property BufferSize: Integer read FBufferSize; - property DataSize: Integer read FDataSize; - property IsNeedConversion: Boolean read GetIsNeedConversion; - property LinkObject: TObject read GetLinkObject write SetLinkObject; - property Offset: Integer read FOffset; - property Stored: Boolean read GetStored write SetStored default True; - property StreamStored: Boolean read FStreamStored write FStreamStored default True; - property TextStored: Boolean read GetTextStored write SetTextStored default False; - property ValueDefs: TcxValueDefs read FValueDefs; - property ValueTypeClass: TcxValueTypeClass read FValueTypeClass write SetValueTypeClass; - end; - - TcxValueDefClass = class of TcxValueDef; - - TcxValueDefs = class - private - FDataStorage: TcxDataStorage; - FItems: TList; - FRecordOffset: Integer; - FRecordSize: Integer; - function GetStoredCount: Integer; - function GetCount: Integer; - function GetItem(Index: Integer): TcxValueDef; - protected - procedure Changed(AValueDef: TcxValueDef; AResyncNeeded: Boolean); virtual; - function GetValueDefClass: TcxValueDefClass; virtual; - procedure Prepare(AStartOffset: Integer); virtual; - procedure Remove(AItem: TcxValueDef); - property DataStorage: TcxDataStorage read FDataStorage; - public - constructor Create(ADataStorage: TcxDataStorage); virtual; - destructor Destroy; override; - function Add(AValueTypeClass: TcxValueTypeClass; AStored, ATextStored: Boolean; ALinkObject: TObject): TcxValueDef; - procedure Clear; - property StoredCount: Integer read GetStoredCount; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxValueDef read GetItem; default; - property RecordSize: Integer read FRecordSize; - end; - - { internal value defs } - - TcxInternalValueDef = class(TcxValueDef) - protected - function GetLinkObject: TObject; override; - function GetStored: Boolean; override; - public - function GetValueDef: TcxValueDef; - end; - - TcxInternalValueDefs = class(TcxValueDefs) - protected - function GetValueDefClass: TcxValueDefClass; override; - public - function FindByLinkObject(ALinkObject: TObject): TcxValueDef; - procedure RemoveByLinkObject(ALinkObject: TObject); - end; - - TcxValueDefReader = class - public - constructor Create; virtual; - function GetDisplayText(AValueDef: TcxValueDef): string; virtual; - function GetValue(AValueDef: TcxValueDef): Variant; virtual; - function IsInternal(AValueDef: TcxValueDef): Boolean; virtual; - end; - - TcxValueDefReaderClass = class of TcxValueDefReader; - - TcxValueDefSetProc = procedure (AValueDef: TcxValueDef; AFromRecordIndex, AToRecordIndex: Integer; - AValueDefReader: TcxValueDefReader) of object; - - TcxDataStorage = class - private - FDestroying: Boolean; - FInternalRecordBuffers: TList; - FInternalValueDefs: TcxInternalValueDefs; - FStoredValuesOnly: Boolean; - FRecordBuffers: TList; - FRecordIDCounter: Integer; - FUseRecordID: Boolean; - FValueDefs: TcxValueDefs; - FValueDefsList: TList; -// FValueDefsChanged: Boolean; - FOnClearInternalRecords: TNotifyEvent; - function GetRecordBuffer(Index: Integer): PAnsiChar; - function GetRecordCount: Integer; - procedure SetStoredValuesOnly(Value: Boolean); - procedure SetRecordBuffer(Index: Integer; Value: PAnsiChar); - procedure SetRecordCount(Value: Integer); - procedure SetUseRecordID(Value: Boolean); - protected - function AllocRecordBuffer(Index: Integer): PAnsiChar; - function CalcRecordOffset: Integer; - procedure ChangeRecordFlag(PBuffer: PAnsiChar; AFlag: Byte; ATurnOn: Boolean); - procedure CheckRecordID(ARecordIndex: Integer); - procedure CheckRecordIDCounter; - procedure CheckRecordIDCounterAfterLoad(ALoadedID: Integer); - function CheckValueDef(ARecordIndex: Integer; var AValueDef: TcxValueDef): Boolean; - procedure DeleteInternalRecord(ARecordIndex: Integer); - procedure FreeAndNilRecordBuffer(AIndex: Integer); - procedure InitStructure(AValueDefs: TcxValueDefs); virtual; - procedure InsertValueDef(AIndex: Integer; AValueDef: TcxValueDef); - function IsRecordFlag(PBuffer: PAnsiChar; AFlag: Byte): Boolean; - procedure RemoveValueDef(AValueDef: TcxValueDef); - procedure ValueDefsChanged(AValueDef: TcxValueDef; AResyncNeeded: Boolean); virtual; - function ValueDefsByRecordIndex(Index: Integer): TcxValueDefs; virtual; - property InternalValueDefs: TcxInternalValueDefs read FInternalValueDefs; - public - constructor Create; virtual; - destructor Destroy; override; - function AddInternalRecord: Integer; - function AppendRecord: Integer; - procedure BeforeDestruction; override; - procedure BeginLoad; - procedure CheckStructure; - procedure Clear(AWithoutInternal: Boolean); - procedure ClearInternalRecords; - procedure ClearRecords(AClearList: Boolean); - function CompareRecords(ARecordIndex1, ARecordIndex2: Integer; AValueDef: TcxValueDef): Integer; - procedure DeleteRecord(ARecordIndex: Integer); - procedure EndLoad; - function GetDisplayText(ARecordIndex: Integer; AValueDef: TcxValueDef): string; - function GetCompareInfo(ARecordIndex: Integer; AValueDef: TcxValueDef; var P: PAnsiChar): Boolean; - function GetRecordID(ARecordIndex: Integer): Integer; - function GetValue(ARecordIndex: Integer; AValueDef: TcxValueDef): Variant; - procedure InsertRecord(ARecordIndex: Integer); - procedure ReadData(ARecordIndex: Integer; AStream: TStream); - procedure ReadRecord(ARecordIndex: Integer; AValueDefReader: TcxValueDefReader); - procedure ReadRecordFrom(AFromRecordIndex, AToRecordIndex: Integer; AValueDefReader: TcxValueDefReader; ASetProc: TcxValueDefSetProc); - procedure SetDisplayText(ARecordIndex: Integer; AValueDef: TcxValueDef; const Value: string); - procedure SetRecordID(ARecordIndex, AID: Integer); - procedure SetValue(ARecordIndex: Integer; AValueDef: TcxValueDef; const Value: Variant); - procedure WriteData(ARecordIndex: Integer; AStream: TStream); - - procedure BeginStreaming(ACompare: TListSortCompare); - procedure EndStreaming; - - property StoredValuesOnly: Boolean read FStoredValuesOnly write SetStoredValuesOnly; - property UseRecordID: Boolean read FUseRecordID write SetUseRecordID; - property RecordBuffers[Index: Integer]: PAnsiChar read GetRecordBuffer write SetRecordBuffer; - property RecordCount: Integer read GetRecordCount write SetRecordCount; - property ValueDefs: TcxValueDefs read FValueDefs; - property OnClearInternalRecords: TNotifyEvent read FOnClearInternalRecords write FOnClearInternalRecords; - end; - - TcxDataStorageHelper = class - public - class function AllocateRecord(ADataStorage: TcxDataStorage): Pointer; - class function AppendRecord(ADataStorage: TcxDataStorage; ARecord: Pointer): Integer; - class function Compare(AValueDef: TcxValueDef; ARecord1, ARecord2: Pointer): Integer; - class procedure FreeBuffer(AValueDef: TcxValueDef; ARecord: Pointer); - class function GetDisplayText(AValueDef: TcxValueDef; ARecord: Pointer): string; - class function GetRecordSize(ADataStorage: TcxDataStorage): Integer; - class function GetStoredCount(ADataStorage: TcxDataStorage): Integer; - class function GetValue(AValueDef: TcxValueDef; ARecord: Pointer): Variant; - class function RemoveRecord(ADataStorage: TcxDataStorage; ARecordIndex: Integer): Pointer; - class procedure SetDisplayText(ARecord: Pointer; AValueDef: TcxValueDef; const AValue: string); - class procedure SetRecordsCapacity(ADataStorage: TcxDataStorage; ACapacity: Integer); - class procedure SetTextStored(AValueDef: TcxValueDef; ATextStored: Boolean); - class procedure SetValue(ARecord: Pointer; AValueDef: TcxValueDef; const AValue: Variant); - class procedure FreeRecord(ADataStorage: TcxDataStorage; var ARecord: Pointer); - end; - - { TcxLookupList } - - TcxLookupListItem = record - KeyValue: Variant; - DisplayText: string; - end; - - PcxLookupListItem = ^TcxLookupListItem; - - TcxLookupList = class - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): PcxLookupListItem; - public - constructor Create; - destructor Destroy; override; - procedure Clear; - function Find(const AKeyValue: Variant; var AIndex: Integer): Boolean; - procedure Insert(AIndex: Integer; const AKeyValue: Variant; const ADisplayText: string); - property Count: Integer read GetCount; - property Items[Index: Integer]: PcxLookupListItem read GetItem; default; - end; - - { TcxValueTypeClassList } - - TcxValueTypeClassList = class - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxValueTypeClass; - public - constructor Create; - destructor Destroy; override; - function ItemByCaption(const ACaption: string): TcxValueTypeClass; - procedure RegisterItem(AValueTypeClass: TcxValueTypeClass); - procedure UnregisterItem(AValueTypeClass: TcxValueTypeClass); - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxValueTypeClass read GetItem; default; - end; - -function cxValueTypeClassList: TcxValueTypeClassList; - -function IsDateTimeValueTypeClass(AValueTypeClass: TcxValueTypeClass): Boolean; - -implementation - -const - RecordFlagSize = SizeOf(Byte); - ValueFlagSize = SizeOf(Byte); - PointerSize = SizeOf(Pointer); - RecordIDSize = SizeOf(Integer); - // RecordFlag Bit Masks - RecordFlag_Busy = $01; - -var - FValueTypeClassList: TcxValueTypeClassList; - -function cxValueTypeClassList: TcxValueTypeClassList; -begin - if FValueTypeClassList = nil then - FValueTypeClassList := TcxValueTypeClassList.Create; - Result := FValueTypeClassList; -end; - -function IsDateTimeValueTypeClass(AValueTypeClass: TcxValueTypeClass): Boolean; -begin - Result := (AValueTypeClass = TcxDateTimeValueType) - {$IFDEF DELPHI6}{$IFNDEF NONDB} or (AValueTypeClass = TcxSQLTimeStampValueType){$ENDIF}{$ENDIF}; -end; - -function IncPAnsiChar(P: PAnsiChar; AOffset: Integer): PAnsiChar; -begin - Result := P + AOffset; -end; - -{ TcxValueType } - -class function TcxValueType.Caption: string; -var - I: Integer; -begin - Result := ClassName; - if Result <> '' then - begin - if Copy(Result, 1, 3) = 'Tcx' then - Delete(Result, 1, 3); - I := Pos('ValueType', Result); - if I <> 0 then - Delete(Result, I, Length('ValueType')); - end; -end; - -class function TcxValueType.CompareValues(P1, P2: Pointer): Integer; -begin - Result := VarCompare(GetDataValue(P1), GetDataValue(P2)); -end; - -class function TcxValueType.GetValue(PBuffer: PAnsiChar): Variant; -begin - Result := GetDataValue(PBuffer); -end; - -class function TcxValueType.GetVarType: Integer; -begin - Result := varVariant; -end; - -class function TcxValueType.IsValueValid(var Value: Variant): Boolean; -var - V: Variant; -begin - if VarIsNull(Value) or (GetVarType = varVariant) then // not Empty? - Result := True - else - begin - Result := False; - try - //!!! B92835 - Bug in TFMTBcdVariantType.Cast: dest (string variant for example) is not cleared before usage - VarCast({Value}V, Value, GetVarType); - Value := V; - Result := True; - except - on E: EVariantError do; - end; - end; -end; - -class function TcxValueType.IsString: Boolean; -begin - Result := False; -end; - -class procedure TcxValueType.PrepareValueBuffer(var PBuffer: PAnsiChar); -begin -end; - -class function TcxValueType.Compare(P1, P2: Pointer): Integer; -begin - Result := CompareValues(P1, P2); -end; - -class procedure TcxValueType.FreeBuffer(PBuffer: PAnsiChar); -begin -end; - -class procedure TcxValueType.FreeTextBuffer(PBuffer: PAnsiChar); -var - P: PStringValue; -begin - P := PPointer(PBuffer)^; - if P <> nil then - Dispose(P); -end; - -class function TcxValueType.GetDataSize: Integer; -begin - Result := 0; -end; - -class function TcxValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := Null; -end; - -class function TcxValueType.GetDefaultDisplayText(PBuffer: PAnsiChar): string; -begin - try - Result := VarToStr(GetDataValue(PBuffer)); - except - on EVariantError do - Result := ''; - end; -end; - -class function TcxValueType.GetDisplayText(PBuffer: PAnsiChar): string; -var - P: PStringValue; -begin - P := PPointer(PBuffer)^; - if P <> nil then - Result := P^ - else - Result := ''; -end; - -class procedure TcxValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - SetDataValue(PBuffer, ReadVariantFunc(AStream)); -end; - -class procedure TcxValueType.ReadDisplayText(PBuffer: PAnsiChar; AStream: TdxStream); -begin - if AStream.IsUnicode then - SetDisplayText(PBuffer, ReadWideStringFunc(AStream)) - else - SetDisplayText(PBuffer, dxAnsiStringToString(ReadAnsiStringFunc(AStream))); -end; - -class procedure TcxValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin -end; - -class procedure TcxValueType.SetDisplayText(PBuffer: PAnsiChar; const DisplayText: string); -var - P: PStringValue; -begin - P := PPointer(PBuffer)^; - if P = nil then - begin - New(P); - PPointer(PBuffer)^ := P; - end; - P^ := DisplayText; -end; - -class procedure TcxValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - WriteVariantProc(AStream, GetDataValue(PBuffer)); -end; - -class procedure TcxValueType.WriteDisplayText(PBuffer: PAnsiChar; AStream: TdxStream); -begin - if AStream.IsUnicode then - WriteWideStringProc(AStream, GetDisplayText(PBuffer)) - else - WriteAnsiStringProc(AStream, dxStringToAnsiString(GetDisplayText(PBuffer))); -end; - -{ TcxStringValueType } - -class function TcxStringValueType.CompareValues(P1, P2: Pointer): Integer; -var - S1, S2: string; -begin - if Assigned(P1) then - begin - if Assigned(P2) then - begin - S1 := PStringValue(P1)^; - S2 := PStringValue(P2)^; - if S1 = S2 then - Result := 0 - else - if S1 < S2 then - Result := -1 - else - Result := 1; - end - else - Result := 1; - end - else - begin - if Assigned(P2) then - Result := -1 - else - Result := 0; - end; -end; - -class function TcxStringValueType.GetValue(PBuffer: PAnsiChar): Variant; -begin - Result := GetDataValue(@PBuffer); -end; - -class function TcxStringValueType.GetVarType: Integer; -begin - {$IFDEF DELPHI12} - Result := varUString - {$ELSE} - Result := varString; - {$ENDIF} -end; - -class function TcxStringValueType.IsString: Boolean; -begin - Result := True; -end; - -class procedure TcxStringValueType.PrepareValueBuffer(var PBuffer: PAnsiChar); -begin - PBuffer := PPointer(PBuffer)^; -end; - -class function TcxStringValueType.Compare(P1, P2: Pointer): Integer; -begin - Result := CompareValues(PPointer(P1)^, PPointer(P2)^); -end; - -class procedure TcxStringValueType.FreeBuffer(PBuffer: PAnsiChar); -begin - Dispose(PStringValue(PPointer(PBuffer)^)); -end; - -class function TcxStringValueType.GetDataSize: Integer; -begin - Result := SizeOf(PStringValue); -end; - -class function TcxStringValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -var - P: PStringValue; -begin - P := PPointer(PBuffer)^; - if P <> nil then - Result := P^ - else - Result := inherited GetDataValue(PBuffer); -{$IFDEF DELPHI12} - if not VarIsNull(Result) then - VarCast(Result, Result, GetVarType); -{$ENDIF} -end; - -class procedure TcxStringValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - if AStream.IsUnicode then - SetDataValue(PBuffer, ReadWideStringFunc(AStream)) - else - SetDataValue(PBuffer, ReadAnsiStringFunc(AStream)); -end; - -class procedure TcxStringValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - SetDisplayText(PBuffer, Value); -end; - -class procedure TcxStringValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - if AStream.IsUnicode then - WriteWideStringProc(AStream, GetDisplayText(PBuffer)) - else - WriteAnsiStringProc(AStream, dxStringToAnsiString(GetDisplayText(PBuffer))); -end; - -{ TcxWideStringValueType } - -class function TcxWideStringValueType.CompareValues(P1, P2: Pointer): Integer; -var - WS1, WS2: WideString; -begin - if Assigned(P1) then - begin - if Assigned(P2) then - begin - WS1 := PWideStringValue(P1)^; - WS2 := PWideStringValue(P2)^; - if WS1 = WS2 then - Result := 0 - else - if WS1 < WS2 then - Result := -1 - else - Result := 1; - end - else - Result := 1; - end - else - begin - if Assigned(P2) then - Result := -1 - else - Result := 0; - end; -end; - -class function TcxWideStringValueType.GetValue(PBuffer: PAnsiChar): Variant; -begin - Result := GetDataValue(@PBuffer); -end; - -class function TcxWideStringValueType.GetVarType: Integer; -begin - Result := varOleStr; -end; - -class function TcxWideStringValueType.IsString: Boolean; -begin - Result := True; -end; - -class procedure TcxWideStringValueType.PrepareValueBuffer(var PBuffer: PAnsiChar); -begin - PBuffer := PPointer(PBuffer)^; -end; - -class function TcxWideStringValueType.Compare(P1, P2: Pointer): Integer; -begin - Result := CompareValues(PPointer(P1)^, PPointer(P2)^); -end; - -class procedure TcxWideStringValueType.FreeBuffer(PBuffer: PAnsiChar); -begin - Dispose(PWideStringValue(PPointer(PBuffer)^)); -end; - -class function TcxWideStringValueType.GetDataSize: Integer; -begin - Result := SizeOf(PWideStringValue); -end; - -class function TcxWideStringValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -var - P: PWideStringValue; -begin - P := PPointer(PBuffer)^; - if P <> nil then - Result := P^ - else - Result := inherited GetDataValue(PBuffer); -end; - -class procedure TcxWideStringValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - SetDataValue(PBuffer, ReadWideStringFunc(AStream)); -end; - -class procedure TcxWideStringValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -var - P: PWideStringValue; -begin - P := PPointer(PBuffer)^; - if P = nil then - begin - New(P); - PPointer(PBuffer)^ := P; - end; - P^ := Value; -end; - -class procedure TcxWideStringValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - WriteWideStringProc(AStream, VarToStr(GetDataValue(PBuffer))); -end; - -{ TcxSmallintValueType } - -class function TcxSmallintValueType.CompareValues(P1, P2: Pointer): Integer; -begin - Result := PSmallInt(P1)^ - PSmallInt(P2)^; -end; - -class function TcxSmallintValueType.GetVarType: Integer; -begin - Result := varSmallint; -end; - -class function TcxSmallintValueType.GetDataSize: Integer; -begin - Result := SizeOf(SmallInt); -end; - -class function TcxSmallintValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := PSmallInt(PBuffer)^; -end; - -class procedure TcxSmallintValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - SetDataValue(PBuffer, ReadSmallIntFunc(AStream)); -end; - -class procedure TcxSmallintValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - PSmallInt(PBuffer)^ := Value; -end; - -class procedure TcxSmallintValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - WriteSmallIntProc(AStream, SmallInt(GetDataValue(PBuffer))); -end; - -{ TcxIntegerValueType } - -class function TcxIntegerValueType.CompareValues(P1, P2: Pointer): Integer; -begin - Result := PInteger(P1)^ - PInteger(P2)^; -end; - -class function TcxIntegerValueType.GetVarType: Integer; -begin - Result := varInteger; -end; - -class function TcxIntegerValueType.GetDataSize: Integer; -begin - Result := SizeOf(Integer); -end; - -class function TcxIntegerValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := PInteger(PBuffer)^; -end; - -class procedure TcxIntegerValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - SetDataValue(PBuffer, ReadIntegerFunc(AStream)); -end; - -class procedure TcxIntegerValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - PInteger(PBuffer)^ := Value; -end; - -class procedure TcxIntegerValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - WriteIntegerProc(AStream, Integer(GetDataValue(PBuffer))); -end; - -{ TcxWordValueType } - -class function TcxWordValueType.CompareValues(P1, P2: Pointer): Integer; -begin - Result := PWord(P1)^ - PWord(P2)^; -end; - -class function TcxWordValueType.GetVarType: Integer; -begin - Result := {$IFDEF DELPHI6}varWord{$ELSE}$0012{$ENDIF}; -end; - -class function TcxWordValueType.GetDataSize: Integer; -begin - Result := SizeOf(Word); -end; - -class function TcxWordValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := PWord(PBuffer)^; -end; - -class procedure TcxWordValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - SetDataValue(PBuffer, ReadWordFunc(AStream)); -end; - -class procedure TcxWordValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - PWord(PBuffer)^ := Value; -end; - -class procedure TcxWordValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - WriteWordProc(AStream, Word(GetDataValue(PBuffer))); -end; - -{ TcxBooleanValueType } - -class function TcxBooleanValueType.CompareValues(P1, P2: Pointer): Integer; -begin - Result := Integer(PBoolean(P1)^) - Integer(PBoolean(P2)^); -end; - -class function TcxBooleanValueType.GetVarType: Integer; -begin - Result := varBoolean; -end; - -class function TcxBooleanValueType.GetDataSize: Integer; -begin - Result := SizeOf(Boolean); -end; - -class function TcxBooleanValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := PBoolean(PBuffer)^; -end; - -class function TcxBooleanValueType.GetDefaultDisplayText(PBuffer: PAnsiChar): string; -begin - try - {$IFDEF DELPHI6} - Result := BoolToStr(GetDataValue(PBuffer), True); - {$ELSE} - Result := GetDataValue(PBuffer); - {$ENDIF} - except - on EVariantError do - Result := ''; - end; -end; - -class procedure TcxBooleanValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - SetDataValue(PBuffer, ReadBooleanFunc(AStream)); -end; - -class procedure TcxBooleanValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - PBoolean(PBuffer)^ := Value; -end; - -class procedure TcxBooleanValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - WriteBooleanProc(AStream, Boolean(GetDataValue(PBuffer))); -end; - -{ TcxFloatValueType } - -class function TcxFloatValueType.CompareValues(P1, P2: Pointer): Integer; -var - D1, D2: Double; -begin - D1 := PDouble(P1)^; - D2 := PDouble(P2)^; - if D1 = D2 then - Result := 0 - else - if D1 < D2 then - Result := -1 - else - Result := 1; -end; - -class function TcxFloatValueType.GetVarType: Integer; -begin - Result := varDouble; -end; - -class function TcxFloatValueType.GetDataSize: Integer; -begin - Result := SizeOf(Double); -end; - -class function TcxFloatValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := PDouble(PBuffer)^; -end; - -class procedure TcxFloatValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -var - E: Extended; -begin - ReadFloatProc(AStream, E); - PDouble(PBuffer)^ := E; -end; - -class procedure TcxFloatValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - PDouble(PBuffer)^ := Value; -end; - -class procedure TcxFloatValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - WriteFloatProc(AStream, Double(GetDataValue(PBuffer))); -end; - -{ TcxCurrencyValueType } - -class function TcxCurrencyValueType.CompareValues(P1, P2: Pointer): Integer; -var - C1, C2: Currency; -begin - C1 := PCurrency(P1)^; - C2 := PCurrency(P2)^; - if C1 = C2 then - Result := 0 - else - if C1 < C2 then - Result := -1 - else - Result := 1; -end; - -class function TcxCurrencyValueType.GetVarType: Integer; -begin - Result := varCurrency; -end; - -class function TcxCurrencyValueType.GetDataSize: Integer; -begin - Result := SizeOf(Currency); -end; - -class function TcxCurrencyValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := PCurrency(PBuffer)^; -end; - -class procedure TcxCurrencyValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - SetDataValue(PBuffer, ReadCurrencyFunc(AStream)); -end; - -class procedure TcxCurrencyValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - PCurrency(PBuffer)^ := Value; -end; - -class procedure TcxCurrencyValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - WriteCurrencyProc(AStream, Currency(GetDataValue(PBuffer))); -end; - -{ TcxDateTimeValueType } - -class function TcxDateTimeValueType.CompareValues(P1, P2: Pointer): Integer; -var - D1, D2: Double; -begin - D1 := PDateTime(P1)^; - D2 := PDateTime(P2)^; - if D1 = D2 then - Result := 0 - else - if D1 < D2 then - Result := -1 - else - Result := 1; -end; - -class function TcxDateTimeValueType.GetVarType: Integer; -begin - Result := varDate; -end; - -class function TcxDateTimeValueType.GetDataSize: Integer; -begin - Result := SizeOf(TDateTime); -end; - -class function TcxDateTimeValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := GetDateTime(PBuffer); -end; - -class function TcxDateTimeValueType.GetDefaultDisplayText(PBuffer: PAnsiChar): string; -var - DT: TDateTime; -begin - DT := GetDateTime(PBuffer); - try - Result := VarToStr(DT); - except - on EVariantError do - Result := DateTimeToStr(DT); - end; -end; - -class procedure TcxDateTimeValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - SetDataValue(PBuffer, ReadDateTimeFunc(AStream)); -end; - -class procedure TcxDateTimeValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - PDateTime(PBuffer)^ := VarToDateTime(Value); -end; - -class procedure TcxDateTimeValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - WriteDateTimeProc(AStream, TDateTime(GetDataValue(PBuffer))); -end; - -class function TcxDateTimeValueType.GetDateTime(PBuffer: PAnsiChar): TDateTime; -begin - Result := PDateTime(PBuffer)^; -end; - -{$IFDEF DELPHI6} - -{ TcxLargeIntValueType } - -class function TcxLargeIntValueType.CompareValues(P1, P2: Pointer): Integer; -var - L1, L2: LargeInt; -begin - L1 := PLargeInt(P1)^; - L2 := PLargeInt(P2)^; - if L1 = L2 then - Result := 0 - else - if L1 < L2 then - Result := -1 - else - Result := 1; -end; - -class function TcxLargeIntValueType.GetVarType: Integer; -begin - Result := varInt64; -end; - -class function TcxLargeIntValueType.GetDataSize: Integer; -begin - Result := SizeOf(LargeInt); -end; - -class function TcxLargeIntValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := PLargeInt(PBuffer)^; -end; - -class procedure TcxLargeIntValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - SetDataValue(PBuffer, ReadLargeIntFunc(AStream)); -end; - -class procedure TcxLargeIntValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - PLargeInt(PBuffer)^ := Value; -end; - -class procedure TcxLargeIntValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - WriteLargeIntProc(AStream, PLargeInt(PBuffer)^); -end; - -{$IFNDEF NONDB} -{ TcxFMTBcdValueType } - -class function TcxFMTBcdValueType.CompareValues(P1, P2: Pointer): Integer; -var - B1, B2: TBcd; -begin - B1 := PBcd(P1)^; - B2 := PBcd(P2)^; - Result := BcdCompare(B1, B2); -end; - -class function TcxFMTBcdValueType.GetVarType: Integer; -begin - Result := VarFMTBcd; -end; - -class function TcxFMTBcdValueType.GetDataSize: Integer; -begin - Result := SizeOf(TBcd); -end; - -class function TcxFMTBcdValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := VarFMTBcdCreate(PBcd(PBuffer)^); -// Result := BcdToDouble(PBcd(PBuffer)^); -end; - -class function TcxFMTBcdValueType.GetDefaultDisplayText(PBuffer: PAnsiChar): string; -var - Bcd: TBcd; -begin - Bcd := PBcd(PBuffer)^; - Result := BcdToStrF(Bcd, ffGeneral, 0, 0); // P, D - ignored in BcdToStrF -end; - -class procedure TcxFMTBcdValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - PBcd(PBuffer)^ := VarToBcd(Value); -end; - -{ TcxSQLTimeStampValueType } - -class function TcxSQLTimeStampValueType.CompareValues(P1, P2: Pointer): Integer; -var - T1, T2: TSQLTimeStamp; -begin - T1 := PSQLTimeStamp(P1)^; - T2 := PSQLTimeStamp(P2)^; - Result := T1.Year - T2.Year; - if Result = 0 then - begin - Result := T1.Month - T2.Month; - if Result = 0 then - begin - Result := T1.Day - T2.Day; - if Result = 0 then - begin - Result := T1.Hour - T2.Hour; - if Result = 0 then - begin - Result := T1.Minute - T2.Minute; - if Result = 0 then - begin - Result := T1.Second - T2.Second; - if Result = 0 then - Result := T1.Fractions - T2.Fractions; - end; - end; - end; - end; - end; -end; - -class function TcxSQLTimeStampValueType.GetVarType: Integer; -begin - Result := VarSQLTimeStamp; -end; - -class function TcxSQLTimeStampValueType.GetDataSize: Integer; -begin - Result := SizeOf(TSQLTimeStamp); -end; - -class function TcxSQLTimeStampValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := SQLTimeStampToDateTime(PSQLTimeStamp(PBuffer)^); -end; - -class procedure TcxSQLTimeStampValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - PSQLTimeStamp(PBuffer)^ := VarToSQLTimeStamp(Value); -end; -{$ENDIF} -{$ENDIF} - -{ TcxVariantValueType } - -class function TcxVariantValueType.CompareValues(P1, P2: Pointer): Integer; -begin - if Assigned(P1) then - begin - if Assigned(P2) then - begin - Result := VarCompare(PVariant(P1)^, PVariant(P2)^); - end - else - Result := 1; - end - else - begin - if Assigned(P2) then - Result := -1 - else - Result := 0; - end; -end; - -class function TcxVariantValueType.GetValue(PBuffer: PAnsiChar): Variant; -begin - Result := GetDataValue(@PBuffer); -end; - -class procedure TcxVariantValueType.PrepareValueBuffer(var PBuffer: PAnsiChar); -begin - PBuffer := PPointer(PBuffer)^; -end; - -class function TcxVariantValueType.Compare(P1, P2: Pointer): Integer; -begin - Result := CompareValues(PPointer(P1)^, PPointer(P2)^); -end; - -class procedure TcxVariantValueType.FreeBuffer(PBuffer: PAnsiChar); -begin - Dispose(PVariant(PPointer(PBuffer)^)); -end; - -class function TcxVariantValueType.GetDataSize: Integer; -begin - Result := SizeOf(PVariant); -end; - -class function TcxVariantValueType.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - Result := PVariant(PPointer(PBuffer)^)^; -end; - -class procedure TcxVariantValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -var - P: PVariant; -begin - P := PPointer(PBuffer)^; - if P = nil then - begin - New(P); - PPointer(PBuffer)^ := P; - end; - P^ := Value; -end; - -{ TcxObjectValueType } - -class procedure TcxObjectValueType.FreeBuffer(PBuffer: PAnsiChar); -begin - TObject(PPointer(PBuffer)^).Free; -end; - -class procedure TcxObjectValueType.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - // not supported -end; - -class procedure TcxObjectValueType.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - // TODO: if PInteger(PBuffer)^ <> 0 then FreeBuffer(PBuffer); - inherited SetDataValue(PBuffer, Value); -end; - -class procedure TcxObjectValueType.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); -begin - // not supported -end; - -{ TcxValueDef } - -constructor TcxValueDef.Create(AValueDefs: TcxValueDefs; AValueTypeClass: TcxValueTypeClass); -begin - inherited Create; - FValueDefs := AValueDefs; - FValueTypeClass := AValueTypeClass; - FStored := True; - FTextStored := False; - FStreamStored := True; -end; - -destructor TcxValueDef.Destroy; -begin - FValueDefs.Remove(Self); - inherited Destroy; -end; - -procedure TcxValueDef.Assign(ASource: TcxValueDef); -begin - Stored := ASource.Stored; - TextStored := ASource.TextStored; -end; - -function TcxValueDef.CompareValues(AIsNull1, AIsNull2: Boolean; P1, P2: PAnsiChar): Integer; -begin - if AIsNull1 then - begin - if AIsNull2 then - Result := 0 - else - Result := -1 - end - else - begin - if AIsNull2 then - Result := 1 - else - Result := ValueTypeClass.CompareValues(P1, P2); - end; -end; - -procedure TcxValueDef.Changed(AResyncNeeded: Boolean); -begin - if Assigned(ValueDefs) then - ValueDefs.Changed(Self, AResyncNeeded); -end; - -function TcxValueDef.Compare(P1, P2: PAnsiChar): Integer; -begin - if IsNullValueEx(P1, Offset) then - begin - if IsNullValueEx(P2, Offset) then - Result := 0 - else - Result := -1 - end - else - begin - if IsNullValueEx(P2, Offset) then - Result := 1 - else - Result := ValueTypeClass.Compare(IncPAnsiChar(P1, Offset + ValueFlagSize), - IncPAnsiChar(P2, Offset + ValueFlagSize)); - end; -end; - -procedure TcxValueDef.FreeBuffer(PBuffer: PAnsiChar); -var - PCurrent: PAnsiChar; -begin - if not Stored then Exit; - PCurrent := IncPAnsiChar(PBuffer, Offset); - if not IsNullValue(PCurrent) then - ValueTypeClass.FreeBuffer(IncPAnsiChar(PCurrent, ValueFlagSize)); - if TextStored then - FreeTextBuffer(IncPAnsiChar(PCurrent, ValueFlagSize + DataSize)); -end; - -procedure TcxValueDef.FreeTextBuffer(PBuffer: PAnsiChar); -begin - TcxValueType.FreeTextBuffer(PBuffer); -end; - -function TcxValueDef.GetDataValue(PBuffer: PAnsiChar): Variant; -begin - if IsNullValue(IncPAnsiChar(PBuffer, Offset)) then - Result := Null - else - Result := ValueTypeClass.GetDataValue(IncPAnsiChar(PBuffer, Offset + ValueFlagSize)); -end; - -function TcxValueDef.GetDisplayText(PBuffer: PAnsiChar): string; -begin - if TextStored then - Result := ValueTypeClass.GetDisplayText( - IncPAnsiChar(PBuffer, Offset + ValueFlagSize + DataSize)) - else - begin - if IsNullValue(IncPAnsiChar(PBuffer, Offset)) then - Result := '' - else - Result := ValueTypeClass.GetDefaultDisplayText( - IncPAnsiChar(PBuffer, Offset + ValueFlagSize)); - end; -end; - -function TcxValueDef.GetLinkObject: TObject; -begin - Result := FLinkObject; -end; - -function TcxValueDef.GetStored: Boolean; -begin - Result := FStored or not ValueDefs.DataStorage.StoredValuesOnly; -end; - -procedure TcxValueDef.Init(var AOffset: Integer); -begin - FDataSize := ValueTypeClass.GetDataSize; - FOffset := AOffset; - if Stored then - begin - Inc(AOffset, ValueFlagSize); - Inc(AOffset, DataSize); - if TextStored then - Inc(AOffset, PointerSize); - FBufferSize := AOffset - FOffset; - end - else - FBufferSize := 0; -end; - -function TcxValueDef.IsNullValue(PBuffer: PAnsiChar): Boolean; -begin - Result := PByte(PBuffer)^ = 0; -end; - -function TcxValueDef.IsNullValueEx(PBuffer: PAnsiChar; AOffset: Integer): Boolean; -begin - Result := (PBuffer = nil) or IsNullValue(IncPAnsiChar(PBuffer, AOffset)); -end; - -procedure TcxValueDef.ReadDataValue(PBuffer: PAnsiChar; AStream: TdxStream); - - function ReadNullFlag: Boolean; - begin - Result := ReadBooleanFunc(AStream); - end; - -begin - if ReadNullFlag then - SetNull(IncPAnsiChar(PBuffer, Offset), True) - else - begin - SetNull(IncPAnsiChar(PBuffer, Offset), False); - ValueTypeClass.ReadDataValue( - IncPAnsiChar(PBuffer, Offset + ValueFlagSize), AStream); - end; -end; - -procedure TcxValueDef.ReadDisplayText(PBuffer: PAnsiChar; AStream: TdxStream); -begin - if TextStored then - ValueTypeClass.ReadDisplayText(IncPAnsiChar(PBuffer, Offset + ValueFlagSize + DataSize), AStream); -end; - -procedure TcxValueDef.SetDataValue(PBuffer: PAnsiChar; const Value: Variant); -begin - if VarIsNull(Value) then - SetNull(IncPAnsiChar(PBuffer, Offset), True) - else - begin - SetNull(IncPAnsiChar(PBuffer, Offset), False); - ValueTypeClass.SetDataValue(IncPAnsiChar(PBuffer, Offset + ValueFlagSize), Value); - end; -end; - -procedure TcxValueDef.SetDisplayText(PBuffer: PAnsiChar; const DisplayText: string); -begin - if TextStored then - ValueTypeClass.SetDisplayText( - IncPAnsiChar(PBuffer, Offset + ValueFlagSize + DataSize), DisplayText); -end; - -procedure TcxValueDef.SetLinkObject(Value: TObject); -begin - FLinkObject := Value; -end; - -procedure TcxValueDef.SetNull(PBuffer: PAnsiChar; IsNull: Boolean); -begin - if IsNull then - begin - if not IsNullValue(PBuffer) then - begin - ValueTypeClass.FreeBuffer(IncPAnsiChar(PBuffer, ValueFlagSize)); - FillChar((PBuffer + ValueFlagSize)^, DataSize, 0); - end; - PByte(PBuffer)^ := 0 // see also IsNullValue - end - else - PByte(PBuffer)^ := 1; -end; - -procedure TcxValueDef.WriteDataValue(PBuffer: PAnsiChar; AStream: TdxStream); - - procedure WriteNullFlag(ANull: Boolean); - begin - WriteBooleanProc(AStream, ANull); - end; - -begin - if IsNullValue(IncPAnsiChar(PBuffer, Offset)) then - WriteNullFlag(True) - else - begin - WriteNullFlag(False); - ValueTypeClass.WriteDataValue( - IncPAnsiChar(PBuffer, Offset + ValueFlagSize), AStream); - end; -end; - -procedure TcxValueDef.WriteDisplayText(PBuffer: PAnsiChar; AStream: TdxStream); -begin - if TextStored then - ValueTypeClass.WriteDisplayText( - IncPAnsiChar(PBuffer, Offset + ValueFlagSize + DataSize), AStream); -end; - -function TcxValueDef.GetIsNeedConversion: Boolean; -begin - Result := ValueTypeClass.IsString; -end; - -function TcxValueDef.GetTextStored: Boolean; -begin - if not Stored then - Result := False - else - Result := FTextStored; -end; - -procedure TcxValueDef.SetStored(Value: Boolean); -begin - if FStored <> Value then - begin - FStored := Value; - Changed(False); - end; -end; - -procedure TcxValueDef.SetTextStored(Value: Boolean); -begin - if FTextStored <> Value then - begin - FTextStored := Value; - Changed(True); - end; -end; - -procedure TcxValueDef.SetValueTypeClass(Value: TcxValueTypeClass); -begin - if FValueTypeClass <> Value then - begin - FValueTypeClass := Value; // TODO: clear? - Changed(True); - end; -end; - -{ TcxValueDefs } - -constructor TcxValueDefs.Create(ADataStorage: TcxDataStorage); -begin - inherited Create; - FDataStorage := ADataStorage; - FItems := TList.Create; - DataStorage.InitStructure(Self); -end; - -destructor TcxValueDefs.Destroy; -begin - Clear; - FItems.Free; - inherited Destroy; -end; - -function TcxValueDefs.Add(AValueTypeClass: TcxValueTypeClass; AStored, ATextStored: Boolean; ALinkObject: TObject): TcxValueDef; -var - I: Integer; -begin - Result := GetValueDefClass.Create(Self, AValueTypeClass); - Result.LinkObject := ALinkObject; - Result.Stored := AStored; - Result.TextStored := ATextStored; - I := 0; - Result.Init(I); - DataStorage.InsertValueDef(FItems.Count, Result); - FItems.Add(Result); - DataStorage.InitStructure(Self); -end; - -procedure TcxValueDefs.Clear; -begin - while FItems.Count > 0 do - TcxValueDef(FItems.Last).Free; -end; - -procedure TcxValueDefs.Changed(AValueDef: TcxValueDef; AResyncNeeded: Boolean); -begin - DataStorage.ValueDefsChanged(AValueDef, AResyncNeeded); -end; - -function TcxValueDefs.GetValueDefClass: TcxValueDefClass; -begin - Result := TcxValueDef; -end; - -procedure TcxValueDefs.Prepare(AStartOffset: Integer); -var - I, AOffset: Integer; -begin - FRecordOffset := AStartOffset; - AOffset := FRecordOffset; - for I := 0 to Count - 1 do - Items[I].Init(AOffset); - FRecordSize := AOffset; -end; - -procedure TcxValueDefs.Remove(AItem: TcxValueDef); -begin - DataStorage.RemoveValueDef(AItem); - FItems.Remove(AItem); - DataStorage.InitStructure(Self); -end; - -function TcxValueDefs.GetStoredCount: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - if Items[I].Stored then - Inc(Result); -end; - -function TcxValueDefs.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxValueDefs.GetItem(Index: Integer): TcxValueDef; -begin - if DataStorage.FValueDefsList <> nil then - Result := TcxValueDef(DataStorage.FValueDefsList[Index]) - else - Result := TcxValueDef(FItems[Index]); -end; - -{ TcxInternalValueDef } - -function TcxInternalValueDef.GetLinkObject: TObject; -begin - if Assigned(FLinkObject) then - Result := TcxValueDef(FLinkObject).LinkObject - else - Result := nil; -end; - -function TcxInternalValueDef.GetStored: Boolean; -begin - Result := True; -end; - -function TcxInternalValueDef.GetValueDef: TcxValueDef; -begin - Result := TcxValueDef(FLinkObject); -end; - -{ TcxInternalValueDefs } - -function TcxInternalValueDefs.FindByLinkObject(ALinkObject: TObject): TcxValueDef; -var - I: Integer; -begin - Result := nil; - for I := Count - 1 downto 0 do - if Items[I].FLinkObject = ALinkObject then - begin - Result := Items[I] as TcxValueDef; - Break; - end; -end; - -procedure TcxInternalValueDefs.RemoveByLinkObject(ALinkObject: TObject); -var - AItem: TcxValueDef; -begin - AItem := FindByLinkObject(ALinkObject); - if AItem <> nil then - AItem.Free; -end; - -function TcxInternalValueDefs.GetValueDefClass: TcxValueDefClass; -begin - Result := TcxInternalValueDef; -end; - -{ TcxValueDefReader } - -constructor TcxValueDefReader.Create; -begin - inherited Create; -end; - -function TcxValueDefReader.GetDisplayText(AValueDef: TcxValueDef): string; -begin - Result := ''; -end; - -function TcxValueDefReader.GetValue(AValueDef: TcxValueDef): Variant; -begin - Result := Null; -end; - -function TcxValueDefReader.IsInternal(AValueDef: TcxValueDef): Boolean; -begin - Result := False; -end; - -{ TcxDataStorage } - -constructor TcxDataStorage.Create; -begin - inherited Create; - FRecordIDCounter := 1; // TODO: reset - FInternalValueDefs := TcxInternalValueDefs.Create(Self); - FValueDefs := TcxValueDefs.Create(Self); - FInternalRecordBuffers := TList.Create; - FRecordBuffers := TList.Create; -end; - -destructor TcxDataStorage.Destroy; -begin - Clear(False); - FValueDefs.Free; - FInternalValueDefs.Free; - FRecordBuffers.Free; - FInternalRecordBuffers.Free; - inherited Destroy; -end; - -function TcxDataStorage.AddInternalRecord: Integer; -var - I: Integer; - P: PAnsiChar; -begin - Result := 0; - for I := -1 downto -FInternalRecordBuffers.Count do - begin - if not IsRecordFlag(RecordBuffers[I], RecordFlag_Busy) then - begin - Result := I; - Break; - end; - end; - if Result = 0 then - Result := -FInternalRecordBuffers.Add(nil) - 1; - P := AllocRecordBuffer(Result); - ChangeRecordFlag(P, RecordFlag_Busy, True); -end; - -function TcxDataStorage.AppendRecord: Integer; -begin - Result := FRecordBuffers.Add(nil); - CheckRecordID(Result); -end; - -procedure TcxDataStorage.BeforeDestruction; -begin - FDestroying := True; - inherited BeforeDestruction; -end; - -procedure TcxDataStorage.BeginLoad; -begin - CheckStructure; -end; - -procedure TcxDataStorage.CheckStructure; -begin -(* - if FValueDefsChanged then - begin - InitStructure(ValueDefs); - // ! - ClearInternalRecords; - InitStructure(InternalValueDefs); - // ! - FValueDefsChanged := False; - end; - *) -end; - -procedure TcxDataStorage.Clear(AWithoutInternal: Boolean); -begin - if not AWithoutInternal then - ClearInternalRecords; - ClearRecords(True); -end; - -procedure TcxDataStorage.ClearInternalRecords; -var - I: Integer; -begin - for I := -FInternalRecordBuffers.Count to -1 do - FreeAndNilRecordBuffer(I); - FInternalRecordBuffers.Clear; - if Assigned(FOnClearInternalRecords) then - FOnClearInternalRecords(Self); -end; - -procedure TcxDataStorage.ClearRecords(AClearList: Boolean); -var - I: Integer; -begin - for I := 0 to FRecordBuffers.Count - 1 do - FreeAndNilRecordBuffer(I); - if AClearList then - FRecordBuffers.Clear; - CheckRecordIDCounter; - CheckRecordID(-1); // all -end; - -function TcxDataStorage.CompareRecords(ARecordIndex1, ARecordIndex2: Integer; - AValueDef: TcxValueDef): Integer; -var - P1, P2: PAnsiChar; -begin - P1 := RecordBuffers[ARecordIndex1]; - P2 := RecordBuffers[ARecordIndex2]; - Result := AValueDef.Compare(P1, P2); -end; - -procedure TcxDataStorage.DeleteRecord(ARecordIndex: Integer); -begin - if ARecordIndex < 0 then - DeleteInternalRecord(ARecordIndex) - else - begin - FreeAndNilRecordBuffer(ARecordIndex); - FRecordBuffers.Delete(ARecordIndex); - CheckRecordIDCounter; - end; -end; - -procedure TcxDataStorage.EndLoad; -begin -end; - -function TcxDataStorage.GetDisplayText(ARecordIndex: Integer; AValueDef: TcxValueDef): string; -var - P: PAnsiChar; -begin - Result := ''; - P := RecordBuffers[ARecordIndex]; - if (P <> nil) and CheckValueDef(ARecordIndex, AValueDef) then - Result := AValueDef.GetDisplayText(P); -end; - -function TcxDataStorage.GetCompareInfo(ARecordIndex: Integer; AValueDef: TcxValueDef; - var P: PAnsiChar): Boolean; -begin - P := RecordBuffers[ARecordIndex]; - IncPAnsiChar(P, AValueDef.Offset); - Result := AValueDef.IsNullValue(P); - if not Result then - begin - IncPAnsiChar(P, ValueFlagSize); - AValueDef.ValueTypeClass.PrepareValueBuffer(P); - end; -end; - -function TcxDataStorage.GetRecordID(ARecordIndex: Integer): Integer; -var - P: PAnsiChar; -begin - P := AllocRecordBuffer(ARecordIndex); - P := IncPAnsiChar(P, RecordFlagSize); - Result := PInteger(P)^; -end; - -function TcxDataStorage.GetValue(ARecordIndex: Integer; AValueDef: TcxValueDef): Variant; -var - P: PAnsiChar; -begin - Result := Null; - P := RecordBuffers[ARecordIndex]; - if (P <> nil) and CheckValueDef(ARecordIndex, AValueDef) then - Result := AValueDef.GetDataValue(P); -end; - -procedure TcxDataStorage.InsertRecord(ARecordIndex: Integer); -begin - FRecordBuffers.Insert(ARecordIndex, nil); - CheckRecordID(ARecordIndex); -end; - -procedure TcxDataStorage.ReadData(ARecordIndex: Integer; AStream: TStream); - - function ReadNilFlag: Boolean; - begin - Result := ReadBooleanFunc(AStream); - end; - -var - P: PAnsiChar; - I, AID: Integer; - AValueDef: TcxValueDef; - AdxStream: TdxStream; -begin - AdxStream := TdxStream.Create(AStream); - try - if ReadNilFlag then - FreeAndNilRecordBuffer(ARecordIndex) - else - begin - P := AllocRecordBuffer(ARecordIndex); - if UseRecordID then - begin - AID := ReadIntegerFunc(AStream); - SetRecordID(ARecordIndex, AID); - CheckRecordIDCounterAfterLoad(AID); - end; - for I := 0 to ValueDefs.Count - 1 do - begin - AValueDef := ValueDefs[I]; - if AValueDef.StreamStored then - begin - AValueDef.ReadDataValue(P, AdxStream); - if AValueDef.TextStored then - AValueDef.ReadDisplayText(P, AdxStream); - end; - end; - end; - finally - AdxStream.Free; - end; -end; - -procedure TcxDataStorage.ReadRecord(ARecordIndex: Integer; AValueDefReader: TcxValueDefReader); -var - P: PAnsiChar; - I: Integer; - AValueDef: TcxValueDef; - AValueDefs: TcxValueDefs; -begin - P := AllocRecordBuffer(ARecordIndex); - AValueDefs := ValueDefsByRecordIndex(ARecordIndex); - for I := 0 to AValueDefs.Count - 1 do - begin - AValueDef := AValueDefs[I]; - if not AValueDefReader.IsInternal(AValueDef) then - begin - AValueDef.SetDataValue(P, AValueDefReader.GetValue(AValueDef)); - if AValueDef.TextStored then - AValueDef.SetDisplayText(P, AValueDefReader.GetDisplayText(AValueDef)); - end; - end; -end; - -procedure TcxDataStorage.ReadRecordFrom(AFromRecordIndex, AToRecordIndex: Integer; - AValueDefReader: TcxValueDefReader; ASetProc: TcxValueDefSetProc); -var - I: Integer; - AValueDefs: TcxValueDefs; -begin - AValueDefs := ValueDefsByRecordIndex(AFromRecordIndex); - for I := 0 to AValueDefs.Count - 1 do - ASetProc(AValueDefs[I], AFromRecordIndex, AToRecordIndex, AValueDefReader); -end; - -procedure TcxDataStorage.SetDisplayText(ARecordIndex: Integer; AValueDef: TcxValueDef; - const Value: string); -var - P: PAnsiChar; -begin - P := AllocRecordBuffer(ARecordIndex); - if CheckValueDef(ARecordIndex, AValueDef) and AValueDef.TextStored then - AValueDef.SetDisplayText(P, Value); -end; - -procedure TcxDataStorage.SetRecordID(ARecordIndex, AID: Integer); -var - P: PAnsiChar; -begin - P := AllocRecordBuffer(ARecordIndex); - P := IncPAnsiChar(P, RecordFlagSize); - PInteger(P)^ := AID; -end; - -procedure TcxDataStorage.SetValue(ARecordIndex: Integer; AValueDef: TcxValueDef; - const Value: Variant); -var - P: PAnsiChar; -begin - P := AllocRecordBuffer(ARecordIndex); - if CheckValueDef(ARecordIndex, AValueDef) then - AValueDef.SetDataValue(P, Value); -end; - -procedure TcxDataStorage.WriteData(ARecordIndex: Integer; AStream: TStream); - - procedure WriteRecordInfo(PBuffer: PAnsiChar); - var - AID: Integer; - begin - WriteBooleanProc(AStream, PBuffer = nil); - if (PBuffer <> nil) and UseRecordID then - begin - AID := 0; - if PBuffer <> nil then - begin - PBuffer := IncPAnsiChar(PBuffer, RecordFlagSize); - AID := PInteger(PBuffer)^; - end; - WriteIntegerProc(AStream, AID); - end; - end; - -var - P: PAnsiChar; - I: Integer; - AValueDef: TcxValueDef; - AdxStream: TdxStream; -begin - P := PAnsiChar(FRecordBuffers[ARecordIndex]); - I := AStream.Position; - dxWriteStreamType(AStream); - AStream.Position := I; - AdxStream := TdxStream.Create(AStream); - try - WriteRecordInfo(P); - if P <> nil then - for I := 0 to ValueDefs.Count - 1 do - begin - AValueDef := ValueDefs[I]; - if AValueDef.StreamStored then - begin - AValueDef.WriteDataValue(P, AdxStream); - if AValueDef.TextStored then - AValueDef.WriteDisplayText(P, AdxStream); - end; - end; - finally - AdxStream.Free; - end; -end; - -procedure TcxDataStorage.BeginStreaming(ACompare: TListSortCompare); -var - I: Integer; - AList: TList; -begin - AList := TList.Create; - for I := 0 to ValueDefs.Count - 1 do - AList.Add(ValueDefs[I]); - AList.Sort(ACompare); - FValueDefsList := AList; -end; - -procedure TcxDataStorage.EndStreaming; -begin - FValueDefsList.Free; - FValueDefsList := nil; -end; - -function TcxDataStorage.AllocRecordBuffer(Index: Integer): PAnsiChar; -var - AValueDefs: TcxValueDefs; -begin - Result := RecordBuffers[Index]; - if Result = nil then - begin - AValueDefs := ValueDefsByRecordIndex(Index); - Result := AllocMem(AValueDefs.RecordSize); - RecordBuffers[Index] := Result; - end; -end; - -function TcxDataStorage.CalcRecordOffset: Integer; -begin - Result := RecordFlagSize; - if UseRecordID then - Inc(Result, RecordIDSize); -end; - -procedure TcxDataStorage.ChangeRecordFlag(PBuffer: PAnsiChar; AFlag: Byte; ATurnOn: Boolean); -begin - if PBuffer <> nil then - if ATurnOn then - PByte(PBuffer)^ := PByte(PBuffer)^ or AFlag - else - PByte(PBuffer)^ := PByte(PBuffer)^ and not AFlag; -end; - -procedure TcxDataStorage.CheckRecordID(ARecordIndex: Integer); - - procedure CheckID(AIndex: Integer); - begin - if GetRecordID(AIndex) = 0 then - begin - SetRecordID(AIndex, FRecordIDCounter); - Inc(FRecordIDCounter); - end; - end; - -var - I: Integer; -begin - if not UseRecordID then Exit; - if ARecordIndex <> -1 then - CheckID(ARecordIndex) - else - for I := 0 to RecordCount - 1 do - CheckID(I); -end; - -procedure TcxDataStorage.CheckRecordIDCounter; -begin - if FRecordBuffers.Count = 0 then FRecordIDCounter := 1; // TODO: reset -end; - -procedure TcxDataStorage.CheckRecordIDCounterAfterLoad(ALoadedID: Integer); -begin - if FRecordIDCounter <= ALoadedID then - FRecordIDCounter := ALoadedID + 1; -end; - -function TcxDataStorage.CheckValueDef(ARecordIndex: Integer; var AValueDef: TcxValueDef): Boolean; -begin - if not (AValueDef is TcxInternalValueDef) and - (ValueDefsByRecordIndex(ARecordIndex) = InternalValueDefs) then - AValueDef := InternalValueDefs.FindByLinkObject(AValueDef); - Result := AValueDef <> nil; -end; - -procedure TcxDataStorage.DeleteInternalRecord(ARecordIndex: Integer); -//var -// P: PAnsiChar; -begin - if ARecordIndex >= 0 then Exit; -// P := RecordBuffers[ARecordIndex]; -// ChangeRecordFlag(P, RecordFlag_Busy, False); - FreeAndNilRecordBuffer(ARecordIndex); -end; - -procedure TcxDataStorage.FreeAndNilRecordBuffer(AIndex: Integer); -var - P: PAnsiChar; - I: Integer; - AValueDefs: TcxValueDefs; -begin - P := RecordBuffers[AIndex]; - if P <> nil then - begin - AValueDefs := ValueDefsByRecordIndex(AIndex); - RecordBuffers[AIndex] := nil; - for I := 0 to AValueDefs.Count - 1 do - AValueDefs[I].FreeBuffer(P); - FreeMem(P); - end; -end; - -procedure TcxDataStorage.InitStructure(AValueDefs: TcxValueDefs); -begin - AValueDefs.Prepare(CalcRecordOffset); -end; - -procedure TcxDataStorage.InsertValueDef(AIndex: Integer; AValueDef: TcxValueDef); -var - I, AStartIndex, AEndIndex: Integer; - PBuffer, PSource, PDest: PAnsiChar; - AValueDefs: TcxValueDefs; -begin - AValueDefs := AValueDef.ValueDefs; - if AValueDefs = ValueDefs then - begin - InternalValueDefs.Add(AValueDef.ValueTypeClass, True, AValueDef.FTextStored, AValueDef); - AStartIndex := 0; - AEndIndex := FRecordBuffers.Count - 1; - end - else - begin - AStartIndex := -FInternalRecordBuffers.Count; - AEndIndex := -1; - end; - for I := AStartIndex to AEndIndex do - begin - PBuffer := RecordBuffers[I]; - if PBuffer <> nil then - begin - ReallocMem(PBuffer, AValueDefs.RecordSize + AValueDef.BufferSize); - RecordBuffers[I] := PBuffer; - if AIndex < AValueDefs.Count then - begin - PSource := IncPAnsiChar(PBuffer, AValueDefs[AIndex].Offset); - PDest := IncPAnsiChar(PSource, AValueDef.BufferSize); - System.Move(PSource^, PDest^, AValueDefs.RecordSize - (PSource - PBuffer)); - end - else - begin - PSource := PBuffer; - if AValueDefs.Count > 0 then - PSource := IncPAnsiChar(PSource, AValueDefs[AValueDefs.Count - 1].Offset + - AValueDefs[AValueDefs.Count - 1].BufferSize) - else - PSource := IncPAnsiChar(PSource, AValueDefs.RecordSize); - end; - FillChar(PSource^, AValueDef.BufferSize, 0); - end; - end; -end; - -function TcxDataStorage.IsRecordFlag(PBuffer: PAnsiChar; AFlag: Byte): Boolean; -begin - Result := (PBuffer <> nil) and ((PByte(PBuffer)^ and AFlag) = AFlag); -end; - -procedure TcxDataStorage.RemoveValueDef(AValueDef: TcxValueDef); -var - I, AStartIndex, AEndIndex: Integer; - PBuffer, PSource, PDest: PAnsiChar; - AValueDefs: TcxValueDefs; - AFreeAndNil: Boolean; -begin - AValueDefs := AValueDef.ValueDefs; - if AValueDefs = ValueDefs then - begin - InternalValueDefs.RemoveByLinkObject(AValueDef); - AStartIndex := 0; - AEndIndex := FRecordBuffers.Count - 1; - end - else - begin - AStartIndex := -FInternalRecordBuffers.Count; - AEndIndex := -1; - end; - AFreeAndNil := AValueDef.Stored and (AValueDefs.StoredCount <= 1); - for I := AStartIndex to AEndIndex do - begin - PBuffer := RecordBuffers[I]; - if PBuffer <> nil then - if AFreeAndNil then - FreeAndNilRecordBuffer(I) - else - if AValueDef.Stored then - begin - AValueDef.FreeBuffer(PBuffer); - PDest := IncPAnsiChar(PBuffer, AValueDef.Offset); - PSource := IncPAnsiChar(PDest, AValueDef.BufferSize); - System.Move(PSource^, PDest^, AValueDefs.RecordSize - (PSource - PBuffer)); - ReallocMem(PBuffer, AValueDefs.RecordSize - AValueDef.BufferSize); // existing data in the block is not affected! - RecordBuffers[I] := PBuffer; - end; - end; -end; - -procedure TcxDataStorage.ValueDefsChanged(AValueDef: TcxValueDef; AResyncNeeded: Boolean); -//var -// AInternalValueDef: TcxValueDef; -begin - (* - if FDestroying then Exit; - if not FValueDefsChanged then - begin - ClearRecords(False); - FValueDefsChanged := True; - if AResyncNeeded and (AValueDef.ValueDefs = ValueDefs) then - begin - AInternalValueDef := InternalValueDefs.FindByLinkObject(AValueDef); - if AInternalValueDef <> nil then - AInternalValueDef.Assign(AValueDef); - end; - end; - *) -end; - -function TcxDataStorage.ValueDefsByRecordIndex(Index: Integer): TcxValueDefs; -begin - if Index < 0 then - Result := FInternalValueDefs - else - Result := FValueDefs; -end; - -function TcxDataStorage.GetRecordBuffer(Index: Integer): PAnsiChar; -begin - if Index >= 0 then - Result := PAnsiChar(FRecordBuffers[Index]) - else - Result := PAnsiChar(FInternalRecordBuffers[-Index - 1]); -end; - -function TcxDataStorage.GetRecordCount: Integer; -begin - Result := FRecordBuffers.Count; -end; - -procedure TcxDataStorage.SetStoredValuesOnly(Value: Boolean); -begin - if FStoredValuesOnly <> Value then - begin - ClearRecords(False); - FStoredValuesOnly := Value; - InitStructure(ValueDefs); - end; -end; - -procedure TcxDataStorage.SetRecordBuffer(Index: Integer; Value: PAnsiChar); -begin - if Index >= 0 then - FRecordBuffers[Index] := Value - else - FInternalRecordBuffers[-Index - 1] := Value; -end; - -procedure TcxDataStorage.SetRecordCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if RecordCount <> Value then - begin - // TODO: Capacity - while RecordCount < Value do - AppendRecord; - while RecordCount > Value do - DeleteRecord(RecordCount - 1); - end; -end; - -procedure TcxDataStorage.SetUseRecordID(Value: Boolean); -begin - if FUseRecordID <> Value then - begin - ClearRecords(False); - FUseRecordID := Value; - InitStructure(ValueDefs); - end; -end; - -{ TcxDataStorageHelper } - -class function TcxDataStorageHelper.AllocateRecord( - ADataStorage: TcxDataStorage): Pointer; -begin - Result := AllocMem(ADataStorage.FValueDefs.RecordSize); -end; - -class function TcxDataStorageHelper.AppendRecord( - ADataStorage: TcxDataStorage; ARecord: Pointer): Integer; -begin - Result := ADataStorage.FRecordBuffers.Add(ARecord); -end; - -class function TcxDataStorageHelper.Compare( - AValueDef: TcxValueDef; ARecord1, ARecord2: Pointer): Integer; -begin - Result := AValueDef.Compare(ARecord1, ARecord2); -end; - -class procedure TcxDataStorageHelper.FreeBuffer( - AValueDef: TcxValueDef; ARecord: Pointer); -begin - AValueDef.FreeBuffer(ARecord); -end; - -class function TcxDataStorageHelper.GetDisplayText( - AValueDef: TcxValueDef; ARecord: Pointer): string; -begin - Result := AValueDef.GetDisplayText(ARecord); -end; - -class function TcxDataStorageHelper.GetRecordSize( - ADataStorage: TcxDataStorage): Integer; -begin - Result := ADataStorage.ValueDefs.RecordSize; -end; - -class function TcxDataStorageHelper.GetStoredCount( - ADataStorage: TcxDataStorage): Integer; -begin - Result := ADataStorage.ValueDefs.StoredCount; -end; - -class function TcxDataStorageHelper.GetValue( - AValueDef: TcxValueDef; ARecord: Pointer): Variant; -begin - Result := AValueDef.GetDataValue(ARecord); -end; - -class function TcxDataStorageHelper.RemoveRecord( - ADataStorage: TcxDataStorage; ARecordIndex: Integer): Pointer; -begin - Result := ADataStorage.RecordBuffers[ARecordIndex]; - ADataStorage.FRecordBuffers.Delete(ARecordIndex); -end; - -class procedure TcxDataStorageHelper.SetDisplayText( - ARecord: Pointer; AValueDef: TcxValueDef; const AValue: string); -begin - AValueDef.SetDisplayText(ARecord, AValue); -end; - -class procedure TcxDataStorageHelper.SetRecordsCapacity( - ADataStorage: TcxDataStorage; ACapacity: Integer); -begin - ADataStorage.FRecordBuffers.Capacity := ACapacity; -end; - -class procedure TcxDataStorageHelper.SetTextStored( - AValueDef: TcxValueDef; ATextStored: Boolean); -begin - if AValueDef.FTextStored <> ATextStored then - begin - AValueDef.FTextStored := ATextStored; - AValueDef.ValueDefs.DataStorage.InitStructure(AValueDef.ValueDefs); - end; -end; - -class procedure TcxDataStorageHelper.SetValue(ARecord: Pointer; - AValueDef: TcxValueDef; const AValue: Variant); -begin - AValueDef.SetDataValue(ARecord, AValue); -end; - -class procedure TcxDataStorageHelper.FreeRecord( - ADataStorage: TcxDataStorage; var ARecord: Pointer); -var - I: Integer; - P: Pointer; -begin - P := ARecord; - ARecord := nil; - for I := 0 to ADataStorage.FValueDefs.Count - 1 do - ADataStorage.FValueDefs[I].FreeBuffer(P); - FreeMem(P); -end; - - -{ TcxLookupList } - -constructor TcxLookupList.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TcxLookupList.Destroy; -begin - Clear; - FItems.Free; - inherited Destroy; -end; - -procedure TcxLookupList.Clear; -var - I: Integer; -begin - for I := 0 to FItems.Count - 1 do - Dispose(PcxLookupListItem(FItems[I])); - FItems.Clear; -end; - -function TcxLookupList.Find(const AKeyValue: Variant; var AIndex: Integer): Boolean; -var - L, H, I, C: Integer; -begin - AIndex := 0; - Result := False; - L := 0; - H := FItems.Count - 1; - if L <= H then - repeat - I := (L + H) div 2; - C := VarCompare(PcxLookupListItem(FItems[I]).KeyValue, AKeyValue); - if C = 0 then - begin - AIndex := I; - Result := True; - Break; - end - else - if C < 0 then - L := I + 1 - else - H := I - 1; - if L > H then - begin - AIndex := L; - Break; - end; - until False; -end; - -procedure TcxLookupList.Insert(AIndex: Integer; const AKeyValue: Variant; - const ADisplayText: string); -var - P: PcxLookupListItem; -begin - New(P); - P.KeyValue := AKeyValue; - P.DisplayText := ADisplayText; - FItems.Insert(AIndex, P); -end; - -function TcxLookupList.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxLookupList.GetItem(Index: Integer): PcxLookupListItem; -begin - Result := PcxLookupListItem(FItems[Index]); -end; - -{ TcxValueTypeClassList } - -constructor TcxValueTypeClassList.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TcxValueTypeClassList.Destroy; -begin - FItems.Free; - inherited Destroy; -end; - -function TcxValueTypeClassList.ItemByCaption(const ACaption: string): TcxValueTypeClass; -var - I: Integer; -begin - Result := nil; - for I := 0 to FItems.Count - 1 do - if TcxValueTypeClass(FItems[I]).Caption = ACaption then - begin - Result := TcxValueTypeClass(FItems[I]); - Break; - end; -end; - -procedure TcxValueTypeClassList.RegisterItem(AValueTypeClass: TcxValueTypeClass); -begin - if FItems.IndexOf(TObject(AValueTypeClass)) = -1 then - FItems.Add(TObject(AValueTypeClass)); -end; - -procedure TcxValueTypeClassList.UnregisterItem(AValueTypeClass: TcxValueTypeClass); -begin - FItems.Remove(TObject(AValueTypeClass)); -end; - -function TcxValueTypeClassList.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxValueTypeClassList.GetItem(Index: Integer): TcxValueTypeClass; -begin - Result := TcxValueTypeClass(FItems[Index]); -end; - -initialization - cxValueTypeClassList.RegisterItem(TcxStringValueType); - cxValueTypeClassList.RegisterItem(TcxWideStringValueType); - cxValueTypeClassList.RegisterItem(TcxSmallintValueType); - cxValueTypeClassList.RegisterItem(TcxIntegerValueType); - cxValueTypeClassList.RegisterItem(TcxWordValueType); - cxValueTypeClassList.RegisterItem(TcxBooleanValueType); - cxValueTypeClassList.RegisterItem(TcxFloatValueType); - cxValueTypeClassList.RegisterItem(TcxCurrencyValueType); - cxValueTypeClassList.RegisterItem(TcxDateTimeValueType); - {$IFDEF DELPHI6} - cxValueTypeClassList.RegisterItem(TcxLargeIntValueType); - {$IFNDEF NONDB} - cxValueTypeClassList.RegisterItem(TcxFMTBcdValueType); - cxValueTypeClassList.RegisterItem(TcxSQLTimeStampValueType); - {$ENDIF} - {$ENDIF} - cxValueTypeClassList.RegisterItem(TcxVariantValueType); - cxValueTypeClassList.RegisterItem(TcxObjectValueType); - -finalization - cxValueTypeClassList.UnregisterItem(TcxObjectValueType); - cxValueTypeClassList.UnregisterItem(TcxVariantValueType); - {$IFDEF DELPHI6} - {$IFNDEF NONDB} - cxValueTypeClassList.UnregisterItem(TcxSQLTimeStampValueType); - cxValueTypeClassList.UnregisterItem(TcxFMTBcdValueType); - {$ENDIF} - cxValueTypeClassList.UnregisterItem(TcxLargeIntValueType); - {$ENDIF} - cxValueTypeClassList.UnregisterItem(TcxDateTimeValueType); - cxValueTypeClassList.UnregisterItem(TcxCurrencyValueType); - cxValueTypeClassList.UnregisterItem(TcxFloatValueType); - cxValueTypeClassList.UnregisterItem(TcxBooleanValueType); - cxValueTypeClassList.UnregisterItem(TcxWordValueType); - cxValueTypeClassList.UnregisterItem(TcxIntegerValueType); - cxValueTypeClassList.UnregisterItem(TcxSmallintValueType); - cxValueTypeClassList.UnregisterItem(TcxWideStringValueType); - cxValueTypeClassList.UnregisterItem(TcxStringValueType); - - FValueTypeClassList.Free; - FValueTypeClassList := nil; - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxDataUtils.pas b/internal/x.46/ExpressDataController/Sources/cxDataUtils.pas deleted file mode 100644 index 171eae73..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxDataUtils.pas +++ /dev/null @@ -1,394 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDataUtils; - -{$I cxVer.inc} - -interface - -uses - Windows, -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Classes, SysUtils; - -type - TcxDataEditValueSource = (evsValue, evsText, evsKey); - - { TcxCustomDataBinding } - - TcxDataBindingNotifyEvent = procedure of object; - - TcxCustomDataBinding = class(TPersistent) - private - FDataComponent: TComponent; - FOwner: TComponent; - FReadOnly: Boolean; - FVisualControl: TComponent; - FOnDataChange: TcxDataBindingNotifyEvent; - FOnDataSetChange: TcxDataBindingNotifyEvent; - FOnUpdateData: TcxDataBindingNotifyEvent; - procedure SetVisualControl(Value: TComponent); - protected - function GetOwner: TPersistent; override; - procedure DataChange; virtual; - procedure DataSetChange; virtual; - function GetModified: Boolean; virtual; - function GetReadOnly: Boolean; virtual; - procedure SetReadOnly(Value: Boolean); virtual; - procedure UpdateData; virtual; - procedure VisualControlChanged; virtual; - property DataComponent: TComponent read FDataComponent; - public - constructor Create(AOwner, ADataComponent: TComponent); virtual; - function CanModify: Boolean; virtual; - function ExecuteAction(Action: TBasicAction): Boolean; virtual; - function GetStoredValue(AValueSource: TcxDataEditValueSource; AFocused: Boolean): Variant; virtual; - function IsControlReadOnly: Boolean; virtual; - function IsDataSourceLive: Boolean; virtual; - function IsDataStorage: Boolean; virtual; - procedure Reset; virtual; - function SetEditMode: Boolean; virtual; - procedure SetStoredValue(AValueSource: TcxDataEditValueSource; const Value: Variant); virtual; - function UpdateAction(Action: TBasicAction): Boolean; virtual; - procedure UpdateDataSource; virtual; - property Modified: Boolean read GetModified; - property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False; - property VisualControl: TComponent read FVisualControl write SetVisualControl; - property OnDataChange: TcxDataBindingNotifyEvent read FOnDataChange write FOnDataChange; - property OnDataSetChange: TcxDataBindingNotifyEvent read FOnDataSetChange write FOnDataSetChange; - property OnUpdateData: TcxDataBindingNotifyEvent read FOnUpdateData write FOnUpdateData; - end; - - TcxCustomDataBindingClass = class of TcxCustomDataBinding; - - { TcxCollection } - - TcxCollection = class(TCollection) // copy from cxClasses - public - procedure Assign(Source: TPersistent); override; - {$IFNDEF DELPHI6} - function Owner: TPersistent; - {$ENDIF} - end; - -function DefaultCurrencyDisplayFormat: string; - -function DateOf(const AValue: TDateTime): TDateTime; -function TimeOf(const AValue: TDateTime): TDateTime; -function GetStartDateOfWeek(const AValue: TDateTime): TDateTime; - -// StartOfWeek: 0..6 - 0 = Sunday, 6 = Saturday - -const - cxDataUnassignedStartOfWeek = 10; - -function GetStartOfWeek: Word; -procedure SetStartOfWeek(Value: Word); - -function DataCompareText(const S1, S2: string; APartialCompare: Boolean): Boolean; - -implementation - -uses - dxCore; - -function DefaultCurrencyDisplayFormat: string; -var - ACurrStr: string; - I: Integer; - C: Char; -begin - if CurrencyDecimals > 0 then - begin - SetLength(Result, CurrencyDecimals); - {$IFNDEF DELPHI12} - FillChar(Result[1], Length(Result), '0'); - {$ELSE} - for I := 1 to Length(Result) do - Result[I] := '0'; - {$ENDIF} - end - else - Result := ''; - Result := ',0.' + Result; - ACurrStr := ''; - for I := 1 to Length(CurrencyString) do - begin - C := CurrencyString[I]; - if dxCharInSet(C, [',', '.']) then - ACurrStr := ACurrStr + '''' + C + '''' - else - ACurrStr := ACurrStr + C; - end; - if Length(ACurrStr) > 0 then - case CurrencyFormat of - 0: Result := ACurrStr + Result; { '$1' } - 1: Result := Result + ACurrStr; { '1$' } - 2: Result := ACurrStr + ' ' + Result; { '$ 1' } - 3: Result := Result + ' ' + ACurrStr; { '1 $' } - end; -end; - -function DateOf(const AValue: TDateTime): TDateTime; -begin - Result := Trunc(AValue); -end; - -function TimeOf(const AValue: TDateTime): TDateTime; -begin - Result := Frac(AValue); -end; - -function GetStartDateOfWeek(const AValue: TDateTime): TDateTime; -var - AStartOfWeek, ADayOfWeek: Integer; -begin - AStartOfWeek := GetStartOfWeek; - ADayOfWeek := DayOfWeek(AValue) - 1; - if ADayOfWeek < AStartOfWeek then - Result := DateOf(AValue) - 7 + (AStartOfWeek - ADayOfWeek) - else - Result := DateOf(AValue) - (ADayOfWeek - AStartOfWeek); -end; - -var - FStartOfWeek: Word = cxDataUnassignedStartOfWeek; - -function GetStartOfWeek: Word; -var - Buffer: array[0..1] of Char; -begin - if FStartOfWeek = cxDataUnassignedStartOfWeek then - begin - {$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$ENDIF} - if GetLocaleInfo(GetThreadLocale, LOCALE_IFIRSTDAYOFWEEK, Buffer, - SizeOf(Buffer)) > 0 then - Result := StrToInt(Buffer[0]) - else - Result := 0; - {$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM ON} - {$ENDIF} - Inc(Result); - if Result > 6 then Result := 0; - end - else - Result := FStartOfWeek; -end; - -procedure SetStartOfWeek(Value: Word); -begin - if Value in [0..6, cxDataUnassignedStartOfWeek] then - FStartOfWeek := Value; -end; - -function DataCompareText(const S1, S2: string; APartialCompare: Boolean): Boolean; -var - AText1, AText2: string; - L2: Integer; -begin - AText1 := AnsiUpperCase(S1); - AText2 := AnsiUpperCase(S2); - L2 := Length(AText2); - if L2 = 0 then - Result := Length(AText1) = 0 - else - if not APartialCompare then - Result := AText1 = AText2 - else - Result := (Length(AText1) >= L2) and (Copy(AText1, 1, L2) = AText2); -end; - -{ TcxCustomDataBinding } - -constructor TcxCustomDataBinding.Create(AOwner, ADataComponent: TComponent); -begin - inherited Create; - FDataComponent := ADataComponent; - FOwner := AOwner; -end; - -function TcxCustomDataBinding.CanModify: Boolean; -begin - Result := not ReadOnly; -end; - -function TcxCustomDataBinding.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := False; -end; - -function TcxCustomDataBinding.GetStoredValue(AValueSource: TcxDataEditValueSource; - AFocused: Boolean): Variant; -begin - Result := Null; -end; - -function TcxCustomDataBinding.IsControlReadOnly: Boolean; -begin - Result := ReadOnly; -end; - -function TcxCustomDataBinding.IsDataSourceLive: Boolean; -begin - Result := True; -end; - -function TcxCustomDataBinding.IsDataStorage: Boolean; -begin - Result := False; -end; - -procedure TcxCustomDataBinding.Reset; -begin -end; - -function TcxCustomDataBinding.SetEditMode: Boolean; -begin - Result := CanModify; -end; - -procedure TcxCustomDataBinding.SetStoredValue(AValueSource: TcxDataEditValueSource; - const Value: Variant); -begin -end; - -function TcxCustomDataBinding.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := False; -end; - -procedure TcxCustomDataBinding.UpdateDataSource; -begin -end; - -function TcxCustomDataBinding.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -procedure TcxCustomDataBinding.DataChange; -begin - if Assigned(FOnDataChange) then - FOnDataChange; -end; - -procedure TcxCustomDataBinding.DataSetChange; -begin - if Assigned(FOnDataSetChange) then - FOnDataSetChange; -end; - -function TcxCustomDataBinding.GetModified: Boolean; -begin - Result := False; -end; - -function TcxCustomDataBinding.GetReadOnly: Boolean; -begin - Result := FReadOnly; -end; - -procedure TcxCustomDataBinding.SetReadOnly(Value: Boolean); -begin - if Value <> FReadOnly then - begin - FReadOnly := Value; - DataSetChange; - end; -end; - -procedure TcxCustomDataBinding.UpdateData; -begin - if Assigned(FOnUpdateData) then - FOnUpdateData; -end; - -procedure TcxCustomDataBinding.VisualControlChanged; -begin -end; - -procedure TcxCustomDataBinding.SetVisualControl(Value: TComponent); -begin - if Value <> FVisualControl then - begin - FVisualControl := Value; - VisualControlChanged; - end; -end; - -{ TcxCollection } - -procedure TcxCollection.Assign(Source: TPersistent); -var - I: Integer; - AItem: TCollectionItem; -begin - if Source is TCollection then - begin - if (Count = 0) and (TCollection(Source).Count = 0) then Exit; - BeginUpdate; - try - for I := 0 to TCollection(Source).Count - 1 do - begin - if I > Count - 1 then - AItem := Add - else - AItem := Items[I]; - AItem.Assign(TCollection(Source).Items[I]); - end; - for I := Count - 1 downto TCollection(Source).Count do - Delete(I); - finally - EndUpdate; - end; - end - else - inherited; -end; - -{$IFNDEF DELPHI6} -function TcxCollection.Owner: TPersistent; -begin - Result := GetOwner; -end; -{$ENDIF} - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxFilter.pas b/internal/x.46/ExpressDataController/Sources/cxFilter.pas deleted file mode 100644 index 0d77ad60..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxFilter.pas +++ /dev/null @@ -1,3059 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxFilter; - -{$I cxVer.inc} - -interface - -uses - Classes, dxCore{$IFDEF DELPHI6}, Variants{$ENDIF}; - -type - TcxFilterOperatorKind = (foEqual, foNotEqual, foLess, foLessEqual, - foGreater, foGreaterEqual, foLike, foNotLike, foBetween, foNotBetween, - foInList, foNotInList, - foYesterday, foToday, foTomorrow, - foLast7Days, foLastWeek, foLast14Days, foLastTwoWeeks, foLast30Days, foLastMonth, foLastYear, foInPast, - foThisWeek, foThisMonth, foThisYear, - foNext7Days, foNextWeek, foNext14Days, foNextTwoWeeks, foNext30Days, foNextMonth, foNextYear, foInFuture); - TcxFilterOperatorKinds = set of TcxFilterOperatorKind; - TcxFilterBoolOperatorKind = (fboAnd, fboOr, fboNotAnd, fboNotOr); - - TcxFilterCriteriaItemList = class; - TcxFilterCriteriaItem = class; - TcxFilterCriteria = class; - - { TcxFilterOperator - CompareValues(): Value1 is Data Value, Value2 is CompareItem's Value } - - TcxFilterOperator = class - private - FCriteriaItem: TcxFilterCriteriaItem; - protected - function GetExpressionFilterText(const AValue: Variant): string; virtual; - function GetExpressionValue(const AValue: Variant): string; virtual; - procedure PrepareDisplayValue(var DisplayValue: string); virtual; - procedure Prepare; virtual; - function PrepareExpressionValue(const AValue: Variant; var DisplayValue: string): Boolean; virtual; - public - constructor Create(ACriteriaItem: TcxFilterCriteriaItem); virtual; - function CompareValues(const AValue1, AValue2: Variant): Boolean; virtual; abstract; - function DisplayText: string; virtual; - function FilterText: string; virtual; abstract; - function IsDescription: Boolean; virtual; - function IsExpression: Boolean; virtual; - function IsNullOperator: Boolean; virtual; - property CriteriaItem: TcxFilterCriteriaItem read FCriteriaItem; - end; - - TcxFilterOperatorClass = class of TcxFilterOperator; - - { TcxFilterEqualOperator } - - TcxFilterEqualOperator = class(TcxFilterOperator) - protected - function GetExpressionFilterText(const AValue: Variant): string; override; - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - function IsExpression: Boolean; override; - end; - - { TcxFilterNotEqualOperator } - - TcxFilterNotEqualOperator = class(TcxFilterEqualOperator) - protected - function GetExpressionFilterText(const AValue: Variant): string; override; - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - end; - - { TcxFilterLessOperator } - - TcxFilterLessOperator = class(TcxFilterOperator) - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - end; - - { TcxFilterLessEqualOperator } - - TcxFilterLessEqualOperator = class(TcxFilterOperator) - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - end; - - { TcxFilterGreaterOperator } - - TcxFilterGreaterOperator = class(TcxFilterOperator) - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - end; - - { TcxFilterGreaterEqualOperator } - - TcxFilterGreaterEqualOperator = class(TcxFilterOperator) - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - end; - - { TcxFilterLikeOperator } - - TcxFilterLikeOperator = class(TcxFilterOperator) - protected - procedure PrepareDisplayValue(var DisplayValue: string); override; - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - end; - - { TcxFilterNotLikeOperator } - - TcxFilterNotLikeOperator = class(TcxFilterLikeOperator) - protected - function GetExpressionFilterText(const AValue: Variant): string; override; - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - function IsExpression: Boolean; override; - end; - - { TcxFilterBetweenOperator } - - TcxFilterBetweenOperator = class(TcxFilterOperator) - protected - function GetExpressionFilterText(const AValue: Variant): string; override; - procedure PrepareDisplayValue(var DisplayValue: string); override; - function PrepareExpressionValue(const AValue: Variant; var DisplayValue: string): Boolean; override; - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - function IsDescription: Boolean; override; - function IsExpression: Boolean; override; - end; - - { TcxFilterNotBetweenOperator } - - TcxFilterNotBetweenOperator = class(TcxFilterBetweenOperator) - protected - function GetExpressionFilterText(const AValue: Variant): string; override; - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - end; - - { TcxFilterInListOperator } - - TcxFilterInListOperator = class(TcxFilterOperator) - protected - function GetExpressionFilterText(const AValue: Variant): string; override; - procedure PrepareDisplayValue(var DisplayValue: string); override; - function PrepareExpressionValue(const AValue: Variant; var DisplayValue: string): Boolean; override; - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - function IsDescription: Boolean; override; - function IsExpression: Boolean; override; - end; - - { TcxFilterNotInListOperator } - - TcxFilterNotInListOperator = class(TcxFilterInListOperator) - protected - function GetExpressionFilterText(const AValue: Variant): string; override; - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - end; - - { TcxFilterNullOperator } - - TcxFilterNullOperator = class(TcxFilterEqualOperator) - protected - procedure PrepareDisplayValue(var DisplayValue: string); override; - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function IsNullOperator: Boolean; override; - end; - - { TcxFilterNotNullOperator } - - TcxFilterNotNullOperator = class(TcxFilterNullOperator) - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function DisplayText: string; override; - function FilterText: string; override; - end; - - { TcxFilterDateOperator } - - TcxFilterDateOperator = class(TcxFilterOperator) - private - FDate1: TDateTime; - FDate2: TDateTime; - protected - procedure PrepareDisplayValue(var DisplayValue: string); override; - function GetExpressionFilterText(const AValue: Variant): string; override; - public - function CompareValues(const AValue1, AValue2: Variant): Boolean; override; - function FilterText: string; override; - function IsExpression: Boolean; override; - property Date1: TDateTime read FDate1 write FDate1; - property Date2: TDateTime read FDate2 write FDate2; - end; - - { Yesterday } - - TcxFilterYesterdayOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { Today } - - TcxFilterTodayOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { Tomorrow } - - TcxFilterTomorrowOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { LastNDays } - - TcxFilterLastNDaysOperator = class(TcxFilterDateOperator) - protected - function DayCount: Integer; virtual; abstract; - procedure Prepare; override; - end; - - { Last7Days } - - TcxFilterLast7DaysOperator = class(TcxFilterLastNDaysOperator) - protected - function DayCount: Integer; override; - public - function DisplayText: string; override; - end; - - { LastWeek } - - TcxFilterLastWeekOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { Last14Days } - - TcxFilterLast14DaysOperator = class(TcxFilterLastNDaysOperator) - protected - function DayCount: Integer; override; - public - function DisplayText: string; override; - end; - - { LastTwoWeeks } - - TcxFilterLastTwoWeeksOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { Last30Days } - - TcxFilterLast30DaysOperator = class(TcxFilterLastNDaysOperator) - protected - function DayCount: Integer; override; - public - function DisplayText: string; override; - end; - - { LastMonth } - - TcxFilterLastMonthOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { LastYear } - - TcxFilterLastYearOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { InPast } - - TcxFilterInPastOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { ThisWeek } - - TcxFilterThisWeekOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { ThisMonth } - - TcxFilterThisMonthOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { ThisYear } - - TcxFilterThisYearOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { NextNDays } - - TcxFilterNextNDaysOperator = class(TcxFilterDateOperator) - protected - function DayCount: Integer; virtual; abstract; - procedure Prepare; override; - end; - - { Next7Days } - - TcxFilterNext7DaysOperator = class(TcxFilterNextNDaysOperator) - protected - function DayCount: Integer; override; - public - function DisplayText: string; override; - end; - - { NextWeek } - - TcxFilterNextWeekOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { Next14Days } - - TcxFilterNext14DaysOperator = class(TcxFilterNextNDaysOperator) - protected - function DayCount: Integer; override; - public - function DisplayText: string; override; - end; - - { NextTwoWeeks } - - TcxFilterNextTwoWeeksOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { Next30Days } - - TcxFilterNext30DaysOperator = class(TcxFilterNextNDaysOperator) - protected - function DayCount: Integer; override; - public - function DisplayText: string; override; - end; - - { NextMonth } - - TcxFilterNextMonthOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { NextYear } - - TcxFilterNextYearOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { InFuture } - - TcxFilterInFutureOperator = class(TcxFilterDateOperator) - protected - procedure Prepare; override; - public - function DisplayText: string; override; - end; - - { TcxCustomFilterCriteriaItem } - - TcxCustomFilterCriteriaItem = class - private - FParent: TcxFilterCriteriaItemList; - protected - procedure Changed; virtual; - function GetCriteria: TcxFilterCriteria; virtual; - function GetIsItemList: Boolean; virtual; abstract; - procedure ReadData(AStream: TStream); virtual; - procedure WriteData(AStream: TStream); virtual; - public - constructor Create(AOwner: TcxFilterCriteriaItemList); - destructor Destroy; override; - function IsEmpty: Boolean; virtual; abstract; - property IsItemList: Boolean read GetIsItemList; - property Criteria: TcxFilterCriteria read GetCriteria; - property Parent: TcxFilterCriteriaItemList read FParent; - end; - - { TcxFilterCriteriaItemList } - - TcxFilterCriteriaItemListClass = class of TcxFilterCriteriaItemList; - - TcxFilterCriteriaItemList = class(TcxCustomFilterCriteriaItem) - private - FBoolOperatorKind: TcxFilterBoolOperatorKind; - FCriteria: TcxFilterCriteria; - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxCustomFilterCriteriaItem; - procedure SetBoolOperatorKind(Value: TcxFilterBoolOperatorKind); - protected - function GetCriteria: TcxFilterCriteria; override; - function GetIsItemList: Boolean; override; - procedure RemoveItem(AItem: TcxCustomFilterCriteriaItem); virtual; - procedure ReadData(AStream: TStream); override; - procedure WriteData(AStream: TStream); override; - function ReadItem(AStream: TStream): TcxCustomFilterCriteriaItem; - procedure WriteItem(AStream: TStream; AItem: TcxCustomFilterCriteriaItem); - public - constructor Create(AOwner: TcxFilterCriteriaItemList; ABoolOperatorKind: TcxFilterBoolOperatorKind); virtual; - destructor Destroy; override; - function AddItem(AItemLink: TObject; AOperatorKind: TcxFilterOperatorKind; - const AValue: Variant; const ADisplayValue: string): TcxFilterCriteriaItem; - function AddItemList(ABoolOperatorKind: TcxFilterBoolOperatorKind): TcxFilterCriteriaItemList; - procedure Clear; - function IsEmpty: Boolean; override; - property BoolOperatorKind: TcxFilterBoolOperatorKind read FBoolOperatorKind write SetBoolOperatorKind default fboAnd; - property Count: Integer read GetCount; - property Criteria: TcxFilterCriteria read GetCriteria; - property Items[Index: Integer]: TcxCustomFilterCriteriaItem read GetItem; default; - end; - - { TcxFilterCriteriaItem } - - TcxFilterCriteriaItem = class(TcxCustomFilterCriteriaItem) - private - FDisplayValue: string; - FItemLink: TObject; - FOperator: TcxFilterOperator; - FOperatorKind: TcxFilterOperatorKind; - FValue: Variant; - procedure SetDisplayValue(const Value: string); - procedure SetOperatorKind(Value: TcxFilterOperatorKind); - procedure SetValue(const Value: Variant); - protected - procedure CheckDisplayValue; - function GetDataValue(AData: TObject): Variant; virtual; abstract; - function GetDisplayValue: string; virtual; - function GetExpressionValue(AIsCaption: Boolean): string; virtual; - function GetFieldCaption: string; virtual; abstract; - function GetFieldName: string; virtual; abstract; - function GetFilterOperatorClass: TcxFilterOperatorClass; virtual; - function GetItemLink: TObject; virtual; - procedure SetItemLink(Value: TObject); virtual; - function GetIsItemList: Boolean; override; - procedure RecreateOperator; virtual; - procedure ReadData(AStream: TStream); override; - procedure WriteData(AStream: TStream); override; - public - constructor Create(AOwner: TcxFilterCriteriaItemList; AItemLink: TObject; - AOperatorKind: TcxFilterOperatorKind; const AValue: Variant; - const ADisplayValue: string); virtual; - destructor Destroy; override; - function IsEmpty: Boolean; override; - function ValueIsNull(const AValue: Variant): Boolean; virtual; - property DisplayValue: string read FDisplayValue write SetDisplayValue; - property ItemLink: TObject read GetItemLink; - property Operator: TcxFilterOperator read FOperator; - property OperatorKind: TcxFilterOperatorKind read FOperatorKind write SetOperatorKind; - property Value: Variant read FValue write SetValue; - end; - - TcxFilterCriteriaItemClass = class of TcxFilterCriteriaItem; - - { TcxFilterValueList } - - TcxFilterValueItemKind = (fviAll, fviCustom, fviBlanks, fviNonBlanks, fviUser, - fviValue, fviMRU, fviMRUSeparator, fviSpecial); - - TcxFilterValueItem = record - Kind: TcxFilterValueItemKind; - Value: Variant; - DisplayText: string; - end; - PcxFilterValueItem = ^TcxFilterValueItem; - - TcxFilterValueList = class - private - FCriteria: TcxFilterCriteria; - FItems: TList; - FSortByDisplayText: Boolean; - function GetCount: Integer; - function GetItem(Index: Integer): PcxFilterValueItem; - function GetMaxCount: Integer; - protected - function CompareItem(AIndex: Integer; const AValue: Variant; const ADisplayText: string): Integer; virtual; - function GetMRUSeparatorIndex: Integer; - function GetStartValueIndex: Integer; - public - constructor Create(ACriteria: TcxFilterCriteria); virtual; - destructor Destroy; override; - procedure Add(AKind: TcxFilterValueItemKind; const AValue: Variant; const ADisplayText: string; ANoSorting: Boolean); virtual; - procedure Clear; virtual; - procedure Delete(AIndex: Integer); - function Find(const AValue: Variant; const ADisplayText: string; var AIndex: Integer): Boolean; virtual; - function FindItemByKind(AKind: TcxFilterValueItemKind): Integer; overload; - function FindItemByKind(AKind: TcxFilterValueItemKind; const AValue: Variant): Integer; overload; - function FindItemByValue(const AValue: Variant): Integer; - function GetIndexByCriteriaItem(ACriteriaItem: TcxFilterCriteriaItem): Integer; virtual; - property Count: Integer read GetCount; - property Criteria: TcxFilterCriteria read FCriteria; - property Items[Index: Integer]: PcxFilterValueItem read GetItem; default; - property ItemsList: TList read FItems; - property MaxCount: Integer read GetMaxCount; - property SortByDisplayText: Boolean read FSortByDisplayText write FSortByDisplayText; - end; - - TcxFilterValueListClass = class of TcxFilterValueList; - - { TcxFilterCriteria } - - TcxFilterCriteriaOption = (fcoCaseInsensitive, fcoShowOperatorDescription, - fcoSoftNull, fcoSoftCompare, fcoIgnoreNull); - TcxFilterCriteriaOptions = set of TcxFilterCriteriaOption; - - TcxFilterCriteria = class(TPersistent) - private - FChanged: Boolean; - FDateTimeFormat: string; - FIsUnicode: Boolean; - FLoadedVersion: Byte; - FLockCount: Integer; - FMaxValueListCount: Integer; - FOptions: TcxFilterCriteriaOptions; - FPercentWildcard: Char; - FRoot: TcxFilterCriteriaItemList; - FSavedVersion: Byte; - FSavingToStream: Boolean; - FSupportedLike: Boolean; - FTranslateBetween: Boolean; - FTranslateLike: Boolean; - FTranslateIn: Boolean; - FUnderscoreWildcard: Char; - FVersion: Byte; - FOnChanged: TNotifyEvent; - function GetOptions: TcxFilterCriteriaOptions; - function GetStoreItemLinkNames: Boolean; - procedure SetDateTimeFormat(const Value: string); - procedure SetOptions(Value: TcxFilterCriteriaOptions); - procedure SetPercentWildcard(Value: Char); - procedure SetStoreItemLinkNames(Value: Boolean); - procedure SetUnderscoreWildcard(Value: Char); - protected - procedure CheckChanges; virtual; - function ConvertBoolToStr(const AValue: Variant): string; virtual; - function ConvertDateToStr(const AValue: Variant): string; virtual; - function DoFilterData(AData: TObject): Boolean; - procedure FormatFilterTextValue(AItem: TcxFilterCriteriaItem; const AValue: Variant; - var ADisplayValue: string); virtual; - function GetFilterCaption: string; virtual; - function GetFilterExpression(AIsCaption: Boolean): string; virtual; - function GetFilterText: string; virtual; - function GetIDByItemLink(AItemLink: TObject): Integer; virtual; abstract; - function GetNameByItemLink(AItemLink: TObject): string; virtual; abstract; - function GetItemClass: TcxFilterCriteriaItemClass; virtual; - function GetItemListClass: TcxFilterCriteriaItemListClass; virtual; - function GetItemExpression(AItem: TcxFilterCriteriaItem; AIsCaption: Boolean): string; virtual; - function GetItemExpressionFieldName(AItem: TcxFilterCriteriaItem; AIsCaption: Boolean): string; virtual; - function GetItemExpressionOperator(AItem: TcxFilterCriteriaItem; AIsCaption: Boolean): string; virtual; - function GetItemExpressionValue(AItem: TcxFilterCriteriaItem; AIsCaption: Boolean): string; virtual; - function GetItemLinkByID(AID: Integer): TObject; virtual; abstract; - function GetItemLinkByName(const AName: string): TObject; virtual; abstract; - function GetValueListClass: TcxFilterValueListClass; virtual; - function IsStore: Boolean; - procedure Prepare; virtual; - function PrepareValue(AValue: Variant): Variant; virtual; - procedure SetFilterText(const Value: string); virtual; - procedure Update; virtual; - - property IsUnicode: Boolean read FIsUnicode; - property LoadedVersion: Byte read FLoadedVersion; - property LockCount: Integer read FLockCount; - property SavedVersion: Byte read FSavedVersion; - property Version: Byte read FVersion write FVersion; - public - constructor Create; - destructor Destroy; override; - procedure Assign(Source: TPersistent; AIgnoreItemNames: Boolean = False); reintroduce; virtual; - procedure AssignEvents(Source: TPersistent); virtual; - procedure AssignItems(ASource: TcxFilterCriteria; AIgnoreItemNames: Boolean = False); virtual; - function AddItem(AParent: TcxFilterCriteriaItemList; AItemLink: TObject; - AOperatorKind: TcxFilterOperatorKind; const AValue: Variant; - const ADisplayValue: string): TcxFilterCriteriaItem; virtual; - procedure BeginUpdate; - procedure CancelUpdate; - procedure Clear; - procedure Changed; virtual; - procedure EndUpdate; - function EqualItems(AFilterCriteria: TcxFilterCriteria; AIgnoreItemNames: Boolean = False): Boolean; - function FindItemByItemLink(AItemLink: TObject): TcxFilterCriteriaItem; virtual; - function IsEmpty: Boolean; virtual; - procedure LoadFromStream(AStream: TStream); virtual; - procedure Refresh; - procedure RemoveItemByItemLink(AItemLink: TObject); - procedure RestoreDefaults; virtual; - procedure SaveToStream(AStream: TStream); virtual; - function ValueIsNull(const AValue: Variant): Boolean; virtual; - // internal - procedure ReadData(AStream: TStream); virtual; - procedure WriteData(AStream: TStream); overload; - procedure WriteData(AStream: TStream; AVersion: Byte); overload; virtual; - - property DateTimeFormat: string read FDateTimeFormat write SetDateTimeFormat; - property FilterCaption: string read GetFilterCaption; - property FilterText: string read GetFilterText write SetFilterText; - property Root: TcxFilterCriteriaItemList read FRoot; - property StoreItemLinkNames: Boolean read GetStoreItemLinkNames write SetStoreItemLinkNames; - property SupportedLike: Boolean read FSupportedLike write FSupportedLike default True; - property TranslateBetween: Boolean read FTranslateBetween write FTranslateBetween default False; - property TranslateIn: Boolean read FTranslateIn write FTranslateIn default False; - property TranslateLike: Boolean read FTranslateLike write FTranslateLike default False; - published - property MaxValueListCount: Integer read FMaxValueListCount write FMaxValueListCount default 0; - property Options: TcxFilterCriteriaOptions read GetOptions write SetOptions default []; - property PercentWildcard: Char read FPercentWildcard write SetPercentWildcard default '%'; - property UnderscoreWildcard: Char read FUnderscoreWildcard write SetUnderscoreWildcard default '_'; - property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; - end; - -function ExtractFilterDisplayValue(const AValues: string; var Pos: Integer): string; - -//function StrToVarBetweenArray(const AValue: string): Variant; -//function StrToVarListArray(const AValue: string): Variant; - -function VarBetweenArrayToStr(const AValue: Variant): string; -function VarListArrayToStr(const AValue: Variant): string; - -var - cxFilterIncludeTodayInLastNextDaysList: Boolean = True; - -implementation - -uses - {$IFDEF DELPHI9}Windows, {$ENDIF} - SysUtils, Math, - {$IFDEF DELPHI6}RTLConsts, SqlTimSt,{$ENDIF} - cxVariants, cxLike, cxFilterConsts, cxDataUtils; - -const - cxFilterNullDate = 0; // it is safe because we do not use such past dates for the property values - -type - TFilterWrapper = class(TComponent) - private - FFilter: TcxFilterCriteria; - published - property Filter: TcxFilterCriteria read FFilter write FFilter; - end; - -function FilterVarToStr(const AValue: Variant): string; -begin - if VarIsNull(AValue) then - Result := cxSFilterString(@cxSFilterBlankCaption) - else - Result := VarToStr(AValue); -end; - -function ExtractFilterDisplayValue(const AValues: string; var Pos: Integer): string; -var - I: Integer; -begin - I := Pos; - while (I <= Length(AValues)) and (AValues[I] <> ';') do Inc(I); - Result := Trim(Copy(AValues, Pos, I - Pos)); - if (I <= Length(AValues)) and (AValues[I] = ';') then Inc(I); - Pos := I; -end; - -function StrToVarBetweenArray(const AValue: string): Variant; -var - APos: Integer; - S1, S2: string; -begin - S1 := ''; - S2 := ''; - APos := 1; - S1 := ExtractFilterDisplayValue(AValue, APos); - if APos <= Length(AValue) then - S2 := ExtractFilterDisplayValue(AValue, APos); - Result := VarBetweenArrayCreate(S1, S2); -end; - -function StrToVarListArray(const AValue: string): Variant; -var - AEmpty: Boolean; - APos: Integer; - S: string; -begin - AEmpty := True; - Result := ''; - APos := 1; - while APos <= Length(AValue) do - begin - S := ExtractFilterDisplayValue(AValue, APos); - if AEmpty then - begin - Result := VarListArrayCreate(S); - AEmpty := False; - end - else - VarListArrayAddValue(Result, S); - end; -end; - -function StreamsEqual(AStream1, AStream2: TMemoryStream): Boolean; -begin - Result := (AStream1.Size = AStream2.Size) and - CompareMem(AStream1.Memory, AStream2.Memory, AStream1.Size); -end; - -function VarBetweenArrayToStr(const AValue: Variant): string; -begin - Result := FilterVarToStr(AValue[0]) + ' ' + - cxSFilterString(@cxSFilterAndCaption) + ' ' + FilterVarToStr(AValue[1]); -end; - -function VarListArrayToStr(const AValue: Variant): string; -var - I: Integer; -begin - Result := '(' + FilterVarToStr(AValue[0]); - for I := VarArrayLowBound(AValue, 1) + 1 to VarArrayHighBound(AValue, 1) do - Result := Result + ', ' + FilterVarToStr(AValue[I]); - Result := Result + ')'; -end; - -{ TcxFilterOperator } - -constructor TcxFilterOperator.Create(ACriteriaItem: TcxFilterCriteriaItem); -begin - inherited Create; - FCriteriaItem := ACriteriaItem; -end; - -function TcxFilterOperator.DisplayText: string; -begin - Result := FilterText; -end; - -function TcxFilterOperator.IsDescription: Boolean; -begin - Result := False; -end; - -function TcxFilterOperator.IsExpression: Boolean; -begin - Result := False; -end; - -function TcxFilterOperator.IsNullOperator: Boolean; -begin - Result := False; -end; - -function TcxFilterOperator.GetExpressionFilterText(const AValue: Variant): string; -begin - Result := GetExpressionValue(AValue); -end; - -function TcxFilterOperator.GetExpressionValue(const AValue: Variant): string; -var - AVarType: Integer; -begin - if not PrepareExpressionValue(AValue, Result) then - begin - if VarIsStr(AValue) then - Result := QuotedStr(VarToStr(AValue)) - else - begin - AVarType := VarType(AValue); - if (AVarType = varDate) {$IFDEF DELPHI6} or (AVarType = VarSQLTimeStamp) {$ENDIF} then - Result := '''' + CriteriaItem.Criteria.ConvertDateToStr(AValue) + '''' - else - if AVarType = varBoolean then - Result := CriteriaItem.Criteria.ConvertBoolToStr(AValue) - else - if AVarType = varNull then - Result := 'NULL' - else - Result := VarToStr(AValue); - end; - CriteriaItem.Criteria.FormatFilterTextValue(CriteriaItem, AValue, Result); - end; -end; - -procedure TcxFilterOperator.PrepareDisplayValue(var DisplayValue: string); -begin -end; - -procedure TcxFilterOperator.Prepare; -begin -end; - -function TcxFilterOperator.PrepareExpressionValue(const AValue: Variant; var DisplayValue: string): Boolean; -begin - Result := False; -end; - -{ TcxFilterEqualOperator } - -function TcxFilterEqualOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - Result := VarCompare(AValue1, AValue2) = 0; -end; - -function TcxFilterEqualOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorEqual); -end; - -function TcxFilterEqualOperator.FilterText: string; -begin - Result := '='; -end; - -function TcxFilterEqualOperator.IsExpression: Boolean; -begin - Result := VarIsArray(CriteriaItem.Value); -end; - -function TcxFilterEqualOperator.GetExpressionFilterText(const AValue: Variant): string; - - function ExtractFieldName(const Fields: string; var Pos: Integer): string; - var - I: Integer; - begin - I := Pos; - while (I <= Length(Fields)) and (Fields[I] <> ';') do Inc(I); - Result := Trim(Copy(Fields, Pos, I - Pos)); - if (I <= Length(Fields)) and (Fields[I] = ';') then Inc(I); - Pos := I; - end; - -var - AFieldNames: string; - I, APos: Integer; -begin - AFieldNames := CriteriaItem.GetFieldName; - APos := 1; - Result := '(' + ExtractFieldName(AFieldNames, APos) + ' = ' + GetExpressionValue(AValue[0]) + ')'; - for I := VarArrayLowBound(AValue, 1) + 1 to VarArrayHighBound(AValue, 1) do - Result := Result + ' AND ' + - '(' + ExtractFieldName(AFieldNames, APos) + ' = ' + GetExpressionValue(AValue[I]) + ')'; -end; - -{ TcxFilterNotEqualOperator } - -function TcxFilterNotEqualOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - Result := not inherited CompareValues(AValue1, AValue2); -end; - -function TcxFilterNotEqualOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorNotEqual); -end; - -function TcxFilterNotEqualOperator.FilterText: string; -begin - Result := '<>'; -end; - -function TcxFilterNotEqualOperator.GetExpressionFilterText(const AValue: Variant): string; -begin - Result := 'NOT (' + inherited GetExpressionFilterText(AValue) + ')'; -end; - -{ TcxFilterLessOperator } - -function TcxFilterLessOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - {$IFNDEF DELPHI6} - Result := (AValue1 < AValue2); - {$ELSE} - Result := VarCompare(AValue1, AValue2) < 0; - {$ENDIF} -end; - -function TcxFilterLessOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorLess); -end; - -function TcxFilterLessOperator.FilterText: string; -begin - Result := '<'; -end; - -{ TcxFilterLessEqualOperator } - -function TcxFilterLessEqualOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - {$IFNDEF DELPHI6} - Result := (AValue1 <= AValue2); - {$ELSE} - Result := VarCompare(AValue1, AValue2) <= 0; - {$ENDIF} -end; - -function TcxFilterLessEqualOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorLessEqual); -end; - -function TcxFilterLessEqualOperator.FilterText: string; -begin - Result := '<='; -end; - -{ TcxFilterGreaterOperator } - -function TcxFilterGreaterOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - {$IFNDEF DELPHI6} - Result := (AValue1 > AValue2); - {$ELSE} - Result := VarCompare(AValue1, AValue2) > 0; - {$ENDIF} -end; - -function TcxFilterGreaterOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorGreater); -end; - -function TcxFilterGreaterOperator.FilterText: string; -begin - Result := '>'; -end; - -{ TcxFilterGreaterEqualOperator } - -function TcxFilterGreaterEqualOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - {$IFNDEF DELPHI6} - Result := (AValue1 >= AValue2); - {$ELSE} - Result := VarCompare(AValue1, AValue2) >= 0; - {$ENDIF} -end; - -function TcxFilterGreaterEqualOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorGreaterEqual); -end; - -function TcxFilterGreaterEqualOperator.FilterText: string; -begin - Result := '>='; -end; - -{ TcxFilterLikeOperator } - -function TcxFilterLikeOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - Result := LikeStr(VarToStr(AValue1), AValue2, - CriteriaItem.Criteria.PercentWildcard, CriteriaItem.Criteria.UnderscoreWildcard); -end; - -function TcxFilterLikeOperator.DisplayText: string; -var - S: string; -begin - S := CriteriaItem.Value; - case LikeOperatorByPattern(S, CriteriaItem.Criteria.PercentWildcard) of - floBeginsWith: - Result := cxSFilterString(@cxSFilterOperatorBeginsWith); - floEndsWith: - Result := cxSFilterString(@cxSFilterOperatorEndsWith); - floContains: - Result := cxSFilterString(@cxSFilterOperatorContains); - else - Result := cxSFilterString(@cxSFilterOperatorLike); - end; -end; - -function TcxFilterLikeOperator.FilterText: string; -begin - Result := 'LIKE'; -end; - -procedure TcxFilterLikeOperator.PrepareDisplayValue(var DisplayValue: string); -begin - if fcoShowOperatorDescription in CriteriaItem.Criteria.Options then - LikeOperatorByPattern(DisplayValue, CriteriaItem.Criteria.PercentWildcard); -end; - -{ TcxFilterNotLikeOperator } - -function TcxFilterNotLikeOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - Result := not inherited CompareValues(AValue1, AValue2); -end; - -function TcxFilterNotLikeOperator.DisplayText: string; -var - S: string; -begin - S := CriteriaItem.Value; - case LikeOperatorByPattern(S, CriteriaItem.Criteria.PercentWildcard) of - floBeginsWith: - Result := cxSFilterString(@cxSFilterOperatorDoesNotBeginWith); - floEndsWith: - Result := cxSFilterString(@cxSFilterOperatorDoesNotEndWith); - floContains: - Result := cxSFilterString(@cxSFilterOperatorDoesNotContain); - else - Result := cxSFilterString(@cxSFilterOperatorNotLike); - end; -end; - -function TcxFilterNotLikeOperator.FilterText: string; -begin - Result := 'NOT LIKE'; -end; - -function TcxFilterNotLikeOperator.IsExpression: Boolean; -begin - Result := CriteriaItem.Criteria.TranslateLike; -end; - -function TcxFilterNotLikeOperator.GetExpressionFilterText(const AValue: Variant): string; -begin - Result := ' NOT (' + CriteriaItem.GetFieldName + ' LIKE ' + GetExpressionValue(AValue) + ')'; -end; - -{ TcxFilterBetweenOperator } - -function TcxFilterBetweenOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - {$IFNDEF DELPHI6} - Result := (AValue2[0] <= AValue1) and (AValue1 <= AValue2[1]); - {$ELSE} - Result := (VarCompare(AValue2[0], AValue1) <= 0) and (VarCompare(AValue1, AValue2[1]) <= 0); - {$ENDIF} -end; - -function TcxFilterBetweenOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorBetween); -end; - -function TcxFilterBetweenOperator.FilterText: string; -begin - Result := 'BETWEEN'; -end; - -function TcxFilterBetweenOperator.IsDescription: Boolean; -begin - Result := True; -end; - -function TcxFilterBetweenOperator.IsExpression: Boolean; -begin - Result := CriteriaItem.Criteria.TranslateBetween; -end; - -function TcxFilterBetweenOperator.GetExpressionFilterText(const AValue: Variant): string; -var - AFieldName: string; -begin - AFieldName := CriteriaItem.GetFieldName; - Result := '(' + AFieldName + ' >= ' + GetExpressionValue(AValue[0]) + ') AND (' + - AFieldName + ' <= ' + GetExpressionValue(AValue[1]) + ')'; -end; - -procedure TcxFilterBetweenOperator.PrepareDisplayValue(var DisplayValue: string); -var - S: string; -begin - S := DisplayValue; - DisplayValue := VarBetweenArrayToStr(StrToVarBetweenArray(S)); -end; - -function TcxFilterBetweenOperator.PrepareExpressionValue(const AValue: Variant; - var DisplayValue: string): Boolean; -begin - Result := VarIsArray(AValue); - if Result then - DisplayValue := GetExpressionValue(AValue[0]) + ' AND ' + GetExpressionValue(AValue[1]); -end; - -{ TcxFilterNotBetweenOperator } - -function TcxFilterNotBetweenOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - Result := not inherited CompareValues(AValue1, AValue2); -end; - -function TcxFilterNotBetweenOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorNotBetween); -end; - -function TcxFilterNotBetweenOperator.FilterText: string; -begin - Result := 'NOT BETWEEN'; -end; - -function TcxFilterNotBetweenOperator.GetExpressionFilterText(const AValue: Variant): string; -begin - Result := 'NOT (' + inherited GetExpressionFilterText(AValue) + ')'; -end; - -{ TcxFilterInListOperator } - -function TcxFilterInListOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -var - I: Integer; -begin - Result := False; - for I := VarArrayLowBound(AValue2, 1) to VarArrayHighBound(AValue2, 1) do - if AValue1 = AValue2[I] then - begin - Result := True; - Break; - end; -end; - -function TcxFilterInListOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorInList); -end; - -function TcxFilterInListOperator.FilterText: string; -begin - Result := 'IN'; -end; - -function TcxFilterInListOperator.IsDescription: Boolean; -begin - Result := True; -end; - -function TcxFilterInListOperator.IsExpression: Boolean; -begin - Result := CriteriaItem.Criteria.TranslateIn; -end; - -function TcxFilterInListOperator.GetExpressionFilterText(const AValue: Variant): string; -var - AFieldName: string; - I: Integer; -begin - AFieldName := CriteriaItem.GetFieldName; - Result := '(' + AFieldName + ' = ' + GetExpressionValue(AValue[0]) + ')'; - for I := VarArrayLowBound(AValue, 1) + 1 to VarArrayHighBound(AValue, 1) do - Result := Result + ' OR ' + '(' + AFieldName + ' = ' + GetExpressionValue(AValue[I]) + ')'; -end; - -procedure TcxFilterInListOperator.PrepareDisplayValue(var DisplayValue: string); -var - S: string; -begin - S := DisplayValue; - DisplayValue := VarListArrayToStr(StrToVarListArray(S)); -end; - -function TcxFilterInListOperator.PrepareExpressionValue(const AValue: Variant; - var DisplayValue: string): Boolean; -var - I: Integer; -begin - Result := VarIsArray(AValue); - if Result then - begin - DisplayValue := '(' + GetExpressionValue(AValue[0]); - for I := VarArrayLowBound(AValue, 1) + 1 to VarArrayHighBound(AValue, 1) do - DisplayValue := DisplayValue + ', ' + GetExpressionValue(AValue[I]); - DisplayValue := DisplayValue + ')'; - end; -end; - -{ TcxFilterNotInListOperator } - -function TcxFilterNotInListOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - Result := not inherited CompareValues(AValue1, AValue2); -end; - -function TcxFilterNotInListOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorNotInList); -end; - -function TcxFilterNotInListOperator.FilterText: string; -begin - Result := 'NOT IN'; -end; - -function TcxFilterNotInListOperator.GetExpressionFilterText(const AValue: Variant): string; -begin - Result := 'NOT (' + inherited GetExpressionFilterText(AValue) + ')'; -end; - -{ TcxFilterNullOperator } - -function TcxFilterNullOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - Result := CriteriaItem.ValueIsNull(AValue1); -end; - -function TcxFilterNullOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorIsNull); -end; - -function TcxFilterNullOperator.IsNullOperator: Boolean; -begin - Result := True; -end; - -procedure TcxFilterNullOperator.PrepareDisplayValue(var DisplayValue: string); -begin - if fcoShowOperatorDescription in CriteriaItem.Criteria.Options then - DisplayValue := ''; -end; - -{ TcxFilterNotNullOperator } - -function TcxFilterNotNullOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - Result := not inherited CompareValues(AValue1, AValue2); -end; - -function TcxFilterNotNullOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorIsNotNull); -end; - -function TcxFilterNotNullOperator.FilterText: string; -begin - Result := '<>'; -end; - -{ TcxFilterDateOperator } - -function TcxFilterDateOperator.CompareValues(const AValue1, AValue2: Variant): Boolean; -begin - if CriteriaItem.ValueIsNull(AValue1) then - Result := False - else - Result := - ((Date1 = cxFilterNullDate) or (Date1 <= AValue1)) and - ((Date2 = cxFilterNullDate) or (AValue1 < Date2)); -end; - -function TcxFilterDateOperator.FilterText: string; -begin - Result := DisplayText; -end; - -function TcxFilterDateOperator.IsExpression: Boolean; -begin - Result := True; -end; - -function TcxFilterDateOperator.GetExpressionFilterText(const AValue: Variant): string; -var - AFieldName: string; -begin - AFieldName := CriteriaItem.GetFieldName; - if Date1 <> cxFilterNullDate then - Result := '(' + AFieldName + ' >= ' + GetExpressionValue(Date1) + ')' - else - Result := ''; - if Date2 <> cxFilterNullDate then - begin - if Result <> '' then - Result := Result + ' AND '; - Result := Result + '(' + AFieldName + ' < ' + GetExpressionValue(Date2) + ')'; - end; -end; - -procedure TcxFilterDateOperator.PrepareDisplayValue(var DisplayValue: string); -begin - DisplayValue := ''; -end; - -{ Yesterday } - -procedure TcxFilterYesterdayOperator.Prepare; -var - ANowDate: TDateTime; -begin - ANowDate := Date; - Date1 := ANowDate - 1; - Date2 := ANowDate; -end; - -function TcxFilterYesterdayOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorYesterday); -end; - -{ Today } - -procedure TcxFilterTodayOperator.Prepare; -var - ANowDate: TDateTime; -begin - ANowDate := Date; - Date1 := ANowDate; - Date2 := ANowDate + 1; -end; - -function TcxFilterTodayOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorToday); -end; - -{ Tomorrow } - -procedure TcxFilterTomorrowOperator.Prepare; -var - ANowDate: TDateTime; -begin - ANowDate := Date; - Date1 := ANowDate + 1; - Date2 := ANowDate + 2; -end; - -function TcxFilterTomorrowOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorTomorrow); -end; - -{ LastNDays } - -procedure TcxFilterLastNDaysOperator.Prepare; -begin - Date2 := Date; - if cxFilterIncludeTodayInLastNextDaysList then - Date2 := Date2 + 1; - Date1 := Date2 - DayCount; -end; - -{ Last7Days } - -function TcxFilterLast7DaysOperator.DayCount: Integer; -begin - Result := 7; -end; - -function TcxFilterLast7DaysOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorLast7Days); -end; - -{ LastWeek } - -procedure TcxFilterLastWeekOperator.Prepare; -var - ANowDate: TDateTime; -begin - ANowDate := Date; - Date1 := GetStartDateOfWeek(ANowDate) - 7; - Date2 := Date1 + 7; -end; - -function TcxFilterLastWeekOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorLastWeek); -end; - -{ Last14Days } - -function TcxFilterLast14DaysOperator.DayCount: Integer; -begin - Result := 14; -end; - -function TcxFilterLast14DaysOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorLast14Days); -end; - -{ LastTwoWeeks } - -procedure TcxFilterLastTwoWeeksOperator.Prepare; -begin - Date1 := GetStartDateOfWeek(Date) - 2 * 7; - Date2 := Date1 + 2 * 7; -end; - -function TcxFilterLastTwoWeeksOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorLastTwoWeeks); -end; - -{ Last30Days } - -function TcxFilterLast30DaysOperator.DayCount: Integer; -begin - Result := 30; -end; - -function TcxFilterLast30DaysOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorLast30Days); -end; - -{ LastMonth } - -procedure TcxFilterLastMonthOperator.Prepare; -var - ANowDate: TDateTime; - D, M, Y: Word; -begin - ANowDate := Date; - DecodeDate(ANowDate, Y, M, D); - if M > 1 then - begin - Date1 := EncodeDate(Y, M - 1, 1); - Date2 := EncodeDate(Y, M, 1); - end - else - begin - Date1 := EncodeDate(Y - 1, 12, 1); - Date2 := EncodeDate(Y, 1, 1); - end; -end; - -function TcxFilterLastMonthOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorLastMonth); -end; - -{ LastYear } - -procedure TcxFilterLastYearOperator.Prepare; -var - ANowDate: TDateTime; - D, M, Y: Word; -begin - ANowDate := Date; - DecodeDate(ANowDate, Y, M, D); - Date1 := EncodeDate(Y - 1, 1, 1); - Date2 := EncodeDate(Y, 1, 1); -end; - -function TcxFilterLastYearOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorLastYear); -end; - -{ InPast } - -procedure TcxFilterInPastOperator.Prepare; -begin - Date1 := cxFilterNullDate; - Date2 := Date; -end; - -function TcxFilterInPastOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorPast); -end; - -{ ThisWeek } - -procedure TcxFilterThisWeekOperator.Prepare; -var - ANowDate: TDateTime; -begin - ANowDate := Date; - Date1 := GetStartDateOfWeek(ANowDate); - Date2 := Date1 + 7; -end; - -function TcxFilterThisWeekOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorThisWeek); -end; - -{ ThisMonth } - -procedure TcxFilterThisMonthOperator.Prepare; -var - ANowDate: TDateTime; - D, M, Y: Word; -begin - ANowDate := Date; - DecodeDate(ANowDate, Y, M, D); - if M < 12 then - begin - Date1 := EncodeDate(Y, M, 1); - Date2 := EncodeDate(Y, M + 1, 1); - end - else - begin - Date1 := EncodeDate(Y, M, 1); - Date2 := EncodeDate(Y + 1, 1, 1); - end; -end; - -function TcxFilterThisMonthOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorThisMonth); -end; - -{ ThisYear } - -procedure TcxFilterThisYearOperator.Prepare; -var - ANowDate: TDateTime; - D, M, Y: Word; -begin - ANowDate := Date; - DecodeDate(ANowDate, Y, M, D); - Date1 := EncodeDate(Y, 1, 1); - Date2 := EncodeDate(Y + 1, 1, 1); -end; - -function TcxFilterThisYearOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorThisYear); -end; - -{ NextNDays } - -procedure TcxFilterNextNDaysOperator.Prepare; -begin - Date1 := Date; - if not cxFilterIncludeTodayInLastNextDaysList then - Date1 := Date1 + 1; - Date2 := Date1 + DayCount; -end; - -{ Next7Days } - -function TcxFilterNext7DaysOperator.DayCount: Integer; -begin - Result := 7; -end; - -function TcxFilterNext7DaysOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorNext7Days); -end; - -{ NextWeek } - -procedure TcxFilterNextWeekOperator.Prepare; -var - ANowDate: TDateTime; -begin - ANowDate := Date; - Date1 := GetStartDateOfWeek(ANowDate) + 7; - Date2 := Date1 + 7; -end; - -function TcxFilterNextWeekOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorNextWeek); -end; - -{ Next14Days } - -function TcxFilterNext14DaysOperator.DayCount: Integer; -begin - Result := 14; -end; - -function TcxFilterNext14DaysOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorNext14Days); -end; - -{ NextTwoWeeks } - -procedure TcxFilterNextTwoWeeksOperator.Prepare; -begin - Date1 := GetStartDateOfWeek(Date) + 7; - Date2 := Date1 + 2 * 7; -end; - -function TcxFilterNextTwoWeeksOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorNextTwoWeeks); -end; - -{ Next30Days } - -function TcxFilterNext30DaysOperator.DayCount: Integer; -begin - Result := 30; -end; - -function TcxFilterNext30DaysOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorNext30Days); -end; - -{ NextMonth } - -procedure TcxFilterNextMonthOperator.Prepare; -var - ANowDate: TDateTime; - D, M, Y: Word; -begin - ANowDate := Date; - DecodeDate(ANowDate, Y, M, D); - if M < 11 then - begin - Date1 := EncodeDate(Y, M + 1, 1); - Date2 := EncodeDate(Y, M + 2, 1); - end - else - if M = 11 then - begin - Date1 := EncodeDate(Y, 12, 1); - Date2 := EncodeDate(Y + 1, 1, 1); - end - else - if M = 12 then - begin - Date1 := EncodeDate(Y + 1, 1, 1); - Date2 := EncodeDate(Y + 1, 2, 1); - end; -end; - -function TcxFilterNextMonthOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorNextMonth); -end; - -{ NextYear } - -procedure TcxFilterNextYearOperator.Prepare; -var - ANowDate: TDateTime; - D, M, Y: Word; -begin - ANowDate := Date; - DecodeDate(ANowDate, Y, M, D); - Date1 := EncodeDate(Y + 1, 1, 1); - Date2 := EncodeDate(Y + 2, 1, 1); -end; - -function TcxFilterNextYearOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorNextYear); -end; - -{ InFuture } - -procedure TcxFilterInFutureOperator.Prepare; -begin - Date1 := Date + 1; - Date2 := cxFilterNullDate; -end; - -function TcxFilterInFutureOperator.DisplayText: string; -begin - Result := cxSFilterString(@cxSFilterOperatorFuture); -end; - -{ TcxCustomFilterCriteriaItem } - -constructor TcxCustomFilterCriteriaItem.Create(AOwner: TcxFilterCriteriaItemList); -begin - inherited Create; - FParent := AOwner; -end; - -destructor TcxCustomFilterCriteriaItem.Destroy; -begin - if FParent <> nil then - FParent.RemoveItem(Self); - inherited Destroy; -end; - -procedure TcxCustomFilterCriteriaItem.Changed; -begin - Criteria.Changed; -end; - -function TcxCustomFilterCriteriaItem.GetCriteria: TcxFilterCriteria; -begin - Result := Parent.Criteria; -end; - -procedure TcxCustomFilterCriteriaItem.ReadData(AStream: TStream); -begin -end; - -procedure TcxCustomFilterCriteriaItem.WriteData(AStream: TStream); -begin -end; - -{ TcxFilterCriteriaItemList } - -constructor TcxFilterCriteriaItemList.Create(AOwner: TcxFilterCriteriaItemList; - ABoolOperatorKind: TcxFilterBoolOperatorKind); -begin - inherited Create(AOwner); - FBoolOperatorKind := ABoolOperatorKind; - FItems := TList.Create; -end; - -destructor TcxFilterCriteriaItemList.Destroy; -begin - Clear; - FItems.Free; - inherited Destroy; -end; - -function TcxFilterCriteriaItemList.AddItem(AItemLink: TObject; AOperatorKind: TcxFilterOperatorKind; - const AValue: Variant; const ADisplayValue: string): TcxFilterCriteriaItem; -begin - Result := Criteria.GetItemClass.Create(Self, AItemLink, AOperatorKind, AValue, ADisplayValue); - FItems.Add(Result); - Changed; -end; - -function TcxFilterCriteriaItemList.AddItemList(ABoolOperatorKind: TcxFilterBoolOperatorKind): TcxFilterCriteriaItemList; -begin - Result := Criteria.GetItemListClass.Create(Self, ABoolOperatorKind); - FItems.Add(Result); - Changed; -end; - -procedure TcxFilterCriteriaItemList.Clear; -var - I: Integer; -begin - Criteria.BeginUpdate; - try - for I := Count - 1 downto 0 do - Items[I].Free; - finally - Criteria.EndUpdate; - end; -end; - -function TcxFilterCriteriaItemList.IsEmpty: Boolean; -begin - Result := Count = 0; -end; - -function TcxFilterCriteriaItemList.GetCriteria: TcxFilterCriteria; -begin - if FCriteria <> nil then - Result := FCriteria - else - Result := inherited GetCriteria; -end; - -function TcxFilterCriteriaItemList.GetIsItemList: Boolean; -begin - Result := True; -end; - -procedure TcxFilterCriteriaItemList.RemoveItem(AItem: TcxCustomFilterCriteriaItem); -begin - if FItems.Remove(AItem) <> -1 then - Changed; -end; - -procedure TcxFilterCriteriaItemList.ReadData(AStream: TStream); -var - ACount, I: Integer; -begin - inherited; - BoolOperatorKind := TcxFilterBoolOperatorKind(ReadByteFunc(AStream)); - ACount := ReadIntegerFunc(AStream); - for I := 0 to ACount - 1 do - ReadItem(AStream); -end; - -procedure TcxFilterCriteriaItemList.WriteData(AStream: TStream); -var - I: Integer; -begin - inherited; - WriteByteProc(AStream, Byte(BoolOperatorKind)); - WriteIntegerProc(AStream, Count); - for I := 0 to Count - 1 do - WriteItem(AStream, Items[I]); -end; - -function TcxFilterCriteriaItemList.ReadItem(AStream: TStream): TcxCustomFilterCriteriaItem; -var - AIsItemList: Boolean; -begin - AIsItemList := ReadBooleanFunc(AStream); - if AIsItemList then - Result := AddItemList(fboAnd) - else - Result := AddItem(nil, foEqual, Unassigned, ''); - Result.ReadData(AStream); - if Result.IsEmpty then - FreeAndNil(Result); -end; - -procedure TcxFilterCriteriaItemList.WriteItem(AStream: TStream; - AItem: TcxCustomFilterCriteriaItem); -begin - WriteBooleanProc(AStream, AItem.IsItemList); - AItem.WriteData(AStream); -end; - -function TcxFilterCriteriaItemList.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxFilterCriteriaItemList.GetItem(Index: Integer): TcxCustomFilterCriteriaItem; -begin - if (0 <= Index) and (Index < Count) then - Result := TcxCustomFilterCriteriaItem(FItems[Index]) - else - Result := nil; -end; - -procedure TcxFilterCriteriaItemList.SetBoolOperatorKind(Value: TcxFilterBoolOperatorKind); -begin - if FBoolOperatorKind <> Value then - begin - FBoolOperatorKind := Value; - Changed; - end; -end; - -{ TcxFilterCriteriaItem } - -constructor TcxFilterCriteriaItem.Create(AOwner: TcxFilterCriteriaItemList; - AItemLink: TObject; AOperatorKind: TcxFilterOperatorKind; const AValue: Variant; - const ADisplayValue: string); -begin - inherited Create(AOwner); - SetItemLink(AItemLink); - FDisplayValue := ADisplayValue; - FOperatorKind := AOperatorKind; - FValue := AValue; - RecreateOperator; - CheckDisplayValue; -end; - -destructor TcxFilterCriteriaItem.Destroy; -begin - FOperator.Free; - FOperator := nil; - inherited Destroy; -end; - -function TcxFilterCriteriaItem.IsEmpty: Boolean; -begin - Result := ItemLink = nil; -end; - -function TcxFilterCriteriaItem.ValueIsNull(const AValue: Variant): Boolean; -begin - Result := Criteria.ValueIsNull(AValue); -end; - -procedure TcxFilterCriteriaItem.CheckDisplayValue; -begin - if ((FOperator is TcxFilterNullOperator) or (FOperator is TcxFilterNotNullOperator)) and - (FDisplayValue = '') then - FDisplayValue := cxSFilterString(@cxSFilterBlankCaption); -end; - -function TcxFilterCriteriaItem.GetDisplayValue: string; -begin - Result := DisplayValue; - Operator.PrepareDisplayValue(Result); -end; - -function TcxFilterCriteriaItem.GetExpressionValue(AIsCaption: Boolean): string; -begin - if AIsCaption then - Result := GetDisplayValue - else - Result := Operator.GetExpressionValue(Value); -end; - -function TcxFilterCriteriaItem.GetFilterOperatorClass: TcxFilterOperatorClass; -const - AOperatorClasses: array[TcxFilterOperatorKind] of TcxFilterOperatorClass = ( - TcxFilterEqualOperator, TcxFilterNotEqualOperator, - TcxFilterLessOperator, TcxFilterLessEqualOperator, - TcxFilterGreaterOperator, TcxFilterGreaterEqualOperator, - TcxFilterLikeOperator, TcxFilterNotLikeOperator, - TcxFilterBetweenOperator, TcxFilterNotBetweenOperator, - TcxFilterInListOperator, TcxFilterNotInListOperator, - TcxFilterYesterdayOperator, TcxFilterTodayOperator, TcxFilterTomorrowOperator, - TcxFilterLast7DaysOperator, TcxFilterLastWeekOperator, TcxFilterLast14DaysOperator, TcxFilterLastTwoWeeksOperator, - TcxFilterLast30DaysOperator, TcxFilterLastMonthOperator, TcxFilterLastYearOperator, TcxFilterInPastOperator, - TcxFilterThisWeekOperator, TcxFilterThisMonthOperator, TcxFilterThisYearOperator, - TcxFilterNext7DaysOperator, TcxFilterNextWeekOperator, TcxFilterNext14DaysOperator, TcxFilterNextTwoWeeksOperator, - TcxFilterNext30DaysOperator, TcxFilterNextMonthOperator, TcxFilterNextYearOperator, TcxFilterInFutureOperator); - ANullOperatorClasses: array[Boolean] of TcxFilterOperatorClass = ( - TcxFilterNullOperator, TcxFilterNotNullOperator); -begin - if (OperatorKind in [foEqual, foNotEqual, foLike, foNotLike]) and (ValueIsNull(Value)) then - Result := ANullOperatorClasses[OperatorKind in [foNotEqual, foNotLike]] - else - Result := AOperatorClasses[OperatorKind]; -end; - -function TcxFilterCriteriaItem.GetItemLink: TObject; -begin - Result := FItemLink; -end; - -procedure TcxFilterCriteriaItem.SetItemLink(Value: TObject); -begin - FItemLink := Value; -end; - -function TcxFilterCriteriaItem.GetIsItemList: Boolean; -begin - Result := False; -end; - -procedure TcxFilterCriteriaItem.RecreateOperator; -var - AIsConstruction: Boolean; -begin - AIsConstruction := FOperator = nil; - FOperator.Free; - FOperator := GetFilterOperatorClass.Create(Self); - if not AIsConstruction then - Changed; -end; - -procedure TcxFilterCriteriaItem.ReadData(AStream: TStream); - - function FindItemLink(const AName: string; AID: Integer): TObject; - begin - if AName = '' then - Result := Criteria.GetItemLinkByID(AID) - else - begin - Result := Criteria.GetItemLinkByName(AName); - if Result = nil then - begin - Result := Criteria.GetItemLinkByID(AID); - if (Result <> nil) and (Criteria.GetNameByItemLink(Result) <> '') then - Result := nil; - end; - end; - end; - -var - AItemLinkID: Integer; - AItemLinkName: string; - AdxStream: TdxStream; -begin - inherited; - AdxStream := TdxStream.Create(AStream); - try - OperatorKind := TcxFilterOperatorKind(ReadByteFunc(AStream)); - if AdxStream.IsUnicode then - DisplayValue := ReadWideStringFunc(AStream) - else - DisplayValue := dxAnsiStringToString(ReadAnsiStringFunc(AStream)); - AItemLinkID := ReadIntegerFunc(AStream); - if Criteria.LoadedVersion >= 3 then - begin - if AdxStream.IsUnicode then - AItemLinkName := ReadWideStringFunc(AStream) - else - AItemLinkName := dxAnsiStringToString(ReadAnsiStringFunc(AStream)) - end - else - AItemLinkName := ''; - - Value := ReadVariantFunc(AStream); - finally - AdxStream.Free; - end; - SetItemLink(FindItemLink(AItemLinkName, AItemLinkID)); - CheckDisplayValue; -end; - -procedure TcxFilterCriteriaItem.WriteData(AStream: TStream); -begin - inherited WriteData(AStream); - dxWriteStreamType(AStream); - WriteByteProc(AStream, Byte(OperatorKind)); - if Criteria.IsUnicode then - WriteWideStringProc(AStream, DisplayValue) - else - WriteAnsiStringProc(AStream, dxStringToAnsiString(DisplayValue)); - WriteIntegerProc(AStream, Criteria.GetIDByItemLink(ItemLink)); - if Criteria.SavedVersion >= 3 then - begin - if Criteria.IsUnicode then - WriteWideStringProc(AStream, Criteria.GetNameByItemLink(ItemLink)) - else - WriteAnsiStringProc(AStream, dxStringToAnsiString(Criteria.GetNameByItemLink(ItemLink))); - end; - WriteVariantProc(AStream, Value); -end; - -procedure TcxFilterCriteriaItem.SetOperatorKind(Value: TcxFilterOperatorKind); -begin - if FOperatorKind <> Value then - begin - FOperatorKind := Value; - RecreateOperator; - end; -end; - -procedure TcxFilterCriteriaItem.SetDisplayValue(const Value: string); -begin - if FDisplayValue <> Value then - begin - FDisplayValue := Value; - Changed; - end; -end; - -procedure TcxFilterCriteriaItem.SetValue(const Value: Variant); -begin - if VarCompare(FValue, Value) <> 0 then - begin - FValue := Value; - RecreateOperator; - end; -end; - -{ TcxFilterValueList } - -constructor TcxFilterValueList.Create(ACriteria: TcxFilterCriteria); -begin - inherited Create; - FCriteria := ACriteria; - FItems := TList.Create; -end; - -destructor TcxFilterValueList.Destroy; -begin - Clear; - FItems.Free; - inherited Destroy; -end; - -procedure TcxFilterValueList.Add(AKind: TcxFilterValueItemKind; const AValue: Variant; - const ADisplayText: string; ANoSorting: Boolean); -var - AIndex: Integer; - PItem: PcxFilterValueItem; -begin - AIndex := -1; - if AKind = fviMRU then - begin - AIndex := GetMRUSeparatorIndex; - if AIndex = -1 then // first MRU item - begin - AIndex := 0; - // add MRU Separator - New(PItem); - PItem.Kind := fviMRUSeparator; - PItem.Value := Null; - PItem.DisplayText := ''; - FItems.Insert(AIndex, PItem); - end; - end - else - if AKind <> fviValue then - AIndex := GetStartValueIndex - else - if ANoSorting then - AIndex := Count - else - if ((MaxCount = 0) or (Count < MaxCount)) then - if Find(AValue, ADisplayText, AIndex) then - AIndex := -1; - if AIndex <> -1 then - begin - New(PItem); - PItem.Kind := AKind; - PItem.Value := AValue; - PItem.DisplayText := ADisplayText; - FItems.Insert(AIndex, PItem); - end; -end; - -procedure TcxFilterValueList.Clear; -var - I: Integer; -begin - for I := 0 to FItems.Count - 1 do - Dispose(PcxFilterValueItem(FItems[I])); - FItems.Clear; -end; - -procedure TcxFilterValueList.Delete(AIndex: Integer); -begin - Dispose(PcxFilterValueItem(FItems[AIndex])); - FItems.Delete(AIndex); -end; - -function TcxFilterValueList.Find(const AValue: Variant; const ADisplayText: string; - var AIndex: Integer): Boolean; -var - L, H, I, C: Integer; - AMRUSeparatorIndex: Integer; -begin - Result := False; - // MRU - AMRUSeparatorIndex := GetMRUSeparatorIndex; - if AMRUSeparatorIndex <> -1 then - for I := 0 to AMRUSeparatorIndex - 1 do - if CompareItem(I, AValue, ADisplayText) = 0 then - begin - AIndex := I; - Result := True; - Exit; - end; - // Values - L := GetStartValueIndex; - H := Count - 1; - while L <= H do - begin - I := (L + H) shr 1; - C := CompareItem(I, AValue, ADisplayText); - if C < 0 then - L := I + 1 - else - begin - if C = 0 then - begin - Result := True; - L := I; - end; - H := I - 1; - end; - end; - AIndex := L; -end; - -function TcxFilterValueList.FindItemByKind(AKind: TcxFilterValueItemKind): Integer; -begin - Result := FindItemByKind(AKind, Null); -end; - -function TcxFilterValueList.FindItemByKind(AKind: TcxFilterValueItemKind; - const AValue: Variant): Integer; -begin - for Result := 0 to Count - 1 do - if (Items[Result].Kind = AKind) and - (VarIsNull(AValue) or VarEquals(Items[Result].Value, AValue)) then - Exit; - Result := -1; -end; - -function TcxFilterValueList.FindItemByValue(const AValue: Variant): Integer; -begin - if not Find(AValue, AValue, Result) then - Result := -1; -end; - -function TcxFilterValueList.GetIndexByCriteriaItem(ACriteriaItem: TcxFilterCriteriaItem): Integer; -begin - if ACriteriaItem = nil then - Result := FindItemByKind(fviAll) - else - if ACriteriaItem.ValueIsNull(ACriteriaItem.Value) and - (ACriteriaItem.OperatorKind in [foEqual, foNotEqual]) then - if ACriteriaItem.OperatorKind = foEqual then - Result := FindItemByKind(fviBlanks) - else - Result := FindItemByKind(fviNonBlanks) - else - if not ({(ACriteriaItem.Parent = Criteria.Root) and }(ACriteriaItem.OperatorKind = foEqual) and - Find(ACriteriaItem.Value, ACriteriaItem.DisplayValue, Result)) then - Result := FindItemByKind(fviCustom); -end; - -function TcxFilterValueList.CompareItem(AIndex: Integer; const AValue: Variant; - const ADisplayText: string): Integer; -var - V1, V2: Variant; - S1, S2: string; -begin - if SortByDisplayText then - begin - S1 := Items[AIndex].DisplayText; - S2 := ADisplayText; - if fcoCaseInsensitive in Criteria.Options then - begin - S1 := AnsiUpperCase(S1); - S2 := AnsiUpperCase(S2); - end; - Result := AnsiCompareStr(S1, S2); // TODO: !! - if Result <> 0 then Exit; - end; - - V1 := Criteria.PrepareValue(Items[AIndex].Value); - V2 := Criteria.PrepareValue(AValue); - Result := VarCompare(V1, V2); -end; - -function TcxFilterValueList.GetMRUSeparatorIndex: Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - begin - if Items[I].Kind = fviMRUSeparator then - begin - Result := I; - Break; - end; - if Items[I].Kind <> fviMRU then - Break; - end; -end; - -function TcxFilterValueList.GetStartValueIndex: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to FItems.Count - 1 do - if Items[I].Kind <> fviValue then - Inc(Result) - else - Break; -end; - -function TcxFilterValueList.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxFilterValueList.GetItem(Index: Integer): PcxFilterValueItem; -begin - Result := PcxFilterValueItem(FItems[Index]); -end; - -function TcxFilterValueList.GetMaxCount: Integer; -begin - Result := Criteria.MaxValueListCount; -end; - -{ TcxFilterCriteria } - -constructor TcxFilterCriteria.Create; -begin - inherited Create; - FRoot := TcxFilterCriteriaItemList.Create(nil, fboAnd); - FRoot.FCriteria := Self; - FPercentWildcard := '%'; - FSupportedLike := True; - FUnderscoreWildcard := '_'; - FVersion := 2; -{$IFDEF DELPHI12} - FIsUnicode := True; -{$ENDIF} -end; - -destructor TcxFilterCriteria.Destroy; -begin - FRoot.Free; - FRoot := nil; - inherited Destroy; -end; - -procedure TcxFilterCriteria.Assign(Source: TPersistent; AIgnoreItemNames: Boolean = False); -begin - if Source is TcxFilterCriteria then - begin - BeginUpdate; - try - DateTimeFormat := TcxFilterCriteria(Source).DateTimeFormat; - MaxValueListCount := TcxFilterCriteria(Source).MaxValueListCount; - Options := TcxFilterCriteria(Source).Options; - PercentWildcard := TcxFilterCriteria(Source).PercentWildcard; - TranslateBetween := TcxFilterCriteria(Source).TranslateBetween; - TranslateLike := TcxFilterCriteria(Source).TranslateLike; - TranslateIn := TcxFilterCriteria(Source).TranslateIn; - SupportedLike := TcxFilterCriteria(Source).SupportedLike; - UnderscoreWildcard := TcxFilterCriteria(Source).UnderscoreWildcard; - AssignItems(TcxFilterCriteria(Source), AIgnoreItemNames); - AssignEvents(Source); // TODO: option? - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxFilterCriteria.AssignEvents(Source: TPersistent); -begin - if Source is TcxFilterCriteria then - OnChanged := TcxFilterCriteria(Source).OnChanged; -end; - -procedure TcxFilterCriteria.AssignItems(ASource: TcxFilterCriteria; - AIgnoreItemNames: Boolean = False); -var - AStream: TMemoryStream; - ASourceVersion: Byte; -begin - if EqualItems(ASource, AIgnoreItemNames) then Exit; - BeginUpdate; - try - Clear; - AStream := TMemoryStream.Create; - try - ASourceVersion := ASource.Version; - if AIgnoreItemNames then - ASource.Version := Min(ASource.Version, 2); - ASource.WriteData(AStream, Version); - ASource.Version := ASourceVersion; - AStream.Position := 0; - ReadData(AStream); - finally - AStream.Free; - end; - finally - EndUpdate; - end; -end; - -function TcxFilterCriteria.AddItem(AParent: TcxFilterCriteriaItemList; AItemLink: TObject; - AOperatorKind: TcxFilterOperatorKind; const AValue: Variant; - const ADisplayValue: string): TcxFilterCriteriaItem; -begin - if AParent = nil then - AParent := Root; - Result := AParent.AddItem(AItemLink, AOperatorKind, AValue, ADisplayValue); -end; - -procedure TcxFilterCriteria.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TcxFilterCriteria.CancelUpdate; -begin - Dec(FLockCount); - // obsolete - use EndUpdate -end; - -procedure TcxFilterCriteria.Clear; -begin - BeginUpdate; - try - Root.Clear; - Root.BoolOperatorKind := fboAnd; - finally - EndUpdate; - end; -end; - -procedure TcxFilterCriteria.Changed; -begin - FChanged := True; - CheckChanges; -end; - -procedure TcxFilterCriteria.EndUpdate; -begin - Dec(FLockCount); - CheckChanges; -end; - -function TcxFilterCriteria.EqualItems(AFilterCriteria: TcxFilterCriteria; - AIgnoreItemNames: Boolean = False): Boolean; -var - AMaxVersion: Byte; - AStream1, AStream2: TMemoryStream; -begin - if AIgnoreItemNames then - AMaxVersion := 2 - else - AMaxVersion := 3; - AStream1 := TMemoryStream.Create; - AStream2 := TMemoryStream.Create; - try - WriteData(AStream1, Min(AFilterCriteria.Version, AMaxVersion)); - AFilterCriteria.WriteData(AStream2, Min(Version, AMaxVersion)); - Result := StreamsEqual(AStream1, AStream2); - finally - AStream2.Free; - AStream1.Free; - end; -end; - -function TcxFilterCriteria.FindItemByItemLink(AItemLink: TObject): TcxFilterCriteriaItem; - - procedure FindInBranch(ABranch: TcxFilterCriteriaItemList); - var - I: Integer; - begin - for I := 0 to ABranch.Count - 1 do - begin - if Result <> nil then - Break; - if TcxCustomFilterCriteriaItem(ABranch.Items[I]).IsItemList then - FindInBranch(TcxFilterCriteriaItemList(ABranch.Items[I])) - else - if TcxFilterCriteriaItem(ABranch.Items[I]).FItemLink = AItemLink then // TODO: !!!ItemLink - begin - Result := TcxFilterCriteriaItem(ABranch.Items[I]); - Break; - end; - end; - end; - -begin - Result := nil; - FindInBranch(Root); -end; - -function TcxFilterCriteria.IsEmpty: Boolean; -begin - Result := Root.IsEmpty; -end; - -procedure TcxFilterCriteria.LoadFromStream(AStream: TStream); -var - AWrapper: TFilterWrapper; -begin - BeginUpdate; - try - AWrapper := TFilterWrapper.Create(nil); - try - AWrapper.Filter := Self; - AStream.ReadComponent(AWrapper); - finally - AWrapper.Free; - end; - finally - EndUpdate; - end; -end; - -procedure TcxFilterCriteria.Refresh; - - procedure RecreateOperators(ABranch: TcxFilterCriteriaItemList); - var - I: Integer; - begin - for I := 0 to ABranch.Count - 1 do - if ABranch[I].IsItemList then - RecreateOperators(TcxFilterCriteriaItemList(ABranch[I])) - else - TcxFilterCriteriaItem(ABranch[I]).RecreateOperator; - end; - -begin - BeginUpdate; - try - RecreateOperators(Root); - finally - EndUpdate; - end; -end; - -procedure TcxFilterCriteria.RemoveItemByItemLink(AItemLink: TObject); - - procedure CheckEmptyParent(AParent: TcxFilterCriteriaItemList); - var - ANewParent: TcxFilterCriteriaItemList; - begin - if AParent = FRoot then Exit; - if AParent.IsEmpty then - begin - ANewParent := AParent.Parent; - AParent.Free; - CheckEmptyParent(ANewParent); - end; - end; - - procedure CheckEmptyList(AParent: TcxFilterCriteriaItemList); - var - ANewParent: TcxFilterCriteriaItemList; - AItem: TcxCustomFilterCriteriaItem; - begin - if AParent = FRoot then Exit; - if AParent.IsEmpty then - begin - ANewParent := AParent.Parent; - AParent.Free; - CheckEmptyParent(ANewParent); - end - else - if AParent.Count = 1 then - begin - ANewParent := AParent.Parent; - AItem := AParent.Items[0]; - ANewParent.FItems.Remove(AParent); - ANewParent.FItems.Add(AItem); - AItem.FParent := ANewParent; - AParent.FItems.Clear; - AParent.Free; - end; - end; - -var - AItem: TcxFilterCriteriaItem; - AParent: TcxFilterCriteriaItemList; - AChanged: Boolean; -begin - BeginUpdate; - AChanged := False; - try - AItem := FindItemByItemLink(AItemLink); - while AItem <> nil do - begin - AChanged := True; - AParent := AItem.Parent; - AItem.Free; - CheckEmptyList(AParent); - AItem := FindItemByItemLink(AItemLink); - end; - finally - if AChanged then - EndUpdate - else - CancelUpdate; - end; -end; - -procedure TcxFilterCriteria.RestoreDefaults; -begin - BeginUpdate; - try - Options := []; - PercentWildcard := '%'; - SupportedLike := True; - TranslateBetween := False; - TranslateLike := False; - TranslateIn := False; - UnderscoreWildcard := '_'; - finally - EndUpdate; - end; -end; - -procedure TcxFilterCriteria.SaveToStream(AStream: TStream); -var - AWrapper: TFilterWrapper; -begin - AWrapper := TFilterWrapper.Create(nil); - FSavingToStream := True; - try - AWrapper.Filter := Self; - AStream.WriteComponent(AWrapper); - finally - FSavingToStream := False; - AWrapper.Free; - end; -end; - -function GetFilterVersion(AVersionID: Integer): Byte; -begin - case AVersionID of - -1: Result := 2; - -2: Result := 3; - else - Result := 1; - end; -end; - -function GetFilterVersionID(AVersion: Byte): Integer; -begin - case AVersion of - 2: Result := -1; - 3: Result := -2; - else - Result := 0; // undefined - end; -end; - -procedure TcxFilterCriteria.ReadData(AStream: TStream); -var - AItemCount, I: Integer; -begin - BeginUpdate; - try - Clear; - AItemCount := ReadIntegerFunc(AStream); - FLoadedVersion := GetFilterVersion(AItemCount); - if LoadedVersion > 1 then // new format - Root.ReadData(AStream) - else - for I := 0 to AItemCount - 1 do - Root.ReadItem(AStream); - finally - EndUpdate; - end; -end; - -procedure TcxFilterCriteria.WriteData(AStream: TStream); -begin - WriteData(AStream, 0); -end; - -procedure TcxFilterCriteria.WriteData(AStream: TStream; AVersion: Byte); -begin - if AVersion = 0 then - FSavedVersion := Version - else - FSavedVersion := Min(Version, AVersion); - WriteIntegerProc(AStream, GetFilterVersionID(SavedVersion)); // new format - Root.WriteData(AStream); -end; - -function TcxFilterCriteria.ValueIsNull(const AValue: Variant): Boolean; -begin - if fcoSoftNull in Options then - Result := VarIsSoftNull(AValue) - else - Result := VarIsNull(AValue); -end; - -procedure TcxFilterCriteria.CheckChanges; -begin - if FChanged and (LockCount = 0) then - begin - FChanged := False; - Prepare; - Update; - end; -end; - -function TcxFilterCriteria.ConvertBoolToStr(const AValue: Variant): string; -const - BoolStrs: array[Boolean] of string = ('False', 'True'); -begin -{$IFNDEF DELPHI6} - Result := BoolStrs[AValue = True]; -{$ELSE} - Result := VarToStr(AValue); -{$ENDIF} -end; - -function TcxFilterCriteria.ConvertDateToStr(const AValue: Variant): string; -begin - if DateTimeFormat <> '' then - Result := FormatDateTime(DateTimeFormat, AValue) - else - Result := VarToStr(AValue) -end; - -function TcxFilterCriteria.DoFilterData(AData: TObject): Boolean; - - function Compare(AItem: TcxFilterCriteriaItem): Boolean; - var - V1, V2: Variant; - begin - try - V1 := PrepareValue(AItem.GetDataValue(AData)); - V2 := PrepareValue(AItem.Value); - // for Null special compare - if (fcoIgnoreNull in Options) and not AItem.Operator.IsNullOperator and AItem.ValueIsNull(V1) then - Result := False - else - Result := AItem.Operator.CompareValues(V1, V2); - except - on EVariantError do - if fcoSoftCompare in Options then - Result := False - else - raise; - end; - end; - - procedure CorrectResult(AItemResult: Boolean; ABoolOperatorKind: TcxFilterBoolOperatorKind; - var ACompared, AResult: Boolean); - begin - if not ACompared then - begin - AResult := AItemResult; - case ABoolOperatorKind of - fboAnd, fboOr: - AResult := AItemResult; - fboNotAnd, fboNotOr: - AResult := not AResult; - end; - ACompared := True; - end - else - begin - case ABoolOperatorKind of - fboAnd: - AResult := AResult and AItemResult; - fboOr: - AResult := AResult or AItemResult; - fboNotAnd: - AResult := AResult or not AItemResult; - fboNotOr: - AResult := AResult and not AItemResult; - end; - end; - end; - - function DoFilterBranch(ABranch: TcxFilterCriteriaItemList): Boolean; - var - I: Integer; - AItem: TcxFilterCriteriaItem; - AResult, ACompared: Boolean; - begin - Result := True; - ACompared := False; - for I := 0 to ABranch.Count - 1 do - if ABranch[I].IsItemList then - begin - AResult := DoFilterBranch(TcxFilterCriteriaItemList(ABranch[I])); - CorrectResult(AResult, ABranch.BoolOperatorKind, ACompared, Result); - end - else - begin - AItem := TcxFilterCriteriaItem(ABranch[I]); - AResult := Compare(AItem); - CorrectResult(AResult, ABranch.BoolOperatorKind, ACompared, Result); - end; - end; - -begin - Result := DoFilterBranch(Root); -end; - -procedure TcxFilterCriteria.FormatFilterTextValue(AItem: TcxFilterCriteriaItem; - const AValue: Variant; var ADisplayValue: string); -begin -end; - -function TcxFilterCriteria.GetFilterCaption: string; -begin - Result := GetFilterExpression(True); -end; - -function TcxFilterCriteria.GetFilterExpression(AIsCaption: Boolean): string; - - function GetOperatorText(AIsCaption: Boolean; - ABoolOperatorKind: TcxFilterBoolOperatorKind): string; - begin - case ABoolOperatorKind of - fboAnd, fboNotAnd: - begin - if AIsCaption then - Result := cxSFilterString(@cxSFilterAndCaption) - else - Result := 'AND'; - end; - fboOr, fboNotOr: - begin - if AIsCaption then - Result := cxSFilterString(@cxSFilterOrCaption) - else - Result := 'OR'; - end; - end; - end; - - function GetNotText(AIsCaption: Boolean): string; - begin - if AIsCaption then - Result := cxSFilterString(@cxSFilterNotCaption) - else - Result := 'NOT'; - end; - - function FilterSubString(ABranch: TcxFilterCriteriaItemList): string; - var - I: Integer; - begin - Result := ''; - for I := 0 to ABranch.Count - 1 do - begin - if ABranch[I].IsItemList then - Result := Result + '(' + FilterSubString(TcxFilterCriteriaItemList(ABranch[I])) + ')' - else - Result := Result + '(' + GetItemExpression(TcxFilterCriteriaItem(ABranch[I]), AIsCaption) + ')'; - if I < ABranch.Count - 1 then - Result := Result + ' ' + GetOperatorText(AIsCaption, ABranch.BoolOperatorKind) + ' '; - end; - if ABranch.BoolOperatorKind in [fboNotAnd, fboNotOr] then - Result := GetNotText(AIsCaption) + ' (' + Result + ')'; - end; - -begin - Result := FilterSubString(Root); -end; - -function TcxFilterCriteria.GetFilterText: string; -begin - Result := GetFilterExpression(False); -end; - -function TcxFilterCriteria.GetItemClass: TcxFilterCriteriaItemClass; -begin - Result := TcxFilterCriteriaItem; -end; - -function TcxFilterCriteria.GetItemListClass: TcxFilterCriteriaItemListClass; -begin - Result := TcxFilterCriteriaItemList; -end; - -function TcxFilterCriteria.GetItemExpression(AItem: TcxFilterCriteriaItem; - AIsCaption: Boolean): string; -var - S: string; -begin - if not AIsCaption and AItem.Operator.IsExpression then - Result := AItem.Operator.GetExpressionFilterText(AItem.Value) - else - begin - S := GetItemExpressionValue(AItem, AIsCaption); - Result := GetItemExpressionFieldName(AItem, AIsCaption) + ' ' + - GetItemExpressionOperator(AItem, AIsCaption); - if S <> '' then - Result := Result + ' ' + S; - end; -end; - -function TcxFilterCriteria.GetItemExpressionFieldName(AItem: TcxFilterCriteriaItem; - AIsCaption: Boolean): string; -begin - if AIsCaption then - Result := AItem.GetFieldCaption - else - Result := AItem.GetFieldName; -end; - -function TcxFilterCriteria.GetItemExpressionOperator(AItem: TcxFilterCriteriaItem; - AIsCaption: Boolean): string; -begin - if AIsCaption and (AItem.Operator.IsDescription or (fcoShowOperatorDescription in Options)) then - Result := AItem.Operator.DisplayText - else - Result := AItem.Operator.FilterText; -end; - -function TcxFilterCriteria.GetItemExpressionValue(AItem: TcxFilterCriteriaItem; - AIsCaption: Boolean): string; -begin - Result := AItem.GetExpressionValue(AIsCaption); -end; - -function TcxFilterCriteria.IsStore: Boolean; -begin - Result := FSavingToStream or (Root.BoolOperatorKind <> fboAnd) or not Root.IsEmpty; -end; - -procedure TcxFilterCriteria.Prepare; - - procedure PrepareOperators(ABranch: TcxFilterCriteriaItemList); - var - I: Integer; - begin - for I := 0 to ABranch.Count - 1 do - if ABranch[I].IsItemList then - PrepareOperators(TcxFilterCriteriaItemList(ABranch[I])) - else - TcxFilterCriteriaItem(ABranch[I]).Operator.Prepare; - end; - -begin - PrepareOperators(Root); -end; - -function TcxFilterCriteria.PrepareValue(AValue: Variant): Variant; -var - I: Integer; -begin - if VarType(AValue) = varCurrency then - Result := VarAsType(AValue, varDouble) // bug in Delphi - else - if VarIsStr(AValue) and (fcoCaseInsensitive in Options) then - Result := AnsiUpperCase(AValue) - else - begin - if VarIsArray(AValue) then - begin - for I := VarArrayLowBound(AValue, 1) to VarArrayHighBound(AValue, 1) do - AValue[I] := PrepareValue(AValue[I]); - Result := AValue; - end - else - Result := AValue; - end; -end; - -function TcxFilterCriteria.GetValueListClass: TcxFilterValueListClass; -begin - Result := TcxFilterValueList; -end; - -procedure TcxFilterCriteria.SetFilterText(const Value: string); -begin -end; - -procedure TcxFilterCriteria.Update; -begin - if Assigned(FOnChanged) then - FOnChanged(Self); -end; - -function TcxFilterCriteria.GetOptions: TcxFilterCriteriaOptions; -begin - Result := FOptions; -end; - -function TcxFilterCriteria.GetStoreItemLinkNames: Boolean; -begin - Result := Version >= 3; -end; - -procedure TcxFilterCriteria.SetDateTimeFormat(const Value: string); -begin - if FDateTimeFormat <> Value then - begin - FDateTimeFormat := Value; - Changed; - end; -end; - -procedure TcxFilterCriteria.SetOptions(Value: TcxFilterCriteriaOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - Changed; - end; -end; - -procedure TcxFilterCriteria.SetPercentWildcard(Value: Char); -begin - if FPercentWildcard <> Value then - begin - FPercentWildcard := Value; - Changed; - end; -end; - -procedure TcxFilterCriteria.SetStoreItemLinkNames(Value: Boolean); -begin - if StoreItemLinkNames <> Value then - if Value then - Version := 3 - else - Version := 2; -end; - -procedure TcxFilterCriteria.SetUnderscoreWildcard(Value: Char); -begin - if FUnderscoreWildcard <> Value then - begin - FUnderscoreWildcard := Value; - Changed; - end; -end; - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxFilterConsts.pas b/internal/x.46/ExpressDataController/Sources/cxFilterConsts.pas deleted file mode 100644 index ca4a3ae3..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxFilterConsts.pas +++ /dev/null @@ -1,192 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxFilterConsts; - -{$I cxVer.inc} - -interface - -resourcestring - // base operators - cxSFilterOperatorEqual = 'equals'; - cxSFilterOperatorNotEqual = 'does not equal'; - cxSFilterOperatorLess = 'is less than'; - cxSFilterOperatorLessEqual = 'is less than or equal to'; - cxSFilterOperatorGreater = 'is greater than'; - cxSFilterOperatorGreaterEqual = 'is greater than or equal to'; - cxSFilterOperatorLike = 'like'; - cxSFilterOperatorNotLike = 'not like'; - cxSFilterOperatorBetween = 'between'; - cxSFilterOperatorNotBetween = 'not between'; - cxSFilterOperatorInList = 'in'; - cxSFilterOperatorNotInList = 'not in'; - - cxSFilterOperatorYesterday = 'is yesterday'; - cxSFilterOperatorToday = 'is today'; - cxSFilterOperatorTomorrow = 'is tomorrow'; - - cxSFilterOperatorLast7Days = 'is last 7 days'; - cxSFilterOperatorLastWeek = 'is last week'; - cxSFilterOperatorLast14Days = 'is last 14 days'; - cxSFilterOperatorLastTwoWeeks = 'is last two weeks'; - cxSFilterOperatorLast30Days = 'is last 30 days'; - cxSFilterOperatorLastMonth = 'is last month'; - cxSFilterOperatorLastYear = 'is last year'; - cxSFilterOperatorPast = 'is past'; - - cxSFilterOperatorThisWeek = 'is this week'; - cxSFilterOperatorThisMonth = 'is this month'; - cxSFilterOperatorThisYear = 'is this year'; - - cxSFilterOperatorNext7Days = 'is next 7 days'; - cxSFilterOperatorNextWeek = 'is next week'; - cxSFilterOperatorNext14Days = 'is next 14 days'; - cxSFilterOperatorNextTwoWeeks = 'is next two weeks'; - cxSFilterOperatorNext30Days = 'is next 30 days'; - cxSFilterOperatorNextMonth = 'is next month'; - cxSFilterOperatorNextYear = 'is next year'; - cxSFilterOperatorFuture = 'is future'; - - cxSFilterAndCaption = 'and'; - cxSFilterOrCaption = 'or'; - cxSFilterNotCaption = 'not'; - cxSFilterBlankCaption = 'blank'; - - // derived - cxSFilterOperatorIsNull = 'is blank'; - cxSFilterOperatorIsNotNull = 'is not blank'; - cxSFilterOperatorBeginsWith = 'begins with'; - cxSFilterOperatorDoesNotBeginWith = 'does not begin with'; - cxSFilterOperatorEndsWith = 'ends with'; - cxSFilterOperatorDoesNotEndWith = 'does not end with'; - cxSFilterOperatorContains = 'contains'; - cxSFilterOperatorDoesNotContain = 'does not contain'; - // filter listbox's values - cxSFilterBoxAllCaption = '(All)'; - cxSFilterBoxCustomCaption = '(Custom...)'; - cxSFilterBoxBlanksCaption = '(Blanks)'; - cxSFilterBoxNonBlanksCaption = '(NonBlanks)'; - -function cxSFilterString(AResString: Pointer): string; - -type - TcxFilterGetResourceStringFunc = function( - AResString: Pointer): string; - -var - cxFilterGetResourceStringFunc: TcxFilterGetResourceStringFunc; - -implementation - -uses - dxCore; - -function cxSFilterString( - AResString: Pointer): string; -begin - if Assigned(cxFilterGetResourceStringFunc) then - Result := cxFilterGetResourceStringFunc(AResString) - else - Result := LoadResString(AResString); -end; - -procedure AddExpressDataFilterResourceStringNames(AProduct: TdxProductResourceStrings); - - procedure InternalAdd(const AResourceStringName: string; AAdress: Pointer); - begin - AProduct.Add(AResourceStringName, AAdress); - end; - -begin - InternalAdd('cxSFilterOperatorEqual', @cxSFilterOperatorEqual); - InternalAdd('cxSFilterOperatorNotEqual', @cxSFilterOperatorNotEqual); - InternalAdd('cxSFilterOperatorLess', @cxSFilterOperatorLess); - InternalAdd('cxSFilterOperatorLessEqual', @cxSFilterOperatorLessEqual); - InternalAdd('cxSFilterOperatorGreater', @cxSFilterOperatorGreater); - InternalAdd('cxSFilterOperatorGreaterEqual', @cxSFilterOperatorGreaterEqual); - InternalAdd('cxSFilterOperatorLike', @cxSFilterOperatorLike); - InternalAdd('cxSFilterOperatorNotLike', @cxSFilterOperatorNotLike); - InternalAdd('cxSFilterOperatorBetween', @cxSFilterOperatorBetween); - InternalAdd('cxSFilterOperatorNotBetween', @cxSFilterOperatorNotBetween); - InternalAdd('cxSFilterOperatorInList', @cxSFilterOperatorInList); - InternalAdd('cxSFilterOperatorNotInList', @cxSFilterOperatorNotInList); - InternalAdd('cxSFilterOperatorYesterday', @cxSFilterOperatorYesterday); - InternalAdd('cxSFilterOperatorToday', @cxSFilterOperatorToday); - InternalAdd('cxSFilterOperatorTomorrow', @cxSFilterOperatorTomorrow); - InternalAdd('cxSFilterOperatorLast7Days', @cxSFilterOperatorLast7Days); - InternalAdd('cxSFilterOperatorLastWeek', @cxSFilterOperatorLastWeek); - InternalAdd('cxSFilterOperatorLast14Days', @cxSFilterOperatorLast14Days); - InternalAdd('cxSFilterOperatorLastTwoWeeks', @cxSFilterOperatorLastTwoWeeks); - InternalAdd('cxSFilterOperatorLast30Days', @cxSFilterOperatorLast30Days); - InternalAdd('cxSFilterOperatorLastMonth', @cxSFilterOperatorLastMonth); - InternalAdd('cxSFilterOperatorLastYear', @cxSFilterOperatorLastYear); - InternalAdd('cxSFilterOperatorPast', @cxSFilterOperatorPast); - InternalAdd('cxSFilterOperatorThisWeek', @cxSFilterOperatorThisWeek); - InternalAdd('cxSFilterOperatorThisMonth', @cxSFilterOperatorThisMonth); - InternalAdd('cxSFilterOperatorThisYear', @cxSFilterOperatorThisYear); - InternalAdd('cxSFilterOperatorNext7Days', @cxSFilterOperatorNext7Days); - InternalAdd('cxSFilterOperatorNextWeek', @cxSFilterOperatorNextWeek); - InternalAdd('cxSFilterOperatorNext14Days', @cxSFilterOperatorNext14Days); - InternalAdd('cxSFilterOperatorNextTwoWeeks', @cxSFilterOperatorNextTwoWeeks); - InternalAdd('cxSFilterOperatorNext30Days', @cxSFilterOperatorNext30Days); - InternalAdd('cxSFilterOperatorNextMonth', @cxSFilterOperatorNextMonth); - InternalAdd('cxSFilterOperatorNextYear', @cxSFilterOperatorNextYear); - InternalAdd('cxSFilterOperatorFuture', @cxSFilterOperatorFuture); - InternalAdd('cxSFilterAndCaption', @cxSFilterAndCaption); - InternalAdd('cxSFilterOrCaption', @cxSFilterOrCaption); - InternalAdd('cxSFilterNotCaption', @cxSFilterNotCaption); - InternalAdd('cxSFilterBlankCaption', @cxSFilterBlankCaption); - InternalAdd('cxSFilterOperatorIsNull', @cxSFilterOperatorIsNull); - InternalAdd('cxSFilterOperatorIsNotNull', @cxSFilterOperatorIsNotNull); - InternalAdd('cxSFilterOperatorBeginsWith', @cxSFilterOperatorBeginsWith); - InternalAdd('cxSFilterOperatorDoesNotBeginWith', @cxSFilterOperatorDoesNotBeginWith); - InternalAdd('cxSFilterOperatorEndsWith', @cxSFilterOperatorEndsWith); - InternalAdd('cxSFilterOperatorDoesNotEndWith', @cxSFilterOperatorDoesNotEndWith); - InternalAdd('cxSFilterOperatorContains', @cxSFilterOperatorContains); - InternalAdd('cxSFilterOperatorDoesNotContain', @cxSFilterOperatorDoesNotContain); - InternalAdd('cxSFilterBoxAllCaption', @cxSFilterBoxAllCaption); - InternalAdd('cxSFilterBoxCustomCaption', @cxSFilterBoxCustomCaption); - InternalAdd('cxSFilterBoxBlanksCaption', @cxSFilterBoxBlanksCaption); - InternalAdd('cxSFilterBoxNonBlanksCaption', @cxSFilterBoxNonBlanksCaption); -end; - -initialization - dxResourceStringsRepository.RegisterProduct('ExpressDataFilter', @AddExpressDataFilterResourceStringNames); - -finalization - dxResourceStringsRepository.UnRegisterProduct('ExpressDataFilter'); - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxIBXAdapters.pas b/internal/x.46/ExpressDataController/Sources/cxIBXAdapters.pas deleted file mode 100644 index 9e667d3a..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxIBXAdapters.pas +++ /dev/null @@ -1,163 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxIBXAdapters; - -{$I cxVer.inc} - -interface - -uses - {$IFDEF DELPHI6}Variants, {$ENDIF}DB, IBSQL, cxDBData, cxFilter, cxDBFilter; - -type - { TcxIBXProviderDetailFilterAdapter } - - TcxIBXProviderDetailFilterAdapter = class(TcxDBProviderDetailFilterAdapter) - protected - function GetParamValues(ASQLParams: TIBXSQLDA): Variant; - procedure SetParamValues(ASQLParams: TIBXSQLDA; const AValues: Variant); - public - function IsCurrentQuery(ADataSet: TDataSet; const AParamNames: string; const AParamValues: Variant): Boolean; override; - procedure ReopenSQL(ADataSet: TDataSet; const AParamNames: string; const AParamValues: Variant; var AReopened: Boolean); override; - end; - - { TcxIBXFilterOperatorAdapter } - - TcxIBXFilterOperatorAdapter = class(TcxDBFilterOperatorAdapter) - public - procedure PrepareOperatorClass(ASender: TObject; ADataSet: TDataSet; - var AOperatorClass: TcxFilterOperatorClass); override; - end; - -implementation - -uses - TypInfo, IBCustomDataSet, cxVariants; - -{ TcxIBXProviderDetailFilterAdapter } - -function TcxIBXProviderDetailFilterAdapter.IsCurrentQuery(ADataSet: TDataSet; - const AParamNames: string; const AParamValues: Variant): Boolean; -var - ASQLParams: TIBXSQLDA; -begin - Result := False; - if ADataSet is TIBDataSet then - begin - ASQLParams := TIBDataSet(ADataSet).Params; - if VarEquals(GetParamValues(ASQLParams), AParamValues) then - Result := True; - end; -end; - -procedure TcxIBXProviderDetailFilterAdapter.ReopenSQL(ADataSet: TDataSet; - const AParamNames: string; const AParamValues: Variant; var AReopened: Boolean); -var - ASQLParams: TIBXSQLDA; -begin - if ADataSet is TIBDataSet then - begin - ASQLParams := TIBDataSet(ADataSet).Params; - if VarEquals(GetParamValues(ASQLParams), AParamValues) then - ADataSet.First - else - begin - ADataSet.DisableControls; - try - ADataSet.Active := False; - SetParamValues(ASQLParams, AParamValues); - ADataSet.Active := True; - finally - ADataSet.EnableControls; - end; - AReopened := True; // set Flag if Query reopened - end; - end; -end; - -function TcxIBXProviderDetailFilterAdapter.GetParamValues(ASQLParams: TIBXSQLDA): Variant; -var - I: Integer; -begin - if ASQLParams.Count = 1 then - Result := Variant(ASQLParams[0].Value) - else - begin - Result := VarArrayCreate([0, ASQLParams.Count - 1], varVariant); - for I := 0 to ASQLParams.Count - 1 do - Result[I] := Variant(ASQLParams[I].Value); - end; -end; - -procedure TcxIBXProviderDetailFilterAdapter.SetParamValues(ASQLParams: TIBXSQLDA; - const AValues: Variant); -var - I: Integer; -begin - if ASQLParams.Count = 1 then - ASQLParams[0].Value := AValues - else - for I := 0 to ASQLParams.Count - 1 do - ASQLParams[I].Value := AValues[I]; -end; - -{ TcxIBXFilterOperatorAdapter } - -procedure TcxIBXFilterOperatorAdapter.PrepareOperatorClass(ASender: TObject; - ADataSet: TDataSet; var AOperatorClass: TcxFilterOperatorClass); -begin - if AOperatorClass.InheritsFrom(TcxFilterNullOperator) or - AOperatorClass.InheritsFrom(TcxFilterNotNullOperator) then - begin - if ADataSet is TIBDataSet then - begin - if AOperatorClass.InheritsFrom(TcxFilterNotNullOperator) then - AOperatorClass := TcxFilterSQLNotNullOperator - else - AOperatorClass := TcxFilterSQLNullOperator; - end; - end; -end; - -initialization - cxDetailFilterControllers.RegisterAdapter(TIBDataSet, TcxIBXProviderDetailFilterAdapter); - cxFilterOperatorAdapters.RegisterAdapter(TIBDataSet, TcxIBXFilterOperatorAdapter); - -finalization - cxDetailFilterControllers.UnregisterAdapter(TIBDataSet, TcxIBXProviderDetailFilterAdapter); - cxFilterOperatorAdapters.UnregisterAdapter(TIBDataSet, TcxIBXFilterOperatorAdapter); - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxLike.pas b/internal/x.46/ExpressDataController/Sources/cxLike.pas deleted file mode 100644 index 6c4e7908..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxLike.pas +++ /dev/null @@ -1,157 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxLike; - -{$I cxVer.inc} - -interface - -uses - SysUtils; - -type - TcxFilterLikeOperator = (floLike, floBeginsWith, floEndsWith, floContains); - -function LikeOperatorByPattern(var APatternStr: string; APercent: Char): TcxFilterLikeOperator; -function LikeStr(const AStr, APatternStr: string; APercent, AUnderline: Char): Boolean; - -implementation - -procedure PreparePatternStr(var PatternStr: string; APercent: Char); -var - I: Integer; - S: string; -begin - // delete '%%', because '%%' = '%' - S := APercent + APercent; - repeat - I := Pos(S, PatternStr); - if I > 0 then - PatternStr := Copy(PatternStr, 1, I - 1) + APercent + Copy(PatternStr, I + 2, MaxInt); - until I = 0; -end; - -function LikeOperatorByPattern(var APatternStr: string; APercent: Char): TcxFilterLikeOperator; -var - ABeginFlag, AEndFlag: Boolean; -begin - Result := floLike; - PreparePatternStr(APatternStr, APercent); - if Length(APatternStr) > 1 then - begin - ABeginFlag := APatternStr[1] = APercent; - AEndFlag := APatternStr[Length(APatternStr)] = APercent; - if ABeginFlag then - begin - Delete(APatternStr, 1, 1); - if AEndFlag then - begin - Result := floContains; - Delete(APatternStr, Length(APatternStr), 1); - end - else - Result := floEndsWith; - end - else - if AEndFlag then - begin - Result := floBeginsWith; - Delete(APatternStr, Length(APatternStr), 1); - end; - end; -end; - -function Like(p1: PChar; l1: Integer; p2: PChar; l2: Integer; - percent_char, underline_char, escape_char: Char): Boolean; -var - c: Char; - AEscapeFlag: Boolean; -begin - AEscapeFlag := False; - repeat - Dec(l2); - if l2 < 0 then Break; - c := p2^; - p2 := p2 + 1; - if (escape_char <> #0) and not AEscapeFlag and (c = escape_char) then - begin - AEscapeFlag := True; - Continue; - end; - if not AEscapeFlag and (c = percent_char) then - begin - if l2 = 0 then - begin - Result := True; - Exit; - end; - while l1 > 0 do - begin - if Like(p1, l1, p2, l2, percent_char, underline_char, escape_char) then - begin - Result := True; - Exit; - end; - p1 := p1 + 1; - Dec(l1); - end; - Result := False; - Exit; - end; - Dec(l1); - if l1 < 0 then - begin - Result := False; - Exit; - end; - if (AEscapeFlag or (c <> underline_char)) and (c <> p1^) then - begin - Result := False; - Exit; - end; - AEscapeFlag := False; - p1 := p1 + 1; - until False; - Result := l1 = 0; -end; - -function LikeStr(const AStr, APatternStr: string; APercent, AUnderline: Char): Boolean; -begin - Result := Like(PChar(AStr), Length(AStr), PChar(APatternStr), - Length(APatternStr), APercent, AUnderline, #0); -end; - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxVariants.pas b/internal/x.46/ExpressDataController/Sources/cxVariants.pas deleted file mode 100644 index eee241fa..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxVariants.pas +++ /dev/null @@ -1,1211 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressDataController } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSDATACONTROLLER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxVariants; - -{$I cxVer.inc} - -interface - -uses - SysUtils, Classes, dxCore{$IFDEF DELPHI6}, Variants{$ENDIF}; - -type - LargeInt = Int64; - {$IFNDEF DELPHI6} - TVarType = Word; - {$ENDIF} - TVariantArray = array of Variant; - - { Read/Write } - - TcxFiler = class - private - FIsUnicode: Boolean; - FStream: TStream; - public - constructor Create(AStream: TStream); - - property Stream: TStream read FStream; - property IsUnicode: Boolean read FIsUnicode; - end; - - TcxReader = class(TcxFiler) - public - function ReadAnsiString: AnsiString; - function ReadBoolean: Boolean; - function ReadByte: Byte; - function ReadCardinal: Cardinal; - function ReadChar: Char; - function ReadCurrency: Currency; - function ReadDateTime: TDateTime; - function ReadFloat: Extended; - function ReadInteger: Integer; - function ReadLargeInt: LargeInt; - function ReadShortInt: ShortInt; - function ReadSingle: Single; - function ReadSmallInt: SmallInt; - function ReadString_: string; - function ReadVariant: Variant; - function ReadWideString: WideString; - function ReadWord: Word; - end; - - TcxWriter = class(TcxFiler) - public - procedure WriteAnsiString(const S: AnsiString); - procedure WriteBoolean(AValue: Boolean); - procedure WriteByte(AValue: Byte); - procedure WriteCardinal(AValue: Cardinal); - procedure WriteChar(AValue: Char); - procedure WriteCurrency(AValue: Currency); - procedure WriteDateTime(AValue: TDateTime); - procedure WriteFloat(AValue: Extended); - procedure WriteInteger(AValue: Integer); - procedure WriteLargeInt(AValue: LargeInt); - procedure WriteShortInt(AValue: ShortInt); - procedure WriteSingle(AValue: Single); - procedure WriteSmallInt(AValue: SmallInt); - procedure WriteVariant(const AValue: Variant); - procedure WriteWideString(const S: WideString); - procedure WriteWord(AValue: Word); - end; - -function VarCompare(const V1, V2: Variant): Integer; -function VarEquals(const V1, V2: Variant): Boolean; -function VarEqualsExact(const V1, V2: Variant): Boolean; -function VarEqualsSoft(const V1, V2: Variant): Boolean; -function VarIndex(const AList: TVariantArray; const AValue: Variant): Integer; -function VarIsDate(const AValue: Variant): Boolean; -function VarIsNumericEx(const AValue: Variant): Boolean; -function VarIsSoftNull(const AValue: Variant): Boolean; -function VarToStrEx(const V: Variant): string; -function VarTypeIsCurrency(AVarType: TVarType): Boolean; -{$IFNDEF DELPHI6} -function FindVarData(const V: Variant): PVarData; -function VarIsFloat(const AValue: Variant): Boolean; -function VarIsNumeric(const AValue: Variant): Boolean; -function VarIsOrdinal(const AValue: Variant): Boolean; -function VarIsStr(const AValue: Variant): Boolean; -function VarIsType(const AValue: Variant; AVarType: TVarType): Boolean; -function VarSameValue(const V1, V2: Variant): Boolean; -{$ENDIF} -function VarBetweenArrayCreate(const AValue1, AValue2: Variant): Variant; -function VarListArrayCreate(const AValue: Variant): Variant; -procedure VarListArrayAddValue(var Value: Variant; const AValue: Variant); - -function ReadAnsiStringFunc(AStream: TStream): AnsiString; -procedure ReadAnsiStringProc(AStream: TStream; var S: AnsiString); -procedure WriteAnsiStringProc(AStream: TStream; const S: AnsiString); - -function ReadWideStringFunc(AStream: TStream): WideString; -procedure ReadWideStringProc(AStream: TStream; var S: WideString); -procedure WriteWideStringProc(AStream: TStream; const S: WideString); - -function ReadVariantFunc(AStream: TStream): Variant; -procedure ReadVariantProc(AStream: TStream; var Value: Variant); -procedure WriteVariantProc(AStream: TStream; const AValue: Variant); - -function ReadBooleanFunc(AStream: TStream): Boolean; -procedure ReadBooleanProc(AStream: TStream; var Value: Boolean); -procedure WriteBooleanProc(AStream: TStream; AValue: Boolean); - -function ReadCharFunc(AStream: TStream): Char; -procedure ReadCharProc(AStream: TStream; var Value: Char); -procedure WriteCharProc(AStream: TStream; AValue: Char); - -function ReadFloatFunc(AStream: TStream): Extended; -procedure ReadFloatProc(AStream: TStream; var Value: Extended); -procedure WriteFloatProc(AStream: TStream; AValue: Extended); - -function ReadSingleFunc(AStream: TStream): Single; -procedure ReadSingleProc(AStream: TStream; var Value: Single); -procedure WriteSingleProc(AStream: TStream; AValue: Single); - -function ReadCurrencyFunc(AStream: TStream): Currency; -procedure ReadCurrencyProc(AStream: TStream; var Value: Currency); -procedure WriteCurrencyProc(AStream: TStream; AValue: Currency); - -function ReadDateTimeFunc(AStream: TStream): TDateTime; -procedure ReadDateTimeProc(AStream: TStream; var Value: TDateTime); -procedure WriteDateTimeProc(AStream: TStream; AValue: TDateTime); - -function ReadIntegerFunc(AStream: TStream): Integer; -procedure ReadIntegerProc(AStream: TStream; var Value: Integer); -procedure WriteIntegerProc(AStream: TStream; AValue: Integer); - -function ReadLargeIntFunc(AStream: TStream): LargeInt; -procedure ReadLargeIntProc(AStream: TStream; var Value: LargeInt); -procedure WriteLargeIntProc(AStream: TStream; AValue: LargeInt); - -function ReadByteFunc(AStream: TStream): Byte; -procedure ReadByteProc(AStream: TStream; var Value: Byte); -procedure WriteByteProc(AStream: TStream; AValue: Byte); - -function ReadSmallIntFunc(AStream: TStream): SmallInt; -procedure ReadSmallIntProc(AStream: TStream; var Value: SmallInt); -procedure WriteSmallIntProc(AStream: TStream; AValue: SmallInt); - -function ReadCardinalFunc(AStream: TStream): Cardinal; -procedure ReadCardinalProc(AStream: TStream; var Value: Cardinal); -procedure WriteCardinalProc(AStream: TStream; AValue: Cardinal); - -function ReadShortIntFunc(AStream: TStream): ShortInt; -procedure ReadShortIntProc(AStream: TStream; var Value: ShortInt); -procedure WriteShortIntProc(AStream: TStream; AValue: ShortInt); - -function ReadWordFunc(AStream: TStream): Word; -procedure ReadWordProc(AStream: TStream; var Value: Word); -procedure WriteWordProc(AStream: TStream; AValue: Word); - -implementation - -uses -{$IFNDEF NONDB} - {$IFDEF DELPHI6} - FMTBcd, SqlTimSt, - {$ENDIF} -{$ENDIF} - Windows, cxDataConsts; - -function VarArrayCompare(const V1, V2: Variant): Integer; -var - I: Integer; -begin - if VarIsArray(V1) and VarIsArray(V2) then - begin - Result := VarArrayHighBound(V1, 1) - VarArrayHighBound(V2, 1); - if Result = 0 then - begin - for I := 0 to VarArrayHighBound(V1, 1) do - begin - Result := VarCompare(V1[I], V2[I]); - if Result <> 0 then - Break; - end; - end; - end - else - if VarIsArray(V1) then - Result := 1 - else - if VarIsArray(V2) then - Result := -1 - else - Result := VarCompare(V1, V2); -end; - -function VarCompare(const V1, V2: Variant): Integer; - - function CompareValues(const V1, V2: Variant): Integer; - begin - try - if VarIsEmpty(V1) then - if VarIsEmpty(V2) then - Result := 0 - else - Result := -1 - else - if VarIsEmpty(V2) then - Result := 1 - else - if V1 = V2 then - Result := 0 - else - {$IFDEF DELPHI6} - if VarIsNull(V1) then - Result := -1 - else - if VarIsNull(V2) then - Result := 1 - else - {$ENDIF} - if V1 < V2 then - Result := -1 - else - Result := 1; - except - on EVariantError do - Result := -1; - end; - end; - -begin -{$IFDEF DELPHI6} - {$IFNDEF DELPHI7} - if (VarType(V1) = varString) and (VarType(V2) = varString) then - Result := CompareStr(V1, V2) - else - if (VarType(V1) = varDate) and (VarType(V2) = varDate) then - Result := CompareValues(Double(V1), Double(V2)) - else - {$ENDIF} -{$ENDIF} - if VarIsArray(V1) or VarIsArray(V2) then - Result := VarArrayCompare(V1, V2) - else - Result := CompareValues(V1, V2); -end; - -function VarEquals(const V1, V2: Variant): Boolean; -begin - Result := VarCompare(V1, V2) = 0; -end; - -function VarEqualsExact(const V1, V2: Variant): Boolean; -var - AVarType1, AVarType2: Integer; - AValue1, AValue2: Variant; -begin - AVarType1 := VarType(V1); - AVarType2 := VarType(V2); - if (AVarType1 = varNull) or (AVarType2 = varNull) or - ((AVarType1 <> varBoolean) and (AVarType2 <> varBoolean)) then - Result := VarEquals(V1, V2) - else - try - VarCast(AValue1, V1, varString); - VarCast(AValue2, V2, varString); - Result := AValue1 = AValue2; - except - on EVariantError do - Result := False; - end; -end; - -function VarEqualsSoft(const V1, V2: Variant): Boolean; -begin - Result := VarEquals(V1, V2) or (VarIsSoftNull(V1) and VarIsSoftNull(V2)); -end; - -function VarIndex(const AList: TVariantArray; const AValue: Variant): Integer; -begin - for Result := 0 to Length(AList) - 1 do - if VarEquals(AList[Result], AValue) then Exit; - Result := -1; -end; - -{$IFNDEF DELPHI6} -function FindVarData(const V: Variant): PVarData; -begin - Result := @TVarData(V); - while Result.VType = varByRef or varVariant do - Result := PVarData(Result.VPointer); -end; -{$ENDIF} - -function VarIsDate(const AValue: Variant): Boolean; - - function VarTypeIsDate(const AVarType: TVarType): Boolean; - begin - Result := (AVarType = varDate) - {$IFNDEF NONDB}{$IFDEF DELPHI6} or (AVarType = VarSQLTimeStamp){$ENDIF}{$ENDIF}; - end; - -begin - Result := VarTypeIsDate(FindVarData(AValue)^.VType); -end; - -function VarIsNumericEx(const AValue: Variant): Boolean; -begin - Result := VarIsNumeric(AValue) - {$IFNDEF NONDB}{$IFDEF DELPHI6} or - (FindVarData(AValue)^.VType = VarFMTBcd) - {$ENDIF}{$ENDIF}; -end; - -{$IFNDEF DELPHI6} - -function VarIsType(const AValue: Variant; AVarType: TVarType): Boolean; -begin - Result := FindVarData(AValue)^.VType = AVarType; -end; - -function VarTypeIsOrdinal(const AVarType: TVarType): Boolean; -begin - Result := AVarType in [varSmallInt, varInteger, varBoolean, varByte]; -end; - -function VarIsOrdinal(const AValue: Variant): Boolean; -begin - Result := VarTypeIsOrdinal(FindVarData(AValue)^.VType); -end; - -function VarTypeIsFloat(const AVarType: TVarType): Boolean; -begin - Result := AVarType in [varSingle, varDouble, varCurrency]; -end; - -function VarIsFloat(const AValue: Variant): Boolean; -begin - Result := VarTypeIsFloat(FindVarData(AValue)^.VType); -end; - -function VarTypeIsNumeric(const AVarType: TVarType): Boolean; -begin - Result := VarTypeIsOrdinal(AVarType) or VarTypeIsFloat(AVarType); -end; - -function VarIsNumeric(const AValue: Variant): Boolean; -begin - Result := VarTypeIsNumeric(FindVarData(AValue)^.VType); -end; - -function VarTypeIsStr(const AVarType: TVarType): Boolean; -begin - Result := (AVarType = varString) or (AVarType = varOleStr){$IFDEF DELPHI12}or varUString{$ENDIF}; -end; - -function VarIsStr(const AValue: Variant): Boolean; -begin - Result := VarTypeIsStr(FindVarData(AValue)^.VType); -end; - -function VarSameValue(const V1, V2: Variant): Boolean; -var - D1, D2: TVarData; -begin - D1 := FindVarData(V1)^; - D2 := FindVarData(V2)^; - if D1.VType = varEmpty then - Result := D2.VType = varEmpty - else - if D1.VType = varNull then - Result := D2.VType = varNull - else - if D2.VType in [varEmpty, varNull] then - Result := False - else - Result := V1 = V2; -end; - -{$ENDIF} - -function VarIsSoftNull(const AValue: Variant): Boolean; -begin - Result := VarIsNull(AValue) or - ({(VarType(AValue) = varString)}VarIsStr(AValue) and (AValue = '')); -end; - -function VarToStrEx(const V: Variant): string; -begin - Result := VarToStr(V); -{$IFNDEF DELPHI6} - if VarType(V) = varDouble then - Result := StringReplace(Result, GetLocaleChar(GetThreadLocale, LOCALE_SDECIMAL, '.'), - DecimalSeparator, []); -{$ENDIF} -end; - -function VarTypeIsCurrency(AVarType: TVarType): Boolean; -begin - Result := (AVarType = varCurrency) - {$IFNDEF NONDB} - {$IFDEF DELPHI6} or (AVarType = VarFMTBcd){$ENDIF} - {$ENDIF}; -end; - -function VarBetweenArrayCreate(const AValue1, AValue2: Variant): Variant; -begin - Result := VarArrayCreate([0, 1], varVariant); - Result[0] := AValue1; - Result[1] := AValue2; -end; - -function VarListArrayCreate(const AValue: Variant): Variant; -begin - Result := VarArrayCreate([0, 0], varVariant); - Result[0] := AValue; -end; - -procedure VarListArrayAddValue(var Value: Variant; const AValue: Variant); -var - V: Variant; - I, C: Integer; -begin - C := VarArrayHighBound(Value, 1) - VarArrayLowBound(Value, 1) + 2; - V := VarArrayCreate([0, C - 1], varVariant); - for I := VarArrayLowBound(Value, 1) to VarArrayHighBound(Value, 1) do - V[I] := Value[I]; - V[C - 1] := AValue; - Value := V; -end; - -// Stream routines - -function ReadAnsiStringFunc(AStream: TStream): AnsiString; -begin - ReadAnsiStringProc(AStream, Result); -end; - -procedure ReadAnsiStringProc(AStream: TStream; var S: AnsiString); -var - L: Integer; -begin - AStream.ReadBuffer(L, SizeOf(L)); - SetLength(S, L); - AStream.ReadBuffer(Pointer(S)^, L); -end; - -procedure WriteAnsiStringProc(AStream: TStream; const S: AnsiString); -var - L: Integer; -begin - L := Length(S); - AStream.WriteBuffer(L, SizeOf(L)); - AStream.WriteBuffer(S[1], L); -end; - -function ReadWideStringFunc(AStream: TStream): WideString; -begin - ReadWideStringProc(AStream, Result); -end; - -procedure ReadWideStringProc(AStream: TStream; var S: WideString); -var - L: Integer; -begin - AStream.ReadBuffer(L, SizeOf(L)); - SetLength(S, L); - AStream.ReadBuffer(Pointer(S)^, L * 2); -end; - -procedure WriteWideStringProc(AStream: TStream; const S: WideString); -var - L: Integer; -begin - L := Length(S); - AStream.WriteBuffer(L, SizeOf(L)); - AStream.WriteBuffer(Pointer(S)^, L * 2); -end; - -function ReadVariantFunc(AStream: TStream): Variant; -begin - ReadVariantProc(AStream, Result); -end; - -procedure ReadVariantProc(AStream: TStream; var Value: Variant); -const - ValTtoVarT: array[TValueType] of Integer = (varNull, varError, - {$IFNDEF DELPHI6}varByte{$ELSE}varShortInt{$ENDIF}, - varSmallInt, varInteger, varDouble, varString, varError, varBoolean, - varBoolean, varError, varError, varString, varEmpty, varError, varSingle, - varCurrency, varDate, varOleStr, - {$IFDEF DELPHI6}varInt64{$ELSE}varError{$ENDIF} - {$IFDEF DELPHI6}, varError {$IFDEF DELPHI8}, varDouble{$ENDIF}{$ENDIF}); -var - ValType: TValueType; - - function ReadValue: TValueType; - var - B: Byte; - begin - AStream.ReadBuffer(B, SizeOf(Byte)); - Result := TValueType(B); - end; - - function ReadInteger: LargeInt; - var - SH: Shortint; - SM: Smallint; - I: Integer; - begin - case ValType of - vaInt8: - begin - AStream.ReadBuffer(SH, SizeOf(SH)); - Result := SH; - end; - vaInt16: - begin - AStream.ReadBuffer(SM, SizeOf(SM)); - Result := SM; - end; - {$IFDEF DELPHI6} - vaInt32: - {$ELSE} - else - {$ENDIF} - begin - AStream.ReadBuffer(I, SizeOf(I)); - Result := I; - end - {$IFDEF DELPHI6} - else // vaInt64 - AStream.ReadBuffer(Result, SizeOf(Result)); - {$ENDIF} - end; - end; - - function ReadFloat: Extended; - begin - AStream.ReadBuffer(Result, SizeOf(Result)); - end; - - function ReadSingle: Single; - begin - AStream.ReadBuffer(Result, SizeOf(Result)); - end; - - function ReadCurrency: Currency; - begin - ReadCurrencyProc(AStream, Result); - end; - - function ReadDate: TDateTime; - begin - ReadDateTimeProc(AStream, Result); - end; - - function ReadAnsiString: AnsiString; - var - L: Integer; - begin - L := 0; - case ValType of - vaString: - AStream.ReadBuffer(L, SizeOf(Byte)); - else {vaLString} - AStream.ReadBuffer(L, SizeOf(Integer)); - end; - SetLength(Result, L); - AStream.ReadBuffer(Pointer(Result)^, L); - end; - - function ReadWideString: WideString; - begin - ReadWideStringProc(AStream, Result); - end; - - procedure ReadArrayProc(var Value: Variant); - var - I, C: Integer; - V: Variant; - begin - // read size - ValType := ReadValue; // len - C := ReadInteger; - // read values - Value := VarArrayCreate([0, C - 1], varVariant); - for I := 0 to C - 1 do - begin - ReadVariantProc(AStream, V); - Value[I] := V; - end; - end; - -begin - ValType := ReadValue; - if ValType = vaList then - begin - ReadArrayProc(Value); - Exit; - end; - case ValType of - vaNil: - VarClear(Value); - vaNull: - Value := Null; - vaInt8: - {$IFNDEF DELPHI6} - TVarData(Value).VByte := Byte(ReadInteger); - {$ELSE} - TVarData(Value).VShortInt := ShortInt(ReadInteger); - {$ENDIF} - vaInt16: - TVarData(Value).VSmallint := Smallint(ReadInteger); - vaInt32: - TVarData(Value).VInteger := ReadInteger; - {$IFDEF DELPHI6} - vaInt64: - TVarData(Value).VInt64 := ReadInteger; - {$ENDIF} - vaExtended: - TVarData(Value).VDouble := ReadFloat; - vaString, vaLString: - Value := ReadAnsiString; - vaFalse, vaTrue: - TVarData(Value).VBoolean := ValType = vaTrue; - vaWString: - Value := ReadWideString; - vaSingle: - TVarData(Value).VSingle := ReadSingle; - vaCurrency: - TVarData(Value).VCurrency := ReadCurrency; - vaDate: - TVarData(Value).VDate := ReadDate; - else - raise EReadError.Create(cxSDataReadError); - end; - TVarData(Value).VType := ValTtoVarT[ValType]; -end; - -procedure WriteVariantProc(AStream: TStream; const AValue: Variant); - - procedure WriteValue(Value: TValueType); - begin - AStream.WriteBuffer(Byte(Value), SizeOf(Byte)); - end; - - procedure WriteInteger(Value: {$IFDEF DELPHI6}LargeInt{$ELSE}Integer{$ENDIF}); - var - SH: Shortint; - SM: Smallint; - I: Integer; - begin - if (Value >= Low(ShortInt)) and (Value <= High(ShortInt)) then - begin - WriteValue(vaInt8); - SH := Value; - AStream.WriteBuffer(SH, SizeOf(SH)); - end - else - if (Value >= Low(SmallInt)) and (Value <= High(SmallInt)) then - begin - WriteValue(vaInt16); - SM := Value; - AStream.WriteBuffer(SM, SizeOf(SM)); - end - else - {$IFDEF DELPHI6} - if (Value >= Low(Integer)) and (Value <= High(Integer)) then - {$ENDIF} - begin - WriteValue(vaInt32); - I := Value; - AStream.WriteBuffer(I, SizeOf(I)); - end - {$IFDEF DELPHI6} - else - begin - WriteValue(vaInt64); - AStream.WriteBuffer(Value, SizeOf(Value)); - end; - {$ENDIF} - end; - - procedure WriteAnsiString(const Value: AnsiString); - var - B: Byte; - L: Integer; - begin - L := Length(Value); - if L <= 255 then - begin - WriteValue(vaString); - B := L; - AStream.WriteBuffer(B, SizeOf(B)); - end - else - begin - WriteValue(vaLString); - AStream.WriteBuffer(L, SizeOf(L)); - end; - AStream.WriteBuffer(Pointer(Value)^, L); - end; - - procedure WriteFloat(const Value: Extended); - begin - WriteValue(vaExtended); - AStream.WriteBuffer(Value, SizeOf(Extended)); - end; - - procedure WriteSingle(const Value: Single); - begin - WriteValue(vaSingle); - AStream.WriteBuffer(Value, SizeOf(Single)); - end; - - procedure WriteCurrency(const Value: Currency); - begin - WriteValue(vaCurrency); - WriteCurrencyProc(AStream, Value); - end; - - procedure WriteDate(const Value: TDateTime); - begin - WriteValue(vaDate); - WriteDateTimeProc(AStream, Value); - end; - - procedure WriteWideString(const Value: WideString); - begin - WriteValue(vaWString); - WriteWideStringProc(AStream, Value); - end; - - procedure WriteArrayProc(const Value: Variant); - var - I, L, H: Integer; - begin - if VarArrayDimCount(Value) <> 1 then - raise EWriteError.Create(cxSDataWriteError); - L := VarArrayLowBound(Value, 1); - H := VarArrayHighBound(Value, 1); - WriteValue(vaList); - WriteInteger(H - L + 1); - for I := L to H do - WriteVariantProc(AStream, Value[I]); - end; - -var - VType: Integer; -begin - if VarIsArray(AValue) then - begin - WriteArrayProc(AValue); - Exit; - end; - VType := VarType(AValue); - case VType and varTypeMask of - varEmpty: - WriteValue(vaNil); - varNull: - WriteValue(vaNull); - varString: - WriteAnsiString(dxVariantToAnsiString(AValue)); - {$IFDEF DELPHI6} - varShortInt, varWord, varLongWord, varInt64, - {$ENDIF} - varByte, varSmallInt, varInteger: - WriteInteger(AValue); - varDouble: - WriteFloat(AValue); - varBoolean: - if AValue then - WriteValue(vaTrue) - else - WriteValue(vaFalse); - {$IFDEF DELPHI12} - varUString, - {$ENDIF} - varOleStr: - WriteWideString(AValue); - varSingle: - WriteSingle(AValue); - varCurrency: - WriteCurrency(AValue); - varDate: - WriteDate(AValue); - else -{$IFDEF DELPHI6} - {$IFNDEF NONDB} - if VType = VarSQLTimeStamp then - WriteVariantProc(AStream, TDateTime(AValue)) - else - {$ENDIF} -{$ENDIF} - try - WriteAnsiString(dxVariantToAnsiString(AValue)); - except - raise EWriteError.Create(cxSDataWriteError); - end; - end; -end; - -function ReadBooleanFunc(AStream: TStream): Boolean; -begin - ReadBooleanProc(AStream, Result); -end; - -procedure ReadBooleanProc(AStream: TStream; var Value: Boolean); -begin - AStream.ReadBuffer(Value, SizeOf(Value)); -end; - -procedure WriteBooleanProc(AStream: TStream; AValue: Boolean); -begin - AStream.WriteBuffer(AValue, SizeOf(AValue)); -end; - -function ReadCharFunc(AStream: TStream): Char; -begin - ReadCharProc(AStream, Result); -end; - -procedure ReadCharProc(AStream: TStream; var Value: Char); -begin - AStream.ReadBuffer(Value, SizeOf(Value)); -end; - -procedure WriteCharProc(AStream: TStream; AValue: Char); -begin - AStream.WriteBuffer(AValue, SizeOf(AValue)); -end; - -function ReadFloatFunc(AStream: TStream): Extended; -begin - ReadFloatProc(AStream, Result); -end; - -procedure ReadFloatProc(AStream: TStream; var Value: Extended); -begin - AStream.ReadBuffer(Value, SizeOf(Value)); -end; - -procedure WriteFloatProc(AStream: TStream; AValue: Extended); -begin - AStream.WriteBuffer(AValue, SizeOf(AValue)); -end; - -function ReadSingleFunc(AStream: TStream): Single; -begin - ReadSingleProc(AStream, Result); -end; - -procedure ReadSingleProc(AStream: TStream; var Value: Single); -begin - AStream.ReadBuffer(Value, SizeOf(Value)); -end; - -procedure WriteSingleProc(AStream: TStream; AValue: Single); -begin - AStream.WriteBuffer(AValue, SizeOf(AValue)); -end; - -function ReadCurrencyFunc(AStream: TStream): Currency; -begin - ReadCurrencyProc(AStream, Result); -end; - -procedure ReadCurrencyProc(AStream: TStream; var Value: Currency); -begin - AStream.ReadBuffer(Value, SizeOf(Value)); -end; - -procedure WriteCurrencyProc(AStream: TStream; AValue: Currency); -begin - AStream.WriteBuffer(AValue, SizeOf(AValue)); -end; - -function ReadDateTimeFunc(AStream: TStream): TDateTime; -begin - ReadDateTimeProc(AStream, Result); -end; - -procedure ReadDateTimeProc(AStream: TStream; var Value: TDateTime); -begin - AStream.ReadBuffer(Value, SizeOf(Value)); -end; - -procedure WriteDateTimeProc(AStream: TStream; AValue: TDateTime); -begin - AStream.WriteBuffer(AValue, SizeOf(AValue)); -end; - -function ReadIntegerFunc(AStream: TStream): Integer; -begin - ReadIntegerProc(AStream, Result); -end; - -procedure ReadIntegerProc(AStream: TStream; var Value: Integer); -begin - AStream.ReadBuffer(Value, SizeOf(Value)); -end; - -procedure WriteIntegerProc(AStream: TStream; AValue: Integer); -begin - AStream.WriteBuffer(AValue, SizeOf(AValue)); -end; - -function ReadLargeIntFunc(AStream: TStream): LargeInt; -begin - ReadLargeIntProc(AStream, Result); -end; - -procedure ReadLargeIntProc(AStream: TStream; var Value: LargeInt); -begin - AStream.ReadBuffer(Value, SizeOf(Value)); -end; - -procedure WriteLargeIntProc(AStream: TStream; AValue: LargeInt); -begin - AStream.WriteBuffer(AValue, SizeOf(AValue)); -end; - -function ReadByteFunc(AStream: TStream): Byte; -begin - ReadByteProc(AStream, Result); -end; - -procedure ReadByteProc(AStream: TStream; var Value: Byte); -begin - AStream.ReadBuffer(Value, SizeOf(Value)); -end; - -procedure WriteByteProc(AStream: TStream; AValue: Byte); -begin - AStream.WriteBuffer(AValue, SizeOf(AValue)); -end; - -function ReadSmallIntFunc(AStream: TStream): SmallInt; -begin - ReadSmallIntProc(AStream, Result); -end; - -procedure ReadSmallIntProc(AStream: TStream; var Value: SmallInt); -begin - AStream.ReadBuffer(Value, SizeOf(Value)); -end; - -procedure WriteSmallIntProc(AStream: TStream; AValue: SmallInt); -begin - AStream.WriteBuffer(AValue, SizeOf(AValue)); -end; - -function ReadCardinalFunc(AStream: TStream): Cardinal; -begin - ReadCardinalProc(AStream, Result); -end; - -procedure ReadCardinalProc(AStream: TStream; var Value: Cardinal); -begin - Value := ReadIntegerFunc(AStream); -end; - -procedure WriteCardinalProc(AStream: TStream; AValue: Cardinal); -begin - WriteIntegerProc(AStream, AValue); -end; - -function ReadShortIntFunc(AStream: TStream): ShortInt; -begin - ReadShortIntProc(AStream, Result); -end; - -procedure ReadShortIntProc(AStream: TStream; var Value: ShortInt); -begin - Value := ReadByteFunc(AStream); -end; - -procedure WriteShortIntProc(AStream: TStream; AValue: ShortInt); -begin - WriteByteProc(AStream, AValue); -end; - -function ReadWordFunc(AStream: TStream): Word; -begin - ReadWordProc(AStream, Result); -end; - -procedure ReadWordProc(AStream: TStream; var Value: Word); -begin - Value := ReadSmallIntFunc(AStream); -end; - -procedure WriteWordProc(AStream: TStream; AValue: Word); -begin - WriteSmallIntProc(AStream, AValue); -end; - -{ TcxFiler } - -constructor TcxFiler.Create(AStream: TStream); -begin - inherited Create; - FIsUnicode := dxIsUnicodeStream(AStream); - FStream := AStream; -end; - -{ TcxReader } - -function TcxReader.ReadAnsiString: AnsiString; -begin - ReadAnsiStringProc(Stream, Result); -end; - -function TcxReader.ReadBoolean: Boolean; -begin - ReadBooleanProc(Stream, Result); -end; - -function TcxReader.ReadByte: Byte; -begin - ReadByteProc(Stream, Result); -end; - -function TcxReader.ReadCardinal: Cardinal; -begin - ReadCardinalProc(Stream, Result); -end; - -function TcxReader.ReadChar: Char; -begin - ReadCharProc(Stream, Result); -end; - -function TcxReader.ReadCurrency: Currency; -begin - ReadCurrencyProc(Stream, Result); -end; - -function TcxReader.ReadDateTime: TDateTime; -begin - ReadDateTimeProc(Stream, Result); -end; - -function TcxReader.ReadFloat: Extended; -begin - ReadFloatProc(Stream, Result); -end; - -function TcxReader.ReadInteger: Integer; -begin - ReadIntegerProc(Stream, Result); -end; - -function TcxReader.ReadLargeInt: LargeInt; -begin - ReadLargeIntProc(Stream, Result); -end; - -function TcxReader.ReadShortInt: ShortInt; -begin - ReadShortIntProc(Stream, Result); -end; - -function TcxReader.ReadSingle: Single; -begin - ReadSingleProc(Stream, Result); -end; - -function TcxReader.ReadSmallInt: SmallInt; -begin - ReadSmallIntProc(Stream, Result); -end; - -function TcxReader.ReadString_: string; -begin - Result := dxReadStr(Stream, IsUnicode); -end; - -function TcxReader.ReadVariant: Variant; -begin - ReadVariantProc(Stream, Result); -end; - -function TcxReader.ReadWideString: WideString; -begin - ReadWideStringProc(Stream, Result); -end; - -function TcxReader.ReadWord: Word; -begin - ReadWordProc(Stream, Result); -end; - -{ TcxWriter } - -procedure TcxWriter.WriteAnsiString(const S: AnsiString); -begin - WriteAnsiStringProc(Stream, S); -end; - -procedure TcxWriter.WriteBoolean(AValue: Boolean); -begin - WriteBooleanProc(Stream, AValue); -end; - -procedure TcxWriter.WriteByte(AValue: Byte); -begin - WriteByteProc(Stream, AValue); -end; - -procedure TcxWriter.WriteCardinal(AValue: Cardinal); -begin - WriteCardinalProc(Stream, AValue); -end; - -procedure TcxWriter.WriteChar(AValue: Char); -begin - WriteCharProc(Stream, AValue); -end; - -procedure TcxWriter.WriteCurrency(AValue: Currency); -begin - WriteCurrencyProc(Stream, AValue); -end; - -procedure TcxWriter.WriteDateTime(AValue: TDateTime); -begin - WriteDateTimeProc(Stream, AValue); -end; - -procedure TcxWriter.WriteFloat(AValue: Extended); -begin - WriteFloatProc(Stream, AValue); -end; - -procedure TcxWriter.WriteInteger(AValue: Integer); -begin - WriteIntegerProc(Stream, AValue); -end; - -procedure TcxWriter.WriteLargeInt(AValue: LargeInt); -begin - WriteLargeIntProc(Stream, AValue); -end; - -procedure TcxWriter.WriteShortInt(AValue: ShortInt); -begin - WriteShortIntProc(Stream, AValue); -end; - -procedure TcxWriter.WriteSingle(AValue: Single); -begin - WriteSingleProc(Stream, AValue); -end; - -procedure TcxWriter.WriteSmallInt(AValue: SmallInt); -begin - WriteSmallIntProc(Stream, AValue); -end; - -procedure TcxWriter.WriteVariant(const AValue: Variant); -begin - WriteVariantProc(Stream, AValue); -end; - -procedure TcxWriter.WriteWideString(const S: WideString); -begin - WriteWideStringProc(Stream, S); -end; - -procedure TcxWriter.WriteWord(AValue: Word); -begin - WriteWordProc(Stream, AValue); -end; - -end. diff --git a/internal/x.46/ExpressDataController/Sources/cxVer.inc b/internal/x.46/ExpressDataController/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/ExpressDataController/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC10.bpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC10.bpk deleted file mode 100644 index 200970c3..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC10.bpk +++ /dev/null @@ -1,219 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = cxEditorsC10.bpl -OBJFILES = cxEditorsC10.obj cxBlobEdit.obj \ - cxButtonEdit.obj cxButtons.obj \ - cxCalc.obj cxCalendar.obj \ - cxCheckBox.obj cxCurrencyEdit.obj \ - cxDBEdit.obj \ - cxDBEditRepository.obj cxDBLookupEdit.obj \ - cxDropDownEdit.obj cxEdit.obj \ - cxEditConsts.obj \ - cxEditDataRegisteredRepositoryItems.obj \ - cxEditDBRegisteredRepositoryItems.obj \ - cxEditPaintUtils.obj cxDBNavigator.obj cxDBFilterControl.obj \ - cxEditRepositoryItems.obj cxEditUtils.obj \ - cxHyperLinkEdit.obj \ - cxImage.obj cxImageComboBox.obj \ - cxLookupDBGrid.obj cxLookupEdit.obj \ - cxLookupGrid.obj cxMaskEdit.obj cxGroupBox.obj \ - cxMemo.obj cxMRUEdit.obj cxDBLookupComboBox.obj \ - cxRegExpr.obj cxSpinEdit.obj \ - cxStandardMask.obj cxTextEdit.obj \ - cxTimeEdit.obj cxEditMaskEditor.obj cxListBox.obj \ - cxEditRegisteredRepositoryItems.obj cxPropertiesConverters.obj \ - cxRadioGroup.obj cxFilterControlDialog.obj cxNavigator.obj \ - cxFilterControl.obj cxFilterControlUtils.obj cxFilterControlStrs.obj \ - cxInplaceContainer.obj -RESFILES = cxEditorsC10.res -MAINSOURCE = cxEditorsC10.cpp -RESDEPEN = $(RESFILES) cxEditMaskEditor.dfm cxFilterControlDialog.dfm cxEdit.res cxScrollCursors.res -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC10.bpi cxDataC10.bpi dxGDIPlusC10.bpi dxThemeC10.bpi rtl.bpi vcl.bpi vcljpg.bpi \ - dbrtl.bpi vcldb.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib vcljpg.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC10.cpp b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC10.cpp deleted file mode 100644 index d9d6b2ae..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC10.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxEditorsC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("dxGDIPlusC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("vcljpg.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxBlobEdit.pas"); -USEUNIT("cxButtonEdit.pas"); -USEUNIT("cxButtons.pas"); -USEUNIT("cxCalc.pas"); -USEUNIT("cxCalendar.pas"); -USEUNIT("cxCheckBox.pas"); -USEUNIT("cxCurrencyEdit.pas"); -USEUNIT("cxDBEdit.pas"); -USEUNIT("cxDBEditRepository.pas"); -USEUNIT("cxDBLookupEdit.pas"); -USEUNIT("cxDropDownEdit.pas"); -USEUNIT("cxEdit.pas"); -USEUNIT("cxEditConsts.pas"); -USEUNIT("cxEditDataRegisteredRepositoryItems.pas"); -USEUNIT("cxEditDBRegisteredRepositoryItems.pas"); -USEUNIT("cxEditPaintUtils.pas"); -USEUNIT("cxEditRepositoryItems.pas"); -USEUNIT("cxEditUtils.pas"); -USEUNIT("cxHyperLinkEdit.pas"); -USEUNIT("cxImage.pas"); -USEUNIT("cxImageComboBox.pas"); -USEUNIT("cxLookupDBGrid.pas"); -USEUNIT("cxLookupEdit.pas"); -USEUNIT("cxLookupGrid.pas"); -USEUNIT("cxMaskEdit.pas"); -USEUNIT("cxMemo.pas"); -USEUNIT("cxMRUEdit.pas"); -USEUNIT("cxRegExpr.pas"); -USEUNIT("cxSpinEdit.pas"); -USEUNIT("cxStandardMask.pas"); -USEUNIT("cxTextEdit.pas"); -USEUNIT("cxTimeEdit.pas"); -USEUNIT("cxListBox.pas"); -USEUNIT("cxEditRegisteredRepositoryItems.pas"); -USEUNIT("cxDBLookupComboBox.pas"); -USEUNIT("cxRadioGroup.pas"); -USEUNIT("cxFilterControl.pas"); -USEUNIT("cxFilterControlUtils.pas"); -USEUNIT("cxFilterControlStrs.pas"); -USEUNIT("cxNavigator.pas"); -USEUNIT("cxDBNavigator.pas"); -USEUNIT("cxDBFilterControl.pas"); -USEUNIT("cxInplaceContainer.pas"); -USEFORMNS("cxFilterControlDialog.pas", fmfiltercontroldialog, fmFilterControlDialog); -USEFORMNS("cxEditMaskEditor.pas", Cxeditmaskeditor, cxEditMaskEditorDlg); -USEUNIT("cxPropertiesConverters.pas"); -USEUNIT("cxGroupBox.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC10.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC10.res deleted file mode 100644 index a5a54098..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC10.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC11.bpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC11.bpk deleted file mode 100644 index 1a9f98de..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC11.bpk +++ /dev/null @@ -1,219 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = cxEditorsC11.bpl -OBJFILES = cxEditorsC11.obj cxBlobEdit.obj \ - cxButtonEdit.obj cxButtons.obj \ - cxCalc.obj cxCalendar.obj \ - cxCheckBox.obj cxCurrencyEdit.obj \ - cxDBEdit.obj \ - cxDBEditRepository.obj cxDBLookupEdit.obj \ - cxDropDownEdit.obj cxEdit.obj \ - cxEditConsts.obj \ - cxEditDataRegisteredRepositoryItems.obj \ - cxEditDBRegisteredRepositoryItems.obj \ - cxEditPaintUtils.obj cxDBNavigator.obj cxDBFilterControl.obj \ - cxEditRepositoryItems.obj cxEditUtils.obj \ - cxHyperLinkEdit.obj \ - cxImage.obj cxImageComboBox.obj \ - cxLookupDBGrid.obj cxLookupEdit.obj \ - cxLookupGrid.obj cxMaskEdit.obj cxGroupBox.obj \ - cxMemo.obj cxMRUEdit.obj cxDBLookupComboBox.obj \ - cxRegExpr.obj cxSpinEdit.obj \ - cxStandardMask.obj cxTextEdit.obj \ - cxTimeEdit.obj cxEditMaskEditor.obj cxListBox.obj \ - cxEditRegisteredRepositoryItems.obj cxPropertiesConverters.obj \ - cxRadioGroup.obj cxFilterControlDialog.obj cxNavigator.obj \ - cxFilterControl.obj cxFilterControlUtils.obj cxFilterControlStrs.obj \ - cxInplaceContainer.obj -RESFILES = cxEditorsC11.res -MAINSOURCE = cxEditorsC11.cpp -RESDEPEN = $(RESFILES) cxEditMaskEditor.dfm cxFilterControlDialog.dfm cxEdit.res cxScrollCursors.res -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC11.bpi cxDataC11.bpi dxGDIPlusC11.bpi dxThemeC11.bpi rtl.bpi vcl.bpi vcljpg.bpi \ - dbrtl.bpi vcldb.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib vcljpg.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC11.cpp b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC11.cpp deleted file mode 100644 index 7054b3ba..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC11.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxEditorsC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("dxGDIPlusC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("vcljpg.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxBlobEdit.pas"); -USEUNIT("cxButtonEdit.pas"); -USEUNIT("cxButtons.pas"); -USEUNIT("cxCalc.pas"); -USEUNIT("cxCalendar.pas"); -USEUNIT("cxCheckBox.pas"); -USEUNIT("cxCurrencyEdit.pas"); -USEUNIT("cxDBEdit.pas"); -USEUNIT("cxDBEditRepository.pas"); -USEUNIT("cxDBLookupEdit.pas"); -USEUNIT("cxDropDownEdit.pas"); -USEUNIT("cxEdit.pas"); -USEUNIT("cxEditConsts.pas"); -USEUNIT("cxEditDataRegisteredRepositoryItems.pas"); -USEUNIT("cxEditDBRegisteredRepositoryItems.pas"); -USEUNIT("cxEditPaintUtils.pas"); -USEUNIT("cxEditRepositoryItems.pas"); -USEUNIT("cxEditUtils.pas"); -USEUNIT("cxHyperLinkEdit.pas"); -USEUNIT("cxImage.pas"); -USEUNIT("cxImageComboBox.pas"); -USEUNIT("cxLookupDBGrid.pas"); -USEUNIT("cxLookupEdit.pas"); -USEUNIT("cxLookupGrid.pas"); -USEUNIT("cxMaskEdit.pas"); -USEUNIT("cxMemo.pas"); -USEUNIT("cxMRUEdit.pas"); -USEUNIT("cxRegExpr.pas"); -USEUNIT("cxSpinEdit.pas"); -USEUNIT("cxStandardMask.pas"); -USEUNIT("cxTextEdit.pas"); -USEUNIT("cxTimeEdit.pas"); -USEUNIT("cxListBox.pas"); -USEUNIT("cxEditRegisteredRepositoryItems.pas"); -USEUNIT("cxDBLookupComboBox.pas"); -USEUNIT("cxRadioGroup.pas"); -USEUNIT("cxFilterControl.pas"); -USEUNIT("cxFilterControlUtils.pas"); -USEUNIT("cxFilterControlStrs.pas"); -USEUNIT("cxNavigator.pas"); -USEUNIT("cxDBNavigator.pas"); -USEUNIT("cxDBFilterControl.pas"); -USEUNIT("cxInplaceContainer.pas"); -USEFORMNS("cxFilterControlDialog.pas", fmfiltercontroldialog, fmFilterControlDialog); -USEFORMNS("cxEditMaskEditor.pas", Cxeditmaskeditor, cxEditMaskEditorDlg); -USEUNIT("cxPropertiesConverters.pas"); -USEUNIT("cxGroupBox.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC11.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC11.res deleted file mode 100644 index 3b4601ba..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC11.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC12.bpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC12.bpk deleted file mode 100644 index c51591e9..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC12.bpk +++ /dev/null @@ -1,219 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = cxEditorsC12.bpl -OBJFILES = cxEditorsC12.obj cxBlobEdit.obj \ - cxButtonEdit.obj cxButtons.obj \ - cxCalc.obj cxCalendar.obj \ - cxCheckBox.obj cxCurrencyEdit.obj \ - cxDBEdit.obj \ - cxDBEditRepository.obj cxDBLookupEdit.obj \ - cxDropDownEdit.obj cxEdit.obj \ - cxEditConsts.obj \ - cxEditDataRegisteredRepositoryItems.obj \ - cxEditDBRegisteredRepositoryItems.obj \ - cxEditPaintUtils.obj cxDBNavigator.obj cxDBFilterControl.obj \ - cxEditRepositoryItems.obj cxEditUtils.obj \ - cxHyperLinkEdit.obj \ - cxImage.obj cxImageComboBox.obj \ - cxLookupDBGrid.obj cxLookupEdit.obj \ - cxLookupGrid.obj cxMaskEdit.obj cxGroupBox.obj \ - cxMemo.obj cxMRUEdit.obj cxDBLookupComboBox.obj \ - cxRegExpr.obj cxSpinEdit.obj \ - cxStandardMask.obj cxTextEdit.obj \ - cxTimeEdit.obj cxEditMaskEditor.obj cxListBox.obj \ - cxEditRegisteredRepositoryItems.obj cxPropertiesConverters.obj \ - cxRadioGroup.obj cxFilterControlDialog.obj cxNavigator.obj \ - cxFilterControl.obj cxFilterControlUtils.obj cxFilterControlStrs.obj \ - cxInplaceContainer.obj -RESFILES = cxEditorsC12.res -MAINSOURCE = cxEditorsC12.cpp -RESDEPEN = $(RESFILES) cxEditMaskEditor.dfm cxFilterControlDialog.dfm cxEdit.res cxScrollCursors.res -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC12.bpi cxDataC12.bpi dxGDIPlusC12.bpi dxThemeC12.bpi rtl.bpi vcl.bpi vclimg.bpi \ - dbrtl.bpi vcldb.bpi dxCoreC12.bpi -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib vclimg.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC12.cpp b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC12.cpp deleted file mode 100644 index 0fe63041..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC12.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxEditorsC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("dxGDIPlusC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("vclimg.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxBlobEdit.pas"); -USEUNIT("cxButtonEdit.pas"); -USEUNIT("cxButtons.pas"); -USEUNIT("cxCalc.pas"); -USEUNIT("cxCalendar.pas"); -USEUNIT("cxCheckBox.pas"); -USEUNIT("cxCurrencyEdit.pas"); -USEUNIT("cxDBEdit.pas"); -USEUNIT("cxDBEditRepository.pas"); -USEUNIT("cxDBLookupEdit.pas"); -USEUNIT("cxDropDownEdit.pas"); -USEUNIT("cxEdit.pas"); -USEUNIT("cxEditConsts.pas"); -USEUNIT("cxEditDataRegisteredRepositoryItems.pas"); -USEUNIT("cxEditDBRegisteredRepositoryItems.pas"); -USEUNIT("cxEditPaintUtils.pas"); -USEUNIT("cxEditRepositoryItems.pas"); -USEUNIT("cxEditUtils.pas"); -USEUNIT("cxHyperLinkEdit.pas"); -USEUNIT("cxImage.pas"); -USEUNIT("cxImageComboBox.pas"); -USEUNIT("cxLookupDBGrid.pas"); -USEUNIT("cxLookupEdit.pas"); -USEUNIT("cxLookupGrid.pas"); -USEUNIT("cxMaskEdit.pas"); -USEUNIT("cxMemo.pas"); -USEUNIT("cxMRUEdit.pas"); -USEUNIT("cxRegExpr.pas"); -USEUNIT("cxSpinEdit.pas"); -USEUNIT("cxStandardMask.pas"); -USEUNIT("cxTextEdit.pas"); -USEUNIT("cxTimeEdit.pas"); -USEUNIT("cxListBox.pas"); -USEUNIT("cxEditRegisteredRepositoryItems.pas"); -USEUNIT("cxDBLookupComboBox.pas"); -USEUNIT("cxRadioGroup.pas"); -USEUNIT("cxFilterControl.pas"); -USEUNIT("cxFilterControlUtils.pas"); -USEUNIT("cxFilterControlStrs.pas"); -USEUNIT("cxNavigator.pas"); -USEUNIT("cxDBNavigator.pas"); -USEUNIT("cxDBFilterControl.pas"); -USEUNIT("cxInplaceContainer.pas"); -USEFORMNS("cxFilterControlDialog.pas", fmfiltercontroldialog, fmFilterControlDialog); -USEFORMNS("cxEditMaskEditor.pas", Cxeditmaskeditor, cxEditMaskEditorDlg); -USEUNIT("cxPropertiesConverters.pas"); -USEUNIT("cxGroupBox.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC12.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC12.res deleted file mode 100644 index 6cb5db80..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC12.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC14.bpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC14.bpk deleted file mode 100644 index a4d4023f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC14.bpk +++ /dev/null @@ -1,219 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = cxEditorsC14.bpl -OBJFILES = cxEditorsC14.obj cxBlobEdit.obj \ - cxButtonEdit.obj cxButtons.obj \ - cxCalc.obj cxCalendar.obj \ - cxCheckBox.obj cxCurrencyEdit.obj \ - cxDBEdit.obj \ - cxDBEditRepository.obj cxDBLookupEdit.obj \ - cxDropDownEdit.obj cxEdit.obj \ - cxEditConsts.obj \ - cxEditDataRegisteredRepositoryItems.obj \ - cxEditDBRegisteredRepositoryItems.obj \ - cxEditPaintUtils.obj cxDBNavigator.obj cxDBFilterControl.obj \ - cxEditRepositoryItems.obj cxEditUtils.obj \ - cxHyperLinkEdit.obj \ - cxImage.obj cxImageComboBox.obj \ - cxLookupDBGrid.obj cxLookupEdit.obj \ - cxLookupGrid.obj cxMaskEdit.obj cxGroupBox.obj \ - cxMemo.obj cxMRUEdit.obj cxDBLookupComboBox.obj \ - cxRegExpr.obj cxSpinEdit.obj \ - cxStandardMask.obj cxTextEdit.obj \ - cxTimeEdit.obj cxEditMaskEditor.obj cxListBox.obj \ - cxEditRegisteredRepositoryItems.obj cxPropertiesConverters.obj \ - cxRadioGroup.obj cxFilterControlDialog.obj cxNavigator.obj \ - cxFilterControl.obj cxFilterControlUtils.obj cxFilterControlStrs.obj \ - cxInplaceContainer.obj -RESFILES = cxEditorsC14.res -MAINSOURCE = cxEditorsC14.cpp -RESDEPEN = $(RESFILES) cxEditMaskEditor.dfm cxFilterControlDialog.dfm cxEdit.res cxScrollCursors.res -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC14.bpi cxDataC14.bpi dxGDIPlusC14.bpi dxThemeC14.bpi rtl.bpi vcl.bpi vclimg.bpi \ - dbrtl.bpi vcldb.bpi dxCoreC14.bpi -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib vclimg.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC14.cpp b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC14.cpp deleted file mode 100644 index 5a77dc8e..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC14.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxEditorsC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("dxGDIPlusC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("vclimg.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxBlobEdit.pas"); -USEUNIT("cxButtonEdit.pas"); -USEUNIT("cxButtons.pas"); -USEUNIT("cxCalc.pas"); -USEUNIT("cxCalendar.pas"); -USEUNIT("cxCheckBox.pas"); -USEUNIT("cxCurrencyEdit.pas"); -USEUNIT("cxDBEdit.pas"); -USEUNIT("cxDBEditRepository.pas"); -USEUNIT("cxDBLookupEdit.pas"); -USEUNIT("cxDropDownEdit.pas"); -USEUNIT("cxEdit.pas"); -USEUNIT("cxEditConsts.pas"); -USEUNIT("cxEditDataRegisteredRepositoryItems.pas"); -USEUNIT("cxEditDBRegisteredRepositoryItems.pas"); -USEUNIT("cxEditPaintUtils.pas"); -USEUNIT("cxEditRepositoryItems.pas"); -USEUNIT("cxEditUtils.pas"); -USEUNIT("cxHyperLinkEdit.pas"); -USEUNIT("cxImage.pas"); -USEUNIT("cxImageComboBox.pas"); -USEUNIT("cxLookupDBGrid.pas"); -USEUNIT("cxLookupEdit.pas"); -USEUNIT("cxLookupGrid.pas"); -USEUNIT("cxMaskEdit.pas"); -USEUNIT("cxMemo.pas"); -USEUNIT("cxMRUEdit.pas"); -USEUNIT("cxRegExpr.pas"); -USEUNIT("cxSpinEdit.pas"); -USEUNIT("cxStandardMask.pas"); -USEUNIT("cxTextEdit.pas"); -USEUNIT("cxTimeEdit.pas"); -USEUNIT("cxListBox.pas"); -USEUNIT("cxEditRegisteredRepositoryItems.pas"); -USEUNIT("cxDBLookupComboBox.pas"); -USEUNIT("cxRadioGroup.pas"); -USEUNIT("cxFilterControl.pas"); -USEUNIT("cxFilterControlUtils.pas"); -USEUNIT("cxFilterControlStrs.pas"); -USEUNIT("cxNavigator.pas"); -USEUNIT("cxDBNavigator.pas"); -USEUNIT("cxDBFilterControl.pas"); -USEUNIT("cxInplaceContainer.pas"); -USEFORMNS("cxFilterControlDialog.pas", fmfiltercontroldialog, fmFilterControlDialog); -USEFORMNS("cxEditMaskEditor.pas", Cxeditmaskeditor, cxEditMaskEditorDlg); -USEUNIT("cxPropertiesConverters.pas"); -USEUNIT("cxGroupBox.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC14.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC14.res deleted file mode 100644 index 0e6fd364..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsC14.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD10.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD10.dpk deleted file mode 100644 index e904c999..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD10.dpk +++ /dev/null @@ -1,88 +0,0 @@ -package cxEditorsD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcl, - vcldb, - vcljpg, - dxThemeD10, - cxDataD10, - cxLibraryD10; - -contains - cxBlobEdit, - cxButtonEdit, - cxButtons, - cxCalc, - cxCalendar, - cxCheckBox, - cxCurrencyEdit, - cxDBEdit, - cxDBEditRepository, - cxDBLookupEdit, - cxEdit, - cxEditConsts, - cxEditDataRegisteredRepositoryItems, - cxEditDBRegisteredRepositoryItems, - cxEditRegisteredRepositoryItems, - cxEditUtils, - cxHyperLinkEdit, - cxImage, - cxImageComboBox, - cxLookupDBGrid, - cxLookupEdit, - cxLookupGrid, - cxMaskEdit, - cxNavigator, - cxMemo, - cxMRUEdit, - cxRegExpr, - cxSpinEdit, - cxTimeEdit, - cxDropDownEdit, - cxEditPaintUtils, - cxTextEdit, - cxStandardMask, - cxEditMaskEditor, - cxDBLookupComboBox, - cxRadioGroup, - cxListBox, - cxFilterControl, - cxFilterControlUtils, - cxFilterControlStrs, - cxFilterControlDialog, - cxEditRepositoryItems, - cxDBNavigator, - cxDBFilterControl, - cxPropertiesConverters, - cxGroupBox, - cxInplaceContainer; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD10.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD10.res deleted file mode 100644 index f116bbbf..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD10.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD11.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD11.dpk deleted file mode 100644 index 33c18ed9..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD11.dpk +++ /dev/null @@ -1,88 +0,0 @@ -package cxEditorsD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcl, - vcldb, - vcljpg, - dxThemeD11, - cxDataD11, - cxLibraryD11; - -contains - cxBlobEdit, - cxButtonEdit, - cxButtons, - cxCalc, - cxCalendar, - cxCheckBox, - cxCurrencyEdit, - cxDBEdit, - cxDBEditRepository, - cxDBLookupEdit, - cxEdit, - cxEditConsts, - cxEditDataRegisteredRepositoryItems, - cxEditDBRegisteredRepositoryItems, - cxEditRegisteredRepositoryItems, - cxEditUtils, - cxHyperLinkEdit, - cxImage, - cxImageComboBox, - cxLookupDBGrid, - cxLookupEdit, - cxLookupGrid, - cxMaskEdit, - cxNavigator, - cxMemo, - cxMRUEdit, - cxRegExpr, - cxSpinEdit, - cxTimeEdit, - cxDropDownEdit, - cxEditPaintUtils, - cxTextEdit, - cxStandardMask, - cxEditMaskEditor, - cxDBLookupComboBox, - cxRadioGroup, - cxListBox, - cxFilterControl, - cxFilterControlUtils, - cxFilterControlStrs, - cxFilterControlDialog, - cxEditRepositoryItems, - cxDBNavigator, - cxDBFilterControl, - cxPropertiesConverters, - cxGroupBox, - cxInplaceContainer; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD11.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD11.res deleted file mode 100644 index 76e9362f..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD11.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD12.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD12.dpk deleted file mode 100644 index ab3dd194..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD12.dpk +++ /dev/null @@ -1,88 +0,0 @@ -package cxEditorsD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcl, - vcldb, - vclimg, - dxThemeD12, - cxDataD12, - cxLibraryD12; - -contains - cxBlobEdit, - cxButtonEdit, - cxButtons, - cxCalc, - cxCalendar, - cxCheckBox, - cxCurrencyEdit, - cxDBEdit, - cxDBEditRepository, - cxDBLookupEdit, - cxEdit, - cxEditConsts, - cxEditDataRegisteredRepositoryItems, - cxEditDBRegisteredRepositoryItems, - cxEditRegisteredRepositoryItems, - cxEditUtils, - cxHyperLinkEdit, - cxImage, - cxImageComboBox, - cxLookupDBGrid, - cxLookupEdit, - cxLookupGrid, - cxMaskEdit, - cxNavigator, - cxMemo, - cxMRUEdit, - cxRegExpr, - cxSpinEdit, - cxTimeEdit, - cxDropDownEdit, - cxEditPaintUtils, - cxTextEdit, - cxStandardMask, - cxEditMaskEditor, - cxDBLookupComboBox, - cxRadioGroup, - cxListBox, - cxFilterControl, - cxFilterControlUtils, - cxFilterControlStrs, - cxFilterControlDialog, - cxEditRepositoryItems, - cxDBNavigator, - cxDBFilterControl, - cxPropertiesConverters, - cxGroupBox, - cxInplaceContainer; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD12.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD12.res deleted file mode 100644 index 68169638..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD12.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD14.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD14.dpk deleted file mode 100644 index 22e54d08..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD14.dpk +++ /dev/null @@ -1,88 +0,0 @@ -package cxEditorsD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcl, - vcldb, - vclimg, - dxThemeD14, - cxDataD14, - cxLibraryD14; - -contains - cxBlobEdit, - cxButtonEdit, - cxButtons, - cxCalc, - cxCalendar, - cxCheckBox, - cxCurrencyEdit, - cxDBEdit, - cxDBEditRepository, - cxDBLookupEdit, - cxEdit, - cxEditConsts, - cxEditDataRegisteredRepositoryItems, - cxEditDBRegisteredRepositoryItems, - cxEditRegisteredRepositoryItems, - cxEditUtils, - cxHyperLinkEdit, - cxImage, - cxImageComboBox, - cxLookupDBGrid, - cxLookupEdit, - cxLookupGrid, - cxMaskEdit, - cxNavigator, - cxMemo, - cxMRUEdit, - cxRegExpr, - cxSpinEdit, - cxTimeEdit, - cxDropDownEdit, - cxEditPaintUtils, - cxTextEdit, - cxStandardMask, - cxEditMaskEditor, - cxDBLookupComboBox, - cxRadioGroup, - cxListBox, - cxFilterControl, - cxFilterControlUtils, - cxFilterControlStrs, - cxFilterControlDialog, - cxEditRepositoryItems, - cxDBNavigator, - cxDBFilterControl, - cxPropertiesConverters, - cxGroupBox, - cxInplaceContainer; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD14.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD14.res deleted file mode 100644 index f80c4976..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD14.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD9.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD9.dpk deleted file mode 100644 index 9691d7db..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD9.dpk +++ /dev/null @@ -1,88 +0,0 @@ -package cxEditorsD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcl, - vcldb, - vcljpg, - dxThemeD9, - cxDataD9, - cxLibraryD9; - -contains - cxBlobEdit, - cxButtonEdit, - cxButtons, - cxCalc, - cxCalendar, - cxCheckBox, - cxCurrencyEdit, - cxDBEdit, - cxDBEditRepository, - cxDBLookupEdit, - cxEdit, - cxEditConsts, - cxEditDataRegisteredRepositoryItems, - cxEditDBRegisteredRepositoryItems, - cxEditRegisteredRepositoryItems, - cxEditUtils, - cxHyperLinkEdit, - cxImage, - cxImageComboBox, - cxLookupDBGrid, - cxLookupEdit, - cxLookupGrid, - cxMaskEdit, - cxNavigator, - cxMemo, - cxMRUEdit, - cxRegExpr, - cxSpinEdit, - cxTimeEdit, - cxDropDownEdit, - cxEditPaintUtils, - cxTextEdit, - cxStandardMask, - cxEditMaskEditor, - cxDBLookupComboBox, - cxRadioGroup, - cxListBox, - cxFilterControl, - cxFilterControlUtils, - cxFilterControlStrs, - cxFilterControlDialog, - cxEditRepositoryItems, - cxDBNavigator, - cxDBFilterControl, - cxPropertiesConverters, - cxGroupBox, - cxInplaceContainer; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD9.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD9.res deleted file mode 100644 index aecda170..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsD9.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLC6.bpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLC6.bpk deleted file mode 100644 index 9c6e372e..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLC6.bpk +++ /dev/null @@ -1,219 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = cxEditorsVCLC6.bpl -OBJFILES = cxEditorsVCLC6.obj cxBlobEdit.obj \ - cxButtonEdit.obj cxButtons.obj \ - cxCalc.obj cxCalendar.obj \ - cxCheckBox.obj cxCurrencyEdit.obj \ - cxDBEdit.obj \ - cxDBEditRepository.obj cxDBLookupEdit.obj \ - cxDropDownEdit.obj cxEdit.obj \ - cxEditConsts.obj \ - cxEditDataRegisteredRepositoryItems.obj \ - cxEditDBRegisteredRepositoryItems.obj \ - cxEditPaintUtils.obj cxDBNavigator.obj cxDBFilterControl.obj \ - cxEditRepositoryItems.obj cxEditUtils.obj \ - cxHyperLinkEdit.obj \ - cxImage.obj cxImageComboBox.obj \ - cxLookupDBGrid.obj cxLookupEdit.obj \ - cxLookupGrid.obj cxMaskEdit.obj cxGroupBox.obj \ - cxMemo.obj cxMRUEdit.obj cxDBLookupComboBox.obj \ - cxRegExpr.obj cxSpinEdit.obj \ - cxStandardMask.obj cxTextEdit.obj \ - cxTimeEdit.obj cxEditMaskEditor.obj cxListBox.obj \ - cxEditRegisteredRepositoryItems.obj cxPropertiesConverters.obj \ - cxRadioGroup.obj cxFilterControlDialog.obj cxNavigator.obj \ - cxFilterControl.obj cxFilterControlUtils.obj cxFilterControlStrs.obj \ - cxInplaceContainer.obj -RESFILES = cxEditorsVCLC6.res -MAINSOURCE = cxEditorsVCLC6.cpp -RESDEPEN = $(RESFILES) cxEditMaskEditor.dfm cxFilterControlDialog.dfm cxEdit.res cxScrollCursors.res -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryVCLC6.bpi cxDataC6.bpi dxGDIPlusC6.bpi dxThemeC6.bpi rtl.bpi vcl.bpi vcljpg.bpi \ - dbrtl.bpi vcldb.bpi dxCoreC6.bpi -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib vcljpg.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressEditors Library 5 (VCL Edition) by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLC6.cpp b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLC6.cpp deleted file mode 100644 index 2cc54afc..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLC6.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxEditorsVCLC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("dxGDIPlusC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("vcljpg.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxBlobEdit.pas"); -USEUNIT("cxButtonEdit.pas"); -USEUNIT("cxButtons.pas"); -USEUNIT("cxCalc.pas"); -USEUNIT("cxCalendar.pas"); -USEUNIT("cxCheckBox.pas"); -USEUNIT("cxCurrencyEdit.pas"); -USEUNIT("cxDBEdit.pas"); -USEUNIT("cxDBEditRepository.pas"); -USEUNIT("cxDBLookupEdit.pas"); -USEUNIT("cxDropDownEdit.pas"); -USEUNIT("cxEdit.pas"); -USEUNIT("cxEditConsts.pas"); -USEUNIT("cxEditDataRegisteredRepositoryItems.pas"); -USEUNIT("cxEditDBRegisteredRepositoryItems.pas"); -USEUNIT("cxEditPaintUtils.pas"); -USEUNIT("cxEditRepositoryItems.pas"); -USEUNIT("cxEditUtils.pas"); -USEUNIT("cxHyperLinkEdit.pas"); -USEUNIT("cxImage.pas"); -USEUNIT("cxImageComboBox.pas"); -USEUNIT("cxLookupDBGrid.pas"); -USEUNIT("cxLookupEdit.pas"); -USEUNIT("cxLookupGrid.pas"); -USEUNIT("cxMaskEdit.pas"); -USEUNIT("cxMemo.pas"); -USEUNIT("cxMRUEdit.pas"); -USEUNIT("cxRegExpr.pas"); -USEUNIT("cxSpinEdit.pas"); -USEUNIT("cxStandardMask.pas"); -USEUNIT("cxTextEdit.pas"); -USEUNIT("cxTimeEdit.pas"); -USEUNIT("cxListBox.pas"); -USEUNIT("cxEditRegisteredRepositoryItems.pas"); -USEUNIT("cxDBLookupComboBox.pas"); -USEUNIT("cxRadioGroup.pas"); -USEUNIT("cxFilterControl.pas"); -USEUNIT("cxFilterControlUtils.pas"); -USEUNIT("cxFilterControlStrs.pas"); -USEUNIT("cxNavigator.pas"); -USEUNIT("cxDBNavigator.pas"); -USEUNIT("cxDBFilterControl.pas"); -USEUNIT("cxInplaceContainer.pas"); -USEFORMNS("cxFilterControlDialog.pas", fmfiltercontroldialog, fmFilterControlDialog); -USEFORMNS("cxEditMaskEditor.pas", Cxeditmaskeditor, cxEditMaskEditorDlg); -USEUNIT("cxPropertiesConverters.pas"); -USEUNIT("cxGroupBox.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLC6.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLC6.res deleted file mode 100644 index e9c0754d..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLC6.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD6.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD6.dpk deleted file mode 100644 index c476b0d7..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD6.dpk +++ /dev/null @@ -1,88 +0,0 @@ -package cxEditorsVCLD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 (VCL Edition) by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcl, - vcldb, - vcljpg, - dxThemeD6, - cxDataD6, - cxLibraryVCLD6; - -contains - cxBlobEdit, - cxButtonEdit, - cxButtons, - cxCalc, - cxCalendar, - cxCheckBox, - cxCurrencyEdit, - cxDBEdit, - cxDBEditRepository, - cxDBLookupEdit, - cxEdit, - cxEditConsts, - cxEditDataRegisteredRepositoryItems, - cxEditDBRegisteredRepositoryItems, - cxEditRegisteredRepositoryItems, - cxEditUtils, - cxHyperLinkEdit, - cxImage, - cxImageComboBox, - cxLookupDBGrid, - cxLookupEdit, - cxLookupGrid, - cxMaskEdit, - cxMemo, - cxNavigator, - cxMRUEdit, - cxRegExpr, - cxSpinEdit, - cxTimeEdit, - cxDropDownEdit, - cxEditPaintUtils, - cxTextEdit, - cxStandardMask, - cxEditMaskEditor, - cxDBLookupComboBox, - cxRadioGroup, - cxListBox, - cxFilterControl, - cxFilterControlUtils, - cxFilterControlStrs, - cxFilterControlDialog, - cxEditRepositoryItems, - cxDBNavigator, - cxDBFilterControl, - cxPropertiesConverters, - cxGroupBox, - cxInplaceContainer; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD6.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD6.res deleted file mode 100644 index 78c71bb6..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD6.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD7.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD7.dpk deleted file mode 100644 index 138c3667..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD7.dpk +++ /dev/null @@ -1,88 +0,0 @@ -package cxEditorsVCLD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 (VCL Edition) by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcl, - vcldb, - vcljpg, - dxThemeD7, - cxDataD7, - cxLibraryVCLD7; - -contains - cxBlobEdit, - cxButtonEdit, - cxButtons, - cxCalc, - cxCalendar, - cxCheckBox, - cxCurrencyEdit, - cxDBEdit, - cxDBEditRepository, - cxDBLookupEdit, - cxEdit, - cxEditConsts, - cxEditDataRegisteredRepositoryItems, - cxEditDBRegisteredRepositoryItems, - cxEditRegisteredRepositoryItems, - cxEditUtils, - cxHyperLinkEdit, - cxImage, - cxImageComboBox, - cxLookupDBGrid, - cxLookupEdit, - cxLookupGrid, - cxMaskEdit, - cxNavigator, - cxMemo, - cxMRUEdit, - cxRegExpr, - cxSpinEdit, - cxTimeEdit, - cxDropDownEdit, - cxEditPaintUtils, - cxTextEdit, - cxStandardMask, - cxEditMaskEditor, - cxDBLookupComboBox, - cxRadioGroup, - cxListBox, - cxFilterControl, - cxFilterControlUtils, - cxFilterControlStrs, - cxFilterControlDialog, - cxEditRepositoryItems, - cxDBNavigator, - cxDBFilterControl, - cxPropertiesConverters, - cxGroupBox, - cxInplaceContainer; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD7.res b/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD7.res deleted file mode 100644 index c5473424..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxEditorsVCLD7.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC10.bpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC10.bpk deleted file mode 100644 index ea6c4735..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC10.bpk +++ /dev/null @@ -1,234 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = cxExtEditorsC10.bpl -OBJFILES = cxExtEditorsC10.obj \ - cxCheckComboBox.obj \ - cxCheckListBox.obj \ - cxColorComboBox.obj \ - cxDBCheckComboBox.obj \ - cxDBCheckListBox.obj \ - cxDBColorComboBox.obj \ - cxDBFontNameComboBox.obj \ - cxDBLabel.obj \ - cxDBProgressBar.obj \ - cxDBShellComboBox.obj \ - cxDBTrackBar.obj \ - cxExtEditConsts.obj \ - cxExtEditUtils.obj \ - cxFontNameComboBox.obj \ - cxHeader.obj \ - cxHint.obj \ - cxLabel.obj \ - cxListView.obj \ - cxMCListBox.obj \ - cxProgressBar.obj \ - cxShellComboBox.obj \ - cxShellCommon.obj \ - cxShellControls.obj \ - cxShellListView.obj \ - cxShellTreeView.obj \ - cxSpinButton.obj \ - cxSplitter.obj \ - cxTrackBar.obj \ - cxTreeView.obj \ - cxShellEditRepositoryItems.obj \ - cxExtEditRepositoryItems.obj \ - cxShellDlgs.obj \ - cxShellBrowser.obj \ - cxShellBrowserDialog.obj \ - cxRichEdit.obj \ - cxDBRichEdit.obj \ - cxCheckGroup.obj \ - cxDBCheckGroup.obj -RESFILES = cxExtEditorsC10.res -MAINSOURCE = cxExtEditorsC10.cpp -RESDEPEN = $(RESFILES) cxFontNameComboBox.res cxShellBrowser.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC10.bpi cxDataC10.bpi cxEditorsC10.bpi dxThemeC10.bpi rtl.bpi vcl.bpi vcljpg.bpi \ - dbrtl.bpi vcldb.bpi vclx.bpi dxCoreC10.bpi -SPARELIBS = vcl.lib vcldb.lib vcljpg.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressExtendedEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC10.cpp b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC10.cpp deleted file mode 100644 index d6a1dcba..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC10.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxExtEditorsC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("vcljpg.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxCheckComboBox.pas"); -USEUNIT("cxCheckListBox.pas"); -USEUNIT("cxColorComboBox.pas"); -USEUNIT("cxDBCheckComboBox.pas"); -USEUNIT("cxDBCheckListBox.pas"); -USEUNIT("cxDBColorComboBox.pas"); -USEUNIT("cxDBFontNameComboBox.pas"); -USEUNIT("cxDBLabel.pas"); -USEUNIT("cxDBProgressBar.pas"); -USEUNIT("cxDBShellComboBox.pas"); -USEUNIT("cxDBTrackBar.pas"); -USEUNIT("cxExtEditConsts.pas"); -USEUNIT("cxExtEditUtils.pas"); -USEUNIT("cxFontNameComboBox.pas"); -USEUNIT("cxHeader.pas"); -USEUNIT("cxHint.pas"); -USEUNIT("cxLabel.pas"); -USEUNIT("cxListView.pas"); -USEUNIT("cxMCListBox.pas"); -USEUNIT("cxProgressBar.pas"); -USEUNIT("cxShellComboBox.pas"); -USEUNIT("cxShellCommon.pas"); -USEUNIT("cxShellControls.pas"); -USEUNIT("cxShellListView.pas"); -USEUNIT("cxShellTreeView.pas"); -USEUNIT("cxSpinButton.pas"); -USEUNIT("cxSplitter.pas"); -USEUNIT("cxTrackBar.pas"); -USEUNIT("cxTreeView.pas"); -USEUNIT("cxShellEditRepositoryItems.pas"); -USEUNIT("cxExtEditRepositoryItems.pas"); -USEUNIT("cxShellDlgs.pas"); -USEUNIT("cxRichEdit.pas"); -USEUNIT("cxDBRichEdit.pas"); -USEUNIT("cxCheckGroup.pas"); -USEUNIT("cxDBCheckGroup.pas"); -USEFORMNS("cxShellBrowser.pas", Cxshellbrowser, cxShellBrowserDlg); -USEUNIT("cxShellBrowserDialog.pas"); - -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC10.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC10.res deleted file mode 100644 index eb9009a9..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC10.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC11.bpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC11.bpk deleted file mode 100644 index affaf3fe..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC11.bpk +++ /dev/null @@ -1,234 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = cxExtEditorsC11.bpl -OBJFILES = cxExtEditorsC11.obj \ - cxCheckComboBox.obj \ - cxCheckListBox.obj \ - cxColorComboBox.obj \ - cxDBCheckComboBox.obj \ - cxDBCheckListBox.obj \ - cxDBColorComboBox.obj \ - cxDBFontNameComboBox.obj \ - cxDBLabel.obj \ - cxDBProgressBar.obj \ - cxDBShellComboBox.obj \ - cxDBTrackBar.obj \ - cxExtEditConsts.obj \ - cxExtEditUtils.obj \ - cxFontNameComboBox.obj \ - cxHeader.obj \ - cxHint.obj \ - cxLabel.obj \ - cxListView.obj \ - cxMCListBox.obj \ - cxProgressBar.obj \ - cxShellComboBox.obj \ - cxShellCommon.obj \ - cxShellControls.obj \ - cxShellListView.obj \ - cxShellTreeView.obj \ - cxSpinButton.obj \ - cxSplitter.obj \ - cxTrackBar.obj \ - cxTreeView.obj \ - cxShellEditRepositoryItems.obj \ - cxExtEditRepositoryItems.obj \ - cxShellDlgs.obj \ - cxShellBrowser.obj \ - cxShellBrowserDialog.obj \ - cxRichEdit.obj \ - cxDBRichEdit.obj \ - cxCheckGroup.obj \ - cxDBCheckGroup.obj -RESFILES = cxExtEditorsC11.res -MAINSOURCE = cxExtEditorsC11.cpp -RESDEPEN = $(RESFILES) cxFontNameComboBox.res cxShellBrowser.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC11.bpi cxDataC11.bpi cxEditorsC11.bpi dxThemeC11.bpi rtl.bpi vcl.bpi vcljpg.bpi \ - dbrtl.bpi vcldb.bpi vclx.bpi dxCoreC11.bpi -SPARELIBS = vcl.lib vcldb.lib vcljpg.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressExtendedEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC11.cpp b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC11.cpp deleted file mode 100644 index e39ba51f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC11.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxExtEditorsC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("vcljpg.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxCheckComboBox.pas"); -USEUNIT("cxCheckListBox.pas"); -USEUNIT("cxColorComboBox.pas"); -USEUNIT("cxDBCheckComboBox.pas"); -USEUNIT("cxDBCheckListBox.pas"); -USEUNIT("cxDBColorComboBox.pas"); -USEUNIT("cxDBFontNameComboBox.pas"); -USEUNIT("cxDBLabel.pas"); -USEUNIT("cxDBProgressBar.pas"); -USEUNIT("cxDBShellComboBox.pas"); -USEUNIT("cxDBTrackBar.pas"); -USEUNIT("cxExtEditConsts.pas"); -USEUNIT("cxExtEditUtils.pas"); -USEUNIT("cxFontNameComboBox.pas"); -USEUNIT("cxHeader.pas"); -USEUNIT("cxHint.pas"); -USEUNIT("cxLabel.pas"); -USEUNIT("cxListView.pas"); -USEUNIT("cxMCListBox.pas"); -USEUNIT("cxProgressBar.pas"); -USEUNIT("cxShellComboBox.pas"); -USEUNIT("cxShellCommon.pas"); -USEUNIT("cxShellControls.pas"); -USEUNIT("cxShellListView.pas"); -USEUNIT("cxShellTreeView.pas"); -USEUNIT("cxSpinButton.pas"); -USEUNIT("cxSplitter.pas"); -USEUNIT("cxTrackBar.pas"); -USEUNIT("cxTreeView.pas"); -USEUNIT("cxShellEditRepositoryItems.pas"); -USEUNIT("cxExtEditRepositoryItems.pas"); -USEUNIT("cxShellDlgs.pas"); -USEUNIT("cxRichEdit.pas"); -USEUNIT("cxDBRichEdit.pas"); -USEUNIT("cxCheckGroup.pas"); -USEUNIT("cxDBCheckGroup.pas"); -USEFORMNS("cxShellBrowser.pas", Cxshellbrowser, cxShellBrowserDlg); -USEUNIT("cxShellBrowserDialog.pas"); - -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC11.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC11.res deleted file mode 100644 index 1b056fb8..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC11.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC12.bpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC12.bpk deleted file mode 100644 index a0324b91..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC12.bpk +++ /dev/null @@ -1,234 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = cxExtEditorsC12.bpl -OBJFILES = cxExtEditorsC12.obj \ - cxCheckComboBox.obj \ - cxCheckListBox.obj \ - cxColorComboBox.obj \ - cxDBCheckComboBox.obj \ - cxDBCheckListBox.obj \ - cxDBColorComboBox.obj \ - cxDBFontNameComboBox.obj \ - cxDBLabel.obj \ - cxDBProgressBar.obj \ - cxDBShellComboBox.obj \ - cxDBTrackBar.obj \ - cxExtEditConsts.obj \ - cxExtEditUtils.obj \ - cxFontNameComboBox.obj \ - cxHeader.obj \ - cxHint.obj \ - cxLabel.obj \ - cxListView.obj \ - cxMCListBox.obj \ - cxProgressBar.obj \ - cxShellComboBox.obj \ - cxShellCommon.obj \ - cxShellControls.obj \ - cxShellListView.obj \ - cxShellTreeView.obj \ - cxSpinButton.obj \ - cxSplitter.obj \ - cxTrackBar.obj \ - cxTreeView.obj \ - cxShellEditRepositoryItems.obj \ - cxExtEditRepositoryItems.obj \ - cxShellDlgs.obj \ - cxShellBrowser.obj \ - cxShellBrowserDialog.obj \ - cxRichEdit.obj \ - cxDBRichEdit.obj \ - cxCheckGroup.obj \ - cxDBCheckGroup.obj -RESFILES = cxExtEditorsC12.res -MAINSOURCE = cxExtEditorsC12.cpp -RESDEPEN = $(RESFILES) cxFontNameComboBox.res cxShellBrowser.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC12.bpi cxDataC12.bpi cxEditorsC12.bpi dxThemeC12.bpi rtl.bpi vcl.bpi vclimg.bpi \ - dbrtl.bpi vcldb.bpi vclx.bpi dxCoreC12.bpi -SPARELIBS = vcl.lib vcldb.lib vclimg.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressExtendedEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC12.cpp b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC12.cpp deleted file mode 100644 index c3471fc6..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC12.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxExtEditorsC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("vclimg.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxCheckComboBox.pas"); -USEUNIT("cxCheckListBox.pas"); -USEUNIT("cxColorComboBox.pas"); -USEUNIT("cxDBCheckComboBox.pas"); -USEUNIT("cxDBCheckListBox.pas"); -USEUNIT("cxDBColorComboBox.pas"); -USEUNIT("cxDBFontNameComboBox.pas"); -USEUNIT("cxDBLabel.pas"); -USEUNIT("cxDBProgressBar.pas"); -USEUNIT("cxDBShellComboBox.pas"); -USEUNIT("cxDBTrackBar.pas"); -USEUNIT("cxExtEditConsts.pas"); -USEUNIT("cxExtEditUtils.pas"); -USEUNIT("cxFontNameComboBox.pas"); -USEUNIT("cxHeader.pas"); -USEUNIT("cxHint.pas"); -USEUNIT("cxLabel.pas"); -USEUNIT("cxListView.pas"); -USEUNIT("cxMCListBox.pas"); -USEUNIT("cxProgressBar.pas"); -USEUNIT("cxShellComboBox.pas"); -USEUNIT("cxShellCommon.pas"); -USEUNIT("cxShellControls.pas"); -USEUNIT("cxShellListView.pas"); -USEUNIT("cxShellTreeView.pas"); -USEUNIT("cxSpinButton.pas"); -USEUNIT("cxSplitter.pas"); -USEUNIT("cxTrackBar.pas"); -USEUNIT("cxTreeView.pas"); -USEUNIT("cxShellEditRepositoryItems.pas"); -USEUNIT("cxExtEditRepositoryItems.pas"); -USEUNIT("cxShellDlgs.pas"); -USEUNIT("cxRichEdit.pas"); -USEUNIT("cxDBRichEdit.pas"); -USEUNIT("cxCheckGroup.pas"); -USEUNIT("cxDBCheckGroup.pas"); -USEFORMNS("cxShellBrowser.pas", Cxshellbrowser, cxShellBrowserDlg); -USEUNIT("cxShellBrowserDialog.pas"); - -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC12.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC12.res deleted file mode 100644 index 21933330..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC12.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC14.bpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC14.bpk deleted file mode 100644 index 1c41db9e..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC14.bpk +++ /dev/null @@ -1,234 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = cxExtEditorsC14.bpl -OBJFILES = cxExtEditorsC14.obj \ - cxCheckComboBox.obj \ - cxCheckListBox.obj \ - cxColorComboBox.obj \ - cxDBCheckComboBox.obj \ - cxDBCheckListBox.obj \ - cxDBColorComboBox.obj \ - cxDBFontNameComboBox.obj \ - cxDBLabel.obj \ - cxDBProgressBar.obj \ - cxDBShellComboBox.obj \ - cxDBTrackBar.obj \ - cxExtEditConsts.obj \ - cxExtEditUtils.obj \ - cxFontNameComboBox.obj \ - cxHeader.obj \ - cxHint.obj \ - cxLabel.obj \ - cxListView.obj \ - cxMCListBox.obj \ - cxProgressBar.obj \ - cxShellComboBox.obj \ - cxShellCommon.obj \ - cxShellControls.obj \ - cxShellListView.obj \ - cxShellTreeView.obj \ - cxSpinButton.obj \ - cxSplitter.obj \ - cxTrackBar.obj \ - cxTreeView.obj \ - cxShellEditRepositoryItems.obj \ - cxExtEditRepositoryItems.obj \ - cxShellDlgs.obj \ - cxShellBrowser.obj \ - cxShellBrowserDialog.obj \ - cxRichEdit.obj \ - cxDBRichEdit.obj \ - cxCheckGroup.obj \ - cxDBCheckGroup.obj -RESFILES = cxExtEditorsC14.res -MAINSOURCE = cxExtEditorsC14.cpp -RESDEPEN = $(RESFILES) cxFontNameComboBox.res cxShellBrowser.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC14.bpi cxDataC14.bpi cxEditorsC14.bpi dxThemeC14.bpi rtl.bpi vcl.bpi vclimg.bpi \ - dbrtl.bpi vcldb.bpi vclx.bpi dxCoreC14.bpi -SPARELIBS = vcl.lib vcldb.lib vclimg.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressExtendedEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC14.cpp b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC14.cpp deleted file mode 100644 index 06ebec50..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC14.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxExtEditorsC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("vclimg.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxCheckComboBox.pas"); -USEUNIT("cxCheckListBox.pas"); -USEUNIT("cxColorComboBox.pas"); -USEUNIT("cxDBCheckComboBox.pas"); -USEUNIT("cxDBCheckListBox.pas"); -USEUNIT("cxDBColorComboBox.pas"); -USEUNIT("cxDBFontNameComboBox.pas"); -USEUNIT("cxDBLabel.pas"); -USEUNIT("cxDBProgressBar.pas"); -USEUNIT("cxDBShellComboBox.pas"); -USEUNIT("cxDBTrackBar.pas"); -USEUNIT("cxExtEditConsts.pas"); -USEUNIT("cxExtEditUtils.pas"); -USEUNIT("cxFontNameComboBox.pas"); -USEUNIT("cxHeader.pas"); -USEUNIT("cxHint.pas"); -USEUNIT("cxLabel.pas"); -USEUNIT("cxListView.pas"); -USEUNIT("cxMCListBox.pas"); -USEUNIT("cxProgressBar.pas"); -USEUNIT("cxShellComboBox.pas"); -USEUNIT("cxShellCommon.pas"); -USEUNIT("cxShellControls.pas"); -USEUNIT("cxShellListView.pas"); -USEUNIT("cxShellTreeView.pas"); -USEUNIT("cxSpinButton.pas"); -USEUNIT("cxSplitter.pas"); -USEUNIT("cxTrackBar.pas"); -USEUNIT("cxTreeView.pas"); -USEUNIT("cxShellEditRepositoryItems.pas"); -USEUNIT("cxExtEditRepositoryItems.pas"); -USEUNIT("cxShellDlgs.pas"); -USEUNIT("cxRichEdit.pas"); -USEUNIT("cxDBRichEdit.pas"); -USEUNIT("cxCheckGroup.pas"); -USEUNIT("cxDBCheckGroup.pas"); -USEFORMNS("cxShellBrowser.pas", Cxshellbrowser, cxShellBrowserDlg); -USEUNIT("cxShellBrowserDialog.pas"); - -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC14.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC14.res deleted file mode 100644 index 5232ea15..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsC14.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD10.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD10.dpk deleted file mode 100644 index 1a7993a0..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD10.dpk +++ /dev/null @@ -1,81 +0,0 @@ -package cxExtEditorsD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcljpg, - vcldb, - cxLibraryD10, - dxThemeD10, - cxEditorsD10, - cxDataD10; - -contains - cxCheckListBox, - cxProgressBar, - cxLabel, - cxTrackBar, - cxFontNameComboBox, - cxColorComboBox, - cxExtEditUtils, - cxCheckComboBox, - cxTreeView, - cxSplitter, - cxDBColorComboBox, - cxDBProgressBar, - cxDBLabel, - cxDBTrackBar, - cxHint, - cxMCListBox, - cxListView, - cxHeader, - cxDBCheckListBox, - cxDBCheckComboBox, - cxExtEditConsts, - cxSpinButton, - cxDBFontNameComboBox, - cxShellComboBox, - cxShellCommon, - cxShellControls, - cxShellListView, - cxShellTreeView, - cxDBShellComboBox, - cxShellBrowser, - cxShellBrowserDialog, - cxShellDlgs, - cxExtEditRepositoryItems, - cxShellEditRepositoryItems, - cxCheckGroup, - cxDBCheckGroup, - cxRichEdit, - cxDBRichEdit; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD10.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD10.res deleted file mode 100644 index 04ca46d1..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD10.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD11.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD11.dpk deleted file mode 100644 index 61dc0063..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD11.dpk +++ /dev/null @@ -1,81 +0,0 @@ -package cxExtEditorsD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcljpg, - vcldb, - cxLibraryD11, - dxThemeD11, - cxEditorsD11, - cxDataD11; - -contains - cxCheckListBox, - cxProgressBar, - cxLabel, - cxTrackBar, - cxFontNameComboBox, - cxColorComboBox, - cxExtEditUtils, - cxCheckComboBox, - cxTreeView, - cxSplitter, - cxDBColorComboBox, - cxDBProgressBar, - cxDBLabel, - cxDBTrackBar, - cxHint, - cxMCListBox, - cxListView, - cxHeader, - cxDBCheckListBox, - cxDBCheckComboBox, - cxExtEditConsts, - cxSpinButton, - cxDBFontNameComboBox, - cxShellComboBox, - cxShellCommon, - cxShellControls, - cxShellListView, - cxShellTreeView, - cxDBShellComboBox, - cxShellBrowser, - cxShellBrowserDialog, - cxShellDlgs, - cxExtEditRepositoryItems, - cxShellEditRepositoryItems, - cxCheckGroup, - cxDBCheckGroup, - cxRichEdit, - cxDBRichEdit; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD11.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD11.res deleted file mode 100644 index 903f5ec9..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD11.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD12.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD12.dpk deleted file mode 100644 index acd748c7..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD12.dpk +++ /dev/null @@ -1,80 +0,0 @@ -package cxExtEditorsD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcldb, - cxLibraryD12, - dxThemeD12, - cxEditorsD12, - cxDataD12; - -contains - cxCheckListBox, - cxProgressBar, - cxLabel, - cxTrackBar, - cxFontNameComboBox, - cxColorComboBox, - cxExtEditUtils, - cxCheckComboBox, - cxTreeView, - cxSplitter, - cxDBColorComboBox, - cxDBProgressBar, - cxDBLabel, - cxDBTrackBar, - cxHint, - cxMCListBox, - cxListView, - cxHeader, - cxDBCheckListBox, - cxDBCheckComboBox, - cxExtEditConsts, - cxSpinButton, - cxDBFontNameComboBox, - cxShellComboBox, - cxShellCommon, - cxShellControls, - cxShellListView, - cxShellTreeView, - cxDBShellComboBox, - cxShellBrowser, - cxShellBrowserDialog, - cxShellDlgs, - cxExtEditRepositoryItems, - cxShellEditRepositoryItems, - cxCheckGroup, - cxDBCheckGroup, - cxRichEdit, - cxDBRichEdit; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD12.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD12.res deleted file mode 100644 index 84dafb63..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD12.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD14.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD14.dpk deleted file mode 100644 index eaf9e884..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD14.dpk +++ /dev/null @@ -1,80 +0,0 @@ -package cxExtEditorsD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcldb, - cxLibraryD14, - dxThemeD14, - cxEditorsD14, - cxDataD14; - -contains - cxCheckListBox, - cxProgressBar, - cxLabel, - cxTrackBar, - cxFontNameComboBox, - cxColorComboBox, - cxExtEditUtils, - cxCheckComboBox, - cxTreeView, - cxSplitter, - cxDBColorComboBox, - cxDBProgressBar, - cxDBLabel, - cxDBTrackBar, - cxHint, - cxMCListBox, - cxListView, - cxHeader, - cxDBCheckListBox, - cxDBCheckComboBox, - cxExtEditConsts, - cxSpinButton, - cxDBFontNameComboBox, - cxShellComboBox, - cxShellCommon, - cxShellControls, - cxShellListView, - cxShellTreeView, - cxDBShellComboBox, - cxShellBrowser, - cxShellBrowserDialog, - cxShellDlgs, - cxExtEditRepositoryItems, - cxShellEditRepositoryItems, - cxCheckGroup, - cxDBCheckGroup, - cxRichEdit, - cxDBRichEdit; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD14.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD14.res deleted file mode 100644 index e425fc1d..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD14.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD9.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD9.dpk deleted file mode 100644 index 7d638e43..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD9.dpk +++ /dev/null @@ -1,81 +0,0 @@ -package cxExtEditorsD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcljpg, - vcldb, - cxLibraryD9, - dxThemeD9, - cxEditorsD9, - cxDataD9; - -contains - cxCheckListBox, - cxProgressBar, - cxLabel, - cxTrackBar, - cxFontNameComboBox, - cxColorComboBox, - cxExtEditUtils, - cxCheckComboBox, - cxTreeView, - cxSplitter, - cxDBColorComboBox, - cxDBProgressBar, - cxDBLabel, - cxDBTrackBar, - cxHint, - cxMCListBox, - cxListView, - cxHeader, - cxDBCheckListBox, - cxDBCheckComboBox, - cxExtEditConsts, - cxSpinButton, - cxDBFontNameComboBox, - cxShellComboBox, - cxShellCommon, - cxShellControls, - cxShellListView, - cxShellTreeView, - cxDBShellComboBox, - cxShellBrowser, - cxShellBrowserDialog, - cxShellDlgs, - cxExtEditRepositoryItems, - cxShellEditRepositoryItems, - cxCheckGroup, - cxDBCheckGroup, - cxRichEdit, - cxDBRichEdit; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD9.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD9.res deleted file mode 100644 index 68029366..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsD9.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLC6.bpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLC6.bpk deleted file mode 100644 index 5847e4fe..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLC6.bpk +++ /dev/null @@ -1,234 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = cxExtEditorsVCLC6.bpl -OBJFILES = cxExtEditorsVCLC6.obj \ - cxCheckComboBox.obj \ - cxCheckListBox.obj \ - cxColorComboBox.obj \ - cxDBCheckComboBox.obj \ - cxDBCheckListBox.obj \ - cxDBColorComboBox.obj \ - cxDBFontNameComboBox.obj \ - cxDBLabel.obj \ - cxDBProgressBar.obj \ - cxDBShellComboBox.obj \ - cxDBTrackBar.obj \ - cxExtEditConsts.obj \ - cxExtEditUtils.obj \ - cxFontNameComboBox.obj \ - cxHeader.obj \ - cxHint.obj \ - cxLabel.obj \ - cxListView.obj \ - cxMCListBox.obj \ - cxProgressBar.obj \ - cxShellComboBox.obj \ - cxShellCommon.obj \ - cxShellControls.obj \ - cxShellListView.obj \ - cxShellTreeView.obj \ - cxSpinButton.obj \ - cxSplitter.obj \ - cxTrackBar.obj \ - cxTreeView.obj \ - cxShellEditRepositoryItems.obj \ - cxExtEditRepositoryItems.obj \ - cxShellDlgs.obj \ - cxShellBrowser.obj \ - cxShellBrowserDialog.obj \ - cxRichEdit.obj \ - cxDBRichEdit.obj \ - cxCheckGroup.obj \ - cxDBCheckGroup.obj -RESFILES = cxExtEditorsVCLC6.res -MAINSOURCE = cxExtEditorsVCLC6.cpp -RESDEPEN = $(RESFILES) cxFontNameComboBox.res cxShellBrowser.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryVCLC6.bpi cxDataC6.bpi cxEditorsVCLC6.bpi dxThemeC6.bpi rtl.bpi vcl.bpi vcljpg.bpi \ - dbrtl.bpi vcldb.bpi vclx.bpi dxCoreC6.bpi -SPARELIBS = vcl.lib vcldb.lib vcljpg.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressExtendedEditors Library 5 (VCL Edition) by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLC6.cpp b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLC6.cpp deleted file mode 100644 index 4c46c3c4..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLC6.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxExtEditorsVCLC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("vcljpg.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEUNIT("cxCheckComboBox.pas"); -USEUNIT("cxCheckListBox.pas"); -USEUNIT("cxColorComboBox.pas"); -USEUNIT("cxDBCheckComboBox.pas"); -USEUNIT("cxDBCheckListBox.pas"); -USEUNIT("cxDBColorComboBox.pas"); -USEUNIT("cxDBFontNameComboBox.pas"); -USEUNIT("cxDBLabel.pas"); -USEUNIT("cxDBProgressBar.pas"); -USEUNIT("cxDBShellComboBox.pas"); -USEUNIT("cxDBTrackBar.pas"); -USEUNIT("cxExtEditConsts.pas"); -USEUNIT("cxExtEditUtils.pas"); -USEUNIT("cxFontNameComboBox.pas"); -USEUNIT("cxHeader.pas"); -USEUNIT("cxHint.pas"); -USEUNIT("cxLabel.pas"); -USEUNIT("cxListView.pas"); -USEUNIT("cxMCListBox.pas"); -USEUNIT("cxProgressBar.pas"); -USEUNIT("cxShellComboBox.pas"); -USEUNIT("cxShellCommon.pas"); -USEUNIT("cxShellControls.pas"); -USEUNIT("cxShellListView.pas"); -USEUNIT("cxShellTreeView.pas"); -USEUNIT("cxSpinButton.pas"); -USEUNIT("cxSplitter.pas"); -USEUNIT("cxTrackBar.pas"); -USEUNIT("cxTreeView.pas"); -USEUNIT("cxShellEditRepositoryItems.pas"); -USEUNIT("cxExtEditRepositoryItems.pas"); -USEUNIT("cxShellDlgs.pas"); -USEUNIT("cxRichEdit.pas"); -USEUNIT("cxDBRichEdit.pas"); -USEUNIT("cxCheckGroup.pas"); -USEUNIT("cxDBCheckGroup.pas"); -USEFORMNS("cxShellBrowser.pas", Cxshellbrowser, cxShellBrowserDlg); -USEUNIT("cxShellBrowserDialog.pas"); - -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLC6.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLC6.res deleted file mode 100644 index fcfe84e4..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLC6.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD6.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD6.dpk deleted file mode 100644 index 838b1f7d..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD6.dpk +++ /dev/null @@ -1,81 +0,0 @@ -package cxExtEditorsVCLD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 (VCL Edition) by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcljpg, - vcldb, - cxLibraryVCLD6, - dxThemeD6, - cxEditorsVCLD6, - cxDataD6; - -contains - cxCheckListBox, - cxProgressBar, - cxLabel, - cxTrackBar, - cxFontNameComboBox, - cxColorComboBox, - cxExtEditUtils, - cxCheckComboBox, - cxTreeView, - cxSplitter, - cxDBColorComboBox, - cxDBProgressBar, - cxDBLabel, - cxDBTrackBar, - cxHint, - cxMCListBox, - cxListView, - cxHeader, - cxDBCheckListBox, - cxDBCheckComboBox, - cxExtEditConsts, - cxSpinButton, - cxDBFontNameComboBox, - cxShellComboBox, - cxShellCommon, - cxShellControls, - cxShellListView, - cxShellTreeView, - cxDBShellComboBox, - cxShellBrowser, - cxShellBrowserDialog, - cxShellDlgs, - cxExtEditRepositoryItems, - cxShellEditRepositoryItems, - cxRichEdit, - cxDBRichEdit, - cxCheckGroup, - cxDBCheckGroup; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD6.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD6.res deleted file mode 100644 index f6ced0a5..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD6.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD7.dpk b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD7.dpk deleted file mode 100644 index 19b67093..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD7.dpk +++ /dev/null @@ -1,81 +0,0 @@ -package cxExtEditorsVCLD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 (VCL Edition) by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcljpg, - vcldb, - cxLibraryVCLD7, - dxThemeD7, - cxEditorsVCLD7, - cxDataD7; - -contains - cxCheckListBox, - cxProgressBar, - cxLabel, - cxTrackBar, - cxFontNameComboBox, - cxColorComboBox, - cxExtEditUtils, - cxCheckComboBox, - cxTreeView, - cxSplitter, - cxDBColorComboBox, - cxDBProgressBar, - cxDBLabel, - cxDBTrackBar, - cxHint, - cxMCListBox, - cxListView, - cxHeader, - cxDBCheckListBox, - cxDBCheckComboBox, - cxExtEditConsts, - cxSpinButton, - cxDBFontNameComboBox, - cxShellComboBox, - cxShellCommon, - cxShellControls, - cxShellListView, - cxShellTreeView, - cxDBShellComboBox, - cxShellBrowser, - cxShellBrowserDialog, - cxShellDlgs, - cxExtEditRepositoryItems, - cxShellEditRepositoryItems, - cxCheckGroup, - cxDBCheckGroup, - cxRichEdit, - cxDBRichEdit; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD7.res b/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD7.res deleted file mode 100644 index e5172a0f..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/cxExtEditorsVCLD7.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC10.bpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC10.bpk deleted file mode 100644 index e6730b2f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC10.bpk +++ /dev/null @@ -1,205 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxEditorsC10.bpl -OBJFILES = dclcxEditorsC10.obj \ - cxEditPropEditors.obj cxEditReg.obj \ - cxMaskEditTextEditor.obj \ - cxSelectEditRepositoryItem.obj \ - cxEditRepositoryEditor.obj cxFilterControlReg.obj \ - cxInplaceContainerReg.obj -RESFILES = dclcxEditorsC10.res cxEditReg.dcr cxFilterControlReg.dcr -MAINSOURCE = dclcxEditorsC10.cpp -RESDEPEN = $(RESFILES) cxEditMaskEditor.dfm \ - cxMaskEditTextEditor.dfm \ - cxSelectEditRepositoryItem.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dclcxLibraryC10.bpi cxEditorsC10.bpi dxThemeC10.bpi \ - cxLibraryC10.bpi cxDataC10.bpi rtl.bpi vcl.bpi dbrtl.bpi \ - vcldb.bpi vclx.bpi dxCoreC10.bpi dcldxCoreC10.bpi -SPARELIBS = rtl.lib vcl.lib CXLIBRARYC10.lib cxEditorsC10.lib \ - dclcxLibraryC10.lib dxCoreC10.lib dcldxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC10.cpp b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC10.cpp deleted file mode 100644 index 630336ee..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC10.cpp +++ /dev/null @@ -1,40 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxEditorsC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dcldxCoreC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEUNIT("cxEditPropEditors.pas"); -USEUNIT("cxEditReg.pas"); -USERES("cxEditReg.dcr"); -USEFORMNS("cxMaskEditTextEditor.pas", Cxmaskedittexteditor, cxMaskEditTextEditorDlg); -USEFORMNS("cxSelectEditRepositoryItem.pas", Cxselecteditrepositoryitem, cxSelectRepositoryItem); -USEUNIT("cxEditRepositoryEditor.pas"); -USEUNIT("cxFilterControlReg.pas"); -USEUNIT("cxInplaceContainerReg.pas"); -USERES("cxFilterControlReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC10.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC10.res deleted file mode 100644 index 5b623f9d..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC10.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC11.bpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC11.bpk deleted file mode 100644 index 4ae77124..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC11.bpk +++ /dev/null @@ -1,205 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxEditorsC11.bpl -OBJFILES = dclcxEditorsC11.obj \ - cxEditPropEditors.obj cxEditReg.obj \ - cxMaskEditTextEditor.obj \ - cxSelectEditRepositoryItem.obj \ - cxEditRepositoryEditor.obj cxFilterControlReg.obj \ - cxInplaceContainerReg.obj -RESFILES = dclcxEditorsC11.res cxEditReg.dcr cxFilterControlReg.dcr -MAINSOURCE = dclcxEditorsC11.cpp -RESDEPEN = $(RESFILES) cxEditMaskEditor.dfm \ - cxMaskEditTextEditor.dfm \ - cxSelectEditRepositoryItem.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dclcxLibraryC11.bpi cxEditorsC11.bpi dxThemeC11.bpi \ - cxLibraryC11.bpi cxDataC11.bpi rtl.bpi vcl.bpi dbrtl.bpi \ - vcldb.bpi vclx.bpi dxCoreC11.bpi dcldxCoreC11.bpi -SPARELIBS = rtl.lib vcl.lib CXLIBRARYC11.lib cxEditorsC11.lib \ - dclcxLibraryC11.lib dxCoreC11.lib dcldxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC11.cpp b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC11.cpp deleted file mode 100644 index 4fd516a3..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC11.cpp +++ /dev/null @@ -1,40 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxEditorsC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dcldxCoreC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEUNIT("cxEditPropEditors.pas"); -USEUNIT("cxEditReg.pas"); -USERES("cxEditReg.dcr"); -USEFORMNS("cxMaskEditTextEditor.pas", Cxmaskedittexteditor, cxMaskEditTextEditorDlg); -USEFORMNS("cxSelectEditRepositoryItem.pas", Cxselecteditrepositoryitem, cxSelectRepositoryItem); -USEUNIT("cxEditRepositoryEditor.pas"); -USEUNIT("cxFilterControlReg.pas"); -USEUNIT("cxInplaceContainerReg.pas"); -USERES("cxFilterControlReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC11.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC11.res deleted file mode 100644 index 9417a06c..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC11.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC12.bpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC12.bpk deleted file mode 100644 index 909123d8..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC12.bpk +++ /dev/null @@ -1,205 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxEditorsC12.bpl -OBJFILES = dclcxEditorsC12.obj \ - cxEditPropEditors.obj cxEditReg.obj \ - cxMaskEditTextEditor.obj \ - cxSelectEditRepositoryItem.obj \ - cxEditRepositoryEditor.obj cxFilterControlReg.obj \ - cxInplaceContainerReg.obj -RESFILES = dclcxEditorsC12.res cxEditReg.dcr cxFilterControlReg.dcr -MAINSOURCE = dclcxEditorsC12.cpp -RESDEPEN = $(RESFILES) cxEditMaskEditor.dfm \ - cxMaskEditTextEditor.dfm \ - cxSelectEditRepositoryItem.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dclcxLibraryC12.bpi cxEditorsC12.bpi dxThemeC12.bpi \ - cxLibraryC12.bpi cxDataC12.bpi rtl.bpi vcl.bpi dbrtl.bpi \ - vcldb.bpi vclx.bpi dxCoreC12.bpi dcldxCoreC12.bpi -SPARELIBS = rtl.lib vcl.lib CXLIBRARYC12.lib cxEditorsC12.lib \ - dclcxLibraryC12.lib dxCoreC12.lib dcldxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC12.cpp b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC12.cpp deleted file mode 100644 index 27d3211a..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC12.cpp +++ /dev/null @@ -1,40 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxEditorsC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dcldxCoreC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEUNIT("cxEditPropEditors.pas"); -USEUNIT("cxEditReg.pas"); -USERES("cxEditReg.dcr"); -USEFORMNS("cxMaskEditTextEditor.pas", Cxmaskedittexteditor, cxMaskEditTextEditorDlg); -USEFORMNS("cxSelectEditRepositoryItem.pas", Cxselecteditrepositoryitem, cxSelectRepositoryItem); -USEUNIT("cxEditRepositoryEditor.pas"); -USEUNIT("cxFilterControlReg.pas"); -USEUNIT("cxInplaceContainerReg.pas"); -USERES("cxFilterControlReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC12.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC12.res deleted file mode 100644 index 7ec5235e..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC12.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC14.bpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC14.bpk deleted file mode 100644 index 6154aa8d..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC14.bpk +++ /dev/null @@ -1,205 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxEditorsC14.bpl -OBJFILES = dclcxEditorsC14.obj \ - cxEditPropEditors.obj cxEditReg.obj \ - cxMaskEditTextEditor.obj \ - cxSelectEditRepositoryItem.obj \ - cxEditRepositoryEditor.obj cxFilterControlReg.obj \ - cxInplaceContainerReg.obj -RESFILES = dclcxEditorsC14.res cxEditReg.dcr cxFilterControlReg.dcr -MAINSOURCE = dclcxEditorsC14.cpp -RESDEPEN = $(RESFILES) cxEditMaskEditor.dfm \ - cxMaskEditTextEditor.dfm \ - cxSelectEditRepositoryItem.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dclcxLibraryC14.bpi cxEditorsC14.bpi dxThemeC14.bpi \ - cxLibraryC14.bpi cxDataC14.bpi rtl.bpi vcl.bpi dbrtl.bpi \ - vcldb.bpi vclx.bpi dxCoreC14.bpi dcldxCoreC14.bpi -SPARELIBS = rtl.lib vcl.lib CXLIBRARYC14.lib cxEditorsC14.lib \ - dclcxLibraryC14.lib dxCoreC14.lib dcldxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC14.cpp b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC14.cpp deleted file mode 100644 index ea261729..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC14.cpp +++ /dev/null @@ -1,40 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxEditorsC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dcldxCoreC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEUNIT("cxEditPropEditors.pas"); -USEUNIT("cxEditReg.pas"); -USERES("cxEditReg.dcr"); -USEFORMNS("cxMaskEditTextEditor.pas", Cxmaskedittexteditor, cxMaskEditTextEditorDlg); -USEFORMNS("cxSelectEditRepositoryItem.pas", Cxselecteditrepositoryitem, cxSelectRepositoryItem); -USEUNIT("cxEditRepositoryEditor.pas"); -USEUNIT("cxFilterControlReg.pas"); -USEUNIT("cxInplaceContainerReg.pas"); -USERES("cxFilterControlReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC14.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC14.res deleted file mode 100644 index c4430e81..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsC14.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD10.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD10.dpk deleted file mode 100644 index 0b4b0c99..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD10.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dclcxEditorsD10; - -{$R *.res} -{$R cxEditReg.dcr} -{$R cxFilterControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vcldb, - cxEditorsD10, - designide, - dcldb, - dclcxLibraryD10; - -contains - cxEditReg, - cxEditRepositoryEditor, - cxMaskEditTextEditor, - cxSelectEditRepositoryItem, - cxFilterControlReg, - cxEditPropEditors, - cxInplaceContainerReg; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD10.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD10.res deleted file mode 100644 index 8f248828..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD10.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD11.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD11.dpk deleted file mode 100644 index 75ab1c4b..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD11.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dclcxEditorsD11; - -{$R *.res} -{$R cxEditReg.dcr} -{$R cxFilterControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vcldb, - cxEditorsD11, - designide, - dcldb, - dclcxLibraryD11; - -contains - cxEditReg, - cxEditRepositoryEditor, - cxMaskEditTextEditor, - cxSelectEditRepositoryItem, - cxFilterControlReg, - cxEditPropEditors, - cxInplaceContainerReg; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD11.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD11.res deleted file mode 100644 index 8e277b6b..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD11.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD12.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD12.dpk deleted file mode 100644 index c278a71d..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD12.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dclcxEditorsD12; - -{$R *.res} -{$R cxEditReg.dcr} -{$R cxFilterControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vcldb, - cxEditorsD12, - designide, - dcldb, - dclcxLibraryD12; - -contains - cxEditReg, - cxEditRepositoryEditor, - cxMaskEditTextEditor, - cxSelectEditRepositoryItem, - cxFilterControlReg, - cxEditPropEditors, - cxInplaceContainerReg; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD12.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD12.res deleted file mode 100644 index 72258046..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD12.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD14.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD14.dpk deleted file mode 100644 index c9fc3aa0..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD14.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dclcxEditorsD14; - -{$R *.res} -{$R cxEditReg.dcr} -{$R cxFilterControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vcldb, - cxEditorsD14, - designide, - dcldb, - dclcxLibraryD14; - -contains - cxEditReg, - cxEditRepositoryEditor, - cxMaskEditTextEditor, - cxSelectEditRepositoryItem, - cxFilterControlReg, - cxEditPropEditors, - cxInplaceContainerReg; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD14.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD14.res deleted file mode 100644 index 45022ccb..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD14.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD9.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD9.dpk deleted file mode 100644 index 2d025b34..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD9.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dclcxEditorsD9; - -{$R *.res} -{$R cxEditReg.dcr} -{$R cxFilterControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vcldb, - cxEditorsD9, - designide, - dcldb, - dclcxLibraryD9; - -contains - cxEditReg, - cxEditRepositoryEditor, - cxMaskEditTextEditor, - cxSelectEditRepositoryItem, - cxFilterControlReg, - cxEditPropEditors, - cxInplaceContainerReg; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD9.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD9.res deleted file mode 100644 index d861f4a4..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsD9.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLC6.bpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLC6.bpk deleted file mode 100644 index afd21132..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLC6.bpk +++ /dev/null @@ -1,205 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxEditorsVCLC6.bpl -OBJFILES = dclcxEditorsVCLC6.obj \ - cxEditPropEditors.obj cxEditReg.obj \ - cxMaskEditTextEditor.obj \ - cxSelectEditRepositoryItem.obj \ - cxEditRepositoryEditor.obj cxFilterControlReg.obj \ - cxInplaceContainerReg.obj -RESFILES = dclcxEditorsVCLC6.res cxEditReg.dcr cxFilterControlReg.dcr -MAINSOURCE = dclcxEditorsVCLC6.cpp -RESDEPEN = $(RESFILES) cxEditMaskEditor.dfm \ - cxMaskEditTextEditor.dfm \ - cxSelectEditRepositoryItem.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dclcxLibraryVCLC6.bpi cxEditorsVCLC6.bpi dxThemeC6.bpi \ - cxLibraryVCLC6.bpi cxDataC6.bpi rtl.bpi vcl.bpi dcldb.bpi dbrtl.bpi \ - vcldb.bpi vclx.bpi dxCoreC6.bpi dcldxCoreC6.bpi -SPARELIBS = rtl.lib vcl.lib CXLIBRARYVCLC6.lib cxEditorsVCLC6.lib dcldb.lib \ - dclcxLibraryVCLC6.lib dxCoreC6.lib dcldxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressEditors Library 5 (VCL Edition) by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLC6.cpp b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLC6.cpp deleted file mode 100644 index 707333d8..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLC6.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxEditorsVCLC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dcldxCoreC6.bpi"); -USEPACKAGE("dcldb.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEUNIT("cxEditPropEditors.pas"); -USEUNIT("cxEditReg.pas"); -USERES("cxEditReg.dcr"); -USEFORMNS("cxMaskEditTextEditor.pas", Cxmaskedittexteditor, cxMaskEditTextEditorDlg); -USEFORMNS("cxSelectEditRepositoryItem.pas", Cxselecteditrepositoryitem, cxSelectRepositoryItem); -USEUNIT("cxEditRepositoryEditor.pas"); -USEUNIT("cxFilterControlReg.pas"); -USEUNIT("cxInplaceContainerReg.pas"); -USERES("cxFilterControlReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLC6.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLC6.res deleted file mode 100644 index b7e13de0..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLC6.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD6.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD6.dpk deleted file mode 100644 index bccd170b..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD6.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dclcxEditorsVCLD6; - -{$R *.res} -{$R cxEditReg.dcr} -{$R cxFilterControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 (VCL Edition) by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vcldb, - cxEditorsVCLD6, - designide, - dcldb, - dclcxLibraryVCLD6; - -contains - cxEditReg, - cxEditRepositoryEditor, - cxMaskEditTextEditor, - cxSelectEditRepositoryItem, - cxFilterControlReg, - cxEditPropEditors, - cxInplaceContainerReg; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD6.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD6.res deleted file mode 100644 index dcec53af..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD6.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD7.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD7.dpk deleted file mode 100644 index 335bb383..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD7.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dclcxEditorsVCLD7; - -{$R *.res} -{$R cxEditReg.dcr} -{$R cxFilterControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressEditors Library 5 (VCL Edition) by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vcldb, - cxEditorsVCLD7, - designide, - dcldb, - dclcxLibraryVCLD7; - -contains - cxEditReg, - cxEditRepositoryEditor, - cxMaskEditTextEditor, - cxSelectEditRepositoryItem, - cxFilterControlReg, - cxEditPropEditors, - cxInplaceContainerReg; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD7.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD7.res deleted file mode 100644 index 5f4d9b64..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxEditorsVCLD7.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC10.bpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC10.bpk deleted file mode 100644 index 00be0941..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC10.bpk +++ /dev/null @@ -1,203 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxExtEditorsC10.bpl -OBJFILES = dclcxExtEditorsC10.obj \ - cxExtEditReg.obj \ - cxHintEditor.obj \ - cxShellEditorsReg.obj \ - cxSplitterEditor.obj cxCheckGroupStatesEditor.obj -RESFILES = dclcxExtEditorsC10.res cxExtEditReg.dcr -MAINSOURCE = dclcxExtEditorsC10.cpp -RESDEPEN = $(RESFILES) cxHintEditor.dfm \ - cxSplitterEditor.dfm cxCheckGroupStatesEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dclcxLibraryC10.bpi dclcxEditorsC10.bpi dxThemeC10.bpi \ - cxLibraryC10.bpi cxDataC10.bpi rtl.bpi vcl.bpi dbrtl.bpi \ - vcldb.bpi vclx.bpi cxEditorsC10.bpi cxExtEditorsC10.bpi dxCoreC10.bpi dcldxCoreC10.bpi -SPARELIBS = vcl.lib CXLIBRARYC10.lib cxEditorsC10.lib \ - dclcxLibraryC10.lib dxCoreC10.lib dcldxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressExtendedEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC10.cpp b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC10.cpp deleted file mode 100644 index 17b8869f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC10.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxExtEditorsC10.res"); -USERES("cxExtEditReg.dcr"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dcldxCoreC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC10.bpi"); -USEPACKAGE("dclcxEditorsC10.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("cxExtEditorsC10.bpi"); -USEUNIT("cxExtEditReg.pas"); -USEUNIT("cxShellEditorsReg.pas"); -USEFORMNS("cxHintEditor.pas", Cxhinteditor, cxHintStyleEditor); -USEFORMNS("cxSplitterEditor.pas", Cxsplittereditor, cxSplitEditor); -USEFORMNS("cxCheckGroupStatesEditor.pas", Cxcheckgroupstateseditor, cxCheckGroupStatesEditorDlg); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC10.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC10.res deleted file mode 100644 index 8e97500c..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC10.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC11.bpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC11.bpk deleted file mode 100644 index 5fa5ad09..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC11.bpk +++ /dev/null @@ -1,203 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxExtEditorsC11.bpl -OBJFILES = dclcxExtEditorsC11.obj \ - cxExtEditReg.obj \ - cxHintEditor.obj \ - cxShellEditorsReg.obj \ - cxSplitterEditor.obj cxCheckGroupStatesEditor.obj -RESFILES = dclcxExtEditorsC11.res cxExtEditReg.dcr -MAINSOURCE = dclcxExtEditorsC11.cpp -RESDEPEN = $(RESFILES) cxHintEditor.dfm \ - cxSplitterEditor.dfm cxCheckGroupStatesEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dclcxLibraryC11.bpi dclcxEditorsC11.bpi dxThemeC11.bpi \ - cxLibraryC11.bpi cxDataC11.bpi rtl.bpi vcl.bpi dbrtl.bpi \ - vcldb.bpi vclx.bpi cxEditorsC11.bpi cxExtEditorsC11.bpi dxCoreC11.bpi dcldxCoreC11.bpi -SPARELIBS = vcl.lib CXLIBRARYC11.lib cxEditorsC11.lib \ - dclcxLibraryC11.lib dxCoreC11.lib dcldxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressExtendedEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC11.cpp b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC11.cpp deleted file mode 100644 index 4982b75b..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC11.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxExtEditorsC11.res"); -USERES("cxExtEditReg.dcr"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dcldxCoreC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEPACKAGE("dclcxEditorsC11.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("cxExtEditorsC11.bpi"); -USEUNIT("cxExtEditReg.pas"); -USEUNIT("cxShellEditorsReg.pas"); -USEFORMNS("cxHintEditor.pas", Cxhinteditor, cxHintStyleEditor); -USEFORMNS("cxSplitterEditor.pas", Cxsplittereditor, cxSplitEditor); -USEFORMNS("cxCheckGroupStatesEditor.pas", Cxcheckgroupstateseditor, cxCheckGroupStatesEditorDlg); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC11.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC11.res deleted file mode 100644 index 9d6b17a0..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC11.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC12.bpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC12.bpk deleted file mode 100644 index c9584f99..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC12.bpk +++ /dev/null @@ -1,203 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxExtEditorsC12.bpl -OBJFILES = dclcxExtEditorsC12.obj \ - cxExtEditReg.obj \ - cxHintEditor.obj \ - cxShellEditorsReg.obj \ - cxSplitterEditor.obj cxCheckGroupStatesEditor.obj -RESFILES = dclcxExtEditorsC12.res cxExtEditReg.dcr -MAINSOURCE = dclcxExtEditorsC12.cpp -RESDEPEN = $(RESFILES) cxHintEditor.dfm \ - cxSplitterEditor.dfm cxCheckGroupStatesEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dclcxLibraryC12.bpi dclcxEditorsC12.bpi dxThemeC12.bpi \ - cxLibraryC12.bpi cxDataC12.bpi rtl.bpi vcl.bpi dbrtl.bpi \ - vcldb.bpi vclx.bpi cxEditorsC12.bpi cxExtEditorsC12.bpi dxCoreC12.bpi dcldxCoreC12.bpi -SPARELIBS = vcl.lib CXLIBRARYC12.lib cxEditorsC12.lib \ - dclcxLibraryC12.lib dxCoreC12.lib dcldxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressExtendedEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC12.cpp b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC12.cpp deleted file mode 100644 index 0d0ed678..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC12.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxExtEditorsC12.res"); -USERES("cxExtEditReg.dcr"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dcldxCoreC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC12.bpi"); -USEPACKAGE("dclcxEditorsC12.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("cxExtEditorsC12.bpi"); -USEUNIT("cxExtEditReg.pas"); -USEUNIT("cxShellEditorsReg.pas"); -USEFORMNS("cxHintEditor.pas", Cxhinteditor, cxHintStyleEditor); -USEFORMNS("cxSplitterEditor.pas", Cxsplittereditor, cxSplitEditor); -USEFORMNS("cxCheckGroupStatesEditor.pas", Cxcheckgroupstateseditor, cxCheckGroupStatesEditorDlg); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC12.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC12.res deleted file mode 100644 index 9d924438..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC12.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC14.bpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC14.bpk deleted file mode 100644 index 9bb11060..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC14.bpk +++ /dev/null @@ -1,203 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxExtEditorsC14.bpl -OBJFILES = dclcxExtEditorsC14.obj \ - cxExtEditReg.obj \ - cxHintEditor.obj \ - cxShellEditorsReg.obj \ - cxSplitterEditor.obj cxCheckGroupStatesEditor.obj -RESFILES = dclcxExtEditorsC14.res cxExtEditReg.dcr -MAINSOURCE = dclcxExtEditorsC14.cpp -RESDEPEN = $(RESFILES) cxHintEditor.dfm \ - cxSplitterEditor.dfm cxCheckGroupStatesEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dclcxLibraryC14.bpi dclcxEditorsC14.bpi dxThemeC14.bpi \ - cxLibraryC14.bpi cxDataC14.bpi rtl.bpi vcl.bpi dbrtl.bpi \ - vcldb.bpi vclx.bpi cxEditorsC14.bpi cxExtEditorsC14.bpi dxCoreC14.bpi dcldxCoreC14.bpi -SPARELIBS = vcl.lib CXLIBRARYC14.lib cxEditorsC14.lib \ - dclcxLibraryC14.lib dxCoreC14.lib dcldxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressExtendedEditors Library 5 by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC14.cpp b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC14.cpp deleted file mode 100644 index d8334e12..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC14.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxExtEditorsC14.res"); -USERES("cxExtEditReg.dcr"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dcldxCoreC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC14.bpi"); -USEPACKAGE("dclcxEditorsC14.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("cxExtEditorsC14.bpi"); -USEUNIT("cxExtEditReg.pas"); -USEUNIT("cxShellEditorsReg.pas"); -USEFORMNS("cxHintEditor.pas", Cxhinteditor, cxHintStyleEditor); -USEFORMNS("cxSplitterEditor.pas", Cxsplittereditor, cxSplitEditor); -USEFORMNS("cxCheckGroupStatesEditor.pas", Cxcheckgroupstateseditor, cxCheckGroupStatesEditorDlg); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC14.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC14.res deleted file mode 100644 index 8504c5aa..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsC14.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD10.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD10.dpk deleted file mode 100644 index 36ab500f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD10.dpk +++ /dev/null @@ -1,51 +0,0 @@ -package dclcxExtEditorsD10; - -{$R *.res} -{$R cxExtEditReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dbrtl, - vcljpg, - vcldb, - cxLibraryD10, - dxThemeD10, - cxEditorsD10, - cxDataD10, - cxExtEditorsD10, - dclcxEditorsD10; - -contains - cxExtEditReg, - cxShellEditorsReg, - cxHintEditor, - cxCheckGroupStatesEditor, - cxSplitterEditor; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD10.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD10.res deleted file mode 100644 index 6b3dd64a..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD10.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD11.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD11.dpk deleted file mode 100644 index 43f18ac8..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD11.dpk +++ /dev/null @@ -1,51 +0,0 @@ -package dclcxExtEditorsD11; - -{$R *.res} -{$R cxExtEditReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dbrtl, - vcljpg, - vcldb, - cxLibraryD11, - dxThemeD11, - cxEditorsD11, - cxDataD11, - cxExtEditorsD11, - dclcxEditorsD11; - -contains - cxExtEditReg, - cxShellEditorsReg, - cxHintEditor, - cxCheckGroupStatesEditor, - cxSplitterEditor; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD11.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD11.res deleted file mode 100644 index 39666824..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD11.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD12.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD12.dpk deleted file mode 100644 index 01577375..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD12.dpk +++ /dev/null @@ -1,46 +0,0 @@ -package dclcxExtEditorsD12; - -{$R *.res} -{$R cxExtEditReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dbrtl, - vcldb, - cxExtEditorsD12, - dclcxEditorsD12; - -contains - cxExtEditReg, - cxShellEditorsReg, - cxHintEditor, - cxCheckGroupStatesEditor, - cxSplitterEditor; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD12.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD12.res deleted file mode 100644 index 38f2192f..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD12.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD14.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD14.dpk deleted file mode 100644 index 173195e6..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD14.dpk +++ /dev/null @@ -1,46 +0,0 @@ -package dclcxExtEditorsD14; - -{$R *.res} -{$R cxExtEditReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dbrtl, - vcldb, - cxExtEditorsD14, - dclcxEditorsD14; - -contains - cxExtEditReg, - cxShellEditorsReg, - cxHintEditor, - cxCheckGroupStatesEditor, - cxSplitterEditor; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD14.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD14.res deleted file mode 100644 index a2a4c7d1..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD14.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD9.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD9.dpk deleted file mode 100644 index 32ee2ad3..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD9.dpk +++ /dev/null @@ -1,51 +0,0 @@ -package dclcxExtEditorsD9; - -{$R *.res} -{$R cxExtEditReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dbrtl, - vcljpg, - vcldb, - cxLibraryD9, - dxThemeD9, - cxEditorsD9, - cxDataD9, - cxExtEditorsD9, - dclcxEditorsD9; - -contains - cxExtEditReg, - cxShellEditorsReg, - cxHintEditor, - cxCheckGroupStatesEditor, - cxSplitterEditor; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD9.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD9.res deleted file mode 100644 index 5c140207..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsD9.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLC6.bpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLC6.bpk deleted file mode 100644 index e27c78a4..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLC6.bpk +++ /dev/null @@ -1,203 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxExtEditorsVCLC6.bpl -OBJFILES = dclcxExtEditorsVCLC6.obj \ - cxExtEditReg.obj \ - cxHintEditor.obj \ - cxShellEditorsReg.obj \ - cxSplitterEditor.obj cxCheckGroupStatesEditor.obj -RESFILES = dclcxExtEditorsVCLC6.res cxExtEditReg.dcr -MAINSOURCE = dclcxExtEditorsVCLC6.cpp -RESDEPEN = $(RESFILES) cxHintEditor.dfm \ - cxSplitterEditor.dfm cxCheckGroupStatesEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dclcxLibraryVCLC6.bpi dclcxEditorsVCLC6.bpi dxThemeC6.bpi \ - cxLibraryVCLC6.bpi cxDataC6.bpi rtl.bpi vcl.bpi dcldb.bpi dbrtl.bpi \ - vcldb.bpi vclx.bpi cxEditorsVCLC6.bpi cxExtEditorsVCLC6.bpi dxCoreC6.bpi dcldxCoreC6.bpi -SPARELIBS = vcl.lib CXLIBRARYVCLC6.lib cxEditorsVCLC6.lib \ - dclcxLibraryVCLC6.lib dxCoreC6.lib dcldxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressExtendedEditors Library 5 (VCL Edition) by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLC6.cpp b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLC6.cpp deleted file mode 100644 index f4e6e69f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLC6.cpp +++ /dev/null @@ -1,40 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxExtEditorsVCLC6.res"); -USERES("cxExtEditReg.dcr"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dcldb.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dcldxCoreC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEPACKAGE("dclcxEditorsVCLC6.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("cxExtEditorsVCLC6.bpi"); -USEUNIT("cxExtEditReg.pas"); -USEUNIT("cxShellEditorsReg.pas"); -USEFORMNS("cxHintEditor.pas", Cxhinteditor, cxHintStyleEditor); -USEFORMNS("cxSplitterEditor.pas", Cxsplittereditor, cxSplitEditor); -USEFORMNS("cxCheckGroupStatesEditor.pas", Cxcheckgroupstateseditor, cxCheckGroupStatesEditorDlg); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLC6.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLC6.res deleted file mode 100644 index 248ee4b1..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLC6.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD6.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD6.dpk deleted file mode 100644 index cba43151..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD6.dpk +++ /dev/null @@ -1,51 +0,0 @@ -package dclcxExtEditorsVCLD6; - -{$R *.res} -{$R cxExtEditReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 (VCL Edition) by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dbrtl, - vcljpg, - vcldb, - cxLibraryVCLD6, - dxThemeD6, - cxEditorsVCLD6, - cxDataD6, - cxExtEditorsVCLD6, - dclcxEditorsVCLD6; - -contains - cxExtEditReg, - cxShellEditorsReg, - cxHintEditor, - cxCheckGroupStatesEditor, - cxSplitterEditor; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD6.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD6.res deleted file mode 100644 index ae1fa4ff..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD6.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD7.dpk b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD7.dpk deleted file mode 100644 index a19ad0f7..00000000 --- a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD7.dpk +++ /dev/null @@ -1,51 +0,0 @@ -package dclcxExtEditorsVCLD7; - -{$R *.res} -{$R cxExtEditReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressExtendedEditors Library 5 (VCL Edition) by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dbrtl, - vcljpg, - vcldb, - cxLibraryVCLD7, - dxThemeD7, - cxEditorsVCLD7, - cxDataD7, - cxExtEditorsVCLD7, - dclcxEditorsVCLD7; - -contains - cxExtEditReg, - cxShellEditorsReg, - cxHintEditor, - cxCheckGroupStatesEditor, - cxSplitterEditor; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD7.res b/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD7.res deleted file mode 100644 index 355be634..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Packages/dclcxExtEditorsVCLD7.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxBlobEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxBlobEdit.pas deleted file mode 100644 index f90f7fa4..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxBlobEdit.pas +++ /dev/null @@ -1,1532 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxBlobEdit; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, ExtDlgs, -{$IFDEF DELPHI6} - Types, -{$ENDIF} - SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, - Dialogs, StdCtrls, ImgList, Clipbrd, - cxClasses, cxControls, cxContainer, cxGraphics, cxDataStorage, cxDataUtils, - cxEdit, cxDropDownEdit, cxEditConsts, cxTextEdit, cxButtons, cxImage, cxMemo, - cxFilterControlUtils; - -type - TcxBlobPaintStyle = (bpsDefault, bpsIcon, bpsText); - TcxBlobEditKind = (bekAuto, bekMemo, bekPict, bekOle, bekBlob); - - { TcxBlobEditViewData } - - TcxBlobEditViewData = class(TcxCustomDropDownEditViewData) - protected - function InternalGetEditConstantPartSize(ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo): TSize; override; - function InternalEditValueToDisplayText(AEditValue: TcxEditValue): string; override; - procedure PrepareDrawTextFlags(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo); override; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - end; - - { TcxBlobEditViewInfo } - - TcxBlobEditViewInfo = class(TcxCustomTextEditViewInfo) - protected - procedure InternalPaint(ACanvas: TcxCanvas); override; - public - IconRect: TRect; - ImageIndex: TImageIndex; - function NeedShowHint(ACanvas: TcxCanvas; const P: TPoint; out AText: TCaption; - out AIsMultiLine: Boolean; out ATextRect: TRect): Boolean; override; - procedure Offset(DX, DY: Integer); override; - end; - - { TcxCustomBlobEditProperties } - - TcxCustomBlobEditProperties = class(TcxCustomPopupEditProperties) - private - // common - FAlwaysSaveData: Boolean; - FBlobEditKind: TcxBlobEditKind; - FBlobPaintStyle: TcxBlobPaintStyle; - // memo - FMemoAutoReplace: Boolean; - FMemoWantReturns: Boolean; - FMemoWantTabs: Boolean; - FMemoOEMConvert: Boolean; - FMemoWordWrap: Boolean; - FMemoMaxLength: Integer; - FMemoCharCase: TEditCharCase; - FMemoScrollBars: TScrollStyle; - // picture - FPictureAutoSize: Boolean; - FPictureClipboardFormat: Word; - FPictureFilter: string; - FPictureGraphicClass: TGraphicClass; - FPictureTransparency: TcxImageTransparency; - FShowExPopupItems: Boolean; - FShowPicturePopup: Boolean; - - FOnAssignPicture: TcxImageAssignPictureEvent; - FOnGetGraphicClass: TcxImageGraphicClassEvent; - function GetPictureGraphicClassName: string; - function IsPictureGraphicClassNameStored: Boolean; - procedure ReadIsPictureGraphicClassNameEmpty(Reader: TReader); - procedure SetBlobEditKind(const Value: TcxBlobEditKind); - procedure SetBlobPaintStyle(const Value: TcxBlobPaintStyle); - procedure SetPictureGraphicClass(Value: TGraphicClass); - procedure SetPictureGraphicClassName(const Value: string); - procedure WriteIsPictureGraphicClassNameEmpty(Writer: TWriter); - protected - function CanValidate: Boolean; override; - procedure DefineProperties(Filer: TFiler); override; - function DropDownOnClick: Boolean; override; - function GetDisplayFormatOptions: TcxEditDisplayFormatOptions; override; - class function GetPopupWindowClass: TcxCustomEditPopupWindowClass; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function HasDisplayValue: Boolean; override; - procedure CorrectBlobEditKind; - function GetDefaultPictureGraphicClass: TGraphicClass; virtual; - function GetPictureGraphicClass(AItem: TObject; ARecordIndex: Integer; - APastingFromClipboard: Boolean = False): TGraphicClass; - // Picture - property PictureClipboardFormat: Word - read FPictureClipboardFormat write FPictureClipboardFormat; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - function CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; override; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function GetSpecialFeatures: TcxEditSpecialFeatures; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsEditValueValid(var AEditValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - property PictureGraphicClass: TGraphicClass - read FPictureGraphicClass write SetPictureGraphicClass; - // !!! - // Common - property AlwaysSaveData: Boolean - read FAlwaysSaveData write FAlwaysSaveData default True; - property BlobEditKind: TcxBlobEditKind - read FBlobEditKind write SetBlobEditKind default bekAuto; - property BlobPaintStyle: TcxBlobPaintStyle - read FBlobPaintStyle write SetBlobPaintStyle default bpsIcon; - property ImmediatePopup default True; - // Memo - property MemoAutoReplace: Boolean - read FMemoAutoReplace write FMemoAutoReplace default False; - property MemoCharCase: TEditCharCase - read FMemoCharCase write FMemoCharCase default ecNormal; - property MemoMaxLength: Integer - read FMemoMaxLength write FMemoMaxLength default 0; - property MemoOEMConvert: Boolean - read FMemoOEMConvert write FMemoOEMConvert default False; - property MemoScrollBars: TScrollStyle - read FMemoScrollBars write FMemoScrollBars default ssNone; - property MemoWantReturns: Boolean - read FMemoWantReturns write FMemoWantReturns default True; - property MemoWantTabs: Boolean - read FMemoWantTabs write FMemoWantTabs default True; - property MemoWordWrap: Boolean - read FMemoWordWrap write FMemoWordWrap default True; - // Picture - property PictureAutoSize: Boolean - read FPictureAutoSize write FPictureAutoSize default True; - property PictureFilter: string - read FPictureFilter write FPictureFilter; - property PictureGraphicClassName: string - read GetPictureGraphicClassName write SetPictureGraphicClassName - stored IsPictureGraphicClassNameStored; - property PictureTransparency: TcxImageTransparency - read FPictureTransparency write FPictureTransparency default gtDefault; - property ShowExPopupItems: Boolean - read FShowExPopupItems write FShowExPopupItems default True; - property ShowPicturePopup: Boolean - read FShowPicturePopup write FShowPicturePopup default True; - property OnAssignPicture: TcxImageAssignPictureEvent - read FOnAssignPicture write FOnAssignPicture; - property OnGetGraphicClass: TcxImageGraphicClassEvent - read FOnGetGraphicClass write FOnGetGraphicClass; - end; - - { TcxBlobEditProperties } - - TcxBlobEditProperties = class(TcxCustomBlobEditProperties) - published - property AlwaysSaveData; - property AssignedValues; - property BlobEditKind; - property BlobPaintStyle; - property ClearKey; - property ImeMode; - property ImeName; - property ImmediatePopup; - property ImmediatePost; - property MemoAutoReplace; - property MemoCharCase; - property MemoMaxLength; - property MemoOEMConvert; - property MemoScrollBars; - property MemoWantReturns; - property MemoWantTabs; - property MemoWordWrap; - property PictureAutoSize; - property PictureFilter; - property PictureGraphicClassName; - property PictureTransparency; - property PopupHeight; - property PopupWidth; - property ReadOnly; - property ShowExPopupItems; - property ShowPicturePopup; - property OnAssignPicture; - property OnButtonClick; - property OnChange; - property OnCloseQuery; - property OnCloseUp; - property OnEditValueChanged; - property OnGetGraphicClass; - property OnInitPopup; - property OnPopup; - property OnValidate; - end; - - { TcxCustomBlobEdit } - - TcxCustomBlobEdit = class(TcxCustomPopupEdit) - private - FButtonWidth: Integer; - FCancelButton: TcxButton; - FGraphicClass: TGraphicClass; - FOkButton: TcxButton; - FStorage: TcxCustomEdit; - FOnGetGraphicClass: TcxImageEditGraphicClassEvent; - procedure DoPopupImageGetGraphicClass(Sender: TObject; - APastingFromClipboard: Boolean; var AGraphicClass: TGraphicClass); - procedure DoPopupImagePropertiesGetGraphicClass(AItem: TObject; - ARecordIndex: Integer; APastingFromClipboard: Boolean; - var AGraphicClass: TGraphicClass); - function GetActiveProperties: TcxCustomBlobEditProperties; - function GetProperties: TcxCustomBlobEditProperties; - procedure InternalChanged(Sender: TObject); - procedure PictureClosePopup(Sender: TcxControl; AReason: TcxEditCloseUpReason); - procedure SaveStorage; - procedure SetProperties(Value: TcxCustomBlobEditProperties); - protected - procedure ColorChanged; override; - procedure CreatePopupControls; virtual; - procedure DoAssignPicture; - procedure DoOnAssignPicture(APicture: TPicture); - procedure FontChanged; override; - function GetDisplayValue: string; override; - function GetEditingValue: TcxEditValue; override; - function GetPopupFocusedControl: TWinControl; override; - function GetPopupWindowClientPreferredSize: TSize; override; - procedure InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); override; - - procedure DestroyPopupControls; virtual; - procedure DoInitPopup; override; - function GetPictureGraphicClass(APastingFromClipboard: Boolean = False): TGraphicClass; - procedure Initialize; override; - function InternalGetText: string; override; - function InternalSetText(const Value: string): Boolean; override; - procedure PopupWindowClosed(Sender: TObject); override; - procedure PropertiesChanged(Sender: TObject); override; - procedure SetEditingText(const Value: TCaption); override; - procedure SetupPopupWindow; override; - procedure StorageEditingHandler(Sender: TObject; var CanEdit: Boolean); virtual; - procedure SynchronizeDisplayValue; override; - procedure SynchronizeEditValue; override; - property TabStop default True; - property OnGetGraphicClass: TcxImageEditGraphicClassEvent - read FOnGetGraphicClass write FOnGetGraphicClass; - public - destructor Destroy; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function IsEditClass: Boolean; override; - property ActiveProperties: TcxCustomBlobEditProperties - read GetActiveProperties; - property Properties: TcxCustomBlobEditProperties read GetProperties - write SetProperties; - end; - - { TcxBlobEdit } - - TcxBlobEdit = class(TcxCustomBlobEdit) - private - function GetActiveProperties: TcxBlobEditProperties; - function GetProperties: TcxBlobEditProperties; - procedure SetProperties(Value: TcxBlobEditProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxBlobEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxBlobEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Text; - property Visible; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property BiDiMode; - property ParentBiDiMode; - property OnEndDock; - property OnStartDock; - end; - - { TcxFilterBlobEditHelper } - - TcxFilterBlobEditHelper = class(TcxFilterTextEditHelper) - public - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - end; - - { TcxBlobEditPopupWindow } - - TcxBlobEditPopupWindow = class(TcxPopupEditPopupWindow) - protected - procedure DoPopupControlKey(Key: Char); override; - end; - -function GetBlobText(const Value: TcxEditValue; - AProperties: TcxCustomBlobEditProperties; AFullText: Boolean): WideString; - -var - imgBlobImages: TImageList = nil; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Math, cxDrawTextUtils, cxEditUtils, cxGeometry, cxVariants, dxCore; - -const - cxbmBlobNull = 'CXBMBLOB_BLOB_NULL'; - cxbmBlob = 'CXBMBLOB_BLOB'; - cxbmMemoNull = 'CXBMBLOB_MEMO_NULL'; - cxbmMemo = 'CXBMBLOB_MEMO'; - cxbmPictNull = 'CXBMBLOB_PICT_NULL'; - cxbmPict = 'CXBMBLOB_PICT'; - cxbmOleNull = 'CXBMBLOB_OLE_NULL'; - cxbmOle = 'CXBMBLOB_OLE'; - -type - TcxEditStyleAccess = class(TcxEditStyle); - TcxMemoAccess = class(TcxMemo); - - { TcxPopupMemo } - - TcxPopupMemo = class(TcxMemo) - private - FBlobEdit: TcxCustomBlobEdit; - protected - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure SpellCheckerSetValue(const AValue: Variant); override; - end; - - { TcxPopupImage } - - TcxPopupImage = class(TcxImage) - private - FBlobEdit: TcxCustomBlobEdit; - protected - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - end; - -function GetBlobText(const Value: TcxEditValue; - AProperties: TcxCustomBlobEditProperties; AFullText: Boolean): WideString; -begin - Result := ''; - if AFullText and (AProperties.BlobEditKind = bekMemo) and VarIsStr(Value) then - Result := Value - else - if AProperties.BlobPaintStyle = bpsDefault then - begin - case AProperties.BlobEditKind of - bekMemo: - if not VarIsNull(Value) then - Result := cxGetResourceString(@cxSBlobMemo) - else - Result := cxGetResourceString(@cxSBlobMemoEmpty); - bekPict: - if not VarIsNull(Value) then - Result := cxGetResourceString(@cxSBlobPicture) - else - Result := cxGetResourceString(@cxSBlobPictureEmpty); - end; - end - else - if (AProperties.BlobPaintStyle = bpsText) and - (AProperties.BlobEditKind = bekMemo) and dxVarIsBlob(Value) then - begin - Result := dxVariantToWideString(Value); - ExtractFirstLine(Result); - end; -end; - -{ TcxBlobEditViewData } - -procedure TcxBlobEditViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); - - function GetIconRect: TRect; - var - AIconSize: TSize; - begin - if imgBlobImages <> nil then - AIconSize := cxSize(imgBlobImages.Width, imgBlobImages.Height) - else - AIconSize := cxNullSize; - with AViewInfo.ClientRect do - begin - Result.Left := Left + (Right - Left - AIconSize.cx) div 2; - Result.Top := Top + (Bottom - Top - AIconSize.cy) div 2; - end; - Result.Right := Result.Left + AIconSize.cx; - Result.Bottom := Result.Top + AIconSize.cy; - end; - -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, - AIsMouseEvent); - TcxBlobEditViewInfo(AViewInfo).IconRect := GetIconRect; - if Edit <> nil then - EditValueToDrawValue(ACanvas, Edit.EditValue, AViewInfo); - PrepareDrawTextFlags(ACanvas, AViewInfo); -end; - -procedure TcxBlobEditViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -begin - with TcxCustomBlobEditProperties(Properties) do - begin - CorrectBlobEditKind; - if BlobPaintStyle = bpsIcon then - begin - TcxBlobEditViewInfo(AViewInfo).Text := ''; - case BlobEditKind of - bekMemo: - TcxBlobEditViewInfo(AViewInfo).ImageIndex := 2; - bekPict: - TcxBlobEditViewInfo(AViewInfo).ImageIndex := 4; - bekOle: - TcxBlobEditViewInfo(AViewInfo).ImageIndex := 6; - bekBlob: - TcxBlobEditViewInfo(AViewInfo).ImageIndex := 0; - end; - if not VarIsSoftNull(AEditValue) then - Inc(TcxBlobEditViewInfo(AViewInfo).ImageIndex); - end - else - begin - inherited EditValueToDrawValue(ACanvas, AEditValue, AViewInfo); - TcxBlobEditViewInfo(AViewInfo).ImageIndex := -1; - end; - end; -end; - -function TcxBlobEditViewData.InternalGetEditConstantPartSize(ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo): TSize; -begin - Result := inherited InternalGetEditConstantPartSize(ACanvas, AIsInplace, - AEditSizeProperties, MinContentSize, AViewInfo); - if (TcxCustomBlobEditProperties(Properties).BlobPaintStyle = bpsIcon) and (imgBlobImages <> nil) then - Result.cx := Result.cx + imgBlobImages.Width; -end; - -function TcxBlobEditViewData.InternalEditValueToDisplayText( - AEditValue: TcxEditValue): string; -begin - Result := GetBlobText(AEditValue, TcxCustomBlobEditProperties(Properties), False); -end; - -procedure TcxBlobEditViewData.PrepareDrawTextFlags(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo); -var - AEditViewInfo: TcxBlobEditViewInfo; -begin - AEditViewInfo := TcxBlobEditViewInfo(AViewInfo); - AEditViewInfo.DrawTextFlags := CXTO_CENTER_VERTICALLY or CXTO_SINGLELINE; - if not IsInplace or (epoShowEndEllipsis in PaintOptions) then - AEditViewInfo.DrawTextFlags := AEditViewInfo.DrawTextFlags or CXTO_END_ELLIPSIS; -end; - -{ TcxBlobEditViewInfo } - -function TcxBlobEditViewInfo.NeedShowHint(ACanvas: TcxCanvas; const P: TPoint; - out AText: TCaption; out AIsMultiLine: Boolean; out ATextRect: TRect): Boolean; -begin - Result := False; -end; - -procedure TcxBlobEditViewInfo.Offset(DX, DY: Integer); -begin - inherited Offset(DX, DY); - OffsetRect(IconRect, DX, DY); -end; - -procedure TcxBlobEditViewInfo.InternalPaint(ACanvas: TcxCanvas); -var - AClipRgn, APrevClipRgn: TcxRegion; - R: TRect; -begin - if not RectVisible(ACanvas.Handle, Bounds) then - Exit; - - with ACanvas do - begin - if (ImageIndex = -1) and (Text <> '') then - begin - DrawCustomEdit(ACanvas, Self, True, bpsComboListEdit); - Brush.Style := bsClear; - Font := Self.Font; - Font.Color := TextColor; - cxTextOut(Canvas, Text, TextRect, DrawTextFlags); - Brush.Style := bsSolid; - end - else - begin - if Assigned(imgBlobImages) and (ImageIndex <> -1) then - begin - APrevClipRgn := ACanvas.GetClipRegion; - IntersectRect(R, IconRect, ClientRect); - AClipRgn := TcxRegion.Create(R); - ACanvas.SetClipRegion(AClipRgn, roIntersect); - try - if Transparent then - imgBlobImages.Draw(Canvas, IconRect.Left, IconRect.Top, ImageIndex, - Enabled) - else - cxEditUtils.DrawGlyph(ACanvas, - imgBlobImages, ImageIndex, IconRect, BackgroundColor, Enabled); - finally - ACanvas.SetClipRegion(APrevClipRgn, roSet); - end; - if not Transparent then - ACanvas.ExcludeClipRect(R); - end; - DrawCustomEdit(ACanvas, Self, True, bpsComboListEdit); - end; - if Focused and not IsInplace and not HasPopupWindow then - begin - R := ClientRect; - InflateRect(R, -1, -1); - Font.Color := clWhite; - Brush.Color := clBlack; - DrawFocusRect(R); - end; - end; -end; - -{ TcxCustomBlobEditProperties } - -constructor TcxCustomBlobEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - ImmediatePopup := True; - PopupMinWidth := 160; - PopupMinHeight := 140; - FAlwaysSaveData := True; - FBlobEditKind := bekAuto; - FBlobPaintStyle := bpsIcon; - // Memo - FMemoCharCase := ecNormal; - FMemoMaxLength := 0; - FMemoOEMConvert := False; - FMemoScrollBars := ssNone; - FMemoWantReturns := True; - FMemoWantTabs := True; - FMemoWordWrap := True; - // Picture - FPictureAutoSize := True; - FPictureGraphicClass := GetDefaultPictureGraphicClass; - FPictureTransparency := gtDefault; - FShowExPopupItems := True; - FShowPicturePopup := True; -end; - -function TcxCustomBlobEditProperties.GetPictureGraphicClassName: string; -begin - if FPictureGraphicClass = nil then - Result := '' - else - Result := FPictureGraphicClass.ClassName; -end; - -function TcxCustomBlobEditProperties.IsPictureGraphicClassNameStored: Boolean; -begin - Result := PictureGraphicClass <> GetDefaultPictureGraphicClass; -end; - -procedure TcxCustomBlobEditProperties.ReadIsPictureGraphicClassNameEmpty(Reader: TReader); -begin - Reader.ReadBoolean; - PictureGraphicClassName := ''; -end; - -procedure TcxCustomBlobEditProperties.SetBlobEditKind( - const Value: TcxBlobEditKind); -begin - if FBlobEditKind <> Value then - begin - FBlobEditKind := Value; - if Value in [bekPict, bekMemo] then - Buttons[0].Kind := bkDown - else - Buttons[0].Kind := bkEllipsis; - Changed; - end; -end; - -procedure TcxCustomBlobEditProperties.SetBlobPaintStyle( - const Value: TcxBlobPaintStyle); -begin - if FBlobPaintStyle <> Value then - begin - FBlobPaintStyle := Value; - Changed; - end; -end; - -procedure TcxCustomBlobEditProperties.SetPictureGraphicClass(Value: TGraphicClass); -begin - if FPictureGraphicClass <> Value then - begin - FPictureGraphicClass := Value; - Changed; - end; -end; - -procedure TcxCustomBlobEditProperties.SetPictureGraphicClassName(const Value: string); -var - APictureGraphicClass: TGraphicClass; -begin - if Value = '' then - PictureGraphicClass := nil - else - begin - APictureGraphicClass := GetGraphicClassByName(Value); - if APictureGraphicClass <> nil then - PictureGraphicClass := APictureGraphicClass; - end; -end; - -procedure TcxCustomBlobEditProperties.WriteIsPictureGraphicClassNameEmpty(Writer: TWriter); -begin - Writer.WriteBoolean(True); -end; - -function TcxCustomBlobEditProperties.CanValidate: Boolean; -begin - Result := BlobEditKind = bekMemo; -end; - -procedure TcxCustomBlobEditProperties.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('IsPictureGraphicClassNameEmpty', ReadIsPictureGraphicClassNameEmpty, - WriteIsPictureGraphicClassNameEmpty, PictureGraphicClassName = ''); -end; - -function TcxCustomBlobEditProperties.DropDownOnClick: Boolean; -begin - Result := True; -end; - -function TcxCustomBlobEditProperties.GetDisplayFormatOptions: TcxEditDisplayFormatOptions; -begin - Result := []; -end; - -class function TcxCustomBlobEditProperties.GetPopupWindowClass: TcxCustomEditPopupWindowClass; -begin - Result := TcxBlobEditPopupWindow; -end; - -class function TcxCustomBlobEditProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxBlobEditViewData; -end; - -function TcxCustomBlobEditProperties.HasDisplayValue: Boolean; -begin - Result := False; -end; - -procedure TcxCustomBlobEditProperties.CorrectBlobEditKind; -const - ABlobEditKindCorrectionA: array[TcxBlobKind] of TcxBlobEditKind = - (bekBlob, bekBlob, bekPict, bekMemo, bekOle); -begin - if (BlobEditKind = bekAuto) and - not((IDefaultValuesProvider <> nil) and not IDefaultValuesProvider.IsDataAvailable) then - begin - LockUpdate(True); - try - if IDefaultValuesProvider <> nil then - BlobEditKind := ABlobEditKindCorrectionA[IDefaultValuesProvider.DefaultBlobKind] - else - BlobEditKind := bekBlob; - finally - LockUpdate(False); - end; - end; -end; - -function TcxCustomBlobEditProperties.GetDefaultPictureGraphicClass: TGraphicClass; -begin - if GetRegisteredGraphicClasses.Count > 0 then - Result := TGraphicClass(GetRegisteredGraphicClasses[0]) - else - Result := nil; -end; - -function TcxCustomBlobEditProperties.GetPictureGraphicClass(AItem: TObject; - ARecordIndex: Integer; APastingFromClipboard: Boolean = False): TGraphicClass; -begin - Result := FPictureGraphicClass; - if Result = nil then - begin - if APastingFromClipboard then - Result := TBitmap; - if Assigned(FOnGetGraphicClass) then - FOnGetGraphicClass(AItem, ARecordIndex, - APastingFromClipboard, Result); - end; -end; - -procedure TcxCustomBlobEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomBlobEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with TcxCustomBlobEditProperties(Source) do - begin - // Common - Self.AlwaysSaveData := AlwaysSaveData; - Self.BlobEditKind := BlobEditKind; - Self.BlobPaintStyle := BlobPaintStyle; - // Memo - Self.MemoAutoReplace := MemoAutoReplace; - Self.MemoCharCase := MemoCharCase; - Self.MemoMaxLength := MemoMaxLength; - Self.MemoOEMConvert := MemoOEMConvert; - Self.MemoScrollBars := MemoScrollBars; - Self.MemoWantReturns := MemoWantReturns; - Self.MemoWantTabs := MemoWantTabs; - Self.MemoWordWrap := MemoWordWrap; - // Picture - Self.PictureAutoSize := PictureAutoSize; - Self.PictureFilter := PictureFilter; - Self.PictureGraphicClass := PictureGraphicClass; - Self.PictureTransparency := PictureTransparency; - Self.ShowExPopupItems := ShowExPopupItems; - Self.ShowPicturePopup := ShowPicturePopup; - Self.OnAssignPicture := OnAssignPicture; - Self.OnGetGraphicClass := OnGetGraphicClass; - end; - finally - EndUpdate - end - end - else - inherited Assign(Source); -end; - -function TcxCustomBlobEditProperties.CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; -begin - CorrectBlobEditKind; - Result := (BlobPaintStyle = bpsText) and (BlobEditKind = bekMemo) and - VarIsStr(AEditValue1) and VarIsStr(AEditValue2) and - InternalCompareString(AEditValue1, AEditValue2, True); -end; - -class function TcxCustomBlobEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxBlobEdit; -end; - -function TcxCustomBlobEditProperties.GetDisplayText( - const AEditValue: TcxEditValue; AFullText: Boolean = False; - AIsInplace: Boolean = True): WideString; -begin - Result := ''; - if not VarIsNull(AEditValue) then - case BlobEditKind of - bekMemo: - Result := GetBlobText(AEditValue, Self, AFullText); - bekPict: - Result := cxGetResourceString(@cxSBlobPicture); - bekOle: - Result := 'OLE'; - bekBlob: - Result := 'BLOB'; - end; -end; - -function TcxCustomBlobEditProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - CorrectBlobEditKind; - if BlobEditKind = bekMemo then - if (IDefaultValuesProvider <> nil) and IDefaultValuesProvider.IsBlob then - Result := evsValue - else - Result := evsText - else - Result := evsValue; -end; - -function TcxCustomBlobEditProperties.GetSpecialFeatures: TcxEditSpecialFeatures; -begin - Result := inherited GetSpecialFeatures; - if BlobEditKind = bekPict then - Include(Result, esfBlobEditValue); -end; - -function TcxCustomBlobEditProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := [esoEditing]; - if Buttons.Count > 0 then - Include(Result, esoHotTrack); -end; - -class function TcxCustomBlobEditProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxBlobEditViewInfo; -end; - -function TcxCustomBlobEditProperties.IsEditValueValid( - var AEditValue: TcxEditValue; AEditFocused: Boolean): Boolean; -begin - Result := True; -end; - -function KeyDownToModalResult(var Key: Word; Shift: TShiftState; - AReturnClosed, AAlwaysSaveData: Boolean): TModalResult; -begin - Result := mrNone; - if ((Key = VK_F4) and not (ssAlt in Shift)) or (Key = VK_ESCAPE) or - ((Key in [VK_UP, VK_DOWN]) and (ssAlt in Shift)) then - begin - if AAlwaysSaveData and not (Key = VK_ESCAPE) then - Result := mrOk - else - Result := mrCancel - end - else - if (TranslateKey(Key) = VK_RETURN) and (AReturnClosed or (ssCtrl in Shift)) then - Result := mrOk; - if Result <> mrNone then - Key := 0; -end; - -{ TcxPopupMemo } - -procedure TcxPopupMemo.KeyDown(var Key: Word; Shift: TShiftState); -begin - TcxCustomEditPopupWindow(Parent).ModalResult := - KeyDownToModalResult(Key, Shift, not ActiveProperties.WantReturns, - FBlobEdit.ActiveProperties.AlwaysSaveData); - if Key = 0 then - KillMessages(InnerControl.Handle, WM_CHAR, WM_CHAR) // to block Ctrl+Enter - else - inherited KeyDown(Key, Shift); -end; - -procedure TcxPopupMemo.SpellCheckerSetValue(const AValue: Variant); -begin - FBlobEdit.SpellCheckerSetValue(AValue); -end; - -{ TcxPopupImage } - -procedure TcxPopupImage.KeyDown(var Key: Word; Shift: TShiftState); -begin - TcxCustomEditPopupWindow(Parent).ModalResult := - KeyDownToModalResult(Key, Shift, True, - FBlobEdit.ActiveProperties.AlwaysSaveData); - inherited KeyDown(Key, Shift); -end; - -{ TcxCustomBlobEdit } - -destructor TcxCustomBlobEdit.Destroy; -begin - DestroyPopupControls; - inherited Destroy; -end; - -procedure TcxCustomBlobEdit.DoPopupImageGetGraphicClass(Sender: TObject; - APastingFromClipboard: Boolean; var AGraphicClass: TGraphicClass); -begin - AGraphicClass := GetPictureGraphicClass(APastingFromClipboard); -end; - -procedure TcxCustomBlobEdit.DoPopupImagePropertiesGetGraphicClass( - AItem: TObject; ARecordIndex: Integer; APastingFromClipboard: Boolean; - var AGraphicClass: TGraphicClass); -begin - DoPopupImageGetGraphicClass(nil, APastingFromClipboard, AGraphicClass); -end; - -function TcxCustomBlobEdit.GetActiveProperties: TcxCustomBlobEditProperties; -begin - Result := TcxCustomBlobEditProperties(InternalGetActiveProperties); -end; - -function TcxCustomBlobEdit.GetProperties: TcxCustomBlobEditProperties; -begin - Result := TcxCustomBlobEditProperties(FProperties); -end; - -procedure TcxCustomBlobEdit.InternalChanged(Sender: TObject); -begin - if FOkButton <> nil then - begin - FOkButton.Enabled := True(*FStorage.ModifiedAfterEnter*); - FOkButton.Default := FOkButton.Enabled; - end; -end; - -procedure TcxCustomBlobEdit.PictureClosePopup(Sender: TcxControl; AReason: TcxEditCloseUpReason); -begin - if not HasPopupWindow then - begin - if AReason = crEnter then - SaveStorage; - DoClosePopup(AReason); - end; -end; - -procedure TcxCustomBlobEdit.SaveStorage; - - function NeedSaveStorage: Boolean; - begin - Result := FStorage.EditModified and ((PopupWindow.ModalResult = mrOk) or - ((PopupWindow.ModalResult <> mrCancel) and ActiveProperties.AlwaysSaveData)) and - DoEditing; - end; - -begin - if NeedSaveStorage then - begin - if FStorage is TcxMemo then - InternalEditValue := TcxMemo(FStorage).Lines.Text - else - begin - if FStorage is TcxImage then - with TcxImage(FStorage).Picture do - if Graphic = nil then - FGraphicClass := nil - else - FGraphicClass := TGraphicClass(Graphic.ClassType); - InternalEditValue := FStorage.EditValue; - end; - ModifiedAfterEnter := True; - - DoAssignPicture; - if ActiveProperties.ImmediatePost and CanPostEditValue and ValidateEdit(True) then - InternalPostEditValue; - end; -end; - -procedure TcxCustomBlobEdit.SetProperties(Value: TcxCustomBlobEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomBlobEdit.ColorChanged; -begin - inherited ColorChanged; - if not IsDestroying and HasPopupWindow and (FStorage is TcxPopupMemo) then - TcxPopupMemo(FStorage).Style.Color := GetBackgroundColor; -end; - -procedure TcxCustomBlobEdit.CreatePopupControls; - - procedure InitStorage(AStorageClass: TcxCustomEditClass); - begin - if (FStorage <> nil) and (AStorageClass <> FStorage.ClassType) then - DestroyPopupControls; - if FStorage = nil then - begin - FStorage := AStorageClass.Create(nil); - FStorage.OnEditing := StorageEditingHandler; - FStorage.Style.BorderStyle := ebsNone; - FStorage.ActiveProperties.OnChange := InternalChanged; - end; - FStorage.ActiveProperties.ReadOnly := not CanModify; - ActiveProperties.PopupControl := FStorage; - ActiveProperties.PopupSysPanelStyle := True; - FStorage.Parent := PopupWindow; - end; - - procedure InitButton(var AButton: TcxButton; const ACaption: string; AHeight, AWidth: Integer); - begin - if AButton = nil then - begin - AButton := TcxButton.Create(nil); - AButton.UseSystemPaint := False; - end; - AButton.Caption := ACaption; - AButton.Font.Assign(VisibleFont); - AButton.LookAndFeel.MasterLookAndFeel := PopupControlsLookAndFeel; - AButton.LookAndFeel.SkinPainter := ViewInfo.Painter; - AButton.Height := AHeight; - AButton.Width := AWidth; - AButton.Parent := PopupWindow; - end; - - procedure InitControls; - var - ACancelCaption, AOkCaption: string; - ATempWidth, AButtonHeight: Integer; - AFont: TFont; - begin - if ActiveProperties.ReadOnly or not DataBinding.IsDataAvailable then - ACancelCaption := cxGetResourceString(@cxSBlobButtonClose) - else - ACancelCaption := cxGetResourceString(@cxSBlobButtonCancel); - AOkCaption := cxGetResourceString(@cxSBlobButtonOK); - - AFont := VisibleFont; - FButtonWidth := Max(cxTextWidth(AFont, ACancelCaption + '00'), cxTextWidth(AFont, AOkCaption + '00')); - AButtonHeight := MulDiv(cxTextHeight(AFont), 20, 13); - - InitButton(FCancelButton, ACancelCaption, AButtonHeight, FButtonWidth); - FCancelButton.Cancel := True; - FCancelButton.ModalResult := mrCancel; - - if (not ActiveProperties.ReadOnly) and DataBinding.IsDataAvailable then - begin - InitButton(FOkButton, AOkCaption, AButtonHeight, FButtonWidth); - FOkButton.Enabled := FStorage.EditModified; - FOkButton.ModalResult := mrOk; - end - else - FreeAndNil(FOkButton); - - PopupWindow.MinSysPanelHeight := AButtonHeight + (AButtonHeight div 3); - ATempWidth := (AButtonHeight div 3) + FButtonWidth; - if FOkButton <> nil then ATempWidth := ATempWidth * 2; - ActiveProperties.PopupMinWidth := ATempWidth + GetSystemMetrics(SM_CXVSCROLL) + - AButtonHeight div 2; - end; - -begin - case ActiveProperties.BlobEditKind of - bekPict: - begin - InitStorage(TcxPopupImage); - with TcxPopupImage(FStorage) do - begin - FBlobEdit := Self; - ActiveProperties.ShowFocusRect := False; - ActiveProperties.Stretch := True; - ActiveProperties.CustomFilter := Self.ActiveProperties.PictureFilter; - ActiveProperties.GraphicTransparency := Self.ActiveProperties.PictureTransparency; - ActiveProperties.OnClosePopup := PictureClosePopup; - if not Self.ActiveProperties.ShowPicturePopup then - ActiveProperties.PopupMenuLayout.MenuItems := [] - else - if not Self.ActiveProperties.ShowExPopupItems then - ActiveProperties.PopupMenuLayout.MenuItems := - ActiveProperties.PopupMenuLayout.MenuItems - [pmiSave, pmiLoad]; - - ActiveProperties.GraphicClass := Self.ActiveProperties.PictureGraphicClass; - //OnAssignPicture := Self.ActiveProperties.OnAssignPicture; - //OnGetGraphicClass := Self.ActiveProperties.OnGetGraphicClass; - OnGetGraphicClass := Self.DoPopupImageGetGraphicClass; - ActiveProperties.OnGetGraphicClass := Self.DoPopupImagePropertiesGetGraphicClass; - LoadPicture(Picture, Self.GetPictureGraphicClass, Self.EditValue); - EditModified := False; - Style.LookAndFeel.MasterLookAndFeel := Self.PopupControlsLookAndFeel; - end; - ActiveProperties.PopupAutoSize := ActiveProperties.PictureAutoSize; - InitControls; - end; - bekMemo: - begin - InitStorage(TcxPopupMemo); - with TcxPopupMemo(FStorage) do - begin - FBlobEdit := Self; - ActiveProperties.CharCase := Self.ActiveProperties.MemoCharCase; - ActiveProperties.ImeMode := Self.ActiveProperties.ImeMode; - ActiveProperties.ImeName := Self.ActiveProperties.ImeName; - ActiveProperties.MaxLength := Self.ActiveProperties.MemoMaxLength; - ActiveProperties.OEMConvert := Self.ActiveProperties.MemoOEMConvert; - ActiveProperties.ScrollBars := Self.ActiveProperties.MemoScrollBars; - ActiveProperties.WantReturns := Self.ActiveProperties.MemoWantReturns; - ActiveProperties.WantTabs := Self.ActiveProperties.MemoWantTabs; - ActiveProperties.WordWrap := Self.ActiveProperties.MemoWordWrap; - Self.ActiveProperties.PopupAutoSize := False; - EditValue := Self.EditValue; - Style.LookAndFeel.MasterLookAndFeel := Self.PopupControlsLookAndFeel; - Style.Font.Assign(Self.VisibleFont); - Style.Color := Self.GetBackgroundColor; - end; - InitControls; - end; - end; -end; - -procedure TcxCustomBlobEdit.DoAssignPicture; -begin - if FStorage is TcxPopupImage then - begin - LockEditValueChanging(True); - try - DoOnAssignPicture(TcxPopupImage(FStorage).Picture); - SaveModified; - try - EditModified := False; - DoEditing; - finally - RestoreModified; - end; - finally - LockEditValueChanging(False); - end; - end; -end; - -procedure TcxCustomBlobEdit.DoOnAssignPicture(APicture: TPicture); -begin - with Properties do - if Assigned(OnAssignPicture) then - OnAssignPicture(Self, APicture); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnAssignPicture) then - OnAssignPicture(Self, APicture); -end; - -procedure TcxCustomBlobEdit.FontChanged; -begin - inherited FontChanged; - if not IsDestroying and HasPopupWindow then - begin - if FStorage is TcxPopupMemo then - TcxPopupMemo(FStorage).Style.Font.Assign(VisibleFont); - if FOkButton <> nil then - FOkButton.Font.Assign(VisibleFont); - if FCancelButton <> nil then - FCancelButton.Font.Assign(VisibleFont); - end; -end; - -function TcxCustomBlobEdit.GetDisplayValue: string; -begin - if (ActiveProperties.BlobEditKind = bekMemo) and (FStorage <> nil) then - Result := TcxPopupMemo(FStorage).Text - else - Result := inherited GetDisplayValue; -end; - -function TcxCustomBlobEdit.GetEditingValue: TcxEditValue; -begin - if HasPopupWindow and (ActiveProperties.BlobEditKind in [bekMemo, bekPict]) then - if ActiveProperties.BlobEditKind = bekMemo then - Result := TcxPopupMemo(FStorage).Text - else - Result := TcxPopupImage(FStorage).EditValue - else - Result := EditValue; -end; - -function TcxCustomBlobEdit.GetPopupFocusedControl: TWinControl; -begin - if FStorage <> nil then - Result := FStorage - else - Result := inherited GetPopupFocusedControl; -end; - -function TcxCustomBlobEdit.GetPopupWindowClientPreferredSize: TSize; -begin - with ActiveProperties do - if (BlobEditKind = bekPict) and PictureAutoSize then - begin - with TcxPopupImage(FStorage).Picture do - Result := Size(Width + 4, Height + 4); - end - else - Result := inherited GetPopupWindowClientPreferredSize; -end; - -procedure TcxCustomBlobEdit.InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); -begin - if (ActiveProperties.BlobEditKind = bekMemo) and (FStorage <> nil) then - TcxPopupMemo(FStorage).Text := ADisplayValue; - inherited InternalValidateDisplayValue(ADisplayValue); -end; - -procedure TcxCustomBlobEdit.DestroyPopupControls; -begin - ActiveProperties.PopupControl := nil; - FreeAndNil(FOkButton); - FreeAndNil(FCancelButton); - FreeAndNil(FStorage); -end; - -procedure TcxCustomBlobEdit.DoInitPopup; -begin - inherited DoInitPopup; - CreatePopupControls; -end; - -function TcxCustomBlobEdit.GetPictureGraphicClass( - APastingFromClipboard: Boolean = False): TGraphicClass; -begin - if IsInplace then - with InplaceParams do - Result := ActiveProperties.GetPictureGraphicClass(Position.Item, - Position.RecordIndex, APastingFromClipboard) - else - begin - Result := ActiveProperties.PictureGraphicClass; - if Result = nil then - begin - if APastingFromClipboard then - Result := TBitmap; - if Assigned(FOnGetGraphicClass) then - FOnGetGraphicClass(Self, APastingFromClipboard, Result); - end; - end; -end; - -procedure TcxCustomBlobEdit.Initialize; -begin - inherited Initialize; - ControlStyle := ControlStyle - [csSetCaption]; - TabStop := True; -end; - -function TcxCustomBlobEdit.InternalGetText: string; -begin - if IsDesigning then - begin - Result := VarToStr(EditValue); - Exit; - end; - Result := ''; - if ActiveProperties.BlobEditKind = bekMemo then - if HasPopupWindow then - Result := TcxPopupMemo(FStorage).Text - else - if VarIsStr(EditValue) then - Result := VarToStr(EditValue); -end; - -function TcxCustomBlobEdit.InternalSetText(const Value: string): Boolean; -begin - if IsDesigning then - begin - EditValue := Value; - Result := True; - Exit; - end; - Result := ActiveProperties.BlobEditKind = bekMemo; - if not Result then - Exit; - if HasPopupWindow then - TcxPopupMemo(FStorage).EditingText := Value - else - EditValue := Value; -end; - -procedure TcxCustomBlobEdit.PopupWindowClosed(Sender: TObject); -begin - LockChangeEvents(True); - try - SaveStorage; - inherited PopupWindowClosed(Sender); - ShortRefreshContainer(False); - finally - LockChangeEvents(False); - end; -end; - -procedure TcxCustomBlobEdit.PropertiesChanged(Sender: TObject); -begin - if IsDestroying then - Exit; - inherited PropertiesChanged(Sender); - ShortRefreshContainer(False); - if HasPopupWindow and (FStorage is TcxPopupImage) then - TcxPopupImage(FStorage).ActiveProperties.GraphicClass := - ActiveProperties.PictureGraphicClass; - if HasPopupWindow and (FStorage is TcxPopupMemo) then - begin - TcxPopupMemo(FStorage).ActiveProperties.ImeMode := ActiveProperties.ImeMode; - TcxPopupMemo(FStorage).ActiveProperties.ImeName := ActiveProperties.ImeName; - end; -end; - -procedure TcxCustomBlobEdit.SetEditingText(const Value: TCaption); -begin - if ActiveProperties.BlobEditKind = bekMemo then - if HasPopupWindow then - Text := Value - else - inherited SetEditingText(Value); -end; - -procedure TcxCustomBlobEdit.SetupPopupWindow; -var - AHeight, ADelta: Integer; - R: TRect; -begin - if FCancelButton = nil then - begin - inherited SetupPopupWindow; - Exit; - end; - TcxEditStyleAccess(Style).PopupCloseButton := False; - inherited SetupPopupWindow; - AHeight := FCancelButton.Height; - ADelta := FButtonWidth + AHeight div 6; - - R := PopupWindow.ViewInfo.SizeGripRect; - if PopupWindow.ViewInfo.SizeGripCorner in [ecoTopRight, ecoBottomRight] then - Inc(ADelta, PopupWindow.Width - R.Left) - else - begin - Inc(ADelta, AHeight div 6); - if ADelta - FButtonWidth < R.Left then - ADelta := R.Left + FButtonWidth; - end; - if PopupWindow.ViewInfo.SizeGripCorner in [ecoTopLeft, ecoTopRight] then - begin - FCancelButton.SetBounds(PopupWindow.Width - ADelta, - R.Top + (PopupWindow.MinSysPanelHeight - AHeight) div 2 - 2, FButtonWidth, AHeight); - FCancelButton.Anchors := [akTop, akRight]; - end - else - begin - FCancelButton.SetBounds(PopupWindow.Width - ADelta, - R.Bottom - (AHeight + (PopupWindow.MinSysPanelHeight - AHeight) div 2 - 2), - FButtonWidth, AHeight); - FCancelButton.Anchors := [akBottom, akRight]; - end; - - if FOkButton <> nil then - begin - FOkButton.SetBounds(FCancelButton.Left - (FButtonWidth + (AHeight div 3)), - FCancelButton.Top, FButtonWidth, AHeight); - FOkButton.Anchors := FCancelButton.Anchors; - end; -end; - -procedure TcxCustomBlobEdit.StorageEditingHandler(Sender: TObject; - var CanEdit: Boolean); -begin - CanEdit := CanModify; -end; - -procedure TcxCustomBlobEdit.SynchronizeDisplayValue; -begin - ShortRefreshContainer(False); -end; - -procedure TcxCustomBlobEdit.SynchronizeEditValue; -begin - if (ActiveProperties.BlobEditKind = bekMemo) and (FStorage <> nil) then - inherited SynchronizeEditValue; -end; - -class function TcxCustomBlobEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomBlobEditProperties; -end; - -function TcxCustomBlobEdit.IsEditClass: Boolean; -begin - Result := False; -end; - -{ TcxBlobEdit } - -class function TcxBlobEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxBlobEditProperties; -end; - -function TcxBlobEdit.GetActiveProperties: TcxBlobEditProperties; -begin - Result := TcxBlobEditProperties(InternalGetActiveProperties); -end; - -function TcxBlobEdit.GetProperties: TcxBlobEditProperties; -begin - Result := TcxBlobEditProperties(FProperties); -end; - -procedure TcxBlobEdit.SetProperties(Value: TcxBlobEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterBlobEditHelper } - -class function TcxFilterBlobEditHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoBlanks, fcoNonBlanks]; - if (AProperties is TcxBlobEditProperties) and - (TcxBlobEditProperties(AProperties).BlobEditKind = bekMemo) then - Result := Result + [fcoLike, fcoNotLike]; -end; - -{ TcxBlobEditPopupWindow } - -procedure TcxBlobEditPopupWindow.DoPopupControlKey(Key: Char); -var - AStorage: TcxCustomEdit; -begin - AStorage := TcxCustomBlobEdit(Edit).FStorage; - if AStorage is TcxMemo then - if not TcxMemo(AStorage).ActiveProperties.ReadOnly then - if TcxCustomBlobEdit(Edit).ActiveProperties.MemoAutoReplace then - begin - TcxMemoAccess(AStorage).InnerEdit.EditValue := Key; - TcxMemo(AStorage).SelStart := 1; - TcxMemo(AStorage).ModifiedAfterEnter := True; - end - else - inherited DoPopupControlKey(Key); -end; - -procedure LoadBlobImages; -var - Bmp: TBitmap; -begin - Bmp := TBitmap.Create; - try - Bmp.LoadFromResourceName(HInstance, cxbmBlobNull); - imgBlobImages := TImageList.CreateSize(Bmp.Width, Bmp.Height); - imgBlobImages.AddMasked(Bmp, clOlive); - Bmp.LoadFromResourceName(HInstance, cxbmBlob); - imgBlobImages.AddMasked(Bmp, clOlive); - Bmp.LoadFromResourceName(HInstance, cxbmMemoNull); - imgBlobImages.AddMasked(Bmp, clOlive); - Bmp.LoadFromResourceName(HInstance, cxbmMemo); - imgBlobImages.AddMasked(Bmp, clOlive); - Bmp.LoadFromResourceName(HInstance, cxbmPictNull); - imgBlobImages.AddMasked(Bmp, clOlive); - Bmp.LoadFromResourceName(HInstance, cxbmPict); - imgBlobImages.AddMasked(Bmp, clOlive); - Bmp.LoadFromResourceName(HInstance, cxbmOleNull); - imgBlobImages.AddMasked(Bmp, clOlive); - Bmp.LoadFromResourceName(HInstance, cxbmOle); - imgBlobImages.AddMasked(Bmp, clOlive); - finally - Bmp.Free; - end; -end; - -initialization - LoadBlobImages; - GetRegisteredEditProperties.Register(TcxBlobEditProperties, scxSEditRepositoryBlobItem); - -finalization - FreeAndNil(imgBlobImages); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxButtonEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxButtonEdit.pas deleted file mode 100644 index 60e03515..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxButtonEdit.pas +++ /dev/null @@ -1,266 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxButtonEdit; - -{$I cxVer.inc} - -interface - -uses - Classes, cxContainer, cxEdit, cxMaskEdit; - -type - { TcxCustomButtonEditProperties } - - TcxCustomButtonEditProperties = class(TcxCustomMaskEditProperties) - public - constructor Create(AOwner: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - end; - - { TcxButtonEditProperties } - - TcxButtonEditProperties = class(TcxCustomButtonEditProperties) - published - property Alignment; - property AssignedValues; - property AutoSelect; - property BeepOnError; - property Buttons; - property CaseInsensitive; - property CharCase; - property ClearKey; - property ClickKey; - property EchoMode; - // deprecated - property HideCursor; - property HideSelection; - property IgnoreMaskBlank; - property ImeMode; - property ImeName; - property IncrementalSearch; - property LookupItems; - property LookupItemsSorted; - property MaskKind; - property EditMask; - property MaxLength; - property OEMConvert; - property PasswordChar; - property ReadOnly; - property UseLeftAlignmentOnEditing; - property ValidateOnEnter; - property ViewStyle; - property OnButtonClick; - property OnChange; - property OnEditValueChanged; - property OnNewLookupDisplayText; - property OnValidate; - end; - - { TcxCustomButtonEdit } - - TcxCustomButtonEdit = class(TcxCustomMaskEdit) - private - function GetProperties: TcxCustomButtonEditProperties; - function GetActiveProperties: TcxCustomButtonEditProperties; - procedure SetProperties(Value: TcxCustomButtonEditProperties); - protected - function InternalGetNotPublishedStyleValues: TcxEditStyleValues; override; - function SupportsSpelling: Boolean; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCustomButtonEditProperties - read GetActiveProperties; - property Properties: TcxCustomButtonEditProperties read GetProperties - write SetProperties; - end; - - { TcxButtonEdit } - - TcxButtonEdit = class(TcxCustomButtonEdit) - private - FAreButtonsLoaded: Boolean; - function GetActiveProperties: TcxButtonEditProperties; - function GetProperties: TcxButtonEditProperties; - procedure SetProperties(Value: TcxButtonEditProperties); - protected - procedure ReadState(Reader: TReader); override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxButtonEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragMode; - property Enabled; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxButtonEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Text; - {$IFDEF DELPHI12} - property TextHint; - {$ENDIF} - property Visible; - property DragCursor; - property DragKind; - property ImeMode; - property ImeName; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnEndDock; - property OnStartDock; - end; - -implementation - -uses - cxEditConsts; - -{ TcxCustomButtonEditProperties } - -constructor TcxCustomButtonEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - Buttons.Add; - Buttons[0].Kind := bkEllipsis; - Buttons[0].Default := True; -end; - -class function TcxCustomButtonEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxButtonEdit; -end; - -{ TcxCustomButtonEdit } - -class function TcxCustomButtonEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomButtonEditProperties; -end; - -function TcxCustomButtonEdit.InternalGetNotPublishedStyleValues: TcxEditStyleValues; -begin - Result := inherited InternalGetNotPublishedStyleValues - - [svButtonStyle, svButtonTransparency, svGradientButtons]; -end; - -function TcxCustomButtonEdit.SupportsSpelling: Boolean; -begin - Result := IsTextInputMode; -end; - -function TcxCustomButtonEdit.GetProperties: TcxCustomButtonEditProperties; -begin - Result := TcxCustomButtonEditProperties(FProperties); -end; - -function TcxCustomButtonEdit.GetActiveProperties: TcxCustomButtonEditProperties; -begin - Result := TcxCustomButtonEditProperties(InternalGetActiveProperties); -end; - -procedure TcxCustomButtonEdit.SetProperties(Value: TcxCustomButtonEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxButtonEdit } - -class function TcxButtonEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxButtonEditProperties; -end; - -procedure TcxButtonEdit.ReadState(Reader: TReader); -begin - if not FAreButtonsLoaded then - begin - Properties.Buttons.Clear; - ActiveProperties.Buttons.Clear; - FAreButtonsLoaded := True; - end; - inherited ReadState(Reader); -end; - -function TcxButtonEdit.GetActiveProperties: TcxButtonEditProperties; -begin - Result := TcxButtonEditProperties(InternalGetActiveProperties); -end; - -function TcxButtonEdit.GetProperties: TcxButtonEditProperties; -begin - Result := TcxButtonEditProperties(FProperties); -end; - -procedure TcxButtonEdit.SetProperties(Value: TcxButtonEditProperties); -begin - FProperties.Assign(Value); -end; - -initialization - GetRegisteredEditProperties.Register(TcxButtonEditProperties, scxSEditRepositoryButtonItem); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxButtons.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxButtons.pas deleted file mode 100644 index 6c38a710..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxButtons.pas +++ /dev/null @@ -1,2463 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxButtons; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, dxThemeManager, - Types, Classes, Controls, Graphics, StdCtrls, Forms, Menus, ImgList, - cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, Buttons, cxControls, - cxContainer, cxClasses; - -const - CM_DROPDOWNPOPUPMENU = WM_DX + 1; - CM_CLOSEUPPOPUPMENU = WM_DX + 2; - cxDropDownButtonWidth = 15; - -type - TcxCustomButton = class; - TcxButtonKind = (cxbkStandard, cxbkDropDown, cxbkDropDownButton); - TcxButtonAssignedColor = (cxbcDefault, cxbcDefaultText, cxbcDisabled, cxbcDisabledText, - cxbcHot, cxbcHotText, cxbcNormal, cxbcNormalText, cxbcPressed, cxbcPressedText); - TcxButtonAssignedColors = set of TcxButtonAssignedColor; - TcxButtonGetDrawParamsEvent = procedure(Sender: TcxCustomButton; - AState: TcxButtonState; var AColor: TColor; AFont: TFont) of object; - - { TcxButtonColors } - - TcxButtonColors = class(TPersistent) - private - FButton: TcxCustomButton; - FAssignedColors: TcxButtonAssignedColors; - FColors: array[TcxButtonAssignedColor] of TColor; - function GetColor(const Index: Integer): TColor; - function IsColorStored(const Index: Integer): Boolean; - procedure SetAssignedColors(Value: TcxButtonAssignedColors); - procedure SetColor(const Index: Integer; const Value: TColor); - function ButtonStateToButtonAssignedColor(AState: TcxButtonState; AIsTextColor: Boolean): TcxButtonAssignedColor; - protected - function GetColorByState(const AState: TcxButtonState): TColor; - function GetTextColorByState(const AState: TcxButtonState): TColor; - public - constructor Create(AOwner: TcxCustomButton); - procedure Assign(Source: TPersistent); override; - published - property AssignedColors: TcxButtonAssignedColors read FAssignedColors write SetAssignedColors stored False; - property Default: TColor index Ord(cxbcDefault) read GetColor write SetColor stored IsColorStored; - property DefaultText: TColor index Ord(cxbcDefaultText) read GetColor write SetColor stored IsColorStored; - property Normal: TColor index Ord(cxbcNormal) read GetColor write SetColor stored IsColorStored; - property NormalText: TColor index Ord(cxbcNormalText) read GetColor write SetColor stored IsColorStored; - property Hot: TColor index Ord(cxbcHot) read GetColor write SetColor stored IsColorStored; - property HotText: TColor index Ord(cxbcHotText) read GetColor write SetColor stored IsColorStored; - property Pressed: TColor index Ord(cxbcPressed) read GetColor write SetColor stored IsColorStored; - property PressedText: TColor index Ord(cxbcPressedText) read GetColor write SetColor stored IsColorStored; - property Disabled: TColor index Ord(cxbcDisabled) read GetColor write SetColor stored IsColorStored; - property DisabledText: TColor index Ord(cxbcDisabledText) read GetColor write SetColor stored IsColorStored; - end; - - { TcxGlyphList } - - TcxGlyphList = class(TcxImageList) - private - FUsed: TBits; - FCount: Integer; - function AllocateIndex(ABitmap: TBitmap): Integer; - public - constructor CreateSize(AWidth, AHeight: Integer); - destructor Destroy; override; - function Add(AImage, AMask: TBitmap): Integer; reintroduce; - function AddMasked(AImage: TBitmap; AMaskColor: TColor): Integer; reintroduce; - procedure Delete(AIndex: Integer); - property Count: Integer read FCount; - end; - - TcxImageInfo = class - private - FGlyph: TBitmap; - FImages: TCustomImageList; - FImageIndex: Integer; - function GetOnChange: TNotifyEvent; - procedure SetGlyph(Value: TBitmap); - procedure SetImages(Value: TCustomImageList); - procedure SetImageIndex(Value: Integer); - procedure SetOnChange(Value: TNotifyEvent); - protected - function GetImageSize: TSize; - function IsImageAssigned: Boolean; - procedure GlyphChanged; - property Glyph: TBitmap read FGlyph write SetGlyph; - property Images: TCustomImageList read FImages write SetImages; - property ImageIndex: Integer read FImageIndex write SetImageIndex; - public - constructor Create; - destructor Destroy; override; - property OnChange: TNotifyEvent read GetOnChange write SetOnChange; - end; - - { TcxButtonGlyph } - - TcxButtonGlyph = class - private - FGlyphList: TcxGlyphList; - FIndexs: array[TButtonState] of Integer; - FNumGlyphs: TNumGlyphs; - FOnChange: TNotifyEvent; - - FImageInfo: TcxImageInfo; - - function GetGlyph: TBitmap; - function GetImageList: TCustomImageList; - function GetImageIndex: Integer; - procedure SetGlyph(Value: TBitmap); - procedure SetImageList(Value: TCustomImageList); - procedure SetImageIndex(Value: Integer); - - function GetImageSize: TSize; - function GetTransparentColor: TColor; - procedure GlyphChanged(Sender: TObject); - procedure SetNumGlyphs(Value: TNumGlyphs); - procedure Invalidate; - function CreateButtonGlyph(AState: TcxButtonState): Integer; - procedure CalcButtonLayout(ACanvas: TCanvas; const AClient: TRect; - const AOffset: TPoint; const ACaption: TCaption; ALayout: TButtonLayout; - AMargin, ASpacing: Integer; var GlyphPos: TPoint; var TextBounds: TRect; - ABiDiFlags: LongInt{$IFDEF DELPHI7}; AWordWrap: Boolean{$ENDIF}); - protected - function GetTextOffsets(ALayout: TButtonLayout): TRect; virtual; - - procedure DrawButtonGlyph(ACanvas: TCanvas; const AGlyphPos: TPoint; - AState: TcxButtonState); virtual; - procedure DrawButtonText(ACanvas: TCanvas; const ACaption: TCaption; - ATextBounds: TRect; AState: TcxButtonState; ABiDiFlags: LongInt; - ANativeStyle: Boolean; {$IFDEF DELPHI7} AWordWrap: Boolean;{$ENDIF} - ASkinsUsed: Boolean = False); virtual; - public - constructor Create; virtual; - destructor Destroy; override; - procedure Draw(ACanvas: TCanvas; const AClient: TRect; const AOffset: TPoint; - const ACaption: TCaption; ALayout: TButtonLayout; AMargin, ASpacing: Integer; - AState: TcxButtonState ; ABiDiFlags: LongInt; ANativeStyle: Boolean; - {$IFDEF DELPHI7} AWordWrap: Boolean;{$ENDIF} ASkinsUsed: Boolean = False); virtual; - - property ImageInfo: TcxImageInfo read FImageInfo; - property Glyph: TBitmap read GetGlyph write SetGlyph; - property ImageList: TCustomImageList read GetImageList write SetImageList; - property ImageIndex: Integer read GetImageIndex write SetImageIndex; - - property NumGlyphs: TNumGlyphs read FNumGlyphs write SetNumGlyphs; - property TransparentColor: TColor read GetTransparentColor; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - end; - - TcxButtonGlyphClass = class of TcxButtonGlyph; - - { TcxButtonActionLink } - - TcxButtonActionLink = class(TButtonActionLink) - private - function GetClient: TcxCustomButton; - property Client: TcxCustomButton read GetClient; - protected - procedure SetImageIndex(Value: Integer); override; - public - destructor Destroy; override; - end; - - { TcxSpeedButtonOptions } - - TcxButton = class; - - TcxSpeedButtonOptions = class(TPersistent) - private - FAllowAllUp: Boolean; - FCanBeFocused: Boolean; - FGroupIndex: Integer; - FFlat: Boolean; - FLockCount: Integer; - FOwner: TcxCustomButton; - FTransparent: Boolean; - function GetActive: Boolean; - function GetButton: TcxCustomButton; - function GetDown: Boolean; - procedure SetAllowAllUp(AValue: Boolean); - procedure SetCanBeFocused(AValue: Boolean); - procedure SetDown(AValue: Boolean); - procedure SetFlat(AValue: Boolean); - procedure SetGroupIndex(AValue: Integer); - procedure SetTransparent(AValue: Boolean); - procedure UpdateGroup; - protected - function GetOwner: TPersistent; override; - procedure UpdateGroupValues(const AGroupIndex: Integer; const ASpeedButtonOptions: TcxSpeedButtonOptions); - property Button: TcxCustomButton read GetButton; - property LockCount: Integer read FLockCount; - public - constructor Create(AOwner: TcxCustomButton); virtual; - procedure Assign(Source: TPersistent); override; - - procedure BeginUpdate; - procedure CancelUpdate; - procedure EndUpdate; - - property Active: Boolean read GetActive; - published - property GroupIndex: Integer read FGroupIndex write SetGroupIndex default 0; - property CanBeFocused: Boolean read FCanBeFocused write SetCanBeFocused default True; - property AllowAllUp: Boolean read FAllowAllUp write SetAllowAllUp default False; - property Down: Boolean read GetDown write SetDown default False; - property Flat: Boolean read FFlat write SetFlat default False; - property Transparent: Boolean read FTransparent write SetTransparent default False; - end; - - { TcxCustomButton } - - TcxButtonInternalState = set of (bisDown, bisHot, bisPressed, bisMenuButtonPressed, - bisMenuVisible, bisAccelExecute); - - TcxButtonDropDownMenuPopupEvent = procedure(Sender: TObject; - var APopupMenu: TPopupMenu; var AHandled: Boolean) of object; - -// for navigation -{$IFDEF DELPHI12} - TcxCustomButton = class(TCustomButton, IdxSkinSupport, IcxMouseTrackingCaller, IcxLookAndFeelContainer) -{$ELSE} - TcxCustomButton = class(TButton, IdxSkinSupport, IcxMouseTrackingCaller, IcxLookAndFeelContainer) -{$ENDIF} - private - FAutoSize: Boolean; - FInternalState: TcxButtonInternalState; - FCanvas: TcxCanvas; - FColors: TcxButtonColors; - FControlCanvas: TControlCanvas; - FDropDownMenu: TPopupMenu; - FIsFocused: Boolean; - FKind: TcxButtonKind; - FLookAndFeel: TcxLookAndFeel; - FIsDropDownMenuClosing: Boolean; - FIsPaintDefault: Boolean; - FIsPaintPressed: Boolean; - FPopupAlignment: TPopupAlignment; - FPopupMenu: TComponent; - FSpeedButtonOptions: TcxSpeedButtonOptions; - FUseSystemPaint: Boolean; // deprecated - - // glyph support - FGlyph: TcxButtonGlyph; - FLayout: TButtonLayout; - FMargin: Integer; - FSpacing: Integer; - - // events - FOnDropDownMenuPopup: TcxButtonDropDownMenuPopupEvent; - FOnGetDrawParams: TcxButtonGetDrawParamsEvent; - {$IFNDEF DELPHI10} - FOnMouseEnter: TNotifyEvent; - FOnMouseLeave: TNotifyEvent; - {$ENDIF} - - procedure InitializeCanvasColors(AState: TcxButtonState; out AColor: TColor); - // glyph support - procedure SetGlyph(Value: TBitmap); - function GetGlyph: TBitmap; - function GetNumGlyphs: TNumGlyphs; - procedure SetNumGlyphs(Value: TNumGlyphs); - procedure GlyphChanged(Sender: TObject); - procedure SetLayout(Value: TButtonLayout); - procedure SetSpacing(Value: Integer); - procedure SetMargin(Value: Integer); - procedure DrawItem(const DrawItemStruct: TDrawItemStruct); - procedure UpdateImageInfo; - - procedure WMCaptureChanged(var Message: TMessage); message WM_CAPTURECHANGED; - procedure WMContextMenu(var Message: TWMContextMenu); message WM_CONTEXTMENU; - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMLButtonDblClk(var Message: TWMLButtonDblClk); message WM_LBUTTONDBLCLK; - procedure CMCloseupPopupMenu(var Message: TMessage); message CM_CLOSEUPPOPUPMENU; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - procedure CMDropDownPopupMenu(var Message: TMessage); message CM_DROPDOWNPOPUPMENU; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; - procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM; - procedure CNKeyDown(var Message: TWMKeyDown); message CN_KEYDOWN; - procedure CNMeasureItem(var Message: TWMMeasureItem); message CN_MEASUREITEM; - procedure CNSysKeyDown(var Message: TWMSysKeyDown); message CN_SYSKEYDOWN; - procedure CMButtonPressed(var Message: TMessage); message CM_BUTTONPRESSED; - - procedure ExcludeDropDownButtonRect(var R: TRect); - procedure DoDropDownMenu; - function GetBorderRect(AState: TcxButtonState): TRect; - function GetContentRect: TRect; - function GetDropDownMenuAlignment(APopupPoint: TPoint; - AEstimatedAlignment: TPopupAlignment): TPopupAlignment; - function GetDropDownMenuPopupPoint(ADropDownMenu: TPopupMenu): TPoint; - procedure InternalPaint; - procedure InternalRecreateWindow; - function IsColorsStored: Boolean; - function CanHotTrack: Boolean; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); - procedure SetButtonAutoSize(Value: Boolean); - procedure SetColors(const Value: TcxButtonColors); - procedure SetKind(const Value: TcxButtonKind); - procedure SetLookAndFeel(Value: TcxLookAndFeel); - procedure SetPopupMenu(Value: TComponent); - - // speed button support - procedure CheckPressedState(const P: TPoint); - procedure CheckShowMenu(const P: TPoint); - function GetButtonState: TcxButtonState; - function GetAllowAllUp: Boolean; - function GetCanBeFocused: Boolean; - function GetDown: Boolean; - function GetGroupIndex: Integer; - function GetMenuButtonBounds: TRect; - function GetSpeedButtonMode: Boolean; - procedure SetAllowAllUp(AValue: Boolean); - procedure SetCanBeFocused(AValue: Boolean); - procedure SetDown(AValue: Boolean); - procedure SetGroupIndex(AValue: Integer); - procedure SetSpeedButtonOptions(AValue: TcxSpeedButtonOptions); - protected - procedure WndProc(var Message: TMessage); override; - procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override; - function CanResize(var NewWidth, NewHeight: Integer): Boolean; override; - function GetActionLinkClass: TControlActionLinkClass; override; - function GetChecked: Boolean; override; - procedure SetChecked(Value: Boolean); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure Notification(AComponent: TComponent; - Operation: TOperation); override; - procedure CreateHandle; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure DestroyWindowHandle; override; - function GetPalette: HPALETTE; override; - procedure SetButtonStyle(ADefault: Boolean); override; - procedure DoContextPopup(MousePos: TPoint; - var Handled: Boolean); override; - function DoOnDropDownMenuPopup(var APopupMenu: TPopupMenu): Boolean; virtual; - function DoShowPopupMenu(APopupMenu: TComponent; - X, Y: Integer): Boolean; virtual; - function GetGlyphClass: TcxButtonGlyphClass; virtual; - function GetPainterClass: TcxCustomLookAndFeelPainterClass; virtual; - function IsDesigning: Boolean; - function StandardButton: Boolean; virtual; - procedure UpdateSize; - - // Mouse Events - procedure DblClick; override; - {$IFNDEF DELPHI10} - procedure DoMouseEnter; virtual; - procedure DoMouseLeave; virtual; - {$ENDIF} - procedure MouseEnter; dynamic; - procedure MouseLeave; dynamic; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - - //IcxMouseTrackingCaller - procedure IcxMouseTrackingCaller.MouseLeave = MouseLeave; - - // IcxLookAndFeelContainer - function GetLookAndFeel: TcxLookAndFeel; - - property AutoSize: Boolean read FAutoSize write SetButtonAutoSize default False; - property Colors: TcxButtonColors read FColors write SetColors stored IsColorsStored; - property DropDownMenu: TPopupMenu read FDropDownMenu write FDropDownMenu; - property Glyph: TBitmap read GetGlyph write SetGlyph; - property InternalState: TcxButtonInternalState read FInternalState; - property Kind: TcxButtonKind read FKind write SetKind default cxbkStandard; - property Layout: TButtonLayout read FLayout write SetLayout default blGlyphLeft; - property Margin: Integer read FMargin write SetMargin default -1; - property NumGlyphs: TNumGlyphs read GetNumGlyphs write SetNumGlyphs default 1; - property PopupAlignment: TPopupAlignment read FPopupAlignment - write FPopupAlignment default paLeft; - property Spacing: Integer read FSpacing write SetSpacing default 4; - property UseSystemPaint: Boolean read FUseSystemPaint - write FUseSystemPaint default False; // deprecated - - // speed button support - property AllowAllUp: Boolean read GetAllowAllUp write SetAllowAllUp default False; - property CanBeFocused: Boolean read GetCanBeFocused write SetCanBeFocused default True; - property Down: Boolean read GetDown write SetDown default False; - property GroupIndex: Integer read GetGroupIndex write SetGroupIndex default 0; - property SpeedButtonMode: Boolean read GetSpeedButtonMode; - property SpeedButtonOptions: TcxSpeedButtonOptions read FSpeedButtonOptions write SetSpeedButtonOptions; - - property OnDropDownMenuPopup: TcxButtonDropDownMenuPopupEvent - read FOnDropDownMenuPopup write FOnDropDownMenuPopup; - property OnGetDrawParams: TcxButtonGetDrawParamsEvent - read FOnGetDrawParams write FOnGetDrawParams; - {$IFNDEF DELPHI10} - property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter; - property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave; - {$ENDIF} - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Click; override; - function CanFocus: Boolean; override; - function GetOptimalSize: TSize; virtual; - function UpdateAction(Action: TBasicAction): Boolean; override; - property LookAndFeel: TcxLookAndFeel read FLookAndFeel write SetLookAndFeel; - property PopupMenu: TComponent read FPopupMenu write SetPopupMenu; - {$IFDEF DELPHI12} - property DragCursor; - property DragKind; - property DragMode; - property Font; - property ParentFont; - property WordWrap; - {$ENDIF} - end; - - { TcxButton } - - TcxButton = class(TcxCustomButton) - published - property Align; -// property AutoSize; - property CanBeFocused stored False; - property GroupIndex stored False; - property Down stored False; - property AllowAllUp stored False; - property Action; - property Anchors; - property BiDiMode; - property Cancel; - property Caption; - property Colors; - property Constraints; - property Default; - property DropDownMenu; - property Enabled; - property Glyph; - property Kind; - property Layout; - property LookAndFeel; - property Margin; - property ModalResult; - property NumGlyphs; - property ParentBiDiMode; - property ParentShowHint; - property PopupAlignment; - property PopupMenu; - property ShowHint; - property Spacing; - property SpeedButtonOptions; - property TabOrder; - property TabStop; - property UseSystemPaint; // deprecated - property Visible; - property OnDropDownMenuPopup; - property OnEnter; - property OnExit; - property OnGetDrawParams; - property OnMouseEnter; - property OnMouseLeave; - - {$IFDEF DELPHI12} - property DragCursor; - property DragKind; - property DragMode; - property Font; - property ParentFont; - property WordWrap; - property OnClick; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - {$ENDIF} - end; - -function GetButtonPainterClass(ALookAndFeel: TcxLookAndFeel): TcxCustomLookAndFeelPainterClass; - -implementation - -uses - dxUxTheme, CommCtrl, dxThemeConsts, - cxGeometry, SysUtils, Consts, Dialogs, ActnList, Math; - -const - cxBtnStdVertTextOffsetCorrection = -1; - TextRectCorrection: TRect = (Left: 1; Top: 0; Right: 2; Bottom: 0); - -function GetButtonPainterClass(ALookAndFeel: TcxLookAndFeel): TcxCustomLookAndFeelPainterClass; -begin - if ALookAndFeel.SkinPainter <> nil then - Result := ALookAndFeel.SkinPainter - else - begin - Result := ALookAndFeel.Painter; - if Result.LookAndFeelStyle = lfsOffice11 then - if AreVisualStylesAvailable(totButton) then - Result := TcxWinXPLookAndFeelPainter - else - Result := TcxStandardLookAndFeelPainter; - end; -end; - -{ TcxButtonColors } - -constructor TcxButtonColors.Create(AOwner: TcxCustomButton); -var - AState: TcxButtonAssignedColor; -begin - inherited Create; - FButton := AOwner; - for AState := Low(AState) to High(AState) do - FColors[AState] := clDefault; -end; - -function TcxButtonColors.GetColor(const Index: Integer): TColor; -begin - Result := FColors[TcxButtonAssignedColor(Index)]; -end; - -function TcxButtonColors.IsColorStored(const Index: Integer): Boolean; -begin - Result := TcxButtonAssignedColor(Index) in FAssignedColors; -end; - -procedure TcxButtonColors.SetAssignedColors( - Value: TcxButtonAssignedColors); -var - AState: TcxButtonAssignedColor; -begin - if (FAssignedColors <> Value) and FButton.IsDesigning then - begin - for AState := Low(AState) to High(AState) do - if not (AState in Value) then - FColors[AState] := clDefault - else - if FColors[AState] = clDefault then Exclude(Value, AState); - FAssignedColors := Value; - FButton.Invalidate; - end; -end; - -procedure TcxButtonColors.SetColor(const Index: Integer; - const Value: TColor); -begin - if (Value = clNone) or (Value = clDefault) then - begin - FColors[TcxButtonAssignedColor(Index)] := clDefault; - Exclude(FAssignedColors, TcxButtonAssignedColor(Index)); - FButton.Invalidate; - end - else if GetColor(Index) <> Value then - begin - FColors[TcxButtonAssignedColor(Index)] := Value; - Include(FAssignedColors, TcxButtonAssignedColor(Index)); - FButton.Invalidate; - end; -end; - -function TcxButtonColors.ButtonStateToButtonAssignedColor(AState: TcxButtonState; AIsTextColor: Boolean): TcxButtonAssignedColor; -begin - if AIsTextColor then - Result := cxbcNormalText - else - Result := cxbcNormal; - case AState of - cxbsDefault: - if AIsTextColor then - Result := cxbcDefaultText - else - Result := cxbcDefault; - cxbsHot: - if AIsTextColor then - Result := cxbcHotText - else - Result := cxbcHot; - cxbsPressed: - if AIsTextColor then - Result := cxbcPressedText - else - Result := cxbcPressed; - cxbsDisabled: - if AIsTextColor then - Result := cxbcDisabledText - else - Result := cxbcDisabled; - end; -end; - -function TcxButtonColors.GetColorByState(const AState: TcxButtonState): TColor; -var - AButtonColor: TcxButtonAssignedColor; -begin - AButtonColor := ButtonStateToButtonAssignedColor(AState, False); - if AButtonColor in AssignedColors then - Result := FColors[AButtonColor] - else - if AButtonColor = cxbcNormal then - Result := FColors[cxbcDefault] - else - Result := FColors[cxbcNormal]; -end; - -function TcxButtonColors.GetTextColorByState(const AState: TcxButtonState): TColor; -var - AButtonColor: TcxButtonAssignedColor; -begin - AButtonColor := ButtonStateToButtonAssignedColor(AState, True); - if AButtonColor in AssignedColors then - Result := FColors[AButtonColor] - else - if AButtonColor = cxbcNormalText then - Result := FColors[cxbcDefaultText] - else - Result := FColors[cxbcNormalText]; -end; - -procedure TcxButtonColors.Assign(Source: TPersistent); -begin - if Source is TcxButtonColors then - with TcxButtonColors(Source) do - begin - Self.FColors := FColors; - Self.FAssignedColors := FAssignedColors; - Self.FButton.Invalidate; - end - else - inherited Assign(Source); -end; - -{ TcxGlyphList } - -constructor TcxGlyphList.CreateSize(AWidth, AHeight: Integer); -begin - inherited CreateSize(AWidth, AHeight); - FUsed := TBits.Create; -end; - -destructor TcxGlyphList.Destroy; -begin - FreeAndNil(FUsed); - inherited Destroy; -end; - -function TcxGlyphList.AllocateIndex(ABitmap: TBitmap): Integer; -begin - Result := FUsed.OpenBit; - if Result >= FUsed.Size then - begin - Result := inherited Add(ABitmap, nil); - FUsed.Size := Result + 1; - end; - FUsed[Result] := True; -end; - -function TcxGlyphList.Add(AImage, AMask: TBitmap): Integer; -begin - Result := AllocateIndex(AImage); - Replace(Result, AImage, AMask); - Inc(FCount); -end; - -function TcxGlyphList.AddMasked(AImage: TBitmap; AMaskColor: TColor): Integer; -begin - Result := AllocateIndex(AImage); - ReplaceMasked(Result, AImage, AMaskColor); - Inc(FCount); -end; - -procedure TcxGlyphList.Delete(AIndex: Integer); -begin - if FUsed[AIndex] then - begin - Dec(FCount); - FUsed[AIndex] := False; - end; -end; - -type - { TcxGlyphCache } - - TcxGlyphCache = class - private - FGlyphLists: TList; - public - constructor Create; - destructor Destroy; override; - function GetList(AWidth, AHeight: Integer): TcxGlyphList; - procedure ReturnList(AList: TcxGlyphList); - function Empty: Boolean; - end; - -{ TcxGlyphCache } - -constructor TcxGlyphCache.Create; -begin - inherited Create; - FGlyphLists := TList.Create; -end; - -destructor TcxGlyphCache.Destroy; -begin - FreeAndNil(FGlyphLists); - inherited Destroy; -end; - -function TcxGlyphCache.GetList(AWidth, AHeight: Integer): TcxGlyphList; -var - I: Integer; -begin - for I := FGlyphLists.Count - 1 downto 0 do - begin - Result := TcxGlyphList(FGlyphLists[I]); - with Result do - if (AWidth = Width) and (AHeight = Height) then Exit; - end; - Result := TcxGlyphList.CreateSize(AWidth, AHeight); - FGlyphLists.Add(Result); -end; - -procedure TcxGlyphCache.ReturnList(AList: TcxGlyphList); -begin - if AList = nil then Exit; - if AList.Count = 0 then - begin - FGlyphLists.Remove(AList); - AList.Free; - end; -end; - -function TcxGlyphCache.Empty: Boolean; -begin - Result := FGlyphLists.Count = 0; -end; - -var - GlyphCache: TcxGlyphCache = nil; - -{ TcxImageInfo } - -constructor TcxImageInfo.Create; -begin - inherited Create; - FGlyph := TBitmap.Create; - FGlyph.OnChange := OnChange; - FImageIndex := -1; -end; - -destructor TcxImageInfo.Destroy; -begin - FreeAndNil(FGlyph); - inherited; -end; - -function TcxImageInfo.GetImageSize: TSize; -begin - if not IsImageAssigned then - Result := cxNullSize - else - if IsGlyphAssigned(Glyph) then - begin - if (Glyph.Width = 0) or (Glyph.Height = 0) then - Glyph.Handle; //HandleNeeded - Result := Size(Glyph.Width, Glyph.Height) - end - else - Result := Size(Images.Width, Images.Height); -end; - -function TcxImageInfo.IsImageAssigned: Boolean; -begin - Result := IsGlyphAssigned(Glyph) or cxGraphics.IsImageAssigned(Images, ImageIndex); -end; - -procedure TcxImageInfo.GlyphChanged; -begin - CallNotify(OnChange, nil); -end; - -function TcxImageInfo.GetOnChange: TNotifyEvent; -begin - Result := FGlyph.OnChange; -end; - -procedure TcxImageInfo.SetGlyph(Value: TBitmap); -begin - FGlyph.Assign(Value); -end; - -procedure TcxImageInfo.SetImages(Value: TCustomImageList); -begin - if Images <> Value then - begin - FImages := Value; - if not IsGlyphAssigned(Glyph) and (ImageIndex <> -1) then - GlyphChanged; - end; -end; - -procedure TcxImageInfo.SetImageIndex(Value: Integer); -begin - if ImageIndex <> Value then - begin - FImageIndex := Value; - if not IsGlyphAssigned(Glyph) and (Images <> nil) then - GlyphChanged; - end; -end; - -procedure TcxImageInfo.SetOnChange(Value: TNotifyEvent); -begin - FGlyph.OnChange := Value; -end; - -{ TcxButtonGlyph } - -constructor TcxButtonGlyph.Create; -var - I: TButtonState; -begin - inherited Create; - FImageInfo := TcxImageInfo.Create; - FImageInfo.OnChange := GlyphChanged; - FNumGlyphs := 1; - for I := Low(I) to High(I) do - FIndexs[I] := -1; - if GlyphCache = nil then GlyphCache := TcxGlyphCache.Create; -end; - -destructor TcxButtonGlyph.Destroy; -begin - FreeAndNil(FImageInfo); - Invalidate; - if Assigned(GlyphCache) and GlyphCache.Empty then - FreeAndNil(GlyphCache); - inherited Destroy; -end; - -procedure TcxButtonGlyph.Invalidate; -var - I: TButtonState; -begin - for I := Low(I) to High(I) do - begin - if FIndexs[I] <> -1 then FGlyphList.Delete(FIndexs[I]); - FIndexs[I] := -1; - end; - GlyphCache.ReturnList(FGlyphList); - FGlyphList := nil; -end; - -function TcxButtonGlyph.GetImageSize: TSize; -begin - Result := ImageInfo.GetImageSize; - Result.cx := Result.cx div FNumGlyphs; -end; - -function TcxButtonGlyph.GetTransparentColor: TColor; -begin - Result := Glyph.TransparentColor; -end; - -procedure TcxButtonGlyph.GlyphChanged(Sender: TObject); -begin - Invalidate; - if Assigned(FOnChange) then FOnChange(Self); -end; - -function TcxButtonGlyph.GetGlyph: TBitmap; -begin - Result := ImageInfo.Glyph; -end; - -function TcxButtonGlyph.GetImageList: TCustomImageList; -begin - Result := ImageInfo.Images; -end; - -function TcxButtonGlyph.GetImageIndex: Integer; -begin - Result := ImageInfo.ImageIndex; -end; - -procedure TcxButtonGlyph.SetGlyph(Value: TBitmap); -var - ANumGlyphs: Integer; -begin - ANumGlyphs := 1; - ImageInfo.Glyph := Value; - if (Value <> nil) and (Value.Height > 0) then - begin - if Value.Width mod Value.Height = 0 then - begin - ANumGlyphs := Value.Width div Value.Height; - if ANumGlyphs > 4 then ANumGlyphs := 1; - end; - end; - NumGlyphs := ANumGlyphs; -end; - -procedure TcxButtonGlyph.SetImageList(Value: TCustomImageList); -begin - ImageInfo.Images := Value; -end; - -procedure TcxButtonGlyph.SetImageIndex(Value: Integer); -begin - ImageInfo.ImageIndex := Value; -end; - -procedure TcxButtonGlyph.SetNumGlyphs(Value: TNumGlyphs); -begin - Value := Min(Max(Value, 1), 4); - if Value <> FNumGlyphs then - begin - FNumGlyphs := Value; - GlyphChanged(Glyph); - end; -end; - -function TcxButtonGlyph.CreateButtonGlyph(AState: TcxButtonState): Integer; - - function GetStandardButtonState(AState: TcxButtonState): TButtonState; - const - States: array[TcxButtonState] of TButtonState = - //cxbsDefault, cxbsNormal, cxbsHot, cxbsPressed, cxbsDisabled; - (bsUp, bsUp, bsUp, bsDown, bsDisabled); - begin - Result := States[AState]; - if (Result = bsDown) and (NumGlyphs < 3) then - Result := bsUp; - end; - - function GetGlyphList(AWidth, AHeight: Integer): TcxGlyphList; - begin - if FGlyphList = nil then - begin - if GlyphCache = nil then - GlyphCache := TcxGlyphCache.Create; - FGlyphList := GlyphCache.GetList(AWidth, AHeight); - end; - Result := FGlyphList; - end; - - procedure InternalMakeImagesFromGlyph(AStandardButtonState: TButtonState; AImage, AMask: TBitmap; const AImageBounds: TRect); - var - ASrcPoint: TPoint; - AOffset: Integer; - begin - AOffset := Ord(AStandardButtonState); - if AOffset >= NumGlyphs then - AOffset := 0; - - if (AStandardButtonState = bsDisabled) and (NumGlyphs = 1) then - cxDrawImage(AImage.Canvas.Handle, AImageBounds, AImageBounds, Glyph, nil, -1, idmDisabled, False, 0, TransparentColor, False) - else - begin - ASrcPoint := cxRectOffset(AImageBounds, AOffset * cxRectWidth(AImageBounds), 0).TopLeft; - cxDrawBitmap(AImage.Canvas.Handle, Glyph, AImageBounds, ASrcPoint); - end; - if (NumGlyphs <> 1) or (AStandardButtonState <> bsDisabled) then - AImage.TransparentColor := Glyph.TransparentColor; - cxMakeMaskBitmap(AImage, AMask); - Glyph.Dormant; - end; - - procedure InternalMakeImagesFromImageList(AStandardButtonState: TButtonState; AImage, AMask: TBitmap; const AImageBounds: TRect); - begin - if AStandardButtonState = bsDisabled then - begin - cxDrawImage(AImage.Canvas.Handle, AImageBounds, AImageBounds, nil, ImageList, ImageIndex, idmDisabled); - cxMakeMaskBitmap(AImage, AMask); - end - else - TcxImageList.GetImageInfo(ImageList.Handle, ImageIndex, AImage, AMask); - end; - - function InternalCreateButtonGlyph(AStandardButtonState: TButtonState; const AImageSize: TSize): Integer; - var - AImage, AMask: TBitmap; - AImageBounds: TRect; - begin - AImage := TcxBitmap32.CreateSize(AImageSize.cx, AImageSize.cy, True); - AMask := cxCreateBitmap(AImageSize, pf1bit); - try - AImageBounds := cxRect(0, 0, AImageSize.cx, AImageSize.cy); - if IsGlyphAssigned(Glyph) then - InternalMakeImagesFromGlyph(AStandardButtonState, AImage, AMask, AImageBounds) - else - InternalMakeImagesFromImageList(AStandardButtonState, AImage, AMask, AImageBounds); - FIndexs[AStandardButtonState] := GetGlyphList(AImageSize.cx, AImageSize.cy).Add(AImage, AMask); - Result := FIndexs[AStandardButtonState]; - finally - AMask.Free; - AImage.Free; - end; - end; - - function GetGlyphIndex(AStandardButtonState: TButtonState): Integer; - begin - Result := FIndexs[AStandardButtonState]; - if (Result = -1) and ImageInfo.IsImageAssigned then - Result := InternalCreateButtonGlyph(AStandardButtonState, GetImageSize) - end; - -begin - Result := GetGlyphIndex(GetStandardButtonState(AState)); -end; - -procedure TcxButtonGlyph.CalcButtonLayout(ACanvas: TCanvas; const AClient: TRect; - const AOffset: TPoint; const ACaption: TCaption; ALayout: TButtonLayout; - AMargin, ASpacing: Integer; var GlyphPos: TPoint; var TextBounds: TRect; - ABiDiFlags: LongInt{$IFDEF DELPHI7}; AWordWrap: Boolean{$ENDIF}); - - procedure CheckLayout; - begin - if ABiDiFlags and DT_RIGHT = DT_RIGHT then - begin - if ALayout = blGlyphLeft then - ALayout := blGlyphRight - else - if ALayout = blGlyphRight then - ALayout := blGlyphLeft; - end; - end; - - function GetCaptionSize: TPoint; - var - ADrawTextFlags: Integer; - ATextOffsets: TRect; - begin - if Length(ACaption) = 0 then - begin - TextBounds := cxNullRect; - Result := cxNullPoint; - end - else - begin - TextBounds := Rect(0, 0, AClient.Right - AClient.Left, 0); - if ALayout in [blGlyphLeft, blGlyphRight] then - TextBounds.Right := TextBounds.Right - GetImageSize.cx - ASpacing; - ATextOffsets := GetTextOffsets(ALayout); - ExtendRect(TextBounds, ATextOffsets); - ADrawTextFlags := DT_CALCRECT or ABiDiFlags; - {$IFDEF DELPHI7} - if AWordWrap then - ADrawTextFlags := ADrawTextFlags or DT_WORDBREAK; - {$ENDIF} - cxDrawText(ACanvas.Handle, ACaption, TextBounds, ADrawTextFlags); - with TextBounds do - Result := Point(Right - Left, Bottom - Top); - Inc(Result.X, ATextOffsets.Left + ATextOffsets.Right); - Inc(Result.Y, ATextOffsets.Top + ATextOffsets.Bottom); - end; - end; - -var - ATextPos: TPoint; - AGlyphSize: TSize; - AClientSize, ATextSize: TPoint; - ATotalSize: TPoint; -begin - CheckLayout; - ATextSize := GetCaptionSize; - with AClient do - AClientSize := Point(Right - Left, Bottom - Top); - -(* if FOriginal.Empty then - begin - GlyphPos := EmptyPoint; - ATextPos.X := (AClientSize.X - ATextSize.X) div 2; - ATextPos.Y := (AClientSize.Y - ATextSize.Y - 1) div 2; - OffsetRect(TextBounds, ATextPos.X + AOffset.X, ATextPos.Y + AOffset.Y); - Exit; - end;*) - - AGlyphSize := GetImageSize; - if ALayout in [blGlyphLeft, blGlyphRight] then - begin - GlyphPos.Y := (AClientSize.Y - AGlyphSize.cy) div 2; - ATextPos.Y := (AClientSize.Y - ATextSize.Y + - cxBtnStdVertTextOffsetCorrection) div 2; - end - else - begin - GlyphPos.X := (AClientSize.X - AGlyphSize.cx) div 2; - ATextPos.X := (AClientSize.X - ATextSize.X) div 2; - end; - - if (ATextSize.X = 0) or (AGlyphSize.cx = 0) then ASpacing := 0; - - if AMargin = -1 then - begin - if ASpacing = -1 then - begin - ATotalSize := Point(AGlyphSize.cx + ATextSize.X, AGlyphSize.cy + ATextSize.Y); - if ALayout in [blGlyphLeft, blGlyphRight] then - AMargin := (AClientSize.X - ATotalSize.X) div 3 - else - AMargin := (AClientSize.Y - ATotalSize.Y) div 3; - ASpacing := AMargin; - end - else - begin - ATotalSize := Point(AGlyphSize.cx + ASpacing + ATextSize.X, AGlyphSize.cy + - ASpacing + ATextSize.Y); - if ALayout in [blGlyphLeft, blGlyphRight] then - AMargin := (AClientSize.X - ATotalSize.X) div 2 - else - AMargin := (AClientSize.Y - ATotalSize.Y) div 2; - end; - end - else - begin - if ASpacing = -1 then - begin - ATotalSize := Point(AClientSize.X - (AMargin + AGlyphSize.cx), - AClientSize.Y - (AMargin + AGlyphSize.cy)); - if ALayout in [blGlyphLeft, blGlyphRight] then - ASpacing := (ATotalSize.X - ATextSize.X) div 2 - else - ASpacing := (ATotalSize.Y - ATextSize.Y) div 2; - end; - end; - case ALayout of - blGlyphLeft: - begin - GlyphPos.X := AMargin; - ATextPos.X := GlyphPos.X + AGlyphSize.cx + ASpacing; - end; - blGlyphRight: - begin - GlyphPos.X := AClientSize.X - AMargin - AGlyphSize.cx; - ATextPos.X := GlyphPos.X - ASpacing - ATextSize.X; - end; - blGlyphTop: - begin - GlyphPos.Y := AMargin; - ATextPos.Y := GlyphPos.Y + AGlyphSize.cy + ASpacing; - end; - blGlyphBottom: - begin - GlyphPos.Y := AClientSize.Y - AMargin - AGlyphSize.cy; - ATextPos.Y := GlyphPos.Y - ASpacing - ATextSize.Y; - end; - end; - with GlyphPos do - begin - Inc(X, AClient.Left + AOffset.X); - Inc(Y, AClient.Top + AOffset.Y); - end; - OffsetRect(TextBounds, AClient.Left + ATextPos.X + AOffset.X, AClient.Top + ATextPos.Y + AOffset.X); -end; - -procedure TcxButtonGlyph.Draw(ACanvas: TCanvas; const AClient: TRect; - const AOffset: TPoint; const ACaption: TCaption; ALayout: TButtonLayout; - AMargin, ASpacing: Integer; AState: TcxButtonState; - ABiDiFlags: LongInt; ANativeStyle: Boolean; - {$IFDEF DELPHI7} AWordWrap: Boolean;{$ENDIF} ASkinsUsed: Boolean = False); -var - AGlyphPos: TPoint; - ATextRect: TRect; -begin - CalcButtonLayout(ACanvas, AClient, AOffset, ACaption, ALayout, AMargin, - ASpacing, AGlyphPos, ATextRect, ABiDiFlags{$IFDEF DELPHI7}, AWordWrap{$ENDIF}); - DrawButtonGlyph(ACanvas, AGlyphPos, AState); - DrawButtonText(ACanvas, ACaption, ATextRect, AState, ABiDiFlags, - ANativeStyle{$IFDEF DELPHI7}, AWordWrap{$ENDIF}, ASkinsUsed); -end; - -function TcxButtonGlyph.GetTextOffsets(ALayout: TButtonLayout): TRect; -begin - if ImageInfo.IsImageAssigned then - Result := cxNullRect - else - Result := TextRectCorrection; -end; - -procedure TcxButtonGlyph.DrawButtonGlyph(ACanvas: TCanvas; const AGlyphPos: TPoint; - AState: TcxButtonState); -begin - if not ImageInfo.IsImageAssigned then - Exit; - FGlyphList.Draw(ACanvas, AGlyphPos.X, AGlyphPos.Y, CreateButtonGlyph(AState)); -end; - -procedure TcxButtonGlyph.DrawButtonText(ACanvas: TCanvas; const ACaption: TCaption; - ATextBounds: TRect; AState: TcxButtonState ; ABiDiFlags: LongInt; - ANativeStyle: Boolean;{$IFDEF DELPHI7} AWordWrap: Boolean;{$ENDIF} - ASkinsUsed: Boolean = False); - - procedure InternalDrawButtonText; - var - ADrawTextFlags: Integer; - begin - ADrawTextFlags := DT_CENTER or DT_VCENTER or ABiDiFlags; - {$IFDEF DELPHI7} - if AWordWrap then - ADrawTextFlags := ADrawTextFlags or DT_WORDBREAK; - {$ENDIF} - cxDrawText(ACanvas.Handle, ACaption, ATextBounds, ADrawTextFlags); - end; - -var - ABrushStyle: TBrushStyle; - AFontColor: TColor; -begin - if Length(ACaption) = 0 then Exit; - ABrushStyle := ACanvas.Brush.Style; - try - ACanvas.Brush.Style := bsClear; - if (AState = cxbsDisabled) and not ASkinsUsed then - begin - OffsetRect(ATextBounds, 1, 1); - AFontColor := ACanvas.Font.Color; - ACanvas.Font.Color := clBtnHighlight; - InternalDrawButtonText; - OffsetRect(ATextBounds, -1, -1); - ACanvas.Font.Color := AFontColor; - end; - InternalDrawButtonText; - finally - ACanvas.Brush.Style := ABrushStyle; - end; -end; - -{ TcxButtonActionLink } - -destructor TcxButtonActionLink.Destroy; -begin - if not (csDestroying in Client.ComponentState) then - begin - Client.FGlyph.ImageList := nil; - Client.FGlyph.ImageIndex := -1; - end; - inherited; -end; - -procedure TcxButtonActionLink.SetImageIndex(Value: Integer); -begin - inherited; - Client.FGlyph.ImageIndex := Value; -end; - -function TcxButtonActionLink.GetClient: TcxCustomButton; -begin - Result := TcxButton(FClient); -end; - -{ TcxSpeedButtonOptions } - -constructor TcxSpeedButtonOptions.Create(AOwner: TcxCustomButton); -begin - inherited Create; - FOwner := AOwner; - CanBeFocused := True; - GroupIndex := 0; -end; - -procedure TcxSpeedButtonOptions.Assign(Source: TPersistent); -begin - if Source is TcxSpeedButtonOptions then - with Source as TcxSpeedButtonOptions do - begin - Self.GroupIndex := GroupIndex; - Self.AllowAllUp := AllowAllUp; - Self.CanBeFocused := CanBeFocused; - Self.Down := Down; - Self.Flat := Flat; - Self.Transparent := Transparent; - end; - inherited Assign(Source); -end; - -procedure TcxSpeedButtonOptions.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TcxSpeedButtonOptions.CancelUpdate; -begin - Dec(FLockCount); -end; - -procedure TcxSpeedButtonOptions.EndUpdate; -begin - Dec(FLockCount); - UpdateGroup; -end; - -function TcxSpeedButtonOptions.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -procedure TcxSpeedButtonOptions.UpdateGroupValues(const AGroupIndex: Integer; const ASpeedButtonOptions: TcxSpeedButtonOptions); -begin - BeginUpdate; - try - CanBeFocused := ASpeedButtonOptions.CanBeFocused; - AllowAllUp := ASpeedButtonOptions.AllowAllUp; - Flat := ASpeedButtonOptions.Flat; - Transparent := ASpeedButtonOptions.Transparent; - if ASpeedButtonOptions.Down and Down then - begin - Down := False; - if (Button.Action is TCustomAction) then - TCustomAction(Button.Action).Checked := False; - end; - finally - CancelUpdate; - end; -end; - -function TcxSpeedButtonOptions.GetActive: Boolean; -begin - Result := (FOwner <> nil) and ((FGroupIndex <> 0) or not FCanBeFocused); -end; - -function TcxSpeedButtonOptions.GetButton: TcxCustomButton; -begin - Result := FOwner; -end; - -function TcxSpeedButtonOptions.GetDown: Boolean; -begin - Result := Button.Down; -end; - -procedure TcxSpeedButtonOptions.SetAllowAllUp(AValue: Boolean); -begin - if AValue <> FAllowAllUp then - begin - FAllowAllUp := AValue; - UpdateGroup; - end; -end; - -procedure TcxSpeedButtonOptions.SetCanBeFocused(AValue: Boolean); -begin - if AValue <> FCanBeFocused then - begin - FCanBeFocused := AValue; - UpdateGroup; - Button.Repaint; - end; -end; - -procedure TcxSpeedButtonOptions.SetDown(AValue: Boolean); -begin - if FGroupIndex = 0 then AValue := False; - if AValue <> Down then - begin - if Down and not FAllowAllUp and (FGroupIndex <> 0) and (LockCount = 0) then Exit; - if AValue then - Include(Button.FInternalState, bisDown) - else - Exclude(Button.FInternalState, bisDown); - if AValue then - UpdateGroup; - Button.Invalidate; - end; -end; - -procedure TcxSpeedButtonOptions.SetFlat(AValue: Boolean); -begin - if FFlat <> AValue then - begin - FFlat := AValue; - UpdateGroup; - if Active then - FOwner.Invalidate; - end; -end; - -procedure TcxSpeedButtonOptions.SetGroupIndex(AValue: Integer); -begin - if AValue <> FGroupIndex then - begin - FGroupIndex := AValue; - if FGroupIndex = 0 then - Down := False - else - UpdateGroup; - end; -end; - -procedure TcxSpeedButtonOptions.SetTransparent(AValue: Boolean); -begin - if FTransparent <> AValue then - begin - FTransparent := AValue; - UpdateGroup; - if Active then - FOwner.Invalidate; - end; -end; - -procedure TcxSpeedButtonOptions.UpdateGroup; -var - AMsg: TMessage; -begin - if (LockCount = 0) and Active and (FGroupIndex <> 0) and (FOwner.Parent <> nil) then - begin - AMsg.Msg := CM_BUTTONPRESSED; - AMsg.WParam := FGroupIndex; - AMsg.LParam := Longint(FOwner); - AMsg.Result := 0; - FOwner.Parent.Broadcast(AMsg); - end; -end; - -{ TcxCustomButton } - -constructor TcxCustomButton.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FInternalState := []; - FGlyph := GetGlyphClass.Create; - FGlyph.OnChange := GlyphChanged; - FColors := TcxButtonColors.Create(Self); - FControlCanvas := TControlCanvas.Create; - FControlCanvas.Control := Self; - FCanvas := TcxCanvas.Create(TCanvas(FControlCanvas)); - FLookAndFeel := TcxLookAndFeel.Create(Self); - FLookAndFeel.OnChanged := LookAndFeelChanged; - FKind := cxbkStandard; - FLayout := blGlyphLeft; - FPopupAlignment := paLeft; - FSpacing := 4; - FMargin := -1; - FSpeedButtonOptions := TcxSpeedButtonOptions.Create(Self); - DoubleBuffered := True; - ControlStyle := ControlStyle + [csReflector, csOpaque]; -end; - -destructor TcxCustomButton.Destroy; -begin - EndMouseTracking(Self); - FreeAndNil(FSpeedButtonOptions); - FreeAndNil(FLookAndFeel); - FreeAndNil(FColors); - FreeAndNil(FGlyph); - FreeAndNil(FCanvas); - FreeAndNil(FControlCanvas); - inherited Destroy; -end; - -procedure TcxCustomButton.InitializeCanvasColors(AState: TcxButtonState; out AColor: TColor); -begin - FCanvas.Font.Assign(Font); - AColor := FColors.GetColorByState(AState); - - if FColors.GetTextColorByState(AState) = clDefault then - FCanvas.Font.Color := GetPainterClass.ButtonSymbolColor(AState, FCanvas.Font.Color) - else - FCanvas.Font.Color := FColors.GetTextColorByState(AState); -end; - -procedure TcxCustomButton.SetGlyph(Value: TBitmap); -begin - FGlyph.Glyph := Value; -end; - -function TcxCustomButton.GetGlyph: TBitmap; -begin - Result := FGlyph.Glyph; -end; - -procedure TcxCustomButton.GlyphChanged(Sender: TObject); -begin - Invalidate; -end; - -procedure TcxCustomButton.SetLayout(Value: TButtonLayout); -begin - if FLayout <> Value then - begin - FLayout := Value; - Invalidate; - end; -end; - -function TcxCustomButton.GetNumGlyphs: TNumGlyphs; -begin - Result := FGlyph.NumGlyphs; -end; - -procedure TcxCustomButton.SetNumGlyphs(Value: TNumGlyphs); -begin - FGlyph.NumGlyphs := Value; -end; - -procedure TcxCustomButton.SetSpacing(Value: Integer); -begin - if FSpacing <> Value then - begin - FSpacing := Value; - Invalidate; - end; -end; - -procedure TcxCustomButton.SetMargin(Value: Integer); -begin - if (Value <> FMargin) and (Value >= - 1) then - begin - FMargin := Value; - Invalidate; - end; -end; - -procedure TcxCustomButton.DoContextPopup(MousePos: TPoint; - var Handled: Boolean); -var - P: TPoint; -begin - inherited DoContextPopup(MousePos, Handled); - if not Handled then - begin - if (MousePos.X = -1) and (MousePos.Y = -1) then - P := ClientToScreen(Point(0, 0)) - else - P := ClientToScreen(MousePos); - Handled := DoShowPopupMenu(PopupMenu, P.X, P.Y); - end; -end; - -function TcxCustomButton.DoOnDropDownMenuPopup(var APopupMenu: TPopupMenu): Boolean; -begin - Result := False; - if Assigned(FOnDropDownMenuPopup) then - FOnDropDownMenuPopup(Self, APopupMenu, Result); -end; - -function TcxCustomButton.DoShowPopupMenu(APopupMenu: TComponent; - X, Y: Integer): Boolean; -begin - Result := ShowPopupMenu(Self, APopupMenu, X, Y); -end; - -function TcxCustomButton.GetGlyphClass: TcxButtonGlyphClass; -begin - Result := TcxButtonGlyph; -end; - -function TcxCustomButton.GetPainterClass: TcxCustomLookAndFeelPainterClass; -begin - Result := GetButtonPainterClass(LookAndFeel); -end; - -function TcxCustomButton.IsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -function TcxCustomButton.StandardButton: Boolean; -begin - Result := False; -end; - -procedure TcxCustomButton.UpdateSize; -var - ASize: TSize; -begin - if AutoSize then - begin - if csLoading in ComponentState then - ASize := GetOptimalSize - else - ASize := Size(0, 0); - SetBounds(Self.Left, Self.Top, ASize.cx, ASize.cy); - end; -end; - -// IcxLookAndFeelContainer -function TcxCustomButton.GetLookAndFeel: TcxLookAndFeel; -begin - Result := LookAndFeel; -end; - -procedure TcxCustomButton.Click; -var - AExecuteClick: Boolean; -begin - AExecuteClick := (bisPressed in InternalState) or - ([bisPressed, bisMenuButtonPressed] * InternalState = []); - if CanBeFocused and AExecuteClick and not (bisAccelExecute in InternalState) then - SetDown(not Down); - if FKind = cxbkStandard then - inherited Click - else - begin - if FKind = cxbkDropDown then - DoDropDownMenu - else - if AExecuteClick then - inherited Click; - end; -end; - -function TcxCustomButton.CanFocus: Boolean; -begin - Result := inherited CanFocus and (CanBeFocused or IsDesigning); -end; - -function TcxCustomButton.GetOptimalSize: TSize; -var - ACanvas: TcxScreenCanvas; - ACaption: TCaption; -begin - ACanvas := TcxScreenCanvas.Create; - try - ACanvas.Font := Font; - ACaption := RemoveAccelChars(Caption); - if ACaption = '' then - ACaption := ' '; - Result.cx := ACanvas.TextWidth(ACaption) + ACanvas.TextWidth('R') * 3; - Result.cy := MulDiv(ACanvas.TextHeight('Wg'), 14, 8); - finally - ACanvas.Free; - end; -end; - -function TcxCustomButton.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action); - UpdateImageInfo; -end; - -procedure TcxCustomButton.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - if UseSystemPaint then - InternalRecreateWindow - else - Invalidate; -end; - -procedure TcxCustomButton.SetButtonAutoSize(Value: Boolean); -begin - if Value <> FAutoSize then - begin - FAutoSize := Value; - UpdateSize; - end; -end; - -procedure TcxCustomButton.SetColors(const Value: TcxButtonColors); -begin - FColors.Assign(Value); -end; - -procedure TcxCustomButton.SetKind(const Value: TcxButtonKind); -begin - if FKind <> Value then - begin - FKind := Value; - InternalRecreateWindow; - end -end; - -procedure TcxCustomButton.SetLookAndFeel(Value: TcxLookAndFeel); -begin - FLookAndFeel.Assign(Value); -end; - -procedure TcxCustomButton.SetPopupMenu(Value: TComponent); -var - AIPopupMenu: IcxPopupMenu; -begin - if (Value <> nil) and not((Value is TPopupMenu) or - Supports(Value, IcxPopupMenu, AIPopupMenu)) then - Value := nil; - if FPopupMenu <> Value then - begin - if FPopupMenu <> nil then - FPopupMenu.RemoveFreeNotification(Self); - FPopupMenu := Value; - if FPopupMenu <> nil then - FPopupMenu.FreeNotification(Self); - end; -end; - -procedure TcxCustomButton.CheckPressedState(const P: TPoint); -begin - if Kind = cxbkStandard then - Include(FInternalState, bisPressed) - else - begin - if PtInRect(GetMenuButtonBounds, P) then - Include(FInternalState, bisMenuButtonPressed) - else - Include(FInternalState, bisPressed); - if (Kind = cxbkDropDownButton) and not (bisMenuVisible in InternalState) and - not FIsDropDownMenuClosing then - CheckShowMenu(P); - end; -end; - -procedure TcxCustomButton.CheckShowMenu(const P: TPoint); -begin - if PtInRect(GetMenuButtonBounds, P) then - DoDropDownMenu -end; - -function TcxCustomButton.GetButtonState: TcxButtonState; -begin - if not Enabled then Result := cxbsDisabled - else if FIsPaintPressed then Result := cxbsPressed - else if (bisHot in InternalState) and CanHotTrack then Result := cxbsHot - else if FIsPaintDefault then Result := cxbsDefault - else Result := cxbsNormal; -end; - -function TcxCustomButton.GetDown: Boolean; -begin - Result := bisDown in InternalState; -end; - -function TcxCustomButton.GetMenuButtonBounds: TRect; -begin - Result := cxNullRect; - if Kind = cxbkStandard then Exit; - Result := ClientRect; - if Kind = cxbkDropDownButton then - Result.Left := Result.Right - cxDropDownButtonWidth; -end; - -function TcxCustomButton.GetAllowAllUp: Boolean; -begin - Result := FSpeedButtonOptions.AllowAllUp; -end; - -function TcxCustomButton.GetCanBeFocused: Boolean; -begin - Result := (SpeedButtonOptions <> nil) and SpeedButtonOptions.CanBeFocused; -end; - -function TcxCustomButton.GetGroupIndex: Integer; -begin - Result := FSpeedButtonOptions.GroupIndex; -end; - -function TcxCustomButton.GetSpeedButtonMode: Boolean; -begin - Result := not CanBeFocused or (GroupIndex <> 0); -end; - -procedure TcxCustomButton.SetAllowAllUp(AValue: Boolean); -begin - FSpeedButtonOptions.AllowAllUp := AValue; -end; - -procedure TcxCustomButton.SetCanBeFocused(AValue: Boolean); -begin - FSpeedButtonOptions.CanBeFocused := AValue; -end; - -procedure TcxCustomButton.SetDown(AValue: Boolean); -begin - FSpeedButtonOptions.Down := AValue; -end; - -procedure TcxCustomButton.SetGroupIndex(AValue: Integer); -begin - FSpeedButtonOptions.GroupIndex := AValue; -end; - -procedure TcxCustomButton.SetSpeedButtonOptions(AValue: TcxSpeedButtonOptions); -begin - SpeedButtonOptions.Assign(AValue); -end; - -procedure TcxCustomButton.WndProc(var Message: TMessage); -begin - if SpeedButtonMode and not IsDesigning then - begin - if not CanBeFocused then - case Message.Msg of - WM_LBUTTONDOWN: - begin - with Message do - MouseDown(mbLeft, KeysToShiftState(WParam), LParamLo, LParamHi); - Exit; - end; - WM_LBUTTONDBLCLK: - begin - DblClick; - Exit; - end; - end; - end; - inherited WndProc(Message); -end; - -procedure TcxCustomButton.ExcludeDropDownButtonRect(var R: TRect); -begin - if Kind = cxbkDropDownButton then - R.Right := R.Right - cxDropDownButtonWidth + 2; -end; - -procedure TcxCustomButton.CMTextChanged(var Message: TMessage); -begin - inherited; - UpdateSize; -end; - -procedure TcxCustomButton.DoDropDownMenu; -begin - if not (bisMenuVisible in InternalState) and not FIsDropDownMenuClosing then - PostMessage(Handle, CM_DROPDOWNPOPUPMENU, 0, 0); -end; - -function TcxCustomButton.GetBorderRect(AState: TcxButtonState): TRect; -var - ABorderSize: Integer; -begin - Result := ClientRect; - ABorderSize := GetPainterClass.ButtonBorderSize(AState); - InflateRect(Result, -ABorderSize, -ABorderSize); - ExcludeDropDownButtonRect(Result); -end; - -function TcxCustomButton.GetContentRect: TRect; -begin - Result := GetBorderRect(cxbsDefault) -end; - -function TcxCustomButton.GetDropDownMenuAlignment(APopupPoint: TPoint; - AEstimatedAlignment: TPopupAlignment): TPopupAlignment; -var - ADesktopWorkArea: TRect; -begin - Result := AEstimatedAlignment; - ADesktopWorkArea := GetDesktopWorkArea(APopupPoint); - if APopupPoint.X <= ADesktopWorkArea.Left then - Result := paRight - else - if APopupPoint.X >= ADesktopWorkArea.Right then - Result := paLeft; -end; - -function TcxCustomButton.GetDropDownMenuPopupPoint(ADropDownMenu: TPopupMenu): TPoint; -var - H: Integer; -begin - Result := Point(0, Height); - case FPopupAlignment of - paLeft: - Result.X := 0; - paRight: - Result.X := Width; - paCenter: - Result.X := Width shr 1; - end; - Result := ClientToScreen(Result); - H := GetPopupMenuHeight(ADropDownMenu); - if Result.Y + H > GetDesktopWorkArea(Result).Bottom then - Dec(Result.Y, Height + H + 2); -end; - -procedure TcxCustomButton.InternalPaint; - - procedure InternalDrawButton(R: TRect; AState: TcxButtonState; AColor: TColor; AIsMenuButton: Boolean = False); - var - ADrawBorder: Boolean; - begin - if (SpeedButtonOptions.Flat or SpeedButtonOptions.Transparent) and - not CanBeFocused then - begin - ADrawBorder := not Assigned(LookAndFeel.SkinPainter) and (not SpeedButtonOptions.Flat or (csDesigning in ComponentState) or ((AState <> cxbsDisabled) and - ((bisHot in InternalState) or (AState <> cxbsNormal)))) and - not (LookAndFeel.NativeStyle or (LookAndFeel.Kind = lfOffice11)); - if ADrawBorder then - begin - GetPainterClass.DrawButtonBorder(FCanvas, R, AState); - InflateRect(R, -GetPainterClass.ButtonBorderSize(AState), -GetPainterClass.ButtonBorderSize(AState)); - end; - FCanvas.SaveClipRegion; - try - FCanvas.SetClipRegion(TcxRegion.Create(R), roSet); - if not SpeedButtonOptions.Transparent or ((AState <> cxbsDisabled) and - (not (bisHot in InternalState) and (AState <> cxbsNormal)) or - ((bisHot in InternalState) and GetPainterClass.IsButtonHotTrack)) then - GetPainterClass.DrawButton(FCanvas, R, '', AState, False, AColor, FCanvas.Font.Color, {$IFDEF DELPHI7} WordWrap,{$ELSE} False,{$ENDIF} True) - else - cxDrawTransparentControlBackground(Self, FCanvas, ClientRect); - finally - FCanvas.RestoreClipRegion; - end; - end - else - GetPainterClass.DrawButton(FCanvas, R, '', AState, True, AColor, FCanvas.Font.Color{$IFDEF DELPHI7}, WordWrap{$ENDIF}); - end; - -var - AColor: TColor; - AOffset: TPoint; - AShift: Integer; - AState: TcxButtonState; - AButtonMenuState: TcxButtonState; - ATempRect, R: TRect; - ATheme: TdxTheme; -begin - if StandardButton then - Exit; - R := ClientRect; - if GetPainterClass = TcxWinXPLookAndFeelPainter then - begin - ATheme := OpenTheme(totButton); - if (ATheme <> TC_NONE) and IsThemeBackgroundPartiallyTransparent(ATheme, BP_PUSHBUTTON, PBS_NORMAL) then - cxDrawThemeParentBackground(Self, FCanvas, R); - end - else - if LookAndFeel.SkinPainter <> nil then - cxDrawTransparentControlBackground(Self, FCanvas, R); - - case FKind of - cxbkDropDownButton: - begin - ATempRect := Rect(R.Right - cxDropDownButtonWidth, R.Top, R.Right, R.Bottom); - ExcludeDropDownButtonRect(R); - end; - end; - - AState := GetButtonState; - InitializeCanvasColors(AState, AColor); - - if Assigned(FOnGetDrawParams) then - FOnGetDrawParams(Self, AState, AColor, FCanvas.Font); - InternalDrawButton(R, AState, AColor); - - AShift := GetPainterClass.ButtonTextShift; - if (AState = cxbsPressed) and (AShift <> 0) then - AOffset := Point(AShift, AShift) - else - AOffset := cxNullPoint; - - FCanvas.SaveClipRegion; - try - FCanvas.SetClipRegion(TcxRegion.Create(GetBorderRect(AState)), roSet); - UpdateImageInfo; - FGlyph.Draw(FControlCanvas, GetContentRect, AOffset, Caption, FLayout, - FMargin, FSpacing, AState, DrawTextBiDiModeFlags(0), - GetPainterClass = TcxWinXPLookAndFeelPainter, - {$IFDEF DELPHI7} WordWrap,{$ENDIF} Assigned(LookAndFeel.SkinPainter)); - finally - FCanvas.RestoreClipRegion; - end; - - if FKind = cxbkDropDownButton then - begin - AButtonMenuState := AState; - if bisMenuVisible in InternalState then - AButtonMenuState := cxbsPressed - else - if (AButtonMenuState = cxbsPressed) then - if FIsFocused then - AButtonMenuState := cxbsHot - else - AButtonMenuState := cxbsNormal; - InternalDrawButton(ATempRect, AButtonMenuState, AColor, True); - GetPainterClass.DrawScrollBarArrow(FCanvas, ATempRect, AButtonMenuState, adDown); - end; - - if CanFocus then - if Focused and not (bisMenuVisible in InternalState) then - FCanvas.DrawFocusRect(GetPainterClass.ButtonFocusRect(FCanvas, R)); -end; - -procedure TcxCustomButton.InternalRecreateWindow; -begin - RecreateWnd; -end; - -function TcxCustomButton.IsColorsStored: Boolean; -begin - Result := FColors.AssignedColors <> []; -end; - -function TcxCustomButton.CanHotTrack: Boolean; -begin - Result := not StandardButton and GetPainterClass.IsButtonHotTrack and Enabled; -end; - -procedure TcxCustomButton.ActionChange(Sender: TObject; CheckDefaults: Boolean); -begin - inherited ActionChange(Sender, CheckDefaults); - UpdateImageInfo; -end; - -function TcxCustomButton.CanResize(var NewWidth, NewHeight: Integer): Boolean; -begin - if AutoSize then - with GetOptimalSize do - begin - NewWidth := cx; - NewHeight := cy; - end; - Result := inherited CanResize(NewWidth, NewHeight); -end; - -function TcxCustomButton.GetActionLinkClass: TControlActionLinkClass; -begin - Result := TcxButtonActionLink; -end; - -function TcxCustomButton.GetChecked: Boolean; -begin - Result := Down; -end; - -procedure TcxCustomButton.SetChecked(Value: Boolean); -begin - Down := Value; -end; - -procedure TcxCustomButton.DblClick; -begin - if not CanBeFocused then - SetCapture(Handle); - if GroupIndex <> 0 then - inherited DblClick; - CheckPressedState(ScreenToClient(GetMouseCursorPos)); - Invalidate; -end; - -{$IFNDEF DELPHI10} - procedure TcxCustomButton.DoMouseEnter; - begin - CallNotify(FOnMouseEnter, Self); - end; - - procedure TcxCustomButton.DoMouseLeave; - begin - CallNotify(FOnMouseLeave, Self); - end; -{$ENDIF} - - -procedure TcxCustomButton.MouseEnter; -begin - BeginMouseTracking(Self, Rect(0, 0, Width, Height), Self); - Include(FInternalState, bisHot); - if Enabled then - Repaint; -end; - -procedure TcxCustomButton.KeyDown(var Key: Word; Shift: TShiftState); -begin - if Kind = cxbkDropDownButton then - if (Key in [VK_UP, VK_DOWN]) and - ((ssAlt in Shift) or (ssShift in Shift)) then - begin - if not (bisMenuVisible in InternalState) then - DoDropDownMenu; - Key := 0; - Exit - end; - inherited; -end; - -procedure TcxCustomButton.MouseLeave; -begin - EndMouseTracking(Self); - Exclude(FInternalState, bisHot); - if Enabled then - Invalidate; -end; - -procedure TcxCustomButton.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - if not CanBeFocused then - SetCapture(Handle); - inherited MouseDown(Button, Shift, X, Y); - if (Button = mbLeft) then - begin - CheckPressedState(Point(X, Y)); - Invalidate; - end; -end; - -procedure TcxCustomButton.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - if PtInRect(ClientRect, Point(X, Y)) then - MouseEnter; - if (bisHot in InternalState) and not PtInRect(ClientRect, Point(X, Y)) then - MouseLeave; -end; - -procedure TcxCustomButton.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - AExecuteClick: Boolean; -begin - AExecuteClick := not CanBeFocused and (Button = mbLeft) and (bisHot in InternalState) and - ((bisPressed in InternalState) or (not FIsDropDownMenuClosing and (bisMenuButtonPressed in InternalState))); - if AExecuteClick then - SetDown(not Down); - inherited MouseUp(Button, Shift, X, Y); - if AExecuteClick then - Click; - Exclude(FInternalState, bisPressed); - Exclude(FInternalState, bisMenuButtonPressed); - Invalidate; - if not CanBeFocused and (GetCapture = Handle) then - ReleaseCapture; - if not (bisMenuVisible in InternalState) then - FIsDropDownMenuClosing := False; -end; - -procedure TcxCustomButton.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if Operation = opRemove then - begin - if AComponent = FDropDownMenu then - FDropDownMenu := nil - else - if AComponent = PopupMenu then - PopupMenu := nil; - end; -end; - -procedure TcxCustomButton.DrawItem(const DrawItemStruct: TDrawItemStruct); -begin - FCanvas.Canvas.Handle := DrawItemStruct.hDC; - with DrawItemStruct do - begin - FIsPaintPressed := ((itemState and ODS_SELECTED <> 0) and not (bisMenuButtonPressed in InternalState)) or - ((bisMenuVisible in InternalState) and (Kind = cxbkDropDown)) or - (SpeedButtonMode and (Down or ([bisPressed, bisHot] * InternalState = [bisPressed, bisHot]))); - FIsPaintDefault := ((itemState and ODS_FOCUS <> 0) or (Default and IsDesigning) or FIsFocused) and CanBeFocused; - end; - InternalPaint; - FCanvas.Canvas.Handle := 0; -end; - -procedure TcxCustomButton.UpdateImageInfo; - - function GetImageList: TCustomImageList; - begin - if (Action is TCustomAction) and (TCustomAction(Action).ActionList <> nil) then - Result := TCustomAction(Action).ActionList.Images - else - Result := nil; - end; - - function GetImageIndex: Integer; - begin - if Action is TCustomAction then - Result := TCustomAction(Action).ImageIndex - else - Result := -1; - end; - -begin - FGlyph.ImageList := GetImageList; - FGlyph.ImageIndex := GetImageIndex; -end; - -procedure TcxCustomButton.WMCaptureChanged(var Message: TMessage); -var - P: TPoint; -begin - inherited; - if not IsDesigning then - begin - GetCursorPos(P); - if WindowFromPoint(P) <> Handle then - begin - Exclude(FInternalState, bisHot); - Exclude(FInternalState, bisPressed); - Exclude(FInternalState, bisMenuButtonPressed); - Invalidate; - end; - end; -end; - -procedure TcxCustomButton.WMContextMenu(var Message: TWMContextMenu); -var - AHandled: Boolean; - P, P1: TPoint; -begin - if Message.Result <> 0 then - Exit; - if IsDesigning then - begin - inherited; - Exit; - end; - - P := SmallPointToPoint(Message.Pos); - if (P.X = -1) and (P.Y = -1) then - P1 := P - else - begin - P1 := ScreenToClient(P); - if not PtInRect(ClientRect, P1) then - begin - inherited; - Exit; - end; - end; - - AHandled := False; - DoContextPopup(P1, AHandled); - Message.Result := Ord(AHandled); - if not AHandled then - inherited; -end; - -procedure TcxCustomButton.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin -{$IFNDEF DELPHI7} - if (csDestroying in ComponentState) or StandardButton or - (GetPainterClass = TcxWinXPLookAndFeelPainter) then - inherited - else -{$ENDIF} - Message.Result := 1; -end; - -procedure TcxCustomButton.WMLButtonDblClk(var Message: TWMLButtonDblClk); -begin - Perform(WM_LBUTTONDOWN, Message.Keys, - LPARAM(Word(Message.XPos) or (Word(Message.YPos) shr 16))); -end; - -procedure TcxCustomButton.CMCloseupPopupMenu(var Message: TMessage); -var - P: TPoint; -begin - if HandleAllocated then - P := ScreenToClient(GetMouseCursorPos) - else - P := cxInvalidPoint; - FIsDropDownMenuClosing := PtInRect(GetMenuButtonBounds, P); - Exclude(FInternalState, bisMenuVisible); - Repaint; -end; - -procedure TcxCustomButton.CMDialogChar(var Message: TCMDialogChar); -begin - if IsAccel(Message.CharCode, Caption) and inherited CanFocus then - begin - Include(FInternalState, bisAccelExecute); - Click; - Exclude(FInternalState, bisAccelExecute); - Message.Result := 1; - end - else - inherited; -end; - -procedure TcxCustomButton.CMDropDownPopupMenu(var Message: TMessage); -var - P: TPoint; - APopupAlignment: TPopupAlignment; - APopupMenu: TPopupMenu; -begin - if (Kind <> cxbkStandard) then - begin - APopupMenu := FDropDownMenu; - if DoOnDropDownMenuPopup(APopupMenu) or (APopupMenu = nil) then - Exit; - Exclude(FInternalState, bisMenuButtonPressed); - Include(FInternalState, bisMenuVisible); - FIsDropDownMenuClosing := False; - Repaint; - P := GetDropDownMenuPopupPoint(APopupMenu); - APopupAlignment := APopupMenu.Alignment; - try - APopupMenu.Alignment := GetDropDownMenuAlignment(P, FPopupAlignment); - APopupMenu.PopupComponent := Self; - APopupMenu.Popup(P.X, P.Y); - finally - APopupMenu.Alignment := APopupAlignment; - end; - PostMessage(Handle, CM_CLOSEUPPOPUPMENU, 0, 0); - end; -end; - -procedure TcxCustomButton.CMFontChanged(var Message: TMessage); -begin - inherited; - UpdateSize; - Invalidate; -end; - -procedure TcxCustomButton.CMEnabledChanged(var Message: TMessage); -begin - inherited; - if not Enabled then - Exclude(FInternalState, bisHot); - Invalidate; -end; - -procedure TcxCustomButton.CMMouseEnter(var Message: TMessage); -begin - inherited; -{$IFDEF DELPHI7} - if IsDesigning then Exit; -{$ENDIF} -{$IFNDEF DELPHI10} - DoMouseEnter; -{$ENDIF} - MouseEnter; -end; - -procedure TcxCustomButton.CMMouseLeave(var Message: TMessage); -begin - inherited; -{$IFDEF DELPHI7} - if IsDesigning then Exit; -{$ENDIF} -{$IFNDEF DELPHI10} - DoMouseLeave; -{$ENDIF} - MouseLeave; -end; - -procedure TcxCustomButton.CNDrawItem(var Message: TWMDrawItem); -begin - if not(csDestroying in ComponentState) then - DrawItem(Message.DrawItemStruct^); -end; - -procedure TcxCustomButton.CNKeyDown(var Message: TWMKeyDown); -begin - if IsPopupMenuShortCut(PopupMenu, Message) then - Message.Result := 1 - else - inherited; -end; - -procedure TcxCustomButton.CNMeasureItem(var Message: TWMMeasureItem); -var - ATempVar: TMeasureItemStruct; -begin - ATempVar := Message.MeasureItemStruct^; - ATempVar.itemWidth := Width; - ATempVar.itemHeight := Height; - Message.MeasureItemStruct^ := ATempVar; -end; - -procedure TcxCustomButton.CNSysKeyDown(var Message: TWMSysKeyDown); -begin - if IsPopupMenuShortCut(PopupMenu, Message) then - Message.Result := 1 - else - inherited; -end; - -procedure TcxCustomButton.CMButtonPressed(var Message: TMessage); -var - ASender: TcxButton; -begin - if SpeedButtonMode then - begin - if (Message.WParam = GroupIndex) and (GroupIndex <> 0) and - (TObject(Message.LParam) is TcxCustomButton) then - begin - ASender := TcxButton(Message.LParam); - if ASender <> Self then - begin - SpeedButtonOptions.UpdateGroupValues(GroupIndex, ASender.SpeedButtonOptions); - Invalidate; - end; - end; - end; -end; - -procedure TcxCustomButton.CreateHandle; -var - AState: TcxButtonState; -begin - if Enabled then - AState := cxbsNormal - else - AState := cxbsDisabled; - inherited CreateHandle; - FGlyph.CreateButtonGlyph(AState); -end; - -procedure TcxCustomButton.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - if not StandardButton then - with Params do Style := Style or BS_OWNERDRAW; -end; - -procedure TcxCustomButton.DestroyWindowHandle; -begin - if bisMenuVisible in InternalState then - SendMessage(Handle, CM_CLOSEUPPOPUPMENU, 0, 0); - inherited DestroyWindowHandle; -end; - -function TcxCustomButton.GetPalette: HPALETTE; -begin - Result := Glyph.Palette; -end; - -procedure TcxCustomButton.SetButtonStyle(ADefault: Boolean); -begin - if StandardButton then - inherited SetButtonStyle(ADefault) - else - if ADefault <> FIsFocused then - begin - FIsFocused := ADefault; - Refresh; - end; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxCalc.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxCalc.pas deleted file mode 100644 index c859d170..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxCalc.pas +++ /dev/null @@ -1,1920 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxCalc; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, - SysUtils, Classes, Graphics, Controls, Forms, StdCtrls, Clipbrd, - cxClasses, cxControls, cxContainer, cxGraphics, cxDataStorage, cxDataUtils, - cxButtons, cxEdit, cxDropDownEdit, cxEditConsts, cxFormats, cxLookAndFeelPainters, - cxTextEdit, cxFilterControlUtils; - -const - cxMaxCalcPrecision = cxEditDefaultPrecision; - cxDefCalcPrecision = cxMaxCalcPrecision; - // Size - cxMinCalcFontSize = 8; - cxCalcMinBoldFontSize = 10; - cxMinCalcBtnWidth = 28; - cxMinCalcBtnHeight = 22; - cxMinCalcLargeBtnWidth = Integer(Trunc(1.7*cxMinCalcBtnWidth)); - cxMinCalcXOfs = 3; - cxMinCalcYOfs = 3; - cxMinCalcWidth = (cxMinCalcXOfs+cxMinCalcBtnWidth)*6+cxMinCalcXOfs*3+3; - cxMinCalcHeight = (cxMinCalcYOfs+cxMinCalcBtnHeight)*5+cxMinCalcYOfs+3; - -type - TcxCalcState = (csFirst, csValid, csError); - -const - BtnCaptions : array [cbBack..cbEqual] of string = ('Back', 'CE', 'C', - 'MC', 'MR', 'MS', 'M+', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - '+/-', ',', '/', '*', '-', '+', 'sqrt', '%', '1/x', '='); - -type - TcxButtonInfo = record - BtnRect: TRect; - Down: Boolean; - Grayed: Boolean; - Kind: TcxCalcButtonKind; - Text: string; - end; - - TCalcButtons = array [TcxCalcButtonKind] of TcxButtonInfo; - - { TcxCustomCalculator } - - TcxCalcButtonClick = procedure(Sender: TObject; var ButtonKind : TcxCalcButtonKind) of object; - TcxCalcGetEditValue = procedure(Sender: TObject; var Value : String) of object; - TcxCalcSetEditValue = procedure(Sender: TObject; const Value : String) of object; - - TcxCustomCalculator = class(TcxControl) - private - {calc style} - FAutoFontSize : Boolean; - FBeepOnError: Boolean; - FBorderStyle : TBorderStyle; - FFocusRectVisible : Boolean; - {calc size} - FCalcFontSize : Integer; - FCalcBtnWidth : Integer; - FCalcBtnHeight : Integer; - FCalcLargeBtnWidth : Integer; - FCalcXOfs : Integer; - FCalcYOfs : Integer; - FCalcWidth : Integer; - FCalcHeight : Integer; - {math} - FMemory : Extended; - FOperator: TcxCalcButtonKind; - FOperand: Extended; - FPrecision: Byte; - FStatus: TcxCalcState; - {control} - FButtons : TCalcButtons; - FActiveButton : TcxCalcButtonKind; - FDownButton : TcxCalcButtonKind; - FPressedButton : TcxCalcButtonKind; - FTracking: Boolean; - // events - FOnDisplayChange: TNotifyEvent; - FOnButtonClick: TcxCalcButtonClick; - FOnResult: TNotifyEvent; - FOnHidePopup: TcxEditClosePopupEvent; - - function GetDisplay: Extended; - procedure SetDisplay(Value: Extended); - function GetMemory: Extended; - - procedure SetAutoFontSize(Value : Boolean); - procedure SetBorderStyle(Value: TBorderStyle); - procedure SetFocusRectVisible(Value : Boolean); - - procedure StopTracking; - procedure TrackButton(X,Y: Integer); - procedure InvalidateButton(ButtonKind : TcxCalcButtonKind); - procedure DoButtonDown(ButtonKind : TcxCalcButtonKind); - procedure DoButtonUp(ButtonKind : TcxCalcButtonKind); - procedure Error; - procedure CheckFirst; - procedure Clear; - procedure CalcSize(AWidth, AHeight : Integer); - procedure UpdateMemoryButtons; - procedure InvalidateMemoryButtons; - procedure ResetOperands; - protected - IsPopupControl : Boolean; - function GetPainter: TcxCustomLookAndFeelPainterClass; virtual; - procedure Paint; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure FontChanged; override; - procedure FocusChanged; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseLeave(AControl: TControl); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure Resize; override; - procedure SetEnabled( Value: Boolean); override; - procedure CreateLayout; - procedure ButtonClick(ButtonKind : TcxCalcButtonKind); - // for link with EditControl - function GetEditorValue: String; virtual; - procedure SetEditorValue(const Value: String); virtual; - procedure HidePopup(Sender: TcxControl; AReason: TcxEditCloseUpReason); virtual; - procedure LockChanges(ALock: Boolean; AInvokeChangedOnUnlock: Boolean = True); virtual; - - property Color default clBtnFace; - property ParentColor default False; - property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle - default bsNone; - - property AutoFontSize : Boolean read FAutoFontSize write SetAutoFontSize - default True; - property BeepOnError: Boolean read FBeepOnError write FBeepOnError - default True; - property ShowFocusRect : Boolean - read FFocusRectVisible write SetFocusRectVisible default True; - - property Precision: Byte read FPrecision write FPrecision - default cxDefCalcPrecision; - property EditorValue : string read GetEditorValue write SetEditorValue; - - property OnHidePopup: TcxEditClosePopupEvent read FOnHidePopup write FOnHidePopup; - property OnDisplayChange: TNotifyEvent - read FOnDisplayChange write FOnDisplayChange; - property OnButtonClick: TcxCalcButtonClick - read FOnButtonClick write FOnButtonClick; - property OnResult: TNotifyEvent read FOnResult write FOnResult; - public - constructor Create(AOwner: TComponent); override; - function GetButtonKindAt(X, Y : Integer) : TcxCalcButtonKind; - function GetButtonKindChar(Ch : Char) : TcxCalcbuttonKind; - function GetButtonKindKey(Key: Word; Shift: TShiftState) : TcxCalcbuttonKind; - procedure CopyToClipboard; - procedure PasteFromClipboard; - property Memory: Extended read GetMemory; - property Value: Extended read GetDisplay write SetDisplay; - published - property TabStop default True; - end; - - { TcxPopupCalculator } - - TcxCustomCalcEdit = class; - - TcxPopupCalculator = class(TcxCustomCalculator) - private - FEdit: TcxCustomCalcEdit; - protected - function GetEditorValue: string; override; - function GetPainter: TcxCustomLookAndFeelPainterClass; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure SetEditorValue(const Value: string); override; - procedure LockChanges(ALock: Boolean; AInvokeChangedOnUnlock: Boolean = True); override; - property Edit: TcxCustomCalcEdit read FEdit write FEdit; - public - constructor Create(AOwner: TComponent); override; - procedure Init; virtual; - end; - - { TcxCalcEditPropertiesValues } - - TcxCalcEditPropertiesValues = class(TcxTextEditPropertiesValues) - private - FPrecision: Boolean; - procedure SetPrecision(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property Precision: Boolean read FPrecision write SetPrecision stored False; - end; - - { TcxCustomCalcEditProperties } - - TcxCustomCalcEditProperties = class(TcxCustomPopupEditProperties) - private - FBeepOnError: Boolean; - FPrecision: Byte; - FQuickClose: Boolean; - FScientificFormat: Boolean; - FUseThousandSeparator: Boolean; - function GetAssignedValues: TcxCalcEditPropertiesValues; - function GetPrecision: Byte; - function IsPrecisionStored: Boolean; - procedure SetAssignedValues(Value: TcxCalcEditPropertiesValues); - procedure SetBeepOnError(Value: Boolean); - procedure SetPrecision(Value: Byte); - procedure SetQuickClose(Value: Boolean); - procedure SetScientificFormat(Value: Boolean); - procedure SetUseThousandSeparator(Value: Boolean); - protected - function GetAlwaysPostEditValue: Boolean; override; - class function GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; override; - function HasDigitGrouping(AIsDisplayValueSynchronizing: Boolean): Boolean; override; - function PopupWindowAcceptsAnySize: Boolean; override; - function StrToFloatEx(S: string; var Value: Extended): Boolean; - property AssignedValues: TcxCalcEditPropertiesValues read GetAssignedValues - write SetAssignedValues; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function IsDisplayValueValid(var DisplayValue: TcxEditValue; - AEditFocused: Boolean): Boolean; override; - function IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - procedure ValidateDisplayValue(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var Error: Boolean; AEdit: TcxCustomEdit); override; - // !!! - property BeepOnError: Boolean read FBeepOnError write SetBeepOnError - default True; - property ImmediateDropDown default False; - property Precision: Byte read GetPrecision write SetPrecision - stored IsPrecisionStored; - property QuickClose: Boolean read FQuickClose write SetQuickClose - default False; - property ScientificFormat: Boolean read FScientificFormat - write SetScientificFormat default False; - property UseThousandSeparator: Boolean read FUseThousandSeparator - write SetUseThousandSeparator default False; - end; - - { TcxCalcEditProperties } - - TcxCalcEditProperties = class(TcxCustomCalcEditProperties) - published - property Alignment; - property AssignedValues; - property AutoSelect; - property BeepOnError; - property ButtonGlyph; - property ClearKey; - property DisplayFormat; - property ImeMode; - property ImeName; - property ImmediatePost; - property Precision; - property ReadOnly; - property QuickClose; - property ScientificFormat; - property UseLeftAlignmentOnEditing; - property UseThousandSeparator; - property ValidateOnEnter; - property OnChange; - property OnCloseUp; - property OnEditValueChanged; - property OnInitPopup; - property OnPopup; - property OnValidate; - end; - - { TcxCustomCalcEdit } - - TcxCustomCalcEdit = class(TcxCustomPopupEdit) - private - FCalculator: TcxPopupCalculator; - function GetProperties: TcxCustomCalcEditProperties; - function GetActiveProperties: TcxCustomCalcEditProperties; - function GetValue: Extended; - procedure SetProperties(Value: TcxCustomCalcEditProperties); - procedure SetValue(const Value: Extended); - protected - // IcxFormatControllerListener - procedure FormatChanged; override; - - function CanDropDown: Boolean; override; - procedure CreatePopupWindow; override; - procedure DoEnter; override; - procedure DoExit; override; - procedure DoInitPopup; override; - procedure Initialize; override; - procedure InitializePopupWindow; override; - function InternalGetEditingValue: TcxEditValue; override; - function IsValidChar(Key: Char): Boolean; override; - procedure KeyPress(var Key: Char); override; - procedure PopupWindowClosed(Sender: TObject); override; - procedure PopupWindowShowed(Sender: TObject); override; - procedure PropertiesChanged(Sender: TObject); override; - function InternalPrepareEditValue(const ADisplayValue: string; - out EditValue: TcxEditValue): Boolean; - property Calculator: TcxPopupCalculator read FCalculator; - public - destructor Destroy; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure PasteFromClipboard; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - property ActiveProperties: TcxCustomCalcEditProperties - read GetActiveProperties; - property Properties: TcxCustomCalcEditProperties read GetProperties - write SetProperties; - property Value: Extended read GetValue write SetValue stored False; - end; - - { TcxCalcEdit } - - TcxCalcEdit = class(TcxCustomCalcEdit) - private - function GetActiveProperties: TcxCalcEditProperties; - function GetProperties: TcxCalcEditProperties; - procedure SetProperties(Value: TcxCalcEditProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCalcEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property EditValue; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxCalcEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop default True; - {$IFDEF DELPHI12} - property TextHint; - {$ENDIF} - property Value; - property Visible; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property BiDiMode; - property ParentBiDiMode; - property OnEndDock; - property OnStartDock; - end; - - { TcxFilterCalcEditHelper } - - TcxFilterCalcEditHelper = class(TcxFilterDropDownEditHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Math, cxLookAndFeels, cxVariants, dxThemeManager, dxUxTheme, dxCore; - -const - ResultButtons = [cbEqual, cbPercent]; - RepeatButtons = [cbBack]; - OperationButtons = [cbAdd, cbSub, cbMul, cbDiv]; - BorderWidth = 4; - -{TcxCustomCalculator} - -constructor TcxCustomCalculator.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - {init size variables} - FCalcFontSize := cxMinCalcFontSize; - FCalcBtnWidth := cxMinCalcBtnWidth; - FCalcBtnHeight := cxMinCalcBtnHeight; - FCalcLargeBtnWidth := cxMinCalcLargeBtnWidth; - FCalcXOfs := cxMinCalcXOfs; - FCalcYOfs := cxMinCalcYOfs; - FCalcWidth := cxMinCalcWidth; - FCalcHeight := cxMinCalcHeight; - {default size} - Width := FCalcWidth; - Height := FCalcHeight; - {style} - ControlStyle := [csCaptureMouse, csOpaque]; - Color := clBtnFace; - ParentColor := False; - TabStop := True; - FAutoFontSize := True; - FBorderStyle := bsNone; - FBeepOnError := True; - FDownButton := cbNone; - FActiveButton := cbNone; - FPressedButton := cbNone; - FFocusRectVisible := True; - FOperator := cbEqual; - FPrecision := cxDefCalcPrecision; - Keys := [kAll, kArrows, kChars, kTab]; - CreateLayout; -end; - -function TcxCustomCalculator.GetButtonKindAt(X, Y : Integer) : TcxCalcButtonKind; -var i : TcxCalcButtonKind; -begin - Result := cbNone; - for i := cbBack to cbEqual do - if PtInRect(FButtons[i].BtnRect, Point(X, Y)) then - begin - Result := i; - Exit; - end; -end; - -function TcxCustomCalculator.GetPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := TcxStandardLookAndFeelPainter; -end; - -procedure TcxCustomCalculator.Paint; - - function CalculateButtonState(const AButton: TcxButtonInfo): TcxButtonState; - begin - if AButton.Grayed or not Enabled then - Result := cxbsDisabled - else - if AButton.Down then - Result := cxbsPressed - else - if (FActiveButton = AButton.Kind) and (FDownButton <> AButton.Kind) then - Result := cxbsHot - else - if IsFocused and (AButton.Kind = cbEqual) then - Result := cxbsDefault - else - Result := cxbsNormal; - end; - -var - AState: TcxButtonState; - I: TcxCalcButtonKind; -begin - if not HandleAllocated then Exit; - with Canvas do - begin - {Fill Background} - Brush.Color := Self.Color; - if IsPopupControl then - GetPainter.DrawWindowContent(Self.Canvas, ClientRect) - else - GetPainter.DrawWindowContent(Self.Canvas, BoundsRect); - {Draw buttons} - Font := Self.Font; - if AutoFontSize then - begin - Font.Size := FCalcFontSize; - if Font.Size >= cxCalcMinBoldFontSize then - Font.Style := [fsBold] - else - Font.Style := []; - end; - Brush.Color := Self.Color; - end; - - for i := cbBack to cbEqual do - with FButtons[i] do - if RectVisible(Canvas.Handle, BtnRect) then - begin - AState := CalculateButtonState(FButtons[i]); - with GetPainter, Canvas do - begin - DrawButton(Self.Canvas, BtnRect, '', AState); - Font.Color := CalcEditButtonTextColor(Kind); - Brush.Style := bsClear; - if AState = cxbsPressed then - begin - OffsetRect(BtnRect, ButtonTextShift, ButtonTextShift); - DrawText(Text, BtnRect, cxAlignHCenter or cxAlignVCenter or cxSingleLine or - cxShowPrefix, AState <> cxbsDisabled); - OffsetRect(BtnRect, -ButtonTextShift, -ButtonTextShift); - end - else - DrawText(Text, BtnRect, cxAlignHCenter or cxAlignVCenter or cxSingleLine or - cxShowPrefix, AState <> cxbsDisabled); - Brush.Style := bsSolid; - end; - if FFocusRectVisible and IsFocused and (i = cbEqual) then - begin - InflateRect(BtnRect, -3, -3); - Canvas.DrawFocusRect(BtnRect); - InflateRect(BtnRect, 3, 3); - end; - end; -end; - -procedure TcxCustomCalculator.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params do - begin - Style := Style or WS_TABSTOP or WS_CLIPCHILDREN; - WindowClass.Style := WindowClass.Style and not CS_DBLCLKS; - if IsPopupControl then - Style := Style and not WS_BORDER - else - if FBorderStyle = bsSingle then - if NewStyleControls and Ctl3D then - begin - Style := Style and not WS_BORDER; - ExStyle := ExStyle or WS_EX_CLIENTEDGE; - end - else - Style := Style or WS_BORDER; - end; -end; - -procedure TcxCustomCalculator.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var ButtonKind : TcxCalcButtonkind; -begin - if not (csDesigning in ComponentState) and - (CanFocus or (GetParentForm(Self) = nil)) and not IsPopupControl then - SetFocus; - - ButtonKind := GetButtonKindAt(X, Y); - if (Button = mbLeft) and (ButtonKind <> cbNone) and not FButtons[ButtonKind].Grayed then - begin - MouseCapture := True; - FTracking := True; - FDownButton := ButtonKind; - TrackButton(X, Y); - end; - inherited MouseDown(Button, Shift, X, Y); -end; - -procedure TcxCustomCalculator.MouseMove(Shift: TShiftState; X, Y: Integer); -var OldButton : TcxCalcButtonKind; -begin - if FTracking then - TrackButton(X, Y) - else - if GetPainter.IsButtonHotTrack and Enabled and not Dragging then - begin - OldButton := FActiveButton; - FActiveButton := GetButtonKindAt(X, Y); - if FActiveButton <> OldButton then - begin - if not FButtons[OldButton].Grayed then - InvalidateButton(OldButton); - if not FButtons[FActiveButton].Grayed then - InvalidateButton(FActiveButton); - end; - end; - inherited MouseMove(Shift, X, Y); -end; - -procedure TcxCustomCalculator.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - WasPressed: Boolean; -begin - WasPressed := (FDownButton <> cbNone) and FButtons[FDownButton].Down; - StopTracking; - if (Button = mbLeft) and WasPressed then - ButtonClick(FDownButton); - FDownButton := cbNone; - inherited MouseUp(Button, Shift, X, Y); -end; - -procedure TcxCustomCalculator.KeyDown(var Key: Word; Shift: TShiftState); -var - NewButton, OldButton : TcxCalcButtonKind; -begin - inherited KeyDown(Key, Shift); - OldButton := FPressedButton; - NewButton := GetButtonKindKey(Key, Shift); - if (NewButton <> cbNone) and (OldButton <> NewButton) then - begin - DoButtonUp(OldButton); - FPressedButton := NewButton; - DoButtonDown(FPressedButton); - end; -end; - -procedure TcxCustomCalculator.KeyPress(var Key: Char); -var - NewButton, OldButton : TcxCalcButtonKind; -begin - inherited KeyPress(Key); - if (Key = ^V) then - PasteFromClipboard - else - if (Key = ^C) then CopyToClipboard; - - OldButton := FPressedButton; - NewButton := GetButtonKindChar(Key); - if (NewButton <> cbNone) and (OldButton <> NewButton) then - begin - DoButtonUp(OldButton); - FPressedButton := NewButton; - DoButtonDown(FPressedButton); - end; - if FPressedButton in RepeatButtons {cbBack} then ButtonClick(FPressedButton); -end; - -procedure TcxCustomCalculator.KeyUp(var Key: Word; Shift: TShiftState); -begin - inherited KeyUp(Key, Shift); - DoButtonUp(FPressedButton); -end; - -procedure TcxCustomCalculator.Resize; -begin - CalcSize(ClientWidth, ClientHeight); - ClientWidth := FCalcWidth; - ClientHeight := FCalcHeight; - inherited; -end; - -procedure TcxCustomCalculator.DoButtonDown(ButtonKind : TcxCalcButtonKind); -begin - if ButtonKind <> cbNone then - begin - FButtons[ButtonKind].Down := True; - InvalidateButton(ButtonKind); - Update; - if not (ButtonKind in RepeatButtons) {cbBack} then ButtonClick(ButtonKind); - end; -end; - -procedure TcxCustomCalculator.DoButtonUp(ButtonKind : TcxCalcButtonKind); -begin - if ButtonKind <> cbNone then - begin - FButtons[ButtonKind].Down := False; - InvalidateButton(ButtonKind); - FPressedButton := cbNone; - Update; - end; -end; - -function TcxCustomCalculator.GetEditorValue: String; -begin - Result := ''; -end; - -procedure TcxCustomCalculator.SetEditorValue(const Value: String); -begin -end; - -procedure TcxCustomCalculator.CreateLayout; -var - I: TcxCalcButtonKind; - X: Integer; -begin - for I := cbBack to cbEqual do - begin - FButtons[I].Kind := I; - FButtons[I].Text := BtnCaptions[I]; - FButtons[I].BtnRect := cxEmptyRect; - FButtons[I].Down := False; - FButtons[I].Grayed := False; - if I = cbDecimal then - FButtons[I].Text := SysUtils.DecimalSeparator - else - FButtons[I].Text := BtnCaptions[i]; - end; - {coord buttons} - FButtons[cbMC].BtnRect := Rect(FCalcXOfs, - (FCalcYOfs+FCalcBtnHeight)+FCalcYOfs, - FCalcXOfs+FCalcBtnWidth, - (FCalcYOfs+FCalcBtnHeight)*2); - FButtons[cbMR].BtnRect := Rect(FCalcXOfs, - (FCalcYOfs+FCalcBtnHeight)*2+FCalcYOfs, - FCalcXOfs+FCalcBtnWidth, - (FCalcYOfs+FCalcBtnHeight)*3); - FButtons[cbMS].BtnRect := Rect(FCalcXOfs, - (FCalcYOfs+FCalcBtnHeight)*3+FCalcYOfs, - FCalcXOfs+FCalcBtnWidth, - (FCalcYOfs+FCalcBtnHeight)*4); - FButtons[cbMP].BtnRect := Rect(FCalcXOfs, - (FCalcYOfs+FCalcBtnHeight)*4+FCalcYOfs, - FCalcXOfs+FCalcBtnWidth, - (FCalcYOfs+FCalcBtnHeight)*5); - X := FCalcXOfs+FCalcBtnWidth + FCalcXOfs + 4; - {7, 8, 9, /, sqrt} - FButtons[cbNum7].BtnRect := Rect(X+FCalcXOfs, - (FCalcYOfs+FCalcBtnHeight)+FCalcYOfs, - X+FCalcXOfs+FCalcBtnWidth, - (FCalcYOfs+FCalcBtnHeight)*2); - FButtons[cbNum8].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth), - (FCalcYOfs+FCalcBtnHeight)+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*2, - (FCalcYOfs+FCalcBtnHeight)*2); - FButtons[cbNum9].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*2, - (FCalcYOfs+FCalcBtnHeight)+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*3, - (FCalcYOfs+FCalcBtnHeight)*2); - FButtons[cbDiv].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*3, - (FCalcYOfs+FCalcBtnHeight)+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*4, - (FCalcYOfs+FCalcBtnHeight)*2); - FButtons[cbSqrt].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*4, - (FCalcYOfs+FCalcBtnHeight)+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*5, - (FCalcYOfs+FCalcBtnHeight)*2); - - {4, 5, 6, *, %} - FButtons[cbNum4].BtnRect := Rect(X+FCalcXOfs, - (FCalcYOfs+FCalcBtnHeight)*2+FCalcYOfs, - X+FCalcXOfs+FCalcBtnWidth, - (FCalcYOfs+FCalcBtnHeight)*3); - FButtons[cbNum5].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth), - (FCalcYOfs+FCalcBtnHeight)*2+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*2, - (FCalcYOfs+FCalcBtnHeight)*3); - FButtons[cbNum6].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*2, - (FCalcYOfs+FCalcBtnHeight)*2+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*3, - (FCalcYOfs+FCalcBtnHeight)*3); - FButtons[cbMul].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*3, - (FCalcYOfs+FCalcBtnHeight)*2+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*4, - (FCalcYOfs+FCalcBtnHeight)*3); - FButtons[cbPercent].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*4, - (FCalcYOfs+FCalcBtnHeight)*2+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*5, - (FCalcYOfs+FCalcBtnHeight)*3); - - {1, 2, 3, -, 1/x} - FButtons[cbNum1].BtnRect := Rect(X+FCalcXOfs, - (FCalcYOfs+FCalcBtnHeight)*3+FCalcYOfs, - X+FCalcXOfs+FCalcBtnWidth, - (FCalcYOfs+FCalcBtnHeight)*4); - FButtons[cbNum2].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth), - (FCalcYOfs+FCalcBtnHeight)*3+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*2, - (FCalcYOfs+FCalcBtnHeight)*4); - FButtons[cbNum3].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*2, - (FCalcYOfs+FCalcBtnHeight)*3+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*3, - (FCalcYOfs+FCalcBtnHeight)*4); - FButtons[cbSub].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*3, - (FCalcYOfs+FCalcBtnHeight)*3+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*4, - (FCalcYOfs+FCalcBtnHeight)*4); - FButtons[cbRev].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*4, - (FCalcYOfs+FCalcBtnHeight)*3+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*5, - (FCalcYOfs+FCalcBtnHeight)*4); - - {0, +/-, ., +, =} - FButtons[cbNum0].BtnRect := Rect(X+FCalcXOfs, - (FCalcYOfs+FCalcBtnHeight)*4+FCalcYOfs, - X+FCalcXOfs+FCalcBtnWidth, - (FCalcYOfs+FCalcBtnHeight)*5); - FButtons[cbSign].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth), - (FCalcYOfs+FCalcBtnHeight)*4+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*2, - (FCalcYOfs+FCalcBtnHeight)*5); - FButtons[cbDecimal].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*2, - (FCalcYOfs+FCalcBtnHeight)*4+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*3, - (FCalcYOfs+FCalcBtnHeight)*5); - FButtons[cbAdd].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*3, - (FCalcYOfs+FCalcBtnHeight)*4+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*4, - (FCalcYOfs+FCalcBtnHeight)*5); - FButtons[cbEqual].BtnRect := Rect(X+FCalcXOfs+(FCalcXOfs+FCalcBtnWidth)*4, - (FCalcYOfs+FCalcBtnHeight)*4+FCalcYOfs, - X+(FCalcXOfs+FCalcBtnWidth)*5, - (FCalcYOfs+FCalcBtnHeight)*5); - {C} - FButtons[cbClear].BtnRect := FButtons[cbEqual].BtnRect; - FButtons[cbClear].BtnRect.Left := FButtons[cbClear].BtnRect.Right - FCalcLargeBtnWidth; - FButtons[cbClear].BtnRect.Top := FCalcYOfs; - FButtons[cbClear].BtnRect.Bottom := FCalcYOfs + FCalcBtnHeight; - {CE} - FButtons[cbCancel].BtnRect := FButtons[cbClear].BtnRect; - FButtons[cbCancel].BtnRect.Right := FButtons[cbClear].BtnRect.Left - FCalcYOfs; - FButtons[cbCancel].BtnRect.Left := FButtons[cbCancel].BtnRect.Right - FCalcLargeBtnWidth; - {Back} - FButtons[cbBack].BtnRect := FButtons[cbCancel].BtnRect; - FButtons[cbBack].BtnRect.Right := FButtons[cbBack].BtnRect.Left - FCalcYOfs; - FButtons[cbBack].BtnRect.Left := FButtons[cbBack].BtnRect.Right - FCalcLargeBtnWidth; - // ResetOperands; - ResetOperands; - // Update Memory display - UpdateMemoryButtons; -end; - -procedure TcxCustomCalculator.ResetOperands; -begin - FOperator := cbEqual; - FStatus := csFirst; - FMemory := 0.0; -end; - -procedure TcxCustomCalculator.SetBorderStyle(Value: TBorderStyle); -begin - if FBorderStyle <> Value then - begin - FBorderStyle := Value; - RecreateWnd; - end; -end; - -procedure TcxCustomCalculator.SetFocusRectVisible(Value : Boolean); -begin - if FFocusRectVisible <> Value then - begin - FFocusRectVisible := Value; - Invalidate; - end; -end; - -procedure TcxCustomCalculator.CalcSize(AWidth, AHeight : Integer); -var - h, NearHeight, d, dMin : Integer; - - function CalcHeight(ABtnHeight:Integer):Integer; - var FYOfs : Integer; - begin - FYOfs := MulDiv(ABtnHeight, cxMinCalcYOfs, cxMinCalcBtnHeight); - Result := (FYOfs + ABtnHeight) * 5 + FYOfs; - end; - -begin - if AutoFontSize then - begin - h := MulDiv(AWidth, cxMinCalcHeight, cxMinCalcWidth); - if AHeight > h then AHeight := h; - {Calculate nearest FCalcHeight } - h := cxMinCalcBtnHeight; - NearHeight := h; - dMin := AHeight; - while True do - begin - d := abs(CalcHeight(h) - AHeight); - if d < dMin then - begin - dMin := d; - NearHeight := h; - end - else - Break; - inc(h); - end; - end - else - NearHeight := Canvas.FontHeight(Font) * 2; - FCalcBtnHeight := NearHeight; - FCalcBtnWidth := MulDiv(FCalcBtnHeight, cxMinCalcBtnWidth, cxMinCalcBtnHeight); - FCalcYOfs := MulDiv(FCalcBtnHeight, cxMinCalcYOfs, cxMinCalcBtnHeight); - FCalcXOfs := FCalcYOfs; - FCalcLargeBtnWidth := MulDiv(FCalcBtnWidth, 17, 10); - FCalcFontSize := MulDiv(FCalcBtnHeight, cxMinCalcFontSize, cxMinCalcBtnHeight); - FCalcHeight := (FCalcYOfs+FCalcBtnHeight)*5+FCalcYOfs; - FCalcWidth := (FCalcXOfs+FCalcBtnWidth)*6+FCalcXOfs*2+4; - // reCalc rect buttons - CreateLayout; -end; - -procedure TcxCustomCalculator.FontChanged; -begin - if not (csLoading in ComponentState) then ParentFont := False; - inherited FontChanged; -end; - -procedure TcxCustomCalculator.FocusChanged; -begin - inherited FocusChanged; - InvalidateButton(cbEqual); -end; - -procedure TcxCustomCalculator.SetEnabled( Value: Boolean); -begin - inherited; - Invalidate; -end; - -procedure TcxCustomCalculator.StopTracking; -begin - if FTracking then - begin - TrackButton(-1, -1); - FTracking := False; - MouseCapture := False; - if FDownButton <> cbNone then - FButtons[FDownButton].Down := False; - end; -end; - -procedure TcxCustomCalculator.TrackButton(X,Y: Integer); -var - FlagRepaint : Boolean; -begin - if FDownButton <> cbNone then - begin - FlagRepaint := (GetButtonKindAt(X, Y) = FDownButton) <> FButtons[FDownButton].Down; - FButtons[FDownButton].Down := (GetButtonKindAt(X, Y) = FDownButton); - if FlagRepaint then - InvalidateButton(FDownButton); - end; -end; - -procedure TcxCustomCalculator.InvalidateButton(ButtonKind : TcxCalcButtonKind); -var - R: TRect; -begin - if ButtonKind <> cbNone then - begin - R := FButtons[ButtonKind].BtnRect; - InvalidateRect(R, False); - end; -end; - -procedure TcxCustomCalculator.MouseLeave(AControl: TControl); -begin - inherited; - if GetPainter.IsButtonHotTrack and Enabled and - not Dragging and (FActiveButton <> cbNone) then - begin - InvalidateButton(FActiveButton); - FActiveButton := cbNone; - end; -end; - -function TcxCustomCalculator.GetButtonKindChar(Ch : Char) : TcxCalcbuttonKind; -begin - case Ch of - '0'..'9' : Result := TcxCalcbuttonKind(Ord(cbNum0)+Ord(Ch)-Ord('0')); - '+' : Result := cbAdd; - '-' : Result := cbSub; - '*' : Result := cbMul; - '/' : Result := cbDiv; - '%' : Result := cbPercent; - '=' : Result := cbEqual; - #8 : Result := cbBack; - '@' : Result := cbSqrt; - '.', ',': Result := cbDecimal; - else - Result := cbNone; - end; -end; - -function TcxCustomCalculator.GetButtonKindKey(Key: Word; Shift: TShiftState) : TcxCalcbuttonKind; -begin - Result := cbNone; - case Key of - VK_RETURN : Result := cbEqual; - VK_ESCAPE : Result := cbClear; - VK_F9 : Result := cbSign; - VK_DELETE : Result := cbCancel; - Ord('C'){VK_C} : if not (ssCtrl in Shift) then Result := cbClear; - Ord('P'){VK_P} : if ssCtrl in Shift then Result := cbMP; - Ord('L'){VK_L} : if ssCtrl in Shift then Result := cbMC; - Ord('R'){VK_R} : if ssCtrl in Shift then Result := cbMR - else Result := cbRev; - Ord('M'){VK_M} : if ssCtrl in Shift then Result := cbMS; - end; -end; - -procedure TcxCustomCalculator.CopyToClipboard; -begin - Clipboard.AsText := GetEditorValue; -end; - -procedure TcxCustomCalculator.PasteFromClipboard; -var - S, S1 : String; - i : Integer; -begin - if Clipboard.HasFormat(CF_TEXT) then - try - S := Clipboard.AsText; - S1 := ''; - repeat - i := Pos(CurrencyString, S); - if i > 0 then - begin - S1 := S1 + Copy(S, 1, i - 1); - S := Copy(S, i + Length(CurrencyString), MaxInt); - end - else - S1 := S1 + S; - until i <= 0; - SetDisplay(StrToFloat(Trim(S1))); - FStatus := csValid; - except - SetDisplay(0.0); - end; -end; - -procedure TcxCustomCalculator.SetAutoFontSize(Value : Boolean); -begin - if AutoFontSize <> Value then - begin - FAutoFontSize := Value; - Font.OnChange(nil); - end; -end; - -// math routines -procedure TcxCustomCalculator.Error; -begin - FStatus := csError; - SetEditorValue(cxGetResourceString(@scxSCalcError)); - if FBeepOnError then MessageBeep(0); -// if Assigned(FOnError) then FOnError(Self); -end; - -procedure TcxCustomCalculator.CheckFirst; -begin - if FStatus = csFirst then - begin - FStatus := csValid; - SetEditorValue('0'); - end; -end; - -procedure TcxCustomCalculator.Clear; -begin - FStatus := csFirst; - SetDisplay(0.0); - FOperator := cbEqual; -end; - -procedure TcxCustomCalculator.ButtonClick(ButtonKind : TcxCalcButtonKind); -var - AValue : Extended; - AOldEditorValue: string; -begin - if Assigned(FOnButtonClick) then FOnButtonClick(Self, ButtonKind); - if (FStatus = csError) and not (ButtonKind in [cbClear, cbCancel]) then - begin - Error; - Exit; - end; - AOldEditorValue := EditorValue; - LockChanges(True); - try - case ButtonKind of - cbDecimal: - begin - CheckFirst; - if Pos(DecimalSeparator, EditorValue) = 0 then - SetEditorValue(EditorValue + DecimalSeparator); - end; - cbRev: - if FStatus in [csValid, csFirst] then - begin - FStatus := csFirst; - if FOperator in OperationButtons then - FStatus := csValid; - if GetDisplay = 0 then Error else SetDisplay(1.0 / GetDisplay); - end; - cbSqrt: - if FStatus in [csValid, csFirst] then - begin - FStatus := csFirst; - if FOperator in OperationButtons then - FStatus := csValid; - if GetDisplay < 0 then Error else SetDisplay(Sqrt(GetDisplay)); - end; - cbNum0..cbNum9: - begin - CheckFirst; - if EditorValue = '0' then SetEditorValue(''); - if Length(EditorValue) < Max(2, FPrecision) + Ord(Boolean(Pos('-', EditorValue))) then - SetEditorValue(EditorValue + Char(Ord('0')+Byte(ButtonKind)-Byte(cbNum0))) - else - if FBeepOnError then MessageBeep(0); - end; - cbBack: - begin - CheckFirst; - if (Length(EditorValue) = 1) or ((Length(EditorValue) = 2) and (EditorValue[1] = '-')) then - SetEditorValue('0') - else - SetEditorValue(Copy(EditorValue, 1, Length(EditorValue) - 1)); - end; - cbSign: SetDisplay(-GetDisplay); - cbAdd, cbSub, cbMul, cbDiv, cbEqual, cbPercent : - begin - if FStatus = csValid then - begin - FStatus := csFirst; - AValue := GetDisplay; - if ButtonKind = cbPercent then - case FOperator of - cbAdd, cbSub : AValue := FOperand * AValue / 100.0; - cbMul, cbDiv : AValue := AValue / 100.0; - end; - case FOperator of - cbAdd : SetDisplay(FOperand + AValue); - cbSub : SetDisplay(FOperand - AValue); - cbMul : SetDisplay(FOperand * AValue); - cbDiv : if AValue = 0 then Error else SetDisplay(FOperand / AValue); - end; - end; - FOperator := ButtonKind; - FOperand := GetDisplay; - if (ButtonKind in ResultButtons) and Assigned(FOnResult) then FOnResult(Self); - end; - cbClear, cbCancel: Clear; - cbMP: - if FStatus in [csValid, csFirst] then - begin - FStatus := csFirst; - FMemory := FMemory + GetDisplay; - UpdateMemoryButtons; - InvalidateMemoryButtons; - end; - cbMS: - if FStatus in [csValid, csFirst] then - begin - FStatus := csFirst; - FMemory := GetDisplay; - UpdateMemoryButtons; - InvalidateMemoryButtons; - end; - cbMR: - if FStatus in [csValid, csFirst] then - begin - FStatus := csFirst; - CheckFirst; - SetDisplay(FMemory); - end; - cbMC: - begin - FMemory := 0.0; - UpdateMemoryButtons; - InvalidateMemoryButtons; - end; - end; - finally - LockChanges(False, AOldEditorValue <> EditorValue); - end; -end; - -procedure TcxCustomCalculator.UpdateMemoryButtons; -begin - // Disable buttons - if FMemory <> 0.0 then - begin - FButtons[cbMC].Grayed := False; - FButtons[cbMR].Grayed := False; - end - else - begin - FButtons[cbMC].Grayed := True; - FButtons[cbMR].Grayed := True; - end; -end; - -procedure TcxCustomCalculator.InvalidateMemoryButtons; -begin - InvalidateButton(cbMC); - InvalidateButton(cbMR); -end; - -function TcxCustomCalculator.GetDisplay: Extended; -var - S: string; -begin - if FStatus = csError then - Result := 0.0 - else - begin - S := Trim(GetEditorValue); - if S = '' then S := '0'; - RemoveThousandSeparator(S); - Result := StrToFloat(S); - end; -end; - -procedure TcxCustomCalculator.SetDisplay(Value: Extended); -var - S: string; -begin - S := FloatToStrF(Value, ffGeneral, Max(2, FPrecision), 0); - if GetEditorValue <> S then - begin - SetEditorValue(S); - if Assigned(FOnDisplayChange) then FOnDisplayChange(Self); - end; -end; - -function TcxCustomCalculator.GetMemory: Extended; -begin - Result := FMemory; -end; - -procedure TcxCustomCalculator.HidePopup(Sender: TcxControl; AReason: TcxEditCloseUpReason); -begin - if Assigned(FOnHidePopup) then FOnHidePopup(Self, AReason); -end; - -procedure TcxCustomCalculator.LockChanges(ALock: Boolean; AInvokeChangedOnUnlock: Boolean = True); -begin -end; - -{ TcxPopupCalculator } - -constructor TcxPopupCalculator.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - IsPopupControl := True; -end; - -procedure TcxPopupCalculator.Init; -begin - FPressedButton := cbNone; -end; - -function TcxPopupCalculator.GetEditorValue: string; -begin - Result := Edit.Text; -end; - -function TcxPopupCalculator.GetPainter: TcxCustomLookAndFeelPainterClass; -begin - if Edit.ViewInfo.Painter <> nil then - Result := Edit.ViewInfo.Painter - else - Result := GetButtonPainterClass(Edit.PopupControlsLookAndFeel); -end; - -procedure TcxPopupCalculator.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - case Key of - VK_ESCAPE: HidePopup(Self, crCancel); - VK_INSERT: - if (Shift = [ssShift]) then - PasteFromClipboard - else - if (Shift = [ssCtrl]) then - CopyToClipboard; - VK_F4: - if not (ssAlt in Shift) then - HidePopup(Self, crClose); - VK_UP, VK_DOWN: - if Shift = [ssAlt] then - HidePopup(Self, crClose); - VK_TAB: - Edit.DoEditKeyDown(Key, Shift); - VK_RETURN: - HidePopup(Self, crEnter); - end; -end; - -procedure TcxPopupCalculator.KeyPress(var Key: Char); -begin - inherited KeyPress(Key); - if (Key = '=') and FEdit.ActiveProperties.QuickClose then - HidePopup(Self, crEnter); -end; - -procedure TcxPopupCalculator.SetEditorValue(const Value: string); -begin - if Edit.DoEditing then - begin - Edit.InnerEdit.EditValue := Value; - Edit.ModifiedAfterEnter := True; - end; -end; - -procedure TcxPopupCalculator.LockChanges(ALock: Boolean; AInvokeChangedOnUnlock: Boolean = True); -begin - inherited; - Edit.LockChangeEvents(ALock, AInvokeChangedOnUnlock); -end; - -{ TcxCalcEditPropertiesValues } - -procedure TcxCalcEditPropertiesValues.Assign(Source: TPersistent); -begin - if Source is TcxCalcEditPropertiesValues then - begin - BeginUpdate; - try - inherited Assign(Source); - Precision := TcxCalcEditPropertiesValues(Source).Precision; - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxCalcEditPropertiesValues.RestoreDefaults; -begin - BeginUpdate; - try - inherited RestoreDefaults; - Precision := False; - finally - EndUpdate; - end; -end; - -procedure TcxCalcEditPropertiesValues.SetPrecision(Value: Boolean); -begin - if Value <> FPrecision then - begin - FPrecision := Value; - Changed; - end; -end; - -{ TcxCustomCalcEditProperties } - -constructor TcxCustomCalcEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FBeepOnError := True; - FPrecision := cxDefCalcPrecision; -// MaxLength := cxDefCalcPrecision + 2; - FQuickClose := False; - PopupSizeable := False; - ImmediateDropDown := False; -end; - -function TcxCustomCalcEditProperties.GetAssignedValues: TcxCalcEditPropertiesValues; -begin - Result := TcxCalcEditPropertiesValues(FAssignedValues); -end; - -function TcxCustomCalcEditProperties.GetPrecision: Byte; -begin - if AssignedValues.Precision then - Result := FPrecision - else - if IDefaultValuesProvider <> nil then - Result := IDefaultValuesProvider.DefaultPrecision - else - Result := cxDefCalcPrecision; - if Result > cxMaxCalcPrecision then - Result := cxMaxCalcPrecision; -end; - -function TcxCustomCalcEditProperties.IsPrecisionStored: Boolean; -begin - Result := AssignedValues.Precision; -end; - -procedure TcxCustomCalcEditProperties.SetAssignedValues( - Value: TcxCalcEditPropertiesValues); -begin - FAssignedValues.Assign(Value); -end; - -procedure TcxCustomCalcEditProperties.SetBeepOnError(Value: Boolean); -begin - if Value <> FBeepOnError then - begin - FBeepOnError := Value; - Changed; - end; -end; - -procedure TcxCustomCalcEditProperties.SetPrecision(Value: Byte); -begin - if AssignedValues.Precision and (Value = FPrecision) then - Exit; - - AssignedValues.FPrecision := True; - FPrecision := Value; - Changed; -end; - -procedure TcxCustomCalcEditProperties.SetQuickClose(Value: Boolean); -begin - if Value <> FQuickClose then - begin - FQuickClose := Value; - Changed; - end; -end; - -procedure TcxCustomCalcEditProperties.SetScientificFormat(Value: Boolean); -begin - if Value <> FScientificFormat then - begin - FScientificFormat := Value; - Changed; - end; -end; - -procedure TcxCustomCalcEditProperties.SetUseThousandSeparator(Value: Boolean); -begin - if Value <> FUseThousandSeparator then - begin - FUseThousandSeparator := Value; - Changed; - end; -end; - -function TcxCustomCalcEditProperties.GetAlwaysPostEditValue: Boolean; -begin - Result := True; -end; - -class function TcxCustomCalcEditProperties.GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; -begin - Result := TcxCalcEditPropertiesValues; -end; - -function TcxCustomCalcEditProperties.HasDigitGrouping( - AIsDisplayValueSynchronizing: Boolean): Boolean; -begin - Result := not ScientificFormat and UseThousandSeparator; -end; - -function TcxCustomCalcEditProperties.PopupWindowAcceptsAnySize: Boolean; -begin - Result := False; -end; - -function TcxCustomCalcEditProperties.StrToFloatEx(S: string; - var Value: Extended): Boolean; -var - E: Extended; - I: Integer; -begin - // Ignore Thousand Separators - for I := Length(S) downto 1 do - if S[I] = ThousandSeparator then - Delete(S, I, 1); - if not TextToFloat(PChar(S), E, fvExtended) or - ((E <> 0) and ((Abs(E) < MinDouble) or (Abs(E) > MaxDouble))) then - begin - Value := 0; - Result := False; - end - else - begin - Value := E; - Result := True; - end; -end; - -procedure TcxCustomCalcEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomCalcEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with TcxCustomCalcEditProperties(Source) do - begin - Self.BeepOnError := BeepOnError; - - Self.AssignedValues.Precision := False; - if AssignedValues.Precision then - Self.Precision := Precision; - - Self.QuickClose := QuickClose; - Self.ScientificFormat := ScientificFormat; - Self.UseThousandSeparator := UseThousandSeparator; - end; - finally - EndUpdate - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomCalcEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxCalcEdit; -end; - -function TcxCustomCalcEditProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - if not AEditFocused and not AssignedValues.DisplayFormat and - (IDefaultValuesProvider <> nil) and - IDefaultValuesProvider.IsDisplayFormatDefined(True) then - Result := evsText - else - Result := evsValue; -end; - -function TcxCustomCalcEditProperties.IsDisplayValueValid( - var DisplayValue: TcxEditValue; AEditFocused: Boolean): Boolean; -begin -// if AEditFocused - - Result := True; -end; - -function TcxCustomCalcEditProperties.IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; -var - AValue: Extended; -begin - Result := VarIsNumericEx(EditValue) or VarIsSoftNull(EditValue); - if not Result then - Result := VarIsStr(EditValue) and - TextToFloat(PChar(VarToStr(EditValue)), AValue, fvExtended); -end; - -procedure TcxCustomCalcEditProperties.PrepareDisplayValue( - const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; - AEditFocused: Boolean); - - procedure RemoveInsignificantZeros(var S: string); - var - AExponentialPart: string; - I: Integer; - begin - if Pos(DecimalSeparator, S) = 0 then - Exit; - AExponentialPart := RemoveExponentialPart(S); - I := Length(S); - while S[I] = '0' do - Dec(I); - Delete(S, I + 1, Length(S) - I); - if S[Length(S)] = DecimalSeparator then - Delete(S, Length(S), 1); - S := S + AExponentialPart; - end; - -var - AFormat: TFloatFormat; - APrecision: Byte; - S: string; -begin - if VarIsSoftNull(AEditValue) then - S := '' - else - if not AEditFocused and AssignedValues.DisplayFormat then - S := FormatFloat(DisplayFormat, AEditValue) - else - begin - if ScientificFormat then - AFormat := ffExponent - else - AFormat := ffGeneral; - APrecision := Precision; - if APrecision = 0 then - APrecision := cxDefCalcPrecision; - - S := FloatToStrF(AEditValue, AFormat, APrecision, 0); - if UseThousandSeparator and not ScientificFormat then - InsertThousandSeparator(S); - if ScientificFormat then - RemoveInsignificantZeros(S); - end; - DisplayValue := S; -end; - -procedure TcxCustomCalcEditProperties.ValidateDisplayValue( - var ADisplayValue: TcxEditValue; var AErrorText: TCaption; - var Error: Boolean; AEdit: TcxCustomEdit); -begin - Error := False; - inherited ValidateDisplayValue(ADisplayValue, AErrorText, Error, AEdit); -end; - -{ TcxCustomCalcEdit } - -destructor TcxCustomCalcEdit.Destroy; -begin - FreeAndNil(FCalculator); - inherited Destroy; -end; - -function TcxCustomCalcEdit.GetProperties: TcxCustomCalcEditProperties; -begin - Result := TcxCustomCalcEditProperties(FProperties); -end; - -function TcxCustomCalcEdit.GetActiveProperties: TcxCustomCalcEditProperties; -begin - Result := TcxCustomCalcEditProperties(InternalGetActiveProperties); -end; - -function TcxCustomCalcEdit.GetValue: Extended; -begin - if VarIsNull(EditValue) or (VarIsStr(EditValue) and (EditValue = '')) then - Result := 0 - else - Result := EditValue; -end; - -procedure TcxCustomCalcEdit.SetProperties(Value: TcxCustomCalcEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomCalcEdit.SetValue(const Value: Extended); -begin - InternalEditValue := Value; -end; - -procedure TcxCustomCalcEdit.FormatChanged; -begin - DataBinding.UpdateDisplayValue; -end; - -function TcxCustomCalcEdit.CanDropDown: Boolean; -begin - Result := (not ActiveProperties.ReadOnly) and DataBinding.IsDataAvailable; -end; - -procedure TcxCustomCalcEdit.CreatePopupWindow; -begin - inherited CreatePopupWindow; - PopupWindow.ModalMode := False; -end; - -procedure TcxCustomCalcEdit.DoEnter; -begin - SynchronizeDisplayValue; - inherited; -end; - -procedure TcxCustomCalcEdit.DoExit; -begin - inherited; - DataBinding.UpdateDisplayValue; -end; - -procedure TcxCustomCalcEdit.DoInitPopup; -begin - inherited DoInitPopup; - ActiveProperties.PopupControl := FCalculator; -end; - -procedure TcxCustomCalcEdit.Initialize; -begin - inherited Initialize; - Value := 0; - FCalculator := TcxPopupCalculator.Create(Self); - FCalculator.Parent := PopupWindow; - FCalculator.Edit := Self; - FCalculator.AutoFontSize := False; - FCalculator.OnHidePopup := HidePopup; - ActiveProperties.PopupControl := FCalculator; -end; - -procedure TcxCustomCalcEdit.InitializePopupWindow; -begin - inherited InitializePopupWindow; - with Calculator do - begin - HandleNeeded; - Font.Assign(Self.VisibleFont); - FontChanged; - Resize; - end; -end; - -function TcxCustomCalcEdit.InternalGetEditingValue: TcxEditValue; -begin - PrepareEditValue(Text, Result, True); -end; - -function TcxCustomCalcEdit.IsValidChar(Key: Char): Boolean; - - function NumDigits(const S: string): Byte; - var - I: Integer; - begin - Result := 0; - for I := 1 to Length(S) do - if (S[I] = 'e') or (S[I] = 'E') then - Break - else - if dxCharInSet(S[I], ['0'..'9']) then - Inc(Result); - end; - -var - S: string; - V: Extended; - StartPos, StopPos: Integer; -begin - Result := False; - if not IsNumericChar(Key, ntExponent) then - Exit; - S := Text; - StartPos := SelStart; - StopPos := SelStart + SelLength; - Delete(S, SelStart + 1, StopPos - StartPos); - if (Key = '-') and (S = '') then - begin - Result := True; - Exit; - end; - Insert(Key, S, StartPos + 1); - Result := ActiveProperties.StrToFloatEx(S, V); -end; - -procedure TcxCustomCalcEdit.KeyPress(var Key: Char); -begin - if (Key = '.') or (Key = ',') then - Key := DecimalSeparator; - if IsTextChar(Key) and not IsValidChar(Key) then - begin - Key := #0; - if ActiveProperties.BeepOnError then Beep; - end; - inherited KeyPress(Key); -end; - -procedure TcxCustomCalcEdit.PopupWindowClosed(Sender: TObject); -begin - if Text = cxGetResourceString(@scxSCalcError) then InternalEditValue := 0; - if ActiveProperties.AutoSelect then SelectAll else SelStart := Length(Text); - inherited PopupWindowClosed(Sender); -end; - -procedure TcxCustomCalcEdit.PopupWindowShowed(Sender: TObject); -begin - inherited PopupWindowShowed(Sender); - FCalculator.Init; -end; - -procedure TcxCustomCalcEdit.PropertiesChanged(Sender: TObject); -begin - if (Sender <> nil) and ActiveProperties.FormatChanging then - Exit; - inherited PropertiesChanged(Sender); - if not PropertiesChangeLocked then - begin - FCalculator.BeepOnError := ActiveProperties.BeepOnError; - FCalculator.Precision := ActiveProperties.Precision; - ActiveProperties.FChangedLocked := True; - ActiveProperties.PopupControl := FCalculator; - ActiveProperties.FChangedLocked := False; - end; -end; - -function TcxCustomCalcEdit.InternalPrepareEditValue(const ADisplayValue: string; - out EditValue: TcxEditValue): Boolean; -var - AValue: Extended; - S: string; -begin - Result := True; - S := VarToStr(ADisplayValue); - if not ActiveProperties.ScientificFormat and ActiveProperties.UseThousandSeparator then - RemoveThousandSeparator(S); - if Trim(S) = '' then - EditValue := Null - else - begin - Result := TextToFloat(PChar(S), AValue, fvExtended); - if Result then - EditValue := AValue - else - EditValue := Null; - end; -end; - -class function TcxCustomCalcEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomCalcEditProperties; -end; - -procedure TcxCustomCalcEdit.PasteFromClipboard; -begin - if DoEditing then - Calculator.PasteFromClipboard; -end; - -procedure TcxCustomCalcEdit.PrepareEditValue( - const ADisplayValue: TcxEditValue; out EditValue: TcxEditValue; - AEditFocused: Boolean); -begin - InternalPrepareEditValue(ADisplayValue, EditValue); -end; - -{ TcxCalcEdit } - -class function TcxCalcEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCalcEditProperties; -end; - -function TcxCalcEdit.GetActiveProperties: TcxCalcEditProperties; -begin - Result := TcxCalcEditProperties(InternalGetActiveProperties); -end; - -function TcxCalcEdit.GetProperties: TcxCalcEditProperties; -begin - Result := TcxCalcEditProperties(FProperties); -end; - -procedure TcxCalcEdit.SetProperties(Value: TcxCalcEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterCalcEditHelper } - -class function TcxFilterCalcEditHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxCalcEdit; -end; - -class function TcxFilterCalcEditHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoLess, fcoLessEqual, fcoGreater, - fcoGreaterEqual, fcoBlanks, fcoNonBlanks]; - if AExtendedSet then - Result := Result + [fcoBetween, fcoNotBetween, fcoInList, fcoNotInList]; -end; - -class procedure TcxFilterCalcEditHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - with TcxCustomCalcEditProperties(AProperties) do - QuickClose := True; -end; - -initialization - GetRegisteredEditProperties.Register(TcxCalcEditProperties, scxSEditRepositoryCalcItem); - FilterEditsController.Register(TcxCalcEditProperties, TcxFilterCalcEditHelper); - -finalization - FilterEditsController.Unregister(TcxCalcEditProperties, TcxFilterCalcEditHelper); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxCalendar.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxCalendar.pas deleted file mode 100644 index a355f997..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxCalendar.pas +++ /dev/null @@ -1,3825 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxCalendar; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, ComCtrls, -{$IFDEF DELPHI6} - Types, Variants, DateUtils, -{$ENDIF} - SysUtils, Classes, Graphics, Controls, Forms, StdCtrls, Clipbrd, - cxClasses, cxGraphics, cxControls, cxContainer, cxDataStorage, cxDataUtils, - cxEdit, cxDropDownEdit, cxTextEdit, cxMaskEdit, cxButtons, cxDateUtils, - cxEditConsts, cxFormats, cxTimeEdit, cxFilterControlUtils, cxLookAndFeels; - -type - TCalendarButton = (btnClear, btnNow, btnToday, btnOk); - TDateButton = btnClear..btnToday; - TDateButtons = set of TDateButton; - - TcxCalendarArrow = (caPrevMonth, caNextMonth, caPrevYear, caNextYear); - TcxCalendarHotTrackRegion = (chrNone, chrMonth, chrYear); - TcxCalendarKind = (ckDate, ckDateTime); - TcxCustomCalendar = class; - - { TcxClock } - - TcxClock = class(TcxControl) - private - FMinuteDotColor: TColor; - FTime: TTime; - function GetBackgroundColor: TColor; - procedure SetMinuteDotColor(Value: TColor); - procedure SetTime(Value: TTime); - protected - procedure Paint; override; - // - property BackgroundColor: TColor read GetBackgroundColor; - public - constructor Create(AOwner: TComponent); override; - published - property Color; - property MinuteDotColor: TColor read FMinuteDotColor write SetMinuteDotColor default clWindow; - property Time: TTime read FTime write SetTime; - end; - -{ TcxMonthListBox - Bug in Delphi5: Must be in the interface part } - - TcxMonthListBox = class(TcxCustomPopupWindow) - private - FCurrentDate: TcxDateTime; - FOrigin: TPoint; - FTopMonthDelta: Integer; - FItemHeight: Integer; - FItemIndex: Integer; - FItemCount: Integer; - FTimer: TcxTimer; - FSign: Integer; - procedure DoTimer(Sender: TObject); - function GetCalendar: TcxCustomCalendar; - function GetCalendarTable: TcxCustomCalendarTable; - function GetDate: TDateTime; - function GetShowYears: Boolean; - procedure SetItemIndex(Value: Integer); - procedure SetTopMonthDelta(Value: Integer); - protected - function CalculatePosition: TPoint; override; - procedure Click; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure DoShowed; override; - procedure FontChanged; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure Paint; override; - property Calendar: TcxCustomCalendar read GetCalendar; - property CalendarTable: TcxCustomCalendarTable read GetCalendarTable; - property ItemHeight: Integer read FItemHeight; - property ItemIndex: Integer read FItemIndex write SetItemIndex; - property ShowYears: Boolean read GetShowYears; - property TopMonthDelta: Integer read FTopMonthDelta write SetTopMonthDelta; - public - constructor Create(AOwnerControl: TWinControl); override; - destructor Destroy; override; - procedure CloseUp; override; - procedure Popup(AFocusedControl: TWinControl); override; - property Date: TDateTime read GetDate; - end; - - { TcxCustomCalendar } - - TcxCalendarViewInfo = record - ArrowRects: array[TcxCalendarArrow] of TRect; - CalendarRect: TRect; - CurrentDateRegion: TRect; - HeaderRegion: TRect; - LastVisibleArrow: TcxCalendarArrow; - MonthRegion: TRect; - YearRegion: TRect; - end; - - TcxCustomCalendar = class(TcxControl, IcxMouseTrackingCaller) - private - FArrowsForYear: Boolean; - FButtonsHeight: Integer; - FButtonsOffset: Integer; - FButtonsRegionHeight: Integer; - FButtonWidth: Integer; - FCalendarButtons: TDateButtons; - FCalendarTable: TcxCustomCalendarTable; - FClearButton: TcxButton; - FClock: TcxClock; - FClockSize: Integer; - FColWidth: Integer; - FDateRegionWidth: Integer; - FDaysOfWeekHeight: Integer; - FFirstDate: Double; - FFlat: Boolean; - FHeaderHeight: Integer; - FHotTrackRegion: TcxCalendarHotTrackRegion; - FKind: TcxCalendarKind; - FMonthListBox: TcxMonthListBox; - FNowButton: TcxButton; - FOKButton: TcxButton; - FPrevCursor: TCursor; - FRowHeight: Integer; - FSelectDate: Double; - FSideWidth: Integer; - FSpaceWidth: Integer; - FTimeEdit: TcxTimeEdit; - FTimer: TcxTimer; - FTodayButton: TcxButton; - FViewInfo: TcxCalendarViewInfo; - FWeekNumbers: Boolean; - FWeekNumberWidth: Integer; - FYearsInMonthList: Boolean; - FOnDateTimeChanged: TNotifyEvent; - procedure AdjustCalendarControlsPosition; - procedure ButtonClick(Sender: TObject); - procedure CalculateViewInfo; - procedure CreateButtons; - procedure CorrectHeaderTextRect(var R: TRect); - procedure DoDateTimeChanged; - procedure DoScrollArrow(Sender: TObject); - procedure DrawHeader; - function GetBackgroundColor: TColor; - function GetContainerBorderColor: TColor; - function GetDateFromCell(X, Y: Integer): Double; - function GetDateHeaderFrameColor: TColor; - function GetDateTimeHeaderFrameColor: TColor; - function GetHeaderColor: TColor; - function GetHeaderOffset: TRect; - function GetShowButtonsRegion: Boolean; - function GetTimeEditWidth: Integer; - function GetTimeFormat: TcxTimeEditTimeFormat; - function GetUse24HourFormat: Boolean; - function GetWeekNumbersRegionWidth: Integer; - procedure GetVisibleButtonList(AList: TList); - procedure SetArrowsForYear(Value: Boolean); - procedure SetCalendarButtons(Value: TDateButtons); - procedure SetFlat(Value: Boolean); - procedure SetHotTrackRegion(Value: TcxCalendarHotTrackRegion); - procedure SetKind(Value: TcxCalendarKind); - procedure SetTimeFormat(Value: TcxTimeEditTimeFormat); - procedure SetUse24HourFormat(Value: Boolean); - procedure SetWeekNumbers(Value: Boolean); - procedure TimeChanged(Sender: TObject); - procedure UpdateCalendarButtonCaptions; - protected - procedure DblClick; override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure DrawButtons(ACanvas: TcxCanvas); - procedure DrawDateRegion(ACanvas: TcxCanvas); - procedure DrawDayNumbers(ACanvas: TcxCanvas; const R: TRect); - procedure DrawMonths(ACanvas: TcxCanvas); - procedure DrawWeekNumbers(ACanvas: TcxCanvas); - procedure FontChanged; override; - function HasBackground: Boolean; override; - procedure InitControl; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseEnter(AControl: TControl); override; - procedure MouseLeave(AControl: TControl); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure Paint; override; - procedure Calculate; virtual; - function CanResize(var NewWidth, NewHeight: Integer): Boolean; override; - procedure CheckHotTrack; virtual; - procedure DoStep(AArrow: TcxCalendarArrow); - function GetButtonsRegionOffset: Integer; virtual; - function GetLastDate: Double; virtual; - function GetMonthCalendarOffset: TPoint; virtual; - function GetRealFirstDate: Double; virtual; - function GetRealLastDate: Double; virtual; - function GetSize: TSize; virtual; - procedure HidePopup(Sender: TcxControl; AReason: TcxEditCloseUpReason); virtual; - procedure InternalSetSelectDate(Value: Double; ARepositionVisibleDates: Boolean); - function PosToDateTime(P: TPoint): Double; virtual; - procedure SetFirstDate(Value: Double); virtual; - procedure SetSelectDate(Value: Double); virtual; - procedure SetSize; - procedure StepToFuture; - procedure StepToPast; - - // IcxMouseTrackingCaller - procedure MouseTrackingMouseLeave; - procedure IcxMouseTrackingCaller.MouseLeave = MouseTrackingMouseLeave; - - property BackgroundColor: TColor read GetBackgroundColor; - property ContainerBorderColor: TColor read GetContainerBorderColor; - // - property CalendarTable: TcxCustomCalendarTable read FCalendarTable; - property HotTrackRegion: TcxCalendarHotTrackRegion read FHotTrackRegion write SetHotTrackRegion; - property ShowButtonsRegion: Boolean read GetShowButtonsRegion; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - // IdxLocalizerListener - procedure TranslationChanged; override; - - property ArrowsForYear: Boolean read FArrowsForYear write SetArrowsForYear default True; - property CalendarButtons: TDateButtons read FCalendarButtons write SetCalendarButtons; - property FirstDate: Double read FFirstDate write SetFirstDate; - property Flat: Boolean read FFlat write SetFlat default True; - property Font; - property Kind: TcxCalendarKind read FKind write SetKind default ckDate; - property SelectDate: Double read FSelectDate write SetSelectDate; - property TimeFormat: TcxTimeEditTimeFormat read GetTimeFormat write SetTimeFormat default tfHourMinSec; - property Use24HourFormat: Boolean read GetUse24HourFormat write SetUse24HourFormat default True; - property WeekNumbers: Boolean read FWeekNumbers write SetWeekNumbers default False; - property YearsInMonthList: Boolean read FYearsInMonthList write FYearsInMonthList default True; - property OnDateTimeChanged: TNotifyEvent read FOnDateTimeChanged write FOnDateTimeChanged; - end; - - { TcxPopupCalendar } - - TcxCustomDateEdit = class; - - TcxPopupCalendar = class(TcxCustomCalendar) - private - FEdit: TcxCustomDateEdit; - FOnHidePopup: TcxEditClosePopupEvent; - protected - procedure CheckHotTrack; override; - procedure HidePopup(Sender: TcxControl; AReason: TcxEditCloseUpReason); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - public - property Edit: TcxCustomDateEdit read FEdit write FEdit; - property OnHidePopup: TcxEditClosePopupEvent read FOnHidePopup write FOnHidePopup; - end; - - TcxPopupCalendarClass = class of TcxPopupCalendar; - - { TcxDateEditPropertiesValues } - - TcxDateEditPropertiesValues = class(TcxTextEditPropertiesValues) - private - FDateButtons: Boolean; - FInputKind: Boolean; - function GetMaxDate: Boolean; - function GetMinDate: Boolean; - function IsMaxDateStored: Boolean; - function IsMinDateStored: Boolean; - procedure SetDateButtons(Value: Boolean); - procedure SetInputKind(Value: Boolean); - procedure SetMaxDate(Value: Boolean); - procedure SetMinDate(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property DateButtons: Boolean read FDateButtons write SetDateButtons - stored False; - property InputKind: Boolean read FInputKind write SetInputKind stored False; - property MaxDate: Boolean read GetMaxDate write SetMaxDate stored IsMaxDateStored; - property MinDate: Boolean read GetMinDate write SetMinDate stored IsMinDateStored; - end; - - { TcxCustomDateEditProperties } - - TDateOnError = (deNoChange, deToday, deNull); - TcxInputKind = (ikStandard, ikMask, ikRegExpr); - - TcxCustomDateEditProperties = class(TcxCustomPopupEditProperties) - private - FArrowsForYear: Boolean; - FDateButtons: TDateButtons; - FDateOnError: TDateOnError; - FInputKind: TcxInputKind; - FKind: TcxCalendarKind; - FSaveTime: Boolean; - FShowTime: Boolean; - FWeekNumbers: Boolean; - FYearsInMonthList: Boolean; - procedure BuildEditMask; - function GetAssignedValues: TcxDateEditPropertiesValues; - function GetDateButtons: TDateButtons; - function GetDefaultDateButtons: TDateButtons; - function GetDefaultInputKind: TcxInputKind; - function GetInputKind: TcxInputKind; - function GetMaxDate: TDateTime; - function GetMinDate: TDateTime; - function IsDateButtonsStored: Boolean; - function IsInputKindStored: Boolean; - function NeedShowTime(ADate: TDateTime; AIsFocused: Boolean): Boolean; - procedure SetArrowsForYear(Value: Boolean); - procedure SetAssignedValues(Value: TcxDateEditPropertiesValues); - procedure SetDateButtons(Value: TDateButtons); - procedure SetDateOnError(Value: TDateOnError); - procedure SetInputKind(Value: TcxInputKind); - procedure SetKind(Value: TcxCalendarKind); - procedure SetMaxDate(Value: TDateTime); - procedure SetMinDate(Value: TDateTime); - procedure SetSaveTime(Value: Boolean); - procedure SetShowTime(Value: Boolean); - procedure SetWeekNumbers(Value: Boolean); - procedure SetYearsInMonthList(Value: Boolean); - protected - procedure DoChanged; override; - function GetAlwaysPostEditValue: Boolean; override; - class function GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; override; - function GetDisplayFormatOptions: TcxEditDisplayFormatOptions; override; - function GetModeClass(AMaskKind: TcxEditMaskKind): TcxMaskEditCustomModeClass; override; - class function GetPopupWindowClass: TcxCustomEditPopupWindowClass; override; - function IsEditValueNumeric: Boolean; override; - function IsValueBoundDefined(ABound: TcxEditValueBound): Boolean; override; - function IsValueBoundsDefined: Boolean; override; - function PopupWindowAcceptsAnySize: Boolean; override; - function GetEmptyDisplayValue(AEditFocused: Boolean): string; - function GetStandardMaskBlank(APos: Integer): Char; virtual; - function GetTimeZoneInfo(APos: Integer; - out AInfo: TcxTimeEditZoneInfo): Boolean; virtual; - procedure InternalPrepareEditValue(ADisplayValue: string; - out EditValue: TcxEditValue); - property AssignedValues: TcxDateEditPropertiesValues read GetAssignedValues - write SetAssignedValues; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function IsDisplayValueValid(var DisplayValue: TcxEditValue; - AEditFocused: Boolean): Boolean; override; - function IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - procedure ValidateDisplayValue(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var AError: Boolean; - AEdit: TcxCustomEdit); override; - // !!! - property ArrowsForYear: Boolean read FArrowsForYear - write SetArrowsForYear default True; - property DateButtons: TDateButtons read GetDateButtons write SetDateButtons - stored IsDateButtonsStored; - property DateOnError: TDateOnError read FDateOnError write SetDateOnError - default deNoChange; - property ImmediateDropDown default False; - property InputKind: TcxInputKind read GetInputKind write SetInputKind - stored IsInputKindStored; - property Kind: TcxCalendarKind read FKind write SetKind default ckDate; - property MaxDate: TDateTime read GetMaxDate write SetMaxDate; - property MinDate: TDateTime read GetMinDate write SetMinDate; - property SaveTime: Boolean read FSaveTime write SetSaveTime default True; - property ShowTime: Boolean read FShowTime write SetShowTime default True; - property WeekNumbers: Boolean read FWeekNumbers write SetWeekNumbers - default False; - property YearsInMonthList: Boolean read FYearsInMonthList - write SetYearsInMonthList default True; - end; - - { TcxDateEditProperties } - - TcxDateEditProperties = class(TcxCustomDateEditProperties) - published - property Alignment; - property ArrowsForYear; - property AssignedValues; - property AutoSelect; - property ButtonGlyph; - property ClearKey; - property DateButtons; - property DateOnError; - property ImeMode; - property ImeName; - property ImmediatePost; - property InputKind; - property Kind; - property MaxDate; - property MinDate; - property PostPopupValueOnTab; - property ReadOnly; - property SaveTime; - property ShowTime; - property UseLeftAlignmentOnEditing; - property ValidateOnEnter; - property WeekNumbers; - property YearsInMonthList; - property OnChange; - property OnCloseUp; - property OnEditValueChanged; - property OnInitPopup; - property OnPopup; - property OnValidate; - end; - - { TcxDateEditPopupWindow } - - TcxDateEditPopupWindow = class(TcxPopupEditPopupWindow) - protected - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - function IsPopupCalendarKey(Key: Word; Shift: TShiftState): Boolean; virtual; - public - constructor Create(AOwnerControl: TWinControl); override; - end; - - { TcxDateEditMaskStandardMode } - - TcxDateEditMaskStandardMode = class(TcxMaskEditStandardMode) - protected - function GetBlank(APos: Integer): Char; override; - end; - - { TcxCustomDateEdit } - - TcxCustomDateEdit = class(TcxCustomPopupEdit) - private - FDateDropDown: TDateTime; - FSavedTime: TDateTime; - function GetActiveProperties: TcxCustomDateEditProperties; - function GetCurrentDate: TDateTime; - function GetProperties: TcxCustomDateEditProperties; - procedure SetProperties(Value: TcxCustomDateEditProperties); - protected - FCalendar: TcxPopupCalendar; - - function CanSynchronizeModeText: Boolean; override; - procedure CheckEditorValueBounds; override; - procedure CreatePopupWindow; override; -// procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); override; - procedure DropDown; override; - procedure Initialize; override; - procedure InitializePopupWindow; override; - function InternalGetEditingValue: TcxEditValue; override; - function InternalGetText: string; override; - procedure InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); override; - function InternalSetText(const Value: string): Boolean; override; - procedure InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); override; - function IsCharValidForPos(var AChar: Char; APos: Integer): Boolean; override; - procedure PopupWindowClosed(Sender: TObject); override; - procedure PopupWindowShowed(Sender: TObject); override; - procedure UpdateTextFormatting; override; - - procedure CreateCalendar; virtual; - procedure DateChange(Sender: TObject); virtual; - function GetCalendarClass: TcxPopupCalendarClass; virtual; - function GetDate: TDateTime; virtual; - function GetDateFromStr(const S: string): TDateTime; - function GetRecognizableDisplayValue(ADate: TDateTime): TcxEditValue; virtual; - procedure SetDate(Value: TDateTime); virtual; - procedure SetupPopupWindow; override; - - property Calendar: TcxPopupCalendar read FCalendar; - public - destructor Destroy; override; - - procedure Clear; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - - property ActiveProperties: TcxCustomDateEditProperties read GetActiveProperties; - property CurrentDate: TDateTime read GetCurrentDate; - property Date: TDateTime read GetDate write SetDate stored False; - property Properties: TcxCustomDateEditProperties read GetProperties - write SetProperties; - end; - - { TcxDateEdit } - - TcxDateEdit = class(TcxCustomDateEdit) - private - function GetActiveProperties: TcxDateEditProperties; - function GetProperties: TcxDateEditProperties; - procedure SetProperties(Value: TcxDateEditProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxDateEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property BiDiMode; - property Constraints; - property DragCursor; - property DragKind; - property Date; - property DragMode; - property EditValue; - property Enabled; - property ImeMode; - property ImeName; - property ParentBiDiMode; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxDateEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop default True; - {$IFDEF DELPHI12} - property TextHint; - {$ENDIF} - property Visible; - property OnClick; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnStartDock; - end; - - { TcxFilterDateEditHelper } - - TcxFilterDateEditHelper = class(TcxFilterDropDownEditHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - -function VarIsNullDate(const AValue: Variant): Boolean; - -implementation - -uses - Math, - dxOffice11, dxThemeConsts, dxThemeManager, dxUxTheme, - cxEditPaintUtils, cxEditUtils, cxLookAndFeelPainters, - cxSpinEdit, cxVariants, cxGeometry; - -type - TDelimiterOffset = record - Left, Right: Integer; - end; - -const - cxEditTimeFormatA: array [TcxTimeEditTimeFormat, Boolean] of string = ( - ('hh:nn:ss ampm', 'hh:nn:ss'), - ('hh:nn ampm', 'hh:nn'), - ('hh ampm', 'hh') - ); - DateNavigatorTime = 200; - Office11HeaderOffset = 2; - - WeekNumbersDelimiterOffset: TDelimiterOffset = (Left: 3; Right: 1); - WeekNumbersDelimiterWidth = 1; - -function VarIsNullDate(const AValue: Variant): Boolean; -begin - Result := (VarIsDate(AValue) or VarIsNumericEx(AValue)) and (AValue = NullDate); -end; - -function cxEncodeDate(AYear, AMonth, ADay: Word): Double; -begin - if (AYear < MinYear) or (AYear > MaxYear) or - (AMonth < 1) or (AMonth > 12) or - (ADay < 1) or (ADay > DaysInAMonth(AYear, AMonth)) then - Result := InvalidDate - else - Result := EncodeDate(AYear, AMonth, ADay); -end; - -procedure GetTimeFormat(const ADateTimeFormatInfo: TcxDateTimeFormatInfo; - out ATimeFormat: TcxTimeEditTimeFormat; out AUse24HourFormat: Boolean); - - function GetFormatInfoItemIndex( - AItemKind: TcxDateTimeFormatItemKind): Integer; - var - I: Integer; - begin - Result := -1; - for I := 0 to Length(ADateTimeFormatInfo.Items) - 1 do - if ADateTimeFormatInfo.Items[I].Kind = AItemKind then - begin - Result := I; - Break; - end; - end; - -var - AFormatInfoItemIndex: Integer; -begin - if GetFormatInfoItemIndex(dtikSec) <> -1 then - ATimeFormat := tfHourMinSec - else if GetFormatInfoItemIndex(dtikMin) <> -1 then - ATimeFormat := tfHourMin - else if GetFormatInfoItemIndex(dtikHour) <> -1 then - ATimeFormat := tfHour - else - ATimeFormat := tfHourMinSec; - - AFormatInfoItemIndex := GetFormatInfoItemIndex(dtikHour); - if AFormatInfoItemIndex <> -1 then - AUse24HourFormat := Copy(ADateTimeFormatInfo.Items[AFormatInfoItemIndex].Data, 1, 2) = '24' - else - AUse24HourFormat := False; -end; - -procedure TrueTextRect(ACanvas: TCanvas; R: TRect; X, Y: Integer; - const Text: WideString); -begin - ACanvas.TextRect(R, X, Y, Text); -end; - -{ TcxClock } - -constructor TcxClock.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FMinuteDotColor := clWindow; -end; - -procedure TcxClock.Paint; -begin - LookAndFeelPainter.DrawClock(Canvas, ClientRect, TDateTime(FTime), BackgroundColor); -end; - -function TcxClock.GetBackgroundColor: TColor; -begin - Result := LookAndFeelPainter.DefaultEditorBackgroundColor(not Enabled); - if Result = clDefault then - Result := Color; -end; - -procedure TcxClock.SetMinuteDotColor(Value: TColor); -begin - if Value <> FMinuteDotColor then - begin - FMinuteDotColor := Value; - Invalidate; - end; -end; - -procedure TcxClock.SetTime(Value: TTime); -begin - Value := Frac(Value); - if Value <> FTime then - begin - FTime := Value; - Invalidate; - end; -end; - -{ TcxMonthListBox } - -constructor TcxMonthListBox.Create(AOwnerControl: TWinControl); -begin - inherited Create(AOwnerControl); - ControlStyle := [csCaptureMouse, csOpaque]; - if not ShowYears then - ControlStyle := ControlStyle + [csClickEvents]; - FTimer := TcxTimer.Create(nil); - FTimer.Enabled := False; - FTimer.Interval := 200; - FTimer.OnTimer := DoTimer; - Adjustable := False; - BorderStyle := pbsFlat; -end; - -destructor TcxMonthListBox.Destroy; -begin - FreeAndNil(FTimer); - inherited Destroy; -end; - -procedure TcxMonthListBox.CloseUp; -var - ADate: TDateTime; -begin - if GetCaptureControl = Self then - SetCaptureControl(nil); - if not Visible then - Exit; - inherited CloseUp; - FTimer.Enabled := False; - if ShowYears then - begin - ADate := GetDate; - if ADate <> NullDate then - Calendar.SetFirstDate(ADate); - end; -end; - -procedure TcxMonthListBox.Popup(AFocusedControl: TWinControl); -var - R: TRect; - I: Integer; - APrevDate: TDateTime; -begin - FCurrentDate := CalendarTable.FromDateTime(Calendar.FirstDate); - if ShowYears then - FItemCount := 7 - else - FItemCount := CalendarTable.GetMonthsInYear(FCurrentDate.Year); - Font := Calendar.Font; - FontChanged; - if ShowYears then - TopMonthDelta := -3 - else - TopMonthDelta := 1 - FCurrentDate.Month; - APrevDate := CalendarTable.AddMonths(FCurrentDate, TopMonthDelta); - for I := TopMonthDelta + 1 to 0 do - if APrevDate = CalendarTable.AddMonths(FCurrentDate, I) then - Inc(FTopMonthDelta); - R := Calendar.FViewInfo.MonthRegion; - R.TopLeft := Calendar.ClientToScreen(R.TopLeft); - R.BottomRight := Calendar.ClientToScreen(R.BottomRight); - FOrigin.X := R.Left + (R.Right - R.Left - Self.Width) div 2; - FOrigin.Y := (R.Top + R.Bottom) div 2 - Self.Height div 2; - FItemIndex := -1; - inherited Popup(AFocusedControl); -end; - -procedure TcxMonthListBox.DoTimer(Sender: TObject); -begin - TopMonthDelta := TopMonthDelta + FSign; -end; - -function TcxMonthListBox.GetCalendar: TcxCustomCalendar; -begin - Result := TcxCustomCalendar(OwnerControl); -end; - -function TcxMonthListBox.GetCalendarTable: TcxCustomCalendarTable; -begin - Result := TcxCustomCalendar(OwnerControl).CalendarTable; -end; - -function TcxMonthListBox.GetDate: TDateTime; -var - ADate: TcxDateTime; -begin - if ItemIndex = -1 then Result := NullDate - else - with CalendarTable do - begin - ADate := FromDateTime(AddMonths(FCurrentDate, TopMonthDelta + ItemIndex)); - ADate.Day := 1; - Result := ToDateTime(ADate); - end; -end; - -function TcxMonthListBox.GetShowYears: Boolean; -begin - Result := not Calendar.ArrowsForYear or Calendar.YearsInMonthList; -end; - -procedure TcxMonthListBox.SetItemIndex(Value: Integer); - - procedure InvalidateItemRect(AIndex: Integer); - var - R: TRect; - begin - if AIndex <> -1 then - begin - R.Left := BorderWidths[bLeft]; - R.Top := AIndex * ItemHeight + BorderWidths[bTop]; - R.Right := Width - BorderWidths[bRight]; - R.Bottom := R.Top + ItemHeight; - cxInvalidateRect(Handle, R, False); - end; - end; - -var - APrevItemIndex: Integer; -begin - if not HandleAllocated then Exit; - if FItemIndex <> Value then - begin - if FItemIndex <> Value then - begin - begin - APrevItemIndex := FItemIndex; - FItemIndex := Value; - InvalidateItemRect(APrevItemIndex); - InvalidateItemRect(FItemIndex); - end - end; - end; -end; - -procedure TcxMonthListBox.SetTopMonthDelta(Value: Integer); -begin - if FTopMonthDelta <> Value then - begin - FTopMonthDelta := Value; - Repaint; - end; -end; - -function TcxMonthListBox.CalculatePosition: TPoint; -begin - Result := FOrigin; -end; - -procedure TcxMonthListBox.Click; -var - ADate: TcxDateTime; -begin - inherited Click; - CloseUp; - ADate := CalendarTable.FromDateTime(CalendarTable.AddMonths(FCurrentDate, -FCurrentDate.Month + 1)); - ADate.Day := 1; - if ItemIndex <> -1 then - Calendar.SetFirstDate(CalendarTable.AddMonths(CalendarTable.ToDateTime(ADate), - ItemIndex)); -end; - -procedure TcxMonthListBox.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params do - WindowClass.Style := WindowClass.Style or CS_SAVEBITS; -end; - -procedure TcxMonthListBox.DoShowed; -begin - if ShowYears then - SetCaptureControl(Self) - else - SetCaptureControl(nil); -end; - -procedure TcxMonthListBox.FontChanged; -begin - Canvas.Font := Font; - with Calendar do - begin - FItemHeight := FHeaderHeight - 2; - Self.Width := 6 * FColWidth + 2; - Self.Height := FItemCount * FItemHeight + 2; - end; -end; - -procedure TcxMonthListBox.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - if ShowYears then - CloseUp; -end; - -procedure TcxMonthListBox.MouseMove(Shift: TShiftState; X, Y: Integer); -const - Times: array[0..3] of UINT = (500, 250, 100, 50); -var - Delta: Integer; - Interval: Integer; -begin - if PtInRect(ClientRect, Point(X, Y)) then - begin - FTimer.Enabled := False; - ItemIndex := Y div ItemHeight; - end - else - begin - ItemIndex := -1; - if Y < 0 then Delta := Y - else - if Y >= ClientHeight then - Delta := 1 + Y - ClientHeight - else - begin - FTimer.Enabled := False; - Exit; - end; - FSign := Delta div Abs(Delta); - Interval := Abs(Delta) div ItemHeight; - if Interval > 3 then Interval := 3; - if not FTimer.Enabled or (Times[Interval] <> FTimer.Interval) then - begin - FTimer.Interval := Times[Interval]; - FTimer.Enabled := True; - end; - end; -end; - -procedure TcxMonthListBox.Paint; - - function GetItemColor(ASelected: Boolean): TColor; - begin - if ASelected then - Result := clWindowText - else - Result := Calendar.Color; - end; - -var - ASelected: Boolean; - R: TRect; - I: Integer; - S: string; - ADate: TcxDateTime; - AConvertDate: TDateTime; -begin - Canvas.FrameRect(GetControlRect(Self), clBlack); - R := Rect(1, 1, Width - 1, ItemHeight + 1); - ADate := CalendarTable.FromDateTime(CalendarTable.AddMonths(FCurrentDate, TopMonthDelta)); - for I := 0 to FItemCount - 1 do - begin - ASelected := I = ItemIndex; - Canvas.Font.Color := GetItemColor(not ASelected); - Canvas.Brush.Color := GetItemColor(ASelected); - Canvas.FillRect(R); - if CalendarTable.IsValidYear(ADate.Era, ADate.Year) then - begin - AConvertDate := CalendarTable.ToDateTime(ADate); - if ShowYears then - S := cxGetLocalMonthYear(AConvertDate, CalendarTable) - else - S := cxGetLocalMonthName(CalendarTable.ToDateTime(ADate), CalendarTable); - Canvas.DrawText(S, R, cxAlignCenter or cxSingleLine, True); - end; - ADate := CalendarTable.FromDateTime(CalendarTable.AddMonths(ADate, 1)); - OffsetRect(R, 0, ItemHeight); - end; -end; - -{ TcxCustomCalendar } - -constructor TcxCustomCalendar.Create(AOwner: TComponent); -var - ADate: TcxDateTime; -begin - inherited Create(AOwner); - ControlStyle := [csCaptureMouse, csOpaque]; - FArrowsForYear := True; - FHotTrackRegion := chrNone; - FSelectDate := Date; - FCalendarTable := cxGetLocalCalendar; - ADate := FCalendarTable.FromDateTime(FSelectDate); - ADate.Day := 1; - FFirstDate := FCalendarTable.ToDateTime(ADate); - Width := 20; - Height := 20; - FTimer := TcxTimer.Create(nil); - with FTimer do - begin - Enabled := False; - Interval := DateNavigatorTime; - OnTimer := DoScrollArrow; - end; - FMonthListBox := TcxMonthListBox.Create(Self); - FMonthListBox.CaptureFocus := False; - FMonthListBox.IsTopMost := True; - FMonthListBox.OwnerParent := Self; - Keys := [kAll, kArrows, kChars, kTab]; - CreateButtons; - FKind := ckDate; - SetCalendarButtons([btnClear, btnToday]); - FFlat := True; - FYearsInMonthList := True; -end; - -destructor TcxCustomCalendar.Destroy; -begin - FreeAndNil(FTimer); - EndMouseTracking(Self); - FreeAndNil(FMonthListBox); - FreeAndNil(FCalendarTable); - inherited Destroy; -end; - -procedure TcxCustomCalendar.TranslationChanged; -begin - UpdateCalendarButtonCaptions; - Calculate; -end; - -procedure TcxCustomCalendar.AdjustCalendarControlsPosition; - - function GetTodayButtonRect: TRect; - begin - Result := - {$IFDEF DELPHI6} - Types.Bounds( - {$ELSE} - Classes.Bounds( - {$ENDIF} - (Width - FButtonWidth - Byte(FClearButton.Visible) * FButtonWidth) div - (3 - Byte(not FClearButton.Visible)), - ClientHeight - FButtonsRegionHeight + FButtonsOffset, - FButtonWidth + 1, FButtonsHeight); - end; - - function GetClearButtonRect: TRect; - begin - Result := - {$IFDEF DELPHI6} - Types.Bounds( - {$ELSE} - Classes.Bounds( - {$ENDIF} - Width - FButtonWidth - - (Width - Byte(FTodayButton.Visible) * FButtonWidth - FButtonWidth) div - (3 - Byte(not FTodayButton.Visible)), - ClientHeight - FButtonsRegionHeight + FButtonsOffset, - FButtonWidth + 1, FButtonsHeight); - end; - - procedure SetButtonsPosition; - var - AButtonLeft, AButtonsOffset, AButtonsTop, I: Integer; - AList: TList; - begin - AList := TList.Create; - try - GetVisibleButtonList(AList); - - AButtonsTop := Height - FButtonsRegionHeight + 1 + - (FButtonsRegionHeight - 1 - FButtonsHeight) div 2; - AButtonsOffset := MulDiv(Font.Size, 5, 4); - - TButton(AList[AList.Count - 1]).SetBounds(Width - AButtonsOffset - - FButtonWidth - 1, AButtonsTop, FButtonWidth + 1, FButtonsHeight); - if AList.Count > 1 then - if AList.Count = 2 then - TButton(AList[0]).SetBounds(TButton(AList[1]).Left - AButtonsOffset - - FButtonWidth - 1, AButtonsTop, FButtonWidth + 1, FButtonsHeight) - else - begin - AButtonLeft := AButtonsOffset; - for I := 0 to AList.Count - 2 do - begin - TButton(AList[I]).SetBounds(AButtonLeft, AButtonsTop, - FButtonWidth + 1, FButtonsHeight); - Inc(AButtonLeft, AButtonsOffset + FButtonWidth + 1); - end; - end; - finally - AList.Free; - end; - end; - -var - R: TRect; - AButtonVOffset: Integer; -begin - if not HandleAllocated then - Exit; - - FClearButton.Visible := btnClear in CalendarButtons; - FNowButton.Visible := (Kind = ckDateTime) and (btnNow in CalendarButtons); - FOKButton.Visible := Kind = ckDateTime; - FTodayButton.Visible := btnToday in CalendarButtons; - - FClock.Visible := FOKButton.Visible; - FTimeEdit.Visible := FOKButton.Visible; - - if Kind = ckDate then - begin - R := GetTodayButtonRect; - FTodayButton.SetBounds(R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top); - R := GetClearButtonRect; - FClearButton.SetBounds(R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top); - end - else - begin - SetButtonsPosition; - - AButtonVOffset := (FButtonsRegionHeight - 1 - FButtonsHeight) div 2; - FTimeEdit.Top := (Height - FButtonsRegionHeight - FTimeEdit.Height) - - AButtonVOffset; - FTimeEdit.Width := GetTimeEditWidth; - FTimeEdit.Left := Width - (GetMonthCalendarOffset.X + FClockSize + AButtonVOffset * 2) div 2 - FTimeEdit.Width div 2 - - FSpaceWidth; - FTimeEdit.SelStart := 0; // refit text - FClock.SetBounds(Width - GetMonthCalendarOffset.X - AButtonVOffset - FClockSize - FSpaceWidth, - FHeaderHeight + GetMonthCalendarOffset.Y + AButtonVOffset, FClockSize, - FClockSize); - end; -end; - -procedure TcxCustomCalendar.ButtonClick(Sender: TObject); -var - ADate: TDateTime; -begin - case TCalendarButton(Integer(TcxButton(Sender).Tag)) of - btnNow: ADate := Now; - btnToday: ADate := Date + cxSign(Date) * FClock.Time; - btnClear: ADate := NullDate; - else - ADate := SelectDate + cxSign(SelectDate) * FClock.Time; - end; - FClock.Time := TTime(TimeOf(ADate)); - FTimeEdit.Time := FClock.Time; - SelectDate := ADate; - DoDateTimeChanged; - HidePopup(Self, crEnter); -end; - -procedure TcxCustomCalendar.CalculateViewInfo; - - function GetCurrentDateRegion: TRect; - begin - Result := Rect(0, 0, Width, FHeaderHeight); - if LookAndFeel.Painter = TcxOffice11LookAndFeelPainter then - begin - Inc(Result.Left, Office11HeaderOffset); - Inc(Result.Top, Office11HeaderOffset); - Dec(Result.Right, Office11HeaderOffset); - end; - end; - - function GetMonthCalendarPosition: TPoint; - begin - if Kind = ckDateTime then - begin - Result := GetMonthCalendarOffset; - Inc(Result.Y, FViewInfo.CurrentDateRegion.Bottom); - end - else - Result := Point(0, 0); - Inc(Result.X, FSpaceWidth); - end; - - procedure OffsetMonthCalendar; - var - AArrow: TcxCalendarArrow; - AOffset: TPoint; - begin - AOffset := GetMonthCalendarPosition; - with FViewInfo do - begin - for AArrow := Low(TcxCalendarArrow) to LastVisibleArrow do - OffsetRect(ArrowRects[AArrow], AOffset.X, AOffset.Y); - OffsetRect(CalendarRect, AOffset.X, AOffset.Y); - if Kind = ckDateTime then - OffsetRect(HeaderRegion, AOffset.X, AOffset.Y); - OffsetRect(MonthRegion, AOffset.X, AOffset.Y); - OffsetRect(YearRegion, AOffset.X, AOffset.Y); - end; - end; - - function GetHeaderBorderWidth: Integer; - begin - if Kind = ckDateTime then - Result := 1 - else - Result := Integer(not FFlat); - end; - - procedure CalculateTwoArrowsViewInfo; - var - ABorderWidth: Integer; - AHeaderOffset: TRect; - begin - ABorderWidth := GetHeaderBorderWidth; - AHeaderOffset := GetHeaderOffset; - with FViewInfo do - begin - ArrowRects[caPrevMonth] := Rect(AHeaderOffset.Left + ABorderWidth, - AHeaderOffset.Top + ABorderWidth, - AHeaderOffset.Left + ABorderWidth + FColWidth - 2, AHeaderOffset.Top + FHeaderHeight - 1); - ArrowRects[caNextMonth] := Rect(FDateRegionWidth - FColWidth + 2 - ABorderWidth - AHeaderOffset.Right, - AHeaderOffset.Top + ABorderWidth, FDateRegionWidth - ABorderWidth - AHeaderOffset.Right, - AHeaderOffset.Top + FHeaderHeight - 1); - MonthRegion := Rect(ArrowRects[caPrevMonth].Right, AHeaderOffset.Top, - ArrowRects[caNextMonth].Left, AHeaderOffset.Top + FHeaderHeight); - end; - end; - - procedure CalculateFourArrowsViewInfo; - var - ABorderWidth: Integer; - AHeaderOffset: TRect; - AMaxMonthNameWidth, AMonthNameWidth, ASpaceWidth: Integer; - AYearTextWidth, AMaxYearTextWidth, I: Integer; - AMonthRegionWidth: Integer; - AConvertDate: TcxDateTime; - begin - ABorderWidth := GetHeaderBorderWidth; - AHeaderOffset := GetHeaderOffset; - AMaxMonthNameWidth := 0; - Canvas.Font := Font; - AMaxYearTextWidth := 0; - AConvertDate := CalendarTable.FromDateTime(FirstDate); - for I := 1 to CalendarTable.GetMonthsInYear(AConvertDate.Era, AConvertDate.Year) do - begin - AMonthNameWidth := Canvas.TextWidth( - cxGetLocalMonthName(CalendarTable.AddMonths(FirstDate, I), CalendarTable)); - if AMonthNameWidth > AMaxMonthNameWidth then - AMaxMonthNameWidth := AMonthNameWidth; - AYearTextWidth := Canvas.TextWidth( - cxGetLocalYear(CalendarTable.AddYears(FirstDate, I), CalendarTable)); - AMaxYearTextWidth := Max(AMaxYearTextWidth, AYearTextWidth); - end; - - ASpaceWidth := FDateRegionWidth - ABorderWidth * 2 - AHeaderOffset.Left - - AHeaderOffset.Right - AMaxMonthNameWidth - AMaxYearTextWidth - 4 * (FColWidth - 2); - with FViewInfo do - begin - ArrowRects[caPrevMonth] := Rect(AHeaderOffset.Left + ABorderWidth, - AHeaderOffset.Top + ABorderWidth, - AHeaderOffset.Left + ABorderWidth + FColWidth - 2, AHeaderOffset.Top + FHeaderHeight - 1); - ArrowRects[caNextYear] := Rect(FDateRegionWidth - FColWidth + 2 - ABorderWidth - AHeaderOffset.Right, - AHeaderOffset.Top + ABorderWidth, FDateRegionWidth - ABorderWidth - AHeaderOffset.Right, - AHeaderOffset.Top + FHeaderHeight - 1); - end; - AMonthRegionWidth := AMaxMonthNameWidth + ASpaceWidth * AMaxMonthNameWidth div - (AMaxMonthNameWidth + AMaxYearTextWidth); - with FViewInfo.ArrowRects[caNextMonth] do - begin - Left := FViewInfo.ArrowRects[caPrevMonth].Right + AMonthRegionWidth; - Top := FViewInfo.ArrowRects[caPrevMonth].Top; - Right := Left + FColWidth - 2; - Bottom := FViewInfo.ArrowRects[caPrevMonth].Bottom; - end; - with FViewInfo do - begin - ArrowRects[caPrevYear] := ArrowRects[caNextMonth]; - OffsetRect(ArrowRects[caPrevYear], FColWidth - 2, 0); - - MonthRegion := Rect(ArrowRects[caPrevMonth].Right, AHeaderOffset.Top, - ArrowRects[caNextMonth].Left, AHeaderOffset.Top + FHeaderHeight); - YearRegion := Rect(ArrowRects[caPrevYear].Right, AHeaderOffset.Top, - ArrowRects[caNextYear].Left, AHeaderOffset.Top + FHeaderHeight); - end; - end; - - function GetCalendarRect: TRect; - begin - with Result do - begin - Left := 0; - Top := FViewInfo.MonthRegion.Bottom + 1; - Right := FDateRegionWidth; - Bottom := Top + FDaysOfWeekHeight + 6 * FRowHeight + 1; - end; - end; - -var - AHeaderWidth: Integer; -begin - if Kind = ckDateTime then - begin - FViewInfo.CurrentDateRegion := GetCurrentDateRegion; - AHeaderWidth := FDateRegionWidth; - end - else - AHeaderWidth := Width; - if ArrowsForYear then - begin - FViewInfo.LastVisibleArrow := caNextYear; - CalculateFourArrowsViewInfo; - end - else - begin - FViewInfo.LastVisibleArrow := caNextMonth; - CalculateTwoArrowsViewInfo; - end; - with FViewInfo do - HeaderRegion := Rect(0, MonthRegion.Top, AHeaderWidth, - MonthRegion.Bottom); - FViewInfo.CalendarRect := GetCalendarRect; - OffsetMonthCalendar; -end; - -procedure TcxCustomCalendar.CreateButtons; - - function CreateButton(ATabOrder: Integer; - ATag: TCalendarButton; ADefault: Boolean = False): TcxButton; - begin - Result := TcxButton.Create(Self); - Result.TabOrder := ATabOrder; - Result.UseSystemPaint := False; - Result.OnClick := ButtonClick; - Result.Tag := Integer(ATag); - Result.Default := ADefault; - Result.LookAndFeel.MasterLookAndFeel := LookAndFeel; - end; - -begin - FTodayButton := CreateButton(1, btnToday); - FNowButton := CreateButton(2, btnNow); - FClearButton := CreateButton(3, btnClear); - FOKButton := CreateButton(4, btnOk, True); - UpdateCalendarButtonCaptions; - - FTimeEdit := TcxTimeEdit.Create(Self); - FTimeEdit.ActiveProperties.Circular := True; - FTimeEdit.ActiveProperties.OnChange := TimeChanged; - FTimeEdit.Style.LookAndFeel.MasterLookAndFeel := LookAndFeel; - FTimeEdit.TabOrder := 0; - - FClock := TcxClock.Create(Self); - FClock.TabStop := False; - FClock.LookAndFeel.MasterLookAndFeel := LookAndFeel; -end; - -procedure TcxCustomCalendar.CorrectHeaderTextRect(var R: TRect); -begin - if Kind = ckDateTime then - Inc(R.Top) - else - Inc(R.Top, Integer(not Flat)); - Dec(R.Bottom); -end; - -procedure TcxCustomCalendar.DoDateTimeChanged; -begin - if Assigned(FOnDateTimeChanged) then FOnDateTimeChanged(Self); -end; - -procedure TcxCustomCalendar.DoScrollArrow(Sender: TObject); -var - AArrow: TcxCalendarArrow; - P: TPoint; -begin - P := ScreenToClient(InternalGetCursorPos); - for AArrow := caPrevMonth to FViewInfo.LastVisibleArrow do - if PtInRect(FViewInfo.ArrowRects[AArrow], P) then - DoStep(AArrow); -end; - -procedure TcxCustomCalendar.DrawHeader; -const - HeaderBorders: array[Boolean] of TcxBorders = ([bBottom], cxBordersAll); -var - ADate: TcxDateTime; - AHeaderRect: TRect; - AIsTransparent: Boolean; - ASkinPainter: TcxCustomLookAndFeelPainterClass; - - procedure DrawArrows; - const - AArrowDirectionMap: array[TcxCalendarArrow] of TcxArrowDirection = - (adLeft, adRight, adLeft, adRight); - var - AArrow: TcxCalendarArrow; - P: TcxArrowPoints; - R: TRect; - begin - for AArrow := caPrevMonth to FViewInfo.LastVisibleArrow do - begin - R := FViewInfo.ArrowRects[AArrow]; - if not AIsTransparent then - begin - if FFlat and (Kind = ckDate) then - begin - InternalPolyLine(Canvas, [Point(R.Left, R.Top), Point(R.Right - 1, R.Top)], - GetHeaderColor, True); - end; - InternalPolyLine(Canvas, [Point(R.Left, R.Bottom - 1), - Point(R.Right - 1, R.Bottom - 1)], GetHeaderColor, True); - if FFlat and (Kind = ckDate) and (LookAndFeel.Painter <> TcxOffice11LookAndFeelPainter) then - Inc(R.Top); - Dec(R.Bottom); - end; - - if not AIsTransparent then - cxEditFillRect(Canvas.Handle, R, GetSolidBrush(GetHeaderColor)); - TcxUltraFlatLookAndFeelPainter.CalculateArrowPoints(R, P, AArrowDirectionMap[AArrow], False); - Canvas.Brush.Color := LookAndFeelPainter.DefaultDateNavigatorHeaderTextColor(False); - Canvas.Pen.Color := LookAndFeelPainter.DefaultDateNavigatorHeaderTextColor(False); - Canvas.Polygon(P); - - Canvas.ExcludeClipRect(FViewInfo.ArrowRects[AArrow]); - end; - end; - - procedure DrawHeaderText(const S: string; R: TRect; AIsHighlighted: Boolean); - var - ATextSize: TSize; - begin - Canvas.Font.Color := LookAndFeelPainter.DefaultDateNavigatorHeaderTextColor(AIsHighlighted); - CorrectHeaderTextRect(R); - ATextSize := Canvas.TextExtent(S); - with R do - TrueTextRect(Canvas.Canvas, R, Left + (Right - Left - ATextSize.cx) div 2, - Top + (Bottom - Top - ATextSize.cy) div 2, S); - end; - -begin - ASkinPainter := LookAndFeel.SkinPainter; - AIsTransparent := (ASkinPainter <> nil) or (LookAndFeel.Painter = TcxWinXPLookAndFeelPainter); - if ASkinPainter <> nil then - begin - ASkinPainter.DrawHeader(Canvas, FViewInfo.HeaderRegion, cxEmptyRect, [], - HeaderBorders[Kind = ckDateTime], cxbsNormal, taCenter, vaCenter, False, - False, '', Font, 0, 0); - end - else - if LookAndFeel.Painter = TcxWinXPLookAndFeelPainter then - DrawThemeBackground(OpenTheme(totHeader), Canvas.Handle, HP_HEADERITEMLEFT, - HIS_NORMAL, FViewInfo.HeaderRegion) - else - if not AIsTransparent then - cxEditFillRect(Canvas.Handle, FViewInfo.HeaderRegion, GetSolidBrush(GetHeaderColor)); - DrawArrows; - - ADate := CalendarTable.FromDateTime(FirstDate); - Canvas.Font.Color := LookAndFeel.Painter.DefaultHeaderTextColor; - Canvas.Brush.Color := GetHeaderColor; - - if AIsTransparent then - Canvas.Brush.Style := bsClear; - if ArrowsForYear then - begin - DrawHeaderText(cxGetLocalMonthName(FirstDate, CalendarTable), - FViewInfo.MonthRegion, HotTrackRegion = chrMonth); - DrawHeaderText(cxGetLocalYear(FirstDate, CalendarTable), - FViewInfo.YearRegion, HotTrackRegion = chrYear); - end - else - DrawHeaderText(cxGetLocalMonthYear(FirstDate, CalendarTable), - FViewInfo.MonthRegion, HotTrackRegion = chrMonth); - Canvas.Brush.Style := bsSolid; - - AHeaderRect := FViewInfo.HeaderRegion; - if not AIsTransparent then - if not FFlat then - Canvas.DrawEdge(AHeaderRect, False, False, cxBordersAll) - else - if Kind = ckDateTime then - Canvas.FrameRect(AHeaderRect, GetDateTimeHeaderFrameColor) - else - if LookAndFeel.Painter = TcxOffice11LookAndFeelPainter then - Canvas.FrameRect(Rect(AHeaderRect.Left, AHeaderRect.Top - Office11HeaderOffset, - AHeaderRect.Right, AHeaderRect.Bottom + Office11HeaderOffset - 1), - BackgroundColor, Office11HeaderOffset) - else - InternalPolyLine(Canvas, [Point(AHeaderRect.Left, AHeaderRect.Bottom - 1), - Point(AHeaderRect.Right - 1, AHeaderRect.Bottom - 1)], - GetDateHeaderFrameColor, True); - - Canvas.ExcludeClipRect(AHeaderRect); -end; - -function TcxCustomCalendar.GetBackgroundColor: TColor; -begin - Result := LookAndFeelPainter.DefaultDateNavigatorContentColor; - if (Result = clDefault) or (Color <> clWindow) then - Result := Color; -end; - -function TcxCustomCalendar.GetContainerBorderColor: TColor; -begin - Result := LookAndFeel.Painter.GetContainerBorderColor(False); - if Result = clDefault then - Result := clBtnText; -end; - -function TcxCustomCalendar.GetDateHeaderFrameColor: TColor; -begin - if LookAndFeel.Painter = TcxOffice11LookAndFeelPainter then - Result := Color - else - Result := clBtnText; -end; - -function TcxCustomCalendar.GetDateFromCell(X, Y: Integer): Double; -begin - Result := FirstDate - DayOfWeekOffset(FirstDate) + Y * 7 + X; - if (DayOfWeekOffset(FirstDate) = 0) and (FirstDate > cxMinDateTime) then - Result := Result - 7; -end; - -function TcxCustomCalendar.GetDateTimeHeaderFrameColor: TColor; -begin - if LookAndFeel.Painter = TcxOffice11LookAndFeelPainter then - Result := Color - else - Result := clBtnShadow; -end; - -function TcxCustomCalendar.GetHeaderColor: TColor; -begin - Result := LookAndFeelPainter.DefaultDateNavigatorHeaderColor; -end; - -function TcxCustomCalendar.GetHeaderOffset: TRect; -begin - if (Kind = ckDate) and (LookAndFeel.Painter = TcxOffice11LookAndFeelPainter) then - Result := Rect(Office11HeaderOffset, Office11HeaderOffset, Office11HeaderOffset, 0) - else - Result := cxEmptyRect; -end; - -function TcxCustomCalendar.GetShowButtonsRegion: Boolean; -begin - Result := (Kind = ckDateTime) or FTodayButton.Visible or FClearButton.Visible; -end; - -function TcxCustomCalendar.GetTimeEditWidth: Integer; -var - AEditSizeProperties: TcxEditSizeProperties; -begin - AEditSizeProperties := DefaultcxEditSizeProperties; - AEditSizeProperties.MaxLineCount := 1; - Result := FTimeEdit.ActiveProperties.GetEditSize(Canvas, FTimeEdit.Style, - True, 0, AEditSizeProperties).cx + Canvas.TextWidth('0'); -end; - -function TcxCustomCalendar.GetTimeFormat: TcxTimeEditTimeFormat; -begin - Result := FTimeEdit.ActiveProperties.TimeFormat; -end; - -function TcxCustomCalendar.GetUse24HourFormat: Boolean; -begin - Result := FTimeEdit.ActiveProperties.Use24HourFormat; -end; - -function TcxCustomCalendar.GetWeekNumbersRegionWidth: Integer; -begin - if WeekNumbers then - Result := FWeekNumberWidth + WeekNumbersDelimiterOffset.Left + - WeekNumbersDelimiterWidth + WeekNumbersDelimiterOffset.Right - else - Result := 0; -end; - -procedure TcxCustomCalendar.GetVisibleButtonList(AList: TList); -begin - if btnToday in CalendarButtons then - AList.Add(FTodayButton); - if (Kind = ckDateTime) and (btnNow in CalendarButtons) then - AList.Add(FNowButton); - if btnClear in CalendarButtons then - AList.Add(FClearButton); - if Kind = ckDateTime then - AList.Add(FOKButton); -end; - -procedure TcxCustomCalendar.SetArrowsForYear(Value: Boolean); -begin - if Value <> FArrowsForYear then - begin - FArrowsForYear := Value; - Calculate; - end; -end; - -procedure TcxCustomCalendar.SetCalendarButtons(Value: TDateButtons); -begin - if Value <> FCalendarButtons then - begin - FCalendarButtons := Value; - FClearButton.Visible := btnClear in Value; - FNowButton.Visible := btnNow in Value; - FTodayButton.Visible := btnToday in Value; - Calculate; - end; -end; - -procedure TcxCustomCalendar.SetFlat(Value: Boolean); -begin - if FFlat <> Value then - begin - FFlat := Value; - Calculate; - end; -end; - -procedure TcxCustomCalendar.SetHotTrackRegion(Value: TcxCalendarHotTrackRegion); - - function GetHotTrackRegion(AHotTrackRegion: TcxCalendarHotTrackRegion): TRect; - begin - if AHotTrackRegion = chrMonth then - Result := FViewInfo.MonthRegion - else - Result := FViewInfo.YearRegion; - end; - -begin - if Value <> FHotTrackRegion then - begin - if FHotTrackRegion <> chrNone then - InvalidateRect(GetHotTrackRegion(FHotTrackRegion), False); - FHotTrackRegion := Value; - if FHotTrackRegion <> chrNone then - InvalidateRect(GetHotTrackRegion(FHotTrackRegion), False); - - if Value = chrNone then - Screen.Cursor := FPrevCursor - else - begin - FPrevCursor := Screen.Cursor; -// Screen.Cursor := crcxEditMouseWheel; - end; - end; -end; - -procedure TcxCustomCalendar.SetKind(Value: TcxCalendarKind); -begin - if Value <> FKind then - begin - FKind := Value; - Calculate; - if Value = ckDate then - ControlStyle := ControlStyle - [csDoubleClicks, csClickEvents] - else - ControlStyle := ControlStyle + [csDoubleClicks, csClickEvents]; - end; -end; - -procedure TcxCustomCalendar.SetTimeFormat(Value: TcxTimeEditTimeFormat); -begin - if Value <> TimeFormat then - begin - FTimeEdit.ActiveProperties.TimeFormat := Value; - Calculate; - end; -end; - -procedure TcxCustomCalendar.SetUse24HourFormat(Value: Boolean); -begin - if Value <> Use24HourFormat then - begin - FTimeEdit.ActiveProperties.Use24HourFormat := Value; - Calculate; - end; -end; - -procedure TcxCustomCalendar.SetWeekNumbers(Value: Boolean); -begin - if Value <> FWeekNumbers then - begin - FWeekNumbers := Value; - Calculate; - end; -end; - -procedure TcxCustomCalendar.TimeChanged(Sender: TObject); -var - R: TRect; -begin - FClock.Time := FTimeEdit.Time; - R := Rect(0, 0, Width, FHeaderHeight - 1); - if not FFlat then - InflateRect(R, -1, -1); - InvalidateRect(R, False); -end; - -procedure TcxCustomCalendar.UpdateCalendarButtonCaptions; -begin - FTodayButton.Caption := cxGetResourceString(@cxSDatePopupToday); - FNowButton.Caption := cxGetResourceString(@cxSDatePopupNow); - FClearButton.Caption := cxGetResourceString(@cxSDatePopupClear); - FOKButton.Caption := cxGetResourceString(@cxSDatePopupOK); -end; - -procedure TcxCustomCalendar.FontChanged; -begin - inherited FontChanged; - Calculate; -end; - -procedure TcxCustomCalendar.DblClick; -var - ADate: TDateTime; -begin - inherited DblClick; - if Kind = ckDateTime then - begin - ADate := PosToDateTime(ScreenToClient(InternalGetCursorPos)); - if ADate <> NullDate then - begin - SelectDate := ADate; - DoDateTimeChanged; - HidePopup(Self, crEnter); - end; - end; -end; - -function TcxCustomCalendar.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; -const - AArrowMap: array[Boolean, Boolean] of TcxCalendarArrow = - ((caPrevMonth, caNextMonth), (caPrevYear, caNextYear)); -begin - Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); - MousePos := ScreenToClient(MousePos); - if not Result and not FMonthListBox.IsVisible and (PtInRect(FViewInfo.MonthRegion, MousePos) or - PtInRect(FViewInfo.YearRegion, MousePos)) then - begin - Result := True; - DoStep(AArrowMap[PtInRect(FViewInfo.YearRegion, MousePos), WheelDelta < 0]); - end; -end; - -function TcxCustomCalendar.HasBackground: Boolean; -begin - // for correctly work with manifest - Result := FTodayButton.LookAndFeel.NativeStyle and AreVisualStylesAvailable; -end; - -procedure TcxCustomCalendar.InitControl; -begin - inherited InitControl; - FClearButton.Parent := Self; - FOKButton.Parent := Self; - FNowButton.Parent := Self; - FTodayButton.Parent := Self; - FClock.Parent := Self; - FTimeEdit.Parent := Self; - FontChanged; -end; - -procedure TcxCustomCalendar.KeyDown(var Key: Word; Shift: TShiftState); -var - ADate: TcxDateTime; - - procedure MoveByMonth(AForward: Boolean); - begin - ADate := CalendarTable.FromDateTime(SelectDate); - if AForward then - SelectDate := CalendarTable.AddMonths(SelectDate, 1) - else - SelectDate := CalendarTable.AddMonths(SelectDate, -1); - end; - -begin - ADate := CalendarTable.FromDateTime(SelectDate); - case Key of - VK_LEFT: - SelectDate := SelectDate - 1; - VK_RIGHT: SelectDate := SelectDate + 1; - VK_UP: - if not (Shift = [ssAlt]) then SelectDate := SelectDate - 7; - VK_DOWN: - if not (Shift = [ssAlt]) then SelectDate := SelectDate + 7; - VK_HOME: - if Shift = [ssCtrl] then - begin - ADate.Day := 1; - SelectDate := CalendarTable.ToDateTime(ADate); - end - else - SelectDate := SelectDate - DayOfWeekOffset(SelectDate); - VK_END: - if Shift = [ssCtrl] then - begin - ADate.Day := CalendarTable.GetDaysInMonth(ADate.Era, ADate.Year, ADate.Month); - SelectDate := CalendarTable.ToDateTime(ADate); - end - else SelectDate := SelectDate + (6 - DayOfWeekOffset(SelectDate)); - VK_PRIOR: MoveByMonth(False); - VK_NEXT: MoveByMonth(True) - end; - inherited KeyDown(Key, Shift); -end; - -procedure TcxCustomCalendar.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - - function GetMonthPopupRect: TRect; - begin - Result := FViewInfo.MonthRegion; - CorrectHeaderTextRect(Result); - end; - -var - ADate: Double; - AArrow: TcxCalendarArrow; - P: TPoint; -begin - inherited MouseDown(Button, Shift, X, Y); - CheckHotTrack; - if Button <> mbLeft then - Exit; - P := Point(X, Y); - ADate := PosToDateTime(P); - if ADate <> NullDate then - InternalSetSelectDate(ADate, False) - else - begin - for AArrow := caPrevMonth to FViewInfo.LastVisibleArrow do - if PtInRect(FViewInfo.ArrowRects[AArrow], P) then - begin - DoStep(AArrow); - FTimer.Enabled := True; - Exit; - end; - if PtInRect(GetMonthPopupRect, P) then - FMonthListBox.Popup(Self); - end; -end; - -procedure TcxCustomCalendar.MouseEnter(AControl: TControl); -begin - inherited MouseEnter(AControl); - CheckHotTrack; - BeginMouseTracking(Self, GetControlRect(Self), Self); -end; - -procedure TcxCustomCalendar.MouseLeave(AControl: TControl); -begin - inherited MouseLeave(AControl); - CheckHotTrack; - EndMouseTracking(Self); -end; - -procedure TcxCustomCalendar.MouseMove(Shift: TShiftState; X, Y: Integer); -var - ADate: Double; -begin - CheckHotTrack; - BeginMouseTracking(Self, GetControlRect(Self), Self); - if FTimer.Enabled then - Exit; - ADate := NullDate; - if ssLeft in Shift then - ADate := PosToDateTime(Point(X, Y)); - inherited MouseMove(Shift, X, Y); - if (ssLeft in Shift) and (ADate <> NullDate) then - InternalSetSelectDate(ADate, False); -end; - -procedure TcxCustomCalendar.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); - - function GetMonthRegion: TRect; - begin - Result := FViewInfo.MonthRegion; - CorrectHeaderTextRect(Result); - end; - - function GetYearRegion: TRect; - begin - Result := FViewInfo.YearRegion; - CorrectHeaderTextRect(Result); - end; - -var - P: TPoint; -begin - inherited MouseUp(Button, Shift, X, Y); - CheckHotTrack; - if FTimer.Enabled then - begin - FTimer.Enabled := False; - Exit; - end; - P := Point(X, Y); - if (Kind = ckDate) and PtInRect(ClientRect, P) and - not PtInRect(GetMonthRegion, P) and not PtInRect(GetYearRegion, P) then - begin - if PosToDateTime(P) <> NullDate then - DoDateTimeChanged; - HidePopup(Self, crEnter); - end; - if (Kind = ckDateTime) and (SelectDate <> NullDate) then - FirstDate := DateOf(SelectDate); -end; - -procedure TcxCustomCalendar.DrawButtons(ACanvas: TcxCanvas); -var - R, R1: TRect; -begin - R := Rect(0, Height - FButtonsRegionHeight, Width, Height); - R1 := R; - InternalPolyLine(ACanvas, [R1.TopLeft, Point(R1.Right - 1, R1.Top)], ContainerBorderColor, True); - Inc(R1.Top); - if not FFlat then - begin - ACanvas.DrawEdge(R1, False, False, cxBordersAll); - InflateRect(R1, -1, -1); - end; - ACanvas.FillRect(R1, BackgroundColor); - ACanvas.ExcludeClipRect(R); -end; - -procedure TcxCustomCalendar.DrawDateRegion(ACanvas: TcxCanvas); -var - ATextSize: TSize; - R: TRect; - S: string; -begin - R := FViewInfo.CurrentDateRegion; - LookAndFeelPainter.DrawDateNavigatorDateHeader(ACanvas, R); - S := cxDateToLocalFormatStr(SelectDate + cxSign(SelectDate) * FTimeEdit.Time); - ACanvas.Font := Font; - ACanvas.Font.Color := LookAndFeelPainter.DefaultDateNavigatorHeaderTextColor(False); - ACanvas.Brush.Style := bsClear; - ATextSize := ACanvas.TextExtent(S); - TrueTextRect(ACanvas.Canvas, R, R.Left + (R.Right - R.Left - ATextSize.cx) div 2, - R.Top + (R.Bottom - R.Top - ATextSize.cy) div 2, S); - ACanvas.Brush.Style := bsSolid; - ACanvas.ExcludeClipRect(FViewInfo.CurrentDateRegion); -end; - -procedure TcxCustomCalendar.DrawMonths(ACanvas: TcxCanvas); -var - ASeparator2Color: TColor; - ASize: TSize; - ATextRect, R: TRect; - AWeekNumbersDelimiterPos, I, J: Integer; - S: string; -begin - ACanvas.Brush.Style := bsSolid; - ACanvas.Brush.Color := BackgroundColor; - R := FViewInfo.CalendarRect; - - ASeparator2Color := LookAndFeelPainter.DefaultDateNavigatorSeparator2Color; - if (ASeparator2Color = clNone) or (ASeparator2Color = clDefault) then - ASeparator2Color := BackgroundColor; - - with ATextRect do - begin - Left := R.Left + FSideWidth + GetWeekNumbersRegionWidth; - Right := R.Right - FSideWidth; - Top := R.Top; - Bottom := Top + FDaysOfWeekHeight - 2; - ACanvas.FillRect(Rect(Left - 8, Top, Left, Bottom + 2)); - ACanvas.FillRect(Rect(Right, Top, Right + 8, Bottom + 2)); - - InternalPolyLine(ACanvas, [Point(Left, Bottom), Point(Right - 1, Bottom)], - LookAndFeelPainter.DefaultDateNavigatorSeparator1Color, True); - InternalPolyLine(ACanvas, [Point(Left, Bottom + 1), - Point(Right - 1, Bottom + 1)], ASeparator2Color, True); - if (Kind = ckDate) and ShowButtonsRegion then - InternalPolyLine(ACanvas, [Point(Left, ClientHeight - FButtonsRegionHeight - 1), - Point(Right - 1, ClientHeight - FButtonsRegionHeight - 1)], clBtnShadow, True); - - if WeekNumbers then - begin - AWeekNumbersDelimiterPos := R.Left + FSideWidth + FWeekNumberWidth + WeekNumbersDelimiterOffset.Left; - ACanvas.Brush.Color := BackgroundColor; - ACanvas.FillRect(Rect(R.Left, Top, AWeekNumbersDelimiterPos, R.Bottom)); - InternalPolyLine(ACanvas, [Point(AWeekNumbersDelimiterPos, R.Top), - Point(AWeekNumbersDelimiterPos, Bottom - 1)], BackgroundColor, True); - if (Kind = ckDate) and ShowButtonsRegion then - begin - InternalPolyLine(ACanvas, [Point(AWeekNumbersDelimiterPos, Bottom), - Point(AWeekNumbersDelimiterPos, ClientHeight - FButtonsRegionHeight - 1)], clBtnShadow, True); - InternalPolyLine(ACanvas, [Point(AWeekNumbersDelimiterPos + 1, ClientHeight - FButtonsRegionHeight - 1), - Point(AWeekNumbersDelimiterPos + 1, ClientHeight - FButtonsRegionHeight - 1)], clBtnShadow, True); - end - else - begin - InternalPolyLine(ACanvas, [Point(AWeekNumbersDelimiterPos, Bottom), - Point(AWeekNumbersDelimiterPos, R.Bottom - 3)], - LookAndFeelPainter.DefaultDateNavigatorSeparator1Color, True); - InternalPolyLine(ACanvas, [Point(AWeekNumbersDelimiterPos, R.Bottom - 2), - Point(AWeekNumbersDelimiterPos, R.Bottom - 2)], BackgroundColor, True); - end; - InternalPolyLine(ACanvas, [Point(AWeekNumbersDelimiterPos + 1, Bottom), - Point(AWeekNumbersDelimiterPos + 1, Bottom)], - LookAndFeelPainter.DefaultDateNavigatorSeparator1Color, True); - InternalPolyLine(ACanvas, [Point(AWeekNumbersDelimiterPos + 1, Bottom + 1), - Point(AWeekNumbersDelimiterPos + 1, Bottom + 1)], ASeparator2Color, True); - InternalPolyLine(ACanvas, [Point(AWeekNumbersDelimiterPos + 1, Bottom + 2), - Point(AWeekNumbersDelimiterPos + 1, R.Bottom - 2)], BackgroundColor, True); - end; - - Right := Left; - end; - - ACanvas.Font.Color := LookAndFeelPainter.DefaultDateNavigatorTextColor; - for I := cxFormatController.StartOfWeek to cxFormatController.StartOfWeek + 6 do - begin - ATextRect.Left := ATextRect.Right; - ATextRect.Right := ATextRect.Left + FColWidth; - J := I; - if J > 7 then - Dec(J, 7) - else - if J <= 0 then - Inc(J, 7); - S := cxGetDayOfWeekName(J, ACanvas.Font.Charset); - ASize := ACanvas.TextExtent(S); - TrueTextRect(ACanvas.Canvas, ATextRect, ATextRect.Right - 3 - ASize.cx, - (ATextRect.Top + ATextRect.Bottom - ASize.cy) div 2, S); - end; - DrawDayNumbers(ACanvas, R); -end; - -procedure TcxCustomCalendar.DrawDayNumbers(ACanvas: TcxCanvas; const R: TRect); - - function GetDayTextColor(ASelected, AToday: Boolean; - const ADate, AFirstDate, ALastDate: Double): TColor; - begin - if ASelected then - Result := LookAndFeelPainter.DefaultDateNavigatorSelectionTextColor - else - if (ADate < AFirstDate) or (ADate > ALastDate) then - Result := LookAndFeelPainter.DefaultDateNavigatorInactiveTextColor - else - if AToday then - Result := LookAndFeelPainter.DefaultDateNavigatorTodayTextColor - else - Result := LookAndFeelPainter.DefaultDateNavigatorTextColor; - end; - -var - ADate, ACurDate, ALastDate: Double; - ASelected, AToday: Boolean; - ASize: TSize; - ATextRect, ASideRect: TRect; - I, J: Integer; - S: string; -begin - ACurDate := Date; - ALastDate := GetLastDate; - for I := 0 to 6 do - begin - for J := 0 to 5 do - begin - ATextRect.Left := R.Left + FSideWidth + GetWeekNumbersRegionWidth + I * FColWidth; - ATextRect.Top := R.Top + FDaysOfWeekHeight + J * FRowHeight; - ATextRect.Right := ATextRect.Left + FColWidth; - ATextRect.Bottom := ATextRect.Top + FRowHeight; - ADate := GetDateFromCell(I, J); - ASelected := (ADate = FSelectDate) or ((FSelectDate = NullDate) and (ADate = ACurDate)); - AToday := (ADate = ACurDate) or (ACurDate = NullDate); - ASideRect := ATextRect; - // draw frame around current date - if AToday then - begin - ACanvas.FrameRect(ATextRect, LookAndFeelPainter.DefaultDateNavigatorTodayFrameColor); - InflateRect(ATextRect, -1, -1); - end; - if ASelected then - ACanvas.Brush.Color := LookAndFeelPainter.DefaultDateNavigatorSelectionColor - else - ACanvas.Brush.Color := BackgroundColor; - ACanvas.Font.Color := GetDayTextColor(ASelected, AToday, ADate, FirstDate, ALastDate); - if CalendarTable.IsValidDate(ADate) then - S := cxDayNumberToLocalFormatStr(ADate) - else - S := ''; - - ASize := ACanvas.TextExtent(S); - TrueTextRect(ACanvas.Canvas, ATextRect, ASideRect.Right - 3 - ASize.cx, - (ASideRect.Top + ASideRect.Bottom - ASize.cy) div 2, S); - end; - end; - DrawWeekNumbers(ACanvas); - ACanvas.ExcludeClipRect(Rect(R.Left + FSideWidth, R.Top, R.Right - FSideWidth, R.Bottom - 1)); -end; - -procedure TcxCustomCalendar.DrawWeekNumbers(ACanvas: TcxCanvas); -var - I: Integer; - R: TRect; -begin - if not WeekNumbers then - Exit; - - ACanvas.Brush.Color := BackgroundColor; - ACanvas.Font := Font; - ACanvas.Font.Size := MulDiv(ACanvas.Font.Size, 2, 3); - ACanvas.Font.Color := LookAndFeelPainter.DefaultDateNavigatorTextColor; - for I := 0 to 5 do - begin - if not cxIsDateValid(GetDateFromCell(0, I)) then - Continue; - R.Left := FViewInfo.CalendarRect.Left + FSideWidth; - R.Top := FViewInfo.CalendarRect.Top + FDaysOfWeekHeight + FRowHeight * I; - R.Right := R.Left + FWeekNumberWidth; - R.Bottom := R.Top + FRowHeight; - - ACanvas.DrawTexT(IntToStr(CalendarTable.GetWeekNumber(GetDateFromCell(0, I), - TDay(cxFormatController.StartOfWeek), cxFormatController.FirstWeekOfYear)), - R, cxAlignRight or cxAlignVCenter); - end; - ACanvas.Font := Font; -end; - -procedure TcxCustomCalendar.Paint; - - procedure DrawDateTimeRegionsDelimiter; - var - X: Integer; - begin - X := FViewInfo.CalendarRect.Right + FColWidth div 2 + FSpaceWidth; - InternalPolyLine(Canvas, [ - Point(X, FViewInfo.CalendarRect.Top), - Point(X, FTimeEdit.Top + FTimeEdit.Height - 1)], - LookAndFeelPainter.DefaultDateNavigatorSeparator1Color, True); - end; - -begin - if Kind = ckDateTime then - DrawDateRegion(Canvas); - DrawHeader; - DrawMonths(Canvas); - if (Kind = ckDate) and ShowButtonsRegion then - begin - Canvas.ExcludeClipRect( - cxRectBounds(FSideWidth + FSpaceWidth, - ClientHeight - FButtonsRegionHeight - 1, - FDateRegionWidth - FSideWidth * 2, 1)); - end; - if Kind = ckDateTime then - DrawButtons(Canvas); - Canvas.FillRect(ClientRect, BackgroundColor); - if Kind = ckDateTime then - DrawDateTimeRegionsDelimiter; -{$IFDEF DELPHI7} - Canvas.SetClipRegion(TcxRegion.Create(GetControlRect(Self)), roSet); -{$ENDIF} -end; - -procedure TcxCustomCalendar.Calculate; - - procedure AdjustCalendarControls; - var - AHasKeyboardNavigation: Boolean; - begin - AHasKeyboardNavigation := Kind = ckDateTime; - - FTodayButton.TabStop := AHasKeyboardNavigation; - FTodayButton.TabOrder := 1; - - FNowButton.TabStop := AHasKeyboardNavigation; - FNowButton.TabOrder := 2; - - FClearButton.TabStop := AHasKeyboardNavigation; - FClearButton.TabOrder := 3; - - FOKButton.TabStop := AHasKeyboardNavigation; - FOKButton.TabOrder := 4; - - FTimeEdit.TabStop := AHasKeyboardNavigation; - FTimeEdit.TabOrder := 0; - if AHasKeyboardNavigation then - Keys := Keys - [kTab] - else - Keys := Keys + [kTab]; - end; - - procedure CalculateButtonWidth; - var - AVisibleButtonList: TList; - I: Integer; - begin - AVisibleButtonList := TList.Create; - try - GetVisibleButtonList(AVisibleButtonList); - FButtonWidth := 0; - for I := 0 to AVisibleButtonList.Count - 1 do - FButtonWidth := Max(FButtonWidth, - Canvas.TextWidth(TcxButton(AVisibleButtonList[I]).Caption)); - Inc(FButtonWidth, FColWidth); - finally - AVisibleButtonList.Free; - end; - end; - -begin - if not HandleAllocated then - Exit; - - AdjustCalendarControls; - - Canvas.Font := Font; - Canvas.Font.Size := MulDiv(Canvas.Font.Size, 2, 3); - FWeekNumberWidth := Canvas.TextWidth('99'); - Canvas.Font := Font; - - FColWidth := 3 * Canvas.TextWidth('0'); - FSideWidth := 2 * Canvas.TextWidth('0'); - FRowHeight := Canvas.TextHeight('0') + 2; - FHeaderHeight := FRowHeight + 3; - if (Kind = ckDate) and (LookAndFeel.Painter = TcxOffice11LookAndFeelPainter) then - Dec(FHeaderHeight); - FDaysOfWeekHeight := FRowHeight + 1; - - CalculateButtonWidth; - - FButtonsOffset := Font.Size div 2; - FButtonsHeight := MulDiv(Canvas.TextHeight('Wg'), 20, 13) + 1; - if Kind = ckDateTime then - begin - FButtonsRegionHeight := MulDiv(Font.Size, 5, 4) + 1; - if not Odd(FButtonsRegionHeight) then - Inc(FButtonsRegionHeight); - Inc(FButtonsRegionHeight, FButtonsHeight); - end - else - FButtonsRegionHeight := FButtonsOffset + (FButtonsHeight - 1) + - MulDiv(Font.Size, 3, 4); - - SetSize; - CalculateViewInfo; - Invalidate; -end; - -function TcxCustomCalendar.CanResize(var NewWidth, NewHeight: Integer): Boolean; -var - ASize: TSize; -begin - ASize := GetSize; - NewWidth := ASize.cx; - NewHeight := ASize.cy; - Result := True; -end; - -procedure TcxCustomCalendar.CheckHotTrack; -var - P: TPoint; -begin - if FMonthListBox.IsVisible then - HotTrackRegion := chrNone - else - if GetCaptureControl = nil then - begin - P := ScreenToClient(InternalGetCursorPos); - if PtInRect(FViewInfo.MonthRegion, P) then - HotTrackRegion := chrMonth - else - if PtInRect(FViewInfo.YearRegion, P) then - HotTrackRegion := chrYear - else - HotTrackRegion := chrNone - end - else - HotTrackRegion := chrNone; -end; - -procedure TcxCustomCalendar.DoStep(AArrow: TcxCalendarArrow); -begin - FirstDate := InvalidDate; - case AArrow of - caPrevMonth: - FirstDate := CalendarTable.AddMonths(FirstDate, -1); - caNextMonth: - FirstDate := CalendarTable.AddMonths(FirstDate, 1); - caPrevYear: - FirstDate := CalendarTable.AddYears(FirstDate, -1); - caNextYear: - FirstDate := CalendarTable.AddYears(FirstDate, 1); - end; -end; - -function TcxCustomCalendar.GetButtonsRegionOffset: Integer; -begin - Result := Font.Size div 2; -end; - -function TcxCustomCalendar.GetLastDate: Double; -var - ADate: TcxDateTime; -begin - ADate := CalendarTable.FromDateTime(FirstDate); - ADate.Day := CalendarTable.GetDaysInMonth(ADate.Year, ADate.Month); - Result := CalendarTable.ToDateTime(ADate); -end; - -function TcxCustomCalendar.GetMonthCalendarOffset: TPoint; -begin - Result.X := MulDiv(Font.Size, 3, 4); - Result.Y := Result.X; -end; - -function TcxCustomCalendar.GetRealFirstDate: Double; -var - ACol: Integer; -begin - Result := FirstDate; - ACol := DayOfWeekOffset(FirstDate); - if ACol = 0 then - Result := Result - 7 - else - Result := Result - ACol; -end; - -function TcxCustomCalendar.GetRealLastDate: Double; -var - Year, Month, Day: Word; - ACol: Integer; -begin - Result := GetLastDate; - DecodeDate(Result, Year, Month, Day); - ACol := DayOfWeekOffset(EncodeDate(Year, Month, 1)); - Result := Result + 6 * 7 - DaysPerMonth(Year, Month) - ACol; - if ACol = 0 then Result := Result - 7; -end; - -function TcxCustomCalendar.GetSize: TSize; - - function GetButtonsWidth: Integer; - var - AVisibleButtonList: TList; - begin - AVisibleButtonList := TList.Create; - try - GetVisibleButtonList(AVisibleButtonList); - Result := (FButtonWidth + FColWidth) * AVisibleButtonList.Count + FColWidth; - finally - AVisibleButtonList.Free; - end; - end; - - function GetTimeRegionWidth: Integer; - var - AButtonVOffset, ATimeEditWidth: Integer; - begin - AButtonVOffset := (FButtonsRegionHeight - 1 - FButtonsHeight) div 2; - - FClockSize := Height - FHeaderHeight - GetMonthCalendarOffset.Y - - FButtonsRegionHeight - FTimeEdit.Height - AButtonVOffset * 3; - Result := FClockSize; - ATimeEditWidth := GetTimeEditWidth; - if Result < ATimeEditWidth then - Result := ATimeEditWidth; - Inc(Result, AButtonVOffset * 2); - end; - -begin - Result.cy := (FHeaderHeight + 1) + (FDaysOfWeekHeight + 6 * FRowHeight); - if ShowButtonsRegion then - Result.cy := Result.cy + FButtonsRegionHeight; - if Kind = ckDateTime then - Result.cy := Result.cy + FHeaderHeight + GetMonthCalendarOffset.Y + - GetButtonsRegionOffset - else - Result.cy := Result.cy + 1; - Result.cy := Result.cy + GetHeaderOffset.Top; - - FDateRegionWidth := 2 * FSideWidth + 7 * FColWidth + GetWeekNumbersRegionWidth; - Result.cx := FDateRegionWidth; - if Kind = ckDateTime then - Result.cx := Result.cx + GetMonthCalendarOffset.X * 2 + FColWidth + - GetTimeRegionWidth; - if Result.cx < GetButtonsWidth then - begin - FSpaceWidth := (GetButtonsWidth - Result.cx) div 2; - if Kind = ckDateTime then - FSpaceWidth := FSpaceWidth div 2; - Result.cx := GetButtonsWidth; - end - else - FSpaceWidth := 0; -end; - -procedure TcxCustomCalendar.HidePopup(Sender: TcxControl; AReason: TcxEditCloseUpReason); -begin - FTimer.Enabled := False; - FMonthListBox.FTimer.Enabled := False; - if FMonthListBox.Showing then FMonthListBox.CloseUp; -end; - -procedure TcxCustomCalendar.InternalSetSelectDate(Value: Double; - ARepositionVisibleDates: Boolean); -var - R: TRect; -begin - if (FSelectDate <> Value) and cxIsDateValid(Value) then - begin - FSelectDate := Value; - if ARepositionVisibleDates and (Value <> NullDate) then - FirstDate := DateOf(FSelectDate); - if ARepositionVisibleDates or (Kind = ckDateTime) then - Repaint - else - begin - R := FViewInfo.CalendarRect; - Inc(R.Top, FDaysOfWeekHeight); - InvalidateRect(R, False); - end; - end; -end; - -function TcxCustomCalendar.PosToDateTime(P: TPoint): Double; -var - X, Y: Integer; - R: TRect; -begin - if PtInRect(ClientRect, P) then - begin - R := FViewInfo.CalendarRect; - with R do - begin - Inc(Top, FDaysOfWeekHeight); - Inc(Left, FSideWidth + GetWeekNumbersRegionWidth); - Dec(Right, FSideWidth); - Bottom := Top + 6 * FRowHeight; - if PtInRect(R, P) then - begin - Dec(P.X, Left); - Dec(P.Y, Top); - X := P.X div FColWidth; - Y := P.Y div FRowHeight; - Result := GetDateFromCell(X, Y); - end - else Result := NullDate; - end; - end - else Result := NullDate; -end; - -procedure TcxCustomCalendar.SetFirstDate(Value: Double); -var - ADate: TcxDateTime; -begin - if not cxIsDateValid(Value) then - Exit; - ADate := CalendarTable.FromDateTime(Value); - ADate.Day := 1; - Value := CalendarTable.ToDateTime(ADate); - if FFirstDate <> Value then - begin - FFirstDate := Value; - Repaint; - end; -end; - -procedure TcxCustomCalendar.SetSelectDate(Value: Double); -begin - InternalSetSelectDate(Value, True); -end; - -procedure TcxCustomCalendar.SetSize; -var - ASize: TSize; -begin - ASize := GetSize; - SetBounds(Left, Top, ASize.cx, ASize.cy); - AdjustCalendarControlsPosition; -end; - -procedure TcxCustomCalendar.StepToFuture; -var - Year, Month, Day: Word; -begin - DecodeDate(FirstDate, Year, Month, Day); - IncMonth(Year, Month); - FirstDate := EncodeDate(Year, Month, 1); -end; - -procedure TcxCustomCalendar.StepToPast; -var - Year, Month, Day: Word; -begin - DecodeDate(FirstDate, Year, Month, Day); - DecMonth(Year, Month); - FirstDate := EncodeDate(Year, Month, 1); -end; - -// IcxMouseTrackingCaller -procedure TcxCustomCalendar.MouseTrackingMouseLeave; -begin - CheckHotTrack; - EndMouseTracking(Self); -end; - -{ TcxPopupCalendar } - -procedure TcxPopupCalendar.CheckHotTrack; -begin - if not Edit.HasPopupWindow then - HotTrackRegion := chrNone - else - inherited CheckHotTrack; -end; - -procedure TcxPopupCalendar.HidePopup(Sender: TcxControl; AReason: TcxEditCloseUpReason); -begin - inherited HidePopup(Sender, AReason); - if Assigned(FOnHidePopup) then FOnHidePopup(Self, AReason); -end; - -procedure TcxPopupCalendar.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - case Key of - VK_ESCAPE: - if not FMonthListBox.ShowYears and FMonthListBox.IsVisible then - FMonthListBox.CloseUp - else - HidePopup(Self, crCancel); - VK_F4: - if not (ssAlt in Shift) then - HidePopup(Self, crClose); - VK_UP, VK_DOWN: - if Shift = [ssAlt] then - HidePopup(Self, crClose); - VK_RETURN: - if not FMonthListBox.Showing then - begin - DoDateTimeChanged; - HidePopup(Self, crEnter); - end; - VK_TAB: - if TcxCustomDateEditProperties(Edit.Properties).Kind = ckDate then - begin - if Edit.ActiveProperties.PostPopupValueOnTab then - DoDateTimeChanged; - Edit.DoEditKeyDown(Key, Shift); - end; - end; -end; - -procedure TcxPopupCalendar.MouseMove(Shift: TShiftState; X, Y: Integer); -var - R: TRect; -begin - inherited MouseMove(Shift, X, Y); - if FTimer.Enabled then Exit; - if (ssLeft in Shift) and not PtInRect(ClientRect, Point(X, Y)) then - begin - FSelectDate := TcxCustomDateEdit(Edit).Date; - R := FViewInfo.CalendarRect; - Inc(R.Top, FDaysOfWeekHeight); - InvalidateRect(R, False); - end; -end; - -{ TcxDateEditPropertiesValues } - -procedure TcxDateEditPropertiesValues.Assign(Source: TPersistent); -begin - if Source is TcxDateEditPropertiesValues then - begin - BeginUpdate; - try - inherited Assign(Source); - with TcxDateEditPropertiesValues(Source) do - begin - Self.DateButtons := DateButtons; - Self.InputKind := InputKind; - end; - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxDateEditPropertiesValues.RestoreDefaults; -begin - BeginUpdate; - try - inherited RestoreDefaults; - DateButtons := False; - InputKind := False; - finally - EndUpdate; - end; -end; - -function TcxDateEditPropertiesValues.GetMaxDate: Boolean; -begin - Result := MaxValue; -end; - -function TcxDateEditPropertiesValues.GetMinDate: Boolean; -begin - Result := MinValue; -end; - -function TcxDateEditPropertiesValues.IsMaxDateStored: Boolean; -begin - Result := IsMaxValueStored; -end; - -function TcxDateEditPropertiesValues.IsMinDateStored: Boolean; -begin - Result := IsMinValueStored; -end; - -procedure TcxDateEditPropertiesValues.SetDateButtons(Value: Boolean); -begin - if Value <> FDateButtons then - begin - FDateButtons := Value; - Changed; - end; -end; - -procedure TcxDateEditPropertiesValues.SetInputKind(Value: Boolean); -begin - if Value <> FInputKind then - begin - FInputKind := Value; - Changed; - end; -end; - -procedure TcxDateEditPropertiesValues.SetMaxDate(Value: Boolean); -begin - MaxValue := Value; -end; - -procedure TcxDateEditPropertiesValues.SetMinDate(Value: Boolean); -begin - MinValue := Value; -end; - -{ TcxCustomDateEditProperties } - -constructor TcxCustomDateEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FArrowsForYear := True; - FDateOnError := deNoChange; - CaseInsensitive := True; - FKind := ckDate; - FSaveTime := True; - FShowTime := True; - FYearsInMonthList := True; - ImmediateDropDown := False; - PopupSizeable := False; - BuildEditMask; -end; - -procedure TcxCustomDateEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomDateEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with TcxCustomDateEditProperties(Source) do - begin - Self.ArrowsForYear := ArrowsForYear; - - Self.AssignedValues.DateButtons := False; - if AssignedValues.DateButtons then - Self.DateButtons := DateButtons; - - Self.DateOnError := DateOnError; - - Self.AssignedValues.InputKind := False; - if AssignedValues.InputKind then - Self.InputKind := InputKind; - - Self.Kind := Kind; - Self.SaveTime := SaveTime; - Self.ShowTime := ShowTime; - Self.WeekNumbers := WeekNumbers; - Self.YearsInMonthList := YearsInMonthList; - end; - finally - EndUpdate - end - end - else - inherited Assign(Source); -end; - -procedure TcxCustomDateEditProperties.BuildEditMask; -begin - LockUpdate(True); - try - case InputKind of - ikMask: - begin - MaskKind := emkStandard; - if Kind = ckDateTime then - EditMask := cxFormatController.StandardDateTimeEditMask - else - EditMask := cxFormatController.StandardDateEditMask; - end; - ikRegExpr: - begin - MaskKind := emkRegExprEx; - if Kind = ckDateTime then - EditMask := cxFormatController.RegExprDateTimeEditMask - else - EditMask := cxFormatController.RegExprDateEditMask; - end; - else - EditMask := ''; - end; - finally - LockUpdate(False); - end; -end; - -function TcxCustomDateEditProperties.GetAssignedValues: TcxDateEditPropertiesValues; -begin - Result := TcxDateEditPropertiesValues(FAssignedValues); -end; - -function TcxCustomDateEditProperties.GetDateButtons: TDateButtons; -begin - if AssignedValues.DateButtons then - Result := FDateButtons - else - Result := GetDefaultDateButtons; -end; - -function TcxCustomDateEditProperties.GetDefaultDateButtons: TDateButtons; -begin - if Kind = ckDate then - Result := [btnClear, btnToday] - else - Result := [btnClear, btnNow]; -end; - -function TcxCustomDateEditProperties.GetDefaultInputKind: TcxInputKind; -begin - if Kind = ckDate then - Result := ikRegExpr - else - Result := ikMask; -end; - -function TcxCustomDateEditProperties.GetInputKind: TcxInputKind; -begin - if not cxIsGregorianCalendar then - begin - Result := ikStandard; - Exit; - end; - if AssignedValues.InputKind then - Result := FInputKind - else - Result := GetDefaultInputKind; -end; - -function TcxCustomDateEditProperties.GetMaxDate: TDateTime; -begin - Result := inherited MaxValue; -end; - -function TcxCustomDateEditProperties.GetMinDate: TDateTime; -begin - Result := inherited MinValue; -end; - -function TcxCustomDateEditProperties.IsDateButtonsStored: Boolean; -begin - Result := AssignedValues.DateButtons; -end; - -function TcxCustomDateEditProperties.IsInputKindStored: Boolean; -begin - Result := AssignedValues.InputKind; -end; - -function TcxCustomDateEditProperties.NeedShowTime(ADate: TDateTime; - AIsFocused: Boolean): Boolean; -begin - if AIsFocused then - begin - if Kind = ckDateTime then - Result := not((TimeOf(ADate) = 0) and (InputKind <> ikMask)) - else - Result := ShowTime and (TimeOf(ADate) <> 0) and (InputKind = ikStandard); - end - else - Result := not((Kind = ckDate) and not ShowTime); -end; - -procedure TcxCustomDateEditProperties.SetArrowsForYear(Value: Boolean); -begin - if Value <> FArrowsForYear then - begin - FArrowsForYear := Value; - Changed; - end; -end; - -procedure TcxCustomDateEditProperties.SetAssignedValues( - Value: TcxDateEditPropertiesValues); -begin - FAssignedValues.Assign(Value); -end; - -procedure TcxCustomDateEditProperties.SetDateButtons(Value: TDateButtons); -begin - if AssignedValues.DateButtons and (Value = FDateButtons) then - Exit; - - AssignedValues.FDateButtons := True; - FDateButtons := Value; - Changed; -end; - -procedure TcxCustomDateEditProperties.SetDateOnError(Value: TDateOnError); -begin - if Value <> FDateOnError then - begin - FDateOnError := Value; - Changed; - end; -end; - -procedure TcxCustomDateEditProperties.SetInputKind(Value: TcxInputKind); -begin - if AssignedValues.InputKind and (Value = FInputKind) then - Exit; - AssignedValues.FInputKind := True; - FInputKind := Value; - Changed; -end; - -procedure TcxCustomDateEditProperties.SetKind(Value: TcxCalendarKind); -begin - if Value <> FKind then - begin - FKind := Value; - Changed; - end; -end; - -procedure TcxCustomDateEditProperties.SetMaxDate(Value: TDateTime); -begin - inherited MaxValue := Value; -end; - -procedure TcxCustomDateEditProperties.SetMinDate(Value: TDateTime); -begin - inherited MinValue := Value; -end; - -procedure TcxCustomDateEditProperties.SetSaveTime(Value: Boolean); -begin - if Value <> FSaveTime then - begin - FSaveTime := Value; - Changed; - end; -end; - -procedure TcxCustomDateEditProperties.SetShowTime(Value: Boolean); -begin - if Value <> FShowTime then - begin - FShowTime := Value; - Changed; - end; -end; - -procedure TcxCustomDateEditProperties.SetWeekNumbers(Value: Boolean); -begin - if Value <> FWeekNumbers then - begin - FWeekNumbers := Value; - Changed; - end; -end; - -procedure TcxCustomDateEditProperties.SetYearsInMonthList(Value: Boolean); -begin - if Value <> FYearsInMonthList then - begin - FYearsInMonthList := Value; - Changed; - end; -end; - -procedure TcxCustomDateEditProperties.DoChanged; -begin - BeginUpdate; - try - BuildEditMask; - finally - EndUpdate(False); - end; - inherited; -end; - -function TcxCustomDateEditProperties.GetAlwaysPostEditValue: Boolean; -begin - Result := True; -end; - -class function TcxCustomDateEditProperties.GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; -begin - Result := TcxDateEditPropertiesValues; -end; - -function TcxCustomDateEditProperties.GetDisplayFormatOptions: TcxEditDisplayFormatOptions; -begin - Result := [dfoSupports, dfoNoCurrencyValue]; -end; - -function TcxCustomDateEditProperties.GetModeClass( - AMaskKind: TcxEditMaskKind): TcxMaskEditCustomModeClass; -begin - if AMaskKind = emkStandard then - Result := TcxDateEditMaskStandardMode - else - Result := inherited GetModeClass(AMaskKind); -end; - -class function TcxCustomDateEditProperties.GetPopupWindowClass: TcxCustomEditPopupWindowClass; -begin - Result := TcxDateEditPopupWindow; -end; - -function TcxCustomDateEditProperties.IsEditValueNumeric: Boolean; -begin - Result := True; -end; - -function TcxCustomDateEditProperties.IsValueBoundDefined( - ABound: TcxEditValueBound): Boolean; -begin - if (MinValue <> 0) and (MaxValue <> 0) then - Result := MinValue < MaxValue - else - if ABound = evbMin then - Result := MinValue <> 0 - else - Result := MaxValue <> 0; -end; - -function TcxCustomDateEditProperties.IsValueBoundsDefined: Boolean; -begin - if (MinValue <> 0) and (MaxValue <> 0) then - Result := MinValue < MaxValue - else - Result := (MinValue <> 0) or (MaxValue <> 0); -end; - -function TcxCustomDateEditProperties.PopupWindowAcceptsAnySize: Boolean; -begin - Result := False; -end; - -function TcxCustomDateEditProperties.GetEmptyDisplayValue( - AEditFocused: Boolean): string; -var - ATimeStringLength: Integer; - S: string; -begin - Result := GetEmptyString; - if AEditFocused and (Kind = ckDateTime) and (InputKind = ikMask) and - not cxFormatController.AssignedStandardDateTimeEditMask then - begin - S := DateTimeToTextEx(0, True, True); - ATimeStringLength := cxFormatController.GetDateTimeStandardMaskStringLength( - cxFormatController.TimeFormatInfo); - Delete(Result, Length(Result) - ATimeStringLength + 1, ATimeStringLength); - Result := Result + Copy(S, Length(S) - ATimeStringLength + 1, ATimeStringLength); - end; -end; - -function TcxCustomDateEditProperties.GetStandardMaskBlank(APos: Integer): Char; -var - ATimeZoneInfo: TcxTimeEditZoneInfo; -begin - if not GetTimeZoneInfo(APos, ATimeZoneInfo) then - Result := ' ' - else - if ATimeZoneInfo.Kind = tzTimeSuffix then - Result := #0 - else - Result := '0'; -end; - -function TcxCustomDateEditProperties.GetTimeZoneInfo(APos: Integer; - out AInfo: TcxTimeEditZoneInfo): Boolean; -const - ATimeZoneKindMap: array[TcxDateTimeFormatItemKind] of TcxTimeEditZoneKind = - (tzHour, tzHour, tzHour, tzHour, tzHour, tzMin, tzSec, tzHour, tzTimeSuffix, - tzHour, tzHour); -var - AItemInfo: TcxDateTimeFormatItemInfo; -begin - Result := False; - if (Kind <> ckDateTime) or (InputKind <> ikMask) or - cxFormatController.AssignedStandardDateTimeEditMask then - Exit; - Result := cxFormatController.GetDateTimeFormatItemStandardMaskInfo( - cxFormatController.DateTimeFormatInfo, APos, AItemInfo); - Result := Result and (AItemInfo.Kind in [dtikHour, dtikMin, dtikSec, dtikTimeSuffix]); - if Result then - begin - AInfo.Kind := ATimeZoneKindMap[AItemInfo.Kind]; - AInfo.Start := AItemInfo.ItemZoneStart; - AInfo.Length := AItemInfo.ItemZoneLength; - AInfo.TimeSuffixKind := AItemInfo.TimeSuffixKind; - AInfo.Use24HourFormat := not cxFormatController.DateTimeFormatInfo.DefinedItems[dtikTimeSuffix]; - end; -end; - -procedure TcxCustomDateEditProperties.InternalPrepareEditValue( - ADisplayValue: string; out EditValue: TcxEditValue); -var - ADate: TDateTime; -begin - EditValue := Null; - if not InternalCompareString(ADisplayValue, GetEmptyString, True) and - not InternalCompareString(ADisplayValue, GetEmptyDisplayValue(True), True) then - begin -// TODO -// if (TimeFormat = tfHour) and Use24HourFormat then -// ADisplayValue := ADisplayValue + ':00'; - cxStrToDateTime(ADisplayValue, not cxFormatController.UseDelphiDateTimeFormats, - ADate); - if ADate <> NullDate then - EditValue := ADate - else - if DateOnError = deToday then - if Kind = ckDate then - EditValue := SysUtils.Date - else - EditValue := SysUtils.Now; - end; -end; - -class function TcxCustomDateEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxDateEdit; -end; - -function TcxCustomDateEditProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - Result := GetValueEditorEditValueSource(AEditFocused); -end; - -function TcxCustomDateEditProperties.IsDisplayValueValid(var DisplayValue: TcxEditValue; - AEditFocused: Boolean): Boolean; -var - ADate: TDateTime; -begin - // TODO optional symbols - if InputKind = ikStandard then - begin - cxStrToDateTime(VarToStr(DisplayValue), - not cxFormatController.UseDelphiDateTimeFormats, ADate); - Result := ADate <> NullDate; - end - else - Result := inherited IsDisplayValueValid(DisplayValue, AEditFocused); -end; - -function TcxCustomDateEditProperties.IsEditValueValid( - var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; -var - AValue: TcxEditValue; -begin - if VarIsStr(EditValue) then - begin - try - InternalPrepareEditValue(EditValue, AValue); - Result := not VarIsNull(AValue) and not VarIsNullDate(AValue); - except - Result := False; - end - end - else - Result := VarIsSoftNull(EditValue) or VarIsDate(EditValue) or - VarIsNumericEx(EditValue); -end; - -procedure TcxCustomDateEditProperties.PrepareDisplayValue( - const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; - AEditFocused: Boolean); - - function GetDisplayValue: string; - var - AValue: TcxEditValue; - begin - if VarIsSoftNull(AEditValue) or VarIsNullDate(AEditValue) then - Result := GetEmptyDisplayValue(AEditFocused) - else - if not(VarIsStr(AEditValue) or VarIsDate(AEditValue) or VarIsNumericEx(AEditValue)) then - raise EConvertError.CreateFmt(cxGetResourceString(@cxSEditDateConvertError), []) - else - begin - if VarIsStr(AEditValue) then - begin - InternalPrepareEditValue(AEditValue, AValue); - if VarIsNull(AValue) or VarIsNullDate(AValue) then - raise EConvertError.CreateFmt(cxGetResourceString(@cxSEditDateConvertError), []) - end - else - AValue := AEditValue; - if not NeedShowTime(AValue, AEditFocused) then - AValue := DateOf(AValue); - if AEditFocused then - Result := DateTimeToTextEx(AValue, InputKind = ikMask, Kind = ckDateTime) - else - Result := DateTimeToTextEx(AValue, False); - Result := TrimRight(Result); - end; - end; - -begin - DisplayValue := GetDisplayValue; - if AEditFocused and IsMasked then - inherited PrepareDisplayValue(DisplayValue, DisplayValue, AEditFocused); -end; - -procedure TcxCustomDateEditProperties.ValidateDisplayValue( - var ADisplayValue: TcxEditValue; var AErrorText: TCaption; - var AError: Boolean; AEdit: TcxCustomEdit); - - function DateToDisplayValue(var ADate: TDateTime): TcxEditValue; - begin - Result := DateTimeToTextEx(ADate, InputKind = ikMask, Kind = ckDateTime); - Result := TrimRight(Result); - end; - - procedure ConvertToDate(const ADisplayValue: TcxEditValue; - out ADate: TDateTime; out AError: Boolean); - begin - AError := not TextToDateEx(ADisplayValue, ADate); - end; - - procedure CorrectError(var ADate: TDateTime; var AError: Boolean); - begin - if DateOnError = deNoChange then - Exit; - case DateOnError of - deToday: - if Kind = ckDate then - ADate := SysUtils.Date - else - ADate := SysUtils.Now; - deNull: - ADate := NullDate; - end; - AError := False; - end; - - function GetDate(var ADisplayValue: TcxEditValue; out AError: Boolean; - out AErrorText: TCaption): TDateTime; - // AError - // NullDate - from CorrectError - // ADisplayValue = GetEmptyString - // Result - var - AIsUserErrorDisplayValue: Boolean; - begin - AError := False; - AErrorText := cxGetResourceString(@cxSDateError); - AIsUserErrorDisplayValue := False; - try - try - if ADisplayValue <> GetEmptyDisplayValue(True) then - ConvertToDate(ADisplayValue, Result, AError); - if TcxCustomDateEdit(AEdit).IsOnValidateEventAssigned then - begin - if (ADisplayValue <> GetEmptyDisplayValue(True)) and not AError then - ADisplayValue := DateToDisplayValue(Result(*, False*)); - DoValidate(ADisplayValue, AErrorText, AError, AEdit, - AIsUserErrorDisplayValue); - if not AError and (ADisplayValue <> GetEmptyDisplayValue(True)) then - ConvertToDate(ADisplayValue, Result, AError); - end - else - if AError then - CorrectError(Result, AError); - except - AError := True; - end; - finally - if AError and not AIsUserErrorDisplayValue then - ADisplayValue := TcxCustomDateEdit(AEdit).DisplayValue; - end; - end; - - procedure ValidateEmptyDisplayValue(AIsNullDate: Boolean); - - function SaveSavedTime: Boolean; - begin - Result := not AIsNullDate and (Kind = ckDate) and - (TcxCustomDateEdit(AEdit).FSavedTime <> 0) and SaveTime; - end; - - var - ADateEdit: TcxCustomDateEdit; - AEditValueChanged: Boolean; - begin - ADateEdit := TcxCustomDateEdit(AEdit); - if SaveSavedTime then - begin - AEditValueChanged := not InternalVarEqualsExact( - ADateEdit.FEditValue, ADateEdit.FSavedTime); - ADateEdit.FEditValue := ADateEdit.FSavedTime; - ADisplayValue := DateToDisplayValue(ADateEdit.FSavedTime); - end - else - begin - AEditValueChanged := not VarIsNull(ADateEdit.FEditValue); - ADateEdit.FEditValue := Null; - ADateEdit.FSavedTime := 0; - ADisplayValue := GetEmptyDisplayValue(True); - end; - if AEditValueChanged then - ADateEdit.DoEditValueChanged; - end; - - procedure CheckDate(ADate: TDateTime; var AErrorText: TCaption; - var AError: Boolean); - var - ATempValue: TcxEditValue; - begin - if IsValueBoundsDefined then - begin - ATempValue := ADate; - CheckEditorValueBounds(ATempValue, AErrorText, AError, AEdit); - end; - end; - -var - ADate: TDateTime; - ADateEdit: TcxCustomDateEdit; -begin -// TODO -// if (TimeFormat = tfHour) and Use24HourFormat then -// ADisplayValue := ADisplayValue + ':00'; - ADate := GetDate(ADisplayValue, AError, AErrorText); - if AError then - Exit; - - ADateEdit := TcxCustomDateEdit(AEdit); - try - try - if (ADate = NullDate) or (ADisplayValue = GetEmptyDisplayValue(True)) then - ValidateEmptyDisplayValue(ADate = NullDate) - else - begin - CheckDate(ADate, AErrorText, AError); - if AError then - Exit; - // support for time in the SmartInput - - if Kind = ckDate then - if TimeOf(ADate) <> 0 then - ADateEdit.FSavedTime := TimeOf(ADate) - else - if SaveTime then - begin - if ADate >= 0 then - ADate := ADate + ADateEdit.FSavedTime - else - ADate := ADate - ADateEdit.FSavedTime; - end - else - ADateEdit.FSavedTime := 0; - ADisplayValue := DateToDisplayValue(ADate); - end; - except - AError := True; - end; - finally - if AError then - ADisplayValue := TcxCustomDateEdit(AEdit).DisplayValue; - end; -end; - -{ TcxDateEditPopupWindow } - -constructor TcxDateEditPopupWindow.Create(AOwnerControl: TWinControl); -begin - inherited Create(AOwnerControl); - KeyPreview := True; -end; - -procedure TcxDateEditPopupWindow.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - if IsPopupCalendarKey(Key, Shift) then - TcxCustomDateEdit(Edit).Calendar.KeyDown(Key, Shift); -end; - -function TcxDateEditPopupWindow.IsPopupCalendarKey(Key: Word; - Shift: TShiftState): Boolean; - - function CanEscape: Boolean; - var - AContainer: TcxContainer; - begin - Result := ActiveControl is TcxButton; - if not Result then - begin - AContainer := GetcxContainer(ActiveControl); - Result := (AContainer is TcxTimeEdit) and not TcxTimeEdit(AContainer).ModifiedAfterEnter; - end; - end; - -begin - Result := (Key = VK_ESCAPE) and CanEscape or - ((Key = VK_UP) or (Key = VK_DOWN)) and (ssAlt in Shift) or - (Key = VK_F4) and not (ssAlt in Shift); -end; - -{ TcxDateEditMaskStandardMode } - -function TcxDateEditMaskStandardMode.GetBlank(APos: Integer): Char; -begin - Result := TcxCustomDateEditProperties(Properties).GetStandardMaskBlank(APos); -end; - -{ TcxCustomDateEdit } - -destructor TcxCustomDateEdit.Destroy; -begin - FreeAndNil(FCalendar); - inherited Destroy; -end; - -procedure TcxCustomDateEdit.Clear; -begin - Date := NullDate; -end; - -procedure TcxCustomDateEdit.DateChange(Sender: TObject); -var - ADate: Double; - ADisplayValue: TcxEditValue; -begin - FCloseUpReason := crEnter; - ADate := Calendar.SelectDate; - if ActiveProperties.Kind = ckDateTime then - ADate := DateOf(ADate) + cxSign(ADate) * TimeOf(TDateTime(Calendar.FTimeEdit.Time)) - else - if ActiveProperties.SaveTime and (ADate <> NullDate) then - if ADate >= 0 then - ADate := ADate + TimeOf(FDateDropDown) - else - ADate := ADate - TimeOf(FDateDropDown); - ADisplayValue := GetRecognizableDisplayValue(ADate); - if ((Date <> ADate) or not InternalCompareString(DisplayValue, VarToStr(ADisplayValue), True)) and - DoEditing then - begin - LockChangeEvents(True); - try - Date := ADate; - ModifiedAfterEnter := True; - SetInternalDisplayValue(ADisplayValue); - SelectAll; - finally - LockChangeEvents(False); - end; - end; -end; - -function TcxCustomDateEdit.GetActiveProperties: TcxCustomDateEditProperties; -begin - Result := TcxCustomDateEditProperties(InternalGetActiveProperties); -end; - -function TcxCustomDateEdit.GetCurrentDate: TDateTime; -begin - if Focused and not IsEditValidated and ModifiedAfterEnter then - Result := GetDateFromStr(DisplayValue) - else - Result := Date; -end; - -function TcxCustomDateEdit.GetProperties: TcxCustomDateEditProperties; -begin - Result := TcxCustomDateEditProperties(FProperties); -end; - -function TcxCustomDateEdit.GetRecognizableDisplayValue( - ADate: TDateTime): TcxEditValue; - - function NeedDisplayValueCorrection(ADate: TDateTime): Boolean; - var - ADisplayValue, AEditValue: TcxEditValue; - begin - Result := False; - if (ActiveProperties.InputKind = ikStandard) and (ADate <> NullDate) then - begin - PrepareDisplayValue(ADate, ADisplayValue, True); - PrepareEditValue(ADisplayValue, AEditValue, True); - Result := DateOf(ADate) <> DateOf(AEditValue); - end; - end; - -begin - if NeedDisplayValueCorrection(ADate) then - begin - if not ActiveProperties.NeedShowTime(ADate, True) then - ADate := DateOf(ADate); - Result := DateTimeToTextEx(ADate, False, ActiveProperties.Kind = ckDateTime, True); - Result := TrimRight(Result); - end - else - PrepareDisplayValue(ADate, Result, True); -end; - -procedure TcxCustomDateEdit.SetProperties(Value: TcxCustomDateEditProperties); -begin - FProperties.Assign(Value); -end; - -function TcxCustomDateEdit.CanSynchronizeModeText: Boolean; -begin - Result := Focused or IsEditValidating; -end; - -procedure TcxCustomDateEdit.CheckEditorValueBounds; -begin - if Date = NullDate then - Exit; - KeyboardAction := ModifiedAfterEnter; - try - if ActiveProperties.IsValueBoundDefined(evbMin) and - (Date < ActiveProperties.MinValue) then - Date := ActiveProperties.MinValue - else - if ActiveProperties.IsValueBoundDefined(evbMax) and - (Date > ActiveProperties.MaxValue) then - Date := ActiveProperties.MaxValue; - finally - KeyboardAction := False; - end; -end; - -procedure TcxCustomDateEdit.CreatePopupWindow; -begin - inherited; - PopupWindow.ModalMode := False; -end; - -(*procedure TcxCustomDateEdit.DoEditKeyDown(var Key: Word; Shift: TShiftState); - - function IsArrowIncrementPosition: Boolean; - begin - Result := False; - if (ActiveProperties.Kind <> ckDateTime) or (ActiveProperties.InputKind <> ikMask) then - Exit; - Result := SelStart + SelLength >= 11; - end; - - procedure Increment(AButton: TcxSpinEditButton); - var - ATimeZone: TcxTimeEditZone; - begin - ATimeZone := GetTimeZone; - end; - -var - AButton: TcxSpinEditButton; -begin - if ((Key = VK_UP) or (Key = VK_DOWN) or (Key = VK_NEXT) or (Key = VK_PRIOR)){ and - not (ActiveProperties.UseCtrlIncrement and not (ssCtrl in Shift))} and - IsArrowIncrementPosition then - begin - if not DataBinding.Modified and not DoEditing then - Exit; - case Key of - VK_UP: - AButton := sebForward; - VK_DOWN: - AButton := sebBackward; - VK_PRIOR: - AButton := sebFastForward; - else - AButton := sebFastBackward; - end; - Increment(AButton); - DoAfterKeyDown(Key, Shift); - Key := 0; - end; - if Key <> 0 then - inherited DoEditKeyDown(Key, Shift); -end;*) - -procedure TcxCustomDateEdit.DropDown; -begin - if Calendar = nil then - CreateCalendar; - ActiveProperties.PopupControl := Calendar; - inherited DropDown; -end; - -procedure TcxCustomDateEdit.Initialize; -begin - inherited Initialize; - ControlStyle := ControlStyle - [csSetCaption]; - FDateDropDown := NullDate; -end; - -procedure TcxCustomDateEdit.InitializePopupWindow; -var - ADate: TDateTime; - ATimeFormat: TcxTimeEditTimeFormat; - AUse24HourFormat: Boolean; -begin - inherited InitializePopupWindow; - with Calendar do - begin - HandleNeeded; - Color := Self.ActiveStyle.Color; - Flat := Self.PopupControlsLookAndFeel.Kind in [lfFlat, - lfUltraFlat, lfOffice11]; - CalendarButtons := ActiveProperties.DateButtons; - OnDateTimeChanged := nil; - FDateDropDown := Self.CurrentDate; - if FDateDropDown = NullDate then - ADate := SysUtils.Date - else - ADate := FDateDropDown; - if ActiveProperties.Kind = ckDateTime then - FTimeEdit.Time := TTime(TimeOf(ADate)); - ADate := DateOf(ADate); - FirstDate := ADate; - SelectDate := ADate; - Font.Assign(Self.VisibleFont); - Font.Color := clBtnText; - SetSize; // force recalculate size - OnDateTimeChanged := DateChange; - ArrowsForYear := ActiveProperties.ArrowsForYear; - Kind := ActiveProperties.Kind; - - cxCalendar.GetTimeFormat(cxFormatController.DateTimeFormatInfo, ATimeFormat, - AUse24HourFormat); - TimeFormat := ATimeFormat; - Use24HourFormat := AUse24HourFormat; - - WeekNumbers := ActiveProperties.WeekNumbers; - YearsInMonthList := ActiveProperties.YearsInMonthList; - end; -end; - -function TcxCustomDateEdit.InternalGetEditingValue: TcxEditValue; -begin - PrepareEditValue(Text, Result, True); -end; - -function TcxCustomDateEdit.InternalGetText: string; -begin - Result := DisplayValue; -end; - -procedure TcxCustomDateEdit.InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); - - procedure SaveTime; - var - ADate: TDateTime; - begin - if not ActiveProperties.SaveTime or not(VarIsStr(Value) or VarIsNumericEx(Value) or VarIsDate(Value)) then - FSavedTime := 0 - else - if VarIsStr(Value) then - begin - cxStrToDateTime(Value, not cxFormatController.UseDelphiDateTimeFormats, ADate); - if ADate = NullDate then - FSavedTime := 0 - else - FSavedTime := TimeOf(ADate); - end - else - FSavedTime := TimeOf(Value); - end; - -begin - if IsDestroying then - Exit; - if ActiveProperties.Kind = ckDate then - SaveTime; - inherited InternalSetEditValue(Value, AValidateEditValue); -end; - -function TcxCustomDateEdit.InternalSetText(const Value: string): Boolean; -begin - Result := SetDisplayText(Value); -end; - -procedure TcxCustomDateEdit.InternalValidateDisplayValue( - const ADisplayValue: TcxEditValue); -begin - if VarIsStr(ADisplayValue) then - inherited InternalValidateDisplayValue(ADisplayValue) - else - begin - SaveModified; - try - InternalEditValue := ADisplayValue; - finally - RestoreModified; - end; - end; -end; - -function TcxCustomDateEdit.IsCharValidForPos(var AChar: Char; - APos: Integer): Boolean; -var - ATimeZoneInfo: TcxTimeEditZoneInfo; -begin - if not ActiveProperties.GetTimeZoneInfo(APos, ATimeZoneInfo) then - Result := True - else - Result := IsCharValidForTimeEdit(Self, AChar, APos, ATimeZoneInfo); -end; - -procedure TcxCustomDateEdit.PopupWindowClosed(Sender: TObject); -begin - inherited PopupWindowClosed(Sender); - if Calendar <> nil then - Calendar.CheckHotTrack; -end; - -procedure TcxCustomDateEdit.PopupWindowShowed(Sender: TObject); -begin - inherited PopupWindowShowed(Sender); - Calendar.Calculate; - Calendar.CheckHotTrack; -end; - -procedure TcxCustomDateEdit.UpdateTextFormatting; -begin -end; - -procedure TcxCustomDateEdit.CreateCalendar; -begin - FCalendar := GetCalendarClass.Create(Self); - FCalendar.FEdit := Self; - FCalendar.Parent := PopupWindow; - FCalendar.OnHidePopup := HidePopup; - FCalendar.LookAndFeel.MasterLookAndFeel := PopupControlsLookAndFeel; -end; - -function TcxCustomDateEdit.GetCalendarClass: TcxPopupCalendarClass; -begin - Result := TcxPopupCalendar; -end; - -function TcxCustomDateEdit.GetDate: TDateTime; -begin - if VarIsNull(EditValue) then - Result := NullDate - else if VarIsNumericEx(EditValue) or VarIsDate(EditValue) then - Result := EditValue - else if VarIsStr(EditValue) then - Result := GetDateFromStr(EditValue) - else - Result := NullDate; -end; - -function TcxCustomDateEdit.GetDateFromStr(const S: string): TDateTime; -var - AValue: TcxEditValue; -begin - PrepareEditValue(S, AValue, Focused); - if VarIsNull(AValue) then - Result := NullDate - else - Result := AValue; -end; - -procedure TcxCustomDateEdit.SetDate(Value: TDateTime); -begin - if Value = NullDate then - InternalEditValue := Null - else - begin - if ActiveProperties.Kind = ckDate then - if TimeOf(Value) = 0 then - if ActiveProperties.SaveTime then - Value := Int(Value) + cxSign(Value) * FSavedTime - else - Value := Int(Value); - InternalEditValue := Value; - end; -end; - -procedure TcxCustomDateEdit.SetupPopupWindow; -begin - inherited SetupPopupWindow; - Calendar.LookAndFeel.SkinPainter := ViewInfo.Painter; -end; - -class function TcxCustomDateEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomDateEditProperties; -end; - -procedure TcxCustomDateEdit.PrepareEditValue( - const ADisplayValue: TcxEditValue; out EditValue: TcxEditValue; - AEditFocused: Boolean); -var - ATempValue: TDateTime; -begin - try - ActiveProperties.InternalPrepareEditValue(ADisplayValue, EditValue); - finally - if not VarIsNull(EditValue) then - begin - if not VarIsNullDate(EditValue) and - (ActiveProperties.Kind = ckDate) and ActiveProperties.SaveTime then - begin - ATempValue := Int(EditValue) + cxSign(EditValue) * FSavedTime; - EditValue := ATempValue; // restore varDate type - end; - if not cxFormatController.UseDelphiDateTimeFormats then - try - EditValue := VarAsType(EditValue, varDate); - except - on EVariantError do - ; - end; - end; - end; -end; - -{ TcxDateEdit } - -class function TcxDateEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxDateEditProperties; -end; - -function TcxDateEdit.GetActiveProperties: TcxDateEditProperties; -begin - Result := TcxDateEditProperties(InternalGetActiveProperties); -end; - -function TcxDateEdit.GetProperties: TcxDateEditProperties; -begin - Result := TcxDateEditProperties(FProperties); -end; - -procedure TcxDateEdit.SetProperties(Value: TcxDateEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterDateEditHelper } - -class function TcxFilterDateEditHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxDateEdit; -end; - -class function TcxFilterDateEditHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoLess, fcoLessEqual, fcoGreater, - fcoGreaterEqual, fcoBlanks, fcoNonBlanks]; - if AExtendedSet then - Result := Result + [fcoBetween, fcoNotBetween, fcoInList, fcoNotInList, - fcoYesterday, fcoToday, fcoTomorrow, - fcoLast7Days, fcoLastWeek, fcoLast14Days, fcoLastTwoWeeks, fcoLast30Days, fcoLastMonth, fcoLastYear, fcoInPast, - fcoThisWeek, fcoThisMonth, fcoThisYear, - fcoNext7Days, fcoNextWeek, fcoNext14Days, fcoNextTwoWeeks, fcoNext30Days, fcoNextMonth, fcoNextYear, fcoInFuture]; -end; - -class procedure TcxFilterDateEditHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - with TcxCustomDateEditProperties(AProperties) do - begin - DateButtons := [btnToday, btnClear]; - DateOnError := deNull; - InputKind := ikRegExpr; - SaveTime := True; - end; -end; - -initialization - GetRegisteredEditProperties.Register(TcxDateEditProperties, scxSEditRepositoryDateItem); - FilterEditsController.Register(TcxDateEditProperties, TcxFilterDateEditHelper); - -finalization - FilterEditsController.Unregister(TcxDateEditProperties, TcxFilterDateEditHelper); - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxCheckBox.pas deleted file mode 100644 index da1ddb02..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckBox.pas +++ /dev/null @@ -1,2615 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxCheckBox; - -{$I cxVer.inc} - -interface - -uses - Messages, Windows, -{$IFDEF DELPHI6} - Types, Variants, -{$ENDIF} - Classes, Controls, Forms, Graphics, SysUtils, cxClasses, cxContainer, cxControls, - cxCustomData, cxDataStorage, cxEdit, cxGraphics, cxLookAndFeels, cxTextEdit, - cxDropDownEdit, cxVariants, cxFilterControlUtils, cxLookAndFeelPainters; - -const - cxEditCheckBoxSingleBorderDefaultColor = clBtnShadow; - -type - TcxCheckBoxNullValueShowingStyle = (nssUnchecked, nssInactive, nssGrayedChecked); - TcxCheckStatesValueFormatEx = (cvfCaptions, cvfIndices, cvfInteger, cvfStatesString, cvfCustom); - TcxCheckStatesValueFormat = cvfCaptions..cvfStatesString; - TcxCheckStates = array of TcxCheckBoxState; - TcxEditCheckBoxBorderStyle = TcxEditBorderStyle; - TcxEditCheckState = (ecsNormal, ecsHot, ecsPressed, ecsDisabled); - - TcxCheckStatesToValueEvent = procedure(Sender: TObject; - const ACheckStates: TcxCheckStates; out AValue: TcxEditValue) of object; - TcxValueToCheckStatesEvent = procedure(Sender: TObject; - const AValue: TcxEditValue; var ACheckStates: TcxCheckStates) of object; - - { IcxCheckItems } - - IcxCheckItems = interface - ['{5BF13228-CF05-4741-9833-F2B8FBFD57ED}'] - function GetCaption(Index: Integer): string; - function GetCount: Integer; - property Captions[Index: Integer]: string read GetCaption; - property Count: Integer read GetCount; - end; - - { TcxCaptionItem } - - TcxCaptionItem = class(TCollectionItem) - private - FCaption: TCaption; - FTag: TcxTag; - - function IsTagStored: Boolean; - procedure SetCaption(AValue: TCaption); - protected - property Caption: TCaption read FCaption write SetCaption; - property Tag: TcxTag read FTag write FTag stored IsTagStored; - public - procedure Assign(Source: TPersistent); override; - end; - - { TcxCaptionItems } - - TcxCaptionItems = class(TcxOwnedInterfacedCollection, IcxCheckItems) - private - function GetItem(AIndex: Integer): TcxCaptionItem; - procedure SetItem(AIndex: Integer; AValue: TcxCaptionItem); - protected - function DoCompareItems(AItem1, AItem2: TcxInterfacedCollectionItem): Integer; override; - - // IcxCheckItems - function GetCaption(AIndex: Integer): string; - function GetCount: Integer; - public - property Items[AIndex: Integer]: TcxCaptionItem read GetItem write SetItem; default; - end; - - { TcxCustomCheckBoxViewInfo } - - TcxCustomCheckBox = class; - - TcxCustomCheckBoxViewInfo = class(TcxCustomTextEditViewInfo) - private - function GetEdit: TcxCustomCheckBox; - protected - procedure InternalPaint(ACanvas: TcxCanvas); override; - function IsTextEnabled: Boolean; - public - Alignment: TAlignment; - CheckBorderOffset: Integer; - CheckBoxBorderStyle: TcxEditCheckBoxBorderStyle; - CheckBoxGlyph: TBitmap; - CheckBoxGlyphCount: Integer; - CheckBoxRect: TRect; - CheckBoxState: TcxEditCheckState; - DrawCaptionFlags: Integer; - FocusRect: TRect; - HasGlyph: Boolean; - IsTextColorAssigned: Boolean; - NullValueShowingStyle: TcxCheckBoxNullValueShowingStyle; - State: TcxCheckBoxState; - procedure Assign(Source: TObject); override; - procedure DrawText(ACanvas: TcxCanvas); override; - function GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; override; - function IsHotTrack: Boolean; override; - function IsHotTrack(P: TPoint): Boolean; override; - function NeedShowHint(ACanvas: TcxCanvas; const P: TPoint; out AText: TCaption; - out AIsMultiLine: Boolean; out ATextRect: TRect): Boolean; override; - procedure Offset(DX, DY: Integer); override; - function Repaint(AControl: TWinControl; const AInnerEditRect: TRect; - AViewInfo: TcxContainerViewInfo = nil): Boolean; override; - property Edit: TcxCustomCheckBox read GetEdit; - end; - - { TcxCustomCheckBoxViewData } - - TcxCustomCheckBoxProperties = class; - - TcxCustomCheckBoxViewData = class(TcxCustomEditViewData) - private - function GetProperties: TcxCustomCheckBoxProperties; - protected - function InternalGetEditConstantPartSize(ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; - var MinContentSize: TSize; AViewInfo: TcxCustomEditViewInfo): TSize; override; - function GetDrawTextFlags: Integer; virtual; - function GetIsEditClass: Boolean; - function IsCheckPressed: Boolean; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - function GetBorderStyle: TcxEditBorderStyle; override; - property Properties: TcxCustomCheckBoxProperties read GetProperties; - end; - - { TcxCheckBoxStyle } - - TcxCheckBoxStyle = class(TcxEditStyle) - public - function HasBorder: Boolean; override; - end; - - { TcxCustomCheckBoxProperties } - - TcxCustomCheckBoxProperties = class(TcxCustomEditProperties) - private - FAllowGrayed: Boolean; - FCaption: TCaption; // obsolete - FDisplayChecked: WideString; - FDisplayGrayed: WideString; - FDisplayUnchecked: WideString; - FFullFocusRect: Boolean; - FGlyph: TBitmap; - FGlyphCount: Integer; - FIsCaptionAssigned: Boolean; // obsolete - FMultiLine: Boolean; - FNullStyle: TcxCheckBoxNullValueShowingStyle; - FUseAlignmentWhenInplace: Boolean; - FValueChecked: TcxEditValue; - FValueGrayed: TcxEditValue; - FValueUnchecked: TcxEditValue; - function GetAlignment: TAlignment; - function GetGlyph: TBitmap; - function GetInternalAlignment: TcxEditAlignment; - procedure GlyphChanged(Sender: TObject); - function IsAlignmentStored: Boolean; - function IsDisplayCheckedStored: Boolean; - function IsDisplayGrayedStored: Boolean; - function IsDisplayUncheckedStored: Boolean; - function IsLoading: Boolean; - function IsValueCheckedStored: Boolean; - function IsValueGrayedStored: Boolean; - function IsValueUncheckedStored: Boolean; - procedure ReadCaption(Reader: TReader); // obsolete - procedure SetAlignment(Value: TAlignment); - procedure SetCaption(const Value: TCaption); // obsolete - procedure SetFullFocusRect(Value: Boolean); - procedure SetGlyph(Value: TBitmap); - procedure SetGlyphCount(Value: Integer); - procedure SetMultiLine(Value: Boolean); - procedure SetNullStyle(Value: TcxCheckBoxNullValueShowingStyle); - procedure SetStateValues(const AValueChecked, AValueGrayed, AValueUnchecked: TcxEditValue); - procedure SetUseAlignmentWhenInplace(Value: Boolean); - procedure SetValueChecked(const Value: TcxEditValue); - procedure SetValueGrayed(const Value: TcxEditValue); - procedure SetValueUnchecked(const Value: TcxEditValue); - protected - function CanValidate: Boolean; override; - procedure DefineProperties(Filer: TFiler); override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function HasDisplayValue: Boolean; override; - function CheckValue(const AValue: TcxEditValue): Boolean; - function GetState(const AEditValue: TcxEditValue): TcxCheckBoxState; - function InternalGetGlyph: TBitmap; virtual; - function IsEmbeddedEdit: Boolean; virtual; - property InternalAlignment: TcxEditAlignment read GetInternalAlignment; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CanCompareEditValue: Boolean; override; - function CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; override; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - class function GetStyleClass: TcxCustomEditStyleClass; override; - function GetSpecialFeatures: TcxEditSpecialFeatures; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsActivationKey(AKey: Char): Boolean; override; - function IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - function IsResetEditClass: Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - // !!! - property Alignment: TAlignment read GetAlignment write SetAlignment - stored IsAlignmentStored; -// property AlignmentVert: TcxAlignmentVert read GetAlignmentVert -// write SetAlignmentVert stored IsAlignmentVertStored; - property AllowGrayed: Boolean read FAllowGrayed write FAllowGrayed default False; - property Caption: TCaption read FCaption write SetCaption stored False; // obsolete - property DisplayChecked: WideString read FDisplayChecked write FDisplayChecked - stored IsDisplayCheckedStored; - property DisplayGrayed: WideString read FDisplayGrayed write FDisplayGrayed - stored IsDisplayGrayedStored; - property DisplayUnchecked: WideString read FDisplayUnchecked write FDisplayUnchecked - stored IsDisplayUncheckedStored; - property FullFocusRect: Boolean read FFullFocusRect write SetFullFocusRect default False; - property Glyph: TBitmap read GetGlyph write SetGlyph; - property GlyphCount: Integer read FGlyphCount write SetGlyphCount default 6; - property MultiLine: Boolean read FMultiLine write SetMultiLine default False; - property NullStyle: TcxCheckBoxNullValueShowingStyle read FNullStyle write - SetNullStyle default nssGrayedChecked; - property UseAlignmentWhenInplace: Boolean read FUseAlignmentWhenInplace - write SetUseAlignmentWhenInplace default False; - property ValueChecked: TcxEditValue read FValueChecked write SetValueChecked - stored IsValueCheckedStored; - property ValueGrayed: TcxEditValue read FValueGrayed write SetValueGrayed - stored IsValueGrayedStored; - property ValueUnchecked: TcxEditValue read FValueUnchecked write SetValueUnchecked - stored IsValueUncheckedStored; - end; - - { TcxCheckBoxProperties } - - TcxCheckBoxProperties = class(TcxCustomCheckBoxProperties) - published - property Alignment; - property AllowGrayed; - property AssignedValues; - property Caption; // obsolete - property ClearKey; - property DisplayChecked; - property DisplayUnchecked; - property DisplayGrayed; - property FullFocusRect; - property Glyph; - property GlyphCount; - property ImmediatePost; - property MultiLine; - property NullStyle; - property ReadOnly; - property UseAlignmentWhenInplace; - property ValueChecked; - property ValueGrayed; - property ValueUnchecked; - property OnChange; - property OnEditValueChanged; - property OnValidate; - end; - - { TcxCustomCheckBox } - - TcxCustomCheckBox = class(TcxCustomEdit) - private - FIsCheckPressed: Boolean; - FIsLoaded: Boolean; - FIsLoadingStateAssigned: Boolean; - FLoadingState: TcxCheckBoxState; - function GetChecked: Boolean; - function GetProperties: TcxCustomCheckBoxProperties; - function GetActiveProperties: TcxCustomCheckBoxProperties; - function GetState: TcxCheckBoxState; - function GetStyle: TcxCheckBoxStyle; - function GetViewInfo: TcxCustomCheckBoxViewInfo; - function IsStateStored: Boolean; - procedure SetChecked(Value: Boolean); - procedure SetProperties(Value: TcxCustomCheckBoxProperties); - procedure SetState(Value: TcxCheckBoxState); - procedure SetStyle(Value: TcxCheckBoxStyle); - procedure WMLButtonUp(var Message: TWMLButtonUp); message WM_LBUTTONUP; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - procedure CMParentColorChanged(var Message: TMessage); message CM_PARENTCOLORCHANGED; - protected - procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override; - function CanHaveTransparentBorder: Boolean; override; - function DefaultParentColor: Boolean; override; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); override; - procedure DoEditKeyPress(var Key: Char); override; - procedure DoEditKeyUp(var Key: Word; Shift: TShiftState); override; - procedure DoExit; override; - procedure FillSizeProperties(var AEditSizeProperties: TcxEditSizeProperties); override; - function GetActionLinkClass: TControlActionLinkClass; override; - function GetEditStateColorKind: TcxEditStateColorKind; override; - function GetShadowBounds: TRect; override; - procedure Initialize; override; - function InternalGetNotPublishedStyleValues: TcxEditStyleValues; override; - procedure InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); override; - function IsClickEnabledDuringLoading: Boolean; override; - function IsNativeBackground: Boolean; override; - procedure Loaded; override; - procedure ProcessViewInfoChanges(APrevViewInfo: TcxCustomEditViewInfo; - AIsMouseDownUpEvent: Boolean); override; - procedure PropertiesChanged(Sender: TObject); override; - procedure TextChanged; override; - procedure InvalidateCheckRect; - procedure Toggle; virtual; - property Caption; - property Checked: Boolean read GetChecked write SetChecked stored False; - property ViewInfo: TcxCustomCheckBoxViewInfo read GetViewInfo; - public - procedure Clear; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - property ActiveProperties: TcxCustomCheckBoxProperties read GetActiveProperties; - property Properties: TcxCustomCheckBoxProperties read GetProperties - write SetProperties; - property State: TcxCheckBoxState read GetState write SetState - stored IsStateStored default cbsUnchecked; - property Style: TcxCheckBoxStyle read GetStyle write SetStyle; - property Transparent; - end; - - { TcxCheckBox } - - TcxCheckBox = class(TcxCustomCheckBox) - private - function GetActiveProperties: TcxCheckBoxProperties; - function GetProperties: TcxCheckBoxProperties; - procedure SetProperties(Value: TcxCheckBoxProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCheckBoxProperties read GetActiveProperties; - published - property Action; - property Align; - property Anchors; - property AutoSize; - property Caption; - property Checked; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ParentBackground; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxCheckBoxProperties read GetProperties - write SetProperties; - property ShowHint; - property State; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnClick; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxFilterCheckBoxHelper } - - TcxFilterCheckBoxHelper = class(TcxFilterComboBoxHelper) - public - class procedure GetFilterValue(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties; var V: Variant; var S: TCaption); override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - class procedure SetFilterValue(AEdit: TcxCustomEdit; AEditProperties: TcxCustomEditProperties; - AValue: Variant); override; - class function UseDisplayValue: Boolean; override; - end; - - { TcxCheckBoxActionLink } - - TcxCheckBoxActionLink = class(TWinControlActionLink) - protected - FClient: TcxCustomCheckBox; - procedure AssignClient(AClient: TObject); override; - function IsCheckedLinked: Boolean; override; - procedure SetChecked(Value: Boolean); override; - procedure InternalSetChecked(Value: Boolean); - end; - -var - CheckStates: TcxCheckStates = nil; - -function CalculateCheckStatesValue(const ACheckStates: TcxCheckStates; - AItems: IcxCheckItems; AValueFormat: TcxCheckStatesValueFormat): TcxEditValue; -function CalculateCheckStates(const AValue: TcxEditValue; - AItems: IcxCheckItems; AValueFormat: TcxCheckStatesValueFormat; - var ACheckStates: TcxCheckStates): Boolean; -procedure DrawEditCheck(ACanvas: TcxCanvas; const ACheckRect: TRect; - AState: TcxCheckBoxState; ACheckState: TcxEditCheckState; AGlyph: TBitmap; - AGlyphCount: Integer; ABorderStyle: TcxEditCheckBoxBorderStyle; - ANativeStyle: Boolean; ABorderColor: TColor; ABackgroundColor: TColor; - ADrawBackground, AIsDesigning, AFocused, ASupportGrayed: Boolean; - APainter: TcxCustomLookAndFeelPainterClass; - AGrayedShowingStyle: TcxCheckBoxNullValueShowingStyle = nssGrayedChecked); -function GetEditCheckBorderOffset(ACheckBorderStyle: TcxContainerBorderStyle; - ANativeStyle, AHasGlyph: Boolean; APainter: TcxCustomLookAndFeelPainterClass): Integer; overload; -function GetEditCheckBorderOffset(ACheckBorderStyle: TcxEditBorderStyle; - ANativeStyle, AHasGlyph: Boolean; APainter: TcxCustomLookAndFeelPainterClass): Integer; overload; -function GetEditCheckBorderOffset(ALookAndFeelKind: TcxLookAndFeelKind; - ANativeStyle, AHasGlyph: Boolean; APainter: TcxCustomLookAndFeelPainterClass): Integer; overload; -function GetEditCheckGlyphIndex(AState: TcxCheckBoxState; - ACheckState: TcxEditCheckState; ASupportGrayed: Boolean; - AGlyphCount: Integer): Integer; -function GetEditCheckSize(ACanvas: TcxCanvas; ANativeStyle: Boolean; - AGlyph: TBitmap; AGlyphCount: Integer; APainter: TcxCustomLookAndFeelPainterClass): TSize; - -procedure DrawCheckBoxText(ACanvas: TcxCanvas; AText: string; AFont: TFont; - ATextColor: TColor; ATextRect: TRect; ADrawTextFlags: Integer; AEnabled: Boolean); - -implementation - -uses - Math, ActnList, cxGeometry, dxThemeConsts, dxThemeManager, dxUxTheme, cxEditConsts, - cxEditPaintUtils, cxDrawTextUtils, cxEditUtils; - -var - FCheckMask: TBitmap; - -procedure PrepareCheckMask; - - procedure InternalPrepareCheckMask(AButtonsBitmap: HBITMAP); - var - AMemDC: HDC; - APrevBitmap: HBITMAP; - I, J: Integer; - begin - FCheckMask := TBitmap.Create; - with TcxCustomLookAndFeelPainter do - begin - FCheckMask.Width := CheckButtonSize.cx; - FCheckMask.Height := CheckButtonSize.cy; - end; - - AMemDC := CreateCompatibleDC(0); - APrevBitmap := 0; - try - APrevBitmap := SelectObject(AMemDC, AButtonsBitmap); - with FCheckMask.Canvas do - for I := 0 to FCheckMask.Height - 1 do - for J := 0 to FCheckMask.Width - 1 do - if Windows.GetPixel(AMemDC, J, I) = Windows.GetPixel(AMemDC, J + FCheckMask.Width, I) then - Pixels[J, I] := clWhite - else - Pixels[J, I] := 0; - finally - if APrevBitmap <> 0 then - SelectObject(AMemDC, APrevBitmap); - DeleteDC(AMemDC); - end; - end; - -var - AButtonsBitmap: HBITMAP; -begin - AButtonsBitmap := LoadBitmap(0, PChar(OBM_CHECKBOXES)); - try - InternalPrepareCheckMask(AButtonsBitmap); - finally - DeleteObject(AButtonsBitmap); - end; -end; - -procedure CalculateCheckBoxViewInfo(AViewData: TcxCustomCheckBoxViewData; AViewInfo: - TcxCustomCheckBoxViewInfo; AIsMouseEvent: Boolean); -begin - with AViewInfo do - begin - AViewData.CalculateViewInfo(AViewInfo, AIsMouseEvent); - TextRect := ClientRect; - ExtendRect(TextRect, GetTextEditDrawTextOffset(AViewData)); - end; -end; - -function CalculateCheckStatesValue(const ACheckStates: TcxCheckStates; - AItems: IcxCheckItems; AValueFormat: TcxCheckStatesValueFormat): TcxEditValue; - - function CalculateCaptionsValue: TcxEditValue; - var - ACheckedCaptions, AGrayedCaptions: string; - I: Integer; - begin - ACheckedCaptions := ''; - AGrayedCaptions := ''; - for I := 0 to Length(ACheckStates) - 1 do - begin - if ACheckStates[I] <> cbsUnchecked then - if ACheckStates[I] = cbsGrayed then - AGrayedCaptions := AGrayedCaptions + - IntToStr(Length(AItems.Captions[I])) + ':' + AItems.Captions[I] - else - ACheckedCaptions := ACheckedCaptions + - IntToStr(Length(AItems.Captions[I])) + ':' + AItems.Captions[I]; - end; - Result := AGrayedCaptions; - if Length(ACheckedCaptions) > 0 then - Result := Result + ';' + ACheckedCaptions; - end; - - function CalculateIndicesValue: TcxEditValue; - var - ACheckedCaptions, AGrayedCaptions: string; - I: Integer; - begin - ACheckedCaptions := ''; - AGrayedCaptions := ''; - for I := 0 to Length(ACheckStates) - 1 do - if ACheckStates[I] <> cbsUnchecked then - if ACheckStates[I] = cbsGrayed then - begin - if AGrayedCaptions <> '' then - AGrayedCaptions := AGrayedCaptions + ','; - AGrayedCaptions := AGrayedCaptions + IntToStr(I); - end - else - begin - if ACheckedCaptions <> '' then - ACheckedCaptions := ACheckedCaptions + ','; - ACheckedCaptions := ACheckedCaptions + IntToStr(I); - end; - Result := AGrayedCaptions; - if Length(ACheckedCaptions) > 0 then - Result := Result + ';' + ACheckedCaptions; - end; - - function CalculateStatesIntegerValue: TcxEditValue; - var - V: {$IFDEF DELPHI6}Int64{$ELSE}Integer{$ENDIF}; - I, L: Integer; - begin - V := 0; - L := Length(ACheckStates); - if L > SizeOf({$IFDEF DELPHI6}Int64{$ELSE}Integer{$ENDIF}) * 8 then - L := SizeOf({$IFDEF DELPHI6}Int64{$ELSE}Integer{$ENDIF}) * 8; - for I := L - 1 downto 0 do - begin - V := V shl 1; - V := V + {$IFDEF DELPHI6}Int64{$ELSE}Integer{$ENDIF}(ACheckStates[I] = cbsChecked); - end; - Result := V; - VarCast(Result, Result, {$IFDEF DELPHI6}varInt64{$ELSE}varInteger{$ENDIF}); - end; - - function CalculateStatesStringValue: TcxEditValue; - var - I: Integer; - S: string; - begin - SetLength(S, Length(ACheckStates)); - for I := 0 to High(ACheckStates) do - S[I + 1] := Char(Integer(ACheckStates[I]) + Ord('0')); - Result := S; - end; - -begin - Result := Null; - case AValueFormat of - cvfCaptions: - Result := CalculateCaptionsValue; - cvfIndices: - Result := CalculateIndicesValue; - cvfInteger: - Result := CalculateStatesIntegerValue; - cvfStatesString: - Result := CalculateStatesStringValue; - end; -end; - -function CalculateCheckStates(const AValue: TcxEditValue; - AItems: IcxCheckItems; AValueFormat: TcxCheckStatesValueFormat; - var ACheckStates: TcxCheckStates): Boolean; - - function GetNumber(var ANumber, AIndex: Integer; - const S: string): Boolean; - - function IsDigit(C: Char): Boolean; - begin - Result := (C >= '0') and (C <= '9'); - end; - - const - AMaxLength = MaxInt div 10; - AMaxIntLastDigit = MaxInt mod 10; - var - L: Integer; - D: Integer; - begin - Result := False; - L := Length(S); - if (AIndex > L) or not IsDigit(S[AIndex]) then - Exit; - - ANumber := 0; - repeat - D := StrToInt(S[AIndex]); - if (ANumber > AMaxLength) or - ((ANumber = AMaxLength) and (D > AMaxIntLastDigit)) then - Exit; - ANumber := ANumber * 10 + D; - Inc(AIndex); - until (AIndex > L) or not IsDigit(S[AIndex]); - Result := True; - end; - - function CalculateItemsByCaptionsValue: Boolean; - - function GetCaptions(ACaptions: TStringList): Boolean; - var - S: string; - ACaptionLength, AIndex, AValueLength: Integer; - AChecked: Boolean; - begin - S := VarToStr(AValue); - Result := S = ''; - if Result then - Exit; - - Result := False; - AChecked := False; - AValueLength := Length(S); - AIndex := 1; - repeat - if (S[AIndex] = ';') and not AChecked then - begin - AChecked := True; - Inc(AIndex); - end; - if not GetNumber(ACaptionLength, AIndex, S) then - Exit; - if (AIndex > AValueLength) or (S[AIndex] <> ':') then - Exit; - Inc(AIndex); - if AIndex + ACaptionLength - 1 > AValueLength then - Exit; - ACaptions.AddObject(Copy(S, AIndex, ACaptionLength), - Pointer(AChecked)); - Inc(AIndex, ACaptionLength); - if AIndex > AValueLength then - Break; - until (AIndex > AValueLength); - Result := True; - end; - - function CalculateStates(ACaptions: TStringList): Boolean; - var - AIndex, I: Integer; - begin - for I := 0 to AItems.Count - 1 do - begin - AIndex := ACaptions.IndexOf(AItems.Captions[I]); - if AIndex = -1 then - ACheckStates[I] := cbsUnchecked - else - begin - if Boolean(ACaptions.Objects[AIndex]) then - ACheckStates[I] := cbsChecked - else - ACheckStates[I] := cbsGrayed; - ACaptions.Delete(AIndex); - end; - end; - Result := ACaptions.Count = 0; - end; - - var - ACaptions: TStringList; - begin - if not(VarIsNull(AValue) or VarIsStr(AValue)) then - begin - Result := False; - Exit; - end; - ACaptions := TStringList.Create; - try - Result := GetCaptions(ACaptions); - if not Result then - Exit; - ACaptions.Sort; - Result := CalculateStates(ACaptions); - finally - FreeAndNil(ACaptions); - end; - end; - - procedure SetStatesToUnchecked; - var - I: Integer; - begin - for I := 0 to AItems.Count - 1 do - ACheckStates[I] := cbsUnchecked; - end; - - function CalculateItemsByIndicesValue: Boolean; - var - AChecked: Boolean; - AIndex, AItemIndex, L: Integer; - S: string; - begin - Result := VarIsNull(AValue) or VarIsStr(AValue); - if not Result then - Exit; - - S := VarToStr(AValue); - SetStatesToUnchecked; - if S = '' then - Exit; - - Result := False; - AIndex := 1; - L := Length(S); - AChecked := False; - repeat - if (S[AIndex] = ';') and not AChecked then - begin - AChecked := True; - Inc(AIndex); - end; - if not GetNumber(AItemIndex, AIndex, S) or (AItemIndex >= AItems.Count) then - Exit; - if AChecked then - ACheckStates[AItemIndex] := cbsChecked - else - ACheckStates[AItemIndex] := cbsGrayed; - if AIndex > L then - Break; - if S[AIndex] = ',' then - Inc(AIndex); - until AIndex > L; - Result := True; - end; - - function CalculateItemsByStatesIntegerValue: Boolean; - var - V: {$IFDEF DELPHI6}Int64{$ELSE}Integer{$ENDIF}; - I, ACode: Integer; - begin - Result := VarIsNumericEx(AValue) or VarIsStr(AValue) or VarIsDate(AValue) or - VarIsNull(AValue); - if Result then - begin - if VarIsNull(AValue) then - V := 0 - else - if VarIsStr(AValue) then - begin - Val(AValue, V, ACode); - Result := ACode = 0; - if not Result then - Exit; - end - else - V := VarAsType(AValue, {$IFDEF DELPHI6}varInt64{$ELSE}varInteger{$ENDIF}); - for I := 0 to AItems.Count - 1 do - begin - if V and 1 = 0 then - ACheckStates[I] := cbsUnchecked - else - ACheckStates[I] := cbsChecked; - V := V shr 1; - end; - end - end; - - function CalculateItemsByStatesStringValue: Boolean; - var - AItemCount, I: Integer; - S: string; - begin - Result := VarIsNull(AValue) or VarIsStr(AValue); - if not Result then - Exit; - - Result := False; - S := VarToStr(AValue); - AItemCount := Length(S); - if AItemCount > AItems.Count then - AItemCount := AItems.Count; - for I := 1 to AItemCount do - if (S[I] < '0') or (S[I] > '2') then - Exit - else - ACheckStates[I - 1] := TcxCheckBoxState(Ord(S[I]) - Ord('0')); - if AItemCount < AItems.Count then - for I := AItemCount to AItems.Count - 1 do - ACheckStates[I] := cbsUnchecked; - Result := True; - end; - -var - I: Integer; -begin - SetLength(ACheckStates, AItems.Count); - - case AValueFormat of - cvfCaptions: - Result := CalculateItemsByCaptionsValue; - cvfIndices: - Result := CalculateItemsByIndicesValue; - cvfInteger: - Result := CalculateItemsByStatesIntegerValue; - cvfStatesString: - Result := CalculateItemsByStatesStringValue; - else - Result := False; - end; - - if not Result then - for I := 0 to AItems.Count - 1 do - ACheckStates[I] := cbsUnchecked; -end; - -procedure CalculateCustomCheckBoxViewInfo(ACanvas: TcxCanvas; AViewData: TcxCustomCheckBoxViewData; - AViewInfo: TcxCustomCheckBoxViewInfo); - - procedure CheckFocusRectBounds; - var - AMaxRect: TRect; - begin - with AViewInfo do - begin - if Alignment = taCenter then - AMaxRect := Rect(FocusRect.Left, ClientRect.Top, FocusRect.Right, ClientRect.Bottom) - else - begin - AMaxRect := Rect(TextRect.Left - 1, TextRect.Top - 1 + 2 * Integer(IsInplace), - TextRect.Right + 1, TextRect.Bottom + 1 - 2 * Integer(IsInplace)); - if AMaxRect.Right > BorderRect.Right - 1 then - AMaxRect.Right := BorderRect.Right - 1; - end; - - if FocusRect.Left < AMaxRect.Left then - FocusRect.Left := AMaxRect.Left; - if FocusRect.Top < AMaxRect.Top then - FocusRect.Top := AMaxRect.Top; - if FocusRect.Right > AMaxRect.Right then - FocusRect.Right := AMaxRect.Right; - if FocusRect.Bottom > AMaxRect.Bottom then - FocusRect.Bottom := AMaxRect.Bottom; - end; - end; - -begin - with AViewInfo do - begin - BackgroundColor := AViewData.Style.Color; - - if Focused and ((not IsInplace or AViewData.Properties.IsEmbeddedEdit) and (Alignment <> taCenter) or - IsInplace and (Alignment = taCenter) and (epoShowFocusRectWhenInplace in PaintOptions)) then - begin - if Alignment = taCenter then - begin - FocusRect := ClientRect; - InflateRect(FocusRect, -1, -1); - end - else - if Length(Text) <> 0 then - begin - FocusRect := TextRect; - if not AViewData.Properties.FullFocusRect then - begin - ACanvas.Font := Font; - ACanvas.TextExtent(Text, FocusRect, DrawTextFlags); - end; - InflateRect(FocusRect, 1, 1); - Inc(FocusRect.Bottom); - end - else - FocusRect := cxEmptyRect; - end - else - FocusRect := cxEmptyRect; - if not IsRectEmpty(FocusRect) then - CheckFocusRectBounds; - end; -end; - -procedure DrawCheckBoxText(ACanvas: TcxCanvas; AText: string; AFont: TFont; - ATextColor: TColor; ATextRect: TRect; ADrawTextFlags: Integer; AEnabled: Boolean); -begin - ACanvas.Font := AFont; - ACanvas.Font.Color := ATextColor; - ACanvas.Brush.Style := bsClear; - ACanvas.DrawText(AText, ATextRect, ADrawTextFlags, AEnabled); - ACanvas.Brush.Style := bsSolid; -end; - -function IsGlyphValid(AGlyph: TBitmap; AGlyphCount: Integer): Boolean; -begin - Result := (AGlyphCount > 0) and VerifyBitmap(AGlyph); -end; - -function GetCheckNativeState(AState: TcxCheckBoxState; ACheckState: TcxEditCheckState): Integer; -const - ANativeCheckStateMap: array[TcxCheckBoxState, TcxEditCheckState] of Integer = ( - (CBS_UNCHECKEDNORMAL, CBS_UNCHECKEDHOT, CBS_UNCHECKEDPRESSED, CBS_UNCHECKEDDISABLED), - (CBS_CHECKEDNORMAL, CBS_CHECKEDHOT, CBS_CHECKEDPRESSED, CBS_CHECKEDDISABLED), - (CBS_MIXEDNORMAL, CBS_MIXEDHOT, CBS_MIXEDPRESSED, CBS_MIXEDDISABLED) - ); -begin - Result := ANativeCheckStateMap[AState, ACheckState]; -end; - -procedure DrawCustomCheckBox(ACanvas: TcxCanvas; AViewInfo: TcxCustomCheckBoxViewInfo); overload; -var - AIsBackgroundTransparent: Boolean; - ACheckRect: TRect; - ACheckTransparent: Boolean; -begin - AIsBackgroundTransparent := AViewInfo.IsBackgroundTransparent; - -// ACanvas.Brush.Color := AViewInfo.BackgroundColor; // to fix problem with DC color after RestoreDC - - ACheckRect := AViewInfo.CheckBoxRect; - InflateRect(ACheckRect, -AViewInfo.CheckBorderOffset, -AViewInfo.CheckBorderOffset); - - ACheckTransparent := AIsBackgroundTransparent and - (Assigned(AViewInfo.Painter) or AViewInfo.HasGlyph or - AViewInfo.NativeStyle and IsThemeBackgroundPartiallyTransparent( - OpenTheme(totButton), BP_CHECKBOX, GetCheckNativeState(AViewInfo.State, AViewInfo.CheckBoxState))); - - AViewInfo.DrawEditBackground(ACanvas, AViewInfo.Bounds, ACheckRect, ACheckTransparent); - - DrawEditCheck(ACanvas, AViewInfo.CheckBoxRect, AViewInfo.State, AViewInfo.CheckBoxState, - AViewInfo.CheckBoxGlyph, AViewInfo.CheckBoxGlyphCount, - AViewInfo.CheckBoxBorderStyle, AViewInfo.NativeStyle, - AViewInfo.BorderColor, AViewInfo.BackgroundColor, not AIsBackgroundTransparent, - AViewInfo.IsDesigning, AViewInfo.Focused, True, AViewInfo.Painter, - AViewInfo.NullValueShowingStyle); - - if AViewInfo.Alignment <> taCenter then - DrawCheckBoxText(ACanvas, AViewInfo.Text, AViewInfo.Font, AViewInfo.TextColor, - AViewInfo.TextRect, AViewInfo.DrawTextFlags, AViewInfo.IsTextEnabled); - if not IsRectEmpty(AViewInfo.FocusRect) then - ACanvas.DrawFocusRect(AViewInfo.FocusRect); -end; - -procedure DrawEditCheck(ACanvas: TcxCanvas; const ACheckRect: TRect; - AState: TcxCheckBoxState; ACheckState: TcxEditCheckState; AGlyph: TBitmap; - AGlyphCount: Integer; ABorderStyle: TcxEditCheckBoxBorderStyle; - ANativeStyle: Boolean; ABorderColor: TColor; ABackgroundColor: TColor; - ADrawBackground, AIsDesigning, AFocused, ASupportGrayed: Boolean; - APainter: TcxCustomLookAndFeelPainterClass; - AGrayedShowingStyle: TcxCheckBoxNullValueShowingStyle = nssGrayedChecked); -const - CheckState2ButtonState: array[TcxEditCheckState] of TcxButtonState = - (cxbsNormal, cxbsHot, cxbsPressed, cxbsDisabled); - - procedure DrawCheckBoxGlyph; - var - ABitmap: TBitmap; - AGlyphIndex: Integer; - R: TRect; - begin - AGlyphIndex := GetEditCheckGlyphIndex(AState, ACheckState, ASupportGrayed, - AGlyphCount); - ABitmap := TBitmap.Create; - try - ABitmap.Assign(AGlyph); - ABitmap.Height := ACheckRect.Bottom - ACheckRect.Top; - ABitmap.Width := ACheckRect.Right - ACheckRect.Left; - - R.Left := (AGlyph.Width div AGlyphCount) * AGlyphIndex; - R.Right := R.Left + ABitmap.Width; - R.Top := (AGlyph.Height - ABitmap.Height) div 2; - R.Bottom := R.Top + ABitmap.Height; - - ABitmap.Canvas.CopyRect(Rect(0, 0, ABitmap.Width, ABitmap.Height), - AGlyph.Canvas, R); - DrawGlyph(ACanvas, ACheckRect.Left, ACheckRect.Top, ABitmap, - ACheckState <> ecsDisabled, ColorToRGB(ABackgroundColor)); - finally - ABitmap.Free; - end; - end; - - procedure DrawCheckBoxBorder; - const - ACheckBoxStateToButtonStateMap: array [TcxEditCheckState] of TcxButtonState = - (cxbsNormal, cxbsHot, cxbsPressed, cxbsDisabled); - var - ACheckBorderOffset: Integer; - R: TRect; - begin - if ANativeStyle then - begin - DrawThemeBackground(OpenTheme(totButton), ACanvas.Handle, BP_CHECKBOX, - GetCheckNativeState(AState, ACheckState), ACheckRect); - Exit; - end; - - R := ACheckRect; - ACheckBorderOffset := GetEditCheckBorderOffset(ABorderStyle, False, False, APainter); - - if ADrawBackground and (ACheckBorderOffset > 0) then - ACanvas.FrameRect(R, ABackgroundColor, ACheckBorderOffset); - InflateRect(R, -ACheckBorderOffset, -ACheckBorderOffset); - with ACanvas do - begin - case ABorderStyle of - ebsSingle: - FrameRect(R, ABorderColor); - ebsThick: - FrameRect(R, ABorderColor, 2); - ebsFlat: - begin - DrawEdge(R, True, True, cxBordersAll); - InflateRect(R, -1, -1); - FrameRect(R, clBtnFace); - end; - ebs3D: - begin - DrawEdge(R, True, True, cxBordersAll); - InflateRect(R, -1, -1); - DrawComplexFrame(R, cl3DDkShadow, cl3DLight, cxBordersAll); - end; - ebsUltraFlat, ebsOffice11: - begin - if (ABorderStyle = ebsOffice11) and (ACheckState = ecsNormal) and - not AIsDesigning and not AFocused then - ABorderColor := clBtnText - else - if (ACheckState in [ecsHot, ecsPressed]) or - AIsDesigning and (ACheckState <> ecsDisabled) or - (ACheckState = ecsNormal) and AFocused then - ABorderColor := GetEditBorderHighlightColor( - ABorderStyle = ebsOffice11) - else - ABorderColor := clBtnShadow; - FrameRect(R, ABorderColor); - end; - end; - end; - end; - - procedure DrawCheck(R: TRect; AColor: TColor); - const - ROP_PSDPxax = $B8074A; - var - APrevClipRgn: TcxRegion; - begin - APrevClipRgn := ACanvas.GetClipRegion; - try - ACanvas.SetClipRegion(TcxRegion.Create(R), roIntersect); - InflateRect(R, cxEditMaxCheckBoxBorderWidth, cxEditMaxCheckBoxBorderWidth); - ACanvas.Brush.Color := AColor; - BitBlt(ACanvas.Handle, R.Left, R.Top, FCheckMask.Width, FCheckMask.Height, - FCheckMask.Canvas.Handle, 0, 0, ROP_PSDPxax); - finally - ACanvas.SetClipRegion(APrevClipRgn, roSet); - end; - end; - - function GetCheckBoxContentColor: TColor; - const - AColors: array[TcxEditCheckState] of TColor = - (clWindow, clWindow, clBtnFace, clBtnFace); - begin - if ABorderStyle in [ebsUltraFlat, ebsOffice11] then - case ACheckState of - ecsNormal: - if (AState = cbsGrayed) and (AGrayedShowingStyle = nssInactive) then - Result := clBtnFace - else - Result := clWindow; - ecsHot, ecsPressed: - Result := GetEditButtonHighlightColor( - ACheckState = ecsPressed, - ABorderStyle = ebsOffice11); - else - Result := clBtnFace; - end - else - if (AState = cbsGrayed) and (AGrayedShowingStyle = nssInactive) then - Result := clBtnFace - else - Result := AColors[ACheckState]; - end; - - procedure InternalDrawCheckBoxContent(AContentRect: TRect); - const - AButtonStateMap: array [TcxEditCheckState] of TcxButtonState = - (cxbsNormal, cxbsHot, cxbsPressed, cxbsDisabled); - var - ACheckColor: TColor; - begin - cxEditFillRect(ACanvas.Handle, AContentRect, - GetSolidBrush(GetCheckBoxContentColor)); - if (AState = cbsUnchecked) or - (AState = cbsGrayed) and (AGrayedShowingStyle <> nssGrayedChecked) then - Exit; - if (ACheckState = ecsDisabled) or (AState = cbsGrayed) then - ACheckColor := clBtnShadow - else - ACheckColor := clBtnText; - DrawCheck(AContentRect, ACheckColor); - end; - - procedure DrawWindowsCheckBoxContent(AContentRect: TRect); - const - ABorder3DStyleMap: array [Boolean] of Integer = (DFCS_FLAT, 0); - AGrayedShowingStyleMap: array [TcxCheckBoxNullValueShowingStyle] of Integer = - (0, DFCS_INACTIVE, DFCS_CHECKED); - var - AClipRgnExists: Boolean; - AFlags: Integer; - APrevClipRgn: HRGN; - begin - if ACheckState = ecsDisabled then - begin - AFlags := DFCS_BUTTON3STATE or DFCS_PUSHED; - if (AState = cbsUnchecked) or ((AState = cbsGrayed) and (AGrayedShowingStyle <> nssGrayedChecked)) then - AFlags := AFlags or DFCS_INACTIVE - else - AFlags := AFlags or DFCS_CHECKED; - end - else - begin - AFlags := 0; - case AState of - cbsGrayed: - AFlags := DFCS_BUTTON3STATE or - AGrayedShowingStyleMap[AGrayedShowingStyle]; - cbsChecked: - AFlags := DFCS_CHECKED; - end; - if ACheckState = ecsPressed then - AFlags := AFlags or DFCS_PUSHED; - end; - - APrevClipRgn := CreateRectRgn(0, 0, 0, 0); - AClipRgnExists := GetClipRgn(ACanvas.Handle, APrevClipRgn) = 1; - with AContentRect do - IntersectClipRect(ACanvas.Handle, Left, Top, Right, Bottom); - InflateRect(AContentRect, cxEditMaxCheckBoxBorderWidth, cxEditMaxCheckBoxBorderWidth); - - DrawFrameControl(ACanvas.Handle, AContentRect, DFC_BUTTON, DFCS_BUTTONCHECK or AFlags or ABorder3DStyleMap[ABorderStyle = ebs3D]); - - if AClipRgnExists then - SelectClipRgn(ACanvas.Handle, APrevClipRgn) - else - SelectClipRgn(ACanvas.Handle, 0); - DeleteObject(APrevClipRgn); - end; - - procedure DrawCheckBoxContent; - var - ACheckBoxBorderWidth: Integer; - R: TRect; - begin - if ANativeStyle then - Exit; - - ACheckBoxBorderWidth := cxEditMaxCheckBoxBorderWidth; - R := ACheckRect; - InflateRect(R, -ACheckBoxBorderWidth, -ACheckBoxBorderWidth); - - if ABorderStyle in [ebsUltraFlat, ebsOffice11] then - InternalDrawCheckBoxContent(R) - else - DrawWindowsCheckBoxContent(R); - end; - -begin - if not ADrawBackground then - ABackgroundColor := clNone; - if (AState = cbsGrayed) and (AGrayedShowingStyle = nssUnchecked) then - AState := cbsUnchecked; - - if IsGlyphValid(AGlyph, AGlyphCount) then - DrawCheckBoxGlyph - else - begin - if APainter <> nil then - begin - if ADrawBackground then - ACanvas.FillRect(ACheckRect, ABackgroundColor); - APainter.DrawCheckButton(ACanvas, ACheckRect, - CheckState2ButtonState[ACheckState], AState); - end - else - begin - DrawCheckBoxBorder; - DrawCheckBoxContent; - end; - end; -end; - -function GetEditCheckBorderOffset(ACheckBorderStyle: TcxContainerBorderStyle; - ANativeStyle, AHasGlyph: Boolean; APainter: TcxCustomLookAndFeelPainterClass): Integer; -begin - if ANativeStyle or AHasGlyph or (APainter <> nil) then - Result := 0 - else - Result := cxContainerMaxBorderWidth - GetContainerBorderWidth(ACheckBorderStyle); -end; - -function GetEditCheckBorderOffset(ACheckBorderStyle: TcxEditBorderStyle; - ANativeStyle, AHasGlyph: Boolean; APainter: TcxCustomLookAndFeelPainterClass): Integer; overload; -begin - Result := GetEditCheckBorderOffset( - TcxContainerBorderStyle(ACheckBorderStyle), ANativeStyle, AHasGlyph, APainter); -end; - -function GetEditCheckBorderOffset(ALookAndFeelKind: TcxLookAndFeelKind; - ANativeStyle, AHasGlyph: Boolean; APainter: TcxCustomLookAndFeelPainterClass): Integer; -begin - if ANativeStyle or AHasGlyph or (APainter <> nil) then - Result := 0 - else - Result := cxContainerMaxBorderWidth - GetContainerBorderWidth(ALookAndFeelKind); -end; - -function GetEditCheckGlyphIndex(AState: TcxCheckBoxState; - ACheckState: TcxEditCheckState; ASupportGrayed: Boolean; - AGlyphCount: Integer): Integer; -var - AStateCount: Integer; -begin - AStateCount := Integer(High(TcxCheckBoxState)) - - Integer(Low(TcxCheckBoxState)) + 1; - if not ASupportGrayed and (AGlyphCount mod 3 <> 0) and (AGlyphCount mod 2 = 0) then - Dec(AStateCount); - case AState of - cbsUnchecked: - Result := 0; - cbsChecked: - Result := 1; - else - Result := 2; - end; - if ACheckState = ecsPressed then - Inc(Result, AStateCount); - if (Result >= AGlyphCount) and (Result > AStateCount - 1) then - Result := Result mod AStateCount; -end; - -function GetEditCheckSize(ACanvas: TcxCanvas; ANativeStyle: Boolean; - AGlyph: TBitmap; AGlyphCount: Integer; APainter: TcxCustomLookAndFeelPainterClass): TSize; -var - AHasGlyph: Boolean; -begin - AHasGlyph := IsGlyphValid(AGlyph, AGlyphCount); - if AHasGlyph then - begin - Result.cx := AGlyph.Width div AGlyphCount; - Result.cy := AGlyph.Height; - end - else - if APainter <> nil then - Result := APainter.CheckButtonSize - else - if AreVisualStylesMustBeUsed(ANativeStyle, totButton) then - with TcxWinXPLookAndFeelPainter do - Result := CheckButtonSize - else - with TcxCustomLookAndFeelPainter do - Result := CheckButtonSize; -end; - -{ TcxCaptionItem } - -procedure TcxCaptionItem.Assign(Source: TPersistent); -begin - if Source is TcxCaptionItem then - begin - Caption := TcxCaptionItem(Source).Caption; - Tag := TcxCaptionItem(Source).Tag; - end - else - inherited; -end; - -function TcxCaptionItem.IsTagStored: Boolean; -begin - Result := FTag <> 0; -end; - -procedure TcxCaptionItem.SetCaption(AValue: TCaption); -begin - if Caption <> AValue then - begin - FCaption := AValue; - if (Collection <> nil) and TcxCaptionItems(Collection).Sorted then - TcxCaptionItems(Collection).Sort - else - Changed(False); - end; -end; - -{ TcxCaptionItems } - -function TcxCaptionItems.DoCompareItems(AItem1, AItem2: TcxInterfacedCollectionItem): Integer; -begin - Result := AnsiCompareText(TcxCaptionItem(AItem1).Caption, TcxCaptionItem(AItem2).Caption); -end; - -function TcxCaptionItems.GetCaption(AIndex: Integer): string; -begin - Result := Items[Aindex].Caption; -end; - -function TcxCaptionItems.GetCount: Integer; -begin - Result := Count; -end; - -function TcxCaptionItems.GetItem(AIndex: Integer): TcxCaptionItem; -begin - Result := TcxCaptionItem(inherited Items[AIndex]); -end; - -procedure TcxCaptionItems.SetItem(AIndex: Integer; AValue: TcxCaptionItem); -begin - inherited Items[AIndex] := AValue; -end; - -{ TcxCustomCheckBoxViewInfo } - -procedure TcxCustomCheckBoxViewInfo.Assign(Source: TObject); -begin - if Source is TcxCustomCheckBoxViewInfo then - with Source as TcxCustomCheckBoxViewInfo do - begin - Self.CheckBoxState := CheckBoxState; - Self.State := State; - end; - inherited Assign(Source); -end; - -procedure TcxCustomCheckBoxViewInfo.DrawText(ACanvas: TcxCanvas); -begin - DrawCheckBoxText(ACanvas, Text, Font, TextColor, TextRect, DrawTextFlags, IsTextEnabled); -end; - -function TcxCustomCheckBoxViewInfo.GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; -var - AEquals: Boolean; - ATempRgn: TcxRegion; -begin - Result := inherited GetUpdateRegion(AViewInfo); - if not(AViewInfo is TcxCustomCheckBoxViewInfo) then - Exit; - with TcxCustomCheckBoxViewInfo(AViewInfo) do - AEquals := (Self.CheckBoxState = CheckBoxState) and (Self.State = State); - if not AEquals then - begin - ATempRgn := TcxRegion.Create(CheckBoxRect); - UniteRegions(Result, ATempRgn); - ATempRgn.Free; - end; -end; - -function TcxCustomCheckBoxViewInfo.IsHotTrack: Boolean; -begin - Result := True; -end; - -function TcxCustomCheckBoxViewInfo.IsHotTrack(P: TPoint): Boolean; -begin - Result := IsHotTrack; -end; - -function TcxCustomCheckBoxViewInfo.NeedShowHint(ACanvas: TcxCanvas; - const P: TPoint; out AText: TCaption; out AIsMultiLine: Boolean; - out ATextRect: TRect): Boolean; -begin - Result := False; -end; - -procedure TcxCustomCheckBoxViewInfo.Offset(DX, DY: Integer); -begin - inherited Offset(DX, DY); - OffsetRect(CheckBoxRect, DX, DY); - OffsetRect(FocusRect, DX, DY); -end; - -function TcxCustomCheckBoxViewInfo.Repaint(AControl: TWinControl; - const AInnerEditRect: TRect; AViewInfo: TcxContainerViewInfo = nil): Boolean; -var - R: TRect; -begin - Result := AControl.HandleAllocated; - if not Result then - Exit; - - Result := inherited Repaint(AControl, AInnerEditRect, AViewInfo); - with TcxCustomCheckBoxViewInfo(AViewInfo) do - begin - Result := Result or (AViewInfo <> nil) and - ((Self.CheckBoxState <> CheckBoxState) or (Self.State <> State)); - if (AViewInfo = nil) or (Self.CheckBoxState <> CheckBoxState) or (Self.State <> State) then - begin - R := Self.CheckBoxRect; - OffsetRect(R, Self.Left, Self.Top); - InternalInvalidate(AControl.Handle, R, cxEmptyRect, False); - end; - end; -end; - -function TcxCustomCheckBoxViewInfo.IsTextEnabled: Boolean; -begin - Result := IsContainerInnerControl or Enabled or IsTextColorAssigned or NativeStyle; -end; - -procedure TcxCustomCheckBoxViewInfo.InternalPaint(ACanvas: TcxCanvas); -begin - DrawCustomCheckBox(ACanvas, Self); -end; - -function TcxCustomCheckBoxViewInfo.GetEdit: TcxCustomCheckBox; -begin - Result := TcxCustomCheckBox(FEdit); -end; - -{ TcxCustomCheckBoxViewData } - -procedure TcxCustomCheckBoxViewData.Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); - - procedure CalculateCheckBoxRect(ACheckBoxViewInfo: TcxCustomCheckBoxViewInfo; const ACheckSize: TSize); - var - ACheckBoxRect, AAvailableArea: TRect; - AAlignment: TAlignment; - begin - AAlignment := ACheckBoxViewInfo.Alignment; - - AAvailableArea := AViewInfo.ClientRect; - - if IsInplace and not Properties.IsEmbeddedEdit then - case AAlignment of - taLeftJustify: Inc(AAvailableArea.Left, 2); - taRightJustify: Dec(AAvailableArea.Right, 2); - end; - if not (IsInplace or AreVisualStylesMustBeUsed(AViewInfo.NativeStyle, totButton) and Properties.IsEmbeddedEdit) then - InflateRect(AAvailableArea, -2, -2); - - ACheckBoxRect := cxRectCenter(AAvailableArea, Min(ACheckSize.cx, cxRectWidth(AAvailableArea)), ACheckSize.cy); - if cxRectWidth(AAvailableArea) > ACheckSize.cx then - case AAlignment of - taLeftJustify: - begin - ACheckBoxRect.Left := AAvailableArea.Left; - ACheckBoxRect.Right := ACheckBoxRect.Left + ACheckSize.cx; - end; - taRightJustify: - begin - ACheckBoxRect.Right := AAvailableArea.Right; - ACheckBoxRect.Left := ACheckBoxRect.Right - ACheckSize.cx; - end; - end; - - ACheckBoxViewInfo.CheckBoxRect := ACheckBoxRect; - end; - - procedure CalculateTextRect(ACheckBoxViewInfo: TcxCustomCheckBoxViewInfo); - var - ACaptionRect: TRect; - AAlignment: TAlignment; - begin - AAlignment := ACheckBoxViewInfo.Alignment; - ACaptionRect := AViewInfo.ClientRect; - - if IsInplace then - begin - case AAlignment of - taLeftJustify: Dec(ACaptionRect.Right, 2); - taRightJustify: Inc(ACaptionRect.Left, 2); - end; - Inc(ACaptionRect.Top, EditContentParams.Offsets.Top); - Dec(ACaptionRect.Bottom, EditContentParams.Offsets.Bottom); - end - else - begin - InflateRect(ACaptionRect, -2, -2); - if not Properties.IsEmbeddedEdit and (not EmulateStandardControlDrawing or - not AreVisualStylesMustBeUsed(AViewInfo.NativeStyle, totButton) and (Style.LookAndFeel.SkinPainter = nil)) then - Dec(ACaptionRect.Top); - end; - - if cxRectWidth(ACheckBoxViewInfo.CheckBoxRect) < cxRectWidth(AViewInfo.ClientRect) then - case AAlignment of - taLeftJustify: - ACaptionRect.Left := ACheckBoxViewInfo.CheckBoxRect.Right + 3; - taRightJustify: - ACaptionRect.Right := ACheckBoxViewInfo.CheckBoxRect.Left - 3 + Integer(IsInplace and Properties.IsEmbeddedEdit); - end - else - ACaptionRect.Right := ACaptionRect.Left; - - if not ACheckBoxViewInfo.IsTextEnabled and (Style.LookAndFeel.SkinPainter = nil) then - begin - Inc(ACaptionRect.Right); - Inc(ACaptionRect.Bottom); - end; - - ACheckBoxViewInfo.TextRect := ACaptionRect; - end; - - function GetCheckBoxBorderStyle(AEditHotState: TcxContainerHotState): TcxEditBorderStyle; - const - ABorderStyles: array[TcxContainerHotState, TcxEditBorderStyle] of TcxEditBorderStyle = ( - (ebsNone, ebsSingle, ebsThick, ebsFlat, ebs3D, ebsUltraFlat, ebsOffice11), - (ebsNone, ebsSingle, ebsThick, ebsFlat, ebs3D, ebsUltraFlat, ebsOffice11), - (ebsFlat, ebsThick, ebsThick, ebs3D, ebs3D, ebsUltraFlat, ebsOffice11) - ); - begin - Result := ABorderStyles[AEditHotState, Style.BorderStyle]; - end; - -var - ACheckBoxViewInfo: TcxCustomCheckBoxViewInfo; -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - - ACheckBoxViewInfo := TcxCustomCheckBoxViewInfo(AViewInfo); - ACheckBoxViewInfo.IsEditClass := GetIsEditClass; - ACheckBoxViewInfo.DrawSelectionBar := False; - ACheckBoxViewInfo.HasPopupWindow := False; - ACheckBoxViewInfo.DrawTextFlags := GetDrawTextFlags; - CalculateCheckBoxViewInfo(Self, ACheckBoxViewInfo, AIsMouseEvent); - if Edit <> nil then - ACheckBoxViewInfo.Text := TcxCustomCheckBox(Edit).Caption; - if IsInplace and not (Properties.IsEmbeddedEdit or - Properties.UseAlignmentWhenInplace or (ACheckBoxViewInfo.Text <> '')) then - ACheckBoxViewInfo.Alignment := taCenter - else - ACheckBoxViewInfo.Alignment := Properties.Alignment; - ACheckBoxViewInfo.CheckBoxBorderStyle := GetCheckBoxBorderStyle(AViewInfo.HotState); - ACheckBoxViewInfo.CheckBoxGlyph := Properties.Glyph; - ACheckBoxViewInfo.CheckBoxGlyphCount := Properties.GlyphCount; - ACheckBoxViewInfo.NullValueShowingStyle := Properties.NullStyle; - ACheckBoxViewInfo.HasGlyph := IsGlyphValid(Properties.Glyph, Properties.GlyphCount); - ACheckBoxViewInfo.CheckBorderOffset := - GetEditCheckBorderOffset(ACheckBoxViewInfo.CheckBoxBorderStyle, NativeStyle, - ACheckBoxViewInfo.HasGlyph, ACheckBoxViewInfo.Painter); - ACheckBoxViewInfo.IsTextColorAssigned := Style.IsValueAssigned(svTextColor) or - ((ACheckBoxViewInfo.Painter <> nil) and - (ACheckBoxViewInfo.Painter.DefaultEditorTextColor(True) <> clDefault)); - - CalculateCheckBoxRect(ACheckBoxViewInfo, GetEditCheckSize(ACanvas, NativeStyle, Properties.Glyph, - Properties.GlyphCount, AViewInfo.Painter)); - CalculateTextRect(ACheckBoxViewInfo); - - if not Enabled then - ACheckBoxViewInfo.CheckBoxState := ecsDisabled - else - if IsCheckPressed then - ACheckBoxViewInfo.CheckBoxState := ecsPressed - else - if not IsDesigning and PtInRect(ACheckBoxViewInfo.BorderRect, P) then - if ([ssLeft, ssRight, ssMiddle] * Shift) = [] then - ACheckBoxViewInfo.CheckBoxState := ecsHot - else - if (ssLeft in Shift) and ((Button = cxmbLeft) or (ACheckBoxViewInfo.CheckBoxState = ecsPressed)) then - ACheckBoxViewInfo.CheckBoxState := ecsPressed - else - ACheckBoxViewInfo.CheckBoxState := ecsNormal - else - ACheckBoxViewInfo.CheckBoxState := ecsNormal; - - CalculateCustomCheckBoxViewInfo(ACanvas, Self, ACheckBoxViewInfo); - - if IsInplace and (ACheckBoxViewInfo.CheckBoxBorderStyle = ebsSingle) then - if (ACheckBoxViewInfo.CheckBoxState = ecsHot) or (IsDesigning and (ACheckBoxViewInfo.CheckBoxState <> ecsDisabled)) then - ACheckBoxViewInfo.BorderColor := clHighlight - else - ACheckBoxViewInfo.BorderColor := clBtnShadow; -end; - -procedure TcxCustomCheckBoxViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -begin - if PreviewMode then - TcxCustomCheckBoxViewInfo(AViewInfo).State := cbsChecked - else - TcxCustomCheckBoxViewInfo(AViewInfo).State := Properties.GetState(AEditValue); - if IsInplace and not Properties.IsEmbeddedEdit then - TcxCustomCheckBoxViewInfo(AViewInfo).Text := ''; - CalculateCustomCheckBoxViewInfo(ACanvas, Self, TcxCustomCheckBoxViewInfo(AViewInfo)); -end; - -function TcxCustomCheckBoxViewData.GetBorderStyle: TcxEditBorderStyle; -begin - Result := ebsNone; -end; - -function TcxCustomCheckBoxViewData.InternalGetEditConstantPartSize(ACanvas: TcxCanvas; - AIsInplace: Boolean; AEditSizeProperties: TcxEditSizeProperties; - var MinContentSize: TSize; AViewInfo: TcxCustomEditViewInfo): TSize; -var - ACheckBoxViewInfo: TcxCustomCheckBoxViewInfo; - ASize1, ASize2: TSize; - AText: string; -begin - Result := inherited InternalGetEditConstantPartSize(ACanvas, AIsInplace, - AEditSizeProperties, MinContentSize, AViewInfo); - ACheckBoxViewInfo := TcxCustomCheckBoxViewInfo(AViewInfo); - with ACheckBoxViewInfo.CheckBoxRect do - ASize1 := Size(Right - Left, Bottom - Top); - - if IsInplace then - if (ACheckBoxViewInfo.Alignment <> taCenter) and (ACheckBoxViewInfo.Text <> '') then - begin - ACanvas.Font := Style.GetVisibleFont; - ASize1.cx := ACheckBoxViewInfo.TextRect.Left - ACheckBoxViewInfo.Bounds.Left + - ACanvas.TextWidth(RemoveAccelChars(ACheckBoxViewInfo.Text)) + - (ACheckBoxViewInfo.Bounds.Right - ACheckBoxViewInfo.TextRect.Right); - end - else - ASize1.cx := ASize1.cx + 2 * 2; - - if IsInplace then - ASize1.cy := ASize1.cy + (1 - ACheckBoxViewInfo.CheckBorderOffset) * 2 - else - ASize1.cy := ASize1.cy + 2 * 2; - if (Properties.Alignment = taCenter) or IsInplace then - AText := 'Gg' - else - AText := RemoveAccelChars(TcxCustomCheckBox(Edit).Caption); - if not Enabled and not IsNativeStyle(Style.LookAndFeel) then - Dec(AEditSizeProperties.Width); - ASize2 := GetTextEditContentSize(ACanvas, Self, AText, - DrawTextFlagsTocxTextOutFlags(GetDrawTextFlags) or CXTO_SINGLELINE or CXTO_CHARBREAK, - AEditSizeProperties, 0, False); - if ASize1.cy < ASize2.cy then - ASize1.cy := ASize2.cy; - - Result.cx := Result.cx + ASize1.cx; - Result.cy := Result.cy + ASize1.cy; -end; - -function TcxCustomCheckBoxViewData.GetDrawTextFlags: Integer; -const - AHorzAlignmentFlags: array [TcxEditHorzAlignment] of Integer = ( - cxAlignLeft, cxAlignLeft, cxAlignHCenter - ); -begin - with Properties.InternalAlignment do - begin - Result := AHorzAlignmentFlags[Horz]; - Result := Result or cxSingleLine; - end; - Result := Result or cxShowPrefix; - if Properties.MultiLine then - begin - Result := Result and (not cxSingleLine); - Result := Result or cxDontClip; - Result := Result or cxWordBreak; - end; - - if IsInplace or not Properties.MultiLine then - Result := Result or cxAlignVCenter - else - Result := Result or cxAlignTop; -end; - -function TcxCustomCheckBoxViewData.GetIsEditClass: Boolean; -begin - Result := True; -end; - -function TcxCustomCheckBoxViewData.IsCheckPressed: Boolean; -begin - Result := (Edit <> nil) and TcxCustomCheckBox(Edit).FIsCheckPressed; -end; - -function TcxCustomCheckBoxViewData.GetProperties: TcxCustomCheckBoxProperties; -begin - Result := TcxCustomCheckBoxProperties(FProperties); -end; - -{ TcxCheckBoxStyle } - -function TcxCheckBoxStyle.HasBorder: Boolean; -begin - Result := False; -end; - -{ TcxCustomCheckBoxProperties } - -constructor TcxCustomCheckBoxProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FDisplayChecked := cxGetResourceString(@cxSEditCheckBoxChecked); - FDisplayUnchecked := cxGetResourceString(@cxSEditCheckBoxUnchecked); - FDisplayGrayed := cxGetResourceString(@cxSEditCheckBoxGrayed); - - FGlyphCount := 6; - FNullStyle := nssGrayedChecked; - FValueChecked := True; - FValueGrayed := Null; - FValueUnchecked := False; -end; - -destructor TcxCustomCheckBoxProperties.Destroy; -begin - if FGlyph <> nil then - FreeAndNil(FGlyph); - inherited Destroy; -end; - -procedure TcxCustomCheckBoxProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomCheckBoxProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomCheckBoxProperties do - begin - Self.AllowGrayed := AllowGrayed; - Self.DisplayChecked := DisplayChecked; - Self.DisplayGrayed := DisplayGrayed; - Self.DisplayUnchecked := DisplayUnchecked; - Self.FullFocusRect := FullFocusRect; - Self.Glyph := Glyph; - Self.GlyphCount := GlyphCount; - Self.MultiLine := MultiLine; - Self.NullStyle := NullStyle; - Self.UseAlignmentWhenInplace := UseAlignmentWhenInplace; - Self.SetStateValues(ValueChecked, ValueGrayed, ValueUnchecked); - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomCheckBoxProperties.CanCompareEditValue: Boolean; -begin - Result := True; -end; - -function TcxCustomCheckBoxProperties.CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; -begin - Result := GetState(AEditValue1) = GetState(AEditValue2); -end; - -class function TcxCustomCheckBoxProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxCheckBox; -end; - -function TcxCustomCheckBoxProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -begin - case GetState(AEditValue) of - cbsChecked: - Result := FDisplayChecked; - cbsUnchecked: - Result := FDisplayUnchecked; - cbsGrayed: - Result := FDisplayGrayed; - end; -end; - -class function TcxCustomCheckBoxProperties.GetStyleClass: TcxCustomEditStyleClass; -begin - Result := TcxCheckBoxStyle; -end; - -function TcxCustomCheckBoxProperties.GetSpecialFeatures: TcxEditSpecialFeatures; -begin - Result := inherited GetSpecialFeatures + [esfNoContentPart]; -end; - -function TcxCustomCheckBoxProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := [esoAlwaysHotTrack, esoEditing, esoFiltering, esoHotTrack, - esoShowingCaption, esoSorting, esoTransparency]; -end; - -class function TcxCustomCheckBoxProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomCheckBoxViewInfo; -end; - -function TcxCustomCheckBoxProperties.IsActivationKey(AKey: Char): Boolean; -begin - Result := AKey = ' '; -end; - -function TcxCustomCheckBoxProperties.IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; -begin - Result := inherited IsEditValueValid(EditValue, AEditFocused); - if Result then - Result := not CheckValue(EditValue); -end; - -function TcxCustomCheckBoxProperties.IsResetEditClass: Boolean; -begin - Result := True; -end; - -procedure TcxCustomCheckBoxProperties.PrepareDisplayValue(const AEditValue: - TcxEditValue; var DisplayValue: TcxEditValue; AEditFocused: Boolean); -begin - if VarEqualsExact(AEditValue, FValueChecked) then - DisplayValue := Integer(cbsChecked) - else - if VarEqualsExact(AEditValue, FValueUnchecked) then - DisplayValue := Integer(cbsUnchecked) - else - DisplayValue := Integer(cbsGrayed); -end; - -function TcxCustomCheckBoxProperties.CanValidate: Boolean; -begin - Result := True; -end; - -procedure TcxCustomCheckBoxProperties.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('Caption', ReadCaption, nil, False); -end; - -class function TcxCustomCheckBoxProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomCheckBoxViewData; -end; - -function TcxCustomCheckBoxProperties.HasDisplayValue: Boolean; -begin - Result := True; -end; - -function TcxCustomCheckBoxProperties.CheckValue(const AValue: TcxEditValue): Boolean; -begin - Result := not(InternalVarEqualsExact(AValue, FValueChecked) or InternalVarEqualsExact(AValue, - FValueGrayed) or InternalVarEqualsExact(AValue, FValueUnchecked)); -end; - -function TcxCustomCheckBoxProperties.GetState( - const AEditValue: TcxEditValue): TcxCheckBoxState; -var - ADisplayValue: TcxEditValue; -begin - PrepareDisplayValue(AEditValue, ADisplayValue, False); - Result := TcxCheckBoxState(Integer(ADisplayValue)); -end; - -function TcxCustomCheckBoxProperties.InternalGetGlyph: TBitmap; -begin - if FGlyph = nil then - begin - FGlyph := TBitmap.Create; - FGlyph.OnChange := GlyphChanged; - end; - Result := FGlyph; -end; - -function TcxCustomCheckBoxProperties.IsEmbeddedEdit: Boolean; -begin - Result := False; -end; - -function TcxCustomCheckBoxProperties.GetAlignment: TAlignment; -begin - Result := inherited Alignment.Horz; -end; - -function TcxCustomCheckBoxProperties.GetGlyph: TBitmap; -begin - Result := InternalGetGlyph; -end; - -function TcxCustomCheckBoxProperties.GetInternalAlignment: TcxEditAlignment; -begin - Result := inherited Alignment; -end; - -procedure TcxCustomCheckBoxProperties.GlyphChanged(Sender: TObject); -begin - Changed; -end; - -function TcxCustomCheckBoxProperties.IsAlignmentStored: Boolean; -begin - Result := inherited Alignment.IsHorzStored; -end; - -function TcxCustomCheckBoxProperties.IsDisplayCheckedStored: Boolean; -begin - Result := not InternalCompareString(FDisplayChecked, - cxGetResourceString(@cxSEditCheckBoxChecked), True); -end; - -function TcxCustomCheckBoxProperties.IsDisplayGrayedStored: Boolean; -begin - Result := not InternalCompareString(FDisplayGrayed, - cxGetResourceString(@cxSEditCheckBoxGrayed), True); -end; - -function TcxCustomCheckBoxProperties.IsDisplayUncheckedStored: Boolean; -begin - Result := not InternalCompareString(FDisplayUnchecked, - cxGetResourceString(@cxSEditCheckBoxUnchecked), True); -end; - -function TcxCustomCheckBoxProperties.IsLoading: Boolean; -begin - Result := (GetOwnerComponent(Self) <> nil) and (csLoading in GetOwnerComponent(Self).ComponentState); -end; - -function TcxCustomCheckBoxProperties.IsValueCheckedStored: Boolean; -begin - Result := not InternalVarEqualsExact(FValueChecked, True); -end; - -function TcxCustomCheckBoxProperties.IsValueGrayedStored: Boolean; -begin - Result := not VarIsNull(FValueGrayed); -end; - -function TcxCustomCheckBoxProperties.IsValueUncheckedStored: Boolean; -begin - Result := not InternalVarEqualsExact(FValueUnchecked, False); -end; - -// obsolete -procedure TcxCustomCheckBoxProperties.ReadCaption(Reader: TReader); -begin - Caption := Reader.ReadString; -end; - -procedure TcxCustomCheckBoxProperties.SetAlignment(Value: TAlignment); -begin - inherited Alignment.Horz := Value; -end; - -// obsolete -procedure TcxCustomCheckBoxProperties.SetCaption(const Value: TCaption); -begin - FIsCaptionAssigned := True; - if not InternalCompareString(Value, FCaption, True) then - begin - FCaption := Value; - Changed; - end; -end; - -procedure TcxCustomCheckBoxProperties.SetFullFocusRect(Value: Boolean); -begin - if Value <> FFullFocusRect then - begin - FFullFocusRect := Value; - Changed; - end; -end; - -procedure TcxCustomCheckBoxProperties.SetGlyph(Value: TBitmap); -begin - if Value = nil then - FreeAndNil(FGlyph) - else - Glyph.Assign(Value); - Changed; -end; - -procedure TcxCustomCheckBoxProperties.SetGlyphCount(Value: Integer); -begin - if FGlyphCount <> Value then - begin - FGlyphCount := Value; - if FGlyph <> nil then - Changed; - end; -end; - -procedure TcxCustomCheckBoxProperties.SetMultiLine(Value: Boolean); -begin - if Value <> FMultiLine then - begin - FMultiLine := Value; - Changed; - end; -end; - -procedure TcxCustomCheckBoxProperties.SetNullStyle(Value: TcxCheckBoxNullValueShowingStyle); -begin - if Value <> FNullStyle then - begin - FNullStyle := Value; - Changed; - end; -end; - -procedure TcxCustomCheckBoxProperties.SetStateValues(const AValueChecked, AValueGrayed, AValueUnchecked: TcxEditValue); -var - AIsValuesValid: Boolean; -begin - AIsValuesValid := not(InternalVarEqualsExact(AValueChecked, AValueGrayed) or - InternalVarEqualsExact(AValueGrayed, AValueUnchecked) or - InternalVarEqualsExact(AValueChecked, AValueUnchecked) or - VarIsNull(AValueChecked) or VarIsNull(AValueUnchecked)); - if AIsValuesValid then - begin - FValueChecked := AValueChecked; - FValueGrayed := AValueGrayed; - FValueUnchecked := AValueUnchecked; - Changed; - end; -end; - -procedure TcxCustomCheckBoxProperties.SetUseAlignmentWhenInplace(Value: Boolean); -begin - if Value <> FUseAlignmentWhenInplace then - begin - FUseAlignmentWhenInplace := Value; - Changed; - end; -end; - -procedure TcxCustomCheckBoxProperties.SetValueChecked(const Value: TcxEditValue); -begin - if IsLoading or CheckValue(Value) and not VarIsNull(Value) then - begin - FValueChecked := Value; - Changed; - end; -end; - -procedure TcxCustomCheckBoxProperties.SetValueGrayed(const Value: TcxEditValue); -begin - if IsLoading or CheckValue(Value) then - begin - FValueGrayed := Value; - Changed; - end; -end; - -procedure TcxCustomCheckBoxProperties.SetValueUnchecked(const Value: TcxEditValue); -begin - if IsLoading or CheckValue(Value) and not VarIsNull(Value) then - begin - FValueUnchecked := Value; - Changed; - end; -end; - -{ TcxCustomCheckBox } - -procedure TcxCustomCheckBox.Clear; -begin - Checked := False; -end; - -class function TcxCustomCheckBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomCheckBoxProperties; -end; - -procedure TcxCustomCheckBox.PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); -begin - case TcxCheckBoxState(Integer(ADisplayValue)) of - cbsUnchecked: - EditValue := ActiveProperties.FValueUnchecked; - cbsChecked: - EditValue := ActiveProperties.FValueChecked; - cbsGrayed: - EditValue := ActiveProperties.FValueGrayed; - end; -end; - -procedure TcxCustomCheckBox.ActionChange(Sender: TObject; CheckDefaults: Boolean); -begin - inherited ActionChange(Sender, CheckDefaults); - if (IsLoading or FIsLoaded) and FIsLoadingStateAssigned or not(Sender is TCustomAction) then - Exit; - if not CheckDefaults or (Checked = False) then - TcxCheckBoxActionLink(ActionLink).InternalSetChecked(TCustomAction(Sender).Checked); -end; - -function TcxCustomCheckBox.CanHaveTransparentBorder: Boolean; -begin - Result := not IsInplace and not ActiveProperties.IsEmbeddedEdit or - inherited CanHaveTransparentBorder; -end; - -function TcxCustomCheckBox.DefaultParentColor: Boolean; -begin - Result := True; -end; - -procedure TcxCustomCheckBox.DoEditKeyDown(var Key: Word; Shift: TShiftState); -begin - inherited DoEditKeyDown(Key, Shift); - if Key = 0 then - Exit; - - case Key of - VK_SPACE: - begin - with ViewInfo do - if CheckBoxState in [ecsNormal, ecsHot] then - begin - FIsCheckPressed := True; - CheckBoxState := ecsPressed; - ShortRefreshContainer(False); - Key := 0; - end; - end; - end; -end; - -procedure TcxCustomCheckBox.DoEditKeyPress(var Key: Char); -begin - inherited DoEditKeyPress(Key); - if Key = #0 then - Exit; - - if IsInplace and (Key = #32) and (ViewInfo.CheckBoxState in [ecsNormal, ecsHot]) then - begin - Toggle; - Key := #0; - end; -end; - -procedure TcxCustomCheckBox.DoEditKeyUp(var Key: Word; Shift: TShiftState); -begin - inherited DoEditKeyUp(Key, Shift); - if Key = 0 then - Exit; - - case Key of - VK_SPACE: - begin - if ViewInfo.CheckBoxState = ecsPressed then - begin - FIsCheckPressed := False; - ViewInfo.CheckBoxState := ecsNormal; - InvalidateCheckRect; - Toggle; - end; - end; - end; -end; - -procedure TcxCustomCheckBox.DoExit; -begin - FIsCheckPressed := False; - inherited DoExit; -end; - -procedure TcxCustomCheckBox.FillSizeProperties(var AEditSizeProperties: TcxEditSizeProperties); -begin - AEditSizeProperties := DefaultcxEditSizeProperties; - if not ActiveProperties.MultiLine then - AEditSizeProperties.MaxLineCount := 1; - AEditSizeProperties.Width := cxRectWidth(ViewInfo.TextRect); -end; - -function TcxCustomCheckBox.GetActionLinkClass: TControlActionLinkClass; -begin - Result := TcxCheckBoxActionLink; -end; - -function TcxCustomCheckBox.GetEditStateColorKind: TcxEditStateColorKind; -begin - Result := cxEditStateColorKindMap[Enabled]; -end; - -function TcxCustomCheckBox.GetShadowBounds: TRect; -begin - if not IsInplace and not ActiveProperties.IsEmbeddedEdit and - ViewInfo.NativeStyle and Style.TransparentBorder then - begin - Result := GetControlRect(Self); - InflateRect(Result, -cxContainerMaxBorderWidth, -cxContainerMaxBorderWidth); - end - else - Result := inherited GetShadowBounds; -end; - -procedure TcxCustomCheckBox.Initialize; -begin - inherited Initialize; - ControlStyle := ControlStyle - [csDoubleClicks]; - Width := 121; - PrepareEditValue(Integer(cbsUnchecked), FEditValue, False); -end; - -function TcxCustomCheckBox.InternalGetNotPublishedStyleValues: TcxEditStyleValues; -begin - Result := inherited InternalGetNotPublishedStyleValues; - Include(Result, svEdges); -end; - -procedure TcxCustomCheckBox.InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); -var - APrevState: TcxCheckBoxState; -begin - APrevState := State; - inherited InternalSetEditValue(Value, AValidateEditValue); - if APrevState <> State then - begin - ViewInfo.State := State; - Click; - DoChange; - end; - ShortRefreshContainer(False); -end; - -function TcxCustomCheckBox.IsClickEnabledDuringLoading: Boolean; -begin - Result := IsDBEdit; -end; - -function TcxCustomCheckBox.IsNativeBackground: Boolean; -begin - Result := IsNativeStyle and ParentBackground and not IsInplace and - not Transparent; -end; - -procedure TcxCustomCheckBox.Loaded; -begin - FIsLoaded := True; - LockChangeEvents(True); - LockClick(True); - try - inherited Loaded; - if FIsLoadingStateAssigned then - State := FLoadingState - else - if not IsDBEdit then - State := cbsUnchecked; - finally - LockClick(False); - LockChangeEvents(False, False); - FIsLoaded := False; - end; -end; - -procedure TcxCustomCheckBox.ProcessViewInfoChanges(APrevViewInfo: TcxCustomEditViewInfo; - AIsMouseDownUpEvent: Boolean); -begin - if (TcxCustomCheckBoxViewInfo(APrevViewInfo).CheckBoxState = ecsPressed) and - (ViewInfo.CheckBoxState = ecsHot) then - Toggle; -end; - -procedure TcxCustomCheckBox.PropertiesChanged(Sender: TObject); -begin - if ActiveProperties.FIsCaptionAssigned then - begin - Caption := ActiveProperties.Caption; - ActiveProperties.FIsCaptionAssigned := False; - end; - - if ViewInfo.State <> State then - begin - ViewInfo.State := State; - InvalidateCheckRect; - if not AreChangeEventsLocked then - begin - Click; - DoChange; - end; - end; - inherited PropertiesChanged(Sender); -end; - -procedure TcxCustomCheckBox.TextChanged; -begin - inherited TextChanged; - ViewInfo.Text := Caption; - Invalidate; -end; - -procedure TcxCustomCheckBox.InvalidateCheckRect; -begin - InvalidateRect(ViewInfo.CheckBoxRect, False); -end; - -procedure TcxCustomCheckBox.Toggle; -begin - LockChangeEvents(True); - try - KeyboardAction := True; - try - begin - case State of - cbsUnchecked: - if ActiveProperties.AllowGrayed then - State := cbsGrayed - else - State := cbsChecked; - cbsChecked: - State := cbsUnchecked; - cbsGrayed: - State := cbsChecked; - end; - end; - finally - KeyboardAction := False; - end; - if ActiveProperties.ImmediatePost and CanPostEditValue and ValidateEdit(True) then - InternalPostEditValue; - finally - LockChangeEvents(False); - end; -end; - -function TcxCustomCheckBox.GetChecked: Boolean; -begin - Result := State = cbsChecked; -end; - -function TcxCustomCheckBox.GetProperties: TcxCustomCheckBoxProperties; -begin - Result := TcxCustomCheckBoxProperties(FProperties); -end; - -function TcxCustomCheckBox.GetActiveProperties: TcxCustomCheckBoxProperties; -begin - Result := TcxCustomCheckBoxProperties(InternalGetActiveProperties); -end; - -function TcxCustomCheckBox.GetState: TcxCheckBoxState; -begin - Result := ActiveProperties.GetState(EditValue); -end; - -function TcxCustomCheckBox.GetStyle: TcxCheckBoxStyle; -begin - Result := TcxCheckBoxStyle(FStyles.Style); -end; - -function TcxCustomCheckBox.GetViewInfo: TcxCustomCheckBoxViewInfo; -begin - Result := TcxCustomCheckBoxViewInfo(FViewInfo); -end; - -function TcxCustomCheckBox.IsStateStored: Boolean; -const - AStates: array[Boolean] of TcxCheckBoxState = (cbsUnchecked, cbsChecked); -begin - Result := not (Action is TCustomAction) or - (State <> AStates[TCustomAction(Action).Checked]); -end; - -procedure TcxCustomCheckBox.SetChecked(Value: Boolean); -begin - if Value then - State := cbsChecked - else - State := cbsUnchecked; -end; - -procedure TcxCustomCheckBox.SetProperties(Value: TcxCustomCheckBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomCheckBox.SetState(Value: TcxCheckBoxState); -var - AEditValue: TcxEditValue; -begin - if IsLoading then - begin - FLoadingState := Value; - FIsLoadingStateAssigned := True; - end - else - if Value <> State then - begin - PrepareEditValue(Integer(Value), AEditValue, InternalFocused); - InternalEditValue := AEditValue; - end; -end; - -procedure TcxCustomCheckBox.SetStyle(Value: TcxCheckBoxStyle); -begin - FStyles.Style := Value; -end; - -procedure TcxCustomCheckBox.WMLButtonUp(var Message: TWMLButtonUp); -begin - ControlState := ControlState - [csClicked]; - inherited; -end; - -procedure TcxCustomCheckBox.CMDialogChar(var Message: TCMDialogChar); -begin - with Message do - if IsAccel(CharCode, Caption) {D3 - bug "&&"} and CanFocus then - begin - SetFocus; - if Focused then - Toggle; - Result := 1; - end - else - inherited; -end; - -procedure TcxCustomCheckBox.CMParentColorChanged(var Message: TMessage); -begin - inherited; - if ViewInfo.NativeStyle and ParentBackground then - Invalidate; -end; - -{ TcxCheckBox } - -class function TcxCheckBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCheckBoxProperties; -end; - -function TcxCheckBox.GetActiveProperties: TcxCheckBoxProperties; -begin - Result := TcxCheckBoxProperties(InternalGetActiveProperties); -end; - -function TcxCheckBox.GetProperties: TcxCheckBoxProperties; -begin - Result := TcxCheckBoxProperties(FProperties); -end; - -procedure TcxCheckBox.SetProperties(Value: TcxCheckBoxProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterCheckBoxHelper } - -class procedure TcxFilterCheckBoxHelper.GetFilterValue(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties; var V: Variant; var S: TCaption); -begin - with TcxComboBox(AEdit) do - begin - case ItemIndex of - -1: - V := Null; - 0: - V := TcxCustomCheckBoxProperties(AEditProperties).ValueChecked; - 1: - V := TcxCustomCheckBoxProperties(AEditProperties).ValueUnchecked; - end; - if ItemIndex = -1 then - S := '' - else - S := TcxCustomCheckBoxProperties(AEditProperties).GetDisplayText(V); - end; -end; - -class function TcxFilterCheckBoxHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoBlanks, fcoNonBlanks]; -end; - -class procedure TcxFilterCheckBoxHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -var - ACheckBoxProperties: TcxCustomCheckBoxProperties; -begin - ACheckBoxProperties := TcxCustomCheckBoxProperties(AEditProperties); - with TcxComboBoxProperties(AProperties).Items do - begin - Clear; - Add(ACheckBoxProperties.GetDisplayText(ACheckBoxProperties.ValueChecked)); - Add(ACheckBoxProperties.GetDisplayText(ACheckBoxProperties.ValueUnchecked)); - end; - TcxComboBoxProperties(AProperties).DropDownListStyle := lsFixedList; - TcxComboBoxProperties(AProperties).IDefaultValuesProvider := nil; - ClearPropertiesEvents(AProperties); -end; - -class procedure TcxFilterCheckBoxHelper.SetFilterValue(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties; AValue: Variant); -const - AItemIndexMap: array [TcxCheckBoxState] of Integer = (1, 0, -1); -var - V: TcxEditValue; -begin - AEditProperties.PrepareDisplayValue(AValue, V, AEdit.Focused); - TcxComboBox(AEdit).ItemIndex := AItemIndexMap[TcxCheckBoxState((V))]; -end; - -class function TcxFilterCheckBoxHelper.UseDisplayValue: Boolean; -begin - Result := True; -end; - -{ TcxCheckBoxActionLink } - -procedure TcxCheckBoxActionLink.AssignClient(AClient: TObject); -begin - inherited AssignClient(AClient); - FClient := AClient as TcxCustomCheckBox; -end; - -function TcxCheckBoxActionLink.IsCheckedLinked: Boolean; -begin - Result := inherited IsCheckedLinked and (FClient.State <> cbsGrayed) and - (FClient.Checked = TCustomAction(Action).Checked); -end; - -procedure TcxCheckBoxActionLink.SetChecked(Value: Boolean); -begin - if IsCheckedLinked then - InternalSetChecked(Value); -end; - -procedure TcxCheckBoxActionLink.InternalSetChecked(Value: Boolean); -begin - FClient.LockClick(True); - FClient.LockChangeEvents(True); - try - FClient.Checked := Value; - finally - FClient.LockChangeEvents(False, False); - FClient.LockClick(False); - end; -end; - -initialization - GetRegisteredEditProperties.Register(TcxCheckBoxProperties, scxSEditRepositoryCheckBoxItem); - FilterEditsController.Register(TcxCheckBoxProperties, TcxFilterCheckBoxHelper); - PrepareCheckMask; - -finalization - FilterEditsController.Unregister(TcxCheckBoxProperties, TcxFilterCheckBoxHelper); - FreeAndNil(FCheckMask); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckComboBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxCheckComboBox.pas deleted file mode 100644 index 034917a2..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckComboBox.pas +++ /dev/null @@ -1,1580 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxCheckComboBox; - -interface - -{$I cxVer.inc} - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Messages, SysUtils, Classes, Controls, Graphics, StdCtrls, - Forms, Math, dxCore, cxClasses, cxControls, cxContainer, cxGraphics, - cxDataStorage, cxDataUtils, cxVariants, cxEdit, cxEditUtils, - cxTextEdit, cxMaskEdit, cxDropDownEdit, cxImageComboBox, - cxExtEditUtils, cxCheckBox, cxLookAndFeels, cxExtEditConsts, - cxGroupBox, cxFilterControlUtils, cxLookAndFeelPainters; - -type - { TcxCheckComboBoxItem } - - TcxCheckComboBoxItem = class(TcxButtonGroupItem) - private - FShortDescription: TCaption; - function GetDescription: TCaption; - procedure SetDescription(const Value: TCaption); - procedure SetShortDescription(const Value: TCaption); - protected - function GetDisplayDescription: string; virtual; - public - procedure Assign(Source: TPersistent); override; - published - property Description: TCaption read GetDescription write SetDescription; - property Enabled; - property ShortDescription: TCaption read FShortDescription - write SetShortDescription; - property Tag; - end; - - { TcxCheckComboBoxItems } - - TcxCheckComboBoxItems = class(TcxButtonGroupItems) - private - function GetItems(Index: Integer): TcxCheckComboBoxItem; - procedure SetItems(Index: Integer; const Value: TcxCheckComboBoxItem); - public - function Add: TcxCheckComboBoxItem; - function AddCheckItem(const ADescription: TCaption; - const AShortDescription: TCaption = ''): TcxCheckComboBoxItem; - property Items[Index: Integer]: TcxCheckComboBoxItem read GetItems write SetItems; default; - end; - - { TcxCustomCheckComboBoxViewData } - - TcxCustomCheckComboBoxProperties = class; - - TcxCustomCheckComboBoxViewData = class(TcxCustomDropDownEditViewData) - protected - function GetProperties: TcxCustomCheckComboBoxProperties; - function InternalEditValueToDisplayText(AEditValue: TcxEditValue): string; override; - function IsComboBoxStyle: Boolean; override; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); override; - property Properties: TcxCustomCheckComboBoxProperties read GetProperties; - end; - - { TcxCheckComboBoxListBox } - - TcxCustomCheckComboBox = class; - - TcxCustomCheckComboBoxListBox = class(TcxCustomComboBoxListBox, - IUnknown, IcxMouseTrackingCaller) - private - FCapturedCheckIndex: Integer; - FCheckBorderOffset: Integer; - FCheckSize: TSize; - FHotCheckIndex: Integer; - FInternalUpdate: Boolean; - FPressedCheckIndex: Integer; - function GetEdit: TcxCustomCheckComboBox; - procedure LBGetTextLen(var Message: TMessage); message LB_GETTEXTLEN; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - protected - // IcxMouseTrackingCaller - procedure IcxMouseTrackingCaller.MouseLeave = MouseTrackingMouseLeave; - procedure MouseTrackingMouseLeave; - - procedure CheckHotTrack; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; - procedure FullRepaint; - function GetCheckAt(X, Y: Integer): Integer; - function GetCheckRect(const R: TRect; AReturnFullRect: Boolean): TRect; - procedure InternalMouseMove(Shift: TShiftState; X, Y: Integer); - procedure InvalidateCheck(Index: Integer); - procedure KeyPress(var Key: Char); override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure RecreateWindow; override; - procedure SetItemIndex(const Value: Integer); override; - procedure SynchronizeCheckStates(ANewHotCheckIndex, ANewPressedIndex: Integer); - procedure UpdateItemState(const AIndex: Integer); virtual; - property Edit: TcxCustomCheckComboBox read GetEdit; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function GetItemHeight(AIndex: Integer = -1): Integer; override; - function GetItemWidth(AIndex: Integer): Integer; override; - end; - - { TcxCheckComboBoxLookupData } - - TcxCheckComboBoxLookupData = class(TcxComboBoxLookupData) - protected - function GetListBoxClass: TcxCustomEditListBoxClass; override; - function GetItem(Index: Integer): string; override; - function GetItemCount: Integer; override; - public - procedure TextChanged; override; - end; - - { TcxCheckPaintHelper } - - TcxCheckPaintHelper = class(TcxOwnedPersistent) - private - FStyle: TcxCustomEditStyle; - FGlyph: TBitmap; - FGlyphCount: Integer; - procedure SetStyle(Value: TcxCustomEditStyle); - protected - function GetNextState(Value: TcxCheckBoxState): TcxCheckBoxState; virtual; - property Style: TcxCustomEditStyle read FStyle write SetStyle; - property Glyph: TBitmap read FGlyph write FGlyph; - property GlyphCount: Integer read FGlyphCount write FGlyphCount; - function CalcTextRect(const ARect: TRect; const ACheckState: TcxCheckBoxState): TRect; virtual; - function CalcCheckPoint(const ARect: TRect; const ACheckState: TcxCheckBoxState): TPoint; virtual; - function IsClickInCheck(const AItemRect: TRect; const ACheckState: TcxCheckBoxState; - X, Y: Integer; const AUseRightToLeftAlignment: Boolean = False): Boolean; - function GetCheckWidth: Integer; virtual; - public - constructor Create(AOwner : TPersistent); override; - destructor Destroy; override; - end; - - { TcxCustomCheckComboBoxProperties } - - TcxCheckComboClickCheckEvent = procedure(Sender: TObject; ItemIndex: Integer; - var AllowToggle: Boolean) of object; - - TcxCustomCheckComboBoxProperties = class(TcxCustomComboBoxProperties) - private - FAllowGrayed: Boolean; // deprecated - FCheckPaintHelper : TcxCheckPaintHelper; - FDelimiter: string; - FEditValueFormat: TcxCheckStatesValueFormat; - FEmptySelectionText: string; - FGlyph: TBitmap; - FGlyphCount: Integer; - FItems: TcxCheckComboBoxItems; - FShowEmptyText: Boolean; - FOnClickCheck: TcxCheckComboClickCheckEvent; - FOnEditValueToStates: TcxValueToCheckStatesEvent; - FOnStatesToEditValue: TcxCheckStatesToValueEvent; - function GetGlyph: TBitmap; - procedure GlyphChanged(Sender: TObject); - function IsDelimiterStored: Boolean; - function IsEmptySelectionTextStored: Boolean; - procedure SetGlyph(Value: TBitmap); - procedure SetGlyphCount(Value: Integer); - procedure SetDelimiter(Value: string); - procedure SetEditValueFormat(Value: TcxCheckStatesValueFormat); - procedure SetEmptySelectionText(Value: string); - procedure SetShowEmptyText(Value: Boolean); - procedure SetItems(const Value: TcxCheckComboBoxItems); - - procedure CheckEditValueFormat; - function GetRealEditValueFormat: TcxCheckStatesValueFormatEx; - procedure ItemsChanged(Sender: TObject; AItem: TCollectionItem); - protected - class function GetLookupDataClass: TcxInterfacedPersistentClass; override; - class function GetPopupWindowClass: TcxCustomEditPopupWindowClass; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function HasDisplayValue: Boolean; override; - procedure CalculateCheckStatesByEditValue(Sender: TObject; - const AEditValue: TcxEditValue; var ACheckStates: TcxCheckStates); virtual; - function CalculateDisplayValueByCheckStates( - const ACheckStates: TcxCheckStates): string; virtual; - function CalculateEditValueByCheckStates(Sender: TObject; - const ACheckStates: TcxCheckStates): TcxEditValue; virtual; - property AllowGrayed: Boolean read FAllowGrayed write FAllowGrayed - stored False; // deprecated - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - function IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - // !!! - property EditValueFormat: TcxCheckStatesValueFormat - read FEditValueFormat write SetEditValueFormat default cvfInteger; - property Glyph: TBitmap read GetGlyph write SetGlyph; - property GlyphCount: Integer read FGlyphCount write SetGlyphCount default 6; - property Delimiter: string read FDelimiter write SetDelimiter - stored IsDelimiterStored; - property EmptySelectionText : string read FEmptySelectionText - write SetEmptySelectionText stored IsEmptySelectionTextStored; - property Items: TcxCheckComboBoxItems read FItems write SetItems; - property ShowEmptyText: Boolean read FShowEmptyText write SetShowEmptyText default True; - property OnClickCheck: TcxCheckComboClickCheckEvent read FOnClickCheck - write FOnClickCheck; - property OnEditValueToStates: TcxValueToCheckStatesEvent - read FOnEditValueToStates write FOnEditValueToStates; - property OnStatesToEditValue: TcxCheckStatesToValueEvent - read FOnStatesToEditValue write FOnStatesToEditValue; - end; - - { TcxCheckComboBoxProperties } - - TcxCheckComboBoxProperties = class(TcxCustomCheckComboBoxProperties) - published - property AllowGrayed; // deprecated - property AssignedValues; - property Delimiter; - property EmptySelectionText; - property ShowEmptyText; - property Alignment; - property BeepOnError; - property ButtonGlyph; - property CharCase; - property ClearKey; - property DropDownAutoWidth; - property DropDownRows; - property DropDownSizeable; - property DropDownWidth; - property EditValueFormat; - property Glyph; - property GlyphCount; - property ImeMode; - property ImeName; - property ImmediateDropDown; - property ImmediatePopup; - property ImmediatePost; - property Items; - property PopupAlignment; - property ReadOnly; - property ValidateOnEnter; - property OnChange; - property OnClickCheck; - property OnCloseUp; - property OnEditValueChanged; - property OnEditValueToStates; - property OnInitPopup; - property OnPopup; - property OnStatesToEditValue; - end; - - { TcxCheckComboBoxPopupWindow } - - TcxCheckComboBoxPopupWindow = class(TcxComboBoxPopupWindow) - public - property ViewInfo; - property SysPanelStyle; - end; - - { TcxCustomCheckComboBox } - - TcxCustomCheckComboBox = class(TcxCustomComboBox) - private - FCheckBorderStyle: TcxEditCheckBoxBorderStyle; - FNativeStyle: Boolean; - FStates: TcxCheckStates; - FStatesItems: Boolean; - function GetActiveProperties: TcxCustomCheckComboBoxProperties; - function GetLookupData: TcxCheckComboBoxLookupData; - function GetProperties: TcxCustomCheckComboBoxProperties; - procedure SetProperties(Value: TcxCustomCheckComboBoxProperties); - protected - procedure CalculateDrawCheckParams; - function GetValue: Variant; virtual; // deprecated - procedure PopupControlsLookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - procedure PopupWindowShowed(Sender: TObject); override; - procedure PropertiesChanged(Sender: TObject); override; - function DoRefreshContainer(const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AIsMouseEvent: Boolean): Boolean; override; - procedure SetItemIndex(Value: Integer); override; - procedure SetValue(const AValue: Variant); virtual; // deprecated - procedure SynchronizeDisplayValue; override; - procedure SynchronizeEditValue; override; - procedure UpdateDrawValue; override; - function ClickCheck(AItemIndex: Integer): Boolean; virtual; - function DoClickCheck(AItemIndex: Integer): Boolean; - function GetEditingValue: TcxEditValue; override; - procedure HandleSelectItem(Sender: TObject); override; - procedure Initialize; override; - procedure InitializePopupWindow; override; - function InternalGetText: string; override; - function InternalSetText(const Value: string): Boolean; override; - procedure InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); override; - function IsEditValueStored: Boolean; override; - procedure KeyPress(var Key: Char); override; - property LookupData: TcxCheckComboBoxLookupData read GetLookupData; - property Value: Variant read GetValue write SetValue stored False; // deprecated - procedure CloseUp(AReason: TcxEditCloseUpReason); override; - property StatesItems: Boolean read FStatesItems write FStatesItems stored False; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function GetItemState(AIndex: Integer): TcxCheckBoxState; // deprecated - procedure SetItemState(AIndex: Integer; AState: TcxCheckBoxState); // deprecated - property ActiveProperties: TcxCustomCheckComboBoxProperties - read GetActiveProperties; - property Properties: TcxCustomCheckComboBoxProperties read GetProperties - write SetProperties; - property States[AIndex: Integer]: TcxCheckBoxState read GetItemState - write SetItemState; - end; - - { TcxCheckComboBox } - - TcxCheckComboBox = class(TcxCustomCheckComboBox) - private - function GetActiveProperties: TcxCheckComboBoxProperties; - function GetProperties: TcxCheckComboBoxProperties; - procedure SetProperties(Value: TcxCheckComboBoxProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCheckComboBoxProperties - read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxCheckComboBoxProperties read GetProperties - write SetProperties; - property ShowHint; - property StatesItems; - property EditValue; // to be after StatesItems (B34627) - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Value; // deprecated - property Visible; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxFilterChecksHelper } - - TcxFilterChecksHelper = class(TcxFilterComboBoxHelper) - protected - class function GetEditValueFormat( - AEditProperties: TcxCustomEditProperties): TcxCheckStatesValueFormat; virtual; - class function GetItems( - AEditProperties: TcxCustomEditProperties): IcxCheckItems; virtual; - class procedure InitializeItems(AProperties, - AEditProperties: TcxCustomEditProperties); virtual; - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - - { TcxFilterCheckComboBoxHelper } - - TcxFilterCheckComboBoxHelper = class(TcxFilterChecksHelper) - protected - class function GetEditValueFormat( - AEditProperties: TcxCustomEditProperties): TcxCheckStatesValueFormat; override; - class function GetItems( - AEditProperties: TcxCustomEditProperties): IcxCheckItems; override; - end; - -const - cxCheckComboValuesDelimiter = ';'; - -implementation - -uses - dxThemeManager; - -{ TcxCheckComboBoxItem } - -procedure TcxCheckComboBoxItem.Assign(Source: TPersistent); -begin - if Source is TcxCheckComboBoxItem then - ShortDescription := TcxCheckComboBoxItem(Source).ShortDescription; - inherited Assign(Source); -end; - -function TcxCheckComboBoxItem.GetDisplayDescription: string; -begin - if ShortDescription <> '' then - Result := ShortDescription - else - Result := Description; -end; - -function TcxCheckComboBoxItem.GetDescription: TCaption; -begin - Result := Caption; -end; - -procedure TcxCheckComboBoxItem.SetDescription(const Value: TCaption); -begin - Caption := Value; -end; - -procedure TcxCheckComboBoxItem.SetShortDescription(const Value: TCaption); -begin - if Value <> FShortDescription then - begin - FShortDescription := Value; - DoChanged(Collection, copChanged); - end; -end; - -{ TcxCheckComboBoxItems } - -function TcxCheckComboBoxItems.GetItems(Index: Integer): TcxCheckComboBoxItem; -begin - Result := TcxCheckComboBoxItem(inherited Items[Index]); -end; - -procedure TcxCheckComboBoxItems.SetItems(Index: Integer;const Value: TcxCheckComboBoxItem); -begin - inherited Items[Index] := Value; -end; - -function TcxCheckComboBoxItems.Add: TcxCheckComboBoxItem; -begin - Result := TcxCheckComboBoxItem(inherited Add); -end; - -function TcxCheckComboBoxItems.AddCheckItem(const ADescription: TCaption; - const AShortDescription: TCaption = ''): TcxCheckComboBoxItem; -begin - Result := Add; - Result.Description := ADescription; - Result.ShortDescription := AShortDescription; -end; - -{ TcxCustomCheckComboBoxViewData } - -procedure TcxCustomCheckComboBoxViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); -begin - if IsRectEmpty(ABounds) then - begin - inherited; - Exit; - end; - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - if (ABounds.Right = MaxInt) or (ABounds.Bottom = MaxInt) then Exit; -end; - -function TcxCustomCheckComboBoxViewData.GetProperties: TcxCustomCheckComboBoxProperties; -begin - Result := TcxCustomCheckComboBoxProperties(FProperties); -end; - -function TcxCustomCheckComboBoxViewData.InternalEditValueToDisplayText( - AEditValue: TcxEditValue): string; -var - ASender: TObject; -begin - if IsInplace then - ASender := nil - else - ASender := Edit; - Properties.CalculateCheckStatesByEditValue(ASender, AEditValue, CheckStates); - Result := Properties.CalculateDisplayValueByCheckStates(CheckStates); - Properties.DisplayValueToDisplayText(Result); -end; - -function TcxCustomCheckComboBoxViewData.IsComboBoxStyle: Boolean; -begin - Result := True; -end; - -{ TcxCustomCheckComboBoxListBox } - -constructor TcxCustomCheckComboBoxListBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FCapturedCheckIndex := -1; - FHotCheckIndex := -1; - FInternalUpdate := False; - FPressedCheckIndex := -1; - Style := lbOwnerDrawFixed; -end; - -destructor TcxCustomCheckComboBoxListBox.Destroy; -begin - EndMouseTracking(Self); - inherited Destroy; -end; - -function TcxCustomCheckComboBoxListBox.GetItemHeight(AIndex: Integer = -1): Integer; -begin - if Edit.ActiveProperties.ItemHeight > 0 then - Result := Edit.ActiveProperties.ItemHeight - else - Result := inherited GetItemHeight(AIndex); - if Result < FCheckSize.cy + 2 then - Result := FCheckSize.cy + 2; -end; - -function TcxCustomCheckComboBoxListBox.GetItemWidth(AIndex: Integer): Integer; -begin - Result := inherited GetItemWidth(AIndex); - Inc(Result, ItemHeight); -end; - -procedure TcxCustomCheckComboBoxListBox.MouseTrackingMouseLeave; -begin - InternalMouseMove([], -1, -1); - EndMouseTracking(Self); -end; - -procedure TcxCustomCheckComboBoxListBox.CheckHotTrack; -var - P: TPoint; -begin - P := ScreenToClient(InternalGetCursorPos); - InternalMouseMove(InternalGetShiftState, P.X, P.Y); -end; - -function TcxCustomCheckComboBoxListBox.DoMouseWheel(Shift: TShiftState; - WheelDelta: Integer; MousePos: TPoint): Boolean; -begin - Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); - CheckHotTrack; -end; - -procedure TcxCustomCheckComboBoxListBox.DrawItem(Index: Integer; Rect: TRect; - State: TOwnerDrawState); - - function GetCheckState(AIsItemEnabled: Boolean): TcxEditCheckState; - begin - if not AIsItemEnabled then - Result := ecsDisabled - else - if FHotCheckIndex = Index then - Result := ecsHot - else - if FPressedCheckIndex = Index then - Result := ecsPressed - else - Result := ecsNormal; - end; - - function GetCheckBorderStyle(ACheckState: TcxEditCheckState): TcxEditCheckBoxBorderStyle; - begin - if not Edit.FNativeStyle and (Edit.FCheckBorderStyle = ebsFlat) and - (ACheckState in [ecsHot, ecsPressed]) then - Result := ebs3D - else - Result := Edit.FCheckBorderStyle; - end; - -var - ACheckState: TcxEditCheckState; - AFlags: Longint; - AText: string; - ATextRect : TRect; -begin - if DoDrawItem(Index, Rect, State) then - Exit; - with Edit.ActiveProperties do - begin - Canvas.FillRect(Rect); - FCheckPaintHelper.Glyph := Glyph; - FCheckPaintHelper.GlyphCount := GlyphCount; - ATextRect := FCheckPaintHelper.CalcTextRect(Rect, Edit.FStates[Index]); - AText := GetItem(Index); - AFlags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_LEFT or DT_VCENTER or DT_NOPREFIX); - if not Items[Index].Enabled then - Canvas.Font.Color := Edit.StyleDisabled.TextColor; - cxDrawText(Canvas.Handle, AText, ATextRect, AFlags); - if Rect.Top >= 0 then - begin - ACheckState := GetCheckState(Items[Index].Enabled); - SaveCanvasParametersForFocusRect; - DrawEditCheck(Canvas, GetCheckRect(Rect, True), Edit.FStates[Index], - ACheckState, Glyph, GlyphCount, GetCheckBorderStyle(ACheckState), - Edit.FNativeStyle, clBtnText, Color, False, False, False, False, - Edit.Style.LookAndFeel.SkinPainter); - RestoreCanvasParametersForFocusRect; - end; - end; -end; - -procedure TcxCustomCheckComboBoxListBox.FullRepaint; -var - R: TRect; -begin - if HandleAllocated then - begin - R := GetControlRect(Self); - InvalidateRect(Handle, @R, True); - end; -end; - -function TcxCustomCheckComboBoxListBox.GetCheckAt(X, Y: Integer): Integer; -begin - Result := ItemAtPos(Point(X, Y), True); -end; - -function TcxCustomCheckComboBoxListBox.GetCheckRect(const R: TRect; AReturnFullRect: Boolean): TRect; -begin -// ToDo RightToLeftAlignment - with R do - begin - Result.Top := (Bottom - Top - FCheckSize.cy) div 2; - Result.Left := Result.Top; - Inc(Result.Top, Top); - Result.Bottom := Result.Top + FCheckSize.cy; - if Result.Left < 1 then - Result.Left := 1; - Result.Right := Result.Left + FCheckSize.cx; - end; - if AReturnFullRect then - InflateRect(Result, FCheckBorderOffset, FCheckBorderOffset); -end; - -procedure TcxCustomCheckComboBoxListBox.InternalMouseMove(Shift: TShiftState; X, Y: Integer); -var - ANewHotCheckIndex, ANewPressedCheckIndex: Integer; -begin - ANewHotCheckIndex := FHotCheckIndex; - ANewPressedCheckIndex := FPressedCheckIndex; - if FCapturedCheckIndex <> -1 then - begin - ANewHotCheckIndex := -1; - if GetCheckAt(X, Y) = FCapturedCheckIndex then - ANewPressedCheckIndex := FCapturedCheckIndex - else - ANewPressedCheckIndex := -1; - end; - if (GetCaptureControl <> Self) and (Shift = []) then - ANewHotCheckIndex := GetCheckAt(X, Y); - SynchronizeCheckStates(ANewHotCheckIndex, ANewPressedCheckIndex); -end; - -procedure TcxCustomCheckComboBoxListBox.InvalidateCheck(Index: Integer); -var - R: TRect; -begin - R := ItemRect(Index); - R := GetCheckRect(R, False); - InvalidateRect(Handle, @R, False); -end; - -procedure TcxCustomCheckComboBoxListBox.KeyPress(var Key: Char); -begin - if (ItemIndex <> -1) and Assigned(Edit) then - begin - if (Key = Char(VK_SPACE)) then - begin - if not (Edit.ActiveProperties.Items[ItemIndex].Enabled) then Exit; - FInternalUpdate := True; - UpdateItemState(ItemIndex); - FInternalUpdate := False; - Key := #0; - end; - end - else - inherited KeyPress(Key); -end; - -procedure TcxCustomCheckComboBoxListBox.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited LookAndFeelChanged(Sender, AChangedValues); - RecreateWindow; -end; - -procedure TcxCustomCheckComboBoxListBox.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -var - ANewPressedCheckIndex: Integer; -begin - inherited MouseDown(Button, Shift, X, Y); - if Button = mbLeft then - begin - ANewPressedCheckIndex := GetCheckAt(X, Y); - FCapturedCheckIndex := ANewPressedCheckIndex; - end - else - ANewPressedCheckIndex := -1; - SynchronizeCheckStates(-1, ANewPressedCheckIndex); -end; - -procedure TcxCustomCheckComboBoxListBox.MouseMove(Shift: TShiftState; X, Y: Integer); -var - APopupMouseMoveLocked: Boolean; -begin - APopupMouseMoveLocked := Edit.PopupMouseMoveLocked; - inherited MouseMove(Shift, X, Y); - if not APopupMouseMoveLocked then - begin - InternalMouseMove(Shift, X, Y); - BeginMouseTracking(Self, GetControlRect(Self), Self); - end; -end; - -procedure TcxCustomCheckComboBoxListBox.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - AItemIndex: Integer; - ANewHotCheckIndex, ANewPressedCheckIndex: Integer; -begin - inherited MouseUp(Button, Shift, X, Y); - ANewPressedCheckIndex := FPressedCheckIndex; - if Button = mbLeft then - begin - SetCaptureControl(nil); - AItemIndex := ItemAtPos(Point(X, Y), True); - if (AItemIndex <> -1) and Edit.ActiveProperties.Items[ItemIndex].Enabled then - begin - Edit.LookupData.InternalSetCurrentKey(AItemIndex); - if AItemIndex = FPressedCheckIndex then - UpdateItemState(AItemIndex); - end; - ANewPressedCheckIndex := -1; - end; - if Shift = [] then - ANewHotCheckIndex := GetCheckAt(X, Y) - else - ANewHotCheckIndex := -1; - SynchronizeCheckStates(ANewHotCheckIndex, ANewPressedCheckIndex); -end; - -procedure TcxCustomCheckComboBoxListBox.RecreateWindow; -begin - with Edit do - begin - FCheckSize := GetEditCheckSize(Self.Canvas, PopupControlsLookAndFeel.NativeStyle, - ActiveProperties.Glyph, ActiveProperties.GlyphCount, PopupControlsLookAndFeel.SkinPainter); - FCheckBorderOffset := GetEditCheckBorderOffset(TcxContainerBorderStyle(FCheckBorderStyle), - FNativeStyle, VerifyBitmap(ActiveProperties.Glyph) and (ActiveProperties.GlyphCount > 0), - LookAndFeel.SkinPainter); - end; - FCheckSize.cx := FCheckSize.cx - FCheckBorderOffset * 2; - FCheckSize.cy := FCheckSize.cy - FCheckBorderOffset * 2; - - ItemHeight := GetItemHeight; - if Edit.IsOnMeasureItemEventAssigned then - Style := lbOwnerDrawVariable - else - Style := lbOwnerDrawFixed; -end; - -procedure TcxCustomCheckComboBoxListBox.SetItemIndex(const Value: Integer); -begin - if not FInternalUpdate then - inherited SetItemIndex(Value); -end; - -procedure TcxCustomCheckComboBoxListBox.SynchronizeCheckStates(ANewHotCheckIndex, - ANewPressedIndex: Integer); -begin - if ANewHotCheckIndex <> FHotCheckIndex then - begin - InvalidateCheck(FHotCheckIndex); - FHotCheckIndex := ANewHotCheckIndex; - InvalidateCheck(FHotCheckIndex); - end; - if ANewPressedIndex <> FPressedCheckIndex then - begin - InvalidateCheck(FPressedCheckIndex); - FPressedCheckIndex := ANewPressedIndex; - InvalidateCheck(FPressedCheckIndex); - end; -end; - -procedure TcxCustomCheckComboBoxListBox.UpdateItemState(const AIndex: Integer); -var - ACurrentState: TcxCheckBoxState; -begin - if Edit.ClickCheck(AIndex) then - begin - with Edit.ActiveProperties do - begin - ACurrentState := Edit.FStates[AIndex]; - Edit.FStates[AIndex] := FCheckPaintHelper.GetNextState(ACurrentState); - Edit.SynchronizeEditValue; - Edit.ModifiedAfterEnter := True; - end; - if Edit.ActiveProperties.ImmediatePost and Edit.CanPostEditValue then - Edit.InternalPostEditValue; - InvalidateCheck(AIndex); - end; -end; - -function TcxCustomCheckComboBoxListBox.GetEdit: TcxCustomCheckComboBox; -begin - Result := TcxCustomCheckComboBox(inherited Edit); -end; - -procedure TcxCustomCheckComboBoxListBox.LBGetTextLen(var Message: TMessage); -begin - Message.Result := 0; -end; - -procedure TcxCustomCheckComboBoxListBox.CMMouseEnter(var Message: TMessage); -begin - inherited; - BeginMouseTracking(Self, GetControlRect(Self), Self); -end; - -procedure TcxCustomCheckComboBoxListBox.CMMouseLeave(var Message: TMessage); -begin - inherited; - InternalMouseMove([], -1, -1); - EndMouseTracking(Self); -end; - -{ TcxCheckComboBoxLookupData } - -procedure TcxCheckComboBoxLookupData.TextChanged; -begin -end; - -function TcxCheckComboBoxLookupData.GetListBoxClass: TcxCustomEditListBoxClass; -begin - Result := TcxCustomCheckComboBoxListBox; -end; - -function TcxCheckComboBoxLookupData.GetItem(Index: Integer): string; -begin - with TcxCustomCheckComboBox(Edit).ActiveProperties do - if (Index > -1) and (Index < Items.Count) then - Result := Items[Index].Description - else - Result := '' -end; - -function TcxCheckComboBoxLookupData.GetItemCount: Integer; -begin - Result := TcxCustomCheckComboBox(Edit).ActiveProperties.Items.Count; -end; - -{ TcxCheckComboBox } - -class function TcxCheckComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCheckComboBoxProperties; -end; - -function TcxCheckComboBox.GetActiveProperties: TcxCheckComboBoxProperties; -begin - Result := TcxCheckComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxCheckComboBox.GetProperties: TcxCheckComboBoxProperties; -begin - Result := TcxCheckComboBoxProperties(FProperties); -end; - -procedure TcxCheckComboBox.SetProperties(Value: TcxCheckComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxCheckPaintHelper } - -constructor TcxCheckPaintHelper.Create(AOwner : TPersistent); -begin - inherited; - FStyle := TcxCustomEditStyle.Create(Self, False); -end; - -destructor TcxCheckPaintHelper.Destroy; -begin - FreeAndNil(FStyle); - inherited Destroy; -end; - -procedure TcxCheckPaintHelper.SetStyle(Value: TcxCustomEditStyle); -begin - FStyle.Assign(Value); -end; - -function TcxCheckPaintHelper.GetNextState(Value: TcxCheckBoxState): TcxCheckBoxState; -begin - case Value of - cbsChecked: - Result := cbsUnchecked; - cbsGrayed: - Result := cbsUnchecked; - else - Result := cbsChecked; - end; -end; - -function TcxCheckPaintHelper.GetCheckWidth: Integer; -begin - Result := 13; -end; - -function TcxCheckPaintHelper.CalcTextRect(const ARect: TRect; - const ACheckState: TcxCheckBoxState): TRect; -begin - Result := ARect; - Inc(Result.Left, RectHeight(ARect) + 2); -end; - -function TcxCheckPaintHelper.CalcCheckPoint(const ARect: TRect; - const ACheckState: TcxCheckBoxState): TPoint; -var - FCenterPos : Integer; -begin - FCenterPos := CalcCenterPosHeight(ARect, GetCheckWidth); - Result.X := ARect.Left + FCenterPos; - Result.Y := ARect.Top + FCenterPos; -end; - -function TcxCheckPaintHelper.IsClickInCheck(const AItemRect: TRect; - const ACheckState: TcxCheckBoxState; X, Y: Integer; - const AUseRightToLeftAlignment: Boolean = False): Boolean; -var - FCheckRect : TRect; - FCenterPos : Integer; -begin - FCenterPos := CalcCenterPosHeight(AItemRect, GetCheckWidth); - if not AUseRightToLeftAlignment then - FCheckRect := Bounds(AItemRect.Left + FCenterPos, AItemRect.Top + FCenterPos, - GetCheckWidth, GetCheckWidth) - else - FCheckRect := Bounds(AItemRect.Right - (FCenterPos * 3), AItemRect.Top + FCenterPos, - GetCheckWidth, GetCheckWidth); - Result := (X >= FCheckRect.Left) and (X <= FCheckRect.Right) and - (Y >= FCheckRect.Top) and (Y <= FCheckRect.Bottom); -end; - -{ TcxCustomCheckComboBoxProperties } - -constructor TcxCustomCheckComboBoxProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - DropDownListStyle := lsFixedList; - FDelimiter := cxCheckComboValuesDelimiter; - FEditValueFormat := cvfInteger; - FShowEmptyText := True; - FEmptySelectionText := cxGetResourceString(@cxSCheckComboBoxEmptySelectionText); - FCheckPaintHelper := TcxCheckPaintHelper.Create(nil); - FItems := TcxCheckComboBoxItems.Create(Self, TcxCheckComboBoxItem); - FItems.OnChange := ItemsChanged; - FGlyphCount := 6; -end; - -destructor TcxCustomCheckComboBoxProperties.Destroy; -begin - FreeAndNil(FItems); - FreeAndNil(FCheckPaintHelper); - if Assigned(FGlyph) then FreeAndNil(FGlyph); - inherited; -end; - -function TcxCustomCheckComboBoxProperties.GetGlyph: TBitmap; -begin - if FGlyph = nil then - begin - FGlyph := TBitmap.Create; - FGlyph.OnChange := GlyphChanged; - end; - Result := FGlyph; -end; - -procedure TcxCustomCheckComboBoxProperties.GlyphChanged(Sender: TObject); -begin - Changed; -end; - -function TcxCustomCheckComboBoxProperties.IsDelimiterStored: Boolean; -begin - Result := FDelimiter <> cxCheckComboValuesDelimiter; -end; - -function TcxCustomCheckComboBoxProperties.IsEmptySelectionTextStored: Boolean; -begin - Result := FEmptySelectionText <> - cxGetResourceString(@cxSCheckComboBoxEmptySelectionText); -end; - -procedure TcxCustomCheckComboBoxProperties.SetGlyph(Value: TBitmap); -begin - if Value = nil then - FreeAndNil(FGlyph) - else - Glyph.Assign(Value); - Changed; -end; - -procedure TcxCustomCheckComboBoxProperties.SetGlyphCount(Value: Integer); -begin - if FGlyphCount <> Value then - begin - FGlyphCount := Value; - if FGlyph <> nil then - Changed; - end; -end; - -procedure TcxCustomCheckComboBoxProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomCheckComboBoxProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with TcxCustomCheckComboBoxProperties(Source) do - begin - Self.Delimiter := Delimiter; - Self.EditValueFormat := EditValueFormat; - Self.Glyph := Glyph; - Self.GlyphCount := GlyphCount; - Self.ShowEmptyText := ShowEmptyText; - Self.EmptySelectionText := EmptySelectionText; - Self.Items.Assign(Items); - Self.OnClickCheck := OnClickCheck; - Self.OnEditValueToStates := OnEditValueToStates; - Self.OnStatesToEditValue := OnStatesToEditValue; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomCheckComboBoxProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxCheckComboBox; -end; - -function TcxCustomCheckComboBoxProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - Result := evsValue; -end; - -function TcxCustomCheckComboBoxProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := inherited GetSupportedOperations; - Include(Result, esoSortingByDisplayText); -end; - -class function TcxCustomCheckComboBoxProperties.GetLookupDataClass: TcxInterfacedPersistentClass; -begin - Result := TcxCheckComboBoxLookupData; -end; - -class function TcxCustomCheckComboBoxProperties.GetPopupWindowClass: TcxCustomEditPopupWindowClass; -begin - Result := TcxCheckComboBoxPopupWindow; -end; - -class function TcxCustomCheckComboBoxProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomCheckComboBoxViewData; -end; - -function TcxCustomCheckComboBoxProperties.HasDisplayValue: Boolean; -begin - Result := False; -end; - -procedure TcxCustomCheckComboBoxProperties.SetDelimiter(Value: string); -begin - if FDelimiter <> Value then - begin - FDelimiter := Value; - Changed; - end; -end; - -procedure TcxCustomCheckComboBoxProperties.SetEditValueFormat(Value: TcxCheckStatesValueFormat); -begin - if Value <> FEditValueFormat then - begin - FEditValueFormat := Value; - Items.InternalNotify(nil, -1, copChanged); - CheckEditValueFormat; - end; -end; - -procedure TcxCustomCheckComboBoxProperties.SetEmptySelectionText(Value: string); -begin - if FEmptySelectionText <> Value then - begin - FEmptySelectionText := Value; - Changed; - end; -end; - -procedure TcxCustomCheckComboBoxProperties.SetShowEmptyText(Value: Boolean); -begin - if FShowEmptyText <> Value then - begin - FShowEmptyText := Value; - Changed; - end; -end; - -procedure TcxCustomCheckComboBoxProperties.SetItems(const Value: TcxCheckComboBoxItems); -begin - FItems.Assign(Value); - Changed; -end; - -procedure TcxCustomCheckComboBoxProperties.CheckEditValueFormat; -begin - if (GetRealEditValueFormat = cvfInteger) and (Items.Count > 64) then - raise EdxException.Create(cxGetResourceString(@cxSCheckControlIncorrectItemCount)); -end; - -function TcxCustomCheckComboBoxProperties.GetRealEditValueFormat: TcxCheckStatesValueFormatEx; -begin - if Assigned(OnEditValueToStates) and Assigned(OnStatesToEditValue) then - Result := cvfCustom - else - Result := EditValueFormat; -end; - -procedure TcxCustomCheckComboBoxProperties.ItemsChanged(Sender: TObject; AItem: TCollectionItem); -begin - CheckEditValueFormat; -end; - -procedure TcxCustomCheckComboBoxProperties.CalculateCheckStatesByEditValue( - Sender: TObject; const AEditValue: TcxEditValue; var ACheckStates: TcxCheckStates); -begin - if Assigned(OnEditValueToStates) then - begin - SetLength(ACheckStates, Items.Count); - OnEditValueToStates(Sender, AEditValue, ACheckStates) - end - else - cxCheckBox.CalculateCheckStates(AEditValue, Items, EditValueFormat, - ACheckStates); -end; - -function TcxCustomCheckComboBoxProperties.CalculateDisplayValueByCheckStates( - const ACheckStates: TcxCheckStates): string; -var - I: Integer; -begin - Result := ''; - for I := 0 to Items.Count - 1 do - begin - if ACheckStates[I] <> cbsChecked then - Continue; - if Result <> '' then - Result := Result + FDelimiter; - Result := Result + Items[I].GetDisplayDescription; - end; - if (Result = '') and ShowEmptyText then - Result := EmptySelectionText; -end; - -function TcxCustomCheckComboBoxProperties.CalculateEditValueByCheckStates( - Sender: TObject; const ACheckStates: TcxCheckStates): TcxEditValue; -begin - if Assigned(OnStatesToEditValue) then - OnStatesToEditValue(Sender, ACheckStates, Result) - else - Result := cxCheckBox.CalculateCheckStatesValue(ACheckStates, Items, - EditValueFormat); -end; - -function TcxCustomCheckComboBoxProperties.IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; -begin - Result := True; -end; - -procedure TcxCustomCheckComboBoxProperties.PrepareDisplayValue( - const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; AEditFocused: Boolean); -begin - CalculateCheckStatesByEditValue(nil, AEditValue, CheckStates); - DisplayValue := CalculateDisplayValueByCheckStates(CheckStates); -end; - -{ TcxCustomCheckComboBox } - -class function TcxCustomCheckComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomCheckComboBoxProperties; -end; - -function TcxCustomCheckComboBox.GetItemState(AIndex: Integer): TcxCheckBoxState; -begin - Result := FStates[AIndex]; -end; - -procedure TcxCustomCheckComboBox.SetItemState(AIndex: Integer; AState: TcxCheckBoxState); -begin - if AState = cbsGrayed then Exit; - if FStates[AIndex] <> AState then - begin - FStates[AIndex] := AState; - SynchronizeEditValue; - end; -end; - -function TcxCustomCheckComboBox.ClickCheck(AItemIndex: Integer): Boolean; -begin - Result := CanModify and DoClickCheck(AItemIndex) and DoEditing; -end; - -function TcxCustomCheckComboBox.DoClickCheck(AItemIndex: Integer): Boolean; - - function InternalDoClickCheck(AProperties: TcxCustomCheckComboBoxProperties; - AItemIndex: Integer): Boolean; - begin - Result := True; - if Assigned(AProperties.OnClickCheck) then - AProperties.OnClickCheck(Self, AItemIndex, Result); - end; - -var - AAllowToggle1, AAllowToggle2: Boolean; -begin - AAllowToggle1 := InternalDoClickCheck(Properties, AItemIndex); - if RepositoryItem <> nil then - AAllowToggle2 := InternalDoClickCheck( - TcxCustomCheckComboBoxProperties(RepositoryItem.Properties), AItemIndex) - else - AAllowToggle2 := True; - Result := AAllowToggle1 and AAllowToggle2; -end; - -function TcxCustomCheckComboBox.GetEditingValue: TcxEditValue; -begin - Result := EditValue; -end; - -procedure TcxCustomCheckComboBox.HandleSelectItem(Sender: TObject); -begin -end; - -procedure TcxCustomCheckComboBox.Initialize; -begin - inherited Initialize; - FEditValue := 0; - ControlStyle := ControlStyle - [csClickEvents]; - CalculateDrawCheckParams; -end; - -procedure TcxCustomCheckComboBox.InitializePopupWindow; -begin - inherited InitializePopupWindow; - (PopupWindow as TcxCheckComboBoxPopupWindow).SysPanelStyle := ActiveProperties.PopupSizeable; -end; - -function TcxCustomCheckComboBox.InternalGetText: string; -begin - if IsDestroying then - Result := '' - else - Result := ViewInfo.Text; -end; - -function TcxCustomCheckComboBox.InternalSetText(const Value: string): Boolean; -begin - Result := False; -end; - -procedure TcxCustomCheckComboBox.InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); -begin -end; - -function TcxCustomCheckComboBox.IsEditValueStored: Boolean; -begin - Result := (ActiveProperties.EditValueFormat = cvfInteger) and (EditValue <> 0) or - (ActiveProperties.EditValueFormat <> cvfInteger) and (VarToStr(EditValue) <> ''); -end; - -procedure TcxCustomCheckComboBox.KeyPress(var Key: Char); -begin - if (Key = Char(VK_SPACE)) and HasPopupWindow then - begin - if Assigned(OnKeyPress) then - OnKeyPress(Self, Key); - (LookupData.ActiveControl as TcxCustomCheckComboBoxListBox).KeyPress(Key) - end - else - inherited KeyPress(Key); -end; - -procedure TcxCustomCheckComboBox.CloseUp(AReason: TcxEditCloseUpReason); -begin - if HasPopupWindow then - begin - FCloseUpReason := AReason; - PopupWindow.CloseUp; - if not ActiveProperties.AlwaysPostEditValue and ActiveProperties.ImmediatePost and - CanPostEditValue and ValidateEdit(True) then - InternalPostEditValue; - end; -end; - -function TcxCustomCheckComboBox.GetProperties: TcxCustomCheckComboBoxProperties; -begin - Result := TcxCustomCheckComboBoxProperties(FProperties); -end; - -function TcxCustomCheckComboBox.GetActiveProperties: TcxCustomCheckComboBoxProperties; -begin - Result := TcxCustomCheckComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxCustomCheckComboBox.GetLookupData: TcxCheckComboBoxLookupData; -begin - Result := TcxCheckComboBoxLookupData(FLookupData); -end; - -procedure TcxCustomCheckComboBox.SetProperties(Value: TcxCustomCheckComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomCheckComboBox.CalculateDrawCheckParams; -const - ABorderStyleMap: array[TcxLookAndFeelKind] of TcxEditCheckBoxBorderStyle = - (ebsFlat, ebs3D, ebsUltraFlat, ebsOffice11); -begin - with PopupControlsLookAndFeel do - begin - FNativeStyle := NativeStyle and AreVisualStylesAvailable([totButton, totComboBox]); - if not FNativeStyle then - FCheckBorderStyle := ABorderStyleMap[Kind]; - end; -end; - -function TcxCustomCheckComboBox.GetValue: Variant; -begin - Result := EditValue; -end; - -procedure TcxCustomCheckComboBox.PopupControlsLookAndFeelChanged( - Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); -begin - inherited PopupControlsLookAndFeelChanged(Sender, AChangedValues); - if not IsDestroying then - CalculateDrawCheckParams; -end; - -procedure TcxCustomCheckComboBox.PopupWindowShowed(Sender: TObject); -begin - inherited PopupWindowShowed(Sender); - TcxCustomCheckComboBoxListBox(ILookupData.ActiveControl).CheckHotTrack; -end; - -procedure TcxCustomCheckComboBox.PropertiesChanged(Sender: TObject); -begin - with ActiveProperties.Items do - if ItemChanged and (ChangedItemOperation = copDelete) and (ChangedItemIndex < Length(FStates) - 1) then - Move(FStates[ChangedItemIndex + 1], FStates[ChangedItemIndex], - (ActiveProperties.Items.Count - 1 - ChangedItemIndex) * SizeOf(TcxCheckBoxState)); - SetLength(FStates, ActiveProperties.Items.Count); - - inherited PropertiesChanged(Sender); - - if ModifiedAfterEnter then - UpdateDrawValue - else - if IsDBEdit then - SynchronizeDisplayValue - else - EditValue := ActiveProperties.CalculateEditValueByCheckStates( - GetStandaloneEventSender(Self), FStates); -end; - -function TcxCustomCheckComboBox.DoRefreshContainer(const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AIsMouseEvent: Boolean): Boolean; -begin - Result := inherited DoRefreshContainer(P, Button, Shift, AIsMouseEvent); - ActiveProperties.FCheckPaintHelper.Style.Assign(ActiveStyle); -end; - -procedure TcxCustomCheckComboBox.SetItemIndex(Value: Integer); -begin - LookupData.InternalSetCurrentKey(Value); -end; - -procedure TcxCustomCheckComboBox.SetValue(const AValue: Variant); -begin - InternalEditValue := AValue; -end; - -procedure TcxCustomCheckComboBox.SynchronizeDisplayValue; -begin - ActiveProperties.CalculateCheckStatesByEditValue( - GetStandaloneEventSender(Self), EditValue, FStates); - UpdateDrawValue; -end; - -procedure TcxCustomCheckComboBox.SynchronizeEditValue; -begin - InternalEditValue := ActiveProperties.CalculateEditValueByCheckStates( - GetStandaloneEventSender(Self), FStates); -end; - -procedure TcxCustomCheckComboBox.UpdateDrawValue; -begin - TcxCustomTextEditViewInfo(ViewInfo).SelLength := 0; - TcxCustomTextEditViewInfo(ViewInfo).Text := - ActiveProperties.CalculateDisplayValueByCheckStates(FStates); - with TcxCustomTextEditViewInfo(ViewInfo) do - Self.ActiveProperties.DisplayValueToDisplayText(Text); - with TcxCustomTextEditViewInfo(ViewInfo) do - TextOutData.Initialized := False; - InvalidateRect(TcxCustomTextEditViewInfo(ViewInfo).ClientRect, False); -end; - -{ TcxFilterChecksHelper } - -class function TcxFilterChecksHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxCheckComboBox; -end; - -class function TcxFilterChecksHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoBlanks, fcoNonBlanks]; - if AExtendedSet then - Result := Result + [fcoInList, fcoNotInList]; -end; - -class procedure TcxFilterChecksHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - TcxCustomCheckComboBoxProperties(AProperties).EditValueFormat := - GetEditValueFormat(AEditProperties); - with TcxCustomCheckComboBoxProperties(AProperties) do - begin - Items.Clear; - Buttons.Clear; - Buttons.Add; - Buttons[0].Kind := bkDown; - DropDownListStyle := lsFixedList; - end; - InitializeItems(AProperties, AEditProperties); -end; - -class function TcxFilterChecksHelper.GetEditValueFormat( - AEditProperties: TcxCustomEditProperties): TcxCheckStatesValueFormat; -begin - Result := cvfCaptions; -end; - -class function TcxFilterChecksHelper.GetItems( - AEditProperties: TcxCustomEditProperties): IcxCheckItems; -begin - Result := nil; -end; - -class procedure TcxFilterChecksHelper.InitializeItems(AProperties, - AEditProperties: TcxCustomEditProperties); -var - AItems: IcxCheckItems; - I: Integer; -begin - AItems := GetItems(AEditProperties); - if AItems = nil then - Exit; - for I := 0 to AItems.Count - 1 do - TcxCustomCheckComboBoxProperties(AProperties).Items.Add.Description := - AItems.Captions[I]; -end; - -{ TcxFilterCheckComboBoxHelper } - -class function TcxFilterCheckComboBoxHelper.GetEditValueFormat( - AEditProperties: TcxCustomEditProperties): TcxCheckStatesValueFormat; -begin - Result := TcxCustomCheckComboBoxProperties(AEditProperties).EditValueFormat -end; - -class function TcxFilterCheckComboBoxHelper.GetItems( - AEditProperties: TcxCustomEditProperties): IcxCheckItems; -begin - Result := TcxCustomCheckComboBoxProperties(AEditProperties).Items; -end; - -initialization - GetRegisteredEditProperties.Register(TcxCheckComboBoxProperties, scxSEditRepositoryCheckComboBox); - FilterEditsController.Register(TcxCheckComboBoxProperties, TcxFilterCheckComboBoxHelper); - -finalization - FilterEditsController.Unregister(TcxCheckComboBoxProperties, TcxFilterCheckComboBoxHelper); - GetRegisteredEditProperties.Unregister(TcxCheckComboBoxProperties); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckGroup.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxCheckGroup.pas deleted file mode 100644 index 24da3092..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckGroup.pas +++ /dev/null @@ -1,1335 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxCheckGroup; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, Graphics, Messages, Controls, - dxCore, cxContainer, cxGraphics, cxLookAndFeels,cxEdit, cxGroupBox, - cxCheckBox, cxFilterControlUtils, cxCheckComboBox, - cxLookAndFeelPainters; - -type - { TcxCheckGroupItem } - - TcxCheckGroupItem = class(TcxButtonGroupItem) - published - property Caption; - property Enabled; - property Tag; - end; - - { TcxCheckGroupItems } - - TcxCheckGroupItems = class(TcxButtonGroupItems) - private - function GetItem(Index: Integer): TcxCheckGroupItem; - procedure SetItem(Index: Integer; Value: TcxCheckGroupItem); - public - function Add: TcxCheckGroupItem; - property Items[Index: Integer]: TcxCheckGroupItem - read GetItem write SetItem; default; - end; - - { TcxCheckGroupButtonViewInfo } - - TcxCheckGroupButtonViewInfo = class(TcxGroupBoxButtonViewInfo) - public - State: TcxCheckBoxState; - function GetGlyphRect(ACanvas: TcxCanvas; AGlyphSize: TSize; AAlignment: TLeftRight; AIsPaintCopy: Boolean): TRect; override; - end; - - TcxCustomCheckGroup = class; - - { TcxCheckGroupViewInfo } - - TcxCheckGroupViewInfo = class(TcxButtonGroupViewInfo) - private - function GetEdit: TcxCustomCheckGroup; - protected - procedure DrawButtonCaption(ACanvas: TcxCanvas; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; const AGlyphRect: TRect); override; - procedure DrawButtonGlyph(ACanvas: TcxCanvas; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; const AGlyphRect: TRect); override; - function GetButtonViewInfoClass: TcxEditButtonViewInfoClass; override; - function IsButtonGlypthTransparent(AButtonViewInfo: TcxGroupBoxButtonViewInfo): Boolean; override; - - procedure SetOnDrawBackground(AValue: TcxEditDrawBackgroundEvent); override; - public - CheckBorderStyle: TcxEditCheckBoxBorderStyle; - property Edit: TcxCustomCheckGroup read GetEdit; - end; - - { TcxCheckGroupViewData } - - TcxCheckGroupViewData = class(TcxButtonGroupViewData) - protected - procedure CalculateButtonNativeState(AViewInfo: TcxCustomEditViewInfo; - AButtonViewInfo: TcxGroupBoxButtonViewInfo); override; - function GetCaptionRectExtent: TRect; override; - procedure GetEditMetrics(AAutoHeight: Boolean; ACanvas: TcxCanvas; - out AMetrics: TcxEditMetrics); override; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - end; - - { TcxCustomCheckGroupProperties } - - TcxCustomCheckGroupProperties = class(TcxCustomButtonGroupProperties) - private - FAllowGrayed: Boolean; - FEditValueFormat: TcxCheckStatesValueFormat; - FGlyph: TBitmap; - FGlyphCount: Integer; - FItemAlignment: TLeftRight; - FOnEditValueToStates: TcxValueToCheckStatesEvent; - FOnStatesToEditValue: TcxCheckStatesToValueEvent; - function GetGlyph: TBitmap; - function GetItems: TcxCheckGroupItems; - procedure GlyphChanged(Sender: TObject); - procedure SetAllowGrayed(Value: Boolean); - procedure SetEditValueFormat(Value: TcxCheckStatesValueFormat); - procedure SetGlyph(Value: TBitmap); - procedure SetGlyphCount(Value: Integer); - procedure SetItemAlignment(Value: TLeftRight); - procedure SetItems(Value: TcxCheckGroupItems); - - procedure CheckEditValueFormat; - function GetRealEditValueFormat: TcxCheckStatesValueFormatEx; - procedure ItemsChanged(Sender: TObject; AItem: TCollectionItem); - protected - function CreateItems: TcxButtonGroupItems; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function HasDisplayValue: Boolean; override; - procedure CalculateCheckStatesByEditValue(Sender: TObject; - const AEditValue: TcxEditValue); virtual; - procedure CalculateEditValueByCheckStates(Sender: TObject; - out AEditValue: TcxEditValue); virtual; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; override; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - // !!! - property AllowGrayed: Boolean read FAllowGrayed write SetAllowGrayed - default False; - property EditValueFormat: TcxCheckStatesValueFormat read FEditValueFormat - write SetEditValueFormat default cvfIndices; - property Glyph: TBitmap read GetGlyph write SetGlyph; - property GlyphCount: Integer read FGlyphCount write SetGlyphCount default 6; - property ItemAlignment: TLeftRight read FItemAlignment - write SetItemAlignment default taLeftJustify; - property Items: TcxCheckGroupItems read GetItems write SetItems; - property OnEditValueToStates: TcxValueToCheckStatesEvent - read FOnEditValueToStates write FOnEditValueToStates; - property OnStatesToEditValue: TcxCheckStatesToValueEvent - read FOnStatesToEditValue write FOnStatesToEditValue; - end; - - { TcxCheckGroupProperties } - - TcxCheckGroupProperties = class(TcxCustomCheckGroupProperties) - published - property AllowGrayed; - property AssignedValues; - property ClearKey; - property Columns; - property EditValueFormat; - property Glyph; - property GlyphCount; - property ImmediatePost; - property ItemAlignment; - property Items; - property ReadOnly; - property WordWrap; - property OnChange; - property OnEditValueChanged; - property OnEditValueToStates; - property OnStatesToEditValue; - end; - - { TcxCheckGroupCheckButtonViewInfo } - - TcxCheckGroupCheckButtonViewInfo = class(TcxCustomCheckBoxViewInfo) - protected - procedure InternalPaint(ACanvas: TcxCanvas); override; - end; - - { TcxCheckGroupButtonProperties } - - TcxCheckGroupButtonProperties = class(TcxCheckBoxProperties) - protected - function InternalGetGlyph: TBitmap; override; - function IsEmbeddedEdit: Boolean; override; - public - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - end; - - { TcxCheckGroupButton } - - TcxCheckGroupButton = class(TcxCheckBox, IcxContainerInnerControl) - private - FColumn: Integer; - FRow: Integer; - function GetCheckGroup: TcxCustomCheckGroup; - protected - function CanAutoSize: Boolean; override; - procedure DoExit; override; - procedure Initialize; override; - function IsNativeBackground: Boolean; override; - function IsNativeStyle: Boolean; override; - function IsTransparent: Boolean; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - procedure WndProc(var Message: TMessage); override; - - // IcxContainerInnerControl - function GetControl: TWinControl; - function GetControlContainer: TcxContainer; - - procedure CheckTransparentBorder; - property CheckGroup: TcxCustomCheckGroup read GetCheckGroup; - public - destructor Destroy; override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - end; - - { TcxCustomCheckGroup } - - TcxCustomCheckGroup = class(TcxCustomButtonGroup) - private - FButtonStatesChanging: Boolean; - FFocusedItemIndex: Integer; - FStatesItems: Boolean; - procedure DoButtonChange(Sender: TObject); - procedure DoButtonEditing(Sender: TObject; var CanEdit: Boolean); - procedure DoButtonFocusChanged(Sender: TObject); - function GetActiveProperties: TcxCustomCheckGroupProperties; - function GetButton(Index: Integer): TcxCheckGroupButton; - function GetProperties: TcxCustomCheckGroupProperties; - function GetState(Index: Integer): TcxCheckBoxState; - procedure SetProperties(Value: TcxCustomCheckGroupProperties); - procedure SetState(Index: Integer; Value: TcxCheckBoxState); - protected - procedure ArrangeButtons; override; - function GetButtonDC(AButtonIndex: Integer): THandle; override; - function GetButtonInstance: TWinControl; override; - procedure Initialize; override; - procedure InternalSetEditValue(const Value: TcxEditValue; AValidateEditValue: Boolean); override; - procedure InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); override; - function IsEditValueStored: Boolean; override; - procedure ParentBackgroundChanged; override; - procedure PropertiesChanged(Sender: TObject); override; - procedure SynchronizeButtonsStyle; override; - procedure SynchronizeDisplayValue; override; - procedure SynchronizeModifiedAfterEnter; virtual; - procedure UpdateButtons; override; - function WantNavigationKeys: Boolean; override; - function GetFirstEnabledItemIndex(AStartIndex: Integer): Integer; - property Buttons[Index: Integer]: TcxCheckGroupButton read GetButton; - property InternalButtons; - property StatesItems: Boolean read FStatesItems write FStatesItems stored False; - public - procedure Activate(var AEditData: TcxCustomEditData); override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure GetTabOrderList(List: TList); override; - procedure SetFocus; override; - property ActiveProperties: TcxCustomCheckGroupProperties - read GetActiveProperties; - property Properties: TcxCustomCheckGroupProperties read GetProperties - write SetProperties; - property States[Index: Integer]: TcxCheckBoxState read GetState - write SetState; default; - property Transparent; - end; - - { TcxCheckGroup } - - TcxCheckGroup = class(TcxCustomCheckGroup) - private - function GetActiveProperties: TcxCheckGroupProperties; - function GetProperties: TcxCheckGroupProperties; - procedure SetProperties(Value: TcxCheckGroupProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCheckGroupProperties read GetActiveProperties; - published - property Align; - property Alignment; - property Anchors; - property Caption; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property EditValue; - property Enabled; - property ParentBackground; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxCheckGroupProperties read GetProperties - write SetProperties; - property ShowHint; - property StatesItems; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnClick; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnFocusChanged; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxFilterCheckGroupHelper } - - TcxFilterCheckGroupHelper = class(TcxFilterChecksHelper) - protected - class function GetEditValueFormat( - AEditProperties: TcxCustomEditProperties): TcxCheckStatesValueFormat; override; - class function GetItems( - AEditProperties: TcxCustomEditProperties): IcxCheckItems; override; - class procedure InitializeItems(AProperties, - AEditProperties: TcxCustomEditProperties); override; - end; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, - Types, -{$ENDIF} - SysUtils, cxClasses, cxControls, cxVariants, cxExtEditConsts, cxEditUtils, - dxThemeManager, cxEditPaintUtils; - -{ TcxCheckGroupItems } - -function TcxCheckGroupItems.Add: TcxCheckGroupItem; -begin - Result := TcxCheckGroupItem(inherited Add); -end; - -function TcxCheckGroupItems.GetItem(Index: Integer): TcxCheckGroupItem; -begin - Result := TcxCheckGroupItem(inherited Items[Index]); -end; - -procedure TcxCheckGroupItems.SetItem(Index: Integer; Value: TcxCheckGroupItem); -begin - inherited Items[Index] := Value; -end; - -{ TcxCheckGroupButtonViewInfo } - -function TcxCheckGroupButtonViewInfo.GetGlyphRect(ACanvas: TcxCanvas; - AGlyphSize: TSize; AAlignment: TLeftRight; AIsPaintCopy: Boolean): TRect; - - procedure CorrectCheckRect(var ACheckRect: TRect); - begin - if AIsPaintCopy then - if AAlignment = taRightJustify then - OffsetRect(ACheckRect, 2, 0) - else - OffsetRect(ACheckRect, -2, 0); - end; - -begin - case AAlignment of - taLeftJustify: AAlignment := taRightJustify; - taRightJustify: AAlignment := taLeftJustify; - end; - Result := inherited GetGlyphRect(ACanvas, AGlyphSize, AAlignment, AIsPaintCopy); - CorrectCheckRect(Result); -end; - -{ TcxCheckGroupViewInfo } - -procedure TcxCheckGroupViewInfo.DrawButtonCaption(ACanvas: TcxCanvas; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; const AGlyphRect: TRect); - - function GetCaptionRect(const ACheckRect: TRect): TRect; - begin - Result := AButtonViewInfo.Bounds; - if Alignment = taLeftJustify then - begin - Result.Left := ACheckRect.Right + CaptionExtent.Left; - Dec(Result.Right, CaptionExtent.Right); - end - else - begin - Result.Right := ACheckRect.Left - CaptionExtent.Right; - Inc(Result.Left, CaptionExtent.Left); - end; - end; - -begin - DrawCheckBoxText(ACanvas, AButtonViewInfo.Caption, Font, TextColor, - GetCaptionRect(AGlyphRect), DrawTextFlags, Enabled); -end; - -procedure TcxCheckGroupViewInfo.DrawButtonGlyph(ACanvas: TcxCanvas; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; const AGlyphRect: TRect); -const - ACheckStateByButtonState: array[TcxEditButtonState] of TcxEditCheckState = - (ecsDisabled, ecsNormal, ecsPressed, ecsHot); -var - ACheckBorderStyle: TcxEditBorderStyle; - AEditProperties: TcxCustomCheckGroupProperties; -begin - if (CheckBorderStyle = ebsFlat) and (AButtonViewInfo.Data.State = ebsSelected) then - ACheckBorderStyle := ebs3D - else - ACheckBorderStyle := CheckBorderStyle; - AEditProperties := TcxCustomCheckGroupProperties(EditProperties); - - DrawEditCheck(ACanvas, AGlyphRect, TcxCheckGroupButtonViewInfo(AButtonViewInfo).State, - ACheckStateByButtonState[AButtonViewInfo.Data.State], AEditProperties.Glyph, - AEditProperties.GlyphCount, ACheckBorderStyle, AButtonViewInfo.Data.NativeStyle, - clBtnText, BackgroundColor, not IsBackgroundTransparent, IsDesigning, False, True, - Painter); -end; - -function TcxCheckGroupViewInfo.GetButtonViewInfoClass: TcxEditButtonViewInfoClass; -begin - Result := TcxCheckGroupButtonViewInfo; -end; - -function TcxCheckGroupViewInfo.IsButtonGlypthTransparent(AButtonViewInfo: TcxGroupBoxButtonViewInfo): Boolean; -begin - Result := IsBackgroundTransparent; -end; - -procedure TcxCheckGroupViewInfo.SetOnDrawBackground(AValue: TcxEditDrawBackgroundEvent); -var - I: Integer; -begin - inherited SetOnDrawBackground(AValue); - if Edit <> nil then - for I := 0 to Edit.InternalButtons.Count - 1 do - TcxCheckGroupButton(Edit.InternalButtons[I]).ViewInfo.OnDrawBackground := AValue; -end; - -function TcxCheckGroupViewInfo.GetEdit: TcxCustomCheckGroup; -begin - Result := TcxCustomCheckGroup(FEdit); -end; - -{ TcxCheckGroupViewData } - -procedure TcxCheckGroupViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); -const - ABorderStyle: array[TcxLookAndFeelKind] of TcxEditCheckBoxBorderStyle = - (ebsFlat, ebs3D, ebsUltraFlat, ebsOffice11); -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, - AIsMouseEvent); - with TcxCustomCheckGroupProperties(Properties) do - begin - TcxCheckGroupViewInfo(AViewInfo).GlyphSize := - GetEditCheckSize(ACanvas, IsButtonNativeStyle(Style.LookAndFeel), Glyph, - GlyphCount, AViewInfo.Painter); - TcxCheckGroupViewInfo(AViewInfo).Alignment := ItemAlignment; - end; - TcxCheckGroupViewInfo(AViewInfo).CheckBorderStyle := - ABorderStyle[Style.LookAndFeel.Kind]; - AViewInfo.BackgroundColor := Style.Color; -end; - -procedure TcxCheckGroupViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -var - ASender: TObject; - I: Integer; -begin - with TcxCustomCheckGroupProperties(Properties) do - begin - if IsInplace then - ASender := nil - else - ASender := Edit; - TcxCheckGroupViewInfo(AViewInfo).SetButtonCount(Items.Count); - if PreviewMode then - TcxCheckGroupButtonViewInfo(AViewInfo.ButtonsInfo[0]).State := cbsChecked - else - begin - CalculateCheckStatesByEditValue(ASender, AEditValue); - for I := 0 to Items.Count - 1 do - TcxCheckGroupButtonViewInfo(AViewInfo.ButtonsInfo[I]).State := CheckStates[I]; - end; - end; - if epoAutoHeight in PaintOptions then - Include(AViewInfo.PaintOptions, epoAutoHeight); -end; - -procedure TcxCheckGroupViewData.CalculateButtonNativeState(AViewInfo: TcxCustomEditViewInfo; - AButtonViewInfo: TcxGroupBoxButtonViewInfo); -begin -end; - -function TcxCheckGroupViewData.GetCaptionRectExtent: TRect; -begin - Result.Top := 0; - Result.Bottom := 0; - if TcxCustomCheckGroupProperties(Properties).ItemAlignment = taLeftJustify then - begin - Result.Left := 3; - Result.Right := 2; - end - else - begin - Result.Right := 2; - Result.Left := 2; - end; -end; - -procedure TcxCheckGroupViewData.GetEditMetrics(AAutoHeight: Boolean; - ACanvas: TcxCanvas; out AMetrics: TcxEditMetrics); -begin - AMetrics.ClientLeftBoundCorrection := 6 - (5 + - Integer(TcxCustomCheckGroupProperties(Properties).ItemAlignment = - taRightJustify)) * Integer(IsInplace); - AMetrics.ClientWidthCorrection := 5 * Integer(IsInplace) - 6; - AMetrics.ColumnOffset := 6; - if ACanvas = nil then - Exit; - - AMetrics.ButtonSize := GetEditCheckSize(ACanvas, - IsButtonNativeStyle(Style.LookAndFeel), - TcxCustomCheckGroupProperties(Properties).FGlyph, - TcxCustomCheckGroupProperties(Properties).GlyphCount, - Style.LookAndFeel.Painter); - with GetCaptionRectExtent do - AMetrics.AutoHeightColumnWidthCorrection := Left + Right; - AMetrics.ColumnWidthCorrection := AMetrics.AutoHeightColumnWidthCorrection; - AMetrics.WidthCorrection := 6 - 5 * Integer(IsInplace); - AMetrics.AutoHeightWidthCorrection := AMetrics.ClientWidthCorrection; -end; - -{ TcxCustomCheckGroupProperties } - -constructor TcxCustomCheckGroupProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FEditValueFormat := cvfIndices; - FItemAlignment := taLeftJustify; - FGlyphCount := 6; - - Items.OnChange := ItemsChanged; -end; - -destructor TcxCustomCheckGroupProperties.Destroy; -begin - if FGlyph <> nil then - FreeAndNil(FGlyph); - inherited Destroy; -end; - -procedure TcxCustomCheckGroupProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomCheckGroupProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with TcxCustomCheckGroupProperties(Source) do - begin - Self.AllowGrayed := AllowGrayed; - Self.ItemAlignment := ItemAlignment; - Self.WordWrap := WordWrap; - Self.Glyph := Glyph; - Self.GlyphCount := GlyphCount; - Self.EditValueFormat := EditValueFormat; - Self.OnEditValueToStates := OnEditValueToStates; - Self.OnStatesToEditValue := OnStatesToEditValue; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomCheckGroupProperties.CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; -var - ACheckStates: TcxCheckStates; -begin - CalculateCheckStatesByEditValue(nil, AEditValue1); - ACheckStates := Copy(CheckStates); - CalculateCheckStatesByEditValue(nil, AEditValue2); - Result := CompareMem(@ACheckStates[0], @CheckStates[0], - SizeOf(TcxCheckBoxState) * Length(CheckStates)); -end; - -class function TcxCustomCheckGroupProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxCheckGroup; -end; - -function TcxCustomCheckGroupProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -var - ACheckStateNames: array[TcxCheckBoxState] of WideString; - - procedure InitCheckStateNames; - begin - ACheckStateNames[cbsUnchecked] := - cxGetResourceString(@cxSEditCheckGroupUnchecked); - ACheckStateNames[cbsChecked] := - cxGetResourceString(@cxSEditCheckGroupChecked); - ACheckStateNames[cbsGrayed] := - cxGetResourceString(@cxSEditCheckGroupGrayed); - end; - -var - I: Integer; -begin - CalculateCheckStatesByEditValue(nil, AEditValue); - InitCheckStateNames; - - Result := ''; - for I := 0 to Items.Count - 1 do - begin - Result := Result + Items[I].Caption + - cxGetResourceString(@cxSEditCheckGroupCaptionStateDelimiter) + - ACheckStateNames[CheckStates[I]]; - if I < Items.Count - 1 then - Result := Result + cxGetResourceString(@cxSEditCheckGroupFilterColumnSeparator); - end; -end; - -class function TcxCustomCheckGroupProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCheckGroupViewInfo; -end; - -function TcxCustomCheckGroupProperties.CreateItems: TcxButtonGroupItems; -begin - Result := TcxCheckGroupItems.Create(Self, TcxCheckGroupItem); -end; - -class function TcxCustomCheckGroupProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCheckGroupViewData; -end; - -function TcxCustomCheckGroupProperties.HasDisplayValue: Boolean; -begin - Result := True; -end; - -procedure TcxCustomCheckGroupProperties.CalculateCheckStatesByEditValue( - Sender: TObject; const AEditValue: TcxEditValue); -begin - if Assigned(OnEditValueToStates) then - begin - SetLength(CheckStates, Items.Count); - OnEditValueToStates(Sender, AEditValue, CheckStates); - end - else - cxCheckBox.CalculateCheckStates(AEditValue, Items, EditValueFormat, CheckStates); -end; - -procedure TcxCustomCheckGroupProperties.CalculateEditValueByCheckStates( - Sender: TObject; out AEditValue: TcxEditValue); -begin - if Assigned(OnStatesToEditValue) then - OnStatesToEditValue(Sender, CheckStates, AEditValue) - else - AEditValue := cxCheckBox.CalculateCheckStatesValue(CheckStates, Items, EditValueFormat); -end; - -function TcxCustomCheckGroupProperties.GetGlyph: TBitmap; -begin - if FGlyph = nil then - begin - FGlyph := TBitmap.Create; - FGlyph.OnChange := GlyphChanged; - end; - Result := FGlyph; -end; - -function TcxCustomCheckGroupProperties.GetItems: TcxCheckGroupItems; -begin - Result := TcxCheckGroupItems(inherited Items); -end; - -procedure TcxCustomCheckGroupProperties.GlyphChanged(Sender: TObject); -begin - Changed; -end; - -procedure TcxCustomCheckGroupProperties.SetAllowGrayed(Value: Boolean); -begin - if Value <> FAllowGrayed then - begin - FAllowGrayed := Value; - Changed; - end; -end; - -procedure TcxCustomCheckGroupProperties.SetEditValueFormat(Value: TcxCheckStatesValueFormat); -begin - if Value <> FEditValueFormat then - begin - FEditValueFormat := Value; - Changed; - CheckEditValueFormat; - end; -end; - -procedure TcxCustomCheckGroupProperties.SetGlyph(Value: TBitmap); -begin - if Value = nil then - FreeAndNil(FGlyph) - else - Glyph.Assign(Value); - Changed; -end; - -procedure TcxCustomCheckGroupProperties.SetGlyphCount(Value: Integer); -begin - if FGlyphCount <> Value then - begin - FGlyphCount := Value; - if FGlyph <> nil then - Changed; - end; -end; - -procedure TcxCustomCheckGroupProperties.SetItemAlignment(Value: TLeftRight); -begin - if Value <> FItemAlignment then - begin - FItemAlignment := Value; - Changed; - end; -end; - -procedure TcxCustomCheckGroupProperties.SetItems(Value: TcxCheckGroupItems); -begin - inherited Items.Assign(Value); -end; - -procedure TcxCustomCheckGroupProperties.CheckEditValueFormat; -begin - if (GetRealEditValueFormat = cvfInteger) and (Items.Count > 64) then - raise EdxException.Create(cxGetResourceString(@cxSCheckControlIncorrectItemCount)); -end; - -function TcxCustomCheckGroupProperties.GetRealEditValueFormat: TcxCheckStatesValueFormatEx; -begin - if Assigned(OnEditValueToStates) and Assigned(OnStatesToEditValue) then - Result := cvfCustom - else - Result := EditValueFormat; -end; - -procedure TcxCustomCheckGroupProperties.ItemsChanged(Sender: TObject; AItem: TCollectionItem); -begin - CheckEditValueFormat; -end; - -{ TcxCheckGroupCheckButtonViewInfo } - -procedure TcxCheckGroupCheckButtonViewInfo.InternalPaint(ACanvas: TcxCanvas); -var - ARect: TRect; - ABitmap: TBitmap; - ABitmapCanvas: TcxCanvas; -begin - if Painter <> nil then - begin - ARect := ClientRect; - ABitmap := cxCreateBitmap(ARect, pf32bit); - ABitmapCanvas := TcxCanvas.Create(ABitmap.Canvas); - try - Painter.DrawGroupBoxBackground(ABitmapCanvas, ARect, - Rect(0, 0, ABitmap.Width, ABitmap.Height)); - inherited InternalPaint(ABitmapCanvas); - ACanvas.Draw(0, 0, ABitmap); - finally - ABitmapCanvas.Free; - ABitmap.Free; - end; - end - else - inherited InternalPaint(ACanvas); -end; - -{ TcxCheckGroupButtonProperties } - -function TcxCheckGroupButtonProperties.InternalGetGlyph: TBitmap; -begin - Result := - (TcxCheckGroupButton(Owner).Owner as TcxCustomCheckGroup).ActiveProperties.Glyph; -end; - -function TcxCheckGroupButtonProperties.IsEmbeddedEdit: Boolean; -begin - Result := True; -end; - -class function TcxCheckGroupButtonProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCheckGroupCheckButtonViewInfo; -end; - -{ TcxCheckGroupButton } - -destructor TcxCheckGroupButton.Destroy; -begin - TcxCustomCheckGroup(GetOwner).InternalButtons.Remove(Self); - inherited Destroy; -end; - -function TcxCheckGroupButton.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - CheckGroup.DataBinding.ExecuteAction(Action); -end; - -class function TcxCheckGroupButton.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCheckGroupButtonProperties; -end; - -function TcxCheckGroupButton.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - CheckGroup.DataBinding.UpdateAction(Action); -end; - -function TcxCheckGroupButton.CanAutoSize: Boolean; -begin - Result := False; -end; - -procedure TcxCheckGroupButton.DoExit; -begin - inherited DoExit; - CheckGroup.FFocusedItemIndex := CheckGroup.InternalButtons.IndexOf(Self); -end; - -procedure TcxCheckGroupButton.Initialize; -begin - inherited Initialize; - CheckGroup.InternalButtons.Add(Self); - Style.LookAndFeel.MasterLookAndFeel := CheckGroup.LookAndFeel; - Keys := Keys + [kArrows]; - CheckTransparentBorder; -end; - -function TcxCheckGroupButton.IsNativeBackground: Boolean; -begin - Result := CheckGroup.IsNativeBackground; -end; - -function TcxCheckGroupButton.IsNativeStyle: Boolean; -begin - Result := CheckGroup.IsButtonNativeStyle; -end; - -function TcxCheckGroupButton.IsTransparent: Boolean; -begin - Result := CheckGroup.IsTransparent; -end; - -procedure TcxCheckGroupButton.KeyDown(var Key: Word; Shift: TShiftState); - - procedure FocusNearestItem(ADown: Boolean); - var - AIndex, I, ADelta: Integer; - begin - with CheckGroup do - begin - AIndex := InternalButtons.IndexOf(Self); - ADelta := Integer(ADown) - Integer(not ADown); - I := AIndex; - repeat - I := I + ADelta; - if I = InternalButtons.Count then - I := 0 - else - if I < 0 then - I := InternalButtons.Count - 1; - if Buttons[I].Enabled then - Break; - until I = AIndex; - if I <> AIndex then - Buttons[I].SetFocus; - end; - end; -var - APrevKeyDownEvent: TKeyEvent; -begin - _TcxContainerAccess.KeyDown(CheckGroup, Key, Shift); - if Key = 0 then - Exit; - if not CheckGroup.IsInplace then - if Key in [VK_UP, VK_LEFT] then - FocusNearestItem(False) - else - if Key in [VK_DOWN, VK_RIGHT] then - FocusNearestItem(True); - APrevKeyDownEvent := OnKeyDown; - OnKeyDown := nil; - inherited KeyDown(Key, Shift); - OnKeyDown := APrevKeyDownEvent; -end; - -procedure TcxCheckGroupButton.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited LookAndFeelChanged(Sender, AChangedValues); - CheckTransparentBorder; -end; - -procedure TcxCheckGroupButton.WndProc(var Message: TMessage); -begin - with Message do - if ((Msg = WM_LBUTTONDOWN) or (Msg = WM_LBUTTONDBLCLK)) and - (CheckGroup.DragMode = dmAutomatic) and not(csDesigning in CheckGroup.ComponentState) then - begin - _TcxContainerAccess.BeginAutoDrag(CheckGroup); - Exit; - end; - inherited WndProc(Message); -end; - -function TcxCheckGroupButton.GetControl: TWinControl; -begin - Result := Self; -end; - -function TcxCheckGroupButton.GetControlContainer: TcxContainer; -begin - Result := CheckGroup; -end; - -procedure TcxCheckGroupButton.CheckTransparentBorder; -begin - if Style.LookAndFeel.SkinPainter <> nil then - ViewInfo.Transparent := True; - if not CheckGroup.IsInplace then - Style.TransparentBorder := IsNativeStyle; -end; - -function TcxCheckGroupButton.GetCheckGroup: TcxCustomCheckGroup; -begin - Result := TcxCustomCheckGroup(Owner); -end; - -{ TcxCustomCheckGroup } - -procedure TcxCustomCheckGroup.Activate(var AEditData: TcxCustomEditData); -begin - FFocusedItemIndex := 0; - inherited Activate(AEditData); -end; - -class function TcxCustomCheckGroup.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomCheckGroupProperties; -end; - -procedure TcxCustomCheckGroup.GetTabOrderList(List: TList); -var - AFocusedItemIndex: Integer; -begin - inherited GetTabOrderList(List); - List.Remove(Self); - if Focused then - AFocusedItemIndex := GetFocusedButtonIndex - else - AFocusedItemIndex := GetFirstEnabledItemIndex(FFocusedItemIndex); - if (AFocusedItemIndex <> -1) and TabStop then - List.Add(InternalButtons[AFocusedItemIndex]); -end; - -procedure TcxCustomCheckGroup.SetFocus; -begin - inherited SetFocus; - FFocusedItemIndex := GetFirstEnabledItemIndex(FFocusedItemIndex); - if FFocusedItemIndex <> -1 then - TWinControl(InternalButtons[FFocusedItemIndex]).SetFocus; -end; - -procedure TcxCustomCheckGroup.ArrangeButtons; -var - AButtonViewInfo: TcxGroupBoxButtonViewInfo; - I: Integer; -begin - inherited ArrangeButtons; - for I := 0 to InternalButtons.Count - 1 do - with Buttons[I] do - begin - AButtonViewInfo := TcxGroupBoxButtonViewInfo(Self.ViewInfo.ButtonsInfo[I]); - FColumn := AButtonViewInfo.Column; - FRow := AButtonViewInfo.Row; - end; -end; - -function TcxCustomCheckGroup.GetButtonDC(AButtonIndex: Integer): THandle; -begin - Result := Buttons[AButtonIndex].Canvas.Handle; -end; - -function TcxCustomCheckGroup.GetButtonInstance: TWinControl; -begin - Result := TcxCheckGroupButton.Create(Self, IsInplace); -end; - -procedure TcxCustomCheckGroup.Initialize; -begin - inherited Initialize; - ControlStyle := ControlStyle - [csAcceptsControls]; - FFocusedItemIndex := -1; - InternalEditValue := 0; -end; - -procedure TcxCustomCheckGroup.InternalSetEditValue(const Value: TcxEditValue; AValidateEditValue: Boolean); -begin - inherited InternalSetEditValue(Value, AValidateEditValue); - SynchronizeModifiedAfterEnter; -end; - -procedure TcxCustomCheckGroup.InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); -var - APrevEditValue: TcxEditValue; - I: Integer; -begin - APrevEditValue := FEditValue; - SetLength(CheckStates, InternalButtons.Count); - for I := 0 to High(CheckStates) do - CheckStates[I] := Buttons[I].State; - with ActiveProperties do - CalculateEditValueByCheckStates(GetStandaloneEventSender(Self), FEditValue); - if not InternalVarEqualsExact(APrevEditValue, FEditValue) then - DoEditValueChanged; -end; - -function TcxCustomCheckGroup.IsEditValueStored: Boolean; -begin - Result := (ActiveProperties.EditValueFormat = cvfInteger) and (EditValue <> 0) or - (ActiveProperties.EditValueFormat <> cvfInteger) and (VarToStr(EditValue) <> ''); -end; - -procedure TcxCustomCheckGroup.ParentBackgroundChanged; -var - I: Integer; -begin - for I := 0 to InternalButtons.Count - 1 do - Buttons[I].ParentBackground := ParentBackground; -end; - -procedure TcxCustomCheckGroup.PropertiesChanged(Sender: TObject); -begin - inherited PropertiesChanged(Sender); - InternalValidateDisplayValue(Null); - DataBinding.UpdateDisplayValue; -end; - -procedure TcxCustomCheckGroup.SynchronizeButtonsStyle; -var - AButton: TcxCheckGroupButton; - I: Integer; -begin - inherited SynchronizeButtonsStyle; - for I := 0 to InternalButtons.Count - 1 do - begin - AButton := Buttons[I]; - AButton.Style.BorderStyle := Style.BorderStyle; - AButton.Style.TextColor := Style.TextColor; - if not (svTextColor in Style.AssignedValues) then - AButton.Style.AssignedValues := AButton.Style.AssignedValues - [svTextColor]; - - AButton.StyleDisabled.Color := StyleDisabled.Color; - AButton.StyleDisabled.TextColor := StyleDisabled.TextColor; - AButton.StyleDisabled.AssignedValues := StyleDisabled.AssignedValues; - - AButton.Transparent := Transparent; // to repaint button - end; -end; - -procedure TcxCustomCheckGroup.SynchronizeDisplayValue; -var - I: Integer; -begin - if ActiveProperties.Items.ItemChanged then - Exit; - with ActiveProperties do - CalculateCheckStatesByEditValue(GetStandaloneEventSender(Self), EditValue); - if not ActiveProperties.AllowGrayed and Focused then - for I := 0 to High(CheckStates) do - if CheckStates[I] = cbsGrayed then - CheckStates[I] := cbsUnchecked; - - FButtonStatesChanging := True; - try - for I := 0 to InternalButtons.Count - 1 do - Buttons[I].State := CheckStates[I]; - finally - FButtonStatesChanging := False; - end; -end; - -procedure TcxCustomCheckGroup.SynchronizeModifiedAfterEnter; - - function NeedSynchronize: Boolean; - begin - Result := not ModifiedAfterEnter or ActiveProperties.ImmediatePost; - end; - -var - I: Integer; -begin - if NeedSynchronize then - for I := 0 to InternalButtons.Count - 1 do - Buttons[I].ModifiedAfterEnter := False; -end; - -procedure TcxCustomCheckGroup.UpdateButtons; -const - ALookAndFeelKindMap: array [TcxEditButtonStyle] of TcxLookAndFeelKind = - (lfStandard, lfStandard, lfFlat, lfStandard, lfStandard, - lfUltraFlat, lfOffice11); -var - AButton: TcxCheckGroupButton; - I: Integer; -begin - inherited UpdateButtons; - if FFocusedItemIndex >= InternalButtons.Count then - FFocusedItemIndex := -1; - for I := 0 to InternalButtons.Count - 1 do - begin - AButton := Buttons[I]; - AButton.Properties.BeginUpdate; - try - AButton.Properties.Alignment := ActiveProperties.ItemAlignment; - AButton.Properties.AllowGrayed := ActiveProperties.AllowGrayed; - AButton.Caption := ActiveProperties.Items[I].Caption; - AButton.Properties.MultiLine := ActiveProperties.WordWrap; - AButton.Properties.GlyphCount := ActiveProperties.GlyphCount; - AButton.Properties.ReadOnly := ActiveProperties.ReadOnly and - DataBinding.IsDataAvailable; - if Length(ViewInfo.ButtonsInfo) > 0 then - AButton.LookAndFeel.Kind := ALookAndFeelKindMap[ViewInfo.ButtonsInfo[0].Data.Style]; - finally - AButton.Properties.EndUpdate; - AButton.OnEditing := DoButtonEditing; - AButton.OnFocusChanged := DoButtonFocusChanged; - AButton.Properties.OnChange := DoButtonChange; - end; - end; -// SynchronizeDisplayValue; -end; - -function TcxCustomCheckGroup.WantNavigationKeys: Boolean; -begin - Result := not IsInplace; -end; - -function TcxCustomCheckGroup.GetFirstEnabledItemIndex(AStartIndex: Integer): Integer; -var - I: Integer; -begin - Result := -1; - if AStartIndex = -1 then - AStartIndex := 0; - for I := 0 to InternalButtons.Count - 1 do - if TWinControl(InternalButtons[(I + AStartIndex) mod InternalButtons.Count]).CanFocus then - begin - Result := (I + AStartIndex) mod InternalButtons.Count; - Break; - end; -end; - -procedure TcxCustomCheckGroup.DoButtonChange(Sender: TObject); -begin - if FButtonStatesChanging then - Exit; - LockChangeEvents(True); - try - InternalValidateDisplayValue(Null); - ChangeHandler(Self); - if ActiveProperties.ImmediatePost and CanPostEditValue and ValidateEdit(True) then - begin - InternalPostEditValue; - SynchronizeModifiedAfterEnter; - end; - finally - LockChangeEvents(False); - end; -end; - -procedure TcxCustomCheckGroup.DoButtonEditing(Sender: TObject; var CanEdit: Boolean); -begin - CanEdit := DoEditing; -end; - -procedure TcxCustomCheckGroup.DoButtonFocusChanged(Sender: TObject); -begin - FocusChanged; -end; - -function TcxCustomCheckGroup.GetActiveProperties: TcxCustomCheckGroupProperties; -begin - Result := TcxCustomCheckGroupProperties(InternalGetActiveProperties); -end; - -function TcxCustomCheckGroup.GetButton(Index: Integer): TcxCheckGroupButton; -begin - Result := TcxCheckGroupButton(InternalButtons[Index]); -end; - -function TcxCustomCheckGroup.GetProperties: TcxCustomCheckGroupProperties; -begin - Result := TcxCustomCheckGroupProperties(FProperties); -end; - -function TcxCustomCheckGroup.GetState(Index: Integer): TcxCheckBoxState; -begin - Result := Buttons[Index].State; -end; - -procedure TcxCustomCheckGroup.SetProperties(Value: TcxCustomCheckGroupProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomCheckGroup.SetState(Index: Integer; Value: TcxCheckBoxState); -begin - Buttons[Index].State := Value; -end; - -{ TcxCheckGroup } - -class function TcxCheckGroup.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCheckGroupProperties; -end; - -function TcxCheckGroup.GetActiveProperties: TcxCheckGroupProperties; -begin - Result := TcxCheckGroupProperties(InternalGetActiveProperties); -end; - -function TcxCheckGroup.GetProperties: TcxCheckGroupProperties; -begin - Result := TcxCheckGroupProperties(FProperties); -end; - -procedure TcxCheckGroup.SetProperties(Value: TcxCheckGroupProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterCheckGroupHelper } - -class function TcxFilterCheckGroupHelper.GetEditValueFormat( - AEditProperties: TcxCustomEditProperties): TcxCheckStatesValueFormat; -begin - Result := TcxCustomCheckGroupProperties(AEditProperties).EditValueFormat; -end; - -class function TcxFilterCheckGroupHelper.GetItems( - AEditProperties: TcxCustomEditProperties): IcxCheckItems; -begin - Result := TcxCustomCheckGroupProperties(AEditProperties).Items; -end; - -class procedure TcxFilterCheckGroupHelper.InitializeItems(AProperties, - AEditProperties: TcxCustomEditProperties); -begin - inherited InitializeItems(AProperties, AEditProperties); - TcxCustomCheckComboBoxProperties(AProperties).Glyph := - TcxCustomCheckGroupProperties(AEditProperties).Glyph; - TcxCustomCheckComboBoxProperties(AProperties).GlyphCount := - TcxCustomCheckGroupProperties(AEditProperties).GlyphCount; -end; - -initialization - GetRegisteredEditProperties.Register(TcxCheckGroupProperties, - scxSEditRepositoryCheckGroupItem); - FilterEditsController.Register(TcxCheckGroupProperties, - TcxFilterCheckGroupHelper); - -finalization - FilterEditsController.Unregister(TcxCheckGroupProperties, - TcxFilterCheckGroupHelper); - GetRegisteredEditProperties.Unregister(TcxCheckGroupProperties); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckGroupStatesEditor.dfm b/internal/x.46/ExpressEditors Library 5/Sources/cxCheckGroupStatesEditor.dfm deleted file mode 100644 index 238c8b53..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckGroupStatesEditor.dfm +++ /dev/null @@ -1,65 +0,0 @@ -object cxCheckGroupStatesEditorDlg: TcxCheckGroupStatesEditorDlg - Left = 260 - Top = 283 - BorderStyle = bsDialog - Caption = 'cxCheckGroup - CheckStates editor' - ClientHeight = 238 - ClientWidth = 436 - Color = clBtnFace - OldCreateOrder = False - OnShow = FormShow - PixelsPerInch = 96 - Position = poScreenCenter - TextHeight = 13 - AutoScroll = False - object clbStates: TcxCheckListBox - Left = 0 - Top = 0 - Width = 346 - Height = 238 - Align = alClient - Columns = 0 - EditValue = 0 - EditValueFormat = cvfCaptions - Items = <> - ParentColor = False - ScrollWidth = 0 - Style.LookAndFeel.Kind = lfUltraFlat - Style.LookAndFeel.NativeStyle = True - TabOrder = 0 - TabWidth = 0 - end - object Panel1: TPanel - Left = 346 - Top = 0 - Width = 90 - Height = 238 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btnOK: TcxButton - Left = 8 - Top = 8 - Width = 75 - Height = 25 - Caption = 'OK' - ModalResult = 1 - TabOrder = 0 - LookAndFeel.Kind = lfUltraFlat - LookAndFeel.NativeStyle = True - UseSystemPaint = False - end - object btnCancel: TcxButton - Left = 8 - Top = 40 - Width = 75 - Height = 25 - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - LookAndFeel.Kind = lfUltraFlat - LookAndFeel.NativeStyle = True - UseSystemPaint = False - end - end -end diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckGroupStatesEditor.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxCheckGroupStatesEditor.pas deleted file mode 100644 index 3eb15054..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckGroupStatesEditor.pas +++ /dev/null @@ -1,80 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxCheckGroupStatesEditor; - -interface - -{$I cxVer.inc} - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, Dialogs, ExtCtrls, Forms, Graphics, Messages, - StdCtrls, SysUtils, cxButtons, cxCheckListBox, cxContainer, cxControls, - cxLookAndFeelPainters; - -type - TcxCheckGroupStatesEditorDlg = class(TForm) - clbStates: TcxCheckListBox; - Panel1: TPanel; - btnOK: TcxButton; - btnCancel: TcxButton; - procedure FormShow(Sender: TObject); - end; - -var - cxCheckGroupStatesEditorDlg: TcxCheckGroupStatesEditorDlg; - -implementation - -{$R *.dfm} - -procedure TcxCheckGroupStatesEditorDlg.FormShow(Sender: TObject); -var - AItemWidth, AMaxItemWidth, I: Integer; -begin - AMaxItemWidth := 0; - clbStates.Canvas.Font := clbStates.Style.Font; - for I := 0 to clbStates.Items.Count - 1 do - begin - AItemWidth := clbStates.Canvas.TextWidth(clbStates.Items[I].Text); - if AMaxItemWidth < AItemWidth then - AMaxItemWidth := AItemWidth; - end; - clbStates.ScrollWidth := AMaxItemWidth + 25; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckListBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxCheckListBox.pas deleted file mode 100644 index 39579504..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxCheckListBox.pas +++ /dev/null @@ -1,2180 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxCheckListBox; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, -{$IFDEF DELPHI6} - Types, Variants, -{$ENDIF} - SysUtils, Classes, Controls, Graphics, StdCtrls, Forms, Math, ImgList, - dxCore, cxClasses, cxControls, cxContainer, cxGraphics, cxVariants, cxDataUtils, - cxEdit, cxListBox, cxCheckBox, cxExtEditConsts, cxExtEditUtils, cxScrollBar, - cxLookAndFeels, cxLookAndFeelPainters; - -type - TcxCustomCheckListBox = class; - TcxCustomInnerCheckListBox = class; - TcxCheckListBoxItems = class; - - TcxCheckListBoxImageLayout = (ilBeforeChecks, ilAfterChecks); - - TcxClickCheckEvent = procedure(Sender: TObject; AIndex: Integer; - APrevState, ANewState: TcxCheckBoxState) of object; - - TcxCheckStatesToEditValueEvent = procedure(Sender: TObject; - const ACheckStates: TcxCheckStates; out AEditValue: TcxEditValue) of object; - TcxEditValueToCheckStatesEvent = procedure(Sender: TObject; - const AEditValue: TcxEditValue; var ACheckStates: TcxCheckStates) of object; - - { TcxCheckListBoxItem } - - TcxCheckListBoxItem = class(TcxCaptionItem) - private - FEnabled: Boolean; - FImageIndex: TImageIndex; - FItemObject: TObject; - FState: TcxCheckBoxState; - function GetChecked: Boolean; - function GetCheckListBox: TcxCustomInnerCheckListBox; - function GetCollection: TcxCheckListBoxItems; - function GetText: TCaption; - procedure SetText(const Value: TCaption); - procedure SetEnabled(Value: Boolean); - procedure SetImageIndex(Value: TImageIndex); - procedure SetState(Value: TcxCheckBoxState); - procedure SetChecked(Value: Boolean); - protected - function GetDisplayName: string; override; - - property CheckListBox: TcxCustomInnerCheckListBox read GetCheckListBox; - property Collection: TcxCheckListBoxItems read GetCollection; - public - constructor Create(Collection: TCollection); override; - procedure Assign(Source: TPersistent); override; - property Checked: Boolean read GetChecked write SetChecked; - property ItemObject: TObject read FItemObject write FItemObject; - published - property Enabled: Boolean read FEnabled write SetEnabled default True; - property ImageIndex: TImageIndex read FImageIndex write SetImageIndex default -1; - property State: TcxCheckBoxState read FState write SetState default cbsUnchecked; - property Tag; - property Text: TCaption read GetText write SetText; - end; - - { TcxCheckListBoxItems } - - TcxCheckListBoxItems = class(TcxCaptionItems) - private - FChangedLockCount: Integer; - FCheckListBox: TcxCustomInnerCheckListBox; - function GetItems(Index: Integer): TcxCheckListBoxItem; - function GetObjects(Index: Integer): TObject; - procedure SetItems(Index: Integer; const Value: TcxCheckListBoxItem); - procedure SetObjects(Index: Integer; Value: TObject); - protected - procedure Update(Item: TCollectionItem); override; - function IsChangedLocked: Boolean; - procedure LockChanged(ALock: Boolean; AInvokeChangedOnUnlock: Boolean = True); - public - constructor Create(AOwner: TcxCustomInnerCheckListBox; AItemClass: TCollectionItemClass); - destructor Destroy; override; - property CheckListBox: TcxCustomInnerCheckListBox read FCheckListBox; - property Items[Index: Integer]: TcxCheckListBoxItem read GetItems write SetItems; default; - function Add: TcxCheckListBoxItem; - procedure Delete(Index: Integer); - function IndexOf(const S: TCaption): Integer; - function IndexOfObject(AObject: TObject): Integer; - procedure LoadStrings(AStrings: TStrings); - property Objects[Index: Integer]: TObject read GetObjects write SetObjects; - end; - - { TcxCustomInnerCheckListBox } - - TcxCheckListBoxMetrics = record - CheckFrameWidth: Integer; - ContentOffset: Integer; - ImageFrameWidth: Integer; - TextAreaOffset: Integer; - TextOffset: Integer; - TextWidthCorrection: Integer; - end; - - TcxCustomInnerCheckListBox = class(TcxCustomInnerListBox, - IUnknown, IcxMouseTrackingCaller) - private - FAllowGrayed: Boolean; - FAllowDblClickToggle: Boolean; - FCapturedCheckIndex: Integer; - FCheckItems: TcxCheckListBoxItems; - FGlyph: TBitmap; - FGlyphCount: Integer; - FHotCheckIndex: Integer; - FMetrics: TcxCheckListBoxMetrics; - FNewPressedCheckIndex: Integer; - FNewPressedCheckItemFullyVisible: Boolean; - FPressedCheckIndex: Integer; - FOnClickCheck: TcxClickCheckEvent; - function GetContainer: TcxCustomCheckListBox; - procedure DrawCheck(R: TRect; AState: TcxCheckBoxState; - ACheckState: TcxEditCheckState); - function GetGlyph: TBitmap; - procedure GlyphChanged(Sender: TObject); - procedure SetGlyph(Value: TBitmap); - procedure SetGlyphCount(Value: Integer); - procedure ToggleClickCheck(Index: Integer); - procedure InvalidateCheck(Index: Integer); - procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; - procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM; - procedure CNMeasureItem(var Message: TWMMeasureItem); message CN_MEASUREITEM; - procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - protected - // IcxMouseTrackingCaller - procedure IcxMouseTrackingCaller.MouseLeave = MouseTrackingMouseLeave; - procedure MouseTrackingMouseLeave; - - procedure AdjustItemHeight; - procedure CheckHotTrack; - procedure Click; override; - function GetCheckAt(X, Y: Integer): Integer; - procedure GetCheckMetrics(out ACheckSize: TSize; - out ACheckBorderOffset: Integer); - function GetCheckRect(const R: TRect; AReturnFullRect: Boolean): TRect; - function GetCheckRegionWidth: Integer; virtual; - function GetMetrics: TcxCheckListBoxMetrics; virtual; - function GetStandardItemHeight: Integer; virtual; - procedure InternalMouseMove(Shift: TShiftState; X, Y: Integer); - procedure FullRepaint; virtual; - procedure InvalidateItem(Index: Integer); virtual; - procedure SynchronizeCheckStates(ANewHotCheckIndex, ANewPressedCheckIndex: Integer); - procedure UpdateCheckStates; - procedure UpdateEditValue; - procedure WndProc(var Message: TMessage); override; - procedure KeyPress(var Key: Char); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure DoClickCheck(const AIndex: Integer; - const OldState, NewState: TcxCheckBoxState); virtual; - procedure CreateParams(var Params: TCreateParams); override; - procedure DblClick; override; - property AllowDblClickToggle: Boolean read FAllowDblClickToggle - write FAllowDblClickToggle default True; - property AllowGrayed: Boolean read FAllowGrayed write FAllowGrayed default False; - property CheckItems: TcxCheckListBoxItems read FCheckItems write FCheckItems; - property Glyph: TBitmap read GetGlyph write SetGlyph; - property GlyphCount: Integer read FGlyphCount write SetGlyphCount default 6; - property Metrics: TcxCheckListBoxMetrics read FMetrics; - property OnClickCheck: TcxClickCheckEvent read FOnClickCheck write FOnClickCheck; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - property Container: TcxCustomCheckListBox read GetContainer; - published - { Published declarations } - end; - - TcxCustomInnerCheckListBoxClass = class of TcxCustomInnerCheckListBox; - - { TcxCustomCheckListBox } - - TcxCustomCheckListBox = class(TcxContainer) - private - FCheckBorderStyle: TcxEditCheckBoxBorderStyle; - FEditValue: TcxEditValue; - FEditValueFormat: TcxCheckStatesValueFormat; - FImages: TCustomImageList; - FImagesChangeLink: TChangeLink; - FImageLayout: TcxCheckListBoxImageLayout; - FInnerCheckListBox: TcxCustomInnerCheckListBox; - FIntegralHeight: Boolean; - FIsExitProcessing: Boolean; - FIsModified: Boolean; - FListStyle: TListBoxStyle; - FLoadedSortedValue: Boolean; - FNativeStyle: Boolean; - FShowChecks: Boolean; - FOnCheckStatesToEditValue: TcxCheckStatesToEditValueEvent; - FOnDrawItem: TDrawItemEvent; - FOnEditValueChanged: TNotifyEvent; - FOnEditValueToCheckStates: TcxEditValueToCheckStatesEvent; - FOnMeasureItem: TMeasureItemEvent; - function GetOnClickCheck: TcxClickCheckEvent; - function GetOnCompare: TcxCollectionCompareEvent; - function GetAllowGrayed: Boolean; - function GetAllowDblClickToggle: Boolean; - function GetAutoComplete: Boolean; - function GetAutoCompleteDelay: Cardinal; - function GetGlyph: TBitmap; - function GetGlyphCount: Integer; - function GetItemHeight: Integer; - function GetItems: TcxCheckListBoxItems; - function GetColumns: Integer; - function GetCount: Integer; - function GetItemIndex: Integer; - function GetScrollWidth: Integer; - function GetSelected(Index: Integer): Boolean; - function GetSorted: Boolean; - function GetTabWidth: Integer; - function GetTopIndex: Integer; - procedure ImagesChanged(Sender: TObject); - function IsItemHeightStored: Boolean; - procedure SetOnClickCheck(Value: TcxClickCheckEvent); - procedure SetOnCompare(Value: TcxCollectionCompareEvent); - procedure SetAllowGrayed(Value: Boolean); - procedure SetAllowDblClickToggle(Value: Boolean); - procedure SetAutoComplete(Value: Boolean); - procedure SetAutoCompleteDelay(Value: Cardinal); - procedure SetDataBinding(Value: TcxCustomDataBinding); - procedure SetEditValueFormat(Value: TcxCheckStatesValueFormat); - procedure SetGlyph(Value: TBitmap); - procedure SetGlyphCount(Value: Integer); - procedure SetItemHeight(Value: Integer); - procedure SetItems(Value: TcxCheckListBoxItems); - procedure SetColumns(Value: Integer); - procedure SetImageLayout(Value: TcxCheckListBoxImageLayout); - procedure SetIntegralHeight(Value: Boolean); - procedure SetItemIndex(Value: Integer); - procedure SetListStyle(Value: TListBoxStyle); - procedure SetImages(Value: TCustomImageList); - procedure SetScrollWidth(Value: Integer); - procedure SetSelected(Index: Integer; Value: Boolean); - procedure SetShowChecks(Value: Boolean); - procedure SetSorted(Value: Boolean); - procedure SetTabWidth(Value: Integer); - procedure SetTopIndex(Value: Integer); -{$IFDEF DELPHI6} - procedure SetCount(Value: Integer); -{$ENDIF} - function GetReadOnly: Boolean; - procedure SetReadOnly(Value: Boolean); - - procedure CheckEditValueFormat; - function GetRealEditValueFormat: TcxCheckStatesValueFormatEx; - procedure ItemsChanged(Sender: TObject; AItem: TCollectionItem); - protected - FDataBinding: TcxCustomDataBinding; - procedure CalculateDrawCheckParams; - procedure DoExit; override; - function IsReadOnly: Boolean; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure Loaded; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - procedure Notification(AComponent: TComponent; - Operation: TOperation); override; - function CanResize(var NewWidth, NewHeight: Integer): Boolean; override; - procedure FontChanged; override; - procedure GetOptimalHeight(var ANewHeight: Integer); - function IsInternalControl(AControl: TControl): Boolean; override; - procedure SetSize; override; - - class function GetDataBindingClass: TcxCustomDataBindingClass; virtual; - procedure DataChange; override; - procedure UpdateData; override; - procedure WndProc(var Message: TMessage); override; - procedure DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); - procedure DoEditValueChanged; virtual; - function GetInnerCheckListBoxClass: TcxCustomInnerCheckListBoxClass; virtual; - procedure SetEditValue(const Value: TcxEditValue); virtual; - function IsValueValid(const AValue: TcxEditValue; - AAllowEmpty: Boolean): Boolean; virtual; - property AllowDblClickToggle: Boolean read GetAllowDblClickToggle - write SetAllowDblClickToggle default True; - property AllowGrayed: Boolean read GetAllowGrayed write SetAllowGrayed default False; - property AutoComplete: Boolean read GetAutoComplete write SetAutoComplete - default True; - property AutoCompleteDelay: Cardinal read GetAutoCompleteDelay - write SetAutoCompleteDelay default cxDefaultAutoCompleteDelay; - property Columns: Integer read GetColumns write SetColumns default 0; - property DataBinding: TcxCustomDataBinding read FDataBinding write SetDataBinding; - property EditValue: TcxEditValue read FEditValue write SetEditValue - stored False; - property EditValueFormat: TcxCheckStatesValueFormat read FEditValueFormat - write SetEditValueFormat default cvfInteger; - property Glyph: TBitmap read GetGlyph write SetGlyph; - property GlyphCount: Integer read GetGlyphCount write SetGlyphCount default 6; - property ImageLayout: TcxCheckListBoxImageLayout read FImageLayout - write SetImageLayout default ilBeforeChecks; - property IntegralHeight: Boolean read FIntegralHeight write SetIntegralHeight - default False; - property ItemHeight: Integer read GetItemHeight write SetItemHeight - stored IsItemHeightStored; - property ListStyle: TListBoxStyle read FListStyle write SetListStyle - default lbStandard; - property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False; - property ScrollWidth: Integer read GetScrollWidth write SetScrollWidth - default 0; - property ShowChecks: Boolean read FShowChecks write SetShowChecks - default True; - property Sorted: Boolean read GetSorted write SetSorted default False; - property TabWidth: Integer read GetTabWidth write SetTabWidth default 0; - property OnCheckStatesToEditValue: TcxCheckStatesToEditValueEvent - read FOnCheckStatesToEditValue write FOnCheckStatesToEditValue; - property OnClickCheck: TcxClickCheckEvent read GetOnClickCheck write SetOnClickCheck; - property OnCompare: TcxCollectionCompareEvent read GetOnCompare write SetOnCompare; - property OnDrawItem: TDrawItemEvent read FOnDrawItem write FOnDrawItem; - property OnEditValueChanged: TNotifyEvent read FOnEditValueChanged - write FOnEditValueChanged; - property OnEditValueToCheckStates: TcxEditValueToCheckStatesEvent - read FOnEditValueToCheckStates write FOnEditValueToCheckStates; - property OnMeasureItem: TMeasureItemEvent read FOnMeasureItem write FOnMeasureItem; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - function CheckAtPos(const APos: TPoint): Integer; - procedure Clear; - function GetBestFitWidth: Integer; - function GetHeight(ARowCount: Integer): Integer; virtual; - function GetItemWidth(AIndex: Integer): Integer; virtual; - function ItemAtPos(const APos: TPoint; AExisting: Boolean): Integer; - function ItemRect(Index: Integer): TRect; - procedure Sort; -{$IFDEF DELPHI6} - procedure AddItem(AItem: string); - procedure CopySelection(ADestination: TcxCustomCheckListBox); - procedure DeleteSelected; - procedure MoveSelection(ADestination: TcxCustomCheckListBox); -{$ENDIF} - property InnerCheckListBox: TcxCustomInnerCheckListBox read FInnerCheckListBox write FInnerCheckListBox; - { cxListBox properties } - property Count: Integer read GetCount{$IFDEF DELPHI6} write SetCount{$ENDIF}; - property IsModified: Boolean read FIsModified write FIsModified; - property ItemIndex: Integer read GetItemIndex write SetItemIndex; - property Selected[Index: Integer]: Boolean read GetSelected write SetSelected; - property TopIndex: Integer read GetTopIndex write SetTopIndex; -// !!! - property Images: TCustomImageList read FImages write SetImages; - property Items: TcxCheckListBoxItems read GetItems write SetItems; - property LookAndFeel; - end; - - { TcxCheckListBox } - - TcxCheckListBox = class(TcxCustomCheckListBox) - published - property Align; - property AllowDblClickToggle; - property AllowGrayed; - property Anchors; - property AutoComplete; - property AutoCompleteDelay; - property BiDiMode; - property Columns; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property EditValue; - property EditValueFormat; - property Enabled; - property Glyph; - property GlyphCount; - property Images; - property ImageLayout; - property ImeMode; - property ImeName; - property IntegralHeight; - property Items; - property ParentBiDiMode; - property ParentColor default False; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ReadOnly; - property ScrollWidth; - property ShowChecks; - property ShowHint; - property Sorted; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property TabWidth; - property Visible; - property OnCheckStatesToEditValue; - property OnClick; - property OnClickCheck; - property OnCompare; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnDrawItem; - property OnEditValueChanged; - property OnEditValueToCheckStates; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMeasureItem; // deprecated - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -uses -{$IFDEF DELPHI6} - RTLConsts, -{$ENDIF} - Consts, cxEditPaintUtils, cxEditUtils, dxThemeManager; - -const - cxCheckListBoxCheckFrameWidth = 1; - cxCheckListBoxContentOffset = 0; - cxCheckListBoxImageFrameWidth = 1; - cxCheckListBoxTextAreaOffset = 1; - cxCheckListBoxTextOffset = 2; - cxCheckListBoxTextWidthCorrection = 3; - -{ TcxCheckListBoxItem } - -constructor TcxCheckListBoxItem.Create(Collection: TCollection); -begin - inherited Create(Collection); - FEnabled := True; - FImageIndex := -1; - FState := cbsUnchecked; -end; - -procedure TcxCheckListBoxItem.Assign(Source: TPersistent); -begin - if Source is TcxCheckListBoxItem then - begin - Enabled := TcxCheckListBoxItem(Source).Enabled; - ImageIndex := TcxCheckListBoxItem(Source).ImageIndex; - ItemObject := TcxCheckListBoxItem(Source).ItemObject; - State := TcxCheckListBoxItem(Source).State; - end; - inherited; -end; - -function TcxCheckListBoxItem.GetDisplayName: string; -begin - Result := Text; - if Result = '' then - Result := inherited GetDisplayName; -end; - -function TcxCheckListBoxItem.GetChecked: Boolean; -begin - Result := (State = cbsChecked); -end; - -function TcxCheckListBoxItem.GetCheckListBox: TcxCustomInnerCheckListBox; -begin - if Collection <> nil then - Result := Collection.CheckListBox - else - Result := nil; -end; - -function TcxCheckListBoxItem.GetCollection: TcxCheckListBoxItems; -begin - Result := TcxCheckListBoxItems(inherited Collection); -end; - -function TcxCheckListBoxItem.GetText: TCaption; -begin - Result := Caption; -end; - -procedure TcxCheckListBoxItem.SetText(const Value: TCaption); -begin - Caption := Value; -end; - -procedure TcxCheckListBoxItem.SetEnabled(Value: Boolean); -begin - if FEnabled <> Value then - begin - FEnabled := Value; - Changed(False); - end; -end; - -procedure TcxCheckListBoxItem.SetImageIndex(Value: TImageIndex); -begin - if FImageIndex <> Value then - begin - FImageIndex := Value; - Changed(False); - end; -end; - -procedure TcxCheckListBoxItem.SetState(Value: TcxCheckBoxState); -begin - if CheckListBox <> nil then - begin -//TODO: if (Value = cbsGrayed) and (CheckListBox.Container.GetRealEditValueFormat = cvfInteger) then - if (Value = cbsGrayed) and (CheckListBox.Container.EditValueFormat = cvfInteger) then - Value := cbsUnchecked; - if FState = Value then - Exit; - FState := Value; - CheckListBox.InvalidateCheck(Index); - if not Collection.IsChangedLocked then - CheckListBox.UpdateEditValue; - end - else - FState := Value; -end; - -procedure TcxCheckListBoxItem.SetChecked(Value: Boolean); -begin - if Value then - State := cbsChecked - else - State := cbsUnchecked; -end; - -{ TcxCheckListBoxItems } - -constructor TcxCheckListBoxItems.Create(AOwner: TcxCustomInnerCheckListBox; AItemClass: TCollectionItemClass); -begin - inherited Create(AOwner, AItemClass); - FCheckListBox := AOwner; -end; - -destructor TcxCheckListBoxItems.Destroy; -begin - FCheckListBox := nil; - inherited; -end; - -function TcxCheckListBoxItems.GetItems(Index: Integer): TcxCheckListBoxItem; -begin - Result := TcxCheckListBoxItem(inherited Items[Index]); -end; - -function TcxCheckListBoxItems.GetObjects(Index: Integer): TObject; -begin - Result := Items[Index].ItemObject; -end; - -procedure TcxCheckListBoxItems.SetItems(Index: Integer; const Value: TcxCheckListBoxItem); -begin - inherited Items[Index] := Value; -end; - -procedure TcxCheckListBoxItems.SetObjects(Index: Integer; Value: TObject); -begin - Items[Index].ItemObject := Value; -end; - -procedure TcxCheckListBoxItems.Update(Item: TCollectionItem); - - procedure SynchronizeInnerListBoxItems; - var - I, ATopIndex, AItemIndex: Integer; - begin - CheckListBox.Items.BeginUpdate; - try - AItemIndex := CheckListBox.ItemIndex; - ATopIndex := CheckListBox.TopIndex; - - CheckListBox.Items.Clear; - - for I := 0 to Count - 1 do - CheckListBox.Items.Add(Items[I].Text); - - CheckListBox.TopIndex := ATopIndex; - CheckListBox.ItemIndex := AItemIndex; - finally - CheckListBox.Items.EndUpdate; - end; - end; - -begin - inherited; - if not Assigned(CheckListBox) then - Exit; - - if (CheckListBox.Items.Count <> Count) or (Item = nil) then - SynchronizeInnerListBoxItems - else - begin - CheckListBox.Items[Item.Index] := TcxCheckListBoxItem(Item).Text; - CheckListBox.InvalidateItem(Item.Index); - end; - - if CheckListBox.Container.IsModified then - CheckListBox.UpdateEditValue - else - CheckListBox.UpdateCheckStates; -end; - -function TcxCheckListBoxItems.IsChangedLocked: Boolean; -begin - Result := FChangedLockCount > 0; -end; - -procedure TcxCheckListBoxItems.LockChanged(ALock: Boolean; - AInvokeChangedOnUnlock: Boolean = True); -begin - if ALock then - Inc(FChangedLockCount) - else - if FChangedLockCount > 0 then - begin - Dec(FChangedLockCount); - if AInvokeChangedOnUnlock and (FChangedLockCount = 0) then - Changed; - end; -end; - -function TcxCheckListBoxItems.Add: TcxCheckListBoxItem; -begin - Result := TcxCheckListBoxItem(inherited Add); -end; - -procedure TcxCheckListBoxItems.Delete(Index: Integer); -begin -{$IFDEF DELPHI5} - inherited Delete(Index); -{$ELSE} - TcxCheckListBoxItem(Items[Index]).Free; -{$ENDIF} -end; - -function TcxCheckListBoxItems.IndexOf(const S: TCaption): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if InternalCompareString(Items[I].Text, S, False) then - begin - Result := I; - Break; - end; -end; - -function TcxCheckListBoxItems.IndexOfObject(AObject: TObject): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if Objects[I] = AObject then - begin - Result := I; - Break; - end; -end; - -procedure TcxCheckListBoxItems.LoadStrings(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - for I := 0 to Count - 1 do - AStrings.Add(Items[I].Text); -end; - -{ TcxCustomInnerCheckListBox } - -constructor TcxCustomInnerCheckListBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FContainer := TcxCustomCheckListBox(AOwner); - FAllowGrayed := False; - FAllowDblClickToggle := True; - FCapturedCheckIndex := -1; - FCheckItems := TcxCheckListBoxItems.Create(Self, TcxCheckListBoxItem); - FGlyphCount := 6; - FHotCheckIndex := -1; - FPressedCheckIndex := -1; - FNewPressedCheckIndex := -1; - FMetrics := GetMetrics; -end; - -destructor TcxCustomInnerCheckListBox.Destroy; -begin - EndMouseTracking(Self); - if Assigned(FGlyph) then FreeAndNil(FGlyph); - FreeAndNil(FCheckItems); - inherited Destroy; -end; - -procedure TcxCustomInnerCheckListBox.CreateParams(var Params: TCreateParams); -begin - inherited; - with Params do - if Style and (LBS_OWNERDRAWFIXED or LBS_OWNERDRAWVARIABLE) = 0 then - Style := Style or LBS_OWNERDRAWFIXED; -end; - -procedure TcxCustomInnerCheckListBox.MouseTrackingMouseLeave; -begin - InternalMouseMove([], -1, -1); - EndMouseTracking(Self); -end; - -procedure TcxCustomInnerCheckListBox.AdjustItemHeight; -begin - if HandleAllocated then - begin - if Container.FListStyle = lbStandard then - Perform(LB_SETITEMHEIGHT, 0, GetStandardItemHeight); - SetExternalScrollBarsParameters; - FullRepaint; - end; -end; - -procedure TcxCustomInnerCheckListBox.CheckHotTrack; -var - P: TPoint; -begin - P := ScreenToClient(InternalGetCursorPos); - InternalMouseMove(InternalGetShiftState, P.X, P.Y); -end; - -procedure TcxCustomInnerCheckListBox.Click; -begin - if Container.ShowChecks or Container.DataBinding.SetEditMode then - inherited Click; -end; - -function TcxCustomInnerCheckListBox.GetCheckAt(X, Y: Integer): Integer; -var - P: TPoint; -begin - P := Point(X, Y); - Result := ItemAtPos(P, True); - if Result <> -1 then - if not PtInRect(GetCheckRect(ItemRect(Result), False), P) then - Result := -1; -end; - -procedure TcxCustomInnerCheckListBox.GetCheckMetrics(out ACheckSize: TSize; - out ACheckBorderOffset: Integer); -begin - with Container do - begin - ACheckSize := GetEditCheckSize(Self.Canvas, Style.LookAndFeel.NativeStyle, - Glyph, GlyphCount, Style.LookAndFeel.SkinPainter); - ACheckBorderOffset := GetEditCheckBorderOffset(Style.LookAndFeel.Kind, - FNativeStyle, VerifyBitmap(Glyph) and (GlyphCount > 0), - LookAndFeel.SkinPainter); - end; -end; - -function TcxCustomInnerCheckListBox.GetCheckRect(const R: TRect; - AReturnFullRect: Boolean): TRect; -var - ACheckBorderOffset, ACheckOffset: Integer; - ACheckSize: TSize; -begin - if not Container.ShowChecks then - begin - Result := cxEmptyRect; - Exit; - end; - - GetCheckMetrics(ACheckSize, ACheckBorderOffset); - ACheckSize.cx := ACheckSize.cx - ACheckBorderOffset * 2; - ACheckSize.cy := ACheckSize.cy - ACheckBorderOffset * 2; - - ACheckOffset := Metrics.ContentOffset + Metrics.CheckFrameWidth; - if (Container.ImageLayout = ilBeforeChecks) and VerifyImages(Container.Images) then - Inc(ACheckOffset, Container.Images.Width + Metrics.ImageFrameWidth * 2); - - with R do - begin - Result.Top := Top + (Bottom - Top - ACheckSize.cy) div 2; - Result.Bottom := Result.Top + ACheckSize.cy; - if UseRightToLeftAlignment then - begin - Result.Right := Right - ACheckOffset; - Result.Left := Result.Right - ACheckSize.cx; - end - else - begin - Result.Left := Left + ACheckOffset; - Result.Right := Result.Left + ACheckSize.cx; - end; - end; - if AReturnFullRect then - InflateRect(Result, ACheckBorderOffset, ACheckBorderOffset); -end; - -function TcxCustomInnerCheckListBox.GetCheckRegionWidth: Integer; -var - ACheckBorderOffset: Integer; - ACheckSize: TSize; -begin - with Container do - begin - Result := Metrics.ContentOffset; - if ShowChecks or VerifyImages(Images) then - Inc(Result, Metrics.TextAreaOffset); - if ShowChecks then - begin - GetCheckMetrics(ACheckSize, ACheckBorderOffset); - ACheckSize.cx := ACheckSize.cx - ACheckBorderOffset * 2; - Inc(Result, ACheckSize.cx + Metrics.CheckFrameWidth * 2); - end; - if VerifyImages(Images) then - Inc(Result, Images.Width + Metrics.ImageFrameWidth * 2); - end; -end; - -function TcxCustomInnerCheckListBox.GetMetrics: TcxCheckListBoxMetrics; -begin - Result.CheckFrameWidth := cxCheckListBoxCheckFrameWidth; - Result.ContentOffset := cxCheckListBoxContentOffset; - Result.ImageFrameWidth := cxCheckListBoxImageFrameWidth; - Result.TextAreaOffset := cxCheckListBoxTextAreaOffset; - Result.TextOffset := cxCheckListBoxTextOffset; - Result.TextWidthCorrection := cxCheckListBoxTextWidthCorrection; -end; - -function TcxCustomInnerCheckListBox.GetStandardItemHeight: Integer; -var - ACheckBorderOffset: Integer; - ACheckSize: TSize; -begin - Canvas.Font := Font; - Result := Canvas.TextHeight('Zg'); - with Container do - begin - if ShowChecks then - begin - GetCheckMetrics(ACheckSize, ACheckBorderOffset); - ACheckSize.cy := ACheckSize.cy - ACheckBorderOffset * 2; - if Result < ACheckSize.cy + Metrics.CheckFrameWidth * 2 then - Result := ACheckSize.cy + Metrics.CheckFrameWidth * 2; - end; - if VerifyImages(Images) and (Result < Images.Height + Metrics.ImageFrameWidth * 2) then - Result := Images.Height + Metrics.ImageFrameWidth * 2; - end; -end; - -procedure TcxCustomInnerCheckListBox.InternalMouseMove(Shift: TShiftState; - X, Y: Integer); -var - ANewHotCheckIndex, ANewPressedCheckIndex: Integer; -begin - if FCapturedCheckIndex = -1 then - begin - if Shift = [] then - ANewHotCheckIndex := GetCheckAt(X, Y) - else - ANewHotCheckIndex := FHotCheckIndex; - ANewPressedCheckIndex := FPressedCheckIndex; - end - else - begin - ANewHotCheckIndex := -1; - if GetCheckAt(X, Y) = FCapturedCheckIndex then - ANewPressedCheckIndex := FCapturedCheckIndex - else - ANewPressedCheckIndex := -1; - end; - SynchronizeCheckStates(ANewHotCheckIndex, ANewPressedCheckIndex); -end; - -procedure TcxCustomInnerCheckListBox.DblClick; -var - P: TPoint; -begin - inherited DblClick; - if (ItemIndex <> -1) and CheckItems[ItemIndex].Enabled then - begin - P := ScreenToClient(InternalGetCursorPos); - if (GetCheckAt(P.X, P.Y) <> -1) or AllowDblClickToggle then - ToggleClickCheck(ItemIndex); - end; -end; - -function TcxCustomInnerCheckListBox.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - Container.FDataBinding.ExecuteAction(Action); -end; - -function TcxCustomInnerCheckListBox.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - Container.FDataBinding.UpdateAction(Action); -end; - -procedure TcxCustomInnerCheckListBox.CMFontChanged(var Message: TMessage); -begin - inherited; - AdjustItemHeight; -end; - -procedure TcxCustomInnerCheckListBox.CMMouseEnter(var Message: TMessage); -begin - inherited; - BeginMouseTracking(Self, GetControlRect(Self), Self); -end; - -procedure TcxCustomInnerCheckListBox.CMMouseLeave(var Message: TMessage); -begin - inherited; - InternalMouseMove([], -1, -1); - EndMouseTracking(Self); -end; - -function TcxCustomInnerCheckListBox.GetContainer: TcxCustomCheckListBox; -begin - Result := TcxCustomCheckListBox(Owner); -end; - -procedure TcxCustomInnerCheckListBox.FullRepaint; -var - R: TRect; -begin - if HandleAllocated then - begin - R := GetControlRect(Self); - InvalidateRect(Handle, @R, True); - end; -end; - -procedure TcxCustomInnerCheckListBox.WMLButtonDown(var Message: TWMLButtonDown); -var - R: TRect; -begin - if Container.ShowChecks or Container.DataBinding.SetEditMode then - begin - FNewPressedCheckIndex := GetCheckAt(Message.XPos, Message.YPos); - try - if FNewPressedCheckIndex <> -1 then - begin - R := ItemRect(FNewPressedCheckIndex); - FNewPressedCheckItemFullyVisible := R.Bottom <= ClientHeight; - DragMode := dmManual; - end; - inherited; - finally - FNewPressedCheckIndex := -1; - DragMode := Container.DragMode; - end; - end - else - begin - SetFocus; - with Message do - MouseDown(mbLeft, KeysToShiftState(Keys), XPos, YPos); - end; -end; - -procedure TcxCustomInnerCheckListBox.CNDrawItem(var Message: TWMDrawItem); -var - ADrawItemStruct: PDrawItemStruct; -begin - if Items.Count = 0 then - Exit; - ADrawItemStruct := Message.DrawItemStruct; - with ADrawItemStruct^ do - if not UseRightToLeftAlignment then - rcItem.Left := rcItem.Left + GetCheckRegionWidth - else - rcItem.Right := rcItem.Right - GetCheckRegionWidth; - inherited; -end; - -procedure TcxCustomInnerCheckListBox.CNMeasureItem(var Message: TWMMeasureItem); -begin - if Container.FListStyle = lbStandard then - Message.MeasureItemStruct.itemHeight := GetStandardItemHeight - else - inherited; -end; - -procedure TcxCustomInnerCheckListBox.CMColorChanged(var Message: TMessage); -begin - inherited; - FullRepaint; -end; - -procedure TcxCustomInnerCheckListBox.DrawCheck(R: TRect; - AState: TcxCheckBoxState; ACheckState: TcxEditCheckState); - - function GetCheckBorderStyle: TcxEditCheckBoxBorderStyle; - begin - with Container do - if not FNativeStyle and (FCheckBorderStyle = ebsFlat) and - (ACheckState in [ecsHot, ecsPressed]) then - Result := ebs3D - else - Result := FCheckBorderStyle; - end; - -begin - if R.Top < 0 then - Exit; - - DrawEditCheck(Canvas, GetCheckRect(R, True), AState, ACheckState, Glyph, - GlyphCount, GetCheckBorderStyle, Container.FNativeStyle, clBtnText, Color, - True, Container.IsDesigning, False, True, LookAndFeel.SkinPainter); -end; - -procedure TcxCustomInnerCheckListBox.InvalidateItem(Index: Integer); -var - R: TRect; -begin - R := ItemRect(Index); - InvalidateRect(Handle, @R, True); -end; - -procedure TcxCustomInnerCheckListBox.SynchronizeCheckStates(ANewHotCheckIndex, - ANewPressedCheckIndex: Integer); -begin - if ANewHotCheckIndex <> FHotCheckIndex then - begin - InvalidateCheck(FHotCheckIndex); - FHotCheckIndex := ANewHotCheckIndex; - InvalidateCheck(FHotCheckIndex); - end; - if ANewPressedCheckIndex <> FPressedCheckIndex then - begin - InvalidateCheck(FPressedCheckIndex); - FPressedCheckIndex := ANewPressedCheckIndex; - InvalidateCheck(FPressedCheckIndex); - end; -end; - -procedure TcxCustomInnerCheckListBox.UpdateCheckStates; -var - I: Integer; -begin - if Assigned(Container.FOnEditValueToCheckStates) then - begin - SetLength(CheckStates, Container.Items.Count); - Container.FOnEditValueToCheckStates(Container, Container.EditValue, - CheckStates); - end - else - CalculateCheckStates(Container.EditValue, CheckItems, - Container.EditValueFormat, CheckStates); - CheckItems.LockChanged(True); - try - for I := 0 to CheckItems.Count - 1 do - CheckItems[I].State := CheckStates[I]; - finally - CheckItems.LockChanged(False, False); - end; -end; - -procedure TcxCustomInnerCheckListBox.UpdateEditValue; -var - ANewEditValue: TcxEditValue; - AEditValueChanged: Boolean; - I: Integer; -begin - SetLength(CheckStates, CheckItems.Count); - for I := 0 to CheckItems.Count - 1 do - CheckStates[I] := CheckItems[I].State; - if Assigned(Container.FOnCheckStatesToEditValue) then - Container.FOnCheckStatesToEditValue(Container, CheckStates, ANewEditValue) - else - ANewEditValue := CalculateCheckStatesValue(CheckStates, CheckItems, - Container.EditValueFormat); - - if Assigned(Container.OnEditValueChanged) then - AEditValueChanged := not InternalVarEqualsExact(Container.FEditValue, ANewEditValue) - else - AEditValueChanged := False; - - Container.FEditValue := ANewEditValue; - Container.IsModified := True; - - if AEditValueChanged then - Container.DoEditValueChanged; -end; - -procedure TcxCustomInnerCheckListBox.WndProc(var Message: TMessage); -begin - inherited WndProc(Message); - case Message.Msg of - WM_HSCROLL, - WM_MOUSEWHEEL, - WM_VSCROLL: - CheckHotTrack; - end; -end; - -procedure TcxCustomInnerCheckListBox.InvalidateCheck(Index: Integer); -var - R: TRect; -begin - if not HandleAllocated then - Exit; - R := ItemRect(Index); - R := GetCheckRect(R, False); - InvalidateRect(Handle, @R, False); -end; - -function TcxCustomInnerCheckListBox.GetGlyph: TBitmap; -begin - if FGlyph = nil then - begin - FGlyph := TBitmap.Create; - FGlyph.OnChange := GlyphChanged; - end; - Result := FGlyph; -end; - -procedure TcxCustomInnerCheckListBox.GlyphChanged(Sender: TObject); -begin - AdjustItemHeight; -end; - -procedure TcxCustomInnerCheckListBox.SetGlyph(Value: TBitmap); -begin - if Value = nil then - begin - FreeAndNil(FGlyph); - AdjustItemHeight; - end - else - Glyph.Assign(Value); -end; - -procedure TcxCustomInnerCheckListBox.SetGlyphCount(Value: Integer); -begin - if FGlyphCount <> Value then - begin - FGlyphCount := Value; - if FGlyph <> nil then - AdjustItemHeight; - end; -end; - -procedure TcxCustomInnerCheckListBox.KeyPress(var Key: Char); -begin - if (Key = ' ') then - ToggleClickCheck(ItemIndex); - inherited KeyPress(Key); -end; - -procedure TcxCustomInnerCheckListBox.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -var - ANewHotCheckIndex, ANewPressedCheckIndex: Integer; -begin - inherited MouseDown(Button, Shift, X, Y); - if Button = mbLeft then - begin - ANewPressedCheckIndex := FNewPressedCheckIndex; - if (ANewPressedCheckIndex <> -1) and - ((Container.DragMode = dmAutomatic) or not FNewPressedCheckItemFullyVisible) and - CheckItems[ANewPressedCheckIndex].Enabled then - begin - ToggleClickCheck(ANewPressedCheckIndex); - ANewPressedCheckIndex := -1; - end; - end - else - ANewPressedCheckIndex := -1; - FCapturedCheckIndex := ANewPressedCheckIndex; - ANewHotCheckIndex := -1; - SynchronizeCheckStates(ANewHotCheckIndex, ANewPressedCheckIndex); -end; - -procedure TcxCustomInnerCheckListBox.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - if (Container.DragMode = dmAutomatic) and (GetCaptureControl <> Self) then - begin - FCapturedCheckIndex := -1; - SynchronizeCheckStates(FHotCheckIndex, -1); - end; - InternalMouseMove(Shift, X, Y); - BeginMouseTracking(Self, GetControlRect(Self), Self); -end; - -procedure TcxCustomInnerCheckListBox.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - ACheckIndex: Integer; - ANewHotCheckIndex, ANewPressedCheckIndex: Integer; -begin - inherited MouseUp(Button, Shift, X, Y); - if (Button = mbLeft) and (Container.DragMode <> dmAutomatic) then - begin - ACheckIndex := GetCheckAt(X, Y); - if (ACheckIndex = FPressedCheckIndex) and (ACheckIndex <> -1) and - CheckItems[ACheckIndex].Enabled then - ToggleClickCheck(ACheckIndex); - end; - FCapturedCheckIndex := -1; - ANewPressedCheckIndex := -1; - if Shift = [] then - ANewHotCheckIndex := GetCheckAt(X, Y) - else - ANewHotCheckIndex := -1; - SynchronizeCheckStates(ANewHotCheckIndex, ANewPressedCheckIndex); -end; - -function TcxCustomInnerCheckListBox.DoMouseWheel(Shift: TShiftState; - WheelDelta: Integer; MousePos: TPoint): Boolean; -begin - Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); - CheckHotTrack; -end; - -procedure TcxCustomInnerCheckListBox.ToggleClickCheck(Index: Integer); -var - ANewState, APrevState: TcxCheckBoxState; -begin - if (Index < 0) or (Index >= CheckItems.Count) or - not CheckItems[Index].Enabled then - Exit; - if Container.Focused and not Container.DataBinding.SetEditMode then - Exit; - - APrevState := CheckItems[Index].State; - case APrevState of - cbsUnchecked: -//TODO: if AllowGrayed and (Container.GetRealEditValueFormat <> cvfInteger) then - if AllowGrayed and (Container.EditValueFormat <> cvfInteger) then - ANewState := cbsGrayed - else - ANewState := cbsChecked; - cbsGrayed: ANewState := cbsChecked; - else - ANewState := cbsUnchecked; - end; - CheckItems[Index].State := ANewState; - DoClickCheck(Index, APrevState, ANewState); -end; - -procedure TcxCustomInnerCheckListBox.DoClickCheck(const AIndex: Integer; - const OldState, NewState: TcxCheckBoxState); -begin - if Assigned(FOnClickCheck) then - FOnClickCheck(Container, AIndex, OldState, NewState); -end; - -{ TcxCustomCheckListBox } - -constructor TcxCustomCheckListBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FEditValue := VarAsType(0, {$IFDEF DELPHI6}varInt64{$ELSE}varInteger{$ENDIF}); - FEditValueFormat := cvfInteger; - - FDataBinding := GetDataBindingClass.Create(Self, Self); - FDataBinding.OnDataChange := Self.DataChange; - FDataBinding.OnDataSetChange := Self.DataSetChange; - FDataBinding.OnUpdateData := Self.UpdateData; - - FInnerCheckListBox := GetInnerCheckListBoxClass.Create(Self); - FInnerCheckListBox.AutoSize := False; - FInnerCheckListBox.BorderStyle := bsNone; - FInnerCheckListBox.OnDrawItem := DrawItem; - FInnerCheckListBox.Parent := Self; - FInnerCheckListBox.LookAndFeel.MasterLookAndFeel := Style.LookAndFeel; - FInnerCheckListBox.CheckItems.OnChange := ItemsChanged; - - InnerControl := FInnerCheckListBox; - DataBinding.VisualControl := FInnerCheckListBox; - Width := 121; - Height := 97; - - FImageLayout := ilBeforeChecks; - FIntegralHeight := False; - FListStyle := lbStandard; - FInnerCheckListBox.Style := lbOwnerDrawFixed; - FShowChecks := True; - CalculateDrawCheckParams; - - FImagesChangeLink := TChangeLink.Create; - FImagesChangeLink.OnChange := ImagesChanged; -end; - -destructor TcxCustomCheckListBox.Destroy; -begin - FreeAndNil(FImagesChangeLink); - FreeAndNil(FInnerCheckListBox); - FreeAndNil(FDataBinding); - inherited Destroy; -end; - -function TcxCustomCheckListBox.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - FDataBinding.ExecuteAction(Action); -end; - -function TcxCustomCheckListBox.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or FDataBinding.UpdateAction(Action); -end; - -function TcxCustomCheckListBox.CheckAtPos(const APos: TPoint): Integer; -begin - Result := FInnerCheckListBox.GetCheckAt(APos.X - FInnerCheckListBox.Left, - APos.Y - FInnerCheckListBox.Top); -end; - -procedure TcxCustomCheckListBox.Clear; -begin - Items.Clear; -end; - -function TcxCustomCheckListBox.GetBestFitWidth: Integer; -var - AItemTextWidth, AMaxItemTextWidth: Integer; - I: Integer; -begin - with GetBorderExtent do - Result := Left + Right; - Inc(Result, FInnerCheckListBox.GetCheckRegionWidth + - FInnerCheckListBox.Metrics.TextWidthCorrection); - AMaxItemTextWidth := 0; - for I := 0 to Items.Count - 1 do - begin - AItemTextWidth := FInnerCheckListBox.Canvas.TextWidth(Items[I].Text); - if AItemTextWidth > AMaxItemTextWidth then - AMaxItemTextWidth := AItemTextWidth; - end; - Inc(Result, AMaxItemTextWidth); -end; - -function TcxCustomCheckListBox.GetHeight(ARowCount: Integer): Integer; -begin - with GetBorderExtent do - Result := FInnerCheckListBox.GetStandardItemHeight * ARowCount + Top + Bottom; -end; - -function TcxCustomCheckListBox.GetItemWidth(AIndex: Integer): Integer; -begin - with GetBorderExtent do - Result := Left + Right; - Inc(Result, FInnerCheckListBox.GetCheckRegionWidth + - Canvas.TextWidth(Items[AIndex].Text) + FInnerCheckListBox.Metrics.TextWidthCorrection); -end; - -function TcxCustomCheckListBox.ItemAtPos(const APos: TPoint; AExisting: Boolean): Integer; -begin - Result := FInnerCheckListBox.ItemAtPos( - Point(APos.X - FInnerCheckListBox.Left, APos.Y - FInnerCheckListBox.Top), - AExisting); -end; - -function TcxCustomCheckListBox.ItemRect(Index: Integer): TRect; -begin - Result := FInnerCheckListBox.ItemRect(Index); - OffsetRect(Result, FInnerCheckListBox.Left, FInnerCheckListBox.Top); -end; - -procedure TcxCustomCheckListBox.Sort; -begin - Items.Sort; -end; - -{$IFDEF DELPHI6} -procedure TcxCustomCheckListBox.AddItem(AItem: string); -var - ACheckItem: TcxCheckListBoxItem; -begin - ACheckItem := Items.Add; - ACheckItem.Text := AItem; -end; - -procedure TcxCustomCheckListBox.CopySelection(ADestination: TcxCustomCheckListBox); -begin - if ItemIndex <> -1 then - ADestination.AddItem(Items[ItemIndex].Text); -end; - -procedure TcxCustomCheckListBox.DeleteSelected; -begin - if ItemIndex <> -1 then - Items.Delete(ItemIndex); -end; - -procedure TcxCustomCheckListBox.MoveSelection(ADestination: TcxCustomCheckListBox); -begin - CopySelection(ADestination); - DeleteSelected; -end; -{$ENDIF} - -procedure TcxCustomCheckListBox.CalculateDrawCheckParams; -const - ABorderStyleMap: array[TcxLookAndFeelKind] of TcxEditCheckBoxBorderStyle = - (ebsFlat, ebs3D, ebsUltraFlat, ebsOffice11); -begin - with Style.LookAndFeel do - begin - FNativeStyle := NativeStyle and AreVisualStylesAvailable([totButton, totComboBox]); - if not FNativeStyle then - FCheckBorderStyle := ABorderStyleMap[Kind]; - end; -end; - -procedure TcxCustomCheckListBox.DoExit; -begin - if IsDestroying or FIsExitProcessing then - Exit; - FIsExitProcessing := True; - try - try - DataBinding.UpdateDataSource; - except - SetFocus; - raise; - end; - inherited DoExit; - finally - FIsExitProcessing := False; - end; -end; - -function TcxCustomCheckListBox.IsReadOnly: Boolean; -begin - Result := DataBinding.IsControlReadOnly; -end; - -procedure TcxCustomCheckListBox.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - if not ShowChecks then - case Key of - VK_PRIOR, VK_NEXT, VK_END, VK_HOME, VK_LEFT, VK_UP, VK_RIGHT, VK_DOWN: - if not DataBinding.SetEditMode then - Key := 0; - end; -end; - -procedure TcxCustomCheckListBox.KeyPress(var Key: Char); -begin - inherited KeyPress(Key); - if Key = #27 then - DataBinding.Reset - else - if IsTextChar(Key) and not ShowChecks and not DataBinding.SetEditMode then - Key := #0; -end; - -procedure TcxCustomCheckListBox.Loaded; -begin - inherited Loaded; - DataBinding.Reset; - Sorted := FLoadedSortedValue; - _TWinControlAccess._RecreateWnd(InnerCheckListBox); -end; - -procedure TcxCustomCheckListBox.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - CalculateDrawCheckParams; - inherited LookAndFeelChanged(Sender, AChangedValues); - if FInnerCheckListBox <> nil then - FInnerCheckListBox.AdjustItemHeight; -end; - -procedure TcxCustomCheckListBox.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = FImages) then - Images := nil; -end; - -function TcxCustomCheckListBox.GetReadOnly: Boolean; -begin - Result := DataBinding.ReadOnly; -end; - -procedure TcxCustomCheckListBox.SetReadOnly(Value: Boolean); -begin - DataBinding.ReadOnly := Value; -end; - -procedure TcxCustomCheckListBox.CheckEditValueFormat; -begin - if (GetRealEditValueFormat = cvfInteger) and (Items.Count > 64) then - raise EdxException.Create(cxGetResourceString(@cxSCheckControlIncorrectItemCount)); -end; - -function TcxCustomCheckListBox.GetRealEditValueFormat: TcxCheckStatesValueFormatEx; -begin - if Assigned(OnEditValueToCheckStates) and Assigned(OnCheckStatesToEditValue) then - Result := cvfCustom - else - Result := EditValueFormat; -end; - -procedure TcxCustomCheckListBox.ItemsChanged(Sender: TObject; AItem: TCollectionItem); -begin - CheckEditValueFormat; -end; - -function TcxCustomCheckListBox.CanResize(var NewWidth, NewHeight: Integer): Boolean; -begin - Result := inherited CanResize(NewWidth, NewHeight); - if not Result or not IntegralHeight or IsLoading then - Exit; - if Align in [alLeft, alRight, alClient] then - Exit; - GetOptimalHeight(NewHeight); - if NewHeight < 20 then Exit; -end; - -procedure TcxCustomCheckListBox.FontChanged; -begin - inherited FontChanged; - SetSize; -end; - -procedure TcxCustomCheckListBox.DrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - - procedure PrepareColors(AIsItemEnabled: Boolean); - begin - if (odSelected in State) and not IsDesigning then - begin - FInnerCheckListBox.Canvas.Font.Color := LookAndFeelPainter.DefaultSelectionTextColor; - FInnerCheckListBox.Canvas.Brush.Color := LookAndFeelPainter.DefaultSelectionColor; - end - else - begin - FInnerCheckListBox.Canvas.Brush.Color := ViewInfo.BackgroundColor; - FInnerCheckListBox.Canvas.Font.Color := VisibleFont.Color; - end; - if not (AIsItemEnabled or (odSelected in State)) then - FInnerCheckListBox.Canvas.Font.Color := StyleDisabled.TextColor; - end; - - function GetCheckState(AIsItemEnabled: Boolean): TcxEditCheckState; - begin - if not AIsItemEnabled then - Result := ecsDisabled - else - if FInnerCheckListBox.FHotCheckIndex = Index then - Result := ecsHot - else - if FInnerCheckListBox.FPressedCheckIndex = Index then - Result := ecsPressed - else - Result := ecsNormal; - end; - - procedure DrawCheckRegion(const ACheckRegion: TRect; AIsItemEnabled: Boolean); - - function GetGlyphRect: TRect; - var - ACheckBorderOffset, AGlyphOffset: Integer; - ACheckSize: TSize; - begin - AGlyphOffset := FInnerCheckListBox.Metrics.ContentOffset + - FInnerCheckListBox.Metrics.ImageFrameWidth; - if ShowChecks and (ImageLayout = ilAfterChecks) then - begin - FInnerCheckListBox.GetCheckMetrics(ACheckSize, ACheckBorderOffset); - ACheckSize.cx := ACheckSize.cx - ACheckBorderOffset * 2; - Inc(AGlyphOffset, ACheckSize.cx + FInnerCheckListBox.Metrics.CheckFrameWidth * 2); - end; - - with ACheckRegion do - begin - Result.Top := Top + (Bottom - Top - Images.Height) div 2; - Result.Bottom := Result.Top + Images.Height; - if UseRightToLeftAlignment then - begin - Result.Right := Right - AGlyphOffset; - Result.Left := Result.Right - Images.Width; - end - else - begin - Result.Left := Left + AGlyphOffset; - Result.Right := Result.Left + Images.Width; - end; - end; - end; - - var - AImageIndex: Integer; - begin - if ShowChecks then - FInnerCheckListBox.DrawCheck(ACheckRegion, Items[Index].State, - GetCheckState(AIsItemEnabled)); - AImageIndex := Items[Index].ImageIndex; - if VerifyImages(Images) and (AImageIndex <> -1) and (AImageIndex < Images.Count) then - DrawGlyph(FInnerCheckListBox.Canvas, Images, Items[Index].ImageIndex, - GetGlyphRect, Color, AIsItemEnabled); - end; - -const - ADrawTextAlignmentFlags: array[Boolean] of LongWord = (DT_LEFT, DT_RIGHT); -var - ABaseTestFlag: LongWord; - ACheckRegion, ATextRect, ADrawEventRect: TRect; - ADrawTextParams: DrawTextParams; - AEnabled: Boolean; - FText: string; -begin - if Index < Items.Count then - begin - FInnerCheckListBox.Canvas.Font.Assign(VisibleFont); - ACheckRegion := Rect; - ATextRect := Rect; - AEnabled := Enabled and Items[Index].Enabled; - if not UseRightToLeftAlignment then - begin - Dec(ACheckRegion.Left, FInnerCheckListBox.GetCheckRegionWidth); - Inc(ATextRect.Left, FInnerCheckListBox.Metrics.TextOffset); - end - else - begin - Inc(ACheckRegion.Right, FInnerCheckListBox.GetCheckRegionWidth); - Dec(ATextRect.Right, FInnerCheckListBox.Metrics.TextOffset); - end; - DrawCheckRegion(ACheckRegion, AEnabled); - PrepareColors(AEnabled); - FInnerCheckListBox.Canvas.FillRect(Rect); - FText := Items[Index].Text; - SetBkMode(FInnerCheckListBox.Canvas.Handle, TRANSPARENT); - PrepareColors(AEnabled); - ABaseTestFlag := DT_NOPREFIX or DT_VCENTER or DT_SINGLELINE or - ADrawTextAlignmentFlags[UseRightToLeftAlignment]; - if FInnerCheckListBox.TabWidth > 0 then - ABaseTestFlag := ABaseTestFlag or DT_EXPANDTABS or DT_TABSTOP; - with ADrawTextParams do - begin - cbSize := SizeOf(ADrawTextParams); - iTabLength := FInnerCheckListBox.TabWidth; - iLeftMargin := 0; - iRightMargin := 0; - end; - Windows.DrawTextEx(FInnerCheckListBox.Canvas.Handle, - PChar(FText), Length(FText), ATextRect, - ABaseTestFlag, @ADrawTextParams); - if odFocused in State then - FInnerCheckListBox.Canvas.DrawFocusRect(Rect); - end; - ADrawEventRect := Rect; - if Assigned(FOnDrawItem) then - FOnDrawItem(Self, Index, ADrawEventRect, State); -end; - -procedure TcxCustomCheckListBox.GetOptimalHeight(var ANewHeight: Integer); - - function GetItemHeight(AIndex: Integer): Integer; - begin - Result := FInnerCheckListBox.GetStandardItemHeight; - end; - -var - I: Integer; - ABorderExtent: TRect; - AItemHeight: Integer; - AListClientSize, AListSize, AScrollBarSize: TSize; - AScrollWidth: Integer; - AVScrollBar: Boolean; -begin - ABorderExtent := GetBorderExtent; - AListClientSize.cy := ABorderExtent.Top + ABorderExtent.Bottom; - AScrollBarSize := GetScrollBarSize; - AScrollWidth := ScrollWidth; - if AScrollWidth > 0 then - Inc(AScrollWidth, 4); - I := 0; - repeat - AItemHeight := GetItemHeight(I); - AListClientSize.cy := AListClientSize.cy + AItemHeight; - AListSize.cy := AListClientSize.cy; - AListClientSize.cx := Width - (ABorderExtent.Left + ABorderExtent.Right); - AVScrollBar := I + 1 < Count; - if AVScrollBar then - AListClientSize.cx := AListClientSize.cx - AScrollBarSize.cx; - if AListClientSize.cx < AScrollWidth then - AListSize.cy := AListSize.cy + AScrollBarSize.cy; - if AListSize.cy = ANewHeight then - Break; - if AListSize.cy > ANewHeight then - begin - if I > 0 then - begin - AListClientSize.cy := AListClientSize.cy - AItemHeight; - AListSize.cy := AListClientSize.cy; - AListClientSize.cx := Width - (ABorderExtent.Left + ABorderExtent.Right); - AVScrollBar := I < Count; - if AVScrollBar then - AListClientSize.cx := AListClientSize.cx - AScrollBarSize.cx; - if AListClientSize.cx < AScrollWidth then - AListSize.cy := AListSize.cy + AScrollBarSize.cy; - end; - Break; - end; - Inc(I); - until False; - ANewHeight := AListSize.cy; -end; - -function TcxCustomCheckListBox.IsInternalControl(AControl: TControl): Boolean; -begin - Result := (AControl = FInnerCheckListBox.HScrollBar) or (AControl = FInnerCheckListBox.VScrollBar) or - inherited IsInternalControl(AControl); -end; - -class function TcxCustomCheckListBox.GetDataBindingClass: TcxCustomDataBindingClass; -begin - Result := TcxCustomDataBinding; -end; - -procedure TcxCustomCheckListBox.DataChange; -begin - if ShowChecks then - EditValue := DataBinding.GetStoredValue(evsValue, Focused) - else - if DataBinding.IsDataSourceLive then - ItemIndex := Items.IndexOf(VarToStr(DataBinding.GetStoredValue(evsText, Focused))) - else - ItemIndex := -1; -end; - -procedure TcxCustomCheckListBox.UpdateData; -begin - if ShowChecks then - DataBinding.SetStoredValue(evsValue, EditValue) - else - if ItemIndex >= 0 then - DataBinding.SetStoredValue(evsText, Items[ItemIndex].Text) - else - DataBinding.SetStoredValue(evsText, ''); -end; - -procedure TcxCustomCheckListBox.SetSize; -var - ANewHeight: Integer; -begin - if IsLoading then - Exit; -// TODO -// try - if not IntegralHeight or (Align in [alLeft, alRight, alClient]) then - begin - inherited SetSize; - Exit; - end; - ANewHeight := Height; - GetOptimalHeight(ANewHeight); - Height := ANewHeight; - inherited SetSize; -// finally -// if FInnerCheckListBox.HandleAllocated then -// KillMouseMoveMessages; -// end; -end; - -procedure TcxCustomCheckListBox.WndProc(var Message: TMessage); -begin - if FInnerCheckListBox <> nil then - case Message.Msg of - LB_ADDSTRING .. LB_MSGMAX: - begin - with Message do - Result := SendMessage(FInnerCheckListBox.Handle, Msg, WParam, LParam); - Exit; - end; - end; - inherited WndProc(Message); - if (FInnerCheckListBox <> nil) and (Message.Msg = WM_COMMAND) and (Message.WParamHi = LBN_SELCHANGE) then - FInnerCheckListBox.SetExternalScrollBarsParameters; -end; - -function TcxCustomCheckListBox.GetOnClickCheck : TcxClickCheckEvent; -begin - Result := FInnerCheckListBox.FOnClickCheck; -end; - -function TcxCustomCheckListBox.GetOnCompare: TcxCollectionCompareEvent; -begin - Result := Items.OnCompare; -end; - -function TcxCustomCheckListBox.GetAllowGrayed : Boolean; -begin - Result := FInnerCheckListBox.FAllowGrayed; -end; - -function TcxCustomCheckListBox.GetAllowDblClickToggle: Boolean; -begin - Result := FInnerCheckListBox.AllowDblClickToggle; -end; - -function TcxCustomCheckListBox.GetAutoComplete: Boolean; -begin - Result := FInnerCheckListBox.AutoComplete; -end; - -function TcxCustomCheckListBox.GetAutoCompleteDelay: Cardinal; -begin - Result := FInnerCheckListBox.AutoCompleteDelay; -end; - -function TcxCustomCheckListBox.GetGlyph: TBitmap; -begin - Result := FInnerCheckListBox.Glyph; -end; - -function TcxCustomCheckListBox.GetGlyphCount: Integer; -begin - Result := FInnerCheckListBox.GlyphCount; -end; - -function TcxCustomCheckListBox.GetItemHeight: Integer; -begin - Result := FInnerCheckListBox.ItemHeight; -end; - -function TcxCustomCheckListBox.GetItems: TcxCheckListBoxItems; -begin - Result := FInnerCheckListBox.CheckItems; -end; - -function TcxCustomCheckListBox.GetColumns: Integer; -begin - Result := FInnerCheckListBox.Columns; -end; - -function TcxCustomCheckListBox.GetCount: Integer; -begin - Result := FInnerCheckListBox.Items.Count; -end; - -function TcxCustomCheckListBox.GetItemIndex: Integer; -begin - Result := FInnerCheckListBox.ItemIndex; -end; - -function TcxCustomCheckListBox.GetScrollWidth: Integer; -begin - Result := FInnerCheckListBox.ScrollWidth; -end; - -function TcxCustomCheckListBox.GetSelected(Index: Integer): Boolean; -begin - Result := FInnerCheckListBox.Selected[Index]; -end; - -function TcxCustomCheckListBox.GetSorted: Boolean; -begin - Result := Items.Sorted; -end; - -function TcxCustomCheckListBox.GetTabWidth: Integer; -begin - Result := FInnerCheckListBox.TabWidth; -end; - -function TcxCustomCheckListBox.GetTopIndex: Integer; -begin - Result := FInnerCheckListBox.TopIndex; -end; - -procedure TcxCustomCheckListBox.ImagesChanged(Sender: TObject); -begin - if FInnerCheckListBox <> nil then - FInnerCheckListBox.AdjustItemHeight; -end; - -function TcxCustomCheckListBox.IsItemHeightStored: Boolean; -begin - Result := FListStyle <> lbStandard; -end; - -procedure TcxCustomCheckListBox.SetOnClickCheck(Value: TcxClickCheckEvent); -begin - FInnerCheckListBox.FOnClickCheck := Value; -end; - -procedure TcxCustomCheckListBox.SetOnCompare(Value: TcxCollectionCompareEvent); -begin - Items.OnCompare := Value; -end; - -procedure TcxCustomCheckListBox.SetAllowGrayed(Value: Boolean); -begin - FInnerCheckListBox.FAllowGrayed := Value; -end; - -procedure TcxCustomCheckListBox.SetAllowDblClickToggle(Value: Boolean); -begin - FInnerCheckListBox.AllowDblClickToggle := Value; -end; - -procedure TcxCustomCheckListBox.SetAutoComplete(Value: Boolean); -begin - FInnerCheckListBox.AutoComplete := Value; -end; - -procedure TcxCustomCheckListBox.SetAutoCompleteDelay(Value: Cardinal); -begin - FInnerCheckListBox.AutoCompleteDelay := Value; -end; - -procedure TcxCustomCheckListBox.SetDataBinding(Value: TcxCustomDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxCustomCheckListBox.SetEditValueFormat(Value: TcxCheckStatesValueFormat); - - procedure ResetGrayedStates; - var - I: Integer; - begin - Items.LockChanged(True); - try - for I := 0 to Items.Count - 1 do - if Items[I].State = cbsGrayed then - Items[I].State := cbsUnchecked; - finally - Items.LockChanged(False, False); - end; - end; - -begin - if Value <> FEditValueFormat then - begin - FEditValueFormat := Value; - if IsModified then - begin - if Value = cvfInteger then - ResetGrayedStates; - InnerCheckListBox.UpdateEditValue; - end - else - InnerCheckListBox.UpdateCheckStates; - CheckEditValueFormat; - end; -end; - -procedure TcxCustomCheckListBox.SetGlyph(Value: TBitmap); -begin - FInnerCheckListBox.SetGlyph(Value); -end; - -procedure TcxCustomCheckListBox.SetGlyphCount(Value: Integer); -begin - FInnerCheckListBox.SetGlyphCount(Value); -end; - -procedure TcxCustomCheckListBox.SetItemHeight(Value: Integer); -begin - if FListStyle <> lbStandard then - FInnerCheckListBox.ItemHeight := Value; -end; - -procedure TcxCustomCheckListBox.SetItems(Value: TcxCheckListBoxItems); -begin - FInnerCheckListBox.CheckItems.Assign(Value); - DataChange; -end; - -procedure TcxCustomCheckListBox.SetColumns(Value: Integer); -begin - FInnerCheckListBox.Columns := Value; -{$IFDEF DELPHI5} - //FInnerCheckListBox.SetExternalScrollBarsParameters; {<- Release 4.2.1} -{$ENDIF} -end; - -procedure TcxCustomCheckListBox.SetImageLayout(Value: TcxCheckListBoxImageLayout); -begin - if Value <> FImageLayout then - begin - FImageLayout := Value; - FInnerCheckListBox.FullRepaint; - end; -end; - -procedure TcxCustomCheckListBox.SetIntegralHeight(Value: Boolean); -begin - if Value <> FIntegralHeight then - begin - FIntegralHeight := Value; - SetSize; - end; -end; - -procedure TcxCustomCheckListBox.SetItemIndex(Value: Integer); -begin - FInnerCheckListBox.ItemIndex := Value; -end; - -procedure TcxCustomCheckListBox.SetListStyle(Value: TListBoxStyle); -begin - if Value <> FListStyle then - begin - FListStyle := Value; - if Value = lbStandard then - Value := lbOwnerDrawFixed; - with FInnerCheckListBox do - if Style = Value then - RecreateWnd - else - Style := Value; - end; -end; - -procedure TcxCustomCheckListBox.SetImages(Value: TCustomImageList); -begin - cxSetImageList(Value, FImages, FImagesChangeLink, Self); -end; - -procedure TcxCustomCheckListBox.SetScrollWidth(Value: Integer); -begin - FInnerCheckListBox.ScrollWidth := Value; -end; - -procedure TcxCustomCheckListBox.SetSelected(Index: Integer; Value: Boolean); -begin -{$IFNDEF DELPHI6} - if not InnerCheckListBox.MultiSelect then - begin - if Selected[Index] <> Value then - if Value then - ItemIndex := Index - else - ItemIndex := -1; - end - else -{$ENDIF} - InnerCheckListBox.Selected[Index] := Value; -end; - -procedure TcxCustomCheckListBox.SetShowChecks(Value: Boolean); -begin - if Value <> FShowChecks then - begin - FShowChecks := Value; - FInnerCheckListBox.AdjustItemHeight; - DataBinding.Reset; - end; -end; - -procedure TcxCustomCheckListBox.SetSorted(Value: Boolean); -begin - if IsLoading then - FLoadedSortedValue := Value - else - Items.Sorted := Value; -end; - -procedure TcxCustomCheckListBox.SetTabWidth(Value: Integer); -begin - FInnerCheckListBox.TabWidth := Value; -end; - -procedure TcxCustomCheckListBox.SetTopIndex(Value: Integer); -begin - FInnerCheckListBox.TopIndex := Value; -end; - -{$IFDEF DELPHI6} -procedure TcxCustomCheckListBox.SetCount(Value: Integer); -begin - FInnerCheckListBox.Count := Value; -end; -{$ENDIF} - -procedure TcxCustomCheckListBox.DoEditValueChanged; -begin - if Assigned(FOnEditValueChanged) then - FOnEditValueChanged(Self); -end; - -function TcxCustomCheckListBox.GetInnerCheckListBoxClass: TcxCustomInnerCheckListBoxClass; -begin - Result := TcxCustomInnerCheckListBox; -end; - -function TcxCustomCheckListBox.IsValueValid(const AValue: Variant; - AAllowEmpty: Boolean): Boolean; -begin - Result := False; - if (IsVarEmpty(AValue) and AAllowEmpty) or VarIsNumericEx(AValue) then - Result := True - else - if VarIsStr(AValue) then - Result := IsValidStringForInt(VarToStr(AValue)) or - IsValidStringForDouble(VarToStr(AValue)); -end; - -procedure TcxCustomCheckListBox.SetEditValue(const Value: TcxEditValue); -var - AEditValueChanged: Boolean; -begin - IsModified := False; - - if Assigned(FOnEditValueChanged) then - AEditValueChanged := not InternalVarEqualsExact(Value, FEditValue) - else - AEditValueChanged := False; - - FEditValue := Value; - InnerCheckListBox.UpdateCheckStates; - - if AEditValueChanged then - FOnEditValueChanged(Self); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxColorComboBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxColorComboBox.pas deleted file mode 100644 index 599ffc6b..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxColorComboBox.pas +++ /dev/null @@ -1,2264 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxColorComboBox; - -interface - -{$I cxVer.inc} - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Messages, TypInfo, SysUtils, Classes, Controls, Graphics, StdCtrls, - Forms, Dialogs, cxClasses, cxControls, cxContainer, cxGraphics, - cxCustomData, cxDataStorage, cxDataUtils, cxVariants, - cxEdit, cxTextEdit, cxEditUtils, cxMaskEdit, cxDropDownEdit, cxImageComboBox, - cxExtEditConsts, cxFilterControlUtils; - -type - TcxColorBoxAlign = (cbaLeft, cbaRight); - TcxColorNamingConvention = (cxncNone, cxncDelphi, cxncHTML4, cxncX11); - TcxColorPrepareList = (cxplNone, cxplDelphi, cxplHTML4, cxplX11, cxplX11Ordered); - TcxColorValueFormat = (cxcvRGB, cxcvHexadecimal, cxcvInteger); - TcxDefaultColorStyle = (cxdcClear, cxdcColor, cxdcHatched, cxdcText, cxdcCustom); - TcxMRUColorAction = (mcaNone, mcaMoved, mcaAdded, mcaDeleted); - -type - { TcxColorComboBoxItem } - - TcxColorComboBoxItem = class(TCollectionItem) - private - FColor: TColor; - FDescription: TCaption; - FIsCustomColor: Boolean; - FTag: TcxTag; - function GetDescription: TCaption; - function IsTagStored: Boolean; - procedure SetColor(const Value: TColor); - procedure SetDescription(const Value: TCaption); - public - constructor Create(Collection: TCollection); override; - procedure Assign(Source: TPersistent); override; - property IsCustomColor: Boolean read FIsCustomColor; - published - property Color: TColor read FColor write SetColor; - property Description: TCaption read GetDescription write SetDescription; - property Tag: TcxTag read FTag write FTag stored IsTagStored; - end; - - { TcxColorComboBoxItems } - - TcxCustomColorComboBoxProperties = class; - - TcxColorComboBoxItems = class(TOwnedCollection) - private - FOnUpdate: TNotifyEvent; - function GetItems(Index: Integer): TcxColorComboBoxItem; - procedure SetItems(Index: Integer; const Value: TcxColorComboBoxItem); - protected - procedure Update(Item: TCollectionItem); override; - property OnUpdate: TNotifyEvent read FOnUpdate write FOnUpdate; - public - function Owner: TcxCustomColorComboBoxProperties; - property Items[Index: Integer]: TcxColorComboBoxItem read GetItems write SetItems; default; - function FindColorItem(const AColor: TColor): TcxColorComboBoxItem; virtual; - function GetIndexByColor(AColor: TColor): Integer; - function GetColorByIndex(AIndex: Integer; ADefaultColor: TColor): TColor; - function AddColor(const AColor: TColor; - const ADescription: string): TcxColorComboBoxItem; virtual; - function InsertColor(Index: Integer; const AColor: TColor; - const ADescription: string): TcxColorComboBoxItem; virtual; - function Add: TcxColorComboBoxItem; - function Insert(Index: Integer): TcxColorComboBoxItem; - procedure Move(CurIndex, NewIndex: Integer); virtual; - procedure ClearCustom; virtual; - procedure ClearNonCustom; virtual; - end; - - { TcxCustomColorComboBoxViewInfo } - - TcxCustomColorComboBoxViewInfo = class(TcxCustomTextEditViewInfo) - private - FBkColor: TColor; - FColorBoxWidth: Integer; - FColorBoxAlign: TcxColorBoxAlign; - FColorBoxRect: TRect; - FColorBoxFrameColor: TColor; - FColorBoxColor: TColor; - FShowDescriptions: Boolean; - FDefaultColorStyle: TcxDefaultColorStyle; - FFoundItem: Boolean; - public - property BkColor: TColor read FBkColor write FBkColor; - property ColorBoxWidth: Integer read FColorBoxWidth write FColorBoxWidth; - property ColorBoxAlign: TcxColorBoxAlign read FColorBoxAlign write FColorBoxAlign; - property ColorBoxFrameColor: TColor read FColorBoxFrameColor write FColorBoxFrameColor; - property ColorBoxColor: TColor read FColorBoxColor write FColorBoxColor; - property ColorBoxRect: TRect read FColorBoxRect write FColorBoxRect; - property DefaultColorStyle: TcxDefaultColorStyle read FDefaultColorStyle write FDefaultColorStyle; - property ShowDescriptions: Boolean read FShowDescriptions write FShowDescriptions; - property FoundItem: Boolean read FFoundItem write FFoundItem; - procedure Paint(ACanvas: TcxCanvas); override; - procedure Offset(DX, DY: Integer); override; - end; - - { TcxCustomColorComboBoxViewData } - - TcxCustomColorComboBoxViewData = class(TcxCustomDropDownEditViewData) - private - function GetProperties: TcxCustomColorComboBoxProperties; - protected - procedure CalculateViewInfoProperties(AViewInfo: TcxCustomEditViewInfo); virtual; - function InternalEditValueToDisplayText(AEditValue: TcxEditValue): string; override; - function InternalGetEditConstantPartSize(ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo): TSize; override; - function IsComboBoxStyle: Boolean; override; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); override; - procedure DisplayValueToDrawValue(const ADisplayValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - property Properties: TcxCustomColorComboBoxProperties read GetProperties; - end; - - { TcxColorComboBoxListBox } - - TcxCustomColorComboBox = class; - - TcxCustomColorComboBoxListBox = class(TcxCustomComboBoxListBox) - private - function GetEdit: TcxCustomColorComboBox; - protected - procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - public - function GetItemHeight(AIndex: Integer = -1): Integer; override; - property Edit: TcxCustomColorComboBox read GetEdit; - end; - - { TcxColorComboBoxLookupData } - - TcxColorComboBoxLookupData = class(TcxComboBoxLookupData) - protected - function GetListBoxClass: TcxCustomEditListBoxClass; override; - function GetItem(Index: Integer): string; override; - function GetItemCount: Integer; override; - function InternalChangeCurrentMRUColorPosition(const AColor: TColor): Integer; virtual; - public - function GetVisualAreaPreferredSize(AMaxHeight: Integer; - AWidth: Integer = 0): TSize; override; - procedure TextChanged; override; - end; - - TcxColorComboStyle = (cxccsComboList, cxccsComboEdit); - TcxColorDialogType = (cxcdtDefault, cxcdtCustom); - TcxSelectCustomColorEvent = procedure(Sender: TObject; var AColor: TColor; - var AColorDescription: string; var AddToList: Boolean) of object; - TcxNamingConventionEvent = procedure(Sender: TObject; const AColor: TColor; - var AColorDescription: string) of object; - TcxChangeItemIndexEvent = procedure(Sender: TObject; const AIndex: Integer) of object; - TcxGetDefaultColorEvent = procedure(Sender: TObject; var AColor: TColor) of object; - - { TcxCustomColorComboBoxProperties } - - TcxCustomColorComboBoxProperties = class(TcxCustomComboBoxProperties) - private - FAllowSelectColor: Boolean; - FColorComboStyle: TcxColorComboStyle; - FColorBoxAlign: TcxColorBoxAlign; - FColorBoxFrameColor: TColor; - FColorBoxWidth: Integer; - FColorDialogType: TcxColorDialogType; - FColorValueFormat: TcxColorValueFormat; - FDefaultColor: TColor; - FDefaultDescription: string; - FDefaultColorStyle: TcxDefaultColorStyle; - - FItems: TcxColorComboBoxItems; - FCustomColors: TcxColorComboBoxItems; - FMRUColors: TcxColorComboBoxItems; - - FMaxMRUColors: Byte; - FNamingConvention: TcxColorNamingConvention; - FShowDescriptions: Boolean; - FOnNamingConvention: TcxNamingConventionEvent; - FOnSelectCustomColor: TcxSelectCustomColorEvent; - FOnAddedMRUColor: TNotifyEvent; - FOnDeletedMRUColor: TNotifyEvent; - FOnGetDefaultColor: TcxGetDefaultColorEvent; - FOnLoadColorList: TNotifyEvent; - FPrepareList: TcxColorPrepareList; - function ColorItemByIndex(AIndex: Integer): TcxColorComboBoxItem; - procedure DeleteOverMRUColors; - function DoConvertNaming(AIndex: Integer): string; - function GetItems: TcxColorComboBoxItems; - procedure InternalGetColorComboBoxDisplayValue(AItemIndex: Integer; - const AEditValue: TcxEditValue; out AColor: TColor; - out ADescription: string; out AColorFound: Boolean); - procedure InternalPrepareColorList(APrepareList: TcxColorPrepareList); overload; - procedure InternalPrepareColorList(AColorValues: array of TColor; - AColorNames: array of string); overload; - function IsDefaultDescriptionStored: Boolean; - procedure ReadCustomColors(Reader: TReader); - procedure ReadPrepareInfo(Reader: TReader); - procedure SetAllowSelectColor(Value: Boolean); - procedure SetColorBoxAlign(Value: TcxColorBoxAlign); - procedure SetColorBoxFrameColor(Value: TColor); - procedure SetColorBoxWidth(Value: Integer); - procedure SetColorComboStyle(Value: TcxColorComboStyle); - procedure SetColorValueFormat(Value: TcxColorValueFormat); - procedure SetDefaultColor(Value: TColor); - procedure SetDefaultDescription(Value: string); - procedure SetDefaultColorStyle(Value: TcxDefaultColorStyle); - - procedure SetCustomColors(Value: TcxColorComboBoxItems); - procedure SetItems(const Value: TcxColorComboBoxItems); - procedure SetMaxMRUColors(Value: Byte); - - procedure SetNamingConvention(Value: TcxColorNamingConvention); - procedure SetPrepareList(Value: TcxColorPrepareList); - procedure SetShowDescriptions(const Value: Boolean); - procedure SynchronizeCustomColors; - procedure CustomColorChanged(ASender: TObject); - procedure ValidateMRUColors; - protected - procedure DefineProperties(Filer: TFiler); override; - function ShowColorBox(AColorFound: Boolean): Boolean; - class function GetLookupDataClass: TcxInterfacedPersistentClass; override; - class function GetPopupWindowClass: TcxCustomEditPopupWindowClass; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function HasDisplayValue: Boolean; override; - function IsEditValueNumeric: Boolean; override; - - function GetColorByIndex(AIndex: Integer): TColor; - function GetIndexByColor(AColor: TColor): Integer; - function GetDescriptionByIndex(AIndex: Integer): string; - function IndexByValue(const AValue: TcxEditValue): Integer; - function IsDisplayValueNumeric: Boolean; virtual; - - function AddMRUColor(const AColor: TColor): TcxMRUColorAction; virtual; - function DelMRUColor(const AColor: TColor): TcxMRUColorAction; virtual; - procedure ClearMRUColors; virtual; - procedure DoGetDefaultColor(var AColor: TColor); virtual; - procedure TranslateValues(const AEditValue: TcxEditValue; - var AColor: TColor; var ADescription: string; ANeedDescription: Boolean = False); - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CompareDisplayValues(const AEditValue1, AEditValue2: TcxEditValue): Boolean; override; - class function GetContainerClass: TcxContainerClass; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function IsDisplayValueValid(var DisplayValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - function GetDisplayText(const AEditValue: TcxEditValue; AFullText: - Boolean = False; AIsInplace: Boolean = True): WideString; override; - procedure Update(AProperties: TcxCustomEditProperties); override; - procedure GetColorComboBoxDisplayValue(const AEditValue: TcxEditValue; - out AColor: TColor; out ADescription: string; out AColorFound: Boolean); - - procedure PrepareColorList(APrepareList: TcxColorPrepareList; ASaveCustom, ASaveMRU: Boolean); - procedure PrepareDelphiColorList(const ASaveCustom, ASaveMRU: Boolean); - procedure PrepareHTML4ColorList(const ASaveCustom, ASaveMRU: Boolean); - procedure PrepareX11ColorList(const ASaveCustom, ASaveMRU: Boolean); - procedure PrepareX11OrderedColorList(const ASaveCustom, ASaveMRU: Boolean); - // !!! - property AllowSelectColor: Boolean read FAllowSelectColor - write SetAllowSelectColor default False; - property ColorBoxAlign: TcxColorBoxAlign read FColorBoxAlign - write SetColorBoxAlign default cbaLeft; - property ColorBoxFrameColor: TColor read FColorBoxFrameColor - write SetColorBoxFrameColor default clBtnShadow; - property ColorBoxWidth: Integer read FColorBoxWidth write SetColorBoxWidth - default 30; - property ColorComboStyle: TcxColorComboStyle read FColorComboStyle - write SetColorComboStyle default cxccsComboEdit; - property ColorDialogType: TcxColorDialogType read FColorDialogType - write FColorDialogType default cxcdtDefault; - property ColorValueFormat: TcxColorValueFormat read FColorValueFormat - write SetColorValueFormat default cxcvRGB; - property DefaultColor: TColor read FDefaultColor write SetDefaultColor - default clWindow; - property DefaultColorStyle: TcxDefaultColorStyle read FDefaultColorStyle - write SetDefaultColorStyle default cxdcColor; - property DefaultDescription: string read FDefaultDescription - write SetDefaultDescription stored IsDefaultDescriptionStored; - - property CustomColors: TcxColorComboBoxItems read FCustomColors write SetCustomColors; - property Items: TcxColorComboBoxItems read GetItems write SetItems; - property MaxMRUColors: Byte read FMaxMRUColors write SetMaxMRUColors - default 10; - property MRUColors: TcxColorComboBoxItems read FMRUColors write FMRUColors; - - property NamingConvention: TcxColorNamingConvention read FNamingConvention - write SetNamingConvention default cxncDelphi; - property PrepareList: TcxColorPrepareList read FPrepareList - write SetPrepareList default cxplDelphi; - property ShowDescriptions: Boolean read FShowDescriptions - write SetShowDescriptions default True; - property OnAddedMRUColor: TNotifyEvent read FOnAddedMRUColor - write FOnAddedMRUColor; - property OnDeletedMRUColor: TNotifyEvent read FOnDeletedMRUColor - write FOnDeletedMRUColor; - property OnGetDefaultColor: TcxGetDefaultColorEvent read FOnGetDefaultColor - write FOnGetDefaultColor; - property OnNamingConvention: TcxNamingConventionEvent - read FOnNamingConvention write FOnNamingConvention; - property OnSelectCustomColor: TcxSelectCustomColorEvent - read FOnSelectCustomColor write FOnSelectCustomColor; - end; - - { TcxColorComboBoxProperties } - - TcxColorComboBoxProperties = class(TcxCustomColorComboBoxProperties) - published - property Alignment; - property AllowSelectColor; - property AssignedValues; - property BeepOnError; - property ButtonGlyph; - property CharCase; - property ClearKey; - property ColorBoxAlign; - property ColorBoxFrameColor; - property ColorBoxWidth; - property ColorComboStyle; - property ColorDialogType; - property ColorValueFormat; - property CustomColors; - property DefaultColor; - property DefaultColorStyle; - property DefaultDescription; - property DropDownAutoWidth; - property DropDownRows; - property DropDownSizeable; - property DropDownWidth; - property ImeMode; - property ImeName; - property ImmediateDropDown; - property ImmediatePost; - property ImmediateUpdateText; - property MaxMRUColors; - property NamingConvention; - property OEMConvert; - property PopupAlignment; - property PostPopupValueOnTab; - property PrepareList; - property ReadOnly; - property Revertable; - property ShowDescriptions; - property ValidateOnEnter; - property OnAddedMRUColor; - property OnChange; - property OnCloseUp; - property OnDeletedMRUColor; - property OnEditValueChanged; - property OnGetDefaultColor; - property OnInitPopup; - property OnNamingConvention; - property OnNewLookupDisplayText; - property OnPopup; - property OnSelectCustomColor; - end; - - { TcxCustomColorComboBoxInnerEdit } - - TcxCustomColorComboBoxInnerEdit = class(TcxCustomComboBoxInnerEdit); - - { TcxColorComboBoxPopupWindow } - - TcxColorComboBoxPopupWindow = class(TcxComboBoxPopupWindow) - public - property ViewInfo; - property SysPanelStyle; - end; - - { TcxCustomColorComboBox } - - TcxCustomColorComboBox = class(TcxCustomComboBox) - private - FColorDialog: TColorDialog; - FDontCheckModifiedWhenUpdatingMRUList: Boolean; - FIsDialogShowed: Boolean; - FNeedsUpdateMRUList: Boolean; - FPropertiesUpdate: Boolean; - function GetColorDialog: TColorDialog; - function GetColorValue: TColor; - function IsColorValueStored: Boolean; - procedure SetColorValue(Value: TColor); - function GetLookupData: TcxColorComboBoxLookupData; - function GetProperties: TcxCustomColorComboBoxProperties; - function GetActiveProperties: TcxCustomColorComboBoxProperties; - procedure SetProperties(Value: TcxCustomColorComboBoxProperties); - procedure PropertiesLoadColorListHandler(Sender: TObject); - procedure UpdateMRUList; - procedure FlushEditValue; - protected - procedure AfterPosting; override; - procedure ContainerStyleChanged(Sender: TObject); override; - procedure PropertiesChanged(Sender: TObject); override; - procedure DblClick; override; - procedure DoButtonClick(AButtonVisibleIndex: Integer); override; - function GetDisplayValue: string; override; - function GetEditingValue: TcxEditValue; override; - function GetInnerEditClass: TControlClass; override; - procedure Initialize; override; - procedure InitializePopupWindow; override; - function IsValidChar(AChar: Char): Boolean; override; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); override; - function LookupKeyToEditValue(const AKey: TcxEditValue): TcxEditValue; override; - procedure InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); override; - procedure SynchronizeDisplayValue; override; - procedure CloseUp(AReason: TcxEditCloseUpReason); override; - procedure DoSelectCustomColor(Sender: TObject); virtual; - procedure FixMRUPosition(AColor: TColor); virtual; - procedure ClearEditValue; virtual; - procedure DoOnSelectCustomColor(var AColor: TColor; - var AColorDescription: string; var AddToList: Boolean); - property ColorValue: TColor read GetColorValue write SetColorValue - stored IsColorValueStored; - property ColorDialog: TColorDialog read GetColorDialog; - property LookupData: TcxColorComboBoxLookupData read GetLookupData; - public - destructor Destroy; override; - - function Deactivate: Boolean; override; - function Focused: Boolean; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function IsChildWindow(AWnd: THandle): Boolean; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - - function AddMRUColor(const AColor: TColor): TcxMRUColorAction; - function DelMRUColor(const AColor: TColor): TcxMRUColorAction; - - procedure PrepareColorList(APrepareList: TcxColorPrepareList; ASaveCustom, ASaveMRU: Boolean); - procedure PrepareDelphiColorList(const ASaveCustom, ASaveMRU: Boolean); - procedure PrepareHTML4ColorList(const ASaveCustom, ASaveMRU: Boolean); - procedure PrepareX11ColorList(const ASaveCustom, ASaveMRU: Boolean); - procedure PrepareX11OrderedColorList(const ASaveCustom, ASaveMRU: Boolean); - - property ActiveProperties: TcxCustomColorComboBoxProperties - read GetActiveProperties; - property Properties: TcxCustomColorComboBoxProperties read GetProperties - write SetProperties; - end; - - { TcxColorComboBox } - - TcxColorComboBox = class(TcxCustomColorComboBox) - private - function GetActiveProperties: TcxColorComboBoxProperties; - function GetProperties: TcxColorComboBoxProperties; - procedure SetProperties(Value: TcxColorComboBoxProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxColorComboBoxProperties - read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property ColorValue; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxColorComboBoxProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxFilterColorComboBoxHelper } - - TcxFilterColorComboBoxHelper = class(TcxFilterComboBoxHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - -implementation - -uses - cxExtEditUtils, dxThemeConsts, dxThemeManager, dxUxTheme; - -type - TCanvasAccess = class(TCanvas); - -function ConvertColorName(AColor: TColor; ADescription: string; - const ANamingConvention: TcxColorNamingConvention; - const AColorValueFormat: TcxColorValueFormat): string; - - function ConvertUnknowColor: string; - var - RGB: Cardinal; - begin - RGB := ColorToRGB(AColor); - case AColorValueFormat of - cxcvRGB: - Result := Format('%d.%d.%d', [GetRValue(RGB), GetGValue(RGB), GetBValue(RGB)]); - cxcvHexadecimal: - Result := Format('%s%.2x%.2x%.2x', [HexDisplayPrefix, GetRValue(RGB), GetGValue(RGB), GetBValue(RGB)]); - else - Result := IntToStr(AColor); - end; - end; - - function GetColorName(AColorValues: array of TColor; AColorNames: array of string): string; - var - I: Integer; - begin - for I := Low(AColorValues) to High(AColorValues) do - if AColorValues[I] = AColor then - begin - Result := AColorNames[I]; - Exit; - end; - Result := ConvertUnknowColor; - end; - -begin - case ANamingConvention of - cxncNone: Result := ADescription; - cxncDelphi: Result := GetColorName(cxDelphiColorValues, cxDelphiColorNames); - cxncHTML4: Result := GetColorName(cxHTML4ColorValues, cxHTML4ColorNames); - cxncX11: Result := GetColorName(cxX11ColorValues, cxX11ColorNames); - end; -end; - -procedure DrawColorBox(ACanvas: TcxCanvas;ARect: TRect; const AFrameColor, - ABoxColor, ABkColor: TColor; const DefaultColorStyle: TcxDefaultColorStyle); -var - FRectangle: TRect; -begin - if (ARect.Left <> ARect.Right) and (ARect.Bottom <> ARect.Top) then - begin - ACanvas.Brush.Style := bsSolid; - ACanvas.Brush.Color := ABkColor; - ACanvas.FrameRect(ARect); - InflateRect(ARect, -1, -1); - ACanvas.Brush.Color := AFrameColor; - ACanvas.FrameRect(ARect); - InflateRect(ARect, -1, -1); - case DefaultColorStyle of - cxdcClear: - begin - ACanvas.Brush.Color := ABkColor; - ACanvas.FillRect(ARect); - end; - cxdcColor, cxdcCustom, cxdcText: - begin - ACanvas.Brush.Color := ABoxColor; - ACanvas.FillRect(ARect); - end; - cxdcHatched: begin - ACanvas.Brush.Color := ABkColor; - ACanvas.FillRect(ARect); - ACanvas.Pen.Color := ABkColor; - ACanvas.Brush.Color := ABoxColor; - ACanvas.Brush.Style := bsDiagCross; - FRectangle := ARect; - InflateRect(FRectangle, 1, 1); -{$IFDEF DELPHI5} - ACanvas.Canvas.Rectangle(FRectangle); -{$ELSE} - ACanvas.Canvas.Rectangle(FRectangle.Left, FRectangle.Top, FRectangle.Right, FRectangle.Bottom); -{$ENDIF} - ACanvas.Pen.Color := AFrameColor; - ACanvas.Polyline([Point(ARect.Left -1 , ARect.Top - 1), Point(ARect.Right, ARect.Top - 1), - Point(ARect.Right, ARect.Bottom), Point(ARect.Left - 1, ARect.Bottom), - Point(ARect.Left - 1, ARect.Top - 1)]); - end; - end; - ACanvas.Brush.Style := bsSolid; - end; -end; - -{ TcxColorComboBoxItem } - -constructor TcxColorComboBoxItem.Create(Collection: TCollection); -begin - inherited Create(Collection); - FIsCustomColor := True; - FDescription := ''; -end; - -procedure TcxColorComboBoxItem.Assign(Source: TPersistent); -begin - if Source is TcxColorComboBoxItem then - with TcxColorComboBoxItem(Source) do - begin - Self.Color := Color; - Self.Description := Description; - Self.FIsCustomColor := IsCustomColor; - Self.Tag := Tag; - end - else - inherited Assign(Source); -end; - -procedure TcxColorComboBoxItem.SetDescription(const Value: TCaption); -begin - if FDescription <> Value then - begin - FDescription := Value; - Changed(False); - end; -end; - -function TcxColorComboBoxItem.GetDescription: TCaption; -begin - Result := FDescription; -end; - -function TcxColorComboBoxItem.IsTagStored: Boolean; -begin - Result := FTag <> 0; -end; - -procedure TcxColorComboBoxItem.SetColor(const Value: TColor); -begin - if FColor <> Value then - begin - FColor := Value; - Changed(False); - end; -end; - -{ TcxColorComboBoxItems } - -function TcxColorComboBoxItems.GetItems(Index: Integer): TcxColorComboBoxItem; -begin - Result := TcxColorComboBoxItem(inherited Items[Index]); -end; - -procedure TcxColorComboBoxItems.SetItems(Index: Integer;const Value: TcxColorComboBoxItem); -begin - inherited Items[Index] := Value; -end; - -procedure TcxColorComboBoxItems.Update(Item: TCollectionItem); -begin - if Assigned(OnUpdate) then - OnUpdate(Item); - if Owner <> nil then - Owner.Changed; -end; - -function TcxColorComboBoxItems.Owner: TcxCustomColorComboBoxProperties; -begin - if GetOwner is TcxCustomColorComboBoxProperties then - Result := TcxCustomColorComboBoxProperties(GetOwner) - else - Result := nil; -end; - -function TcxColorComboBoxItems.FindColorItem(const AColor: TColor): TcxColorComboBoxItem; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - begin - if Items[I].Color = AColor then - begin - Result := Items[I]; - Break; - end; - end; -end; - -function TcxColorComboBoxItems.GetIndexByColor(AColor: TColor): Integer; -var - I : Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - begin - if Items[I].Color = AColor then - begin - Result := I; - Break; - end; - end; -end; - -function TcxColorComboBoxItems.GetColorByIndex(AIndex: Integer; - ADefaultColor: TColor): TColor; -begin - Result := ADefaultColor; - if (AIndex >= 0) and (AIndex <= (Count - 1)) then - Result := Items[AIndex].Color; -end; - -function TcxColorComboBoxItems.Add: TcxColorComboBoxItem; -begin - Result := TcxColorComboBoxItem(inherited Add); -end; - -function TcxColorComboBoxItems.Insert(Index: Integer): TcxColorComboBoxItem; -begin - Result := TcxColorComboBoxItem(inherited Insert(Index)); -end; - -function TcxColorComboBoxItems.AddColor(const AColor: TColor; - const ADescription: string): TcxColorComboBoxItem; -begin - Result := nil; - if (FindColorItem(AColor) <> nil) then Exit; - Result := Add; - Result.Color := AColor; - Result.Description := ADescription; -end; - -function TcxColorComboBoxItems.InsertColor(Index: Integer; const AColor: TColor; - const ADescription: string): TcxColorComboBoxItem; -begin - Result := nil; - if (FindColorItem(AColor) <> nil) then Exit; - Result := Insert(Index); - Result.Color := AColor; - Result.Description := ADescription; -end; - -procedure TcxColorComboBoxItems.Move(CurIndex, NewIndex: Integer); -var - FNewColorItem, FOldColorItem: TcxColorComboBoxItem; -begin - if CurIndex = NewIndex then Exit; - FOldColorItem := Items[CurIndex]; - FNewColorItem := Insert(NewIndex); - FNewColorItem.Assign(FOldColorItem); - FOldColorItem.Free; -end; - -procedure TcxColorComboBoxItems.ClearCustom; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - if Items[I].IsCustomColor then - Delete(I); -end; - -procedure TcxColorComboBoxItems.ClearNonCustom; -var - I: Integer; -begin - for I := (Count - 1) downto 0 do - if not Items[I].IsCustomColor then - Delete(I); -end; - -{ TcxCustomColorComboBoxViewInfo } - -procedure TcxCustomColorComboBoxViewInfo.Paint(ACanvas: TcxCanvas); -var - FRealDefaultColorStyle: TcxDefaultColorStyle; -begin - inherited Paint(ACanvas); - if not FoundItem and (DefaultColorStyle = cxdcText) then - Exit; - - FRealDefaultColorStyle := DefaultColorStyle; - if (DefaultColorStyle <> cxdcText) and FoundItem then - FRealDefaultColorStyle := cxdcColor; - DrawColorBox(ACanvas, ColorBoxRect, ColorBoxFrameColor, ColorBoxColor, - BkColor, FRealDefaultColorStyle); - - if not IsInplace and not ShowDescriptions and Focused and not HasPopupWindow then - begin - ACanvas.Font.Color := clBtnText; - ACanvas.Brush.Color := BackgroundColor; - TCanvasAccess(ACanvas.Canvas).RequiredState([csFontValid]); - ACanvas.Canvas.DrawFocusRect(ClientRect); - end; -end; - -procedure TcxCustomColorComboBoxViewInfo.Offset(DX, DY: Integer); -begin - inherited Offset(DX, DY); - OffsetRect(FColorBoxRect, DX, DY); -end; - -{ TcxCustomColorComboBoxViewData } - -procedure TcxCustomColorComboBoxViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); -var - R: TRect; - FViewInfo: TcxCustomColorComboBoxViewInfo; -begin - if IsRectEmpty(ABounds) then begin - inherited; - Exit; - end; - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - if (ABounds.Right = MaxInt) or (ABounds.Bottom = MaxInt) then Exit; - - FViewInfo := TcxCustomColorComboBoxViewInfo(AViewInfo); - CalculateViewInfoProperties(FViewInfo); - R := FViewInfo.ClientRect; - FViewInfo.FColorBoxRect := R; - if (FViewInfo.DefaultColorStyle = cxdcText) and not FViewInfo.FoundItem then - FViewInfo.FColorBoxRect.Right := FViewInfo.FColorBoxRect.Left - else - begin - if FViewInfo.ShowDescriptions then - begin - if FViewInfo.ColorBoxAlign = cbaLeft then - begin - FViewInfo.FColorBoxRect.Right := FViewInfo.FColorBoxRect.Left + FViewInfo.ColorBoxWidth ; - R.Left := FViewInfo.FColorBoxRect.Right; - end - else - begin - FViewInfo.FColorBoxRect.Left := FViewInfo.FColorBoxRect.Right - FViewInfo.ColorBoxWidth ; - R.Right := FViewInfo.FColorBoxRect.Left; - end; - end; - end; - FViewInfo.ClientRect := R; - if not IsInplace then - InflateRect(R, -2, -2) - else - InflateRect(R, -2, -1); - FViewInfo.TextRect := R; - if not FViewInfo.ShowDescriptions then FViewInfo.Text := ''; - if not IsInplace then FViewInfo.DrawSelectionBar := False; -end; - -procedure TcxCustomColorComboBoxViewData.CalculateViewInfoProperties(AViewInfo: TcxCustomEditViewInfo); -var - AProperties: TcxCustomColorComboBoxProperties; -begin - AProperties := TcxCustomColorComboBoxProperties(Properties); - with TcxCustomColorComboBoxViewInfo(AViewInfo) do - begin - BkColor := BackgroundColor; - ColorBoxAlign := AProperties.ColorBoxAlign; - ColorBoxWidth := AProperties.ColorBoxWidth; - ColorBoxFrameColor := AProperties.ColorBoxFrameColor; - ShowDescriptions := AProperties.ShowDescriptions; - DefaultColorStyle := AProperties.DefaultColorStyle; - if (DefaultColorStyle = cxdcCustom) and (not FoundItem) then - AProperties.DoGetDefaultColor(FColorBoxColor); - end; -end; - -function TcxCustomColorComboBoxViewData.InternalEditValueToDisplayText( - AEditValue: TcxEditValue): string; -var - AColor: TColor; - AColorFound: Boolean; - ADisplayText: string; -begin - Properties.GetColorComboBoxDisplayValue(AEditValue, AColor, ADisplayText, - AColorFound); - Result := ADisplayText; -end; - -function TcxCustomColorComboBoxViewData.InternalGetEditConstantPartSize(ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo): TSize; -begin - Result := inherited InternalGetEditConstantPartSize(ACanvas, AIsInplace, - AEditSizeProperties, MinContentSize, AViewInfo); - if TcxCustomColorComboBoxProperties(Properties).ShowDescriptions then - Result.cx := Result.cx + TcxCustomColorComboBoxProperties(Properties).ColorBoxWidth + 6; -end; - -function TcxCustomColorComboBoxViewData.IsComboBoxStyle: Boolean; -begin - Result := True; -end; - -function TcxCustomColorComboBoxViewData.GetProperties: TcxCustomColorComboBoxProperties; -begin - Result := TcxCustomColorComboBoxProperties(FProperties); -end; - -procedure TcxCustomColorComboBoxViewData.DisplayValueToDrawValue(const ADisplayValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); -var - AViewInfoAccess: TcxCustomColorComboBoxViewInfo; -begin - if (Edit = nil) or IsVarEmpty(ADisplayValue) then - Exit; - AViewInfoAccess := TcxCustomColorComboBoxViewInfo(AViewInfo); - Properties.InternalGetColorComboBoxDisplayValue( - TcxCustomColorComboBox(Edit).ILookupData.CurrentKey, Edit.EditValue, - AViewInfoAccess.FColorBoxColor, AViewInfoAccess.Text, - AViewInfoAccess.FFoundItem); -end; - -procedure TcxCustomColorComboBoxViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -var - AColorComboViewInfo: TcxCustomColorComboBoxViewInfo; -begin - AColorComboViewInfo := TcxCustomColorComboBoxViewInfo(AViewInfo); - Properties.GetColorComboBoxDisplayValue(AEditValue, - AColorComboViewInfo.FColorBoxColor, AColorComboViewInfo.Text, - AColorComboViewInfo.FFoundItem); - if PreviewMode then - AColorComboViewInfo.Text := ''; - DoOnGetDisplayText(string(AColorComboViewInfo.Text)); -end; - -{ TcxCustomColorComboBoxListBox } - -function TcxCustomColorComboBoxListBox.GetItemHeight(AIndex: Integer = -1): Integer; -begin - with Edit.ActiveProperties do - begin - if ItemHeight > 0 then - Result := ItemHeight - else - begin - Result := inherited GetItemHeight; - if Result < 16 then - Result := 16; - end; - if (AIndex >= 0) and Edit.IsOnMeasureItemEventAssigned then - Edit.DoOnMeasureItem(AIndex, Canvas, Result); - if AIndex = FMRUColors.Count - 1 then - Inc(Result, MRUDelimiterWidth); - end; -end; - -procedure TcxCustomColorComboBoxListBox.DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); -var - AColorBoxRect, ATextRect: TRect; - AFlags: Longint; -begin - SaveCanvasParametersForFocusRect; - try - if DoDrawItem(Index, Rect, State) then - Exit; - - Canvas.FillRect(Rect); - AColorBoxRect := Rect; - if Index = Edit.ActiveProperties.MRUColors.Count - 1 then - Dec(AColorBoxRect.Bottom, MRUDelimiterWidth); - ATextRect := AColorBoxRect; - if Edit.ActiveProperties.ShowDescriptions then - begin - AFlags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_LEFT or DT_NOPREFIX); - if Edit.ActiveProperties.ColorBoxAlign = cbaRight then - begin - Dec(ATextRect.Right, Edit.ActiveProperties.ColorBoxWidth); - AColorBoxRect.Left := ATextRect.Right; - end - else - begin - Inc(ATextRect.Left, Edit.ActiveProperties.ColorBoxWidth); - AColorBoxRect.Right := ATextRect.Left; - end; - Canvas.DrawText(GetItem(Index), ATextRect, AFlags); - end - else - ATextRect.Left := AColorBoxRect.Right; - DrawColorBox(Canvas, AColorBoxRect, Edit.ActiveProperties.ColorBoxFrameColor, - Edit.ActiveProperties.GetColorByIndex(Index), Canvas.Brush.Color, cxdcColor); - if Index = Edit.ActiveProperties.FMRUColors.Count - 1 then - DrawMRUDelimiter(Canvas.Canvas, Rect, odSelected in State); - finally - RestoreCanvasParametersForFocusRect; - end; -end; - -procedure TcxCustomColorComboBoxListBox.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if Button <> mbLeft then Exit; - SetCaptureControl(nil); - Edit.CloseUp(crEnter); -end; - -function TcxCustomColorComboBoxListBox.GetEdit: TcxCustomColorComboBox; -begin - Result := TcxCustomColorComboBox(inherited Edit); -end; - -{ TcxColorComboBoxLookupData } - -function TcxColorComboBoxLookupData.GetListBoxClass: TcxCustomEditListBoxClass; -begin - Result := TcxCustomColorComboBoxListBox; -end; - -function TcxColorComboBoxLookupData.GetItem(Index: Integer): string; -begin - with TcxCustomColorComboBoxProperties(ActiveProperties) do - Result := GetDescriptionByIndex(Index); -end; - -function TcxColorComboBoxLookupData.GetItemCount: Integer; -begin - with TcxCustomColorComboBoxProperties(ActiveProperties) do - Result := MRUColors.Count + Items.Count; -end; - -function TcxColorComboBoxLookupData.GetVisualAreaPreferredSize( - AMaxHeight: Integer; AWidth: Integer = 0): TSize; -var - AScrollWidth: Integer; -begin - Result := inherited GetVisualAreaPreferredSize(AMaxHeight, AWidth); - Result.cx := Result.cx + - TcxCustomColorComboBoxProperties(ActiveProperties).ColorBoxWidth; - AScrollWidth := List.ScrollWidth; - Inc(AScrollWidth, - TcxCustomColorComboBoxProperties(ActiveProperties).ColorBoxWidth); - List.ScrollWidth := 0; - List.ScrollWidth := AScrollWidth; -end; - -procedure TcxColorComboBoxLookupData.TextChanged; -begin - if not TcxCustomColorComboBox(Edit).EditModeSetting then - with TcxCustomColorComboBoxProperties(ActiveProperties) do - InternalSetCurrentKey(IndexByValue(Edit.EditValue)); -end; - -function TcxColorComboBoxLookupData.InternalChangeCurrentMRUColorPosition( - const AColor: TColor): Integer; -var - FIndex: Integer; -begin - Result := ItemIndex; - with TcxCustomColorComboBoxProperties(ActiveProperties) do - if ItemIndex >= (FMRUColors.Count - 1) then - begin - FIndex := FMRUColors.GetIndexByColor(AColor); - if FIndex >= 0 then - begin - Result := FIndex; - InternalSetCurrentKey(FIndex); - end; - end; -end; -{ TcxColorComboBoxLookupData } - -{ TcxCustomColorComboBoxProperties } - -constructor TcxCustomColorComboBoxProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FItems := TcxColorComboBoxItems.Create(Self, TcxColorComboBoxItem); - FCustomColors := TcxColorComboBoxItems.Create(Self, TcxColorComboBoxItem); - FCustomColors.OnUpdate := CustomColorChanged; - FMRUColors := TcxColorComboBoxItems.Create(Self, TcxColorComboBoxItem); - - DropDownListStyle := lsFixedList; - FColorBoxAlign := cbaLeft; - FColorBoxWidth := 30; - FColorBoxFrameColor := clBtnShadow; - FColorDialogType := cxcdtDefault; - FShowDescriptions := True; - FDefaultColor := clWindow; - FDefaultDescription := cxGetResourceString(@cxSColorComboBoxDefaultDescription); - FDefaultColorStyle := cxdcColor; - FAllowSelectColor := False; - FColorComboStyle := cxccsComboEdit; - FNamingConvention := cxncDelphi; - FColorValueFormat := cxcvRGB; - FMaxMRUColors := 10; - PrepareList := cxplDelphi; - Buttons.Add; - GlyphButtonIndex := 1; - Buttons[1].Kind := bkEllipsis; - Buttons[1].Default := False; - Buttons[1].Visible := False; -end; - -destructor TcxCustomColorComboBoxProperties.Destroy; -begin - FreeAndNil(FMRUColors); - FreeAndNil(FCustomColors); - FreeAndNil(FItems); - inherited; -end; - -procedure TcxCustomColorComboBoxProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomColorComboBoxProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomColorComboBoxProperties do - begin - Self.ColorBoxWidth := ColorBoxWidth; - Self.ColorBoxAlign := ColorBoxAlign; - Self.ColorBoxFrameColor := ColorBoxFrameColor; - Self.ColorDialogType := ColorDialogType; - Self.DefaultColor := DefaultColor; - Self.DefaultDescription := DefaultDescription; - Self.DefaultColorStyle := DefaultColorStyle; - Self.ShowDescriptions := ShowDescriptions; - Self.AllowSelectColor := AllowSelectColor; - Self.ColorComboStyle := ColorComboStyle; - Self.MaxMRUColors := MaxMRUColors; - Self.NamingConvention := NamingConvention; - Self.PrepareList := PrepareList; - Self.ColorValueFormat := ColorValueFormat; - Self.OnSelectCustomColor := OnSelectCustomColor; - Self.OnNamingConvention := OnNamingConvention; - Self.OnGetDefaultColor := OnGetDefaultColor; - Self.OnAddedMRUColor := OnAddedMRUColor; - Self.OnDeletedMRUColor := OnDeletedMRUColor; - Self.CustomColors := CustomColors; - Self.Items := Items; - Self.MRUColors.Assign(MRUColors); - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomColorComboBoxProperties.CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; -var - AColor1, AColor2: TColor; - AColorFound1, AColorFound2: Boolean; - ADescription1, ADescription2: string; -begin - GetColorComboBoxDisplayValue(AEditValue1, AColor1, ADescription1, AColorFound1); - GetColorComboBoxDisplayValue(AEditValue2, AColor2, ADescription2, AColorFound2); - - Result := ShowColorBox(AColorFound1) = ShowColorBox(AColorFound2); - if Result then - if ShowColorBox(AColorFound1) then - Result := (AColor1 = AColor2) and (not ShowDescriptions or InternalCompareString(ADescription1, ADescription2, True)) - else - Result := not ShowDescriptions or InternalCompareString(ADescription1, ADescription2, True); -// Result := (AColorFound1 = AColorFound2) and (not AColorFound1 or -// (AColor1 = AColor2) and (not ShowDescriptions or InternalCompareString(ADescription1, ADescription2, True))); -end; - -class function TcxCustomColorComboBoxProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxColorComboBox; -end; - -class function TcxCustomColorComboBoxProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomColorComboBoxViewInfo; -end; - -function TcxCustomColorComboBoxProperties.GetEditValueSource(AEditFocused: Boolean): - TcxDataEditValueSource; -begin - Result := evsValue; -end; - -function TcxCustomColorComboBoxProperties.IsDisplayValueValid( - var DisplayValue: TcxEditValue; AEditFocused: Boolean): Boolean; -begin - Result := True; -end; - -procedure TcxCustomColorComboBoxProperties.PrepareDisplayValue( - const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; AEditFocused: Boolean); -var - FValue: TColor; - FValueText: string; -begin - TranslateValues(AEditValue, FValue, FValueText); - DisplayValue := FValueText; -end; - -function TcxCustomColorComboBoxProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := [esoEditing, esoFiltering, esoHorzAlignment, esoSorting, - esoSortingByDisplayText]; - if Buttons.Count > 0 then - Include(Result, esoHotTrack); - if ShowDescriptions then - Include(Result, esoIncSearch); -end; - -function TcxCustomColorComboBoxProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -var - AColor: TColor; - ADescription: string; -begin - TranslateValues(AEditValue, AColor, ADescription, True); - Result := ADescription; -end; - -procedure TcxCustomColorComboBoxProperties.Update(AProperties: TcxCustomEditProperties); -begin - if AProperties is TcxCustomColorComboBoxProperties then - with TcxCustomColorComboBoxProperties(AProperties) do - begin - Items.Assign(Self.Items); - MRUColors.Assign(Self.MRUColors); - end; -end; - -procedure TcxCustomColorComboBoxProperties.GetColorComboBoxDisplayValue( - const AEditValue: TcxEditValue; out AColor: TColor; - out ADescription: string; out AColorFound: Boolean); -begin - InternalGetColorComboBoxDisplayValue(IndexByValue(AEditValue), AEditValue, - AColor, ADescription, AColorFound); -end; - -procedure TcxCustomColorComboBoxProperties.PrepareColorList( - APrepareList: TcxColorPrepareList; ASaveCustom, ASaveMRU: Boolean); -begin - LockUpdate(True); - try - if not ASaveCustom then - Items.Clear - else - Items.ClearNonCustom; - if not ASaveMRU then - ClearMRUColors; - InternalPrepareColorList(APrepareList); - if ASaveMRU then - ValidateMRUColors; - SynchronizeCustomColors; - if Assigned(FOnLoadColorList) then - FOnLoadColorList(Self); - finally - LockUpdate(False); - end; -end; - -procedure TcxCustomColorComboBoxProperties.PrepareDelphiColorList( - const ASaveCustom, ASaveMRU: Boolean); -begin - PrepareColorList(cxplDelphi, ASaveCustom, ASaveMRU); -end; - -procedure TcxCustomColorComboBoxProperties.PrepareHTML4ColorList( - const ASaveCustom, ASaveMRU: Boolean); -begin - PrepareColorList(cxplHTML4, ASaveCustom, ASaveMRU); -end; - -procedure TcxCustomColorComboBoxProperties.PrepareX11ColorList( - const ASaveCustom, ASaveMRU: Boolean); -begin - PrepareColorList(cxplX11, ASaveCustom, ASaveMRU); -end; - -procedure TcxCustomColorComboBoxProperties.PrepareX11OrderedColorList( - const ASaveCustom, ASaveMRU: Boolean); -begin - PrepareColorList(cxplX11Ordered, ASaveCustom, ASaveMRU); -end; - -procedure TcxCustomColorComboBoxProperties.DefineProperties(Filer: TFiler); -begin - Filer.DefineProperty('Items', ReadCustomColors, nil, False); - Filer.DefineProperty('PrepareInfo', ReadPrepareInfo, nil, False); -end; - -function TcxCustomColorComboBoxProperties.ShowColorBox(AColorFound: Boolean): Boolean; -begin - Result := not (not AColorFound and (DefaultColorStyle = cxdcText)); -end; - -class function TcxCustomColorComboBoxProperties.GetLookupDataClass: TcxInterfacedPersistentClass; -begin - Result := TcxColorComboBoxLookupData; -end; - -class function TcxCustomColorComboBoxProperties.GetPopupWindowClass: TcxCustomEditPopupWindowClass; -begin - Result := TcxColorComboBoxPopupWindow; -end; - -class function TcxCustomColorComboBoxProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomColorComboBoxViewData; -end; - -function TcxCustomColorComboBoxProperties.HasDisplayValue: Boolean; -begin - Result := False; -end; - -function TcxCustomColorComboBoxProperties.IsEditValueNumeric: Boolean; -begin - Result := True; -end; - -function TcxCustomColorComboBoxProperties.GetColorByIndex(AIndex: Integer): TColor; -begin - if AIndex <= (MRUColors.Count - 1) then - Result := MRUColors.GetColorByIndex(AIndex, DefaultColor) - else - Result := Items.GetColorByIndex(AIndex - MRUColors.Count, DefaultColor); -end; - -function TcxCustomColorComboBoxProperties.GetIndexByColor(AColor: TColor): Integer; -begin - Result := MRUColors.GetIndexByColor(AColor); - if Result = -1 then - begin - Result := Items.GetIndexByColor(AColor); - if Result <> -1 then - Result := Result + MRUColors.Count; - end; -end; - -function TcxCustomColorComboBoxProperties.GetDescriptionByIndex(AIndex: Integer): string; -begin - if not ShowDescriptions then - Result := '' - else - begin - if AIndex = -1 then - Result := DefaultDescription - else - Result := DoConvertNaming(AIndex); - end; -end; - -function TcxCustomColorComboBoxProperties.IndexByValue(const AValue: TcxEditValue): Integer; -var - AColor: TColor; - AIsValueValid: Boolean; - I: Integer; -begin - Result := -1; - if IsVarEmpty(AValue) then - Exit; - AIsValueValid := cxStrToColor(VarToStr(AValue), AColor); - if not AIsValueValid then - Exit; - for I := 0 to MRUColors.Count - 1 do - if AColor = MRUColors[I].Color then - begin - Result := I; - Break; - end; - if Result = -1 then - for I := 0 to Items.Count - 1 do - if AColor = Items[I].Color then - begin - Result := I + MRUColors.Count; - Break; - end; -end; - -function TcxCustomColorComboBoxProperties.IsDisplayValueNumeric: Boolean; -begin - Result := False; -end; - -function TcxCustomColorComboBoxProperties.AddMRUColor(const AColor: TColor): TcxMRUColorAction; -var - FIndex: Integer; -begin - Result := mcaNone; - if MaxMRUColors = 0 then Exit; - FIndex := FMRUColors.GetIndexByColor(AColor); - if FIndex <> -1 then - begin - if (FIndex > 0) and (FIndex < FMRUColors.Count) then - begin - Result := mcaMoved; - FMRUColors.Move(FIndex, 0); - if Assigned(FOnAddedMRUColor) then FOnAddedMRUColor(Self); - end - else - Result := mcaNone; - end - else - Result := mcaAdded; - if Result = mcaAdded then - begin - FIndex := Items.GetIndexByColor(AColor); - if FIndex > -1 then - begin - BeginUpdate; - try - FMRUColors.InsertColor(0, AColor, Items[FIndex].Description); - DeleteOverMRUColors; - finally - EndUpdate(False); - end; - if Assigned(FOnAddedMRUColor) then FOnAddedMRUColor(Self); - end - else - Result := mcaNone; - end; -end; - -function TcxCustomColorComboBoxProperties.DelMRUColor(const AColor: TColor): TcxMRUColorAction; -var - FIndex: Integer; -begin - Result := mcaNone; - {Check for right Color} - FIndex := Items.GetIndexByColor(AColor); - if FIndex < 0 then Exit; - if FMRUColors.FindColorItem(AColor) <> nil then - begin -{$IFDEF DELPHI5} - FMRUColors.Delete(FIndex); -{$ELSE} - TcxColorComboBoxItem(FMRUColors.Items[FIndex]).Free; -{$ENDIF} - Result := mcaDeleted; - if Assigned(FOnDeletedMRUColor) then FOnDeletedMRUColor(Self); - end; -end; - -procedure TcxCustomColorComboBoxProperties.ClearMRUColors; -begin - FMRUColors.Clear; - Changed; -end; - -procedure TcxCustomColorComboBoxProperties.DoGetDefaultColor(var AColor: TColor); -begin - if Assigned(FOnGetDefaultColor) then FOnGetDefaultColor(Self, AColor); -end; - -procedure TcxCustomColorComboBoxProperties.TranslateValues(const AEditValue: TcxEditValue; - var AColor: TColor; var ADescription: string; ANeedDescription: Boolean = False); -var - FFoundIndex: Integer; - FValid: Boolean; - S: string; -begin - FFoundIndex := IndexByValue(AEditValue); - if ((FFoundIndex <> -1) and (not ANeedDescription or ShowDescriptions) or - ((FFoundIndex = -1) and (ColorComboStyle = cxccsComboList))) and - not IsVarEmpty(AEditValue) then - ADescription := GetDescriptionByIndex(FFoundIndex) - else - begin - FValid := cxStrToColor(VarToStr(AEditValue), AColor); - if FValid then - begin - S := ConvertColorName(AColor, '', NamingConvention, ColorValueFormat); - if Assigned(OnNamingConvention) then - OnNamingConvention(Self, AColor, S); - ADescription := S; - end - else - begin - AColor := DefaultColor; - ADescription := DefaultDescription; - end; - end; -end; - -function TcxCustomColorComboBoxProperties.ColorItemByIndex(AIndex: Integer): TcxColorComboBoxItem; -begin - if AIndex = -1 then - Result := nil - else - begin - if AIndex <= (MRUColors.Count - 1) then - Result := MRUColors.Items[AIndex] - else - Result := Items[AIndex - MRUColors.Count]; - end; -end; - -procedure TcxCustomColorComboBoxProperties.DeleteOverMRUColors; -var - I: Integer; -begin - BeginUpdate; - try - for I := FMRUColors.Count - 1 downto 0 do - begin - if I >= FMaxMRUColors then - begin - FMRUColors.Delete(I); - if Assigned(FOnDeletedMRUColor) then FOnDeletedMRUColor(Self); - end - else - Break; - end; - finally - EndUpdate; - end; -end; - -function TcxCustomColorComboBoxProperties.DoConvertNaming(AIndex: Integer): string; -var - FItem: TcxColorComboBoxItem; -begin - FItem := ColorItemByIndex(AIndex); - if FItem = nil then - Result := '' - else - Result := ConvertColorName(FItem.Color, FItem.Description, - NamingConvention, ColorValueFormat); - if Assigned(OnNamingConvention) then - begin - if FItem = nil then - OnNamingConvention(Self, DefaultColor, Result) - else - OnNamingConvention(Self, FItem.Color, Result); - end; -end; - -function TcxCustomColorComboBoxProperties.GetItems: TcxColorComboBoxItems; -begin - Result := FItems; -end; - -procedure TcxCustomColorComboBoxProperties.InternalGetColorComboBoxDisplayValue( - AItemIndex: Integer; const AEditValue: TcxEditValue; out AColor: TColor; - out ADescription: string; out AColorFound: Boolean); -begin - AColorFound := AItemIndex <> -1; - ADescription := GetDescriptionByIndex(AItemIndex); - if not AColorFound and (ColorComboStyle = cxccsComboList) and - not IsVarEmpty(AEditValue) then - AColor := DefaultColor - else - begin - if AItemIndex <> -1 then - AColor := GetColorByIndex(AItemIndex) - else - TranslateValues(AEditValue, AColor, ADescription); - end; -end; - -procedure TcxCustomColorComboBoxProperties.InternalPrepareColorList(APrepareList: TcxColorPrepareList); -begin - case APrepareList of - cxplDelphi: InternalPrepareColorList(cxDelphiColorValues, cxDelphiColorNames); - cxplHTML4: InternalPrepareColorList(cxHTML4ColorValues, cxHTML4ColorNames); - cxplX11: InternalPrepareColorList(cxX11ColorValues, cxX11ColorNames); - cxplX11Ordered: InternalPrepareColorList(cxX11OrderedColorValues, cxX11OrderedColorNames); - end; -end; - -procedure TcxCustomColorComboBoxProperties.InternalPrepareColorList( - AColorValues: array of TColor; AColorNames: array of string); -var - I: Integer; - AItem: TcxColorComboBoxItem; -begin - Items.BeginUpdate; - try - for I:= Low(AColorValues) to High(AColorValues) do - begin - AItem := Items.AddColor(AColorValues[I], AColorNames[I]); - if AItem <> nil then - AItem.FIsCustomColor := False; - end; - finally - Items.EndUpdate; - end; -end; - -function TcxCustomColorComboBoxProperties.IsDefaultDescriptionStored: Boolean; -begin - Result := DefaultDescription <> - cxGetResourceString(@cxSColorComboBoxDefaultDescription); -end; - -procedure TcxCustomColorComboBoxProperties.ReadCustomColors(Reader: TReader); -begin - Reader.ReadValue; - Reader.ReadCollection(FCustomColors); -end; - -procedure TcxCustomColorComboBoxProperties.ReadPrepareInfo(Reader: TReader); -begin - Reader.ReadString; -end; - -procedure TcxCustomColorComboBoxProperties.SetAllowSelectColor(Value: Boolean); -begin - if FAllowSelectColor <> Value then - try - FAllowSelectColor := Value; - BeginUpdate; - Buttons[1].Visible := Value; - if Value then - GlyphButtonIndex := 1 - else - GlyphButtonIndex := 0; - finally - EndUpdate; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetColorBoxAlign(Value : TcxColorBoxAlign); -begin - if FColorBoxAlign <> Value then - begin - FColorBoxAlign := Value; - Changed; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetColorBoxFrameColor(Value: TColor); -begin - if FColorBoxFrameColor <> Value then - begin - FColorBoxFrameColor := Value; - Changed; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetColorBoxWidth(Value: Integer); -begin - if FColorBoxWidth <> Value then - begin - if Value < 0 then Value := 0; - FColorBoxWidth := Value; - Changed; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetColorComboStyle(Value: TcxColorComboStyle); -begin - if FColorComboStyle <> Value then - begin - FColorComboStyle := Value; - Changed; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetColorValueFormat(Value: TcxColorValueFormat); -begin - if FColorValueFormat <> Value then - begin - FColorValueFormat := Value; - Changed; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetDefaultColor(Value: TColor); -begin - if FDefaultColor <> Value then - begin - FDefaultColor := Value; - Changed; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetDefaultDescription(Value: string); -begin - if FDefaultDescription <> Value then - begin - FDefaultDescription := Value; - Changed; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetDefaultColorStyle(Value: TcxDefaultColorStyle); -begin - if FDefaultColorStyle <> Value then - begin - FDefaultColorStyle := Value; - Changed; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetCustomColors(Value: TcxColorComboBoxItems); -begin - FCustomColors.Assign(Value); -end; - -procedure TcxCustomColorComboBoxProperties.SetItems(const Value: TcxColorComboBoxItems); -begin - FItems.Assign(Value); -end; - -procedure TcxCustomColorComboBoxProperties.SetMaxMRUColors(Value: Byte); -var - FOldMaxMRUColors: Byte; -begin - if FMaxMRUColors <> Value then - begin - FOldMaxMRUColors := FMaxMRUColors; - FMaxMRUColors := Value; - if FOldMaxMRUColors > Value then - DeleteOverMRUColors; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetNamingConvention(Value: TcxColorNamingConvention); -begin - if FNamingConvention <> Value then - begin - FNamingConvention := Value; - Changed; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetPrepareList(Value: TcxColorPrepareList); -begin - if FPrepareList <> Value then - begin - FPrepareList := Value; - PrepareColorList(FPrepareList, True, True); - end; -end; - -procedure TcxCustomColorComboBoxProperties.SetShowDescriptions(const Value: Boolean); -begin - if FShowDescriptions <> Value then - begin - FShowDescriptions := Value; - Changed; - end; -end; - -procedure TcxCustomColorComboBoxProperties.SynchronizeCustomColors; -var - I: Integer; -begin - Items.BeginUpdate; - try - Items.ClearCustom; - for I := CustomColors.Count - 1 downto 0 do - Items.InsertColor(0, CustomColors[I].Color, CustomColors[I].Description); - finally - Items.EndUpdate; - end; -end; - -procedure TcxCustomColorComboBoxProperties.CustomColorChanged(ASender: TObject); -begin - SynchronizeCustomColors; -end; - -procedure TcxCustomColorComboBoxProperties.ValidateMRUColors; -var - I: Integer; -begin - for I := (MRUColors.Count - 1) downto 0 do - if Items.GetIndexByColor(MRUColors[I].Color) = -1 then - MRUColors.Delete(I); -end; - -{ TcxCustomColorComboBox } - -destructor TcxCustomColorComboBox.Destroy; -begin - FreeAndNil(FColorDialog); - inherited Destroy; -end; - -function TcxCustomColorComboBox.Deactivate: Boolean; -begin - Result := inherited Deactivate; - UpdateMRUList; -end; - -function TcxCustomColorComboBox.Focused: Boolean; -begin - Result := FIsDialogShowed or inherited Focused; -end; - -class function TcxCustomColorComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomColorComboBoxProperties; -end; - -function TcxCustomColorComboBox.IsChildWindow(AWnd: THandle): Boolean; -begin - Result := inherited IsChildWindow(AWnd) or - (FIsDialogShowed and ((ColorDialog.Handle = HWND(AWnd)) or (IsChild(ColorDialog.Handle, AWnd)))); -end; - -procedure TcxCustomColorComboBox.PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); -begin - EditValue := LookupKeyToEditValue(ILookupData.CurrentKey); -end; - -procedure TcxCustomColorComboBox.AfterPosting; -begin - inherited AfterPosting; - if IsInplace and FNeedsUpdateMRUList then - FDontCheckModifiedWhenUpdatingMRUList := True; -end; - -procedure TcxCustomColorComboBox.ContainerStyleChanged(Sender: TObject); -begin - inherited ContainerStyleChanged(Sender); -end; - -procedure TcxCustomColorComboBox.PropertiesChanged(Sender: TObject); -begin - if FPropertiesUpdate then Exit; - FPropertiesUpdate := True; - try - with ActiveProperties do - if AllowSelectColor then - if ButtonGlyph.Empty then - Buttons[1].Kind := bkEllipsis - else - Buttons[1].Kind := bkGlyph - else - if ButtonGlyph.Empty then - Buttons[0].Kind := bkDown - else - Buttons[0].Kind := bkGlyph; - inherited PropertiesChanged(Sender); - finally - FPropertiesUpdate := False; - end; -end; - -function TcxCustomColorComboBox.GetColorDialog: TColorDialog; -begin - if FColorDialog = nil then - FColorDialog := TColorDialog.Create(Self); - Result := FColorDialog; -end; - -function TcxCustomColorComboBox.GetColorValue: TColor; -begin - Result := TcxCustomColorComboBoxViewInfo(ViewInfo).ColorBoxColor; -end; - -function TcxCustomColorComboBox.IsColorValueStored: Boolean; -begin - Result := ColorValue <> ActiveProperties.DefaultColor; -end; - -procedure TcxCustomColorComboBox.SetColorValue(Value: TColor); -begin - if ColorValue <> Value then - begin - LockClick(True); - try - InternalEditValue := Value; - finally - LockClick(False); - end; - end; -end; - -procedure TcxCustomColorComboBox.DblClick; -begin - inherited DblClick; -end; - -procedure TcxCustomColorComboBox.DoButtonClick(AButtonVisibleIndex: Integer); -begin - if AButtonVisibleIndex = 1 then - DoSelectCustomColor(Self); -end; - -procedure TcxCustomColorComboBox.DoSelectCustomColor(Sender: TObject); -var - AColorProvided: TColor; - AColorDescription: string; - AAddToList: Boolean; - AIndex: Integer; -begin - AColorProvided := clNone; - AColorDescription := ''; - AAddToList := True; - - if ActiveProperties.ColorDialogType = cxcdtDefault then - begin - try - FIsDialogShowed := True; - ColorDialog.Color := ColorValue; - if ColorDialog.Execute then - AColorProvided := ColorDialog.Color - else - begin - DoClosePopup(crCancel); - Exit; - end; - finally - FIsDialogShowed := False; - end; - end; - - DoOnSelectCustomColor(AColorProvided, AColorDescription, AAddToList); - - AIndex := ActiveProperties.GetIndexByColor(AColorProvided); - if AAddToList and (AIndex = -1) then - begin - ActiveProperties.CustomColors.AddColor(AColorProvided, AColorDescription); - ActiveProperties.AddMRUColor(AColorProvided); - end - else - ItemIndex := AIndex; - - FixMRUPosition(AColorProvided); - - if DoEditing and AAddToList then - begin - ColorValue := AColorProvided; - if ActiveProperties.MRUColors.Count > 0 then - ItemIndex := ActiveProperties.MRUColors.GetIndexByColor(AColorProvided); - ModifiedAfterEnter := True; - InternalPostEditValue; - end; - DoClosePopup(crEnter); -end; - -function TcxCustomColorComboBox.GetDisplayValue: string; -begin - if IsDestroying then - Result := '' - else - Result := ViewInfo.Text; -end; - -function TcxCustomColorComboBox.GetEditingValue: TcxEditValue; -begin - Result := EditValue; -end; - -function TcxCustomColorComboBox.GetInnerEditClass: TControlClass; -begin - Result := TcxCustomColorComboBoxInnerEdit; -end; - -procedure TcxCustomColorComboBox.Initialize; -begin - inherited Initialize; - FIsDialogShowed := False; - FPropertiesUpdate := False; - ControlStyle := ControlStyle - [csClickEvents]; - ActiveProperties.FOnLoadColorList := PropertiesLoadColorListHandler; -end; - -procedure TcxCustomColorComboBox.InitializePopupWindow; -begin - inherited InitializePopupWindow; - TcxColorComboBoxPopupWindow(PopupWindow).SysPanelStyle := - ActiveProperties.PopupSizeable; -end; - -procedure TcxCustomColorComboBox.ClearEditValue; -begin - InternalEditValue := Null; - ModifiedAfterEnter := True; - SynchronizeDisplayValue; - if ActiveProperties.ImmediatePost and CanPostEditValue then - InternalPostEditValue; -end; - -procedure TcxCustomColorComboBox.DoOnSelectCustomColor(var AColor: TColor; - var AColorDescription: string; var AddToList: Boolean); -begin - with Properties do - if Assigned(OnSelectCustomColor) then - OnSelectCustomColor(Self, AColor, AColorDescription, AddToList); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnSelectCustomColor) then - OnSelectCustomColor(Self, AColor, AColorDescription, AddToList); -end; - -procedure TcxCustomColorComboBox.DoEditKeyDown(var Key: Word; Shift: TShiftState); -var - AKey: Word; -begin - AKey := TranslateKey(Key); - if (AKey = VK_DELETE) and DoEditing then - ClearEditValue - else - inherited DoEditKeyDown(Key, Shift); -end; - -function TcxCustomColorComboBox.IsValidChar(AChar: Char): Boolean; -begin - Result := IsTextChar(AChar); -end; - -function TcxCustomColorComboBox.GetProperties: TcxCustomColorComboBoxProperties; -begin - Result := TcxCustomColorComboBoxProperties(FProperties); -end; - -function TcxCustomColorComboBox.GetActiveProperties: TcxCustomColorComboBoxProperties; -begin - Result := TcxCustomColorComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxCustomColorComboBox.GetLookupData: TcxColorComboBoxLookupData; -begin - Result := TcxColorComboBoxLookupData(FLookupData); -end; - -procedure TcxCustomColorComboBox.SetProperties( - Value: TcxCustomColorComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -function TcxCustomColorComboBox.AddMRUColor(const AColor: TColor): TcxMRUColorAction; -begin - Result := ActiveProperties.AddMRUColor(AColor); -end; - -function TcxCustomColorComboBox.DelMRUColor(const AColor: TColor): TcxMRUColorAction; -begin - Result := ActiveProperties.DelMRUColor(AColor); -end; - -function TcxCustomColorComboBox.LookupKeyToEditValue(const AKey: TcxEditValue): TcxEditValue; -begin - if not VarEqualsExact(AKey, -1) then - Result := ActiveProperties.GetColorByIndex(AKey) - else - Result := Null; -end; - -procedure TcxCustomColorComboBox.SynchronizeDisplayValue; -begin - inherited; - ILookupData.TextChanged; - ResetOnNewDisplayValue; - UpdateDrawValue; -end; - -procedure TcxCustomColorComboBox.CloseUp(AReason: TcxEditCloseUpReason); -begin - FNeedsUpdateMRUList := FNeedsUpdateMRUList or (AReason in [crTab, crEnter, crClose]); - try - inherited CloseUp(AReason); - finally - UpdateMRUList; - end; -end; - -procedure TcxCustomColorComboBox.FixMRUPosition(AColor: TColor); -var - FMRUColorAction: TcxMRUColorAction; -begin - FMRUColorAction := AddMRUColor(AColor); - if (FMRUColorAction = mcaAdded) or - (FMRUColorAction = mcaMoved) then - ItemIndex := LookupData.InternalChangeCurrentMRUColorPosition(AColor); -end; - -procedure TcxCustomColorComboBox.InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); -begin - if IsDestroying then Exit; - inherited InternalSetEditValue(Value, AValidateEditValue); -end; - -procedure TcxCustomColorComboBox.PropertiesLoadColorListHandler(Sender: TObject); -begin - if not IsLoading then - FlushEditValue; -end; - -procedure TcxCustomColorComboBox.UpdateMRUList; -begin - try - if FNeedsUpdateMRUList and (FDontCheckModifiedWhenUpdatingMRUList or ModifiedAfterEnter) then - FixMRUPosition(ActiveProperties.GetColorByIndex(ILookupData.CurrentKey)); - finally - FDontCheckModifiedWhenUpdatingMRUList := False; - FNeedsUpdateMRUList := False; - end; -end; - -procedure TcxCustomColorComboBox.FlushEditValue; -begin - ItemIndex := -1; - if DoEditing then - ClearEditValue; - InternalPostEditValue; -end; - -procedure TcxCustomColorComboBox.PrepareColorList( - APrepareList: TcxColorPrepareList; ASaveCustom, ASaveMRU: Boolean); -var - FBeforeLoadColor: TColor; - FNewIndex: Integer; -begin - FBeforeLoadColor := ColorValue; - - ActiveProperties.FOnLoadColorList := nil; - ActiveProperties.PrepareColorList(APrepareList, ASaveCustom, ASaveMRU); - ActiveProperties.FOnLoadColorList := PropertiesLoadColorListHandler; - FNewIndex := ActiveProperties.Items.GetIndexByColor(FBeforeLoadColor); - if FNewIndex = -1 then - FlushEditValue - else - begin - FEditValue := FBeforeLoadColor; - InternalSetEditValue(FBeforeLoadColor, False); - end; -end; - -procedure TcxCustomColorComboBox.PrepareDelphiColorList( - const ASaveCustom, ASaveMRU: Boolean); -begin - PrepareColorList(cxplDelphi, ASaveCustom, ASaveMRU); -end; - -procedure TcxCustomColorComboBox.PrepareHTML4ColorList(const ASaveCustom, - ASaveMRU: Boolean); -begin - PrepareColorList(cxplHTML4, ASaveCustom, ASaveMRU); -end; - -procedure TcxCustomColorComboBox.PrepareX11ColorList(const ASaveCustom, - ASaveMRU: Boolean); -begin - PrepareColorList(cxplX11, ASaveCustom, ASaveMRU); -end; - -procedure TcxCustomColorComboBox.PrepareX11OrderedColorList(const ASaveCustom, - ASaveMRU: Boolean); -begin - PrepareColorList(cxplX11Ordered, ASaveCustom, ASaveMRU); -end; - -{ TcxColorComboBox } - -class function TcxColorComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxColorComboBoxProperties; -end; - -function TcxColorComboBox.GetActiveProperties: TcxColorComboBoxProperties; -begin - Result := TcxColorComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxColorComboBox.GetProperties: TcxColorComboBoxProperties; -begin - Result := TcxColorComboBoxProperties(FProperties); -end; - -procedure TcxColorComboBox.SetProperties(Value: TcxColorComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterColorComboBoxHelper } - -class function TcxFilterColorComboBoxHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxColorComboBox; -end; - -class function TcxFilterColorComboBoxHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoBlanks, fcoNonBlanks]; - if AExtendedSet then - Result := Result + [fcoInList, fcoNotInList]; -end; - -class procedure TcxFilterColorComboBoxHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - TcxCustomColorComboBoxProperties(AProperties).DropDownListStyle := lsFixedList; -end; - -initialization - GetRegisteredEditProperties.Register(TcxColorComboBoxProperties, - scxSEditRepositoryColorComboBoxItem); - FilterEditsController.Register(TcxColorComboBoxProperties, - TcxFilterColorComboBoxHelper); - -finalization - FilterEditsController.Unregister(TcxColorComboBoxProperties, - TcxFilterColorComboBoxHelper); - GetRegisteredEditProperties.Unregister(TcxColorComboBoxProperties); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxCurrencyEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxCurrencyEdit.pas deleted file mode 100644 index 846712f9..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxCurrencyEdit.pas +++ /dev/null @@ -1,749 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxCurrencyEdit; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, -{$IFDEF DELPHI6} - Types, -{$ENDIF} - SysUtils, Classes, Controls, Clipbrd, cxContainer, cxDataStorage, cxDataUtils, - cxEdit, cxTextEdit, cxFilterControlUtils; - -type - { TcxCurrencyEditPropertiesValues } - - TcxCurrencyEditPropertiesValues = class(TcxTextEditPropertiesValues) - private - FDecimalPlaces: Boolean; - procedure SetDecimalPlaces(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property DecimalPlaces: Boolean read FDecimalPlaces write SetDecimalPlaces - stored False; - end; - - { TcxCustomCurrencyEditProperties } - - TcxCustomCurrencyEditProperties = class(TcxCustomTextEditProperties) - private - FDecimalPlaces: Integer; - FFormatChanging: Boolean; - FNullable: Boolean; - FNullString: string; - FUseThousandSeparator: Boolean; - function GetAssignedValues: TcxCurrencyEditPropertiesValues; - function GetDecimalPlaces: Integer; - function IsDecimalPlacesStored: Boolean; - procedure SetAssignedValues(Value: TcxCurrencyEditPropertiesValues); - procedure SetDecimalPlaces(Value: Integer); - procedure SetNullable(const Value: Boolean); - procedure SetNullString(const Value: string); - procedure SetUseThousandSeparator(const Value: Boolean); - protected - class function GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; override; - function GetDefaultDisplayFormat: string; override; - function GetDisplayFormatOptions: TcxEditDisplayFormatOptions; override; - function HasDigitGrouping(AIsDisplayValueSynchronizing: Boolean): Boolean; override; - function InternalGetEditFormat(out AIsCurrency, AIsOnGetTextAssigned: Boolean; - AEdit: TcxCustomTextEdit = nil): string; override; //for VCL .Net - function IsEditValueNumeric: Boolean; override; - function StrToFloatEx(S: string; var Value: Double): Boolean; - property AssignedValues: TcxCurrencyEditPropertiesValues read GetAssignedValues - write SetAssignedValues; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function IsDisplayValueValid(var DisplayValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - procedure ValidateDisplayValue(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var AError: Boolean; - AEdit: TcxCustomEdit); override; - // !!! - property DecimalPlaces: Integer read GetDecimalPlaces write SetDecimalPlaces - stored IsDecimalPlacesStored; - property Nullable: Boolean read FNullable write SetNullable default True; - property NullString: string read FNullString write SetNullString; - property ValidateOnEnter default True; - property UseThousandSeparator: Boolean read FUseThousandSeparator - write SetUseThousandSeparator default False; - end; - - { TcxCurrencyEditProperties } - - TcxCurrencyEditProperties = class(TcxCustomCurrencyEditProperties) - published - property Alignment; - property AssignedValues; - property AutoSelect; - property ClearKey; - property DecimalPlaces; - property DisplayFormat; - property EchoMode; - property EditFormat; - property HideSelection; - property ImeMode; - property ImeName; - property MaxLength; - property MaxValue; - property MinValue; - property Nullable; - property NullString; - property PasswordChar; - property ReadOnly; - property UseDisplayFormatWhenEditing; - property UseLeftAlignmentOnEditing; - property UseThousandSeparator; - property ValidateOnEnter; - property OnChange; - property OnEditValueChanged; - property OnValidate; - end; - - { TcxCustomCurrencyEdit } - - TcxCustomCurrencyEdit = class(TcxCustomTextEdit) - private - function GetProperties: TcxCustomCurrencyEditProperties; - function GetActiveProperties: TcxCustomCurrencyEditProperties; - function GetValue: Double; - procedure SetProperties(Value: TcxCustomCurrencyEditProperties); - procedure SetValue(Value: Double); - protected - procedure CheckEditorValueBounds; override; - procedure Initialize; override; - function InternalGetEditingValue: TcxEditValue; override; - function IsValidChar(Key: Char): Boolean; override; - procedure KeyPress(var Key: Char); override; - procedure PropertiesChanged(Sender: TObject); override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure PasteFromClipboard; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - property ActiveProperties: TcxCustomCurrencyEditProperties read GetActiveProperties; - property Properties: TcxCustomCurrencyEditProperties read GetProperties - write SetProperties; - property Value: Double read GetValue write SetValue stored False; - end; - - { TcxCurrencyEdit } - - TcxCurrencyEdit = class(TcxCustomCurrencyEdit) - private - function GetActiveProperties: TcxCurrencyEditProperties; - function GetProperties: TcxCurrencyEditProperties; - procedure SetProperties(Value: TcxCurrencyEditProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCurrencyEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property EditValue; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxCurrencyEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - {$IFDEF DELPHI12} - property TextHint; - {$ENDIF} - property Value; - property Visible; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnEditing; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property BiDiMode; - property ParentBiDiMode; - property OnEndDock; - property OnStartDock; - end; - - { TcxFilterCurrencyEditHelper } - - TcxFilterCurrencyEditHelper = class(TcxFilterTextEditHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - cxEditConsts, cxFormats, cxVariants, cxControls, cxClasses, dxCore; - -{$IFNDEF DELPHI6} -function StrToCurrDef(const S: string; const Default: Currency): Currency; -begin - if not TextToFloat(PChar(S), Result, fvCurrency) then - Result := Default; -end; -{$ENDIF} - -{ TcxCurrencyEditPropertiesValues } - -procedure TcxCurrencyEditPropertiesValues.Assign(Source: TPersistent); -begin - if Source is TcxCurrencyEditPropertiesValues then - begin - BeginUpdate; - try - inherited Assign(Source); - DecimalPlaces := TcxCurrencyEditPropertiesValues(Source).DecimalPlaces; - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxCurrencyEditPropertiesValues.RestoreDefaults; -begin - BeginUpdate; - try - inherited RestoreDefaults; - DecimalPlaces := False; - finally - EndUpdate; - end; -end; - -procedure TcxCurrencyEditPropertiesValues.SetDecimalPlaces(Value: Boolean); -begin - if Value <> FDecimalPlaces then - begin - FDecimalPlaces := Value; - Changed; - end; -end; - -{ TcxCustomCurrencyEditProperties } - -constructor TcxCustomCurrencyEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FNullable := True; - ValidateOnEnter := True; -end; - -function TcxCustomCurrencyEditProperties.GetAssignedValues: TcxCurrencyEditPropertiesValues; -begin - Result := TcxCurrencyEditPropertiesValues(FAssignedValues); -end; - -function TcxCustomCurrencyEditProperties.GetDecimalPlaces: Integer; -begin - if AssignedValues.DecimalPlaces then - Result := FDecimalPlaces - else - Result := CurrencyDecimals; -end; - -function TcxCustomCurrencyEditProperties.IsDecimalPlacesStored: Boolean; -begin - Result := AssignedValues.DecimalPlaces; -end; - -procedure TcxCustomCurrencyEditProperties.SetAssignedValues( - Value: TcxCurrencyEditPropertiesValues); -begin - FAssignedValues.Assign(Value); -end; - -procedure TcxCustomCurrencyEditProperties.SetDecimalPlaces(Value: Integer); -begin - if AssignedValues.DecimalPlaces and (Value = FDecimalPlaces) then - Exit; - AssignedValues.FDecimalPlaces := True; - FDecimalPlaces := Value; - Changed; -end; - -procedure TcxCustomCurrencyEditProperties.SetNullable( - const Value: Boolean); -begin - if FNullable <> Value then - begin - FNullable := Value; - Changed; - end; -end; - -procedure TcxCustomCurrencyEditProperties.SetNullString( - const Value: string); -begin - if FNullString <> Value then - begin - FNullString := Value; - Changed; - end; -end; - -procedure TcxCustomCurrencyEditProperties.SetUseThousandSeparator( - const Value: Boolean); -begin - if FUseThousandSeparator <> Value then - begin - FUseThousandSeparator := Value; - Changed; - end; -end; - -class function TcxCustomCurrencyEditProperties.GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; -begin - Result := TcxCurrencyEditPropertiesValues; -end; - -function TcxCustomCurrencyEditProperties.GetDefaultDisplayFormat: string; -begin - Result := cxFormatController.CurrencyFormat; -end; - -function TcxCustomCurrencyEditProperties.GetDisplayFormatOptions: TcxEditDisplayFormatOptions; -begin - Result := [dfoSupports, dfoNoCurrencyValue]; -end; - -function TcxCustomCurrencyEditProperties.HasDigitGrouping( - AIsDisplayValueSynchronizing: Boolean): Boolean; -begin - Result := not AIsDisplayValueSynchronizing and UseThousandSeparator; -end; - -function TcxCustomCurrencyEditProperties.InternalGetEditFormat(out AIsCurrency, - AIsOnGetTextAssigned: Boolean; AEdit: TcxCustomTextEdit = nil): string; //for VCL .Net -begin - Result := - inherited InternalGetEditFormat(AIsCurrency, AIsOnGetTextAssigned, AEdit); -end; - -function TcxCustomCurrencyEditProperties.IsEditValueNumeric: Boolean; -begin - Result := True; -end; - -function TcxCustomCurrencyEditProperties.StrToFloatEx(S: string; - var Value: Double): Boolean; -const - MinDouble = 5.0e-324; - MaxDouble = 1.7e+308; -var - E: Extended; - I: Integer; -begin - for I := Length(S) downto 1 do - if S[I] = ThousandSeparator then - Delete(S, I, 1); - if not TextToFloat(PChar(S), E, fvExtended) or - ((E <> 0) and ((Abs(E) < MinDouble) or (Abs(E) > MaxDouble))) then - begin - Value := 0; - Result := S = ''; - end - else - begin - Value := E; - Result := True; - end; -end; - -procedure TcxCustomCurrencyEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomCurrencyEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with TcxCustomCurrencyEditProperties(Source) do - begin - Self.AssignedValues.DecimalPlaces := False; - if AssignedValues.DecimalPlaces then - Self.DecimalPlaces := DecimalPlaces; - Self.Nullable := Nullable; - Self.NullString := NullString; - Self.UseThousandSeparator := UseThousandSeparator; - end; - finally - EndUpdate - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomCurrencyEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxCurrencyEdit; -end; - -function TcxCustomCurrencyEditProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - Result := evsValue; - if not AEditFocused and (IDefaultValuesProvider <> nil) and - IDefaultValuesProvider.IsOnGetTextAssigned then - Result := evsText; -end; - -function TcxCustomCurrencyEditProperties.IsDisplayValueValid( - var DisplayValue: TcxEditValue; AEditFocused: Boolean): Boolean; -var - C, AIsOnGetTextAssigned: Boolean; - D: Double; - S: string; -begin - Result := not AEditFocused or - (InternalGetEditFormat(C, AIsOnGetTextAssigned) <> '') or - AIsOnGetTextAssigned; - if not Result then - begin - S := Trim(VarToStr(DisplayValue)); - Result := StrToFloatEx(S, D); - if Result then - DisplayValue := S; - end; -end; - -procedure TcxCustomCurrencyEditProperties.PrepareDisplayValue( - const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; - AEditFocused: Boolean); -begin - if VarIsSoftNull(AEditValue) then - if AEditFocused then - DisplayValue := '' - else - if Nullable then - DisplayValue := NullString - else - inherited PrepareDisplayValue(0, DisplayValue, AEditFocused)//DisplayValue := '0' - else - try - inherited PrepareDisplayValue(AEditValue, DisplayValue, AEditFocused); - except - on EConvertError do - if AEditFocused then - DisplayValue := '' - else - DisplayValue := AEditValue; - on EVariantError do - if AEditFocused then - DisplayValue := '' - else - DisplayValue := AEditValue; - end; -end; - -procedure TcxCustomCurrencyEditProperties.ValidateDisplayValue( - var ADisplayValue: TcxEditValue; var AErrorText: TCaption; - var AError: Boolean; AEdit: TcxCustomEdit); -var - AValue: Double; -begin - AError := not StrToFloatEx(VarToStr(ADisplayValue), AValue); - inherited ValidateDisplayValue(ADisplayValue, AErrorText, AError, AEdit); -end; - -{ TcxCustomCurrencyEdit } - -function TcxCustomCurrencyEdit.GetProperties: TcxCustomCurrencyEditProperties; -begin - Result := TcxCustomCurrencyEditProperties(FProperties); -end; - -function TcxCustomCurrencyEdit.GetActiveProperties: TcxCustomCurrencyEditProperties; -begin - Result := TcxCustomCurrencyEditProperties(InternalGetActiveProperties); -end; - -function TcxCustomCurrencyEdit.GetValue: Double; -var - V: Variant; -begin - if Focused and not IsEditValidated and ModifiedAfterEnter then - begin - V := InternalGetEditingValue; - if VarIsNumericEx(V) then - Result := V - else - Result := 0.0; - end - else - if VarIsNull(EditValue) or (VarIsStr(EditValue) and (StrToCurrDef(EditValue, 0) = 0)) then - Result := 0.00 - else - Result := EditValue; -end; - -procedure TcxCustomCurrencyEdit.SetProperties( - Value: TcxCustomCurrencyEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomCurrencyEdit.SetValue(Value: Double); -begin - with ActiveProperties do - if IsValueBoundDefined(evbMin) and (Value < MinValue) then - Value := MinValue - else - if IsValueBoundDefined(evbMax) and (Value > MaxValue) then - Value := MaxValue; - InternalEditValue := Value; -end; - -procedure TcxCustomCurrencyEdit.CheckEditorValueBounds; -begin - KeyboardAction := ModifiedAfterEnter; - try - with ActiveProperties do - if IsValueBoundDefined(evbMin) and (Value < MinValue) then - Value := MinValue - else - if IsValueBoundDefined(evbMax) and (Value > MaxValue) then - Value := MaxValue; - finally - KeyboardAction := False; - end; -end; - -procedure TcxCustomCurrencyEdit.Initialize; -begin - inherited Initialize; - ControlStyle := ControlStyle - [csSetCaption]; -end; - -function TcxCustomCurrencyEdit.InternalGetEditingValue: TcxEditValue; -begin - PrepareEditValue(Text, Result, True); -end; - -function TcxCustomCurrencyEdit.IsValidChar(Key: Char): Boolean; - - function IsValidNumber(const S: string): Boolean; - var - ADecPos, AStartPos: Integer; - V: Double; - begin - Result := False; - ADecPos := Pos(DecimalSeparator, S); - if ADecPos > 0 then - begin - AStartPos := Pos('E', UpperCase(S)); - if AStartPos > ADecPos then - ADecPos := AStartPos - ADecPos - 1 - else - ADecPos := Length(S) - ADecPos; - if ADecPos > ActiveProperties.DecimalPlaces then - Exit; - end; - Result := ActiveProperties.StrToFloatEx(S, V); - end; - -var - AEndPos, AStartPos: Integer; - AIsCurrency, AIsOnGetTextAssigned: Boolean; - S: string; -begin - Result := False; - if not IsNumericChar(Key, ntExponent) and - not (ActiveProperties.UseThousandSeparator and (Key = ThousandSeparator)) then - Exit; - if ((ActiveProperties.InternalGetEditFormat(AIsCurrency, AIsOnGetTextAssigned, Self) <> '') or - AIsOnGetTextAssigned) and not IsValidNumber(Text) then - begin - Result := True; - Exit; - end; - S := Text; - AStartPos := SelStart; - AEndPos := SelStart + SelLength; - Delete(S, SelStart + 1, AEndPos - AStartPos); - if (Key = '-') and (S = '') then - begin - Result := True; - Exit; - end; - Insert(Key, S, AStartPos + 1); - Result := IsValidNumber(S); -end; - -procedure TcxCustomCurrencyEdit.KeyPress(var Key: Char); -begin - if not (ActiveProperties.UseThousandSeparator and (Key = ThousandSeparator)) and - dxCharInSet(Key, ['.', ',']) then - Key := DecimalSeparator; - inherited KeyPress(Key); -end; - -procedure TcxCustomCurrencyEdit.PropertiesChanged(Sender: TObject); -begin - if (Sender <> nil) and ActiveProperties.FFormatChanging then - Exit; - if not Focused then - DataBinding.UpdateDisplayValue; - inherited PropertiesChanged(Sender); -end; - -class function TcxCustomCurrencyEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomCurrencyEditProperties; -end; - -procedure TcxCustomCurrencyEdit.PasteFromClipboard; -begin - if CanModify then - inherited; -end; - -procedure TcxCustomCurrencyEdit.PrepareEditValue( - const ADisplayValue: TcxEditValue; out EditValue: TcxEditValue; - AEditFocused: Boolean); -var - V: Double; -begin - if (ADisplayValue = '') or (CompareStr(ADisplayValue, ActiveProperties.NullString) = 0) or - not ActiveProperties.StrToFloatEx(ADisplayValue, V) then - if ActiveProperties.Nullable then EditValue := Null else EditValue := 0.00 - else - EditValue := V -end; - -{ TcxCurrencyEdit } - -class function TcxCurrencyEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCurrencyEditProperties; -end; - -function TcxCurrencyEdit.GetActiveProperties: TcxCurrencyEditProperties; -begin - Result := TcxCurrencyEditProperties(InternalGetActiveProperties); -end; - -function TcxCurrencyEdit.GetProperties: TcxCurrencyEditProperties; -begin - Result := TcxCurrencyEditProperties(FProperties); -end; - -procedure TcxCurrencyEdit.SetProperties(Value: TcxCurrencyEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterCurrencyEditHelper } - -class function TcxFilterCurrencyEditHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxCurrencyEdit; -end; - -class function TcxFilterCurrencyEditHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoLess, fcoLessEqual, fcoGreater, - fcoGreaterEqual, fcoBlanks, fcoNonBlanks]; - if AExtendedSet then - Result := Result + [fcoBetween, fcoNotBetween, fcoInList, fcoNotInList]; -end; - -class procedure TcxFilterCurrencyEditHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - with TcxCustomCurrencyEditProperties(AProperties) do - begin - MinValue := 0; - MaxValue := 0; - Nullable := True; - NullString := ''; - end; -end; - -initialization - GetRegisteredEditProperties.Register(TcxCurrencyEditProperties, scxSEditRepositoryCurrencyItem); - FilterEditsController.Register(TcxCurrencyEditProperties, TcxFilterCurrencyEditHelper); - -finalization - FilterEditsController.Unregister(TcxCurrencyEditProperties, TcxFilterCurrencyEditHelper); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBCheckComboBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBCheckComboBox.pas deleted file mode 100644 index ca74675e..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBCheckComboBox.pas +++ /dev/null @@ -1,160 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBCheckComboBox; - -interface - -{$I cxVer.inc} - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, Dialogs, Forms, Graphics, Messages, StdCtrls, - SysUtils, cxCheckComboBox, cxControls, cxDBEdit, cxEdit; - -type - { TcxDBCheckComboBox } - - TcxDBCheckComboBox = class(TcxCustomCheckComboBox) - private - function GetActiveProperties: TcxCheckComboBoxProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxCheckComboBoxProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxCheckComboBoxProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCheckComboBoxProperties - read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxCheckComboBoxProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Text; - property Visible; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -{ TcxDBCheckComboBox } - -class function TcxDBCheckComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCheckComboBoxProperties; -end; - -class function TcxDBCheckComboBox.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBCheckComboBox.GetActiveProperties: TcxCheckComboBoxProperties; -begin - Result := TcxCheckComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxDBCheckComboBox.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBCheckComboBox.GetProperties: TcxCheckComboBoxProperties; -begin - Result := TcxCheckComboBoxProperties(FProperties); -end; - -procedure TcxDBCheckComboBox.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBCheckComboBox.SetProperties(Value: TcxCheckComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBCheckComboBox.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBCheckGroup.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBCheckGroup.pas deleted file mode 100644 index a3840c7d..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBCheckGroup.pas +++ /dev/null @@ -1,183 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBCheckGroup; - -{$I cxVer.inc} - -interface - -uses - Classes, Controls, Messages, cxCheckGroup, cxDBEdit, cxEdit; - -type - { TcxDBCheckGroupButton } - - TcxDBCheckGroupButton = class(TcxCheckGroupButton) - private - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - public - constructor Create(AOwner: TComponent); override; - end; - - { TcxDBCheckGroup } - - TcxDBCheckGroup = class(TcxCheckGroup) - private - function GetActiveProperties: TcxCheckGroupProperties; - function GetDataBinding: TcxDBEditDataBinding; - function GetProperties: TcxCheckGroupProperties; - procedure SetDataBinding(const Value: TcxDBEditDataBinding); - procedure SetProperties(Value: TcxCheckGroupProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - function GetButtonInstance: TWinControl; override; - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCheckGroupProperties read GetActiveProperties; - published - property Align; - property Alignment; - property Anchors; - property Caption; - property Constraints; - property DataBinding: TcxDBEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property EditValue; - property Enabled; - property ParentBackground; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxCheckGroupProperties read GetProperties - write SetProperties; - property ShowHint; - property StatesItems; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnClick; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnFocusChanged; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -{ TcxDBCheckGroupButton } - -constructor TcxDBCheckGroupButton.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ControlStyle := ControlStyle + [csReplicatable]; -end; - -procedure TcxDBCheckGroupButton.CMGetDataLink(var Message: TMessage); -begin - CheckGroup.Perform(Message.Msg, Message.WParam, Message.LParam); -end; - -{ TcxDBCheckGroup } - -class function TcxDBCheckGroup.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCheckGroupProperties; -end; - -function TcxDBCheckGroup.GetButtonInstance: TWinControl; -begin - Result := TcxDBCheckGroupButton.Create(Self, IsInplace); -end; - -class function TcxDBCheckGroup.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBEditDataBinding; -end; - -function TcxDBCheckGroup.GetActiveProperties: TcxCheckGroupProperties; -begin - Result := TcxCheckGroupProperties(InternalGetActiveProperties); -end; - -function TcxDBCheckGroup.GetDataBinding: TcxDBEditDataBinding; -begin - Result := TcxDBEditDataBinding(FDataBinding); -end; - -function TcxDBCheckGroup.GetProperties: TcxCheckGroupProperties; -begin - Result := TcxCheckGroupProperties(FProperties); -end; - -procedure TcxDBCheckGroup.SetDataBinding(const Value: TcxDBEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBCheckGroup.SetProperties(Value: TcxCheckGroupProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBCheckGroup.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBCheckListBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBCheckListBox.pas deleted file mode 100644 index 7a62a78f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBCheckListBox.pas +++ /dev/null @@ -1,145 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBCheckListBox; - -interface - -{$I cxVer.inc} - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, Forms, Graphics, Messages, StdCtrls, SysUtils, - cxCheckListBox, cxDataUtils, cxDB, cxDBEdit, cxEdit, cxVariants; - -type - { TcxDBCheckListBox } - - TcxDBCheckListBox = class(TcxCustomCheckListBox) - private - function GetDataBinding: TcxDBDataBinding; - procedure SetDataBinding(Value: TcxDBDataBinding); - protected - class function GetDataBindingClass: TcxCustomDataBindingClass; override; - published - property Align; - property AllowDblClickToggle; - property AllowGrayed; - property Anchors; - property AutoComplete; - property AutoCompleteDelay; - property BiDiMode; - property Columns; - property Constraints; - property DataBinding: TcxDBDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property EditValueFormat; - property Enabled; - property Glyph; - property GlyphCount; - property Images; - property ImageLayout; - property ImeMode; - property ImeName; - property IntegralHeight; - property Items; - property ParentBiDiMode; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ReadOnly; - property ScrollWidth; - property ShowChecks; - property ShowHint; - property Sorted; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property TabWidth; - property Visible; - property OnCheckStatesToEditValue; - property OnClick; - property OnClickCheck; - property OnCompare; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnDrawItem; - property OnEditValueToCheckStates; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMeasureItem; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -{ TcxDBCheckListBox } - -function TcxDBCheckListBox.GetDataBinding: TcxDBDataBinding; -begin - Result := TcxDBDataBinding(FDataBinding); -end; - -procedure TcxDBCheckListBox.SetDataBinding(Value: TcxDBDataBinding); -begin - FDataBinding.Assign(Value); -end; - -class function TcxDBCheckListBox.GetDataBindingClass: TcxCustomDataBindingClass; -begin - Result := TcxDBDataBinding; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBColorComboBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBColorComboBox.pas deleted file mode 100644 index 5d881878..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBColorComboBox.pas +++ /dev/null @@ -1,159 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBColorComboBox; - -interface - -{$I cxVer.inc} - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, Dialogs, Forms, Graphics, Messages, StdCtrls, - SysUtils, cxColorComboBox, cxControls, cxDBEdit, cxEdit; - -type - { TcxDBColorComboBox } - - TcxDBColorComboBox = class(TcxCustomColorComboBox) - private - function GetActiveProperties: TcxColorComboBoxProperties; - function GetDataBinding: TcxDBEditDataBinding; - function GetProperties: TcxColorComboBoxProperties; - procedure SetDataBinding(const Value: TcxDBEditDataBinding); - procedure SetProperties(Value: TcxColorComboBoxProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxColorComboBoxProperties - read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxColorComboBoxProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -{ TcxDBColorComboBox } - -class function TcxDBColorComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxColorComboBoxProperties; -end; - -class function TcxDBColorComboBox.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBEditDataBinding; -end; - -function TcxDBColorComboBox.GetActiveProperties: TcxColorComboBoxProperties; -begin - Result := TcxColorComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxDBColorComboBox.GetDataBinding: TcxDBEditDataBinding; -begin - Result := TcxDBEditDataBinding(FDataBinding); -end; - -function TcxDBColorComboBox.GetProperties: TcxColorComboBoxProperties; -begin - Result := TcxColorComboBoxProperties(FProperties); -end; - -procedure TcxDBColorComboBox.SetDataBinding(const Value: TcxDBEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBColorComboBox.SetProperties(Value: TcxColorComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBColorComboBox.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBEdit.pas deleted file mode 100644 index 1e686e9d..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBEdit.pas +++ /dev/null @@ -1,3074 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBEdit; - -{$I cxVer.inc} - -interface - -uses - Variants, Windows, Messages, - Classes, Controls, DB, DBCtrls, SysUtils, cxBlobEdit, cxButtonEdit, cxCalc, - cxCalendar, cxCheckBox, cxClasses, cxContainer, cxCurrencyEdit, cxCustomData, - cxDataUtils, cxDB, cxDropDownEdit, cxEdit, cxHyperLinkEdit, cxImage, - cxImageComboBox, cxListBox, cxMaskEdit, cxMemo, cxMRUEdit, cxRadioGroup, - cxSpinEdit, cxTextEdit, cxTimeEdit; - -type - TcxDBTextEdit = class; - - { TcxCustomDBEditDefaultValuesProvider } - - TcxCustomDBEditDefaultValuesProvider = class(TcxCustomEditDefaultValuesProvider) - private - FDataSource: TDataSource; - FField: TField; - FFreeNotifier: TcxFreeNotificator; - procedure FieldFreeNotification(Sender: TComponent); - procedure SetDataSource(Value: TDataSource); - procedure SetField(Value: TField); - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - function CanSetEditMode: Boolean; override; - function DefaultAlignment: TAlignment; override; - function DefaultBlobKind: TcxBlobKind; override; - function DefaultCanModify: Boolean; override; - function DefaultDisplayFormat: string; override; - function DefaultEditFormat: string; override; - function DefaultEditMask: string; override; - function DefaultIsFloatValue: Boolean; override; - function DefaultMaxLength: Integer; override; - function DefaultMaxValue: Double; override; - function DefaultMinValue: Double; override; - function DefaultPrecision: Integer; override; - function DefaultReadOnly: Boolean; override; - function DefaultRequired: Boolean; override; - function IsBlob: Boolean; override; - function IsCurrency: Boolean; override; - function IsDataAvailable: Boolean; override; - function IsDataStorage: Boolean; override; - function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; override; - function IsOnGetTextAssigned: Boolean; override; - function IsOnSetTextAssigned: Boolean; override; - function IsValidChar(AChar: Char): Boolean; override; - property DataSource: TDataSource read FDataSource write SetDataSource; - property Field: TField read FField write SetField; - end; - - { TcxDBFieldDataLink } - - TcxDBFieldDataLink = class(TcxCustomFieldDataLink) - protected - procedure FocusControl(Field: TFieldRef); override; - procedure VisualControlChanged; override; - procedure UpdateRightToLeft; override; - end; - - { TcxDBDataBinding } - - TcxDBDataBinding = class(TcxCustomDBDataBinding) - protected - function GetDataLinkClass: TcxCustomFieldDataLinkClass; override; - published - property DataSource; - property DataField; - end; - - { TcxEditFieldDataLink } - - TcxDBEditDataBinding = class; - - TcxEditFieldDataLink = class(TDataLink) - private - FControl: TComponent; - FDataBinding: TcxDBEditDataBinding; - FEditing: Boolean; - FField: TField; - FFieldName: string; - FFreeNotifier: TcxFreeNotificator; - FMasterField: TField; - FModified: Boolean; - procedure FieldFreeNotification(Sender: TComponent); - function GetCanModify: Boolean; - procedure InternalSetField(Value: TField); - procedure SetEditing(Value: Boolean); - procedure SetField(Value: TField); - procedure SetFieldName(const Value: string); - procedure UpdateField; - procedure UpdateMasterField; - procedure UpdateRightToLeft; - protected - procedure ActiveChanged; override; - procedure DataEvent(Event: TDataEvent; - Info: Longint); override; - procedure EditingChanged; override; - procedure FocusControl(Field: TFieldRef); override; - procedure LayoutChanged; override; - procedure RecordChanged(Field: TField); override; - procedure UpdateData; override; - procedure ResetModified; - public - constructor Create(ADataBinding: TcxDBEditDataBinding); - destructor Destroy; override; - function Edit: Boolean; - procedure Modified; - procedure Reset; - property CanModify: Boolean read GetCanModify; - property Control: TComponent read FControl write FControl; - property Editing: Boolean read FEditing; - property Field: TField read FField; - property FieldName: string read FFieldName write SetFieldName; - end; - - { TcxDBEditDataBinding } - - TcxDBEditDataBinding = class(TcxEditDataBinding) - private - FDataLink: TcxEditFieldDataLink; - FRefreshCount: Integer; - function GetDataField: string; - function GetDataSource: TDataSource; - function GetDefaultValuesProvider: TcxCustomDBEditDefaultValuesProvider; - function GetField: TField; - procedure SetDataField(const Value: string); - procedure SetDataSource(Value: TDataSource); - protected - procedure DefaultValuesChanged; override; - procedure DisableRefresh; - procedure EnableRefresh; - function GetEditing: Boolean; override; - function GetModified: Boolean; override; - function GetStoredValue: TcxEditValue; override; - function IsNull: Boolean; override; - function IsInnerControlHaveToBeReadOnly: Boolean; override; - function IsRefreshDisabled: Boolean; - procedure Reset; override; - procedure SetDisplayValue(const Value: TcxEditValue); override; - function SetEditMode: Boolean; override; - procedure SetStoredValue(const Value: TcxEditValue); override; - procedure DataChanged; virtual; - procedure DataSetChange; virtual; - procedure EditingChanged; virtual; - function IsLookupControl: Boolean; virtual; - procedure UpdateData; virtual; - property DefaultValuesProvider: TcxCustomDBEditDefaultValuesProvider read GetDefaultValuesProvider; - public - constructor Create(AEdit: TcxCustomEdit); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CanCheckEditorValue: Boolean; override; - function CanModify: Boolean; override; - function CanPostEditorValue: Boolean; override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - class function GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; override; - procedure SetModified; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - procedure UpdateDisplayValue; override; - procedure UpdateNotConnectedDBEditDisplayValue; override; - property DataLink: TcxEditFieldDataLink read FDataLink; - property Field: TField read GetField; - published - property DataField: string read GetDataField write SetDataField; - property DataSource: TDataSource read GetDataSource write SetDataSource; - end; - - { TcxDBTextEditDataBinding } - - TcxDBTextEditDataBinding = class(TcxDBEditDataBinding) - protected - procedure SetDisplayValue(const Value: TcxEditValue); override; - public - procedure UpdateNotConnectedDBEditDisplayValue; override; - end; - - { TcxDBTextEdit } - - TcxDBTextEdit = class(TcxCustomTextEdit) - private - function GetActiveProperties: TcxTextEditProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxTextEditProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxTextEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - function SupportsSpelling: Boolean; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxTextEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxTextEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnEndDock; - property OnStartDock; - end; - - { TcxDBMemo } - - TcxDBMemo = class(TcxCustomMemo) - private - function GetActiveProperties: TcxMemoProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxMemoProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxMemoProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxMemoProperties read GetActiveProperties; - published - property Align; - property Anchors; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxMemoProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxDBMaskEdit } - - TcxDBMaskEdit = class(TcxCustomMaskEdit) - private - function GetActiveProperties: TcxMaskEditProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxMaskEditProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxMaskEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - function SupportsSpelling: Boolean; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxMaskEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxMaskEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnEndDock; - property OnStartDock; - end; - - { TcxDBButtonEdit } - - TcxDBButtonEdit = class(TcxCustomButtonEdit) - private - function GetActiveProperties: TcxButtonEditProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxButtonEditProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxButtonEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxButtonEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxButtonEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnEndDock; - property OnStartDock; - end; - - { TcxDBCheckBox } - - TcxDBCheckBox = class(TcxCustomCheckBox) - private - function GetActiveProperties: TcxCheckBoxProperties; - function GetDataBinding: TcxDBEditDataBinding; - function GetProperties: TcxCheckBoxProperties; - procedure SetDataBinding(Value: TcxDBEditDataBinding); - procedure SetProperties(Value: TcxCheckBoxProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCheckBoxProperties read GetActiveProperties; - property Checked; - published - property Action; - property Align; - property Anchors; - property AutoSize; - property Caption; - property Constraints; - property DataBinding: TcxDBEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ParentBackground; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxCheckBoxProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnClick; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnEndDock; - property OnStartDock; - end; - - { TcxDBComboBox } - - TcxDBComboBox = class(TcxCustomComboBox) - private - function GetActiveProperties: TcxComboBoxProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxComboBoxProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxComboBoxProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - function SupportsSpelling: Boolean; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxComboBoxProperties read GetActiveProperties; - property ItemIndex; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxComboBoxProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnEndDock; - property OnStartDock; - end; - - { TcxDBPopupEdit } - - TcxDBPopupEdit = class(TcxCustomPopupEdit) - private - function GetActiveProperties: TcxPopupEditProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxPopupEditProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxPopupEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - function SupportsSpelling: Boolean; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxPopupEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxPopupEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnEndDock; - property OnStartDock; - end; - - { TcxDBSpinEdit } - - TcxDBSpinEdit = class(TcxCustomSpinEdit) - private - function GetActiveProperties: TcxSpinEditProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxSpinEditProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxSpinEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxSpinEditProperties read GetActiveProperties; - property Value; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxSpinEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxDBTimeEdit } - - TcxDBTimeEdit = class(TcxCustomTimeEdit) - private - function GetActiveProperties: TcxTimeEditProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxTimeEditProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxTimeEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxTimeEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxTimeEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxDBBlobEdit } - - TcxDBBlobEdit = class(TcxCustomBlobEdit) - private - function GetActiveProperties: TcxBlobEditProperties; - function GetDataBinding: TcxDBEditDataBinding; - function GetProperties: TcxBlobEditProperties; - procedure SetDataBinding(Value: TcxDBEditDataBinding); - procedure SetProperties(Value: TcxBlobEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxBlobEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxBlobEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnGetGraphicClass; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxDBCalcEdit } - - TcxDBCalcEdit = class(TcxCustomCalcEdit) - private - function GetActiveProperties: TcxCalcEditProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxCalcEditProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxCalcEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCalcEditProperties read GetActiveProperties; - property Value; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxCalcEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop default True; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxDBDateEdit } - - TcxDBDateEdit = class(TcxCustomDateEdit) - private - function GetActiveProperties: TcxDateEditProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxDateEditProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxDateEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxDateEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxDateEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop default True; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxDBCurrencyEdit } - - TcxDBCurrencyEdit = class(TcxCustomCurrencyEdit) - private - function GetActiveProperties: TcxCurrencyEditProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxCurrencyEditProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxCurrencyEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCurrencyEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxCurrencyEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnEditing; - property OnEndDock; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - end; - - { TcxDBHyperLinkEdit } - - TcxDBHyperLinkEdit = class(TcxCustomHyperLinkEdit) - private - function GetActiveProperties: TcxHyperLinkEditProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxHyperLinkEditProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxHyperLinkEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxHyperLinkEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxHyperLinkEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnEditing; - property OnEndDock; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - end; - - { TcxDBImage } - - TcxDBImage = class(TcxCustomImage) - private - function GetActiveProperties: TcxImageProperties; - function GetDataBinding: TcxDBEditDataBinding; - function GetProperties: TcxImageProperties; - procedure SetDataBinding(Value: TcxDBEditDataBinding); - procedure SetProperties(Value: TcxImageProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxImageProperties read GetActiveProperties; - published - property Align; - property Anchors; - property AutoSize; - property Constraints; - property DataBinding: TcxDBEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ParentColor; - property PopupMenu; - property Properties: TcxImageProperties read GetProperties - write SetProperties; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnGetGraphicClass; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxDBImageComboBox } - - TcxDBImageComboBox = class(TcxCustomImageComboBox) - private - function GetActiveProperties: TcxImageComboBoxProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxImageComboBoxProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxImageComboBoxProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxImageComboBoxProperties read GetActiveProperties; - property ItemIndex; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxImageComboBoxProperties read GetProperties write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnEditing; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - end; - - { TcxDBMRUEdit } - - TcxDBMRUEdit = class(TcxCustomMRUEdit) - private - function GetActiveProperties: TcxMRUEditProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxMRUEditProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxMRUEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxMRUEditProperties read GetActiveProperties; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding - read GetDataBinding write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxMRUEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnEditing; - property OnEndDock; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - end; - - { TcxDBRadioGroupButton } - - TcxDBRadioGroupButton = class(TcxCustomRadioGroupButton) - private - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - public - constructor Create(AOwner: TComponent); override; - end; - - { TcxDBRadioGroup } - - TcxDBRadioGroup = class(TcxCustomRadioGroup) - private - function GetActiveProperties: TcxRadioGroupProperties; - function GetDataBinding: TcxDBEditDataBinding; - function GetProperties: TcxRadioGroupProperties; - procedure SetDataBinding(Value: TcxDBEditDataBinding); - procedure SetProperties(Value: TcxRadioGroupProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxRadioGroupProperties read GetActiveProperties; - protected - function GetButtonInstance: TWinControl; override; - class function GetDataBindingClass: TcxEditDataBindingClass; override; - published - property Align; - property Alignment; - property Anchors; - property Caption; - property Constraints; - property Ctl3D; - property DataBinding: TcxDBEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ParentBackground; - property ParentColor; - property ParentCtl3D; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxRadioGroupProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnClick; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnStartDock; - property OnStartDrag; - end; - - { TcxDBListBox } - - TcxDBListBox = class(TcxListBox) - private - function GetDataBinding: TcxDBDataBinding; - procedure SetDataBinding(Value: TcxDBDataBinding); - protected - function GetDataBindingClass: TcxCustomDataBindingClass; override; - published - property DataBinding: TcxDBDataBinding read GetDataBinding write SetDataBinding; - end; - -function GetcxDBEditDataLink(AEdit: TcxCustomEdit): TDataLink; - -implementation - -uses - cxVariants, StdCtrls; - -type - TcxCustomEditAccess = class(TcxCustomEdit); - TcxDataSetAccess = class(TDataSet); - -function GetcxDBEditDataLink(AEdit: TcxCustomEdit): TDataLink; -begin - if TcxCustomEditAccess(AEdit).DataBinding is TcxDBEditDataBinding then - Result := TcxDBEditDataBinding(TcxCustomEditAccess(AEdit).DataBinding).DataLink - else - Result := nil; -end; - -{ TcxCustomDBEditDefaultValuesProvider } - -constructor TcxCustomDBEditDefaultValuesProvider.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FFreeNotifier := TcxFreeNotificator.Create(nil); - FFreeNotifier.OnFreeNotification := FieldFreeNotification; -end; - -destructor TcxCustomDBEditDefaultValuesProvider.Destroy; -begin - FreeAndNil(FFreeNotifier); - inherited Destroy; -end; - -function TcxCustomDBEditDefaultValuesProvider.CanSetEditMode: Boolean; -begin - Result := (DataSource <> nil) and (DataSource.AutoEdit or - (DataSource.State in [dsEdit, dsInsert])); -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultAlignment: TAlignment; -begin - if IsDataAvailable then - Result := Field.Alignment - else - Result := inherited DefaultAlignment; -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultBlobKind: TcxBlobKind; -begin - if IsDataAvailable then - case Field.DataType of - {$IFDEF DELPHI10}ftWideMemo,{$ENDIF}ftMemo, ftFmtMemo, ftOraClob: - Result := bkMemo; - ftGraphic: - Result := bkGraphic; - ftParadoxOle, ftDBaseOle: - Result := bkOle; - else - Result := bkNone; - end - else - Result := bkNone; -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultCanModify: Boolean; -begin - Result := not DefaultReadOnly and IsDataAvailable; - Result := Result and (Field.CanModify or (Field.Lookup and CanModifyLookupField(Field))); -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultDisplayFormat: string; -begin - if IsDataAvailable and (Field is TNumericField) then - Result := TNumericField(Field).DisplayFormat - else - Result := inherited DefaultDisplayFormat; -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultEditFormat: string; -begin - if IsDataAvailable and (Field is TNumericField) then - Result := TNumericField(Field).EditFormat - else - Result := inherited DefaultEditFormat; -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultEditMask: string; -begin - if IsDataAvailable then - Result := Field.EditMask - else - Result := inherited DefaultEditMask; -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultIsFloatValue: Boolean; -begin - if IsDataAvailable then - Result := Field.DataType in [ftFloat, ftCurrency, ftBCD] - else - Result := inherited DefaultIsFloatValue; -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultMaxLength: Integer; -begin - if IsDataAvailable and (Field.DataType in [ftString, ftWideString]) then - Result := Field.Size - else - Result := inherited DefaultMaxLength; -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultMaxValue: Double; -begin - Result := inherited DefaultMaxValue; - if IsDataAvailable then - begin - if Field is TIntegerField then - Result := TIntegerField(Field).MaxValue - else - if Field is TFloatField then - begin - Result := StrToFloat(FloatToStrF(TFloatField(Field).MaxValue, ffGeneral, - TFloatField(Field).Precision, TFloatField(Field).Precision)); - end - else - if Field is TBCDField then - Result := TBCDField(Field).MaxValue; - end; -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultMinValue: Double; -begin - Result := inherited DefaultMinValue; - if IsDataAvailable then - begin - if Field is TIntegerField then - Result := TIntegerField(Field).MinValue - else - if Field is TFloatField then - begin - Result := StrToFloat(FloatToStrF(TFloatField(Field).MinValue, ffGeneral, - TFloatField(Field).Precision, TFloatField(Field).Precision)); - end - else - if Field is TBCDField then - Result := TBCDField(Field).MinValue; - end; -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultPrecision: Integer; -begin - if Field is TFloatField then - Result := TFloatField(Field).Precision - else if Field is TBCDField then - Result := TBCDField(Field).Precision - else if Field is TAggregateField then - Result := TAggregateField(Field).Precision - else if Field is TFMTBCDField then - Result := TFMTBCDField(Field).Precision - else - Result := inherited DefaultPrecision; -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultReadOnly: Boolean; -begin - if IsDataAvailable then - Result := Field.ReadOnly - else - Result := inherited DefaultReadOnly; -end; - -function TcxCustomDBEditDefaultValuesProvider.DefaultRequired: Boolean; -begin - if IsDataAvailable then - Result := Field.Required - else - Result := inherited DefaultRequired; -end; - -function TcxCustomDBEditDefaultValuesProvider.IsBlob: Boolean; -begin - Result := IsDataAvailable and Field.IsBlob; -end; - -function TcxCustomDBEditDefaultValuesProvider.IsCurrency: Boolean; -begin - Result := inherited IsCurrency; - if IsDataAvailable then - if Field is TFloatField then - Result := TFloatField(Field).Currency - else if Field is TBCDField then - Result := TBCDField(Field).Currency - else if Field is TAggregateField then - Result := TAggregateField(Field).Currency - else if Field is TFMTBCDField then - Result := TFMTBCDField(Field).Currency -end; - -function TcxCustomDBEditDefaultValuesProvider.IsDataAvailable: Boolean; -begin - Result := (FField <> nil) and (FField.DataSet <> nil) and - (FField.DataSet.State <> dsInactive); -end; - -function TcxCustomDBEditDefaultValuesProvider.IsDataStorage: Boolean; -begin - Result := True; -end; - -function TcxCustomDBEditDefaultValuesProvider.IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; -begin - Result := IsDataAvailable; - if Result and not Assigned(Field.OnGetText) then - begin - Result := False; - if Field is TFloatField then - Result := Result or TFloatField(Field).Currency and AIsCurrencyValueAccepted; - if Field is TBCDField then - Result := Result or TBCDField(Field).Currency and AIsCurrencyValueAccepted; - if Field is TDateTimeField then - Result := Result or (TDateTimeField(Field).DisplayFormat <> ''); - if Field is TAggregateField then - with TAggregateField(Field) do - Result := Result or (DisplayFormat <> '') or Currency and AIsCurrencyValueAccepted; - if Field is TFMTBCDField then - Result := Result or TFMTBCDField(Field).Currency and AIsCurrencyValueAccepted; - if Field is TSQLTimeStampField then - Result := Result or (TSQLTimeStampField(Field).DisplayFormat <> ''); - if Field is TNumericField then - Result := Result or (TNumericField(Field).DisplayFormat <> ''); - end; -end; - -function TcxCustomDBEditDefaultValuesProvider.IsOnGetTextAssigned: Boolean; -begin - Result := IsDisplayFormatDefined(False) and (DefaultDisplayFormat = ''); -end; - -function TcxCustomDBEditDefaultValuesProvider.IsOnSetTextAssigned: Boolean; -begin - Result := IsDataAvailable and Assigned(Field.OnSetText); -end; - -function TcxCustomDBEditDefaultValuesProvider.IsValidChar(AChar: Char): Boolean; -begin - if IsDataAvailable then - Result := Field.IsValidChar(AChar) - else - Result := inherited IsValidChar(AChar); -end; - -procedure TcxCustomDBEditDefaultValuesProvider.FieldFreeNotification(Sender: TComponent); -begin - if Sender = DataSource then - DataSource := nil - else - Field := nil; -end; - -procedure TcxCustomDBEditDefaultValuesProvider.SetDataSource(Value: TDataSource); -begin - if Value <> FDataSource then - begin - if FDataSource <> nil then - FFreeNotifier.RemoveSender(FDataSource); - FDataSource := Value; - if FDataSource <> nil then - FFreeNotifier.AddSender(FDataSource); - end; -end; - -procedure TcxCustomDBEditDefaultValuesProvider.SetField(Value: TField); -begin - if Value <> FField then - begin - if FField <> nil then - FFreeNotifier.RemoveSender(FField); - FField := Value; - if FField <> nil then - FFreeNotifier.AddSender(FField); - end; -end; - -{ TcxDBFieldDataLink } - -procedure TcxDBFieldDataLink.FocusControl(Field: TFieldRef); -var - AVisualControl: TWinControl; -begin - if not(DataBinding.VisualControl is TWinControl) then - Exit; - AVisualControl := TWinControl(DataBinding.VisualControl); - if (Field^ <> nil) and (Field^ = Self.Field) and AVisualControl.CanFocus then - begin - Field^ := nil; - AVisualControl.SetFocus; - end; -end; - -procedure TcxDBFieldDataLink.VisualControlChanged; -begin - VisualControl := DataBinding.VisualControl is TWinControl; -end; - -procedure TcxDBFieldDataLink.UpdateRightToLeft; -var - AIsRightAligned: Boolean; - AUseRightToLeftAlignment: Boolean; - AVisualControl: TWinControl; -begin - if DataBinding.VisualControl is TWinControl then - begin - AVisualControl := TWinControl(DataBinding.VisualControl); - if AVisualControl.IsRightToLeft then - begin - AIsRightAligned := - (GetWindowLong(AVisualControl.Handle, GWL_EXSTYLE) and WS_EX_RIGHT) = WS_EX_RIGHT; - AUseRightToLeftAlignment := DBUseRightToLeftAlignment(AVisualControl, Field); - if AIsRightAligned and not AUseRightToLeftAlignment or - not AIsRightAligned and AUseRightToLeftAlignment then - AVisualControl.Perform(CM_RECREATEWND, 0, 0); - end; - end; -end; - -{ TcxDBDataBinding } - -function TcxDBDataBinding.GetDataLinkClass: TcxCustomFieldDataLinkClass; -begin - Result := TcxDBFieldDataLink; -end; - -{ TcxEditFieldDataLink } - -constructor TcxEditFieldDataLink.Create(ADataBinding: TcxDBEditDataBinding); -begin - inherited Create; - VisualControl := True; - FDataBinding := ADataBinding; - FFreeNotifier := TcxFreeNotificator.Create(nil); - FFreeNotifier.OnFreeNotification := FieldFreeNotification; -end; - -destructor TcxEditFieldDataLink.Destroy; -begin - InternalSetField(nil); - FreeAndNil(FFreeNotifier); - inherited Destroy; -end; - -function TcxEditFieldDataLink.Edit: Boolean; -begin - if CanModify then - inherited Edit; - Result := FEditing; -end; - -procedure TcxEditFieldDataLink.Modified; -begin - FModified := True; -end; - -procedure TcxEditFieldDataLink.Reset; -begin - RecordChanged(nil); -end; - -procedure TcxEditFieldDataLink.ActiveChanged; -begin - FDataBinding.DefaultValuesProvider.DataSource := DataSource; - FDataBinding.DisableRefresh; - try - UpdateField; - FDataBinding.DataSetChange; - finally - FDataBinding.EnableRefresh; - FModified := False; - FDataBinding.DataChanged; - end; -end; - -procedure TcxEditFieldDataLink.DataEvent(Event: TDataEvent; - Info: Longint); -begin - inherited DataEvent(Event, Info); - if Event = deDataSetChange then - begin - FDataBinding.DisableRefresh; - try - FDataBinding.DataSetChange; - finally - FDataBinding.EnableRefresh; - FModified := False; - end; - end; -end; - -procedure TcxEditFieldDataLink.EditingChanged; -begin - SetEditing(inherited Editing and CanModify); - FDataBinding.EditingChanged; -end; - -procedure TcxEditFieldDataLink.FocusControl(Field: TFieldRef); -begin - if (Field^ <> nil) and (Field^ = FField) and (FControl is TWinControl) then - if TWinControl(FControl).CanFocus then - begin - Field^ := nil; - TWinControl(FControl).SetFocus; - end; -end; - -procedure TcxEditFieldDataLink.LayoutChanged; -begin - UpdateField; -end; - -procedure TcxEditFieldDataLink.RecordChanged(Field: TField); -begin - if (Field = nil) or (Field = FMasterField) then - begin - FDataBinding.DataChanged; - if not FDataBinding.IsRefreshDisabled then - FModified := False; - end; -end; - -procedure TcxEditFieldDataLink.UpdateData; -begin - if FModified then - begin - if Field <> nil then - FDataBinding.UpdateData; - if not FDataBinding.IsRefreshDisabled then - FModified := False; - end; -end; - -procedure TcxEditFieldDataLink.ResetModified; -begin - FModified := False; -end; - -procedure TcxEditFieldDataLink.FieldFreeNotification(Sender: TComponent); -begin - InternalSetField(nil); -end; - -function TcxEditFieldDataLink.GetCanModify: Boolean; -begin - Result := not ReadOnly and (Field <> nil) and (Field.CanModify or - (Field.Lookup and CanModifyLookupField(Field))); -end; - -procedure TcxEditFieldDataLink.InternalSetField(Value: TField); -begin - if Value <> FField then - begin - if FField <> nil then - FFreeNotifier.RemoveSender(FField); - FField := Value; - if FField <> nil then - FFreeNotifier.AddSender(FField); - UpdateMasterField; - end; -end; - -procedure TcxEditFieldDataLink.SetEditing(Value: Boolean); -begin - if FEditing <> Value then - begin - FEditing := Value; - if not FDataBinding.IsRefreshDisabled then - FModified := False; - end; -end; - -procedure TcxEditFieldDataLink.SetField(Value: TField); -begin - if FField <> Value then - begin - InternalSetField(Value); - FDataBinding.DefaultValuesChanged; - EditingChanged; - RecordChanged(nil); - UpdateRightToLeft; - end; -end; - -procedure TcxEditFieldDataLink.SetFieldName(const Value: string); -begin - if FFieldName <> Value then - begin - FFieldName := Value; - UpdateField; - end; -end; - -procedure TcxEditFieldDataLink.UpdateField; -begin - if Active and (FFieldName <> '') then - begin - InternalSetField(nil); - if Assigned(FControl) then - SetField(GetFieldProperty(DataSource.DataSet, FControl, FFieldName)) - else - SetField(DataSource.DataSet.FieldByName(FFieldName)); - end - else - SetField(nil); -end; - -procedure TcxEditFieldDataLink.UpdateMasterField; -begin - if FField = nil then - FMasterField := nil - else - if not FDataBinding.IsLookupControl or (FField.FieldKind <> fkLookup) or - (Pos(';', FField.KeyFields) > 0) then - FMasterField := FField - else - if Assigned(FControl) then - FMasterField := GetFieldProperty(DataSource.DataSet, FControl, - FField.KeyFields) - else - FMasterField := DataSource.DataSet.FieldByName(FField.KeyFields); -end; - -procedure TcxEditFieldDataLink.UpdateRightToLeft; -var - AIsRightAligned: Boolean; - AUseRightToLeftAlignment: Boolean; -begin - if Assigned(FControl) and (FControl is TWinControl) and - TWinControl(FControl).IsRightToLeft then - begin - AIsRightAligned := - (GetWindowLong(TWinControl(FControl).Handle, GWL_EXSTYLE) and WS_EX_RIGHT) = WS_EX_RIGHT; - AUseRightToLeftAlignment := - DBUseRightToLeftAlignment(TControl(FControl), Field); - if (AIsRightAligned and (not AUseRightToLeftAlignment)) or - ((not AIsRightAligned) and AUseRightToLeftAlignment) then - TWinControl(FControl).Perform(CM_RECREATEWND, 0, 0); - end; -end; - -{ TcxDBEditDataBinding } - -constructor TcxDBEditDataBinding.Create(AEdit: TcxCustomEdit); -begin - inherited Create(AEdit); - FDataLink := TcxEditFieldDataLink.Create(Self); - if AEdit.InnerControl <> nil then - FDataLink.Control := AEdit.InnerControl - else - FDataLink.Control := AEdit; -end; - -destructor TcxDBEditDataBinding.Destroy; -begin - FreeAndNil(FDataLink); - inherited Destroy; -end; - -procedure TcxDBEditDataBinding.Assign(Source: TPersistent); -begin - if Source is TcxDBTextEditDataBinding then - begin - DataField := TcxDBTextEditDataBinding(Source).DataField; - DataSource := TcxDBTextEditDataBinding(Source).DataSource; - DataChanged; - end; - inherited Assign(Source); -end; - -function TcxDBEditDataBinding.CanCheckEditorValue: Boolean; -begin - Result := False; -end; - -function TcxDBEditDataBinding.CanModify: Boolean; -begin - Result := inherited CanModify and DataLink.CanModify; -end; - -function TcxDBEditDataBinding.CanPostEditorValue: Boolean; -begin - Result := Editing and DataLink.FModified; -end; - -function TcxDBEditDataBinding.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := FDataLink.ExecuteAction(Action); -end; - -class function TcxDBEditDataBinding.GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; -begin - Result := TcxCustomDBEditDefaultValuesProvider; -end; - -procedure TcxDBEditDataBinding.SetModified; -begin - if Editing then - DataLink.Modified; -end; - -function TcxDBEditDataBinding.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := FDataLink.UpdateAction(Action); -end; - -procedure TcxDBEditDataBinding.UpdateDisplayValue; -begin - Edit.LockClick(True); - try - if IsDataAvailable then - FDataLink.Reset - else - inherited UpdateDisplayValue; - finally - Edit.LockClick(False); - end; -end; - -procedure TcxDBEditDataBinding.DefaultValuesChanged; -begin - DefaultValuesProvider.Field := Field; - inherited DefaultValuesChanged; -end; - -procedure TcxDBEditDataBinding.DisableRefresh; -begin - Inc(FRefreshCount); -end; - -procedure TcxDBEditDataBinding.EnableRefresh; -begin - if FRefreshCount > 0 then - Dec(FRefreshCount); -end; - -function TcxDBEditDataBinding.GetEditing: Boolean; -begin - Result := IsDataAvailable and FDataLink.Editing; -end; - -function TcxDBEditDataBinding.GetModified: Boolean; -begin - Result := GetEditing and FDataLink.FModified; -end; - -function TcxDBEditDataBinding.GetStoredValue: TcxEditValue; -var - AEditValueSource: TcxDataEditValueSource; -begin - AEditValueSource := Edit.ActiveProperties.GetEditValueSource(Edit.InternalFocused); - if not IsDataAvailable or (IsNull and - ((AEditValueSource <> evsText) or not Assigned(Field.OnGetText))) then - Result := Null - else - begin - Result := Null; - case AEditValueSource of - evsKey: - if Field.KeyFields <> '' then - Result := Field.DataSet.FieldValues[Field.KeyFields] - else - Result := Field.Value; - evsText: - if Edit.Focused and FDataLink.CanModify then - Result := Field.Text - else - if Field.IsBlob then - Result := Field.AsString - else - Result := Field.DisplayText; - evsValue: - Result := Field.Value; - end; - end; -end; - -function TcxDBEditDataBinding.IsNull: Boolean; -begin - if Field is TAggregateField then - Result := VarIsNull(TcxDataSetAccess(DataLink.DataSet).GetAggregateValue(Field)) - else - Result := Field.IsNull; -end; - -function TcxDBEditDataBinding.IsInnerControlHaveToBeReadOnly: Boolean; -begin - Result := not Editing; -end; - -function TcxDBEditDataBinding.IsRefreshDisabled: Boolean; -begin - Result := FRefreshCount > 0; -end; - -procedure TcxDBEditDataBinding.Reset; -begin - if IsDataAvailable then - begin - FDataLink.Reset; - Edit.SelectAll; - end; -end; - -procedure TcxDBEditDataBinding.SetDisplayValue(const Value: TcxEditValue); -begin - if IsDataAvailable then - SetInternalDisplayValue(Value) - else - SetInternalDisplayValue(''); -end; - -function TcxDBEditDataBinding.SetEditMode: Boolean; -begin - Result := IDefaultValuesProvider.DefaultCanModify; - if not Result then - Exit; - - DisableRefresh; - try - FDatalink.Edit; - Result := FDatalink.Editing; - if Result then - FDatalink.Modified; - finally - EnableRefresh; - end; -end; - -procedure TcxDBEditDataBinding.SetStoredValue(const Value: TcxEditValue); - - procedure SetFieldValue(AField: TField; const AValue: TcxEditValue); - begin - if VarIsStr(AValue) and (AValue = '') and - not (Field.DataType in [ftString, ftWideString]) then - AField.Value := Null - else - if (Field is TFMTBCDField) and VarIsType(AValue, varDouble) then - AField.Value := FloatToStrF(AValue, ffFixed, 15, 18) // bug in VarToBcd when the type AValue is double: VarToStr(0.000012) returns 1.2E-05 which is incorrect for StrToBcd - else - AField.Value := AValue; - end; - -var - AEditValueSource: TcxDataEditValueSource; - AFieldList: TList; - I: Integer; -begin - if IsDataAvailable then - begin - DisableRefresh; - try - if FDataLink.Edit then - begin - AEditValueSource := Edit.ActiveProperties.GetEditValueSource(True(*Edit.InternalFocused*)); - if (*(*)AEditValueSource = evsText(*) or Assigned(Field.OnSetText)*) then - Field.Text := VarToStr(Value) - else - if (AEditValueSource = evsKey) and (Field.KeyFields <> '') then - if Pos(';', Field.KeyFields) = 0 then - SetFieldValue(Field.DataSet.FieldByName(Field.KeyFields), Value) - else - begin - AFieldList := TList.Create; - try - Field.DataSet.GetFieldList(AFieldList, Field.KeyFields); - for I := 0 to AFieldList.Count - 1 do - SetFieldValue(TField(AFieldList[I]), Value[I]); - finally - AFieldList.Free; - end; - Field.DataSet.FieldValues[Field.KeyFields] := Value; - end - else - SetFieldValue(Field, Value); - FDataLink.ResetModified; - end; - finally - EnableRefresh; - end; - end; -end; - -procedure TcxDBEditDataBinding.UpdateNotConnectedDBEditDisplayValue; -begin - if not IsDataAvailable then - Edit.EditValue := Null; -end; - -procedure TcxDBEditDataBinding.DataChanged; -begin - if IsRefreshDisabled then - Exit; - if Edit.IsDesigning and not IsDataAvailable then - UpdateNotConnectedDBEditDisplayValue - else - begin - if not TcxCustomEditAccess(Edit).Focused and - Edit.ActiveProperties.IsValueEditorWithValueFormatting then - begin - if not IsDataAvailable or IsNull then - TcxCustomEditAccess(Edit).FEditValue := Null - else - TcxCustomEditAccess(Edit).FEditValue := Field.Value; - Edit.LockClick(True); - try - SetInternalDisplayValue(StoredValue); - finally - Edit.LockClick(False); - end; - end - else - Edit.EditValue := StoredValue; - end; -end; - -procedure TcxDBEditDataBinding.DataSetChange; -begin - DefaultValuesChanged; -end; - -procedure TcxDBEditDataBinding.EditingChanged; -begin - TcxCustomEditAccess(Edit).EditingChanged; -end; - -function TcxDBEditDataBinding.IsLookupControl: Boolean; -begin - Result := False; -end; - -procedure TcxDBEditDataBinding.UpdateData; -begin - if IsDataAvailable then - begin - if Edit.ValidateEdit(True) then - StoredValue := Edit.EditValue; - end; -end; - -function TcxDBEditDataBinding.GetDataField: string; -begin - Result := FDataLink.FieldName; -end; - -function TcxDBEditDataBinding.GetDataSource: TDataSource; -begin - Result := FDataLink.DataSource; -end; - -function TcxDBEditDataBinding.GetDefaultValuesProvider: TcxCustomDBEditDefaultValuesProvider; -begin - Result := TcxCustomDBEditDefaultValuesProvider(IDefaultValuesProvider.GetInstance); -end; - -function TcxDBEditDataBinding.GetField: TField; -begin - Result := FDataLink.Field; -end; - -procedure TcxDBEditDataBinding.SetDataField(const Value: string); -begin - FDataLink.FieldName := Value; -end; - -procedure TcxDBEditDataBinding.SetDataSource(Value: TDataSource); -begin - if not (FDataLink.DataSourceFixed and Edit.IsLoading) then - begin - FDataLink.DataSource := Value; - DefaultValuesProvider.DataSource := Value; - end; -end; - -{ TcxDBTextEditDataBinding } - -procedure TcxDBTextEditDataBinding.UpdateNotConnectedDBEditDisplayValue; -begin - if not IsDataAvailable then - begin - Edit.LockClick(True); - try - DisplayValue := ''; - finally - Edit.LockClick(False); - end; - end; -end; - -procedure TcxDBTextEditDataBinding.SetDisplayValue(const Value: TcxEditValue); -begin - if IsDataAvailable then - SetInternalDisplayValue(Value) - else - if Edit.IsDesigning then - SetInternalDisplayValue(Edit.Name) - else - SetInternalDisplayValue(''); -end; - -{ TcxDBTextEdit } - -class function TcxDBTextEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxTextEditProperties; -end; - -class function TcxDBTextEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBTextEdit.SupportsSpelling: Boolean; -begin - Result := IsTextInputMode; -end; - -function TcxDBTextEdit.GetActiveProperties: TcxTextEditProperties; -begin - Result := TcxTextEditProperties(InternalGetActiveProperties); -end; - -function TcxDBTextEdit.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := FDataBinding as TcxDBTextEditDataBinding; -end; - -function TcxDBTextEdit.GetProperties: TcxTextEditProperties; -begin - Result := TcxTextEditProperties(FProperties); -end; - -procedure TcxDBTextEdit.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBTextEdit.SetProperties(Value: TcxTextEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBTextEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBMemo } - -class function TcxDBMemo.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxMemoProperties; -end; - -class function TcxDBMemo.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBMemo.GetActiveProperties: TcxMemoProperties; -begin - Result := TcxMemoProperties(InternalGetActiveProperties); -end; - -function TcxDBMemo.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBMemo.GetProperties: TcxMemoProperties; -begin - Result := TcxMemoProperties(FProperties); -end; - -procedure TcxDBMemo.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBMemo.SetProperties(Value: TcxMemoProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBMemo.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBMaskEdit } - -class function TcxDBMaskEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxMaskEditProperties; -end; - -class function TcxDBMaskEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBMaskEdit.SupportsSpelling: Boolean; -begin - Result := IsTextInputMode; -end; - -function TcxDBMaskEdit.GetActiveProperties: TcxMaskEditProperties; -begin - Result := TcxMaskEditProperties(InternalGetActiveProperties); -end; - -function TcxDBMaskEdit.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := FDataBinding as TcxDBTextEditDataBinding; -end; - -function TcxDBMaskEdit.GetProperties: TcxMaskEditProperties; -begin - Result := TcxMaskEditProperties(FProperties); -end; - -procedure TcxDBMaskEdit.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBMaskEdit.SetProperties(Value: TcxMaskEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBMaskEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBButtonEdit } - -class function TcxDBButtonEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxButtonEditProperties; -end; - -class function TcxDBButtonEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBButtonEdit.GetActiveProperties: TcxButtonEditProperties; -begin - Result := TcxButtonEditProperties(InternalGetActiveProperties); -end; - -function TcxDBButtonEdit.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := FDataBinding as TcxDBTextEditDataBinding; -end; - -function TcxDBButtonEdit.GetProperties: TcxButtonEditProperties; -begin - Result := TcxButtonEditProperties(FProperties); -end; - -procedure TcxDBButtonEdit.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBButtonEdit.SetProperties(Value: TcxButtonEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBButtonEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBCheckBox } - -class function TcxDBCheckBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCheckBoxProperties; -end; - -class function TcxDBCheckBox.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBEditDataBinding; -end; - -function TcxDBCheckBox.GetActiveProperties: TcxCheckBoxProperties; -begin - Result := TcxCheckBoxProperties(InternalGetActiveProperties); -end; - -function TcxDBCheckBox.GetDataBinding: TcxDBEditDataBinding; -begin - Result := TcxDBEditDataBinding(FDataBinding); -end; - -function TcxDBCheckBox.GetProperties: TcxCheckBoxProperties; -begin - Result := TcxCheckBoxProperties(FProperties); -end; - -procedure TcxDBCheckBox.SetDataBinding(Value: TcxDBEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBCheckBox.SetProperties(Value: TcxCheckBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBCheckBox.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBComboBox } - -class function TcxDBComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxComboBoxProperties; -end; - -class function TcxDBComboBox.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBComboBox.SupportsSpelling: Boolean; -begin - Result := IsTextInputMode; -end; - -function TcxDBComboBox.GetActiveProperties: TcxComboBoxProperties; -begin - Result := TcxComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxDBComboBox.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBComboBox.GetProperties: TcxComboBoxProperties; -begin - Result := TcxComboBoxProperties(FProperties); -end; - -procedure TcxDBComboBox.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBComboBox.SetProperties(Value: TcxComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBComboBox.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBPopupEdit } - -class function TcxDBPopupEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxPopupEditProperties; -end; - -class function TcxDBPopupEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBPopupEdit.SupportsSpelling: Boolean; -begin - Result := IsTextInputMode; -end; - -function TcxDBPopupEdit.GetActiveProperties: TcxPopupEditProperties; -begin - Result := TcxPopupEditProperties(InternalGetActiveProperties); -end; - -function TcxDBPopupEdit.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBPopupEdit.GetProperties: TcxPopupEditProperties; -begin - Result := TcxPopupEditProperties(FProperties); -end; - -procedure TcxDBPopupEdit.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBPopupEdit.SetProperties(Value: TcxPopupEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBPopupEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBSpinEdit } - -class function TcxDBSpinEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxSpinEditProperties; -end; - -class function TcxDBSpinEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBSpinEdit.GetActiveProperties: TcxSpinEditProperties; -begin - Result := TcxSpinEditProperties(InternalGetActiveProperties); -end; - -function TcxDBSpinEdit.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBSpinEdit.GetProperties: TcxSpinEditProperties; -begin - Result := TcxSpinEditProperties(FProperties); -end; - -procedure TcxDBSpinEdit.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBSpinEdit.SetProperties(Value: TcxSpinEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBSpinEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBTimeEdit } - -class function TcxDBTimeEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxTimeEditProperties; -end; - -class function TcxDBTimeEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBTimeEdit.GetActiveProperties: TcxTimeEditProperties; -begin - Result := TcxTimeEditProperties(InternalGetActiveProperties); -end; - -function TcxDBTimeEdit.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBTimeEdit.GetProperties: TcxTimeEditProperties; -begin - Result := TcxTimeEditProperties(FProperties); -end; - -procedure TcxDBTimeEdit.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBTimeEdit.SetProperties(Value: TcxTimeEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBTimeEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBBlobEdit } - -class function TcxDBBlobEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxBlobEditProperties; -end; - -class function TcxDBBlobEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBEditDataBinding; -end; - -function TcxDBBlobEdit.GetActiveProperties: TcxBlobEditProperties; -begin - Result := TcxBlobEditProperties(InternalGetActiveProperties); -end; - -function TcxDBBlobEdit.GetDataBinding: TcxDBEditDataBinding; -begin - Result := TcxDBEditDataBinding(FDataBinding); -end; - -function TcxDBBlobEdit.GetProperties: TcxBlobEditProperties; -begin - Result := TcxBlobEditProperties(FProperties); -end; - -procedure TcxDBBlobEdit.SetDataBinding(Value: TcxDBEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBBlobEdit.SetProperties(Value: TcxBlobEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBBlobEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBCalcEdit } - -class function TcxDBCalcEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCalcEditProperties; -end; - -class function TcxDBCalcEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBCalcEdit.GetActiveProperties: TcxCalcEditProperties; -begin - Result := TcxCalcEditProperties(InternalGetActiveProperties); -end; - -function TcxDBCalcEdit.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBCalcEdit.GetProperties: TcxCalcEditProperties; -begin - Result := TcxCalcEditProperties(FProperties); -end; - -procedure TcxDBCalcEdit.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBCalcEdit.SetProperties(Value: TcxCalcEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBCalcEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBDateEdit } - -class function TcxDBDateEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxDateEditProperties; -end; - -class function TcxDBDateEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBDateEdit.GetActiveProperties: TcxDateEditProperties; -begin - Result := TcxDateEditProperties(InternalGetActiveProperties); -end; - -function TcxDBDateEdit.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBDateEdit.GetProperties: TcxDateEditProperties; -begin - Result := TcxDateEditProperties(FProperties); -end; - -procedure TcxDBDateEdit.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBDateEdit.SetProperties(Value: TcxDateEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBDateEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBCurrencyEdit } - -class function TcxDBCurrencyEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCurrencyEditProperties; -end; - -class function TcxDBCurrencyEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBCurrencyEdit.GetActiveProperties: TcxCurrencyEditProperties; -begin - Result := TcxCurrencyEditProperties(InternalGetActiveProperties); -end; - -function TcxDBCurrencyEdit.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBCurrencyEdit.GetProperties: TcxCurrencyEditProperties; -begin - Result := TcxCurrencyEditProperties(FProperties); -end; - -procedure TcxDBCurrencyEdit.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBCurrencyEdit.SetProperties(Value: TcxCurrencyEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBCurrencyEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBHyperLinkEdit } - -class function TcxDBHyperLinkEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxHyperLinkEditProperties; -end; - -class function TcxDBHyperLinkEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBHyperLinkEdit.GetActiveProperties: TcxHyperLinkEditProperties; -begin - Result := TcxHyperLinkEditProperties(InternalGetActiveProperties); -end; - -function TcxDBHyperLinkEdit.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBHyperLinkEdit.GetProperties: TcxHyperLinkEditProperties; -begin - Result := TcxHyperLinkEditProperties(FProperties); -end; - -procedure TcxDBHyperLinkEdit.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBHyperLinkEdit.SetProperties(Value: TcxHyperLinkEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBHyperLinkEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBImage } - -class function TcxDBImage.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxImageProperties; -end; - -class function TcxDBImage.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBEditDataBinding; -end; - -function TcxDBImage.GetActiveProperties: TcxImageProperties; -begin - Result := TcxImageProperties(InternalGetActiveProperties); -end; - -function TcxDBImage.GetDataBinding: TcxDBEditDataBinding; -begin - Result := TcxDBEditDataBinding(FDataBinding); -end; - -function TcxDBImage.GetProperties: TcxImageProperties; -begin - Result := TcxImageProperties(FProperties); -end; - -procedure TcxDBImage.SetDataBinding(Value: TcxDBEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBImage.SetProperties(Value: TcxImageProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBImage.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBImageComboBox } - -class function TcxDBImageComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxImageComboBoxProperties; -end; - -class function TcxDBImageComboBox.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBImageComboBox.GetActiveProperties: TcxImageComboBoxProperties; -begin - Result := TcxImageComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxDBImageComboBox.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBImageComboBox.GetProperties: TcxImageComboBoxProperties; -begin - Result := TcxImageComboBoxProperties(FProperties); -end; - -procedure TcxDBImageComboBox.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBImageComboBox.SetProperties(Value: TcxImageComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBImageComboBox.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBMRUEdit } - -class function TcxDBMRUEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxMRUEditProperties; -end; - -class function TcxDBMRUEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBMRUEdit.GetActiveProperties: TcxMRUEditProperties; -begin - Result := TcxMRUEditProperties(InternalGetActiveProperties); -end; - -function TcxDBMRUEdit.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBMRUEdit.GetProperties: TcxMRUEditProperties; -begin - Result := TcxMRUEditProperties(FProperties); -end; - -procedure TcxDBMRUEdit.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBMRUEdit.SetProperties(Value: TcxMRUEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBMRUEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBRadioGroupButton } - -constructor TcxDBRadioGroupButton.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ControlStyle := ControlStyle + [csReplicatable]; -end; - -procedure TcxDBRadioGroupButton.CMGetDataLink(var Message: TMessage); -begin - RadioGroup.Perform(Message.Msg, Message.WParam, Message.LParam); -end; - -{ TcxDBRadioGroup } - -class function TcxDBRadioGroup.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxRadioGroupProperties; -end; - -function TcxDBRadioGroup.GetButtonInstance: TWinControl; -begin - Result := TcxDBRadioGroupButton.Create(Self); -end; - -class function TcxDBRadioGroup.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBEditDataBinding; -end; - -function TcxDBRadioGroup.GetActiveProperties: TcxRadioGroupProperties; -begin - Result := TcxRadioGroupProperties(InternalGetActiveProperties); -end; - -function TcxDBRadioGroup.GetDataBinding: TcxDBEditDataBinding; -begin - Result := TcxDBEditDataBinding(FDataBinding); -end; - -function TcxDBRadioGroup.GetProperties: TcxRadioGroupProperties; -begin - Result := TcxRadioGroupProperties(FProperties); -end; - -procedure TcxDBRadioGroup.SetDataBinding(Value: TcxDBEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBRadioGroup.SetProperties(Value: TcxRadioGroupProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBRadioGroup.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBListBox } - -function TcxDBListBox.GetDataBindingClass: TcxCustomDataBindingClass; -begin - Result := TcxDBDataBinding; -end; - -function TcxDBListBox.GetDataBinding: TcxDBDataBinding; -begin - Result := TcxDBDataBinding(FDataBinding); -end; - -procedure TcxDBListBox.SetDataBinding(Value: TcxDBDataBinding); -begin - FDataBinding.Assign(Value); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBEditRepository.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBEditRepository.pas deleted file mode 100644 index 79bbfd3f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBEditRepository.pas +++ /dev/null @@ -1,81 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBEditRepository; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, ComCtrls, Classes, SysUtils, Graphics, Controls, StdCtrls, - Forms, cxEdit, cxDBLookupComboBox; - -type - { TcxEditRepositoryLookupComboBoxItem } - - TcxEditRepositoryLookupComboBoxItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxLookupComboBoxProperties; - procedure SetProperties(Value: TcxLookupComboBoxProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxLookupComboBoxProperties read GetProperties write SetProperties; - end; - -implementation - -{ TcxEditRepositoryLookupComboBoxItem } - -class function TcxEditRepositoryLookupComboBoxItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxLookupComboBoxProperties; -end; - -function TcxEditRepositoryLookupComboBoxItem.GetProperties: TcxLookupComboBoxProperties; -begin - Result := inherited Properties as TcxLookupComboBoxProperties; -end; - -procedure TcxEditRepositoryLookupComboBoxItem.SetProperties(Value: TcxLookupComboBoxProperties); -begin - inherited Properties := Value; -end; - -initialization - RegisterClasses([TcxEditRepositoryLookupComboBoxItem]); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBFilterControl.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBFilterControl.pas deleted file mode 100644 index fdb1ddb9..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBFilterControl.pas +++ /dev/null @@ -1,923 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressFilterControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxDBFilterControl; - -{$I cxVer.inc} - -interface - -uses - Classes, Graphics, cxClasses, cxEdit, cxFilter, cxDataStorage, cxLookAndFeels, - cxFilterControl, cxFilterControlUtils, DB; - -type - TcxDBFilterControl = class; - - { TcxFilterItem } - - TcxFilterItem = class(TcxInterfacedCollectionItem, IcxEditRepositoryItemListener) - private - FOwnerInterface: IUnknown; - FFilterControl: TcxDBFilterControl; - FCaption: string; - FFieldName: string; - FProperties: TcxCustomEditProperties; - FRepositoryItem: TcxEditRepositoryItem; - FPropertiesClass: TcxCustomEditPropertiesClass; - procedure DoPropertiesChanged(Sender: TObject); - function GetPropertiesClassName: string; - function IsCaptionStored: Boolean; - procedure RecreateProperties; - procedure SetCaption(const Value: string); - procedure SetFieldName(const Value: string); - procedure SetProperties(const Value: TcxCustomEditProperties); - procedure SetPropertiesClass(const Value: TcxCustomEditPropertiesClass); - procedure SetPropertiesClassName(const Value: string); - procedure SetRepositoryItem(const Value: TcxEditRepositoryItem); - protected - // IcxEditRepositoryItemListener - procedure ItemRemoved(Sender: TcxEditRepositoryItem); - procedure PropertiesChanged(Sender: TcxEditRepositoryItem); - // overrided methods - function GetDisplayName: string; override; - procedure CreateProperties; virtual; - procedure DestroyProperties; virtual; - public - constructor Create(Collection: TCollection); override; - destructor Destroy; override; - procedure AfterConstruction; override; - function GetProperties: TcxCustomEditProperties; - - property FilterControl: TcxDBFilterControl read FFilterControl; - property PropertiesClass: TcxCustomEditPropertiesClass read FPropertiesClass write SetPropertiesClass; - published - property Caption: string read FCaption write SetCaption stored IsCaptionStored; - property FieldName: string read FFieldName write SetFieldName; - property PropertiesClassName: string read GetPropertiesClassName write SetPropertiesClassName; - property Properties: TcxCustomEditProperties read FProperties write SetProperties; - property RepositoryItem: TcxEditRepositoryItem read FRepositoryItem write SetRepositoryItem; - end; - - { TcxFilterPropertiesList } - - TcxFilterPropertiesList = class(TList) - public - procedure Clear; override; - function GetProperties(AClass: TcxCustomEditPropertiesClass): TcxCustomEditProperties; - end; - - { TcxFilterItemCollection } - - TcxFilterItemCollection = class(TOwnedCollection) - private - function GetControl: TcxDBFilterControl; - function GetItems(Index: Integer): TcxFilterItem; - procedure SetItems(Index: Integer; const Value: TcxFilterItem); - protected - procedure Update(Item: TCollectionItem); override; - public - property Control: TcxDBFilterControl read GetControl; - property Items[Index: Integer]: TcxFilterItem read GetItems write SetItems; default; - end; - - { TcxDBFilterOptions } - - TcxDBFilterOptions = class(TPersistent) - private - FFilterControl: TcxDBFilterControl; - FSupportedBetween: Boolean; - FSupportedIn: Boolean; - FSupportedLike: Boolean; - function GetDateTimeFormat: string; - function GetPercentWildcard: Char; - function GetSoftNull: Boolean; - function GetTranslateBetween: Boolean; - function GetTranslateIn: Boolean; - function GetTranslateLike: Boolean; - function GetUnderscoreWildcard: Char; - procedure SetDateTimeFormat(const Value: string); - procedure SetPercentWildcard(Value: Char); - procedure SetSoftNull(Value: Boolean); - procedure SetTranslateBetween(Value: Boolean); - procedure SetTranslateIn(Value: Boolean); - procedure SetTranslateLike(Value: Boolean); - procedure SetUnderscoreWildcard(Value: Char); - protected - function GetOwner: TPersistent; override; - public - constructor Create(AFilterControl: TcxDBFilterControl); virtual; - procedure Assign(Source: TPersistent); override; - procedure ProcessFilterOperators(var SupportedOperations: TcxFilterControlOperators); - published - property DateTimeFormat: string read GetDateTimeFormat write SetDateTimeFormat; - property PercentWildcard: Char read GetPercentWildcard write SetPercentWildcard default '%'; - property SoftNull: Boolean read GetSoftNull write SetSoftNull default False; - property SupportedBetween: Boolean read FSupportedBetween write FSupportedBetween default True; - property SupportedIn: Boolean read FSupportedIn write FSupportedIn default True; - property SupportedLike: Boolean read FSupportedLike write FSupportedLike default True; - property TranslateBetween: Boolean read GetTranslateBetween write SetTranslateBetween default False; - property TranslateIn: Boolean read GetTranslateIn write SetTranslateIn default False; - property TranslateLike: Boolean read GetTranslateLike write SetTranslateLike default False; - property UnderscoreWildcard: Char read GetUnderscoreWildcard write SetUnderscoreWildcard default '_'; - end; - - { TcxDBFilterControl } - - TcxDBFilterControl = class(TcxCustomFilterControl, IcxFilterControl, - IcxFilterControlDialog) - private - FApplyingFilter: Boolean; - FDataSource: TDataSource; - FDataSet: TDataSet; - FFieldNamePostfix: string; - FFieldNamePrefix: string; - FFieldsProperties: TcxFilterPropertiesList; - FFilterOptions: TcxDBFilterOptions; - FItems: TcxFilterItemCollection; - {$IFDEF CBUILDER6} - function GetDataSet: TDataSet; - function GetItems: TcxFilterItemCollection; - {$ENDIF} - function GetField(AIndex: Integer): TField; - function GetFilterOptions: TcxDBFilterOptions; - procedure DataSetStateChange(Sender: TObject); - procedure SetDataSet(const Value: TDataSet); - procedure SetFilterOptions(Value: TcxDBFilterOptions); - procedure SetItems(Value: TcxFilterItemCollection); - protected - // IcxFilterControl - function GetCaption(Index: Integer): string; - function GetCount: Integer; - function GetCriteria: TcxFilterCriteria; - function GetItemLink(Index: Integer): TObject; - function GetItemLinkID(Index: Integer): Integer; - function GetItemLinkName(Index: Integer): string; - function GetFieldName(Index: Integer): string; - function GetProperties(Index: Integer): TcxCustomEditProperties; - function GetValueType(Index: Integer): TcxValueTypeClass; - //IcxFilterControlDialog - procedure SetDialogLinkComponent(ALink: TComponent); - // overrided VCL - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - // overrided TcxCustomFilterControl - procedure CorrectOperatorClass(var AOperatorClass: TcxFilterOperatorClass); override; - procedure DoApplyFilter; override; - procedure ValidateConditions(var SupportedOperations: TcxFilterControlOperators); override; - function GetFilterLink: IcxFilterControl; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure BuildFromCriteria; override; - procedure Clear; override; - function GetFilterTextEx(const AFieldNamePrefix, AFieldNamePostfix: string): string; - function GetPropertiesClassFromFieldType(AFieldType: TFieldType): TcxCustomEditPropertiesClass; virtual; - - property Criteria; - property DataSource: TDataSource read FDataSource; - published - property Align; - property Anchors; - property Color; - {$IFDEF CBUILDER6} - property DataSet: TDataSet read GetDataSet write SetDataSet; - property Items: TcxFilterItemCollection read GetItems write SetItems; - {$ELSE} - property DataSet: TDataSet read FDataSet write SetDataSet; - property Items: TcxFilterItemCollection read FItems write SetItems; - {$ENDIF} - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property FilterOptions: TcxDBFilterOptions read GetFilterOptions write SetFilterOptions; - property Font; - property FontBoolOperator; - property FontCondition; - property FontItem; - property FontValue; - property HelpContext; - {$IFDEF DELPHI6} - property HelpKeyword; - property HelpType; - {$ENDIF} - property Hint; - property HotTrackOnUnfocused; - property LookAndFeel; - property NullString; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ShowHint; - property ShowLevelLines; - property SortItems; - property TabOrder; - property TabStop; - property Visible; - property WantTabs; - property OnApplyFilter; - property OnClick; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -function ExecuteDBFilterControlDialog(ADataSet: TDataSet; - ALookAndFeel: TcxLookAndFeel; AOnApplyProc: TNotifyEvent = nil; - AOnShowDialog: TNotifyEvent = nil; AColor: TColor = clDefault; - const AInitialDir: string = ''): Boolean; - -implementation - -uses - SysUtils, cxDBFilter, cxDBData, cxCalc, cxCalendar, cxTextEdit, -{$IFNDEF DELPHI5} - cxClasses, -{$ENDIF} - cxSpinEdit, cxCheckBox, cxCurrencyEdit, cxTimeEdit, cxFilterControlDialog; - -function ExecuteDBFilterControlDialog(ADataSet: TDataSet; - ALookAndFeel: TcxLookAndFeel; AOnApplyProc: TNotifyEvent = nil; - AOnShowDialog: TNotifyEvent = nil; AColor: TColor = clDefault; - const AInitialDir: string = ''): Boolean; -begin - Result := cxInternalExecuteFilterControlDialog(TcxDBFilterControl, ADataSet, - ALookAndFeel, AOnApplyProc, AOnShowDialog, AColor, AInitialDir); -end; - -{ TcxFilterItem } - -constructor TcxFilterItem.Create(Collection: TCollection); -begin - inherited Create(Collection); - FFilterControl := TcxFilterItemCollection(Collection).Control; -end; - -destructor TcxFilterItem.Destroy; -begin - RepositoryItem := nil; - DestroyProperties; - inherited Destroy; -end; - -procedure TcxFilterItem.AfterConstruction; -begin - inherited; - if GetOwner <> nil then - GetOwner.GetInterface(IUnknown, FOwnerInterface); -end; - -function TcxFilterItem.GetProperties: TcxCustomEditProperties; -begin - if FRepositoryItem = nil then - Result := FProperties - else - Result := FRepositoryItem.Properties; -end; - -procedure TcxFilterItem.ItemRemoved(Sender: TcxEditRepositoryItem); -begin - RepositoryItem := nil; - PropertiesChanged(Sender); -end; - -procedure TcxFilterItem.PropertiesChanged(Sender: TcxEditRepositoryItem); -begin - with FilterControl do - if (ComponentState * [csLoading, csDestroying, csDesigning]) = [] then - RefreshProperties; -end; - -function TcxFilterItem.GetDisplayName: string; -begin - if FCaption <> '' then - Result := FCaption - else - if FieldName <> '' then - Result := FieldName - else - if GetProperties <> nil then - Result := GetProperties.ClassName - else - Result := ClassName -end; - -procedure TcxFilterItem.CreateProperties; -begin - if FPropertiesClass <> nil then - begin - FProperties := FPropertiesClass.Create(Self); - FProperties.OnPropertiesChanged := DoPropertiesChanged; - end; -end; - -procedure TcxFilterItem.DestroyProperties; -begin - FreeAndNil(FProperties); -end; - -procedure TcxFilterItem.DoPropertiesChanged(Sender: TObject); -begin - PropertiesChanged(nil); -end; - -function TcxFilterItem.GetPropertiesClassName: string; -begin - if FProperties = nil then - Result := '' - else - Result := FProperties.ClassName; -end; - -function TcxFilterItem.IsCaptionStored: Boolean; -begin - Result := (FCaption <> '') and (FCaption <> FFieldName); -end; - -procedure TcxFilterItem.RecreateProperties; -begin - DestroyProperties; - CreateProperties; -end; - -procedure TcxFilterItem.SetCaption(const Value: string); -begin - if FCaption <> Value then - begin - FCaption := Value; - Changed(False); - end; -end; - -procedure TcxFilterItem.SetFieldName(const Value: string); -begin - if FFieldName <> Value then - begin - if FFieldName = FCaption then - FCaption := Value; - FFieldName := Value; - Changed(False); - end; -end; - -procedure TcxFilterItem.SetProperties(const Value: TcxCustomEditProperties); -begin - if (Value <> nil) and (esoFiltering in Value.GetSupportedOperations) then - FProperties.Assign(Value); -end; - -procedure TcxFilterItem.SetPropertiesClass( - const Value: TcxCustomEditPropertiesClass); -begin - if (FPropertiesClass <> Value) and ((Value = nil) or IsSupportFiltering(Value)) then - begin - FPropertiesClass := Value; - RecreateProperties; - PropertiesChanged(nil); - end; -end; - -procedure TcxFilterItem.SetPropertiesClassName(const Value: string); -var - APropertiesClass: TcxCustomEditPropertiesClass; -begin - APropertiesClass := - TcxCustomEditPropertiesClass(GetRegisteredEditProperties.FindByClassName(Value)); - if (APropertiesClass = nil) or IsSupportFiltering(APropertiesClass) then - PropertiesClass := APropertiesClass; -end; - -procedure TcxFilterItem.SetRepositoryItem( - const Value: TcxEditRepositoryItem); -begin - if FRepositoryItem <> Value then - begin - if (Value <> nil) and - not (esoFiltering in Value.Properties.GetSupportedOperations) then Exit; - if FRepositoryItem <> nil then - FRepositoryItem.RemoveListener(Self); - FRepositoryItem := Value; - if FRepositoryItem <> nil then - FRepositoryItem.AddListener(Self); - PropertiesChanged(nil); - end; -end; - -{ TcxFilterItemCollection } - -procedure TcxFilterItemCollection.Update(Item: TCollectionItem); -begin - if (UpdateCount = 0) and (Control.ComponentState * [csDestroying, csLoading] = []) then - Control.LayoutChanged; -end; - -function TcxFilterItemCollection.GetControl: TcxDBFilterControl; -begin - if GetOwner is TcxDBFilterControl then - Result := TcxDBFilterControl(GetOwner) - else - Result := nil; -end; - -function TcxFilterItemCollection.GetItems(Index: Integer): TcxFilterItem; -begin - Result := TcxFilterItem(inherited Items[Index]) -end; - -procedure TcxFilterItemCollection.SetItems(Index: Integer; - const Value: TcxFilterItem); -begin - inherited Items[Index] := Value; -end; - -{ TcxFilterPropertiesList } - -procedure TcxFilterPropertiesList.Clear; -var - I: Integer; -begin - for I := 0 to Count - 1 do - TcxCustomEditProperties(Items[I]).Free; - inherited Clear; -end; - -function TcxFilterPropertiesList.GetProperties( - AClass: TcxCustomEditPropertiesClass): TcxCustomEditProperties; -var - I: Integer; -begin - Result := nil; - if AClass = nil then Exit; - for I := 0 to Count - 1 do - if TcxCustomEditProperties(Items[I]).ClassType = AClass then - begin - Result := TcxCustomEditProperties(Items[I]); - break - end; - if Result = nil then - begin - Result := AClass.Create(nil); - Add(Result); - end; -end; - -{ TcxDBFilterOptions } - -constructor TcxDBFilterOptions.Create(AFilterControl: TcxDBFilterControl); -begin - FFilterControl := AFilterControl; - FSupportedBetween := True; - FSupportedIn := True; - FSupportedLike := True; -end; - -procedure TcxDBFilterOptions.Assign(Source: TPersistent); -begin - if Source is TcxDBFilterOptions then - with TcxDBFilterOptions(Source) do - begin - Self.DateTimeFormat := DateTimeFormat; - Self.PercentWildcard := PercentWildcard; - Self.SoftNull := SoftNull; - Self.SupportedBetween := SupportedBetween; - Self.SupportedIn := SupportedIn; - Self.SupportedLike := SupportedLike; - Self.TranslateBetween := TranslateBetween; - Self.TranslateIn := TranslateIn; - Self.TranslateLike := TranslateLike; - Self.UnderscoreWildcard := UnderscoreWildcard; - end; -end; - -procedure TcxDBFilterOptions.ProcessFilterOperators( - var SupportedOperations: TcxFilterControlOperators); -begin - if not SupportedBetween then - SupportedOperations := SupportedOperations - [fcoBetween, fcoNotBetween]; - if not SupportedIn then - SupportedOperations := SupportedOperations - [fcoInList, fcoNotInList]; - if not SupportedLike then - SupportedOperations := SupportedOperations - [fcoLike, fcoNotLike]; -end; - -function TcxDBFilterOptions.GetOwner: TPersistent; -begin - Result := FFilterControl; -end; - -function TcxDBFilterOptions.GetDateTimeFormat: string; -begin - Result := FFilterControl.Criteria.DateTimeFormat; -end; - -function TcxDBFilterOptions.GetPercentWildcard: Char; -begin - Result := FFilterControl.Criteria.PercentWildcard; -end; - -function TcxDBFilterOptions.GetSoftNull: Boolean; -begin - Result := fcoSoftNull in FFilterControl.Criteria.Options; -end; - -function TcxDBFilterOptions.GetTranslateBetween: Boolean; -begin - Result := FFilterControl.Criteria.TranslateBetween; -end; - -function TcxDBFilterOptions.GetTranslateIn: Boolean; -begin - Result := FFilterControl.Criteria.TranslateIn; -end; - -function TcxDBFilterOptions.GetTranslateLike: Boolean; -begin - Result := FFilterControl.Criteria.TranslateLike; -end; - -function TcxDBFilterOptions.GetUnderscoreWildcard: Char; -begin - Result := FFilterControl.Criteria.UnderscoreWildcard; -end; - -procedure TcxDBFilterOptions.SetDateTimeFormat(const Value: string); -begin - FFilterControl.Criteria.DateTimeFormat := Value; -end; - -procedure TcxDBFilterOptions.SetPercentWildcard(Value: Char); -begin - FFilterControl.Criteria.PercentWildcard := Value; -end; - -procedure TcxDBFilterOptions.SetSoftNull(Value: Boolean); -begin - with FFilterControl.Criteria do - if Value then - Options := Options + [fcoSoftNull] - else - Options := Options - [fcoSoftNull]; -end; - -procedure TcxDBFilterOptions.SetTranslateBetween(Value: Boolean); -begin - FFilterControl.Criteria.TranslateBetween := Value; -end; - -procedure TcxDBFilterOptions.SetTranslateIn(Value: Boolean); -begin - FFilterControl.Criteria.TranslateIn := Value; -end; - -procedure TcxDBFilterOptions.SetTranslateLike(Value: Boolean); -begin - FFilterControl.Criteria.TranslateLike := Value; -end; - -procedure TcxDBFilterOptions.SetUnderscoreWildcard(Value: Char); -begin - FFilterControl.Criteria.UnderscoreWildcard := Value; -end; - -{ TcxDBFilterControl } - -constructor TcxDBFilterControl.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FFilterOptions := TcxDBFilterOptions.Create(Self); - FItems := TcxFilterItemCollection.Create(Self, TcxFilterItem); - FDataSource := TDataSource.Create(Self); - FDataSource.OnStateChange := DataSetStateChange; - FFieldsProperties := TcxFilterPropertiesList.Create; -end; - -destructor TcxDBFilterControl.Destroy; -begin - FreeAndNil(FDataSource); - FreeAndNil(FItems); - FreeAndNil(FFieldsProperties); - FreeAndNil(FFilterOptions); - inherited Destroy; -end; - -procedure TcxDBFilterControl.BuildFromCriteria; -begin - inherited; -end; - -procedure TcxDBFilterControl.Clear; -begin - inherited Clear; - FFieldsProperties.Clear; -end; - -function TcxDBFilterControl.GetFilterTextEx( - const AFieldNamePrefix, AFieldNamePostfix: string): string; -begin - FFieldNamePrefix := AFieldNamePrefix; - FFieldNamePostfix := AFieldNamePostfix; - try - Result := GetFilterText; - finally - FFieldNamePrefix := ''; - FFieldNamePostfix := ''; - end; -end; - -function TcxDBFilterControl.GetPropertiesClassFromFieldType( - AFieldType: TFieldType): TcxCustomEditPropertiesClass; -begin - case AFieldType of - ftString, ftWideString: - Result := TcxTextEditProperties; - ftSmallint, ftInteger, ftWord, ftAutoInc {$IFDEF DELPHI6}, ftLargeint {$ENDIF}: - Result := TcxSpinEditProperties; - ftBoolean: - Result := TcxCheckBoxProperties; - ftFloat: - Result := TcxCalcEditProperties; - ftCurrency, ftBCD: - Result := TcxCurrencyEditProperties; - ftDate, ftDateTime {$IFDEF DELPHI6}, ftTimeStamp {$ENDIF}: - Result := TcxDateEditProperties; - ftTime: - Result := TcxTimeEditProperties; - else - Result := nil; - end; -end; - -function TcxDBFilterControl.GetCaption(Index: Integer): string; -begin - if (Index > -1) and (Index < GetCount) then - if FItems.Count > 0 then - Result := FItems[Index].Caption - else - Result := GetField(Index).DisplayName - else - Result := ''; -end; - -function TcxDBFilterControl.GetCount: Integer; -var - I: Integer; -begin - if (FItems <> nil) and (FItems.Count > 0) then - Result := FItems.Count - else - if (FDataSet <> nil) and not (FDataSet.DefaultFields and (FDataSource.State = dsInactive)) then - begin - Result := 0; - with FDataSet do - for I := 0 to Fields.Count - 1 do - if Fields[I].Visible then Inc(Result); - end - else - Result := 0; -end; - -function TcxDBFilterControl.GetCriteria: TcxFilterCriteria; -begin - Result := inherited Criteria; -end; - -function TcxDBFilterControl.GetItemLink(Index: Integer): TObject; -begin - if (Index > -1) and (Index < GetCount) then - if FItems.Count > 0 then - Result := FItems[Index] - else - Result := GetField(Index) - else - Result := nil; -end; - -function TcxDBFilterControl.GetItemLinkID(Index: Integer): Integer; -begin - Result := Index; -end; - -function TcxDBFilterControl.GetItemLinkName(Index: Integer): string; -begin - Result := GetFieldName(Index); -end; - -function TcxDBFilterControl.GetFieldName(Index: Integer): string; -var - AField: TField; -begin - if (Index > -1) and (Index < GetCount) then - if FItems.Count > 0 then - Result := FItems[Index].FieldName - else - begin - AField := GetField(Index); - if AField.Origin <> '' then - Result := FFieldNamePrefix + AField.Origin + FFieldNamePostfix - else - Result := FFieldNamePrefix + AField.FieldName + FFieldNamePostfix; - end - else - Result := ''; -end; - -function TcxDBFilterControl.GetProperties(Index: Integer): TcxCustomEditProperties; -begin - if (Index > -1) and (Index < GetCount) then - if FItems.Count > 0 then - Result := FItems[Index].GetProperties - else - Result := FFieldsProperties.GetProperties( - GetPropertiesClassFromFieldType(GetField(Index).DataType)) - else - Result := nil; - if Result = nil then Result := GetDefaultProperties; -end; - -function TcxDBFilterControl.GetValueType(Index: Integer): TcxValueTypeClass; - - function TrimFieldName(const AFieldName: string): string; - begin - Result := AFieldName; - while (Length(Result) > 0) and - (AnsiChar(Result[1]) in [#0..' ', '"', '''', '[']) do - Delete(Result, 1, 1); - while (Length(Result) > 0) and - (AnsiChar(Result[Length(Result)]) in [#0..' ', '"', '''', ']']) do - Delete(Result, Length(Result), 1); - end; - -var - AField: TField; -begin - if (Index > -1) and (Index < GetCount) then - if FItems.Count > 0 then - begin - if (FDataSet <> nil) then - AField := FDataSet.FindField(TrimFieldName(FItems[Index].FieldName)) - else - AField := nil; - Result := GetValueTypeClassByField(AField); - end - else - Result := GetValueTypeClassByField(GetField(Index)) - else - Result := nil; -end; - -procedure TcxDBFilterControl.SetFilterOptions(Value: TcxDBFilterOptions); -begin - FFilterOptions.Assign(Value); -end; - -procedure TcxDBFilterControl.SetItems(Value: TcxFilterItemCollection); -begin - FItems.Assign(Value); -end; - -procedure TcxDBFilterControl.SetDialogLinkComponent(ALink: TComponent); -begin - if ALink = nil then - DataSet := nil - else - if ALink is TDataSet then DataSet := TDataSet(ALink); -end; - -procedure TcxDBFilterControl.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = FDataSet) then - DataSet := nil; -end; - -procedure TcxDBFilterControl.CorrectOperatorClass( - var AOperatorClass: TcxFilterOperatorClass); -var - AOperatorAdapter: TcxDBFilterOperatorAdapter; -begin - AOperatorAdapter := cxGetFilterOperatorAdapter(FDataSet); - if Assigned(AOperatorAdapter) then - AOperatorAdapter.PrepareOperatorClass(nil, FDataSet, AOperatorClass); -end; - -procedure TcxDBFilterControl.DoApplyFilter; -begin - FApplyingFilter := True; - try - inherited DoApplyFilter; - finally - FApplyingFilter := False; - end; -end; - -procedure TcxDBFilterControl.ValidateConditions( - var SupportedOperations: TcxFilterControlOperators); -begin - FilterOptions.ProcessFilterOperators(SupportedOperations); -end; - -function TcxDBFilterControl.GetFilterLink: IcxFilterControl; -begin - QueryInterface(IcxFilterControl, Result); -end; - -{$IFDEF CBUILDER6} -function TcxDBFilterControl.GetDataSet: TDataSet; -begin - Result := FDataSet; -end; - -function TcxDBFilterControl.GetItems: TcxFilterItemCollection; -begin - Result := FItems; -end; -{$ENDIF} - -function TcxDBFilterControl.GetField(AIndex: Integer): TField; -var - I, ATest: Integer; -begin - ATest := 0; - Result := nil; - with FDataSet do - for I := 0 to Fields.Count - 1 do - if Fields[I].Visible then - begin - if ATest = AIndex then - begin - Result := Fields[I]; - Exit; - end; - Inc(ATest); - end; -end; - -function TcxDBFilterControl.GetFilterOptions: TcxDBFilterOptions; -begin - Result := FFilterOptions; -end; - -procedure TcxDBFilterControl.DataSetStateChange(Sender: TObject); -begin - if not FApplyingFilter and (FDataSource.State in [dsInactive, dsBrowse]) then - LayoutChanged; -end; - -procedure TcxDBFilterControl.SetDataSet(const Value: TDataSet); -begin - if FDataSet <> Value then - begin - FDataSet := Value; - FDataSource.DataSet := Value; - Clear; - if Value <> nil then Value.FreeNotification(Self); - end; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBFontNameComboBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBFontNameComboBox.pas deleted file mode 100644 index 04e198aa..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBFontNameComboBox.pas +++ /dev/null @@ -1,160 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBFontNameComboBox; - -interface - -{$I cxVer.inc} - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, Dialogs, Forms, Graphics, Messages, StdCtrls, - SysUtils, cxControls, cxDBEdit, cxEdit, cxFontNameComboBox; - -type - { TcxDBFontNameComboBox } - - TcxDBFontNameComboBox = class(TcxCustomFontNameComboBox) - private - function GetActiveProperties: TcxFontNameComboBoxProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxFontNameComboBoxProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxFontNameComboBoxProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxFontNameComboBoxProperties - read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxFontNameComboBoxProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -{ TcxDBFontNameComboBox } - -class function TcxDBFontNameComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxFontNameComboBoxProperties; -end; - -class function TcxDBFontNameComboBox.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBFontNameComboBox.GetActiveProperties: TcxFontNameComboBoxProperties; -begin - Result := TcxFontNameComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxDBFontNameComboBox.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBFontNameComboBox.GetProperties: TcxFontNameComboBoxProperties; -begin - Result := TcxFontNameComboBoxProperties(FProperties); -end; - -procedure TcxDBFontNameComboBox.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBFontNameComboBox.SetProperties( - Value: TcxFontNameComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBFontNameComboBox.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBLabel.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBLabel.pas deleted file mode 100644 index 3ad15d58..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBLabel.pas +++ /dev/null @@ -1,180 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBLabel; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, DB, Dialogs, Forms, Graphics, Messages, StdCtrls, - SysUtils, cxControls, cxDBEdit, cxEdit, cxLabel; - -type - { TcxDBLabel } - - TcxDBLabel = class(TcxCustomLabel) - private - function GetActiveProperties: TcxLabelProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxLabelProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxLabelProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - procedure Initialize; override; - procedure SetEditAutoSize(Value: Boolean); override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxLabelProperties read GetActiveProperties; - published - property Align; - property Anchors; - property AutoSize default False; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxLabelProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnClick; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -uses -{$IFDEF DELPHI6} - VDBConsts; -{$ELSE} - DBConsts; -{$ENDIF} - -{ TcxDBLabel } - -class function TcxDBLabel.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxLabelProperties; -end; - -class function TcxDBLabel.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -procedure TcxDBLabel.Initialize; -begin - inherited Initialize; - AutoSize := False; -end; - -procedure TcxDBLabel.SetEditAutoSize(Value: Boolean); -begin - if Value and Assigned(DataBinding) and Assigned(DataBinding.DataLink) and - DataBinding.DataLink.DataSourceFixed then - DatabaseError(SDataSourceFixed); - inherited SetEditAutoSize(Value); -end; - -function TcxDBLabel.GetActiveProperties: TcxLabelProperties; -begin - Result := TcxLabelProperties(InternalGetActiveProperties); -end; - -function TcxDBLabel.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -function TcxDBLabel.GetProperties: TcxLabelProperties; -begin - Result := TcxLabelProperties(FProperties); -end; - -procedure TcxDBLabel.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBLabel.SetProperties(Value: TcxLabelProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBLabel.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBLookupComboBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBLookupComboBox.pas deleted file mode 100644 index 1d243347..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBLookupComboBox.pas +++ /dev/null @@ -1,653 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBLookupComboBox; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Messages, SysUtils, Classes, Controls, Graphics, DB, DBCtrls, - cxClasses, cxContainer, cxCustomData, cxDataStorage, cxDB, cxDBData, - cxLookAndFeels, cxEdit, cxDBEdit, cxEditConsts, cxDropDownEdit, - cxLookupEdit, cxDBLookupEdit, cxLookupGrid, cxLookupDBGrid, - cxFilterControlUtils; - -type - { TcxLookupComboBoxProperties } - - TcxLookupComboBoxProperties = class(TcxCustomDBLookupEditProperties) - private - FGrid: TcxCustomLookupDBGrid; - function GetGrid: TcxCustomLookupDBGrid; - function GetGridMode: Boolean; - function GetListColumns: TcxLookupDBGridColumns; - function GetListOptions: TcxLookupDBGridOptions; - function GetListSource: TDataSource; - function GetOnSortingChanged: TNotifyEvent; - procedure SetGridMode(Value: Boolean); - procedure SetListColumns(Value: TcxLookupDBGridColumns); - procedure SetListOptions(Value: TcxLookupDBGridOptions); - procedure SetListSource(Value: TDataSource); - procedure SetOnSortingChanged(Value: TNotifyEvent); - protected - function GetLookupGridClass: TcxCustomLookupDBGridClass; virtual; - procedure ListOptionsChanged(Sender: TObject); virtual; - // LookupGrid methods - function GetLookupGridColumnCount: Integer; override; - function GetLookupGridControl: TWinControl; override; - function GetLookupGridDataController: TcxCustomDataController; override; - function GetLookupGridVisualAreaPreferredWidth: Integer; override; - function GetLookupGridNearestPopupHeight(AHeight: Integer): Integer; override; - function GetLookupGridPopupHeight(ADropDownRowCount: Integer): Integer; override; - function IsLookupGridMouseOverList(const P: TPoint): Boolean; override; - procedure LookupGridInitEvents(AOnClick, AOnFocusedRowChanged: TNotifyEvent; - AOnCloseUp: cxLookupEdit.TcxLookupGridCloseUpEvent); override; - procedure LookupGridInitLookAndFeel(ALookAndFeel: TcxLookAndFeel; AColor: TColor; AFont: TFont); override; - procedure LookupGridLockMouseMove; override; - procedure LookupGridMakeFocusedRowVisible; override; - procedure LookupGridUnlockMouseMove; override; - // DBLookupGrid methods - procedure DBLookupGridBeginUpdate; override; - procedure DBLookupGridCheckColumnByFieldName(const AFieldName: string); override; - procedure DBLookupGridCreateColumnsByFieldNames(const AFieldNames: string); override; - procedure DBLookupGridEndUpdate; override; - function GetDBLookupGridColumnField(AIndex: Integer): TField; override; - function GetDBLookupGridColumnFieldName(AIndex: Integer): string; override; - function GetDBLookupGridColumnIndexByFieldName(const AFieldName: string): Integer; override; - function GetDBLookupGridDataController: TcxDBDataController; override; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - property Grid: TcxCustomLookupDBGrid read GetGrid; - published - property Alignment; - property AutoSelect; - property AssignedValues; - property ButtonGlyph; - property CaseSensitiveSearch; - property CharCase; - property ClearKey; - property DropDownAutoSize; - property DropDownHeight; - property DropDownListStyle; - property DropDownRows; - property DropDownSizeable; - property DropDownWidth; - property GridMode: Boolean read GetGridMode write SetGridMode default False; - property HideSelection; - property ImeMode; - property ImeName; - property ImmediateDropDown; - property ImmediatePost; - property IncrementalFiltering; - property KeyFieldNames; - property ListColumns: TcxLookupDBGridColumns read GetListColumns write SetListColumns; - property ListFieldNames; - property ListFieldIndex; - property ListOptions: TcxLookupDBGridOptions read GetListOptions write SetListOptions; - property ListSource: TDataSource read GetListSource write SetListSource; - property MaxLength; - property OEMConvert; - property PopupAlignment; - property PostPopupValueOnTab; - property ReadOnly; - property Revertable; - property UseLeftAlignmentOnEditing; - property ValidateOnEnter; - property OnChange; - property OnCloseUp; - property OnEditValueChanged; - property OnInitPopup; - property OnNewLookupDisplayText; - property OnPopup; - property OnSortingChanged: TNotifyEvent read GetOnSortingChanged write SetOnSortingChanged; - property OnValidate; - end; - - { TcxCustomLookupComboBox } - - TcxCustomLookupComboBox = class(TcxCustomDBLookupEdit) - private - function GetProperties: TcxLookupComboBoxProperties; - function GetActiveProperties: TcxLookupComboBoxProperties; - procedure SetProperties(Value: TcxLookupComboBoxProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxLookupComboBoxProperties - read GetActiveProperties; - property EditValue; - property Properties: TcxLookupComboBoxProperties read GetProperties - write SetProperties; - property Text; - end; - - { TcxLookupComboBox } - - TcxLookupComboBox = class(TcxCustomLookupComboBox) - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties; - property EditValue; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnEditing; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - end; - - { TcxDBLookupComboBox } - - TcxDBLookupComboBox = class(TcxCustomLookupComboBox) - private - function GetDataBinding: TcxDBTextEditDataBinding; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnEditing; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - end; - - { TcxFilterLookupComboBoxHelper } - - TcxFilterLookupComboBoxHelper = class(TcxFilterComboBoxHelper) - protected - class function IsIDefaultValuesProviderNeeded( - AEditProperties: TcxCustomEditProperties): Boolean; override; - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class procedure GetFilterValue(AEdit: TcxCustomEdit; AEditProperties: TcxCustomEditProperties; - var V: Variant; var S: TCaption); override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - class function IsValueValid(AValueTypeClass: TcxValueTypeClass; - var Value: Variant): Boolean; override; - end; - -implementation - -uses -{$IFDEF DELPHI6} - VDBConsts, -{$ENDIF} - DBConsts, cxTextEdit; - -type - TControlAccess = class(TControl); - -{ TcxLookupComboBoxProperties } - -constructor TcxLookupComboBoxProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FGrid := GetLookupGridClass.Create(nil); - FGrid.IsPopupControl := True; - FGrid.Options.OnChanged := ListOptionsChanged; - InitializeDataController; -end; - -destructor TcxLookupComboBoxProperties.Destroy; -begin - DeinitializeDataController; - FGrid.Free; - FGrid := nil; - inherited Destroy; -end; - -procedure TcxLookupComboBoxProperties.Assign(Source: TPersistent); -begin - if Source is TcxLookupComboBoxProperties then - begin - BeginUpdate; - try - GridMode := TcxLookupComboBoxProperties(Source).GridMode; - ListOptions := TcxLookupComboBoxProperties(Source).ListOptions; - if not IsDefinedByLookup then - begin - ListSource := TcxLookupComboBoxProperties(Source).ListSource; - ListColumns := TcxLookupComboBoxProperties(Source).ListColumns; - end; - OnSortingChanged := TcxLookupComboBoxProperties(Source).OnSortingChanged; - inherited Assign(Source); - if IsDefinedByLookup then - ListColumns := TcxLookupComboBoxProperties(Source).ListColumns; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -class function TcxLookupComboBoxProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxLookupComboBox; -end; - -function TcxLookupComboBoxProperties.GetLookupGridClass: TcxCustomLookupDBGridClass; -begin - Result := TcxCustomLookupDBGrid; -end; - -procedure TcxLookupComboBoxProperties.ListOptionsChanged(Sender: TObject); -begin - Changed; -end; - -// LookupGrid - -function TcxLookupComboBoxProperties.GetLookupGridColumnCount: Integer; -begin - Result := ListColumns.Count; -end; - -function TcxLookupComboBoxProperties.GetLookupGridControl: TWinControl; -begin - Result := Grid; -end; - -function TcxLookupComboBoxProperties.GetLookupGridDataController: TcxCustomDataController; -begin - Result := Grid.DataController; -end; - -function TcxLookupComboBoxProperties.GetLookupGridVisualAreaPreferredWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ListColumns.Count - 1 do - Inc(Result, ListColumns[I].Width); -end; - -function TcxLookupComboBoxProperties.GetLookupGridNearestPopupHeight( - AHeight: Integer): Integer; -begin - Result := Grid.GetNearestPopupHeight(AHeight); -end; - -function TcxLookupComboBoxProperties.GetLookupGridPopupHeight(ADropDownRowCount: Integer): Integer; -begin - Result := Grid.GetPopupHeight(ADropDownRowCount); -end; - -function TcxLookupComboBoxProperties.IsLookupGridMouseOverList(const P: TPoint): Boolean; -begin - Result := Grid.IsMouseOverList(P); -end; - -procedure TcxLookupComboBoxProperties.LookupGridInitEvents(AOnClick, AOnFocusedRowChanged: TNotifyEvent; - AOnCloseUp: cxLookupEdit.TcxLookupGridCloseUpEvent); -begin - Grid.OnClick := AOnClick; - Grid.OnFocusedRowChanged := AOnFocusedRowChanged; - Grid.OnCloseUp := AOnCloseUp; -end; - -procedure TcxLookupComboBoxProperties.LookupGridInitLookAndFeel(ALookAndFeel: TcxLookAndFeel; - AColor: TColor; AFont: TFont); -begin - Grid.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - Grid.Color := AColor; - Grid.Font := AFont; -end; - -procedure TcxLookupComboBoxProperties.LookupGridLockMouseMove; -begin - Grid.LockPopupMouseMove; -end; - -procedure TcxLookupComboBoxProperties.LookupGridMakeFocusedRowVisible; -begin - Grid.MakeFocusedRowVisible; -end; - -procedure TcxLookupComboBoxProperties.LookupGridUnlockMouseMove; -begin - TControlAccess(Grid).MouseCapture := False; -end; - -// DBLookupGrid - -procedure TcxLookupComboBoxProperties.DBLookupGridBeginUpdate; -begin - Grid.BeginUpdate; -end; - -procedure TcxLookupComboBoxProperties.DBLookupGridCheckColumnByFieldName(const AFieldName: string); -begin - if (AFieldName <> '') and (ListColumns.ColumnByFieldName(AFieldName) = nil) then - with ListColumns.Add do - begin - FieldName := AFieldName; - Index := 0; - end; -end; - -procedure TcxLookupComboBoxProperties.DBLookupGridCreateColumnsByFieldNames(const AFieldNames: string); -begin - Grid.CreateColumnsByFieldNames(AFieldNames); -end; - -procedure TcxLookupComboBoxProperties.DBLookupGridEndUpdate; -begin - Grid.EndUpdate; -end; - -function TcxLookupComboBoxProperties.GetDBLookupGridColumnField(AIndex: Integer): TField; -begin - Result := ListColumns[AIndex].Field; -end; - -function TcxLookupComboBoxProperties.GetDBLookupGridColumnFieldName(AIndex: Integer): string; -begin - Result := ListColumns[AIndex].FieldName; -end; - -function TcxLookupComboBoxProperties.GetDBLookupGridColumnIndexByFieldName(const AFieldName: string): Integer; -var - AColumn: TcxLookupDBGridColumn; -begin - AColumn := ListColumns.ColumnByFieldName(AFieldName); - if AColumn <> nil then - Result := AColumn.Index - else - Result := -1; -end; - -function TcxLookupComboBoxProperties.GetDBLookupGridDataController: TcxDBDataController; -begin - if Grid <> nil then - Result := Grid.DataController - else - Result := nil; -end; - -function TcxLookupComboBoxProperties.GetGrid: TcxCustomLookupDBGrid; -begin - Result := FGrid; -end; - -function TcxLookupComboBoxProperties.GetGridMode: Boolean; -begin - Result := inherited IsUseLookupList; -end; - -function TcxLookupComboBoxProperties.GetListColumns: TcxLookupDBGridColumns; -begin - Result := Grid.Columns; -end; - -function TcxLookupComboBoxProperties.GetListOptions: TcxLookupDBGridOptions; -begin - Result := Grid.Options; -end; - -function TcxLookupComboBoxProperties.GetListSource: TDataSource; -begin - if IsDefinedByLookup then - Result := nil - else - Result := Grid.DataSource; -end; - -function TcxLookupComboBoxProperties.GetOnSortingChanged: TNotifyEvent; -begin - Result := Grid.DataController.OnSortingChanged; -end; - -procedure TcxLookupComboBoxProperties.SetGridMode(Value: Boolean); -begin - inherited IsUseLookupList := Value; -end; - -procedure TcxLookupComboBoxProperties.SetListColumns(Value: TcxLookupDBGridColumns); -begin - Grid.Columns := Value; // TODO: recreate? - CheckLookupColumn; - CheckDisplayColumnIndex; -end; - -procedure TcxLookupComboBoxProperties.SetListOptions(Value: TcxLookupDBGridOptions); -begin - Grid.Options := Value; -end; - -procedure TcxLookupComboBoxProperties.SetListSource(Value: TDataSource); - - procedure CheckListSource(ADataSource: TDataSource); - var - AField: TField; - begin - AField := GetDataField; - if Assigned(AField) and Assigned(ADataSource) and -// AField.DataSet.IsLinkedTo(ADataSource) then - IsLinkedToDataSet(ADataSource, AField.DataSet) then - DatabaseError(SCircularDataLink); - end; - -begin - if IsDefinedByLookup and not InSyncLookup then - DefineByLookupError; - if Value <> nil then - CheckListSource(Value); - Grid.DataSource := Value; - Changed; -end; - -procedure TcxLookupComboBoxProperties.SetOnSortingChanged(Value: TNotifyEvent); -begin - Grid.DataController.OnSortingChanged := Value; -end; - -{ TcxCustomLookupComboBox } - -class function TcxCustomLookupComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxLookupComboBoxProperties; -end; - -function TcxCustomLookupComboBox.GetProperties: TcxLookupComboBoxProperties; -begin - Result := TcxLookupComboBoxProperties(FProperties); -end; - -function TcxCustomLookupComboBox.GetActiveProperties: TcxLookupComboBoxProperties; -begin - Result := TcxLookupComboBoxProperties(InternalGetActiveProperties); -end; - -procedure TcxCustomLookupComboBox.SetProperties(Value: TcxLookupComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxDBLookupComboBox } - -class function TcxDBLookupComboBox.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBLookupEditDataBinding; -end; - -function TcxDBLookupComboBox.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -procedure TcxDBLookupComboBox.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBLookupComboBox.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxFilterLookupComboBoxHelper } - -class function TcxFilterLookupComboBoxHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxLookupComboBox; -end; - -class procedure TcxFilterLookupComboBoxHelper.GetFilterValue(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties; var V: Variant; var S: TCaption); -begin - V := AEdit.EditValue; - S := TcxCustomTextEdit(AEdit).ILookupData.GetDisplayText(V); -end; - -class function TcxFilterLookupComboBoxHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoBlanks, fcoNonBlanks]; -end; - -class procedure TcxFilterLookupComboBoxHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - with TcxCustomLookupEditProperties(AProperties) do - begin - DropDownAutoSize := True; - DropDownListStyle := lsFixedList; - DropDownSizeable := True; - IncrementalFiltering := True; - end; -end; - -class function TcxFilterLookupComboBoxHelper.IsValueValid(AValueTypeClass: TcxValueTypeClass; - var Value: Variant): Boolean; -begin - Result := True; -end; - -class function TcxFilterLookupComboBoxHelper.IsIDefaultValuesProviderNeeded( - AEditProperties: TcxCustomEditProperties): Boolean; -begin - Result := TcxCustomDBLookupEditProperties(AEditProperties).IsDefinedByLookup; -end; - -initialization - GetRegisteredEditProperties.Register(TcxLookupComboBoxProperties, scxSEditRepositoryLookupComboBoxItem); - FilterEditsController.Register(TcxLookupComboBoxProperties, TcxFilterLookupComboBoxHelper); - -finalization - FilterEditsController.Unregister(TcxLookupComboBoxProperties, TcxFilterLookupComboBoxHelper); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBLookupEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBLookupEdit.pas deleted file mode 100644 index 4aac0061..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBLookupEdit.pas +++ /dev/null @@ -1,870 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBLookupEdit; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Messages, Controls, - SysUtils, Classes, DB, - cxClasses, cxContainer, cxEdit, cxDBEdit, cxEditConsts, - cxDB, cxDataUtils, cxDataStorage, cxCustomData, cxDBData, cxDropDownEdit, cxLookupEdit; - -type - TcxCustomDBLookupEditProperties = class; - - { TcxCustomDBLookupEditLookupData } - - TcxCustomDBLookupEditLookupData = class(TcxCustomLookupEditLookupData) - private - function GetDataController: TcxDBDataController; - function GetProperties: TcxCustomDBLookupEditProperties; - protected - procedure DoSetCurrentKey(ARecordIndex: Integer); override; - procedure DoSyncGrid; override; - property DataController: TcxDBDataController read GetDataController; - property Properties: TcxCustomDBLookupEditProperties read GetProperties; - end; - - { TcxCustomDBLookupEditProperties } - - TcxCustomDBLookupEditProperties = class(TcxCustomLookupEditProperties) - private - FCachedLookupSource: TDataSource; - FCaseSensitiveSearch: Boolean; - FLockGridModeCount: Integer; - FLookupField: TField; - FLookupList: TcxLookupList; - FLookupSource: TDataSource; - FLookupSourceFreeNotificator: TcxFreeNotificator; - FSyncLookup: Boolean; - function GetIsUseLookupList: Boolean; - function GetKeyFieldNames: string; - function GetListField: TField; - function GetListFieldIndex: Integer; - function GetListFieldNames: string; - procedure SetIsUseLookupList(Value: Boolean); - procedure SetKeyFieldNames(const Value: string); - procedure SetListFieldIndex(Value: Integer); - procedure SetListFieldNames(const Value: string); - protected - // DBLookupGrid methods - procedure DBLookupGridBeginUpdate; virtual; - procedure DBLookupGridCheckColumnByFieldName(const AFieldName: string); virtual; // if a column does not exist, then create it with zero index - procedure DBLookupGridCreateColumnsByFieldNames(const AFieldNames: string); virtual; - procedure DBLookupGridEndUpdate; virtual; - function GetDBLookupGridColumnField(AIndex: Integer): TField; virtual; - function GetDBLookupGridColumnFieldName(AIndex: Integer): string; virtual; - function GetDBLookupGridColumnIndexByFieldName(const AFieldName: string): Integer; virtual; - function GetDBLookupGridDataController: TcxDBDataController; virtual; - - function CanDisplayArbitraryEditValue: Boolean; - procedure CheckLookup; virtual; - procedure CheckLookupColumn; virtual; - procedure CheckLookupList; - procedure DefaultValuesProviderDestroyed; override; - procedure DefineByLookupError; - procedure DoChanged; override; - function FindByText(AItemIndex: Integer; const AText: string; APartialCompare: Boolean): Integer; override; - function GetDisplayColumnIndex: Integer; override; - function GetDisplayLookupText(const AKey: TcxEditValue): string; override; - function GetDefaultHorzAlignment: TAlignment; override; - function GetDefaultMaxLength: Integer; override; - function GetIncrementalFiltering: Boolean; override; - function GetKeyByRecordIndex(ARecordIndex: Integer): Variant; - class function GetLookupDataClass: TcxInterfacedPersistentClass; override; - function GetLookupResultFieldName: string; - function GetNullKey: Variant; override; - function GetRecordIndexByKey(const AKey: Variant): Integer; - function IsPickMode: Boolean; override; - procedure LockDataChanged; override; - procedure LookupSourceFreeNotification(Sender: TComponent); virtual; - procedure SetDisplayColumnIndex(Value: Integer); override; - procedure SetLookupField(ALookupField: TField); - procedure UnlockDataChanged; override; - property InSyncLookup: Boolean read FSyncLookup; - property IsUseLookupList: Boolean read GetIsUseLookupList write SetIsUseLookupList; - public - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - function GetDataField: TField; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function GetLookupField: TField; - function IsLookupField: Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - property CaseSensitiveSearch: Boolean read FCaseSensitiveSearch - write FCaseSensitiveSearch default False; - property DataController: TcxDBDataController read GetDBLookupGridDataController; - property KeyFieldNames: string read GetKeyFieldNames write SetKeyFieldNames; - property ListField: TField read GetListField; - property ListFieldNames: string read GetListFieldNames write SetListFieldNames stored False; - property ListFieldIndex: Integer read GetListFieldIndex write SetListFieldIndex default 0; - end; - - { TcxCustomDBLookupEdit } - - TcxCustomDBLookupEdit = class(TcxCustomLookupEdit) - private - function GetProperties: TcxCustomDBLookupEditProperties; - function GetActiveProperties: TcxCustomDBLookupEditProperties; - procedure SetProperties(Value: TcxCustomDBLookupEditProperties); - protected - function GetClearValue: TcxEditValue; override; - function IsValidChar(AChar: Char): Boolean; override; - function ItemIndexToLookupKey(AItemIndex: Integer): TcxEditValue; override; - function LookupKeyToEditValue(const AKey: TcxEditValue): TcxEditValue; override; - function LookupKeyToItemIndex(const AKey: TcxEditValue): Integer; override; - procedure PopupWindowClosed(Sender: TObject); override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCustomDBLookupEditProperties - read GetActiveProperties; - property Properties: TcxCustomDBLookupEditProperties read GetProperties - write SetProperties; - end; - - { TcxDBLookupEditDataBinding } - - TcxDBLookupEditDataBinding = class(TcxDBTextEditDataBinding) - protected - function IsLookupControl: Boolean; override; - end; - -function IsLinkedToDataSet(ADataSource: TDataSource{list}; ADataSet: TDataSet{data binding}): Boolean; - -implementation - -uses -{$IFDEF DELPHI6} - VDBConsts, -{$ENDIF} - Contnrs, DBConsts; - -function IsLinkedToDataSet(ADataSource: TDataSource{list}; ADataSet: TDataSet{data binding}): Boolean; -var - AListDataSet: TDataSet; -begin - AListDataSet := ADataSource.DataSet; - Result := True; - while ADataSet <> nil do - begin - if ADataSet = AListDataSet then Exit; - if (ADataSet.DataSetField <> nil) and - (ADataSet.DataSetField.DataSet = AListDataSet) then Exit; - if ADataSet.DataSource = nil then - Break - else - ADataSet := ADataSet.DataSource.DataSet; - end; - Result := False; -end; - -{ TcxCustomDBLookupEditLookupData } - -procedure TcxCustomDBLookupEditLookupData.DoSetCurrentKey(ARecordIndex: Integer); -begin - FCurrentKey := Properties.GetKeyByRecordIndex(ARecordIndex); -end; - -procedure TcxCustomDBLookupEditLookupData.DoSyncGrid; -begin - if DataController <> nil then - try - Properties.LockDataChanged; - try - DataController.LocateByKey(GetCurrentKey); - finally - Properties.UnlockDataChanged; - end; - except - on EVariantError do; - on EDatabaseError do; - end; -end; - -function TcxCustomDBLookupEditLookupData.GetDataController: TcxDBDataController; -begin - Result := Properties.DataController; -end; - -function TcxCustomDBLookupEditLookupData.GetProperties: TcxCustomDBLookupEditProperties; -begin - Result := TcxCustomDBLookupEditProperties(inherited Properties); -end; - -{ TcxCustomDBLookupEditProperties } - -destructor TcxCustomDBLookupEditProperties.Destroy; -begin - SetLookupField(nil); - FreeAndNil(FLookupSourceFreeNotificator); - FLookupList.Free; - FLookupList := nil; - FreeAndNil(FCachedLookupSource); - inherited Destroy; -end; - -procedure TcxCustomDBLookupEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomDBLookupEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - CaseSensitiveSearch := TcxCustomDBLookupEditProperties(Source).CaseSensitiveSearch; - if not IsDefinedByLookup then - KeyFieldNames := TcxCustomDBLookupEditProperties(Source).KeyFieldNames; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomDBLookupEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxCustomDBLookupEdit; -end; - -function TcxCustomDBLookupEditProperties.GetDataField: TField; -var - ADefaultValuesProvider: TcxCustomEditDefaultValuesProvider; -begin - Result := nil; - if IDefaultValuesProvider <> nil then - begin - ADefaultValuesProvider := TcxCustomEditDefaultValuesProvider(IDefaultValuesProvider.GetInstance); - if ADefaultValuesProvider is TcxCustomDBEditDefaultValuesProvider then - Result := TcxCustomDBEditDefaultValuesProvider(ADefaultValuesProvider).Field; - end; -end; - -function TcxCustomDBLookupEditProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - if GetLookupField <> nil then - begin - if AEditFocused then - Result := evsKey - else - Result := evsText; - end - else - Result := inherited GetEditValueSource(AEditFocused); -end; - -function TcxCustomDBLookupEditProperties.GetLookupField: TField; -begin - Result := GetDataField; - if (Result <> nil) and (not Result.Lookup or (csDestroying in Result.ComponentState)) then - Result := nil; -end; - -function TcxCustomDBLookupEditProperties.IsLookupField: Boolean; -begin - Result := GetLookupField <> nil; -end; - -procedure TcxCustomDBLookupEditProperties.PrepareDisplayValue( - const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; - AEditFocused: Boolean); -begin - if CanDisplayArbitraryEditValue and (DropDownListStyle <> lsEditList) and - not AEditFocused then - DisplayValue := VarToStr(AEditValue) - else - inherited PrepareDisplayValue(AEditValue, DisplayValue, AEditFocused); -end; - -procedure TcxCustomDBLookupEditProperties.DBLookupGridBeginUpdate; -begin -end; - -procedure TcxCustomDBLookupEditProperties.DBLookupGridCheckColumnByFieldName(const AFieldName: string); -begin -end; - -procedure TcxCustomDBLookupEditProperties.DBLookupGridCreateColumnsByFieldNames(const AFieldNames: string); -begin -end; - -procedure TcxCustomDBLookupEditProperties.DBLookupGridEndUpdate; -begin -end; - -function TcxCustomDBLookupEditProperties.GetDBLookupGridColumnField(AIndex: Integer): TField; -begin - Result := nil; -end; - -function TcxCustomDBLookupEditProperties.GetDBLookupGridColumnFieldName(AIndex: Integer): string; -begin - Result := ''; -end; - -function TcxCustomDBLookupEditProperties.GetDBLookupGridColumnIndexByFieldName(const AFieldName: string): Integer; -begin - Result := -1; -end; - -function TcxCustomDBLookupEditProperties.GetDBLookupGridDataController: TcxDBDataController; -begin - Result := nil; -end; - -function TcxCustomDBLookupEditProperties.CanDisplayArbitraryEditValue: Boolean; -var - AKeyField: TField; -begin - Result := False; // TODO: method in DataController? - if (KeyFieldNames <> '') and not IsMultipleFieldNames(KeyFieldNames) and - (DataController <> nil) and (DataController.DataSet <> nil) then - begin - AKeyField := DataController.DataSet.FindField(KeyFieldNames); - if AKeyField <> nil then - Result := (AKeyField = GetListField) and - ((DropDownListStyle = lsEditList) or (AKeyField is TStringField)); - end; -end; - -procedure TcxCustomDBLookupEditProperties.CheckLookup; - - procedure CheckListSource; - var - AField: TField; - begin - AField := GetDataField; - if Assigned(AField) and Assigned(DataController) and Assigned(DataController.DataSource) and -// AField.DataSet.IsLinkedTo(DataController.DataSource) then - IsLinkedToDataSet(DataController.DataSource, AField.DataSet) then - DatabaseError(SCircularDataLink); - end; - -begin - SetLookupField(GetLookupField); - CheckListSource; -end; - -procedure TcxCustomDBLookupEditProperties.CheckLookupColumn; -var - AFieldName: string; -begin - AFieldName := GetLookupResultFieldName; - if AFieldName <> '' then - DBLookupGridCheckColumnByFieldName(AFieldName); -end; - -procedure TcxCustomDBLookupEditProperties.CheckLookupList; -begin - if FLookupList <> nil then - FLookupList.Clear; - if (DataController <> nil) then - DataController.DataModeController.GridMode := IsUseLookupList; -end; - -procedure TcxCustomDBLookupEditProperties.DefaultValuesProviderDestroyed; -begin - inherited DefaultValuesProviderDestroyed; - BeginUpdate; - try - Changed; - finally - EndUpdate(False); - end; -end; - -procedure TcxCustomDBLookupEditProperties.DefineByLookupError; -begin - DatabaseError(SPropDefByLookup); -end; - -procedure TcxCustomDBLookupEditProperties.DoChanged; -begin - CheckLookupList; - CheckLookup; - CheckLookupColumn; - inherited; -end; - -function TcxCustomDBLookupEditProperties.IsPickMode: Boolean; -begin - Result := (DropDownListStyle = lsEditList) and CanDisplayArbitraryEditValue; -end; - -procedure TcxCustomDBLookupEditProperties.LockDataChanged; -begin - inherited LockDataChanged; - // TODO: if GridMode - if (DataController <> nil) and DataController.IsGridMode then - Inc(FLockGridModeCount); - if FLockGridModeCount <> 0 then - DataController.LockGridModeNotify; -end; - -procedure TcxCustomDBLookupEditProperties.LookupSourceFreeNotification(Sender: TComponent); -begin - CheckLookup; -end; - -procedure TcxCustomDBLookupEditProperties.SetDisplayColumnIndex(Value: Integer); -begin - if IsDefinedByLookup and not FSyncLookup then - DefineByLookupError; - inherited SetDisplayColumnIndex(Value); -end; - -procedure TcxCustomDBLookupEditProperties.SetLookupField(ALookupField: TField); -begin - if FLookupField <> ALookupField then - begin - FLookupField := ALookupField; - if FLookupField <> nil then - begin - // Lookup Source - if FCachedLookupSource = nil then - FCachedLookupSource := TDataSource.Create(nil); - FLookupSource := FCachedLookupSource; - - FreeAndNil(FLookupSourceFreeNotificator); - FLookupSourceFreeNotificator := TcxFreeNotificator.Create(nil); - FLookupSourceFreeNotificator.OnFreeNotification := LookupSourceFreeNotification; - FLookupSourceFreeNotificator.AddSender(FLookupField); - - FLookupSource.DataSet := FLookupField.LookupDataSet; - // Sync Lookup Data - if DataController <> nil then - begin - FSyncLookup := True; - try -// if DataController.DataSet <> FLookupSource.DataSet then // SC DB11573 - DataController.DataSource := FLookupSource; - if GetDBLookupGridColumnIndexByFieldName(FLookupField.LookupResultField) = -1 then - ListFieldNames := FLookupField.LookupResultField; - KeyFieldNames := FLookupField.LookupKeyFields; - ListFieldIndex := 0; - finally - FSyncLookup := False; - end; - end; - end - else - begin - FreeAndNil(FLookupSourceFreeNotificator); - FLookupSource := nil; - if (DataController <> nil) and (DataController.DataSource = FCachedLookupSource) then - DataController.DataSource := nil; - end; - end; -end; - -procedure TcxCustomDBLookupEditProperties.UnlockDataChanged; -begin - if FLockGridModeCount <> 0 then - begin - if DataController <> nil then - DataController.UnlockGridModeNotify; - Dec(FLockGridModeCount); - end; - inherited UnlockDataChanged; -end; - -function TcxCustomDBLookupEditProperties.FindByText(AItemIndex: Integer; - const AText: string; APartialCompare: Boolean): Integer; - - function GetLocateOptions: TLocateOptions; - begin - Result := []; - if not CaseSensitiveSearch then - Include(Result, loCaseInsensitive); - if APartialCompare then - Result := Result + [loPartialKey]; - end; - - function GetLocateValue: Variant; - begin - Result := AText; - // TDataSet.Locate does not work with empty strings passed as key values for numeric fields - if (AText = '') and not (DataController.GetItemField(AItemIndex) is TStringField) then - Result := Null; - end; - -var - ADataSet: TDataSet; - AListFieldName: string; -begin - if not IsUseLookupList then - begin - Result := inherited FindByText(AItemIndex, AText, APartialCompare); - Exit; - end; - - Result := -1; - LockDataChanged; - try - ADataSet := DataController.DataSet; - AListFieldName := DataController.GetItemFieldName(AItemIndex); - try - if (ADataSet <> nil) and ADataSet.Active and (AItemIndex <> -1) and - ADataSet.Locate(AListFieldName, GetLocateValue, GetLocateOptions) then - Result := DataController.GetFocusedRecordIndex; - except - on EDatabaseError do; - on EVariantError do; - end; - finally - UnlockDataChanged; - end; -end; - -function TcxCustomDBLookupEditProperties.GetDisplayColumnIndex: Integer; -var - AFieldName: string; -begin - AFieldName := GetLookupResultFieldName; - if AFieldName <> '' then - Result := GetDBLookupGridColumnIndexByFieldName(AFieldName) - else - Result := inherited GetDisplayColumnIndex; -end; - -function TcxCustomDBLookupEditProperties.GetDisplayLookupText(const AKey: TcxEditValue): string; -var - ARecordIndex: Integer; - AItemIndex: Integer; - ADataSet: TDataSet; -begin - Result := ''; - AItemIndex := GetListIndex; - if (AItemIndex <> -1) and (DataController <> nil) then - begin - if IsUseLookupList then - begin - - // TODO: proc? - if FLookupList.Find(AKey, ARecordIndex) then - Result := FLookupList[ARecordIndex]^.DisplayText - else - begin - ADataSet := DataController.DataSet; - LockDataChanged; - try - if (ADataSet <> nil) and ADataSet.Active and (ListField <> nil) and - CanCallDataSetLocate(DataController.DataSet, KeyFieldNames, AKey) and - ADataSet.Locate(KeyFieldNames, AKey, []) then - Result := ListField.AsString {ListField.DisplayText} - else - Result := ''; - finally - UnlockDataChanged; - end; - FLookupList.Insert(ARecordIndex, AKey, Result); - end; - - end - else - begin - ARecordIndex := GetRecordIndexByKey(AKey); - if ARecordIndex <> -1 then - Result := DataController.DisplayTexts[ARecordIndex, AItemIndex]; - end; - end; -end; - -function TcxCustomDBLookupEditProperties.GetDefaultHorzAlignment: TAlignment; -begin - if ListField <> nil then - Result := ListField.Alignment - else - Result := inherited GetDefaultHorzAlignment; -end; - -function TcxCustomDBLookupEditProperties.GetDefaultMaxLength: Integer; -begin - if ListField <> nil then - Result := ListField.Size - else - Result := inherited GetDefaultMaxLength; -end; - -function TcxCustomDBLookupEditProperties.GetIncrementalFiltering: Boolean; -begin - if IsUseLookupList then - Result := False - else - Result := inherited GetIncrementalFiltering; -end; - -function TcxCustomDBLookupEditProperties.GetKeyByRecordIndex(ARecordIndex: Integer): Variant; -begin - if (ARecordIndex <> -1) and (DataController <> nil) then - Result := DataController.GetRecordId(ARecordIndex) - else - Result := Null; -end; - -class function TcxCustomDBLookupEditProperties.GetLookupDataClass: TcxInterfacedPersistentClass; -begin - Result := TcxCustomDBLookupEditLookupData; -end; - -function TcxCustomDBLookupEditProperties.GetLookupResultFieldName: string; -begin - if GetLookupField <> nil then - Result := GetLookupField.LookupResultField - else - Result := ''; -end; - -function TcxCustomDBLookupEditProperties.GetNullKey: Variant; -var - I, C: Integer; -begin - if IsMultipleFieldNames(KeyFieldNames) then - begin - C := GetFieldNamesCount(KeyFieldNames); - Result := VarArrayCreate([0, C - 1], varVariant); - for I := 0 to C - 1 do - Result[I] := Null; - end - else - Result := Null; -end; - -function TcxCustomDBLookupEditProperties.GetRecordIndexByKey(const AKey: Variant): Integer; -begin - try - Result := DataController.FindRecordIndexByKey(AKey); - except - on EVariantError do - Result := -1; - end; -end; - -function TcxCustomDBLookupEditProperties.GetIsUseLookupList: Boolean; -begin - Result := FLookupList <> nil; -end; - -function TcxCustomDBLookupEditProperties.GetKeyFieldNames: string; -begin - if DataController <> nil then - Result := DataController.KeyFieldNames - else - Result := ''; -end; - -function TcxCustomDBLookupEditProperties.GetListField: TField; -var - AListIndex: Integer; -begin - AListIndex := GetListIndex; - if AListIndex <> -1 then - Result := GetDBLookupGridColumnField(AListIndex) - else - Result := nil; -end; - -function TcxCustomDBLookupEditProperties.GetListFieldIndex: Integer; -begin - Result := inherited DisplayColumnIndex; -end; - -function TcxCustomDBLookupEditProperties.GetListFieldNames: string; -var - I: Integer; -begin - Result := ''; - if GetLookupGridColumnCount > 0 then - begin - Result := GetDBLookupGridColumnFieldName(0); - for I := 1 to GetLookupGridColumnCount - 1 do - Result := Result + ';' + GetDBLookupGridColumnFieldName(I); - end; -end; - -procedure TcxCustomDBLookupEditProperties.SetIsUseLookupList(Value: Boolean); -begin - if (FLookupList <> nil) <> Value then - begin - if Value then - begin - FLookupList := TcxLookupList.Create; - end - else - begin - FLookupList.Free; - FLookupList := nil; - end; - Changed; - end; -end; - -procedure TcxCustomDBLookupEditProperties.SetKeyFieldNames(const Value: string); -begin - if IsDefinedByLookup and not FSyncLookup then - DefineByLookupError; - if DataController <> nil then - DataController.KeyFieldNames := Value; -end; - -procedure TcxCustomDBLookupEditProperties.SetListFieldIndex(Value: Integer); -begin - inherited DisplayColumnIndex := Value; -end; - -procedure TcxCustomDBLookupEditProperties.SetListFieldNames(const Value: string); -var - AChanged: Boolean; -begin - AChanged := ListFieldNames <> Value; - DBLookupGridBeginUpdate; - try - DBLookupGridCreateColumnsByFieldNames(Value); - CheckLookupColumn; - CheckDisplayColumnIndex; - finally - DBLookupGridEndUpdate; - end; - if AChanged then - Changed; -end; - -{ TcxCustomDBLookupEdit } - -class function TcxCustomDBLookupEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomDBLookupEditProperties; -end; - -function TcxCustomDBLookupEdit.GetClearValue: TcxEditValue; - - function GetNullArray: Variant; - var - AFieldList: TObjectList; - I: Integer; - begin - AFieldList := TObjectList.Create(False); - try - ActiveProperties.FLookupSource.DataSet.GetFieldList(AFieldList, ActiveProperties.KeyFieldNames); - Result := VarArrayCreate([0, AFieldList.Count - 1], varVariant); - for I := 0 to AFieldList.Count - 1 do - Result[I] := Null; - finally - AFieldList.Free; - end; - end; - -begin - if (ActiveProperties.GetEditValueSource(InternalFocused) = evsKey) and - (Pos(';', ActiveProperties.KeyFieldNames) <> 0) then - Result := GetNullArray - else - Result := inherited GetClearValue; -end; - -function TcxCustomDBLookupEdit.IsValidChar(AChar: Char): Boolean; -begin - if ActiveProperties.ListField <> nil then - Result := ActiveProperties.ListField.IsValidChar(AChar) - else - Result := True; -end; - -function TcxCustomDBLookupEdit.ItemIndexToLookupKey(AItemIndex: Integer): TcxEditValue; -begin - Result := ActiveProperties.GetKeyByRecordIndex(AItemIndex); -end; - -function TcxCustomDBLookupEdit.LookupKeyToEditValue(const AKey: TcxEditValue): TcxEditValue; -begin - Result := AKey; -end; - -function TcxCustomDBLookupEdit.LookupKeyToItemIndex(const AKey: TcxEditValue): Integer; -begin - Result := ActiveProperties.GetRecordIndexByKey(AKey); -end; - -procedure TcxCustomDBLookupEdit.PopupWindowClosed(Sender: TObject); -begin - inherited PopupWindowClosed(Sender); - if ActiveProperties.DataController.DataModeController.SyncMode then - ILookupData.CurrentKey := EditValue; -end; - -procedure TcxCustomDBLookupEdit.PrepareDisplayValue( - const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; - AEditFocused: Boolean); -begin - if (ActiveProperties.DropDownListStyle <> lsEditList) and not Focused and - ActiveProperties.CanDisplayArbitraryEditValue then - DisplayValue := VarToStr(AEditValue) - else - ActiveProperties.PrepareDisplayValue(AEditValue, DisplayValue, AEditFocused); -end; - -function TcxCustomDBLookupEdit.GetProperties: TcxCustomDBLookupEditProperties; -begin - Result := TcxCustomDBLookupEditProperties(FProperties); -end; - -function TcxCustomDBLookupEdit.GetActiveProperties: TcxCustomDBLookupEditProperties; -begin - Result := TcxCustomDBLookupEditProperties(InternalGetActiveProperties); -end; - -procedure TcxCustomDBLookupEdit.SetProperties(Value: TcxCustomDBLookupEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxDBLookupEditDataBinding } - -function TcxDBLookupEditDataBinding.IsLookupControl: Boolean; -begin - Result := True; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBNavigator.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBNavigator.pas deleted file mode 100644 index 082fcb37..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBNavigator.pas +++ /dev/null @@ -1,541 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxDBNavigator; - -{$I cxVer.inc} - -interface - -uses - Classes, DB, cxDBFilterControl, cxNavigator; - -type - TcxCustomDBNavigator = class; - - TcxDBNavigatorDataLink = class(TDataLink) - private - FNavigator: TcxCustomDBNavigator; - protected - procedure EditingChanged; override; - procedure DataSetChanged; override; - procedure ActiveChanged; override; - public - constructor Create(ANavigator: TcxCustomDBNavigator); - destructor Destroy; override; - end; - - TcxDBNavigatorButtonsFilterEvent = procedure(Sender: TObject; - AFilterControl: TcxDBFilterControl) of object; - TcxDBNavigatorButtonsGetDataLink = function: TDataLink of object; - - TcxDBNavigatorButtons = class(TcxCustomNavigatorButtons) - private - FBookmark: TBookmark; - FFilterCriteria: TMemoryStream; - FFilterSetting: Boolean; - FPageSize: Integer; - FOnApplyFilter: TcxDBNavigatorButtonsFilterEvent; - FOnGetDataLink: TcxDBNavigatorButtonsGetDataLink; - FOnShowFilterDialog: TcxDBNavigatorButtonsFilterEvent; - - procedure DoApplyFilter(Sender: TObject); - procedure DoShowFilterDialog(Sender: TObject); - function GetDataLink: TDataLink; - function GetDataSet: TDataSet; - function GetInternalPageSize: Integer; - procedure SetBookmark(Value: TBookmark); - procedure SetPageSize(Value: Integer); - procedure ShowFilter; - protected - procedure DoButtonClick(ADefaultIndex: Integer); override; - function GetButtonEnabled(ADefaultIndex: Integer): Boolean; override; - procedure CheckBookmark; - procedure ClearFilterCriteria; - property Bookmark: TBookmark read FBookmark write SetBookmark; - property DataLink: TDataLink read GetDataLink; - property DataSet: TDataSet read GetDataSet; - property InternalPageSize: Integer read GetInternalPageSize; - property OnGetDataLink: TcxDBNavigatorButtonsGetDataLink - read FOnGetDataLink write FOnGetDataLink; - public - constructor Create(ANavigator: IcxNavigatorOwner); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure ReleaseBookmark; override; - published - property ConfirmDelete; - property Images; - property PageSize: Integer read FPageSize write SetPageSize default 0; - property OnShowFilterDialog: TcxDBNavigatorButtonsFilterEvent - read FOnShowFilterDialog write FOnShowFilterDialog; - property OnApplyFilter: TcxDBNavigatorButtonsFilterEvent - read FOnApplyFilter write FOnApplyFilter; - property First; - property PriorPage; - property Prior; - property Next; - property NextPage; - property Last; - property Insert; - property Append; - property Delete; - property Edit; - property Post; - property Cancel; - property Refresh; - property SaveBookmark; - property GotoBookmark; - property Filter; - end; - - TcxDBNavigatorFilterEvent = procedure(ANavigator: TcxCustomDBNavigator; - AFilterControl: TcxDBFilterControl) of object; - - TcxCustomDBNavigator = class(TcxCustomNavigator) - private - FDataLink: TcxDBNavigatorDataLink; - FOnApplyFilter: TcxDBNavigatorFilterEvent; - FOnShowFilterDialog: TcxDBNavigatorFilterEvent; - - procedure DoApplyFilter(Sender: TObject; AFilterControl: TcxDBFilterControl); - procedure DoShowFilterDialog(Sender: TObject; AFilterControl: TcxDBFilterControl); - function GetButtons: TcxDBNavigatorButtons; - function GetDataLink: TDataLink; - function GetDataSource: TDataSource; - function GetDataSet: TDataSet; - procedure SetButtons(Value: TcxDBNavigatorButtons); - procedure SetDataSource(Value: TDataSource); - procedure SetOnApplyFilter(Value: TcxDBNavigatorFilterEvent); - procedure SetOnShowFilterDialog(Value: TcxDBNavigatorFilterEvent); - protected - function CreateButtons: TcxCustomNavigatorButtons; override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - - procedure DataSetActiveChanged; virtual; - procedure DataSetDataChanged; virtual; - - property Buttons: TcxDBNavigatorButtons read GetButtons write SetButtons; - property DataLink: TcxDBNavigatorDataLink read FDataLink; - property DataSource: TDataSource read GetDataSource write SetDataSource; - property OnApplyFilter: TcxDBNavigatorFilterEvent read FOnApplyFilter - write SetOnApplyFilter; - property OnShowFilterDialog: TcxDBNavigatorFilterEvent read FOnShowFilterDialog - write SetOnShowFilterDialog; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property DataSet: TDataSet read GetDataSet; - end; - - TcxDBNavigator = class(TcxCustomDBNavigator) - published - property Buttons; - property DataSource; - property LookAndFeel; - property OnApplyFilter; - property OnShowFilterDialog; - property Align; - property Anchors; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property Ctl3D; - property ParentCtl3D; - property ParentShowHint; - property PopupMenu; - property ShowHint; - property TabOrder; - property TabStop; - property Visible; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnResize; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -uses - Windows, SysUtils, Controls, DBCtrls, Dialogs, cxClasses, - cxFilterControlDialog, cxEditConsts; - -type - TDataSetAccess = class(TDataSet); - -{ TcxDBNavigatorDataLink } - -constructor TcxDBNavigatorDataLink.Create(ANavigator: TcxCustomDBNavigator); -begin - inherited Create; - FNavigator := ANavigator; - VisualControl := True; -end; - -destructor TcxDBNavigatorDataLink.Destroy; -begin - FNavigator := nil; - inherited Destroy; -end; - -procedure TcxDBNavigatorDataLink.EditingChanged; -begin - if FNavigator <> nil then - FNavigator.NavigatorButtonsStateChanged; -end; - -procedure TcxDBNavigatorDataLink.DataSetChanged; -begin - if FNavigator <> nil then - begin - FNavigator.DataSetDataChanged; - FNavigator.NavigatorButtonsStateChanged; - end; -end; - -procedure TcxDBNavigatorDataLink.ActiveChanged; -begin - if FNavigator <> nil then - begin - FNavigator.DataSetActiveChanged; - FNavigator.NavigatorButtonsStateChanged; - end; -end; - -{ TcxDBNavigatorButtons } - -constructor TcxDBNavigatorButtons.Create(ANavigator: IcxNavigatorOwner); -begin - inherited Create(ANavigator); - FPageSize := 0; - FFilterCriteria := TMemoryStream.Create; -end; - -destructor TcxDBNavigatorButtons.Destroy; -begin - FreeAndNil(FFilterCriteria); - inherited Destroy; -end; - -procedure TcxDBNavigatorButtons.Assign(Source: TPersistent); -begin - if Source is TcxDBNavigatorButtons then - with TcxDBNavigatorButtons(Source) do - begin - Self.PageSize := PageSize; - Self.OnApplyFilter := OnApplyFilter; - Self.OnShowFilterDialog := OnShowFilterDialog; - end - else - inherited Assign(Source); -end; - -procedure TcxDBNavigatorButtons.ReleaseBookmark; -begin - Bookmark := nil; -end; - -procedure TcxDBNavigatorButtons.DoApplyFilter(Sender: TObject); -begin - ClearFilterCriteria; - TcxDBFilterControl(Sender).SaveToStream(FFilterCriteria); - FFilterSetting := True; - try - if Assigned(FOnApplyFilter) then - FOnApplyFilter(Self, TcxDBFilterControl(Sender)) - else - begin - DataSet.Filter := TcxDBFilterControl(Sender).GetFilterTextEx('[', ']'); - DataSet.Filtered := True; - end; - finally - FFilterSetting := False; - end; -end; - -procedure TcxDBNavigatorButtons.DoShowFilterDialog(Sender: TObject); -var - AFilterControl: TcxDBFilterControl; -begin - AFilterControl := TfmFilterControlDialog(Sender).FilterControl as TcxDBFilterControl; - if FFilterCriteria.Size > 0 then - begin - FFilterCriteria.Position := 0; - AFilterControl.LoadFromStream(FFilterCriteria); - end; - if Assigned(OnShowFilterDialog) then - OnShowFilterDialog(Self, AFilterControl); - if not Assigned(FOnApplyFilter) then - with AFilterControl.FilterOptions do - begin - SupportedBetween := False; - SupportedIn := False; - SupportedLike := False; - end; -end; - -function TcxDBNavigatorButtons.GetDataLink: TDataLink; -begin - if Assigned(FOnGetDataLink) then - Result := FOnGetDataLink - else Result := nil; -end; - -function TcxDBNavigatorButtons.GetDataSet: TDataSet; -begin - if DataLink <> nil then - Result := DataLink.DataSet - else Result := nil; -end; - -function TcxDBNavigatorButtons.GetInternalPageSize: Integer; -begin - if PageSize > 0 then - Result := PageSize - else - if (DataSet <> nil) then - Result := TDataSetAccess(DataSet).BufferCount - else - Result := 0; -end; - -procedure TcxDBNavigatorButtons.SetBookmark(Value: TBookmark); -begin - if Value <> FBookmark then - begin - if FBookmark <> nil then - if DataSet = nil then - {$IFNDEF DELPHI12}FreeMem(FBookmark){$ENDIF} - else - DataSet.FreeBookmark(FBookmark); - FBookmark := Value; - Navigator.NavigatorButtonsStateChanged; - end; -end; - -procedure TcxDBNavigatorButtons.SetPageSize(Value: Integer); -begin - if Value > - 1 then - FPageSize := Value; -end; - -procedure TcxDBNavigatorButtons.ShowFilter; -var - AShowFilterEvent: TNotifyEvent; -begin - AShowFilterEvent := DoShowFilterDialog; - ExecuteDBFilterControlDialog(DataSet, Navigator.GetNavigatorLookAndFeel, - DoApplyFilter, AShowFilterEvent); -end; - -procedure TcxDBNavigatorButtons.DoButtonClick(ADefaultIndex: Integer); -begin - if (DataLink = nil) or not DataLink.Active then - Exit; - case ADefaultIndex of - NBDI_FIRST: DataSet.First; - NBDI_PRIORPAGE: DataSet.MoveBy(-InternalPageSize); - NBDI_PRIOR: DataSet.Prior; - NBDI_LAST: DataSet.Last; - NBDI_NEXTPAGE: DataSet.MoveBy(InternalPageSize); - NBDI_NEXT: DataSet.Next; - NBDI_INSERT: DataSet.Insert; - NBDI_APPEND: DataSet.Append; - NBDI_DELETE: - if not ConfirmDelete or - (MessageDlg(cxGetResourceString(@cxNavigator_DeleteRecordQuestion), - mtConfirmation, mbOKCancel, 0) = ID_OK) then - DataSet.Delete; - NBDI_EDIT: DataSet.Edit; - NBDI_POST: DataSet.Post; - NBDI_CANCEL: DataSet.Cancel; - NBDI_SAVEBOOKMARK: Bookmark := DataSet.GetBookmark; - NBDI_GOTOBOOKMARK: DataSet.GotoBookmark(Bookmark); - NBDI_REFRESH: DataSet.Refresh; - NBDI_FILTER: ShowFilter; - end; -end; - -function TcxDBNavigatorButtons.GetButtonEnabled(ADefaultIndex: Integer): Boolean; -begin - Result := IsNavigatorEnabled and (DataLink <> nil) and DataLink.Active; - if Result then - begin - case ADefaultIndex of - NBDI_FIRST, NBDI_PRIOR, NBDI_PRIORPAGE: Result := not DataSet.Bof; - NBDI_LAST, NBDI_NEXT, NBDI_NEXTPAGE: Result := not DataSet.Eof; - NBDI_INSERT, NBDI_APPEND: Result := DataSet.CanModify; - NBDI_DELETE: Result := DataSet.CanModify and - not (DataSet.BOF and DataSet.EOF); - NBDI_EDIT: Result := DataSet.CanModify and not DataLink.Editing; - NBDI_POST, NBDI_CANCEL: Result := DataSet.CanModify and DataLink.Editing; - NBDI_GOTOBOOKMARK: Result := Bookmark <> nil; - end; - end; -end; - -procedure TcxDBNavigatorButtons.CheckBookmark; -begin - if (Bookmark <> nil) and not DataSet.BookmarkValid(Bookmark) then - ReleaseBookmark; -end; - -procedure TcxDBNavigatorButtons.ClearFilterCriteria; -begin - if not FFilterSetting then - FFilterCriteria.Clear; -end; - -{ TcxCustomDBNavigator } - -constructor TcxCustomDBNavigator.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FDataLink := TcxDBNavigatorDataLink.Create(Self); -end; - -destructor TcxCustomDBNavigator.Destroy; -begin - FreeAndNil(FDataLink); - inherited Destroy; -end; - -procedure TcxCustomDBNavigator.DoApplyFilter(Sender: TObject; - AFilterControl: TcxDBFilterControl); -begin - if Assigned(FOnApplyFilter) then - FOnApplyFilter(Self, AFilterControl); -end; - -procedure TcxCustomDBNavigator.DoShowFilterDialog(Sender: TObject; - AFilterControl: TcxDBFilterControl); -begin - if Assigned(FOnShowFilterDialog) then - FOnShowFilterDialog(Self, AFilterControl); -end; - -function TcxCustomDBNavigator.GetButtons: TcxDBNavigatorButtons; -begin - Result := TcxDBNavigatorButtons(CustomButtons); -end; - -function TcxCustomDBNavigator.GetDataLink: TDataLink; -begin - Result := FDataLink; -end; - -function TcxCustomDBNavigator.GetDataSource: TDataSource; -begin - Result := FDataLink.DataSource; -end; - -function TcxCustomDBNavigator.GetDataSet: TDataSet; -begin - Result := FDataLink.DataSet; -end; - -procedure TcxCustomDBNavigator.SetButtons(Value: TcxDBNavigatorButtons); -begin - CustomButtons.Assign(Value); -end; - -procedure TcxCustomDBNavigator.SetDataSource(Value: TDataSource); -begin - if DataSource <> Value then - begin - {$IFDEF DELPHI5} - if (DataSource <> nil) and not (csDestroying in DataSource.ComponentState) then - DataSource.RemoveFreeNotification(Self); - {$ENDIF} - FDataLink.DataSource := Value; - if (DataSource <> nil) then - DataSource.FreeNotification(Self); - end; -end; - -procedure TcxCustomDBNavigator.SetOnApplyFilter(Value: TcxDBNavigatorFilterEvent); -begin - FOnApplyFilter := Value; - if Assigned(FOnApplyFilter) then - Buttons.OnApplyFilter := DoApplyFilter - else - Buttons.OnApplyFilter := nil; -end; - -procedure TcxCustomDBNavigator.SetOnShowFilterDialog(Value: TcxDBNavigatorFilterEvent); -begin - FOnShowFilterDialog := Value; - if Assigned(FOnShowFilterDialog) then - Buttons.OnShowFilterDialog := DoShowFilterDialog - else - Buttons.OnShowFilterDialog := nil; -end; - -function TcxCustomDBNavigator.CreateButtons: TcxCustomNavigatorButtons; -begin - Result := TcxDBNavigatorButtons.Create(Self); - TcxDBNavigatorButtons(Result).OnGetDataLink := GetDataLink; -end; - -procedure TcxCustomDBNavigator.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (FDataLink <> nil) - and (AComponent = DataSource) then - DataSource := nil; -end; - -procedure TcxCustomDBNavigator.DataSetActiveChanged; -begin - Buttons.ClearFilterCriteria; - Buttons.ReleaseBookmark; -end; - -procedure TcxCustomDBNavigator.DataSetDataChanged; -begin - Buttons.CheckBookmark; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBProgressBar.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBProgressBar.pas deleted file mode 100644 index 4e4a5262..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBProgressBar.pas +++ /dev/null @@ -1,155 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBProgressBar; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, Dialogs, Forms, Graphics, Messages, StdCtrls, - SysUtils, cxControls, cxDBEdit, cxEdit, cxProgressBar; - -type - { TcxDBProgressBar } - - TcxDBProgressBar = class(TcxCustomProgressBar) - private - function GetActiveProperties: TcxProgressBarProperties; - function GetDataBinding: TcxDBEditDataBinding; - function GetProperties: TcxProgressBarProperties; - procedure SetDataBinding(Value: TcxDBEditDataBinding); - procedure SetProperties(Value: TcxProgressBarProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxProgressBarProperties - read GetActiveProperties; - published - property Align; - property Anchors; - property AutoSize; - property Constraints; - property DataBinding: TcxDBEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxProgressBarProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -{ TcxDBProgressBar } - -class function TcxDBProgressBar.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxProgressBarProperties; -end; - -class function TcxDBProgressBar.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBEditDataBinding; -end; - -function TcxDBProgressBar.GetActiveProperties: TcxProgressBarProperties; -begin - Result := TcxProgressBarProperties(InternalGetActiveProperties); -end; - -function TcxDBProgressBar.GetDataBinding: TcxDBEditDataBinding; -begin - Result := TcxDBEditDataBinding(FDataBinding); -end; - -function TcxDBProgressBar.GetProperties: TcxProgressBarProperties; -begin - Result := TcxProgressBarProperties(FProperties); -end; - -procedure TcxDBProgressBar.SetDataBinding(Value: TcxDBEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBProgressBar.SetProperties(Value: TcxProgressBarProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBProgressBar.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBRichEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBRichEdit.pas deleted file mode 100644 index 74c3141a..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBRichEdit.pas +++ /dev/null @@ -1,178 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBRichEdit; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, Controls, Graphics, Messages, cxDBEdit, cxEdit, cxRichEdit; - -type - TcxDBRichEditDataBinding = class(TcxDBTextEditDataBinding) - protected - procedure UpdateData; override; - end; - - TcxDBRichEdit = class(TcxCustomRichEdit) - private - function GetActiveProperties: TcxRichEditProperties; - function GetDataBinding: TcxDBRichEditDataBinding; - function GetProperties: TcxRichEditProperties; - procedure SetDataBinding(Value: TcxDBRichEditDataBinding); - procedure SetProperties(Value: TcxRichEditProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - procedure EditingChanged; override; - class function GetDataBindingClass: TcxEditDataBindingClass; override; - function RealReadOnly: Boolean; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxRichEditProperties read GetActiveProperties; - published - property Align; - property Anchors; - property Constraints; - property DataBinding: TcxDBRichEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxRichEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnMouseWheel; - property OnMouseWheelDown; - property OnMouseWheelUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -{ TcxDBRichEdit } - -class function TcxDBRichEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxRichEditProperties; -end; - -procedure TcxDBRichEdit.EditingChanged; -begin - UpdateInnerEditReadOnly; -end; - -class function TcxDBRichEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBRichEditDataBinding; -end; - -function TcxDBRichEdit.RealReadOnly: Boolean; -begin - Result := inherited RealReadOnly or not DataBinding.Editing; -end; - -function TcxDBRichEdit.GetActiveProperties: TcxRichEditProperties; -begin - Result := TcxRichEditProperties(InternalGetActiveProperties); -end; - -function TcxDBRichEdit.GetDataBinding: TcxDBRichEditDataBinding; -begin - Result := TcxDBRichEditDataBinding(FDataBinding); -end; - -function TcxDBRichEdit.GetProperties: TcxRichEditProperties; -begin - Result := TcxRichEditProperties(FProperties); -end; - -procedure TcxDBRichEdit.SetDataBinding(Value: TcxDBRichEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBRichEdit.SetProperties(Value: TcxRichEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBRichEdit.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxDBRichEditDataBinding } - -procedure TcxDBRichEditDataBinding.UpdateData; -begin - StoredValue := Edit.EditValue; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBShellComboBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBShellComboBox.pas deleted file mode 100644 index 222c8667..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBShellComboBox.pas +++ /dev/null @@ -1,159 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBShellComboBox; - -{$I cxVer.inc} - -interface - -uses - Messages, Controls, cxDBEdit, cxEdit, cxShellComboBox; - -type - { TcxDBShellComboBox } - - TcxDBShellComboBox = class(TcxCustomShellComboBox) - private - function GetActiveProperties: TcxShellComboBoxProperties; - function GetDataBinding: TcxDBTextEditDataBinding; - function GetProperties: TcxShellComboBoxProperties; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure SetProperties(Value: TcxShellComboBoxProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxShellComboBoxProperties - read GetActiveProperties; - published - property Align; - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxShellComboBoxProperties read GetProperties - write SetProperties; - property ShellListView; - property ShellTreeView; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -{ TcxDBShellComboBox } - -class function TcxDBShellComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxShellComboBoxProperties; -end; - -class function TcxDBShellComboBox.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBTextEditDataBinding; -end; - -function TcxDBShellComboBox.GetActiveProperties: TcxShellComboBoxProperties; -begin - Result := TcxShellComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxDBShellComboBox.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := FDataBinding as TcxDBTextEditDataBinding; -end; - -function TcxDBShellComboBox.GetProperties: TcxShellComboBoxProperties; -begin - Result := TcxShellComboBoxProperties(FProperties); -end; - -procedure TcxDBShellComboBox.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBShellComboBox.SetProperties(Value: TcxShellComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBShellComboBox.CMGetDataLink(var Message: TMessage); -begin - if DataBinding <> nil then - Message.Result := Integer(DataBinding.DataLink); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDBTrackBar.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDBTrackBar.pas deleted file mode 100644 index 86eb3e45..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDBTrackBar.pas +++ /dev/null @@ -1,155 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBTrackBar; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, Dialogs, Forms, Graphics, Messages, StdCtrls, - SysUtils, cxControls, cxDBEdit, cxEdit, cxTrackBar; - -type - { TcxDBTrackBar } - - TcxDBTrackBar = class(TcxCustomTrackBar) - private - function GetActiveProperties: TcxTrackBarProperties; - function GetDataBinding: TcxDBEditDataBinding; - function GetProperties: TcxTrackBarProperties; - procedure SetDataBinding(Value: TcxDBEditDataBinding); - procedure SetProperties(Value: TcxTrackBarProperties); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxTrackBarProperties read GetActiveProperties; - published - property Align; - property Anchors; - property AutoSize; - property Constraints; - property DataBinding: TcxDBEditDataBinding read GetDataBinding - write SetDataBinding; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxTrackBarProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -{ TcxDBTrackBar } - -class function TcxDBTrackBar.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxTrackBarProperties; -end; - -class function TcxDBTrackBar.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBEditDataBinding; -end; - -function TcxDBTrackBar.GetActiveProperties: TcxTrackBarProperties; -begin - Result := TcxTrackBarProperties(InternalGetActiveProperties); -end; - -function TcxDBTrackBar.GetDataBinding: TcxDBEditDataBinding; -begin - Result := TcxDBEditDataBinding(FDataBinding); -end; - -function TcxDBTrackBar.GetProperties: TcxTrackBarProperties; -begin - Result := TcxTrackBarProperties(FProperties); -end; - -procedure TcxDBTrackBar.SetDataBinding(Value: TcxDBEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBTrackBar.SetProperties(Value: TcxTrackBarProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxDBTrackBar.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxDropDownEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxDropDownEdit.pas deleted file mode 100644 index 01378b17..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxDropDownEdit.pas +++ /dev/null @@ -1,4506 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDropDownEdit; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Classes, Controls, Graphics, Forms, SysUtils, StdCtrls, - dxCore, cxClasses, cxContainer, cxControls, - cxEdit, cxGraphics, cxLookAndFeelPainters, cxLookAndFeels, cxMaskEdit, - cxTextEdit, cxVariants, cxFilterControlUtils; - -const - CM_POPUPCONTROLKEY = WM_DX + 50; - CM_DROPDOWNBYPASTE = WM_DX + 51; - -type - TcxEditDropDownListStyle = (lsEditFixedList, lsEditList, lsFixedList); - TcxEditCorner = (ecoTopLeft, ecoTopRight, ecoBottomLeft, ecoBottomRight); - TcxEditMouseSizingDirection = (mmdWE, mmdNS, mmdNWSE, mmdNESW, mmdNone); - - TcxCustomComboBox = class; - TcxCustomDropDownEdit = class; - - TcxCustomDrawBorderEvent = procedure(AViewInfo: TcxContainerViewInfo; ACanvas: TcxCanvas; const R: TRect; var AHandled: Boolean; - out ABorderWidth: Integer) of object; - TcxEditDrawItemEvent = procedure(AControl: TcxCustomComboBox; ACanvas: TcxCanvas; - AIndex: Integer; const ARect: TRect; AState: TOwnerDrawState) of object; - TMeasureItemEvent = procedure(AControl: TcxCustomComboBox; AIndex: Integer; - ACanvas: TcxCanvas; var AHeight: Integer) of object; - - { TcxCustomEditPopupWindowViewInfo } - - TcxCustomEditPopupWindowViewInfo = class(TcxContainerViewInfo) - private - FOnCustomDrawBorder: TcxCustomDrawBorderEvent; - protected - function DrawCustomBorder(ACanvas: TcxCanvas; const R: TRect; out ABorderWidth: Integer): Boolean; - procedure InternalPaint(ACanvas: TcxCanvas); override; - public - BorderStyle: TcxEditPopupBorderStyle; - ClientEdge: Boolean; - CloseButton: Boolean; - CloseButtonRect: TRect; - CloseButtonStyle: TcxLookAndFeelKind; - CloseButtonNativeState: Integer; - CloseButtonState: TcxButtonState; - MinSysPanelHeight: Integer; - NativeStyle: Boolean; - Painter: TcxCustomLookAndFeelPainterClass; - Shadow: Boolean; - Sizeable: Boolean; - SizeGripCorner: TcxEditCorner; - SizeGripRect: TRect; - SizeGripSizingRect: TRect; - SizingRegionBounds: TRect; - SizingOffset: Integer; - SysPanelHeight: Integer; - SysPanelStyle: Boolean; - procedure Calculate; virtual; - procedure DrawBorder(ACanvas: TcxCanvas; var R: TRect); reintroduce; virtual; - function GetBorderExtent: TRect; virtual; - function GetClientExtent: TRect; virtual; - function GetSysPanelHeight: Integer; virtual; - function IsSizingPlace(X, Y: Integer): Boolean; virtual; - property OnCustomDrawBorder: TcxCustomDrawBorderEvent read FOnCustomDrawBorder write FOnCustomDrawBorder; - end; - - { TcxCustomEditPopupWindow } - - TcxCustomEditPopupWindow = class(TcxCustomPopupWindow) - private - FLockCheckSize: Boolean; - FPopupAutoSize: Boolean; - FBorderStyle: TcxEditPopupBorderStyle; - FClientEdge: Boolean; - FCloseButton: Boolean; - FMinHeight: Integer; - FMinWidth: Integer; - FNativeStyle: Boolean; - FPopupHeight: Integer; - FPopupWidth: Integer; - FShadow: Boolean; - FShowContentWhileResize: Boolean; - FSizeable: Boolean; - FSizeFrame: TcxSizeFrame; - FSysPanelStyle: Boolean; - function GetEdit: TcxCustomDropDownEdit; - function GetMinSysPanelHeight: Integer; - function GetViewInfo: TcxCustomEditPopupWindowViewInfo; - procedure SetPopupAutoSize(Value: Boolean); - procedure SetBorderStyle(Value: TcxEditPopupBorderStyle); - procedure SetClientEdge(Value: Boolean); - procedure SetCloseButton(Value: Boolean); - procedure SetMinSysPanelHeight(Value: Integer); - procedure SetNativeStyle(Value: Boolean); - procedure SetShadow(Value: Boolean); - procedure SetSizeable(Value: Boolean); - procedure SetSysPanelStyle(Value: Boolean); - procedure CMPopupControlKey(var Message: TMessage); message CM_POPUPCONTROLKEY; - protected - function AcceptsAnySize: Boolean; override; - procedure AdjustClientRect(var Rect: TRect); override; - function CalculatePosition: TPoint; override; - procedure CalculateSize; override; - function CanResize(var NewWidth, NewHeight: Integer): Boolean; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure DoClosed; override; - procedure DoClosing; override; - procedure ModalCloseUp; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseLeave(AControl: TControl); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure Resize; override; - - procedure CalculateViewInfo; virtual; - procedure DoPopupControlKey(Key: Char); virtual; - procedure DrawSizeFrame(const R: TRect); - function GetMaxVisualAreaSize: TSize; - function GetMinSize: TSize; virtual; - procedure InternalInvalidateRect(const ARect: TRect); - procedure RefreshPopupWindow; - procedure ResizePopupWindow(ALeft, ATop, AWidth, AHeight: Integer); - public - constructor Create(AOwnerControl: TWinControl); override; - destructor Destroy; override; - function GetViewInfoClass: TcxContainerViewInfoClass; override; - procedure Popup(AFocusedControl: TWinControl); override; - property BorderStyle: TcxEditPopupBorderStyle read FBorderStyle write SetBorderStyle; - property ClientEdge: Boolean read FClientEdge write SetClientEdge; - property CloseButton: Boolean read FCloseButton write SetCloseButton; - property Edit: TcxCustomDropDownEdit read GetEdit; - property MinHeight: Integer read FMinHeight write FMinHeight; - property MinSize: TSize read GetMinSize; - property MinSysPanelHeight: Integer read GetMinSysPanelHeight write SetMinSysPanelHeight; - property MinWidth: Integer read FMinWidth write FMinWidth; - property NativeStyle: Boolean read FNativeStyle write SetNativeStyle; - property PopupAutoSize: Boolean read FPopupAutoSize write SetPopupAutoSize; - property PopupHeight: Integer read FPopupHeight write FPopupHeight; - property PopupWidth: Integer read FPopupWidth write FPopupWidth; - property Shadow: Boolean read FShadow write SetShadow; - property ShowContentWhileResize: Boolean read FShowContentWhileResize - write FShowContentWhileResize default False; - property Sizeable: Boolean read FSizeable write SetSizeable; - property SysPanelStyle: Boolean read FSysPanelStyle write SetSysPanelStyle; - property ViewInfo: TcxCustomEditPopupWindowViewInfo read GetViewInfo; - property OnClosed; - end; - - TcxCustomEditPopupWindowClass = class of TcxCustomEditPopupWindow; - - { TcxCustomDropDownEditProperties } - - TcxCustomDropDownEditProperties = class(TcxCustomMaskEditProperties) - private - FGlyphButtonIndex: Integer; - FImmediateDropDown: Boolean; - FImmediatePopup: Boolean; - FKeepArrowButtonPressedWhenDroppedDown: Boolean; - FPopupAutoSize: Boolean; - FPopupClientEdge: Boolean; - FPopupDirection: TcxPopupDirection; - FPopupHeight: Integer; - FPopupHorzAlignment: TcxPopupAlignHorz; - FPopupMinHeight: Integer; - FPopupMinWidth: Integer; - FPopupSizeable: Boolean; - FPopupSysPanelStyle: Boolean; - FPopupVertAlignment: TcxPopupAlignVert; - FPopupWidth: Integer; - FPostPopupValueOnTab: Boolean; - FOnCloseQuery: TCloseQueryEvent; - FOnCloseUp: TNotifyEvent; - FOnFinalizePopup: TNotifyEvent; - FOnInitPopup: TNotifyEvent; - FOnPopup: TNotifyEvent; - function GetButtonGlyph: TBitmap; - function GetPopupAlignment: TAlignment; - procedure SetButtonGlyph(Value: TBitmap); - procedure SetGlyphButtonIndex(Value: Integer); - procedure SetKeepArrowButtonPressedWhenDroppedDown(Value: Boolean); - procedure SetPopupAlignment(Value: TAlignment); - procedure SetPopupClientEdge(Value: Boolean); - procedure SetPopupHeight(Value: Integer); - procedure SetPopupMinHeight(Value: Integer); - procedure SetPopupMinWidth(Value: Integer); - procedure SetPopupSizeable(Value: Boolean); - procedure SetPopupSysPanelStyle(Value: Boolean); - procedure SetPopupWidth(Value: Integer); - protected - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function IsLookupDataVisual: Boolean; override; - procedure DoChanged; override; - function DropDownButtonVisibleIndex: Integer; virtual; - function DropDownOnClick: Boolean; virtual; - function GetAlwaysPostEditValue: Boolean; virtual; - class function GetPopupWindowClass: TcxCustomEditPopupWindowClass; virtual; - function PopupWindowAcceptsAnySize: Boolean; virtual; - function PopupWindowCapturesFocus: Boolean; virtual; - property AlwaysPostEditValue: Boolean read GetAlwaysPostEditValue; - property GlyphButtonIndex: Integer read FGlyphButtonIndex write SetGlyphButtonIndex; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - // !!! - property ButtonGlyph: TBitmap read GetButtonGlyph write SetButtonGlyph; - property ImmediateDropDown: Boolean read FImmediateDropDown write FImmediateDropDown default True; - property ImmediatePopup: Boolean read FImmediatePopup write FImmediatePopup default False; - property KeepArrowButtonPressedWhenDroppedDown: Boolean - read FKeepArrowButtonPressedWhenDroppedDown - write SetKeepArrowButtonPressedWhenDroppedDown default False; - property PopupAlignment: TAlignment read GetPopupAlignment write SetPopupAlignment default taLeftJustify; - property PopupAutoSize: Boolean read FPopupAutoSize write FPopupAutoSize default True; - property PopupClientEdge: Boolean read FPopupClientEdge write SetPopupClientEdge default False; - property PopupDirection: TcxPopupDirection read FPopupDirection write FPopupDirection; - property PopupHeight: Integer read FPopupHeight write SetPopupHeight default 200; - property PopupHorzAlignment: TcxPopupAlignHorz read FPopupHorzAlignment write FPopupHorzAlignment; - property PopupMinHeight: Integer read FPopupMinHeight write SetPopupMinHeight default 100; - property PopupMinWidth: Integer read FPopupMinWidth write SetPopupMinWidth default 100; - property PopupSizeable: Boolean read FPopupSizeable write SetPopupSizeable default False; - property PopupSysPanelStyle: Boolean read FPopupSysPanelStyle write SetPopupSysPanelStyle default False; - property PopupVertAlignment: TcxPopupAlignVert read FPopupVertAlignment write FPopupVertAlignment; - property PopupWidth: Integer read FPopupWidth write SetPopupWidth default 250; - property PostPopupValueOnTab: Boolean read FPostPopupValueOnTab - write FPostPopupValueOnTab default False; - property OnCloseQuery: TCloseQueryEvent read FOnCloseQuery write FOnCloseQuery; - property OnCloseUp: TNotifyEvent read FOnCloseUp write FOnCloseUp; - property OnFinalizePopup: TNotifyEvent read FOnFinalizePopup write FOnFinalizePopup; - property OnInitPopup: TNotifyEvent read FOnInitPopup write FOnInitPopup; - property OnPopup: TNotifyEvent read FOnPopup write FOnPopup; - end; - - TcxCustomDropDownEditPropertiesClass = class of TcxCustomDropDownEditProperties; - - { TcxCustomDropDownEditViewData } - - TcxCustomDropDownEditViewData = class(TcxCustomTextEditViewData) - private - function GetProperties: TcxCustomDropDownEditProperties; - protected - function CanPressButton(AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: Integer): Boolean; override; - function GetEditNativeState(AViewInfo: TcxCustomEditViewInfo): Integer; override; - function IsButtonPressed(AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer): Boolean; override; - public - HasPopupWindow: Boolean; - IsHotAndPopup: Boolean; - KeepArrowButtonPressedWhenDroppedDown: Boolean; - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - property Properties: TcxCustomDropDownEditProperties read GetProperties; - end; - - { TcxCustomDropDownEditData } - - TcxCustomDropDownEditData = class(TcxCustomEditData) - protected - Initialized: Boolean; - Width, Height: Integer; - end; - - TcxCustomDropDownEditDataClass = class of TcxCustomDropDownEditData; - - { TcxEditPopupControlLookAndFeel } - - TcxEditPopupControlLookAndFeel = class(TcxLookAndFeel) - private - function GetEdit: TcxCustomDropDownEdit; - protected - procedure EditStyleChanged; - function InternalGetKind: TcxLookAndFeelKind; override; - function InternalGetNativeStyle: Boolean; override; - function InternalGetSkinName: string; override; - - property Edit: TcxCustomDropDownEdit read GetEdit; - end; - - { TcxCustomDropDownInnerEdit } - - TcxCustomDropDownInnerEdit = class(TcxCustomInnerTextEdit) - private - function GetContainer: TcxCustomDropDownEdit; - procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; - protected - property Container: TcxCustomDropDownEdit read GetContainer; - // TODO CLX - end; - - { TcxCustomDropDownEdit } - - TcxCustomDropDownEdit = class(TcxCustomMaskEdit) - private - FIsActivatingByMouse: Boolean; - FIsHotAndPopup: Boolean; - FPopupControlsLookAndFeel: TcxEditPopupControlLookAndFeel; - FPopupInitialized: Boolean; - FPopupMouseMoveLocked: Boolean; - FPopupSizeChanged: Boolean; - FNeedStorePopupSize: Boolean; - FSendChildrenStyle: Boolean; - procedure DropDownByPasteHandler; - function GetDroppedDown: Boolean; - function GetProperties: TcxCustomDropDownEditProperties; - function GetActiveProperties: TcxCustomDropDownEditProperties; - procedure SetDroppedDown(Value: Boolean); - procedure SetProperties(Value: TcxCustomDropDownEditProperties); - procedure CMBiDiModeChanged(var Message: TMessage); message CM_BIDIMODECHANGED; - procedure CMDropDownByPaste(var Message: TMessage); message CM_DROPDOWNBYPASTE; - procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; - protected - FCloseUpReason: TcxEditCloseUpReason; - FPopupWindow: TcxCustomEditPopupWindow; - procedure ContainerStyleChanged(Sender: TObject); override; - function CreateViewData: TcxCustomEditViewData; override; - procedure DestroyWnd; override; - procedure DoButtonDown(AButtonVisibleIndex: Integer); override; - procedure DoExit; override; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); override; - procedure DoEditKeyPress(var Key: Char); override; - procedure DoEditProcessTab(Shift: TShiftState); override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure FocusChanged; override; - function GetEditDataClass: TcxCustomEditDataClass; override; - function GetInnerEditClass: TControlClass; override; - function GetScrollLookupDataList(AScrollCause: TcxEditScrollCause): Boolean; override; - procedure Initialize; override; - procedure InitializeEditData; override; - function InternalGetNotPublishedStyleValues: TcxEditStyleValues; override; - function IsEditorKey(Key: Word; Shift: TShiftState): Boolean; override; - procedure PropertiesChanged(Sender: TObject); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - function DoRefreshContainer(const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): Boolean; override; - function SendActivationKey(Key: Char): Boolean; override; - function TabsNeeded: Boolean; override; - procedure CreateHandle; override; - procedure DoStartDock(var DragObject: TDragObject); override; - function CanDropDown: Boolean; virtual; - procedure CloseUp(AReason: TcxEditCloseUpReason); virtual; - procedure CreatePopupWindow; virtual; - procedure DeleteShowPopupWindowMessages; - procedure DoCloseQuery(var CanClose: Boolean); - procedure DoCloseUp; virtual; - procedure DoFinalizePopup; virtual; - procedure DoInitPopup; virtual; - procedure DoPopup; virtual; - procedure DropDown; virtual; - procedure EditButtonClick; virtual; - function GetPopupFocusedControl: TWinControl; virtual; - function GetPopupWindowClientPreferredSize: TSize; virtual; abstract; - function GetPopupWindowOwnerControlBounds: TRect; - procedure InitializeLookupData; virtual; - procedure InitializePopupWindow; virtual; - procedure PopupControlsLookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); virtual; - procedure PopupWindowClosed(Sender: TObject); dynamic; - procedure PopupWindowCloseQuery(Sender: TObject; var CanClose: Boolean); dynamic; - procedure PopupWindowClosing(Sender: TObject); dynamic; - procedure PopupWindowShowing(Sender: TObject); dynamic; - procedure PopupWindowShowed(Sender: TObject); dynamic; - procedure PositionPopupWindowChilds(const AClientRect: TRect); virtual; - procedure SetIsHotAndPopup; - procedure SetupPopupWindow; virtual; - procedure UpdatePopupWindow; - property IsHotAndPopup: Boolean read FIsHotAndPopup; - property PopupControlsLookAndFeel: TcxEditPopupControlLookAndFeel - read FPopupControlsLookAndFeel; - property PopupMouseMoveLocked: Boolean read FPopupMouseMoveLocked write FPopupMouseMoveLocked; - property PopupSizeChanged: Boolean read FPopupSizeChanged; - property SendChildrenStyle: Boolean read FSendChildrenStyle write FSendChildrenStyle; - public - destructor Destroy; override; - procedure Activate(var AEditData: TcxCustomEditData); override; - procedure ActivateByKey(Key: Char; var AEditData: TcxCustomEditData); override; - procedure ActivateByMouse(Shift: TShiftState; X, Y: Integer; - var AEditData: TcxCustomEditData); override; - procedure BeforeDestruction; override; - function Deactivate: Boolean; override; - function Focused: Boolean; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function HasPopupWindow: Boolean; override; - procedure PasteFromClipboard; override; - function CanHide: Boolean; virtual; - property ActiveProperties: TcxCustomDropDownEditProperties - read GetActiveProperties; - property DroppedDown: Boolean read GetDroppedDown write SetDroppedDown; - property PopupWindow: TcxCustomEditPopupWindow read FPopupWindow; - property Properties: TcxCustomDropDownEditProperties read GetProperties - write SetProperties; - end; - - { TcxFilterDropDownEditHelper } - - TcxFilterDropDownEditHelper = class(TcxFilterMaskEditHelper) - public - class function EditPropertiesHasButtons: Boolean; override; - end; - - { TcxComboBoxPopupWindow } - - TcxComboBoxPopupWindow = class(TcxCustomEditPopupWindow) - protected - procedure CalculateSize; override; - end; - - { TcxCustomComboBoxListBox } - - TcxCustomComboBoxListBox = class(TcxCustomEditListBox) - private - function GetEdit: TcxCustomComboBox; - protected - procedure CreateParams(var Params: TCreateParams); override; - function DoDrawItem(AIndex: Integer; const ARect: TRect; - AState: TOwnerDrawState): Boolean; override; - function GetItem(Index: Integer): string; override; - procedure MeasureItem(Index: Integer; var Height: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure RecreateWindow; override; - property Edit: TcxCustomComboBox read GetEdit; - public - constructor Create(AOwner: TComponent); override; - function GetHeight(ARowCount: Integer; AMaxHeight: Integer): Integer; override; - end; - - { TcxComboBoxListBox } - - TcxComboBoxListBox = class(TcxCustomComboBoxListBox) - protected - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure RecreateWindow; override; - procedure SetItemIndex(const Value: Integer); override; - procedure Resize; override; - public - function GetItemHeight(AIndex: Integer = -1): Integer; override; - end; - - { TcxComboBoxLookupData } - - TcxComboBoxLookupData = class(TcxCustomTextEditLookupData) - protected - function GetListBoxClass: TcxCustomEditListBoxClass; override; - public - function CanResizeVisualArea(var NewSize: TSize; - AMaxHeight: Integer = 0; AMaxWidth: Integer = 0): Boolean; override; - function GetVisualAreaPreferredSize(AMaxHeight: Integer; AWidth: Integer = 0): TSize; override; - procedure Initialize(AVisualControlsParent: TWinControl); override; - end; - - { TcxCustomComboBoxViewData } - - TcxCustomComboBoxProperties = class; - - TcxCustomComboBoxViewData = class(TcxCustomDropDownEditViewData) - private - function GetProperties: TcxCustomComboBoxProperties; - protected - function IsComboBoxStyle: Boolean; override; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - property Properties: TcxCustomComboBoxProperties read GetProperties; - end; - - { TcxCustomTextEditViewInfo } - - TcxCustomComboBoxViewInfo = class(TcxCustomTextEditViewInfo) - private - function GetEdit: TcxCustomComboBox; - protected - procedure DoCustomDraw(ACanvas: TcxCanvas; ARect: TRect); virtual; - public - ItemIndex: Integer; - constructor Create; override; - property Edit: TcxCustomComboBox read GetEdit; - end; - - { TcxCustomComboBoxProperties } - - TcxCustomComboBoxProperties = class(TcxCustomDropDownEditProperties) - private - FDropDownListStyle: TcxEditDropDownListStyle; - FDropDownRows: Integer; - FItemHeight: Integer; - FRevertable: Boolean; - FOnDrawItem: TcxEditDrawItemEvent; - FOnMeasureItem: TMeasureItemEvent; - function GetDropDownAutoWidth: Boolean; - function GetDropDownSizeable: Boolean; - function GetDropDownWidth: Integer; - function GetItems: TStrings; - function GetSorted: Boolean; - procedure SetDropDownAutoWidth(Value: Boolean); - procedure SetDropDownListStyle(Value: TcxEditDropDownListStyle); - procedure SetDropDownRows(Value: Integer); - procedure SetDropDownSizeable(Value: Boolean); - procedure SetDropDownWidth(Value: Integer); - procedure SetItemHeight(Value: Integer); - procedure SetItems(Value: TStrings); - procedure SetSorted(Value: Boolean); - protected - function DropDownOnClick: Boolean; override; - function GetDropDownPageRowCount: Integer; override; - function GetEditingStyle: TcxEditEditingStyle; override; - class function GetLookupDataClass: TcxInterfacedPersistentClass; override; - class function GetPopupWindowClass: TcxCustomEditPopupWindowClass; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function UseLookupData: Boolean; override; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - // !!! - property DropDownAutoWidth: Boolean read GetDropDownAutoWidth - write SetDropDownAutoWidth default True; - property DropDownListStyle: TcxEditDropDownListStyle read FDropDownListStyle - write SetDropDownListStyle default lsEditList; - property DropDownRows: Integer read FDropDownRows write SetDropDownRows - default cxEditDefaultDropDownPageRowCount; - property DropDownSizeable: Boolean read GetDropDownSizeable - write SetDropDownSizeable default False; - property DropDownWidth: Integer read GetDropDownWidth write SetDropDownWidth - default 0; - property ItemHeight: Integer read FItemHeight write SetItemHeight default 0; - property Items: TStrings read GetItems write SetItems; - property Revertable: Boolean read FRevertable write FRevertable default False; - property Sorted: Boolean read GetSorted write SetSorted default False; - property OnDrawItem: TcxEditDrawItemEvent read FOnDrawItem write FOnDrawItem; - property OnMeasureItem: TMeasureItemEvent read FOnMeasureItem write FOnMeasureItem; - end; - - { TcxComboBoxProperties } - - TcxComboBoxProperties = class(TcxCustomComboBoxProperties) - published - property Alignment; - property AssignedValues; - property AutoSelect; - property BeepOnError; - property ButtonGlyph; - property CaseInsensitive; - property CharCase; - property ClearKey; - property DropDownAutoWidth; - property DropDownListStyle; - property DropDownRows; - property DropDownSizeable; - property DropDownWidth; - property HideSelection; - property IgnoreMaskBlank; - property ImeMode; - property ImeName; - property ImmediateDropDown; - property ImmediatePost; - property ImmediateUpdateText; - property IncrementalSearch; - property ItemHeight; - property Items; - property MaskKind; - property EditMask; - property MaxLength; - property OEMConvert; - property PopupAlignment; - property PostPopupValueOnTab; - property ReadOnly; - property Revertable; - property Sorted; - property UseLeftAlignmentOnEditing; - property ValidateOnEnter; - property OnChange; - property OnCloseUp; - property OnDrawItem; - property OnEditValueChanged; - property OnInitPopup; - property OnMeasureItem; - property OnNewLookupDisplayText; - property OnPopup; - property OnValidate; - end; - - { TcxCustomComboBoxInnerEdit } - - TcxCustomComboBoxInnerEdit = class(TcxCustomDropDownInnerEdit) - private - procedure WMLButtonUp(var Message: TWMLButtonUp); message WM_LBUTTONUP; - protected - end; - - { TcxCustomComboBox } - - TcxCustomComboBox = class(TcxCustomDropDownEdit) - private - function GetActiveProperties: TcxCustomComboBoxProperties; - function GetLookupData: TcxComboBoxLookupData; - function GetProperties: TcxCustomComboBoxProperties; - function GetSelectedItem: Integer; - procedure SetProperties(Value: TcxCustomComboBoxProperties); - procedure SetSelectedItem(Value: Integer); - procedure WMLButtonUp(var Message: TWMLButtonUp); message WM_LBUTTONUP; - protected - function CanDropDown: Boolean; override; - procedure ChangeHandler(Sender: TObject); override; - procedure DblClick; override; - function GetInnerEditClass: TControlClass; override; - function GetPopupWindowClientPreferredSize: TSize; override; - procedure Initialize; override; - procedure InitializePopupWindow; override; - function IsTextInputMode: Boolean; override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure PopupWindowShowed(Sender: TObject); override; - procedure SetupPopupWindow; override; - function CanSynchronizeLookupData: Boolean; - procedure ResetPopupHeight; - procedure SynchronizeItemIndex; - procedure DoOnDrawItem(ACanvas: TcxCanvas; AIndex: Integer; - const ARect: TRect; AState: TOwnerDrawState); - procedure DoOnMeasureItem(AIndex: Integer; ACanvas: TcxCanvas; - var AHeight: Integer); - function IsOnDrawItemEventAssigned: Boolean; - function IsOnMeasureItemEventAssigned: Boolean; - property LookupData: TcxComboBoxLookupData read GetLookupData; - public - procedure Activate(var AEditData: TcxCustomEditData); override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCustomComboBoxProperties read GetActiveProperties; - property ItemIndex; - property ItemObject; - property Properties: TcxCustomComboBoxProperties read GetProperties - write SetProperties; - property SelectedItem: Integer read GetSelectedItem write SetSelectedItem; - end; - - { TcxComboBox } - - TcxComboBox = class(TcxCustomComboBox) - private - function GetActiveProperties: TcxComboBoxProperties; - function GetProperties: TcxComboBoxProperties; - procedure SetProperties(Value: TcxComboBoxProperties); - protected - function SupportsSpelling: Boolean; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxComboBoxProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ItemIndex; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxComboBoxProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Text; - {$IFDEF DELPHI12} - property TextHint; - {$ENDIF} - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxFilterComboBoxHelper } - - TcxFilterComboBoxHelper = class(TcxFilterDropDownEditHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - - { TcxPopupEditPopupWindowViewInfo } - - TcxPopupEditPopupWindowViewInfo = class(TcxCustomEditPopupWindowViewInfo) - public - procedure DrawBorder(ACanvas: TcxCanvas; var R: TRect); override; - end; - - { TcxPopupEditPopupWindow } - - TcxPopupEditPopupWindow = class(TcxCustomEditPopupWindow) - public - function GetViewInfoClass: TcxContainerViewInfoClass; override; - end; - - { TcxCustomPopupEditProperties } - - TcxCustomPopupEditProperties = class(TcxCustomDropDownEditProperties) - private - FPopupControl: TControl; - procedure SetPopupControl(Value: TControl); - protected - procedure FreeNotification(Sender: TComponent); override; - class function GetPopupWindowClass: TcxCustomEditPopupWindowClass; override; - function IsLookupDataVisual: Boolean; override; - function PopupWindowCapturesFocus: Boolean; override; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - // !!! - property PopupControl: TControl read FPopupControl write SetPopupControl; - property PopupSizeable default True; - end; - - { TcxPopupEditProperties } - - TcxPopupEditProperties = class(TcxCustomPopupEditProperties) - public - constructor Create(AOwner: TPersistent); override; - published - property Alignment; - property AssignedValues; - property AutoSelect; - property BeepOnError; - property ButtonGlyph; - property CaseInsensitive; - property CharCase; - property ClearKey; - property EchoMode; - property HideSelection; - property IgnoreMaskBlank; - property ImeMode; - property ImeName; - property ImmediateDropDown; - property ImmediatePopup default True; - property IncrementalSearch; - property LookupItems; - property LookupItemsSorted; - property MaxLength; - property MaskKind; - property EditMask; - property OEMConvert; - property PasswordChar; - property PopupAlignment; - property PopupAutoSize; - property PopupClientEdge; - property PopupControl; - property PopupHeight; - property PopupMinHeight; - property PopupMinWidth; - property PopupSizeable; - property PopupSysPanelStyle; - property PopupWidth; - property ReadOnly; - property UseLeftAlignmentOnEditing; - property ValidateOnEnter; - property OnChange; - property OnCloseQuery; - property OnCloseUp; - property OnEditValueChanged; - property OnInitPopup; - property OnPopup; - property OnValidate; - end; - - { TcxCustomPopupEdit } - - TcxPrevPopupControlData = record - Align: TAlign; - Bounds: TRect; - Parent: TWinControl; - Visible: Boolean; - BorderStyle: TFormBorderStyle; - end; - - TcxCustomPopupEdit = class(TcxCustomDropDownEdit) - private - FPrevPopupControlData: TcxPrevPopupControlData; - function GetProperties: TcxCustomPopupEditProperties; - function GetActiveProperties: TcxCustomPopupEditProperties; - procedure SetProperties(Value: TcxCustomPopupEditProperties); - protected - function CanDropDown: Boolean; override; - procedure DoInitPopup; override; - function GetPopupFocusedControl: TWinControl; override; - function GetPopupWindowClientPreferredSize: TSize; override; - procedure PopupWindowClosed(Sender: TObject); override; - procedure PositionPopupWindowChilds(const AClientRect: TRect); override; - procedure SetupPopupWindow; override; - procedure HidePopup(Sender: TcxControl; AReason: TcxEditCloseUpReason); virtual; - procedure RestorePopupControlData; virtual; - procedure SavePopupControlData; virtual; - public - destructor Destroy; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCustomPopupEditProperties read GetActiveProperties; - property Properties: TcxCustomPopupEditProperties read GetProperties - write SetProperties; - end; - - { TcxPopupEdit } - - TcxPopupEdit = class(TcxCustomPopupEdit) - private - function GetActiveProperties: TcxPopupEditProperties; - function GetProperties: TcxPopupEditProperties; - procedure SetProperties(Value: TcxPopupEditProperties); - protected - function SupportsSpelling: Boolean; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxPopupEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragMode; - property Enabled; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxPopupEditProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Text; - {$IFDEF DELPHI12} - property TextHint; - {$ENDIF} - property Visible; - property DragCursor; - property DragKind; - property ImeMode; - property ImeName; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnEndDock; - property OnStartDock; - end; - -implementation - -uses - Math, dxThemeConsts, dxThemeManager, dxUxTheme, cxEditConsts, cxEditPaintUtils, - cxEditUtils, cxScrollBar, cxGeometry, cxDWMApi; - -const - - cxEditMouseSizingCursorMap: array[-1 .. 1, -1 .. 1] of TCursor = ( - (crSizeNWSE, crSizeWE, crSizeNESW), - (crSizeNS, crDefault, crSizeNS), - (crSizeNESW, crSizeWE, crSizeNWSE) - ); - - cxEditPopupClientEdgeWidthA: array[TcxEditPopupBorderStyle] of Integer = (0, 2, 2, 1); - cxEditPopupWindowFrameWidthA: array[TcxEditPopupBorderStyle] of Integer = (0, 1, 4, 2); - - CloseButtonNativeStateMap: array [TcxButtonState] of Integer = - (TC_NONE, CBS_NORMAL, CBS_HOT, CBS_PUSHED, CBS_DISABLED); - -type - TcxCustomEditStyleAccess = class(TcxCustomEditStyle); - TControlAccess = class(TControl); - TCustomFormAccess = class(TCustomForm); - TWinControlAccess = class(TWinControl); - -var - FCapturePointOffset: TSize; - FHorzFlag, FVertFlag: Integer; - FSizeFrameBounds: TRect = (Left: 0; Top: 0; Right: 0; Bottom: 0); - FPaintedSizeFrameBounds: TRect = (Left: 0; Top: 0; Right: 0; Bottom: 0); - FSizingCapture: Boolean = False; - FSizingMouseMovement: Boolean = False; - -procedure CheckBounds(const AOuterRect: TRect; var AInnerRect: TRect); -begin - if AInnerRect.Left < AOuterRect.Left then - AInnerRect.Left := AOuterRect.Left; - if AInnerRect.Top < AOuterRect.Top then - AInnerRect.Top := AOuterRect.Top; - if AInnerRect.Right > AOuterRect.Right then - AInnerRect.Right := AOuterRect.Right; - if AInnerRect.Bottom > AOuterRect.Bottom then - AInnerRect.Bottom := AOuterRect.Bottom; -end; - -function GetEditPopupWindowSysPanelDefaultHeight(AViewInfo: TcxCustomEditPopupWindowViewInfo): Integer; -var - ATheme: TdxTheme; - ACloseButtonSize: TSize; - ASizeGripSize: TSize; -begin - ACloseButtonSize.cy := 0; - ASizeGripSize.cy := 0; - with AViewInfo do - if SysPanelStyle and AreVisualStylesMustBeUsed(NativeStyle, totWindow) then - begin - ATheme := OpenTheme(totWindow); - GetThemePartSize(ATheme, 0, WP_CLOSEBUTTON, CBS_NORMAL, TS_TRUE, - ACloseButtonSize); - ATheme := OpenTheme(totScrollBar); - GetThemePartSize(ATheme, 0, SBP_SIZEBOX, SZB_RIGHTALIGN, TS_TRUE, - ASizeGripSize); - end; - - Result := GetSystemMetrics(SM_CYHSCROLL); - if Result < GetSystemMetrics(SM_CYSIZE) then - Result := GetSystemMetrics(SM_CYSIZE); - if Result < ACloseButtonSize.cy then - Result := ACloseButtonSize.cy; - if Result < ASizeGripSize.cy then - Result := ASizeGripSize.cy; -end; - -function GetEditPopupWindowClientEdgeWidth(AViewInfo: TcxCustomEditPopupWindowViewInfo): Integer; -begin - with AViewInfo do - if ClientEdge then - if NativeStyle or (Painter <> nil) then - Result := 2 - else - Result := cxEditPopupClientEdgeWidthA[BorderStyle] - else - Result := 0; -end; - -function GetEditPopupWindowBorderWidth(AViewInfo: TcxCustomEditPopupWindowViewInfo; AIncludeClientEdge: Boolean): Integer; -begin - with AViewInfo do - begin - if not DrawCustomBorder(nil, cxEmptyRect, Result) then - if NativeStyle or (Painter <> nil) then - Result := 1 - else - Result := cxEditPopupWindowFrameWidthA[BorderStyle]; - if ClientEdge and AIncludeClientEdge then - Inc(Result, GetEditPopupWindowClientEdgeWidth(AViewInfo)); - end; -end; - -function GetEditPopupWindowFrameExtent(AViewInfo: TcxCustomEditPopupWindowViewInfo): TRect; -var - AOffset: Integer; -begin - with AViewInfo do - begin - AOffset := GetEditPopupWindowBorderWidth(AViewInfo, True); - Result := Rect(AOffset, AOffset, AOffset, AOffset); - - if Shadow then - begin - Inc(Result.Right, cxEditShadowWidth); - Inc(Result.Bottom, cxEditShadowWidth); - end; - - if SysPanelStyle then - begin - SysPanelHeight := GetSysPanelHeight; - AOffset := SysPanelHeight; - if NativeStyle or (BorderStyle = epbsSingle) or (Painter <> nil) then - Inc(AOffset); - if SizeGripCorner in [ecoBottomLeft, ecoBottomRight] then - Inc(Result.Bottom, AOffset) - else - Inc(Result.Top, AOffset); - end - else - SysPanelHeight := 0; - - SizingOffset := GetSystemMetrics(SM_CYHSCROLL); - if SizingOffset < GetSystemMetrics(SM_CYSIZE) then - SizingOffset := GetSystemMetrics(SM_CYSIZE); - end; -end; - -procedure CalculateEditPopupWindowViewInfo(AViewInfo: TcxCustomEditPopupWindowViewInfo); - - procedure CalculateSizeGripRect; - var - R: TRect; - ASizeGripSizingRegionSize: TSize; - ASizeGripSize: TSize; - ATheme: TdxTheme; - begin - with AViewInfo do - begin - R := SizingRegionBounds; - ASizeGripSizingRegionSize.cx := GetEditPopupWindowSysPanelDefaultHeight(AViewInfo) - 2; - ASizeGripSizingRegionSize.cy := ASizeGripSizingRegionSize.cx; - - if AreVisualStylesMustBeUsed(NativeStyle, totScrollBar) then - begin - ATheme := OpenTheme(totScrollBar); - GetThemePartSize(ATheme, 0, SBP_SIZEBOX, SZB_RIGHTALIGN, TS_TRUE, - ASizeGripSize); - ASizeGripSize.cx := ASizeGripSize.cx + 2; - ASizeGripSize.cy := ASizeGripSize.cy + 2; - if ASizeGripSizingRegionSize.cx < ASizeGripSize.cx then - ASizeGripSizingRegionSize.cx := ASizeGripSize.cx; - if ASizeGripSizingRegionSize.cy < ASizeGripSize.cy then - ASizeGripSizingRegionSize.cy := ASizeGripSize.cy; - end; - - if SizeGripCorner in [ecoTopLeft, ecoBottomLeft] then - R.Right := R.Left + ASizeGripSizingRegionSize.cx - else - R.Left := R.Right - ASizeGripSizingRegionSize.cx; - if SizeGripCorner in [ecoTopLeft, ecoTopRight] then - R.Bottom := R.Top + ASizeGripSizingRegionSize.cy - else - R.Top := R.Bottom - ASizeGripSizingRegionSize.cy; - SizeGripSizingRect := R; - - if SizeGripCorner in [ecoTopLeft, ecoBottomLeft] then - Inc(R.Left, 2) - else - Dec(R.Right, 2); - if SizeGripCorner in [ecoTopLeft, ecoTopRight] then - Inc(R.Top, 2) - else - Dec(R.Bottom, 2); - SizeGripRect := R; - end; - end; - - procedure CalculateCloseButtonRect; - var - R: TRect; - ACloseButtonSize: TSize; - ATheme: TdxTheme; - begin - with AViewInfo do - if CloseButton then - begin - R := SizingRegionBounds; - - if CloseButtonNativeState <> TC_NONE then - begin - ATheme := OpenTheme(totWindow); - GetThemePartSize(ATheme, 0, WP_CLOSEBUTTON, CBS_NORMAL, TS_TRUE, - ACloseButtonSize); - end - else - begin - ACloseButtonSize.cy := GetEditPopupWindowSysPanelDefaultHeight(AViewInfo) - 4; - ACloseButtonSize.cx := ACloseButtonSize.cy; - end; - - if CloseButtonNativeState = TC_NONE then - if SizeGripCorner in [ecoTopLeft, ecoBottomLeft] then - Dec(R.Right, 2) - else - Inc(R.Left, 2); - - if SizeGripCorner in [ecoTopLeft, ecoBottomLeft] then - begin - R.Left := R.Right - ACloseButtonSize.cx; - OffsetRect(R, -1, 0); - end else - begin - R.Right := R.Left + ACloseButtonSize.cx; - OffsetRect(R, 1, 0); - end; - - if CloseButtonNativeState <> TC_NONE then - if SizeGripCorner in [ecoTopLeft, ecoTopRight] then - begin - Inc(R.Top, (SysPanelHeight - ACloseButtonSize.cy) div 2); - R.Bottom := R.Top + ACloseButtonSize.cy; - end else - begin - Dec(R.Bottom, (SysPanelHeight - ACloseButtonSize.cy) div 2); - R.Top := R.Bottom - ACloseButtonSize.cy; - end - else - if SizeGripCorner in [ecoTopLeft, ecoTopRight] then - begin - Inc(R.Top, 2); - R.Bottom := R.Top + ACloseButtonSize.cy; - end else - begin - Dec(R.Bottom, 2); - R.Top := R.Bottom - ACloseButtonSize.cy; - end; - CloseButtonRect := R; - end - else - CloseButtonRect := cxEmptyRect; - end; - -var - AClientExtent: TRect; - ASizingFrameWidth: Integer; -begin - with AViewInfo do - begin - AClientExtent := GetEditPopupWindowFrameExtent(AViewInfo); - ClientRect := Bounds; - OffsetRect(ClientRect, -Bounds.Left, -Bounds.Top); - SizingRegionBounds := ClientRect; - ExtendRect(ClientRect, AClientExtent); - - ASizingFrameWidth := GetEditPopupWindowBorderWidth(AViewInfo, not SysPanelStyle); - InflateRect(SizingRegionBounds, -ASizingFrameWidth, -ASizingFrameWidth); - if Shadow then - begin - Dec(SizingRegionBounds.Bottom, cxEditShadowWidth); - Dec(SizingRegionBounds.Right, cxEditShadowWidth); - end; - - if SysPanelStyle and AreVisualStylesMustBeUsed(NativeStyle, totWindow) then - CloseButtonNativeState := CloseButtonNativeStateMap[CloseButtonState] - else - CloseButtonNativeState := TC_NONE; - - if SysPanelStyle then - begin - if Sizeable then - CalculateSizeGripRect; - CalculateCloseButtonRect; - end; - end; -end; - -procedure DrawEditPopupCloseButton(ACanvas: TcxCanvas; AViewInfo: TcxCustomEditPopupWindowViewInfo); -const - ACloseButtonSize = 11; - AStates: array[Boolean] of Longint = (0, DFCS_PUSHED); -var - R: TRect; - APainterClass: TcxCustomLookAndFeelPainterClass; - ATheme: TdxTheme; -begin - with AViewInfo do - begin - R := AViewInfo.CloseButtonRect; - if Painter <> nil then - begin - Painter.DrawWindowContent(ACanvas, R); - Painter.DrawEditorButton(ACanvas, R, cxbkCloseBtn, CloseButtonState); - end - else - begin - APainterClass := GetPainterClass(NativeStyle, CloseButtonStyle); - if CloseButtonNativeState <> TC_NONE then - begin - ATheme := OpenTheme(totWindow); - CloseButtonNativeState := CloseButtonNativeStateMap[CloseButtonState]; - if IsThemeBackgroundPartiallyTransparent(ATheme, WP_CLOSEBUTTON, CloseButtonNativeState) then - begin - ACanvas.Brush.Color := clBtnFace; - ACanvas.FillRect(R); - end; - DrawThemeBackground(ATheme, ACanvas.Handle, WP_CLOSEBUTTON, CloseButtonNativeState, R); - ACanvas.ExcludeClipRect(R); - end - else - APainterClass.DrawFilterCloseButton(ACanvas, R, CloseButtonState); - end; - end; -end; - -procedure DrawEditPopupWindowBorder(ACanvas: TcxCanvas; AViewInfo: TcxCustomEditPopupWindowViewInfo; - var R: TRect); -var - ABorderWidth: Integer; -begin - with AViewInfo do - if DrawCustomBorder(ACanvas, R, ABorderWidth) then - InflateRect(R, -ABorderWidth, -ABorderWidth) - else - begin - if NativeStyle then - if IsCompositionEnabled then - DrawThemeBackground(OpenTheme(totListBox), ACanvas.Handle, LBCP_BORDER_NOSCROLL, LBPSN_HOT, R) - else - ACanvas.FrameRect(R, clBtnText) - else - if Painter <> nil then - ACanvas.FrameRect(R, Painter.GetContainerBorderColor(False)) - else - case BorderStyle of - epbsSingle: - ACanvas.FrameRect(R, clBtnText); - epbsFrame3D, epbsFlat: - begin - ACanvas.DrawEdge(R, False, True); - InflateRect(R, -1, -1); - ACanvas.DrawEdge(R, False, False); - if BorderStyle = epbsFrame3D then - begin - InflateRect(R, -1, -1); - if ClientEdge then - ACanvas.FrameRect(R, clInactiveBorder) - else - ACanvas.FrameRect(R, clBtnFace); - InflateRect(R, -1, -1); - if ClientEdge then - ACanvas.FrameRect(R, clBtnFace) - else - ACanvas.DrawEdge(R, True, True); - end; - end; - end; - InflateRect(R, -1, -1); - end; -end; - -procedure DrawSizeGrip(ACanvas: TcxCanvas; const ARect: TRect; - ACorner: TcxEditCorner; ANativeStyle: Boolean; - APainter: TcxCustomLookAndFeelPainterClass; AIsTransparent: Boolean = False); -var - DX, DY: Integer; - X, X0, Y, Y0: Integer; - R: TRect; - - procedure DrawTouch(AColor: TColor); - begin - InternalPolyLine(ACanvas, [Point(X, Y0), Point(X0, Y)], AColor, False); - Inc(X, DX); - Inc(Y, DY); - end; - -const - Offset = 2; - RotateAngleMap: array [TcxEditCorner] of TcxRotationAngle = (ra180, raPlus90, raMinus90, ra0); -var - AMirrorX, AMirrorY: Boolean; - ATempRect: TRect; - AScrollBarSize: TSize; - I, J, L: Integer; - APrevBitmap: HBITMAP; - ATheme: TdxTheme; - MDC: HDC; - R1: TRect; - ABitmap: TcxBitmap; -begin - if not AIsTransparent then - begin - ACanvas.Brush.Color := clBtnFace; - ACanvas.FillRect(ARect); - end; - if APainter <> nil then - begin - ABitmap := TcxBitmap.CreateSize(ARect); - try - APainter.DrawWindowContent(ABitmap.cxCanvas, ABitmap.ClientRect); - APainter.DrawSizeGrip(ABitmap.cxCanvas, ABitmap.ClientRect); - ABitmap.Rotate(RotateAngleMap[ACorner]); - ACanvas.CopyRect(ARect, ABitmap.Canvas, ABitmap.ClientRect); - finally - ABitmap.Free; - end; - Exit; - end; - if ANativeStyle then - begin - ATheme := OpenTheme(totScrollBar); - GetThemePartSize(ATheme, ACanvas.Handle, SBP_SIZEBOX, SZB_RIGHTALIGN, - TS_TRUE, AScrollBarSize); - AScrollBarSize.cx := AScrollBarSize.cx + Offset; - AScrollBarSize.cy := AScrollBarSize.cy + Offset; - end else - begin - AScrollBarSize.cx := GetSystemMetrics(SM_CXVSCROLL); - AScrollBarSize.cy := GetSystemMetrics(SM_CYHSCROLL); - end; - ATempRect := ARect; - with ATempRect do - begin - if ACorner in [ecoTopRight, ecoBottomRight] then - Left := Right - AScrollBarSize.cx - else - Right := Left + AScrollBarSize.cx; - if ACorner in [ecoBottomLeft, ecoBottomRight] then - Top := Bottom - AScrollBarSize.cy - else - Bottom := Top + AScrollBarSize.cy; - AMirrorX := ACorner in [ecoTopLeft, ecoBottomLeft]; - AMirrorY := ACorner in [ecoTopLeft, ecoTopRight]; - end; - R := ATempRect; - with R do - begin - if AMirrorX then - begin - Dec(Right, Offset); - end - else - begin - Inc(Left, Offset); - end; - if AMirrorY then - begin - Dec(Bottom, Offset); - end - else - begin - Inc(Top, Offset); - end; - end; - - if ANativeStyle or not AIsTransparent then - begin - X := R.Left; - Y := R.Top; - OffsetRect(R, -R.Left, -R.Top); - MDC := CreateCompatibleDC(ACanvas.Handle); - APrevBitmap := SelectObject(MDC, CreateCompatibleBitmap(ACanvas.Handle, R.Right, R.Bottom)); - if AIsTransparent then - begin - with R do - StretchBlt(MDC, 0, 0, Right, Bottom, - ACanvas.Handle, X + Byte(AMirrorX) * (Right - 1), Y + Byte(AMirrorY) * (Bottom - 1), - (2 * Byte(not AMirrorX) - 1) * Right, - (2 * Byte(not AMirrorY) - 1) * Bottom, SRCCOPY); - end - else - FillRect(MDC, R, COLOR_BTNFACE + 1); - ATheme := 0; - if ANativeStyle then - ATheme := OpenTheme(totScrollBar); - if ATheme <> 0 then - begin - R1 := R; - DrawThemeBackground(ATheme, MDC, SBP_SIZEBOX, SZB_RIGHTALIGN, R1); - end - else - DrawFrameControl(MDC, R, DFC_SCROLL, DFCS_SCROLLSIZEGRIP); - with R do - begin - StretchBlt(ACanvas.Handle, X, Y, Right, Bottom, - MDC, Byte(AMirrorX) * (Right - 1), Byte(AMirrorY) * (Bottom - 1), - (2 * Byte(not AMirrorX) - 1) * Right, - (2 * Byte(not AMirrorY) - 1) * Bottom, SRCCOPY); - end; - DeleteObject(SelectObject(MDC, APrevBitmap)); - DeleteDC(MDC); - end - else - begin - L := (AScrollBarSize.cy - 2) div 12; - if AMirrorX then - begin - DX := 1; - X := R.Left; - end else - begin - DX := -1; - X := R.Right - 1; - end; - if AMirrorY then - begin - DY := 1; - Y := R.Top; - end else - begin - DY := -1; - Y := R.Bottom - 1; - end; - X0 := X; - Y0 := Y; - for I := 0 to 2 do - begin - if AIsTransparent then - begin - Inc(X, DX * L); - Inc(Y, DY * L); - end - else - for J := 1 to L do - DrawTouch(clBtnFace); - for J := 1 to L * 2 do - DrawTouch(clBtnShadow); - for J := 1 to L do - DrawTouch(clBtnHighlight); - end; - end; -end; - -procedure DrawEditPopupWindowFrame(ACanvas: TcxCanvas; AViewInfo: TcxCustomEditPopupWindowViewInfo); -var - R, R1: TRect; - A: Integer; - ABorderColor: TColor; - AClientEdgeWidth: Integer; -begin - with AViewInfo do - begin - R := Rect(0, 0, Bounds.Right - Bounds.Left, Bounds.Bottom - Bounds.Top); - - if Shadow then - begin - Dec(R.Right, cxEditShadowWidth); - Dec(R.Bottom, cxEditShadowWidth); - DrawContainerShadow(ACanvas, R); - end; - - DrawBorder(ACanvas, R); - - if SysPanelStyle and ((BorderStyle = epbsSingle) or (CloseButtonNativeState <> TC_NONE)) then - begin - if Painter <> nil then - ABorderColor := Painter.GetContainerBorderColor(False) - else - ABorderColor := clBtnText; - R1 := ClientRect; - AClientEdgeWidth := GetEditPopupWindowClientEdgeWidth(AViewInfo); - if ClientEdge then - InflateRect(R1, AClientEdgeWidth, AClientEdgeWidth); - if SizeGripCorner in [ecoTopLeft, ecoTopRight] then - InternalPolyLine(ACanvas, [Point(R1.Left, R1.Top - 1), Point(R1.Right, R1.Top - 1)], ABorderColor, True) - else - InternalPolyLine(ACanvas, [Point(R1.Left, R1.Bottom), Point(R1.Right, R1.Bottom)], ABorderColor, True); - end; - - if ClientEdge then - begin - A := SysPanelHeight; - if SysPanelStyle and (NativeStyle or (BorderStyle = epbsSingle)) then - Inc(A); - R1 := R; - if SysPanelStyle then - if SizeGripCorner in [ecoTopLeft, ecoTopRight] then - Inc(R1.Top, A) - else - Dec(R1.Bottom, A); - - ACanvas.DrawEdge(R1, True, True); - if NativeStyle or (BorderStyle <> epbsFlat) then - begin - InflateRect(R1, -1, -1); - ACanvas.DrawEdge(R1, True, False); - end; - end; - - if SysPanelStyle then - begin - if Sizeable then - begin - DrawSizeGrip(ACanvas, SizeGripRect, SizeGripCorner, - NativeStyle or (AViewInfo.Painter <> nil), AViewInfo.Painter); - ACanvas.ExcludeClipRect(SizeGripRect); - end; - - if not IsRectEmpty(CloseButtonRect) then - begin - DrawEditPopupCloseButton(ACanvas, AViewInfo); - ACanvas.ExcludeClipRect(CloseButtonRect); - end; - end; - - if Painter <> nil then - Painter.DrawWindowContent(ACanvas, ClientRect) - else - ACanvas.FillRect(ClientRect, clBtnFace); - - A := SysPanelHeight; - if SizeGripCorner in [ecoTopLeft, ecoTopRight] then - R.Bottom := R.Top + A - else - R.Top := R.Bottom - A; - - if Painter <> nil then - Painter.DrawWindowContent(ACanvas, R) - else - ACanvas.FillRect(R, clBtnFace); - end; -end; - -procedure DrawPopupEditPopupWindowBorder(ACanvas: TcxCanvas; AViewInfo: TcxCustomEditPopupWindowViewInfo; - var R: TRect); -begin - with AViewInfo do - if not NativeStyle and (BorderStyle = epbsFrame3D) then - begin - ACanvas.DrawEdge(R, False, True); - InflateRect(R, -1, -1); - ACanvas.DrawEdge(R, False, False); - InflateRect(R, -1, -1); - ACanvas.FrameRect(R, clInactiveBorder); - InflateRect(R, -1, -1); - ACanvas.FrameRect(R, clBtnFace); - InflateRect(R, -1, -1); - end - else - DrawEditPopupWindowBorder(ACanvas, AViewInfo, R); -end; - -procedure SetEditPopupWindowShadowRegion(APopupWindow: TcxCustomEditPopupWindow); -var - R: TRect; - AExcludeRect: TRect; -begin - AExcludeRect := cxEmptyRect; - R := GetControlRect(APopupWindow); - with APopupWindow.ViewInfo do - begin - if not NativeStyle then - if Shadow then - begin - Dec(R.Right, cxEditShadowWidth); - Dec(R.Bottom, cxEditShadowWidth); - if SizeGripCorner in [ecoTopLeft, ecoTopRight] then - begin - AExcludeRect := APopupWindow.OwnerScreenBounds; - AExcludeRect.TopLeft := APopupWindow.ScreenToClient(AExcludeRect.TopLeft); - AExcludeRect.BottomRight := APopupWindow.ScreenToClient(AExcludeRect.BottomRight); - Dec(AExcludeRect.Right, cxEditShadowWidth); - AExcludeRect.Bottom := APopupWindow.Height; - AExcludeRect.Top := AExcludeRect.Bottom - cxEditShadowWidth; - end; - end; - SetWindowShadowRegion(APopupWindow.Handle, R, cxEmptyRect, - NativeStyle, Shadow, AExcludeRect); - end; -end; - -{ TcxCustomEditPopupWindowViewInfo } - -procedure TcxCustomEditPopupWindowViewInfo.Calculate; -begin - CalculateEditPopupWindowViewInfo(Self); -end; - -procedure TcxCustomEditPopupWindowViewInfo.DrawBorder(ACanvas: TcxCanvas; var R: TRect); -begin - DrawEditPopupWindowBorder(ACanvas, Self, R); -end; - -function TcxCustomEditPopupWindowViewInfo.GetBorderExtent: TRect; -begin - Result := GetEditPopupWindowFrameExtent(Self); -end; - -function TcxCustomEditPopupWindowViewInfo.GetClientExtent: TRect; -begin - Result := GetBorderExtent; -end; - -function TcxCustomEditPopupWindowViewInfo.GetSysPanelHeight: Integer; -begin - Result := GetEditPopupWindowSysPanelDefaultHeight(Self); - if (MinSysPanelHeight > 0) and (Result < MinSysPanelHeight) then - Result := MinSysPanelHeight; -end; - -function TcxCustomEditPopupWindowViewInfo.IsSizingPlace(X, Y: Integer): Boolean; -const - AHorzFlagMap: array[TcxEditCorner] of Integer = (-1, 1, -1, 1); - AVertFlagMap: array[TcxEditCorner] of Integer = (-1, -1, 1, 1); -var - P: TPoint; - ALeftCorner, ARightCorner, ATopCorner, ABottomCorner: Boolean; -begin - Result := False; - if not Sizeable then - Exit; - P := Point(X, Y); - if not PtInRect(Bounds, P) then - Exit; - if PtInRect(SizingRegionBounds, P) and not PtInRect(SizeGripSizingRect, P) then - Exit; - Result := True; - - if PtInRect(SizeGripSizingRect, P) then - begin - FHorzFlag := AHorzFlagMap[SizeGripCorner]; - FVertFlag := AVertFlagMap[SizeGripCorner]; - Exit; - end; - - ALeftCorner := SizeGripCorner in [ecoTopLeft, ecoBottomLeft]; - ARightCorner := SizeGripCorner in [ecoTopRight, ecoBottomRight]; - ATopCorner := SizeGripCorner in [ecoTopLeft, ecoTopRight]; - ABottomCorner := SizeGripCorner in [ecoBottomLeft, ecoBottomRight]; - - FHorzFlag := 0; - if (X < SizingOffset) and ALeftCorner then - FHorzFlag := -1; - if (X >= Bounds.Right - SizingOffset) and ARightCorner then - FHorzFlag := 1; - - FVertFlag := 0; - if (Y < SizingOffset) and ATopCorner then - FVertFlag := -1; - if (Y >= Bounds.Bottom - SizingOffset) and ABottomCorner then - FVertFlag := 1; - - if SizeGripCorner in [ecoTopLeft, ecoTopRight] then - begin - if FVertFlag = 1 then - begin - if (X >= SizingRegionBounds.Left) and (X < SizingRegionBounds.Right) then - FHorzFlag := 0; - FVertFlag := 0; - end; - end else - begin - if FVertFlag = -1 then - begin - if (X >= SizingRegionBounds.Left) and (X < SizingRegionBounds.Right) then - FHorzFlag := 0; - FVertFlag := 0; - end; - end; - - if SysPanelStyle then - if SizeGripCorner in [ecoTopLeft, ecoBottomLeft] then - begin - if FHorzFlag = 1 then - begin - if (Y >= SizingRegionBounds.Top) and (Y < SizingRegionBounds.Bottom) then - FVertFlag := 0; - FHorzFlag := 0; - end; - end else - begin - if FHorzFlag = -1 then - begin - if (Y >= SizingRegionBounds.Top) and (Y < SizingRegionBounds.Bottom) then - FVertFlag := 0; - FHorzFlag := 0; - end; - end; -end; - -function TcxCustomEditPopupWindowViewInfo.DrawCustomBorder(ACanvas: TcxCanvas; const R: TRect; out ABorderWidth: Integer): Boolean; -begin - Result := False; - ABorderWidth := 0; - if Assigned(FOnCustomDrawBorder) then - FOnCustomDrawBorder(Self, ACanvas, R, Result, ABorderWidth); -end; - -procedure TcxCustomEditPopupWindowViewInfo.InternalPaint(ACanvas: TcxCanvas); -begin - DrawEditPopupWindowFrame(ACanvas, Self); -end; - -{ TcxCustomEditPopupWindow } - -constructor TcxCustomEditPopupWindow.Create(AOwnerControl: TWinControl); -begin - inherited Create(AOwnerControl); - ViewInfo.CloseButtonState := cxbsNormal; -end; - -destructor TcxCustomEditPopupWindow.Destroy; -begin - FreeAndNil(FSizeFrame); - inherited Destroy; -end; - -function TcxCustomEditPopupWindow.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomEditPopupWindowViewInfo; -end; - -procedure TcxCustomEditPopupWindow.Popup(AFocusedControl: TWinControl); -begin - if not IsOwnerControlVisible then - Edit.DoFinalizePopup; - inherited Popup(AFocusedControl); -end; - -function TcxCustomEditPopupWindow.AcceptsAnySize: Boolean; -begin - Result := Edit.ActiveProperties.PopupWindowAcceptsAnySize; -end; - -procedure TcxCustomEditPopupWindow.AdjustClientRect(var Rect: TRect); -var - AClientExtent: TRect; -begin - AClientExtent := ViewInfo.GetClientExtent; - ExtendRect(Rect, AClientExtent); -end; - -function TcxCustomEditPopupWindow.CalculatePosition: TPoint; -const - ASizeGripCornerMap: array[Boolean, Boolean] of TcxEditCorner = ( - (ecoTopLeft, ecoBottomLeft), - (ecoTopRight, ecoBottomRight) - ); -var - ALeftFlag, ATopFlag: Boolean; - AOwnerRect: TRect; - ADesktopWorkArea: TRect; -begin - OwnerBounds := Edit.GetPopupWindowOwnerControlBounds; - Result := inherited CalculatePosition; - - AOwnerRect := OwnerScreenBounds; - ADesktopWorkArea := GetDesktopWorkArea(Point(Result.X, Result.Y)); - - ALeftFlag := (AlignHorz = pahRight) and (Result.X + Width = AOwnerRect.Right) and (Result.X > ADesktopWorkArea.Left) or {pahRight + pdVertical} - (Result.X + Width = AOwnerRect.Left) or {pahLeft + pdHorizontal} - (Result.X + Width = ADesktopWorkArea.Right) and (Result.X < AOwnerRect.Right); - ATopFlag := (AlignVert = pavBottom) and (Result.Y + Height = AOwnerRect.Bottom) and (Result.Y > ADesktopWorkArea.Top) or {pavBottom + pdHorizontal} - (Result.Y + Height = AOwnerRect.Top) or {pavTop + pdVertical} - (Result.Y + Height = ADesktopWorkArea.Bottom) and (Result.Y < AOwnerRect.Bottom); - - ViewInfo.SizeGripCorner := ASizeGripCornerMap[not ALeftFlag, not ATopFlag]; - - if Shadow and ATopFlag then - Inc(Result.Y, cxEditShadowWidth); -end; - -procedure TcxCustomEditPopupWindow.CalculateSize; -var - AClientExtent: TRect; - AMinSize: TSize; - APreferredWidth, APreferredHeight: Integer; - APopupWindowVisualAreaSize: TSize; -begin - ViewInfo.SizeGripCorner := ecoBottomRight; - OwnerBounds := Edit.GetPopupWindowOwnerControlBounds; - AClientExtent := ViewInfo.GetClientExtent; - AMinSize := MinSize; - APopupWindowVisualAreaSize := Edit.GetPopupWindowClientPreferredSize; - with OwnerBounds do - begin - if PopupAutoSize then - APreferredWidth := AClientExtent.Left + AClientExtent.Right + APopupWindowVisualAreaSize.cx - else - if PopupWidth = 0 then - APreferredWidth := Right - Left - else - APreferredWidth := PopupWidth; - if Sizeable and (MinWidth > 0) and (APreferredWidth < MinWidth) then - APreferredWidth := MinWidth; - if APreferredWidth < AMinSize.cx then - APreferredWidth := AMinSize.cx; - - APreferredHeight := AMinSize.cy; - if PopupAutoSize then - APreferredHeight := AClientExtent.Top + AClientExtent.Bottom + APopupWindowVisualAreaSize.cy - else - if PopupHeight > 0 then - APreferredHeight := PopupHeight - else - if APreferredHeight < MinHeight then - APreferredHeight := MinHeight; - if Sizeable and (MinHeight > 0) and (APreferredHeight < MinHeight) then - APreferredHeight := MinHeight; - if APreferredHeight < AMinSize.cy then - APreferredHeight := AMinSize.cy; - - Width := APreferredWidth; - Height := APreferredHeight; - end; -end; - -procedure TcxCustomEditPopupWindow.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - if Edit.IsNativeStyle and IsCompositionEnabled then - Params.WindowClass.Style := Params.WindowClass.style or $20000{= CS_DROPSHADOW}; -end; - -procedure TcxCustomEditPopupWindow.DoClosed; -begin - FSizingCapture := False; - FSizingMouseMovement := False; - inherited DoClosed; -end; - -procedure TcxCustomEditPopupWindow.DoClosing; -begin - inherited DoClosing; - DrawSizeFrame(cxEmptyRect); -end; - -procedure TcxCustomEditPopupWindow.ModalCloseUp; -var - AReason: TcxEditCloseUpReason; -begin - case ModalResult of - mrOk: AReason := crEnter; - mrCancel: AReason := crCancel; - else - AReason := crUnknown; - end; - Edit.CloseUp(AReason); -end; - -procedure TcxCustomEditPopupWindow.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - P: TPoint; -begin - P := Point(X, Y); - if Button = mbLeft then - if PtInRect(ViewInfo.CloseButtonRect, P) and (ViewInfo.CloseButtonState <> cxbsPressed) then - begin - ViewInfo.CloseButtonState := cxbsPressed; - InternalInvalidateRect(ViewInfo.CloseButtonRect); - end - else - if (GetCaptureControl <> nil) and ViewInfo.IsSizingPlace(X, Y) then - begin - if FHorzFlag = -1 then - FCapturePointOffset.cx := X - else - FCapturePointOffset.cx := Width - X; - if FVertFlag = -1 then - FCapturePointOffset.cy := Y - else - FCapturePointOffset.cy := Height - Y; - FSizingCapture := True; - Cursor := cxEditMouseSizingCursorMap[FHorzFlag, FVertFlag]; - if not ShowContentWhileResize then - DrawSizeFrame(BoundsRect); - end; -end; - -procedure TcxCustomEditPopupWindow.MouseLeave(AControl: TControl); -begin - if ViewInfo.CloseButtonState <> cxbsNormal then - begin - ViewInfo.CloseButtonState := cxbsNormal; - InternalInvalidateRect(ViewInfo.CloseButtonRect); - end; - Cursor := crDefault; -end; - -procedure TcxCustomEditPopupWindow.MouseMove(Shift: TShiftState; X, Y: Integer); - - procedure CheckWorkArea(var R: TRect); - var - ADesktopWorkArea: TRect; - begin - ADesktopWorkArea := GetDesktopWorkArea(ClientToScreen(Point(X, Y))); - CheckBounds(ADesktopWorkArea, R); - end; - -var - ABoundsRect: TRect; - DX, DY: Integer; - ANewWidth, ANewHeight: Integer; - ACapturePoint: TPoint; - AOwnerRect: TRect; -begin - if FSizingCapture then - begin - ABoundsRect := BoundsRect; - if FHorzFlag = -1 then - ACapturePoint.X := FCapturePointOffset.cx - else - ACapturePoint.X := Width - FCapturePointOffset.cx; - if FVertFlag = -1 then - ACapturePoint.Y := FCapturePointOffset.cy - else - ACapturePoint.Y := Height - FCapturePointOffset.cy; - - DX := X - ACapturePoint.X; - DY := Y - ACapturePoint.Y; - - if not IsRectEmpty(ViewInfo.SizeGripSizingRect) then - begin - if (FHorzFlag = 1) and (DX > 0) and (X <= Width) and not - (PtInRect(ViewInfo.SizeGripSizingRect, ACapturePoint) and - (X >= ViewInfo.SizeGripSizingRect.Left) and (X < ViewInfo.SizeGripSizingRect.Right)) then - DX := 0; - if (FVertFlag = 1) and (Y <= Height) and (DY > 0) and not - (PtInRect(ViewInfo.SizeGripSizingRect, ACapturePoint) and - (Y >= ViewInfo.SizeGripSizingRect.Top) and (Y < ViewInfo.SizeGripSizingRect.Bottom)) then - DY := 0; - end; - - if ((ViewInfo.SizeGripCorner in [ecoTopLeft, ecoBottomLeft]) and (FHorzFlag = 1)) or - ((ViewInfo.SizeGripCorner in [ecoTopRight, ecoBottomRight]) and (FHorzFlag = -1)) then - DX := 0; - if ((ViewInfo.SizeGripCorner in [ecoTopLeft, ecoTopRight]) and (FVertFlag = 1)) or - ((ViewInfo.SizeGripCorner in [ecoBottomLeft, ecoBottomRight]) and (FVertFlag = -1)) then - DY := 0; - - if FHorzFlag = 0 then - DX := 0; - if FVertFlag = 0 then - DY := 0; - - if FHorzFlag = -1 then - Inc(ABoundsRect.Left, DX) - else - Inc(ABoundsRect.Right, DX); - if FVertFlag = -1 then - Inc(ABoundsRect.Top, DY) - else - Inc(ABoundsRect.Bottom, DY); - - ANewWidth := ABoundsRect.Right - ABoundsRect.Left; - ANewHeight := ABoundsRect.Bottom - ABoundsRect.Top; - if CanResize(ANewWidth, ANewHeight) then - if (ANewWidth <> Width) or (ANewHeight <> Height) then - begin - if ViewInfo.SizeGripCorner in [ecoTopLeft, ecoBottomLeft] then - ABoundsRect.Left := BoundsRect.Right - ANewWidth - else - ABoundsRect.Right := BoundsRect.Left + ANewWidth; - if ViewInfo.SizeGripCorner in [ecoTopLeft, ecoTopRight] then - ABoundsRect.Top := BoundsRect.Bottom - ANewHeight - else - ABoundsRect.Bottom := BoundsRect.Top + ANewHeight; - - AOwnerRect := OwnerScreenBounds; - if ABoundsRect.Left > AOwnerRect.Right - 1 then - ABoundsRect.Left := AOwnerRect.Right - 1{Left}; - if ABoundsRect.Right - 1 < AOwnerRect.Left then - ABoundsRect.Right := AOwnerRect.Left +1{Left + Width}; - - CheckWorkArea(ABoundsRect); - if not EqualRect(BoundsRect, ABoundsRect) then - begin - if ShowContentWhileResize then - ResizePopupWindow(ABoundsRect.Left, ABoundsRect.Top, ANewWidth, ANewHeight) - else - DrawSizeFrame(ABoundsRect); - end; - end; - end else - begin - if (ViewInfo.CloseButtonState <> cxbsNormal) and - not PtInRect(ViewInfo.CloseButtonRect, Point(X, Y)) then - begin - ViewInfo.CloseButtonState := cxbsNormal; - InternalInvalidateRect(ViewInfo.CloseButtonRect); - end; - if (ViewInfo.CloseButtonState = cxbsNormal) and (Shift = []) and - PtInRect(ViewInfo.CloseButtonRect, Point(X, Y)) then - begin - ViewInfo.CloseButtonState := cxbsHot; - InternalInvalidateRect(ViewInfo.CloseButtonRect); - end; - if ViewInfo.IsSizingPlace(X, Y) then - begin - FSizingMouseMovement := True; - Cursor := cxEditMouseSizingCursorMap[FHorzFlag, FVertFlag]; - end else - begin - if FSizingMouseMovement then - Cursor := crDefault; - FSizingMouseMovement := False; - end; - end; -end; - -procedure TcxCustomEditPopupWindow.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - if (Button = mbLeft) and FSizingCapture then - begin - SetCaptureControl(nil); - FSizingCapture := False; - DrawSizeFrame(cxEmptyRect); - if not ShowContentWhileResize then - ResizePopupWindow(FSizeFrameBounds.Left, FSizeFrameBounds.Top, cxRectWidth(FSizeFrameBounds), cxRectHeight(FSizeFrameBounds)); - if ViewInfo.IsSizingPlace(X, Y) then - Cursor := cxEditMouseSizingCursorMap[FHorzFlag, FVertFlag] - else - Cursor := crDefault; - end - else - if (ViewInfo.CloseButtonState = cxbsPressed) then - if CloseQuery then - begin - Edit.CloseUp(crUnknown); - if Visible then - begin - ViewInfo.CloseButtonState := cxbsHot; - InternalInvalidateRect(ViewInfo.CloseButtonRect); - end; - end else - begin - ViewInfo.CloseButtonState := cxbsHot; - InternalInvalidateRect(ViewInfo.CloseButtonRect); - end; -end; - -procedure TcxCustomEditPopupWindow.Resize; -begin - inherited Resize; - if HandleAllocated then - SetEditPopupWindowShadowRegion(Self); -end; - -procedure TcxCustomEditPopupWindow.CalculateViewInfo; -begin - ViewInfo.Bounds := GetControlRect(Self); - ViewInfo.Calculate; - ViewInfo.CloseButtonStyle := Edit.PopupControlsLookAndFeel.Kind; - ViewInfo.Painter := Style.LookAndFeel.SkinPainter; -end; - -function TcxCustomEditPopupWindow.CanResize(var NewWidth, NewHeight: Integer): Boolean; -var - AClientExtent: TRect; - AClienExtentSize: TSize; - AMinSize: TSize; - ANewVisualAreaSize, AMaxVisualAreaSize: TSize; -begin - Result := True; - if not Sizeable or (NewWidth = Width) and (NewHeight = Height) or FLockCheckSize then - Exit; - AMinSize := MinSize; - NewWidth := Max(NewWidth, Max(AMinSize.cx, MinWidth)); - NewHeight := Max(NewHeight, Max(AMinSize.cy, MinHeight)); - - if (NewHeight <> Height) or (NewWidth <> Width) then - with Edit do - if ActiveProperties.UseLookupData and ActiveProperties.IsLookupDataVisual then - begin - AClientExtent := Self.ViewInfo.GetClientExtent; - AClienExtentSize := Size(AClientExtent.Left + AClientExtent.Right, AClientExtent.Top + AClientExtent.Bottom); - ANewVisualAreaSize := Size(NewWidth - AClienExtentSize.cx, NewHeight - AClienExtentSize.cy); - AMaxVisualAreaSize := GetMaxVisualAreaSize; - if not ILookupData.CanResizeVisualArea(ANewVisualAreaSize, AMaxVisualAreaSize.cy, AMaxVisualAreaSize.cx) then - begin - NewWidth := Self.Width; - NewHeight := Self.Height; - end - else - begin - NewWidth := Max(ANewVisualAreaSize.cx + AClienExtentSize.cx, AMinSize.cx); - NewHeight := Max(ANewVisualAreaSize.cy + AClienExtentSize.cy, AMinSize.cy); - end; - end; -end; - -procedure TcxCustomEditPopupWindow.DoPopupControlKey(Key: Char); -begin - SendMessage(GetFocus, WM_CHAR, Integer(Key), 0); -end; - -procedure TcxCustomEditPopupWindow.DrawSizeFrame(const R: TRect); -var - ABorderWidth: Integer; -begin - if cxRectIsEmpty(R) then - begin - FreeAndNil(FSizeFrame); - Exit; - end; - if FSizingCapture and not IsRectEmpty(R) then - begin - ABorderWidth := GetEditPopupWindowBorderWidth(ViewInfo, False); - if ABorderWidth < 2 then - ABorderWidth := 2; - if FSizeFrame = nil then - begin - FSizeFrame := TcxSizeFrame.Create(ABorderWidth); - FSizeFrame.PopupParent := Self; - end; - FSizeFrame.Show; - FSizeFrame.DrawSizeFrame(R); - end; - FPaintedSizeFrameBounds := R; - if not IsRectEmpty(R) then - FSizeFrameBounds := R; -end; - -function TcxCustomEditPopupWindow.GetMaxVisualAreaSize: TSize; -var - AClientExtent, AEditBounds, ADesktopArea: TRect; - AShadowWidth: Integer; -begin - AClientExtent := ViewInfo.GetClientExtent; - AEditBounds := Edit.GetPopupWindowOwnerControlBounds; - if IsChildClassWindow(Edit.Handle) then - begin - AEditBounds.TopLeft := Edit.Parent.ClientToScreen(AEditBounds.TopLeft); - AEditBounds.BottomRight := Edit.Parent.ClientToScreen(AEditBounds.BottomRight); - end; - - if ViewInfo.Shadow then - AShadowWidth := cxEditShadowWidth - else - AShadowWidth := 0; - - ADesktopArea := GetDesktopWorkArea(AEditBounds.TopLeft); - - if Edit.ActiveProperties.PopupDirection = pdHorizontal then - begin - Result.cx := Max(ADesktopArea.Right - AEditBounds.Right, AEditBounds.Left - ADesktopArea.Left + AShadowWidth) + 1; - Result.cy := cxRectHeight(ADesktopArea); - end - else - begin - Result.cx := cxRectWidth(ADesktopArea); - Result.cy := Max(ADesktopArea.Bottom - AEditBounds.Bottom, AEditBounds.Top - ADesktopArea.Top + AShadowWidth); - end; - Result.cx := Result.cx - (AClientExtent.Left + AClientExtent.Right); - Result.cy := Result.cy - (AClientExtent.Top + AClientExtent.Bottom); -end; - -function TcxCustomEditPopupWindow.GetMinSize: TSize; -begin - with ViewInfo.GetClientExtent do - Result := Size(Left + Right, Top + Bottom); - if Sizeable and SysPanelStyle then - begin - with ViewInfo.CloseButtonRect do - Result.cx := Result.cx + Right - Left; - with ViewInfo.SizeGripSizingRect do - Result.cx := Result.cx + Right - Left; - Result.cx := Result.cx + 10; - end; -end; - -procedure TcxCustomEditPopupWindow.InternalInvalidateRect(const ARect: TRect); -begin - InvalidateRect(Handle, @ARect, True); -end; - -procedure TcxCustomEditPopupWindow.RefreshPopupWindow; -begin - OwnerBounds := Edit.GetPopupWindowOwnerControlBounds; - CalculateViewInfo; - Edit.PositionPopupWindowChilds(ViewInfo.ClientRect); - InternalInvalidateRect(ViewInfo.Bounds); - Refresh; -end; - -procedure TcxCustomEditPopupWindow.ResizePopupWindow(ALeft, ATop, AWidth, AHeight: Integer); -begin - Edit.FPopupSizeChanged := True; - Edit.FNeedStorePopupSize := True; - SetBounds(ALeft, ATop, AWidth, AHeight); - RefreshPopupWindow; -end; - -function TcxCustomEditPopupWindow.GetEdit: TcxCustomDropDownEdit; -begin - Result := TcxCustomDropDownEdit(OwnerControl); -end; - -function TcxCustomEditPopupWindow.GetMinSysPanelHeight: Integer; -begin - Result := ViewInfo.MinSysPanelHeight; -end; - -function TcxCustomEditPopupWindow.GetViewInfo: TcxCustomEditPopupWindowViewInfo; -begin - Result := TcxCustomEditPopupWindowViewInfo(FViewInfo); -end; - -procedure TcxCustomEditPopupWindow.SetPopupAutoSize(Value: Boolean); -begin - if Value <> FPopupAutoSize then - FPopupAutoSize := Value; -end; - -procedure TcxCustomEditPopupWindow.SetBorderStyle(Value: TcxEditPopupBorderStyle); -begin - FBorderStyle := Value; - ViewInfo.BorderStyle := Value; -end; - -procedure TcxCustomEditPopupWindow.SetClientEdge(Value: Boolean); -begin - FClientEdge := Value; - ViewInfo.ClientEdge := Value; -end; - -procedure TcxCustomEditPopupWindow.SetCloseButton(Value: Boolean); -begin - FCloseButton := Value; - ViewInfo.CloseButton := Value; -end; - -procedure TcxCustomEditPopupWindow.SetMinSysPanelHeight(Value: Integer); -begin - ViewInfo.MinSysPanelHeight := Value; -end; - -procedure TcxCustomEditPopupWindow.SetNativeStyle(Value: Boolean); -begin - FNativeStyle := Value; - ViewInfo.NativeStyle := Value; -end; - -procedure TcxCustomEditPopupWindow.SetShadow(Value: Boolean); -begin - FShadow := Value; - ViewInfo.Shadow := Value; -end; - -procedure TcxCustomEditPopupWindow.SetSizeable(Value: Boolean); -begin - FSizeable := Value; - ViewInfo.Sizeable := Value; -end; - -procedure TcxCustomEditPopupWindow.SetSysPanelStyle(Value: Boolean); -begin - FSysPanelStyle := Value; - ViewInfo.SysPanelStyle := Value; -end; - -procedure TcxCustomEditPopupWindow.CMPopupControlKey(var Message: TMessage); -begin - if IsVisible then - DoPopupControlKey(Char(Message.WParam)); -end; - -{ TcxCustomDropDownEditViewData } - -procedure TcxCustomDropDownEditViewData.Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); -begin - KeepArrowButtonPressedWhenDroppedDown := Properties.KeepArrowButtonPressedWhenDroppedDown or NativeStyle and IsCompositionEnabled; - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - with TcxCustomTextEditViewInfo(AViewInfo) do - begin - DrawSelectionBar := not IsInplace and ((Edit = nil) or - not((Properties.EditingStyle = esFixedList) and Properties.FixedListSelection and - TcxCustomDropDownEdit(Edit).FindSelection)); - if DrawSelectionBar then - DrawSelectionBar := (Properties.EditingStyle = esFixedList) and Focused and - not Transparent and not HasPopupWindow and not (NativeStyle and IsCompositionEnabled); - end; -end; - -function TcxCustomDropDownEditViewData.CanPressButton(AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: Integer): Boolean; -begin - Result := not(IsHotAndPopup and (AButtonVisibleIndex = Properties.DropDownButtonVisibleIndex)); -end; - -function TcxCustomDropDownEditViewData.GetEditNativeState(AViewInfo: TcxCustomEditViewInfo): Integer; -begin - Result := inherited GetEditNativeState(AViewInfo); - if (Result = ETS_SELECTED) and (Properties.EditingStyle = esFixedList) and not HasPopupWindow then - if csHotTrack in ContainerState then - Result := ETS_HOT - else - Result := ETS_NORMAL; -end; - -function TcxCustomDropDownEditViewData.IsButtonPressed( - AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: Integer): Boolean; -begin - Result := inherited IsButtonPressed(AViewInfo, AButtonVisibleIndex); - Result := Result or (Edit <> nil) and (HasPopupWindow or IsHotAndPopup) and - (AButtonVisibleIndex = Properties.DropDownButtonVisibleIndex) and - KeepArrowButtonPressedWhenDroppedDown; -end; - -function TcxCustomDropDownEditViewData.GetProperties: TcxCustomDropDownEditProperties; -begin - Result := TcxCustomDropDownEditProperties(FProperties); -end; - -{ TcxCustomDropDownEditProperties } - -constructor TcxCustomDropDownEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FImmediateDropDown := True; - Buttons.Add; - Buttons[0].Kind := bkDown; - FGlyphButtonIndex := DropDownButtonVisibleIndex; - FPopupDirection := pdVertical; - FPopupHorzAlignment := pahLeft; - FPopupVertAlignment := pavBottom; - FPopupAutoSize := True; -end; - -procedure TcxCustomDropDownEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomDropDownEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomDropDownEditProperties do - begin - Self.ButtonGlyph := ButtonGlyph; - Self.ImmediateDropDown := ImmediateDropDown; - Self.ImmediatePopup := ImmediatePopup; - Self.KeepArrowButtonPressedWhenDroppedDown := KeepArrowButtonPressedWhenDroppedDown; - Self.PopupAutoSize := PopupAutoSize; - Self.PopupClientEdge := PopupClientEdge; - Self.PopupDirection := PopupDirection; - Self.PopupHeight := PopupHeight; - Self.PopupHorzAlignment := PopupHorzAlignment; - Self.PopupMinHeight := PopupMinHeight; - Self.PopupMinWidth := PopupMinWidth; - Self.PopupSizeable := PopupSizeable; - Self.PopupSysPanelStyle := PopupSysPanelStyle; - Self.PopupVertAlignment := PopupVertAlignment; - Self.PopupWidth := PopupWidth; - Self.PostPopupValueOnTab := PostPopupValueOnTab; - - Self.OnClosePopup := OnClosePopup; - Self.OnCloseQuery := OnCloseQuery; - Self.OnCloseUp := OnCloseUp; - Self.OnInitPopup := OnInitPopup; - Self.OnPopup := OnPopup; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomDropDownEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxCustomDropDownEdit; -end; - -class function TcxCustomDropDownEditProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomDropDownEditViewData; -end; - -function TcxCustomDropDownEditProperties.IsLookupDataVisual: Boolean; -begin - Result := True; -end; - -procedure TcxCustomDropDownEditProperties.DoChanged; -begin - BeginUpdate; - try - if DropDownButtonVisibleIndex < Buttons.VisibleCount then - with Buttons[DropDownButtonVisibleIndex] do - begin - if VerifyBitmap(Glyph) then - Kind := bkGlyph - else - if Kind = bkGlyph then - Kind := bkDown; - end; - finally - EndUpdate(False); - end; - inherited; -end; - -function TcxCustomDropDownEditProperties.DropDownButtonVisibleIndex: Integer; -begin - Result := 0; -end; - -function TcxCustomDropDownEditProperties.DropDownOnClick: Boolean; -begin - Result := False; -end; - -function TcxCustomDropDownEditProperties.GetAlwaysPostEditValue: Boolean; -begin - Result := False; -end; - -class function TcxCustomDropDownEditProperties.GetPopupWindowClass: TcxCustomEditPopupWindowClass; -begin - Result := TcxCustomEditPopupWindow; -end; - -function TcxCustomDropDownEditProperties.PopupWindowAcceptsAnySize: Boolean; -begin - Result := True; -end; - -function TcxCustomDropDownEditProperties.PopupWindowCapturesFocus: Boolean; -begin - Result := False; -end; - -function TcxCustomDropDownEditProperties.GetButtonGlyph: TBitmap; -begin - if GlyphButtonIndex < Buttons.Count then - Result := Buttons[GlyphButtonIndex].Glyph - else - Result := nil; -end; - -function TcxCustomDropDownEditProperties.GetPopupAlignment: TAlignment; -const - AAlignHorzMap: array[TcxPopupAlignHorz] of TAlignment = - (taLeftJustify, taCenter, taRightJustify); -begin - Result := AAlignHorzMap[FPopupHorzAlignment]; -end; - -procedure TcxCustomDropDownEditProperties.SetButtonGlyph(Value: TBitmap); -begin - if GlyphButtonIndex < Buttons.Count then - with Buttons[GlyphButtonIndex] do - begin - Glyph := Value; - if VerifyBitmap(Glyph) then - Kind := bkGlyph - else - if Kind = bkGlyph then - Kind := bkDown; - end; -end; - -procedure TcxCustomDropDownEditProperties.SetGlyphButtonIndex(Value: Integer); -begin - if Value <> FGlyphButtonIndex then - begin - Buttons[Value].Glyph := Buttons[FGlyphButtonIndex].Glyph; - Buttons[Value].Kind := bkGlyph; - Buttons[FGlyphButtonIndex].Glyph := nil; - FGlyphButtonIndex := Value; - end; -end; - -procedure TcxCustomDropDownEditProperties.SetKeepArrowButtonPressedWhenDroppedDown( - Value: Boolean); -begin - if Value <> FKeepArrowButtonPressedWhenDroppedDown then - begin - FKeepArrowButtonPressedWhenDroppedDown := Value; - Changed; - end; -end; - -procedure TcxCustomDropDownEditProperties.SetPopupAlignment(Value: TAlignment); -const - AAlignHorzMap: array[TAlignment] of TcxPopupAlignHorz = - (pahLeft, pahRight, pahCenter); -begin - if Value = PopupAlignment then - Exit; - - FPopupHorzAlignment := AAlignHorzMap[Value]; - Changed; -end; - -procedure TcxCustomDropDownEditProperties.SetPopupClientEdge(Value: Boolean); -begin - if Value = FPopupClientEdge then - Exit; - FPopupClientEdge := Value; - Changed; -end; - -procedure TcxCustomDropDownEditProperties.SetPopupHeight(Value: Integer); -begin - if Value < FPopupMinHeight then - Value := FPopupMinHeight; - if FPopupHeight <> Value then - FPopupHeight := Value; -end; - -procedure TcxCustomDropDownEditProperties.SetPopupMinHeight(Value: Integer); -begin - if Value < 0 then - Value := 0; - FPopupMinHeight := Value; - SetPopupHeight(FPopupHeight); -end; - -procedure TcxCustomDropDownEditProperties.SetPopupMinWidth(Value: Integer); -begin - if Value < 0 then - Value := 0; - FPopupMinWidth := Value; - SetPopupWidth(FPopupWidth); -end; - -procedure TcxCustomDropDownEditProperties.SetPopupSizeable(Value: Boolean); -begin - if Value = FPopupSizeable then - Exit; - FPopupSizeable := Value; - Changed; -end; - -procedure TcxCustomDropDownEditProperties.SetPopupSysPanelStyle(Value: Boolean); -begin - if Value = FPopupSysPanelStyle then - Exit; - FPopupSysPanelStyle := Value; - Changed; -end; - -procedure TcxCustomDropDownEditProperties.SetPopupWidth(Value: Integer); -begin - if Value < 0 then - Value := 0 - else - if (Value > 0) and (Value < FPopupMinWidth) then - Value := FPopupMinWidth; - if FPopupWidth <> Value then - FPopupWidth := Value; -end; - -{ TcxEditPopupControlLookAndFeel } - -procedure TcxEditPopupControlLookAndFeel.EditStyleChanged; -var - AChangedValues: TcxLookAndFeelValues; -begin - AChangedValues := []; - if Kind <> InternalGetKind then - Include(AChangedValues, lfvKind); - if NativeStyle <> InternalGetNativeStyle then - Include(AChangedValues, lfvNativeStyle); - if SkinName <> InternalGetSkinName then - Include(AChangedValues, lfvSkinName); - if AChangedValues <> [] then - MasterLookAndFeelChanged(Self, AChangedValues); -end; - -function TcxEditPopupControlLookAndFeel.InternalGetKind: TcxLookAndFeelKind; -begin - Result := GetEditPopupWindowControlsLookAndFeelKind(Edit); -end; - -function TcxEditPopupControlLookAndFeel.InternalGetNativeStyle: Boolean; -begin - Result := Edit.ViewInfo.NativeStyle; -end; - -function TcxEditPopupControlLookAndFeel.InternalGetSkinName: string; -begin - Result := Edit.Style.LookAndFeel.SkinName; -end; - -function TcxEditPopupControlLookAndFeel.GetEdit: TcxCustomDropDownEdit; -begin - Result := TcxCustomDropDownEdit(GetOwner); -end; - -{ TcxCustomDropDownInnerEdit } - -function TcxCustomDropDownInnerEdit.GetContainer: TcxCustomDropDownEdit; -begin - Result := TcxCustomDropDownEdit(Owner); -end; - -procedure TcxCustomDropDownInnerEdit.CMHintShow(var Message: TCMHintShow); -begin - Message.Result := Integer(Container.DroppedDown); -end; - -{ TcxCustomDropDownEdit } - -destructor TcxCustomDropDownEdit.Destroy; -begin - DeleteShowPopupWindowMessages; - if FPopupWindow <> nil then - FreeAndNil(FPopupWindow); - FreeAndNil(FPopupControlsLookAndFeel); - inherited Destroy; -end; - -procedure TcxCustomDropDownEdit.Activate(var AEditData: TcxCustomEditData); -begin - inherited Activate(AEditData); - FPopupSizeChanged := TcxCustomDropDownEditData(AEditData).Initialized and - ActiveProperties.PopupSizeable; - if ActiveProperties.ImmediatePopup then - DroppedDown := True; -end; - -procedure TcxCustomDropDownEdit.ActivateByKey(Key: Char; var AEditData: TcxCustomEditData); -begin - inherited ActivateByKey(Key, AEditData); - if IsTextChar(Key) and ActiveProperties.ImmediateDropDown and - not ActiveProperties.ImmediatePopup and not SendActivationKey(Key) then - DroppedDown := True; - if not SendActivationKey(Key) and CanDropDown and (GetPopupFocusedControl <> nil) then - PostMessage(PopupWindow.Handle, CM_POPUPCONTROLKEY, Integer(Key), 0); -end; - -procedure TcxCustomDropDownEdit.ActivateByMouse(Shift: TShiftState; X, Y: Integer; - var AEditData: TcxCustomEditData); -begin - FIsActivatingByMouse := True; - try - inherited ActivateByMouse(Shift, X, Y, AEditData); - finally - FIsActivatingByMouse := False; - end; -end; - -procedure TcxCustomDropDownEdit.BeforeDestruction; -begin - if ILookupData <> nil then - ILookupData.Deinitialize; - inherited BeforeDestruction; -end; - -function TcxCustomDropDownEdit.Deactivate: Boolean; -begin - if HasPopupWindow then - CloseUp(crUnknown); - if EditData <> nil then - TcxCustomDropDownEditData(EditData).Initialized := FPopupSizeChanged; - Result := inherited Deactivate; - DeleteShowPopupWindowMessages; -end; - -function TcxCustomDropDownEdit.Focused: Boolean; -begin - Result := inherited Focused or HasPopupWindow; -end; - -class function TcxCustomDropDownEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomDropDownEditProperties; -end; - -procedure TcxCustomDropDownEdit.ContainerStyleChanged(Sender: TObject); -begin - if HandleAllocated and (FPopupControlsLookAndFeel <> nil) then - FPopupControlsLookAndFeel.EditStyleChanged; - inherited ContainerStyleChanged(Sender); -end; - -function TcxCustomDropDownEdit.CreateViewData: TcxCustomEditViewData; -begin - Result := inherited CreateViewData; - with Result as TcxCustomDropDownEditViewData do - begin - HasPopupWindow := Self.HasPopupWindow; - IsHotAndPopup := FIsHotAndPopup; - end; -end; - -procedure TcxCustomDropDownEdit.DestroyWnd; -begin - if FPopupWindow <> nil then - begin - CloseUp(crUnknown); - DoFinalizePopup; - FPopupWindow.DestroyHandle; - end; - inherited DestroyWnd; -end; - -procedure TcxCustomDropDownEdit.DoButtonDown(AButtonVisibleIndex: Integer); -begin - inherited DoButtonDown(AButtonVisibleIndex); - if AButtonVisibleIndex = ActiveProperties.DropDownButtonVisibleIndex then - DroppedDown := True; -end; - -procedure TcxCustomDropDownEdit.DoExit; -begin - CloseUp(crUnknown); - FocusChanged; - inherited DoExit; -end; - -procedure TcxCustomDropDownEdit.DoEditKeyDown(var Key: Word; Shift: TShiftState); -var - AKey: Word; -begin - AKey := TranslateKey(Key); - if (((AKey = VK_UP) or (AKey = VK_DOWN)) and (ssAlt in Shift)) or - ((AKey = VK_F4) and not (ssAlt in Shift)) then - if HasPopupWindow then - begin - CloseUp(crClose); - Key := 0; - end else - begin - DroppedDown := True; - Key := 0; - end - else - if ((AKey = VK_RETURN) or (AKey = VK_ESCAPE)) and not(ssAlt in Shift) and HasPopupWindow then - begin - FIsPopupWindowJustClosed := True; - KeyboardAction := True; - if (AKey = VK_RETURN) and DoEditing then - CloseUp(crEnter) - else - CloseUp(crCancel); - KeyboardAction := False; - if not HasPopupWindow then - begin -// if not(ActiveProperties.UseLookupData and not ILookupData.Find(DisplayValue)) then // TODO - Key := 0; - if AKey = VK_ESCAPE then - SetCaptureControl(nil); - end; - end; - if Key <> 0 then - inherited DoEditKeyDown(Key, Shift); -end; - -procedure TcxCustomDropDownEdit.DoEditKeyPress(var Key: Char); -begin - if IsTextChar(Key) and ActiveProperties.ImmediateDropDown and - not HasPopupWindow then - begin - DroppedDown := True; - - if ActiveProperties.PopupWindowCapturesFocus and (TranslateKey(Word(Key)) <> VK_RETURN) and - CanDropDown and (GetPopupFocusedControl <> nil) then - begin - PostMessage(PopupWindow.Handle, CM_POPUPCONTROLKEY, Integer(Key), 0); - Key := #0; - end; - end; - if Key <> #0 then - inherited DoEditKeyPress(Key); -end; - -procedure TcxCustomDropDownEdit.DoEditProcessTab(Shift: TShiftState); -begin - if HasPopupWindow and ActiveProperties.PostPopupValueOnTab then - CloseUp(crTab); - inherited DoEditProcessTab(Shift); -end; - -function TcxCustomDropDownEdit.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; -begin - Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); - if Result then - Exit; - if GetScrollLookupDataList(escMouseWheel) and HasPopupWindow and - ActiveProperties.UseLookupData and not ILookupData.IsEmpty then - with ILookupData do - begin - Result := True; -{$IFDEF DELPHI6} - if GetActiveControl is TControl then - TControlAccess(ActiveControl).DoMouseWheel(Shift, WheelDelta, MousePos) -{$ELSE} - if GetActiveControl is TWinControl then - TWinControlAccess(ActiveControl).DoMouseWheel(Shift, WheelDelta, MousePos) -{$ENDIF} - end; -end; - -procedure TcxCustomDropDownEdit.FocusChanged; -begin - if not ActiveProperties.PopupWindowCapturesFocus and not InnerControl.Focused then - CloseUp(crUnknown); - inherited FocusChanged; -end; - -function TcxCustomDropDownEdit.GetEditDataClass: TcxCustomEditDataClass; -begin - Result := TcxCustomDropDownEditData; -end; - -function TcxCustomDropDownEdit.GetInnerEditClass: TControlClass; -begin - Result := TcxCustomDropDownInnerEdit; -end; - -function TcxCustomDropDownEdit.GetScrollLookupDataList(AScrollCause: TcxEditScrollCause): Boolean; -begin - Result := not PropertiesChangeLocked and (not IsInplace or - (AScrollCause = escMouseWheel) or not InplaceParams.MultiRowParent or HasPopupWindow); -end; - -procedure TcxCustomDropDownEdit.Initialize; -begin - inherited Initialize; - if not IsDesigning then - CreatePopupWindow; - FSendChildrenStyle := True; - FPopupControlsLookAndFeel := TcxEditPopupControlLookAndFeel.Create(Self); - FPopupControlsLookAndFeel.OnChanged := PopupControlsLookAndFeelChanged; -end; - -procedure TcxCustomDropDownEdit.InitializeEditData; -begin - with TcxCustomDropDownEditData(EditData) do - begin - Initialized := False; - Width := ActiveProperties.PopupWidth; - Height := ActiveProperties.PopupHeight; - end; -end; - -function TcxCustomDropDownEdit.InternalGetNotPublishedStyleValues: TcxEditStyleValues; -begin - Result := inherited InternalGetNotPublishedStyleValues - - [svButtonStyle, svButtonTransparency, svGradientButtons, svPopupBorderStyle]; -end; - -function TcxCustomDropDownEdit.IsEditorKey(Key: Word; Shift: TShiftState): Boolean; -begin - Result := inherited IsEditorKey(Key, Shift) or IsInplace and HasPopupWindow and - ((Shift * [ssAlt, ssCtrl] <> []) or IsSysKey(Key)); -end; - -procedure TcxCustomDropDownEdit.PropertiesChanged(Sender: TObject); -begin - if not ActiveProperties.PopupSizeable then - FPopupSizeChanged := False; - if HasPopupWindow then - SetupPopupWindow; - inherited PropertiesChanged(Sender); -end; - -function TcxCustomDropDownEdit.HasPopupWindow: Boolean; -begin - Result := (PopupWindow <> nil) and PopupWindow.IsVisible; -end; - -procedure TcxCustomDropDownEdit.PasteFromClipboard; -var - APrevKeyboardAction: Boolean; - APrevText: string; -begin - if Focused then - begin - APrevKeyboardAction := KeyboardAction; - KeyboardAction := True; - try - APrevText := InnerTextEdit.EditValue; - inherited PasteFromClipboard; - if not InternalCompareString(APrevText, InnerTextEdit.EditValue, True) and - ActiveProperties.ImmediateDropDown and not HasPopupWindow then - begin - DroppedDown := True; - if ActiveProperties.UseLookupData then - PostMessage(Handle, CM_DROPDOWNBYPASTE, 0, 0); - end; - finally - KeyboardAction := APrevKeyboardAction; - end; - end - else - inherited PasteFromClipboard; -end; - -function TcxCustomDropDownEdit.CanHide: Boolean; -begin - Result := True; -end; - -procedure TcxCustomDropDownEdit.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if not FIsActivatingByMouse and ActiveProperties.DropDownOnClick and (Button = mbLeft) and - PtInRect(ViewInfo.ClientRect, Point(X, Y)) and not HasPopupWindow and - not FIsHotAndPopup and IsFocused then - DroppedDown := True; -end; - -function TcxCustomDropDownEdit.DoRefreshContainer(const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AIsMouseEvent: Boolean): Boolean; -begin - Result := inherited DoRefreshContainer(P, Button, Shift, AIsMouseEvent); - if HasPopupWindow then - with ViewInfo do - if IsButtonReallyPressed and (PressedButton = -1) then - CloseUp(crUnknown); - if AIsMouseEvent and not((Button = cxmbLeft) and (cxButtonToShift(Button) * Shift <> [])) then - SetIsHotAndPopup; - if FPopupControlsLookAndFeel <> nil then - FPopupControlsLookAndFeel.EditStyleChanged; -end; - -function TcxCustomDropDownEdit.SendActivationKey(Key: Char): Boolean; -begin - Result := not(ActiveProperties.ImmediateDropDown and ActiveProperties.PopupWindowCapturesFocus and - (TranslateKey(Word(Key)) <> VK_RETURN)); -end; - -function TcxCustomDropDownEdit.TabsNeeded: Boolean; -begin - Result := inherited TabsNeeded or - HasPopupWindow and ActiveProperties.PostPopupValueOnTab; -end; - -procedure TcxCustomDropDownEdit.CreateHandle; -begin - inherited CreateHandle; - InitializeLookupData; -end; - -procedure TcxCustomDropDownEdit.DoStartDock(var DragObject: TDragObject); -begin - CloseUp(crUnknown); - inherited DoStartDock(DragObject); -end; - -function TcxCustomDropDownEdit.CanDropDown: Boolean; -begin - Result := False; -end; - -procedure TcxCustomDropDownEdit.CloseUp(AReason: TcxEditCloseUpReason); -var - APrevLookupKey: TcxEditValue; -begin - if not HasPopupWindow then - Exit; - - if FCloseUpReason = crUnknown then - FCloseUpReason := AReason; - LockChangeEvents(True); - try - if AReason in [crTab, crEnter, crClose] then - begin - if ActiveProperties.UseLookupData then - begin - APrevLookupKey := ILookupData.CurrentKey; - LockClick(True); - try - ILookupData.SelectItem; - finally - LockClick(False); - if ModifiedAfterEnter and not VarEqualsExact(APrevLookupKey, ILookupData.CurrentKey) then - DoClick; - end; - end; - if not ActiveProperties.AlwaysPostEditValue and ActiveProperties.ImmediatePost and - CanPostEditValue then - InternalPostEditValue(True); - end; - finally - LockChangeEvents(False); - end; - PopupWindow.CloseUp; -end; - -procedure TcxCustomDropDownEdit.CreatePopupWindow; -begin - with ActiveProperties do - FPopupWindow := GetPopupWindowClass.Create(Self); - FPopupWindow.CaptureFocus := ActiveProperties.PopupWindowCapturesFocus; - FPopupWindow.IsTopMost := not IsInplace; - FPopupWindow.Style.LookAndFeel.MasterLookAndFeel := Style.LookAndFeel; - FPopupWindow.BiDiMode := BiDiMode; - FPopupWindow.OnCloseQuery := PopupWindowCloseQuery; - FPopupWindow.OnClosed := PopupWindowClosed; - FPopupWindow.OnClosing := PopupWindowClosing; - FPopupWindow.OnShowed := PopupWindowShowed; - FPopupWindow.OnShowing := PopupWindowShowing; -end; - -procedure TcxCustomDropDownEdit.DeleteShowPopupWindowMessages; -begin - if (PopupWindow <> nil) and PopupWindow.HandleAllocated and - KillMessages(PopupWindow.Handle, CM_SHOWPOPUPWINDOW, CM_SHOWPOPUPWINDOW) then - PopupWindowClosed(PopupWindow); -end; - -procedure TcxCustomDropDownEdit.DoCloseQuery(var CanClose: Boolean); -begin - with Properties do - if Assigned(OnCloseQuery) then - OnCloseQuery(Self, CanClose); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnCloseQuery) then - OnCloseQuery(Self, CanClose); -end; - -procedure TcxCustomDropDownEdit.DoCloseUp; -begin - DoClosePopup(FCloseUpReason); - with Properties do - if Assigned(OnCloseUp) then - OnCloseUp(Self); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnCloseUp) then - OnCloseUp(Self); -end; - -procedure TcxCustomDropDownEdit.DoFinalizePopup; -begin - if not FPopupInitialized then - Exit; - FPopupInitialized := False; - - if ActiveProperties.UseLookupData then - ILookupData.CloseUp; - - if Assigned(Properties.OnFinalizePopup) then - Properties.OnFinalizePopup(Self); - if (RepositoryItem <> nil) and Assigned(ActiveProperties.OnFinalizePopup) then - ActiveProperties.OnFinalizePopup(Self); -end; - -procedure TcxCustomDropDownEdit.DoInitPopup; -begin - if FPopupInitialized then - Exit; - FPopupInitialized := True; - try - with Properties do - if Assigned(OnInitPopup) then - OnInitPopup(Self); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnInitPopup) then - OnInitPopup(Self); - except - FPopupInitialized := False; - raise; - end; - if ActiveProperties.UseLookupData then - ILookupData.DropDown; -end; - -procedure TcxCustomDropDownEdit.DoPopup; -begin - FCloseUpReason := crUnknown; - with Properties do - if Assigned(OnPopup) then - OnPopup(Self); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnPopup) then - OnPopup(Self); -end; - -procedure TcxCustomDropDownEdit.SetupPopupWindow; -var - P: TPoint; - {$IFDEF DELPHI6} - AParentForm: TCustomForm; - {$ENDIF} -begin - PopupWindow.CaptureFocus := ActiveProperties.PopupWindowCapturesFocus; - InitializeLookupData; - InitializePopupWindow; - PopupWindow.FLockCheckSize := True; - try - PopupWindow.CalculateSize; - P := PopupWindow.CalculatePosition; - PopupWindow.CorrectBoundsWithDesktopWorkArea(P); - finally - PopupWindow.FLockCheckSize := False; - end; - PopupWindow.SetBounds(P.X, P.Y, PopupWindow.Width, PopupWindow.Height); - PopupWindow.RefreshPopupWindow; - PositionPopupWindowChilds(PopupWindow.ViewInfo.ClientRect); - SetEditPopupWindowShadowRegion(PopupWindow); - - {$IFDEF DELPHI6} - if IsWinXPOrLater then // W2K bug - begin - AParentForm := GetParentForm(Self); - if AParentForm <> nil then - begin - PopupWindow.AlphaBlend := TCustomFormAccess(AParentForm).AlphaBlend; - PopupWindow.AlphaBlendValue := TCustomFormAccess(AParentForm).AlphaBlendValue; - PopupWindow.TransparentColor := TCustomFormAccess(AParentForm).TransparentColor; - PopupWindow.TransparentColorValue := TCustomFormAccess(AParentForm).TransparentColorValue; - end; - end; - {$ENDIF} -end; - -procedure TcxCustomDropDownEdit.UpdatePopupWindow; -begin - if HasPopupWindow then - SetupPopupWindow; -end; - -procedure TcxCustomDropDownEdit.DropDown; -begin - if not IsWindowVisible(Handle) then - Exit; - DoInitPopup; - if CanDropDown then - begin - SetupPopupWindow; - PopupWindow.HandleNeeded; - PopupWindow.FocusedControl := GetPopupFocusedControl; - PostMessage(PopupWindow.Handle, CM_SHOWPOPUPWINDOW, 0, 0); - end - else - DoFinalizePopup; -end; - -procedure TcxCustomDropDownEdit.EditButtonClick; -begin -end; - -function TcxCustomDropDownEdit.GetPopupFocusedControl: TWinControl; -var - AActiveControl: TControl; -begin - Result := InnerTextEdit.Control; - with ActiveProperties do - if (ILookupData <> nil) and IsLookupDataVisual and PopupWindowCapturesFocus then - begin - AActiveControl := ILookupData.ActiveControl; - if (AActiveControl <> nil) and (AActiveControl is TWinControl) then - Result := TWinControl(AActiveControl); - end; -end; - -function TcxCustomDropDownEdit.GetPopupWindowOwnerControlBounds: TRect; -begin - if IsInplace and not IsRectEmpty(ContentParams.ExternalBorderBounds) then - Result := ContentParams.ExternalBorderBounds - else - Result := VisibleBounds; - if ViewInfo.Shadow then - Inc(Result.Right, cxEditShadowWidth); - OffsetRect(Result, Left, Top); -end; - -procedure TcxCustomDropDownEdit.InitializeLookupData; -begin - with ActiveProperties do - if (ILookupData <> nil) and not IsDesigning and IsLookupDataVisual then - ILookupData.Initialize(PopupWindow); -end; - -procedure TcxCustomDropDownEdit.InitializePopupWindow; -begin - PopupWindow.OwnerParent := Parent; - with ActiveProperties do - begin - PopupWindow.Direction := PopupDirection; - PopupWindow.AlignHorz := PopupHorzAlignment; - PopupWindow.AlignVert := PopupVertAlignment; - PopupWindow.ClientEdge := PopupClientEdge; - PopupWindow.MinHeight := PopupMinHeight; - PopupWindow.MinWidth := PopupMinWidth; - PopupWindow.PopupAutoSize := PopupAutoSize; - PopupWindow.Sizeable := PopupSizeable; - PopupWindow.SysPanelStyle := PopupSysPanelStyle; - end; - - if IsInplace and ActiveProperties.PopupSizeable then - with TcxCustomDropDownEditData(EditData) do - begin - PopupWindow.PopupWidth := Width; - PopupWindow.PopupHeight := Height; - end - else - begin - PopupWindow.PopupWidth := ActiveProperties.PopupWidth; - PopupWindow.PopupHeight := ActiveProperties.PopupHeight; - end; - - PopupWindow.CloseButton := TcxCustomEditStyleAccess(ActiveStyle).PopupCloseButton; - - with ViewInfo do - begin - PopupWindow.BorderStyle := PopupBorderStyle; - PopupWindow.NativeStyle := NativeStyle; - PopupWindow.Shadow := Shadow; - end; -end; - -procedure TcxCustomDropDownEdit.PopupControlsLookAndFeelChanged( - Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); -begin -end; - -procedure TcxCustomDropDownEdit.PopupWindowClosed(Sender: TObject); -begin - if ActiveProperties.PopupSizeable and FNeedStorePopupSize then - if IsInplace then - begin - if EditData <> nil then - with TcxCustomDropDownEditData(EditData) do - begin - Initialized := True; - Width := PopupWindow.Width; - Height := PopupWindow.Height; - end - end else - begin - with ActiveProperties do - begin - PopupWidth := PopupWindow.Width; - PopupHeight := PopupWindow.Height; - end; - end; - - DoFinalizePopup; - - if ActiveProperties.EditingStyle = esFixedList then - ShortRefreshContainer(False); - DoCloseUp; - LockChangeEvents(True); - try - if ActiveProperties.AlwaysPostEditValue and ActiveProperties.ImmediatePost and - CanPostEditValue and ValidateEdit(True) then - InternalPostEditValue; - finally - LockChangeEvents(False); - end; - - ShortRefreshContainer(False); - if not HandleAllocated then - SetIsHotAndPopup; // perform if VK_ESC was pressed and WM_MOUSEMOVE didn't occur -end; - -procedure TcxCustomDropDownEdit.PopupWindowCloseQuery(Sender: TObject; var CanClose: Boolean); -begin - DoCloseQuery(CanClose); -end; - -procedure TcxCustomDropDownEdit.PopupWindowClosing(Sender: TObject); -begin -end; - -procedure TcxCustomDropDownEdit.PopupWindowShowing(Sender: TObject); -begin -end; - -procedure TcxCustomDropDownEdit.PopupWindowShowed(Sender: TObject); -begin - ShortRefreshContainer(False); - PopupWindow.CalculateViewInfo; - PositionPopupWindowChilds(PopupWindow.ViewInfo.ClientRect); - DoPopup; - UpdateDrawValue; - with ActiveProperties do - if UseLookupData and FindSelection and ImmediateDropDown and - PopupWindowCapturesFocus then - ILookupData.DroppedDown(Copy(DisplayValue, 1, SelStart)); - FNeedStorePopupSize := False; -end; - -procedure TcxCustomDropDownEdit.PositionPopupWindowChilds(const AClientRect: TRect); -begin - ILookupData.PositionVisualArea(AClientRect); -end; - -procedure TcxCustomDropDownEdit.SetIsHotAndPopup; -begin - FIsHotAndPopup := HasPopupWindow and (csHotTrack in ViewInfo.ContainerState); -end; - -procedure TcxCustomDropDownEdit.DropDownByPasteHandler; -var - APrevLookupKey: TcxEditValue; -begin - if not HasPopupWindow then - Exit; - - APrevLookupKey := ILookupData.CurrentKey; - LockClick(True); - try - ILookupData.TextChanged; - finally - LockClick(False); - if not VarEqualsExact(APrevLookupKey, ILookupData.CurrentKey) then - DoClick; - end; - - case ActiveProperties.EditingStyle of - esFixedList: - FindSelection := True; - esEdit: - FindSelection := (SelStart = Length(Text)) and ILookupData.Find(Text); - end; -end; - -function TcxCustomDropDownEdit.GetDroppedDown: Boolean; -begin - Result := HasPopupWindow; -end; - -function TcxCustomDropDownEdit.GetProperties: TcxCustomDropDownEditProperties; -begin - Result := TcxCustomDropDownEditProperties(FProperties); -end; - -function TcxCustomDropDownEdit.GetActiveProperties: TcxCustomDropDownEditProperties; -begin - Result := TcxCustomDropDownEditProperties(InternalGetActiveProperties); -end; - -procedure TcxCustomDropDownEdit.SetDroppedDown(Value: Boolean); -var - AMsg: TMsg; -begin - if DroppedDown <> Value then - if not Value then - CloseUp(crUnknown) - else - if not PeekMessage(AMsg, PopupWindow.Handle, CM_SHOWPOPUPWINDOW, CM_SHOWPOPUPWINDOW, PM_NOREMOVE) then - DropDown; -end; - -procedure TcxCustomDropDownEdit.SetProperties(Value: TcxCustomDropDownEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomDropDownEdit.CMBiDiModeChanged(var Message: TMessage); -begin - inherited; - if PopupWindow <> nil then - PopupWindow.BiDiMode := BiDiMode; -end; - -procedure TcxCustomDropDownEdit.CMDropDownByPaste(var Message: TMessage); -begin - DropDownByPasteHandler; -end; - -procedure TcxCustomDropDownEdit.CMHintShow(var Message: TCMHintShow); -begin - inherited; - Message.Result := Message.Result + Integer(DroppedDown); -end; - -{ TcxFilterDropDownEditHelper } - -class function TcxFilterDropDownEditHelper.EditPropertiesHasButtons: Boolean; -begin - Result := True; -end; - -{ TcxComboBoxPopupWindow } - -procedure TcxComboBoxPopupWindow.CalculateSize; -var - AClientExtent: TRect; - AMinSize: TSize; - APreferredWidth, APreferredHeight: Integer; - APopupWindowVisualAreaSize: TSize; - ASizeChanged: Boolean; -begin - ViewInfo.SizeGripCorner := ecoBottomRight; - OwnerBounds := Edit.GetPopupWindowOwnerControlBounds; - AClientExtent := ViewInfo.GetClientExtent; - AMinSize := MinSize; - APopupWindowVisualAreaSize := Edit.GetPopupWindowClientPreferredSize; - ASizeChanged := Edit.FPopupSizeChanged; - if Sizeable and ASizeChanged or not PopupAutoSize and (PopupWidth > 0) then - APreferredWidth := PopupWidth - else - if PopupAutoSize then - begin - APreferredWidth := APopupWindowVisualAreaSize.cx + AClientExtent.Left + AClientExtent.Right; - APreferredWidth := Max(APreferredWidth, cxRectWidth(OwnerBounds)); - end - else - APreferredWidth := cxRectWidth(OwnerBounds); - - if not(Sizeable and ASizeChanged) and (PopupHeight = 0) or - not Sizeable and PopupAutoSize then - APreferredHeight := APopupWindowVisualAreaSize.cy + AClientExtent.Top + - AClientExtent.Bottom - else - APreferredHeight := PopupHeight; - - if Sizeable then - begin - APreferredWidth := Max(APreferredWidth, MinWidth); - APreferredHeight := Max(APreferredHeight, MinHeight); - end; - APreferredWidth := Max(APreferredWidth, AMinSize.cx); - APreferredHeight := Max(APreferredHeight, AMinSize.cy); - - Width := APreferredWidth; - Height := APreferredHeight; -end; - -{ TcxCustomComboBoxListBox } - -constructor TcxCustomComboBoxListBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - Style := lbOwnerDrawVariable; -end; - -function TcxCustomComboBoxListBox.GetHeight(ARowCount: Integer; AMaxHeight: Integer): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ARowCount - 1 do - Inc(Result, GetItemHeight(I)); -end; - -procedure TcxCustomComboBoxListBox.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - if Edit.IsOnDrawItemEventAssigned then - with Params.WindowClass do - style := style or CS_HREDRAW; -end; - -function TcxCustomComboBoxListBox.DoDrawItem(AIndex: Integer; const ARect: TRect; - AState: TOwnerDrawState): Boolean; -begin - Result := Edit.IsOnDrawItemEventAssigned; - if Result then - Edit.DoOnDrawItem(Canvas, AIndex, ARect, AState); -end; - -function TcxCustomComboBoxListBox.GetItem(Index: Integer): string; -begin - Result := Edit.LookupData.GetItem(Index); -end; - -procedure TcxCustomComboBoxListBox.MeasureItem(Index: Integer; var Height: Integer); -begin - Height := GetItemHeight(Index); -end; - -procedure TcxCustomComboBoxListBox.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - if (Edit <> nil) and Edit.PopupMouseMoveLocked then - Edit.PopupMouseMoveLocked := False - else - inherited MouseMove(Shift, X, Y); -end; - -procedure TcxCustomComboBoxListBox.RecreateWindow; -begin - InternalRecreateWindow; -end; - -function TcxCustomComboBoxListBox.GetEdit: TcxCustomComboBox; -begin - Result := TcxCustomComboBox(inherited Edit); -end; - -{ TcxComboBoxListBox } - -function TcxComboBoxListBox.GetItemHeight(AIndex: Integer = -1): Integer; -begin - if Edit.ActiveProperties.ItemHeight > 0 then - Result := Edit.ActiveProperties.ItemHeight - else - Result := inherited GetItemHeight; - if (AIndex >= 0) and Edit.IsOnMeasureItemEventAssigned then - Edit.DoOnMeasureItem(AIndex, Canvas, Result); -end; - -procedure TcxComboBoxListBox.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - AItemIndex: Integer; -begin - inherited MouseUp(Button, Shift, X, Y); - if Button <> mbLeft then - Exit; - AItemIndex := ItemAtPos(Point(X, Y), True); - if AItemIndex <> -1 then - begin - SetCaptureControl(nil); - ItemIndex := AItemIndex; - Edit.CloseUp(crEnter); - end; -end; - -procedure TcxComboBoxListBox.RecreateWindow; -begin - ItemHeight := GetItemHeight; - if Edit.IsOnMeasureItemEventAssigned then - Style := lbOwnerDrawVariable - else - Style := lbOwnerDrawFixed; -end; - -procedure TcxComboBoxListBox.SetItemIndex(const Value: Integer); -begin - Edit.PopupMouseMoveLocked := True; - inherited SetItemIndex(Value); -end; - -procedure TcxComboBoxListBox.Resize; -var - ARgn: HRGN; -begin - if not Edit.HasPopupWindow then - Exit; - if HScrollBar.Visible and VScrollBar.Visible then - begin - ARgn := CreateRectRgnIndirect(GetSizeGripRect); - SendMessage(Handle, WM_NCPAINT, ARgn, 0); - DeleteObject(ARgn); - end; -end; - -{ TcxComboBoxLookupData } - -function TcxComboBoxLookupData.CanResizeVisualArea(var NewSize: TSize; - AMaxHeight: Integer = 0; AMaxWidth: Integer = 0): Boolean; -var - I: Integer; - AItemCount: Integer; - AItemHeight: Integer; - AListClientSize, AListSize: TSize; - AMinWidth: Integer; - AScrollBarSize: TSize; - AVScrollBar: Boolean; -begin - Result := True; - if (NewSize.cx = List.Width) and (NewSize.cy = List.Height) then - Exit; - if AMaxHeight = 0 then - AMaxHeight := MaxInt; - if AMaxWidth = 0 then - AMaxWidth := MaxInt; - AItemCount := GetItemCount; - AListClientSize.cy := 0; - AScrollBarSize := GetScrollBarSize; - AVScrollBar := False; - for I := 0 to AItemCount - 1 do - begin - AItemHeight := List.GetItemHeight(I); - AListClientSize.cy := AListClientSize.cy + AItemHeight; - AListSize.cy := AListClientSize.cy; - AListClientSize.cx := NewSize.cx; - AVScrollBar := I < AItemCount - 1; - if AVScrollBar then - AListClientSize.cx := AListClientSize.cx - AScrollBarSize.cx; - if (AListClientSize.cx < List.ScrollWidth) or (AListClientSize.cx > AMaxWidth) then - AListSize.cy := AListSize.cy + AScrollBarSize.cy; - if (AListSize.cy = NewSize.cy) and not (AListSize.cy > AMaxHeight) then - Break; - if (AListSize.cy > NewSize.cy) or (AListSize.cy > AMaxHeight) then - if (AListSize.cy > AMaxHeight) or (NewSize.cy >= List.Height) then - begin - AListClientSize.cy := AListClientSize.cy - AItemHeight; - AListSize.cy := AListClientSize.cy; - AListClientSize.cx := NewSize.cx; - AVScrollBar := I < AItemCount; - if AVScrollBar then - AListClientSize.cx := AListClientSize.cx - AScrollBarSize.cx; - if (AListClientSize.cx < List.ScrollWidth) or (AListClientSize.cx > AMaxWidth) then - AListSize.cy := AListSize.cy + AScrollBarSize.cy; - Break; - end - else - if NewSize.cy < List.Height then - Break; - end; - NewSize.cy := AListSize.cy; - AMinWidth := 0; - if AVScrollBar then - Inc(AMinWidth, AScrollBarSize.cx); - if AListSize.cy > AListClientSize.cy then - Inc(AMinWidth, AScrollBarSize.cx); - NewSize.cx := Max(NewSize.cx, AMinWidth); -end; - -function TcxComboBoxLookupData.GetVisualAreaPreferredSize(AMaxHeight: Integer; - AWidth: Integer = 0): TSize; -var - AItemWidth: Integer; - AListRowCount, I: Integer; -begin - AListRowCount := GetItemCount; - with TcxCustomComboBoxProperties(ActiveProperties) do - if AListRowCount > DropDownRows then - AListRowCount := DropDownRows; - Result.cy := List.GetHeight(AListRowCount, AMaxHeight); - Result.cx := 0; - for I := 0 to GetItemCount - 1 do - begin - AItemWidth := List.GetItemWidth(I); - if AItemWidth > Result.cx then - Result.cx := AItemWidth; - end; - Result.cx := Result.cx + 4; - List.SetScrollWidth(Result.cx); - with TcxCustomComboBoxProperties(ActiveProperties) do - if (GetItemCount > DropDownRows) or (AMaxHeight > 0) and (Result.cy > AMaxHeight) then - Result.cx := Result.cx + GetScrollBarSize.cx; - if (AWidth > 0) and (Result.cx > AWidth) then - Result.cy := Result.cy + GetScrollBarSize.cy; -end; - -procedure TcxComboBoxLookupData.Initialize(AVisualControlsParent: TWinControl); -begin - inherited Initialize(AVisualControlsParent); - List.LookAndFeel.MasterLookAndFeel := - TcxCustomDropDownEdit(Edit).PopupControlsLookAndFeel; -end; - -function TcxComboBoxLookupData.GetListBoxClass: TcxCustomEditListBoxClass; -begin - Result := TcxComboBoxListBox; -end; - -{ TcxCustomComboBoxViewData } - -procedure TcxCustomComboBoxViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); -var - AItemIndex: Integer; -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, - AIsMouseEvent); - - if (Properties.DropDownListStyle = lsFixedList) and Assigned(Edit) and - TcxCustomComboBox(Edit).IsOnDrawItemEventAssigned then - AItemIndex := TcxCustomComboBox(Edit).ItemIndex - else - AItemIndex := -1; - - with TcxCustomComboBoxViewInfo(AViewInfo) do - begin - ItemIndex := AItemIndex; - IsOwnerDrawing := ItemIndex <> -1; - end; -end; - -procedure TcxCustomComboBoxViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -begin - inherited EditValueToDrawValue(ACanvas, AEditValue, AViewInfo); - with TcxCustomComboBoxViewInfo(AViewInfo) do - begin - if (Properties.DropDownListStyle = lsFixedList) and Assigned(Properties.OnDrawItem) then - ItemIndex := Properties.LookupItems.IndexOf(VarToStr(AEditValue)) - else - ItemIndex := -1; - IsOwnerDrawing := ItemIndex <> -1; - end; -end; - -function TcxCustomComboBoxViewData.IsComboBoxStyle: Boolean; -begin - Result := True; -end; - -function TcxCustomComboBoxViewData.GetProperties: TcxCustomComboBoxProperties; -begin - Result := TcxCustomComboBoxProperties(FProperties); -end; - -{ TcxCustomComboBoxViewInfo } - -constructor TcxCustomComboBoxViewInfo.Create; -begin - inherited Create; - CustomDrawHandler := DoCustomDraw; -end; - -procedure TcxCustomComboBoxViewInfo.DoCustomDraw(ACanvas: TcxCanvas; ARect: TRect); -var - AState: TOwnerDrawState; - ATextColor: TColor; -begin - AState := [odComboBoxEdit]; - if Focused then - AState := AState + [odSelected, odFocused]; - - if DrawSelectionBar then - begin - ACanvas.Brush.Color := clHighlight; - ATextColor := clHighlightText; - end - else - begin - ACanvas.Brush.Color := BackgroundColor; - ATextColor := TextColor; - end; - ACanvas.Font := Font; - ACanvas.Font.Color := ATextColor; - PrepareCanvasFont(ACanvas.Canvas); - - if Edit = nil then - TcxCustomComboBoxProperties(EditProperties).OnDrawItem(nil, ACanvas, - ItemIndex, ARect, AState) - else - Edit.DoOnDrawItem(ACanvas, ItemIndex, ARect, AState); -end; - -function TcxCustomComboBoxViewInfo.GetEdit: TcxCustomComboBox; -begin - Result := TcxCustomComboBox(FEdit); -end; - -{ TcxCustomComboBoxProperties } - -constructor TcxCustomComboBoxProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FDropDownListStyle := lsEditList; - FDropDownRows := cxEditDefaultDropDownPageRowCount; -end; - -procedure TcxCustomComboBoxProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomComboBoxProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomComboBoxProperties do - begin - Self.DropDownListStyle := DropDownListStyle; - Self.DropDownRows := DropDownRows; - Self.ItemHeight := ItemHeight; - Self.Revertable := Revertable; - - Self.OnDrawItem := OnDrawItem; - Self.OnMeasureItem := OnMeasureItem; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomComboBoxProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxComboBox; -end; - -class function TcxCustomComboBoxProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomComboBoxViewInfo; -end; - -function TcxCustomComboBoxProperties.DropDownOnClick: Boolean; -begin - Result := DropDownListStyle = lsFixedList; -end; - -function TcxCustomComboBoxProperties.GetDropDownPageRowCount: Integer; -begin - Result := DropDownRows; -end; - -function TcxCustomComboBoxProperties.GetEditingStyle: TcxEditEditingStyle; -const - AEditingStyleMap: array[TcxEditDropDownListStyle] of TcxEditEditingStyle = - (esEditList, esEdit, esFixedList); -begin - Result := AEditingStyleMap[DropDownListStyle]; -end; - -class function TcxCustomComboBoxProperties.GetLookupDataClass: TcxInterfacedPersistentClass; -begin - Result := TcxComboBoxLookupData; -end; - -class function TcxCustomComboBoxProperties.GetPopupWindowClass: TcxCustomEditPopupWindowClass; -begin - Result := TcxComboBoxPopupWindow; -end; - -class function TcxCustomComboBoxProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomComboBoxViewData; -end; - -function TcxCustomComboBoxProperties.UseLookupData: Boolean; -begin - Result := True; -end; - -function TcxCustomComboBoxProperties.GetDropDownAutoWidth: Boolean; -begin - Result := PopupAutoSize; -end; - -function TcxCustomComboBoxProperties.GetDropDownSizeable: Boolean; -begin - Result := PopupSizeable; -end; - -function TcxCustomComboBoxProperties.GetDropDownWidth: Integer; -begin - Result := PopupWidth; -end; - -function TcxCustomComboBoxProperties.GetItems: TStrings; -begin - Result := LookupItems; -end; - -function TcxCustomComboBoxProperties.GetSorted: Boolean; -begin - Result := LookupItemsSorted; -end; - -procedure TcxCustomComboBoxProperties.SetDropDownAutoWidth(Value: Boolean); -begin - PopupAutoSize := Value; -end; - -procedure TcxCustomComboBoxProperties.SetDropDownListStyle(Value: TcxEditDropDownListStyle); -begin - if Value = FDropDownListStyle then - Exit; - FDropDownListStyle := Value; - Changed; -end; - -procedure TcxCustomComboBoxProperties.SetDropDownRows(Value: Integer); -begin - if (Value >= 1) and (Value <> FDropDownRows) then - begin - FDropDownRows := Value; - Changed; - end; -end; - -procedure TcxCustomComboBoxProperties.SetDropDownSizeable(Value: Boolean); -begin - PopupSizeable := Value; -end; - -procedure TcxCustomComboBoxProperties.SetDropDownWidth(Value: Integer); -begin - PopupWidth := Value; -end; - -procedure TcxCustomComboBoxProperties.SetItemHeight(Value: Integer); -begin - if Value <> FItemHeight then - begin - FItemHeight := Value; - Changed; - end; -end; - -procedure TcxCustomComboBoxProperties.SetItems(Value: TStrings); -begin - LookupItems := Value; -end; - -procedure TcxCustomComboBoxProperties.SetSorted(Value: Boolean); -begin - LookupItemsSorted := Value; -end; - -{ TcxCustomComboBoxInnerEdit } - -procedure TcxCustomComboBoxInnerEdit.WMLButtonUp(var Message: TWMLButtonUp); -begin - ControlState := ControlState - [csClicked]; - inherited; -end; - -{ TcxCustomComboBox } - -procedure TcxCustomComboBox.Activate(var AEditData: TcxCustomEditData); -begin - inherited Activate(AEditData); - SynchronizeItemIndex; -end; - -class function TcxCustomComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomComboBoxProperties; -end; - -function TcxCustomComboBox.CanDropDown: Boolean; -begin - Result := not((ILookupData <> nil) and (ILookupData.IsEmpty)); // TODO ??? -end; - -procedure TcxCustomComboBox.ChangeHandler(Sender: TObject); -var - APrevLookupKey: TcxEditValue; -begin - APrevLookupKey := ILookupData.CurrentKey; - LockChangeEvents(True); - LockClick(True); - try - inherited ChangeHandler(Sender); - if CanSynchronizeLookupData then - ILookupData.TextChanged; - finally - LockClick(False); - LockChangeEvents(False); - if (*ModifiedAfterEnter and *)not VarEqualsExact(APrevLookupKey, ILookupData.CurrentKey) and ActiveProperties.IncrementalSearch then - DoClick; - end; -end; - -procedure TcxCustomComboBox.DblClick; -var - APrevCurrentKey: TcxEditValue; -begin - inherited DblClick; - LockChangeEvents(True); - LookupItemsScrolling := True; - try - if not HasPopupWindow and ActiveProperties.Revertable then - with ILookupData do - begin - APrevCurrentKey := CurrentKey; - Go(egdNext, True); - if not VarEqualsExact(APrevCurrentKey, ILookupData.CurrentKey) and - CanPostEditValue and ActiveProperties.ImmediatePost and ValidateEdit(True) then - InternalPostEditValue; - end; - finally - LookupItemsScrolling := False; - LockChangeEvents(False); - end; -end; - -function TcxCustomComboBox.GetInnerEditClass: TControlClass; -begin - Result := TcxCustomComboBoxInnerEdit; -end; - -function TcxCustomComboBox.GetPopupWindowClientPreferredSize: TSize; -var - AMaxVisualAreaSize: TSize; - AClientExtent: TRect; - AWidth: Integer; -begin - AMaxVisualAreaSize := PopupWindow.GetMaxVisualAreaSize; - with ActiveProperties do - if not PopupSizeable and not PopupAutoSize then - begin - if PopupWidth > 0 then - AWidth := PopupWidth - else - AWidth := cxRectWidth(GetPopupWindowOwnerControlBounds); - AClientExtent := PopupWindow.ViewInfo.GetClientExtent; - Dec(AWidth, AClientExtent.Left + AClientExtent.Right); - AWidth := Min(AWidth, AMaxVisualAreaSize.cx); - end - else - AWidth := AMaxVisualAreaSize.cx; - Result := ILookupData.GetVisualAreaPreferredSize(AMaxVisualAreaSize.cy, AWidth); -end; - -procedure TcxCustomComboBox.Initialize; -begin - inherited Initialize; - ControlStyle := ControlStyle - [csClickEvents]; -end; - -procedure TcxCustomComboBox.InitializePopupWindow; -begin - inherited InitializePopupWindow; - PopupWindow.SysPanelStyle := ActiveProperties.PopupSizeable; -end; - -function TcxCustomComboBox.IsTextInputMode: Boolean; -begin - Result := inherited IsTextInputMode and - (ActiveProperties.DropDownListStyle = lsEditList); -end; - -procedure TcxCustomComboBox.MouseMove(Shift: TShiftState; X, Y: Integer); -var - AActiveControl: TControl; - P: TPoint; -begin - inherited MouseMove(Shift, X, Y); - AActiveControl := ILookupData.ActiveControl; - if (GetCaptureControl = Self) and (AActiveControl is TWinControl) then - with AActiveControl as TWinControl do - begin - P := GetMouseCursorPos; - if HasPopupWindow and PtInRect(PopupWindow.ViewInfo.ClientRect, - PopupWindow.ScreenToClient(P)) and ILookupData.IsMouseOverList(P) then - SendMouseEvent(AActiveControl as TWinControl, WM_LBUTTONDOWN, [], ScreenToClient(P)); - end; -end; - -procedure TcxCustomComboBox.PopupWindowShowed(Sender: TObject); -var - P: TPoint; -begin - inherited PopupWindowShowed(Sender); - with ILookupData do - if ActiveControl is TWinControl then - begin - P := InternalGetCursorPos; - if IsMouseOverList(P) then - FPopupMouseMoveLocked := True; - end; -end; - -procedure TcxCustomComboBox.SetupPopupWindow; -begin - inherited SetupPopupWindow; - if ILookupData.ActiveControl <> nil then - ILookupData.ActiveControl.Invalidate; -end; - -function TcxCustomComboBox.CanSynchronizeLookupData: Boolean; -var - AMsg: TMsg; -begin - Result := not FLookupDataTextChangedLocked and - ( - HasPopupWindow or - not ActiveProperties.CanIncrementalSearch and (PopupWindow <> nil) and PeekMessage(AMsg, PopupWindow.Handle, CM_SHOWPOPUPWINDOW, CM_SHOWPOPUPWINDOW, PM_NOREMOVE) or - ( - (ActiveProperties.EditingStyle in [esEditList, esFixedList, esNoEdit]) or - Focused and not InternalCompareString(Text, ILookupData.GetDisplayText(ILookupData.CurrentKey), False) - ) - ); -end; - -procedure TcxCustomComboBox.ResetPopupHeight; -begin - if ActiveProperties.PopupSizeable and IsInplace then - begin - if EditData <> nil then - TcxCustomDropDownEditData(EditData).Height := 0 - end - else - ActiveProperties.PopupHeight := 0; -end; - -procedure TcxCustomComboBox.SynchronizeItemIndex; -begin - if ActiveProperties.UseLookupData then - ILookupData.TextChanged; -end; - -procedure TcxCustomComboBox.DoOnDrawItem(ACanvas: TcxCanvas; AIndex: Integer; - const ARect: TRect; AState: TOwnerDrawState); -begin - with Properties do - if Assigned(OnDrawItem) then - OnDrawItem(Self, ACanvas, AIndex, ARect, AState); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnDrawItem) then - OnDrawItem(Self, ACanvas, AIndex, ARect, AState); -end; - -procedure TcxCustomComboBox.DoOnMeasureItem(AIndex: Integer; ACanvas: TcxCanvas; - var AHeight: Integer); -begin - with Properties do - if Assigned(OnMeasureItem) then - OnMeasureItem(Self, AIndex, ACanvas, AHeight); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnMeasureItem) then - OnMeasureItem(Self, AIndex, ACanvas, AHeight); -end; - -function TcxCustomComboBox.IsOnDrawItemEventAssigned: Boolean; -begin - Result := Assigned(Properties.OnDrawItem) or - Assigned(ActiveProperties.OnDrawItem); -end; - -function TcxCustomComboBox.IsOnMeasureItemEventAssigned: Boolean; -begin - Result := Assigned(Properties.OnMeasureItem) or - Assigned(ActiveProperties.OnMeasureItem); -end; - -function TcxCustomComboBox.GetActiveProperties: TcxCustomComboBoxProperties; -begin - Result := TcxCustomComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxCustomComboBox.GetLookupData: TcxComboBoxLookupData; -begin - Result := TcxComboBoxLookupData(FLookupData); -end; - -function TcxCustomComboBox.GetProperties: TcxCustomComboBoxProperties; -begin - Result := TcxCustomComboBoxProperties(FProperties); -end; - -function TcxCustomComboBox.GetSelectedItem: Integer; -begin - if ILookupData.ActiveControl <> nil then - Result := TcxCustomEditListBox(ILookupData.ActiveControl).ItemIndex - else - Result := -1; -end; - -procedure TcxCustomComboBox.SetProperties(Value: TcxCustomComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomComboBox.SetSelectedItem(Value: Integer); -begin - if ILookupData.ActiveControl <> nil then - TcxCustomEditListBox(ILookupData.ActiveControl).ItemIndex := Value; -end; - -procedure TcxCustomComboBox.WMLButtonUp(var Message: TWMLButtonUp); -begin - ControlState := ControlState - [csClicked]; - inherited; -end; - -{ TcxComboBox } - -function TcxComboBox.SupportsSpelling: Boolean; -begin - Result := IsTextInputMode; -end; - -class function TcxComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxComboBoxProperties; -end; - -function TcxComboBox.GetActiveProperties: TcxComboBoxProperties; -begin - Result := TcxComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxComboBox.GetProperties: TcxComboBoxProperties; -begin - Result := TcxComboBoxProperties(FProperties); -end; - -procedure TcxComboBox.SetProperties(Value: TcxComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterComboBoxHelper } - -class function TcxFilterComboBoxHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxComboBox; -end; - -class procedure TcxFilterComboBoxHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - with TcxCustomComboBoxProperties(AProperties) do - begin - ButtonGlyph := nil; - DropDownRows := 8; - DropDownListStyle := lsEditList; - ImmediateDropDown := False; - PopupAlignment := taLeftJustify; - Revertable := False; - end; -end; - -{ TcxPopupEditPopupWindowViewInfo } - -procedure TcxPopupEditPopupWindowViewInfo.DrawBorder(ACanvas: TcxCanvas; var R: TRect); -begin - DrawPopupEditPopupWindowBorder(ACanvas, Self, R); -end; - -{ TcxPopupEditPopupWindow } - -function TcxPopupEditPopupWindow.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxPopupEditPopupWindowViewInfo; -end; - -{ TcxCustomPopupEditProperties } - -constructor TcxCustomPopupEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FPopupAutoSize := True; - FPopupHeight := 200; - FPopupMinHeight := 100; - FPopupMinWidth := 100; - FPopupSizeable := True; - FPopupWidth := 250; -end; - -procedure TcxCustomPopupEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomPopupEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomPopupEditProperties do - Self.PopupControl := PopupControl; - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -class function TcxCustomPopupEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxPopupEdit; -end; - -procedure TcxCustomPopupEditProperties.FreeNotification(Sender: TComponent); -begin - inherited FreeNotification(Sender); - if Sender = FPopupControl then - FPopupControl := nil; -end; - -class function TcxCustomPopupEditProperties.GetPopupWindowClass: TcxCustomEditPopupWindowClass; -begin - Result := TcxPopupEditPopupWindow; -end; - -function TcxCustomPopupEditProperties.IsLookupDataVisual: Boolean; -begin - Result := False; -end; - -function TcxCustomPopupEditProperties.PopupWindowCapturesFocus: Boolean; -begin - Result := True; -end; - -procedure TcxCustomPopupEditProperties.SetPopupControl(Value: TControl); -begin - if Value = FPopupControl then - Exit; - if FPopupControl <> nil then - FreeNotificator.RemoveSender(Value); - FPopupControl := Value; - if FPopupControl <> nil then - FreeNotificator.AddSender(Value); -end; - -{ TcxPopupEditProperties } - -constructor TcxPopupEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - ImmediateDropDown := True; - ImmediatePopup := True; -end; - -{ TcxCustomPopupEdit } - -destructor TcxCustomPopupEdit.Destroy; -begin - if (FPopupWindow <> nil) and FPopupWindow.IsVisible then - RestorePopupControlData; - inherited Destroy; -end; - -class function TcxCustomPopupEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomPopupEditProperties; -end; - -function TcxCustomPopupEdit.CanDropDown: Boolean; -begin - with ActiveProperties do - Result := PopupControl <> nil; -end; - -procedure TcxCustomPopupEdit.DoInitPopup; - - function ControlHasAsParent(AControl: TControl): Boolean; - var - AParent: TControl; - begin - Result := AControl = PopupWindow; - AParent := PopupWindow.OwnerControl; - while AParent <> nil do - begin - if AParent = AControl then - begin - Result := True; - Break; - end; - AParent := AParent.Parent; - end; - end; - -begin - if ControlHasAsParent(ActiveProperties.FPopupControl) then - raise EcxEditError.Create(cxGetResourceString(@cxSEditPopupCircularReferencingError)); - inherited DoInitPopup; -end; - -function TcxCustomPopupEdit.GetPopupFocusedControl: TWinControl; -begin - with ActiveProperties do - if PopupControl is TWinControl then - Result := TWinControl(PopupControl) - else - Result := nil; -end; - -function TcxCustomPopupEdit.GetPopupWindowClientPreferredSize: TSize; -begin - with ActiveProperties.PopupControl do - Result := Size(Width, Height); -end; - -procedure TcxCustomPopupEdit.PopupWindowClosed(Sender: TObject); -begin - RestorePopupControlData; - inherited PopupWindowClosed(Sender); -end; - -procedure TcxCustomPopupEdit.PositionPopupWindowChilds(const AClientRect: TRect); -begin - with AClientRect do - begin - ActiveProperties.PopupControl.Left := Left; - ActiveProperties.PopupControl.Top := Top; - ActiveProperties.PopupControl.Width := Right - Left; - ActiveProperties.PopupControl.Height := Bottom - Top; - end; -end; - -procedure TcxCustomPopupEdit.SetupPopupWindow; -begin - with ActiveProperties.PopupControl do - begin - SavePopupControlData; - Parent := PopupWindow; - Visible := True; - inherited SetupPopupWindow; - Align := alClient; // TODO - end; -end; - -procedure TcxCustomPopupEdit.HidePopup(Sender: TcxControl; AReason: TcxEditCloseUpReason); -begin - FCloseUpReason := AReason; - PopupWindow.ClosePopup; -end; - -procedure TcxCustomPopupEdit.RestorePopupControlData; -begin - if ActiveProperties.PopupControl <> nil then - with ActiveProperties.PopupControl do - begin - Visible := False; - Parent := FPrevPopupControlData.Parent; - Align := FPrevPopupControlData.Align; - BoundsRect := FPrevPopupControlData.Bounds; - Visible := FPrevPopupControlData.Visible; - end; -end; - -procedure TcxCustomPopupEdit.SavePopupControlData; -var - APopupControl: TControl; -begin - APopupControl := ActiveProperties.PopupControl; - with APopupControl do - begin - FPrevPopupControlData.Align := Align; - if APopupControl is TCustomForm then - begin - FPrevPopupControlData.BorderStyle := TCustomForm(APopupControl).BorderStyle; - TCustomForm(APopupControl).BorderStyle := bsNone; - end; - FPrevPopupControlData.Bounds := BoundsRect; - FPrevPopupControlData.Parent := Parent; - FPrevPopupControlData.Visible := Visible; - end; -end; - -function TcxCustomPopupEdit.GetProperties: TcxCustomPopupEditProperties; -begin - Result := TcxCustomPopupEditProperties(FProperties); -end; - -function TcxCustomPopupEdit.GetActiveProperties: TcxCustomPopupEditProperties; -begin - Result := TcxCustomPopupEditProperties(InternalGetActiveProperties); -end; - -procedure TcxCustomPopupEdit.SetProperties(Value: TcxCustomPopupEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxPopupEdit } - -function TcxPopupEdit.SupportsSpelling: Boolean; -begin - Result := IsTextInputMode; -end; - -class function TcxPopupEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxPopupEditProperties; -end; - -function TcxPopupEdit.GetActiveProperties: TcxPopupEditProperties; -begin - Result := TcxPopupEditProperties(InternalGetActiveProperties); -end; - -function TcxPopupEdit.GetProperties: TcxPopupEditProperties; -begin - Result := TcxPopupEditProperties(FProperties); -end; - -procedure TcxPopupEdit.SetProperties(Value: TcxPopupEditProperties); -begin - FProperties.Assign(Value); -end; - -initialization - GetRegisteredEditProperties.Register(TcxComboBoxProperties, scxSEditRepositoryComboBoxItem); - GetRegisteredEditProperties.Register(TcxPopupEditProperties, scxSEditRepositoryPopupItem); - FilterEditsController.Register(TcxComboBoxProperties, TcxFilterComboBoxHelper); - -finalization - FilterEditsController.Unregister(TcxComboBoxProperties, TcxFilterComboBoxHelper); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEdit.pas deleted file mode 100644 index 8664a654..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEdit.pas +++ /dev/null @@ -1,9177 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxEdit; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Forms, ComCtrls, Classes, Controls, Graphics, Menus, StdCtrls, SysUtils, - cxClasses, cxContainer, cxControls, cxDataStorage, cxDataUtils, - cxEditPaintUtils, cxGraphics, cxLookAndFeels, cxVariants, cxLookAndFeelPainters, dxCore; - -type - TcxBlobKind = (bkNone, bkBlob, bkGraphic, bkMemo, bkOle); - TcxEditBorderStyle = (ebsNone, ebsSingle, ebsThick, ebsFlat, ebs3D, - ebsUltraFlat, ebsOffice11); - TcxEditButtonKind = (bkEllipsis, bkDown, bkGlyph, bkText); - TcxEditButtonState = (ebsDisabled, ebsNormal, ebsPressed, ebsSelected); - TcxEditButtonStyle = (btsDefault, bts3D, btsFlat, btsSimple, btsHotFlat, - btsUltraFlat, btsOffice11); - TcxEditButtonsViewStyle = (bvsNormal, bvsButtonsOnly, bvsButtonsAutoWidth); - TcxEditButtonTransparency = (ebtNone, ebtInactive, ebtAlways, ebtHideInactive, - ebtHideUnselected); - TcxEditGradientDirection = dirLeft..dirDown; - TcxEditPopupBorderStyle = (epbsDefault, epbsSingle, epbsFrame3D, epbsFlat); - - TcxEditStyleValue = TcxContainerStyleValue; - TcxEditStyleValues = TcxContainerStyleValues; - - TcxEditHorzAlignment = TAlignment; - TcxEditVertAlignment = (taTopJustify, taBottomJustify, taVCenter); - -const - cxEditDefaultPrecision = 15; - cxEditDefaultUseLeftAlignmentOnEditing = True; - cxEditDefaultHorzAlignment: TcxEditHorzAlignment = taLeftJustify; - cxEditDefaultVertAlignment: TcxEditVertAlignment = taTopJustify; - cxInplaceEditOffset = 1; - - ekDefault = 0; - - svBorderColor = csvBorderColor; - svBorderStyle = csvBorderStyle; - svColor = csvColor; - svEdges = csvEdges; - svFont = csvFont; - svHotTrack = csvHotTrack; - svShadow = csvShadow; - svTextColor = csvTextColor; - svTextStyle = csvTextStyle; - svTransparentBorder = csvTransparentBorder; - svButtonStyle = cxContainerStyleValueCount; - svButtonTransparency = cxContainerStyleValueCount + 1; - svPopupBorderStyle = cxContainerStyleValueCount + 2; - svGradientButtons = cxContainerStyleValueCount + 3; - svGradient = cxContainerStyleValueCount + 4; - svGradientDirection = cxContainerStyleValueCount + 5; - - cxEditStyleValueCount = cxContainerStyleValueCount + 6; - - cxEditStyleValueNameA: array[0..cxEditStyleValueCount - cxContainerStyleValueCount - 1] of string = ( - 'ButtonStyle', - 'ButtonTransparency', - 'PopupBorderStyle', - 'GradientButtons', - 'Gradient', - 'GradientDirection' - ); - - EditContentDefaultOffsets: array [Boolean] of TRect = ( - (Left: 1; Top: 1; Right: 1; Bottom: 3), - (Left: 1; Top: 1; Right: 1; Bottom: 1) - ); - - EditBtnState2ButtonState: array[TcxEditButtonState] of TcxButtonState = - (cxbsDisabled, cxbsNormal, cxbsPressed, cxbsHot); - - ecpNone = -2; - ecpControl = -1; - ecpButton = 0; - -type - TcxEditDisplayFormatOption = (dfoSupports, dfoNoCurrencyValue); - TcxEditDisplayFormatOptions = set of TcxEditDisplayFormatOption; - TcxEditBackgroundPaintingStyle = (bpsSolid, bpsComboEdit, bpsComboListEdit); - TcxEditEditingStyle = (esEdit, esEditList, esFixedList, esNoEdit); - TcxEditPaintOption = (epoAllowZeroHeight, epoAutoHeight, epoHasExternalBorder, - epoShowEndEllipsis, epoShowFocusRectWhenInplace); - TcxEditPaintOptions = set of TcxEditPaintOption; - TcxEditSpecialFeatures = set of (esfBlobEditValue, esfMinSize, - esfNoContentPart); - TcxEditSupportedOperation = (esoAlwaysHotTrack, esoAutoHeight, esoEditing, - esoFiltering, esoHorzAlignment, esoHotTrack, esoIncSearch, - esoShowingCaption, esoSorting, esoSortingByDisplayText, esoTransparency); - TcxEditSupportedOperations = set of TcxEditSupportedOperation; - TcxEditValue = Variant; - PcxEditValue = ^TcxEditValue; - TcxEditValidateEvent = procedure(Sender: TObject; var DisplayValue: TcxEditValue; - var ErrorText: TCaption; var Error: Boolean) of object; - TcxEditErrorKind = Integer; - TcxCustomEdit = class; - TcxCustomEditStyle = class; - - EcxEditError = class(EdxException); - EcxEditValidationError = class(EcxEditError); - - { IcxCustomInnerEdit } - - IcxCustomInnerEdit = interface(IcxContainerInnerControl) - ['{468D21B5-48AA-4077-8ED5-4C6112D460B1}'] - function CallDefWndProc(AMsg: UINT; WParam: WPARAM; - LParam: LPARAM): LRESULT; - function CanProcessClipboardMessages: Boolean; - function GetEditValue: TcxEditValue; - function GetOnChange: TNotifyEvent; - function GetReadOnly: Boolean; - procedure LockBounds(ALock: Boolean); - procedure SafelySetFocus; - procedure SetEditValue(const Value: TcxEditValue); - procedure SetParent(Value: TWinControl); - procedure SetOnChange(Value: TNotifyEvent); - procedure SetReadOnly(Value: Boolean); - property EditValue: TcxEditValue read GetEditValue write SetEditValue; - property Parent: TWinControl write SetParent; - property ReadOnly: Boolean read GetReadOnly write SetReadOnly; - property OnChange: TNotifyEvent read GetOnChange write SetOnChange; - end; - - IcxInnerEditHelper = interface - ['{35667555-6DC8-40D5-B705-B08D5697C621}'] - function GetHelper: IcxCustomInnerEdit; - end; - - TcxCustomEditProperties = class; - TcxCustomEditPropertiesClass = class of TcxCustomEditProperties; - TcxEditRepository = class; - TcxEditRepositoryItem = class; - - { IcxEditRepositoryItemListener } - - IcxEditRepositoryItemListener = interface - ['{4E27D642-022B-4CD2-AB96-64C7CF9B3299}'] - procedure ItemRemoved(Sender: TcxEditRepositoryItem); - procedure PropertiesChanged(Sender: TcxEditRepositoryItem); - end; - - { TcxEditRepositoryItem } - - TcxEditRepositoryItem = class(TComponent) - private - FListenerList: IInterfaceList; - FProperties: TcxCustomEditProperties; - FPropertiesEvents: TNotifyEvent; - FRepository: TcxEditRepository; - procedure SetProperties(Value: TcxCustomEditProperties); - procedure SetRepository(Value: TcxEditRepository); - protected - function ArePropertiesCompatible(APropertiesClass: TClass): Boolean; - procedure PropertiesChanged(Sender: TObject); virtual; - procedure ReadState(Reader: TReader); override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure AddListener(AListener: IcxEditRepositoryItemListener); virtual; - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; virtual; - function GetBaseName: string; virtual; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - procedure RemoveListener(AListener: IcxEditRepositoryItemListener); virtual; - procedure SetParentComponent(AParent: TComponent); override; - property Properties: TcxCustomEditProperties read FProperties - write SetProperties; - property Repository: TcxEditRepository read FRepository write SetRepository; - published - property PropertiesEvents: TNotifyEvent read FPropertiesEvents - write FPropertiesEvents; - end; - - TcxEditRepositoryItemClass = class of TcxEditRepositoryItem; - - IcxEditDefaultValuesProvider = interface - ['{AE727882-6FDF-4E3A-AB35-E58AB28EFE7B}'] - function CanSetEditMode: Boolean; - procedure ClearUsers; - function DefaultAlignment: TAlignment; - function DefaultBlobKind: TcxBlobKind; - function DefaultCanModify: Boolean; - function DefaultDisplayFormat: string; - function DefaultEditFormat: string; - function DefaultEditMask: string; - function DefaultIsFloatValue: Boolean; - function DefaultMaxLength: Integer; - function DefaultMaxValue: Double; - function DefaultMinValue: Double; - function DefaultPrecision: Integer; - function DefaultReadOnly: Boolean; - function DefaultRequired: Boolean; - function GetInstance: TObject; - function IsDataStorage: Boolean; - function IsBlob: Boolean; - function IsCurrency: Boolean; - function IsDataAvailable: Boolean; - function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; - function IsOnGetTextAssigned: Boolean; - function IsOnSetTextAssigned: Boolean; - function IsValidChar(AChar: Char): Boolean; - end; - - { TcxEditRepository } - - TcxEditRepository = class(TComponent) - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxEditRepositoryItem; - protected - procedure AddItem(AItem: TcxEditRepositoryItem); - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - procedure RemoveItem(AItem: TcxEditRepositoryItem); - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Clear; - function CreateItem(ARepositoryItemClass: TcxEditRepositoryItemClass): TcxEditRepositoryItem; virtual; - function CreateItemEx(ARepositoryItemClass: TcxEditRepositoryItemClass; AOwner: TComponent): TcxEditRepositoryItem; virtual; - function ItemByName(ARepositoryItemName: string): TcxEditRepositoryItem; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxEditRepositoryItem read GetItem; default; - end; - - { TcxEditButtonViewInfo } - - TcxEditButtonViewInfoData = record - BackgroundColor: TColor; - Caption: string; - ContentAlignment: TAlignment; - Default: Boolean; - Gradient: Boolean; - IsInplace: Boolean; - Kind: TcxEditButtonKind; - LeftAlignment: Boolean; - Leftmost: Boolean; - NativeStyle: Boolean; - Rightmost: Boolean; - State: TcxEditButtonState; - Style: TcxEditButtonStyle; - TextColor: TColor; - Transparent: Boolean; - VisibleCaption: string; - BackgroundPartiallyTransparent: Boolean; - ComboBoxStyle: Boolean; - NativePart: Integer; - NativeState: Integer; - end; - PcxEditButtonViewInfoData = ^TcxEditButtonViewInfoData; - - TcxEditButtonViewInfo = class(TPersistent) - public - Bounds: TRect; - Data: TcxEditButtonViewInfoData; - Glyph: TBitmap; - HasBackground: Boolean; - Index: Integer; - Stretchable: Boolean; - VisibleBounds: TRect; - Width: Integer; - procedure Assign(Source: TPersistent); override; - function GetUpdateRegion(AViewInfo: TcxEditButtonViewInfo): TcxRegion; virtual; - function Repaint(AControl: TWinControl; AViewInfo: TcxEditButtonViewInfo; - const AEditPosition: TPoint): Boolean; virtual; - end; - - TcxEditButtonViewInfoClass = class of TcxEditButtonViewInfo; - - { TcxEditButton } - - TcxEditButton = class(TCollectionItem) - private - FCaption: TCaption; - FContentAlignment: TAlignment; - FDefault: Boolean; - FEnabled: Boolean; - FGlyph: TBitmap; - FHint: string; - FKind: TcxEditButtonKind; - FLeftAlignment: Boolean; - FStretchable: Boolean; - FTag: TcxTag; - FTextColor: TColor; - FVisible: Boolean; - FVisibleCaption: TCaption; - FWidth: Integer; - function GetGlyph: TBitmap; - procedure GlyphChanged(Sender: TObject); - function IsTagStored: Boolean; - procedure SetCaption(const Value: TCaption); - procedure SetContentAlignment(Value: TAlignment); - procedure SetDefault(Value: Boolean); - procedure SetEnabled(Value: Boolean); - procedure SetGlyph(Value: TBitmap); - procedure SetKind(Value: TcxEditButtonKind); - procedure SetLeftAlignment(Value: Boolean); - procedure SetStretchable(Value: Boolean); - procedure SetTextColor(Value: TColor); - procedure SetVisible(Value: Boolean); - procedure SetWidth(Value: Integer); - protected - property TextColor: TColor read FTextColor write SetTextColor default clBtnText; // TODO published - property VisibleCaption: TCaption read FVisibleCaption; - public - constructor Create(Collection: TCollection); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - published - property Caption: TCaption read FCaption write SetCaption; - property ContentAlignment: TAlignment read FContentAlignment - write SetContentAlignment default taCenter; - property Default: Boolean read FDefault write SetDefault default False; - property Enabled: Boolean read FEnabled write SetEnabled default True; - property Glyph: TBitmap read GetGlyph write SetGlyph; - property Hint: string read FHint write FHint; - property Kind: TcxEditButtonKind read FKind write SetKind default bkDown; - property LeftAlignment: Boolean read FLeftAlignment write SetLeftAlignment default False; - property Stretchable: Boolean read FStretchable write SetStretchable default True; - property Tag: TcxTag read FTag write FTag stored IsTagStored; - property Visible: Boolean read FVisible write SetVisible default True; - property Width: Integer read FWidth write SetWidth default 0; - end; - - TcxEditButtonClass = class of TcxEditButton; - - { TcxEditButtons } - - TcxEditButtons = class(TCollection) - private - FOwner: TPersistent; - FOnChange: TNotifyEvent; - function GetItem(Index: Integer): TcxEditButton; - function GetVisibleCount: Integer; - procedure SetItem(Index: Integer; Value: TcxEditButton); - protected - class function GetButtonClass: TcxEditButtonClass; virtual; - function GetOwner: TPersistent; override; - procedure Update(Item: TCollectionItem); override; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - public - constructor Create(AOwner: TPersistent; AButtonClass: TcxEditButtonClass); virtual; - function Add: TcxEditButton; - property Items[Index: Integer]: TcxEditButton read GetItem write SetItem; default; - property VisibleCount: Integer read GetVisibleCount; - end; - - TcxEditButtonsClass = class of TcxEditButtons; - - { TcxCustomEditViewInfo } - - TcxCustomEditViewInfo = class; - TcxEditAlignment = class; - - TcxEditDrawBackgroundEvent = procedure(Sender: TcxCustomEditViewInfo; - ACanvas: TcxCanvas; var AHandled: Boolean) of object; - TcxEditDrawButtonEvent = procedure(Sender: TcxCustomEditViewInfo; - ACanvas: TcxCanvas; AButtonVisibleIndex: Integer; var AHandled: Boolean) of object; - TcxEditDrawButtonBackgroundEvent = procedure(Sender: TcxCustomEditViewInfo; - ACanvas: TcxCanvas; const ARect: TRect; AButtonVisibleIndex: Integer; - var AHandled: Boolean) of object; - TcxEditDrawButtonBorderEvent = procedure(Sender: TcxCustomEditViewInfo; ACanvas: TcxCanvas; AButtonVisibleIndex: Integer; - out ABackgroundRect, AContentRect: TRect; var AHandled: Boolean) of object; - TcxEditGetButtonStateEvent = procedure(Sender: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer; var AState: TcxEditButtonState) of object; - TcxEditPaintEvent = procedure(Sender: TcxCustomEditViewInfo; ACanvas: TcxCanvas) of object; - - TcxDrawBackgroundStyle = (dbsCustom, dbsCustomEdit, dbsNone, dbsSimpleFill, dbsSimpleParent, dbsThemeParent); - TcxEditViewInfoState = (evsPaintButtons); - TcxEditViewInfoStates = set of TcxEditViewInfoState; - - TcxCustomEditViewInfo = class(TcxContainerViewInfo) - private - FOnDrawBackground: TcxEditDrawBackgroundEvent; - FOnDrawButton: TcxEditDrawButtonEvent; - FOnDrawButtonBackground: TcxEditDrawButtonBackgroundEvent; - FOnDrawButtonBorder: TcxEditDrawButtonBorderEvent; - FOnGetButtonState: TcxEditGetButtonStateEvent; - FOnPaint: TcxEditPaintEvent; - function DoDrawBackground(ACanvas: TcxCanvas): Boolean; - function DoDrawButton(ACanvas: TcxCanvas; AButtonVisibleIndex: Integer): Boolean; - function DoDrawButtonBackground(ACanvas: TcxCanvas; const ARect: TRect; AButtonVisibleIndex: Integer): Boolean; - function DoDrawButtonBorder(ACanvas: TcxCanvas; AButtonVisibleIndex: Integer; - out ABackgroundRect, AContentRect: TRect): Boolean; - function GetDrawBackgroundStyle: TcxDrawBackgroundStyle; - function IsNativeBackground: Boolean; - function IsTransparent: Boolean; - - function GetHintText(APart: Integer): string; - function GetHintTextRect(const P: TPoint; APart: Integer): TRect; - protected - FEdit: TcxCustomEdit; - FState: TcxEditViewInfoStates; - function GetButtonViewInfoClass: TcxEditButtonViewInfoClass; virtual; - procedure GetColorSettingsByPainter(out ABackground, ATextColor: TColor); virtual; - function GetContainerBorderStyle: TcxContainerBorderStyle; override; - function GetPart(const P: TPoint): Integer; virtual; - function GetPartRect(APart: Integer): TRect; virtual; - procedure InternalPaint(ACanvas: TcxCanvas); override; - function IsRepaintOnStateChangingNeeded: Boolean; virtual; - procedure DrawEditButton(ACanvas: TcxCanvas; AButtonVisibleIndex: Integer); virtual; - procedure SetOnDrawBackground(AValue: TcxEditDrawBackgroundEvent); virtual; - - procedure Draw3DButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); virtual; - procedure DrawFlatButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); virtual; - procedure DrawHotFlatButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); virtual; - procedure DrawNativeButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); virtual; - procedure DrawSimpleButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); virtual; - procedure DrawUltraFlatButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - AIsOffice11Style: Boolean; var ARect: TRect; var AContentRect: TRect; out APenColor, ABrushColor: TColor); virtual; - - procedure DrawButtonBorderByPainter(AButtonViewInfo: TcxEditButtonViewInfo; var ARect: TRect; out AContentRect: TRect; - var APenColor, ABrushColor: TColor); - procedure DrawNativeButtonBackground(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; const ARect: TRect); virtual; - procedure DrawUsualButtonBackground(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; const ARect: TRect; ABrushColor: TColor); virtual; - public - BorderExtent: TRect; - BorderStyle: TcxEditBorderStyle; - ButtonsInfo: array of TcxEditButtonViewInfo; - Calculated: Boolean; - Data: Integer; - EditProperties: TcxCustomEditProperties; - Enabled: Boolean; - Focused: Boolean; - Font: TFont; - HasBackground: Boolean; - HasContentOffsets: Boolean; - HasInnerEdit: Boolean; - HasTextButtons: Boolean; - HitTestInfo: Integer; - HotState: TcxContainerHotState; - InnerEditRect: TRect; - IsButtonReallyPressed: Boolean; - IsContainerInnerControl: Boolean; - IsDBEditPaintCopyDrawing: Boolean; - IsDesigning: Boolean; - IsInplace: Boolean; - IsSelected: Boolean; - Left: Integer; - PaintOptions: TcxEditPaintOptions; - PopupBorderStyle: TcxEditPopupBorderStyle; - PressedButton: Integer; - SelectedButton: Integer; - ShadowRect: TRect; - TextColor: TColor; - Top: Integer; - Transparent: Boolean; - WindowHandle: HWND; - constructor Create; override; - destructor Destroy; override; - procedure Assign(Source: TObject); override; - function GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; override; - procedure Offset(DX, DY: Integer); override; - function DrawBackground(ACanvas: TcxCanvas): Boolean; overload; - function DrawBackground(ACanvas: TcxCanvas; const APos: TPoint): Boolean; overload; - procedure DrawButton(ACanvas: TcxCanvas; AButtonVisibleIndex: Integer); virtual; - procedure DrawButtons(ACanvas: TcxCanvas); - procedure DrawEditBackground(ACanvas: TcxCanvas; ARect, AGlyphRect: TRect; AGlyphTransparent: Boolean); - procedure DrawNativeStyleEditBackground(ACanvas: TcxCanvas; ADrawBackground: Boolean; - ABackgroundStyle: TcxEditBackgroundPaintingStyle; ABackgroundBrush: TBrushHandle); virtual; - function IsBackgroundTransparent: Boolean; - - procedure DrawButtonBackground(ACanvas: TcxCanvas; AButtonVisibleIndex: Integer; - const ARect: TRect; ABrushColor: TColor); - procedure DrawButtonBorder(ACanvas: TcxCanvas; AButtonVisibleIndex: Integer; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); virtual; - procedure DrawButtonContent(ACanvas: TcxCanvas; AButtonVisibleIndex: Integer; - const AContentRect: TRect; APenColor, ABrushColor: TColor; ANeedOffsetContent: Boolean); virtual; - - function IsCustomBackground: Boolean; - function IsCustomButton(AButtonVisibleIndex: Integer = 0): Boolean; - function IsCustomButtonBackground(AButtonVisibleIndex: Integer = 0): Boolean; - function IsCustomButtonBorder(AButtonVisibleIndex: Integer = 0): Boolean; - function IsCustomDrawButton(AButtonVisibleIndex: Integer = 0): Boolean; - - function IsHotTrack: Boolean; overload; virtual; - function IsHotTrack(P: TPoint): Boolean; overload; virtual; - function NeedShowHint(ACanvas: TcxCanvas; const P: TPoint; - out AText: TCaption; out AIsMultiLine: Boolean; - out ATextRect: TRect): Boolean; overload; virtual; - function NeedShowHint(ACanvas: TcxCanvas; const P: TPoint; - const AVisibleBounds: TRect; out AText: TCaption; - out AIsMultiLine: Boolean; out ATextRect: TRect): Boolean; overload; virtual; - procedure Paint(ACanvas: TcxCanvas); override; - procedure PaintEx(ACanvas: TcxCanvas); - procedure PrepareCanvasFont(ACanvas: TCanvas); virtual; - function Repaint(AControl: TWinControl; - AViewInfo: TcxContainerViewInfo = nil): Boolean; overload; virtual; - function Repaint(AControl: TWinControl; const AInnerEditRect: TRect; - AViewInfo: TcxContainerViewInfo = nil): Boolean; overload; virtual; - procedure SetButtonCount(ACount: Integer); - property Edit: TcxCustomEdit read FEdit; - property OnDrawBackground: TcxEditDrawBackgroundEvent read FOnDrawBackground - write SetOnDrawBackground; - property OnDrawButton: TcxEditDrawButtonEvent read FOnDrawButton - write FOnDrawButton; - property OnDrawButtonBackground: TcxEditDrawButtonBackgroundEvent - read FOnDrawButtonBackground write FOnDrawButtonBackground; - property OnDrawButtonBorder: TcxEditDrawButtonBorderEvent - read FOnDrawButtonBorder write FOnDrawButtonBorder; - property OnGetButtonState: TcxEditGetButtonStateEvent - read FOnGetButtonState write FOnGetButtonState; - property OnPaint: TcxEditPaintEvent read FOnPaint write FOnPaint; - end; - - { TcxCustomEditViewData } - - TcxInplaceEditPosition = record - Item: TObject; - RecordIndex: Integer; - end; - - TcxInplaceEditParams = record - MultiRowParent: Boolean; - Position: TcxInplaceEditPosition; - end; - - TcxEditSizeProperties = record - Height: Integer; - MaxLineCount: Integer; - Width: Integer; - end; - PcxEditSizeProperties = ^TcxEditSizeProperties; - - TcxEditContentOption = (ecoShowFocusRectWhenInplace, ecoOffsetButtonContent); - TcxEditContentOptions = set of TcxEditContentOption; - - TcxEditContentParams = record - ExternalBorderBounds: TRect; - Offsets: TRect; - Options: TcxEditContentOptions; - SizeCorrection: TSize; - end; - - TcxCustomEditViewData = class; - - TcxEditGetDefaultButtonWidthEvent = procedure(Sender: TcxCustomEditViewData; - AIndex: Integer; var ADefaultWidth: Integer) of object; - TcxEditViewDataGetDisplayTextEvent = procedure(Sender: TcxCustomEditViewData; - var AText: string) of object; - - TcxCustomEditViewData = class(TPersistent) - private - FData: TObject; // internal for OnGetDisplayText event - FIsInplace: Boolean; - FLeftSideLeftmostButtonIndex, FLeftSideRightmostButtonIndex: Integer; - FRightSideLeftmostButtonIndex, FRightSideRightmostButtonIndex: Integer; - FOnGetDefaultButtonWidth: TcxEditGetDefaultButtonWidthEvent; - FOnGetDisplayText: TcxEditViewDataGetDisplayTextEvent; - procedure DoGetButtonState(AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer; var AState: TcxEditButtonState); - function DoGetDefaultButtonWidth(AIndex: Integer): Integer; - function GetPaintOptions: TcxEditPaintOptions; - function GetStyle: TcxCustomEditStyle; - procedure SetStyle(Value: TcxCustomEditStyle); - protected - FEdit: TcxCustomEdit; - FProperties: TcxCustomEditProperties; - FStyle: TcxCustomEditStyle; - procedure CalculateButtonNativeInfo(AButtonViewInfo: TcxEditButtonViewInfo); virtual; - procedure CalculateViewInfo(AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); - function CanPressButton(AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: Integer): - Boolean; virtual; - procedure CheckSizeConstraints(var AEditSize: TSize); - procedure CorrectBorderStyle(var ABorderStyle: TcxEditBorderStyle); - procedure DoOnGetDisplayText(var AText: string); - function EditValueToDisplayText(AEditValue: TcxEditValue): string; - function GetButtonsStyle: TcxEditButtonStyle; - function GetCaptureButtonVisibleIndex: Integer; - procedure GetColorSettings(AViewInfo: TcxCustomEditViewInfo; var FillColor, TextColor: TColor); - function GetContainerState(const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): TcxContainerState; virtual; - function GetEditContentDefaultOffsets: TRect; virtual; - function GetEditNativeState(AViewInfo: TcxCustomEditViewInfo): Integer; virtual; - function HasThickBorders: Boolean; virtual; - procedure InitCacheData; virtual; - procedure InitEditContentParams(var AParams: TcxEditContentParams); virtual; - procedure Initialize; virtual; - function InternalEditValueToDisplayText(AEditValue: TcxEditValue): string; virtual; - function InternalFocused: Boolean; - function InternalGetEditConstantPartSize(ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo): TSize; virtual; - function InternalGetEditContentSize(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; virtual; - function IsButtonPressed(AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer): Boolean; virtual; - public -//#DG not used AutoHeight: Boolean; - Bounds: TRect; - ButtonsOnlyStyle: Boolean; - ButtonVisibleCount: Integer; - ContainerState: TcxContainerState; - ContentOffset: TRect; - EditContentParams: TcxEditContentParams; - Enabled: Boolean; - Focused: Boolean; - HorzAlignment: TcxEditHorzAlignment; - HScrollBar: TcxControlScrollBar; - InnerEdit: IcxCustomInnerEdit; - InplaceEditParams: TcxInplaceEditParams; - IsDesigning: Boolean; - IsSelected: Boolean; // Row selected - IsValueSource: Boolean; - MaxLineCount: Integer; - NativeStyle: Boolean; - PaintOptions: TcxEditPaintOptions; - PreviewMode: Boolean; - Selected: Boolean; - SelStart, SelLength: Integer; - SelTextColor, SelBackgroundColor: TColor; - VertAlignment: TcxEditVertAlignment; - VScrollBar: TcxControlScrollBar; - WindowHandle: HWND; - constructor Create(AProperties: TcxCustomEditProperties; AStyle: TcxCustomEditStyle; - AIsInplace: Boolean); reintroduce; virtual; - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); virtual; - procedure CalculateButtonBounds(ACanvas: TcxCanvas; AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer; var ButtonsRect: TRect); virtual; - procedure CalculateButtonsViewInfo(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); virtual; - procedure CalculateButtonViewInfo(ACanvas: TcxCanvas; AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer; var ButtonsRect: TRect); virtual; - procedure CalculateEx(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); - procedure CheckButtonsOnly(AViewInfo: TcxCustomEditViewInfo; - APrevButtonsWidth, AButtonsWidth: Integer); virtual; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); virtual; - function GetBorderColor: TColor; virtual; - function GetBorderExtent: TRect; virtual; - function GetBorderExtentByEdges(ABorderWidth: Integer): TRect; virtual; - function GetBorderExtentByPainter: TRect; virtual; - function GetBorderStyle: TcxEditBorderStyle; virtual; - function GetButtonsExtent(ACanvas: TcxCanvas): TRect; virtual; - function GetClientExtent(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo): TRect; virtual; - function GetEditConstantPartSize(ACanvas: TcxCanvas; - const AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo = nil): TSize; virtual; - function GetEditContentSize(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; virtual; - function GetEditContentSizeCorrection: TSize; virtual; - function GetEditSize(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AEditSizeProperties: TcxEditSizeProperties; - AViewInfo: TcxCustomEditViewInfo = nil): TSize; - function HasShadow: Boolean; virtual; - function IgnoreButtonWhileStretching( - AButtonVisibleIndex: Integer): Boolean; virtual; - class function IsNativeStyle(ALookAndFeel: TcxLookAndFeel): Boolean; virtual; - property Data: TObject read FData write FData; - property Edit: TcxCustomEdit read FEdit write FEdit; - property IsInplace: Boolean read FIsInplace; - property Properties: TcxCustomEditProperties read FProperties; - property Style: TcxCustomEditStyle read GetStyle write SetStyle; - property OnGetDefaultButtonWidth: TcxEditGetDefaultButtonWidthEvent - read FOnGetDefaultButtonWidth write FOnGetDefaultButtonWidth; - property OnGetDisplayText: TcxEditViewDataGetDisplayTextEvent - read FOnGetDisplayText write FOnGetDisplayText; - end; - - TcxCustomEditViewDataClass = class of TcxCustomEditViewData; - - { TcxEditStyleController } - - TcxEditStyle = class; - - TcxEditStyleController = class(TcxStyleController) - private - function GetInternalStyle(AState: TcxContainerStateItem): TcxCustomEditStyle; - function GetStyle: TcxEditStyle; - function GetStyleDisabled: TcxEditStyle; - function GetStyleFocused: TcxEditStyle; - function GetStyleHot: TcxEditStyle; - procedure SetInternalStyle(AState: TcxContainerStateItem; Value: TcxCustomEditStyle); - procedure SetStyle(Value: TcxEditStyle); - procedure SetStyleDisabled(Value: TcxEditStyle); - procedure SetStyleFocused(Value: TcxEditStyle); - procedure SetStyleHot(Value: TcxEditStyle); - protected - function GetStyleClass: TcxContainerStyleClass; override; - public - property Styles[AState: TcxContainerStateItem]: TcxCustomEditStyle - read GetInternalStyle write SetInternalStyle; - published - property Style: TcxEditStyle read GetStyle write SetStyle; - property StyleDisabled: TcxEditStyle read GetStyleDisabled - write SetStyleDisabled; - property StyleFocused: TcxEditStyle read GetStyleFocused - write SetStyleFocused; - property StyleHot: TcxEditStyle read GetStyleHot write SetStyleHot; - property OnStyleChanged; - end; - - { TcxCustomEditStyle } - - TcxCustomEditStyle = class(TcxContainerStyle) - private - FButtonStyle: TcxEditButtonStyle; - FButtonTransparency: TcxEditButtonTransparency; - FGradient: Boolean; - FGradientButtons: Boolean; - FGradientDirection: TcxEditGradientDirection; - FPopupBorderStyle: TcxEditPopupBorderStyle; - FPopupCloseButton: Boolean; - - function GetActiveStyleController: TcxEditStyleController; - function GetAssignedValues: TcxEditStyleValues; - function GetBaseStyle: TcxCustomEditStyle; - function GetBorderStyle: TcxEditBorderStyle; - function GetButtonStyle: TcxEditButtonStyle; - function GetButtonTransparency: TcxEditButtonTransparency; - function GetEdit: TcxCustomEdit; - function GetGradient: Boolean; - function GetGradientButtons: Boolean; - function GetGradientDirection: TcxEditGradientDirection; - function GetPopupBorderStyle: TcxEditPopupBorderStyle; - function GetPopupCloseButton: Boolean; - function GetStyleController: TcxEditStyleController; - - function InternalGetButtonStyle(var ButtonStyle: TcxEditButtonStyle): Boolean; - function InternalGetButtonTransparency(var ButtonTransparency: TcxEditButtonTransparency): Boolean; - function InternalGetGradient(var Gradient: Boolean): Boolean; - function InternalGetGradientButtons(var GradientButtons: Boolean): Boolean; - function InternalGetGradientDirection(var GradientDirection: TcxEditGradientDirection): Boolean; - function InternalGetPopupBorderStyle(var PopupBorderStyle: TcxEditPopupBorderStyle): Boolean; - - function IsBorderStyleStored: Boolean; - function IsButtonStyleStored: Boolean; - function IsButtonTransparencyStored: Boolean; - function IsGradientStored: Boolean; - function IsGradientButtonsStored: Boolean; - function IsGradientDirectionStored: Boolean; - function IsPopupBorderStyleStored: Boolean; - function IsStyleControllerStored: Boolean; - - procedure SetAssignedValues(Value: TcxEditStyleValues); - procedure SetBorderStyle(Value: TcxEditBorderStyle); - procedure SetButtonStyle(Value: TcxEditButtonStyle); - procedure SetButtonTransparency(Value: TcxEditButtonTransparency); - procedure SetGradient(Value: Boolean); - procedure SetGradientButtons(Value: Boolean); - procedure SetGradientDirection(Value: TcxEditGradientDirection); - procedure SetPopupBorderStyle(Value: TcxEditPopupBorderStyle); - procedure SetPopupCloseButton(Value: Boolean); - procedure SetStyleController(Value: TcxEditStyleController); - protected - function GetDefaultStyleController: TcxStyleController; override; - function InternalGetNotPublishedExtendedStyleValues: TcxEditStyleValues; override; - function DefaultButtonStyle: TcxEditButtonStyle; virtual; - function DefaultButtonTransparency: TcxEditButtonTransparency; virtual; - function DefaultGradient: Boolean; virtual; - function DefaultGradientButtons: Boolean; virtual; - function DefaultGradientDirection: TcxEditGradientDirection; virtual; - function DefaultPopupBorderStyle: TcxEditPopupBorderStyle; virtual; - property PopupCloseButton: Boolean read GetPopupCloseButton - write SetPopupCloseButton default True; - public - constructor Create(AOwner: TPersistent; ADirectAccessMode: Boolean; - AParentStyle: TcxContainerStyle = nil; - AState: TcxContainerStateItem = csNormal); override; - procedure Assign(Source: TPersistent); override; - function GetStyleValueCount: Integer; override; - function GetStyleValueName(AStyleValue: TcxEditStyleValue; - out StyleValueName: string): Boolean; override; - function IsValueAssigned(AValue: TcxEditStyleValue): Boolean; override; - procedure Init(AParams: TcxViewParams); - property ActiveStyleController: TcxEditStyleController - read GetActiveStyleController; - property AssignedValues: TcxEditStyleValues read GetAssignedValues - write SetAssignedValues stored False; - property BaseStyle: TcxCustomEditStyle read GetBaseStyle; - property BorderStyle: TcxEditBorderStyle read GetBorderStyle - write SetBorderStyle stored IsBorderStyleStored; - property ButtonStyle: TcxEditButtonStyle read GetButtonStyle - write SetButtonStyle stored IsButtonStyleStored; - property ButtonTransparency: TcxEditButtonTransparency read GetButtonTransparency - write SetButtonTransparency stored IsButtonTransparencyStored; - property Edit: TcxCustomEdit read GetEdit; - property Gradient: Boolean read GetGradient write SetGradient - stored IsGradientStored; - property GradientButtons: Boolean read GetGradientButtons - write SetGradientButtons stored IsGradientButtonsStored; - property GradientDirection: TcxEditGradientDirection read GetGradientDirection - write SetGradientDirection stored IsGradientDirectionStored; - property PopupBorderStyle: TcxEditPopupBorderStyle read GetPopupBorderStyle - write SetPopupBorderStyle stored IsPopupBorderStyleStored; - property StyleController: TcxEditStyleController read GetStyleController - write SetStyleController stored IsStyleControllerStored; - end; - - TcxCustomEditStyleClass = class of TcxCustomEditStyle; - - { TcxEditStyle } - - TcxEditStyle = class(TcxCustomEditStyle) - published - property AssignedValues; - property BorderColor; - property BorderStyle; - property ButtonStyle; - property ButtonTransparency; - property Color; - property Edges; - property Font; - property Gradient; -// property GradientButtons; - property GradientDirection; - property HotTrack; - property LookAndFeel; - property PopupBorderStyle; - property Shadow; - property StyleController; - property TextColor; - property TextStyle; - property TransparentBorder; - end; - - { TcxCustomEditPropertiesValues } - - TcxCustomEditPropertiesValues = class(TPersistent) - private - FOwner: TPersistent; - FMaxValue: Boolean; - FMinValue: Boolean; - FReadOnly: Boolean; - function GetProperties: TcxCustomEditProperties; - procedure SetMaxValue(Value: Boolean); - procedure SetMinValue(Value: Boolean); - procedure SetReadOnly(Value: Boolean); - protected - function GetOwner: TPersistent; override; - procedure Changed; - function IsMaxValueStored: Boolean; - function IsMinValueStored: Boolean; - function IsPropertiesPropertyVisible(const APropertyName: string): Boolean; - property MaxValue: Boolean read FMaxValue write SetMaxValue - stored IsMaxValueStored; - property MinValue: Boolean read FMinValue write SetMinValue - stored IsMinValueStored; - property Properties: TcxCustomEditProperties read GetProperties; - public - constructor Create(AOwner: TPersistent); virtual; - procedure Assign(Source: TPersistent); override; - procedure BeginUpdate; - procedure EndUpdate; - procedure RestoreDefaults; virtual; - published - property ReadOnly: Boolean read FReadOnly write SetReadOnly stored False; - end; - - TcxCustomEditPropertiesValuesClass = class of TcxCustomEditPropertiesValues; - - { TcxCustomEditDefaultValuesProvider } - - TcxCustomEditDefaultValuesProvider = class(TcxInterfacedPersistent, - IUnknown, IcxEditDefaultValuesProvider) - public - destructor Destroy; override; - function CanSetEditMode: Boolean; virtual; - procedure ClearUsers; - function DefaultAlignment: TAlignment; virtual; - function DefaultBlobKind: TcxBlobKind; virtual; - function DefaultCanModify: Boolean; virtual; - function DefaultDisplayFormat: string; virtual; - function DefaultEditFormat: string; virtual; - function DefaultEditMask: string; virtual; - function DefaultIsFloatValue: Boolean; virtual; - function DefaultMaxLength: Integer; virtual; - function DefaultMaxValue: Double; virtual; - function DefaultMinValue: Double; virtual; - function DefaultPrecision: Integer; virtual; - function DefaultReadOnly: Boolean; virtual; - function DefaultRequired: Boolean; virtual; - function GetInstance: TObject; - function IsBlob: Boolean; virtual; - function IsCurrency: Boolean; virtual; - function IsDataAvailable: Boolean; virtual; - function IsDataStorage: Boolean; virtual; - function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; virtual; - function IsOnGetTextAssigned: Boolean; virtual; - function IsOnSetTextAssigned: Boolean; virtual; - function IsValidChar(AChar: Char): Boolean; virtual; - end; - - TcxCustomEditDefaultValuesProviderClass = class of TcxCustomEditDefaultValuesProvider; - - { TcxCustomEditProperties } - - TcxEditButtonClickEvent = procedure (Sender: TObject; AButtonIndex: Integer) of object; - TcxEditEditingEvent = procedure(Sender: TObject; var CanEdit: Boolean) of object; - TcxEditCloseUpReason = (crUnknown, crTab, crClose, crCancel, crEnter); - TcxEditClosePopupEvent = procedure(Sender: TcxControl; AReason: TcxEditCloseUpReason) of object; - - TcxCustomEditProperties = class(TcxInterfacedPersistent) - private - FAutoSelect: Boolean; - FBeepOnError: Boolean; - FButtons: TcxEditButtons; - FButtonsViewStyle: TcxEditButtonsViewStyle; - FChangedOccurred: Boolean; - FClearKey: TShortCut; - FClickKey: TShortCut; - FFreeNotificator: TcxFreeNotificator; - FImmediatePost: Boolean; - FInnerAlignment: TcxEditAlignment; - FIsChangingCount: Integer; - FMaxValue: Double; - FMinValue: Double; - FReadOnly: Boolean; - FTransparent: Boolean; - FUpdateCount: Integer; - FUseLeftAlignmentOnEditing: Boolean; - FUseMouseWheel: Boolean; - FValidateOnEnter: Boolean; - FOnButtonClick: TcxEditButtonClickEvent; - FOnChange: TNotifyEvent; - FOnClosePopup: TcxEditClosePopupEvent; - FOnEditValueChanged: TNotifyEvent; - FOnValidate: TcxEditValidateEvent; - FOnPropertiesChanged: TNotifyEvent; - function BaseGetAlignment: TcxEditAlignment; - procedure DefaultValuesChanged(Sender: TObject); - function GetIsChanging: Boolean; - function GetReadOnly: Boolean; - function IsAlignmentStored: Boolean; - function IsUseLeftAlignmentOnEditingStored: Boolean; - function IsReadOnlyStored: Boolean; - procedure SetAssignedValues(Value: TcxCustomEditPropertiesValues); - procedure SetAutoSelect(Value: Boolean); - procedure SetButtons(Value: TcxEditButtons); - procedure SetButtonsViewStyle(Value: TcxEditButtonsViewStyle); - procedure SetUseLeftAlignmentOnEditing(Value: Boolean); - procedure SetIDefaultValuesProvider(Value: IcxEditDefaultValuesProvider); - procedure SetMaxValue(Value: Double); - procedure SetMinValue(Value: Double); - procedure SetReadOnly(Value: Boolean); - procedure SetTransparent(Value: Boolean); - protected - FAlignment: TcxEditAlignment; - FAssignedValues: TcxCustomEditPropertiesValues; - FChangedLocked: Boolean; - FIDefaultValuesProvider: IcxEditDefaultValuesProvider; - FOwner: TPersistent; - procedure AlignmentChangedHandler(Sender: TObject); virtual; - procedure BaseSetAlignment(Value: TcxEditAlignment); virtual; - procedure ButtonsChanged(Sender: TObject); virtual; - function CanModify: Boolean; - function CanValidate: Boolean; virtual; - function DefaultUseLeftAlignmentOnEditing: Boolean; virtual; - procedure DefaultValuesProviderDestroyed; virtual; - procedure DoChanged; virtual; - procedure DoValidate(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var AError: Boolean; AEdit: TcxCustomEdit; - out AIsUserErrorDisplayValue: Boolean); - procedure FillMinMaxValues(AMinValue, AMaxValue: Double); - procedure FreeNotification(Sender: TComponent); virtual; - class function GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; virtual; - function GetDefaultHorzAlignment: TAlignment; virtual; - function GetDisplayFormatOptions: TcxEditDisplayFormatOptions; virtual; - function GetMaxValue: Double; virtual; - function GetMinValue: Double; virtual; - function GetValidateErrorText(AErrorKind: TcxEditErrorKind): string; virtual; - function GetValueEditorEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; virtual; - class function GetViewDataClass: TcxCustomEditViewDataClass; virtual; - function HasDisplayValue: Boolean; virtual; - function InnerEditNeedsTabs: Boolean; virtual; - function IsEditValueConversionDependOnFocused: Boolean; virtual; - function IsMaxValueStored: Boolean; - function IsMinValueStored: Boolean; - property AssignedValues: TcxCustomEditPropertiesValues read FAssignedValues - write SetAssignedValues; - property ButtonsViewStyle: TcxEditButtonsViewStyle read FButtonsViewStyle - write SetButtonsViewStyle default bvsNormal; - property DisplayFormatOptions: TcxEditDisplayFormatOptions read GetDisplayFormatOptions; - property FreeNotificator: TcxFreeNotificator read FFreeNotificator; - property MaxValue: Double read GetMaxValue write SetMaxValue stored IsMaxValueStored; - property MinValue: Double read GetMinValue write SetMinValue stored IsMinValueStored; - property Transparent: Boolean read FTransparent write SetTransparent stored False; // deprecated - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CanCompareEditValue: Boolean; virtual; - class function GetButtonsClass: TcxEditButtonsClass; virtual; - class function GetContainerClass: TcxContainerClass; virtual; - class function GetStyleClass: TcxCustomEditStyleClass; virtual; - class function GetViewInfoClass: TcxContainerViewInfoClass; virtual; - - // Changes - procedure BeginUpdate; - procedure Changed; - function ChangedLocked: Boolean; - procedure EndUpdate(AInvokeChanged: Boolean = True); - procedure Update(AProperties: TcxCustomEditProperties); virtual; - procedure LockUpdate(ALock: Boolean); - - function CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; virtual; - function CreatePreviewProperties: TcxCustomEditProperties; virtual; - function CreateViewData(AStyle: TcxCustomEditStyle; - AIsInplace: Boolean; APreviewMode: Boolean = False): TcxCustomEditViewData; virtual; - procedure DataChanged; virtual; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; virtual; - function GetEditConstantPartSize(ACanvas: TcxCanvas; AEditStyle: TcxCustomEditStyle; - AIsInplace: Boolean; const AEditSizeProperties: TcxEditSizeProperties; - var MinContentSize: TSize): TSize; - function GetEditContentSize(ACanvas: TcxCanvas; AEditStyle: TcxCustomEditStyle; - AIsInplace: Boolean; const AEditValue: TcxEditValue; const AEditSizeProperties: - TcxEditSizeProperties): TSize; - function GetEditSize(ACanvas: TcxCanvas; AEditStyle: TcxCustomEditStyle; - AIsInplace: Boolean; const AEditValue: TcxEditValue; AEditSizeProperties: - TcxEditSizeProperties): TSize; - function GetSpecialFeatures: TcxEditSpecialFeatures; virtual; - function GetSupportedOperations: TcxEditSupportedOperations; virtual; - function IsActivationKey(AKey: Char): Boolean; virtual; - function IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; virtual; - function IsResetEditClass: Boolean; virtual; - function IsValueEditorWithValueFormatting: Boolean; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; AEditFocused: Boolean); virtual; - procedure RestoreDefaults; virtual; - procedure ValidateDisplayValue(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var AError: Boolean; - AEdit: TcxCustomEdit); virtual; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; virtual; - - property Buttons: TcxEditButtons read FButtons write SetButtons; - property IDefaultValuesProvider: IcxEditDefaultValuesProvider - read FIDefaultValuesProvider write SetIDefaultValuesProvider; - property IsChanging: Boolean read GetIsChanging; - property OnPropertiesChanged: TNotifyEvent read FOnPropertiesChanged write FOnPropertiesChanged; - property ReadOnly: Boolean read GetReadOnly write SetReadOnly stored IsReadOnlyStored; - property UseLeftAlignmentOnEditing: Boolean read FUseLeftAlignmentOnEditing - write SetUseLeftAlignmentOnEditing stored IsUseLeftAlignmentOnEditingStored; - property UseMouseWheel: Boolean read FUseMouseWheel write FUseMouseWheel default True; - // !!! - property Alignment: TcxEditAlignment read BaseGetAlignment - write BaseSetAlignment stored IsAlignmentStored; - property AutoSelect: Boolean read FAutoSelect write SetAutoSelect default True; - property BeepOnError: Boolean read FBeepOnError write FBeepOnError default False; - property ClearKey: TShortCut read FClearKey write FClearKey default 0; - property ClickKey: TShortCut read FClickKey write FClickKey default VK_RETURN + scCtrl; - property ImmediatePost: Boolean read FImmediatePost write FImmediatePost default False; - property ValidateOnEnter: Boolean read FValidateOnEnter write FValidateOnEnter default False; - property OnButtonClick: TcxEditButtonClickEvent read FOnButtonClick write FOnButtonClick; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - property OnClosePopup: TcxEditClosePopupEvent read FOnClosePopup write FOnClosePopup; - property OnEditValueChanged: TNotifyEvent read FOnEditValueChanged write FOnEditValueChanged; - property OnValidate: TcxEditValidateEvent read FOnValidate write FOnValidate; - end; - - { TcxDataBinding } - - TcxDataBinding = class(TcxCustomDataBinding); - - { TcxEditDataBinding } - - TInterfacedObjectClass = class of TInterfacedObject; - - TcxEditDataBinding = class(TPersistent) - private - FIDefaultValuesProvider: TcxCustomEditDefaultValuesProvider; - function GetIDefaultValuesProvider: IcxEditDefaultValuesProvider; - function GetIsDataAvailable: Boolean; - protected - FEdit: TcxCustomEdit; - procedure DefaultValuesChanged; virtual; - function GetDisplayValue: TcxEditValue; virtual; - function GetEditDataBindingInstance: TcxEditDataBinding; - function GetEditing: Boolean; virtual; - function GetModified: Boolean; virtual; - function GetOwner: TPersistent; override; - function GetStoredValue: TcxEditValue; virtual; - function IsInnerControlHaveToBeReadOnly: Boolean; virtual; - function IsNull: Boolean; virtual; - procedure Reset; virtual; - procedure SetInternalDisplayValue(const Value: TcxEditValue); - procedure SetDisplayValue(const Value: TcxEditValue); virtual; - function SetEditMode: Boolean; virtual; - procedure SetStoredValue(const Value: TcxEditValue); virtual; - property Edit: TcxCustomEdit read FEdit; - public - constructor Create(AEdit: TcxCustomEdit); virtual; - destructor Destroy; override; - function CanCheckEditorValue: Boolean; virtual; - function CanModify: Boolean; virtual; - function CanPostEditorValue: Boolean; virtual; - function ExecuteAction(Action: TBasicAction): Boolean; virtual; - class function GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; virtual; - procedure SetModified; virtual; - function UpdateAction(Action: TBasicAction): Boolean; virtual; - procedure UpdateDisplayValue; virtual; - procedure UpdateNotConnectedDBEditDisplayValue; virtual; - property DisplayValue: TcxEditValue read GetDisplayValue write SetDisplayValue; - property Editing: Boolean read GetEditing; - property IDefaultValuesProvider: IcxEditDefaultValuesProvider read GetIDefaultValuesProvider; - property IsDataAvailable: Boolean read GetIsDataAvailable; - property Modified: Boolean read GetModified; - property StoredValue: TcxEditValue read GetStoredValue write SetStoredValue; - end; - - TcxEditDataBindingClass = class of TcxEditDataBinding; - - { TcxCustomEdit } - - TcxEditModifiedState = record - Modified: Boolean; - ModifiedAfterEnter: Boolean; - end; - - { TcxCustomEditData } - - TcxCustomEditData = class(TObject) - private - FCleared: Boolean; - FEdit: TcxCustomEdit; - FFreeNotificator: TcxFreeNotificator; - procedure FreeNotification(AComponent: TComponent); - protected - property Cleared: Boolean read FCleared write FCleared; - public - constructor Create(AEdit: TcxCustomEdit); virtual; - destructor Destroy; override; - procedure Clear; - end; - - TcxCustomEditDataClass = class of TcxCustomEditData; - - { TcxEditChangeEventsCatcher } - - TcxEditChangeEventsCatcher = class - private - FEdit: TcxCustomEdit; - FLockCount: Integer; - FOnChangeEvent: Boolean; - FOnEditValueChangedEvent: Boolean; - public - property OnChangeEvent: Boolean read FOnChangeEvent write FOnChangeEvent; - property OnEditValueChangedEvent: Boolean read FOnEditValueChangedEvent - write FOnEditValueChangedEvent; - constructor Create(AEdit: TcxCustomEdit); - function IsLocked: Boolean; - procedure Lock(ALock: Boolean; AInvokeChangedOnUnlock: Boolean = True); - end; - - TcxCustomEdit = class(TcxContainer, IUnknown, IcxEditRepositoryItemListener, - IdxSkinSupport, IdxSpellCheckerControl) - private - FAnchorX: Integer; - FAnchorY: Integer; - FAutoSize: Boolean; - FCaptureButtonVisibleIndex: Integer; - FChangeEventsCatcher: TcxEditChangeEventsCatcher; - FClickLockCount: Integer; - FDblClickTimer: TcxTimer; - FEditData: TcxCustomEditData; - FEditModeSetting: Boolean; - FEditValueChangingLockCount: Integer; - FFocused: Boolean; - FHandleAllocating: Boolean; - FInnerEdit: IcxCustomInnerEdit; - FInnerEditDefWindowProc: Pointer; - FIsBarControl: Boolean; - FIsContentParamsInitialized: Boolean; - FIsEditValidated: Boolean; - FIsEditValidating: Boolean; - FIsEditValueResetting: Boolean; - FIsEscapeDown: Boolean; - FIsFirstSetSize: Boolean; - FIsJustCreated: Boolean; - FIsInplace: Boolean; - FIsPosting: Boolean; - FKeyboardAction: Boolean; - FLockValidate: Integer; - FModified: Boolean; - FModifiedAfterEnter: Boolean; - FObjectInstance: Pointer; - FPrevEditValue: TcxEditValue; - FPrevModifiedList: array of TcxEditModifiedState; - FPropertiesEvents: TNotifyEvent; - FRepositoryItem: TcxEditRepositoryItem; - FTransparent: Boolean; - FUpdate: Boolean; - FValidateErrorProcessing: Boolean; - FOnAfterKeyDown: TKeyEvent; - FOnEditing: TcxEditEditingEvent; - FOnPostEditValue: TNotifyEvent; - - function CheckButtonShortCuts(AKey: Integer): Boolean; - procedure DblClickTimerHandler(Sender: TObject); - procedure DoClearEditData(AEditData: TcxCustomEditData); - function GetActiveProperties: TcxCustomEditProperties; - function GetEditActiveStyle: TcxCustomEditStyle; - function GetHeight: Integer; - function GetInternalStyle(AState: TcxContainerStateItem): TcxCustomEditStyle; - function GetStyle: TcxEditStyle; - function GetStyleDisabled: TcxEditStyle; - function GetStyleFocused: TcxEditStyle; - function GetStyleHot: TcxEditStyle; - function GetViewInfo: TcxCustomEditViewInfo; - procedure InitContentParams; - procedure InternalCanResize(var ANewWidth, ANewHeight: Integer); - function IsAutoWidth: Boolean; - procedure ReadAnchorX(Reader: TReader); - procedure ReadAnchorY(Reader: TReader); - procedure ReadHeight(Reader: TReader); - procedure ReadWidth(Reader: TReader); - procedure SetDataBinding(Value: TcxEditDataBinding); - procedure SetHeight(Value: Integer); - procedure SetInternalStyle(AState: TcxContainerStateItem; - Value: TcxCustomEditStyle); - procedure SetInternalReadOnly(Value: Boolean); - procedure SetModified(Value: Boolean); - procedure SetModifiedAfterEnter(Value: Boolean); - procedure SetModifiedAfterEnterValue(Value: Boolean); - procedure SetProperties(Value: TcxCustomEditProperties); - procedure SetRepositoryItem(Value: TcxEditRepositoryItem); - procedure SetReplicatableFlag; - procedure SetStyle(Value: TcxEditStyle); - procedure SetStyleDisabled(Value: TcxEditStyle); - procedure SetStyleFocused(Value: TcxEditStyle); - procedure SetStyleHot(Value: TcxEditStyle); - procedure SetTransparent(Value: Boolean); - procedure WriteAnchorX(Writer: TWriter); - procedure WriteAnchorY(Writer: TWriter); - procedure WriteHeight(Writer: TWriter); - procedure WriteWidth(Writer: TWriter); - - function GetHintText(APart: Integer): string; - - procedure WMCopy(var Message: TMessage); message WM_COPY; - procedure WMCut(var Message: TMessage); message WM_CUT; - procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; - procedure WMPaste(var Message: TMessage); message WM_PASTE; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - procedure CMEnter(var Message: TCMEnter); message CM_ENTER; - procedure CMShowingChanged(var Message: TMessage); message CM_SHOWINGCHANGED; - protected - FDataBinding: TcxEditDataBinding; - FEditValue: TcxEditValue; - FProperties: TcxCustomEditProperties; - procedure CalculateAnchors; virtual; - function CanContainerHandleTabs: Boolean; override; - function CanResize(var NewWidth, NewHeight: Integer): Boolean; override; - procedure Click; override; - procedure DblClick; override; - procedure DefineProperties(Filer: TFiler); override; - - procedure DoEnter; override; - procedure DoExit; override; - function DoInnerControlDefaultHandler(var Message: TMessage): Boolean; override; - function DoRefreshContainer(const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): Boolean; override; - procedure FocusChanged; override; - function GetBorderExtent: TRect; override; - function GetEditStateColorKind: TcxEditStateColorKind; override; - function GetStyleClass: TcxContainerStyleClass; override; - function GetViewInfoClass: TcxContainerViewInfoClass; override; - function InternalGetNotPublishedStyleValues: TcxEditStyleValues; override; - function IsTransparentBackground: Boolean; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure Loaded; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseLeave(AControl: TControl); override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure Paint; override; - procedure ReadState(Reader: TReader); override; - procedure RequestAlign; override; - procedure SetName(const Value: TComponentName); override; - procedure SetParent(AParent: TWinControl); override; - procedure SetSize; override; - procedure CreateHandle; override; - function IsNativeStyle: Boolean; override; - procedure SafeSelectionFocusInnerControl; override; - procedure AdjustInnerEditPosition; virtual; - procedure AfterPosting; virtual; - procedure BeforePosting; virtual; - function ButtonVisibleIndexAt(const P: TPoint): Integer; - procedure CalculateViewInfo(AIsMouseEvent: Boolean); reintroduce; overload; - procedure CalculateViewInfo(P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AIsMouseEvent: Boolean); reintroduce; overload; - function CanAutoSize: Boolean; reintroduce; virtual; - function CanAutoWidth: Boolean; virtual; - function CanKeyDownModifyEdit(Key: Word; Shift: TShiftState): Boolean; virtual; - function CanKeyPressModifyEdit(Key: Char): Boolean; virtual; - function CanModify: Boolean; virtual; - procedure ChangeHandler(Sender: TObject); virtual; - procedure CheckHandle; - function CreateInnerEdit: IcxCustomInnerEdit; virtual; - function CreateViewData: TcxCustomEditViewData; virtual; - procedure DefaultButtonClick; virtual; - procedure DisableValidate; - procedure DoAfterKeyDown(var Key: Word; Shift: TShiftState); - procedure DoAutoSizeChanged; virtual; - procedure DoButtonClick(AButtonVisibleIndex: Integer); virtual; - procedure DoButtonDown(AButtonVisibleIndex: Integer); virtual; - procedure DoButtonUp(AButtonVisibleIndex: Integer); virtual; - procedure DoChange; virtual; - procedure DoClick; - procedure DoClosePopup(AReason: TcxEditCloseUpReason); - procedure DoEditValueChanged; virtual; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); virtual; - procedure DoEditKeyPress(var Key: Char); virtual; - procedure DoEditKeyUp(var Key: Word; Shift: TShiftState); virtual; - procedure DoEditProcessTab(Shift: TShiftState); virtual; - procedure DoFocusChanged; virtual; - procedure DoHideEdit(AExit: Boolean); - procedure DoOnValidate(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var AError: Boolean); - procedure DoOnChange; virtual; - procedure DoOnEditValueChanged; virtual; - procedure DoPostEditValue; - procedure DoShowEdit; virtual; - procedure EditingChanged; virtual; - procedure EnableValidate; - procedure FillSizeProperties(var AEditSizeProperties: TcxEditSizeProperties); virtual; - function GetClearValue: TcxEditValue; virtual; - class function GetDataBindingClass: TcxEditDataBindingClass; reintroduce; virtual; - function GetDefaultButtonVisibleIndex: Integer; - function GetDisplayValue: string; virtual; - function GetEditDataClass: TcxCustomEditDataClass; virtual; - function GetEditingValue: TcxEditValue; virtual; - function GetEditValue: TcxEditValue; virtual; - function GetInnerEditClass: TControlClass; virtual; - function HandleMouseWheel(Shift: TShiftState): Boolean; - procedure HandleValidationError(const AErrorText: string; - ACanAbortExecution: Boolean); virtual; - function HasInnerEdit: Boolean; - procedure Initialize; virtual; - procedure InitializeEditData; virtual; - procedure InitializeInnerEdit; virtual; - procedure InitializeViewData(AViewData: TcxCustomEditViewData); virtual; - function InternalDoEditing: Boolean; virtual; - function InternalGetActiveProperties: TcxCustomEditProperties; - function InternalGetEditingValue: TcxEditValue; virtual; - procedure InternalPostEditValue(AValidateEdit: Boolean = False); - procedure InternalPostValue; - procedure InternalSetDisplayValue(const Value: TcxEditValue); virtual; - procedure InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); virtual; - procedure InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); virtual; - function IsActiveControl: Boolean; virtual; - function IsButtonDC(ADC: THandle): Boolean; virtual; - function IsClickEnabledDuringLoading: Boolean; virtual; - function IsDBEdit: Boolean; - function IsDBEditPaintCopyDrawing: Boolean; virtual; - function IsEditorKey(Key: Word; Shift: TShiftState): Boolean; virtual; - function IsEditValueStored: Boolean; virtual; - function IsNativeBackground: Boolean; virtual; - function IsOnChangeEventAssigned: Boolean; - function IsOnEditValueChangedEventAssigned: Boolean; - function IsOnValidateEventAssigned: Boolean; - function IsResetEditClass: Boolean; - function IsSpecialKey(Key: Word; Shift: TShiftState): Boolean; - function IsTransparent: Boolean; virtual; - function IsValidChar(AChar: Char): Boolean; virtual; - function NeedsInvokeAfterKeyDown(AKey: Word; AShift: TShiftState): Boolean; virtual; - procedure PaintCopyDraw; virtual; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); virtual; - procedure ProcessViewInfoChanges(APrevViewInfo: TcxCustomEditViewInfo; AIsMouseDownUpEvent: Boolean); virtual; - procedure PropertiesChanged(Sender: TObject); virtual; - function PropertiesChangeLocked: Boolean; - function RealReadOnly: Boolean; virtual; - procedure RepositoryItemAssigned; virtual; - procedure RepositoryItemAssigning; virtual; - procedure ResetEditValue; virtual; - procedure RestoreModified; - procedure SaveModified; - function SendActivationKey(Key: Char): Boolean; virtual; - function SetDisplayText(const Value: string): Boolean; virtual; - procedure SetEditAutoSize(Value: Boolean); virtual; - procedure SetEditValue(const Value: TcxEditValue); virtual; - procedure SetInternalEditValue(const Value: TcxEditValue); virtual; - procedure SetInternalDisplayValue(Value: TcxEditValue); virtual; - procedure SynchronizeDisplayValue; virtual; - procedure SynchronizeEditValue; virtual; - function TabsNeeded: Boolean; virtual; - function UpdateContentOnFocusChanging: Boolean; virtual; - procedure UpdateDrawValue; virtual; - procedure UpdateInnerEditReadOnly; - function ValidateKeyDown(var Key: Word; Shift: TShiftState): Boolean; virtual; - function ValidateKeyPress(var Key: Char): Boolean; virtual; - function WantNavigationKeys: Boolean; virtual; - procedure LockedInnerEditWindowProc(var Message: TMessage); virtual; - procedure LockInnerEditRepainting; virtual; - procedure UnlockInnerEditRepainting; virtual; - function UseAnchors: Boolean; virtual; - function UseAnchorX: Boolean; virtual; - function UseAnchorY: Boolean; virtual; - - // IcxEditRepositoryItemListener - procedure IcxEditRepositoryItemListener.ItemRemoved = RepositoryItemListenerItemRemoved; - procedure IcxEditRepositoryItemListener.PropertiesChanged = RepositoryItemListenerPropertiesChanged; - procedure RepositoryItemListenerItemRemoved(Sender: TcxEditRepositoryItem); - procedure RepositoryItemListenerPropertiesChanged(Sender: TcxEditRepositoryItem); - - //IdxSpellCheckerSupport - procedure IdxSpellCheckerControl.SetValue = SpellCheckerSetValue; - procedure IdxSpellCheckerControl.SetIsBarControl = SpellCheckerSetIsBarControl; - procedure IdxSpellCheckerControl.SetSelText = SpellCheckerSetSelText; - - function SupportsSpelling: Boolean; virtual; - procedure SpellCheckerSetIsBarControl(AValue: Boolean); virtual; - procedure SpellCheckerSetSelText(const AValue: string; APost: Boolean = False); virtual; - procedure SpellCheckerSetValue(const AValue: Variant); virtual; - - - property ActiveStyle: TcxCustomEditStyle read GetEditActiveStyle; - property AnchorX: Integer read FAnchorX; - property AnchorY: Integer read FAnchorY; - property AutoSize: Boolean read FAutoSize write SetEditAutoSize default True; - property CaptureButtonVisibleIndex: Integer read FCaptureButtonVisibleIndex write - FCaptureButtonVisibleIndex; - property ChangeEventsCatcher: TcxEditChangeEventsCatcher read FChangeEventsCatcher; - property DataBinding: TcxEditDataBinding read FDataBinding write SetDataBinding; - property DisplayValue: string read GetDisplayValue; - property EditData: TcxCustomEditData read FEditData; - property EditModeSetting: Boolean read FEditModeSetting; - property InnerEdit: IcxCustomInnerEdit read FInnerEdit; - property IsEditValidated: Boolean read FIsEditValidated write FIsEditValidated; - property IsEditValidating: Boolean read FIsEditValidating; - - property IsEditValueResetting: Boolean read FIsEditValueResetting; - property KeyboardAction: Boolean read FKeyboardAction write FKeyboardAction; - property PrevEditValue: TcxEditValue read FPrevEditValue write FPrevEditValue; - property Properties: TcxCustomEditProperties read FProperties write SetProperties; - property Transparent: Boolean read FTransparent write SetTransparent default False; - public - ContentParams: TcxEditContentParams; - InplaceParams: TcxInplaceEditParams; - constructor Create(AOwner: TComponent); overload; override; - constructor Create(AOwner: TComponent; AIsInplace: Boolean); reintroduce; overload; virtual; - destructor Destroy; override; - procedure DefaultHandler(var Message); override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - procedure GetTabOrderList(List: TList); override; - function IsInplace: Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - procedure Activate(var AEditData: TcxCustomEditData); virtual; - procedure ActivateByKey(Key: Char; var AEditData: TcxCustomEditData); virtual; - procedure ActivateByMouse(Shift: TShiftState; X, Y: Integer; - var AEditData: TcxCustomEditData); virtual; - function AreChangeEventsLocked: Boolean; - function CanPostEditValue: Boolean; - procedure Clear; virtual; - procedure CopyToClipboard; virtual; - procedure CutToClipboard; virtual; - function Deactivate: Boolean; virtual; - function DoEditing: Boolean; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; virtual; - function InternalFocused: Boolean; - function IsChildWindow(AWnd: THandle): Boolean; virtual; - function IsEditClass: Boolean; virtual; - function IsRepositoryItemAcceptable( - ARepositoryItem: TcxEditRepositoryItem): Boolean; virtual; - procedure LockChangeEvents(ALock: Boolean; AInvokeChangedOnUnlock: Boolean = True); - procedure LockClick(ALock: Boolean); - procedure LockEditValueChanging(ALock: Boolean); - procedure PasteFromClipboard; virtual; - procedure PostEditValue; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); virtual; - procedure Reset; - procedure SelectAll; virtual; - function ValidateEdit(ARaiseExceptionOnError: Boolean): Boolean; - {$IFDEF DELPHI10} - function GetTextBaseLine: Integer; virtual; - function HasTextBaseLine: Boolean; virtual; - {$ENDIF} - property ActiveProperties: TcxCustomEditProperties read GetActiveProperties; - property EditingValue: TcxEditValue read GetEditingValue; - property EditModified: Boolean read FModified write SetModified; - property EditValue: TcxEditValue read GetEditValue write SetEditValue stored - IsEditValueStored; - property InternalEditValue: TcxEditValue read GetEditValue - write SetInternalEditValue stored False; - property InternalProperties: TcxCustomEditProperties read FProperties; - property IsPosting: Boolean read FIsPosting; - property ModifiedAfterEnter: Boolean read FModifiedAfterEnter write SetModifiedAfterEnter; - property Style: TcxEditStyle read GetStyle write SetStyle; - property StyleDisabled: TcxEditStyle read GetStyleDisabled - write SetStyleDisabled; - property StyleFocused: TcxEditStyle read GetStyleFocused - write SetStyleFocused; - property StyleHot: TcxEditStyle read GetStyleHot write SetStyleHot; - property Styles[AState: TcxContainerStateItem]: TcxCustomEditStyle - read GetInternalStyle write SetInternalStyle; - property TabStop default True; - property ViewInfo: TcxCustomEditViewInfo read GetViewInfo; - - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - - property OnAfterKeyDown: TKeyEvent read FOnAfterKeyDown write FOnAfterKeyDown; - property OnEditing: TcxEditEditingEvent read FOnEditing write FOnEditing; - property OnPostEditValue: TNotifyEvent read FOnPostEditValue write FOnPostEditValue; - published - property Height: Integer read GetHeight write SetHeight stored False; - property PropertiesEvents: TNotifyEvent read FPropertiesEvents write FPropertiesEvents; - property RepositoryItem: TcxEditRepositoryItem read FRepositoryItem write SetRepositoryItem; - property Width stored False; - property OnFocusChanged; - end; - - TcxCustomEditClass = class of TcxCustomEdit; - - { TcxEditAlignment } - - TcxEditAlignment = class(TPersistent) - private - FHorz: TcxEditHorzAlignment; - FIsHorzAssigned: Boolean; - FOwner: TPersistent; - FVert: TcxEditVertAlignment; - FOnChanged: TNotifyEvent; - procedure SetHorz(const Value: TcxEditHorzAlignment); - procedure SetVert(const Value: TcxEditVertAlignment); - protected - procedure DoChanged; - function GetOwner: TPersistent; override; - property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; - public - constructor Create(AOwner: TPersistent); virtual; - procedure Assign(Source: TPersistent); override; - function IsHorzStored: Boolean; - function IsVertStored: Boolean; - procedure Reset; - published - property Horz: TcxEditHorzAlignment read FHorz write SetHorz stored IsHorzStored; - property Vert: TcxEditVertAlignment read FVert write SetVert stored IsVertStored; - end; - - TcxEditListItem = record - Edit: TcxCustomEdit; - Properties: TcxCustomEditProperties; - end; - - { TcxInplaceEditList } - - TcxInplaceEditList = class - private - FItems: array of TcxEditListItem; - FEditorOwner: TComponent; - function CreateEdit(APropertiesClass: TcxCustomEditPropertiesClass): TcxCustomEdit; - procedure DestroyItems; - function FindItem(AProperties: TcxCustomEditProperties; - ACanUseFreeEditors: Boolean): Integer; overload; - function FindItem(APropertiesClass: TcxCustomEditPropertiesClass): Integer; overload; - function GetCount: Integer; - function GetEdit(AItemIndex: Integer): TcxCustomEdit; overload; - procedure InitEdit(AEdit: TcxCustomEdit; AProperties: TcxCustomEditProperties); - procedure RemoveItem(AIndex: Integer); overload; - protected - property Count: Integer read GetCount; - property EditorOwner: TComponent read FEditorOwner; - public - constructor Create(AEditorOwner: TComponent); virtual; - destructor Destroy; override; - procedure DisconnectProperties(AProperties: TcxCustomEditProperties); - function FindEdit(AProperties: TcxCustomEditProperties): TcxCustomEdit; overload; - function FindEdit(APropertiesClass: TcxCustomEditPropertiesClass): TcxCustomEdit; overload; - function GetEdit(AProperties: TcxCustomEditProperties): TcxCustomEdit; overload; - function GetEdit(APropertiesClass: TcxCustomEditPropertiesClass): TcxCustomEdit; overload; - procedure RemoveItem(AProperties: TcxCustomEditProperties); overload; - procedure RemoveItem(APropertiesClass: TcxCustomEditPropertiesClass); overload; - end; - - { TcxDefaultEditStyleController } - - TcxDefaultEditStyleController = class(TComponent) - private - function GetEmulateStandardControlDrawing: Boolean; - function GetInternalStyle(AState: TcxContainerStateItem): TcxCustomEditStyle; - function GetOnStyleChanged: TNotifyEvent; - function GetStyle: TcxEditStyle; - function GetStyleDisabled: TcxEditStyle; - function GetStyleFocused: TcxEditStyle; - function GetStyleHot: TcxEditStyle; - procedure SetEmulateStandardControlDrawing(Value: Boolean); - procedure SetInternalStyle(AState: TcxContainerStateItem; - Value: TcxCustomEditStyle); - procedure SetOnStyleChanged(Value: TNotifyEvent); - procedure SetStyle(Value: TcxEditStyle); - procedure SetStyleDisabled(Value: TcxEditStyle); - procedure SetStyleFocused(Value: TcxEditStyle); - procedure SetStyleHot(Value: TcxEditStyle); - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure RestoreStyles; - property Styles[AState: TcxContainerStateItem]: TcxCustomEditStyle - read GetInternalStyle write SetInternalStyle; - published - property EmulateStandardControlDrawing: Boolean - read GetEmulateStandardControlDrawing - write SetEmulateStandardControlDrawing default False; - property Style: TcxEditStyle read GetStyle write SetStyle; - property StyleDisabled: TcxEditStyle read GetStyleDisabled - write SetStyleDisabled; - property StyleFocused: TcxEditStyle read GetStyleFocused - write SetStyleFocused; - property StyleHot: TcxEditStyle read GetStyleHot write SetStyleHot; - property OnStyleChanged: TNotifyEvent read GetOnStyleChanged - write SetOnStyleChanged; - end; - -const - DefaultcxEditSizeProperties: TcxEditSizeProperties = - (Height: -1; MaxLineCount: 0; Width: -1); - -function ButtonToShift(Button: TMouseButton): TShiftState; -procedure CheckSize(var Size: TSize; const ANewSize: TSize); -function cxButtonToShift(Button: TcxMouseButton): TShiftState; -function cxEditVarEquals(const V1, V2: Variant): Boolean; -function DefaultEditStyleController: TcxEditStyleController; -function EmulateStandardControlDrawing: Boolean; -function GetDefaultEditRepository: TcxEditRepository; -function GetEditPopupWindowControlsLookAndFeelKind( - AEdit: TcxCustomEdit): TcxLookAndFeelKind; -function GetOwnerComponent(APersistent: TPersistent): TComponent; -function GetRegisteredEditProperties: TcxRegisteredClasses; -function GetStandaloneEventSender(AEdit: TcxCustomEdit): TObject; -function InternalVarEqualsExact(const V1, V2: Variant): Boolean; -function IsSpaceChar(C: AnsiChar): Boolean; overload; -function IsSpaceChar(C: WideChar): Boolean; overload; -function NeedAssignRepositoryItem(AItemProperties: TcxCustomEditProperties; - ARepositoryItem: TcxEditRepositoryItem; var AEditingProperties: TcxCustomEditProperties): Boolean; -procedure SendMouseEvent(AReceiver: TWinControl; AMessage: DWORD; - AShift: TShiftState; const APoint: TPoint); -procedure SendKeyDown(AReceiver: TWinControl; Key: Word; Shift: TShiftState); -procedure SendKeyPress(AReceiver: TWinControl; Key: Char); -procedure SendKeyUp(AReceiver: TWinControl; Key: Word; Shift: TShiftState); -procedure SetStandardControlDrawingEmulationMode(AEmulate: Boolean); -procedure UniteRegions(ADestRgn, ASrcRgn: TcxRegion); - -implementation - -{$R cxEdit.res} -{$R cxScrollCursors.res} - -uses - TypInfo, cxDateUtils, cxEditConsts, cxEditUtils, cxFilterConsts, dxOffice11, - dxThemeConsts, dxUxTheme, dxThemeManager, cxGeometry, cxDWMApi, Math, cxLibraryConsts; - -const - EditContentMaxTotalDefaultHorzOffset = 3; - -type - TControlAccess = class(TControl); - TcxLookAndFeelAccess = class(TcxLookAndFeel); - TWinControlAccess = class(TWinControl); - -var - FCreatedEditPropertiesList: TList; - FDefaultEditRepository: TcxEditRepository; - FDefaultEditStyleController: TcxEditStyleController; - FDefaultEditStyleControllerCount: Integer; - FEmulateStandardControlDrawing: Boolean; - FInplaceEditLists: TList; - FRegisteredEditProperties: TcxRegisteredClasses; - -function ButtonToShift(Button: TMouseButton): TShiftState; -const - AButtonMap: array[TMouseButton] of TShiftState = ([ssLeft], [ssRight], [ssMiddle]); -begin - Result := AButtonMap[Button]; -end; - -procedure CheckSize(var Size: TSize; const ANewSize: TSize); -begin - with ANewSize do - begin - if Size.cx < cx then - Size.cx := cx; - if Size.cy < cy then - Size.cy := cy; - end; -end; - -procedure ClearPropertiesDestroyingListeners(AProperties: TcxCustomEditProperties); -var - I: Integer; -begin - if FInplaceEditLists <> nil then - for I := 0 to FInplaceEditLists.Count - 1 do - TcxInplaceEditList(FInplaceEditLists[I]).DisconnectProperties(AProperties); -end; - -function cxButtonToShift(Button: TcxMouseButton): TShiftState; -const - AButtonMap: array[TcxMouseButton] of TShiftState = ([], [ssLeft], [ssRight], [ssMiddle]); -begin - Result := AButtonMap[Button]; -end; - -function cxEditVarEquals(const V1, V2: Variant): Boolean; - - function VarTypeEquals: Boolean; - begin - Result := VarIsNumericEx(V1) and VarIsNumericEx(V2) or (VarType(V1) = VarType(V2)); - {$IFDEF DELPHI12} - if not Result then - Result := VarIsStr(V1) and VarIsStr(V2); - {$ENDIF} - end; - -begin - Result := VarTypeEquals and VarEqualsExact(V1, V2); -end; - -procedure DrawComplexFrameEx(ACanvas: TcxCanvas; var ARect: TRect; ALeftTopColor, ARightBottomColor: TColor); -begin - ACanvas.DrawComplexFrame(ARect, ALeftTopColor, ARightBottomColor); - InflateRect(ARect, -1, -1); -end; - -procedure FrameRectEx(ACanvas: TcxCanvas; var ARect: TRect; AColor: TColor); -begin - ACanvas.FrameRect(ARect, AColor); - InflateRect(ARect, -1, -1); -end; - -function DefaultEditStyleController: TcxEditStyleController; -begin - Result := FDefaultEditStyleController; -end; - -function EmulateStandardControlDrawing: Boolean; -begin - Result := FEmulateStandardControlDrawing; -end; - -function GetDefaultEditRepository: TcxEditRepository; -begin - if FDefaultEditRepository = nil then - FDefaultEditRepository := TcxEditRepository.Create(nil); - Result := FDefaultEditRepository; -end; - -function GetEditPopupWindowControlsLookAndFeelKind( - AEdit: TcxCustomEdit): TcxLookAndFeelKind; -const - APopupControlLookAndFeelKindMap: array [TcxEditButtonStyle] of TcxLookAndFeelKind = - (lfStandard, lfStandard, lfFlat, lfFlat, lfFlat, - lfUltraFlat, lfOffice11); -begin - with AEdit do - if IsInplace then - Result := Style.LookAndFeel.Kind - else - if Length(ViewInfo.ButtonsInfo) > 0 then - Result := APopupControlLookAndFeelKindMap[ViewInfo.ButtonsInfo[0].Data.Style] - else - Result := lfStandard; -end; - -function GetOwnerComponent(APersistent: TPersistent): TComponent; -begin - while (APersistent <> nil) and not(APersistent is TComponent) do - APersistent := GetPersistentOwner(APersistent); - Result := TComponent(APersistent); -end; - -function GetRegisteredEditProperties: TcxRegisteredClasses; -begin - if FRegisteredEditProperties = nil then - begin - FRegisteredEditProperties := TcxRegisteredClasses.Create; - FRegisteredEditProperties.Sorted := True; - end; - Result := FRegisteredEditProperties; -end; - -function GetStandaloneEventSender(AEdit: TcxCustomEdit): TObject; -begin - if not AEdit.IsInplace then - Result := AEdit - else - Result := nil; -end; - -function InternalVarEqualsExact(const V1, V2: Variant): Boolean; -begin - Result := (VarType(V1) = VarType(V2)) and VarEqualsExact(V1, V2); -end; - -function IsSpaceChar(C: AnsiChar): Boolean; overload; -begin - Result := (C = ' ') or (C = #0) or (C = #9) or (C = #10) or (C = #12) or (C = #13); -end; - -function IsSpaceChar(C: WideChar): Boolean; overload; -begin - Result := (C = ' ') or (C = #0) or (C = #9) or (C = #10) or (C = #12) or (C = #13); -end; - -function IsRegionEmpty(ARgn: TcxRegion): Boolean; -var - R: TRect; -begin - Result := GetRgnBox(ARgn.Handle, R) = NULLREGION; -end; - -function NeedAssignRepositoryItem(AItemProperties: TcxCustomEditProperties; - ARepositoryItem: TcxEditRepositoryItem; var AEditingProperties: TcxCustomEditProperties): Boolean; -begin - Result := (AItemProperties <> nil) and (ARepositoryItem <> nil) and - (AEditingProperties = ARepositoryItem.Properties) and - ARepositoryItem.ArePropertiesCompatible(AItemProperties.ClassType); - if Result then - AEditingProperties := AItemProperties; -end; - -procedure SendMouseEvent(AReceiver: TWinControl; AMessage: DWORD; - AShift: TShiftState; const APoint: TPoint); -begin - SendMessage(AReceiver.Handle, AMessage, ShiftStateToKeys(AShift), MakeLParam(APoint.X, APoint.Y)); -end; - -procedure SendKeyEvent(AReceiver: TWinControl; AMessage: DWORD; AKey: Word; AShift: TShiftState); -begin - SendMessage(AReceiver.Handle, AMessage, AKey, 0); -end; - -procedure SendKeyDown(AReceiver: TWinControl; Key: Word; Shift: TShiftState); -begin - SendKeyEvent(AReceiver, WM_KEYDOWN, Key, Shift); -end; - -procedure SendKeyPress(AReceiver: TWinControl; Key: Char); -begin - SendKeyEvent(AReceiver, WM_CHAR, Integer(Key), []); -end; - -procedure SendKeyUp(AReceiver: TWinControl; Key: Word; Shift: TShiftState); -begin - SendKeyEvent(AReceiver, WM_KEYUP, Key, Shift); -end; - -procedure SetStandardControlDrawingEmulationMode(AEmulate: Boolean); -begin - if AEmulate <> FEmulateStandardControlDrawing then - begin - FEmulateStandardControlDrawing := AEmulate; - if RootLookAndFeel <> nil then - TcxLookAndFeelAccess(RootLookAndFeel).NotifyChanged; - end; -end; - -procedure UniteRegions(ADestRgn, ASrcRgn: TcxRegion); -begin - with ADestRgn do - CombineRgn(Handle, Handle, ASrcRgn.Handle, RGN_OR); -end; - -{ TcxEditRepositoryItem } - -constructor TcxEditRepositoryItem.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FListenerList := TInterfaceList.Create; - FProperties := GetEditPropertiesClass.Create(Self); - FProperties.OnPropertiesChanged := PropertiesChanged; -end; - -destructor TcxEditRepositoryItem.Destroy; - - procedure RemoveNotification; - var - I: Integer; - begin - for I := FListenerList.Count - 1 downto 0 do - IcxEditRepositoryItemListener(FListenerList[I]).ItemRemoved(Self); - end; - -begin - RemoveNotification; - Repository := nil; - FreeAndNil(FProperties); - inherited Destroy; -end; - -procedure TcxEditRepositoryItem.AddListener(AListener: IcxEditRepositoryItemListener); -begin - if FListenerList.IndexOf(AListener) = -1 then - FListenerList.Add(AListener); -end; - -class function TcxEditRepositoryItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomEditProperties; -end; - -function TcxEditRepositoryItem.GetBaseName: string; -const - SSubStr = 'TcxEditRepository'; -var - I: Integer; -begin - I := Pos(SSubStr, ClassName); - if I > 0 then - Result := Copy(ClassName, I + Length(SSubStr), Length(ClassName)) - else - Result := ''; - Result := Repository.Name + Result; -end; - -function TcxEditRepositoryItem.GetParentComponent: TComponent; -begin - Result := Repository; -end; - -function TcxEditRepositoryItem.HasParent: Boolean; -begin - Result := Repository <> nil; -end; - -procedure TcxEditRepositoryItem.RemoveListener(AListener: IcxEditRepositoryItemListener); -begin - FListenerList.Remove(AListener); -end; - -procedure TcxEditRepositoryItem.SetParentComponent(AParent: TComponent); -begin - if not (csLoading in ComponentState) then - Repository := AParent as TcxEditRepository; -end; - -function TcxEditRepositoryItem.ArePropertiesCompatible( - APropertiesClass: TClass): Boolean; -begin - Result := Properties.InheritsFrom(APropertiesClass); -end; - -procedure TcxEditRepositoryItem.PropertiesChanged(Sender: TObject); -var - I: Integer; -begin - for I := FListenerList.Count - 1 downto 0 do - IcxEditRepositoryItemListener(FListenerList[I]).PropertiesChanged(Self); -end; - -procedure TcxEditRepositoryItem.ReadState(Reader: TReader); -begin - inherited ReadState(Reader); - Repository := TcxEditRepository(Reader.Parent); -end; - -procedure TcxEditRepositoryItem.SetProperties(Value: TcxCustomEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxEditRepositoryItem.SetRepository(Value: TcxEditRepository); -begin - if FRepository <> Value then - begin - if FRepository <> nil then - FRepository.RemoveItem(Self); - FRepository := Value; - if Value <> nil then - Value.AddItem(Self); - end; -end; - -{ TcxEditRepository } - -constructor TcxEditRepository.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FItems := TList.Create; -end; - -destructor TcxEditRepository.Destroy; -begin - Clear; - FItems.Free; - FItems := nil; - inherited Destroy; -end; - -procedure TcxEditRepository.Clear; -begin - while Count > 0 do - Items[Count - 1].Free; -end; - -function TcxEditRepository.CreateItem(ARepositoryItemClass: TcxEditRepositoryItemClass): TcxEditRepositoryItem; -begin - Result := CreateItemEx(ARepositoryItemClass, Self); -end; - -function TcxEditRepository.CreateItemEx(ARepositoryItemClass: TcxEditRepositoryItemClass; - AOwner: TComponent): TcxEditRepositoryItem; -begin - Result := ARepositoryItemClass.Create(AOwner); - Result.Repository := Self; -end; - -function TcxEditRepository.ItemByName(ARepositoryItemName: string): TcxEditRepositoryItem; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - if AnsiCompareText(Items[I].Name, ARepositoryItemName) = 0 then - begin - Result := Items[I]; - Break; - end; -end; - -procedure TcxEditRepository.AddItem(AItem: TcxEditRepositoryItem); -var - AIndex: Integer; -begin - AIndex := FItems.IndexOf(AItem); - if AIndex = -1 then - FItems.Add(AItem); -end; - -procedure TcxEditRepository.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - AItem: TcxEditRepositoryItem; - I: Integer; -begin - for I := 0 to Count - 1 do - begin - AItem := Items[I]; - if AItem.Owner = Root then - Proc(AItem); - end; -end; - -procedure TcxEditRepository.RemoveItem(AItem: TcxEditRepositoryItem); -begin - FItems.Remove(AItem); -end; - -function TcxEditRepository.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxEditRepository.GetItem(Index: Integer): TcxEditRepositoryItem; -begin - Result := TcxEditRepositoryItem(FItems[Index]); -end; - -{ TcxEditButtonViewInfo } - -procedure TcxEditButtonViewInfo.Assign(Source: TPersistent); -begin - if Source is TcxEditButtonViewInfo then - with Source as TcxEditButtonViewInfo do - begin - Self.Data.NativeState := Data.NativeState; - Self.Data.BackgroundColor := Data.BackgroundColor; - Self.Bounds := Bounds; - Self.Data.Style := Data.Style; - Self.Data.State := Data.State; - end - else - inherited Assign(Source); -end; - -function TcxEditButtonViewInfo.GetUpdateRegion(AViewInfo: TcxEditButtonViewInfo): TcxRegion; -var - AEquals: Boolean; -begin - with AViewInfo do - begin - AEquals := Self.Data.Style = Data.Style; - AEquals := AEquals and (Self.Data.State = Data.State); - AEquals := AEquals and (Self.Data.BackgroundColor = Data.BackgroundColor); - AEquals := AEquals and (Self.Data.NativeState = Data.NativeState); - end; - if AEquals then - Result := TcxRegion.Create - else - Result := TcxRegion.Create(Bounds); -end; - -function TcxEditButtonViewInfo.Repaint(AControl: TWinControl; - AViewInfo: TcxEditButtonViewInfo; const AEditPosition: TPoint): Boolean; -var - R: TRect; -begin - with AViewInfo do - begin - Result := Self.Data.Style <> Data.Style; - Result := Result or (Self.Data.State <> Data.State); - Result := Result or (Self.Data.BackgroundColor <> Data.BackgroundColor); - Result := Result or (Self.Data.NativeState <> Data.NativeState); - end; - if Result then - begin - R := Bounds; - OffsetRect(R, AEditPosition.X, AEditPosition.Y); - InternalInvalidate(AControl.Handle, R, cxEmptyRect, HasBackground); - end; -end; - -{ TcxEditButton } - -constructor TcxEditButton.Create(Collection: TCollection); -begin - Collection.BeginUpdate; - try - inherited Create(Collection); - FContentAlignment := taCenter; - FEnabled := True; - FKind := bkDown; - FStretchable := True; - FTextColor := clBtnText; - FVisible := True; - finally - Collection.EndUpdate; - end; -end; - -destructor TcxEditButton.Destroy; -begin - if FGlyph <> nil then - FreeAndNil(FGlyph); - inherited Destroy; -end; - -procedure TcxEditButton.Assign(Source: TPersistent); -begin - if Source is TcxEditButton then - begin - if Assigned(Collection) then Collection.BeginUpdate; - try - with Source as TcxEditButton do - begin - Self.Caption := Caption; - Self.FVisibleCaption := FVisibleCaption; - Self.ContentAlignment := ContentAlignment; - Self.Default := Default; - Self.Enabled := Enabled; - Self.Glyph := Glyph; - Self.Kind := Kind; - Self.LeftAlignment := LeftAlignment; - Self.Stretchable := Stretchable; - Self.Tag := Tag; - Self.TextColor := TextColor; - Self.Visible := Visible; - Self.Width := Width; - Self.Hint := Hint; - end - finally - if Assigned(Collection) then Collection.EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxEditButton.GetGlyph: TBitmap; -begin - if FGlyph = nil then - FGlyph := TBitmap.Create; - FGlyph.OnChange := GlyphChanged; - Result := FGlyph; -end; - -procedure TcxEditButton.GlyphChanged(Sender: TObject); -begin - Changed(False); -end; - -function TcxEditButton.IsTagStored: Boolean; -begin - Result := Tag <> 0; -end; - -procedure TcxEditButton.SetCaption(const Value: TCaption); -begin - if Value <> FCaption then - begin - FCaption := Value; - FVisibleCaption := RemoveAccelChars(FCaption); - Changed(False); - end; -end; - -procedure TcxEditButton.SetContentAlignment(Value: TAlignment); -begin - if Value <> FContentAlignment then - begin - FContentAlignment := Value; - Changed(False); - end; -end; - -procedure TcxEditButton.SetDefault(Value: Boolean); -var - I: Integer; -begin - if FDefault <> Value then - begin - if Value and Assigned(Collection) and (Collection is TcxEditButtons) then - with Collection as TcxEditButtons do - for I := 0 to Count - 1 do - Items[I].FDefault := False; - FDefault := Value; - Changed(True); - end; -end; - -procedure TcxEditButton.SetEnabled(Value: Boolean); -begin - if Value <> FEnabled then - begin - FEnabled := Value; - Changed(False); - end; -end; - -procedure TcxEditButton.SetGlyph(Value: TBitmap); -begin - if Value <> nil then - Glyph.Assign(Value) - else - if FGlyph <> nil then - FreeAndNil(FGlyph); - Changed(False); -end; - -procedure TcxEditButton.SetKind(Value: TcxEditButtonKind); -begin - if FKind <> Value then - begin - FKind := Value; - Changed(False); - end; -end; - -procedure TcxEditButton.SetLeftAlignment(Value: Boolean); -begin - if FLeftAlignment <> Value then - begin - FLeftAlignment := Value; - Changed(False); - end; -end; - -procedure TcxEditButton.SetStretchable(Value: Boolean); -begin - if Value <> FStretchable then - begin - FStretchable := Value; - Changed(False); - end; -end; - -procedure TcxEditButton.SetTextColor(Value: TColor); -begin - if Value <> FTextColor then - begin - FTextColor := Value; - Changed(False); - end; -end; - -procedure TcxEditButton.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - FVisible := Value; - Changed(False); - end; -end; - -procedure TcxEditButton.SetWidth(Value: Integer); -begin - if (FWidth >= 0) and (FWidth <> Value) then - begin - FWidth := Value; - Changed(False); - end; -end; - -{ TcxEditButtons } - -constructor TcxEditButtons.Create(AOwner: TPersistent; - AButtonClass: TcxEditButtonClass); -begin - FOwner := AOwner; - inherited Create(AButtonClass); -end; - -function TcxEditButtons.Add: TcxEditButton; -begin - Result := TcxEditButton(inherited Add); -end; - -class function TcxEditButtons.GetButtonClass: TcxEditButtonClass; -begin - Result := TcxEditButton; -end; - -function TcxEditButtons.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -procedure TcxEditButtons.Update(Item: TCollectionItem); -begin - if Assigned(FOnChange) then - FOnChange(Self); -end; - -function TcxEditButtons.GetItem(Index: Integer): TcxEditButton; -begin - Result := TcxEditButton(inherited GetItem(Index)); -end; - -function TcxEditButtons.GetVisibleCount: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - if Items[I].Visible then - Inc(Result); -end; - -procedure TcxEditButtons.SetItem(Index: Integer; Value: TcxEditButton); -begin - inherited SetItem(Index, Value); -end; - -{ TcxCustomEditViewInfo } - -constructor TcxCustomEditViewInfo.Create; -begin - inherited Create; - PressedButton := -1; - SelectedButton := -1; -end; - -destructor TcxCustomEditViewInfo.Destroy; -begin - SetButtonCount(0); - inherited Destroy; -end; - -procedure TcxCustomEditViewInfo.Assign(Source: TObject); -var - I: Integer; -begin - if Source is TcxCustomEditViewInfo then - with Source as TcxCustomEditViewInfo do - begin - Self.BackgroundColor := BackgroundColor; - Self.BorderColor := BorderColor; - Self.BorderStyle := BorderStyle; - Self.ContainerState := ContainerState; - Self.NativeState := NativeState; - Self.SetButtonCount(Length(ButtonsInfo)); - for I := 0 to Length(ButtonsInfo) - 1 do - Self.ButtonsInfo[I].Assign(ButtonsInfo[I]); - Self.PressedButton := PressedButton; - Self.SelectedButton := SelectedButton; - end; - inherited Assign(Source); -end; - -function TcxCustomEditViewInfo.GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; -var - I: Integer; - AEquals: Boolean; - ATempRgn: TcxRegion; -begin - Result := inherited GetUpdateRegion(AViewInfo); - if not(AViewInfo is TcxCustomEditViewInfo) then - Exit; - with TcxCustomEditViewInfo(AViewInfo) do - begin - AEquals := (Self.BorderColor = BorderColor) or (Self.BorderStyle = ebsNone); - AEquals := AEquals and (Self.BorderStyle = BorderStyle); - AEquals := AEquals and (Length(Self.ButtonsInfo) = Length(ButtonsInfo)); - AEquals := AEquals and (Self.NativeState = NativeState); - if not AEquals then - begin - if not IsRectEmpty(Self.Bounds) then - begin - ATempRgn := TcxRegion.Create(Self.Bounds); - UniteRegions(Result, ATempRgn); - ATempRgn.Free; - end; - Exit; - end; - for I := 0 to Length(Self.ButtonsInfo) - 1 do - begin - ATempRgn := Self.ButtonsInfo[I].GetUpdateRegion(ButtonsInfo[I]); - if not IsRegionEmpty(ATempRgn) then - UniteRegions(Result, ATempRgn); - ATempRgn.Free; - end; - end; -end; - -procedure TcxCustomEditViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - inherited Offset(DX, DY); - OffsetRect(InnerEditRect, DX, DY); - OffsetRect(ShadowRect, DX, DY); - for I := 0 to Length(ButtonsInfo) - 1 do - with ButtonsInfo[I] do - begin - OffsetRect(Bounds, DX, DY); - OffsetRect(VisibleBounds, DX, DY); - end; -end; - -function TcxCustomEditViewInfo.DrawBackground(ACanvas: TcxCanvas): Boolean; -begin - Result := IsInplace and DoDrawBackground(ACanvas); -end; - -function TcxCustomEditViewInfo.DrawBackground(ACanvas: TcxCanvas; - const APos: TPoint): Boolean; -var - APrevWindowOrg: TPoint; -begin - APrevWindowOrg := ACanvas.WindowOrg; - ACanvas.WindowOrg := Point(APrevWindowOrg.X + APos.X, APrevWindowOrg.Y + APos.Y); - try - Result := DrawBackground(ACanvas); - finally - ACanvas.WindowOrg := APrevWindowOrg; - end; -end; - -procedure TcxCustomEditViewInfo.DrawButton(ACanvas: TcxCanvas; AButtonVisibleIndex: Integer); -var - APrevClipRegion: TcxRegion; - AButtonViewInfo: TcxEditButtonViewInfo; -begin - AButtonViewInfo := ButtonsInfo[AButtonVisibleIndex]; - AButtonViewInfo.Data.BackgroundColor := BackgroundColor; - if not IsRectEmpty(AButtonViewInfo.VisibleBounds) then - begin - APrevClipRegion := nil; - try - if (AButtonViewInfo.Bounds.Left < BorderRect.Left) or - (AButtonViewInfo.Bounds.Right > BorderRect.Right) or - (AButtonViewInfo.Bounds.Top < BorderRect.Top) or - (AButtonViewInfo.Bounds.Bottom > BorderRect.Bottom) then - begin - APrevClipRegion := ACanvas.GetClipRegion; - ACanvas.IntersectClipRect(AButtonViewInfo.VisibleBounds); - end; - if not DoDrawButton(ACanvas, AButtonVisibleIndex) then - DrawEditButton(ACanvas, AButtonVisibleIndex); - finally - if APrevClipRegion <> nil then - ACanvas.SetClipRegion(APrevClipRegion, roSet); - end; - end; -end; - -procedure TcxCustomEditViewInfo.DrawButtons(ACanvas: TcxCanvas); -var - I: Integer; -begin - if (evsPaintButtons in FState) or ((Edit <> nil) and (Edit.IsButtonDC(ACanvas.Handle))) then - Exit; - Include(FState, evsPaintButtons); - try - for I := 0 to Length(ButtonsInfo) - 1 do - DrawButton(ACanvas, I); - finally - Exclude(FState, evsPaintButtons) - end; -end; - -procedure TcxCustomEditViewInfo.DrawEditBackground(ACanvas: TcxCanvas; ARect, AGlyphRect: TRect; AGlyphTransparent: Boolean); -begin - ACanvas.SaveDC; - try - if not AGlyphTransparent then - ACanvas.SetClipRegion(TcxRegion.Create(AGlyphRect), roSubtract); - case GetDrawBackgroundStyle of - dbsSimpleParent: cxDrawTransparentControlBackground(Edit, ACanvas, ARect); - dbsThemeParent: cxDrawThemeParentBackground(Edit, ACanvas, ARect); - dbsCustomEdit: DrawCustomEdit(ACanvas, Self, True, bpsSolid); - dbsCustom: - begin - ACanvas.SetClipRegion(TcxRegion.Create(ARect), roIntersect); - DrawBackground(ACanvas); - end; - dbsSimpleFill: cxEditFillRect(ACanvas, ARect, BackgroundColor); - end; - finally - ACanvas.RestoreDC; - end; -end; - -procedure TcxCustomEditViewInfo.DrawButtonBackground(ACanvas: TcxCanvas; - AButtonVisibleIndex: Integer; const ARect: TRect; ABrushColor: TColor); -begin - if not DoDrawButtonBackground(ACanvas, ARect, AButtonVisibleIndex) then - if ButtonsInfo[AButtonVisibleIndex].Data.NativeStyle then - DrawNativeButtonBackground(ACanvas, ButtonsInfo[AButtonVisibleIndex], ARect) - else - DrawUsualButtonBackground(ACanvas, ButtonsInfo[AButtonVisibleIndex], ARect, ABrushColor); -end; - -procedure TcxCustomEditViewInfo.DrawButtonBorderByPainter( - AButtonViewInfo: TcxEditButtonViewInfo; var ARect: TRect; out AContentRect: TRect; - var APenColor, ABrushColor: TColor); -const - ButtonColorsMap: array[Boolean] of TColor = (clWindow, clBtnFace); -begin - AContentRect := ARect; - GetColorSettingsByPainter(ABrushColor, APenColor); - if ABrushColor = clDefault then - begin - if Edit = nil then - ABrushColor := ButtonColorsMap[AButtonViewInfo.Data.State = ebsDisabled] - else - ABrushColor := FEdit.GetBackgroundColor; - end; - if APenColor = clDefault then - APenColor := clBtnText; -end; - -procedure TcxCustomEditViewInfo.DrawButtonBorder(ACanvas: TcxCanvas; - AButtonVisibleIndex: Integer; var ARect: TRect; out AContentRect: TRect; - var APenColor, ABrushColor: TColor); -var - AButtonStyle: TcxEditButtonStyle; - AButtonViewInfo: TcxEditButtonViewInfo; -begin - AButtonViewInfo := ButtonsInfo[AButtonVisibleIndex]; - if DoDrawButtonBorder(ACanvas, AButtonVisibleIndex, ARect, AContentRect) then - Exit; - - if AButtonViewInfo.Data.NativeState <> TC_NONE then - DrawNativeButtonBorder(ACanvas, AButtonViewInfo, ARect, AContentRect, APenColor, ABrushColor) - else - if Painter <> nil then - DrawButtonBorderByPainter(AButtonViewInfo, ARect, AContentRect, APenColor, ABrushColor) - else - begin - AButtonStyle := AButtonViewInfo.Data.Style; - if (AButtonViewInfo.Data.State in [ebsPressed, ebsSelected]) and (AButtonStyle = btsSimple) then - AButtonStyle := btsFlat; - case AButtonStyle of - bts3D: - Draw3DButtonBorder(ACanvas, AButtonViewInfo, ARect, AContentRect, APenColor, ABrushColor); - btsFlat: - DrawFlatButtonBorder(ACanvas, AButtonViewInfo, ARect, AContentRect, APenColor, ABrushColor); - btsSimple: - DrawSimpleButtonBorder(ACanvas, AButtonViewInfo, ARect, AContentRect, APenColor, ABrushColor); - btsHotFlat: - DrawHotFlatButtonBorder(ACanvas, AButtonViewInfo, ARect, AContentRect, APenColor, ABrushColor); - btsUltraFlat, btsOffice11: - DrawUltraFlatButtonBorder(ACanvas, AButtonViewInfo, AButtonStyle = btsOffice11, ARect, AContentRect, APenColor, ABrushColor); - end; - end; -end; - -procedure TcxCustomEditViewInfo.DrawButtonContent(ACanvas: TcxCanvas; - AButtonVisibleIndex: Integer; const AContentRect: TRect; - APenColor, ABrushColor: TColor; ANeedOffsetContent: Boolean); -const - EditBtnKind2EditBtnPainterKind: array [TcxEditButtonKind] of TcxEditBtnKind = - (cxbkEllipsisBtn, cxbkComboBtn, cxbkEditorBtn, cxbkEditorBtn); - -var - AButtonViewInfo: TcxEditButtonViewInfo; - - procedure GetContentPosition(const AContentSize: TSize; out X, Y: Integer; - AOffsetContent: Boolean); - var - AHorzSpace, AVertSpace: Integer; - begin - AHorzSpace := cxRectWidth(AContentRect) - AContentSize.cx; - AVertSpace := cxRectHeight(AContentRect) - AContentSize.cy; - X := AContentRect.Left + AHorzSpace div 2; - Y := AContentRect.Top + AVertSpace div 2; - if AOffsetContent then - begin - if X + AContentSize.cx < AContentRect.Right then - Inc(X); - if Y + AContentSize.cy < AContentRect.Bottom then - Inc(Y); - end; - end; - - procedure DrawArrowButtonContent; - - procedure DrawArrow(const R: TRect; AColor: TColor); - var - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass; // for CLR - begin - ALookAndFeelPainter := TcxStandardLookAndFeelPainter; - ALookAndFeelPainter.DrawArrow(ACanvas, R, adDown, AColor); - end; - - var - AButtonHeight, AButtonWidth: Integer; - R: TRect; - begin - AButtonWidth := cxRectWidth(AButtonViewInfo.Bounds) - cxRectWidth(AContentRect); - R := AContentRect; - if not Odd(AButtonWidth) then - begin - Dec(R.Left, AButtonWidth div 2); - Inc(R.Right, AButtonWidth div 2); - if ANeedOffsetContent then - OffsetRect(R, 1, 0); - end - else - if not ANeedOffsetContent then - begin - Inc(R.Right, AButtonWidth div 2); - Dec(R.Left, AButtonWidth - AButtonWidth div 2); - end else - begin - Dec(R.Left, AButtonWidth div 2); - Inc(R.Right, AButtonWidth - AButtonWidth div 2); - end; - if ANeedOffsetContent then - OffsetRect(R, 0, 1); - - if IsInplace then - begin - AButtonHeight := AButtonViewInfo.Bounds.Bottom - AButtonViewInfo.Bounds.Top; - Dec(AButtonHeight, AContentRect.Bottom - AContentRect.Top); - if not Odd(AButtonHeight) then - begin - Dec(R.Top, AButtonHeight div 2); - Inc(R.Bottom, AButtonHeight div 2); - end - else - if not ANeedOffsetContent then - begin - Inc(R.Bottom, AButtonHeight div 2); - Dec(R.Top, AButtonHeight - AButtonHeight div 2); - end else - begin - Dec(R.Top, AButtonHeight div 2); - Inc(R.Bottom, AButtonHeight - AButtonHeight div 2); - end; - end; - - if AButtonViewInfo.Data.State <> ebsDisabled then - DrawArrow(R, APenColor) - else - begin - DrawArrow(cxRectOffset(R, 1, 1), clBtnHighlight); - DrawArrow(R, clBtnShadow); - end; - end; - - procedure DrawEllipsisButtonContent; - - procedure DrawEllipsis(X, Y, ASize: Integer; AColor: TColor); - var - ABrush: TBrushHandle; - begin - ABrush := GetSolidBrush(ACanvas, AColor); - cxEditFillRect(ACanvas.Handle, Rect(X, Y, X + ASize, Y + ASize), ABrush); - cxEditFillRect(ACanvas.Handle, Rect(X + ASize + 2, Y, X + ASize * 2 + 2, Y + ASize), ABrush); - cxEditFillRect(ACanvas.Handle, Rect(X + ASize * 2 + 4, Y, X + ASize * 3 + 4, Y + ASize), ABrush); - end; - - var - X, Y: Integer; - AContentSize: TSize; - begin - if AContentRect.Right - AContentRect.Left < 12 then - AContentSize.cy := 1 - else - AContentSize.cy := 2; - AContentSize.cx := AContentSize.cy * 3 + 4; - GetContentPosition(AContentSize, X, Y, ANeedOffsetContent); - if AButtonViewInfo.Data.State <> ebsDisabled then - DrawEllipsis(X, Y, AContentSize.cy, APenColor) - else - begin - DrawEllipsis(X + 1, Y + 1, AContentSize.cy, clBtnHighlight); - DrawEllipsis(X, Y, AContentSize.cy, clBtnShadow); - end; - end; - - procedure DrawGlyphButtonContent; - const - ADrawModeMap: array [Boolean] of TcxImageDrawMode = (idmNormal, idmDisabled); - var - AGlyph: TBitmap; - AContentSize: TSize; - AGlyphPosition: TPoint; - begin - AGlyph := AButtonViewInfo.Glyph; - if not VerifyBitmap(AGlyph) then - Exit; - - AContentSize.cx := Min(cxRectWidth(AContentRect), AGlyph.Width); - AContentSize.cy := Min(cxRectHeight(AContentRect), AGlyph.Height); - GetContentPosition(AContentSize, AGlyphPosition.X, AGlyphPosition.Y, ANeedOffsetContent); - - cxDrawImage(ACanvas.Handle, cxRectBounds(AGlyphPosition.X, AGlyphPosition.Y, AGlyph.Width, AGlyph.Height), AContentRect, - AGlyph, nil, -1, ADrawModeMap[AButtonViewInfo.Data.State = ebsDisabled]); - end; - - procedure DrawTextButtonContent; - - procedure DrawText(const R: TRect; AColor: TColor); - begin - ACanvas.Font.Color := AColor; - ACanvas.DrawText(AButtonViewInfo.Data.Caption, R, cxAlignmentsHorz[AButtonViewInfo.Data.ContentAlignment] or - cxAlignVCenter or cxSingleLine or cxShowPrefix or cxShowEndEllipsis); - end; - - var - R: TRect; - AColor: TColor; - begin - ACanvas.Brush.Style := bsClear; - ACanvas.Font := Font; - - R := AContentRect; - if not IsInplace then - InflateRect(R, -1, -1) - else - InflateRect(R, -1, 0); - Dec(R.Right); - if AButtonViewInfo.Data.State = ebsDisabled then - begin - DrawText(cxRectOffset(R, 1, 1), clBtnHighlight); - DrawText(R, clBtnShadow); - end - else - begin - if (AButtonViewInfo.Data.Style = btsHotFlat) and (AButtonViewInfo.Data.State in [ebsPressed, ebsSelected]) then - AColor := APenColor - else - if AButtonViewInfo.Data.TextColor = clDefault then - AColor := TextColor - else - AColor := AButtonViewInfo.Data.TextColor; - - if ANeedOffsetContent then - OffsetRect(R, 1, 1); - DrawText(R, AColor); - end; - ACanvas.Brush.Style := bsSolid; - end; - -var - AKind: TcxEditBtnKind; - -begin - ACanvas.SaveState; - try - ACanvas.SetClipRegion(TcxRegion.Create(AContentRect), roIntersect); - - AButtonViewInfo := ButtonsInfo[AButtonVisibleIndex]; - if Painter <> nil then - begin - AKind := EditBtnKind2EditBtnPainterKind[AButtonViewInfo.Data.Kind]; - Painter.DrawEditorButton(ACanvas, AContentRect, AKind, - EditBtnState2ButtonState[AButtonViewInfo.Data.State]); - case AButtonViewInfo.Data.Kind of - bkText: - DrawTextButtonContent; - bkGlyph: - DrawGlyphButtonContent; - end; - end - else - case AButtonViewInfo.Data.Kind of - bkDown: - DrawArrowButtonContent; - bkEllipsis: - DrawEllipsisButtonContent; - bkGlyph: - DrawGlyphButtonContent; - bkText: - DrawTextButtonContent; - end; - finally - ACanvas.RestoreState; - end; -end; - -procedure TcxCustomEditViewInfo.DrawNativeStyleEditBackground(ACanvas: TcxCanvas; ADrawBackground: Boolean; - ABackgroundStyle: TcxEditBackgroundPaintingStyle; ABackgroundBrush: TBrushHandle); - - procedure CalculateNativeInfo(out AThemedObjectType: TdxThemedObjectType; out ANativePart: Integer; out ABoundsRect: TRect); - begin - ABoundsRect := Bounds; - AThemedObjectType := totEdit; - if IsCompositionEnabled then - begin - if ABackgroundStyle = bpsComboListEdit then - begin - AThemedObjectType := totButton; - ANativePart := BP_PUSHBUTTON; - ABoundsRect := cxRectInflate(ABoundsRect, 1, 1); - end - else - ANativePart := EP_EDITBORDER_NOSCROLL - end - else - ANativePart := EP_EDITTEXT; - end; - - function GetContentRect(ATheme: TdxTheme; ANativePart: Integer; const ABoundsRect: TRect): TRect; - begin - case ABackgroundStyle of - bpsSolid: - if IsCompositionEnabled then - Result := cxRectInflate(ABoundsRect, -2, -2) - else - GetThemeBackgroundContentRect(ATheme, ACanvas.Handle, ANativePart, - NativeState, ABoundsRect, Result); - bpsComboEdit: - begin - Result := cxRectInflate(ABoundsRect, -(cxEditMaxBorderWidth + 1), - -(cxEditMaxBorderWidth + 1)); - Result.Right := Result.Right - 1; - end; - bpsComboListEdit: - if IsCompositionEnabled then - Result := cxEmptyRect - else - Result := ClientRect; - end; - end; - - procedure DrawBorder(ATheme: TdxTheme; ANativePart: Integer; const ABoundsRect, AContentRect: TRect); - begin - ACanvas.SaveClipRegion; - try - ACanvas.ExcludeClipRect(AContentRect); - if IsThemeBackgroundPartiallyTransparent(ATheme, ANativePart, NativeState) and (Edit <> nil) then - cxDrawThemeParentBackground(Edit, ACanvas, ABoundsRect); - DrawThemeBackground(ATheme, ACanvas.Handle, ANativePart, NativeState, ABoundsRect); - finally - ACanvas.RestoreClipRegion; - end; - end; - - procedure DrawBackground(const AContentRect: TRect); - begin - if ADrawBackground or IsInplace or (BorderStyle = ebsNone) then - cxEditFillRect(ACanvas.Handle, AContentRect, ABackgroundBrush) - else - if ABackgroundStyle <> bpsComboListEdit then - InternalFillRect(ACanvas, AContentRect, BorderRect, ABackgroundBrush); - end; - -var - AContentRect: TRect; - ATheme: TdxTheme; - AThemedObjectType: TdxThemedObjectType; - ABoundsRect: TRect; - ANativePart: Integer; -begin - if IsInplace or (BorderStyle = ebsNone) then - AContentRect := Bounds - else - begin - CalculateNativeInfo(AThemedObjectType, ANativePart, ABoundsRect); - ATheme := OpenTheme(AThemedObjectType); - AContentRect := GetContentRect(ATheme, ANativePart, ABoundsRect); - - DrawBorder(ATheme, ANativePart, ABoundsRect, AContentRect); - end; - - if not Transparent then - DrawBackground(AContentRect); -end; - -function TcxCustomEditViewInfo.IsBackgroundTransparent: Boolean; -begin - Result := not (GetDrawBackgroundStyle in [dbsCustomEdit, dbsSimpleFill]); -end; - -function TcxCustomEditViewInfo.IsCustomBackground: Boolean; -begin - Result := DrawBackground(nil); -end; - -function TcxCustomEditViewInfo.IsCustomButton(AButtonVisibleIndex: Integer = 0): Boolean; -begin - Result := DoDrawButton(nil, AButtonVisibleIndex); -end; - -function TcxCustomEditViewInfo.IsCustomButtonBackground(AButtonVisibleIndex: Integer = 0): Boolean; -begin - Result := DoDrawButtonBackground(nil, cxEmptyRect, AButtonVisibleIndex); -end; - -function TcxCustomEditViewInfo.IsCustomButtonBorder(AButtonVisibleIndex: Integer = 0): Boolean; -var - ARect: TRect; -begin - Result := DoDrawButtonBorder(nil, AButtonVisibleIndex, ARect, ARect); -end; - -function TcxCustomEditViewInfo.IsCustomDrawButton(AButtonVisibleIndex: Integer = 0): Boolean; -begin - Result := IsCustomButtonBorder(AButtonVisibleIndex) or IsCustomButtonBackground(AButtonVisibleIndex) or IsCustomButton(AButtonVisibleIndex); -end; - -function TcxCustomEditViewInfo.IsHotTrack: Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to Length(ButtonsInfo) - 1 do - if ButtonsInfo[I].Data.State = ebsSelected then - begin - Result := True; - Break; - end; -end; - -function TcxCustomEditViewInfo.IsHotTrack(P: TPoint): Boolean; -var - I: Integer; -begin - Result := False; - Dec(P.X, Left); - Dec(P.Y, Top); - for I := 0 to Length(ButtonsInfo) - 1 do - if PtInRect(ButtonsInfo[I].Bounds, P) then - begin - Result := True; - Break; - end; -end; - -function TcxCustomEditViewInfo.NeedShowHint(ACanvas: TcxCanvas; - const P: TPoint; out AText: TCaption; out AIsMultiLine: Boolean; - out ATextRect: TRect): Boolean; -begin - Result := NeedShowHint(ACanvas, P, cxEmptyRect, AText, AIsMultiLine, ATextRect); -end; - -function TcxCustomEditViewInfo.NeedShowHint(ACanvas: TcxCanvas; - const P: TPoint; const AVisibleBounds: TRect; out AText: TCaption; - out AIsMultiLine: Boolean; out ATextRect: TRect): Boolean; -var - APart: Integer; -begin - Result := False; - APart := GetPart(P); - if APart >= ecpButton then - begin - AText := GetShortHint(GetHintText(APart)); - AIsMultiLine := False; - ATextRect := GetHintTextRect(P, APart); - Result := Length(AText) > 0; - end; -end; - -procedure TcxCustomEditViewInfo.Paint(ACanvas: TcxCanvas); -begin - if Assigned(FOnPaint) then - FOnPaint(Self, ACanvas); - inherited; -end; - -procedure TcxCustomEditViewInfo.PaintEx(ACanvas: TcxCanvas); -var - P: TPoint; - ACanvasHandle: HDC; -begin - ACanvasHandle := ACanvas.Handle; - GetWindowOrgEx(ACanvasHandle, P); - Dec(P.X, Left); - Dec(P.Y, Top); - SetWindowOrgEx(ACanvasHandle, P.X, P.Y, @P); - try - Paint(ACanvas); - finally - SetWindowOrgEx(ACanvasHandle, P.X, P.Y, nil); - end; -end; - -procedure TcxCustomEditViewInfo.PrepareCanvasFont(ACanvas: TCanvas); -begin -end; - -function TcxCustomEditViewInfo.Repaint(AControl: TWinControl; - AViewInfo: TcxContainerViewInfo = nil): Boolean; -begin - Result := Repaint(AControl, cxEmptyRect, AViewInfo); -end; - -function TcxCustomEditViewInfo.Repaint(AControl: TWinControl; - const AInnerEditRect: TRect; AViewInfo: TcxContainerViewInfo = nil): Boolean; - - procedure CheckRect(var R: TRect); - begin - with ClientRect do - begin - if R.Left < Left then R.Left := Left; - if R.Top < Top then R.Top := Top; - if R.Right > Right then R.Right := Right; - if R.Bottom > Bottom then R.Bottom := Bottom; - end; - end; - - function GetInnerEditRect: TRect; - begin - Result := AInnerEditRect; - CheckRect(Result); - end; - - function RepaintButtons: Boolean; - var - I: Integer; - AEditPosition: TPoint; - begin - Result := False; - AEditPosition := Point(Left, Top); - with TcxCustomEditViewInfo(AViewInfo) do - for I := 0 to Length(Self.ButtonsInfo) - 1 do - if Self.ButtonsInfo[I].Repaint(AControl, ButtonsInfo[I], AEditPosition) then - Result := True; - end; - -var - R, R1: TRect; -begin - Result := AControl.HandleAllocated; - if not Result then - Exit; - - R := Bounds; - OffsetRect(R, Left, Top); - Result := AViewInfo <> nil; - if not Result then - begin - InternalInvalidate(AControl.Handle, R, GetInnerEditRect, HasBackground); - Exit; - end; - with TcxCustomEditViewInfo(AViewInfo) do - begin - while True do - begin - if (Self.NativeState <> NativeState) or - (Self.BackgroundColor <> BackgroundColor) or - (Self.ContainerState <> ContainerState) and Self.IsRepaintOnStateChangingNeeded then - begin - R1 := GetInnerEditRect; - Break; - end; - if Length(Self.ButtonsInfo) <> Length(ButtonsInfo) then - begin - R1 := GetInnerEditRect; - Break; - end; - if (Self.BorderColor <> BorderColor) and (Self.BorderStyle <> ebsNone) or - (Self.BorderStyle <> BorderStyle) then - begin - R1 := Self.BorderRect; - OffsetRect(R1, Self.Left, Self.Top); - Break; - end; - Result := False; - Break; - end; - if Result then - if not IsRectEmpty(Self.Bounds) and not EqualRect(R, R1) then - InternalInvalidate(AControl.Handle, R, R1, HasBackground); - if (Length(Self.ButtonsInfo) = Length(ButtonsInfo)) and RepaintButtons then - Result := True; - end; -end; - -procedure TcxCustomEditViewInfo.SetButtonCount(ACount: Integer); -var - I: Integer; - APrevLength: Integer; -begin - APrevLength := Length(ButtonsInfo); - if APrevLength <> ACount then - begin - if ACount < APrevLength then - begin - for I := Length(ButtonsInfo) - 1 downto ACount do - ButtonsInfo[I].Free; - SetLength(ButtonsInfo, ACount); - end else - begin - SetLength(ButtonsInfo, ACount); - for I := APrevLength to ACount - 1 do - ButtonsInfo[I] := GetButtonViewInfoClass.Create; - end; - end; -end; - -function TcxCustomEditViewInfo.GetButtonViewInfoClass: TcxEditButtonViewInfoClass; -begin - Result := TcxEditButtonViewInfo; -end; - -procedure TcxCustomEditViewInfo.GetColorSettingsByPainter( - out ABackground, ATextColor: TColor); -begin - ABackground := clDefault; - ATextColor := clDefault; - if not (IsInplace or (FEdit = nil)) then - FEdit.GetColorSettingsByPainter(ABackground, ATextColor); -end; - -function TcxCustomEditViewInfo.GetContainerBorderStyle: TcxContainerBorderStyle; -begin - Result := TcxContainerBorderStyle(BorderStyle); -end; - -function TcxCustomEditViewInfo.GetPart(const P: TPoint): Integer; -var - I: Integer; -begin - if PtInRect(BorderRect, P) then - Result := ecpControl - else - Result := ecpNone; - for I := Low(ButtonsInfo) to High(ButtonsInfo) do - if ButtonsInfo[I].Data.State = ebsSelected then - begin - Result := ButtonsInfo[I].Index; - Break; - end; -end; - -function TcxCustomEditViewInfo.GetPartRect(APart: Integer): TRect; -begin - case APart of - ecpNone: - Result := cxNullRect; - ecpControl: - begin - Result := BorderRect; - if Length(ButtonsInfo) > 0 then - Result.Right := ButtonsInfo[0].Bounds.Left; - end; - else - if (APart >= ecpButton) and (APart < Length(ButtonsInfo)) then - Result := ButtonsInfo[APart].Bounds - else - Result := cxNullRect; - end; -end; - -procedure TcxCustomEditViewInfo.InternalPaint(ACanvas: TcxCanvas); -begin - DrawCustomEdit(ACanvas, Self, True, bpsSolid); -end; - -function TcxCustomEditViewInfo.IsRepaintOnStateChangingNeeded: Boolean; -begin - Result := True; -end; - -procedure TcxCustomEditViewInfo.DrawEditButton(ACanvas: TcxCanvas; - AButtonVisibleIndex: Integer); - - function NeedDoubleBuffered: Boolean; - begin - Result := (ButtonsInfo[AButtonVisibleIndex].Data.Kind = bkGlyph) and - VerifyBitmap(ButtonsInfo[AButtonVisibleIndex].Glyph) or (Painter <> nil); - end; - - function NeedOffsetContent: Boolean; - begin - Result := (ButtonsInfo[AButtonVisibleIndex].Data.State = ebsPressed) and - ((Edit = nil) or (ecoOffsetButtonContent in Edit.ContentParams.Options)); // to support the solution in B782 - end; - -var - ABoundsRect, AContentRect, ABackgroundRect: TRect; - APenColor, ABrushColor: TColor; - - ATempCanvas: TcxCanvas; - ABackgroundBitmap: TBitmap; -begin - APenColor := clBtnText; - ABrushColor := 0; - ABoundsRect := ButtonsInfo[AButtonVisibleIndex].Bounds; - - ATempCanvas := TcxCanvas.Create(nil); - if NeedDoubleBuffered then - begin - ABackgroundBitmap := TBitmap.Create; - ABackgroundBitmap.Width := cxRectWidth(ABoundsRect); - ABackgroundBitmap.Height := cxRectHeight(ABoundsRect); - - ATempCanvas.Canvas := ABackgroundBitmap.Canvas; - ATempCanvas.WindowOrg := ABoundsRect.TopLeft; - end - else - begin - ABackgroundBitmap := nil; - ATempCanvas.Canvas := ACanvas.Canvas; - end; - - try - ABackgroundRect := ABoundsRect; - DrawButtonBorder(ATempCanvas, AButtonVisibleIndex, ABackgroundRect, AContentRect, APenColor, ABrushColor); - - if not IsRectEmpty(ABackgroundRect) then - DrawButtonBackground(ATempCanvas, AButtonVisibleIndex, ABackgroundRect, ABrushColor); - if not IsRectEmpty(AContentRect) then - DrawButtonContent(ATempCanvas, AButtonVisibleIndex, AContentRect, APenColor, ABrushColor, NeedOffsetContent); - finally - if ABackgroundBitmap <> nil then - begin - ATempCanvas.WindowOrg := cxNullPoint; - ACanvas.Draw(ABoundsRect.Left, ABoundsRect.Top, ABackgroundBitmap); - ABackgroundBitmap.Free; - end; - ATempCanvas.Free; - end; -end; - -procedure TcxCustomEditViewInfo.SetOnDrawBackground(AValue: TcxEditDrawBackgroundEvent); -begin - FOnDrawBackground := AValue; -end; - -procedure TcxCustomEditViewInfo.Draw3DButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); -begin - if not AButtonViewInfo.Data.Transparent then - ABrushColor := clBtnFace - else - ABrushColor := AButtonViewInfo.Data.BackgroundColor; - APenColor := clBtnText; - - if AButtonViewInfo.Data.State = ebsPressed then - begin - FrameRectEx(ACanvas, ARect, clBtnShadow); - FrameRectEx(ACanvas, ARect, ABrushColor); - end else - begin - DrawComplexFrameEx(ACanvas, ARect, cl3DLight, cl3DDkShadow); - DrawComplexFrameEx(ACanvas, ARect, clBtnHighlight, clBtnShadow); - end; - - AContentRect := ARect; -end; - -procedure TcxCustomEditViewInfo.DrawFlatButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); -begin - if not AButtonViewInfo.Data.Transparent then - ABrushColor := clBtnFace - else - ABrushColor := AButtonViewInfo.Data.BackgroundColor; - - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bLeft], ABrushColor); - if AButtonViewInfo.Data.State = ebsPressed then - DrawComplexFrameEx(ACanvas, ARect, clBtnShadow, clBtnHighlight) - else - DrawComplexFrameEx(ACanvas, ARect, clBtnHighlight, clBtnShadow); - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bRight], ABrushColor); - AContentRect := ARect; -end; - -procedure TcxCustomEditViewInfo.DrawHotFlatButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); -const - ABrushColorA: array [TcxEditButtonState] of TColor = ( - clBtnFace, clBtnFace, clBtnText, clBtnShadow - ); -begin - with AButtonViewInfo do - begin - ABrushColor := ABrushColorA[Data.State]; - if Data.Transparent then - ABrushColor := Data.BackgroundColor; - - APenColor := clBtnShadow; - if (Data.LeftAlignment and Data.Rightmost) or (not Data.LeftAlignment and Data.Leftmost) then - FrameRectEx(ACanvas, ARect, APenColor) - else - if Data.LeftAlignment then - begin - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bBottom, bLeft, bTop], APenColor); - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bRight], ABrushColor); - end - else - begin - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bTop, bRight, bBottom], APenColor); - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bLeft], ABrushColor); - end; - - if Data.State in [ebsPressed, ebsSelected] then - if Data.Transparent and (Data.State = ebsSelected) then - APenColor := clBtnShadow - else - APenColor := clWindow - else - APenColor := clBtnText; - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bLeft, bRight], ABrushColor); - AContentRect := ARect; - end; -end; - -procedure TcxCustomEditViewInfo.DrawNativeButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); - - function GetThemeContentRect(AThemeObject: TdxThemedObjectType; APart: Integer): TRect; - var - ATheme: TdxTheme; - begin - ATheme := OpenTheme(AThemeObject); - GetThemeBackgroundContentRect(ATheme, ACanvas.Handle, APart, - AButtonViewInfo.Data.NativeState, AButtonViewInfo.Bounds, Result); - end; - - function GetContentRect: TRect; - begin - if IsCustomDrawButton then - Result := ARect - else - if AButtonViewInfo.Data.ComboBoxStyle then - Result := cxEmptyRect - else - Result := GetThemeContentRect(totButton, BP_PUSHBUTTON) - end; - -begin - AContentRect := GetContentRect; -end; - -procedure TcxCustomEditViewInfo.DrawSimpleButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); -begin - if not Transparent then - ACanvas.FrameRect(ARect, AButtonViewInfo.Data.BackgroundColor); - InflateRect(ARect, -1, -1); - if not AButtonViewInfo.Data.Transparent then - ABrushColor := clBtnFace - else - ABrushColor := AButtonViewInfo.Data.BackgroundColor; - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bLeft, bRight], ABrushColor); - AContentRect := ARect; -end; - -procedure TcxCustomEditViewInfo.DrawUltraFlatButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - AIsOffice11Style: Boolean; var ARect: TRect; var AContentRect: TRect; out APenColor, ABrushColor: TColor); -var - ABackgroundRect: TRect; - AHighlightColor: TColor; -begin - if AButtonViewInfo.Data.Transparent then - ABrushColor := AButtonViewInfo.Data.BackgroundColor - else - if AButtonViewInfo.Data.State = ebsDisabled then - ABrushColor := clBtnFace - else - if AButtonViewInfo.Data.State = ebsNormal then - if AIsOffice11Style then - ABrushColor := dxOffice11DockColor1 - else - ABrushColor := clBtnFace - else - ABrushColor := GetEditButtonHighlightColor( - AButtonViewInfo.Data.State = ebsPressed, AIsOffice11Style); - - AHighlightColor := GetEditBorderHighlightColor(AIsOffice11Style); - - if (AButtonViewInfo.Data.State in [ebsDisabled, ebsNormal]) or - not AButtonViewInfo.Data.IsInplace and (BorderStyle = ebsNone) or - AButtonViewInfo.Data.IsInplace and not (epoHasExternalBorder in PaintOptions) then - begin - if not(AButtonViewInfo.Data.State in [ebsDisabled, ebsNormal]) then - ACanvas.FrameRect(ARect, AHighlightColor) - else - if not Transparent then - ACanvas.FrameRect(ARect, AButtonViewInfo.Data.BackgroundColor); - InflateRect(ARect, -1, -1); - ABackgroundRect := ARect; - ExtendRect(ARect, Rect(1, 0, 1, 0)); - end - else - begin - ABackgroundRect := ARect; - if AButtonViewInfo.Data.LeftAlignment then - begin - if AButtonViewInfo.Data.Leftmost then - Inc(ARect.Left) - else - begin - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bLeft], AHighlightColor); - Inc(ABackgroundRect.Left); - end; - if ARect.Right = BorderRect.Right then - Dec(ARect.Right) - else - begin - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bRight], AHighlightColor); - Dec(ABackgroundRect.Right); - end; - end - else - begin - if AButtonViewInfo.Data.Rightmost then - Dec(ARect.Right) - else - begin - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bRight], AHighlightColor); - Dec(ABackgroundRect.Right); - end; - if ARect.Left = BorderRect.Left then - Inc(ARect.Left) - else - begin - cxEditUtils.DrawButtonBorder(ACanvas, ARect, [bLeft], AHighlightColor); - Inc(ABackgroundRect.Left); - end; - end; - InflateRect(ARect, -1, -1); - end; - - AContentRect := ARect; - ARect := ABackgroundRect; -end; - -procedure TcxCustomEditViewInfo.DrawNativeButtonBackground(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; const ARect: TRect); -var - APart: Integer; - AThemeObject: TdxThemedObjectType; -begin - if AButtonViewInfo.Data.ComboBoxStyle then - begin - AThemeObject := totComboBox; - if IsCompositionEnabled and not IsInplace then - if AButtonViewInfo.Data.LeftAlignment then - APart := CP_DROPDOWNBUTTONLEFT - else - APart := CP_DROPDOWNBUTTONRIGHT - else - APart := CP_DROPDOWNBUTTON; - end - else - begin - AThemeObject := totButton; - APart := BP_PUSHBUTTON; - end; - DrawThemeBackground(OpenTheme(AThemeObject), ACanvas.Handle, APart, AButtonViewInfo.Data.NativeState, ARect); -end; - -procedure TcxCustomEditViewInfo.DrawUsualButtonBackground(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; const ARect: TRect; ABrushColor: TColor); - - procedure GetBackgroundParams(out AGradientDrawing: Boolean; - out AColor1, AColor2: TColor); - begin - AGradientDrawing := (AButtonViewInfo.Data.Style = btsOffice11) and - AButtonViewInfo.Data.Gradient and not AButtonViewInfo.Data.Transparent and - (AButtonViewInfo.Data.State <> ebsDisabled) and (Painter = nil); - if AGradientDrawing then - case AButtonViewInfo.Data.State of - ebsNormal: - begin - AColor1 := dxOffice11ToolbarsColor1; - AColor2 := dxOffice11ToolbarsColor2; - end; - ebsPressed: - begin - AColor1 := dxOffice11SelectedDownColor1; - AColor2 := dxOffice11SelectedDownColor2; - end; - ebsSelected: - begin - AColor1 := dxOffice11SelectedColor1; - AColor2 := dxOffice11SelectedColor2; - end; - end; - end; - -var - AClipRgn: TcxRegion; - AColor1, AColor2: TColor; - AGradientDrawing: Boolean; - R: TRect; -begin - GetBackgroundParams(AGradientDrawing, AColor1, AColor2); - if not AGradientDrawing then - cxEditFillRect(ACanvas.Handle, ARect, GetSolidBrush(ACanvas, ABrushColor)) - else - begin - AClipRgn := ACanvas.GetClipRegion; - try - R := Rect(ARect.Left, BorderRect.Top, ARect.Right, BorderRect.Bottom); - if AButtonViewInfo.Data.State = ebsNormal then - ExtendRect(R, Rect(0, 1, 0, 1)); - ACanvas.SetClipRegion(TcxRegion.Create(ARect), roIntersect); - FillGradientRect(ACanvas.Handle, R, AColor1, AColor2, False); - finally - ACanvas.SetClipRegion(AClipRgn, roSet); - end; - end; -end; - -function TcxCustomEditViewInfo.DoDrawBackground(ACanvas: TcxCanvas): Boolean; -begin - Result := False; - if Assigned(FOnDrawBackground) then - FOnDrawBackground(Self, ACanvas, Result); -end; - -function TcxCustomEditViewInfo.DoDrawButton(ACanvas: TcxCanvas; - AButtonVisibleIndex: Integer): Boolean; -begin - Result := False; - if Assigned(FOnDrawButton) then - FOnDrawButton(Self, ACanvas, AButtonVisibleIndex, Result); -end; - -function TcxCustomEditViewInfo.DoDrawButtonBackground(ACanvas: TcxCanvas; - const ARect: TRect; AButtonVisibleIndex: Integer): Boolean; -begin - Result := False; - if Assigned(FOnDrawButtonBackground) then - FOnDrawButtonBackground(Self, ACanvas, ARect, AButtonVisibleIndex, Result); -end; - -function TcxCustomEditViewInfo.DoDrawButtonBorder(ACanvas: TcxCanvas; AButtonVisibleIndex: Integer; - out ABackgroundRect, AContentRect: TRect): Boolean; -begin - Result := False; - if Assigned(FOnDrawButtonBorder) then - FOnDrawButtonBorder(Self, ACanvas, AButtonVisibleIndex, ABackgroundRect, AContentRect, Result); -end; - -function TcxCustomEditViewInfo.GetDrawBackgroundStyle: TcxDrawBackgroundStyle; -begin - Result := dbsSimpleFill; - if IsInplace then - begin - if IsCustomBackground then - Result := dbsCustom - else - if IsTransparent then - Result := dbsNone - end - else - begin - if IsTransparent then - Result := dbsSimpleParent - else - if IsNativeBackground then - Result := dbsThemeParent - else - if not NativeStyle then - Result := dbsCustomEdit; - end; -end; - -function TcxCustomEditViewInfo.IsNativeBackground: Boolean; -begin - Result := (Edit <> nil) and TcxCustomEdit(Edit).IsNativeBackground; -end; - -function TcxCustomEditViewInfo.IsTransparent: Boolean; -begin - Result := Transparent or (Edit <> nil) and TcxCustomEdit(Edit).Transparent; -end; - -function TcxCustomEditViewInfo.GetHintText(APart: Integer): string; -begin - if (APart >= ecpButton) and (APart < EditProperties.Buttons.Count) then - Result := EditProperties.Buttons[APart].Hint - else - Result := ''; -end; - -function TcxCustomEditViewInfo.GetHintTextRect(const P: TPoint; - APart: Integer): TRect; -var - AHintWindow: THintWindow; -begin - AHintWindow := HintWindowClass.Create(nil); - try - Result := AHintWindow.CalcHintRect(Screen.Width, GetHintText(APart), nil); - OffsetRect(Result, P.X, P.Y + cxGetCursorSize.cy); - finally - FreeAndNil(AHintWindow); - end; -end; - -{ TcxCustomEditViewData } - -constructor TcxCustomEditViewData.Create(AProperties: TcxCustomEditProperties; - AStyle: TcxCustomEditStyle; AIsInplace: Boolean); -begin - inherited Create; - FIsInplace := AIsInplace; - FProperties := AProperties; - FStyle := AStyle; - Initialize; - SelTextColor := clDefault; - SelBackgroundColor := clDefault; - InitCacheData; -end; - -procedure TcxCustomEditViewData.Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); - - procedure CalculateContainerState; - begin - AViewInfo.ContainerState := GetContainerState(ABounds, P, Button, Shift, AIsMouseEvent); - - Selected := ContainerState * [csActive, csHotTrack] <> []; - if IsDesigning or not Style.HotTrack or IsInplace then - AViewInfo.HotState := chsNoHotTrack - else - if Selected then - AViewInfo.HotState := chsSelected - else - AViewInfo.HotState := chsNormal; - if Edit <> nil then - Style := Edit.ActiveStyle; - - if not IsInplace and NativeStyle then - AViewInfo.BorderStyle := Style.BaseStyle.BorderStyle - else - AViewInfo.BorderStyle := GetBorderStyle; - end; - - procedure CalculatePopupBorderStyle; - const - ADefaultPopupBorderStyleMap: array [TcxEditBorderStyle] of TcxEditPopupBorderStyle = - (epbsFlat, epbsSingle, epbsSingle, epbsFlat, epbsSingle, epbsSingle, epbsSingle); - AInplaceDefaultPopupBorderStyleMap: array [TcxLookAndFeelKind] of TcxEditPopupBorderStyle = - (epbsFlat, epbsFrame3D, epbsSingle, epbsSingle); - begin - AViewInfo.PopupBorderStyle := Style.PopupBorderStyle; - if (AViewInfo.PopupBorderStyle = epbsDefault) and (Edit <> nil) then - if IsInplace then - AViewInfo.PopupBorderStyle := AInplaceDefaultPopupBorderStyleMap[Style.LookAndFeel.Kind] - else - if (AViewInfo.BorderStyle = ebsNone) and (Length(AViewInfo.ButtonsInfo) > 0) then - AViewInfo.PopupBorderStyle := AInplaceDefaultPopupBorderStyleMap[GetEditPopupWindowControlsLookAndFeelKind(Edit)] - else - AViewInfo.PopupBorderStyle := ADefaultPopupBorderStyleMap[AViewInfo.BorderStyle]; - end; - -var - AClientExtent: TRect; - AIContainerInnerControl: IcxContainerInnerControl; - APrevBorderWidth: Integer; -begin - Shift := Shift - [ssShift, ssAlt, ssCtrl]; - - APrevBorderWidth := GetContainerBorderWidth(TcxContainerBorderStyle(AViewInfo.BorderStyle)); - CalculateContainerState; - if not IsInplace and not NativeStyle and - (GetContainerBorderWidth(TcxContainerBorderStyle(AViewInfo.BorderStyle)) < APrevBorderWidth) then - CalculateContainerState; - TcxContainerViewInfo(AViewInfo).BorderStyle := TcxContainerBorderStyle(AViewInfo.BorderStyle); - ContainerState := AViewInfo.ContainerState; - - AViewInfo.EditProperties := Properties; - if IsInplace then - ButtonsOnlyStyle := (ABounds.Right <> MaxInt) and (Properties.ButtonsViewStyle <> bvsNormal) - else - ButtonsOnlyStyle := Properties.ButtonsViewStyle = bvsButtonsOnly;// (ABounds.Right <> MaxInt) and (Properties.ButtonsViewStyle <> bvsNormal); - Bounds := ABounds; - - AViewInfo.Painter := Style.LookAndFeel.SkinPainter; - AViewInfo.Bounds := Bounds; - AViewInfo.Enabled := Enabled; - AViewInfo.Focused := Focused; - AViewInfo.HasBackground := (Edit <> nil) and Edit.HasBackground; - AViewInfo.HasInnerEdit := (InnerEdit <> nil) and (InnerEdit.Control.Visible); - AViewInfo.IsDBEditPaintCopyDrawing := (Edit <> nil) and Edit.IsDBEditPaintCopyDrawing; - AViewInfo.IsContainerInnerControl := (Edit <> nil) and - Supports(TObject(Edit), IcxContainerInnerControl, AIContainerInnerControl); - AViewInfo.IsDesigning := IsDesigning; - AViewInfo.IsInplace := IsInplace; - AViewInfo.IsSelected := IsSelected; - AViewInfo.PaintOptions := GetPaintOptions; - AViewInfo.Edges := Style.Edges; - - if Style.DirectAccessMode then - AViewInfo.Font := Style.Font - else - AViewInfo.Font := Style.GetVisibleFont; - - AViewInfo.Shadow := not IsInplace and HasShadow; - AViewInfo.WindowHandle := WindowHandle; - - CalculateViewInfo(AViewInfo, AIsMouseEvent); - - CalculateButtonsViewInfo(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - - AViewInfo.ClientRect := ABounds; - AClientExtent := GetClientExtent(ACanvas, AViewInfo); - ExtendRect(AViewInfo.ClientRect, AClientExtent); - if InnerEdit <> nil then - AViewInfo.InnerEditRect := InnerEdit.Control.BoundsRect - else - AViewInfo.InnerEditRect := AViewInfo.ClientRect; - - CalculatePopupBorderStyle; -end; - -procedure TcxCustomEditViewData.CalculateButtonBounds(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: Integer; - var ButtonsRect: TRect); -var - AButtonVisibleWidth, AButtonWidth: Integer; -begin - with AViewInfo.ButtonsInfo[AButtonVisibleIndex] do - begin - if IsRectEmpty(ButtonsRect) then - begin - Bounds := cxEmptyRect; - VisibleBounds := Bounds; - end else - begin - Bounds.Top := ButtonsRect.Top; - Bounds.Bottom := ButtonsRect.Bottom; - AButtonWidth := CalculateEditDefaultButtonWidth(ACanvas, AViewInfo.ButtonsInfo[AButtonVisibleIndex]); - if AButtonWidth > ButtonsRect.Right - ButtonsRect.Left then - AButtonVisibleWidth := ButtonsRect.Right - ButtonsRect.Left - else - AButtonVisibleWidth := AButtonWidth; - if Data.LeftAlignment then - begin - Bounds.Left := ButtonsRect.Left; - Bounds.Right := Bounds.Left + AButtonWidth; - VisibleBounds := Bounds; - VisibleBounds.Right := VisibleBounds.Left + AButtonVisibleWidth; - Inc(ButtonsRect.Left, AButtonVisibleWidth); - if FLeftSideLeftmostButtonIndex = -1 then - FLeftSideLeftmostButtonIndex := AButtonVisibleIndex; - FLeftSideRightmostButtonIndex := AButtonVisibleIndex; - end else - begin - Bounds.Right := ButtonsRect.Right; - Bounds.Left := Bounds.Right - AButtonWidth; - VisibleBounds := Bounds; - VisibleBounds.Left := VisibleBounds.Right - AButtonVisibleWidth; - Dec(ButtonsRect.Right, AButtonVisibleWidth); - if FRightSideRightmostButtonIndex = -1 then - FRightSideRightmostButtonIndex := AButtonVisibleIndex; - FRightSideLeftmostButtonIndex := AButtonVisibleIndex; - end; - end; - end; -end; - -procedure TcxCustomEditViewData.CalculateButtonsViewInfo(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); - - procedure CalculateButtonViewInfos(AButtonsStyle: TcxEditButtonStyle); - var - AButton: TcxEditButton; - AButtonIndex, AButtonVisibleIndex: Integer; - AButtonsRect, APrevButtonsRect: TRect; - AButtonViewInfo: TcxEditButtonViewInfo; - begin - AButtonsRect := ABounds; - if IsInplace or not (AViewInfo.NativeStyle and AViewInfo.ButtonsInfo[0].Data.ComboBoxStyle and IsCompositionEnabled) then - ExtendRect(AButtonsRect, GetButtonsExtent(ACanvas)); - APrevButtonsRect := AButtonsRect; - - AButtonVisibleIndex := Properties.Buttons.VisibleCount - 1; - AViewInfo.HasTextButtons := False; - for AButtonIndex := Properties.Buttons.Count - 1 downto 0 do - begin - AButton := Properties.Buttons[AButtonIndex]; - if AButton.Visible then - begin - if (AButton.Kind = bkText) and not AViewInfo.HasTextButtons then - begin - AViewInfo.HasTextButtons := True; - ACanvas.Font := Style.GetVisibleFont; - AViewInfo.PrepareCanvasFont(ACanvas.Canvas); - end; - - AButtonViewInfo := AViewInfo.ButtonsInfo[AButtonVisibleIndex]; - AButtonViewInfo.Index := AButtonIndex; - AButtonViewInfo.Data.Style := AButtonsStyle; - CalculateButtonViewInfo(ACanvas, AViewInfo, AButtonVisibleIndex, AButtonsRect); - Dec(AButtonVisibleIndex); - end; - end; - - CheckButtonsOnly(AViewInfo, APrevButtonsRect.Right - APrevButtonsRect.Left, - AButtonsRect.Right - AButtonsRect.Left); - end; - - procedure CalculateButtonStates(APrevPressedButton: Integer); - var - AButtonViewInfo: TcxEditButtonViewInfo; - AButtonVisibleIndex: Integer; - ACapturePressing: Boolean; - AHoldPressing: Boolean; - AIsButtonPressed: Boolean; - AMouseButtonPressing: Boolean; - begin - for AButtonVisibleIndex := 0 to High(AViewInfo.ButtonsInfo) do - begin - AIsButtonPressed := IsButtonPressed(AViewInfo, AButtonVisibleIndex); - AButtonViewInfo := AViewInfo.ButtonsInfo[AButtonVisibleIndex]; - with AButtonViewInfo do - begin - if not Enabled or not Properties.Buttons[Index].Enabled then - Data.State := ebsDisabled - else - if AIsButtonPressed or (not IsDesigning and PtInRect(VisibleBounds, P)) then - begin - ACapturePressing := (Button = cxmbNone) and (ssLeft in Shift) and - (Data.State = ebsNormal) and (GetCaptureButtonVisibleIndex = - AButtonVisibleIndex); - AMouseButtonPressing := (Button = cxmbLeft) and - ((Shift = [ssLeft]) or (Shift = [ssLeft, ssDouble])); - AHoldPressing := (Data.State = ebsPressed) and (Shift * [ssLeft] <> []); - if AIsButtonPressed or AMouseButtonPressing or AHoldPressing or - ACapturePressing then - AViewInfo.IsButtonReallyPressed := True; - if not AIsButtonPressed and (Shift = []) and not ACapturePressing then - begin - Data.State := ebsSelected; - AViewInfo.SelectedButton := AButtonVisibleIndex; - end - else - if (AIsButtonPressed or ACapturePressing and CanPressButton(AViewInfo, AButtonVisibleIndex) or ((Shift = [ssLeft]) or (Shift = [ssLeft, ssDouble])) and - ((Button = cxmbLeft) and CanPressButton(AViewInfo, AButtonVisibleIndex) or - (APrevPressedButton = AButtonVisibleIndex))) or AHoldPressing then - begin - Data.State := ebsPressed; - AViewInfo.PressedButton := AButtonVisibleIndex; - end - else - Data.State := ebsNormal; - end - else - Data.State := ebsNormal; - DoGetButtonState(AViewInfo, AButtonVisibleIndex, Data.State); - CalculateButtonNativeInfo(AViewInfo.ButtonsInfo[AButtonVisibleIndex]); - end; - end; - end; - - procedure CorrectButtonBounds; - var - AButtonsRect: TRect; - I: Integer; - begin - AButtonsRect := ABounds; - ExtendRect(AButtonsRect, GetButtonsExtent(ACanvas)); - if FLeftSideLeftmostButtonIndex <> -1 then - AViewInfo.ButtonsInfo[FLeftSideLeftmostButtonIndex].Data.Leftmost := True; - if (FLeftSideRightmostButtonIndex <> -1) and (not ButtonsOnlyStyle or (FRightSideLeftmostButtonIndex = -1)) then - AViewInfo.ButtonsInfo[FLeftSideRightmostButtonIndex].Data.Rightmost := True; - if (FRightSideLeftmostButtonIndex <> -1) and (not ButtonsOnlyStyle or (FLeftSideRightmostButtonIndex = -1)) then - AViewInfo.ButtonsInfo[FRightSideLeftmostButtonIndex].Data.Leftmost := True; - if FRightSideRightmostButtonIndex <> -1 then - AViewInfo.ButtonsInfo[FRightSideRightmostButtonIndex].Data.Rightmost := True; - if ButtonsOnlyStyle then - for I := 0 to High(AViewInfo.ButtonsInfo) do - AViewInfo.ButtonsInfo[I].Data.LeftAlignment := False; - end; - -var - APrevPressedButton: Integer; -begin - if ButtonVisibleCount = 0 then - begin - AViewInfo.SetButtonCount(ButtonVisibleCount); - Exit; - end; - if not(csActive in ContainerState) then - if (Style.ButtonTransparency = ebtHideInactive) or - (not(csHotTrack in ContainerState) and (Style.ButtonTransparency = ebtHideUnselected)) then - begin - AViewInfo.SetButtonCount(0); - Exit; - end; - AViewInfo.SetButtonCount(ButtonVisibleCount); - AViewInfo.IsButtonReallyPressed := False; - if AIsMouseEvent then - APrevPressedButton := AViewInfo.PressedButton - else - APrevPressedButton := -1; - AViewInfo.PressedButton := -1; - AViewInfo.SelectedButton := -1; - - FLeftSideLeftmostButtonIndex := -1; - FLeftSideRightmostButtonIndex := -1; - FRightSideLeftmostButtonIndex := -1; - FRightSideRightmostButtonIndex := -1; - - CalculateButtonViewInfos(GetButtonsStyle); - CalculateButtonStates(APrevPressedButton); - CorrectButtonBounds; -end; - -procedure TcxCustomEditViewData.CalculateButtonViewInfo(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: Integer; var ButtonsRect: TRect); - - function GetButtonWidth(AButton: TcxEditButton): Integer; - begin - Result := AButton.Width; - if Result = 0 then - Result := DoGetDefaultButtonWidth(AButton.Index); - end; - -var - AButton: TcxEditButton; -begin - with AViewInfo.ButtonsInfo[AButtonVisibleIndex] do - begin - AButton := Properties.Buttons[Index]; - Data.ComboBoxStyle := (Length(AViewInfo.ButtonsInfo) = 1) and - (AButton.Kind = bkDown); - Data.Kind := AButton.Kind; - if Data.Kind = bkText then - begin - Data.Caption := AButton.Caption; - if AViewInfo.Painter <> nil then - Data.TextColor := AViewInfo.Painter.EditButtonTextColor - else - Data.TextColor := AButton.TextColor; - Data.VisibleCaption := AButton.FVisibleCaption; - end; - Data.ContentAlignment := AButton.ContentAlignment; - Data.Default := AButton.Default; - Glyph := AButton.Glyph; - HasBackground := AViewInfo.HasBackground; - Data.Gradient := Self.Style.GradientButtons; - Data.IsInplace := Self.IsInplace; - Data.LeftAlignment := AButton.LeftAlignment; - Data.Leftmost := False; - Data.Rightmost := False; - Data.NativeStyle := AViewInfo.NativeStyle; - Stretchable := AButton.Stretchable; - Width := GetButtonWidth(AButton); - Data.Transparent := (Self.Style.ButtonTransparency = ebtAlways) or - ((Self.Style.ButtonTransparency = ebtInactive) and not Selected); - Data.BackgroundColor := AViewInfo.BackgroundColor; - CalculateButtonBounds(ACanvas, AViewInfo, AButtonVisibleIndex, ButtonsRect); - end; -end; - -procedure TcxCustomEditViewData.CalculateEx(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); -var - ANewBounds: TRect; - ANewP: TPoint; -begin - AViewInfo.Left := ABounds.Left; - AViewInfo.Top := ABounds.Top; - ANewBounds := ABounds; - OffsetRect(ANewBounds, -ABounds.Left, -ABounds.Top); - ANewP := Point(P.X - ABounds.Left, P.Y - ABounds.Top); - Calculate(ACanvas, ANewBounds, ANewP, Button, Shift, AViewInfo, AIsMouseEvent); -end; - -procedure TcxCustomEditViewData.CheckButtonsOnly( - AViewInfo: TcxCustomEditViewInfo; APrevButtonsWidth, AButtonsWidth: Integer); -var - AVisibleButtonCount: Integer; - - procedure FindStretchableButtons(out AStretchableButtonCount, - AStretchableButtonsTotalWidth: Integer; out AAllButtonsAreStretchable: Boolean); - var - I: Integer; - begin - AStretchableButtonCount := 0; - AStretchableButtonsTotalWidth := 0; - for I := 0 to AVisibleButtonCount - 1 do - with AViewInfo.ButtonsInfo[I] do - if Stretchable and not IgnoreButtonWhileStretching(I) then - begin - Inc(AStretchableButtonCount); - Inc(AStretchableButtonsTotalWidth, Bounds.Right - Bounds.Left); - end; - AAllButtonsAreStretchable := AStretchableButtonCount = 0; - if AAllButtonsAreStretchable then - begin - AStretchableButtonCount := AVisibleButtonCount; - AStretchableButtonsTotalWidth := APrevButtonsWidth - AButtonsWidth; - end; - end; - - procedure StretchButton(AButtonVisibleIndex: Integer; - AButtonViewInfo: TcxEditButtonViewInfo; AButtonWidthCorrection: Integer); - var - J: Integer; - begin - if AButtonViewInfo.Data.LeftAlignment then - begin - for J := 0 to High(AViewInfo.ButtonsInfo) do - with AViewInfo.ButtonsInfo[J] do - if Data.LeftAlignment and (Bounds.Left >= AButtonViewInfo.Bounds.Right) then - begin - Inc(Bounds.Left, AButtonWidthCorrection); - Inc(Bounds.Right, AButtonWidthCorrection); - VisibleBounds := Bounds; - end; - with AButtonViewInfo do - begin - Inc(Bounds.Right, AButtonWidthCorrection); - VisibleBounds.Right := Bounds.Right; - end; - end - else - begin - for J := 0 to High(AViewInfo.ButtonsInfo) do - with AViewInfo.ButtonsInfo[J] do - if not Data.LeftAlignment and (Bounds.Right <= AButtonViewInfo.Bounds.Left) then - begin - Dec(Bounds.Left, AButtonWidthCorrection); - Dec(Bounds.Right, AButtonWidthCorrection); - VisibleBounds := Bounds; - end; - with AButtonViewInfo do - begin - Dec(Bounds.Left, AButtonWidthCorrection); - VisibleBounds.Left := Bounds.Left; - end; - end; - end; - -var - AAllButtonsAreStretchable: Boolean; - AButtonViewInfo: TcxEditButtonViewInfo; - AFirstStretchableButtonWidthCorrection, AButtonWidthCorrection: Integer; - AStretchableButtonCount, AStretchableButtonsTotalWidth: Integer; - I: Integer; -begin - if not ButtonsOnlyStyle or (AButtonsWidth <= 0) then - Exit; - AVisibleButtonCount := Length(AViewInfo.ButtonsInfo); - FindStretchableButtons(AStretchableButtonCount, AStretchableButtonsTotalWidth, - AAllButtonsAreStretchable); - AFirstStretchableButtonWidthCorrection := AButtonsWidth; - for I := AVisibleButtonCount - 1 downto 0 do - begin - AButtonViewInfo := AViewInfo.ButtonsInfo[I]; - if not AAllButtonsAreStretchable and (not AButtonViewInfo.Stretchable or IgnoreButtonWhileStretching(I)) then - Continue; - Dec(AStretchableButtonCount); - if AStretchableButtonCount = 0 then - AButtonWidthCorrection := AFirstStretchableButtonWidthCorrection - else - begin - with AButtonViewInfo.Bounds do - AButtonWidthCorrection := AButtonsWidth * (Right - Left) div AStretchableButtonsTotalWidth; - Dec(AFirstStretchableButtonWidthCorrection, AButtonWidthCorrection); - end; - StretchButton(I, AButtonViewInfo, AButtonWidthCorrection); - end; -end; - -procedure TcxCustomEditViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -begin -end; - -function TcxCustomEditViewData.GetBorderColor: TColor; -var - AIsHighlightBorder: Boolean; -begin - AIsHighlightBorder := (csActive in ContainerState) or - (csHotTrack in ContainerState) and Style.HotTrack; - if Style.LookAndFeel.SkinPainter <> nil then - Result := Style.LookAndFeel.SkinPainter.GetContainerBorderColor(AIsHighlightBorder) - else - if Style.BorderStyle in [ebsUltraFlat, ebsOffice11] then - begin - AIsHighlightBorder := AIsHighlightBorder or IsDesigning and Enabled; - if AIsHighlightBorder then - Result := GetEditBorderHighlightColor(Style.BorderStyle = ebsOffice11) - else - Result := clBtnShadow; - end - else - Result := Style.BorderColor; -end; - -function TcxCustomEditViewData.GetBorderExtent: TRect; -var - ANativeStyle: Boolean; - AStyle: TcxCustomEditStyle; -begin - if IsInplace then - Result := ContentOffset - else - begin - AStyle := Style; - ANativeStyle := IsNativeStyle(AStyle.LookAndFeel); - if AStyle.LookAndFeel.SkinPainter <> nil then - Result := GetBorderExtentByPainter - else - if AStyle.TransparentBorder then - Result := cxContainerDefaultBorderExtent - else - if not AStyle.HasBorder or ANativeStyle and (AStyle.BaseStyle.BorderStyle = ebsNone) then - Result := cxEmptyRect - else - if ANativeStyle then - Result := cxContainerDefaultBorderExtent - else - Result := GetBorderExtentByEdges(GetContainerBorderWidth( - TcxContainerBorderStyle(GetBorderStyle))); - - if HasShadow then - begin - Inc(Result.Right, cxEditShadowWidth); - Inc(Result.Bottom, cxEditShadowWidth); - end; - end; -end; - -function TcxCustomEditViewData.GetBorderExtentByEdges(ABorderWidth: Integer): TRect; -begin - Result := cxEmptyRect; - if bLeft in Style.Edges then - Result.Left := ABorderWidth; - if bTop in Style.Edges then - Result.Top := ABorderWidth; - if bRight in Style.Edges then - Result.Right := ABorderWidth; - if bBottom in Style.Edges then - Result.Bottom := ABorderWidth; -end; - -function TcxCustomEditViewData.GetBorderExtentByPainter: TRect; - - function HasBorders(AStyle: TcxCustomEditStyle): Boolean; - begin - with AStyle do - Result := HasBorder and ((BorderStyle <> ebsNone) or TransparentBorder); - end; - -var - ABorderStyle: TcxEditBorderStyle; -begin - Result := cxEmptyRect; - if HasBorders(Style) then - begin - if HasThickBorders then - ABorderStyle := ebsThick - else - ABorderStyle := GetBorderStyle; - - Result := GetBorderExtentByEdges( - cxEditGetBorderWidthBySkinPainter(ABorderStyle, Style.LookAndFeel.SkinPainter)); - end; -end; - -function TcxCustomEditViewData.GetBorderStyle: TcxEditBorderStyle; -begin - if IsInplace then - Result := ebsNone - else - begin - Result := Style.BorderStyle; - CorrectBorderStyle(Result); - end; -end; - -function TcxCustomEditViewData.GetButtonsExtent(ACanvas: TcxCanvas): TRect; -var - ATheme: TdxTheme; - R, CR: TRect; -begin - if IsInplace then - Result := ContentOffset - else - if NativeStyle then - begin - if not Style.TransparentBorder and (Style.BaseStyle.BorderStyle = ebsNone) then - Result := cxEmptyRect - else - if (Style.BaseStyle.BorderStyle = ebsNone) then - Result := cxContainerDefaultBorderExtent - else - begin - R := Rect(0, 0, 100, 100); - ATheme := OpenTheme(totEdit); - GetThemeBackgroundContentRect(ATheme, ACanvas.Handle, EP_EDITTEXT, - ETS_NORMAL, R, CR); - Result := CR; - Result.Right := R.Right - CR.Right; - Result.Bottom := R.Bottom - CR.Bottom; - end; - end - else - Result := GetBorderExtent; -end; - -function TcxCustomEditViewData.GetClientExtent(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo): TRect; -var - I: Integer; -begin - Result := GetBorderExtent; - if (Properties.ButtonsViewStyle <> bvsNormal) and (Length(AViewInfo.ButtonsInfo) > 0) then - with GetButtonsExtent(ACanvas) do - begin - Result.Left := Left; - Result.Right := Right; - end; - - if HScrollBar <> nil then - Inc(Result.Bottom, HScrollBar.Height); - if VScrollBar <> nil then - Inc(Result.Right, VScrollBar.Width); - - for I := 0 to Length(AViewInfo.ButtonsInfo) - 1 do - with AViewInfo.ButtonsInfo[I] do - if Data.LeftAlignment then - begin - if Bounds.Right - AViewInfo.Bounds.Left > Result.Left then - Result.Left := Bounds.Right - AViewInfo.Bounds.Left - end else - begin - if AViewInfo.Bounds.Right - Bounds.Left > Result.Right then - Result.Right := AViewInfo.Bounds.Right - Bounds.Left; - end; -end; - -function TcxCustomEditViewData.GetEditConstantPartSize(ACanvas: TcxCanvas; - const AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo = nil): TSize; -var - ATempViewInfo: TcxCustomEditViewInfo; -begin - if AViewInfo = nil then - ATempViewInfo := TcxCustomEditViewInfo(Properties.GetViewInfoClass.Create) - else - ATempViewInfo := AViewInfo; - try - if AViewInfo = nil then - Calculate(ACanvas, Rect(0, 0, MaxInt, MaxInt), Point(-1, -1), cxmbNone, - [], ATempViewInfo, False); - Result := InternalGetEditConstantPartSize(ACanvas, IsInplace, - AEditSizeProperties, MinContentSize, ATempViewInfo); - finally - if AViewInfo = nil then - FreeAndNil(ATempViewInfo); - end; -end; - -function TcxCustomEditViewData.GetEditContentSize(ACanvas: TcxCanvas; const AEditValue: - TcxEditValue; const AEditSizeProperties: TcxEditSizeProperties): TSize; -begin - if Properties.ButtonsViewStyle <> bvsNormal then - begin - Result.cx := 0; - ACanvas.Font := Style.GetVisibleFont; - Result.cy := ACanvas.TextHeight('Zg') + Self.GetEditContentSizeCorrection.cy; - end - else - Result := InternalGetEditContentSize(ACanvas, AEditValue, AEditSizeProperties); -end; - -function TcxCustomEditViewData.GetEditContentSizeCorrection: TSize; -begin - with EditContentParams do - begin - Result.cx := Offsets.Left + Offsets.Right + SizeCorrection.cx; - Result.cy := Offsets.Top + Offsets.Bottom + SizeCorrection.cy; - end; -end; - -function TcxCustomEditViewData.GetEditSize(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AEditSizeProperties: TcxEditSizeProperties; - AViewInfo: TcxCustomEditViewInfo = nil): TSize; -var - AContentSize, AMinContentSize: TSize; - ATooNarrowEdit: Boolean; - APrevWidth: Integer; -begin - Result := GetEditConstantPartSize(ACanvas, AEditSizeProperties, - AMinContentSize, AViewInfo); - ATooNarrowEdit := False; - with AEditSizeProperties do - begin - APrevWidth := Width; - if Width >= 0 then - begin - Width := Width - Result.cx; - ATooNarrowEdit := Width < 0; - if ATooNarrowEdit then - Width := 0; - end; - end; - AContentSize := GetEditContentSize(ACanvas, AEditValue, AEditSizeProperties); - CheckSize(AContentSize, AMinContentSize); - if ATooNarrowEdit then - Result.cx := APrevWidth - else - Result.cx := Result.cx + AContentSize.cx; - Result.cy := Result.cy + AContentSize.cy; - if not IsInplace and (Edit <> nil) then - CheckSizeConstraints(Result); -end; - -function TcxCustomEditViewData.HasShadow: Boolean; -begin - Result := IsShadowDrawingNeeded(Self); -end; - -function TcxCustomEditViewData.IgnoreButtonWhileStretching( - AButtonVisibleIndex: Integer): Boolean; -begin - Result := False; -end; - -class function TcxCustomEditViewData.IsNativeStyle(ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := AreVisualStylesMustBeUsed(ALookAndFeel.NativeStyle, totEdit); -end; - -procedure TcxCustomEditViewData.CalculateButtonNativeInfo(AButtonViewInfo: TcxEditButtonViewInfo); -const - ButtonStateA: array [Boolean, TcxEditButtonState] of Integer = ( - (PBS_DISABLED, PBS_NORMAL, PBS_PRESSED, PBS_HOT), - (CBXS_DISABLED, CBXS_NORMAL, CBXS_PRESSED, CBXS_HOT) - ); -var - ATheme: TdxTheme; -begin - ATheme := 0; - with AButtonViewInfo do - begin - Data.NativePart := TC_NONE; - if Data.NativeStyle then - begin - if Data.ComboBoxStyle then - ATheme := OpenTheme(totComboBox) - else - ATheme := OpenTheme(totButton); - if ATheme <> 0 then - if Data.ComboBoxStyle then - if IsCompositionEnabled and not IsInplace then - if Data.LeftAlignment then - Data.NativePart := CP_DROPDOWNBUTTONLEFT - else - Data.NativePart := CP_DROPDOWNBUTTONRIGHT - else - Data.NativePart := CP_DROPDOWNBUTTON - else - Data.NativePart := BP_PUSHBUTTON; - end; - - if Data.NativePart = TC_NONE then - begin - Data.BackgroundPartiallyTransparent := False; - Data.NativeState := TC_NONE; - end - else - begin - Data.BackgroundPartiallyTransparent := IsThemeBackgroundPartiallyTransparent(ATheme, - Data.NativePart, Data.NativeState); - Data.NativeState := ButtonStateA[Data.ComboBoxStyle, Data.State]; - end; - end; -end; - -procedure TcxCustomEditViewData.CalculateViewInfo(AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); -var - ABackgroundColor: TColor; -begin - AViewInfo.NativeStyle := NativeStyle; - if AViewInfo.NativeStyle then - AViewInfo.NativeState := GetEditNativeState(AViewInfo) - else - AViewInfo.NativeState := TC_NONE; - - AViewInfo.BorderExtent := GetBorderExtent; - AViewInfo.BorderRect := AViewInfo.Bounds; - ExtendRect(AViewInfo.BorderRect, AViewInfo.BorderExtent); - AViewInfo.ShadowRect := AViewInfo.BorderRect; - - AViewInfo.HasContentOffsets := - (Int64(ContentOffset.TopLeft) <> 0) or (Int64(ContentOffset.BottomRight) <> 0); - - if not IsInplace then - AViewInfo.BorderColor := GetBorderColor; - GetColorSettings(AViewInfo, ABackgroundColor, AViewInfo.TextColor); - AViewInfo.BackgroundColor := ABackgroundColor; -end; - -function TcxCustomEditViewData.CanPressButton(AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer): Boolean; -begin - Result := True; -end; - -procedure TcxCustomEditViewData.CheckSizeConstraints(var AEditSize: TSize); -begin - with Edit.Constraints do - begin - if (MaxHeight <> 0) and (AEditSize.cy > MaxHeight) then - AEditSize.cy := MaxHeight; - if (MinHeight <> 0) and (AEditSize.cy < MinHeight) then - AEditSize.cy := MinHeight; - if (MaxWidth <> 0) and (AEditSize.cx > MaxWidth) then - AEditSize.cx := MaxWidth; - if (MinWidth <> 0) and (AEditSize.cx < MinWidth) then - AEditSize.cx := MinWidth; - end; -end; - -procedure TcxCustomEditViewData.DoOnGetDisplayText(var AText: string); -begin - if Assigned(FOnGetDisplayText) then - FOnGetDisplayText(Self, AText); -end; - -procedure TcxCustomEditViewData.CorrectBorderStyle(var ABorderStyle: TcxEditBorderStyle); -begin - if ABorderStyle in [ebsUltraFlat, ebsOffice11] then - ABorderStyle := ebsSingle; -end; - -function TcxCustomEditViewData.EditValueToDisplayText(AEditValue: TcxEditValue): string; -begin - Result := InternalEditValueToDisplayText(AEditValue); - DoOnGetDisplayText(Result); -end; - -function TcxCustomEditViewData.GetButtonsStyle: TcxEditButtonStyle; - - function GetDefaultButtonStyle: TcxEditButtonStyle; - const - AButtonStyles: array[TcxEditBorderStyle] of TcxEditButtonStyle = - (btsSimple, btsHotFlat, bts3D, btsFlat, bts3D, btsUltraFlat, btsOffice11); - AInplaceButtonStyles: array[TcxLookAndFeelKind] of TcxEditButtonStyle = - (btsFlat, bts3D, btsUltraFlat, btsOffice11); - begin - if IsInplace or (Style.BorderStyle = ebsNone) and not Style.HotTrack then - Result := AInplaceButtonStyles[Style.LookAndFeel.Kind] - else - Result := AButtonStyles[Style.BorderStyle]; - end; - -begin - Result := Style.ButtonStyle; - if Result = btsDefault then - Result := GetDefaultButtonStyle; -end; - -function TcxCustomEditViewData.GetCaptureButtonVisibleIndex: Integer; -begin - Result := -1; - if Edit <> nil then - Result := Edit.FCaptureButtonVisibleIndex; -end; - -procedure TcxCustomEditViewData.GetColorSettings(AViewInfo: TcxCustomEditViewInfo; - var FillColor, TextColor: TColor); -const - ANativePart: array [Boolean] of Integer = (EP_EDITTEXT, EP_BACKGROUND); -var - AColor: COLORREF; -begin - AViewInfo.GetColorSettingsByPainter(FillColor, TextColor); - if TextColor = clDefault then - TextColor := Style.TextColor; - if (Edit <> nil) and Edit.DefaultParentColor then - FillColor := Style.Color - else - if FillColor = clDefault then - begin - if AViewInfo.NativeStyle and not Enabled and not Style.IsValueAssigned(svColor) then - // if AViewInfo.NativeStyle and (AViewInfo.NativeState in [ETS_DISABLED, ETS_READONLY]) and - // not Style.IsValueAssigned(svColor) then - begin - GetThemeColor(OpenTheme(totEdit), ANativePart[IsCompositionEnabled], - AViewInfo.NativeState, TMT_FILLCOLOR, AColor); - FillColor := AColor; - end - else - FillColor := Style.Color; - end; -end; - -function TcxCustomEditViewData.GetContainerState(const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): TcxContainerState; - - function GetEditVisibleBounds: TRect; - begin - if Edit <> nil then - Result := Edit.GetVisibleBounds - else - begin - Result := ABounds; - ExtendRect(Result, ContentOffset); - end; - end; - -begin - if Enabled then - if IsDesigning then - Result := [csNormal] - else - begin - if Focused then - Result := [csActive] - else - Result := [csNormal]; - if PtInRect(GetEditVisibleBounds, P) and - ((Shift = []) or (Edit <> nil) and (GetCaptureControl = Edit)) then - Include(Result, csHotTrack); - end - else - Result := [csDisabled]; -end; - -function TcxCustomEditViewData.GetEditContentDefaultOffsets: TRect; -begin - Result := EditContentDefaultOffsets[IsInplace]; -end; - -procedure TcxCustomEditViewData.InitEditContentParams( - var AParams: TcxEditContentParams); -begin - AParams.Offsets := GetEditContentDefaultOffsets; - with AParams.Offsets do - AParams.SizeCorrection.cx := EditContentMaxTotalDefaultHorzOffset - (Left + Right); - if not NativeStyle then - AParams.SizeCorrection.cy := 0 - else - AParams.SizeCorrection.cy := - GetNativeInnerTextEditContentHeightCorrection(Properties, IsInplace); - AParams.ExternalBorderBounds := cxEmptyRect; - AParams.Options := [ecoOffsetButtonContent]; -end; - -function TcxCustomEditViewData.GetEditNativeState(AViewInfo: TcxCustomEditViewInfo): Integer; -begin - if not Enabled then - Result := ETS_DISABLED - else if Properties.ReadOnly then - Result := ETS_READONLY - else if Focused then - if IsCompositionEnabled then - Result := ETS_SELECTED - else - Result := ETS_FOCUSED - else if csHotTrack in ContainerState then - Result := ETS_HOT - else - Result := ETS_NORMAL; -end; - -function TcxCustomEditViewData.HasThickBorders: Boolean; -begin - if Edit = nil then - Result := FStyle.BorderStyle = ebsThick - else - Result := (Edit.Style.BorderStyle = ebsThick) or - (Edit.StyleDisabled.BorderStyle = ebsThick) or - (Edit.StyleFocused.BorderStyle = ebsThick) or - (Edit.StyleHot.BorderStyle = ebsThick); -end; - -procedure TcxCustomEditViewData.InitCacheData; -begin - ButtonVisibleCount := Properties.Buttons.VisibleCount; - IsValueSource := Properties.GetEditValueSource(False) = evsValue; - with Properties.Alignment do - begin - HorzAlignment := Horz; - VertAlignment := Vert; - end; - NativeStyle := IsNativeStyle(Style.LookAndFeel); - InitEditContentParams(EditContentParams); -end; - -procedure TcxCustomEditViewData.Initialize; -begin - ContentOffset := cxEmptyRect; - Enabled := True; -end; - -function TcxCustomEditViewData.InternalEditValueToDisplayText( - AEditValue: TcxEditValue): string; -begin - Result := ''; -end; - -function TcxCustomEditViewData.InternalFocused: Boolean; -begin - if Edit <> nil then - Result := Edit.InternalFocused - else - Result := Focused; -end; - -function TcxCustomEditViewData.InternalGetEditConstantPartSize(ACanvas: TcxCanvas; - AIsInplace: Boolean; AEditSizeProperties: TcxEditSizeProperties; - var MinContentSize: TSize; AViewInfo: TcxCustomEditViewInfo): TSize; -var - AButton: TcxEditButton; - AButtonCaptionHeight, AMaxButtonContentHeight, I: Integer; -begin - MinContentSize := cxNullSize; - with AViewInfo.ClientRect do - begin - Result.cx := Left - AViewInfo.Bounds.Left + (AViewInfo.Bounds.Right - Right); - Result.cy := Top - AViewInfo.Bounds.Top + (AViewInfo.Bounds.Bottom - Bottom); - end; - - AMaxButtonContentHeight := 0; - if IsInplace then - for I := 0 to Properties.Buttons.Count - 1 do - begin - AButton := Properties.Buttons[I]; - if AButton.Visible and (AButton.Kind = bkText) then - begin - ACanvas.Font := Style.GetVisibleFont; - AViewInfo.PrepareCanvasFont(ACanvas.Canvas); - Break; - end; - end; - for I := 0 to Properties.Buttons.Count - 1 do - begin - AButton := Properties.Buttons[I]; - if not AButton.Visible then - Continue; - if (AButton.Kind = bkGlyph) and VerifyBitmap(AButton.Glyph) then - if AButton.Glyph.Height > AMaxButtonContentHeight then - AMaxButtonContentHeight := AButton.Glyph.Height; - if IsInplace and (AButton.Kind = bkText) and (Length(AButton.VisibleCaption) > 0) then - begin - AButtonCaptionHeight := ACanvas.TextHeight(AButton.VisibleCaption); - if AButtonCaptionHeight > AMaxButtonContentHeight then - AMaxButtonContentHeight := AButtonCaptionHeight; - end; - end; - if AMaxButtonContentHeight > 0 then - begin - if Style.LookAndFeel.SkinPainter = nil then - with GetButtonsExtent(ACanvas) do - Inc(AMaxButtonContentHeight, Top + Bottom); - - Inc(AMaxButtonContentHeight, GetEditButtonsContentVerticalOffset(ACanvas, - GetButtonsStyle, AViewInfo.NativeStyle)); - MinContentSize.cy := Max(0, AMaxButtonContentHeight - Result.cy); - end; -end; - -function TcxCustomEditViewData.InternalGetEditContentSize(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; const AEditSizeProperties: TcxEditSizeProperties): TSize; -begin - Result := cxNullSize; -end; - -function TcxCustomEditViewData.IsButtonPressed(AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer): Boolean; -begin - Result := False; -end; - -procedure TcxCustomEditViewData.DoGetButtonState(AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer; var AState: TcxEditButtonState); -begin - if Assigned(AViewInfo.FOnGetButtonState) then - AViewInfo.FOnGetButtonState(AViewInfo, AButtonVisibleIndex, AState); -end; - -function TcxCustomEditViewData.DoGetDefaultButtonWidth(AIndex: Integer): Integer; -begin - Result := 0; - if Assigned(FOnGetDefaultButtonWidth) then - FOnGetDefaultButtonWidth(Self, AIndex, Result); -end; - -function TcxCustomEditViewData.GetPaintOptions: TcxEditPaintOptions; -begin - Result := PaintOptions; - if not IsRectEmpty(EditContentParams.ExternalBorderBounds) then - Include(Result, epoHasExternalBorder); - if ecoShowFocusRectWhenInplace in EditContentParams.Options then - Include(Result, epoShowFocusRectWhenInplace); -end; - -function TcxCustomEditViewData.GetStyle: TcxCustomEditStyle; -begin - Result := TcxCustomEditStyle(FStyle); -end; - -procedure TcxCustomEditViewData.SetStyle(Value: TcxCustomEditStyle); -begin - FStyle := Value; -end; - -{ TcxEditStyleController } - -function TcxEditStyleController.GetStyleClass: TcxContainerStyleClass; -begin - Result := TcxEditStyle; -end; - -function TcxEditStyleController.GetInternalStyle(AState: TcxContainerStateItem): TcxCustomEditStyle; -begin - Result := TcxCustomEditStyle(FStyles[AState]); -end; - -function TcxEditStyleController.GetStyle: TcxEditStyle; -begin - Result := TcxEditStyle(FStyles[csNormal]); -end; - -function TcxEditStyleController.GetStyleDisabled: TcxEditStyle; -begin - Result := TcxEditStyle(FStyles[csDisabled]); -end; - -function TcxEditStyleController.GetStyleFocused: TcxEditStyle; -begin - Result := TcxEditStyle(FStyles[csActive]); -end; - -function TcxEditStyleController.GetStyleHot: TcxEditStyle; -begin - Result := TcxEditStyle(FStyles[csHotTrack]); -end; - -procedure TcxEditStyleController.SetInternalStyle(AState: TcxContainerStateItem; - Value: TcxCustomEditStyle); -begin - FStyles[AState] := Value; -end; - -procedure TcxEditStyleController.SetStyle(Value: TcxEditStyle); -begin - FStyles[csNormal] := Value; -end; - -procedure TcxEditStyleController.SetStyleDisabled(Value: TcxEditStyle); -begin - FStyles[csDisabled] := Value; -end; - -procedure TcxEditStyleController.SetStyleFocused(Value: TcxEditStyle); -begin - FStyles[csActive] := Value; -end; - -procedure TcxEditStyleController.SetStyleHot(Value: TcxEditStyle); -begin - FStyles[csHotTrack] := Value; -end; - -{ TcxCustomEditStyle } - -constructor TcxCustomEditStyle.Create(AOwner: TPersistent; - ADirectAccessMode: Boolean; AParentStyle: TcxContainerStyle = nil; - AState: TcxContainerStateItem = csNormal); -begin - inherited Create(AOwner, ADirectAccessMode, AParentStyle, AState); - FPopupCloseButton := True; -end; - -procedure TcxCustomEditStyle.Assign(Source: TPersistent); -begin - if Source is TcxCustomEditStyle then - begin - BeginUpdate; - try - with Source as TcxCustomEditStyle do - begin - Self.FButtonStyle := FButtonStyle; - Self.FButtonTransparency := FButtonTransparency; - Self.FGradient := FGradient; - Self.FGradientButtons := FGradientButtons; - Self.FGradientDirection := FGradientDirection; - Self.FPopupBorderStyle := FPopupBorderStyle; - Self.FPopupCloseButton := FPopupCloseButton; - end; - inherited Assign(Source); - finally - Changed; - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomEditStyle.GetStyleValueCount: Integer; -begin - Result := cxEditStyleValueCount; -end; - -function TcxCustomEditStyle.GetStyleValueName(AStyleValue: TcxEditStyleValue; - out StyleValueName: string): Boolean; -begin - Result := inherited GetStyleValueName(AStyleValue, StyleValueName); - if not Result then - begin - Result := AStyleValue < cxEditStyleValueCount; - if Result then - StyleValueName := cxEditStyleValueNameA[AStyleValue - cxContainerStyleValueCount]; - end; -end; - -function TcxCustomEditStyle.IsValueAssigned(AValue: TcxEditStyleValue): Boolean; -var - AButtonStyle: TcxEditButtonStyle; - AButtonTransparency: TcxEditButtonTransparency; - AGradientDirection: TcxEditGradientDirection; - APopupBorderStyle: TcxEditPopupBorderStyle; - ATempBool: Boolean; -begin - case AValue of - svButtonStyle: - Result := InternalGetButtonStyle(AButtonStyle); - svButtonTransparency: - Result := InternalGetButtonTransparency(AButtonTransparency); - svGradient: - Result := InternalGetGradient(ATempBool); - svGradientButtons: - Result := InternalGetGradientButtons(ATempBool); - svGradientDirection: - Result := InternalGetGradientDirection(AGradientDirection); - svPopupBorderStyle: - Result := InternalGetPopupBorderStyle(APopupBorderStyle); - else - Result := inherited IsValueAssigned(AValue); - end; -end; - -procedure TcxCustomEditStyle.Init(AParams: TcxViewParams); -begin - BeginUpdate; - try - Color := AParams.Color; - Font := AParams.Font; - TextColor := AParams.TextColor; - finally - EndUpdate; - end; -end; - -function TcxCustomEditStyle.GetAssignedValues: TcxEditStyleValues; -begin - Result := TcxEditStyleValues(inherited AssignedValues); -end; - -function TcxCustomEditStyle.GetBaseStyle: TcxCustomEditStyle; -begin - Result := TcxCustomEditStyle(inherited BaseStyle); -end; - -function TcxCustomEditStyle.GetDefaultStyleController: TcxStyleController; -var - AEdit: TcxCustomEdit; -begin - Result := nil; - if not DirectAccessMode then - begin - AEdit := Edit; - if not((AEdit <> nil) and AEdit.IsInplace) then - Result := DefaultEditStyleController; - end; -end; - -function TcxCustomEditStyle.InternalGetNotPublishedExtendedStyleValues: TcxEditStyleValues; -begin - Result := [svButtonTransparency, svEdges, svFont, svGradient, - svGradientButtons, svGradientDirection, svHotTrack, svPopupBorderStyle, - svShadow, svTransparentBorder]; -end; - -function TcxCustomEditStyle.DefaultButtonStyle: TcxEditButtonStyle; -begin - if IsBaseStyle then - Result := btsDefault - else - Result := TcxCustomEditStyle(ParentStyle).ButtonStyle; -end; - -function TcxCustomEditStyle.DefaultButtonTransparency: TcxEditButtonTransparency; -begin - if IsBaseStyle then - Result := ebtNone - else - Result := TcxCustomEditStyle(ParentStyle).ButtonTransparency; -end; - -function TcxCustomEditStyle.DefaultGradient: Boolean; -begin - if IsBaseStyle then - Result := False - else - Result := TcxCustomEditStyle(ParentStyle).Gradient; -end; - -function TcxCustomEditStyle.DefaultGradientButtons: Boolean; -begin - if IsBaseStyle then - Result := False - else - Result := TcxCustomEditStyle(ParentStyle).GradientButtons; -end; - -function TcxCustomEditStyle.DefaultGradientDirection: TcxEditGradientDirection; -begin - if IsBaseStyle then - Result := dirDown - else - Result := TcxCustomEditStyle(ParentStyle).GradientDirection; -end; - -function TcxCustomEditStyle.DefaultPopupBorderStyle: TcxEditPopupBorderStyle; -begin - if IsBaseStyle then - Result := epbsDefault - else - Result := TcxCustomEditStyle(ParentStyle).PopupBorderStyle; -end; - -function TcxCustomEditStyle.GetActiveStyleController: TcxEditStyleController; -begin - Result := TcxEditStyleController(inherited ActiveStyleController); -end; - -function TcxCustomEditStyle.GetBorderStyle: TcxEditBorderStyle; -begin - Result := TcxEditBorderStyle(inherited BorderStyle); -end; - -function TcxCustomEditStyle.GetButtonStyle: TcxEditButtonStyle; -begin - if DirectAccessMode then - if svButtonStyle in FAssignedValues then - Result := FButtonStyle - else - Result := DefaultButtonStyle - else - if not InternalGetButtonStyle(Result) then - Result := DefaultButtonStyle; -end; - -function TcxCustomEditStyle.GetButtonTransparency: TcxEditButtonTransparency; -begin - if DirectAccessMode then - if svButtonTransparency in FAssignedValues then - Result := FButtonTransparency - else - Result := DefaultButtonTransparency - else - if not InternalGetButtonTransparency(Result) then - Result := DefaultButtonTransparency; -end; - -function TcxCustomEditStyle.GetEdit: TcxCustomEdit; -var - AOwner: TPersistent; -begin - AOwner := GetOwner; - if AOwner is TcxCustomEdit then - Result := TcxCustomEdit(AOwner) - else - Result := nil; -end; - -function TcxCustomEditStyle.GetGradient: Boolean; -begin - if DirectAccessMode then - if svGradient in FAssignedValues then - Result := FGradient - else - Result := DefaultGradient - else - if not InternalGetGradient(Result) then - Result := DefaultGradient; -end; - -function TcxCustomEditStyle.GetGradientButtons: Boolean; -begin - if DirectAccessMode then - if svGradientButtons in FAssignedValues then - Result := FGradientButtons - else - Result := DefaultGradientButtons - else - if not InternalGetGradientButtons(Result) then - Result := DefaultGradientButtons; -end; - -function TcxCustomEditStyle.GetGradientDirection: TcxEditGradientDirection; -begin - if DirectAccessMode then - if svGradientDirection in FAssignedValues then - Result := FGradientDirection - else - Result := DefaultGradientDirection - else - if not InternalGetGradientDirection(Result) then - Result := DefaultGradientDirection; -end; - -function TcxCustomEditStyle.GetPopupBorderStyle: TcxEditPopupBorderStyle; -begin - if DirectAccessMode then - if svPopupBorderStyle in FAssignedValues then - Result := FPopupBorderStyle - else - Result := DefaultPopupBorderStyle - else - if not InternalGetPopupBorderStyle(Result) then - Result := DefaultPopupBorderStyle; -end; - -function TcxCustomEditStyle.GetStyleController: TcxEditStyleController; -begin - Result := TcxEditStyleController(BaseGetStyleController); -end; - -function TcxCustomEditStyle.GetPopupCloseButton: Boolean; -begin - if IsBaseStyle then - Result := FPopupCloseButton - else - Result := TcxCustomEditStyle(ParentStyle).PopupCloseButton; -end; - -function TcxCustomEditStyle.InternalGetButtonStyle(var ButtonStyle: TcxEditButtonStyle): Boolean; -begin - Result := svButtonStyle in FAssignedValues; - if Result then - ButtonStyle := FButtonStyle - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[TcxContainerStateItem(State)].InternalGetButtonStyle(ButtonStyle); -end; - -function TcxCustomEditStyle.InternalGetButtonTransparency(var ButtonTransparency: TcxEditButtonTransparency): Boolean; -begin - Result := svButtonTransparency in FAssignedValues; - if Result then - ButtonTransparency := FButtonTransparency - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[TcxContainerStateItem(State)].InternalGetButtonTransparency(ButtonTransparency); -end; - -function TcxCustomEditStyle.InternalGetGradient(var Gradient: Boolean): Boolean; -begin - Result := svGradient in FAssignedValues; - if Result then - Gradient := FGradient - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[TcxContainerStateItem(State)].InternalGetGradient(Gradient); -end; - -function TcxCustomEditStyle.InternalGetGradientButtons(var GradientButtons: Boolean): Boolean; -begin - Result := svGradientButtons in FAssignedValues; - if Result then - GradientButtons := FGradientButtons - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[TcxContainerStateItem(State)].InternalGetGradientButtons(GradientButtons); -end; - -function TcxCustomEditStyle.InternalGetGradientDirection( - var GradientDirection: TcxEditGradientDirection): Boolean; -begin - Result := svGradientDirection in FAssignedValues; - if Result then - GradientDirection := FGradientDirection - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[TcxContainerStateItem(State)].InternalGetGradientDirection(GradientDirection); -end; - -function TcxCustomEditStyle.InternalGetPopupBorderStyle(var PopupBorderStyle: - TcxEditPopupBorderStyle): Boolean; -begin - Result := svPopupBorderStyle in FAssignedValues; - if Result then - PopupBorderStyle := FPopupBorderStyle - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[TcxContainerStateItem(State)].InternalGetPopupBorderStyle(PopupBorderStyle); -end; - -function TcxCustomEditStyle.IsBorderStyleStored: Boolean; -begin - Result := (svBorderStyle in FAssignedValues) and ((Edit = nil) or - Edit.IsStylePropertyPublished('BorderStyle', State <> csNormal)); -end; - -function TcxCustomEditStyle.IsButtonStyleStored: Boolean; -begin - Result := (svButtonStyle in FAssignedValues) and ((Edit = nil) or - Edit.IsStylePropertyPublished('ButtonStyle', State <> csNormal)); -end; - -function TcxCustomEditStyle.IsButtonTransparencyStored: Boolean; -begin - Result := (svButtonTransparency in FAssignedValues) and ((Edit = nil) or - Edit.IsStylePropertyPublished('ButtonTransparency', State <> csNormal)); -end; - -function TcxCustomEditStyle.IsGradientStored: Boolean; -begin - Result := (svGradient in FAssignedValues) and ((Edit = nil) or - Edit.IsStylePropertyPublished('Gradient', State <> csNormal)); -end; - -function TcxCustomEditStyle.IsGradientButtonsStored: Boolean; -begin - Result := (svGradientButtons in FAssignedValues) and ((Edit = nil) or - Edit.IsStylePropertyPublished('GradientButtons', State <> csNormal)); -end; - -function TcxCustomEditStyle.IsGradientDirectionStored: Boolean; -begin - Result := (svGradientDirection in FAssignedValues) and ((Edit = nil) or - Edit.IsStylePropertyPublished('GradientDirection', State <> csNormal)); -end; - -function TcxCustomEditStyle.IsPopupBorderStyleStored: Boolean; -begin - Result := (svPopupBorderStyle in FAssignedValues) and ((Edit = nil) or - Edit.IsStylePropertyPublished('PopupBorderStyle', State <> csNormal)); -end; - -function TcxCustomEditStyle.IsStyleControllerStored: Boolean; -begin - Result := State = csNormal; -end; - -procedure TcxCustomEditStyle.SetAssignedValues(Value: TcxEditStyleValues); -begin - inherited AssignedValues := Value; -end; - -procedure TcxCustomEditStyle.SetBorderStyle(Value: TcxEditBorderStyle); -begin - inherited BorderStyle := TcxContainerBorderStyle(Value); -end; - -procedure TcxCustomEditStyle.SetButtonStyle(Value: TcxEditButtonStyle); -begin - if (svButtonStyle in FAssignedValues) and (Value = FButtonStyle) then - Exit; - FButtonStyle := Value; - Include(FAssignedValues, svButtonStyle); - Changed; -end; - -procedure TcxCustomEditStyle.SetButtonTransparency(Value: TcxEditButtonTransparency); -begin - if IsBaseStyle then - begin - if (svButtonTransparency in FAssignedValues) and (Value = FButtonTransparency) then - Exit; - FButtonTransparency := Value; - Include(FAssignedValues, svButtonTransparency); - Changed; - end - else - TcxCustomEditStyle(ParentStyle).ButtonTransparency := Value; -end; - -procedure TcxCustomEditStyle.SetGradient(Value: Boolean); -begin - if IsBaseStyle then - begin - if (svGradient in FAssignedValues) and (Value = FGradient) then - Exit; - FGradient := Value; - Include(FAssignedValues, svGradient); - Changed; - end - else - TcxCustomEditStyle(ParentStyle).Gradient := Value; -end; - -procedure TcxCustomEditStyle.SetGradientButtons(Value: Boolean); -begin - if IsBaseStyle then - begin - if (svGradientButtons in FAssignedValues) and (Value = FGradientButtons) then - Exit; - FGradientButtons := Value; - Include(FAssignedValues, svGradientButtons); - Changed; - end - else - TcxCustomEditStyle(ParentStyle).GradientButtons := Value; -end; - -procedure TcxCustomEditStyle.SetGradientDirection(Value: TcxEditGradientDirection); -begin - if IsBaseStyle then - begin - if (svGradientDirection in FAssignedValues) and (Value = FGradientDirection) then - Exit; - FGradientDirection := Value; - Include(FAssignedValues, svGradientDirection); - Changed; - end - else - TcxCustomEditStyle(ParentStyle).GradientDirection := Value; -end; - -procedure TcxCustomEditStyle.SetPopupBorderStyle(Value: TcxEditPopupBorderStyle); -begin - if IsBaseStyle then - begin - if (svPopupBorderStyle in FAssignedValues) and (Value = FPopupBorderStyle) then - Exit; - FPopupBorderStyle := Value; - Include(FAssignedValues, svPopupBorderStyle); - Changed; - end - else - TcxCustomEditStyle(ParentStyle).PopupBorderStyle := Value; -end; - -procedure TcxCustomEditStyle.SetPopupCloseButton(Value: Boolean); -begin - if IsBaseStyle then - begin - if Value <> FPopupCloseButton then - begin - FPopupCloseButton := Value; - Changed; - end; - end - else - TcxCustomEditStyle(ParentStyle).PopupCloseButton := Value; -end; - -procedure TcxCustomEditStyle.SetStyleController(Value: TcxEditStyleController); -begin - BaseSetStyleController(Value); -end; - -{ TcxCustomEditPropertiesValues } - -constructor TcxCustomEditPropertiesValues.Create(AOwner: TPersistent); -begin - inherited Create; - FOwner := AOwner; -end; - -procedure TcxCustomEditPropertiesValues.Assign(Source: TPersistent); -begin - if Source is TcxCustomEditPropertiesValues then - begin - BeginUpdate; - try - with Source as TcxCustomEditPropertiesValues do - begin - Self.MaxValue := MaxValue; - Self.MinValue := MinValue; - Self.ReadOnly := ReadOnly; - end; - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxCustomEditPropertiesValues.BeginUpdate; -begin - Properties.BeginUpdate; -end; - -procedure TcxCustomEditPropertiesValues.EndUpdate; -begin - Properties.EndUpdate; -end; - -procedure TcxCustomEditPropertiesValues.RestoreDefaults; -begin - BeginUpdate; - try - MaxValue := False; - MinValue := False; - ReadOnly := False; - finally - EndUpdate; - end; -end; - -function TcxCustomEditPropertiesValues.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -procedure TcxCustomEditPropertiesValues.Changed; -begin - Properties.Changed; -end; - -function TcxCustomEditPropertiesValues.IsMaxValueStored: Boolean; -begin - Result := MaxValue and - (TcxCustomEditProperties(Properties).MaxValue = 0{TcxCustomEditProperties(Properties).GetDefaultMaxValue}) and - IsPropertiesPropertyVisible('MaxValue'); -end; - -function TcxCustomEditPropertiesValues.IsMinValueStored: Boolean; -begin - Result := MinValue and - (TcxCustomEditProperties(Properties).MinValue = 0{TcxCustomEditProperties(Properties).GetDefaultMinValue}) and - IsPropertiesPropertyVisible('MinValue'); -end; - -function TcxCustomEditPropertiesValues.IsPropertiesPropertyVisible( - const APropertyName: string): Boolean; -begin - Result := TypInfo.GetPropInfo(Properties, APropertyName) <> nil; -end; - -function TcxCustomEditPropertiesValues.GetProperties: TcxCustomEditProperties; -begin - Result := TcxCustomEditProperties(FOwner); -end; - -procedure TcxCustomEditPropertiesValues.SetMaxValue(Value: Boolean); -begin - if Value <> FMaxValue then - begin - FMaxValue := Value; - Changed; - end; -end; - -procedure TcxCustomEditPropertiesValues.SetMinValue(Value: Boolean); -begin - if Value <> FMinValue then - begin - FMinValue := Value; - Changed; - end; -end; - -procedure TcxCustomEditPropertiesValues.SetReadOnly(Value: Boolean); -begin - if Value <> FReadOnly then - begin - FReadOnly := Value; - Changed; - end; -end; - -{ TcxCustomEditDefaultValuesProvider } - -destructor TcxCustomEditDefaultValuesProvider.Destroy; -begin - ClearUsers; - inherited Destroy; -end; - -function TcxCustomEditDefaultValuesProvider.CanSetEditMode: Boolean; -begin - Result := True; -end; - -procedure TcxCustomEditDefaultValuesProvider.ClearUsers; -var - I: Integer; -begin - if FCreatedEditPropertiesList <> nil then - for I := 0 to FCreatedEditPropertiesList.Count - 1 do - with TcxCustomEditProperties(FCreatedEditPropertiesList[I]) do - if (IDefaultValuesProvider <> nil) and (IDefaultValuesProvider.GetInstance = Self) then - DefaultValuesProviderDestroyed; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultAlignment: TAlignment; -begin - Result := cxEditDefaultHorzAlignment; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultBlobKind: TcxBlobKind; -begin - Result := bkMemo; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultCanModify: Boolean; -begin - Result := True; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultDisplayFormat: string; -begin - Result := ''; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultEditFormat: string; -begin - Result := ''; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultEditMask: string; -begin - Result := ''; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultIsFloatValue: Boolean; -begin - Result := False; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultMaxLength: Integer; -begin - Result := 0; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultMaxValue: Double; -begin - Result := 0; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultMinValue: Double; -begin - Result := 0; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultPrecision: Integer; -begin - Result := cxEditDefaultPrecision; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultReadOnly: Boolean; -begin - Result := False; -end; - -function TcxCustomEditDefaultValuesProvider.DefaultRequired: Boolean; -begin - Result := False; -end; - -function TcxCustomEditDefaultValuesProvider.GetInstance: TObject; -begin - Result := Self; -end; - -function TcxCustomEditDefaultValuesProvider.IsBlob: Boolean; -begin - Result := False; -end; - -function TcxCustomEditDefaultValuesProvider.IsCurrency: Boolean; -begin - Result := False; -end; - -function TcxCustomEditDefaultValuesProvider.IsDataAvailable: Boolean; -begin - Result := True; -end; - -function TcxCustomEditDefaultValuesProvider.IsDataStorage: Boolean; -begin - Result := False; -end; - -function TcxCustomEditDefaultValuesProvider.IsDisplayFormatDefined( - AIsCurrencyValueAccepted: Boolean): Boolean; -begin - Result := False; -end; - -function TcxCustomEditDefaultValuesProvider.IsOnGetTextAssigned: Boolean; -begin - Result := False; -end; - -function TcxCustomEditDefaultValuesProvider.IsOnSetTextAssigned: Boolean; -begin - Result := False; -end; - -function TcxCustomEditDefaultValuesProvider.IsValidChar(AChar: Char): Boolean; -begin - Result := True; -end; - -{ TcxCustomEditProperties } - -constructor TcxCustomEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FCreatedEditPropertiesList.Add(Self); - FOwner := AOwner; - FFreeNotificator := TcxFreeNotificator.Create(nil); - FFreeNotificator.OnFreeNotification := FreeNotification; - FAlignment := TcxEditAlignment.Create(Self); - FAlignment.OnChanged := AlignmentChangedHandler; - FAssignedValues := GetAssignedValuesClass.Create(Self); - FAutoSelect := True; - FButtons := GetButtonsClass.Create(Self, GetButtonsClass.GetButtonClass); - FButtons.OnChange := ButtonsChanged; - FButtonsViewStyle := bvsNormal; - FClickKey := VK_RETURN + scCtrl; - FUseLeftAlignmentOnEditing := DefaultUseLeftAlignmentOnEditing; - FUseMouseWheel := True; - FInnerAlignment := TcxEditAlignment.Create(Self); - FUpdateCount := 0; -end; - -destructor TcxCustomEditProperties.Destroy; -begin - ClearPropertiesDestroyingListeners(Self); - FIDefaultValuesProvider := nil; - FreeAndNil(FButtons); - FreeAndNil(FInnerAlignment); - FreeAndNil(FAssignedValues); - FreeAndNil(FAlignment); - FreeAndNil(FFreeNotificator); - if FCreatedEditPropertiesList <> nil then - FCreatedEditPropertiesList.Remove(Self); - inherited Destroy; -end; - -procedure TcxCustomEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomEditProperties then - begin - BeginUpdate; - try - with Source as TcxCustomEditProperties do - begin - Self.AutoSelect := AutoSelect; - Self.Buttons.Assign(Buttons); - Self.ButtonsViewStyle := ButtonsViewStyle; - Self.BeepOnError := BeepOnError; - Self.ClearKey := ClearKey; - Self.ClickKey := ClickKey; - Self.FUseLeftAlignmentOnEditing := FUseLeftAlignmentOnEditing; - Self.FIDefaultValuesProvider := FIDefaultValuesProvider; - Self.Alignment := Alignment; - - Self.AssignedValues.MaxValue := False; - if AssignedValues.MaxValue then - Self.MaxValue := MaxValue; - - Self.AssignedValues.MinValue := False; - if AssignedValues.MinValue then - Self.MinValue := MinValue; - - Self.AssignedValues.ReadOnly := False; - if AssignedValues.ReadOnly then - Self.ReadOnly := ReadOnly; - - Self.ImmediatePost := ImmediatePost; - Self.Transparent := Transparent; - Self.UseMouseWheel := UseMouseWheel; - Self.ValidateOnEnter := ValidateOnEnter; - - Self.OnButtonClick := OnButtonClick; - Self.OnChange := OnChange; - Self.OnEditValueChanged := OnEditValueChanged; - Self.OnValidate := OnValidate; - end - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomEditProperties.CanCompareEditValue: Boolean; -begin - Result := False; -end; - -class function TcxCustomEditProperties.GetButtonsClass: TcxEditButtonsClass; -begin - Result := TcxEditButtons; -end; - -class function TcxCustomEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxCustomEdit; -end; - -class function TcxCustomEditProperties.GetStyleClass: TcxCustomEditStyleClass; -begin - Result := TcxEditStyle; -end; - -class function TcxCustomEditProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomEditViewInfo; -end; - -procedure TcxCustomEditProperties.BeginUpdate; -begin - if FUpdateCount = 0 then - FChangedOccurred := False; - Inc(FUpdateCount); -end; - -procedure TcxCustomEditProperties.Changed; - - function CanFireEvent: Boolean; - begin - Result := not ChangedLocked and not((GetOwner is TComponent) and - (csDestroying in TComponent(GetOwner).ComponentState)); - end; - -begin - if not CanFireEvent then - FChangedOccurred := True - else - DoChanged; -end; - -function TcxCustomEditProperties.ChangedLocked: Boolean; -begin - Result := FChangedLocked or (FUpdateCount > 0); -end; - -function TcxCustomEditProperties.CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; -var - ADisplayValue1, ADisplayValue2: TcxEditValue; -begin - PrepareDisplayValue(AEditValue1, ADisplayValue1, False); - PrepareDisplayValue(AEditValue2, ADisplayValue2, False); - Result := ADisplayValue1 = ADisplayValue2; -end; - -function TcxCustomEditProperties.CreatePreviewProperties: TcxCustomEditProperties; -begin - Result := TcxCustomEditPropertiesClass(ClassType).Create(nil); -end; - -function TcxCustomEditProperties.CreateViewData(AStyle: TcxCustomEditStyle; - AIsInplace: Boolean; APreviewMode: Boolean = False): TcxCustomEditViewData; -begin - Result := TcxCustomEditViewDataClass(GetViewDataClass).Create(Self, AStyle, AIsInplace); - Result.PreviewMode := APreviewMode; -end; - -procedure TcxCustomEditProperties.DataChanged; -begin -end; - -procedure TcxCustomEditProperties.EndUpdate(AInvokeChanged: Boolean = True); -begin - if FUpdateCount > 0 then - begin - Dec(FUpdateCount); - if (FUpdateCount = 0) and AInvokeChanged and FChangedOccurred then - Changed; - end; -end; - -function TcxCustomEditProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -begin - Result := ''; -end; - -function TcxCustomEditProperties.GetEditConstantPartSize(ACanvas: TcxCanvas; - AEditStyle: TcxCustomEditStyle; AIsInplace: Boolean; - const AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize): TSize; -var - AViewData: TcxCustomEditViewData; -begin - AViewData := TcxCustomEditViewData(CreateViewData(AEditStyle, AIsInplace)); - try - Result := AViewData.GetEditConstantPartSize(ACanvas, AEditSizeProperties, - MinContentSize); - finally - FreeAndNil(AViewData); - end; -end; - -function TcxCustomEditProperties.GetEditContentSize(ACanvas: TcxCanvas; - AEditStyle: TcxCustomEditStyle; AIsInplace: Boolean; const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; -var - AViewData: TcxCustomEditViewData; -begin - AViewData := TcxCustomEditViewData(CreateViewData(AEditStyle, AIsInplace)); - try - Result := AViewData.GetEditContentSize(ACanvas, AEditValue, AEditSizeProperties); - finally - FreeAndNil(AViewData); - end; -end; - -function TcxCustomEditProperties.GetEditSize(ACanvas: TcxCanvas; - AEditStyle: TcxCustomEditStyle; AIsInplace: Boolean; const AEditValue: TcxEditValue; - AEditSizeProperties: TcxEditSizeProperties): TSize; -var - AViewData: TcxCustomEditViewData; -begin - AViewData := TcxCustomEditViewData(CreateViewData(AEditStyle, AIsInplace)); - try - Result := AViewData.GetEditSize(ACanvas, AEditValue, AEditSizeProperties); - finally - FreeAndNil(AViewData); - end; -end; - -function TcxCustomEditProperties.GetSpecialFeatures: TcxEditSpecialFeatures; -begin - Result := []; -end; - -function TcxCustomEditProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - if Buttons.Count > 0 then - Result := [esoHotTrack] - else - Result := []; -end; - -function TcxCustomEditProperties.IsActivationKey(AKey: Char): Boolean; -begin - Result := False; -end; - -function TcxCustomEditProperties.IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; -begin - Result := True; -end; - -procedure TcxCustomEditProperties.RestoreDefaults; -begin - FInnerAlignment.Reset; - BeginUpdate; - try - AssignedValues.RestoreDefaults; - finally - EndUpdate; - end; -end; - -procedure TcxCustomEditProperties.Update(AProperties: TcxCustomEditProperties); -begin -end; - -procedure TcxCustomEditProperties.ValidateDisplayValue( - var ADisplayValue: TcxEditValue; var AErrorText: TCaption; - var AError: Boolean; AEdit: TcxCustomEdit); -var - AIsUserErrorDisplayValue: Boolean; -begin - if not CanValidate then - Exit; - if AErrorText = '' then - AErrorText := GetValidateErrorText(ekDefault); - DoValidate(ADisplayValue, AErrorText, AError, AEdit, AIsUserErrorDisplayValue); -end; - -procedure TcxCustomEditProperties.AlignmentChangedHandler(Sender: TObject); -begin - FInnerAlignment.Assign(FAlignment); - Changed; -end; - -procedure TcxCustomEditProperties.BaseSetAlignment(Value: TcxEditAlignment); -begin - FInnerAlignment.Assign(Value); - Changed; -end; - -procedure TcxCustomEditProperties.ButtonsChanged(Sender: TObject); -begin - Changed; -end; - -function TcxCustomEditProperties.CanModify: Boolean; -begin - Result := AssignedValues.ReadOnly and not FReadOnly; - if not Result then - begin - Result := not ReadOnly; - if Result and (IDefaultValuesProvider <> nil) then - Result := IDefaultValuesProvider.DefaultCanModify and - IDefaultValuesProvider.CanSetEditMode; - end; -end; - -function TcxCustomEditProperties.CanValidate: Boolean; -begin - Result := False; -end; - -procedure TcxCustomEditProperties.FillMinMaxValues(AMinValue, AMaxValue: Double); -begin - if AssignedValues.MaxValue and (AMaxValue = FMaxValue) and - AssignedValues.MinValue and (AMinValue = FMinValue) then - Exit; - - AssignedValues.FMaxValue := True; - FMaxValue := AMaxValue; - AssignedValues.FMinValue := True; - FMinValue := AMinValue; - Changed; -end; - -class function TcxCustomEditProperties.GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; -begin - Result := TcxCustomEditPropertiesValues; -end; - -function TcxCustomEditProperties.GetDefaultHorzAlignment: TAlignment; -begin - if IDefaultValuesProvider <> nil then - Result := IDefaultValuesProvider.DefaultAlignment - else - Result := FAlignment.Horz; -end; - -function TcxCustomEditProperties.GetDisplayFormatOptions: TcxEditDisplayFormatOptions; -begin - Result := []; -end; - -function TcxCustomEditProperties.GetMaxValue: Double; -begin - if AssignedValues.MaxValue then - Result := FMaxValue - else - if IDefaultValuesProvider = nil then - Result := 0 - else - Result := IDefaultValuesProvider.DefaultMaxValue; -end; - -function TcxCustomEditProperties.GetMinValue: Double; -begin - if AssignedValues.MinValue then - Result := FMinValue - else - if IDefaultValuesProvider = nil then - Result := 0 - else - Result := IDefaultValuesProvider.DefaultMinValue; -end; - -function TcxCustomEditProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - Result := evsValue; -end; - -function TcxCustomEditProperties.GetValidateErrorText(AErrorKind: TcxEditErrorKind): string; -begin - Result := cxGetResourceString(@cxSEditValidateErrorText); -end; - -function TcxCustomEditProperties.GetValueEditorEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - Result := evsValue; - if not AEditFocused and (dfoSupports in DisplayFormatOptions) and (IDefaultValuesProvider <> nil) and - IDefaultValuesProvider.IsDisplayFormatDefined(not(dfoNoCurrencyValue in DisplayFormatOptions)) then - Result := evsText; -end; - -class function TcxCustomEditProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomEditViewData; -end; - -function TcxCustomEditProperties.HasDisplayValue: Boolean; -begin - Result := False; -end; - -function TcxCustomEditProperties.InnerEditNeedsTabs: Boolean; -begin - Result := False; -end; - -function TcxCustomEditProperties.IsEditValueConversionDependOnFocused: Boolean; -begin - Result := True; -end; - -function TcxCustomEditProperties.IsMaxValueStored: Boolean; -begin - Result := AssignedValues.MaxValue; -end; - -function TcxCustomEditProperties.IsMinValueStored: Boolean; -begin - Result := AssignedValues.MinValue; -end; - -function TcxCustomEditProperties.IsResetEditClass: Boolean; -begin - Result := False; -end; - -function TcxCustomEditProperties.IsValueEditorWithValueFormatting: Boolean; -begin - Result := (dfoSupports in DisplayFormatOptions) and (GetEditValueSource(True) = evsValue) and - (GetEditValueSource(False) = evsText) and (IDefaultValuesProvider <> nil) and - IDefaultValuesProvider.IsDisplayFormatDefined(not(dfoNoCurrencyValue in DisplayFormatOptions)); -end; - -procedure TcxCustomEditProperties.LockUpdate(ALock: Boolean); -begin - FChangedLocked := ALock; -end; - -procedure TcxCustomEditProperties.PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); -begin - DisplayValue := AEditValue; -end; - -function TcxCustomEditProperties.DefaultUseLeftAlignmentOnEditing: Boolean; -begin - Result := cxEditDefaultUseLeftAlignmentOnEditing; -end; - -procedure TcxCustomEditProperties.DefaultValuesProviderDestroyed; -begin - FIDefaultValuesProvider := nil; -end; - -procedure TcxCustomEditProperties.DoChanged; -begin - if Assigned(FOnPropertiesChanged) then - begin - Inc(FIsChangingCount); - try - FOnPropertiesChanged(Self); - finally - Dec(FIsChangingCount); - end; - end; -end; - -procedure TcxCustomEditProperties.DoValidate(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var AError: Boolean; AEdit: TcxCustomEdit; - out AIsUserErrorDisplayValue: Boolean); -var - APrevDisplayValue: TcxEditValue; -begin - AIsUserErrorDisplayValue := False; - if AEdit.IsOnValidateEventAssigned then - begin - APrevDisplayValue := ADisplayValue; - AEdit.DoOnValidate(ADisplayValue, AErrorText, AError); - if AError then - begin - AIsUserErrorDisplayValue := not InternalCompareString(APrevDisplayValue, - ADisplayValue, True); - if not AIsUserErrorDisplayValue then - ADisplayValue := AEdit.DisplayValue; - end; - end; -end; - -procedure TcxCustomEditProperties.FreeNotification(Sender: TComponent); -begin -end; - -function TcxCustomEditProperties.BaseGetAlignment: TcxEditAlignment; -var - AOwnerComponent: TComponent; -begin - FAlignment.OnChanged := nil; - FAlignment.Assign(FInnerAlignment); - Result := FAlignment; - if IsAlignmentStored then - begin - AOwnerComponent := GetOwnerComponent(Self); - if (AOwnerComponent <> nil) and (csWriting in AOwnerComponent.ComponentState) then - Exit; - end; - - if not FInnerAlignment.IsHorzStored then - Result.FHorz := GetDefaultHorzAlignment; - FAlignment.OnChanged := AlignmentChangedHandler; -end; - -procedure TcxCustomEditProperties.DefaultValuesChanged(Sender: TObject); -begin - Changed; -end; - -function TcxCustomEditProperties.GetIsChanging: Boolean; -begin - Result := FIsChangingCount > 0; -end; - -function TcxCustomEditProperties.GetReadOnly: Boolean; -begin - if AssignedValues.ReadOnly then - Result := FReadOnly - else - if IDefaultValuesProvider = nil then - Result := False - else - Result := IDefaultValuesProvider.DefaultReadOnly; -end; - -function TcxCustomEditProperties.IsAlignmentStored: Boolean; -begin - with FInnerAlignment do - Result := IsHorzStored or IsVertStored; -end; - -function TcxCustomEditProperties.IsUseLeftAlignmentOnEditingStored: Boolean; -begin - Result := FUseLeftAlignmentOnEditing <> DefaultUseLeftAlignmentOnEditing; -end; - -function TcxCustomEditProperties.IsReadOnlyStored: Boolean; -begin - Result := AssignedValues.ReadOnly; -end; - -procedure TcxCustomEditProperties.SetAssignedValues( - Value: TcxCustomEditPropertiesValues); -begin - FAssignedValues.Assign(Value); -end; - -procedure TcxCustomEditProperties.SetAutoSelect(Value: Boolean); -begin - if Value <> FAutoSelect then - begin - FAutoSelect := Value; - Changed; - end; -end; - -procedure TcxCustomEditProperties.SetButtons(Value: TcxEditButtons); -begin - FButtons.Assign(Value); -end; - -procedure TcxCustomEditProperties.SetButtonsViewStyle(Value: TcxEditButtonsViewStyle); -begin - if Value <> FButtonsViewStyle then - begin - FButtonsViewStyle := Value; - Changed; - end; -end; - -procedure TcxCustomEditProperties.SetUseLeftAlignmentOnEditing(Value: Boolean); -begin - if Value <> FUseLeftAlignmentOnEditing then - begin - FUseLeftAlignmentOnEditing := Value; - Changed; - end; -end; - -procedure TcxCustomEditProperties.SetIDefaultValuesProvider(Value: IcxEditDefaultValuesProvider); -begin - FIDefaultValuesProvider := Value; - if FOwner is TcxCustomEdit then - DefaultValuesChanged(nil); -end; - -procedure TcxCustomEditProperties.SetMaxValue(Value: Double); -begin - if AssignedValues.MaxValue and (Value = FMaxValue) then - Exit; - - AssignedValues.FMaxValue := True; - FMaxValue := Value; - Changed; -end; - -procedure TcxCustomEditProperties.SetMinValue(Value: Double); -begin - if AssignedValues.MinValue and (Value = FMinValue) then - Exit; - - AssignedValues.FMinValue := True; - FMinValue := Value; - Changed; -end; - -procedure TcxCustomEditProperties.SetReadOnly(Value: Boolean); -begin - if AssignedValues.ReadOnly and (Value = FReadOnly) then - Exit; - AssignedValues.FReadOnly := True; - FReadOnly := Value; - Changed; -end; - -procedure TcxCustomEditProperties.SetTransparent(Value: Boolean); -begin - if Value <> FTransparent then - begin - FTransparent := Value; - Changed; - end; -end; - -{ TcxEditDataBinding } - -constructor TcxEditDataBinding.Create(AEdit: TcxCustomEdit); -begin - inherited Create; - FEdit := AEdit; - FIDefaultValuesProvider := GetDefaultValuesProviderClass.Create(nil); -end; - -destructor TcxEditDataBinding.Destroy; -begin - FreeAndNil(FIDefaultValuesProvider); - inherited Destroy; -end; - -function TcxEditDataBinding.CanCheckEditorValue: Boolean; -begin - Result := Edit.IsDesigning or not Edit.ModifiedAfterEnter; -end; - -function TcxEditDataBinding.CanModify: Boolean; -begin - Result := IsDataAvailable; -end; - -function TcxEditDataBinding.CanPostEditorValue: Boolean; -begin - Result := Modified; -end; - -function TcxEditDataBinding.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := False; -end; - -class function TcxEditDataBinding.GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; -begin - Result := TcxCustomEditDefaultValuesProvider; -end; - -procedure TcxEditDataBinding.SetModified; -begin - if Edit.Focused then - Edit.ModifiedAfterEnter := True; -end; - -function TcxEditDataBinding.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := False; -end; - -procedure TcxEditDataBinding.UpdateDisplayValue; -begin - Edit.SynchronizeDisplayValue; -end; - -procedure TcxEditDataBinding.UpdateNotConnectedDBEditDisplayValue; -begin -end; - -procedure TcxEditDataBinding.DefaultValuesChanged; -var - AProperties: TcxCustomEditProperties; -begin - AProperties := Edit.ActiveProperties; - if Edit.RepositoryItem = nil then - AProperties.DefaultValuesChanged(nil) - else - begin - AProperties.BeginUpdate; - try - AProperties.DefaultValuesChanged(nil); - finally - AProperties.EndUpdate(False); - end; - Edit.PropertiesChanged(AProperties); - end; -end; - -function TcxEditDataBinding.GetDisplayValue: TcxEditValue; -begin - Result := Edit.DisplayValue; -end; - -function TcxEditDataBinding.GetEditDataBindingInstance: TcxEditDataBinding; -begin - Result := Self; -end; - -function TcxEditDataBinding.GetEditing: Boolean; -begin - Result := Edit.ModifiedAfterEnter; -end; - -function TcxEditDataBinding.GetModified: Boolean; -begin - Result := Edit.ModifiedAfterEnter; -end; - -function TcxEditDataBinding.GetOwner: TPersistent; -begin - Result := FEdit; -end; - -function TcxEditDataBinding.GetStoredValue: TcxEditValue; -begin - Result := Edit.EditValue; -end; - -function TcxEditDataBinding.IsInnerControlHaveToBeReadOnly: Boolean; -begin - Result := not IsDataAvailable; -end; - -function TcxEditDataBinding.IsNull: Boolean; -begin - Result := False; -end; - -procedure TcxEditDataBinding.Reset; -begin - Edit.ResetEditValue; -end; - -procedure TcxEditDataBinding.SetInternalDisplayValue(const Value: TcxEditValue); -begin - Edit.SetInternalDisplayValue(Value); -end; - -procedure TcxEditDataBinding.SetDisplayValue(const Value: TcxEditValue); -begin - SetInternalDisplayValue(Value); -end; - -function TcxEditDataBinding.SetEditMode: Boolean; -begin - Edit.ModifiedAfterEnter := True; - Result := True; -end; - -procedure TcxEditDataBinding.SetStoredValue(const Value: TcxEditValue); -begin -end; - -function TcxEditDataBinding.GetIDefaultValuesProvider: IcxEditDefaultValuesProvider; -begin - Result := FIDefaultValuesProvider as IcxEditDefaultValuesProvider; -end; - -function TcxEditDataBinding.GetIsDataAvailable: Boolean; -begin - Result := IDefaultValuesProvider.IsDataAvailable; -end; - -{ TcxCustomEditData } - -constructor TcxCustomEditData.Create(AEdit: TcxCustomEdit); -begin - inherited Create; - FEdit := AEdit; - FFreeNotificator := TcxFreeNotificator.Create(nil); - FFreeNotificator.OnFreeNotification := FreeNotification; - FFreeNotificator.AddSender(AEdit); - Clear; -end; - -destructor TcxCustomEditData.Destroy; -begin - FFreeNotificator.Free; - inherited Destroy; -end; - -procedure TcxCustomEditData.Clear; -begin - FCleared := True; - if FEdit <> nil then - FEdit.DoClearEditData(Self); -end; - -procedure TcxCustomEditData.FreeNotification(AComponent: TComponent); -begin - if AComponent = FEdit then - FEdit := nil; -end; - -{ TcxEditChangeEventsCatcher } - -constructor TcxEditChangeEventsCatcher.Create(AEdit: TcxCustomEdit); -begin - inherited Create; - FEdit := AEdit; -end; - -function TcxEditChangeEventsCatcher.IsLocked: Boolean; -begin - Result := FLockCount > 0; -end; - -procedure TcxEditChangeEventsCatcher.Lock(ALock: Boolean; - AInvokeChangedOnUnlock: Boolean = True); -begin - if ALock then - begin - if FLockCount = 0 then - begin - FOnChangeEvent := False; - FOnEditValueChangedEvent := False; - end; - Inc(FLockCount); - end - else - if FLockCount > 0 then - begin - Dec(FLockCount); - if AInvokeChangedOnUnlock and (FLockCount = 0) and - not(FEdit.IsLoading or FEdit.IsDestroying) then - begin - if OnChangeEvent and FEdit.IsOnChangeEventAssigned then - FEdit.DoOnChange; - if OnEditValueChangedEvent and FEdit.IsOnEditValueChangedEventAssigned then - FEdit.DoOnEditValueChanged; - end; - end; -end; - -{ TcxCustomEdit } - -constructor TcxCustomEdit.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FAnchorX := MaxInt; - FAnchorY := MaxInt; - FIsCreating := True; - Initialize; - FIsCreating := False; - if HandleAllocated then - ShortRefreshContainer(False); -end; - -constructor TcxCustomEdit.Create(AOwner: TComponent; AIsInplace: Boolean); -begin - FIsInplace := AIsInplace; - Create(AOwner); -end; - -destructor TcxCustomEdit.Destroy; -begin - if Assigned(dxISpellChecker) then - dxISpellChecker.CheckFinish; - FreeAndNil(FDblClickTimer); - if FRepositoryItem <> nil then - FRepositoryItem.RemoveListener(Self); - if HasInnerEdit then - FInnerEdit := nil; - - Properties.OnPropertiesChanged := nil; - if not FIsInplace then - Properties.IDefaultValuesProvider := nil; - FreeAndNil(FDataBinding); - - FPrevModifiedList := nil; - FreeAndNil(FProperties); - FreeAndNil(FChangeEventsCatcher); - inherited Destroy; -end; - -procedure TcxCustomEdit.DefaultHandler(var Message); -var - AMessage: TMessage; -begin - AMessage := TMessage(Message); - if not (IsInplace and (AMessage.Msg = WM_CONTEXTMENU)) then - inherited; -end; - -function TcxCustomEdit.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or FDataBinding.ExecuteAction(Action); -end; - -procedure TcxCustomEdit.GetTabOrderList(List: TList); -begin - inherited GetTabOrderList(List); - if IsInplace and Visible then - List.Remove(Parent); -end; - -function TcxCustomEdit.IsInplace: Boolean; -begin - Result := FIsInplace; -end; - -function TcxCustomEdit.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or FDataBinding.UpdateAction(Action); -end; - -procedure TcxCustomEdit.Activate(var AEditData: TcxCustomEditData); -begin - if (AEditData = nil) and (GetEditDataClass <> nil) then - AEditData := GetEditDataClass.Create(Self); - FEditData := AEditData; - DoClearEditData(FEditData); - Visible := True; - if HandleAllocated and CanFocus then - begin - SetFocus; - if ActiveProperties.AutoSelect then - SelectAll; - end; - SynchronizeDisplayValue; - EditModified := False; - InplaceParams.MultiRowParent := True; -end; - -procedure TcxCustomEdit.ActivateByKey(Key: Char; var AEditData: TcxCustomEditData); -begin - LockInnerEditRepainting; - try - Activate(AEditData); - if SendActivationKey(Key) then - SendKeyPress(Self, Key); - finally - UnlockInnerEditRepainting; - end; -end; - -procedure TcxCustomEdit.ActivateByMouse(Shift: TShiftState; X, Y: Integer; - var AEditData: TcxCustomEditData); -var - P: TPoint; -begin - Activate(AEditData); - P := Parent.ClientToScreen(Point(X, Y)); - P := ScreenToClient(P); - if ssLeft in Shift then - begin - SendMouseEvent(Self, WM_MOUSEMOVE, [], P); - SendMouseEvent(Self, WM_LBUTTONDOWN, Shift, P); - if (GetCaptureControl = Self) and not(ssLeft in InternalGetShiftState) then - SetCaptureControl(nil); - end - else - SendMouseEvent(Self, WM_LBUTTONUP, Shift, P); - FDblClickTimer.Enabled := True; -end; - -function TcxCustomEdit.AreChangeEventsLocked: Boolean; -begin - Result := ChangeEventsCatcher.IsLocked; -end; - -function TcxCustomEdit.CanPostEditValue: Boolean; -begin - Result := not IsDesigning and DataBinding.CanPostEditorValue; -end; - -procedure TcxCustomEdit.Clear; -begin - EditValue := GetClearValue; -end; - -procedure TcxCustomEdit.CopyToClipboard; -begin -end; - -procedure TcxCustomEdit.CutToClipboard; -begin -end; - -function TcxCustomEdit.Deactivate: Boolean; - - procedure ForceConvertingDisplayValueToEditValue; - begin - KeyboardAction := False; - end; - -begin - FDblClickTimer.Enabled := False; - Result := False; - try - ForceConvertingDisplayValueToEditValue; - Result := ValidateEdit(True); - finally - if Result then - begin - SynchronizeDisplayValue; - IsEditValidated := True; - end; - end; -end; - -function TcxCustomEdit.DoEditing: Boolean; - - procedure DoOnEditing; - begin - if Assigned(FOnEditing) then - FOnEditing(Self, Result); - end; - - procedure StandaloneDoEditing; - begin - if not DataBinding.Editing then - begin - DoOnEditing; - if Result then - begin - LockEditValueChanging(True); - try - Result := DataBinding.SetEditMode; - finally - LockEditValueChanging(False); - end; - end; - end - else - begin - DoOnEditing; - if Result then - DataBinding.SetModified; - end; - end; - - procedure InplaceDoEditing; - begin - LockEditValueChanging(True); - try - DoOnEditing; - finally - LockEditValueChanging(False); - end; - end; - -begin - Result := InternalDoEditing; - if not Result then - Exit; - if DataBinding.Modified then - begin - Result := True; - Exit; - end; - Result := CanModify; - if not Result then - Exit; - - FEditModeSetting := True; - try - if IsInplace then - InplaceDoEditing - else - StandaloneDoEditing; - finally - FEditModeSetting := False; - end; -end; - -class function TcxCustomEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomEditProperties; -end; - -procedure TcxCustomEdit.PasteFromClipboard; -begin -end; - -procedure TcxCustomEdit.PostEditValue; -begin - if CanPostEditValue then - InternalPostEditValue(True) - else - if Focused then - InternalPostValue; -end; - -procedure TcxCustomEdit.PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); -begin -end; - -procedure TcxCustomEdit.Reset; -begin - DataBinding.Reset; -end; - -procedure TcxCustomEdit.SelectAll; -begin -end; - -function TcxCustomEdit.ValidateEdit(ARaiseExceptionOnError: Boolean): Boolean; -var - ADisplayValue: TcxEditValue; - AError: Boolean; - AErrorText: TCaption; -begin - if not (FModifiedAfterEnter and not FIsEditValidated and (FLockValidate = 0)) then - begin - Result := True; - Exit; - end; - - FIsEditValidating := True; - try - ADisplayValue := DisplayValue; - AError := False; - if ActiveProperties.CanValidate then - ActiveProperties.ValidateDisplayValue(ADisplayValue, AErrorText, AError, Self); - Result := not AError; - if AError then - try - if ARaiseExceptionOnError then - begin - HandleValidationError(AErrorText, True); - Application.ProcessMessages; - end; - finally - if not InternalCompareString(ADisplayValue, DisplayValue, True) then - begin - SetInternalDisplayValue(ADisplayValue); - if Visible then - begin - SelectAll; - if not IsEditClass then - UpdateDrawValue; - end; - end; - end - else - begin - if FKeyboardAction and not DoEditing then - Exit; - InternalValidateDisplayValue(ADisplayValue); - if not IsInplace and not Focused then - ModifiedAfterEnter := False; - FIsEditValidated := True; - end; - finally - FIsEditValidating := False; - end; -end; - -{$IFDEF DELPHI10} -function TcxCustomEdit.GetTextBaseLine: Integer; -begin - Result := 0; -end; - -function TcxCustomEdit.HasTextBaseLine: Boolean; -begin - Result := False; -end; -{$ENDIF} - -procedure TcxCustomEdit.CalculateAnchors; -begin - if [csLoading, csReading] * ComponentState <> [] then - Exit; - if UseAnchorX then - begin - if ActiveProperties.Alignment.Horz = taCenter then - FAnchorX := Left + Width div 2 + Integer(Width div 2 <> Width / 2) - else - FAnchorX := Left + Width; - end; - - if UseAnchorY then - begin - if ActiveProperties.Alignment.Vert = taVCenter then - FAnchorY := Top + Height div 2 + Integer(Height div 2 <> Height / 2) - else - FAnchorY := Top + Height; - end; -end; - -function TcxCustomEdit.CanContainerHandleTabs: Boolean; -begin - Result := False; -end; - -function TcxCustomEdit.CanResize(var NewWidth, NewHeight: Integer): Boolean; -begin - Result := inherited CanResize(NewWidth, NewHeight); - if Result and not IsLoading then - InternalCanResize(NewWidth, NewHeight); -end; - -procedure TcxCustomEdit.Click; -begin - if not IsDestroying and (FClickLockCount = 0) and - (not IsLoading or IsClickEnabledDuringLoading) then - inherited Click; -end; - -procedure TcxCustomEdit.DblClick; -var - P: TPoint; - AButton: TMouseButton; - AShiftState: TShiftState; -begin - P := ScreenToClient(InternalGetCursorPos); - if ButtonVisibleIndexAt(P) <> -1 then - begin - AButton := mbLeft; - AShiftState := InternalGetShiftState; - AShiftState := AShiftState + ButtonToShift(AButton); - MouseDown(AButton, AShiftState, P.X, P.Y); - Click; - end - else - inherited DblClick; -end; - -procedure TcxCustomEdit.DefineProperties(Filer: TFiler); - - function HasHeight: Boolean; - begin - Result := (Filer.Ancestor = nil) or (TcxCustomEdit(Filer.Ancestor).Height <> Height); - end; - - function HasWidth: Boolean; - begin - Result := (Filer.Ancestor = nil) or (TcxCustomEdit(Filer.Ancestor).Width <> Width); - end; - -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('Height', ReadHeight, WriteHeight, not CanAutoSize and HasHeight); - Filer.DefineProperty('Width', ReadWidth, WriteWidth, - not (CanAutoSize and CanAutoWidth) and HasWidth); - Filer.DefineProperty('AnchorX', ReadAnchorX, WriteAnchorX, UseAnchorX); - Filer.DefineProperty('AnchorY', ReadAnchorY, WriteAnchorY, UseAnchorY); -end; - -procedure TcxCustomEdit.DoEnter; -begin - if not IsDestroying then - begin - if not FValidateErrorProcessing then - DoShowEdit; - ShortRefreshContainer(False); - if Assigned(dxISpellChecker) then - dxISpellChecker.CheckStart(InnerControl); - end; -end; - -procedure TcxCustomEdit.DoExit; -var - APrevKeyboardAction: Boolean; -begin - APrevKeyboardAction := KeyboardAction; - KeyboardAction := False; - try - if Assigned(dxISpellChecker) then - dxISpellChecker.CheckFinish; - DoHideEdit(True); - finally - KeyboardAction := APrevKeyboardAction; - end; -end; - -function TcxCustomEdit.DoInnerControlDefaultHandler(var Message: TMessage): Boolean; -begin - Result := inherited DoInnerControlDefaultHandler(Message); - if not Result then - case Message.Msg of - WM_CUT: - begin - DataBinding.SetEditMode; - if not InnerEdit.CanProcessClipboardMessages then - begin - KeyboardAction := True; - try - if not InnerEdit.ReadOnly then - CutToClipboard - else - CopyToClipboard; - finally - KeyboardAction := False; - end; - Result := True; - end; - end; - WM_PASTE: - begin - DataBinding.SetEditMode; - if not InnerEdit.CanProcessClipboardMessages then - begin - if not InnerEdit.ReadOnly then - begin - KeyboardAction := True; - try - PasteFromClipboard; - finally - KeyboardAction := False; - end; - end; - Result := True; - end; - end; - WM_UNDO: - DataBinding.SetEditMode; - end; -end; - -function TcxCustomEdit.DoRefreshContainer(const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): Boolean; -var - AViewInfo: TcxCustomEditViewInfo; - R: TRect; - ARepaintDone: Boolean; -begin - if (FCaptureButtonVisibleIndex <> -1) and (GetCaptureControl <> Self) then - FCaptureButtonVisibleIndex := -1; - if AIsMouseEvent then - AViewInfo := TcxCustomEditViewInfo(TcxCustomEditProperties(Properties).GetViewInfoClass.Create) - else - AViewInfo := nil; - try - if AViewInfo <> nil then - AViewInfo.Assign(ViewInfo); - CalculateViewInfo(P, Button, Shift, AIsMouseEvent); - if HasInnerEdit and IsEditClass then - R := InnerEdit.Control.BoundsRect - else - R := cxEmptyRect; - - ARepaintDone := ViewInfo.Repaint(Self, R, AViewInfo); - if ARepaintDone or (AViewInfo = nil) then - begin - SetSize; - CalculateViewInfo(P, Button, Shift, AIsMouseEvent); - SetShadowRegion; - if AViewInfo <> nil then - ProcessViewInfoChanges(AViewInfo, Button <> cxmbNone); - end; - finally - AViewInfo.Free; - end; - Result := True; -end; - -procedure TcxCustomEdit.FocusChanged; -var - AFocused: Boolean; -begin - if IsDestroying or FValidateErrorProcessing then - Exit; - AFocused := Focused and Application.Active; - if FFocused = AFocused then - Exit; - FFocused := not FFocused; - inherited FocusChanged; - DoFocusChanged; -end; - -function TcxCustomEdit.GetBorderExtent: TRect; -begin - Result.Left := ViewInfo.ShadowRect.Left - ViewInfo.Bounds.Left; - Result.Right := ViewInfo.Bounds.Right - ViewInfo.ShadowRect.Right; - Result.Top := ViewInfo.ShadowRect.Top - ViewInfo.Bounds.Top; - Result.Bottom := ViewInfo.Bounds.Bottom - ViewInfo.ShadowRect.Bottom; -end; - -function TcxCustomEdit.GetEditStateColorKind: TcxEditStateColorKind; -begin - Result := inherited GetEditStateColorKind; - if (Result <> esckDisabled) and Properties.ReadOnly then - Result := esckReadOnly; -end; - -function TcxCustomEdit.GetStyleClass: TcxContainerStyleClass; -begin - Result := GetPropertiesClass.GetStyleClass; -end; - -function TcxCustomEdit.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomEditPropertiesClass(GetPropertiesClass).GetViewInfoClass; -end; - -function TcxCustomEdit.InternalGetNotPublishedStyleValues: - TcxEditStyleValues; -begin - Result := [svButtonStyle, svButtonTransparency, svGradient, svGradientButtons, - svGradientDirection, svPopupBorderStyle]; -end; - -function TcxCustomEdit.IsTransparentBackground: Boolean; -begin - Result := IsNativeBackground or IsTransparent; -end; - -procedure TcxCustomEdit.KeyDown(var Key: Word; Shift: TShiftState); -begin - FIsEditValueResetting := False; - FIsEscapeDown := Key = VK_ESCAPE; - try - if not IsEditorKey(Key, Shift) then - inherited KeyDown(Key, Shift); - if Key <> 0 then - DoEditKeyDown(Key, Shift); - if (Key <> 0) and NeedsInvokeAfterKeyDown(Key, Shift) then - DoAfterKeyDown(Key, Shift); - finally - FIsEscapeDown := False; - end; -end; - -procedure TcxCustomEdit.KeyPress(var Key: Char); -begin - if (Word(Key) = VK_ESCAPE) and FIsEditValueResetting then - begin - FIsEditValueResetting := False; - Key := #0; - Exit; - end; - - inherited KeyPress(Key); - if Key <> #0 then - DoEditKeyPress(Key); - if (Key <> #0) and Assigned(dxISpellChecker) then - dxISpellChecker.KeyPress(Key); -end; - -procedure TcxCustomEdit.KeyUp(var Key: Word; Shift: TShiftState); -begin - inherited KeyUp(Key, Shift); - if Key <> 0 then - DoEditKeyUp(Key, Shift); -end; - -procedure TcxCustomEdit.Loaded; -begin - FIsFirstSetSize := True; - inherited Loaded; - LockChangeEvents(True); - LockClick(True); - try - DataBinding.UpdateNotConnectedDBEditDisplayValue; - ShortRefreshContainer(False); -// SetSize; - if FRepositoryItem = nil then - Properties.OnPropertiesChanged := PropertiesChanged; - PropertiesChanged(ActiveProperties); - ViewInfo.Shadow := False; - ContainerStyleChanged(FStyles.Style); // TODO remove - finally - LockClick(False); - LockChangeEvents(False, False); - end; -end; - -procedure TcxCustomEdit.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -const - AMouseMessages: array[TMouseButton] of UINT = - (WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_MBUTTONDOWN); -var - AButtonVisibleIndex: Integer; - AControl: TWinControl; - P: TPoint; -begin - if (Button = mbLeft) and FDblClickTimer.Enabled then - begin - FDblClickTimer.Enabled := False; - if ButtonVisibleIndexAt(ScreenToClient(InternalGetCursorPos)) = -1 then - DblClick; - end; - - inherited MouseDown(Button, Shift, X, Y); - P := InternalGetCursorPos; - if HandleAllocated and (WindowFromPoint(P) = Handle) then - begin - AControl := FindControl(WindowFromPoint(P)); - if (AControl <> nil) and (AControl <> Self) then - begin - P := AControl.ScreenToClient(P); - CallWindowProc(TWinControlAccess(AControl).DefWndProc, AControl.Handle, - AMouseMessages[Button], ShiftStateToKeys(InternalGetShiftState), - MakeLong(P.X, P.Y)); - end; - end; - - if (Button = mbLeft) and (GetCaptureControl = Self) then - begin - AButtonVisibleIndex := ButtonVisibleIndexAt(Point(X, Y)); - if (AButtonVisibleIndex <> -1) and - (ViewInfo.ButtonsInfo[AButtonVisibleIndex].Data.State = ebsPressed) then - FCaptureButtonVisibleIndex := AButtonVisibleIndex; - end; -end; - -procedure TcxCustomEdit.MouseLeave(AControl: TControl); -//var -// I: Integer; -begin - inherited MouseLeave(AControl); -// for I := 0 to Length(ViewInfo.ButtonsInfo) - 1 do -// with ViewInfo.ButtonsInfo[I] do -// if Data.State = ebsSelected then -// begin -// Data.State := ebsNormal; -// InvalidateRect(Bounds, HasBackground); -// end; -end; - -procedure TcxCustomEdit.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = FRepositoryItem) then - RepositoryItem := nil; -end; - -procedure TcxCustomEdit.Paint; -begin - if IsDBEditPaintCopyDrawing then - PaintCopyDraw - else - begin - CheckIsViewInfoCalculated; - ViewInfo.Paint(Canvas); - end; -end; - -procedure TcxCustomEdit.ReadState(Reader: TReader); -begin - TcxCustomEditProperties(FProperties).OnPropertiesChanged := nil; - inherited ReadState(Reader); -end; - -procedure TcxCustomEdit.RequestAlign; -begin - inherited RequestAlign; - ShortRefreshContainer(False); -end; - -procedure TcxCustomEdit.SetName(const Value: TComponentName); -begin - inherited SetName(Value); - DataBinding.UpdateNotConnectedDBEditDisplayValue; -end; - -procedure TcxCustomEdit.SetParent(AParent: TWinControl); -begin - if FIsJustCreated and (AParent <> nil) then - begin - FIsJustCreated := False; - DataBinding.UpdateNotConnectedDBEditDisplayValue; - PropertiesChanged(Properties); - DataBinding.UpdateDisplayValue; - end; - inherited SetParent(AParent); -end; - -procedure TcxCustomEdit.SetSize; - - procedure CalculateLeftTop(var ALeft, ATop: Integer; ANewWidth, ANewHeight: Integer); - begin - ALeft := Left; - ATop := Top; - if UseAnchors and IsAutoWidth then - begin - if not FIsFirstSetSize then - CalculateAnchors; - FIsFirstSetSize := False; - if UseAnchorX and (AnchorX <> MaxInt) then - begin - if ActiveProperties.Alignment.Horz = taCenter then - ALeft := AnchorX - ANewWidth div 2 - Integer((ANewWidth div 2) <> (ANewWidth / 2)) - else - ALeft := AnchorX - ANewWidth; - end; - if UseAnchorY and (AnchorY <> MaxInt) then - begin - if ActiveProperties.Alignment.Vert = taVCenter then - ATop := AnchorY - ANewHeight div 2 - Integer((ANewHeight div 2) <> (ANewHeight / 2)) - else - ATop := AnchorY - ANewHeight; - end; - end; - end; - -var - ANewHeight, ANewWidth: Integer; - ALeft, ATop: Integer; -begin - if HandleAllocated and not IsDestroying then - begin - ANewWidth := Width; - ANewHeight := Height; - InternalCanResize(ANewWidth, ANewHeight); - CalculateLeftTop(ALeft, ATop, ANewWidth, ANewHeight); - SetBounds(ALeft, ATop, ANewWidth, ANewHeight); - AdjustInnerEditPosition; - end; -end; - -procedure TcxCustomEdit.CreateHandle; -begin - inherited CreateHandle; - if HasInnerEdit and inherited Focused then - InnerEdit.SafelySetFocus; -end; - -function TcxCustomEdit.IsNativeStyle: Boolean; -begin - Result := Properties.GetViewDataClass.IsNativeStyle(Style.LookAndFeel); -end; - -procedure TcxCustomEdit.SafeSelectionFocusInnerControl; -begin - InnerEdit.SafelySetFocus; -end; - -procedure TcxCustomEdit.AdjustInnerEditPosition; -var - R: TRect; -begin - if not HasInnerEdit then - Exit; - R := ViewInfo.ClientRect; - with R do - InnerEdit.Control.SetBounds(Left, Top, Right - Left, Bottom - Top); - AlignControls(InnerEdit.Control, R); -end; - -procedure TcxCustomEdit.AfterPosting; -begin - FIsPosting := False; -end; - -procedure TcxCustomEdit.BeforePosting; -begin - FIsPosting := True; -end; - -function TcxCustomEdit.ButtonVisibleIndexAt(const P: TPoint): Integer; -var - I: Integer; -begin - Result := -1; - with ViewInfo do - for I := 0 to Length(ButtonsInfo) - 1 do - if PtInRect(ButtonsInfo[I].Bounds, P) then - begin - Result := I; - Break; - end; -end; - -procedure TcxCustomEdit.CalculateViewInfo(AIsMouseEvent: Boolean); -var - P: TPoint; -begin - P := ScreenToClient(InternalGetCursorPos); - CalculateViewInfo(P, cxmbNone, InternalGetShiftState, False); -end; - -procedure TcxCustomEdit.CalculateViewInfo(P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AIsMouseEvent: Boolean); -var - AViewData: TcxCustomEditViewData; -begin - AViewData := TcxCustomEditViewData(CreateViewData); - try - AViewData.Calculate(Canvas, GetControlRect(Self), P, Button, Shift, - ViewInfo, AIsMouseEvent); - finally - FreeAndNil(AViewData); - end; -end; - -function TcxCustomEdit.CanAutoSize: Boolean; -begin - Result := not IsInplace and AutoSize; -end; - -function TcxCustomEdit.CanAutoWidth: Boolean; -begin - Result := ActiveProperties.ButtonsViewStyle = bvsButtonsAutoWidth; -end; - -function TcxCustomEdit.CanKeyDownModifyEdit(Key: Word; Shift: TShiftState): Boolean; -begin - Result := False; -end; - -function TcxCustomEdit.CanKeyPressModifyEdit(Key: Char): Boolean; -begin - Result := False; -end; - -function TcxCustomEdit.CanModify: Boolean; -begin - if IsInplace then - Result := ActiveProperties.CanModify - else - with ActiveProperties do - begin - Result := AssignedValues.ReadOnly and not FReadOnly; - if not Result then - begin - Result := not AssignedValues.ReadOnly or not FReadOnly; - Result := Result and DataBinding.IDefaultValuesProvider.DefaultCanModify and - DataBinding.IDefaultValuesProvider.CanSetEditMode; - end; - end; -end; - -procedure TcxCustomEdit.ChangeHandler(Sender: TObject); -begin - if Focused then - ModifiedAfterEnter := True - else - if not ActiveProperties.IsChanging then - DataBinding.SetModified; - DoChange; -end; - -procedure TcxCustomEdit.CheckHandle; -begin - if not (FHandleAllocating or HandleAllocated or IsDestroying) and CanAllocateHandle(Self) then - begin - FHandleAllocating := True; - try - HandleNeeded; - finally - FHandleAllocating := False; - end; - end; -end; - -function TcxCustomEdit.CreateInnerEdit: IcxCustomInnerEdit; -var - AIInnerEditHelper: IcxInnerEditHelper; - AInnerEdit: TControl; - AInnerEditClass: TControlClass; -begin - AInnerEditClass := GetInnerEditClass; - if AInnerEditClass <> nil then - begin - AInnerEdit := AInnerEditClass.Create(Self); - if Supports(AInnerEdit, IcxInnerEditHelper, AIInnerEditHelper) then - Result := AIInnerEditHelper.GetHelper - else - Supports(AInnerEdit, IcxCustomInnerEdit, Result) - end - else - Result := nil; -end; - -function TcxCustomEdit.CreateViewData: TcxCustomEditViewData; -begin - Result := ActiveProperties.CreateViewData(ActiveStyle, IsInplace); - if FIsContentParamsInitialized and IsInplace then - Result.EditContentParams := ContentParams; - if PropertiesChangeLocked then - Result.Edit := nil - else - Result.Edit := Self; - if HandleAllocated then - Result.WindowHandle := Handle - else - Result.WindowHandle := 0; - InitializeViewData(Result); -end; - -procedure TcxCustomEdit.DefaultButtonClick; -begin - if GetDefaultButtonVisibleIndex <> -1 then - DoButtonClick(GetDefaultButtonVisibleIndex); -end; - -procedure TcxCustomEdit.DisableValidate; -begin - Inc(FLockValidate); -end; - -procedure TcxCustomEdit.DoAfterKeyDown(var Key: Word; Shift: TShiftState); -begin - if Assigned(FOnAfterKeyDown) then - FOnAfterKeyDown(Self, Key, Shift); -end; - -procedure TcxCustomEdit.DoAutoSizeChanged; -begin -end; - -procedure TcxCustomEdit.DoButtonClick(AButtonVisibleIndex: Integer); -begin - with Properties do - if Assigned(FOnButtonClick) then - FOnButtonClick(Self, ViewInfo.ButtonsInfo[AButtonVisibleIndex].Index); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(FOnButtonClick) then - FOnButtonClick(Self, ViewInfo.ButtonsInfo[AButtonVisibleIndex].Index); -end; - -procedure TcxCustomEdit.DoButtonDown(AButtonVisibleIndex: Integer); -begin -end; - -procedure TcxCustomEdit.DoButtonUp(AButtonVisibleIndex: Integer); -begin -end; - -procedure TcxCustomEdit.DoChange; -begin - if IsLoading or IsDestroying then - Exit; - if IsOnChangeEventAssigned then - if AreChangeEventsLocked then - FChangeEventsCatcher.OnChangeEvent := True - else - begin - if IsInplace then - begin - SaveModified; - FModified := True; - SetModifiedAfterEnterValue(True); - end; - try - DoOnChange; - finally - if IsInplace then - RestoreModified; - end; - end; - if not ActiveProperties.HasDisplayValue and not ActiveProperties.CanCompareEditValue then - DoEditValueChanged; -end; - -procedure TcxCustomEdit.DoClick; -begin - ModifiedAfterEnter := True; - if FClickLockCount = 0 then - Click; -end; - -procedure TcxCustomEdit.DoClosePopup(AReason: TcxEditCloseUpReason); -begin - with Properties do - if Assigned(OnClosePopup) then - OnClosePopup(Self, AReason); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnClosePopup) then - OnClosePopup(Self, AReason); -end; - -procedure TcxCustomEdit.DoEditValueChanged; -begin - if IsLoading or IsDestroying then - Exit; - if IsOnEditValueChangedEventAssigned then - if AreChangeEventsLocked then - FChangeEventsCatcher.OnEditValueChangedEvent := True - else - begin - if IsInplace then - begin - SaveModified; - FModified := True; - SetModifiedAfterEnterValue(True); - end; - try - DoOnEditValueChanged; - finally - if IsInplace then - RestoreModified; - end; - end; -end; - -procedure TcxCustomEdit.DoEditKeyDown(var Key: Word; Shift: TShiftState); - - procedure CheckClearKey(AShortCut: TShortCut); - begin - if AShortCut = ActiveProperties.ClearKey then - begin - LockChangeEvents(True); - KeyboardAction := True; - try - InternalEditValue := GetClearValue; - if ActiveProperties.ImmediatePost and CanPostEditValue then - InternalPostEditValue; - IsEditValidated := True; - finally - KeyboardAction := False; - LockChangeEvents(False); - end; - Key := 0; - end; - end; - - procedure CheckClickKey(AShortCut: TShortCut); - begin - if (GetDefaultButtonVisibleIndex <> -1) and (AShortCut = ActiveProperties.ClickKey) then - begin - KillMessages(Handle, WM_CHAR, WM_CHAR, False); - DefaultButtonClick; - Key := 0; - end; - end; - -var - AShortCut: TShortCut; -begin - if Key = 0 then - Exit; - AShortCut := ShortCut(Key, Shift); - - CheckClearKey(AShortCut); - if Key = 0 then - Exit; - - CheckClickKey(AShortCut); - if Key = 0 then - Exit; - - if not ValidateKeyDown(Key, Shift) then - begin - DoAfterKeyDown(Key, Shift); - Key := 0; - Exit; - end; - - case Key of - VK_ESCAPE: - begin - if FModifiedAfterEnter and IsResetEditClass then - begin - LockChangeEvents(True); - try - DataBinding.Reset; - EditModified := True; - finally - LockChangeEvents(False); - end; - FIsEditValueResetting := True; - Key := 0; - end; - end; - VK_TAB: - if Focused and (Shift * [ssAlt, ssCtrl] = []) and not ActiveProperties.InnerEditNeedsTabs then - begin - DoEditProcessTab(Shift); - DoAfterKeyDown(Key, Shift); - if Key = 0 then - Exit; - Key := 0; - if GetParentForm(Self) <> nil then - TWinControlAccess(GetParentForm(Self)).SelectNext(GetParentForm(Self).ActiveControl, - not(ssShift in Shift), True); - if HandleAllocated and HasInnerEdit and (GetFocus = Handle) then - InnerEdit.SafelySetFocus; - end; - VK_RETURN: - if ActiveProperties.ValidateOnEnter then - begin - Key := 0; - LockChangeEvents(True); - try - if ValidateEdit(True) and CanPostEditValue then - InternalPostEditValue; - finally - LockChangeEvents(False); - end; - end; - end; - - if not WantNavigationKeys then - case Key of - VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN, VK_HOME, VK_END, VK_PRIOR, VK_NEXT: - begin - DoAfterKeyDown(Key, Shift); - Key := 0; - end; - end; -end; - -procedure TcxCustomEdit.DoEditKeyPress(var Key: Char); -begin - ValidateKeyPress(Key); -end; - -procedure TcxCustomEdit.DoEditKeyUp(var Key: Word; Shift: TShiftState); -begin -end; - -procedure TcxCustomEdit.DoEditProcessTab(Shift: TShiftState); -begin -end; - -procedure TcxCustomEdit.DoFocusChanged; - - function NeedValidate: Boolean; - var - AParentForm: TCustomForm; - begin - AParentForm := GetParentForm(Self); - Result := (AParentForm <> nil) and not AParentForm.Visible and - (fsModal in AParentForm.FormState) and not (AParentForm.ModalResult in [mrNone, mrCancel]); - end; - -begin - UpdateDrawValue; - if NeedValidate then - ValidateEdit(False); -end; - -procedure TcxCustomEdit.DoHideEdit(AExit: Boolean); -begin - if IsDestroying or FValidateErrorProcessing then - Exit; - SaveModified; - try - LockChangeEvents(True); - try - if not ValidateEdit(True) then - Exit; - if not IsInplace and CanPostEditValue then - InternalPostEditValue; - finally - LockChangeEvents(False); - end; - if UpdateContentOnFocusChanging then - DataBinding.UpdateDisplayValue; - UpdateDrawValue; - ShortRefreshContainer(False); - RestoreModified; - try - if AExit then - inherited DoExit; - finally - ModifiedAfterEnter := False; - SaveModified; - end; - finally - RestoreModified; - end; -end; - -procedure TcxCustomEdit.DoOnValidate(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var AError: Boolean); -begin - with Properties do - if Assigned(OnValidate) then - OnValidate(Self, ADisplayValue, AErrorText, AError); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnValidate) then - OnValidate(Self, ADisplayValue, AErrorText, AError); -end; - -procedure TcxCustomEdit.DoOnChange; -begin - with Properties do - if Assigned(OnChange) then - OnChange(Self); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnChange) then - OnChange(Self); -end; - -procedure TcxCustomEdit.DoOnEditValueChanged; -begin - with Properties do - if Assigned(OnEditValueChanged) then - OnEditValueChanged(Self); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnEditValueChanged) then - OnEditValueChanged(Self); -end; - -procedure TcxCustomEdit.DoPostEditValue; -begin - if Assigned(FOnPostEditValue) then - FOnPostEditValue(Self); -end; - -procedure TcxCustomEdit.DoShowEdit; -begin - SaveModified; - try - inherited DoEnter; - if UpdateContentOnFocusChanging then - DataBinding.UpdateDisplayValue; - if ActiveProperties.IsResetEditClass then - PrevEditValue := EditValue; - if UpdateContentOnFocusChanging then - SynchronizeDisplayValue; - finally - RestoreModified; - SetModifiedAfterEnterValue(False); - end; -end; - -procedure TcxCustomEdit.EditingChanged; -begin - UpdateInnerEditReadOnly; -end; - -procedure TcxCustomEdit.EnableValidate; -begin - Dec(FLockValidate); -end; - -procedure TcxCustomEdit.FillSizeProperties(var AEditSizeProperties: TcxEditSizeProperties); -begin - AEditSizeProperties := DefaultcxEditSizeProperties; - AEditSizeProperties.MaxLineCount := 1; - if IsAutoWidth then - AEditSizeProperties.Width := MaxInt - else - AEditSizeProperties.Width := Width; -end; - -function TcxCustomEdit.GetClearValue: TcxEditValue; -begin - Result := Null; -end; - -class function TcxCustomEdit.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxEditDataBinding; -end; - -function TcxCustomEdit.GetDefaultButtonVisibleIndex: Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Length(ViewInfo.ButtonsInfo) - 1 do - if ViewInfo.ButtonsInfo[I].Data.Default then - begin - Result := I; - Break; - end; -end; - -function TcxCustomEdit.GetDisplayValue: string; -begin - Result := ''; -end; - -function TcxCustomEdit.GetEditDataClass: TcxCustomEditDataClass; -begin - Result := nil; -end; - -function TcxCustomEdit.GetEditingValue: TcxEditValue; -begin - if Focused and not IsEditValidated and ModifiedAfterEnter then - Result := InternalGetEditingValue - else - Result := EditValue; -end; - -function TcxCustomEdit.GetInnerEditClass: TControlClass; -begin - Result := nil; -end; - -function TcxCustomEdit.HandleMouseWheel(Shift: TShiftState): Boolean; -begin - Result := not IsInplace or ActiveProperties.UseMouseWheel or ([ssCtrl] * Shift <> []); -end; - -procedure TcxCustomEdit.HandleValidationError(const AErrorText: string; - ACanAbortExecution: Boolean); -var - AControl: TWinControl; -begin - if not CanFocus then - IsEditValidated := True - else - if Visible then - begin - if not Focused then - begin - if HasInnerEdit then - AControl := InnerEdit.Control - else - AControl := Self; - FValidateErrorProcessing := True; - try - AControl.SetFocus; - finally - FValidateErrorProcessing := False; - end; - end; - SelectAll; - end; - if ActiveProperties.BeepOnError then - Beep; - if AErrorText <> '' then - raise EcxEditValidationError.Create(AErrorText) - else - if ACanAbortExecution then - Abort; -end; - -function TcxCustomEdit.HasInnerEdit: Boolean; -begin - Result := Assigned(InnerEdit); -end; - -procedure TcxCustomEdit.Initialize; - - procedure CreateDblClickTimer; - begin - FDblClickTimer := TcxTimer.Create(nil); - with FDblClickTimer do - begin - Enabled := False; - Interval := GetDblClickInterval; - OnTimer := DblClickTimerHandler; - end; - end; - -begin - FChangeEventsCatcher := TcxEditChangeEventsCatcher.Create(Self); - FProperties := GetPropertiesClass.Create(Self); - InitContentParams; - - ControlStyle := ControlStyle + [csSetCaption, csCaptureMouse]; - TabStop := True; - - FInnerEdit := CreateInnerEdit; - if HasInnerEdit then - begin - InitializeInnerEdit; - InnerControl := FInnerEdit.Control; - end; - SetReplicatableFlag; - - FDataBinding := GetDataBindingClass.Create(Self); - - FAutoSize := not IsInplace; - FCaptureButtonVisibleIndex := -1; - FEditValue := Null; - FLockValidate := 0; - FUpdate := False; - - Properties.OnPropertiesChanged := PropertiesChanged; - - if IsInplace then - begin - Keys := Keys + [kAll, kArrows]; - if GetInnerEditClass = nil then - Keys := Keys + [kTab]; - end; - CreateDblClickTimer; - if not IsInplace then - Properties.FIDefaultValuesProvider := FDataBinding.IDefaultValuesProvider; - - ViewInfo.FEdit := Self; - FIsJustCreated := True; -end; - -procedure TcxCustomEdit.InitializeEditData; -begin -end; - -procedure TcxCustomEdit.InitializeInnerEdit; -begin - InnerEdit.Parent := Self; - if ActiveProperties.HasDisplayValue then - InnerEdit.OnChange := ChangeHandler; - TControlAccess(InnerEdit.Control).ParentShowHint := False; -end; - -procedure TcxCustomEdit.InitializeViewData(AViewData: TcxCustomEditViewData); -begin - AViewData.Enabled := Enabled; - AViewData.Focused := Focused; - if HScrollBarVisible then - AViewData.HScrollBar := HScrollBar - else - AViewData.HScrollBar := nil; - AViewData.InnerEdit := InnerEdit; - AViewData.IsDesigning := IsDesigning; - if VScrollBarVisible then - AViewData.VScrollBar := VScrollBar - else - AViewData.VScrollBar := nil; -end; - -function TcxCustomEdit.InternalDoEditing: Boolean; -begin - Result := True; -end; - -function TcxCustomEdit.InternalFocused: Boolean; -begin - Result := not ActiveProperties.IsEditValueConversionDependOnFocused or Focused; -end; - -function TcxCustomEdit.IsChildWindow(AWnd: THandle): Boolean; -begin - Result := cxContainer.IsChildWindow(Self, AWnd); -end; - -function TcxCustomEdit.IsEditClass: Boolean; -begin - Result := False; -end; - -function TcxCustomEdit.IsRepositoryItemAcceptable( - ARepositoryItem: TcxEditRepositoryItem): Boolean; -begin - Result := (ARepositoryItem = nil) or - ARepositoryItem.ArePropertiesCompatible(GetPropertiesClass); -end; - -procedure TcxCustomEdit.LockChangeEvents(ALock: Boolean; AInvokeChangedOnUnlock: Boolean = True); -begin - ChangeEventsCatcher.Lock(ALock, AInvokeChangedOnUnlock); -end; - -procedure TcxCustomEdit.LockClick(ALock: Boolean); -begin - if ALock then - Inc(FClickLockCount) - else - if FClickLockCount > 0 then - Dec(FClickLockCount); -end; - -procedure TcxCustomEdit.LockEditValueChanging(ALock: Boolean); -begin - if ALock then - Inc(FEditValueChangingLockCount) - else - if FEditValueChangingLockCount > 0 then - Dec(FEditValueChangingLockCount); -end; - -function TcxCustomEdit.InternalGetActiveProperties: TcxCustomEditProperties; -begin - if FRepositoryItem = nil then - Result := FProperties - else - begin - Result := FRepositoryItem.Properties; - Result.FIDefaultValuesProvider := DataBinding.IDefaultValuesProvider; - end; -end; - -function TcxCustomEdit.InternalGetEditingValue: TcxEditValue; -begin - Result := EditValue; -end; - -procedure TcxCustomEdit.InternalPostEditValue(AValidateEdit: Boolean = False); -var - APrevKeyboardAction: Boolean; -begin - if AValidateEdit then - begin - APrevKeyboardAction := KeyboardAction; - KeyboardAction := False; - try - if not ValidateEdit(True) then - Exit; - finally - KeyboardAction := APrevKeyboardAction; - end; - end; - - try - BeforePosting; - try - if IsInplace then - begin - DoPostEditValue; - EditModified := False; - end - else - if DataBinding.Modified then - DataBinding.StoredValue := EditValue; - finally - AfterPosting; - end; - except - if not IsInplace then - begin - HandleValidationError('', False); - raise; - end; - end; -end; - -procedure TcxCustomEdit.InternalPostValue; -begin - if DoEditing then - begin - ModifiedAfterEnter := True; - try - IsEditValidated := True; - InternalPostEditValue(False); - finally - ModifiedAfterEnter := False; - end; - end; -end; - -procedure TcxCustomEdit.InternalSetDisplayValue(const Value: TcxEditValue); -begin -end; - -procedure TcxCustomEdit.InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); -var - AEditValueChanged: Boolean; -begin - if FKeyboardAction and not DoEditing then - Exit; - AEditValueChanged := False; - if ActiveProperties.CanCompareEditValue then - AEditValueChanged := not cxEditVarEquals(Value, FEditValue); - FEditValue := Value; - SynchronizeDisplayValue; - if FKeyboardAction then - ModifiedAfterEnter := True - else - EditModified := False; - if AEditValueChanged then - begin - DoEditValueChanged; - if not ActiveProperties.HasDisplayValue then - DoChange; - end; -end; - -procedure TcxCustomEdit.InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); -begin - SaveModified; - InternalSetDisplayValue(ADisplayValue); - RestoreModified; -end; - -function TcxCustomEdit.IsActiveControl: Boolean; -var - AParentForm: TCustomForm; -begin - Result := Focused; - if Result then - Exit; - AParentForm := GetParentForm(Self); - if AParentForm <> nil then - begin - Result := AParentForm.ActiveControl = Self; - Result := Result or HasInnerEdit and (AParentForm.ActiveControl = InnerEdit.Control); - end; -end; - -function TcxCustomEdit.IsButtonDC(ADC: THandle): Boolean; -begin - Result := False; -end; - -function TcxCustomEdit.IsClickEnabledDuringLoading: Boolean; -begin - Result := False; -end; - -function TcxCustomEdit.IsDBEdit: Boolean; -begin - Result := DataBinding.IDefaultValuesProvider.IsDataStorage; -end; - -function TcxCustomEdit.IsDBEditPaintCopyDrawing: Boolean; -begin - Result := IsDBEdit and (csPaintCopy in ControlState); -end; - -function TcxCustomEdit.IsEditorKey(Key: Word; Shift: TShiftState): Boolean; -begin - Result := (GetDefaultButtonVisibleIndex <> -1) and - (ShortCut(Key, Shift) = ActiveProperties.ClickKey); -end; - -function TcxCustomEdit.IsEditValueStored: Boolean; -begin - Result := not VarIsNull(EditValue); -end; - -function TcxCustomEdit.IsNativeBackground: Boolean; -begin - Result := False; -end; - -function TcxCustomEdit.IsOnChangeEventAssigned: Boolean; -begin - Result := Assigned(Properties.OnChange) or - Assigned(ActiveProperties.OnChange); -end; - -function TcxCustomEdit.IsOnEditValueChangedEventAssigned: Boolean; -begin - Result := Assigned(Properties.OnEditValueChanged) or - Assigned(ActiveProperties.OnEditValueChanged); -end; - -function TcxCustomEdit.IsOnValidateEventAssigned: Boolean; -begin - Result := Assigned(Properties.OnValidate) or - Assigned(ActiveProperties.OnValidate); -end; - -function TcxCustomEdit.IsResetEditClass: Boolean; -begin - Result := IsDBEdit or ActiveProperties.IsResetEditClass; -end; - -function TcxCustomEdit.IsSpecialKey(Key: Word; Shift: TShiftState): Boolean; -var - AShortCut: TShortCut; -begin - AShortCut := ShortCut(Key, Shift); - Result := (ShortCut(Key, Shift) = ActiveProperties.ClearKey) or - (GetDefaultButtonVisibleIndex <> -1) and (AShortCut = ActiveProperties.ClickKey); -end; - -function TcxCustomEdit.IsTransparent: Boolean; -begin - Result := not IsInplace and Transparent; -end; - -function TcxCustomEdit.IsValidChar(AChar: Char): Boolean; -begin - with ActiveProperties do - Result := (IDefaultValuesProvider = nil) or - IDefaultValuesProvider.IsValidChar(AChar) or - IDefaultValuesProvider.IsOnSetTextAssigned; -end; - -function TcxCustomEdit.NeedsInvokeAfterKeyDown(AKey: Word; - AShift: TShiftState): Boolean; -begin - Result := False; -end; - -procedure TcxCustomEdit.PaintCopyDraw; -var - AViewInfo: TcxCustomEditViewInfo; - AViewData: TcxCustomEditViewData; -begin - SetVisibleBoundsClipRect; - AViewInfo := TcxCustomEditViewInfo(Properties.GetViewInfoClass.Create); - AViewInfo.FEdit := Self; - AViewData := TcxCustomEditViewData(CreateViewData); - AViewData.EditValueToDrawValue(Canvas, DataBinding.StoredValue, AViewInfo); - AViewData.Calculate(Canvas, GetControlRect(Self), Point(-1, -1), cxmbNone, - [], AViewInfo, False); - AViewInfo.Paint(Canvas); - FreeAndNil(AViewInfo); - FreeAndNil(AViewData); - Canvas.ExcludeClipRect(GetControlRect(Self)); -end; - -procedure TcxCustomEdit.PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); -begin - ActiveProperties.PrepareDisplayValue(AEditValue, DisplayValue, AEditFocused); -end; - -procedure TcxCustomEdit.ProcessViewInfoChanges(APrevViewInfo: TcxCustomEditViewInfo; AIsMouseDownUpEvent: Boolean); -begin - if (APrevViewInfo.PressedButton <> ViewInfo.PressedButton) or - (APrevViewInfo.SelectedButton <> ViewInfo.SelectedButton) then - begin - if APrevViewInfo.PressedButton <> -1 then - if APrevViewInfo.PressedButton = ViewInfo.SelectedButton then - begin - DoButtonUp(APrevViewInfo.PressedButton); - DoButtonClick(APrevViewInfo.PressedButton); - end - else - DoButtonUp(APrevViewInfo.PressedButton); - if (ViewInfo.PressedButton <> -1) and (APrevViewInfo.PressedButton = -1) then - DoButtonDown(ViewInfo.PressedButton); - end; -end; - -procedure TcxCustomEdit.PropertiesChanged(Sender: TObject); -begin - FIsEditValidated := False; - UpdateInnerEditReadOnly; - if ModifiedAfterEnter and RealReadOnly then - ModifiedAfterEnter := False; - if ActiveProperties.Transparent then - Transparent := True; - CalculateAnchors; - ShortRefreshContainer(False); -end; - -function TcxCustomEdit.PropertiesChangeLocked: Boolean; -begin - Result := not IsDestroying; - if Result then - Result := (GetInnerEditClass = nil) or (InnerEdit <> nil); - Result := not Result; -end; - -function TcxCustomEdit.RealReadOnly: Boolean; -begin - Result := ActiveProperties.ReadOnly or DataBinding.IsInnerControlHaveToBeReadOnly; -end; - -procedure TcxCustomEdit.RepositoryItemAssigned; -begin -end; - -procedure TcxCustomEdit.RepositoryItemAssigning; -begin -end; - -procedure TcxCustomEdit.ResetEditValue; -begin - if FModifiedAfterEnter and ActiveProperties.IsResetEditClass then - begin - LockChangeEvents(True); - try - SetModifiedAfterEnterValue(False); - if IsDBEdit then - InternalEditValue := DataBinding.StoredValue - else - InternalEditValue := FPrevEditValue; - EditModified := True; - SelectAll; - if ActiveProperties.ImmediatePost and CanPostEditValue then - InternalPostEditValue; - finally - LockChangeEvents(False); - end; - end; -end; - -procedure TcxCustomEdit.RestoreModified; -begin - with FPrevModifiedList[Length(FPrevModifiedList) - 1] do - begin - FModified := Modified; - SetModifiedAfterEnterValue(ModifiedAfterEnter); - end; - SetLength(FPrevModifiedList, Length(FPrevModifiedList) - 1); -end; - -procedure TcxCustomEdit.SaveModified; -begin - SetLength(FPrevModifiedList, Length(FPrevModifiedList) + 1); - with FPrevModifiedList[Length(FPrevModifiedList) - 1] do - begin - Modified := FModified; - ModifiedAfterEnter := FModifiedAfterEnter; - end; -end; - -function TcxCustomEdit.SendActivationKey(Key: Char): Boolean; -begin - Result := True; -end; - -function TcxCustomEdit.SetDisplayText(const Value: string): Boolean; -begin - Result := False; -end; - -procedure TcxCustomEdit.SetEditAutoSize(Value: Boolean); -begin - if (Value <> FAutoSize) and not IsInplace then - begin - FAutoSize := Value; - DoAutoSizeChanged; - if Value then - begin - CheckHandle; - SetSize; - ShortRefreshContainer(False); - end; - end; -end; - -procedure TcxCustomEdit.SetInternalDisplayValue(Value: TcxEditValue); -begin -end; - -procedure TcxCustomEdit.SetEditValue(const Value: TcxEditValue); -begin - if FEditValueChangingLockCount > 0 then - Exit; - LockClick(True); - try - if not(FKeyboardAction and not DoEditing) then - InternalSetEditValue(Value, True); - finally - LockClick(False); - end; -end; - -procedure TcxCustomEdit.SetInternalEditValue(const Value: TcxEditValue); -begin - if FEditValueChangingLockCount > 0 then - Exit; - if not(FKeyboardAction and not DoEditing) then - InternalSetEditValue(Value, True); -end; - -procedure TcxCustomEdit.SynchronizeDisplayValue; -begin -end; - -procedure TcxCustomEdit.SynchronizeEditValue; -begin -end; - -function TcxCustomEdit.TabsNeeded: Boolean; -begin - Result := IsInplace; -end; - -function TcxCustomEdit.UpdateContentOnFocusChanging: Boolean; -begin - Result := True; -end; - -procedure TcxCustomEdit.UpdateDrawValue; -begin -end; - -procedure TcxCustomEdit.UpdateInnerEditReadOnly; -begin - if not PropertiesChangeLocked and (InnerEdit <> nil) then - InnerEdit.ReadOnly := RealReadOnly; -end; - -function TcxCustomEdit.ValidateKeyDown(var Key: Word; Shift: TShiftState): Boolean; -begin - Result := not(not DataBinding.Modified and CanKeyDownModifyEdit(Key, Shift) and - not DoEditing); -end; - -function TcxCustomEdit.ValidateKeyPress(var Key: Char): Boolean; -begin - if IsTextChar(Key) and not IsValidChar(Key) then - begin - Key := #0; - Beep; - end - else - if not DataBinding.Modified and CanKeyPressModifyEdit(Key) then - if not DoEditing then - Key := #0 - else - Key := Key; - Result := Key <> #0; -end; - -function TcxCustomEdit.WantNavigationKeys: Boolean; -begin - Result := False; -end; - -procedure TcxCustomEdit.LockedInnerEditWindowProc(var Message: TMessage); -begin - with Message do - Result := CallWindowProc(FInnerEditDefWindowProc, Handle, Msg, WParam, LParam); -end; - -procedure TcxCustomEdit.LockInnerEditRepainting; -begin - if not HasInnerEdit then - Exit; - FObjectInstance := MakeObjectInstance(LockedInnerEditWindowProc); - FInnerEditDefWindowProc := Pointer(GetWindowLong(InnerEdit.Control.Handle, GWL_WNDPROC)); - SetWindowLong(InnerEdit.Control.Handle, GWL_WNDPROC, - Integer(FObjectInstance)); -end; - -procedure TcxCustomEdit.UnlockInnerEditRepainting; -begin - if not HasInnerEdit then - Exit; - SetWindowLong(InnerEdit.Control.Handle, GWL_WNDPROC, Integer(FInnerEditDefWindowProc)); - FreeObjectInstance(FObjectInstance); -end; - -function TcxCustomEdit.UseAnchors: Boolean; -begin - Result := UseAnchorX or UseAnchorY; -end; - -function TcxCustomEdit.UseAnchorX: Boolean; -begin - Result := False; -end; - -function TcxCustomEdit.UseAnchorY: Boolean; -begin - Result := False; -end; - -// IcxEditRepositoryItemListener -procedure TcxCustomEdit.RepositoryItemListenerItemRemoved(Sender: TcxEditRepositoryItem); -begin - FRepositoryItem := nil; -end; - -procedure TcxCustomEdit.RepositoryItemListenerPropertiesChanged(Sender: TcxEditRepositoryItem); -begin - if ComponentState * [csLoading, csDestroying] = [] then - PropertiesChanged(Sender.Properties); -end; - -//IdxSpellCheckerSetEditValue - -function TcxCustomEdit.SupportsSpelling: Boolean; -begin - Result := False; -end; - -procedure TcxCustomEdit.SpellCheckerSetIsBarControl(AValue: Boolean); -begin - FIsBarControl := AValue; -end; - -procedure TcxCustomEdit.SpellCheckerSetSelText(const AValue: string; APost: Boolean = False); -begin -end; - -procedure TcxCustomEdit.SpellCheckerSetValue(const AValue: Variant); -begin - InternalSetEditValue(AValue, False); -end; - -function TcxCustomEdit.GetEditValue: TcxEditValue; -begin - Result := FEditValue; -end; - -function TcxCustomEdit.CheckButtonShortCuts(AKey: Integer): Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to High(ViewInfo.ButtonsInfo) do - with ViewInfo.ButtonsInfo[I] do - if (Data.State <> ebsDisabled) and IsAccel(AKey, Data.Caption) then - begin - Result := True; - DoButtonClick(I); - Break; - end; -end; - -procedure TcxCustomEdit.DblClickTimerHandler(Sender: TObject); -begin - FDblClickTimer.Enabled := False; -end; - -procedure TcxCustomEdit.DoClearEditData(AEditData: TcxCustomEditData); -begin - if (FEditData = AEditData) and (FEditData <> nil) and FEditData.Cleared then - begin - InitializeEditData; - FEditData.Cleared := False; - end; -end; - -function TcxCustomEdit.GetActiveProperties: TcxCustomEditProperties; -begin - Result := TcxCustomEditProperties(InternalGetActiveProperties); -end; - -function TcxCustomEdit.GetEditActiveStyle: TcxCustomEditStyle; -begin - Result := TcxCustomEditStyle(inherited ActiveStyle); -end; - -function TcxCustomEdit.GetHeight: Integer; -begin - CheckHandle; - Result := inherited Height; -end; - -function TcxCustomEdit.GetInternalStyle(AState: TcxContainerStateItem): TcxCustomEditStyle; -begin - Result := TcxCustomEditStyle(FStyles[AState]); -end; - -function TcxCustomEdit.GetStyle: TcxEditStyle; -begin - Result := TcxEditStyle(FStyles.Style); -end; - -function TcxCustomEdit.GetStyleDisabled: TcxEditStyle; -begin - Result := TcxEditStyle(FStyles.StyleDisabled); -end; - -function TcxCustomEdit.GetStyleFocused: TcxEditStyle; -begin - Result := TcxEditStyle(FStyles.StyleFocused); -end; - -function TcxCustomEdit.GetStyleHot: TcxEditStyle; -begin - Result := TcxEditStyle(FStyles.StyleHot); -end; - -function TcxCustomEdit.GetViewInfo: TcxCustomEditViewInfo; -begin - Result := TcxCustomEditViewInfo(FViewInfo); -end; - -procedure TcxCustomEdit.InitContentParams; -var - AViewData: TcxCustomEditViewData; -begin - AViewData := CreateViewData; - try - AViewData.InitEditContentParams(ContentParams); - FIsContentParamsInitialized := True; - finally - FreeAndNil(AViewData); - end; -end; - -procedure TcxCustomEdit.InternalCanResize(var ANewWidth, ANewHeight: Integer); -var - AEditSizeProperties: TcxEditSizeProperties; - ASize: TSize; - AViewData: TcxCustomEditViewData; -begin - if CanAutoSize then - begin - FillSizeProperties(AEditSizeProperties); - AViewData := TcxCustomEditViewData(CreateViewData); - try - ASize := AViewData.GetEditSize(cxScreenCanvas, EditValue, AEditSizeProperties, ViewInfo); - cxScreenCanvas.Dormant; - finally - FreeAndNil(AViewData); - end; - - if IsAutoWidth then - ANewWidth := ASize.cx; - if not (Align in [alLeft, alRight, alClient{$IFDEF DELPHI6}, alCustom{$ENDIF}]) then - ANewHeight := ASize.cy; - end; -end; - -function TcxCustomEdit.IsAutoWidth: Boolean; -begin - Result := CanAutoSize and CanAutoWidth and - not (Align in [alTop, alBottom, alClient{$IFDEF DELPHI6}, alCustom{$ENDIF}]); -end; - -procedure TcxCustomEdit.ReadAnchorX(Reader: TReader); -begin - FAnchorX := Reader.ReadInteger; - SetSize; -end; - -procedure TcxCustomEdit.ReadAnchorY(Reader: TReader); -begin - FAnchorY := Reader.ReadInteger; - SetSize; -end; - -procedure TcxCustomEdit.ReadHeight(Reader: TReader); -begin - Height := Reader.ReadInteger; -end; - -procedure TcxCustomEdit.ReadWidth(Reader: TReader); -begin - Width := Reader.ReadInteger; -end; - -procedure TcxCustomEdit.SetDataBinding(Value: TcxEditDataBinding); -begin - FDataBinding.Assign(Value.GetEditDataBindingInstance); -end; - -procedure TcxCustomEdit.SetHeight(Value: Integer); -begin - inherited Height := Value; -end; - -procedure TcxCustomEdit.SetInternalStyle(AState: TcxContainerStateItem; - Value: TcxCustomEditStyle); -begin - FStyles[AState] := Value; -end; - -procedure TcxCustomEdit.SetInternalReadOnly(Value: Boolean); -begin - if InnerEdit <> nil then - InnerEdit.ReadOnly := Value; -end; - -procedure TcxCustomEdit.SetModified(Value: Boolean); -begin - FModified := Value; - if not Value then - SetModifiedAfterEnterValue(False); -end; - -procedure TcxCustomEdit.SetModifiedAfterEnter(Value: Boolean); -begin - SetModifiedAfterEnterValue(Value); - if Value then - begin - FIsEditValidated := False; - FModified := True; - end; -end; - -procedure TcxCustomEdit.SetModifiedAfterEnterValue(Value: Boolean); -begin - FModifiedAfterEnter := Value; -end; - -procedure TcxCustomEdit.SetProperties(Value: TcxCustomEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomEdit.SetRepositoryItem(Value: TcxEditRepositoryItem); -begin - if Value = FRepositoryItem then - Exit; - if not IsRepositoryItemAcceptable(Value) then - raise EcxEditError.Create(cxGetResourceString(@cxSEditInvalidRepositoryItem)); - RepositoryItemAssigning; - if FRepositoryItem <> nil then - FRepositoryItem.RemoveListener(Self); - - FRepositoryItem := Value; - if FRepositoryItem <> nil then - FRepositoryItem.AddListener(Self); - if FRepositoryItem = nil then - begin - if ComponentState * [csLoading, csDestroying] = [] then - Properties.OnPropertiesChanged := PropertiesChanged; - Properties.IDefaultValuesProvider := DataBinding.IDefaultValuesProvider; - end - else - begin - FProperties.FIDefaultValuesProvider := nil; - RepositoryItemListenerPropertiesChanged(FRepositoryItem); - TcxCustomEditProperties(FProperties).OnPropertiesChanged := nil; - end; - RepositoryItemAssigned; -end; - -procedure TcxCustomEdit.SetReplicatableFlag; - - procedure SetControlReplicatable(AControl: TControl); - begin - AControl.ControlStyle := AControl.ControlStyle + [csReplicatable]; - end; - - procedure SetReplicatable(AControl: TControl); - var - I: Integer; - begin - SetControlReplicatable(AControl); - if AControl is TWinControl then - for I := 0 to TWinControl(AControl).ControlCount - 1 do - SetReplicatable(TWinControl(AControl).Controls[I]); - end; - -begin - SetReplicatable(Self); - if NeedsScrollBars then - begin - SetControlReplicatable(HScrollBar); - SetControlReplicatable(VScrollBar); - SetControlReplicatable(SizeGrip); - end; -end; - -procedure TcxCustomEdit.SetStyle(Value: TcxEditStyle); -begin - FStyles.Style := Value; -end; - -procedure TcxCustomEdit.SetStyleDisabled(Value: TcxEditStyle); -begin - FStyles.StyleDisabled := Value; -end; - -procedure TcxCustomEdit.SetStyleFocused(Value: TcxEditStyle); -begin - FStyles.StyleFocused := Value; -end; - -procedure TcxCustomEdit.SetStyleHot(Value: TcxEditStyle); -begin - FStyles.StyleHot := Value; -end; - -procedure TcxCustomEdit.SetTransparent(Value: Boolean); -begin - if Value <> FTransparent then - begin - FTransparent := Value; - if Value then - ControlStyle := ControlStyle - [csOpaque] - else - ControlStyle := ControlStyle + [csOpaque]; - ShortRefreshContainer(False); - end; -end; - -procedure TcxCustomEdit.WriteAnchorX(Writer: TWriter); -begin - CalculateAnchors; - Writer.WriteInteger(AnchorX); -end; - -procedure TcxCustomEdit.WriteAnchorY(Writer: TWriter); -begin - CalculateAnchors; - Writer.WriteInteger(AnchorY); -end; - -procedure TcxCustomEdit.WriteHeight(Writer: TWriter); -begin - Writer.WriteInteger(Height); -end; - -procedure TcxCustomEdit.WriteWidth(Writer: TWriter); -begin - Writer.WriteInteger(Width); -end; - -function TcxCustomEdit.GetHintText(APart: Integer): string; -begin - Result := ViewInfo.GetHintText(APart); - if (Length(Result) = 0) and ShowHint then - Result := Hint; -end; - -procedure TcxCustomEdit.WMCopy(var Message: TMessage); -begin - CopyToClipboard; -end; - -procedure TcxCustomEdit.WMCut(var Message: TMessage); -begin - KeyboardAction := True; - try - if (not ActiveProperties.ReadOnly) and DataBinding.IsDataAvailable then - CutToClipboard - else - CopyToClipboard; - finally - KeyboardAction := False; - end; -end; - -procedure TcxCustomEdit.CMHintShow(var Message: TCMHintShow); -var - APart: Integer; -begin - with Message.HintInfo^ do - begin - APart := ViewInfo.GetPart(CursorPos); - if APart <> ecpNone then - begin - HintStr := GetShortHint(GetHintText(APart)); - CursorRect := ViewInfo.GetPartRect(APart); - end - else - Message.Result := -1; - end; -end; - -procedure TcxCustomEdit.WMPaste(var Message: TMessage); -begin - if (not ActiveProperties.ReadOnly) and DataBinding.IsDataAvailable then - begin - KeyboardAction := True; - try - PasteFromClipboard; - finally - KeyboardAction := False; - end; - end; -end; - -procedure TcxCustomEdit.CMDialogChar(var Message: TCMDialogChar); -begin - if CheckButtonShortCuts(Message.CharCode) then - Message.Result := 1 - else - inherited; -end; - -procedure TcxCustomEdit.CMEnter(var Message: TCMEnter); -begin - inherited; - if {$IFNDEF DELPHI12}SysLocale.FarEast and {$ENDIF}DataBinding.CanModify and - not ActiveProperties.ReadOnly then - SetInternalReadOnly(False); -end; - -procedure TcxCustomEdit.CMShowingChanged(var Message: TMessage); -begin - inherited; - if Showing then - SetSize; -end; - -{ TcxEditAlignment } - -constructor TcxEditAlignment.Create(AOwner: TPersistent); -begin - inherited Create; - FOwner := AOwner; - FHorz := cxEditDefaultHorzAlignment; - FVert := cxEditDefaultVertAlignment; -end; - -procedure TcxEditAlignment.Assign(Source: TPersistent); -begin - if Source is TcxEditAlignment then - with Source as TcxEditAlignment do - begin - Self.FVert := FVert; - Self.FHorz := FHorz; - Self.FIsHorzAssigned := FIsHorzAssigned; - Self.DoChanged; - end - else - inherited Assign(Source); -end; - -function TcxEditAlignment.IsHorzStored: Boolean; -begin - Result := FIsHorzAssigned; -end; - -function TcxEditAlignment.IsVertStored: Boolean; -begin - Result := Vert <> cxEditDefaultVertAlignment; -end; - -procedure TcxEditAlignment.Reset; -begin - FIsHorzAssigned := False; - DoChanged; -end; - -procedure TcxEditAlignment.DoChanged; -begin - if Assigned(FOnChanged) then - FOnChanged(Self); -end; - -function TcxEditAlignment.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -procedure TcxEditAlignment.SetHorz(const Value: TcxEditHorzAlignment); -begin - if FIsHorzAssigned and (Value = FHorz) then - Exit; - FIsHorzAssigned := True; - FHorz := Value; - DoChanged; -end; - -procedure TcxEditAlignment.SetVert(const Value: TcxEditVertAlignment); -begin - if Value <> FVert then - begin - FVert := Value; - DoChanged; - end; -end; - -{ TcxInplaceEditList } - -constructor TcxInplaceEditList.Create(AEditorOwner: TComponent); -begin - inherited Create; - if FInplaceEditLists = nil then - FInplaceEditLists := TList.Create; - FInplaceEditLists.Add(Self); - FEditorOwner := AEditorOwner; -end; - -destructor TcxInplaceEditList.Destroy; -begin - FInplaceEditLists.Remove(Self); - if FInplaceEditLists.Count = 0 then - FreeAndNil(FInplaceEditLists); - DestroyItems; - inherited Destroy; -end; - -procedure TcxInplaceEditList.DisconnectProperties( - AProperties: TcxCustomEditProperties); -var - AItemIndex: Integer; -begin - AItemIndex := FindItem(AProperties, False); - if AItemIndex <> -1 then - FItems[AItemIndex].Properties := nil; -end; - -function TcxInplaceEditList.FindEdit(AProperties: TcxCustomEditProperties): TcxCustomEdit; -begin - Result := GetEdit(FindItem(AProperties, True)); -end; - -function TcxInplaceEditList.FindEdit(APropertiesClass: TcxCustomEditPropertiesClass): TcxCustomEdit; -begin - Result := GetEdit(FindItem(APropertiesClass)); -end; - -function TcxInplaceEditList.GetEdit(AProperties: TcxCustomEditProperties): TcxCustomEdit; -begin - Result := FindEdit(AProperties); - if Result = nil then - begin - Result := CreateEdit(TcxCustomEditPropertiesClass(AProperties.ClassType)); - SetLength(FItems, Count + 1); - with FItems[Count - 1] do - begin - Edit := Result; - Properties := AProperties; - end; - end; - InitEdit(Result, AProperties); -end; - -function TcxInplaceEditList.GetEdit(APropertiesClass: TcxCustomEditPropertiesClass): TcxCustomEdit; -begin - Result := FindEdit(APropertiesClass); - if Result = nil then - begin - Result := CreateEdit(APropertiesClass); - SetLength(FItems, Count + 1); - with FItems[Count - 1] do - begin - Edit := Result; - Properties := nil; - end; - end; -end; - -procedure TcxInplaceEditList.RemoveItem(AProperties: TcxCustomEditProperties); -begin - RemoveItem(FindItem(AProperties, False)); -end; - -procedure TcxInplaceEditList.RemoveItem(APropertiesClass: TcxCustomEditPropertiesClass); -var - AItemIndex: Integer; -begin - repeat - AItemIndex := FindItem(APropertiesClass); - RemoveItem(AItemIndex); - until AItemIndex = -1; -end; - -function TcxInplaceEditList.CreateEdit(APropertiesClass: TcxCustomEditPropertiesClass): TcxCustomEdit; -begin - Result := TcxCustomEditClass(APropertiesClass.GetContainerClass).Create(EditorOwner, True); - Result.Visible := False; -end; - -procedure TcxInplaceEditList.DestroyItems; -begin - while Count <> 0 do - RemoveItem(0); -end; - -function TcxInplaceEditList.FindItem(AProperties: TcxCustomEditProperties; - ACanUseFreeEditors: Boolean): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if FItems[I].Properties = AProperties then - begin - Result := I; - Break; - end; - if (Result = -1) and ACanUseFreeEditors then - begin - Result := FindItem(TcxCustomEditPropertiesClass(AProperties.ClassType)); - if Result <> -1 then - FItems[Result].Properties := AProperties; - end; -end; - -function TcxInplaceEditList.FindItem(APropertiesClass: TcxCustomEditPropertiesClass): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if (FItems[I].Properties = nil) and (FItems[I].Edit.ClassType = APropertiesClass.GetContainerClass) then - begin - Result := I; - Break; - end; -end; - -function TcxInplaceEditList.GetCount: Integer; -begin - Result := Length(FItems); -end; - -function TcxInplaceEditList.GetEdit(AItemIndex: Integer): TcxCustomEdit; -begin - if AItemIndex <> -1 then - Result := FItems[AItemIndex].Edit - else - Result := nil; -end; - -procedure TcxInplaceEditList.InitEdit(AEdit: TcxCustomEdit; - AProperties: TcxCustomEditProperties); -begin - AEdit.LockChangeEvents(True); - try - AEdit.Properties := AProperties; - finally - AEdit.LockChangeEvents(False, False); - end; -end; - -procedure TcxInplaceEditList.RemoveItem(AIndex: Integer); -begin - if AIndex <> -1 then - begin - FItems[AIndex].Edit.Parent := nil; - FItems[AIndex].Edit.Free; - if AIndex < Count - 1 then - Move(FItems[AIndex + 1], FItems[AIndex], SizeOf(TcxEditListItem) * (Count - AIndex - 1)); - SetLength(FItems, Length(FItems) - 1); - end; -end; - -{ TcxDefaultEditStyleController } - -constructor TcxDefaultEditStyleController.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - Inc(FDefaultEditStyleControllerCount); -end; - -destructor TcxDefaultEditStyleController.Destroy; - - procedure ResetDefaultEditStyleController; - begin - if DefaultEditStyleController <> nil then - begin - DefaultEditStyleController.RestoreStyles; - DefaultEditStyleController.OnStyleChanged := nil; - end; - end; - -begin - Dec(FDefaultEditStyleControllerCount); - if FDefaultEditStyleControllerCount = 0 then - ResetDefaultEditStyleController; - inherited Destroy; -end; - -procedure TcxDefaultEditStyleController.RestoreStyles; -begin - DefaultEditStyleController.RestoreStyles; -end; - -function TcxDefaultEditStyleController.GetEmulateStandardControlDrawing: Boolean; -begin - Result := cxEdit.EmulateStandardControlDrawing; -end; - -function TcxDefaultEditStyleController.GetInternalStyle( - AState: TcxContainerStateItem): TcxCustomEditStyle; -begin - Result := DefaultEditStyleController.Styles[AState]; -end; - -function TcxDefaultEditStyleController.GetOnStyleChanged: TNotifyEvent; -begin - Result := DefaultEditStyleController.OnStyleChanged; -end; - -function TcxDefaultEditStyleController.GetStyle: TcxEditStyle; -begin - Result := DefaultEditStyleController.Style; -end; - -function TcxDefaultEditStyleController.GetStyleDisabled: TcxEditStyle; -begin - Result := DefaultEditStyleController.StyleDisabled; -end; - -function TcxDefaultEditStyleController.GetStyleFocused: TcxEditStyle; -begin - Result := DefaultEditStyleController.StyleFocused; -end; - -function TcxDefaultEditStyleController.GetStyleHot: TcxEditStyle; -begin - Result := DefaultEditStyleController.StyleHot; -end; - -procedure TcxDefaultEditStyleController.SetEmulateStandardControlDrawing( - Value: Boolean); -begin - SetStandardControlDrawingEmulationMode(Value); -end; - -procedure TcxDefaultEditStyleController.SetInternalStyle( - AState: TcxContainerStateItem; Value: TcxCustomEditStyle); -begin - DefaultEditStyleController.Styles[AState] := Value; -end; - -procedure TcxDefaultEditStyleController.SetOnStyleChanged(Value: TNotifyEvent); -begin - DefaultEditStyleController.OnStyleChanged := Value; -end; - -procedure TcxDefaultEditStyleController.SetStyle(Value: TcxEditStyle); -begin - DefaultEditStyleController.Style := Value; -end; - -procedure TcxDefaultEditStyleController.SetStyleDisabled(Value: TcxEditStyle); -begin - DefaultEditStyleController.StyleDisabled := Value; -end; - -procedure TcxDefaultEditStyleController.SetStyleFocused(Value: TcxEditStyle); -begin - DefaultEditStyleController.StyleFocused := Value; -end; - -procedure TcxDefaultEditStyleController.SetStyleHot(Value: TcxEditStyle); -begin - DefaultEditStyleController.StyleHot := Value; -end; - -initialization - Screen.Cursors[crcxEditMouseWheel] := LoadCursor(HInstance, 'CXEDIT_MOUSEWHEEL'); - FDefaultEditStyleController := TcxEditStyleController.Create(nil); - cxContainerDefaultStyleController := FDefaultEditStyleController; - FCreatedEditPropertiesList := TList.Create; - cxFilterConsts.cxFilterGetResourceStringFunc := cxGetResourceString; - -finalization - FreeAndNil(FRegisteredEditProperties); - FreeAndNil(FDefaultEditRepository); - FreeAndNil(FCreatedEditPropertiesList); - cxContainerDefaultStyleController := nil; - FreeAndNil(FDefaultEditStyleController); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEdit.res b/internal/x.46/ExpressEditors Library 5/Sources/cxEdit.res deleted file mode 100644 index 81cce5f1..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Sources/cxEdit.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditConsts.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEditConsts.pas deleted file mode 100644 index 6318987d..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditConsts.pas +++ /dev/null @@ -1,290 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxEditConsts; - -{$I cxVer.inc} - -interface - -resourcestring - cxSEditButtonCancel = 'Cancel'; - cxSEditButtonOK = 'OK'; - cxSEditDateConvertError = 'Could not convert to date'; - cxSEditInvalidRepositoryItem = 'The repository item is not acceptable'; - cxSEditNumericValueConvertError = 'Could not convert to numeric value'; - cxSEditPopupCircularReferencingError = 'Circular referencing is not allowed'; - cxSEditPostError = 'An error occured during posting edit value'; - cxSEditTimeConvertError = 'Could not convert to time'; - cxSEditValidateErrorText = 'Invalid input value. Use escape key to abandon changes'; - cxSEditValueOutOfBounds = 'Value out of bounds'; - - // TODO - cxSEditCheckBoxChecked = 'True'; - cxSEditCheckBoxGrayed = ''; - cxSEditCheckBoxUnchecked = 'False'; - cxSRadioGroupDefaultCaption = ''; - - cxSTextTrue = 'True'; - cxSTextFalse = 'False'; - - // blob - cxSBlobButtonOK = '&OK'; - cxSBlobButtonCancel = '&Cancel'; - cxSBlobButtonClose = '&Close'; - cxSBlobMemo = '(MEMO)'; - cxSBlobMemoEmpty = '(memo)'; - cxSBlobPicture = '(PICTURE)'; - cxSBlobPictureEmpty = '(picture)'; - - // popup menu items - cxSMenuItemCaptionCut = 'Cu&t'; - cxSMenuItemCaptionCopy = '&Copy'; - cxSMenuItemCaptionPaste = '&Paste'; - cxSMenuItemCaptionDelete = '&Delete'; - cxSMenuItemCaptionLoad = '&Load...'; - cxSMenuItemCaptionSave = 'Save &As...'; - - // date - cxSDatePopupClear = 'Clear'; - cxSDatePopupNow = 'Now'; - cxSDatePopupOK = 'OK'; - cxSDatePopupToday = 'Today'; - cxSDateError = 'Invalid Date'; - - // calculator - scxSCalcError = 'Error'; - - // HyperLink - scxSHyperLinkPrefix = 'http://'; - scxSHyperLinkDoubleSlash = '//'; - - // navigator - cxNavigatorHint_First = 'First record'; - cxNavigatorHint_Prior = 'Prior record'; - cxNavigatorHint_PriorPage = 'Prior page'; - cxNavigatorHint_Next = 'Next record'; - cxNavigatorHint_NextPage = 'Next page'; - cxNavigatorHint_Last = 'Last record'; - cxNavigatorHint_Insert = 'Insert record'; - cxNavigatorHint_Append = 'Append record'; - cxNavigatorHint_Delete = 'Delete record'; - cxNavigatorHint_Edit = 'Edit record'; - cxNavigatorHint_Post = 'Post edit'; - cxNavigatorHint_Cancel = 'Cancel edit'; - cxNavigatorHint_Refresh = 'Refresh data'; - cxNavigatorHint_SaveBookmark = 'Save Bookmark'; - cxNavigatorHint_GotoBookmark = 'Goto Bookmark'; - cxNavigatorHint_Filter = 'Filter data'; - cxNavigator_DeleteRecordQuestion = 'Delete record?'; - - // edit repository - scxSEditRepositoryBlobItem = 'BlobEdit|Represents the BLOB editor'; - scxSEditRepositoryButtonItem = 'ButtonEdit|Represents an edit control with embedded buttons'; - scxSEditRepositoryCalcItem = 'CalcEdit|Represents an edit control with a dropdown calculator window'; - scxSEditRepositoryCheckBoxItem = 'CheckBox|Represents a check box control that allows selecting an option'; - scxSEditRepositoryComboBoxItem = 'ComboBox|Represents the combo box editor'; - scxSEditRepositoryCurrencyItem = 'CurrencyEdit|Represents an editor enabling editing currency data'; - scxSEditRepositoryDateItem = 'DateEdit|Represents an edit control with a dropdown calendar'; - scxSEditRepositoryHyperLinkItem = 'HyperLink|Represents a text editor with hyperlink functionality'; - scxSEditRepositoryImageComboBoxItem = 'ImageComboBox|Represents an editor displaying the list of images and text strings within the dropdown window'; - scxSEditRepositoryImageItem = 'Image|Represents an image editor'; - scxSEditRepositoryLookupComboBoxItem = 'LookupComboBox|Represents a lookup combo box control'; - scxSEditRepositoryMaskItem = 'MaskEdit|Represents a generic masked edit control.'; - scxSEditRepositoryMemoItem = 'Memo|Represents an edit control that allows editing memo data'; - scxSEditRepositoryMRUItem = 'MRUEdit|Represents a text editor displaying the list of most recently used items (MRU) within a dropdown window'; - scxSEditRepositoryPopupItem = 'PopupEdit|Represents an edit control with a dropdown list'; - scxSEditRepositorySpinItem = 'SpinEdit|Represents a spin editor'; - scxSEditRepositoryRadioGroupItem = 'RadioGroup|Represents a group of radio buttons'; - scxSEditRepositoryTextItem = 'TextEdit|Represents a single line text editor'; - scxSEditRepositoryTimeItem = 'TimeEdit|Represents an editor displaying time values'; - - scxRegExprLine = 'Line'; - scxRegExprChar = 'Char'; - scxRegExprNotAssignedSourceStream = 'The source stream is not assigned'; - scxRegExprEmptySourceStream = 'The source stream is empty'; - scxRegExprCantUsePlusQuantifier = 'The ''+'' quantifier cannot be applied here'; - scxRegExprCantUseStarQuantifier = 'The ''*'' quantifier cannot be applied here'; - scxRegExprCantCreateEmptyAlt = 'The alternative should not be empty'; - scxRegExprCantCreateEmptyBlock = 'The block should not be empty'; - scxRegExprIllegalSymbol = 'Illegal ''%s'''; - scxRegExprIllegalQuantifier = 'Illegal quantifier ''%s'''; - scxRegExprNotSupportQuantifier = 'The parameter quantifiers are not supported'; - scxRegExprIllegalIntegerValue = 'Illegal integer value'; - scxRegExprTooBigReferenceNumber = 'Too big reference number'; - scxRegExprCantCreateEmptyEnum = 'Can''t create empty enumeration'; - scxRegExprSubrangeOrder = 'The starting character of the subrange must be less than the finishing one'; - scxRegExprHexNumberExpected0 = 'Hexadecimal number expected'; - scxRegExprHexNumberExpected = 'Hexadecimal number expected but ''%s'' found'; - scxRegExprMissing = 'Missing ''%s'''; - scxRegExprUnnecessary = 'Unnecessary ''%s'''; - scxRegExprIncorrectSpace = 'The space character is not allowed after ''\'''; - scxRegExprNotCompiled = 'Regular expression is not compiled'; - scxRegExprIncorrectParameterQuantifier = 'Incorrect parameter quantifier'; - scxRegExprCantUseParameterQuantifier = 'The parameter quantifier cannot be applied here'; - - scxMaskEditRegExprError = 'Regular expression errors:'; - scxMaskEditInvalidEditValue = 'The edit value is invalid'; - scxMaskEditNoMask = 'None'; - scxMaskEditIllegalFileFormat = 'Illegal file format'; - scxMaskEditEmptyMaskCollectionFile = 'The mask collection file is empty'; - scxMaskEditMaskCollectionFiles = 'Mask collection files'; - cxSSpinEditInvalidNumericValue = 'Invalid numeric value'; - -implementation - -uses - dxCore; - -procedure AddEditorsResourceStringNames(AProduct: TdxProductResourceStrings); - - procedure InternalAdd(const AResourceStringName: string; AAdress: Pointer); - begin - AProduct.Add(AResourceStringName, AAdress); - end; - -begin - InternalAdd('cxSEditButtonCancel', @cxSEditButtonCancel); - InternalAdd('cxSEditButtonOK', @cxSEditButtonOK); - InternalAdd('cxSEditDateConvertError', @cxSEditDateConvertError); - InternalAdd('cxSEditInvalidRepositoryItem', @cxSEditInvalidRepositoryItem); - InternalAdd('cxSEditNumericValueConvertError', @cxSEditNumericValueConvertError); - InternalAdd('cxSEditPopupCircularReferencingError', @cxSEditPopupCircularReferencingError); - InternalAdd('cxSEditPostError', @cxSEditPostError); - InternalAdd('cxSEditTimeConvertError', @cxSEditTimeConvertError); - InternalAdd('cxSEditValidateErrorText', @cxSEditValidateErrorText); - InternalAdd('cxSEditValueOutOfBounds', @cxSEditValueOutOfBounds); - InternalAdd('cxSEditCheckBoxChecked', @cxSEditCheckBoxChecked); - InternalAdd('cxSEditCheckBoxGrayed', @cxSEditCheckBoxGrayed); - InternalAdd('cxSEditCheckBoxUnchecked', @cxSEditCheckBoxUnchecked); - InternalAdd('cxSRadioGroupDefaultCaption', @cxSRadioGroupDefaultCaption); - InternalAdd('cxSTextTrue', @cxSTextTrue); - InternalAdd('cxSTextFalse', @cxSTextFalse); - InternalAdd('cxSBlobButtonOK', @cxSBlobButtonOK); - InternalAdd('cxSBlobButtonCancel', @cxSBlobButtonCancel); - InternalAdd('cxSBlobButtonClose', @cxSBlobButtonClose); - InternalAdd('cxSBlobMemo', @cxSBlobMemo); - InternalAdd('cxSBlobMemoEmpty', @cxSBlobMemoEmpty); - InternalAdd('cxSBlobPicture', @cxSBlobPicture); - InternalAdd('cxSBlobPictureEmpty', @cxSBlobPictureEmpty); - InternalAdd('cxSMenuItemCaptionCut', @cxSMenuItemCaptionCut); - InternalAdd('cxSMenuItemCaptionCopy', @cxSMenuItemCaptionCopy); - InternalAdd('cxSMenuItemCaptionPaste', @cxSMenuItemCaptionPaste); - InternalAdd('cxSMenuItemCaptionDelete', @cxSMenuItemCaptionDelete); - InternalAdd('cxSMenuItemCaptionLoad', @cxSMenuItemCaptionLoad); - InternalAdd('cxSMenuItemCaptionSave', @cxSMenuItemCaptionSave); - InternalAdd('cxSDatePopupClear', @cxSDatePopupClear); - InternalAdd('cxSDatePopupNow', @cxSDatePopupNow); - InternalAdd('cxSDatePopupOK', @cxSDatePopupOK); - InternalAdd('cxSDatePopupToday', @cxSDatePopupToday); - InternalAdd('cxSDateError', @cxSDateError); - InternalAdd('scxSCalcError', @scxSCalcError); - InternalAdd('scxSHyperLinkPrefix', @scxSHyperLinkPrefix); - InternalAdd('scxSHyperLinkDoubleSlash', @scxSHyperLinkDoubleSlash); - InternalAdd('cxNavigatorHint_First', @cxNavigatorHint_First); - InternalAdd('cxNavigatorHint_Prior', @cxNavigatorHint_Prior); - InternalAdd('cxNavigatorHint_PriorPage', @cxNavigatorHint_PriorPage); - InternalAdd('cxNavigatorHint_Next', @cxNavigatorHint_Next); - InternalAdd('cxNavigatorHint_NextPage', @cxNavigatorHint_NextPage); - InternalAdd('cxNavigatorHint_Last', @cxNavigatorHint_Last); - InternalAdd('cxNavigatorHint_Insert', @cxNavigatorHint_Insert); - InternalAdd('cxNavigatorHint_Append', @cxNavigatorHint_Append); - InternalAdd('cxNavigatorHint_Delete', @cxNavigatorHint_Delete); - InternalAdd('cxNavigatorHint_Edit', @cxNavigatorHint_Edit); - InternalAdd('cxNavigatorHint_Post', @cxNavigatorHint_Post); - InternalAdd('cxNavigatorHint_Cancel', @cxNavigatorHint_Cancel); - InternalAdd('cxNavigatorHint_Refresh', @cxNavigatorHint_Refresh); - InternalAdd('cxNavigatorHint_SaveBookmark', @cxNavigatorHint_SaveBookmark); - InternalAdd('cxNavigatorHint_GotoBookmark', @cxNavigatorHint_GotoBookmark); - InternalAdd('cxNavigatorHint_Filter', @cxNavigatorHint_Filter); - InternalAdd('cxNavigator_DeleteRecordQuestion', @cxNavigator_DeleteRecordQuestion); - InternalAdd('scxSEditRepositoryBlobItem', @scxSEditRepositoryBlobItem); - InternalAdd('scxSEditRepositoryButtonItem', @scxSEditRepositoryButtonItem); - InternalAdd('scxSEditRepositoryCalcItem', @scxSEditRepositoryCalcItem); - InternalAdd('scxSEditRepositoryCheckBoxItem', @scxSEditRepositoryCheckBoxItem); - InternalAdd('scxSEditRepositoryComboBoxItem', @scxSEditRepositoryComboBoxItem); - InternalAdd('scxSEditRepositoryCurrencyItem', @scxSEditRepositoryCurrencyItem); - InternalAdd('scxSEditRepositoryDateItem', @scxSEditRepositoryDateItem); - InternalAdd('scxSEditRepositoryHyperLinkItem', @scxSEditRepositoryHyperLinkItem); - InternalAdd('scxSEditRepositoryImageComboBoxItem', @scxSEditRepositoryImageComboBoxItem); - InternalAdd('scxSEditRepositoryImageItem', @scxSEditRepositoryImageItem); - InternalAdd('scxSEditRepositoryLookupComboBoxItem', @scxSEditRepositoryLookupComboBoxItem); - InternalAdd('scxSEditRepositoryMaskItem', @scxSEditRepositoryMaskItem); - InternalAdd('scxSEditRepositoryMemoItem', @scxSEditRepositoryMemoItem); - InternalAdd('scxSEditRepositoryMRUItem', @scxSEditRepositoryMRUItem); - InternalAdd('scxSEditRepositoryPopupItem', @scxSEditRepositoryPopupItem); - InternalAdd('scxSEditRepositorySpinItem', @scxSEditRepositorySpinItem); - InternalAdd('scxSEditRepositoryRadioGroupItem', @scxSEditRepositoryRadioGroupItem); - InternalAdd('scxSEditRepositoryTextItem', @scxSEditRepositoryTextItem); - InternalAdd('scxSEditRepositoryTimeItem', @scxSEditRepositoryTimeItem); - InternalAdd('scxRegExprLine', @scxRegExprLine); - InternalAdd('scxRegExprChar', @scxRegExprChar); - InternalAdd('scxRegExprNotAssignedSourceStream', @scxRegExprNotAssignedSourceStream); - InternalAdd('scxRegExprEmptySourceStream', @scxRegExprEmptySourceStream); - InternalAdd('scxRegExprCantUsePlusQuantifier', @scxRegExprCantUsePlusQuantifier); - InternalAdd('scxRegExprCantUseStarQuantifier', @scxRegExprCantUseStarQuantifier); - InternalAdd('scxRegExprCantCreateEmptyAlt', @scxRegExprCantCreateEmptyAlt); - InternalAdd('scxRegExprCantCreateEmptyBlock', @scxRegExprCantCreateEmptyBlock); - InternalAdd('scxRegExprIllegalSymbol', @scxRegExprIllegalSymbol); - InternalAdd('scxRegExprIllegalQuantifier', @scxRegExprIllegalQuantifier); - InternalAdd('scxRegExprNotSupportQuantifier', @scxRegExprNotSupportQuantifier); - InternalAdd('scxRegExprIllegalIntegerValue', @scxRegExprIllegalIntegerValue); - InternalAdd('scxRegExprTooBigReferenceNumber', @scxRegExprTooBigReferenceNumber); - InternalAdd('scxRegExprCantCreateEmptyEnum', @scxRegExprCantCreateEmptyEnum); - InternalAdd('scxRegExprSubrangeOrder', @scxRegExprSubrangeOrder); - InternalAdd('scxRegExprHexNumberExpected0', @scxRegExprHexNumberExpected0); - InternalAdd('scxRegExprHexNumberExpected', @scxRegExprHexNumberExpected); - InternalAdd('scxRegExprMissing', @scxRegExprMissing); - InternalAdd('scxRegExprUnnecessary', @scxRegExprUnnecessary); - InternalAdd('scxRegExprIncorrectSpace', @scxRegExprIncorrectSpace); - InternalAdd('scxRegExprNotCompiled', @scxRegExprNotCompiled); - InternalAdd('scxRegExprIncorrectParameterQuantifier', @scxRegExprIncorrectParameterQuantifier); - InternalAdd('scxRegExprCantUseParameterQuantifier', @scxRegExprCantUseParameterQuantifier); - InternalAdd('scxMaskEditRegExprError', @scxMaskEditRegExprError); - InternalAdd('scxMaskEditInvalidEditValue', @scxMaskEditInvalidEditValue); - InternalAdd('scxMaskEditNoMask', @scxMaskEditNoMask); - InternalAdd('scxMaskEditIllegalFileFormat', @scxMaskEditIllegalFileFormat); - InternalAdd('scxMaskEditEmptyMaskCollectionFile', @scxMaskEditEmptyMaskCollectionFile); - InternalAdd('scxMaskEditMaskCollectionFiles', @scxMaskEditMaskCollectionFiles); - InternalAdd('cxSSpinEditInvalidNumericValue', @cxSSpinEditInvalidNumericValue); -end; - -initialization - dxResourceStringsRepository.RegisterProduct('ExpressEditors Library', @AddEditorsResourceStringNames); - -finalization - dxResourceStringsRepository.UnRegisterProduct('ExpressEditors Library'); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditDBRegisteredRepositoryItems.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEditDBRegisteredRepositoryItems.pas deleted file mode 100644 index e2726bd1..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditDBRegisteredRepositoryItems.pas +++ /dev/null @@ -1,348 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxEditDBRegisteredRepositoryItems; - -{$I cxVer.inc} - -interface - -uses - Variants, - SysUtils, Classes, DB, cxClasses, cxGraphics, cxDropDownEdit, cxEdit, - cxDBEditRepository, cxEditRegisteredRepositoryItems, cxEditRepositoryItems; - -type - { TcxEditDBRegisteredRepositoryItems } - - TcxEditDBRegisteredRepositoryItems = class(TcxEditRegisteredRepositoryItems) - private - FCurrencyItems: TcxEditRegisteredRepositoryItemsDataArray; - FLookupItems: TcxEditRegisteredRepositoryItemsDataArray; - function GetCurrencyCount: Integer; - function GetLookupCount: Integer; - protected - { IcxEditRepositoryItemListener } - procedure ItemRemoved(Sender: TcxEditRepositoryItem); override; - - function Add(var AItems: TcxEditRegisteredRepositoryItemsDataArray; - AFieldType: TFieldType; AVersion: Integer; - ARepositoryItem: TcxEditRepositoryItem): Integer; reintroduce; - procedure Clear; - property CurrencyCount: Integer read GetCurrencyCount; - property LookupCount: Integer read GetLookupCount; - public - destructor Destroy; override; - function GetCurrencyItem: TcxEditRepositoryItem; - function GetItem(AFieldType: TFieldType): TcxEditRepositoryItem; reintroduce; - function GetItemByField(AField: TField): TcxEditRepositoryItem; // primary method - function GetLookupItem: TcxEditRepositoryItem; - procedure RegisterItem(AFieldType: TFieldType; AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem); reintroduce; - procedure RegisterCurrencyItem(AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem); - procedure RegisterLookupItem(AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem); - procedure UnregisterItem(AFieldType: TFieldType; AVersion: Integer); reintroduce; - procedure UnregisterCurrencyItem(AVersion: Integer); - procedure UnregisterLookupItem(AVersion: Integer); - end; - -function GetDefaultEditDBRepositoryItems: TcxEditDBRegisteredRepositoryItems; - -implementation - -uses - TypInfo; - -var - DefaultDBEditRepositoryItems: TcxEditDBRegisteredRepositoryItems; - DBRepositoryCurrencyItemClass: TcxEditRepositoryItemClass = TcxEditRepositoryCurrencyItem; - DBRepositoryItemClasses: array[TFieldType] of TcxEditRepositoryItemClass = ( - nil, // ftUnknown - nil, // ftString - nil, // ftSmallint - nil, // ftInteger - nil, // ftWord - TcxEditRepositoryCheckBoxItem, // ftBoolean - nil, // ftFloat - nil, // ftCurrency - nil, // ftBCD - TcxEditRepositoryDateItem, // ftDate - TcxEditRepositoryTimeItem, // ftTime - TcxEditRepositoryDateItem, // ftDateTime - TcxEditRepositoryBlobItem, // ftBytes - TcxEditRepositoryBlobItem, // ftVarBytes - nil, // ftAutoInc - TcxEditRepositoryBlobItem, // ftBlob - TcxEditRepositoryMemoItem, // ftMemo - TcxEditRepositoryImageItem, // ftGraphic - TcxEditRepositoryBlobItem, // ftFmtMemo - TcxEditRepositoryBlobItem, // ftParadoxOle - TcxEditRepositoryBlobItem, // ftDBaseOle - TcxEditRepositoryBlobItem, // ftTypedBinary - nil, // ftCursor - nil, // ftFixedChar - nil, // ftWideString - nil, // ftLargeint - nil, // ftADT - nil, // ftArray - nil, // ftReference - nil, // ftDataSet - nil, // ftOraBlob - TcxEditRepositoryMemoItem, // ftOraClob - nil, // ftVariant - nil, // ftInterface - nil, // ftIDispatch - nil, // ftGuid - TcxEditRepositoryDateItem, // ftTimeStamp - nil // ftFMTBcd - {$IFDEF DELPHI10} - , nil, // ftFixedWideChar - TcxEditRepositoryMemoItem, // ftWideMemo - nil, // ftOraTimeStamp - nil // ftOraInterval - {$ENDIF} - {$IFDEF DELPHI12} - , nil, // ftLongWord - nil, // ftShortint - nil, // ftByte - nil, // ftExtended - nil, // ftConnection - nil, // ftParams - nil // ftStream - {$ENDIF} - {$IFDEF DELPHI14} - , nil, // ftTimeStampOffset - nil, // ftObject, - nil // ftSingle - {$ENDIF} - ); - -procedure CreateDefaultRepositoryItems; -var - I: TFieldType; - ALookupComboBoxItem: TcxEditRepositoryLookupComboBoxItem; -begin - // Simple - GetDefaultEditDBRepositoryItems.RegisterDefaultItem(cxEditRegisteredItemsStandardVersion, - GetDefaultEditRepository.CreateItem(TcxEditRepositoryMaskItem)); - // Currency - GetDefaultEditDBRepositoryItems.RegisterCurrencyItem(cxEditRegisteredItemsStandardVersion, - GetDefaultEditRepository.CreateItem(DBRepositoryCurrencyItemClass)); - // Lookup - ALookupComboBoxItem := GetDefaultEditRepository.CreateItem(TcxEditRepositoryLookupComboBoxItem) as TcxEditRepositoryLookupComboBoxItem; - ALookupComboBoxItem.Properties.ListOptions.GridLines := glNone; - ALookupComboBoxItem.Properties.DropDownListStyle := lsEditFixedList; - ALookupComboBoxItem.Properties.ListOptions.ShowHeader := False; - GetDefaultEditDBRepositoryItems.RegisterLookupItem(cxEditRegisteredItemsStandardVersion, - ALookupComboBoxItem); - // Misc - for I := Low(TFieldType) to High(TFieldType) do - if DBRepositoryItemClasses[I] <> nil then - GetDefaultEditDBRepositoryItems.RegisterItem(I, cxEditRegisteredItemsStandardVersion, - GetDefaultEditRepository.CreateItem(DBRepositoryItemClasses[I])); -end; - -procedure DeleteDefaultRepositoryItems; -var - I: TFieldType; -begin - GetDefaultEditDBRepositoryItems.UnregisterDefaultItem(cxEditRegisteredItemsStandardVersion); -// GetDefaultEditDBRepositoryItems.UnregisterLookupItem(cxEditRegisteredItemsStandardVersion); - for I := Low(TFieldType) to High(TFieldType) do - if DBRepositoryItemClasses[I] <> nil then - GetDefaultEditDBRepositoryItems.UnregisterItem(I, cxEditRegisteredItemsStandardVersion); -end; - -function GetDefaultEditDBRepositoryItems: TcxEditDBRegisteredRepositoryItems; -begin - if DefaultDBEditRepositoryItems = nil then - DefaultDBEditRepositoryItems := TcxEditDBRegisteredRepositoryItems.Create(nil); - Result := DefaultDBEditRepositoryItems; -end; - -{ TcxEditDBRegisteredRepositoryItems } - -destructor TcxEditDBRegisteredRepositoryItems.Destroy; -begin - Destroying := True; - Clear; - inherited Destroy; -end; - -function TcxEditDBRegisteredRepositoryItems.GetCurrencyItem: TcxEditRepositoryItem; -begin - if CurrencyCount > 0 then - Result := FCurrencyItems[0].RepositoryItem - else - Result := GetDefaultItem; -end; - -function TcxEditDBRegisteredRepositoryItems.GetItem( - AFieldType: TFieldType): TcxEditRepositoryItem; -begin - Result := inherited GetItem(Integer(AFieldType)); -end; - -function TcxEditDBRegisteredRepositoryItems.GetItemByField( - AField: TField): TcxEditRepositoryItem; - - function IsCurrency(AField: TField): Boolean; - var - V: Variant; - begin - Result := False; - if IsPublishedProp(AField, 'currency') then - begin - V := GetPropValue(AField, 'currency', False); - if (VarType(V) = varBoolean) and V then - Result := True; - end; - end; - -begin - if Assigned(AField) then - begin - if AField.Lookup then - Result := GetLookupItem - else - begin - if (AField is TNumericField) and IsCurrency(AField) then - Result := GetCurrencyItem - else - Result := GetItem(AField.DataType); - end; - end - else - Result := GetDefaultItem; -end; - -function TcxEditDBRegisteredRepositoryItems.GetLookupItem: TcxEditRepositoryItem; -begin - if LookupCount > 0 then - Result := FLookupItems[0].RepositoryItem - else - Result := GetDefaultItem; -end; - -procedure TcxEditDBRegisteredRepositoryItems.RegisterItem( - AFieldType: TFieldType; AVersion: Integer; - ARepositoryItem: TcxEditRepositoryItem); -begin - inherited RegisterItem(Integer(AFieldType), AVersion, ARepositoryItem); -end; - -procedure TcxEditDBRegisteredRepositoryItems.RegisterCurrencyItem( - AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem); -begin - Add(FCurrencyItems, ftUnknown, AVersion, ARepositoryItem); -end; - -procedure TcxEditDBRegisteredRepositoryItems.RegisterLookupItem( - AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem); -begin - Add(FLookupItems, ftUnknown, AVersion, ARepositoryItem); -end; - -procedure TcxEditDBRegisteredRepositoryItems.UnregisterItem( - AFieldType: TFieldType; AVersion: Integer); -begin - inherited UnregisterItem(Integer(AFieldType), AVersion); -end; - -procedure TcxEditDBRegisteredRepositoryItems.UnregisterCurrencyItem( - AVersion: Integer); -var - AIndex: Integer; -begin - if FindIndexForInsertion(FCurrencyItems, Integer(ftUnknown), AVersion, AIndex) then - Delete(FCurrencyItems, AIndex); -end; - -procedure TcxEditDBRegisteredRepositoryItems.UnregisterLookupItem( - AVersion: Integer); -var - AIndex: Integer; -begin - if FindIndexForInsertion(FLookupItems, Integer(ftUnknown), AVersion, AIndex) then - Delete(FLookupItems, AIndex); -end; - -procedure TcxEditDBRegisteredRepositoryItems.ItemRemoved( - Sender: TcxEditRepositoryItem); -var - I: Integer; -begin - inherited ItemRemoved(Sender); - for I := LookupCount - 1 downto 0 do - if FLookupItems[I].RepositoryItem = Sender then - Delete(FLookupItems, I); - for I := CurrencyCount - 1 downto 0 do - if FCurrencyItems[I].RepositoryItem = Sender then - Delete(FCurrencyItems, I); -end; - -function TcxEditDBRegisteredRepositoryItems.Add( - var AItems: TcxEditRegisteredRepositoryItemsDataArray; AFieldType: TFieldType; - AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem): Integer; -begin - Result := inherited Add(AItems, Integer(AFieldType), AVersion, ARepositoryItem); -end; - -procedure TcxEditDBRegisteredRepositoryItems.Clear; -begin - inherited Clear; - while LookupCount > 0 do - Delete(FLookupItems, LookupCount - 1); - while CurrencyCount > 0 do - Delete(FCurrencyItems, CurrencyCount - 1); -end; - -function TcxEditDBRegisteredRepositoryItems.GetCurrencyCount: Integer; -begin - Result := Length(FCurrencyItems); -end; - -function TcxEditDBRegisteredRepositoryItems.GetLookupCount: Integer; -begin - Result := Length(FLookupItems); -end; - -initialization - CreateDefaultRepositoryItems; - -finalization - DeleteDefaultRepositoryItems; - FreeAndNil(DefaultDBEditRepositoryItems); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditDataRegisteredRepositoryItems.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEditDataRegisteredRepositoryItems.pas deleted file mode 100644 index 7a4912bd..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditDataRegisteredRepositoryItems.pas +++ /dev/null @@ -1,132 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxEditDataRegisteredRepositoryItems; - -{$I cxVer.inc} - -interface - -uses - SysUtils, cxClasses, cxDataStorage, cxEdit, cxEditRegisteredRepositoryItems, - cxEditRepositoryItems; - -type - { TcxEditDataRegisteredRepositoryItems } - - TcxEditDataRegisteredRepositoryItems = class(TcxEditRegisteredRepositoryItems) - public - function GetItem(AValueTypeClass: TcxValueTypeClass): TcxEditRepositoryItem; reintroduce; - procedure RegisterItem(AValueTypeClass: TcxValueTypeClass; AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem); reintroduce; - procedure UnregisterItem(AValueTypeClass: TcxValueTypeClass; AVersion: Integer); reintroduce; - end; - -function GetDefaultEditDataRepositoryItems: TcxEditDataRegisteredRepositoryItems; - -implementation - -var - DefaultDataEditRepositoryItems: TcxEditDataRegisteredRepositoryItems; - -function GetDefaultEditDataRepositoryItems: TcxEditDataRegisteredRepositoryItems; -begin - if DefaultDataEditRepositoryItems = nil then - DefaultDataEditRepositoryItems := TcxEditDataRegisteredRepositoryItems.Create(nil); - Result := DefaultDataEditRepositoryItems; -end; - -procedure CreateDefaultRepositoryItems; -begin - GetDefaultEditDataRepositoryItems.RegisterDefaultItem(cxEditRegisteredItemsStandardVersion, - GetDefaultEditRepository.CreateItem(TcxEditRepositoryTextItem)); - GetDefaultEditDataRepositoryItems.RegisterItem(TcxBooleanValueType, cxEditRegisteredItemsStandardVersion, - GetDefaultEditRepository.CreateItem(TcxEditRepositoryCheckBoxItem)); - GetDefaultEditDataRepositoryItems.RegisterItem(TcxCurrencyValueType, cxEditRegisteredItemsStandardVersion, - GetDefaultEditRepository.CreateItem(TcxEditRepositoryCurrencyItem)); - GetDefaultEditDataRepositoryItems.RegisterItem(TcxDateTimeValueType, cxEditRegisteredItemsStandardVersion, - GetDefaultEditRepository.CreateItem(TcxEditRepositoryDateItem)); - {$IFDEF DELPHI6} - GetDefaultEditDataRepositoryItems.RegisterItem(TcxFMTBcdValueType, cxEditRegisteredItemsStandardVersion, - GetDefaultEditRepository.CreateItem(TcxEditRepositoryCurrencyItem)); - GetDefaultEditDataRepositoryItems.RegisterItem(TcxSQLTimeStampValueType, cxEditRegisteredItemsStandardVersion, - GetDefaultEditRepository.CreateItem(TcxEditRepositoryDateItem)); - {$ENDIF} -end; - -procedure DeleteDefaultRepositoryItems; -begin - GetDefaultEditDataRepositoryItems.UnregisterDefaultItem(cxEditRegisteredItemsStandardVersion); - GetDefaultEditDataRepositoryItems.UnregisterItem(TcxBooleanValueType, cxEditRegisteredItemsStandardVersion); - GetDefaultEditDataRepositoryItems.UnregisterItem(TcxCurrencyValueType, cxEditRegisteredItemsStandardVersion); - GetDefaultEditDataRepositoryItems.UnregisterItem(TcxDateTimeValueType, cxEditRegisteredItemsStandardVersion); - {$IFDEF DELPHI6} - GetDefaultEditDataRepositoryItems.UnregisterItem(TcxFMTBcdValueType, cxEditRegisteredItemsStandardVersion); - GetDefaultEditDataRepositoryItems.UnregisterItem(TcxSQLTimeStampValueType, cxEditRegisteredItemsStandardVersion); - {$ENDIF} -end; - -function GetClassID(AClass: TClass): Integer; -begin - Result := Integer(AClass); -end; - -{ TcxEditDataRegisteredRepositoryItems } - -function TcxEditDataRegisteredRepositoryItems.GetItem( - AValueTypeClass: TcxValueTypeClass): TcxEditRepositoryItem; -begin - Result := inherited GetItem(GetClassID(AValueTypeClass)); -end; - -procedure TcxEditDataRegisteredRepositoryItems.RegisterItem(AValueTypeClass: TcxValueTypeClass; - AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem); -begin - inherited RegisterItem(GetClassID(AValueTypeClass), AVersion, ARepositoryItem); -end; - -procedure TcxEditDataRegisteredRepositoryItems.UnregisterItem(AValueTypeClass: TcxValueTypeClass; - AVersion: Integer); -begin - inherited UnregisterItem(GetClassID(AValueTypeClass), AVersion); -end; - -initialization - CreateDefaultRepositoryItems; - -finalization - DeleteDefaultRepositoryItems; - FreeAndNil(DefaultDataEditRepositoryItems); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditMaskEditor.dfm b/internal/x.46/ExpressEditors Library 5/Sources/cxEditMaskEditor.dfm deleted file mode 100644 index 18d1fc99..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditMaskEditor.dfm +++ /dev/null @@ -1,266 +0,0 @@ -object cxEditMaskEditorDlg: TcxEditMaskEditorDlg - Left = 353 - Top = 212 - BorderStyle = bsDialog - Caption = 'Input Mask Editor' - ClientHeight = 322 - ClientWidth = 543 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Label1: TLabel - Left = 8 - Top = 8 - Width = 49 - Height = 13 - Caption = 'Mask kind' - Transparent = True - end - object Bevel1: TBevel - Left = 7 - Top = 37 - Width = 266 - Height = 2 - end - object cxMaskKindPickEdit1: TcxComboBox - Tag = 4 - Left = 64 - Top = 4 - Properties.DropDownListStyle = lsFixedList - Properties.Items.Strings = ( - 'Standard' - 'Regular expression' - 'Extended regular expression') - Properties.OnChange = cxMaskKindPickEdit1PropertiesChange - TabOrder = 0 - Width = 193 - end - object ButtonsPanel: TPanel - Left = 0 - Top = 281 - Width = 543 - Height = 41 - Align = alBottom - BevelOuter = bvNone - TabOrder = 3 - object CancelButton: TcxButton - Left = 440 - Top = 5 - Width = 93 - Height = 25 - Caption = 'Cancel' - TabOrder = 2 - OnClick = CancelButtonClick - end - object OKButton: TcxButton - Left = 336 - Top = 5 - Width = 93 - Height = 25 - Caption = 'OK' - TabOrder = 1 - OnClick = OKButtonClick - end - object MasksButton: TcxButton - Left = 8 - Top = 5 - Width = 93 - Height = 25 - Caption = 'Masks...' - TabOrder = 0 - OnClick = MasksButtonClick - end - end - object RegExprMaskPanel: TPanel - Left = 0 - Top = 42 - Width = 543 - Height = 239 - Align = alBottom - BevelOuter = bvNone - TabOrder = 2 - Visible = False - object Label2: TLabel - Left = 4 - Top = 12 - Width = 55 - Height = 13 - Caption = 'Input mask:' - Transparent = True - end - object Label3: TLabel - Left = 4 - Top = 48 - Width = 50 - Height = 13 - Caption = 'Test input:' - Transparent = True - end - object Label4: TLabel - Left = 12 - Top = 96 - Width = 38 - Height = 13 - Caption = 'Sample:' - Transparent = True - end - object Label5: TLabel - Left = 192 - Top = 96 - Width = 56 - Height = 13 - Caption = 'Description:' - Transparent = True - end - object Bevel2: TBevel - Left = 8 - Top = 80 - Width = 529 - Height = 2 - end - object cxEditMaskEdit: TcxTextEdit - Tag = 7 - Left = 64 - Top = 8 - TabOrder = 0 - OnKeyDown = cxEditMaskEditKeyDown - Width = 473 - end - object cxMaskEdit1: TcxMaskEdit - Tag = 4 - Left = 64 - Top = 44 - Properties.IgnoreMaskBlank = True - Properties.MaskKind = emkRegExprEx - Properties.MaxLength = 0 - TabOrder = 1 - OnEnter = cxMaskEdit1Enter - Width = 473 - end - object Memo1: TcxMemo - Left = 192 - Top = 112 - TabOrder = 2 - Height = 121 - Width = 345 - end - object ListBox1: TcxListBox - Left = 8 - Top = 112 - Width = 177 - Height = 121 - ItemHeight = 13 - TabOrder = 3 - OnClick = ListBox1Click - OnExit = ListBox1Exit - end - end - object StandardMaskPanel: TPanel - Left = 0 - Top = 42 - Width = 543 - Height = 239 - BevelOuter = bvNone - TabOrder = 1 - object Bevel3: TBevel - Left = 4 - Top = 188 - Width = 261 - Height = 2 - end - object Label6: TLabel - Left = 8 - Top = 4 - Width = 55 - Height = 13 - Caption = 'Input mask:' - Transparent = True - end - object Label7: TLabel - Left = 8 - Top = 196 - Width = 51 - Height = 13 - Caption = 'Test Input:' - Transparent = True - end - object Label8: TLabel - Left = 272 - Top = 4 - Width = 66 - Height = 13 - Caption = 'Sample mask:' - Transparent = True - end - object Label9: TLabel - Left = 140 - Top = 64 - Width = 98 - Height = 13 - Caption = 'Character for blanks:' - Transparent = True - end - object cxTextEdit1: TcxTextEdit - Tag = 21 - Left = 8 - Top = 20 - TabOrder = 0 - OnExit = cxTextEdit1Exit - OnKeyDown = cxTextEdit1KeyDown - Width = 253 - end - object cxMaskEdit2: TcxMaskEdit - Tag = 22 - Left = 8 - Top = 212 - Properties.IgnoreMaskBlank = True - TabOrder = 3 - Width = 253 - end - object cxTextEdit2: TcxTextEdit - Tag = 23 - Left = 244 - Top = 60 - Properties.MaxLength = 1 - Properties.OnChange = cxTextEdit2PropertiesChange - TabOrder = 1 - OnExit = cxTextEdit2Exit - Width = 17 - end - object cxCheckBox1: TcxCheckBox - Left = 4 - Top = 160 - Caption = 'Save literal characters' - Properties.OnChange = cxCheckBox1PropertiesChange - TabOrder = 2 - Transparent = True - Width = 153 - end - object ListView1: TListView - Left = 272 - Top = 20 - Width = 261 - Height = 213 - Columns = < - item - AutoSize = True - Caption = 'Description' - end - item - AutoSize = True - Caption = 'Sample' - end> - ReadOnly = True - RowSelect = True - TabOrder = 4 - ViewStyle = vsReport - OnSelectItem = ListView1SelectItem - end - end -end diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditMaskEditor.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEditMaskEditor.pas deleted file mode 100644 index 2c5f62ec..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditMaskEditor.pas +++ /dev/null @@ -1,968 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxEditMaskEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, SysUtils, Classes, Graphics, Controls, Forms, - cxControls, cxContainer, cxEdit, cxButtonEdit, StdCtrls, - ExtCtrls, ComCtrls, cxMaskEdit, cxButtons, Dialogs, IniFiles, cxTextEdit, - cxDropDownEdit, cxStandardMask, cxClasses, cxEditConsts, cxCheckBox, - cxGraphics, cxMemo, cxListBox, cxLookAndFeelPainters; - -type - - { EcxLoadMaskException } - - EcxLoadMaskException = class(EcxEditError); - - { TcxSample } - - TcxSample = record - ShortDescription: string; - Description: string; - Mask: string; - end; - - TcxSamples = array of TcxSample; - -var - RegExprSamples: TcxSamples; - StandardSamples: TcxSamples; - -const - DefaultRegExprSamplesCount = 20; - DefaultRegExprSamples: array[0..DefaultRegExprSamplesCount - 1] of TcxSample = - ( - ( - ShortDescription: 'Time of day'; - Description: 'The 24 hour day time:'#13#10#13#10'15:25'#13#10'2:05'#13#10'03:57'; - Mask: '(0?\d | 1\d | 2[0-3]) : [0-5]\d'; - ), - ( - ShortDescription: 'Time of day with seconds'; - Description: 'The 24 hour day time with seconds:'#13#10#13#10'12:45:10'#13#10'3:00:01'; - Mask: '(0?\d | 1\d | 2[0-3]) : [0-5]\d : [0-5]\d'; - ), - ( - ShortDescription: 'Time of day (AM/PM)'; - Description: 'The 12 hour day time:'#13#10#13#10'1:35 PM'#13#10'12:45 AM'; - Mask: '(0?[1-9] | 1[012]) : [0-5]\d '' '' (AM | PM)'; - ), - ( - ShortDescription: 'Time of day with seconds (AM/PM)'; - Description: 'The 12 hour day time with seconds:'#13#10#13#10'10:03:10 AM'#13#10'03:00:01 PM'; - Mask: '(0?[1-9] | 1[012]) : [0-5]\d : [0-5]\d '' '' (AM | PM)'; - ), - ( - ShortDescription: 'Date'; - Description: 'The mm/dd/yy or mm/dd/yyyy date with year from 1000 to 3999:'#13#10#13#10 + - '3/12/99'#13#10'06/25/1800'; - Mask: '(0?[1-9] | 1[012]) / ([012]?[1-9] | [123]0 |31) / ([123][0-9])? [0-9][0-9]'; - ), - ( - ShortDescription: 'Telephone number'; - Description: 'The telephone number with or without city code:'#13#10#13#10 + - '(345)234-12-07'#13#10'(210)7-17-81'#13#10'26-32-22'; - Mask: '(\(\d\d\d\))? \d(\d\d?)? - \d\d - \d\d'; - ), - ( - ShortDescription: 'Extension'; - Description: 'For example 15450'; - Mask: '\d\d\d\d\d'; - ), - ( - ShortDescription: 'Social security'; - Description: 'For example 555-55-5555'; - Mask: '\d\d\d - \d\d - \d\d\d\d'; - ), - ( - ShortDescription: 'Short zip code'; - Description: 'For example 11200'; - Mask: '\d\d\d\d\d'; - ), - ( - ShortDescription: 'Long zip code'; - Description: 'For example 11200-0000'; - Mask: '\d\d\d\d\d - \d\d\d\d'; - ), - ( - ShortDescription: 'Decimal number'; - Description: 'Any decimal number'; - Mask: '\d+'; - ), - ( - ShortDescription: 'Hexadecimal number'; - Description: 'Any Hexadecimal number'; - Mask: '(\d | [A-F] | [a-f])+'; - ), - ( - ShortDescription: 'Octal number'; - Description: 'Any Octal number'; - Mask: '[0-7]+'; - ), - ( - ShortDescription: 'Binary number'; - Description: 'Any Binary number'; - Mask: '[01]+'; - ), - ( - ShortDescription: 'Yes/No'; - Description: 'Yes, No, yes, no, Y, N, y or n'; - Mask: '(Y | y)(es)? | (N | n)o?'; - ), - ( - ShortDescription: 'True/False'; - Description: 'True, False, true or false'; - Mask: '(T | t)rue | (F | f)alse'; - ), - ( - ShortDescription: 'Any symbols'; - Description: 'Any symbols'; - Mask: '.+'; - ), - ( - ShortDescription: 'Letters only'; - Description: 'The any letters of the latin alphabet'; - Mask: '[a-zA-Z]+'; - ), - ( - ShortDescription: 'Uppercase letters'; - Description: 'Any uppercase letters of the latin alphabet'; - Mask: '[A-Z]+'; - ), - ( - ShortDescription: 'Lowercase letters'; - Description: 'Any lowercase letters of the latin alphabet'; - Mask: '[a-z]+'; - ) - ); - - DefaultStandardSamplesCount = 8; - DefaultStandardSamples: array[0..DefaultStandardSamplesCount - 1] of TcxSample = - ( - ( - ShortDescription: 'Phone'; - Description: '(213)144-1756'; - Mask: '!\(999\)000-0000;1;_'; - ), - ( - ShortDescription: 'Extension'; - Description: '15023'; - Mask: '!99999;1;_'; - ), - ( - ShortDescription: 'Social security'; - Description: '555-55-5555'; - Mask: '000\-00\-0000;1;_'; - ), - ( - ShortDescription: 'Short zip code'; - Description: '90628'; - Mask: '00000;1;_'; - ), - ( - ShortDescription: 'Long zip code'; - Description: '90628-0000'; - Mask: '00000\-9999;1;_'; - ), - ( - ShortDescription: 'Date'; - Description: '03/24/99'; - Mask: '!99/99/00;1;_'; - ), - ( - ShortDescription: 'Long Time'; - Description: '04:15:34 PM'; - Mask: '!90:00:00> LL;1;_'; - ), - ( - ShortDescription: 'Short Time'; - Description: '21:45'; - Mask: '!90:00;1;_'; - ) - ); - -type - { TcxEditMaskEditorDlg } - TcxEditMaskEditorDlg = class(TForm) - cxMaskKindPickEdit1: TcxComboBox; - Label1: TLabel; - StandardMaskPanel: TPanel; - RegExprMaskPanel: TPanel; - cxEditMaskEdit: TcxTextEdit; - Label2: TLabel; - Label3: TLabel; - cxMaskEdit1: TcxMaskEdit; - Bevel1: TBevel; - Label4: TLabel; - Label5: TLabel; - Bevel2: TBevel; - cxTextEdit1: TcxTextEdit; - cxMaskEdit2: TcxMaskEdit; - Bevel3: TBevel; - Label6: TLabel; - Label7: TLabel; - Label8: TLabel; - Label9: TLabel; - cxTextEdit2: TcxTextEdit; - cxCheckBox1: TcxCheckBox; - ButtonsPanel: TPanel; - Memo1: TcxMemo; - ListBox1: TcxListBox; - CancelButton: TcxButton; - OKButton: TcxButton; - MasksButton: TcxButton; - ListView1: TListView; - procedure FormShow(Sender: TObject); - procedure cxMaskKindPickEdit1PropertiesChange(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure cxEditMaskEditKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure ListBox1Click(Sender: TObject); - procedure ListBox1Exit(Sender: TObject); - procedure OKButtonClick(Sender: TObject); - procedure CancelButtonClick(Sender: TObject); - procedure ListView1SelectItem(Sender: TObject; Item: TListItem; - Selected: Boolean); - procedure cxTextEdit1Exit(Sender: TObject); - procedure cxTextEdit1KeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure cxTextEdit2Exit(Sender: TObject); - procedure cxTextEdit2PropertiesChange(Sender: TObject); - procedure MasksButtonClick(Sender: TObject); - procedure cxMaskEdit1Enter(Sender: TObject); - procedure cxCheckBox1PropertiesChange(Sender: TObject); - private - FMaskEditProperties: TcxCustomMaskEditProperties; - FLastItemIndex: Integer; - - procedure ConvertMaskBlank; - procedure CorrectMaskBlank; - procedure FormatStandardMask(var AMask: string; ANewMaskBlank: Char); overload; - procedure FormatStandardMask(var AMask: string; ANewSaveLiteralChars: Boolean); overload; - function GetCurrentMaskBlank: Char; - function GetSaveLiteralChars(const AEditMask: string): Boolean; - function GetSaveLiteralChartSymbol(const AValue: Boolean): string; - procedure LoadMaskDem(AFileName: string); - procedure LoadMaskDxm(AFileName: string); - procedure OpenMask; - procedure ShowRegExprSamples; - procedure ShowStandardSamples; - public - property MaskEditProperties: TcxCustomMaskEditProperties - read FMaskEditProperties write FMaskEditProperties; - end; - -var - cxEditMaskEditorDlg: TcxEditMaskEditorDlg; - -implementation - -{$R *.dfm} - -type - TcxCustomMaskEditPropertiesAccess = class(TcxCustomMaskEditProperties); - -procedure FreeRegExprSamples; -begin - RegExprSamples := nil; -end; - -procedure FreeStandardSamples; -begin - StandardSamples := nil; -end; - -procedure TcxEditMaskEditorDlg.FormShow(Sender: TObject); -var - AProperties: TcxCustomMaskEditPropertiesAccess; -begin - AProperties := TcxCustomMaskEditPropertiesAccess(MaskEditProperties); - cxMaskKindPickEdit1.ItemIndex := Ord(AProperties.MaskKind); - RegExprMaskPanel.Visible := AProperties.MaskKind <> emkStandard; - ShowRegExprSamples; - ShowStandardSamples; - FLastItemIndex := -1; - if AProperties.MaskKind = emkStandard then - begin - cxTextEdit2.Text := MaskBlank(AProperties.EditMask); - cxTextEdit1.Text := AProperties.EditMask; - cxMaskEdit2.Properties.MaskKind := AProperties.MaskKind; - cxMaskEdit2.Properties.EditMask := AProperties.EditMask; - cxCheckBox1.Checked := GetSaveLiteralChars(AProperties.EditMask); - end - else - begin - cxTextEdit2.Text := cxDefaultBlank; - cxEditMaskEdit.Text := AProperties.EditMask; - cxMaskEdit1.Properties.MaskKind := AProperties.MaskKind; - cxMaskEdit1.Properties.EditMask := AProperties.EditMask; - end; -end; - -procedure TcxEditMaskEditorDlg.cxMaskKindPickEdit1PropertiesChange( - Sender: TObject); -begin - if Visible then - begin - RegExprMaskPanel.Visible := cxMaskKindPickEdit1.ItemIndex <> Integer(emkStandard); - StandardMaskPanel.Visible := not RegExprMaskPanel.Visible; - if RegExprMaskPanel.Visible then - begin - cxMaskEdit1.Properties.MaskKind := TcxEditMaskKind(cxMaskKindPickEdit1.ItemIndex); - if ListBox1.Items.Count = 0 then - FLastItemIndex := -1; - end; - end; -end; - -procedure TcxEditMaskEditorDlg.FormCreate(Sender: TObject); -begin - cxMaskEdit2.Properties.MaskKind := emkStandard; - cxMaskEdit2.Properties.AlwaysShowBlanksAndLiterals := True; -end; - -procedure TcxEditMaskEditorDlg.cxEditMaskEditKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if TranslateKey(Key) = VK_RETURN then - begin - try - cxMaskEdit1.Properties.EditMask := cxEditMaskEdit.Text; - cxMaskEdit1.Enabled := True; - except - on EcxMaskEditError do - begin - cxMaskEdit1.Properties.EditMask := ''; - cxMaskEdit1.Text := ''; - cxMaskEdit1.Enabled := False; - raise; - end; - end; - end; -end; - -function TcxEditMaskEditorDlg.GetCurrentMaskBlank: Char; -begin - Result := Char(cxTextEdit2.Text[1]); -end; - -function TcxEditMaskEditorDlg.GetSaveLiteralChars(const AEditMask: string): Boolean; -var - ALen: Integer; -begin - Result := True; - ALen := Length(AEditMask); - if ALen >= 2 then - begin - if ALen >= 4 then - begin - if AEditMask[ALen - 3] = ';' then - begin - if AEditMask[ALen - 1] = ';' then - Result := not (AEditMask[ALen - 2] = '0'); - end - else - begin - if AEditMask[ALen - 1] = ';' then - Result := not (AEditMask[ALen] = '0'); - end; - end - else - begin - if AEditMask[ALen - 1] = ';' then - Result := not (AEditMask[ALen] = '0'); - end; - end; -end; - -function TcxEditMaskEditorDlg.GetSaveLiteralChartSymbol(const AValue: Boolean): string; -begin - if AValue then - Result := '1' - else - Result := '0'; -end; - -procedure TcxEditMaskEditorDlg.LoadMaskDem(AFileName: string); -var - AMemoryStream: TMemoryStream; - - function GetNextToken(AIndex: Integer): Char; - begin - Result := Char(PByteArray(AMemoryStream.Memory)^[AIndex]); - end; - -var - ASamples: TcxSamples; - AShortDescription: string; - ADescription: string; - AMask: string; - - procedure AddSample; - begin - SetLength(ASamples, Length(ASamples) + 1); - ASamples[Length(ASamples) - 1].ShortDescription := AShortDescription; - ASamples[Length(ASamples) - 1].Description := ADescription; - ASamples[Length(ASamples) - 1].Mask := AMask; - - AShortDescription := ''; - ADescription := ''; - AMask := ''; - end; - -var - AStringNumber: Integer; - AToken: Char; - I: Integer; -begin - AMemoryStream := TMemoryStream.Create; - - AMemoryStream.LoadFromFile(AFileName); - AStringNumber := 0; - AShortDescription := ''; - ADescription := ''; - AMask := ''; - - try - for I := 0 to AMemoryStream.Size - 1 do - begin - AToken := GetNextToken(I); - - if (AToken = ' ') or (AToken = #9) then - begin - if ((AStringNumber = 0) and (AShortDescription = '')) or - ((AStringNumber = 1) and (ADescription = '')) or - ((AStringNumber = 2) and (AMask = '')) then - Continue; - end - else if AToken = #10 then - begin - if (AStringNumber = 2) then - begin - ADescription := FormatText(ADescription, AMask, GetCurrentMaskBlank); - AddSample; - AStringNumber := 0; - end - else - begin - if not ((AStringNumber = 0) and (AShortDescription = '')) then - raise EcxLoadMaskException.Create(cxGetResourceString(@scxMaskEditIllegalFileFormat)); - end; - end - else if AToken = '|' then - begin - if AStringNumber >= 2 then - raise EcxLoadMaskException.Create(cxGetResourceString(@scxMaskEditIllegalFileFormat)) - else - Inc(AStringNumber); - end - else - begin - if AToken <> #13 then - begin - case AStringNumber of - 0: AShortDescription := AShortDescription + AToken; - 1: ADescription := ADescription + AToken; - 2: AMask := AMask + AToken; - end; - end; - end; - end; - - if (AShortDescription <> '') or (ADescription <> '') or (AMask <> '') then - AddSample; - - if Length(ASamples) > 0 then - begin - FreeStandardSamples; - StandardSamples := ASamples; - ShowStandardSamples; - cxTextEdit1.Text := ''; - cxMaskEdit2.Properties.EditMask := ''; - cxCheckBox1.Checked := True; - end - else - raise EcxLoadMaskException.Create(cxGetResourceString(@scxMaskEditEmptyMaskCollectionFile)); - finally - AMemoryStream.Free; - end; -end; - -procedure TcxEditMaskEditorDlg.LoadMaskDxm(AFileName: string); -var - AStandardSamples: TcxSamples; - ARegExprSamples: TcxSamples; - AShortDescription: string; - ADescription: string; - AMask: string; - - procedure NewSample(var ASamples: TcxSamples); - begin - SetLength(ASamples, Length(ASamples) + 1); - ASamples[Length(ASamples) - 1].ShortDescription := AShortDescription; - ASamples[Length(ASamples) - 1].Description := ADescription; - ASamples[Length(ASamples) - 1].Mask := AMask; - end; - - procedure ClearValues; - begin - AShortDescription := ''; - ADescription := ''; - AMask := ''; - end; - - procedure AddStandardSample; - begin - NewSample(AStandardSamples); - ClearValues; - end; - - procedure AddRegExprSample; - begin - NewSample(ARegExprSamples); - ClearValues; - end; - -var - AFile: TMemIniFile; - ASections: TStringList; - AKeys: TStringList; - I: Integer; -begin - AFile := TMemIniFile.Create(AFileName); - ASections := TStringList.Create; - AKeys := TStringList.Create; - - try - AFile.ReadSections(ASections); - for I := 0 to ASections.Count - 1 do - begin - AFile.ReadSection(ASections[I], AKeys); - if AKeys.Count > 3 then - raise EcxLoadMaskException.Create(cxGetResourceString(@scxMaskEditIllegalFileFormat)) - else - begin - AShortDescription := AFile.ReadString(ASections[I], 'ShortDescription', ''); - ADescription := AFile.ReadString(ASections[I], 'Description', ''); - AMask := AFile.ReadString(ASections[I], 'Mask', ''); - if (AShortDescription = '') and (ADescription = '') and (AMask = '') then - Continue; - - if Pos('Standard', ASections[I]) <> 0 then - AddStandardSample - else if Pos('RegExpr', ASections[I]) <> 0 then - AddRegExprSample - else - raise EcxLoadMaskException.Create(cxGetResourceString(@scxMaskEditIllegalFileFormat)); - end; - end; - - if (Length(AStandardSamples) = 0) and (Length(ARegExprSamples) = 0) then - raise EcxLoadMaskException.Create(cxGetResourceString(@scxMaskEditEmptyMaskCollectionFile)); - - FreeStandardSamples; - StandardSamples := AStandardSamples; - ShowStandardSamples; - cxTextEdit1.Text := ''; - cxMaskEdit2.Properties.EditMask := ''; - cxCheckBox1.Checked := True; - - FreeRegExprSamples; - RegExprSamples := ARegExprSamples; - ShowRegExprSamples; - cxEditMaskEdit.Text := ''; - cxMaskEdit1.Properties.EditMask := ''; - - finally - AFile.Free; - AKeys.Free; - ASections.Free; - end; -end; - -procedure TcxEditMaskEditorDlg.OpenMask; -var - ADialog: TOpenDialog; - AExt: string; -begin - ADialog := TOpenDialog.Create(nil); - ADialog.Options := []; - ADialog.Filter := cxGetResourceString(@scxMaskEditMaskCollectionFiles) + ' (*.dem, *.dxm )|*.dem;*.dxm'; - try - if ADialog.Execute then - begin - AExt := ExtractFileExt(ADialog.Files[0]); - if LowerCase(AExt) = '.dem' then - LoadMaskDem(ADialog.Files[0]) - else if LowerCase(AExt) = '.dxm' then - LoadMaskDxm(ADialog.Files[0]); - end; - finally - ADialog.Free; - end; -end; - -procedure TcxEditMaskEditorDlg.ShowRegExprSamples; -var - I: Integer; -begin - ListBox1.Items.Clear; - if RegExprSamples = nil then - begin - for I := 0 to DefaultRegExprSamplesCount - 1 do - ListBox1.Items.Add(DefaultRegExprSamples[I].ShortDescription); - end - else - begin - for I := 0 to Length(RegExprSamples) - 1 do - ListBox1.Items.Add(RegExprSamples[I].ShortDescription); - end; -end; - -procedure TcxEditMaskEditorDlg.ShowStandardSamples; -var - I: Integer; - AItem: TListItem; -begin - ListView1.Items.Clear; - if StandardSamples = nil then - begin - for I := 0 to DefaultStandardSamplesCount - 1 do - begin - AItem := ListView1.Items.Add; - AItem.Caption := DefaultStandardSamples[I].ShortDescription; - AItem.SubItems.Add(DefaultStandardSamples[I].Description); - end; - end - else - begin - for I := 0 to Length(StandardSamples) - 1 do - begin - AItem := ListView1.Items.Add; - AItem.Caption := StandardSamples[I].ShortDescription; - AItem.SubItems.Add(StandardSamples[I].Description); - end; - end; -end; - -procedure TcxEditMaskEditorDlg.ListBox1Click(Sender: TObject); -begin - Memo1.Clear; - if RegExprSamples = nil then - begin - Memo1.Lines.Add(DefaultRegExprSamples[ListBox1.ItemIndex].Description); - cxEditMaskEdit.Text := DefaultRegExprSamples[ListBox1.ItemIndex].Mask; - end - else - begin - Memo1.Lines.Add(RegExprSamples[ListBox1.ItemIndex].Description); - cxEditMaskEdit.Text := RegExprSamples[ListBox1.ItemIndex].Mask; - end; - - try - cxMaskEdit1.Properties.EditMask := cxEditMaskEdit.Text; - cxMaskEdit1.Enabled := True; - except - on EcxMaskEditError do - begin - cxMaskEdit1.Properties.EditMask := ''; - cxMaskEdit1.Text := ''; - cxMaskEdit1.Enabled := False; - raise; - end; - end; -end; - -procedure TcxEditMaskEditorDlg.ListBox1Exit(Sender: TObject); -begin - if ListBox1.ItemIndex <> FLastItemIndex then - begin - cxMaskEdit1.Text := ''; - FLastItemIndex := ListBox1.ItemIndex; - end; -end; - -procedure TcxEditMaskEditorDlg.OKButtonClick(Sender: TObject); -begin - if cxMaskKindPickEdit1.ItemIndex = Integer(emkStandard) then - begin - CorrectMaskBlank; - cxMaskEdit2.Properties.EditMask := ''; - cxMaskEdit2.Text := ''; - cxMaskEdit2.Properties.EditMask := cxTextEdit1.Text; - TcxCustomMaskEditPropertiesAccess(MaskEditProperties).MaskKind := - emkStandard; - TcxCustomMaskEditPropertiesAccess(MaskEditProperties).EditMask := - cxMaskEdit2.Properties.EditMask; - ModalResult := mrOk; - end - else - try - cxMaskEdit1.Properties.EditMask := cxEditMaskEdit.Text; - cxMaskEdit1.Enabled := True; - TcxCustomMaskEditPropertiesAccess(MaskEditProperties).MaskKind := - TcxEditMaskKind(cxMaskKindPickEdit1.ItemIndex); - TcxCustomMaskEditPropertiesAccess(MaskEditProperties).EditMask := - cxMaskEdit1.Properties.EditMask; - ModalResult := mrOk; - except - on EcxMaskEditError do - begin - cxMaskEdit1.Properties.EditMask := ''; - cxMaskEdit1.Text := ''; - cxMaskEdit1.Enabled := False; - cxEditMaskEdit.SetFocus; - raise; - end; - end; -end; - -procedure TcxEditMaskEditorDlg.CancelButtonClick(Sender: TObject); -begin - ModalResult := mrCancel; -end; - -procedure TcxEditMaskEditorDlg.ListView1SelectItem(Sender: TObject; - Item: TListItem; Selected: Boolean); -begin - if Selected then - begin - if StandardSamples = nil then - cxTextEdit1.Text := DefaultStandardSamples[ListView1.Selected.Index].Mask - else - cxTextEdit1.Text := StandardSamples[ListView1.Selected.Index].Mask; - - CorrectMaskBlank; - cxMaskEdit2.Properties.EditMask := ''; - cxMaskEdit2.Text := ''; - cxMaskEdit2.Properties.EditMask := cxTextEdit1.Text; - cxCheckBox1.Checked := GetSaveLiteralChars(cxTextEdit1.Text); - end; -end; - -procedure TcxEditMaskEditorDlg.cxTextEdit1Exit(Sender: TObject); -begin - begin - CorrectMaskBlank; - cxMaskEdit2.Properties.EditMask := ''; - cxMaskEdit2.Text := ''; - cxMaskEdit2.Properties.EditMask := cxTextEdit1.Text; - cxCheckBox1.Checked := GetSaveLiteralChars(cxTextEdit1.Text); - end; -end; - -procedure TcxEditMaskEditorDlg.cxTextEdit1KeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if TranslateKey(Key) = VK_RETURN then - begin - CorrectMaskBlank; - cxMaskEdit2.Properties.EditMask := ''; - cxMaskEdit2.Text := ''; - cxMaskEdit2.Properties.EditMask := cxTextEdit1.Text; - cxCheckBox1.Checked := GetSaveLiteralChars(cxTextEdit1.Text); - end; -end; - -procedure TcxEditMaskEditorDlg.FormatStandardMask(var AMask: string; ANewMaskBlank: Char); -var - AOldMaskBlank: Char; - ASaveLiteralChars: Boolean; - AMaskLength: Integer; -begin - AOldMaskBlank := MaskBlank(AMask); - ASaveLiteralChars := SaveLiteralChars(AMask); - if AOldMaskBlank <> ANewMaskBlank then - begin - AMaskLength := Length(AMask); - - if AMaskLength < 4 then - begin - if (AMaskLength = 2) and (AMask[1] = ';') and ((AMask[2] = '0') or (AMask[2] = '1')) then - AMask := AMask + ';' + ANewMaskBlank - else - AMask := AMask + ';' + GetSaveLiteralChartSymbol(ASaveLiteralChars) + ';' + ANewMaskBlank; - end - else - begin - if (AMask[AMaskLength - 1] = ';') and (AMask[AMaskLength - 3] = ';') and - ((AMask[AMaskLength - 2] = '0') or (AMask[AMaskLength - 2] = '1')) then - begin - Delete(AMask, AMaskLength,1); - AMask := AMask + ANewMaskBlank; - end - else if (AMask[AMaskLength - 1] = ';') and ((AMask[AMaskLength] = '0') or (AMask[AMaskLength] = '1')) then - AMask := AMask + ';' + ANewMaskBlank - else - AMask := AMask + ';' + GetSaveLiteralChartSymbol(ASaveLiteralChars) + ';' + ANewMaskBlank; - end; - end; -end; - -procedure TcxEditMaskEditorDlg.FormatStandardMask(var AMask: string; ANewSaveLiteralChars: Boolean); -var - AMaskLength: Integer; - AMaskBlank: Char; -begin - AMaskLength := Length(AMask); - AMaskBlank := MaskBlank(AMask); - if ANewSaveLiteralChars <> SaveLiteralChars(AMask) then - begin - if AMaskLength < 4 then - begin - if (AMaskLength = 2) and (AMask[1] = ';') and ((AMask[2] = '0') or (AMask[2] = '1')) then - begin - Delete(AMask, AMaskLength, 1); - AMask := AMask + GetSaveLiteralChartSymbol(ANewSaveLiteralChars); - end - else - AMask := AMask + ';' + GetSaveLiteralChartSymbol(ANewSaveLiteralChars) + ';' + AMaskBlank; - end - else - begin - if (AMask[AMaskLength - 1] = ';') and (AMask[AMaskLength - 3] = ';') and - ((AMask[AMaskLength - 2] = '0') or (AMask[AMaskLength - 2] = '1')) then - begin - Delete(AMask, AMaskLength - 2, 1); - Insert(GetSaveLiteralChartSymbol(ANewSaveLiteralChars), AMask, AMaskLength - 2); - end - else if (AMask[AMaskLength - 1] = ';') and ((AMask[AMaskLength] = '0') or (AMask[AMaskLength] = '1')) then - begin - Delete(AMask, AMaskLength, 1); - AMask := AMask + GetSaveLiteralChartSymbol(ANewSaveLiteralChars); - end - else - AMask := AMask + ';' + GetSaveLiteralChartSymbol(ANewSaveLiteralChars) + ';' + AMaskBlank; - end; - end; -end; - -procedure TcxEditMaskEditorDlg.cxTextEdit2Exit(Sender: TObject); -begin - ConvertMaskBlank; -end; - -procedure TcxEditMaskEditorDlg.ConvertMaskBlank; -begin - if Length(cxTextEdit2.Text) > 0 then - begin - if string(cxTextEdit2.Text)[1] < #32 then - cxTextEdit2.Text := '_'; - end - else - cxTextEdit2.Text := '_'; -end; - -procedure TcxEditMaskEditorDlg.cxTextEdit2PropertiesChange( - Sender: TObject); -var - AMask: string; -begin - ConvertMaskBlank; - - AMask := cxTextEdit1.Text; - FormatStandardMask(AMask, string(cxTextEdit2.Text)[1]); - cxTextEdit1.Text := AMask; - cxMaskEdit2.Properties.EditMask := AMask; - cxCheckBox1.Checked := GetSaveLiteralChars(AMask); -end; - -procedure TcxEditMaskEditorDlg.CorrectMaskBlank; -var - AMask: string; -begin - AMask := cxTextEdit1.Text; - cxTextEdit2.Text := MaskBlank(AMask); - if Length(cxTextEdit2.Text) > 0 then - FormatStandardMask(AMask, string(cxTextEdit2.Text)[1]) - else - begin - FormatStandardMask(AMask, '_'); - cxTextEdit2.Text := '_'; - end; - cxTextEdit1.Text := AMask; -end; - -procedure TcxEditMaskEditorDlg.MasksButtonClick(Sender: TObject); -begin - OpenMask; -end; - -procedure TcxEditMaskEditorDlg.cxMaskEdit1Enter(Sender: TObject); -begin - try - cxMaskEdit1.Properties.EditMask := cxEditMaskEdit.Text; - cxMaskEdit1.Enabled := True; - except - on EcxMaskEditError do - begin - cxMaskEdit1.Properties.EditMask := ''; - cxMaskEdit1.Text := ''; - cxMaskEdit1.Enabled := False; - cxEditMaskEdit.SetFocus; - raise; - end; - end; -end; - -procedure TcxEditMaskEditorDlg.cxCheckBox1PropertiesChange( - Sender: TObject); -var - AMask: string; -begin - AMask := cxTextEdit1.Text; - if Length(cxTextEdit2.Text) > 0 then - FormatStandardMask(AMask, Char(cxTextEdit2.Text[1])); - FormatStandardMask(AMask, cxCheckBox1.Checked); - cxTextEdit1.Text := AMask; - cxMaskEdit2.Properties.EditMask := AMask; -end; - -initialization - RegExprSamples := nil; - StandardSamples := nil; - -finalization - FreeRegExprSamples; - FreeStandardSamples; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditPaintUtils.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEditPaintUtils.pas deleted file mode 100644 index aa2a1e1e..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditPaintUtils.pas +++ /dev/null @@ -1,336 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxEditPaintUtils; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, Controls, Graphics, SysUtils, cxClasses, - cxControls, cxGraphics, cxLookAndFeels; - -const - cxSolidBrushCacheDefaultMaxDepth = 128; - -type - { TcxSolidBrushCache } - - TcxSolidBrushCache = class - private - FBrushColors: array of TColor; - FBrushes: array of TBrushHandle; - FCounts: array of Cardinal; - FDepth: Integer; - FMaxDepth: Integer; - FSystemPaletteChangedNotifier: TcxSystemPaletteChangedNotifier; - protected - procedure SystemPaletteChanged; virtual; - public - constructor Create; overload; - constructor Create(AMaxDepth: Integer); overload; - destructor Destroy; override; - procedure Clear; - function GetBrush(ABrushColor: TColor): TBrushHandle; - end; - -function GetSolidBrush(ABrushColor: TColor): TBrushHandle; overload; -function GetSolidBrush(ACanvas: TCanvas; ABrushColor: TColor): TBrushHandle; overload; -function GetSolidBrush(ACanvas: TcxCanvas; ABrushColor: TColor): TBrushHandle; overload; -procedure ResetSolidBrushCache; - -implementation - -uses - Forms; - -const - cxSysColorPrefix: Cardinal = {$IFDEF DELPHI7}clSystemColor{$ELSE}$80000000{$ENDIF}; - -var - FSolidBrushCache: TcxSolidBrushCache = nil; - FSystemBrushes: array of TBrushHandle; - -function GetSolidBrush(ABrushColor: TColor): TBrushHandle; -begin - Result := FSolidBrushCache.GetBrush(ABrushColor); -end; - -function GetSolidBrush(ACanvas: TCanvas; ABrushColor: TColor): TBrushHandle; -begin - Result := FSolidBrushCache.GetBrush(ABrushColor); -end; - -function GetSolidBrush(ACanvas: TcxCanvas; ABrushColor: TColor): TBrushHandle; -begin - Result := FSolidBrushCache.GetBrush(ABrushColor); -end; - -procedure ResetSolidBrushCache; -begin - FSolidBrushCache.Clear; -end; - -procedure CreateSystemBrushes; -var - I: Word; -begin - SetLength(FSystemBrushes, COLOR_ENDCOLORS - COLOR_SCROLLBAR + 1); - for I := COLOR_SCROLLBAR to COLOR_ENDCOLORS do - FSystemBrushes[I] := GetSysColorBrush(I); -end; - -procedure DestroySystemBrushes; -begin - FSystemBrushes := nil; -end; - -{ TcxSolidBrushCache } - -constructor TcxSolidBrushCache.Create; -begin - Create(cxSolidBrushCacheDefaultMaxDepth); -end; - -constructor TcxSolidBrushCache.Create(AMaxDepth: Integer); -begin - inherited Create; - FMaxDepth := AMaxDepth; - SetLength(FBrushColors, FMaxDepth); - SetLength(FBrushes, FMaxDepth); - SetLength(FCounts, FMaxDepth); - FSystemPaletteChangedNotifier := TcxSystemPaletteChangedNotifier.Create(True); - FSystemPaletteChangedNotifier.OnSystemPaletteChanged := SystemPaletteChanged; -end; - -destructor TcxSolidBrushCache.Destroy; -begin - FreeAndNil(FSystemPaletteChangedNotifier); - Clear; - FBrushColors := nil; - FBrushes := nil; - FCounts := nil; - inherited Destroy; -end; - -procedure TcxSolidBrushCache.Clear; -var - I: Integer; -begin - for I := 0 to FDepth - 1 do - DeleteObject(FBrushes[I]); - FDepth := 0; -end; - -function TcxSolidBrushCache.GetBrush(ABrushColor: TColor): TBrushHandle; - - function GetColorIndex(AColor: TColor; out AIndex: Integer): Boolean; assembler; - var - ADepth: Integer; - APBrushColors, APIndex: ^Integer; - begin - ADepth := FDepth; - APBrushColors := @FBrushColors[0]; - APIndex := @AIndex; - asm - push ebx - push edi - push esi - - mov edi, ADepth - or edi, edi - jne @@0 - mov eax, edi - jmp @@5 - @@0: - mov ebx, APBrushColors - mov edx, AColor - mov esi, ebx - dec edi - shl edi, 2 - add esi, edi - jmp @@3 - @@1: - mov edi, ebx - add edi, esi - shr edi, 1 - and di, $FFFC - cmp edx, [edi] - je @@4 - ja @@2 - mov esi, edi - sub edi, ebx - jmp @@3 - @@2: - mov ebx, edi - sub edi, esi - neg edi - @@3: - cmp edi, 4 - ja @@1 - mov edi, ebx - cmp edx, [edi] - jbe @@4 - mov edi, esi - cmp edx, [edi] - jbe @@4 - add edi, 4 - @@4: - mov eax, edi - sub eax, APBrushColors - shr eax, 2 - @@5: - mov ebx, APIndex - mov [ebx], eax - cmp eax, ADepth - jae @@6 - shl eax, 2 - add eax, APBrushColors - cmp [eax], edx - jne @@6 - xor al, al - inc al - jmp @@7 - @@6: - xor al, al - @@7: - pop esi - pop edi - pop ebx - mov Result, al - end; - end; - - function GetRarestColorIndex: Integer; - var - ADepth: Integer; - APCounts: ^Integer; - begin - ADepth := FDepth; - APCounts := @FCounts[0]; - asm - push ebx - push esi - - mov ebx, APCounts - mov eax, [ebx] - mov ecx, ADepth - mov edx, ebx - @@0: - dec ecx - jz @@1 - add ebx, 4 - mov esi, [ebx] - cmp eax, esi - jbe @@0 - mov eax, esi - mov edx, ebx - jmp @@0 - @@1: - sub edx, APCounts - shr edx, 2 - mov Result, edx - - pop esi - pop ebx - end; - end; - - function PrepareNewItem(AIndex: Integer): TBrushHandle; - var - ACount, ARarestColorIndex: Integer; - begin - if FDepth = FMaxDepth then - begin - ARarestColorIndex := GetRarestColorIndex; - DeleteObject(FBrushes[ARarestColorIndex]); - Dec(FDepth); - if ARarestColorIndex < FDepth then - begin - ACount := (FDepth - ARarestColorIndex) shl 2; - Move(FBrushColors[ARarestColorIndex + 1], FBrushColors[ARarestColorIndex], ACount); - Move(FBrushes[ARarestColorIndex + 1], FBrushes[ARarestColorIndex], ACount); - Move(FCounts[ARarestColorIndex + 1], FCounts[ARarestColorIndex], ACount); - end; - if AIndex > ARarestColorIndex then - Dec(AIndex); - end; - if AIndex < FDepth then - begin - ACount := (FDepth - AIndex) shl 2; - Move(FBrushColors[AIndex], FBrushColors[AIndex + 1], ACount); - Move(FBrushes[AIndex], FBrushes[AIndex + 1], ACount); - Move(FCounts[AIndex], FCounts[AIndex + 1], ACount); - end; - Inc(FDepth); - Result := CreateSolidBrush(ColorToRGB(ABrushColor)); - FBrushColors[AIndex] := ABrushColor; - FBrushes[AIndex] := Result; - FCounts[AIndex] := 0; - end; - -var - AColorIndex: Integer; -begin - if FSystemBrushes <> nil then - if (Cardinal(ABrushColor) >= cxSysColorPrefix) and (Cardinal(ABrushColor) <= cxSysColorPrefix or COLOR_ENDCOLORS) then - begin - Result := FSystemBrushes[ABrushColor and not cxSysColorPrefix]; - Exit; - end; - if GetColorIndex(ABrushColor, AColorIndex) then - begin - Inc(FCounts[AColorIndex]); - Result := FBrushes[AColorIndex]; - end - else - Result := PrepareNewItem(AColorIndex); -end; - -procedure TcxSolidBrushCache.SystemPaletteChanged; -begin - Clear; -end; - -initialization - CreateSystemBrushes; - FSolidBrushCache := TcxSolidBrushCache.Create; - -finalization - FreeAndNil(FSolidBrushCache); - DestroySystemBrushes; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditPropEditors.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEditPropEditors.pas deleted file mode 100644 index d5282d63..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditPropEditors.pas +++ /dev/null @@ -1,1230 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxEditPropEditors; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - {$IFNDEF CBUILDER10} - DBReg, - {$ENDIF} - DesignEditors, DesignIntf, VCLEditors, - Types, -{$ELSE} - DsgnIntf, DBReg, -{$ENDIF} -{$IFDEF DELPHI10} - WideStrings, -{$ENDIF} - Windows, Forms, Classes, Controls, DB, Graphics, ImgList, TypInfo, cxContainer, - cxDataStorage, cxEdit, cxEditRepositoryItems, cxLookAndFeels, cxPropEditors, - cxDesignWindows, dxCoreReg, cxLibraryReg; - -const -// cxEditPropEditorsVersion = '6.25'; - cxEditPropEditorsMajorVersion = '6'; - cxEditorsLibraryProductName = 'ExpressEditors Library'; - -type - { TDBStringProperty } - - TDBStringProperty = class(TStringProperty) - public - function GetAttributes: TPropertyAttributes; override; - procedure GetValueList(AList: TStrings); virtual; - procedure GetValues(Proc: TGetStrProc); override; - end; - -{$IFDEF CBUILDER10} - { TcxDataFieldProperty } - - TcxDataFieldProperty = class(TDBStringProperty) - public - function GetDataSourcePropName: string; virtual; - procedure GetValueList(AList: TStrings); override; - end; -{$ELSE} - TcxDataFieldProperty = class(TDataFieldProperty) - public - procedure GetValueList(List: {$IFDEF DELPHI10}TWideStrings{$ELSE}TStrings{$ENDIF}); override; - end; -{$ENDIF} - - { TcxValueTypeProperty } - - TcxValueTypeProperty = class(TStringProperty) - protected - function IsValueTypeClassValid(AValueTypeClass: TcxValueTypeClass): Boolean; virtual; - public - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - end; - - { TFieldNameProperty } - - TFieldNameProperty = class(TDBStringProperty) - public - function GetDataSource: TDataSource; virtual; - function GetDataSourcePropName: string; virtual; - procedure GetValueList(AList: TStrings); override; - end; - - { TcxCustomEditorsLibraryComponentEditor } - - TcxCustomEditorsLibraryComponentEditor = class(TdxComponentEditor) - protected - function GetProductMajorVersion: string; override; - function GetProductName: string; override; - end; - - { TcxEditComponentEditor } - - TcxEditComponentEditor = class(TcxCustomEditorsLibraryComponentEditor) - private - function GetEdit: TcxCustomEdit; - protected - function InternalGetVerb(Index: Integer): string; override; - function InternalGetVerbCount: Integer; override; - procedure InternalExecuteVerb(AIndex: Integer); override; - public - procedure Edit; override; - end; - - { TcxEditRepositoryItemProperty } - - TcxEditRepositoryItemProperty = class(TComponentProperty) - private - FStrProc: TGetStrProc; - procedure StrProc(const S: string); - public - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - end; - - { TcxLookupEditListSourceProperty } - - TcxLookupEditListSourceProperty = class(TcxDataFieldProperty) - public - function GetDataSourcePropName: string; override; - end; - - { TcxEditPropertiesEventEditor } - - TcxEditPropertiesEventEditor = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - public - function GetName: string; override; - end; - - { TcxEditRepositoryItemPropertiesEventEditor } - - TcxEditRepositoryItemPropertiesEventEditor = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - public - function GetName: string; override; - end; - - { TcxNavigatorButtonsEventEditor } - - TcxNavigatorButtonsEventEditor = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - public - function GetName: string; override; - end; - - { TcxGEPropertiesImageIndexProperty } - - TcxGEPropertiesImageIndexProperty = class(TImageIndexProperty) - public - function GetImages: TCustomImageList; override; - end; - - { TcxGEItemImageIndexProperty } - - TcxGEItemImageIndexProperty = class(TImageIndexProperty) - public - function GetImages: TCustomImageList; override; - end; - - { TcxEditorsLibraryComponentEditorEx } - - TcxEditorsLibraryComponentEditorEx = class(TcxCustomEditorsLibraryComponentEditor) - protected - function GetEditItemCaption: string; virtual; - procedure ExecuteEditAction; virtual; abstract; - - function InternalGetVerb(AIndex: Integer): string; override; - function InternalGetVerbCount: Integer; override; - procedure InternalExecuteVerb(AIndex: Integer); override; - end; - - { TcxEditRepositoryComponentEditor } - - TcxEditRepositoryComponentEditor = class(TcxEditorsLibraryComponentEditorEx) - private - function GetEditRepository: TcxEditRepository; - protected - procedure ExecuteEditAction; override; - end; - - { TcxEditMaskProperty } - - TcxEditMaskProperty = class(TStringProperty) - public - function GetAttributes: TPropertyAttributes; override; - procedure Edit; override; - end; - - { TcxTextProperty } - - TcxTextProperty = class(TStringProperty) - private - function CanShowDialog: Boolean; - public - function GetAttributes: TPropertyAttributes; override; - procedure Edit; override; - end; - - { TGraphicClassNameProperty } - - TGraphicClassNameProperty = class(TStringProperty) - public - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - end; - -{$IFDEF DELPHI6} - TcxButtonSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - - TcxComboBoxSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; -{$ENDIF} - - { TcxFilterControlComponentEditor } - - TcxFilterControlComponentEditor = class(TcxDefaultEditor) - protected - function GetProductMajorVersion: string; override; - function GetProductName: string; override; - end; - - { TcxNavigatorControlProperty } - - TcxNavigatorControlProperty = class(TComponentProperty) - private - FStrProc: TGetStrProc; - procedure StrProc(const S: string); - public - procedure GetValues(Proc: TGetStrProc); override; - end; - - { TcxEditorsLibraryComponentEditor } - - TcxEditorsLibraryComponentEditor = class(TcxEditorsLibraryComponentEditorEx) - public - procedure Edit; override; - end; - - { TcxEditorsLibraryComponentWithStylesEditor } - - TcxEditorsLibraryComponentWithStylesEditor = class(TcxEditorsLibraryComponentEditor) - protected - function GetEditItemCaption: string; override; - procedure ExecuteEditAction; override; - procedure RestoreStyles; virtual; abstract; - end; - - { TcxEditorsLibraryComponentWithoutStylesEditor } - - TcxEditorsLibraryComponentWithoutStylesEditor = class(TcxEditorsLibraryComponentEditor) - protected - function GetEditItemCaption: string; override; - procedure ExecuteEditAction; override; - function GetLookAndFeel: TcxLookAndFeel; virtual; abstract; - end; - - { TcxEditStyleControllerEditor } - - TcxEditStyleControllerEditor = class(TcxEditorsLibraryComponentWithStylesEditor) - protected - procedure RestoreStyles; override; - public - procedure Edit; override; - end; - - { TcxDefaultEditStyleControllerEditor } - - TcxDefaultEditStyleControllerEditor = class(TcxEditorsLibraryComponentWithStylesEditor) - protected - procedure RestoreStyles; override; - public - procedure Edit; override; - end; - - { TcxCustomButtonComponentEditor } - - TcxCustomButtonComponentEditor = class(TcxEditorsLibraryComponentWithoutStylesEditor) - protected - function GetLookAndFeel: TcxLookAndFeel; override; - end; - - { TcxRadioButtonComponentEditor } - - TcxRadioButtonComponentEditor = class(TcxEditorsLibraryComponentWithoutStylesEditor) - protected - function GetLookAndFeel: TcxLookAndFeel; override; - end; - - { TcxContainerComponentEditor } - - TcxContainerComponentEditor = class(TcxEditorsLibraryComponentWithStylesEditor) - protected - procedure RestoreStyles; override; - end; - - { TcxCustomNavigatorComponentEditor } - - TcxCustomNavigatorComponentEditor = class(TcxEditorsLibraryComponentWithoutStylesEditor) - protected - function GetLookAndFeel: TcxLookAndFeel; override; - function InternalGetVerb(AIndex: Integer): string; override; - function InternalGetVerbCount: Integer; override; - procedure InternalExecuteVerb(AIndex: Integer); override; - public - procedure Edit; override; - end; - - { TcxCustomImagePropertiesProperty } - - TcxCustomImagePropertiesProperty = class(TcxEditPropertiesEventEditor) - private - FProc: {$IFNDEF DELPHI6}TGetPropEditProc{$ELSE}TGetPropProc{$ENDIF}; - procedure GetPropProc({$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); - public - procedure GetProperties(Proc: {$IFNDEF DELPHI6}TGetPropEditProc{$ELSE}TGetPropProc{$ENDIF}); override; - end; - - { TcxEditPropertiesAssignedValuesProperty } - - TcxEditPropertiesAssignedValuesProperty = class(TClassProperty) - private - FProc: {$IFNDEF DELPHI6}TGetPropEditProc{$ELSE}TGetPropProc{$ENDIF}; - procedure GetPropProc({$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); - function IsVisibleProperty(const APropertyName: string): Boolean; - public - procedure GetProperties( - Proc: {$IFNDEF DELPHI6}TGetPropEditProc{$ELSE}TGetPropProc{$ENDIF}); override; - function GetValue: string; override; - end; - - { TcxDefaultEditStyleControllerStyleProperty } - - TcxDefaultEditStyleControllerStyleProperty = class(TcxStyleControllerStyleProperty) - protected - function GetStyle: TcxContainerStyle; override; - function IsPropertyVisible(const APropertyName: string): Boolean; override; - end; - - { TcxNavigatorButtonImageIndexProperty } - - TcxNavigatorButtonImageIndexProperty = class(TImageIndexProperty) - public - function GetImages: TCustomImageList; override; - end; - -{$IFDEF DELPHI10} - TcxEditGuidelines = class(TWinControlGuidelines) - private - function GetEdit: TcxCustomEdit; - protected - function GetCount: Integer; override; - function GetDesignerGuideOffset(Index: Integer): Integer; override; - function GetDesignerGuideType(Index: Integer): TDesignerGuideType; override; - property Edit: TcxCustomEdit read GetEdit; - end; -{$ENDIF} - - TMethodParam = record - Flags: TParamFlags; - Name: ShortString; - TypeName: ShortString; - end; - -procedure ShowEventMethod( - ADesigner: IDesigner; - AInstance: TObject; const AEventName, AMethodName: string; - const AMethodParams: array of TMethodParam); - -implementation - -uses - SysUtils, cxButtons, cxClasses, cxControls, cxEditMaskEditor, - cxEditRepositoryEditor, cxImage, cxImageComboBox, cxListBox, cxMaskEdit, - cxMaskEditTextEditor, cxNavigator, cxRadioGroup, dxCore; - -const - cxEditComponentEditorVerbA: array[0..1] of string = ( - 'Restore properties', - 'Restore styles'); - - cxEditRepositoryEditorVerb = 'Edit...'; - - cxCustomEditControlEditorVerbA: array[0..1] of string = ( - 'Restore LookAndFeel', - 'Restore Styles' - ); - - cxCustomNavigatorEditorVerb = 'Restore Buttons'; - - ADefaultMethodParams: array[0..0] of TMethodParam = - ((Flags: [pfAddress]; Name: 'Sender'; TypeName: 'TObject')); - - cxNavigatorButtonsOnButtonClickEventParams: array[0..2] of TMethodParam = ( - (Flags: [pfAddress]; Name: 'Sender'; TypeName: 'TObject'), - (Flags: [pfAddress]; Name: 'AButtonIndex'; TypeName: 'Integer'), - (Flags: [pfVar]; Name: 'ADone'; TypeName: 'Boolean') - ); - -type - TcxCustomEditAccess = class(TcxCustomEdit); - TcxCustomEditPropertiesAccess = class(TcxCustomEditProperties); - TcxCustomMaskEditPropertiesAccess = class(TcxCustomMaskEditProperties); - TcxCustomNavigatorAccess = class(TcxCustomNavigator); - -procedure AddMethodParam(var P: PAnsiChar; AParamFlags: TParamFlags; - const AParamName, AParamTypeName: ShortString); -var - AMethodParamFlags: TParamFlags; - S: ShortString; -begin - AMethodParamFlags := AParamFlags; - Move(AMethodParamFlags, P^, SizeOf(AMethodParamFlags)); - Inc(P, SizeOf(AMethodParamFlags)); - S := AParamName; - Move(S[0], P^, Length(S) + 1); - Inc(P, Length(S) + 1); - S := AParamTypeName; - Move(S[0], P^, Length(S) + 1); - Inc(P, Length(S) + 1); -end; - -procedure ShowEventMethod( - ADesigner: IDesigner; - AInstance: TObject; const AEventName, AMethodName: string; - const AMethodParams: array of TMethodParam); - - function GetCurrentMethod: string; - var - ACurrentMethod: TMethod; - begin -{$IFDEF DELPHI5} - ACurrentMethod := GetMethodProp(AInstance, AEventName); -{$ELSE} - ACurrentMethod := GetMethodProp(AInstance, - GetPropInfo(PTypeInfo(AInstance.ClassInfo), AEventName)); -{$ENDIF} - if ACurrentMethod.Code = nil then - Result := '' - else - Result := ADesigner.GetMethodName(ACurrentMethod); - end; - - function CreateNewMethod: string; - var - AMethod: TMethod; - ATypeData: TTypeData; - I: Integer; - P: PAnsiChar; - begin - Result := AMethodName; - - ATypeData.MethodKind := mkProcedure; - ATypeData.ParamCount := Length(AMethodParams); - P := @ATypeData.ParamList; - for I := 0 to High(AMethodParams) do - with AMethodParams[I] do - AddMethodParam(P, Flags, Name, TypeName); - AMethod := ADesigner.CreateMethod(AMethodName, @ATypeData); - - {$IFDEF DELPHI5} - SetMethodProp(AInstance, AEventName, AMethod); - {$ELSE} - SetMethodProp(AInstance, GetPropInfo(PTypeInfo(AInstance.ClassInfo), - AEventName), AMethod); - {$ENDIF} - ADesigner.Modified; - end; - -var - S: string; -begin - S := GetCurrentMethod; - if S = '' then - S := CreateNewMethod; - ADesigner.ShowMethod(S); -end; - -{ TDBStringProperty } - -function TDBStringProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paValueList, paSortList, paMultiSelect]; -end; - -procedure TDBStringProperty.GetValueList(AList: TStrings); -begin -end; - -procedure TDBStringProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; - Values: TStringList; -begin - Values := TStringList.Create; - try - GetValueList(Values); - for I := 0 to Values.Count - 1 do Proc(Values[I]); - finally - Values.Free; - end; -end; - -{$IFDEF CBUILDER10} - -{ TcxDataFieldProperty } - -function TcxDataFieldProperty.GetDataSourcePropName: string; -begin - Result := 'DataSource'; -end; - -procedure TcxDataFieldProperty.GetValueList(AList: TStrings); -var - DataSource: TDataSource; - AAggList: TStringList; -begin - DataSource := GetObjectProp(GetComponent(0), GetDataSourcePropName) as TDataSource; - if (DataSource <> nil) and (DataSource.DataSet <> nil) then - begin - DataSource.DataSet.GetFieldNames(AList); - if DataSource.DataSet.AggFields.Count > 0 then - begin - AAggList := TStringList.Create; - try - DataSource.DataSet.AggFields.GetFieldNames(AAggList); - AList.AddStrings(AAggList); - finally - AAggList.Free; - end; - end; - end; -end; - -{$ELSE} -{ TcxDataFieldProperty } - -procedure TcxDataFieldProperty.GetValueList(List: {$IFDEF DELPHI10}TWideStrings{$ELSE}TStrings{$ENDIF}); -var - DataSource: TDataSource; - AAggList: {$IFDEF DELPHI10}TWideStringList{$ELSE}TStringList{$ENDIF}; -begin - DataSource := GetObjectProp(GetComponent(0), GetDataSourcePropName) as TDataSource; - if (DataSource <> nil) and (DataSource.DataSet <> nil) then - begin - inherited GetValueList(List); - if DataSource.DataSet.AggFields.Count > 0 then - begin - AAggList := {$IFDEF DELPHI10}TWideStringList{$ELSE}TStringList{$ENDIF}.Create; - try - DataSource.DataSet.AggFields.GetFieldNames(AAggList); - List.AddStrings(AAggList); - finally - AAggList.Free; - end; - end; - end; -end; - -{$ENDIF} - -{ TcxValueTypeProperty } - -function TcxValueTypeProperty.IsValueTypeClassValid(AValueTypeClass: TcxValueTypeClass): Boolean; -begin - Result := True; -end; - -function TcxValueTypeProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paValueList, paMultiSelect, paSortList, paRevertable]; -end; - -procedure TcxValueTypeProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to cxValueTypeClassList.Count - 1 do - if IsValueTypeClassValid(cxValueTypeClassList[I]) then - Proc(cxValueTypeClassList[I].Caption); -end; - -{$IFNDEF DELPHI5} - -// TODO: cxDBData.pas (GetObjectProp already exist) -function GetObjectProp(Instance: TObject; const PropName: string): TObject; -var - PropInfo: PPropInfo; -begin - Result := nil; - PropInfo := TypInfo.GetPropInfo(Instance.ClassInfo, PropName); - if (PropInfo <> nil) and (PropInfo^.PropType^.Kind = tkClass) then - Result := TObject(GetOrdProp(Instance, PropInfo)); -end; - -{$ENDIF} - -function TFieldNameProperty.GetDataSource: TDataSource; -begin - Result := GetObjectProp(GetComponent(0), GetDataSourcePropName) as TDataSource; -end; - -function TFieldNameProperty.GetDataSourcePropName: string; -begin - Result := 'DataSource'; -end; - -procedure TFieldNameProperty.GetValueList(AList: TStrings); -var - ADataSource: TDataSource; -begin - ADataSource := GetDataSource; - if (ADataSource <> nil) and (ADataSource.DataSet <> nil) then - ADataSource.DataSet.GetFieldNames(AList); -end; - -{ TcxCustomEditorsLibraryComponentEditor } - -function TcxCustomEditorsLibraryComponentEditor.GetProductMajorVersion: string; -begin - Result := cxEditPropEditorsMajorVersion; -end; - -function TcxCustomEditorsLibraryComponentEditor.GetProductName: string; -begin - Result := cxEditorsLibraryProductName; -end; - -{ TcxEditComponentEditor } - -procedure TcxEditComponentEditor.Edit; -var - AEdit: TcxCustomEdit; - AEventName: string; - AInstance: TObject; - AMethodName: string; - AProperties: TcxCustomEditProperties; -begin - AEdit := TcxCustomEdit(Component); - AMethodName := Component.Name; - if not(AEdit.InnerControl <> nil) and - (GetPropInfo(PTypeInfo(AEdit.ClassInfo), 'OnClick') <> nil) then - begin - AMethodName := AMethodName + 'Click'; - AInstance := AEdit; - AEventName := 'OnClick'; - end - else - begin - AProperties := TcxCustomEditAccess(AEdit).Properties; - if GetPropInfo(PTypeInfo(AProperties.ClassInfo), 'OnChange') <> nil then - begin - AMethodName := AMethodName + 'PropertiesChange'; - AInstance := AProperties; - AEventName := 'OnChange'; - end - else - Exit; - end; - - ShowEventMethod(Designer, AInstance, AEventName, AMethodName, ADefaultMethodParams); -end; - -function TcxEditComponentEditor.InternalGetVerb(Index: Integer): string; -begin - Result := cxEditComponentEditorVerbA[Index]; -end; - -function TcxEditComponentEditor.InternalGetVerbCount: Integer; -begin - Result := Length(cxEditComponentEditorVerbA); -end; - -procedure TcxEditComponentEditor.InternalExecuteVerb(AIndex: Integer); -begin - case AIndex of - 0: - TcxCustomEditAccess(GetEdit).Properties.RestoreDefaults; - 1: - GetEdit.RestoreStyles; - end; - Designer.Modified; -end; - -function TcxEditComponentEditor.GetEdit: TcxCustomEdit; -begin - Result := Component as TcxCustomEdit; -end; - -{ TcxEditRepositoryItemProperty } - -function TcxEditRepositoryItemProperty.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes; - {$IFDEF DELPHI6} - if TcxCustomEdit(GetComponent(0)).RepositoryItem <> nil then - Include(Result, paNotNestable); - {$ENDIF} -end; - -procedure TcxEditRepositoryItemProperty.GetValues(Proc: TGetStrProc); -begin - FStrProc := Proc; - Designer.GetComponentNames(GetTypeData(GetPropType), StrProc); -end; - -procedure TcxEditRepositoryItemProperty.StrProc(const S: string); -var - I: Integer; - ARepositoryItemAcceptable: Boolean; -begin - ARepositoryItemAcceptable := True; - for I := 0 to PropCount - 1 do - if not TcxCustomEdit(GetComponent(I)).IsRepositoryItemAcceptable( - TcxEditRepositoryItem(Designer.GetComponent(S))) then - begin - ARepositoryItemAcceptable := False; - Break; - end; - if ARepositoryItemAcceptable then - FStrProc(S); -end; - -{ TcxLookupEditListSourceProperty } - -function TcxLookupEditListSourceProperty.GetDataSourcePropName: string; -begin - Result := 'ListSource'; -end; - -{ TcxEditPropertiesEventEditor } - -function TcxEditPropertiesEventEditor.GetName: string; -begin - Result := 'Properties'; -end; - -function TcxEditPropertiesEventEditor.GetInstance: TPersistent; -begin - Result := TcxCustomEditAccess(GetComponent(0)).Properties; -end; - -{ TcxEditRepositoryItemPropertiesEventEditor } - -function TcxEditRepositoryItemPropertiesEventEditor.GetName: string; -begin - Result := 'Properties'; -end; - -function TcxEditRepositoryItemPropertiesEventEditor.GetInstance: TPersistent; -begin - Result := TcxEditRepositoryItem(GetComponent(0)).Properties; -end; - -{ TcxNavigatorButtonsEventEditor } - -function TcxNavigatorButtonsEventEditor.GetName: string; -begin - Result := 'Buttons'; -end; - -function TcxNavigatorButtonsEventEditor.GetInstance: TPersistent; -begin - Result := TcxCustomNavigatorAccess(GetComponent(0)).CustomButtons; -end; - -{ TcxGEPropertiesImageIndexProperty } - -function TcxGEPropertiesImageIndexProperty.GetImages: TCustomImageList; -begin - Result := nil; - if GetComponent(0) is TcxImageComboBoxProperties then - Result := TcxImageComboBoxProperties(GetComponent(0)).Images; -end; - -{ TcxGEItemImageIndexProperty } - -function TcxGEItemImageIndexProperty.GetImages: TCustomImageList; -begin - Result := nil; - if GetComponent(0) is TcxImageComboBoxItem then - begin - Result := TcxImageComboBoxProperties(TcxImageComboBoxItems( - TcxImageComboBoxItem(GetComponent(0)).Collection).Owner).LargeImages; - if Result = nil then - Result := TcxImageComboBoxProperties(TcxImageComboBoxItems( - TcxImageComboBoxItem(GetComponent(0)).Collection).Owner).Images; - end; -end; - -{ TcxEditorsLibraryComponentEditorEx } - -function TcxEditorsLibraryComponentEditorEx.GetEditItemcaption: string; -begin - Result := cxEditRepositoryEditorVerb; -end; - -function TcxEditorsLibraryComponentEditorEx.InternalGetVerb(AIndex: Integer): string; -begin - Result := GetEditItemCaption; -end; - -function TcxEditorsLibraryComponentEditorEx.InternalGetVerbCount: Integer; -begin - Result := 1; -end; - -procedure TcxEditorsLibraryComponentEditorEx.InternalExecuteVerb(AIndex: Integer); -begin - ExecuteEditAction; -end; - -{ TcxEditRepositoryComponentEditor } - -procedure TcxEditRepositoryComponentEditor.ExecuteEditAction; -begin - ShowEditRepositoryEditor(Designer, GetEditRepository); -end; - -function TcxEditRepositoryComponentEditor.GetEditRepository: TcxEditRepository; -begin - Result := Component as TcxEditRepository -end; - -{ TcxEditMaskProperty } - -function TcxEditMaskProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paDialog, paMultiSelect]; -end; - -procedure TcxEditMaskProperty.Edit; -var - ADialog: TcxEditMaskEditorDlg; - AMaskEditProperties: TcxCustomMaskEditPropertiesAccess; - APrevEditMask: string; - APrevMaskKind: TcxEditMaskKind; - I: Integer; -begin - AMaskEditProperties := TcxCustomMaskEditPropertiesAccess(GetComponent(0)); - APrevEditMask := AMaskEditProperties.EditMask; - APrevMaskKind := AMaskEditProperties.MaskKind; - ADialog := TcxEditMaskEditorDlg.Create(Application); - try - ADialog.MaskEditProperties := AMaskEditProperties; - if ADialog.ShowModal = mrOk then - for I := 1 to PropCount - 1 do - with TcxCustomMaskEditPropertiesAccess(GetComponent(I)) do - begin - MaskKind := AMaskEditProperties.MaskKind; - EditMask := AMaskEditProperties.EditMask; - end; - if (APrevMaskKind <> AMaskEditProperties.MaskKind) or - (APrevEditMask <> AMaskEditProperties.EditMask) then - Designer.Modified; - finally - ADialog.Free; - end; -end; - -{ TcxTextProperty } - -function TcxTextProperty.GetAttributes: TPropertyAttributes; -begin - if CanShowDialog then - Result := [paDialog] - else - Result := [paMultiSelect]; -end; - -procedure TcxTextProperty.Edit; -var - ADialog: TcxMaskEditTextEditorDlg; -begin - ADialog := TcxMaskEditTextEditorDlg.Create(Application); - try - ADialog.MaskEdit := TcxCustomMaskEdit(GetComponent(0)); - ADialog.ShowModal; - finally - ADialog.Free; - end; -end; - -function TcxTextProperty.CanShowDialog: Boolean; -begin - Result := (PropCount = 1) and - TcxCustomMaskEdit(GetComponent(0)).ActiveProperties.IsMasked; -end; - -{ TGraphicClassNameProperty } - -function TGraphicClassNameProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paValueList, paRevertable]; -end; - -procedure TGraphicClassNameProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for i := 0 to GetRegisteredGraphicClasses.Count - 1 do - Proc(TClass(GetRegisteredGraphicClasses[I]).ClassName); -end; - -{$IFDEF DELPHI6} -{ TcxButtonSelectionEditor } - -procedure TcxButtonSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc('Menus'); - Proc('cxLookAndFeelPainters'); -end; - -procedure TcxComboBoxSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc('cxGraphics'); -end; -{$ENDIF} - -{ TcxFilterControlComponentEditor } - -function TcxFilterControlComponentEditor.GetProductMajorVersion: string; -begin - Result := cxEditPropEditorsMajorVersion; -end; - -function TcxFilterControlComponentEditor.GetProductName: string; -begin - Result := cxEditorsLibraryProductName; -end; - -{ TcxNavigatorControlProperty } - -procedure TcxNavigatorControlProperty.GetValues(Proc: TGetStrProc); -begin - FStrProc := Proc; - Designer.GetComponentNames(GetTypeData(GetPropType), StrProc); -end; - -procedure TcxNavigatorControlProperty.StrProc(const S: string); -var - AComponent: TComponent; -begin - AComponent := Designer.GetComponent(S); - if (AComponent <> nil) and Supports(AComponent, IcxNavigator) then - FStrProc(S); -end; - -{ TcxEditorsLibraryComponentEditor } - -procedure TcxEditorsLibraryComponentEditor.Edit; -begin - ShowEventMethod(Designer, Component, 'OnClick', Component.Name + 'Click', - ADefaultMethodParams); -end; - -{ TcxEditorsLibraryComponentWithStylesEditor } - -function TcxEditorsLibraryComponentWithStylesEditor.GetEditItemCaption: string; -begin - Result := cxCustomEditControlEditorVerbA[1]; -end; - -procedure TcxEditorsLibraryComponentWithStylesEditor.ExecuteEditAction; -begin - RestoreStyles; - Designer.Modified; -end; - -{ TcxEditorsLibraryComponentWithoutStylesEditor } - -function TcxEditorsLibraryComponentWithoutStylesEditor.GetEditItemCaption: string; -begin - Result := cxCustomEditControlEditorVerbA[0]; -end; - -procedure TcxEditorsLibraryComponentWithoutStylesEditor.ExecuteEditAction; -begin - if GetLookAndFeel.AssignedValues <> [] then - begin - GetLookAndFeel.Reset; - Designer.Modified; - end; -end; - -{ TcxEditStyleControllerEditor } - -procedure TcxEditStyleControllerEditor.Edit; -begin - ShowEventMethod(Designer, Component, 'OnStyleChanged', - Component.Name + 'StyleChanged', ADefaultMethodParams); -end; - -procedure TcxEditStyleControllerEditor.RestoreStyles; -begin - TcxEditStyleController(Component).RestoreStyles; -end; - -{ TcxDefaultEditStyleControllerEditor } - -procedure TcxDefaultEditStyleControllerEditor.Edit; -begin - ShowEventMethod(Designer, Component, 'OnStyleChanged', - Component.Name + 'StyleChanged', ADefaultMethodParams); -end; - -procedure TcxDefaultEditStyleControllerEditor.RestoreStyles; -begin - DefaultEditStyleController.RestoreStyles; -end; - -{ TcxCustomButtonComponentEditor } - -function TcxCustomButtonComponentEditor.GetLookAndFeel: TcxLookAndFeel; -begin - Result := TcxCustomButton(Component).LookAndFeel; -end; - -{ TcxRadioButtonComponentEditor } - -function TcxRadioButtonComponentEditor.GetLookAndFeel: TcxLookAndFeel; -begin - Result := TcxRadioButton(Component).LookAndFeel; -end; - -{ TcxContainerComponentEditor } - -procedure TcxContainerComponentEditor.RestoreStyles; -begin - TcxContainer(Component).RestoreStyles; -end; - -{ TcxCustomNavigatorComponentEditor } - -procedure TcxCustomNavigatorComponentEditor.Edit; -var - AButtons: TcxCustomNavigatorButtons; -begin - AButtons := TcxCustomNavigatorAccess(Component).CustomButtons; - ShowEventMethod(Designer, AButtons, 'OnButtonClick', - Component.Name + 'ButtonsButtonClick', cxNavigatorButtonsOnButtonClickEventParams); -end; - -function TcxCustomNavigatorComponentEditor.GetLookAndFeel: TcxLookAndFeel; -begin - Result := TcxCustomNavigator(Component).LookAndFeel; -end; - -function TcxCustomNavigatorComponentEditor.InternalGetVerb(AIndex: Integer): string; -begin - if AIndex = 1 then - Result := cxCustomNavigatorEditorVerb - else - Result := inherited InternalGetVerb(AIndex); -end; - -function TcxCustomNavigatorComponentEditor.InternalGetVerbCount: Integer; -begin - Result := 1 + inherited InternalGetVerbCount; -end; - -procedure TcxCustomNavigatorComponentEditor.InternalExecuteVerb(AIndex: Integer); -begin - if AIndex = 1 then - begin - TcxCustomNavigator(Component).RestoreButtons; - Designer.Modified; - end - else - inherited InternalExecuteVerb(AIndex); -end; - -{ TcxCustomImagePropertiesProperty } - -procedure TcxCustomImagePropertiesProperty.GetProperties(Proc: {$IFNDEF DELPHI6}TGetPropEditProc{$ELSE}TGetPropProc{$ENDIF}); -begin - FProc := Proc; - inherited GetProperties(GetPropProc); -end; - -procedure TcxCustomImagePropertiesProperty.GetPropProc({$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); -var - I: Integer; -begin - if InternalCompareString(Prop.GetName, 'OnGetGraphicClass', False) then - for I := 0 to PropCount - 1 do - if TcxCustomImage(GetComponent(I)).RepositoryItem = nil then - Exit; - FProc(Prop); -end; - -{ TcxEditPropertiesAssignedValuesProperty } - -procedure TcxEditPropertiesAssignedValuesProperty.GetProperties( - Proc: {$IFNDEF DELPHI6}TGetPropEditProc{$ELSE}TGetPropProc{$ENDIF}); -begin - FProc := Proc; - inherited GetProperties(GetPropProc); -end; - -function TcxEditPropertiesAssignedValuesProperty.GetValue: string; -var - AAssignedValues: TcxCustomEditPropertiesValues; - APPropList: PPropList; - APropertyCount: Integer; - I: Integer; -begin - Result := ''; - AAssignedValues := TcxCustomEditPropertiesAccess(GetComponent(0)).AssignedValues; - APropertyCount := GetPropList(GetPropType, [tkUnknown..tkDynArray], nil); - if APropertyCount > 0 then - begin - GetMem(APPropList, APropertyCount * SizeOf(Pointer)); - try - GetPropList(GetPropType, [tkUnknown..tkDynArray], APPropList); - for I := 0 to APropertyCount - 1 do - if Boolean(GetOrdProp(AAssignedValues, APPropList[I])) and - IsVisibleProperty(dxShortStringToString(APPropList[I].Name)) then - begin - if Result <> '' then - Result := Result + ','; - Result := Result + dxShortStringToString(APPropList[I].Name); - end; - finally - FreeMem(APPropList); - end; - end; - Result := '[' + Result + ']'; -end; - -procedure TcxEditPropertiesAssignedValuesProperty.GetPropProc( - {$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); -begin - if IsVisibleProperty(Prop.GetName) then - FProc(Prop); -end; - -function TcxEditPropertiesAssignedValuesProperty.IsVisibleProperty( - const APropertyName: string): Boolean; -begin - Result := TypInfo.GetPropInfo(TcxCustomEditProperties(GetComponent(0)), - APropertyName) <> nil; -end; - -{ TcxDefaultEditStyleControllerStyleProperty } - -function TcxDefaultEditStyleControllerStyleProperty.GetStyle: TcxContainerStyle; -begin - Result := DefaultEditStyleController.Style; -end; - -function TcxDefaultEditStyleControllerStyleProperty.IsPropertyVisible( - const APropertyName: string): Boolean; -begin - Result := (APropertyName <> 'StyleController') and - inherited IsPropertyVisible(APropertyName); -end; - -{ TcxNavigatorButtonImageIndexProperty } - -function TcxNavigatorButtonImageIndexProperty.GetImages: TCustomImageList; -begin - Result := TcxNavigatorButton(GetComponent(0)).Buttons.Images; -end; - -{$IFDEF DELPHI10} -{ TcxEditGuidelines } - -function TcxEditGuidelines.GetCount: Integer; -begin - Result := inherited GetCount; - if Edit.HasTextBaseLine then - Inc(Result); -end; - -function TcxEditGuidelines.GetDesignerGuideOffset(Index: Integer): Integer; -begin - if Edit.HasTextBaseLine and (Index = GetCount - 1) then - Result := Edit.GetTextBaseLine - else - Result := inherited GetDesignerGuideOffset(Index); -end; - -function TcxEditGuidelines.GetDesignerGuideType(Index: Integer): TDesignerGuideType; -begin - if Edit.HasTextBaseLine and (Index = GetCount - 1) then - Result := gtBaseline - else - Result := inherited GetDesignerGuideType(Index); -end; - -function TcxEditGuidelines.GetEdit: TcxCustomEdit; -begin - Result := TcxCustomEdit(Component); -end; -{$ENDIF} - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditReg.dcr b/internal/x.46/ExpressEditors Library 5/Sources/cxEditReg.dcr deleted file mode 100644 index 448bf805..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Sources/cxEditReg.dcr and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditReg.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEditReg.pas deleted file mode 100644 index 36f68aea..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditReg.pas +++ /dev/null @@ -1,242 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxEditReg; - -{$I cxVer.inc} - -interface - -uses - Classes, cxEdit; - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI6} - DesignEditors, DesignIntf, VCLEditors, -{$ELSE} - DsgnIntf, -{$ENDIF} - Windows, Controls, DB, Graphics, ImgList, cxBlobEdit, cxButtonEdit, - cxButtons, cxCalc, cxCalendar, cxCheckBox, cxContainer, cxCurrencyEdit, cxDB, - cxDBEdit, cxDBEditRepository, cxDBLookupComboBox, cxDBNavigator, - cxDropDownEdit, cxEditConsts, cxEditPropEditors, cxEditRepositoryEditor, - cxEditRepositoryItems, cxGraphics, cxGroupBox, cxHyperLinkEdit, cxImage, - cxImageComboBox, cxLibraryReg, cxListBox, cxLookAndFeels, cxLookupDBGrid, - cxLookupGrid, cxMaskEdit, cxMemo, cxMRUEdit, cxNavigator, cxPropEditors, - cxRadioGroup, cxSpinEdit, cxTextEdit, cxTimeEdit; - -type - { TcxLookupComboBoxPropertiesFieldNameProperty } - - TcxLookupComboBoxPropertiesFieldNameProperty = class(TFieldNameProperty) - function GetDataSourcePropName: string; override; - end; - - { TcxLookupDBGridColumnFieldNameProperty } - - TcxLookupDBGridColumnFieldNameProperty = class(TFieldNameProperty) - public - function GetDataSource: TDataSource; override; - end; - - TcxGroupBoxSelectionEditor = class(TSelectionEditor) - protected - ComponentsList: TStringList; - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - - TcxLookupDBGridColumnAccess = class(TcxLookupDBGridColumn); - -{ TcxLookupComboBoxPropertiesFieldNameProperty } - -function TcxLookupComboBoxPropertiesFieldNameProperty.GetDataSourcePropName: string; -begin - Result := 'ListSource'; -end; - -{ TcxLookupDBGridColumnFieldNameProperty } - -function TcxLookupDBGridColumnFieldNameProperty.GetDataSource: TDataSource; -begin - Result := TcxLookupDBGridColumnAccess(GetComponent(0) as TcxLookupDBGridColumn).DataController.DataSource; -end; - -{ TcxGroupBoxSelectionEditor } - -procedure TcxGroupBoxSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc('cxLookAndFeelPainters'); -end; - -procedure RegisterEditRepositoryItems; -begin - RegisterEditRepositoryItem(TcxEditRepositoryTextItem, scxSEditRepositoryTextItem); - RegisterEditRepositoryItem(TcxEditRepositoryButtonItem, scxSEditRepositoryButtonItem); - RegisterEditRepositoryItem(TcxEditRepositoryImageItem, scxSEditRepositoryImageItem); - RegisterEditRepositoryItem(TcxEditRepositoryComboBoxItem, scxSEditRepositoryComboBoxItem); - RegisterEditRepositoryItem(TcxEditRepositoryMaskItem, scxSEditRepositoryMaskItem); - RegisterEditRepositoryItem(TcxEditRepositoryPopupItem, scxSEditRepositoryPopupItem); - RegisterEditRepositoryItem(TcxEditRepositoryCalcItem, scxSEditRepositoryCalcItem); - RegisterEditRepositoryItem(TcxEditRepositoryDateItem, scxSEditRepositoryDateItem); - RegisterEditRepositoryItem(TcxEditRepositoryCurrencyItem, scxSEditRepositoryCurrencyItem); - RegisterEditRepositoryItem(TcxEditRepositorySpinItem, scxSEditRepositorySpinItem); - RegisterEditRepositoryItem(TcxEditRepositoryMemoItem, scxSEditRepositoryMemoItem); - RegisterEditRepositoryItem(TcxEditRepositoryImageComboBoxItem, scxSEditRepositoryImageComboBoxItem); - RegisterEditRepositoryItem(TcxEditRepositoryBlobItem, scxSEditRepositoryBlobItem); - RegisterEditRepositoryItem(TcxEditRepositoryCheckBoxItem, scxSEditRepositoryCheckBoxItem); - RegisterEditRepositoryItem(TcxEditRepositoryTimeItem, scxSEditRepositoryTimeItem); - RegisterEditRepositoryItem(TcxEditRepositoryMRUItem, scxSEditRepositoryMRUItem); - RegisterEditRepositoryItem(TcxEditRepositoryHyperLinkItem, scxSEditRepositoryHyperLinkItem); - RegisterEditRepositoryItem(TcxEditRepositoryLookupComboBoxItem, scxSEditRepositoryLookupComboBoxItem); - RegisterEditRepositoryItem(TcxEditRepositoryRadioGroupItem, scxSEditRepositoryRadioGroupItem); -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterComponents('Express Editors 6', [TcxTextEdit, TcxMaskEdit, TcxMemo, - TcxDateEdit, TcxButtonEdit, TcxCheckBox, TcxComboBox, TcxImageComboBox, - TcxSpinEdit, TcxCalcEdit, TcxHyperLinkEdit, TcxTimeEdit, TcxCurrencyEdit, - TcxImage, TcxBlobEdit, TcxMRUEdit, TcxPopupEdit, TcxLookupComboBox, - TcxRadioButton, TcxRadioGroup, TcxListBox, TcxNavigator]); - RegisterComponents('Express DBEditors 6', [TcxDBTextEdit, TcxDBMaskEdit, TcxDBMemo, - TcxDBDateEdit, TcxDBButtonEdit, TcxDBCheckBox, TcxDBComboBox, TcxDBImageComboBox, - TcxDBSpinEdit, TcxDBCalcEdit, TcxDBHyperLinkEdit, TcxDBTimeEdit, TcxDBCurrencyEdit, - TcxDBImage, TcxDBBlobEdit, TcxDBMRUEdit, TcxDBPopupEdit, TcxDBLookupComboBox, - TcxDBRadioGroup, TcxDBListBox, TcxDBNavigator]); - RegisterComponents('Express Utilities', [TcxButton, TcxGroupBox, - TcxEditStyleController, TcxDefaultEditStyleController, TcxEditRepository]); - - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomEdit, 'PropertiesEvents', TcxEditPropertiesEventEditor); - RegisterPropertyEditor(TypeInfo(TcxEditRepositoryItem), TcxCustomEdit, - 'RepositoryItem', TcxEditRepositoryItemProperty); - - RegisterPropertyEditor(TypeInfo(TColor), TcxCustomGroupBox, 'CaptionBkColor', nil); - RegisterPropertyEditor(TypeInfo(TColor), TcxCustomGroupBox, 'Color', nil); - RegisterPropertyEditor(TypeInfo(TFont), TcxCustomGroupBox, 'Font', nil); - - RegisterPropertyEditor(TypeInfo(string), TcxEditDataBinding, 'DataField', - TcxDataFieldProperty); - RegisterPropertyEditor(TypeInfo(string), TcxCustomDBDataBinding, 'DataField', - TcxDataFieldProperty); - - RegisterPropertyEditor(TypeInfo(TShortCut), TcxCustomEditProperties, 'ClickKey', TShortCutProperty); - RegisterPropertyEditor(TypeInfo(TShortCut), TcxCustomHyperLinkEditProperties, 'StartKey', TShortCutProperty); - RegisterPropertyEditor(TypeInfo(TShortCut), TcxCustomEditProperties, 'ClearKey', TShortCutProperty); - - RegisterPropertyEditor(TypeInfo(TImageIndex), TcxImageComboBoxProperties, 'DefaultImageIndex', TcxGEPropertiesImageIndexProperty); - RegisterPropertyEditor(TypeInfo(TImageIndex), TcxImageComboBoxItem, 'ImageIndex', TcxGEItemImageIndexProperty); - RegisterPropertyEditor(TypeInfo(TImageIndex), TcxNavigatorButton, 'ImageIndex', TcxNavigatorButtonImageIndexProperty); - - RegisterPropertyEditor(TypeInfo(string), TcxImageProperties, 'GraphicClassName', TGraphicClassNameProperty); - RegisterPropertyEditor(TypeInfo(string), TcxImageProperties, 'Caption', TCaptionProperty); - RegisterPropertyEditor(TypeInfo(string), TcxBlobEditProperties, 'PictureGraphicClassName', TGraphicClassNameProperty); - - RegisterComponentEditor(TcxCustomEdit, TcxEditComponentEditor); - RegisterComponentEditor(TcxEditStyleController, TcxEditStyleControllerEditor); - RegisterComponentEditor(TcxDefaultEditStyleController, TcxDefaultEditStyleControllerEditor); - RegisterComponentEditor(TcxCustomButton, TcxCustomButtonComponentEditor); - - RegisterComponentEditor(TcxEditRepository, TcxEditRepositoryComponentEditor); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxEditRepositoryItem, 'PropertiesEvents', TcxEditRepositoryItemPropertiesEventEditor); - RegisterClasses([TcxEditRepositoryItem, TcxEditRepositoryTextItem, TcxEditRepositoryButtonItem]); - RegisterNoIcon([TcxEditRepositoryItem, TcxEditRepositoryTextItem, TcxEditRepositoryButtonItem]); - - RegisterEditRepositoryItems; - - RegisterPropertyEditor(TypeInfo(TcxEditMask), TcxCustomMaskEditProperties, 'EditMask', TcxEditMaskProperty); - RegisterPropertyEditor(TypeInfo(TCaption), TcxCustomMaskEdit, 'Text', TcxTextProperty); - - RegisterPropertyEditor(TypeInfo(TCaption), TcxBlobEdit, 'Text', TCaptionProperty); - RegisterPropertyEditor(TypeInfo(string), TcxLookupComboBoxProperties, 'KeyFieldNames', TcxLookupComboBoxPropertiesFieldNameProperty); - RegisterPropertyEditor(TypeInfo(string), TcxLookupComboBoxProperties, 'ListFieldNames', TcxLookupComboBoxPropertiesFieldNameProperty); - - RegisterPropertyEditor(TypeInfo(string), TcxLookupDBGridColumn, 'FieldName', TcxLookupDBGridColumnFieldNameProperty); -{$IFDEF DELPHI6} - RegisterSelectionEditor(TcxCustomButton, TcxButtonSelectionEditor); - RegisterSelectionEditor(TcxCustomComboBox, TcxComboBoxSelectionEditor); -{$ENDIF} - - RegisterPropertyEditor(TypeInfo(TComponent), TcxCustomNavigatorControl, - 'Control', TcxNavigatorControlProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomNavigator, 'ButtonsEvents', TcxNavigatorButtonsEventEditor); - RegisterComponentEditor(TcxRadioButton, TcxRadioButtonComponentEditor); - RegisterComponentEditor(TcxCustomNavigator, TcxCustomNavigatorComponentEditor); - RegisterComponentEditor(TcxContainer, TcxContainerComponentEditor); - - RegisterPropertyEditor(TypeInfo(TComponent), TcxCustomButton, 'PopupMenu', TcxControlPopupMenuProperty); - RegisterPropertyEditor(TypeInfo(TBitmap), TcxCustomButton, 'Glyph', TcxBitmapProperty); - RegisterPropertyEditor(TypeInfo(TComponent), TcxRadioButton, 'PopupMenu', TcxControlPopupMenuProperty); - - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomImage, 'PropertiesEvents', TcxCustomImagePropertiesProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomBlobEdit, 'PropertiesEvents', TcxCustomImagePropertiesProperty); - - RegisterPropertyEditor(TypeInfo(TcxLookAndFeel), TcxCustomGroupBox, 'LookAndFeel', nil); - RegisterPropertyEditor(TypeInfo(TImeMode), TcxCustomTextEdit, 'ImeMode', nil); - RegisterPropertyEditor(TypeInfo(TImeName), TcxCustomTextEdit, 'ImeName', nil); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomTextEditProperties, - 'HideCursor', nil); - RegisterPropertyEditor(TypeInfo(TcxEditRepositoryItem), TcxGroupBox, - 'RepositoryItem', nil); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomButton, 'UseSystemPaint', nil); // deprecated property - RegisterPropertyEditor(TypeInfo(TcxCustomEditPropertiesValues), - TcxCustomEditProperties, 'AssignedValues', TcxEditPropertiesAssignedValuesProperty); - RegisterPropertyEditor(TypeInfo(TCaption), TcxCustomCheckBoxProperties, 'Caption', nil); - RegisterPropertyEditor(TypeInfo(TcxEditStyle), TcxDefaultEditStyleController, - '', TcxDefaultEditStyleControllerStyleProperty); - RegisterPropertyEditor(TypeInfo(TColor), TcxHyperLinkStyle, 'TextColor', nil); - RegisterPropertyEditor(TypeInfo(TcxEditStyle), TcxCustomGroupBox, 'StyleFocused', nil); - RegisterPropertyEditor(TypeInfo(TcxEditStyle), TcxCustomGroupBox, 'StyleHot', nil); - RegisterPropertyEditor(TypeInfo(string), TcxCustomNavigator, 'Hint', nil); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomEditProperties, 'Transparent', nil); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomHyperLinkEditProperties, 'AutoComplete', nil); -{$IFDEF DELPHI10} - RegisterComponentGuidelines(TcxCustomEdit, TcxEditGuidelines); -{$ENDIF} - RegisterSelectionEditor(TcxCustomGroupBox, TcxGroupBoxSelectionEditor); - - HideClassProperties(TcxButton, ['AllowAllUp', 'CanBeFocused', 'Down', 'GroupIndex']); - -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditRegisteredRepositoryItems.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEditRegisteredRepositoryItems.pas deleted file mode 100644 index f33a78db..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditRegisteredRepositoryItems.pas +++ /dev/null @@ -1,309 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxEditRegisteredRepositoryItems; - -{$I cxVer.inc} - -interface - -uses - SysUtils, Classes, cxClasses, cxEdit; - -const - cxEditRegisteredItemsStandardVersion = -1; - cxEditRegisteredItemsDefaultVersion = MaxInt; - -type - // TODO: notification!!! - // TODO: BeginUpdate/EndUpdate!!! - - { TcxEditRegisteredRepositoryItems } - - TcxEditRegisteredRepositoryItemsData = record - DataType: Integer; - Version: Integer; - RepositoryItem: TcxEditRepositoryItem; - end; - - TcxEditRegisteredRepositoryItemsDataArray = array of TcxEditRegisteredRepositoryItemsData; - - TcxEditRegisteredRepositoryItems = class(TcxInterfacedPersistent, - IUnknown, IcxEditRepositoryItemListener) // singleton - private - FDestroying: Boolean; - FDefaultItems: TcxEditRegisteredRepositoryItemsDataArray; - FItems: TcxEditRegisteredRepositoryItemsDataArray; - function Find(const AItems: TcxEditRegisteredRepositoryItemsDataArray; - ADataType, AVersion: Integer; AFindItemWithMaxVersion: Boolean; - out AIndex: Integer): Boolean; - function GetCount: Integer; - function GetDefaultCount: Integer; -// function GetDefaultRepositoryItem(Index: Integer): PcxEditRegisteredRepositoryItemsData; -// function GetRepositoryItem(Index: Integer): PcxEditRegisteredRepositoryItemsData; - protected - { IcxEditRepositoryItemListener } - procedure ItemRemoved(Sender: TcxEditRepositoryItem); virtual; - procedure PropertiesChanged(Sender: TcxEditRepositoryItem); virtual; - - function Add(var AItems: TcxEditRegisteredRepositoryItemsDataArray; - ADataType: Integer; AVersion: Integer; - ARepositoryItem: TcxEditRepositoryItem): Integer; virtual; - procedure Changed; virtual; - procedure Clear; - procedure Delete(var AItems: TcxEditRegisteredRepositoryItemsDataArray; - AIndex: Integer); - function FindIndexForInsertion( - const AItems: TcxEditRegisteredRepositoryItemsDataArray; - ADataType, AVersion: Integer; out AIndex: Integer): Boolean; - function FindItemWithMaxVersion( - const AItems: TcxEditRegisteredRepositoryItemsDataArray; - ADataType: Integer): Integer; - property Count: Integer read GetCount; - property DefaultCount: Integer read GetDefaultCount; - property Destroying: Boolean read FDestroying write FDestroying; -// property DefaultItems[Index: Integer]: PcxEditRegisteredRepositoryItemsData read GetDefaultRepositoryItem; -// property Items[Index: Integer]: PcxEditRegisteredRepositoryItemsData read GetRepositoryItem; - public - destructor Destroy; override; - function GetDefaultItem: TcxEditRepositoryItem; virtual; - function GetItem(ADataType: Integer): TcxEditRepositoryItem; virtual; - procedure RegisterDefaultItem(AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem); virtual; - procedure RegisterItem(ADataType: Integer; AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem); virtual; - procedure UnregisterDefaultItem(AVersion: Integer); virtual; - procedure UnregisterItem(ADataType: Integer; AVersion: Integer); virtual; - end; - -implementation - -uses - Math; - -{ TcxEditRegisteredRepositoryItems } - -destructor TcxEditRegisteredRepositoryItems.Destroy; -begin - Destroying := True; - Clear; - inherited Destroy; -end; - -function TcxEditRegisteredRepositoryItems.GetDefaultItem: TcxEditRepositoryItem; -begin - if DefaultCount > 0 then - Result := FDefaultItems[0].RepositoryItem - else - Result := nil; -end; - -function TcxEditRegisteredRepositoryItems.GetItem( - ADataType: Integer): TcxEditRepositoryItem; -var - AIndex: Integer; -begin - AIndex := FindItemWithMaxVersion(FItems, ADataType); - if AIndex <> -1 then - Result := FItems[AIndex].RepositoryItem - else - Result := GetDefaultItem; -end; - -procedure TcxEditRegisteredRepositoryItems.RegisterDefaultItem( - AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem); -begin - Add(FDefaultItems, 0, AVersion, ARepositoryItem); -end; - -procedure TcxEditRegisteredRepositoryItems.RegisterItem(ADataType: Integer; - AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem); -begin - Add(FItems, ADataType, AVersion, ARepositoryItem); -end; - -procedure TcxEditRegisteredRepositoryItems.UnregisterDefaultItem(AVersion: Integer); -var - AIndex: Integer; -begin - if FindIndexForInsertion(FDefaultItems, 0, AVersion, AIndex) then - Delete(FDefaultItems, AIndex); -end; - -procedure TcxEditRegisteredRepositoryItems.UnregisterItem(ADataType: Integer; - AVersion: Integer); -var - AIndex: Integer; -begin - if FindIndexForInsertion(FItems, ADataType, AVersion, AIndex) then - Delete(FItems, AIndex); -end; - -procedure TcxEditRegisteredRepositoryItems.ItemRemoved(Sender: TcxEditRepositoryItem); -var - I: Integer; -begin - for I := DefaultCount - 1 downto 0 do - if FDefaultItems[I].RepositoryItem = Sender then - Delete(FDefaultItems, I); - for I := Count - 1 downto 0 do - if FItems[I].RepositoryItem = Sender then - Delete(FItems, I); -end; - -procedure TcxEditRegisteredRepositoryItems.PropertiesChanged(Sender: TcxEditRepositoryItem); -begin - Changed; -end; - -function TcxEditRegisteredRepositoryItems.Add( - var AItems: TcxEditRegisteredRepositoryItemsDataArray; ADataType: Integer; - AVersion: Integer; ARepositoryItem: TcxEditRepositoryItem): Integer; -begin - if FindIndexForInsertion(AItems, ADataType, AVersion, Result) then - Exit; - SetLength(AItems, Length(AItems) + 1); - if Result < Length(AItems) - 1 then - Move(AItems[Result], AItems[Result + 1], - (Length(AItems) - Result - 1) * SizeOf(TcxEditRegisteredRepositoryItemsData)); - AItems[Result].DataType := ADataType; - AItems[Result].Version := AVersion; - AItems[Result].RepositoryItem := ARepositoryItem; - ARepositoryItem.AddListener(Self); - Changed; -end; - -procedure TcxEditRegisteredRepositoryItems.Changed; -begin - if Destroying then Exit; - // TODO: notification -end; - -procedure TcxEditRegisteredRepositoryItems.Clear; -begin - while DefaultCount > 0 do - Delete(FDefaultItems, DefaultCount - 1); - while Count > 0 do - Delete(FItems, Count - 1); -end; - -procedure TcxEditRegisteredRepositoryItems.Delete( - var AItems: TcxEditRegisteredRepositoryItemsDataArray; AIndex: Integer); -begin - AItems[AIndex].RepositoryItem.RemoveListener(Self); - if AIndex < Length(AItems) - 1 then - Move(AItems[AIndex + 1], AItems[AIndex], - (Length(AItems) - AIndex - 1) * SizeOf(TcxEditRegisteredRepositoryItemsData)); - SetLength(AItems, Length(AItems) - 1); - Changed; -end; - -function TcxEditRegisteredRepositoryItems.FindIndexForInsertion( - const AItems: TcxEditRegisteredRepositoryItemsDataArray; - ADataType, AVersion: Integer; out AIndex: Integer): Boolean; -begin - Result := Find(AItems, ADataType, AVersion, False, AIndex); -end; - -function TcxEditRegisteredRepositoryItems.FindItemWithMaxVersion( - const AItems: TcxEditRegisteredRepositoryItemsDataArray; - ADataType: Integer): Integer; -var - AIndex: Integer; -begin - if Find(AItems, ADataType, 0, True, AIndex) then - Result := AIndex - else - Result := -1; -end; - -function TcxEditRegisteredRepositoryItems.Find( - const AItems: TcxEditRegisteredRepositoryItemsDataArray; - ADataType, AVersion: Integer; AFindItemWithMaxVersion: Boolean; - out AIndex: Integer): Boolean; - - function Compare(const AItem1, AItem2: TcxEditRegisteredRepositoryItemsData): Integer; - begin - Result := Sign(AItem1.DataType - AItem2.DataType); - if (Result = 0) and not AFindItemWithMaxVersion then - Result := Sign(AItem1.Version - AItem2.Version); - end; - -var - AItem, ATempItem: TcxEditRegisteredRepositoryItemsData; - AItemCount, H, I, L: Integer; -begin - AItem.DataType := ADataType; - AItem.Version := AVersion; - AItemCount := Length(AItems); - L := 0; - H := AItemCount - 1; - I := 0; - while L <= H do - begin - I := (L + H) div 2; - ATempItem := AItems[I]; - case Compare(ATempItem, AItem) of - -1: - L := I + 1; - 0: - Break; - else - H := I - 1 - end; - end; - - if L > H then - AIndex := L - else - AIndex := I; - - if AFindItemWithMaxVersion then - while (AIndex < AItemCount - 1) and (AItems[AIndex + 1].DataType = AItem.DataType) do - Inc(AIndex); - - Result := (AIndex < AItemCount) and (AItems[AIndex].DataType = AItem.DataType) and - (AFindItemWithMaxVersion or (AItems[AIndex].Version = AItem.Version)); -end; - -function TcxEditRegisteredRepositoryItems.GetCount: Integer; -begin - Result := Length(FItems); -end; - -function TcxEditRegisteredRepositoryItems.GetDefaultCount: Integer; -begin - Result := Length(FDefaultItems); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditRepositoryEditor.dfm b/internal/x.46/ExpressEditors Library 5/Sources/cxEditRepositoryEditor.dfm deleted file mode 100644 index bcca2512..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditRepositoryEditor.dfm +++ /dev/null @@ -1,87 +0,0 @@ -inherited cxEditRepositoryEditor: TcxEditRepositoryEditor - Left = 363 - Top = 194 - Width = 353 - Height = 416 - Caption = 'EditRepository editor' - Constraints.MinHeight = 200 - Constraints.MinWidth = 350 - PopupMenu = PopupMenu1 - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object LBItems: TListBox - Left = 0 - Top = 0 - Width = 258 - Height = 382 - Align = alClient - ItemHeight = 13 - MultiSelect = True - Sorted = True - TabOrder = 0 - OnClick = LBItemsClick - end - object Panel1: TPanel - Left = 258 - Top = 0 - Width = 87 - Height = 382 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btAdd: TButton - Left = 6 - Top = 8 - Width = 75 - Height = 25 - Caption = '&Add...' - TabOrder = 0 - OnClick = btAddClick - end - object btDelete: TButton - Left = 6 - Top = 40 - Width = 75 - Height = 25 - Caption = '&Delete' - TabOrder = 1 - OnClick = btDeleteClick - end - object btClose: TButton - Left = 6 - Top = 356 - Width = 75 - Height = 25 - Anchors = [akLeft, akBottom] - Caption = '&Close' - TabOrder = 2 - OnClick = btCloseClick - end - end - object PopupMenu1: TPopupMenu - Left = 32 - Top = 16 - object miAdd: TMenuItem - Caption = 'Add' - ShortCut = 45 - OnClick = miAddClick - end - object miDelete: TMenuItem - Caption = 'Delete' - Enabled = False - ShortCut = 46 - OnClick = miDeleteClick - end - object N1: TMenuItem - Caption = '-' - end - object miSelectAll: TMenuItem - Caption = 'Select all' - Enabled = False - ShortCut = 16449 - OnClick = miSelectAllClick - end - end -end diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditRepositoryEditor.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEditRepositoryEditor.pas deleted file mode 100644 index 91ff4412..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditRepositoryEditor.pas +++ /dev/null @@ -1,327 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxEditRepositoryEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - DesignIntf, - Variants, -{$ELSE} - DsgnIntf, -{$ENDIF} - Windows, SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, cxDesignWindows, StdCtrls, cxEdit, Menus, ExtCtrls; - -type - TcxEditRepositoryEditor = class(TcxDesignFormEditor) - LBItems: TListBox; - btAdd: TButton; - btDelete: TButton; - btClose: TButton; - Panel1: TPanel; - PopupMenu1: TPopupMenu; - miAdd: TMenuItem; - miDelete: TMenuItem; - N1: TMenuItem; - miSelectAll: TMenuItem; - procedure LBItemsClick(Sender: TObject); - procedure btDeleteClick(Sender: TObject); - procedure btCloseClick(Sender: TObject); - procedure btAddClick(Sender: TObject); - procedure SelectItem(AItem: TObject); - procedure miAddClick(Sender: TObject); - procedure miDeleteClick(Sender: TObject); - procedure miSelectAllClick(Sender: TObject); - private - function GetEditRepository: TcxEditRepository; - procedure UpdateButtons; - procedure UpdateDesigner(Sender: TObject); - procedure UpdateItems; - protected - procedure InitFormEditor; override; - public - procedure DoItemsModified; override; - procedure SelectionsChanged(const ASelection: TDesignerSelectionList); override; - property EditRepository: TcxEditRepository read GetEditRepository; - end; - -procedure RegisterEditRepositoryItem( - AEditRepositoryItemClass: TcxEditRepositoryItemClass; const ADescription: string); -procedure UnRegisterEditRepositoryItem( - AEditRepositoryItemClass: TcxEditRepositoryItemClass); - -procedure ShowEditRepositoryEditor(ADesigner: IDesigner; - AEditRepository: TcxEditRepository); - -procedure GenEditRepositoryItemName(AEditRepository: TcxEditRepository; - AItem: TcxEditRepositoryItem); - -implementation - -{$R *.dfm} - -uses - cxClasses, cxSelectEditRepositoryItem; - -var - EditRepositoryList: TcxRegisteredClasses; - SetupSelectData: TcxSelectRepositoryItemSetup; - -procedure RegisterEditRepositoryItem( - AEditRepositoryItemClass: TcxEditRepositoryItemClass; const ADescription: string); -begin - EditRepositoryList.Register(AEditRepositoryItemClass, ADescription) -end; - -procedure UnRegisterEditRepositoryItem( - AEditRepositoryItemClass: TcxEditRepositoryItemClass); -begin - EditRepositoryList.UnRegister(AEditRepositoryItemClass); -end; - -procedure ShowEditRepositoryEditor(ADesigner: IDesigner; - AEditRepository: TcxEditRepository); -begin - ShowFormEditorClass(ADesigner, AEditRepository, TcxEditRepositoryEditor); -end; - -procedure GenEditRepositoryItemName(AEditRepository: TcxEditRepository; - AItem: TcxEditRepositoryItem); -var - ABaseName: string; - I: Integer; -begin - ABaseName := AItem.GetBaseName; - I := 1; - while I <> -1 do - try - AItem.Name := ABaseName + IntToStr(I); - I := -1; - except - on EComponentError do //Ignore rename errors - Inc(I); - end; -end; - -procedure TcxEditRepositoryEditor.LBItemsClick(Sender: TObject); -var - AList: TList; - I: Integer; -begin - AList := TList.Create; - try - for I := 0 to LBItems.Items.Count - 1 do - if LBItems.Selected[I] then - AList.Add(LBItems.Items.Objects[I]); - SelectComponents(AList, EditRepository); - finally - AList.Free; - end; - UpdateButtons; -end; - -function TcxEditRepositoryEditor.GetEditRepository: TcxEditRepository; -begin - Result := Component as TcxEditRepository; -end; - -procedure TcxEditRepositoryEditor.UpdateButtons; -begin - btDelete.Enabled := LBItems.SelCount <> 0; - miDelete.Enabled := btDelete.Enabled; - miSelectAll.Enabled := btDelete.Enabled; -end; - -procedure TcxEditRepositoryEditor.btDeleteClick(Sender: TObject); - - function FindItemToSelect: TObject; - var - I: Integer; - begin - Result := nil; - with LBItems do - begin - if ItemIndex = -1 then Exit; - if not Selected[ItemIndex] then - Result := Items.Objects[ItemIndex] - else - begin - for I := ItemIndex + 1 to Items.Count - 1 do - if not Selected[I] then - begin - Result := Items.Objects[I]; - Exit - end; - for I := ItemIndex - 1 downto 0 do - if not Selected[I] then - begin - Result := Items.Objects[I]; - Exit - end; - end; - end; - end; - -var - I: Integer; - AItem: TObject; -begin - if LBItems.SelCount > 0 then - begin - AItem := FindItemToSelect; - for I := 0 to LBItems.Items.Count - 1 do - if LBItems.Selected[I] then - TcxEditRepositoryItem(LBItems.Items.Objects[I]).Free; - UpdateItems; - SelectItem(AItem); - UpdateButtons; - UpdateDesigner(nil); - LBItemsClick(nil); - end; -end; - -procedure TcxEditRepositoryEditor.UpdateDesigner(Sender: TObject); -begin - Designer.Modified; -end; - -procedure TcxEditRepositoryEditor.UpdateItems; -var - I, AItemIndex, ATopIndex: Integer; - ASelection: TStringList; -begin - ListBoxSaveSelection(LBItems, ASelection, AItemIndex, ATopIndex); - try - LBItems.Items.Clear; - for I := 0 to EditRepository.Count - 1 do - LBItems.Items.AddObject(EditRepository.Items[I].Name, EditRepository.Items[I]); - finally - ListBoxRestoreSelection(LBItems, ASelection, AItemIndex, ATopIndex); - end; -end; - -procedure TcxEditRepositoryEditor.InitFormEditor; -begin - inherited InitFormEditor; - UpdateItems; - UpdateSelection; - UpdateButtons; -end; - -procedure TcxEditRepositoryEditor.DoItemsModified; -begin - UpdateItems; -end; - -procedure TcxEditRepositoryEditor.SelectionsChanged( - const ASelection: TDesignerSelectionList); -var - AList: TList; -begin - AList := TList.Create; - try - GetSelectionList(AList); - ListBoxSyncSelection(LBItems, AList); - finally - AList.Free; - end; - UpdateButtons; -end; - -procedure TcxEditRepositoryEditor.btCloseClick(Sender: TObject); -begin - Close; -end; - -procedure TcxEditRepositoryEditor.btAddClick(Sender: TObject); -var - AEditRepositoryItemClass: TcxEditRepositoryItemClass; - AItem: TcxEditRepositoryItem; -begin - with SetupSelectData do - List := EditRepositoryList; - AEditRepositoryItemClass := GetEditRepositoryItemClass(SetupSelectData); - if AEditRepositoryItemClass <> nil then - begin - with EditRepository do - AItem := CreateItemEx(AEditRepositoryItemClass, Owner); - GenEditRepositoryItemName(EditRepository, AItem); - UpdateItems; - SelectItem(AItem); - UpdateButtons; - UpdateDesigner(nil); - end; -end; - -procedure TcxEditRepositoryEditor.SelectItem(AItem: TObject); -begin - LBItems.ItemIndex := LBItems.Items.IndexOfObject(AItem); - ListBoxClearSelection(LBItems); - if Component <> nil then - if AItem <> nil then - Designer.SelectComponent(TComponent(AItem)) - else - Designer.SelectComponent(Component) -end; - -procedure TcxEditRepositoryEditor.miAddClick(Sender: TObject); -begin - btAddClick(nil); -end; - -procedure TcxEditRepositoryEditor.miDeleteClick(Sender: TObject); -begin - btDeleteClick(nil); -end; - -procedure TcxEditRepositoryEditor.miSelectAllClick(Sender: TObject); -begin - ListBoxSelectAll(LBItems); - LBItemsClick(nil); -end; - -initialization - SetupSelectData.Pos := Point(-1, -1); - EditRepositoryList := TcxRegisteredClasses.Create; - -finalization - FreeAndNil(EditRepositoryList); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditRepositoryItems.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEditRepositoryItems.pas deleted file mode 100644 index f979783d..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditRepositoryItems.pas +++ /dev/null @@ -1,605 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxEditRepositoryItems; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, ComCtrls, Classes, SysUtils, Graphics, Controls, StdCtrls, - Forms, cxClasses, cxEdit, cxTextEdit, cxButtonEdit, cxDropDownEdit, cxImage, - cxMaskEdit, cxCalendar, cxCurrencyEdit, cxSpinEdit, cxMemo, cxImageComboBox, - cxBlobEdit, cxCalc, cxCheckBox, cxTimeEdit, cxHyperLinkEdit, cxMRUEdit, - cxRadioGroup; - -type - - { TcxEditRepositoryTextItem } - - TcxEditRepositoryTextItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxTextEditProperties; - procedure SetProperties(Value: TcxTextEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxTextEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryButtonItem } - - TcxEditRepositoryButtonItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxButtonEditProperties; - procedure SetProperties(Value: TcxButtonEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxButtonEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryImageItem } - - TcxEditRepositoryImageItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxImageProperties; - procedure SetProperties(Value: TcxImageProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxImageProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryComboBoxItem } - - TcxEditRepositoryComboBoxItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxComboBoxProperties; - procedure SetProperties(Value: TcxComboBoxProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxComboBoxProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryMaskItem } - - TcxEditRepositoryMaskItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxMaskEditProperties; - procedure SetProperties(Value: TcxMaskEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxMaskEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryPopupItem } - - TcxEditRepositoryPopupItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxPopupEditProperties; - procedure SetProperties(Value: TcxPopupEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxPopupEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryCalcItem } - - TcxEditRepositoryCalcItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxCalcEditProperties; - procedure SetProperties(Value: TcxCalcEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxCalcEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryDateItem } - - TcxEditRepositoryDateItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxDateEditProperties; - procedure SetProperties(Value: TcxDateEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxDateEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryCurrencyItem } - - TcxEditRepositoryCurrencyItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxCurrencyEditProperties; - procedure SetProperties(Value: TcxCurrencyEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxCurrencyEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositorySpinItem } - - TcxEditRepositorySpinItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxSpinEditProperties; - procedure SetProperties(Value: TcxSpinEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxSpinEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryMemoItem } - - TcxEditRepositoryMemoItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxMemoProperties; - procedure SetProperties(Value: TcxMemoProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxMemoProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryImageComboBoxItem } - - TcxEditRepositoryImageComboBoxItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxImageComboBoxProperties; - procedure SetProperties(Value: TcxImageComboBoxProperties); - protected - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxImageComboBoxProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryBlobItem } - - TcxEditRepositoryBlobItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxBlobEditProperties; - procedure SetProperties(Value: TcxBlobEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxBlobEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryCheckBoxItem } - - TcxEditRepositoryCheckBoxItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxCheckBoxProperties; - procedure SetProperties(Value: TcxCheckBoxProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxCheckBoxProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryTimeItem } - - TcxEditRepositoryTimeItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxTimeEditProperties; - procedure SetProperties(Value: TcxTimeEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxTimeEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryMRUItem } - - TcxEditRepositoryMRUItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxMRUEditProperties; - procedure SetProperties(Value: TcxMRUEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxMRUEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryHyperLinkItem } - - TcxEditRepositoryHyperLinkItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxHyperLinkEditProperties; - procedure SetProperties(Value: TcxHyperLinkEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxHyperLinkEditProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryRadioGroupItem } - - TcxEditRepositoryRadioGroupItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxRadioGroupProperties; - procedure SetProperties(Value: TcxRadioGroupProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxRadioGroupProperties read GetProperties write SetProperties; - end; - -implementation - -{ TcxEditRepositoryTextItem } - -class function TcxEditRepositoryTextItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxTextEditProperties; -end; - -function TcxEditRepositoryTextItem.GetProperties: TcxTextEditProperties; -begin - Result := inherited Properties as TcxTextEditProperties; -end; - -procedure TcxEditRepositoryTextItem.SetProperties(Value: TcxTextEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryButtonItem } - -class function TcxEditRepositoryButtonItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxButtonEditProperties; -end; - -function TcxEditRepositoryButtonItem.GetProperties: TcxButtonEditProperties; -begin - Result := inherited Properties as TcxButtonEditProperties; -end; - -procedure TcxEditRepositoryButtonItem.SetProperties(Value: TcxButtonEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryImageItem } - -class function TcxEditRepositoryImageItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxImageProperties; -end; - -function TcxEditRepositoryImageItem.GetProperties: TcxImageProperties; -begin - Result := inherited Properties as TcxImageProperties; -end; - -procedure TcxEditRepositoryImageItem.SetProperties(Value: TcxImageProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryComboBoxItem } - -class function TcxEditRepositoryComboBoxItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxComboBoxProperties; -end; - -function TcxEditRepositoryComboBoxItem.GetProperties: TcxComboBoxProperties; -begin - Result := inherited Properties as TcxComboBoxProperties; -end; - -procedure TcxEditRepositoryComboBoxItem.SetProperties(Value: TcxComboBoxProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryMaskItem } - -class function TcxEditRepositoryMaskItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxMaskEditProperties; -end; - -function TcxEditRepositoryMaskItem.GetProperties: TcxMaskEditProperties; -begin - Result := inherited Properties as TcxMaskEditProperties; -end; - -procedure TcxEditRepositoryMaskItem.SetProperties(Value: TcxMaskEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryPopupItem } - -class function TcxEditRepositoryPopupItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxPopupEditProperties; -end; - -function TcxEditRepositoryPopupItem.GetProperties: TcxPopupEditProperties; -begin - Result := inherited Properties as TcxPopupEditProperties; -end; - -procedure TcxEditRepositoryPopupItem.SetProperties(Value: TcxPopupEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryCalcItem } - -class function TcxEditRepositoryCalcItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCalcEditProperties; -end; - -function TcxEditRepositoryCalcItem.GetProperties: TcxCalcEditProperties; -begin - Result := inherited Properties as TcxCalcEditProperties; -end; - -procedure TcxEditRepositoryCalcItem.SetProperties(Value: TcxCalcEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryDateItem } - -class function TcxEditRepositoryDateItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxDateEditProperties; -end; - -function TcxEditRepositoryDateItem.GetProperties: TcxDateEditProperties; -begin - Result := inherited Properties as TcxDateEditProperties; -end; - -procedure TcxEditRepositoryDateItem.SetProperties(Value: TcxDateEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryCurrencyItem } - -class function TcxEditRepositoryCurrencyItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCurrencyEditProperties; -end; - -function TcxEditRepositoryCurrencyItem.GetProperties: TcxCurrencyEditProperties; -begin - Result := inherited Properties as TcxCurrencyEditProperties; -end; - -procedure TcxEditRepositoryCurrencyItem.SetProperties(Value: TcxCurrencyEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositorySpinItem } - -class function TcxEditRepositorySpinItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxSpinEditProperties; -end; - -function TcxEditRepositorySpinItem.GetProperties: TcxSpinEditProperties; -begin - Result := inherited Properties as TcxSpinEditProperties; -end; - -procedure TcxEditRepositorySpinItem.SetProperties(Value: TcxSpinEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryMemoItem } - -class function TcxEditRepositoryMemoItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxMemoProperties; -end; - -function TcxEditRepositoryMemoItem.GetProperties: TcxMemoProperties; -begin - Result := inherited Properties as TcxMemoProperties; -end; - -procedure TcxEditRepositoryMemoItem.SetProperties(Value: TcxMemoProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryImageComboBoxItem } - -class function TcxEditRepositoryImageComboBoxItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxImageComboBoxProperties; -end; - -function TcxEditRepositoryImageComboBoxItem.GetProperties: TcxImageComboBoxProperties; -begin - Result := inherited Properties as TcxImageComboBoxProperties; -end; - -procedure TcxEditRepositoryImageComboBoxItem.SetProperties(Value: TcxImageComboBoxProperties); -begin - inherited Properties := Value; -end; - -procedure TcxEditRepositoryImageComboBoxItem.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and not (csDestroying in ComponentState) then - with TcxImageComboBoxProperties(Properties) do - begin - if AComponent = Images then Images := nil; - if AComponent = LargeImages then LargeImages := nil; - end; -end; - -{ TcxEditRepositoryBlobItem } - -class function TcxEditRepositoryBlobItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxBlobEditProperties; -end; - -function TcxEditRepositoryBlobItem.GetProperties: TcxBlobEditProperties; -begin - Result := inherited Properties as TcxBlobEditProperties; -end; - -procedure TcxEditRepositoryBlobItem.SetProperties(Value: TcxBlobEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryCheckBoxItem } - -class function TcxEditRepositoryCheckBoxItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCheckBoxProperties; -end; - -function TcxEditRepositoryCheckBoxItem.GetProperties: TcxCheckBoxProperties; -begin - Result := inherited Properties as TcxCheckBoxProperties; -end; - -procedure TcxEditRepositoryCheckBoxItem.SetProperties(Value: TcxCheckBoxProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryTimeItem } - -class function TcxEditRepositoryTimeItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxTimeEditProperties; -end; - -function TcxEditRepositoryTimeItem.GetProperties: TcxTimeEditProperties; -begin - Result := inherited Properties as TcxTimeEditProperties; -end; - -procedure TcxEditRepositoryTimeItem.SetProperties(Value: TcxTimeEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryMRUItem } - -class function TcxEditRepositoryMRUItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxMRUEditProperties; -end; - -function TcxEditRepositoryMRUItem.GetProperties: TcxMRUEditProperties; -begin - Result := inherited Properties as TcxMRUEditProperties; -end; - -procedure TcxEditRepositoryMRUItem.SetProperties(Value: TcxMRUEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryHyperLinkItem } - -class function TcxEditRepositoryHyperLinkItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxHyperLinkEditProperties; -end; - -function TcxEditRepositoryHyperLinkItem.GetProperties: TcxHyperLinkEditProperties; -begin - Result := inherited Properties as TcxHyperLinkEditProperties; -end; - -procedure TcxEditRepositoryHyperLinkItem.SetProperties(Value: TcxHyperLinkEditProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryRadioGroupItem } - -class function TcxEditRepositoryRadioGroupItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxRadioGroupProperties; -end; - -function TcxEditRepositoryRadioGroupItem.GetProperties: TcxRadioGroupProperties; -begin - Result := inherited Properties as TcxRadioGroupProperties; -end; - -procedure TcxEditRepositoryRadioGroupItem.SetProperties(Value: TcxRadioGroupProperties); -begin - inherited Properties := Value; -end; - -initialization - RegisterClasses([TcxEditRepositoryItem, TcxEditRepositoryTextItem, - TcxEditRepositoryButtonItem, TcxEditRepositoryImageItem, - TcxEditRepositoryComboBoxItem, TcxEditRepositoryMaskItem, - TcxEditRepositoryPopupItem, TcxEditRepositoryCalcItem, - TcxEditRepositoryDateItem, TcxEditRepositoryCurrencyItem, - TcxEditRepositorySpinItem, TcxEditRepositoryMemoItem, - TcxEditRepositoryImageComboBoxItem, TcxEditRepositoryBlobItem, - TcxEditRepositoryCheckBoxItem, TcxEditRepositoryTimeItem, - TcxEditRepositoryMRUItem, TcxEditRepositoryHyperLinkItem, - TcxEditRepositoryRadioGroupItem]); - {$IFDEF DELPHI6} - StartClassGroup(TControl); - GroupDescendentsWith(TcxEditRepositoryItem, TControl); - GroupDescendentsWith(TcxEditRepository, TControl); - {$ENDIF} - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxEditUtils.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxEditUtils.pas deleted file mode 100644 index 9252da13..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxEditUtils.pas +++ /dev/null @@ -1,850 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxEditUtils; - -{$I cxVer.inc} - -interface - -{.$DEFINE NOFLICKER} - -uses - Windows, - dxThemeManager, -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Classes, Controls, Forms, Graphics, ImgList, StdCtrls, SysUtils, - cxContainer, cxControls, cxEdit, cxEditPaintUtils, - cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, cxScrollBar; - -const - cxEditButtonMaxBorderWidth = 2; - cxEditMaxBorderWidth = cxContainerMaxBorderWidth; - cxEditMaxCheckBoxBorderWidth = 2; - cxEditShadowWidth = cxContainerShadowWidth; - -type - TcxEditCanvasHandle = HDC; - -function CalculateEditDefaultButtonWidth(ACanvas: TcxCanvas; AViewInfo: TcxEditButtonViewInfo): Integer; -function cxEditGetBorderWidthBySkinPainter(ABorderStyle: TcxEditBorderStyle; - ASkinPainter: TcxCustomLookAndFeelPainterClass): Integer; -procedure cxEditFillRect(ACanvas: TCanvas; const R: TRect; AColor: TColor); overload; -procedure cxEditFillRect(ACanvas: TcxCanvas; const R: TRect; AColor: TColor); overload; -procedure cxEditFillRect(ACanvasHandle: TcxEditCanvasHandle; const R: TRect; - ABrush: TBrushHandle); overload; -function cxIsDigitChar(C: Char): Boolean; -function cxOffsetRect(var ARect: TRect; AOffset: TPoint): Boolean; -function cxTextOutFlagsToDrawTextFlags(AFlags: DWORD): Integer; -procedure DrawArrow(ACanvas: TcxCanvas; AArrowSize: Integer; AContentRect: TRect; - AArrowDirection: TcxArrowDirection; AIsDoubleArrow: Boolean; - AOffsetContent: Boolean; AColor: TColor); -procedure DrawButtonBorder(ACanvas: TcxCanvas; var ARect: TRect; - ABorders: TcxBorders; AColor: TColor); -procedure DrawCustomEdit(ACanvas: TcxCanvas; AViewInfo: TcxCustomEditViewInfo; - ADrawBackground: Boolean; ABackgroundStyle: TcxEditBackgroundPaintingStyle); -function DrawTextFlagsTocxTextOutFlags(AFlags: DWORD): Integer; -procedure DrawGlyph(ACanvas: TCanvas; X, Y: Integer; AGlyph: TBitmap; - AEnabled: Boolean; ABrushColor: TColor = clNone; ABackgroundBitmap: TBitmap = nil); overload; -procedure DrawGlyph(ACanvas: TcxCanvas; X, Y: Integer; AGlyph: TBitmap; - AEnabled: Boolean; ABrushColor: TColor = clNone; ABackgroundBitmap: TBitmap = nil); overload; -procedure DrawGlyph(ACanvas: TcxCanvas; AImageList: TCustomImageList; - AImageIndex: TImageIndex; - const AGlyphRect: TRect; ABrushColor: TColor; AEnabled: Boolean; - ABackgroundBitmap: TBitmap = nil); overload; -function GetArrowSize(const AContentSize: TSize; AArrowDirection: TcxArrowDirection): TSize; -function GetEditButtonsContentVerticalOffset(ACanvas: TcxCanvas; - AButtonsStyle: TcxEditButtonStyle; ANativeStyle: Boolean): Integer; -function GetHotTrackColor: TColor; -function GetNativeInnerTextEditContentHeightCorrection( - AProperties: TcxCustomEditProperties; AIsInplace: Boolean): Integer; -function GetEditButtonRegion(ACanvas: TcxCanvas; AViewInfo: TcxEditButtonViewInfo): TcxRegion; -function GetEditBorderHighlightColor(AIsOffice11Style: Boolean): TColor; -function GetEditButtonHighlightColor(APressed: Boolean; - AIsOffice11Style: Boolean): TColor; -function GetPainterClass(ANativeStyle: Boolean; - ALookAndFeel: TcxLookAndFeelKind): TcxCustomLookAndFeelPainterClass; -procedure InternalFillRect(ACanvas: TcxCanvas; const AOuterRect, AInternalRect: TRect; - ABrush: TBrushHandle); -procedure InternalPolyLine(ACanvas: TcxCanvas; const Points: array of TPoint; - AColor: TColor; AOrtoDrawing: Boolean = False); -function IsShadowDrawingNeeded(AViewData: TcxCustomEditViewData): Boolean; -procedure RestoreCanvasFont(ACanvas: TcxCanvas; const ASavedLogFont: TLogFont); -procedure SaveCanvasFont(ACanvas: TcxCanvas; out ALogFont: TLogFont); -function VerifyBitmap(ABitmap: TBitmap): Boolean; -function VerifyImages(AImages: TCustomImageList): Boolean; - -implementation - -uses - Messages, cxClasses, cxDrawTextUtils, dxOffice11, dxThemeConsts, dxUxTheme, - cxGeometry, cxDWMApi, dxCore; - -const - cxEditButtonContentVerticalOffset: array [TcxEditButtonStyle] of Integer = - (0, 4, 2, 2, 2, 2, 2); - -procedure DrawArrow(ACanvas: TcxCanvas; AArrowSize: Integer; AContentRect: TRect; - AArrowDirection: TcxArrowDirection; AIsDoubleArrow: Boolean; - AOffsetContent: Boolean; AColor: TColor); -var - AArrowBrush: TBrushHandle; - AArrowRect: TRect; - - procedure InternalDrawArrow; - var - I: Integer; - R: TRect; - begin - case AArrowDirection of - adLeft: - begin - with AArrowRect do - R := Rect(Left, Top + AArrowSize - 1, Left + 1, Top + AArrowSize); - with R do - for I := 1 to AArrowSize do - begin - cxEditFillRect(ACanvas.Handle, R, AArrowBrush); - Inc(Left); - Dec(Top); - Inc(Right); - Inc(Bottom); - end; - Inc(AArrowRect.Left, AArrowSize); - end; - adRight: - begin - with AArrowRect do - R := Rect(Left, Top, Left + 1, Bottom); - with R do - for I := 1 to AArrowSize do - begin - cxEditFillRect(ACanvas.Handle, R, AArrowBrush); - Inc(Left); - Inc(Top); - Inc(Right); - Dec(Bottom); - end; - Inc(AArrowRect.Left, AArrowSize); - end; - adUp: - begin - with AArrowRect do - R := Rect(Left + AArrowSize - 1, Top, Left + AArrowSize, Top + 1); - with R do - for I := 1 to AArrowSize do - begin - cxEditFillRect(ACanvas.Handle, R, AArrowBrush); - Dec(Left); - Inc(Top); - Inc(Right); - Inc(Bottom); - end; - Inc(AArrowRect.Top, AArrowSize); - end; - adDown: - begin - with AArrowRect do - R := Rect(Left, Top, Right, Top + 1); - with R do - for I := 1 to AArrowSize do - begin - cxEditFillRect(ACanvas.Handle, R, AArrowBrush); - Inc(Left); - Inc(Top); - Dec(Right); - Inc(Bottom); - end; - Inc(AArrowRect.Top, AArrowSize); - end; - end; - end; - -var - AArrowRectSize: TSize; - I: Integer; -begin - if AArrowDirection in [adLeft, adRight] then - begin - AArrowRectSize.cx := AArrowSize * (1 + Integer(AIsDoubleArrow)); - AArrowRectSize.cy := AArrowSize * 2 - 1; - end - else - begin - AArrowRectSize.cx := AArrowSize * 2 - 1; - AArrowRectSize.cy := AArrowSize * (1 + Integer(AIsDoubleArrow)); - end; - - with AContentRect do - begin - AArrowRect.Left := Left + (Right - Left - AArrowRectSize.cx) div 2; - AArrowRect.Top := Top + (Bottom - Top - AArrowRectSize.cy) div 2; - if AOffsetContent then - begin - Inc(AArrowRect.Left); - Inc(AArrowRect.Top); - end; - AArrowRect.Right := AArrowRect.Left + AArrowRectSize.cx; - AArrowRect.Bottom := AArrowRect.Top + AArrowRectSize.cy; - end; - - AArrowBrush := GetSolidBrush(ACanvas, AColor); - for I := 0 to Integer(AIsDoubleArrow) do - InternalDrawArrow; -end; - -procedure DrawButtonBorder(ACanvas: TcxCanvas; var ARect: TRect; - ABorders: TcxBorders; AColor: TColor); -var - AWorkRect: TRect; -begin - AWorkRect := ARect; - Dec(AWorkRect.Bottom, 1); - Dec(AWorkRect.Right, 1); - ACanvas.Pen.Color := AColor; - - if bLeft in ABorders then - begin - InternalPolyLine(ACanvas, [AWorkRect.TopLeft, Point(AWorkRect.Left, AWorkRect.Bottom)], AColor); - Inc(ARect.Left); - end; - if bRight in ABorders then - begin - InternalPolyLine(ACanvas, [Point(AWorkRect.Right, AWorkRect.Top), AWorkRect.BottomRight], AColor); - Dec(ARect.Right); - end; - if bTop in ABorders then - begin - InternalPolyLine(ACanvas, [AWorkRect.TopLeft, Point(AWorkRect.Right, AWorkRect.Top)], AColor); - Inc(ARect.Top); - end; - if bBottom in ABorders then - begin - InternalPolyLine(ACanvas, [Point(AWorkRect.Left, AWorkRect.Bottom), AWorkRect.BottomRight], AColor); - Dec(ARect.Bottom); - end; -end; - -procedure DrawGlyph(ACanvas: TCanvas; X, Y: Integer; AGlyph: TBitmap; - AEnabled: Boolean; ABrushColor: TColor = clNone; ABackgroundBitmap: TBitmap = nil); - - procedure InternalDrawGlyphEnabled; - var - AGlyphDrawingBrush: TBrush; - APrevBrushStyle: TBrushStyle; - R: TRect; - begin - if ABackgroundBitmap = nil then - AGlyphDrawingBrush := ACanvas.Brush - else - AGlyphDrawingBrush := ABackgroundBitmap.Canvas.Brush; - APrevBrushStyle := AGlyphDrawingBrush.Style; - - with ACanvas do - begin - if (ABackgroundBitmap <> nil) or (ABrushColor = clNone) then - AGlyphDrawingBrush.Style := bsClear - else - AGlyphDrawingBrush.Color := ABrushColor; - if ABackgroundBitmap = nil then - ACanvas.BrushCopy(Bounds(X, Y, AGlyph.Width, AGlyph.Height), AGlyph, - Rect(0, 0, AGlyph.Width, AGlyph.Height), AGlyph.TransparentColor) - else - begin - R := Rect(0, 0, AGlyph.Width, AGlyph.Height); - ABackgroundBitmap.Canvas.BrushCopy(R, AGlyph, R, AGlyph.TransparentColor); - ACanvas.Draw(X, Y, ABackgroundBitmap); - end; - end; - - AGlyphDrawingBrush.Style := APrevBrushStyle; - end; - - procedure InternalDrawGlyphDisabled; - var - ABitmap: TBitmap; - AImageList: TcxImageList; - begin - AImageList := TcxImageList.Create(nil); - try - AImageList.Width := AGlyph.Width; - AImageList.Height := AGlyph.Height; - ABitmap := nil; - try - if (ABackgroundBitmap = nil) and (ABrushColor <> clNone) then - begin - ABitmap := cxCreateBitmap(AImageList.Width, AImageList.Height, pfDevice); - cxEditFillRect(ABitmap.Canvas.Handle, Rect(0, 0, ABitmap.Width, ABitmap.Height), - GetSolidBrush(ABitmap.Canvas, ABrushColor)); - end; - AImageList.AddMasked(AGlyph, AGlyph.TransparentColor); - if ABitmap <> nil then - begin - AImageList.Draw(ABitmap.Canvas, 0, 0, 0, AEnabled); - ACanvas.Draw(X, Y, ABitmap); - end - else - if ABackgroundBitmap = nil then - AImageList.Draw(ACanvas, X, Y, 0, AEnabled) - else - begin - AImageList.Draw(ABackgroundBitmap.Canvas, 0, 0, 0, AEnabled); - ACanvas.Draw(X, Y, ABackgroundBitmap); - end; - finally - ABitmap.Free; - end; - finally - AImageList.Free; - end; - end; - -begin - if AEnabled then - InternalDrawGlyphEnabled - else - InternalDrawGlyphDisabled; -end; - -procedure DrawGlyph(ACanvas: TcxCanvas; X, Y: Integer; AGlyph: TBitmap; - AEnabled: Boolean; ABrushColor: TColor = clNone; ABackgroundBitmap: TBitmap = nil); -begin - DrawGlyph(ACanvas.Canvas, X, Y, AGlyph, AEnabled, ABrushColor, ABackgroundBitmap); -end; - -procedure DrawGlyph(ACanvas: TcxCanvas; AImageList: TCustomImageList; - AImageIndex: TImageIndex; - const AGlyphRect: TRect; ABrushColor: TColor; AEnabled: Boolean; - ABackgroundBitmap: TBitmap = nil); -var - ABitmap: TBitmap; -begin - ABitmap := nil; - try - if ABackgroundBitmap = nil then - begin - ABitmap := TBitmap.Create; - ABitmap.Width := AImageList.Width; - ABitmap.Height := AImageList.Height; - with ABitmap.Canvas do - cxEditFillRect(Handle, Rect(0, 0, ABitmap.Width, ABitmap.Height), - GetSolidBrush(ABitmap.Canvas, ABrushColor)); - end; - if ABackgroundBitmap <> nil then - begin - AImageList.Draw(ABackgroundBitmap.Canvas, 0, 0, AImageIndex, AEnabled); // ??? itMask TODO - ACanvas.Draw(AGlyphRect.Left, AGlyphRect.Top, ABackgroundBitmap); - end else - begin - AImageList.Draw(ABitmap.Canvas, 0, 0, AImageIndex, AEnabled); // ??? itMask TODO - ACanvas.Draw(AGlyphRect.Left, AGlyphRect.Top, ABitmap); - end; - finally - if ABitmap <> nil then - ABitmap.Free; - end; -end; - -function GetPainterClass(ANativeStyle: Boolean; - ALookAndFeel: TcxLookAndFeelKind): TcxCustomLookAndFeelPainterClass; -const - APainterMap: array[TcxLookAndFeelKind] of TcxCustomLookAndFeelPainterClass = ( - TcxFlatLookAndFeelPainter, TcxStandardLookAndFeelPainter, - TcxUltraFlatLookAndFeelPainter, TcxOffice11LookAndFeelPainter - ); -begin - if ANativeStyle and AreVisualStylesAvailable then - Result := TcxWinXPLookAndFeelPainter - else - Result := APainterMap[ALookAndFeel]; -end; - -procedure InternalPolyLine(ACanvas: TcxCanvas; const Points: array of TPoint; - AColor: TColor; AOrtoDrawing: Boolean = False); -var - I: Integer; - P1, P2: TPoint; - ABrush: TBrushHandle; -begin - with ACanvas do - if AOrtoDrawing then - begin - ABrush := GetSolidBrush(AColor); - for I := 0 to Length(Points) - 2 do - begin - P1 := Points[I]; - P2 := Points[I + 1]; - if P1.X = P2.X then - begin - Inc(P2.X); - if P1.Y > P2.Y then - begin - Inc(P1.Y); - Inc(P2.Y); - end; - end - else - begin - Inc(P2.Y); - if P1.X > P2.X then - begin - Inc(P1.X); - Inc(P2.X); - end; - end; - cxEditFillRect(ACanvas.Handle, Rect(P1.X, P1.Y, P2.X, P2.Y), ABrush); - end; - with Points[High(Points)] do - cxEditFillRect(ACanvas.Handle, Rect(X, Y, X + 1, Y + 1), ABrush); - end - else - begin - Pen.Color := AColor; - Polyline(Points); - with Points[High(Points)] do - Pixels[X, Y] := AColor; - end; -end; - -function VerifyBitmap(ABitmap: TBitmap): Boolean; -begin - with ABitmap do - Result := (ABitmap <> nil) and (not Empty) and (Width > 0) and (Height > 0); -end; - -function VerifyImages(AImages: TCustomImageList): Boolean; -begin - with AImages do - Result := (AImages <> nil) and (Width > 0) and (Height > 0); -end; - -function CalculateEditDefaultButtonWidth(ACanvas: TcxCanvas; AViewInfo: TcxEditButtonViewInfo): Integer; - - function GetEditButtonTotalBorderExtent: Integer; - var - ATheme: TdxTheme; - R, CR: TRect; - begin - with AViewInfo do - if Data.NativeStyle then - begin - R := Rect(0, 0, 100, 100); - if Data.ComboBoxStyle then - begin - ATheme := OpenTheme(totComboBox); - GetThemeBackgroundContentRect(ATheme, ACanvas.Handle, CP_DROPDOWNBUTTON, - CBXS_NORMAL, R, CR); - end else - begin - ATheme := OpenTheme(totButton); - GetThemeBackgroundContentRect(ATheme, ACanvas.Handle, BP_PUSHBUTTON, - PBS_NORMAL, R, CR); - end; - Result := CR.Left + (R.Right - R.Left - CR.Right); - end - else - Result := cxEditButtonMaxBorderWidth * 2; - end; - -var - AButtonTotalBorderExtent: Integer; - ACaptionWidth: Integer; -begin - with AViewInfo do - begin - if Data.NativeStyle then - if Data.ComboBoxStyle then - Data.NativeStyle := AreVisualStylesMustBeUsed(Data.NativeStyle, totComboBox) - else - Data.NativeStyle := AreVisualStylesMustBeUsed(Data.NativeStyle, totButton); - AButtonTotalBorderExtent := GetEditButtonTotalBorderExtent; - if Width > 0 then - if Width < AButtonTotalBorderExtent then - Result := AButtonTotalBorderExtent - else - Result := Width - else - if (Data.Kind = bkGlyph) and VerifyBitmap(Glyph) then - Result := Glyph.Width + GetEditButtonTotalBorderExtent - else - begin - if Data.Kind = bkText then - ACaptionWidth := ACanvas.TextWidth(Data.VisibleCaption) + AButtonTotalBorderExtent + 2 + 1 - else - ACaptionWidth := 0; - Result := GetSystemMetrics(SM_CYHSCROLL); - if ACaptionWidth > Result then - Result := ACaptionWidth; - end; - end; -end; - -function cxEditGetBorderWidthBySkinPainter(ABorderStyle: TcxEditBorderStyle; - ASkinPainter: TcxCustomLookAndFeelPainterClass): Integer; -const - SkinBordersWidth: array [Boolean] of Integer = (1, cxContainerMaxBorderWidth); -begin - if ASkinPainter = nil then - Result := GetContainerBorderWidth(TcxContainerBorderStyle(ABorderStyle)) - else - Result := SkinBordersWidth[ABorderStyle = ebsThick]; -end; - -procedure cxEditFillRect(ACanvas: TCanvas; const R: TRect; AColor: TColor); -begin - Windows.FillRect(ACanvas.Handle, R, GetSolidBrush(AColor)); -end; - -procedure cxEditFillRect(ACanvas: TcxCanvas; const R: TRect; AColor: TColor); -begin - Windows.FillRect(ACanvas.Handle, R, GetSolidBrush(AColor)); -end; - -procedure cxEditFillRect(ACanvasHandle: TcxEditCanvasHandle; const R: TRect; - ABrush: TBrushHandle); -begin - Windows.FillRect(ACanvasHandle, R, ABrush); -end; - -function cxIsDigitChar(C: Char): Boolean; -begin - Result := dxCharInSet(C, ['0'..'9']); -end; - -function cxOffsetRect(var ARect: TRect; AOffset: TPoint): Boolean; -begin - Result := OffsetRect(ARect, AOffset.X, AOffset.Y); -end; - -procedure ConvertFlag(AInputFlags: DWORD; var AOutputFlags: Integer; - AInputFlag: DWORD; AOutputFlag: Integer); -begin - if AInputFlags and AInputFlag <> 0 then - AOutputFlags := AOutputFlags or AOutputFlag; -end; - -function cxTextOutFlagsToDrawTextFlags(AFlags: DWORD): Integer; -begin - Result := 0; - ConvertFlag(AFlags, Result, CXTO_LEFT, cxAlignLeft); - ConvertFlag(AFlags, Result, CXTO_CENTER_HORIZONTALLY, cxAlignHCenter); - ConvertFlag(AFlags, Result, CXTO_RIGHT, cxAlignRight); - ConvertFlag(AFlags, Result, CXTO_TOP, cxAlignTop); - ConvertFlag(AFlags, Result, CXTO_CENTER_VERTICALLY, cxAlignVCenter); - ConvertFlag(AFlags, Result, CXTO_BOTTOM, cxAlignBottom); - ConvertFlag(AFlags, Result, CXTO_SINGLELINE, cxSingleLine); - ConvertFlag(AFlags, Result, CXTO_WORDBREAK, cxWordBreak); -end; - -function DrawTextFlagsTocxTextOutFlags(AFlags: DWORD): Integer; -begin - Result := 0; - ConvertFlag(AFlags, Result, cxAlignLeft, CXTO_LEFT); - ConvertFlag(AFlags, Result, cxAlignHCenter, CXTO_CENTER_HORIZONTALLY); - ConvertFlag(AFlags, Result, cxAlignRight, CXTO_RIGHT); - ConvertFlag(AFlags, Result, cxAlignTop, CXTO_TOP); - ConvertFlag(AFlags, Result, cxAlignVCenter, CXTO_CENTER_VERTICALLY); - ConvertFlag(AFlags, Result, cxAlignBottom, CXTO_BOTTOM); - ConvertFlag(AFlags, Result, cxSingleLine, CXTO_SINGLELINE); - ConvertFlag(AFlags, Result, cxWordBreak, CXTO_WORDBREAK); -end; - -procedure InternalFillRect(ACanvas: TcxCanvas; const AOuterRect, AInternalRect: TRect; - ABrush: TBrushHandle); -begin - if IsRectEmpty(AOuterRect) or EqualRect(AOuterRect, AInternalRect) then - Exit; - if IsRectEmpty(AInternalRect) then - cxEditFillRect(ACanvas.Handle, AOuterRect, ABrush) - else - begin - cxEditFillRect(ACanvas.Handle, Rect(AOuterRect.Left, AOuterRect.Top, - AInternalRect.Left, AOuterRect.Bottom), ABrush); - cxEditFillRect(ACanvas.Handle, Rect(AInternalRect.Left, AOuterRect.Top, - AInternalRect.Right, AInternalRect.Top), ABrush); - cxEditFillRect(ACanvas.Handle, Rect(AInternalRect.Right, AOuterRect.Top, - AOuterRect.Right, AOuterRect.Bottom), ABrush); - cxEditFillRect(ACanvas.Handle, Rect(AInternalRect.Left, AInternalRect.Bottom, - AInternalRect.Right, AOuterRect.Bottom), ABrush); - end; -end; - -procedure DrawCustomEdit(ACanvas: TcxCanvas; AViewInfo: TcxCustomEditViewInfo; - ADrawBackground: Boolean; ABackgroundStyle: TcxEditBackgroundPaintingStyle); - - procedure FillEditBorderRect(ABackgroundBrush: TBrushHandle); - begin - if not AViewInfo.Transparent then - cxEditFillRect(ACanvas.Handle, AViewInfo.BorderRect, ABackgroundBrush); - end; - - procedure FillContentOffsetRegion(ABackgroundBrush: TBrushHandle); - begin - with AViewInfo do - begin - if Transparent or not AViewInfo.HasContentOffsets then - Exit; - cxEditFillRect(ACanvas.Handle, Rect(Bounds.Left, Bounds.Top, BorderRect.Left, - Bounds.Bottom), ABackgroundBrush); - cxEditFillRect(ACanvas.Handle, Rect(BorderRect.Left, Bounds.Top, - BorderRect.Right, BorderRect.Top), ABackgroundBrush); - cxEditFillRect(ACanvas.Handle, Rect(BorderRect.Left, BorderRect.Bottom, - BorderRect.Right, Bounds.Bottom), ABackgroundBrush); - cxEditFillRect(ACanvas.Handle, Rect(BorderRect.Right, Bounds.Top, - Bounds.Right, Bounds.Bottom), ABackgroundBrush); - end; - end; - - procedure DrawEditBordersBySkinPainter(const R1: TRect; ABorderWidth: Integer; - APainter: TcxCustomLookAndFeelPainterClass); - begin - with AViewInfo do - begin - if BorderStyle <> ebsNone then - ACanvas.FrameRect(R1, BorderColor, ABorderWidth); - end; - end; - - procedure DrawUsualEditBorders(const R: TRect; ABorderWidth: Integer); - var - R1: TRect; - begin - with AViewInfo do - begin - R1 := R; - if AViewInfo.Painter <> nil then - DrawEditBordersBySkinPainter(R, ABorderWidth, Painter) - else - case AViewInfo.BorderStyle of - ebsSingle, ebsThick: - ACanvas.FrameRect(R1, BorderColor, ABorderWidth); - ebsFlat: - begin - ACanvas.DrawEdge(R1, True, True, Edges); - InflateRect(R1, -1, -1); - ACanvas.FrameRect(R1, clBtnFace); - end; - ebs3D: - begin - ACanvas.DrawEdge(R1, True, True, Edges); - InflateRect(R1, -1, -1); - ACanvas.DrawComplexFrame(R1, cl3DDkShadow, cl3DLight, Edges); - end; - end; - end; - end; - - procedure DrawUsualEditBackground(ABackgroundBrush: TBrushHandle); - var - R: TRect; - ABorderWidth: Integer; - begin - with AViewInfo do - begin - R := BorderRect; - ABorderWidth := cxEditGetBorderWidthBySkinPainter(BorderStyle, Painter); - Dec(R.Left, ABorderWidth); - Dec(R.Top, ABorderWidth); - if bRight in Edges then Inc(R.Right, ABorderWidth); - if bBottom in Edges then Inc(R.Bottom, ABorderWidth); - if Shadow then - DrawContainerShadow(ACanvas, R); - if not(bRight in Edges) then Inc(R.Right, ABorderWidth); - if not(bBottom in Edges) then Inc(R.Bottom, ABorderWidth); - DrawUsualEditBorders(R, ABorderWidth); - if IsInplace then - begin - if not Transparent then - if ADrawBackground then - cxEditFillRect(ACanvas.Handle, Bounds, ABackgroundBrush) - else - FillContentOffsetRegion(ABackgroundBrush); - end - else - if ADrawBackground then - FillEditBorderRect(ABackgroundBrush); - end; - end; - - procedure DrawEditBackground(ABackgroundBrush: TBrushHandle); - begin - if not AViewInfo.DrawBackground(ACanvas) then - if AViewInfo.NativeStyle then - AViewInfo.DrawNativeStyleEditBackground(ACanvas, ADrawBackground, - ABackgroundStyle, ABackgroundBrush) - else - DrawUsualEditBackground(ABackgroundBrush); - end; - -var - AVisibleButtonsCount: Integer; - I: Integer; - ASavedDC: Integer; -begin - AVisibleButtonsCount := Length(AViewInfo.ButtonsInfo); - ASavedDC := 0; - if (AVisibleButtonsCount > 0) and not AViewInfo.ButtonsInfo[0].Data.BackgroundPartiallyTransparent then - begin - ASavedDC := SaveDC(ACanvas.Handle); - for I := 0 to AVisibleButtonsCount - 1 do - ACanvas.ExcludeClipRect(AViewInfo.ButtonsInfo[I].VisibleBounds); - end; - DrawEditBackground(GetSolidBrush(ACanvas, AViewInfo.BackgroundColor)); - - if ASavedDC <> 0 then - RestoreDC(ACanvas.Handle, ASavedDC); - AViewInfo.DrawButtons(ACanvas); -end; - -function GetArrowSize(const AContentSize: TSize; AArrowDirection: TcxArrowDirection): TSize; -var - AMinContentSize: Integer; - ATempVar: Longint; -begin - AMinContentSize := AContentSize.cx; - if AMinContentSize > AContentSize.cy then - AMinContentSize := AContentSize.cy; - - Result.cx := (AMinContentSize - 1) div 2; - if not Odd(Result.cx) then - Result.cx := Result.cx + 1; - Result.cy := Result.cx div 2 + 1; - if AArrowDirection in [adLeft, adRight] then - begin - ATempVar := Result.cx; - Result.cx := Result.cy; - Result.cy := ATempVar; - end; -end; - -function GetEditButtonsContentVerticalOffset(ACanvas: TcxCanvas; - AButtonsStyle: TcxEditButtonStyle; ANativeStyle: Boolean): Integer; -var - ATheme: TdxTheme; - CR, R: TRect; -begin - if ANativeStyle then - begin - R := Rect(0, 0, 100, 100); - ATheme := OpenTheme(totButton); - GetThemeBackgroundContentRect(ATheme, ACanvas.Handle, BP_PUSHBUTTON, - PBS_NORMAL, R, CR); - Result := CR.Top + R.Bottom - CR.Bottom; - end - else - Result := cxEditButtonContentVerticalOffset[AButtonsStyle]; -end; - -function GetHotTrackColor: TColor; -begin - Result := GetSysColor(COLOR_HOTLIGHT); -end; - -function GetNativeInnerTextEditContentHeightCorrection( - AProperties: TcxCustomEditProperties; AIsInplace: Boolean): Integer; -begin - Result := Integer(AIsInplace and (AProperties.Buttons.Count > 0)); -end; - -function GetEditButtonRegion(ACanvas: TcxCanvas; AViewInfo: TcxEditButtonViewInfo): TcxRegion; -var - ATheme: TdxTheme; - ARgn1, ARgn2: HRGN; -begin - with AViewInfo do - if Data.NativeState <> TC_NONE then - begin - if Data.ComboBoxStyle then - begin - ATheme := OpenTheme(totComboBox); - GetThemeBackgroundRegion(ATheme, ACanvas.Handle, CP_DROPDOWNBUTTON, - Data.NativeState, @Bounds, ARgn1); - end else - begin - ATheme := OpenTheme(totButton); - GetThemeBackgroundRegion(ATheme, ACanvas.Handle, Data.NativePart, - Data.NativeState, @Bounds, ARgn1); - end; - ARgn2 := CreateRectRgnIndirect(Bounds); - CombineRgn(ARgn1, ARgn1, ARgn2, RGN_AND); - DeleteObject(ARgn2); - Result := TcxRegion.Create(ARgn1); - end - else - Result := TcxRegion.Create(Bounds); -end; - -function GetEditBorderHighlightColor( - AIsOffice11Style: Boolean): TColor; -begin - if AIsOffice11Style then - Result := dxOffice11SelectedBorderColor - else - Result := clHighlight; -end; - -function GetEditButtonHighlightColor(APressed: Boolean; - AIsOffice11Style: Boolean): TColor; -var - APainterClass: TcxCustomLookAndFeelPainterClass; -begin - if AIsOffice11Style then - APainterClass := TcxOffice11LookAndFeelPainter - else - APainterClass := TcxUltraFlatLookAndFeelPainter; - if APressed then - Result := APainterClass.ButtonColor(cxbsPressed) - else - Result := APainterClass.ButtonColor(cxbsHot); -end; - -function IsShadowDrawingNeeded(AViewData: TcxCustomEditViewData): Boolean; -begin - Result := AViewData.Style.Shadow and not AViewData.IsNativeStyle(AViewData.Style.LookAndFeel); -end; - -procedure RestoreCanvasFont(ACanvas: TcxCanvas; const ASavedLogFont: TLogFont); -begin - ACanvas.Font.Handle := CreateFontIndirect(ASavedLogFont); -end; - -procedure SaveCanvasFont(ACanvas: TcxCanvas; out ALogFont: TLogFont); -begin - cxGetFontData(ACanvas.Font.Handle, ALogFont); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditConsts.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditConsts.pas deleted file mode 100644 index d29ec809..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditConsts.pas +++ /dev/null @@ -1,330 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxExtEditConsts; - -{$I cxVer.inc} - -interface - -{.$DEFINE NOFLICKER} - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Graphics, SysUtils, cxContainer; - -resourcestring - scxSEditRepositoryColorComboBoxItem = 'ColorComboBox |Represents a editor with color functionality'; - scxSEditRepositoryFontNameComboBoxItem = 'FontNameComboBox |Represents a editor with font functionality'; - scxSEditRepositoryLabelItem = 'Label|Represents a Label'; - scxSEditRepositoryProgressBarItem = 'ProgressBar|Represents a ProgressBar'; - scxSEditRepositoryTrackBarItem = 'TrackBar|Represents a TrackBar'; - scxSEditRepositorySpinButtonItem = 'SpinButton|Represents a SpinButton'; - scxSEditRepositoryCheckComboBox = 'CheckComboBox|Represents a CheckComboBox'; - scxSEditRepositoryShellComboBoxItem = 'ShellComboBox|Represents a combo box with a dropdown shell tree view'; - scxSEditRepositoryCheckGroupItem = 'CheckGroup|Represents a group of check boxes'; - scxUDAssociated = ' is already associated with '; - scxHotZoneStyleMediaPlayer9 = 'MediaPlayer9'; - scxHotZoneStyleMediaPlayer8 = 'MediaPlayer8'; - scxHotZoneStyleXPTaskBar = 'XPTaskBar'; - scxHotZoneStyleSimple = 'Simple'; - scxLoadingFonts = 'Loading ...'; - - cxSEditCheckGroupCaptionStateDelimiter = ': '; - cxSEditCheckGroupFilterColumnSeparator = '; '; - cxSEditCheckGroupChecked = 'Checked'; - cxSEditCheckGroupGrayed = 'Grayed'; - cxSEditCheckGroupUnchecked = 'Unchecked'; - - cxSCheckComboBoxStatesItemsPropertyDlgCaption = 'cxCheckComboBox - CheckStates editor'; - cxSCheckGroupStatesItemsPropertyDlgCaption = 'cxCheckGroup - CheckStates editor'; - cxSCheckComboBoxEmptySelectionText = 'None selected'; - cxSCheckControlIncorrectItemCount = 'The number of items cannot be greater than 64, if the EditValueFormat is cvfInteger'; - - cxSColorComboBoxDefaultDescription = 'Color not selected'; - - cxSEditRichEditLibraryError = 'Cannot load a RichEdit library'; - cxSEditRichEditLineInsertionError = 'RichEdit line insertion error'; - cxSEditRichEditLoadFail = 'Failed to Load Stream'; - cxSEditRichEditSaveFail = 'Failed to Save Stream'; - cxSEditRichEditSelectionSaveFail = 'Failed to selection Save Stream'; - cxSEditRichEditOleInterfaceFail = 'RichEdit: failed to get IRichEditOle interface'; - cxSEditRichEditCallBackFail = 'RichEdit: failed to set callback'; - cxSEditRichEditLinkFail = 'RichEdit: cannot link to an invalid source'; - scxSEditRepositoryRichEditItem = 'RichEdit|RichEdit control'; - - cxSEditRichEditUndoCaption = '&Undo'; - cxSEditRichEditRedoCaption = '&Redo'; - cxSEditRichEditCutCaption = 'Cu&t'; - cxSEditRichEditCopyCaption = '&Copy'; - cxSEditRichEditPasteCaption = '&Paste'; - cxSEditRichEditDeleteCaption = '&Delete'; - cxSEditRichEditSelectAllCaption = 'Select &All'; - -type - TcxNaturalNumber = 1..High(Integer); - TcxPositiveNumber = 0..High(Integer); - -const - cxDelphiColorValues: - {$IFDEF DELPHI6} - array[0..51] of TColor = - {$ELSE} - array[0..42] of TColor = - {$ENDIF} - (clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clGray, - clSilver, clRed, clLime, clYellow, clBlue, clFuchsia, clAqua, clWhite, - {$IFDEF DELPHI6} - clMoneyGreen, clSkyBlue, clCream, clMedGray, - {$ENDIF} - clActiveBorder, clActiveCaption, clAppWorkSpace, clBackground, - clBtnFace, clBtnHighlight, clBtnShadow, clBtnText, clCaptionText, - clDefault, - {$IFDEF DELPHI6} - clGradientActiveCaption, clGradientInactiveCaption, - {$ENDIF} - clGrayText, clHighlight, clHighlightText, - {$IFDEF DELPHI6} - clHotLight, - {$ENDIF} - clInactiveBorder, - clInactiveCaption, clInactiveCaptionText, clInfoBk, clInfoText, - clMenu, - {$IFDEF DELPHI6} - clMenuBar, clMenuHighlight, - {$ENDIF} - clMenuText, clNone, clScrollBar, - cl3DDkShadow, cl3DLight, clWindow, clWindowFrame, clWindowText); - - cxDelphiColorNames: - {$IFDEF DELPHI6} - array[0..51] of string = - {$ELSE} - array[0..42] of string = - {$ENDIF} - ('clBlack', 'clMaroon', 'clGreen', 'clOlive', 'clNavy', 'clPurple', 'clTeal', - 'clGray', 'clSilver', 'clRed', 'clLime', 'clYellow', 'clBlue', 'clFuchsia', - 'clAqua', 'clWhite', - {$IFDEF DELPHI6} - 'clMoneyGreen', 'clSkyBlue', 'clCream', 'clMedGray', - {$ENDIF} - 'clActiveBorder', 'clActiveCaption', 'clAppWorkSpace', 'clBackground', - 'clBtnFace', 'clBtnHighlight', 'clBtnShadow', 'clBtnText', 'clCaptionText', - 'clDefault', - {$IFDEF DELPHI6} - 'clGradientActiveCaption', 'clGradientInactiveCaption', - {$ENDIF} - 'clGrayText', 'clHighlight', 'clHighlightText', - {$IFDEF DELPHI6} - 'clHotLight', - {$ENDIF} - 'clInactiveBorder', - 'clInactiveCaption', 'clInactiveCaptionText', 'clInfoBk', 'clInfoText', - 'clMenu', - {$IFDEF DELPHI6} - 'clMenuBar', 'clMenuHighlight', - {$ENDIF} - 'clMenuText', 'clNone', 'clScrollBar', - 'cl3DDkShadow', 'cl3DLight', 'clWindow', 'clWindowFrame', 'clWindowText'); - - cxHTML4ColorValues: array[0..15] of TColor = - ($000000, $C0C0C0, $808080, $FFFFFF, $000080, $0000FF, $800080, $FF00FF, - $008000, $00FF00, $008080, $00FFFF, $800000, $FF0000, $808000, $FFFF00); - - cxHTML4ColorNames: array[0..15] of string = - ('Black', 'Silver', 'Gray', 'White', 'Maroon', 'Red', 'Purple', 'Fuchsia', - 'Green', 'Lime', 'Olive', 'Yellow', 'Navy', 'Blue', 'Teal', 'Aqua'); - - cxX11ColorValues: array[0..139] of TColor = - ($FFF8F0, $D7EBFA, $FFFF00, $D4FF7F, $FFFFF0, $DCF5F5, $C4E4FF, $000000, - $CDEBFF, $FF0000, $E22B8A, $2A2AA5, $87B8DE, $A09E5F, $00FF7F, $1E69D2, - $507FFF, $ED9564, $DCF8FF, $3C14DC, $FFFF00, $8B0000, $8B8B00, $0B86B8, - $A9A9A9, $006400, $6BB7BD, $8B008B, $2F6B55, $008CFF, $CC3299, $00008B, - $7A96E9, $8FBC8F, $8B3D48, $4F4F2F, $D1CE00, $D30094, $9314FF, $FFBF00, - $696969, $FF901E, $2222B2, $F0FAFF, $228B22, $FF00FF, $DCDCDC, $FFF8F8, - $00D7FF, $20A5DA, $808080, $008000, $2FFFAD, $F0FFF0, $B469FF, $5C5CCD, - $82004B, $F0FFFF, $8CE6F0, $FAE6E6, $F5F0FF, $00FC7C, $CDFAFF, $E6D8AD, - $8080F0, $FFFFE0, $D2FAFA, $90EE90, $D3D3D3, $C1B6FF, $7AA0FF, $AAB220, - $FACE87, $998877, $DEC4B0, $E0FFFF, $00FF00, $32CD32, $E6F0FA, $FF00FF, - $000080, $AACD66, $CD0000, $D355BA, $DB7093, $71B33C, $EE687B, $9AFA00, - $CCD148, $8515C7, $701919, $FAFFF5, $E1E4FF, $B5E4FF, $ADDEFF, $800000, - $E6F5FD, $008080, $238E6B, $00A5FF, $0045FF, $D670DA, $AAE8EE, $98FB98, - $EEEEAF, $9370DB, $D5EFFF, $B9DAFF, $3F85CD, $CBC0FF, $DDA0DD, $E6E0B0, - $800080, $0000FF, $8F8FBC, $E16941, $13458B, $7280FA, $60A4F4, $578B2E, - $EEF5FF, $2D52A0, $C0C0C0, $EBCE87, $CD5A6A, $908070, $FAFAFF, $7FFF00, - $B48246, $8CB4D2, $808000, $D8BFD8, $4763FF, $D0E040, $EE82EE, $B3DEF5, - $FFFFFF, $F5F5F5, $00FFFF, $32CD9A); - - cxX11ColorNames: array[0..139] of string = - ('AliceBlue', 'AntiqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', - 'Bisque', 'Black', 'BlanchedAlmond', 'Blue', 'BlueViolet', 'Brown', - 'BurlyWood', 'CadetBlue', 'Chartreuse', 'Chocolate', 'Coral', - 'CornflowerBlue', 'Cornsilk', 'Crimson', 'Cyan', 'DarkBlue', 'DarkCyan', - 'DarkGoldenrod', 'DarkGray', 'DarkGreen', 'DarkKhaki', 'DarkMagenta', - 'DarkOliveGreen', 'DarkOrange', 'DarkOrchid', 'DarkRed', 'DarkSalmon', - 'DarkSeaGreen', 'DarkSlateBlue', 'DarkSlateGray', 'DarkTurquoise', - 'DarkViolet', 'DeepPink', 'DeepSkyBlue', 'DimGray', 'DodgerBlue', - 'FireBrick', 'FloralWhite', 'ForestGreen', 'Fuchsia', 'Gainsboro', - 'GhostWhite', 'Gold', 'Goldenrod', 'Gray', 'Green', 'GreenYellow', - 'Honeydew', 'HotPink', 'IndianRed', 'Indigo', 'Ivory', 'Khaki', - 'Lavender', 'LavenderBlush', 'LawnGreen', 'LemonChiffon', 'LightBlue', - 'LightCoral', 'LightCyan', 'LightGoldenrodYellow', 'LightGreen', - 'LightGrey', 'LightPink', 'LightSalmon', 'LightSeaGreen', 'LightSkyBlue', - 'LightSlateGray', 'LightSteelBlue', 'LightYellow', 'Lime', 'LimeGreen', - 'Linen', 'Magenta', 'Maroon', 'MediumAquamarine', 'MediumBlue', - 'MediumOrchid', 'MediumPurple', 'MediumSeaGreen', 'MediumSlateBlue', - 'MediumSpringGreen', 'MediumTurquoise', 'MediumVioletRed', 'MidnightBlue', - 'MintCream', 'MistyRose', 'Moccasin', 'NavajoWhite', 'Navy', 'OldLace', - 'Olive', 'OliveDrab', 'Orange', 'OrangeRed', 'Orchid', 'PaleGoldenrod', - 'PaleGreen', 'PaleTurquoise', 'PaleVioletRed', 'PapayaWhip', 'PeachPuff', - 'Peru', 'Pink', 'Plum', 'PowderBlue', 'Purple', 'Red', 'RosyBrown', - 'RoyalBlue', 'SaddleBrown', 'Salmon', 'SandyBrown', 'SeaGreen', 'Seashell', - 'Sienna', 'Silver', 'SkyBlue', 'SlateBlue', 'SlateGray', 'Snow', - 'SpringGreen', 'SteelBlue', 'Tan', 'Teal', 'Thistle', 'Tomato', 'Turquoise', - 'Violet', 'Wheat', 'White', 'WhiteSmoke', 'Yellow', 'YellowGreen'); - - cxX11OrderedColorValues: array[0..139] of TColor = - ($C1B6FF, $CBC0FF, $3C14DC, $F5F0FF, $9370DB, $B469FF, $9314FF, $8515C7, - $D670DA, $D8BFD8, $DDA0DD, $EE82EE, $FF00FF, $FF00FF, $8B008B, $800080, - $D355BA, $D30094, $CC3299, $82004B, $E22B8A, $DB7093, $EE687B, $CD5A6A, - $8B3D48, $FAE6E6, $FFF8F8, $FF0000, $CD0000, $701919, $8B0000, $800000, - $E16941, $ED9564, $DEC4B0, $998877, $908070, $FF901E, $FFF8F0, $B48246, - $FACE87, $EBCE87, $FFBF00, $E6D8AD, $E6E0B0, $A09E5F, $FFFFF0, $FFFFE0, - $EEEEAF, $FFFF00, $FFFF00, $D1CE00, $4F4F2F, $8B8B00, $808000, $CCD148, - $AAB220, $D0E040, $D4FF7F, $AACD66, $9AFA00, $FAFFF5, $7FFF00, $71B33C, - $578B2E, $F0FFF0, $90EE90, $98FB98, $8FBC8F, $32CD32, $00FF00, $228B22, - $008000, $006400, $00FF7F, $00FC7C, $2FFFAD, $2F6B55, $32CD9A, $238E6B, - $DCF5F5, $D2FAFA, $F0FFFF, $E0FFFF, $00FFFF, $008080, $6BB7BD, $CDFAFF, - $AAE8EE, $8CE6F0, $00D7FF, $DCF8FF, $20A5DA, $0B86B8, $F0FAFF, $E6F5FD, - $B3DEF5, $B5E4FF, $00A5FF, $D5EFFF, $CDEBFF, $ADDEFF, $D7EBFA, $8CB4D2, - $87B8DE, $C4E4FF, $008CFF, $E6F0FA, $3F85CD, $B9DAFF, $60A4F4, $1E69D2, - $13458B, $EEF5FF, $2D52A0, $7AA0FF, $507FFF, $0045FF, $7A96E9, $4763FF, - $E1E4FF, $7280FA, $FAFAFF, $8080F0, $8F8FBC, $5C5CCD, $0000FF, $2A2AA5, - $2222B2, $00008B, $000080, $FFFFFF, $F5F5F5, $DCDCDC, $D3D3D3, $C0C0C0, - $A9A9A9, $808080, $696969, $000000); - - cxX11OrderedColorNames: array[0..139] of string = - ('LightPink', 'Pink', 'Crimson', 'LavenderBlush', 'PaleVioletRed', 'HotPink', - 'DeepPink', 'MediumVioletRed', 'Orchid', 'Thistle', 'Plum', 'Violet', - 'Magenta', 'Fuchsia', 'DarkMagenta', 'Purple', 'MediumOrchid', 'DarkViolet', - 'DarkOrchid', 'Indigo', 'BlueViolet', 'MediumPurple', 'MediumSlateBlue', - 'SlateBlue', 'DarkSlateBlue', 'Lavender', 'GhostWhite', 'Blue', 'MediumBlue', - 'MidnightBlue', 'DarkBlue', 'Navy', 'RoyalBlue', 'CornflowerBlue', - 'LightSteelBlue', 'LightSlateGray', 'SlateGray', 'DodgerBlue', 'AliceBlue', - 'SteelBlue', 'LightSkyBlue', 'SkyBlue', 'DeepSkyBlue', 'LightBlue', - 'PowderBlue', 'CadetBlue', 'Azure', 'LightCyan', 'PaleTurquoise', 'Cyan', - 'Aqua', 'DarkTurquoise', 'DarkSlateGray', 'DarkCyan', 'Teal', - 'MediumTurquoise', 'LightSeaGreen', 'Turquoise', 'Aquamarine', - 'MediumAquamarine', 'MediumSpringGreen', 'MintCream', 'SpringGreen', - 'MediumSeaGreen', 'SeaGreen', 'Honeydew', 'LightGreen', 'PaleGreen', - 'DarkSeaGreen', 'LimeGreen', 'Lime', 'ForestGreen', 'Green', 'DarkGreen', - 'Chartreuse', 'LawnGreen', 'GreenYellow', 'DarkOliveGreen', 'YellowGreen', - 'OliveDrab', 'Beige', 'LightGoldenrodYellow', 'Ivory', 'LightYellow', - 'Yellow', 'Olive', 'DarkKhaki', 'LemonChiffon', 'PaleGoldenrod', 'Khaki', - 'Gold', 'Cornsilk', 'Goldenrod', 'DarkGoldenrod', 'FloralWhite', 'OldLace', - 'Wheat', 'Moccasin', 'Orange', 'PapayaWhip', 'BlanchedAlmond', 'NavajoWhite', - 'AntiqueWhite', 'Tan', 'BurlyWood', 'Bisque', 'DarkOrange', 'Linen', 'Peru', - 'PeachPuff', 'SandyBrown', 'Chocolate', 'SaddleBrown', 'Seashell', 'Sienna', - 'LightSalmon', 'Coral', 'OrangeRed', 'DarkSalmon', 'Tomato', 'MistyRose', - 'Salmon', 'Snow', 'LightCoral', 'RosyBrown', 'IndianRed', 'Red', 'Brown', - 'FireBrick', 'DarkRed', 'Maroon', 'White', 'WhiteSmoke', 'Gainsboro', - 'LightGrey', 'Silver', 'DarkGray', 'Gray', 'DimGray', 'Black'); - -implementation - -uses - dxCore; - -procedure AddcxExtEditResourceStringNames(AProduct: TdxProductResourceStrings); - - procedure InternalAdd(const AResourceStringName: string; AAdress: Pointer); - begin - AProduct.Add(AResourceStringName, AAdress); - end; - -begin - InternalAdd('scxSEditRepositoryColorComboBoxItem', @scxSEditRepositoryColorComboBoxItem); - InternalAdd('scxSEditRepositoryFontNameComboBoxItem', @scxSEditRepositoryFontNameComboBoxItem); - InternalAdd('scxSEditRepositoryLabelItem', @scxSEditRepositoryLabelItem); - InternalAdd('scxSEditRepositoryProgressBarItem', @scxSEditRepositoryProgressBarItem); - InternalAdd('scxSEditRepositoryTrackBarItem', @scxSEditRepositoryTrackBarItem); - InternalAdd('scxSEditRepositorySpinButtonItem', @scxSEditRepositorySpinButtonItem); - InternalAdd('scxSEditRepositoryCheckComboBox', @scxSEditRepositoryCheckComboBox); - InternalAdd('scxSEditRepositoryShellComboBoxItem', @scxSEditRepositoryShellComboBoxItem); - InternalAdd('scxSEditRepositoryCheckGroupItem', @scxSEditRepositoryCheckGroupItem); - InternalAdd('scxUDAssociated', @scxUDAssociated); - InternalAdd('scxHotZoneStyleMediaPlayer9', @scxHotZoneStyleMediaPlayer9); - InternalAdd('scxHotZoneStyleMediaPlayer8', @scxHotZoneStyleMediaPlayer8); - InternalAdd('scxHotZoneStyleXPTaskBar', @scxHotZoneStyleXPTaskBar); - InternalAdd('scxHotZoneStyleSimple', @scxHotZoneStyleSimple); - InternalAdd('scxLoadingFonts', @scxLoadingFonts); - InternalAdd('cxSEditCheckGroupCaptionStateDelimiter', @cxSEditCheckGroupCaptionStateDelimiter); - InternalAdd('cxSEditCheckGroupFilterColumnSeparator', @cxSEditCheckGroupFilterColumnSeparator); - InternalAdd('cxSEditCheckGroupChecked', @cxSEditCheckGroupChecked); - InternalAdd('cxSEditCheckGroupGrayed', @cxSEditCheckGroupGrayed); - InternalAdd('cxSEditCheckGroupUnchecked', @cxSEditCheckGroupUnchecked); - InternalAdd('cxSCheckComboBoxStatesItemsPropertyDlgCaption', @cxSCheckComboBoxStatesItemsPropertyDlgCaption); - InternalAdd('cxSCheckControlIncorrectItemCount', @cxSCheckControlIncorrectItemCount); - InternalAdd('cxSCheckGroupStatesItemsPropertyDlgCaption', @cxSCheckGroupStatesItemsPropertyDlgCaption); - InternalAdd('cxSCheckComboBoxEmptySelectionText', @cxSCheckComboBoxEmptySelectionText); - InternalAdd('cxSColorComboBoxDefaultDescription', @cxSColorComboBoxDefaultDescription); - InternalAdd('cxSEditRichEditLibraryError', @cxSEditRichEditLibraryError); - InternalAdd('cxSEditRichEditLineInsertionError', @cxSEditRichEditLineInsertionError); - InternalAdd('cxSEditRichEditLoadFail', @cxSEditRichEditLoadFail); - InternalAdd('cxSEditRichEditSaveFail', @cxSEditRichEditSaveFail); - InternalAdd('cxSEditRichEditSelectionSaveFail', @cxSEditRichEditSelectionSaveFail); - InternalAdd('cxSEditRichEditOleInterfaceFail', @cxSEditRichEditOleInterfaceFail); - InternalAdd('cxSEditRichEditCallBackFail', @cxSEditRichEditCallBackFail); - InternalAdd('cxSEditRichEditLinkFail', @cxSEditRichEditLinkFail); - InternalAdd('scxSEditRepositoryRichEditItem', @scxSEditRepositoryRichEditItem); - InternalAdd('cxSEditRichEditUndoCaption', @cxSEditRichEditUndoCaption); - InternalAdd('cxSEditRichEditRedoCaption', @cxSEditRichEditRedoCaption); - InternalAdd('cxSEditRichEditCutCaption', @cxSEditRichEditCutCaption); - InternalAdd('cxSEditRichEditCopyCaption', @cxSEditRichEditCopyCaption); - InternalAdd('cxSEditRichEditPasteCaption', @cxSEditRichEditPasteCaption); - InternalAdd('cxSEditRichEditDeleteCaption', @cxSEditRichEditDeleteCaption); - InternalAdd('cxSEditRichEditSelectAllCaption', @cxSEditRichEditSelectAllCaption); -end; - -initialization - dxResourceStringsRepository.RegisterProduct('ExpressEditorsEx Library', @AddcxExtEditResourceStringNames); - -finalization - dxResourceStringsRepository.UnRegisterProduct('ExpressEditorsEx Library'); - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditReg.dcr b/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditReg.dcr deleted file mode 100644 index dd736fed..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditReg.dcr and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditReg.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditReg.pas deleted file mode 100644 index 0fe2fd30..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditReg.pas +++ /dev/null @@ -1,497 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxExtEditReg; - -{$I cxVer.inc} - -interface - -uses - Classes; - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI6} - DesignIntf, DesignEditors, -{$ELSE} - DsgnIntf, -{$ENDIF} - Controls, Forms, Graphics, ImgList, StdCtrls, SysUtils, TypInfo, cxCheckBox, - cxCheckComboBox, cxCheckGroup, cxCheckGroupStatesEditor, cxCheckListBox, - cxClasses, cxColorComboBox, cxContainer, cxDBCheckComboBox, cxDBCheckGroup, - cxDBCheckListBox, cxDBColorComboBox, cxDBFontNameComboBox, cxDBLabel, - cxDBProgressBar, cxDBRichEdit, cxDBTrackBar, cxEdit, cxEditPropEditors, - cxEditRepositoryEditor, cxExtEditConsts, cxExtEditRepositoryItems, - cxFontNameComboBox, cxHeader, cxHint, cxHintEditor, cxLabel, cxListView, - cxLookAndFeels, cxMCListBox, cxProgressBar, cxPropEditors, cxRichEdit, - cxScrollBar, cxSpinButton, cxSplitter, cxSplitterEditor, cxTrackBar, - cxTreeView; - -const - cxEditorsRestoreStyleCaption = 'Restore style'; - cxEditorsRestoreLookAndFeelCaption = 'Restore LookAndFeel'; - cxEditComponentEditorVerbS: array[0..0] of string = (cxEditorsRestoreStyleCaption); - cxEditComponentEditorVerbL: array[0..0] of string = (cxEditorsRestoreLookAndFeelCaption); - cxSplitterStyleControllerVerb = 'Splitter Editor...'; - cxHintStyleControllerVerb = 'Hints Editor...'; - -type - TcxCustomEditAccess = class(TcxCustomEdit); - -type - { TcxHotZoneStyleProperty } - - TcxHotZoneStyleProperty = class(TClassProperty) - protected - function HasSubProperties: Boolean; - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - { TcxCustomHeaderComponentEditor } - - TcxCustomHeaderComponentEditor = class(TcxEditorsLibraryComponentWithoutStylesEditor) - protected - function GetLookAndFeel: TcxLookAndFeel; override; - public - procedure Edit; override; - end; - - { TcxSplitterComponentEditor } - - TcxSplitterComponentEditor = class(TcxEditorsLibraryComponentEditorEx) - protected - function GetEditItemCaption: string; override; - procedure ExecuteEditAction; override; - end; - - { TcxHintStyleComponentEditor } - - TcxHintStyleComponentEditor = class(TcxEditorsLibraryComponentEditorEx) - protected - function GetEditItemCaption: string; override; - procedure ExecuteEditAction; override; - end; - - { TcxHotZoneStyleEventsProperty } - - TcxHotZoneStyleEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - - { TcxHeaderSectionImageIndexProperty } - - TcxHeaderSectionImageIndexProperty = class(TImageIndexProperty) - public - function GetImages: TCustomImageList; override; - end; - - { TcxChecksControlStatesItemsProperty } - - TcxChecksControlStatesItemsProperty = class(TPropertyEditor) - protected - procedure InitializeDlg(ADialog: TcxCheckGroupStatesEditorDlg); virtual; - procedure SynchronizeControlCheckStates(ADialog: TcxCheckGroupStatesEditorDlg); virtual; - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - function GetName: string; override; - function GetValue: string; override; - end; - - { TcxCheckGroupStatesItemsProperty } - - TcxCheckGroupStatesItemsProperty = class(TcxChecksControlStatesItemsProperty) - protected - procedure InitializeDlg(ADialog: TcxCheckGroupStatesEditorDlg); override; - procedure SynchronizeControlCheckStates(ADialog: TcxCheckGroupStatesEditorDlg); override; - end; - - { TcxCheckComboBoxStatesItemsProperty } - - TcxCheckComboBoxStatesItemsProperty = class(TcxChecksControlStatesItemsProperty) - protected - procedure InitializeDlg(ADialog: TcxCheckGroupStatesEditorDlg); override; - procedure SynchronizeControlCheckStates(ADialog: TcxCheckGroupStatesEditorDlg); override; - end; - - { TcxCheckGroupComponentEditor } - - TcxCheckGroupComponentEditor = class(TcxEditComponentEditor) - public - procedure Edit; override; - end; - -{$IFDEF DELPHI6} - TcxCommonControlsSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; -{$ENDIF} - - { TcxCheckListBoxItemImageIndexProperty } - - TcxCheckListBoxItemImageIndexProperty = class(TImageIndexProperty) - public - function GetImages: TCustomImageList; override; - end; - -{ TcxHotZoneStyleProperty } - -function TcxHotZoneStyleProperty.HasSubProperties: Boolean; -var - I: Integer; -begin - for I := 0 to PropCount - 1 do - begin - Result := TcxCustomSplitter(GetComponent(I)).HotZone <> nil; - if not Result then Exit; - end; - Result := True; -end; - -function TcxHotZoneStyleProperty.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes; - if not HasSubProperties then - Exclude(Result, paSubProperties); - Result := Result - [paReadOnly] + - [paValueList, paSortList, paRevertable{$IFDEF DELPHI6}, paVolatileSubProperties{$ENDIF}]; -end; - -function TcxHotZoneStyleProperty.GetValue: string; -begin - if HasSubProperties then - Result := GetRegisteredHotZoneStyles.GetDescriptionByClass( - TcxCustomSplitter(GetComponent(0)).HotZone.ClassType) - else - Result := ''; -end; - -procedure TcxHotZoneStyleProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to GetRegisteredHotZoneStyles.Count - 1 do - Proc(GetRegisteredHotZoneStyles.Descriptions[I]); -end; - -procedure TcxHotZoneStyleProperty.SetValue(const Value: string); -var - FHotZoneStyleClass: TcxHotZoneStyleClass; - I: Integer; -begin - FHotZoneStyleClass := TcxHotZoneStyleClass(GetRegisteredHotZoneStyles.FindByClassName(Value)); - if FHotZoneStyleClass = nil then - FHotZoneStyleClass := TcxHotZoneStyleClass(GetRegisteredHotZoneStyles.FindByDescription(Value)); - - for I := 0 to PropCount - 1 do - TcxCustomSplitter(GetComponent(I)).HotZoneStyleClass := FHotZoneStyleClass; - Modified; -end; - -{ TcxHotZoneStyleEventsProperty } - -function TcxHotZoneStyleEventsProperty.GetInstance: TPersistent; -begin - Result := TcxCustomSplitter(GetComponent(0)).HotZone; -end; - -{ TcxHeaderSectionImageIndexProperty } - -function TcxHeaderSectionImageIndexProperty.GetImages: TCustomImageList; -begin - Result := nil; - if GetComponent(0) is TcxHeaderSection then - Result := TCustomImageList(TcxHeaderSection(GetComponent(0)).HeaderControl.Images); -end; - -{ TcxCustomHeaderComponentEditor } - -procedure TcxCustomHeaderComponentEditor.Edit; -begin -end; - -function TcxCustomHeaderComponentEditor.GetLookAndFeel: TcxLookAndFeel; -begin - Result := TcxCustomHeader(Component).LookAndFeel; -end; - -{ TcxSplitterComponentEditor } - -function TcxSplitterComponentEditor.GetEditItemCaption: string; -begin - Result := cxSplitterStyleControllerVerb; -end; - -procedure TcxSplitterComponentEditor.ExecuteEditAction; -begin - ShowSplitterEditor(Component as TcxSplitter); -end; - -{ TcxHintStyleComponentEditor } - -function TcxHintStyleComponentEditor.GetEditItemCaption: string; -begin - Result := cxHintStyleControllerVerb; -end; - -procedure TcxHintStyleComponentEditor.ExecuteEditAction; -begin - ShowHintStyleEditor(Component as TcxHintStyleController); -end; - -{ TcxChecksControlStatesItemsProperty } - -procedure TcxChecksControlStatesItemsProperty.Edit; -var - ADialog: TcxCheckGroupStatesEditorDlg; -begin - ADialog := TcxCheckGroupStatesEditorDlg.Create(Application); - try - InitializeDlg(ADialog); - if ADialog.ShowModal = mrOK then - begin - SynchronizeControlCheckStates(ADialog); - Modified; - end; - finally - ADialog.Free; - end; -end; - -function TcxChecksControlStatesItemsProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paDialog, paReadOnly]; -end; - -function TcxChecksControlStatesItemsProperty.GetName: string; -begin - Result := 'States'; -end; - -function TcxChecksControlStatesItemsProperty.GetValue: string; -begin - Result := ''; -end; - -procedure TcxChecksControlStatesItemsProperty.InitializeDlg(ADialog: TcxCheckGroupStatesEditorDlg); -begin -end; - -procedure TcxChecksControlStatesItemsProperty.SynchronizeControlCheckStates(ADialog: TcxCheckGroupStatesEditorDlg); -begin -end; - -{ TcxCheckGroupStatesItemsProperty } - -procedure TcxCheckGroupStatesItemsProperty.InitializeDlg( - ADialog: TcxCheckGroupStatesEditorDlg); -var - ACheckGroup: TcxCustomCheckGroup; - AItem: TcxCheckListBoxItem; - I: Integer; -begin - ADialog.Caption := cxGetResourceString(@ - cxSCheckGroupStatesItemsPropertyDlgCaption); - ADialog.clbStates.Items.Clear; - ACheckGroup := TcxCustomCheckGroup(GetComponent(0)); - ADialog.clbStates.AllowGrayed := ACheckGroup.ActiveProperties.AllowGrayed and - (ACheckGroup.ActiveProperties.EditValueFormat <> cvfInteger); - for I := 0 to ACheckGroup.ActiveProperties.Items.Count - 1 do - begin - AItem := TcxCheckListBoxItem(ADialog.clbStates.Items.Add); - AItem.Text := ACheckGroup.ActiveProperties.Items[I].Caption; - AItem.State := ACheckGroup.States[I]; - end; -end; - -procedure TcxCheckGroupStatesItemsProperty.SynchronizeControlCheckStates(ADialog: TcxCheckGroupStatesEditorDlg); -var - I: Integer; -begin - with TcxCustomCheckGroup(GetComponent(0)) do - for I := 0 to ADialog.clbStates.Items.Count - 1 do - States[I] := ADialog.clbStates.Items[I].State; -end; - -{ TcxCheckComboBoxStatesItemsProperty } - -procedure TcxCheckComboBoxStatesItemsProperty.InitializeDlg(ADialog: TcxCheckGroupStatesEditorDlg); -var - ACheckComboBox: TcxCustomCheckComboBox; - AItem: TcxCheckListBoxItem; - I: Integer; -begin - ADialog.Caption := cxGetResourceString(@ - cxSCheckComboBoxStatesItemsPropertyDlgCaption); - ADialog.clbStates.Items.Clear; - ACheckComboBox := TcxCustomCheckComboBox(GetComponent(0)); - ADialog.clbStates.AllowGrayed := False; - for I := 0 to ACheckComboBox.ActiveProperties.Items.Count - 1 do - begin - AItem := TcxCheckListBoxItem(ADialog.clbStates.Items.Add); - AItem.Text := ACheckComboBox.ActiveProperties.Items[I].Description; - AItem.State := ACheckComboBox.States[I]; - end; -end; - -procedure TcxCheckComboBoxStatesItemsProperty.SynchronizeControlCheckStates(ADialog: TcxCheckGroupStatesEditorDlg); -var - I: Integer; -begin - with TcxCustomCheckComboBox(GetComponent(0)) do - for I := 0 to ADialog.clbStates.Items.Count - 1 do - States[I] := ADialog.clbStates.Items[I].State; -end; - -{ TcxCheckGroupComponentEditor } - -procedure TcxCheckGroupComponentEditor.Edit; -const - AMethodParams: array[0..0] of TMethodParam = - ((Flags: [pfAddress]; Name: 'Sender'; TypeName: 'TObject')); -begin - ShowEventMethod(Designer, TcxCustomEditAccess(Component).Properties, - 'OnChange', Component.Name + 'PropertiesChange', AMethodParams); -end; - -{$IFDEF DELPHI6} -procedure TcxCommonControlsSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc('ComCtrls'); -end; -{$ENDIF} - -{ TcxCheckListBoxItemImageIndexProperty } - -function TcxCheckListBoxItemImageIndexProperty.GetImages: TCustomImageList; -begin - Result := TcxCustomInnerCheckListBox(GetPersistentOwner( - TcxCheckListBoxItem(GetComponent(0)).Collection)).Container.Images; -end; - -procedure RegisterEditRepositoryItems; -begin - RegisterEditRepositoryItem(TcxEditRepositoryLabel, scxSEditRepositoryLabelItem); - RegisterEditRepositoryItem(TcxEditRepositoryFontNameComboBox, scxSEditRepositoryFontNameComboBoxItem); - RegisterEditRepositoryItem(TcxEditRepositoryColorComboBox, scxSEditRepositoryColorComboBoxItem); - RegisterEditRepositoryItem(TcxEditRepositoryProgressBar, scxSEditRepositoryProgressBarItem); - RegisterEditRepositoryItem(TcxEditRepositoryTrackBar, scxSEditRepositoryTrackBarItem); - RegisterEditRepositoryItem(TcxEditRepositoryCheckComboBox, scxSEditRepositoryCheckComboBox); - RegisterEditRepositoryItem(TcxEditRepositoryCheckGroupItem, scxSEditRepositoryCheckGroupItem); - RegisterEditRepositoryItem(TcxEditRepositoryRichItem, scxSEditRepositoryRichEditItem); -end; - -procedure UnregisterEditRepositoryItems; -begin - UnregisterEditRepositoryItem(TcxEditRepositoryLabel); - UnregisterEditRepositoryItem(TcxEditRepositoryFontNameComboBox); - UnregisterEditRepositoryItem(TcxEditRepositoryColorComboBox); - UnregisterEditRepositoryItem(TcxEditRepositoryProgressBar); - UnregisterEditRepositoryItem(TcxEditRepositoryTrackBar); - UnregisterEditRepositoryItem(TcxEditRepositoryCheckComboBox); - UnregisterEditRepositoryItem(TcxEditRepositoryCheckGroupItem); - UnregisterEditRepositoryItem(TcxEditRepositoryRichItem); -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterComponents('Express Editors 6', [TcxLabel, TcxProgressBar, TcxTrackBar, - TcxCheckListBox, TcxColorComboBox, TcxFontNameComboBox, TcxCheckComboBox, - TcxCheckGroup, TcxRichEdit]); - RegisterComponents('Express DBEditors 6', [TcxDBLabel, TcxDBProgressBar, TcxDBTrackBar, - TcxDBCheckListBox, TcxDBColorComboBox, TcxDBFontNameComboBox, TcxDBCheckComboBox, - TcxDBCheckGroup, TcxDBRichEdit]); - RegisterComponents('Express Utilities', [TcxHintStyleController, TcxSpinButton, - TcxMCListBox, TcxListView, TcxTreeView, TcxHeader, TcxSplitter]); - - RegisterPropertyEditor(TypeInfo(string), TcxCustomSplitter, 'HotZoneClassName', nil); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomSplitter, 'ResizeIgnoreSnap', nil); - RegisterPropertyEditor(TypeInfo(TcxHotZoneStyle), TcxCustomSplitter, 'HotZone', TcxHotZoneStyleProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomSplitter, 'HotZoneEvents', TcxHotZoneStyleEventsProperty); - RegisterPropertyEditor(TypeInfo(TcxEditValue), TcxCustomCheckGroup, 'EditValue', nil); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomCheckGroup, 'StatesItems', TcxCheckGroupStatesItemsProperty); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomCheckComboBox, 'StatesItems', TcxCheckComboBoxStatesItemsProperty); - RegisterPropertyEditor(TypeInfo(TcxEditValue), TcxCustomCheckListBox, 'EditValue', nil); - RegisterPropertyEditor(TypeInfo(TMeasureItemEvent), TcxCustomCheckListBox, 'OnMeasureItem', nil); - RegisterPropertyEditor(TypeInfo(Boolean), TcxLabelProperties, 'ShowEndEllipsis', nil); - RegisterPropertyEditor(TypeInfo(TcxEditValue), TcxCustomCheckComboBox, 'EditValue', nil); - RegisterPropertyEditor(TypeInfo(Variant), TcxCustomCheckComboBox, 'Value', nil); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomSpinButton, 'AutoSize', nil); - RegisterPropertyEditor(TypeInfo(TTabOrder), TcxCustomLabel, 'TabOrder', nil); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomLabel, 'TabStop', nil); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomCheckComboBoxProperties, - 'AllowGrayed', nil); - RegisterPropertyEditor(TypeInfo(TcxProgressBarPropertiesValues), TcxCustomProgressBarProperties, 'AssignedValues', nil); -{$IFDEF DELPHI6} - RegisterPropertyEditor(TypeInfo(Integer), TcxCustomListView, 'ItemIndex', nil); - RegisterSelectionEditor(TcxCustomListView, TcxCommonControlsSelectionEditor); - RegisterSelectionEditor(TcxCustomTreeView, TcxCommonControlsSelectionEditor); -{$ENDIF} - - RegisterPropertyEditor(TypeInfo(TImageIndex), TcxCheckListBoxItem, 'ImageIndex', TcxCheckListBoxItemImageIndexProperty); - RegisterPropertyEditor(TypeInfo(TImageIndex), TcxHeaderSection, 'ImageIndex', TcxHeaderSectionImageIndexProperty); - - RegisterComponentEditor(TcxCheckListBox, TcxContainerComponentEditor); - RegisterComponentEditor(TcxCustomCheckGroup, TcxCheckGroupComponentEditor); - RegisterComponentEditor(TcxCustomHeader, TcxCustomHeaderComponentEditor); - RegisterComponentEditor(TcxDBCheckListBox, TcxContainerComponentEditor); - RegisterComponentEditor(TcxHintStyleController, TcxHintStyleComponentEditor); - RegisterComponentEditor(TcxListView, TcxContainerComponentEditor); - RegisterComponentEditor(TcxMCListBox, TcxContainerComponentEditor); - RegisterComponentEditor(TcxSplitter, TcxSplitterComponentEditor); - RegisterComponentEditor(TcxTreeView, TcxContainerComponentEditor); -end; - -initialization - RegisterEditRepositoryItems; - -finalization - UnregisterEditRepositoryItems; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditRepositoryItems.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditRepositoryItems.pas deleted file mode 100644 index 7e2946ae..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditRepositoryItems.pas +++ /dev/null @@ -1,298 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxExtEditRepositoryItems; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, ComCtrls, Controls, Forms, Graphics, Messages, StdCtrls, - SysUtils, cxCheckComboBox, cxCheckGroup, cxClasses, cxColorComboBox, cxEdit, - cxFontNameComboBox, cxLabel, cxProgressBar, cxRichEdit, cxSpinButton, - cxTextEdit, cxTrackBar; - -type - { TcxEditRepositoryLabel } - - TcxEditRepositoryLabel = class(TcxEditRepositoryItem) - private - function GetProperties: TcxLabelProperties; - procedure SetProperties(Value: TcxLabelProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxLabelProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryProgressBar } - - TcxEditRepositoryProgressBar = class(TcxEditRepositoryItem) - private - function GetProperties: TcxProgressBarProperties; - procedure SetProperties(Value: TcxProgressBarProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxProgressBarProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryFontComboBox } - - TcxEditRepositoryFontNameComboBox = class(TcxEditRepositoryItem) - private - function GetProperties: TcxFontNameComboBoxProperties; - procedure SetProperties(Value: TcxFontNameComboBoxProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxFontNameComboBoxProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryColorComboBox } - - TcxEditRepositoryColorComboBox = class(TcxEditRepositoryItem) - private - function GetProperties: TcxColorComboBoxProperties; - procedure SetProperties(Value: TcxColorComboBoxProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxColorComboBoxProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryTrackBar } - - TcxEditRepositoryTrackBar = class(TcxEditRepositoryItem) - private - function GetProperties: TcxTrackBarProperties; - procedure SetProperties(Value: TcxTrackBarProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxTrackBarProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryCheckComboBox } - - TcxEditRepositoryCheckComboBox = class(TcxEditRepositoryItem) - private - function GetProperties: TcxCheckComboBoxProperties; - procedure SetProperties(Value: TcxCheckComboBoxProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxCheckComboBoxProperties read GetProperties write SetProperties; - end; - - { TcxEditRepositoryCheckGroupItem } - - TcxEditRepositoryCheckGroupItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxCheckGroupProperties; - procedure SetProperties(Value: TcxCheckGroupProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxCheckGroupProperties read GetProperties - write SetProperties; - end; - - { TcxEditRepositoryRichItem } - - TcxEditRepositoryRichItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxRichEditProperties; - procedure SetProperties(Value: TcxRichEditProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxRichEditProperties read GetProperties write SetProperties; - end; - -implementation - -{ TcxEditRepositoryLabel } - -class function TcxEditRepositoryLabel.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxLabelProperties; -end; - -function TcxEditRepositoryLabel.GetProperties: TcxLabelProperties; -begin - Result := inherited Properties as TcxLabelProperties; -end; - -procedure TcxEditRepositoryLabel.SetProperties(Value: TcxLabelProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryProgressBar } - -class function TcxEditRepositoryProgressBar.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxProgressBarProperties; -end; - -function TcxEditRepositoryProgressBar.GetProperties: TcxProgressBarProperties; -begin - Result := inherited Properties as TcxProgressBarProperties; -end; - -procedure TcxEditRepositoryProgressBar.SetProperties(Value: TcxProgressBarProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryFontNameComboBox } - -class function TcxEditRepositoryFontNameComboBox.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxFontNameComboBoxProperties; -end; - -function TcxEditRepositoryFontNameComboBox.GetProperties: TcxFontNameComboBoxProperties; -begin - Result := inherited Properties as TcxFontNameComboBoxProperties; -end; - -procedure TcxEditRepositoryFontNameComboBox.SetProperties(Value: TcxFontNameComboBoxProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryColorComboBox } - -class function TcxEditRepositoryColorComboBox.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxColorComboBoxProperties; -end; - -function TcxEditRepositoryColorComboBox.GetProperties: TcxColorComboBoxProperties; -begin - Result := inherited Properties as TcxColorComboBoxProperties; -end; - -procedure TcxEditRepositoryColorComboBox.SetProperties(Value: TcxColorComboBoxProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryTrackBar } - -class function TcxEditRepositoryTrackBar.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxTrackBarProperties; -end; - -function TcxEditRepositoryTrackBar.GetProperties: TcxTrackBarProperties; -begin - Result := inherited Properties as TcxTrackBarProperties; -end; - -procedure TcxEditRepositoryTrackBar.SetProperties(Value: TcxTrackBarProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryCheckComboBox } - -class function TcxEditRepositoryCheckComboBox.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCheckComboBoxProperties; -end; - -function TcxEditRepositoryCheckComboBox.GetProperties: TcxCheckComboBoxProperties; -begin - Result := inherited Properties as TcxCheckComboBoxProperties; -end; - -procedure TcxEditRepositoryCheckComboBox.SetProperties(Value: TcxCheckComboBoxProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryCheckGroupItem } - -class function TcxEditRepositoryCheckGroupItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCheckGroupProperties; -end; - -function TcxEditRepositoryCheckGroupItem.GetProperties: TcxCheckGroupProperties; -begin - Result := inherited Properties as TcxCheckGroupProperties; -end; - -procedure TcxEditRepositoryCheckGroupItem.SetProperties( - Value: TcxCheckGroupProperties); -begin - inherited Properties := Value; -end; - -{ TcxEditRepositoryRichItem } - -class function TcxEditRepositoryRichItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxRichEditProperties; -end; - -function TcxEditRepositoryRichItem.GetProperties: TcxRichEditProperties; -begin - Result := inherited Properties as TcxRichEditProperties; -end; - -procedure TcxEditRepositoryRichItem.SetProperties( - Value: TcxRichEditProperties); -begin - inherited Properties := Value; -end; - -initialization - RegisterClasses([TcxEditRepositoryLabel, TcxEditRepositoryProgressBar, - TcxEditRepositoryFontNameComboBox, TcxEditRepositoryColorComboBox, - TcxEditRepositoryTrackBar, TcxEditRepositoryCheckComboBox, - TcxEditRepositoryCheckGroupItem, TcxEditRepositoryRichItem]); - -finalization - UnRegisterClasses([TcxEditRepositoryLabel, TcxEditRepositoryProgressBar, - TcxEditRepositoryFontNameComboBox, TcxEditRepositoryColorComboBox, - TcxEditRepositoryTrackBar, TcxEditRepositoryCheckComboBox, - TcxEditRepositoryCheckGroupItem, TcxEditRepositoryRichItem]); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditUtils.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditUtils.pas deleted file mode 100644 index 8aa68eb2..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxExtEditUtils.pas +++ /dev/null @@ -1,701 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxExtEditUtils; - -{$I cxVer.inc} - -interface - -{.$DEFINE NOFLICKER} - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Forms, Classes, Controls, Graphics, ImgList, Messages, StdCtrls, - SysUtils, cxCheckBox, cxClasses, cxContainer, cxControls, cxEdit, - cxEditPaintUtils, cxEditUtils, cxGraphics, cxLookAndFeelPainters, - cxLookAndFeels, cxTextEdit, cxVariants, dxThemeManager; - -const - MRUDelimiterWidth = 3; - -type - { TcxControlHook } - - TcxControlHook = class(TObject) - private - FControl: TWinControl; - FNewWndProc: Pointer; - FPrevWndProcAddress: Pointer; - FDestroying: Boolean; - protected - procedure SetWinControl(Value: TWinControl); virtual; - procedure HookWndProc(var AMsg: TMessage); virtual; - public - constructor Create; - destructor Destroy; override; - procedure HookControl; virtual; - procedure UnhookControl; virtual; - property WinControl: TWinControl read FControl write SetWinControl; - property IsDestroying: Boolean read FDestroying; - end; - -function DrawBounds(ACanvas: TcxCanvas; Bounds: TRect; const AUpperLeftColor, - ALowerRightColor: TColor): TRect; -procedure DrawCanvasLine(ACanvas: TCanvas; const AColor: TColor; - const AFromPoint, AToPoint: TPoint); -procedure DrawMRUDelimiter(ACanvas: TCanvas; const AItemRect: TRect; - AIsItemSelected: Boolean); -procedure InflateRectEx(var R: TRect; const AlOffset, AtOffset, ArOffset, AbOffset: Integer); -function RectWidth(const ARect: TRect): Integer; -function NonCanvasTextHeight(const AFont: TFont): Integer; -function NonCanvasTextWidth(const AFont: TFont; const AText: string): Integer; -function CalcMaxWidth(ACanvas: TCanvas; const AText: string): Integer; -function RectHeight(const ARect: TRect): Integer; -function PrepareTextFlag(const AStartFlag: Longint; - const AHorzAlignments: TAlignment; const AVertAlignments: TcxAlignmentVert; - const AShowEndEllipsis: Boolean; const AWordWrap: Boolean; - const ATabWidth: Integer = 0; const AIsDTFlags: Boolean = True; - const AShowAccelChar: Boolean = False): Longint; -function IncColor(const AColor: TColor; const AR, AG, AB: Integer): TColor; -function CalcCenterPosHeight(const ARect: TRect; const ADrawHeight: Integer): Integer; -function CalcDrawWidth(const ARect: TRect; const ADrawHeight: Integer): Integer; -function IsVarEmpty(const AValue: Variant): Boolean; -function IsValidStringForInt(S: string): Boolean; -function IsValidStringForDouble(const AValue: string): Boolean; -function cxStrToInt(const AValue: string; - AToFirstNonNum: Boolean = False): Integer; -function cxStrToFloat(const AValue: string; - AToFirstNonNum: Boolean = False): Extended; -function cxStrToColor(const S: string; out AColor: TColor): Boolean; -function cxRGBStringColorToColor(const AString: string): TColor; -function cxHexRGBStringColorToColor(const AString: string): TColor; -function CheckStateToString(const Value: TcxCheckBoxState): string; -function StringToCheckState(const Value: string; const AllowGrayed: Boolean): TcxCheckBoxState; -function CurrentShiftState: TShiftState; -function GetWord(const APosition: Integer; const S: string; - const Delimiter: Char): string; -procedure PaintBackground(const AControl: TWinControl; DC: HDC; DoParent: Boolean); -{$IFNDEF DELPHI5} -function SameText(const S1, S2: string): Boolean; assembler; -{$ENDIF} -function AdjustCanvasFont(ACanvas: TCanvas; AFont: TFont; AAngle: Integer): Boolean; - -implementation - -uses - Math, cxDrawTextUtils, dxThemeConsts, dxUxTheme, dxCore; - -type - TWinControlAccess = class(TWinControl); - -{ TcxControlHook } - -constructor TcxControlHook.Create; -begin - inherited Create; - FNewWndProc := MakeObjectInstance(HookWndProc); -end; - -destructor TcxControlHook.Destroy; -begin - FDestroying := True; - WinControl := nil; - FreeObjectInstance(FNewWndProc); - FNewWndProc := nil; - inherited Destroy; -end; - -procedure TcxControlHook.HookControl; -begin - if Assigned(FControl) and not((csDesigning in FControl.ComponentState) or - (csDestroying in FControl.ComponentState) or FDestroying) then - begin - FControl.HandleNeeded; - FPrevWndProcAddress := Pointer(GetWindowLong(FControl.Handle, GWL_WNDPROC)); - SetWindowLong(FControl.Handle, GWL_WNDPROC, LongInt(FNewWndProc)); - end; -end; - -procedure TcxControlHook.UnhookControl; -begin - if Assigned(FControl) then - begin - if Assigned(FPrevWndProcAddress) and FControl.HandleAllocated and - (Pointer(GetWindowLong(FControl.Handle, GWL_WNDPROC)) = - FNewWndProc) then - SetWindowLong(FControl.Handle, GWL_WNDPROC, LongInt(FPrevWndProcAddress)); - end; - FPrevWndProcAddress := nil; -end; - -procedure TcxControlHook.HookWndProc(var AMsg: TMessage); -begin - if Assigned(FControl) and not IsDestroying then - begin - if Assigned(FPrevWndProcAddress) then - AMsg.Result := CallWindowProc(FPrevWndProcAddress, FControl.Handle, AMsg.Msg, - AMsg.WParam, AMsg.LParam) - else - AMsg.Result := CallWindowProc(TWinControlAccess(FControl).DefWndProc, - FControl.Handle, AMsg.Msg, AMsg.WParam, AMsg.LParam); - if AMsg.Msg = WM_DESTROY then - UnhookControl; - end; -end; - -procedure TcxControlHook.SetWinControl(Value: TWinControl); -begin - if Value <> FControl then - begin - if FControl <> nil then - UnhookControl; - FControl := Value; - if FControl <> nil then - HookControl; - end; -end; -{ TcxControlHook } - -function DrawBounds(ACanvas: TcxCanvas; Bounds: TRect; - const AUpperLeftColor, ALowerRightColor: TColor): TRect; -begin - ACanvas.Pen.Color:=AUpperLeftColor; - ACanvas.MoveTo(Bounds.Left, Bounds.Top); - ACanvas.LineTo(Bounds.Left, Bounds.Bottom + 1); - ACanvas.MoveTo(Bounds.Left, Bounds.Top); - ACanvas.LineTo(Bounds.Right + 1, Bounds.Top); - ACanvas.Pen.Color:=ALowerRightColor; - ACanvas.MoveTo(Bounds.Right, Bounds.Top + 1); - ACanvas.LineTo(Bounds.Right, Bounds.Bottom); - ACanvas.MoveTo(Bounds.Left + 1, Bounds.Bottom); - ACanvas.LineTo(Bounds.Right + 1, Bounds.Bottom); - Result.Left := Bounds.Left + 1; - Result.Top := Bounds.Top + 1; - Result.Right := Bounds.Right - 1; - Result.Bottom := Bounds.Bottom - 1; -end; - -procedure DrawCanvasLine(ACanvas: TCanvas;const AColor: TColor; - const AFromPoint, AToPoint: TPoint); -begin - ACanvas.Pen.Color := AColor; - ACanvas.MoveTo(AFromPoint.x, AFromPoint.y); - ACanvas.LineTo(AToPoint.x, AToPoint.y); -end; - -procedure DrawMRUDelimiter(ACanvas: TCanvas; const AItemRect: TRect; - AIsItemSelected: Boolean); -begin - if AIsItemSelected then - ACanvas.Pen.Color := clWindow - else - ACanvas.Pen.Color := clWindowText; - ACanvas.MoveTo(AItemRect.Left, AItemRect.Bottom - MRUDelimiterWidth); - ACanvas.LineTo(AItemRect.Right, AItemRect.Bottom - MRUDelimiterWidth); - ACanvas.MoveTo(AItemRect.Left, AItemRect.Bottom - 1); - ACanvas.LineTo(AItemRect.Right, AItemRect.Bottom - 1); -end; - -procedure InflateRectEx(var R: TRect; const AlOffset, AtOffset, ArOffset, AbOffset: Integer); -begin - with R do - begin - Left := Left + AlOffset; - Top := Top + AtOffset; - Right := Right + ArOffset; - Bottom := Bottom + AbOffset; - end; -end; - -function RectWidth(const ARect: TRect): Integer; -begin - Result := ARect.Right - ARect.Left; - if Result < 0 then - Result := 0; -end; - -function RectHeight(const ARect: TRect): Integer; -begin - Result := ARect.Bottom - ARect.Top; - if Result < 0 then - Result := 0; -end; - -function PrepareTextFlag(const AStartFlag: Longint; - const AHorzAlignments: TAlignment; const AVertAlignments: TcxAlignmentVert; - const AShowEndEllipsis: Boolean; const AWordWrap: Boolean; - const ATabWidth: Integer = 0; const AIsDTFlags: Boolean = True; - const AShowAccelChar: Boolean = False): Longint; -const - ShowAccelCharArray: array[Boolean] of Integer = (DT_NOPREFIX, 0); - cxShowAccelCharArray: array[Boolean] of Integer = (0, cxShowPrefix); - - ShowEndEllipsisArray: array[Boolean] of Integer = (0, DT_END_ELLIPSIS); - cxShowEndEllipsisArray: array[Boolean] of Integer = (0, cxShowEndEllipsis); - - WordWrapArray: array[Boolean] of Integer = (0, DT_WORDBREAK); - cxWordWrapArray: array[Boolean] of Integer = (0, cxWordBreak); - -begin - Result := AStartFlag; - if AIsDTFlags then - begin - Result := Result or SystemAlignmentsHorz[AHorzAlignments] or - SystemAlignmentsVert[AVertAlignments] or - ShowEndEllipsisArray[AShowEndEllipsis] or - WordWrapArray[AWordWrap] or ShowAccelCharArray[AShowAccelChar]; - if ATabWidth > 0 then - Result := Result or DT_EXPANDTABS or DT_TABSTOP; - end - else - begin - Result := Result or cxAlignmentsHorz[AHorzAlignments] or - cxAlignmentsVert[AVertAlignments] or - cxShowEndEllipsisArray[AShowEndEllipsis] or - cxWordWrapArray[AWordWrap] or cxShowAccelCharArray[AShowAccelChar]; - if ATabWidth > 0 then - Result := Result or cxExpandTabs; - end; -end; - -function NonCanvasTextHeight(const AFont: TFont): Integer; -var - FBitmap: TBitmap; -begin - FBitmap := TBitmap.Create; - try - FBitmap.Canvas.Font.Assign(AFont); - Result := FBitmap.Canvas.TextHeight('Wg'); - finally - FBitmap.Free; - end; -end; - -function NonCanvasTextWidth(const AFont: TFont; const AText: string): Integer; -var - FBitmap: TBitmap; -begin - FBitmap := TBitmap.Create; - try - FBitmap.Canvas.Font.Assign(AFont); - Result := FBitmap.Canvas.TextWidth(AText); - finally - FBitmap.Free; - end; -end; - -function CalcMaxWidth(ACanvas: TCanvas; const AText: string): Integer; -var - FStringList: TStringList; - I, FWidth: Integer; -begin - Result := ACanvas.TextWidth(AText); - FStringList := TStringList.Create; - try - FStringList.Text := AText; - for I := 0 to FStringList.Count - 1 do - begin - FWidth := ACanvas.TextWidth(FStringList[I]); - if FWidth > Result then Result := FWidth; - end; - finally - FStringList.Free; - end; - Inc(Result, 1); -end; - -function IncColor(const AColor: TColor; const AR, AG, AB: Integer): TColor; -var - FR, FG, FB: Integer; -begin - FR := GetRValue(ColorToRGB(AColor)); - FG := GetGValue(ColorToRGB(AColor)); - FB := GetBValue(ColorToRGB(AColor)); - if (FR + AR) > High(Byte) then - FR := High(Byte) - else - Inc(FR, AR); - if (FG + AG) > High(Byte) then - FG := High(Byte) - else - Inc(FG, AG); - if (FB + AB) > High(Byte) then - FB := High(Byte) - else - Inc(FB, AB); - Result := RGB(FR, FG, FB); -end; - -function CalcCenterPosHeight(const ARect: TRect; const ADrawHeight: Integer): Integer; -begin - Result := (ARect.Bottom - ARect.Top - ADrawHeight) div 2; -end; - -function CalcDrawWidth(const ARect: TRect; const ADrawHeight: Integer): Integer; -begin - Result := (CalcCenterPosHeight(ARect, ADrawHeight) * 2 + 2) + ADrawHeight; -end; - -function IsVarEmpty(const AValue : Variant): Boolean; -begin - Result := VarIsNull(AValue) or VarIsEmpty(AValue); -end; - -{$HINTS OFF} -function IsValidStringForInt(S: string): Boolean; -var - ACode, AValue: Integer; -begin - Result := False; - S := Trim(S); - if Length(S) > 0 then - begin - Val(S, AValue, ACode); - Result := ACode = 0; - end; -end; -{$HINTS ON} - -function IsValidStringForDouble(const AValue: string): Boolean; -var - I: Integer; - AString: string; - ADecimalSeparatorCounter: Integer; -begin - AString := Trim(AValue); - ADecimalSeparatorCounter := 0; - Result := Length(AString) > 0; - { Check for valid numeric symbols in string } - if Result = True then - for I := 1 to Length(AString) do - begin - if not dxCharInSet(AString[I], ['0'..'9', DecimalSeparator]) and - ((AString[I] <> '-') or ((AString[I] = '-') and (I > 1))) then - Result := False - else - if AString[I] = DecimalSeparator then - begin - if ADecimalSeparatorCounter = 0 then - Inc(ADecimalSeparatorCounter) - else - Result := False - end; - if Result = False then Break; - end; - { Check for valid Double range } - if Result then - Result := (Abs(StrToFloat(AString)) <= MaxDouble); -end; - -function cxStrToInt(const AValue: string; - AToFirstNonNum: Boolean = False): Integer; -var - I: Integer; - S: string; -begin - S := ''; - for I := 1 to Length(AValue) do - if dxCharInSet(AValue[I], ['0'..'9', '-']) then - S := S + AValue[I] - else - if AToFirstNonNum then - Break; - if S = '' then - S := '0'; - Result := StrToInt(S); -end; - -function cxStrToFloat(const AValue: string; - AToFirstNonNum: Boolean = False): Extended; -var - I: Integer; - S: string; -begin - S := ''; - for I := 1 to Length(AValue) do - if dxCharInSet(AValue[I], ['0'..'9', '-', DecimalSeparator]) then - S := S + AValue[I] - else - if AToFirstNonNum then - Break; - if S = '' then - S := '0'; - Result := StrToFloat(S); -end; - -function cxStrToColor(const S: string; out AColor: TColor): Boolean; -var - ATempColor: Longint; -begin - Result := IdentToColor(S, ATempColor); - if Result then - AColor := ATempColor - else - begin - Result := IsValidStringForInt(S); - if Result then - AColor := TColor(cxStrToInt(S)); - end; -end; - -function cxRGBStringColorToColor(const AString: string): TColor; -var - I, FPos: Integer; - R, G, B: Integer; - S, FSColor: string; -begin - R := 0; - G := 0; - B := 0; - FSColor := AString; - for I := 1 to 3 do - begin - S := ''; - FPos := Pos('.', FSColor); - if (FPos > 0) then - S := Copy(FSColor, 1, FPos - 1) - else - S := FSColor; - FSColor := Copy(FSColor, FPos + 1, Length(FSColor) - FPos); - case I of - 1: R := cxStrToInt(S); - 2: G := cxStrToInt(S); - 3: B := cxStrToInt(S); - end; - end; - Result := RGB(R, G, B); -end; - -function cxHexRGBStringColorToColor(const AString: string): TColor; -var - R, G, B: Integer; - S: string; - - function IsHexDigit(C: Char): Boolean; - begin - Result := (C >= '0') and (C <= '9') or (C >= 'A') and (C <= 'F') or - (C >= 'a') and (C <= 'f'); - end; - - function RemoveNonHexChars(const AString: string): string; - var - I: Integer; - begin - Result := ''; - for I := 1 to Length(AString) do - if IsHexDigit(AString[I]) then - Result := Result + AString[I]; - end; - - function HexStrToInt(const S: string): Longint; - var - HexStr: string; - begin - if Pos('$', S) = 0 then - HexStr := '$' + S - else - HexStr := S; - Result := StrToIntDef(HexStr, 0); - end; - - function IntToByte(const Value: Integer): Byte; - begin - if Value > MaxByte then - Result := MaxByte - else - Result := Value; - end; - -begin - S := RemoveNonHexChars(AString); - R := IntToByte(HexStrToInt(Copy(S, 1, 2))); - G := IntToByte(HexStrToInt(Copy(S, 3, 2))); - B := IntToByte(HexStrToInt(Copy(S, 5, 2))); - Result := RGB(R, G, B); -end; - -function CheckStateToString(const Value: TcxCheckBoxState): string; -begin - case Value of - cbsChecked: Result := '1'; - cbsGrayed: Result := '2'; - else Result := '0'; - end; -end; - -function StringToCheckState(const Value: string; const AllowGrayed: Boolean): TcxCheckBoxState; -begin - if AllowGrayed then - begin - if Value = '1' then Result := cbsChecked - else if Value = '0' then Result := cbsUnchecked - else Result := cbsGrayed; - end - else - begin - if Value = '1' then Result := cbsChecked - else Result := cbsUnchecked; - end; -end; - -function CurrentShiftState: TShiftState; -{$IFDEF DELPHI5} -var - KeyState: TKeyboardState; -{$ENDIF} -begin - {$IFDEF DELPHI5} - GetKeyboardState(KeyState); - Result := KeyboardStateToShiftState(KeyState); - {$ELSE} - Result := []; - if GetAsyncKeyState(VK_SHIFT) <> 0 then Include(Result, ssShift); - if GetAsyncKeyState(VK_CONTROL) <> 0 then Include(Result, ssCtrl); - if GetAsyncKeyState(VK_MENU) <> 0 then Include(Result, ssAlt); - if GetAsyncKeyState(VK_LBUTTON) <> 0 then Include(Result, ssLeft); - if GetAsyncKeyState(VK_RBUTTON) <> 0 then Include(Result, ssRight); - if GetAsyncKeyState(VK_MBUTTON) <> 0 then Include(Result, ssMiddle); - {$ENDIF} -end; - -function GetWord(const APosition: Integer; const S: string; - const Delimiter: Char): string; -var - I, FPos: Integer; - FStr: string; -begin - Result := ''; - if APosition <= 0 then Exit; - FStr := S; - I := 1; - FPos := Pos(Delimiter, FStr); - if FPos = 0 then - begin - if APosition = 1 then Result := S; - end - else - begin - while FPos > 0 do - begin - if I = APosition then - begin - Result := Copy(FStr, 1, FPos - 1); - Break; - end - else - FStr := Copy(FStr, FPos + 1, Length(FStr)); - Inc(I); - if FStr = '' then Break; - FPos := Pos(Delimiter, FStr); - if (FPos = 0) and (I = APosition) then - Result := FStr; - end; - end; -end; - -procedure PaintBackground(const AControl: TWinControl; DC: HDC; DoParent: Boolean); -var - P: TPoint; - FSaveIndex: Integer; -begin - if Assigned(AControl) and (Assigned(AControl.Parent) and DoParent) then - begin - FSaveIndex := SaveDC(DC); - try - P := AControl.ClientOrigin; - Windows.ScreenToClient(AControl.Parent.Handle, P); - MoveWindowOrg(DC, -P.X, -P.Y); - if Assigned(AControl.Parent) and DoParent then - begin - SendMessage(AControl.Parent.Handle, WM_ERASEBKGND, DC, 0); - SendMessage(AControl.Parent.Handle, WM_PAINT, DC, 0); - TWinControlAccess(AControl.Parent).PaintControls(DC, nil); - end - else - begin - SendMessage(AControl.Handle, WM_ERASEBKGND, DC, 0); - TWinControlAccess(AControl).PaintControls(DC, nil); - end; - finally - RestoreDC(DC, FSaveIndex); - end; - end; -end; - -{$IFNDEF DELPHI5} -function SameText(const S1, S2: string): Boolean; assembler; -asm - CMP EAX,EDX - JZ @1 - OR EAX,EAX - JZ @2 - OR EDX,EDX - JZ @3 - MOV ECX,[EAX-4] - CMP ECX,[EDX-4] - JNE @3 - CALL CompareText - TEST EAX,EAX - JNZ @3 -@1: MOV AL,1 -@2: RET -@3: XOR EAX,EAX -end; -{$ENDIF} - -function AdjustCanvasFont(ACanvas: TCanvas; AFont: TFont; AAngle: Integer): Boolean; -var - ALogFont: TLogFont; - ARealAngle: Integer; - ATextMetric: TTextMetric; -begin - ACanvas.Font.Assign(AFont); - GetTextMetrics(ACanvas.Handle, ATextMetric); - ARealAngle := (AAngle mod 360 + 360) mod 360; - Result := ((ATextMetric.tmPitchAndFamily and TMPF_TRUETYPE) <> 0); - if not Result then Exit; - if ARealAngle <> 0 then - begin - cxGetFontData(ACanvas.Font.Handle, ALogFont); - ALogFont.lfEscapement := ARealAngle * 10; - ACanvas.Font.Handle := CreateFontIndirect(ALogFont); - end; -end; - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControl.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControl.pas deleted file mode 100644 index 9681937d..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControl.pas +++ /dev/null @@ -1,3563 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressFilterControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxFilterControl; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, -{$IFDEF DELPHI6} - Types, - Variants, -{$ENDIF} - Classes, SysUtils, Controls, Forms, Graphics, cxFilter, cxEdit, - cxClasses, cxContainer, cxControls, cxGraphics, cxLookAndFeels, - cxLookAndFeelPainters, cxDropDownEdit, Menus, cxTextEdit, StdCtrls, - cxFilterControlUtils, cxDataStorage, cxFormats; - -const - cxFilterControlMaxDropDownRows = 12; - -type - IcxFilterControl = interface - ['{B9890E09-5400-428D-8F72-1FF8FD15937C}'] - function GetCaption(Index: Integer): string; - function GetCount: Integer; - function GetCriteria: TcxFilterCriteria; - function GetItemLink(Index: Integer): TObject; - function GetItemLinkID(Index: Integer): Integer; - function GetItemLinkName(Index: Integer): string; - function GetFieldName(Index: Integer): string; - function GetProperties(Index: Integer): TcxCustomEditProperties; - function GetValueType(Index: Integer): TcxValueTypeClass; - - property Captions[Index: Integer]: string read GetCaption; - property Count: Integer read GetCount; - property Criteria: TcxFilterCriteria read GetCriteria; - property ItemLinkNames[Index: Integer]: string read GetItemLinkName; - property ItemLinkIDs[Index: Integer]: Integer read GetItemLinkID; - property ItemLinks[Index: Integer]: TObject read GetItemLink; - property FieldNames[Index: Integer]: string read GetFieldName; - property Properties[Index: Integer]: TcxCustomEditProperties read GetProperties; - property ValueTypes[Index: Integer]: TcxValueTypeClass read GetValueType; - end; - - IcxFilterControlDialog = interface - ['{D2369F8D-3B22-41A8-881E-B01BEB624B7D}'] - procedure SetDialogLinkComponent(ALink: TComponent); - end; - - TcxFilterControlCriteria = class; - TcxCustomFilterControl = class; - TcxCustomFilterControlClass = class of TcxCustomFilterControl; - TcxFilterControlViewInfo = class; - TcxFilterControlViewInfoClass = class of TcxFilterControlViewInfo; - - { TcxFilterControlCriteriaItem } - - TcxFilterControlCriteriaItem = class(TcxFilterCriteriaItem) - private - function GetFilterControlCriteria: TcxFilterControlCriteria; - function GetFilter: IcxFilterControl; - function GetItemIndex: Integer; - function ValidItem: Boolean; - protected - function GetDataValue(AData: TObject): Variant; override; - function GetFieldCaption: string; override; - function GetFieldName: string; override; - function GetFilterOperatorClass: TcxFilterOperatorClass; override; - property ItemIndex: Integer read GetItemIndex; - public - property Filter: IcxFilterControl read GetFilter; - property Criteria: TcxFilterControlCriteria read GetFilterControlCriteria; - end; - - { TcxFilterControlCriteria } - - TcxFilterControlCriteria = class(TcxFilterCriteria) - private - FControl: TcxCustomFilterControl; - protected - function GetIDByItemLink(AItemLink: TObject): Integer; override; - function GetItemClass: TcxFilterCriteriaItemClass; override; - function GetItemLinkByID(AID: Integer): TObject; override; - //ver. 3 - function GetNameByItemLink(AItemLink: TObject): string; override; - function GetItemLinkByName(const AName: string): TObject; override; - - property Control: TcxCustomFilterControl read FControl; - public - constructor Create(AOwner: TcxCustomFilterControl); virtual; - procedure AssignEvents(Source: TPersistent); override; - end; - - TcxFilterControlCriteriaClass = class of TcxFilterControlCriteria; - - TcxCustomRowViewInfo = class; - TcxGroupViewInfo = class; - TcxConditionViewInfo = class; - - TcxFilterControlHitTest = (fhtNone, fhtButton, fhtBoolOperator, fhtItem, - fhtOperator, fhtValue, fhtAddCondition, fhtAddValue); - - TcxFilterControlHitTestInfo = record - HitTest: TcxFilterControlHitTest; - Mouse: TPoint; - Shift: TShiftState; - Row: TcxCustomRowViewInfo; - ValueIndex: Integer; - end; - - { TcxCustomRowViewInfo } - - TcxCustomRowViewInfo = class - private - FButtonText: string; - FButtonRect: TRect; - FButtonState: TcxButtonState; - FControl: TcxCustomFilterControl; - FCriteriaItem: TcxCustomFilterCriteriaItem; - FLevel: Integer; - FIndent: Integer; - FParent: TcxCustomRowViewInfo; - FRowRect: TRect; - function GetCondition: TcxConditionViewInfo; - function GetFocused: Boolean; - function GetGroup: TcxGroupViewInfo; - procedure GetInternal; - protected - function GetWidth: Integer; virtual; - function IsLast: Boolean; - public - constructor Create(AControl: TcxCustomFilterControl; - AParent: TcxCustomRowViewInfo; - ACriteriaItem: TcxCustomFilterCriteriaItem); virtual; - destructor Destroy; override; - procedure Calc(const ARowRect: TRect); virtual; - procedure GetHitTestInfo(const P: TPoint; var HitInfo: TcxFilterControlHitTestInfo); virtual; - function Ready: Boolean; virtual; - - property ButtonRect: TRect read FButtonRect write FButtonRect; - property ButtonState: TcxButtonState read FButtonState write FButtonState; - property ButtonText: string read FButtonText write FButtonText; - property Condition: TcxConditionViewInfo read GetCondition; - property Control: TcxCustomFilterControl read FControl; - property CriteriaItem: TcxCustomFilterCriteriaItem read FCriteriaItem; - property Focused: Boolean read GetFocused; - property Group: TcxGroupViewInfo read GetGroup; - property Indent: Integer read FIndent; - property Level: Integer read FLevel; - property Parent: TcxCustomRowViewInfo read FParent; - property RowRect: TRect read FRowRect write FRowRect; - property Width: Integer read GetWidth; - end; - - { TcxGroupViewInfo } - - TcxGroupViewInfo = class(TcxCustomRowViewInfo) - private - FBoolOperator: TcxFilterBoolOperatorKind; - FBoolOperatorText: string; - FBoolOperatorRect: TRect; - FCaption: string; - FCaptionRect: TRect; - FRows: TList; - function GetRow(Index: Integer): TcxCustomRowViewInfo; - function GetRowCount: Integer; - procedure SetRow(Index: Integer; const Value: TcxCustomRowViewInfo); - protected - function GetWidth: Integer; override; - public - constructor Create(AControl: TcxCustomFilterControl; - AParent: TcxCustomRowViewInfo; - ACriteriaItem: TcxCustomFilterCriteriaItem); override; - destructor Destroy; override; - procedure Add(ARow: TcxCustomRowViewInfo); - procedure Remove(ARow: TcxCustomRowViewInfo); - procedure Calc(const ARowRect: TRect); override; - procedure GetHitTestInfo(const P: TPoint; var HitInfo: TcxFilterControlHitTestInfo); override; - property BoolOperator: TcxFilterBoolOperatorKind read FBoolOperator write FBoolOperator; - property BoolOperatorText: string read FBoolOperatorText write FBoolOperatorText; - property BoolOperatorRect: TRect read FBoolOperatorRect; - property Caption: string read FCaption write FCaption; - property CaptionRect: TRect read FCaptionRect; - property RowCount: Integer read GetRowCount; - property Rows[Index: Integer]: TcxCustomRowViewInfo read GetRow write SetRow; - end; - - { TcxValuesViewInfo } - - TcxValueInfo = class - private - FValue: TcxEditValue; - FValueText: TCaption; - FValueRect: TRect; - FValueViewInfo: TcxCustomEditViewInfo; - procedure SetValueViewInfo(const Value: TcxCustomEditViewInfo); - public - constructor Create; - destructor Destroy; override; - property Value: TcxEditValue read FValue write FValue; - property ValueText: TCaption read FValueText write FValueText; - property ValueRect: TRect read FValueRect write FValueRect; - property ValueViewInfo: TcxCustomEditViewInfo - read FValueViewInfo write SetValueViewInfo; - end; - - { TcxValuesViewInfo } - - TcxValuesViewInfo = class - private - FAddButtonRect: TRect; - FAddButtonState: TcxButtonState; - FCondition: TcxConditionViewInfo; - FList: TList; - FSeparator: string; - function GetControl: TcxCustomFilterControl; - function GetValue(Index: Integer): TcxValueInfo; - function GetWidth: Integer; - protected - function GetCount: Integer; - procedure UpdateEditorStyle(AStyle: TcxCustomEditStyle; - AHightlited, AEnabled: Boolean); - public - constructor Create(ACondition: TcxConditionViewInfo); - destructor Destroy; override; - procedure AddValue; - procedure Calc; - procedure Clear; - procedure GetHitTestInfo(const P: TPoint; var HitInfo: TcxFilterControlHitTestInfo); virtual; - procedure RemoveValue(AIndex: Integer); - property AddButtonRect: TRect read FAddButtonRect; - property AddButtonState: TcxButtonState read FAddButtonState; - property Condition: TcxConditionViewInfo read FCondition; - property Control: TcxCustomFilterControl read GetControl; - property Count: Integer read GetCount; - property Separator: string read FSeparator; - property Values[Index: Integer]: TcxValueInfo read GetValue; default; - property Width: Integer read GetWidth; - end; - - { TcxConditionViewInfo } - - TcxConditionViewInfo = class(TcxCustomRowViewInfo) - private - FOperator: TcxFilterControlOperator; - FOperatorRect: TRect; - FOperatorText: string; - FItemIndex: Integer; - FItemLink: TObject; - FItemRect: TRect; - FItemText: string; - FEditorHelper: TcxCustomFilterEditHelperClass; - FEditorProperties: TcxCustomEditProperties; - FSupportedOperators: TcxFilterControlOperators; - FValueType: TcxValueTypeClass; - FValues: TcxValuesViewInfo; - private - function GetItemIndex: Integer; - protected - ValueEditorData: TcxCustomEditData; - procedure AddValue; - function GetWidth: Integer; override; - function HasDisplayValues: Boolean; virtual; - procedure InitValues(ASaveValue: Boolean); - procedure InternalInit; virtual; - procedure SetItem(AIndex: Integer); - procedure ValidateConditions; - public - constructor Create(AControl: TcxCustomFilterControl; - AParent: TcxCustomRowViewInfo; - ACriteriaItem: TcxCustomFilterCriteriaItem); override; - destructor Destroy; override; - procedure Calc(const ARowRect: TRect); override; - procedure GetHitTestInfo(const P: TPoint; var HitInfo: TcxFilterControlHitTestInfo); override; - function GetProperties: TcxCustomEditProperties; - function Ready: Boolean; override; - property EditorHelper: TcxCustomFilterEditHelperClass read FEditorHelper; - property EditorProperties: TcxCustomEditProperties read FEditorProperties; - property ItemLink: TObject read FItemLink; - property ItemIndex: Integer read FItemIndex; - property ItemRect: TRect read FItemRect; - property ItemText: string read FItemText write FItemText; - property Operator: TcxFilterControlOperator read FOperator write FOperator; - property OperatorRect: TRect read FOperatorRect; - property OperatorText: string read FOperatorText write FOperatorText; - property SupportedOperators: TcxFilterControlOperators read FSupportedOperators; - property ValueType: TcxValueTypeClass read FValueType; - property Values: TcxValuesViewInfo read FValues; - end; - - { TcxCustomFilterControl } - - TFilterControlState = (fcsNormal, fcsSelectingAction, fcsSelectingItem, - fcsSelectingBoolOperator, fcsSelectingCondition, fcsSelectingValue); - - TcxFilterControlFont = (fcfBoolOperator, fcfItem, fcfCondition, fcfValue); - TcxActivateValueEditKind = (aveEnter, aveKey, aveMouse); - - TcxCustomFilterControl = class(TcxControl, IcxMouseTrackingCaller, - IcxFormatControllerListener, IdxSkinSupport) - private - FActionMenu: TPopupMenu; - FComboBox: TcxComboBox; - FCriteria: TcxFilterControlCriteria; - FFocusedInfo: TcxFilterControlHitTestInfo; - FFonts: array[TcxFilterControlFont] of TFont; - FHotTrack: TcxFilterControlHitTestInfo; - FInplaceEditors: TcxInplaceEditList; - FLeftOffset: Integer; - FLockCount: Integer; - FRoot: TcxCustomRowViewInfo; - FRows: TList; - FSortItems: Boolean; - FState: TFilterControlState; - FTextEditProperties: TcxTextEditProperties; - FTopVisibleRow: Integer; - - FValueEditor: TcxCustomEdit; - FValueEditorStyle: TcxCustomEditStyle; - - FViewInfo: TcxFilterControlViewInfo; - FHotTrackOnUnfocused: Boolean; - FNullString: string; - FShowLevelLines: Boolean; - FWantTabs: Boolean; - FWasError: Boolean; - FOnApplyFilter: TNotifyEvent; - procedure CreateFonts; - procedure DoFontChanged(Sender: TObject); - function GetFont(Index: Integer): TFont; - function IsFontStored(Index: Integer): Boolean; - procedure SetFont(Index: Integer; const Value: TFont); - - function FocusedRowIndex: Integer; - function GetRow(Index: Integer): TcxCustomRowViewInfo; - function GetRowCount: Integer; - function GetFocusedRow: TcxCustomRowViewInfo; - - procedure ComboBoxCloseUp(Sender: TObject); - procedure ComboBoxExit(Sender: TObject); - procedure ComboBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure ComboBoxKeyPress(Sender: TObject; var Key: Char); - procedure ComboBoxPopup(Sender: TObject); - procedure DoComboDropDown(const R: TRect; const AText: string); - procedure SetFocusedRow(ARow: TcxCustomRowViewInfo); - procedure PopupMenuClick(Sender: TObject); - function IsNullStringStored: Boolean; - procedure ProcessHitTest(AHitTest: TcxFilterControlHitTest; AByMouse: Boolean); - procedure ReadData(AStream: TStream); - procedure RecalcRows; - procedure RefreshMenuCaptions; - procedure SetLeftOffset(Value: Integer); - procedure SetNullString(const Value: string); - procedure SetTopVisibleRow(Value: Integer); - procedure SetShowLevelLines(const Value: Boolean); - procedure SetWantTabs(const Value: Boolean); - procedure ValueEditorInit; - // value editor events - procedure ValueEditorAfterKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure ValueEditorExit(Sender: TObject); - procedure ValueEditorKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - - procedure WriteData(AStream: TStream); - protected - procedure CheckInplaceControlsColor; virtual; - // overrided VCL - procedure DefineProperties(Filer: TFiler); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure Loaded; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure Paint; override; - procedure SetEnabled(Value: Boolean); override; - procedure SetParent(AParent: TWinControl); override; - // overrided cxControl - procedure BoundsChanged; override; - procedure DoLayoutChange; virtual; - procedure FocusChanged; override; - procedure FontChanged; override; - function GetBorderSize: Integer; override; - procedure InitControl; override; - procedure InitScrollBarsParameters; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); override; - procedure MouseEnter(AControl: TControl); override; - procedure MouseLeave(AControl: TControl); override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - // work with rows - procedure AddCondition(ARow: TcxCustomRowViewInfo); - procedure AddGroup; - procedure AddValue; - procedure ClearRows; - procedure Remove; - procedure RemoveRow; - procedure RemoveValue; - // navigation - procedure FocusNext(ATab: Boolean); - procedure FocusPrev(ATab: Boolean); - procedure FocusUp(ATab: Boolean); - procedure FocusDown(ATab: Boolean); - procedure RowNavigate(AElement: TcxFilterControlHitTest; ACellIndex: Integer = -1); - procedure ValueEditorHide(AAccept: Boolean); - - procedure EnsureRowVisible; - procedure RefreshProperties; - - procedure BuildFromCriteria; virtual; - procedure BuildFromRows; - - procedure CreateInternalControls; virtual; - procedure DestroyInternalControls; virtual; - procedure DoApplyFilter; virtual; - function GetDefaultProperties: TcxCustomEditProperties; virtual; - function GetDefaultPropertiesViewInfo: TcxCustomEditViewInfo; - function GetFilterControlCriteriaClass: TcxFilterControlCriteriaClass; virtual; - function GetViewInfoClass: TcxFilterControlViewInfoClass; virtual; - function HasFocus: Boolean; - function HasHotTrack: Boolean; - procedure FillFilterItemList(AStrings: TStrings); virtual; - procedure FillConditionList(AStrings: TStrings); virtual; - procedure ValidateConditions(var SupportedOperations: TcxFilterControlOperators); virtual; - - procedure CorrectOperatorClass(var AOperatorClass: TcxFilterOperatorClass); virtual; - function GetFilterCaption: string; virtual; - function GetFilterLink: IcxFilterControl; virtual; - function GetFilterText: string; virtual; - procedure SelectAction; virtual; - procedure SelectBoolOperator; virtual; - procedure SelectCondition; virtual; - procedure SelectItem; virtual; - procedure SelectValue(AActivateKind: TcxActivateValueEditKind; AKey: Char); virtual; - - // IcxMouseTrackingCaller - procedure DoMouseLeave; - procedure IcxMouseTrackingCaller.MouseLeave = DoMouseLeave; - - // IcxFormatContollerListener - procedure FormatChanged; - - property Criteria: TcxFilterControlCriteria read FCriteria; - property FilterLink: IcxFilterControl read GetFilterLink; - property FocusedInfo: TcxFilterControlHitTestInfo read FFocusedInfo; - property FocusedRow: TcxCustomRowViewInfo read GetFocusedRow write SetFocusedRow; - property LeftOffset: Integer read FLeftOffset write SetLeftOffset; - property NullString: string read FNullString write SetNullString stored IsNullStringStored; - property RowCount: Integer read GetRowCount; - property Rows[Index: Integer]: TcxCustomRowViewInfo read GetRow; - property State: TFilterControlState read FState write FState; - property TopVisibleRow: Integer read FTopVisibleRow write SetTopVisibleRow; - property ViewInfo: TcxFilterControlViewInfo read FViewInfo; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure ApplyFilter; - procedure BeginUpdate; - procedure Clear; virtual; - procedure EndUpdate; - function IsValid: Boolean; virtual; - function HasItems: Boolean; - procedure LayoutChanged; - procedure Localize; - // save & restore - procedure LoadFromStream(AStream: TStream); - procedure SaveToStream(AStream: TStream); - procedure LoadFromFile(const AFileName: string); - procedure SaveToFile(const AFileName: string); - // IdxLocalizerListener - procedure TranslationChanged; override; - - // properties - property Color default clBtnFace; - property FilterCaption: string read GetFilterCaption; - property FilterText: string read GetFilterText; - property FontBoolOperator: TFont index fcfBoolOperator read GetFont write SetFont stored IsFontStored; - property FontCondition: TFont index fcfCondition read GetFont write SetFont stored IsFontStored; - property FontItem: TFont index fcfItem read GetFont write SetFont stored IsFontStored; - property FontValue: TFont index fcfValue read GetFont write SetFont stored IsFontStored; - property HotTrackOnUnfocused: Boolean read FHotTrackOnUnfocused write FHotTrackOnUnfocused default True; - property LookAndFeel; - property ParentColor default False; - property ShowLevelLines: Boolean read FShowLevelLines write SetShowLevelLines default True; - property SortItems: Boolean read FSortItems write FSortItems default False; - property WantTabs: Boolean read FWantTabs write SetWantTabs default False; - property OnApplyFilter: TNotifyEvent read FOnApplyFilter write FOnApplyFilter; - end; - - { TcxFilterControlPainter } - - TcxFilterControlPainter = class - private - FControl: TcxCustomFilterControl; - function GetCanvas: TcxCanvas; - function GetPainter: TcxCustomLookAndFeelPainterClass; - function GetViewInfo: TcxFilterControlViewInfo; - procedure DrawGroup(ARow: TcxGroupViewInfo); - procedure DrawCondition(ARow: TcxConditionViewInfo); - procedure DrawValues(ARow: TcxConditionViewInfo); - protected - function GetContentColor: TColor; virtual; - procedure DrawBorder; - procedure DrawDotLine(const R: TRect); - procedure DrawRow(ARow: TcxCustomRowViewInfo); virtual; - procedure TextDraw(X, Y: Integer; const AText: string); - public - constructor Create(AOwner: TcxCustomFilterControl); virtual; - property Canvas: TcxCanvas read GetCanvas; - property ContentColor: TColor read GetContentColor; - property Control: TcxCustomFilterControl read FControl; - property Painter: TcxCustomLookAndFeelPainterClass read GetPainter; - property ViewInfo: TcxFilterControlViewInfo read GetViewInfo; - end; - - TcxFilterControlPainterClass = class of TcxFilterControlPainter; - - { TcxFilterControlViewInfo } - - TcxFilterControlViewInfo = class - private - FControl: TcxCustomFilterControl; - FAddConditionRect: TRect; - FAddConditionCaption: string; - FBitmap: TBitmap; - FBitmapCanvas: TcxCanvas; - FButtonState: TcxButtonState; - FFocusRect: TRect; - FMaxRowWidth: Integer; - FPainter: TcxFilterControlPainter; - FRowHeight: Integer; - FMinValueWidth: Integer; - FEnabled: Boolean; - procedure CalcButtonState; - procedure CheckBitmap; - function GetCanvas: TcxCanvas; - function GetEditHeight: Integer; - protected - procedure CalcFocusRect; virtual; - function GetPainterClass: TcxFilterControlPainterClass; virtual; - public - constructor Create(AOwner: TcxCustomFilterControl); virtual; - destructor Destroy; override; - procedure Calc; - procedure GetHitTestInfo(AShift: TShiftState; const P: TPoint; - var HitInfo: TcxFilterControlHitTestInfo); virtual; - procedure Paint; - procedure InvalidateRow(ARow: TcxCustomRowViewInfo); - procedure Update; - property AddConditionCaption: string read FAddConditionCaption; - property AddConditionRect: TRect read FAddConditionRect; - property ButtonState: TcxButtonState read FButtonState; - property Canvas: TcxCanvas read GetCanvas; - property Control: TcxCustomFilterControl read FControl; - property Enabled: Boolean read FEnabled; - property MaxRowWidth: Integer read FMaxRowWidth; - property MinValueWidth: Integer read FMinValueWidth; - property Painter: TcxFilterControlPainter read FPainter; - property RowHeight: Integer read FRowHeight; - end; - - { TcxFilterControl } - - TcxFilterControl = class(TcxCustomFilterControl, IcxFilterControlDialog) - private - FLinkComponent: TComponent; - {$IFDEF CBUILDER6} - function GetLinkComponent: TComponent; - {$ENDIF} - procedure SetLinkComponent(Value: TComponent); - protected - //IcxFilterControlDialog - procedure IcxFilterControlDialog.SetDialogLinkComponent = SetLinkComponent; - function GetFilterLink: IcxFilterControl; override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - public - procedure UpdateFilter; - published - property Align; - property Anchors; - property Color; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property Font; - property FontBoolOperator; - property FontCondition; - property FontItem; - property FontValue; - property HelpContext; - {$IFDEF DELPHI6} - property HelpKeyword; - property HelpType; - {$ENDIF} - property Hint; - property HotTrackOnUnfocused; - {$IFDEF CBUILDER6} - property LinkComponent: TComponent read GetLinkComponent write SetLinkComponent; - {$ELSE} - property LinkComponent: TComponent read FLinkComponent write SetLinkComponent; - {$ENDIF} - property LookAndFeel; - property NullString; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ShowHint; - property ShowLevelLines; - property SortItems; - property TabOrder; - property TabStop; - property Visible; - property WantTabs; - property OnApplyFilter; - property OnClick; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -function cxGetConditionText(AOperator: TcxFilterControlOperator): string; -function IsSupportFiltering(AClass: TcxCustomEditPropertiesClass): Boolean; - -implementation - -uses - cxVariants, cxFilterConsts, cxFilterControlStrs, cxCustomData; - -type - TWinControlAccess = class(TWinControl); - -const - cxFilterControlFontColors: array[TcxFilterControlFont] of TColor = (clRed, - clGreen, clMaroon, clBlue); - - EmptyRect: TRect = (Left: 0; Top: 0; Right: 0; Bottom: 0); - -var - cxBoolOperatorText: array[TcxFilterBoolOperatorKind] of string; - cxConditionText: array[TcxFilterControlOperator] of string; - HalftoneBrush: HBRUSH; - -function cxGetConditionText(AOperator: TcxFilterControlOperator): string; -begin - Result := cxConditionText[AOperator]; -end; - -function IsSupportFiltering(AClass: TcxCustomEditPropertiesClass): Boolean; -var - Test: TcxCustomEditProperties; -begin - Result := False; - if AClass <> nil then - begin - Test := AClass.Create(nil); - Result := esoFiltering in Test.GetSupportedOperations; - Test.Free; - end; -end; - -function Max(A, B: Integer): Integer; -begin - if A > B then Result := A else Result := B; -end; - -function Min(A, B: Integer): Integer; -begin - if A < B then Result := A else Result := B; -end; - -function WidthOf(const R: TRect): Integer; -begin - Result := R.Right - R.Left; -end; - -function HeightOf(const R: TRect): Integer; -begin - Result := R.Bottom - R.Top; -end; -procedure CenterRectVert(const ABounds: TRect; var R: TRect); -var - H1, H2: Integer; -begin - H1 := HeightOf(ABounds); - H2 := HeightOf(R); - OffsetRect(R, 0, (ABounds.Top - R.Top) + (H1 - H2) div 2); -end; - -function cxStrFromBoolOperator(ABoolOperator: TcxFilterBoolOperatorKind): string; -begin - case ABoolOperator of - fboAnd: Result := cxGetResourceString(@cxSFilterBoolOperatorAnd); - fboOr: Result := cxGetResourceString(@cxSFilterBoolOperatorOr); - fboNotAnd: Result := cxGetResourceString(@cxSFilterBoolOperatorNotAnd); - fboNotOr: Result := cxGetResourceString(@cxSFilterBoolOperatorNotOr); - else - Result := ''; - end; -end; - -{ TcxFilterControlCriteriaItem } - -function TcxFilterControlCriteriaItem.GetDataValue( - AData: TObject): Variant; -begin - Result := Null; -end; - -function TcxFilterControlCriteriaItem.GetFieldCaption: string; -begin - if ValidItem then - Result := Filter.Captions[ItemIndex] - else - Result := ''; -end; - -function TcxFilterControlCriteriaItem.GetFieldName: string; -begin - if ValidItem then - Result := Filter.FieldNames[ItemIndex] - else - Result := ''; -end; - -function TcxFilterControlCriteriaItem.GetFilterOperatorClass: TcxFilterOperatorClass; -begin - Result := inherited GetFilterOperatorClass; - Criteria.Control.CorrectOperatorClass(Result); -end; - -function TcxFilterControlCriteriaItem.GetFilter: IcxFilterControl; -begin - if (Criteria <> nil) and (Criteria.Control <> nil) then - Result := Criteria.Control.FilterLink - else - Result := nil; -end; - -function TcxFilterControlCriteriaItem.GetItemIndex: Integer; -var - I: Integer; - AFilter: IcxFilterControl; -begin - Result := -1; - AFilter := Filter; - if AFilter <> nil then - begin - for I := 0 to AFilter.Count - 1 do - if AFilter.ItemLinks[I] = ItemLink then - begin - Result := I; - break; - end; - end; -end; - -function TcxFilterControlCriteriaItem.ValidItem: Boolean; -begin - Result := (Filter <> nil) and (ItemIndex >= 0) and (ItemIndex < Filter.Count); -end; - -function TcxFilterControlCriteriaItem.GetFilterControlCriteria: TcxFilterControlCriteria; -begin - Result := TcxFilterControlCriteria(inherited Criteria); -end; - -{ TcxFilterControlCriteria } - -constructor TcxFilterControlCriteria.Create( - AOwner: TcxCustomFilterControl); -begin - inherited Create; - FControl := AOwner; - //ver 3 - Version := cxDataFilterVersion; -end; - -procedure TcxFilterControlCriteria.AssignEvents(Source: TPersistent); -begin -//don't assign events -end; - -function TcxFilterControlCriteria.GetIDByItemLink( - AItemLink: TObject): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Control.FilterLink.Count - 1 do - if Control.FilterLink.ItemLinks[I] = AItemLink then - begin - Result := Control.FilterLink.ItemLinkIDs[I]; - Break; - end; -end; - -function TcxFilterControlCriteria.GetItemClass: TcxFilterCriteriaItemClass; -begin - Result := TcxFilterControlCriteriaItem; -end; - -function TcxFilterControlCriteria.GetItemLinkByID(AID: Integer): TObject; -var - I: Integer; -begin - Result := nil; - for I := 0 to Control.FilterLink.Count - 1 do - if Control.FilterLink.ItemLinkIDs[I] = AID then - begin - Result := Control.FilterLink.ItemLinks[I]; - Break; - end; -end; - -function TcxFilterControlCriteria.GetNameByItemLink(AItemLink: TObject): string; -var - I: Integer; -begin - Result := ''; - for I := 0 to Control.FilterLink.Count - 1 do - if Control.FilterLink.ItemLinks[I] = AItemLink then - begin - Result := Control.FilterLink.ItemLinkNames[I]; - Break; - end; -end; - -function TcxFilterControlCriteria.GetItemLinkByName(const AName: string): TObject; -var - I: Integer; -begin - Result := nil; - for I := 0 to Control.FilterLink.Count - 1 do - if SameText(Control.FilterLink.ItemLinkNames[I], AName) then - begin - Result := Control.FilterLink.ItemLinks[I]; - Break; - end; -end; - -{ TcxCustomRowViewInfo } - -constructor TcxCustomRowViewInfo.Create(AControl: TcxCustomFilterControl; - AParent: TcxCustomRowViewInfo; ACriteriaItem: TcxCustomFilterCriteriaItem); -begin - inherited Create; - FControl := AControl; - FParent := AParent; - FCriteriaItem := ACriteriaItem; - FButtonState := cxbsNormal; - if AParent <> nil then AParent.Group.Add(Self); -end; - -destructor TcxCustomRowViewInfo.Destroy; -begin - if Parent <> nil then Parent.Group.Remove(Self); - inherited Destroy; -end; - -procedure TcxCustomRowViewInfo.Calc(const ARowRect: TRect); -var - AWidth: Integer; -begin - FRowRect := ARowRect; - GetInternal; - with Control do - begin - Canvas.Font.Assign(Font); - if FRoot = Self then - AWidth := Canvas.TextWidth(FButtonText + '00') - else - AWidth := Canvas.TextWidth('0') * Length(FButtonText); - FButtonRect := Classes.Bounds(ARowRect.Left + 4 + Indent, 0, AWidth, - HeightOf(ARowRect) - 4); - if not ViewInfo.Enabled then - FButtonState := cxbsDisabled - else - if (FocusedRow = Self) and (FFocusedInfo.HitTest = fhtButton) then - FButtonState := cxbsDefault - else - if HasHotTrack and (FHotTrack.Row = Self) and (FHotTrack.HitTest = fhtButton) then - FButtonState := cxbsHot - else - FButtonState := cxbsNormal; - end; - CenterRectVert(FRowRect, FButtonRect); -end; - -procedure TcxCustomRowViewInfo.GetHitTestInfo(const P: TPoint; - var HitInfo: TcxFilterControlHitTestInfo); -begin - if PtInRect(ButtonRect, P) then - HitInfo.HitTest := fhtButton -end; - -function TcxCustomRowViewInfo.Ready: Boolean; -begin - Result := True; -end; - -function TcxCustomRowViewInfo.GetWidth: Integer; -begin - Result := FIndent + WidthOf(FButtonRect) + 5; -end; - -function TcxCustomRowViewInfo.IsLast: Boolean; -begin - Result := (FParent = nil) or - (FParent.Group.GetRow(FParent.Group.GetRowCount - 1) = Self); -end; - -function TcxCustomRowViewInfo.GetCondition: TcxConditionViewInfo; -begin - Result := Self as TcxConditionViewInfo; -end; - -function TcxCustomRowViewInfo.GetFocused: Boolean; -begin - Result := Control.FocusedRow = Self; -end; - -function TcxCustomRowViewInfo.GetGroup: TcxGroupViewInfo; -begin - Result := Self as TcxGroupViewInfo; -end; - -procedure TcxCustomRowViewInfo.GetInternal; -var - AParent: TcxCustomRowViewInfo; -begin - FLevel := 0; - AParent := Parent; - if AParent <> nil then - begin - FButtonText := '...'; - while AParent <> nil do - begin - AParent := AParent.Parent; - Inc(FLevel); - end - end - else FButtonText := cxGetResourceString(@cxSFilterRootButtonCaption); - FIndent := FLevel * HeightOf(RowRect); -end; - -{ TcxGroupViewInfo } - -constructor TcxGroupViewInfo.Create(AControl: TcxCustomFilterControl; - AParent: TcxCustomRowViewInfo; ACriteriaItem: TcxCustomFilterCriteriaItem); -begin - inherited; - FRows := TList.Create; - FCaption := cxGetResourceString(@cxSFilterGroupCaption); - if ACriteriaItem <> nil then - FBoolOperator := TcxFilterCriteriaItemList(ACriteriaItem).BoolOperatorKind - else - FBoolOperator := fboAnd; -end; - -destructor TcxGroupViewInfo.Destroy; -begin - while RowCount > 0 do Rows[0].Free; - FreeAndNil(FRows); - inherited Destroy; -end; - -procedure TcxGroupViewInfo.Add(ARow: TcxCustomRowViewInfo); -begin - FRows.Add(ARow); -end; - -procedure TcxGroupViewInfo.Remove(ARow: TcxCustomRowViewInfo); -begin - FRows.Remove(ARow); -end; - -procedure TcxGroupViewInfo.Calc(const ARowRect: TRect); -var - ASize: TSize; -begin - inherited Calc(ARowRect); - with Control.Canvas do - begin - Font.Assign(Control.FontBoolOperator); - FBoolOperatorText := cxBoolOperatorText[BoolOperator]; - ASize := TextExtent(FBoolOperatorText); - FBoolOperatorRect := Bounds(ButtonRect.Right + 8, 0, ASize.cx + 2, ASize.cy + 2); - CenterRectVert(FRowRect, FBoolOperatorRect); - Font.Assign(Control.Font); - ASize := TextExtent(FCaption); - FCaptionRect := Bounds(FBoolOperatorRect.Right + 8, 0, ASize.cx + 2, ASize.cy + 2); - CenterRectVert(FRowRect, FCaptionRect); - end; -end; - -procedure TcxGroupViewInfo.GetHitTestInfo(const P: TPoint; - var HitInfo: TcxFilterControlHitTestInfo); -begin - inherited; - if HitInfo.HitTest = fhtNone then - if PtInRect(FBoolOperatorRect, P) then HitInfo.HitTest := fhtBoolOperator; -end; - -function TcxGroupViewInfo.GetWidth: Integer; -begin - Result := inherited GetWidth + WidthOf(FBoolOperatorRect) + - WidthOf(FCaptionRect) + 16; -end; - -function TcxGroupViewInfo.GetRow(Index: Integer): TcxCustomRowViewInfo; -begin - Result := TcxCustomRowViewInfo(FRows[Index]); -end; - -function TcxGroupViewInfo.GetRowCount: Integer; -begin - Result := FRows.Count; -end; - -procedure TcxGroupViewInfo.SetRow(Index: Integer; - const Value: TcxCustomRowViewInfo); -begin - FRows[Index] := Value; -end; - -{ TcxValueInfo } - -constructor TcxValueInfo.Create; -begin - inherited Create; - FValue := Null; - FValueText := ''; - FValueRect := EmptyRect; -end; - -destructor TcxValueInfo.Destroy; -begin - FreeAndNil(FValueViewInfo); - inherited Destroy; -end; - -procedure TcxValueInfo.SetValueViewInfo( - const Value: TcxCustomEditViewInfo); -begin - FValueViewInfo.Free; - FValueViewInfo := Value; -end; - -{ TcxValuesViewInfo } - -constructor TcxValuesViewInfo.Create(ACondition: TcxConditionViewInfo); -begin - inherited Create; - FCondition := ACondition; - FList := TList.Create; -end; - -destructor TcxValuesViewInfo.Destroy; -begin - Clear; - FreeAndNil(FList); - inherited Destroy; -end; - -procedure TcxValuesViewInfo.AddValue; -var - V: TcxValueInfo; -begin - V := TcxValueInfo.Create; - V.ValueViewInfo := - TcxCustomEditViewInfo(Condition.GetProperties.GetViewInfoClass.Create); - FList.Add(V); -end; - -procedure TcxValuesViewInfo.Calc; -const - AButtonTransparency: array[Boolean] of TcxEditButtonTransparency = - (ebtHideInactive, ebtNone); -var - AHightlited, AHotTrack, AUseDisplayValue: Boolean; - AProperties: TcxCustomEditProperties; - AProvider: IcxEditDefaultValuesProvider; - ASize: TSize; - ASizeProperties: TcxEditSizeProperties; - ATopLeft, AMouse: TPoint; - AValue: TcxEditValue; - AViewData: TcxCustomEditViewData; - I, AExtraSize: Integer; -begin - if not Condition.HasDisplayValues then - begin - for I := 0 to Count - 1 do Values[I].FValueRect := EmptyRect; - Exit; - end - else - begin - ATopLeft := Point(Condition.OperatorRect.Right + 8, 0); - if Condition.Operator in [fcoBetween, fcoNotBetween] then - FSeparator := cxGetResourceString(@cxSFilterAndCaption) - else - if Condition.Operator in [fcoInList, fcoNotInList] then - begin - Control.Canvas.Font.Assign(Control.FontValue); - Inc(ATopLeft.X, Control.Canvas.TextWidth('(')); - FSeparator := ', '; - end; - end; - AHotTrack := Control.HasHotTrack; - AUseDisplayValue := (Condition.EditorHelper <> nil) and - (Condition.EditorHelper.UseDisplayValue); - for I := 0 to Count - 1 do - with Values[I] do - begin - if VarIsNull(Value) then - begin - AProperties := Control.GetDefaultProperties; - AValue := Control.NullString; - end - else - begin - AProperties := Condition.EditorProperties; - if AUseDisplayValue then AValue := ValueText else AValue := Value; - end; - with AProperties do - begin - LockUpdate(True); - AProvider := IDefaultValuesProvider; - IDefaultValuesProvider := nil; - end; - try - ValueViewInfo := TcxCustomEditViewInfo(AProperties.GetViewInfoClass.Create); - with AProperties, Control do - begin - AHightlited := AHotTrack and - (((FHotTrack.Row = Condition) and (FHotTrack.HitTest = fhtValue) and - (FHotTrack.ValueIndex = I) and (State = fcsNormal)) or - (HasFocus and (FocusedRow = Condition) and - (FFocusedInfo.HitTest = fhtValue) and (FFocusedInfo.ValueIndex = I))); - UpdateEditorStyle(FValueEditorStyle, AHightlited, ViewInfo.Enabled); - AViewData := CreateViewData(FValueEditorStyle, True); - AViewData.Enabled := ViewInfo.Enabled; - try - // calculate ValueRect - FValueRect.TopLeft := ATopLeft; - ASizeProperties.MaxLineCount := 1; - ASizeProperties.Width := -1; - ASizeProperties.Height := -1; - ASize := AViewData.GetEditSize(Canvas, AValue, ASizeProperties); - if AHightlited and (ASize.cx < ViewInfo.MinValueWidth) then - ASize.cx := ViewInfo.MinValueWidth; - with FValueRect do - begin - Right := Left + ASize.cx; - Bottom := Top + ASize.cy; - end; - CenterRectVert(Condition.RowRect, FValueRect); - // calculate - if not FilterEditsController.FindHelper(AProperties.ClassType).EditPropertiesHasButtons then - AViewData.ButtonVisibleCount := 0; - AViewData.EditValueToDrawValue(Canvas, AValue, ValueViewInfo); - AViewData.Calculate(Canvas, ValueRect, AMouse, cxmbNone, [], - ValueViewInfo, True); - finally - FreeAndNil(AViewData); - end; - AExtraSize := 4; - if Condition.Operator in [fcoBetween, fcoNotBetween, fcoInList, fcoNotInList] then - begin - Canvas.Font.Assign(FontValue); - Inc(AExtraSize, Canvas.TextWidth(FSeparator) + 4); - end; - Inc(ATopLeft.X, WidthOf(ValueRect) + AExtraSize); - end; - finally - with AProperties do - begin - IDefaultValuesProvider := AProvider; - LockUpdate(False); - end; - end; - end; - if Condition.Operator in [fcoInList, fcoNotInList] then - begin - Control.Canvas.Font.Assign(Control.FontValue); - FAddButtonRect := Bounds(Values[Count - 1].ValueRect.Right + - Control.Canvas.TextWidth(')0'), 0, Control.Canvas.TextWidth('000'), - HeightOf(Condition.RowRect) - 4); - CenterRectVert(Condition.RowRect, FAddButtonRect); - // get ButtonState - if not Control.ViewInfo.Enabled then - FAddButtonState := cxbsDisabled - else - with Control.FFocusedInfo do - if (Row = Condition) and (HitTest = fhtAddValue) then - FAddButtonState := cxbsDefault - else - with Control.FHotTrack do - if AHotTrack and (Row = Condition) and (HitTest = fhtAddValue) then - FAddButtonState := cxbsHot - else - FAddButtonState := cxbsNormal - end - else - FAddButtonRect := EmptyRect; -end; - -procedure TcxValuesViewInfo.Clear; -var - I: Integer; -begin - for I := 0 to FList.Count - 1 do - Values[I].Free; - FList.Clear; -end; - -procedure TcxValuesViewInfo.GetHitTestInfo(const P: TPoint; - var HitInfo: TcxFilterControlHitTestInfo); -var - I: Integer; -begin - if PtInRect(AddButtonRect, P) then - HitInfo.HitTest := fhtAddValue - else - for I := 0 to Count - 1 do - if PtInRect(Values[I].ValueRect, P) then - begin - HitInfo.HitTest := fhtValue; - HitInfo.ValueIndex := I; - break; - end; -end; - -procedure TcxValuesViewInfo.RemoveValue(AIndex: Integer); -begin - if (AIndex < 0) or (AIndex >= FList.Count) then Exit; - Values[AIndex].Free; - FList.Delete(AIndex); -end; - -function TcxValuesViewInfo.GetCount: Integer; -begin - Result := FList.Count; -end; - -procedure TcxValuesViewInfo.UpdateEditorStyle(AStyle: TcxCustomEditStyle; - AHightlited, AEnabled: Boolean); -const - ButtonTransparency: array[Boolean] of TcxEditButtonTransparency = - (ebtHideInactive, ebtNone); -begin - if AEnabled then - AStyle.StyleData.FontColor := Control.FontValue.Color - else - AStyle.StyleData.FontColor := clBtnShadow; - AStyle.ButtonTransparency := ButtonTransparency[AHightlited]; - if AHightlited then - AStyle.Color := clWindow - else - AStyle.Color := Control.ViewInfo.Painter.ContentColor; -end; - -function TcxValuesViewInfo.GetControl: TcxCustomFilterControl; -begin - Result := Condition.Control; -end; - -function TcxValuesViewInfo.GetValue(Index: Integer): TcxValueInfo; -begin - Result := TcxValueInfo(FList[Index]); -end; - -function TcxValuesViewInfo.GetWidth: Integer; -begin - with Condition do - case Operator of - fcoBetween, fcoNotBetween: - Result := Values[Count - 1].ValueRect.Right - OperatorRect.Right; - fcoInList, fcoNotInList: - Result := FAddButtonRect.Right - OperatorRect.Right; - else - if HasDisplayValues then - Result := Values[Count - 1].ValueRect.Right - OperatorRect.Right - else - Result := 0; - end; -end; - -{ TcxConditionViewInfo } - -constructor TcxConditionViewInfo.Create(AControl: TcxCustomFilterControl; - AParent: TcxCustomRowViewInfo; ACriteriaItem: TcxCustomFilterCriteriaItem); -var - I, J: Integer; - S: string; -begin - inherited Create(AControl, AParent, ACriteriaItem); - FValues := TcxValuesViewInfo.Create(Self); - if ACriteriaItem <> nil then - begin - FItemLink := TcxFilterCriteriaItem(ACriteriaItem).ItemLink; - FItemIndex := GetItemIndex; - with Control do - begin - if HasItems and (FItemIndex >= 0) and (FItemIndex < FilterLink.Count) then - FItemText := FilterLink.Captions[FItemIndex] - else - FilterControlError(cxGetResourceString(@cxSFilterErrorBuilding)); - end; - with TcxFilterCriteriaItem(ACriteriaItem) do - begin - FOperator := GetFilterControlOperator(OperatorKind, ValueIsNull(Value)); - case FOperator of - fcoBetween, fcoNotBetween, fcoInList, fcoNotInList: - begin - S := DisplayValue; - J := 1; - for I := VarArrayLowBound(Value, 1) to VarArrayHighBound(Value, 1) do - begin - FValues.AddValue; - FValues[I].Value := Value[I]; - FValues[I].ValueText := ExtractFilterDisplayValue(S, J); - end; - end; - else - begin - FValues.AddValue; - FValues[0].Value := Value; - FValues[0].ValueText := DisplayValue; - end; - end; - end; - InternalInit; - end - else - begin - FItemIndex := -1; - SetItem(-1); - end; -end; - -destructor TcxConditionViewInfo.Destroy; -begin - FreeAndNil(FValues); - FreeAndNil(FEditorProperties); - FreeAndNil(ValueEditorData); - inherited Destroy; -end; - -procedure TcxConditionViewInfo.Calc(const ARowRect: TRect); -var - ASize: TSize; -begin - inherited Calc(ARowRect); - with Control.Canvas do - begin - Font.Assign(Control.FontItem); - ASize := TextExtent(FItemText); - FItemRect := Bounds(ButtonRect.Right + 8, 0, ASize.cx + 2, ASize.cy + 2); - CenterRectVert(FRowRect, FItemRect); - Font.Assign(Control.FontCondition); - FOperatorText := cxConditionText[Operator]; - ASize := TextExtent(FOperatorText); - FOperatorRect := Bounds(FItemRect.Right + 8, 0, ASize.cx + 2, ASize.cy + 2); - CenterRectVert(FRowRect, FOperatorRect); - if HasDisplayValues then Values.Calc; - end; -end; - -procedure TcxConditionViewInfo.GetHitTestInfo(const P: TPoint; - var HitInfo: TcxFilterControlHitTestInfo); -begin - inherited; - if HitInfo.HitTest = fhtNone then - if PtInRect(FItemRect, P) then - HitInfo.HitTest := fhtItem - else - if PtInRect(FOperatorRect, P) then - HitInfo.HitTest := fhtOperator - else - Values.GetHitTestInfo(P, HitInfo); -end; - -function TcxConditionViewInfo.GetProperties: TcxCustomEditProperties; -begin - with Control do - begin - if HasItems and (ItemIndex >= 0) and (ItemIndex < FilterLink.Count) then - Result := FilterLink.Properties[ItemIndex] - else - Result := GetDefaultProperties; - if Result = nil then Result := GetDefaultProperties; - end; -end; - -function TcxConditionViewInfo.Ready: Boolean; -begin - Result := (FItemText <> '') and (FOperatorText <> ''); -end; - -procedure TcxConditionViewInfo.AddValue; -begin - Values.AddValue; - Control.LayoutChanged; -end; - -function TcxConditionViewInfo.GetWidth: Integer; -begin - Result := inherited GetWidth + WidthOf(FItemRect) + WidthOf(FOperatorRect) + - Values.Width + 8 * 2; -end; - -function TcxConditionViewInfo.HasDisplayValues: Boolean; -begin - Result := not (Operator in [fcoBlanks, fcoNonBlanks, fcoYesterday, fcoToday, fcoTomorrow, - fcoLast7Days, fcoLastWeek, fcoLast14Days, fcoLastTwoWeeks, fcoLast30Days, fcoLastMonth, fcoLastYear, fcoInPast, - fcoThisWeek, fcoThisMonth, fcoThisYear, - fcoNext7Days, fcoNextWeek, fcoNext14Days, fcoNextTwoWeeks, fcoNext30Days, fcoNextMonth, fcoNextYear, fcoInFuture]); -end; - -procedure TcxConditionViewInfo.InitValues(ASaveValue: Boolean); -begin - if ASaveValue and HasDisplayValues then - begin - case Operator of - fcoBetween, fcoNotBetween: - begin - while Values.Count > 2 do Values.RemoveValue(2); - if Values.Count < 2 then Values.AddValue; - end; - fcoInList, fcoNotInList:; - else - begin - while Values.Count > 1 do Values.RemoveValue(1); - if Values.Count < 1 then Values.AddValue; - end; - end; - end - else - begin - Values.Clear; - Values.AddValue; - if Operator in [fcoBetween, fcoNotBetween] then Values.AddValue; - end; -end; - -procedure TcxConditionViewInfo.InternalInit; -var - AEditClass: TcxCustomEditClass; - AProperties: TcxCustomEditProperties; -begin - FreeAndNil(ValueEditorData); - FreeAndNil(FEditorProperties); - AProperties := GetProperties; - with Control do - begin - FEditorHelper := FilterEditsController.FindHelper(AProperties.ClassType); - if FEditorHelper = nil then - FEditorHelper := TcxFilterTextEditHelper; - AEditClass := FEditorHelper.GetFilterEditClass; - if AEditClass <> nil then - FEditorProperties := AEditClass.GetPropertiesClass.Create(nil) - else - FEditorProperties := TcxCustomEditPropertiesClass(AProperties.ClassType).Create(nil); - FEditorHelper.InitializeProperties(FEditorProperties, AProperties, True); - FValueType := FilterLink.ValueTypes[FItemIndex]; - FSupportedOperators := FEditorHelper.GetSupportedFilterOperators(AProperties, FValueType, True); - end; - ValidateConditions; -end; - -procedure TcxConditionViewInfo.SetItem(AIndex: Integer); -var - AOperator: TcxFilterControlOperator; - I: Integer; - L: TStringList; -begin - with Control, Control.FilterLink do - begin - if (AIndex >= 0) and (AIndex = ItemIndex) then Exit; - if AIndex < 0 then - begin - AIndex := 0; - if FSortItems then - begin - L := TStringList.Create; - try - L.BeginUpdate; - for I := 0 to Count - 1 do - L.AddObject(Captions[I], TObject(I)); - L.Sort; - L.EndUpdate; - if L.Count > 0 then AIndex := Integer(L.Objects[0]); - finally - L.Free; - end; - end; - end; - FItemIndex := AIndex; - FItemLink := ItemLinks[AIndex]; - FItemText := Captions[AIndex]; - InternalInit; - if fcoLike in FSupportedOperators then - FOperator := fcoLike - else - for AOperator := Low(TcxFilterControlOperator) to High(TcxFilterControlOperator) do - if AOperator in FSupportedOperators then - begin - FOperator := AOperator; - break; - end; - InitValues(False); - Values.Calc; - if FValueEditor <> nil then - FInplaceEditors.RemoveItem(FValueEditor.ActiveProperties); - end; -end; - -procedure TcxConditionViewInfo.ValidateConditions; -begin - Control.ValidateConditions(FSupportedOperators); -end; - -function TcxConditionViewInfo.GetItemIndex: Integer; -var - I: Integer; -begin - Result := -1; - with Control do - for I := 0 to FilterLink.Count - 1 do - if FilterLink.ItemLinks[I] = FItemLink then - begin - Result := I; - break; - end; -end; - -{ TcxCustomFilterControl } - -constructor TcxCustomFilterControl.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WantTabs := False; - FCriteria := GetFilterControlCriteriaClass.Create(Self); - FRoot := TcxGroupViewInfo.Create(Self, nil, FCriteria.Root); - FRows := TList.Create; - FRows.Add(FRoot); - FViewInfo := GetViewInfoClass.Create(Self); - CreateFonts; - CreateInternalControls; - CheckInplaceControlsColor; - UpdateBoundsRect(Rect(0, 0, 300, 200)); - FFocusedInfo.Row := FRoot; - FFocusedInfo.HitTest := fhtBoolOperator; - FHotTrackOnUnfocused := True; - FNullString := cxGetResourceString(@cxSFilterControlNullString); - FShowLevelLines := True; - cxFormatController.AddListener(Self); - ParentColor := False; - Color := clBtnFace; -end; - -destructor TcxCustomFilterControl.Destroy; -var - AFont: TcxFilterControlFont; -begin - cxFormatController.RemoveListener(Self); - EndMouseTracking(Self); - DestroyInternalControls; - FreeAndNil(FCriteria); - FreeAndNil(FViewInfo); - FreeAndNil(FRows); - FreeAndNil(FRoot); - for AFont := fcfBoolOperator to fcfValue do FreeAndNil(FFonts[AFont]); - inherited Destroy; -end; - -procedure TcxCustomFilterControl.ApplyFilter; -begin - DoApplyFilter; -end; - -procedure TcxCustomFilterControl.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TcxCustomFilterControl.Clear; -begin - ValueEditorHide(False); - BeginUpdate; - try - ClearRows; - FCriteria.Clear; - finally - EndUpdate; - end; -end; - -procedure TcxCustomFilterControl.EndUpdate; -begin - Dec(FLockCount); - LayoutChanged; -end; - -function TcxCustomFilterControl.IsValid: Boolean; -var - I: Integer; -begin - Result := True; - for I := 0 to RowCount - 1 do - if not Rows[I].Ready then - begin - Result := False; - break; - end; -end; - -function TcxCustomFilterControl.HasItems: Boolean; -begin - Result := (FilterLink <> nil) and (FilterLink.Count > 0); -end; - -procedure TcxCustomFilterControl.LayoutChanged; -begin - if (FLockCount <> 0) or IsDestroying or IsLoading or not HandleAllocated or - ((FComboBox <> nil) and FComboBox.DroppedDown) then Exit; - Inc(FLockCount); - try - DoLayoutChange; - finally - Dec(FLockCount); - end; -end; - -procedure TcxCustomFilterControl.Localize; -var - AOperator: TcxFilterControlOperator; - ABoolOperator: TcxFilterBoolOperatorKind; -begin - RefreshMenuCaptions; - FRoot.Group.Caption := cxGetResourceString(@cxSFilterRootGroupCaption); - FViewInfo.FAddConditionCaption := cxGetResourceString(@cxSFilterFooterAddCondition); - for AOperator := Low(AOperator) to High(AOperator) do - cxConditionText[AOperator] := GetFilterControlOperatorText(AOperator); - for ABoolOperator := fboAnd to fboNotOr do - cxBoolOperatorText[ABoolOperator] := cxStrFromBoolOperator(ABoolOperator); - FNullString := cxGetResourceString(@cxSFilterControlNullString); - LayoutChanged; -end; - -procedure TcxCustomFilterControl.LoadFromFile(const AFileName: string); -var - F: TFileStream; -begin - F := TFileStream.Create(AFileName, fmOpenRead); - try - LoadFromStream(F); - finally - F.Free; - end; -end; - -procedure TcxCustomFilterControl.LoadFromStream(AStream: TStream); -begin - if not HasItems then - FilterControlError(cxGetResourceString(@cxSFilterErrorBuilding)); - Clear; - ReadData(AStream); - BuildFromCriteria; -end; - -procedure TcxCustomFilterControl.SaveToFile(const AFileName: string); -var - F: TFileStream; -begin - F := TFileStream.Create(AFileName, fmCreate); - try - SaveToStream(F); - finally - F.Free; - end; -end; - -procedure TcxCustomFilterControl.TranslationChanged; -begin - Localize; -end; - -procedure TcxCustomFilterControl.SaveToStream(AStream: TStream); -begin - BuildFromRows; - WriteData(AStream); -end; - -procedure TcxCustomFilterControl.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); -//TODO design-time editor ?? -// Filer.DefineBinaryProperty('FilterCriteria', ReadData, WriteData, FCriteria.Root.Count > 0); -end; - -procedure TcxCustomFilterControl.Loaded; -begin - inherited Loaded; - LayoutChanged; -end; - -procedure TcxCustomFilterControl.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - case Key of - VK_LEFT: FocusPrev(False); - VK_RIGHT: FocusNext(False); - VK_TAB: - begin - if ssCtrl in Shift then - TWinControlAccess(Parent).SelectNext(Self, not (ssShift in Shift), True) - else - if Shift = [] then - FocusNext(True) - else - if ssShift in Shift then FocusPrev(True); - Key := 0; - end; - VK_UP: FocusUp(False); - VK_DOWN: FocusDown(False); - VK_DELETE: if ssCtrl in Shift then Remove; - VK_INSERT: if Shift = [] then AddCondition(FocusedRow); - end; -end; - -procedure TcxCustomFilterControl.KeyPress(var Key: Char); -begin - inherited; - if (Key = #13) or (Key = ' ') then - ProcessHitTest(FFocusedInfo.HitTest, False) - else - if (Key <> #27) and (FFocusedInfo.HitTest = fhtValue) then - SelectValue(aveKey, Key); -end; - -procedure TcxCustomFilterControl.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if FWasError or not HasItems then Exit; - ViewInfo.GetHitTestInfo(Shift, Point(X, Y), FHotTrack); - if (FHotTrack.HitTest <> fhtNone) and (FState = fcsNormal) and (Button = mbLeft) then - begin - FFocusedInfo := FHotTrack; - EnsureRowVisible; - ProcessHitTest(FHotTrack.HitTest, True); - end; -end; - -procedure TcxCustomFilterControl.MouseMove(Shift: TShiftState; X, Y: Integer); -const - Cursors: array[Boolean] of TCursor = (crDefault, crHandPoint); - NonHot = [fhtNone, fhtBoolOperator, fhtItem, fhtOperator]; -var - APrevHotTrack: TcxFilterControlHitTestInfo; - - function SameRow: Boolean; - begin - Result := APrevHotTrack.Row = FHotTrack.Row; - end; - - function SameHitTest: Boolean; - begin - Result := (APrevHotTrack.HitTest = FHotTrack.HitTest) and - (APrevHotTrack.ValueIndex = FHotTrack.ValueIndex); - end; - -begin - inherited MouseMove(Shift, X, Y); - BeginMouseTracking(Self, Bounds, Self); - APrevHotTrack := FHotTrack; - ViewInfo.GetHitTestInfo(Shift, Point(X, Y), FHotTrack); - Cursor := Cursors[HasHotTrack and (FHotTrack.HitTest <> fhtNone)]; - if (APrevHotTrack.HitTest in NonHot) and (FHotTrack.HitTest in NonHot) then Exit; - if SameRow then - if SameHitTest then Exit else ViewInfo.InvalidateRow(FHotTrack.Row) - else - begin - if not (APrevHotTrack.HitTest in NonHot) then - ViewInfo.InvalidateRow(APrevHotTrack.Row); - if not (FHotTrack.HitTest in NonHot) then - ViewInfo.InvalidateRow(FHotTrack.Row); - end; - ViewInfo.Update; -end; - -procedure TcxCustomFilterControl.Paint; -begin - ViewInfo.Paint; -end; - -procedure TcxCustomFilterControl.SetEnabled(Value: Boolean); -begin - inherited; - LayoutChanged; -end; - -procedure TcxCustomFilterControl.SetParent(AParent: TWinControl); -begin - inherited SetParent(AParent); - LayoutChanged; -end; - -procedure TcxCustomFilterControl.BoundsChanged; -begin - inherited BoundsChanged; - if HandleAllocated then - LayoutChanged; -end; - -procedure TcxCustomFilterControl.DoLayoutChange; - - procedure CheckVertical; - begin - while (TopVisibleRow > 0) and - (ClientBounds.Bottom - ViewInfo.AddConditionRect.Bottom >= ViewInfo.RowHeight + 2) do - begin - Dec(FTopVisibleRow); - ViewInfo.Calc; - end; - end; - - procedure CheckHorizontal; - var - ADelta: Integer; - begin - ADelta := ClientBounds.Right - (ViewInfo.MaxRowWidth - LeftOffset) - 2; - if (LeftOffset > 0) and (ADelta > 0) then - begin - FLeftOffset := Max(0, FLeftOffset - ADelta); - ViewInfo.Calc; - end; - end; - -begin - ViewInfo.Calc; - CheckVertical; - CheckHorizontal; - UpdateScrollBars; - Invalidate; -end; - -procedure TcxCustomFilterControl.FocusChanged; -begin - inherited FocusChanged; - ViewInfo.GetHitTestInfo([], ScreenToClient(GetMouseCursorPos), FHotTrack); - LayoutChanged; -end; - -procedure TcxCustomFilterControl.FontChanged; -var - AFont: TcxFilterControlFont; -begin - inherited; - if not IsLoading or (csReading in ComponentState) or IsDesigning then - begin - BeginUpdate; - try - for AFont := fcfBoolOperator to fcfValue do - begin - FFonts[AFont].Name := Font.Name; - FFonts[AFont].Height := Font.Height; - FFonts[AFont].Charset := Font.Charset; - end; - finally - EndUpdate; - end; - end; -end; - -function TcxCustomFilterControl.GetBorderSize: Integer; -begin - Result := LookAndFeel.Painter.BorderSize; -end; - -procedure TcxCustomFilterControl.InitControl; -begin - inherited; - FComboBox.Parent := Self; - Localize; -end; - -procedure TcxCustomFilterControl.InitScrollBarsParameters; -var - APageSize: Integer; -begin - if ViewInfo.RowHeight = 0 then Exit; - APageSize := HeightOf(ClientBounds) div ViewInfo.RowHeight; - SetScrollBarInfo(sbVertical, 0, RowCount - 1, 1, APageSize - 1, TopVisibleRow, True, True); - SetScrollBarInfo(sbHorizontal, 0, ViewInfo.MaxRowWidth, 1, - WidthOf(ClientBounds), FLeftOffset, True, True); -end; - -procedure TcxCustomFilterControl.LookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); -begin - inherited; - LayoutChanged; - CheckInplaceControlsColor; -end; - -procedure TcxCustomFilterControl.MouseEnter(AControl: TControl); -begin - inherited MouseEnter(AControl); - BeginMouseTracking(Self, Bounds, Self); -end; - -procedure TcxCustomFilterControl.MouseLeave(AControl: TControl); -begin - inherited MouseLeave(AControl); - EndMouseTracking(Self); - FHotTrack.HitTest := fhtNone; - LayoutChanged; -end; - -procedure TcxCustomFilterControl.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); - - procedure ScrollVertical; - begin - case AScrollCode of - scLineUp: - TopVisibleRow := TopVisibleRow - 1; - scLineDown: - TopVisibleRow := TopVisibleRow + 1; - scTrack: - TopVisibleRow := AScrollPos; - scPageUp: - TopVisibleRow := TopVisibleRow - VScrollBar.PageSize; - scPageDown: - TopVisibleRow := TopVisibleRow + VScrollBar.PageSize; - end; - AScrollPos := TopVisibleRow; - end; - - procedure ScrollHorizontal; - begin - case AScrollCode of - scLineUp: - LeftOffset := LeftOffset - 8; - scLineDown: - LeftOffset := LeftOffset + 8; - scTrack: - LeftOffset := AScrollPos; - scPageUp: - LeftOffset := LeftOffset - HScrollBar.PageSize; - scPageDown: - LeftOffset := LeftOffset + HScrollBar.PageSize; - end; - AScrollPos := LeftOffset; - end; - -begin - if AScrollBarKind = sbVertical then - ScrollVertical - else - ScrollHorizontal; -end; - -procedure TcxCustomFilterControl.AddCondition(ARow: TcxCustomRowViewInfo); -var - ARowParent: TcxCustomRowViewInfo; -begin - if not HasItems then Exit; - if ARow <> nil then ARowParent := ARow else ARowParent := Rows[RowCount - 1]; - while not (ARowParent is TcxGroupViewInfo) do - ARowParent := ARowParent.Parent; - with FFocusedInfo do - Row := TcxConditionViewInfo.Create(Self, ARowParent, nil); - RecalcRows; - FFocusedInfo.HitTest := fhtAddCondition; // make sure last button visible - ViewInfo.Calc; - UpdateScrollBars; - EnsureRowVisible; - FFocusedInfo.HitTest := fhtItem; - ViewInfo.CalcFocusRect; - Invalidate; -end; - -procedure TcxCustomFilterControl.AddGroup; -var - AGroup: TcxGroupViewInfo; - ARowParent: TcxCustomRowViewInfo; -begin - if not HasItems then Exit; - ARowParent := FocusedRow; - while not (ARowParent is TcxGroupViewInfo) do - ARowParent := ARowParent.Parent; - AGroup := TcxGroupViewInfo.Create(Self, ARowParent, nil); - RecalcRows; - AddCondition(AGroup); -end; - -procedure TcxCustomFilterControl.AddValue; -begin - if not HasItems then Exit; - FocusedRow.Condition.Values.AddValue; - FFocusedInfo.HitTest := fhtValue; - FFocusedInfo.ValueIndex := FocusedRow.Condition.Values.Count - 1; - ViewInfo.Calc; - FLeftOffset := Max((ViewInfo.MaxRowWidth + 2) - ClientBounds.Right, 0); - LayoutChanged; -end; - -procedure TcxCustomFilterControl.ClearRows; -begin - BeginUpdate; - try - with FRoot.Group do - begin - while RowCount > 0 do Rows[0].Free; - FRows.Clear; - end; - FRows.Clear; - FRows.Add(FRoot); - FFocusedInfo.Row := FRoot; - FRoot.Group.BoolOperator := fboAnd; - FFocusedInfo.HitTest := fhtBoolOperator; - FTopVisibleRow := 0; - FLeftOffset := 0; - finally - EndUpdate; - end; -end; - -procedure TcxCustomFilterControl.Remove; -begin - if (FFocusedInfo.HitTest = fhtValue) and - (FocusedRow.Condition.Operator in [fcoInList, fcoNotInList]) and - (FocusedRow.Condition.Values.Count > 1) then - RemoveValue - else - RemoveRow; -end; - -procedure TcxCustomFilterControl.RemoveRow; -var - ARow: TcxCustomRowViewInfo; -begin - if FocusedRow = FRoot then Exit; - ARow := FocusedRow; - // remove Group if last child - while (ARow.Parent <> FRoot) and (ARow.Parent.Group.RowCount = 1) do - ARow := ARow.Parent; - FFocusedInfo.Row := Rows[FRows.IndexOf(ARow) - 1]; - FreeAndNil(ARow); - if FocusedRow is TcxGroupViewInfo then - FFocusedInfo.HitTest := fhtBoolOperator - else - FFocusedInfo.HitTest := fhtItem; - FHotTrack.Row := nil; - RecalcRows; - ViewInfo.Calc; - UpdateScrollBars; - EnsureRowVisible; -end; - -procedure TcxCustomFilterControl.RemoveValue; -begin - FocusedRow.Condition.Values.RemoveValue(FFocusedInfo.ValueIndex); - if FFocusedInfo.ValueIndex > 0 then Dec(FFocusedInfo.ValueIndex); - ViewInfo.Calc; - UpdateScrollBars; - EnsureRowVisible; -end; - -// navigation -procedure TcxCustomFilterControl.FocusDown(ATab: Boolean); -begin - if FocusedRow <> Rows[RowCount - 1] then - if ATab then - begin - FFocusedInfo.Row := Rows[FocusedRowIndex + 1]; - RowNavigate(fhtButton); - end - else - FocusedRow := Rows[FocusedRowIndex + 1] - else - RowNavigate(fhtAddCondition); -end; - -procedure TcxCustomFilterControl.FocusNext(ATab: Boolean); -begin - case FFocusedInfo.HitTest of - fhtAddCondition: if not ATab then FocusedRow := Rows[RowCount - 1]; - fhtAddValue, fhtBoolOperator: - if ATab then FocusDown(ATab); - fhtButton: - if FocusedRow is TcxGroupViewInfo then - RowNavigate(fhtBoolOperator) - else - RowNavigate(fhtItem); - fhtOperator: - if FocusedRow.Condition.HasDisplayValues then - begin - FFocusedInfo.ValueIndex := 0; - RowNavigate(fhtValue); - end - else - if ATab then FocusDown(ATab); - fhtItem: RowNavigate(fhtOperator); - fhtValue: - begin - if (FocusedRow.Condition.Values.Count - 1) > FFocusedInfo.ValueIndex then - begin - Inc(FFocusedInfo.ValueIndex); - RowNavigate(fhtValue); - end - else - if FocusedRow.Condition.Operator in [fcoInList, fcoNotInList] then - RowNavigate(fhtAddValue) - else - if ATab then FocusDown(ATab); - end; - end; -end; - -procedure TcxCustomFilterControl.FocusPrev(ATab: Boolean); -begin - case FFocusedInfo.HitTest of - fhtAddCondition: FocusUp(ATab); - fhtButton: if ATab then FocusUp(ATab); - fhtOperator: RowNavigate(fhtItem); - fhtItem, fhtBoolOperator: RowNavigate(fhtButton); - fhtValue: - begin - if FFocusedInfo.ValueIndex > 0 then - begin - Dec(FFocusedInfo.ValueIndex); - RowNavigate(fhtValue); - end - else RowNavigate(fhtOperator); - end; - fhtAddValue: RowNavigate(fhtValue); - end; -end; - -procedure TcxCustomFilterControl.FocusUp(ATab: Boolean); - - procedure Select(ARow: TcxCustomRowViewInfo); - const - HitItem: array[Boolean] of TcxFilterControlHitTest = (fhtValue, fhtAddValue); - begin - if ATab then - begin - FFocusedInfo.Row := ARow; - if FocusedRow is TcxGroupViewInfo then - RowNavigate(fhtBoolOperator) - else - with FocusedRow.Condition do - if HasDisplayValues then - begin - FFocusedInfo.ValueIndex := Values.Count - 1; - RowNavigate(HitItem[Operator in [fcoInList, fcoNotInList]]); - end - else RowNavigate(fhtOperator) - end - else FocusedRow := ARow; - end; - -begin - if FFocusedInfo.HitTest = fhtAddCondition then - Select(Rows[RowCount - 1]) - else - if FocusedRow <> FRoot then - Select(Rows[FocusedRowIndex - 1]); -end; - -procedure TcxCustomFilterControl.RowNavigate(AElement: TcxFilterControlHitTest; ACellIndex: Integer = -1); -begin - FFocusedInfo.HitTest := AElement; - if (FocusedRow is TcxConditionViewInfo) and (ACellIndex >= 0) and - (ACellIndex < TcxConditionViewInfo(FocusedRow).Values.Count) then - FFocusedInfo.ValueIndex := ACellIndex; - ViewInfo.Calc; - EnsureRowVisible; -end; - -procedure TcxCustomFilterControl.ValueEditorHide(AAccept: Boolean); -var - V: Variant; - S: TCaption; -begin - FWasError := False; - State := fcsNormal; - if FValueEditor = nil then Exit; - if AAccept then - begin - if not FValueEditor.Deactivate then raise EAbort.Create(''); - with FocusedRow.Condition, Values[FFocusedInfo.ValueIndex] do - begin - EditorHelper.GetFilterValue(FValueEditor, GetProperties, V, S); - try - FilterControlValidateValue(FValueEditor, V, Operator, ValueType, EditorHelper); - except - FWasError := True; - raise - end; - FValue := V; - FValueText := S; - end; - end; - if FValueEditor.Focused and Focused then - begin - FValueEditor.EditModified := False; - FValueEditor.OnFocusChanged := nil; - end; - FValueEditor.Parent := nil; - FValueEditor := nil; - EnsureRowVisible; -end; - -procedure TcxCustomFilterControl.EnsureRowVisible; - - function GetFocusedRect: TRect; - begin - with FFocusedInfo do - case HitTest of - fhtButton: - begin - Result := Row.ButtonRect; - if Row = FRoot then Dec(Result.Left, 4); - end; - fhtBoolOperator: Result := Row.Group.BoolOperatorRect; - fhtItem: Result := Row.Condition.ItemRect; - fhtOperator: Result := Row.Condition.OperatorRect; - fhtValue: Result := Row.Condition.Values[ValueIndex].ValueRect; - fhtAddCondition: Result := ViewInfo.AddConditionRect; - fhtAddValue: Result := Row.Condition.Values.AddButtonRect; - else - Result := EmptyRect; - end; - end; - -var - AIndex, ALeft, ABottom: Integer; - R: TRect; -begin - AIndex := FocusedRowIndex; - if AIndex < TopVisibleRow then - FTopVisibleRow := AIndex - else - begin - if FFocusedInfo.HitTest = fhtAddCondition then - ABottom := ViewInfo.AddConditionRect.Bottom - else - ABottom := FocusedRow.RowRect.Bottom; - while (ABottom > ClientBounds.Bottom) and (FTopVisibleRow < RowCount) do - begin - Dec(ABottom, ViewInfo.RowHeight); - Inc(FTopVisibleRow); - end; - end; - R := GetFocusedRect; - ALeft := R.Left; - if R.Right >= ClientBounds.Right then OffsetRect(R, ClientBounds.Right - R.Right - 2, 0); - if R.Left < ClientBounds.Left then OffsetRect(R, ClientBounds.Left - R.Left, 0); - Inc(FLeftOffset, ALeft - R.Left); - ViewInfo.Calc; - UpdateScrollBars; - Invalidate; -end; - -procedure TcxCustomFilterControl.BuildFromCriteria; - - procedure Build(ACriteriaList: TcxFilterCriteriaItemList; ARow: TcxCustomRowViewInfo); - var - I: Integer; - begin - with ACriteriaList do - begin - ARow.Group.BoolOperator := BoolOperatorKind; - for I := 0 to Count - 1 do - if Items[I].IsItemList then - Build(TcxFilterCriteriaItemList(Items[I]), - TcxGroupViewInfo.Create(Self, ARow, Items[I])) - else - TcxConditionViewInfo.Create(Self, ARow, Items[I]); - end; - end; - -begin - BeginUpdate; - try - ClearRows; - Build(FCriteria.Root, FRoot); - RecalcRows; - finally - EndUpdate; - end; -end; - -procedure TcxCustomFilterControl.BuildFromRows; - - function GetValueString(AValueInfo: TcxValueInfo; ASoftNull: Boolean = False): string; - begin - if VarIsNull(AValueInfo.Value) or - (ASoftNull and VarIsStr(AValueInfo.Value) and (AValueInfo.Value = '')) then - Result := cxGetResourceString(@cxSFilterBlankCaption) - else - Result := AValueInfo.ValueText; - end; - - procedure AddCondition(ACriteriaList: TcxFilterCriteriaItemList; ACondition: TcxConditionViewInfo); - var - I: Integer; - AValue: Variant; - AText: string; - begin - with ACondition do - case Operator of - fcoEqual, fcoNotEqual: - ACriteriaList.AddItem(ItemLink, GetFilterOperatorKind(Operator), - Values[0].Value, GetValueString(Values[0])); - fcoBetween, fcoNotBetween: - begin - // sort between - if VarCompare(Values[0].Value, Values[1].Value) < 0 then - begin - AValue := VarBetweenArrayCreate(Values[0].Value, Values[1].Value); - AText := GetValueString(Values[0]) + ';' + GetValueString(Values[1]); - end - else - begin - AValue := VarBetweenArrayCreate(Values[1].Value, Values[0].Value); - AText := GetValueString(Values[1]) + ';' + GetValueString(Values[0]); - end; - ACriteriaList.AddItem(ItemLink, GetFilterOperatorKind(Operator), AValue, AText); - end; - fcoInList, fcoNotInList: - begin - AValue := VarListArrayCreate(Values[0].Value); - AText := GetValueString(Values[0]); - for I := 1 to Values.Count - 1 do - begin - VarListArrayAddValue(AValue, Values[I].Value); - AText := AText + ';' + GetValueString(Values[I]); - end; - ACriteriaList.AddItem(ItemLink, GetFilterOperatorKind(Operator), AValue, AText); - end; - fcoBlanks, fcoNonBlanks: - ACriteriaList.AddItem(ItemLink, GetFilterOperatorKind(Operator), - Values[0].Value, cxGetResourceString(@cxSFilterBlankCaption)); - else - ACriteriaList.AddItem(ItemLink, GetFilterOperatorKind(Operator), - Values[0].Value, GetValueString(Values[0], True)); - end; - end; - - procedure Build(ACriteriaList: TcxFilterCriteriaItemList; ARow: TcxCustomRowViewInfo); - var - I: Integer; - begin - if ARow is TcxGroupViewInfo then - begin - ACriteriaList.BoolOperatorKind := ARow.Group.BoolOperator; - for I := 0 to ARow.Group.RowCount - 1 do - if ARow.Group.Rows[I] is TcxGroupViewInfo then - Build(ACriteriaList.AddItemList(fboAnd), ARow.Group.Rows[I]) - else - AddCondition(ACriteriaList, ARow.Group.Rows[I].Condition); - end - else - AddCondition(ACriteriaList, ARow.Condition); - end; - -begin - ValueEditorHide(True); - if not IsValid then Exit; - with FCriteria do - begin - BeginUpdate; - try - Clear; - Build(Root, Self.FRoot); - Prepare; - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomFilterControl.CheckInplaceControlsColor; -begin - FComboBox.Style.Color := ViewInfo.Painter.ContentColor; -end; - -procedure TcxCustomFilterControl.CreateInternalControls; - - function NewMenuItem(ATag: Integer): TMenuItem; - begin - Result := TMenuItem.Create(Self); - with Result do - begin - if ATag <> 2 then ImageIndex := ATag; - Tag := ATag; - OnClick := PopupMenuClick; - end; - end; - - procedure CreateComboBox; - begin - FComboBox := TcxComboBox.Create(nil, True); - with FComboBox do - begin - Style.LookAndFeel.MasterLookAndFeel := Self.LookAndFeel; - Visible := False; - ParentColor := True; - OnExit := ComboBoxExit; - OnKeyPress := ComboBoxKeyPress; - OnKeyDown := ComboBoxKeyDown; - end; - with FComboBox.Properties do - begin - Buttons[0].Visible := False; - DropDownListStyle := lsFixedList; - OnPopup := ComboBoxPopup; - OnCloseUp := ComboBoxCloseUp; - end; - end; - -var - I: Integer; -begin - CreateComboBox; - // style for Values - FValueEditorStyle := TcxCustomEditStyle.Create(Self, True); - with FValueEditorStyle do - begin - Font := FontValue; - LookAndFeel.MasterLookAndFeel := Self.LookAndFeel; - ButtonTransparency := ebtHideUnselected; - end; - // action menu - FActionMenu := TPopupMenu.Create(Self); - for I := 0 to 3 do - FActionMenu.Items.Add(NewMenuItem(I)); - // editors pool - FInplaceEditors := TcxInplaceEditList.Create(Self); - FTextEditProperties := TcxTextEditProperties.Create(nil); -end; - -procedure TcxCustomFilterControl.DestroyInternalControls; -begin - FreeAndNil(FInplaceEditors); - FreeAndNil(FValueEditorStyle); - FreeAndNil(FTextEditProperties); - FreeAndNil(FActionMenu); - FreeAndNil(FComboBox); -end; - -procedure TcxCustomFilterControl.DoApplyFilter; -var - ANeedSynchronize: Boolean; -begin - if (FilterLink <> nil) and (FilterLink.Criteria <> nil) then - begin - BuildFromRows; - ANeedSynchronize := FCriteria <> FilterLink.Criteria; - FilterLink.Criteria.BeginUpdate; - try - if ANeedSynchronize then - FilterLink.Criteria.AssignItems(FCriteria); - if Assigned(FOnApplyFilter) then FOnApplyFilter(Self); - finally - FilterLink.Criteria.EndUpdate; - if ANeedSynchronize then - FCriteria.Assign(FilterLink.Criteria); - BuildFromCriteria; - end; - end; -end; - -function TcxCustomFilterControl.GetDefaultProperties: TcxCustomEditProperties; -begin - Result := FTextEditProperties; -end; - -function TcxCustomFilterControl.GetDefaultPropertiesViewInfo: TcxCustomEditViewInfo; -begin - Result := TcxCustomEditViewInfo(GetDefaultProperties.GetViewInfoClass.Create); -end; - -function TcxCustomFilterControl.GetFilterControlCriteriaClass: TcxFilterControlCriteriaClass; -begin - Result := TcxFilterControlCriteria; -end; - -function TcxCustomFilterControl.GetViewInfoClass: TcxFilterControlViewInfoClass; -begin - Result := TcxFilterControlViewInfo; -end; - -function TcxCustomFilterControl.HasFocus: Boolean; -begin - Result := IsFocused or ((FValueEditor <> nil) and FValueEditor.IsFocused); -end; - -function TcxCustomFilterControl.HasHotTrack: Boolean; -begin - Result := Enabled and (FHotTrackOnUnfocused or HasFocus) and HasItems; -end; - -procedure TcxCustomFilterControl.RefreshProperties; -var - I: Integer; - ARow: TcxCustomRowViewInfo; -begin - if RowCount = 0 then Exit; - for I := 0 to RowCount - 1 do - begin - ARow := GetRow(I); - if ARow is TcxConditionViewInfo then - ARow.Condition.InternalInit; - end; - LayoutChanged; -end; - -procedure TcxCustomFilterControl.FillFilterItemList(AStrings: TStrings); -var - I: Integer; - AProperties: TcxCustomEditProperties; -begin - if (AStrings = nil) or not HasItems then Exit; - AStrings.BeginUpdate; - try - AStrings.Clear; - with FilterLink do - for I := 0 to Count - 1 do - begin - AProperties := Properties[I]; - if (AProperties <> nil) and (esoFiltering in AProperties.GetSupportedOperations) then - AStrings.AddObject(Captions[I], TObject(I)); - end; - finally - AStrings.EndUpdate; - end; -end; - -procedure TcxCustomFilterControl.FillConditionList(AStrings: TStrings); -var - AOperator: TcxFilterControlOperator; -begin - if (AStrings = nil) or not HasItems then Exit; - AStrings.BeginUpdate; - try - AStrings.Clear; - FocusedRow.Condition.ValidateConditions; - for AOperator := Low(AOperator) to High(AOperator) do - if AOperator in FocusedRow.Condition.SupportedOperators then - AStrings.AddObject(cxConditionText[AOperator], TObject(AOperator)); - finally - AStrings.EndUpdate; - end; -end; - -procedure TcxCustomFilterControl.ValidateConditions( - var SupportedOperations: TcxFilterControlOperators); -begin - if not FCriteria.SupportedLike then - SupportedOperations := SupportedOperations - [fcoLike, fcoNotLike]; -end; - -procedure TcxCustomFilterControl.CorrectOperatorClass( - var AOperatorClass: TcxFilterOperatorClass); -begin -end; - -function TcxCustomFilterControl.GetFilterCaption: string; -begin - BuildFromRows; - Result := FCriteria.FilterCaption -end; - -function TcxCustomFilterControl.GetFilterLink: IcxFilterControl; -begin - Result := nil; -end; - -function TcxCustomFilterControl.GetFilterText: string; -begin - BuildFromRows; - Result := FCriteria.FilterText -end; - -procedure TcxCustomFilterControl.SelectAction; -var - P: TPoint; -begin - if not HasItems then Exit; - with FocusedRow.ButtonRect do - P := ClientToScreen(Point(Left, Bottom)); - FState := fcsSelectingAction; - if FocusedRow <> FRoot then - begin - FActionMenu.Items[2].Visible := True; - FActionMenu.Items[3].Visible := True; - FActionMenu.Items[3].Caption := cxGetResourceString(@cxSFilterRemoveRow); - end - else - begin - FActionMenu.Items[2].Visible := FRoot.Group.RowCount > 0; - FActionMenu.Items[3].Visible := FRoot.Group.RowCount > 0; - FActionMenu.Items[3].Caption := cxGetResourceString(@cxSFilterClearAll); - end; - FActionMenu.Popup(P.X, P.Y); - FState := fcsNormal; -end; - -procedure TcxCustomFilterControl.SelectBoolOperator; -var - ABoolOperator: TcxFilterBoolOperatorKind; -begin - if not HasItems then Exit; - State := fcsSelectingBoolOperator; - with FComboBox do - begin - Properties.Items.Clear; - Properties.Sorted := False; - Style.Font.Assign(FontBoolOperator); - for ABoolOperator := fboAnd to fboNotOr do - Properties.Items.AddObject(cxBoolOperatorText[ABoolOperator], TObject(ABoolOperator)); - with FocusedRow.Group do - DoComboDropDown(BoolOperatorRect, BoolOperatorText); - end; -end; - -procedure TcxCustomFilterControl.SelectCondition; -begin - if not HasItems then Exit; - State := fcsSelectingCondition; - with FComboBox do - begin - Style.Font.Assign(FontCondition);// - Properties.Sorted := False; - FillConditionList(Properties.Items); - with FocusedRow.Condition do - DoComboDropDown(OperatorRect, OperatorText); - end; -end; - -procedure TcxCustomFilterControl.SelectItem; -begin - if not HasItems then Exit; - with FComboBox do - begin - Style.Font.Assign(FontItem); - State := fcsSelectingItem; - FillFilterItemList(Properties.Items); - Properties.Sorted := FSortItems; - with FocusedRow.Condition do - DoComboDropDown(ItemRect, ItemText); - end; -end; - -procedure TcxCustomFilterControl.SelectValue( - AActivateKind: TcxActivateValueEditKind; AKey: Char); -begin - if not HasItems then Exit; - EnsureRowVisible; - ValueEditorInit; - with FValueEditor do - begin - SendToBack; - case AActivateKind of - aveMouse: - with FocusedRow.Condition do - ActivateByMouse(FFocusedInfo.Shift, FFocusedInfo.Mouse.X, FFocusedInfo.Mouse.Y, ValueEditorData); - aveKey: - with FocusedRow.Condition do - ActivateByKey(AKey, ValueEditorData); - else - with FocusedRow.Condition do - Activate(ValueEditorData); - end; - end; -end; - -// IcxMouseTrackingCaller -procedure TcxCustomFilterControl.DoMouseLeave; -begin - MouseLeave(nil); -end; - -// IcxFormatContollerListener -procedure TcxCustomFilterControl.FormatChanged; -begin - LayoutChanged; -end; - -procedure TcxCustomFilterControl.CreateFonts; -var - AFont: TcxFilterControlFont; -begin - for AFont := fcfBoolOperator to fcfValue do - begin - FFonts[AFont] := TFont.Create; - FFonts[AFont].Color := cxFilterControlFontColors[AFont]; - if AFont <> fcfValue then - FFonts[AFont].Style := [fsUnderline]; - FFonts[AFont].OnChange := DoFontChanged; - end; -end; - -procedure TcxCustomFilterControl.DoFontChanged(Sender: TObject); -begin - LayoutChanged; -end; - -function TcxCustomFilterControl.GetFont(Index: Integer): TFont; -begin - Result := FFonts[TcxFilterControlFont(Index)]; -end; - -function TcxCustomFilterControl.IsFontStored(Index: Integer): Boolean; -const - Styles: array[Boolean] of TFontStyles = ([fsUnderline], []); -begin - with FFonts[TcxFilterControlFont(Index)] do - begin - Result := (CompareText(Name, Font.Name) <> 0) or (Height <> Font.Height) or - (Color <> cxFilterControlFontColors[TcxFilterControlFont(Index)]) or - (Charset <> Font.Charset) or (Style <> Styles[Index = Integer(fcfValue)]); - end; -end; - -procedure TcxCustomFilterControl.SetFont(Index: Integer; - const Value: TFont); -begin - FFonts[TcxFilterControlFont(Index)].Assign(Value); -end; - -function TcxCustomFilterControl.FocusedRowIndex: Integer; -begin - Result := FRows.IndexOf(FFocusedInfo.Row); - if Result < 0 then Result := 0; -end; - -function TcxCustomFilterControl.GetRow(Index: Integer): TcxCustomRowViewInfo; -begin - Result := TcxCustomRowViewInfo(FRows[Index]); -end; - -function TcxCustomFilterControl.GetRowCount: Integer; -begin - Result := FRows.Count; -end; - -function TcxCustomFilterControl.GetFocusedRow: TcxCustomRowViewInfo; -begin - Result := FFocusedInfo.Row; -end; - -procedure TcxCustomFilterControl.ComboBoxCloseUp(Sender: TObject); -begin - if not FComboBox.EditModified then Exit; - with FocusedRow do - case State of - fcsSelectingBoolOperator: - with FComboBox do - Group.BoolOperator := - TcxFilterBoolOperatorKind(Properties.Items.Objects[ItemIndex]); - fcsSelectingItem: - with FComboBox do - begin - Condition.SetItem(Integer(Properties.Items.Objects[ItemIndex])); - FFocusedInfo.HitTest := fhtOperator; - with Condition do - if (fcoLike in SupportedOperators) and (ValueType <> nil) and ValueType.IsString then - Condition.Operator := fcoLike; - end; - fcsSelectingCondition: - begin - with FComboBox do - Condition.Operator := - TcxFilterControlOperator(Properties.Items.Objects[ItemIndex]); - Condition.InitValues(True); - if Condition.HasDisplayValues then - begin - FFocusedInfo.HitTest := fhtValue; - FFocusedInfo.ValueIndex := 0; - end; - end; - end; - FComboBox.Visible := False; - State := fcsNormal; - ViewInfo.Calc; - EnsureRowVisible; - SetFocus; -end; - -procedure TcxCustomFilterControl.ComboBoxExit(Sender: TObject); -begin - //TODO - FComboBox.Visible := False; - State := fcsNormal; -end; - -procedure TcxCustomFilterControl.ComboBoxKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if Key = 32 then Key := 13; -end; - -procedure TcxCustomFilterControl.ComboBoxKeyPress(Sender: TObject; var Key: Char); -begin - if Key = ' ' then Key := #0; -end; - -procedure TcxCustomFilterControl.ComboBoxPopup(Sender: TObject); -begin - TcxComboBoxListBox(FComboBox.ILookupData.ActiveControl).Font.Style := []; -end; - -procedure TcxCustomFilterControl.DoComboDropDown(const R: TRect; const AText: string); -begin - with FComboBox do - begin - Visible := True; - with R do - SetBounds(Left, Top, Right - Left, Bottom - Top); - Properties.DropDownRows := Min(cxFilterControlMaxDropDownRows, - Properties.Items.Count); - EditValue := AText; - DroppedDown := True; - end; -end; - -procedure TcxCustomFilterControl.SetFocusedRow(ARow: TcxCustomRowViewInfo); -begin - FFocusedInfo.Row := ARow; - if ARow is TcxGroupViewInfo then - RowNavigate(fhtBoolOperator) - else - RowNavigate(fhtItem); -end; - -procedure TcxCustomFilterControl.PopupMenuClick(Sender: TObject); -begin - case Integer(TMenuItem(Sender).Tag) of - 0: AddCondition(FocusedRow); - 1: AddGroup; - 3: if FocusedRow <> FRoot then RemoveRow else Clear; - end; -end; - -function TcxCustomFilterControl.IsNullStringStored: Boolean; -begin - Result := FNullString <> cxGetResourceString(@cxSFilterControlNullString); -end; - -procedure TcxCustomFilterControl.ProcessHitTest( - AHitTest: TcxFilterControlHitTest; AByMouse: Boolean); -begin - case AHitTest of - fhtAddCondition: AddCondition(nil); // add last - fhtAddValue: AddValue; - fhtBoolOperator: SelectBoolOperator; - fhtButton: SelectAction; - fhtItem: SelectItem; - fhtOperator: SelectCondition; - fhtValue: - if AByMouse then - SelectValue(aveMouse, #0) - else - SelectValue(aveEnter, #0); - end -end; - -procedure TcxCustomFilterControl.ReadData(AStream: TStream); -begin - FCriteria.ReadData(AStream); -end; - -procedure TcxCustomFilterControl.RecalcRows; - - procedure FillRows(ARow: TcxCustomRowViewInfo); - var - I: Integer; - begin - FRows.Add(ARow); - if ARow is TcxGroupViewInfo then - for I := 0 to ARow.Group.RowCount - 1 do - FillRows(ARow.Group.Rows[I]) - end; - -begin - FRows.Clear; - FillRows(FRoot); -end; - -procedure TcxCustomFilterControl.RefreshMenuCaptions; -begin - with FActionMenu do - begin - Items[0].Caption := cxGetResourceString(@cxSFilterAddCondition); - Items[1].Caption := cxGetResourceString(@cxSFilterAddGroup); - Items[2].Caption := '-'; - end; -end; - -procedure TcxCustomFilterControl.SetLeftOffset(Value: Integer); -begin - Value := Min(Value, ViewInfo.MaxRowWidth - WidthOf(ClientBounds) + 1); - if Value < 0 then Value := 0; - if FLeftOffset <> Value then - begin - FLeftOffset := Value; - LayoutChanged; - end; -end; - -procedure TcxCustomFilterControl.SetNullString(const Value: string); -begin - if FNullString <> Value then - begin - FNullString := Value; - LayoutChanged; - end; -end; - -procedure TcxCustomFilterControl.SetTopVisibleRow(Value: Integer); -begin - Value := Min(Value, RowCount - HeightOf(ClientBounds) div ViewInfo.RowHeight + 1); - if Value < 0 then Value := 0; - if FTopVisibleRow <> Value then - begin - FTopVisibleRow := Value; - LayoutChanged; - end; -end; - -procedure TcxCustomFilterControl.SetShowLevelLines(const Value: Boolean); -begin - if FShowLevelLines <> Value then - begin - FShowLevelLines := Value; - Invalidate; - end; -end; - -procedure TcxCustomFilterControl.SetWantTabs(const Value: Boolean); -begin - FWantTabs := Value; - if Value then - Keys := [kAll, kArrows, kChars, kTab] - else - Keys := [kAll, kArrows, kChars]; -end; - -procedure TcxCustomFilterControl.ValueEditorInit; - - procedure SetValidChars; - var - AWildcardChars: set of AnsiChar; - begin - AWildcardChars := [AnsiChar(FCriteria.UnderscoreWildcard), AnsiChar(FCriteria.PercentWildcard)]; - if FValueEditor is TcxCustomTextEdit then - if FocusedRow.Condition.Operator in [fcoLike, fcoNotLike] then - with TcxCustomTextEditProperties(FValueEditor.ActiveProperties) do - ValidChars := ValidChars + AWildcardChars - end; - -var - AProperties: TcxCustomEditProperties; - AIndex: Integer; -begin - State := fcsSelectingValue; - AIndex := FFocusedInfo.ValueIndex; - with FocusedRow.Condition do - begin - AProperties := GetProperties; - FValueEditor := EditorHelper.GetFilterEdit(AProperties, FInplaceEditors); - EditorHelper.SetFilterValue(FValueEditor, AProperties, Values[AIndex].Value); - end; - SetValidChars; - with FValueEditor do - begin - Parent := Self; - Style.Assign(FValueEditorStyle); - Style.Color := clWindow; - with FocusedRow.Condition.Values[AIndex].ValueRect do - SetBounds(Left, Top, Right - Left, Bottom - Top); - OnAfterKeyDown := ValueEditorAfterKeyDown; - OnExit := ValueEditorExit; - OnKeyDown := ValueEditorKeyDown; - end; -end; - -procedure TcxCustomFilterControl.ValueEditorAfterKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if (Key = VK_UP) or (Key = VK_DOWN) then - try - ValueEditorHide(True); - SetFocus; - KeyDown(Key, Shift); - Key := 0; - except - FValueEditor.SetFocus; - raise; - end; -end; - -procedure TcxCustomFilterControl.ValueEditorExit(Sender: TObject); -begin - try - ValueEditorHide(True); - except - FValueEditor.SetFocus; - raise; - end; -end; - -procedure TcxCustomFilterControl.ValueEditorKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - case Key of - VK_RETURN: - begin - ValueEditorHide(True); - SetFocus; - Key := 0; - end; - VK_TAB: - if FWantTabs then - begin - ValueEditorHide(True); - SetFocus; - if ssShift in Shift then FocusPrev(True) else FocusNext(True); - Key := 0; - end; - VK_ESCAPE: - begin - if FValueEditor <> nil then - Key := 0; - ValueEditorHide(False); - SetFocus; - end; - VK_DELETE: - if Shift = [ssCtrl] then - begin - ValueEditorHide(False); - SetFocus; - Remove; - Key := 0; - end; - end; -end; - -procedure TcxCustomFilterControl.WriteData(AStream: TStream); -begin - FCriteria.WriteData(AStream); -end; - -{ TcxFilterControlPainter } - -constructor TcxFilterControlPainter.Create(AOwner: TcxCustomFilterControl); -begin - inherited Create; - FControl := AOwner; -end; - -function TcxFilterControlPainter.GetContentColor: TColor; -begin - Result := clDefault; - if Control.LookAndFeel.SkinPainter <> nil then - Result := Control.LookAndFeel.SkinPainter.DefaultContentColor; - if Result = clDefault then - Result := Control.Color; -end; - -procedure TcxFilterControlPainter.DrawBorder; -begin - Painter.DrawBorder(Canvas, Control.Bounds); -end; - -procedure TcxFilterControlPainter.DrawDotLine(const R: TRect); -var - APrevBkColor, APrevTextColor: TColorRef; -begin - APrevBkColor := GetBkColor(Canvas.Canvas.Handle); - APrevTextColor := GetTextColor(Canvas.Canvas.Handle); - SetBkColor(Canvas.Canvas.Handle, ColorToRGB(cl3DDkShadow)); - SetTextColor(Canvas.Canvas.Handle, ColorToRGB(ContentColor)); - Windows.FillRect(Canvas.Canvas.Handle, R, HalftoneBrush); - SetBkColor(Canvas.Canvas.Handle, APrevBkColor); - SetTextColor(Canvas.Canvas.Handle, APrevTextColor); -end; - -procedure TcxFilterControlPainter.DrawGroup(ARow: TcxGroupViewInfo); -begin - with ARow, Canvas.Canvas do - begin - Brush.Style := bsClear; - if Caption <> '' then - TextDraw(CaptionRect.Left, CaptionRect.Top + 1, Caption); - Font.Assign(Control.FontBoolOperator); - if BoolOperatorText <> '' then - TextDraw(BoolOperatorRect.Left + 1, BoolOperatorRect.Top + 1, BoolOperatorText); - end; -end; - -procedure TcxFilterControlPainter.DrawCondition(ARow: TcxConditionViewInfo); -begin - with ARow, Canvas.Canvas do - begin - Brush.Style := bsClear; - Font.Assign(Control.FontItem); - if ItemText <> '' then - TextDraw(ItemRect.Left + 1, ItemRect.Top + 1, ItemText); - Font.Assign(Control.FontCondition); - if OperatorText <> '' then - TextDraw(OperatorRect.Left + 1, OperatorRect.Top + 1, OperatorText); - end; - DrawValues(ARow); -end; - -procedure TcxFilterControlPainter.DrawValues(ARow: TcxConditionViewInfo); -var - I: Integer; -begin - with ARow do - begin - if not Condition.HasDisplayValues then Exit; - for I := 0 to Values.Count - 1 do - Values[I].ValueViewInfo.Paint(Self.Canvas); - if Operator in [fcoBetween, fcoNotBetween] then - begin - Canvas.Font.Assign(Control.FontCondition); - Canvas.Brush.Color := ContentColor; - for I := 1 to Values.Count - 1 do - with Values[I - 1] do - TextDraw(ValueRect.Right + 4, ValueRect.Top + 1, Values.Separator); - end - else if Operator in [fcoInList, fcoNotInList] then - begin - Canvas.Font.Assign(Control.FontValue); - Canvas.Brush.Color := ContentColor; - for I := 1 to Values.Count - 1 do - with Values[I - 1] do - TextDraw(ValueRect.Right + 2, ValueRect.Top + 1, Values.Separator); - with OperatorRect do TextDraw(Right + 4, Top, '('); - with Values[Values.Count - 1].ValueRect do TextDraw(Right + 3, Top + 1, ')'); - Painter.DrawButton(Canvas, Values.AddButtonRect, '+', Values.AddButtonState); - end; - end; -end; - -procedure TcxFilterControlPainter.DrawRow(ARow: TcxCustomRowViewInfo); -var - ALeft, H: Integer; - AParent: TcxCustomRowViewInfo; -begin - with Canvas, ARow do - begin - Brush.Color := ContentColor; - FillRect(ARow.RowRect); - Font.Assign(Control.Font); - Painter.DrawButton(Self.Canvas, ButtonRect, ButtonText, ButtonState); - if ARow is TcxGroupViewInfo then - DrawGroup(Group) - else - DrawCondition(Condition); - // draw level's lines if need - if Control.ShowLevelLines and (Level > 0) then - begin - Brush.Style := bsSolid; - Brush.Color := clGray; - ALeft := Parent.ButtonRect.Left + WidthOf({Parent.}ButtonRect) div 2; - H := HeightOf(RowRect) div 2; - DrawDotLine(Bounds(ALeft, RowRect.Top, 1, H)); - if not IsLast then DrawDotLine(Bounds(ALeft, RowRect.Top + H, 1, H + 1)); - Inc(H, RowRect.Top); - DrawDotLine(Rect(ALeft, H, ButtonRect.Left - 3, H + 1)); - AParent := Parent; - while AParent <> nil do - begin - if not AParent.IsLast then - begin - ALeft := AParent.Parent.ButtonRect.Left + WidthOf(ButtonRect) div 2; - DrawDotLine(Rect(ALeft, RowRect.Top, ALeft + 1, RowRect.Bottom)); - end; - AParent := AParent.Parent; - end; - end; - end; -end; - -procedure TcxFilterControlPainter.TextDraw(X, Y: Integer; const AText: string); -begin - with Canvas.Canvas do - begin - if not ViewInfo.Enabled then - begin - Brush.Style := bsClear; - Font.Color := clBtnHighlight; - TextOut(X + 1, Y + 1, AText); - Font.Color := clBtnShadow; - end; - TextOut(X, Y, AText); - end; -end; - -function TcxFilterControlPainter.GetCanvas: TcxCanvas; -begin - Result := ViewInfo.Canvas; -end; - -function TcxFilterControlPainter.GetPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := FControl.LookAndFeel.Painter; -end; - -function TcxFilterControlPainter.GetViewInfo: TcxFilterControlViewInfo; -begin - Result := FControl.FViewInfo; -end; - -{ TcxFilterControlViewInfo } - -constructor TcxFilterControlViewInfo.Create( - AOwner: TcxCustomFilterControl); -begin - inherited Create; - FControl := AOwner; - FBitmap := TBitmap.Create; - FBitmap.PixelFormat := pfDevice; - FBitmapCanvas := TcxCanvas.Create(FBitmap.Canvas); - FPainter := GetPainterClass.Create(AOwner); - FButtonState := cxbsNormal; -end; - -destructor TcxFilterControlViewInfo.Destroy; -begin - FreeAndNil(FPainter); - FreeAndNil(FBitmapCanvas); - FreeAndNil(FBitmap); - inherited Destroy; -end; - -procedure TcxFilterControlViewInfo.Calc; -var - I, AIndent: Integer; - J: TcxFilterControlFont; - R: TRect; - ASize: TSize; -begin - CheckBitmap; - with Control do - begin - FEnabled := HasItems and Enabled; - FRowHeight := Self.Canvas.FontHeight(Font); - FMinValueWidth := Self.Canvas.TextWidth('0') * 12; - for J := fcfBoolOperator to fcfCondition do - FRowHeight := Max(FRowHeight, Self.Canvas.FontHeight(FFonts[J])); - FRowHeight := MulDiv(Max(FRowHeight, GetEditHeight), 3, 2); - with ClientBounds do - R := Rect(Left - LeftOffset, Top, Right, Top + FRowHeight); - OffsetRect(R, 0, - TopVisibleRow * FRowHeight); - FMaxRowWidth := 0; - for I := 0 to RowCount - 1 do - with Rows[I] do - begin - Calc(R); - FMaxRowWidth := Max(FMaxRowWidth, Width); - OffsetRect(R, 0, FRowHeight); - end; - AIndent := Rows[RowCount - 1].Indent + 4; - Inc(R.Left, AIndent); - Self.Canvas.Font.Assign(Font); - ASize := Self.Canvas.TextExtent(FAddConditionCaption + '00'); - FAddConditionRect := Classes.Bounds(R.Left, 0, ASize.cx, HeightOf(R) - 4); - CenterRectVert(R, FAddConditionRect); - FMaxRowWidth := Max(FMaxRowWidth, WidthOf(FAddConditionRect) + AIndent); - end; - CalcButtonState; - CalcFocusRect; -end; - -procedure TcxFilterControlViewInfo.GetHitTestInfo(AShift: TShiftState; - const P: TPoint; var HitInfo: TcxFilterControlHitTestInfo); -var - I: Integer; -begin - with Control do - begin - HitInfo.HitTest := fhtNone; - HitInfo.Mouse := P; - HitInfo.Row := FocusedRow; - if HitInfo.Row = nil then HitInfo.Row := FRoot; - HitInfo.Shift := AShift; - HitInfo.ValueIndex := -1; - if not PtInRect(ClientBounds, P) then Exit; - if PtInRect(AddConditionRect, P) then - HitInfo.HitTest := fhtAddCondition - else - for I := TopVisibleRow to RowCount - 1 do - if PtInRect(Rows[I].RowRect, P) then - begin - HitInfo.Row := Rows[I]; - Rows[I].GetHitTestInfo(P, HitInfo); - break; - end; - end; -end; - -procedure TcxFilterControlViewInfo.Paint; - - function IsFocused: Boolean; - begin - Result := Control.IsFocused or - (Control.FComboBox.IsFocused) or - ((Control.FValueEditor <> nil) and Control.FValueEditor.IsFocused); - end; - -var - I: Integer; - R: TRect; -begin - with Canvas do - begin - Brush.Style := bsSolid; - Brush.Color := Painter.ContentColor; - FillRect(Control.ClientBounds); - end; - for I := Control.TopVisibleRow to Control.RowCount - 1 do - with Control.Rows[I] do - begin - if Canvas.RectVisible(RowRect) then - Painter.DrawRow(Control.Rows[I]); - if RowRect.Top > Control.ClientBounds.Bottom then break; - end; - with Canvas do - begin - Brush.Color := Painter.ContentColor; - Brush.Style := bsSolid; - Font.Assign(Control.Font); - Painter.Painter.DrawButton(Self.Canvas, FAddConditionRect, FAddConditionCaption, FButtonState); - if not IsRectEmpty(FFocusRect) and IsFocused then - DrawFocusRect(FFocusRect); - end; - R := Bounds(0, 0, FBitmap.Width, FBitmap.Height); - Painter.DrawBorder; - BitBlt(Control.Canvas.Handle, 0, 0, FBitmap.Width, FBitmap.Height, - Canvas.Handle, 0, 0, SRCCOPY); -end; - -procedure TcxFilterControlViewInfo.InvalidateRow(ARow: TcxCustomRowViewInfo); -begin - if ARow <> nil then - begin - ARow.Calc(ARow.RowRect); - Control.InvalidateRect(ARow.RowRect, False); - end; -end; - -procedure TcxFilterControlViewInfo.Update; -var - AState: TcxButtonState; -begin - AState := FButtonState; - CalcButtonState; - CalcFocusRect; - if AState <> FButtonState then Control.InvalidateRect(FAddConditionRect, True); -end; - -procedure TcxFilterControlViewInfo.CalcFocusRect; -begin - if not Control.HasItems then - begin - FFocusRect := Control.ClientBounds; - InflateRect(FFocusRect, -2, -2); - end - else - with Control.FFocusedInfo do - begin - FFocusRect := EmptyRect; - case HitTest of - fhtBoolOperator: FFocusRect := Row.Group.BoolOperatorRect; - fhtItem: FFocusRect := Row.Condition.ItemRect; - fhtOperator: FFocusRect := Row.Condition.OperatorRect; - fhtValue: FFocusRect := Row.Condition.Values[ValueIndex].ValueRect; - end; - if HitTest in [fhtBoolOperator, fhtItem, fhtOperator, fhtValue] then - InflateRect(FFocusRect, 1, 1); - end; -end; - -function TcxFilterControlViewInfo.GetPainterClass: TcxFilterControlPainterClass; -begin - Result := TcxFilterControlPainter; -end; - -procedure TcxFilterControlViewInfo.CalcButtonState; -begin - with Control do - if not FEnabled then - FButtonState := cxbsDisabled - else - if FFocusedInfo.HitTest = fhtAddCondition then - FButtonState := cxbsDefault - else - if HasHotTrack and (FHotTrack.HitTest = fhtAddCondition) then - FButtonState := cxbsHot - else - FButtonState := cxbsNormal; -end; - -procedure TcxFilterControlViewInfo.CheckBitmap; -begin - FBitmap.Height := Control.Height; // only if needed - FBitmap.Width := Control.Width; // only if needed -end; - -function TcxFilterControlViewInfo.GetCanvas: TcxCanvas; -begin - Result := FBitmapCanvas; -end; - -function TcxFilterControlViewInfo.GetEditHeight: Integer; -var - AEditSizeProperties: TcxEditSizeProperties; -begin - AEditSizeProperties.MaxLineCount := 1; - AEditSizeProperties.Width := 10; - AEditSizeProperties.Height := -1; - Canvas.Font.Assign(Control.FontValue); - with Control do - Result := FTextEditProperties.GetEditSize(Canvas, FValueEditorStyle, - True, 'Yy', AEditSizeProperties).cy; -end; - -{ TcxFilterControl } - -procedure TcxFilterControl.UpdateFilter; -begin - if (FilterLink <> nil) and (FilterLink.Criteria <> nil) then - begin - if FCriteria <> FilterLink.Criteria then - FCriteria.Assign(FilterLink.Criteria); - BuildFromCriteria; - end - else Clear; -end; - -function TcxFilterControl.GetFilterLink: IcxFilterControl; -begin - if FLinkComponent <> nil then - Supports(TObject(FLinkComponent), IcxFilterControl, Result) - else - Result := nil; -end; - -procedure TcxFilterControl.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = FLinkComponent) then - LinkComponent := nil -end; - -{$IFDEF CBUILDER6} -function TcxFilterControl.GetLinkComponent: TComponent; -begin - Result := FLinkComponent; -end; -{$ENDIF} - -procedure TcxFilterControl.SetLinkComponent(Value: TComponent); -begin - if (Value <> nil) and not Supports(Value, IcxFilterControl) then - Value := nil; - if FLinkComponent <> Value then - begin - {$IFDEF DELPHI5} - if FLinkComponent <> nil then - FLinkComponent.RemoveFreeNotification(Self); - {$ENDIF} - FLinkComponent := Value; - if FLinkComponent <> nil then - FLinkComponent.FreeNotification(Self); - UpdateFilter; - end; -end; - -procedure CreateHalftoneBrush; -var - X, Y: Integer; - DC: HDC; - Pattern: HBITMAP; -begin - Pattern := CreateBitmap(8, 8, 1, 1, nil); - DC := CreateCompatibleDC(0); - Pattern := SelectObject(DC, Pattern); - FillRect(DC, Rect(0, 0, 8, 8), GetStockObject(WHITE_BRUSH)); - for Y := 0 to 7 do - for X := 0 to 7 do - if (Y mod 2) = (X mod 2) then SetPixel(DC, X, Y, 0); - Pattern := SelectObject(DC, Pattern); - DeleteDC(DC); - HalftoneBrush := CreatePatternBrush(Pattern); - DeleteObject(Pattern); -end; - -initialization - CreateHalftoneBrush; - -finalization - if HalftoneBrush <> 0 then DeleteObject(HalftoneBrush); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlDialog.dfm b/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlDialog.dfm deleted file mode 100644 index b41e13c4..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlDialog.dfm +++ /dev/null @@ -1,107 +0,0 @@ -object fmFilterControlDialog: TfmFilterControlDialog - Left = 360 - Top = 200 - BorderIcons = [biSystemMenu] - Caption = 'fmFilterControlDialog' - AutoScroll = False - ClientHeight = 316 - ClientWidth = 552 - Color = clBtnFace - Constraints.MinHeight = 165 - Constraints.MinWidth = 560 - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000008 - 8EEE8FFFF8FF000888888888888800088EEE8FFFF8FF00088888888888880008 - 8E6677FFF8FF0007700007777777000780F607888788000770F6077777770008 - 80F807888888000880F807888888000808886070000000706888660700000706 - 8F88866070000068F88888660700068FFF88886660000000000000000000C000 - 0000C0000000C0000000C0000000C0000000C0000000C0000000C0000000C000 - 0000C0000000C0000000C00F000080070000800300000003000000030000} - KeyPreview = True - Position = poDefaultPosOnly - OldCreateOrder = False - OnClose = FormClose - OnKeyDown = FormKeyDown - OnKeyPress = FormKeyPress - PixelsPerInch = 96 - TextHeight = 13 - object pnlBottom: TPanel - Left = 0 - Top = 278 - Width = 552 - Height = 38 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - object btOpen: TcxButton - Left = 6 - Top = 8 - Width = 100 - Height = 23 - Hint = 'Open|Opens an existing filter' - Caption = '&Open...' - TabOrder = 0 - OnClick = acOpenExecute - end - object btSave: TcxButton - Left = 112 - Top = 8 - Width = 100 - Height = 23 - Hint = 'Save As|Saves the active filter with a new name' - Caption = 'Save &As...' - TabOrder = 1 - OnClick = acSaveExecute - end - object pnlBottomRight: TPanel - Left = 234 - Top = 0 - Width = 318 - Height = 38 - Align = alRight - BevelOuter = bvNone - TabOrder = 2 - object btApply: TcxButton - Left = 212 - Top = 8 - Width = 100 - Height = 23 - Caption = 'Apply' - TabOrder = 2 - OnClick = acApplyExecute - end - object btCancel: TcxButton - Left = 106 - Top = 8 - Width = 100 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - object btOk: TcxButton - Left = 0 - Top = 8 - Width = 100 - Height = 23 - Caption = 'Ok' - ModalResult = 1 - TabOrder = 0 - OnClick = acOkExecute - end - end - end - object OpenDialog: TOpenDialog - Left = 240 - Top = 8 - end - object SaveDialog: TSaveDialog - Options = [ofOverwritePrompt, ofHideReadOnly, ofEnableSizing] - Left = 272 - Top = 8 - end -end diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlDialog.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlDialog.pas deleted file mode 100644 index 919f5e55..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlDialog.pas +++ /dev/null @@ -1,276 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressFilterControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxFilterControlDialog; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, - SysUtils, Classes, Graphics, Controls, Forms, Dialogs, cxLookAndFeelPainters, - cxButtons, cxControls, cxFilterControl, ExtCtrls, cxLookAndFeels, StdCtrls, - Menus; - -type - TfmFilterControlDialog = class(TForm) - pnlBottom: TPanel; - btOpen: TcxButton; - btSave: TcxButton; - OpenDialog: TOpenDialog; - SaveDialog: TSaveDialog; - pnlBottomRight: TPanel; - btApply: TcxButton; - btCancel: TcxButton; - btOk: TcxButton; - procedure acApplyExecute(Sender: TObject); - procedure acOkExecute(Sender: TObject); - procedure acOpenExecute(Sender: TObject); - procedure acSaveExecute(Sender: TObject); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure FormKeyPress(Sender: TObject; var Key: Char); - procedure FormKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - private - FHasOpenedPopupWindow: Boolean; - FFilterControl: TcxCustomFilterControl; - - procedure Initialize(const AInitialDir: string); - procedure SetLookAndFeel(ALookAndFeel: TcxLookAndFeel); - procedure SetPanelsColor(AColor: TColor); - procedure SetTitle(const ATitle: string); - protected - procedure CreateParams(var Params: TCreateParams); override; - public - constructor Create(AOwner: TComponent); override; - property FilterControl: TcxCustomFilterControl read FFilterControl; - end; - -function cxInternalExecuteFilterControlDialog(AFilterControlClass: TcxCustomFilterControlClass; - ALink: TComponent; ALookAndFeel: TcxLookAndFeel; - AOnApplyProc: TNotifyEvent = nil; AOnShowDialog: TNotifyEvent = nil; - AColor: TColor = clDefault; const AInitialDir: string = ''; AFont: TFont = nil): Boolean; - -function ExecuteFilterControlDialog(ALinkComponent: TComponent; - ALookAndFeel: TcxLookAndFeel; AOnApplyProc: TNotifyEvent = nil; - AOnShowDialog: TNotifyEvent = nil; AColor: TColor = clDefault; - const AInitialDir: string = ''; AFont: TFont = nil): Boolean; - -const - cxFilterDialogPosition: TRect = - (Left: -1; Top: -1; // screen center - Right: -1; Bottom: -1); // BottomRight as TSize - -implementation - -{$R *.dfm} - -uses - cxClasses, cxFilterControlStrs, cxContainer; - -function cxInternalExecuteFilterControlDialog( - AFilterControlClass: TcxCustomFilterControlClass; - ALink: TComponent; ALookAndFeel: TcxLookAndFeel; - AOnApplyProc: TNotifyEvent = nil; AOnShowDialog: TNotifyEvent = nil; - AColor: TColor = clDefault; const AInitialDir: string = ''; AFont: TFont = nil): Boolean; -var - AForm: TfmFilterControlDialog; - AIntf: IcxFilterControlDialog; -begin - AForm := TfmFilterControlDialog.Create(Application); - with AForm do - try - FFilterControl := AFilterControlClass.Create(nil); - SetLookAndFeel(ALookAndFeel); - if AFont <> nil then - DialogApplyFont(AForm, AFont); - - if Supports(TObject(FFilterControl), IcxFilterControlDialog, AIntf) then - AIntf.SetDialogLinkComponent(ALink); - AIntf := nil; //force to clear interface - with FilterControl do - begin - if AColor <> clDefault then Color := AColor; - if ALookAndFeel.SkinPainter = nil then - SetPanelsColor(Color) - else - SetPanelsColor(ALookAndFeel.SkinPainter.DefaultContentColor); - OnApplyFilter := AOnApplyProc; - end; - Initialize(AInitialDir); - OnShow := AOnShowDialog; - Result := ShowModal = mrOk; - finally - FFilterControl.Free; - Free; - end; -end; - -function ExecuteFilterControlDialog(ALinkComponent: TComponent; - ALookAndFeel: TcxLookAndFeel; AOnApplyProc: TNotifyEvent = nil; - AOnShowDialog: TNotifyEvent = nil; AColor: TColor = clDefault; - const AInitialDir: string = ''; AFont: TFont = nil): Boolean; -begin - Result := cxInternalExecuteFilterControlDialog(TcxFilterControl, - ALinkComponent, ALookAndFeel, AOnApplyProc, AOnShowDialog, AColor, - AInitialDir, AFont); -end; - -{ TfmFilterControlDialog } - -constructor TfmFilterControlDialog.Create(AOwner: TComponent); -begin - inherited Create(AOwner); -{$IFDEF DELPHI8} - Position := poDesigned; -{$ENDIF} -end; - -procedure TfmFilterControlDialog.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); -// rollback CorrectDlgParams(Params); - Params.Style := Params.Style or WS_POPUP; // for PopupEdit placed on DockPanel -end; - -procedure TfmFilterControlDialog.Initialize(const AInitialDir: string); -begin - SetTitle(cxGetResourceString(@cxSFilterControlDialogNewFile)); - OpenDialog.InitialDir := AInitialDir; - OpenDialog.Title := cxGetResourceString(@cxSFilterControlDialogOpenDialogCaption); - OpenDialog.DefaultExt := cxGetResourceString(@cxSFilterControlDialogFileExt); - OpenDialog.Filter := cxGetResourceString(@cxSFilterControlDialogFileFilter); - SaveDialog.InitialDir := AInitialDir; - SaveDialog.Title := cxGetResourceString(@cxSFilterControlDialogSaveDialogCaption); - SaveDialog.DefaultExt := OpenDialog.DefaultExt; - SaveDialog.Filter := OpenDialog.Filter; - btSave.Caption := cxGetResourceString(@cxSFilterControlDialogActionSaveCaption); - btOpen.Caption := cxGetResourceString(@cxSFilterControlDialogActionOpenCaption); - btApply.Caption := cxGetResourceString(@cxSFilterControlDialogActionApplyCaption); - btOk.Caption := cxGetResourceString(@cxSFilterControlDialogActionOkCaption); - btCancel.Caption := cxGetResourceString(@cxSFilterControlDialogActionCancelCaption); - with FilterControl do - begin - Align := alClient; - Parent := Self; - end; - with cxFilterDialogPosition do - begin - if (Left = -1) or (Top = -1) then - Position := poScreenCenter - else - begin - Self.Left := Left; - Self.Top := Top; - end; - if Right > 0 then Width := Right; - if Bottom > 0 then Height := Bottom; - end; -end; - -procedure TfmFilterControlDialog.SetLookAndFeel( - ALookAndFeel: TcxLookAndFeel); -begin - if ALookAndFeel <> nil then - begin - btOk.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - btCancel.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - btApply.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - btOpen.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - btSave.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - FilterControl.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - end; -end; - -procedure TfmFilterControlDialog.SetPanelsColor(AColor: TColor); -begin - pnlBottom.Color := AColor; - pnlBottomRight.Color := AColor; -end; - -procedure TfmFilterControlDialog.SetTitle(const ATitle: string); -begin - SaveDialog.FileName := ATitle; - Caption := Format('%s - [%s]', [cxGetResourceString(@cxSFilterControlDialogCaption), ATitle]); -end; - -procedure TfmFilterControlDialog.acApplyExecute(Sender: TObject); -begin - FilterControl.ApplyFilter; -end; - -procedure TfmFilterControlDialog.acOkExecute(Sender: TObject); -begin - FilterControl.ApplyFilter; -end; - -procedure TfmFilterControlDialog.acOpenExecute(Sender: TObject); -begin - OpenDialog.FileName := ''; - if OpenDialog.Execute then - begin - FilterControl.LoadFromFile(OpenDialog.FileName); - SetTitle(OpenDialog.FileName); - end; -end; - -procedure TfmFilterControlDialog.acSaveExecute(Sender: TObject); -begin - if SaveDialog.Execute then - begin - FilterControl.SaveToFile(SaveDialog.FileName); - SetTitle(SaveDialog.FileName); - end; -end; - -procedure TfmFilterControlDialog.FormClose(Sender: TObject; - var Action: TCloseAction); -begin - cxFilterDialogPosition := Rect(Left, Top, Width, Height); -end; - -procedure TfmFilterControlDialog.FormKeyPress(Sender: TObject; - var Key: Char); -begin - if (Key = #27) and not FHasOpenedPopupWindow then - Close; -end; - -procedure TfmFilterControlDialog.FormKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - FHasOpenedPopupWindow := HasOpenedPopupWindow(ActiveControl); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlReg.dcr b/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlReg.dcr deleted file mode 100644 index 8791bda1..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlReg.dcr and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlReg.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlReg.pas deleted file mode 100644 index 94b0e24f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlReg.pas +++ /dev/null @@ -1,235 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressFilterControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxFilterControlReg; - -{$I cxVer.inc} - -interface - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI6} - DesignEditors, DesignIntf, VCLEditors, -{$ELSE} - DsgnIntf, -{$ENDIF} - DB, TypInfo, SysUtils, Classes, Controls, cxClasses, cxFilterControl, - cxDBFilterControl, cxEdit, cxEditRepositoryItems, cxEditPropEditors, - dxCore; - -type - { TcxFilterItemPropertiesProperty } - - TcxFilterItemPropertiesProperty = class(TClassProperty) - protected - function HasSubProperties: Boolean; - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - { TcxFilterControlLinkSourceProperty } - - TcxFilterControlLinkComponentProperty = class(TComponentProperty) - private - FCheckProc: TGetStrProc; - procedure CheckComponent(const Value: string); - public - procedure GetValues(Proc: TGetStrProc); override; - end; - -{$IFDEF DELPHI6} - TcxDBFilterControlSelectionEditor = class(TSelectionEditor) - protected - ComponentsList: TStringList; - public - procedure AddComponent(const Name: string); - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - -procedure TcxDBFilterControlSelectionEditor.AddComponent(const Name: string); -begin - ComponentsList.Add(Name); -end; - -procedure TcxDBFilterControlSelectionEditor.RequiresUnits(Proc: TGetStrProc); - - procedure AddPropertiesUnitName(AProperties: TcxCustomEditProperties); - begin - if AProperties <> nil then - Proc(dxShortStringToString(GetTypeData(PTypeinfo(AProperties.ClassType.ClassInfo))^.UnitName)); - end; - -var - AComponent: TComponent; - I, J: Integer; -begin - inherited RequiresUnits(Proc); - ComponentsList := TStringList.Create; - try - Designer.GetComponentNames(GetTypeData(PTypeInfo(TcxDBFilterControl.ClassInfo)), AddComponent); - for I := 0 to ComponentsList.Count - 1 do - begin - AComponent := Designer.GetComponent(ComponentsList[I]); - if AComponent is TcxDBFilterControl then - with TcxDBFilterControl(AComponent) do - for J := 0 to Items.Count - 1 do - AddPropertiesUnitName(Items[J].Properties); - end; - finally - ComponentsList.Free; - end; -end; -{$ENDIF} - -{ TcxFilterItemPropertiesProperty } - -function TcxFilterItemPropertiesProperty.HasSubProperties: Boolean; -var - I: Integer; -begin - for I := 0 to PropCount - 1 do - begin - Result := TcxFilterItem(GetComponent(I)).Properties <> nil; - if not Result then Exit; - end; - Result := True; -end; - -function TcxFilterItemPropertiesProperty.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes; - if not HasSubProperties then - Exclude(Result, paSubProperties); - Result := Result - [paReadOnly] + - [paValueList, paSortList, paRevertable{$IFDEF DELPHI6}, paVolatileSubProperties{$ENDIF}]; -end; - -function TcxFilterItemPropertiesProperty.GetValue: string; -begin - if HasSubProperties then - Result := GetRegisteredEditProperties.GetDescriptionByClass(TcxCustomEditProperties(GetOrdValue).ClassType) - else - Result := ''; -end; - -procedure TcxFilterItemPropertiesProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to GetRegisteredEditProperties.Count - 1 do - if IsSupportFiltering(TcxCustomEditPropertiesClass(GetRegisteredEditProperties[I])) then - Proc(GetRegisteredEditProperties.Descriptions[I]); -end; - -procedure TcxFilterItemPropertiesProperty.SetValue(const Value: string); -var - APropertiesClass: TcxCustomEditPropertiesClass; - I: Integer; -begin - APropertiesClass := TcxCustomEditPropertiesClass(GetRegisteredEditProperties.FindByClassName(Value)); - if APropertiesClass = nil then - APropertiesClass := TcxCustomEditPropertiesClass(GetRegisteredEditProperties.FindByDescription(Value)); - if (APropertiesClass = nil) or IsSupportFiltering(APropertiesClass) then - begin - for I := 0 to PropCount - 1 do - TcxFilterItem(GetComponent(I)).PropertiesClass := APropertiesClass; - Modified; - end; -end; - -{ TcxFilterControlLinkComponentProperty } - -procedure TcxFilterControlLinkComponentProperty.CheckComponent( - const Value: string); -var - AComponent: TComponent; -begin - AComponent := TComponent(Designer.GetComponent(Value)); - if (AComponent <> nil) and not Supports(AComponent, IcxFilterControl) then - Exit; - FCheckProc(Value); -end; - -procedure TcxFilterControlLinkComponentProperty.GetValues(Proc: TGetStrProc); -begin - FCheckProc := Proc; - inherited GetValues(CheckComponent); -end; - -type - TcxFilterControlItemFieldNameProperty = class(TFieldNameProperty) - public - function GetDataSource: TDataSource; override; - end; - -{ TcxFilterControlItemFieldNameProperty } - -function TcxFilterControlItemFieldNameProperty.GetDataSource: TDataSource; -begin - Result := TcxDBFilterControl(TcxFilterItem(GetComponent(0)).FilterControl).DataSource; -end; - -procedure Register; -begin - RegisterComponents('Dev Express', [TcxFilterControl, TcxDBFilterControl]); - RegisterComponentEditor(TcxCustomFilterControl, TcxFilterControlComponentEditor); - RegisterClasses([TcxFilterItem]); - RegisterPropertyEditor(TypeInfo(TComponent), TcxFilterControl, - 'LinkComponent', TcxFilterControlLinkComponentProperty); - RegisterPropertyEditor(TypeInfo(string), TcxFilterItem, 'FieldName', TcxFilterControlItemFieldNameProperty); - RegisterPropertyEditor(TypeInfo(string), TcxFilterItem, 'PropertiesClassName', nil); - RegisterPropertyEditor(TypeInfo(TcxCustomEditProperties), TcxFilterItem, - 'Properties', TcxFilterItemPropertiesProperty); -{$IFDEF DELPHI6} - RegisterSelectionEditor(TcxDBFilterControl, TcxDBFilterControlSelectionEditor); -{$ENDIF} -end; - -{$IFDEF DELPHI6} -initialization - StartClassGroup(TControl); - GroupDescendentsWith(TcxFilterControl, TControl); - GroupDescendentsWith(TcxDBFilterControl, TControl); - GroupDescendentsWith(TcxFilterItem, TControl); -{$ENDIF} - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlStrs.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlStrs.pas deleted file mode 100644 index 7731f699..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlStrs.pas +++ /dev/null @@ -1,139 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressFilterControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxFilterControlStrs; - -{$I cxVer.inc} - -interface - -resourcestring - // cxFilterBoolOperator - cxSFilterBoolOperatorAnd = 'AND'; // all - cxSFilterBoolOperatorOr = 'OR'; // any - cxSFilterBoolOperatorNotAnd = 'NOT AND'; // not all - cxSFilterBoolOperatorNotOr = 'NOT OR'; // not any - // - cxSFilterRootButtonCaption = 'Filter'; - cxSFilterAddCondition = 'Add &Condition'; - cxSFilterAddGroup = 'Add &Group'; - cxSFilterRemoveRow = '&Remove Row'; - cxSFilterClearAll = 'Clear &All'; - cxSFilterFooterAddCondition = 'press the button to add a new condition'; - - cxSFilterGroupCaption = 'applies to the following conditions'; - cxSFilterRootGroupCaption = ''; - cxSFilterControlNullString = ''; - - cxSFilterErrorBuilding = 'Can''t build filter from source'; - - //FilterDialog - cxSFilterDialogCaption = 'Custom Filter'; - cxSFilterDialogInvalidValue = 'Invalid value'; - cxSFilterDialogUse = 'Use'; - cxSFilterDialogSingleCharacter = 'to represent any single character'; - cxSFilterDialogCharactersSeries = 'to represent any series of characters'; - cxSFilterDialogOperationAnd = 'AND'; - cxSFilterDialogOperationOr = 'OR'; - cxSFilterDialogRows = 'Show rows where:'; - - // FilterControlDialog - cxSFilterControlDialogCaption = 'Filter builder'; - cxSFilterControlDialogNewFile = 'untitled.flt'; - cxSFilterControlDialogOpenDialogCaption = 'Open an existing filter'; - cxSFilterControlDialogSaveDialogCaption = 'Save the active filter to file'; - cxSFilterControlDialogActionSaveCaption = '&Save As...'; - cxSFilterControlDialogActionOpenCaption = '&Open...'; - cxSFilterControlDialogActionApplyCaption = '&Apply'; - cxSFilterControlDialogActionOkCaption = 'OK'; - cxSFilterControlDialogActionCancelCaption = 'Cancel'; - cxSFilterControlDialogFileExt = 'flt'; - cxSFilterControlDialogFileFilter = 'Filters (*.flt)|*.flt'; - -implementation - -uses - dxCore; - -procedure AddExpressFilterControlResourceStringNames(AProduct: TdxProductResourceStrings); - - procedure InternalAdd(const AResourceStringName: string; AAdress: Pointer); - begin - AProduct.Add(AResourceStringName, AAdress); - end; - -begin - InternalAdd('cxSFilterBoolOperatorAnd', @cxSFilterBoolOperatorAnd); - InternalAdd('cxSFilterBoolOperatorOr', @cxSFilterBoolOperatorOr); - InternalAdd('cxSFilterBoolOperatorNotAnd', @cxSFilterBoolOperatorNotAnd); - InternalAdd('cxSFilterBoolOperatorNotOr', @cxSFilterBoolOperatorNotOr); - InternalAdd('cxSFilterRootButtonCaption', @cxSFilterRootButtonCaption); - InternalAdd('cxSFilterAddCondition', @cxSFilterAddCondition); - InternalAdd('cxSFilterAddGroup', @cxSFilterAddGroup); - InternalAdd('cxSFilterRemoveRow', @cxSFilterRemoveRow); - InternalAdd('cxSFilterClearAll', @cxSFilterClearAll); - InternalAdd('cxSFilterFooterAddCondition', @cxSFilterFooterAddCondition); - InternalAdd('cxSFilterGroupCaption', @cxSFilterGroupCaption); - InternalAdd('cxSFilterRootGroupCaption', @cxSFilterRootGroupCaption); - InternalAdd('cxSFilterControlNullString', @cxSFilterControlNullString); - InternalAdd('cxSFilterErrorBuilding', @cxSFilterErrorBuilding); - InternalAdd('cxSFilterDialogCaption', @cxSFilterDialogCaption); - InternalAdd('cxSFilterDialogInvalidValue', @cxSFilterDialogInvalidValue); - InternalAdd('cxSFilterDialogUse', @cxSFilterDialogUse); - InternalAdd('cxSFilterDialogSingleCharacter', @cxSFilterDialogSingleCharacter); - InternalAdd('cxSFilterDialogCharactersSeries', @cxSFilterDialogCharactersSeries); - InternalAdd('cxSFilterDialogOperationAnd', @cxSFilterDialogOperationAnd); - InternalAdd('cxSFilterDialogOperationOr', @cxSFilterDialogOperationOr); - InternalAdd('cxSFilterDialogRows', @cxSFilterDialogRows); - InternalAdd('cxSFilterControlDialogCaption', @cxSFilterControlDialogCaption); - InternalAdd('cxSFilterControlDialogNewFile', @cxSFilterControlDialogNewFile); - InternalAdd('cxSFilterControlDialogOpenDialogCaption', @cxSFilterControlDialogOpenDialogCaption); - InternalAdd('cxSFilterControlDialogSaveDialogCaption', @cxSFilterControlDialogSaveDialogCaption); - InternalAdd('cxSFilterControlDialogActionSaveCaption', @cxSFilterControlDialogActionSaveCaption); - InternalAdd('cxSFilterControlDialogActionOpenCaption', @cxSFilterControlDialogActionOpenCaption); - InternalAdd('cxSFilterControlDialogActionApplyCaption', @cxSFilterControlDialogActionApplyCaption); - InternalAdd('cxSFilterControlDialogActionOkCaption', @cxSFilterControlDialogActionOkCaption); - InternalAdd('cxSFilterControlDialogActionCancelCaption', @cxSFilterControlDialogActionCancelCaption); - InternalAdd('cxSFilterControlDialogFileExt', @cxSFilterControlDialogFileExt); - InternalAdd('cxSFilterControlDialogFileFilter', @cxSFilterControlDialogFileFilter); -end; - -initialization - dxResourceStringsRepository.RegisterProduct('ExpressFilterControl', @AddExpressFilterControlResourceStringNames); - -finalization - dxResourceStringsRepository.UnRegisterProduct('ExpressFilterControl'); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlUtils.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlUtils.pas deleted file mode 100644 index dd0e6b4e..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxFilterControlUtils.pas +++ /dev/null @@ -1,424 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressFilterControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxFilterControlUtils; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ELSE} - cxVariants, -{$ENDIF} - Classes, Controls, Forms, SysUtils, dxCore, cxClasses, cxDataStorage, cxEdit, cxFilter; - -type - TcxFilterControlOperator = (fcoNone, fcoEqual, fcoNotEqual, fcoLess, - fcoLessEqual, fcoGreater, fcoGreaterEqual, fcoLike, fcoNotLike, - fcoBlanks, fcoNonBlanks, fcoBetween, fcoNotBetween, fcoInList, - fcoNotInList, fcoYesterday, fcoToday, fcoTomorrow, - fcoLast7Days, fcoLastWeek, fcoLast14Days, fcoLastTwoWeeks, fcoLast30Days, fcoLastMonth, fcoLastYear, fcoInPast, - fcoThisWeek, fcoThisMonth, fcoThisYear, - fcoNext7Days, fcoNextWeek, fcoNext14Days, fcoNextTwoWeeks, fcoNext30Days, fcoNextMonth, fcoNextYear, fcoInFuture); - - TcxFilterControlOperators = set of TcxFilterControlOperator; - - EcxFilterControlError = class(EdxException); - - { TcxCustomFilterEditHelper } - - TcxCustomFilterEditHelper = class - protected - class procedure ClearPropertiesEvents(AProperties: TcxCustomEditProperties); virtual; - class procedure InitializeEdit(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties); virtual; - class function IsIDefaultValuesProviderNeeded( - AEditProperties: TcxCustomEditProperties): Boolean; virtual; - public - class function EditPropertiesHasButtons: Boolean; virtual; - class function GetFilterEdit(AEditProperties: TcxCustomEditProperties; - AInplaceEditList: TcxInplaceEditList = nil): TcxCustomEdit; - class function GetFilterEditClass: TcxCustomEditClass; virtual; - class procedure GetFilterValue(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties; var V: Variant; var S: TCaption); virtual; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; virtual; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); virtual; - class function IsValueValid(AValueTypeClass: TcxValueTypeClass; - var AValue: Variant): Boolean; virtual; - class procedure SetFilterValue(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties; AValue: Variant); virtual; - class function UseDisplayValue: Boolean; virtual; - end; - - TcxCustomFilterEditHelperClass = class of TcxCustomFilterEditHelper; - - { TcxFilterEditsController } - - TcxFilterEditsController = class(TcxRegisteredClassList) - private - function GetItemClass(AItemClass: TClass): TClass; - public - function FindHelper(APropertiesClass: TClass): TcxCustomFilterEditHelperClass; - procedure Register(AItemClass, ARegisteredClass: TClass); override; - procedure Unregister(AItemClass, ARegisteredClass: TClass); override; - end; - -function GetFilterOperatorKind(AOperator: TcxFilterControlOperator): TcxFilterOperatorKind; -function GetFilterControlOperator(AOperatorKind: TcxFilterOperatorKind; AIsNull: Boolean): TcxFilterControlOperator; - -procedure CorrectDlgParams(var Params: TCreateParams); -procedure FilterControlError(const Msg: string); -procedure FilterControlValidateValue(AEdit: TcxCustomEdit; var AValue: Variant; - AOperator: TcxFilterControlOperator; AValueTypeClass: TcxValueTypeClass; - AFilterEditHelper: TcxCustomFilterEditHelperClass); -function FilterEditsController: TcxFilterEditsController; -function GetFilterControlOperatorText(AOperator: TcxFilterControlOperator): string; - -implementation - -uses - cxFilterConsts, cxFilterControlStrs; - -var - FController: TcxFilterEditsController; - -function GetFilterOperatorKind(AOperator: TcxFilterControlOperator): TcxFilterOperatorKind; -const - OperatorMap: array[TcxFilterControlOperator] of TcxFilterOperatorKind = ( - foEqual, foEqual, foNotEqual, foLess, foLessEqual, - foGreater, foGreaterEqual, foLike, foNotLike, - foEqual, foNotEqual, // blank - non blank - foBetween, foNotBetween, foInList, foNotInList, foYesterday, foToday, foTomorrow, - foLast7Days, foLastWeek, foLast14Days, foLastTwoWeeks, foLast30Days, foLastMonth, foLastYear, foInPast, - foThisWeek, foThisMonth, foThisYear, - foNext7Days, foNextWeek, foNext14Days, foNextTwoWeeks, foNext30Days, foNextMonth, foNextYear, foInFuture); -begin - Result := OperatorMap[AOperator]; -end; - -function GetFilterControlOperator(AOperatorKind: TcxFilterOperatorKind; AIsNull: Boolean): TcxFilterControlOperator; -const - OperatorKindMap: array[TcxFilterOperatorKind] of TcxFilterControlOperator = ( - fcoEqual, fcoNotEqual, fcoLess, fcoLessEqual, fcoGreater, fcoGreaterEqual, - fcoLike, fcoNotLike, fcoBetween, fcoNotBetween, fcoInList, fcoNotInList, - fcoYesterday, fcoToday, fcoTomorrow, - fcoLast7Days, fcoLastWeek, fcoLast14Days, fcoLastTwoWeeks, fcoLast30Days, fcoLastMonth, fcoLastYear, fcoInPast, - fcoThisWeek, fcoThisMonth, fcoThisYear, - fcoNext7Days, fcoNextWeek, fcoNext14Days, fcoNextTwoWeeks, fcoNext30Days, fcoNextMonth, fcoNextYear, fcoInFuture); - ExtOperatorKindMap: array[Boolean] of TcxFilterControlOperator = - (fcoNonBlanks, fcoBlanks); -begin - Result := OperatorKindMap[AOperatorKind]; - if (Result in [fcoEqual, fcoNotEqual]) and AIsNull then - Result := ExtOperatorKindMap[Result = fcoEqual]; -end; - -procedure CorrectDlgParams(var Params: TCreateParams); -var - I: Integer; - AActiveForm: TForm; -begin - AActiveForm := Screen.ActiveForm; - if AActiveForm <> nil then - begin - for I := 0 to Screen.FormCount - 1 do - if (Screen.Forms[I] <> AActiveForm) and (Screen.Forms[I].FormStyle = fsStayOnTop) then - begin - AActiveForm := nil; - break; - end; - end; - if AActiveForm <> nil then - Params.WndParent := AActiveForm.Handle; -end; - -procedure FilterControlError(const Msg: string); -begin - raise EcxFilterControlError.Create(Msg); -end; - -procedure FilterControlValidateValue(AEdit: TcxCustomEdit; var AValue: Variant; - AOperator: TcxFilterControlOperator; AValueTypeClass: TcxValueTypeClass; - AFilterEditHelper: TcxCustomFilterEditHelperClass); -var - AError: Boolean; -begin - if AValueTypeClass = nil then - Exit; - if VarIsStr(AValue) and (AValue = '') and not AValueTypeClass.IsString then - AValue := Null; - if VarIsNull(AValue) or (AOperator in [fcoLike, fcoNotLike]) then - Exit; - AError := True; - try - AError := not AFilterEditHelper.IsValueValid(AValueTypeClass, AValue); - finally - if AError then - begin - FilterControlError(cxGetResourceString(@cxSFilterDialogInvalidValue)); - AEdit.EditModified := True; - if (AEdit <> nil) and AEdit.CanFocusEx then - AEdit.SetFocus; - end; - end; -end; - -function FilterEditsController: TcxFilterEditsController; -begin - if FController = nil then - FController := TcxFilterEditsController.Create; - Result := FController; -end; - -function GetFilterControlOperatorText(AOperator: TcxFilterControlOperator): string; -begin - case AOperator of - fcoEqual: - Result := cxGetResourceString(@cxSFilterOperatorEqual); - fcoNotEqual: - Result := cxGetResourceString(@cxSFilterOperatorNotEqual); - fcoLess: - Result := cxGetResourceString(@cxSFilterOperatorLess); - fcoLessEqual: - Result := cxGetResourceString(@cxSFilterOperatorLessEqual); - fcoGreater: - Result := cxGetResourceString(@cxSFilterOperatorGreater); - fcoGreaterEqual: - Result := cxGetResourceString(@cxSFilterOperatorGreaterEqual); - fcoLike: - Result := cxGetResourceString(@cxSFilterOperatorLike); - fcoNotLike: - Result := cxGetResourceString(@cxSFilterOperatorNotLike); - fcoBlanks: - Result := cxGetResourceString(@cxSFilterOperatorIsNull); - fcoNonBlanks: - Result := cxGetResourceString(@cxSFilterOperatorIsNotNull); - fcoBetween: - Result := cxGetResourceString(@cxSFilterOperatorBetween); - fcoNotBetween: - Result := cxGetResourceString(@cxSFilterOperatorNotBetween); - fcoInList: - Result := cxGetResourceString(@cxSFilterOperatorInList); - fcoNotInList: - Result := cxGetResourceString(@cxSFilterOperatorNotInList); - //date - fcoYesterday: - Result := cxGetResourceString(@cxSFilterOperatorYesterday); - fcoToday: - Result := cxGetResourceString(@cxSFilterOperatorToday); - fcoTomorrow: - Result := cxGetResourceString(@cxSFilterOperatorTomorrow); - fcoLast7Days: - Result := cxGetResourceString(@cxSFilterOperatorLast7Days); - fcoLastWeek: - Result := cxGetResourceString(@cxSFilterOperatorLastWeek); - fcoLast14Days: - Result := cxGetResourceString(@cxSFilterOperatorLast14Days); - fcoLastTwoWeeks: - Result := cxGetResourceString(@cxSFilterOperatorLastTwoWeeks); - fcoLast30Days: - Result := cxGetResourceString(@cxSFilterOperatorLast30Days); - fcoLastMonth: - Result := cxGetResourceString(@cxSFilterOperatorLastMonth); - fcoLastYear: - Result := cxGetResourceString(@cxSFilterOperatorLastYear); - fcoInPast: - Result := cxGetResourceString(@cxSFilterOperatorPast); - fcoThisWeek: - Result := cxGetResourceString(@cxSFilterOperatorThisWeek); - fcoThisMonth: - Result := cxGetResourceString(@cxSFilterOperatorThisMonth); - fcoThisYear: - Result := cxGetResourceString(@cxSFilterOperatorThisYear); - fcoNext7Days: - Result := cxGetResourceString(@cxSFilterOperatorNext7Days); - fcoNextWeek: - Result := cxGetResourceString(@cxSFilterOperatorNextWeek); - fcoNext14Days: - Result := cxGetResourceString(@cxSFilterOperatorNext14Days); - fcoNextTwoWeeks: - Result := cxGetResourceString(@cxSFilterOperatorNextTwoWeeks); - fcoNext30Days: - Result := cxGetResourceString(@cxSFilterOperatorNext30Days); - fcoNextMonth: - Result := cxGetResourceString(@cxSFilterOperatorNextMonth); - fcoNextYear: - Result := cxGetResourceString(@cxSFilterOperatorNextYear); - fcoInFuture: - Result := cxGetResourceString(@cxSFilterOperatorFuture); - else - Result := ''; - end; -end; - -{ TcxCustomFilterEditHelper } - -class procedure TcxCustomFilterEditHelper.ClearPropertiesEvents( - AProperties: TcxCustomEditProperties); -begin - if AProperties = nil then Exit; - with AProperties do - begin - OnValidate := nil; - OnEditValueChanged := nil; - OnChange := nil; - OnButtonClick := nil; - end; -end; - -class procedure TcxCustomFilterEditHelper.InitializeEdit(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties); -begin - InitializeProperties(AEdit.ActiveProperties, AEditProperties, - EditPropertiesHasButtons); -end; - -class function TcxCustomFilterEditHelper.IsIDefaultValuesProviderNeeded( - AEditProperties: TcxCustomEditProperties): Boolean; -begin - Result := True; -end; - -class function TcxCustomFilterEditHelper.EditPropertiesHasButtons: Boolean; -begin - Result := False; -end; - -class function TcxCustomFilterEditHelper.GetFilterEdit(AEditProperties: TcxCustomEditProperties; - AInplaceEditList: TcxInplaceEditList = nil): TcxCustomEdit; -begin - if AInplaceEditList = nil then - Result := GetFilterEditClass.Create(nil) - else - Result := AInplaceEditList.GetEdit(TcxCustomEditPropertiesClass(GetFilterEditClass.GetPropertiesClass)); - InitializeEdit(Result, AEditProperties); -end; - -class procedure TcxCustomFilterEditHelper.GetFilterValue(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties; var V: Variant; var S: TCaption); -begin - V := AEdit.EditValue; - S := AEditProperties.GetDisplayText(V); -end; - -class function TcxCustomFilterEditHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - if AExtendedSet then - Result := [fcoEqual..fcoNotInList] - else - Result := [fcoEqual..fcoNonBlanks]; - if (AValueTypeClass = nil) or not AValueTypeClass.IsString then - Result := Result - [fcoLike, fcoNotLike]; -end; - -class function TcxCustomFilterEditHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := nil; -end; - -class procedure TcxCustomFilterEditHelper.InitializeProperties( - AProperties, AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - with AProperties do - begin - Assign(AEditProperties); - Alignment.Horz := taLeftJustify; - Alignment.Vert := taTopJustify; - BeepOnError := False; - if not AHasButtons then - Buttons.Clear; - ReadOnly := False; - ValidateOnEnter := True; - if not Self.IsIDefaultValuesProviderNeeded(AEditProperties) then - IDefaultValuesProvider := nil; - end; - ClearPropertiesEvents(AProperties); -end; - -class function TcxCustomFilterEditHelper.IsValueValid(AValueTypeClass: TcxValueTypeClass; - var AValue: Variant): Boolean; -begin - Result := AValueTypeClass.IsValueValid(AValue); -end; - -class procedure TcxCustomFilterEditHelper.SetFilterValue(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties; AValue: Variant); -begin -end; - -class function TcxCustomFilterEditHelper.UseDisplayValue: Boolean; -begin - Result := False; -end; - -{ TcxFilterEditsController } - -function TcxFilterEditsController.GetItemClass( - AItemClass: TClass): TClass; -begin - Result := AItemClass.ClassParent; -end; - -function TcxFilterEditsController.FindHelper( - APropertiesClass: TClass): TcxCustomFilterEditHelperClass; -begin - Result := TcxCustomFilterEditHelperClass(FindClass(GetItemClass(APropertiesClass))); -end; - -procedure TcxFilterEditsController.Register(AItemClass, - ARegisteredClass: TClass); -begin - inherited Register(GetItemClass(AItemClass), ARegisteredClass); -end; - -procedure TcxFilterEditsController.Unregister(AItemClass, - ARegisteredClass: TClass); -begin - inherited Unregister(GetItemClass(AItemClass), ARegisteredClass); - if Count = 0 then - FreeAndNil(FController); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxFontNameComboBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxFontNameComboBox.pas deleted file mode 100644 index 74b9dcfc..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxFontNameComboBox.pas +++ /dev/null @@ -1,2361 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxFontNameComboBox; - -interface - -{$I cxVer.inc} - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, Dialogs, Forms, Graphics, Messages, Printers, - SysUtils, cxClasses, cxContainer, cxControls, cxGraphics, cxButtons, - cxDataStorage, cxVariants, - cxEdit, cxTextEdit, cxDropDownEdit, cxEditUtils, cxExtEditConsts, cxExtEditUtils, - cxImageComboBox, cxLookAndFeels, cxMaskEdit, cxFilterControlUtils; - -const -{$IFDEF DELPHI14} - {$EXTERNALSYM SYMBOL_FONTTYPE} -{$ENDIF} - SYMBOL_FONTTYPE = 256; - FIXEDPITCH_FONTTYPE = 512; - -type - TcxFontType = (cxftTTF, cxftRaster, cxftDevice, cxftFixed, cxftSymbol); - TcxFontTypes = set of TcxFontType; - TcxShowFontIconType = (ftiShowInCombo, ftiShowInList); - TcxShowFontIconTypes = set of TcxShowFontIconType; - TcxMRUFontNameAction = (mfaInvalidFontName, mfaNone, mfaMoved, mfaAdded, mfaDeleted); - TcxFontPreviewType = (cxfpFontName, cxfpCustom, cxfpFullAlphabet); - TcxDeleteMRUFontEvent = procedure(Sender: TObject; const DeletedMRUFontName: string) of object; - - { TcxMRUFontNameItem } - - TcxMRUFontNameItem = class(TCollectionItem) - private - FFontName: TFontName; - FTag: TcxTag; - function IsTagStored: Boolean; - procedure SetFontName(const Value: TFontName); - public - procedure Assign(Source: TPersistent); override; - published - property FontName: TFontName read FFontName write SetFontName; - property Tag: TcxTag read FTag write FTag stored IsTagStored; - end; - - { TcxMRUFontNameItems } - - TcxMRUFontNameItems = class(TOwnedCollection) - private - function GetItems(Index: Integer): TcxMRUFontNameItem; - procedure SetItems(Index: Integer; const Value: TcxMRUFontNameItem); - protected - procedure Update(Item: TCollectionItem); override; - function Add: TcxMRUFontNameItem; - function Insert(Index: Integer): TcxMRUFontNameItem; - function AddMRUFontName(const AFontName: TFontName): TcxMRUFontNameItem; virtual; - function InsertMRUFontName(Index: Integer; const AFontName: TFontName): TcxMRUFontNameItem; virtual; - procedure Move(CurIndex, NewIndex: Integer); virtual; - public - constructor Create(AOwner: TPersistent; ItemClass: TCollectionItemClass); - destructor Destroy; override; - {$IFNDEF DELPHI6} - function Owner: TPersistent; - {$ENDIF} - property Items[Index: Integer]: TcxMRUFontNameItem read GetItems write SetItems; default; - function FindFontName(const AFontName: TFontName): TcxMRUFontNameItem; virtual; - end; - - { TcxFontLoader } - - TcxFontLoader = class(TThread) - private - FFontTypes: TcxFontTypes; - procedure DoCompleteEvent; - procedure DoDestroyEvent; - protected - procedure Execute; override; - public - OnCompleteThread: TNotifyEvent; - OnDestroyThread: TNotifyEvent; - FontList: TStringList; - constructor Create(const AFontTypes: TcxFontTypes); virtual; - destructor Destroy; override; - end; - - TcxFontButtonType = (cxfbtBold, cxfbtItalic, cxfbtUnderline, cxfbtStrikeOut); - TcxFontButtonClickEvent = procedure(Sender: TObject; ButtonType: TcxFontButtonType) of Object; - - { TcxFontPreview } - - TcxFontPreview = class(TPersistent) - private - FOwner: TPersistent; - FUpdateCount: Integer; - FOnChanged: TNotifyEvent; - FFontStyle: TFontStyles; - FModified: Boolean; - FIsDestroying: Boolean; - FVisible: Boolean; - FPreviewType: TcxFontPreviewType; - FPreviewText: TCaption; - FAlignment: TAlignment; - FShowEndEllipsis: Boolean; - FColor: TColor; - FWordWrap: Boolean; - FShowButtons: Boolean; - FOnButtonClick: TcxFontButtonClickEvent; - procedure BeginUpdate; - procedure EndUpdate; - function IsDestroying: Boolean; - procedure SetFontStyle(Value: TFontStyles); - procedure SetVisible(Value: Boolean); - procedure SetPreviewType(Value: TcxFontPreviewType); - procedure SetPreviewText(Value: TCaption); - procedure SetAlignment(Value: TAlignment); - procedure SetShowEndEllipsis(Value: Boolean); - procedure SetColor(Value: TColor); - procedure SetWordWrap(Value: Boolean); - procedure SetShowButtons(Value: Boolean); - protected - function GetOwner: TPersistent; override; - procedure Changed; virtual; - public - constructor Create(AOwner: TPersistent); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - published - property FontStyle: TFontStyles read FFontStyle write SetFontStyle default []; - property Visible: Boolean read FVisible write SetVisible default True; - property PreviewType: TcxFontPreviewType read FPreviewType write SetPreviewType default cxfpFontName; - property PreviewText: TCaption read FPreviewText write SetPreviewText; - property Alignment: TAlignment read FAlignment write SetAlignment default taCenter; - property ShowButtons: Boolean read FShowButtons write SetShowButtons default True; - property ShowEndEllipsis: Boolean read FShowEndEllipsis write SetShowEndEllipsis default True; - property Color: TColor read FColor write SetColor default clWindow; - property WordWrap: Boolean read FWordWrap write SetWordWrap default False; - property OnButtonClick: TcxFontButtonClickEvent read FOnButtonClick write FOnButtonClick; - end; - - { TcxFontPanelButton } - - TcxFontPanelButton = class(TcxButton) - protected - procedure WndProc(var Message: TMessage); override; - end; - - { TFontPreviewPanel } - - TFontPreviewPanel = class(TCustomControl) - private - FLocked: Boolean; - FcxCanvas: TcxCanvas; - FFontStyle: TFontStyles; - FAlignment: TAlignment; - FShowEndEllipsis: Boolean; - FEdges: TcxBorders; - FBorderColor: TColor; - FFontName: string; - FWordWrap: Boolean; - FShowButtons: Boolean; - FLookAndFeel: TcxLookAndFeel; - FBoldButton: TcxFontPanelButton; - FItalicButton: TcxFontPanelButton; - FUnderLineButton: TcxFontPanelButton; - FStrikeOutButton: TcxFontPanelButton; - procedure SetLocked(Value: Boolean); - procedure SetAlignment(Value: TAlignment); - procedure SetShowEndEllipsis(Value: Boolean); - procedure SetEdges(Value: TcxBorders); - procedure SetFontName(Value: string); - procedure SetFontStyle(Value: TFontStyles); - procedure SetWordWrap(Value: Boolean); - procedure SetShowButtons(Value: Boolean); - procedure SetLookAndFeel(Value: TcxLookAndFeel); - function GetTextFlag(const AStartFlag: Longint): Longint; - procedure CreateButtons; - procedure SetFontStyleButtonsState; - procedure FontButtonsClickHandler(Sender: TObject); - protected - FontPreview: TcxFontPreview; - procedure Paint; override; - procedure CalculateFont(const ARect: TRect); virtual; - function CalculateFontStyle: TFontStyles; virtual; - property cxCanvas: TcxCanvas read FcxCanvas write FcxCanvas; - property Locked: Boolean read FLocked write SetLocked default False; - public - property BorderColor: TColor read FBorderColor write FBorderColor; - property Color default clWindow; - property Alignment: TAlignment read FAlignment write SetAlignment default taCenter; - property ShowEndEllipsis: Boolean read FShowEndEllipsis write SetShowEndEllipsis default True; - property Edges: TcxBorders read FEdges write SetEdges default [bLeft, bTop, bRight, bBottom]; - property FontStyle: TFontStyles read FFontStyle write SetFontStyle default []; - property FontName: string read FFontName write SetFontName; - property WordWrap: Boolean read FWordWrap write SetWordWrap default False; - property ShowButtons: Boolean read FShowButtons write SetShowButtons default True; - property LookAndFeel: TcxLookAndFeel read FLookAndFeel write SetLookAndFeel; - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure RealignButtons; - end; - - { TcxCustomFontNameComboBoxViewInfo } - - TcxCustomFontNameComboBoxViewInfo = class(TcxCustomTextEditViewInfo) - private - FCurrentIndex: Integer; - FIsTrueTypeFont: Boolean; - ImageRect: TRect; - FShowFontTypeIcon: TcxShowFontIconTypes; - protected - SaveClient: TRect; - property IsTrueTypeFont: Boolean read FIsTrueTypeFont write FIsTrueTypeFont; - property ShowFontTypeIcon: TcxShowFontIconTypes read FShowFontTypeIcon write FShowFontTypeIcon; - public - procedure Paint(ACanvas: TcxCanvas); override; - procedure Offset(DX, DY: Integer); override; - end; - - { TcxCustomFontNameComboBoxViewData } - - TcxCustomFontNameComboBoxProperties = class; - - TcxCustomFontNameComboBoxViewData = class(TcxCustomDropDownEditViewData) - private - function GetProperties: TcxCustomFontNameComboBoxProperties; - protected - function IsComboBoxStyle: Boolean; override; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); override; - procedure DisplayValueToDrawValue(const ADisplayValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - function GetEditContentSize(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; override; - property Properties: TcxCustomFontNameComboBoxProperties - read GetProperties; - end; - - { TcxFontNameComboBoxListBox } - - TcxCustomFontNameComboBox = class; - - TcxFontNameComboBoxListBox = class(TcxCustomComboBoxListBox) - private - function GetEdit: TcxCustomFontNameComboBox; - function IsSymbolFontType(AItemIndex: Integer): Boolean; - protected - function GetItem(Index: Integer): string; override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; - property Edit: TcxCustomFontNameComboBox read GetEdit; - public - function GetItemHeight(AIndex: Integer = -1): Integer; override; - function GetItemWidth(AIndex: Integer): Integer; override; - end; - - { TcxFontNameComboBoxLookupData } - - TcxFontNameComboBoxLookupData = class(TcxComboBoxLookupData) - private - FPanel: TFontPreviewPanel; - function GetFontName: string; - function GetPreviewText: string; - protected - function GetListBoxClass: TcxCustomEditListBoxClass; override; - procedure HandleSelectItem(Sender: TObject); override; - procedure InternalChangeCurrentMRUFontNamePosition; virtual; - public - destructor Destroy; override; - function CanResizeVisualArea(var NewSize: TSize; - AMaxHeight: Integer = 0; AMaxWidth: Integer = 0): Boolean; override; - function GetVisualAreaPreferredSize(AMaxHeight: Integer; AWidth: Integer = 0): TSize; override; - procedure Initialize(AVisualControlsParent: TWinControl); override; - procedure PositionVisualArea(const AClientRect: TRect); override; - end; - - { TcxCustomFontNameComboBoxProperties } - - TcxCustomFontNameComboBoxProperties = class(TcxCustomComboBoxProperties) - private - FFontLoader: TcxFontLoader; - FFontPreview: TcxFontPreview; - FFontTypes: TcxFontTypes; - FLoadFontComplete: Boolean; - FMaxMRUFonts: Byte; - FMRUFontNames: TcxMRUFontNameItems; - FShowFontTypeIcon: TcxShowFontIconTypes; - FUseOwnFont: Boolean; - FOnAddedMRUFont: TNotifyEvent; - FOnDeletedMRUFont: TcxDeleteMRUFontEvent; - FOnInternalLoadFontComplete: TNotifyEvent; - FOnLoadFontComplete: TNotifyEvent; - FOnMovedMRUFont: TNotifyEvent; - function GetFontItems: TStrings; - function GetFontTypes: TcxFontTypes; - function GetUseOwnFont: Boolean; - procedure SetMaxMRUFonts(Value: Byte); - procedure SetFontTypes(Value: TcxFontTypes); - procedure SetUseOwnFont(Value: Boolean); - procedure SetShowFontTypeIcon(Value: TcxShowFontIconTypes); - function FindItemByValue(const AEditValue: TcxEditValue): Integer; - procedure DeleteOverMRUFonts; - procedure FontLoaderCompleteHandler(Sender: TObject); - procedure FontLoaderDestroyHandler(Sender: TObject); - function GetItemTypes(Index: Integer): TcxFontTypes; - procedure SetFontPreview(Value: TcxFontPreview); - procedure ShutDownFontLoader; - protected - function FindLookupText(const AText: string): Boolean; override; - class function GetLookupDataClass: TcxInterfacedPersistentClass; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function AddMRUFontName( - const AFontName: TFontName): TcxMRUFontNameAction; virtual; - function DelMRUFontName( - const AFontName: TFontName): TcxMRUFontNameAction; virtual; - property ItemTypes[Index: Integer]: TcxFontTypes read GetItemTypes; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; override; - class function GetContainerClass: TcxContainerClass; override; - procedure GetFontNameComboBoxDisplayValue(const AEditValue: TcxEditValue; - out AItemIndex: Integer; out AText: string); - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - property LoadFontComplete: Boolean read FLoadFontComplete; - procedure LoadFontNames; virtual; - procedure Update(AProperties: TcxCustomEditProperties); override; - property FontItems: TStrings read GetFontItems; - property MRUFontNames: TcxMRUFontNameItems read FMRUFontNames; - // !!! - property FontPreview: TcxFontPreview read FFontPreview write SetFontPreview; - property FontTypes: TcxFontTypes read GetFontTypes write SetFontTypes - default [cxftTTF, cxftRaster, cxftDevice, cxftFixed, cxftSymbol]; - property MaxMRUFonts: Byte read FMaxMRUFonts write SetMaxMRUFonts - default 10; - property ShowFontTypeIcon: TcxShowFontIconTypes read FShowFontTypeIcon - write SetShowFontTypeIcon default [ftiShowInCombo, ftiShowInList]; - property UseOwnFont: Boolean read GetUseOwnFont write SetUseOwnFont - default False; - property OnAddedMRUFont: TNotifyEvent read FOnAddedMRUFont - write FOnAddedMRUFont; - property OnDeletedMRUFont: TcxDeleteMRUFontEvent read FOnDeletedMRUFont - write FOnDeletedMRUFont; - property OnLoadFontComplete: TNotifyEvent read FOnLoadFontComplete - write FOnLoadFontComplete; - property OnMovedMRUFont: TNotifyEvent read FOnMovedMRUFont - write FOnMovedMRUFont; - end; - - { TcxFontNameComboBoxProperties } - - TcxFontNameComboBoxProperties = class(TcxCustomFontNameComboBoxProperties) - published - property Alignment; - property AssignedValues; - property BeepOnError; - property ButtonGlyph; - property CharCase; - property ClearKey; - property DropDownAutoWidth; - property DropDownRows; - property DropDownSizeable; - property DropDownWidth; - property FontPreview; - property FontTypes; - property HideSelection; - property ImeMode; - property ImeName; - property ImmediateDropDown; - property ImmediatePost; - property ImmediateUpdateText; - property ItemHeight; - property MaxMRUFonts; - property OEMConvert; - property PopupAlignment; - property PostPopupValueOnTab; - property ReadOnly; - property ShowFontTypeIcon; - property UseOwnFont; - property ValidateOnEnter; - property OnAddedMRUFont; - property OnChange; - property OnCloseUp; - property OnDeletedMRUFont; - property OnDrawItem; - property OnEditValueChanged; - property OnInitPopup; - property OnLoadFontComplete; - property OnMeasureItem; - property OnMovedMRUFont; - property OnNewLookupDisplayText; - property OnPopup; - property OnValidate; - end; - - { TcxCustomFontNameComboBoxInnerEdit } - - TcxCustomFontNameComboBoxInnerEdit = class(TcxCustomComboBoxInnerEdit); - - { TcxCustomFontNameComboBox } - - TcxCustomFontNameComboBox = class(TcxCustomComboBox) - private - FDontCheckModifiedWhenUpdatingMRUList: Boolean; - FFontNameQueue: string; - FNeedsUpdateMRUList: Boolean; - function GetFontName: string; - procedure SetFontName(Value: string); - function GetLookupData: TcxFontNameComboBoxLookupData; - function GetProperties: TcxCustomFontNameComboBoxProperties; - function GetActiveProperties: TcxCustomFontNameComboBoxProperties; - procedure SetProperties(Value: TcxCustomFontNameComboBoxProperties); - procedure InternalLoadFontCompleteHandler(Sender: TObject); - procedure UpdateMRUList; - protected - procedure AfterPosting; override; - procedure InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); override; - function GetInnerEditClass: TControlClass; override; - function GetPopupWindowClientPreferredSize: TSize; override; - procedure Initialize; override; - procedure InitializePopupWindow; override; - procedure CloseUp(AReason: TcxEditCloseUpReason); override; - procedure SetItemIndex(Value: Integer); override; - property LookupData: TcxFontNameComboBoxLookupData read GetLookupData; - public - {$IFDEF CBUILDER10} - constructor Create(AOwner: TComponent); override; - {$ENDIF} - function Deactivate: Boolean; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function AddMRUFontName(const AFontName: TFontName): TcxMRUFontNameAction; - function DelMRUFontName(const AFontName: TFontName): TcxMRUFontNameAction; - property ActiveProperties: TcxCustomFontNameComboBoxProperties - read GetActiveProperties; - property FontName: string read GetFontName write SetFontName; - property Properties: TcxCustomFontNameComboBoxProperties read GetProperties - write SetProperties; - end; - - { TcxFontNameComboBox } - - TcxFontNameComboBox = class(TcxCustomFontNameComboBox) - private - function GetActiveProperties: TcxFontNameComboBoxProperties; - function GetProperties: TcxFontNameComboBoxProperties; - procedure SetProperties(Value: TcxFontNameComboBoxProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxFontNameComboBoxProperties - read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxFontNameComboBoxProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Text; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxFilterFontNameComboBoxHelper } - - TcxFilterFontNameComboBoxHelper = class(TcxFilterComboBoxHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - end; - -var - FTrueTypeFontBitmap, FNonTrueTypeFontBitmap : TBitmap; - -procedure GetFontSizes(const AFontName: string; AFontSizes: TStrings); -function GetFontTypes(const AFontName: string): TcxFontTypes; -function RealFontTypeToCxTypes(const AFontType: Integer): TcxFontTypes; - -implementation - -uses -{$IFDEF DELPHI6} - Types, -{$ENDIF} - cxListBox; - -{$R cxFontNameComboBox.res} - -type - TCanvasAccess = class(TCanvas); - -const - DropDownListTextOffset = 2; - NUM_SIZES = 16; - caiFontSizes: array[0 .. NUM_SIZES - 1] of Integer = - (8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72); - cxFontPreviewPanelDefaultHeight = 38; - IconBorderWidth = 4; - IconTextOffset = 2; - ItemSymbolFontExampleOffset = 4; - -var - FFontList: TStringList; - FFontSizes: TStrings; - vbFtt : Boolean; - -function RealFontTypeToCxTypes(const AFontType: Integer): TcxFontTypes; -begin - Result := []; - if (AFontType and TRUETYPE_FONTTYPE) <> 0 then - Result := Result + [cxftTTF]; - if (AFontType and RASTER_FONTTYPE) <> 0 then - Result := Result + [cxftRaster]; - if (AFontType and DEVICE_FONTTYPE) <> 0 then - Result := Result + [cxftDevice]; - if (AFontType and FIXEDPITCH_FONTTYPE) <> 0 then - Result := Result + [cxftFixed]; - if (AFontType and SYMBOL_FONTTYPE) <> 0 then - Result := Result + [cxftSymbol]; -end; - -function IsValidFontCondition(AFontTypes: TcxFontTypes; - const ALogFont: TLogFont; AFontType: Integer): Boolean; -begin - Result := - ((cxftTTF in AFontTypes) and (AFontType and TRUETYPE_FONTTYPE = TRUETYPE_FONTTYPE)) or - ((cxftDevice in AFontTypes) and (AFontType and DEVICE_FONTTYPE = DEVICE_FONTTYPE)) or - ((cxftRaster in AFontTypes) and (AFontType and RASTER_FONTTYPE = RASTER_FONTTYPE)) or - ((cxftFixed in AFontTypes) and (ALogFont.lfPitchAndFamily and FIXED_PITCH = FIXED_PITCH)) or - ((cxftSymbol in AFontTypes) and (ALogFont.lfCharSet = SYMBOL_CHARSET)); -end; - -function EnumFontsProc(var ALogFont: TLogFont; var ATextMetric: TTextMetric; - AFontType: DWORD; AData: LPARAM): Integer; stdcall; -begin - if ALogFont.lfCharSet = SYMBOL_CHARSET then - AFontType := AFontType or SYMBOL_FONTTYPE; - if ALogFont.lfPitchAndFamily = FIXED_PITCH then - AFontType := AFontType or FIXEDPITCH_FONTTYPE; - FFontList.AddObject(ALogFont.lfFaceName, TObject(Integer(AFontType))); - Result := 0; -end; - -function EnumFontsProc2(AFontLoader: TcxFontLoader; const ALogFont: TLogFont; - AFontType: DWORD): Integer; -var - AFaceName: string; -begin - AFaceName := ALogFont.lfFaceName; - if (AFontLoader.FontList.IndexOf(AFaceName) = -1) and - IsValidFontCondition(AFontLoader.FFontTypes, ALogFont, AFontType) then - begin - if ALogFont.lfCharSet = SYMBOL_CHARSET then - AFontType := AFontType or SYMBOL_FONTTYPE; - if ALogFont.lfPitchAndFamily = FIXED_PITCH then - AFontType := AFontType or FIXEDPITCH_FONTTYPE; - AFontLoader.FontList.AddObject(AFaceName, TObject(Integer(AFontType))); - end; - if AFontLoader.Terminated then - Result := 0 - else - Result := 1; -end; - -function EnumFontsProc1(var ALogFont: TLogFont; - var ATextMetric: TTextMetric; AFontType: DWORD; - AData: LPARAM): Integer; stdcall; -begin - Result := EnumFontsProc2(TcxFontLoader(AData), ALogFont, AFontType); -end; - -procedure InitLogFont(var ALogFont: TLogFont; const AFontName: string); -begin - FillChar(ALogFont, SizeOf(ALogFont), 0); - StrPCopy(ALogFont.lfFaceName, AFontName); - ALogFont.lfCharset := DEFAULT_CHARSET; -end; - -function GetFontTypes(const AFontName: string): TcxFontTypes; - - procedure EnumFonts; - var - ADC: HDC; - ALogFont: TLogFont; - begin - ADC := GetDC(0); - try - InitLogFont(ALogFont, AFontName); - EnumFontFamiliesEx(ADC, ALogFont, @EnumFontsProc, 0, 0); - finally - ReleaseDC(0, ADC); - end; - end; - -begin - FFontList := TStringList.Create; - try - Result := []; - EnumFonts; - if FFontList.Count > 0 then - Result := RealFontTypeToCxTypes(Integer(FFontList.Objects[0])); - finally - FFontList.Free; - end; -end; - -function SetFontSizes(var ALogFont: TLogFont; var ATextMetric: TTextMetric; - AFontType: DWORD; AData: LPARAM): Integer; stdcall; -var - S: string; -begin - S := IntToStr(((ATextMetric.tmHeight - ATextMetric.tmInternalLeading) * 72 + - ATextMetric.tmDigitizedAspectX div 2) div ATextMetric.tmDigitizedAspectY); - if FFontSizes.IndexOf(S) = -1 then - FFontSizes.Add(S); - Result := 1; -end; - -function SetFTypeFlag(var ALogFont: TLogFont; var ATextMetric: TTextMetric; - AFontType: DWORD; AData: LPARAM): Integer; stdcall; -begin - vbFtt := (ATextMetric.tmPitchAndFamily and TMPF_TRUETYPE) = TMPF_TRUETYPE; - Result := 0; -end; - -procedure GetFontSizes(const AFontName: string; AFontSizes: TStrings); - - function IsTrueTypeFont(ADC: HDC; var ALogFont: TLogFont): Boolean; - begin - EnumFontFamiliesEx(ADC, ALogFont, @SetFTypeFlag, 0, 0); - Result := vbFtt; - end; - -var - ADC: HDC; - ALogFont: TLogFont; - I: Integer; -begin - ADC := GetDC(0); - try - InitLogFont(ALogFont, AFontName); - FFontSizes := AFontSizes; - FFontSizes.Clear; - if IsTrueTypeFont(ADC, ALogFont) then - for I := 0 to NUM_SIZES - 1 do - AFontSizes.Add(Format('%d',[caiFontSizes[I]])) - else - EnumFontFamiliesEx(ADC, ALogFont, @SetFontSizes, 0, 0); - finally - ReleaseDC(0, ADC); - end; -end; - -{ TcxFontLoader } - -constructor TcxFontLoader.Create(const AFontTypes: TcxFontTypes); -begin - FFontTypes := AFontTypes; - FontList := TStringList.Create; - inherited Create(True); - FreeOnTerminate := True; -end; - -destructor TcxFontLoader.Destroy; -begin - Synchronize(DoCompleteEvent); - if Assigned(FontList) then - FreeAndNil(FontList); - Synchronize(DoDestroyEvent); - inherited Destroy; -end; - -procedure TcxFontLoader.DoCompleteEvent; -begin - if Assigned(OnCompleteThread) then OnCompleteThread(Self); -end; - -procedure TcxFontLoader.DoDestroyEvent; -begin - if Assigned(OnDestroyThread) then OnDestroyThread(Self); -end; - -procedure TcxFontLoader.Execute; - - procedure EnumFonts; - var - ADC: HDC; - ALogFont: TLogFont; - begin - ADC := GetDC(0); - try - InitLogFont(ALogFont, ''); - EnumFontFamiliesEx(ADC, ALogFont, @EnumFontsProc1, LPARAM(Self), 0); - finally - ReleaseDC(0, ADC); - end; - end; - -begin - try - FontList.BeginUpdate; - FontList.Clear; - EnumFonts; - TStringList(FontList).Sort; - finally - FontList.EndUpdate; - end; -end; - -{ TcxFontPreview } - -constructor TcxFontPreview.Create(AOwner: TPersistent); -begin - inherited Create; - FOwner := AOwner; - FUpdateCount := 0; - FModified := False; - FFontStyle := []; - FVisible := True; - FPreviewType := cxfpFontName; - FPreviewText := ''; - FAlignment := taCenter; - FShowEndEllipsis := True; - FColor := clWindow; - FWordWrap := False; - FShowButtons := True; -end; - -destructor TcxFontPreview.Destroy; -begin - FIsDestroying := True; - inherited Destroy; -end; - -procedure TcxFontPreview.Assign(Source: TPersistent); -begin - if Source is TcxFontPreview then - begin - BeginUpdate; - try - with Source as TcxFontPreview do - begin - Self.Visible := Visible; - Self.FontStyle := FontStyle; - Self.PreviewType := PreviewType; - Self.PreviewText := PreviewText; - Self.Alignment := Alignment; - Self.ShowEndEllipsis := ShowEndEllipsis; - Self.Color := Color; - Self.WordWrap := WordWrap; - Self.ShowButtons := ShowButtons; - Self.OnButtonClick := OnButtonClick; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxFontPreview.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -procedure TcxFontPreview.Changed; -begin - if FUpdateCount = 0 then - begin - if Assigned(FOnChanged) and not IsDestroying then - FOnChanged(Self); - FModified := False; - end - else - FModified := True; -end; - -procedure TcxFontPreview.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TcxFontPreview.EndUpdate; -begin - if FUpdateCount <> 0 then - begin - Dec(FUpdateCount); - if FModified then Changed; - end; -end; - -function TcxFontPreview.IsDestroying: Boolean; -begin - Result := FIsDestroying; -end; - -procedure TcxFontPreview.SetFontStyle(Value: TFontStyles); -begin - if FFontStyle <> Value then - begin - FFontStyle := Value; - Changed; - end; -end; - -procedure TcxFontPreview.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - FVisible := Value; - Changed; - end; -end; - -procedure TcxFontPreview.SetPreviewType(Value: TcxFontPreviewType); -begin - if FPreviewType <> Value then - begin - FPreviewType := Value; - Changed; - end; -end; - -procedure TcxFontPreview.SetPreviewText(Value: TCaption); -begin - if FPreviewText <> Value then - begin - FPreviewText := Value; - Changed; - end; -end; - -procedure TcxFontPreview.SetAlignment(Value: TAlignment); -begin - if FAlignment <> Value then - begin - FAlignment := Value; - Changed; - end; -end; - -procedure TcxFontPreview.SetShowEndEllipsis(Value: Boolean); -begin - if FShowEndEllipsis <> Value then - begin - FShowEndEllipsis := Value; - Changed; - end; -end; - -procedure TcxFontPreview.SetColor(Value: TColor); -begin - if FColor <> Value then - begin - FColor := Value; - Changed; - end; -end; - -procedure TcxFontPreview.SetWordWrap(Value: Boolean); -begin - if FWordWrap <> Value then - begin - FWordWrap := Value; - Changed; - end; -end; - -procedure TcxFontPreview.SetShowButtons(Value: Boolean); -begin - if FShowButtons <> Value then - begin - FShowButtons := Value; - Changed; - end; -end; -{ TcxFontPreview } - -{ TcxFontPanelButton } -procedure TcxFontPanelButton.WndProc(var Message: TMessage); -begin - inherited; - case Message.Msg of - WM_LBUTTONDOWN, WM_LBUTTONUP: Dispatch(Message); - end; -end; - -{ TFontPreviewPanel } - -constructor TFontPreviewPanel.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents, - csSetCaption, csOpaque, csDoubleClicks, csReplicatable]; - Width := 100; - Height := 40; - FAlignment := taCenter; - FShowEndEllipsis := True; - FShowButtons := True; - FEdges := [bLeft, bTop, bRight, bBottom]; - FBorderColor := clWindowFrame; - FWordWrap := False; - FFontStyle := []; - Color := clWindow; - UseDockManager := True; - FcxCanvas := TcxCanvas.Create(Canvas); - FLookAndFeel := TcxLookAndFeel.Create(Self); - CreateButtons; -end; - -destructor TFontPreviewPanel.Destroy; -begin - FreeAndNil(FStrikeOutButton); - FreeAndNil(FUnderLineButton); - FreeAndNil(FItalicButton); - FreeAndNil(FBoldButton); - FreeAndNil(FLookAndFeel); - FreeAndNil(FcxCanvas); - inherited; -end; - -procedure TFontPreviewPanel.CreateButtons; - - procedure InitButton(AButton: TcxFontPanelButton; const AButtonSize: TSize); - begin - AButton.Font.Name := 'Arial'; - AButton.Font.Size := 8; - AButton.Height := AButtonSize.cx; - AButton.LookAndFeel.MasterLookAndFeel := LookAndFeel; - AButton.UseSystemPaint := True; - AButton.Width := AButtonSize.cy; - AButton.Parent := Self; - AButton.OnClick := FontButtonsClickHandler; - end; - -var - AButtonSize: TSize; -begin - FBoldButton := TcxFontPanelButton.Create(Self); - - FBoldButton.Font.Name := 'Arial'; - FBoldButton.Font.Size := 8; - AButtonSize.cx := NonCanvasTextWidth(FBoldButton.Font, 'B') + 8; - AButtonSize.cy := NonCanvasTextHeight(FBoldButton.Font) + 2; - - FBoldButton.Caption := 'B'; - FBoldButton.Tag := 0; - InitButton(FBoldButton, AButtonSize); - - FItalicButton := TcxFontPanelButton.Create(Self); - FItalicButton.Caption := 'I'; - FItalicButton.Tag := 1; - InitButton(FItalicButton, AButtonSize); - - FUnderLineButton := TcxFontPanelButton.Create(Self); - FUnderLineButton.Caption := 'U'; - FUnderLineButton.Tag := 2; - InitButton(FUnderLineButton, AButtonSize); - - FStrikeOutButton := TcxFontPanelButton.Create(Self); - FStrikeOutButton.Caption := 'S'; - FStrikeOutButton.Tag := 3; - InitButton(FStrikeOutButton, AButtonSize); -end; - -procedure TFontPreviewPanel.RealignButtons; -begin - FBoldButton.Visible := ShowButtons; - FItalicButton.Visible := ShowButtons; - FUnderLineButton.Visible := ShowButtons; - FStrikeOutButton.Visible := ShowButtons; - if ShowButtons = True then - begin - FBoldButton.Top := Height - FBoldButton.Height - 2; - FItalicButton.Top := FBoldButton.Top; - FUnderLineButton.Top := FBoldButton.Top; - FStrikeOutButton.Top := FBoldButton.Top; - - FStrikeOutButton.Left := Width - FStrikeOutButton.Width - 1; - FUnderLineButton.Left := FStrikeOutButton.Left - FUnderLineButton.Width - 1; - FItalicButton.Left := FUnderLineButton.Left - FItalicButton.Width - 1; - FBoldButton.Left := FItalicButton.Left - FBoldButton.Width - 1; - end; -end; - -procedure TFontPreviewPanel.SetFontStyleButtonsState; -begin - if (fsBold in FFontStyle) then - begin - FBoldButton.Colors.Normal := GetLightSelColor; - FBoldButton.Font.Style := [fsBold]; - end - else - begin - FBoldButton.Colors.Normal := clDefault; - FBoldButton.Font.Style := []; - end; - if (fsItalic in FFontStyle) then - begin - FItalicButton.Colors.Normal := GetLightSelColor; - FItalicButton.Font.Style := [fsBold]; - end - else - begin - FItalicButton.Colors.Normal := clDefault; - FItalicButton.Font.Style := []; - end; - if (fsUnderLine in FFontStyle) then - begin - FUnderLineButton.Colors.Normal := GetLightSelColor; - FUnderLineButton.Font.Style := [fsBold]; - end - else - begin - FUnderLineButton.Colors.Normal := clDefault; - FUnderLineButton.Font.Style := []; - end; - if (fsStrikeOut in FFontStyle) then - begin - FStrikeOutButton.Colors.Normal := GetLightSelColor; - FStrikeOutButton.Font.Style := [fsBold]; - end - else - begin - FStrikeOutButton.Colors.Normal := clDefault; - FStrikeOutButton.Font.Style := []; - end; -end; - -procedure TFontPreviewPanel.Paint; -var - FRect: TRect; -begin - FRect := GetClientRect; - with cxCanvas do - begin - Brush.Color := Color; - FillRect(FRect); - DrawComplexFrame(FRect, FBorderColor, FBorderColor, FEdges); - InflateRect(FRect, -2, -2); - Brush.Style := bsClear; - CalculateFont(FRect); - cxDrawText(Canvas.Handle, Caption, FRect, GetTextFlag(DT_NOPREFIX)); - end; -end; - -procedure TFontPreviewPanel.CalculateFont(const ARect: TRect); -var - FTextRect: TRect; -begin - if FontName = '' then - Canvas.Font.Name := 'Arial' - else - Canvas.Font.Name := FontName; - Canvas.Font.Size := 8; - Canvas.Font.Style := CalculateFontStyle; - if Trim(Caption) = '' then Exit; - FTextRect := Rect(ARect.Left, ARect.Top, ARect.Right - 1, ARect.Top + 1); - while (RectHeight(FTextRect) <= RectHeight(ARect)) and - (RectWidth(FTextRect) <= RectWidth(ARect)) do - begin - DrawText(Canvas.Handle, PChar(Caption), - Length(Caption), FTextRect, GetTextFlag(DT_CALCRECT or DT_NOPREFIX)); - if (RectHeight(FTextRect) <= RectHeight(ARect)) and - (RectWidth(FTextRect) <= RectWidth(ARect)) then - Canvas.Font.Size := Canvas.Font.Size + 1 - else - if Canvas.Font.Size > 8 then - Canvas.Font.Size := Canvas.Font.Size - 1; - end; -end; - -function TFontPreviewPanel.GetTextFlag(const AStartFlag: Longint): Longint; -const - ShowEndEllipsisArray: array[Boolean] of Integer = (0, DT_END_ELLIPSIS); - WordWrapArray: array[Boolean] of Integer = (0, DT_WORDBREAK); -begin - Result := AStartFlag or SystemAlignmentsHorz[Alignment] or DT_VCENTER or - ShowEndEllipsisArray[ShowEndEllipsis] or WordWrapArray[WordWrap]; -end; - -function TFontPreviewPanel.CalculateFontStyle: TFontStyles; -begin - Result := FFontStyle; -end; - -procedure TFontPreviewPanel.FontButtonsClickHandler(Sender: TObject); -begin - case (TComponent(Sender).Tag) of - 0: if (fsBold in FFontStyle) then - FFontStyle := FFontStyle - [fsBold] - else - FFontStyle := FFontStyle + [fsBold]; - 1: if (fsItalic in FFontStyle) then - FFontStyle := FFontStyle - [fsItalic] - else - FFontStyle := FFontStyle + [fsItalic]; - 2: if (fsUnderLine in FFontStyle) then - FFontStyle := FFontStyle - [fsUnderLine] - else - FFontStyle := FFontStyle + [fsUnderLine]; - 3: if (fsStrikeOut in FFontStyle) then - FFontStyle := FFontStyle - [fsStrikeOut] - else - FFontStyle := FFontStyle + [fsStrikeOut]; - end; - - FontPreview.FontStyle := FFontStyle; - if Assigned(FontPreview.OnButtonClick) then - FontPreview.OnButtonClick(Self, TcxFontButtonType((Sender as TComponent).Tag)); - - if TcxFontPanelButton(Sender).Colors.Normal <> clDefault then - begin - TcxFontPanelButton(Sender).Colors.Normal := clDefault; - TcxFontPanelButton(Sender).Font.Style := []; - end else - begin - TcxFontPanelButton(Sender).Colors.Normal := GetLightSelColor; - TcxFontPanelButton(Sender).Font.Style := [fsBold]; - end; - - Invalidate; -end; - -procedure TFontPreviewPanel.SetLocked(Value: Boolean); -begin - FLocked := Value; - if FLocked = False then Invalidate; -end; - -procedure TFontPreviewPanel.SetAlignment(Value: TAlignment); -begin - FAlignment := Value; - if FLocked = False then Invalidate; -end; - -procedure TFontPreviewPanel.SetShowEndEllipsis(Value: Boolean); -begin - FShowEndEllipsis := Value; - if FLocked = False then Invalidate; -end; - -procedure TFontPreviewPanel.SetEdges(Value: TcxBorders); -begin - FEdges := Value; - if FLocked = False then Invalidate; -end; - -procedure TFontPreviewPanel.SetFontName(Value: string); -begin - FFontName := Value; - if FLocked = False then Invalidate; -end; - -procedure TFontPreviewPanel.SetFontStyle(Value: TFontStyles); -begin - FFontStyle := Value; - SetFontStyleButtonsState; -end; - -procedure TFontPreviewPanel.SetWordWrap(Value: Boolean); -begin - FWordWrap := Value; - if FLocked = False then Invalidate; -end; - -procedure TFontPreviewPanel.SetShowButtons(Value: Boolean); -begin - if FShowButtons <> Value then - begin - FShowButtons := Value; - RealignButtons; - end; -end; - -procedure TFontPreviewPanel.SetLookAndFeel(Value: TcxLookAndFeel); -begin - FLookAndFeel.Assign(Value); - RealignButtons; -end; - -{ TcxMRUFontNameItem } - -procedure TcxMRUFontNameItem.Assign(Source: TPersistent); -begin - if Source is TcxMRUFontNameItem then - begin - FontName := TcxMRUFontNameItem(Source).FontName; - Tag := TcxMRUFontNameItem(Source).Tag; - end - else - inherited Assign(Source); -end; - -function TcxMRUFontNameItem.IsTagStored: Boolean; -begin - Result := FTag <> 0; -end; - -procedure TcxMRUFontNameItem.SetFontName(const Value: TFontName); -begin - if FFontName <> Value then - begin - FFontName := Value; - Changed(True); - end; -end; - -{ TcxMRUFontNameItems } - -constructor TcxMRUFontNameItems.Create(AOwner: TPersistent; ItemClass: TCollectionItemClass); -begin - inherited Create(AOwner, ItemClass); -end; - -destructor TcxMRUFontNameItems.Destroy; -begin - inherited Destroy; -end; - -function TcxMRUFontNameItems.GetItems(Index: Integer): TcxMRUFontNameItem; -begin - Result := TcxMRUFontNameItem(inherited Items[Index]); -end; - -procedure TcxMRUFontNameItems.SetItems(Index: Integer; const Value: TcxMRUFontNameItem); -begin - inherited Items[Index] := Value; -end; - -procedure TcxMRUFontNameItems.Update(Item: TCollectionItem); -begin - TcxCustomFontNameComboBoxProperties(Owner).Changed; -end; - -{$IFNDEF DELPHI6} -function TcxMRUFontNameItems.Owner: TPersistent; -begin - Result := GetOwner; -end; -{$ENDIF} - -function TcxMRUFontNameItems.Add: TcxMRUFontNameItem; -begin - Result := TcxMRUFontNameItem(inherited Add); -end; - -function TcxMRUFontNameItems.Insert(Index: Integer): TcxMRUFontNameItem; -begin - Result := TcxMRUFontNameItem(inherited Insert(Index)); -end; - -procedure TcxMRUFontNameItems.Move(CurIndex, NewIndex: Integer); -var - FNewFontNameItem, FOldFontNameItem: TcxMRUFontNameItem; -begin - if CurIndex = NewIndex then Exit; - FOldFontNameItem := Items[CurIndex]; - FNewFontNameItem := Insert(NewIndex); - FNewFontNameItem.Assign(FOldFontNameItem); - FOldFontNameItem.Free; -end; - -function TcxMRUFontNameItems.AddMRUFontName(const AFontName: TFontName): TcxMRUFontNameItem; -begin - Result := nil; - if (AFontName = '') or (FindFontName(AFontName) <> nil) then Exit; - Result := Add; - Result.FontName := AFontName; -end; - -function TcxMRUFontNameItems.InsertMRUFontName(Index: Integer;const AFontName: TFontName): TcxMRUFontNameItem; -begin - Result := nil; - if (AFontName = '') or (FindFontName(AFontName) <> nil) then Exit; - Result := Insert(Index); - Result.FontName := AFontName; -end; - -function TcxMRUFontNameItems.FindFontName(const AFontName: TFontName): TcxMRUFontNameItem; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - begin - if Items[I].FontName = AFontName then - begin - Result := Items[I]; - Break; - end; - end; -end; - -{ TcxCustomFontNameComboBoxViewInfo } -procedure TcxCustomFontNameComboBoxViewInfo.Paint(ACanvas: TcxCanvas); -var - ACurrentBitmap: TBitmap; -begin - inherited Paint(ACanvas); - if (FCurrentIndex <> -1) and (ftiShowInCombo in ShowFontTypeIcon) then - begin - if IsTrueTypeFont then - ACurrentBitmap := FTrueTypeFontBitmap - else - ACurrentBitmap := FNonTrueTypeFontBitmap; - if ACurrentBitmap <> nil then - DrawGlyph(ACanvas, ImageRect.Left, ImageRect.Top, - ACurrentBitmap, Enabled); - end; -end; - -procedure TcxCustomFontNameComboBoxViewInfo.Offset(DX, DY: Integer); -begin - inherited; - OffsetRect(ImageRect, DX, DY); -end; - -{ TcxCustomFontNameComboBoxViewData } - -procedure TcxCustomFontNameComboBoxViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); - - function GetIconOffset(AClientRect: TRect): TPoint; - begin - Result.Y := (RectHeight(AClientRect) - FTrueTypeFontBitmap.Height) div 2; - if IsInplace then - Result.X := IconBorderWidth - cxInplaceEditOffset - else - Result.X := IconBorderWidth; - end; - - procedure CalculateImageRect(AViewInfo: TcxCustomFontNameComboBoxViewInfo); - begin - AViewInfo.ImageRect := AViewInfo.ClientRect; - if FTrueTypeFontBitmap = nil then - Exit; - AViewInfo.ImageRect.Right := - AViewInfo.ImageRect.Left + FTrueTypeFontBitmap.Width; - AViewInfo.ImageRect.Bottom := - AViewInfo.ImageRect.Top + FTrueTypeFontBitmap.Height; - cxOffsetRect(AViewInfo.ImageRect, - GetIconOffset(AViewInfo.ClientRect)); - end; - -var - AEditViewInfo: TcxCustomFontNameComboBoxViewInfo; -begin - if IsRectEmpty(ABounds) then - begin - inherited; - Exit; - end; - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - if (ABounds.Right = MaxInt) or (ABounds.Bottom = MaxInt) then Exit; - - AEditViewInfo := TcxCustomFontNameComboBoxViewInfo(AViewInfo); - AEditViewInfo.ShowFontTypeIcon := Properties.ShowFontTypeIcon; - - if (ftiShowInCombo in AEditViewInfo.ShowFontTypeIcon) then - begin - CalculateImageRect(AEditViewInfo); - AEditViewInfo.TextRect.Left := AEditViewInfo.ImageRect.Right + - IconBorderWidth + IconTextOffset; - end; - - if not IsInplace then - AEditViewInfo.DrawSelectionBar := False; -end; - -procedure TcxCustomFontNameComboBoxViewData.DisplayValueToDrawValue( - const ADisplayValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -var - AViewInfoAccess: TcxCustomFontNameComboBoxViewInfo; -begin - AViewInfoAccess := TcxCustomFontNameComboBoxViewInfo(AViewInfo); - Properties.GetFontNameComboBoxDisplayValue(ADisplayValue, - AViewInfoAccess.FCurrentIndex, AViewInfoAccess.Text); - if PreviewMode then - AViewInfoAccess.Text := ''; - if AViewInfoAccess.FCurrentIndex <> -1 then - AViewInfoAccess.IsTrueTypeFont := - (cxftTTF in Properties.ItemTypes[AViewInfoAccess.FCurrentIndex]); -end; - -procedure TcxCustomFontNameComboBoxViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -begin - PrepareSelection(AViewInfo); - DisplayValueToDrawValue(AEditValue, AViewInfo); - DoOnGetDisplayText(string(TcxCustomTextEditViewInfo(AViewInfo).Text)); -end; - -function TcxCustomFontNameComboBoxViewData.GetEditContentSize(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; -var - FItemIndex: Integer; -begin - Result := inherited GetEditContentSize(ACanvas, AEditValue, AEditSizeProperties); - FItemIndex := Properties.FindItemByValue(AEditValue); - if (FItemIndex >= 0) and (ftiShowInCombo in Properties.ShowFontTypeIcon) then - Result.cx := Result.cx + FTrueTypeFontBitmap.Width + 4; -end; - -function TcxCustomFontNameComboBoxViewData.IsComboBoxStyle: Boolean; -begin - Result := True; -end; - -function TcxCustomFontNameComboBoxViewData.GetProperties: TcxCustomFontNameComboBoxProperties; -begin - Result := TcxCustomFontNameComboBoxProperties(FProperties); -end; - -{ TcxFontNameComboBoxListBox } - -function TcxFontNameComboBoxListBox.GetItemHeight(AIndex: Integer = -1): Integer; -begin - with Edit.ActiveProperties do - begin - if ItemHeight > 0 then - Result := ItemHeight - else - begin - Result := inherited GetItemHeight; - if UseOwnFont then - Inc(Result, 4) - else - if Result <= FTrueTypeFontBitmap.Height then - Result := FTrueTypeFontBitmap.Height + 4; - end; - if (AIndex >= 0) and Edit.IsOnMeasureItemEventAssigned then - Edit.DoOnMeasureItem(AIndex, Canvas, Result); - if AIndex = (FMRUFontNames.Count - 1) then - Inc(Result, MRUDelimiterWidth); - end; -end; - -function TcxFontNameComboBoxListBox.GetItemWidth(AIndex: Integer): Integer; -var - AFontName, ACanvasFontName: string; - ACanvasFontCharSet: TFontCharSet; -begin - if Edit.ActiveProperties.UseOwnFont then - begin - Canvas.Font.Assign(Font); - ACanvasFontName := Canvas.Font.Name; - ACanvasFontCharSet := Canvas.Font.Charset; - try - Result := 0; - AFontName := GetItem(AIndex); - if IsSymbolFontType(AIndex) then - begin - Canvas.Font.Name := 'Arial'; - Result := Canvas.TextWidth(AFontName); - Inc(Result, ItemSymbolFontExampleOffset); - Canvas.Font.Charset := SYMBOL_CHARSET; - end; - Canvas.Font.Name := AFontName; - Inc(Result, Canvas.TextWidth(AFontName)); - finally - Canvas.Font.Name := ACanvasFontName; - Canvas.Font.Charset := ACanvasFontCharSet; - end; - end - else - Result := inherited GetItemWidth(AIndex); -end; - -function TcxFontNameComboBoxListBox.GetItem(Index: Integer): string; -begin - Result := Edit.ActiveProperties.LookupItems[Index]; -end; - -procedure TcxFontNameComboBoxListBox.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - AItemIndex: Integer; -begin - inherited MouseUp(Button, Shift, X, Y); - if Button <> mbLeft then - Exit; - AItemIndex := ItemAtPos(Point(X, Y), True); - if AItemIndex <> -1 then - begin - SetCaptureControl(nil); - ItemIndex := AItemIndex; - Edit.CloseUp(crEnter); - end; -end; - -procedure TcxFontNameComboBoxListBox.DrawItem(Index: Integer; Rect: TRect; - State: TOwnerDrawState); - - procedure DrawItemText; - var - AFlags: Longint; - AFontBitmap: TBitmap; - AText: string; - ATextRect: TRect; - begin - ATextRect := Rect; - if Index = Edit.ActiveProperties.FMRUFontNames.Count - 1 then - Dec(ATextRect.Bottom, MRUDelimiterWidth); - - if cxftTTF in Edit.ActiveProperties.ItemTypes[Index] then - AFontBitmap := FTrueTypeFontBitmap - else - AFontBitmap := FNonTrueTypeFontBitmap; - if (ftiShowInList in Edit.ActiveProperties.ShowFontTypeIcon) and (AFontBitmap <> nil) then - begin - Canvas.Draw(ATextRect.Left + IconBorderWidth, ATextRect.Top + - (ATextRect.Bottom - ATextRect.Top - AFontBitmap.Height) div 2, AFontBitmap); - Inc(ATextRect.Left, AFontBitmap.Width + IconBorderWidth * 2 + IconTextOffset); - end - else - Inc(ATextRect.Left, DropDownListTextOffset); - - AText := GetItem(Index); - if Edit.ActiveProperties.UseOwnFont then - Canvas.Font.Name := AText; - AFlags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_LEFT or DT_NOPREFIX or DT_VCENTER); - Canvas.Brush.Style := bsClear; - if Edit.ActiveProperties.UseOwnFont and IsSymbolFontType(Index) then - begin - Canvas.Font.Name := 'Arial'; - DrawText(Canvas.Handle, PChar(AText), Length(AText), - ATextRect, AFlags); - Inc(ATextRect.Left, Canvas.TextWidth(AText) + ItemSymbolFontExampleOffset); - Canvas.Font.Name := AText; - Canvas.Font.Charset := SYMBOL_CHARSET; - AFlags := AFlags and not DT_END_ELLIPSIS; - end; - DrawText(Canvas.Handle, PChar(AText), Length(AText), - ATextRect, AFlags); - Canvas.Brush.Style := bsSolid; - end; - -begin - SaveCanvasParametersForFocusRect; - try - if DoDrawItem(Index, Rect, State) then - Exit; - Canvas.FillRect(Rect); - DrawItemText; - if Index = Edit.ActiveProperties.FMRUFontNames.Count - 1 then - DrawMRUDelimiter(Canvas.Canvas, Rect, odSelected in State); - finally - RestoreCanvasParametersForFocusRect; - end; -end; - -function TcxFontNameComboBoxListBox.GetEdit: TcxCustomFontNameComboBox; -begin - Result := TcxCustomFontNameComboBox(inherited Edit); -end; - -function TcxFontNameComboBoxListBox.IsSymbolFontType(AItemIndex: Integer): Boolean; -begin - Result := Integer(Edit.ActiveProperties.Items.Objects[AItemIndex]) and SYMBOL_FONTTYPE <> 0; -end; - -{ TcxFontNameComboBoxLookupData } - -destructor TcxFontNameComboBoxLookupData.Destroy; -begin - FPanel := nil; - inherited Destroy; -end; - -function TcxFontNameComboBoxLookupData.CanResizeVisualArea(var NewSize: TSize; - AMaxHeight: Integer = 0; AMaxWidth: Integer = 0): Boolean; -var - AFontPreviewPanelHeight: Integer; -begin - if TcxCustomFontNameComboBoxProperties(ActiveProperties).FontPreview.Visible then - AFontPreviewPanelHeight := cxFontPreviewPanelDefaultHeight - else - AFontPreviewPanelHeight := 0; - Result := (AMaxHeight = 0) or (AMaxHeight > AFontPreviewPanelHeight); - if Result then - begin - if AMaxHeight > 0 then - Dec(AMaxHeight, AFontPreviewPanelHeight); - NewSize.cy := NewSize.cy - AFontPreviewPanelHeight; - Result := inherited CanResizeVisualArea(NewSize, AMaxHeight); - NewSize.cy := NewSize.cy + AFontPreviewPanelHeight; - end; -end; - -function TcxFontNameComboBoxLookupData.GetVisualAreaPreferredSize(AMaxHeight: Integer; AWidth: Integer = 0): TSize; -var - AScrollWidth, AWidthDelta: Integer; -begin - Result := inherited GetVisualAreaPreferredSize(AMaxHeight, AWidth); - if TcxCustomFontNameComboBoxProperties(ActiveProperties).FontPreview.Visible then - Result.cy := Result.cy + cxFontPreviewPanelDefaultHeight; - if (ftiShowInCombo in TcxCustomFontNameComboBoxProperties(ActiveProperties).ShowFontTypeIcon) then - AWidthDelta := FTrueTypeFontBitmap.Width + IconBorderWidth * 2 + IconTextOffset - else - AWidthDelta := DropDownListTextOffset; - AScrollWidth := List.ScrollWidth; - List.ScrollWidth := 0; - List.ScrollWidth := AScrollWidth + AWidthDelta; - Result.cx := Result.cx + AWidthDelta; -end; - -procedure TcxFontNameComboBoxLookupData.Initialize(AVisualControlsParent: TWinControl); -begin - inherited Initialize(AVisualControlsParent); - if TcxCustomFontNameComboBoxProperties(ActiveProperties).FontPreview.Visible and - Assigned(AVisualControlsParent) and AVisualControlsParent.HandleAllocated then - begin - if not Assigned(FPanel) then - begin - FPanel := TFontPreviewPanel.Create(AVisualControlsParent); - FPanel.FontPreview := TcxCustomFontNameComboBoxProperties(ActiveProperties).FontPreview; - FPanel.LookAndFeel.MasterLookAndFeel := TcxCustomFontNameComboBox(Edit).PopupControlsLookAndFeel; - end; - - FPanel.Locked := True; - try - FPanel.Edges := [bBottom]; - FPanel.Caption := GetPreviewText; - FPanel.FontName := GetFontName; - FPanel.Height := cxFontPreviewPanelDefaultHeight; - with TcxCustomFontNameComboBoxProperties(ActiveProperties) do - begin - FPanel.FontStyle := FontPreview.FontStyle; - FPanel.Color := FontPreview.Color; - FPanel.ShowEndEllipsis := FontPreview.ShowEndEllipsis and - (FontPreview.PreviewType <> cxfpFontName); - FPanel.Alignment := FontPreview.Alignment; - FPanel.WordWrap := FontPreview.WordWrap and (FontPreview.PreviewType <> cxfpFontName); - FPanel.ShowButtons := FontPreview.ShowButtons; - end; - FPanel.Parent := AVisualControlsParent; - FPanel.Visible := True; - finally - FPanel.Locked := False; - end; - end - else - if Assigned(FPanel) then FPanel.Visible := False; -end; - -procedure TcxFontNameComboBoxLookupData.PositionVisualArea(const AClientRect: TRect); -var - R: TRect; -begin - inherited PositionVisualArea(AClientRect); - R := AClientRect; - if TcxCustomFontNameComboBoxProperties(ActiveProperties).FontPreview.Visible and - Assigned(FPanel) and FPanel.HandleAllocated then - begin - FPanel.SetBounds(R.Left, R.Top, R.Right - R.Left, - cxFontPreviewPanelDefaultHeight); - FPanel.RealignButtons; - Inc(R.Top, FPanel.Height); - end; - List.SetBounds(R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top); -end; - -function TcxFontNameComboBoxLookupData.GetListBoxClass: TcxCustomEditListBoxClass; -begin - Result := TcxFontNameComboBoxListBox; -end; - -procedure TcxFontNameComboBoxLookupData.HandleSelectItem(Sender: TObject); -begin - inherited HandleSelectItem(Sender); - if Assigned(FPanel) and FPanel.HandleAllocated then - begin - FPanel.Locked := True; - try - if ItemIndex >= 0 then - FPanel.FontName := GetFontName; - with TcxCustomFontNameComboBoxProperties(ActiveProperties) do - if FontPreview.PreviewType <> cxfpFullAlphabet then - FPanel.Caption := GetPreviewText; - finally - FPanel.Locked := False; - end; - end; -end; - -procedure TcxFontNameComboBoxLookupData.InternalChangeCurrentMRUFontNamePosition; -var - FIndex: Integer; -begin - if ItemIndex > (TcxCustomFontNameComboBoxProperties(ActiveProperties).FMRUFontNames.Count - 1) then - begin - FIndex := Items.IndexOf(Items[ItemIndex]); - if FIndex >= 0 then - InternalSetCurrentKey(FIndex); - end; -end; - -function TcxFontNameComboBoxLookupData.GetPreviewText: string; -begin - with TcxCustomFontNameComboBoxProperties(ActiveProperties) do - case FontPreview.PreviewType of - cxfpCustom: Result := TcxCustomFontNameComboBoxProperties(ActiveProperties).FontPreview.PreviewText; - cxfpFullAlphabet: Result := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 1234567890'; - else - Result := GetFontName; - end; -end; - -function TcxFontNameComboBoxLookupData.GetFontName: string; -begin - if ItemIndex = -1 then - Result := '' - else - Result := Items[ItemIndex]; -end; - -{ TcxCustomFontNameComboBoxProperties } - -constructor TcxCustomFontNameComboBoxProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - DropDownListStyle := lsFixedList; - FMaxMRUFonts := 10; - FFontTypes := [cxftTTF, cxftRaster, cxftDevice, cxftFixed, cxftSymbol]; - FUseOwnFont := False; - FShowFontTypeIcon := [ftiShowInCombo, ftiShowInList]; - FMRUFontNames := TcxMRUFontNameItems.Create(Self, TcxMRUFontNameItem); - FFontPreview := TcxFontPreview.Create(Self); - FLoadFontComplete := True; - LoadFontNames; -end; - -destructor TcxCustomFontNameComboBoxProperties.Destroy; -begin - FreeAndNil(FFontPreview); - FreeAndNil(FMRUFontNames); - ShutDownFontLoader; - inherited; -end; - -procedure TcxCustomFontNameComboBoxProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomFontNameComboBoxProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomFontNameComboBoxProperties do - begin - Self.UseOwnFont := UseOwnFont; - Self.FontTypes := FontTypes; - Self.ShowFontTypeIcon := ShowFontTypeIcon; - Self.FontPreview := FontPreview; - Self.MaxMRUFonts := MaxMRUFonts; - Self.OnAddedMRUFont := OnAddedMRUFont; - Self.OnMovedMRUFont := OnMovedMRUFont; - Self.OnDeletedMRUFont := OnDeletedMRUFont; - Self.OnLoadFontComplete := OnLoadFontComplete; - Self.MRUFontNames.Assign(MRUFontNames); - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomFontNameComboBoxProperties.CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; -var - AItemIndex1, AItemIndex2: Integer; - AText1, AText2: string; -begin - GetFontNameComboBoxDisplayValue(AEditValue1, AItemIndex1, AText1); - GetFontNameComboBoxDisplayValue(AEditValue2, AItemIndex2, AText2); - Result := AItemIndex1 = AItemIndex2; -end; - -class function TcxCustomFontNameComboBoxProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxFontNameComboBox; -end; - -procedure TcxCustomFontNameComboBoxProperties.GetFontNameComboBoxDisplayValue( - const AEditValue: TcxEditValue; out AItemIndex: Integer; out AText: string); -begin - if not LoadFontComplete then - begin - AItemIndex := -1; - AText := cxGetResourceString(@scxLoadingFonts); - end - else - begin - AItemIndex := FindItemByValue(AEditValue); - if AItemIndex = -1 then - AText := '' - else - AText := Items[AItemIndex]; - end; - CheckCharsRegister(AText, CharCase); -end; - -function TcxCustomFontNameComboBoxProperties.FindLookupText( - const AText: string): Boolean; -begin - Result := not LoadFontComplete or inherited FindLookupText(AText); -end; - -class function TcxCustomFontNameComboBoxProperties.GetLookupDataClass: TcxInterfacedPersistentClass; -begin - Result := TcxFontNameComboBoxLookupData; -end; - -class function TcxCustomFontNameComboBoxProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomFontNameComboBoxViewData; -end; - -class function TcxCustomFontNameComboBoxProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomFontNameComboBoxViewInfo; -end; - -procedure TcxCustomFontNameComboBoxProperties.ShutDownFontLoader; -begin - if Assigned(FFontLoader) then - begin - FFontLoader.OnCompleteThread := nil; - FFontLoader.OnDestroyThread := nil; - FFontLoader.Terminate; - FFontLoader := nil; - end; -end; - -function TcxCustomFontNameComboBoxProperties.GetFontItems: TStrings; -begin - Result := Items; -end; - -function TcxCustomFontNameComboBoxProperties.GetFontTypes: TcxFontTypes; -begin - Result := FFontTypes; -end; - -procedure TcxCustomFontNameComboBoxProperties.SetFontTypes(Value: TcxFontTypes); -begin - if FFontTypes <> Value then begin - FFontTypes := Value; - FMRUFontNames.Clear; - LoadFontNames; - Changed; - end; -end; - -procedure TcxCustomFontNameComboBoxProperties.SetMaxMRUFonts(Value: Byte); -var - FOldMaxMRUFonts: Byte; -begin - if FMaxMRUFonts <> Value then - begin - FOldMaxMRUFonts := FMaxMRUFonts; - FMaxMRUFonts := Value; - if FOldMaxMRUFonts > Value then - begin - DeleteOverMRUFonts; - Changed; - end; - end; -end; - -function TcxCustomFontNameComboBoxProperties.GetUseOwnFont: Boolean; -begin - Result := FUseOwnFont; -end; - -procedure TcxCustomFontNameComboBoxProperties.SetUseOwnFont(Value: Boolean); -begin - if FUseOwnFont <> Value - then begin - FUseOwnFont := Value; - Changed; - end; -end; - -procedure TcxCustomFontNameComboBoxProperties.SetShowFontTypeIcon(Value: TcxShowFontIconTypes); -begin - if FShowFontTypeIcon <> Value then - begin - FShowFontTypeIcon := Value; - Changed; - end; -end; - -function TcxCustomFontNameComboBoxProperties.FindItemByValue(const AEditValue: TcxEditValue): Integer; -begin - if not LoadFontComplete then - Result := -1 - else - if IsVarEmpty(AEditValue) then - Result := -1 - else - Result := Items.IndexOf(VarToStr(AEditValue)); -end; - -function TcxCustomFontNameComboBoxProperties.GetItemTypes(Index: Integer): TcxFontTypes; -begin - Result := RealFontTypeToCxTypes(Integer(Items.Objects[Index])); -end; - -procedure TcxCustomFontNameComboBoxProperties.SetFontPreview(Value: TcxFontPreview); -begin - FontPreview.Assign(Value); - Changed; -end; - -procedure TcxCustomFontNameComboBoxProperties.LoadFontNames; -begin - { Prepare to ShutDown FontLoader} - if (not FLoadFontComplete) or (Assigned(FFontLoader)) then - begin - if Assigned(FFontLoader) then FFontLoader.OnCompleteThread := nil; - ShutDownFontLoader; - end; - FLoadFontComplete := False; - FFontLoader := TcxFontLoader.Create(FFontTypes); - FFontLoader.OnCompleteThread := FontLoaderCompleteHandler; - FFontLoader.OnDestroyThread := FontLoaderDestroyHandler; - FFontLoader.Resume; -end; - -procedure TcxCustomFontNameComboBoxProperties.Update(AProperties: TcxCustomEditProperties); -begin - if (AProperties is TcxCustomFontNameComboBoxProperties) and - FLoadFontComplete then - with TcxCustomFontNameComboBoxProperties(AProperties) do - begin - Items.Assign(Self.Items); - MRUFontNames.Assign(Self.MRUFontNames); - end; -end; - -procedure TcxCustomFontNameComboBoxProperties.FontLoaderCompleteHandler(Sender: TObject); -begin - Items.BeginUpdate; - try - Items.Clear; - if Assigned(Sender) then Items.Assign((Sender as TcxFontLoader).FontList); - finally - Items.EndUpdate; - end; - FLoadFontComplete := True; - if Assigned(FOnInternalLoadFontComplete) then FOnInternalLoadFontComplete(Self); - if Assigned(OnLoadFontComplete) then OnLoadFontComplete(Self); - Changed; -end; - -procedure TcxCustomFontNameComboBoxProperties.FontLoaderDestroyHandler(Sender: TObject); -begin - FFontLoader.OnCompleteThread := nil; - FFontLoader.OnDestroyThread := nil; - FFontLoader := nil; - FLoadFontComplete := True; -end; - -function TcxCustomFontNameComboBoxProperties.AddMRUFontName(const AFontName: TFontName): TcxMRUFontNameAction; -var - FIndex: Integer; -begin - Result := mfaNone; - if MaxMRUFonts = 0 then Exit; - Result := mfaInvalidFontName; - FIndex := Items.IndexOf(AFontName); - if FIndex < 0 then Exit; - {If this font exists in MRU list, do not add, only move to first position} - if FMRUFontNames.FindFontName(AFontName) <> nil then - begin - if (FIndex > 0) and (FIndex < FMRUFontNames.Count) then - begin - Result := mfaMoved; - Items.Move(FIndex, 0); - FMRUFontNames.Move(FIndex, 0); - if Assigned(OnMovedMRUFont) then - OnMovedMRUFont(Self); - end - else - Result := mfaNone; - end - else - Result := mfaAdded; - if Result = mfaAdded then - begin - FMRUFontNames.InsertMRUFontName(0, AFontName); - Items.InsertObject(0, AFontName, Items.Objects[FIndex]); - DeleteOverMRUFonts; - if Assigned(OnAddedMRUFont) then - OnAddedMRUFont(Self); - end; -end; - -function TcxCustomFontNameComboBoxProperties.DelMRUFontName(const AFontName: TFontName): TcxMRUFontNameAction; -var - FIndex: Integer; -begin - Result := mfaInvalidFontName; - {Check for right Font name} - FIndex := Items.IndexOf(AFontName); - if FIndex < 0 then Exit; - if FMRUFontNames.FindFontName(AFontName) <> nil then - begin -{$IFDEF DELPHI5} - FMRUFontNames.Delete(FIndex); -{$ELSE} - TcxMRUFontNameItem(FMRUFontNames.Items[FIndex]).Free; -{$ENDIF} - Items.Delete(FIndex); - Result := mfaDeleted; - if Assigned(OnDeletedMRUFont) then - OnDeletedMRUFont(Self, AFontName); - end; -end; - -procedure TcxCustomFontNameComboBoxProperties.DeleteOverMRUFonts; -var - I: Integer; - FDeletedFontName: string; -begin - BeginUpdate; - try - for I := FMRUFontNames.Count - 1 downto 0 do - begin - if I >= FMaxMRUFonts then - begin -{$IFDEF DELPHI5} - FMRUFontNames.Delete(I); -{$ELSE} - TcxMRUFontNameItem(FMRUFontNames.Items[I]).Free; -{$ENDIF} - FDeletedFontName := Items[I]; - Items.Delete(I); - if Assigned(OnDeletedMRUFont) then - OnDeletedMRUFont(Self, FDeletedFontName); - end - else Break; - end; - finally - EndUpdate; - end; -end; - -{ TcxCustomFontNameComboBox } - -{$IFDEF CBUILDER10} -constructor TcxCustomFontNameComboBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); -end; -{$ENDIF} - -function TcxCustomFontNameComboBox.Deactivate: Boolean; -begin - Result := inherited Deactivate; - UpdateMRUList; -end; - -class function TcxCustomFontNameComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomFontNameComboBoxProperties; -end; - -function TcxCustomFontNameComboBox.GetInnerEditClass: TControlClass; -begin - Result := TcxCustomFontNameComboBoxInnerEdit; -end; - -function TcxCustomFontNameComboBox.GetPopupWindowClientPreferredSize: TSize; -begin - Result := inherited GetPopupWindowClientPreferredSize; -end; - -procedure TcxCustomFontNameComboBox.Initialize; -begin - inherited Initialize; - FFontNameQueue := ''; - ControlStyle := ControlStyle - [csClickEvents]; - TcxCustomFontNameComboBoxProperties(FProperties).FOnInternalLoadFontComplete := - InternalLoadFontCompleteHandler; -end; - -procedure TcxCustomFontNameComboBox.InitializePopupWindow; -begin - inherited InitializePopupWindow; - PopupWindow.SysPanelStyle := ActiveProperties.PopupSizeable; -end; - -procedure TcxCustomFontNameComboBox.CloseUp(AReason: TcxEditCloseUpReason); -begin - FNeedsUpdateMRUList := FNeedsUpdateMRUList or (AReason in [crTab, crEnter, crClose]); - try - inherited CloseUp(AReason); - finally - UpdateMRUList; - end; -end; - -procedure TcxCustomFontNameComboBox.SetItemIndex(Value: Integer); -begin - if ActiveProperties.LoadFontComplete then - inherited SetItemIndex(Value); -end; - -function TcxCustomFontNameComboBox.AddMRUFontName(const AFontName: TFontName): TcxMRUFontNameAction; -begin - Result := ActiveProperties.AddMRUFontName(AFontName); -end; - -function TcxCustomFontNameComboBox.DelMRUFontName(const AFontName: TFontName): TcxMRUFontNameAction; -begin - Result := ActiveProperties.DelMRUFontName(AFontName); -end; - -function TcxCustomFontNameComboBox.GetProperties: TcxCustomFontNameComboBoxProperties; -begin - Result := TcxCustomFontNameComboBoxProperties(FProperties); -end; - -function TcxCustomFontNameComboBox.GetActiveProperties: TcxCustomFontNameComboBoxProperties; -begin - Result := TcxCustomFontNameComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxCustomFontNameComboBox.GetFontName: string; -begin - Result := FFontNameQueue; - if (Result = '') and (ItemIndex <> -1) then - Result := ActiveProperties.Items[ItemIndex]; -end; - -procedure TcxCustomFontNameComboBox.SetFontName(Value: string); -begin - if Value = '' then - begin - FFontNameQueue := ''; - ItemIndex := -1; - end - else - begin - if not ActiveProperties.LoadFontComplete then - FFontNameQueue := Value - else - ItemIndex := ActiveProperties.Items.IndexOf(Value); - end; -end; - -function TcxCustomFontNameComboBox.GetLookupData: TcxFontNameComboBoxLookupData; -begin - Result := TcxFontNameComboBoxLookupData(FLookupData); -end; - -procedure TcxCustomFontNameComboBox.SetProperties(Value: TcxCustomFontNameComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomFontNameComboBox.InternalLoadFontCompleteHandler(Sender: TObject); -var - FLocalFontName: string; -begin - if FFontNameQueue <> '' then - begin - SetFontName(FFontNameQueue); - FFontNameQueue := ''; - end - else - begin - if IsVarEmpty(FEditValue) then - FLocalFontName := '' - else - FLocalFontName := VarToStr(FEditValue); - LookupData.InternalSetCurrentKey(ActiveProperties.Items.IndexOf(FLocalFontName)); - end; -end; - -procedure TcxCustomFontNameComboBox.UpdateMRUList; -var - AFontName: TFontName; - AFontNameIndex: Integer; -begin - try - if FNeedsUpdateMRUList and (FDontCheckModifiedWhenUpdatingMRUList or ModifiedAfterEnter) then - begin - AFontNameIndex := ActiveProperties.Items.IndexOf(Text); - if AFontNameIndex = -1 then - AFontName := Text - else - AFontName := ActiveProperties.Items[AFontNameIndex]; - if AddMRUFontName(AFontName) in [mfaNone, mfaMoved] then - LookupData.InternalChangeCurrentMRUFontNamePosition; - end; - finally - FDontCheckModifiedWhenUpdatingMRUList := False; - FNeedsUpdateMRUList := False; - end; -end; - -procedure TcxCustomFontNameComboBox.AfterPosting; -begin - inherited AfterPosting; - if IsInplace and FNeedsUpdateMRUList then - FDontCheckModifiedWhenUpdatingMRUList := True; -end; - -procedure TcxCustomFontNameComboBox.InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); -begin - if IsDestroying then - Exit; - inherited; -end; - -{ TcxFontNameComboBox } - -class function TcxFontNameComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxFontNameComboBoxProperties; -end; - -function TcxFontNameComboBox.GetActiveProperties: TcxFontNameComboBoxProperties; -begin - Result := TcxFontNameComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxFontNameComboBox.GetProperties: TcxFontNameComboBoxProperties; -begin - Result := TcxFontNameComboBoxProperties(FProperties); -end; - -procedure TcxFontNameComboBox.SetProperties( - Value: TcxFontNameComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterFontNameComboBoxHelper } - -class function TcxFilterFontNameComboBoxHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxFontNameComboBox; -end; - -class function TcxFilterFontNameComboBoxHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoBlanks, fcoNonBlanks]; - if AExtendedSet then - Result := Result + [fcoInList, fcoNotInList]; -end; - -initialization - GetRegisteredEditProperties.Register(TcxFontNameComboBoxProperties, scxSEditRepositoryFontNameComboBoxItem); - FTrueTypeFontBitmap := TBitmap.Create; - FTrueTypeFontBitmap.LoadFromResourceName(HInstance, 'CXFONTCOMBO_TTF'); - FTrueTypeFontBitmap.Transparent := True; - FNonTrueTypeFontBitmap := TBitmap.Create; - FNonTrueTypeFontBitmap.LoadFromResourceName(HInstance, 'CXFONTCOMBO_NONTTF'); - FNonTrueTypeFontBitmap.Transparent := True; - FilterEditsController.Register(TcxFontNameComboBoxProperties, TcxFilterFontNameComboBoxHelper); - -finalization - FilterEditsController.Unregister(TcxFontNameComboBoxProperties, TcxFilterFontNameComboBoxHelper); - GetRegisteredEditProperties.Unregister(TcxFontNameComboBoxProperties); - FreeAndNil(FNonTrueTypeFontBitmap); - FreeAndNil(FTrueTypeFontBitmap); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxFontNameComboBox.res b/internal/x.46/ExpressEditors Library 5/Sources/cxFontNameComboBox.res deleted file mode 100644 index 4dd46661..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Sources/cxFontNameComboBox.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxGroupBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxGroupBox.pas deleted file mode 100644 index 17b3509b..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxGroupBox.pas +++ /dev/null @@ -1,3077 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGroupBox; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, - SysUtils, Classes, Controls, Graphics, Forms, cxControls, cxGraphics, - cxLookAndFeels, cxContainer, cxEditPaintUtils, cxEdit, - cxTextEdit, cxClasses, cxCheckBox, cxLookAndFeelPainters; - -const - cxGroupBox_SupportNonClientArea: Boolean = True; - -type - TcxCaptionAlignment = (alTopLeft, alTopCenter, alTopRight, - alBottomLeft, alBottomCenter, alBottomRight, - alLeftTop, alLeftCenter, alLeftBottom, - alRightTop, alRightCenter, alRightBottom, - alCenterCenter); - - TcxPanelOffice11BackgroundKind = (pobkGradient, pobkOffice11Color, pobkStyleColor); - - { TcxGroupBoxButtonViewInfo } - - TcxGroupBoxButtonViewInfo = class(TcxEditButtonViewInfo) - public - Caption: string; - Column, Row: Integer; - function GetGlyphRect(ACanvas: TcxCanvas; AGlyphSize: TSize; AAlignment: TLeftRight; AIsPaintCopy: Boolean): TRect; virtual; - end; - - { TcxGroupBoxViewInfo } - - TcxCustomGroupBox = class; - - TcxGroupBoxViewInfo = class(TcxCustomTextEditViewInfo) - private - function GetCaptionRectIndent: TRect; - function GetControlRect: TRect; - function GetEdit: TcxCustomGroupBox; - function CalcOffsetBoundsForPanel: TRect; - procedure CalcBoundsForPanel; - function GetFrameBounds: TRect; - procedure CalcTextBoundsForPanel; - function CalcCorrectionBoundsForPanel: TRect; - procedure AdjustTextBoundsForPanel; - procedure AdjustCaptionBoundsForPanel; - procedure DrawHorizontalTextCaption(ACanvas: TcxCanvas); - procedure DrawVerticalTextCaption(ACanvas: TcxCanvas); - procedure DrawFrame(ACanvas: TcxCanvas; R: TRect); - function GetBoundsForPanel: TRect; - function GetThemeBackgroundRect(ACanvas: TcxCanvas): TRect; - procedure DrawUsualBackground(ACanvas: TcxCanvas); - procedure DrawNativeBackground(ACanvas: TcxCanvas; const ACaptionRect: TRect); - procedure DrawNativeGroupBoxBackground(ACanvas: TcxCanvas); - procedure DrawNativePanelBackground(ACanvas: TcxCanvas; const ACaptionRect: TRect); - procedure DrawOffice11PanelBackground(ACanvas: TcxCanvas; const R: TRect); - procedure InternalDrawBackground(ACanvas: TcxCanvas); - procedure InternalDrawBackgroundByPainter(ACanvas: TcxCanvas); - protected - procedure AdjustCaptionRect(ACaptionPosition: TcxGroupBoxCaptionPosition); virtual; - procedure DrawCaption(ACanvas: TcxCanvas); virtual; - function GetButtonViewInfoClass: TcxEditButtonViewInfoClass; override; - procedure InternalPaint(ACanvas: TcxCanvas); override; - function IsPanelStyle: Boolean; - - property CaptionRectIndent: TRect read GetCaptionRectIndent; - property ControlRect: TRect read GetControlRect; - public - Alignment: TLeftRight; - CaptionRect: TRect; - IsDesigning: Boolean; - TextRect: TRect; - constructor Create; override; - destructor Destroy; override; - property Edit: TcxCustomGroupBox read GetEdit; - end; - - { TcxGroupBoxViewData } - - TcxGroupBoxViewData = class(TcxCustomEditViewData) - private - procedure AdjustHorizontalCaptionRect(var R: TRect); - procedure AdjustVerticalCaptionRect(var R: TRect); - function GetCaptionRect(ACanvas: TcxCanvas): TRect; - function GetEdit: TcxCustomGroupBox; - function GetShadowWidth: Integer; - function HasNonClientArea: Boolean; - procedure CalcRects(ACanvas: TcxCanvas; AEditViewInfo: TcxGroupBoxViewInfo); - protected - function GetContainerState(const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): TcxContainerState; override; - function IsPanelStyle: Boolean; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - function GetBorderColor: TColor; override; - function GetBorderExtent: TRect; override; - function GetClientExtent(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo): TRect; override; - function HasShadow: Boolean; override; - class function IsNativeStyle(ALookAndFeel: TcxLookAndFeel): Boolean; override; - property Edit: TcxCustomGroupBox read GetEdit; - end; - - { TcxButtonGroupViewData } - - TcxCustomButtonGroupProperties = class; - - TcxEditMetrics = record - AutoHeightColumnWidthCorrection, AutoHeightWidthCorrection, - ColumnWidthCorrection, WidthCorrection: Integer; - ClientLeftBoundCorrection, ClientWidthCorrection, ColumnOffset: Integer; - ButtonSize: TSize; - end; - - { TcxButtonGroupViewInfo } - - TcxButtonGroupViewInfo = class(TcxGroupBoxViewInfo) - protected - procedure DrawEditButton(ACanvas: TcxCanvas; AButtonVisibleIndex: Integer); override; - procedure DrawButtonCaption(ACanvas: TcxCanvas; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; const AGlyphRect: TRect); virtual; abstract; - procedure DrawButtonGlyph(ACanvas: TcxCanvas; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; const AGlyphRect: TRect); virtual; abstract; - function GetGlyphSize: TSize; virtual; - function IsButtonGlypthTransparent(AButtonViewInfo: TcxGroupBoxButtonViewInfo): Boolean; virtual; abstract; - public - CaptionExtent: TRect; - GlyphSize: TSize; - end; - - TcxButtonGroupViewData = class(TcxGroupBoxViewData) - private - function GetProperties: TcxCustomButtonGroupProperties; - protected - procedure CalculateButtonPositions(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo); virtual; - procedure CalculateButtonViewInfos(AViewInfo: TcxCustomEditViewInfo); virtual; - function GetDrawTextFlags: Integer; virtual; - procedure GetEditMetrics(AAutoHeight: Boolean; ACanvas: TcxCanvas; - out AMetrics: TcxEditMetrics); virtual; abstract; - function GetCaptionRectExtent: TRect; virtual; - procedure CalculateButtonNativeState(AViewInfo: TcxCustomEditViewInfo; - AButtonViewInfo: TcxGroupBoxButtonViewInfo); virtual; abstract; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure CalculateButtonsViewInfo(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); override; - function GetEditConstantPartSize(ACanvas: TcxCanvas; - const AEditSizeProperties: TcxEditSizeProperties; - var MinContentSize: TSize; AViewInfo: TcxCustomEditViewInfo = nil): TSize; override; - class function IsButtonNativeStyle(ALookAndFeel: TcxLookAndFeel): Boolean; virtual; - property Properties: TcxCustomButtonGroupProperties read GetProperties; - end; - - TcxButtonGroupViewDataClass = class of TcxButtonGroupViewData; - - { TcxCustomGroupBoxProperties } - - TcxCustomGroupBoxProperties = class(TcxCustomEditProperties) - protected - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - public - class function GetContainerClass: TcxContainerClass; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - end; - - { TcxButtonGroupItem } - - TcxButtonGroupItem = class(TcxCaptionItem) - private - FEnabled: Boolean; - function GetIsCollectionDestroying: Boolean; - procedure SetEnabled(Value: Boolean); - protected - procedure DoChanged(ACollection: TCollection; ACollectionOperation: TcxCollectionOperation; - AIndex: Integer = -1); - property Enabled: Boolean read FEnabled write SetEnabled default True; - property IsCollectionDestroying: Boolean read GetIsCollectionDestroying; - public - constructor Create(Collection: TCollection); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - end; - - { TcxButtonGroupItems } - - TcxButtonGroupItems = class(TcxCaptionItems) - private - FChangedItemIndex: Integer; - FChangedItemOperation: TcxCollectionOperation; - FItemChanged: Boolean; - function GetItem(Index: Integer): TcxButtonGroupItem; - procedure SetItem(Index: Integer; Value: TcxButtonGroupItem); - protected - procedure Update(Item: TCollectionItem); override; - property ChangedItemIndex: Integer read FChangedItemIndex; - property ChangedItemOperation: TcxCollectionOperation - read FChangedItemOperation; - property ItemChanged: Boolean read FItemChanged; - public - procedure InternalNotify(AItem: TcxButtonGroupItem; AItemIndex: Integer; - AItemOperation: TcxCollectionOperation); - property Items[Index: Integer]: TcxButtonGroupItem - read GetItem write SetItem; default; - end; - - TcxButtonGroupItemsClass = class of TcxButtonGroupItems; - - { TcxCustomButtonGroupProperties } - - TcxCustomButtonGroupProperties = class(TcxCustomGroupBoxProperties) - private - FColumns: Integer; - FItems: TcxButtonGroupItems; - FWordWrap: Boolean; - procedure SetColumns(Value: Integer); - procedure SetItems(Value: TcxButtonGroupItems); - procedure SetWordWrap(Value: Boolean); - protected - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function CreateItems: TcxButtonGroupItems; virtual; - function GetButtonsPerColumn: Integer; - function GetColumnCount: Integer; virtual; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CreatePreviewProperties: TcxCustomEditProperties; override; - class function GetContainerClass: TcxContainerClass; override; - function GetSpecialFeatures: TcxEditSpecialFeatures; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - // !!! - property Columns: Integer read FColumns write SetColumns default 1; - property Items: TcxButtonGroupItems read FItems write SetItems; - property WordWrap: Boolean read FWordWrap write SetWordWrap default False; - end; - - { TcxPanelStyle } - - TcxPanelStyle = class(TPersistent) - private - FActive: Boolean; - FBorderWidth: TBorderWidth; - FCaptionIndent: Integer; - FEdit: TcxCustomGroupBox; - FOfficeBackgroundKind: TcxPanelOffice11BackgroundKind; - FWordWrap: Boolean; - - procedure SetActive(AValue: Boolean); - procedure SetBorderWidth(AValue: TBorderWidth); - procedure SetCaptionIndent(AValue: Integer); - procedure SetOfficeBackgroundKind(AValue: TcxPanelOffice11BackgroundKind); - procedure SetWordWrap(AValue: Boolean); - protected - procedure Update; - property Edit: TcxCustomGroupBox read FEdit; - public - constructor Create(AOwner: TcxCustomGroupBox); virtual; - procedure Assign(ASource: TPersistent); override; - published - property Active: Boolean read FActive write SetActive default False; - property BorderWidth: TBorderWidth read FBorderWidth write SetBorderWidth default 0; - property CaptionIndent: Integer read FCaptionIndent write SetCaptionIndent default 2; - property OfficeBackgroundKind: TcxPanelOffice11BackgroundKind read FOfficeBackgroundKind - write SetOfficeBackgroundKind default pobkOffice11Color; - property WordWrap: Boolean read FWordWrap write SetWordWrap default False; - end; - - { TcxCustomGroupBox } - - TcxGroupBoxCustomDrawEvent = procedure (Sender: TcxCustomGroupBox; var ADone: Boolean) of object; - TcxGroupBoxMeasureCaptionHeightEvent = procedure (Sender: TcxCustomGroupBox; const APainter: TcxCustomLookAndFeelPainterClass; var ACaptionHeight: Integer) of object; - TcxGroupBoxCustomDrawElementEvent = procedure (Sender: TcxCustomGroupBox; ACanvas: TCanvas; const ABounds: TRect; const APainter: TcxCustomLookAndFeelPainterClass; var ADone: Boolean) of object; - - TcxCustomGroupBox = class(TcxCustomEdit) - private - FAlignment: TcxCaptionAlignment; - FCaptionBkColor: TColor; // deprecated - FIsAccelCharHandling: Boolean; - FPanelStyle: TcxPanelStyle; - FRedrawOnResize: Boolean; - FVisibleCaption: string; - FOnCustomDraw: TcxGroupBoxCustomDrawEvent; - {$IFDEF DELPHI7} - FOnCustomDrawCaption: TcxGroupBoxCustomDrawElementEvent; - FOnCustomDrawContentBackground: TcxGroupBoxCustomDrawElementEvent; - FOnMeasureCaptionHeight: TcxGroupBoxMeasureCaptionHeightEvent; - {$ENDIF} - - procedure CalculateVisibleCaption; - function GetCaptionBkColor: TColor; // deprecated - function GetColor: TColor; // deprecated - function GetFont: TFont; // deprecated - function GetViewInfo: TcxGroupBoxViewInfo; - function IsSkinAvailable: Boolean; - - procedure UpdateCaption; - procedure UpdateNonClientArea; - function GetHorizontalCaptionIndent: Integer; - function GetPanelStyleCaptionDrawingFlags: Cardinal; - function GetVerticalCaptionIndent: Integer; - function GetVisibleCaption: string; - - procedure SetAlignment(Value: TcxCaptionAlignment); - procedure SetCaptionBkColor(Value: TColor); // deprecated - procedure SetColor(Value: TColor); // deprecated - procedure SetFont(Value: TFont); // deprecated - procedure SetPanelStyle(AValue: TcxPanelStyle); - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - procedure WMNCPaint(var Message: TWMNCPaint); - {$IFNDEF DELPHI7} - procedure WMPrintClient(var Message: TMessage); message WM_PRINTCLIENT; - {$ENDIF} - protected - FCaptionFont: TFont; - - procedure AdjustClientRect(var Rect: TRect); override; - procedure CreateHandle; override; - function CreatePanelStyle: TcxPanelStyle; virtual; - function DefaultParentColor: Boolean; override; - procedure Initialize; override; - function InternalGetActiveStyle: TcxContainerStyle; override; - function InternalGetNotPublishedStyleValues: TcxEditStyleValues; override; - procedure Paint; override; - procedure WndProc(var Message: TMessage); override; - - // Conditions - function CanAutoSize: Boolean; override; - function CanFocusOnClick: Boolean; override; - function CanHaveTransparentBorder: Boolean; override; - function IsContainerClass: Boolean; override; - function IsNativeBackground: Boolean; override; - function IsPanelStyle: Boolean; - function NeedRedrawOnResize: Boolean; override; - - // Notifications - procedure ContainerStyleChanged(Sender: TObject); override; - procedure FontChanged; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); override; - procedure TextChanged; override; - - // Shadow - function HasShadow: Boolean; override; - function GetShadowBounds: TRect; override; - function GetShadowBoundsExtent: TRect; override; - - {$IFDEF DELPHI7} - function DoCustomDrawCaption(ACanvas: TcxCanvas; const ABounds: TRect; const APainter: TcxCustomLookAndFeelPainterClass): Boolean; virtual; - function DoCustomDrawContentBackground(ACanvas: TcxCanvas; const ABounds: TRect; const APainter: TcxCustomLookAndFeelPainterClass): Boolean; virtual; - procedure DoMeasureCaptionHeight(const APainter: TcxCustomLookAndFeelPainterClass; var ACaptionHeight: Integer); - {$ENDIF} - procedure AdjustCanvasFontSettings(ACanvas: TcxCanvas); - function DoCustomDraw: Boolean; - function GetCaptionDrawingFlags: Cardinal; - function HasNonClientArea: Boolean; virtual; - function IsNonClientAreaSupported: Boolean; virtual; - function IsVerticalText: Boolean; - procedure CalculateCaptionFont; - - property CaptionBkColor: TColor read GetCaptionBkColor write SetCaptionBkColor stored False; // deprecated - property Color: TColor read GetColor write SetColor stored False; // deprecated - property Ctl3D; - property Font: TFont read GetFont write SetFont stored False; // deprecated - property PanelStyle: TcxPanelStyle read FPanelStyle write SetPanelStyle; - property ParentBackground; - property RedrawOnResize: Boolean read FRedrawOnResize write FRedrawOnResize default True; - property TabStop default False; - property ViewInfo: TcxGroupBoxViewInfo read GetViewInfo; - property OnCustomDraw: TcxGroupBoxCustomDrawEvent read FOnCustomDraw write FOnCustomDraw; - {$IFDEF DELPHI7} - property OnCustomDrawCaption: TcxGroupBoxCustomDrawElementEvent read FOnCustomDrawCaption write FOnCustomDrawCaption; - property OnCustomDrawContentBackground: TcxGroupBoxCustomDrawElementEvent read FOnCustomDrawContentBackground write FOnCustomDrawContentBackground; - property OnMeasureCaptionHeight: TcxGroupBoxMeasureCaptionHeightEvent read FOnMeasureCaptionHeight write FOnMeasureCaptionHeight; - {$ENDIF} - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - - property Alignment: TcxCaptionAlignment read FAlignment write SetAlignment - default alTopLeft; - property Transparent; - end; - - { TcxGroupBox } - - TcxGroupBox = class(TcxCustomGroupBox) - published - property Align; - property Alignment; - property Anchors; - property BiDiMode; - property Caption; - property CaptionBkColor; // deprecated - property Color; // deprecated - property Constraints; - property Ctl3D; - property DockSite; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property Font; // deprecated - property LookAndFeel; // deprecated - property PanelStyle; - property ParentBackground; - property ParentBiDiMode; - property ParentColor; - property ParentCtl3D; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property RedrawOnResize; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnClick; - property OnContextPopup; - property OnCustomDraw; - {$IFDEF DELPHI7} - property OnCustomDrawCaption; - property OnCustomDrawContentBackground; - {$ENDIF} - property OnDblClick; - property OnDockDrop; - property OnDockOver; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnGetSiteInfo; - {$IFDEF DELPHI7} - property OnMeasureCaptionHeight; - {$ENDIF} - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - property OnUnDock; - end; - - { TcxCustomButtonGroup } - - TcxCustomButtonGroup = class(TcxCustomGroupBox) - private - FButtons: TList; - procedure DoButtonDragDrop(Sender, Source: TObject; X, Y: Integer); - procedure DoButtonDragOver(Sender, Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); - procedure DoButtonKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure DoButtonKeyPress(Sender: TObject; var Key: Char); - procedure DoButtonKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure DoButtonMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure DoButtonMouseMove(Sender: TObject; Shift: TShiftState; - X, Y: Integer); - procedure DoButtonMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure DoButtonMouseWheel(Sender: TObject; - Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint; var Handled: Boolean); - function GetProperties: TcxCustomButtonGroupProperties; - function GetActiveProperties: TcxCustomButtonGroupProperties; - procedure SetProperties(Value: TcxCustomButtonGroupProperties); - protected - function CanAutoSize: Boolean; override; - procedure ContainerStyleChanged(Sender: TObject); override; - procedure CursorChanged; override; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); override; - procedure EnabledChanged; override; - procedure Initialize; override; - function IsButtonDC(ADC: THandle): Boolean; override; - function IsContainerClass: Boolean; override; - procedure PropertiesChanged(Sender: TObject); override; - procedure ReadState(Reader: TReader); override; - function DoRefreshContainer(const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): Boolean; override; - procedure CreateHandle; override; - procedure ArrangeButtons; virtual; - function GetButtonDC(AButtonIndex: Integer): THandle; virtual; abstract; - function GetButtonIndexAt(const P: TPoint): Integer; - function GetButtonInstance: TWinControl; virtual; abstract; - function GetFocusedButtonIndex: Integer; - procedure InitButtonInstance(AButton: TWinControl); virtual; - function IsNonClientAreaSupported: Boolean; override; - procedure SetButtonCount(Value: Integer); virtual; - procedure SynchronizeButtonsStyle; virtual; - procedure UpdateButtons; virtual; - property InternalButtons: TList read FButtons; - property TabStop default True; - public - destructor Destroy; override; - procedure ActivateByMouse(Shift: TShiftState; X, Y: Integer; - var AEditData: TcxCustomEditData); override; - function Focused: Boolean; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure GetTabOrderList(List: TList); override; - function IsButtonNativeStyle: Boolean; - property AutoSize default False; - property ActiveProperties: TcxCustomButtonGroupProperties - read GetActiveProperties; - property Properties: TcxCustomButtonGroupProperties read GetProperties - write SetProperties; - end; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - dxThemeConsts, cxEditUtils, Math, Types, dxOffice11, TypInfo, dxThemeManager, - dxUxTheme, cxDrawTextUtils, cxGeometry, dxCore; - -const - cxCaptionRectLeftBound = 8; - cxNativeState: array[Boolean] of Integer = (GBS_DISABLED, GBS_NORMAL); - - WM_DXUPDATENONCLIENTAREA: Cardinal = WM_DX + $10; - -type - TControlAccess = class(TControl); - TWinControlAccess = class(TWinControl); - -function cxGroupBoxAlignment2GroupBoxCaption(AAlignment: TcxCaptionAlignment): TcxGroupBoxCaptionPosition; -begin - if AAlignment in [alTopLeft, alTopCenter, alTopRight] then - Result := cxgpTop - else - if AAlignment in [alBottomLeft, alBottomCenter, alBottomRight] then - Result := cxgpBottom - else - if AAlignment in [alLeftTop, alLeftCenter, alLeftBottom] then - Result := cxgpLeft - else - if AAlignment in [alRightTop, alRightCenter, alRightBottom] then - Result := cxgpRight - else - Result := cxgpCenter; -end; - -{ TcxGroupBoxButtonViewInfo } - -function TcxGroupBoxButtonViewInfo.GetGlyphRect(ACanvas: TcxCanvas; AGlyphSize: TSize; AAlignment: TLeftRight; AIsPaintCopy: Boolean): TRect; -begin - Result.Top := Bounds.Top + (Bounds.Bottom - Bounds.Top - AGlyphSize.cy) div 2; - Result.Bottom := Result.Top + AGlyphSize.cy; - if AAlignment = taRightJustify then - begin - Result.Left := Bounds.Left; - Result.Right := Result.Left + AGlyphSize.cx; - end - else - begin - Result.Right := Bounds.Right; - Result.Left := Result.Right - AGlyphSize.cx; - end; -end; - -{ TcxGroupBoxViewInfo } - -constructor TcxGroupBoxViewInfo.Create; -begin - inherited Create; -end; - -destructor TcxGroupBoxViewInfo.Destroy; -begin - inherited Destroy; -end; - -procedure TcxGroupBoxViewInfo.AdjustCaptionRect(ACaptionPosition: TcxGroupBoxCaptionPosition); -var - ACaptionHeight: Integer; -begin - if not Edit.IsVerticalText then - ACaptionHeight := cxRectHeight(CaptionRect) - else - ACaptionHeight := cxRectWidth(CaptionRect); -{$IFDEF DELPHI7} - Edit.DoMeasureCaptionHeight(Painter, ACaptionHeight); -{$ENDIF} - case Edit.Alignment of - alTopLeft, alTopCenter, alTopRight: - CaptionRect.Bottom := CaptionRect.Top + ACaptionHeight; - alBottomLeft, alBottomCenter, alBottomRight: - CaptionRect.Top := CaptionRect.Bottom - ACaptionHeight; - alLeftTop, alLeftCenter, alLeftBottom: - CaptionRect.Right := CaptionRect.Left + ACaptionHeight; - alRightTop, alRightCenter, alRightBottom: - CaptionRect.Left := CaptionRect.Right - ACaptionHeight; - end; -end; - -procedure TcxGroupBoxViewInfo.DrawCaption(ACanvas: TcxCanvas); - - procedure AdjustRectForBordersNone(var R: TRect); - var - ACaptionPos: TcxGroupBoxCaptionPosition; - ARect: TRect; - begin - if (BorderStyle = ebsNone) then - begin - ACaptionPos := cxGroupBoxAlignment2GroupBoxCaption(Edit.Alignment); - case ACaptionPos of - cxgpTop: - ACaptionPos := cxgpBottom; - cxgpBottom: - ACaptionPos := cxgpTop; - cxgpLeft: - ACaptionPos := cxgpRight; - cxgpRight: - ACaptionPos := cxgpLeft; - end; - ARect := Painter.GroupBoxBorderSize(False, ACaptionPos); - R := Rect(R.Left - ARect.Left, R.Top - ARect.Top, R.Right + ARect.Right, R.Bottom + ARect.Bottom); - end; - end; - -var - ACaptionPos: TcxGroupBoxCaptionPosition; - ACaptionRect: TRect; -begin - ACanvas.SaveClipRegion; - try - ACanvas.SetClipRegion(TcxRegion.Create(CaptionRect), roIntersect); - if (Edit.FVisibleCaption = '') {$IFDEF DELPHI7}or Edit.DoCustomDrawCaption(ACanvas, CaptionRect, Painter){$ENDIF} then - Exit; - Edit.AdjustCanvasFontSettings(ACanvas); - if Assigned(Painter) then - begin - ACaptionPos := cxGroupBoxAlignment2GroupBoxCaption(Edit.Alignment); - if not IsPanelStyle then - begin - ACaptionRect := CaptionRect; - AdjustRectForBordersNone(ACaptionRect); - Painter.DrawGroupBoxCaption(ACanvas, ACaptionRect, ACaptionPos); - end; - end; - ACanvas.Brush.Style := bsClear; - if not Edit.IsVerticalText then - DrawHorizontalTextCaption(ACanvas) - else - DrawVerticalTextCaption(ACanvas); - finally - ACanvas.RestoreClipRegion; - end; -end; - -function TcxGroupBoxViewInfo.GetButtonViewInfoClass: TcxEditButtonViewInfoClass; -begin - Result := TcxGroupBoxButtonViewInfo; -end; - -procedure TcxGroupBoxViewInfo.InternalPaint(ACanvas: TcxCanvas); -begin - if IsInplace then - begin - if Edit = nil then - inherited InternalPaint(ACanvas) - else - if IsCustomBackground then - DrawBackground(ACanvas) - else - cxEditFillRect(ACanvas, Bounds, BackgroundColor); - Exit; - end; - - InternalDrawBackground(ACanvas); - DrawCaption(ACanvas); - - if not IsPanelStyle then - ACanvas.ExcludeClipRect(CaptionRect); - - DrawFrame(ACanvas, GetFrameBounds); - - if Edit.IsDBEditPaintCopyDrawing then - DrawButtons(ACanvas); -end; - -function TcxGroupBoxViewInfo.IsPanelStyle: Boolean; -begin - Result := (Edit <> nil) and Edit.PanelStyle.Active; -end; - -function TcxGroupBoxViewInfo.GetCaptionRectIndent: TRect; -var - ACaptionPosition: TcxGroupBoxCaptionPosition; - R1: TRect; -begin - Result := cxNullRect; - if Assigned(Edit) and Assigned(Edit.Style.LookAndFeel.SkinPainter) and not IsPanelStyle then - begin - ACaptionPosition := cxGroupBoxAlignment2GroupBoxCaption(Edit.Alignment); - R1 := Edit.Style.LookAndFeel.SkinPainter.GroupBoxBorderSize(True, ACaptionPosition); - case ACaptionPosition of - cxgpTop: - Result.Top := R1.Top + R1.Bottom; - cxgpBottom: - Result.Bottom := R1.Top + R1.Bottom; - cxgpLeft: - Result.Left := R1.Right + R1.Left; - cxgpRight: - Result.Right := R1.Right + R1.Left; - end; - end; -end; - -function TcxGroupBoxViewInfo.GetControlRect: TRect; -begin - Result := cxContainer.GetControlRect(Edit); -end; - -function TcxGroupBoxViewInfo.GetEdit: TcxCustomGroupBox; -begin - Result := TcxCustomGroupBox(FEdit); -end; - -function TcxGroupBoxViewInfo.CalcOffsetBoundsForPanel: TRect; -var - ABorderSize: TRect; - ACaptionIndentRect: TRect; - ABorderWidth: Integer; -begin - ABorderWidth := GetContainerBorderWidth(TcxContainerBorderStyle(BorderStyle)); - ABorderSize := Rect(ABorderWidth, ABorderWidth, ABorderWidth, ABorderWidth); - ACaptionIndentRect := cxEmptyRect; - case Edit.Alignment of - alTopLeft, alLeftTop, alLeftCenter, alLeftBottom, alBottomLeft: - ACaptionIndentRect.Left := Edit.GetHorizontalCaptionIndent; - alTopRight, alRightTop, alRightCenter, alRightBottom, alBottomRight: - ACaptionIndentRect.Right := Edit.GetHorizontalCaptionIndent; - end; - case Edit.Alignment of - alLeftTop, alTopLeft, alTopCenter, alTopRight, alRightTop: - ACaptionIndentRect.Top := Edit.GetVerticalCaptionIndent; - alLeftBottom, alBottomLeft, alBottomCenter, alBottomRight, alRightBottom: - ACaptionIndentRect.Bottom := Edit.GetVerticalCaptionIndent; - end; - Result.Left := ABorderSize.Left + ACaptionIndentRect.Left; - Result.Top := ABorderSize.Top + ACaptionIndentRect.Top; - Result.Right := ABorderSize.Right + ACaptionIndentRect.Right; - Result.Bottom := ABorderSize.Bottom + ACaptionIndentRect.Bottom; -end; - -procedure TcxGroupBoxViewInfo.CalcBoundsForPanel; -begin - if IsPanelStyle then - begin - CalcTextBoundsForPanel; - AdjustTextBoundsForPanel; - CaptionRect := TextRect; - AdjustCaptionBoundsForPanel; - end; -end; - -function TcxGroupBoxViewInfo.GetFrameBounds: TRect; -begin - if IsPanelStyle then - Result := GetBoundsForPanel - else - begin - Result := BorderRect; - ExtendRectByBorders(Result, - GetContainerBorderWidth(TcxContainerBorderStyle(BorderStyle)), Edges); - end; -end; - -procedure TcxGroupBoxViewInfo.CalcTextBoundsForPanel; -var - AFlag: Cardinal; - ACanvas: TcxCanvas; -begin - AFlag := CXTO_CALCRECT; - if Edit.PanelStyle.WordWrap then - AFlag := AFlag or CXTO_WORDBREAK; - TextRect := CalcCorrectionBoundsForPanel; - ACanvas := TcxCanvas.Create(Edit.Canvas.Canvas); - try - Edit.AdjustCanvasFontSettings(ACanvas); - cxTextOut(ACanvas.Handle, Edit.FVisibleCaption, TextRect, AFlag); - finally - FreeAndNil(ACanvas); - end; -end; - -function TcxGroupBoxViewInfo.CalcCorrectionBoundsForPanel: TRect; -var - AOffsetRect: TRect; -begin - AOffsetRect := CalcOffsetBoundsForPanel; - Result := GetBoundsForPanel; - with AOffsetRect do - begin - Inc(Result.Left, Left); - Inc(Result.Top, Top); - Dec(Result.Right, Right); - Dec(Result.Bottom, Bottom); - end; -end; - -procedure TcxGroupBoxViewInfo.AdjustTextBoundsForPanel; -var - ATextWidth, ATextHeight: Integer; - R: TRect; -begin - with TextRect do - begin - ATextWidth := Right - Left; - ATextHeight := Bottom - Top; - end; - R := CalcCorrectionBoundsForPanel; - OffsetRect(TextRect, R.Left - TextRect.Left, R.Top - TextRect.Top); - case Edit.Alignment of - alTopCenter, alBottomCenter, alCenterCenter: - OffsetRect(TextRect, (R.Right - R.Left - ATextWidth - TextRect.Left) div 2, 0); - alTopRight, alRightTop, alRightCenter, alRightBottom, alBottomRight: - OffsetRect(TextRect, R.Right - ATextWidth - TextRect.Left, 0); - end; - case Edit.Alignment of - alLeftCenter, alRightCenter, alCenterCenter: - OffsetRect(TextRect, 0, (R.Bottom - R.Top - ATextHeight - TextRect.Top) div 2); - alLeftBottom, alBottomLeft, alBottomCenter, alBottomRight, alRightBottom: - OffsetRect(TextRect, 0, R.Bottom - ATextHeight - TextRect.Top); - end; -end; - -procedure TcxGroupBoxViewInfo.AdjustCaptionBoundsForPanel; - - procedure ChangeIfLess(var AInValue, AChangeValue: Integer); - begin - AInValue := Max(AChangeValue, AInValue); - end; - procedure ChangeIfGreat(var AInValue, AChangeValue: Integer); - begin - AInValue := Min(AChangeValue, AInValue); - end; - -var - R: TRect; -begin - R := CalcCorrectionBoundsForPanel; - ChangeIfGreat(CaptionRect.Right, R.Right); - ChangeIfGreat(CaptionRect.Bottom, R.Bottom); - ChangeIfLess(CaptionRect.Left, R.Left); - ChangeIfLess(CaptionRect.Top, R.Top); -end; - -procedure TcxGroupBoxViewInfo.DrawHorizontalTextCaption(ACanvas: TcxCanvas); -begin - cxDrawText(ACanvas.Handle, Edit.FVisibleCaption, TextRect, Edit.GetCaptionDrawingFlags); -end; - -procedure TcxGroupBoxViewInfo.DrawVerticalTextCaption(ACanvas: TcxCanvas); -var - AFlags, X, Y: Integer; -begin - AFlags := ETO_CLIPPED; - if Edit.FAlignment in [alLeftTop, alLeftCenter, alLeftBottom] then - begin - X := TextRect.Left; - Y := TextRect.Bottom - 1; - end - else - begin - X := TextRect.Right; - Y := TextRect.Top + 1; - end; - cxExtTextOut(ACanvas.Handle, Edit.FVisibleCaption, Point(X, Y), TextRect, AFlags); -end; - -procedure TcxGroupBoxViewInfo.DrawFrame(ACanvas: TcxCanvas; R: TRect); -begin - if NativeStyle then - begin - if BorderStyle <> ebsNone then - begin - if IsPanelStyle then - Edit.LookAndFeelPainter.DrawBorder(ACanvas, GetBoundsForPanel) - else - TcxWinXPLookAndFeelPainter.DrawGroupBoxFrame( - ACanvas, GetThemeBackgroundRect(ACanvas), Enabled, cxgpCenter); - end; - end - else - begin - if not Assigned(Painter) then - begin - case BorderStyle of - ebsSingle: - ACanvas.FrameRect(R, BorderColor, 1, Edit.ActiveStyle.Edges, True); - ebsThick: - ACanvas.FrameRect(R, BorderColor, 2, Edit.ActiveStyle.Edges, True); - ebsFlat: - TcxFlatLookAndFeelPainter.DrawGroupBoxFrame( - ACanvas, R, Enabled, cxgpCenter, Edit.ActiveStyle.Edges); - ebs3D: - if Edit.Ctl3D then - TcxStandardLookAndFeelPainter.DrawGroupBoxFrame( - ACanvas, R, Enabled, cxgpCenter, Edit.ActiveStyle.Edges) - else - begin - ACanvas.FrameRect(R, clWindowFrame, 1, Edit.ActiveStyle.Edges, True); - InflateRect(R, -1, -1); - ACanvas.FrameRect(R, BackgroundColor, 1, Edit.ActiveStyle.Edges, True); - end; - end; - end; - end; -end; - -function TcxGroupBoxViewInfo.GetThemeBackgroundRect( - ACanvas: TcxCanvas): TRect; -begin - Result := ControlRect; - if not IsPanelStyle then - case Edit.FAlignment of - alTopLeft, alTopCenter, alTopRight: - Result.Top := ACanvas.TextHeight('Qq') div 2; - alBottomLeft, alBottomCenter, alBottomRight: - Dec(Result.Bottom, ACanvas.TextHeight('Qq') div 2); - alLeftTop, alLeftCenter, alLeftBottom: - Result.Left := ACanvas.TextHeight('Qq') div 2; - alRightTop, alRightCenter, alRightBottom: - Dec(Result.Right, ACanvas.TextHeight('Qq') div 2); - end; -end; - -function TcxGroupBoxViewInfo.GetBoundsForPanel: TRect; -begin - Result := Bounds; - if not NativeStyle and (Painter = nil) then - if Edit.HasShadow then - begin - Dec(Result.Right, cxContainerShadowWidth); - Dec(Result.Bottom, cxContainerShadowWidth); - end; -end; - -procedure TcxGroupBoxViewInfo.DrawUsualBackground(ACanvas: TcxCanvas); -begin - if Edit.HasShadow then - DrawContainerShadow(ACanvas, GetFrameBounds); - - if not Transparent then - begin - if Edit.IsTransparent then - cxDrawTransparentControlBackground(Edit, ACanvas, ControlRect) - else - cxEditFillRect(ACanvas, ControlRect, BackgroundColor); - end; -end; - -procedure TcxGroupBoxViewInfo.DrawNativeBackground(ACanvas: TcxCanvas; - const ACaptionRect: TRect); -begin - if IsPanelStyle then - DrawNativePanelBackground(ACanvas, ACaptionRect) - else - DrawNativeGroupBoxBackground(ACanvas); -end; - -procedure TcxGroupBoxViewInfo.DrawNativeGroupBoxBackground( - ACanvas: TcxCanvas); -var - AClipRgn: TcxRegion; - ANativeState: Integer; - ATheme: TdxTheme; -begin - AClipRgn := ACanvas.GetClipRegion; - try - ATheme := OpenTheme(totButton); - ANativeState := cxNativeState[Enabled]; - if Edit.IsTransparent then - cxDrawTransparentControlBackground(Edit, ACanvas, Bounds) - else - if Edit.IsNativeBackground and - IsThemeBackgroundPartiallyTransparent(ATheme, BP_GROUPBOX, ANativeState) then - begin - cxDrawThemeParentBackground(Edit, ACanvas, Bounds); - ACanvas.Canvas.Refresh; // SC-B31215 - end - else - cxEditFillRect(ACanvas.Handle, Bounds, GetSolidBrush(ACanvas, BackgroundColor)); - finally - ACanvas.SetClipRegion(AClipRgn, roSet); - end; -end; - -procedure TcxGroupBoxViewInfo.DrawNativePanelBackground( - ACanvas: TcxCanvas; const ACaptionRect: TRect); -var - ABackgroundRect: TRect; -begin - ABackgroundRect := GetBoundsForPanel; - if BorderStyle <> ebsNone then - InflateRect(ABackgroundRect, -Edit.LookAndFeelPainter.BorderSize, -Edit.LookAndFeelPainter.BorderSize); - - if Edit.IsTransparent then - begin - ACanvas.SaveClipRegion; - try - ACanvas.SetClipRegion(TcxRegion.Create(ABackgroundRect), roIntersect); - Edit.LookAndFeelPainter.DrawPanelBackground(ACanvas, Edit, GetBoundsForPanel); - finally - ACanvas.RestoreClipRegion; - end; - end - else - if Edit.LookAndFeel.NativeStyle then - if Edit.IsNativeBackground then - cxDrawThemeParentBackground(Edit, ACanvas, ABackgroundRect) - else - Edit.LookAndFeelPainter.DrawPanelBackground(ACanvas, Edit, ABackgroundRect, BackgroundColor) - else - if Edit.LookAndFeel.Kind = lfOffice11 then - DrawOffice11PanelBackground(ACanvas, ABackgroundRect); -end; - -procedure TcxGroupBoxViewInfo.DrawOffice11PanelBackground(ACanvas: TcxCanvas; const R: TRect); -begin - with Edit.LookAndFeelPainter do - case Edit.PanelStyle.OfficeBackgroundKind of - pobkGradient: - DrawPanelBackground(ACanvas, Edit, R, dxOffice11ToolbarsColor1, dxOffice11ToolbarsColor2); - pobkOffice11Color: - DrawPanelBackground(ACanvas, Edit, R, GetMiddleRGB(dxOffice11ToolbarsColor1, dxOffice11ToolbarsColor2, 50)); - pobkStyleColor: - DrawPanelBackground(ACanvas, Edit, R, BackgroundColor); - end; -end; - -procedure TcxGroupBoxViewInfo.InternalDrawBackground(ACanvas: TcxCanvas); -begin - if NativeStyle or (IsPanelStyle and Assigned(Edit.LookAndFeelPainter) and - (Edit.LookAndFeelPainter = TcxOffice11LookAndFeelPainter)) then - DrawNativeBackground(ACanvas, CaptionRect) - else - begin - ACanvas.SaveClipRegion; - try - if Painter = nil then - DrawUsualBackground(ACanvas) - else - InternalDrawBackgroundByPainter(ACanvas); - finally - ACanvas.RestoreClipRegion; - end; - end; -end; - -procedure TcxGroupBoxViewInfo.InternalDrawBackgroundByPainter(ACanvas: TcxCanvas); -var - ABounds: TRect; - ACaptionPos: TcxGroupBoxCaptionPosition; -begin - if IsPanelStyle then - ABounds := GetBoundsForPanel - else - if BorderStyle = ebsNone then - ABounds := Bounds - else - ABounds := BorderRect; -{$IFDEF DELPHI7} - if not Edit.DoCustomDrawContentBackground(ACanvas, ABounds, Painter) then - begin -{$ENDIF} - if IsPanelStyle then - Painter.DrawPanelContent(ACanvas, ABounds, BorderStyle <> ebsNone) - else - begin - if BorderStyle = ebsNone then - Painter.DrawGroupBoxBackground(ACanvas, ABounds, ABounds) - else - begin - ACaptionPos := cxGroupBoxAlignment2GroupBoxCaption(Edit.Alignment); - if Edit.FVisibleCaption = '' then - ACaptionPos := cxgpCenter; - if Painter.IsGroupBoxTransparent(False, ACaptionPos) or - Painter.IsGroupBoxTransparent(True, ACaptionPos) - then - cxDrawTransparentControlBackground(Edit, ACanvas, ControlRect); - Painter.DrawGroupBoxContent(ACanvas, ABounds, ACaptionPos, Edges); - end; - end; -{$IFDEF DELPHI7} - end; -{$ENDIF} -end; - -{ TcxGroupBoxViewData } - -procedure TcxGroupBoxViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); -var - AEditViewInfo: TcxGroupBoxViewInfo; -begin - AEditViewInfo := TcxGroupBoxViewInfo(AViewInfo); - AEditViewInfo.IsDesigning := IsDesigning; - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - - if not IsInplace then - begin - Edit.CalculateCaptionFont; - Edit.CalculateVisibleCaption; - CalcRects(ACanvas, AEditViewInfo); - end; -end; - -function TcxGroupBoxViewData.GetBorderColor: TColor; -begin - if Style.BorderStyle in [ebsUltraFlat, ebsOffice11] then - begin - if Enabled then - Result := GetEditBorderHighlightColor(Style.BorderStyle = ebsOffice11) - else - Result := clBtnShadow; - end - else - Result := Style.BorderColor; -end; - -function TcxGroupBoxViewData.GetBorderExtent: TRect; -var - AHeaderSideBorderOffset: Integer; -begin - Result := inherited GetBorderExtent; - if not IsInplace and (Edit.FAlignment <> alCenterCenter) and not IsPanelStyle then - begin - AHeaderSideBorderOffset := cxTextHeight(Edit.FCaptionFont) div 2 - 1 + cxEditMaxBorderWidth; - case Edit.FAlignment of - alTopLeft, alTopCenter, alTopRight: - Result.Top := AHeaderSideBorderOffset; - alBottomLeft, alBottomCenter, alBottomRight: - Result.Bottom := AHeaderSideBorderOffset; - alLeftTop, alLeftCenter, alLeftBottom: - Result.Left := AHeaderSideBorderOffset - 1; - alRightTop, alRightCenter, alRightBottom: - Result.Right := AHeaderSideBorderOffset - 1; - end; - end; -end; - -function TcxGroupBoxViewData.GetClientExtent( - ACanvas: TcxCanvas; AViewInfo: TcxCustomEditViewInfo): TRect; -var - AContentOffsets: TRect; - AHeaderSideClientExtent: Integer; -begin - Result := inherited GetBorderExtent; - if not (IsInplace or (AViewInfo = nil) or (AViewInfo.Painter = nil)) then - begin - if IsPanelStyle then - AContentOffsets := AViewInfo.Painter.PanelBorderSize - else - AContentOffsets := AViewInfo.Painter.GroupBoxBorderSize( - False, cxGroupBoxAlignment2GroupBoxCaption(Edit.Alignment)); - - Inc(Result.Top, AContentOffsets.Top); - Inc(Result.Left, AContentOffsets.Left); - Inc(Result.Right, AContentOffsets.Right); - Inc(Result.Bottom, AContentOffsets.Bottom); - - if HasNonClientArea then - begin - case cxGroupBoxAlignment2GroupBoxCaption(Edit.Alignment) of - cxgpTop: - Inc(Result.Bottom, TcxGroupBoxViewInfo(AViewInfo).CaptionRectIndent.Top); - cxgpLeft: - Inc(Result.Right, TcxGroupBoxViewInfo(AViewInfo).CaptionRectIndent.Left); - end; - end; - end; - - if not (IsInplace or IsPanelStyle) and (Edit.FAlignment <> alCenterCenter) then - begin - AHeaderSideClientExtent := cxTextHeight(Edit.FCaptionFont) + Result.Top + cxEditMaxBorderWidth + 1; - case Edit.FAlignment of - alTopLeft, alTopCenter, alTopRight: - Result.Top := AHeaderSideClientExtent; - alBottomLeft, alBottomCenter, alBottomRight: - Result.Bottom := AHeaderSideClientExtent; - alLeftTop, alLeftCenter, alLeftBottom: - Result.Left := AHeaderSideClientExtent; - alRightTop, alRightCenter, alRightBottom: - Result.Right := AHeaderSideClientExtent; - end; - end; -end; - -function TcxGroupBoxViewData.HasShadow: Boolean; -begin - Result := Edit.HasShadow and inherited HasShadow; -end; - -class function TcxGroupBoxViewData.IsNativeStyle(ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := AreVisualStylesMustBeUsed( - ALookAndFeel.NativeStyle or (ALookAndFeel.Kind = lfOffice11), totEdit) and - (ALookAndFeel.SkinPainter = nil); -end; - -function TcxGroupBoxViewData.GetContainerState(const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): TcxContainerState; -begin - if Enabled then - Result := [csNormal] - else - Result := [csDisabled]; -end; - -function TcxGroupBoxViewData.IsPanelStyle: Boolean; -begin - Result := (Edit <> nil) and Edit.IsPanelStyle; -end; - -function TcxGroupBoxViewData.HasNonClientArea: Boolean; -begin - Result := not IsInplace and Edit.HasNonClientArea; -end; - -function TcxGroupBoxViewData.GetShadowWidth: Integer; -begin - Result := 0; - if HasShadow then - Result := cxContainerShadowWidth; -end; - -function TcxGroupBoxViewData.GetCaptionRect(ACanvas: TcxCanvas): TRect; -var - ACaptionSize: TSize; -begin - if Edit.FVisibleCaption = '' then - begin - Result := cxEmptyRect; - Exit; - end; - Edit.AdjustCanvasFontSettings(ACanvas); - with ACanvas do - begin - ACaptionSize := cxTextExtent(Font, Edit.FVisibleCaption); - Result := Rect(0, 0, ACaptionSize.cx, ACaptionSize.cy); - OffsetRect(Result, cxCaptionRectLeftBound, 0); - if not Edit.IsVerticalText then - AdjustHorizontalCaptionRect(Result) - else - AdjustVerticalCaptionRect(Result); - //B93506 - //InflateRect(Result, 1, 1); - end; -end; - -procedure TcxGroupBoxViewData.AdjustHorizontalCaptionRect(var R: TRect); -var - AShadowWidth: Integer; -begin - AShadowWidth := GetShadowWidth; - - case Edit.FAlignment of - alTopCenter, alBottomCenter, alCenterCenter: - OffsetRect(R, -R.Left + (Edit.Width - AShadowWidth - (R.Right - R.Left)) div 2, 0); - alTopRight, alRightTop, alRightCenter, alRightBottom, alBottomRight: - OffsetRect(R, Edit.Width - R.Right - R.Left - AShadowWidth, 0); - end; - case Edit.FAlignment of - alLeftCenter, alRightCenter, alCenterCenter: - OffsetRect(R, 0, -R.Top + (Edit.Height - AShadowWidth - - (R.Bottom - R.Top)) div 2); - alLeftBottom, alBottomLeft, alBottomCenter, alBottomRight, alRightBottom: - R := Rect(R.Left, Edit.Height - R.Top - - (R.Bottom - R.Top), R.Right, Edit.Height - R.Top); - end -end; - -procedure TcxGroupBoxViewData.AdjustVerticalCaptionRect(var R: TRect); -var - AShadowWidth, ATextWidth: Integer; -begin - AShadowWidth := GetShadowWidth; - ATextWidth := R.Right - R.Left; - - case Edit.FAlignment of - alLeftTop: - begin - R := Rect(R.Top, R.Left, R.Bottom, 0); - R.Bottom := R.Top + ATextWidth + 1; - end; - alLeftCenter: - begin - R := Rect(R.Top, 0, R.Bottom, - Edit.Height - AShadowWidth - (Edit.Height - AShadowWidth - ATextWidth) div 2); - R.Top := R.Bottom - ATextWidth - 1; - end; - alLeftBottom: - begin - R := Rect(R.Top, 0, R.Bottom, - Edit.Height - AShadowWidth - R.Left); - R.Top := R.Bottom - ATextWidth - 1; - end; - alRightTop: - R := Rect(Edit.Width - R.Bottom, R.Left, - Edit.Width - R.Top, R.Left + ATextWidth); - alRightCenter: - begin - R := Rect(Edit.Width - R.Bottom, - (Edit.Height - ATextWidth) div 2, Edit.Width - R.Top, 0); - R.Bottom := R.Top + ATextWidth; - end; - alRightBottom: - R := Rect(Edit.Width - R.Bottom, - Edit.Height - R.Left - ATextWidth, Edit.Width - R.Top, - Edit.Height - R.Left); - end; -end; - -function TcxGroupBoxViewData.GetEdit: TcxCustomGroupBox; -begin - Result := TcxCustomGroupBox(FEdit); -end; - -procedure TcxGroupBoxViewData.CalcRects(ACanvas: TcxCanvas; - AEditViewInfo: TcxGroupBoxViewInfo); - - procedure CalculateBorderRect(var R: TRect; const AIndent: TRect; - ACaptionPosition: TcxGroupBoxCaptionPosition); - begin - if HasNonClientArea then - case ACaptionPosition of - cxgpTop: - Dec(R.Bottom, AIndent.Top); - cxgpLeft: - Dec(R.Right, AIndent.Left); - end; - end; - - procedure CalculateCaptionRect(var R: TRect; const AIndent: TRect; - const ATextSize: TSize; ACaptionPosition: TcxGroupBoxCaptionPosition); - begin - case ACaptionPosition of - cxgpBottom: - R.Top := R.Bottom - ATextSize.cy - AIndent.Bottom; - cxgpRight: - R.Left := R.Right - ATextSize.cy - AIndent.Right; - cxgpCenter: - R := cxRectCenter(R, ATextSize); - cxgpLeft: - begin - R.Right := R.Left + ATextSize.cy; - if HasNonClientArea then - Dec(R.Left, AIndent.Left) - else - Inc(R.Right, AIndent.Left); - end; - cxgpTop: - begin - R.Bottom := R.Top + ATextSize.cy; - if HasNonClientArea then - Dec(R.Top, AIndent.Top) - else - Inc(R.Bottom, AIndent.Top); - end; - end; - end; - - procedure CalculateTextRect(const ABorderSize: TRect; ATextWidth: Integer); - begin - with AEditViewInfo do - begin - TextRect := cxRectContent(CaptionRect, ABorderSize); - if Edit.Alignment in [alTopRight, alBottomRight] then - TextRect.Left := TextRect.Right - ATextWidth; - if Edit.Alignment in [alTopCenter, alBottomCenter] then - TextRect.Left := (TextRect.Left + TextRect.Right - ATextWidth) div 2; - if Edit.Alignment in [alLeftTop, alRightTop] then - TextRect.Bottom := TextRect.Top + ATextWidth; - if Edit.Alignment in [alLeftBottom, alRightBottom] then - TextRect.Top := TextRect.Bottom - ATextWidth; - if Edit.Alignment in [alLeftCenter, alRightCenter] then - begin - TextRect.Top := (TextRect.Bottom + TextRect.Top - ATextWidth) div 2; - TextRect.Bottom := TextRect.Top + ATextWidth; - end; - end; - end; - -var - ACaptionPos: TcxGroupBoxCaptionPosition; - ARect: TRect; - ATextSize: TSize; -begin - if IsPanelStyle then - begin - AEditViewInfo.CalcBoundsForPanel; - Exit; - end; - - if Style.LookAndFeel.SkinPainter = nil then - begin - AEditViewInfo.CaptionRect := GetCaptionRect(ACanvas); - AEditViewInfo.TextRect := AEditViewInfo.CaptionRect; - end - else - with AEditViewInfo do - begin - ARect := GetCaptionRectIndent; - BorderRect := ControlRect; - CaptionRect := BorderRect; - Edit.AdjustCanvasFontSettings(ACanvas); - ATextSize := ACanvas.TextExtent(Edit.FVisibleCaption); - ATextSize.cy := Max(ATextSize.cy, ACanvas.TextHeight('Qq')); - ACaptionPos := cxGroupBoxAlignment2GroupBoxCaption(Edit.Alignment); - CalculateCaptionRect(CaptionRect, ARect, ATextSize, ACaptionPos); - CalculateBorderRect(BorderRect, ARect, ACaptionPos); - CalculateTextRect(Style.LookAndFeel.SkinPainter.GroupBoxBorderSize(True, - ACaptionPos), ATextSize.cx); - AdjustCaptionRect(ACaptionPos); - end; -end; - -{ TcxButtonGroupViewInfo } - -procedure TcxButtonGroupViewInfo.DrawEditButton(ACanvas: TcxCanvas; - AButtonVisibleIndex: Integer); -var - AButtonViewInfo: TcxGroupBoxButtonViewInfo; - AGlyphRect: TRect; -begin - AButtonViewInfo := TcxGroupBoxButtonViewInfo(ButtonsInfo[AButtonVisibleIndex]); - AGlyphRect := AButtonViewInfo.GetGlyphRect(ACanvas, GetGlyphSize, - Alignment, IsDBEditPaintCopyDrawing); - if not IsDBEditPaintCopyDrawing then - DrawEditBackground(ACanvas, AButtonViewInfo.Bounds, AGlyphRect, - IsButtonGlypthTransparent(AButtonViewInfo)); - DrawButtonGlyph(ACanvas, AButtonViewInfo, AGlyphRect); - DrawButtonCaption(ACanvas, AButtonViewInfo, AGlyphRect); -end; - -function TcxButtonGroupViewInfo.GetGlyphSize: TSize; -begin - Result := GlyphSize; -end; - -{ TcxButtonGroupViewData } - -procedure TcxButtonGroupViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, - AIsMouseEvent); - with TcxButtonGroupViewInfo(AViewInfo) do - begin - DrawTextFlags := GetDrawTextFlags; - CaptionExtent := GetCaptionRectExtent; - end; -end; - -procedure TcxButtonGroupViewData.CalculateButtonsViewInfo(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); - - procedure CalculateButtonStates; - var - AButtonsCount, APrevPressedButton, I: Integer; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; - ACapturePressing, AHoldPressing, AIsButtonPressed, AMouseButtonPressing: Boolean; - begin - AButtonsCount := Properties.Items.Count; - AViewInfo.IsButtonReallyPressed := False; - if AIsMouseEvent then - APrevPressedButton := AViewInfo.PressedButton - else - APrevPressedButton := -1; - AViewInfo.PressedButton := -1; - AViewInfo.SelectedButton := -1; - - for I := 0 to AButtonsCount - 1 do - begin - AButtonViewInfo := TcxGroupBoxButtonViewInfo(AViewInfo.ButtonsInfo[I]); - AButtonViewInfo.Index := I; - AButtonViewInfo.Data.NativeStyle := IsButtonNativeStyle(Style.LookAndFeel); - AButtonViewInfo.Data.Transparent := (Self.Style.ButtonTransparency = ebtAlways) or - (Self.Style.ButtonTransparency = ebtInactive) and not Selected; - - AButtonViewInfo.Data.BackgroundColor := AViewInfo.BackgroundColor; - AIsButtonPressed := IsButtonPressed(AViewInfo, I); - with AButtonViewInfo do - begin - if not Enabled then - Data.State := ebsDisabled - else - if AIsButtonPressed or (not IsDesigning and PtInRect(AButtonViewInfo.Bounds, P)) then - begin - ACapturePressing := (Button = cxmbNone) and (ButtonToShift(mbLeft) * - Shift <> []) and (Data.State = ebsNormal) and (GetCaptureButtonVisibleIndex = - I); - AMouseButtonPressing := (Button = ButtonTocxButton(mbLeft)) and - ((Shift = ButtonToShift(mbLeft)) or - (Shift = ButtonToShift(mbLeft) + [ssDouble])); - AHoldPressing := (Data.State = ebsPressed) and (Shift * ButtonToShift(mbLeft) <> []); - if AIsButtonPressed or AMouseButtonPressing or AHoldPressing or - ACapturePressing then - AViewInfo.IsButtonReallyPressed := True; - if not AIsButtonPressed and (Shift = []) and not ACapturePressing then - begin - Data.State := ebsSelected; - AViewInfo.SelectedButton := I; - end - else - if (AIsButtonPressed or ACapturePressing and CanPressButton(AViewInfo, I) or ((Shift = [ssLeft]) or (Shift = [ssLeft, ssDouble])) and - ((Button = cxmbLeft) and CanPressButton(AViewInfo, I) or - (APrevPressedButton = I))) or AHoldPressing then - begin - Data.State := ebsPressed; - AViewInfo.PressedButton := I; - end - else - Data.State := ebsNormal; - end - else - Data.State := ebsNormal; - - CalculateButtonNativeState(AViewInfo, AButtonViewInfo); - end; - end; - end; - -var - AButtonsCount: Integer; -begin - AButtonsCount := Properties.Items.Count; - TcxGroupBoxViewInfo(AViewInfo).SetButtonCount(AButtonsCount); - if AButtonsCount = 0 then - Exit; - - CalculateButtonViewInfos(AViewInfo); - CalculateButtonPositions(ACanvas, AViewInfo); - CalculateButtonStates; -end; - -function TcxButtonGroupViewData.GetEditConstantPartSize(ACanvas: TcxCanvas; - const AEditSizeProperties: TcxEditSizeProperties; - var MinContentSize: TSize; AViewInfo: TcxCustomEditViewInfo = nil): TSize; -var - AButtonsCount, AButtonsPerColumn, AColumnsCount: Integer; - ACaption: string; - AColumnWidth, AMaxButtonHeight: Integer; - ADefaultButtonHeight, AButtonHeight: Integer; - AFlags: Integer; - AMaxColumnWidth: Integer; - ASizeCorrection: TSize; - ATextWidth: Integer; - I: Integer; - R: TRect; - AEditMetrics: TcxEditMetrics; -begin - MinContentSize := cxNullSize; - ACanvas.Font := Style.GetVisibleFont; - ASizeCorrection := Self.GetEditContentSizeCorrection; - AButtonsCount := Properties.Items.Count; - AColumnsCount := Properties.GetColumnCount; - GetEditMetrics(AEditSizeProperties.Width >= 0, ACanvas, AEditMetrics); - ADefaultButtonHeight := ACanvas.TextHeight('Zg') + ASizeCorrection.cy; - if AEditSizeProperties.Width >= 0 then - begin - Result.cx := AEditSizeProperties.Width; - if AButtonsCount = 0 then - Result.cy := ADefaultButtonHeight - else - begin - Result.cy := 0; - AButtonsPerColumn := Properties.GetButtonsPerColumn; - AColumnWidth := AEditSizeProperties.Width - ContentOffset.Left - - ContentOffset.Right + AEditMetrics.AutoHeightWidthCorrection - - AEditMetrics.ColumnOffset * (AColumnsCount - 1); - AColumnWidth := AColumnWidth div AColumnsCount - AEditMetrics.ButtonSize.cx - - AEditMetrics.AutoHeightColumnWidthCorrection; - if AColumnWidth <= 0 then - AColumnWidth := 1; - AMaxButtonHeight := ADefaultButtonHeight; - Include(PaintOptions, epoAutoHeight); - AFlags := GetDrawTextFlags and not cxAlignVCenter or cxAlignTop; - for I := 0 to AButtonsCount - 1 do - begin - R := Rect(0, 0, AColumnWidth, MaxInt); - ACaption := Properties.Items[I].Caption; - if Properties.WordWrap and (ACaption <> '') then - begin - ACanvas.TextExtent(ACaption, R, AFlags); - AButtonHeight := R.Bottom - R.Top + ASizeCorrection.cy; - if AMaxButtonHeight < AButtonHeight then - AMaxButtonHeight := AButtonHeight; - end; - end; - Result.cy := AMaxButtonHeight * AButtonsPerColumn; - if not IsInplace then - begin - R := GetClientExtent(ACanvas, AViewInfo); - Result.cy := Result.cy + R.Top + R.Bottom; - end; - end; - end else - begin - if AButtonsCount = 0 then - begin - Result.cx := 0; - Result.cy := ACanvas.TextHeight('Zg') + ASizeCorrection.cy; - end else - begin - AMaxColumnWidth := 0; - AButtonsPerColumn := Properties.GetButtonsPerColumn; - for I := 0 to AButtonsCount - 1 do - begin - ATextWidth := ACanvas.TextWidth(Properties.Items[I].Caption); - if ATextWidth > AMaxColumnWidth then - AMaxColumnWidth := ATextWidth; - end; - Result.cx := (AMaxColumnWidth + AEditMetrics.ColumnWidthCorrection + AEditMetrics.ButtonSize.cx) * - AColumnsCount + AEditMetrics.ColumnOffset * (AColumnsCount - 1) + AEditMetrics.WidthCorrection; - if ADefaultButtonHeight > AEditMetrics.ButtonSize.cy then - Result.cy := ADefaultButtonHeight - else - Result.cy := AEditMetrics.ButtonSize.cy; - Result.cy := Result.cy * AButtonsPerColumn; - end; - end; -end; - -class function TcxButtonGroupViewData.IsButtonNativeStyle( - ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := AreVisualStylesMustBeUsed(ALookAndFeel.NativeStyle, totButton); -end; - -procedure TcxButtonGroupViewData.CalculateButtonPositions(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo); -var - AButtonsCount, AButtonsPerColumn, AButtonHeight, AButtonWidth, AClientHeight, - AColumnsCount, ATopOffset, I: Integer; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; - AClientExtent: TRect; - AEditMetrics: TcxEditMetrics; -begin - AButtonsCount := Properties.Items.Count; - AColumnsCount := Properties.GetColumnCount; - AButtonsPerColumn := Properties.GetButtonsPerColumn; - AClientExtent := GetClientExtent(ACanvas, AViewInfo); - GetEditMetrics(False, nil, AEditMetrics); - AButtonWidth := (Bounds.Right - Bounds.Left - (AClientExtent.Left + - AClientExtent.Right) + AEditMetrics.ClientWidthCorrection - - AEditMetrics.ColumnOffset * (AColumnsCount - 1)) div AColumnsCount; - AClientHeight := Bounds.Bottom - Bounds.Top - AClientExtent.Top - AClientExtent.Bottom; - - ATopOffset := Bounds.Top + AClientExtent.Top + (AClientHeight mod AButtonsPerColumn) div 2; - - AButtonHeight := AClientHeight div AButtonsPerColumn; - - for I := 0 to AButtonsCount - 1 do - begin - AButtonViewInfo := TcxGroupBoxButtonViewInfo(AViewInfo.ButtonsInfo[I]); - AButtonViewInfo.Bounds.Left := Bounds.Left + AClientExtent.Left + - AButtonViewInfo.Column * (AButtonWidth + AEditMetrics.ColumnOffset) + - AEditMetrics.ClientLeftBoundCorrection; - AButtonViewInfo.Bounds.Top := ATopOffset + AButtonViewInfo.Row * AButtonHeight; - AButtonViewInfo.Bounds.Right := AButtonViewInfo.Bounds.Left + AButtonWidth; - AButtonViewInfo.Bounds.Bottom := AButtonViewInfo.Bounds.Top + AButtonHeight; - AButtonViewInfo.VisibleBounds := AButtonViewInfo.Bounds; - end; -end; - -procedure TcxButtonGroupViewData.CalculateButtonViewInfos(AViewInfo: TcxCustomEditViewInfo); - - function GetButtonStyle: TcxEditButtonStyle; - const - AButtonInplaceStyleMap: array[TcxLookAndFeelKind] of TcxEditButtonStyle = - (btsFlat, bts3D, btsUltraFlat, - btsOffice11); - AButtonStyleMap: array [TcxEditBorderStyle] of TcxEditButtonStyle = - (bts3D, btsFlat, btsFlat, btsFlat, bts3D, btsUltraFlat, - btsOffice11); - begin - if IsInplace then - Result := AButtonInplaceStyleMap[Style.LookAndFeel.Kind] - else - case Style.BorderStyle of - ebsUltraFlat: - Result := btsUltraFlat; - ebsOffice11: - Result := btsOffice11; - else - Result := AButtonStyleMap[AViewInfo.BorderStyle]; - end; - end; - -var - AButtonsCount, AButtonsPerColumn, I: Integer; - AButtonStyle: TcxEditButtonStyle; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; -begin - AButtonStyle := GetButtonStyle; - AButtonsCount := Properties.Items.Count; - AButtonsPerColumn := Properties.GetButtonsPerColumn; - - for I := 0 to AButtonsCount - 1 do - begin - AButtonViewInfo := TcxGroupBoxButtonViewInfo(AViewInfo.ButtonsInfo[I]); - with AButtonViewInfo do - begin - HasBackground := AViewInfo.HasBackground; - Data.Style := AButtonStyle; - Caption := Properties.FItems[I].Caption; - Column := I div AButtonsPerColumn; - Row := I mod AButtonsPerColumn; - end; - end; -end; - -function TcxButtonGroupViewData.GetDrawTextFlags: Integer; -begin - Result := cxAlignLeft or cxAlignVCenter or cxShowPrefix; - if (epoAutoHeight in PaintOptions) and Properties.WordWrap then - begin - Result := Result or cxDontClip; - Result := Result or cxWordBreak; - end - else - Result := Result or cxSingleLine; -end; - -function TcxButtonGroupViewData.GetCaptionRectExtent: TRect; -begin - Result := cxEmptyRect; -end; - -function TcxButtonGroupViewData.GetProperties: TcxCustomButtonGroupProperties; -begin - Result := TcxCustomButtonGroupProperties(FProperties); -end; - -{ TcxCustomGroupBoxProperties } - -class function TcxCustomGroupBoxProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxCustomGroupBox; -end; - -class function TcxCustomGroupBoxProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxGroupBoxViewInfo; -end; - -class function TcxCustomGroupBoxProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxGroupBoxViewData; -end; - -{ TcxButtonGroupItem } - -constructor TcxButtonGroupItem.Create(Collection: TCollection); -begin - if Assigned(Collection) then - Collection.BeginUpdate; - try - inherited Create(Collection); - FEnabled := True; - DoChanged(Collection, copAdd); - finally - if Assigned(Collection) then - Collection.EndUpdate; - end; -end; - -destructor TcxButtonGroupItem.Destroy; -var - ACollection: TCollection; - AIndex: Integer; -begin - ACollection := Collection; - if not IsCollectionDestroying then - AIndex := Index - else - AIndex := -1; - if Assigned(ACollection) then - ACollection.BeginUpdate; - try - inherited Destroy; - DoChanged(ACollection, copDelete, AIndex); - finally - if Assigned(ACollection) then - ACollection.EndUpdate; - end; -end; - -procedure TcxButtonGroupItem.Assign(Source: TPersistent); -begin - if Source is TcxButtonGroupItem then - Self.Enabled := TcxButtonGroupItem(Source).Enabled; - inherited Assign(Source); -end; - -procedure TcxButtonGroupItem.DoChanged(ACollection: TCollection; - ACollectionOperation: TcxCollectionOperation; AIndex: Integer = -1); -begin - if Assigned(ACollection) then - if AIndex = -1 then - TcxButtonGroupItems(ACollection).InternalNotify(Self, AIndex, ACollectionOperation) - else - TcxButtonGroupItems(ACollection).InternalNotify(nil, AIndex, ACollectionOperation); -end; - -function TcxButtonGroupItem.GetIsCollectionDestroying: Boolean; -begin - Result := (Collection <> nil) and TcxButtonGroupItems(Collection).IsDestroying; -end; - -procedure TcxButtonGroupItem.SetEnabled(Value: Boolean); -begin - if Value <> FEnabled then - begin - FEnabled := Value; - DoChanged(Collection, copChanged); - end; -end; - -{ TcxButtonGroupItems } - -procedure TcxButtonGroupItems.InternalNotify(AItem: TcxButtonGroupItem; - AItemIndex: Integer; AItemOperation: TcxCollectionOperation); -begin - if TcxCustomEditProperties(GetOwner).ChangedLocked or IsDestroying then - Exit; - if AItem <> nil then - FChangedItemIndex := AItem.Index - else - FChangedItemIndex := AItemIndex; - FChangedItemOperation := AItemOperation; - FItemChanged := True; - try - TcxCustomEditProperties(GetOwner).Changed; - finally - FItemChanged := False; - end; -end; - -procedure TcxButtonGroupItems.Update(Item: TCollectionItem); -begin - if IsDestroying then Exit; - if not TcxCustomEditProperties(GetOwner).ChangedLocked then - begin - if Item <> nil then - begin - FChangedItemIndex := Item.Index; - FChangedItemOperation := copChanged; - end; - inherited; - end; - - TcxCustomEditProperties(GetOwner).Changed; -end; - -function TcxButtonGroupItems.GetItem(Index: Integer): TcxButtonGroupItem; -begin - Result := TcxButtonGroupItem(inherited Items[Index]); -end; - -procedure TcxButtonGroupItems.SetItem(Index: Integer; Value: TcxButtonGroupItem); -begin - inherited Items[Index] := Value; -end; - -{ TcxCustomButtonGroupProperties } - -constructor TcxCustomButtonGroupProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FColumns := 1; - FItems := CreateItems; -end; - -destructor TcxCustomButtonGroupProperties.Destroy; -begin - BeginUpdate; - try - FreeAndNil(FItems); - finally - EndUpdate(False); - end; - inherited Destroy; -end; - -procedure TcxCustomButtonGroupProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomButtonGroupProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomButtonGroupProperties do - begin - Self.Columns := Columns; - Self.Items := Items; - Self.WordWrap := WordWrap; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomButtonGroupProperties.CreatePreviewProperties: TcxCustomEditProperties; -const - AItemCaptions: array [0..2] of string = ('A', 'B', 'C'); -var - I: Integer; -begin - Result := inherited CreatePreviewProperties; - for I := 0 to High(AItemCaptions) do - TcxButtonGroupItem(TcxCustomButtonGroupProperties(Result).Items.Add).Caption := AItemCaptions[I]; - TcxCustomButtonGroupProperties(Result).Columns := 3; -end; - -class function TcxCustomButtonGroupProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxCustomButtonGroup; -end; - -function TcxCustomButtonGroupProperties.GetSpecialFeatures: TcxEditSpecialFeatures; -begin - Result := inherited GetSpecialFeatures + [esfMinSize]; -end; - -function TcxCustomButtonGroupProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := [esoAlwaysHotTrack, esoAutoHeight, esoEditing, esoFiltering, - esoShowingCaption, esoSorting, esoTransparency]; - if Items.Count > 0 then - Include(Result, esoHotTrack); -end; - -class function TcxCustomButtonGroupProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxButtonGroupViewInfo; -end; - -class function TcxCustomButtonGroupProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxButtonGroupViewData; -end; - -function TcxCustomButtonGroupProperties.GetColumnCount: Integer; -var - AButtonCount, AButtonsPerColumn: Integer; -begin - Result := Columns; - AButtonCount := Items.Count; - if Result > AButtonCount then - Result := AButtonCount; - if AButtonCount > 0 then - begin - if Result = 0 then - Result := 1; - AButtonsPerColumn := (AButtonCount + Result - 1) div Result; - Result := (AButtonCount + AButtonsPerColumn - 1) div AButtonsPerColumn; - end; -end; - -function TcxCustomButtonGroupProperties.CreateItems: TcxButtonGroupItems; -begin - Result := TcxButtonGroupItems.Create(Self, TcxButtonGroupItem); -end; - -function TcxCustomButtonGroupProperties.GetButtonsPerColumn: Integer; -var - AColumnsCount: Integer; -begin - AColumnsCount := GetColumnCount; - Result := (Items.Count + AColumnsCount - 1) div AColumnsCount; -end; - -procedure TcxCustomButtonGroupProperties.SetColumns(Value: Integer); -begin - if Value < 1 then - Value := 1; - if Value <> FColumns then - begin - FColumns := Value; - Changed; - end; -end; - -procedure TcxCustomButtonGroupProperties.SetItems(Value: TcxButtonGroupItems); -begin - FItems.Assign(Value); -end; - -procedure TcxCustomButtonGroupProperties.SetWordWrap(Value: Boolean); -begin - if Value <> FWordWrap then - begin - FWordWrap := Value; - Changed; - end; -end; - -{ TcxPanelStyle } - -constructor TcxPanelStyle.Create(AOwner: TcxCustomGroupBox); -begin - inherited Create; - FEdit := AOwner; - FCaptionIndent := 2; - FActive := False; - FOfficeBackgroundKind := pobkOffice11Color; - FWordWrap := False; -end; - -procedure TcxPanelStyle.Assign(ASource: TPersistent); -begin - if ASource is TcxPanelStyle then - begin - Active := TcxPanelStyle(ASource).Active; - CaptionIndent := TcxPanelStyle(ASource).CaptionIndent; - WordWrap := TcxPanelStyle(ASource).WordWrap; - OfficeBackgroundKind := TcxPanelStyle(ASource).OfficeBackgroundKind; - end - else - inherited Assign(ASource); -end; - -procedure TcxPanelStyle.SetActive(AValue: Boolean); -begin - if AValue <> FActive then - begin - FActive := AValue; - Update; - end; -end; - -procedure TcxPanelStyle.SetBorderWidth(AValue: TBorderWidth); -begin - if AValue <> FBorderWidth then - begin - FBorderWidth := AValue; - if Active then - Update; - end; -end; - -procedure TcxPanelStyle.SetCaptionIndent(AValue: Integer); -begin - AValue := Max(2, AValue); - if AValue <> FCaptionIndent then - begin - FCaptionIndent := AValue; - if FActive then - Update; - end; -end; - -procedure TcxPanelStyle.SetOfficeBackgroundKind( - AValue: TcxPanelOffice11BackgroundKind); -begin - if FOfficeBackgroundKind <> AValue then - begin - FOfficeBackgroundKind := AValue; - if FActive and (Edit.LookAndFeel.Kind = lfOffice11) then - Update; - end; -end; - -procedure TcxPanelStyle.SetWordWrap(AValue: Boolean); -begin - if AValue <> FWordWrap then - begin - FWordWrap := AValue; - if FActive then - Update; - end; -end; - -procedure TcxPanelStyle.Update; -begin - Edit.UpdateCaption; -end; - -{ TcxCustomGroupBox } - -constructor TcxCustomGroupBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FRedrawOnResize := True; -end; - -destructor TcxCustomGroupBox.Destroy; -begin - FreeAndNil(FCaptionFont); - FreeAndNil(FPanelStyle); - inherited Destroy; -end; - -class function TcxCustomGroupBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomGroupBoxProperties; -end; - -procedure TcxCustomGroupBox.CalculateVisibleCaption; -begin - if FVisibleCaption <> GetVisibleCaption then - begin - FVisibleCaption := GetVisibleCaption; - UpdateNonClientArea; - end; -end; - -function TcxCustomGroupBox.GetCaptionBkColor: TColor; -begin - Result := FCaptionBkColor; // for CBuilder 10 -end; - -function TcxCustomGroupBox.GetColor: TColor; -begin - Result := Style.Color; -end; - -function TcxCustomGroupBox.GetFont: TFont; -begin - Result := Style.GetVisibleFont; -end; - -function TcxCustomGroupBox.GetViewInfo: TcxGroupBoxViewInfo; -begin - Result := TcxGroupBoxViewInfo(inherited ViewInfo); -end; - -function TcxCustomGroupBox.IsSkinAvailable: Boolean; -begin - Result := (LookAndFeel <> nil) and (LookAndFeel.SkinPainter <> nil); -end; - -procedure TcxCustomGroupBox.UpdateCaption; -begin - CalculateCaptionFont; - CalculateVisibleCaption; - ShortRefreshContainer(False); - UpdateNonClientArea; - Realign; -end; - -procedure TcxCustomGroupBox.UpdateNonClientArea; -begin - if HandleAllocated and IsNonClientAreaSupported then - PostMessage(Handle, WM_DXUPDATENONCLIENTAREA, 0, 0); -end; - -procedure TcxCustomGroupBox.SetPanelStyle(AValue: TcxPanelStyle); -begin - if AValue <> FPanelStyle then - begin - FPanelStyle.Assign(AValue); - UpdateCaption; - end; -end; - -function TcxCustomGroupBox.GetHorizontalCaptionIndent: Integer; -begin - Result := 0; - if IsPanelStyle Then - begin - Result := 2; - if not (Alignment in [alTopCenter, alCenterCenter, alBottomCenter]) then - Result := PanelStyle.CaptionIndent; - end; -end; - -function TcxCustomGroupBox.GetVerticalCaptionIndent: Integer; -begin - Result := 0; - if IsPanelStyle Then - begin - Result := 2; - if not (FAlignment in [alLeftCenter, alCenterCenter, alRightCenter]) then - Result := PanelStyle.CaptionIndent; - end; -end; - -function TcxCustomGroupBox.GetVisibleCaption: string; -begin - if IsVerticalText then - Result := RemoveAccelChars(Caption) - else - Result := Caption; -end; - -function TcxCustomGroupBox.GetPanelStyleCaptionDrawingFlags: Cardinal; -begin - Result := 0; - case Alignment of - alTopLeft, alLeftTop, alLeftCenter, alLeftBottom, alBottomLeft: - Result := Result or DT_LEFT; - alTopCenter, alCenterCenter, alBottomCenter: - Result := Result or DT_CENTER; - alTopRight, alRightTop, alRightCenter, alRightBottom, alBottomRight: - Result := Result or DT_RIGHT; - end; - case Alignment of - alLeftTop, alTopLeft, alTopCenter, alTopRight, alRightTop: - Result := Result or DT_TOP; - alLeftCenter, alCenterCenter, alRightCenter: - Result := Result or DT_VCENTER; - alLeftBottom, alBottomLeft, alBottomCenter, alBottomRight, alRightBottom: - Result := Result or DT_BOTTOM; - end; -end; - -procedure TcxCustomGroupBox.SetAlignment(Value: TcxCaptionAlignment); -begin - if FAlignment <> Value then - begin - FAlignment := Value; - UpdateCaption; - end; -end; - -procedure TcxCustomGroupBox.SetCaptionBkColor(Value: TColor); -begin - FCaptionBkColor := Value; // for CBuilder 10 -end; - -procedure TcxCustomGroupBox.SetColor(Value: TColor); -begin - Style.Color := Value; -end; - -procedure TcxCustomGroupBox.SetFont(Value: TFont); -begin - Style.Font := Value; -end; - -{$IFNDEF DELPHI7} -procedure TcxCustomGroupBox.WMPrintClient(var Message: TMessage); -begin - if (Message.Result <> 1) and - ((Message.LParam and PRF_CHECKVISIBLE = 0) or Visible) then - PaintHandler(TWMPaint(Message)) - else - inherited; -end; -{$ENDIF} - -procedure TcxCustomGroupBox.CMDialogChar(var Message: TCMDialogChar); -begin - with Message do - if IsAccel(CharCode, Caption) and CanFocus then - begin - FIsAccelCharHandling := True; - try - SelectFirst; - Result := 1; - finally - FIsAccelCharHandling := False; - end; - end - else - inherited; -end; - -procedure TcxCustomGroupBox.WMNCPaint(var Message: TWMNCPaint); - - procedure DrawCaption(const ACanvas: TcxCanvas); - var - AViewInfo: TcxGroupBoxViewInfo; - R, R1: TRect; - begin - AViewInfo := TcxGroupBoxViewInfo(ViewInfo); - R := AViewInfo.GetCaptionRectIndent; - R1 := AViewInfo.CaptionRect; - case cxGroupBoxAlignment2GroupBoxCaption(Alignment) of - cxgpLeft: - R1.Right := R1.Left + R.Left; - cxgpRight: - R1.Left := R1.Right - R.Right; - cxgpTop: - R1.Bottom := R1.Top + R.Top; - cxgpBottom: - R1.Top := R1.Bottom - R.Bottom; - end; - SetWindowOrgEx(ACanvas.Handle, -R.Left, -R.Top, nil); - ACanvas.SetClipRegion(TcxRegion.Create(R1), roSet); - AViewInfo.DrawCaption(ACanvas); - end; - -var - DC: HDC; -begin - if HasNonClientArea then - begin - DC := GetWindowDC(Handle); - cxPaintCanvas.BeginPaint(DC); - try - DrawCaption(cxPaintCanvas); - finally - cxPaintCanvas.EndPaint; - ReleaseDC(Handle, DC); - end; - end; -end; - -function TcxCustomGroupBox.IsNonClientAreaSupported: Boolean; -begin - Result := cxGroupBox_SupportNonClientArea; -end; - -procedure TcxCustomGroupBox.WndProc(var Message: TMessage); -const - RedrawWindowFlags = RDW_ERASE or RDW_INVALIDATE or RDW_FRAME or RDW_ALLCHILDREN; - SetWindowPosFlags = SWP_FRAMECHANGED or SWP_NOACTIVATE or SWP_NOMOVE or - SWP_NOSIZE or SWP_NOZORDER; -begin - case Message.Msg of - WM_NCPAINT: - WMNCPaint(TWMNCPaint(Message)); - WM_NCCALCSIZE: - if HasNonClientArea then - begin - TWMNCCalcSize(Message).CalcSize_Params^.rgrc[0] := - cxRectContent(BoundsRect, TcxGroupBoxViewInfo(ViewInfo).GetCaptionRectIndent); - end; - else - if (Message.Msg = WM_DXUPDATENONCLIENTAREA) and IsNonClientAreaSupported then - begin - SetWindowPos(Handle, 0, 0, 0, 0, 0, SetWindowPosFlags); - RedrawWindow(Handle, nil, 0, RedrawWindowFlags); - Realign; - end; - end; - inherited WndProc(Message); -end; - -procedure TcxCustomGroupBox.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited LookAndFeelChanged(Sender, AChangedValues); - UpdateNonClientArea; - Invalidate; -end; - -procedure TcxCustomGroupBox.AdjustClientRect(var Rect: TRect); -var - AViewData: TcxCustomEditViewData; -begin - if IsDestroying then - Exit; - AViewData := TcxCustomEditViewData(CreateViewData); - try - InitializeViewData(AViewData); - Rect := GetControlRect(Self); - ExtendRect(Rect, AViewData.GetClientExtent(Canvas, ViewInfo)); - if IsPanelStyle then - InflateRect(Rect, -PanelStyle.BorderWidth, -PanelStyle.BorderWidth); - finally - FreeAndNil(AViewData); - end; -end; - -function TcxCustomGroupBox.CanAutoSize: Boolean; -begin - Result := False; -end; - -function TcxCustomGroupBox.CanFocusOnClick: Boolean; -begin - Result := False; -end; - -function TcxCustomGroupBox.CanHaveTransparentBorder: Boolean; -begin - Result := Style.TransparentBorder and not IsPanelStyle and inherited CanHaveTransparentBorder; -end; - -procedure TcxCustomGroupBox.ContainerStyleChanged(Sender: TObject); -begin - CalculateCaptionFont; - inherited ContainerStyleChanged(Sender); -end; - -procedure TcxCustomGroupBox.CreateHandle; -begin - inherited CreateHandle; - UpdateNonClientArea; -end; - -function TcxCustomGroupBox.CreatePanelStyle: TcxPanelStyle; -begin - Result := TcxPanelStyle.Create(Self); -end; - -function TcxCustomGroupBox.DefaultParentColor: Boolean; -begin - Result := True; -end; - -procedure TcxCustomGroupBox.FontChanged; -begin - inherited FontChanged; - Realign; -end; - -procedure TcxCustomGroupBox.Initialize; -begin - inherited Initialize; - ControlStyle := ControlStyle + [csAcceptsControls, csCaptureMouse, csClickEvents]; - SetBounds(Left, Top, 185, 105); - FCaptionFont := TFont.Create; - CalculateCaptionFont; - TabStop := False; - FPanelStyle := CreatePanelStyle; -end; - -function TcxCustomGroupBox.InternalGetActiveStyle: TcxContainerStyle; -begin - if csDisabled in ViewInfo.ContainerState then - Result := FStyles.StyleDisabled - else - Result := FStyles.Style; -end; - -function TcxCustomGroupBox.InternalGetNotPublishedStyleValues: TcxEditStyleValues; -begin - Result := inherited InternalGetNotPublishedStyleValues; - Include(Result, svHotTrack); -end; - -function TcxCustomGroupBox.IsContainerClass: Boolean; -begin - Result := True; -end; - -function TcxCustomGroupBox.IsNativeBackground: Boolean; -begin - Result := IsNativeStyle and ParentBackground and not IsInplace and - not Transparent; -end; - -function TcxCustomGroupBox.IsPanelStyle: Boolean; -begin - Result := PanelStyle.Active; -end; - -procedure TcxCustomGroupBox.Paint; -begin - if not DoCustomDraw then - inherited Paint; -end; - -procedure TcxCustomGroupBox.TextChanged; -begin - inherited TextChanged; - CalculateVisibleCaption; - ShortRefreshContainer(False); -end; - -function TcxCustomGroupBox.HasShadow: Boolean; -begin - Result := inherited HasShadow; - if Result then - begin - if not IsPanelStyle then - Result := Alignment in [alLeftTop, alLeftCenter, alLeftBottom, alTopLeft, alTopCenter, alTopRight]; - Result := Result and not (ViewInfo.NativeStyle or IsSkinAvailable); - end; -end; - -procedure TcxCustomGroupBox.AdjustCanvasFontSettings(ACanvas: TcxCanvas); -var - ATextColor: TColor; -begin - with ACanvas do - begin - Font.Assign(FCaptionFont); - ATextColor := clDefault; - if ViewInfo.Painter <> nil then - ATextColor := ViewInfo.Painter.GroupBoxTextColor(Enabled, cxGroupBoxAlignment2GroupBoxCaption(Alignment)) - else - if IsNativeStyle then - ATextColor := TcxWinXPLookAndFeelPainter.GroupBoxTextColor(Enabled, cxGroupBoxAlignment2GroupBoxCaption(Alignment)); - if ATextColor <> clDefault then - Font.Color := ATextColor; - end; -end; - -procedure TcxCustomGroupBox.CalculateCaptionFont; -var - AFontEscapement: Longint; - ALogFont: TLogFont; - ATextMetric : TTextMetric; -begin - if IsInplace then - Exit; - FCaptionFont.Assign(VisibleFont); - if IsVerticalText then - begin - cxScreenCanvas.Font := FCaptionFont; - GetTextMetrics(cxScreenCanvas.Handle, ATextMetric); - cxScreenCanvas.Dormant; - if ATextMetric.tmPitchAndFamily and TMPF_TRUETYPE = 0 then - FCaptionFont.Name := 'Arial'; - - if FAlignment in [alLeftTop, alLeftCenter, alLeftBottom] then - AFontEscapement := 900 - else - AFontEscapement := 2700; - cxGetFontData(FCaptionFont.Handle, ALogFont); - if AFontEscapement <> ALogFont.lfEscapement then - begin - ALogFont.lfEscapement := AFontEscapement; - ALogFont.lfOrientation := AFontEscapement; - ALogFont.lfOutPrecision := OUT_TT_ONLY_PRECIS; - FCaptionFont.Handle := CreateFontIndirect(ALogFont); - end; - end; -end; - -function TcxCustomGroupBox.DoCustomDraw: Boolean; -begin - Result := False; - if Assigned(FOnCustomDraw) then - FOnCustomDraw(Self, Result); -end; - -{$IFDEF DELPHI7} -function TcxCustomGroupBox.DoCustomDrawCaption(ACanvas: TcxCanvas; const ABounds: TRect; const APainter: TcxCustomLookAndFeelPainterClass): Boolean; -begin - Result := False; - if Assigned(FOnCustomDrawCaption) then - FOnCustomDrawCaption(Self, ACanvas.Canvas, ABounds, APainter, Result); -end; - -function TcxCustomGroupBox.DoCustomDrawContentBackground(ACanvas: TcxCanvas; const ABounds: TRect; const APainter: TcxCustomLookAndFeelPainterClass): Boolean; -begin - Result := False; - if Assigned(FOnCustomDrawContentBackground) then - FOnCustomDrawContentBackground(Self, ACanvas.Canvas, ABounds, APainter, Result); -end; - -procedure TcxCustomGroupBox.DoMeasureCaptionHeight(const APainter: TcxCustomLookAndFeelPainterClass; var ACaptionHeight: Integer); -begin - if Assigned(FOnMeasureCaptionHeight) then - FOnMeasureCaptionHeight(Self, APainter, ACaptionHeight); -end; -{$ENDIF} - -function TcxCustomGroupBox.GetCaptionDrawingFlags: Cardinal; -const - DrawTextFlagsMap: array[Boolean] of Cardinal = (DT_SINGLELINE, DT_WORDBREAK); -begin - if IsPanelStyle then - Result := DrawTextFlagsMap[PanelStyle.WordWrap] or GetPanelStyleCaptionDrawingFlags - else - Result := DT_SINGLELINE; -end; - -function TcxCustomGroupBox.GetShadowBounds: TRect; -begin - if IsPanelStyle then - Result := ViewInfo.GetBoundsForPanel - else - Result := inherited GetShadowBounds; - - case Alignment of - alTopLeft, alTopCenter, alTopRight: - Result.Top := 0; - alBottomLeft, alBottomCenter, alBottomRight: - Result.Bottom := Height; - alLeftTop, alLeftCenter, alLeftBottom: - Result.Left := 0; - alRightTop, alRightCenter, alRightBottom: - Result.Right := Width; - end; -end; - -function TcxCustomGroupBox.GetShadowBoundsExtent: TRect; -begin - Result := inherited GetShadowBoundsExtent; - case Alignment of - alTopLeft, alTopCenter, alTopRight: - Result.Top := ViewInfo.GetFrameBounds.Top - GetShadowBounds.Top; - alLeftTop, alLeftCenter, alLeftBottom: - Result.Left := ViewInfo.GetFrameBounds.Left - GetShadowBounds.Left; - end; -end; - -function TcxCustomGroupBox.HasNonClientArea: Boolean; -begin - Result := not IsPanelStyle and IsNonClientAreaSupported and - IsSkinAvailable and (Caption <> '') and (Alignment <> alCenterCenter); -end; - -function TcxCustomGroupBox.IsVerticalText: Boolean; -begin - Result := (FAlignment in [alLeftTop, alLeftCenter, alLeftBottom, alRightTop, - alRightCenter, alRightBottom]) and not IsPanelStyle; -end; - -function TcxCustomGroupBox.NeedRedrawOnResize: Boolean; -begin - Result := RedrawOnResize and (IsNativeStyle or Assigned(LookAndFeel.SkinPainter)); -end; - -{ TcxCustomButtonGroup } - -destructor TcxCustomButtonGroup.Destroy; -begin - SetButtonCount(0); - FreeAndNil(FButtons); - inherited Destroy; -end; - -procedure TcxCustomButtonGroup.ActivateByMouse(Shift: TShiftState; X, Y: Integer; - var AEditData: TcxCustomEditData); -var - P: TPoint; - AButtonIndex: Integer; -begin - Activate(AEditData); - P := Parent.ClientToScreen(Point(X, Y)); - P := ScreenToClient(P); - AButtonIndex := GetButtonIndexAt(P); - if AButtonIndex <> -1 then - begin - with ViewInfo.ButtonsInfo[AButtonIndex].Bounds do - begin - P.X := (Right - Left) div 2; - P.Y := (Bottom - Top) div 2; - end; - if ssLeft in Shift then - begin - SendMouseEvent(TWinControl(FButtons[AButtonIndex]), WM_MOUSEMOVE, [], P); - SendMouseEvent(TWinControl(FButtons[AButtonIndex]), WM_LBUTTONDOWN, Shift, P); - end - else - SendMouseEvent(TWinControl(FButtons[AButtonIndex]), WM_LBUTTONUP, Shift, P); - end; -end; - -function TcxCustomButtonGroup.Focused: Boolean; -var - I: Integer; -begin - Result := inherited Focused; - if not Result and not FIsCreating then - for I := 0 to FButtons.Count - 1 do - if TWinControl(FButtons[I]).Focused then - begin - Result := True; - Break; - end; -end; - -class function TcxCustomButtonGroup.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomButtonGroupProperties; -end; - -procedure TcxCustomButtonGroup.GetTabOrderList(List: TList); -begin - if IsInplace and Visible then - List.Remove(Parent); -end; - -function TcxCustomButtonGroup.IsButtonNativeStyle: Boolean; -begin - Result := TcxButtonGroupViewDataClass(Properties.GetViewDataClass).IsButtonNativeStyle(Style.LookAndFeel); -end; - -procedure TcxCustomButtonGroup.PropertiesChanged(Sender: TObject); -begin - if not (csReading in ComponentState) then - UpdateButtons; - inherited PropertiesChanged(Sender); -end; - -procedure TcxCustomButtonGroup.ReadState(Reader: TReader); -begin - inherited ReadState(Reader); - UpdateButtons; - SynchronizeDisplayValue; -end; - -function TcxCustomButtonGroup.CanAutoSize: Boolean; -begin - Result := not IsInplace and AutoSize; -end; - -procedure TcxCustomButtonGroup.ContainerStyleChanged(Sender: TObject); -begin - inherited ContainerStyleChanged(Sender); - if not FIsCreating then - UpdateButtons; -end; - -procedure TcxCustomButtonGroup.CursorChanged; -begin - UpdateButtons; -end; - -procedure TcxCustomButtonGroup.DoEditKeyDown(var Key: Word; Shift: TShiftState); -var - AButtonsInColumn, AButtonsPerColumn: Integer; - AFocusedButtonIndex: Integer; - AColumn, ARow: Integer; -begin - AFocusedButtonIndex := GetFocusedButtonIndex; - if AFocusedButtonIndex = -1 then - Exit; - AButtonsPerColumn := ActiveProperties.GetButtonsPerColumn; - AButtonsInColumn := AButtonsPerColumn; - with TcxGroupBoxButtonViewInfo(ViewInfo.ButtonsInfo[AFocusedButtonIndex]) do - begin - AColumn := Column; - ARow := Row; - end; - if AFocusedButtonIndex - ARow + AButtonsInColumn - 1 >= ActiveProperties.Items.Count then - AButtonsInColumn := ActiveProperties.Items.Count - (AFocusedButtonIndex - ARow); - case Key of - VK_DOWN: - if ARow < AButtonsInColumn - 1 then - begin - TWinControl(FButtons[AFocusedButtonIndex + 1]).SetFocus; - Key := 0; - end; - VK_LEFT: - if AColumn > 0 then - begin - TWinControl(FButtons[AFocusedButtonIndex - AButtonsPerColumn]).SetFocus; - Key := 0; - end; - VK_RIGHT: - if AFocusedButtonIndex + AButtonsPerColumn < FButtons.Count then - begin - TWinControl(FButtons[AFocusedButtonIndex + AButtonsPerColumn]).SetFocus; - Key := 0; - end; - VK_UP: - if ARow > 0 then - begin - TWinControl(FButtons[AFocusedButtonIndex - 1]).SetFocus; - Key := 0; - end - end; - inherited DoEditKeyDown(Key, Shift); -end; - -procedure TcxCustomButtonGroup.EnabledChanged; -begin - inherited EnabledChanged; - UpdateButtons; -end; - -procedure TcxCustomButtonGroup.Initialize; -begin - inherited Initialize; - FButtons := TList.Create; - AutoSize := False; - TabStop := True; -end; - -function TcxCustomButtonGroup.IsButtonDC(ADC: THandle): Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to InternalButtons.Count - 1 do - if GetButtonDC(I) = ADC then - begin - Result := True; - Break; - end; -end; - -function TcxCustomButtonGroup.IsContainerClass: Boolean; -begin - Result := FIsAccelCharHandling; -end; - -function TcxCustomButtonGroup.DoRefreshContainer(const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AIsMouseEvent: Boolean): Boolean; -begin - Result := inherited DoRefreshContainer(P, Button, Shift, AIsMouseEvent); - ArrangeButtons; -end; - -procedure TcxCustomButtonGroup.CreateHandle; -begin - inherited CreateHandle; - UpdateButtons; - SynchronizeDisplayValue; -end; - -procedure TcxCustomButtonGroup.ArrangeButtons; -var - AButtonViewInfo: TcxGroupBoxButtonViewInfo; - I: Integer; - R: TRect; -begin - for I := 0 to FButtons.Count - 1 do - with TWinControl(FButtons[I]) do - begin - AButtonViewInfo := TcxGroupBoxButtonViewInfo(ViewInfo.ButtonsInfo[I]); - R := AButtonViewInfo.Bounds; - SetBounds(R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top); - end; -end; - -function TcxCustomButtonGroup.GetButtonIndexAt(const P: TPoint): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to ActiveProperties.Items.Count - 1 do - if PtInRect(ViewInfo.ButtonsInfo[I].Bounds, P) then - begin - Result := I; - Break; - end; -end; - -function TcxCustomButtonGroup.GetFocusedButtonIndex: Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to ActiveProperties.Items.Count - 1 do - if TWinControl(FButtons[I]).Focused then - begin - Result := I; - Break; - end; -end; - -procedure TcxCustomButtonGroup.InitButtonInstance(AButton: TWinControl); -begin - TControlAccess(AButton).ParentShowHint := False; - AButton.Parent := Self; - - TControlAccess(AButton).OnDragDrop := DoButtonDragDrop; - TControlAccess(AButton).OnDragOver := DoButtonDragOver; - TWinControlAccess(AButton).OnKeyDown := DoButtonKeyDown; - TWinControlAccess(AButton).OnKeyPress := DoButtonKeyPress; - TWinControlAccess(AButton).OnKeyUp := DoButtonKeyUp; - TControlAccess(AButton).OnMouseDown := DoButtonMouseDown; - TControlAccess(AButton).OnMouseMove := DoButtonMouseMove; - TControlAccess(AButton).OnMouseUp := DoButtonMouseUp; - {$IFDEF DELPHI6} - TControlAccess(AButton).OnMouseWheel := DoButtonMouseWheel; - {$ELSE} - TWinControlAccess(AButton).OnMouseWheel := DoButtonMouseWheel; - {$ENDIF} -end; - -procedure TcxCustomButtonGroup.SetButtonCount(Value: Integer); -begin - with ActiveProperties.Items do - if ItemChanged then - begin - if ChangedItemOperation = copAdd then - InitButtonInstance(GetButtonInstance) - else - if ChangedItemOperation = copDelete then - TWinControl(FButtons[ChangedItemIndex]).Free; - end - else - if Value <> FButtons.Count then - begin - DisableAlign; - try - if Value < FButtons.Count then - while FButtons.Count > Value do - TWinControl(FButtons.Last).Free - else - while FButtons.Count < Value do - InitButtonInstance(GetButtonInstance); - finally - EnableAlign; - end; - end; -end; - -function TcxCustomButtonGroup.IsNonClientAreaSupported: Boolean; -begin - Result := False; -end; - -procedure TcxCustomButtonGroup.SynchronizeButtonsStyle; -var - AButton: TWinControlAccess; -// ATempFont: TFont; - I: Integer; -begin -{B38193 - ATempFont := TFont.Create; - try - for I := 0 to FButtons.Count - 1 do - begin - AButton := TWinControlAccess(FButtons[I]); - AButton.Color := GetBackgroundColor; - ATempFont.Assign(Style.GetVisibleFont); - ATempFont.Color := VisibleFont.Color; - AssignFonts(AButton.Font, ATempFont); - end; - finally - ATempFont.Free; - end; -} - for I := 0 to FButtons.Count - 1 do - begin - AButton := TWinControlAccess(FButtons[I]); - AButton.Color := GetBackgroundColor; - end; -end; - -procedure TcxCustomButtonGroup.UpdateButtons; -var - AButton: TWinControl; - I: Integer; -begin - SetButtonCount(ActiveProperties.Items.Count); - ShortRefreshContainer(False); - for I := 0 to FButtons.Count - 1 do - begin - AButton := TWinControl(FButtons[I]); - AButton.Enabled := Enabled and ActiveProperties.Items[I].Enabled; - end; - SynchronizeButtonsStyle; - for I := 0 to FButtons.Count - 1 do - begin - AButton := TWinControl(FButtons[I]); - AButton.Cursor := Cursor; - end; -end; - -procedure TcxCustomButtonGroup.DoButtonDragDrop(Sender, Source: TObject; X, Y: Integer); -begin - with TWinControl(Sender) do - Self.DragDrop(Source, Left + X, Top + Y); -end; - -procedure TcxCustomButtonGroup.DoButtonDragOver(Sender, Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -begin - with TWinControl(Sender) do - Self.DragOver(Source, Left + X, Top + Y, State, Accept); -end; - -procedure TcxCustomButtonGroup.DoButtonKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); -begin - KeyDown(Key, Shift); -end; - -procedure TcxCustomButtonGroup.DoButtonKeyPress(Sender: TObject; var Key: Char); -begin - KeyPress(Key); -end; - -procedure TcxCustomButtonGroup.DoButtonKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); -begin - KeyUp(Key, Shift); -end; - -procedure TcxCustomButtonGroup.DoButtonMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - InnerControlMouseDown := True; - try - with TWinControl(Sender) do - Self.MouseDown(Button, Shift, X + Left, Y + Top); - finally - InnerControlMouseDown := False; - end; -end; - -procedure TcxCustomButtonGroup.DoButtonMouseMove(Sender: TObject; Shift: TShiftState; - X, Y: Integer); -begin - with TWinControl(Sender) do - Self.MouseMove(Shift, X + Left, Y + Top); -end; - -procedure TcxCustomButtonGroup.DoButtonMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - with TWinControl(Sender) do - Self.MouseUp(Button, Shift, X + Left, Y + Top); -end; - -procedure TcxCustomButtonGroup.DoButtonMouseWheel(Sender: TObject; Shift: TShiftState; - WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); -begin - Handled := False; -end; - -function TcxCustomButtonGroup.GetProperties: TcxCustomButtonGroupProperties; -begin - Result := TcxCustomButtonGroupProperties(FProperties); -end; - -function TcxCustomButtonGroup.GetActiveProperties: TcxCustomButtonGroupProperties; -begin - Result := TcxCustomButtonGroupProperties(InternalGetActiveProperties); -end; - -procedure TcxCustomButtonGroup.SetProperties(Value: TcxCustomButtonGroupProperties); -begin - FProperties.Assign(Value); -end; - -initialization - WM_DXUPDATENONCLIENTAREA := RegisterWindowMessage('WM_DXUPDATENONCLIENTAREA'); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxHeader.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxHeader.pas deleted file mode 100644 index 8b9b1c9a..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxHeader.pas +++ /dev/null @@ -1,1778 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxHeader; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, Controls, Graphics, ImgList, Messages, SysUtils, CommCtrl, - cxClasses, cxContainer, cxControls, cxGraphics, cxGeometry, - cxCustomData, cxLookAndFeelPainters, cxLookAndFeels, - cxEdit, cxEditUtils, cxExtEditConsts, cxExtEditUtils; - -const - CM_GETHEADERITEMINFO = WM_DX + 25; - -type - TcxHeaderSortOrder = TcxDataSortOrder; - TcxCustomHeader = class; - TcxHeader = class; - TcxHeaderSection = class; - TcxHeaderSections = class; - TcxSectionTrackState = (tsTrackBegin, tsTrackMove, tsTrackEnd, tsTrackNone); - TcxHeaderSectionRects = array of TRect; - TcxHeaderSectionWidths = array of Integer; - TcxHeaderState = (hsNone, hsSized, hsDragged, hsPressed); - THeaderItemInfo = {$IFNDEF DELPHI12}packed {$ENDIF}record - ImageIndex: Integer; - Rect: TRect; - SectionAlignment: TAlignment; - SortOrder: TcxHeaderSortOrder; - State: TcxButtonState; - Text: string; - end; - PHeaderItemInfo = ^THeaderItemInfo; - - TcxDrawSectionEvent = procedure(HeaderControl: TcxCustomHeader; - Section: TcxHeaderSection; const ARect: TRect; Pressed: Boolean) of object; - TcxSectionNotifyEvent = procedure(HeaderControl: TcxCustomHeader; - Section: TcxHeaderSection) of object; - TcxSectionTrackEvent = procedure(HeaderControl: TcxCustomHeader; - Section: TcxHeaderSection; Width: Integer; State: TcxSectionTrackState) of object; - TcxSectionDragEvent = procedure (Sender: TObject; FromSection, ToSection: TcxHeaderSection; - var AllowDrag: Boolean) of object; - TcxSectionChangingSortOrderEvent = procedure (Sender: TObject; - const Section: TcxHeaderSection; const AOldSortOrder: TcxHeaderSortOrder; - var ANewSortOrder: TcxHeaderSortOrder; var AllowChange: Boolean) of object; - TcxSectionChangedSortOrderEvent = procedure (Sender: TObject; - const Section: TcxHeaderSection; const ASortOrder: TcxHeaderSortOrder) of object; - - { CM_GETHEADERITEMINFO } - - TCMHeaderItemInfo = packed record - Msg: Cardinal; - Index: Integer; - HeaderItemInfo: PHeaderItemInfo; - Result: Longint; - end; - - { TcxHeaderSection } - - TcxHeaderSection = class(TCollectionItem) - private - FAlignment: TAlignment; - FAllowClick: Boolean; - FAllowResize: Boolean; - FAutoSize: Boolean; - FBiDiMode: TBiDiMode; - FDataIndex: Integer; - FImageIndex: TImageIndex; - FMaxWidth: TcxNaturalNumber; - FMinWidth: TcxNaturalNumber; - FParentBiDiMode: Boolean; - FSortOrder: TcxHeaderSortOrder; - FState: TcxButtonState; - FText: string; - FWidth: Integer; - function GetLeft: Integer; - function GetRight: Integer; - function IsBiDiModeStored: Boolean; - function IsDataIndexStored: Boolean; - function GetHeaderControl: TcxCustomHeader; - procedure SetAlignment(Value: TAlignment); - procedure SetAutoSize(Value: Boolean); - procedure SetBiDiMode(Value: TBiDiMode); - procedure SetDataIndex(Value: Integer); - procedure SetMaxWidth(Value: TcxNaturalNumber); - procedure SetMinWidth(Value: TcxNaturalNumber); - procedure SetParentBiDiMode(Value: Boolean); - procedure SetState(Value: TcxButtonState); - procedure SetText(const Value: string); - procedure SetWidth(Value: Integer); - procedure SetImageIndex(const Value: TImageIndex); - procedure SetSortOrder(Value: TcxHeaderSortOrder); - protected - function GetDisplayName: string; override; - property State: TcxButtonState read FState write SetState; - public - constructor Create(Collection: TCollection); override; - procedure Assign(Source: TPersistent); override; - procedure ParentBiDiModeChanged; - function UseRightToLeftAlignment: Boolean; - function UseRightToLeftReading: Boolean; - property Left: Integer read GetLeft; - property Right: Integer read GetRight; - property HeaderControl: TcxCustomHeader read GetHeaderControl; - published - property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify; - property AllowClick: Boolean read FAllowClick write FAllowClick default False; - property AllowResize: Boolean read FAllowResize write FAllowResize default True; - property AutoSize: Boolean read FAutoSize write SetAutoSize default False; - property BiDiMode: TBiDiMode read FBiDiMode write SetBiDiMode stored IsBiDiModeStored; - property DataIndex: Integer read FDataIndex write SetDataIndex - stored IsDataIndexStored; - property ImageIndex: TImageIndex read FImageIndex write SetImageIndex default -1; - property MaxWidth: TcxNaturalNumber read FMaxWidth write SetMaxWidth default 1000; - property MinWidth: TcxNaturalNumber read FMinWidth write SetMinWidth default 30; - property ParentBiDiMode: Boolean read FParentBiDiMode write SetParentBiDiMode default True; - property SortOrder: TcxHeaderSortOrder read FSortOrder write SetSortOrder default soNone; - property Text: string read FText write SetText; - property Width: Integer read FWidth write SetWidth default 50; - end; - - { TcxHeaderSections } - - TcxHeaderSections = class(TCollection) - private - FHeaderControl: TcxCustomHeader; - function GetItem(Index: Integer): TcxHeaderSection; - procedure SetItem(Index: Integer; Value: TcxHeaderSection); - protected - function GetOwner: TPersistent; override; - procedure Update(Item: TCollectionItem); override; - public - constructor Create(HeaderControl: TcxCustomHeader); - procedure Assign(Source: TPersistent); override; - function Add: TcxHeaderSection; - function Insert(Index: Integer): TcxHeaderSection; - property Items[Index: Integer]: TcxHeaderSection read GetItem write SetItem; default; - end; - - { TcxCustomHeader } - - TcxCustomHeader = class(TcxControl, IcxMouseTrackingCaller) - private - FAllowSort: Boolean; - FBrush: TBrush; - FDragReorder: Boolean; - FHotSectionIndex: Integer; - FImages: TCustomImageList; - FImagesChangeLink: TChangeLink; - FLastDrawPosOnMove: Integer; - FLineDC: HDC; - FLineVisible: Boolean; - FMouseOnSizer: Boolean; - FPrevBrush: HBrush; - FPrevMousePos: Integer; - FResizeUpdate: Boolean; - FScreenCursor: TCursor; - FScreenCursorSaved: Boolean; - FSectionDragged: Boolean; - FSections: TcxHeaderSections; - FSectionsFitCalculating: Boolean; - FSectionStream: TMemoryStream; - FSelectedSectionIndex: Integer; - FSizedSectionIndex: Integer; - FState: TcxHeaderState; - FUnderMouseSectionIndex: Integer; - FOnSectionClick: TcxSectionNotifyEvent; - FOnSectionResize: TcxSectionNotifyEvent; - FOnSectionEndResize: TcxSectionNotifyEvent; - FOnSectionTrack: TcxSectionTrackEvent; - FOnDrawSection: TcxDrawSectionEvent; - FOnSectionEndDrag: TNotifyEvent; - FOnSectionDrag: TcxSectionDragEvent; - FOnSectionChangingSortOrder: TcxSectionChangingSortOrderEvent; - FOnSectionChangedSortOrder: TcxSectionChangedSortOrderEvent; - FOnSectionChange: TNotifyEvent; - FOnSectionsChange: TNotifyEvent; - procedure ImageListChange(Sender: TObject); - procedure RestoreScreenCursor; - procedure SetScreenCursor(ACursor: TCursor); - procedure SetSections(Value: TcxHeaderSections); - procedure UpdateSection(Index: Integer); - procedure UpdateSections; - procedure SetImages(Value: TCustomImageList); - procedure SetAllowSort(Value: Boolean); - function GetSectionIndexAtPos(X, Y: Integer; AIncludeNonSectionPart: Boolean = False): Integer; - - function GetSelectedSection: TcxHeaderSection; - function GetSizedSection: TcxHeaderSection; - function GetUnderMouseSection: TcxHeaderSection; - function IsSectionIndex(AIndex: Integer): Boolean; - procedure IcxMouseTrackingCaller.MouseLeave = HeaderMouseLeave; - procedure HeaderMouseLeave; - procedure SetHotSectionIndex(Value: Integer); - procedure SetMouseOnSizer(Value: Boolean); - procedure SetSectionState(AIndex: Integer; AState: TcxButtonState); - procedure SetSelectedSectionIndex(Value: Integer); - procedure SetSizedSectionIndex(Value: Integer); - procedure SetUnderMouseSectionIndex(Value: Integer); - procedure UpdateDraggedSection; - procedure UpdatePressedSection; - procedure UpdateSizedSection; - procedure UpdateUnderMouseSection; - - procedure CMBiDiModeChanged(var Message: TMessage); message CM_BIDIMODECHANGED; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure WMCaptureChanged(var Message: TMessage); message WM_CAPTURECHANGED; - procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; - procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE; - procedure WMLButtonUp(var Message: TWMLButtonUp); message WM_LBUTTONUP; - procedure WMSize(var Message: TWMSize); message WM_SIZE; - procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; - procedure HDMGetItemCount(var Message: TMessage); message HDM_GETITEMCOUNT; - procedure HDMGetItemInfo(var Message: TCMHeaderItemInfo); message CM_GETHEADERITEMINFO; - - procedure AllocateSplitLineDC; - procedure ReleaseSplitLine; - procedure DrawSplitLine(XPos: Integer); - procedure InitResize(XPos: Integer); - - property HotSectionIndex: Integer read FHotSectionIndex write SetHotSectionIndex; - property MouseOnSizer: Boolean read FMouseOnSizer write SetMouseOnSizer; - property SelectedSection: TcxHeaderSection read GetSelectedSection; - property SelectedSectionIndex: Integer read FSelectedSectionIndex write SetSelectedSectionIndex; - property SizedSection: TcxHeaderSection read GetSizedSection; - property SizedSectionIndex: Integer read FSizedSectionIndex write SetSizedSectionIndex; - property UnderMouseSection: TcxHeaderSection read GetUnderMouseSection; - property UnderMouseSectionIndex: Integer read FUnderMouseSectionIndex write SetUnderMouseSectionIndex; - protected - procedure ChangeSectionSortOrder(ASection: TcxHeaderSection; - ANewSortOrder: TcxHeaderSortOrder; ADeleteOtherSorting: Boolean); dynamic; - function DoSectionChangingSortOrder(ASection: TcxHeaderSection; - ANewSortOrder: TcxHeaderSortOrder): Boolean; - procedure DoSectionChangedSortOrder(ASection: TcxHeaderSection); - function DoSectionDrag(FromSection, ToSection: TcxHeaderSection): Boolean; virtual; - procedure DoSectionEndDrag; virtual; - function GetSectionRect(Index: Integer): TRect; - function GetSectionRectBySectionWidths(AHeaderWidth: Integer; - const ASectionWidths: TcxHeaderSectionWidths; AIndex: Integer): TRect; virtual; - function CreateSection: TcxHeaderSection; virtual; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - procedure DestroyWnd; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - procedure Notification(AComponent: TComponent; - Operation: TOperation); override; - procedure DrawSection(SectionIndex: Integer); dynamic; - procedure DoSectionClickEvent(Section: TcxHeaderSection); dynamic; - procedure DoSectionChange; - procedure DoSectionsChange; - procedure DoSectionDragEvent(FromSection, ToSection: TcxHeaderSection; var AllowDrag: Boolean); dynamic; - procedure DoSectionEndDragEvent; dynamic; - procedure DoSectionResizeEvent(Section: TcxHeaderSection); dynamic; - procedure DoSectionEndResizeEvent(Section: TcxHeaderSection); dynamic; - procedure DoSectionTrackEvent(Section: TcxHeaderSection; Width: Integer; - State: TcxSectionTrackState); dynamic; - procedure DisableSort; virtual; - procedure FitToClientWidth; - function GetBackgroundColor: TColor; virtual; - function GetSectionContentBounds(ASectionBounds: TRect; - AState: TcxButtonState): TRect; - function GetTextColor: TColor; virtual; - function IsInnerControl: Boolean; virtual; - procedure Paint; override; - property OnSectionsChange: TNotifyEvent read FOnSectionsChange - write FOnSectionsChange; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure CalcSectionWidths(AHeaderWidth: Integer; - out AWidths: TcxHeaderSectionWidths); virtual; - procedure FlipChildren(AllLevels: Boolean); override; - function GetAutoHeight: Integer; - property AllowSort: Boolean read FAllowSort write SetAllowSort default True; - property DragReorder: Boolean read FDragReorder write FDragReorder default False; - property Images: TCustomImageList read FImages write SetImages; - property LookAndFeel; - property ResizeUpdate: Boolean read FResizeUpdate write FResizeUpdate default True; - property Sections: TcxHeaderSections read FSections write SetSections; - property OnDrawSection: TcxDrawSectionEvent read FOnDrawSection - write FOnDrawSection; - property OnSectionChange: TNotifyEvent read FOnSectionChange - write FOnSectionChange; - property OnSectionChangedSortOrder: TcxSectionChangedSortOrderEvent - read FOnSectionChangedSortOrder write FOnSectionChangedSortOrder; - property OnSectionChangingSortOrder: TcxSectionChangingSortOrderEvent - read FOnSectionChangingSortOrder write FOnSectionChangingSortOrder; - property OnSectionClick: TcxSectionNotifyEvent read FOnSectionClick - write FOnSectionClick; - property OnSectionDrag: TcxSectionDragEvent read FOnSectionDrag - write FOnSectionDrag; - property OnSectionEndDrag: TNotifyEvent read FOnSectionEndDrag - write FOnSectionEndDrag; - property OnSectionEndResize: TcxSectionNotifyEvent read FOnSectionEndResize - write FOnSectionEndResize; - property OnSectionResize: TcxSectionNotifyEvent read FOnSectionResize - write FOnSectionResize; - property OnSectionTrack: TcxSectionTrackEvent read FOnSectionTrack - write FOnSectionTrack; - end; - - { TcxHeader } - - TcxHeader = class(TcxCustomHeader) - published - property Align; - property AllowSort; - property Anchors; - property BiDiMode; - property Color; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property DragReorder; - property Enabled; - property Font; - property Images; - property LookAndFeel; - property ParentBiDiMode; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ResizeUpdate; - property Sections; - property ShowHint; - property Visible; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnDrawSection; - property OnEndDock; - property OnEndDrag; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnResize; - property OnSectionChange; - property OnSectionChangedSortOrder; - property OnSectionChangingSortOrder; - property OnSectionClick; - property OnSectionDrag; - property OnSectionEndDrag; - property OnSectionEndResize; - property OnSectionResize; - property OnSectionTrack; - property OnStartDock; - property OnStartDrag; - end; - -procedure DrawHeaderSection(AHeaderHandle: HWND; AIndex: Integer; - ACanvas: TcxCanvas; ALookAndFeel: TcxLookAndFeel; AImages: TCustomImageList = nil); -function SendGetStructMessage(Handle: HWND; Msg: UINT; WParam: WPARAM; var LParam): LRESULT; - -implementation - -uses - Forms, Types, Math, dxThemeConsts, dxThemeManager, dxUxTheme; - -const - ImageTextOffset = 2; - SortingMarkOffset = 4; - SortingMarkWidth = 7; - cxHeaderSectionTextLeftRightIndent = 4; - cxHeaderSectionTextTopBottomIndent = 2; - -procedure DrawHeaderSection(AHeaderHandle: HWND; AIndex: Integer; - ACanvas: TcxCanvas; ALookAndFeel: TcxLookAndFeel; AImages: TCustomImageList); - - procedure DrawSortingMark(const ARect: TRect; ASortOrder: TcxHeaderSortOrder); - var - ASavedPenColor: TColor; - ASortingMarkRect: TRect; - begin - if ASortOrder <> soNone then - begin - ASavedPenColor := ACanvas.Pen.Color; - ASortingMarkRect := ARect; - Dec(ASortingMarkRect.Right, SortingMarkOffset); - ASortingMarkRect.Left := ASortingMarkRect.Right - SortingMarkWidth; - ALookAndFeel.Painter.DrawSortingMark(ACanvas, ASortingMarkRect, - ASortOrder = soAscending); - ACanvas.Pen.Color := ASavedPenColor; - end; - end; - - function GetTextRect(const ANormalContentRect: TRect; ASortOrder: TcxHeaderSortOrder): TRect; - begin - Result := ANormalContentRect; - Inc(Result.Left, cxHeaderSectionTextLeftRightIndent); - Dec(Result.Right, cxHeaderSectionTextLeftRightIndent); - if ASortOrder <> soNone then - Dec(Result.Right, SortingMarkOffset + SortingMarkWidth); - end; - - function GetImageRect(var ATextRect: TRect; var AHeaderItemInfo: THeaderItemInfo): TRect; - var - ATextWidth: Integer; - begin - Result := ATextRect; - ATextWidth := ACanvas.TextWidth(AHeaderItemInfo.Text); - case AHeaderItemInfo.SectionAlignment of - taLeftJustify: - ATextRect.Left := Result.Left + AImages.Width + ImageTextOffset; - taRightJustify: - begin - Result.Left := ATextRect.Right - ATextWidth - AImages.Width - ImageTextOffset; - if Result.Left < ATextRect.Left then - begin - Result.Left := ATextRect.Left; - Inc(ATextRect.Left, AImages.Width + ImageTextOffset); - AHeaderItemInfo.SectionAlignment := taLeftJustify - end; - end; - taCenter: - begin - Result.Left := ATextRect.Left + ((ATextRect.Right - ATextRect.Left) - - AImages.Width - ImageTextOffset - ATextWidth) div 2; - if Result.Left < ATextRect.Left then - begin - Result.Left := ATextRect.Left; - AHeaderItemInfo.SectionAlignment := taLeftJustify - end; - Inc(ATextRect.Left, AImages.Width + ImageTextOffset); - end; - end; - end; - -var - ANormalContentRect, ATextRect, AImageRect: TRect; - AClipRegion: TcxRegion; - ASavedBrushColor: TColor; - AItemCount: Integer; - AHeaderRect: TRect; - AHeaderItemInfo: THeaderItemInfo; -begin - AItemCount := Header_GetItemCount(AHeaderHandle); - AHeaderRect := cxGetWindowRect(AHeaderHandle); - AHeaderRect := Rect(0, 0, cxRectWidth(AHeaderRect), cxRectHeight(AHeaderRect)); - if AItemCount = 0 then - begin - ACanvas.FillRect(AHeaderRect); - Exit; - end; - - SendGetStructMessage(AHeaderHandle, CM_GETHEADERITEMINFO, AIndex, AHeaderItemInfo); - - if (AIndex = AItemCount) then - AHeaderItemInfo.Rect.Right := AHeaderRect.Right + 10 - else - if not ALookAndFeel.NativeStyle and (ALookAndFeel.Kind = lfUltraFlat) then - Inc(AHeaderItemInfo.Rect.Right); - - ANormalContentRect := ALookAndFeel.Painter.HeaderControlSectionContentBounds(AHeaderItemInfo.Rect, cxbsNormal); - ATextRect := GetTextRect(ANormalContentRect, AHeaderItemInfo.SortOrder); - - if Assigned(AImages) and (AHeaderItemInfo.ImageIndex >= 0) then - AImageRect := GetImageRect(ATextRect, AHeaderItemInfo); - - ASavedBrushColor := ACanvas.Brush.Color; - AClipRegion := ACanvas.GetClipRegion; - try - ACanvas.SetClipRegion(TcxRegion.Create(AHeaderItemInfo.Rect), roIntersect); - ALookAndFeel.Painter.DrawHeaderControlSection(ACanvas, AHeaderItemInfo.Rect, ATextRect, - [nRight], cxBordersAll, AHeaderItemInfo.State, AHeaderItemInfo.SectionAlignment, vaCenter, False, - True, AHeaderItemInfo.Text, ACanvas.Font, ACanvas.Font.Color, ACanvas.Brush.Color); - - ACanvas.SetClipRegion(TcxRegion.Create(ANormalContentRect), roIntersect); - - if Assigned(AImages) and (AHeaderItemInfo.ImageIndex >= 0) then - ACanvas.DrawImage(AImages, AImageRect.Left, AImageRect.Top + - (AImageRect.Bottom - AImageRect.Top - AImages.Height) div 2, - AHeaderItemInfo.ImageIndex); - - DrawSortingMark(AHeaderItemInfo.Rect, AHeaderItemInfo.SortOrder); - finally - ACanvas.SetClipRegion(AClipRegion, roSet); - ACanvas.Brush.Color := ASavedBrushColor; - end; -end; - -function SendGetStructMessage(Handle: HWND; Msg: UINT; WParam: WPARAM; - var LParam): LRESULT; -begin - Result := SendMessage(Handle, Msg, WParam, Integer(@LParam)); -end; - -function GetNextSortOrder(ASortOrder: TcxHeaderSortOrder; - ADeleteSorting: Boolean): TcxHeaderSortOrder; -begin - if ADeleteSorting then - Result := soNone - else - if ASortOrder = soAscending then - Result := soDescending - else - Result := soAscending; -end; - -{ TcxCustomHeader } - -procedure TcxCustomHeader.CMBiDiModeChanged(var Message: TMessage); -var - I: Integer; -begin - inherited; - if HandleAllocated then - for I := 0 to Sections.Count - 1 do - if Sections[I].ParentBiDiMode then - Sections[I].ParentBiDiModeChanged; -end; - -procedure TcxCustomHeader.CMEnabledChanged(var Message: TMessage); -begin - inherited; - Invalidate; -end; - -constructor TcxCustomHeader.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ControlStyle := []; - DoubleBuffered := True; - Height := 17; - Width := 117; - - FAllowSort := True; - FResizeUpdate := True; - FSectionStream := nil; - FSelectedSectionIndex := -1; - FSizedSectionIndex := -1; - FUnderMouseSectionIndex := -1; - FHotSectionIndex := -1; - - FSections := TcxHeaderSections.Create(Self); - FImagesChangeLink := TChangeLink.Create; - FImagesChangeLink.OnChange := ImageListChange; -end; - -destructor TcxCustomHeader.Destroy; -begin - EndMouseTracking(Self); - FreeAndNil(FSections); - FreeAndNil(FImagesChangeLink); - FreeAndNil(FSectionStream); - FreeAndNil(FBrush); - inherited Destroy; -end; - -procedure TcxCustomHeader.CalcSectionWidths(AHeaderWidth: Integer; - out AWidths: TcxHeaderSectionWidths); -var - ANewSectionWidth, APrevNonFixedWidthSectionCount, ARemainedWidth: Integer; - ASectionWidth, ATempWidth, AWorkWidth, I: Integer; - ANonFixedWidthSections: TList; - ASection: TcxHeaderSection; -begin - ANonFixedWidthSections := TList.Create; - try - SetLength(AWidths, Sections.Count); - AWorkWidth := AHeaderWidth; - for I := 0 to Sections.Count - 1 do - begin - ASection := Sections[I]; - if ASection.AutoSize then - ANonFixedWidthSections.Add(ASection) - else - begin - Dec(AWorkWidth, ASection.Width); - AWidths[I] := ASection.Width; - end; - end; - if ANonFixedWidthSections.Count > 0 then - repeat - APrevNonFixedWidthSectionCount := ANonFixedWidthSections.Count; - ATempWidth := AWorkWidth div APrevNonFixedWidthSectionCount; - ARemainedWidth := AWorkWidth mod APrevNonFixedWidthSectionCount; - for I := APrevNonFixedWidthSectionCount - 1 downto 0 do - begin - ASection := TcxHeaderSection(ANonFixedWidthSections[I]); - ASectionWidth := ATempWidth; - if I = APrevNonFixedWidthSectionCount - 1 then - Inc(ASectionWidth, ARemainedWidth); - ANewSectionWidth := Max(ASectionWidth, ASection.MinWidth); - ANewSectionWidth := Min(ANewSectionWidth, ASection.MaxWidth); - AWidths[ASection.Index] := ANewSectionWidth; - if ASectionWidth <> ANewSectionWidth then - begin - ANonFixedWidthSections.Remove(ASection); - Dec(AWorkWidth, ANewSectionWidth); - end; - end; - until (ANonFixedWidthSections.Count = 0) or - (ANonFixedWidthSections.Count = APrevNonFixedWidthSectionCount); - finally - ANonFixedWidthSections.Free; - end; -end; - -procedure TcxCustomHeader.FlipChildren(AllLevels: Boolean); -var - I, AFirstSectionWidth, ALastSectionWidth: Integer; - ASectionList: TcxHeaderSections; -begin - if HandleAllocated and (Sections.Count > 0) then - begin - ALastSectionWidth := ClientWidth; - AFirstSectionWidth := Sections[0].Width; - for I := 0 to Sections.Count - 2 do - Dec(ALastSectionWidth, Sections[I].Width); - - ASectionList := TcxHeaderSections.Create(Self); - try - for I := 0 to Sections.Count - 1 do - with ASectionList.Add do - Assign(Sections[I]); - for I := 0 to Sections.Count - 1 do - Sections[I].Assign(ASectionList[Sections.Count - I - 1]); - finally - ASectionList.Free; - end; - - if Sections.Count > 1 then - begin - Sections[Sections.Count - 1].Width := AFirstSectionWidth; - Sections[0].Width := ALastSectionWidth; - end; - UpdateSections; - end; -end; - -function TcxCustomHeader.GetAutoHeight: Integer; -var - AContentHeight: Integer; -begin - Canvas.Font.Assign(Font); - Canvas.Font.Style := [fsBold, fsUnderline]; - - AContentHeight := Canvas.TextHeight('Wq'); - if (Images <> nil) and (AContentHeight < Images.Height) then - AContentHeight := Images.Height; - - Result := AContentHeight + - 2 * (LookAndFeel.Painter.HeaderControlSectionBorderSize(cxbsNormal) + - cxHeaderSectionTextTopBottomIndent); -end; - -procedure TcxCustomHeader.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params do - Style := Style and not(CS_HREDRAW or CS_VREDRAW); -end; - -function TcxCustomHeader.CreateSection: TcxHeaderSection; -begin - Result := TcxHeaderSection.Create(Sections); -end; - -procedure TcxCustomHeader.CreateWnd; - - procedure ReadSections; - var - AReader: TReader; - begin - Sections.Clear; - AReader := TReader.Create(FSectionStream, 1024); - try - AReader.ReadValue; - AReader.ReadCollection(Sections); - finally - AReader.Free; - end; - FreeAndNil(FSectionStream); - end; - -begin - inherited CreateWnd; - if FSectionStream <> nil then - ReadSections - else - UpdateSections; -end; - -procedure TcxCustomHeader.DestroyWnd; -var - AWriter: TWriter; -begin - if FSectionStream = nil then - FSectionStream := TMemoryStream.Create; - AWriter := TWriter.Create(FSectionStream, 1024); - try - AWriter.WriteCollection(FSections); - finally - AWriter.Free; - FSectionStream.Position := 0; - end; - inherited DestroyWnd; -end; - -procedure TcxCustomHeader.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited LookAndFeelChanged(Sender, AChangedValues); - Invalidate; -end; - -procedure TcxCustomHeader.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = Images) then - Images := nil; -end; - -procedure TcxCustomHeader.SetSections(Value: TcxHeaderSections); -begin - FSections.Assign(Value); -end; - -procedure TcxCustomHeader.UpdateSection(Index: Integer); -begin - InvalidateRect(GetSectionRect(Index), False); -end; - -procedure TcxCustomHeader.UpdateSections; -begin - InvalidateRect(ClientRect, False); -end; - -procedure TcxCustomHeader.AllocateSplitLineDC; -begin - FLineDC := GetDCEx(Parent.Handle, 0, DCX_CACHE or DCX_CLIPSIBLINGS or DCX_LOCKWINDOWUPDATE); - if not ResizeUpdate then - begin - if not Assigned(FBrush) then - begin - FBrush := TBrush.Create; - {$IFDEF DELPHI4} - FBrush.Bitmap := AllocPatternBitmap(clBlack, clWhite); - {$ENDIF} - end; - FPrevBrush := SelectObject(FLineDC, FBrush.Handle); - end; -end; - -procedure TcxCustomHeader.DrawSplitLine(XPos: Integer); -begin - FLineVisible := not FLineVisible; - FLastDrawPosOnMove := XPos; - PatBlt(FLineDC, Self.Left + XPos, 1, 1, Parent.Height - 1, DSTINVERT); -end; - -procedure TcxCustomHeader.ReleaseSplitLine; -begin - if FLineVisible then DrawSplitLine(FLastDrawPosOnMove); - if FPrevBrush <> 0 then SelectObject(FLineDC, FPrevBrush); - ReleaseDC(Parent.Handle, FLineDC); - if FBrush <> nil then FreeAndNil(FBrush); -end; - -procedure TcxCustomHeader.InitResize(XPos: Integer); -begin - FLineVisible := False; - AllocateSplitLineDC; - if not ResizeUpdate then DrawSplitLine(XPos); -end; - -procedure TcxCustomHeader.ChangeSectionSortOrder(ASection: TcxHeaderSection; - ANewSortOrder: TcxHeaderSortOrder; ADeleteOtherSorting: Boolean); - - procedure DeleteOtherSorting; - var - I: Integer; - begin - for I := 0 to Sections.Count - 1 do - if Sections[I] <> ASection then - ChangeSectionSortOrder(Sections[I], soNone, False); - end; - -begin - if not AllowSort or (ANewSortOrder = ASection.SortOrder) then - Exit; - - if ADeleteOtherSorting then - DeleteOtherSorting; - - if DoSectionChangingSortOrder(ASection, ANewSortOrder) then - begin - ASection.SortOrder := ANewSortOrder; - DoSectionChangedSortOrder(ASection); - end; -end; - -function TcxCustomHeader.DoSectionChangingSortOrder(ASection: TcxHeaderSection; - ANewSortOrder: TcxHeaderSortOrder): Boolean; -begin - Result := True; - if Assigned(FOnSectionChangingSortOrder) then - FOnSectionChangingSortOrder(Self, ASection, ASection.SortOrder, - ANewSortOrder, Result); -end; - -procedure TcxCustomHeader.DoSectionChangedSortOrder(ASection: TcxHeaderSection); -begin - if Assigned(FOnSectionChangedSortOrder) then - FOnSectionChangedSortOrder(Self, ASection, ASection.SortOrder); -end; - -function TcxCustomHeader.DoSectionDrag(FromSection, - ToSection: TcxHeaderSection): Boolean; -begin - Result := True; - DoSectionDragEvent(FromSection, ToSection, Result); -end; - -procedure TcxCustomHeader.DoSectionEndDrag; -var - AIndexFrom: Integer; -begin - if UnderMouseSectionIndex <> -1 then - begin - AIndexFrom := SelectedSectionIndex; - SelectedSectionIndex := -1; - HotSectionIndex := -1; - Sections[AIndexFrom].Index := UnderMouseSectionIndex; - HotSectionIndex := UnderMouseSectionIndex; - end; - DoSectionEndDragEvent; -end; - -procedure TcxCustomHeader.DrawSection(SectionIndex: Integer); -begin - if IsSectionIndex(SectionIndex) and Assigned(FOnDrawSection) then - FOnDrawSection(Self, FSections[SectionIndex], GetSectionRect(SectionIndex), - FSections[SectionIndex].State = cxbsPressed) - else - DrawHeaderSection(Handle, SectionIndex, Canvas, LookAndFeel, Images); -end; - -procedure TcxCustomHeader.ImageListChange(Sender: TObject); -begin - UpdateSections; -end; - -procedure TcxCustomHeader.RestoreScreenCursor; -begin - if FScreenCursorSaved then - begin - FScreenCursorSaved := False; - Screen.Cursor := FScreenCursor; - end; -end; - -procedure TcxCustomHeader.SetScreenCursor(ACursor: TCursor); -begin - if not FScreenCursorSaved then - begin - FScreenCursor := Screen.Cursor; - FScreenCursorSaved := True; - end; - Screen.Cursor := ACursor; -end; - -procedure TcxCustomHeader.WMSize(var Message: TWMSize); -begin - inherited; - FitToClientWidth; -end; - -procedure TcxCustomHeader.WMWindowPosChanged(var Message: TWMWindowPosChanged); -begin - inherited; - Invalidate; -end; - -procedure TcxCustomHeader.HDMGetItemCount(var Message: TMessage); -begin - Message.Result := Sections.Count; -end; - -procedure TcxCustomHeader.HDMGetItemInfo(var Message: TCMHeaderItemInfo); - - function GetState(AIndex: Integer): TcxButtonState; - begin - if not Enabled then - Result := cxbsDisabled - else - if IsSectionIndex(AIndex) then - Result := FSections[AIndex].State - else - Result := cxbsNormal; - end; - -var - AIndex: Integer; - AHeaderItemInfo: PHeaderItemInfo; -begin - AIndex := Message.Index; - AHeaderItemInfo := Message.HeaderItemInfo; - ZeroMemory(AHeaderItemInfo, SizeOf(THeaderItemInfo)); - AHeaderItemInfo.ImageIndex := -1; - AHeaderItemInfo.State := GetState(AIndex); - AHeaderItemInfo.Rect := GetSectionRect(AIndex); - if IsSectionIndex(AIndex) then - begin - AHeaderItemInfo.Text := FSections[AIndex].Text; - AHeaderItemInfo.SectionAlignment := FSections[AIndex].FAlignment; - AHeaderItemInfo.ImageIndex := FSections[AIndex].ImageIndex; - AHeaderItemInfo.SortOrder := FSections[AIndex].SortOrder; - end; - Message.HeaderItemInfo := AHeaderItemInfo; -end; - -procedure TcxCustomHeader.SetImages(Value: TCustomImageList); -begin - cxSetImageList(Value, FImages, FImagesChangeLink, Self); -end; - -procedure TcxCustomHeader.DoSectionClickEvent(Section: TcxHeaderSection); -begin - if Assigned(FOnSectionClick) then FOnSectionClick(Self, Section); -end; - -procedure TcxCustomHeader.DoSectionChange; -begin - if Assigned(OnSectionChange) then - OnSectionChange(Self); -end; - -procedure TcxCustomHeader.DoSectionsChange; -begin - if Assigned(OnSectionsChange) then - OnSectionsChange(Self); -end; - -procedure TcxCustomHeader.DoSectionDragEvent(FromSection, ToSection: TcxHeaderSection; - var AllowDrag: Boolean); -begin - if Assigned(FOnSectionDrag) then - FOnSectionDrag(Self, FromSection, ToSection, AllowDrag); - FSectionDragged := AllowDrag; -end; - -procedure TcxCustomHeader.DoSectionEndDragEvent; -begin - if Assigned(FOnSectionEndDrag) then FOnSectionEndDrag(Self); -end; - -procedure TcxCustomHeader.DoSectionResizeEvent(Section: TcxHeaderSection); -begin - if Assigned(FOnSectionResize) then FOnSectionResize(Self, Section); -end; - -procedure TcxCustomHeader.DoSectionEndResizeEvent(Section: TcxHeaderSection); -begin - if Assigned(FOnSectionEndResize) then - FOnSectionEndResize(Self, Section); - if not FSectionsFitCalculating then - FitToClientWidth; -end; - -procedure TcxCustomHeader.DoSectionTrackEvent(Section: TcxHeaderSection; - Width: Integer; State: TcxSectionTrackState); -begin - if Assigned(FOnSectionTrack) then FOnSectionTrack(Self, Section, Width, State); -end; - -procedure TcxCustomHeader.Paint; -var - I: Integer; -begin - inherited Paint; - - Canvas.Font.Assign(Font); - Canvas.Font.Color := GetTextColor; - Canvas.Brush.Color := GetBackgroundColor; - - if (FSections.Count = 0) and not IsInnerControl and IsDesigning then - begin - Canvas.Pen.Style := psDash; - Windows.Rectangle(Canvas.Handle, ClientRect.Left, ClientRect.Top, - ClientRect.Right, ClientRect.Bottom); - end - else - for I := 0 to FSections.Count do - DrawSection(I); -end; - -function TcxCustomHeader.GetSectionRect(Index: Integer): TRect; -var - ASectionWidths: TcxHeaderSectionWidths; - I: Integer; -begin - SetLength(ASectionWidths, Sections.Count); - for I := 0 to Sections.Count - 1 do - ASectionWidths[I] := Sections[I].Width; - Result := GetSectionRectBySectionWidths(Width, ASectionWidths, Index); -end; - -function TcxCustomHeader.GetSectionRectBySectionWidths(AHeaderWidth: Integer; - const ASectionWidths: TcxHeaderSectionWidths; AIndex: Integer): TRect; -var - I: Integer; -begin - Result := cxEmptyRect; - if (AIndex >= 0) and (AIndex <= Sections.Count) then - begin - for I := 0 to AIndex - 1 do - Inc(Result.Left, ASectionWidths[I]); - if AIndex = Sections.Count then - Result.Right := AHeaderWidth - else - Result.Right := Result.Left + ASectionWidths[AIndex]; - Result.Bottom := Height; - end; -end; - -procedure TcxCustomHeader.WMCaptureChanged(var Message: TMessage); -begin - if (FState = hsNone) then - Exit; - - case FState of - hsSized: - begin - if not ResizeUpdate then - ReleaseSplitLine; - UpdateSizedSection; - end; - hsDragged: - begin - DoSectionEndDragEvent; - RestoreScreenCursor; - end; - end; - FState := hsNone; - SelectedSectionIndex := -1; -end; - -procedure TcxCustomHeader.WMLButtonDown(var Message: TWMLButtonDown); -begin - inherited; - if csDesigning in ComponentState then - Exit; - - MouseCapture := True; - if MouseOnSizer then - begin - FState := hsSized; - if not ResizeUpdate then - InitResize(SizedSection.Right); - DoSectionTrackEvent(SizedSection, SizedSection.Width, tsTrackBegin); - FPrevMousePos := Message.XPos; - end - else - begin - if (UnderMouseSectionIndex <> -1) and UnderMouseSection.AllowClick then - begin - FState := hsPressed; - HotSectionIndex := -1; - SelectedSectionIndex := UnderMouseSectionIndex; - end; - end; -end; - -procedure TcxCustomHeader.WMMouseMove(var Message: TWMMouseMove); -var - ACalcNewWidth: Integer; -begin - inherited; - if csDesigning in ComponentState then - Exit; - - UpdateUnderMouseSection; - - case FState of - hsSized: - begin - ACalcNewWidth := SizedSection.Width + Message.XPos - FPrevMousePos; - if ACalcNewWidth < SizedSection.MinWidth then - ACalcNewWidth := SizedSection.MinWidth - else - if ACalcNewWidth > SizedSection.MaxWidth then - ACalcNewWidth := SizedSection.MaxWidth; - - if not ResizeUpdate then - begin - if FLastDrawPosOnMove <> ( SizedSection.Left + ACalcNewWidth) then - begin - DrawSplitLine(FLastDrawPosOnMove); - DrawSplitLine(SizedSection.Left + ACalcNewWidth); - end; - end - else - begin - FPrevMousePos := FPrevMousePos + ACalcNewWidth - SizedSection.Width; - SizedSection.Width := ACalcNewWidth; - DoSectionTrackEvent(SizedSection, SizedSection.Width, tsTrackMove); - end; - - DoSectionResizeEvent(SizedSection); - end; - hsPressed: - begin - if FDragReorder then - begin - FSectionDragged := False; - FState := hsDragged; - UpdateDraggedSection; - end - else - UpdatePressedSection; - end; - hsDragged: - begin - UpdateDraggedSection; - if SelectedSectionIndex <> UnderMouseSectionIndex then - HotSectionIndex := UnderMouseSectionIndex - else - HotSectionIndex := -1; - end; - hsNone: - begin - UpdateSizedSection; - if MouseOnSizer then - HotSectionIndex := -1 - else - HotSectionIndex := UnderMouseSectionIndex; - end; - end; - - BeginMouseTracking(Self, ClientRect, Self); -end; - -procedure TcxCustomHeader.WMLButtonUp(var Message: TWMLButtonUp); -var - ASection: TcxHeaderSection; - AState: TShiftState; -begin - inherited; - if IsDesigning then - Exit; - - case FState of - hsSized: - begin - if not ResizeUpdate then - begin - SizedSection.Width := FLastDrawPosOnMove - SizedSection.Left; - ReleaseSplitLine; - end; - DoSectionTrackEvent(SizedSection, SizedSection.Width, tsTrackEnd); - UpdateSizedSection; - end; - hsDragged: - begin - if FSectionDragged then - DoSectionEndDrag; - RestoreScreenCursor; - UpdateSections; - end; - hsPressed: - begin - if UnderMouseSectionIndex = SelectedSectionIndex then - begin - AState := KeysToShiftState(Message.Keys); - ASection := SelectedSection; - DoSectionClickEvent(ASection); - ChangeSectionSortOrder(ASection, - GetNextSortOrder(ASection.SortOrder, ssCtrl in AState), - [ssCtrl, ssShift] * AState = []); - end; - end; - end; - FState := hsNone; - MouseCapture := False; - SelectedSectionIndex := -1; -end; - -function TcxCustomHeader.GetSectionIndexAtPos(X, Y: Integer; AIncludeNonSectionPart: Boolean): Integer; -var - I: Integer; - ACount: Integer; -begin - Result := -1; - if AIncludeNonSectionPart then - ACount := FSections.Count - else - ACount := FSections.Count - 1; - for I := 0 to ACount do - if PtInRect(GetSectionRect(I), Point(X, Y)) and PtInRect(ClientRect, Point(X, Y)) then - begin - Result := I; - Break; - end; -end; - -function TcxCustomHeader.GetSelectedSection: TcxHeaderSection; -begin - Result := FSections[SelectedSectionIndex]; -end; - -function TcxCustomHeader.GetSizedSection: TcxHeaderSection; -begin - Result := FSections[SizedSectionIndex]; -end; - -function TcxCustomHeader.GetUnderMouseSection: TcxHeaderSection; -begin - Result := FSections[UnderMouseSectionIndex]; -end; - -function TcxCustomHeader.IsSectionIndex(AIndex: Integer): Boolean; -begin - Result := (AIndex >= 0) and (AIndex < FSections.Count); -end; - -procedure TcxCustomHeader.HeaderMouseLeave; -begin - Perform(CM_MOUSELEAVE, 0, 0); -end; - -procedure TcxCustomHeader.SetHotSectionIndex(Value: Integer); -begin - if (FHotSectionIndex <> Value) then - begin - SetSectionState(FHotSectionIndex, cxbsNormal); - FHotSectionIndex := Value; - SetSectionState(FHotSectionIndex, cxbsHot); - end; -end; - -procedure TcxCustomHeader.SetMouseOnSizer(Value: Boolean); -begin - if FMouseOnSizer <> Value then - begin - FMouseOnSizer := Value; - if FMouseOnSizer then - SetScreenCursor(crHSplit) - else - RestoreScreenCursor; - end; -end; - -procedure TcxCustomHeader.SetSectionState(AIndex: Integer; AState: TcxButtonState); -begin - if (Sections.Count > 0) and (AIndex >= 0) and (AIndex < Sections.Count) then - FSections[AIndex].State := AState; -end; - -procedure TcxCustomHeader.SetSelectedSectionIndex(Value: Integer); -begin - if Value <> -1 then - SetSectionState(Value, cxbsPressed) - else - SetSectionState(FSelectedSectionIndex, cxbsNormal); - FSelectedSectionIndex := Value; -end; - -procedure TcxCustomHeader.SetSizedSectionIndex(Value: Integer); -begin - FSizedSectionIndex := Value; - if FSizedSectionIndex = -1 then - MouseOnSizer := False - else - MouseOnSizer := True; -end; - -procedure TcxCustomHeader.SetUnderMouseSectionIndex(Value: Integer); -begin - FUnderMouseSectionIndex := Value; -end; - -procedure TcxCustomHeader.UpdateDraggedSection; -begin - if UnderMouseSectionIndex <> -1 then - begin - SetScreenCursor(crDrag); - DoSectionDrag(SelectedSection, UnderMouseSection); - end - else - RestoreScreenCursor; -end; - -procedure TcxCustomHeader.UpdatePressedSection; -begin - if UnderMouseSectionIndex <> FSelectedSectionIndex then - SetSectionState(FSelectedSectionIndex, cxbsNormal) - else - SetSectionState(FSelectedSectionIndex, cxbsPressed); -end; - -procedure TcxCustomHeader.UpdateSizedSection; -var - ASectionRect: TRect; - APoint: TPoint; - ASizedSectionIndex, AUnderMouseSectionIndex: Integer; -begin - GetCursorPos(APoint); - APoint := ScreenToClient(APoint); - ASizedSectionIndex := -1; - AUnderMouseSectionIndex := GetSectionIndexAtPos(APoint.X, APoint.Y, True); - if AUnderMouseSectionIndex >= 0 then - begin - ASectionRect := GetSectionRect(AUnderMouseSectionIndex); - if (AUnderMouseSectionIndex < FSections.Count) and - (APoint.X >= ASectionRect.Right - 7) and (APoint.X <= ASectionRect.Right) then - ASizedSectionIndex := AUnderMouseSectionIndex - else - if (AUnderMouseSectionIndex > 0) and - (APoint.X >= ASectionRect.Left) and (APoint.X <= ASectionRect.Left + 7) then - ASizedSectionIndex := AUnderMouseSectionIndex - 1; - if (ASizedSectionIndex > -1) and not Sections[ASizedSectionIndex].AllowResize then - ASizedSectionIndex := -1; - end; - SizedSectionIndex := ASizedSectionIndex; -end; - -procedure TcxCustomHeader.UpdateUnderMouseSection; -var - APoint: TPoint; -begin - GetCursorPos(APoint); - APoint := ScreenToClient(APoint); - UnderMouseSectionIndex := GetSectionIndexAtPos(APoint.X, APoint.Y); -end; - -procedure TcxCustomHeader.CMMouseEnter(var Message: TMessage); -begin - inherited; - BeginMouseTracking(Self, ClientRect, Self); -end; - -procedure TcxCustomHeader.CMMouseLeave(var Message: TMessage); -begin - inherited; - EndMouseTracking(Self); - case FState of - hsNone: - begin - UnderMouseSectionIndex := -1; - SizedSectionIndex := -1; - HotSectionIndex := -1; - end; - end; -end; - -procedure TcxCustomHeader.SetAllowSort(Value: Boolean); -begin - if FAllowSort <> Value then - begin - FAllowSort := Value; - if not FAllowSort then DisableSort; - end; -end; - -procedure TcxCustomHeader.DisableSort; -var - I: Integer; -begin - Sections.BeginUpdate; - try - for I := 0 to Sections.Count - 1 do - Sections[I].SortOrder := soNone; - finally - Sections.EndUpdate; - end; -end; - -procedure TcxCustomHeader.FitToClientWidth; -var - ASectionWidths: TcxHeaderSectionWidths; - ASectionWidthsChanged: Boolean; - I: Integer; -begin - if not HandleAllocated or (csReading in ComponentState) then - Exit; - CalcSectionWidths(Width, ASectionWidths); - ASectionWidthsChanged := False; - for I := 0 to Sections.Count - 1 do - if Sections[I].Width <> ASectionWidths[I] then - begin - ASectionWidthsChanged := True; - Break; - end; - if ASectionWidthsChanged then - begin - FSectionsFitCalculating := True; - try - Sections.BeginUpdate; - try - for I := 0 to Sections.Count - 1 do - Sections[I].Width := ASectionWidths[I]; - finally - Sections.EndUpdate; - end; - finally - FSectionsFitCalculating := False; - end; - end; -end; - -function TcxCustomHeader.GetBackgroundColor: TColor; -begin - if Color = clBtnFace then - Result := LookAndFeelPainter.DefaultHeaderColor - else - Result := clDefault; - - if Result = clDefault then - Result := Color; -end; - -function TcxCustomHeader.GetSectionContentBounds(ASectionBounds: TRect; - AState: TcxButtonState): TRect; -begin - Result := LookAndFeel.Painter.HeaderControlSectionContentBounds( - ASectionBounds, AState); -end; - -function TcxCustomHeader.GetTextColor: TColor; -begin - if Font.Color = clWindowText then - Result := LookAndFeelPainter.DefaultHeaderTextColor - else - Result := clDefault; - - if Result = clDefault then - Result := Font.Color; -end; - -function TcxCustomHeader.IsInnerControl: Boolean; -begin - Result := False; -end; - -{ TcxHeaderSection } -constructor TcxHeaderSection.Create(Collection: TCollection); -begin - FWidth := 50; - FMaxWidth := 1000; - FMinWidth := 30; - FAllowClick := False; - FImageIndex := -1; - FParentBiDiMode := True; - inherited Create(Collection); - ParentBiDiModeChanged; - FDataIndex := Index; - FAllowResize := True; -end; - -procedure TcxHeaderSection.Assign(Source: TPersistent); -var - ASection: TcxHeaderSection; -begin - if Source is TcxHeaderSection then - begin - ASection := TcxHeaderSection(Source); - Alignment := ASection.Alignment; - AllowClick := ASection.AllowClick; - AllowResize := ASection.AllowResize; - AutoSize := ASection.AutoSize; - BiDiMode := ASection.BiDiMode; - DataIndex := ASection.DataIndex; - ImageIndex := ASection.ImageIndex; - MinWidth := ASection.MinWidth; - MaxWidth := ASection.MaxWidth; - ParentBiDiMode := ASection.ParentBiDiMode; - SortOrder := ASection.SortOrder; - Text := ASection.Text; - Width := ASection.Width; - end - else - inherited Assign(Source); -end; - -procedure TcxHeaderSection.SetBiDiMode(Value: TBiDiMode); -begin - if Value <> FBiDiMode then - begin - FBiDiMode := Value; - FParentBiDiMode := False; - Changed(False); - end; -end; - -procedure TcxHeaderSection.SetDataIndex(Value: Integer); -begin - if Value < -1 then - Value := -1; - if Value <> FDataIndex then - begin - FDataIndex := Value; - Changed(False); - end; -end; - -function TcxHeaderSection.IsBiDiModeStored: Boolean; -begin - Result := not FParentBiDiMode; -end; - -function TcxHeaderSection.IsDataIndexStored: Boolean; -begin - Result := FDataIndex <> Index; -end; - -function TcxHeaderSection.GetHeaderControl: TcxCustomHeader; -begin - Result := TcxHeaderSections(Collection).FHeaderControl; -end; - -procedure TcxHeaderSection.SetParentBiDiMode(Value: Boolean); -begin - if FParentBiDiMode <> Value then - begin - FParentBiDiMode := Value; - ParentBiDiModeChanged; - end; -end; - -procedure TcxHeaderSection.SetState(Value: TcxButtonState); -begin - if FState <> Value then - begin - FState := Value; - Changed(False); - end; -end; - -procedure TcxHeaderSection.ParentBiDiModeChanged; -begin - if FParentBiDiMode then - begin - if GetOwner <> nil then - begin - BiDiMode := TcxHeaderSections(GetOwner).FHeaderControl.BiDiMode; - FParentBiDiMode := True; - end; - end; -end; - -function TcxHeaderSection.UseRightToLeftReading: Boolean; -begin - Result := SysLocale.MiddleEast and (BiDiMode <> bdLeftToRight); -end; - -function TcxHeaderSection.UseRightToLeftAlignment: Boolean; -begin - Result := SysLocale.MiddleEast and (BiDiMode = bdRightToLeft); -end; - -function TcxHeaderSection.GetDisplayName: string; -begin - Result := Text; - if Result = '' then - Result := inherited GetDisplayName; -end; - -function TcxHeaderSection.GetLeft: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Index - 1 do - Inc(Result, TcxHeaderSections(Collection)[I].Width); -end; - -function TcxHeaderSection.GetRight: Integer; -begin - Result := Left + Width; -end; - -procedure TcxHeaderSection.SetAlignment(Value: TAlignment); -begin - if FAlignment <> Value then - begin - FAlignment := Value; - Changed(False); - end; -end; - -procedure TcxHeaderSection.SetAutoSize(Value: Boolean); -begin - if Value <> FAutoSize then - begin - FAutoSize := Value; - if TcxHeaderSections(Collection).FHeaderControl <> nil then - TcxHeaderSections(Collection).FHeaderControl.AdjustSize; - Changed(True); - end; -end; - -procedure TcxHeaderSection.SetMaxWidth(Value: TcxNaturalNumber); -begin - if Value < FMinWidth then - Value := FMinWidth; - if Value > 10000 then - Value := 10000; - FMaxWidth := Value; - SetWidth(FWidth); -end; - -procedure TcxHeaderSection.SetMinWidth(Value: TcxNaturalNumber); -begin - if Value > FMaxWidth then - Value := FMaxWidth; - FMinWidth := Value; - SetWidth(FWidth); -end; - -procedure TcxHeaderSection.SetText(const Value: string); -begin - if FText <> Value then - begin - FText := Value; - Changed(False); - end; -end; - -procedure TcxHeaderSection.SetSortOrder(Value: TcxHeaderSortOrder); -begin - if FSortOrder <> Value then - begin - FSortOrder := Value; - Changed(False); - end; -end; - -procedure TcxHeaderSection.SetWidth(Value: Integer); -begin - if Value < FMinWidth then - Value := FMinWidth; - if Value > FMaxWidth then - Value := FMaxWidth; - if FWidth <> Value then - begin - FWidth := Value; - Changed(True); - - if Collection <> nil then - begin - TcxHeaderSections(Collection).FHeaderControl.DoSectionResizeEvent(Self); - TcxHeaderSections(Collection).FHeaderControl.DoSectionEndResizeEvent(Self); - end; - end; -end; - -procedure TcxHeaderSection.SetImageIndex(const Value: TImageIndex); -begin - if Value <> FImageIndex then - begin - FImageIndex := Value; - Changed(False); - end; -end; - -{ TcxHeaderSections } - -constructor TcxHeaderSections.Create(HeaderControl: TcxCustomHeader); -begin - inherited Create(TcxHeaderSection); - FHeaderControl := HeaderControl; -end; - -procedure TcxHeaderSections.Assign(Source: TPersistent); -var - FHeaderSection: TcxHeaderSection; - I: Integer; -begin - if (Source is TcxHeaderSections) then - begin - Clear; - for I := 0 to (Source as TcxHeaderSections).Count - 1 do - begin - FHeaderSection := Add; - FHeaderSection.Assign((Source as TcxHeaderSections).Items[I]); - end; - end - else - inherited Assign(Source); -end; - -function TcxHeaderSections.Add: TcxHeaderSection; -begin - Result := TcxHeaderSection.Create(Self); -end; - -function TcxHeaderSections.GetItem(Index: Integer): TcxHeaderSection; -begin - Result := TcxHeaderSection(inherited GetItem(Index)); -end; - -function TcxHeaderSections.GetOwner: TPersistent; -begin - Result := FHeaderControl; -end; - -procedure TcxHeaderSections.SetItem(Index: Integer; Value: TcxHeaderSection); -begin - inherited SetItem(Index, Value); -end; - -procedure TcxHeaderSections.Update(Item: TCollectionItem); -begin - if FHeaderControl <> nil then - begin - if Item <> nil then - begin - FHeaderControl.UpdateSection(Item.Index); - FHeaderControl.DoSectionChange; - end - else - begin - if not FHeaderControl.FSectionsFitCalculating then - FHeaderControl.FitToClientWidth; - FHeaderControl.UpdateSections; - FHeaderControl.DoSectionsChange; - end; - end; -end; - -function TcxHeaderSections.Insert(Index: Integer): TcxHeaderSection; -begin - BeginUpdate; - try - if Index < 0 then Index := 0; - if Index > Count then Index := Count - 1; - - Result := Add; - Result.Index := Index; - finally - EndUpdate; - end; -end; -{ TcxHeaderSections } - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxHint.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxHint.pas deleted file mode 100644 index 9ec4bd76..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxHint.pas +++ /dev/null @@ -1,1788 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxHint; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Forms, Controls{must be after Forms for D11}, Graphics, - ImgList, Messages, StdCtrls, SysUtils, cxClasses, cxContainer, cxControls, - cxEdit, cxGraphics, cxLookAndFeels, cxTextEdit; - -type - TcxCustomHintStyleController = class; - TcxCustomHintStyle = class; - TcxCustomHintWindow = class; - TcxHintAnimationDelay = 0..1000; - TcxHintStyleChangedEvent = procedure (Sender: TObject; AStyle: TcxCustomHintStyle) of object; - TcxShowHintEvent = procedure(Sender: TObject; var HintStr: string; - var CanShow: Boolean; var HintInfo: THintInfo) of object; - TcxShowHintExEvent = procedure(Sender: TObject; var Caption, HintStr: string; - var CanShow: Boolean; var HintInfo: THintInfo) of object; - TcxCallOutPosition = (cxbpNone, cxbpAuto, cxbpLeftBottom, cxbpLeftTop, cxbpTopLeft, - cxbpTopRight, cxbpRightBottom, cxbpRightTop, cxbpBottomRight, cxbpBottomLeft); - TcxHintIconType = (cxhiNone, cxhiApplication, cxhiInformation, cxhiWarning, - cxhiError, cxhiQuestion, cxhiWinLogo, cxhiCurrentApplication, cxhiCustom); - TcxHintAnimate = TcxHintAnimationStyle; - TcxHintIconSize = (cxisDefault, cxisLarge, cxisSmall); - - IcxHint = interface - ['{0680CE5D-391B-45A1-B55D-AFCAE92F2DA6}'] - function GetAnimate: TcxHintAnimate; - function GetAnimationDelay: TcxHintAnimationDelay; - function GetBorderColor: TColor; - function GetCallOutPosition: TcxCallOutPosition; - function GetColor: TColor; - function GetIconSize: TcxHintIconSize; - function GetIconType: TcxHintIconType; - function GetHintCaption: string; - function GetRounded: Boolean; - function GetRoundRadius: Integer; - function GetStandard: Boolean; - function GetHintFont: TFont; - function GetHintCaptionFont: TFont; - function GetHintIcon: TIcon; - procedure SetHintCaption(Value: string); - property HintCaption: string read GetHintCaption write SetHintCaption; - end; - - { TcxCustomHintStyle } - - TcxCustomHintStyle = class(TPersistent) - private - FAnimate: TcxHintAnimate; - FAnimationDelay: TcxHintAnimationDelay; - FCallOutPosition: TcxCallOutPosition; - FBorderColor: TColor; - FColor: TColor; - FFont: TFont; - FCaptionFont: TFont; - FIcon: TIcon; - FIconSize: TcxHintIconSize; - FIconType: TcxHintIconType; - FRounded: Boolean; - FRoundRadius: Integer; - FStandard: Boolean; - FDirectAccessMode: Boolean; - FIsDestroying: Boolean; - FModified: Boolean; - FOwner: TPersistent; - FUpdateCount: Integer; - FOnChanged: TNotifyEvent; - function GetControl: TcxControl; - function GetFont: TFont; - procedure SetAnimate(Value: TcxHintAnimate); - procedure SetAnimationDelay(Value: TcxHintAnimationDelay); - procedure SetCallOutPosition(Value: TcxCallOutPosition); - procedure SetBorderColor(Value: TColor); - procedure SetCaptionFont(Value: TFont); - procedure SetColor(Value: TColor); - procedure SetFont(Value: TFont); - procedure SetIcon(Value: TIcon); - procedure SetIconSize(Value: TcxHintIconSize); - procedure SetIconType(Value: TcxHintIconType); - procedure SetRounded(Value: Boolean); - procedure SetRoundRadius(Value: Integer); - procedure SetStandard(Value: Boolean); - procedure IconChangeHandler(Sender: TObject); - procedure InternalRestoreDefault; - protected - FHintStyleController: TcxCustomHintStyleController; - function GetOwner: TPersistent; override; - function BaseGetHintStyleController: TcxCustomHintStyleController; - procedure BaseSetHintStyleController(Value: TcxCustomHintStyleController); - procedure Changed; virtual; - procedure ControllerChangedNotification(AStyleController: TcxCustomHintStyleController); virtual; - procedure ControllerFreeNotification(AHintStyleController: TcxCustomHintStyleController); virtual; - procedure HintStyleControllerChanged; virtual; - property HintStyleController: TcxCustomHintStyleController read BaseGetHintStyleController - write BaseSetHintStyleController; - property IsDestroying: Boolean read FIsDestroying write FIsDestroying; - property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; - public - constructor Create(AOwner: TPersistent; ADirectAccessMode: Boolean); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure BeginUpdate; - procedure EndUpdate; - class function GetDefaultHintStyleController: TcxCustomHintStyleController; virtual; - procedure RestoreDefaults; virtual; - property Control: TcxControl read GetControl; - property DirectAccessMode: Boolean read FDirectAccessMode; - published - property Animate: TcxHintAnimate read FAnimate write SetAnimate default cxhaAuto; - property AnimationDelay: TcxHintAnimationDelay read FAnimationDelay write SetAnimationDelay default 100; - property BorderColor: TColor read FBorderColor write SetBorderColor default clWindowFrame; - property CallOutPosition: TcxCallOutPosition read FCallOutPosition write SetCallOutPosition default cxbpNone; - property CaptionFont: TFont read FCaptionFont write SetCaptionFont; - property Color: TColor read FColor write SetColor default clInfoBk; - property Font: TFont read GetFont write SetFont; - property Icon: TIcon read FIcon write SetIcon; - property IconSize: TcxHintIconSize read FIconSize write SetIconSize default cxisDefault; - property IconType: TcxHintIconType read FIconType write SetIconType default cxhiNone; - property Rounded: Boolean read FRounded write SetRounded default False; - property RoundRadius: Integer read FRoundRadius write SetRoundRadius default 11; - property Standard: Boolean read FStandard write SetStandard default False; - end; - - TcxCustomHintWindowClass = class of TcxCustomHintWindow; - TcxHintStyleClass = class of TcxCustomHintStyle; - - { TcxCustomHintStyleController } - - TcxCustomHintStyleController = class(TComponent) - private - FGlobal: Boolean; - FActive: Boolean; - FIsDestruction: Boolean; - FListeners: TList; - FOnHintStyleChanged: TcxHintStyleChangedEvent; - FOnShowHint: TcxShowHintEvent; - FOnShowHintEx: TcxShowHintExEvent; - FHintShortPause: Integer; - FHintPause: Integer; - FHintHidePause: Integer; - FHintWindow: TcxCustomHintWindow; - FPreviousHintWindowClass: THintWindowClass; - FUpdateCount: Integer; - procedure DoApplicationShowHint(var HintStr: string; var CanShow: Boolean; - var HintInfo: THintInfo); - procedure DoShowHint(var AHintStr: string; var ACanShow: Boolean; - var AHintInfo: THintInfo); - procedure DoShowHintEx(var AHintStr, AHintCaption: string; var ACanShow: Boolean; - var AHintInfo: THintInfo); - function IsGlobalStored: Boolean; - procedure SetGlobal(Value: Boolean); - procedure SetHintStyle(Value: TcxCustomHintStyle); - procedure HintStyleChanged(Sender: TObject); - procedure SetHintShortPause(Value: Integer); - procedure SetHintPause(Value: Integer); - procedure SetHintHidePause(Value: Integer); - procedure SetApplicationHintProperties; - procedure ShowHintHandler(var HintStr: string; var CanShow: Boolean; - var HintInfo: THintInfo); - protected - FHintStyle: TcxCustomHintStyle; - function GetHintStyleClass: TcxHintStyleClass; virtual; - function GetHintWindowClass: TcxCustomHintWindowClass; virtual; - procedure InitHintWindowClass; virtual; - procedure Loaded; override; - procedure BeginUpdate; virtual; - procedure EndUpdate; virtual; - procedure AddListener(AListener: TcxCustomHintStyle); virtual; - procedure Changed; - procedure DoHintStyleChanged(AStyle: TcxCustomHintStyle); virtual; - procedure RemoveListener(AListener: TcxCustomHintStyle); virtual; - procedure UninitHintWindowClass; virtual; - property Active: Boolean read FActive; - property Global: Boolean read FGlobal write SetGlobal stored IsGlobalStored; - property HintHidePause: Integer read FHintHidePause write SetHintHidePause - default 2500; - property HintPause: Integer read FHintPause write SetHintPause default 500; - property HintShortPause: Integer read FHintShortPause - write SetHintShortPause default 50; - property HintStyle: TcxCustomHintStyle read FHintStyle write SetHintStyle; - property IsDestruction: Boolean read FIsDestruction write FIsDestruction; - property Listeners: TList read FListeners; - property OnHintStyleChanged: TcxHintStyleChangedEvent - read FOnHintStyleChanged write FOnHintStyleChanged; - property OnShowHint: TcxShowHintEvent read FOnShowHint write FOnShowHint; - property OnShowHintEx: TcxShowHintExEvent read FOnShowHintEx write FOnShowHintEx; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure SaveShowHintEvent; virtual; - procedure RestoreShowHintEvent; virtual; - - procedure ShowHint(X, Y: Integer; ACaption, AHint: string; AMaxWidth: Integer = 0); - procedure HideHint; - function GetHintWidth(AHint: string): Integer; - function GetHintHeight(AHint: string): Integer; - - property HintWindow: TcxCustomHintWindow read FHintWindow; - end; - - { TcxHintStyleController } - - TcxHintStyleController = class(TcxCustomHintStyleController) - published - property Global; - property HintStyle; - property HintShortPause; - property HintPause; - property HintHidePause; - property OnHintStyleChanged; - property OnShowHint; - property OnShowHintEx; - end; - - { TcxCustomHintWindow } - - TcxCustomHintWindow = class(TcxBaseHintWindow) - private - FCallOutPosition: TcxCallOutPosition; - FBorderColor: TColor; - FHintColor: TColor; - FCaption, FText: string; - FCaptionFont: TFont; - FIcon: TIcon; - FIconSize: TcxHintIconSize; - FIconType: TcxHintIconType; - FRounded: Boolean; - FRoundRadius: Integer; - FWordWrap: Boolean; - Rgn: HRGN; - FLeftRightMargint, FIconLeftMargin: Integer; - FTopBottomMargin, FIconTopMargin: Integer; - FIconHeight: Integer; - FIconWidth: Integer; - FCaptionRect: TRect; - FTextRect: TRect; - FHintWndRect: TRect; - FCallOutSize: Byte; - FCalculatedCallOutPos: TcxCallOutPosition; - FIndentDelta: Integer; - function GetAnimate: TcxHintAnimate; - procedure SetAnimate(AValue: TcxHintAnimate); - procedure SetIcon(Value: TIcon); - procedure WMShowWindow(var Message: TWMShowWindow); message WM_SHOWWINDOW; - protected - procedure EnableRegion; override; - - procedure CreateBalloonForm; virtual; - procedure Paint; override; - procedure CalculateValues; virtual; - procedure CalculateController; virtual; - procedure CalculateIcon; virtual; - function CalculateAutoCallOutPosition(const ARect: TRect): TcxCallOutPosition; virtual; - procedure CalculateRects(const ACaption, AText: string; - const AMaxWidth: Integer); virtual; - procedure LoadPropertiesFromController(const AHintController: TcxCustomHintStyleController); - procedure LoadPropertiesFromHintInterface(const AHintIntf: IcxHint); - procedure LoadPropertiesFromHintStyle(const AHintStyle: TcxCustomHintStyle); - - property StandardHint: Boolean read FStandardHint write FStandardHint; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure ActivateHint(ARect: TRect; const AHint: string); override; - function CalcHintRect(MaxWidth: Integer; const AHint: string; - AData: Pointer): TRect; override; - - property Animate: TcxHintAnimate read GetAnimate write SetAnimate; // obsolete - property BorderColor: TColor read FBorderColor write FBorderColor; - property CallOutPosition: TcxCallOutPosition read FCallOutPosition write FCallOutPosition; - property Caption: string read FCaption write FCaption; - property CaptionFont: TFont read FCaptionFont write FCaptionFont; - property Icon: TIcon read FIcon write SetIcon; - property IconSize: TcxHintIconSize read FIconSize write FIconSize; - property IconType: TcxHintIconType read FIconType write FIconType; - property Rounded: Boolean read FRounded write FRounded; - property RoundRadius: Integer read FRoundRadius write FRoundRadius; - property WordWrap: Boolean read FWordWrap write FWordWrap; - end; - - { TcxHintWindow } - - TcxHintWindow = class(TcxCustomHintWindow) - end; - -implementation - -uses - Dialogs, cxEditConsts, cxEditUtils, cxExtEditUtils, dxThemeConsts, - dxThemeManager, dxUxTheme; - -type -{$IFNDEF DELPHI6} - TAnimateWindowProc = function(hWnd: HWND; dwTime: DWORD; dwFlags: DWORD): BOOL; stdcall; -{$ENDIF} - - { TcxHintedControlController } - - TcxHintedControlController = class(TComponent) - private - FHintedControl: TControl; - procedure SetHintedControl(Value: TControl); - protected - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - public - destructor Destroy; override; - property HintedControl: TControl read FHintedControl write SetHintedControl; - end; - -{$IFNDEF DELPHI6} -const - SPI_GETTOOLTIPANIMATION = $1016; - SPI_GETTOOLTIPFADE = $1018; -{$ENDIF} - -var -{$IFNDEF DELPHI6} - AnimateWindowProc: TAnimateWindowProc = nil; - UserHandle: THandle; -{$ENDIF} - FControllerList: TList; - FHintedControlController: TcxHintedControlController; - FIsApplicationOnShowHintSaved: Boolean; - FSavedApplicationOnShowHint: TShowHintEvent; - -function FindHintController: TcxCustomHintStyleController; forward; -function FindHintedControl: TControl; forward; -function GetHintedControl: TControl; forward; -function GetWindowParent(AWnd: HWND): TWinControl; forward; -procedure SetHintedControl(Value: TControl); forward; - -function FindHintController: TcxCustomHintStyleController; - - function FindHintControllerOnParents: TcxCustomHintStyleController; - - function FindHintControllerAmongComponents( - AControl: TWinControl): TcxCustomHintStyleController; - var - AController: TcxCustomHintStyleController; - I: Integer; - begin - Result := nil; - for I := 0 to AControl.ComponentCount - 1 do - if AControl.Components[I] is TcxCustomHintStyleController then - begin - AController := TcxCustomHintStyleController(AControl.Components[I]); - if AController.Active then - begin - Result := AController; - Break; - end; - end; - end; - - var - AHintedControl: TControl; - AParent: TWinControl; - begin - Result := nil; - AHintedControl := FindHintedControl; - if AHintedControl = nil then - Exit; - if (AHintedControl is TWinControl) and TWinControl(AHintedControl).HandleAllocated then - AParent := GetWindowParent(TWinControl(AHintedControl).Handle) - else - AParent := AHintedControl.Parent; - while AParent <> nil do - begin - Result := FindHintControllerAmongComponents(AParent); - if (Result <> nil) or not AParent.HandleAllocated then - Break; - AParent := GetWindowParent(AParent.Handle); - end; - end; - -var - AController: TcxCustomHintStyleController; - I: Integer; -begin - Result := FindHintControllerOnParents; - if Result = nil then - for I := FControllerList.Count - 1 downto 0 do - begin - AController := TcxCustomHintStyleController(FControllerList[I]); - if AController.Active and AController.Global then - begin - Result := AController; - Break; - end; - end; -end; - -function FindHintedControl: TControl; -var - AWnd: HWND; -begin - if GetHintedControl <> nil then - Result := GetHintedControl - else - begin - Result := nil; - AWnd := WindowFromPoint(InternalGetCursorPos); - if AWnd <> 0 then - begin - Result := FindControl(AWnd); - if Result = nil then - Result := GetWindowParent(AWnd); - end; - end; -end; - -function GetHintedControl: TControl; -begin - if FHintedControlController <> nil then - Result := FHintedControlController.HintedControl - else - Result := nil; -end; - -function GetWindowParent(AWnd: HWND): TWinControl; -begin - Result := nil; - while (Result = nil) and (AWnd <> 0) and IsChildClassWindow(AWnd) do - begin - AWnd := GetParent(AWnd); - Result := FindControl(AWnd); - end; -end; - -procedure SetHintedControl(Value: TControl); -begin - if FHintedControlController <> nil then - FHintedControlController.HintedControl := Value; -end; - -{ TcxHintedControlController } - -destructor TcxHintedControlController.Destroy; -begin - HintedControl := nil; - inherited Destroy; -end; - -procedure TcxHintedControlController.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = FHintedControl) then - HintedControl := nil; -end; - -procedure TcxHintedControlController.SetHintedControl(Value: TControl); -begin - if Value <> FHintedControl then - begin - if FHintedControl <> nil then - FHintedControl.RemoveFreeNotification(Self); - FHintedControl := Value; - if FHintedControl <> nil then - FHintedControl.FreeNotification(Self); - end; -end; - -{ TcxCustomHintStyle } - -constructor TcxCustomHintStyle.Create(AOwner: TPersistent; ADirectAccessMode: Boolean); -begin - inherited Create; - FOwner := AOwner; - FDirectAccessMode := ADirectAccessMode; - FFont := TFont.Create; - FCaptionFont := TFont.Create; - FIcon := TIcon.Create; - FIcon.OnChange := IconChangeHandler; - FModified := False; - InternalRestoreDefault; - HintStyleController := GetDefaultHintStyleController; -end; - -destructor TcxCustomHintStyle.Destroy; -begin - FIsDestroying := True; - if FHintStyleController <> nil then - FHintStyleController.RemoveListener(Self); - FreeAndNil(FIcon); - FreeAndNil(FCaptionFont); - FreeAndNil(FFont); - inherited Destroy; -end; - -procedure TcxCustomHintStyle.Assign(Source: TPersistent); -begin - if (Source is TcxCustomHintStyle) then - begin - BeginUpdate; - try - with (Source as TcxCustomHintStyle) do - begin - Self.Animate := Animate; - Self.AnimationDelay := AnimationDelay; - Self.BorderColor := BorderColor; - Self.CallOutPosition := CallOutPosition; - Self.CaptionFont.Assign(CaptionFont); - Self.Color := Color; - Self.HintStyleController := HintStyleController; - Self.IconSize := IconSize; - Self.IconType := IconType; - Self.Rounded := Rounded; - Self.RoundRadius := RoundRadius; - Self.Standard := Standard; - Self.Font.Assign(Font); - Self.CaptionFont.Assign(CaptionFont); - Self.Icon.Assign(Icon); - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -procedure TcxCustomHintStyle.InternalRestoreDefault; -var - FRestoreFont: TFont; -begin - FAnimate := cxhaAuto; - FAnimationDelay := 100; - FBorderColor := clWindowFrame; - FCallOutPosition := cxbpNone; - FColor := clInfoBk; - FIconSize := cxisDefault; - FIconType := cxhiNone; - FRounded := False; - FRoundRadius := 11; - FStandard := False; - FRestoreFont := TFont.Create; - try - FFont.Assign(FRestoreFont); - FCaptionFont.Assign(FRestoreFont); - finally - FreeAndNil(FRestoreFont); - end; -end; - -procedure TcxCustomHintStyle.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TcxCustomHintStyle.EndUpdate; -begin - if FUpdateCount <> 0 then - begin - Dec(FUpdateCount); - if FModified then - Changed; - end; -end; - -class function TcxCustomHintStyle.GetDefaultHintStyleController: TcxCustomHintStyleController; -begin - Result := nil; -end; - -procedure TcxCustomHintStyle.RestoreDefaults; -begin - BeginUpdate; - try - InternalRestoreDefault; - finally - EndUpdate; - end; -end; - -function TcxCustomHintStyle.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -function TcxCustomHintStyle.BaseGetHintStyleController: TcxCustomHintStyleController; -begin - if FHintStyleController = GetDefaultHintStyleController then - Result := nil - else - Result := FHintStyleController; -end; - -procedure TcxCustomHintStyle.BaseSetHintStyleController(Value: TcxCustomHintStyleController); - - function CheckHintStyleController(AHintStyleController: TcxCustomHintStyleController): Boolean; - var - AOwner: TPersistent; - begin - Result := False; - AOwner := GetOwner; - while AOwner <> nil do - begin - if (AOwner is TcxCustomHintStyleController) and (AOwner = AHintStyleController) then - Exit; - AOwner := GetPersistentOwner(AOwner); - end; - Result := True; - end; - -begin - if Value = nil then - Value := GetDefaultHintStyleController; - - if (Value <> nil) and (not CheckHintStyleController(Value)) then Exit; - - if Value <> FHintStyleController then - begin - if FHintStyleController <> nil then - FHintStyleController.RemoveListener(Self); - FHintStyleController := Value; - if FHintStyleController <> nil then - FHintStyleController.AddListener(Self); - HintStyleControllerChanged; - end; -end; - -procedure TcxCustomHintStyle.Changed; -begin - if FUpdateCount = 0 then - begin - if not DirectAccessMode and Assigned(FOnChanged) and not IsDestroying then - FOnChanged(Self); - FModified := False; - end - else - FModified := True; -end; - -procedure TcxCustomHintStyle.ControllerChangedNotification(AStyleController: TcxCustomHintStyleController); -begin - Changed; -end; - -procedure TcxCustomHintStyle.ControllerFreeNotification(AHintStyleController: TcxCustomHintStyleController); -begin - if (AHintStyleController <> nil) and (AHintStyleController = FHintStyleController) then - HintStyleController := nil; -end; - -procedure TcxCustomHintStyle.HintStyleControllerChanged; -begin - Changed; -end; - -function TcxCustomHintStyle.GetControl: TcxControl; -begin - Result := TcxControl(FOwner); -end; - -function TcxCustomHintStyle.GetFont: TFont; -begin - Result := FFont; -end; - -procedure TcxCustomHintStyle.SetAnimate(Value: TcxHintAnimate); -begin - if Value <> FAnimate then - begin - FAnimate := Value; - Changed; - end; -end; - -procedure TcxCustomHintStyle.SetAnimationDelay(Value: TcxHintAnimationDelay); -begin - if Value <> FAnimationDelay then - begin - FAnimationDelay := Value; - Changed; - end; -end; - -procedure TcxCustomHintStyle.SetCallOutPosition(Value: TcxCallOutPosition); -begin - if Value <> FCallOutPosition then - begin - FCallOutPosition := Value; - Changed; - end; -end; - -procedure TcxCustomHintStyle.SetBorderColor(Value: TColor); -begin - if Value <> FBorderColor then - begin - FBorderColor := Value; - Changed; - end; -end; - -procedure TcxCustomHintStyle.SetColor(Value: TColor); -begin - if FColor <> Value then - begin - FColor := Value; - Changed; - end; -end; - -procedure TcxCustomHintStyle.SetCaptionFont(Value: TFont); -begin - FCaptionFont.Assign(Value); - Changed; -end; - -procedure TcxCustomHintStyle.SetFont(Value: TFont); -begin - FFont.Assign(Value); - Changed; -end; - -procedure TcxCustomHintStyle.SetIconSize(Value: TcxHintIconSize); -begin - if FIconSize <> Value then - begin - FIconSize := Value; - Changed; - end; -end; - -procedure TcxCustomHintStyle.SetIconType(Value: TcxHintIconType); -begin - if FIconType <> Value then - begin - FIconType := Value; - Changed; - end; -end; - -procedure TcxCustomHintStyle.SetIcon(Value: TIcon); -begin - if FIcon <> Value then - begin - FIcon.Assign(Value); - Changed; - end; -end; - -procedure TcxCustomHintStyle.SetRounded(Value: Boolean); -begin - if FRounded <> Value then - begin - FRounded := Value; - Changed; - end; -end; - -procedure TcxCustomHintStyle.SetRoundRadius(Value: Integer); -begin - if FRoundRadius <> Value then - begin - FRoundRadius := Value; - Changed; - end; -end; - -procedure TcxCustomHintStyle.SetStandard(Value: Boolean); -begin - if FStandard <> Value then - begin - FStandard := Value; - Changed; - end; -end; - -procedure TcxCustomHintStyle.IconChangeHandler(Sender: TObject); -begin - Changed; -end; - -{ TcxCustomHintStyleController } - -constructor TcxCustomHintStyleController.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FUpdateCount := 0; - FActive := True; - FHintShortPause := 50; - FHintPause := 500; - FHintHidePause :=2500; - FListeners := TList.Create; - FHintStyle := GetHintStyleClass.Create(Self, False); - FHintStyle.OnChanged := HintStyleChanged; - FHintWindow := GetHintWindowClass.Create(Self); - if FControllerList.Count = 0 then - FGlobal := True; - FControllerList.Add(Self); - if not (csDesigning in ComponentState) then - InitHintWindowClass; -end; - -destructor TcxCustomHintStyleController.Destroy; -var - I: Integer; -begin - FIsDestruction := True; - if not (csDesigning in ComponentState) then - UninitHintWindowClass; - FControllerList.Remove(Self); - for I := 0 to FListeners.Count - 1 do - TcxCustomHintStyle(FListeners[I]).ControllerFreeNotification(Self); - FreeAndNil(FHintStyle); - FreeAndNil(FListeners); - FreeAndNil(FHintWindow); - RestoreShowHintEvent; - inherited Destroy; -end; - -procedure TcxCustomHintStyleController.Assign(Source: TPersistent); -begin - if (Source is TcxCustomHintStyleController) then - begin - BeginUpdate; - try - with (Source as TcxCustomHintStyleController) do - begin - Self.OnHintStyleChanged := OnHintStyleChanged; - Self.OnShowHint := OnShowHint; - Self.OnShowHintEx := OnShowHintEx; - Self.HintShortPause := HintShortPause; - Self.HintPause := HintPause; - Self.HintHidePause := HintHidePause; - Self.HintStyle := HintStyle; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -procedure TcxCustomHintStyleController.ShowHint(X, Y: Integer; ACaption, AHint: string; AMaxWidth: Integer = 0); -var - R: TRect; -begin - SetHintedControl(FindVCLWindow(Point(X, Y))); - FHintWindow.FCaption := ACaption; - if AMaxWidth = 0 then - AMaxWidth := Screen.Width; - R := FHintWindow.CalcHintRect(AMaxWidth, AHint, nil); - OffsetRect(R, X, Y); - FHintWindow.ActivateHint(R, AHint); -end; - -{ Q100672 -var - R: TRect; - AHintInfo: THintInfo; - ACanShow: Boolean; -begin - ZeroMemory(@AHintInfo, SizeOf(THintInfo)); - AHintInfo.HintControl := FindVCLWindow(Point(X, Y)); - AHintInfo.HintWindowClass := FHintWindow.Classinfo; - AHintInfo.HintPos := Point(X, Y); - if AMaxWidth = 0 then - AMaxWidth := Screen.Width; - AHintInfo.HintMaxWidth := AMaxWidth; - AHintInfo.HintStr := AHint; - - ACanShow := True; - DoShowHintEx(AHintInfo.HintStr, ACaption, ACanShow, AHintInfo); - if ACanShow then - begin - SetHintedControl(AHintInfo.HintControl); - FHintWindow.Caption := ACaption; - R := FHintWindow.CalcHintRect(AHintInfo.HintMaxWidth, AHint, AHintInfo.HintData); - cxOffsetRect(R, AHintInfo.HintPos); - FHintWindow.ActivateHint(R, AHint); - end; -end; -} - -function TcxCustomHintStyleController.GetHintWidth(AHint: string): Integer; -var - R: TRect; -begin - R := FHintWindow.CalcHintRect(Screen.Width, AHint, nil); - Result := R.Right - R.Left; -end; - -function TcxCustomHintStyleController.GetHintHeight(AHint: string): Integer; -var - R: TRect; -begin - R := FHintWindow.CalcHintRect(Screen.Width, AHint, nil); - Result := R.Bottom - R.Top; -end; - -procedure TcxCustomHintStyleController.HideHint; -begin - SetHintedControl(nil); - if (FHintWindow <> nil) and FHintWindow.HandleAllocated and - IsWindowVisible(FHintWindow.Handle) then - ShowWindow(FHintWindow.Handle, SW_HIDE); -end; - -procedure TcxCustomHintStyleController.Loaded; -begin - inherited Loaded; - SetApplicationHintProperties; - Changed; - SaveShowHintEvent; -end; - -procedure TcxCustomHintStyleController.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TcxCustomHintStyleController.EndUpdate; -begin - Dec(FUpdateCount); - if FUpdateCount = 0 then - SetApplicationHintProperties; -end; - -procedure TcxCustomHintStyleController.AddListener(AListener: TcxCustomHintStyle); -begin - if (AListener = nil) or (FListeners.IndexOf(AListener) >= 0) then - Exit; - FListeners.Add(AListener); -end; - -procedure TcxCustomHintStyleController.Changed; -var - I: Integer; -begin - if (HintStyle <> nil) and Assigned(FOnHintStyleChanged) then - FOnHintStyleChanged(Self, HintStyle); - if not IsDestruction then - for I := 0 to Listeners.Count - 1 do - DoHintStyleChanged(TcxCustomHintStyle(Listeners[I])); -end; - -procedure TcxCustomHintStyleController.DoHintStyleChanged(AStyle: TcxCustomHintStyle); -begin - AStyle.ControllerChangedNotification(Self); - if Assigned(FOnHintStyleChanged) then - FOnHintStyleChanged(Self, AStyle); -end; - -function TcxCustomHintStyleController.GetHintStyleClass: TcxHintStyleClass; -begin - Result := TcxCustomHintStyle; -end; - -function TcxCustomHintStyleController.GetHintWindowClass: TcxCustomHintWindowClass; -begin - Result := TcxCustomHintWindow; -end; - -procedure TcxCustomHintStyleController.InitHintWindowClass; -var - AShowHint: Boolean; -begin - AShowHint := Application.ShowHint; - Application.ShowHint := False; - FPreviousHintWindowClass := HintWindowClass; - HintWindowClass := GetHintWindowClass; - Application.ShowHint := AShowHint; -end; - -procedure TcxCustomHintStyleController.RemoveListener(AListener: TcxCustomHintStyle); -begin - if (AListener = nil) or (FListeners.IndexOf(AListener) < 0) then - Exit; - if not IsDestruction then - FListeners.Remove(AListener); -end; - -procedure TcxCustomHintStyleController.UninitHintWindowClass; -var - AShowHint: Boolean; -begin - if (FControllerList[FControllerList.Count - 1] = Self) and - (HintWindowClass = GetHintWindowClass) then - begin - AShowHint := Application.ShowHint; - Application.ShowHint := False; - HintWindowClass := FPreviousHintWindowClass; - Application.ShowHint := AShowHint; - end; -end; - -procedure TcxCustomHintStyleController.DoApplicationShowHint(var HintStr: string; - var CanShow: Boolean; var HintInfo: THintInfo); -begin - if Assigned(FSavedApplicationOnShowHint) then - FSavedApplicationOnShowHint(HintStr, CanShow, HintInfo); -end; - -procedure TcxCustomHintStyleController.DoShowHintEx(var AHintStr, AHintCaption: string; - var ACanShow: Boolean; var AHintInfo: THintInfo); -begin - if Assigned(FOnShowHintEx) then - FOnShowHintEx(Self, AHintCaption, AHintStr, ACanShow, AHintInfo); -end; - -procedure TcxCustomHintStyleController.DoShowHint(var AHintStr: string; - var ACanShow: Boolean; var AHintInfo: THintInfo); -var - AHintCaption: string; -begin - if Assigned(FOnShowHint) then - FOnShowHint(Self, AHintStr, ACanShow, AHintInfo); - AHintCaption := ''; - DoShowHintEx(AHintStr, AHintCaption, ACanShow, AHintInfo); - FHintWindow.Caption := AHintCaption; - if ACanShow then - DoApplicationShowHint(AHintStr, ACanShow, AHintInfo); -end; - -function TcxCustomHintStyleController.IsGlobalStored: Boolean; -begin - Result := (FControllerList.Count > 1) or not FGlobal; -end; - -procedure TcxCustomHintStyleController.SetGlobal(Value: Boolean); - - procedure ResetGlobal; - var - I: Integer; - begin - for I := 0 to FControllerList.Count - 1 do - TcxCustomHintStyleController(FControllerList[I]).FGlobal := False; - end; - -begin - if FGlobal <> Value then - begin - if Value then - ResetGlobal; - FGlobal := Value; - end; -end; - -procedure TcxCustomHintStyleController.SetHintStyle(Value: TcxCustomHintStyle); -begin - FHintStyle.Assign(Value); -end; - -procedure TcxCustomHintStyleController.HintStyleChanged(Sender: TObject); -begin - Changed; -end; - -procedure TcxCustomHintStyleController.SetApplicationHintProperties; -begin - if not (csDesigning in ComponentState) then - begin - Application.HintShortPause := FHintShortPause; - Application.HintPause := FHintPause; - Application.HintHidePause := FHintHidePause; - end; -end; - -procedure TcxCustomHintStyleController.SetHintShortPause(Value: Integer); -begin - if FHintShortPause <> Value then - begin - FHintShortPause := Value; - if FUpdateCount = 0 then - SetApplicationHintProperties; - end; -end; - -procedure TcxCustomHintStyleController.SetHintPause(Value: Integer); -begin - if FHintPause <> Value then - begin - FHintPause := Value; - if FUpdateCount = 0 then - SetApplicationHintProperties; - end; -end; - -procedure TcxCustomHintStyleController.SetHintHidePause(Value: Integer); -begin - if FHintHidePause <> Value then - begin - FHintHidePause := Value; - if FUpdateCount = 0 then - SetApplicationHintProperties; - end; -end; - -procedure TcxCustomHintStyleController.SaveShowHintEvent; -begin - if not (csDesigning in ComponentState) and not FIsApplicationOnShowHintSaved then - begin - FSavedApplicationOnShowHint := Application.OnShowHint; - FIsApplicationOnShowHintSaved := True; - Application.OnShowHint := ShowHintHandler; - end; -end; - -procedure TcxCustomHintStyleController.RestoreShowHintEvent; -begin - if not (csDesigning in ComponentState) and (FControllerList.Count = 0) and - FIsApplicationOnShowHintSaved then - Application.OnShowHint := FSavedApplicationOnShowHint; -end; - -procedure TcxCustomHintStyleController.ShowHintHandler(var HintStr: string; - var CanShow: Boolean; var HintInfo: THintInfo); -var - AController: TcxCustomHintStyleController; -begin - SetHintedControl(HintInfo.HintControl); - AController := FindHintController; - if AController <> nil then - AController.DoShowHint(HintStr, CanShow, HintInfo) - else - DoApplicationShowHint(HintStr, CanShow, HintInfo); -end; - -{ TcxCustomHintWindow } - -constructor TcxCustomHintWindow.Create(AOwner: TComponent); -begin - inherited; - FCallOutSize := 15; - FCallOutPosition := cxbpNone; - FCalculatedCallOutPos := cxbpNone; - FCaption := ''; - Color := clInfoBk; - FHintColor := clInfoBk; - FBorderColor := clWindowFrame; - FRounded := False; - FRoundRadius := 11; - FIconType := cxhiQuestion; - FStandardHint := True; - FWordWrap := True; - FCaptionFont := TFont.Create; - FCaptionFont.Assign(Font); - FCaptionFont.Style := FCaptionFont.Style + [fsBold]; - FIcon := TIcon.Create; - - BorderStyle := bsSingle; -end; - -destructor TcxCustomHintWindow.Destroy; -begin - if Assigned(FIcon) then FreeAndNil(FIcon); - FCaptionFont.Free; - inherited; -end; - -procedure TcxCustomHintWindow.SetIcon(Value: TIcon); -begin - FIcon.Assign(Value); -end; - -function TcxCustomHintWindow.CalcHintRect(MaxWidth: Integer; const AHint: string; - AData: Pointer): TRect; -begin - CalculateController; - if not FStandardHint then - begin - FText := AHint; - inherited Caption := AHint; - CalculateIcon; - CalculateRects(FCaption, FText, MaxWidth); - Result := Rect(0, 0, FHintWndRect.Right, FHintWndRect.Bottom); - end else - begin - Canvas.Font.Assign(Screen.HintFont); - Result := inherited CalcHintRect(MaxWidth, AHint, AData); - end; -end; - -procedure TcxCustomHintWindow.ActivateHint(ARect: TRect; const AHint: string); -begin - if not StandardHint then - begin - Inc(ARect.Bottom, 4); - case FCalculatedCallOutPos of - cxbpLeftBottom: - OffsetRect(ARect, -1, - RectHeight(ARect) - 3); - cxbpLeftTop: - OffsetRect(ARect, 0, -(FCallOutSize * 2) - 6); - cxbpTopLeft: - OffsetRect(ARect, -FCallOutSize, 0); - cxbpTopRight: - OffsetRect(ARect, FCallOutSize - RectWidth(ARect), 0); - cxbpRightBottom: - OffsetRect(ARect, - RectWidth(ARect) + 3, - RectHeight(ARect) - 2); - cxbpRightTop: - OffsetRect(ARect, - RectWidth(ARect) + 1, -(FCallOutSize * 2) - 5); - cxbpBottomRight: - OffsetRect(ARect, - RectWidth(ARect) + FCallOutSize + 1, - RectHeight(ARect) - FCallOutSize - 1); - cxbpBottomLeft: - OffsetRect(ARect, - FCallOutSize - 1, - RectHeight(ARect) - FCallOutSize - 3); - end; - end; - - inherited; -end; - -procedure TcxCustomHintWindow.WMShowWindow(var Message: TWMShowWindow); -begin - inherited; - if not Message.Show then - SetHintedControl(nil); -end; - -procedure TcxCustomHintWindow.Paint; -var - ActualRgn: HRGN; - FIconDrawSize: Integer; - FIconDrawFlag: Integer; -begin - if not FStandardHint then - begin - Canvas.Brush.Color := FHintColor; - Canvas.FillRect(ClientRect); - Canvas.Pen.Color := FBorderColor; - Canvas.Pen.Style := psSolid; - Canvas.Brush.Color := FBorderColor; - Canvas.Brush.Style := bsSolid; - - ActualRgn := CreateRectRgnIndirect(Rect(0, 0, 0, 0)); - try - GetWindowRgn(Handle, ActualRgn); - OffsetRgn(ActualRgn, -1, -1); - FrameRgn(Canvas.Handle, ActualRgn, Canvas.Brush.Handle, 1, 1); - - Canvas.Brush.Color := FHintColor; - - if not FIcon.Empty then - begin - FIconDrawFlag := DI_NORMAL; - case IconSize of - cxisLarge: FIconDrawSize := 32; - cxisSmall: FIconDrawSize := 16; - else - FIconDrawSize := FIcon.Width; - end; - DrawIconEx(Canvas.Handle, FIconLeftMargin, FIconTopMargin, FIcon.Handle, - FIconDrawSize, FIconDrawSize, 0, 0, FIconDrawFlag); - end; - if FCaption <> '' then - begin - Canvas.Font.Assign(FCaptionFont); - DrawText(Canvas.Handle, PChar(FCaption), - Length(FCaption), FCaptionRect, - DT_WORDBREAK or DT_NOPREFIX or DT_VCENTER); - end; - Canvas.Font.Assign(Font); - DrawText(Canvas.Handle, PChar(FText), Length(FText), - FTextRect, DT_WORDBREAK or DT_NOPREFIX); - finally - DeleteObject(ActualRgn); - end; - end - else - begin - DisableRegion; - Canvas.Brush.Color := FHintColor; - Canvas.FillRect(ClientRect); -{$IFDEF DELPHI5} - Canvas.Font.Assign(Screen.HintFont); -{$ENDIF} - inherited Paint; - end; -end; - -procedure TcxCustomHintWindow.CalculateController; - - procedure ResetToStandardHint; - begin - FStandardHint := True; - FHintColor := Application.HintColor; - end; - -var - AController: TcxCustomHintStyleController; - AIHint: IcxHint; -begin - if (GetHintedControl <> nil) and Supports(GetHintedControl, IcxHint, AIHint) then - begin - LoadPropertiesFromHintInterface(AIHint); - Exit; - end; - AController := FindHintController; - if AController <> nil then - LoadPropertiesFromController(AController) - else - ResetToStandardHint; -end; - -function TcxCustomHintWindow.GetAnimate: TcxHintAnimate; -begin - Result := AnimationStyle; -end; - -procedure TcxCustomHintWindow.SetAnimate(AValue: TcxHintAnimate); -begin - AnimationStyle := AValue; -end; - -procedure TcxCustomHintWindow.LoadPropertiesFromController( - const AHintController: TcxCustomHintStyleController); -begin - Caption := AHintController.HintWindow.Caption; - LoadPropertiesFromHintStyle(AHintController.HintStyle); -end; - -procedure TcxCustomHintWindow.LoadPropertiesFromHintInterface(const AHintIntf: IcxHint); -var - FDefaultFont: TFont; -begin - FCaption := AHintIntf.GetHintCaption; - Animate := AHintIntf.GetAnimate; - AnimationDelay := AHintIntf.GetAnimationDelay; - FCallOutPosition := AHintIntf.GetCallOutPosition; - FBorderColor := AHintIntf.GetBorderColor; - FHintColor := AHintIntf.GetColor; - FIconSize := AHintIntf.GetIconSize; - FIconType := AHintIntf.GetIconType; - FRounded := AHintIntf.GetRounded; - FStandardHint := AHintIntf.GetStandard; - if FRounded = False then - FRoundRadius := 0 - else - FRoundRadius := AHintIntf.GetRoundRadius; - if Assigned(AHintIntf.GetHintIcon) then - FIcon.Assign(AHintIntf.GetHintIcon) - else - FreeAndNil(FIcon); - FDefaultFont := TFont.Create; - try - if Assigned(AHintIntf.GetHintFont) then - Font.Assign(AHintIntf.GetHintFont) - else - Font.Assign(FDefaultFont); - if Assigned(AHintIntf.GetHintCaptionFont) then - FCaptionFont.Assign(AHintIntf.GetHintCaptionFont) - else - FCaptionFont.Assign(FDefaultFont); - finally - FreeAndNil(FDefaultFont); - end; -end; - -procedure TcxCustomHintWindow.LoadPropertiesFromHintStyle( - const AHintStyle: TcxCustomHintStyle); -begin - Animate := AHintStyle.Animate; - AnimationDelay := AHintStyle.AnimationDelay; - FCallOutPosition := AHintStyle.CallOutPosition; - FBorderColor := AHintStyle.BorderColor; - FHintColor := AHintStyle.Color; - FIcon.Assign(AHintStyle.Icon); - FIconSize := AHintStyle.IconSize; - FIconType := AHintStyle.IconType; - FRounded := AHintStyle.Rounded; - FStandardHint := AHintStyle.Standard; - if FRounded = False then - FRoundRadius := 0 - else - FRoundRadius := AHintStyle.RoundRadius; - Font.Assign(AHintStyle.Font); - FCaptionFont.Assign(AHintStyle.CaptionFont); -end; - -procedure TcxCustomHintWindow.CalculateValues; - - function GetIconWidth: Integer; - var - FBitmap: TBitmap; - begin - FBitmap := TBitmap.Create; - try - FBitmap.Width := FIcon.Width; - FBitmap.Height := FIcon.Height; - DrawIconEx(FBitmap.Canvas.Handle, 0, 0, FIcon.Handle, - FIcon.Width, FIcon.Height, 0, 0, DI_NORMAL); - Result := FIcon.Width; - finally - FBitmap.Free; - end; - end; - -begin - FIndentDelta := 6; - if FRounded = False then - begin - FLeftRightMargint := FIndentDelta; - FTopBottomMargin := FIndentDelta; - end - else - begin - FLeftRightMargint := (FRoundRadius div 2) + 2; - FTopBottomMargin := (FRoundRadius div 2) + 2; - end; - if not FIcon.Empty then - begin - if FIconType <> cxhiCustom then - FIconWidth := FIcon.Width - else - FIconWidth := GetIconWidth; - FIconHeight := FIcon.Height; - case FIconSize of - cxisLarge: - begin - FIconHeight := 32; - FIconWidth := 32; - end; - cxisSmall: - begin - FIconHeight := 16; - FIconWidth := 16; - end; - end; - end - else - begin - FIconHeight := 0; - FIconWidth := 0; - end; - FIconLeftMargin := FLeftRightMargint; - FIconTopMargin := FLeftRightMargint; -end; - -procedure TcxCustomHintWindow.CalculateRects(const ACaption, AText: string; - const AMaxWidth: Integer); - - function IsCaptionEpty: Boolean; - begin - Result := ACaption = ''; - end; - - function GetIconHorzOffset: Integer; - begin - if FIconWidth > 0 then - Result := FIndentDelta - else - Result := 0; - end; - - function GetMaxCaptionWidth(AIsCaption: Boolean = True): Integer; - var - ADec: Integer; - begin - Result := AMaxWidth; - if Result <= 0 then - begin - Result := MaxInt; - Exit; - end; - ADec := GetIconHorzOffset + 2 * FLeftRightMargint + FIndentDelta; - if AIsCaption then - Inc(ADec, FIconWidth); - Dec(Result, ADec); - end; - - procedure GetCaptionBounds(var ARect: TRect; ACaption: string); - begin - DrawText(Canvas.Handle, PChar(ACaption), - Length(ACaption), ARect, DT_CALCRECT or DT_WORDBREAK or DT_NOPREFIX); - end; - - procedure OffsetRectWithIndents(var ARect: TRect; AIsCaption: Boolean = True); - var - AIconHorzOffset: Integer; - begin - AIconHorzOffset := GetIconHorzOffset; - if AIsCaption then - Inc(AIconHorzOffset, FIconWidth); - InflateRectEx(ARect, FLeftRightMargint + AIconHorzOffset, FTopBottomMargin, - FLeftRightMargint + AIconHorzOffset + FIndentDelta, FTopBottomMargin); - end; - - procedure VertOffsetTextRect(var ATextRect: TRect; const ACaptionBounds: TRect); - var - AVertOffset: Integer; - begin - if RectHeight(ACaptionBounds) > FIconHeight then - AVertOffset := RectHeight(ACaptionBounds) + FIndentDelta - else - AVertOffset := FIconHeight + FIndentDelta; - Inc(ATextRect.Top, AVertOffset); - Inc(ATextRect.Bottom, AVertOffset); - end; - - function CalcCallOutPosition(AHintWndRect: TRect): TRect; - begin - Result := cxEmptyRect; - FCalculatedCallOutPos := CalculateAutoCallOutPosition(AHintWndRect); - with Result do - case FCalculatedCallOutPos of - cxbpRightBottom, cxbpRightTop: Right := FCallOutSize; - cxbpBottomLeft, cxbpBottomRight: Bottom := FCallOutSize; - cxbpLeftTop, cxbpLeftBottom: - begin - Left := FCallOutSize; - Right := FCallOutSize; - FIconLeftMargin := FIconLeftMargin + FCallOutSize; - end; - cxbpTopLeft, cxbpTopRight: - begin - Top := FCallOutSize; - Bottom := FCallOutSize; - FIconTopMargin := FIconTopMargin + FCallOutSize; - end; - end; - end; - - procedure OffsetRectWithCallOutPosition(var ARect: TRect; - const ACalloutPosition: TRect); - begin - with ACalloutPosition do - InflateRectEx(ARect, Left, Top, Right, Bottom); - end; - - procedure CorrectRectHeightWithIcon(var ARect: TRect); - begin - if RectHeight(ARect) < FIconHeight then - ARect.Bottom := ARect.Top + FIconHeight; - end; - - procedure CalculateTextsBouds(var ACaptionBounds, ATextBounds: TRect); - begin - if ACaption = '' then - begin - ATextBounds := Rect(0, 0, GetMaxCaptionWidth, 1); - ACaptionBounds := Rect(0, 0, 0, 0); - end - else - begin - ACaptionBounds := Rect(0, 0, GetMaxCaptionWidth, 1); - Canvas.Font.Assign(FCaptionFont); - GetCaptionBounds(ACaptionBounds, ACaption); - ATextBounds := Rect(0, 0, GetMaxCaptionWidth(False), 1); - end; - Canvas.Font.Assign(Font); - if AText = '' then - ATextBounds := cxEmptyRect - else - GetCaptionBounds(ATextBounds, AText); - end; - - procedure OffsetRectsWithIndents(var ACaptionRect, ATextRect, - AHintWndRect: TRect); - var - ACallOutPosition: TRect; - begin - if ACaption <> '' then - begin - OffsetRectWithIndents(ACaptionRect); - OffsetRectWithIndents(ATextRect, False); - VertOffsetTextRect(ATextRect, ACaptionRect); - if ACaptionRect.Right > ATextRect.Right then - ATextRect.Right := ACaptionRect.Right - else - ACaptionRect.Right := ATextRect.Right; - end - else - begin - OffsetRectWithIndents(ATextRect); - CorrectRectHeightWithIcon(ATextRect); - end; - with ATextRect do - AHintWndRect := - Rect(0, 0, Right + FLeftRightMargint, Bottom + FTopBottomMargin); - ACallOutPosition := CalcCallOutPosition(AHintWndRect); - if FCaption <> '' then - OffsetRectWithCallOutPosition(ACaptionRect, ACallOutPosition); - OffsetRectWithCallOutPosition(ATextRect, ACallOutPosition); - OffsetRectWithCallOutPosition(AHintWndRect, ACallOutPosition); - end; - -begin - CalculateValues; - CalculateTextsBouds(FCaptionRect, FTextRect); - OffsetRectsWithIndents(FCaptionRect, FTextRect, FHintWndRect); -end; - -function TcxCustomHintWindow.CalculateAutoCallOutPosition(const ARect: TRect): TcxCallOutPosition; -var - FCursorPos: TPoint; -begin - if FCallOutPosition = cxbpAuto then - begin - Windows.GetCursorPos(FCursorPos); - if FCursorPos.Y < (Screen.Height div 2) then - begin - if FCursorPos.X - RectWidth(ARect) < 0 then - Result := cxbpTopLeft - else - Result := cxbpTopRight; - end - else - begin - if FCursorPos.X - RectWidth(ARect) < 0 then - Result := cxbpBottomLeft - else - Result := cxbpBottomRight; - end; - end - else - Result := FCallOutPosition; -end; - -procedure TcxCustomHintWindow.CalculateIcon; -type - TcxRealHintIconType = (IDIAPPLICATION, IDIINFORMATION, IDIWARNING, - IDIERROR, IDIQUESTION, IDIWINLOGO); -const - FRealIconTypes: array[TcxRealHintIconType] of MakeIntResource = ( - IDI_APPLICATION, IDI_INFORMATION, IDI_WARNING, IDI_ERROR, IDI_QUESTION, - IDI_WINLOGO); -begin - if FIconType = cxhiNone then - begin - if Assigned(FIcon) and not FIcon.Empty then - begin - FreeAndNil(FIcon); - FIcon := TIcon.Create; - end; - Exit; - end; - if FIconType = cxhiCustom then - Exit; - if FIconType = cxhiCurrentApplication then - FIcon.Assign(Application.Icon) - else - FIcon.Handle := LoadIcon(0, - FRealIconTypes[TcxRealHintIconType(Ord(FIconType) - 1)]); -end; - -procedure TcxCustomHintWindow.EnableRegion; -begin - CreateBalloonForm; -end; - -procedure TcxCustomHintWindow.CreateBalloonForm; -var - R: TRect; - CallOutRgn: HRGN; - CallOutTops: array[0..2] of TPoint; -begin - if (FCalculatedCallOutPos = cxbpNone) and (Rounded = False) then - begin - DisableRegion; - Exit; - end; - R := ClientRect; - - case FCalculatedCallOutPos of - cxbpLeftBottom: - begin - InflateRectEx(R, FCallOutSize, 0, 0, 0); - CallOutTops[0] := Point(R.Left, R.Bottom - FCallOutSize); - CallOutTops[1] := Point(R.Left, R.Bottom - FCallOutSize * 2); - CallOutTops[2] := Point(R.Left - FCallOutSize, R.Bottom - FCallOutSize); - end; - cxbpLeftTop: - begin - InflateRectEx(R, FCallOutSize, 0, 0, 0); - CallOutTops[0] := Point(R.Left, R.Top + FCallOutSize); - CallOutTops[1] := Point(R.Left, R.Top + FCallOutSize * 2); - CallOutTops[2] := Point(R.Left - FCallOutSize, R.Top + FCallOutSize); - end; - cxbpTopRight: - begin - InflateRectEx(R, 0, FCallOutSize, 0, 0); - CallOutTops[0] := Point(R.Right - FCallOutSize, R.Top); - CallOutTops[1] := Point(R.Right - FCallOutSize * 2, R.Top); - CallOutTops[2] := Point(R.Right - FCallOutSize, R.Top - FCallOutSize); - end; - cxbpTopLeft: - begin - InflateRectEx(R, 0, FCallOutSize, 0, 0); - CallOutTops[0] := Point(R.Left + FCallOutSize, R.Top); - CallOutTops[1] := Point(R.Left + FCallOutSize * 2, R.Top); - CallOutTops[2] := Point(R.Left + FCallOutSize, R.Top - FCallOutSize); - end; - cxbpRightBottom: - begin - InflateRectEx(R, 0, 0, -FCallOutSize, 0); - CallOutTops[0] := Point(R.Right - 1, R.Bottom - FCallOutSize); - CallOutTops[1] := Point(R.Right - 1, R.Bottom - FCallOutSize * 2); - CallOutTops[2] := Point(R.Right + FCallOutSize, R.Bottom - FCallOutSize); - end; - cxbpRightTop: - begin - InflateRectEx(R, 0, 0, -FCallOutSize, 0); - CallOutTops[0] := Point(R.Right - 1, R.Top + FCallOutSize); - CallOutTops[1] := Point(R.Right - 1, R.Top + FCallOutSize * 2); - CallOutTops[2] := Point(R.Right + FCallOutSize, R.Top + FCallOutSize); - end; - cxbpBottomRight: - begin - InflateRectEx(R, 0, 0, 0, -FCallOutSize); - CallOutTops[0] := Point(R.Right - FCallOutSize, R.Bottom - 1); - CallOutTops[1] := Point(R.Right - FCallOutSize * 2, R.Bottom - 1); - CallOutTops[2] := Point(R.Right - FCallOutSize, R.Bottom + FCallOutSize); - end; - cxbpBottomLeft: - begin - InflateRectEx(R, 0, 0, 0, -FCallOutSize); - CallOutTops[0] := Point(R.Left + FCallOutSize, R.Bottom - 1); - CallOutTops[1] := Point(R.Left + FCallOutSize * 2, R.Bottom - 1); - CallOutTops[2] := Point(R.Left + FCallOutSize, R.Bottom + FCallOutSize); - end; - end; - - Rgn := CreateRoundRectRgn(R.Left, R.Top, R.Right, R.Bottom, FRoundRadius, FRoundRadius); - CallOutRgn := 0; - if FCalculatedCallOutPos <> cxbpNone then - begin - CallOutRgn := CreatePolygonRgn(CallOutTops, 3, WINDING); - CombineRgn(Rgn, Rgn, CallOutRgn, RGN_OR ); - end; - OffsetRgn(Rgn, 1, 1); - SetWindowRgn(Handle, Rgn, True); - if CallOutRgn <> 0 then - DeleteObject(CallOutRgn); -end; - -initialization -{$IFNDEF DELPHI6} - UserHandle := GetModuleHandle('USER32'); - if UserHandle <> 0 then - @AnimateWindowProc := GetProcAddress(UserHandle, 'AnimateWindow'); -{$ENDIF} - FControllerList := TList.Create; - FHintedControlController := TcxHintedControlController.Create(nil); - -finalization - FreeAndNil(FHintedControlController); - if FControllerList.Count <> 0 then - raise EcxEditError.Create('HintStyleControllerList.Count <> 0'); - FreeAndNil(FControllerList); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxHintEditor.dfm b/internal/x.46/ExpressEditors Library 5/Sources/cxHintEditor.dfm deleted file mode 100644 index 9978878d..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxHintEditor.dfm +++ /dev/null @@ -1,582 +0,0 @@ -object cxHintStyleEditor: TcxHintStyleEditor - Left = 195 - Top = 125 - BorderStyle = bsDialog - ClientHeight = 440 - ClientWidth = 576 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - ShowHint = True - OnActivate = FormActivate - OnCreate = FormCreate - OnDestroy = FormDestroy - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object lblHintColour: TLabel - Left = 8 - Top = 412 - Width = 46 - Height = 13 - Caption = 'Hint Color' - end - object cxBtnOk: TcxButton - Left = 415 - Top = 408 - Width = 75 - Height = 25 - Hint = 'Accept you changes and return to the Grep Demo' - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 9 - end - object cxBtnCancel: TcxButton - Left = 495 - Top = 408 - Width = 75 - Height = 25 - Hint = 'Discard your changes and return to the grep demo' - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 10 - end - object cxCbStandard: TcxCheckBox - Left = 304 - Top = 408 - Width = 105 - Height = 21 - Hint = 'Check to display hints in the standard Windows way' - Properties.DisplayUnchecked = 'False' - Properties.Caption = 'Standard Hints' - TabOrder = 7 - OnClick = cxCbStandardClick - end - object cxGbHintFont: TcxGroupBox - Left = 8 - Top = 8 - Width = 185 - Height = 185 - Alignment = alTopLeft - Caption = ' Hint Font ' - TabOrder = 0 - object Label1: TLabel - Left = 12 - Top = 80 - Width = 23 - Height = 13 - Caption = 'Style' - end - object Label2: TLabel - Left = 124 - Top = 80 - Width = 20 - Height = 13 - Caption = 'Size' - end - object Label3: TLabel - Left = 12 - Top = 40 - Width = 24 - Height = 13 - Caption = 'Color' - end - object cxFnHint: TcxFontNameComboBox - Left = 12 - Top = 16 - Width = 161 - Height = 21 - Hint = 'Font for the hint windows' - Properties.FontPreview.Visible = False - Properties.OnChange = cxFnHintPropertiesChange - TabOrder = 0 - OnClick = cxFnHintClick - end - object cxClbHintFontStyles: TcxCheckListBox - Left = 12 - Top = 96 - Width = 105 - Height = 81 - Hint = 'Font Style for Hints' - Columns = 0 - EditValue = 0 - Items = < - item - Tag = 0 - Text = 'Bold' - end - item - Tag = 0 - Text = 'Italics' - end - item - Tag = 0 - Text = 'Underline' - end - item - Tag = 0 - Text = 'Strike Thro' - end> - ParentColor = False - ScrollWidth = 0 - TabOrder = 2 - TabWidth = 0 - OnClickCheck = cxClbHintFontStylesClickCheck - end - object cxLbHfSize: TcxListBox - Left = 124 - Top = 96 - Width = 49 - Height = 81 - Hint = 'Font Size for Hints' - ExtendedSelect = False - ItemHeight = 13 - ParentColor = False - TabOrder = 3 - OnClick = cxLbHfSizeClick - end - object cxCcbHintFontColour: TcxColorComboBox - Left = 12 - Top = 56 - Width = 161 - Height = 21 - Properties.DefaultDescription = 'Color not selected' - Properties.Items = <> - Properties.PrepareInfo = '' - TabOrder = 1 - OnClick = cxCcbHintFontColourClick - end - end - object cxgbHintCapFont: TcxGroupBox - Left = 200 - Top = 8 - Width = 185 - Height = 185 - Alignment = alTopLeft - Caption = ' Hint Caption Font ' - TabOrder = 1 - object Label4: TLabel - Left = 12 - Top = 80 - Width = 23 - Height = 13 - Caption = 'Style' - end - object Label5: TLabel - Left = 124 - Top = 80 - Width = 20 - Height = 13 - Caption = 'Size' - end - object Label6: TLabel - Left = 12 - Top = 40 - Width = 24 - Height = 13 - Caption = 'Color' - end - object cxFnHinCap: TcxFontNameComboBox - Left = 12 - Top = 16 - Width = 161 - Height = 21 - Hint = 'Font for the hint windows' - Properties.FontPreview.Visible = False - Properties.OnChange = cxFnHinCapPropertiesChange - TabOrder = 0 - OnClick = cxFnHinCapClick - end - object cxClbHintCapFontStyles: TcxCheckListBox - Tag = 1 - Left = 12 - Top = 96 - Width = 105 - Height = 81 - Hint = 'Font Style for Hint Captions' - Columns = 0 - EditValue = 0 - Items = < - item - Tag = 0 - Text = 'Bold' - end - item - Tag = 0 - Text = 'Italics' - end - item - Tag = 0 - Text = 'Underline' - end - item - Tag = 0 - Text = 'Strike Thro' - end> - ParentColor = False - ScrollWidth = 0 - TabOrder = 2 - TabWidth = 0 - OnClickCheck = cxClbHintFontStylesClickCheck - end - object cxLbHcfSize: TcxListBox - Left = 124 - Top = 96 - Width = 49 - Height = 81 - Hint = 'Font Size for Hint Caption' - ItemHeight = 13 - ParentColor = False - TabOrder = 3 - OnClick = cxLbHcfSizeClick - end - object cxCcbHintCapColor: TcxColorComboBox - Left = 12 - Top = 56 - Width = 161 - Height = 21 - Properties.DefaultDescription = 'Color not selected' - Properties.Items = <> - Properties.PrepareInfo = '' - TabOrder = 1 - OnClick = cxCcbHintCapColorClick - end - end - object cxGbHintShape: TcxGroupBox - Left = 392 - Top = 8 - Width = 177 - Height = 89 - Alignment = alTopLeft - Caption = ' Shape ' - ParentFont = False - TabOrder = 2 - object Label7: TLabel - Left = 8 - Top = 14 - Width = 72 - Height = 13 - Caption = 'Callout Position' - end - object Label8: TLabel - Left = 8 - Top = 64 - Width = 68 - Height = 13 - Caption = 'Round Radius' - end - object cxCbHintCalloutPos: TcxComboBox - Left = 8 - Top = 32 - Width = 161 - Height = 21 - Hint = 'The '#39'Callout'#39' position' - Properties.DropDownListStyle = lsFixedList - Properties.Items.Strings = ( - 'None' - 'Auto' - 'Left Bottom' - 'Left Top' - 'Top Left' - 'Top Right' - 'Right Bottom' - 'Right Top' - 'Bottom Right' - 'Bottom Left') - TabOrder = 0 - OnClick = cxCbHintCalloutPosClick - end - object cxcbHintRounded: TcxCheckBox - Left = 96 - Top = 10 - Width = 75 - Height = 21 - Hint = 'Rounded corners on the hint windows' - ParentBackground = False - Properties.DisplayUnchecked = 'False' - Properties.OnChange = cxcbHintRoundedPropertiesChange - Properties.Caption = 'Rounded' - TabOrder = 1 - end - object cxSeHintRadius: TcxSpinEdit - Left = 88 - Top = 60 - Width = 81 - Height = 21 - Hint = 'Radius of the rounded corners if enabled' - Properties.MaxValue = 100 - Properties.MinValue = 5 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeHintRadiusPropertiesChange - TabOrder = 2 - Value = 11 - end - end - object cxGbHintIcons: TcxGroupBox - Left = 8 - Top = 200 - Width = 185 - Height = 97 - Alignment = alTopLeft - Caption = ' Icons ' - TabOrder = 4 - object Label11: TLabel - Left = 8 - Top = 16 - Width = 48 - Height = 13 - Caption = 'Icon Type' - end - object cxCbHintIconType: TcxComboBox - Left = 8 - Top = 32 - Width = 169 - Height = 21 - Hint = 'The Icon type that will be displayed in the hint window' - ParentFont = False - Properties.DropDownListStyle = lsFixedList - Properties.Items.Strings = ( - 'None' - 'Application' - 'Information' - 'Warning' - 'Error' - 'Question' - 'WinLogo' - 'CurrentApplication') - TabOrder = 0 - OnClick = cxCbHintIconTypeClick - end - object cxRbHIDef: TcxRadioButton - Left = 8 - Top = 64 - Width = 57 - Height = 17 - Hint = 'Default Icon Size' - Caption = 'Default' - TabOrder = 1 - OnClick = cxRbHIDefClick - ParentBackground = False - end - object cxRbHILarge: TcxRadioButton - Tag = 1 - Left = 72 - Top = 64 - Width = 49 - Height = 17 - Hint = 'Large Icon Size' - Caption = 'Large' - TabOrder = 2 - OnClick = cxRbHIDefClick - ParentBackground = False - end - object cxRbHISmall: TcxRadioButton - Tag = 2 - Left = 128 - Top = 64 - Width = 49 - Height = 17 - Hint = 'Small Icon Size' - Caption = 'Small' - TabOrder = 3 - OnClick = cxRbHIDefClick - ParentBackground = False - end - end - object cxGbHintPause: TcxGroupBox - Left = 8 - Top = 304 - Width = 185 - Height = 97 - Alignment = alTopLeft - Caption = ' Timings ' - TabOrder = 5 - object Label18: TLabel - Left = 8 - Top = 24 - Width = 77 - Height = 13 - Caption = 'Hint Hide Pause' - end - object Label19: TLabel - Left = 8 - Top = 48 - Width = 52 - Height = 13 - Caption = 'Hint Pause' - end - object Label20: TLabel - Left = 8 - Top = 72 - Width = 80 - Height = 13 - Caption = 'Hint Short Pause' - end - object cxSeHintHidePause: TcxSpinEdit - Left = 96 - Top = 20 - Width = 81 - Height = 21 - Hint = 'The animation delay' - Properties.Increment = 100 - Properties.LargeIncrement = 500 - Properties.MaxValue = 10000 - Properties.MinValue = 500 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeHintHidePausePropertiesChange - TabOrder = 0 - Value = 2500 - end - object cxSeHintPause: TcxSpinEdit - Left = 96 - Top = 44 - Width = 81 - Height = 21 - Hint = 'The animation delay' - Properties.Increment = 10 - Properties.LargeIncrement = 100 - Properties.MaxValue = 1000 - Properties.MinValue = 50 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeHintPausePropertiesChange - TabOrder = 1 - Value = 500 - end - object cxSeShortHintPause: TcxSpinEdit - Left = 96 - Top = 68 - Width = 81 - Height = 21 - Hint = 'The animation delay' - Properties.Increment = 5 - Properties.MaxValue = 1000 - Properties.MinValue = 10 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeHintDelayPropertiesChange - Properties.OnEditValueChanged = cxSeShortHintPausePropertiesEditValueChanged - TabOrder = 2 - Value = 50 - end - end - object cxCcbHintColour: TcxColorComboBox - Left = 72 - Top = 408 - Width = 225 - Height = 21 - Hint = 'Background Color for the hint windows' - Properties.AllowSelectColor = True - Properties.DefaultDescription = 'Color not selected' - Properties.ImmediatePost = True - Properties.OnEditValueChanged = cxCcbHintColourPropertiesEditValueChanged - Properties.Items = <> - Properties.PrepareInfo = '' - TabOrder = 6 - end - object cxGbHintAnimation: TcxGroupBox - Left = 392 - Top = 104 - Width = 177 - Height = 89 - Alignment = alTopLeft - Caption = ' Animation ' - TabOrder = 3 - object Label9: TLabel - Left = 8 - Top = 16 - Width = 72 - Height = 13 - Caption = 'Animation Style' - end - object Label10: TLabel - Left = 8 - Top = 64 - Width = 30 - Height = 13 - Caption = 'Delay ' - end - object cxCbHintAniStyle: TcxComboBox - Left = 8 - Top = 32 - Width = 161 - Height = 21 - Hint = 'The animation style used to display hints' - Properties.DropDownListStyle = lsFixedList - Properties.Items.Strings = ( - 'Slide From Left' - 'Slide From Right' - 'Slide Downward' - 'Slide Upward' - 'Slide From Center' - 'Hide' - 'Activate' - 'Fade In' - 'Auto' - 'None') - Properties.OnChange = cxCbHintAniStylePropertiesChange - TabOrder = 0 - end - object cxSeHintDelay: TcxSpinEdit - Left = 88 - Top = 60 - Width = 81 - Height = 21 - Hint = 'The animation delay' - Properties.MaxValue = 1000 - Properties.MinValue = 50 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeHintDelayPropertiesChange - TabOrder = 1 - Value = 100 - end - end - object cxGbPreview: TcxGroupBox - Left = 200 - Top = 200 - Width = 369 - Height = 201 - Alignment = alTopLeft - Caption = ' Preview ' - TabOrder = 8 - object pnlPreview: TPanel - Left = 2 - Top = 16 - Width = 365 - Height = 183 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - end - end - object cxHsc: TcxHintStyleController - Global = False - HintStyle.CaptionFont.Charset = DEFAULT_CHARSET - HintStyle.CaptionFont.Color = clWindowText - HintStyle.CaptionFont.Height = -13 - HintStyle.CaptionFont.Name = 'MS Sans Serif' - HintStyle.CaptionFont.Style = [fsBold] - HintStyle.Font.Charset = DEFAULT_CHARSET - HintStyle.Font.Color = clWindowText - HintStyle.Font.Height = -11 - HintStyle.Font.Name = 'MS Sans Serif' - HintStyle.Font.Style = [] - HintStyle.RoundRadius = 15 - HintPause = 700 - Left = 216 - Top = 216 - end - object cxEditStyleController1: TcxEditStyleController - Style.LookAndFeel.Kind = lfFlat - Style.LookAndFeel.NativeStyle = True - StyleDisabled.LookAndFeel.Kind = lfFlat - StyleDisabled.LookAndFeel.NativeStyle = True - StyleFocused.LookAndFeel.Kind = lfFlat - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.Kind = lfFlat - StyleHot.LookAndFeel.NativeStyle = True - Left = 216 - Top = 248 - end -end diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxHintEditor.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxHintEditor.pas deleted file mode 100644 index 01a3e3f3..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxHintEditor.pas +++ /dev/null @@ -1,452 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxHintEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, ComCtrls, Controls, Dialogs, ExtCtrls, Forms, Graphics, - Messages, StdCtrls, SysUtils, cxButtons, cxCheckBox, cxCheckListBox, - cxColorComboBox, cxContainer, cxControls, cxDropDownEdit, cxEdit, - cxExtEditConsts, cxFontNameComboBox, cxGroupBox, cxHint, cxLabel, cxListBox, - cxListView, cxLookAndFeelPainters, cxLookandFeels, cxMaskEdit, cxMemo, - cxRadioGroup, cxSpinButton, cxSpinEdit, cxSplitter, cxTextEdit, cxTrackBar; - -type - TcxHintStyleEditor = class(TForm) - cxBtnOk: TcxButton; - cxBtnCancel: TcxButton; - cxCbStandard: TcxCheckBox; - cxGbHintFont: TcxGroupBox; - Label1: TLabel; - Label2: TLabel; - Label3: TLabel; - cxFnHint: TcxFontNameComboBox; - cxClbHintFontStyles: TcxCheckListBox; - cxLbHfSize: TcxListBox; - cxCcbHintFontColour: TcxColorComboBox; - cxgbHintCapFont: TcxGroupBox; - Label4: TLabel; - Label5: TLabel; - Label6: TLabel; - cxFnHinCap: TcxFontNameComboBox; - cxClbHintCapFontStyles: TcxCheckListBox; - cxLbHcfSize: TcxListBox; - cxCcbHintCapColor: TcxColorComboBox; - cxGbHintShape: TcxGroupBox; - Label7: TLabel; - Label8: TLabel; - cxCbHintCalloutPos: TcxComboBox; - cxcbHintRounded: TcxCheckBox; - cxSeHintRadius: TcxSpinEdit; - cxGbHintIcons: TcxGroupBox; - Label11: TLabel; - cxCbHintIconType: TcxComboBox; - cxRbHIDef: TcxRadioButton; - cxRbHILarge: TcxRadioButton; - cxRbHISmall: TcxRadioButton; - cxGbHintPause: TcxGroupBox; - Label18: TLabel; - Label19: TLabel; - Label20: TLabel; - cxSeHintHidePause: TcxSpinEdit; - cxSeHintPause: TcxSpinEdit; - cxSeShortHintPause: TcxSpinEdit; - lblHintColour: TLabel; - cxCcbHintColour: TcxColorComboBox; - cxGbHintAnimation: TcxGroupBox; - Label9: TLabel; - Label10: TLabel; - cxCbHintAniStyle: TcxComboBox; - cxSeHintDelay: TcxSpinEdit; - cxGbPreview: TcxGroupBox; - cxHsc: TcxHintStyleController; - pnlPreview: TPanel; - cxEditStyleController1: TcxEditStyleController; - procedure FormCreate(Sender: TObject); - procedure FormDestroy(Sender: TObject); - procedure cxFnHintClick(Sender: TObject); - procedure cxCbHintCalloutPosClick(Sender: TObject); - procedure cxSeHintRadiusPropertiesChange(Sender: TObject); - procedure cxcbHintRoundedPropertiesChange(Sender: TObject); - procedure cxCbHintAniStylePropertiesChange(Sender: TObject); - procedure cxSeHintDelayPropertiesChange(Sender: TObject); - procedure cxCbHintIconTypeClick(Sender: TObject); - procedure cxRbHIDefClick(Sender: TObject); - procedure cxSeHintHidePausePropertiesChange(Sender: TObject); - procedure cxSeHintPausePropertiesChange(Sender: TObject); - procedure cxSeShortHintPausePropertiesEditValueChanged(Sender: TObject); - procedure cxClbHintFontStylesClickCheck(Sender: TObject; - AIndex: Integer; APrevState, ANewState: TcxCheckBoxState); - procedure cxCcbHintFontColourClick(Sender: TObject); - procedure cxCcbHintCapColorClick(Sender: TObject); - procedure cxFnHintPropertiesChange(Sender: TObject); - procedure cxLbHfSizeClick(Sender: TObject); - procedure cxLbHcfSizeClick(Sender: TObject); - procedure cxFnHinCapPropertiesChange(Sender: TObject); - procedure cxCbStandardClick(Sender: TObject); - procedure cxFnHinCapClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure FormActivate(Sender: TObject); - procedure cxCcbHintColourPropertiesEditValueChanged(Sender: TObject); - private - fViewerFontSizes: TStringList; - fHintHorz: Integer; - fHintVert: Integer; - fFormLoaded: Boolean; - procedure SetHsc(const Value: TcxHintStyleController); - procedure RefreshHint; - procedure WMActivate(var Message: TWMActivate); message WM_ACTIVATE; - procedure WMMove(var Message: TWMMove); message WM_MOVE; - public - procedure SetHintController(aDest: TcxHintStyleController); - procedure LoadHintCtrls; - property HintController: TCxHintStyleController read cxHsc write SetHsc; - end; - -var - cxHintStyleEditor: TcxHintStyleEditor; - -procedure ShowHintStyleEditor(AHintStyleController: TcxHintStyleController); - -implementation - -{$R *.dfm} - -resourcestring - SHintCaption = 'Example'; - SHintText = 'Preview Hint'; - -procedure ShowHintStyleEditor(AHintStyleController: TcxHintStyleController); -var - AHintStyleEditor: TcxHintStyleEditor; - AOwnerCaption: string; - APrevApplicationOnShowHint: TShowHintEvent; -begin - APrevApplicationOnShowHint := Application.OnShowHint; - AHintStyleEditor := TcxHintStyleEditor.Create(Application); - with AHintStyleEditor do - try - HintController := AHintStyleController; - if AHintStyleController.Owner <> nil then - AOwnerCaption := AHintStyleController.Owner.Name + '.' - else - AOwnerCaption := ''; - Caption := Format('%s%s - Hint Editor',[AOwnerCaption, AHintStyleController.Name]); - - if ShowModal = mrOK then - begin - AHintStyleController.Assign(cxHsc); - SetDesignerModified(AHintStyleController); - end; - - HintController.HideHint; - finally - Application.OnShowHint := APrevApplicationOnShowHint; - Free; - end; -end; - -procedure TcxHintStyleEditor.FormCreate(Sender: TObject); -begin - fViewerFontSizes := TStringList.Create; - SetControlLookAndFeel(Self, cxEditStyleController1.Style.LookAndFeel); -end; - -procedure TcxHintStyleEditor.FormDestroy(Sender: TObject); -begin - cxHsc.HideHint; - fViewerFontSizes.Free; -end; - -procedure TcxHintStyleEditor.cxCbStandardClick(Sender: TObject); -begin - cxHsc.HintStyle.Standard := cxCbStandard.Checked; - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxFnHintClick(Sender: TObject); -begin - cxHsc.HintStyle.Font.Name := cxFnHint.FontName; - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxFnHinCapClick(Sender: TObject); -begin - cxHsc.HintStyle.CaptionFont.Name := cxFnHinCap.FontName; - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxCbHintCalloutPosClick(Sender: TObject); -begin - cxHsc.HintStyle.CallOutPosition := TcxCallOutPosition(cxCbHintCalloutPos.ItemIndex); - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxSeHintRadiusPropertiesChange(Sender: TObject); -begin - cxHsc.HintStyle.RoundRadius := cxSeHintRadius.Value; - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxcbHintRoundedPropertiesChange(Sender: TObject); -begin - cxHsc.HintStyle.Rounded := cxcbHintRounded.Checked; - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxCbHintAniStylePropertiesChange(Sender: TObject); -begin - cxHsc.HintStyle.Animate := TcxHintAnimate(cxCbHintAniStyle.ItemIndex); - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxSeHintDelayPropertiesChange(Sender: TObject); -begin - cxHsc.HintStyle.AnimationDelay := Integer(cxSeHintDelay.Value); - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxCbHintIconTypeClick(Sender: TObject); -begin - cxHsc.HintStyle.IconType := TcxHintIconType(cxCbHintIconType.ItemIndex); - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxRbHIDefClick(Sender: TObject); -begin - cxHsc.HintStyle.IconSize := TcxHintIconSize(Integer(TcxRadioButton(Sender).Tag)); - RefreshHint; -end; - -procedure TcxHintStyleEditor.SetHsc(const Value: TCxHintStyleController); -begin - cxHsc.Assign(Value); -end; - -procedure TcxHintStyleEditor.SetHintController(aDest: TCxHintStyleController); -begin - aDest.HintStyle.Assign(cxHsc.HintStyle); - aDest.HintShortPause := cxHsc.HintShortPause; - aDest.HintPause := cxHsc.HintPause; - aDest.HintHidePause := cxHsc.HintHidePause; -end; - -procedure TcxHintStyleEditor.LoadHintCtrls; - - function StyleToEditValue(aFontStyle : TFontStyles) : Integer; - begin - Result := 0; - if fsBold in aFontStyle then - Result := 1; - if fsItalic in aFontStyle then - Inc(Result,2); - if fsUnderline in aFontStyle then - Inc(Result,4); - if fsStrikeOut in aFontStyle then - Inc(Result,8); - end; - -begin - cxCbStandard.Checked := cxHsc.HintStyle.Standard; - cxFnHint.FontName := cxHsc.HintStyle.Font.Name; - while not cxFnHint.Properties.LoadFontComplete do - Application.ProcessMessages; - cxCcbHintFontColour.ColorValue := cxHsc.HintStyle.Font.Color; - cxClbHintFontStyles.EditValue := StyleToEditValue(cxHsc.HintStyle.Font.Style); - cxFnHinCap.FontName := cxHsc.HintStyle.CaptionFont.Name; - while not cxFnHinCap.Properties.LoadFontComplete do - Application.ProcessMessages; - cxCcbHintCapColor.ColorValue := cxHsc.HintStyle.CaptionFont.Color; - cxClbHintCapFontStyles.EditValue := StyleToEditValue(cxHsc.HintStyle.CaptionFont.Style); - cxCcbHintColour.ColorValue := cxHsc.HintStyle.Color; - cxCbHintRounded.Checked := cxHsc.HintStyle.Rounded; - cxCbHintCalloutPos.ItemIndex := Ord(cxHsc.HintStyle.CallOutPosition); - cxSeHintRadius.Value := cxHsc.HintStyle.RoundRadius; - cxCbHintAniStyle.ItemIndex := Ord(cxHsc.HintStyle.Animate); - cxSeHintDelay.Value := Variant(cxHsc.HintStyle.AnimationDelay); - cxCbHintIconType.ItemIndex := Ord(cxHsc.HintStyle.IconType); - cxSeHintHidePause.Value := cxHsc.HintHidePause; - cxSeHintPause.Value := cxHsc.HintPause; - cxSeShortHintPause.Value := cxHsc.HintShortPause; - case Ord(cxHsc.HintStyle.IconSize) of - 0: cxRbHiDef.Checked := True; - 1: cxRbHiLarge.Checked := True; - 2: cxRbHiSmall.Checked := True; - end; - cxLbhfSize.ItemIndex := cxLbhFSize.Items.IndexOf(IntToStr(cxHsc.HintStyle.Font.Size)); - cxLbhcfSize.ItemIndex := cxLbhcFSize.Items.IndexOf(IntToStr(cxHsc.HintStyle.CaptionFont.Size)); -End; - -procedure TcxHintStyleEditor.cxSeHintHidePausePropertiesChange( - Sender: TObject); -begin - cxHsc.HintHidePause := cxSeHintHidePause.Value; - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxSeHintPausePropertiesChange( - Sender: TObject); -begin - cxHsc.HintPause := cxSeHintPause.Value; - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxSeShortHintPausePropertiesEditValueChanged( - Sender: TObject); -begin - cxHsc.HintShortPause := cxSeShortHintPause.Value; - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxCcbHintFontColourClick(Sender: TObject); -begin - cxHsc.HintStyle.Font.Color := cxCcbHintFontColour.ColorValue; - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxCcbHintCapColorClick(Sender: TObject); -begin - cxHsc.HintStyle.CaptionFont.Color := cxCcbHintCapColor.ColorValue; - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxLbHfSizeClick(Sender: TObject); -begin - with cxLbHfSize do - cxHsc.HintStyle.Font.Size := StrToInt(Items[ItemIndex]); - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxLbHcfSizeClick(Sender: TObject); -begin - with cxLbHcfSize do - cxHsc.HintStyle.CaptionFont.Size := StrToInt(Items[ItemIndex]); - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxFnHinCapPropertiesChange( - Sender: TObject); -begin - GetFontSizes(cxFnHinCap.FontName,cxLbHcfSize.Items); -end; - -procedure TcxHintStyleEditor.cxFnHintPropertiesChange(Sender: TObject); -begin - GetFontSizes(cxFnHint.FontName,cxLbHfSize.Items); -end; - -procedure TcxHintStyleEditor.RefreshHint; -begin - if HandleAllocated and IsWindowVisible(Handle) then - begin - cxHsc.HideHint; - cxHsc.ShowHint(fHintHorz, fHintVert, SHintCaption, SHintText); - end; -end; - -procedure TcxHintStyleEditor.WMActivate(var Message: TWMActivate); -begin - if Message.Active = WA_INACTIVE then - cxHsc.HideHint - else - RefreshHint; -end; - -procedure TcxHintStyleEditor.WMMove(var Message: TWMMove); -begin - inherited; - if fFormLoaded then - begin - fHintHorz := pnlPreview.ClientOrigin.X + (pnlPreview.Width div 2 - cxHsc.GetHintWidth(SHintText) div 2); - fHintVert := pnlPreview.ClientOrigin.Y + (pnlPreview.Height div 2 - cxHsc.GetHintHeight(SHintText) div 2); - RefreshHint; - end; -end; - -procedure TcxHintStyleEditor.FormShow(Sender: TObject); -begin - fHintHorz := pnlPreview.ClientOrigin.X + (pnlPreview.Width div 2 - cxHsc.GetHintWidth(SHintText) div 2); - fHintVert := pnlPreview.ClientOrigin.Y + (pnlPreview.Height div 2 - cxHsc.GetHintHeight(SHintText) div 2); - - fFormLoaded := True; - LoadHintCtrls; -end; - -procedure TcxHintStyleEditor.FormActivate(Sender: TObject); -begin - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxClbHintFontStylesClickCheck(Sender: TObject; - AIndex: Integer; APrevState, ANewState: TcxCheckBoxState); - - function ChangeFontStyles(AFontStyles: TFontStyles): TFontStyles; - const - AFontStylesByIndex: array [0..3] of TFontStyle = - (fsBold, fsItalic, fsUnderline, fsStrikeOut); - begin - Result := AFontStyles; - case ANewState of - cbsUnchecked: - Exclude(Result, AFontStylesByIndex[AIndex]); - cbsChecked: - Include(Result, AFontStylesByIndex[AIndex]); - end; - end; - -begin - if TcxCheckListBox(Sender).Tag = 0 then - cxHsc.HintStyle.Font.Style := ChangeFontStyles(cxHsc.HintStyle.Font.Style) - else - cxHsc.HintStyle.CaptionFont.Style := - ChangeFontStyles(cxHsc.HintStyle.CaptionFont.Style); - RefreshHint; -end; - -procedure TcxHintStyleEditor.cxCcbHintColourPropertiesEditValueChanged( - Sender: TObject); -begin - cxHsc.HintStyle.Color := cxCcbHintColour.ColorValue; - RefreshHint; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxHyperLinkEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxHyperLinkEdit.pas deleted file mode 100644 index 83e0274e..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxHyperLinkEdit.pas +++ /dev/null @@ -1,621 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxHyperLinkEdit; - -{$I cxVer.inc} - -interface - -uses - Messages, - Windows, -{$IFDEF DELPHI6} - Types, -{$ENDIF} - SysUtils, Graphics, Classes, Controls, Menus, cxGraphics, cxContainer, - cxControls, cxEdit, cxTextEdit, cxEditConsts, cxFilterControlUtils; - -const - cxHyperLinkEditDefaultLinkColor = clBlue; - -type - { TcxHyperLinkEditViewInfo } - - TcxCustomHyperLinkEdit = class; - - TcxHyperLinkEditViewInfo = class(TcxCustomTextEditViewInfo) - protected - procedure GetColorSettingsByPainter(out ABackground, ATextColor: TColor); override; - function GetHyperLinkTextColor: TColor; virtual; - public - function IsHotTrack: Boolean; override; - function IsHotTrack(P: TPoint): Boolean; override; - procedure PrepareCanvasFont(ACanvas: TCanvas); override; - end; - - { TcxCustomHyperLinkEditProperties } - - TcxHyperLinkEditUsePrefix = (upAlways, upOnlyOnExecute, upNever); - - TcxCustomHyperLinkEditProperties = class(TcxCustomTextEditProperties) - private - FSingleClick: Boolean; - FLinkColor: TColor; - FOnStartClick: TNotifyEvent; - FPrefix: string; - FStartKey: TShortCut; - FUsePrefix: TcxHyperLinkEditUsePrefix; - function GetAutoComplete: Boolean; - function GetPrefixStored: Boolean; - procedure ReadPrefix(Reader: TReader); - procedure SetAutoComplete(Value: Boolean); - procedure SetLinkColor(const Value: TColor); - procedure SetSingleClick(Value: Boolean); - procedure WritePrefix(Writer: TWriter); - protected - procedure DefineProperties(AFiler: TFiler); override; - function AddPrefixTo(AStr: string): string; virtual; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - class function GetStyleClass: TcxCustomEditStyleClass; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - procedure ValidateDisplayValue(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var Error: Boolean; AEdit: TcxCustomEdit); override; - // !!! - property AutoComplete: Boolean read GetAutoComplete write SetAutoComplete - stored False; // deprecated - property AutoSelect default False; - property LinkColor: TColor read FLinkColor write SetLinkColor - default cxHyperLinkEditDefaultLinkColor; - property Prefix: string read FPrefix write FPrefix stored False; - property SingleClick: Boolean read FSingleClick write SetSingleClick - default False; - property StartKey: TShortCut read FStartKey write FStartKey - default VK_RETURN + scCtrl; - property UsePrefix: TcxHyperLinkEditUsePrefix read FUsePrefix - write FUsePrefix default upAlways; - property OnStartClick: TNotifyEvent read FOnStartClick write FOnStartClick; - end; - - { TcxHyperLinkEditProperties } - - TcxHyperLinkEditProperties = class(TcxCustomHyperLinkEditProperties) - published - property Alignment; - property AssignedValues; - property AutoComplete; // deprecated - property AutoSelect; - property ClearKey; - property ImeMode; - property ImeName; - property IncrementalSearch; - property LinkColor; - property LookupItems; - property LookupItemsSorted; - property Prefix; - property ReadOnly; - property StartKey; - property SingleClick; - property UseLeftAlignmentOnEditing; - property UsePrefix; - property ValidateOnEnter; - property OnChange; - property OnEditValueChanged; - property OnStartClick; - property OnValidate; - end; - - { TcxHyperLinkStyle } - - TcxHyperLinkStyle = class(TcxEditStyle) - protected - function GetTextColor: TColor; override; - function GetTextStyle: TFontStyles; override; - end; - - { TcxCustomHyperLinkEdit } - - TcxCustomHyperLinkEdit = class(TcxCustomTextEdit) - private - FSaveCursor: TCursor; - function GetActiveProperties: TcxCustomHyperLinkEditProperties; - function GetProperties: TcxCustomHyperLinkEditProperties; - function GetStyle: TcxHyperLinkStyle; - procedure InternalSetCursor(ACursor: TCursor); - procedure SetProperties(const Value: TcxCustomHyperLinkEditProperties); - procedure SetStyle(Value: TcxHyperLinkStyle); - protected - function DoOnStartClick: Boolean; - procedure DoStart; virtual; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseEnter(AControl: TControl); override; - procedure MouseLeave(AControl: TControl); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure PropertiesChanged(Sender: TObject); override; - public - procedure ActivateByMouse(Shift: TShiftState; X, Y: Integer; - var AEditData: TcxCustomEditData); override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure SelectAll; override; - property ActiveProperties: TcxCustomHyperLinkEditProperties read GetActiveProperties; - property Properties: TcxCustomHyperLinkEditProperties read GetProperties - write SetProperties; - property Style: TcxHyperLinkStyle read GetStyle write SetStyle; - end; - - { TcxHyperLinkEdit } - - TcxHyperLinkEdit = class(TcxCustomHyperLinkEdit) - private - function GetActiveProperties: TcxHyperLinkEditProperties; - function GetProperties: TcxHyperLinkEditProperties; - procedure SetProperties(Value: TcxHyperLinkEditProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxHyperLinkEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxHyperLinkEditProperties read GetProperties write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Text; - {$IFDEF DELPHI12} - property TextHint; - {$ENDIF} - property Visible; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnEditing; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property BiDiMode; - property ParentBiDiMode; - property OnEndDock; - property OnStartDock; - end; - - { TcxFilterHyperLinkEditHelper } - - TcxFilterHyperLinkEditHelper = class(TcxFilterTextEditHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - end; - -implementation - -uses - ShellAPI, -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Forms, cxVariants, cxClasses, cxLibraryConsts, cxLookAndFeelPainters; - -{ TcxHyperLinkEditViewInfo } - -procedure TcxHyperLinkEditViewInfo.GetColorSettingsByPainter( - out ABackground, ATextColor: TColor); -begin - inherited GetColorSettingsByPainter(ABackground, ATextColor); - ATextColor := GetHyperLinkTextColor; -end; - -function TcxHyperLinkEditViewInfo.GetHyperLinkTextColor: TColor; -begin - Result := TcxCustomHyperLinkEditProperties(EditProperties).LinkColor; - if (Painter <> nil) and (Result = cxHyperLinkEditDefaultLinkColor) then - Result := Painter.DefaultHyperlinkTextColor -end; - -function TcxHyperLinkEditViewInfo.IsHotTrack: Boolean; -begin - Result := inherited IsHotTrack or - TcxCustomHyperLinkEditProperties(EditProperties).SingleClick; -end; - -function TcxHyperLinkEditViewInfo.IsHotTrack(P: TPoint): Boolean; -begin - Result := IsHotTrack; -end; - -procedure TcxHyperLinkEditViewInfo.PrepareCanvasFont(ACanvas: TCanvas); -begin - inherited PrepareCanvasFont(ACanvas); - if Edit = nil then - begin - ACanvas.Font.Style := ACanvas.Font.Style + [fsUnderline]; - if IsSelected then - ACanvas.Font.Color := TextColor - else - ACanvas.Font.Color := GetHyperLinkTextColor; - end; -end; - -{ TcxCustomHyperLinkEditProperties } - -constructor TcxCustomHyperLinkEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - AutoSelect := False; - FLinkColor := clBlue; - FPrefix := cxGetResourceString(@scxSHyperLinkPrefix); - FSingleClick := False; - FStartKey := VK_RETURN + scCtrl; - FUsePrefix := upAlways; -end; - -function TcxCustomHyperLinkEditProperties.GetAutoComplete: Boolean; -begin - Result := not (UsePrefix = upNever); -end; - -function TcxCustomHyperLinkEditProperties.GetPrefixStored: Boolean; -begin - Result := FPrefix <> cxGetResourceString(@scxSHyperLinkPrefix); -end; - -procedure TcxCustomHyperLinkEditProperties.ReadPrefix(Reader: TReader); -begin - Prefix := Reader.ReadString; -end; - -procedure TcxCustomHyperLinkEditProperties.SetAutoComplete(Value: Boolean); -begin - if Value then - UsePrefix := upAlways - else - UsePrefix := upNever; -end; - -procedure TcxCustomHyperLinkEditProperties.SetLinkColor( - const Value: TColor); -begin - if FLinkColor <> Value then - begin - FLinkColor := Value; - Changed; - end; -end; - -procedure TcxCustomHyperLinkEditProperties.SetSingleClick(Value: Boolean); -begin - if Value <> FSingleClick then - begin - FSingleClick := Value; - Changed; - end; -end; - -procedure TcxCustomHyperLinkEditProperties.WritePrefix(Writer: TWriter); -begin - Writer.WriteString(Prefix); -end; - -procedure TcxCustomHyperLinkEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomHyperLinkEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with TcxCustomHyperLinkEditProperties(Source) do - begin - Self.LinkColor := LinkColor; - Self.Prefix := Prefix; - Self.SingleClick := SingleClick; - Self.StartKey := StartKey; - Self.UsePrefix := UsePrefix; - Self.OnStartClick := OnStartClick; - end; - finally - EndUpdate - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomHyperLinkEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxHyperLinkEdit; -end; - -class function TcxCustomHyperLinkEditProperties.GetStyleClass: TcxCustomEditStyleClass; -begin - Result := TcxHyperLinkStyle; -end; - -function TcxCustomHyperLinkEditProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := inherited GetSupportedOperations; - if SingleClick then - Include(Result, esoAlwaysHotTrack); -end; - -class function TcxCustomHyperLinkEditProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxHyperLinkEditViewInfo; -end; - -procedure TcxCustomHyperLinkEditProperties.ValidateDisplayValue( - var ADisplayValue: TcxEditValue; var AErrorText: TCaption; var Error: Boolean; - AEdit: TcxCustomEdit); -begin - if UsePrefix = upAlways then - ADisplayValue := AddPrefixTo(VarToStr(ADisplayValue)); - inherited ValidateDisplayValue(ADisplayValue, AErrorText, Error, AEdit); -end; - -procedure TcxCustomHyperLinkEditProperties.DefineProperties(AFiler: TFiler); -begin - inherited DefineProperties(AFiler); - AFiler.DefineProperty('Prefix', ReadPrefix, WritePrefix, GetPrefixStored); -end; - -function TcxCustomHyperLinkEditProperties.AddPrefixTo(AStr: string): string; -begin - Result := Trim(AStr); - if (Prefix <> '') and (Result <> '') and (Pos(Prefix, Result) <> 1) then - Result := Trim(Prefix + Result); -end; - -{ TcxHyperLinkStyle } - -function TcxHyperLinkStyle.GetTextColor: TColor; -begin - if DirectAccessMode then - Result := inherited GetTextColor - else - begin - if (Container = nil) or (TcxCustomHyperLinkEdit(Container).ActiveProperties = nil) then - Result := cxHyperLinkEditDefaultLinkColor - else - Result := TcxCustomHyperLinkEdit(Container).ActiveProperties.LinkColor; - end; -end; - -function TcxHyperLinkStyle.GetTextStyle: TFontStyles; -begin - Result := inherited GetTextStyle + [fsUnderline]; -end; - -{ TcxCustomHyperLinkEdit } - -function TcxCustomHyperLinkEdit.DoOnStartClick: Boolean; -begin - Result := Assigned(Properties.OnStartClick) or - Assigned(ActiveProperties.OnStartClick); - with Properties do - if Assigned(OnStartClick) then - OnStartClick(Self); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnStartClick) then - OnStartClick(Self); -end; - -procedure TcxCustomHyperLinkEdit.DoStart; -var - AText: string; -begin - if not DoOnStartClick then - begin - AText := Trim(DisplayValue); - if ActiveProperties.UsePrefix <> upNever then - AText := ActiveProperties.AddPrefixTo(AText); - if AText <> '' then - ShellExecute(0, 'OPEN', PChar(AText), - nil, nil, SW_SHOWMAXIMIZED); - end; -end; - -function TcxCustomHyperLinkEdit.GetActiveProperties: TcxCustomHyperLinkEditProperties; -begin - Result := TcxCustomHyperLinkEditProperties(InternalGetActiveProperties); -end; - -function TcxCustomHyperLinkEdit.GetProperties: TcxCustomHyperLinkEditProperties; -begin - Result := TcxCustomHyperLinkEditProperties(FProperties); -end; - -function TcxCustomHyperLinkEdit.GetStyle: TcxHyperLinkStyle; -begin - Result := TcxHyperLinkStyle(FStyles.Style); -end; - -procedure TcxCustomHyperLinkEdit.InternalSetCursor(ACursor: TCursor); -begin - InnerTextEdit.Control.Cursor := ACursor; - Cursor := ACursor; - SetCursor(Screen.Cursors[ACursor]); -end; - -procedure TcxCustomHyperLinkEdit.SetProperties( - const Value: TcxCustomHyperLinkEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomHyperLinkEdit.SetStyle(Value: TcxHyperLinkStyle); -begin - FStyles.Style := Value; -end; - -procedure TcxCustomHyperLinkEdit.KeyDown(var Key: Word; - Shift: TShiftState); -begin - if (ShortCut(Key, Shift) <> 0) and (ActiveProperties.StartKey = ShortCut(Key, Shift)) then - begin - DoStart; - Key := 0; - end - else - inherited KeyDown(Key, Shift); -end; - -procedure TcxCustomHyperLinkEdit.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if (Button = mbLeft) and PtInRect(ViewInfo.ClientRect, Point(X, Y)) and - (not ActiveProperties.SingleClick and (ssDouble in Shift)) then - DoStart; -end; - -procedure TcxCustomHyperLinkEdit.MouseEnter(AControl: TControl); -begin - inherited MouseEnter(AControl); - if ActiveProperties.SingleClick and (Cursor = crDefault) then - begin - FSaveCursor := Cursor; - InternalSetCursor(crcxHandPoint); - end; -end; - -procedure TcxCustomHyperLinkEdit.MouseLeave(AControl: TControl); -begin - inherited MouseLeave(AControl); - if ActiveProperties.SingleClick then - InternalSetCursor(FSaveCursor); -end; - -procedure TcxCustomHyperLinkEdit.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - if (Button = mbLeft) and PtInRect(ViewInfo.ClientRect, Point(X, Y)) and - ActiveProperties.SingleClick and (SelLength = 0) then - DoStart; -end; - -procedure TcxCustomHyperLinkEdit.PropertiesChanged(Sender: TObject); -begin - inherited PropertiesChanged(Sender); - ContainerStyleChanged(Style); -end; - -class function TcxCustomHyperLinkEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomHyperLinkEditProperties; -end; - -procedure TcxCustomHyperLinkEdit.ActivateByMouse(Shift: TShiftState; X, Y: Integer; - var AEditData: TcxCustomEditData); -begin - if IsInplace and ActiveProperties.SingleClick and (Cursor = crDefault) then - begin - FSaveCursor := Cursor; - InternalSetCursor(crcxHandPoint); - end; - inherited; -end; - -procedure TcxCustomHyperLinkEdit.SelectAll; -begin - if not (IsInplace and ActiveProperties.SingleClick) then - inherited SelectAll; -end; - -{ TcxHyperLinkEdit } - -class function TcxHyperLinkEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxHyperLinkEditProperties; -end; - -function TcxHyperLinkEdit.GetActiveProperties: TcxHyperLinkEditProperties; -begin - Result := TcxHyperLinkEditProperties(InternalGetActiveProperties); -end; - -function TcxHyperLinkEdit.GetProperties: TcxHyperLinkEditProperties; -begin - Result := TcxHyperLinkEditProperties(FProperties); -end; - -procedure TcxHyperLinkEdit.SetProperties(Value: TcxHyperLinkEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterHyperLinkEditHelper } - -class function TcxFilterHyperLinkEditHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxHyperLinkEdit; -end; - -initialization - GetRegisteredEditProperties.Register(TcxHyperLinkEditProperties, scxSEditRepositoryHyperLinkItem); - FilterEditsController.Register(TcxHyperLinkEditProperties, TcxFilterHyperLinkEditHelper); - -finalization - FilterEditsController.Unregister(TcxHyperLinkEditProperties, TcxFilterHyperLinkEditHelper); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxImage.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxImage.pas deleted file mode 100644 index 656eb2e7..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxImage.pas +++ /dev/null @@ -1,1770 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxImage; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, Variants, -{$ENDIF} - Windows, Messages, ExtDlgs, SysUtils, Classes, Clipbrd, Controls, Dialogs, - ExtCtrls, Forms, Graphics, Menus, StdCtrls, cxClasses, cxContainer, - cxControls, cxDataUtils, cxEdit, cxEditConsts, cxGraphics, cxLookAndFeels, dxCore; - -const - cxImageDefaultInplaceHeight = 15; - -type - TcxCustomImage = class; - TcxPopupMenuItem = (pmiCut, pmiCopy, pmiPaste, pmiDelete, pmiLoad, pmiSave, - pmiCustom); - TcxPopupMenuItemClick = procedure(Sender: TObject; - MenuItem: TcxPopupMenuItem) of object; - TcxPopupMenuItems = set of TcxPopupMenuItem; - - { TcxPopupMenuLayout } - - TcxPopupMenuLayout = class(TPersistent) - private - FCustomMenuItemCaption: string; - FCustomMenuItemGlyph: TBitmap; - FImage: TcxCustomImage; - FMenuItems: TcxPopupMenuItems; - function GetCustomMenuItemGlyph: TBitmap; virtual; - procedure SetCustomMenuItemGlyph(Value: TBitmap); - public - constructor Create(AImage: TcxCustomImage); - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - published - property MenuItems: TcxPopupMenuItems read FMenuItems write FMenuItems default - [pmiCut, pmiCopy, pmiPaste, pmiDelete, pmiLoad, pmiSave]; - property CustomMenuItemCaption: string - read FCustomMenuItemCaption write FCustomMenuItemCaption; - property CustomMenuItemGlyph: TBitmap - read GetCustomMenuItemGlyph write SetCustomMenuItemGlyph; - end; - - { TcxImageViewInfo } - - TcxImageViewInfo = class(TcxCustomEditViewInfo) - private - FFreePicture: Boolean; - FTempBitmap: TBitmap; - procedure DrawTransparentBackground(ACanvas: TcxCanvas; const R: TRect); - protected - procedure InternalPaint(ACanvas: TcxCanvas); override; - function IsRepaintOnStateChangingNeeded: Boolean; override; - public - ShowFocusRect: Boolean; - TopLeft: TPoint; - Caption: string; - Center: Boolean; - Picture: TPicture; - Proportional: Boolean; - Stretch: Boolean; - destructor Destroy; override; - end; - - { TcxImageViewData } - - TcxImageViewData = class(TcxCustomEditViewData) - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - function GetEditContentSize(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; override; - end; - - { TcxCustomImageProperties } - - TcxImageAssignPictureEvent = procedure(Sender: TObject; - const Picture: TPicture) of object; - TcxImageGraphicClassEvent = procedure(AItem: TObject; ARecordIndex: Integer; - APastingFromClipboard: Boolean; var AGraphicClass: TGraphicClass) of object; - TcxImageEditGraphicClassEvent = procedure(Sender: TObject; - APastingFromClipboard: Boolean; var AGraphicClass: TGraphicClass) of object; - - TcxImageTransparency = (gtDefault, gtOpaque, gtTransparent); - - TcxCustomImageProperties = class(TcxCustomEditProperties) - private - FCaption: string; - FCenter: Boolean; - FCustomFilter: string; - FDefaultHeight: Integer; - FGraphicClass: TGraphicClass; - FGraphicTransparency: TcxImageTransparency; - FPopupMenuLayout: TcxPopupMenuLayout; - FProportional: Boolean; - FShowFocusRect: Boolean; - FStretch: Boolean; - FOnAssignPicture: TcxImageAssignPictureEvent; - FOnCustomClick: TNotifyEvent; - FOnGetGraphicClass: TcxImageGraphicClassEvent; - function GetGraphicClassName: string; - function IsGraphicClassNameStored: Boolean; - procedure ReadIsGraphicClassNameEmpty(Reader: TReader); - procedure SetCaption(const Value: string); - procedure SetCenter(Value: Boolean); - procedure SetGraphicClass(const Value: TGraphicClass); - procedure SetGraphicClassName(const Value: string); - procedure SetGraphicTransparency(Value: TcxImageTransparency); - procedure SetPopupMenuLayout(Value: TcxPopupMenuLayout); - procedure SetProportional(AValue: Boolean); - procedure SetShowFocusRect(Value: Boolean); - procedure SetStretch(Value: Boolean); - procedure WriteIsGraphicClassNameEmpty(Writer: TWriter); - protected - function CanValidate: Boolean; override; - procedure DefineProperties(Filer: TFiler); override; - function IsDesigning: Boolean; - function GetDefaultGraphicClass: TGraphicClass; virtual; - function GetRealStretch(const APictureSize, ABoundsSize: TSize): Boolean; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - property DefaultHeight: Integer read FDefaultHeight write FDefaultHeight - default cxImageDefaultInplaceHeight; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function GetGraphicClass(AItem: TObject; - ARecordIndex: Integer; - APastingFromClipboard: Boolean = False): TGraphicClass; virtual; - function GetSpecialFeatures: TcxEditSpecialFeatures; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsResetEditClass: Boolean; override; - procedure ValidateDisplayValue(var DisplayValue: TcxEditValue; var ErrorText: TCaption; - var Error: Boolean; AEdit: TcxCustomEdit); override; - property GraphicClass: TGraphicClass read FGraphicClass write SetGraphicClass; - // !!! - property Caption: string read FCaption write SetCaption; - property Center: Boolean read FCenter write SetCenter default True; - property CustomFilter: string read FCustomFilter write FCustomFilter; - property GraphicClassName: string read GetGraphicClassName - write SetGraphicClassName stored IsGraphicClassNameStored; - property GraphicTransparency: TcxImageTransparency - read FGraphicTransparency write SetGraphicTransparency default gtDefault; - property PopupMenuLayout: TcxPopupMenuLayout - read FPopupMenuLayout write SetPopupMenuLayout; - property Proportional: Boolean read FProportional write SetProportional default True; - property ShowFocusRect: Boolean read FShowFocusRect write SetShowFocusRect default True; - property Stretch: Boolean read FStretch write SetStretch default False; - property OnAssignPicture: TcxImageAssignPictureEvent - read FOnAssignPicture write FOnAssignPicture; - property OnCustomClick: TNotifyEvent read FOnCustomClick - write FOnCustomClick; - property OnGetGraphicClass: TcxImageGraphicClassEvent read FOnGetGraphicClass - write FOnGetGraphicClass; - end; - - { TcxImageProperties } - - TcxImageProperties = class(TcxCustomImageProperties) - published - property AssignedValues; - property Caption; - property Center; - property ClearKey; - property CustomFilter; - property GraphicClassName; - property GraphicTransparency; - property ImmediatePost; - property PopupMenuLayout; - property Proportional; - property ReadOnly; - property ShowFocusRect; - property Stretch; - property OnAssignPicture; - property OnChange; - property OnCustomClick; - property OnEditValueChanged; - property OnGetGraphicClass; - end; - - { TcxCustomImage } - - TcxCustomImage = class(TcxCustomEdit) - private - FClipboardFormat: Word; - FEditPopupMenu: TPopupMenu; - FInternalChanging: Boolean; - FIsDialogShowed: Boolean; - FPicture: TPicture; - FTransparent: Boolean; - FOnGetGraphicClass: TcxImageEditGraphicClassEvent; - procedure EditAndClear; - procedure EditPopupMenuClick(Sender: TObject); - {$IFDEF CBUILDER10} - function GetPicture: TPicture; - {$ENDIF} - function GetProperties: TcxCustomImageProperties; - function GetActiveProperties: TcxCustomImageProperties; - procedure MenuItemClick(Sender: TObject; MenuItem: TcxPopupMenuItem); - procedure PictureChanged(Sender: TObject); - procedure PreparePopup; - procedure ResetImage; - procedure SetPicture(Value: TPicture); - procedure SetProperties(const Value: TcxCustomImageProperties); - procedure SetTransparent(AValue: Boolean); - procedure SynchronizeImage; - protected - function CanAutoSize: Boolean; override; - function CanAutoWidth: Boolean; override; - procedure DoContextPopup( MousePos: TPoint; - var Handled: Boolean); override; - procedure Initialize; override; - procedure InitScrollBarsParameters; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - function NeedsInvokeAfterKeyDown(AKey: Word; AShift: TShiftState): Boolean; override; - function NeedsScrollBars: Boolean; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - function GetEditValue: TcxEditValue; override; - procedure InternalSetEditValue(const Value: TcxEditValue; - AIsValueValid: Boolean); override; - procedure PropertiesChanged(Sender: TObject); override; - procedure UpdateScrollBars; override; - - // virtual methods - function CanPasteFromClipboard: Boolean; virtual; - procedure CustomClick; virtual; - procedure DoOnAssignPicture; - function GetGraphicClass(APastingFromClipboard: Boolean = False): TGraphicClass; virtual; - property AutoSize default False; - property ParentColor default False; - property OnGetGraphicClass: TcxImageEditGraphicClassEvent - read FOnGetGraphicClass write FOnGetGraphicClass; - public - destructor Destroy; override; - procedure CopyToClipboard; override; - procedure CutToClipboard; override; - function Focused: Boolean; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure LoadFromFile; - procedure PasteFromClipboard; override; - procedure SaveToFile; - property ActiveProperties: TcxCustomImageProperties read GetActiveProperties; - property ClipboardFormat: Word - read FClipboardFormat write FClipboardFormat; - property Picture: TPicture read {$IFDEF CBUILDER10}GetPicture{$ELSE}FPicture{$ENDIF} - write SetPicture; - property Properties: TcxCustomImageProperties read GetProperties - write SetProperties; - property Transparent: Boolean read FTransparent write SetTransparent default False; - end; - - { TcxImage } - - TcxImage = class(TcxCustomImage) - private - function GetActiveProperties: TcxImageProperties; - function GetProperties: TcxImageProperties; - procedure SetProperties(Value: TcxImageProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxImageProperties read GetActiveProperties; - published - property Align; - property Anchors; - property AutoSize; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ParentColor; - property ParentShowHint; - property Picture; - property PopupMenu; - property Properties: TcxImageProperties read GetProperties - write SetProperties; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnGetGraphicClass; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -function IsPictureEmpty(APicture: TPicture): Boolean; -procedure LoadPicture(APicture: TPicture; AGraphicClass: TGraphicClass; - const AValue: Variant); -procedure SavePicture(APicture: TPicture; var AValue: AnsiString); - -function GetGraphicClassByName(const AClassName: string): TGraphicClass; -function GetRegisteredGraphicClasses: TList; -procedure RegisterGraphicClass(AGraphicClass: TGraphicClass); -procedure UnRegisterGraphicClass(AGraphicClass: TGraphicClass); - -implementation - -uses -{$IFNDEF DELPHI6} - cxVariants, -{$ENDIF} -{$IFDEF USEJPEGIMAGE} - Jpeg, -{$ENDIF} - dxGDIPlusApi, dxGDIPlusClasses, cxGeometry, - Math, ImgList, cxEditUtils; - -type - {$IFNDEF DELPHI6} - TDummyGraphic = class(TGraphic); - TDummyGraphicClass = class of TDummyGraphic; - {$ENDIF} - TMemoryStreamAccess = class(TMemoryStream); - {$IFDEF USEJPEGIMAGE} - TJPEGImageAccess = class(TJPEGImage); - {$ENDIF} - -var - cxGraphicPopupMenuImages: TImageList; - cxRegisteredGraphicClasses: TList; - -function GetGraphicClassByName(const AClassName: string): TGraphicClass; -var - I: Integer; -begin - Result := nil; - for i := 0 to GetRegisteredGraphicClasses.Count - 1 do - if InternalCompareString(AClassName, TClass(GetRegisteredGraphicClasses[I]).ClassName, False) then - begin - Result := TGraphicClass(GetRegisteredGraphicClasses[I]); - Break; - end; -end; - -function GetRegisteredGraphicClasses: TList; -begin - if cxRegisteredGraphicClasses = nil then - begin - cxRegisteredGraphicClasses := TList.Create; - RegisterGraphicClass(TBitmap); - RegisterGraphicClass(TIcon); - RegisterGraphicClass(TMetaFile); - if GetClass(TdxPNGImage.ClassName) <> nil then - RegisterGraphicClass(TdxPNGImage); - {$IFDEF USEJPEGIMAGE} - RegisterGraphicClass(TJpegImage); - {$ENDIF} - end; - Result := cxRegisteredGraphicClasses -end; - -procedure RegisterGraphicClass(AGraphicClass: TGraphicClass); -begin - if cxRegisteredGraphicClasses.IndexOf(TObject(AGraphicClass)) = -1 then - cxRegisteredGraphicClasses.Add(TObject(AGraphicClass)); -end; - -procedure UnRegisterGraphicClass(AGraphicClass: TGraphicClass); -var - I: Integer; -begin - I := cxRegisteredGraphicClasses.IndexOf(TObject(AGraphicClass)); - if I <> -1 then - cxRegisteredGraphicClasses.Delete(I); -end; - -procedure CalcStretchRect(R: TRect; W, H: Integer; out CalcRect: TRect); -var - W1, H1: Integer; -begin - if IsRectEmpty(R) then - begin - CalcRect := R; - Exit; - end; - CalcRect.TopLeft := R.TopLeft; - W1 := R.Right - R.Left; - H1 := R.Bottom - R.Top; - if W / H > W1 / H1 then - begin - CalcRect.Right := R.Right; - CalcRect.Bottom := CalcRect.Top + (W1 * H div W); - end - else - begin - CalcRect.Bottom := R.Bottom; - CalcRect.Right := CalcRect.Left + (H1 * W div H); - end; -end; - -function IsPictureEmpty(APicture: TPicture): Boolean; -begin - Result := not Assigned(APicture.Graphic) or APicture.Graphic.Empty; -end; - -function cxVarIsBlob(const V: Variant): Boolean; -begin - Result := VarIsStr(V) or VarIsArray(V); // Field.Value -> stored as string and as array of byte -end; - -procedure LoadPicture(APicture: TPicture; AGraphicClass: TGraphicClass; - const AValue: Variant); -{ Paradox graphic BLOB header - see DB.pas} -type - TGraphicHeader = record - Count: Word; { Fixed at 1 } - HType: Word; { Fixed at $0100 } - Size: Longint; { Size not including header } - end; -var - AGraphic: TGraphic; - AHeader: TGraphicHeader; - ASize: Longint; - AStream: TMemoryStream; - AValueAsString: AnsiString; -begin - if cxVarIsBlob(AValue) then - begin - AStream := TMemoryStream.Create; - try - AValueAsString := dxVariantToAnsiString(AValue); - ASize := Length(AValueAsString); - if ASize >= SizeOf(AHeader) then - begin - TMemoryStreamAccess(AStream).SetPointer(@AValueAsString[1], ASize); - AStream.Position := 0; - AStream.Read(AHeader, SizeOf(AHeader)); - if (AHeader.Count <> 1) or (AHeader.HType <> $0100) or - (AHeader.Size <> ASize - SizeOf(AHeader)) then - AStream.Position := 0; - end; - if AStream.Size > 0 then - try - if AGraphicClass = nil then - APicture.Bitmap.LoadFromStream(AStream) - else - begin - AGraphic := {$IFNDEF DELPHI6}TDummyGraphicClass{$ENDIF}(AGraphicClass).Create; - try - AGraphic.LoadFromStream(AStream); - APicture.Graphic := AGraphic; - finally - AGraphic.Free; - end; - end; - except - APicture.Assign(nil); - end - else - APicture.Assign(nil); - finally - AStream.Free; - end; - end - else - APicture.Assign(nil); -end; - -procedure SavePicture(APicture: TPicture; var AValue: AnsiString); -var - AStream: TMemoryStream; -begin - if not Assigned(APicture) or IsPictureEmpty(APicture) then - AValue := '' - else - begin - AStream := TMemoryStream.Create; - try - APicture.Graphic.SaveToStream(AStream); - AStream.Position := 0; - SetLength(AValue, AStream.Size); - AStream.ReadBuffer(AValue[1], AStream.Size); - finally - AStream.Free; - end; - end; -end; - -{ TcxPopupMenuLayout } - -constructor TcxPopupMenuLayout.Create(AImage: TcxCustomImage); -begin - inherited Create; - FImage := AImage; - FMenuItems := [pmiCut, pmiCopy, pmiPaste, pmiDelete, pmiLoad, pmiSave]; -end; - -destructor TcxPopupMenuLayout.Destroy; -begin - if FCustomMenuItemGlyph <> nil then FCustomMenuItemGlyph.Free; - inherited Destroy; -end; - -function TcxPopupMenuLayout.GetCustomMenuItemGlyph: TBitmap; -begin - if FCustomMenuItemGlyph = nil then - FCustomMenuItemGlyph := TBitmap.Create; - Result := FCustomMenuItemGlyph; -end; - -procedure TcxPopupMenuLayout.SetCustomMenuItemGlyph(Value: TBitmap); -begin - if (Value = nil) then - begin - FCustomMenuItemGlyph.Free; - FCustomMenuItemGlyph := nil; - end - else - CustomMenuItemGlyph.Assign(Value); -end; - -procedure TcxPopupMenuLayout.Assign(Source: TPersistent); -begin - if Source is TcxPopupMenuLayout then - with TcxPopupMenuLayout(Source) do - begin - Self.MenuItems := MenuItems; - Self.CustomMenuItemCaption := CustomMenuItemCaption; - Self.CustomMenuItemGlyph.Assign(CustomMenuItemGlyph); - end - else - inherited Assign(Source); -end; - -{ TcxCustomImageProperties } - -constructor TcxCustomImageProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FPopupMenuLayout := TcxPopupMenuLayout.Create(nil); - FCenter := True; - FDefaultHeight := cxImageDefaultInplaceHeight; - FGraphicTransparency := gtDefault; - FProportional := True; - FShowFocusRect := True; - FStretch := False; - FGraphicClass := GetDefaultGraphicClass; -end; - -destructor TcxCustomImageProperties.Destroy; -begin - FPopupMenuLayout.Free; - inherited Destroy; -end; - -function TcxCustomImageProperties.GetGraphicClassName: string; -begin - if FGraphicClass = nil then - Result := '' - else - Result := FGraphicClass.ClassName; -end; - -function TcxCustomImageProperties.IsGraphicClassNameStored: Boolean; -begin - Result := GraphicClass <> GetDefaultGraphicClass; -end; - -procedure TcxCustomImageProperties.ReadIsGraphicClassNameEmpty(Reader: TReader); -begin - Reader.ReadBoolean; - GraphicClassName := ''; -end; - -procedure TcxCustomImageProperties.SetCaption(const Value: string); -begin - if FCaption <> Value then - begin - FCaption := Value; - Changed; - end; -end; - -procedure TcxCustomImageProperties.SetCenter(Value: Boolean); -begin - if FCenter <> Value then - begin - FCenter := Value; - Changed; - end; -end; - -procedure TcxCustomImageProperties.SetGraphicClass( - const Value: TGraphicClass); -begin - if FGraphicClass <> Value then - begin - FGraphicClass := Value; - Changed; - end; -end; - -procedure TcxCustomImageProperties.SetGraphicClassName( - const Value: string); -var - AGraphicClass: TGraphicClass; -begin - if Value = '' then - GraphicClass := nil - else - begin - AGraphicClass := GetGraphicClassByName(Value); - if AGraphicClass <> nil then - GraphicClass := AGraphicClass; - end; -end; - -procedure TcxCustomImageProperties.SetGraphicTransparency( - Value: TcxImageTransparency); -begin - if FGraphicTransparency <> Value then - begin - FGraphicTransparency := Value; - Changed; - end; -end; - -procedure TcxCustomImageProperties.SetPopupMenuLayout( - Value: TcxPopupMenuLayout); -begin - FPopupMenuLayout.Assign(Value); -end; - -procedure TcxCustomImageProperties.SetProportional(AValue: Boolean); -begin - if AValue <> FProportional then - begin - FProportional := AValue; - Changed; - end; -end; - -procedure TcxCustomImageProperties.SetShowFocusRect(Value: Boolean); -begin - if FShowFocusRect <> Value then - begin - FShowFocusRect := Value; - Changed; - end; -end; - -procedure TcxCustomImageProperties.SetStretch(Value: Boolean); -begin - if FStretch <> Value then - begin - FStretch := Value; - Changed; - end; -end; - -procedure TcxCustomImageProperties.WriteIsGraphicClassNameEmpty(Writer: TWriter); -begin - Writer.WriteBoolean(True); -end; - -function TcxCustomImageProperties.CanValidate: Boolean; -begin - Result := True; -end; - -procedure TcxCustomImageProperties.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('IsGraphicClassNameEmpty', ReadIsGraphicClassNameEmpty, - WriteIsGraphicClassNameEmpty, GraphicClassName = ''); -end; - -function TcxCustomImageProperties.IsDesigning: Boolean; -var - AOwner: TPersistent; -begin - AOwner := GetOwner; - Result := (AOwner is TComponent) and - (csDesigning in (AOwner as TComponent).ComponentState); -end; - -function TcxCustomImageProperties.GetDefaultGraphicClass: TGraphicClass; -begin - if GetRegisteredGraphicClasses.Count > 0 then - Result := TGraphicClass(GetRegisteredGraphicClasses[0]) - else - Result := nil; -end; - -function TcxCustomImageProperties.GetRealStretch(const APictureSize, ABoundsSize: TSize): Boolean; -begin - Result := Stretch or (Proportional and - ((APictureSize.cy > ABoundsSize.cy) or (APictureSize.cx > ABoundsSize.cx))); -end; - -class function TcxCustomImageProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxImageViewData; -end; - -procedure TcxCustomImageProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomImageProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with TcxCustomImageProperties(Source) do - begin - Self.Caption := Caption; - Self.Center := Center; - Self.CustomFilter := CustomFilter; - Self.GraphicClass := GraphicClass; - Self.GraphicTransparency := GraphicTransparency; - Self.PopupMenuLayout := PopupMenuLayout; - Self.ShowFocusRect := ShowFocusRect; - Self.Proportional := Proportional; - Self.Stretch := Stretch; - Self.OnAssignPicture := OnAssignPicture; - Self.OnCustomClick := OnCustomClick; - Self.OnGetGraphicClass := OnGetGraphicClass; - end; - finally - EndUpdate - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomImageProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxImage; -end; - -function TcxCustomImageProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -begin - if VarIsNull(AEditValue) then Result := '' else Result := Caption; -end; - -function TcxCustomImageProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - Result := evsValue; -end; - -function TcxCustomImageProperties.GetGraphicClass(AItem: TObject; - ARecordIndex: Integer; APastingFromClipboard: Boolean = False): TGraphicClass; -begin - Result := FGraphicClass; - if Result = nil then - begin - if APastingFromClipboard then - Result := TBitmap; - if Assigned(FOnGetGraphicClass) then - FOnGetGraphicClass(AItem, ARecordIndex, APastingFromClipboard, Result); - end; -end; - -function TcxCustomImageProperties.GetSpecialFeatures: TcxEditSpecialFeatures; -begin - Result := inherited GetSpecialFeatures + [esfBlobEditValue]; -end; - -function TcxCustomImageProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := inherited GetSupportedOperations + [esoAutoHeight, esoEditing]; -end; - -class function TcxCustomImageProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxImageViewInfo; -end; - -function TcxCustomImageProperties.IsResetEditClass: Boolean; -begin - Result := True; -end; - -procedure TcxCustomImageProperties.ValidateDisplayValue(var DisplayValue: TcxEditValue; - var ErrorText: TCaption; var Error: Boolean; AEdit: TcxCustomEdit); -begin - with TcxCustomImage(AEdit) do - begin - LockEditValueChanging(True); - try - DoOnAssignPicture; - SaveModified; - try - EditModified := False; - DoEditing; - finally - RestoreModified; - end; - finally - LockEditValueChanging(False); - end; - end; -end; - -{ TcxCustomImage } - -destructor TcxCustomImage.Destroy; -begin - if FEditPopupMenu <> nil then FEditPopupMenu.Free; - FPicture.Free; - inherited Destroy; -end; - -procedure TcxCustomImage.EditAndClear; -begin - if DoEditing then - FPicture.Graphic := nil; -end; - -procedure TcxCustomImage.EditPopupMenuClick(Sender: TObject); -begin - MenuItemClick(Sender, TcxPopupMenuItem(Integer(TMenuItem(Sender).Tag))); -end; - -{$IFDEF CBUILDER10} -function TcxCustomImage.GetPicture: TPicture; -begin - Result := FPicture; -end; -{$ENDIF} - -function TcxCustomImage.GetProperties: TcxCustomImageProperties; -begin - Result := TcxCustomImageProperties(FProperties); -end; - -function TcxCustomImage.GetActiveProperties: TcxCustomImageProperties; -begin - Result := TcxCustomImageProperties(InternalGetActiveProperties); -end; - -procedure TcxCustomImage.MenuItemClick(Sender: TObject; - MenuItem: TcxPopupMenuItem); -begin - KeyboardAction := True; - try - case MenuItem of - pmiCut: CutToClipboard; - pmiCopy: CopyToClipboard; - pmiPaste: PasteFromClipboard; - pmiDelete: EditAndClear; - pmiLoad: LoadFromFile; - pmiSave: SaveToFile; - pmiCustom: CustomClick; - end; - finally - KeyboardAction := False; - end; -end; - -procedure TcxCustomImage.PictureChanged(Sender: TObject); -var - PrevEvent: TNotifyEvent; -begin - LockChangeEvents(True); - try - if Picture.Graphic is TIcon then // Otherwise the Icon returns the incorrect sizes - TIcon(Picture.Graphic).Handle; // HandleNeeded; - - if ActiveProperties.GraphicTransparency <> gtDefault then - begin - PrevEvent := FPicture.OnChange; - try - FPicture.OnChange := nil; - if not IsPictureEmpty(FPicture) then - FPicture.Graphic.Transparent := ActiveProperties.GraphicTransparency = gtTransparent; - finally - FPicture.OnChange := PrevEvent; - end; - end; - if not (csLoading in ComponentState) then - begin - ResetImage; - SetSize; - end; - if not FInternalChanging then - begin - if KeyboardAction then - ModifiedAfterEnter := True; - DoChange; - ShortRefreshContainer(False); - end; - if ActiveProperties.ImmediatePost and CanPostEditValue and ValidateEdit(True) then - InternalPostEditValue; - finally - LockChangeEvents(False); - end; - UpdateScrollBars; -end; - -procedure TcxCustomImage.PreparePopup; - - procedure RefreshCaptions; - begin - with FEditPopupMenu do - begin - Items[0].Caption := cxGetResourceString(@cxSMenuItemCaptionCut); - Items[1].Caption := cxGetResourceString(@cxSMenuItemCaptionCopy); - Items[2].Caption := cxGetResourceString(@cxSMenuItemCaptionPaste); - Items[3].Caption := cxGetResourceString(@cxSMenuItemCaptionDelete); - Items[5].Caption := cxGetResourceString(@cxSMenuItemCaptionLoad); - Items[6].Caption := cxGetResourceString(@cxSMenuItemCaptionSave); - end; - end; - - function NewItem(const ACaption: string; ABitmap: TBitmap; - ATag: Integer): TMenuItem; - begin - Result := TMenuItem.Create(Self); - with Result do - begin - Caption := ACaption; - if Assigned(ABitmap) then Bitmap := ABitmap else ImageIndex := ATag; - Tag := ATag; - OnClick := EditPopupMenuClick; - end; - end; - - procedure AddItem(AItems: TMenuItem; AMenuItem: TcxPopupMenuItem); - begin - with AItems do - begin - if AMenuItem = pmiCustom then - begin - ActiveProperties.PopupMenuLayout.CustomMenuItemGlyph.Transparent := True; - Add(NewItem(ActiveProperties.PopupMenuLayout.CustomMenuItemCaption, - ActiveProperties.PopupMenuLayout.CustomMenuItemGlyph, Integer(AMenuItem))); - end - else - Add(NewItem('', nil, Integer(AMenuItem))); - if AMenuItem in [pmiDelete, pmiSave] then - Add(NewItem('-', nil, -1)); - end; - end; - -var - I: TcxPopupMenuItem; - AFlagRO, AFlagEmpty, AIsIcon, ACanPaste: Boolean; -begin - with ActiveProperties.PopupMenuLayout do - begin - if FEditPopupMenu = nil then - begin - FEditPopupMenu := TPopupMenu.Create(nil); - FEditPopupMenu.Images := cxGraphicPopupMenuImages; - for I := Low(TcxPopupMenuItem) to High(TcxPopupMenuItem) do - AddItem(FEditPopupMenu.Items, I); - end; - RefreshCaptions; - // visible - with FEditPopupMenu do - begin - Items[0].Visible := pmiCut in MenuItems; - Items[1].Visible := pmiCopy in MenuItems; - Items[2].Visible := pmiPaste in MenuItems; - Items[3].Visible := pmiDelete in MenuItems; - Items[5].Visible := pmiLoad in MenuItems; - Items[6].Visible := pmiSave in MenuItems; - Items[8].Visible := pmiCustom in MenuItems; - // Separators - Items[4].Visible := Items[5].Visible or Items[6].Visible; - Items[7].Visible := Items[8].Visible; - - AIsIcon := ActiveProperties.GraphicClass = TIcon; - - ACanPaste := CanPasteFromClipboard; - // Custom Item - with Items[8] do - begin - Caption := CustomMenuItemCaption; - Bitmap := CustomMenuItemGlyph; - end; - - AFlagRO := not CanModify; - AFlagEmpty := IsPictureEmpty(FPicture); - Items[0].Enabled := not (AFlagEmpty or AFlagRO or AIsIcon); - Items[1].Enabled := not AFlagEmpty and not AIsIcon; - Items[2].Enabled := not AFlagRO and ACanPaste; - Items[3].Enabled := not AFlagEmpty and not AFlagRO; - Items[5].Enabled := not AFlagRO; - Items[6].Enabled := not AFlagEmpty; - end; - end; -end; - -procedure TcxCustomImage.ResetImage; -begin - HScrollBar.Position := 0; - VScrollBar.Position := 0; - SynchronizeImage; -end; - -procedure TcxCustomImage.SetPicture(Value: TPicture); -begin - FPicture.Assign(Value); -end; - -procedure TcxCustomImage.SetProperties(const Value: TcxCustomImageProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomImage.SetTransparent(AValue: Boolean); -begin - if AValue <> FTransparent then - begin - FTransparent := AValue; - ViewInfo.Transparent := FTransparent; - InvalidateRect(ViewInfo.ClientRect, False); - end; -end; - -procedure TcxCustomImage.SynchronizeImage; -begin - if not HandleAllocated then Exit; - with TcxImageViewInfo(ViewInfo) do - begin - if HScrollBar.Visible then TopLeft.X := HScrollBar.Position else TopLeft.X := 0; - if VScrollBar.Visible then TopLeft.Y := VScrollBar.Position else TopLeft.Y := 0; - end; - CalculateViewInfo(False); - InvalidateRect(ViewInfo.ClientRect, False); -end; - -function TcxCustomImage.CanAutoSize: Boolean; -begin - Result := inherited CanAutoSize and not IsPictureEmpty(Picture); -end; - -function TcxCustomImage.CanAutoWidth: Boolean; -begin - Result := True; -end; - -procedure TcxCustomImage.DoContextPopup( MousePos: TPoint; - var Handled: Boolean); -var - P: TPoint; -begin - if (PopupMenu = nil) and (ActiveProperties.PopupMenuLayout.MenuItems <> []) then - begin - Handled := True; - P := MousePos; - if (P.X = -1) and (P.Y = -1) then - begin - P.X := 10; - P.Y := 10; - end; - // Popup - PreparePopup; - P := ClientToScreen(P); - FEditPopupMenu.Popup(P.X, P.Y); - end - else - inherited; -end; - -procedure TcxCustomImage.Initialize; -begin - inherited Initialize; - AutoSize := False; - Width := 140; - Height := 100; - FClipboardFormat := CF_PICTURE; - FPicture := TPicture.Create; - FPicture.OnChange := PictureChanged; - TcxImageViewInfo(ViewInfo).Picture := FPicture; -end; - -procedure TcxCustomImage.InitScrollBarsParameters; -begin - if IsInplace or AutoSize or IsRectEmpty(ClientBounds) or IsPictureEmpty(Picture) or // TODO - ActiveProperties.Center or ActiveProperties.Stretch then // TODO - Exit; - with ClientBounds do - begin - SetScrollBarInfo(sbHorizontal, 0, Picture.Width - 1, 8, Right - Left, - TcxImageViewInfo(ViewInfo).TopLeft.X, True, True); - SetScrollBarInfo(sbVertical, 0, Picture.Height - 1, 8, Bottom - Top, - TcxImageViewInfo(ViewInfo).TopLeft.Y, True, True); - end; - SynchronizeImage; -end; - -procedure TcxCustomImage.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - KeyboardAction := True; - try - case Key of - VK_INSERT: - if ssShift in Shift then - PasteFromClipBoard - else - if ssCtrl in Shift then - CopyToClipBoard; - VK_DELETE: - if ssShift in Shift then - CutToClipBoard; - end; - finally - KeyboardAction := False; - end; -end; - -procedure TcxCustomImage.KeyPress(var Key: Char); -begin - inherited KeyPress(Key); - KeyboardAction := True; - try - case Key of - ^X: CutToClipBoard; - ^C: CopyToClipBoard; - ^V: PasteFromClipBoard; - end; - finally - KeyboardAction := False; - end; -end; - -function TcxCustomImage.NeedsInvokeAfterKeyDown(AKey: Word; - AShift: TShiftState): Boolean; -begin - Result := inherited NeedsInvokeAfterKeyDown(AKey, AShift); - case AKey of - VK_INSERT: - Result := AShift * [ssCtrl, ssShift] = []; - VK_DELETE: - Result := not (ssShift in AShift); - end; -end; - -function TcxCustomImage.NeedsScrollBars: Boolean; -begin - Result := True; -end; - -procedure TcxCustomImage.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -begin - case AScrollCode of - scLineUp: - Dec(AScrollPos, 8); - scLineDown: - Inc(AScrollPos, 8); - end; - case AScrollBarKind of - sbVertical: - begin - AScrollPos := Min(AScrollPos, Picture.Height - VScrollBar.PageSize); - VScrollBar.Position := AScrollPos; - AScrollPos := VScrollBar.Position; - end; - sbHorizontal: - begin - AScrollPos := Min(AScrollPos, Picture.Width - HScrollBar.PageSize); - HScrollBar.Position := AScrollPos; - AScrollPos := HScrollBar.Position; - end; - end; - SynchronizeImage; -end; - -function TcxCustomImage.GetEditValue: TcxEditValue; -var - S: AnsiString; -begin - if IsPictureEmpty(FPicture) then - Result := Null - else - begin - SavePicture(FPicture, S); - Result := S; - end; -end; - -procedure TcxCustomImage.InternalSetEditValue(const Value: TcxEditValue; AIsValueValid: Boolean); -begin - FInternalChanging := True; - try - if cxVarIsBlob(Value) then - LoadPicture(Picture, GetGraphicClass, Value) - else - Picture.Assign(nil); - finally - EditModified := False; - FInternalChanging := False; - end; -end; - -procedure TcxCustomImage.PropertiesChanged(Sender: TObject); -begin - if not PropertiesChangeLocked then - begin - PictureChanged(nil); - UpdateScrollBars; - inherited PropertiesChanged(Sender) - end; -end; - -procedure TcxCustomImage.UpdateScrollBars; -begin - inherited UpdateScrollBars; - SynchronizeImage; -end; - -function TcxCustomImage.CanPasteFromClipboard: Boolean; -var - AGraphicClass: TGraphicClass; -begin - AGraphicClass := ActiveProperties.GraphicClass; - if AGraphicClass = TBitmap then - Result := Clipboard.HasFormat(CF_BITMAP) - else if AGraphicClass = TIcon then - Result := False - else if AGraphicClass = TMetafile then - Result := Clipboard.HasFormat(CF_METAFILEPICT) - {$IFDEF USEJPEGIMAGE} - else if AGraphicClass = TJPEGImage then - Result := Clipboard.HasFormat(CF_BITMAP) - {$ENDIF} - else if AGraphicClass = nil then - Result := Clipboard.HasFormat(CF_PICTURE) - else - Result := Clipboard.HasFormat(ClipboardFormat); -end; - -procedure TcxCustomImage.CustomClick; -begin - with Properties do - if Assigned(OnCustomClick) then - OnCustomClick(Self); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnCustomClick) then - OnCustomClick(Self); -end; - -procedure TcxCustomImage.DoOnAssignPicture; -begin - with Properties do - if Assigned(OnAssignPicture) then - OnAssignPicture(Self, Picture); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnAssignPicture) then - OnAssignPicture(Self, Picture); -end; - -function TcxCustomImage.GetGraphicClass(APastingFromClipboard: Boolean = False): TGraphicClass; -begin - if IsInplace then - Result := ActiveProperties.GetGraphicClass(InplaceParams.Position.Item, - InplaceParams.Position.RecordIndex, APastingFromClipboard) - else - begin - Result := ActiveProperties.GraphicClass; - if Result = nil then - begin - if APastingFromClipboard then - Result := TBitmap; - if Assigned(FOnGetGraphicClass) then - FOnGetGraphicClass(Self, APastingFromClipboard, Result); - end; - end; -end; - -procedure TcxCustomImage.CopyToClipboard; -begin - if (FPicture <> nil) and (FPicture.Graphic <> nil) then - Clipboard.Assign(FPicture); -end; - -procedure TcxCustomImage.CutToClipboard; -begin - CopyToClipboard; - EditAndClear; -end; - -function TcxCustomImage.Focused: Boolean; -begin - Result := FIsDialogShowed or inherited Focused; -end; - -class function TcxCustomImage.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomImageProperties; -end; - -procedure TcxCustomImage.LoadFromFile; - - function GetDialogFilter: string; - var - AGraphicClass: TGraphicClass; - begin - if ActiveProperties.CustomFilter <> '' then - Result := ActiveProperties.CustomFilter - else - begin - AGraphicClass := ActiveProperties.GraphicClass; - if AGraphicClass <> nil then - Result := GraphicFilter(AGraphicClass) - else - Result := GraphicFilter(TGraphic); - end; - end; - -var - ADialog: TOpenPictureDialog; -begin - if not CanModify then - Exit; - ADialog := TOpenPictureDialog.Create(nil); - try - FIsDialogShowed := True; - ADialog.Filter := GetDialogFilter; - if ADialog.Execute and DoEditing then - begin - FPicture.LoadFromFile(ADialog.FileName); - DoClosePopup(crEnter); - end - else - DoClosePopup(crCancel); - Application.ProcessMessages; - finally - FIsDialogShowed := False; - ADialog.Free; - end; -end; - -procedure TcxCustomImage.PasteFromClipboard; -{$IFDEF USEJPEGIMAGE} -var - AGraphicClass: TGraphicClass; - AGraphic: TJPEGImage; -{$ENDIF} -begin - if CanPasteFromClipboard and DoEditing then - if Clipboard.HasFormat(CF_BITMAP) then - begin -{$IFDEF USEJPEGIMAGE} - AGraphicClass := GetGraphicClass(True); - if (AGraphicClass = TJPEGImage) then - begin - AGraphic := TJPEGImage.Create; - try - TJPEGImageAccess(AGraphic).NewBitmap; - TJPEGImageAccess(AGraphic).Bitmap.Assign(Clipboard); - AGraphic.JPEGNeeded; - FPicture.Graphic := AGraphic; - finally - AGraphic.Free; - end; - end - else -{$ENDIF} - FPicture.Bitmap.Assign(Clipboard); - end - else - FPicture.Assign(Clipboard); -end; - -procedure TcxCustomImage.SaveToFile; -var - ADialog: TSavePictureDialog; -begin - if (FPicture = nil) or (FPicture.Graphic = nil) then - Exit; - ADialog := TSavePictureDialog.Create(Application); - FIsDialogShowed := True; - try - if ActiveProperties.CustomFilter <> '' then - ADialog.Filter := ActiveProperties.CustomFilter - else - ADialog.Filter := GraphicFilter(TGraphicClass(FPicture.Graphic.ClassType)); - ADialog.DefaultExt := GraphicExtension(TGraphicClass(FPicture.Graphic.ClassType)); - if ADialog.Execute then - FPicture.SaveToFile(ADialog.FileName); - Application.ProcessMessages; - finally - FIsDialogShowed := False; - ADialog.Free; - end; -end; - -{ TcxImage } - -class function TcxImage.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxImageProperties; -end; - -function TcxImage.GetActiveProperties: TcxImageProperties; -begin - Result := TcxImageProperties(InternalGetActiveProperties); -end; - -function TcxImage.GetProperties: TcxImageProperties; -begin - Result := TcxImageProperties(FProperties); -end; - -procedure TcxImage.SetProperties(Value: TcxImageProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxImageViewInfo } - -destructor TcxImageViewInfo.Destroy; -begin - if FFreePicture then - Picture.Free; - FTempBitmap.Free; - inherited Destroy; -end; - -procedure TcxImageViewInfo.DrawTransparentBackground(ACanvas: TcxCanvas; const R: TRect); -begin - ACanvas.SaveClipRegion; - try - ACanvas.SetClipRegion(TcxRegion.Create(R), roIntersect); - cxDrawTransparentControlBackground(Edit, ACanvas, Bounds); - finally - ACanvas.RestoreClipRegion; - end; -end; - -procedure TcxImageViewInfo.InternalPaint(ACanvas: TcxCanvas); - - procedure FocusRect(ACanvas: TCanvas; R: TRect); - begin - ACanvas.Brush.Style := bsClear; - ACanvas.Rectangle(R); - ACanvas.Brush.Style := bsSolid; - end; - -var - CR, R, Temp: TRect; - NeedDrawBkg: Boolean; - SaveRgn: TcxRegion; -begin - CR := ClientRect; - if Transparent and not IsInplace then - DrawTransparentBackground(ACanvas, Bounds); - with ACanvas do - begin - if not Assigned(Picture) or IsPictureEmpty(Picture) then - begin - inherited InternalPaint(ACanvas); - Brush.Color := BackgroundColor; - if Caption <> '' then - begin - Brush.Style := bsClear; - Canvas.Font.Assign(Self.Font); - Canvas.Font.Color := Self.TextColor; - ACanvas.DrawText(Caption, CR, cxAlignCenter + cxSingleLine); - Brush.Style := bsSolid; - end; - if ShowFocusRect then FocusRect(Canvas, CR); - Exit; - end; - with CR do - begin - if TcxCustomImageProperties(EditProperties).GetRealStretch(Size(Picture.Width, Picture.Height), - Size(cxRectWidth(CR), cxRectHeight(CR))) then - begin - if Proportional then - CalcStretchRect(CR, Picture.Width, Picture.Height, R) - else - R := CR; - end - else - R := cxRectBounds(Left, Top, Picture.Width, Picture.Height); - if Center then - begin - OffsetRect(R, (Right - Left - cxRectWidth(R)) div 2, 0); - OffsetRect(R, 0, (Bottom - Top - cxRectHeight(R)) div 2); - end - else - OffsetRect(R, -Self.TopLeft.X, -Self.TopLeft.Y); - end; - SaveRgn := GetClipRegion; // for native mode - ExcludeClipRect(CR); - DrawCustomEdit(ACanvas, Self, False, bpsSolid); - SetClipRegion(SaveRgn, roSet); - if ShowFocusRect then - begin - FocusRect(Canvas, CR); - InflateRect(CR, -1, -1); - end; - SaveRgn := GetClipRegion; - IntersectClipRect(CR); - if ShowFocusRect then InflateRect(CR, 1, 1); - if not Self.Transparent and Picture.Graphic.Transparent then - begin - if FTempBitmap = nil then - begin - FTempBitmap := TBitmap.Create; - FTempBitmap.PixelFormat := pfDevice; - end; - try - FTempBitmap.Width := R.Right - R.Left; - FTempBitmap.Height := R.Bottom - R.Top; - FTempBitmap.Canvas.Brush.Color := BackgroundColor; - FTempBitmap.Canvas.FillRect(Rect(0, 0, FTempBitmap.Width, FTempBitmap.Height)); - FTempBitmap.Canvas.StretchDraw(Rect(0, 0, FTempBitmap.Width, FTempBitmap.Height), Picture.Graphic); - Canvas.Draw(R.Left, R.Top, FTempBitmap); - except - on EOutOfResources do - begin - Canvas.Brush.Color := BackgroundColor; - Canvas.FillRect(ClientRect); - Canvas.StretchDraw(R, Picture.Graphic); - end; - end; - end - else - Canvas.StretchDraw(R, Picture.Graphic); - NeedDrawBkg := not (IntersectRect(Temp, R, CR) and EqualRect(Temp, CR)) and not Self.Transparent; - if NeedDrawBkg then - begin - ExcludeClipRect(R); - Brush.Color := BackgroundColor; - FillRect(CR); - end; - SetClipRegion(SaveRgn, roSet); - end; -end; - -function TcxImageViewInfo.IsRepaintOnStateChangingNeeded: Boolean; -begin - Result := (not Assigned(Picture) or IsPictureEmpty(Picture)) and (Caption <> ''); -end; - -{ TcxImageViewData } - -procedure TcxImageViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); -var - AProperties: TcxCustomImageProperties; -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - if IsRectEmpty(ABounds) then - Exit; - AProperties := TcxCustomImageProperties(Properties); - with TcxImageViewInfo(AViewInfo) do - begin - Caption := AProperties.Caption; - Center := AProperties.Center; - ShowFocusRect := AProperties.ShowFocusRect and Focused and not IsInplace; - Stretch := AProperties.Stretch; - Proportional := AProperties.Proportional; - if Center or Stretch then - TopLeft := Point(0, 0); - end; -end; - -procedure TcxImageViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -var - AGraphicClass: TGraphicClass; -begin - with TcxImageViewInfo(AViewInfo) do - if Length(dxVariantToAnsiString(AEditValue)) > 0 then - begin - if not Assigned(Picture) then - begin - Picture := TPicture.Create; - FFreePicture := True; - end; - AGraphicClass := TcxCustomImageProperties(Properties).GetGraphicClass( - InplaceEditParams.Position.Item, InplaceEditParams.Position.RecordIndex); - LoadPicture(Picture, AGraphicClass, AEditValue); - if TcxCustomImageProperties(Properties).GraphicTransparency <> gtDefault then - Picture.Graphic.Transparent := - TcxCustomImageProperties(Properties).GraphicTransparency = gtTransparent; - end - else - if Assigned(Picture) then - Picture.Assign(nil); -end; - -function TcxImageViewData.GetEditContentSize(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; -var - ABorderExtent: TRect; - AGraphicClass: TGraphicClass; - APicture: TPicture; -begin - if IsInplace then - begin - if Edit <> nil then - begin - Result := Size(Edit.Width, Edit.Height); - ABorderExtent := GetBorderExtent; - Result.cx := Result.cx - (ABorderExtent.Left + ABorderExtent.Right); - Result.cy := Result.cy - (ABorderExtent.Top + ABorderExtent.Bottom); - end - else - with TcxCustomImageProperties(Properties) do - begin - Result := Size(0, DefaultHeight); - if cxVarIsBlob(AEditValue) then - begin - AGraphicClass := GetGraphicClass(InplaceEditParams.Position.Item, - InplaceEditParams.Position.RecordIndex); - APicture := TPicture.Create; - try - LoadPicture(APicture, AGraphicClass, AEditValue); - Result := Size(APicture.Width, APicture.Height); - finally - APicture.Free; - end; - if GetRealStretch(Result, Size(AEditSizeProperties.Width, AEditSizeProperties.Height)) then - if (AEditSizeProperties.Width > 0) and (Result.cx > 0) then - Result := Size(AEditSizeProperties.Width, Round(Result.cy * AEditSizeProperties.Width / Result.cx)) - else - if (AEditSizeProperties.Height > 0) and (Result.cy > 0) then - Result := Size(Round(Result.cx * AEditSizeProperties.Height / Result.cy), AEditSizeProperties.Height); - end - else - if Length(Caption) <> 0 then - begin - ACanvas.Font := Style.GetVisibleFont; - Result := ACanvas.TextExtent(Caption); - end; - end; - end - else - if Edit <> nil then - with TcxCustomImage(Edit) do - Result := Size(Picture.Width, Picture.Height) - else - Result := Size(0, 0); -end; - -procedure LoadPopupMenuImages; - - function GetResourceName(APopupMenuItem: TcxPopupMenuItem): string; - begin - case APopupMenuItem of - pmiCut: - Result := 'CXMENUIMAGE_CUT'; - pmiCopy: - Result := 'CXMENUIMAGE_COPY'; - pmiPaste: - Result := 'CXMENUIMAGE_PASTE'; - pmiDelete: - Result := 'CXMENUIMAGE_DELETE'; - pmiLoad: - Result := 'CXMENUIMAGE_LOAD'; - pmiSave: - Result := 'CXMENUIMAGE_SAVE'; - else - Result := ''; - end; - end; - - procedure LoadBitmapFromResource(ABitmap: TBitmap; - APopupMenuItem: TcxPopupMenuItem); - begin - ABitmap.LoadFromResourceName(HInstance, GetResourceName(APopupMenuItem)); - end; - -var - ABitmap: TBitmap; - APopupMenuItem: TcxPopupMenuItem; -begin - ABitmap := TBitmap.Create; - try - LoadBitmapFromResource(ABitmap, Low(TcxPopupMenuItem)); - if cxGraphicPopupMenuImages = nil then - cxGraphicPopupMenuImages := TImageList.CreateSize(ABitmap.Width, ABitmap.Height); - cxGraphicPopupMenuImages.AddMasked(ABitmap, clDefault); - - for APopupMenuItem := Succ(Low(TcxPopupMenuItem)) to High(TcxPopupMenuItem) do - begin - if APopupMenuItem = pmiCustom then - Continue; - LoadBitmapFromResource(ABitmap, APopupMenuItem); - cxGraphicPopupMenuImages.AddMasked(ABitmap, clDefault); - end; - finally - ABitmap.Free; - end; -end; - -initialization - LoadPopupMenuImages; - GetRegisteredEditProperties.Register(TcxImageProperties, scxSEditRepositoryImageItem); - -finalization - FreeAndNil(cxRegisteredGraphicClasses); - FreeAndNil(cxGraphicPopupMenuImages); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxImageComboBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxImageComboBox.pas deleted file mode 100644 index 65c9647c..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxImageComboBox.pas +++ /dev/null @@ -1,1331 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxImageComboBox; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, ComCtrls, -{$IFDEF DELPHI6} - Types, Variants, -{$ENDIF} - cxVariants, SysUtils, Classes, Graphics, Controls, Forms, StdCtrls, ExtCtrls, Clipbrd, - ImgList, cxClasses, cxGraphics, cxControls, cxContainer, cxDataStorage, cxDataUtils, - cxEdit, cxDropDownEdit, cxTextEdit, cxFilterControlUtils; - -type - { TcxImageComboBoxItem } - - TcxImageComboBoxItem = class(TCollectionItem) - private - FDescription: TCaption; - FImageIndex: TImageIndex; - FTag: TcxTag; - FValue: Variant; - function IsStoredValue: Boolean; - function IsTagStored: Boolean; - procedure SetDescription(const Value: TCaption); - procedure SetImageIndex(const Value: TImageIndex); - procedure SetValue(const AValue: Variant); - public - constructor Create(Collection: TCollection); override; - procedure Assign(Source: TPersistent); override; - published - property Description: TCaption read FDescription write SetDescription; - property ImageIndex: TImageIndex read FImageIndex write SetImageIndex default -1; - property Tag: TcxTag read FTag write FTag stored IsTagStored; - property Value: Variant read FValue write SetValue stored IsStoredValue; - end; - - { TcxImageComboBoxItems } - - TcxImageComboBoxItems = class(TOwnedCollection) - private - function GetItems(Index: Integer): TcxImageComboBoxItem; - procedure SetItems(Index: Integer; const Value: TcxImageComboBoxItem); - protected - procedure InternalChanged; - procedure Update(Item: TCollectionItem); override; - public - constructor Create(AOwner: TPersistent); - function Add: TcxImageComboBoxItem; - property Items[Index: Integer]: TcxImageComboBoxItem read GetItems write SetItems; default; - end; - - { TcxImageComboBoxListBox } - - TcxCustomImageComboBox = class; - TcxCustomImageComboBoxProperties = class; - - TcxImageComboBoxListBox = class(TcxComboBoxListBox) - private - FClientWidth: Integer; - FHasScrollbar: Boolean; - function GetEdit: TcxCustomImageComboBox; - function GetProperties: TcxCustomImageComboBoxProperties; - protected - procedure DrawItem(Index: Integer; Rect: TRect; - State: TOwnerDrawState); override; - procedure MeasureItem(Index: Integer; var Height: Integer); override; - procedure RecreateWindow; override; - function GetImageRect(const R: TRect): TRect; - function GetImages: TCustomImageList; - function GetMaxItemWidth: Integer; virtual; - property Edit: TcxCustomImageComboBox read GetEdit; - property Properties: TcxCustomImageComboBoxProperties read GetProperties; - public - constructor Create(AOwner: TComponent); override; - function GetHeight(ARowCount: Integer; AMaxHeight: Integer): Integer; override; - function GetItemWidth(AIndex: Integer): Integer; override; - end; - - { TcxImageComboBoxLookupData } - - TcxImageComboBoxLookupData = class(TcxComboBoxLookupData) - private - function GetList: TcxImageComboBoxListBox; - protected - function GetListBoxClass: TcxCustomEditListBoxClass; override; - function GetItem(Index: Integer): string; override; - function GetItemCount: Integer; override; - property List: TcxImageComboBoxListBox read GetList; - public - procedure TextChanged; override; - end; - - { TcxImageComboBoxViewData } - - TcxImageComboBoxViewData = class(TcxCustomDropDownEditViewData) - private - function GetProperties: TcxCustomImageComboBoxProperties; - protected - function InternalEditValueToDisplayText(AEditValue: TcxEditValue): string; override; - function InternalGetEditConstantPartSize(ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo): TSize; override; - function IsComboBoxStyle: Boolean; override; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); override; - procedure DisplayValueToDrawValue(const ADisplayValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - property Properties: TcxCustomImageComboBoxProperties read GetProperties; - end; - - { TcxImageComboBoxViewInfo } - - TcxImageAlign = (iaLeft, iaRight); - - TcxImageComboBoxViewInfo = class(TcxCustomTextEditViewInfo) - protected - procedure InternalPaint(ACanvas: TcxCanvas); override; - public - ImageRect: TRect; - ShowDescriptions: Boolean; - ImageAlign: TcxImageAlign; - ImageIndex: TImageIndex; - Images: TCustomImageList; - procedure Offset(DX, DY: Integer); override; - end; - - { TcxCustomImageComboBoxProperties } - - TcxCustomImageComboBoxProperties = class(TcxCustomComboBoxProperties) - private - FDefaultDescription: string; - FDefaultImageIndex: TImageIndex; - FImageAlign: TcxImageAlign; - FImages: TCustomImageList; - FImagesChangeLink: TChangeLink; - FItems: TcxImageComboBoxItems; - FLargeImages: TCustomImageList; - FLargeImagesChangeLink: TChangeLink; - FMultiLineText: Boolean; - FShowDescriptions: Boolean; - procedure ImagesChange(Sender: TObject); - procedure LargeImagesChange(Sender: TObject); - procedure SetDefaultDescription(const Value: string); - procedure SetDefaultImageIndex(const Value: TImageIndex); - procedure SetImageAlign(const Value: TcxImageAlign); - procedure SetImages(Value: TCustomImageList); - procedure SetItems(const Value: TcxImageComboBoxItems); - procedure SetLargeImages(Value: TCustomImageList); - procedure SetMultiLineText(const Value: Boolean); - procedure SetShowDescriptions(const Value: Boolean); - protected - function FindItemByText(const AText: string): TcxImageComboBoxItem; - function FindLookupText(const AText: string): Boolean; override; - procedure FreeNotification(Sender: TComponent); override; - function GetDisplayFormatOptions: TcxEditDisplayFormatOptions; override; - class function GetLookupDataClass: TcxInterfacedPersistentClass; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function HasDisplayValue: Boolean; override; - procedure InternalGetImageComboBoxDisplayValue(AItem: TcxImageComboBoxItem; - out AText: TCaption; out AImageIndex: TImageIndex; - AAlwaysShowDescription: Boolean = False); virtual; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; override; - function FindItemByValue(const AValue: Variant): TcxImageComboBoxItem; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - procedure GetImageComboBoxDisplayValue(const AEditValue: TcxEditValue; - out AText: TCaption; out AImageIndex: TImageIndex); - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsEditValueValid(var AEditValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - // !!! - property DefaultDescription: string - read FDefaultDescription write SetDefaultDescription; - property DefaultImageIndex: TImageIndex - read FDefaultImageIndex write SetDefaultImageIndex default -1; - property ImageAlign: TcxImageAlign - read FImageAlign write SetImageAlign default iaLeft; - property Images: TCustomImageList read FImages write SetImages; - property Items: TcxImageComboBoxItems read FItems write SetItems; - property LargeImages: TCustomImageList read FLargeImages write SetLargeImages; - property MultiLineText: Boolean - read FMultiLineText write SetMultiLineText default False; - property ShowDescriptions: Boolean - read FShowDescriptions write SetShowDescriptions default True; - end; - - { TcxImageComboBoxProperties } - - TcxImageComboBoxProperties = class(TcxCustomImageComboBoxProperties) - published - property Alignment; - property AssignedValues; - property ButtonGlyph; - property ClearKey; - property DefaultDescription; - property DefaultImageIndex; - property DropDownRows; - property ImageAlign; - property Images; - property ImeMode; - property ImeName; - property ImmediateDropDown; - property ImmediatePost; - property ImmediateUpdateText; - property Items; - property LargeImages; - property MultiLineText; - property PopupAlignment; - property PostPopupValueOnTab; - property ReadOnly; - property Revertable; - property ShowDescriptions; - property ValidateOnEnter; - property OnButtonClick; - property OnChange; - property OnCloseQuery; - property OnCloseUp; - property OnEditValueChanged; - property OnInitPopup; - property OnPopup; - property OnValidate; - end; - - { TcxCustomImageComboBox } - - TcxCustomImageComboBox = class(TcxCustomComboBox) - private - function GetProperties: TcxCustomImageComboBoxProperties; - function GetActiveProperties: TcxCustomImageComboBoxProperties; - function GetLookupData: TcxImageComboBoxLookupData; - procedure SetProperties(const Value: TcxCustomImageComboBoxProperties); - protected - function GetItemObject: TObject; override; - function GetPopupWindowClientPreferredSize: TSize; override; - function InternalGetEditingValue: TcxEditValue; override; - function IsValidChar(AChar: Char): Boolean; override; - function LookupKeyToEditValue(const AKey: TcxEditValue): TcxEditValue; override; - procedure SynchronizeDisplayValue; override; - procedure UpdateDrawValue; override; - property LookupData: TcxImageComboBoxLookupData read GetLookupData; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - property ActiveProperties: TcxCustomImageComboBoxProperties read GetActiveProperties; - property Properties: TcxCustomImageComboBoxProperties read GetProperties - write SetProperties; - end; - - { TcxImageComboBox } - - TcxImageComboBox = class(TcxCustomImageComboBox) - private - function GetActiveProperties: TcxImageComboBoxProperties; - function GetProperties: TcxImageComboBoxProperties; - procedure SetProperties(Value: TcxImageComboBoxProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxImageComboBoxProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property EditValue; - property Enabled; - property ImeMode; - property ImeName; - property ItemIndex; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxImageComboBoxProperties read GetProperties write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - property OnEditing; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - end; - - { TcxFilterImageComboBoxHelper } - - TcxFilterImageComboBoxHelper = class(TcxFilterComboBoxHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - -implementation - -uses - Dialogs, Math, cxGeometry, cxButtons, cxEditConsts, cxEditUtils, cxScrollBar, - cxLookAndFeelPainters, cxDWMApi; - -type - TcxCustomTextEditAccess = class(TcxCustomTextEdit); - -{ TcxImageComboBoxItem } - -constructor TcxImageComboBoxItem.Create(Collection: TCollection); -var - AImages: TCustomImageList; -begin - FValue := Null; // for D5 variants - inherited Create(Collection); - AImages := - TcxCustomImageComboBoxProperties(TcxImageComboBoxItems(Collection).Owner).Images; - if (AImages <> nil) and (AImages.Count >= Collection.Count) then - FImageIndex := Collection.Count - 1 - else - FImageIndex := -1; -end; - -function TcxImageComboBoxItem.IsStoredValue: Boolean; -begin - Result := not VarIsNull(FValue); -end; - -function TcxImageComboBoxItem.IsTagStored: Boolean; -begin - Result := FTag <> 0; -end; - -procedure TcxImageComboBoxItem.SetDescription(const Value: TCaption); -begin - if FDescription <> Value then - begin - FDescription := Value; - TcxImageComboBoxItems(Collection).InternalChanged; - end; -end; - -procedure TcxImageComboBoxItem.SetImageIndex(const Value: TImageIndex); -begin - if FImageIndex <> Value then - begin - FImageIndex := Value; - TcxImageComboBoxItems(Collection).InternalChanged; - end; -end; - -procedure TcxImageComboBoxItem.SetValue(const AValue: Variant); -begin - if not InternalVarEqualsExact(FValue, AValue) then - begin - FValue := AValue; - TcxImageComboBoxItems(Collection).InternalChanged; - end; -end; - -procedure TcxImageComboBoxItem.Assign(Source: TPersistent); -begin - if Source is TcxImageComboBoxItem then - with TcxImageComboBoxItem(Source) do - begin - Self.Description := Description; - Self.ImageIndex := ImageIndex; - Self.Tag := Tag; - Self.Value := Value; - end - else - inherited Assign(Source); -end; - -{ TcxImageComboBoxItems } - -function TcxImageComboBoxItems.GetItems(Index: Integer): TcxImageComboBoxItem; -begin - Result := TcxImageComboBoxItem(inherited Items[Index]); -end; - -procedure TcxImageComboBoxItems.SetItems(Index: Integer; - const Value: TcxImageComboBoxItem); -begin - inherited Items[Index] := Value; -end; - -procedure TcxImageComboBoxItems.InternalChanged; -begin - Changed; -end; - -procedure TcxImageComboBoxItems.Update(Item: TCollectionItem); -begin - with TcxCustomImageComboBoxProperties(Owner) do - Changed; -end; - -constructor TcxImageComboBoxItems.Create(AOwner: TPersistent); -begin - inherited Create(AOwner, TcxImageComboBoxItem); -end; - -function TcxImageComboBoxItems.Add: TcxImageComboBoxItem; -begin - Result := TcxImageComboBoxItem(inherited Add); -end; - -{ TcxImageComboBoxListBox } - -constructor TcxImageComboBoxListBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - BorderStyle := bsNone; - Style := lbOwnerDrawVariable; -end; - -function TcxImageComboBoxListBox.GetHeight(ARowCount: Integer; AMaxHeight: Integer): Integer; -var - I, H: Integer; - R: TRect; -begin - if Properties.MultiLineText then - with TcxCustomImageComboBox(Edit) do - begin - R := GetPopupWindowOwnerControlBounds; - FClientWidth := R.Right - R.Left; - R := PopupWindow.ViewInfo.GetClientExtent; - Dec(FClientWidth, R.Left + R.Right); - end - else - FClientWidth := 0; - Result := 0; - for I := 0 to ARowCount - 1 do - begin - H := 0; - MeasureItem(I, H); - Inc(Result, H); - end; - if Properties.MultiLineText then - begin - FHasScrollbar := (Result > AMaxHeight) or (ARowCount < Items.Count); - if FHasScrollbar then - begin - Dec(FClientWidth, GetScrollBarSize.cx); - Result := 0; - for I := 0 to ARowCount - 1 do - begin - H := 0; - MeasureItem(I, H); - Inc(Result, H); - end; - end; - end; -end; - -function TcxImageComboBoxListBox.GetItemWidth(AIndex: Integer): Integer; -begin - if Properties.MultiLineText then - Result := 0 - else - Result := inherited GetItemWidth(AIndex); -end; - -procedure TcxImageComboBoxListBox.DrawItem(Index: Integer; Rect: TRect; - State: TOwnerDrawState); -var - Flags: Longint; - Data: string; - AImages: TCustomImageList; - R: TRect; - AImageIndex: Integer; -begin - if not DoDrawItem(Index, Rect, State) then - begin - Canvas.FillRect(Rect); - if (Index < Items.Count) and (Index > -1) then - begin - if Properties.MultiLineText then - Flags := DrawTextBiDiModeFlags(DT_LEFT or DT_EXPANDTABS or - DT_NOPREFIX or DT_WORDBREAK) - else - Flags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_VCENTER or - DT_NOPREFIX); - if not UseRightToLeftAlignment then - Inc(Rect.Left, 2) - else - Dec(Rect.Right, 2); - Data := Properties.Items[Index].Description; - AImages := GetImages; - if AImages <> nil then - begin - R := GetImageRect(Rect); - AImageIndex := Properties.Items[Index].ImageIndex; - if (AImageIndex > -1) and (AImageIndex < AImages.Count) then - with R do - AImages.Draw(Canvas.Canvas, Left + 1, (Bottom + Top - AImages.Height) div 2, - AImageIndex, Enabled); - if R.Left > Rect.Left then Rect.Right := R.Left; - if R.Right < Rect.Right then Rect.Left := R.Right; - end; - if not IsRectEmpty(Rect) then - begin - SetBkMode(Handle, TRANSPARENT); - DrawText(Canvas.Handle, PChar(Data), Length(Data), Rect, Flags); - end; - end; - end; -end; - -procedure TcxImageComboBoxListBox.MeasureItem(Index: Integer; var Height: Integer); -var - AData: string; - AImages: TCustomImageList; - W, H, AFlags: Integer; - R: TRect; -begin - W := FClientWidth - 2; - AImages := GetImages; - if AImages <> nil then - begin - Dec(W, AImages.Width + 4); - H := AImages.Height + 2; - end - else - H := 0; - if Properties.MultiLineText and (W > 0) then - begin - R := Rect(0, 0, W, H); - AData := Properties.Items[Index].Description; - AFlags := DT_LEFT or DT_EXPANDTABS or DT_NOPREFIX or DT_WORDBREAK or DT_CALCRECT; - DrawText(Canvas.Handle, PChar(AData), Length(AData), R, AFlags); - H := Max(H, R.Bottom - R.Top + 2); - end - else - H := Max(Canvas.TextHeight('Wg') + 2, H); - Height := H; - if (Index >= 0) and Edit.IsOnMeasureItemEventAssigned then - Edit.DoOnMeasureItem(Index, Canvas, Height); -end; - -procedure TcxImageComboBoxListBox.RecreateWindow; -begin - InternalRecreateWindow; -end; - -function TcxImageComboBoxListBox.GetImageRect(const R: TRect): TRect; -var - AImages: TCustomImageList; -begin - AImages := GetImages; - if AImages <> nil then - with Properties do - begin - Result := R; - with Result do - if ImageAlign = iaLeft then - Right := Left + AImages.Width + 4 - else - Left := Right - AImages.Width - 4; - end - else - Result := cxEmptyRect; -end; - -function TcxImageComboBoxListBox.GetImages: TCustomImageList; -begin - Result := Properties.LargeImages; - if Result = nil then Result := Properties.Images; -end; - -function TcxImageComboBoxListBox.GetMaxItemWidth: Integer; -var - AImages: TCustomImageList; - I, W, J: Integer; -begin - AImages := GetImages; - if AImages <> nil then Result := AImages.Width + 8 else Result := 4; - with Properties do - begin - J := Result; - for I := 0 to Items.Count - 1 do - begin - W := Canvas.TextWidth(Items[I].Description) + J; - if W > Result then Result := W; - end; - end; - if Properties.DropDownRows < Items.Count then - Inc(Result, GetScrollBarSize.cx); -end; - -function TcxImageComboBoxListBox.GetEdit: TcxCustomImageComboBox; -begin - Result := TcxCustomImageComboBox(inherited Edit); -end; - -function TcxImageComboBoxListBox.GetProperties: TcxCustomImageComboBoxProperties; -begin - Result := TcxCustomImageComboBox(Edit).ActiveProperties; -end; - -{ TcxImageComboBoxLookupData } - -function TcxImageComboBoxLookupData.GetListBoxClass: TcxCustomEditListBoxClass; -begin - Result := TcxImageComboBoxListBox; -end; - -function TcxImageComboBoxLookupData.GetItem(Index: Integer): string; -begin - with TcxCustomImageComboBox(Edit).ActiveProperties do - if (Index > -1) and (Index < Items.Count) then - Result := Items[Index].Description - else - Result := '' -end; - -function TcxImageComboBoxLookupData.GetItemCount: Integer; -begin - Result := TcxCustomImageComboBox(Edit).ActiveProperties.Items.Count; -end; - -function TcxImageComboBoxLookupData.GetList: TcxImageComboBoxListBox; -begin - Result := TcxImageComboBoxListBox(inherited List); -end; - -procedure TcxImageComboBoxLookupData.TextChanged; -var - AItem: TcxImageComboBoxItem; -begin - if TcxCustomImageComboBox(Edit).EditModeSetting then - Exit; - with TcxCustomImageComboBoxProperties(ActiveProperties) do - AItem := FindItemByValue(Edit.EditValue); - if AItem <> nil then - InternalSetCurrentKey(AItem.Index) - else - InternalSetCurrentKey(-1); -end; - -{ TcxImageComboBoxViewData } - -procedure TcxImageComboBoxViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); -var - R: TRect; - ATextOffset: Integer; -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, - AIsMouseEvent); - - with TcxImageComboBoxViewInfo(AViewInfo) do - begin - ImageAlign := TcxCustomImageComboBoxProperties(Properties).ImageAlign; - Images := TcxCustomImageComboBoxProperties(Properties).Images; - ShowDescriptions := TcxCustomImageComboBoxProperties(Properties).ShowDescriptions; - if IsInplace then - R := TextRect - else - R := ClientRect; - if Assigned(Images) then - begin - ImageRect := cxRectInflate(ClientRect, -cxTextOffset, 0); - if IsInplace then - ATextOffset := 2 * cxTextOffset - else - ATextOffset := cxTextOffset; - with ImageRect do - begin - if cxRectWidth(ImageRect) > Images.Width then - begin - if ShowDescriptions then - if ImageAlign = iaLeft then - begin - Right := Left + Images.Width; - R.Left := Right + ATextOffset; - end - else - begin - Left := Right - Images.Width; - R.Right := Left - ATextOffset; - end - else - begin - Left := Left + (cxRectWidth(ImageRect) - Images.Width) div 2; - Right := Left + Images.Width; - end; - end - else - R.Left := R.Right; - if cxRectHeight(ImageRect) > Images.Height then - begin - Top := Top + (cxRectHeight(ImageRect) - Images.Height) div 2; - Bottom := Top + Images.Height; - end; - end; - end; - - if not IsInplace then - begin - ClientRect := R; - InflateRect(R, -cxTextOffset, -1); - DrawSelectionBar := False; - end; - TextRect := R; - if not ShowDescriptions then - Text := ''; - end; -end; - -procedure TcxImageComboBoxViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -var - AText: string; - ACaption: TCaption; - AImageIndex: TImageIndex; -begin - PrepareSelection(AViewInfo); - Properties.GetImageComboBoxDisplayValue(AEditValue, ACaption, AImageIndex); - TcxImageComboBoxViewInfo(AViewInfo).ImageIndex := AImageIndex; - AText := ACaption; - DoOnGetDisplayText(AText); - TcxImageComboBoxViewInfo(AViewInfo).Text := AText; -end; - -procedure TcxImageComboBoxViewData.DisplayValueToDrawValue( - const ADisplayValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -var - ACurrentKey: TcxEditValue; - AItem: TcxImageComboBoxItem; - ACaption: TCaption; - AImageIndex: TImageIndex; -begin - if Edit = nil then - Exit; - ACurrentKey := TcxCustomImageComboBox(Edit).ILookupData.CurrentKey; - if ACurrentKey = -1 then - AItem := Properties.FindItemByValue(Edit.EditValue) - else - AItem := Properties.Items[ACurrentKey]; - Properties.InternalGetImageComboBoxDisplayValue(AItem, ACaption, AImageIndex); - TcxImageComboBoxViewInfo(AViewInfo).Text := ACaption; - TcxImageComboBoxViewInfo(AViewInfo).ImageIndex := AImageIndex; -end; - -function TcxImageComboBoxViewData.InternalEditValueToDisplayText( - AEditValue: TcxEditValue): string; -var - AIndex: TImageIndex; - ACaption: TCaption; -begin - Properties.GetImageComboBoxDisplayValue(AEditValue, - ACaption, AIndex); - Result := ACaption; -end; - -function TcxImageComboBoxViewData.InternalGetEditConstantPartSize( - ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo): TSize; -begin - Result := inherited InternalGetEditConstantPartSize(ACanvas, AIsInplace, - AEditSizeProperties, MinContentSize, AViewInfo); - with TcxCustomImageComboBoxProperties(Properties) do - begin - if Assigned(Images) then - begin - if Images.Height > MinContentSize.cy then - MinContentSize.cy := Images.Height; - Result.cx := Result.cx + Images.Width + 5; - end - else - Result.cx := Result.cx + 1; - end; -end; - -function TcxImageComboBoxViewData.IsComboBoxStyle: Boolean; -begin - Result := IsCompositionEnabled; -end; - -function TcxImageComboBoxViewData.GetProperties: TcxCustomImageComboBoxProperties; -begin - Result := TcxCustomImageComboBoxProperties(FProperties); -end; - -{ TcxImageComboBoxViewInfo } - -procedure TcxImageComboBoxViewInfo.Offset(DX, DY: Integer); -begin - inherited Offset(DX, DY); - OffsetRect(ImageRect, DX, DY); -end; - -procedure TcxImageComboBoxViewInfo.InternalPaint(ACanvas: TcxCanvas); -var - R: TRect; -begin - if not RectVisible(ACanvas.Handle, Bounds) then - Exit; - inherited InternalPaint(ACanvas); - if Assigned(Images) and (ImageIndex > -1) and (ImageIndex < Images.Count) then - begin - ACanvas.SaveClipRegion; - try - IntersectRect(R, ImageRect, BorderRect); - ACanvas.SetClipRegion(TcxRegion.Create(R), roIntersect); - - if Transparent or IsCompositionEnabled and NativeStyle then - Images.Draw(ACanvas.Canvas, ImageRect.Left, ImageRect.Top, - ImageIndex, Enabled) - else - cxEditUtils.DrawGlyph(ACanvas, - Images, ImageIndex, ImageRect, BackgroundColor, Enabled); - finally - ACanvas.RestoreClipRegion; - end; - end; -end; - -{ TcxCustomImageComboBoxProperties } - -constructor TcxCustomImageComboBoxProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FShowDescriptions := True; - FDefaultImageIndex := -1; - FImageAlign := iaLeft; - FItems := TcxImageComboBoxItems.Create(Self); - DropDownListStyle := lsFixedList; - FImagesChangeLink := TChangeLink.Create; - FImagesChangeLink.OnChange := ImagesChange; - FLargeImagesChangeLink := TChangeLink.Create; - FLargeImagesChangeLink.OnChange := LargeImagesChange; -end; - -destructor TcxCustomImageComboBoxProperties.Destroy; -begin - FImagesChangeLink.Free; - FLargeImagesChangeLink.Free; - FItems.Free; - inherited Destroy; -end; - -procedure TcxCustomImageComboBoxProperties.ImagesChange(Sender: TObject); -begin - Changed; -end; - -procedure TcxCustomImageComboBoxProperties.LargeImagesChange(Sender: TObject); -begin - Changed; -end; - -procedure TcxCustomImageComboBoxProperties.SetDefaultDescription( - const Value: string); -begin - if FDefaultDescription <> Value then - begin - FDefaultDescription := Value; - Changed; - end; -end; - -procedure TcxCustomImageComboBoxProperties.SetDefaultImageIndex( - const Value: TImageIndex); -begin - if FDefaultImageIndex <> Value then - begin - FDefaultImageIndex := Value; - Changed; - end; -end; - -procedure TcxCustomImageComboBoxProperties.SetImageAlign( - const Value: TcxImageAlign); -begin - if FImageAlign <> Value then - begin - FImageAlign := Value; - Changed; - end; -end; - -procedure TcxCustomImageComboBoxProperties.SetImages(Value: TCustomImageList); -begin - cxSetImageList(Value, FImages, FImagesChangeLink, FreeNotificator); -end; - -procedure TcxCustomImageComboBoxProperties.SetLargeImages(Value: TCustomImageList); -begin - cxSetImageList(Value, FLargeImages, FLargeImagesChangeLink, FreeNotificator); -end; - -procedure TcxCustomImageComboBoxProperties.SetItems( - const Value: TcxImageComboBoxItems); -begin - FItems.Assign(Value); - Changed; -end; - -procedure TcxCustomImageComboBoxProperties.SetMultiLineText( - const Value: Boolean); -begin - if FMultiLineText <> Value then - begin - FMultiLineText := Value; - Changed; - end; -end; - -procedure TcxCustomImageComboBoxProperties.SetShowDescriptions( - const Value: Boolean); -begin - if FShowDescriptions <> Value then - begin - FShowDescriptions := Value; - Changed; - end; -end; - -function TcxCustomImageComboBoxProperties.FindItemByText(const AText: string): - TcxImageComboBoxItem; -var - I: Integer; -begin - Result := nil; - if ShowDescriptions then - for I := 0 to Items.Count - 1 do - if InternalCompareString(Items[I].Description, AText, False) then - begin - Result := Items[I]; - Break; - end; -end; - -function TcxCustomImageComboBoxProperties.FindLookupText(const AText: string): Boolean; -begin - Result := FindItemByText(AText) <> nil; -end; - -procedure TcxCustomImageComboBoxProperties.FreeNotification(Sender: TComponent); -begin - inherited FreeNotification(Sender); - if Sender = FImages then - FImages := nil; - if Sender = FLargeImages then - FLargeImages := nil; -end; - -function TcxCustomImageComboBoxProperties.GetDisplayFormatOptions: TcxEditDisplayFormatOptions; -begin - Result := []; -end; - -class function TcxCustomImageComboBoxProperties.GetLookupDataClass: TcxInterfacedPersistentClass; -begin - Result := TcxImageComboBoxLookupData; -end; - -class function TcxCustomImageComboBoxProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxImageComboBoxViewData; -end; - -function TcxCustomImageComboBoxProperties.HasDisplayValue: Boolean; -begin - Result := False; -end; - -procedure TcxCustomImageComboBoxProperties.InternalGetImageComboBoxDisplayValue( - AItem: TcxImageComboBoxItem; out AText: TCaption; out AImageIndex: TImageIndex; - AAlwaysShowDescription: Boolean = False); -begin - if AAlwaysShowDescription or ShowDescriptions then - if AItem = nil then - AText := DefaultDescription - else - AText := AItem.Description - else - AText := ''; - if AItem = nil then - AImageIndex := DefaultImageIndex - else - AImageIndex := AItem.ImageIndex; -end; - -procedure TcxCustomImageComboBoxProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomImageComboBoxProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with TcxCustomImageComboBoxProperties(Source) do - begin - Self.DefaultDescription := DefaultDescription; - Self.DefaultImageIndex := DefaultImageIndex; - Self.ImageAlign := ImageAlign; - Self.Images := Images; - Self.Items.Assign(Items); - Self.LargeImages := LargeImages; - Self.MultiLineText := MultiLineText; - Self.ShowDescriptions := ShowDescriptions; - end; - finally - EndUpdate - end - end - else - inherited Assign(Source); -end; - -function TcxCustomImageComboBoxProperties.CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; -var - AImageIndex1, AImageIndex2: TImageIndex; - AText1, AText2: TCaption; -begin - GetImageComboBoxDisplayValue(AEditValue1, AText1, AImageIndex1); - GetImageComboBoxDisplayValue(AEditValue2, AText2, AImageIndex2); - Result := InternalCompareString(AText1, AText2, True) and ((Images = nil) or - (AImageIndex1 = AImageIndex2)); -end; - -function TcxCustomImageComboBoxProperties.FindItemByValue( - const AValue: Variant): TcxImageComboBoxItem; -var - I: Integer; -begin - Result := nil; - for I := 0 to Items.Count - 1 do - with Items[I] do - if VarEqualsExact(AValue, Value) then - begin - Result := Items[I]; - Break; - end; -end; - -class function TcxCustomImageComboBoxProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxImageComboBox; -end; - -function TcxCustomImageComboBoxProperties.GetDisplayText( - const AEditValue: TcxEditValue; AFullText: Boolean = False; - AIsInplace: Boolean = True): WideString; -var - ADisplayValue: TcxEditValue; -begin - PrepareDisplayValue(AEditValue, ADisplayValue, False); - Result := ADisplayValue; -end; - -function TcxCustomImageComboBoxProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - Result := evsValue; -end; - -procedure TcxCustomImageComboBoxProperties.GetImageComboBoxDisplayValue( - const AEditValue: TcxEditValue; out AText: TCaption; - out AImageIndex: TImageIndex); -begin - InternalGetImageComboBoxDisplayValue(FindItemByValue(AEditValue), AText, - AImageIndex); -end; - -function TcxCustomImageComboBoxProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := [esoEditing, esoFiltering, esoHorzAlignment, esoSorting, - esoSortingByDisplayText]; - if Buttons.Count > 0 then - Include(Result, esoHotTrack); - if ShowDescriptions then - Include(Result, esoIncSearch); -end; - -class function TcxCustomImageComboBoxProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxImageComboBoxViewInfo; -end; - -function TcxCustomImageComboBoxProperties.IsEditValueValid( - var AEditValue: TcxEditValue; AEditFocused: Boolean): Boolean; -begin - Result := True; -end; - -procedure TcxCustomImageComboBoxProperties.PrepareDisplayValue( - const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; - AEditFocused: Boolean); -var - AImageIndex: TImageIndex; - AText: TCaption; -begin - InternalGetImageComboBoxDisplayValue(FindItemByValue(AEditValue), AText, - AImageIndex, True); - DisplayValue := AText; -end; - -{ TcxCustomImageComboBox } - -function TcxCustomImageComboBox.GetProperties: TcxCustomImageComboBoxProperties; -begin - Result := TcxCustomImageComboBoxProperties(FProperties); -end; - -function TcxCustomImageComboBox.GetActiveProperties: TcxCustomImageComboBoxProperties; -begin - Result := TcxCustomImageComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxCustomImageComboBox.GetLookupData: TcxImageComboBoxLookupData; -begin - Result := TcxImageComboBoxLookupData(inherited LookupData); -end; - -procedure TcxCustomImageComboBox.SetProperties(const Value: TcxCustomImageComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -function TcxCustomImageComboBox.IsValidChar(AChar: Char): Boolean; -begin - Result := IsTextChar(AChar); -end; - -function TcxCustomImageComboBox.GetItemObject: TObject; -begin - Result := nil; -end; - -function TcxCustomImageComboBox.GetPopupWindowClientPreferredSize: TSize; -begin - Result := inherited GetPopupWindowClientPreferredSize; - if not ActiveProperties.MultiLineText then - begin - if (LookupData.ActiveControl <> nil) and (LookupData.ActiveControl is TcxImageComboBoxListBox) then - with TcxImageComboBoxListBox(LookupData.ActiveControl) do - Result.cx := Max(GetMaxItemWidth, Result.cx); - end - else - begin - Result.cx := 0; - if LookupData <> nil then - LookupData.List.RecreateWindow; - end; -end; - -function TcxCustomImageComboBox.InternalGetEditingValue: TcxEditValue; -begin - PrepareEditValue(Null, Result, True); -end; - -function TcxCustomImageComboBox.LookupKeyToEditValue(const AKey: TcxEditValue): TcxEditValue; -begin - if not VarEqualsExact(AKey, -1) then - Result := ActiveProperties.Items[AKey].Value - else - Result := Null; -end; - -procedure TcxCustomImageComboBox.SynchronizeDisplayValue; -var - APrevLookupKey: TcxEditValue; -begin - SaveModified; - try - APrevLookupKey := ILookupData.CurrentKey; - LockClick(True); - try - ILookupData.TextChanged; - finally - LockClick(False); - if (*ModifiedAfterEnter and *)not VarEqualsExact(APrevLookupKey, ILookupData.CurrentKey) then - DoClick; - end; - finally - RestoreModified; - ResetOnNewDisplayValue; - UpdateDrawValue; - end; -end; - -procedure TcxCustomImageComboBox.UpdateDrawValue; -begin - inherited UpdateDrawValue; - SetInternalDisplayValue(ViewInfo.Text); -end; - -class function TcxCustomImageComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomImageComboBoxProperties; -end; - -procedure TcxCustomImageComboBox.PrepareEditValue( - const ADisplayValue: TcxEditValue; out EditValue: TcxEditValue; - AEditFocused: Boolean); -begin - if VarEqualsExact(LookupData.CurrentKey, -1) then - EditValue := Null - else - EditValue := ActiveProperties.Items[LookupData.CurrentKey].Value; -end; - -{ TcxImageComboBox } - -class function TcxImageComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxImageComboBoxProperties; -end; - -function TcxImageComboBox.GetActiveProperties: TcxImageComboBoxProperties; -begin - Result := TcxImageComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxImageComboBox.GetProperties: TcxImageComboBoxProperties; -begin - Result := TcxImageComboBoxProperties(FProperties); -end; - -procedure TcxImageComboBox.SetProperties(Value: TcxImageComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterImageComboBoxHelper } - -class function TcxFilterImageComboBoxHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxImageComboBox; -end; - -class function TcxFilterImageComboBoxHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoBlanks, fcoNonBlanks]; - if AExtendedSet then - Result := Result + [fcoInList, fcoNotInList]; -end; - -class procedure TcxFilterImageComboBoxHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - TcxImageComboBoxProperties(AProperties).DropDownListStyle := lsFixedList; - TcxImageComboBoxProperties(AProperties).ImmediateDropDown := True; - TcxImageComboBoxProperties(AProperties).ShowDescriptions := True; -end; - -initialization - GetRegisteredEditProperties.Register(TcxImageComboBoxProperties, scxSEditRepositoryImageComboBoxItem); - FilterEditsController.Register(TcxImageComboBoxProperties, TcxFilterImageComboBoxHelper); - -finalization - FilterEditsController.Unregister(TcxImageComboBoxProperties, TcxFilterImageComboBoxHelper); - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxInplaceContainer.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxInplaceContainer.pas deleted file mode 100644 index 008c44bb..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxInplaceContainer.pas +++ /dev/null @@ -1,7408 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Common Editing Library } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE COMMONEDITINGLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxInplaceContainer; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils, - Windows, Messages, -{$IFDEF DELPHI6} - Variants, Types, -{$ENDIF} - Forms, Controls, StdCtrls, Graphics, cxVariants, cxClasses, - cxControls, cxGraphics, cxStyles, cxContainer, cxEdit, cxTextEdit, cxData, - cxCustomData, cxDataUtils, cxDataStorage, cxLookAndFeels, cxLookAndFeelPainters, - cxEditDataRegisteredRepositoryItems, cxGeometry, cxLibraryConsts; - -const - ecs_Content = 0; - ecs_Background = 1; - ecs_Inactive = 2; - ecs_Selection = 3; - - ecs_EditContainerStylesMaxIndex = ecs_Content; - ecs_EditingStylesMaxIndex = ecs_Selection; - -// predefined hit codes - echc_Empty = 0; - echc_IsMouseEvent = 1; - -// viewinfo states - cvis_IsDirty = 1; - cvis_StyleInvalid = 2; - - cxSizingMarkWidth = 1; - cxScrollWidthDragInterval = 50; - -type - TcxDragSizingDirection = (dsdHorz, dsdVert); - - TcxGetEditPropertiesEvent = procedure(Sender: TObject; AData: Pointer; - var AEditProperties: TcxCustomEditProperties) of object; - TcxOnGetContentStyleEvent = procedure(Sender: TObject; AData: Pointer; - out AStyle: TcxStyle) of object; - - TcxInplaceEditContainerClass = class of TcxCustomInplaceEditContainer; - TcxCustomInplaceEditContainer = class; - TcxItemDataBindingClass = class of TcxCustomItemDataBinding; - - TcxCustomControlDragAndDropObjectClass = class of TcxCustomControlDragAndDropObject; - - TcxEditingController = class; - TcxEditingControllerClass = class of TcxEditingController; - - TcxCustomEditStyleClass = class of TcxCustomEditStyle; - - TcxCustomControlControllerClass = class of TcxCustomControlController; - TcxCustomControlController = class; - TcxControlDataController = class; - TcxCustomControlPainter = class; - TcxEditingControl = class; - - TcxHotTrackControllerClass = class of TcxHotTrackController; - TcxCustomHitTestController = class; - - TcxEditItemShowEditButtons = (eisbDefault, eisbNever, eisbAlways); - TcxEditingControlEditShowButtons = (ecsbAlways, ecsbFocused, ecsbNever); - - TcxCustomControlViewInfo = class; - - TcxCustomControlStyles = class; - - TcxCustomViewInfoItem = class; - TcxCustomCellViewInfoClass = class of TcxCustomViewInfoItem; - - TcxEditCellViewInfo = class; - TcxEditCellViewInfoClass = class of TcxEditCellViewInfo; - - TcxHitCode = type Int64; - - - { TcxContainerItemDefaultValuesProvider } - - TcxContainerItemDefaultValuesProvider = class(TcxCustomEditDefaultValuesProvider) - function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; override; - end; - - { TcxCustomItemDataBinding } - - TcxCustomItemDataBinding = class(TcxOwnedPersistent) - private - FDefaultValuesProvider: TcxCustomEditDefaultValuesProvider; - FData: Pointer; - function GetDataController: TcxCustomDataController; - function GetEditContainer: TcxCustomInplaceEditContainer; - protected - function DefaultRepositoryItem: TcxEditRepositoryItem; virtual; - function GetDefaultCaption: string; virtual; - function GetDefaultValuesProvider(AProperties: TcxCustomEditProperties): IcxEditDefaultValuesProvider; virtual; - function GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; virtual; - function GetValueTypeClass: TcxValueTypeClass; virtual; - procedure Init; virtual; - function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; - procedure ValueTypeClassChanged; virtual; - property DataController: TcxCustomDataController read GetDataController; - property DefaultValuesProvider: TcxCustomEditDefaultValuesProvider read FDefaultValuesProvider; - property EditContainer: TcxCustomInplaceEditContainer read GetEditContainer; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - property Data: Pointer read FData write FData; - end; - - { TcxItemDataBinding } - - TcxItemDataBinding = class(TcxCustomItemDataBinding) - private - FValueTypeClass: TcxValueTypeClass; - function GetValueType: string; - procedure SetValueType(const Value: string); - procedure SetValueTypeClass(Value: TcxValueTypeClass); - protected - function GetValueTypeClass: TcxValueTypeClass; override; - function IsValueTypeStored: Boolean; virtual; - public - procedure Assign(Source: TPersistent); override; - property ValueTypeClass: TcxValueTypeClass read GetValueTypeClass write SetValueTypeClass; - published - property ValueType: string read GetValueType write SetValueType stored IsValueTypeStored; - end; - - { TcxControlDataController } - - TcxControlDataController = class(TcxDataController) - private - function GetControl: TcxEditingControl; - protected - procedure UpdateControl(AInfo: TcxUpdateControlInfo); override; - public - function GetItem(Index: Integer): TObject; override; - function GetItemID(AItem: TObject): Integer; override; - function GetItemValueSource(AItemIndex: Integer): TcxDataEditValueSource; override; - procedure UpdateData; override; - procedure UpdateItemIndexes; override; - end; - - { TcxCustomEditContainerItemOptions } - - TcxCustomEditContainerItemOptionsClass = class of TcxCustomEditContainerItemOptions; - - TcxCustomEditContainerItemOptions = class(TcxOwnedPersistent) - private - FCustomizing: Boolean; - FEditing: Boolean; - FFiltering: Boolean; - FFocusing: Boolean; - FIncSearch: Boolean; - FMoving: Boolean; - FShowEditButtons: TcxEditItemShowEditButtons; - FSorting: Boolean; - FTabStop: Boolean; - function GetEditContainer: TcxCustomInplaceEditContainer; - procedure SetEditing(Value: Boolean); - procedure SetFiltering(Value: Boolean); - procedure SetFocusing(Value: Boolean); - procedure SetIncSearch(Value: Boolean); - procedure SetShowEditButtons(Value: TcxEditItemShowEditButtons); - protected - procedure Changed; virtual; - property EditContainer: TcxCustomInplaceEditContainer read GetEditContainer; - property Moving: Boolean read FMoving write FMoving default True; - property Customizing: Boolean read FCustomizing write FCustomizing default True; - property Sorting: Boolean read FSorting write FSorting default True; - property Editing: Boolean read FEditing write SetEditing default True; - property Filtering: Boolean read FFiltering write SetFiltering default True; - property Focusing: Boolean read FFocusing write SetFocusing default True; - property IncSearch: Boolean read FIncSearch write SetIncSearch default True; - property ShowEditButtons: TcxEditItemShowEditButtons read FShowEditButtons - write SetShowEditButtons default eisbDefault; - property TabStop: Boolean read FTabStop write FTabStop default True; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(AOwner: TPersistent); override; - end; - - { TcxControlOptionsView } - - TcxControlOptionsViewClass = class of TcxControlOptionsView; - - TcxControlOptionsView = class(TcxOwnedPersistent) - private - FCellAutoHeight: Boolean; - FCellEndEllipsis: Boolean; - FCellTextMaxLineCount: Integer; - FShowEditButtons: TcxEditingControlEditShowButtons; - function GetEditingControl: TcxEditingControl; - function GetScrollBars: TScrollStyle; - procedure SetCellAutoHeight(const Value: Boolean); - procedure SetCellEndEllipsis(const Value: Boolean); - procedure SetCellTextMaxLineCount(const Value: Integer); - procedure SetScrollBars(const Value: TScrollStyle); - procedure SetShowEditButtons(const Value: TcxEditingControlEditShowButtons); - protected - procedure Changed; virtual; - property EditingControl: TcxEditingControl read GetEditingControl; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - published - property CellAutoHeight: Boolean read FCellAutoHeight write SetCellAutoHeight default False; - property CellEndEllipsis: Boolean read FCellEndEllipsis write SetCellEndEllipsis default False; - property CellTextMaxLineCount: Integer read FCellTextMaxLineCount write SetCellTextMaxLineCount default 0; - property ScrollBars: TScrollStyle read GetScrollBars write SetScrollBars default ssBoth; - property ShowEditButtons: TcxEditingControlEditShowButtons read FShowEditButtons write SetShowEditButtons default ecsbNever; - end; - - { TcxControlOptionsData } - - TcxControlOptionsDataClass = class of TcxControlOptionsData; - - TcxControlOptionsData = class(TcxOwnedPersistent) - private - FCancelOnExit: Boolean; - FEditing: Boolean; - function GetEditingControl: TcxEditingControl; - procedure SetEditing(Value: Boolean); - protected - procedure Changed; virtual; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - property EditingControl: TcxEditingControl read GetEditingControl; - published - property CancelOnExit: Boolean read FCancelOnExit write FCancelOnExit default True; - property Editing: Boolean read FEditing write SetEditing default True; - end; - - { TcxControlOptionsBehavior } - - TcxControlOptionsBehaviorClass = class of TcxControlOptionsBehavior; - - TcxControlOptionsBehavior = class(TcxOwnedPersistent) - private - FAlwaysShowEditor: Boolean; - FCellHints: Boolean; - FDragDropText: Boolean; - FFocusCellOnCycle: Boolean; - FFocusFirstCellOnNewRecord: Boolean; - FGoToNextCellOnEnter: Boolean; - FGoToNextCellOnTab: Boolean; - FImmediateEditor: Boolean; - FIncSearch: Boolean; - FIncSearchItem: TcxCustomInplaceEditContainer; - function GetEditingControl: TcxEditingControl; - procedure SetAlwaysShowEditor(Value: Boolean); - procedure SetCellHints(Value: Boolean); - procedure SetFocusCellOnCycle(Value: Boolean); - procedure SetFocusFirstCellOnNewRecord(Value: Boolean); - procedure SetGoToNextCellOnEnter(Value: Boolean); - procedure SetGoToNextCellOnTab(Value: Boolean); - procedure SetImmediateEditor(Value: Boolean); - procedure SetIncSearch(Value: Boolean); - procedure SetIncSearchItem(Value: TcxCustomInplaceEditContainer); - protected - procedure Changed; virtual; - property DragDropText: Boolean read FDragDropText write FDragDropText default False; - property EditingControl: TcxEditingControl read GetEditingControl; - property FocusCellOnCycle: Boolean read FFocusCellOnCycle write SetFocusCellOnCycle default False; - property FocusFirstCellOnNewRecord: Boolean read FFocusFirstCellOnNewRecord write SetFocusFirstCellOnNewRecord default False; - property IncSearch: Boolean read FIncSearch write SetIncSearch default False; - property IncSearchItem: TcxCustomInplaceEditContainer read FIncSearchItem write SetIncSearchItem; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - published - property AlwaysShowEditor: Boolean read FAlwaysShowEditor write SetAlwaysShowEditor default False; - property CellHints: Boolean read FCellHints write SetCellHints default False; - property GoToNextCellOnEnter: Boolean read FGoToNextCellOnEnter write SetGoToNextCellOnEnter default False; - property GoToNextCellOnTab: Boolean read FGoToNextCellOnTab write SetGoToNextCellOnTab default False; - property ImmediateEditor: Boolean read FImmediateEditor write SetImmediateEditor default True; - end; - - { TcxEditContainerStyles } - - TcxEditContainerStylesClass = class of TcxEditContainerStyles; - - TcxEditContainerStyles = class(TcxStyles) - private - function GetContainer: TcxCustomInplaceEditContainer; - function GetControl: TcxEditingControl; - function GetControlStyles: TcxCustomControlStyles; - protected - procedure Changed(AIndex: Integer); override; - public - procedure Assign(Source: TPersistent); override; - property Container: TcxCustomInplaceEditContainer read GetContainer; - property Control: TcxEditingControl read GetControl; - property ControlStyles: TcxCustomControlStyles read GetControlStyles; - published - property Content: TcxStyle index ecs_Content read GetValue write SetValue; - end; - - { TcxCustomInplaceEditContainer } - - IcxEditorPropertiesContainer = interface - ['{9F0CD5D9-A3D1-44B7-82DC-CAEAC1367C5D}'] - function GetProperties: TcxCustomEditProperties; - function GetPropertiesClass: TcxCustomEditPropertiesClass; - procedure SetPropertiesClass(Value: TcxCustomEditPropertiesClass); - end; - - TcxCustomInplaceEditContainer = class(TComponent, IUnknown, IcxEditRepositoryItemListener, IcxEditorPropertiesContainer) - private - FData: Pointer; - FEditData: TcxCustomEditData; - FEditingControl: TcxEditingControl; - FEditViewData: TcxCustomEditViewData; - FEditValueSource: TcxDataEditValueSource; - FItemIndex: Integer; - FOptions: TcxCustomEditContainerItemOptions; - FProperties: TcxCustomEditProperties; - FPropertiesClass: TcxCustomEditPropertiesClass; - FPropertiesEvents: TNotifyEvent; - FPropertiesValue: TcxCustomEditProperties; - FRepositoryItem: TcxEditRepositoryItem; - FStyles: TcxEditContainerStyles; - FOnGetEditProperties: TcxGetEditPropertiesEvent; - FOnGetEditingProperties: TcxGetEditPropertiesEvent; - procedure IcxEditRepositoryItemListener.PropertiesChanged = RepositoryItemPropertiesChanged; - procedure IcxEditRepositoryItemListener.ItemRemoved = RepositoryItemRemoved; - function GetDataController: TcxCustomDataController; - function GetFocused: Boolean; - function GetFocusedCellViewInfo: TcxEditCellViewInfo; - function GetIncSearching: Boolean; - function GetProperties: TcxCustomEditProperties; - function GetPropertiesClass: TcxCustomEditPropertiesClass; - function GetPropertiesClassName: string; - function GetPropertiesValue: TcxCustomEditProperties; - procedure SetDataBinding(Value: TcxCustomItemDataBinding); - procedure SetFocused(Value: Boolean); - procedure SetOptions(Value: TcxCustomEditContainerItemOptions); - procedure SetProperties(Value: TcxCustomEditProperties); - procedure SetPropertiesClass(Value: TcxCustomEditPropertiesClass); - procedure SetPropertiesClassName(const Value: string); - procedure SetRepositoryItem(Value: TcxEditRepositoryItem); - procedure SetStyles(Value: TcxEditContainerStyles); - procedure CreateProperties; - procedure DestroyProperties; - procedure RecreateProperties; - procedure RepositoryItemPropertiesChanged(Sender: TcxEditRepositoryItem); - procedure RepositoryItemRemoved(Sender: TcxEditRepositoryItem); - protected - FDataBinding: TcxCustomItemDataBinding; - procedure CalculateEditViewInfo(const AValue: Variant; - AEditViewInfo: TcxEditCellViewInfo; const APoint: TPoint); virtual; - function CanEdit: Boolean; virtual; - function CanFocus: Boolean; virtual; - procedure CancelIncSearching; - function CanInitEditing: Boolean; virtual; - function CanIncSearch: Boolean; virtual; - function CanTabStop: Boolean; virtual; - procedure Changed; virtual; - function CreateEditViewData(AProperties: TcxCustomEditProperties; AEditStyleData: Pointer): TcxCustomEditViewData; virtual; - procedure DataChanged; virtual; - procedure DoGetDisplayText(ARecordIndex: Integer; var AText: string); virtual; - function DoGetEditProperties(AData: Pointer): TcxCustomEditProperties; virtual; - procedure DoGetEditingProperties(AData: Pointer; var AProperties: TcxCustomEditProperties); virtual; - function DoGetPropertiesFromEvent(AEvent: TcxGetEditPropertiesEvent; AData: Pointer; - AProperties: TcxCustomEditProperties): TcxCustomEditProperties; virtual; - procedure DoOnPropertiesChanged(Sender: TObject); virtual; - procedure EditViewDataGetDisplayTextHandler(Sender: TcxCustomEditViewData; var AText: string); virtual; - function GetControlCanvas: TcxCanvas; virtual; - function GetController: TcxCustomControlController; virtual; - function GetCurrentValue: Variant; virtual; - function GetDataBindingClass: TcxItemDataBindingClass; virtual; - function GetDefaultCaption: string; virtual; - function GetDefaultEditProperties: TcxCustomEditProperties; virtual; - function GetDisplayValue(AProperties: TcxCustomEditProperties; ARecordIndex: Integer): Variant; virtual; - function GetEditDataValueTypeClass: TcxValueTypeClass; virtual; // todo: - function GetEditDefaultHeight(AFont: TFont): Integer; virtual; - function GetEditHeight(AEditViewInfo: TcxEditCellViewInfo): Integer; virtual; - function GetEditing: Boolean; virtual; - function GetEditStyle(AData: Pointer): TcxCustomEditStyle; virtual; - function GetEditValue: Variant; virtual; - function GetEditWidth(AEditViewInfo: TcxEditCellViewInfo): Integer; virtual; - function GetOptionsClass: TcxCustomEditContainerItemOptionsClass; virtual; - function GetStylesClass: TcxEditContainerStylesClass; virtual; - function GetValue(ARecordIndex: Integer): Variant; virtual; - function GetValueCount: Integer; virtual; - function HasDataTextHandler: Boolean; virtual; - procedure InitEditViewInfo(AEditViewInfo: TcxEditCellViewInfo); virtual; - procedure InitProperties(AProperties: TcxCustomEditProperties); virtual; - procedure InternalPropertiesChanged; - function IsDestroying: Boolean; - function IsEditPartVisible: Boolean; - procedure PropertiesChanged; virtual; - procedure SetCurrentValue(const Value: Variant); virtual; - procedure SetEditing(Value: Boolean); virtual; - procedure SetEditingControl(Value: TcxEditingControl); virtual; - procedure SetEditValue(const Value: Variant); virtual; - procedure SetValue(ARecordIndex: Integer; const Value: Variant); virtual; - property Controller: TcxCustomControlController read GetController; - property DataBinding: TcxCustomItemDataBinding read FDataBinding write SetDataBinding; - property DataController: TcxCustomDataController read GetDataController; // todo: should be protected - property IncSearching: Boolean read GetIncSearching; - property EditData: TcxCustomEditData read FEditData; - property Editing: Boolean read GetEditing write SetEditing; - property EditingControl: TcxEditingControl read FEditingControl write SetEditingControl; - property EditValue: Variant read GetEditValue write SetEditValue; - property EditValueSource: TcxDataEditValueSource read FEditValueSource; - property EditViewData: TcxCustomEditViewData read FEditViewData; - property Focused: Boolean read GetFocused write SetFocused; - property FocusedCellViewInfo: TcxEditCellViewInfo read GetFocusedCellViewInfo; - property Options: TcxCustomEditContainerItemOptions read FOptions write SetOptions; - property PropertiesValue: TcxCustomEditProperties read GetPropertiesValue; - property Value: Variant read GetCurrentValue write SetCurrentValue; - property ValueCount: Integer read GetValueCount; - property Values[ARecordIndex: Integer]: Variant read GetValue write SetValue; - property OnGetEditProperties: TcxGetEditPropertiesEvent read FOnGetEditProperties write FOnGetEditProperties; - property OnGetEditingProperties: TcxGetEditPropertiesEvent read FOnGetEditingProperties write FOnGetEditingProperties; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - property Data: Pointer read FData write FData; - property ItemIndex: Integer read FItemIndex; - property PropertiesClass: TcxCustomEditPropertiesClass read FPropertiesClass write SetPropertiesClass; - published - property PropertiesClassName: string read GetPropertiesClassName write SetPropertiesClassName; - property Properties: TcxCustomEditProperties read GetProperties write SetProperties; - property PropertiesEvents: TNotifyEvent read FPropertiesEvents write FPropertiesEvents; - property RepositoryItem: TcxEditRepositoryItem read FRepositoryItem write SetRepositoryItem; - property Styles: TcxEditContainerStyles read FStyles write SetStyles; - end; - - { IcxHotTrackElement } - - IcxHotTrackElement = interface - ['{E7171E58-276E-499B-9DDF-298D850883C9}'] - function GetOrigin: TPoint; - function IsNeedHint(ACanvas: TcxCanvas; const P: TPoint; - out AText: TCaption; - out AIsMultiLine: Boolean; - out ATextRect: TRect; var IsNeedOffsetHint: Boolean): Boolean; - procedure UpdateHotTrackState(const APoint: TPoint); - end; - - { TcxHotTrackController } - - TcxHotTrackController = class - private - FControl: TcxEditingControl; - FShowHint: Boolean; - procedure InternalHideHint(Sender: TObject); - procedure InternalShowHint(Sender: TObject); - procedure ResetTimer; - protected - Hint: TCaption; - HintIsMultiLine: Boolean; - HintTimer: TcxTimer; - HintRect: TRect; - HintVisible: Boolean; - HintElement: TObject; - HintWindow: THintWindow; - PrevHitPoint: TPoint; - PrevElement: TObject; - function CanShowHint: Boolean; - procedure CheckDestroyingElement(AElement: TObject); - procedure CheckHintClass; - procedure DoHideHint; virtual; - procedure DoShowHint; virtual; - function HintNeeded: Boolean; - procedure InitTimer(AInterval: Integer; AEnabled: Boolean; const AHandler: TNotifyEvent); - public - constructor Create(AControl: TcxEditingControl); virtual; - destructor Destroy; override; - procedure CancelHint; - procedure Clear; - procedure SetHotElement(AElement: TObject; const APoint: TPoint); - property Control: TcxEditingControl read FControl write FControl; - property ShowHint: Boolean read FShowHint write FShowHint; - end; - - { IcxDragSizing } - - IcxDragSizing = interface - ['{5EA02F4E-E367-4E4D-A26D-000B5E5CD434}'] - function CanSizing(ADirection: TcxDragSizingDirection): Boolean; - function GetSizingBoundsRect(ADirection: TcxDragSizingDirection): TRect; - function GetSizingIncrement(ADirection: TcxDragSizingDirection): Integer; - function IsDynamicUpdate: Boolean; - procedure SetSizeDelta(ADirection: TcxDragSizingDirection; ADelta: Integer); - end; - - { TcxSizingDragAndDropObject } - - TcxSizingDragAndDropObject = class(TcxDragAndDropObject) - private - FDelta: Integer; - FDirection: TcxDragSizingDirection; - FDragBounds: TRect; - FDragPos: TPoint; - FDynamicUpdate: Boolean; - FStartPos: TPoint; - FSizeDelta: Integer; - function GetCanvas: TcxCanvas; - function GetController: TcxCustomControlController; - function GetDragCoord(APoint: TPoint): Integer; - function GetDragItem: TObject; - function GetDragSizing: IcxDragSizing; - function GetIsSizingKind(Index: Integer): Boolean; - protected - procedure BeginDragAndDrop; override; - procedure DirtyChanged; override; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - procedure EndDragAndDrop(Accepted: Boolean); override; - function GetDragAndDropCursor(Accepted: Boolean): TCursor; override; - function GetDragPos(const APoint: TPoint): TPoint; virtual; - function GetImmediateStart: Boolean; override; - function GetSizingMarkBounds: TRect; virtual; - property StartPos: TPoint read FStartPos; - property Controller: TcxCustomControlController read GetController; - property Delta: Integer read FDelta; - property DragCoord[Point: TPoint]: Integer read GetDragCoord; - property DragPos: TPoint read FDragPos; - property DragSizing: IcxDragSizing read GetDragSizing; - property Direction: TcxDragSizingDirection read FDirection; - public - property Canvas: TcxCanvas read GetCanvas; - property DragBounds: TRect read FDragBounds; - property DragItem: TObject read GetDragItem; - property DynamicUpdate: Boolean read FDynamicUpdate; - property IsHorzSizing: Boolean index 0 read GetIsSizingKind; - property IsVertSizing: Boolean index 1 read GetIsSizingKind; - property SizeDelta: Integer read FSizeDelta; - end; - - { TcxAutoScrollingObject } - - TcxAutoScrollingObject = class - private - FArea: TRect; - FCode: TScrollCode; - FIncrement: Integer; - FKind: TScrollBarKind; - FOwner: TObject; - FTimer: TcxTimer; - protected - procedure DoScrollInspectingControl; virtual; - function GetControl: TcxEditingControl; virtual; - function GetScrollBar(AKind: TScrollBarKind): TcxControlScrollBar; virtual; - procedure TimerHandler(Sender: TObject); virtual; - public - constructor Create(AOwner: TObject); virtual; - destructor Destroy; override; - function Check(APos: TPoint): Boolean; - procedure SetParams(const Area: TRect; AKind: TScrollBarKind; - ACode: TScrollCode; AIncrement: Integer); - procedure Stop; - property Code: TScrollCode read FCode; - property Control: TcxEditingControl read GetControl; - property Increment: Integer read FIncrement; - property Kind: TScrollBarKind read FKind; - property Owner: TObject read FOwner; - property Timer: TcxTimer read FTimer; - end; - - { TcxDragDropAutoScrollingObject } - - TcxDragDropObjectAutoScrollingObject = class(TcxAutoScrollingObject) - protected - function GetControl: TcxEditingControl; override; - end; - - { TcxControllerAutoScrollingObject } - - TcxControllerAutoScrollingObject = class(TcxAutoScrollingObject) - private - FBoundsMode: Boolean; - FCheckHorz: Boolean; - FCheckVert: Boolean; - FDirections: TcxNeighbors; - protected - procedure DoScrollInspectingControl; override; - function GetControl: TcxEditingControl; override; - public - function CheckBounds(APos: TPoint): Boolean; - procedure SetBoundsParams(const AClientArea: TRect; - ACheckHorz, ACheckVert: Boolean; AIncrement: Integer); - end; - - TcxAutoScrollingObjectClass = class of TcxAutoScrollingObject; - - { TcxBaseDragAndDropObject } - - TcxBaseDragAndDropObject = class(TcxDragAndDropObject) - private - function GetEditingControl: TcxEditingControl; - protected - function GetDragAndDropCursor(Accepted: Boolean): TCursor; override; - property EditingControl: TcxEditingControl read GetEditingControl; - end; - - { TcxDragImage } - - TcxDragImage = class(cxControls.TcxDragImage) - public - property Image; - property WindowCanvas; - end; - - { TcxPlaceArrows } - - TcxPlaceArrows = class(TcxDragImage) - private - FBorderColor: TColor; - FColor: TColor; - FPrevRect: TRect; - FPrevSide: TcxBorder; - FWindowRegion: HRGN; - procedure SetWindowRegion(ARegion: HRGN); - protected - function CreateArrowsRgns(const ARect: TRect; ASide: TcxBorder): HRGN; - - property BorderColor: TColor read FBorderColor; - property Color: TColor read FColor; - property WindowRegion: HRGN read FWindowRegion write SetWindowRegion; - public - constructor CreateArrows(AColor: TColor; ABorderColor: TColor = clDefault); virtual; - function MoveTo(ARect: TRect; ASide: TcxBorder): Boolean; - end; - - { TcxCustomControlDragAndDropObject } - - TcxCustomControlDragAndDropObject = class(TcxBaseDragAndDropObject) - private - FAutoScrollObjects: TList; - FCanDrop: Boolean; - FDragImage: TcxDragImage; - FHotSpot: TPoint; - FOrgOffset: TPoint; - FPictureSize: TRect; - function CheckScrolling(const P: TPoint): Boolean; - function GetAutoScrollObject(Index: Integer): TcxAutoScrollingObject; - function GetAutoScrollObjectCount: Integer; - function GetCanvas: TcxCanvas; - function GetHitTestController: TcxCustomHitTestController; - protected - procedure AddAutoScrollingObject(const ARect: TRect; AKind: TScrollBarKind; ACode: TScrollCode); - procedure BeginDragAndDrop; override; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - procedure DrawDragImage; virtual; - procedure DrawImage(const APoint: TPoint); - procedure EndDragAndDrop(Accepted: Boolean); override; - function GetAcceptedRect: TRect; virtual; - function GetAutoScrollingObjectClass: TcxAutoScrollingObjectClass; virtual; - function GetDisplayRect: TRect; virtual; - function GetDragAndDropCursor(Accepted: Boolean): TCursor; override; - function GetHorzScrollInc: Integer; virtual; - function GetVertScrollInc: Integer; virtual; - procedure OwnerImageChanged; virtual; - procedure OwnerImageChanging; virtual; - procedure Paint; virtual; - procedure StopScrolling; - // screen image working - property AcceptedRect: TRect read GetAcceptedRect; - property AutoScrollObjectCount: Integer read GetAutoScrollObjectCount; - property AutoScrollObjects[Index: Integer]: TcxAutoScrollingObject read GetAutoScrollObject; - property Canvas: TcxCanvas read GetCanvas; - property CanDrop: Boolean read FCanDrop; - property DisplayRect: TRect read GetDisplayRect; - property DragImage: TcxDragImage read FDragImage; - property HitTestController: TcxCustomHitTestController read GetHitTestController; - property HotSpot: TPoint read FHotSpot; - property OrgOffset: TPoint read FOrgOffset write FOrgOffset; - property PictureSize: TRect read FPictureSize; - public - constructor Create(AControl: TcxControl); override; - destructor Destroy; override; - end; - - { TcxDragImageHelper } - - TcxDragImageHelperClass = class of TcxDragImageHelper; - - TcxDragImageHelper = class - private - FDragControl: TcxEditingControl; - FDragImageVisible: Boolean; - FDragPos: TPoint; - function GetImageRect: TRect; - procedure SetDragImageVisible(Value: Boolean); - protected - DragImage: TcxDragImage; - HotSpot: TPoint; - DragPictureBounds: TRect; - MousePos: TPoint; - procedure DragAndDrop(const P: TPoint); virtual; - function GetDisplayRect: TRect; virtual; - procedure InitDragImage; virtual; - // working with screen - procedure DrawImage(const APoint: TPoint); virtual; - public - constructor Create(AControl: TcxEditingControl; ADragPos: TPoint); virtual; - destructor Destroy; override; - procedure Hide; virtual; - procedure Show; virtual; - - property DragControl: TcxEditingControl read FDragControl; - property DragImageRect: TRect read GetImageRect; - property DragImageVisible: Boolean read FDragImageVisible write SetDragImageVisible; - end; - - { TcxCustomHitTestController } - - TcxHitTestControllerClass = class of TcxCustomHitTestController; - - TcxCustomHitTestController = class - private - FController: TcxCustomControlController; - FHitPoint: TPoint; - FHitTestItem: TObject; - FShift: TShiftState; - function GetControl: TcxEditingControl; - function GetCoordinate(AIndex: Integer): Integer; - function GetEditCellViewInfo: TcxEditCellViewInfo; - function GetHasCode(Mask: TcxHitCode): Boolean; - function GetHotTrackController: TcxHotTrackController; - function GetIsItemEditCell: Boolean; - function GetIsMouseEvent: Boolean; - function GetViewInfo: TcxCustomControlViewInfo; - procedure SetCoordinate(AIndex: Integer; Value: Integer); - procedure SetHasCode(ACode: TcxHitCode; AValue: Boolean); - procedure SetHitPoint(const APoint: TPoint); - procedure SetHitTestItem(AItem: TObject); - procedure SetIsMouseEvent(Value: Boolean); - protected - FHitState: TcxHitCode; - function AllowDesignMouseEvents(X, Y: Integer; AShift: TShiftState): Boolean; virtual; - function CanShowHint(AItem: TObject): Boolean; virtual; - procedure ClearState; - procedure DestroyingItem(AItem: TObject); - procedure DoCalculate; virtual; - function GetCurrentCursor: TCursor; virtual; - procedure HitCodeChanged(APrevCode: Integer); virtual; - procedure HitTestItemChanged(APrevHitTestItem: TObject); virtual; - procedure RecalculateOnMouseEvent(X, Y: Integer; AShift: TShiftState); - - property Control: TcxEditingControl read GetControl; - property Controller: TcxCustomControlController read FController; - property HotTrackController: TcxHotTrackController read GetHotTrackController; - property IsMouseEvent: Boolean read GetIsMouseEvent write SetIsMouseEvent; - property Shift: TShiftState read FShift; - property ViewInfo: TcxCustomControlViewInfo read GetViewInfo; - public - constructor Create(AOwner: TcxCustomControlController); virtual; - destructor Destroy; override; - procedure ReCalculate; overload; - procedure ReCalculate(const APoint: TPoint); overload; - property EditCellViewInfo: TcxEditCellViewInfo read GetEditCellViewInfo; - property HitPoint: TPoint read FHitPoint write SetHitPoint; - property HitX: Integer index 0 read GetCoordinate write SetCoordinate; - property HitY: Integer index 1 read GetCoordinate write SetCoordinate; - property HitState: TcxHitCode read FHitState; - property HitCode[ACode: TcxHitCode]: Boolean read GetHasCode write SetHasCode; - property HitTestItem: TObject read FHitTestItem write SetHitTestItem; - property IsItemEditCell: Boolean read GetIsItemEditCell; - end; - - { TcxCustomCellNavigator } - - TcxCustomCellNavigator = class - private - FController: TcxCustomControlController; - FEatKeyPress: Boolean; - FDownOnEnter: Boolean; - FDownOnTab: Boolean; - function GetDataController: TcxCustomDataController; - protected - RowCount: Integer; - function SelectCell(AForward, ANextRow: Boolean; - var ARowIndex, ACellIndex: Integer): TcxCustomInplaceEditContainer; virtual; - - procedure CalcNextRow(AForward: Boolean; var ARowIndex, ACellIndex: Integer); virtual; - function GetCellContainer(ARowIndex, ACellIndex: Integer): TcxCustomInplaceEditContainer; virtual; - function GetCount(ARowIndex: Integer): Integer; virtual; - procedure Init(var ARowIndex, ACellIndex, ARowCount: Integer); virtual; - function MayFocusedEmptyRow(ARowIndex: Integer): Boolean; virtual; - procedure SetFocusCell(ARowIndex, ACellIndex: Integer; AShift: TShiftState); virtual; - procedure DoKeyPress(var Key: Char); virtual; - property DownOnEnter: Boolean read FDownOnEnter write FDownOnEnter; - property DownOnTab: Boolean read FDownOnTab write FDownOnTab; - public - constructor Create(AController: TcxCustomControlController); virtual; - procedure FocusNextCell(AForward, ANextRow: Boolean; AShift: TShiftState = []); virtual; - procedure KeyDown(var Key: Word; Shift: TShiftState); virtual; - procedure KeyPress(var Key: Char); virtual; - procedure Refresh; virtual; - property Count[ARowIndex: Integer]: Integer read GetCount; - property Controller: TcxCustomControlController read FController; - property DataController: TcxCustomDataController read GetDataController; - property EatKeyPress: Boolean read FEatKeyPress write FEatKeyPress; - end; - - TcxCustomCellNavigatorClass = class of TcxCustomCellNavigator; - - { TcxDesignSelectionHelper } - - TcxCustomDesignSelectionHelper = class - private - FControl: TcxEditingControl; - function GetController: TcxCustomControlController; - protected - property Control: TcxEditingControl read FControl; - property Controller: TcxCustomControlController read GetController; - public - constructor Create(AControl: TcxEditingControl); virtual; - function IsObjectSelected(AObject: TPersistent): Boolean; virtual; abstract; - procedure Select(AObject: TPersistent; AShift: TShiftState); virtual; abstract; - procedure SetSelection(AList: TList); virtual; abstract; - procedure UnselectObject(AObject: TPersistent); virtual; abstract; - end; - - TcxCustomDesignSelectionHelperClass = class of TcxCustomDesignSelectionHelper; - - { TcxCustomControlController } - - TcxCustomControlController = class - private - FAllowCheckEdit: Boolean; - FBlockRecordKeyboardHandling: Boolean; - FCheckEditNeeded: Boolean; - FDisableCellsRefresh: Boolean; - FDragCancel: Boolean; - FDragItem: TObject; - FEatKeyPress: Boolean; - FEditingBeforeDrag: Boolean; - FEditingController: TcxEditingController; - FEditingControl: TcxEditingControl; - FFocused: Boolean; - FFocusedItem: TcxCustomInplaceEditContainer; - FHitTestController: TcxCustomHitTestController; - FHotTrackController: TcxHotTrackController; - FIsDblClick: Boolean; - FIsHandleTabStop: Boolean; - FLockShowHint: Boolean; - FNavigator: TcxCustomCellNavigator; - FWasFocusedBeforeClick: Boolean; - function GetDataController: TcxCustomDataController; - function GetDesignSelectionHelper: TcxCustomDesignSelectionHelper; - function GetEditingItem: TcxCustomInplaceEditContainer; - function GetIsEditing: Boolean; - function GetItemForIncSearching: TcxCustomInplaceEditContainer; - procedure SetEditingItem(Value: TcxCustomInplaceEditContainer); - procedure SetIncSearchingText(const Value: string); - protected - procedure MouseEnter; virtual; - procedure MouseLeave; virtual; - procedure DoCancelMode; virtual; - - procedure AfterPaint; virtual; - procedure BeforeEditKeyDown(var Key: Word; var Shift: TShiftState); virtual; - procedure BeforeMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); virtual; - procedure BeforePaint; virtual; - procedure BeforeShowEdit; virtual; - procedure BehaviorChanged; virtual; - procedure CancelCheckEditPost; - function CanFocusedRecordIndex(AIndex: Integer): Boolean; virtual; - procedure CheckEdit; virtual; - procedure DoEditDblClick(Sender: TObject); virtual; - procedure DoMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); virtual; - procedure DoMouseMove(Shift: TShiftState; X, Y: Integer); virtual; - procedure DoMouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); virtual; - procedure DoNextPage(AForward: Boolean; Shift: TShiftState); virtual; - function GetEditingViewInfo: TcxEditCellViewInfo; virtual; - function GetFocused: Boolean; virtual; - function GetFocusedCellViewInfo(AEditContainer: TcxCustomInplaceEditContainer): TcxEditCellViewInfo; virtual; - function GetFocusedRecordIndex: Integer; virtual; - function GetResizeDirection: TcxDragSizingDirection; virtual; - procedure FocusedItemChanged(APrevFocusedItem: TcxCustomInplaceEditContainer); virtual; - procedure FocusedRecordChanged(APrevFocusedRecordIndex, AFocusedRecordIndex: Integer); virtual; - function HasFocusedControls: Boolean; virtual; - procedure HideHint; virtual; - function IncSearchKeyDown(AKey: Word; AShift: TShiftState): Word; virtual; - procedure InternalSetFocusedItem(Value: TcxCustomInplaceEditContainer); - function IsImmediatePost: Boolean; virtual; - function IsKeyForController(AKey: Word; AShift: TShiftState): Boolean; virtual; - procedure PostCheckEdit; - procedure PostShowEdit; - procedure ProcessCheckEditPost; - procedure RefreshFocusedCellViewInfo(AItem: TcxCustomInplaceEditContainer); virtual; - procedure RefreshFocusedRecord; virtual; - procedure SetFocused(Value: Boolean); virtual; - procedure SetFocusedItem(Value: TcxCustomInplaceEditContainer); virtual; - procedure SetFocusedRecordIndex(Value: Integer); virtual; - // behavior options - function GetAlwaysShowEditor: Boolean; virtual; - function GetCancelEditingOnExit: Boolean; virtual; - function GetFocusCellOnCycle: Boolean; virtual; - function GetGoToNextCellOnEnter: Boolean; virtual; - function GetGoToNextCellOnTab: Boolean; virtual; - function GetImmediateEditor: Boolean; virtual; - // drag'n'drop - procedure BeforeStartDrag; virtual; - function CanDrag(X, Y: Integer): Boolean; virtual; - procedure DragDrop(Source: TObject; X, Y: Integer); virtual; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); virtual; - procedure EndDrag(Target: TObject; X, Y: Integer); virtual; - function GetDragAndDropObject: TcxCustomControlDragAndDropObject; - function GetDragAndDropObjectClass: TcxDragAndDropObjectClass; virtual; - function GetIsDragging: Boolean; virtual; - function GetNavigatorClass: TcxCustomCellNavigatorClass; virtual; - procedure StartDrag(var DragObject: TDragObject); virtual; - // scrolling - function GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; virtual; - function IsPixelScrollBar(AKind: TScrollBarKind): Boolean; virtual; - // focus - procedure DoEnter; virtual; - procedure DoExit; virtual; - function MayFocus: Boolean; virtual; - procedure FocusChanged; virtual; - procedure RemoveFocus; virtual; - procedure SetFocus; virtual; - // incremental search - procedure CancelIncSearching; virtual; - function GetIncSearchingItem: TcxCustomInplaceEditContainer; virtual; - function GetIncSearchingText: string; virtual; - function GetIsIncSearching: Boolean; virtual; - procedure SearchLocate(AItem: TcxCustomInplaceEditContainer; const Value: string); virtual; - procedure SearchLocateNext(AItem: TcxCustomInplaceEditContainer; AForward: Boolean); virtual; - procedure UpdateRecord(ARecordIndex: Integer); virtual; - procedure ViewInfoChanged; virtual; - - property AllowCheckEdit: Boolean read FAllowCheckEdit write FAllowCheckEdit; - property BlockRecordKeyboardHandling: Boolean read FBlockRecordKeyboardHandling - write FBlockRecordKeyboardHandling; - property DesignSelectionHelper: TcxCustomDesignSelectionHelper read GetDesignSelectionHelper; - property DisableCellsRefresh: Boolean read FDisableCellsRefresh write FDisableCellsRefresh; - property DragAndDropObject: TcxCustomControlDragAndDropObject read GetDragAndDropObject; - property DragCancel: Boolean read FDragCancel write FDragCancel; - property DragItem: TObject read FDragItem write FDragItem; - property EatKeyPress: Boolean read FEatKeyPress write FEatKeyPress; - property EditingControl: TcxEditingControl read FEditingControl; - property EditingController: TcxEditingController read FEditingController; - property EditingItem: TcxCustomInplaceEditContainer read GetEditingItem write SetEditingItem; - property EditingViewInfo: TcxEditCellViewInfo read GetEditingViewInfo; - property HotTrackController: TcxHotTrackController read FHotTrackController; - property HitTestController: TcxCustomHitTestController read FHitTestController; - property IncSearchingText: string read GetIncSearchingText write SetIncSearchingText; - property IncSearchingItem: TcxCustomInplaceEditContainer read GetIncSearchingItem; - property IsHandleTabStop: Boolean read FIsHandleTabStop write FIsHandleTabStop; - property IsDragging: Boolean read GetIsDragging; - property IsIncSearching: Boolean read GetIsIncSearching; - property ItemForIncSearching: TcxCustomInplaceEditContainer read GetItemForIncSearching; - property LockShowHint: Boolean read FLockShowHint write FLockShowHint; - property Navigator: TcxCustomCellNavigator read FNavigator; - property WasFocusedBeforeClick: Boolean read FWasFocusedBeforeClick write FWasFocusedBeforeClick; - public - constructor Create(AOwner: TcxEditingControl); reintroduce; virtual; - destructor Destroy; override; - procedure Clear; virtual; - procedure ControlFocusChanged; virtual; - procedure DblClick; virtual; - function GetCursor(X, Y: Integer): TCursor; virtual; - procedure KeyDown(var Key: Word; Shift: TShiftState); virtual; - procedure KeyPress(var Key: Char); virtual; - procedure KeyUp(var Key: Word; Shift: TShiftState); virtual; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); virtual; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); virtual; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); virtual; - procedure Reset; - procedure WndProc(var Message: TMessage); virtual; - // drag'n'drop - procedure BeginDragAndDrop; virtual; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); virtual; - procedure EndDragAndDrop(Accepted: Boolean); virtual; - function StartDragAndDrop(const P: TPoint): Boolean; virtual; - // scrolling - procedure InitScrollBarsParameters; virtual; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); virtual; - procedure SetFocusedRecordItem(ARecordIndex: Integer; - AItem: TcxCustomInplaceEditContainer); virtual; - procedure SetScrollBarInfo(AScrollBarKind: TScrollBarKind; - AMin, AMax, AStep, APage, APos: Integer; AAllowShow, AAllowHide: Boolean); - - procedure MakeFocusedItemVisible; virtual; - procedure MakeFocusedRecordVisible; virtual; - - property DataController: TcxCustomDataController read GetDataController; - property Focused: Boolean read GetFocused write SetFocused; - property FocusedItem: TcxCustomInplaceEditContainer read FFocusedItem write SetFocusedItem; - property FocusedRecordIndex: Integer read GetFocusedRecordIndex write SetFocusedRecordIndex; - - property IsDblClick: Boolean read FIsDblClick; - property IsEditing: Boolean read GetIsEditing; - end; - - { TcxEditingController } - - TcxEditingController = class - private - FController: TcxCustomControlController; - FEdit: TcxCustomEdit; - FEditHiding: Boolean; - FEditingItem: TcxCustomInplaceEditContainer; - FEditingItemSetting: Boolean; - FEditList: TcxInplaceEditList; - FEditPreparing: Boolean; - FEditShowingTimer: TcxTimer; - FEditShowingTimerItem: TcxCustomInplaceEditContainer; - FEditUpdateNeeded: Boolean; - FInitiatingEditing: Boolean; - FIsEditPlaced: Boolean; - FIsErrorOnEditExit: Boolean; - FPrevEditOnChange: TNotifyEvent; - FPrevEditOnEditValueChanged: TNotifyEvent; - function GetEditingControl: TcxEditingControl; - function GetEditingProperties: TcxCustomEditProperties; - function GetIsDragging: Boolean; - function GetIsEditing: Boolean; - procedure SetEditingItem(Value: TcxCustomInplaceEditContainer); - procedure EditShowingTimerHandler(Sender: TObject); - protected - procedure AfterViewInfoCalculate; virtual; - procedure BeforeViewInfoCalculate; virtual; - procedure CancelEditUpdatePost; - function CanRemoveEditFocus: Boolean; virtual; - function CanUpdateEditValue: Boolean; virtual; - procedure CheckEditUpdatePost; - procedure AssignEditEvents; virtual; - procedure UnassignEditEvents; virtual; - procedure DoUpdateEdit; - function GetHideEditOnExit: Boolean; virtual; - function GetHideEditOnFocusedRecordChange: Boolean; virtual; - procedure HideInplaceEditor; - procedure InitEdit; virtual; - function PrepareEdit(AItem: TcxCustomInplaceEditContainer; AIsMouseEvent: Boolean): Boolean; virtual; - procedure UpdateEdit; - procedure UpdateEditValue; - procedure UpdateValue; - - procedure EditAfterKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); virtual; - procedure EditChanged(Sender: TObject); virtual; - procedure EditDblClick(Sender: TObject); virtual; - procedure EditEditing(Sender: TObject; var CanEdit: Boolean); virtual; - procedure EditEnter(Sender: TObject); virtual; - procedure EditExit(Sender: TObject); virtual; - procedure EditFocusChanged(Sender: TObject); virtual; - procedure EditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); virtual; - procedure EditKeyPress(Sender: TObject; var Key: Char); virtual; - procedure EditKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); virtual; - procedure EditPostEditValue(Sender: TObject); virtual; - procedure EditValueChanged(Sender: TObject); virtual; - - property Controller: TcxCustomControlController read FController; - property EditingControl: TcxEditingControl read GetEditingControl; - property EditHiding: Boolean read FEditHiding write FEditHiding; - property EditingProperties: TcxCustomEditProperties read GetEditingProperties; - property EditList: TcxInplaceEditList read FEditList; - property EditUpdateNeeded: Boolean read FEditUpdateNeeded; - property HideEditOnExit: Boolean read GetHideEditOnExit; - property HideEditOnFocusedRecordChange: Boolean read GetHideEditOnFocusedRecordChange; - property InitiatingEditing: Boolean read FInitiatingEditing; - property IsEditPlaced: Boolean read FIsEditPlaced; - property IsErrorOnEditExit: Boolean read FIsErrorOnEditExit write FIsErrorOnEditExit; - public - constructor Create(AController: TcxCustomControlController); virtual; - destructor Destroy; override; - procedure HideEdit(Accept: Boolean); virtual; - procedure PostEditUpdate; - procedure RemoveEdit(AProperties: TcxCustomEditProperties); virtual; - procedure ShowEdit(AItem: TcxCustomInplaceEditContainer = nil); overload; - procedure ShowEdit(AItem: TcxCustomInplaceEditContainer; Key: Char); overload; - procedure ShowEdit(AItem: TcxCustomInplaceEditContainer; Shift: TShiftState; X, Y: Integer); overload; - - procedure StartEditShowingTimer(AItem: TcxCustomInplaceEditContainer); - procedure StopEditShowingTimer; - - property Edit: TcxCustomEdit read FEdit; - property EditingItem: TcxCustomInplaceEditContainer read FEditingItem write SetEditingItem; - property IsDragging: Boolean read GetIsDragging; - property IsEditing: Boolean read GetIsEditing; - end; - - { TcxCustomControlViewInfo } - - TcxCustomControlViewInfo = class - private - FControl: TcxEditingControl; - FClientRect: TRect; - FDefaultEditHeight: Integer; - FEditCellViewInfoList: TList; - FPainter: TcxCustomControlPainter; - FState: Integer; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetState(AMask: Integer): Boolean; - procedure SetState(AMask: Integer; Value: Boolean); - procedure UpdateSelectionParams; - protected - Brush: TBrush; - SelectionBrush: TBrush; - SelectionParams: TcxViewParams; - function AddEditCellViewInfo(AViewInfoClass: TcxEditCellViewInfoClass; - AEditContainer: TcxCustomInplaceEditContainer): TcxEditCellViewInfo; - function CalculateDefaultEditHeight: Integer; virtual; - procedure CalculateDefaultHeights; virtual; - procedure ClearEditCellViewInfos; - procedure CreatePainter; virtual; - procedure DoCalculate; virtual; - procedure RemoveEditCellViewInfo(AViewInfo: TcxEditCellViewInfo); - procedure UpdateSelection; virtual; - property IsDirty: Boolean index cvis_IsDirty read GetState write SetState; - property State[AMask: Integer]: Boolean read GetState write SetState; - public - ViewParams: TcxViewParams; - constructor Create(AOwner: TcxEditingControl); virtual; - destructor Destroy; override; - procedure Calculate; - procedure Invalidate(ARecalculate: Boolean = False); virtual; - procedure ValidateDirty; - - property ClientRect: TRect read FClientRect; - property Control: TcxEditingControl read FControl; - property DefaultEditHeight: Integer read FDefaultEditHeight; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property Painter: TcxCustomControlPainter read FPainter write FPainter; - end; - - { TcxCustomControlCells } - - TcxCustomDrawCellEvent = procedure(ACanvas: TcxCanvas; - ACell: TcxCustomViewInfoItem; var ADone: Boolean) of object; - - TcxCustomControlCells = class(TcxObjectList) - private - function GetItem(AIndex: Integer): TcxCustomViewInfoItem; - public - procedure BeforePaint; - function CalculateHitTest(AHitTest: TcxCustomHitTestController): Boolean; - procedure DeleteAll; - procedure ExcludeFromClipping(ACanvas: TcxCanvas); - procedure Paint(ACanvas: TcxCanvas; AHandler: TcxCustomDrawCellEvent); virtual; - - property Items[Index: Integer]: TcxCustomViewInfoItem read GetItem; default; - end; - - TcxCustomControlViewInfoClass = class of TcxCustomControlViewInfo; - - { TcxCustomViewInfoItem } - - TcxCustomViewInfoItem = class - private - FHasClipping: Boolean; - FOwner: TObject; - FTransparent: Boolean; - FVisibleInfoCalculated: Boolean; - function GetBitmap: TBitmap; - function GetControlViewInfo: TcxCustomControlViewInfo; - function GetPainter: TcxCustomLookAndFeelPainterClass; - protected - ClipRect: TRect; - ControlCanvas: TcxCanvas; - DisplayRect: TRect; - ItemViewParams: TcxViewParams; - ItemVisible: Boolean; - VisibleBounds: TRect; - procedure AfterCustomDraw(ACanvas: TcxCanvas); virtual; - procedure BeforeCustomDraw(ACanvas: TcxCanvas); virtual; - procedure CheckClipping(const ADisplayRect, AAvailableRect: TRect); overload; virtual; - procedure CheckClipping(const ADisplayRect: TRect); overload; virtual; - procedure DoCalculate; virtual; - procedure DoDraw(ACanvas: TcxCanvas); virtual; - procedure DoHorzOffset(AShift: Integer); virtual; - procedure DoVertOffset(AShift: Integer); virtual; - function DrawBackgroundHandler(ACanvas: TcxCanvas; const ABounds: TRect): Boolean; - function GetControl: TcxEditingControl; virtual; - function GetHitTest(AHitTest: TcxCustomHitTestController): Boolean; virtual; - function IsTransparent: Boolean; virtual; - function ExcludeFromPaint(ACanvas: TcxCanvas): Boolean; - procedure Scroll(const DX, DY: Integer); virtual; - procedure UpdateEditRect; - - property Owner: TObject read FOwner; - property ControlViewInfo: TcxCustomControlViewInfo read GetControlViewInfo; - public - constructor Create(AOwner: TObject); virtual; - procedure Assign(Source: TcxCustomViewInfoItem); virtual; - procedure CheckVisibleInfo; - class function CustomDrawID: Integer; virtual; - procedure Draw(ACanvas: TcxCanvas); - procedure Invalidate(ARecalculate: Boolean = False); - - property Bitmap: TBitmap read GetBitmap; - property BoundsRect: TRect read DisplayRect; - property Control: TcxEditingControl read GetControl; - property HasClipping: Boolean read FHasClipping; - property Painter: TcxCustomLookAndFeelPainterClass read GetPainter; - property LookAndFeelPainterClass: TcxCustomLookAndFeelPainterClass read GetPainter; // todo: deprecated, for backward capability only - property Transparent: Boolean read FTransparent write FTransparent; - property Visible: Boolean read ItemVisible; - property VisibleInfoCalculated: Boolean read FVisibleInfoCalculated write FVisibleInfoCalculated; - property VisibleRect: TRect read ClipRect; - property ViewParams: TcxViewParams read ItemViewParams; - end; - - { TcxEditCellViewInfo } - - TcxEditCellViewInfo = class(TcxCustomViewInfoItem, IUnknown, IcxHotTrackElement) - private - function GetTransparent: Boolean; - procedure SetTransparent(Value: Boolean); - protected - CellBorders: TcxBorders; - CellContentRect: TRect; - CellEditRect: TRect; - CellHeight: Integer; - CellTransparent: Boolean; - CellValue: Variant; - IsViewDataCreated: Boolean; - Properties: TcxCustomEditProperties; - ViewInfo: TcxCustomEditViewInfo; - ViewData: TcxCustomEditViewData; - // IUnknown - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - // IcxHotTrackElement - function GetOrigin: TPoint; virtual; - function IsNeedHint(ACanvas: TcxCanvas; const P: TPoint; - out AText: TCaption; out AIsMultiLine: Boolean; out ATextRect: TRect; - var IsNeedOffsetHint: Boolean): Boolean; virtual; - procedure UpdateHotTrackState(const APoint: TPoint); virtual; - function CalculateEditHeight: Integer; - function CalculateEditWidth: Integer; - function ChangedHeight(APrevHeight, ANewHeight: Integer): Boolean; virtual; - procedure CheckClipping(const ADisplayRect, AAvailableRect: TRect); override; - function ContentOffset: TRect; virtual; - function CorrectHotTrackPoint(const APoint: TPoint): TPoint; virtual; - procedure DoCalculate; override; - function GetButtonTransparency: TcxEditButtonTransparency; virtual; - function GetCellOrg: TPoint; virtual; - function GetControl: TcxEditingControl; override; - function GetDisplayValue: Variant; virtual; - function GetEditContainer: TcxCustomInplaceEditContainer; virtual; - function GetEditRect: TRect; virtual; - function GetEditViewParams: TcxViewParams; virtual; - function GetFocused: Boolean; virtual; - function GetInplaceEditPosition: TcxInplaceEditPosition; - function GetMaxLineCount: Integer; virtual; - function GetRecordIndex: Integer; virtual; - function GetSelectedTextColor: Integer; virtual; - function GetSelectedBKColor: Integer; virtual; - function GetViewInfoData: Pointer; virtual; - function IsAutoHeight: Boolean; virtual; - function IsEndEllipsis: Boolean; virtual; - function IsSupportedHotTrack: Boolean; virtual; - procedure SetBounds(const ABounds: TRect; const ADisplayRect: TRect); - property EditContainer: TcxCustomInplaceEditContainer read GetEditContainer; - property EditRect: TRect read GetEditRect; - public - destructor Destroy; override; - procedure Assign(Source: TcxCustomViewInfoItem); override; - // IUnknown - function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall; - - function Refresh(ARecalculate: Boolean): Boolean; virtual; - property Borders: TcxBorders read CellBorders; - property ContentRect: TRect read CellContentRect; - property DisplayValue: Variant read CellValue; - property EditViewInfo: TcxCustomEditViewInfo read ViewInfo; - property Focused: Boolean read GetFocused; - property MaxLineCount: Integer read GetMaxLineCount; - property RecordIndex: Integer read GetRecordIndex; - property Transparent: Boolean read GetTransparent write SetTransparent; - property BoundsRect; - property Control; - property ViewParams; - property VisibleRect; - end; - - { TcxCustomControlPainter } - - TcxCustomDrawViewInfoItemEvent = procedure(Sender: TObject; Canvas: TcxCanvas; - AViewInfo: TcxCustomViewInfoItem; var ADone: Boolean) of object; - - TcxCustomControlPainter = class - private - FSaveViewParams: TcxViewParams; - FBitmap: TBitmap; - FBitmapCanvas: TcxCanvas; - FBuffered: Boolean; - FControl: TcxEditingControl; - function GetPainter: TcxCustomLookAndFeelPainterClass; - function GetViewInfo: TcxCustomControlViewInfo; - protected - FCanvas: TcxCanvas; - procedure AfterCustomDraw(AViewInfo: TcxCustomViewInfoItem); overload; virtual; - procedure BeforeCustomDraw(AViewInfo: TcxCustomViewInfoItem); overload; virtual; - function DoCustomDraw(AViewInfoItem: TcxCustomViewInfoItem; - AEvent: TcxCustomDrawViewInfoItemEvent): Boolean; - procedure DoPaintEditCell(ACellViewInfo: TcxEditCellViewInfo; AIsExcludeRect: Boolean = True); virtual; - procedure DoPaint; virtual; - procedure SetBuffered(Value: Boolean); virtual; - - property Bitmap: TBitmap read FBitmap; - property BitmapCanvas: TcxCanvas read FBitmapCanvas; - public - constructor Create(AOwner: TcxEditingControl); virtual; - destructor Destroy; override; - procedure Paint; virtual; - - property Buffered: Boolean read FBuffered write SetBuffered; - property Canvas: TcxCanvas read FCanvas; - property Control: TcxEditingControl read FControl; - property Painter: TcxCustomLookAndFeelPainterClass read GetPainter; - property ViewInfo: TcxCustomControlViewInfo read GetViewInfo; - end; - - TcxCustomControlPainterClass = class of TcxCustomControlPainter; - - { TcxCustomControlStyles } - - TcxCustomControlStylesClass = class of TcxCustomControlStyles; - - TcxCustomControlStyles = class(TcxStyles) - private - FDefaultStyle: TcxStyle; - FOnGetContentStyle: TcxOnGetContentStyleEvent; - function GetControl: TcxEditingControl; - function GetPainter: TcxCustomLookAndFeelPainterClass; - protected - procedure Changed(AIndex: Integer); override; - function GetDefaultStyle(Index: Integer; AData: Pointer): TcxStyle; - procedure GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); override; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function GetBackgroundParams: TcxViewParams; - function GetSelectionParams: TcxViewParams; - property Control: TcxEditingControl read GetControl; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetPainter; - published - property Background: TcxStyle index ecs_Background read GetValue write SetValue; - property Content: TcxStyle index ecs_Content read GetValue write SetValue; - property Inactive: TcxStyle index ecs_Inactive read GetValue write SetValue; - property Selection: TcxStyle index ecs_Selection read GetValue write SetValue; - property OnGetContentStyle: TcxOnGetContentStyleEvent read FOnGetContentStyle write FOnGetContentStyle; - property StyleSheet; - end; - - { TcxEditingControl } - - IcxEditingControlOptions = interface - ['{6A041541-53E2-413B-8377-0D249356B5DF}'] - function GetOptionsBehavior: TcxControlOptionsBehavior; - function GetOptionsData: TcxControlOptionsData; - function GetOptionsView: TcxControlOptionsView; - property OptionsBehavior: TcxControlOptionsBehavior read GetOptionsBehavior; - property OptionsData: TcxControlOptionsData read GetOptionsData; - property OptionsView: TcxControlOptionsView read GetOptionsView; - end; - - TcxecEditingEvent = procedure(Sender, AItem: TObject; var Allow: Boolean) of object; - TcxecInitEditEvent = procedure(Sender, AItem: TObject; AEdit: TcxCustomEdit) of object; - TcxecItemEvent = procedure(Sender: TObject; AItem: TcxCustomInplaceEditContainer) of object; - - TcxEditingControl = class(TcxControl, IcxMouseTrackingCaller) - private - FBrushCache: TcxBrushCache; - FChangesCount: Integer; - FContainerList: TList; - FDesignSelectionHelper: TcxCustomDesignSelectionHelper; - FDragHelper: TcxDragImageHelper; - FDragPos: TPoint; - FEditStyle: TcxCustomEditStyle; - FIsLayoutChanged: Boolean; - FStyles: TcxCustomControlStyles; - FViewInfo: TcxCustomControlViewInfo; - FOnCustomDrawCell: TcxCustomDrawViewInfoItemEvent; - FOnEditChanged: TcxecItemEvent; - FOnEdited: TcxecItemEvent; - FOnEditing: TcxecEditingEvent; - FOnEditValueChanged: TcxecItemEvent; - FOnInitEdit: TcxecInitEditEvent; - procedure IcxMouseTrackingCaller.MouseLeave = DoMouseLeave; - function GetBufferedPaint: Boolean; - function GetPainter: TcxCustomControlPainter; - procedure DoMouseLeave; - procedure SetBufferedPaint(Value: Boolean); - procedure SetEditStyle(Value: TcxCustomEditStyle); - procedure SetStyles(Value: TcxCustomControlStyles); - procedure WMCancelMode(var Message: TWMCancelMode); message WM_CANCELMODE; - procedure WMSetCursor(var Message: TWMSetCursor); message WM_SetCursor; - protected - FController: TcxCustomControlController; - FDataController: TcxCustomDataController; - FLockUpdate: Integer; - procedure AfterLayoutChanged; virtual; - procedure BeginAutoDrag; override; - procedure BeforeUpdate; virtual; - procedure CheckCreateDesignSelectionHelper; virtual; - procedure CreateSubClasses; virtual; - procedure ControlUpdateData(AInfo: TcxUpdateControlInfo); virtual; - procedure DataChanged; virtual; - procedure DataLayoutChanged; virtual; - procedure DestroyDesignSelectionHelper; - procedure DestroySubClasses; virtual; - procedure DoBeginUpdate; virtual; - procedure DoEndUpdate; virtual; - procedure DoEditChanged(AItem: TcxCustomInplaceEditContainer); virtual; - procedure DoEdited(AItem: TcxCustomInplaceEditContainer); virtual; - function DoEditing(AItem: TcxCustomInplaceEditContainer): Boolean; virtual; - procedure DoEditValueChanged(AItem: TcxCustomInplaceEditContainer); virtual; - procedure DoGetCellHint(ACell: TObject; var AText: string; var ANeedShow: Boolean); virtual; - procedure DoInitEdit(AItem: TcxCustomInplaceEditContainer; AEdit: TcxCustomEdit); virtual; - procedure DoInplaceEditContainerItemAdded(AItem: TcxCustomInplaceEditContainer); virtual; - procedure DoInplaceEditContainerItemRemoved(AItem: TcxCustomInplaceEditContainer); virtual; - procedure DoLayoutChanged; virtual; - // - function GetControllerClass: TcxCustomControlControllerClass; virtual; // TODO: need overriding - function GetControlStylesClass: TcxCustomControlStylesClass; virtual; - function GetDataControllerClass: TcxCustomDataControllerClass; virtual; - function GetDragImageHelperClass: TcxDragImageHelperClass; virtual; - function GetEditStyleClass: TcxCustomEditStyleClass; virtual; - function GetEditingControllerClass: TcxEditingControllerClass; virtual; - function GetHitTestControllerClass: TcxHitTestControllerClass; virtual; - function GetHotTrackControllerClass: TcxHotTrackControllerClass; virtual; - function GetViewInfoClass: TcxCustomControlViewInfoClass; virtual; - function GetOptions: IcxEditingControlOptions; virtual; - function GetPainterClass: TcxCustomControlPainterClass; virtual; - function IsLocked: Boolean; virtual; - procedure InvalidateRectEx(const R: TRect; EraseBackground: Boolean); virtual; - procedure RecreateViewInfo; virtual; - procedure SelectionChanged(AInfo: TcxSelectionChangedInfo); virtual; - procedure UpdateIndexes; - procedure UpdateViewStyles; - procedure UpdateData; virtual; - // VCL methods - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - procedure DestroyWnd; override; - procedure AlignControls(AControl: TControl; var Rect: TRect); override; - procedure DoExit; override; - procedure DblClick; override; - procedure FocusChanged; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure Loaded; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseEnter(AControl: TControl); override; - procedure MouseLeave(AControl: TControl); override; - procedure Paint; override; - procedure WndProc(var Message: TMessage); override; - - // cxControl's - procedure AfterMouseDown(AButton: TMouseButton; X, Y: Integer); override; - procedure BoundsChanged; override; - function CanDrag(X, Y: Integer): Boolean; override; - procedure DoCancelMode; override; - procedure FontChanged; override; - function GetCursor(X, Y: Integer): TCursor; override; - function GetDesignHitTest(X, Y: Integer; Shift: TShiftState): Boolean; override; - function GetIsFocused: Boolean; override; - function GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; override; - procedure InitControl; override; - function IsPixelScrollBar(AKind: TScrollBarKind): Boolean; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - function MayFocus: Boolean; override; - // drag'n'drop - procedure DoEndDrag(Target: TObject; X, Y: Integer); override; - procedure DoStartDrag(var DragObject: TDragObject); override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); override; - function DragDropImageDisplayRect: TRect; virtual; - procedure DrawDragDropImage(ADragBitmap: TBitmap; ACanvas: TcxCanvas); virtual; - procedure FinishDragImages; - function HasDragDropImages: Boolean; virtual; - // scrollbars - procedure InitScrollBarsParameters; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - procedure EndDragAndDrop(Accepted: Boolean); override; - function GetDragAndDropObjectClass: TcxDragAndDropObjectClass; override; - function StartDragAndDrop(const P: TPoint): Boolean; override; - - property BrushCache: TcxBrushCache read FBrushCache; - property ContainerList: TList read FContainerList; - property Controller: TcxCustomControlController read FController; - property ChangesCount: Integer read FChangesCount; - property DragPos: TPoint read FDragPos write FDragPos; - property DataController: TcxCustomDataController read FDataController; - property DesignSelectionHelper: TcxCustomDesignSelectionHelper read FDesignSelectionHelper; - property DragHelper: TcxDragImageHelper read FDragHelper; - property EditStyle: TcxCustomEditStyle read FEditStyle write SetEditStyle; - property IsLayoutChanged: Boolean read FIsLayoutChanged write FIsLayoutChanged; - property Options: IcxEditingControlOptions read GetOptions; - property Painter: TcxCustomControlPainter read GetPainter; - property Styles: TcxCustomControlStyles read FStyles write SetStyles; - property ViewInfo: TcxCustomControlViewInfo read FViewInfo write FViewInfo; - property OnCustomDrawCell: TcxCustomDrawViewInfoItemEvent read FOnCustomDrawCell write FOnCustomDrawCell; - property OnEditChanged: TcxecItemEvent read FOnEditChanged write FOnEditChanged; - property OnEdited: TcxecItemEvent read FOnEdited write FOnEdited; - property OnEditing: TcxecEditingEvent read FOnEditing write FOnEditing; - property OnEditValueChanged: TcxecItemEvent read FOnEditValueChanged write FOnEditValueChanged; - property OnInitEdit: TcxecInitEditEvent read FOnInitEdit write FOnInitEdit; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure BeginUpdate; - procedure BeginDragAndDrop; override; - procedure CancelUpdate; - procedure EndUpdate; - function ExecuteAction(Action: TBasicAction): Boolean; override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; - procedure LayoutChanged; - function UpdateAction(Action: TBasicAction): Boolean; override; - property BufferedPaint: Boolean read GetBufferedPaint write SetBufferedPaint; - property LockUpdate: Integer read FLockUpdate; - property DragCursor default crDefault; - property TabStop default True; - published - property BorderStyle default cxcbsDefault; - end; - - { TcxExtEditingControl } - - TcxExtEditingControl = class(TcxEditingControl, IcxEditingControlOptions) - private - FOptionsBehavior: TcxControlOptionsBehavior; - FOptionsData: TcxControlOptionsData; - FOptionsView: TcxControlOptionsView; - // IcxEditingControlOptions - function GetOptionsBehavior: TcxControlOptionsBehavior; - function GetOptionsData: TcxControlOptionsData; - function GetOptionsView: TcxControlOptionsView; - - procedure SetOptionsBehavior(Value: TcxControlOptionsBehavior); - procedure SetOptionsData(Value: TcxControlOptionsData); - procedure SetOptionsView(Value: TcxControlOptionsView); - protected - procedure CreateSubClasses; override; - procedure DestroySubClasses; override; - function GetOptions: IcxEditingControlOptions; override; - function GetOptionsBehaviorClass: TcxControlOptionsBehaviorClass; virtual; - function GetOptionsDataClass: TcxControlOptionsDataClass; virtual; - function GetOptionsViewClass: TcxControlOptionsViewClass; virtual; - property OptionsBehavior: TcxControlOptionsBehavior read GetOptionsBehavior write SetOptionsBehavior; - property OptionsData: TcxControlOptionsData read GetOptionsData write SetOptionsData; - property OptionsView: TcxControlOptionsView read GetOptionsView write SetOptionsView; - end; - - { TcxValueTypeClassRepository } - - TcxValueTypeClassRepository = class - private - FList: TStringList; - function GetCount: Integer; - function GetValueTypeClass(AIndex: Integer): TcxValueTypeClass; - function GetDescription(AIndex: Integer): string; - public - constructor Create; - destructor Destroy; override; - function FindByClassType(ATypeClass: TcxValueTypeClass): string; - function FindByDescription(const ADescription: string): TcxValueTypeClass; - procedure RegisterValueTypeClass(const ADescription: string; ATypeClass: TcxValueTypeClass); - procedure UnRegisterValueTypeClass(ATypeClass: TcxValueTypeClass); - property Count: Integer read GetCount; - property Description[AIndex: Integer]: string read GetDescription; - property ValueTypeClass[AIndex: Integer]: TcxValueTypeClass read GetValueTypeClass; - end; - -function cxieValueTypeClassRepository: TcxValueTypeClassRepository; -procedure cxieRegisterValueTypeClass(const ADescription: string; ATypeClass: TcxValueTypeClass); -procedure cxieUnRegisterValueTypeClass(ATypeClass: TcxValueTypeClass); - -procedure cxAssignEditStyle(AViewInfo: TcxEditCellViewInfo); -function cxPtInViewInfoItem(AItem: TcxCustomViewInfoItem; const APoint: TPoint): Boolean; -procedure cxStylesToViewParams(AMasterStyles: TcxCustomControlStyles; AIndex: Integer; - AData: Pointer; const AStyles: array of TcxStyle; out AParams: TcxViewParams); - -function cxInRange(Value: Integer; AMin, AMax: Integer): Boolean; -function cxRange(var Value: Integer; AMin, AMax: Integer): Boolean; -function cxSetValue(Condition: Boolean; ATrueValue, AFalseValue: Integer): Integer; - -function cxConfirmMessageBox(const AText, ACaption: string): Boolean; -procedure cxAbstractError; - -{$IFNDEF DELPHI5} -function Supports(const Instance: TObject; const IID: TGUID; out Intf): Boolean; -{$ENDIF} - -const - cxIntOffs: array[Boolean] of Integer = (-1, 1); - cxDefaultEditSizeProp: TcxEditSizeProperties = (Height: -1; MaxLineCount: 0; Width: -1); - cxDesignSelectionHelperClass: TcxCustomDesignSelectionHelperClass = nil; - -implementation - -uses - dxCore; - -type - TControlAccess = class(TControl); - THintWindowAccess = class(THintWindow); - TcxCustomEditStyleAccess = class(TcxCustomEditStyle); - TcxCustomEditViewDataAccess = class(TcxCustomEditViewData); - TcxDragAndDropObjectAccess = class(TcxDragAndDropObject); - - PIntArray = ^TIntArray; - TIntArray = array[0..MaxInt div SizeOf(Integer) - 1] of Integer; - -var - ValueTypeClassRepository: TcxValueTypeClassRepository; - cxDragControl: TcxEditingControl; - cxDragPrevHook: HHook; - -const - cxInvisibleCoordinate = 30000; - -procedure cxAbstractError; -begin - RunError(210); -end; - -{$IFNDEF DELPHI5} -function Supports(const Instance: TObject; const IID: TGUID; out Intf): Boolean; -begin - Result := (Instance <> nil) and Instance.GetInterface(IID, Intf); -end; -{$ENDIF} - -procedure cxAssignEditStyle(AViewInfo: TcxEditCellViewInfo); -var - AStyle: TcxCustomEditStyleAccess; -begin - AStyle := TcxCustomEditStyleAccess(AViewInfo.Control.EditStyle); - with AViewInfo do - begin - AStyle.FAssignedValues := AStyle.FAssignedValues - [svFont] + [svColor, svButtonTransparency]; - if ViewParams.Font = nil then - AStyle.StyleData.Font := GetEditViewParams.Font - else - AStyle.StyleData.Font := ViewParams.Font; - AStyle.StyleData.Color := ViewParams.Color; - AStyle.StyleData.FontColor := ViewParams.TextColor; - AStyle.ButtonTransparency := GetButtonTransparency; - AStyle.Changed; - ViewInfo.Transparent := IsTransparent; - end; -end; - -function MouseMsgHookProcForDragDrop(Code: Integer; - WParam, LParam: Longint): Longint stdcall; -begin - Result := CallNextHookEx(cxDragPrevHook, Code, WParam, LParam); - if (cxDragControl <> nil) then - begin - case WParam of - WM_MOUSEMOVE: - begin - with cxDragControl do - if Dragging then - DragHelper.DragAndDrop(PMouseHookStruct(LParam).Pt); - end; - WM_LBUTTONUP, WM_RBUTTONUP: - cxDragControl.FinishDragImages; - end; - end; -end; - -procedure cxInstallMouseHookForDragControl(AControl: TcxEditingControl); -begin - cxDragControl := AControl; - cxDragPrevHook := SetWindowsHookEx(WH_MOUSE, - @MouseMsgHookProcForDragDrop, 0, GetCurrentThreadID); -end; - -procedure cxResetMouseHookForDragControl; -begin - try - if cxDragPrevHook <> 0 then - UnhookWindowsHookEx(cxDragPrevHook); - finally - cxDragControl := nil; - cxDragPrevHook := 0; - end; -end; - -{ TcxCustomItemDataBinding } - -constructor TcxCustomItemDataBinding.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FDefaultValuesProvider := GetDefaultValuesProviderClass.Create(Self); -end; - -destructor TcxCustomItemDataBinding.Destroy; -begin - FreeAndNil(FDefaultValuesProvider); - inherited Destroy; -end; - -function TcxCustomItemDataBinding.DefaultRepositoryItem: TcxEditRepositoryItem; -begin - Result := GetDefaultEditDataRepositoryItems.GetItem(GetValueTypeClass); -end; - -function TcxCustomItemDataBinding.GetDefaultCaption: string; -begin - Result := ''; -end; - -function TcxCustomItemDataBinding.GetDefaultValuesProvider( - AProperties: TcxCustomEditProperties): IcxEditDefaultValuesProvider; -begin - Result := DefaultValuesProvider; -end; - -function TcxCustomItemDataBinding.GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; -begin - Result := TcxContainerItemDefaultValuesProvider; -end; - -function TcxCustomItemDataBinding.GetValueTypeClass: TcxValueTypeClass; -begin - Result := TcxStringValueType; -end; - -procedure TcxCustomItemDataBinding.Init; -begin -end; - -function TcxCustomItemDataBinding.IsDisplayFormatDefined( - AIsCurrencyValueAccepted: Boolean): Boolean; -begin - Result := - DataController.IsDisplayFormatDefined(EditContainer.ItemIndex, not AIsCurrencyValueAccepted) or - EditContainer.HasDataTextHandler; -end; - -procedure TcxCustomItemDataBinding.ValueTypeClassChanged; -begin - DataController.ChangeValueTypeClass(EditContainer.ItemIndex, GetValueTypeClass); - EditContainer.InternalPropertiesChanged; -end; - -function TcxCustomItemDataBinding.GetDataController: TcxCustomDataController; -begin - Result := EditContainer.EditingControl.DataController; -end; - -function TcxCustomItemDataBinding.GetEditContainer: TcxCustomInplaceEditContainer; -begin - Result := TcxCustomInplaceEditContainer(GetOwner); -end; - -{ TcxItemDataBinding } - -procedure TcxItemDataBinding.Assign(Source: TPersistent); -begin - if Source is TcxItemDataBinding then - begin - ValueType := TcxItemDataBinding(Source).ValueType; - ValueTypeClass := TcxItemDataBinding(Source).ValueTypeClass; - end; -end; - -function TcxItemDataBinding.GetValueTypeClass: TcxValueTypeClass; -begin - if FValueTypeClass = nil then - Result := inherited GetValueTypeClass - else - Result := FValueTypeClass; -end; - -function TcxItemDataBinding.IsValueTypeStored: Boolean; -begin - Result := FValueTypeClass <> inherited GetValueTypeClass; -end; - -function TcxItemDataBinding.GetValueType: string; -begin - Result := ValueTypeClassRepository.FindByClassType(ValueTypeClass); -end; - -procedure TcxItemDataBinding.SetValueType(const Value: string); -var - ATypeClass: TcxValueTypeClass; -begin - ATypeClass := ValueTypeClassRepository.FindByDescription(Value); - if ATypeClass <> nil then - ValueTypeClass := ATypeClass; -end; - -procedure TcxItemDataBinding.SetValueTypeClass(Value: TcxValueTypeClass); -begin - if ValueTypeClass <> Value then - begin - FValueTypeClass := Value; - ValueTypeClassChanged; - end; -end; - -{ TcxControlDataController } - -procedure TcxControlDataController.UpdateData; -begin - GetControl.UpdateData; -end; - -procedure TcxControlDataController.UpdateItemIndexes; -begin - GetControl.UpdateIndexes; - inherited UpdateItemIndexes; -end; - -function TcxControlDataController.GetItem(Index: Integer): TObject; -begin - Result := GetControl.FContainerList[Index]; -end; - -function TcxControlDataController.GetItemID(AItem: TObject): Integer; -begin - if AItem is TcxCustomInplaceEditContainer then - Result := TcxCustomInplaceEditContainer(AItem).ItemIndex - else - Result := -1; -end; - -function TcxControlDataController.GetItemValueSource( - AItemIndex: Integer): TcxDataEditValueSource; -begin - with TcxCustomInplaceEditContainer(GetControl.FContainerList[AItemIndex]) do - Result := PropertiesValue.GetEditValueSource(True); -end; - -procedure TcxControlDataController.UpdateControl(AInfo: TcxUpdateControlInfo); -begin - GetControl.ControlUpdateData(AInfo); -end; - -function TcxControlDataController.GetControl: TcxEditingControl; -begin - Result := TcxEditingControl(GetOwner); -end; - -{ TcxContainerItemDefaultValuesProvider } - -function TcxContainerItemDefaultValuesProvider.IsDisplayFormatDefined( - AIsCurrencyValueAccepted: Boolean): Boolean; -begin - Result := False; -end; - -{ TcxCustomEditContainerItemOptions } - -constructor TcxCustomEditContainerItemOptions.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FMoving := True; - FCustomizing := True; - FSorting := True; - FEditing := True; - FFiltering := True; - FFocusing := True; - FIncSearch := True; - FShowEditButtons := eisbDefault; - FTabStop := True; -end; - -procedure TcxCustomEditContainerItemOptions.Assign(AOwner: TPersistent); -begin - if AOwner is TcxCustomEditContainerItemOptions then - with TcxCustomEditContainerItemOptions(AOwner) do - begin - Self.Customizing := Customizing; - Self.Editing := Editing; - Self.Filtering := Filtering; - Self.Focusing := Focusing; - Self.IncSearch := IncSearch; - Self.Moving := Moving; - Self.ShowEditButtons := ShowEditButtons; - Self.Sorting := Sorting; - Self.TabStop := TabStop; - end; -end; - -procedure TcxCustomEditContainerItemOptions.Changed; -begin - EditContainer.Changed; -end; - -function TcxCustomEditContainerItemOptions.GetEditContainer: TcxCustomInplaceEditContainer; -begin - Result := TcxCustomInplaceEditContainer(GetOwner); -end; - -procedure TcxCustomEditContainerItemOptions.SetEditing(Value: Boolean); -begin - if FEditing <> Value then - begin - FEditing := Value; - if not Value then EditContainer.Editing := False; - end; -end; - -procedure TcxCustomEditContainerItemOptions.SetFiltering(Value: Boolean); -begin - if FFiltering <> Value then - begin - FFiltering := Value; - Changed; - end; -end; - -procedure TcxCustomEditContainerItemOptions.SetFocusing(Value: Boolean); -begin - if FFocusing <> Value then - begin - FFocusing := Value; - if not Value then EditContainer.Focused := False; - end; -end; - -procedure TcxCustomEditContainerItemOptions.SetIncSearch(Value: Boolean); -begin - if FIncSearch <> Value then - begin - if not Value and EditContainer.IncSearching then - EditContainer.CancelIncSearching; - FIncSearch := Value; - end; -end; - -procedure TcxCustomEditContainerItemOptions.SetShowEditButtons( - Value: TcxEditItemShowEditButtons); -begin - if Value <> FShowEditButtons then - begin - FShowEditButtons := Value; - Changed; - end; -end; - -{ TcxControlOptionsView } - -constructor TcxControlOptionsView.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FShowEditButtons := ecsbNever; -end; - -procedure TcxControlOptionsView.Assign(Source: TPersistent); -begin - if Source is TcxControlOptionsView then - with TcxControlOptionsView(Source) do - begin - Self.CellAutoHeight := CellAutoHeight; - Self.CellEndEllipsis := CellEndEllipsis; - Self.CellTextMaxLineCount := CellTextMaxLineCount; - Self.ScrollBars := ScrollBars; - Self.ShowEditButtons := ShowEditButtons; - end -end; - -procedure TcxControlOptionsView.Changed; -begin - EditingControl.LayoutChanged; -end; - -function TcxControlOptionsView.GetEditingControl: TcxEditingControl; -begin - Result := TcxEditingControl(GetOwner); -end; - -function TcxControlOptionsView.GetScrollBars: TScrollStyle; -begin - Result := EditingControl.ScrollBars; -end; - -procedure TcxControlOptionsView.SetCellAutoHeight(const Value: Boolean); -begin - if FCellAutoHeight <> Value then - begin - FCellAutoHeight := Value; - Changed; - end; -end; - -procedure TcxControlOptionsView.SetCellEndEllipsis(const Value: Boolean); -begin - if FCellEndEllipsis <> Value then - begin - FCellEndEllipsis := Value; - Changed; - end; -end; - -procedure TcxControlOptionsView.SetCellTextMaxLineCount( - const Value: Integer); -begin - if FCellTextMaxLineCount <> Value then - begin - FCellTextMaxLineCount := Value; - Changed; - end; -end; - -procedure TcxControlOptionsView.SetScrollBars(const Value: TScrollStyle); -begin - EditingControl.ScrollBars := Value; -end; - -procedure TcxControlOptionsView.SetShowEditButtons( - const Value: TcxEditingControlEditShowButtons); -begin - if FShowEditButtons <> Value then - begin - FShowEditButtons := Value; - Changed; - end; -end; - -{ TcxControlOptionsData } - -constructor TcxControlOptionsData.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FCancelOnExit := True; - FEditing := True; -end; - -procedure TcxControlOptionsData.Assign(Source: TPersistent); -begin - if Source is TcxControlOptionsData then - with TcxControlOptionsData(Source) do - begin - Self.CancelOnExit := CancelOnExit; - Self.Editing := Editing; - end -end; - -procedure TcxControlOptionsData.Changed; -begin -end; - -function TcxControlOptionsData.GetEditingControl: TcxEditingControl; -begin - Result := TcxEditingControl(GetOwner) -end; - -procedure TcxControlOptionsData.SetEditing(Value: Boolean); -begin - if FEditing <> Value then - begin - FEditing := Value; - if not Value then - EditingControl.Controller.EditingItem := nil; - Changed; - end; -end; - -{ TcxControlOptionsBehavior } - -constructor TcxControlOptionsBehavior.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FImmediateEditor := True; -end; - -procedure TcxControlOptionsBehavior.Assign(Source: TPersistent); -begin - if Source is TcxControlOptionsBehavior then - with TcxControlOptionsBehavior(Source) do - begin - Self.AlwaysShowEditor := AlwaysShowEditor; - Self.CellHints := CellHints; - Self.FocusCellOnCycle := FocusCellOnCycle; - Self.FocusFirstCellOnNewRecord := FocusFirstCellOnNewRecord; - Self.GoToNextCellOnEnter := GoToNextCellOnEnter; - Self.GoToNextCellOnTab := GoToNextCellOnTab; - Self.ImmediateEditor := ImmediateEditor; - end -end; - -procedure TcxControlOptionsBehavior.Changed; -begin - if EditingControl.Controller <> nil then - EditingControl.Controller.BehaviorChanged; -end; - -function TcxControlOptionsBehavior.GetEditingControl: TcxEditingControl; -begin - Result := TcxEditingControl(GetOwner); -end; - -procedure TcxControlOptionsBehavior.SetAlwaysShowEditor(Value: Boolean); -begin - if FAlwaysShowEditor <> Value then - begin - FAlwaysShowEditor := Value; - Changed; - end; -end; - -procedure TcxControlOptionsBehavior.SetCellHints(Value: Boolean); -begin - if FCellHints <> Value then - begin - FCellHints := Value; - Changed; - end; -end; - -procedure TcxControlOptionsBehavior.SetFocusCellOnCycle(Value: Boolean); -begin - if FFocusCellOnCycle <> Value then - begin - FFocusCellOnCycle := Value; - Changed; - end; -end; - -procedure TcxControlOptionsBehavior.SetFocusFirstCellOnNewRecord( - Value: Boolean); -begin - if FFocusFirstCellOnNewRecord <> Value then - begin - FFocusFirstCellOnNewRecord := Value; - Changed; - end; -end; - -procedure TcxControlOptionsBehavior.SetGoToNextCellOnEnter(Value: Boolean); -begin - if FGoToNextCellOnEnter <> Value then - begin - FGoToNextCellOnEnter := Value; - Changed; - end; -end; - -procedure TcxControlOptionsBehavior.SetGoToNextCellOnTab(Value: Boolean); -begin - if FGoToNextCellOnTab <> Value then - begin - FGoToNextCellOnTab := Value; - with EditingControl do - if Value then - Keys := Keys + [kTab] - else - Keys := Keys - [kTab]; - Changed; - end; -end; - -procedure TcxControlOptionsBehavior.SetImmediateEditor(Value: Boolean); -begin - if FImmediateEditor <> Value then - begin - FImmediateEditor := Value; - Changed; - end; -end; - -procedure TcxControlOptionsBehavior.SetIncSearch(Value: Boolean); -begin - if Value <> FIncSearch then - begin - FIncSearch := Value; - if not Value then - EditingControl.Controller.CancelIncSearching; - end; -end; - -procedure TcxControlOptionsBehavior.SetIncSearchItem(Value: TcxCustomInplaceEditContainer); -begin - if Value <> FIncSearchItem then - begin - FIncSearchItem := Value; - EditingControl.Controller.CancelIncSearching; - end; -end; - -{ TcxEditContainerStyles } - -procedure TcxEditContainerStyles.Assign(Source: TPersistent); -begin - if Source is TcxEditContainerStyles then - Content := TcxEditContainerStyles(Source).Content; - inherited Assign(Source); -end; - -procedure TcxEditContainerStyles.Changed(AIndex: Integer); -begin - inherited Changed(AIndex); - Control.UpdateViewStyles; -end; - -function TcxEditContainerStyles.GetContainer: TcxCustomInplaceEditContainer; -begin - Result := TcxCustomInplaceEditContainer(GetOwner); -end; - -function TcxEditContainerStyles.GetControl: TcxEditingControl; -begin - Result := Container.EditingControl; -end; - -function TcxEditContainerStyles.GetControlStyles: TcxCustomControlStyles; -begin - Result := Control.Styles; -end; - -{ TcxCustomInplaceEditContainer } - -constructor TcxCustomInplaceEditContainer.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FDataBinding := GetDataBindingClass.Create(Self); - FOptions := GetOptionsClass.Create(Self); - FStyles := GetStylesClass.Create(Self); -end; - -destructor TcxCustomInplaceEditContainer.Destroy; -begin - if not EditingControl.IsDestroying and EditingControl.IsDesigning and - (Controller.DesignSelectionHelper <> nil) then - Controller.DesignSelectionHelper.UnselectObject(Self); - RepositoryItem := nil; - EditingControl := nil; - FOptions.Free; - FDataBinding.Free; - FStyles.Free; - DestroyProperties; - inherited Destroy; -end; - -procedure TcxCustomInplaceEditContainer.Assign(Source: TPersistent); -begin - if Source is TcxCustomInplaceEditContainer then - with TcxCustomInplaceEditContainer(Source) do - begin - Self.DataBinding := DataBinding; - Self.PropertiesClassName := PropertiesClassName; - Self.Properties := Properties; - Self.RepositoryItem := RepositoryItem; - Self.Styles := Styles; - Self.OnGetEditProperties := OnGetEditProperties; - end -end; - -procedure TcxCustomInplaceEditContainer.CalculateEditViewInfo( - const AValue: Variant; AEditViewInfo: TcxEditCellViewInfo; const APoint: TPoint); -var - ACanvas: TcxCanvas; -begin - ACanvas := GetControlCanvas; - cxAssignEditStyle(AEditViewInfo); - with AEditViewInfo do - begin - if IncSearching and (Controller.IncSearchingItem = Self) and - (Controller.FocusedRecordIndex = RecordIndex) then - with ViewData do - begin - SelTextColor := GetSelectedTextColor; - SelBackgroundColor := GetSelectedBKColor; - SelStart := 0; - SelLength := Length(Controller.IncSearchingText); - end - else - ViewData.SelLength := 0; - ViewData.MaxLineCount := AEditViewInfo.MaxLineCount; - ViewData.InplaceEditParams.Position.RecordIndex := RecordIndex; - ViewData.EditValueToDrawValue(ACanvas, AValue, ViewInfo); - ViewData.ContentOffset := ContentOffset; - ViewData.CalculateEx(ACanvas, ContentRect, APoint, cxmbNone, [], ViewInfo, False); - end; -end; - -function TcxCustomInplaceEditContainer.CanEdit: Boolean; -begin - Result := CanFocus and EditingControl.Options.OptionsData.Editing and - FOptions.Editing and (dceoShowEdit in DataController.EditOperations) and - (DataController.RecordCount > 0); -end; - -function TcxCustomInplaceEditContainer.CanFocus: Boolean; -begin - Result := Options.FFocusing; -end; - -procedure TcxCustomInplaceEditContainer.CancelIncSearching; -begin - Controller.CancelIncSearching; -end; - -function TcxCustomInplaceEditContainer.CanInitEditing: Boolean; -begin - Result := DataController.CanInitEditing(ItemIndex); -end; - -function TcxCustomInplaceEditContainer.CanIncSearch: Boolean; -begin - Result := (esoIncSearch in FPropertiesValue.GetSupportedOperations) and - EditingControl.Options.OptionsBehavior.IncSearch and Options.IncSearch; -end; - -function TcxCustomInplaceEditContainer.CanTabStop: Boolean; -begin - Result := Options.TabStop; -end; - -procedure TcxCustomInplaceEditContainer.Changed; -begin - if EditingControl <> nil then - EditingControl.UpdateViewStyles; -end; - -function TcxCustomInplaceEditContainer.CreateEditViewData( - AProperties: TcxCustomEditProperties; AEditStyleData: Pointer): TcxCustomEditViewData; -begin - Result := AProperties.CreateViewData(GetEditStyle(AEditStyleData), True); - Result.OnGetDisplayText := EditViewDataGetDisplayTextHandler; -end; - -procedure TcxCustomInplaceEditContainer.DataChanged; -begin - FDataBinding.Init; - InternalPropertiesChanged; -end; - -procedure TcxCustomInplaceEditContainer.DoGetDisplayText( - ARecordIndex: Integer; var AText: string); -begin -end; - -function TcxCustomInplaceEditContainer.DoGetEditProperties( - AData: Pointer): TcxCustomEditProperties; -begin - Result := - DoGetPropertiesFromEvent(FOnGetEditProperties, AData, FPropertiesValue); -end; - -procedure TcxCustomInplaceEditContainer.DoGetEditingProperties(AData: Pointer; - var AProperties: TcxCustomEditProperties); -begin - AProperties := - DoGetPropertiesFromEvent(FOnGetEditingProperties, AData, AProperties); -end; - -function TcxCustomInplaceEditContainer.DoGetPropertiesFromEvent( - AEvent: TcxGetEditPropertiesEvent; AData: Pointer; - AProperties: TcxCustomEditProperties): TcxCustomEditProperties; -begin - Result := AProperties; - if Assigned(AEvent) then - begin - AEvent(Self, AData, Result); - if Result = nil then - Result := AProperties; - end; - InitProperties(Result); -end; - -procedure TcxCustomInplaceEditContainer.DoOnPropertiesChanged(Sender: TObject); -begin - InternalPropertiesChanged; -end; - -procedure TcxCustomInplaceEditContainer.EditViewDataGetDisplayTextHandler( - Sender: TcxCustomEditViewData; var AText: string); -begin - if Sender <> nil then - DoGetDisplayText(Sender.InplaceEditParams.Position.RecordIndex, AText); -end; - -function TcxCustomInplaceEditContainer.GetDefaultEditProperties: TcxCustomEditProperties; -begin - if FRepositoryItem <> nil then - Result := FRepositoryItem.Properties - else - if FProperties <> nil then - Result := FProperties - else - Result := DataBinding.DefaultRepositoryItem.Properties; -end; - -function TcxCustomInplaceEditContainer.GetControlCanvas: TcxCanvas; -begin - if (EditingControl <> nil) and EditingControl.HandleAllocated then - Result := EditingControl.Canvas - else - Result := cxScreenCanvas; -end; - -function TcxCustomInplaceEditContainer.GetController: TcxCustomControlController; -begin - Result := EditingControl.Controller; -end; - -function TcxCustomInplaceEditContainer.GetCurrentValue: Variant; -begin - with DataController do - Result := Values[FocusedRecordIndex, ItemIndex]; -end; - -function TcxCustomInplaceEditContainer.GetDataBindingClass: TcxItemDataBindingClass; -begin - Result := TcxItemDataBinding; -end; - -function TcxCustomInplaceEditContainer.GetDefaultCaption: string; -begin - Result := DataBinding.GetDefaultCaption; -end; - -function TcxCustomInplaceEditContainer.GetDisplayValue( - AProperties: TcxCustomEditProperties; ARecordIndex: Integer): Variant; -begin - if AProperties.GetEditValueSource(False) = evsValue then - Result := Values[ARecordIndex] - else - Result := DataController.DisplayTexts[ARecordIndex, ItemIndex]; -end; - -function TcxCustomInplaceEditContainer.GetEditDataValueTypeClass: TcxValueTypeClass; -begin - Result := FDataBinding.GetValueTypeClass; -end; - -function TcxCustomInplaceEditContainer.GetEditDefaultHeight(AFont: TFont): Integer; -var - ASizeProp: TcxEditSizeProperties; -begin - ASizeProp := cxDefaultEditSizeProp; - EditViewData.Style.Font := AFont; - if AFont = nil then - EditViewData.Style.Font := EditingControl.Font; - EditViewData.ContentOffset := cxNullRect; - EditViewData.InplaceEditParams.Position.RecordIndex := 0; - Result := EditViewData.GetEditSize(GetControlCanvas, Null, ASizeProp).cy; -end; - -function TcxCustomInplaceEditContainer.GetEditHeight( - AEditViewInfo: TcxEditCellViewInfo): Integer; -var - ASizeProp: TcxEditSizeProperties; -begin - ASizeProp := cxDefaultEditSizeProp; - with AEditViewInfo do - begin - ViewData.Style.Font := ViewParams.Font; - if ViewParams.Font = nil then - EditViewData.Style.Font := EditingControl.Font; - ViewData.ContentOffset := ContentOffset; - ASizeProp.Width := cxRectWidth(ContentRect); - ASizeProp.MaxLineCount := MaxLineCount; - Result := ViewData.GetEditSize(GetControlCanvas, DisplayValue, ASizeProp).cy; - Inc(Result, Byte(bBottom in Borders)); - Inc(Result, Byte(bTop in Borders)); - end; -end; - -function TcxCustomInplaceEditContainer.GetEditWidth( - AEditViewInfo: TcxEditCellViewInfo): Integer; -var - ASizeProp: TcxEditSizeProperties; -begin - ASizeProp := cxDefaultEditSizeProp; - with AEditViewInfo do - begin - ViewData.Style.Font := ViewParams.Font; - ViewData.ContentOffset := ContentOffset; - ASizeProp.MaxLineCount := MaxLineCount; - Result := ViewData.GetEditSize(GetControlCanvas, DisplayValue, ASizeProp).cx; - end; -end; - -function TcxCustomInplaceEditContainer.GetOptionsClass: TcxCustomEditContainerItemOptionsClass; -begin - Result := TcxCustomEditContainerItemOptions; -end; - -function TcxCustomInplaceEditContainer.GetStylesClass: TcxEditContainerStylesClass; -begin - Result := TcxEditContainerStyles; -end; - -function TcxCustomInplaceEditContainer.GetValue(ARecordIndex: Integer): Variant; -begin - Result := DataController.Values[ARecordIndex, ItemIndex]; -end; - -function TcxCustomInplaceEditContainer.GetValueCount: Integer; -begin - if FEditingControl <> nil then - Result := DataController.RecordCount - else - Result := 0; -end; - -function TcxCustomInplaceEditContainer.HasDataTextHandler: Boolean; -begin - Result := False; -end; - -function TcxCustomInplaceEditContainer.GetEditing: Boolean; -begin - Result := Controller.EditingItem = Self; -end; - -function TcxCustomInplaceEditContainer.GetEditStyle(AData: Pointer): TcxCustomEditStyle; -begin - Result := EditingControl.EditStyle -end; - -function TcxCustomInplaceEditContainer.GetEditValue: Variant; -begin - if Editing then - begin - if DataController.RecordCount = 0 then - Result := Null - else - Result := DataController.GetEditValue(ItemIndex, FEditValueSource); - end - else - Result := Unassigned; -end; - -procedure TcxCustomInplaceEditContainer.PropertiesChanged; -begin - Changed; -end; - -procedure TcxCustomInplaceEditContainer.SetCurrentValue(const Value: Variant); -begin - with DataController do - Values[FocusedRecordIndex, ItemIndex] := Value; -end; - -procedure TcxCustomInplaceEditContainer.SetEditing(Value: Boolean); -begin - if Value then - Controller.EditingItem := Self - else - if Editing then - Controller.EditingItem := nil; -end; - -procedure TcxCustomInplaceEditContainer.SetEditingControl( - Value: TcxEditingControl); -begin - if FEditingControl <> Value then - begin - if Value <> nil then - Value.ViewInfo.State[cvis_StyleInvalid] := True; - if FEditingControl <> nil then - FEditingControl.DoInplaceEditContainerItemRemoved(Self); - FEditingControl := Value; - if FEditingControl <> nil then - begin - FEditingControl.BeginUpdate; - try - FEditingControl.DoInplaceEditContainerItemAdded(Self); - DataBinding.ValueTypeClassChanged; - finally - FEditingControl.CancelUpdate; - InternalPropertiesChanged; - end; - end; - end; -end; - -procedure TcxCustomInplaceEditContainer.SetEditValue(const Value: Variant); -begin - if Editing then - DataController.SetEditValue(ItemIndex, Value, FEditValueSource); -end; - -procedure TcxCustomInplaceEditContainer.SetValue( - ARecordIndex: Integer; const Value: Variant); -begin - DataController.Values[ARecordIndex, ItemIndex] := Value; -end; - -function TcxCustomInplaceEditContainer.GetDataController: TcxCustomDataController; -begin - Result := FEditingControl.DataController; -end; - -function TcxCustomInplaceEditContainer.GetFocused: Boolean; -begin - Result := Controller.FocusedItem = Self; -end; - -function TcxCustomInplaceEditContainer.GetFocusedCellViewInfo: TcxEditCellViewInfo; -begin - Result := Controller.GetFocusedCellViewInfo(Self); -end; - -function TcxCustomInplaceEditContainer.GetIncSearching: Boolean; -begin - Result := Controller.IncSearchingItem = Self; -end; - -function TcxCustomInplaceEditContainer.GetProperties: TcxCustomEditProperties; -begin - Result := FProperties; -end; - -function TcxCustomInplaceEditContainer.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := FPropertiesClass; -end; - -function TcxCustomInplaceEditContainer.GetPropertiesClassName: string; -begin - if FProperties = nil then - Result := '' - else - Result := FProperties.ClassName; -end; - -function TcxCustomInplaceEditContainer.GetPropertiesValue: TcxCustomEditProperties; -begin - Result := FPropertiesValue; - Result.LockUpdate(True); - if FDataBinding = nil then - Result.IDefaultValuesProvider := nil - else - Result.IDefaultValuesProvider := FDataBinding.DefaultValuesProvider; - Result.LockUpdate(False); -end; - -procedure TcxCustomInplaceEditContainer.SetDataBinding(Value: TcxCustomItemDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxCustomInplaceEditContainer.SetFocused(Value: Boolean); -begin - if Value then - Controller.FocusedItem := Self - else - if Focused then - // TODO: -{ if not Controller.FocusNextItem(VisibleIndex, True, True, False) then - Controller.FocusedItem := nil;} -end; - -procedure TcxCustomInplaceEditContainer.SetOptions( - Value: TcxCustomEditContainerItemOptions); -begin - FOptions.Assign(Value); -end; - -procedure TcxCustomInplaceEditContainer.SetProperties( - Value: TcxCustomEditProperties); -begin - if (FProperties <> nil) and (Value <> nil) then - FProperties.Assign(Value); -end; - -procedure TcxCustomInplaceEditContainer.SetPropertiesClass( - Value: TcxCustomEditPropertiesClass); -begin - if FPropertiesClass <> Value then - begin - FPropertiesClass := Value; - RecreateProperties; - end; -end; - -procedure TcxCustomInplaceEditContainer.SetPropertiesClassName( - const Value: string); -begin - if PropertiesClassName <> Value then - begin - with GetRegisteredEditProperties do - PropertiesClass := TcxCustomEditPropertiesClass(FindByClassName(Value)); - end; -end; - -procedure TcxCustomInplaceEditContainer.SetRepositoryItem( - Value: TcxEditRepositoryItem); -begin - if FRepositoryItem <> Value then - begin - if FRepositoryItem <> nil then - begin - FRepositoryItem.RemoveListener(Self); - Controller.EditingController.RemoveEdit(FRepositoryItem.Properties); - end; - FRepositoryItem := Value; - if FRepositoryItem <> nil then - FRepositoryItem.AddListener(Self); - InternalPropertiesChanged; - end; -end; - -procedure TcxCustomInplaceEditContainer.SetStyles( - Value: TcxEditContainerStyles); -begin - FStyles.Assign(Value); -end; - -procedure TcxCustomInplaceEditContainer.CreateProperties; -begin - if FPropertiesClass <> nil then - FProperties := FPropertiesClass.Create(Self); - InternalPropertiesChanged; -end; - -procedure TcxCustomInplaceEditContainer.DestroyProperties; -begin - FreeAndNil(FEditData); - FreeAndNil(FEditViewData); - FreeAndNil(FProperties); -end; - -procedure TcxCustomInplaceEditContainer.InitEditViewInfo( - AEditViewInfo: TcxEditCellViewInfo); - - procedure CheckOption(IsSetValue: Boolean; Value: TcxEditPaintOption); - begin - if IsSetValue then - Include(AEditViewInfo.ViewData.PaintOptions, Value) - else - Exclude(AEditViewInfo.ViewData.PaintOptions, Value); - end; - -var - AProp: TcxCustomEditProperties; -begin - with AEditViewInfo do - begin - AProp := Properties; - Properties := DoGetEditProperties(GetViewInfoData); - CellValue := GetDisplayValue; - ItemViewParams := GetEditViewParams; - if (AProp = nil) or (AProp <> Properties) then - begin - try - if IsViewDataCreated then - FreeAndNil(ViewData); - FreeAndNil(ViewInfo); - finally - if Properties = FPropertiesValue then - ViewData := EditViewData - else - ViewData := CreateEditViewData(Properties, GetViewInfoData); - IsViewDataCreated := ViewData <> EditViewData; - ViewInfo := TcxCustomEditViewInfo(Properties.GetViewInfoClass.Create); - if not IsViewDataCreated then - TcxCustomEditViewDataAccess(ViewData).InitCacheData; - end; - end - else - if not IsViewDataCreated then ViewData := EditViewData; - CheckOption(IsAutoHeight, epoAutoHeight); - CheckOption(IsEndEllipsis, epoShowEndEllipsis); - ViewData.InplaceEditParams.Position.RecordIndex := RecordIndex; - ViewData.InplaceEditParams.Position.Item := Self; - end; -end; - -procedure TcxCustomInplaceEditContainer.InitProperties( - AProperties: TcxCustomEditProperties); -begin - with AProperties do - begin - LockUpdate(True); - try - IDefaultValuesProvider := DataBinding.GetDefaultValuesProvider(AProperties); - finally - LockUpdate(False); - end; - end; -end; - -procedure TcxCustomInplaceEditContainer.InternalPropertiesChanged; -begin - if IsDestroying then Exit; - Controller.ViewInfoChanged; - if not Controller.IsEditing and not Controller.FEditingController.FEditHiding then - FreeAndNil(FEditData); - FreeAndNil(FEditViewData); - FPropertiesValue := GetDefaultEditProperties; - InitProperties(FPropertiesValue); - if EditingControl <> nil then - FEditViewData := CreateEditViewData(FPropertiesValue, nil); - with FPropertiesValue do - begin - if not Assigned(OnPropertiesChanged) then - OnPropertiesChanged := DoOnPropertiesChanged; - end; - PropertiesChanged; -end; - -function TcxCustomInplaceEditContainer.IsDestroying: Boolean; -begin - Result := csDestroying in ComponentState; -end; - -function TcxCustomInplaceEditContainer.IsEditPartVisible: Boolean; -begin - Result := (FocusedCellViewInfo <> nil) and - not IsRectEmpty(FocusedCellViewInfo.VisibleRect); -end; - -procedure TcxCustomInplaceEditContainer.RecreateProperties; -begin - DestroyProperties; - CreateProperties; -end; - -procedure TcxCustomInplaceEditContainer.RepositoryItemPropertiesChanged( - Sender: TcxEditRepositoryItem); -begin - DoOnPropertiesChanged(Sender); -end; - -procedure TcxCustomInplaceEditContainer.RepositoryItemRemoved(Sender: TcxEditRepositoryItem); -begin - RepositoryItem := nil; -end; - -{ TcxHotTrackController } - -constructor TcxHotTrackController.Create(AControl: TcxEditingControl); -begin - FControl := AControl; - HintTimer := TcxTimer.Create(nil); - HintWindow := HintWindowClass.Create(nil); - HintWindow.Color := Application.HintColor; - ResetTimer; -end; - -destructor TcxHotTrackController.Destroy; -begin - HintWindow.Free; - HintTimer.Free; - inherited Destroy; -end; - -procedure TcxHotTrackController.CancelHint; -begin - InternalHideHint(HintTimer); -end; - -procedure TcxHotTrackController.Clear; -begin - PrevHitPoint := cxInvalidPoint; - PrevElement := nil; -end; - -procedure TcxHotTrackController.SetHotElement(AElement: TObject; - const APoint: TPoint); - - procedure CalculateHotState(AObject: TObject; const P: TPoint); - var - AIntf: IcxHotTrackElement; - begin - if Supports(AObject, IcxHotTrackElement, AIntf) then - AIntf.UpdateHotTrackState(P); - end; - -begin - if Control.IsLocked then - Clear - else - try - if AElement <> PrevElement then - begin - HintElement := PrevElement; - CalculateHotState(PrevElement, cxInvalidPoint); - CalculateHotState(AElement, APoint); - end - else - if Int64(PrevHitPoint) <> Int64(APoint) then - CalculateHotState(AElement, APoint); - finally - PrevHitPoint := APoint; - PrevElement := AElement; - if AElement <> HintElement then CancelHint; - if HintNeeded then InternalShowHint(Self); - end; -end; - -type - TCustomFormAccess = class(TCustomForm); - -function TcxHotTrackController.CanShowHint: Boolean; -var - AForm: TCustomForm; -begin - Result := FShowHint and not Control.Controller.LockShowHint; - if Result then - begin - AForm := GetParentForm(Control); - Result := ((AForm = nil) or Application.Active and - (AForm.Active or (TCustomFormAccess(AForm).FormStyle = fsMDIForm))) and - not Control.IsDesigning and not Control.Dragging and - (Control.DragAndDropState = ddsNone) and - not ((Control.Controller.GetEditingViewInfo = PrevElement) and - Control.Controller.IsEditing); - end; -end; - -procedure TcxHotTrackController.CheckDestroyingElement(AElement: TObject); -begin - if (AElement = PrevElement) or (AElement = HintElement) then - begin - if AElement = PrevElement then - PrevElement := nil; - if AElement = HintElement then - begin - CancelHint; - HintElement := nil; - end; - SetHotElement(nil, cxInvalidPoint); - end; -end; - -procedure TcxHotTrackController.CheckHintClass; -begin - if HintWindow.ClassType <> HintWindowClass then - begin - HintWindow.Free; - HintWindow := HintWindowClass.Create(nil); - end; -end; - -procedure TcxHotTrackController.DoHideHint; -begin -end; - -procedure TcxHotTrackController.DoShowHint; -begin -end; - -function TcxHotTrackController.HintNeeded: Boolean; -var - P: TPoint; - AIntf: IcxHotTrackElement; - AIsNeedOffsetHint: Boolean; -begin - Result := Supports(PrevElement, IcxHotTrackElement, AIntf) and CanShowHint; - if Result then - begin - CheckHintClass; - AIsNeedOffsetHint := False; - P := cxPoint(PrevHitPoint.X, PrevHitPoint.Y); - Result := AIntf.IsNeedHint(cxScreenCanvas, P, Hint, HintIsMultiLine, - HintRect, AIsNeedOffsetHint); - Control.DoGetCellHint(PrevElement, string(Hint), Result); - if Result then - begin - P := Control.ClientToScreen(AIntf.GetOrigin); - if AIsNeedOffsetHint then Inc(P.Y, cxGetCursorSize.cy); - THintWindowAccess(HintWindow).Canvas.Font.Assign(cxScreenCanvas.Font); - if PrevElement is TcxEditCellViewInfo then - begin - Dec(P.X); - Dec(P.Y); - end; - HintRect := cxRectOffset(HintWindow.CalcHintRect(Screen.Width, Hint, nil), P.X, P.Y); - end; - cxScreenCanvas.Dormant; - end; -end; - -procedure TcxHotTrackController.InitTimer( - AInterval: Integer; AEnabled: Boolean; const AHandler: TNotifyEvent); -begin - with HintTimer do - begin - Enabled := False; - Interval := AInterval; - OnTimer := AHandler; - Enabled := AEnabled; - end; -end; - -procedure TcxHotTrackController.InternalHideHint(Sender: TObject); -begin - if HintVisible then - try - DoHideHint; - finally - HintVisible := False; - ShowWindow(HintWindow.Handle, SW_HIDE); //MUST USE ShowWindow - WIN32 BUG - ResetTimer; - end; -end; - -procedure TcxHotTrackController.InternalShowHint(Sender: TObject); -var - AHintInfo: THintInfo; -begin - if not HintVisible and (HintElement <> PrevElement) then - begin - if cxProcessControlHintInfo(AHintInfo, HintWindow, Control, Hint, HintRect, HintElement) then - begin - DoShowHint; - HintElement := PrevElement; - HintVisible := True; - Hint := AHintInfo.HintStr; - cxActivateHint(HintWindow, HintRect, Hint); - InitTimer(AHintInfo.HideTimeout, (AHintInfo.HideTimeout > 0), InternalHideHint); - end; - end; -end; - -procedure TcxHotTrackController.ResetTimer; -begin - InitTimer(Application.HintPause, False, InternalShowHint); -end; - -{ TcxEditingController } - -constructor TcxEditingController.Create(AController: TcxCustomControlController); -begin - inherited Create; - FController := AController; - FEditList := TcxInplaceEditList.Create(Controller.EditingControl); -end; - -destructor TcxEditingController.Destroy; -begin - StopEditShowingTimer; - FEditList.Free; - inherited Destroy; -end; - -function TcxEditingController.GetEditingControl: TcxEditingControl; -begin - Result := FController.EditingControl; -end; - -function TcxEditingController.GetEditingProperties: TcxCustomEditProperties; -begin - if IsEditing and not EditingControl.IsDestroying then - with Controller.EditingViewInfo do - begin - Result := EditContainer.DoGetEditProperties(GetViewInfoData); - EditContainer.DoGetEditingProperties(GetViewInfoData, Result); - end - else - Result := nil; -end; - -function TcxEditingController.GetIsDragging: Boolean; -begin - with EditingControl do - Result := Dragging or (DragAndDropState = ddsInProcess); -end; - -function TcxEditingController.GetIsEditing: Boolean; -begin - Result := FEditingItem <> nil; -end; - -procedure TcxEditingController.SetEditingItem(Value: TcxCustomInplaceEditContainer); -begin - if FEditingItem <> Value then - begin - if FEditingItemSetting then Exit; - FEditingItemSetting := True; - try - if Value <> nil then - begin - if not Value.CanEdit or not EditingControl.DoEditing(Value) then Exit; - Value.Focused := True; - end; - HideEdit(False); - FEditingItem := Value; - if IsEditing then - try - ShowEdit(Value); - if not FEditPreparing and (FEdit = nil) then - FEditingItem := nil; - except - FEditingItem := nil; - raise; - end; - finally - FEditingItemSetting := False; - end; - end; -end; - -procedure TcxEditingController.EditShowingTimerHandler(Sender: TObject); -begin - StopEditShowingTimer; - FEditShowingTimerItem.Editing := True; - Controller.FEditingBeforeDrag := Controller.IsEditing; -end; - -procedure TcxEditingController.AfterViewInfoCalculate; -begin - if IsEditing and (not FIsEditPlaced or FEditingItem.IsEditPartVisible) then - begin - CancelEditUpdatePost; - FEdit.Left := cxInvisibleCoordinate; - end; -end; - -procedure TcxEditingController.BeforeViewInfoCalculate; -begin - FIsEditPlaced := False; -end; - -procedure TcxEditingController.CancelEditUpdatePost; -begin - FEditUpdateNeeded := False; -end; - -function TcxEditingController.CanRemoveEditFocus: Boolean; -begin - Result := not (IsEditing and FEdit.IsFocused and not FEditHiding); -end; - -function TcxEditingController.CanUpdateEditValue: Boolean; -begin - Result := IsEditing and not FEditHiding and not FInitiatingEditing and - not FEdit.IsPosting; -end; - -procedure TcxEditingController.CheckEditUpdatePost; -begin - if FEditUpdateNeeded then DoUpdateEdit; -end; - -procedure TcxEditingController.AssignEditEvents; -begin - with FEdit do - begin - OnAfterKeyDown := EditAfterKeyDown; - OnEditing := EditEditing; - OnPostEditValue := EditPostEditValue; - OnExit := EditExit; - OnDblClick := EditDblClick; - OnFocusChanged := EditFocusChanged; - OnKeyDown := EditKeyDown; - OnKeyPress := EditKeyPress; - OnKeyUp := EditKeyUp; - InternalProperties.OnChange := EditChanged; - InternalProperties.OnEditValueChanged := EditValueChanged; - end; -end; - -procedure TcxEditingController.UnassignEditEvents; -begin - with FEdit do - begin - OnAfterKeyDown := nil; - OnEditing := nil; - OnPostEditValue := nil; - OnExit := nil; - OnDblClick := nil; - OnFocusChanged := nil; - OnKeyDown := nil; - OnKeyPress := nil; - OnKeyUp := nil; - InternalProperties.OnChange := FPrevEditOnChange; - InternalProperties.OnEditValueChanged := FPrevEditOnEditValueChanged; - end; -end; - -procedure TcxEditingController.DoUpdateEdit; -var - AEditViewInfo: TcxEditCellViewInfo; -begin - CancelEditUpdatePost; - if IsEditing and (FEdit <> nil) then - begin - with Controller do - begin - BeforeShowEdit; - AEditViewInfo := GetFocusedCellViewInfo(FFocusedItem); - end; - if (AEditViewInfo = nil) or - not AEditViewInfo.Visible or cxRectIsEmpty(AEditViewInfo.EditRect) then - FEdit.Left := cxInvisibleCoordinate - else - begin - if FEditPreparing then - begin - AEditViewInfo.Refresh(False); - cxAssignEditStyle(AEditViewInfo); - FEdit.Style.Assign(EditingControl.EditStyle); - end; - FEdit.BoundsRect := AEditViewInfo.EditRect; - FEdit.Visible := True; - end; - end; -end; - -function TcxEditingController.GetHideEditOnExit: Boolean; -begin - Result := not Controller.GetAlwaysShowEditor or Controller.EditingControl.IsFocused; -end; - -function TcxEditingController.GetHideEditOnFocusedRecordChange: Boolean; -begin -//TODO - Result := not FController.GetAlwaysShowEditor or - (FEditingItem <> nil) and Assigned(FEditingItem.OnGetEditProperties) {or FEditingItem.ShowButtons(False)} or -// (esoAlwaysHotTrack in FEditingItem.FocusedCellViewInfo.Properties.GetSupportedOperations)) or // TODO: HitTestController - Assigned(EditingControl.OnEditing) or Assigned(EditingControl.OnInitEdit); -end; - -procedure TcxEditingController.HideInplaceEditor; -begin - if FEdit <> nil then - begin - UnassignEditEvents; - FEdit.EditModified := False; - FController.AllowCheckEdit := False; - try - FController.SetFocus; - finally - FController.AllowCheckEdit := True; - end; - FEdit.Visible := False; - FEdit.RepositoryItem := nil; - FEdit := nil; - end; -end; - -procedure TcxEditingController.InitEdit; -begin - with FEdit.InternalProperties do - begin - FPrevEditOnChange := OnChange; - FPrevEditOnEditValueChanged := OnEditValueChanged; - OnChange := nil; - OnEditValueChanged := nil; - end; - FEdit.InplaceParams.Position := FEditingItem.FocusedCellViewInfo.GetInplaceEditPosition; - UpdateEdit; - UpdateEditValue; - AssignEditEvents; - EditingControl.DoInitEdit(FEditingItem, FEdit); -end; - -function TcxEditingController.PrepareEdit(AItem: TcxCustomInplaceEditContainer; - AIsMouseEvent: Boolean): Boolean; -var - AEditCellViewInfo: TcxEditCellViewInfo; - AProperties: TcxCustomEditProperties; - AAssignRepositoryItem: Boolean; -begin - Result := False; - Controller.CancelCheckEditPost; - if FEditPreparing or FEditHiding or (AItem = nil) or IsDragging then Exit; - if AItem.Editing and not FEditingItemSetting then - begin - Result := (FEdit <> nil) and (FController.EditingControl.Focused and - not FEdit.IsFocused or AIsMouseEvent); - Exit; - end; - EditingControl.ViewInfo.ValidateDirty; - FEditPreparing := True; - try - Result := FController.EditingControl.Focused; - if not Result then Exit; - Controller.BeforeShowEdit; - AEditCellViewInfo := Controller.GetFocusedCellViewInfo(AItem); - AItem.Editing := AEditCellViewInfo <> nil; - Result := AItem.Editing; - EditingControl.ViewInfo.ValidateDirty; - if not Result then Exit; - try - AItem.FEditValueSource := EditingProperties.GetEditValueSource(True); - AProperties := EditingProperties; - AAssignRepositoryItem := NeedAssignRepositoryItem(AItem.Properties, - AItem.RepositoryItem, AProperties); - FEdit := FEditList.GetEdit(AProperties); - if AAssignRepositoryItem then - FEdit.RepositoryItem := AItem.RepositoryItem; - FEdit.Visible := False; - FEdit.Parent := nil; - FEdit.Parent := EditingControl; - except - AItem.Editing := False; - Result := False; - raise; - end; - FEditingItem.FocusedCellViewInfo.Invalidate; - InitEdit; - finally - FEditPreparing := False; - end; -end; - -procedure TcxEditingController.UpdateEdit; -begin - if (FEdit = nil) or (FEditingItem.FocusedCellViewInfo = nil) then Exit; - if FEditPreparing then - DoUpdateEdit - else - PostEditUpdate; - FIsEditPlaced := True; -end; - -procedure TcxEditingController.UpdateEditValue; -begin - if CanUpdateEditValue then - begin - FEdit.LockChangeEvents(True); - try - FEdit.EditValue := EditingItem.EditValue; - finally - FEdit.LockChangeEvents(False, False); - end; - FEdit.SelectAll; - end; -end; - -procedure TcxEditingController.UpdateValue; -begin - if IsEditing and FEdit.EditModified then - begin - FEdit.ValidateEdit(True); - FEditingItem.EditValue := FEdit.EditValue; - if FEdit <> nil then - FEdit.ModifiedAfterEnter := False; - end; -end; - -procedure TcxEditingController.EditAfterKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if FController.IsKeyForController(Key, Shift) then - FController.KeyDown(Key, Shift); -end; - -procedure TcxEditingController.EditChanged(Sender: TObject); -begin - if Assigned(FPrevEditOnChange) then FPrevEditOnChange(Sender); - EditingControl.DoEditChanged(FEditingItem); -end; - -procedure TcxEditingController.EditDblClick(Sender: TObject); -begin - Controller.DoEditDblClick(Sender); -end; - -procedure TcxEditingController.EditEditing(Sender: TObject; var CanEdit: Boolean); -begin - FInitiatingEditing := True; - try - CanEdit := (EditingItem <> nil) and EditingItem.CanInitEditing; - finally - FInitiatingEditing := False; - end; -end; - -procedure TcxEditingController.EditEnter(Sender: TObject); -begin - if not Controller.Focused then - begin - Controller.Focused := True; - Controller.ControlFocusChanged; - end; -end; - -procedure TcxEditingController.EditExit(Sender: TObject); -begin - if HideEditOnExit then - try - HideEdit(not FController.GetCancelEditingOnExit); - except - if IsEditing then - begin - FEdit.SetFocus; - FIsErrorOnEditExit := True; - end; - raise; - end; - FController.EditingControl.FocusChanged; -end; - -procedure TcxEditingController.EditFocusChanged(Sender: TObject); -begin - Controller.FFocused := EditingControl.IsFocused or - (IsEditing and (Edit <> nil) and Edit.Focused); - Controller.EditingControl.ViewInfo.UpdateSelection; -end; - -procedure TcxEditingController.EditKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -var - AModified: Boolean; -begin - if Assigned(EditingControl.OnKeyDown) then - EditingControl.OnKeyDown(EditingControl, Key, Shift); - with FController do - begin - BeforeEditKeyDown(Key, Shift); - if not EditingControl.IsScrollingContent and IsKeyForController(Key, Shift) then - FController.MakeFocusedItemVisible; - end; - case Key of - VK_RETURN: - begin - HideEdit(True); - if FController.GetGoToNextCellOnEnter then - begin - FController.BlockRecordKeyboardHandling := True; - try - FController.KeyDown(Key, Shift); - finally - FController.BlockRecordKeyboardHandling := False; - end; - ShowEdit; - end - else - FController.CheckEdit; - Key := 0; - end; - VK_ESCAPE: - begin - AModified := FEdit.EditModified; - HideEdit(False); - FController.CheckEdit; - if AModified then Key := 0; - end; - VK_DELETE: - if Shift = [ssCtrl] then - begin - FController.KeyDown(Key, Shift); - Key := 0; - end; - end; -end; - -procedure TcxEditingController.EditKeyPress(Sender: TObject; var Key: Char); -begin - if Assigned(EditingControl.OnKeyPress) then - EditingControl.OnKeyPress(EditingControl, Key); - if Key = #27 then Key := #0; - FController.MakeFocusedItemVisible; -end; - -procedure TcxEditingController.EditKeyUp(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if Assigned(EditingControl.OnKeyUp) then - EditingControl.OnKeyUp(EditingControl, Key, Shift); -end; - -procedure TcxEditingController.EditPostEditValue(Sender: TObject); -begin - UpdateValue; -end; - -procedure TcxEditingController.EditValueChanged(Sender: TObject); -begin - if Assigned(FPrevEditOnEditValueChanged) then FPrevEditOnEditValueChanged(Sender); - EditingControl.DoEditValueChanged(FEditingItem); -end; - -procedure TcxEditingController.HideEdit(Accept: Boolean); -var - AEditViewInfo: TcxEditCellViewInfo; - AItem: TcxCustomInplaceEditContainer; -begin - FController.CancelCheckEditPost; - CancelEditUpdatePost; - StopEditShowingTimer; - if FEditHiding or not IsEditing or EditingControl.IsDestroying then Exit; - FEditHiding := True; - try - if Accept then - begin - if not FEdit.Deactivate then raise EAbort.Create(''); - EditingControl.DataController.PostEditingData; - if FController.IsImmediatePost then - EditingControl.DataController.Post; - if FEditingItem = nil then Exit; - AEditViewInfo := FEditingItem.FocusedCellViewInfo; - if AEditViewInfo <> nil then - FEdit.InternalProperties.Update(AEditViewInfo.Properties); - end; - AItem := EditingItem; - if not EditingControl.IsDestroying then - EditingControl.DoEdited(AItem); - EditingItem := nil; - Controller.RefreshFocusedCellViewInfo(AItem); - HideInplaceEditor; - FIsErrorOnEditExit := False; - finally - FEditHiding := False; - if EditingControl.ViewInfo.IsDirty then - EditingControl.LayoutChanged; - end; -end; - -procedure TcxEditingController.PostEditUpdate; -begin - FEditUpdateNeeded := True; -end; - -procedure TcxEditingController.RemoveEdit(AProperties: TcxCustomEditProperties); -begin - if EditingProperties = AProperties then - EditingItem := nil; - FEditList.RemoveItem(AProperties); -end; - -procedure TcxEditingController.ShowEdit(AItem: TcxCustomInplaceEditContainer = nil); -begin - if AItem = nil then AItem := FController.FocusedItem; - if PrepareEdit(AItem, False) then - FEdit.Activate(AItem.FEditData); -end; - -procedure TcxEditingController.ShowEdit(AItem: TcxCustomInplaceEditContainer; Key: Char); -begin - if PrepareEdit(AItem, False) then - FEdit.ActivateByKey(Key, AItem.FEditData); -end; - -procedure TcxEditingController.ShowEdit(AItem: TcxCustomInplaceEditContainer; - Shift: TShiftState; X, Y: Integer); -begin - if PrepareEdit(AItem, True) then - FEdit.ActivateByMouse(Shift, X, Y, AItem.FEditData); -end; - -procedure TcxEditingController.StartEditShowingTimer(AItem: TcxCustomInplaceEditContainer); -begin - StopEditShowingTimer; - FEditShowingTimerItem := AItem; - FEditShowingTimer := TcxTimer.Create(nil); - with FEditShowingTimer do - begin - Interval := GetDblClickInterval; - OnTimer := EditShowingTimerHandler; - end; -end; - -procedure TcxEditingController.StopEditShowingTimer; -begin - FreeAndNil(FEditShowingTimer); -end; - -{ TcxSizingDragAndDropObject } - -procedure TcxSizingDragAndDropObject.BeginDragAndDrop; -begin - if (DragItem = nil) or (DragSizing = nil) then - raise EAbort.Create(''); - FDirection := Controller.GetResizeDirection; - FDragBounds := DragSizing.GetSizingBoundsRect(FDirection); - FSizeDelta := DragSizing.GetSizingIncrement(FDirection); - FStartPos := CurMousePos; - FDragPos := GetDragPos(CurMousePos); - FDynamicUpdate := DragSizing.IsDynamicUpdate; - inherited BeginDragAndDrop; -end; - -procedure TcxSizingDragAndDropObject.DirtyChanged; -begin - if not DynamicUpdate and cxRectIntersect(GetSizingMarkBounds, Control.ClientBounds) then - Canvas.InvertRect(GetSizingMarkBounds); - inherited DirtyChanged; -end; - -procedure TcxSizingDragAndDropObject.DragAndDrop( - const P: TPoint; var Accepted: Boolean); -var - ADragPos: TPoint; -begin - Accepted := True; - ADragPos := GetDragPos(P); - with FDragBounds do - if (DragCoord[P] < DragCoord[TopLeft]) or (DragCoord[P] > DragCoord[BottomRight]) then Exit; - if not DynamicUpdate then - FDelta := Round((DragCoord[P] - DragCoord[StartPos]) / SizeDelta) - else - FDelta := Trunc((DragCoord[P] - DragCoord[StartPos]) / SizeDelta); - if (FDelta = 0) and (DragCoord[ADragPos] = DragCoord[DragPos]) then Exit; - Dirty := True; - FDragPos := ADragPos; - if DynamicUpdate then - begin - DragSizing.SetSizeDelta(Direction, Delta); - FStartPos := P; - end; - inherited DragAndDrop(P, Accepted); -end; - -procedure TcxSizingDragAndDropObject.EndDragAndDrop(Accepted: Boolean); -begin - inherited EndDragAndDrop(Accepted); - if Accepted and not DynamicUpdate and (Delta <> 0) and not Controller.FDragCancel then - DragSizing.SetSizeDelta(Direction, Delta); -end; - -function TcxSizingDragAndDropObject.GetDragAndDropCursor( - Accepted: Boolean): TCursor; -begin - if IsHorzSizing then - Result := crHSplit - else - Result := crVSplit; -end; - -function TcxSizingDragAndDropObject.GetDragCoord(APoint: TPoint): Integer; -begin - if IsHorzSizing then - Result := APoint.X - else - Result := APoint.Y; -end; - -function TcxSizingDragAndDropObject.GetDragPos(const APoint: TPoint): TPoint; -begin - Result := FStartPos; - with Result do - begin - if IsHorzSizing then - Inc(X, Round((DragCoord[APoint] - X) / SizeDelta) * SizeDelta) - else - Inc(Y, Round((DragCoord[APoint] - Y) / SizeDelta) * SizeDelta); - end; -end; - -function TcxSizingDragAndDropObject.GetImmediateStart: Boolean; -begin - Result := True; -end; - -function TcxSizingDragAndDropObject.GetSizingMarkBounds: TRect; -begin - if IsHorzSizing then - Result := cxRectSetLeft(FDragBounds, - DragPos.X - cxSizingMarkWidth div 1, cxSizingMarkWidth) - else - Result := cxRectSetTop(FDragBounds, - DragPos.Y - cxSizingMarkWidth div 1, cxSizingMarkWidth); -end; - -function TcxSizingDragAndDropObject.GetCanvas: TcxCanvas; -begin - Result := TcxEditingControl(Control).Canvas; -end; - -function TcxSizingDragAndDropObject.GetController: TcxCustomControlController; -begin - Result := TcxEditingControl(Control).Controller; -end; - -function TcxSizingDragAndDropObject.GetDragItem: TObject; -begin - Result := Controller.DragItem; -end; - -function TcxSizingDragAndDropObject.GetDragSizing: IcxDragSizing; -begin - Supports(DragItem, IcxDragSizing, Result); -end; - -function TcxSizingDragAndDropObject.GetIsSizingKind(Index: Integer): Boolean; -begin - Result := TcxDragSizingDirection(Index) = FDirection; -end; - -{ TcxAutoScrollingObject } - -constructor TcxAutoScrollingObject.Create(AOwner: TObject); -begin - FOwner := AOwner; - FTimer := TcxTimer.Create(nil); - FTimer.Enabled := False; - FTimer.Interval := cxScrollWidthDragInterval; - FTimer.OnTimer := TimerHandler; -end; - -destructor TcxAutoScrollingObject.Destroy; -begin - FTimer.Enabled := False; - FTimer.Free; - inherited Destroy; -end; - -function TcxAutoScrollingObject.Check(APos: TPoint): Boolean; -begin - Result := cxRectPtIn(FArea, APos); - FTimer.Enabled := Result; -end; - -procedure TcxAutoScrollingObject.SetParams( - const Area: TRect; AKind: TScrollBarKind; ACode: TScrollCode; AIncrement: Integer); -begin - FArea := Area; - FCode := ACode; - FKind := AKind; - if ACode = scLineUp then - AIncrement := -AIncrement; - FIncrement := AIncrement; -end; - -procedure TcxAutoScrollingObject.Stop; -begin - FTimer.Enabled := False; -end; - -procedure TcxAutoScrollingObject.DoScrollInspectingControl; -var - AMin, AMax, APos, ANewPos: Integer; -begin - with GetScrollBar(FKind) do - begin - AMin := Min; - AMax := Max - PageSize + 1; - APos := Position; - ANewPos := APos + FIncrement; - if ANewPos < AMin then ANewPos := AMin - else - if ANewPos > AMax then ANewPos := AMax; - end; - if GetScrollBar(FKind).Visible and (ANewPos <> APos) then - Control.Controller.Scroll(FKind, FCode, ANewPos); -end; - -function TcxAutoScrollingObject.GetScrollBar(AKind: TScrollBarKind): TcxControlScrollBar; -begin - with Control do - if AKind = sbHorizontal then Result := HScrollBar else Result := VScrollBar; -end; - -procedure TcxAutoScrollingObject.TimerHandler(Sender: TObject); -begin - DoScrollInspectingControl; -end; - -function TcxAutoScrollingObject.GetControl: TcxEditingControl; -begin - Result := nil; -end; - -{ TcxDragDropAutoScrollingObject } - -function TcxDragDropObjectAutoScrollingObject.GetControl: TcxEditingControl; -begin - Result := TcxEditingControl(TcxDragAndDropObjectAccess(FOwner).Control); -end; - -{ TcxControllerAutoScrollingObject } - -function TcxControllerAutoScrollingObject.CheckBounds(APos: TPoint): Boolean; -begin - FDirections := []; - Result := not cxRectPtIn(FArea, APos); - if Result then - begin - if FCheckHorz then - if APos.X <= FArea.Left then - Include(FDirections, nLeft) - else - if APos.X >= FArea.Right then - Include(FDirections, nRight); - if FCheckVert then - if APos.Y <= FArea.Top then - Include(FDirections, nTop) - else - if APos.Y >= FArea.Bottom then - Include(FDirections, nBottom); - Result := Result and (FDirections <> []); - end; - FTimer.Enabled := Result; -end; - -procedure TcxControllerAutoScrollingObject.SetBoundsParams( - const AClientArea: TRect; ACheckHorz, ACheckVert: Boolean; AIncrement: Integer); -begin - FArea := AClientArea; - FCheckHorz := ACheckHorz; - FCheckVert := ACheckVert; - FIncrement := AIncrement; - FBoundsMode := True; -end; - -procedure TcxControllerAutoScrollingObject.DoScrollInspectingControl; - - procedure CheckDirection(ADir: TcxNeighbor); - const - Kinds: array[Boolean] of TScrollBarKind = (sbVertical, sbHorizontal); - Codes: array[Boolean] of TScrollCode = (scLineDown, scLineUp); - var - AMin, AMax, APos, ANewPos: Integer; - AKind: TScrollBarKind; - ACode: TScrollCode; - begin - AKind := Kinds[ADir in [nLeft, nRight]]; - with GetScrollBar(AKind) do - begin - if Visible then - begin - AMin := Min; - AMax := Max - PageSize + 1; - APos := Position; - ACode := Codes[ADir in [nLeft, nTop]]; - if ACode = scLineDown then - ANewPos := APos + FIncrement - else - ANewPos := APos - FIncrement; - if ANewPos < AMin then ANewPos := AMin - else - if ANewPos > AMax then ANewPos := AMax; - if ANewPos <> APos then - Control.Controller.Scroll(AKind, ACode, ANewPos); - end; - end; - end; - -var - I: TcxNeighbor; -begin - if not FBoundsMode then - inherited DoScrollInspectingControl - else - for I := nLeft to nBottom do - if I in FDirections then - CheckDirection(I); -end; - -function TcxControllerAutoScrollingObject.GetControl: TcxEditingControl; -begin - Result := TcxCustomControlController(FOwner).EditingControl; -end; - -{ TcxPlaceArrows } - -constructor TcxPlaceArrows.CreateArrows( - AColor: TColor; ABorderColor: TColor = clDefault); -begin - inherited Create(); - FBorderColor := ABorderColor; - FColor := AColor; -{$IFDEF DELPHI6} - AlphaBlend := False; -{$ENDIF} -end; - -function TcxPlaceArrows.MoveTo(ARect: TRect; ASide: TcxBorder): Boolean; -var - R: TRect; - ARgn: HRGN; -begin - HandleNeeded; - Result := not EqualRect(ARect, FPrevRect) or (ASide <> FPrevSide) or not Visible; - if Result then - begin - Hide; - FPrevRect := ARect; - FPrevSide := ASide; - ARgn := CreateArrowsRgns(ARect, ASide); - GetRgnBox(ARgn, R); - SetBounds(R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top); - OffsetRect(ARect, -R.Left, -R.Top); - OffsetRgn(ARgn, -R.Left, -R.Top); - cxDrawArrows(Canvas.Canvas, ARect, ASide, Color, BorderColor); - WindowRegion := ARgn; - Show; - end; -end; - -function TcxPlaceArrows.CreateArrowsRgns(const ARect: TRect; ASide: TcxBorder): HRGN; -var - ArrowRgns: array[0..1, 0..6, 0..1] of Integer; - BaseLine: array[0..1, 0..1] of Integer; - I, J, K: Integer; - ArrowRgn: HRGN; -const - BaseRgns: array[0..3, 0..6, 0..1] of Integer = - (((0, 0), (-5, -6), (-2, -6), (-2, -9), (3, -9), (3, -6), (6, -6)), - ((0, -1), (6, 6), (3, 6), (3, 9), (-2, 9), (-2, 6), (-6, 6)), - ((0, 0), (-6, -6), (-6, -2), (-9, -2), (-9, 3), (-6, 3), (-6, 6)), - ((0, 0), (6, 6), (6, 3), (9, 3), (9, -2), (6, -2), (6, -6))); -begin - with ARect do - begin - BaseLine[0, 0] := Left; - BaseLine[0, 1] := Top; - BaseLine[1, 0] := Right; - BaseLine[1, 1] := Bottom; - end; - if ASide in [bLeft, bBottom] then - begin - BaseLine[Byte(ASide = bLeft), 0] := ARect.Left; - BaseLine[Byte(ASide = bLeft), 1] := ARect.Bottom; - end - else - begin - BaseLine[Byte(ASide = bTop), 0] := ARect.Right; - BaseLine[Byte(ASide = bTop), 1] := ARect.Top; - end; - Move(BaseRgns[Byte(ASide in [bTop, bBottom]) shl 1], ArrowRgns, SizeOf(ArrowRgns)); - for I := 0 to 1 do - for J := 0 to 6 do - for K := 0 to 1 do - Inc(ArrowRgns[I, J, K], BaseLine[I, K]); - Result := CreateRectRgn(0, 0, 0, 0); - for I := 0 to 1 do - begin - ArrowRgn := CreatePolygonRgn(ArrowRgns[I], Length(ArrowRgns[I]), ALTERNATE); - CombineRgn(Result, Result, ArrowRgn, RGN_OR); - DeleteObject(ArrowRgn); - end; -end; - -procedure TcxPlaceArrows.SetWindowRegion(ARegion: HRGN); -begin - if FWindowRegion <> 0 then - DeleteObject(FWindowRegion); - FWindowRegion := ARegion; - if ARegion <> 0 then - SetWindowRgn(Handle, ARegion, False); -end; - -{ TcxBaseDragAndDropObject } - -function TcxBaseDragAndDropObject.GetDragAndDropCursor( - Accepted: Boolean): TCursor; -begin - if Accepted then - Result := EditingControl.DragCursor - else - Result := crNoDrop; -end; - -function TcxBaseDragAndDropObject.GetEditingControl: TcxEditingControl; -begin - Result := TcxEditingControl(Control); -end; - -{ TcxCustomControlDragAndDropObject } - -constructor TcxCustomControlDragAndDropObject.Create(AControl: TcxControl); -begin - inherited Create(AControl); - FAutoScrollObjects := TList.Create; -end; - -destructor TcxCustomControlDragAndDropObject.Destroy; -var - I: Integer; -begin - for I := 0 to FAutoScrollObjects.Count - 1 do - TObject(FAutoScrollObjects.List^[I]).Free; - FAutoScrollObjects.Free; - FDragImage.Free; - inherited Destroy; -end; - -procedure TcxCustomControlDragAndDropObject.AddAutoScrollingObject( - const ARect: TRect; AKind: TScrollBarKind; ACode: TScrollCode); -var - AObj: TcxAutoScrollingObject; -begin - AObj := GetAutoScrollingObjectClass.Create(Self); - if AKind = sbHorizontal then - AObj.SetParams(ARect, AKind, ACode, GetHorzScrollInc) - else - AObj.SetParams(ARect, AKind, ACode, GetVertScrollInc); - FAutoScrollObjects.Add(AObj); -end; - -procedure TcxCustomControlDragAndDropObject.BeginDragAndDrop; -begin - inherited BeginDragAndDrop; - DrawDragImage; -end; - -procedure TcxCustomControlDragAndDropObject.DragAndDrop(const P: TPoint; - var Accepted: Boolean); -var - R: TRect; -begin - inherited DragAndDrop(P, Accepted); - R := cxRectOffset(PictureSize, [OrgOffset, HotSpot, CurMousePos]); - DrawImage(R.TopLeft); -//lcm - if not CheckScrolling(P) then; -// Accepted := cxRectPtIn(GetAcceptedRect, P); - FCanDrop := Accepted; -end; - -procedure TcxCustomControlDragAndDropObject.DrawDragImage; -var - AOrg: TRect; - ASaveCanvas: TcxCanvas; -begin - AOrg := DisplayRect; - with AOrg do - FPictureSize := Rect(0, 0, Right - Left, Bottom - Top); - - FDragImage := TcxDragImage.Create; - FDragImage.SetBounds(0, 0, FPictureSize.Right, FPictureSize.Bottom); - - FHotSpot.X := AOrg.Left - CurMousePos.X; - FHotSpot.Y := AOrg.Top - CurMousePos.Y; - cxSetCanvasOrg(FDragImage.Canvas.Canvas, AOrg); - - FOrgOffset := Control.ClientToScreen(FOrgOffset); - ASaveCanvas := TcxEditingControl(Control).Painter.FCanvas; - TcxEditingControl(Control).Painter.FCanvas := FDragImage.Canvas; - try - Paint; - finally - TcxEditingControl(Control).Painter.FCanvas := ASaveCanvas; - cxSetCanvasOrg(FDragImage.Canvas.Canvas, AOrg); - end; -end; - -procedure TcxCustomControlDragAndDropObject.DrawImage( - const APoint: TPoint); -begin - DragImage.MoveTo(APoint); - DragImage.Show; -end; - -procedure TcxCustomControlDragAndDropObject.EndDragAndDrop( - Accepted: Boolean); -begin - StopScrolling; - inherited EndDragAndDrop(Accepted); -end; - -function TcxCustomControlDragAndDropObject.GetAcceptedRect: TRect; -begin - Result := cxNullRect; -end; - -function TcxCustomControlDragAndDropObject.GetAutoScrollingObjectClass: TcxAutoScrollingObjectClass; -begin - Result := TcxDragDropObjectAutoScrollingObject; -end; - -function TcxCustomControlDragAndDropObject.GetDisplayRect: TRect; -begin - cxAbstractError; -end; - -function TcxCustomControlDragAndDropObject.GetDragAndDropCursor( - Accepted: Boolean): TCursor; -const - DragCursors: array[Boolean] of TCursor = (crcxNoDrop, crDefault); -begin - Result := DragCursors[Accepted]; -end; - -function TcxCustomControlDragAndDropObject.GetHorzScrollInc: Integer; -begin - Result := 1; -end; - -function TcxCustomControlDragAndDropObject.GetVertScrollInc: Integer; -begin - Result := 1; -end; - -procedure TcxCustomControlDragAndDropObject.OwnerImageChanged; -begin - DrawImage(cxPointOffset(cxPointOffset(CurMousePos, FOrgOffset), HotSpot)); -end; - -procedure TcxCustomControlDragAndDropObject.OwnerImageChanging; -begin -end; - -procedure TcxCustomControlDragAndDropObject.Paint; -begin - cxAbstractError; -end; - -procedure TcxCustomControlDragAndDropObject.StopScrolling; -var - I: Integer; -begin - for I := 0 to AutoScrollObjectCount - 1 do - AutoScrollObjects[I].Stop; -end; - -function TcxCustomControlDragAndDropObject.CheckScrolling( - const P: TPoint): Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to AutoScrollObjectCount - 1 do - Result := Result or AutoScrollObjects[I].Check(P); -end; - -function TcxCustomControlDragAndDropObject.GetAutoScrollObject( - Index: Integer): TcxAutoScrollingObject; -begin - Result := TcxAutoScrollingObject(FAutoScrollObjects[Index]); -end; - -function TcxCustomControlDragAndDropObject.GetAutoScrollObjectCount: Integer; -begin - Result := FAutoScrollObjects.Count; -end; - -function TcxCustomControlDragAndDropObject.GetCanvas: TcxCanvas; -begin - Result := TcxEditingControl(Control).Painter.FCanvas; -end; - -function TcxCustomControlDragAndDropObject.GetHitTestController: TcxCustomHitTestController; -begin - Result := TcxEditingControl(Control).Controller.HitTestController; -end; - -constructor TcxDragImageHelper.Create(AControl: TcxEditingControl; - ADragPos: TPoint); -begin - FDragControl := AControl; - FDragPos := ADragPos; - InitDragImage; -end; - -destructor TcxDragImageHelper.Destroy; -begin - if DragImageVisible then Hide; - FreeAndNil(DragImage); - inherited Destroy; -end; - -procedure TcxDragImageHelper.Hide; -begin - FDragImageVisible := False; - DragImage.Hide; -end; - -procedure TcxDragImageHelper.Show; -begin - FDragImageVisible := True; - DrawImage(MousePos); - DragImage.Show; -end; - -procedure TcxDragImageHelper.DragAndDrop(const P: TPoint); -var - R: TRect; -begin - R := cxRectOffset(DragPictureBounds, [HotSpot, P]); - MousePos := R.TopLeft; - DrawImage(MousePos); -end; - -function TcxDragImageHelper.GetDisplayRect: TRect; -begin - Result := DragControl.DragDropImageDisplayRect; -end; - -procedure TcxDragImageHelper.InitDragImage; -begin - DragPictureBounds := GetDisplayRect; - HotSpot := DragPictureBounds.TopLeft; - DragPictureBounds := cxRectOffset(DragPictureBounds, cxPointInvert(HotSpot)); - with FDragPos do - HotSpot := cxPoint(HotSpot.X - X, HotSpot.Y - Y); - DragImage := TcxDragImage.Create; - with cxRectSize(DragPictureBounds) do - DragImage.SetBounds(0, 0, Cx, Cy); - DragControl.DrawDragDropImage(DragImage.Image, DragImage.Canvas); -end; - -procedure TcxDragImageHelper.DrawImage( - const APoint: TPoint); -begin - DragImage.MoveTo(APoint); - if not DragImage.Visible then - DragImage.Show; -end; - -function TcxDragImageHelper.GetImageRect: TRect; -begin - Result := cxRectOffset(DragPictureBounds, MousePos) -end; - -procedure TcxDragImageHelper.SetDragImageVisible(Value: Boolean); -begin - if Value <> FDragImageVisible then - begin - FDragImageVisible := Value; - if Value then - Show - else - Hide; - end; -end; - -{ TcxCustomHitTestController } - -constructor TcxCustomHitTestController.Create(AOwner: TcxCustomControlController); -begin - FController := AOwner; - FHitPoint := cxInvalidPoint; -end; - -destructor TcxCustomHitTestController.Destroy; -begin -end; - -procedure TcxCustomHitTestController.ReCalculate; -begin - Recalculate(FHitPoint); -end; - -procedure TcxCustomHitTestController.ReCalculate(const APoint: TPoint); -begin - ClearState; - if Control.IsLocked then Exit; - FHitPoint := APoint; - ViewInfo.ValidateDirty; - DoCalculate; -end; - -function TcxCustomHitTestController.AllowDesignMouseEvents( - X, Y: Integer; AShift: TShiftState): Boolean; -begin - RecalculateOnMouseEvent(X, Y, AShift); - Result := False; -end; - -function TcxCustomHitTestController.CanShowHint(AItem: TObject): Boolean; -begin - Result := Control.Options.OptionsBehavior.CellHints; -end; - -procedure TcxCustomHitTestController.ClearState; -begin - FHitState := FHitState and echc_IsMouseEvent; -end; - -procedure TcxCustomHitTestController.DestroyingItem(AItem: TObject); -begin - if FHitTestItem = AItem then - begin - FHitTestItem := nil; - ClearState; - Controller.HotTrackController.CheckDestroyingElement(AItem); - end; -end; - -procedure TcxCustomHitTestController.DoCalculate; -var - I: Integer; - AItem: TcxEditCellViewInfo; -begin - with ViewInfo do - for I := 0 to FEditCellViewInfoList.Count - 1 do - begin - AItem := FEditCellViewInfoList.List^[I]; - if AItem.Visible and cxRectPtIn(AItem.ClipRect, HitPoint) then - begin - HitTestItem := AItem; - Exit; - end; - end; - HitTestItem := nil; -end; - -function TcxCustomHitTestController.GetCurrentCursor: TCursor; -begin - Result := crDefault; -end; - -procedure TcxCustomHitTestController.HitCodeChanged(APrevCode: Integer); -begin -end; - -procedure TcxCustomHitTestController.HitTestItemChanged(APrevHitTestItem: TObject); -begin -end; - -procedure TcxCustomHitTestController.RecalculateOnMouseEvent(X, Y: Integer; AShift: TShiftState); -begin - FShift := AShift; - IsMouseEvent := True; - try - ReCalculate(cxPoint(X, Y)); - finally - IsMouseEvent := False; - end; -end; - -function TcxCustomHitTestController.GetControl: TcxEditingControl; -begin - Result := Controller.EditingControl; -end; - -function TcxCustomHitTestController.GetCoordinate(AIndex: Integer): Integer; -begin - Result := PIntArray(@FHitPoint)^[AIndex]; -end; - -function TcxCustomHitTestController.GetEditCellViewInfo: TcxEditCellViewInfo; -begin - if IsItemEditCell then - Result := TcxEditCellViewInfo(FHitTestItem) - else - Result := nil; -end; - -function TcxCustomHitTestController.GetHasCode(Mask: TcxHitCode): Boolean; -begin - Result := FHitState and Mask <> 0; -end; - -function TcxCustomHitTestController.GetHotTrackController: TcxHotTrackController; -begin - Result := FController.HotTrackController; -end; - -function TcxCustomHitTestController.GetIsItemEditCell: Boolean; -begin - Result := FHitTestItem is TcxEditCellViewInfo; -end; - -function TcxCustomHitTestController.GetIsMouseEvent: Boolean; -begin - Result := FHitState and echc_IsMouseEvent <> 0; -end; - -function TcxCustomHitTestController.GetViewInfo: TcxCustomControlViewInfo; -begin - Result := Control.ViewInfo; -end; - -procedure TcxCustomHitTestController.SetCoordinate(AIndex: Integer; Value: Integer); -begin - PIntArray(@FHitPoint)^[AIndex] := Value; - Recalculate; -end; - -procedure TcxCustomHitTestController.SetHasCode(ACode: TcxHitCode; AValue: Boolean); -var - APrevState: TcxHitCode; -begin - if (FHitState and ACode <> 0) <> AValue then - begin - APrevState := FHitState; - if AValue then - FHitState := FHitState or ACode - else - FHitState := FHitState and not ACode; - HitCodeChanged(APrevState); - end; -end; - -procedure TcxCustomHitTestController.SetHitPoint(const APoint: TPoint); -begin - Recalculate(APoint); -end; - -procedure TcxCustomHitTestController.SetHitTestItem(AItem: TObject); -var - APrevItem: TObject; -begin - APrevItem := FHitTestItem; - FHitTestItem := AItem; - if IsMouseEvent then - with Controller.HotTrackController do - begin - ShowHint := Self.CanShowHint(AItem); - SetHotElement(AItem, HitPoint); - end; - if APrevItem <> AItem then - HitTestItemChanged(APrevItem); -end; - -procedure TcxCustomHitTestController.SetIsMouseEvent(Value: Boolean); -begin - if Value then - FHitState := FHitState or echc_IsMouseEvent - else - FHitState := FHitState and not echc_IsMouseEvent; -end; - -{ TcxCustomCellNavigator } - -constructor TcxCustomCellNavigator.Create(AController: TcxCustomControlController); -begin - FController := AController; -end; - -procedure TcxCustomCellNavigator.FocusNextCell(AForward, ANextRow: Boolean; - AShift: TShiftState = []); -var - APrevRowIndex, APrevCellIndex, ARowIndex, ACellIndex: Integer; - - function IsValidCellIndex(ACount: Integer): Boolean; - begin - Result := cxInRange(ACellIndex, 0, ACount - 1) or - (MayFocusedEmptyRow(ARowIndex) and (ACount = 0)); - end; - -begin - Init(APrevRowIndex, APrevCellIndex, RowCount); - ARowIndex := APrevRowIndex; - ACellIndex := APrevCellIndex; - if ANextRow then - CalcNextRow(AForward, ARowIndex, ACellIndex) - else - ACellIndex := APrevCellIndex + cxIntOffs[AForward]; - SelectCell(AForward, ANextRow, ARowIndex, ACellIndex); - if not IsValidCellIndex(Count[ARowIndex]) then - begin - ACellIndex := APrevCellIndex; - ARowIndex := APrevRowIndex; - end; - if (ARowIndex <> APrevRowIndex) or (ACellIndex <> APrevCellIndex) then - SetFocusCell(ARowIndex, ACellIndex, AShift); -end; - -procedure TcxCustomCellNavigator.KeyDown(var Key: Word; Shift: TShiftState); -begin - case Key of - VK_LEFT, VK_RIGHT: - begin - FocusNextCell(Key = VK_RIGHT, False, Shift); - Key := 0; - end; - VK_TAB: - begin - FocusNextCell(not (ssShift in Shift), DownOnTab, Shift); - Key := 0; - end; - VK_RETURN, VK_F2: - if (Controller.FocusedItem <> nil) and (Shift = []) then - begin - Controller.FocusedItem.Editing := True; - if Controller.FocusedItem.Editing then - Key := 0; - end; - VK_UP, VK_DOWN: - begin - FocusNextCell(Key = VK_DOWN, True, Shift); - Key := 0; - end; - end; -end; - -procedure TcxCustomCellNavigator.KeyPress(var Key: Char); -begin - if IsEditStartChar(Key) and (Controller.FocusedItem <> nil) then - begin - Controller.EditingController.ShowEdit(Controller.FocusedItem, Key); - Key := #0; - end; -end; - -procedure TcxCustomCellNavigator.Refresh; -begin - // todo: msn !!! need synchronize focused cell and row - {Init(ARowIndex, ACellIndex, ARowCount); - SetFocusCell(ARowIndex, ACellIndex);} -end; - -function TcxCustomCellNavigator.SelectCell(AForward, ANextRow: Boolean; - var ARowIndex, ACellIndex: Integer): TcxCustomInplaceEditContainer; -var - ACurRow, ACurCell, ARow: Integer; - AItemFound: Boolean; -begin - Result := nil; - ACurRow := ARowIndex; - ACurCell := ACellIndex; - repeat - AItemFound := False; - while not AItemFound do - begin - Result := GetCellContainer(ACurRow, ACurCell); - AItemFound := (Result = nil) or Result.CanFocus and Result.CanTabStop; - if not AItemFound then Inc(ACurCell, cxIntOffs[AForward]); - end; - if Result = nil then - begin - ACurCell := ACellIndex; - ARow := ACurRow; - if Controller.GetFocusCellOnCycle and not ANextRow then - CalcNextRow(AForward, ACurRow, ACurCell); - if (ARow <> ACurRow) and not ((Count[ACurRow] = 0) and MayFocusedEmptyRow(ACurRow)) then - ACurCell := cxSetValue(AForward, 0, Count[ACurRow] - 1) - else - break; - end - else - if MayFocusedEmptyRow(ARowIndex) then break; - until Result <> nil; - ARowIndex := ACurRow; - ACellIndex := ACurCell; -end; - -procedure TcxCustomCellNavigator.CalcNextRow(AForward: Boolean; - var ARowIndex, ACellIndex: Integer); -begin - cxAbstractError; -end; - -function TcxCustomCellNavigator.GetCellContainer( - ARowIndex, ACellIndex: Integer): TcxCustomInplaceEditContainer; -begin - Result := nil; - cxAbstractError; -end; - -function TcxCustomCellNavigator.GetCount(ARowIndex: Integer): Integer; -begin - Result := -1; - cxAbstractError; -end; - -procedure TcxCustomCellNavigator.Init( - var ARowIndex, ACellIndex, ARowCount: Integer); -begin - cxAbstractError; -end; - -function TcxCustomCellNavigator.MayFocusedEmptyRow(ARowIndex: Integer): Boolean; -begin - Result := False -end; - -procedure TcxCustomCellNavigator.SetFocusCell( - ARowIndex, ACellIndex: Integer; AShift: TShiftState); -begin - cxAbstractError; -end; - -procedure TcxCustomCellNavigator.DoKeyPress(var Key: Char); -begin - if FEatKeyPress then - FEatKeyPress := False - else - KeyPress(Key); -end; - -function TcxCustomCellNavigator.GetDataController: TcxCustomDataController; -begin - Result := FController.DataController; -end; - -{ TcxCustomDesignSelectionHelper } - -constructor TcxCustomDesignSelectionHelper.Create(AControl: TcxEditingControl); -begin - inherited Create; - FControl := AControl; -end; - -function TcxCustomDesignSelectionHelper.GetController: TcxCustomControlController; -begin - Result := FControl.Controller; -end; - -{ TcxCustomControlController } - -constructor TcxCustomControlController.Create(AOwner: TcxEditingControl); -begin - inherited Create; - FEditingControl := AOwner; - FAllowCheckEdit := True; - with EditingControl do - begin - FEditingController := GetEditingControllerClass.Create(Self); - FHitTestController := GetHitTestControllerClass.Create(Self); - FHotTrackController := GetHotTrackControllerClass.Create(FEditingControl); - end; - FNavigator := GetNavigatorClass.Create(Self); -end; - -destructor TcxCustomControlController.Destroy; -begin - FNavigator.Free; - FEditingController.Free; - FHotTrackController.Free; - FHitTestController.Free; - inherited Destroy; -end; - -procedure TcxCustomControlController.Clear; -begin - HitTestController.ClearState; - HotTrackController.Clear; -end; - -procedure TcxCustomControlController.DblClick; -begin -end; - -function TcxCustomControlController.GetCursor(X, Y: Integer): TCursor; -begin - Result := crDefault; -end; - -procedure TcxCustomControlController.KeyDown(var Key: Word; - Shift: TShiftState); -begin - if not BlockRecordKeyboardHandling then - begin - if IsIncSearching then Key := IncSearchKeyDown(Key, Shift); - FNavigator.KeyDown(Key, Shift); - end; - case Key of - VK_ESCAPE: - EditingControl.DataController.Cancel; - VK_RETURN: - if GetGoToNextCellOnEnter and ((Shift = []) or (Shift = [ssShift])) then - Navigator.FocusNextCell(Shift = [], Navigator.DownOnEnter, Shift); - VK_TAB: - if GetGoToNextCellOnTab and ((Shift = []) or (Shift = [ssShift])) then - begin - Navigator.FocusNextCell(Shift = [], Navigator.DownOnTab, Shift); - Key := 0; - end; - VK_PRIOR, VK_NEXT: - DoNextPage(Key = VK_NEXT, Shift); - end; -end; - -procedure TcxCustomControlController.KeyPress(var Key: Char); -begin - if FEatKeyPress then - begin - FEatKeyPress := False; - Exit; - end; - if IsIncSearchStartChar(Key) and - (ItemForIncSearching <> nil) and ItemForIncSearching.CanIncSearch and - (DataController.EditState * [dceInsert, dceEdit] = []) then - begin - if Key <> #8 then - IncSearchingText := IncSearchingText + Key; - Key := #0; - end; - FNavigator.DoKeyPress(Key); -end; - -procedure TcxCustomControlController.KeyUp(var Key: Word; Shift: TShiftState); -begin -end; - -procedure TcxCustomControlController.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin -end; - -procedure TcxCustomControlController.MouseMove( - Shift: TShiftState; X, Y: Integer); -begin -end; - -procedure TcxCustomControlController.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin -end; - -procedure TcxCustomControlController.Reset; -begin - EditingController.PostEditUpdate; - FHitTestController.ClearState; - FHitTestController.FHitTestItem := nil; - FHotTrackController.Clear; -end; - -procedure TcxCustomControlController.WndProc(var Message: TMessage); -begin - case Message.Msg of - WM_IME_STARTCOMPOSITION: - EditingController.ShowEdit; - end; -end; - -// drag'n'drop -procedure TcxCustomControlController.BeginDragAndDrop; -begin - EditingController.HideEdit(True); -end; - -procedure TcxCustomControlController.DragAndDrop(const P: TPoint; var Accepted: Boolean); -begin -end; - -procedure TcxCustomControlController.EndDragAndDrop(Accepted: Boolean); -begin - if EditingControl.DragAndDropState = ddsNone then - CheckEdit; -end; - -function TcxCustomControlController.StartDragAndDrop( - const P: TPoint): Boolean; -begin - Result := False; -end; - -procedure TcxCustomControlController.MouseEnter; -begin - HitTestController.ReCalculate; -end; - -procedure TcxCustomControlController.MouseLeave; -begin - HideHint; - HitTestController.IsMouseEvent := True; - HitTestController.HitTestItem := nil; - HitTestController.IsMouseEvent := False; -end; - -procedure TcxCustomControlController.DoCancelMode; -begin - FocusChanged; -end; - -procedure TcxCustomControlController.AfterPaint; -begin - with EditingControl do - begin - if DragAndDropState = ddsInProcess then - if DragAndDropObject is TcxCustomControlDragAndDropObject then - TcxCustomControlDragAndDropObject(DragAndDropObject).OwnerImageChanged; - end; - ProcessCheckEditPost; -end; - -procedure TcxCustomControlController.BeforeEditKeyDown(var Key: Word; - var Shift: TShiftState); -begin -end; - -procedure TcxCustomControlController.BeforeMouseDown( - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - FEditingBeforeDrag := IsEditing; -end; - -procedure TcxCustomControlController.BeforePaint; -begin - with EditingControl do - begin - EditingController.CheckEditUpdatePost; - if DragAndDropState = ddsInProcess then - if DragAndDropObject is TcxCustomControlDragAndDropObject then - TcxCustomControlDragAndDropObject(DragAndDropObject).OwnerImageChanging; - end; -end; - -procedure TcxCustomControlController.BeforeShowEdit; -begin -end; - -procedure TcxCustomControlController.BehaviorChanged; -begin - EditingControl.ViewInfo.UpdateSelection; -end; - -procedure TcxCustomControlController.CancelCheckEditPost; -begin - FCheckEditNeeded := False; -end; - -function TcxCustomControlController.CanFocusedRecordIndex( - AIndex: Integer): Boolean; -begin - Result := True; -end; - -procedure TcxCustomControlController.CancelIncSearching; -var - AItem: TcxCustomInplaceEditContainer; -begin - AItem := ItemForIncSearching; - DataController.Search.Cancel; - if (AItem <> nil) and (AItem.FocusedCellViewInfo <> nil) then - AItem.FocusedCellViewInfo.Refresh(True); -end; - -function TcxCustomControlController.GetIncSearchingItem: TcxCustomInplaceEditContainer; -begin - if IsIncSearching then - Result := TcxCustomInplaceEditContainer(EditingControl.ContainerList[DataController.Search.ItemIndex]) - else - Result := nil; -end; - -function TcxCustomControlController.GetIncSearchingText: string; -begin - Result := DataController.Search.SearchText; -end; - -function TcxCustomControlController.GetIsIncSearching: Boolean; -begin - Result := DataController.Search.Searching -end; - -procedure TcxCustomControlController.SearchLocate( - AItem: TcxCustomInplaceEditContainer; const Value: string); -begin - DataController.Search.Locate(AItem.ItemIndex, Value); -end; - -procedure TcxCustomControlController.SearchLocateNext( - AItem: TcxCustomInplaceEditContainer; AForward: Boolean); -begin - DataController.Search.LocateNext(AForward); -end; - -procedure TcxCustomControlController.UpdateRecord(ARecordIndex: Integer); -begin - EditingController.UpdateEditValue; -end; - -procedure TcxCustomControlController.ViewInfoChanged; -begin - HitTestController.FHitTestItem := nil; - HotTrackController.SetHotElement(nil, HitTestController.HitPoint); -end; - -procedure TcxCustomControlController.CheckEdit; -begin - CancelCheckEditPost; - if FAllowCheckEdit and GetAlwaysShowEditor then - FEditingController.ShowEdit; -end; - -procedure TcxCustomControlController.DoEditDblClick(Sender: TObject); -begin - EditingControl.DblClick; -end; - -procedure TcxCustomControlController.DoMouseDown( - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - APrevFocusedRecord: Integer; - APrevFocusedItem: TcxCustomInplaceEditContainer; - APrevEditViewInfo, AEditViewInfo: TcxEditCellViewInfo; - AButtonClick: Boolean; - - procedure DoShowEdit; - begin - if Button <> mbLeft then Exit; - with FEditingController, AEditViewInfo do - begin - if AButtonClick then - ShowEdit(EditContainer, Shift, X, Y) - else - ShowEdit(EditContainer, [], -1, -1) - end; - end; - -begin - APrevFocusedRecord := FocusedRecordIndex; - APrevFocusedItem := FocusedItem; - FIsDblClick := ssDouble in Shift; - FWasFocusedBeforeClick := False; - EditingController.StopEditShowingTimer; - with HitTestController do - begin - AButtonClick := HitTestController.IsItemEditCell and - EditCellViewInfo.ViewInfo.IsHotTrack(Point(X, Y)) {and (EditingControl.DragMode = dmManual)}; - if AButtonClick then - APrevEditViewInfo := EditCellViewInfo - else - APrevEditViewInfo := nil; - end; - MouseDown(Button, Shift, X, Y); - HitTestController.RecalculateOnMouseEvent(X, Y, Shift); - if (Button <> mbMiddle) and HitTestController.IsItemEditCell then - begin - AEditViewInfo := HitTestController.EditCellViewInfo; - SetFocusedRecordItem(AEditViewInfo.RecordIndex, AEditViewInfo.EditContainer); - HitTestController.RecalculateOnMouseEvent(X, Y, Shift); - if HitTestController.IsItemEditCell then - begin - AEditViewInfo := HitTestController.EditCellViewInfo; - if GetImmediateEditor then - DoShowEdit - else - begin - if AButtonClick and (AEditViewInfo = APrevEditViewInfo) then - DoShowEdit - else - begin - FWasFocusedBeforeClick := (APrevFocusedRecord = FocusedRecordIndex) and - (APrevFocusedItem = FocusedItem) and (FocusedItem <> nil); - if not FWasFocusedBeforeClick and (FocusedItem <> nil) then - FocusedItem.CancelIncSearching; - end; - end; - end; - end; -end; - -procedure TcxCustomControlController.DoMouseMove( - Shift: TShiftState; X, Y: Integer); -begin - MouseMove(Shift, X, Y); - HitTestController.RecalculateOnMouseEvent(X, Y, Shift); -end; - -procedure TcxCustomControlController.DoMouseUp( - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - MouseUp(Button, Shift, X, Y); - if WasFocusedBeforeClick then - begin - with HitTestController do - if not IsEditing and not IsDblClick and IsItemEditCell and (Button = mbLeft) then - FEditingController.StartEditShowingTimer(EditCellViewInfo.EditContainer); - end; - HitTestController.RecalculateOnMouseEvent(X, Y, Shift); - with HitTestController do - if not IsEditing and not IsDblClick and IsItemEditCell and GetImmediateEditor then - begin - FEditingController.StopEditShowingTimer; - if Button = mbLeft then - FEditingController.ShowEdit(EditCellViewInfo.EditContainer) - end -end; - -procedure TcxCustomControlController.DoNextPage(AForward: Boolean; Shift: TShiftState); -begin -end; - -function TcxCustomControlController.GetEditingViewInfo: TcxEditCellViewInfo; -begin - Result := GetFocusedCellViewInfo(EditingItem); -end; - -function TcxCustomControlController.GetFocused: Boolean; -begin - Result := FFocused; -end; - -function TcxCustomControlController.GetFocusedCellViewInfo( - AEditContainer: TcxCustomInplaceEditContainer): TcxEditCellViewInfo; -begin - Result := nil; - cxAbstractError; -end; - -function TcxCustomControlController.GetFocusedRecordIndex: Integer; -begin - Result := EditingControl.DataController.GetFocusedRecordIndex; -end; - -function TcxCustomControlController.GetResizeDirection: TcxDragSizingDirection; -begin - Result := dsdHorz; -end; - -procedure TcxCustomControlController.FocusedItemChanged( - APrevFocusedItem: TcxCustomInplaceEditContainer); - - procedure RefreshCells(APrevViewInfo, ACurViewInfo: TcxEditCellViewInfo); - begin - if (APrevViewInfo = ACurViewInfo) or DisableCellsRefresh then Exit; - if APrevViewInfo <> nil then - APrevViewInfo.Refresh(False); - if ACurViewInfo <> nil then - ACurViewInfo.Refresh(False); - end; - -begin - if EditingControl.ComponentState * [csLoading, csDestroying] <> [] then Exit; - CancelIncSearching; - MakeFocusedItemVisible; - RefreshCells(GetFocusedCellViewInfo(APrevFocusedItem), - GetFocusedCellViewInfo(FocusedItem)); - Navigator.Refresh; -end; - -procedure TcxCustomControlController.FocusedRecordChanged( - APrevFocusedRecordIndex, AFocusedRecordIndex: Integer); -begin - with EditingController do - if HideEditOnFocusedRecordChange then HideEdit(True); - CheckEdit; - EditingController.UpdateEditValue; -end; - -function TcxCustomControlController.HasFocusedControls: Boolean; -begin - with FEditingController do - Result := (Edit <> nil) and Edit.IsFocused; -end; - -procedure TcxCustomControlController.HideHint; -begin - HotTrackController.CancelHint; -end; - -function TcxCustomControlController.IncSearchKeyDown(AKey: Word; AShift: TShiftState): Word; -begin - if ItemForIncSearching = nil then - begin - Result := AKey; - Exit; - end - else - Result := 0; - case AKey of - VK_ESCAPE: - ItemForIncSearching.CancelIncSearching; - VK_BACK: - IncSearchingText := Copy(IncSearchingText, 1, Length(IncSearchingText) - 1); - VK_UP, VK_DOWN: - if AShift = [ssCtrl] then - SearchLocateNext(ItemForIncSearching, AKey = VK_DOWN) - else - Result := AKey; - else - Result := AKey; - end; -end; - -procedure TcxCustomControlController.InternalSetFocusedItem( - Value: TcxCustomInplaceEditContainer); -begin - FFocusedItem := Value; -end; - -function TcxCustomControlController.IsImmediatePost: Boolean; -begin - Result := False; -end; - -function TcxCustomControlController.IsKeyForController( - AKey: Word; AShift: TShiftState): Boolean; -begin - Result := ((AKey = VK_TAB) and GetGoToNextCellOnTab) or - (AKey = VK_UP) or (AKey = VK_DOWN) or (AKey = VK_PRIOR) or (AKey = VK_NEXT) or - (AKey = VK_INSERT) or (AKey = VK_ESCAPE) or (AKey = VK_LEFT) or (AKey = VK_RIGHT); -end; - -procedure TcxCustomControlController.PostCheckEdit; -begin - if FAllowCheckEdit then FCheckEditNeeded := True; -end; - -procedure TcxCustomControlController.ProcessCheckEditPost; -begin - if FCheckEditNeeded then CheckEdit; -end; - -procedure TcxCustomControlController.PostShowEdit; -begin - with EditingControl.Options.OptionsBehavior do - begin - if not IsEditing and (ImmediateEditor or AlwaysShowEditor) and - (EditingControl.DragAndDropState = ddsNone) then - if HitTestController.IsItemEditCell then PostCheckEdit; - end; -end; - -procedure TcxCustomControlController.RefreshFocusedCellViewInfo( - AItem: TcxCustomInplaceEditContainer); -var - ACellViewInfo: TcxEditCellViewInfo; -begin - if DisableCellsRefresh then Exit; - ACellViewInfo := GetFocusedCellViewInfo(AItem); - if (ACellViewInfo <> nil) and (ACellViewInfo.Refresh(True)) then - EditingControl.LayoutChanged; -end; - -procedure TcxCustomControlController.RefreshFocusedRecord; -var - I: Integer; - ANeedUpdate: Boolean; - ACellViewInfo: TcxEditCellViewInfo; -begin - with EditingControl do - begin - Inc(FLockUpdate); - ANeedUpdate := False; - try - for I := 0 to FContainerList.Count - 1 do - with TcxCustomInplaceEditContainer(FContainerList.List^[I]) do - begin - ACellViewInfo := FocusedCellViewInfo; - ANeedUpdate := ANeedUpdate or ((ACellViewInfo <> nil) and ACellViewInfo.Refresh(True)); - end; - finally - Dec(FLockUpdate); - if ANeedUpdate and not IsLocked then - begin - BeforeUpdate; - LayoutChanged; - end; - end; - end; -end; - -procedure TcxCustomControlController.SetFocused(Value: Boolean); -begin - FFocused := Value; -end; - -procedure TcxCustomControlController.SetFocusedItem( - Value: TcxCustomInplaceEditContainer); -var - APrevFocusedItem: TcxCustomInplaceEditContainer; -begin - if IsEditing then EditingController.HideEdit(True); - if (Value <> nil) and not Value.CanFocus then Exit; - if FFocusedItem <> Value then - begin - APrevFocusedItem := FFocusedItem; - if (FFocusedItem <> nil) and not FEditingController.FEditingItemSetting then - FEditingController.HideEdit(True); - FFocusedItem := Value; - FocusedItemChanged(APrevFocusedItem); - end - else - if Assigned(Value) then - MakeFocusedItemVisible; - PostCheckEdit; -end; - -procedure TcxCustomControlController.SetFocusedRecordIndex( - Value: Integer); -var - AIndexesAreEqual: Boolean; -begin - with DataController do - begin - if cxInRange(Value, 0, RecordCount - 1) and - not (CanFocusedRecordIndex(Value) and ChangeFocusedRowIndex(Value)) then Exit; - end; - AIndexesAreEqual := FocusedRecordIndex = Value; - if AIndexesAreEqual then MakeFocusedRecordVisible; -end; - -function TcxCustomControlController.GetAlwaysShowEditor: Boolean; -begin - Result := EditingControl.Options.OptionsBehavior.AlwaysShowEditor; -end; - -function TcxCustomControlController.GetCancelEditingOnExit: Boolean; -begin - with EditingControl do - Result := Options.OptionsData.CancelOnExit and - (DataController.EditState * [dceInsert, dceChanging, dceModified] = [dceInsert]); -end; - -function TcxCustomControlController.GetFocusCellOnCycle: Boolean; -begin - Result := EditingControl.Options.OptionsBehavior.FocusCellOnCycle; -end; - -function TcxCustomControlController.GetGoToNextCellOnEnter: Boolean; -begin - Result := EditingControl.Options.OptionsBehavior.GoToNextCellOnEnter; -end; - -function TcxCustomControlController.GetGoToNextCellOnTab: Boolean; -begin - Result := EditingControl.Options.OptionsBehavior.GoToNextCellOnTab; -end; - -function TcxCustomControlController.GetImmediateEditor: Boolean; -begin - with EditingControl.Options.OptionsBehavior do - Result := (ImmediateEditor or AlwaysShowEditor) and (EditingControl.DragMode = dmManual); -end; - -procedure TcxCustomControlController.BeforeStartDrag; -begin -end; - -function TcxCustomControlController.CanDrag(X, Y: Integer): Boolean; -begin - Result := False; -end; - -procedure TcxCustomControlController.DragDrop(Source: TObject; X, Y: Integer); -begin -end; - -procedure TcxCustomControlController.DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); -begin - EditingController.HideEdit(True); -end; - -procedure TcxCustomControlController.EndDrag(Target: TObject; X, Y: Integer); -begin - HitTestController.ReCalculate(Point(X, Y)); - if FEditingBeforeDrag or - EditingControl.Options.OptionsBehavior.AlwaysShowEditor then - EditingController.ShowEdit; -end; - -function TcxCustomControlController.GetDragAndDropObject: TcxCustomControlDragAndDropObject; -begin - Result := EditingControl.DragAndDropObject as TcxCustomControlDragAndDropObject; -end; - -function TcxCustomControlController.GetDragAndDropObjectClass: TcxDragAndDropObjectClass; -begin - Result := nil; -end; - -function TcxCustomControlController.GetIsDragging: Boolean; -begin - Result := False; -end; - -function TcxCustomControlController.GetNavigatorClass: TcxCustomCellNavigatorClass; -begin - Result := TcxCustomCellNavigator; -end; - -procedure TcxCustomControlController.StartDrag(var DragObject: TDragObject); -begin -end; - -function TcxCustomControlController.GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; -begin - Result := mwskNone; -end; - -function TcxCustomControlController.IsPixelScrollBar( - AKind: TScrollBarKind): Boolean; -begin - Result := False; -end; - -procedure TcxCustomControlController.InitScrollBarsParameters; -begin -end; - -procedure TcxCustomControlController.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -begin -end; - -procedure TcxCustomControlController.SetFocusedRecordItem( - ARecordIndex: Integer; AItem: TcxCustomInplaceEditContainer); -begin - EditingController.HideEdit(True); - AllowCheckEdit := False; - try - DisableCellsRefresh := (FocusedRecordIndex = ARecordIndex); - FocusedRecordIndex := ARecordIndex; - DisableCellsRefresh := DisableCellsRefresh and (FocusedItem = AItem); - FocusedItem := AItem; - finally - AllowCheckEdit := True; - CheckEdit; - DisableCellsRefresh := False; - end; -end; - -procedure TcxCustomControlController.SetScrollBarInfo( - AScrollBarKind: TScrollBarKind; AMin, AMax, AStep, APage, APos: Integer; - AAllowShow, AAllowHide: Boolean); -begin - EditingControl.SetScrollBarInfo(AScrollBarKind, AMin, - AMax, AStep, APage, APos, AAllowShow, AAllowHide); -end; - -procedure TcxCustomControlController.MakeFocusedItemVisible; -begin - cxAbstractError; -end; - -procedure TcxCustomControlController.MakeFocusedRecordVisible; -begin - cxAbstractError; -end; - -procedure TcxCustomControlController.FocusChanged; -var - AFocused: Boolean; -begin - AFocused := EditingControl.IsFocused; - with EditingController do - begin - AFocused := AFocused or (IsEditing and (Edit <> nil) and Edit.Focused); - if AFocused then - begin - CheckEdit; - if IsEditing and (Edit <> nil) and GetAlwaysShowEditor and not Edit.Focused and Edit.CanFocus then - Edit.SetFocus - else - if (Edit <> nil) and not Edit.Focused and not GetAlwaysShowEditor then - HideEdit(True) - else - if GetAlwaysShowEditor and not IsEditing and GetImmediateEditor then ShowEdit; - end; - end; - if FFocused <> AFocused then - begin - FFocused := AFocused; - ControlFocusChanged; - end; -end; - -procedure TcxCustomControlController.DoEnter; -begin -end; - -procedure TcxCustomControlController.DoExit; -begin - if GetCancelEditingOnExit then - EditingControl.DataController.Cancel - else - begin - EditingControl.DataController.PostEditingData; - if IsImmediatePost then - EditingControl.DataController.Post; - end; -end; - -function TcxCustomControlController.MayFocus: Boolean; -begin - Result := not EditingControl.IsFocused or not IsEditing or - not GetAlwaysShowEditor and FEditingController.Edit.ValidateEdit(True); -end; - -procedure TcxCustomControlController.RemoveFocus; -begin -end; - -procedure TcxCustomControlController.SetFocus; -begin - if not FEditingController.CanRemoveEditFocus then Exit; - with EditingControl do - if CanFocusEx and IsFocused then SetFocus; - PostCheckEdit; -end; - -procedure TcxCustomControlController.ControlFocusChanged; -begin - with EditingController do - if not Self.Focused and HideEditOnExit then HideEdit(True); - EditingControl.ViewInfo.UpdateSelection; -end; - -function TcxCustomControlController.GetDataController: TcxCustomDataController; -begin - Result := EditingControl.DataController; -end; - -function TcxCustomControlController.GetDesignSelectionHelper: TcxCustomDesignSelectionHelper; -begin - Result := EditingControl.DesignSelectionHelper; -end; - -function TcxCustomControlController.GetEditingItem: TcxCustomInplaceEditContainer; -begin - Result := FEditingController.EditingItem; -end; - -function TcxCustomControlController.GetIsEditing: Boolean; -begin - Result := FEditingController.IsEditing; -end; - -procedure TcxCustomControlController.SetEditingItem( - Value: TcxCustomInplaceEditContainer); -begin - FEditingController.EditingItem := Value; -end; - -function TcxCustomControlController.GetItemForIncSearching: TcxCustomInplaceEditContainer; -begin - Result := nil; - if EditingControl.Options.OptionsBehavior.IncSearch then - Result := EditingControl.Options.OptionsBehavior.IncSearchItem; - if Result = nil then - Result := FocusedItem; -end; - -procedure TcxCustomControlController.SetIncSearchingText(const Value: string); -var - AItem: TcxCustomInplaceEditContainer; - - function GetItemIndex: Integer; - begin - AItem := nil; - if IsIncSearching then - AItem := IncSearchingItem - else - AItem := ItemForIncSearching; - if AItem <> nil then - Result := AItem.ItemIndex - else - Result := -1; - end; - -begin - if (IncSearchingText = Value) or (GetItemIndex = -1) then Exit; - if Value = '' then - CancelIncSearching - else - SearchLocate(AItem, Value); - if (ItemForIncSearching <> nil) and (ItemForIncSearching.FocusedCellViewInfo <> nil) then - ItemForIncSearching.FocusedCellViewInfo.Invalidate(True); -end; - -{ TcxCustomControlViewInfo } - -constructor TcxCustomControlViewInfo.Create(AOwner: TcxEditingControl); -begin - FControl := AOwner; - FState := FState or cvis_StyleInvalid; - CreatePainter; - FEditCellViewInfoList := TList.Create; - FEditCellViewInfoList.Capacity := 1024; - Brush := TBrush.Create; - SelectionBrush := TBrush.Create; -end; - -destructor TcxCustomControlViewInfo.Destroy; -begin - with FControl do - if Assigned(FController) then FController.Reset; - FPainter.Free; - FEditCellViewInfoList.Free; - Brush.Free; - SelectionBrush.Free; - inherited Destroy; -end; - -procedure TcxCustomControlViewInfo.Calculate; -begin - with Control.FBrushCache do - begin - BeginUpdate; - try - if State[cvis_StyleInvalid] then - begin - State[cvis_StyleInvalid] := False; - CalculateDefaultHeights; - ViewParams := Control.Styles.GetBackgroundParams; - Brush.Color := ViewParams.Color; - UpdateSelectionParams; - Control.Invalidate; - end; - FClientRect := Control.ClientBounds; - DoCalculate; - IsDirty := False; - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomControlViewInfo.Invalidate(ARecalculate: Boolean = False); -begin - if ARecalculate then - Control.LayoutChanged - else - Control.InvalidateRectEx(ClientRect, False); -end; - -procedure TcxCustomControlViewInfo.ValidateDirty; -begin - if IsDirty then - Calculate; -end; - -function TcxCustomControlViewInfo.AddEditCellViewInfo( - AViewInfoClass: TcxEditCellViewInfoClass; - AEditContainer: TcxCustomInplaceEditContainer): TcxEditCellViewInfo; -begin - Result := AViewInfoClass.Create(AEditContainer); - FEditCellViewInfoList.Add(Result); - IsDirty := True; -end; - -function TcxCustomControlViewInfo.CalculateDefaultEditHeight: Integer; -begin - Result := -1; - cxAbstractError; -end; - -procedure TcxCustomControlViewInfo.CalculateDefaultHeights; -begin - FDefaultEditHeight := CalculateDefaultEditHeight; -end; - -procedure TcxCustomControlViewInfo.ClearEditCellViewInfos; -var - I: Integer; -begin - for I := 0 to FEditCellViewInfoList.Count - 1 do - TcxEditCellViewInfo(FEditCellViewInfoList.List^[I]).Free; - FEditCellViewInfoList.Clear; - IsDirty := True; -end; - -procedure TcxCustomControlViewInfo.CreatePainter; -begin - FPainter := Control.GetPainterClass.Create(Control); -end; - -procedure TcxCustomControlViewInfo.DoCalculate; -var - I: Integer; -begin - Control.Controller.ViewInfoChanged; - for I := 0 to FEditCellViewInfoList.Count - 1 do - with TcxEditCellViewInfo(FEditCellViewInfoList.List^[I]) do - if Visible then DoCalculate; -end; - -procedure TcxCustomControlViewInfo.RemoveEditCellViewInfo( - AViewInfo: TcxEditCellViewInfo); -begin - FEditCellViewInfoList.Remove(AViewInfo); - AViewInfo.Free; - IsDirty := True; -end; - -procedure TcxCustomControlViewInfo.UpdateSelection; -begin - UpdateSelectionParams; -end; - -function TcxCustomControlViewInfo.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := FPainter.Painter; -end; - -function TcxCustomControlViewInfo.GetState(AMask: Integer): Boolean; -begin - Result := FState and AMask = AMask; -end; - -procedure TcxCustomControlViewInfo.SetState(AMask: Integer; Value: Boolean); -begin - if Value then - FState := FState or AMask - else - FState := FState and not AMask; -end; - -procedure TcxCustomControlViewInfo.UpdateSelectionParams; -begin - SelectionParams := Control.Styles.GetSelectionParams; - SelectionBrush.Color := SelectionParams.Color; -end; - -{ TcxCustomControlCells } - -procedure TcxCustomControlCells.BeforePaint; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].CheckVisibleInfo; -end; - -function TcxCustomControlCells.CalculateHitTest( - AHitTest: TcxCustomHitTestController): Boolean; -var - I: Integer; -begin - Result := False; - for I := Count - 1 downto 0 do - begin - Result := Items[I].GetHitTest(AHitTest); - if Result then Exit; - end; -end; - -procedure TcxCustomControlCells.DeleteAll; -begin - SetCount(0); -end; - -procedure TcxCustomControlCells.ExcludeFromClipping(ACanvas: TcxCanvas); -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].ExcludeFromPaint(ACanvas); -end; - -procedure TcxCustomControlCells.Paint(ACanvas: TcxCanvas; - AHandler: TcxCustomDrawCellEvent); - - procedure DoDrawItem(AItem: TcxCustomViewInfoItem); - var - ADone: Boolean; - begin - AItem.BeforeCustomDraw(ACanvas); - AHandler(ACanvas, AItem, ADone); - if not ADone then - begin - AItem.AfterCustomDraw(ACanvas); - AItem.Draw(ACanvas); - end; - end; - -var - I: Integer; - AClipRgn: TcxRegion; - AItem: TcxCustomViewInfoItem; -begin - for I := 0 to Count - 1 do - begin - AItem := Items[I]; - AItem.CheckVisibleInfo; - if (AItem.Visible and RectVisible(ACanvas.Handle, AItem.ClipRect)) then - if AItem.HasClipping then - begin - AClipRgn := ACanvas.GetClipRegion; - ACanvas.IntersectClipRect(AItem.ClipRect); - DoDrawItem(AItem); - ACanvas.SetClipRegion(AClipRgn, roSet); - end - else - DoDrawItem(AItem); - end; -end; - -function TcxCustomControlCells.GetItem(AIndex: Integer): TcxCustomViewInfoItem; -begin - Result := TcxCustomViewInfoItem(List^[AIndex]); -end; - -{ TcxCustomViewInfoItem } - -constructor TcxCustomViewInfoItem.Create(AOwner: TObject); -begin - FOwner := AOwner; -end; - -procedure TcxCustomViewInfoItem.Assign(Source: TcxCustomViewInfoItem); -begin - DisplayRect := Source.DisplayRect; - ClipRect := Source.ClipRect; - ItemVisible := Source.ItemVisible; - ItemViewParams := Source.ItemViewParams; -end; - -procedure TcxCustomViewInfoItem.CheckVisibleInfo; -begin - if Visible and not FVisibleInfoCalculated then - begin - DoCalculate; - FVisibleInfoCalculated := True; - end; -end; - -class function TcxCustomViewInfoItem.CustomDrawID: Integer; -begin - Result := 0; -end; - -procedure TcxCustomViewInfoItem.Draw(ACanvas: TcxCanvas); -var - FPrevCanvas: TcxCanvas; -begin - CheckVisibleInfo; - FPrevCanvas := ControlCanvas; - try - ControlCanvas := ACanvas; - DoDraw(ControlCanvas); - finally - ControlCanvas := FPrevCanvas; - end; -end; - -procedure TcxCustomViewInfoItem.Invalidate(ARecalculate: Boolean = False); -begin - if ARecalculate then - DoCalculate; - if Visible then - Control.InvalidateRectEx(VisibleRect, False); -end; - -procedure TcxCustomViewInfoItem.CheckClipping( - const ADisplayRect: TRect); -begin - CheckClipping(ADisplayRect, ControlViewInfo.FClientRect); -end; - -procedure TcxCustomViewInfoItem.DoCalculate; -begin - cxAbstractError; -end; - -procedure TcxCustomViewInfoItem.DoDraw(ACanvas: TcxCanvas); -begin - if not Transparent then - ACanvas.FillRect(ClipRect, ViewParams); -end; - -procedure TcxCustomViewInfoItem.DoHorzOffset(AShift: Integer); -begin - cxAbstractError; -end; - -procedure TcxCustomViewInfoItem.DoVertOffset(AShift: Integer); -begin - cxAbstractError; -end; - -function TcxCustomViewInfoItem.DrawBackgroundHandler( - ACanvas: TcxCanvas; const ABounds: TRect): Boolean; -begin - Result := (Bitmap <> nil) and not Bitmap.Empty; - if Result and not Transparent then - ACanvas.FillRect(ABounds, Bitmap) - else - Result := Transparent; -end; - -function TcxCustomViewInfoItem.ExcludeFromPaint( - ACanvas: TcxCanvas): Boolean; -begin - Result := Visible; - if Result then - ACanvas.ExcludeClipRect(ClipRect); -end; - -function TcxCustomViewInfoItem.GetControl: TcxEditingControl; -begin - Result := nil; - cxAbstractError; -end; - -function TcxCustomViewInfoItem.GetHitTest( - AHitTest: TcxCustomHitTestController): Boolean; -begin - Result := False; -end; - -function TcxCustomViewInfoItem.IsTransparent: Boolean; -begin - with ItemViewParams do - Result := (Bitmap <> nil) and not Bitmap.Empty; -end; - -procedure TcxCustomViewInfoItem.Scroll(const DX, DY: Integer); -begin - if (DX = 0) and (DY = 0) then Exit; - OffsetRect(DisplayRect, DX, DY); - CheckClipping(DisplayRect, VisibleBounds); - VisibleInfoCalculated := False; -end; - -procedure TcxCustomViewInfoItem.UpdateEditRect; -begin - CheckClipping(DisplayRect); -end; - -procedure TcxCustomViewInfoItem.AfterCustomDraw(ACanvas: TcxCanvas); -begin - ItemViewParams.Color := ACanvas.Brush.Color; - ItemViewParams.TextColor := ACanvas.Font.Color; -end; - -procedure TcxCustomViewInfoItem.BeforeCustomDraw(ACanvas: TcxCanvas); -begin - ACanvas.SetParams(ViewParams); -end; - -procedure TcxCustomViewInfoItem.CheckClipping( - const ADisplayRect, AAvailableRect: TRect); -begin - DisplayRect := ADisplayRect; - VisibleBounds := AAvailableRect; - ItemVisible := cxRectIntersect(ClipRect, AAvailableRect, DisplayRect); - FHasClipping := not cxRectIsEqual(ClipRect, DisplayRect); -end; - -function TcxCustomViewInfoItem.GetBitmap: TBitmap; -begin - Result := ViewParams.Bitmap; -end; - -function TcxCustomViewInfoItem.GetControlViewInfo: TcxCustomControlViewInfo; -begin - Result := Control.ViewInfo; -end; - -function TcxCustomViewInfoItem.GetPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := Control.LookAndFeelPainter; -end; - -{ TcxEditCellViewInfo } - -destructor TcxEditCellViewInfo.Destroy; -begin - if (EditContainer <> nil) and not EditContainer.IsDestroying then - Control.Controller.HitTestController.DestroyingItem(Self); - ViewInfo.Free; - if IsViewDataCreated then ViewData.Free; - inherited Destroy; -end; - -procedure TcxEditCellViewInfo.Assign(Source: TcxCustomViewInfoItem); -begin - if Source is TcxCustomViewInfoItem then - begin - CellEditRect := TcxEditCellViewInfo(Source).CellEditRect; - CellContentRect := TcxEditCellViewInfo(Source).CellContentRect; - CellBorders := TcxEditCellViewInfo(Source).CellBorders; - end; - inherited Assign(Source); -end; - -function TcxEditCellViewInfo.QueryInterface(const IID: TGUID; - out Obj): HResult; -begin - if GetInterface(IID, Obj) then Result := 0 else Result := cxE_NOINTERFACE; -end; - -function TcxEditCellViewInfo.Refresh(ARecalculate: Boolean): Boolean; -begin - Result := False; - if EditContainer = nil then Exit; - if ARecalculate then - begin - if IsAutoHeight then - Result := ChangedHeight(CellHeight, CalculateEditHeight); - if not Result then DoCalculate; - end - else - if ViewInfo <> nil then - begin - ItemViewParams := GetEditViewParams; - ViewInfo.TextColor := ItemViewParams.TextColor; - ViewInfo.Font := ItemViewParams.Font; - ViewInfo.BackgroundColor := ItemViewParams.Color; - ViewInfo.Transparent := IsTransparent; - end; - if not Result then Invalidate; -end; - -function TcxEditCellViewInfo._AddRef: Integer; -begin - Result := -1; -end; - -function TcxEditCellViewInfo._Release: Integer; -begin - Result := -1; -end; - -function TcxEditCellViewInfo.GetOrigin: TPoint; -begin - Result := cxPoint(ViewInfo.Left, ViewInfo.Top); -end; - -function TcxEditCellViewInfo.IsNeedHint(ACanvas: TcxCanvas; const P: TPoint; - out AText: TCaption; out AIsMultiLine: Boolean; out ATextRect: TRect; - var IsNeedOffsetHint: Boolean): Boolean; -begin - Result := Visible and - ViewInfo.NeedShowHint(ACanvas, P, GetControl.ClientBounds, - AText, AIsMultiLine, ATextRect); - IsNeedOffsetHint := False; -end; - -procedure TcxEditCellViewInfo.UpdateHotTrackState(const APoint: TPoint); -var - ATempViewInfo: TcxCustomEditViewInfo; -begin - if not IsSupportedHotTrack then Exit; - ATempViewInfo := TcxCustomEditViewInfo(Properties.GetViewInfoClass.Create); - try - ATempViewInfo.Assign(ViewInfo); - cxAssignEditStyle(Self); - ViewData.ContentOffset := ContentOffset; - ViewData.CalculateEx(EditContainer.GetControlCanvas, ContentRect, - cxPointOffset(APoint, cxPointInvert(GetCellOrg)), cxmbNone, [], ViewInfo, False); - if (EditContainer <> nil) and (EditContainer.EditingControl.DragAndDropState = ddsNone) then - begin - if ViewInfo.Repaint(Control, ATempViewInfo) and (Control.Painter.Buffered or - ((GetCellOrg.X <> 0) or (GetCellOrg.Y <> 0))) then - Control.InvalidateRectEx(cxRectOffset(ContentRect, GetCellOrg), False); - end; - finally - ATempViewInfo.Free; - end; -end; - -function TcxEditCellViewInfo.CalculateEditHeight: Integer; -begin - if IsAutoHeight then - begin - with EditContainer do - begin - InitEditViewInfo(Self); - Result := GetEditHeight(Self); - end; - end - else - Result := ControlViewInfo.DefaultEditHeight; -end; - -function TcxEditCellViewInfo.CalculateEditWidth: Integer; -begin - Result := EditContainer.GetEditHeight(Self); -end; - -function TcxEditCellViewInfo.ChangedHeight(APrevHeight, ANewHeight: Integer): Boolean; -begin - Result := APrevHeight <> ANewHeight; - CellHeight := ANewHeight; -end; - -procedure TcxEditCellViewInfo.CheckClipping( - const ADisplayRect, AAvailableRect: TRect); -begin - inherited CheckClipping(ADisplayRect, AAvailableRect); - CellContentRect := DisplayRect; - if CellBorders = [] then - with ContentOffset do - CellEditRect := cxRectInflate(VisibleRect, -Left, -Top, -Right, -Bottom) - else - begin - with CellContentRect do - begin - Inc(Left, Byte(bLeft in CellBorders)); - Inc(Top, Byte(bTop in CellBorders)); - Dec(Right, Byte(bRight in CellBorders)); - Dec(Bottom, Byte(bBottom in CellBorders)); - end; - if cxRectIntersect(CellEditRect, VisibleRect, CellContentRect) then - with ContentOffset do - CellEditRect := cxRectInflate(CellEditRect, -Left, -Top, -Right, -Bottom); - end; -end; - -function TcxEditCellViewInfo.ContentOffset: TRect; -begin - Result := cxSimpleRect; -end; - -function TcxEditCellViewInfo.CorrectHotTrackPoint( - const APoint: TPoint): TPoint; -begin - Result := APoint; -end; - -procedure TcxEditCellViewInfo.DoCalculate; -begin - with EditContainer do - begin - if not IsAutoHeight then - InitEditViewInfo(Self) - else - begin - ViewData.InplaceEditParams.Position.RecordIndex := RecordIndex; - ViewData.InplaceEditParams.Position.Item := Self; - end; - CalculateEditViewInfo(CellValue, Self, cxInvalidPoint); - end; -end; - -function TcxEditCellViewInfo.GetButtonTransparency: TcxEditButtonTransparency; -var - B1: TcxEditingControlEditShowButtons; - B2: TcxEditItemShowEditButtons; -begin - B1 := Control.Options.OptionsView.ShowEditButtons; - B2 := EditContainer.Options.ShowEditButtons; - if (B2 = eisbAlways) or (B2 = eisbDefault) and - ((B1 = ecsbAlways) or (B1 = ecsbFocused) and Focused) then - Result := ebtNone - else - Result := ebtHideInactive; -end; - -function TcxEditCellViewInfo.GetCellOrg: TPoint; -begin - Result := cxNullPoint; -end; - -function TcxEditCellViewInfo.GetControl: TcxEditingControl; -begin - if EditContainer = nil then - Result := nil - else - Result := EditContainer.EditingControl; -end; - -function TcxEditCellViewInfo.GetDisplayValue: Variant; -begin - with EditContainer.DataController do - begin - if (RecordIndex >= 0) and (RecordIndex < RecordCount) then - Result := EditContainer.GetDisplayValue(Properties, RecordIndex) - else - Result := Null - end; -end; - -function TcxEditCellViewInfo.GetEditContainer: TcxCustomInplaceEditContainer; -begin - Result := TcxCustomInplaceEditContainer(Owner); -end; - -function TcxEditCellViewInfo.GetEditRect: TRect; -begin - Result := CellEditRect; -end; - -function TcxEditCellViewInfo.GetEditViewParams: TcxViewParams; -begin - Result := Control.Styles.GetBackgroundParams; -end; - -function TcxEditCellViewInfo.GetFocused: Boolean; -begin - with EditContainer do - Result := (FocusedCellViewInfo = Self) and (DataController.FocusedRecordIndex = RecordIndex); -end; - -function TcxEditCellViewInfo.GetInplaceEditPosition: TcxInplaceEditPosition; -begin - Result.Item := EditContainer; - Result.RecordIndex := RecordIndex; -end; - -function TcxEditCellViewInfo.GetMaxLineCount: Integer; -begin - Result := Control.Options.OptionsView.CellTextMaxLineCount; -end; - -function TcxEditCellViewInfo.GetRecordIndex: Integer; -begin - Result := 0; -end; - -function TcxEditCellViewInfo.GetSelectedTextColor: Integer; -begin - Result := $FFFFFF xor ColorToRgb(ViewParams.TextColor); -end; - -function TcxEditCellViewInfo.GetSelectedBKColor: Integer; -begin - Result := $FFFFFF xor ColorToRgb(ViewParams.Color); -end; - -function TcxEditCellViewInfo.GetViewInfoData: Pointer; -begin - Result := Pointer(RecordIndex); -end; - -function TcxEditCellViewInfo.IsAutoHeight: Boolean; -begin - Result := Control.Options.OptionsView.CellAutoHeight; -end; - -function TcxEditCellViewInfo.IsEndEllipsis: Boolean; -begin - Result := Control.Options.OptionsView.CellEndEllipsis; -end; - -function TcxEditCellViewInfo.IsSupportedHotTrack: Boolean; -begin - Result := not Control.IsDesigning and - (esoHotTrack in Properties.GetSupportedOperations) and - ViewData.Style.LookAndFeel.Painter.IsButtonHotTrack; -end; - -procedure TcxEditCellViewInfo.SetBounds(const ABounds: TRect; const ADisplayRect: TRect); -begin - CheckClipping(ABounds, ADisplayRect); - DoCalculate; -end; - -function TcxEditCellViewInfo.GetTransparent: Boolean; -begin - Result := ViewInfo.Transparent or CellTransparent; -end; - -procedure TcxEditCellViewInfo.SetTransparent(Value: Boolean); -begin - CellTransparent := Value; - ViewInfo.Transparent := Value; -end; - -{ TcxCustomControlPainter } - -constructor TcxCustomControlPainter.Create( - AOwner: TcxEditingControl); -begin - FControl := AOwner; - FCanvas := FControl.Canvas; -end; - -destructor TcxCustomControlPainter.Destroy; -begin - FBitmap.Free; - FBitmapCanvas.Free; - inherited Destroy; -end; - -procedure TcxCustomControlPainter.Paint; -var - ACanvas: TcxCanvas; -begin - ACanvas := FCanvas; - if not Canvas.RectVisible(ViewInfo.ClientRect) then Exit; - try - if Buffered then - begin - FBitmap.Width := FControl.Width; - FBitmap.Height := FControl.Height; - if not Control.IsLayoutChanged then - FBitmapCanvas.SetClipRegion(FCanvas.GetClipRegion, roSet) - else - begin - FBitmapCanvas.SetClipRegion(TcxRegion.Create(ViewInfo.ClientRect), roSet); - Control.IsLayoutChanged := False; - end; - FCanvas := FBitmapCanvas; - end; - DoPaint; - finally - FCanvas := ACanvas; - if Buffered then - Canvas.Draw(0, 0, FBitmap); - end; -end; - -procedure TcxCustomControlPainter.AfterCustomDraw( - AViewInfo: TcxCustomViewInfoItem); -begin - AViewInfo.ItemViewParams := FSaveViewParams; - // synchronize EditViewInfo with ViewParams - if AViewInfo is TcxEditCellViewInfo then - with TcxEditCellViewInfo(AViewInfo).EditViewInfo do - begin - Font := FSaveViewParams.Font; - TextColor := FSaveViewParams.TextColor; - BackgroundColor := FSaveViewParams.Color; - end; -end; - -procedure TcxCustomControlPainter.BeforeCustomDraw(AViewInfo: TcxCustomViewInfoItem); -begin - with AViewInfo do - begin - FSaveViewParams := ItemViewParams; - cxApplyViewParams(Canvas, ItemViewParams); - ItemViewParams.Font := Canvas.Font; - end; - if AViewInfo is TcxEditCellViewInfo then - TcxEditCellViewInfo(AViewInfo).EditViewInfo.Font := - AViewInfo.ItemViewParams.Font; -end; - -function TcxCustomControlPainter.DoCustomDraw( - AViewInfoItem: TcxCustomViewInfoItem; AEvent: TcxCustomDrawViewInfoItemEvent): Boolean; -begin - if (AViewInfoItem <> nil) and AViewInfoItem.Visible - and Canvas.RectVisible(AViewInfoItem.VisibleRect) then - begin - Result := False; - if Assigned(AEvent) then - begin -// BeforeCustomDraw(AViewInfoItem); - AEvent(Control, Canvas, AViewInfoItem, Result); -// AfterCustomDraw(AViewInfoItem); - end; - end - else - Result := True; -end; - -procedure TcxCustomControlPainter.DoPaintEditCell( - ACellViewInfo: TcxEditCellViewInfo; AIsExcludeRect: Boolean = True); -begin - if not DoCustomDraw(ACellViewInfo, Control.OnCustomDrawCell) then - ACellViewInfo.ViewInfo.PaintEx(Canvas); - if AIsExcludeRect then - Canvas.ExcludeClipRect(ACellViewInfo.ClipRect); -end; - -procedure TcxCustomControlPainter.DoPaint; -begin - with ViewInfo do - begin - FCanvas.Brush.Assign(Brush); - FCanvas.FillRect(ClientRect); - end; -end; - -procedure TcxCustomControlPainter.SetBuffered(Value: Boolean); -begin - if Value <> FBuffered then - begin - FBuffered := Value; - if not Value then - begin - FreeAndNil(FBitmap); - FreeAndNil(FBitmapCanvas); - end - else - begin - FBitmap := TBitmap.Create; - FBitmapCanvas := TcxCanvas.Create(FBitmap.Canvas); - end; - if ViewInfo <> nil then - ViewInfo.Invalidate; - end; -end; - -function TcxCustomControlPainter.GetPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := Control.LookAndFeelPainter; -end; - -function TcxCustomControlPainter.GetViewInfo: TcxCustomControlViewInfo; -begin - Result := Control.FViewInfo; -end; - -{ TcxCustomControlStyles } -constructor TcxCustomControlStyles.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FDefaultStyle := TcxStyle.Create(nil); -end; - -destructor TcxCustomControlStyles.Destroy; -begin - FDefaultStyle.Free; - inherited Destroy; -end; - -procedure TcxCustomControlStyles.Assign(Source: TPersistent); -var - I: Integer; -begin - if Source is TcxCustomControlStyles then - begin - for I := ecs_Content to ecs_Selection do - SetValue(I, TcxCustomControlStyles(Source).GetValue(I)); - end; - inherited Assign(Source); - Changed(ecs_Content); -end; - -function TcxCustomControlStyles.GetBackgroundParams: TcxViewParams; -begin - GetViewParams(ecs_Background, nil, nil, Result); -end; - -function TcxCustomControlStyles.GetSelectionParams: TcxViewParams; -const - AStyleIndexes: array[Boolean] of Integer = (ecs_Inactive, ecs_Selection); -begin - GetViewParams(AStyleIndexes[Control.Controller.Focused or Control.IsFocused], nil, nil, Result); -end; - -procedure TcxCustomControlStyles.Changed(AIndex: Integer); -begin - inherited Changed(AIndex); - if GetOwner is TcxEditingControl then - Control.UpdateViewStyles; -end; - -function TcxCustomControlStyles.GetDefaultStyle(Index: Integer; AData: Pointer): TcxStyle; -var - AParams: TcxViewParams; -begin - GetDefaultViewParams(Index, AData, AParams); - with FDefaultStyle do - begin - Color := AParams.Color; - Font := AParams.Font; - TextColor := AParams.TextColor; - // todo: enumeration names equal cxStyles. and cxEditors - AssignedValues := [cxStyles.svColor, cxStyles.svFont, cxStyles.svTextColor]; - end; - Result := FDefaultStyle; -end; - -procedure TcxCustomControlStyles.GetDefaultViewParams( - Index: Integer; AData: TObject; out AParams: TcxViewParams); -begin - inherited GetDefaultViewParams(Index, AData, AParams); - with AParams, LookAndFeelPainter do - begin - Bitmap := nil; - Font := Control.Font; - case Index of - ecs_Background, ecs_Content: - begin - Color := DefaultContentColor; - TextColor := DefaultContentTextColor; - end; - ecs_Selection: - begin - Color := DefaultSelectionColor; - TextColor := DefaultSelectionTextColor; - end; - ecs_Inactive: - begin - Color := DefaultInactiveColor; - TextColor := DefaultInactiveTextColor; - end; - else - inherited GetDefaultViewParams(Index, AData, AParams); - end; - end; -end; - -function TcxCustomControlStyles.GetControl: TcxEditingControl; -begin - Result := TcxEditingControl(GetOwner); -end; - -function TcxCustomControlStyles.GetPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := Control.LookAndFeelPainter; -end; - -{ TcxEditingControl } - -constructor TcxEditingControl.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FContainerList := TList.Create; - CreateSubClasses; - Keys := [kArrows, kChars]; - BorderStyle := cxcbsDefault; - DragCursor := crDefault; -end; - -destructor TcxEditingControl.Destroy; -begin - DestroyDesignSelectionHelper; - EndMouseTracking(Self); - DestroySubClasses; - FreeAndNil(FContainerList); - inherited Destroy; -end; - -procedure TcxEditingControl.BeginUpdate; -begin - DoBeginUpdate; -end; - -procedure TcxEditingControl.BeginDragAndDrop; -begin - Controller.BeginDragAndDrop; - inherited; -end; - -procedure TcxEditingControl.CancelUpdate; -begin - DataController.EndUpdate; - Dec(FLockUpdate); -end; - -procedure TcxEditingControl.EndUpdate; -begin - DoEndUpdate; -end; - -function TcxEditingControl.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - DataController.ExecuteAction(Action); -end; - -procedure TcxEditingControl.DragDrop(Source: TObject; X, Y: Integer); -begin - Controller.DragDrop(Source, X, Y); - inherited DragDrop(Source, X, Y); -end; - -procedure TcxEditingControl.LayoutChanged; -begin - if ViewInfo <> nil then ViewInfo.IsDirty := True; - if IsLocked then Exit; - Inc(FChangesCount); - Controller.Reset; - BeginUpdate; - try - DoLayoutChanged; - finally - ViewInfo.IsDirty := False; - CancelUpdate; - SetInternalControlsBounds; //TODO: need validation scrollbars visible - UpdateScrollBars; - Dec(FChangesCount); - if FChangesCount = 0 then - begin - Controller.HitTestController.ReCalculate; - Controller.EditingController.PostEditUpdate; - FIsLayoutChanged := True; - AfterLayoutChanged; - Invalidate; - end; - end; -end; - -function TcxEditingControl.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - DataController.UpdateAction(Action); -end; - -procedure TcxEditingControl.AfterLayoutChanged; -begin -end; - -procedure TcxEditingControl.BeginAutoDrag; -begin - Controller.HideHint; - if Controller.IsEditing then - Controller.EditingController.HideEdit(True); -// ControlState := ControlState - [csLButtonDown]; - BeginDrag(False, Mouse.DragThreshold); -// ControlState := ControlState + [csLButtonDown]; -end; - -procedure TcxEditingControl.BeforeUpdate; -begin -end; - -procedure TcxEditingControl.CheckCreateDesignSelectionHelper; -begin - if (FDesignSelectionHelper = nil) and (cxDesignSelectionHelperClass <> nil) and IsDesigning then - FDesignSelectionHelper := cxDesignSelectionHelperClass.Create(Self); -end; - -procedure TcxEditingControl.CreateSubClasses; -begin - FStyles := GetControlStylesClass.Create(Self); - FBrushCache := TcxBrushCache.Create; - FEditStyle := GetEditStyleClass.Create(nil, True); - FEditStyle.LookAndFeel.MasterLookAndFeel := LookAndFeel; - FController := GetControllerClass.Create(Self); - FDataController := GetDataControllerClass.Create(Self); - RecreateViewInfo; -end; - -procedure TcxEditingControl.ControlUpdateData(AInfo: TcxUpdateControlInfo); -begin - if AInfo is TcxDataChangedInfo then - DataChanged - else - if AInfo is TcxLayoutChangedInfo then - DataLayoutChanged - else - if AInfo is TcxFocusedRecordChangedInfo then - with TcxFocusedRecordChangedInfo(AInfo) do - begin - // need use row index instead of record index - Controller.FocusedRecordChanged(PrevFocusedRowIndex, FocusedRowIndex); - Controller.Navigator.Refresh; - end - else - if AInfo is TcxSelectionChangedInfo then - SelectionChanged(TcxSelectionChangedInfo(AInfo)) - else - if AInfo is TcxUpdateRecordInfo then - Controller.UpdateRecord(TcxUpdateRecordInfo(AInfo).RecordIndex); -end; - -procedure TcxEditingControl.DataChanged; -var - I: Integer; -begin - Inc(FLockUpdate); - try - for I := 0 to FContainerList.Count - 1 do - TcxCustomInplaceEditContainer(FContainerList.List^[I]).DataChanged; - finally - Dec(FLockUpdate); - if not IsLocked then Controller.RefreshFocusedRecord; - end; -end; - -procedure TcxEditingControl.DataLayoutChanged; -begin - Controller.EditingController.UpdateEditValue; - Controller.RefreshFocusedRecord; -end; - -procedure TcxEditingControl.DestroyDesignSelectionHelper; -begin - FreeAndNil(FDesignSelectionHelper); -end; - -procedure TcxEditingControl.DestroySubClasses; -begin - FreeAndNil(FViewInfo); - FreeAndNil(FBrushCache); - FreeAndNil(FController); - FreeAndNil(FEditStyle); - FreeAndNil(FDataController); - FreeAndNil(FStyles); -end; - -procedure TcxEditingControl.DoBeginUpdate; -begin - Inc(FLockUpdate); - DataController.BeginUpdate; -end; - -procedure TcxEditingControl.DoEndUpdate; -begin - DataController.EndUpdate; - Dec(FLockUpdate); - if FLockUpdate = 0 then BeforeUpdate; - LayoutChanged; -end; - -procedure TcxEditingControl.DoEditChanged( - AItem: TcxCustomInplaceEditContainer); -begin - if Assigned(FOnEditChanged) then FOnEditChanged(Self, AItem); -end; - -procedure TcxEditingControl.DoEdited( - AItem: TcxCustomInplaceEditContainer); -begin - if Assigned(FOnEdited) then FOnEdited(Self, AItem); -end; - -function TcxEditingControl.DoEditing( - AItem: TcxCustomInplaceEditContainer): Boolean; -begin - Result := True; - if Assigned(FOnEditing) then - FOnEditing(Self, AItem, Result); -end; - -procedure TcxEditingControl.DoEditValueChanged( - AItem: TcxCustomInplaceEditContainer); -begin - if Assigned(FOnEditValueChanged) then FOnEditValueChanged(Self, AItem); -end; - -procedure TcxEditingControl.DoGetCellHint(ACell: TObject; var AText: string; - var ANeedShow: Boolean); -begin -end; - -procedure TcxEditingControl.DoInitEdit( - AItem: TcxCustomInplaceEditContainer; AEdit: TcxCustomEdit); -begin - if Assigned(FOnInitEdit) then FOnInitEdit(Self, AItem, AEdit); -end; - -procedure TcxEditingControl.DoInplaceEditContainerItemAdded( - AItem: TcxCustomInplaceEditContainer); -begin - try - with DataController do - begin - FContainerList.Add(AItem); - UpdateIndexes; - AddItem(AItem); - end; - finally - LayoutChanged; - end; -end; - -procedure TcxEditingControl.DoInplaceEditContainerItemRemoved( - AItem: TcxCustomInplaceEditContainer); -begin - try - FContainerList.Remove(AItem); - DataController.RemoveItem(AItem); - UpdateIndexes; - finally - LayoutChanged; - end; -end; - -procedure TcxEditingControl.DoLayoutChanged; -begin - ViewInfo.Calculate; -end; - -function TcxEditingControl.GetControllerClass: TcxCustomControlControllerClass; -begin - Result := TcxCustomControlController; -end; - -function TcxEditingControl.GetControlStylesClass: TcxCustomControlStylesClass; -begin - Result := TcxCustomControlStyles; -end; - -function TcxEditingControl.GetDataControllerClass: TcxCustomDataControllerClass; -begin - Result := TcxControlDataController; -end; - -function TcxEditingControl.GetDragImageHelperClass: TcxDragImageHelperClass; -begin - Result := TcxDragImageHelper; -end; - -function TcxEditingControl.GetEditStyleClass: TcxCustomEditStyleClass; -begin - Result := TcxEditStyle; -end; - -function TcxEditingControl.GetEditingControllerClass: TcxEditingControllerClass; -begin - Result := TcxEditingController; -end; - -function TcxEditingControl.GetHitTestControllerClass: TcxHitTestControllerClass; -begin - Result := TcxCustomHitTestController; -end; - -function TcxEditingControl.GetHotTrackControllerClass: TcxHotTrackControllerClass; -begin - Result := TcxHotTrackController; -end; - -function TcxEditingControl.GetViewInfoClass: TcxCustomControlViewInfoClass; -begin - Result := TcxCustomControlViewInfo; -end; - -function TcxEditingControl.GetOptions: IcxEditingControlOptions; -begin - cxAbstractError; -end; - -function TcxEditingControl.GetPainterClass: TcxCustomControlPainterClass; -begin - Result := TcxCustomControlPainter; -end; - -function TcxEditingControl.IsLocked: Boolean; -begin - Result := (FLockUpdate <> 0) or IsLoading or IsDestroying or not HandleAllocated; -end; - -procedure TcxEditingControl.InvalidateRectEx( - const R: TRect; EraseBackground: Boolean); -begin - InvalidateRect(R, EraseBackground); -end; - -procedure TcxEditingControl.RecreateViewInfo; -begin - if Controller <> nil then - begin - Controller.EditingController.EditingItem := nil; - Controller.Clear; - FreeAndNil(FViewInfo); - FViewInfo := GetViewInfoClass.Create(Self); - end - else - begin - FreeAndNil(FViewInfo); - FViewInfo := GetViewInfoClass.Create(Self); - end; -end; - -procedure TcxEditingControl.SelectionChanged(AInfo: TcxSelectionChangedInfo); -begin -end; - -procedure TcxEditingControl.UpdateIndexes; -var - I: Integer; -begin - for I := 0 to FContainerList.Count - 1 do - TcxCustomInplaceEditContainer(FContainerList.List^[I]).FItemIndex := I; -end; - -procedure TcxEditingControl.UpdateViewStyles; -begin - if ViewInfo <> nil then - ViewInfo.State[cvis_StyleInvalid] := True; - LayoutChanged; -end; - -procedure TcxEditingControl.UpdateData; -begin - Controller.EditingController.UpdateValue; -end; - -procedure TcxEditingControl.AlignControls(AControl: TControl; var Rect: TRect); -begin - if not (AControl is TcxCustomEdit) then - inherited AlignControls(AControl, Rect); -end; - -procedure TcxEditingControl.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params do - WindowClass.style := WindowClass.style and not (CS_HREDRAW or CS_VREDRAW); -end; - -procedure TcxEditingControl.CreateWnd; -begin - DestroyDesignSelectionHelper; - inherited CreateWnd; - CheckCreateDesignSelectionHelper; -end; - -procedure TcxEditingControl.DestroyWnd; -begin - DestroyDesignSelectionHelper; - inherited DestroyWnd; -end; - -procedure TcxEditingControl.DoExit; -begin - if Controller <> nil then - Controller.DoExit; - inherited DoExit; -end; - -procedure TcxEditingControl.DblClick; -begin - Controller.DblClick; - inherited DblClick; -end; - -procedure TcxEditingControl.KeyDown(var Key: Word; Shift: TShiftState); -begin - Controller.FDragCancel := Key = VK_ESCAPE; - try - inherited KeyDown(Key, Shift); - Controller.KeyDown(Key, Shift); - finally - Controller.FDragCancel := False; - end; -end; - -procedure TcxEditingControl.FocusChanged; -begin - inherited FocusChanged; - if not IsDestroying then - Controller.FocusChanged; -end; - -procedure TcxEditingControl.KeyPress(var Key: Char); -begin - inherited KeyPress(Key); - Controller.KeyPress(Key); -end; - -procedure TcxEditingControl.KeyUp(var Key: Word; Shift: TShiftState); -begin - inherited KeyUp(Key, Shift); - Controller.KeyUp(Key, Shift); -end; - -procedure TcxEditingControl.Loaded; -begin - inherited Loaded; - DataController.Loaded; - LayoutChanged; - CheckCreateDesignSelectionHelper; -end; - -procedure TcxEditingControl.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - with Controller do - begin - HideHint; - LockShowHint := True; - BeforeMouseDown(Button, Shift, X, Y); - inherited MouseDown(Button, Shift, X, Y); - HitTestController.RecalculateOnMouseEvent(X, Y, Shift); - if not EditingController.IsErrorOnEditExit then - DoMouseDown(Button, Shift, X, Y); - end; -end; - -procedure TcxEditingControl.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - Controller.HitTestController.RecalculateOnMouseEvent(X, Y, Shift); - if DragAndDropState = ddsNone then //??? - Controller.DoMouseMove(Shift, X, Y); -end; - -procedure TcxEditingControl.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - Controller.LockShowHint := False; - Controller.HitTestController.RecalculateOnMouseEvent(X, Y, Shift); - if DragAndDropState = ddsNone then - begin - Controller.DoMouseUp(Button, Shift, X, Y); - inherited MouseUp(Button, Shift, X, Y); - end - else - begin - inherited MouseUp(Button, Shift, X, Y); - Controller.DoMouseUp(Button, Shift, X, Y); - end; - Controller.PostShowEdit; -end; - -procedure TcxEditingControl.MouseEnter(AControl: TControl); -begin - inherited MouseEnter(AControl); - BeginMouseTracking(Self, Bounds, Self); - Controller.MouseEnter; -end; - -procedure TcxEditingControl.MouseLeave(AControl: TControl); -begin - EndMouseTracking(Self); - Controller.MouseLeave; - inherited MouseLeave(AControl); -end; - -procedure TcxEditingControl.Paint; -begin - Controller.BeforePaint; - try - inherited Paint; - Painter.Paint; - finally - Controller.AfterPaint; - end; -end; - -procedure TcxEditingControl.WndProc(var Message: TMessage); -begin - if Controller <> nil then - Controller.WndProc(Message); - inherited WndProc(Message); -end; - -procedure TcxEditingControl.AfterMouseDown(AButton: TMouseButton; - X, Y: Integer); -begin - FDragPos := cxPoint(X, Y); - inherited AfterMouseDown(AButton, X, Y); -end; - -procedure TcxEditingControl.BoundsChanged; -begin - LayoutChanged; - inherited BoundsChanged; -end; - -function TcxEditingControl.CanDrag(X, Y: Integer): Boolean; -begin - if Controller <> nil then - Result := Controller.CanDrag(X, Y) - else - Result := False; -end; - -procedure TcxEditingControl.DoCancelMode; -begin - inherited DoCancelMode; - Controller.DoCancelMode; -end; - -procedure TcxEditingControl.FontChanged; -begin - inherited FontChanged; - UpdateViewStyles; -end; - -function TcxEditingControl.GetCursor(X, Y: Integer): TCursor; -begin - Result := Controller.GetCursor(X, Y); - if Result = crDefault then - Result := inherited GetCursor(X, Y); -end; - -function TcxEditingControl.GetDesignHitTest( - X, Y: Integer; Shift: TShiftState): Boolean; -begin - Result := Controller.HitTestController.AllowDesignMouseEvents(X, Y, Shift); -end; - -function TcxEditingControl.GetIsFocused: Boolean; -begin - Result := inherited GetIsFocused or Controller.HasFocusedControls; -end; - -function TcxEditingControl.GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; -begin - Result := inherited GetMouseWheelScrollingKind; - if Result = mwskNone then - Result := Controller.GetMouseWheelScrollingKind; -end; - -procedure TcxEditingControl.InitControl; -begin - inherited InitControl; - LayoutChanged; -end; - -function TcxEditingControl.IsPixelScrollBar(AKind: TScrollBarKind): Boolean; -begin - Result := Controller.IsPixelScrollBar(AKind); -end; - -procedure TcxEditingControl.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -var - I: Integer; - AIsEditing: Boolean; -begin - AIsEditing := (Controller <> nil) and Controller.IsEditing; - if AIsEditing then - Controller.EditingController.HideEdit(True); - inherited LookAndFeelChanged(Sender, AChangedValues); - BeginUpdate; - try - for I := 0 to FContainerList.Count - 1 do - TcxCustomInplaceEditContainer(FContainerList[I]).InternalPropertiesChanged; - finally - UpdateViewStyles; - EndUpdate; - if AIsEditing then - Controller.EditingController.ShowEdit; - end; -end; - -function TcxEditingControl.MayFocus: Boolean; -begin - Result := inherited MayFocus; - if Controller <> nil then - Result := Result and Controller.MayFocus; -end; - -// drag'n'drop -procedure TcxEditingControl.DoEndDrag(Target: TObject; X, Y: Integer); -begin - Controller.EndDrag(Target, X, Y); - inherited DoEndDrag(Target, X, Y); - Controller.LockShowHint := False; - Controller.PostShowEdit; - FinishDragImages; - FDragPos := cxNullPoint; -end; - -procedure TcxEditingControl.DoStartDrag(var DragObject: TDragObject); -begin - Controller.HitTestController.HitPoint := FDragPos; - Controller.BeforeStartDrag; - inherited DoStartDrag(DragObject); - Controller.StartDrag(DragObject); - FinishDragImages; - if HasDragDropImages then - begin - FDragHelper := GetDragImageHelperClass.Create(Self, FDragPos); - cxInstallMouseHookForDragControl(Self); - end; -end; - -procedure TcxEditingControl.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -begin - inherited DragOver(Source, X, Y, State, Accept); - Controller.DragOver(Source, X, Y, State, Accept); -end; - -function TcxEditingControl.DragDropImageDisplayRect: TRect; -begin - Result := cxNullRect; -end; - -procedure TcxEditingControl.DrawDragDropImage( - ADragBitmap: TBitmap; ACanvas: TcxCanvas); -begin -end; - -procedure TcxEditingControl.FinishDragImages; -begin - if FDragHelper <> nil then - begin - cxResetMouseHookForDragControl; - FreeAndNil(FDragHelper); - end; -end; - -function TcxEditingControl.HasDragDropImages: Boolean; -begin - Result := Options.OptionsBehavior.DragDropText; -end; - -// scrollbars -procedure TcxEditingControl.InitScrollBarsParameters; -begin - if Controller <> nil then - Controller.InitScrollBarsParameters; -end; - -procedure TcxEditingControl.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -begin - Controller.EditingController.PostEditUpdate; - Controller.Scroll(AScrollBarKind, AScrollCode, AScrollPos); -end; - -procedure TcxEditingControl.DragAndDrop(const P: TPoint; - var Accepted: Boolean); -begin - inherited DragAndDrop(P, Accepted); - Controller.DragAndDrop(P, Accepted); -end; - -procedure TcxEditingControl.EndDragAndDrop(Accepted: Boolean); -begin - inherited EndDragAndDrop(Accepted); - Controller.EndDragAndDrop(Accepted); - FDragPos := cxNullPoint; -end; - -function TcxEditingControl.GetDragAndDropObjectClass: TcxDragAndDropObjectClass; -begin - Result := Controller.GetDragAndDropObjectClass; -end; - -function TcxEditingControl.StartDragAndDrop(const P: TPoint): Boolean; -begin - Result := Controller.StartDragAndDrop(P); - if Result then - Controller.HideHint; -end; - -function TcxEditingControl.GetBufferedPaint: Boolean; -begin - Result := GetPainter.Buffered; -end; - -function TcxEditingControl.GetPainter: TcxCustomControlPainter; -begin - Result := ViewInfo.FPainter; -end; - -procedure TcxEditingControl.DoMouseLeave; -begin - MouseLeave(Self); -end; - -procedure TcxEditingControl.SetBufferedPaint(Value: Boolean); -begin - Painter.Buffered := Value; -end; - -procedure TcxEditingControl.SetEditStyle(Value: TcxCustomEditStyle); -begin - FEditStyle.Assign(Value); -end; - -procedure TcxEditingControl.SetStyles(Value: TcxCustomControlStyles); -begin - FStyles.Assign(Value); -end; - -procedure TcxEditingControl.WMCancelMode(var Message: TWMCancelMode); -begin - Controller.FDragCancel := True; - try - inherited; - finally - Controller.FDragCancel := False; - end; -end; - -procedure TcxEditingControl.WMSetCursor(var Message: TWMSetCursor); -var - P: TPoint; -begin - GetCursorPos(P); - P := ScreenToClient(P); - with Controller.HitTestController do - begin - if IsDesigning and (DragAndDropState = ddsNone) and - AllowDesignMouseEvents(P.X, P.Y, [ssLeft]) then - SetCursor(Screen.Cursors[GetCurrentCursor]) - else - inherited; - end; -end; - -{ TcxExtEditingControl } - -procedure TcxExtEditingControl.CreateSubClasses; -begin - FOptionsBehavior := GetOptionsBehaviorClass.Create(Self); - FOptionsData := GetOptionsDataClass.Create(Self); - FOptionsView := GetOptionsViewClass.Create(Self); - inherited CreateSubClasses; -end; - -procedure TcxExtEditingControl.DestroySubClasses; -begin - inherited DestroySubClasses; - FOptionsBehavior.Free; - FOptionsData.Free; - FOptionsView.Free; -end; - -function TcxExtEditingControl.GetOptions: IcxEditingControlOptions; -begin - Result := Self; -end; - -function TcxExtEditingControl.GetOptionsBehaviorClass: TcxControlOptionsBehaviorClass; -begin - Result := TcxControlOptionsBehavior; -end; - -function TcxExtEditingControl.GetOptionsDataClass: TcxControlOptionsDataClass; -begin - Result := TcxControlOptionsData; -end; - -function TcxExtEditingControl.GetOptionsViewClass: TcxControlOptionsViewClass; -begin - Result := TcxControlOptionsView; -end; - -function TcxExtEditingControl.GetOptionsBehavior: TcxControlOptionsBehavior; -begin - Result := FOptionsBehavior; -end; - -function TcxExtEditingControl.GetOptionsData: TcxControlOptionsData; -begin - Result := FOptionsData; -end; - -function TcxExtEditingControl.GetOptionsView: TcxControlOptionsView; -begin - Result := FOptionsView; -end; - -procedure TcxExtEditingControl.SetOptionsBehavior( - Value: TcxControlOptionsBehavior); -begin - FOptionsBehavior.Assign(Value); -end; - -procedure TcxExtEditingControl.SetOptionsData( - Value: TcxControlOptionsData); -begin - FOptionsData.Assign(Value); -end; - -procedure TcxExtEditingControl.SetOptionsView( - Value: TcxControlOptionsView); -begin - FOptionsView.Assign(Value); -end; - -{ TcxValueTypeClassRepository } - -constructor TcxValueTypeClassRepository.Create; -begin - FList := TStringList.Create; -end; - -destructor TcxValueTypeClassRepository.Destroy; -begin - FList.Free; - inherited Destroy; -end; - -function TcxValueTypeClassRepository.FindByClassType(ATypeClass: TcxValueTypeClass): string; -var - I: Integer; -begin - I := FList.IndexOfObject(TObject(ATypeClass)); - if I >= 0 then - Result := FList[I] - else - Result := ''; -end; - -function TcxValueTypeClassRepository.FindByDescription(const ADescription: string): TcxValueTypeClass; -var - I: Integer; -begin - I := FList.IndexOf(ADescription); - if I >= 0 then - Result := TcxValueTypeClass(FList.Objects[I]) - else - Result := nil; -end; - -procedure TcxValueTypeClassRepository.RegisterValueTypeClass(const ADescription: string; ATypeClass: TcxValueTypeClass); -begin - if FList.IndexOfObject(TObject(ATypeClass)) < 0 then - FList.AddObject(ADescription, TObject(ATypeClass)); -end; - -procedure TcxValueTypeClassRepository.UnRegisterValueTypeClass(ATypeClass: TcxValueTypeClass); -var - I: Integer; -begin - I := FList.IndexOfObject(TObject(ATypeClass)); - if I >= 0 then FList.Delete(I); -end; - -function TcxValueTypeClassRepository.GetCount: Integer; -begin - Result := FList.Count; -end; - -function TcxValueTypeClassRepository.GetValueTypeClass(AIndex: Integer): TcxValueTypeClass; -begin - Result := TcxValueTypeClass(FList.Objects[AIndex]); -end; - -function TcxValueTypeClassRepository.GetDescription(AIndex: Integer): string; -begin - Result := FList[AIndex]; -end; - -function cxieValueTypeClassRepository: TcxValueTypeClassRepository; -begin - Result := ValueTypeClassRepository; -end; - -procedure cxieRegisterValueTypeClass( - const ADescription: string; ATypeClass: TcxValueTypeClass); -begin - ValueTypeClassRepository.RegisterValueTypeClass(ADescription, ATypeClass); -end; - -procedure cxieUnRegisterValueTypeClass(ATypeClass: TcxValueTypeClass); -begin - ValueTypeClassRepository.UnRegisterValueTypeClass(ATypeClass); -end; - -function cxPtInViewInfoItem(AItem: TcxCustomViewInfoItem; const APoint: TPoint): Boolean; -begin - Result := (AItem <> nil) and AItem.Visible and cxRectPtIn(AItem.ClipRect, APoint); -end; - -procedure RegisterDefaultValueTypeClasses; -begin - cxieRegisterValueTypeClass('Boolean', TcxBooleanValueType); - cxieRegisterValueTypeClass('String', TcxStringValueType); - cxieRegisterValueTypeClass('Integer', TcxIntegerValueType); - cxieRegisterValueTypeClass('Currency', TcxCurrencyValueType); - cxieRegisterValueTypeClass('Float', TcxFloatValueType); - cxieRegisterValueTypeClass('DateTime', TcxDateTimeValueType); - cxieRegisterValueTypeClass('Variant', TcxVariantValueType); -end; - -procedure cxStylesToViewParams(AMasterStyles: TcxCustomControlStyles; AIndex: Integer; - AData: Pointer; const AStyles: array of TcxStyle; out AParams: TcxViewParams); -var - I: Integer; - IsColorAssigned, IsFontAssigned, IsFontColorAssigned, IsBitmapAssigned: Boolean; - - function NeedValueAssign(var AFlag: Boolean; IsValueAssigned: Boolean): Boolean; - begin - Result := not AFlag and IsValueAssigned; - if Result then AFlag := True; - end; - - function AssignStyle(AStyle: TcxStyle): Boolean; - begin - Result := False; - if not Assigned(AStyle) or (csDestroying in AStyle.ComponentState) then Exit; - with AStyle do - begin - if NeedValueAssign(IsColorAssigned, cxStyles.svColor in AssignedValues) then - AParams.Color := Color; - if NeedValueAssign(IsFontAssigned, cxStyles.svFont in AssignedValues) then - AParams.Font := Font; - if NeedValueAssign(IsFontColorAssigned, cxStyles.svTextColor in AssignedValues) then - AParams.TextColor := TextColor; - if NeedValueAssign(IsBitmapAssigned, cxStyles.svBitmap in AssignedValues) then - AParams.Bitmap := Bitmap; - end; - Result := IsFontColorAssigned and IsFontAssigned and IsColorAssigned and IsBitmapAssigned; - end; - - procedure AssignDefaultViewParams; - var - ADefParams: TcxViewParams; - begin - AMasterStyles.GetDefaultViewParams(AIndex, AData, ADefParams); - if not IsColorAssigned then - AParams.Color := ADefParams.Color; - if not IsFontAssigned then - AParams.Font := ADefParams.Font; - if not IsFontColorAssigned then - AParams.TextColor := ADefParams.TextColor; - if not IsBitmapAssigned then - AParams.Bitmap := ADefParams.Bitmap; - end; - -begin - IsColorAssigned := False; - IsFontAssigned := False; - IsFontColorAssigned := False; - IsBitmapAssigned := False; - FillChar(AParams, SizeOf(AParams), 0); - for I := Low(AStyles) to High(AStyles) do - if AssignStyle(AStyles[I]) then Exit; - AssignDefaultViewParams; -end; - -function cxInRange(Value: Integer; AMin, AMax: Integer): Boolean; -begin - Result := (Value >= AMin) and (Value <= AMax); -end; - -function cxRange(var Value: Integer; AMin, AMax: Integer): Boolean; -begin - Result := (Value >= AMin) and (Value <= AMax); - if not Result then - begin - if Value < AMin then - Value := AMin - else - Value := AMax - end; -end; - -function cxSetValue(Condition: Boolean; ATrueValue, AFalseValue: Integer): Integer; -begin - if Condition then - Result := ATrueValue - else - Result := AFalseValue; -end; - -function cxConfirmMessageBox(const AText, ACaption: string): Boolean; -begin - Result := Application.MessageBox(PChar(AText), PChar(ACaption), - MB_ICONQUESTION or MB_OKCANCEL) = ID_OK -end; - -initialization - ValueTypeClassRepository := TcxValueTypeClassRepository.Create; - RegisterDefaultValueTypeClasses; - -finalization - cxResetMouseHookForDragControl; - FreeAndNil(ValueTypeClassRepository); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxInplaceContainerReg.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxInplaceContainerReg.pas deleted file mode 100644 index 40429d37..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxInplaceContainerReg.pas +++ /dev/null @@ -1,331 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Common Editing Library } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE COMMONEDITINGLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxInplaceContainerReg; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils, -{$IFDEF DELPHI6} - DesignIntf, DesignEditors, -{$ELSE} - DsgnWnds, DsgnIntf, -{$ENDIF} - cxClasses, cxPropEditors, cxEdit, cxDesignWindows, cxInplaceContainer; - -type - TItemDataBindingAccess = class(TcxItemDataBinding); - - { TcxstPropEventsProperty } - - TcxInplaceEditContainerPropertiesEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - - { TcxInplaceEditContainerPropertiesProperty } - - TcxInplaceEditContainerPropertiesProperty = class(TClassProperty) - protected - function HasSubProperties: Boolean; - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - { TcxValueTypeClassProperty } - - TcxValueTypeClassProperty = class(TStringProperty) - public - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - { TcxDesignSelectionHelper } - - TcxDesignSelectionHelper = class(TcxCustomDesignSelectionHelper - {$IFDEF DELPHI6}, IUnknown, IDesignNotification{$ENDIF}) - private - FDesignHelper: TcxDesignHelper; - protected - {$IFDEF DELPHI6} - // IUnknown - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall; - // IDesignNotification - procedure ItemDeleted(const ADesigner: IDesigner; AItem: TPersistent); - procedure ItemInserted(const ADesigner: IDesigner; AItem: TPersistent); - procedure ItemsModified(const ADesigner: IDesigner); - procedure SelectionChanged(const ADesigner: IDesigner; const ASelection: IDesignerSelections); - procedure DesignerOpened(const ADesigner: IDesigner; AResurrecting: Boolean); - procedure DesignerClosed(const ADesigner: IDesigner; AGoingDormant: Boolean); - {$ENDIF} - public - constructor Create(AControl: TcxEditingControl); override; - destructor Destroy; override; - function IsObjectSelected(AObject: TPersistent): Boolean; override; - procedure Select(AObject: TPersistent; AShift: TShiftState); override; - procedure SetSelection(AList: TList); override; - procedure UnselectObject(AObject: TPersistent); override; - end; - -procedure Register; - -implementation - -uses - Windows; - -{ TcxInplaceEditContainerPropertiesEventsProperty } - -function TcxInplaceEditContainerPropertiesEventsProperty.GetInstance: TPersistent; -var - AIntf: IcxEditorPropertiesContainer; -begin - if Supports(GetComponent(0), IcxEditorPropertiesContainer, AIntf) then - Result := AIntf.GetProperties - else - Result := nil; -end; - -{ TcxInplaceEditContainerPropertiesProperty } - -function TcxInplaceEditContainerPropertiesProperty.HasSubProperties: Boolean; -var - I: Integer; - AIntf: IcxEditorPropertiesContainer; -begin - for I := 0 to PropCount - 1 do - begin - Result := Supports(GetComponent(I), IcxEditorPropertiesContainer, AIntf) and - (AIntf.GetProperties <> nil); - if not Result then Exit; - end; - Result := True; -end; - -function TcxInplaceEditContainerPropertiesProperty.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes; - if not HasSubProperties then - Exclude(Result, paSubProperties); - Result := Result - [paReadOnly] + [paValueList, paSortList, paRevertable] + - {$IFDEF DELPHI6}[paVolatileSubProperties] {$ELSE } [] {$ENDIF}; -end; - -function TcxInplaceEditContainerPropertiesProperty.GetValue: string; -begin - if HasSubProperties then - Result := GetRegisteredEditProperties.GetDescriptionByClass( - TcxCustomEditProperties(GetOrdValue).ClassType) - else - Result := ''; -end; - -procedure TcxInplaceEditContainerPropertiesProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to GetRegisteredEditProperties.Count - 1 do - Proc(GetRegisteredEditProperties.Descriptions[I]); -end; - -procedure TcxInplaceEditContainerPropertiesProperty.SetValue(const Value: string); -var - APropertiesClass: TcxCustomEditPropertiesClass; - I: Integer; - AIntf: IcxEditorPropertiesContainer; -begin - {$IFNDEF DELPHI7} - ObjectInspectorCollapseProperty; - {$ENDIF} - APropertiesClass := TcxCustomEditPropertiesClass( - GetRegisteredEditProperties.FindByClassName(Value)); - if APropertiesClass = nil then - APropertiesClass := TcxCustomEditPropertiesClass( - GetRegisteredEditProperties.FindByDescription(Value)); - for I := 0 to PropCount - 1 do - if Supports(GetComponent(I), IcxEditorPropertiesContainer, AIntf) then - AIntf.SetPropertiesClass(APropertiesClass); - Modified; -end; - -{ TcxValueTypeClassProperty } - -function TcxValueTypeClassProperty.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes - [paReadOnly] + [paValueList]; -end; - -procedure TcxValueTypeClassProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to cxieValueTypeClassRepository.Count - 1 do - Proc(cxieValueTypeClassRepository.Description[I]); -end; - -procedure TcxValueTypeClassProperty.SetValue(const Value: string); -var - I: Integer; -begin - for I := 0 to PropCount - 1 do - TItemDataBindingAccess(GetComponent(I)).ValueType := Value; -end; - -{ TcxDesignSelectionHelper } - -constructor TcxDesignSelectionHelper.Create(AControl: TcxEditingControl); -begin - inherited Create(AControl); - FDesignHelper := TcxDesignHelper.Create(Control); -{$IFDEF DELPHI6} - RegisterDesignNotification(Self); -{$ENDIF} -end; - -destructor TcxDesignSelectionHelper.Destroy; -begin -{$IFDEF DELPHI6} - UnregisterDesignNotification(Self); -{$ENDIF} - FDesignHelper.Free; - inherited Destroy; -end; - -function TcxDesignSelectionHelper.IsObjectSelected( - AObject: TPersistent): Boolean; -begin - Result := FDesignHelper.IsObjectSelected(AObject); -end; - -procedure TcxDesignSelectionHelper.Select(AObject: TPersistent; - AShift: TShiftState); -begin - if AShift * [ssCtrl, ssAlt] <> [] then Exit; - if AObject = nil then - FDesignHelper.SelectObject(Control) - else - if ssShift in AShift then - FDesignHelper.ChangeSelection(AObject) - else - FDesignHelper.SelectObject(AObject); -end; - -procedure TcxDesignSelectionHelper.SetSelection(AList: TList); -begin - FDesignHelper.SetSelection(AList); -end; - -procedure TcxDesignSelectionHelper.UnselectObject(AObject: TPersistent); -begin - FDesignHelper.UnselectObject(AObject); -end; - -{$IFDEF DELPHI6} -function TcxDesignSelectionHelper._AddRef: Integer; stdcall; -begin - Result := -1; -end; - -function TcxDesignSelectionHelper._Release: Integer; stdcall; -begin - Result := -1; -end; - -function TcxDesignSelectionHelper.QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; -begin - if GetInterface(IID, Obj) then Result := 0 else Result := cxE_NOINTERFACE; -end; - -procedure TcxDesignSelectionHelper.ItemDeleted(const ADesigner: IDesigner; - AItem: TPersistent); -begin -end; - -procedure TcxDesignSelectionHelper.ItemInserted(const ADesigner: IDesigner; - AItem: TPersistent); -begin -end; - -procedure TcxDesignSelectionHelper.ItemsModified(const ADesigner: IDesigner); -begin -end; - -procedure TcxDesignSelectionHelper.SelectionChanged(const ADesigner: IDesigner; - const ASelection: IDesignerSelections); -begin - Control.LayoutChanged; - Control.Invalidate; -end; - -procedure TcxDesignSelectionHelper.DesignerOpened(const ADesigner: IDesigner; - AResurrecting: Boolean); -begin -end; - -procedure TcxDesignSelectionHelper.DesignerClosed(const ADesigner: IDesigner; - AGoingDormant: Boolean); -begin -end; -{$ENDIF} - -procedure Register; -begin - RegisterClasses([TcxCustomInplaceEditContainer]); - RegisterNoIcon([TcxCustomInplaceEditContainer]); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomInplaceEditContainer, 'PropertiesEvents', - TcxInplaceEditContainerPropertiesEventsProperty); - RegisterPropertyEditor(TypeInfo(string), TcxCustomInplaceEditContainer, - 'PropertiesClassName', nil); - RegisterPropertyEditor(TypeInfo(TcxCustomEditProperties), TcxCustomInplaceEditContainer, - 'Properties', TcxInplaceEditContainerPropertiesProperty); - RegisterPropertyEditor(TypeInfo(string), TcxItemDataBinding, - 'ValueType', TcxValueTypeClassProperty); -end; - -initialization -{$IFDEF DELPHI6} - cxDesignSelectionHelperClass := TcxDesignSelectionHelper; -{$ENDIF} - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxLabel.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxLabel.pas deleted file mode 100644 index 09309e83..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxLabel.pas +++ /dev/null @@ -1,1681 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxLabel; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, Variants, -{$ENDIF} - Windows, Classes, Controls, Forms, Graphics, Messages, SysUtils, cxClasses, - cxContainer, cxControls, cxCustomData, cxDataUtils, cxEdit, cxExtEditConsts, - cxGraphics, cxTextEdit, cxVariants, cxLookAndFeelPainters; - -type - TcxLabelEffect = (cxleNormal, cxleFun, cxleExtrude, cxleCool); - TcxLabelLineAlignment = (cxllaTop, cxllaCenter, cxllaBottom); - TcxLabelLineOrientation = (cxlloHorizontal, cxlloVertical); - TcxLabelStyle = (cxlsNormal, cxlsRaised, cxlsLowered, cxlsOutLine); - TcxLabelOrientation = (cxoLeft, cxoRight, cxoTop, cxoBottom, cxoLeftTop, - cxoLeftBottom, cxoRightTop, cxoRightBottom); - - TcxCustomLabel = class; - - { TcxLabelEditStyle } - - TcxLabelEditStyle = class(TcxEditStyle) - protected - function DefaultBorderStyle: TcxContainerBorderStyle; override; - function DefaultHotTrack: Boolean; override; - end; - - { TcxLabelLineOptions } - - TcxLabelLineOptions = class(TPersistent) - private - FAlignment: TcxLabelLineAlignment; - FInnerColor: TColor; - FOnChanged: TNotifyEvent; - FOuterColor: TColor; - FVisible: Boolean; - function GetIsCustomColorsAssigned: Boolean; - procedure SetAlignment(AValue: TcxLabelLineAlignment); - procedure SetInnerColor(AValue: TColor); - procedure SetOuterColor(AValue: TColor); - procedure SetVisible(AValue: Boolean); - protected - procedure Changed; virtual; - - property IsCustomColorsAssigned: Boolean read GetIsCustomColorsAssigned; - property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; - public - constructor Create; virtual; - procedure Assign(Source: TPersistent); override; - published - property Alignment: TcxLabelLineAlignment read FAlignment write SetAlignment default cxllaCenter; - property InnerColor: TColor read FInnerColor write SetInnerColor default clDefault; - property OuterColor: TColor read FOuterColor write SetOuterColor default clDefault; - property Visible: Boolean read FVisible write SetVisible default False; - end; - - { TcxCustomLabelViewInfo } - - TcxCustomLabelViewInfo = class(TcxCustomTextEditViewInfo) - private - FAlignment: TcxEditAlignment; - FAngle: Integer; - FDepth: Word; - FDepthDeltaSize: TSize; - FDrawBitmap: TcxBitmap; - FGlyph: TBitmap; - FInplaceOffset: TPoint; - FIsDrawBitmapDirty: Boolean; - FLabelEffect: TcxLabelEffect; - FLabelStyle: TcxLabelStyle; - FLabelStyleOffset: Integer; - FLabelTextRect: TRect; - FLineInnerColor: TColor; - FLineOrientation: TcxLabelLineOrientation; - FLineOuterColor: TColor; - FLineRect: TRect; - FOrientation: TcxLabelOrientation; - FPenWidth: Integer; - FShadowedColor: TColor; - FWordWrap: Boolean; - protected - procedure InternalDrawBackground(ACanvas, ASource: TcxCanvas; const R: TRect; - AParentBackgroundOffset: TPoint); virtual; - procedure SetBackgroundColor(Value: TColor); override; - - property Alignment: TcxEditAlignment read FAlignment write FAlignment; - property Angle: Integer read FAngle write FAngle; - property Depth: Word read FDepth write FDepth; - property DepthDeltaSize: TSize read FDepthDeltaSize write FDepthDeltaSize; - property Glyph: TBitmap read FGlyph write FGlyph; - property LabelEffect: TcxLabelEffect read FLabelEffect write FLabelEffect; - property LabelStyle: TcxLabelStyle read FLabelStyle write FLabelStyle; - property LabelStyleOffset: Integer read FLabelStyleOffset write FLabelStyleOffset; - property LabelTextRect: TRect read FLabelTextRect write FLabelTextRect; - property LineInnerColor: TColor read FLineInnerColor write FLineInnerColor; - property LineOrientation: TcxLabelLineOrientation read FLineOrientation write FLineOrientation; - property LineOuterColor: TColor read FLineOuterColor write FLineOuterColor; - property LineRect: TRect read FLineRect write FLineRect; - property Orientation: TcxLabelOrientation read FOrientation write FOrientation; - property PenWidth: Integer read FPenWidth write FPenWidth; - property ShadowedColor: TColor read FShadowedColor write FShadowedColor; - property WordWrap: Boolean read FWordWrap write FWordWrap; - public - DrawTextOffsets: TRect; - FocusRect: TRect; - HasGlyph: Boolean; - LeftTop: TPoint; - ShowAccelChar: Boolean; - constructor Create; override; - destructor Destroy; override; - procedure Offset(DX, DY: Integer); override; - procedure Paint(ACanvas: TcxCanvas); override; - procedure DrawLabel(ACanvas: TcxCanvas); virtual; - end; - - { TcxCustomLabelViewData } - - TcxCustomLabelProperties = class; - - TcxCustomLabelViewData = class(TcxCustomEditViewData) - private - function GetLineOptions: TcxLabelLineOptions; - function GetProperties: TcxCustomLabelProperties; - procedure CalculateLabelViewInfoProps(AViewInfo: TcxCustomEditViewInfo); - protected - function CalculateLabelStyleOffset(ACanvas: TcxCanvas): Integer; virtual; - function CalculateLineRect(var ATextRect: TRect; const ABounds: TRect; - AAlignment: TcxLabelLineAlignment; AVisible: Boolean; ALineHeight: Integer; - AOrientation: TcxLabelLineOrientation): TRect; virtual; - function CalculateTextRect(const R: TRect; const ATextSize: TSize; - ARealAngle: Integer): TRect; virtual; - function CalculateTextSize(ACanvas: TcxCanvas; const R: TRect; AText: string): TSize; virtual; - procedure CalculateViewParams(ACanvas: TcxCanvas; AViewInfo: TcxCustomLabelViewInfo); - function GetDrawTextFlags: Integer; virtual; - function GetIsEditClass: Boolean; - function GetLineHeight: Integer; virtual; - function InternalEditValueToDisplayText(AEditValue: TcxEditValue): string; override; - function IsLineVisible(ARealAngle: Integer): Boolean; virtual; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - function GetEditContentSize(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; override; - - property LineOptions: TcxLabelLineOptions read GetLineOptions; - property Properties: TcxCustomLabelProperties read GetProperties; - end; - - { TcxCustomLabelProperties } - - TcxCustomLabelProperties = class(TcxCustomEditProperties) - private - FAngle: Integer; - FDepth: Word; - FGlyph: TBitmap; - FLabelEffect: TcxLabelEffect; - FLabelStyle: TcxLabelStyle; - FLineOptions: TcxLabelLineOptions; - FOrientation: TcxLabelOrientation; - FPenWidth: Integer; - FShadowedColor: TColor; - FShowAccelChar: Boolean; - FShowEndEllipsis: Boolean; // deprecated - FWordWrap: Boolean; - procedure SetAngle(Value: Integer); - procedure SetDepth(Value : Word); - procedure SetLabelEffect(Value : TcxLabelEffect); - procedure SetLabelStyle(Value : TcxLabelStyle); - procedure SetLineOptions(AValue: TcxLabelLineOptions); - procedure SetOrientation(Value : TcxLabelOrientation); - procedure SetPenWidth(Value: Integer); - procedure SetShadowedColor(Value : TColor); - function GetGlyph: TBitmap; - procedure ChangeHandler(Sender: TObject); - procedure SetGlyph(Value: TBitmap); - procedure SetShowAccelChar(Value: Boolean); - procedure SetWordWrap(Value: Boolean); - protected - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function HasDisplayValue: Boolean; override; - function CalculateDepthDelta: TSize; virtual; - function GetDisplayFormatOptions: TcxEditDisplayFormatOptions; override; - // - property ShowEndEllipsis: Boolean read FShowEndEllipsis write FShowEndEllipsis stored False; // deprecated - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CanCompareEditValue: Boolean; override; - class function GetContainerClass: TcxContainerClass; override; - class function GetStyleClass: TcxCustomEditStyleClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - // !!! - property Angle: Integer read FAngle write SetAngle default 0; - property Depth: Word read FDepth write SetDepth default 0; - property Glyph: TBitmap read GetGlyph write SetGlyph; - property LabelEffect: TcxLabelEffect read FLabelEffect write SetLabelEffect default cxleNormal; - property LabelStyle: TcxLabelStyle read FLabelStyle write SetLabelStyle default cxlsNormal; - property LineOptions: TcxLabelLineOptions read FLineOptions write SetLineOptions; - property Orientation: TcxLabelOrientation read FOrientation write SetOrientation default cxoRightBottom; - property PenWidth: Integer read FPenWidth write SetPenWidth default 1; - property ShadowedColor: TColor read FShadowedColor write SetShadowedColor default clGrayText; - property ShowAccelChar: Boolean read FShowAccelChar write SetShowAccelChar default True; - property Transparent; // deprecated - property WordWrap: Boolean read FWordWrap write SetWordWrap default False; - end; - - { TcxLabelProperties } - - TcxLabelProperties = class(TcxCustomLabelProperties) - published - property Alignment; - property Angle; - property Depth; - property Glyph; - property LabelEffect; - property LabelStyle; - property LineOptions; - property Orientation; - property PenWidth; - property ShadowedColor; - property ShowAccelChar; - property ShowEndEllipsis; // deprecated - property Transparent; // deprecated - property WordWrap; - end; - - { TcxCustomLabel } - - TcxCustomLabel = class(TcxCustomEdit) - private - FFocusControl: TWinControl; - FLockCaption: Boolean; - function GetProperties: TcxCustomLabelProperties; - function GetActiveProperties: TcxCustomLabelProperties; - function GetStyle: TcxLabelEditStyle; - function GetViewInfo: TcxCustomLabelViewInfo; - procedure SetFocusControl(Value: TWinControl); - procedure SetProperties(Value: TcxCustomLabelProperties); - procedure SetStyle(Value: TcxLabelEditStyle); - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - protected - function GetEditStateColorKind: TcxEditStateColorKind; override; - procedure Initialize; override; - procedure InternalSetEditValue(const Value: TcxEditValue; AValidateEditValue: Boolean); override; - procedure Loaded; override; - procedure SetInternalDisplayValue(Value: TcxEditValue); override; - procedure DoAutoSizeChanged; override; - procedure TextChanged; override; - function CanAutoWidth: Boolean; override; - function CanFocusOnClick: Boolean; override; - function DefaultParentColor: Boolean; override; - procedure Notification(ACOmponent: TComponent; Operation: TOperation); override; - procedure PropertiesChanged(Sender: TObject); override; - function UseAnchorX: Boolean; override; - function UseAnchorY: Boolean; override; - - property FocusControl: TWinControl read FFocusControl write SetFocusControl; - property ViewInfo: TcxCustomLabelViewInfo read GetViewInfo; - public - destructor Destroy; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function CanFocus: Boolean; override; - {$IFDEF DELPHI10} - function GetTextBaseLine: Integer; override; - function HasTextBaseLine: Boolean; override; - {$ENDIF} - property ActiveProperties: TcxCustomLabelProperties read GetActiveProperties; - property Caption; - property Properties: TcxCustomLabelProperties read GetProperties write SetProperties; - property Style: TcxLabelEditStyle read GetStyle write SetStyle; - property TabOrder stored False; - property Transparent; - end; - - { TcxCustomLabel } - - TcxLabel = class(TcxCustomLabel) - private - function GetActiveProperties: TcxLabelProperties; - function GetProperties: TcxLabelProperties; - procedure SetProperties(Value: TcxLabelProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxLabelProperties read GetActiveProperties; - published - property Align; - property Anchors; - property AutoSize; - property Caption; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property FocusControl; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property Properties: TcxLabelProperties read GetProperties - write SetProperties; - property TabOrder; - property Transparent; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -uses - Math, cxEditConsts, cxEditPaintUtils, cxEditUtils, cxExtEditUtils, dxUxTheme, - cxGeometry, cxFilterControlUtils, dxThemeConsts, dxThemeManager; - -const - TextFromBorderOffset = 1; - TextFromLineOffset = 3; - -function GetRealTextAngle(AAngle: Integer; AIsTrueTypeFont: Boolean): Integer; -begin - Result := Integer(AIsTrueTypeFont) * (AAngle mod 360 + 360) mod 360; -end; - -procedure CalculateCustomLabelViewInfo(ACanvas: TcxCanvas; - AViewData: TcxCustomLabelViewData; AViewInfo: TcxCustomLabelViewInfo); - - procedure CheckFocusRectBounds; - begin - with AViewInfo do - begin - if FocusRect.Left < TextRect.Left - 1 then - FocusRect.Left := TextRect.Left - 1; - if FocusRect.Top < TextRect.Top - 1 then - FocusRect.Top := TextRect.Top - 1; - if FocusRect.Right > TextRect.Right + 1 then - FocusRect.Right := TextRect.Right + 1; - if FocusRect.Bottom > TextRect.Bottom + 1 then - FocusRect.Bottom := TextRect.Bottom + 1; - end; - end; - -begin - with AViewInfo do - begin - if not IsInplace and Focused then - if Length(Text) = 0 then - FocusRect := cxEmptyRect - else - begin - FocusRect := TextRect; - InflateRect(FocusRect, 1, 1); - CheckFocusRectBounds; - end; - end; -end; - -{ TcxLabelEditStyle } - -function TcxLabelEditStyle.DefaultBorderStyle: TcxContainerBorderStyle; -begin - if IsBaseStyle then - Result := cbsNone - else - Result := inherited DefaultBorderStyle; -end; - -function TcxLabelEditStyle.DefaultHotTrack: Boolean; -begin - Result := False; -end; - -{ TcxCustomLabelViewInfo } - -constructor TcxCustomLabelViewInfo.Create; -begin - inherited Create; - FAlignment := TcxEditAlignment.Create(nil); - FDrawBitmap := TcxBitmap.CreateSize(0, 0, pf32bit); - FInplaceOffset := Point(MaxInt, MaxInt); -end; - -destructor TcxCustomLabelViewInfo.Destroy; -begin - FreeAndNil(FDrawBitmap); - FreeAndNil(FAlignment); - inherited; -end; - -procedure TcxCustomLabelViewInfo.Offset(DX, DY: Integer); -begin - inherited Offset(DX, DY); - OffsetRect(FLabelTextRect, DX, DY); - OffsetRect(FocusRect, DX, DY); - if Transparent then - FIsDrawBitmapDirty := True; -end; - -procedure TcxCustomLabelViewInfo.Paint(ACanvas: TcxCanvas); -begin - DrawCustomEdit(ACanvas, Self, False, bpsSolid); - DrawLabel(ACanvas); -end; - -procedure TcxCustomLabelViewInfo.InternalDrawBackground( - ACanvas, ASource: TcxCanvas; const R: TRect; AParentBackgroundOffset: TPoint); -begin - if DrawBackground(ACanvas, AParentBackgroundOffset) then - Exit; - - if not Transparent or IsInplace and Focused then - cxEditFillRect(ACanvas, R, BackgroundColor) - else - if IsInplace then - cxBitBlt(ACanvas.Handle, ASource.Handle, R, AParentBackgroundOffset, SRCCOPY) - else - if not (csPaintCopy in Edit.ControlState) then - begin - cxDrawTransparentControlBackground(Edit, ACanvas, - cxRectOffset(R, AParentBackgroundOffset.X - R.Left, - AParentBackgroundOffset.Y -R.Top )); - end; -end; - -procedure TcxCustomLabelViewInfo.DrawLabel(ACanvas: TcxCanvas); - - function GetColor(BColor, EColor: TColor; N, H: Integer) : TColor; - begin - EColor := ColorToRGB(EColor); - BColor := ColorToRGB(BColor); - - Result := RGB(Trunc(GetRValue(BColor) + (GetRValue(EColor) - GetRValue(BColor)) * N / H), - Trunc(GetGValue(BColor) + (GetGValue(EColor) - GetGValue(BColor)) * N / H), - Trunc(GetBValue(BColor) + (GetBValue(EColor) - GetBValue(BColor)) * N / H)); - end; - - function GetTextDrawingParameters(ACanvas: TCanvas; ADrawingRect: TRect; - AAngle: Integer; out AStep: TSize): TPoint; - - procedure CalcRotatedTextPos(ACanvas: TCanvas); - var - ARect: TRect; - AText: string; - begin - if AAngle <> 0 then - begin - ARect := ADrawingRect; - Dec(ARect.Right, DepthDeltaSize.cx); - Dec(ARect.Bottom, DepthDeltaSize.cy); - AText := Text; - if ShowAccelChar then - AText := RemoveAccelChars(AText); - cxDrawText(ACanvas.Handle, AText, ADrawingRect, DT_CALCRECT or DT_NOPREFIX); - - Result.X := Round( - (ARect.Left + ARect.Right)/2 - - RectWidth(ADrawingRect) / 2 * Cos(AAngle * PI / 180) - - RectHeight(ADrawingRect) / 2 * Sin(AAngle * PI / 180)); - Result.Y := Round( - (ARect.Top + ARect.Bottom)/2 + - RectWidth(ADrawingRect) / 2 * Sin(AAngle * PI / 180) - - RectHeight(ADrawingRect) / 2 * Cos(AAngle * PI / 180)); - end; - end; - - function GetSignByValue(AValue: Longint): ShortInt; - begin - Result := 0; - if AValue = 0 then - Exit; - if AValue > 0 then - Result := 1 - else - Result := -1; - end; - - begin - Result := Point(0, 0); - CalcRotatedTextPos(ACanvas); - AStep := Size(0, 0); - if (LabelEffect <> cxleNormal) and (FDepth <> 0) then - begin - AStep := DepthDeltaSize; - if Orientation in [cxoRight, cxoRightTop, cxoRightBottom] then - begin - Inc(Result.X, DepthDeltaSize.cx + LabelStyleOffset); - AStep.cx := -AStep.cx; - end; - if Orientation in [cxoBottom, cxoLeftBottom , cxoRightBottom] then - begin - Inc(Result.Y, DepthDeltaSize.cy + LabelStyleOffset); - AStep.cy := -AStep.cy; - end; - if LabelEffect in [cxleFun, cxleExtrude] then - begin - AStep.cx := GetSignByValue(AStep.cx); - AStep.cy := GetSignByValue(AStep.cy); - end; - end; - end; - - procedure DrawActualText(ACanvas: TcxCanvas; const ADrawingRect: TRect; - const APosition: TPoint; AIsTextRotated: Boolean); - var - ATextRect: TRect; - AText: string; - begin - ATextRect := ADrawingRect; - if AIsTextRotated then - begin - AText := Text; - if ShowAccelChar then - AText := RemoveAccelChars(AText); - ExtTextOut(ACanvas.Handle, APosition.X, APosition.Y, 0, - @ATextRect, PChar(AText), Length(AText), nil); - end - else - begin - Dec(ATextRect.Right, DepthDeltaSize.cx); - Dec(ATextRect.Bottom, DepthDeltaSize.cy); - OffsetRect(ATextRect, APosition.X, APosition.Y); - ACanvas.DrawText(Text, ATextRect, - PrepareTextFlag(0, Alignment.Horz, TcxAlignmentVert(Ord(Alignment.Vert)), - (epoShowEndEllipsis in PaintOptions) and IsInplace, WordWrap, 0, - False, ShowAccelChar)); - end; - end; - - procedure DrawLabelEffect(ACanvas: TcxCanvas; const ADrawingRect: TRect; - var AStartPos: TPoint; const AStep: TSize; AIsTextRotated: Boolean); - var - AIterationCount, I: Integer; - begin - if (LabelEffect = cxleNormal) or (FDepth = 0) then - Exit; - if AStep.cx = 0 then - AIterationCount := FDepth div Abs(AStep.cy) - else - AIterationCount := FDepth div Abs(AStep.cx); - - if LabelEffect <> cxleFun then - ACanvas.Font.Color := ShadowedColor; - for I := 1 to AIterationCount do - begin - if LabelEffect = cxleFun then - ACanvas.Font.Color := - GetColor(BackgroundColor, ShadowedColor, I, AIterationCount); - DrawActualText(ACanvas, ADrawingRect, AStartPos, AIsTextRotated); - Inc(AStartPos.X, AStep.cx); - Inc(AStartPos.Y, AStep.cy); - end; - end; - - procedure DrawConventionalizedText(ACanvas: TcxCanvas; ARect: TRect; - const APosition: TPoint; AGlyph: TBitmap; AIsTrueType: Boolean; - AIsTextRotated: Boolean); - - procedure DrawFilledText(X, Y: Integer; AGlyphOnly: Boolean = False); - begin - if not AGlyph.Empty and AIsTrueType then - begin - BeginPath(ACanvas.Handle); - DrawActualText(ACanvas, ARect, - Point(APosition.X + X, APosition.Y + Y), AIsTextRotated); - EndPath(ACanvas.Handle); - SelectClipPath(ACanvas.Handle, RGN_COPY); - ACanvas.FillRect(ARect, AGlyph); - SelectClipRgn(ACanvas.Handle, 0); - end - else - if not AGlyphOnly then - begin - DrawActualText(ACanvas, ARect, - Point(APosition.X + X, APosition.Y + Y), AIsTextRotated); - end; - end; - - begin - ACanvas.Font.Color := TextColor; - case LabelStyle of - cxlsNormal: - DrawFilledText(0, 0); - - cxlsRaised: - begin - ACanvas.Font.Color := clBtnHighlight; - DrawActualText(ACanvas, ARect, APosition, AIsTextRotated); - if Font.Size >= 12 then - begin - ACanvas.Font.Color := clBtnShadow; - DrawActualText(ACanvas, ARect, Point(APosition.X + 2, APosition.Y + 2), - AIsTextRotated); - end; - ACanvas.Font.Color := TextColor; - DrawFilledText(1, 1); - end; - - cxlsLowered: - begin - if Font.Size >= 12 then - begin - ACanvas.Font.Color := clBtnShadow; - DrawActualText(ACanvas, ARect, APosition, - AIsTextRotated); - end; - ACanvas.Font.Color := clBtnHighlight; - DrawActualText(ACanvas, ARect, Point(APosition.X + 2, APosition.Y + 2), - AIsTextRotated); - ACanvas.Font.Color := TextColor; - DrawFilledText(1, 1); - end; - - cxlsOutLine: - begin - DrawFilledText(0, 0, AIsTrueType); - if AIsTrueType then - begin - BeginPath(ACanvas.Handle); - DrawActualText(ACanvas, ARect, APosition, AIsTextRotated); - EndPath(ACanvas.Handle); - ACanvas.Pen.Color := TextColor; - ACanvas.Pen.Width := FPenWidth; - StrokePath(ACanvas.Handle); - ACanvas.Pen.Width := 1; - end; - end; - end; - end; - - procedure AdjustTextPosWithLabelStyle(var APosition: TPoint; - const AStep: TSize); - begin - if AStep.cx < 0 then - Dec(APosition.X, LabelStyleOffset); - if AStep.cy < 0 then - Dec(APosition.Y, LabelStyleOffset); - end; - - procedure DrawLabelLine(ACanvas: TcxCanvas; const ALineRect, ATextRect: TRect); - var - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - ARect: TRect; - begin - if not IsRectEmpty(ALineRect) then - begin - if Painter = nil then - ALookAndFeelPainter := TcxCustomLookAndFeelPainter - else - ALookAndFeelPainter := Painter; - - ACanvas.SaveClipRegion; - try - if LineOrientation = cxlloVertical then - ARect := cxRectInflate(ATextRect, 0, TextFromLineOffset) - else - ARect := cxRectInflate(ATextRect, TextFromLineOffset, 0); - ACanvas.ExcludeClipRect(ARect); - ALookAndFeelPainter.DrawLabelLine(ACanvas, ALineRect, - LineOuterColor, LineInnerColor, LineOrientation = cxlloVertical); - finally - ACanvas.RestoreClipRegion; - end; - end; - end; - - procedure InternalDrawLabel(ADrawCanvas: TcxCanvas; - const ABkgRect, ATextRect, ALineRect: TRect; const AParentBackgroundOffset: TPoint); - var - AIsTrueType: Boolean; - ARealAngle: Integer; - AStep: TSize; - AStartPos: TPoint; - begin - InternalDrawBackground(ADrawCanvas, ACanvas, ABkgRect, AParentBackgroundOffset); - AIsTrueType := AdjustCanvasFont(ADrawCanvas.Canvas, Font, FAngle); - ARealAngle := GetRealTextAngle(FAngle, AIsTrueType); - AStartPos := GetTextDrawingParameters(ADrawCanvas.Canvas, ATextRect, ARealAngle, AStep); - ADrawCanvas.Brush.Style := bsClear; - DrawLabelEffect(ADrawCanvas, ATextRect, AStartPos, AStep, ARealAngle <> 0); - AdjustTextPosWithLabelStyle(AStartPos, AStep); - DrawConventionalizedText(ADrawCanvas, ATextRect, AStartPos, FGlyph, - AIsTrueType, ARealAngle <> 0); - DrawLabelLine(ADrawCanvas, ALineRect, ATextRect); - ADrawCanvas.Brush.Style := bsSolid; - end; - - function InplaceOffsetChanged: Boolean; - begin - Result := (FInplaceOffset.X <> Left) or (FInplaceOffset.Y <> Top); - if Result then - begin - FInplaceOffset.X := Left; - FInplaceOffset.Y := Top; - end; - end; - - function AdjustTextRectWithOffset(const ATextRect: TRect): TRect; - begin - if IsInplace then - Result := cxRectContent(ATextRect, DrawTextOffsets) - else - Result := ATextRect; - end; - -var - AContentRect, ATextRect, ALineRect: TRect; - APrevLogFont: TLogFont; -begin - if cxRectIsEmpty(ClientRect) then Exit; - - SaveCanvasFont(ACanvas, APrevLogFont); - try - ALineRect := LineRect; - AContentRect := ClientRect; - ATextRect := AdjustTextRectWithOffset(LabelTextRect); - if not IsInplace and Transparent and (csPaintCopy in Edit.ControlState) then - InternalDrawLabel(ACanvas, AContentRect, LabelTextRect, ALineRect, AContentRect.TopLeft) - else - begin - if not IsInplace and NativeStyle then - GetThemeBackgroundContentRect(OpenTheme(totEdit), ACanvas.Handle, - EP_EDITTEXT, NativeState, Bounds, AContentRect); - if InplaceOffsetChanged or FIsDrawBitmapDirty or Transparent then - begin - FDrawBitmap.SetSize(AContentRect); - OffsetRect(ATextRect, -AContentRect.Left, -AContentRect.Top); - OffsetRect(ALineRect, -AContentRect.Left, -AContentRect.Top); - InternalDrawLabel(FDrawBitmap.cxCanvas, FDrawBitmap.ClientRect, - ATextRect, ALineRect, AContentRect.TopLeft); - FIsDrawBitmapDirty := False; - end; - cxBitBlt(ACanvas.Handle, FDrawBitmap.Canvas.Handle, AContentRect, - cxNullPoint, SRCCOPY); - end; - finally - RestoreCanvasFont(ACanvas, APrevLogFont); - end; -end; - -procedure TcxCustomLabelViewInfo.SetBackgroundColor(Value: TColor); -begin - inherited SetBackgroundColor(Value); - FIsDrawBitmapDirty := True; -end; - -{ TcxCustomLabelViewData } - -procedure TcxCustomLabelViewData.CalculateLabelViewInfoProps(AViewInfo: TcxCustomEditViewInfo); -begin - with TcxCustomLabelViewInfo(AViewInfo) do - begin - LabelEffect := Properties.LabelEffect; - LabelStyle := Properties.LabelStyle; - Orientation := Properties.Orientation; - Depth := Properties.Depth; - ShadowedColor := Properties.ShadowedColor; - ShowAccelChar := Properties.ShowAccelChar; - Angle := Properties.Angle; - PenWidth := Properties.PenWidth; - WordWrap := Properties.WordWrap; - LineOuterColor := Properties.LineOptions.OuterColor; - LineInnerColor := Properties.LineOptions.InnerColor; - Alignment.Assign(Properties.Alignment); - Glyph := Properties.Glyph; - end; -end; - -procedure TcxCustomLabelViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); -var - ALabelViewInfo: TcxCustomLabelViewInfo; -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - if ((ABounds.Bottom >= MaxInt) or (ABounds.Right >= MaxInt)) and IsInplace then - Exit; - ALabelViewInfo := TcxCustomLabelViewInfo(AViewInfo); - - ALabelViewInfo.IsEditClass := GetIsEditClass; - ALabelViewInfo.DrawSelectionBar := False; - ALabelViewInfo.HasPopupWindow := False; - ALabelViewInfo.DrawTextFlags := GetDrawTextFlags; - if AreVisualStylesMustBeUsed(ALabelViewInfo.NativeStyle, totButton) and - (ALabelViewInfo.BorderStyle = ebsNone) then - ALabelViewInfo.NativeStyle := False; - if not IsInplace then - ALabelViewInfo.Transparent := TcxCustomLabel(Edit).Transparent; - - CalculateLabelViewInfoProps(ALabelViewInfo); - ALabelViewInfo.DepthDeltaSize := Properties.CalculateDepthDelta; - CalculateViewParams(ACanvas, ALabelViewInfo); - CalculateCustomLabelViewInfo(ACanvas, Self, ALabelViewInfo); - if not IsInplace then - ALabelViewInfo.DrawSelectionBar := False; - - if Edit <> nil then - ALabelViewInfo.LeftTop := Point(Edit.Left, Edit.Top); - - ALabelViewInfo.DrawTextOffsets := GetTextEditDrawTextOffset(Self); - - ALabelViewInfo.FIsDrawBitmapDirty := True; -end; - -function TcxCustomLabelViewData.CalculateLabelStyleOffset(ACanvas: TcxCanvas): Integer; -const - LabelStyleOffsetsMap: array[Boolean] of Integer = (1, 2); -begin - if Properties.LabelStyle in [cxlsRaised, cxlsLowered] then - Result := LabelStyleOffsetsMap[ACanvas.Font.Size >= 12] - else - Result := 0; -end; - -function TcxCustomLabelViewData.CalculateLineRect(var ATextRect: TRect; - const ABounds: TRect; AAlignment: TcxLabelLineAlignment; AVisible: Boolean; - ALineHeight: Integer; AOrientation: TcxLabelLineOrientation): TRect; - - function CalcHorLineRect: TRect; - const - SignsMap: array[TcxLabelLineAlignment] of Integer = (1, 0, -1); - begin - Result := ABounds; - case AAlignment of - cxllaTop: - Result.Bottom := Result.Top + ALineHeight; - cxllaBottom: - Result.Top := Result.Bottom - ALineHeight; - else - begin - Result := cxRectCenter(Result, cxRectWidth(Result), ALineHeight); - case Properties.Alignment.Horz of - taLeftJustify: - Result.Left := ATextRect.Right + TextFromLineOffset; - taRightJustify: - Result.Right := ATextRect.Left - TextFromLineOffset; - end; - end; - end; - OffsetRect(ATextRect, 0, SignsMap[AAlignment] * ALineHeight); - end; - - function CalcVertLineRect: TRect; - const - SignsMap: array[TcxLabelLineAlignment] of Integer = (-1, 0, 1); - begin - Result := ABounds; - case AAlignment of - cxllaTop: - Result.Right := Result.Left + ALineHeight; - cxllaBottom: - Result.Left := Result.Bottom - ALineHeight; - else - begin - Result := cxRectCenter(Result, ALineHeight, cxRectHeight(Result)); - case Properties.Alignment.Vert of - taTopJustify: - Result.Top := ATextRect.Bottom - TextFromLineOffset; - taBottomJustify: - Result.Bottom := ATextRect.Top + TextFromLineOffset; - end; - end; - end; - OffsetRect(ATextRect, SignsMap[AAlignment] * ALineHeight, 0); - end; - -begin - Result := cxEmptyRect; - if AVisible then - begin - if AOrientation = cxlloHorizontal then - Result := CalcHorLineRect - else - Result := CalcVertLineRect; - end; -end; - -function TcxCustomLabelViewData.CalculateTextRect(const R: TRect; - const ATextSize: TSize; ARealAngle: Integer): TRect; -begin - Result := R; - if IsInplace and not IsLineVisible(ARealAngle) then Exit; - - case Properties.Alignment.Horz of - taLeftJustify: - Result.Right := Min(Result.Left + ATextSize.cx, Result.Right); - taRightJustify: - Result.Left := Max(Result.Right - ATextSize.cx, Result.Left); - taCenter: - Result := cxRectCenter(Result, ATextSize.cx, cxRectHeight(Result)); - end; - - case Properties.Alignment.Vert of - taTopJustify: - Result.Bottom := Min(Result.Top + ATextSize.cy, Result.Bottom); - taBottomJustify: - Result.Top := Max(Result.Bottom - ATextSize.cy, Result.Top); - taVCenter: - Result := cxRectCenter(Result, cxRectWidth(Result), ATextSize.cy); - end; -end; - -function TcxCustomLabelViewData.CalculateTextSize( - ACanvas: TcxCanvas; const R: TRect; AText: string): TSize; -var - ADepthSize: TSize; - ALabelStyleOffset: Integer; - ARealAngle: Integer; - ARect: TRect; - ATextMetric: TTextMetric; -begin - ARect := R; - GetTextMetrics(ACanvas.Handle, ATextMetric); - ARealAngle := GetRealTextAngle(Properties.Angle, - ATextMetric.tmPitchAndFamily and TMPF_TRUETYPE <> 0); - - if (ARealAngle <> 0) and Properties.ShowAccelChar then - AText := RemoveAccelChars(AText); - - with Properties do - cxDrawText(ACanvas.Handle, AText, ARect, - PrepareTextFlag(DT_CALCRECT, taLeftJustify, vaTop, False, - Properties.WordWrap and (ARealAngle = 0) and not (IsInplace and (R.Right <= 0)), - 0, True, Properties.ShowAccelChar and (ARealAngle = 0))); - - if ARealAngle = 0 then - Result := Size(cxRectWidth(ARect), cxRectHeight(ARect)) - else - begin - Result.cx := Trunc(Abs(cxRectWidth(ARect) * Cos(ARealAngle * PI / 180)) + - Abs(cxRectHeight(ARect) * Sin(ARealAngle * PI / 180)) + 0.5); - Result.cy := Trunc(Abs(cxRectWidth(ARect) * Sin(ARealAngle * PI / 180)) + - Abs(cxRectHeight(ARect) * Cos(ARealAngle * PI / 180)) + 0.5); - end; - - ADepthSize := Properties.CalculateDepthDelta; - ALabelStyleOffset := CalculateLabelStyleOffset(ACanvas); - Inc(Result.cx, ALabelStyleOffset + ADepthSize.cx); - Inc(Result.cy, ALabelStyleOffset + ADepthSize.cy); -end; - -procedure TcxCustomLabelViewData.CalculateViewParams(ACanvas: TcxCanvas; - AViewInfo: TcxCustomLabelViewInfo); -const - LineOrientationMap: array[Boolean] of TcxLabelLineOrientation = ( - cxlloHorizontal, cxlloVertical - ); -var - APrevLogFont: TLogFont; - ARealAngle: Integer; - ARect: TRect; - ATextSize: TSize; -begin - SaveCanvasFont(ACanvas, APrevLogFont); - try - ARealAngle := GetRealTextAngle(Properties.Angle, - AdjustCanvasFont(ACanvas.Canvas, Style.GetVisibleFont, Properties.Angle)); - with AViewInfo do - begin - ATextSize := CalculateTextSize(ACanvas, ClientRect, Text); - LabelStyleOffset := CalculateLabelStyleOffset(ACanvas); - ARect := CalculateTextRect(ClientRect, ATextSize, ARealAngle); - LineOrientation := LineOrientationMap[ARealAngle <> 0]; - LineRect := CalculateLineRect(ARect, ClientRect, LineOptions.Alignment, - IsLineVisible(ARealAngle), GetLineHeight, LineOrientation); - LabelTextRect := ARect; - TextRect := ARect; - end; - finally - RestoreCanvasFont(ACanvas, APrevLogFont); - end; -end; - -procedure TcxCustomLabelViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -begin - TcxCustomLabelViewInfo(AViewInfo).Text := EditValueToDisplayText(AEditValue); -end; - -function TcxCustomLabelViewData.GetEditContentSize(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; const AEditSizeProperties: TcxEditSizeProperties): TSize; - - function GetEditDisplayText: string; - begin - if Edit = nil then - Result := EditValueToDisplayText(AEditValue) - else - Result := TcxCustomLabel(Edit).ViewInfo.Text; - - if Result = '' then - Result := ' '; - end; - - function CalculateLabelMinSize(ACanvas: TcxCanvas; const AText: string; - const ATextRect: TRect; ARealAngle: Integer; ADepthSize, AContentSizeCorrection: TSize; - ALabelStyleOffset: Integer; AIsInplace, AWordWrap, AShowAccelChar: Boolean): TSize; - var - ARect: TRect; - begin - ARect := cxRectOffset(ATextRect, -ATextRect.Left, -ATextRect.Top); - if ARect.Right >= 0 then - begin - Dec(ARect.Right, ADepthSize.cx + ALabelStyleOffset); - if AIsInplace then - Dec(ARect.Right, AContentSizeCorrection.cx) - else - if Style.BorderStyle <> ebsNone then - Dec(ARect.Right, TextFromBorderOffset * 2); - end; - - Result := CalculateTextSize(ACanvas, ARect, AText); - if AIsInplace then - begin - Inc(Result.cx, AContentSizeCorrection.cx); - Inc(Result.cy, AContentSizeCorrection.cy); - end - else - if Style.BorderStyle <> ebsNone then - Inc(Result.cx, TextFromBorderOffset * 2); - - if IsLineVisible(ARealAngle) and (LineOptions.Alignment <> cxllaCenter) then - begin - if ARealAngle = 0 then - Inc(Result.cy, GetLineHeight) - else - Dec(Result.cx, GetLineHeight); - end; - end; - -var - APrevLogFont: TLogFont; - ARealAngle: Integer; -begin - SaveCanvasFont(ACanvas, APrevLogFont); - try - ARealAngle := GetRealTextAngle(Properties.Angle, - AdjustCanvasFont(ACanvas.Canvas, Style.GetVisibleFont, Properties.Angle)); - Result := Size(AEditSizeProperties.Width, 0); - - with Properties do - Result := CalculateLabelMinSize(ACanvas, GetEditDisplayText, - Rect(0, 0, Result.cx, Result.cy), ARealAngle, CalculateDepthDelta, - Self.GetEditContentSizeCorrection, CalculateLabelStyleOffset(ACanvas), - IsInplace, WordWrap, Properties.ShowAccelChar); - finally - RestoreCanvasFont(ACanvas, APrevLogFont); - end; -end; - -function TcxCustomLabelViewData.IsLineVisible(ARealAngle: Integer): Boolean; -begin - Result := LineOptions.Visible and ((ARealAngle = 0) or (ARealAngle = 90)); -end; - -function TcxCustomLabelViewData.GetDrawTextFlags: Integer; -var - ARealAngle: Integer; -begin - ARealAngle := (Properties.Angle mod 360 + 360) mod 360; - Result := DrawTextFlagsTocxTextOutFlags( - PrepareTextFlag(0, Properties.Alignment.Horz, - TcxAlignmentVert(Ord(Properties.Alignment.Vert)), - epoShowEndEllipsis in PaintOptions, - Properties.WordWrap and (ARealAngle = 0), 0, False)); -end; - -function TcxCustomLabelViewData.GetIsEditClass: Boolean; -begin - Result := False; -end; - -function TcxCustomLabelViewData.GetLineHeight: Integer; -begin - if Edit = nil then - Result := TcxCustomLookAndFeelPainter.LabelLineHeight - else - Result := Edit.Style.LookAndFeel.Painter.LabelLineHeight; -end; - -function TcxCustomLabelViewData.InternalEditValueToDisplayText( - AEditValue: TcxEditValue): string; -begin - Result := VarToStr(AEditValue); -end; - -function TcxCustomLabelViewData.GetLineOptions: TcxLabelLineOptions; -begin - Result := Properties.LineOptions; -end; - -function TcxCustomLabelViewData.GetProperties: TcxCustomLabelProperties; -begin - Result := TcxCustomLabelProperties(FProperties); -end; - -{ TcxCustomLabelProperties } - -constructor TcxCustomLabelProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FLabelEffect := cxleNormal; - FLabelStyle := cxlsNormal; - FOrientation := cxoRightBottom; - FDepth := 0; - FShadowedColor := clGrayText; - FShowAccelChar := True; - FAngle := 0; - FPenWidth := 1; - FWordWrap := False; - FLineOptions := TcxLabelLineOptions.Create; - FLineOptions.OnChanged := ChangeHandler; -end; - -destructor TcxCustomLabelProperties.Destroy; -begin - FreeAndNil(FGlyph); - FreeAndNil(FLineOptions); - inherited Destroy; -end; - -procedure TcxCustomLabelProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomLabelProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomLabelProperties do - begin - Self.LabelEffect := LabelEffect; - Self.LabelStyle := LabelStyle; - Self.Orientation := Orientation; - Self.Depth := Depth; - Self.ShadowedColor := ShadowedColor; - Self.Angle := Angle; - Self.PenWidth := PenWidth; - Self.Glyph := Glyph; - Self.ShowAccelChar := ShowAccelChar; - Self.WordWrap := WordWrap; - Self.LineOptions := LineOptions; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomLabelProperties.CanCompareEditValue: Boolean; -begin - Result := True; -end; - -class function TcxCustomLabelProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxLabel; -end; - -class function TcxCustomLabelProperties.GetStyleClass: TcxCustomEditStyleClass; -begin - Result := TcxLabelEditStyle; -end; - -function TcxCustomLabelProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -var - ADisplayValue: TcxEditValue; -begin - PrepareDisplayValue(AEditValue, ADisplayValue, False); - Result := ADisplayValue; -end; - -function TcxCustomLabelProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := [esoAutoHeight, esoFiltering, esoShowingCaption, esoSorting, - esoTransparency]; -end; - -class function TcxCustomLabelProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomLabelViewInfo; -end; - -function TcxCustomLabelProperties.IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; -begin - Result := inherited IsEditValueValid(EditValue, AEditFocused); -end; - -procedure TcxCustomLabelProperties.PrepareDisplayValue(const AEditValue: - TcxEditValue; var DisplayValue: TcxEditValue; AEditFocused: Boolean); -begin - DisplayValue := VarToStr(AEditValue); -end; - -class function TcxCustomLabelProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomLabelViewData; -end; - -function TcxCustomLabelProperties.HasDisplayValue: Boolean; -begin - Result := True; -end; - -procedure TcxCustomLabelProperties.SetLabelEffect(Value : TcxLabelEffect); -begin - if FLabelEffect <> Value then - begin - FLabelEffect := Value; - Changed; - end; -end; - -procedure TcxCustomLabelProperties.SetLineOptions(AValue: TcxLabelLineOptions); -begin - FLineOptions.Assign(AValue); -end; - -procedure TcxCustomLabelProperties.SetLabelStyle(Value : TcxLabelStyle); -begin - if FLabelStyle <> Value then - begin - FLabelStyle := Value; - Changed; - end; -end; - -procedure TcxCustomLabelProperties.SetOrientation(Value : TcxLabelOrientation); -begin - if FOrientation <> Value then - begin - FOrientation := Value; - Changed; - end; -end; - -procedure TcxCustomLabelProperties.SetDepth(Value : Word); -begin - if FDepth <> Value then - begin - FDepth := Value; - Changed; - end; -end; - -procedure TcxCustomLabelProperties.SetShadowedColor(Value : TColor); -begin - if FShadowedColor <> Value then - begin - FShadowedColor := Value; - Changed; - end; -end; - -procedure TcxCustomLabelProperties.SetAngle(Value: Integer); -begin - if FAngle <> Value then - begin - FAngle := Value; - Changed; - end; -end; - -procedure TcxCustomLabelProperties.SetPenWidth(Value: Integer); -begin - if FPenWidth <> Value then - begin - FPenWidth := Value; - Changed; - end; -end; - -function TcxCustomLabelProperties.GetGlyph: TBitmap; -begin - if FGlyph = nil then - begin - FGlyph := TBitmap.Create; - FGlyph.OnChange := ChangeHandler; - end; - Result := FGlyph; -end; - -procedure TcxCustomLabelProperties.ChangeHandler(Sender: TObject); -begin - Changed; -end; - -procedure TcxCustomLabelProperties.SetGlyph(Value: TBitmap); -begin - if Value = nil then - FreeAndNil(FGlyph) - else - Glyph.Assign(Value); - Changed; -end; - -procedure TcxCustomLabelProperties.SetShowAccelChar(Value: Boolean); -begin - if FShowAccelChar <> Value then - begin - FShowAccelChar := Value; - Changed; - end; -end; - -procedure TcxCustomLabelProperties.SetWordWrap(Value: Boolean); -begin - if FWordWrap <> Value then - begin - FWordWrap := Value; - Changed; - end; -end; - -function TcxCustomLabelProperties.CalculateDepthDelta: TSize; -begin - Result.cx := 0; - Result.cy := 0; - if LabelEffect = cxleNormal then Exit; - case FOrientation of - cxoLeft, cxoRight: Result.cx := FDepth; - cxoTop, cxoBottom: Result.cy := FDepth; - cxoLeftTop, cxoLeftBottom, cxoRightTop, cxoRightBottom: - begin - Result.cx := FDepth; - Result.cy := FDepth; - end; - end; -end; - -function TcxCustomLabelProperties.GetDisplayFormatOptions: TcxEditDisplayFormatOptions; -begin - Result := []; -end; - -function TcxCustomLabelProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - Result := evsText; -end; - -{ TcxCustomLabel } - -destructor TcxCustomLabel.Destroy; -begin - FFocusControl := nil; - inherited Destroy; -end; - -procedure TcxCustomLabel.DoAutoSizeChanged; -begin - inherited DoAutoSizeChanged; - if AutoSize then - Properties.LineOptions.Visible := False; -end; - -procedure TcxCustomLabel.Notification(ACOmponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (FFocusControl <> nil) and - (AComponent = FFocusControl) then FFocusControl := nil; -end; - -procedure TcxCustomLabel.PropertiesChanged(Sender: TObject); -begin - inherited PropertiesChanged(Sender); - if Properties.LineOptions.Visible then - AutoSize := False; -end; - -function TcxCustomLabel.UseAnchorX: Boolean; -begin - Result := ActiveProperties.Alignment.Horz <> taLeftJustify; -end; - -function TcxCustomLabel.UseAnchorY: Boolean; -begin - Result := ActiveProperties.Alignment.Vert <> taTopJustify; -end; - -class function TcxCustomLabel.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomLabelProperties; -end; - -procedure TcxCustomLabel.SetStyle(Value: TcxLabelEditStyle); -begin - FStyles.Style := Value; -end; - -function TcxCustomLabel.GetEditStateColorKind: TcxEditStateColorKind; -begin - Result := cxEditStateColorKindMap[Enabled]; -end; - -procedure TcxCustomLabel.Initialize; -begin - inherited Initialize; - ControlStyle := ControlStyle - [csCaptureMouse]; - Width := 121; - Height := 21; -end; - -procedure TcxCustomLabel.SetFocusControl(Value: TWinControl); -begin - if (FFocusControl <> Value) and (Value <> Self) then - FFocusControl := Value; -end; - -procedure TcxCustomLabel.InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); -begin - inherited InternalSetEditValue(Value, AValidateEditValue); - if not FLockCaption then - Caption := VarToStr(Value); - SetInternalDisplayValue(Caption); -end; - -procedure TcxCustomLabel.Loaded; -begin - if CanAllocateHandle(Self) then - HandleNeeded; - inherited Loaded; -end; - -procedure TcxCustomLabel.SetInternalDisplayValue(Value: TcxEditValue); -begin - ViewInfo.Text := VarToStr(Value); - ShortRefreshContainer(False); -end; - -procedure TcxCustomLabel.TextChanged; -begin - inherited TextChanged; - FLockCaption := True; - try - InternalEditValue := Caption; - finally - FLockCaption := False; - end; -end; - -function TcxCustomLabel.CanFocus: Boolean; -begin - Result := IsInplace; -end; - -{$IFDEF DELPHI10} -function TcxCustomLabel.GetTextBaseLine: Integer; -begin - Result := ViewInfo.GetTextBaseLine; -end; - -function TcxCustomLabel.HasTextBaseLine: Boolean; -begin - Result := ActiveProperties.Angle = 0; -end; -{$ENDIF} - -function TcxCustomLabel.CanAutoWidth: Boolean; -begin - Result := not ActiveProperties.WordWrap; -end; - -function TcxCustomLabel.CanFocusOnClick: Boolean; -begin - Result := inherited CanFocusOnClick and IsInplace; -end; - -function TcxCustomLabel.DefaultParentColor: Boolean; -begin - Result := True; -end; - -procedure TcxCustomLabel.CMDialogChar(var Message: TCMDialogChar); -begin - if (FFocusControl <> nil) and Enabled and Properties.ShowAccelChar and - IsAccel(Message.CharCode, Caption) and FFocusControl.CanFocus then - begin - FFocusControl.SetFocus; - Message.Result := 1; - end; -end; - -function TcxCustomLabel.GetProperties: TcxCustomLabelProperties; -begin - Result := TcxCustomLabelProperties(FProperties); -end; - -function TcxCustomLabel.GetActiveProperties: TcxCustomLabelProperties; -begin - Result := TcxCustomLabelProperties(InternalGetActiveProperties); -end; - -function TcxCustomLabel.GetStyle: TcxLabelEditStyle; -begin - Result := TcxLabelEditStyle(FStyles.Style); -end; - -function TcxCustomLabel.GetViewInfo: TcxCustomLabelViewInfo; -begin - Result := TcxCustomLabelViewInfo(FViewInfo); -end; - -procedure TcxCustomLabel.SetProperties(Value: TcxCustomLabelProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxLabel } - -class function TcxLabel.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxLabelProperties; -end; - -function TcxLabel.GetActiveProperties: TcxLabelProperties; -begin - Result := TcxLabelProperties(InternalGetActiveProperties); -end; - -function TcxLabel.GetProperties: TcxLabelProperties; -begin - Result := TcxLabelProperties(FProperties); -end; - -procedure TcxLabel.SetProperties(Value: TcxLabelProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxLabelLineOptions } - -constructor TcxLabelLineOptions.Create; -begin - FAlignment := cxllaCenter; - FInnerColor := clDefault; - FOuterColor := clDefault; -end; - -procedure TcxLabelLineOptions.Assign(Source: TPersistent); -begin - if Source is TcxLabelLineOptions then - begin - FVisible := TcxLabelLineOptions(Source).FVisible; - FAlignment := TcxLabelLineOptions(Source).FAlignment; - FInnerColor := TcxLabelLineOptions(Source).FInnerColor; - FOuterColor := TcxLabelLineOptions(Source).FOuterColor; - Changed; - end - else - inherited Assign(Source); -end; - -procedure TcxLabelLineOptions.Changed; -begin - if Assigned(OnChanged) then - OnChanged(Self); -end; - -function TcxLabelLineOptions.GetIsCustomColorsAssigned: Boolean; -begin - Result := (InnerColor <> clDefault) and (OuterColor <> clDefault); -end; - -procedure TcxLabelLineOptions.SetAlignment(AValue: TcxLabelLineAlignment); -begin - if FAlignment <> AValue then - begin - FAlignment := AValue; - Changed; - end; -end; - -procedure TcxLabelLineOptions.SetInnerColor(AValue: TColor); -begin - if FInnerColor <> AValue then - begin - FInnerColor := AValue; - Changed; - end; -end; - -procedure TcxLabelLineOptions.SetOuterColor(AValue: TColor); -begin - if FOuterColor <> AValue then - begin - FOuterColor := AValue; - Changed; - end; -end; - -procedure TcxLabelLineOptions.SetVisible(AValue: Boolean); -begin - if Visible <> AValue then - begin - FVisible := AValue; - Changed; - end; -end; - -initialization - GetRegisteredEditProperties.Register(TcxLabelProperties, scxSEditRepositoryLabelItem); - FilterEditsController.Register(TcxLabelProperties, TcxFilterTextEditHelper); - -finalization - FilterEditsController.Unregister(TcxLabelProperties, TcxFilterTextEditHelper); - GetRegisteredEditProperties.Unregister(TcxLabelProperties); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxListBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxListBox.pas deleted file mode 100644 index cea6a2bc..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxListBox.pas +++ /dev/null @@ -1,868 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCommonLibrary } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCOMMONLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxListBox; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, - Classes, Controls, Forms, Menus, StdCtrls, SysUtils, cxClasses, cxControls, - cxContainer, cxDataUtils, cxGraphics, cxLookAndFeels, cxScrollBar; - -type - TcxListBox = class; - - { TcxInnerListBox } - - TcxInnerListBox = class(TcxCustomInnerListBox) - private - function GetContainer: TcxListBox; - procedure SetContainer(Value: TcxListBox); - procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; - protected - procedure Click; override; - procedure CreateWindowHandle(const Params: TCreateParams); override; - procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; - property Container: TcxListBox read GetContainer write SetContainer; - public - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - function CanFocus: Boolean; override; - end; - - TcxInnerListBoxClass = class of TcxInnerListBox; - - { TcxListBox } - - TcxListBoxDrawItemEvent = procedure(AControl: TcxListBox; ACanvas: TcxCanvas; - AIndex: Integer; ARect: TRect; AState: TOwnerDrawState) of object; - TcxListBoxMeasureItemEvent = procedure(AControl: TcxListBox; AIndex: Integer; - var Height: Integer) of object; - - TcxListBox = class(TcxContainer) - private - FInnerListBox: TcxInnerListBox; - FIntegralHeight: Boolean; - FIsExitProcessing: Boolean; - FOnDrawItem: TcxListBoxDrawItemEvent; - FOnMeasureItem: TcxListBoxMeasureItemEvent; - procedure DoMeasureItem(Control: TWinControl; Index: Integer; - var Height: Integer); - function GetAutoComplete: Boolean; - function GetAutoCompleteDelay: Cardinal; - function GetColumns: Integer; - function GetCount: Integer; - function GetExtendedSelect: Boolean; - function GetInnerListBox: TListBox; - function GetItemHeight: Integer; - function GetItemIndex: Integer; - function GetItemObject: TObject; - function GetItems: TStrings; - function GetListStyle: TListBoxStyle; - function GetMultiSelect: Boolean; - function GetReadOnly: Boolean; - function GetSelCount: Integer; - function GetSelected(Index: Integer): Boolean; - function GetSorted: Boolean; - function GetTopIndex: Integer; - procedure SetAutoComplete(Value: Boolean); - procedure SetAutoCompleteDelay(Value: Cardinal); - procedure SetColumns(Value: Integer); - procedure SetExtendedSelect(Value: Boolean); - procedure SetItemHeight(Value: Integer); - procedure SetItemIndex(Value: Integer); - procedure SetItemObject(Value: TObject); - procedure SetItems(Value: TStrings); - procedure SetListStyle(Value: TListBoxStyle); - procedure SetMultiSelect(Value: Boolean); - procedure SetOnMeasureItem(Value: TcxListBoxMeasureItemEvent); - procedure SetReadOnly(Value: Boolean); - procedure SetSelected(Index: Integer; Value: Boolean); - procedure SetSorted(Value: Boolean); - procedure SetTopIndex(Value: Integer); - {$IFDEF DELPHI6} - function GetOnData: TLBGetDataEvent; - function GetOnDataFind: TLBFindDataEvent; - function GetOnDataObject: TLBGetDataObjectEvent; - procedure SetCount(Value: Integer); - procedure SetOnData(Value: TLBGetDataEvent); - procedure SetOnDataFind(Value: TLBFindDataEvent); - procedure SetOnDataObject(Value: TLBGetDataObjectEvent); - {$ENDIF} - function GetScrollWidth: Integer; - function GetTabWidth: Integer; - procedure SetIntegralHeight(Value: Boolean); - procedure SetScrollWidth(Value: Integer); - procedure SetTabWidth(Value: Integer); - protected - FDataBinding: TcxCustomDataBinding; - procedure DataChange; override; - procedure DoExit; override; - procedure FontChanged; override; - function IsInternalControl(AControl: TControl): Boolean; override; - function IsReadOnly: Boolean; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure UpdateData; override; - function CanResize(var NewWidth, NewHeight: Integer): Boolean; override; - procedure SetSize; override; - procedure WndProc(var Message: TMessage); override; - function DrawItem(ACanvas: TcxCanvas; AIndex: Integer; const ARect: TRect; - AState: TOwnerDrawState): Boolean; virtual; - function GetDataBindingClass: TcxCustomDataBindingClass; virtual; - function GetInnerListBoxClass: TcxInnerListBoxClass; virtual; - procedure GetOptimalHeight(var ANewHeight: Integer); - property DataBinding: TcxCustomDataBinding read FDataBinding; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - procedure AddItem(AItem: string; AObject: TObject); - procedure Clear; - procedure ClearSelection; - procedure DeleteSelected; - function ItemAtPos(const APos: TPoint; AExisting: Boolean): Integer; - function ItemRect(Index: Integer): TRect; - function ItemVisible(Index: Integer): Boolean; - procedure SelectAll; -{$IFDEF DELPHI6} - procedure CopySelection(ADestination: TCustomListControl); - procedure MoveSelection(ADestination: TCustomListControl); -{$ENDIF} - property Count: Integer read GetCount{$IFDEF DELPHI6} write SetCount{$ENDIF}; - property InnerListBox: TListBox read GetInnerListBox; - property ItemIndex: Integer read GetItemIndex write SetItemIndex; - property ItemObject: TObject read GetItemObject write SetItemObject; - property SelCount: Integer read GetSelCount; - property Selected[Index: Integer]: Boolean read GetSelected write SetSelected; - property TopIndex: Integer read GetTopIndex write SetTopIndex; - published - property Align; - property Anchors; - property AutoComplete: Boolean read GetAutoComplete write SetAutoComplete - default True; - property AutoCompleteDelay: Cardinal read GetAutoCompleteDelay - write SetAutoCompleteDelay default cxDefaultAutoCompleteDelay; - property BiDiMode; - property Columns: Integer read GetColumns write SetColumns default 0; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ExtendedSelect: Boolean read GetExtendedSelect - write SetExtendedSelect default True; - property ImeMode; - property ImeName; - property IntegralHeight: Boolean read FIntegralHeight - write SetIntegralHeight default False; - property ItemHeight: Integer read GetItemHeight write SetItemHeight; - property Items: TStrings read GetItems write SetItems; - property ListStyle: TListBoxStyle read GetListStyle write SetListStyle - default lbStandard; - property MultiSelect: Boolean read GetMultiSelect write SetMultiSelect - default False; - property ParentBiDiMode; - property ParentColor default False; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False; - property ScrollWidth: Integer read GetScrollWidth write SetScrollWidth - default 0; - property ShowHint; - property Sorted: Boolean read GetSorted write SetSorted default False; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property TabWidth: Integer read GetTabWidth write SetTabWidth default 0; - property Visible; - property OnClick; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - {$IFDEF DELPHI6} - property OnData: TLBGetDataEvent read GetOnData write SetOnData; - property OnDataFind: TLBFindDataEvent read GetOnDataFind write SetOnDataFind; - property OnDataObject: TLBGetDataObjectEvent read GetOnDataObject - write SetOnDataObject; - {$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnDrawItem: TcxListBoxDrawItemEvent read FOnDrawItem - write FOnDrawItem; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMeasureItem: TcxListBoxMeasureItemEvent read FOnMeasureItem - write SetOnMeasureItem; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Graphics, cxEdit; - -type - TWinControlAccess = class(TWinControl); - -{ TcxInnerListBox } - -function TcxInnerListBox.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - Container.FDataBinding.ExecuteAction(Action); -end; - -function TcxInnerListBox.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - Container.FDataBinding.UpdateAction(Action); -end; - -function TcxInnerListBox.CanFocus: Boolean; -begin - Result := Container.CanFocus; -end; - -procedure TcxInnerListBox.Click; -begin - if Container.DataBinding.SetEditMode then - inherited Click; -end; - -procedure TcxInnerListBox.CreateWindowHandle(const Params: TCreateParams); -begin - inherited CreateWindowHandle(Params); - SetExternalScrollBarsParameters; -end; - -procedure TcxInnerListBox.DrawItem(Index: Integer; Rect: TRect; - State: TOwnerDrawState); -begin - if not Container.DrawItem(Canvas, Index, Rect, State) then - inherited DrawItem(Index, Rect, State); -end; - -function TcxInnerListBox.GetContainer: TcxListBox; -begin - Result := TcxListBox(Owner); -end; - -procedure TcxInnerListBox.SetContainer(Value: TcxListBox); -begin - FContainer := Value; -end; - -procedure TcxInnerListBox.WMLButtonDown(var Message: TWMLButtonDown); -begin - if Container.DataBinding.SetEditMode then - inherited - else - begin - SetFocus; - with Message do - MouseDown(mbLeft, KeysToShiftState(Keys), XPos, YPos); - end; -end; - -{ TcxListBox } - -constructor TcxListBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FDataBinding := GetDataBindingClass.Create(Self, Self); - with FDataBinding do - begin - OnDataChange := Self.DataChange; - OnDataSetChange := Self.DataSetChange; - OnUpdateData := Self.UpdateData; - end; - FInnerListBox := GetInnerListBoxClass.Create(Self); - FInnerListBox.BorderStyle := bsNone; - FInnerListBox.Parent := Self; - FInnerListBox.Container := Self; - InnerControl := FInnerListBox; - FInnerListBox.LookAndFeel.MasterLookAndFeel := Style.LookAndFeel; - Width := 121; - Height := 97; -end; - -destructor TcxListBox.Destroy; -begin - FreeAndNil(FInnerListBox); - FreeAndNil(FDataBinding); - inherited Destroy; -end; - -function TcxListBox.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - FDataBinding.ExecuteAction(Action); -end; - -function TcxListBox.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - FDataBinding.UpdateAction(Action); -end; - -procedure TcxListBox.AddItem(AItem: string; AObject: TObject); -begin - FInnerListBox.AddItem(AItem, AObject); -end; - -procedure TcxListBox.Clear; -begin - FInnerListBox.Clear; -end; - -procedure TcxListBox.ClearSelection; -begin - FInnerListBox.ClearSelection; -end; - -procedure TcxListBox.DeleteSelected; -begin - FInnerListBox.DeleteSelected; -end; - -function TcxListBox.ItemAtPos(const APos: TPoint; AExisting: Boolean): Integer; -begin - with FInnerListBox do - Result := ItemAtPos(Point(APos.X - Left, APos.Y - Top), AExisting); -end; - -function TcxListBox.ItemRect(Index: Integer): TRect; -begin - Result := FInnerListBox.ItemRect(Index); - OffsetRect(Result, FInnerListBox.Left, FInnerListBox.Top); -end; - -function TcxListBox.ItemVisible(Index: Integer): Boolean; -begin - Result := FInnerListBox.ItemVisible(Index); -end; - -procedure TcxListBox.SelectAll; -begin - FInnerListBox.SelectAll; -end; - -{$IFDEF DELPHI6} -procedure TcxListBox.CopySelection(ADestination: TCustomListControl); -begin - FInnerListBox.CopySelection(ADestination); -end; - -procedure TcxListBox.MoveSelection(ADestination: TCustomListControl); -begin - FInnerListBox.MoveSelection(ADestination); -end; -{$ENDIF} - -procedure TcxListBox.DataChange; -begin - if DataBinding.IsDataSourceLive then - ItemIndex := Items.IndexOf(VarToStr(DataBinding.GetStoredValue(evsText, Focused))) - else - ItemIndex := -1; -end; - -procedure TcxListBox.DoExit; -begin - if IsDestroying or FIsExitProcessing then - Exit; - FIsExitProcessing := True; - try - try - DataBinding.UpdateDataSource; - except - SetFocus; - raise; - end; - inherited DoExit; - finally - FIsExitProcessing := False; - end; -end; - -procedure TcxListBox.FontChanged; -begin - inherited FontChanged; - SetSize; - TWinControlAccess(InnerListBox).RecreateWnd; -end; - -function TcxListBox.IsInternalControl(AControl: TControl): Boolean; -begin - if FInnerListBox = nil then - Result := True - else - Result := (AControl = FInnerListBox.HScrollBar) or (AControl = FInnerListBox.VScrollBar); - Result := Result or inherited IsInternalControl(AControl); -end; - -function TcxListBox.IsReadOnly: Boolean; -begin - Result := DataBinding.IsControlReadOnly; -end; - -procedure TcxListBox.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - case Key of - VK_PRIOR, VK_NEXT, VK_END, VK_HOME, VK_LEFT, VK_UP, VK_RIGHT, VK_DOWN: - if not DataBinding.SetEditMode then - Key := 0; - end; -end; - -procedure TcxListBox.KeyPress(var Key: Char); -begin - inherited KeyPress(Key); - if IsTextChar(Key) then - begin - if not DataBinding.SetEditMode then - Key := #0; - end - else - if Key = #27 then - DataBinding.Reset; -end; - -procedure TcxListBox.UpdateData; -begin - if ItemIndex >= 0 then - DataBinding.SetStoredValue(evsText, Items[ItemIndex]) - else - DataBinding.SetStoredValue(evsText, ''); -end; - -function TcxListBox.CanResize(var NewWidth, NewHeight: Integer): Boolean; -begin - Result := inherited CanResize(NewWidth, NewHeight); - if not Result or not IntegralHeight or IsLoading then - Exit; - if Align in [alLeft, alRight, alClient] then - Exit; - GetOptimalHeight(NewHeight); -end; - -procedure TcxListBox.SetSize; -var - ANewHeight: Integer; - APrevBoundsRect: TRect; -begin - if IsLoading then - Exit; - APrevBoundsRect := FInnerListBox.BoundsRect; - try - if not IntegralHeight or (Align in [alLeft, alRight, alClient]) then - begin - inherited SetSize; - Exit; - end; - ANewHeight := Height; - GetOptimalHeight(ANewHeight); - Height := ANewHeight; - inherited SetSize; - finally - if not EqualRect(APrevBoundsRect, FInnerListBox.BoundsRect) and FInnerListBox.HandleAllocated then - KillMessages(FInnerListBox.Handle, WM_MOUSEMOVE, WM_MOUSEMOVE); - end; -end; - -procedure TcxListBox.WndProc(var Message: TMessage); -begin - if FInnerListBox <> nil then - case Message.Msg of - LB_ADDSTRING..LB_MSGMAX: - begin - with TMessage(Message) do - Result := SendMessage(FInnerListBox.Handle, Msg, WParam, LParam); - Exit; - end; - end; - inherited WndProc(Message); - if (FInnerListBox <> nil) and (Message.Msg = WM_COMMAND) and (Message.WParamHi = LBN_SELCHANGE) then - FInnerListBox.SetExternalScrollBarsParameters; -end; - -function TcxListBox.DrawItem(ACanvas: TcxCanvas; AIndex: Integer; - const ARect: TRect; AState: TOwnerDrawState): Boolean; -begin - Result := Assigned(FOnDrawItem); - if Result then - FOnDrawItem(Self, ACanvas, AIndex, ARect, AState); -end; - -function TcxListBox.GetDataBindingClass: TcxCustomDataBindingClass; -begin - Result := TcxDataBinding; -end; - -function TcxListBox.GetInnerListBoxClass: TcxInnerListBoxClass; -begin - Result := TcxInnerListBox; -end; - -procedure TcxListBox.GetOptimalHeight(var ANewHeight: Integer); - - function GetItemHeight(AIndex: Integer): Integer; - begin - case ListStyle of - lbStandard{$IFDEF DELPHI6}, lbVirtual{$ENDIF}: - Result := Canvas.FontHeight(Font); - lbOwnerDrawFixed{$IFDEF DELPHI6}, lbVirtualOwnerDraw{$ENDIF}: - Result := ItemHeight; - lbOwnerDrawVariable: - begin - Result := ItemHeight; - if (AIndex < Count) and Assigned(FInnerListBox.OnMeasureItem) then - FInnerListBox.OnMeasureItem(Self, AIndex, Result); - end; - end; - end; - -var - I: Integer; - ABorderExtent: TRect; - AItemHeight: Integer; - AListClientSize, AListSize, AScrollBarSize: TSize; - AScrollWidth: Integer; - AVScrollBar: Boolean; -begin - ABorderExtent := GetBorderExtent; - AListClientSize.cy := ABorderExtent.Top + ABorderExtent.Bottom; - AScrollBarSize := GetScrollBarSize; - AScrollWidth := ScrollWidth; - if AScrollWidth > 0 then - Inc(AScrollWidth, 4); - I := 0; - repeat - AItemHeight := GetItemHeight(I); - AListClientSize.cy := AListClientSize.cy + AItemHeight; - AListSize.cy := AListClientSize.cy; - AListClientSize.cx := Width - (ABorderExtent.Left + ABorderExtent.Right); - AVScrollBar := I + 1 < Count; - if AVScrollBar then - AListClientSize.cx := AListClientSize.cx - AScrollBarSize.cx; - if AListClientSize.cx < AScrollWidth then - AListSize.cy := AListSize.cy + AScrollBarSize.cy; - if AListSize.cy = ANewHeight then - Break; - if AListSize.cy > ANewHeight then - begin - if I > 0 then - begin - AListClientSize.cy := AListClientSize.cy - AItemHeight; - AListSize.cy := AListClientSize.cy; - AListClientSize.cx := Width - (ABorderExtent.Left + ABorderExtent.Right); - AVScrollBar := I < Count; - if AVScrollBar then - AListClientSize.cx := AListClientSize.cx - AScrollBarSize.cx; - if AListClientSize.cx < AScrollWidth then - AListSize.cy := AListSize.cy + AScrollBarSize.cy; - end; - Break; - end; - Inc(I); - until False; - ANewHeight := AListSize.cy; -end; - -procedure TcxListBox.DoMeasureItem(Control: TWinControl; Index: Integer; - var Height: Integer); -begin - FOnMeasureItem(Self, Index, Height); -end; - -function TcxListBox.GetAutoComplete: Boolean; -begin - Result := FInnerListBox.AutoComplete; -end; - -function TcxListBox.GetAutoCompleteDelay: Cardinal; -begin - Result := FInnerListBox.AutoCompleteDelay; -end; - -function TcxListBox.GetColumns: Integer; -begin - Result := FInnerListBox.Columns; -end; - -function TcxListBox.GetCount: Integer; -begin - Result := FInnerListBox.Items.Count; -end; - -function TcxListBox.GetExtendedSelect: Boolean; -begin - Result := FInnerListBox.ExtendedSelect; -end; - -function TcxListBox.GetInnerListBox: TListBox; -begin - Result := FInnerListBox; -end; - -function TcxListBox.GetItemHeight: Integer; -begin - Result := FInnerListBox.ItemHeight; -end; - -function TcxListBox.GetItemIndex: Integer; -begin - Result := FInnerListBox.ItemIndex; -end; - -function TcxListBox.GetItemObject: TObject; -begin - if ItemIndex <> -1 then - Result := Items.Objects[ItemIndex] - else - Result := nil; -end; - -function TcxListBox.GetItems: TStrings; -begin - Result := FInnerListBox.Items; -end; - -function TcxListBox.GetListStyle: TListBoxStyle; -begin - Result := FInnerListBox.Style; -end; - -function TcxListBox.GetMultiSelect: Boolean; -begin - Result := FInnerListBox.MultiSelect; -end; - -function TcxListBox.GetReadOnly: Boolean; -begin - Result := DataBinding.ReadOnly; -end; - -function TcxListBox.GetSelCount: Integer; -begin - Result := FInnerListBox.SelCount; -end; - -function TcxListBox.GetSelected(Index: Integer): Boolean; -begin - Result := FInnerListBox.Selected[Index]; -end; - -function TcxListBox.GetSorted: Boolean; -begin - Result := FInnerListBox.Sorted; -end; - -function TcxListBox.GetTopIndex: Integer; -begin - Result := FInnerListBox.TopIndex; -end; - -procedure TcxListBox.SetAutoComplete(Value: Boolean); -begin - FInnerListBox.AutoComplete := Value; -end; - -procedure TcxListBox.SetAutoCompleteDelay(Value: Cardinal); -begin - FInnerListBox.AutoCompleteDelay := Value; -end; - -procedure TcxListBox.SetColumns(Value: Integer); -begin - FInnerListBox.Columns := Value; - FInnerListBox.SetExternalScrollBarsParameters; -end; - -procedure TcxListBox.SetExtendedSelect(Value: Boolean); -begin - FInnerListBox.ExtendedSelect := Value; -end; - -procedure TcxListBox.SetItemHeight(Value: Integer); -begin - FInnerListBox.ItemHeight := Value; -end; - -procedure TcxListBox.SetItemIndex(Value: Integer); -begin - FInnerListBox.ItemIndex := Value; -end; - -procedure TcxListBox.SetItemObject(Value: TObject); -begin - ItemIndex := Items.IndexOfObject(Value); -end; - -procedure TcxListBox.SetItems(Value: TStrings); -begin - FInnerListBox.Items := Value; - DataChange; -end; - -procedure TcxListBox.SetListStyle(Value: TListBoxStyle); -begin - FInnerListBox.Style := Value; -end; - -procedure TcxListBox.SetMultiSelect(Value: Boolean); -begin - FInnerListBox.MultiSelect := Value; -end; - -procedure TcxListBox.SetOnMeasureItem(Value: TcxListBoxMeasureItemEvent); -begin - FOnMeasureItem := Value; - if Assigned(FOnMeasureItem) then - FInnerListBox.OnMeasureItem := DoMeasureItem - else - FInnerListBox.OnMeasureItem := nil; -end; - -procedure TcxListBox.SetReadOnly(Value: Boolean); -begin - DataBinding.ReadOnly := Value; -end; - -procedure TcxListBox.SetSelected(Index: Integer; Value: Boolean); -begin - FInnerListBox.Selected[Index] := Value; -end; - -procedure TcxListBox.SetSorted(Value: Boolean); -begin - FInnerListBox.Sorted := Value; -end; - -procedure TcxListBox.SetTopIndex(Value: Integer); -begin - FInnerListBox.TopIndex := Value; -end; - - {$IFDEF DELPHI6} -function TcxListBox.GetOnData: TLBGetDataEvent; -begin - Result := FInnerListBox.OnData; -end; - -function TcxListBox.GetOnDataFind: TLBFindDataEvent; -begin - Result := FInnerListBox.OnDataFind; -end; - -function TcxListBox.GetOnDataObject: TLBGetDataObjectEvent; -begin - Result := FInnerListBox.OnDataObject; -end; - -procedure TcxListBox.SetCount(Value: Integer); -begin - FInnerListBox.Count := Value; -end; - -procedure TcxListBox.SetOnData(Value: TLBGetDataEvent); -begin - FInnerListBox.OnData := Value; -end; - -procedure TcxListBox.SetOnDataFind(Value: TLBFindDataEvent); -begin - FInnerListBox.OnDataFind := Value; -end; - -procedure TcxListBox.SetOnDataObject(Value: TLBGetDataObjectEvent); -begin - FInnerListBox.OnDataObject := Value; -end; - {$ENDIF} - -function TcxListBox.GetScrollWidth: Integer; -begin - Result := FInnerListBox.ScrollWidth; -end; - -function TcxListBox.GetTabWidth: Integer; -begin - Result := FInnerListBox.TabWidth; -end; - -procedure TcxListBox.SetIntegralHeight(Value: Boolean); -begin - if Value <> FIntegralHeight then - begin - FIntegralHeight := Value; - SetSize; - end; -end; - -procedure TcxListBox.SetScrollWidth(Value: Integer); -begin - FInnerListBox.ScrollWidth := Value; -end; - -procedure TcxListBox.SetTabWidth(Value: Integer); -begin - FInnerListBox.TabWidth := Value; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxListView.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxListView.pas deleted file mode 100644 index e4620e95..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxListView.pas +++ /dev/null @@ -1,2119 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCommonLibrary } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCOMMONLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -{$DEFINE USETCXSCROLLBAR} - -unit cxListView; - -{$I cxVer.inc} - -interface - -uses - Windows, Forms, Classes, ComCtrls, CommCtrl, Controls, ImgList, Menus, - Messages, StdCtrls, SysUtils, cxClasses, cxContainer, cxControls, cxCustomData, - cxExtEditConsts, cxGraphics, cxGeometry, cxLookAndFeels, cxScrollBar, cxHeader; - -const - cxiaTop = TIconArrangement(0); - -type - TcxCustomListView = class; - - { TcxIconOptions } - - TcxIconOptions = class(TPersistent) - private - FArrangement: TIconArrangement; - FAutoArrange: Boolean; - FWrapText: Boolean; - FArrangementChange: TNotifyEvent; - FAutoArrangeChange: TNotifyEvent; - FWrapTextChange: TNotifyEvent; - procedure SetArrangement(Value: TIconArrangement); - procedure SetAutoArrange(Value: Boolean); - procedure SetWrapText(Value: Boolean); - public - constructor Create(AOwner: TPersistent); - published - property Arrangement: TIconArrangement read FArrangement write SetArrangement default cxiaTop; - property AutoArrange: Boolean read FAutoArrange write SetAutoArrange default False; - property WrapText: Boolean read FWrapText write SetWrapText default True; - end; - - { TcxCustomInnerListView } - - TcxCustomInnerListView = class(TListView, IUnknown, - IcxContainerInnerControl) - private - FCanvas: TcxCanvas; - FDefHeaderProc: Pointer; - FHeaderHandle: HWND; - FHeaderInstance: Pointer; - FOldHint: string; - FOldItem: TListItem; - FPressedHeaderItemIndex: Integer; - - function GetHeaderHotItemIndex: Integer; - function GetHeaderItemRect(AItemIndex: Integer): TRect; - function GetHeaderPressedItemIndex: Integer; - function HeaderItemIndex(AHeaderItem: Integer): Integer; - procedure HeaderWndProc(var Message: TMessage); - - procedure HScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); - procedure VScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure WMNotify(var Message: TWMNotify); message WM_NOTIFY; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; - procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; - procedure LVMGetHeaderItemInfo(var Message: TCMHeaderItemInfo); message CM_GETHEADERITEMINFO; - - function GetContainer: TcxCustomListView; - function GetControl: TWinControl; - function GetControlContainer: TcxContainer; - protected - FContainer: TcxCustomListView; - procedure Click; override; - procedure DblClick; override; - procedure Loaded; override; - function CanEdit(Item: TListItem): Boolean; override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure DoStartDock(var DragObject: TDragObject); override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - procedure WndProc(var Message: TMessage); override; - procedure DoCancelEdit; virtual; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); virtual; - procedure MouseEnter(AControl: TControl); dynamic; - procedure MouseLeave(AControl: TControl); dynamic; - - procedure DrawHeader; virtual; - - property Container: TcxCustomListView read GetContainer; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure DefaultHandler(var Message); override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; - property Canvas: TcxCanvas read FCanvas; - function CanFocus: Boolean; override; - {$IFDEF DELPHI6} - procedure DeleteSelected; override; - {$ENDIF} - end; - - TcxCustomInnerListViewClass = class of TcxCustomInnerListView; - - { TcxCustomListView } - - TcxCustomListView = class(TcxContainer) - private - FInnerListView: TcxCustomInnerListView; - FIconOptions: TcxIconOptions; - FOnCancelEdit: TNotifyEvent; - FOwnerDraw: Boolean; - function GetReadOnly: Boolean; - function GetListItems: TListItems; - function GetListColumns: TListColumns; - function GetListViewCanvas: TcxCanvas; - function GetColumnClick: Boolean; - function GetHideSelection: Boolean; - function GetIconOptions: TcxIconOptions; - function GetAllocBy: Integer; - function GetHoverTime: Integer; - function GetLargeImages: TCustomImageList; - function GetMultiSelect: Boolean; - function GetOwnerData: Boolean; - function GetOwnerDraw: Boolean; - function GetOnAdvancedCustomDraw: TLVAdvancedCustomDrawEvent; - function GetOnAdvancedCustomDrawItem: TLVAdvancedCustomDrawItemEvent; - function GetOnAdvancedCustomDrawSubItem: TLVAdvancedCustomDrawSubItemEvent; - function GetOnChange: TLVChangeEvent; - function GetOnChanging: TLVChangingEvent; - function GetOnColumnClick: TLVColumnClickEvent; - function GetOnColumnDragged: TNotifyEvent; - function GetOnColumnRightClick: TLVColumnRClickEvent; - function GetOnCompare: TLVCompareEvent; - function GetOnCustomDraw: TLVCustomDrawEvent; - function GetOnCustomDrawItem: TLVCustomDrawItemEvent; - function GetOnCustomDrawSubItem: TLVCustomDrawSubItemEvent; - function GetOnData: TLVOwnerDataEvent; - function GetOnDataFind: TLVOwnerDataFindEvent; - function GetOnDataHint: TLVOwnerDataHintEvent; - function GetOnDataStateChange: TLVOwnerDataStateChangeEvent; - function GetOnDeletion: TLVDeletedEvent; - function GetOnDrawItem: TLVDrawItemEvent; - function GetOnEdited: TLVEditedEvent; - function GetOnEditing: TLVEditingEvent; - function GetOnInfoTip: TLVInfoTipEvent; - function GetOnInsert: TLVDeletedEvent; - function GetOnGetImageIndex: TLVNotifyEvent; - function GetOnGetSubItemImage: TLVSubItemImageEvent; - function GetShowWorkAreas: Boolean; - function GetOnSelectItem: TLVSelectItemEvent; - function GetShowColumnHeaders: Boolean; - function GetSmallImages: TCustomImageList; - function GetSortType: TSortType; - function GetStateImages: TCustomImageList; - function GetViewStyle: TViewStyle; - {$IFDEF DELPHI6} - function GetOnCreateItemClass: TLVCreateItemClassEvent; - {$ENDIF} - procedure SetReadOnly(Value: Boolean); - procedure SetListItems(Value: TListItems); - procedure SetListColumns(Value: TListColumns); - procedure SetColumnClick(Value: Boolean); - procedure SetHideSelection(Value: Boolean); - procedure SetIconOptions(Value: TcxIconOptions); - procedure SetAllocBy(Value: Integer); - procedure SetHoverTime(Value: Integer); - procedure SetLargeImages(Value: TCustomImageList); - procedure SetMultiSelect(Value: Boolean); - procedure SetOwnerData(Value: Boolean); - procedure SetOwnerDraw(Value: Boolean); - procedure SetOnAdvancedCustomDraw(Value: TLVAdvancedCustomDrawEvent); - procedure SetOnAdvancedCustomDrawItem(Value: TLVAdvancedCustomDrawItemEvent); - procedure SetOnAdvancedCustomDrawSubItem(Value: TLVAdvancedCustomDrawSubItemEvent); - procedure SetOnChange(Value: TLVChangeEvent); - procedure SetOnChanging(Value: TLVChangingEvent); - procedure SetOnColumnClick(Value: TLVColumnClickEvent); - procedure SetOnColumnDragged(Value: TNotifyEvent); - procedure SetOnColumnRightClick(Value: TLVColumnRClickEvent); - procedure SetOnCompare(Value: TLVCompareEvent); - procedure SetOnCustomDraw(Value: TLVCustomDrawEvent); - procedure SetOnCustomDrawItem(Value: TLVCustomDrawItemEvent); - procedure SetOnCustomDrawSubItem(Value: TLVCustomDrawSubItemEvent); - procedure SetOnData(Value: TLVOwnerDataEvent); - procedure SetOnDataFind(Value: TLVOwnerDataFindEvent); - procedure SetOnDataHint(Value: TLVOwnerDataHintEvent); - procedure SetOnDataStateChange(Value: TLVOwnerDataStateChangeEvent); - procedure SetOnDeletion(Value: TLVDeletedEvent); - procedure SetOnDrawItem(Value: TLVDrawItemEvent); - procedure SetOnEdited(Value: TLVEditedEvent); - procedure SetOnEditing(Value: TLVEditingEvent); - procedure SetOnInfoTip(Value: TLVInfoTipEvent); - procedure SetOnInsert(Value: TLVDeletedEvent); - procedure SetOnGetImageIndex(Value: TLVNotifyEvent); - procedure SetOnGetSubItemImage(Value: TLVSubItemImageEvent); - procedure SetShowWorkAreas(Value: Boolean); - procedure SetOnSelectItem(Value: TLVSelectItemEvent); - procedure SetShowColumnHeaders(Value: Boolean); - procedure SetSmallImages(Value: TCustomImageList); - procedure SetSortType(Value: TSortType); - procedure SetStateImages(Value: TCustomImageList); - {$IFDEF DELPHI6} - procedure SetOnCreateItemClass(Value: TLVCreateItemClassEvent); - {$ENDIF} - function GetCheckBoxes: Boolean; - function GetColumnFromIndex(Index: Integer): TListColumn; - function GetDropTarget: TListItem; - function GetFullDrag: Boolean; - function GetGridLines: Boolean; - function GetHotTrack: Boolean; - function GetHotTrackStyles: TListHotTrackStyles; - function GetItemFocused: TListItem; - function GetRowSelect: Boolean; - function GetSelCount: Integer; - function GetSelected: TListItem; - function GetTopItem: TListItem; - function GetViewOrigin: TPoint; - function GetVisibleRowCount: Integer; - function GetBoundingRect: TRect; - function GetWorkAreas: TWorkAreas; - procedure SetCheckboxes(Value: Boolean); - procedure SetDropTarget(Value: TListItem); - procedure SetFullDrag(Value: Boolean); - procedure SetGridLines(Value: Boolean); - procedure SetHotTrack(Value: Boolean); - procedure SetHotTrackStyles(Value: TListHotTrackStyles); - procedure SetItemFocused(Value: TListItem); - procedure SetRowSelect(Value: Boolean); - procedure SetSelected(Value: TListItem); - procedure ArrangementChangeHandler(Sender: TObject); - procedure AutoArrangeChangeHandler(Sender: TObject); - procedure WrapTextChangeHandler(Sender: TObject); - procedure UpdateIconOptions; - protected - procedure DoExit; override; - procedure FontChanged; override; - function IsReadOnly: Boolean; override; - procedure Loaded; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - function NeedsScrollBars: Boolean; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - procedure WriteState(Writer: TWriter); override; - - class function GetListViewClass: TcxCustomInnerListViewClass; virtual; - - function CanChange(Item: TListItem; Change: Integer): Boolean; - function CanEdit(Item: TListItem): Boolean; - procedure ChangeScale(M, D: Integer); override; - function ColumnsShowing: Boolean; - function GetCount: Integer; - {$IFDEF DELPHI6} - function GetItemIndex: Integer; overload; - function GetListViewItemIndex: Integer; - procedure SetItemIndex(Value: Integer); - {$ENDIF} - function GetItemIndex(Value: TListItem): Integer; overload; - procedure SetViewStyle(Value: TViewStyle); virtual; - procedure UpdateColumn(AnIndex: Integer); - procedure UpdateColumns; - - property Columns: TListColumns read GetListColumns write SetListColumns; - property ColumnClick: Boolean read GetColumnClick write SetColumnClick default True; - property HideSelection: Boolean read GetHideSelection write SetHideSelection default True; - property IconOptions: TcxIconOptions read GetIconOptions write SetIconOptions; - property Items: TListItems read GetListItems write SetListItems; - property AllocBy: Integer read GetAllocBy write SetAllocBy default 0; - property HoverTime: Integer read GetHoverTime write SetHoverTime default -1; - property ListViewCanvas: TcxCanvas read GetListViewCanvas; - property LargeImages: TCustomImageList read GetLargeImages write SetLargeImages; - property MultiSelect: Boolean read GetMultiSelect write SetMultiSelect default False; - property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False; - property OwnerData: Boolean read GetOwnerData write SetOwnerData default False; - property OwnerDraw: Boolean read GetOwnerDraw write SetOwnerDraw default False; - property RowSelect: Boolean read GetRowSelect write SetRowSelect default False; - property ShowColumnHeaders: Boolean read GetShowColumnHeaders - write SetShowColumnHeaders default True; - property ShowWorkAreas: Boolean read GetShowWorkAreas write SetShowWorkAreas default False; - property SmallImages: TCustomImageList read GetSmallImages write SetSmallImages; - property SortType: TSortType read GetSortType write SetSortType default stNone; - property StateImages: TCustomImageList read GetStateImages write SetStateImages; - property ViewStyle: TViewStyle read GetViewStyle write SetViewStyle default vsIcon; - property OnAdvancedCustomDraw: TLVAdvancedCustomDrawEvent read GetOnAdvancedCustomDraw - write SetOnAdvancedCustomDraw; - property OnAdvancedCustomDrawItem: TLVAdvancedCustomDrawItemEvent - read GetOnAdvancedCustomDrawItem write SetOnAdvancedCustomDrawItem; - property OnAdvancedCustomDrawSubItem: TLVAdvancedCustomDrawSubItemEvent - read GetOnAdvancedCustomDrawSubItem write SetOnAdvancedCustomDrawSubItem; - property OnCancelEdit: TNotifyEvent read FOnCancelEdit write FOnCancelEdit; - property OnChange: TLVChangeEvent read GetOnChange write SetOnChange; - property OnChanging: TLVChangingEvent read GetOnChanging write SetOnChanging; - property OnColumnClick: TLVColumnClickEvent read GetOnColumnClick write SetOnColumnClick; - property OnColumnDragged: TNotifyEvent read GetOnColumnDragged write SetOnColumnDragged; - property OnColumnRightClick: TLVColumnRClickEvent read GetOnColumnRightClick - write SetOnColumnRightClick; - property OnCompare: TLVCompareEvent read GetOnCompare write SetOnCompare; - property OnCustomDraw: TLVCustomDrawEvent read GetOnCustomDraw write SetOnCustomDraw; - property OnCustomDrawItem: TLVCustomDrawItemEvent read GetOnCustomDrawItem - write SetOnCustomDrawItem; - property OnCustomDrawSubItem: TLVCustomDrawSubItemEvent read GetOnCustomDrawSubItem - write SetOnCustomDrawSubItem; - property OnData: TLVOwnerDataEvent read GetOnData write SetOnData; - property OnDataFind: TLVOwnerDataFindEvent read GetOnDataFind write SetOnDataFind; - property OnDataHint: TLVOwnerDataHintEvent read GetOnDataHint write SetOnDataHint; - property OnDataStateChange: TLVOwnerDataStateChangeEvent read GetOnDataStateChange - write SetOnDataStateChange; - property OnDeletion: TLVDeletedEvent read GetOnDeletion write SetOnDeletion; - property OnDrawItem: TLVDrawItemEvent read GetOnDrawItem write SetOnDrawItem; - property OnEdited: TLVEditedEvent read GetOnEdited write SetOnEdited; - property OnEditing: TLVEditingEvent read GetOnEditing write SetOnEditing; - property OnInfoTip: TLVInfoTipEvent read GetOnInfoTip write SetOnInfoTip; - property OnInsert: TLVDeletedEvent read GetOnInsert write SetOnInsert; - property OnGetImageIndex: TLVNotifyEvent read GetOnGetImageIndex write SetOnGetImageIndex; - property OnGetSubItemImage: TLVSubItemImageEvent read GetOnGetSubItemImage - write SetOnGetSubItemImage; - property OnSelectItem: TLVSelectItemEvent read GetOnSelectItem write SetOnSelectItem; - {$IFDEF DELPHI6} - property OnCreateItemClass: TLVCreateItemClassEvent read GetOnCreateItemClass - write SetOnCreateItemClass; - {$ENDIF} - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property InnerListView: TcxCustomInnerListView read FInnerListView; - function AlphaSort: Boolean; - procedure Arrange(Code: TListArrangement); - procedure Clear; - {$IFDEF DELPHI6} - procedure ClearSelection; - procedure AddItem(Item: string; AObject: TObject); - procedure CopySelection(Destination: TCustomListControl); - procedure DeleteSelected; - procedure SelectAll; - {$ENDIF} - function FindCaption(StartIndex: Integer; Value: string; - Partial, Inclusive, Wrap: Boolean): TListItem; - function FindData(StartIndex: Integer; Value: Pointer; - Inclusive, Wrap: Boolean): TListItem; - function GetHitTestInfoAt(X, Y: Integer): THitTests; - function GetItemAt(X, Y: Integer): TListItem; - function GetNearestItem(Point: TPoint; - Direction: TSearchDirection): TListItem; - function GetNextItem(StartItem: TListItem; - Direction: TSearchDirection; States: TItemStates): TListItem; - function GetSearchString: string; - function IsEditing: Boolean; - function CustomSort(SortProc: TLVCompare; lParam: Longint): Boolean; - function StringWidth(S: string): Integer; - procedure UpdateItems(FirstIndex, LastIndex: Integer); - - property Checkboxes: Boolean read GetCheckBoxes write SetCheckboxes default False; - property Column[Index: Integer]: TListColumn read GetColumnFromIndex; - property DropTarget: TListItem read GetDropTarget write SetDropTarget; - property FullDrag: Boolean read GetFullDrag write SetFullDrag default False; - property GridLines: Boolean read GetGridLines write SetGridLines default False; - property HotTrack: Boolean read GetHotTrack write SetHotTrack default False; - property HotTrackStyles: TListHotTrackStyles read GetHotTrackStyles write SetHotTrackStyles default []; - property ItemFocused: TListItem read GetItemFocused write SetItemFocused; - {$IFDEF DELPHI6} - property ItemIndex: Integer read GetListViewItemIndex write SetItemIndex - default -1; - {$ENDIF} - property SelCount: Integer read GetSelCount; - property Selected: TListItem read GetSelected write SetSelected; - property TopItem: TListItem read GetTopItem; - property ViewOrigin: TPoint read GetViewOrigin; - property VisibleRowCount: Integer read GetVisibleRowCount; - property BoundingRect: TRect read GetBoundingRect; - property WorkAreas: TWorkAreas read GetWorkAreas; - end; - - { TcxListView } - - TcxListView = class(TcxCustomListView) - public - property ListViewCanvas; - published - property Align; - property AllocBy default 0; - property Anchors; - property BiDiMode; - property Checkboxes; - property ColumnClick default True; - property Columns; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property HideSelection default True; - property HotTrack default False; - property HoverTime default -1; - property IconOptions; - {$IFDEF DELPHI6} - property ItemIndex; - {$ENDIF} - property Items; - property LargeImages; - property MultiSelect default False; - property OwnerData default False; - property OwnerDraw default False; - property ParentBiDiMode; - property ParentColor default False; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ReadOnly default False; - property RowSelect default False; - property ShowColumnHeaders default True; - property ShowHint; - property ShowWorkAreas default False; - property SmallImages; - property SortType default stNone; - property StateImages; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property ViewStyle default vsIcon; - property Visible; - property OnAdvancedCustomDraw; - property OnAdvancedCustomDrawItem; - property OnAdvancedCustomDrawSubItem; - property OnCancelEdit; - property OnChange; - property OnChanging; - property OnClick; - property OnColumnClick; - property OnColumnDragged; - property OnColumnRightClick; - property OnCompare; - property OnContextPopup; - {$IFDEF DELPHI6} - property OnCreateItemClass; - {$ENDIF} - property OnCustomDraw; - property OnCustomDrawItem; - property OnCustomDrawSubItem; - property OnData; - property OnDataFind; - property OnDataHint; - property OnDataStateChange; - property OnDblClick; - property OnDeletion; - property OnDragDrop; - property OnDragOver; - property OnDrawItem; - property OnEdited; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnGetImageIndex; - property OnGetSubItemImage; - property OnInfoTip; - property OnInsert; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnSelectItem; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Graphics, Types, Math, cxLookAndFeelPainters; - -{ TcxIconOptions } - -constructor TcxIconOptions.Create(AOwner: TPersistent); -begin - inherited Create; - Arrangement := cxiaTop; - AutoArrange := False; - WrapText := True; -end; - -procedure TcxIconOptions.SetArrangement(Value: TIconArrangement); -begin - if Value <> Arrangement then - begin; - FArrangement := Value; - if Assigned(FArrangementChange) then FArrangementChange(Self); - end; -end; - -procedure TcxIconOptions.SetAutoArrange(Value: Boolean); -begin - if Value <> AutoArrange then - begin - FAutoArrange := Value; - if Assigned(FAutoArrangeChange) then FAutoArrangeChange(Self); - end; -end; - -procedure TcxIconOptions.SetWrapText(Value: Boolean); -begin - if Value <> WrapText then - begin - FWrapText := Value; - if Assigned(FWrapTextChange) then FWrapTextChange(Self); - end; -end; - -{ TcxCustomInnerListView } - -constructor TcxCustomInnerListView.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FCanvas := TcxCanvas.Create(inherited Canvas); - BorderStyle := bsNone; - ControlStyle := ControlStyle + [csDoubleClicks]; - IconOptions.Arrangement := cxiaTop; - IconOptions.AutoArrange := False; - IconOptions.WrapText := True; - ParentColor := False; - ParentFont := True; - ShowColumnHeaders := True; - FPressedHeaderItemIndex := -1; -end; - -destructor TcxCustomInnerListView.Destroy; -begin - FreeAndNil(FCanvas); - if FHeaderHandle <> 0 then - begin - SetWindowLong(FHeaderHandle, GWL_WNDPROC, Integer(FDefHeaderProc)); - FHeaderHandle := 0; - end; - FreeObjectInstance(FHeaderInstance); - inherited Destroy; -end; - -procedure TcxCustomInnerListView.DefaultHandler(var Message); -begin - if (Container = nil) or - not Container.InnerControlDefaultHandler(TMessage(Message)) then - inherited DefaultHandler(Message); -end; - -procedure TcxCustomInnerListView.Loaded; -begin - inherited; - Container.UpdateIconOptions; - FoldHint := Hint; -end; - -procedure TcxCustomInnerListView.DragDrop(Source: TObject; X, Y: Integer); -begin - if Container <> nil then - Container.DragDrop(Source, Left + X, Top + Y); -end; - -procedure TcxCustomInnerListView.Click; -begin - inherited Click; - if Container <> nil then - _TcxContainerAccess.Click(Container); -end; - -procedure TcxCustomInnerListView.DblClick; -begin - inherited DblClick; - if Container <> nil then - _TcxContainerAccess.DblClick(Container); -end; - -function TcxCustomInnerListView.CanEdit(Item: TListItem): Boolean; -begin - if Container <> nil then - begin - Result := (not Container.ReadOnly) {and (not OwnerData)}; {<- Prevent bug, when Caption not saved after CreateWnd in "OwnerData" mode} - if Result then - Result := inherited CanEdit(Item); - end - else - Result := inherited CanEdit(Item); -end; - -function TcxCustomInnerListView.DoMouseWheel(Shift: TShiftState; - WheelDelta: Integer; MousePos: TPoint): Boolean; -begin - Result := (Container <> nil) and - _TcxContainerAccess.DoMouseWheel(Container, Shift, WheelDelta, MousePos); - if not Result then - inherited DoMouseWheel(Shift, WheelDelta, MousePos); -end; - -procedure TcxCustomInnerListView.DoStartDock(var DragObject: TDragObject); -begin - _TcxContainerAccess.BeginAutoDrag(Container); -end; - -procedure TcxCustomInnerListView.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -begin - if Container <> nil then - _TcxContainerAccess.DragOver(Container, Source, Left + X, Top + Y, State, Accept); -end; - -procedure TcxCustomInnerListView.DoCancelEdit; -begin - if IsEditing and Assigned(Container) and not Container.IsDestroying and - Assigned(Container.OnCancelEdit) then - Container.OnCancelEdit(Container); -end; - -procedure TcxCustomInnerListView.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - if FHeaderHandle <> 0 then - InvalidateRect(FHeaderHandle, nil, False); -end; - -procedure TcxCustomInnerListView.MouseEnter(AControl: TControl); -begin -end; - -procedure TcxCustomInnerListView.MouseLeave(AControl: TControl); -begin - if Container <> nil then - Container.ShortRefreshContainer(True); -end; - -procedure TcxCustomInnerListView.DrawHeader; -var - I: Integer; -begin - Canvas.Brush.Color := Container.LookAndFeelPainter.DefaultHeaderColor; - Canvas.Font := Font; - Canvas.Font.Color := Container.LookAndFeelPainter.DefaultHeaderTextColor; - for I := 0 to Columns.Count do - DrawHeaderSection(FHeaderHandle, I, Canvas, Container.LookAndFeel, SmallImages); -end; - -procedure TcxCustomInnerListView.KeyDown(var Key: Word; Shift: TShiftState); -begin - if Container <> nil then - _TcxContainerAccess.KeyDown(Container, Key, Shift); - if Key <> 0 then - inherited KeyDown(Key, Shift); -end; - -procedure TcxCustomInnerListView.KeyPress(var Key: Char); -begin - if Key = Char(VK_TAB) then - Key := #0; - if Container <> nil then - _TcxContainerAccess.KeyPress(Container, Key); - if Word(Key) = VK_RETURN then - Key := #0; - if Key <> #0 then - inherited KeyPress(Key); -end; - -procedure TcxCustomInnerListView.KeyUp(var Key: Word; Shift: TShiftState); -begin - if Key = VK_TAB then - Key := 0; - if Container <> nil then - _TcxContainerAccess.KeyUp(Container, Key, Shift); - if Key <> 0 then - inherited KeyUp(Key, Shift); -end; - -procedure TcxCustomInnerListView.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if Container <> nil then - with Container do - begin - InnerControlMouseDown := True; - try - MouseDown(Button, Shift, X + Self.Left, Y + Self.Top); - finally - InnerControlMouseDown := False; - end; - end; -end; - -procedure TcxCustomInnerListView.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - if (GetItemAt(X, Y) = nil) then - Hint := FOldHint; - if Container <> nil then - _TcxContainerAccess.MouseMove(Container, Shift, X + Left, Y + Top); -end; - -procedure TcxCustomInnerListView.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - if Container <> nil then - _TcxContainerAccess.MouseUp(Container, Button, Shift, X + Left, Y + Top); -end; - -procedure TcxCustomInnerListView.CreateParams(var Params: TCreateParams); -begin - inherited; - if Container.IconOptions.AutoArrange then - Params.Style := Params.Style or LVS_AUTOARRANGE - else - Params.Style := Params.Style and not LVS_AUTOARRANGE; - if not Container.ShowColumnHeaders then - Params.Style := Params.Style or LVS_NOCOLUMNHEADER; -end; - -procedure TcxCustomInnerListView.CreateWnd; -begin - inherited CreateWnd; - Container.SetScrollBarsParameters; - Container.AdjustInnerControl; -end; - -procedure TcxCustomInnerListView.WndProc(var Message: TMessage); -var - AHeaderStyle: Integer; - S: string; -begin - if (Container <> nil) and Container.InnerControlMenuHandler(Message) then - Exit; - inherited WndProc(Message); - case Message.Msg of - WM_PAINT: - Container.UpdateScrollBarsParameters; - WM_PARENTNOTIFY: - if Message.WParamLo = WM_CREATE then - begin - SetLength(S, 80); - SetLength(S, GetClassName(Message.LParam, PChar(S), Length(S))); - if S = 'SysHeader32' then - begin - FHeaderHandle := Message.LParam; - FHeaderInstance := MakeObjectInstance(HeaderWndProc); - FDefHeaderProc := Pointer(SetWindowLong(FHeaderHandle, GWL_WNDPROC, Integer(FHeaderInstance))); - AHeaderStyle := GetWindowLong(FHeaderHandle, GWL_STYLE); - SetWindowLong(FHeaderHandle, GWL_STYLE, AHeaderStyle or HDS_HOTTRACK); - end; - end; - end; -end; - -function TcxCustomInnerListView.CanFocus: Boolean; -begin - Result := Container.CanFocus; -end; - -{$IFDEF DELPHI6} -procedure TcxCustomInnerListView.DeleteSelected; -begin - if Assigned(Container) and (not Container.ReadOnly) then - inherited DeleteSelected; -end; -{$ENDIF} - -function TcxCustomInnerListView.GetHeaderHotItemIndex: Integer; -var - AHitTestInfo: THDHitTestInfo; -begin - if WindowFromPoint(InternalGetCursorPos) <> FHeaderHandle then - begin - Result := -1; - Exit; - end; - - AHitTestInfo.Point := InternalGetCursorPos; - Windows.ScreenToClient(FHeaderHandle, AHitTestInfo.Point); - SendGetStructMessage(FHeaderHandle, HDM_HITTEST, 0, AHitTestInfo); - Result := AHitTestInfo.Item; -end; - -function TcxCustomInnerListView.GetHeaderItemRect(AItemIndex: Integer): TRect; -var - AHeaderItem: THDItem; - I: Integer; - R: TRect; -begin - if GetComCtlVersion >= ComCtlVersionIE3 then - SendGetStructMessage(FHeaderHandle, HDM_GETITEMRECT, AItemIndex, Result) - else - begin - Result.Top := 0; - Result.Left := 0; - AHeaderItem.Mask := HDI_WIDTH; - for I := 0 to AItemIndex - 1 do - begin - SendGetStructMessage(FHeaderHandle, HDM_GETITEM, I, AHeaderItem); - Inc(Result.Left, AHeaderItem.cxy); - end; - R := cxGetWindowRect(FHeaderHandle); - Result.Bottom := cxRectWidth(R); - SendGetStructMessage(FHeaderHandle, HDM_GETITEM, AItemIndex, AHeaderItem); - Result.Right := Result.Left + AHeaderItem.cxy; - end; -end; - -function TcxCustomInnerListView.GetHeaderPressedItemIndex: Integer; -var - AHitTestInfo: THDHitTestInfo; -begin - AHitTestInfo.Point := InternalGetCursorPos; - Windows.ScreenToClient(FHeaderHandle, AHitTestInfo.Point); - SendGetStructMessage(FHeaderHandle, HDM_HITTEST, 0, AHitTestInfo); - if AHitTestInfo.Flags and (HHT_ONDIVIDER or HHT_ONDIVOPEN) <> 0 then - Result := -1 - else - Result := AHitTestInfo.Item; -end; - -function TcxCustomInnerListView.HeaderItemIndex(AHeaderItem: Integer): Integer; -begin - Result := AHeaderItem; - if GetComCtlVersion >= ComCtlVersionIE3 then - Result := SendMessage(FHeaderHandle, HDM_ORDERTOINDEX, AHeaderItem, 0); -end; - -procedure TcxCustomInnerListView.HeaderWndProc(var Message: TMessage); - - procedure CallDefHeaderProc; - begin - Message.Result := CallWindowProc(FDefHeaderProc, FHeaderHandle, - Message.Msg, Message.WParam, Message.LParam); - end; - -var - ADC: HDC; - APaintStruct: TPaintStruct; - R: TRect; -begin - case Message.Msg of - WM_ERASEBKGND: - Message.Result := 1; - WM_PAINT, WM_PRINTCLIENT: - begin - ADC := Message.WParam; - if ADC = 0 then - ADC := BeginPaint(FHeaderHandle, APaintStruct); - try - Canvas.Canvas.Handle := ADC; - Canvas.Canvas.Refresh; - DrawHeader; - finally - if Message.WParam = 0 then - EndPaint(FHeaderHandle, APaintStruct); - end; - end; - WM_LBUTTONDOWN: - begin - CallDefHeaderProc; - if ColumnClick and (GetCapture = FHeaderHandle) then - FPressedHeaderItemIndex := GetHeaderPressedItemIndex; - end; - WM_CAPTURECHANGED: - begin - if FPressedHeaderItemIndex <> -1 then - begin - R := GetHeaderItemRect(FPressedHeaderItemIndex); - InvalidateRect(FHeaderHandle, @R, False); - end; - FPressedHeaderItemIndex := -1; - CallDefHeaderProc; - end; - CM_GETHEADERITEMINFO: - Perform(CM_GETHEADERITEMINFO, Message.WParam, Message.LParam); - else - CallDefHeaderProc; - end; -end; - -procedure TcxCustomInnerListView.HScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); -begin - if ScrollCode = scTrack then - SendMessage(Handle, LVM_SCROLL, ScrollPos - GetScrollPos(Handle, SB_HORZ), 0) - else - begin - CallWindowProc(DefWndProc, Handle, WM_HSCROLL, - MakeWParam(Word(ScrollCode), Word(ScrollPos)), Container.HScrollBar.Handle); - ScrollPos := GetScrollPos(Handle, SB_HORZ); - end; -end; - -procedure TcxCustomInnerListView.VScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); - - function GetLineHeight: Integer; - var - AItemRect: TRect; - begin - AItemRect := TopItem.DisplayRect(drBounds); - Result := AItemRect.Bottom - AItemRect.Top; - end; - -var - P: TPoint; -begin - if ScrollCode = scTrack then - case ViewStyle of - vsReport: - SendMessage(Handle, LVM_SCROLL, 0, (ScrollPos - ListView_GetTopIndex(Handle)) * GetLineHeight); - vsIcon, vsSmallIcon: - begin - SendGetStructMessage(Handle, LVM_GETORIGIN, 0, P); - SendMessage(Handle, LVM_SCROLL, 0, ScrollPos - P.Y); - end; - end - else - begin - CallWindowProc(DefWndProc, Handle, WM_VSCROLL, Word(ScrollCode) + - Word(ScrollPos) shl 16, Container.VScrollBar.Handle); - ScrollPos := GetScrollPos(Handle, SB_VERT); - end; -end; - -procedure TcxCustomInnerListView.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - inherited; - if Container <> nil then - with Message do - begin - Result := Result or DLGC_WANTCHARS; - if GetKeyState(VK_CONTROL) >= 0 then - Result := Result or DLGC_WANTTAB; - end; -end; - -procedure TcxCustomInnerListView.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - if (Container <> nil) and not Container.IsDestroying then - Container.FocusChanged; -end; - -procedure TcxCustomInnerListView.WMLButtonDown(var Message: TWMLButtonDown); -begin - inherited; - if Dragging then - begin - CancelDrag; - Container.BeginDrag(False); - end; -end; - -procedure TcxCustomInnerListView.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - inherited; - if not Container.ScrollBarsCalculating then - Container.SetScrollBarsParameters; -end; - -procedure TcxCustomInnerListView.WMNCPaint(var Message: TWMNCPaint); -begin - if UsecxScrollBars and Container.HScrollBarVisible and Container.VScrollBarVisible then - cxFillSizeGrip(Container); -end; - -procedure TcxCustomInnerListView.WMNotify(var Message: TWMNotify); -begin - inherited; - if Message.NMHdr.code = HDN_ITEMCHANGED then - Container.SetScrollBarsParameters(True); -end; - -procedure TcxCustomInnerListView.WMSetFocus(var Message: TWMSetFocus); -begin - inherited; - if (Container <> nil) and not Container.IsDestroying and - not(csDestroying in ComponentState) and - (Message.FocusedWnd <> Container.Handle) then - Container.FocusChanged; -end; - -procedure TcxCustomInnerListView.WMWindowPosChanged(var Message: TWMWindowPosChanged); -var - ARgn: HRGN; -begin - if not (csDestroying in ComponentState) then - Container.SetScrollBarsParameters; - inherited; - if csDestroying in ComponentState then - Exit; - if Container.HScrollBarVisible and Container.VScrollBarVisible then - begin - ARgn := CreateRectRgnIndirect(GetSizeGripRect(Self)); - SendMessage(Handle, WM_NCPAINT, ARgn, 0); - DeleteObject(ARgn); - end; -end; - -procedure TcxCustomInnerListView.CMHintShow(var Message: TCMHintShow); -var - AInfoTip: string; - AItem: TListItem; - AItemRect: TRect; - AHintInfo: PHintInfo; -begin - AItem := GetItemAt(Message.HintInfo.CursorPos.X, - Message.HintInfo.CursorPos.Y); - if FOldItem = AItem then - Exit; - - if not Assigned(OnInfoTip) then - begin - FOldHint := Hint; - inherited; - end - else - if AItem <> nil then - begin - AInfoTip := AItem.Caption; - DoInfoTip(AItem, AInfoTip); - - AItemRect := AItem.DisplayRect(drBounds); - AItemRect.TopLeft := ClientToScreen(AItemRect.TopLeft); - AItemRect.BottomRight := ClientToScreen(AItemRect.BottomRight); - - AHintInfo := Message.HintInfo; - AHintInfo.HintStr := AInfoTip; - AHintInfo.CursorRect := AItemRect; - AHintInfo.HintPos := Point( - AHintInfo.CursorRect.Left + GetSystemMetrics(SM_CXCURSOR), - AHintInfo.CursorRect.Top + GetSystemMetrics(SM_CYCURSOR)); - AHintInfo.HintMaxWidth := ClientWidth; - Hint := AInfoTip; - end; - FOldItem := AItem; -end; - -procedure TcxCustomInnerListView.CMMouseEnter(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseEnter(Self) - else - MouseEnter(TControl(Message.lParam)); -end; - -procedure TcxCustomInnerListView.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxCustomInnerListView.CNNotify( - var Message: TWMNotify); -var - AItem: PLVItem; - APrevBrushChangeHandler, APrevFontChangeHandler: TNotifyEvent; -begin - if Message.NMHdr.code = LVN_ENDLABELEDIT then - begin - AItem := @PLVDispInfo(Message.NMHdr)^.item; - if (AItem.iItem <> -1) then - if (AItem.pszText <> nil) then - begin - if CanChange(Items[AItem.iItem], LVIF_TEXT) then - Edit(AItem^); - end - else - DoCancelEdit; - end - else - if Message.NMHdr.code = NM_CUSTOMDRAW then - begin - APrevBrushChangeHandler := Canvas.Brush.OnChange; - APrevFontChangeHandler := Canvas.Font.OnChange; - inherited; - Canvas.Brush.OnChange := APrevBrushChangeHandler; - Canvas.Font.OnChange := APrevFontChangeHandler; - end - else - inherited; -end; - -procedure TcxCustomInnerListView.LVMGetHeaderItemInfo(var Message: TCMHeaderItemInfo); - - function GetItemState: TcxButtonState; - - function CanHotTrack: Boolean; - var - I: Integer; - begin - Result := ColumnClick; - if Result then - for I := 0 to Columns.Count - 1 do - if Columns[I].ImageIndex <> -1 then - begin - Result := False; - Break; - end; - end; - - var - AHeaderItemIndex: Integer; - begin - if not Parent.Enabled then - Result := cxbsDisabled - else - begin - AHeaderItemIndex := HeaderItemIndex(Message.Index); - if AHeaderItemIndex = FPressedHeaderItemIndex then - Result := cxbsPressed - else - if CanHotTrack and (AHeaderItemIndex = GetHeaderHotItemIndex) then - Result := cxbsHot - else - Result := cxbsNormal; - end; - end; - - function GetItemRect: TRect; - var - R: TRect; - begin - if Message.Index = Columns.Count then - begin - Windows.GetClientRect(FHeaderHandle, Result); - if Columns.Count > 0 then - begin - R := GetHeaderItemRect(HeaderItemIndex(Columns.Count - 1)); - Result.Left := R.Right; - end; - end - else - Result := GetHeaderItemRect(HeaderItemIndex(Message.Index)); - end; - -var - AIndex: Integer; - AHeaderItemInfo: PHeaderItemInfo; -begin - AIndex := Message.Index; - AHeaderItemInfo := Message.HeaderItemInfo; - ZeroMemory(AHeaderItemInfo, SizeOf(THeaderItemInfo)); - if AIndex < Columns.Count then - begin - AHeaderItemInfo.ImageIndex := Columns[AIndex].ImageIndex; - AHeaderItemInfo.SectionAlignment := Columns[AIndex].Alignment; - AHeaderItemInfo.SortOrder := soNone; - AHeaderItemInfo.Text := Columns[AIndex].Caption; - end - else - AHeaderItemInfo.ImageIndex := -1; - AHeaderItemInfo.Rect := GetItemRect; - AHeaderItemInfo.State := GetItemState; - Message.HeaderItemInfo := AHeaderItemInfo; -end; - -function TcxCustomInnerListView.GetContainer: TcxCustomListView; -begin - Result := TcxCustomListView(FContainer); -end; - -function TcxCustomInnerListView.GetControl: TWinControl; -begin - Result := Self; -end; - -function TcxCustomInnerListView.GetControlContainer: TcxContainer; -begin - Result := FContainer; -end; - -{ TcxCustomListView } - -constructor TcxCustomListView.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FOwnerDraw := False; - FIconOptions := TcxIconOptions.Create(Self); - FIconOptions.FArrangementChange := ArrangementChangeHandler; - FIconOptions.FAutoArrangeChange := AutoArrangeChangeHandler; - FIconOptions.FWrapTextChange := WrapTextChangeHandler; - FInnerListView := GetListViewClass.Create(Self); - FInnerListView.AutoSize := False; - FInnerListView.Align := alClient; - FInnerListView.BorderStyle := bsNone; - FInnerListView.Parent := Self; - FInnerListView.FContainer := Self; - FInnerListView.OwnerDraw := False; - InnerControl := FInnerListView; - Width := 121; - Height := 97; -end; - -destructor TcxCustomListView.Destroy; -begin - FreeAndNil(FInnerListView); - FreeAndNil(FIconOptions); - inherited Destroy; -end; - -procedure TcxCustomListView.UpdateIconOptions; -begin - if Assigned(InnerListView) then - begin - InnerListView.Items.BeginUpdate; - try - InnerListView.IconOptions.Arrangement := FIconOptions.Arrangement; - InnerListView.IconOptions.AutoArrange := FIconOptions.AutoArrange; - InnerListView.IconOptions.WrapText := FIconOptions.WrapText; - finally - InnerListView.Items.EndUpdate; - end; - end; -end; - -class function TcxCustomListView.GetListViewClass: TcxCustomInnerListViewClass; -begin - Result := TcxCustomInnerListView; -end; - -{$IFDEF DELPHI6} -procedure TcxCustomListView.AddItem(Item: string; AObject: TObject); -begin - InnerListView.AddItem(Item, AObject); -end; - -procedure TcxCustomListView.ClearSelection; -begin - InnerListView.ClearSelection; -end; - -procedure TcxCustomListView.DeleteSelected; -begin - InnerListView.DeleteSelected; -end; -{$ENDIF} - -procedure TcxCustomListView.Clear; -begin -{$IFDEF DELPHI6} - InnerListView.Clear; -{$ELSE} - InnerListView.Items.Clear; -{$ENDIF} -end; - -procedure TcxCustomListView.DoExit; -begin - if IsDestroying then - Exit; - try - except - SetFocus; - raise; - end; - inherited DoExit; -end; - -procedure TcxCustomListView.FontChanged; -begin - inherited FontChanged; - SetSize; -end; - -function TcxCustomListView.IsReadOnly: Boolean; -begin - Result := ReadOnly; -end; - -procedure TcxCustomListView.Loaded; -begin - inherited; - UpdateIconOptions; - InnerListView.OwnerDraw := FOwnerDraw; -end; - -procedure TcxCustomListView.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited LookAndFeelChanged(Sender, AChangedValues); - if not FIsCreating then - InnerListView.LookAndFeelChanged(Sender, AChangedValues); -end; - -function TcxCustomListView.NeedsScrollBars: Boolean; -begin - Result := True; -end; - -procedure TcxCustomListView.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -begin - inherited Scroll(AScrollBarKind, AScrollCode, AScrollPos); -{$IFDEF USETCXSCROLLBAR} - if AScrollBarKind = sbHorizontal then - InnerListView.HScrollHandler(Self, AScrollCode, AScrollPos) - else - InnerListView.VScrollHandler(Self, AScrollCode, AScrollPos); - SetScrollBarsParameters; -{$ENDIF} -end; - -procedure TcxCustomListView.WriteState(Writer: TWriter); -begin - FInnerListView.HandleNeeded; - inherited; -end; - -procedure TcxCustomListView.SetReadOnly(Value: Boolean); -begin - if Value <> ReadOnly then - begin - InnerListView.ReadOnly := Value; - DataSetChange; - end; -end; - -procedure TcxCustomListView.SetHideSelection(Value: Boolean); -begin - InnerListView.HideSelection := Value; -end; - -procedure TcxCustomListView.SetMultiSelect(Value: Boolean); -begin - InnerListView.MultiSelect := Value; -end; - -procedure TcxCustomListView.SetOwnerData(Value: Boolean); -begin - InnerListView.OwnerData := Value; -end; - -procedure TcxCustomListView.SetOwnerDraw(Value: Boolean); -begin - FOwnerDraw := Value; - InnerListView.OwnerDraw := Value; -end; - -procedure TcxCustomListView.SetRowSelect(Value: Boolean); -begin - InnerListView.RowSelect := Value; -end; - -procedure TcxCustomListView.SetShowColumnHeaders(Value: Boolean); -begin - InnerListView.ShowColumnHeaders := Value; -end; - -procedure TcxCustomListView.SetColumnClick(Value: Boolean); -begin - InnerListView.ColumnClick := Value; -end; - -function TcxCustomListView.GetReadOnly: Boolean; -begin - Result := InnerListView.ReadOnly; -end; - -function TcxCustomListView.AlphaSort: Boolean; -begin - Result := InnerListView.AlphaSort; -end; - -procedure TcxCustomListView.Arrange(Code: TListArrangement); -begin - InnerListView.Arrange(Code); -end; - -{$IFDEF DELPHI6} -procedure TcxCustomListView.CopySelection(Destination: TCustomListControl); -begin - InnerListView.CopySelection(Destination); -end; -{$ENDIF} - -function TcxCustomListView.FindCaption(StartIndex: Integer; Value: string; - Partial, Inclusive, Wrap: Boolean): TListItem; -begin - Result := InnerListView.FindCaption(StartIndex, Value, Partial, Inclusive, Wrap); -end; - -function TcxCustomListView.FindData(StartIndex: Integer; Value: Pointer; - Inclusive, Wrap: Boolean): TListItem; -begin - Result := InnerListView.FindData(StartIndex, Value, Inclusive, Wrap); -end; - -function TcxCustomListView.GetHitTestInfoAt(X, Y: Integer): THitTests; -begin - Result := InnerListView.GetHitTestInfoAt(X, Y); -end; - -function TcxCustomListView.GetItemAt(X, Y: Integer): TListItem; -begin - Result := InnerListView.GetItemAt(X, Y); -end; - -function TcxCustomListView.GetNearestItem(Point: TPoint; Direction: TSearchDirection): TListItem; -begin - Result := InnerListView.GetNearestItem(Point, Direction); -end; - -function TcxCustomListView.GetNextItem(StartItem: TListItem; - Direction: TSearchDirection; States: TItemStates): TListItem; -begin - Result := InnerListView.GetNextItem(StartItem, Direction, States); -end; - -function TcxCustomListView.GetSearchString: string; -begin - Result := InnerListView.GetSearchString; -end; - -function TcxCustomListView.IsEditing: Boolean; -begin - Result := InnerListView.IsEditing; -end; - -{$IFDEF DELPHI6} -procedure TcxCustomListView.SelectAll; -begin - InnerListView.SelectAll; -end; -{$ENDIF} - -function TcxCustomListView.CustomSort(SortProc: TLVCompare; - lParam: Longint): Boolean; -begin - Result := InnerListView.CustomSort(SortProc, lParam); -end; - -function TcxCustomListView.StringWidth(S: string): Integer; -begin - Result := InnerListView.StringWidth(S); -end; - -procedure TcxCustomListView.UpdateItems(FirstIndex, LastIndex: Integer); -begin - InnerListView.UpdateItems(FirstIndex, LastIndex); -end; - -function TcxCustomListView.GetListItems: TListItems; -begin - Result := InnerListView.Items; -end; - -procedure TcxCustomListView.SetListItems(Value: TListItems); -begin - InnerListView.Items := Value; -end; - -function TcxCustomListView.CanChange(Item: TListItem; Change: Integer): Boolean; -begin - Result := InnerListView.CanChange(Item, Change); -end; - -function TcxCustomListView.CanEdit(Item: TListItem): Boolean; -begin - Result := InnerListView.CanEdit(Item); -end; - -procedure TcxCustomListView.ChangeScale(M, D: Integer); -begin - inherited ChangeScale(M, D); - InnerListView.ChangeScale(M, D); -end; - -function TcxCustomListView.ColumnsShowing: Boolean; -begin - Result := InnerListView.ColumnsShowing; -end; - -function TcxCustomListView.GetCount: Integer; -begin -{$IFDEF DELPHI6} - Result := InnerListView.GetCount; -{$ELSE} - Result := InnerListView.Items.Count; -{$ENDIF} -end; - -function TcxCustomListView.GetItemIndex(Value: TListItem): Integer; -begin - Result := InnerListView.GetItemIndex(Value); -end; - -{$IFDEF DELPHI6} -function TcxCustomListView.GetItemIndex: Integer; -begin - Result := InnerListView.GetItemIndex; -end; - -function TcxCustomListView.GetListViewItemIndex: Integer; -begin - Result := GetItemIndex; -end; -{$ENDIF} - -{$IFDEF DELPHI6} -procedure TcxCustomListView.SetItemIndex(Value: Integer); -begin - InnerListView.SetItemIndex(Value); -end; -{$ENDIF} - -procedure TcxCustomListView.SetViewStyle(Value: TViewStyle); -begin - InnerListView.ViewStyle := Value; - SetScrollBarsParameters; -end; - -procedure TcxCustomListView.UpdateColumn(AnIndex: Integer); -begin - InnerListView.UpdateColumn(AnIndex); -end; - -procedure TcxCustomListView.UpdateColumns; -begin - InnerListView.UpdateColumns; -end; - -function TcxCustomListView.GetListColumns: TListColumns; -begin - Result := InnerListView.Columns; -end; - -function TcxCustomListView.GetListViewCanvas: TcxCanvas; -begin - Result := InnerListView.Canvas; -end; - -procedure TcxCustomListView.SetListColumns(Value: TListColumns); -begin - InnerListView.Columns := Value; -end; - -function TcxCustomListView.GetColumnClick: Boolean; -begin - Result := InnerListView.ColumnClick; -end; - -function TcxCustomListView.GetHideSelection: Boolean; -begin - Result := InnerListView.HideSelection; -end; - -function TcxCustomListView.GetIconOptions: TcxIconOptions; -begin - Result := FIconOptions; -end; - -procedure TcxCustomListView.SetIconOptions(Value: TcxIconOptions); -begin - FIconOptions := Value; - UpdateIconOptions; -end; - -function TcxCustomListView.GetAllocBy: Integer; -begin - Result := InnerListView.AllocBy; -end; - -procedure TcxCustomListView.SetAllocBy(Value: Integer); -begin - InnerListView.AllocBy := Value; -end; - -function TcxCustomListView.GetHoverTime: Integer; -begin - Result := InnerListView.HoverTime; -end; - -procedure TcxCustomListView.SetHoverTime(Value: Integer); -begin - InnerListView.HoverTime := Value; -end; - -function TcxCustomListView.GetLargeImages: TCustomImageList; -begin - Result := InnerListView.LargeImages; -end; - -procedure TcxCustomListView.SetLargeImages(Value: TCustomImageList); -begin - InnerListView.LargeImages := Value; -end; - -function TcxCustomListView.GetMultiSelect: Boolean; -begin - Result := InnerListView.MultiSelect; -end; - -function TcxCustomListView.GetOwnerData: Boolean; -begin - Result := InnerListView.OwnerData; -end; - -function TcxCustomListView.GetOwnerDraw: Boolean; -begin - Result := InnerListView.OwnerDraw; -end; - -function TcxCustomListView.GetOnAdvancedCustomDraw: TLVAdvancedCustomDrawEvent; -begin - Result := InnerListView.OnAdvancedCustomDraw; -end; - -procedure TcxCustomListView.SetOnAdvancedCustomDraw(Value: TLVAdvancedCustomDrawEvent); -begin - InnerListView.OnAdvancedCustomDraw := Value; -end; - -function TcxCustomListView.GetOnAdvancedCustomDrawItem: TLVAdvancedCustomDrawItemEvent; -begin - Result := InnerListView.OnAdvancedCustomDrawItem; -end; - -procedure TcxCustomListView.SetOnAdvancedCustomDrawItem(Value: TLVAdvancedCustomDrawItemEvent); -begin - InnerListView.OnAdvancedCustomDrawItem := Value; -end; - -function TcxCustomListView.GetOnAdvancedCustomDrawSubItem: TLVAdvancedCustomDrawSubItemEvent; -begin - Result := InnerListView.OnAdvancedCustomDrawSubItem; -end; - -procedure TcxCustomListView.SetOnAdvancedCustomDrawSubItem(Value: TLVAdvancedCustomDrawSubItemEvent); -begin - InnerListView.OnAdvancedCustomDrawSubItem := Value; -end; - -function TcxCustomListView.GetOnChange: TLVChangeEvent; -begin - Result := InnerListView.OnChange; -end; - -procedure TcxCustomListView.SetOnChange(Value: TLVChangeEvent); -begin - InnerListView.OnChange := Value; -end; - -function TcxCustomListView.GetOnChanging: TLVChangingEvent; -begin - Result := InnerListView.OnChanging; -end; - -procedure TcxCustomListView.SetOnChanging(Value: TLVChangingEvent); -begin - InnerListView.OnChanging := Value; -end; - -function TcxCustomListView.GetOnColumnClick: TLVColumnClickEvent; -begin - Result := InnerListView.OnColumnClick; -end; - -procedure TcxCustomListView.SetOnColumnClick(Value: TLVColumnClickEvent); -begin - InnerListView.OnColumnClick := Value; -end; - -function TcxCustomListView.GetOnColumnDragged: TNotifyEvent; -begin - Result := InnerListView.OnColumnDragged; -end; - -procedure TcxCustomListView.SetOnColumnDragged(Value: TNotifyEvent); -begin - InnerListView.OnColumnDragged := Value; -end; - -function TcxCustomListView.GetOnColumnRightClick: TLVColumnRClickEvent; -begin - Result := InnerListView.OnColumnRightClick; -end; - -procedure TcxCustomListView.SetOnColumnRightClick(Value: TLVColumnRClickEvent); -begin - InnerListView.OnColumnRightClick := Value; -end; - -function TcxCustomListView.GetOnCompare: TLVCompareEvent; -begin - Result := InnerListView.OnCompare; -end; - -procedure TcxCustomListView.SetOnCompare(Value: TLVCompareEvent); -begin - InnerListView.OnCompare := Value; -end; - -function TcxCustomListView.GetOnCustomDraw: TLVCustomDrawEvent; -begin - Result := InnerListView.OnCustomDraw; -end; - -procedure TcxCustomListView.SetOnCustomDraw(Value: TLVCustomDrawEvent); -begin - InnerListView.OnCustomDraw := Value; -end; - -function TcxCustomListView.GetOnCustomDrawItem: TLVCustomDrawItemEvent; -begin - Result := InnerListView.OnCustomDrawItem; -end; - -procedure TcxCustomListView.SetOnCustomDrawItem(Value: TLVCustomDrawItemEvent); -begin - InnerListView.OnCustomDrawItem := Value; -end; - -function TcxCustomListView.GetOnCustomDrawSubItem: TLVCustomDrawSubItemEvent; -begin - Result := InnerListView.OnCustomDrawSubItem; -end; - -procedure TcxCustomListView.SetOnCustomDrawSubItem(Value: TLVCustomDrawSubItemEvent); -begin - InnerListView.OnCustomDrawSubItem := Value; -end; - -function TcxCustomListView.GetOnData: TLVOwnerDataEvent; -begin - Result := InnerListView.OnData; -end; - -procedure TcxCustomListView.SetOnData(Value: TLVOwnerDataEvent); -begin - InnerListView.OnData := Value; -end; - -function TcxCustomListView.GetOnDataFind: TLVOwnerDataFindEvent; -begin - Result := InnerListView.OnDataFind; -end; - -procedure TcxCustomListView.SetOnDataFind(Value: TLVOwnerDataFindEvent); -begin - InnerListView.OnDataFind := Value; -end; - -function TcxCustomListView.GetOnDataHint: TLVOwnerDataHintEvent; -begin - Result := InnerListView.OnDataHint; -end; - -procedure TcxCustomListView.SetOnDataHint(Value: TLVOwnerDataHintEvent); -begin - InnerListView.OnDataHint := Value; -end; - -function TcxCustomListView.GetOnDataStateChange: TLVOwnerDataStateChangeEvent; -begin - Result := InnerListView.OnDataStateChange; -end; - -procedure TcxCustomListView.SetOnDataStateChange(Value: TLVOwnerDataStateChangeEvent); -begin - InnerListView.OnDataStateChange := Value; -end; - -function TcxCustomListView.GetOnDeletion: TLVDeletedEvent; -begin - Result := InnerListView.OnDeletion; -end; - -procedure TcxCustomListView.SetOnDeletion(Value: TLVDeletedEvent); -begin - InnerListView.OnDeletion := Value; -end; - -function TcxCustomListView.GetOnDrawItem: TLVDrawItemEvent; -begin - Result := InnerListView.OnDrawItem; -end; - -procedure TcxCustomListView.SetOnDrawItem(Value: TLVDrawItemEvent); -begin - InnerListView.OnDrawItem := Value; -end; - -function TcxCustomListView.GetOnEdited: TLVEditedEvent; -begin - Result := InnerListView.OnEdited; -end; - -procedure TcxCustomListView.SetOnEdited(Value: TLVEditedEvent); -begin - InnerListView.OnEdited := Value; -end; - -function TcxCustomListView.GetOnEditing: TLVEditingEvent; -begin - Result := InnerListView.OnEditing; -end; - -procedure TcxCustomListView.SetOnEditing(Value: TLVEditingEvent); -begin - InnerListView.OnEditing := Value; -end; - -function TcxCustomListView.GetOnInfoTip: TLVInfoTipEvent; -begin - Result := InnerListView.OnInfoTip; -end; - -procedure TcxCustomListView.SetOnInfoTip(Value: TLVInfoTipEvent); -begin - InnerListView.OnInfoTip := Value; -end; - -function TcxCustomListView.GetOnInsert: TLVDeletedEvent; -begin - Result := InnerListView.OnInsert; -end; - -procedure TcxCustomListView.SetOnInsert(Value: TLVDeletedEvent); -begin - InnerListView.OnInsert := Value; -end; - -function TcxCustomListView.GetOnGetImageIndex: TLVNotifyEvent; -begin - Result := InnerListView.OnGetImageIndex; -end; - -procedure TcxCustomListView.SetOnGetImageIndex(Value: TLVNotifyEvent); -begin - InnerListView.OnGetImageIndex := Value; -end; - -function TcxCustomListView.GetOnGetSubItemImage: TLVSubItemImageEvent; -begin - Result := InnerListView.OnGetSubItemImage; -end; - -procedure TcxCustomListView.SetOnGetSubItemImage(Value: TLVSubItemImageEvent); -begin - InnerListView.OnGetSubItemImage := Value; -end; - -function TcxCustomListView.GetOnSelectItem: TLVSelectItemEvent; -begin - Result := InnerListView.OnSelectItem; -end; - -procedure TcxCustomListView.SetOnSelectItem(Value: TLVSelectItemEvent); -begin - InnerListView.OnSelectItem := Value; -end; - -function TcxCustomListView.GetShowColumnHeaders: Boolean; -begin - Result := InnerListView.ShowColumnHeaders; -end; - -function TcxCustomListView.GetShowWorkAreas: Boolean; -begin - Result := InnerListView.ShowWorkAreas; -end; - -procedure TcxCustomListView.SetShowWorkAreas(Value: Boolean); -begin - InnerListView.ShowWorkAreas := Value; -end; - -function TcxCustomListView.GetSmallImages: TCustomImageList; -begin - Result := InnerListView.SmallImages; -end; - -procedure TcxCustomListView.SetSmallImages(Value: TCustomImageList); -begin - InnerListView.SmallImages := Value; -end; - -function TcxCustomListView.GetSortType: TSortType; -begin - Result := InnerListView.SortType; -end; - -procedure TcxCustomListView.SetSortType(Value: TSortType); -begin - InnerListView.SortType := Value; -end; - -function TcxCustomListView.GetStateImages: TCustomImageList; -begin - Result := InnerListView.StateImages; -end; - -procedure TcxCustomListView.SetStateImages(Value: TCustomImageList); -begin - InnerListView.StateImages := Value; -end; - -function TcxCustomListView.GetViewStyle: TViewStyle; -begin - Result := InnerListView.ViewStyle; -end; - -{$IFDEF DELPHI6} -function TcxCustomListView.GetOnCreateItemClass: TLVCreateItemClassEvent; -begin - Result := InnerListView.OnCreateItemClass; -end; - -procedure TcxCustomListView.SetOnCreateItemClass(Value: TLVCreateItemClassEvent); -begin - InnerListView.OnCreateItemClass := Value; -end; -{$ENDIF} - -function TcxCustomListView.GetCheckBoxes: Boolean; -begin - Result := InnerListView.Checkboxes; -end; - -function TcxCustomListView.GetColumnFromIndex(Index: Integer): TListColumn; -begin - Result := InnerListView.Column[Index]; -end; - -function TcxCustomListView.GetDropTarget: TListItem; -begin - Result := InnerListView.DropTarget; -end; - -function TcxCustomListView.GetFullDrag: Boolean; -begin - Result := InnerListView.FullDrag; -end; - -function TcxCustomListView.GetGridLines: Boolean; -begin - Result := InnerListView.GridLines; -end; - -function TcxCustomListView.GetHotTrack: Boolean; -begin - Result := InnerListView.HotTrack; -end; - -function TcxCustomListView.GetHotTrackStyles: TListHotTrackStyles; -begin - Result := InnerListView.HotTrackStyles; -end; - -function TcxCustomListView.GetItemFocused: TListItem; -begin - Result := InnerListView.ItemFocused; -end; - -function TcxCustomListView.GetRowSelect: Boolean; -begin - Result := InnerListView.RowSelect; -end; - -function TcxCustomListView.GetSelCount: Integer; -begin - Result := InnerListView.SelCount; -end; - -function TcxCustomListView.GetSelected: TListItem; -begin - Result := InnerListView.Selected; -end; - -function TcxCustomListView.GetTopItem: TListItem; -begin - Result := InnerListView.TopItem; -end; - -function TcxCustomListView.GetViewOrigin: TPoint; -begin - Result := InnerListView.ViewOrigin; -end; - -function TcxCustomListView.GetVisibleRowCount: Integer; -begin - Result := InnerListView.VisibleRowCount; -end; - -function TcxCustomListView.GetBoundingRect: TRect; -begin - Result := InnerListView.BoundingRect; -end; - -function TcxCustomListView.GetWorkAreas: TWorkAreas; -begin - Result := InnerListView.WorkAreas; -end; - -procedure TcxCustomListView.SetCheckboxes(Value: Boolean); -begin - InnerListView.Checkboxes := value; -end; - -procedure TcxCustomListView.SetDropTarget(Value: TListItem); -begin - InnerListView.DropTarget := Value; -end; - -procedure TcxCustomListView.SetFullDrag(Value: Boolean); -begin - InnerListView.FullDrag := Value; -end; - -procedure TcxCustomListView.SetGridLines(Value: Boolean); -begin - InnerListView.GridLines := Value; -end; - -procedure TcxCustomListView.SetHotTrack(Value: Boolean); -begin - InnerListView.HotTrack := Value; -end; - -procedure TcxCustomListView.SetHotTrackStyles(Value: TListHotTrackStyles); -begin - InnerListView.HotTrackStyles := Value; -end; - -procedure TcxCustomListView.SetItemFocused(Value: TListItem); -begin - InnerListView.ItemFocused := Value; -end; - -procedure TcxCustomListView.SetSelected(Value: TListItem); -begin - InnerListView.Selected := Value; -end; - -procedure TcxCustomListView.ArrangementChangeHandler(Sender: TObject); -begin - if Assigned(InnerListView) then - InnerListView.IconOptions.Arrangement := FIconOptions.Arrangement; -end; - -procedure TcxCustomListView.AutoArrangeChangeHandler(Sender: TObject); -begin - if Assigned(InnerListView) then - InnerListView.IconOptions.AutoArrange := FIconOptions.AutoArrange; -end; - -procedure TcxCustomListView.WrapTextChangeHandler(Sender: TObject); -begin - if Assigned(InnerListView) then - InnerListView.IconOptions.WrapText := FIconOptions.WrapText; -end; -{ TcxCustomListView } - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxLookupDBGrid.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxLookupDBGrid.pas deleted file mode 100644 index a4103c53..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxLookupDBGrid.pas +++ /dev/null @@ -1,525 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxLookupDBGrid; - -{$I cxVer.inc} - -interface - -uses - Windows, - SysUtils, Classes, Controls, Graphics, Forms, StdCtrls, DB, - cxClasses, cxControls, cxGraphics, cxLookAndFeelPainters, - cxEdit, cxDBEdit, cxCustomData, cxDB, cxDBData, cxEditRepositoryItems, - cxLookupGrid; - -const - DefaultSyncMode = False; - -type - TcxCustomLookupDBGrid = class; - - { TcxLookupGridDBDataController } - - TcxLookupGridDBDataController = class(TcxDBDataController) - private - function GetGrid: TcxCustomLookupDBGrid; - protected - procedure UpdateScrollBars; override; - public - constructor Create(AOwner: TComponent); override; - function GetItem(Index: Integer): TObject; override; - property Grid: TcxCustomLookupDBGrid read GetGrid; - published - property OnCompare; - end; - - { TcxLookupDBGridColumn } - - TcxLookupDBGridDefaultValuesProvider = class(TcxCustomDBEditDefaultValuesProvider) - function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; override; - end; - - TcxLookupDBGridColumn = class(TcxLookupGridColumn) - private - function GetDataController: TcxLookupGridDBDataController; - function GetField: TField; - function GetFieldName: string; - procedure SetFieldName(const Value: string); - protected - function GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; override; - procedure InitDefaultValuesProvider; - property DataController: TcxLookupGridDBDataController read GetDataController; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - function DefaultRepositoryItem: TcxEditRepositoryItem; override; - function DefaultWidth: Integer; override; - property Field: TField read GetField; - published - property FieldName: string read GetFieldName write SetFieldName; - end; - - { TcxLookupDBGridColumns } - - TcxLookupDBGridColumns = class(TcxLookupGridColumns) - private - function GetColumn(Index: Integer): TcxLookupDBGridColumn; - procedure SetColumn(Index: Integer; Value: TcxLookupDBGridColumn); - public - function Add: TcxLookupDBGridColumn; - function ColumnByFieldName(const AFieldName: string): TcxLookupDBGridColumn; - property Items[Index: Integer]: TcxLookupDBGridColumn read GetColumn write SetColumn; default; - end; - - { TcxLookupDBGridOptions } - - TcxLookupDBGridOptions = class(TcxLookupGridOptions) - private - function GetGrid: TcxCustomLookupDBGrid; - function GetSyncMode: Boolean; - procedure SetSyncMode(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - property Grid: TcxCustomLookupDBGrid read GetGrid; - published - property SyncMode: Boolean read GetSyncMode write SetSyncMode - default DefaultSyncMode; - end; - - { TcxCustomLookupDBGrid } - - TcxCustomLookupDBGrid = class(TcxCustomLookupGrid) - private - function GetColumns: TcxLookupDBGridColumns; - function GetDataController: TcxLookupGridDBDataController; - function GetDataSource: TDataSource; - function GetKeyFieldNames: string; - function GetOptions: TcxLookupDBGridOptions; - procedure SetColumns(Value: TcxLookupDBGridColumns); - procedure SetDataController(Value: TcxLookupGridDBDataController); - procedure SetDataSource(Value: TDataSource); - procedure SetKeyFieldNames(const Value: string); - procedure SetOptions(Value: TcxLookupDBGridOptions); - protected - procedure CreateColumnsByFields(AFieldNames: TStrings); virtual; - procedure DataChanged; override; - function GetColumnClass: TcxLookupGridColumnClass; override; - function GetColumnsClass: TcxLookupGridColumnsClass; override; - function GetDataControllerClass: TcxCustomDataControllerClass; override; - function GetOptionsClass: TcxLookupGridOptionsClass; override; - procedure InitScrollBarsParameters; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; var AScrollPos: Integer); override; - procedure UpdateScrollBars; override; // for Delphi .NET - public - procedure CreateAllColumns; - procedure CreateColumnsByFieldNames(const AFieldNames: string); - property Align; - property Anchors; - property Color; - property Columns: TcxLookupDBGridColumns read GetColumns write SetColumns; - property DataController: TcxLookupGridDBDataController read GetDataController write SetDataController; - property Font; - property LookAndFeel; - property Options: TcxLookupDBGridOptions read GetOptions write SetOptions; - property ParentFont; - property Visible; - published - property DataSource: TDataSource read GetDataSource write SetDataSource; - property KeyFieldNames: string read GetKeyFieldNames write SetKeyFieldNames; - end; - - TcxCustomLookupDBGridClass = class of TcxCustomLookupDBGrid; - -implementation - -uses - cxEditDBRegisteredRepositoryItems; - -function TcxLookupDBGridDefaultValuesProvider.IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; -begin - with TcxLookupDBGridColumn(Owner) do - Result := DataController.GetItemTextStored(Index); -end; - -{ TcxLookupDBGridColumn } - -procedure TcxLookupDBGridColumn.Assign(Source: TPersistent); -begin - if Source is TcxLookupDBGridColumn then - FieldName := TcxLookupDBGridColumn(Source).FieldName; - inherited Assign(Source); -end; - -function TcxLookupDBGridColumn.DefaultCaption: string; -var - AField: TField; -begin - AField := Field; - if AField = nil then - Result := FieldName - else - Result := AField.DisplayName; -end; - -function TcxLookupDBGridColumn.DefaultRepositoryItem: TcxEditRepositoryItem; -begin - Result := GetDefaultEditDBRepositoryItems.GetItemByField(Field); -end; - -function TcxLookupDBGridColumn.DefaultWidth: Integer; -var - AField: TField; - ACanvas: TcxCanvas; - W: Integer; -begin - AField := Field; - if AField = nil then - Result := inherited DefaultWidth - else - begin - ACanvas := Grid.ViewInfo.Canvas; - ACanvas.Font := GetContentFont; - Result := AField.DisplayWidth * ACanvas.TextWidth('0') + 4; - if Grid.Options.ShowHeader then - begin - W := Grid.Painter.LFPainterClass.HeaderWidth(ACanvas, cxBordersAll, Caption, - Grid.ViewInfo.GetHeaderFont); - if W > Result then Result := W; - end; - end; - CheckWidthValue(Result); -end; - -function TcxLookupDBGridColumn.GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; -begin - Result := TcxLookupDBGridDefaultValuesProvider; -end; - -procedure TcxLookupDBGridColumn.InitDefaultValuesProvider; -begin - TcxCustomDBEditDefaultValuesProvider(DefaultValuesProvider.GetInstance).Field := Field; -end; - -function TcxLookupDBGridColumn.GetDataController: TcxLookupGridDBDataController; -begin - Result := TcxLookupGridDBDataController(inherited DataController); -end; - -function TcxLookupDBGridColumn.GetField: TField; -begin - Result := DataController.GetItemField(Index); -end; - -function TcxLookupDBGridColumn.GetFieldName: string; -begin - Result := DataController.GetItemFieldName(Index); -end; - -procedure TcxLookupDBGridColumn.SetFieldName(const Value: string); -begin - DataController.ChangeFieldName(Index, Value); -end; - -{ TcxLookupDBGridColumns } - -function TcxLookupDBGridColumns.Add: TcxLookupDBGridColumn; -begin - Result := inherited Add as TcxLookupDBGridColumn; -end; - -function TcxLookupDBGridColumns.ColumnByFieldName(const AFieldName: string): TcxLookupDBGridColumn; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if AnsiCompareText(Result.FieldName, AFieldName) = 0 then - Exit; - end; - Result := nil; -end; - -function TcxLookupDBGridColumns.GetColumn(Index: Integer): TcxLookupDBGridColumn; -begin - Result := inherited Items[Index] as TcxLookupDBGridColumn; -end; - -procedure TcxLookupDBGridColumns.SetColumn(Index: Integer; Value: TcxLookupDBGridColumn); -begin - inherited Items[Index] := Value; -end; - -{ TcxLookupGridDBDataController } - -constructor TcxLookupGridDBDataController.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - DataModeController.SyncMode := DefaultSyncMode; - DataModeController.SyncInsert := False; -end; - -function TcxLookupGridDBDataController.GetItem(Index: Integer): TObject; -begin - Result := Grid.Columns[Index]; -end; - -procedure TcxLookupGridDBDataController.UpdateScrollBars; -begin - Grid.UpdateScrollBars; -end; - -function TcxLookupGridDBDataController.GetGrid: TcxCustomLookupDBGrid; -begin - Result := GetOwner as TcxCustomLookupDBGrid; -end; - -{ TcxLookupDBGridOptions } - -procedure TcxLookupDBGridOptions.Assign(Source: TPersistent); -begin - if Source is TcxLookupDBGridOptions then - begin - if Assigned(Grid) then - Grid.BeginUpdate; - try - inherited Assign(Source); - SyncMode := TcxLookupDBGridOptions(Source).SyncMode; - finally - if Assigned(Grid) then - Grid.EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -function TcxLookupDBGridOptions.GetGrid: TcxCustomLookupDBGrid; -begin - Result := TcxCustomLookupDBGrid(FGrid); -end; - -function TcxLookupDBGridOptions.GetSyncMode: Boolean; -begin - if Assigned(Grid) then - Result := Grid.DataController.DataModeController.SyncMode - else - Result := DefaultSyncMode; -end; - -procedure TcxLookupDBGridOptions.SetSyncMode(Value: Boolean); -begin - if Assigned(Grid) then - Grid.DataController.DataModeController.SyncMode := Value; -end; - -{ TcxCustomLookupDBGrid } - -procedure TcxCustomLookupDBGrid.CreateAllColumns; -var - ADataSet: TDataSet; - AFieldNames: TStrings; -begin - Columns.Clear; - ADataSet := DataController.DataSet; - if ADataSet <> nil then - begin - AFieldNames := TStringList.Create; - try - {$WARNINGS OFF} { for Borland Delphi 10 } - ADataSet.GetFieldNames(AFieldNames); - {$WARNINGS ON} - CreateColumnsByFields(AFieldNames); - finally - AFieldNames.Free; - end; - end; -end; - -procedure TcxCustomLookupDBGrid.CreateColumnsByFieldNames(const AFieldNames: string); -var - AFieldNamesList: TStrings; -begin - Columns.Clear; - AFieldNamesList := TStringList.Create; - try - GetFieldNames(AFieldNames, AFieldNamesList); - CreateColumnsByFields(AFieldNamesList); - finally - AFieldNamesList.Free; - end; -end; - -procedure TcxCustomLookupDBGrid.CreateColumnsByFields(AFieldNames: TStrings); -var - I: Integer; -begin - BeginUpdate; - try - for I := 0 to AFieldNames.Count - 1 do - Columns.Add.FieldName := AFieldNames[I]; - finally - EndUpdate; - end; -end; - -procedure TcxCustomLookupDBGrid.DataChanged; -var - I: Integer; -begin - for I := 0 to Columns.Count - 1 do - Columns[I].InitDefaultValuesProvider; - inherited DataChanged; -end; - -function TcxCustomLookupDBGrid.GetColumnClass: TcxLookupGridColumnClass; -begin - Result := TcxLookupDBGridColumn; -end; - -function TcxCustomLookupDBGrid.GetColumnsClass: TcxLookupGridColumnsClass; -begin - Result := TcxLookupDBGridColumns; -end; - -function TcxCustomLookupDBGrid.GetDataControllerClass: TcxCustomDataControllerClass; -begin - Result := TcxLookupGridDBDataController; -end; - -function TcxCustomLookupDBGrid.GetOptionsClass: TcxLookupGridOptionsClass; -begin - Result := TcxLookupDBGridOptions; -end; - -procedure TcxCustomLookupDBGrid.InitScrollBarsParameters; -begin - if DataController.IsGridMode and DataController.IsSequenced then - begin - SetScrollBarInfo(sbVertical, 0, - (DataController.DataSetRecordCount - 1) + (ViewInfo.VisibleRowCount - 1), - 1, ViewInfo.VisibleRowCount, DataController.RecNo - 1, True, True); - end - else - inherited InitScrollBarsParameters; -end; - -procedure TcxCustomLookupDBGrid.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -begin - if DataController.IsGridMode and DataController.IsSequenced then - begin - if AScrollBarKind = sbVertical then - begin - case AScrollCode of - scLineUp: - FocusNextRow(False); - scLineDown: - FocusNextRow(True); - scPageUp: - FocusPriorPage; - scPageDown: - FocusNextPage; - scTrack: ; - scPosition: - DataController.RecNo := AScrollPos + 1; - end; - end - else - inherited Scroll(AScrollBarKind, AScrollCode, AScrollPos); - AScrollPos := DataController.RecNo - 1; - end - else - inherited Scroll(AScrollBarKind, AScrollCode, AScrollPos); -end; - -procedure TcxCustomLookupDBGrid.UpdateScrollBars; -begin - inherited UpdateScrollBars; -end; - -function TcxCustomLookupDBGrid.GetColumns: TcxLookupDBGridColumns; -begin - Result := inherited Columns as TcxLookupDBGridColumns; -end; - -function TcxCustomLookupDBGrid.GetDataController: TcxLookupGridDBDataController; -begin - Result := TcxLookupGridDBDataController(FDataController); -end; - -function TcxCustomLookupDBGrid.GetDataSource: TDataSource; -begin - Result := DataController.DataSource; -end; - -function TcxCustomLookupDBGrid.GetKeyFieldNames: string; -begin - Result := DataController.KeyFieldNames; -end; - -function TcxCustomLookupDBGrid.GetOptions: TcxLookupDBGridOptions; -begin - Result := TcxLookupDBGridOptions(FOptions); -end; - -procedure TcxCustomLookupDBGrid.SetColumns(Value: TcxLookupDBGridColumns); -begin - inherited Columns := Value; -end; - -procedure TcxCustomLookupDBGrid.SetDataController(Value: TcxLookupGridDBDataController); -begin - FDataController.Assign(Value); -end; - -procedure TcxCustomLookupDBGrid.SetDataSource(Value: TDataSource); -begin - DataController.DataSource := Value; -end; - -procedure TcxCustomLookupDBGrid.SetKeyFieldNames(const Value: string); -begin - DataController.KeyFieldNames := Value; -end; - -procedure TcxCustomLookupDBGrid.SetOptions(Value: TcxLookupDBGridOptions); -begin - FOptions.Assign(Value); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxLookupEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxLookupEdit.pas deleted file mode 100644 index 7a40dd22..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxLookupEdit.pas +++ /dev/null @@ -1,1185 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxLookupEdit; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Messages, SysUtils, Classes, Controls, Graphics, Forms, - cxClasses, cxGraphics, cxControls, cxContainer, cxLookAndFeels, - cxEdit, cxTextEdit, cxDropDownEdit, cxDataUtils, cxCustomData; - -type - TcxCustomLookupEdit = class; - TcxCustomLookupEditProperties = class; - - { TcxCustomLookupEditLookupData } - - TcxLookupGridCloseUpEvent = procedure (Sender: TObject; AAccept: Boolean) of object; - - TcxCustomLookupEditLookupData = class(TcxInterfacedPersistent, - IUnknown, IcxTextEditLookupData) - private - FOwner: TPersistent; - FVisible: Boolean; - FOnCurrentKeyChanged: TNotifyEvent; - FOnSelectItem: TNotifyEvent; - function GetDataController: TcxCustomDataController; - function GetEdit: TcxCustomLookupEdit; - function GetFocusedRecordIndex: Integer; - function GetListIndex: Integer; - function GetProperties: TcxCustomLookupEditProperties; - protected - FCurrentKey: Variant; - function GetOwner: TPersistent; override; - // IcxTextEditLookupData - function CanResizeVisualArea(var NewSize: TSize; - AMaxHeight: Integer = 0; AMaxWidth: Integer = 0): Boolean; virtual; - procedure CloseUp; virtual; - procedure Deinitialize; virtual; - procedure DropDown; virtual; - procedure DroppedDown(const AFindStr: string); virtual; - function Find(const AText: string): Boolean; virtual; - function GetActiveControl: TControl; - function GetCurrentKey: TcxEditValue; virtual; - function GetDisplayText(const AKey: TcxEditValue): string; virtual; - function GetOnCurrentKeyChanged: TNotifyEvent; - function GetOnSelectItem: TNotifyEvent; - function GetVisualAreaPreferredSize(AMaxHeight: Integer; AWidth: Integer = 0): TSize; - procedure Go(ADirection: TcxEditLookupDataGoDirection; ACircular: Boolean); virtual; - procedure Initialize(AVisualControlsParent: TWinControl); - function IsEmpty: Boolean; virtual; - function IsMouseOverList(const P: TPoint): Boolean; - function Locate(var AText, ATail: string; ANext: Boolean): Boolean; virtual; - procedure PositionVisualArea(const AClientRect: TRect); - procedure PropertiesChanged; virtual; - procedure SelectItem; virtual; - procedure SetCurrentKey(const AKey: TcxEditValue); virtual; - procedure SetOnCurrentKeyChanged(Value: TNotifyEvent); - procedure SetOnSelectItem(Value: TNotifyEvent); - procedure TextChanged; virtual; - - procedure DoCurrentKeyChanged; virtual; - procedure DoSelectItem; virtual; - procedure DoSetCurrentKey(ARecordIndex: Integer); virtual; - procedure DoSetKeySelection(AKeySelected: Boolean); - procedure DoSyncGrid; virtual; - procedure GridClick(Sender: TObject); virtual; - procedure GridCloseUp(Sender: TObject; AAccept: Boolean); virtual; - procedure GridFocusedRowChanged(Sender: TObject); virtual; - function IsKeySelected: Boolean; virtual; - function LocateText(const AText: string): Boolean; virtual; - procedure ResetIncrementalFilter; virtual; - procedure SyncGrid; virtual; - procedure SyncSelected; virtual; - procedure UpdateDropDownCount; virtual; - property DataController: TcxCustomDataController read GetDataController; - property Edit: TcxCustomLookupEdit read GetEdit; - property FocusedRecordIndex: Integer read GetFocusedRecordIndex; - property Properties: TcxCustomLookupEditProperties read GetProperties; - public - constructor Create(AOwner: TPersistent); override; - procedure DisableChanging; - procedure EnableChanging; - end; - - { TcxCustomLookupEditProperties } - - TcxCustomLookupEditProperties = class(TcxCustomComboBoxProperties) - private - FDisplayColumnIndex: Integer; - FLockCount: Integer; - FImmediateUpdateText: Boolean; - FInGridDataChanged: Boolean; - FIncrementalFiltering: Boolean; - function GetDataController: TcxCustomDataController; - function GetDropDownAutoSize: Boolean; - function GetDropDownHeight: Integer; - function GetDropDownSizeable: Boolean; - function GetDropDownWidth: Integer; - procedure SetDropDownAutoSize(Value: Boolean); - procedure SetDropDownHeight(Value: Integer); - procedure SetDropDownSizeable(Value: Boolean); - procedure SetDropDownWidth(Value: Integer); - protected - // LookupGrid methods - function GetLookupGridActiveControl: TWinControl; virtual; - function GetLookupGridCanResize: Boolean; virtual; - function GetLookupGridColumnCount: Integer; virtual; - function GetLookupGridControl: TWinControl; virtual; - function GetLookupGridDataController: TcxCustomDataController; virtual; - function GetLookupGridVisualAreaPreferredWidth: Integer; virtual; - function GetLookupGridNearestPopupHeight(AHeight: Integer): Integer; virtual; - function GetLookupGridPopupHeight(ADropDownRowCount: Integer): Integer; virtual; - function IsLookupGridMouseOverList(const P: TPoint): Boolean; virtual; - procedure LookupGridDeinitialize; virtual; // IsPopup := False - procedure LookupGridDroppedDown(const AFindStr: string); virtual; - procedure LookupGridInitEvents(AOnClick, AOnFocusedRowChanged: TNotifyEvent; AOnCloseUp: TcxLookupGridCloseUpEvent); virtual; - procedure LookupGridInitialize; virtual; // IsPopup := True - procedure LookupGridInitLookAndFeel(ALookAndFeel: TcxLookAndFeel; AColor: TColor; AFont: TFont); virtual; - procedure LookupGridLockMouseMove; virtual; - procedure LookupGridMakeFocusedRowVisible; virtual; - procedure LookupGridUnlockMouseMove; virtual; - - procedure CheckDisplayColumnIndex; - procedure DeinitializeDataController; virtual; - function FindByText(AItemIndex: Integer; const AText: string; APartialCompare: Boolean): Integer; virtual; - function FindLookupText(const AText: string): Boolean; override; - function GetDisplayColumnIndex: Integer; virtual; - function GetDisplayFormatOptions: TcxEditDisplayFormatOptions; override; - function GetDisplayLookupText(const AKey: TcxEditValue): string; virtual; - function GetIncrementalFiltering: Boolean; virtual; - function GetListIndex: Integer; virtual; - class function GetLookupDataClass: TcxInterfacedPersistentClass; override; - function GetNullKey: Variant; virtual; - procedure GridDataChanged(Sender: TObject); virtual; - procedure InitializeDataController; virtual; - function IsChangeLocked: Boolean; virtual; - function IsDataChangedPostponed: Boolean; virtual; - function IsEditValueConversionDependOnFocused: Boolean; override; - function IsPickMode: Boolean; virtual; - function IsPopupKey(Key: Word; Shift: TShiftState): Boolean; override; - procedure LockDataChanged; virtual; - procedure SetDisplayColumnIndex(Value: Integer); virtual; - procedure UnlockDataChanged; virtual; - procedure UnlinkLookupGridControlParent; virtual; - property DataController: TcxCustomDataController read GetDataController; - property DisplayColumnIndex: Integer read GetDisplayColumnIndex write SetDisplayColumnIndex default 0; - property ImmediateUpdateText: Boolean read FImmediateUpdateText write FImmediateUpdateText default False; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - function IsDefinedByLookup: Boolean; virtual; - function IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - function IsLookupField: Boolean; virtual; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; - AEditFocused: Boolean); override; - property DropDownAutoSize: Boolean read GetDropDownAutoSize write SetDropDownAutoSize default False; - property DropDownHeight: Integer read GetDropDownHeight write SetDropDownHeight default 0; - property DropDownListStyle default lsEditFixedList; - property DropDownSizeable: Boolean read GetDropDownSizeable write SetDropDownSizeable default False; - property DropDownWidth: Integer read GetDropDownWidth write SetDropDownWidth default 0; - property IncrementalFiltering: Boolean read FIncrementalFiltering write FIncrementalFiltering default True; - end; - - { TcxCustomLookupEdit } - - TcxCustomLookupEdit = class(TcxCustomComboBox) - private - function GetILookupData: IcxTextEditLookupData; - function GetLookupData: TcxCustomLookupEditLookupData; - function GetProperties: TcxCustomLookupEditProperties; - function GetActiveProperties: TcxCustomLookupEditProperties; - procedure SetLookupData(Value: TcxCustomLookupEditLookupData); - procedure SetProperties(Value: TcxCustomLookupEditProperties); - protected - procedure AfterPosting; override; - procedure BeforePosting; override; - procedure DoShowEdit; override; - procedure DropDown; override; - procedure Initialize; override; - function InternalGetEditingValue: TcxEditValue; override; - function NeedResetInvalidTextWhenPropertiesChanged: Boolean; override; - procedure RepositoryItemAssigning; override; - procedure SynchronizeDisplayValue; override; - property ILookupData: IcxTextEditLookupData read GetILookupData; - property LookupData: TcxCustomLookupEditLookupData read GetLookupData write SetLookupData; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; out EditValue: TcxEditValue; AEditFocused: Boolean); override; - property ActiveProperties: TcxCustomLookupEditProperties read GetActiveProperties; - property Properties: TcxCustomLookupEditProperties read GetProperties - write SetProperties; - end; - -implementation - -// TODO: Field.DisplayText <> Field.AsString <- DataSet.Locate - -{ TcxCustomLookupEditLookupData } - -constructor TcxCustomLookupEditLookupData.Create(AOwner: TPersistent); -begin - inherited Create(nil); - FOwner := AOwner; - FCurrentKey := Null; -end; - -procedure TcxCustomLookupEditLookupData.DisableChanging; -begin - Inc(Properties.FLockCount); -end; - -procedure TcxCustomLookupEditLookupData.EnableChanging; -begin - Dec(Properties.FLockCount); -end; - -function TcxCustomLookupEditLookupData.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -// IcxTextEditLookupData - -function TcxCustomLookupEditLookupData.CanResizeVisualArea(var NewSize: TSize; - AMaxHeight: Integer = 0; AMaxWidth: Integer = 0): Boolean; -begin - if (AMaxHeight > 0) and (NewSize.cy > AMaxHeight) then - NewSize.cy := AMaxHeight; - if Properties.GetLookupGridCanResize then - NewSize.cy := Properties.GetLookupGridNearestPopupHeight(NewSize.cy); - Result := True; -end; - -procedure TcxCustomLookupEditLookupData.CloseUp; -begin - DisableChanging; - try -// if Properties.GetLookupGridControl <> nil then -// Properties.GetLookupGridControl.Parent := nil; - ResetIncrementalFilter; - FVisible := False; - Properties.LookupGridInitEvents(nil, nil, nil); - Properties.LookupGridUnlockMouseMove; - Properties.LookupGridDeinitialize; - Properties.UnlockDataChanged; - finally - EnableChanging; - end; -end; - -procedure TcxCustomLookupEditLookupData.Deinitialize; -begin -// if Properties.GetLookupGridControl <> nil then -// Properties.GetLookupGridControl.Parent := nil; - Properties.UnlinkLookupGridControlParent -end; - -procedure TcxCustomLookupEditLookupData.DropDown; -begin - DisableChanging; - try - Properties.LockDataChanged; - Properties.LookupGridInitialize; - Properties.LookupGridInitEvents(GridClick, GridFocusedRowChanged, GridCloseUp); - Properties.LookupGridInitLookAndFeel(Edit.PopupControlsLookAndFeel, - Edit.GetBackgroundColor, Edit.VisibleFont); - Properties.LookupGridLockMouseMove; - FVisible := True; - SyncGrid; - SyncSelected; - finally - EnableChanging; - end; -end; - -procedure TcxCustomLookupEditLookupData.DroppedDown(const AFindStr: string); -begin - Properties.LookupGridDroppedDown(AFindStr); -end; - -function TcxCustomLookupEditLookupData.Find(const AText: string): Boolean; -begin - Result := Properties.FindLookupText(AText); -end; - -function TcxCustomLookupEditLookupData.GetActiveControl: TControl; -begin - Result := Properties.GetLookupGridActiveControl; -end; - -function TcxCustomLookupEditLookupData.GetCurrentKey: TcxEditValue; -begin - Result := FCurrentKey; -end; - -function TcxCustomLookupEditLookupData.GetDisplayText(const AKey: TcxEditValue): string; -begin - Result := Properties.GetDisplayLookupText(AKey); -end; - -function TcxCustomLookupEditLookupData.GetOnCurrentKeyChanged: TNotifyEvent; -begin - Result := FOnCurrentKeyChanged; -end; - -function TcxCustomLookupEditLookupData.GetOnSelectItem: TNotifyEvent; -begin - Result := FOnSelectItem; -end; - -function TcxCustomLookupEditLookupData.GetVisualAreaPreferredSize(AMaxHeight: Integer; - AWidth: Integer = 0): TSize; -var - ARowCount: Integer; -begin - Result.cx := Properties.GetLookupGridVisualAreaPreferredWidth; - // auto correct - ARowCount := Properties.DropDownRows; - if (DataController <> nil) and (DataController.GetRowCount < ARowCount) then - ARowCount := DataController.GetRowCount; - if ARowCount < 1 then - ARowCount := 1; - Result.cy := Properties.GetLookupGridPopupHeight(ARowCount); -end; - -procedure TcxCustomLookupEditLookupData.Go(ADirection: TcxEditLookupDataGoDirection; - ACircular: Boolean); -begin - if (DataController = nil) or (DataController.RecordCount = 0) then Exit; - DisableChanging; - try - ResetIncrementalFilter; - UpdateDropDownCount; - Properties.LockDataChanged; - try - if ADirection = egdBegin then - DataController.GotoFirst - else - if ADirection = egdEnd then - DataController.GotoLast - else - begin - SyncGrid; - if ADirection in [egdNext, egdPageDown] then - begin - if ACircular and DataController.IsEOF then - DataController.GotoFirst - else - if ADirection = egdNext then - DataController.GotoNext - else - DataController.MoveBy(Properties.DropDownRows); - end - else - begin - if ACircular and DataController.IsBOF then - DataController.GotoLast - else - if ADirection = egdPrev then - DataController.GotoPrev - else - DataController.MoveBy(-Properties.DropDownRows); - end; - end; - finally - Properties.UnlockDataChanged; - end; - DoSetCurrentKey(DataController.GetFocusedRecordIndex); - DoSetKeySelection(DataController.GetFocusedRecordIndex <> -1); - DoSelectItem; - finally - EnableChanging; - end; -end; - -procedure TcxCustomLookupEditLookupData.Initialize(AVisualControlsParent: TWinControl); -begin - if Properties.GetLookupGridControl <> nil then - Properties.GetLookupGridControl.Parent := AVisualControlsParent; -end; - -function TcxCustomLookupEditLookupData.IsEmpty: Boolean; -begin - Result := (GetListIndex = -1) or (DataController = nil) or - (DataController.RecordCount = 0); -end; - -function TcxCustomLookupEditLookupData.IsMouseOverList(const P: TPoint): Boolean; -var - APoint: TPoint; -begin - if Properties.GetLookupGridControl <> nil then - begin - APoint := Properties.GetLookupGridControl.ScreenToClient(P); - Result := Properties.IsLookupGridMouseOverList(APoint); - end - else - Result := False; -end; - -function TcxCustomLookupEditLookupData.Locate(var AText, ATail: string; ANext: Boolean): Boolean; - - function SetGridFilter(AItemIndex: Integer; const AText: string): Integer; - var - APrevIncrementalFilterText: string; - begin - if AText = '' then - begin - ResetIncrementalFilter; - Result := Properties.FindByText(AItemIndex, AText, True); - end - else - begin - APrevIncrementalFilterText := DataController.GetIncrementalFilterText; - Result := DataController.SetIncrementalFilter(AItemIndex, AText); - if DataController.FilteredRecordCount = 0 then - begin - if Properties.DropDownListStyle <> lsEditList then - DataController.SetIncrementalFilter(AItemIndex, APrevIncrementalFilterText); - Result := -1; - end; - end; - UpdateDropDownCount; - end; - -var - AItemIndex, ARecordIndex: Integer; - S: string; -begin - Result := False; - DisableChanging; - try - AItemIndex := GetListIndex; - if (AItemIndex <> -1) and (DataController <> nil) then - begin - // TODO: Next - if FVisible and Properties.GetIncrementalFiltering {and (Properties.DropDownListStyle <> lsFixedList)} then - ARecordIndex := SetGridFilter(AItemIndex, AText) - else - ARecordIndex := Properties.FindByText(AItemIndex, AText, True); - if ARecordIndex <> -1 then - begin - DataController.ChangeFocusedRecordIndex(ARecordIndex); - DoSetCurrentKey(ARecordIndex); - Result := True; - S := DataController.DisplayTexts[ARecordIndex, AItemIndex]; - AText := Copy(S, 1, Length(AText)); - ATail := Copy(S, Length(AText) + 1, Length(S)); - DoSetKeySelection(True); - end - else - DoSetKeySelection(False); - end; - finally - EnableChanging; - end; -end; - -procedure TcxCustomLookupEditLookupData.PositionVisualArea(const AClientRect: TRect); -begin - if Properties.GetLookupGridControl <> nil then - begin - with AClientRect do - Properties.GetLookupGridControl.SetBounds(Left, Top, Right - Left, Bottom - Top); - Properties.GetLookupGridControl.HandleNeeded; - Properties.LookupGridMakeFocusedRowVisible; - end; -end; - -procedure TcxCustomLookupEditLookupData.PropertiesChanged; -begin -end; - -procedure TcxCustomLookupEditLookupData.SelectItem; -begin - if IsKeySelected then - begin - DoSetCurrentKey(FocusedRecordIndex); - DoSelectItem; - end; -end; - -procedure TcxCustomLookupEditLookupData.SetCurrentKey(const AKey: TcxEditValue); -begin - FCurrentKey := AKey; - SyncGrid; -end; - -procedure TcxCustomLookupEditLookupData.SetOnCurrentKeyChanged(Value: TNotifyEvent); -begin - FOnCurrentKeyChanged := Value; -end; - -procedure TcxCustomLookupEditLookupData.SetOnSelectItem(Value: TNotifyEvent); -begin - FOnSelectItem := Value; -end; - -procedure TcxCustomLookupEditLookupData.TextChanged; -begin - if Edit.CanSynchronizeLookupData then - begin - DisableChanging; - try - SyncSelected; - finally - EnableChanging; - end; - end; -end; - -// end IcxTextEditLookupData - -procedure TcxCustomLookupEditLookupData.DoCurrentKeyChanged; -begin - if Assigned(FOnCurrentKeyChanged) then - FOnCurrentKeyChanged(Self); -end; - -procedure TcxCustomLookupEditLookupData.DoSelectItem; -begin - if Assigned(FOnSelectItem) then - FOnSelectItem(Self); -end; - -procedure TcxCustomLookupEditLookupData.DoSetCurrentKey(ARecordIndex: Integer); -begin - FCurrentKey := ARecordIndex; -end; - -procedure TcxCustomLookupEditLookupData.DoSetKeySelection(AKeySelected: Boolean); -begin - if DataController <> nil then - DataController.SyncSelected(AKeySelected); -end; - -procedure TcxCustomLookupEditLookupData.DoSyncGrid; -begin - if DataController <> nil then - DataController.ChangeFocusedRecordIndex(Integer(GetCurrentKey)); -end; - -procedure TcxCustomLookupEditLookupData.GridClick(Sender: TObject); -begin - SelectItem; -end; - -procedure TcxCustomLookupEditLookupData.GridCloseUp(Sender: TObject; AAccept: Boolean); -begin - if AAccept then - Edit.CloseUp(crEnter) - else - Edit.CloseUp(crCancel) -end; - -procedure TcxCustomLookupEditLookupData.GridFocusedRowChanged(Sender: TObject); -begin - // TODO: ImmediateUpdateText -end; - -function TcxCustomLookupEditLookupData.IsKeySelected: Boolean; -begin - Result := (DataController <> nil) and (DataController.GetSelectedCount = 1) and - (DataController.GetFocusedRowIndex = DataController.GetSelectedRowIndex(0)); -end; - -function TcxCustomLookupEditLookupData.LocateText(const AText: string): Boolean; -var - AItemIndex, ARecordIndex: Integer; -begin - Result := False; - AItemIndex := GetListIndex; - if (AItemIndex <> -1) and (DataController <> nil) then - begin -// Result := InternalCompareString(AText, GetDisplayText(FCurrentKey), False); -// if Result then -// Exit; - // TODO: Search - ARecordIndex := Properties.FindByText(AItemIndex, AText, False); - if ARecordIndex <> -1 then - begin - DataController.ChangeFocusedRecordIndex(ARecordIndex); - DoSetCurrentKey(ARecordIndex); - Result := True; - DoSetKeySelection(True); - end - else - DoSetKeySelection(False); - end; -end; - -procedure TcxCustomLookupEditLookupData.ResetIncrementalFilter; -begin - if DataController <> nil then - DataController.ResetIncrementalFilter; -end; - -procedure TcxCustomLookupEditLookupData.SyncGrid; -begin - DoSyncGrid; - Properties.LookupGridMakeFocusedRowVisible; -end; - -procedure TcxCustomLookupEditLookupData.SyncSelected; -var - ASelected: Boolean; - AItemIndex: Integer; - ARecordIndex: Integer; - S: string; -begin - if Properties.FInGridDataChanged then Exit; - if FVisible and Properties.GetIncrementalFiltering then - begin - if (DataController <> nil) and DataController.ChangeIncrementalFilterText(Edit.Text) then - UpdateDropDownCount; - end; - ASelected := False; - AItemIndex := GetListIndex; - if (DataController <> nil) and (AItemIndex <> -1) then - begin - ARecordIndex := FocusedRecordIndex; - if ARecordIndex <> -1 then - begin - S := DataController.DisplayTexts[ARecordIndex, AItemIndex]; - ASelected := DataCompareText(S, Edit.Text, False); - end; - if not ASelected or not FVisible then // Properties.EditingStyle in [esEditList, esFixedList] - begin - ARecordIndex := Properties.FindByText(AItemIndex, Edit.Text, False); - if ARecordIndex <> -1 then - begin - ASelected := True; - DataController.ChangeFocusedRecordIndex(ARecordIndex); - DoSetCurrentKey(ARecordIndex); - end; - end; - end; - DoSetKeySelection(ASelected); -end; - -procedure TcxCustomLookupEditLookupData.UpdateDropDownCount; -var - AGridRowCount, ARowCount, AHeight: Integer; -begin - if not FVisible then Exit; - if Edit.PopupWindow.IsVisible and (DataController <> nil) then - begin - AGridRowCount := DataController.GetRowCount; - ARowCount := Properties.DropDownRows; - if AGridRowCount > ARowCount then - AGridRowCount := ARowCount; - if AGridRowCount < 1 then - AGridRowCount := 1; - AHeight := Properties.GetLookupGridPopupHeight(AGridRowCount); - if (Properties.GetLookupGridControl <> nil) and - (Properties.GetLookupGridControl.ClientHeight <> AHeight) then - begin - if not Edit.PopupSizeChanged then - Edit.ResetPopupHeight; - Edit.SetupPopupWindow; - end; - end; -end; - -function TcxCustomLookupEditLookupData.GetDataController: TcxCustomDataController; -begin - Result := Properties.DataController; -end; - -function TcxCustomLookupEditLookupData.GetEdit: TcxCustomLookupEdit; -begin - Result := TcxCustomLookupEdit(FOwner); -end; - -function TcxCustomLookupEditLookupData.GetFocusedRecordIndex: Integer; -begin - if DataController <> nil then - Result := DataController.GetFocusedRecordIndex - else - Result := -1; -end; - -function TcxCustomLookupEditLookupData.GetListIndex: Integer; -begin - Result := Properties.GetListIndex; -end; - -function TcxCustomLookupEditLookupData.GetProperties: TcxCustomLookupEditProperties; -begin - Result := Edit.ActiveProperties; -end; - -{ TcxCustomLookupEditProperties } - -constructor TcxCustomLookupEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FIncrementalFiltering := True; - DropDownHeight := 0; - DropDownWidth := 0; - DropDownListStyle := lsEditFixedList; - DropDownAutoSize := False; - DropDownSizeable := False; -end; - -procedure TcxCustomLookupEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomLookupEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - if not IsDefinedByLookup then - DisplayColumnIndex := TcxCustomLookupEditProperties(Source).DisplayColumnIndex; - ImmediateUpdateText := TcxCustomLookupEditProperties(Source).ImmediateUpdateText; - IncrementalFiltering := TcxCustomLookupEditProperties(Source).IncrementalFiltering; - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -class function TcxCustomLookupEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxCustomLookupEdit; -end; - -function TcxCustomLookupEditProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - if IsPickMode then - Result := evsText - else - Result := evsValue; -end; - -function TcxCustomLookupEditProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := inherited GetSupportedOperations; - if GetEditValueSource(False) = evsValue then - Include(Result, esoSortingByDisplayText); -end; - -function TcxCustomLookupEditProperties.IsDefinedByLookup: Boolean; -begin - Result := IsLookupField; -end; - -function TcxCustomLookupEditProperties.IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; -begin - Result := True; -end; - -function TcxCustomLookupEditProperties.IsLookupField: Boolean; -begin - Result := False; -end; - -procedure TcxCustomLookupEditProperties.PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); -begin - if IsPickMode or (IsLookupField and not AEditFocused) then - inherited PrepareDisplayValue(AEditValue, DisplayValue, AEditFocused) - else - DisplayValue := GetDisplayLookupText(AEditValue); -end; - -function TcxCustomLookupEditProperties.GetLookupGridActiveControl: TWinControl; -begin - Result := GetLookupGridControl; -end; - -function TcxCustomLookupEditProperties.GetLookupGridCanResize: Boolean; -begin - Result := True; -end; - -function TcxCustomLookupEditProperties.GetLookupGridColumnCount: Integer; -begin - Result := 0; -end; - -function TcxCustomLookupEditProperties.GetLookupGridControl: TWinControl; -begin - Result := nil; -end; - -function TcxCustomLookupEditProperties.GetLookupGridDataController: TcxCustomDataController; -begin - Result := nil; -end; - -function TcxCustomLookupEditProperties.GetLookupGridVisualAreaPreferredWidth: Integer; -begin - Result := 0; -end; - -function TcxCustomLookupEditProperties.GetLookupGridNearestPopupHeight( - AHeight: Integer): Integer; -begin - Result := AHeight; -end; - -function TcxCustomLookupEditProperties.GetLookupGridPopupHeight(ADropDownRowCount: Integer): Integer; -begin - Result := 0; -end; - -function TcxCustomLookupEditProperties.IsLookupGridMouseOverList(const P: TPoint): Boolean; -begin - Result := False; -end; - -procedure TcxCustomLookupEditProperties.LookupGridDeinitialize; -begin -end; - -procedure TcxCustomLookupEditProperties.LookupGridDroppedDown(const AFindStr: string); -begin -end; - -procedure TcxCustomLookupEditProperties.LookupGridInitEvents(AOnClick, AOnFocusedRowChanged: TNotifyEvent; - AOnCloseUp: TcxLookupGridCloseUpEvent); -begin -end; - -procedure TcxCustomLookupEditProperties.LookupGridInitialize; -begin -end; - -procedure TcxCustomLookupEditProperties.LookupGridInitLookAndFeel(ALookAndFeel: TcxLookAndFeel; - AColor: TColor; AFont: TFont); -begin -end; - -procedure TcxCustomLookupEditProperties.LookupGridLockMouseMove; -begin -end; - -procedure TcxCustomLookupEditProperties.LookupGridMakeFocusedRowVisible; -begin -end; - -procedure TcxCustomLookupEditProperties.LookupGridUnlockMouseMove; -begin -end; - -procedure TcxCustomLookupEditProperties.CheckDisplayColumnIndex; -begin - if FDisplayColumnIndex >= GetLookupGridColumnCount then - DisplayColumnIndex := GetLookupGridColumnCount - 1; -end; - -procedure TcxCustomLookupEditProperties.DeinitializeDataController; -begin - if DataController <> nil then - DataController.RemoveDataChangedListener(Self, GridDataChanged); -end; - -function TcxCustomLookupEditProperties.FindByText(AItemIndex: Integer; - const AText: string; APartialCompare: Boolean): Integer; -begin - Result := DataController.FindRecordIndexByText(0, AItemIndex, AText, APartialCompare, False, True); -end; - -function TcxCustomLookupEditProperties.FindLookupText(const AText: string): Boolean; -var - AItemIndex: Integer; -begin - AItemIndex := GetListIndex; - Result := (AItemIndex <> -1) and (DataController <> nil) and - (FindByText(AItemIndex, AText, False) <> -1); -end; - -function TcxCustomLookupEditProperties.GetDisplayColumnIndex: Integer; -begin - Result := FDisplayColumnIndex; -end; - -function TcxCustomLookupEditProperties.GetDisplayFormatOptions: TcxEditDisplayFormatOptions; -begin - Result := []; -end; - -function TcxCustomLookupEditProperties.GetDisplayLookupText(const AKey: TcxEditValue): string; -begin - Result := ''; -end; - -function TcxCustomLookupEditProperties.GetIncrementalFiltering: Boolean; -begin - Result := IncrementalFiltering; -end; - -function TcxCustomLookupEditProperties.GetListIndex: Integer; -begin - Result := DisplayColumnIndex; - if Result >= GetLookupGridColumnCount then - Result := GetLookupGridColumnCount - 1; -end; - -class function TcxCustomLookupEditProperties.GetLookupDataClass: TcxInterfacedPersistentClass; -begin - Result := TcxCustomLookupEditLookupData; -end; - -function TcxCustomLookupEditProperties.GetNullKey: Variant; -begin - Result := Null; -end; - -procedure TcxCustomLookupEditProperties.GridDataChanged(Sender: TObject); -begin - if FInGridDataChanged or IsChangeLocked then Exit; - if IsDataChangedPostponed then Exit; - FInGridDataChanged := True; - try - Changed; - finally - FInGridDataChanged := False; - end; -end; - -procedure TcxCustomLookupEditProperties.InitializeDataController; -begin - if DataController <> nil then - DataController.AddDataChangedListener(Self, GridDataChanged); -end; - -function TcxCustomLookupEditProperties.IsChangeLocked: Boolean; -begin - Result := FLockCount <> 0; -end; - -function TcxCustomLookupEditProperties.IsDataChangedPostponed: Boolean; -begin - Result := (DataController <> nil) and DataController.DataChangedNotifyLocked; -end; - -function TcxCustomLookupEditProperties.IsEditValueConversionDependOnFocused: Boolean; -begin - Result := False; -end; - -function TcxCustomLookupEditProperties.IsPickMode: Boolean; -begin - Result := False; -end; - -function TcxCustomLookupEditProperties.IsPopupKey(Key: Word; Shift: TShiftState): Boolean; -begin - case Key of - VK_UP, VK_DOWN, VK_PRIOR, VK_NEXT: - Result := not (ssAlt in Shift); - VK_HOME, VK_END: - Result := ssCtrl in Shift; - else - Result := False; - end; -end; - -procedure TcxCustomLookupEditProperties.LockDataChanged; -begin - if DataController <> nil then - DataController.LockDataChangedNotify; -end; - -procedure TcxCustomLookupEditProperties.SetDisplayColumnIndex(Value: Integer); -begin - if Value >= GetLookupGridColumnCount then Value := GetLookupGridColumnCount - 1; - if Value < 0 then Value := 0; - if FDisplayColumnIndex <> Value then - begin - FDisplayColumnIndex := Value; - Changed; - end; -end; - -procedure TcxCustomLookupEditProperties.UnlockDataChanged; -begin - if DataController <> nil then - DataController.UnlockDataChangedNotify; -end; - -procedure TcxCustomLookupEditProperties.UnlinkLookupGridControlParent; -begin - if GetLookupGridControl <> nil then - GetLookupGridControl.Parent := nil; -end; - -function TcxCustomLookupEditProperties.GetDataController: TcxCustomDataController; -begin - Result := GetLookupGridDataController; -end; - -function TcxCustomLookupEditProperties.GetDropDownAutoSize: Boolean; -begin - Result := inherited PopupAutoSize; -end; - -function TcxCustomLookupEditProperties.GetDropDownHeight: Integer; -begin - Result := inherited PopupHeight; -end; - -function TcxCustomLookupEditProperties.GetDropDownSizeable: Boolean; -begin - Result := inherited PopupSizeable; -end; - -function TcxCustomLookupEditProperties.GetDropDownWidth: Integer; -begin - Result := inherited PopupWidth; -end; - -procedure TcxCustomLookupEditProperties.SetDropDownAutoSize(Value: Boolean); -begin - inherited PopupAutoSize := Value; -end; - -procedure TcxCustomLookupEditProperties.SetDropDownHeight(Value: Integer); -begin - inherited PopupHeight := Value; -end; - -procedure TcxCustomLookupEditProperties.SetDropDownSizeable(Value: Boolean); -begin - inherited PopupSizeable := Value; -end; - -procedure TcxCustomLookupEditProperties.SetDropDownWidth(Value: Integer); -begin - inherited PopupWidth := Value; -end; - -{ TcxCustomLookupEdit } - -class function TcxCustomLookupEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomLookupEditProperties; -end; - -procedure TcxCustomLookupEdit.PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); -begin - if ActiveProperties.IsPickMode then - EditValue := ADisplayValue - else - if ILookupData.GetDisplayText(ILookupData.CurrentKey) = ADisplayValue then - EditValue := ILookupData.CurrentKey - else - if LookupData.LocateText(ADisplayValue) then - EditValue := ILookupData.CurrentKey - else - EditValue := ActiveProperties.GetNullKey; -end; - -procedure TcxCustomLookupEdit.AfterPosting; -begin - inherited AfterPosting; - LookupData.EnableChanging; -end; - -procedure TcxCustomLookupEdit.BeforePosting; -begin - LookupData.DisableChanging; - inherited BeforePosting; -end; - -procedure TcxCustomLookupEdit.DoShowEdit; -begin - inherited DoShowEdit; - ILookupData.TextChanged; -end; - -procedure TcxCustomLookupEdit.DropDown; -begin - inherited DropDown; - ILookupData.CurrentKey := EditValue; -end; - -procedure TcxCustomLookupEdit.Initialize; -begin - inherited Initialize; - Width := 145; -end; - -function TcxCustomLookupEdit.InternalGetEditingValue: TcxEditValue; -begin - PrepareEditValue(Text, Result, InternalFocused); -end; - -function TcxCustomLookupEdit.NeedResetInvalidTextWhenPropertiesChanged: Boolean; -begin - Result := False; -end; - -procedure TcxCustomLookupEdit.RepositoryItemAssigning; -begin - TcxCustomLookupEditProperties(ActiveProperties).UnlinkLookupGridControlParent; -end; - -procedure TcxCustomLookupEdit.SynchronizeDisplayValue; -begin - inherited SynchronizeDisplayValue; - if HasPopupWindow then - ILookupData.CurrentKey := EditValue; -end; - -function TcxCustomLookupEdit.GetILookupData: IcxTextEditLookupData; -begin - Result := FLookupData as IcxTextEditLookupData; -end; - -function TcxCustomLookupEdit.GetLookupData: TcxCustomLookupEditLookupData; -begin - Result := TcxCustomLookupEditLookupData(FLookupData); -end; - -function TcxCustomLookupEdit.GetProperties: TcxCustomLookupEditProperties; -begin - Result := TcxCustomLookupEditProperties(FProperties); -end; - -function TcxCustomLookupEdit.GetActiveProperties: TcxCustomLookupEditProperties; -begin - Result := TcxCustomLookupEditProperties(InternalGetActiveProperties); -end; - -procedure TcxCustomLookupEdit.SetLookupData(Value: TcxCustomLookupEditLookupData); -begin - FLookupData.Assign(Value); -end; - -procedure TcxCustomLookupEdit.SetProperties(Value: TcxCustomLookupEditProperties); -begin - FProperties.Assign(Value); -end; - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxLookupGrid.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxLookupGrid.pas deleted file mode 100644 index 81fff56d..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxLookupGrid.pas +++ /dev/null @@ -1,2685 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxLookupGrid; - -{$I cxVer.inc} - -interface - -uses - Windows, - SysUtils, Classes, Controls, Graphics, Forms, StdCtrls, - cxClasses, cxControls, cxContainer, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, - cxDataUtils, cxDataStorage, cxCustomData, cxData, cxEdit, cxEditRepositoryItems; - -const - cxLookupGridColumnDefaultMinWidth = 20; - // TODO: Common -// cxGridCellTextOffset = 2; // ? - cxGridEditOffset = 1; - -type - TcxCustomLookupGrid = class; - TcxLookupGridColumn = class; - - TcxLookupGridHitTest = (htNone, htHeader, htCell); - TcxLookupGridScrollMode = (smNone, smTop, smBottom); - - { TcxLookupGridDataController } - - TcxLookupGridDataController = class(TcxDataController) - private - function GetGrid: TcxCustomLookupGrid; - public - function GetItem(Index: Integer): TObject; override; - property Grid: TcxCustomLookupGrid read GetGrid; - published - property OnCompare; - end; - - { TcxLookupGridViewInfo } - - TcxLookupGridPartViewInfo = class - Bounds: TRect; - ContentBounds: TRect; - end; - - // Columns - - TcxLookupGridColumnViewInfo = class(TcxLookupGridPartViewInfo) - private - FEditViewData: TcxCustomEditViewData; - FStyle: TcxCustomEditStyle; - public - Alignment: TAlignment; - Borders: TcxBorders; - Neighbors: TcxNeighbors; - SortOrder: TcxDataSortOrder; - Text: string; - destructor Destroy; override; - function CreateEditStyle(AProperties: TcxCustomEditProperties): TcxCustomEditStyle; - function CreateEditViewData(AProperties: TcxCustomEditProperties): TcxCustomEditViewData; - procedure DestroyEditViewData; - property Style: TcxCustomEditStyle read FStyle; - end; - - TcxLookupGridColumnsViewInfo = class(TcxObjectList) - private - function GetItem(Index: Integer): TcxLookupGridColumnViewInfo; - public - property Items[Index: Integer]: TcxLookupGridColumnViewInfo read GetItem; default; - end; - - // rows - - TcxLookupGridCellViewInfo = class(TcxLookupGridPartViewInfo) - private - FEditViewInfo: TcxCustomEditViewInfo; - public - Borders: TcxBorders; - Index: Integer; - IsFocused: Boolean; - destructor Destroy; override; - function CreateEditViewInfo(AProperties: TcxCustomEditProperties): TcxCustomEditViewInfo; - property EditViewInfo: TcxCustomEditViewInfo read FEditViewInfo; - end; - - TcxLookupGridRowViewInfo = class(TcxObjectList) - private - function GetItem(Index: Integer): TcxLookupGridCellViewInfo; - protected - function AddCell(AIndex: Integer; const AInitBounds: TRect; AIsFocused: Boolean): TcxLookupGridCellViewInfo; - public - Borders: TcxBorders; - Bounds: TRect; - ContentBounds: TRect; - IsFocused: Boolean; - RecordIndex: Integer; - RowIndex: Integer; - property Items[Index: Integer]: TcxLookupGridCellViewInfo read GetItem; default; - end; - - TcxLookupGridRowsViewInfo = class(TcxObjectList) - private - function GetItem(Index: Integer): TcxLookupGridRowViewInfo; - public - function FindByRowIndex(ARowIndex: Integer): TcxLookupGridRowViewInfo; - property Items[Index: Integer]: TcxLookupGridRowViewInfo read GetItem; default; - end; - - TcxLookupGridTopRowIndexCalculation = (ticNone, ticForward, ticBackward); - - TcxLookupGridViewInfo = class - private - FColumns: TcxLookupGridColumnsViewInfo; - FGrid: TcxCustomLookupGrid; - FInternalTopRowIndex: Integer; - FTopRowIndexCalculation: TcxLookupGridTopRowIndexCalculation; - FRowMinHeight: Integer; - FRows: TcxLookupGridRowsViewInfo; - function GetBounds: TRect; - function GetCanvas: TcxCanvas; - function GetClientBounds: TRect; - function GetEmptyAreaColor: TColor; - function GetGridLines: TcxGridLines; - function GetRowCount: Integer; - function GetRowHeight: Integer; - function GetTopRowIndex: Integer; - protected - function AddRow(ARowIndex: Integer; const AInitBounds: TRect): TcxLookupGridRowViewInfo; - function CalcCellMinHeight(AIndex: Integer): Integer; - function CalcRowMinHeight: Integer; - procedure CalculateCells(ARowViewInfo: TcxLookupGridRowViewInfo); - function GetCellHeight(ARowIndex, AColumnIndex: Integer): Integer; - function GetHeaderHeight: Integer; virtual; - property TopRowIndexCalculation: TcxLookupGridTopRowIndexCalculation read FTopRowIndexCalculation write FTopRowIndexCalculation; - public - BorderSize: Integer; - HeadersRect: TRect; - EmptyRectBottom, EmptyRectRight: TRect; - PartialVisibleRowCount, VisibleRowCount: Integer; - RowsRect: TRect; - VisibleRowsRect: TRect; - constructor Create(AGrid: TcxCustomLookupGrid); virtual; - destructor Destroy; override; - procedure CalcCellColors(ARowIsSelected, ACellIsSelected: Boolean; var AColor, AFontColor: TColor); - procedure CalcColumns; virtual; - procedure CalcEmptyAreas; virtual; - procedure CalcHeaders; virtual; - procedure CalcRows; virtual; - procedure Calculate; virtual; - function CheckTopRowIndex(ANewTopIndex: Integer): Integer; virtual; - procedure CreateEditStyle(AColumnViewInfo: TcxLookupGridColumnViewInfo; AColumn: TcxLookupGridColumn); virtual; - function CreateEditViewData(AColumnViewInfo: TcxLookupGridColumnViewInfo; AColumn: TcxLookupGridColumn): TcxCustomEditViewData; virtual; - procedure DestroyEditViewData(AColumnViewInfo: TcxLookupGridColumnViewInfo; AColumn: TcxLookupGridColumn); virtual; - function GetContentColor: TColor; virtual; - function GetContentFont: TFont; virtual; - function GetContentFontColor: TColor; virtual; - function GetGridColor: TColor; virtual; - function GetGridLineWidth: Integer; virtual; - function GetHeaderColor: TColor; virtual; - function GetHeaderFont: TFont; virtual; - function GetHeaderFontColor: TColor; virtual; - function GetSelectedColor: TColor; virtual; - function GetSelectedFontColor: TColor; virtual; - - property Bounds: TRect read GetBounds; - property Canvas: TcxCanvas read GetCanvas; - property ClientBounds: TRect read GetClientBounds; - property Columns: TcxLookupGridColumnsViewInfo read FColumns; - property EmptyAreaColor: TColor read GetEmptyAreaColor; - property Grid: TcxCustomLookupGrid read FGrid; - property GridLines: TcxGridLines read GetGridLines; - property GridLineWidth: Integer read GetGridLineWidth; - property RowCount: Integer read GetRowCount; - property RowHeight: Integer read GetRowHeight; - property Rows: TcxLookupGridRowsViewInfo read FRows; - property TopRowIndex: Integer read GetTopRowIndex; - end; - - TcxLookupGridViewInfoClass = class of TcxLookupGridViewInfo; - - { TcxLookupGridPainter } - - TcxLookupGridPainter = class - private - FCanvas: TcxCanvas; - FGrid: TcxCustomLookupGrid; - FLFPainterClass: TcxCustomLookAndFeelPainterClass; - function GetCanvas: TcxCanvas; - function GetViewInfo: TcxLookupGridViewInfo; - protected - procedure DrawBorder; virtual; - procedure DrawCell(ACellViewInfo: TcxLookupGridCellViewInfo); virtual; - procedure DrawContent; virtual; - procedure DrawEmptyArea; virtual; - procedure DrawHeaders; virtual; - procedure DrawRow(ARowViewInfo: TcxLookupGridRowViewInfo); virtual; - procedure DrawRows; virtual; - property ViewInfo: TcxLookupGridViewInfo read GetViewInfo; - public - constructor Create(AGrid: TcxCustomLookupGrid); virtual; - destructor Destroy; override; - procedure Invalidate; - procedure Paint; - property Canvas: TcxCanvas read GetCanvas; - property Grid: TcxCustomLookupGrid read FGrid; - property LFPainterClass: TcxCustomLookAndFeelPainterClass read FLFPainterClass write FLFPainterClass; - end; - - TcxLookupGridPainterClass = class of TcxLookupGridPainter; - - { TcxLookupGridColumn } - - TcxLookupGridDefaultValuesProvider = class(TcxCustomEditDefaultValuesProvider) - function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; override; - end; - - TcxLookupGridColumn = class(TcxInterfacedCollectionItem, IcxEditRepositoryItemListener) - private - FCaption: string; - FDefaultValuesProvider: TcxCustomEditDefaultValuesProvider; - FHeaderAlignment: TAlignment; - FInternalDefaultRepositoryItem: TcxEditRepositoryItem; - FIsCaptionAssigned: Boolean; - FIsWidthAssigned: Boolean; - FMinWidth: Integer; - FFixed: Boolean; - FSorting: Boolean; - FRepositoryItem: TcxEditRepositoryItem; - FWidth: Integer; - function GetCaption: string; - function GetDataController: TcxCustomDataController; - function GetGrid: TcxCustomLookupGrid; - function GetMinWidth: Integer; - function GetProperties: TcxCustomEditProperties; - function GetSortOrder: TcxDataSortOrder; - function GetWidth: Integer; - function IsCaptionStored: Boolean; - function IsWidthStored: Boolean; - procedure SetCaption(const Value: string); - procedure SetFixed(Value: Boolean); - procedure SetHeaderAlignment(Value: TAlignment); - procedure SetMinWidth(Value: Integer); - procedure SetRepositoryItem(Value: TcxEditRepositoryItem); - procedure SetSorting(Value: Boolean); - procedure SetSortOrder(Value: TcxDataSortOrder); - procedure SetWidth(Value: Integer); - protected - // IcxEditRepositoryItemListener - procedure ItemRemoved(Sender: TcxEditRepositoryItem); - procedure PropertiesChanged(Sender: TcxEditRepositoryItem); - // base - procedure CheckWidthValue(var Value: Integer); virtual; - function GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; virtual; - function GetValueTypeClass: TcxValueTypeClass; virtual; - procedure SetIndex(Value: Integer); override; - procedure SetValueTypeClass(Value: TcxValueTypeClass); virtual; - property DataController: TcxCustomDataController read GetDataController; - public - constructor Create(Collection: TCollection); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; virtual; - function DefaultRepositoryItem: TcxEditRepositoryItem; virtual; - function DefaultWidth: Integer; virtual; - function GetContentFont: TFont; virtual; - function GetInternalDefaultRepositoryItem: TcxEditRepositoryItem; virtual; - function GetRepositoryItem: TcxEditRepositoryItem; virtual; - function IsLeft: Boolean; virtual; - function IsRight: Boolean; virtual; - procedure RestoreDefaults; virtual; - property DefaultValuesProvider: TcxCustomEditDefaultValuesProvider read FDefaultValuesProvider; - property Properties: TcxCustomEditProperties read GetProperties; - property Grid: TcxCustomLookupGrid read GetGrid; - property ValueTypeClass: TcxValueTypeClass read GetValueTypeClass write SetValueTypeClass; - published - property Caption: string read GetCaption write SetCaption stored IsCaptionStored; - property Fixed: Boolean read FFixed write SetFixed default False; - property HeaderAlignment: TAlignment read FHeaderAlignment write SetHeaderAlignment default taLeftJustify; - property MinWidth: Integer read GetMinWidth write SetMinWidth default cxLookupGridColumnDefaultMinWidth; - property Sorting: Boolean read FSorting write SetSorting default True; - property SortOrder: TcxDataSortOrder read GetSortOrder write SetSortOrder default soNone; - property RepositoryItem: TcxEditRepositoryItem read FRepositoryItem write SetRepositoryItem; - property Width: Integer read GetWidth write SetWidth stored IsWidthStored; - end; - - TcxLookupGridColumnClass = class of TcxLookupGridColumn; - - { TcxLookupGridColumns } - - TcxLookupGridColumns = class(TCollection) - private - FGrid: TcxCustomLookupGrid; - function GetColumn(Index: Integer): TcxLookupGridColumn; - procedure SetColumn(Index: Integer; Value: TcxLookupGridColumn); - protected - function GetOwner: TPersistent; override; - procedure Update(Item: TCollectionItem); override; - public - constructor Create(AGrid: TcxCustomLookupGrid; AColumnClass: TcxLookupGridColumnClass); virtual; - function Add: TcxLookupGridColumn; - procedure BeginUpdate; override; - procedure EndUpdate; override; - procedure RestoreDefaults; virtual; - property Grid: TcxCustomLookupGrid read FGrid; - property Items[Index: Integer]: TcxLookupGridColumn read GetColumn write SetColumn; default; - end; - - TcxLookupGridColumnsClass = class of TcxLookupGridColumns; - - { TcxCustomLookupGrid } - - TcxLookupGridChange = (lgcLayout, lgcData, lgcFocusedRow); - TcxLookupGridChanges = set of TcxLookupGridChange; - - TcxLookupGridHitInfo = record - HitTest: TcxLookupGridHitTest; - RowIndex: Integer; - ColumnIndex: Integer; - end; - - TcxLookupGridOptions = class(TPersistent) - private - FColumnSorting: Boolean; - FFocusRowOnMouseMove: Boolean; - FGridLines: TcxGridLines; - FRowSelect: Boolean; - FShowHeader: Boolean; - FOnChanged: TNotifyEvent; - function GetAnsiSort: Boolean; - function GetCaseInsensitive: Boolean; - procedure SetAnsiSort(Value: Boolean); - procedure SetCaseInsensitive(Value: Boolean); - procedure SetGridLines(Value: TcxGridLines); - procedure SetRowSelect(Value: Boolean); - procedure SetShowHeader(Value: Boolean); - protected - FGrid: TcxCustomLookupGrid; - procedure Changed; virtual; - public - constructor Create(AGrid: TcxCustomLookupGrid); virtual; - procedure Assign(Source: TPersistent); override; - property Grid: TcxCustomLookupGrid read FGrid; - property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; - published - property AnsiSort: Boolean read GetAnsiSort write SetAnsiSort default False; - property CaseInsensitive: Boolean read GetCaseInsensitive write SetCaseInsensitive default False; - property ColumnSorting: Boolean read FColumnSorting write FColumnSorting default True; - property FocusRowOnMouseMove: Boolean read FFocusRowOnMouseMove - write FFocusRowOnMouseMove default True; - property GridLines: TcxGridLines read FGridLines write SetGridLines default glBoth; - property RowSelect: Boolean read FRowSelect write SetRowSelect default True; - property ShowHeader: Boolean read FShowHeader write SetShowHeader default True; - end; - - TcxLookupGridOptionsClass = class of TcxLookupGridOptions; - - TcxLookupGridCloseUpEvent = procedure (Sender: TObject; AAccept: Boolean) of object; - - TcxCustomLookupGrid = class(TcxControl) - private - FChanges: TcxLookupGridChanges; - FColumns: TcxLookupGridColumns; - FFocusedColumn: TcxLookupGridColumn; - FIsPopupControl: Boolean; - FLockCount: Integer; - FPainter: TcxLookupGridPainter; - FRowPressed: Boolean; - FScrollMode: TcxLookupGridScrollMode; - FScrollTimer: TcxTimer; - FTopRowIndex: Integer; - FViewInfo: TcxLookupGridViewInfo; - FOnClick: TNotifyEvent; - FOnCloseUp: TcxLookupGridCloseUpEvent; - FOnDataChanged: TNotifyEvent; - FOnFocusedRowChanged: TNotifyEvent; - procedure CreateScrollTimer; - procedure DestroyScrollTimer; - function GetDataController: TcxCustomDataController; - function GetFocusedColumn: TcxLookupGridColumn; - function GetFocusedColumnIndex: Integer; - function GetFocusedRowIndex: Integer; - function GetRowCount: Integer; - procedure SetColumns(Value: TcxLookupGridColumns); - procedure SetDataController(Value: TcxCustomDataController); - procedure SetFocusedColumn(Value: TcxLookupGridColumn); - procedure SetFocusedColumnIndex(Value: Integer); - procedure SetFocusedRowIndex(Value: Integer); - procedure SetIsPopupControl(Value: Boolean); - procedure SetOptions(Value: TcxLookupGridOptions); - procedure SetTopRowIndex(Value: Integer); - procedure ScrollTimerHandler(Sender: TObject); - protected - FDataController: TcxCustomDataController; - FOptions: TcxLookupGridOptions; - procedure ColorChanged; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure Loaded; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure Paint; override; - function AllowDragAndDropWithoutFocus: Boolean; override; - procedure BoundsChanged; override; - procedure DoCancelMode; override; - procedure FocusChanged; override; - procedure FontChanged; override; - function GetBorderSize: Integer; override; - procedure InitControl; override; - procedure InitScrollBarsParameters; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - - procedure AddColumn(AColumn: TcxLookupGridColumn); virtual; - procedure Change(AChanges: TcxLookupGridChanges); virtual; - procedure CheckChanges; - procedure CheckSetTopRowIndex(var Value: Integer); - procedure CheckTopRowIndex(ATopRowIndex: Integer; ANotUpdate: Boolean); - procedure CreateHandlers; virtual; - procedure CreateSubClasses; virtual; - procedure DestroyHandlers; virtual; - procedure DestroySubClasses; virtual; - procedure DoCellClick(ARowIndex, AColumnIndex: Integer; AShift: TShiftState); virtual; - procedure DoHeaderClick(AColumnIndex: Integer; AShift: TShiftState); virtual; - procedure FocusColumn(AColumnIndex: Integer); - procedure FocusNextPage; - procedure FocusNextRow(AGoForward: Boolean); - procedure FocusPriorPage; - function GetColumnClass: TcxLookupGridColumnClass; virtual; - function GetColumnsClass: TcxLookupGridColumnsClass; virtual; - function GetDataControllerClass: TcxCustomDataControllerClass; virtual; - function GetLFPainterClass: TcxCustomLookAndFeelPainterClass; virtual; - function GetOptionsClass: TcxLookupGridOptionsClass; virtual; - function GetPainterClass: TcxLookupGridPainterClass; virtual; - function GetScrollBarOffsetBegin: Integer; virtual; - function GetScrollBarOffsetEnd: Integer; virtual; - function GetViewInfoClass: TcxLookupGridViewInfoClass; virtual; - function IsHotTrack: Boolean; virtual; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); override; - procedure RemoveColumn(AColumn: TcxLookupGridColumn); virtual; - procedure SetScrollMode(Value: TcxLookupGridScrollMode); virtual; - procedure ShowNextPage; - procedure ShowPrevPage; - procedure UpdateFocusing; virtual; - procedure UpdateRowInfo(ARowIndex: Integer; ARecalculate: Boolean); virtual; - procedure UpdateLayout; virtual; - - // Data Controller Notifications - procedure DataChanged; virtual; - procedure DataLayoutChanged; virtual; - procedure DoClick; virtual; - procedure DoCloseUp(AAccept: Boolean); virtual; - procedure DoFocusedRowChanged; virtual; - procedure FocusedRowChanged(APrevFocusedRowIndex, AFocusedRowIndex: Integer); virtual; - procedure LayoutChanged; virtual; - procedure SelectionChanged(AInfo: TcxSelectionChangedInfo); virtual; - procedure UpdateControl(AInfo: TcxUpdateControlInfo); virtual; - - property Color default clWindow; - property ParentColor default False; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure BeginUpdate; - procedure CancelUpdate; - procedure EndUpdate; - function GetHitInfo(P: TPoint): TcxLookupGridHitInfo; - function GetNearestPopupHeight(AHeight: Integer): Integer; - function GetPopupHeight(ADropDownRowCount: Integer): Integer; - function IsMouseOverList(const P: TPoint): Boolean; - function IsRowVisible(ARowIndex: Integer): Boolean; - procedure LockPopupMouseMove; - procedure MakeFocusedRowVisible; - procedure MakeRowVisible(ARowIndex: Integer); - procedure SyncSelected(ASelected: Boolean); virtual; - - property Columns: TcxLookupGridColumns read FColumns write SetColumns; - property DataController: TcxCustomDataController read GetDataController write SetDataController; - property FocusedColumn: TcxLookupGridColumn read GetFocusedColumn write SetFocusedColumn; - property FocusedColumnIndex: Integer read GetFocusedColumnIndex write SetFocusedColumnIndex; - property FocusedRowIndex: Integer read GetFocusedRowIndex write SetFocusedRowIndex; - property IsPopupControl: Boolean read FIsPopupControl write SetIsPopupControl; - property LockCount: Integer read FLockCount; - property LookAndFeel; - property Options: TcxLookupGridOptions read FOptions write SetOptions; - property Painter: TcxLookupGridPainter read FPainter; - property RowCount: Integer read GetRowCount; - property ScrollBarOffsetBegin: Integer read GetScrollBarOffsetBegin; - property ScrollBarOffsetEnd: Integer read GetScrollBarOffsetEnd; - property TopRowIndex: Integer read FTopRowIndex write SetTopRowIndex; - property ViewInfo: TcxLookupGridViewInfo read FViewInfo; - property OnClick: TNotifyEvent read FOnClick write FOnClick; - property OnCloseUp: TcxLookupGridCloseUpEvent read FOnCloseUp write FOnCloseUp; - property OnDataChanged: TNotifyEvent read FOnDataChanged write FOnDataChanged; - property OnFocusedRowChanged: TNotifyEvent read FOnFocusedRowChanged write FOnFocusedRowChanged; - end; - - TcxCustomLookupGridClass = class of TcxCustomLookupGrid; - - { TcxLookupGrid } - - TcxLookupGrid = class(TcxCustomLookupGrid) - published - property Align; - property Anchors; - property Color; - property Font; - property ParentFont; - property Visible; - - property Columns; - property DataController; - property Options; - property LookAndFeel; - end; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - cxEditRegisteredRepositoryItems, cxEditDataRegisteredRepositoryItems; - -const - ScrollTimerInterval = 50; -var - FPrevMousePos: TPoint; - -function PtInWidth(const R: TRect; P: TPoint): Boolean; -begin - Result := (R.Left <= P.X) and (P.X < R.Right) -end; - -{ TcxLookupGridColumnViewInfo } - -destructor TcxLookupGridColumnViewInfo.Destroy; -begin - FreeAndNil(FStyle); - inherited Destroy; -end; - -function TcxLookupGridColumnViewInfo.CreateEditStyle(AProperties: TcxCustomEditProperties): TcxCustomEditStyle; -begin - FStyle := AProperties.GetStyleClass.Create(nil, True) as TcxCustomEditStyle; - FStyle.ButtonTransparency := ebtHideInactive; - Result := FStyle; -end; - -function TcxLookupGridColumnViewInfo.CreateEditViewData(AProperties: TcxCustomEditProperties): TcxCustomEditViewData; -begin - FEditViewData := AProperties.CreateViewData(FStyle, True); - Result := FEditViewData; -end; - -procedure TcxLookupGridColumnViewInfo.DestroyEditViewData; -begin - FreeAndNil(FEditViewData); -end; - -{ TcxLookupGridColumnsViewInfo } - -function TcxLookupGridColumnsViewInfo.GetItem(Index: Integer): TcxLookupGridColumnViewInfo; -begin - Result := TcxLookupGridColumnViewInfo(inherited Items[Index]); -end; - -{ TcxLookupGridCellViewInfo } - -destructor TcxLookupGridCellViewInfo.Destroy; -begin - FreeAndNil(FEditViewInfo); - inherited Destroy; -end; - -function TcxLookupGridCellViewInfo.CreateEditViewInfo(AProperties: TcxCustomEditProperties): TcxCustomEditViewInfo; -begin - if FEditViewInfo <> nil then FEditViewInfo.Free; - FEditViewInfo := AProperties.GetViewInfoClass.Create as TcxCustomEditViewInfo; - Result := FEditViewInfo; -end; - -{ TcxLookupGridRowViewInfo } - -function TcxLookupGridRowViewInfo.AddCell(AIndex: Integer; const AInitBounds: TRect; - AIsFocused: Boolean): TcxLookupGridCellViewInfo; -begin - Result := TcxLookupGridCellViewInfo.Create; - Add(Result); - Result.Index := AIndex; - Result.IsFocused := AIsFocused; - Result.Bounds := AInitBounds; -end; - -function TcxLookupGridRowViewInfo.GetItem(Index: Integer): TcxLookupGridCellViewInfo; -begin - Result := TcxLookupGridCellViewInfo(inherited Items[Index]); -end; - -{ TcxLookupGridRowsViewInfo } - -function TcxLookupGridRowsViewInfo.FindByRowIndex(ARowIndex: Integer): TcxLookupGridRowViewInfo; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - if Items[I].RowIndex = ARowIndex then - begin - Result := Items[I]; - Break; - end; -end; - -function TcxLookupGridRowsViewInfo.GetItem(Index: Integer): TcxLookupGridRowViewInfo; -begin - Result := TcxLookupGridRowViewInfo(inherited Items[Index]); -end; - -{ TcxLookupGridViewInfo } - -constructor TcxLookupGridViewInfo.Create(AGrid: TcxCustomLookupGrid); -begin - inherited Create; - FGrid := AGrid; - FColumns := TcxLookupGridColumnsViewInfo.Create; - FRows := TcxLookupGridRowsViewInfo.Create; -end; - -destructor TcxLookupGridViewInfo.Destroy; -begin - FRows.Free; - FColumns.Free; - inherited Destroy; -end; - -procedure TcxLookupGridViewInfo.CalcHeaders; - - procedure CreateItems; - var - I: Integer; - AItem: TcxLookupGridColumnViewInfo; - begin - for I := 0 to Grid.Columns.Count - 1 do - begin - AItem := TcxLookupGridColumnViewInfo.Create; - with AItem do - begin - Alignment := Grid.Columns[I].HeaderAlignment; - Neighbors := []; - if not Grid.Columns[I].IsLeft then - Neighbors := Neighbors + [nLeft]; - if not Grid.Columns[I].IsRight then - Neighbors := Neighbors + [nRight]; - Borders := Grid.Painter.LFPainterClass.HeaderBorders(Neighbors); - SortOrder := Grid.Columns[I].SortOrder; - Text := Grid.Columns[I].Caption; - end; - CreateEditStyle(AItem, Grid.Columns[I]); - FColumns.Add(AItem); - end; - end; - - procedure CalcBounds; - var - I, ALeft: Integer; - AAutoWidthObject: TcxAutoWidthObject; - AItem: TcxLookupGridColumnViewInfo; - begin - AAutoWidthObject := TcxAutoWidthObject.Create(Grid.Columns.Count); - try - for I := 0 to Grid.Columns.Count - 1 do - begin - with AAutoWidthObject.AddItem do - begin - MinWidth := Grid.Columns[I].MinWidth; - Width := Grid.Columns[I].Width; - Fixed := Grid.Columns[I].Fixed; - end; - end; - AAutoWidthObject.AvailableWidth := HeadersRect.Right - HeadersRect.Left; - AAutoWidthObject.Calculate; - ALeft := HeadersRect.Left; - for I := 0 to Grid.Columns.Count - 1 do - begin - AItem := Columns[I]; - with AItem do - begin - Bounds := Rect(ALeft, HeadersRect.Top, - ALeft + AAutoWidthObject[I].AutoWidth, HeadersRect.Bottom); - ALeft := Bounds.Right; - ContentBounds := Grid.Painter.LFPainterClass.HeaderContentBounds(Bounds, Borders); - end; - end; - if ALeft < HeadersRect.Right then - HeadersRect.Right := ALeft; - finally - AAutoWidthObject.Free; - end; - end; - -begin - CreateItems; - CalcBounds; -end; - -procedure TcxLookupGridViewInfo.CalcEmptyAreas; -begin - if HeadersRect.Right < ClientBounds.Right then - EmptyRectRight := Rect(HeadersRect.Right, ClientBounds.Top, - ClientBounds.Right, ClientBounds.Bottom) - else - SetRectEmpty(EmptyRectRight); - if RowsRect.Bottom < ClientBounds.Bottom then - EmptyRectBottom := Rect(ClientBounds.Left, RowsRect.Bottom, - ClientBounds.Right, ClientBounds.Bottom) - else - SetRectEmpty(EmptyRectBottom); -end; - -procedure TcxLookupGridViewInfo.CalcCellColors(ARowIsSelected, ACellIsSelected: Boolean; - var AColor, AFontColor: TColor); -begin - if ARowIsSelected and not ACellIsSelected then - begin - AColor := GetSelectedColor; - AFontColor := GetSelectedFontColor; - end - else - begin - AColor := GetContentColor; - AFontColor := GetContentFontColor; - end; -end; - -procedure TcxLookupGridViewInfo.CalcColumns; -begin - FColumns.Clear; - if Grid.Columns.Count > 0 then - begin - HeadersRect := ClientBounds; - if Grid.Options.ShowHeader then - HeadersRect.Bottom := HeadersRect.Top + GetHeaderHeight - else - HeadersRect.Bottom := HeadersRect.Top; - CalcHeaders; - end - else - SetRectEmpty(HeadersRect); -end; - -procedure TcxLookupGridViewInfo.CalcRows; - - procedure CalcCells(ARowIndex: Integer; var ATop: Integer); - var - I, ACellHeight, ARowHeight: Integer; - ARect: TRect; - ARowViewInfo: TcxLookupGridRowViewInfo; - ACellViewInfo: TcxLookupGridCellViewInfo; - - function ExistEmptyArea: Boolean; - begin - Result := (TopRowIndexCalculation = ticNone) and - (ARowViewInfo.Bounds.Bottom <> ClientBounds.Bottom); - end; - - begin - ARowViewInfo := AddRow(ARowIndex, Rect(RowsRect.Left, ATop, RowsRect.Right, ATop)); - // Init Cells - ARowHeight := 0; - for I := 0 to Grid.Columns.Count - 1 do - begin - ACellHeight := GetCellHeight(ARowIndex, I); - if ACellHeight > ARowHeight then - ARowHeight := ACellHeight; - with Columns[I].Bounds do - ARect := Rect(Left, ATop, Right, ATop); - ARowViewInfo.AddCell(I, ARect, Grid.FocusedColumnIndex = I); - end; - // Correct Bottom + Calc Content - ARowViewInfo.Bounds.Bottom := ATop + ARowHeight; - ARowViewInfo.ContentBounds := ARowViewInfo.Bounds; - for I := 0 to ARowViewInfo.Count - 1 do - begin - ACellViewInfo := ARowViewInfo[I]; - ACellViewInfo.Bounds.Bottom := ARowViewInfo.Bounds.Bottom; - ACellViewInfo.ContentBounds := ACellViewInfo.Bounds; - if (GridLines in [glBoth, glVertical]) or - ((GridLines = glHorizontal) and (I = (ARowViewInfo.Count - 1))) then - begin - Dec(ACellViewInfo.ContentBounds.Right, GetGridLineWidth); - if I = (ARowViewInfo.Count - 1) then - begin - Dec(ARowViewInfo.ContentBounds.Right, GetGridLineWidth); - Include(ARowViewInfo.Borders, bRight); - end - else - Include(ACellViewInfo.Borders, bRight); - end; - end; - if (GridLines in [glBoth, glHorizontal]) or - ((GridLines = glVertical) and (ARowIndex = (RowCount - 1)) and ExistEmptyArea) then - begin - Inc(ARowViewInfo.Bounds.Bottom, GetGridLineWidth); - Include(ARowViewInfo.Borders, bBottom); - end; - RowsRect.Bottom := ARowViewInfo.Bounds.Bottom; - ATop := RowsRect.Bottom; - CalculateCells(ARowViewInfo); - end; - -var - I, ATop: Integer; -begin - FRows.Clear; - SetRectEmpty(RowsRect); - SetRectEmpty(VisibleRowsRect); - PartialVisibleRowCount := 0; - VisibleRowCount := 0; - if (HeadersRect.Right - HeadersRect.Left) > 0 then - begin - FRowMinHeight := CalcRowMinHeight; - RowsRect := Rect(HeadersRect.Left, HeadersRect.Bottom, HeadersRect.Right, HeadersRect.Bottom); - VisibleRowsRect := RowsRect; - ATop := RowsRect.Top; - if TopRowIndexCalculation = ticBackward then - begin - for I := TopRowIndex downto 0 do - begin - CalcCells(I, ATop); - Inc(PartialVisibleRowCount); - if RowsRect.Bottom <= ClientBounds.Bottom then - begin - Inc(VisibleRowCount); - VisibleRowsRect.Bottom := RowsRect.Bottom; - end - else - Break; - end; - end - else - begin - for I := TopRowIndex to RowCount - 1 do - begin - CalcCells(I, ATop); - Inc(PartialVisibleRowCount); - if RowsRect.Bottom <= ClientBounds.Bottom then - begin - Inc(VisibleRowCount); - VisibleRowsRect.Bottom := RowsRect.Bottom; - end - else - Break; - end; - end; - if (PartialVisibleRowCount > 0) and (VisibleRowCount = 0) then - VisibleRowCount := 1; - end; -end; - -procedure TcxLookupGridViewInfo.Calculate; -begin - BorderSize := FGrid.GetBorderSize; - CalcColumns; - CalcRows; - CalcEmptyAreas; -end; - -function TcxLookupGridViewInfo.CheckTopRowIndex(ANewTopIndex: Integer): Integer; -begin - TopRowIndexCalculation := ticForward; - try - FInternalTopRowIndex := ANewTopIndex; - Calculate; - if not IsRectEmpty(EmptyRectBottom) then - begin - TopRowIndexCalculation := ticBackward; - try - FInternalTopRowIndex := ANewTopIndex + VisibleRowCount - 1; - if FInternalTopRowIndex > (RowCount - 1) then - FInternalTopRowIndex := RowCount - 1; - Calculate; - ANewTopIndex := FInternalTopRowIndex - VisibleRowCount + 1; - finally - TopRowIndexCalculation := ticNone; - end; - end; - finally - TopRowIndexCalculation := ticNone; - end; - Result := ANewTopIndex; -end; - -function TcxLookupGridViewInfo.AddRow(ARowIndex: Integer; const AInitBounds: TRect): TcxLookupGridRowViewInfo; -begin - Result := TcxLookupGridRowViewInfo.Create; - FRows.Add(Result); - Result.RowIndex := ARowIndex; - Result.RecordIndex := Grid.FDataController.GetRowInfo(ARowIndex).RecordIndex; - Result.IsFocused := ARowIndex = Grid.FocusedRowIndex; - Result.Bounds := AInitBounds; -end; - -function TcxLookupGridViewInfo.CalcCellMinHeight(AIndex: Integer): Integer; -var - AEditViewData: TcxCustomEditViewData; -begin - AEditViewData := CreateEditViewData(Columns[AIndex], Grid.Columns[AIndex]); - try - Result := 2 * cxGridEditOffset + - AEditViewData.GetEditSize(Canvas, Null, DefaultcxEditSizeProperties).cy; - finally - DestroyEditViewData(Columns[AIndex], Grid.Columns[AIndex]); - end; -end; - -function TcxLookupGridViewInfo.CalcRowMinHeight: Integer; -var - I, ACellHeight: Integer; -begin - Result := 0; - for I := 0 to Grid.Columns.Count - 1 do - begin - ACellHeight := CalcCellMinHeight(I); - if ACellHeight > Result then - Result := ACellHeight; - end; -end; - -procedure TcxLookupGridViewInfo.CalculateCells(ARowViewInfo: TcxLookupGridRowViewInfo); - - procedure CalcCell(ACellViewInfo: TcxLookupGridCellViewInfo); - var - AColor, AFontColor: TColor; - ADisplayValue: Variant; - AEditViewData: TcxCustomEditViewData; - AEditViewInfo: TcxCustomEditViewInfo; - ARect: TRect; - ASelected: Boolean; - begin - // Style - ASelected := Grid.DataController.IsRowSelected(ARowViewInfo.RowIndex); - CalcCellColors(ASelected and ARowViewInfo.IsFocused, - ASelected and ACellViewInfo.IsFocused, AColor, AFontColor); - with Columns[ACellViewInfo.Index].Style do - begin - StyleData.Color := AColor; - StyleData.FontColor := AFontColor; - end; - // Calculate - AEditViewInfo := ACellViewInfo.CreateEditViewInfo(Grid.Columns[ACellViewInfo.Index].Properties); - AEditViewData := CreateEditViewData(Columns[ACellViewInfo.Index], Grid.Columns[ACellViewInfo.Index]); - try - // Value - if Grid.Columns[ACellViewInfo.Index].Properties.GetEditValueSource(False) = evsValue then - ADisplayValue := Grid.FDataController.Values[ARowViewInfo.RecordIndex, ACellViewInfo.Index] - else - ADisplayValue := Grid.FDataController.DisplayTexts[ARowViewInfo.RecordIndex, ACellViewInfo.Index]; - // Calculate - ARect := ACellViewInfo.ContentBounds; - InflateRect(ARect, -cxGridEditOffset, -cxGridEditOffset); - AEditViewData.EditValueToDrawValue(Canvas, ADisplayValue, AEditViewInfo); - AEditViewData.Calculate(Canvas, ARect, Point(-1, -1), cxmbNone, [], AEditViewInfo, False); - finally - DestroyEditViewData(Columns[ACellViewInfo.Index], Grid.Columns[ACellViewInfo.Index]); - end; - end; - -var - I: Integer; -begin - for I := 0 to ARowViewInfo.Count - 1 do - CalcCell(ARowViewInfo[I]); -end; - -function TcxLookupGridViewInfo.GetCellHeight(ARowIndex, AColumnIndex: Integer): Integer; -begin - Result := FRowMinHeight; -end; - -function TcxLookupGridViewInfo.GetContentColor: TColor; -begin - Result := Grid.Color; -end; - -function TcxLookupGridViewInfo.GetContentFont: TFont; -begin - Result := Grid.Font; -end; - -function TcxLookupGridViewInfo.GetContentFontColor: TColor; -begin - Result := GetContentFont.Color; -end; - -procedure TcxLookupGridViewInfo.CreateEditStyle(AColumnViewInfo: TcxLookupGridColumnViewInfo; - AColumn: TcxLookupGridColumn); -begin - AColumnViewInfo.CreateEditStyle(AColumn.Properties); - with AColumnViewInfo.Style do - StyleData.Font := AColumn.GetContentFont; -end; - -function TcxLookupGridViewInfo.CreateEditViewData(AColumnViewInfo: TcxLookupGridColumnViewInfo; - AColumn: TcxLookupGridColumn): TcxCustomEditViewData; -begin - with AColumn.Properties do - begin - LockUpdate(True); - try - IDefaultValuesProvider := AColumn.DefaultValuesProvider; - finally - LockUpdate(False); - end; - end; - Result := AColumnViewInfo.CreateEditViewData(AColumn.Properties); -end; - -procedure TcxLookupGridViewInfo.DestroyEditViewData(AColumnViewInfo: TcxLookupGridColumnViewInfo; - AColumn: TcxLookupGridColumn); -begin - AColumnViewInfo.DestroyEditViewData; - with AColumn.Properties do - begin - LockUpdate(True); - try - IDefaultValuesProvider := nil; - finally - LockUpdate(False); - end; - end; -end; - -function TcxLookupGridViewInfo.GetGridColor: TColor; -begin - Result := clBtnFace; // TODO: style -end; - -function TcxLookupGridViewInfo.GetGridLineWidth: Integer; -begin - Result := 1; -end; - -function TcxLookupGridViewInfo.GetHeaderColor: TColor; -begin - Result := Grid.Painter.LFPainterClass.DefaultHeaderColor; -end; - -function TcxLookupGridViewInfo.GetHeaderFont: TFont; -begin - Result := Grid.Font; // TODO: style -end; - -function TcxLookupGridViewInfo.GetHeaderFontColor: TColor; -begin - Result := Grid.Painter.LFPainterClass.DefaultHeaderTextColor; -end; - -function TcxLookupGridViewInfo.GetSelectedColor: TColor; -begin - Result := Grid.Painter.LFPainterClass.DefaultSelectionColor; // clHighlight; -end; - -function TcxLookupGridViewInfo.GetSelectedFontColor: TColor; -begin - Result := Grid.Painter.LFPainterClass.DefaultSelectionTextColor; // clHighlightText; -end; - -function TcxLookupGridViewInfo.GetHeaderHeight: Integer; -begin - Result := Grid.Painter.LFPainterClass.HeaderHeight(Canvas.FontHeight(GetHeaderFont)); -end; - -function TcxLookupGridViewInfo.GetBounds: TRect; -begin - Result := FGrid.Bounds; -end; - -function TcxLookupGridViewInfo.GetCanvas: TcxCanvas; -begin - Result := FGrid.Painter.Canvas; -end; - -function TcxLookupGridViewInfo.GetClientBounds: TRect; -begin - Result := FGrid.ClientBounds; -end; - -function TcxLookupGridViewInfo.GetEmptyAreaColor: TColor; -begin - Result := FGrid.Color; -end; - -function TcxLookupGridViewInfo.GetGridLines: TcxGridLines; -begin - Result := FGrid.Options.GridLines; -end; - -function TcxLookupGridViewInfo.GetRowCount: Integer; -begin - Result := Grid.RowCount; -end; - -function TcxLookupGridViewInfo.GetRowHeight: Integer; -begin - // TODO: RowAutoHeight - Result := FRowMinHeight; - if (Grid.Options.GridLines in [glBoth, glHorizontal]) then - Inc(Result, GetGridLineWidth); -end; - -function TcxLookupGridViewInfo.GetTopRowIndex: Integer; -begin - if TopRowIndexCalculation <> ticNone then - Result := FInternalTopRowIndex - else - Result := Grid.TopRowIndex; -end; - -{ TcxLookupGridPainter } - -constructor TcxLookupGridPainter.Create(AGrid: TcxCustomLookupGrid); -begin - inherited Create; - FGrid := AGrid; -end; - -destructor TcxLookupGridPainter.Destroy; -begin - FreeAndNil(FCanvas); - inherited Destroy; -end; - -procedure TcxLookupGridPainter.Invalidate; -begin - Grid.Invalidate; -end; - -procedure TcxLookupGridPainter.Paint; -begin - DrawBorder; - DrawContent; -end; - -procedure TcxLookupGridPainter.DrawBorder; -begin - with ViewInfo do - if BorderSize <> 0 then - begin - LFPainterClass.DrawBorder(Canvas, Bounds); - Canvas.IntersectClipRect(ClientBounds); - end; -end; - -procedure TcxLookupGridPainter.DrawContent; -begin - DrawHeaders; - DrawEmptyArea; - DrawRows; -end; - -procedure TcxLookupGridPainter.DrawCell(ACellViewInfo: TcxLookupGridCellViewInfo); -begin - ACellViewInfo.EditViewInfo.Paint(Canvas); - Canvas.FrameRect(ACellViewInfo.ContentBounds, ACellViewInfo.EditViewInfo.BackgroundColor, - cxGridEditOffset); - Canvas.FrameRect(ACellViewInfo.Bounds, ViewInfo.GetGridColor, - ViewInfo.GetGridLineWidth, ACellViewInfo.Borders); -end; - -procedure TcxLookupGridPainter.DrawEmptyArea; -begin - with ViewInfo do - if not IsRectEmpty(EmptyRectBottom) or not IsRectEmpty(EmptyRectRight) then - begin - Canvas.Brush.Color := EmptyAreaColor; - if not IsRectEmpty(EmptyRectBottom) then - Canvas.FillRect(EmptyRectBottom); - if not IsRectEmpty(EmptyRectRight) then - Canvas.FillRect(EmptyRectRight); - end; -end; - -procedure TcxLookupGridPainter.DrawHeaders; -var - R, ASortRect, ATextRect: TRect; - ASortOrder: TcxDataSortOrder; - I: Integer; -begin - with ViewInfo do - if not IsRectEmpty(HeadersRect) then - begin - for I := 0 to Columns.Count - 1 do - begin - R := Columns[I].Bounds; - ATextRect := LFPainterClass.HeaderContentBounds(R, Columns[I].Borders); - InflateRect(ATextRect, -cxHeaderTextOffset, -cxHeaderTextOffset); - ASortOrder := Columns[I].SortOrder; - if ASortOrder <> soNone then - begin - ASortRect := Rect(ATextRect.Right - LFPainterClass.SortingMarkAreaSize.X, ATextRect.Top, - ATextRect.Right, ATextRect.Bottom); - ATextRect.Right := ASortRect.Left; - if ATextRect.Right < ATextRect.Left then - ATextRect.Right := ATextRect.Left; - end; - LFPainterClass.DrawHeader(Canvas, R, ATextRect, Columns[I].Neighbors, Columns[I].Borders, - cxbsNormal, Columns[I].Alignment, vaCenter, False, True, Columns[I].Text, - GetHeaderFont, GetHeaderFontColor, GetHeaderColor); - if ASortOrder <> soNone then - LFPainterClass.DrawSortingMark(Canvas, ASortRect, ASortOrder = soAscending); - end; - end; -end; - -procedure TcxLookupGridPainter.DrawRow(ARowViewInfo: TcxLookupGridRowViewInfo); -var - I: Integer; - ACellViewInfo: TcxLookupGridCellViewInfo; -begin - for I := 0 to ARowViewInfo.Count - 1 do - begin - ACellViewInfo := ARowViewInfo[I]; - Canvas.FrameRect(ACellViewInfo.Bounds, ViewInfo.GetGridColor, - ViewInfo.GetGridLineWidth, ACellViewInfo.Borders); - DrawCell(ACellViewInfo); - end; - Canvas.FrameRect(ARowViewInfo.Bounds, ViewInfo.GetGridColor, - ViewInfo.GetGridLineWidth, ARowViewInfo.Borders); - if ARowViewInfo.IsFocused and (Grid.Focused or Grid.IsPopupControl) then - Canvas.DrawFocusRect(ARowViewInfo.ContentBounds); -end; - -procedure TcxLookupGridPainter.DrawRows; -var - I: Integer; -begin - with ViewInfo do - if not IsRectEmpty(RowsRect) then - for I := 0 to PartialVisibleRowCount - 1 do - DrawRow(Rows[I]); -end; - -function TcxLookupGridPainter.GetCanvas: TcxCanvas; -begin - if Grid.HandleAllocated then - begin - if FCanvas <> nil then - FreeAndNil(FCanvas); - Result := Grid.Canvas; - end - else - begin - if FCanvas = nil then - FCanvas := TcxScreenCanvas.Create; - Result := FCanvas; - end; -end; - -function TcxLookupGridPainter.GetViewInfo: TcxLookupGridViewInfo; -begin - Result := Grid.ViewInfo; -end; - -{ TcxLookupGridDefaultValuesProvider } - -function TcxLookupGridDefaultValuesProvider.IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; -begin - with TcxLookupGridColumn(Owner) do - Result := DataController.GetItemTextStored(Index); -end; - -{ TcxLookupGridColumn } - -constructor TcxLookupGridColumn.Create(Collection: TCollection); -var - AGrid: TcxCustomLookupGrid; -begin - if Assigned(Collection) and (Collection is TcxLookupGridColumns) then - AGrid := TcxLookupGridColumns(Collection).Grid - else - AGrid := nil; - if Assigned(AGrid) then - AGrid.BeginUpdate; - try - inherited Create(Collection); - FDefaultValuesProvider := GetDefaultValuesProviderClass.Create(Self); - FMinWidth := cxLookupGridColumnDefaultMinWidth; - FSorting := True; - Changed(False); - if AGrid <> nil then - AGrid.AddColumn(Self); - finally - if Assigned(AGrid) then - AGrid.EndUpdate; - end; -end; - -destructor TcxLookupGridColumn.Destroy; -var - AGrid: TcxCustomLookupGrid; - AGridNotify: Boolean; -begin - AGrid := Grid; - AGridNotify := False; - if AGrid <> nil then - begin - AGridNotify := not (csDestroying in AGrid.ComponentState) {and - not TcxLookupGridColumns(Collection).Locked}; - if AGridNotify then AGrid.BeginUpdate; - AGrid.RemoveColumn(Self); - end; - try - RepositoryItem := nil; - FreeAndNil(FInternalDefaultRepositoryItem); - FDefaultValuesProvider.Free; - FDefaultValuesProvider := nil; - inherited Destroy; - finally - if (AGrid <> nil) and AGridNotify then - AGrid.EndUpdate; - end; -end; - -procedure TcxLookupGridColumn.Assign(Source: TPersistent); -begin - if Source is TcxLookupGridColumn then - begin - if Assigned(Collection) then - Collection.BeginUpdate; - try - RestoreDefaults; - if TcxLookupGridColumn(Source).IsCaptionStored then - Caption := TcxLookupGridColumn(Source).Caption; - HeaderAlignment := TcxLookupGridColumn(Source).HeaderAlignment; - MinWidth := TcxLookupGridColumn(Source).MinWidth; - Fixed := TcxLookupGridColumn(Source).Fixed; - Sorting := TcxLookupGridColumn(Source).Sorting; - SortOrder := TcxLookupGridColumn(Source).SortOrder; - RepositoryItem := TcxLookupGridColumn(Source).RepositoryItem; - if TcxLookupGridColumn(Source).IsWidthStored then - Width := TcxLookupGridColumn(Source).Width; - finally - if Assigned(Collection) then - Collection.EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -function TcxLookupGridColumn.DefaultCaption: string; -begin - Result := ''; -end; - -function TcxLookupGridColumn.DefaultRepositoryItem: TcxEditRepositoryItem; -begin - Result := GetDefaultEditDataRepositoryItems.GetDefaultItem; -end; - -function TcxLookupGridColumn.DefaultWidth: Integer; -begin - Result := 64; -end; - -function TcxLookupGridColumn.GetContentFont: TFont; -begin - if Grid <> nil then - Result := Grid.ViewInfo.GetContentFont - else - Result := nil; -end; - -function TcxLookupGridColumn.GetInternalDefaultRepositoryItem: TcxEditRepositoryItem; -begin - Result := DefaultRepositoryItem; - if Result = nil then - begin - if FInternalDefaultRepositoryItem = nil then - FInternalDefaultRepositoryItem := TcxEditRepositoryTextItem.Create(nil); - Result := FInternalDefaultRepositoryItem; - end; -end; - -function TcxLookupGridColumn.GetRepositoryItem: TcxEditRepositoryItem; -begin - if RepositoryItem <> nil then - Result := RepositoryItem - else - Result := GetInternalDefaultRepositoryItem; -end; - -function TcxLookupGridColumn.IsLeft: Boolean; -begin - Result := Index = 0; -end; - -function TcxLookupGridColumn.IsRight: Boolean; -begin - Result := Index = Collection.Count - 1; -end; - -procedure TcxLookupGridColumn.RestoreDefaults; -begin - FIsCaptionAssigned := False; - FIsWidthAssigned := False; - FHeaderAlignment := taLeftJustify; - FMinWidth := cxLookupGridColumnDefaultMinWidth; - FFixed := False; - FSorting := True; - Changed(False); -end; - -// IcxEditRepositoryItemListener - -procedure TcxLookupGridColumn.ItemRemoved(Sender: TcxEditRepositoryItem); -begin - RepositoryItem := nil; -end; - -procedure TcxLookupGridColumn.PropertiesChanged(Sender: TcxEditRepositoryItem); -begin - Changed(False); -end; - -procedure TcxLookupGridColumn.CheckWidthValue(var Value: Integer); -begin - if Value < FMinWidth then - Value := FMinWidth; -end; - -function TcxLookupGridColumn.GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; -begin - Result := TcxLookupGridDefaultValuesProvider; -end; - -function TcxLookupGridColumn.GetValueTypeClass: TcxValueTypeClass; -begin - if Grid <> nil then - Result := Grid.FDataController.GetItemValueTypeClass(Index) - else - Result := nil; -end; - -procedure TcxLookupGridColumn.SetIndex(Value: Integer); -begin - inherited SetIndex(Value); - if Grid <> nil then - Grid.FDataController.UpdateItemIndexes; -end; - -procedure TcxLookupGridColumn.SetValueTypeClass(Value: TcxValueTypeClass); -begin - if Grid <> nil then - Grid.FDataController.ChangeValueTypeClass(Index, Value); -end; - -function TcxLookupGridColumn.GetCaption: string; -begin - if FIsCaptionAssigned then - Result := FCaption - else - Result := DefaultCaption; -end; - -function TcxLookupGridColumn.GetDataController: TcxCustomDataController; -begin - Result := TcxCustomDataController(Grid.FDataController) -end; - -function TcxLookupGridColumn.GetGrid: TcxCustomLookupGrid; -begin - Result := TcxLookupGridColumns(Collection).Grid; -end; - -function TcxLookupGridColumn.GetMinWidth: Integer; -begin - Result := FMinWidth; -end; - -function TcxLookupGridColumn.GetProperties: TcxCustomEditProperties; -begin - Result := GetRepositoryItem.Properties; -end; - -function TcxLookupGridColumn.GetSortOrder: TcxDataSortOrder; -begin - if Grid <> nil then - Result := Grid.FDataController.GetItemSortOrder(Index) - else - Result := soNone; -end; - -function TcxLookupGridColumn.GetWidth: Integer; -begin - if FIsWidthAssigned then - Result := FWidth - else - Result := DefaultWidth; -end; - -function TcxLookupGridColumn.IsCaptionStored: Boolean; -begin - Result := FIsCaptionAssigned; -end; - -function TcxLookupGridColumn.IsWidthStored: Boolean; -begin - Result := FIsWidthAssigned; -end; - -procedure TcxLookupGridColumn.SetCaption(const Value: string); -begin - FCaption := Value; - FIsCaptionAssigned := True; - Changed(False); -end; - -procedure TcxLookupGridColumn.SetFixed(Value: Boolean); -begin - if FFixed <> Value then - begin - FFixed := Value; - Changed(False); - end; -end; - -procedure TcxLookupGridColumn.SetHeaderAlignment(Value: TAlignment); -begin - if FHeaderAlignment <> Value then - begin - FHeaderAlignment := Value; - Changed(False); - end; -end; - -procedure TcxLookupGridColumn.SetMinWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FMinWidth <> Value then - begin - FMinWidth := Value; - if Width < FMinWidth then - Width := FMinWidth; - Changed(False); - end; -end; - -procedure TcxLookupGridColumn.SetRepositoryItem(Value: TcxEditRepositoryItem); -begin - if FRepositoryItem <> Value then - begin - if FRepositoryItem <> nil then - FRepositoryItem.RemoveListener(Self); - FRepositoryItem := Value; - if FRepositoryItem <> nil then - FRepositoryItem.AddListener(Self); - PropertiesChanged(FRepositoryItem); - end; -end; - -procedure TcxLookupGridColumn.SetSorting(Value: Boolean); -begin - if FSorting <> Value then - begin - FSorting := Value; - Changed(False); - end; -end; - -procedure TcxLookupGridColumn.SetSortOrder(Value: TcxDataSortOrder); -begin - if Grid <> nil then - Grid.FDataController.ChangeSorting(Index, Value); -end; - -procedure TcxLookupGridColumn.SetWidth(Value: Integer); -begin - CheckWidthValue(Value); - FWidth := Value; - FIsWidthAssigned := True; - Changed(False); -end; - -{ TcxLookupGridColumns } - -constructor TcxLookupGridColumns.Create(AGrid: TcxCustomLookupGrid; - AColumnClass: TcxLookupGridColumnClass); -begin - inherited Create(AColumnClass); - FGrid := AGrid; -end; - -function TcxLookupGridColumns.Add: TcxLookupGridColumn; -begin - Result := TcxLookupGridColumn(inherited Add); -end; - -procedure TcxLookupGridColumns.BeginUpdate; -begin - if (Grid <> nil) and not (csDestroying in Grid.ComponentState) then - Grid.BeginUpdate; - inherited; -end; - -procedure TcxLookupGridColumns.EndUpdate; -begin - inherited; - if (Grid <> nil) and not (csDestroying in Grid.ComponentState) then - Grid.EndUpdate; -end; - -procedure TcxLookupGridColumns.RestoreDefaults; -var - I: Integer; -begin - BeginUpdate; - try - for I := 0 to Count-1 do - Items[I].RestoreDefaults; - finally - EndUpdate; - end; -end; - -function TcxLookupGridColumns.GetOwner: TPersistent; -begin - Result := FGrid; -end; - -procedure TcxLookupGridColumns.Update(Item: TCollectionItem); -begin - if (FGrid = nil) or (csLoading in FGrid.ComponentState) then Exit; - Grid.Change([lgcLayout]); -end; - -function TcxLookupGridColumns.GetColumn(Index: Integer): TcxLookupGridColumn; -begin - Result := TcxLookupGridColumn(inherited Items[Index]); -end; - -procedure TcxLookupGridColumns.SetColumn(Index: Integer; Value: TcxLookupGridColumn); -begin - Items[Index].Assign(Value); -end; - -{ TcxLookupGridDataController } - -function TcxLookupGridDataController.GetItem(Index: Integer): TObject; -begin - Result := Grid.Columns[Index]; -end; - -function TcxLookupGridDataController.GetGrid: TcxCustomLookupGrid; -begin - Result := GetOwner as TcxCustomLookupGrid; -end; - -{ TcxLookupGridOptions } - -constructor TcxLookupGridOptions.Create(AGrid: TcxCustomLookupGrid); -begin - inherited Create; - FGrid := AGrid; - FColumnSorting := True; - FFocusRowOnMouseMove := True; - FGridLines := glBoth; - FRowSelect := True; - FShowHeader := True; -end; - -procedure TcxLookupGridOptions.Assign(Source: TPersistent); -begin - if Source is TcxLookupGridOptions then - begin - if Assigned(Grid) then - Grid.BeginUpdate; - try - AnsiSort := TcxLookupGridOptions(Source).AnsiSort; - CaseInsensitive := TcxLookupGridOptions(Source).CaseInsensitive; - ColumnSorting := TcxLookupGridOptions(Source).ColumnSorting; - FocusRowOnMouseMove := TcxLookupGridOptions(Source).FocusRowOnMouseMove; - GridLines := TcxLookupGridOptions(Source).GridLines; - RowSelect := TcxLookupGridOptions(Source).RowSelect; - ShowHeader := TcxLookupGridOptions(Source).ShowHeader; - finally - if Assigned(Grid) then - Grid.EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxLookupGridOptions.Changed; -begin - if Assigned(Grid) then - Grid.Change([lgcLayout]); - if Assigned(FOnChanged) then - FOnChanged(Self); -end; - -function TcxLookupGridOptions.GetAnsiSort: Boolean; -begin - if Assigned(Grid) then - Result := dcoAnsiSort in Grid.DataController.Options - else - Result := False; -end; - -function TcxLookupGridOptions.GetCaseInsensitive: Boolean; -begin - if Assigned(Grid) then - Result := dcoCaseInsensitive in Grid.DataController.Options - else - Result := False; -end; - -procedure TcxLookupGridOptions.SetAnsiSort(Value: Boolean); -begin - if Assigned(Grid) then - begin - if Value then - Grid.DataController.Options := Grid.DataController.Options + [dcoAnsiSort] - else - Grid.DataController.Options := Grid.DataController.Options - [dcoAnsiSort]; - end; -end; - -procedure TcxLookupGridOptions.SetCaseInsensitive(Value: Boolean); -begin - if Assigned(Grid) then - begin - if Value then - Grid.DataController.Options := Grid.DataController.Options + [dcoCaseInsensitive] - else - Grid.DataController.Options := Grid.DataController.Options - [dcoCaseInsensitive]; - end; -end; - -procedure TcxLookupGridOptions.SetGridLines(Value: TcxGridLines); -begin - if FGridLines <> Value then - begin - FGridLines := Value; - Changed; - end; -end; - -procedure TcxLookupGridOptions.SetRowSelect(Value: Boolean); -begin - if FRowSelect <> Value then - begin - FRowSelect := Value; - if Value and Assigned(Grid) then - Grid.FocusedColumn := nil; - end; -end; - -procedure TcxLookupGridOptions.SetShowHeader(Value: Boolean); -begin - if FShowHeader <> Value then - begin - FShowHeader := Value; - Changed; - end; -end; - -{ TcxCustomLookupGrid } - -constructor TcxCustomLookupGrid.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FColumns := GetColumnsClass.Create(Self, GetColumnClass); - FOptions := GetOptionsClass.Create(Self); - CreateHandlers; - CreateSubClasses; - Color := clWindow; - ParentColor := False; - Width := 250; - Height := 200; - Keys := [kArrows]; -end; - -destructor TcxCustomLookupGrid.Destroy; -begin - SetScrollMode(smNone); - DestroySubClasses; - DestroyHandlers; - FOptions.Free; - FColumns.Free; - inherited Destroy; -end; - -procedure TcxCustomLookupGrid.BeginUpdate; -begin - Inc(FLockCount); - FDataController.BeginUpdate; -end; - -procedure TcxCustomLookupGrid.CancelUpdate; -begin - Dec(FLockCount); -end; - -procedure TcxCustomLookupGrid.EndUpdate; -begin - FDataController.EndUpdate; - Dec(FLockCount); - CheckChanges; -end; - -function TcxCustomLookupGrid.GetHitInfo(P: TPoint): TcxLookupGridHitInfo; - - function CalcColumnIndex(out AColumnIndex: Integer): Boolean; - var - I: Integer; - begin - Result := False; - for I := 0 to ViewInfo.Columns.Count - 1 do - if PtInRect(ViewInfo.Columns[I].Bounds, P) then - begin - AColumnIndex := I; - Result := True; - Break; - end; - end; - - function CalcCellIndex(out ARowIndex, AColumnIndex: Integer): Boolean; - var - I, J: Integer; - begin - Result := False; - for I := 0 to ViewInfo.Rows.Count - 1 do - if PtInRect(ViewInfo.Rows[I].Bounds, P) then - begin - ARowIndex := ViewInfo.Rows[I].RowIndex; - for J := 0 to ViewInfo.Rows[I].Count - 1 do - if PtInWidth(ViewInfo.Rows[I][J].Bounds, P) then - begin - AColumnIndex := ViewInfo.Rows[I][J].Index; - Result := True; - Break; - end; - Break; - end; - end; - -begin - Result.HitTest := htNone; - Result.RowIndex := -1; - Result.ColumnIndex := -1; - if not PtInRect(ViewInfo.ClientBounds, P) then Exit; - if PtInRect(ViewInfo.HeadersRect, P) then - begin - if CalcColumnIndex(Result.ColumnIndex) then - Result.HitTest := htHeader; - end - else - if PtInRect(ViewInfo.RowsRect, P) then - begin - if CalcCellIndex(Result.RowIndex, Result.ColumnIndex) then - Result.HitTest := htCell; - end; -end; - -function TcxCustomLookupGrid.GetNearestPopupHeight(AHeight: Integer): Integer; -var - AHeaderHeight, ARowHeight, ARowCount: Integer; -begin - AHeaderHeight := ViewInfo.HeadersRect.Bottom - ViewInfo.HeadersRect.Top; - ARowHeight := ViewInfo.RowHeight; - ARowCount := (AHeight - AHeaderHeight) div ARowHeight; - if ARowCount <= 0 then - ARowCount := 1 - else - if ARowCount > GetRowCount then - ARowCount := GetRowCount; - if ARowCount < 1 then ARowCount := 1; - Result := AHeaderHeight + ARowHeight * ARowCount; -end; - -function TcxCustomLookupGrid.GetPopupHeight(ADropDownRowCount: Integer): Integer; -begin - Result := ViewInfo.HeadersRect.Bottom - ViewInfo.HeadersRect.Top + - ViewInfo.RowHeight * ADropDownRowCount; -end; - -function TcxCustomLookupGrid.IsMouseOverList(const P: TPoint): Boolean; -begin - Result := GetHitInfo(P).RowIndex <> -1; -end; - -function TcxCustomLookupGrid.IsRowVisible(ARowIndex: Integer): Boolean; -begin - with ViewInfo do - Result := (VisibleRowCount > 0) and (Rows[0].RowIndex <= ARowIndex) and - (ARowIndex <= Rows[VisibleRowCount - 1].RowIndex); -end; - -procedure TcxCustomLookupGrid.LockPopupMouseMove; -begin - FPrevMousePos := InternalGetCursorPos; -end; - -procedure TcxCustomLookupGrid.MakeFocusedRowVisible; -begin - if FocusedRowIndex <> -1 then - MakeRowVisible(FocusedRowIndex); -end; - -procedure TcxCustomLookupGrid.MakeRowVisible(ARowIndex: Integer); - - procedure SetBottomRowIndex(ARowIndex: Integer); - begin - TopRowIndex := ARowIndex - ViewInfo.VisibleRowCount + 1; // TODO: AutoHeight - end; - -begin - if ViewInfo.VisibleRowCount > 0 then - begin - if ARowIndex < ViewInfo.Rows[0].RowIndex then - TopRowIndex := ARowIndex - else - if ARowIndex > ViewInfo.Rows[ViewInfo.VisibleRowCount - 1].RowIndex then - SetBottomRowIndex(ARowIndex); - end; -end; - -procedure TcxCustomLookupGrid.SyncSelected(ASelected: Boolean); -begin - DataController.SyncSelected(ASelected); -end; - -procedure TcxCustomLookupGrid.ColorChanged; -begin - LayoutChanged; - inherited ColorChanged; -end; - -procedure TcxCustomLookupGrid.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - case Key of - VK_LEFT: - FocusColumn(FocusedColumnIndex - 1); - VK_RIGHT: - FocusColumn(FocusedColumnIndex + 1); - VK_UP: - FocusNextRow(False); // Grid mode - VK_DOWN: - FocusNextRow(True); // Grid mode - VK_HOME: - if (ssCtrl in Shift) or Options.RowSelect then - DataController.GotoFirst - else - FocusColumn(0); - VK_END: - if (ssCtrl in Shift) or Options.RowSelect then - DataController.GotoLast - else - FocusColumn(Columns.Count - 1); - VK_PRIOR: - FocusPriorPage; - VK_NEXT: - FocusNextPage; - VK_RETURN: - DoCloseUp(FocusedRowIndex <> -1); - end; -end; - -procedure TcxCustomLookupGrid.Loaded; -begin - inherited Loaded; - Change([lgcLayout]); -end; - -procedure TcxCustomLookupGrid.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - AHitInfo: TcxLookupGridHitInfo; -begin - inherited MouseDown(Button, Shift, X, Y); - AHitInfo := GetHitInfo(Point(X, Y)); - if AHitInfo.HitTest = htHeader then - DoHeaderClick(AHitInfo.ColumnIndex, Shift) - else - if AHitInfo.HitTest = htCell then - begin - DoCellClick(AHitInfo.RowIndex, AHitInfo.ColumnIndex, Shift); - FRowPressed := True; - end; -end; - -procedure TcxCustomLookupGrid.MouseMove(Shift: TShiftState; X, Y: Integer); -const - ScrollModeA: array[Boolean] of TcxLookupGridScrollMode = (smTop, smBottom); -var - AHitInfo: TcxLookupGridHitInfo; - P: TPoint; -begin - inherited MouseMove(Shift, X, Y); - P := InternalGetCursorPos; - if (P.X = FPrevMousePos.X) and (P.Y = FPrevMousePos.Y) then - Exit; - FPrevMousePos := P; - if MouseCapture or IsHotTrack then - begin - AHitInfo := GetHitInfo(Point(X, Y)); - if FRowPressed and MouseCapture and ((Y < ViewInfo.VisibleRowsRect.Top) or - (Y > ViewInfo.VisibleRowsRect.Bottom)) then - SetScrollMode(ScrollModeA[Y > ViewInfo.VisibleRowsRect.Bottom]) - else - begin - SetScrollMode(smNone); - if AHitInfo.HitTest = htCell then - begin - FocusedRowIndex := AHitInfo.RowIndex; - SyncSelected(True); - end; - end; - end; -end; - -procedure TcxCustomLookupGrid.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - AHitInfo: TcxLookupGridHitInfo; -begin - inherited MouseUp(Button, Shift, X, Y); - SetScrollMode(smNone); - AHitInfo := GetHitInfo(Point(X, Y)); - if FRowPressed then - DoCloseUp(AHitInfo.HitTest = htCell); - FRowPressed := False; -end; - -procedure TcxCustomLookupGrid.Paint; -begin - inherited Paint; - FPainter.Paint; -end; - -function TcxCustomLookupGrid.AllowDragAndDropWithoutFocus: Boolean; -begin - Result := True; -end; - -procedure TcxCustomLookupGrid.BoundsChanged; -begin - LayoutChanged; - inherited BoundsChanged; -end; - -procedure TcxCustomLookupGrid.DoCancelMode; -begin - DestroyScrollTimer; - FRowPressed := False; -end; - -procedure TcxCustomLookupGrid.FocusChanged; -begin - UpdateFocusing; - inherited FocusChanged; -end; - -procedure TcxCustomLookupGrid.FontChanged; -begin - inherited FontChanged; - LayoutChanged; -end; - -function TcxCustomLookupGrid.GetBorderSize: Integer; -begin - if IsPopupControl then - Result := 0 - else - Result := Painter.LFPainterClass.BorderSize; -end; - -procedure TcxCustomLookupGrid.InitControl; -begin - inherited InitControl; - LayoutChanged; -end; - -procedure TcxCustomLookupGrid.InitScrollBarsParameters; -begin - SetScrollBarInfo(sbVertical, 0, ViewInfo.RowCount - 1 + ScrollBarOffsetBegin + ScrollBarOffsetEnd, - 1, ViewInfo.VisibleRowCount, ScrollBarOffsetBegin + ViewInfo.TopRowIndex, True, True); -end; - -procedure TcxCustomLookupGrid.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -begin - if AScrollBarKind = sbVertical then - begin - case AScrollCode of - scLineUp: - TopRowIndex := TopRowIndex - 1; - scLineDown: - TopRowIndex := TopRowIndex + 1; - scPageUp: - ShowPrevPage; - scPageDown: - ShowNextPage; - scTrack: - if not DataController.IsGridMode then - TopRowIndex := AScrollPos; // check in CLX!!! - scPosition: - if DataController.IsGridMode then - TopRowIndex := AScrollPos - ScrollBarOffsetBegin; - end; - AScrollPos := ScrollBarOffsetBegin + TopRowIndex; - end; -end; - -procedure TcxCustomLookupGrid.AddColumn(AColumn: TcxLookupGridColumn); -begin - if FDataController <> nil then - FDataController.AddItem(AColumn); -end; - -procedure TcxCustomLookupGrid.Change(AChanges: TcxLookupGridChanges); -begin - FChanges := FChanges + AChanges; - CheckChanges; -end; - -procedure TcxCustomLookupGrid.CheckChanges; -begin - if (FChanges <> []) and (LockCount = 0) then - try - if FChanges * [lgcData, lgcLayout, lgcFocusedRow] <> [] then - LayoutChanged; - finally - FChanges := []; - end; -end; - -procedure TcxCustomLookupGrid.CheckSetTopRowIndex(var Value: Integer); -var - AMaxValue: Integer; -begin - if DataController.IsGridMode then - begin - if Value < 0 then - begin - if not DataController.IsBOF then - DataController.Scroll(Value); - Value := 0; - end - else - if Value >= RowCount then - begin - if not DataController.IsEOF then - DataController.Scroll(Value - (RowCount - 1)); - Value := RowCount - 1; - end - else - begin - AMaxValue := RowCount - ViewInfo.VisibleRowCount; // TODO - if Value > AMaxValue then - begin - if not DataController.IsEOF then - DataController.Scroll(Value - AMaxValue); -// AMaxValue := GetMaxValue; - Value := AMaxValue; - end; - end; - end; - if Value >= RowCount then - Value := RowCount - 1; - if Value < 0 then - Value := 0; -end; - -procedure TcxCustomLookupGrid.CheckTopRowIndex(ATopRowIndex: Integer; ANotUpdate: Boolean); -var - APrevTopRowIndex, ANewTopRowIndex: Integer; -begin - APrevTopRowIndex := TopRowIndex; - ANewTopRowIndex := ViewInfo.CheckTopRowIndex(ATopRowIndex); - if APrevTopRowIndex <> ANewTopRowIndex then - begin - FTopRowIndex := ANewTopRowIndex; - if not ANotUpdate then - UpdateLayout; - end - else - ViewInfo.Calculate; -end; - -procedure TcxCustomLookupGrid.CreateHandlers; -begin - FPainter := GetPainterClass.Create(Self); - FPainter.LFPainterClass := GetLFPainterClass; - FViewInfo := GetViewInfoClass.Create(Self); -end; - -function TcxCustomLookupGrid.GetDataControllerClass: TcxCustomDataControllerClass; -begin - Result := TcxLookupGridDataController; -end; - -procedure TcxCustomLookupGrid.CreateSubClasses; -begin - FDataController := GetDataControllerClass.Create(Self); - FDataController.OnUpdateControl := UpdateControl; -end; - -procedure TcxCustomLookupGrid.DestroyHandlers; -begin - FreeAndNil(FViewInfo); - FreeAndNil(FPainter); -end; - -procedure TcxCustomLookupGrid.DestroySubClasses; -begin - FreeAndNil(FDataController); -end; - -procedure TcxCustomLookupGrid.DoCellClick(ARowIndex, AColumnIndex: Integer; AShift: TShiftState); -begin - if ARowIndex <> -1 then - FocusedRowIndex := ARowIndex; - if AColumnIndex <> -1 then - FocusedColumnIndex := AColumnIndex; -end; - -procedure TcxCustomLookupGrid.DoHeaderClick(AColumnIndex: Integer; AShift: TShiftState); -var - ASortOrder: TcxDataSortOrder; -begin - if not Options.ColumnSorting or (AColumnIndex = -1) or - not Columns[AColumnIndex].Sorting then Exit; - try - BeginUpdate; - try - with Columns[AColumnIndex] do - if ssCtrl in AShift then - SortOrder := soNone - else - begin - if SortOrder = soAscending then - ASortOrder := soDescending - else - ASortOrder := soAscending; - if not (ssShift in AShift) then - FDataController.ClearSorting(True); - SortOrder := ASortOrder; - end; - finally - EndUpdate; - end; - finally - MakeFocusedRowVisible; - end; -end; - -procedure TcxCustomLookupGrid.FocusColumn(AColumnIndex: Integer); -begin - FocusedColumnIndex := AColumnIndex; - MakeFocusedRowVisible; -end; - -procedure TcxCustomLookupGrid.FocusNextPage; -begin - MakeFocusedRowVisible; - if FocusedRowIndex = TopRowIndex + ViewInfo.VisibleRowCount - 1 then - ShowNextPage; - FocusedRowIndex := TopRowIndex + ViewInfo.VisibleRowCount - 1; -end; - -procedure TcxCustomLookupGrid.FocusNextRow(AGoForward: Boolean); -var - AFocusedRowIndex: Integer; -begin - AFocusedRowIndex := FocusedRowIndex; - if DataController.IsGridMode then - begin - if AGoForward then - begin - if not DataController.IsEOF and (AFocusedRowIndex = (RowCount - 1)) then - begin - DataController.Scroll(1); - if not DataController.IsEOF then - Dec(AFocusedRowIndex); - end; - end - else - begin - if (AFocusedRowIndex = 0) and not DataController.IsBOF then - begin - DataController.Scroll(-1); - if not DataController.IsBOF then - Inc(AFocusedRowIndex); - end; - end; - end; - if AGoForward then - AFocusedRowIndex := AFocusedRowIndex + 1 - else - AFocusedRowIndex := AFocusedRowIndex - 1; - if AFocusedRowIndex < 0 then - AFocusedRowIndex := 0; - if AFocusedRowIndex >= RowCount then - AFocusedRowIndex := RowCount - 1; - FocusedRowIndex := AFocusedRowIndex; - SyncSelected(True); -end; - -procedure TcxCustomLookupGrid.FocusPriorPage; -begin - MakeFocusedRowVisible; - if FocusedRowIndex = TopRowIndex then - ShowPrevPage; - FocusedRowIndex := TopRowIndex; -end; - -function TcxCustomLookupGrid.GetColumnClass: TcxLookupGridColumnClass; -begin - Result := TcxLookupGridColumn; -end; - -function TcxCustomLookupGrid.GetColumnsClass: TcxLookupGridColumnsClass; -begin - Result := TcxLookupGridColumns; -end; - -function TcxCustomLookupGrid.GetLFPainterClass: TcxCustomLookAndFeelPainterClass; -begin - Result := LookAndFeel.Painter; -end; - -function TcxCustomLookupGrid.GetOptionsClass: TcxLookupGridOptionsClass; -begin - Result := TcxLookupGridOptions; -end; - -function TcxCustomLookupGrid.GetPainterClass: TcxLookupGridPainterClass; -begin - Result := TcxLookupGridPainter; -end; - -function TcxCustomLookupGrid.GetScrollBarOffsetBegin: Integer; -begin - if DataController.IsGridMode then - Result := Ord(not DataController.IsBOF) - else - Result := 0; -end; - -function TcxCustomLookupGrid.GetScrollBarOffsetEnd: Integer; -begin - if DataController.IsGridMode then - Result := Ord(not DataController.IsEOF) - else - Result := 0; -end; - -function TcxCustomLookupGrid.GetViewInfoClass: TcxLookupGridViewInfoClass; -begin - Result := TcxLookupGridViewInfo; -end; - -function TcxCustomLookupGrid.IsHotTrack: Boolean; -begin - Result := IsPopupControl and Options.FocusRowOnMouseMove; -end; - -procedure TcxCustomLookupGrid.LookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); -begin - inherited; - Painter.LFPainterClass := GetLFPainterClass; - Change([lgcLayout]); -end; - -procedure TcxCustomLookupGrid.RemoveColumn(AColumn: TcxLookupGridColumn); -begin - if FDataController <> nil then - FDataController.RemoveItem(AColumn); - if FFocusedColumn = AColumn then - FFocusedColumn := nil; // TODO: prev/next -end; - -procedure TcxCustomLookupGrid.SetScrollMode(Value: TcxLookupGridScrollMode); -begin - if FScrollMode <> Value then - begin - DestroyScrollTimer; - FScrollMode := Value; - if FScrollMode <> smNone then - CreateScrollTimer; - end; -end; - -procedure TcxCustomLookupGrid.ShowNextPage; -begin - if ViewInfo.VisibleRowCount > 1 then - TopRowIndex := TopRowIndex + ViewInfo.VisibleRowCount - 1 - else - TopRowIndex := TopRowIndex + 1; -end; - -procedure TcxCustomLookupGrid.ShowPrevPage; -begin - if ViewInfo.VisibleRowCount > 1 then - TopRowIndex := TopRowIndex - (ViewInfo.VisibleRowCount - 1) // TODO: AutoHeight - else - TopRowIndex := TopRowIndex - 1; -end; - -procedure TcxCustomLookupGrid.UpdateFocusing; -begin - UpdateRowInfo(FocusedRowIndex, False); -end; - -procedure TcxCustomLookupGrid.UpdateRowInfo(ARowIndex: Integer; ARecalculate: Boolean); -var - ARowViewInfo: TcxLookupGridRowViewInfo; -begin - ARowViewInfo := ViewInfo.Rows.FindByRowIndex(ARowIndex); - if ARowViewInfo <> nil then - begin - if ARecalculate then - begin - ARowViewInfo.IsFocused := ARowViewInfo.RowIndex = FocusedRowIndex; - ViewInfo.CalculateCells(ARowViewInfo); - end; - InvalidateRect(ARowViewInfo.Bounds, False); - end; -end; - -procedure TcxCustomLookupGrid.UpdateLayout; -begin - if HandleAllocated then - begin - ViewInfo.Calculate; - Painter.Invalidate; - UpdateScrollBars; - end; -end; - -procedure TcxCustomLookupGrid.DataChanged; -begin - // TODO: - LayoutChanged; - if Assigned(FOnDataChanged) then - FOnDataChanged(Self); -end; - -procedure TcxCustomLookupGrid.DataLayoutChanged; -begin - // TODO: - LayoutChanged; -end; - -procedure TcxCustomLookupGrid.DoClick; -begin - if Assigned(FOnClick) then - FOnClick(Self); -end; - -procedure TcxCustomLookupGrid.DoCloseUp(AAccept: Boolean); -begin - if Assigned(FOnCloseUp) then - FOnCloseUp(Self, AAccept); -end; - -procedure TcxCustomLookupGrid.DoFocusedRowChanged; -begin - if Assigned(FOnFocusedRowChanged) then - FOnFocusedRowChanged(Self); -end; - -procedure TcxCustomLookupGrid.FocusedRowChanged(APrevFocusedRowIndex, AFocusedRowIndex: Integer); -begin - if IsRowVisible(AFocusedRowIndex) then - begin - UpdateRowInfo(APrevFocusedRowIndex, True); - UpdateRowInfo(AFocusedRowIndex, True); - end - else - begin - LayoutChanged; - MakeFocusedRowVisible; - end; -end; - -procedure TcxCustomLookupGrid.LayoutChanged; -begin - CheckTopRowIndex(TopRowIndex, True); - UpdateLayout; -end; - -procedure TcxCustomLookupGrid.SelectionChanged(AInfo: TcxSelectionChangedInfo); -var - I: Integer; -begin - if AInfo.Count = 0 then - LayoutChanged - else - for I := 0 to AInfo.Count - 1 do - UpdateRowInfo(AInfo.RowIndexes[I], True); -end; - -procedure TcxCustomLookupGrid.UpdateControl(AInfo: TcxUpdateControlInfo); -begin - if AInfo is TcxDataChangedInfo then - DataChanged - else - if AInfo is TcxLayoutChangedInfo then - DataLayoutChanged - else - if AInfo is TcxFocusedRowChangedInfo then - with TcxFocusedRowChangedInfo(AInfo) do - FocusedRowChanged(PrevFocusedRowIndex, FocusedRowIndex) - else - if AInfo is TcxSelectionChangedInfo then - SelectionChanged(TcxSelectionChangedInfo(AInfo)); -end; - -procedure TcxCustomLookupGrid.CreateScrollTimer; -begin - if FScrollTimer <> nil then Exit; - FScrollTimer := TcxTimer.Create(nil); - with FScrollTimer do - begin - Interval := ScrollTimerInterval; - OnTimer := ScrollTimerHandler; - end; -end; - -procedure TcxCustomLookupGrid.DestroyScrollTimer; -begin - FreeAndNil(FScrollTimer); -end; - -function TcxCustomLookupGrid.GetDataController: TcxCustomDataController; -begin - Result := TcxCustomDataController(FDataController); -end; - -function TcxCustomLookupGrid.GetFocusedColumn: TcxLookupGridColumn; -begin -// if (FFocusedColumn = nil) and (Columns.Count > 0) then -// FFocusedColumn := Columns[0]; - Result := FFocusedColumn; -end; - -function TcxCustomLookupGrid.GetFocusedColumnIndex: Integer; -begin - if FocusedColumn <> nil then - Result := FocusedColumn.Index - else - Result := -1; -end; - -function TcxCustomLookupGrid.GetFocusedRowIndex: Integer; -begin - Result := FDataController.GetFocusedRowIndex; -end; - -function TcxCustomLookupGrid.GetRowCount: Integer; -begin - Result := FDataController.GetRowCount; -end; - -procedure TcxCustomLookupGrid.SetColumns(Value: TcxLookupGridColumns); -begin - FColumns.Assign(Value); -end; - -procedure TcxCustomLookupGrid.SetDataController(Value: TcxCustomDataController); -begin - FDataController.Assign(Value); -end; - -procedure TcxCustomLookupGrid.SetFocusedColumn(Value: TcxLookupGridColumn); -begin - if Options.RowSelect then Value := nil; - if FocusedColumn <> Value then - begin - FFocusedColumn := Value; - Change([lgcLayout]); - end; -end; - -procedure TcxCustomLookupGrid.SetFocusedColumnIndex(Value: Integer); -begin - if Columns.Count = 0 then Exit; - if Value >= Columns.Count then - Value := Columns.Count - 1; - if Value < 0 then - Value := 0; - if FocusedColumnIndex <> Value then - FocusedColumn := Columns[Value]; -end; - -procedure TcxCustomLookupGrid.SetFocusedRowIndex(Value: Integer); -begin - FDataController.ChangeFocusedRowIndex(Value); -end; - -procedure TcxCustomLookupGrid.SetIsPopupControl(Value: Boolean); -begin - if FIsPopupControl <> Value then - begin - FIsPopupControl := Value; - Change([lgcLayout]); - end; -end; - -procedure TcxCustomLookupGrid.SetOptions(Value: TcxLookupGridOptions); -begin - FOptions.Assign(Value); -end; - -procedure TcxCustomLookupGrid.SetTopRowIndex(Value: Integer); -begin - CheckSetTopRowIndex(Value); - if TopRowIndex <> Value then - begin - CheckTopRowIndex(Value, False); - end; -end; - -procedure TcxCustomLookupGrid.ScrollTimerHandler(Sender: TObject); - - procedure ChangeFocusedRow(Value: Integer); - begin - if Value >= RowCount then - Value := RowCount - 1; - if Value < 0 then Value := 0; - FocusedRowIndex := Value; - MakeFocusedRowVisible; - SyncSelected(False); - end; - -var - P: TPoint; -begin - GetCursorPos(P); - P := ScreenToClient(P); - if P.Y < ViewInfo.VisibleRowsRect.Top then - ChangeFocusedRow(TopRowIndex - 1) - else - if P.Y > ViewInfo.VisibleRowsRect.Bottom then - ChangeFocusedRow(TopRowIndex + ViewInfo.VisibleRowCount + 1); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxMCListBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxMCListBox.pas deleted file mode 100644 index 0a54817b..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxMCListBox.pas +++ /dev/null @@ -1,1786 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCommonLibrary } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCOMMONLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxMCListBox; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, Controls, ExtCtrls, Forms, Graphics, ImgList, Messages, - StdCtrls, SysUtils, cxClasses, cxContainer, cxControls, cxDataUtils, cxCustomData, - cxEdit, cxExtEditConsts, cxExtEditUtils, cxGraphics, cxHeader, cxLookAndFeelPainters, - cxLookAndFeels, cxScrollBar; - -type - TcxMCInnerHeader = class; - TcxMCListBox = class; - - { TcxMCInnerHeader } - - TcxMCInnerHeader = class(TcxHeader, IUnknown, - IcxContainerInnerControl) - private - FContainer: TcxContainer; - function GetControlContainer: TcxContainer; - function GetControl: TWinControl; - function GetContainer: TcxMCListBox; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - protected - procedure AdjustSize; override; - procedure Click; override; -// procedure DoSectionEndResizeEvent(Section: TcxHeaderSection); override; - function IsInnerControl: Boolean; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - procedure Notification(AComponent: TComponent; - Operation: TOperation); override; -// procedure AdjustScrollWidth; - procedure UpdateHeight; - property Container: TcxMCListBox read GetContainer; - public - constructor Create(AOwner: TComponent); override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - end; - - { TcxMCInnerListBox } - - TcxMCInnerListBox = class(TcxCustomInnerListBox) - private - FItems: TStrings; - FVScrollBarVisible: Boolean; - function GetContainer: TcxMCListBox; - function IsVScrollBarVisible: Boolean; - procedure ItemsChanged(Sender: TStrings; AStartIndex, AEndIndex: Integer); - procedure SetContainer(Value: TcxMCListBox); - procedure SetItems(Value: TStrings); - procedure WMPaint(var Message: TWMPaint); message WM_PAINT; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - protected - property Container: TcxMCListBox read GetContainer write SetContainer; - procedure Click; override; - procedure RecalcItemRects(AStartIndex: Integer = -1; - AEndIndex: Integer = -1); virtual; - procedure DrawLines; virtual; - procedure FullRepaint; virtual; - property VScrollBarVisible: Boolean read FVScrollBarVisible; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function CanFocus: Boolean; override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - published - property Items: TStrings read FItems write SetItems; - end; - - { TcxMCInnerPanel } - - TcxMCInnerPanel = class(TcxControl) - private - function GetMCListBox: TcxMCListBox; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - protected - procedure AdjustChildsPosition; - procedure BoundsChanged; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - procedure Paint; override; - property MCListBox: TcxMCListBox read GetMCListBox; - public - constructor Create(AOwner: TComponent); override; - end; - - { TcxMCListBox } - - TcxMCListBox = class(TcxContainer) - private - FAlignment: TAlignment; - FColumnLineColor: TColor; - FDelimiter: Char; - FInnerHeader: TcxMCInnerHeader; - FInnerHeaderSectionRectsWithoutScrollbar: TcxHeaderSectionRects; - FInnerHeaderSectionRectsWithScrollbar: TcxHeaderSectionRects; - FInnerListBox: TcxMCInnerListBox; - FInnerPanel: TcxMCInnerPanel; - FIntegralHeight: Boolean; - FInternalFlagCreatedHeader: Boolean; - FInternalPaint: Boolean; - FIsExitProcessing: Boolean; - FMultiLines: Boolean; - FOverflowEmptyColumn: Boolean; - FOverLoadList: TStringList; - FSavedHScroll: TScrollEvent; - FSavedIndex: Integer; - FShowColumnLines: Boolean; - FShowEndEllipsis: Boolean; - FShowHeader: Boolean; - function CalcCellTextRect(AApproximateRect: TRect; AItemIndex, AColumnIndex: Integer): TRect; - procedure DrawCellTextEx(var ARect: TRect; AFlags, AItemIndex, AColumnIndex: Integer); - procedure DrawCellText(ARect: TRect; AItemIndex, AColumnIndex: Integer); - function GetCellRect(AItemIndex, AColumnIndex, ATop, ABottom: Integer; - AVScrollBarVisible: Boolean): TRect; - function GetCellTextRect(AItemIndex, AColumnIndex, ATop, ABottom: Integer; - AVScrollBarVisible: Boolean): TRect; - function GetDelimiter: Char; - function GetImages: TCustomImageList; - procedure SetImages(Value: TCustomImageList); - function GetHeaderSectionRect(AIndex: Integer; - AVScrollBarVisible: Boolean): TRect; - function GetHeaderSections: TcxHeaderSections; - procedure SetHeaderSections(Value: TcxHeaderSections); - procedure SectionEndResizeHandler(HeaderControl: TcxCustomHeader; - Section: TcxHeaderSection); - procedure SectionTrackHandler(HeaderControl: TcxCustomHeader; - Section: TcxHeaderSection; Width: Integer; State: TcxSectionTrackState); - procedure SetMultiLines(Value: Boolean); - procedure SetAlignment(Value: TAlignment); - procedure SetShowEndEllipsis(Value: Boolean); - procedure SetDelimiter(Value: Char); - function GetHeaderDragReorder: Boolean; - procedure SetHeaderDragReorder(Value: Boolean); - procedure SetShowColumnLines(Value: Boolean); - procedure SetShowHeader(Value: Boolean); - procedure SetColumnLineColor(Value: TColor); - procedure SetOverflowEmptyColumn(Value: Boolean); - function GetTextPart(AItemIndex, AColumnIndex: Integer): string; - procedure SectionsChangeHandler(Sender: TObject); - procedure HScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); - procedure SectionEndDragHandler(Sender: TObject); - procedure DrawItem(Control: TWinControl; Index: Integer; ARect: TRect; State: TOwnerDrawState); - procedure MeasureItem(Control: TWinControl; Index: Integer; var Height: Integer); - function GetCount: Integer; - function GetExtendedSelect: Boolean; - function GetItemHeight: Integer; - function GetItemIndex: Integer; - function GetItems: TStrings; - function GetMultiSelect: Boolean; - function GetReadOnly: Boolean; - function GetSelCount: Integer; - function GetSelected(Index: Integer): Boolean; - function GetSorted: Boolean; - function GetTopIndex: Integer; - procedure SetExtendedSelect(Value: Boolean); - procedure SetItemHeight(Value: Integer); - procedure SetItemIndex(Value: Integer); - procedure SetItems(Value: TStrings); - procedure SetMultiSelect(Value: Boolean); - procedure SetReadOnly(Value: Boolean); - procedure SetSelected(Index: Integer; Value: Boolean); - procedure SetSorted(Value: Boolean); - procedure SetTopIndex(Value: Integer); - function GetAutoComplete: Boolean; - function GetAutoCompleteDelay: Cardinal; - procedure SetAutoComplete(Value: Boolean); - procedure SetAutoCompleteDelay(Value: Cardinal); - function GetScrollWidth: Integer; - function GetTabWidth: Integer; - procedure SetIntegralHeight(Value: Boolean); - procedure SetScrollWidth(Value: Integer); - procedure SetTabWidth(Value: Integer); - protected - FDataBinding: TcxCustomDataBinding; - procedure CreateWnd; override; - procedure CursorChanged; override; - procedure FontChanged; override; - procedure AdjustInnerControl; override; - procedure DataChange; override; - procedure DoExit; override; - function IsInternalControl(AControl: TControl): Boolean; override; - function IsReadOnly: Boolean; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure Loaded; override; - procedure UpdateData; override; - function CanResize(var NewWidth, NewHeight: Integer): Boolean; override; - procedure SetDragMode(Value: TDragMode); override; - procedure SetSize; override; - procedure WndProc(var Message: TMessage); override; - - procedure CalcHeaderSectionRects; - function CalcItemHeight(AIndex: Integer; AVScrollBarVisible: Boolean): Integer; virtual; - function GetDataBindingClass: TcxCustomDataBindingClass; virtual; - procedure GetOptimalHeight(var ANewHeight: Integer); - procedure FullRepaint; - procedure SectionSortChangedHandler(Sender: TObject; - const Section: TcxHeaderSection; const ASortOrder: TcxHeaderSortOrder); virtual; - - property DataBinding: TcxCustomDataBinding read FDataBinding; - property InnerHeader: TcxMCInnerHeader read FInnerHeader; - property ReadOnly: Boolean read GetReadOnly write SetReadOnly; - property ScrollWidth: Integer read GetScrollWidth write SetScrollWidth default 0; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Focused: Boolean; override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - procedure GetTabOrderList(List: TList); override; - function UpdateAction(Action: TBasicAction): Boolean; override; - procedure AddItem(AItem: string; AObject: TObject); - procedure Clear; - procedure ClearSelection; - procedure DeleteSelected; - function ItemAtPos(const APos: TPoint; AExisting: Boolean): Integer; - function ItemRect(Index: Integer): TRect; - function ItemVisible(Index: Integer): Boolean; - procedure SelectAll; - {$IFDEF DELPHI6} - procedure CopySelection(ADestination: TCustomListControl); - procedure MoveSelection(ADestination: TCustomListControl); - {$ENDIF} - property Count: Integer read GetCount; - property InnerListBox: TcxMCInnerListBox read FInnerListBox write FInnerListBox; - property ItemIndex: Integer read GetItemIndex write SetItemIndex; - property SelCount: Integer read GetSelCount; - property Selected[Index: Integer]: Boolean read GetSelected write SetSelected; - property TopIndex: Integer read GetTopIndex write SetTopIndex; - published - property Align; - property Alignment: TAlignment read FAlignment write SetAlignment - default taLeftJustify; - property AutoComplete: Boolean read GetAutoComplete write SetAutoComplete - default True; - property AutoCompleteDelay: Cardinal read GetAutoCompleteDelay - write SetAutoCompleteDelay default cxDefaultAutoCompleteDelay; - property Anchors; - property BiDiMode; - property ColumnLineColor: TColor read FColumnLineColor - write SetColumnLineColor default clBtnShadow; - property Constraints; - property Delimiter: Char read GetDelimiter write SetDelimiter default #59; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ExtendedSelect: Boolean read GetExtendedSelect - write SetExtendedSelect default True; - property HeaderDragReorder: Boolean read GetHeaderDragReorder - write SetHeaderDragReorder default False; - property HeaderSections: TcxHeaderSections read GetHeaderSections - write SetHeaderSections; - property Images: TCustomImageList read GetImages write SetImages; - property ImeMode; - property ImeName; - property IntegralHeight: Boolean read FIntegralHeight - write SetIntegralHeight default False; - property ItemHeight: Integer read GetItemHeight write SetItemHeight - default 16; - property Items: TStrings read GetItems write SetItems; - property MultiLines: Boolean read FMultiLines write SetMultiLines - default False; - property MultiSelect: Boolean read GetMultiSelect write SetMultiSelect - default False; - property OverflowEmptyColumn: Boolean read FOverflowEmptyColumn - write SetOverflowEmptyColumn default True; - property ParentBiDiMode; - property ParentColor default False; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ShowColumnLines: Boolean read FShowColumnLines - write SetShowColumnLines default True; - property ShowEndEllipsis: Boolean read FShowEndEllipsis - write SetShowEndEllipsis default True; - property ShowHeader: Boolean read FShowHeader write SetShowHeader - default True; - property ShowHint; - property Sorted: Boolean read GetSorted write SetSorted default False; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property TabWidth: Integer read GetTabWidth write SetTabWidth default 0; - property Visible; - property OnClick; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - cxVariants, dxThemeConsts, dxThemeManager, dxUxTheme; - -type - TMCStringList = class(TStringList) - private - SortOrder: TcxHeaderSortOrder; - SortColumn: Integer; - Delimiter: Char; - public -{$IFDEF DELPHI5} - procedure CustomSort(Compare: TStringListSortCompare); override; -{$ENDIF} - end; - - TStringsChangeEvent = procedure(Sender: TStrings; - AStartIndex, AEndIndex: Integer) of object; - - TcxMCListBoxStrings = class(TStrings) - private - FStorage: TStrings; - FUpdating: Boolean; - FOnChange: TStringsChangeEvent; - protected - function Get(Index: Integer): string; override; - function GetCount: Integer; override; - function GetObject(Index: Integer): TObject; override; - procedure Put(Index: Integer; const S: string); override; - procedure PutObject(Index: Integer; AObject: TObject); override; - procedure SetUpdateState(Updating: Boolean); override; - procedure Changed(AStartIndex: Integer = -1; - AEndIndex: Integer = -1); virtual; - property Storage: TStrings read FStorage; - public - constructor Create(AStorage: TStrings); virtual; - procedure Clear; override; - procedure Delete(Index: Integer); override; - procedure Exchange(Index1, Index2: Integer); override; - function IndexOf(const S: string): Integer; override; - procedure Insert(Index: Integer; const S: string); override; - procedure Move(CurIndex, NewIndex: Integer); override; - property OnChange: TStringsChangeEvent read FOnChange write FOnChange; - end; - -{$IFDEF DELPHI5} -function ListCompare(List: TStringList; Index1, Index2: Integer): Integer; - - function InternalCompareText(const S1, S2: string): Integer; - begin - Result := AnsiCompareText(S1, S2); - end; - -var - s1, s2: string; - FDelimiter: Char; -begin - FDelimiter := TMCStringList(List).Delimiter; - - s1 := GetWord(TMCStringList(List).SortColumn, List[Index1], FDelimiter); - s2 := GetWord(TMCStringList(List).SortColumn, List[Index2], FDelimiter); - - if TMCStringList(List).SortOrder = soAscending then - Result := InternalCompareText(s1, s2) - else - Result := InternalCompareText(s2, s1); -end; - -procedure TMCStringList.CustomSort(Compare: TStringListSortCompare); -begin - inherited CustomSort(ListCompare); -end; -{$ENDIF} - -{ TcxMCListBoxStrings } - -constructor TcxMCListBoxStrings.Create(AStorage: TStrings); -begin - inherited Create; - FStorage := AStorage; -end; - -procedure TcxMCListBoxStrings.Clear; -begin - Storage.Clear; -end; - -procedure TcxMCListBoxStrings.Delete(Index: Integer); -begin - Storage.Delete(Index); - Changed; -end; - -procedure TcxMCListBoxStrings.Exchange(Index1, Index2: Integer); -begin - Storage.Exchange(Index1, Index2); -end; - -function TcxMCListBoxStrings.IndexOf(const S: string): Integer; -begin - Result := Storage.IndexOf(S); -end; - -procedure TcxMCListBoxStrings.Insert(Index: Integer; const S: string); -begin - Storage.Insert(Index, S); - Changed(Index, Count - 1); -end; - -procedure TcxMCListBoxStrings.Move(CurIndex, NewIndex: Integer); -begin - Storage.Move(CurIndex, NewIndex); -end; - -function TcxMCListBoxStrings.Get(Index: Integer): string; -begin - Result := Storage[Index]; -end; - -function TcxMCListBoxStrings.GetCount: Integer; -begin - Result := Storage.Count; -end; - -function TcxMCListBoxStrings.GetObject(Index: Integer): TObject; -begin - Result := Storage.Objects[Index]; -end; - -procedure TcxMCListBoxStrings.Put(Index: Integer; const S: string); -begin - Storage[Index] := S; -end; - -procedure TcxMCListBoxStrings.PutObject(Index: Integer; AObject: TObject); -begin - Storage.Objects[Index] := AObject; -end; - -procedure TcxMCListBoxStrings.SetUpdateState(Updating: Boolean); -begin - FUpdating := Updating; - if Updating then - Storage.BeginUpdate - else - Storage.EndUpdate; - if not Updating then - Changed; -end; - -procedure TcxMCListBoxStrings.Changed(AStartIndex: Integer = -1; - AEndIndex: Integer = -1); -begin - if not FUpdating and Assigned(FOnChange) then - FOnChange(Self, AStartIndex, AEndIndex); -end; - -{ TcxMCInnerListBox } - -constructor TcxMCInnerListBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FItems := TcxMCListBoxStrings.Create(inherited Items); - TcxMCListBoxStrings(FItems).OnChange := ItemsChanged; -end; - -destructor TcxMCInnerListBox.Destroy; -begin - FreeAndNil(FItems); - inherited Destroy; -end; - -function TcxMCInnerListBox.CanFocus: Boolean; -begin - Result := Container.CanFocus; -end; - -function TcxMCInnerListBox.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - Container.FDataBinding.ExecuteAction(Action); -end; - -function TcxMCInnerListBox.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - Container.FDataBinding.UpdateAction(Action); -end; - -procedure TcxMCInnerListBox.Click; -begin - if Container.DataBinding.SetEditMode then - inherited Click; -end; - -procedure TcxMCInnerListBox.FullRepaint; -begin - InternalInvalidateRect(Self, GetControlRect(Self), True); -end; - -procedure TcxMCInnerListBox.SetItems(Value: TStrings); -begin - FItems.Assign(Value); -end; - -procedure TcxMCInnerListBox.WMPaint(var Message: TWMPaint); -begin - inherited; - if Container.ShowColumnLines then - DrawLines; -end; - -procedure TcxMCInnerListBox.CMFontChanged(var Message: TMessage); -begin - inherited; - RecalcItemRects; -end; - -procedure TcxMCInnerListBox.RecalcItemRects(AStartIndex: Integer = -1; - AEndIndex: Integer = -1); -var - AIsWindowRecreationNeeded: Boolean; - AItemHeight, ANewItemHeight, I: Integer; - AVScrollBarVisibilityChanged: Boolean; -begin - Container.CalcHeaderSectionRects; - - if (AStartIndex = -1) and (AEndIndex = -1) then - begin - AStartIndex := 0; - AEndIndex := Items.Count - 1; - end; - - AIsWindowRecreationNeeded := False; - AVScrollBarVisibilityChanged := FVScrollBarVisible <> IsVScrollBarVisible; - if AVScrollBarVisibilityChanged then - begin - FVScrollBarVisible := not FVScrollBarVisible; - (Parent as TcxMCInnerPanel).AdjustChildsPosition; - end; - for I := AStartIndex to AEndIndex do - begin - AItemHeight := Perform(LB_GETITEMHEIGHT, I, 0); - ANewItemHeight := Container.CalcItemHeight(I, FVScrollBarVisible); - if ANewItemHeight <> AItemHeight then - begin - AIsWindowRecreationNeeded := True; - Break; - end; - end; - if AIsWindowRecreationNeeded and HandleAllocated then - begin - RecreateWnd; - Update; - end; -end; - -function TcxMCInnerListBox.GetContainer: TcxMCListBox; -begin - Result := TcxMCListBox(FContainer); -end; - -function TcxMCInnerListBox.IsVScrollBarVisible: Boolean; -var - AItemsHeight: Integer; - I: Integer; -begin - AItemsHeight := 0; - for I := 0 to Items.Count - 1 do - begin - Inc(AItemsHeight, Container.CalcItemHeight(I, False)); - if AItemsHeight > Height then - Break; - end; - Result := AItemsHeight > Height; -end; - -procedure TcxMCInnerListBox.ItemsChanged(Sender: TStrings; - AStartIndex, AEndIndex: Integer); -begin - RecalcItemRects(AStartIndex, AEndIndex); -end; - -procedure TcxMCInnerListBox.SetContainer(Value: TcxMCListBox); -begin - FContainer := Value; -end; - -procedure TcxMCInnerListBox.DrawLines; -var - AColumnLineTop, I: Integer; - ALastItemRect: TRect; -begin - if Items.Count > 0 then - begin - ALastItemRect := ItemRect(Items.Count - 1); - if ALastItemRect.Bottom > Height then - Exit - else - AColumnLineTop := ALastItemRect.Bottom; - end - else - AColumnLineTop := 0; - - Canvas.Pen.Color := Container.ColumnLineColor; - Canvas.Pen.Width := 1; - for I := 0 to Container.HeaderSections.Count - 1 do - begin - Canvas.MoveTo(Container.HeaderSections[I].Right, AColumnLineTop); - Canvas.LineTo(Container.HeaderSections[I].Right, Height); - end; -end; - -{ TcxMCInnerHeader } - -constructor TcxMCInnerHeader.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ControlStyle := ControlStyle + [csNoDesignVisible]; - TabStop := False; -end; - -function TcxMCInnerHeader.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - Container.FDataBinding.ExecuteAction(Action); -end; - -function TcxMCInnerHeader.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - Container.FDataBinding.UpdateAction(Action); -end; - -procedure TcxMCInnerHeader.AdjustSize; -begin - inherited AdjustSize; - FitToClientWidth; -end; - -procedure TcxMCInnerHeader.Click; -begin - if Container.DataBinding.SetEditMode then - inherited Click; -end; - -//procedure TcxMCInnerHeader.DoSectionEndResizeEvent(Section: TcxHeaderSection); -//begin -// inherited DoSectionEndResizeEvent(Section); -// AdjustScrollWidth; -//end; - -function TcxMCInnerHeader.IsInnerControl: Boolean; -begin - Result := True; -end; - -procedure TcxMCInnerHeader.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited LookAndFeelChanged(Sender, AChangedValues); - if HandleAllocated then - UpdateHeight; -end; - -procedure TcxMCInnerHeader.Notification(AComponent: TComponent; - Operation: TOperation); -var - AHeightCalculatingNeeded: Boolean; -begin - AHeightCalculatingNeeded := (Operation = opRemove) and (AComponent = Images); - inherited Notification(AComponent, Operation); - if AHeightCalculatingNeeded then - UpdateHeight; -end; - -procedure TcxMCInnerHeader.UpdateHeight; -var - APrevHeight: Integer; -begin - APrevHeight := Height; - if Container.ShowHeader then - Height := GetAutoHeight - else - Height := 0; - if Height <> APrevHeight then - begin - (Parent as TcxMCInnerPanel).AdjustChildsPosition; - Container.InnerListBox.RecalcItemRects; - end; -end; - -//procedure TcxMCInnerHeader.AdjustScrollWidth; -//var -// AScrollWidth, I: Integer; -//begin -// AScrollWidth := 0; -// for I := 0 to Sections.Count - 1 do -// Inc(AScrollWidth, Sections[I].Width); -// if AScrollWidth < Width then -// AScrollWidth := Width; -// Container.InnerListBox.ScrollWidth := AScrollWidth; -//end; - -function TcxMCInnerHeader.GetControlContainer: TcxContainer; -begin - Result := FContainer; -end; - -function TcxMCInnerHeader.GetControl: TWinControl; -begin - Result := Self; -end; - -function TcxMCInnerHeader.GetContainer: TcxMCListBox; -begin - Result := TcxMCListBox(FContainer); -end; - -procedure TcxMCInnerHeader.CMFontChanged(var Message: TMessage); -begin - inherited; - UpdateHeight; -end; - -procedure TcxMCInnerHeader.WMSetFocus(var Message: TWMSetFocus); -begin - Container.InnerListBox.SetFocus; -end; - -{ TcxMCInnerPanel } - -constructor TcxMCInnerPanel.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ControlStyle := ControlStyle - [csAcceptsControls]; - TabStop := False; -end; - -procedure TcxMCInnerPanel.AdjustChildsPosition; - - function GetInnerHeaderWidth: Integer; - begin - Result := ClientWidth; - if MCListBox.InnerListBox.VScrollBarVisible then - Dec(Result, GetScrollBarSize.cx); - end; - -begin - MCListBox.InnerHeader.SetBounds(0, 0, GetInnerHeaderWidth, - MCListBox.InnerHeader.Height); - MCListBox.InnerListBox.SetBounds(0, MCListBox.InnerHeader.Height, ClientWidth, - ClientHeight - MCListBox.InnerHeader.Height); -end; - -procedure TcxMCInnerPanel.BoundsChanged; -begin - inherited BoundsChanged; - AdjustChildsPosition; - MCListBox.InnerListBox.RecalcItemRects; -end; - -procedure TcxMCInnerPanel.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited LookAndFeelChanged(Sender, AChangedValues); - Invalidate; -end; - -procedure TcxMCInnerPanel.Paint; -var - R: TRect; -begin - inherited Paint; - R := Rect(MCListBox.InnerHeader.Width, 0, ClientWidth, MCListBox.InnerHeader.Height); - InflateRect(R, 10, 0); - LookAndFeel.Painter.DrawHeaderControlSection(Canvas, R, cxEmptyRect, [], - [bTop, bBottom], cxbsNormal, taLeftJustify, vaTop, False, False, '', Canvas.Font, - clNone, clBtnFace); -end; - -function TcxMCInnerPanel.GetMCListBox: TcxMCListBox; -begin - Result := Parent as TcxMCListBox; -end; - -procedure TcxMCInnerPanel.WMSetFocus(var Message: TWMSetFocus); -var - AInnerListBox: TcxMCInnerListBox; -begin - AInnerListBox := TcxMCListBox(Parent).InnerListBox; - if AInnerListBox.CanFocus then - AInnerListBox.SetFocus; -end; - -{ TcxMCListBox } - -constructor TcxMCListBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FAlignment := taLeftJustify; - FMultiLines := False; - FShowEndEllipsis := True; - FDelimiter := ';'; - FOverflowEmptyColumn := True; - FShowColumnLines := True; - FColumnLineColor := clBtnShadow; - FInternalPaint := False; - FInternalFlagCreatedHeader := False; - FSavedIndex := -1; - FShowHeader := True; - Width := 121; - Height := 97; - FOverLoadList := TStringList.Create; - - FDataBinding := GetDataBindingClass.Create(Self, Self); - FDataBinding.OnDataChange := Self.DataChange; - FDataBinding.OnDataSetChange := Self.DataSetChange; - FDataBinding.OnUpdateData := Self.UpdateData; - - FInnerPanel := TcxMCInnerPanel.Create(Self); - FInnerPanel.Parent := Self; - FInnerPanel.Align := alClient; - FInnerPanel.LookAndFeel.MasterLookAndFeel := Style.LookAndFeel; - - FInnerHeader := TcxMCInnerHeader.Create(FInnerPanel); - InnerControl := FInnerPanel; - FInnerHeader.Color := clBtnFace; - FInnerHeader.ParentFont := True; - FInnerHeader.Parent := FInnerPanel; - FInnerHeader.FContainer := Self; - FInnerHeader.LookAndFeel.MasterLookAndFeel := Style.LookAndFeel; - FInnerHeader.OnSectionEndResize := SectionEndResizeHandler; - FInnerHeader.OnSectionTrack := SectionTrackHandler; - FInnerHeader.OnSectionsChange := SectionsChangeHandler; - FInnerHeader.OnSectionChangedSortOrder := SectionSortChangedHandler; - FInnerHeader.OnSectionEndDrag := SectionEndDragHandler; - FInnerHeader.AllowSort := True; - FInnerHeader.ResizeUpdate := False; - - FInnerListBox := TcxMCInnerListBox.Create(FInnerPanel); - FInnerListBox.ParentColor := True; - FInnerListBox.Parent := FInnerPanel; - FInnerListBox.Cursor := Cursor; - FInnerListBox.BorderStyle := bsNone; - FInnerListBox.Container := Self; - FInnerListBox.LookAndFeel.MasterLookAndFeel := Style.LookAndFeel; - FInnerListBox.Style := lbOwnerDrawVariable; - FInnerListBox.OnMeasureItem := MeasureItem; - FInnerListBox.OnDrawItem := DrawItem; - FSavedHScroll := FInnerListBox.HScrollBar.OnScroll; - FInnerListBox.HScrollBar.OnScroll := HScrollHandler; - - DataBinding.VisualControl := FInnerListBox; -end; - -destructor TcxMCListBox.Destroy; -begin - FreeAndNil(FInnerListBox); - FreeAndNil(FInnerHeader); - FreeAndNil(FInnerPanel); - FreeAndNil(FDataBinding); - FreeAndNil(FOverLoadList); - inherited Destroy; -end; - -function TcxMCListBox.Focused: Boolean; -begin - Result := inherited Focused or InnerListBox.Focused or FInnerHeader.Focused; -end; - -procedure TcxMCListBox.AddItem(AItem: string; AObject: TObject); -begin - Items.AddObject(AItem, AObject); -end; - -procedure TcxMCListBox.Clear; -begin - Items.Clear; -end; - -procedure TcxMCListBox.ClearSelection; -begin - FInnerListBox.ClearSelection; -end; - -procedure TcxMCListBox.DeleteSelected; -begin - FInnerListBox.DeleteSelected; -end; - -function TcxMCListBox.ItemAtPos(const APos: TPoint; AExisting: Boolean): Integer; -begin - Result := FInnerListBox.ItemAtPos(APos, AExisting); -end; - -function TcxMCListBox.ItemRect(Index: Integer): TRect; -begin - Result := FInnerListBox.ItemRect(Index); -end; - -function TcxMCListBox.ItemVisible(Index: Integer): Boolean; -begin - Result := FInnerListBox.ItemVisible(Index); -end; - -procedure TcxMCListBox.SelectAll; -begin - FInnerListBox.SelectAll; -end; - -{$IFDEF DELPHI6} -procedure TcxMCListBox.CopySelection(ADestination: TCustomListControl); -begin - FInnerListBox.CopySelection(ADestination); -end; - -procedure TcxMCListBox.MoveSelection(ADestination: TCustomListControl); -begin - FInnerListBox.MoveSelection(ADestination); -end; -{$ENDIF} - -procedure TcxMCListBox.CreateWnd; -var - FSection: TcxHeaderSection; -begin - inherited; - if not FInternalFlagCreatedHeader then - begin - FInternalFlagCreatedHeader := True; - if (FInnerHeader.Sections.Count = 0) then - begin - FSection := FInnerHeader.Sections.Add; - FSection.Text := 'Section #1'; - FSection.Width := FInnerHeader.Canvas.TextWidth(FSection.Text) + 4; - end; - end; -end; - -procedure TcxMCListBox.CursorChanged; -begin - inherited CursorChanged; - if FInnerListBox <> nil then - FInnerListBox.Cursor := Cursor; -end; - -procedure TcxMCListBox.FontChanged; -begin - inherited; - FullRepaint; - _TWinControlAccess._RecreateWnd(FInnerListBox); -end; - -procedure TcxMCListBox.AdjustInnerControl; -var - AFont: TFont; -begin - FInnerHeader.Font := VisibleFont; - - FInnerListBox.Color := ViewInfo.BackgroundColor; - AFont := TFont.Create; - try - AFont.Assign(Style.GetVisibleFont); - AFont.Color := VisibleFont.Color; - FInnerListBox.Font := AFont; - finally - AFont.Free; - end; -end; - -procedure TcxMCListBox.DataChange; -begin - if DataBinding.IsDataSourceLive then - ItemIndex := Items.IndexOf(VarToStr(DataBinding.GetStoredValue(evsText, Focused))) - else - ItemIndex := -1; -end; - -procedure TcxMCListBox.DoExit; -begin - if IsDestroying or FIsExitProcessing then - Exit; - FIsExitProcessing := True; - try - try - DataBinding.UpdateDataSource; - except - SetFocus; - raise; - end; - inherited DoExit; - finally - FIsExitProcessing := False; - end; -end; - -function TcxMCListBox.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - FDataBinding.ExecuteAction(Action); -end; - -procedure TcxMCListBox.GetTabOrderList(List: TList); -var - AActiveControl: TWinControl; -begin - AActiveControl := GetParentForm(Self).ActiveControl; - if (AActiveControl <> Self) and CanFocus and (InnerListBox = AActiveControl) then - begin - List.Add(InnerListBox); - List.Remove(Self); - end; -end; - -function TcxMCListBox.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - FDataBinding.UpdateAction(Action); -end; - -function TcxMCListBox.IsInternalControl(AControl: TControl): Boolean; -begin - if FInnerListBox = nil then - Result := True - else - Result := (AControl = FInnerListBox.HScrollBar) or (AControl = FInnerListBox.VScrollBar); - Result := Result or inherited IsInternalControl(AControl); -end; - -function TcxMCListBox.IsReadOnly: Boolean; -begin - Result := DataBinding.IsControlReadOnly; -end; - -procedure TcxMCListBox.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - case Key of - VK_PRIOR, VK_NEXT, VK_END, VK_HOME, VK_LEFT, VK_UP, VK_RIGHT, VK_DOWN: - if not DataBinding.SetEditMode then - Key := 0; - end; -end; - -procedure TcxMCListBox.KeyPress(var Key: Char); -begin - inherited KeyPress(Key); - if IsTextChar(Key) and not DataBinding.SetEditMode then - Key := #0 - else - if Key = Char(VK_ESCAPE) then - DataBinding.Reset; -end; - -procedure TcxMCListBox.Loaded; -begin - inherited; - FontChanged; -end; - -procedure TcxMCListBox.UpdateData; -begin - if ItemIndex >= 0 then - DataBinding.SetStoredValue(evsText, Items[ItemIndex]) - else - DataBinding.SetStoredValue(evsText, ''); -end; - -function TcxMCListBox.CanResize(var NewWidth, NewHeight: Integer): Boolean; -begin - Result := inherited CanResize(NewWidth, NewHeight); - if not Result or not IntegralHeight or IsLoading then - Exit; - if Align in [alLeft, alRight, alClient] then - Exit; - GetOptimalHeight(NewHeight); -end; - -procedure TcxMCListBox.SetDragMode(Value: TDragMode); -begin - inherited; - FInnerListBox.DragMode := Value; -end; - -procedure TcxMCListBox.SetSize; -var - ANewHeight: Integer; - APrevBoundsRect: TRect; -begin - if IsLoading then - Exit; - APrevBoundsRect := FInnerListBox.BoundsRect; - try - if not IntegralHeight or (Align in [alLeft, alRight, alClient]) then - begin - inherited SetSize; - Exit; - end; - ANewHeight := Height; - GetOptimalHeight(ANewHeight); - if Height >= (FInnerHeader.Height + 2) then - Height := ANewHeight - else - Height := FInnerHeader.Height + 2; - inherited SetSize; - finally - if not EqualRect(APrevBoundsRect, FInnerListBox.BoundsRect) and - FInnerListBox.HandleAllocated then - KillMessages(FInnerListBox.Handle, WM_MOUSEMOVE, WM_MOUSEMOVE); - end; -end; - -procedure TcxMCListBox.WndProc(var Message: TMessage); -begin - if FInnerListBox <> nil then - case Message.Msg of - LB_ADDSTRING .. LB_MSGMAX: - begin - with Message do - Result := SendMessage(FInnerListBox.Handle, Msg, WParam, LParam); - Exit; - end; - end; - inherited WndProc(Message); -end; - -function TcxMCListBox.GetDataBindingClass: TcxCustomDataBindingClass; -begin - Result := TcxCustomDataBinding; -end; - -procedure TcxMCListBox.GetOptimalHeight(var ANewHeight: Integer); - - function GetItemHeight(AIndex: Integer): Integer; - begin - case FInnerListBox.Style of - lbStandard{$IFDEF DELPHI6}, lbVirtual{$ENDIF}: - Result := Canvas.FontHeight(Font); - lbOwnerDrawFixed{$IFDEF DELPHI6}, lbVirtualOwnerDraw{$ENDIF}: - Result := ItemHeight; - lbOwnerDrawVariable: - begin - Result := ItemHeight; - if (AIndex < Count) and Assigned(FInnerListBox.OnMeasureItem) then - FInnerListBox.OnMeasureItem(Self, AIndex, Result); - end; - end; - end; - -var - I: Integer; - ABorderExtent: TRect; - AItemHeight: Integer; - AListClientSize, AListSize, AScrollBarSize: TSize; - AScrollWidth: Integer; - AVScrollBar: Boolean; -begin - ABorderExtent := GetBorderExtent; - AListClientSize.cy := ABorderExtent.Top + ABorderExtent.Bottom; - AScrollBarSize := GetScrollBarSize; - AScrollWidth := ScrollWidth; - if AScrollWidth > 0 then - Inc(AScrollWidth, 4); - I := FInnerHeader.Height; - repeat - AItemHeight := GetItemHeight(I); - AListClientSize.cy := AListClientSize.cy + AItemHeight; - AListSize.cy := AListClientSize.cy; - AListClientSize.cx := Width - (ABorderExtent.Left + ABorderExtent.Right); - AVScrollBar := I + 1 < Count; - if AVScrollBar then - AListClientSize.cx := AListClientSize.cx - AScrollBarSize.cx; - if AListClientSize.cx < AScrollWidth then - AListSize.cy := AListSize.cy + AScrollBarSize.cy; - if AListSize.cy = ANewHeight then - Break; - if AListSize.cy > ANewHeight then - begin - if I > 0 then - begin - AListClientSize.cy := AListClientSize.cy - AItemHeight; - AListSize.cy := AListClientSize.cy; - AListClientSize.cx := Width - (ABorderExtent.Left + ABorderExtent.Right); - AVScrollBar := I < Count; - if AVScrollBar then - AListClientSize.cx := AListClientSize.cx - AScrollBarSize.cx; - if AListClientSize.cx < AScrollWidth then - AListSize.cy := AListSize.cy + AScrollBarSize.cy; - end; - Break; - end; - Inc(I); - until False; - ANewHeight := AListSize.cy; -end; - -function TcxMCListBox.CalcCellTextRect(AApproximateRect: TRect; AItemIndex, AColumnIndex: Integer): TRect; -begin - Result := AApproximateRect; - DrawCellTextEx(Result, DT_CALCRECT or DT_NOPREFIX or DT_VCENTER, AItemIndex, AColumnIndex); -end; - -procedure TcxMCListBox.DrawCellTextEx(var ARect: TRect; AFlags, AItemIndex, AColumnIndex: Integer); - - function GetDrawTextParams: TDrawTextParams; - begin - Result.cbSize := SizeOf(TDrawTextParams); - Result.iTabLength := TabWidth; - Result.iLeftMargin := 0; - Result.iRightMargin := 0; - end; - - function GetTextFlag(const AStartFlag: Longint): Longint; - const - ShowEndEllipsisArray: array[Boolean] of Integer = (0, DT_END_ELLIPSIS); - WordWrapArray: array[Boolean] of Integer = (0, DT_WORDBREAK); - begin - Result := AStartFlag or - SystemAlignmentsHorz[HeaderSections[AColumnIndex].Alignment] or - WordWrapArray[MultiLines] or ShowEndEllipsisArray[ShowEndEllipsis]; - if not MultiLines then - Result := Result or DT_SINGLELINE; - if FInnerListBox.TabWidth > 0 then - Result := Result or DT_EXPANDTABS or DT_TABSTOP; - end; - -var - ADrawTextParams: TDrawTextParams; - AText: string; -begin - ADrawTextParams := GetDrawTextParams; - AText := GetTextPart(AItemIndex, AColumnIndex); - DrawTextEx(FInnerListBox.Canvas.Handle, PChar(AText), - Length(AText), ARect, GetTextFlag(AFlags), @ADrawTextParams); -end; - -procedure TcxMCListBox.DrawCellText(ARect: TRect; AItemIndex, AColumnIndex: Integer); -begin - DrawCellTextEx(ARect, DT_NOPREFIX or DT_VCENTER, AItemIndex, AColumnIndex); -end; - -function TcxMCListBox.GetCellRect(AItemIndex, AColumnIndex, - ATop, ABottom: Integer; AVScrollBarVisible: Boolean): TRect; -var - AHeaderSectionRect: TRect; - I: Integer; -begin - AHeaderSectionRect := GetHeaderSectionRect(AColumnIndex, AVScrollBarVisible); - Result := Rect(AHeaderSectionRect.Left + 2, ATop, AHeaderSectionRect.Right - 2, ABottom); - if OverflowEmptyColumn then - for I := AColumnIndex + 1 to HeaderSections.Count - 1 do - if GetTextPart(AItemIndex, I) = '' then - Result.Right := Result.Right + RectWidth(GetHeaderSectionRect(I, AVScrollBarVisible)) - else - Break; -end; - -function TcxMCListBox.GetCellTextRect(AItemIndex, AColumnIndex, - ATop, ABottom: Integer; AVScrollBarVisible: Boolean): TRect; -begin - Result := CalcCellTextRect(GetCellRect(AItemIndex, AColumnIndex, ATop, ABottom, AVScrollBarVisible), - AItemIndex, AColumnIndex); -end; - -function TcxMCListBox.GetDelimiter: Char; -begin - Result := FDelimiter; -end; - -function TcxMCListBox.GetImages: TCustomImageList; -begin - Result := FInnerHeader.Images; -end; - -procedure TcxMCListBox.SetImages(Value: TCustomImageList); -begin - FInnerHeader.Images := Value; - FInnerHeader.UpdateHeight; -end; - -function TcxMCListBox.GetHeaderSectionRect(AIndex: Integer; - AVScrollBarVisible: Boolean): TRect; -begin - if AVScrollBarVisible then - Result := FInnerHeaderSectionRectsWithScrollbar[AIndex] - else - Result := FInnerHeaderSectionRectsWithoutScrollbar[AIndex]; -end; - -function TcxMCListBox.GetHeaderSections: TcxHeaderSections; -begin - Result := FInnerHeader.Sections; -end; - -procedure TcxMCListBox.SetHeaderSections(Value: TcxHeaderSections); -begin - FInnerHeader.Sections := Value; -end; - -procedure TcxMCListBox.SetAlignment(Value: TAlignment); -var - I: Integer; -begin - if FAlignment <> Value then - begin - FAlignment := Value; - for I := 0 to Pred(HeaderSections.Count) do - HeaderSections[I].Alignment := FAlignment; - FullRepaint; - end; -end; - -procedure TcxMCListBox.SetMultiLines(Value: Boolean); -begin - if FMultiLines <> Value then - begin - FMultiLines := Value; - FullRepaint; - end; -end; - -procedure TcxMCListBox.SetShowEndEllipsis(Value: Boolean); -begin - if FShowEndEllipsis <> Value then - begin - FShowEndEllipsis := Value; - FullRepaint; - end; -end; - -procedure TcxMCListBox.SetDelimiter(Value: Char); -begin - if FDelimiter <> Value then - begin - FDelimiter := Value; - FullRepaint; - end; -end; - -function TcxMCListBox.GetHeaderDragReorder: Boolean; -begin - Result := FInnerHeader.DragReorder; -end; - -procedure TcxMCListBox.SetHeaderDragReorder(Value: Boolean); -begin - FInnerHeader.DragReorder := Value; -end; - -procedure TcxMCListBox.SetShowColumnLines(Value: Boolean); -begin - if FShowColumnLines <> Value then - begin - FShowColumnLines := Value; - FullRepaint; - end; -end; - -procedure TcxMCListBox.SetShowHeader(Value: Boolean); -begin - if Value <> FShowHeader then - begin - FShowHeader := Value; - FInnerHeader.UpdateHeight; - end; -end; - -procedure TcxMCListBox.SetColumnLineColor(Value: TColor); -begin - if FColumnLineColor <> Value then - begin - FColumnLineColor := Value; - FullRepaint; - end; -end; - -procedure TcxMCListBox.SetOverflowEmptyColumn(Value: Boolean); -begin - if FOverflowEmptyColumn <> Value then - begin - FOverflowEmptyColumn := Value; - FullRepaint; - end; -end; - -procedure TcxMCListBox.SectionEndResizeHandler(HeaderControl: TcxCustomHeader; - Section: TcxHeaderSection); -begin - FullRepaint; -end; - -procedure TcxMCListBox.SectionsChangeHandler(Sender: TObject); -begin - FullRepaint; -end; - -procedure TcxMCListBox.HScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); -begin - if Assigned(FSavedHScroll) then FSavedHScroll(Sender, ScrollCode, ScrollPos); -end; - -procedure TcxMCListBox.SectionEndDragHandler(Sender: TObject); -begin - FInnerListBox.Invalidate; -end; - -procedure TcxMCListBox.SectionTrackHandler(HeaderControl: TcxCustomHeader; - Section: TcxHeaderSection; Width: Integer; State: TcxSectionTrackState); -begin - if (State = tsTrackEnd) then - FullRepaint; -end; - -procedure TcxMCListBox.FullRepaint; -begin - Canvas.Canvas.Lock; - try - if Count = 0 then - FInnerListBox.FullRepaint - else - begin - FSavedIndex := ItemIndex; - FInternalPaint := True; - FInnerListBox.RecalcItemRects; - FInnerListBox.FullRepaint; - FInnerListBox.ItemIndex := FSavedIndex; - end; - finally - FInternalPaint := False; - Canvas.Canvas.Unlock; - end; -end; - -procedure TcxMCListBox.SectionSortChangedHandler(Sender: TObject; - const Section: TcxHeaderSection; const ASortOrder: TcxHeaderSortOrder); -var - TmpList: TMCStringList; -begin - if ASortOrder = soNone then - Exit; - - TmpList := TMCStringList.Create; - try - Items.BeginUpdate; - try - TmpList.Assign(Items); - try - TmpList.Delimiter := FDelimiter; - TmpList.SortOrder := ASortOrder; - - if ASortOrder = soNone then - TmpList.SortColumn := -1 - else - TmpList.SortColumn := Succ(Section.DataIndex); - - TmpList.Sort; - finally - Items.Assign(TmpList); - end; - finally - Items.EndUpdate; - end; - finally - TmpList.Free; - end; -end; - -function TcxMCListBox.GetTextPart(AItemIndex, AColumnIndex: Integer): string; -var - APartIndex: Integer; -begin - APartIndex := HeaderSections[AColumnIndex].DataIndex; - if APartIndex < 0 then - Result := '' - else - Result := GetWord(APartIndex + 1, Items[AItemIndex], FDelimiter); -end; - -procedure TcxMCListBox.DrawItem(Control: TWinControl; Index: Integer; - ARect: TRect; State: TOwnerDrawState); - - procedure AdjustCanvasColors; - var - ABackgroundColor, ATextColor: TColor; - begin - if (not FInternalPaint and (odSelected in State)) or - (FInternalPaint and (FSavedIndex = Index)) then - begin - ABackgroundColor := LookAndFeelPainter.DefaultSelectionColor; - ATextColor := LookAndFeelPainter.DefaultSelectionTextColor; - end else - begin - ABackgroundColor := GetBackgroundColor; - ATextColor := VisibleFont.Color; - end; - FInnerListBox.Canvas.Brush.Color := ABackgroundColor; - FInnerListBox.Canvas.Font.Color := ATextColor; - end; - - procedure DrawColumnSectionText(AColumnIndex: Integer); - var - ATextRect: TRect; - begin - ATextRect := GetCellRect(Index, AColumnIndex, ARect.Top, ARect.Bottom, - InnerListBox.VScrollBarVisible); - DrawCellText(ATextRect, Index, AColumnIndex); - FInnerListBox.Canvas.ExcludeClipRect(ATextRect); - end; - - procedure DrawColumnSectionLine(AColumnIndex: Integer); - begin - FInnerListBox.Canvas.Pen.Color := ColumnLineColor; - FInnerListBox.Canvas.Pen.Width := 1; - FInnerListBox.Canvas.MoveTo(GetHeaderSectionRect(AColumnIndex, InnerListBox.VScrollBarVisible).Right, ARect.Top); - FInnerListBox.Canvas.LineTo(GetHeaderSectionRect(AColumnIndex, InnerListBox.VScrollBarVisible).Right, ARect.Bottom); - end; - -var - I: Integer; -begin - AdjustCanvasColors; - FInnerListBox.Canvas.FillRect(ARect); - for I := 0 to HeaderSections.Count - 1 do - begin - DrawColumnSectionText(I); - if ShowColumnLines then - DrawColumnSectionLine(I); - end; -end; - -procedure TcxMCListBox.MeasureItem(Control: TWinControl; Index: Integer; var Height: Integer); -begin - Height := CalcItemHeight(Index, InnerListBox.VScrollBarVisible); -end; - -procedure TcxMCListBox.CalcHeaderSectionRects; - - procedure InternalCalcHeaderSectionRects(AHeaderWidth: Integer; - out ASectionRects: TcxHeaderSectionRects); - var - ASectionWidths: TcxHeaderSectionWidths; - I: Integer; - begin - InnerHeader.CalcSectionWidths(AHeaderWidth, ASectionWidths); - SetLength(ASectionRects, InnerHeader.Sections.Count); - for I := 0 to InnerHeader.Sections.Count - 1 do - ASectionRects[I] := InnerHeader.GetSectionRectBySectionWidths(AHeaderWidth, ASectionWidths, I); - end; - -begin - InternalCalcHeaderSectionRects(FInnerPanel.ClientWidth, FInnerHeaderSectionRectsWithoutScrollbar); - InternalCalcHeaderSectionRects(FInnerPanel.ClientWidth - GetScrollBarSize.cx, FInnerHeaderSectionRectsWithScrollbar); -end; - -function TcxMCListBox.CalcItemHeight(AIndex: Integer; AVScrollBarVisible: Boolean): Integer; -var - I, ATextHeight: Integer; - ACalcRect: TRect; -begin - Result := GetItemHeight; - ATextHeight := FInnerListBox.Canvas.TextHeight('Wq'); - if ATextHeight > Result then - Result := ATextHeight; - for I := 0 to HeaderSections.Count - 1 do - begin - ACalcRect := GetCellTextRect(AIndex, I, 0, Result, AVScrollBarVisible); - if RectHeight(ACalcRect) > Result then - Result := RectHeight(ACalcRect); - end; -end; - -function TcxMCListBox.GetCount: Integer; -begin - Result := FInnerListBox.Items.Count; -end; - -function TcxMCListBox.GetExtendedSelect: Boolean; -begin - Result := FInnerListBox.ExtendedSelect; -end; - -function TcxMCListBox.GetItemHeight: Integer; -begin - Result := FInnerListBox.ItemHeight; -end; - -function TcxMCListBox.GetItemIndex: Integer; -begin - Result := FInnerListBox.ItemIndex; -end; - -function TcxMCListBox.GetItems: TStrings; -begin - Result := FInnerListBox.Items; -end; - -function TcxMCListBox.GetMultiSelect: Boolean; -begin - Result := FInnerListBox.MultiSelect; -end; - -function TcxMCListBox.GetReadOnly: Boolean; -begin - Result := DataBinding.ReadOnly; -end; - -function TcxMCListBox.GetSelCount: Integer; -begin - Result := FInnerListBox.SelCount; -end; - -function TcxMCListBox.GetSelected(Index: Integer): Boolean; -begin - Result := FInnerListBox.Selected[Index]; -end; - -function TcxMCListBox.GetSorted: Boolean; -begin - Result := FInnerListBox.Sorted; -end; - -function TcxMCListBox.GetTopIndex: Integer; -begin - Result := FInnerListBox.TopIndex; -end; - -procedure TcxMCListBox.SetExtendedSelect(Value: Boolean); -begin - FInnerListBox.ExtendedSelect := Value; -end; - -procedure TcxMCListBox.SetItemHeight(Value: Integer); -begin - FInnerListBox.ItemHeight := Value; - FullRepaint; -end; - -procedure TcxMCListBox.SetItemIndex(Value: Integer); -begin - FInnerListBox.ItemIndex := Value; -end; - -procedure TcxMCListBox.SetItems(Value: TStrings); -begin - FInnerListBox.Items.Assign(Value); - DataChange; -end; - -procedure TcxMCListBox.SetMultiSelect(Value: Boolean); -begin - FInnerListBox.MultiSelect := Value; -end; - -procedure TcxMCListBox.SetReadOnly(Value: Boolean); -begin - DataBinding.ReadOnly := Value; -end; - -procedure TcxMCListBox.SetSelected(Index: Integer; Value: Boolean); -begin - FInnerListBox.Selected[Index] := Value; -end; - -procedure TcxMCListBox.SetSorted(Value: Boolean); -begin - FInnerListBox.Sorted := Value; -end; - -procedure TcxMCListBox.SetTopIndex(Value: Integer); -begin - FInnerListBox.TopIndex := Value; -end; - -function TcxMCListBox.GetAutoComplete: Boolean; -begin - Result := FInnerListBox.AutoComplete; -end; - -function TcxMCListBox.GetAutoCompleteDelay: Cardinal; -begin - Result := FInnerListBox.AutoCompleteDelay; -end; - -procedure TcxMCListBox.SetAutoComplete(Value: Boolean); -begin - FInnerListBox.AutoComplete := Value; -end; - -procedure TcxMCListBox.SetAutoCompleteDelay(Value: Cardinal); -begin - FInnerListBox.AutoCompleteDelay := Value; -end; - -function TcxMCListBox.GetScrollWidth: Integer; -begin - Result := FInnerListBox.ScrollWidth; -end; - -function TcxMCListBox.GetTabWidth: Integer; -begin - Result := FInnerListBox.TabWidth; -end; - -procedure TcxMCListBox.SetIntegralHeight(Value: Boolean); -begin - if Value <> FIntegralHeight then - begin - FIntegralHeight := Value; - SetSize; - end; -end; - -procedure TcxMCListBox.SetScrollWidth(Value: Integer); -begin - FInnerListBox.ScrollWidth := Value; -end; - -procedure TcxMCListBox.SetTabWidth(Value: Integer); -begin - FInnerListBox.Items.BeginUpdate; - try - FInnerListBox.TabWidth := Value; - finally - FInnerListBox.Items.EndUpdate; - end; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxMRUEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxMRUEdit.pas deleted file mode 100644 index b3875b0e..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxMRUEdit.pas +++ /dev/null @@ -1,473 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxMRUEdit; - -{$I cxVer.inc} - -interface - -uses - Messages, -{$IFDEF DELPHI6} - Types, -{$ENDIF} - SysUtils, Classes, Controls, Graphics, cxContainer, cxEdit, - cxDropDownEdit, cxFilterControlUtils; - -type - TcxCustomMRUEditProperties = class; - - TcxMRUEditDeleteLookupItemEvent = procedure(AProperties: TcxCustomMRUEditProperties; - AItemIndex: Integer) of object; - - { TcxCustomMRUEditProperties } - - TcxCustomMRUEditProperties = class(TcxCustomComboBoxProperties) - private - FMaxItemCount: Integer; - FShowEllipsis: Boolean; - FOnButtonClick: TNotifyEvent; - FOnDeleteLookupItem: TcxMRUEditDeleteLookupItemEvent; - procedure CheckItemCount; - procedure SetMaxItemCount(Value: Integer); - procedure SetShowEllipsis(Value: Boolean); - protected - procedure DoDeleteLookupItem(AItemIndex: Integer); - procedure DoOnNewLookupDisplayText(const AText: string); virtual; - procedure InternalAddItem(const AItem: string; - ARaiseOnNewLookupDisplayTextEvent: Boolean); virtual; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - procedure Update(AProperties: TcxCustomEditProperties); override; - procedure AddItem(const AItem: string); - // !!! - property MaxItemCount: Integer read FMaxItemCount write SetMaxItemCount - default 0; - property ShowEllipsis: Boolean read FShowEllipsis write SetShowEllipsis - default True; - property OnButtonClick: TNotifyEvent - read FOnButtonClick write FOnButtonClick; - property OnDeleteLookupItem: TcxMRUEditDeleteLookupItemEvent - read FOnDeleteLookupItem write FOnDeleteLookupItem; - end; - - { TcxMRUEditProperties } - - TcxMRUEditProperties = class(TcxCustomMRUEditProperties) - published - property Alignment; - property AssignedValues; - property AutoSelect; - property BeepOnError; - property ButtonGlyph; - property CaseInsensitive; - property CharCase; - property ClearKey; - property ClickKey; - property DropDownAutoWidth; - property DropDownListStyle; - property DropDownRows; - property DropDownSizeable; - property DropDownWidth; - property HideSelection; - property IgnoreMaskBlank; - property ImeMode; - property ImeName; - property ImmediateDropDown; - property ImmediatePost; - property ImmediateUpdateText; - property ItemHeight; - property LookupItems; - property MaskKind; - property EditMask; - property MaxItemCount; - property MaxLength; - property OEMConvert; - property PopupAlignment; - property PostPopupValueOnTab; - property ReadOnly; - property Revertable; - property ShowEllipsis; - property UseLeftAlignmentOnEditing; - property ValidateOnEnter; - property OnButtonClick; - property OnChange; - property OnCloseUp; - property OnDeleteLookupItem; - property OnDrawItem; - property OnEditValueChanged; - property OnInitPopup; - property OnMeasureItem; - property OnNewLookupDisplayText; - property OnPopup; - property OnValidate; - end; - - { TcxMRUEditProperties } - - TcxCustomMRUEdit = class(TcxCustomComboBox) - private - function GetProperties: TcxCustomMRUEditProperties; - function GetActiveProperties: TcxCustomMRUEditProperties; - procedure SetProperties(Value: TcxCustomMRUEditProperties); - protected - procedure DoButtonClick(AButtonVisibleIndex: Integer); override; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); override; - procedure HandleSelectItem(Sender: TObject); override; - procedure InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); override; - function SupportsSpelling: Boolean; override; - procedure PropertiesChanged(Sender: TObject); override; - public - procedure AddItem(const Value: string); virtual; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCustomMRUEditProperties read GetActiveProperties; - property Properties: TcxCustomMRUEditProperties read GetProperties - write SetProperties; - end; - - { TcxMRUEdit } - - TcxMRUEdit = class(TcxCustomMRUEdit) - private - function GetActiveProperties: TcxMRUEditProperties; - function GetProperties: TcxMRUEditProperties; - procedure SetProperties(Value: TcxMRUEditProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxMRUEditProperties read GetActiveProperties; - property ItemIndex; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxMRUEditProperties read GetProperties write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Text; - {$IFDEF DELPHI12} - property TextHint; - {$ENDIF} - property Visible; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -uses - Windows, cxControls, cxEditConsts, cxTextEdit; - -{ TcxCustomMRUEditProperties } - -constructor TcxCustomMRUEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FMaxItemCount := 0; - FShowEllipsis := True; - Buttons.Add; - GlyphButtonIndex := 1; - Buttons[1].Kind := bkEllipsis; - Buttons[1].Default := True; - DropDownListStyle := lsEditList; - MRUMode := True; -end; - -procedure TcxCustomMRUEditProperties.CheckItemCount; -begin - if FMaxItemCount > 0 then - while Items.Count > FMaxItemCount do - begin - DoDeleteLookupItem(Items.Count - 1); - Items.Delete(Items.Count - 1); - end; -end; - -procedure TcxCustomMRUEditProperties.SetMaxItemCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FMaxItemCount <> Value then - begin - FMaxItemCount := Value; - CheckItemCount; - Changed; - end; -end; - -procedure TcxCustomMRUEditProperties.SetShowEllipsis(Value: Boolean); -begin - if FShowEllipsis <> Value then - try - BeginUpdate; - FShowEllipsis := Value; - Buttons[1].Visible := Value; - if Value then - GlyphButtonIndex := 1 - else - GlyphButtonIndex := 0; - finally - EndUpdate; - end; -end; - -procedure TcxCustomMRUEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomMRUEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with TcxCustomMRUEditProperties(Source) do - begin - Self.MaxItemCount := MaxItemCount; - Self.ShowEllipsis := ShowEllipsis; - Self.OnButtonClick := OnButtonClick; - Self.OnDeleteLookupItem := OnDeleteLookupItem; - end; - finally - EndUpdate - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomMRUEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxMRUEdit; -end; - -procedure TcxCustomMRUEditProperties.Update(AProperties: TcxCustomEditProperties); -begin - if AProperties is TcxCustomMRUEditProperties then - TcxCustomMRUEditProperties(AProperties).LookupItems.Assign(LookupItems); -end; - -procedure TcxCustomMRUEditProperties.AddItem(const AItem: string); -begin - InternalAddItem(AItem, True); -end; - -procedure TcxCustomMRUEditProperties.DoDeleteLookupItem(AItemIndex: Integer); -begin - if Assigned(FOnDeleteLookupItem) then - FOnDeleteLookupItem(Self, AItemIndex); -end; - -procedure TcxCustomMRUEditProperties.DoOnNewLookupDisplayText( - const AText: string); -begin - if Assigned(OnNewLookupDisplayText) then - OnNewLookupDisplayText(Self, AText); -end; - -procedure TcxCustomMRUEditProperties.InternalAddItem(const AItem: string; - ARaiseOnNewLookupDisplayTextEvent: Boolean); -var - I: Integer; -begin - if AItem = '' then - Exit; - I := LookupItems.IndexOf(AItem); - if I <> 0 then - if I = -1 then - begin - if ARaiseOnNewLookupDisplayTextEvent then - DoOnNewLookupDisplayText(AItem); - LookupItems.Insert(0, AItem); - CheckItemCount; - end - else - LookupItems.Move(I, 0); -end; - -{ TcxCustomMRUEdit } - -function TcxCustomMRUEdit.GetProperties: TcxCustomMRUEditProperties; -begin - Result := TcxCustomMRUEditProperties(FProperties); -end; - -function TcxCustomMRUEdit.GetActiveProperties: TcxCustomMRUEditProperties; -begin - Result := TcxCustomMRUEditProperties(InternalGetActiveProperties); -end; - -procedure TcxCustomMRUEdit.SetProperties(Value: TcxCustomMRUEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomMRUEdit.DoButtonClick(AButtonVisibleIndex: Integer); -begin - if AButtonVisibleIndex = 1 then - begin - with Properties do - if Assigned(OnButtonClick) then - OnButtonClick(Self); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnButtonClick) then - OnButtonClick(Self); - end; -end; - -procedure TcxCustomMRUEdit.DoEditKeyDown(var Key: Word; Shift: TShiftState); -begin - if (Key = VK_RETURN) and not(ssAlt in Shift) and - (not HasPopupWindow or (TcxCustomEditListBox(ILookupData.ActiveControl).ItemIndex = -1)) then - AddItem(Text); - inherited DoEditKeyDown(Key, Shift); -end; - -procedure TcxCustomMRUEdit.HandleSelectItem(Sender: TObject); -begin - inherited HandleSelectItem(Sender); - if not LookupItemsScrolling and DoEditing then - AddItem(Text); -end; - -procedure TcxCustomMRUEdit.InternalValidateDisplayValue( - const ADisplayValue: TcxEditValue); -begin - AddItem(Text); - inherited InternalValidateDisplayValue(ADisplayValue); -end; - -function TcxCustomMRUEdit.SupportsSpelling: Boolean; -begin - Result := IsTextInputMode; -end; - -procedure TcxCustomMRUEdit.PropertiesChanged(Sender: TObject); -begin - with ActiveProperties do - if ShowEllipsis then - if ButtonGlyph.Empty then - Buttons[1].Kind := bkEllipsis - else - Buttons[1].Kind := bkGlyph - else - if ButtonGlyph.Empty then - Buttons[0].Kind := bkDown - else - Buttons[0].Kind := bkGlyph; - inherited PropertiesChanged(Sender); -end; - -procedure TcxCustomMRUEdit.AddItem(const Value: string); -begin - if Value <> '' then - begin - if ActiveProperties.LookupItems.IndexOf(Value) = -1 then - DoOnNewLookupDisplayText(Value); - ActiveProperties.InternalAddItem(Value, False); - end; -end; - -class function TcxCustomMRUEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomMRUEditProperties; -end; - -{ TcxMRUEdit } - -class function TcxMRUEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxMRUEditProperties; -end; - -function TcxMRUEdit.GetActiveProperties: TcxMRUEditProperties; -begin - Result := TcxMRUEditProperties(InternalGetActiveProperties); -end; - -function TcxMRUEdit.GetProperties: TcxMRUEditProperties; -begin - Result := TcxMRUEditProperties(FProperties); -end; - -procedure TcxMRUEdit.SetProperties(Value: TcxMRUEditProperties); -begin - FProperties.Assign(Value); -end; - -initialization - GetRegisteredEditProperties.Register(TcxMRUEditProperties, scxSEditRepositoryMRUItem); - FilterEditsController.Register(TcxMRUEditProperties, TcxFilterTextEditHelper); - -finalization - FilterEditsController.Unregister(TcxMRUEditProperties, TcxFilterTextEditHelper); - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxMaskEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxMaskEdit.pas deleted file mode 100644 index 05a23601..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxMaskEdit.pas +++ /dev/null @@ -1,3217 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxMaskEdit; - -{$I cxVer.inc} - -interface - -uses - {$IFDEF DELPHI6} - Variants, - {$ENDIF} - Windows, - Messages, - SysUtils, Classes, Controls, StdCtrls, Clipbrd, cxClasses, cxControls, cxContainer, - cxDataStorage, cxDataUtils, cxEdit, cxTextEdit, cxEditConsts, cxRegExpr, - cxStandardMask, cxFilterControlUtils; - -type - TcxEditMask = type string; - TcxEditMaskKind = (emkStandard, emkRegExpr, emkRegExprEx); - - TcxCustomMaskEdit = class; - TcxCustomMaskEditProperties = class; - - { EcxMaskEditError } - - EcxMaskEditError = class(EcxEditError); - - { TcxMaskEditCustomMode } - - TcxMaskEditCustomMode = class - private - FCharCase: TEditCharCase; - FEchoMode: TcxEditEchoMode; - FEditMask: string; - FProperties: TcxCustomMaskEditProperties; - function GetProperties: TcxCustomMaskEditProperties; - protected - FClipboardTextLength: Integer; - FEdit: TcxCustomMaskEdit; - FNeedUpdateEditValue: Boolean; - procedure ClearText; - function GetMaskKind: TcxEditMaskKind; virtual; - function HasEdit: Boolean; - property CharCase: TEditCharCase read FCharCase write FCharCase; - property EchoMode: TcxEditEchoMode read FEchoMode write FEchoMode; - property EditMask: string read FEditMask; - property Properties: TcxCustomMaskEditProperties read GetProperties; - public - constructor Create(AEdit: TcxCustomMaskEdit; AProperties: TcxCustomMaskEditProperties); virtual; - procedure AfterPasteFromClipboard; virtual; abstract; - procedure BeepOnError; - procedure Compile(AMask: string); virtual; abstract; - function GetEmptyString: string; virtual; abstract; - function GetFormattedText(AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; virtual; abstract; - procedure GotoEnd; virtual; abstract; - function IsCursorBegin: Boolean; virtual; abstract; - function IsCursorEnd: Boolean; virtual; abstract; - function IsFullValidText(AText: string): Boolean; virtual; abstract; - procedure LMouseDown; virtual; abstract; - procedure PrePasteFromClipboard; virtual; abstract; - function PressBackSpace: Boolean; virtual; abstract; - function PressDelete: Boolean; virtual; abstract; - function PressEnd: Boolean; virtual; abstract; - function PressHome: Boolean; virtual; abstract; - function PressLeft: Boolean; virtual; abstract; - function PressRight: Boolean; virtual; abstract; - function PressSymbol(var ASymbol: Char): Boolean; virtual; abstract; - procedure SetText(AText: string); virtual; abstract; - procedure SynchronizeEditValue; virtual; - procedure UpdateEditValue; virtual; abstract; - function GetUpdatedText(const AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; virtual; abstract; - property ClipboardTextLength: Integer read FClipboardTextLength write FClipboardTextLength; - end; - - TcxMaskEditCustomModeClass = class of TcxMaskEditCustomMode; - - { TcxMaskEditStandardMode } - - TcxMaskEditStandardMode = class(TcxMaskEditCustomMode) - protected - FMask: TcxStandardMask; - FSelStart: Integer; - function GetBlank(APos: Integer): Char; virtual; - public - constructor Create(AEdit: TcxCustomMaskEdit; AProperties: TcxCustomMaskEditProperties); override; - destructor Destroy; override; - procedure AfterPasteFromClipboard; override; - procedure Compile(AMask: string); override; - function GetEmptyString: string; override; - function GetFormattedText(AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; override; - procedure GotoEnd; override; - function IsCursorBegin: Boolean; override; - function IsCursorEnd: Boolean; override; - function IsFullValidText(AText: string): Boolean; override; - procedure LMouseDown; override; - procedure PrePasteFromClipboard; override; - function PressBackSpace: Boolean; override; - function PressDelete: Boolean; override; - function PressEnd: Boolean; override; - function PressHome: Boolean; override; - function PressLeft: Boolean; override; - function PressRight: Boolean; override; - function PressSymbol(var ASymbol: Char): Boolean; override; - procedure SetText(AText: string); override; - procedure SynchronizeEditValue; override; - procedure UpdateEditValue; override; - function GetUpdatedText(const AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; override; - end; - - { TcxMaskEditRegExprMode } - - TcxMaskEditRegExprMode = class(TcxMaskEditCustomMode) - protected - FBeginCursor: Boolean; - FHead: string; - FRegExpr: TcxRegExpr; - FSelect: string; - FTail: string; - FMouseAction: Boolean; - procedure ClearTail; - function CompileRegExpr(ARegExpr: TcxRegExpr): Boolean; - procedure CursorCorrection; - procedure DeleteSelection; virtual; - function GetMaskKind: TcxEditMaskKind; override; - function NextTail: Boolean; - procedure RestoreSelection; virtual; - public - constructor Create(AEdit: TcxCustomMaskEdit; AProperties: TcxCustomMaskEditProperties); override; - destructor Destroy; override; - procedure AfterPasteFromClipboard; override; - procedure Compile(AMask: string); override; - function GetEmptyString: string; override; - function GetFormattedText(AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; override; - procedure GotoEnd; override; - function IsCursorBegin: Boolean; override; - function IsCursorEnd: Boolean; override; - function IsFullValidText(AText: string): Boolean; override; - procedure LMouseDown; override; - procedure PrePasteFromClipboard; override; - function PressBackSpace: Boolean; override; - function PressDelete: Boolean; override; - function PressEnd: Boolean; override; - function PressHome: Boolean; override; - function PressLeft: Boolean; override; - function PressRight: Boolean; override; - function PressSymbol(var ASymbol: Char): Boolean; override; - procedure SetText(AText: string); override; - procedure SetRegExprCaseInsensitive; - procedure SynchronizeEditValue; override; - procedure UpdateEditValue; override; - function GetUpdatedText(const AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; override; - end; - - { TcxMaskEditRegExprExMode } - - TcxMaskEditRegExprExMode = class(TcxMaskEditRegExprMode) - private - FInternalUpdate: string; - procedure InternalSymbolUpdate(ASymbol: Char); - protected - FDeleteNumber: Integer; - FNewCursorPos: Integer; - FUpdate: string; - procedure Clear; - procedure CursorCorrection; - procedure DeleteSelection; override; - function GetMaskKind: TcxEditMaskKind; override; - procedure RestoreSelection; override; - procedure SymbolDelete; - procedure SymbolUpdate(ASymbol: Char); - procedure UpdateTail; - public - constructor Create(AEdit: TcxCustomMaskEdit; AProperties: TcxCustomMaskEditProperties); override; - destructor Destroy; override; - procedure AfterPasteFromClipboard; override; - procedure Compile(AMask: string); override; - function GetEmptyString: string; override; - function GetFormattedText(AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; override; - procedure GotoEnd; override; - function IsFullValidText(AText: string): Boolean; override; - procedure PrePasteFromClipboard; override; - function PressBackSpace: Boolean; override; - function PressDelete: Boolean; override; - function PressEnd: Boolean; override; - function PressHome: Boolean; override; - function PressLeft: Boolean; override; - function PressRight: Boolean; override; - function PressSymbol(var ASymbol: Char): Boolean; override; - procedure SetText(AText: string); override; - procedure UpdateEditValue; override; - end; - - { TcxCustomMaskEditProperties } - - TcxCustomMaskEditProperties = class(TcxCustomTextEditProperties) - private - FAlwaysShowBlanksAndLiterals: Boolean; - FCaseInsensitive: Boolean; - FEditMask: TcxEditMask; - FEmptyString: string; - FIgnoreMaskBlank: Boolean; - FMaskKind: TcxEditMaskKind; - FMaxLengthSetting: Boolean; - FTempMode: TcxMaskEditCustomMode; - function CreateMode: TcxMaskEditCustomMode; - function CreateMode1: TcxMaskEditCustomMode; - function GetEditMask: TcxEditMask; - function GetIsMasked: Boolean; - procedure SetAlwaysShowBlanksAndLiterals(AValue: Boolean); - procedure SetCaseInsensitive(AValue: Boolean); - procedure SetEditMask(Value: TcxEditMask); - procedure SetMaskKind(Value: TcxEditMaskKind); - function SpaceToken(AToken: Char): Boolean; - function TestTempEditMask: Boolean; - function TestTempMaskKind: Boolean; - protected - function EmptyMask(AMask: string): Boolean; - procedure DoChanged; override; - function GetEmptyString: string; - procedure SetCharCase(Value: TEditCharCase); override; - function GetDisplayFormatOptions: TcxEditDisplayFormatOptions; override; - function GetModeClass(AMaskKind: TcxEditMaskKind): TcxMaskEditCustomModeClass; virtual; - procedure MaxLengthChanged; override; - function UseLookupData: Boolean; override; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; -// function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; - AEditFocused: Boolean); override; - procedure ValidateDisplayValue(var ADisplayValue: TcxEditValue; var AErrorText: TCaption; - var Error: Boolean; AEdit: TcxCustomEdit); override; - public - property IsMasked: Boolean read GetIsMasked; - // !!! - property AlwaysShowBlanksAndLiterals: Boolean - read FAlwaysShowBlanksAndLiterals write SetAlwaysShowBlanksAndLiterals - default False; - property CaseInsensitive: Boolean read FCaseInsensitive - write SetCaseInsensitive default True; - property EditMask: TcxEditMask read GetEditMask write SetEditMask; - property IgnoreMaskBlank: Boolean read FIgnoreMaskBlank - write FIgnoreMaskBlank default False; - property MaskKind: TcxEditMaskKind read FMaskKind write SetMaskKind - default emkStandard; - property ValidateOnEnter default True; - end; - - TcxMaskEditProperties = class; - - { TcxCustomMaskEdit } - - TcxCustomMaskEdit = class(TcxCustomTextEdit) - private - FInternalTextSelection: Boolean; - FMode: TcxMaskEditCustomMode; - FMyMessage: Boolean; - FShiftOn: Boolean; - FText: string; - function GetEditText: TCaption; - function GetProperties: TcxCustomMaskEditProperties; - function GetActiveProperties: TcxCustomMaskEditProperties; - function InternalGetEmptyString: string; - procedure InternalSetValue(AValue: string); - function IsCursorBegin: Boolean; - function IsCursorEnd: Boolean; - procedure SetEditText(AValue: TCaption); - procedure SetProperties(Value: TcxCustomMaskEditProperties); - procedure SendMyKeyDown(Key: Word; Shift: TShiftState); - procedure SendMyKeyPress(AKey: Char); - protected - procedure ChangeHandler(Sender: TObject); override; - procedure DblClick; override; - procedure DoEnter; override; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); override; - procedure DoEditKeyPress(var Key: Char); override; - procedure DoEditKeyUp(var Key: Word; Shift: TShiftState); override; - procedure Initialize; override; - function InternalGetText: string; override; - procedure InternalSetDisplayValue(const Value: TcxEditValue); override; - function InternalSetText(const Value: string): Boolean; override; - function IsTextInputMode: Boolean; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure Loaded; override; - procedure LockInnerEditRepainting; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure PropertiesChanged(Sender: TObject); override; - procedure SelChange(Sender: TObject); override; - procedure SetSelText(const Value: TCaption); override; - procedure SynchronizeDisplayValue; override; - procedure UndoPerformed; override; - procedure UnlockInnerEditRepainting; override; - function CanSynchronizeModeText: Boolean; virtual; - procedure DirectSetSelLength(AValue: Integer); - procedure DirectSetSelStart(AValue: Integer); - function IsCharValidForPos(var AChar: Char; APos: Integer): Boolean; virtual; - procedure UpdateTextFormatting; virtual; - property Mode: TcxMaskEditCustomMode read FMode; - public - {$IFDEF CBUILDER10} - constructor Create(AOwner: TComponent); override; - {$ENDIF} - destructor Destroy; override; - procedure CutToClipboard; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure PasteFromClipboard; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - property ActiveProperties: TcxCustomMaskEditProperties read GetActiveProperties; - property EditText: TCaption read GetEditText write SetEditText; - property Properties: TcxCustomMaskEditProperties read GetProperties - write SetProperties; - end; - - { TcxMaskEditProperties } - - TcxMaskEditProperties = class(TcxCustomMaskEditProperties) - published - property Alignment; - property AlwaysShowBlanksAndLiterals; - property AssignedValues; - property AutoSelect; - property BeepOnError; - property CaseInsensitive; - property CharCase; - property ClearKey; - property EchoMode; - property HideSelection; - property IgnoreMaskBlank; - property ImeMode; - property ImeName; - property IncrementalSearch; - property LookupItems; - property LookupItemsSorted; - property MaskKind; - property EditMask; - property MaxLength; - property OEMConvert; - property PasswordChar; - property ReadOnly; - property UseLeftAlignmentOnEditing; - property ValidateOnEnter; - property OnChange; - property OnEditValueChanged; - property OnNewLookupDisplayText; - property OnValidate; - end; - - { TcxMaskEdit } - - TcxMaskEdit = class(TcxCustomMaskEdit) - private - function GetActiveProperties: TcxMaskEditProperties; - function GetProperties: TcxMaskEditProperties; - procedure SetProperties(Value: TcxMaskEditProperties); - public - function SupportsSpelling: Boolean; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxMaskEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragMode; - property Enabled; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxMaskEditProperties read GetProperties write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Text; - {$IFDEF DELPHI12} - property TextHint; - {$ENDIF} - property Visible; - property DragCursor; - property DragKind; - property ImeMode; - property ImeName; - property OnClick; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnEndDock; - property OnStartDock; - end; - - { TcxFilterMaskEditHelper } - - TcxFilterMaskEditHelper = class(TcxFilterTextEditHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - -function IsAlphaChar(ch: Char): Boolean; -//function GetSaveLiteralChars(AMaskEdit: TcxCustomMaskEdit): Boolean; - -implementation - -uses - cxVariants; - -function IsAlphaChar(ch: Char): Boolean; -begin - Result := IsCharAlpha(ch); -end; - -{function GetSaveLiteralChars(AMaskEdit: TcxCustomMaskEdit): Boolean; -begin - Result := False; - if AMaskEdit.Mode is TcxMaskEditStandardMode then - if TcxMaskEditStandardMode(AMaskEdit.Mode).FMask <> nil then - Result := TcxMaskEditStandardMode(AMaskEdit.Mode).FMask.SaveLiteralCharacters; -end;} - -{ TcxMaskEditCustomMode } - -constructor TcxMaskEditCustomMode.Create(AEdit: TcxCustomMaskEdit; - AProperties: TcxCustomMaskEditProperties); -begin - inherited Create; - FEdit := AEdit; - if FEdit = nil then - FProperties := AProperties; - FClipboardTextLength := 0; - FNeedUpdateEditValue := False; - FCharCase := ecNormal; - FEchoMode := eemNormal; -end; - -procedure TcxMaskEditCustomMode.BeepOnError; -begin - if Properties.BeepOnError then - Beep; -end; - -procedure TcxMaskEditCustomMode.SynchronizeEditValue; -var - ADisplayValue: Variant; -begin - if HasEdit then - begin - with FEdit do - begin - if ModifiedAfterEnter then - begin - ADisplayValue := FEdit.DisplayValue; - ADisplayValue := GetFormattedText(ADisplayValue); - end - else - ActiveProperties.PrepareDisplayValue(EditValue, ADisplayValue, Focused); - end; - FEdit.SetInternalDisplayValue(ADisplayValue); - end; -end; - -procedure TcxMaskEditCustomMode.ClearText; -begin - if HasEdit then - FEdit.DataBinding.UpdateNotConnectedDBEditDisplayValue; -end; - -function TcxMaskEditCustomMode.GetMaskKind: TcxEditMaskKind; -begin - Result := emkStandard; -end; - -function TcxMaskEditCustomMode.HasEdit: Boolean; -begin - Result := (FEdit <> nil) and not FEdit.PropertiesChangeLocked; -end; - -function TcxMaskEditCustomMode.GetProperties: TcxCustomMaskEditProperties; -begin - if FEdit <> nil then - Result := FEdit.ActiveProperties - else - Result := FProperties; -end; - -{ TcxMaskEditStandardMode } - -constructor TcxMaskEditStandardMode.Create(AEdit: TcxCustomMaskEdit; - AProperties: TcxCustomMaskEditProperties); -begin - inherited Create(AEdit, AProperties); - - FMask := TcxStandardMask.Create; -end; - -destructor TcxMaskEditStandardMode.Destroy; -begin - FMask.Free; - inherited Destroy; -end; - -procedure TcxMaskEditStandardMode.AfterPasteFromClipboard; -var - AText: string; -begin - AText := Clipboard.AsText; - FEdit.SelStart := FSelStart + Length(AText); - if FEdit.SelStart >= Length(FEdit.EditText) then - FEdit.SelStart := Length(FEdit.EditText) - 1; - if FEdit.SelStart < 0 then - FEdit.SelStart := 0; - if FMask.Items[FEdit.SelStart] is TcxStandardMaskLiteralItem then - begin - FEdit.FShiftOn := False; - PressRight; - end; -end; - -procedure TcxMaskEditStandardMode.Compile(AMask: string); -begin - FEditMask := AMask; - if Properties.EmptyMask(AMask) then - Exit; - - FMask.Compile(AMask); - - FNeedUpdateEditValue := not HasEdit; -end; - -function TcxMaskEditStandardMode.GetEmptyString: string; -begin - Result := FMask.EmptyString; -end; - -function TcxMaskEditStandardMode.GetFormattedText(AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; -begin - FMask.Format(AText, True, AMatchForBlanksAndLiterals); - Result := AText; -end; - -procedure TcxMaskEditStandardMode.GotoEnd; -begin -end; - -function TcxMaskEditStandardMode.IsCursorBegin: Boolean; -var - I: Integer; - ACount: Integer; -begin - ACount := 0; - for I := 0 to FMask.Count - 1 do - begin - if FMask.Items[I] is TcxStandardMaskLiteralItem then - Inc(ACount) - else - Break; - end; - Result := (FEdit.SelStart <= ACount) and (FEdit.SelLength <= 1) or - (FEdit.SelStart <= ACount) and (FEdit.CursorPos = FEdit.SelStart); -end; - -function TcxMaskEditStandardMode.IsCursorEnd: Boolean; -begin - Result := FEdit.SelStart = Length(FEdit.EditText); -end; - -function TcxMaskEditStandardMode.IsFullValidText(AText: string): Boolean; -begin - Result := FMask.IsFullValid(AText); - if not Result and Properties.IgnoreMaskBlank then - Result := AText = GetFormattedText(''); -end; - -procedure TcxMaskEditStandardMode.LMouseDown; -begin - if FEdit.HandleAllocated and Properties.IsMasked then - begin - if FEdit.SelLength = 0 then - FEdit.DirectSetSelLength(1); - end; -end; - -procedure TcxMaskEditStandardMode.PrePasteFromClipboard; -var - AText: string; -begin - AText := Clipboard.AsText; - FSelStart := FEdit.SelStart; - FEdit.DirectSetSelStart(FSelStart); - FEdit.DirectSetSelLength(Length(AText)); -end; - -function TcxMaskEditStandardMode.PressBackSpace: Boolean; -begin - Result := False; - - if FEdit.SelLength <= 1 then - PressLeft; - PressDelete; -end; - -function TcxMaskEditStandardMode.PressDelete: Boolean; -var - ABlank: Char; - ASelStart: Integer; - AText: string; - I: Integer; -begin - Result := False; - - AText := FEdit.EditText; - ASelStart := FEdit.SelStart; - for I := FEdit.SelStart to FEdit.SelStart + FEdit.SelLength - 1 do - begin - if FMask.Items[I] is TcxStandardMaskManyItem then - begin - ABlank := GetBlank(I + 1); - if ABlank <> #0 then - begin - Delete(AText, I + 1, 1); - Insert(ABlank, AText, I + 1); - FEdit.SetInternalDisplayValue(AText); - FEdit.SelStart := ASelStart; - end; - end; - end; -end; - -function TcxMaskEditStandardMode.PressEnd: Boolean; -begin - if FEdit.FShiftOn then - begin - Result := True; - Exit; - end - else - Result := False; - - FEdit.SelStart := Length(FEdit.EditText); -end; - -function TcxMaskEditStandardMode.PressHome: Boolean; -begin - if FEdit.FShiftOn then - begin - Result := True; - Exit; - end - else - Result := False; - - FEdit.SelStart := 0; - if FMask.Count > 0 then - if FMask.Items[FEdit.SelStart] is TcxStandardMaskLiteralItem then - PressRight; -end; - -function TcxMaskEditStandardMode.PressLeft: Boolean; - function GetSelStart: Integer; - var - I: Integer; - AReset: Boolean; - AEnd: Integer; - begin - Result := 0; - AReset := True; - AEnd := FEdit.SelStart + FEdit.SelLength; - if AEnd >= Length(FEdit.EditText) then - Dec(AEnd); - if AEnd < 0 then - AEnd := 0; - for I := FEdit.SelStart to AEnd do - begin - if FMask.Items[I] is TcxStandardMaskLiteralItem then - Inc(Result) - else - begin - AReset := False; - Break; - end; - end; - if AReset then - begin - if FEdit.SelStart + FEdit.SelLength >= Length(FEdit.EditText) then - begin - Result := AEnd - FEdit.SelStart; - Inc(Result); - end - else - Result := 0; - end; - end; -var - ADec: Integer; - ALeftLiteralCount: Integer; - I: Integer; -begin - if FEdit.FShiftOn then - begin - if FEdit.SelLength = 1 then - begin - FEdit.SelStart := FEdit.SelStart + 1; - FEdit.SelLength := 0; - FEdit.SendMyKeyDown(VK_LEFT, []); - FEdit.SendMyKeyDown(VK_LEFT, []); - end; - - Result := True; - Exit; - end - else - Result := False; - - if FEdit.SelLength > 1 then - begin - I := FEdit.SelStart + GetSelStart; - FEdit.SelStart := 0; - FEdit.SelStart := I; - Exit; - end; - - ALeftLiteralCount := 0; - for I := FEdit.SelStart - 1 downto 0 do - begin - if FMask.Items[I] is TcxStandardMaskLiteralItem then - Inc(ALeftLiteralCount) - else - Break; - end; - - ADec := ALeftLiteralCount + 1; - if FEdit.SelStart - ADec < 0 then - ADec := 0; - - if FEdit.SelStart > 0 then - FEdit.SelStart := FEdit.SelStart - ADec; -end; - -function TcxMaskEditStandardMode.PressRight: Boolean; - function GetSelStart(AI: Integer): Integer; - var - I: Integer; - AReset: Boolean; - begin - Result := 0; - AReset := True; - for I := AI downto FEdit.SelStart do - begin - if FMask.Items[I] is TcxStandardMaskLiteralItem then - Inc(Result) - else - begin - AReset := False; - Break; - end; - end; - if AReset then - Result := 0; - end; -var - AInc: Integer; - ARightLiteralCount: Integer; - I: Integer; -begin - if FEdit.FShiftOn then - begin - if (FEdit.SelLength = 1) and (FEdit.SelStart = FEdit.CursorPos) then - FEdit.SelLength := 0; - - Result := True; - Exit; - end - else - Result := False; - - if FEdit.SelLength > 1 then - begin - I := FEdit.SelStart + FEdit.SelLength; - if I < Length(FEdit.EditText) then - begin - Dec(I); - Dec(I, GetSelStart(I)); - end; - FEdit.SelStart := 0; - FEdit.SelStart := I; - Exit; - end; - - ARightLiteralCount := 0; - for I := FEdit.SelStart + 1 to FMask.Count - 1 do - begin - if FMask.Items[I] is TcxStandardMaskLiteralItem then - Inc(ARightLiteralCount) - else - Break; - end; - - AInc := ARightLiteralCount + 1; - if FEdit.SelStart + AInc > Length(FEdit.EditText) then - AInc := 0; - - FEdit.SelStart := FEdit.SelStart + AInc; -end; - -function TcxMaskEditStandardMode.PressSymbol(var ASymbol: Char): Boolean; -var - AText: string; - ASelStart: Integer; -begin - Result := False; - if Length(FEdit.EditText) <= 0 then - Exit; - if FEdit.SelStart >= Length(FEdit.EditText) then - Exit; - if FMask.Items[FEdit.SelStart] is TcxStandardMaskLiteralItem then - begin - FEdit.FShiftOn := False; - if FEdit.SelLength > 1 then - PressDelete; - ASelStart := FEdit.SelStart; - PressRight; - if FEdit.SelStart > ASelStart then - PressSymbol(ASymbol); - end - else - begin - if FMask.Items[FEdit.SelStart].Check(ASymbol) and - FEdit.IsCharValidForPos(ASymbol, FEdit.SelStart + 1) then - if ASymbol <> #0 then - begin - if FEdit.SelLength > 1 then - PressDelete; - AText := FEdit.EditText; - ASelStart := FEdit.SelStart; - Delete(AText, FEdit.SelStart + 1 , 1); - Insert(ASymbol, AText, FEdit.SelStart + 1); - FEdit.SetInternalDisplayValue(AText); - FEdit.SelStart := ASelStart; - FEdit.FShiftOn := False; - PressRight; - end - else - BeepOnError; - end; -end; - -procedure TcxMaskEditStandardMode.SetText(AText: string); -begin - LMouseDown; -end; - -procedure TcxMaskEditStandardMode.SynchronizeEditValue; -begin - inherited SynchronizeEditValue; - LMouseDown; -end; - -procedure TcxMaskEditStandardMode.UpdateEditValue; -begin - if FNeedUpdateEditValue then - begin - FEdit.InternalEditValue := FMask.EmptyString; - FNeedUpdateEditValue := False; - end; -end; - -function TcxMaskEditStandardMode.GetUpdatedText(const AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; -begin - Result := AText; - if FMask.Count > 0 then - begin - FMask.Format(Result, Properties.CharCase = ecNormal, AMatchForBlanksAndLiterals); - FMask.Format2(Result); - end; -end; - -function TcxMaskEditStandardMode.GetBlank(APos: Integer): Char; -begin - Result := FMask.Blank; -end; - -{ TcxMaskEditRegExprMode } - -constructor TcxMaskEditRegExprMode.Create(AEdit: TcxCustomMaskEdit; - AProperties: TcxCustomMaskEditProperties); -begin - inherited Create(AEdit, AProperties); - - FRegExpr := TcxRegExpr.Create; - FRegExpr.CaseInsensitive := Properties.CaseInsensitive; - FMouseAction := False; -end; - -destructor TcxMaskEditRegExprMode.Destroy; -begin - FRegExpr.Free; - inherited Destroy; -end; - -procedure TcxMaskEditRegExprMode.AfterPasteFromClipboard; -begin -end; - -procedure TcxMaskEditRegExprMode.Compile(AMask: string); -var - I: Integer; - AStream: TStringStream; - AStr: string; -begin - FEditMask := AMask; - if Properties.EmptyMask(AMask) then - Exit; - - AStream := TStringStream.Create(AMask); - try - try - FRegExpr.Compile(AStream); - except - on E: EcxRegExprError do - begin - AStr := cxGetResourceString(@scxMaskEditRegExprError); - for I := 0 to E.Errors.Count - 1 do - AStr := AStr + #13#10 + E.Errors[I].FullMessage; - raise EcxMaskEditError.Create(AStr); - end; - end; - finally - AStream.Free; - end; -end; - -function TcxMaskEditRegExprMode.PressDelete: Boolean; -begin - CursorCorrection; - if FEdit.SelLength <= 0 then - begin - if FTail <> '' then - begin - FSelect := FTail[1]; - Delete(FTail, 1, 1); - - if not NextTail then - begin - ClearTail; - if FEdit.SelStart > 0 then - FEdit.DirectSetSelStart(FEdit.SelStart - 1); - end; - end; - - Result := True; - end - else - begin - DeleteSelection; - if NextTail then - Result := True - else - begin - FEdit.SendMyKeyDown(VK_DELETE, []); - ClearTail; - - Result := False; - end; - end; - - FSelect := ''; - - if not Result then - BeepOnError; -end; - -function TcxMaskEditRegExprMode.PressEnd: Boolean; -var - I: Integer; -begin - CursorCorrection; - Result := True; - - if FTail <> '' then - begin - for I := 1 to Length(FTail) do - begin - FRegExpr.Next(FTail[I]); - end; - FHead := FHead + FTail; - FTail := ''; - end; -end; - -function TcxMaskEditRegExprMode.PressHome: Boolean; -begin - CursorCorrection; - Result := True; - - if FHead <> '' then - begin - FTail := FHead + FTail; - FHead := ''; - FRegExpr.Reset; - end; -end; - -function TcxMaskEditRegExprMode.GetEmptyString: string; -begin - Result := ''; -end; - -function TcxMaskEditRegExprMode.GetFormattedText(AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; -var - I: Integer; -begin - if not FRegExpr.IsCompiled then - begin - Result := ''; - Exit; - end; - FRegExpr.Reset; - Result := ''; - for I := 1 to Length(AText) do - begin - if FRegExpr.Next(AText[I]) then - Result := Result + AText[I]; - end; -end; - -procedure TcxMaskEditRegExprMode.GotoEnd; -var - I: Integer; -begin - CursorCorrection; - if FTail = '' then - Exit; - - for I := 1 to Length(FTail) do - begin - FRegExpr.Next(FTail[I]); - end; - - FHead := FHead + FTail; - FTail := ''; -end; - -function TcxMaskEditRegExprMode.IsCursorBegin: Boolean; -begin - Result := FEdit.SelStart = 0; -end; - -function TcxMaskEditRegExprMode.IsCursorEnd: Boolean; -begin - Result := FEdit.SelStart = Length(FEdit.Text); -end; - -function TcxMaskEditRegExprMode.IsFullValidText(AText: string): Boolean; -var - ARegExpr: TcxRegExpr; - I: Integer; -begin - Result := AText = ''; - - if not Result then - begin - ARegExpr := TcxRegExpr.Create; - ARegExpr.CaseInsensitive := Properties.CaseInsensitive; - - Result := CompileRegExpr(ARegExpr); - if Result then - begin - for I := 1 to Length(AText) do - begin - if not ARegExpr.Next(AText[I]) then - begin - Result := False; - Break; - end; - end; - - if Result then - if not Properties.IgnoreMaskBlank then - Result := ARegExpr.IsFinal; - end; - - ARegExpr.Free; - end; -end; - -procedure TcxMaskEditRegExprMode.LMouseDown; -begin - FMouseAction := True; -end; - -procedure TcxMaskEditRegExprMode.PrePasteFromClipboard; -begin -end; - -function TcxMaskEditRegExprMode.PressBackSpace: Boolean; -begin - CursorCorrection; - if FEdit.SelLength <= 0 then - begin - if FHead <> '' then - begin - FRegExpr.Prev; - if NextTail then - Delete(FHead, Length(FHead), 1) - else - ClearTail; - end; - - Result := True; - end - else - begin - DeleteSelection; - if NextTail then - Result := True - else - begin - FEdit.SendMyKeyPress(#8); - - ClearTail; - - Result := False; - end; - end; - - FSelect := ''; - - if not Result then - BeepOnError; -end; - -function TcxMaskEditRegExprMode.PressLeft: Boolean; -var - I: Integer; -begin - CursorCorrection; - Result := True; - - if FHead <> '' then - begin - if FEdit.SelLength > 0 then - begin - if (FEdit.CursorPos = FEdit.SelStart + FEdit.SelLength) and - not FEdit.FShiftOn then - begin - for I := 0 to FEdit.SelLength - 1 do - begin - FRegExpr.Prev; - FTail := FHead[Length(FHead)] + FTail; - Delete(FHead, Length(FHead), 1); - end; - - Exit; - end - else if (FEdit.CursorPos = FEdit.SelStart) and not FEdit.FShiftOn then - Exit; - end; - - FRegExpr.Prev; - FTail := FHead[Length(FHead)] + FTail; - Delete(FHead, Length(FHead), 1); - end; -end; - -function TcxMaskEditRegExprMode.PressRight: Boolean; - - procedure GetTailFirstChar; - begin - FRegExpr.Next(FTail[1]); - FHead := FHead + FTail[1]; - Delete(FTail, 1, 1); - end; - -var - I: Integer; -begin - CursorCorrection; - Result := True; - - if FTail <> '' then - begin - if FEdit.SelLength > 0 then - begin - if (FEdit.CursorPos = FEdit.SelStart) and - not FEdit.FShiftOn then - begin - for I := 0 to FEdit.SelLength - 1 do - GetTailFirstChar; - Exit; - end - else if (FEdit.CursorPos = FEdit.SelStart + FEdit.SelLength) and - not FEdit.FShiftOn then - Exit; - end; - - GetTailFirstChar; - end; -end; - -function TcxMaskEditRegExprMode.PressSymbol(var ASymbol: Char): Boolean; -begin - CursorCorrection; - if FEdit.SelLength > 0 then - DeleteSelection; - - if FRegExpr.Next(ASymbol) then - begin - FHead := FHead + ASymbol; - if not NextTail then - begin - if FSelect <> '' then - begin - FEdit.SendMyKeyDown(VK_DELETE, []); - FEdit.SendMyKeyPress(ASymbol); - Result := False; - end - else - Result := True; - - ClearTail; - end - else - Result := True; - end - else - begin - RestoreSelection; - Result := False; - end; - - FSelect := ''; - - if not Result then - BeepOnError; -end; - -procedure TcxMaskEditRegExprMode.SetText(AText: string); -var - I: Integer; -begin - FRegExpr.Reset; - - if (ClipboardTextLength > 0) and (Length(AText) > 0) then - begin - FRegExpr.Reset; - for I := 1 to FEdit.SelStart + ClipboardTextLength do - begin - FRegExpr.Next(AText[I]); - end; - - FHead := Copy(AText, 1, FEdit.SelStart + ClipboardTextLength); - FTail := Copy(AText, FEdit.SelStart + ClipboardTextLength + 1, Length(AText)); - - ClipboardTextLength := 0; - end - else - begin - FHead := ''; - FTail := AText; - end; -end; - -procedure TcxMaskEditRegExprMode.SetRegExprCaseInsensitive; -begin - FRegExpr.CaseInsensitive := Properties.CaseInsensitive; -end; - -procedure TcxMaskEditRegExprMode.UpdateEditValue; -begin -end; - -function TcxMaskEditRegExprMode.GetUpdatedText(const AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; -begin - Result := AText; -end; - -procedure TcxMaskEditRegExprMode.ClearTail; -var - AStr: string; -begin - AStr := FEdit.DataBinding.DisplayValue; - Delete(AStr, FEdit.SelStart + 1, Length(FTail)); - FEdit.DataBinding.DisplayValue := AStr; - FEdit.DirectSetSelStart(Length(AStr)); - FTail := ''; -end; - -function TcxMaskEditRegExprMode.CompileRegExpr( - ARegExpr: TcxRegExpr): Boolean; -begin - if FRegExpr.Stream = nil then - begin - Result := False; - Exit; - end; - - Result := True; - try - ARegExpr.Compile(FRegExpr.Stream); - except - on EcxMaskEditError do - Result := False; - end; -end; - -procedure TcxMaskEditRegExprMode.CursorCorrection; -var - I: Integer; - ASymbol: Char; -begin - if ((FHead = '') and (FTail = '') and (FEdit.Text <> '')) or FMouseAction then - begin - FMouseAction := False; - FRegExpr.Reset; - FTail := FEdit.Text; - FHead := ''; - for I := 0 to FEdit.CursorPos - 1 do - begin - if Length(FEdit.Text) > I then - begin - ASymbol := Char(FEdit.Text[I + 1]); - FRegExpr.Next(ASymbol); - FHead := FHead + FTail[1]; - Delete(FTail, 1, 1); - end; - end; - end; -end; - -procedure TcxMaskEditRegExprMode.DeleteSelection; -var - I: Integer; -begin - if FEdit.SelStart = Length(FHead) then // Begin cursor - begin - FSelect := Copy(FTail, 1, FEdit.SelLength); - Delete(FTail, 1, FEdit.SelLength); - - FBeginCursor := True; - end - else if (FEdit.SelStart + FEdit.SelLength) = Length(FHead) then // End cursor - begin - FSelect := Copy(FHead, FEdit.SelStart + 1, FEdit.SelLength); - Delete(FHead, FEdit.SelStart + 1, FEdit.SelLength); - for I := 1 to Length(FSelect) do - FRegExpr.Prev; - - FBeginCursor := False; - end; -end; - -function TcxMaskEditRegExprMode.GetMaskKind: TcxEditMaskKind; -begin - Result := emkRegExpr; -end; - -function TcxMaskEditRegExprMode.NextTail: Boolean; -var - AIsCharValid: Boolean; - I, J, NextNumber: Integer; -begin - NextNumber := 0; - - for I := 1 to Length(FTail) do - begin - AIsCharValid := FRegExpr.Next(FTail[I]); - if AIsCharValid then - Inc(NextNumber) - else - begin - for J := 0 to NextNumber - 1 do - FRegExpr.Prev; - - Result := False; - Exit; - end; - end; - - for I := 1 to Length(FTail) do - FRegExpr.Prev; - - Result := True; -end; - -procedure TcxMaskEditRegExprMode.RestoreSelection; -var - I: Integer; -begin - if FBeginCursor then - FTail := FSelect + FTail - else - begin - FHead := FHead + FSelect; - for I := 1 to Length(FSelect) do - begin - FRegExpr.Next(FSelect[I]); - end; - end; -end; - -procedure TcxMaskEditRegExprMode.SynchronizeEditValue; -begin - inherited SynchronizeEditValue; - FEdit.SelStart := Length(FEdit.Text); - FHead := FEdit.Text; - FTail := ''; - FRegExpr.Reset; - FRegExpr.NextEx(FHead); -end; - -{ TcxMaskEditRegExprExMode } - -constructor TcxMaskEditRegExprExMode.Create(AEdit: TcxCustomMaskEdit; - AProperties: TcxCustomMaskEditProperties); -begin - inherited Create(AEdit, AProperties); - - FRegExpr.OnSymbolUpdate := SymbolUpdate; - FRegExpr.OnSymbolDelete := SymbolDelete; - FRegExpr.UpdateOn := True; - FNewCursorPos := -1; - Clear; -end; - -destructor TcxMaskEditRegExprExMode.Destroy; -begin - inherited Destroy; -end; - -procedure TcxMaskEditRegExprExMode.Clear; -begin - FUpdate := ''; - FDeleteNumber := 0; -end; - -procedure TcxMaskEditRegExprExMode.RestoreSelection; -begin - FRegExpr.UpdateOn := False; - - inherited RestoreSelection; - - FRegExpr.UpdateOn := True; - - if FUpdate <> '' then - begin - FRegExpr.Prev; - Clear; - end; -end; - -procedure TcxMaskEditRegExprExMode.SymbolDelete; -begin - Inc(FDeleteNumber); -end; - -procedure TcxMaskEditRegExprExMode.SymbolUpdate(ASymbol: Char); -begin - FUpdate := FUpdate + ASymbol; -end; - -procedure TcxMaskEditRegExprExMode.AfterPasteFromClipboard; -begin - if FNewCursorPos < 0 then - Exit; - - FEdit.DirectSetSelStart(FNewCursorPos); - FNewCursorPos := -1; -end; - -procedure TcxMaskEditRegExprExMode.Compile(AMask: string); -var - I: Integer; - AStream: TStringStream; - AStr: string; -begin - Clear; - FEditMask := AMask; - if Properties.EmptyMask(AMask) then - Exit; - - AStream := TStringStream.Create(AMask); - try - try - FRegExpr.Compile(AStream); - except - on E: EcxRegExprError do - begin - AStr := cxGetResourceString(@scxMaskEditRegExprError); - for I := 0 to E.Errors.Count - 1 do - AStr := AStr + #13#10 + E.Errors[I].FullMessage; - raise EcxMaskEditError.Create(AStr); - end; - end; - finally - AStream.Free; - end; - - FNeedUpdateEditValue := not HasEdit; -end; - -function TcxMaskEditRegExprExMode.GetEmptyString: string; -var - ARegExpr: TcxRegExpr; -begin - ARegExpr := TcxRegExpr.Create; - ARegExpr.CaseInsensitive := Properties.CaseInsensitive; - ARegExpr.UpdateOn := False; - - if CompileRegExpr(ARegExpr) then - begin - ARegExpr.OnSymbolUpdate := InternalSymbolUpdate; - FInternalUpdate := ''; - ARegExpr.UpdateOn := True; - Result := FInternalUpdate; - end - else - Result := ''; - - ARegExpr.Free; -end; - -function TcxMaskEditRegExprExMode.GetFormattedText(AText: string; - AMatchForBlanksAndLiterals: Boolean = True): string; -begin - if not FRegExpr.IsCompiled then - begin - Result := ''; - Exit; - end; - - FRegExpr.UpdateOn := False; - Clear; - - Result := inherited GetFormattedText(AText, AMatchForBlanksAndLiterals); - - FRegExpr.UpdateOn := True; - Result := Result + FUpdate; -end; - -procedure TcxMaskEditRegExprExMode.GotoEnd; -begin - FRegExpr.UpdateOn := False; - - inherited GotoEnd; - - FRegExpr.UpdateOn := True; -end; - -function TcxMaskEditRegExprExMode.IsFullValidText(AText: string): Boolean; -var - ARegExpr: TcxRegExpr; - - function IsStart: Boolean; - begin - ARegExpr.UpdateOn := True; - Result := AText = FInternalUpdate; - end; - -var - I: Integer; -begin - ARegExpr := TcxRegExpr.Create; - ARegExpr.CaseInsensitive := Properties.CaseInsensitive; - ARegExpr.UpdateOn := False; - Result := CompileRegExpr(ARegExpr); - - if Result then - begin - ARegExpr.OnSymbolUpdate := InternalSymbolUpdate; - FInternalUpdate := ''; - if not IsStart then - begin - ARegExpr.UpdateOn := False; - ARegExpr.Reset; - for I := 1 to Length(AText) do - begin - if not ARegExpr.Next(AText[I]) then - begin - Result := False; - Break; - end; - end; - - if Result then - if not Properties.IgnoreMaskBlank then - Result := ARegExpr.IsFinal; - end; - end; - - ARegExpr.Free; -end; - -procedure TcxMaskEditRegExprExMode.PrePasteFromClipboard; -begin - CursorCorrection; -end; - -function TcxMaskEditRegExprExMode.PressBackSpace: Boolean; -var - ASelLength: Integer; - I: Integer; - AText: string; - ADeletedCharCount: integer; -begin - CursorCorrection; - Clear; - - if FEdit.SelLength <= 0 then - begin - if FHead = '' then - begin - Result := False; - Exit; - end; - - FRegExpr.Prev; - - if FRegExpr.IsStart then - if FEdit.SelStart = FDeleteNumber then - begin - FRegExpr.Next(FHead[1]); - Result := False; - BeepOnError; - Exit; - end; - - AText := FEdit.Text; - for I := 0 to FDeleteNumber do - FEdit.SendMyKeyPress(#8); - ADeletedCharCount := Length(AText) - Length(FEdit.Text); - Delete(FHead, Length(FHead) - ADeletedCharCount + 1, ADeletedCharCount); - - FRegExpr.UpdateOn := False; - - if NextTail then - UpdateTail - else - ClearTail; - - FRegExpr.UpdateOn := True; - end - else - begin - DeleteSelection; - - if FEdit.SelStart = 0 then - begin - FRegExpr.UpdateOn := False; - FRegExpr.UpdateOn := True; - if FUpdate <> '' then - begin - FHead := FUpdate; - Clear; - ASelLength := FEdit.SelLength; - FEdit.SelStart := Length(FHead); - FEdit.SelLength := ASelLength - FEdit.SelStart; - FTail := Copy(FEdit.Text, FEdit.SelStart + 1, FEdit.SelLength) + FTail; - Result := PressBackSpace; - Exit; - end - end; - - FEdit.SendMyKeyPress(#8); - - FRegExpr.UpdateOn := False; - - if NextTail then - UpdateTail - else - ClearTail; - - FRegExpr.UpdateOn := True; - end; - - Result := False; -end; - -function TcxMaskEditRegExprExMode.PressDelete: Boolean; -var - I: Integer; -begin - CursorCorrection; - Clear; - - if FEdit.SelLength <= 0 then - begin - if FTail = '' then - begin - Result := False; - Exit; - end; - - if FEdit.SelStart = 0 then - begin - FRegExpr.UpdateOn := False; - FRegExpr.UpdateOn := True; - if FUpdate <> '' then - begin - FRegExpr.Prev; - Clear; - Result := False; - BeepOnError; - Exit; - end; - end; - - FRegExpr.Next(FTail[1]); - for I := 0 to Length(FUpdate) do - FEdit.SendMyKeyDown(VK_DELETE, []); - Delete(FTail, 1, Length(FUpdate) + 1); - FRegExpr.Prev; - - FRegExpr.UpdateOn := False; - - if NextTail then - UpdateTail - else - ClearTail; - - FRegExpr.UpdateOn := True; - end - else - PressBackSpace; - - Result := False; -end; - -function TcxMaskEditRegExprExMode.PressEnd: Boolean; -begin - Result := True; - - CursorCorrection; - Clear; - - FRegExpr.UpdateOn := False; - - inherited PressEnd; - - FRegExpr.UpdateOn := True; -end; - -function TcxMaskEditRegExprExMode.PressHome: Boolean; -begin - Result := True; - - CursorCorrection; - Clear; - - inherited PressHome; -end; - -function TcxMaskEditRegExprExMode.PressLeft: Boolean; -var - I: Integer; -begin - Result := True; - - CursorCorrection; - Clear; - - if FEdit.SelLength > 0 then - begin - if (FEdit.CursorPos = FEdit.SelStart + FEdit.SelLength) and - not FEdit.FShiftOn then - begin - FRegExpr.UpdateOn := False; - inherited PressLeft; - Clear; - FRegExpr.UpdateOn := True; - if FUpdate <> '' then - FRegexpr.Prev; - - Exit; - end - else if (FEdit.CursorPos = FEdit.SelStart) and not FEdit.FShiftOn then - Exit; - end; - - inherited PressLeft; - - if FRegExpr.IsStart then - if FEdit.SelStart = 0 then - begin - if FEdit.SelLength = FDeleteNumber then - Dec(FDeleteNumber); - end - else - if FEdit.SelStart = FDeleteNumber then - Dec(FDeleteNumber); - - if FDeleteNumber > 0 then - begin - for I := 0 to FDeleteNumber - 1 do - begin - FTail := FHead[Length(FHead) - I] + FTail; - FEdit.SendMyKeyDown(VK_LEFT, []); - end; - Delete(FHead, Length(FHead) - FDeleteNumber + 1, FDeleteNumber); - end; -end; - -function TcxMaskEditRegExprExMode.PressRight: Boolean; -var - I: Integer; -begin - Result := True; - - CursorCorrection; - Clear; - - if FEdit.SelLength > 0 then - begin - if (FEdit.CursorPos = FEdit.SelStart) and - not FEdit.FShiftOn then - begin - FRegExpr.UpdateOn := False; - inherited PressRight; - Clear; - FRegExpr.UpdateOn := True; - - Exit; - end - else if (FEdit.CursorPos = FEdit.SelStart + Fedit.SelLength) and - not FEdit.FShiftOn then - Exit; - end; - - inherited PressRight; - - if FUpdate <> '' then - begin - for I := 1 to Length(FUpdate) do - begin - FHead := FHead + FTail[I]; - FEdit.SendMyKeyDown(VK_RIGHT, []); - end; - Delete(FTail, 1, Length(FUpdate)); - end; -end; - -function TcxMaskEditRegExprExMode.PressSymbol(var ASymbol: Char): Boolean; -var - I: Integer; - ASelLength: Integer; -begin - CursorCorrection; - Clear; - - if FEdit.SelLength > 0 then - begin - DeleteSelection; - if FEdit.SelStart = 0 then - begin - FRegExpr.UpdateOn := False; - FRegExpr.UpdateOn := True; - if FUpdate <> '' then - begin - FHead := FUpdate; - Clear; - ASelLength := FEdit.SelLength; - FEdit.SelStart := Length(FHead); - FEdit.SelLength := ASelLength - FEdit.SelStart; - FTail := Copy(FEdit.Text, FEdit.SelStart + 1, FEdit.SelLength) + FTail; - Result := PressSymbol(ASymbol); - Exit; - end - end; - end; - - if FRegExpr.Next(ASymbol) then - begin - FHead := FHead + ASymbol + FUpdate; - - FEdit.SendMyKeyPress(ASymbol); - for I := 1 to Length(FUpdate) do - FEdit.SendMyKeyPress(FUpdate[I]); - - FRegExpr.UpdateOn := False; - - if NextTail then - UpdateTail - else - ClearTail; - - FRegExpr.UpdateOn := True; - end - else - begin - if FEdit.SelLength > 0 then - RestoreSelection; - - BeepOnError; - end; - - FSelect := ''; - Result := False; -end; - -procedure TcxMaskEditRegExprExMode.SetText(AText: string); -var - I: Integer; -begin - FRegExpr.UpdateOn := False; - FRegExpr.Reset; - - for I := 1 to Length(AText) do - begin - FRegExpr.Next(AText[I]); - end; - - Clear; - FRegExpr.UpdateOn := True; - FHead := AText + FUpdate; - FTail := ''; - - if HasEdit then - begin - FMouseAction := True; - CursorCorrection; - end; - - ClipboardTextLength := 0; -end; - -procedure TcxMaskEditRegExprExMode.UpdateEditValue; -begin - if FNeedUpdateEditValue then - begin - FEdit.InternalEditValue := FUpdate; - FNeedUpdateEditValue := False; - end; -end; - -procedure TcxMaskEditRegExprExMode.CursorCorrection; - - procedure Next; - begin - if FTail <> '' then - begin - Clear; - FRegExpr.Next(FTail[1]); - FHead := FHead + Copy(FTail, 1, Length(FUpdate) + 1); - Delete(FTail, 1, Length(FUpdate) + 1); - end; - end; - - procedure Prev; - begin - if FHead <> '' then - begin - Clear; - FRegExpr.Prev; - - FTail := Copy(FHead, Length(FHead) - FDeleteNumber, FDeleteNumber + 1) + FTail; - - if FRegExpr.IsStart then - FHead := '' - else - Delete(FHead, Length(FHead) - FDeleteNumber, FDeleteNumber + 1); - end; - end; - - procedure CorrectSelLength(ASelEnd: Integer); - begin - while True do - begin - Next; - if ASelEnd <= Length(FHead) then - begin - FEdit.DirectSetSelLength(Length(FHead) - FEdit.SelStart); - Break; - end; - end; - end; - -var - ASelStart: Integer; - ASelEnd: Integer; -begin - if not HasEdit or not FEdit.HandleAllocated then - Exit; - - if (FHead = '') and (FTail = '') and (FEdit.Text <> '') then - begin - FTail := FEdit.Text; - FRegExpr.Reset; - FMouseAction := True; - end; - - if not FMouseAction then - Exit - else - FMouseAction := False; - - ASelStart := FEdit.SelStart; - ASelEnd := FEdit.SelStart + FEdit.SelLength; - - // Correct FEdit.SelStart - if ASelStart > Length(FHead) then - while True do - begin - Next; - if ASelStart < Length(FHead) then - begin - Prev; - FEdit.DirectSetSelStart(Length(FHead)); - Break; - end - else - if ASelStart = Length(FHead) then - Break; - end - else - if ASelStart < Length(FHead) then - while True do - begin - Prev; - if ASelStart > Length(FHead) then - begin - FEdit.DirectSetSelStart(Length(FHead)); - Break; - end - else - if ASelStart = Length(FHead) then - Break; - end; - - // Correct FEdit.SelLength - if ASelEnd > ASelStart then - CorrectSelLength(ASelEnd); -end; - -procedure TcxMaskEditRegExprExMode.DeleteSelection; -begin - FRegExpr.UpdateOn := False; - - inherited DeleteSelection; - - FRegExpr.UpdateOn := True; - - if FUpdate <> '' then - begin - FRegExpr.Prev; - Clear; - end; -end; - -function TcxMaskEditRegExprExMode.GetMaskKind: TcxEditMaskKind; -begin - Result := emkRegExprEx; -end; - -procedure TcxMaskEditRegExprExMode.UpdateTail; -var - I: Integer; -begin - Clear; - - if FTail = '' then - Exit; - - for I := 1 to Length(FTail) do - begin - FRegExpr.Next(FTail[I]); - FEdit.DirectSetSelStart(FEdit.SelStart + 1); - end; - - FRegExpr.UpdateOn := True; - - if FUpdate <> '' then - for I := 1 to Length(FUpdate) do - begin - FTail := FTail + FUpdate[I]; - FEdit.SendMyKeyPress(FUpdate[I]); - end; - - FRegExpr.UpdateOn := False; - - for I := 1 to Length(FTail) do - begin - FRegExpr.Prev; - FEdit.DirectSetSelStart(FEdit.SelStart - 1); - end; -end; - -procedure TcxMaskEditRegExprExMode.InternalSymbolUpdate(ASymbol: Char); -begin - FInternalUpdate := FInternalUpdate + ASymbol; -end; - -{ TcxCustomMaskEditProperties } - -constructor TcxCustomMaskEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - - MaskKind := emkStandard; - FAlwaysShowBlanksAndLiterals := False; - ValidateOnEnter := True; - CaseInsensitive := True; - FTempMode := nil; -end; - -destructor TcxCustomMaskEditProperties.Destroy; -begin - FTempMode.Free; - - inherited Destroy; -end; - -procedure TcxCustomMaskEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomMaskEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomMaskEditProperties do - begin - Self.MaskKind := MaskKind; - Self.EditMask := EditMask; - Self.CaseInsensitive := CaseInsensitive; - Self.IgnoreMaskBlank := IgnoreMaskBlank; - Self.AlwaysShowBlanksAndLiterals := AlwaysShowBlanksAndLiterals; - end - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomMaskEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxMaskEdit; -end; - -function TcxCustomMaskEditProperties.UseLookupData: Boolean; -begin - Result := not IsMasked and inherited UseLookupData; -end; - -{function TcxCustomMaskEditProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - if IsMasked then - Result := evsValue - else - Result := inherited GetEditValueSource(AEditFocused); -end;} - -function TcxCustomMaskEditProperties.IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; -begin - Result := IsMasked or inherited IsEditValueValid(EditValue, AEditFocused); -end; - -procedure TcxCustomMaskEditProperties.PrepareDisplayValue( - const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; AEditFocused: Boolean); -var - AText: string; -begin - if IsMasked and not (not AEditFocused and (IDefaultValuesProvider <> nil) and - IDefaultValuesProvider.IsDisplayFormatDefined(True)) then - begin - AText := VarToStr(AEditValue); - if (FTempMode = nil) or not TestTempMaskKind or not TestTempEditMask then - begin - FreeAndNil(FTempMode); - FTempMode := CreateMode; - end; - if FTempMode <> nil then - begin - if not AEditFocused and (FTempMode is TcxMaskEditStandardMode) then - begin - if not FAlwaysShowBlanksAndLiterals then - DisplayValue := FTempMode.GetUpdatedText(AText, False) - else - DisplayValue := FTempMode.GetFormattedText(AText, False); - end - else - DisplayValue := FTempMode.GetFormattedText(AText, False); - end; - end - else - inherited PrepareDisplayValue(AEditValue, DisplayValue, AEditFocused); -end; - -procedure TcxCustomMaskEditProperties.ValidateDisplayValue(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var Error: Boolean; AEdit: TcxCustomEdit); -var - AText: string; -begin - if not Error then - begin - if not IsMasked{ or IgnoreMaskBlank }then - Error := False - else - begin - AText := VarToStr(ADisplayValue); - - Error := not TcxCustomMaskEdit(AEdit).Mode.IsFullValidText(AText); - - if Error then - AErrorText := cxGetResourceString(@scxMaskEditInvalidEditValue); - end; - end; - - inherited ValidateDisplayValue(ADisplayValue, AErrorText, Error, AEdit); -end; - -function TcxCustomMaskEditProperties.CreateMode: TcxMaskEditCustomMode; -begin - Result := nil; - if not EmptyMask(EditMask) then - begin - Result := GetModeClass(FMaskKind).Create(nil, Self); - Result.Compile(EditMask); - end; -end; - -function TcxCustomMaskEditProperties.CreateMode1: TcxMaskEditCustomMode; -begin - Result := GetModeClass(MaskKind).Create(nil, Self); -end; - -function TcxCustomMaskEditProperties.EmptyMask(AMask: string): Boolean; -var - I: Integer; -begin - Result := AMask = ''; - - if not Result then - begin - for I := 1 to Length(AMask) do - if not SpaceToken(AMask[I]) then - begin - Result := False; - Exit; - end; - - Result := True; - end; -end; - -procedure TcxCustomMaskEditProperties.DoChanged; -begin - FreeAndNil(FTempMode); - inherited; -end; - -function TcxCustomMaskEditProperties.GetEditMask: TcxEditMask; -begin - if FMaskKind <> emkStandard then - Result := FEditMask - else - begin - if EmptyMask(FEditMask) then - begin - if IDefaultValuesProvider <> nil then - Result := IDefaultValuesProvider.DefaultEditMask - else - Result := ''; - end - else - Result := FEditMask - end; -end; - -function TcxCustomMaskEditProperties.GetIsMasked: Boolean; -begin - Result := not EmptyMask(EditMask); -end; - -procedure TcxCustomMaskEditProperties.SetAlwaysShowBlanksAndLiterals(AValue: Boolean); -begin - if AValue <> FAlwaysShowBlanksAndLiterals then - begin - FAlwaysShowBlanksAndLiterals := AValue; - Changed; - end; -end; - -procedure TcxCustomMaskEditProperties.SetCaseInsensitive(AValue: Boolean); -begin - if CharCase = ecNormal then - FCaseInsensitive := AValue - else - FCaseInsensitive := True; - Changed; -end; - -procedure TcxCustomMaskEditProperties.SetEditMask(Value: TcxEditMask); -var - AMode: TcxMaskEditCustomMode; -begin - if EditMask = Value then - FEditMask := Value - else - begin - AMode := CreateMode1; - try - AMode.Compile(Value); - FEditMask := Value; - Changed; - finally - AMode.Free; - end; - end; -end; - -procedure TcxCustomMaskEditProperties.SetMaskKind(Value: TcxEditMaskKind); -begin - if Value <> FMaskKind then - begin - FMaskKind := Value; - Changed; - end; -end; - -function TcxCustomMaskEditProperties.GetDisplayFormatOptions: TcxEditDisplayFormatOptions; -begin - if not IsMasked then - Result := [dfoSupports] - else - Result := []; -end; - -function TcxCustomMaskEditProperties.GetModeClass( - AMaskKind: TcxEditMaskKind): TcxMaskEditCustomModeClass; -begin - case AMaskKind of - emkStandard: - Result := TcxMaskEditStandardMode; - emkRegExpr: - Result := TcxMaskEditRegExprMode; - else - Result := TcxMaskEditRegExprExMode; - end; -end; - -procedure TcxCustomMaskEditProperties.MaxLengthChanged; -begin - if IsMasked then - begin - if FMaxLengthSetting then - Exit; - FMaxLengthSetting := True; - BeginUpdate; - try - MaxLength := 0; - finally - FMaxLengthSetting := False; - EndUpdate; - end; - end - else - inherited MaxLengthChanged; -end; - -function TcxCustomMaskEditProperties.SpaceToken(AToken: Char): Boolean; -begin - Result := IsSpaceChar(AToken); -end; - -function TcxCustomMaskEditProperties.GetEmptyString: string; -begin - Result := FEmptyString; -end; - -procedure TcxCustomMaskEditProperties.SetCharCase(Value: TEditCharCase); -begin - if Value in [ecLowerCase, ecUpperCase] then - FCaseInsensitive := True; - - inherited SetCharCase(Value); -end; - -function TcxCustomMaskEditProperties.TestTempEditMask: Boolean; -begin - Result := FTempMode.EditMask = EditMask; -end; - -function TcxCustomMaskEditProperties.TestTempMaskKind: Boolean; -begin - Result := False; - case FMaskKind of - emkStandard: - Result := FTempMode is TcxMaskEditStandardMode; - emkRegExpr: - Result := FTempMode is TcxMaskEditRegExprMode; - emkRegExprEx: - Result := FTempMode is TcxMaskEditRegExprExMode; - end; -end; - -{ TcxCustomMaskEdit } - -{$IFDEF CBUILDER10} -constructor TcxCustomMaskEdit.Create(AOwner: TComponent); -begin - inherited Create(AOwner); -end; -{$ENDIF} - -destructor TcxCustomMaskEdit.Destroy; -begin - FreeAndNil(FMode); - inherited Destroy; -end; - -procedure TcxCustomMaskEdit.CutToClipboard; -begin - if ActiveProperties.IsMasked then - begin - if not Focused or DoEditing then - begin - CopyToClipboard; - if Mode.PressDelete then - SendMyKeyPress(Char(VK_BACK)); - end - end - else - inherited CutToClipBoard; -end; - -class function TcxCustomMaskEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomMaskEditProperties; -end; - -procedure TcxCustomMaskEdit.SendMyKeyDown(Key: Word; Shift: TShiftState); -begin - FMyMessage := True; - try - SendKeyDown(Self, Key, Shift); - finally - FMyMessage := False; - end; -end; - -procedure TcxCustomMaskEdit.SendMyKeyPress(AKey: Char); -begin - FMyMessage := True; - try - SendKeyPress(Self, AKey); - finally - FMyMessage := False; - end; -end; - -procedure TcxCustomMaskEdit.ChangeHandler(Sender: TObject); -begin - FText := FMode.GetUpdatedText(InnerEdit.EditValue); - - inherited ChangeHandler(Sender); -end; - -procedure TcxCustomMaskEdit.DblClick; -begin - if ActiveProperties.IsMasked then - Mode.GotoEnd; - - inherited DblClick; -end; - -procedure TcxCustomMaskEdit.DoEnter; -begin - if ActiveProperties.IsMasked then - if ActiveProperties.AutoSelect then - Mode.GotoEnd; - - inherited DoEnter; -end; - -procedure TcxCustomMaskEdit.DoEditKeyDown(var Key: Word; Shift: TShiftState); -var - AAfterKeyDownNeed: Boolean; -begin - if not ActiveProperties.IsMasked or IsSpecialKey(Key, Shift) then - begin - inherited DoEditKeyDown(Key, Shift); - Exit; - end; - - if not ValidateKeyDown(Key, Shift) then - begin - DoAfterKeyDown(Key, Shift); - Key := 0; - Exit; - end; - - if Key = VK_TAB then - begin - inherited DoEditKeyDown(Key, Shift); - Exit; - end; - - FShiftOn := ssShift in Shift; - - if ((Key = VK_UP) or (Key = VK_DOWN)) and not HasPopupWindow then - begin - DoAfterKeyDown(Key, Shift); - Key := 0; - end - else if Key = VK_LEFT then - begin - if ssCtrl in Shift then - begin - SendMyKeyDown(VK_HOME, Shift); - if not Mode.PressHome then - Key := 0; - end - else - begin - AAfterKeyDownNeed := IsCursorBegin; - if not Mode.PressLeft then - begin - if AAfterKeyDownNeed then - DoAfterKeyDown(Key, Shift); - Key := 0; - end; - end; - end - else if Key = VK_RIGHT then - begin - if ssCtrl in Shift then - begin - SendMyKeyDown(VK_END, Shift); - if not Mode.PressEnd then - Key := 0; - end - else - begin - AAfterKeyDownNeed := IsCursorEnd; - if not Mode.PressRight then - begin - if AAfterKeyDownNeed then - DoAfterKeyDown(Key, Shift); - Key := 0; - end; - end; - end - else if Key = VK_DELETE then - begin - if ssShift in Shift then - begin - if SelLength = 0 then - if not Mode.PressBackSpace then - Key := 0; - end - else - if not Mode.PressDelete then - Key := 0; - end - else if Key = VK_HOME then - begin - if not Mode.PressHome then - Key := 0; - end - else if Key = VK_END then - begin - if not Mode.PressEnd then - Key := 0; - end; - - if Key <> 0 then - inherited DoEditKeyDown(Key, Shift); -end; - -procedure TcxCustomMaskEdit.DoEditKeyPress(var Key: Char); -begin - if not ActiveProperties.IsMasked then - begin - inherited DoEditKeyPress(Key); - Exit; - end; - - if (Key = #9) or (Key = #27) then - Key := #0 - else if not ValidateKeyPress(Key) then - Key := #0 - else - begin - if Key <> #13 then - begin - if not ActiveProperties.IsMasked then - inherited DoEditKeyPress(Key) - else - begin - if (Key = #3) or (Key = #22) or (Key = #24) then // ^c ^v ^x - begin - inherited DoEditKeyPress(Key); - end - else - begin - if Key = #8 then // Backspace - begin - if not Mode.PressBackSpace then - Key := #0; - end - else - if not Mode.PressSymbol(Key) then - Key := #0; - end; - end; - end; - end; -end; - -function TcxCustomMaskEdit.GetEditText: TCaption; -begin - Result := InnerEdit.EditValue; -end; - -function TcxCustomMaskEdit.GetProperties: TcxCustomMaskEditProperties; -begin - Result := TcxCustomMaskEditProperties(FProperties); -end; - -function TcxCustomMaskEdit.GetActiveProperties: TcxCustomMaskEditProperties; -begin - Result := TcxCustomMaskEditProperties(InternalGetActiveProperties); -end; - -function TcxCustomMaskEdit.InternalGetEmptyString: string; -begin - if ActiveProperties.IsMasked then - begin - if Mode <> nil then - Result := Mode.GetEmptyString - else - Result := ''; - end - else - Result := ''; -end; - -procedure TcxCustomMaskEdit.InternalSetValue(AValue: string); -begin - if ActiveProperties.IsMasked and CanSynchronizeModeText then - Mode.SetText(AValue); -end; - -function TcxCustomMaskEdit.IsCursorBegin: Boolean; -begin - Result := FMode.IsCursorBegin; -end; - -function TcxCustomMaskEdit.IsCursorEnd: Boolean; -begin - Result := FMode.IsCursorEnd; -end; - -procedure TcxCustomMaskEdit.SetEditText(AValue: TCaption); -var - AEditText: string; -begin - if not Focused and (Mode is TcxMaskEditStandardMode) then - begin - if not ActiveProperties.AlwaysShowBlanksAndLiterals then - AEditText := Mode.GetUpdatedText(AValue) - else - AEditText := Mode.GetFormattedText(AValue); - end - else - AEditText := Mode.GetFormattedText(AValue); - InnerEdit.EditValue := AEditText; - FEditValue := FText; -end; - -procedure TcxCustomMaskEdit.SetProperties(Value: TcxCustomMaskEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomMaskEdit.DoEditKeyUp(var Key: Word; Shift: TShiftState); -begin - if not ActiveProperties.IsMasked then - begin - inherited DoEditKeyUp(Key, Shift); - Exit; - end; - - inherited DoEditKeyUp(Key, Shift); -end; - -procedure TcxCustomMaskEdit.Initialize; -begin - inherited Initialize; - FMode := ActiveProperties.GetModeClass(emkStandard).Create(Self, ActiveProperties); - FShiftOn := False; - ActiveProperties.FEmptyString := InternalGetEmptyString; -end; - -function TcxCustomMaskEdit.InternalGetText: string; -begin - if ActiveProperties.IsMasked then - Result := FText - else - Result := inherited InternalGetText; -end; - -procedure TcxCustomMaskEdit.InternalSetDisplayValue(const Value: TcxEditValue); -var - AText: string; -begin - if ActiveProperties.IsMasked and not IsLoading then - begin - AText := VarToStr(Value); - - if not Focused and (Mode is TcxMaskEditStandardMode) then - begin - if not ActiveProperties.AlwaysShowBlanksAndLiterals then - inherited InternalSetDisplayValue(Mode.GetUpdatedText(AText)) - else - inherited InternalSetDisplayValue(Mode.GetFormattedText(AText)); - end - else - inherited InternalSetDisplayValue(Mode.GetFormattedText(AText)); - - InternalSetValue(Text); - end - else - inherited InternalSetDisplayValue(Value); -end; - -function TcxCustomMaskEdit.InternalSetText(const Value: string): Boolean; -begin - if ActiveProperties.IsMasked then - begin - Result := True; - InternalEditValue := Value; - FEditValue := FText; - end - else - Result := inherited InternalSetText(Value); -end; - -function TcxCustomMaskEdit.IsTextInputMode: Boolean; -begin - Result := (ActiveProperties.EditMask = '') and inherited IsTextInputMode; -end; - -procedure TcxCustomMaskEdit.KeyDown(var Key: Word; Shift: TShiftState); -begin - if not FMyMessage then - inherited KeyDown(Key, Shift); -end; - -procedure TcxCustomMaskEdit.KeyPress(var Key: Char); -begin - if not FMyMessage then - inherited KeyPress(Key); -end; - -procedure TcxCustomMaskEdit.KeyUp(var Key: Word; Shift: TShiftState); -begin - if not FMyMessage then - inherited KeyUp(Key, Shift); -end; - -procedure TcxCustomMaskEdit.Loaded; -begin - inherited Loaded; - if ActiveProperties.IsMasked then - begin - LockChangeEvents(True, False); - try - UpdateTextFormatting; - finally - LockChangeEvents(False, False); - end; - end; -end; - -procedure TcxCustomMaskEdit.LockInnerEditRepainting; -begin - if HasInnerEdit then - if ActiveProperties.IsMasked then - SendMessage(InnerEdit.Control.Handle, WM_SETREDRAW, 0, 0) - else - inherited LockInnerEditRepainting; -end; - -procedure TcxCustomMaskEdit.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - if ActiveProperties.IsMasked then - if Button = mbLeft then - Mode.LMouseDown; - - inherited MouseDown(Button, Shift, X, Y); -end; - -procedure TcxCustomMaskEdit.MouseMove(Shift: TShiftState; X, Y: Integer); -var - AShiftOn: Boolean; -begin - if ActiveProperties.IsMasked then - if ssLeft in Shift then - begin - AShiftOn := FShiftOn; - FShiftOn := True; - Mode.LMouseDown; - FShiftOn := AShiftOn; - end; - - inherited MouseMove(Shift, X, Y); -end; - -procedure TcxCustomMaskEdit.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); -end; - -procedure TcxCustomMaskEdit.PropertiesChanged(Sender: TObject); -var - AEditMask: string; - ASelStart: Integer; - ASelLength: Integer; - AEditMaskCleared: Boolean; - - procedure DoMaskChanged; - begin - ActiveProperties.MaxLength := 0; - - FMode.Compile(AEditMask); - if AEditMaskCleared then - ActiveProperties.FEditMask := AEditMask; - if not ActiveProperties.EmptyMask(AEditMask) then - FMode.SynchronizeEditValue - else - begin - if FMode is TcxMaskEditStandardMode then - begin - if HandleAllocated and (SelLength = 1) then - begin - ASelStart := SelStart; - SelLength := 0; - SelStart := ASelStart; - end; - end; - end; - ActiveProperties.FEmptyString := InternalGetEmptyString; - end; - - procedure DoMaskKindChanged; - var - APrevMaskKind: TcxEditMaskKind; - APrevEditMask: string; - begin - APrevMaskKind := FMode.GetMaskKind; - APrevEditMask := FMode.EditMask; - FreeAndNil(FMode); - - if ActiveProperties.MaskKind = emkRegExpr then - begin - if APrevMaskKind = emkStandard then - begin - ActiveProperties.FEditMask := ''; - AEditMaskCleared := True; - end; - FMode := ActiveProperties.GetModeClass(emkRegExpr).Create(Self, ActiveProperties) - end - else if ActiveProperties.MaskKind = emkRegExprEx then - begin - if APrevMaskKind = emkStandard then - begin - ActiveProperties.FEditMask := ''; - AEditMaskCleared := True; - end; - FMode := ActiveProperties.GetModeClass(emkRegExprEx).Create(Self, ActiveProperties) - end - else if ActiveProperties.MaskKind = emkStandard then - begin - if (APrevMaskKind = emkRegExpr) or (APrevMaskKind = emkRegExprEx) then - begin - ActiveProperties.FEditMask := ''; - AEditMaskCleared := True; - end; - FMode := ActiveProperties.GetModeClass(emkStandard).Create(Self, ActiveProperties) - end; - - FMode.Compile(ActiveProperties.EditMask); - if not ActiveProperties.EmptyMask(ActiveProperties.EditMask) then - FMode.SynchronizeEditValue; - - ActiveProperties.FEmptyString := InternalGetEmptyString; - end; - - procedure DoCharCaseChanged; - begin - if ActiveProperties.CharCase = ecNormal then - begin - if HasInnerEdit then - InnerTextEdit.CharCase := ecNormal; - FMode.SynchronizeEditValue; - end; - FMode.CharCase := ActiveProperties.CharCase; - end; - - procedure SaveSels; - begin - ASelStart := SelStart; - ASelLength := SelLength; - end; - - procedure LoadSels; - begin - SelStart := ASelStart; - SelLength := ASelLength; - end; - -var - AEditMaskChanged: Boolean; - AEditMaskKindChanged: Boolean; - ACharCaseChanged: Boolean; -begin - AEditMaskCleared := False; - ActiveProperties.LockUpdate(True); - - AEditMask := ActiveProperties.EditMask; - AEditMaskChanged := (FMode.EditMask <> ActiveProperties.EditMask) or ActiveProperties.FormatChanging; - AEditMaskKindChanged := FMode.GetMaskKind <> ActiveProperties.MaskKind; - ACharCaseChanged := ActiveProperties.CharCase <> FMode.CharCase; - if AEditMaskKindChanged then - DoMaskKindChanged; - if AEditMaskChanged then - DoMaskChanged; - if ACharCaseChanged then - DoCharCaseChanged; - if (ActiveProperties.EchoMode <> FMode.EchoMode) and HandleAllocated then - SaveSels; - - if not(not PropertiesChangeLocked and VarIsNull(EditValue)) and ActiveProperties.IsMasked then - FMode.UpdateEditValue; - - ActiveProperties.LockUpdate(False); - - if FMode is TcxMaskEditRegExprMode then - TcxMaskEditRegExprMode(FMode).SetRegExprCaseInsensitive; - - inherited PropertiesChanged(Sender); - - if ActiveProperties.EchoMode <> FMode.EchoMode then - begin - if HandleAllocated then - LoadSels; - FMode.EchoMode := ActiveProperties.EchoMode; - end; - - if ACharCaseChanged or AEditMaskKindChanged or AEditMaskChanged then - FText := FMode.GetUpdatedText(InnerEdit.EditValue); -end; - -procedure TcxCustomMaskEdit.PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); -begin - if ActiveProperties.IsMasked then - if not AEditFocused and (Mode is TcxMaskEditStandardMode) and - (TcxMaskEditStandardMode(Mode).FMask.SaveLiteralCharacters or not ActiveProperties.AlwaysShowBlanksAndLiterals) then - inherited PrepareEditValue(ADisplayValue, EditValue, AEditFocused) - else - EditValue := Mode.GetUpdatedText(ADisplayValue) - else - inherited PrepareEditValue(ADisplayValue, EditValue, AEditFocused); -end; - -procedure TcxCustomMaskEdit.PasteFromClipboard; -begin - if not Clipboard.HasFormat(CF_TEXT) then - Exit; - - if not ActiveProperties.IsMasked then - begin - inherited PasteFromClipboard; - Exit; - end; - - Mode.ClipboardTextLength := Length(Clipboard.AsText); - Mode.PrePasteFromClipboard; - -// inherited PasteFromClipboard; - SelText := Clipboard.AsText; // TODO - - Mode.AfterPasteFromClipboard; -end; - -procedure TcxCustomMaskEdit.SelChange(Sender: TObject); -begin - inherited SelChange(Sender); - if not FInternalTextSelection then - Mode.LMouseDown; -end; - -procedure TcxCustomMaskEdit.SetSelText(const Value: TCaption); -begin - if not ActiveProperties.IsMasked then - inherited SetSelText(Value) - else - begin - Mode.ClipboardTextLength := Length(Value); - Mode.PrePasteFromClipboard; - - inherited SetSelText(Value); - - Mode.AfterPasteFromClipboard; - end; -end; - -procedure TcxCustomMaskEdit.SynchronizeDisplayValue; -begin - inherited SynchronizeDisplayValue; - - if ActiveProperties.IsMasked then - InternalSetValue(Text); -end; - -procedure TcxCustomMaskEdit.UndoPerformed; -begin - InternalSetValue(Text); -end; - -procedure TcxCustomMaskEdit.UnlockInnerEditRepainting; -begin - if HasInnerEdit then - if ActiveProperties.IsMasked then - begin - SendMessage(InnerEdit.Control.Handle, WM_SETREDRAW, 1, 0); - InnerEdit.Control.Invalidate; - end - else - inherited UnlockInnerEditRepainting; -end; - -function TcxCustomMaskEdit.CanSynchronizeModeText: Boolean; -begin - Result := True; -end; - -procedure TcxCustomMaskEdit.DirectSetSelLength(AValue: Integer); -begin - FInternalTextSelection := True; - try - SelLength := AValue; - finally - FInternalTextSelection := False; - end; -end; - -procedure TcxCustomMaskEdit.DirectSetSelStart(AValue: Integer); -begin - FInternalTextSelection := True; - try - SelStart := AValue; - finally - FInternalTextSelection := False; - end; -end; - -function TcxCustomMaskEdit.IsCharValidForPos(var AChar: Char; - APos: Integer): Boolean; -begin - Result := True; -end; - -procedure TcxCustomMaskEdit.UpdateTextFormatting; -begin - InternalSetDisplayValue(Text); -end; - -{ TcxMaskEdit } - -function TcxMaskEdit.SupportsSpelling: Boolean; -begin - Result := IsTextInputMode; -end; - -class function TcxMaskEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxMaskEditProperties; -end; - -function TcxMaskEdit.GetActiveProperties: TcxMaskEditProperties; -begin - Result := TcxMaskEditProperties(InternalGetActiveProperties); -end; - -function TcxMaskEdit.GetProperties: TcxMaskEditProperties; -begin - Result := TcxMaskEditProperties(FProperties); -end; - -procedure TcxMaskEdit.SetProperties(Value: TcxMaskEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterMaskEditHelper } - -class function TcxFilterMaskEditHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxMaskEdit; -end; - -class function TcxFilterMaskEditHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoLess, fcoLessEqual, - fcoGreater, fcoGreaterEqual, fcoBlanks, fcoNonBlanks]; - if not TcxCustomMaskEditProperties(AProperties).IsMasked and - ((AValueTypeClass <> nil) and AValueTypeClass.IsString) then - Result := Result + [fcoLike, fcoNotLike]; - if AExtendedSet then - Result := Result + [fcoBetween..fcoNotInList]; -end; - -class procedure TcxFilterMaskEditHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - with TcxCustomMaskEditProperties(AProperties) do - begin - if TcxCustomMaskEditProperties(AEditProperties).MaskKind = - emkRegExpr then - MaskKind := emkRegExprEx; - AutoSelect := not IsMasked; - end; -end; - -initialization - GetRegisteredEditProperties.Register(TcxMaskEditProperties, scxSEditRepositoryMaskItem); - FilterEditsController.Register(TcxMaskEditProperties, TcxFilterMaskEditHelper); - -finalization - FilterEditsController.Unregister(TcxMaskEditProperties, TcxFilterMaskEditHelper); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxMaskEditTextEditor.dfm b/internal/x.46/ExpressEditors Library 5/Sources/cxMaskEditTextEditor.dfm deleted file mode 100644 index b1593d36..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxMaskEditTextEditor.dfm +++ /dev/null @@ -1,71 +0,0 @@ -object cxMaskEditTextEditorDlg: TcxMaskEditTextEditorDlg - Left = 327 - Top = 323 - BorderStyle = bsDialog - Caption = 'Masked Text Editor' - ClientHeight = 151 - ClientWidth = 466 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = False - OnKeyDown = FormKeyDown - OnShow = FormShow - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Label1: TLabel - Left = 8 - Top = 24 - Width = 47 - Height = 13 - Caption = 'Input text:' - end - object Label2: TLabel - Left = 8 - Top = 62 - Width = 49 - Height = 13 - Caption = 'Edit mask:' - end - object Label3: TLabel - Left = 64 - Top = 62 - Width = 3 - Height = 13 - end - object Bevel1: TBevel - Left = 8 - Top = 96 - Width = 449 - Height = 2 - end - object cxMaskEdit1: TcxMaskEdit - Tag = 25 - Left = 64 - Top = 20 - Width = 391 - Height = 21 - Properties.IgnoreMaskBlank = True - Properties.MaxLength = 0 - TabOrder = 0 - end - object cxButton2: TButton - Left = 352 - Top = 112 - Width = 105 - Height = 25 - Caption = 'Cancel' - TabOrder = 1 - OnClick = cxButton2Click - end - object cxButton1: TButton - Left = 240 - Top = 112 - Width = 105 - Height = 25 - Caption = 'OK' - TabOrder = 2 - OnClick = cxButton1Click - end -end diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxMaskEditTextEditor.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxMaskEditTextEditor.pas deleted file mode 100644 index 01ed9a8f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxMaskEditTextEditor.pas +++ /dev/null @@ -1,125 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxMaskEditTextEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, SysUtils, Classes, Graphics, Controls, Forms, - cxMaskEdit, StdCtrls, cxButtons, cxControls, cxContainer, cxEdit, - ExtCtrls, cxTextEdit, cxClasses, cxEditConsts; - -type - TcxMaskEditTextEditorDlg = class(TForm) - Label1: TLabel; - Label2: TLabel; - cxMaskEdit1: TcxMaskEdit; - Label3: TLabel; - Bevel1: TBevel; - cxButton2: TButton; - cxButton1: TButton; - procedure FormShow(Sender: TObject); - procedure cxButton1Click(Sender: TObject); - procedure cxButton2Click(Sender: TObject); - procedure FormKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - private - { Private declarations } - FMaskEdit: TcxCustomMaskEdit; - public - { Public declarations } - property MaskEdit: TcxCustomMaskEdit read FMaskEdit write FMaskEdit; - end; - -var - cxMaskEditTextEditorDlg: TcxMaskEditTextEditorDlg; - -implementation - -{$R *.dfm} - -type - TcxCustomMaskEditPropertiesAccess = class(TcxCustomMaskEditProperties); - -procedure TcxMaskEditTextEditorDlg.FormShow(Sender: TObject); -var - AProperties: TcxCustomMaskEditPropertiesAccess; -begin - AProperties := TcxCustomMaskEditPropertiesAccess(MaskEdit.ActiveProperties); - begin - cxMaskEdit1.Properties.AlwaysShowBlanksAndLiterals := True; - cxMaskEdit1.Properties.MaxLength := AProperties.MaxLength; - cxMaskEdit1.Text := ''; - cxMaskEdit1.Properties.MaskKind := AProperties.MaskKind; - cxMaskEdit1.Properties.EditMask := AProperties.EditMask; - cxMaskEdit1.Properties.MaxLength := AProperties.MaxLength; - cxMaskEdit1.Properties.CaseInsensitive := AProperties.CaseInsensitive; - cxMaskEdit1.Text := MaskEdit.Text; - if AProperties.IsMasked then - Label3.Caption := AProperties.EditMask - else - Label3.Caption := cxGetResourceString(@scxMaskEditNoMask); - end; -end; - -procedure TcxMaskEditTextEditorDlg.cxButton1Click(Sender: TObject); -begin - MaskEdit.Text := cxMaskEdit1.Text; - Close; -end; - -procedure TcxMaskEditTextEditorDlg.cxButton2Click(Sender: TObject); -begin - Close; -end; - -procedure TcxMaskEditTextEditorDlg.FormKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if TranslateKey(Key) = VK_ESCAPE then - Close - else if TranslateKey(Key) = VK_RETURN then - begin - MaskEdit.Text := cxMaskEdit1.Text; - Close; - end; -end; - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxMemo.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxMemo.pas deleted file mode 100644 index f2594e0f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxMemo.pas +++ /dev/null @@ -1,1991 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxMemo; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, -{$IFDEF DELPHI6} - Types, -{$ENDIF} - Classes, Controls, Forms, Graphics, Menus, StdCtrls, SysUtils, cxClasses, - cxContainer, cxControls, cxDataStorage, cxDataUtils, cxEdit, cxDrawTextUtils, - cxGraphics, cxLookAndFeels, cxTextEdit, cxFilterControlUtils; - -type - { IcxInnerMemo } - - IcxInnerMemo = interface(IcxInnerTextEdit) - ['{9D0DFE35-58DC-4C0C-9C98-65C5AAD757C9}'] - function GetCaretPos: TPoint; - function GetLines: TStrings; - function GetScrollBars: TScrollStyle; - function GetWantReturns: Boolean; - function GetWantTabs: Boolean; - function GetWordWrap: Boolean; - procedure SetCaretPos(const Value: TPoint); - procedure SetScrollBars(Value: TScrollStyle); - procedure SetWantReturns(Value: Boolean); - procedure SetWantTabs(Value: Boolean); - procedure SetWordWrap(Value: Boolean); - property CaretPos: TPoint read GetCaretPos write SetCaretPos; - property Lines: TStrings read GetLines; - property ScrollBars: TScrollStyle read GetScrollBars write SetScrollBars; - property WantReturns: Boolean read GetWantReturns write SetWantReturns; - property WantTabs: Boolean read GetWantTabs write SetWantTabs; - property WordWrap: Boolean read GetWordWrap write SetWordWrap; - end; - - { TcxCustomTextEditViewInfo } - - TcxCustomMemoViewInfo = class(TcxCustomTextEditViewInfo) - public - procedure DrawText(ACanvas: TcxCanvas); override; - end; - - { TcxCustomMemoViewData } - - TcxCustomMemoProperties = class; - - TcxCustomMemoViewData = class(TcxCustomTextEditViewData) - private - function GetProperties: TcxCustomMemoProperties; - protected - function GetMaxLineCount: Integer; override; - function InternalGetEditConstantPartSize(ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo): TSize; override; - function InternalGetEditContentSize(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; override; - public - function GetDrawTextFlags: DWORD; override; - function GetDrawTextOffset: TRect; override; - function GetEditContentSizeCorrection: TSize; override; - property Properties: TcxCustomMemoProperties read GetProperties; - end; - - { TcxCustomMemoProperties } - - TcxCustomInnerMemo = class; - - TcxCustomMemoProperties = class(TcxCustomTextEditProperties) - private - FScrollBars: TScrollStyle; - FVisibleLineCount: Integer; - FWantReturns: Boolean; - FWantTabs: Boolean; - FWordWrap: Boolean; - function GetAlignment: TAlignment; - function IsAlignmentStored: Boolean; - procedure SetAlignment(Value: TAlignment); - procedure SetScrollBars(Value: TScrollStyle); - procedure SetVisibleLineCount(Value: Integer); - procedure SetWantReturns(Value: Boolean); - procedure SetWantTabs(Value: Boolean); - procedure SetWordWrap(Value: Boolean); - protected - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function InnerEditNeedsTabs: Boolean; override; - function IsMultiLine: Boolean; override; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - // !!! - property Alignment: TAlignment read GetAlignment write SetAlignment stored IsAlignmentStored; - property AutoSelect default False; - property ScrollBars: TScrollStyle read FScrollBars write SetScrollBars default ssNone; - property VisibleLineCount: Integer read FVisibleLineCount write SetVisibleLineCount default 0; - property WantReturns: Boolean read FWantReturns write SetWantReturns default True; - property WantTabs: Boolean read FWantTabs write SetWantTabs default False; - property WordWrap: Boolean read FWordWrap write SetWordWrap default True; - end; - - { TcxMemoProperties } - - TcxMemoProperties = class(TcxCustomMemoProperties) - published - property Alignment; - property AssignedValues; - property AutoSelect; - property CharCase; - property ClearKey; - property HideSelection; - property ImeMode; - property ImeName; - property MaxLength; - property OEMConvert; - property ReadOnly; - property ScrollBars; - property VisibleLineCount; - property WantReturns; - property WantTabs; - property WordWrap; - property OnChange; - property OnEditValueChanged; - property OnValidate; - end; - - { TcxCustomMemo } - - TcxCustomMemo = class(TcxCustomTextEdit) - private - FCanCreateScrollBars: Boolean; - FInternalAction: Boolean; - FOldScrollPos: Integer; - FScrollBarsCalculating: Boolean; - function GetActiveProperties: TcxCustomMemoProperties; - function GetCaretPos: TPoint; - function GetLines: TStrings; - function GetInnerMemo: IcxInnerMemo; - function GetProperties: TcxCustomMemoProperties; - procedure SetCaretPos(const Value: TPoint); - procedure SetLines(Value: TStrings); - procedure SetProperties(Value: TcxCustomMemoProperties); - procedure WMCommand(var Message: TWMCommand); message WM_COMMAND; - protected - procedure AdjustInnerEdit; override; - procedure AdjustInnerEditPosition; override; - function CanAutoSize: Boolean; override; - function CanKeyDownModifyEdit(Key: Word; Shift: TShiftState): Boolean; override; - function CanScrollLineWithoutScrollBars(ADirection: TcxDirection): Boolean; override; - procedure ChangeHandler(Sender: TObject); override; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); override; - procedure EnabledChanged; override; - procedure FontChanged; override; - function GetInnerEditClass: TControlClass; override; - procedure Initialize; override; - procedure InitializeViewData(AViewData: TcxCustomEditViewData); override; - function SupportsSpelling: Boolean; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - function NeedsScrollBars: Boolean; override; - procedure PropertiesChanged(Sender: TObject); override; - procedure ReadState(Reader: TReader); override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - function SendActivationKey(Key: Char): Boolean; override; - procedure SetSelText(const Value: TCaption); override; - function TabsNeeded: Boolean; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure WndProc(var Message: TMessage); override; - function CanMemoKeyModifyEdit(Key: Word; Shift: TShiftState; - AIsKeyPress: Boolean): Boolean; virtual; - procedure InternalSynchronizeEditValue; - property InnerMemo: IcxInnerMemo read GetInnerMemo; - property ScrollBarsCalculating: Boolean read FScrollBarsCalculating; - public - procedure ClearSelection; override; - procedure CutToClipboard; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function IsEditClass: Boolean; override; - property ActiveProperties: TcxCustomMemoProperties read GetActiveProperties; - property CaretPos: TPoint read GetCaretPos write SetCaretPos; - property Lines: TStrings read GetLines write SetLines; - property Properties: TcxCustomMemoProperties read GetProperties - write SetProperties; - end; - - { TcxMemo } - - TcxMemo = class(TcxCustomMemo) - private - function GetActiveProperties: TcxMemoProperties; - function GetProperties: TcxMemoProperties; - procedure SetProperties(Value: TcxMemoProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxMemoProperties read GetActiveProperties; - published - property Align; - property Anchors; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property Lines; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxMemoProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxFilterMemoHelper } - - TcxFilterMemoHelper = class(TcxFilterTextEditHelper) - public - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - end; - - { TcxCustomInnerMemoHelper } - - TcxCustomInnerMemoHelper = class(TcxInterfacedPersistent, - IcxContainerInnerControl, IcxCustomInnerEdit, IcxInnerTextEdit, - IcxInnerMemo) - private - FEdit: TcxCustomInnerMemo; - protected - property Edit: TcxCustomInnerMemo read FEdit; - public - constructor Create(AEdit: TcxCustomInnerMemo); reintroduce; virtual; - - // IcxContainerInnerControl - function GetControlContainer: TcxContainer; - function GetControl: TWinControl; - - // IcxCustomInnerEdit - function CallDefWndProc(AMsg: UINT; WParam: WPARAM; - LParam: LPARAM): LRESULT; - function CanProcessClipboardMessages: Boolean; - function GetEditValue: TcxEditValue; - function GetOnChange: TNotifyEvent; - procedure LockBounds(ALock: Boolean); - procedure SafelySetFocus; - procedure SetEditValue(const Value: TcxEditValue); - procedure SetParent(Value: TWinControl); - procedure SetOnChange(Value: TNotifyEvent); - - // IcxInnerTextEdit - procedure ClearSelection; - procedure CopyToClipboard; - function GetAlignment: TAlignment; - function GetAutoSelect: Boolean; - function GetCharCase: TEditCharCase; - function GetEchoMode: TcxEditEchoMode; - function GetFirstVisibleCharIndex: Integer; - function GetHideSelection: Boolean; - function GetImeLastChar: Char; - function GetImeMode: TImeMode; - function GetImeName: TImeName; - function GetInternalUpdating: Boolean; - function GetMaxLength: Integer; - function GetMultiLine: Boolean; - function GetOEMConvert: Boolean; - function GetOnSelChange: TNotifyEvent; - function GetPasswordChar: TCaptionChar; - function GetReadOnly: Boolean; - function GetSelLength: Integer; - function GetSelStart: Integer; - function GetSelText: string; - procedure SelectAll; - procedure SetAlignment(Value: TAlignment); - procedure SetAutoSelect(Value: Boolean); - procedure SetCharCase(Value: TEditCharCase); - procedure SetEchoMode(Value: TcxEditEchoMode); - procedure SetHideSelection(Value: Boolean); - procedure SetImeMode(Value: TImeMode); - procedure SetImeName(const Value: TImeName); - procedure SetInternalUpdating(Value: Boolean); - procedure SetMaxLength(Value: Integer); - procedure SetOEMConvert(Value: Boolean); - procedure SetOnSelChange(Value: TNotifyEvent); - procedure SetPasswordChar(Value: TCaptionChar); - procedure SetReadOnly(Value: Boolean); - procedure SetSelLength(Value: Integer); - procedure SetSelStart(Value: Integer); - procedure SetSelText(Value: string); - {$IFDEF DELPHI12} - function GetTextHint: string; - procedure SetTextHint(Value: string); - {$ENDIF} - - // IcxInnerMemo - function GetCaretPos: TPoint; - function GetLines: TStrings; - function GetScrollBars: TScrollStyle; - function GetWantReturns: Boolean; - function GetWantTabs: Boolean; - function GetWordWrap: Boolean; - procedure SetCaretPos(const Value: TPoint); - procedure SetScrollBars(Value: TScrollStyle); - procedure SetWantReturns(Value: Boolean); - procedure SetWantTabs(Value: Boolean); - procedure SetWordWrap(Value: Boolean); - end; - - { TcxCustomInnerMemo } - - TcxMultiLineEditCharPosition = packed record - Line, Col: Integer; - end; - - TcxInnerMemoSelectionState = packed record - CursorPosition: TcxMultiLineEditCharPosition; - SelectionStart: TcxMultiLineEditCharPosition; - SelectionEnd: TcxMultiLineEditCharPosition; - end; - - TcxCustomInnerMemo = class(TMemo, IUnknown, - IcxContainerInnerControl, IcxInnerEditHelper, IcxPaintControlsHelper) - private - FAutoSelect: Boolean; - FEchoMode: TcxEditEchoMode; - FEscapePressed: Boolean; - FHelper: TcxCustomInnerMemoHelper; - FInternalTextSettingCount: Integer; - FInternalUpdating: Boolean; - FIsCreating: Boolean; - FLockBoundsCount: Integer; - FOnSelChange: TNotifyEvent; - - procedure BeginInternalTextSetting; - procedure EndInternalTextSetting; - function IsInternalTextSetting: Boolean; - - function GetContainer: TcxCustomMemo; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CNKeyDown(var Message: TWMKeyDown); message CN_KEYDOWN; - procedure EMReplaceSel(var Message: TMessage); message EM_REPLACESEL; - procedure EMSetSel(var Message: TMessage); message EM_SETSEL; - procedure WMClear(var Message: TMessage); message WM_CLEAR; - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure WMIMEComposition(var Message: TMessage); message WM_IME_COMPOSITION; - procedure WMKeyDown(var Message: TWMKeyDown); message WM_KEYDOWN; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure WMSetFont(var Message: TWMSetFont); message WM_SETFONT; - procedure WMSetText(var Message: TWMSetText); message WM_SETTEXT; - procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; - procedure WMWindowPosChanging(var Message: TWMWindowPosChanging); message WM_WINDOWPOSCHANGING; - protected - procedure Click; override; - procedure DblClick; override; - procedure DoEnter; override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseLeave(AControl: TControl); dynamic; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure CreateHandle; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWindowHandle(const Params: TCreateParams); override; - procedure WndProc(var Message: TMessage); override; - - // IcxContainerInnerControl - function GetControl: TWinControl; - function GetControlContainer: TcxContainer; - - // IcxInnerEditHelper - function GetHelper: IcxCustomInnerEdit; - - // IcxPaintControlsHelper - function AllowDrawEdgesAndBorders: Boolean; - - property AutoSelect: Boolean read FAutoSelect write FAutoSelect default False; - property Container: TcxCustomMemo read GetContainer; - property Helper: TcxCustomInnerMemoHelper read FHelper; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - function CanFocus: Boolean; override; - procedure DefaultHandler(var Message); override; - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; - property CharCase; - property OnSelChange: TNotifyEvent read FOnSelChange write FOnSelChange; - end; - -procedure ExtractFirstLine(var AText: WideString; AMaxLength: Integer = 0); -procedure SetMemoCaretPos(AMemo: TCustomMemo; const Value: TPoint); - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Clipbrd, cxEditConsts, cxEditUtils, cxScrollBar; - -type - TWinControlAccess = class(TWinControl); - -const - cxMemoMaxDisplayTextLength = 250; - -procedure CorrectLineBreaks(var S: string); -var - I, L: Integer; -begin - L := Length(S); - I := 1; - while I < L do - if (S[I] = #10) and (S[I + 1] = #13) then - begin - S[I] := #13; - Inc(I); - S[I] := #10; - Inc(I); - Insert(#13#10, S, I); - Inc(I, 2); - end - else - begin - if (S[I] = #13) and (S[I + 1] = #10) then - Inc(I); - Inc(I); - end; -end; - -procedure DrawMemo(ACanvas: TcxCanvas; AViewInfo: TcxCustomMemoViewInfo); -var - AText: PcxCaptionChar; -begin - with AViewInfo do - begin - AText := PcxCaptionChar(Text); - if Length(AText) = 0 then - Exit; - ACanvas.Font := Font; - ACanvas.Font.Color := TextColor; - InternalTextOut(ACanvas.Canvas, AViewInfo, AText, TextRect, DrawTextFlags, - SelStart, SelLength, SelBackgroundColor, SelTextColor, MaxLineCount); - end; -end; - -procedure ExtractFirstLine(var AText: WideString; AMaxLength: Integer = 0); -var - ALength, I: Integer; -begin - ALength := Length(AText); - if (AMaxLength > 0) and (ALength > AMaxLength) then - ALength := AMaxLength; - for I := 1 to ALength do - if (AText[I] = #10) or (AText[I] = #13) then - begin - SetLength(AText, I - 1); - Break; - end; - if Length(AText) > ALength then - SetLength(AText, ALength); -end; - -procedure SetMemoCaretPos(AMemo: TCustomMemo; const Value: TPoint); -var - ACharIdx: Integer; -begin - ACharIdx := SendMessage(AMemo.Handle, EM_LINEINDEX, Value.Y, 0) + Value.X; - SendMessage(AMemo.Handle, EM_SETSEL, ACharIdx, ACharIdx); -end; - -{ TcxCustomMemoViewInfo } - -procedure TcxCustomMemoViewInfo.DrawText(ACanvas: TcxCanvas); -begin - DrawMemo(ACanvas, Self); -end; - -{ TcxCustomMemoViewData } - -function TcxCustomMemoViewData.GetDrawTextFlags: DWORD; -const - AAlignmentFlagMap: array [TAlignment] of DWORD = (CXTO_LEFT, - CXTO_RIGHT, CXTO_CENTER_HORIZONTALLY); -begin - Result := Integer(CXTO_EDITCONTROL); - with Properties do - if not (ScrollBars in [ssHorizontal, ssBoth]) and WordWrap then - Result := Result or CXTO_WORDBREAK or CXTO_CHARBREAK; - Result := Result or AAlignmentFlagMap[Properties.Alignment]; - Result := Result or CXTO_PREVENT_LEFT_EXCEED or CXTO_EXPANDTABS; -end; - -function TcxCustomMemoViewData.GetDrawTextOffset: TRect; -begin - Result := EditContentDefaultOffsets[IsInplace]; -end; - -function TcxCustomMemoViewData.GetEditContentSizeCorrection: TSize; -begin - with GetDrawTextOffset do - Result := Size(Left + Right, Top + Bottom); -end; - -function TcxCustomMemoViewData.GetMaxLineCount: Integer; -begin - if Properties.VisibleLineCount > 0 then - Result := Properties.VisibleLineCount - else - Result := inherited GetMaxLineCount; -end; - -function TcxCustomMemoViewData.InternalGetEditConstantPartSize( - ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo): TSize; -var - AContentHeight: Integer; -begin - Result := inherited InternalGetEditConstantPartSize(ACanvas, AIsInplace, - AEditSizeProperties, MinContentSize, AViewInfo); - if (Edit <> nil) and (Properties.ScrollBars in [ssHorizontal, ssBoth]) then - Result.cy := Result.cy + GetScrollBarSize.cy; - if Properties.VisibleLineCount > 0 then - begin - ACanvas.Font := Style.GetVisibleFont; - AContentHeight := ACanvas.TextHeight('Zg') * Properties.VisibleLineCount + - GetEditContentSizeCorrection.cy; - if MinContentSize.cy < AContentHeight then - MinContentSize.cy := AContentHeight; - end; -end; - -function TcxCustomMemoViewData.InternalGetEditContentSize(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; const AEditSizeProperties: TcxEditSizeProperties): TSize; -begin - Result := GetTextEditContentSize(ACanvas, Self, EditValueToDisplayText(AEditValue), - GetDrawTextFlags, AEditSizeProperties, Properties.VisibleLineCount); -end; - -function TcxCustomMemoViewData.GetProperties: TcxCustomMemoProperties; -begin - Result := TcxCustomMemoProperties(FProperties); -end; - -{ TcxCustomMemoProperties } - -constructor TcxCustomMemoProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - inherited Alignment.Vert := taTopJustify; - AutoSelect := False; - FScrollBars := ssNone; - FWantReturns := True; - FWordWrap := True; -end; - -procedure TcxCustomMemoProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomMemoProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomMemoProperties do - begin - Self.ScrollBars := ScrollBars; - Self.VisibleLineCount := VisibleLineCount; - Self.WantReturns := WantReturns; - Self.WantTabs := WantTabs; - Self.WordWrap := WordWrap; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomMemoProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxMemo; -end; - -function TcxCustomMemoProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -begin - Result := inherited GetDisplayText(AEditValue); - if AFullText then - Exit; - ExtractFirstLine(Result, cxMemoMaxDisplayTextLength); -end; - -class function TcxCustomMemoProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomMemoViewInfo; -end; - -function TcxCustomMemoProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - if (IDefaultValuesProvider <> nil) and IDefaultValuesProvider.IsBlob then - Result := evsValue - else - Result := evsText; -end; - -class function TcxCustomMemoProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomMemoViewData; -end; - -function TcxCustomMemoProperties.InnerEditNeedsTabs: Boolean; -begin - Result := WantTabs; -end; - -function TcxCustomMemoProperties.IsMultiLine: Boolean; -begin - Result := True; -end; - -function TcxCustomMemoProperties.GetAlignment: TAlignment; -begin - Result := inherited Alignment.Horz; -end; - -function TcxCustomMemoProperties.IsAlignmentStored: Boolean; -begin - Result := inherited Alignment.IsHorzStored; -end; - -procedure TcxCustomMemoProperties.SetAlignment(Value: TAlignment); -begin - inherited Alignment.Horz := Value; -end; - -procedure TcxCustomMemoProperties.SetScrollBars(Value: TScrollStyle); -begin - if Value <> FScrollBars then - begin - FScrollBars := Value; - Changed; - end; -end; - -procedure TcxCustomMemoProperties.SetVisibleLineCount(Value: Integer); -begin - if Value < 0 then - Value := 0; - if Value <> FVisibleLineCount then - begin - FVisibleLineCount := Value; - Changed; - end; -end; - -procedure TcxCustomMemoProperties.SetWantReturns(Value: Boolean); -begin - if Value <> FWantReturns then - begin - FWantReturns := Value; - Changed; - end; -end; - -procedure TcxCustomMemoProperties.SetWantTabs(Value: Boolean); -begin - if Value <> FWantTabs then - begin - FWantTabs := Value; - Changed; - end; -end; - -procedure TcxCustomMemoProperties.SetWordWrap(Value: Boolean); -begin - if Value <> FWordWrap then - begin - FWordWrap := Value; - Changed; - end; -end; - -{ TcxCustomMemo } - -procedure TcxCustomMemo.ClearSelection; -var - APrevKeyboardAction: Boolean; -begin - if SelLength = 0 then - Exit; - if Focused and not DoEditing then - Exit; - APrevKeyboardAction := KeyboardAction; - KeyboardAction := Focused; - try - FInternalAction := True; - try - InnerMemo.ClearSelection; - finally - FInternalAction := False; - end; - InternalSynchronizeEditValue; - finally - KeyboardAction := APrevKeyboardAction; - end; -end; - -procedure TcxCustomMemo.CutToClipboard; -begin - if SelLength = 0 then - Exit; - InnerTextEdit.CopyToClipboard; - ClearSelection; -end; - -class function TcxCustomMemo.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomMemoProperties; -end; - -function TcxCustomMemo.IsEditClass: Boolean; -begin - Result := True; -end; - -procedure TcxCustomMemo.AdjustInnerEdit; -var - AFont: TFont; - AInnerControl: TWinControlAccess; -begin - if (InnerControl = nil) or FIsCreating then - Exit; - AInnerControl := TWinControlAccess(InnerControl); - InnerEdit.LockBounds(True); - try - AInnerControl.Color := ViewInfo.BackgroundColor; - AFont := TFont.Create; - try - AFont.Assign(VisibleFont); - AFont.Color := ViewInfo.TextColor; - AssignFonts(AInnerControl.Font, AFont); - finally - FreeAndNil(AFont); - end; - finally - InnerEdit.LockBounds(False); - end; -end; - -procedure TcxCustomMemo.AdjustInnerEditPosition; -var - AInnerEditBounds: TRect; - R: TRect; -begin - if (InnerTextEdit = nil) or FInnerEditPositionAdjusting then - Exit; - FInnerEditPositionAdjusting := True; - try - R := ViewInfo.ClientRect; - AInnerEditBounds := Rect(R.Left - cxContainerMaxBorderWidth, R.Top - cxContainerMaxBorderWidth, - R.Right - R.Left + cxContainerMaxBorderWidth * 2, R.Bottom - R.Top + cxContainerMaxBorderWidth * 2); - with AInnerEditBounds do - if not EqualRect(InnerEdit.Control.BoundsRect, Rect(Left, Top, Left + Right, Top + Bottom)) then - InnerEdit.Control.SetBounds(Left, Top, Right, Bottom); - AlignControls(InnerEdit.Control, R); - finally - FInnerEditPositionAdjusting := False; - end; -end; - -function TcxCustomMemo.CanAutoSize: Boolean; -begin - Result := not IsInplace and (ActiveProperties.VisibleLineCount > 0); -end; - -function TcxCustomMemo.CanKeyDownModifyEdit(Key: Word; Shift: TShiftState): Boolean; -begin - Result := inherited CanKeyDownModifyEdit(Key, Shift) or - CanMemoKeyModifyEdit(Key, Shift, False); -end; - -function TcxCustomMemo.CanScrollLineWithoutScrollBars( - ADirection: TcxDirection): Boolean; -begin - Result := ADirection in [dirUp, dirDown]; -end; - -procedure TcxCustomMemo.ChangeHandler(Sender: TObject); -begin - inherited ChangeHandler(Sender); - UpdateScrollBarsParameters; -end; - -procedure TcxCustomMemo.DoEditKeyDown(var Key: Word; Shift: TShiftState); -begin - inherited DoEditKeyDown(Key, Shift); - if Key = 0 then - Exit; - - if ((Char(Key) = 'a') or (Char(Key) = 'A')) and (ssCtrl in Shift) and - (Shift * [ssAlt, ssShift] = []) and (Lines.Count > 0) then - begin - if InnerControl is TCustomEdit then - TCustomEdit(InnerControl).SelectAll; - DoAfterKeyDown(Key, Shift); - Key := 0; - end; -end; - -procedure TcxCustomMemo.EnabledChanged; -begin - inherited; - SetScrollBarsParameters; -end; - -procedure TcxCustomMemo.FontChanged; -begin - inherited FontChanged; - SetScrollBarsParameters; -end; - -function TcxCustomMemo.GetInnerEditClass: TControlClass; -begin - Result := TcxCustomInnerMemo; -end; - -procedure TcxCustomMemo.Initialize; -begin - inherited Initialize; - Width := 185; - Height := 89; - FOldScrollPos := 0; -end; - -procedure TcxCustomMemo.InitializeViewData(AViewData: TcxCustomEditViewData); -begin - inherited InitializeViewData(AViewData); - AViewData.HScrollBar := nil; - AViewData.VScrollBar := nil; -end; - -function TcxCustomMemo.SupportsSpelling: Boolean; -begin - Result := IsTextInputMode; -end; - -procedure TcxCustomMemo.KeyDown(var Key: Word; Shift: TShiftState); -var - AKey: Word; -begin - AKey := TranslateKey(Key); - if IsInplace and (AKey = VK_RETURN) and ((ssCtrl in Shift) and not ActiveProperties.WantReturns or - not (ssCtrl in Shift) and ActiveProperties.WantReturns) then - DoEditKeyDown(Key, Shift) - else - inherited KeyDown(Key, Shift); -end; - -function TcxCustomMemo.NeedsScrollBars: Boolean; -begin - Result := FCanCreateScrollBars and (ActiveProperties <> nil) and - (ActiveProperties.ScrollBars <> ssNone); -end; - -procedure TcxCustomMemo.PropertiesChanged(Sender: TObject); -begin - if PropertiesChangeLocked then - Exit; - if InnerMemo.ScrollBars <> ActiveProperties.ScrollBars then - begin - FCanCreateScrollBars := True; - CheckNeedsScrollBars; - InnerMemo.ScrollBars := ActiveProperties.ScrollBars; - if HandleAllocated then - RecreateWnd; - if InnerControl.HandleAllocated then - TWinControlAccess(InnerControl).RecreateWnd; - end; - InnerMemo.WantReturns := ActiveProperties.WantReturns; - InnerMemo.WantTabs := ActiveProperties.WantTabs; - InnerMemo.WordWrap := ActiveProperties.WordWrap; - inherited PropertiesChanged(Sender); -end; - -procedure TcxCustomMemo.ReadState(Reader: TReader); -begin - inherited ReadState(Reader); - if Lines.Count > 0 then - PrepareEditValue(Text, FEditValue, InternalFocused); -end; - -procedure TcxCustomMemo.Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); -const - ALineCounts: array[Boolean] of Integer = (-1, 1); -begin - if AScrollBarKind = sbHorizontal then - begin - InnerMemo.CallDefWndProc(WM_HSCROLL, - Word(AScrollCode) + Word(AScrollPos) shl 16, HScrollBar.Handle); - AScrollPos := GetScrollPos(InnerControl.Handle, SB_HORZ); - end - else - begin - if AScrollCode in [scLineDown, scLineUp] then - SendMessage(InnerControl.Handle, EM_LINESCROLL, 0, - ALineCounts[AScrollCode = scLineDown]) - else - InnerMemo.CallDefWndProc(WM_VSCROLL, - Word(AScrollCode) + Word(AScrollPos) shl 16, VScrollBar.Handle); - AScrollPos := GetScrollPos(InnerControl.Handle, SB_VERT); - end; - if (AScrollCode = scTrack) and (FOldScrollPos <> AScrollPos) then - begin - DoLayoutChanged; - InnerControl.Invalidate; - end; - FOldScrollPos := AScrollPos; - SetScrollBarsParameters; -end; - -function TcxCustomMemo.SendActivationKey(Key: Char): Boolean; -begin - Result := not(TranslateKey(Word(Key)) = VK_RETURN); -end; - -procedure TcxCustomMemo.SetSelText(const Value: TCaption); -var - ANewValue: string; - ANewValueLength: Integer; - APrevKeyboardAction: Boolean; -begin - ANewValue := Value; - if Focused and (ActiveProperties.MaxLength > 0) and - (Length(WideString(Copy(Text, 1, SelStart) + Value)) > ActiveProperties.MaxLength) then - begin - ANewValueLength := ActiveProperties.MaxLength - Length(WideString(Copy(Text, 1, SelStart))); - if ANewValueLength <= 0 then - Exit; - ANewValue := Copy(WideString(Value), 1, ANewValueLength); - end; - if (Focused or FIsChangeBySpellChecker) and not DoEditing then - Exit; - APrevKeyboardAction := KeyboardAction; - KeyboardAction := Focused or FIsChangeBySpellChecker; - try - InnerTextEdit.SelText := ANewValue; - InternalSynchronizeEditValue; - finally - KeyboardAction := APrevKeyboardAction; - end; -end; - -function TcxCustomMemo.TabsNeeded: Boolean; -begin - Result := inherited TabsNeeded or ActiveProperties.WantTabs; -end; - -procedure TcxCustomMemo.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params.WindowClass do - begin - style := style and not CS_VREDRAW; - if (ActiveProperties.ScrollBars in [ssHorizontal, ssBoth]) or not ActiveProperties.WordWrap then - style := style and not CS_HREDRAW; - end; -end; - -procedure TcxCustomMemo.WndProc(var Message: TMessage); -begin - inherited WndProc(Message); - case Message.Msg of - WM_NCCALCSIZE, - WM_WINDOWPOSCHANGED, - CM_WININICHANGE: - UpdateScrollBarsParameters; - end; -end; - -function TcxCustomMemo.CanMemoKeyModifyEdit(Key: Word; Shift: TShiftState; - AIsKeyPress: Boolean): Boolean; -var - ATranslatedKey: Word; -begin - ATranslatedKey := TranslateKey(Key); - Result := (ATranslatedKey = VK_RETURN) and (ActiveProperties.WantReturns or - (ssCtrl in Shift)); - Result := Result or (ATranslatedKey = VK_TAB) and - (ActiveProperties.WantTabs or AIsKeyPress); -end; - -procedure TcxCustomMemo.InternalSynchronizeEditValue; -begin - if not KeyboardAction then - begin - ResetOnNewDisplayValue; - SynchronizeEditValue; - EditModified := False; - end; -end; - -function TcxCustomMemo.GetActiveProperties: TcxCustomMemoProperties; -begin - Result := TcxCustomMemoProperties(InternalGetActiveProperties); -end; - -function TcxCustomMemo.GetCaretPos: TPoint; -begin - Result := InnerMemo.CaretPos; -end; - -function TcxCustomMemo.GetLines: TStrings; -begin - Result := InnerMemo.Lines; -end; - -function TcxCustomMemo.GetInnerMemo: IcxInnerMemo; -begin - Result := InnerEdit as IcxInnerMemo; -end; - -function TcxCustomMemo.GetProperties: TcxCustomMemoProperties; -begin - Result := TcxCustomMemoProperties(FProperties); -end; - -procedure TcxCustomMemo.SetCaretPos(const Value: TPoint); -begin - InnerMemo.CaretPos := Value; -end; - -procedure TcxCustomMemo.SetLines(Value: TStrings); -begin - InnerMemo.Lines.Assign(Value); -end; - -procedure TcxCustomMemo.SetProperties(Value: TcxCustomMemoProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomMemo.WMCommand(var Message: TWMCommand); -begin - inherited; - if (Message.NotifyCode = EN_VSCROLL) or (Message.NotifyCode = EN_HSCROLL) then - SetScrollBarsParameters; -end; - -{ TcxMemo } - -class function TcxMemo.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxMemoProperties; -end; - -function TcxMemo.GetActiveProperties: TcxMemoProperties; -begin - Result := TcxMemoProperties(InternalGetActiveProperties); -end; - -function TcxMemo.GetProperties: TcxMemoProperties; -begin - Result := TcxMemoProperties(FProperties); -end; - -procedure TcxMemo.SetProperties(Value: TcxMemoProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterMemoHelper } - -class function TcxFilterMemoHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoLike, fcoNotLike, fcoBlanks, fcoNonBlanks]; -end; - -{ TcxCustomInnerMemoHelper } - -constructor TcxCustomInnerMemoHelper.Create(AEdit: TcxCustomInnerMemo); -begin - inherited Create(nil); - FEdit := AEdit; -end; - -{ IcxContainerInnerControl } -function TcxCustomInnerMemoHelper.GetControlContainer: TcxContainer; -begin - Result := Edit.Container; -end; - -function TcxCustomInnerMemoHelper.GetControl: TWinControl; -begin - Result := Edit; -end; - -{ IcxCustomInnerEdit } -function TcxCustomInnerMemoHelper.CallDefWndProc(AMsg: UINT; WParam: WPARAM; - LParam: LPARAM): LRESULT; -begin - Result := CallWindowProc(Edit.DefWndProc, Edit.Handle, AMsg, WParam, LParam); -end; - -function TcxCustomInnerMemoHelper.CanProcessClipboardMessages: Boolean; -begin - Result := False; -end; - -function TcxCustomInnerMemoHelper.GetEditValue: TcxEditValue; -begin - Result := Edit.Lines.Text; -end; - -function TcxCustomInnerMemoHelper.GetOnChange: TNotifyEvent; -begin - Result := Edit.OnChange; -end; - -procedure TcxCustomInnerMemoHelper.LockBounds(ALock: Boolean); -begin - with Edit do - if ALock then - Inc(FLockBoundsCount) - else - if FLockBoundsCount > 0 then - Dec(FLockBoundsCount); -end; - -procedure TcxCustomInnerMemoHelper.SafelySetFocus; -var - APrevAutoSelect: Boolean; -begin - with Edit do - begin - APrevAutoSelect := AutoSelect; - AutoSelect := False; - SetFocus; - AutoSelect := APrevAutoSelect; - end; -end; - -procedure TcxCustomInnerMemoHelper.SetEditValue(const Value: TcxEditValue); -begin - with Edit do - if HandleAllocated then - begin - Container.LockChangeEvents(True); - BeginInternalTextSetting; - try - if Container.IsInplace and WordWrap then - Lines.Clear; - Lines.Text := VarToStr(Value); - finally - EndInternalTextSetting; - Container.ChangeEventsCatcher.OnEditValueChangedEvent := False; - Container.LockChangeEvents(False); - end; - end - else - Text := VarToStr(Value); -end; - -procedure TcxCustomInnerMemoHelper.SetParent(Value: TWinControl); -begin - Edit.Parent := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetOnChange(Value: TNotifyEvent); -begin - Edit.OnChange := Value; -end; - -// IcxInnerTextEdit -procedure TcxCustomInnerMemoHelper.ClearSelection; -begin - Edit.ClearSelection; -end; - -procedure TcxCustomInnerMemoHelper.CopyToClipboard; -begin - Edit.CopyToClipboard; -end; - -function TcxCustomInnerMemoHelper.GetAlignment: TAlignment; -begin - Result := Edit.Alignment; -end; - -function TcxCustomInnerMemoHelper.GetAutoSelect: Boolean; -begin - Result := Edit.AutoSelect; -end; - -function TcxCustomInnerMemoHelper.GetCharCase: TEditCharCase; -begin - Result := Edit.CharCase; -end; - -function TcxCustomInnerMemoHelper.GetEchoMode: TcxEditEchoMode; -begin - Result := eemNormal; -end; - -function TcxCustomInnerMemoHelper.GetFirstVisibleCharIndex: Integer; -begin - Result := LoWord(SendMessage(Edit.Handle, EM_CHARFROMPOS, 0, 0)); -end; - -function TcxCustomInnerMemoHelper.GetHideSelection: Boolean; -begin - Result := Edit.HideSelection; -end; - -function TcxCustomInnerMemoHelper.GetImeLastChar: Char; -begin - Result := #0; -end; - -function TcxCustomInnerMemoHelper.GetImeMode: TImeMode; -begin - Result := Edit.ImeMode; -end; - -function TcxCustomInnerMemoHelper.GetImeName: TImeName; -begin - Result := Edit.ImeName; -end; - -function TcxCustomInnerMemoHelper.GetInternalUpdating: Boolean; -begin - Result := Edit.FInternalUpdating; -end; - -function TcxCustomInnerMemoHelper.GetMaxLength: Integer; -begin - Result := Edit.MaxLength; -end; - -function TcxCustomInnerMemoHelper.GetMultiLine: Boolean; -begin - Result := True; -end; - -function TcxCustomInnerMemoHelper.GetOEMConvert: Boolean; -begin - Result := Edit.OEMConvert; -end; - -function TcxCustomInnerMemoHelper.GetOnSelChange: TNotifyEvent; -begin - Result := Edit.OnSelChange; -end; - -function TcxCustomInnerMemoHelper.GetPasswordChar: TCaptionChar; -begin - Result := #0; -end; - -function TcxCustomInnerMemoHelper.GetReadOnly: Boolean; -begin - Result := Edit.ReadOnly; -end; - -function TcxCustomInnerMemoHelper.GetSelLength: Integer; -begin - Result := Edit.SelLength; -end; - -function TcxCustomInnerMemoHelper.GetSelStart: Integer; -begin - Result := Edit.SelStart; -end; - -function TcxCustomInnerMemoHelper.GetSelText: string; -begin - Result := Edit.SelText; -end; - -procedure TcxCustomInnerMemoHelper.SelectAll; -begin - with Edit do - if HandleAllocated then - SelectAll; -end; - -procedure TcxCustomInnerMemoHelper.SetAlignment(Value: TAlignment); -begin - with Edit do - begin - Alignment := Value; - end; -end; - -procedure TcxCustomInnerMemoHelper.SetAutoSelect(Value: Boolean); -begin - Edit.AutoSelect := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetCharCase(Value: TEditCharCase); -begin - Edit.CharCase := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetEchoMode(Value: TcxEditEchoMode); -begin -end; - -procedure TcxCustomInnerMemoHelper.SetHideSelection(Value: Boolean); -begin - Edit.HideSelection := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetImeMode(Value: TImeMode); -begin - Edit.ImeMode := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetImeName(const Value: TImeName); -begin - Edit.ImeName := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetInternalUpdating(Value: Boolean); -begin - Edit.FInternalUpdating := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetMaxLength(Value: Integer); -begin - Edit.MaxLength := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetOEMConvert(Value: Boolean); -begin - Edit.OEMConvert := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetOnSelChange(Value: TNotifyEvent); -begin - Edit.OnSelChange := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetPasswordChar(Value: TCaptionChar); -begin -end; - -procedure TcxCustomInnerMemoHelper.SetReadOnly(Value: Boolean); -begin - Edit.ReadOnly := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetSelLength(Value: Integer); -begin - Edit.SelLength := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetSelStart(Value: Integer); -begin - with Edit do - begin - SelStart := Value; - end; -end; - -procedure TcxCustomInnerMemoHelper.SetSelText(Value: string); -begin - Edit.SelText := Value; -end; - -{$IFDEF DELPHI12} -function TcxCustomInnerMemoHelper.GetTextHint: string; -begin - Result := Edit.TextHint; -end; - -procedure TcxCustomInnerMemoHelper.SetTextHint(Value: string); -begin - Edit.TextHint := Value; -end; -{$ENDIF} - -// IcxInnerMemo -function TcxCustomInnerMemoHelper.GetCaretPos: TPoint; -begin - Result := Edit.CaretPos; -end; - -function TcxCustomInnerMemoHelper.GetLines: TStrings; -begin - Result := Edit.Lines; -end; - -function TcxCustomInnerMemoHelper.GetScrollBars: TScrollStyle; -begin - Result := Edit.ScrollBars; -end; - -function TcxCustomInnerMemoHelper.GetWantReturns: Boolean; -begin - Result := Edit.WantReturns; -end; - -function TcxCustomInnerMemoHelper.GetWantTabs: Boolean; -begin - Result := Edit.WantTabs; -end; - -function TcxCustomInnerMemoHelper.GetWordWrap: Boolean; -begin - Result := Edit.WordWrap; -end; - -procedure TcxCustomInnerMemoHelper.SetCaretPos(const Value: TPoint); -begin - SetMemoCaretPos(Edit, Value); -end; - -procedure TcxCustomInnerMemoHelper.SetScrollBars(Value: TScrollStyle); -begin - Edit.ScrollBars := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetWantReturns(Value: Boolean); -begin - Edit.WantReturns := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetWantTabs(Value: Boolean); -begin - Edit.WantTabs := Value; -end; - -procedure TcxCustomInnerMemoHelper.SetWordWrap(Value: Boolean); -begin - Edit.WordWrap := Value; -end; - -{ TcxCustomInnerMemo } - -constructor TcxCustomInnerMemo.Create(AOwner: TComponent); -begin - FIsCreating := True; - inherited Create(AOwner); - if not (csDesigning in ComponentState) then - Cursor := crIBeam; - ParentColor := True; - ParentFont := True; - FEchoMode := eemNormal; - FHelper := TcxCustomInnerMemoHelper.Create(Self); - FInternalUpdating := False; - FIsCreating := False; -end; - -destructor TcxCustomInnerMemo.Destroy; -begin - FreeAndNil(FHelper); - inherited Destroy; -end; - -procedure TcxCustomInnerMemo.DragDrop(Source: TObject; X, Y: Integer); -begin - Container.DragDrop(Source, Left + X, Top + Y); -end; - -function TcxCustomInnerMemo.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - Container.DataBinding.ExecuteAction(Action); -end; - -function TcxCustomInnerMemo.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - Container.DataBinding.UpdateAction(Action); -end; - -function TcxCustomInnerMemo.CanFocus: Boolean; -begin - Result := Container.CanFocus; -end; - -procedure TcxCustomInnerMemo.DefaultHandler(var Message); -begin - if not Container.InnerControlDefaultHandler(TMessage(Message)) then - inherited DefaultHandler(Message); -end; - -procedure TcxCustomInnerMemo.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); -begin - if not FIsCreating and (FLockBoundsCount = 0) then - begin - Container.LockAlignControls(True); - try - inherited SetBounds(ALeft, ATop, AWidth, AHeight); - finally - Container.LockAlignControls(False); - end; - end; -end; - -procedure TcxCustomInnerMemo.Click; -begin - inherited Click; - Container.Click; -end; - -procedure TcxCustomInnerMemo.DblClick; -begin - inherited DblClick; - Container.DblClick; -end; - -procedure TcxCustomInnerMemo.DoEnter; -begin - inherited DoEnter; - if FAutoSelect then - SelectAll -end; - -procedure TcxCustomInnerMemo.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -begin - Container.DragOver(Source, Left + X, Top + Y, State, Accept); -end; - -procedure TcxCustomInnerMemo.KeyDown(var Key: Word; Shift: TShiftState); -begin - FInternalUpdating := False; - Container.KeyDown(Key, Shift); - if Key = 0 then - FInternalUpdating := True - else - inherited KeyDown(Key, Shift); -end; - -procedure TcxCustomInnerMemo.KeyPress(var Key: Char); -begin - FInternalUpdating := False; -// if not WantTabs and ((Key = Char(VK_TAB))) then -// Key := #0; - Container.KeyPress(Key); - if Key = #0 then - FInternalUpdating := True - else - inherited KeyPress(Key); -end; - -procedure TcxCustomInnerMemo.KeyUp(var Key: Word; Shift: TShiftState); -begin - FInternalUpdating := False; - if not WantTabs and ((Key = VK_TAB)) then - Key := 0; - Container.KeyUp(Key, Shift); - if Key = 0 then - FInternalUpdating := True - else - inherited KeyUp(Key, Shift); -end; - -procedure TcxCustomInnerMemo.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - with Container do - begin - InnerControlMouseDown := True; - try - MouseDown(Button, Shift, X + Self.Left, Y + Self.Top); - finally - InnerControlMouseDown := False; - end; - end; -end; - -procedure TcxCustomInnerMemo.MouseLeave(AControl: TControl); -begin - Container.ShortRefreshContainer(True); -end; - -procedure TcxCustomInnerMemo.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - Container.MouseMove(Shift, X + Left, Y + Top); -end; - -procedure TcxCustomInnerMemo.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - Container.MouseUp(Button, Shift, X + Left, Y + Top); -end; - -procedure TcxCustomInnerMemo.CreateHandle; -begin - Container.ClearSavedChildControlRegions; - inherited CreateHandle; -end; - -procedure TcxCustomInnerMemo.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params.WindowClass do - begin - style := style and not CS_VREDRAW; - if (ScrollBars in [ssHorizontal, ssBoth]) or not WordWrap then - style := style and not CS_HREDRAW; - end; -end; - -procedure TcxCustomInnerMemo.CreateWindowHandle(const Params: TCreateParams); -begin - BeginInternalTextSetting; - try - inherited CreateWindowHandle(Params); // do not handle WM_SETTEXT from inherited CreateWindowHandle - finally - EndInternalTextSetting; - end; - Lines.Text := Text; - Container.SetScrollBarsParameters; -end; - -procedure TcxCustomInnerMemo.WndProc(var Message: TMessage); -begin - if Container.InnerControlMenuHandler(Message) then - Exit; - if ((Message.Msg = WM_LBUTTONDOWN) or (Message.Msg = WM_LBUTTONDBLCLK)) and - (Container.DragMode = dmAutomatic) and not Container.IsDesigning then - Container.BeginAutoDrag - else - inherited WndProc(Message); -end; - -// IcxContainerInnerControl -function TcxCustomInnerMemo.GetControl: TWinControl; -begin - Result := Self; -end; - -function TcxCustomInnerMemo.GetControlContainer: TcxContainer; -begin - Result := Container; -end; - -// IcxInnerEditHelper -function TcxCustomInnerMemo.GetHelper: IcxCustomInnerEdit; -begin - Result := Helper; -end; - -function TcxCustomInnerMemo.AllowDrawEdgesAndBorders: Boolean; -begin - Result := False; -end; - -procedure TcxCustomInnerMemo.BeginInternalTextSetting; -begin - Inc(FInternalTextSettingCount); -end; - -procedure TcxCustomInnerMemo.EndInternalTextSetting; -begin - Dec(FInternalTextSettingCount); -end; - -function TcxCustomInnerMemo.IsInternalTextSetting: Boolean; -begin - Result := FInternalTextSettingCount > 0; -end; - -function TcxCustomInnerMemo.GetContainer: TcxCustomMemo; -begin - Result := TcxCustomMemo(Owner); -end; - -procedure TcxCustomInnerMemo.WMClear(var Message: TMessage); -begin - if Container.FInternalAction then - inherited - else - if not ReadOnly then - with Container do - begin - KeyboardAction := True; - try - ClearSelection; - finally - KeyboardAction := False; - end; - end; -end; - -procedure TcxCustomInnerMemo.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - inherited; - if Container.TabsNeeded and (GetKeyState(VK_CONTROL) >= 0) then - Message.Result := Message.Result or DLGC_WANTTAB; - if FEscapePressed then - Message.Result := Message.Result and not DLGC_WANTALLKEYS; -end; - -procedure TcxCustomInnerMemo.WMKeyDown(var Message: TWMKeyDown); -var - AKey: Word; - APrevState: TcxCustomInnerTextEditPrevState; - AShiftState: TShiftState; -begin - SaveTextEditState(Helper, True, APrevState); - FInternalUpdating := False; - inherited; - Container.UpdateScrollBarsParameters; - if FInternalUpdating then - Exit; - - AShiftState := KeyDataToShiftState(Message.KeyData); - if not CheckTextEditState(Helper, APrevState) and (Message.CharCode <> 0) and - (Message.CharCode <> VK_UP) and (Message.CharCode <> VK_DOWN) then - begin - AShiftState := KeyDataToShiftState(Message.KeyData); - AKey := Message.CharCode; - Container.DoAfterKeyDown(AKey, AShiftState); - Message.CharCode := AKey; - end; -end; - -procedure TcxCustomInnerMemo.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - if not(csDestroying in ComponentState) then - Container.FocusChanged; -end; - -procedure TcxCustomInnerMemo.WMNCPaint(var Message: TWMNCPaint); - - function GetScrollBarRect(AScrollBarKind: TScrollBarKind): TRect; - const - AScrollBarObjects: array [TScrollBarKind] of Longword = (OBJID_HSCROLL, OBJID_VSCROLL); - var - AScrollBarInfo: TcxScrollBarInfo; - AScrollBarState: DWORD; - begin - Result := cxEmptyRect; - if (csDestroying in ComponentState) or not HandleAllocated then - Exit; - if not cxGetScrollBarInfo(Handle, Integer(AScrollBarObjects[AScrollBarKind]), - AScrollBarInfo) then - Exit; - AScrollBarState := AScrollBarInfo.rgstate[0]; - if AScrollBarState and (STATE_SYSTEM_INVISIBLE or STATE_SYSTEM_OFFSCREEN) <> 0 then - Exit; - with AScrollBarInfo.rcScrollBar do - begin - Result.TopLeft := ScreenToClient(TopLeft); - Result.Right := Result.Left + Right - Left; - Result.Bottom := Result.Top + Bottom - Top; - end; - OffsetRect(Result, cxContainerMaxBorderWidth, cxContainerMaxBorderWidth); - end; - - function GetSizeGripRect: TRect; - var - RH, RV: TRect; - begin - Result := cxEmptyRect; - RH := GetScrollBarRect(sbHorizontal); - if IsRectEmpty(RH) then - Exit; - RV := GetScrollBarRect(sbVertical); - if IsRectEmpty(RV) then - Exit; - Result := Rect(RV.Left, RH.Top, RV.Right, RH.Bottom); - end; - - procedure FillSizeGrip; - begin - if ScrollBars = ssBoth then - cxFillSizeGrip(Container, GetSizeGripRect); - end; - -var - A: Integer; -begin - if not UsecxScrollBars then - begin - inherited; - Exit; - end; - A := GetWindowLong(Handle, GWL_STYLE); - A := A and not(WS_HSCROLL or WS_VSCROLL); - SetWindowLong(Handle, GWL_STYLE, A); - inherited; - A := GetWindowLong(Handle, GWL_STYLE); - if ScrollBars in [ssHorizontal, ssBoth] then - A := A or WS_HSCROLL; - if ScrollBars in [ssVertical, ssBoth] then - A := A or WS_VSCROLL; - SetWindowLong(Handle, GWL_STYLE, A); - FillSizeGrip; -end; - -procedure TcxCustomInnerMemo.WMSetFocus(var Message: TWMSetFocus); -begin - inherited; - if not(csDestroying in ComponentState) and (Message.FocusedWnd <> Container.Handle) then - Container.FocusChanged; -end; - -procedure TcxCustomInnerMemo.WMSetFont(var Message: TWMSetFont); -begin - inherited; - if (*Container.IsInplace and *)NewStyleControls then - SendMessage(Handle, EM_SETMARGINS, EC_LEFTMARGIN or EC_RIGHTMARGIN, 0); -end; - -procedure TcxCustomInnerMemo.WMSetText(var Message: TWMSetText); -begin - inherited; - if IsInternalTextSetting then - Exit; - BeginInternalTextSetting; - try - Container.InternalEditValue := string(Message.Text); - finally - EndInternalTextSetting; - end; -end; - -procedure TcxCustomInnerMemo.WMWindowPosChanged(var Message: TWMWindowPosChanged); -begin - Container.SetScrollBarsParameters; - inherited; -end; - -procedure TcxCustomInnerMemo.WMWindowPosChanging(var Message: TWMWindowPosChanging); -begin - inherited; - Container.SetScrollBarsParameters; -end; - -procedure TcxCustomInnerMemo.EMReplaceSel(var Message: TMessage); -var - APrevLParam: Integer; - S: string; -begin - if Container.Focused and not Container.DoEditing and not ReadOnly then - Exit; - - S := PChar(Message.LParam); - CorrectLineBreaks(S); - - APrevLParam := Message.LParam; - Message.LParam := Integer(PChar(S)); - try - inherited; - Container.SynchronizeEditValue; - finally - Message.LParam := APrevLParam; - end; -end; - -procedure TcxCustomInnerMemo.EMSetSel(var Message: TMessage); -begin - inherited; - if Assigned(OnSelChange) then - OnSelChange(Self); -end; - -procedure TcxCustomInnerMemo.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxCustomInnerMemo.CNKeyDown(var Message: TWMKeyDown); -begin - if Message.CharCode = VK_ESCAPE then - FEscapePressed := True; - try - inherited; - finally - FEscapePressed := False; - end; -end; - -procedure TcxCustomInnerMemo.WMIMEComposition(var Message: TMessage); -begin - if Container.DoEditing then - inherited; -end; - -initialization - GetRegisteredEditProperties.Register(TcxMemoProperties, scxSEditRepositoryMemoItem); - FilterEditsController.Register(TcxMemoProperties, TcxFilterMemoHelper); - -finalization - FilterEditsController.Unregister(TcxMemoProperties, TcxFilterMemoHelper); - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxNavigator.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxNavigator.pas deleted file mode 100644 index 28d99627..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxNavigator.pas +++ /dev/null @@ -1,1875 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxNavigator; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, -{$ENDIF} - Messages, Windows, Classes, Controls, Forms, Graphics, ImgList, - StdCtrls, SysUtils, cxClasses, cxContainer, cxControls, cxFilter, cxGraphics, - cxLookAndFeels, cxLookAndFeelPainters, dxThemeManager; - -const - NavigatorButtonCount = 16; - - NBDI_FIRST = 0; - NBDI_PRIORPAGE = 1; - NBDI_PRIOR = 2; - NBDI_NEXT = 3; - NBDI_NEXTPAGE = 4; - NBDI_LAST = 5; - NBDI_INSERT = 6; - NBDI_APPEND = 7; - NBDI_DELETE = 8; - NBDI_EDIT = 9; - NBDI_POST = 10; - NBDI_CANCEL = 11; - NBDI_REFRESH = 12; - NBDI_SAVEBOOKMARK = 13; - NBDI_GOTOBOOKMARK = 14; - NBDI_FILTER = 15; - -type - TcxCustomNavigatorButtons = class; - - TcxNavigatorChangeType = (nctProperties, nctSize, nctLayout); - - IcxNavigatorOwner = interface - ['{504B7F43-8847-46C5-B84A-C24F8E5E61A6}'] - procedure NavigatorChanged(AChangeType: TcxNavigatorChangeType); - function GetNavigatorBounds: TRect; - function GetNavigatorButtons: TcxCustomNavigatorButtons; - function GetNavigatorCanvas: TCanvas; - function GetNavigatorControl: TWinControl; - function GetNavigatorFocused: Boolean; - function GetNavigatorLookAndFeel: TcxLookAndFeel; - function GetNavigatorOwner: TComponent; - function GetNavigatorShowHint: Boolean; - function GetNavigatorTabStop: Boolean; - procedure NavigatorButtonsStateChanged; - procedure RefreshNavigator; - end; - - TcxNavigatorButton = class(TPersistent) - private - FButtons: TcxCustomNavigatorButtons; - FDefaultIndex: Integer; - FDefaultVisible: Boolean; - FEnabled: Boolean; - FHint: string; - FImageIndex: TImageIndex; - FIsVisibleAssigned: Boolean; - FVisible: Boolean; - FOnClick: TNotifyEvent; - function GetInternalImageIndex: Integer; - function GetIternalImages: TCustomImageList; - procedure InternalSetVisible(Value: Boolean; AIsInternalSetting: Boolean = True); - function IsVisibleStored: Boolean; - procedure SetEnabled(const Value: Boolean); - procedure SetHint(const Value: string); - procedure SetImageIndex(Value: TImageIndex); - procedure SetOnClick(const Value: TNotifyEvent); - procedure SetVisible(const Value: Boolean); - protected - function GetOwner: TPersistent; override; - function GetInternalEnabled: Boolean; - function GetInternalHint: string; - function IsUserImageListUsed: Boolean; - procedure DoClick; dynamic; - procedure RestoreDefaultVisible(ACanBeVisible: Boolean); - - function GetNavigator: IcxNavigatorOwner; - - property DefaultIndex: Integer read FDefaultIndex write FDefaultIndex; - property InternalImageIndex: Integer read GetInternalImageIndex; - property InternalImages: TCustomImageList read GetIternalImages; - public - constructor Create(AButtons: TcxCustomNavigatorButtons; - ADefaultVisible: Boolean); - - procedure Assign(Source: TPersistent); override; - procedure Click; - function GetImageSize: TSize; - - property Buttons: TcxCustomNavigatorButtons read FButtons; - property Navigator: IcxNavigatorOwner read GetNavigator; - property OnClick: TNotifyEvent read FOnClick write SetOnClick; - published - property Enabled: Boolean read FEnabled write SetEnabled default True; - property Hint: string read FHint write SetHint; - property ImageIndex: TImageIndex read FImageIndex write SetImageIndex default -1; - property Visible: Boolean read FVisible write SetVisible stored IsVisibleStored; - end; - - TcxCustomNavigator = class; - - TcxNavigatorButtonClickEvent = procedure(Sender: TObject; AButtonIndex: Integer; - var ADone: Boolean) of object; - - TcxCustomNavigatorButtons = class(TPersistent) - private - FNavigator: IcxNavigatorOwner; - FButtons: array [0 .. NavigatorButtonCount - 1] of TcxNavigatorButton; - FImages: TCustomImageList; - FImageChangeLink: TChangeLink; - FConfirmDelete: Boolean; - FOnButtonClick: TcxNavigatorButtonClickEvent; - - function GetButton(Index: Integer): TcxNavigatorButton; - function GetButtonCount: Integer; - function GetDefaultImages: TCustomImageList; - procedure SetButton(Index: Integer; const Value: TcxNavigatorButton); - procedure SetConfirmDelete(const Value: Boolean); - procedure SetImages(const Value: TCustomImageList); - procedure SetOnButtonClick(const Value: TcxNavigatorButtonClickEvent); - procedure ImageListChange(Sender: TObject); - protected - function GetOwner: TPersistent; override; - procedure CreateButtons; virtual; - procedure DestroyButtons; virtual; - - procedure DoButtonClick(ADefaultIndex: Integer); virtual; - function GetButtonEnabled(ADefaultIndex: Integer): Boolean; virtual; - function GetButtonHint(ADefaultIndex: Integer): string; virtual; - function GetButtonImageOffset: Integer; virtual; - function IsNavigatorEnabled: Boolean; - - property ConfirmDelete: Boolean read FConfirmDelete write SetConfirmDelete default True; - - property First: TcxNavigatorButton index NBDI_FIRST read GetButton write SetButton; - property PriorPage: TcxNavigatorButton index NBDI_PRIORPAGE read GetButton write SetButton; - property Prior: TcxNavigatorButton index NBDI_PRIOR read GetButton write SetButton; - property Next: TcxNavigatorButton index NBDI_NEXT read GetButton write SetButton; - property NextPage: TcxNavigatorButton index NBDI_NEXTPAGE read GetButton write SetButton; - property Last: TcxNavigatorButton index NBDI_LAST read GetButton write SetButton; - property Insert: TcxNavigatorButton index NBDI_INSERT read GetButton write SetButton; - property Append: TcxNavigatorButton index NBDI_APPEND read GetButton write SetButton; - property Delete: TcxNavigatorButton index NBDI_DELETE read GetButton write SetButton; - property Edit: TcxNavigatorButton index NBDI_EDIT read GetButton write SetButton; - property Post: TcxNavigatorButton index NBDI_POST read GetButton write SetButton; - property Cancel: TcxNavigatorButton index NBDI_CANCEL read GetButton write SetButton; - property Refresh: TcxNavigatorButton index NBDI_REFRESH read GetButton write SetButton; - property SaveBookmark: TcxNavigatorButton index NBDI_SAVEBOOKMARK read GetButton write SetButton; - property GotoBookmark: TcxNavigatorButton index NBDI_GOTOBOOKMARK read GetButton write SetButton; - property Filter: TcxNavigatorButton index NBDI_FILTER read GetButton write SetButton; - public - constructor Create(ANavigator: IcxNavigatorOwner); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure ClickButton(Index: Integer); - procedure ReleaseBookmark; virtual; - - property ButtonCount: Integer read GetButtonCount; - property Buttons[Index: Integer]: TcxNavigatorButton read GetButton; default; - property DefaultImages: TCustomImageList read GetDefaultImages; - property Images: TCustomImageList read FImages write SetImages; - property Navigator: IcxNavigatorOwner read FNavigator; - published - property OnButtonClick: TcxNavigatorButtonClickEvent read FOnButtonClick - write SetOnButtonClick; - end; - - TcxNavigatorButtonViewInfo = class - public - Button: TcxNavigatorButton; - Bounds: TRect; - Enabled: Boolean; - Hint: string; - end; - - TcxNavigatorViewInfo = class - private - FButtonPressTimer: TcxTimer; - FButtons: TList; - FCanvas: TcxCanvas; - FFocusedButton: TcxNavigatorButton; - FHintTimer: TcxTimer; - FHintWindow: THintWindow; - FHintWindowShowing: Boolean; - FHotTrackButtonViewInfo: TcxNavigatorButtonViewInfo; - FIsDirty: Boolean; - FIsInplace: Boolean; - FIsSelected: Boolean; - FNavigator: IcxNavigatorOwner; - FPressedButtonViewInfo: TcxNavigatorButtonViewInfo; - - function GetButton(Index: Integer): TcxNavigatorButtonViewInfo; - function GetButtonCount: Integer; - function GetFocusedButton: TcxNavigatorButtonViewInfo; - procedure SetFocusedButton(Value: TcxNavigatorButtonViewInfo); - function StopButtonPressTimerIfLeftMouseReleased: Boolean; - - procedure DoButtonPressTimer(Sender: TObject); - procedure DoHintTimer(Sender: TObject); - - procedure UpdateSelected; - protected - function GetButtonBorderExtent(APainter: TcxCustomLookAndFeelPainterClass; - AButtonIndex, AButtonCount: Integer): TRect; - function GetButtonState(AButton: TcxNavigatorButtonViewInfo): TcxButtonState; - function GetMiddleButtonBorderExtent(APainter: TcxCustomLookAndFeelPainterClass): TRect; - function GetMinButtonSize(AButtonIndex, AButtonCount: Integer; - AAutoHeight: Boolean = False): TSize; - function GetVisibleButtonCount: Integer; - procedure InvalidateButton(AButton: TcxNavigatorButtonViewInfo); - procedure PaintButton(AButtonIndex: Integer); - procedure HintActivate(AShow: Boolean); - - property Canvas: TcxCanvas read FCanvas; - property FocusedButton: TcxNavigatorButtonViewInfo read GetFocusedButton - write SetFocusedButton; - property HotTrackButtonViewInfo: TcxNavigatorButtonViewInfo - read FHotTrackButtonViewInfo write FHotTrackButtonViewInfo; - property Navigator: IcxNavigatorOwner read FNavigator; - property PressedButtonViewInfo: TcxNavigatorButtonViewInfo - read FPressedButtonViewInfo write FPressedButtonViewInfo; - public - constructor Create(ANavigator: IcxNavigatorOwner; - AIsInplace: Boolean = True); virtual; - destructor Destroy; override; - procedure Calculate; - procedure CheckSize(var AWidth, AHeight: Integer; - ACheckMinHeight: Boolean = False); - procedure Clear; - procedure DoEnter; - procedure DoExit; - function GetButtonAt(const pt: TPoint): TcxNavigatorButton; - function GetButtonViewInfoAt(const pt: TPoint): TcxNavigatorButtonViewInfo; - function GetButtonViewInfoByButton(AButton: TcxNavigatorButton): TcxNavigatorButtonViewInfo; - procedure MakeIsDirty; - procedure MouseDown(X, Y: Integer); - procedure MouseMove(X, Y: Integer); - procedure MouseUp(X, Y: Integer); - procedure Paint; - procedure PressArrowKey(ALeftKey: Boolean); - procedure UpdateButtonsEnabled; - - property ButtonCount: Integer read GetButtonCount; - property Buttons[Index: Integer]: TcxNavigatorButtonViewInfo read GetButton; - end; - - TcxNavigatorViewInfoClass = class of TcxNavigatorViewInfo; - - TcxCustomNavigator = class(TcxControl, IUnknown, - IcxNavigatorOwner, IcxMouseTrackingCaller, IdxSkinSupport) - private - FButtons: TcxCustomNavigatorButtons; - FButtonsEvents: TNotifyEvent; - FViewInfo: TcxNavigatorViewInfo; - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; - protected - function CanFocusOnClick: Boolean; override; - function CanResize(var NewWidth, NewHeight: Integer): Boolean; override; - function CreateButtons: TcxCustomNavigatorButtons; virtual; - procedure DoEnter; override; - procedure DoExit; override; - procedure EnabledChanged; dynamic; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseEnter(AControl: TControl); override; - procedure MouseLeave(AControl: TControl); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure Paint; override; - //IcxMouseTrackingCaller - procedure IcxMouseTrackingCaller.MouseLeave = NavigatorMouseLeave; - procedure NavigatorMouseLeave; - // IcxNavigatorOwner - procedure NavigatorChanged(AChangeType: TcxNavigatorChangeType); - function GetNavigatorBounds: TRect; - function GetNavigatorButtons: TcxCustomNavigatorButtons; - function GetNavigatorCanvas: TCanvas; - function GetNavigatorControl: TWinControl; - function GetNavigatorFocused: Boolean; - function GetNavigatorLookAndFeel: TcxLookAndFeel; - function GetNavigatorOwner: TComponent; - function GetNavigatorShowHint: Boolean; - function GetNavigatorTabStop: Boolean; - function GetViewInfoClass: TcxNavigatorViewInfoClass; virtual; - procedure InitButtons; virtual; - procedure NavigatorButtonsStateChanged; - procedure RefreshNavigator; - procedure CreateWnd; override; - procedure WndProc(var Message: TMessage); override; - property CustomButtons: TcxCustomNavigatorButtons read FButtons; - property ViewInfo: TcxNavigatorViewInfo read FViewInfo; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure ClickButton(Index: Integer); - procedure RestoreButtons; - property LookAndFeel; - published - property TabStop default False; - property ButtonsEvents: TNotifyEvent read FButtonsEvents - write FButtonsEvents; - end; - - TcxNavigatorControlNotifier = class - private - FList: TList; - public - constructor Create; - destructor Destroy; override; - procedure AddNavigator(ANavigator: IcxNavigatorOwner); - procedure RemoveNavigator(ANavigator: IcxNavigatorOwner); - procedure RefreshNavigatorButtons; - end; - - IcxNavigator = interface - ['{A15F80CA-DE56-47CB-B0EB-035D0BF90E9D}'] - function CanAppend: Boolean; - function CanDelete: Boolean; - function CanEdit: Boolean; - function CanInsert: Boolean; - function IsActive: Boolean; - function IsBof: Boolean; - function IsBookmarkAvailable: Boolean; - function IsEditing: Boolean; - function IsEof: Boolean; - procedure ClearBookmark; - procedure DoAction(AButtonIndex: Integer); - function GetNotifier: TcxNavigatorControlNotifier; - function IsActionSupported(AButtonIndex: Integer): Boolean; - end; - - TcxNavigatorControlButtonsGetControl = function: IcxNavigator of object; - - TcxNavigatorControlButtons = class(TcxCustomNavigatorButtons) - private - FOnGetControl: TcxNavigatorControlButtonsGetControl; - - function GetControl: IcxNavigator; - protected - procedure DoButtonClick(ADefaultIndex: Integer); override; - function GetButtonEnabled(ADefaultIndex: Integer): Boolean; override; - - property Control: IcxNavigator read GetControl; - public - procedure ReleaseBookmark; override; - property OnGetControl: TcxNavigatorControlButtonsGetControl - read FOnGetControl write FOnGetControl; - published - property ConfirmDelete; - property Images; - - property First; - property PriorPage; - property Prior; - property Next; - property NextPage; - property Last; - property Insert; - property Append; - property Delete; - property Edit; - property Post; - property Cancel; - property Refresh; - property SaveBookmark; - property GotoBookmark; - property Filter; - end; - - TcxNavigatorControlButtonsClass = class of TcxNavigatorControlButtons; - - TcxCustomNavigatorControl = class(TcxCustomNavigator) - private - FControl: TComponent; - function GetButtons: TcxNavigatorControlButtons; - function GetControl: IcxNavigator; - procedure SetButtons(Value: TcxNavigatorControlButtons); - procedure SetControl(Value: TComponent); - protected - function CreateButtons: TcxCustomNavigatorButtons; override; - function GetButtonsClass: TcxNavigatorControlButtonsClass; virtual; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure InitButtons; override; - property Buttons: TcxNavigatorControlButtons read GetButtons write SetButtons; - property Control: TComponent read FControl write SetControl; - public - destructor Destroy; override; - end; - - TcxNavigator = class(TcxCustomNavigatorControl) - published - property Control; - property Buttons; - property LookAndFeel; - - property Align; - property Anchors; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property Ctl3D; - property ParentCtl3D; - property ParentShowHint; - property PopupMenu; - property ShowHint; - property TabOrder; - property TabStop; - property Visible; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnResize; - property OnStartDock; - property OnStartDrag; - end; - -function NavigatorImages: TImageList; - -implementation - -uses - Dialogs, cxEditPaintUtils, cxEditUtils, cxEditConsts, dxThemeConsts, dxUxTheme, - cxGeometry; - -const - cxInitRepeatPause = 400; - cxRepeatPause = 100; - -type - TCustomFormAccess = class(TCustomForm); - -var - FNavigatorImages: TImageList = nil; - -function NavigatorImages: TImageList; - - procedure LoadImageListFromResource(AImageList: TCustomImageList; - const AResName: string; AMaskColor: TColor); - begin - AImageList.GetInstRes(HInstance, rtBitmap, AResName, - AImageList.Width, [], AMaskColor); - end; - -begin - if FNavigatorImages = nil then - begin - FNavigatorImages := TImageList.Create(nil); - FNavigatorImages.Height := 11; - FNavigatorImages.Width := 12; - LoadImageListFromResource(FNavigatorImages, 'CXNAVIGATORBUTTONS', clOlive); - end; - Result := FNavigatorImages; -end; - -{ TcxNavigatorButton } - -constructor TcxNavigatorButton.Create(AButtons: TcxCustomNavigatorButtons; - ADefaultVisible: Boolean); -begin - inherited Create; - FButtons := AButtons; - FDefaultIndex := -1; - FDefaultVisible := ADefaultVisible; - FEnabled := True; - FImageIndex := -1; - FVisible := ADefaultVisible; -end; - -function TcxNavigatorButton.GetOwner: TPersistent; -begin - Result := FButtons; -end; - -procedure TcxNavigatorButton.Assign(Source: TPersistent); -begin - if Source is TcxNavigatorButton then - with Source as TcxNavigatorButton do - begin - Self.Enabled := Enabled; - Self.Hint := Hint; - Self.ImageIndex := ImageIndex; - Self.Visible := Visible; - Self.FIsVisibleAssigned := FIsVisibleAssigned; - Self.OnClick := OnClick; - end - else - inherited Assign(Source); -end; - -procedure TcxNavigatorButton.Click; -begin - if GetInternalEnabled then - DoClick; -end; - -function TcxNavigatorButton.GetInternalEnabled: Boolean; -begin - Result := Enabled; - if Result then - Result := Buttons.GetButtonEnabled(DefaultIndex); -end; - -function TcxNavigatorButton.GetInternalHint: string; -begin - Result := Hint; - if Hint = '' then - Result := Buttons.GetButtonHint(DefaultIndex); -end; - -function TcxNavigatorButton.IsUserImageListUsed: Boolean; -begin - Result := (Buttons.Images <> nil) and (ImageIndex > -1); -end; - -procedure TcxNavigatorButton.DoClick; -var - ADone: Boolean; -begin - if Assigned(OnClick) then - OnClick(Self) - else - begin - ADone := False; - if Assigned(Buttons.FOnButtonClick) then - Buttons.FOnButtonClick(Buttons, DefaultIndex, ADone); - if not ADone then - Buttons.DoButtonClick(DefaultIndex); - end; -end; - -procedure TcxNavigatorButton.RestoreDefaultVisible(ACanBeVisible: Boolean); -begin - if not FIsVisibleAssigned then - InternalSetVisible(FDefaultVisible and ACanBeVisible); -end; - -function TcxNavigatorButton.GetImageSize: TSize; -var - APainter: TcxCustomLookAndFeelPainterClass; -begin - APainter := GetNavigator.GetNavigatorLookAndFeel.SkinPainter; - if (APainter = nil) or IsUserImageListUsed then - begin - Result.cx := InternalImages.Width; - Result.cy := InternalImages.Height; - end - else - Result := APainter.NavigatorGlyphSize; -end; - -function TcxNavigatorButton.GetNavigator: IcxNavigatorOwner; -begin - Result := Buttons.Navigator; -end; - -procedure TcxNavigatorButton.SetEnabled(const Value: Boolean); -begin - if Enabled <> Value then - begin - FEnabled := Value; - if Visible then - Navigator.RefreshNavigator; - Navigator.NavigatorChanged(nctLayout); - end; -end; - -procedure TcxNavigatorButton.SetHint(const Value: string); -begin - if AnsiCompareStr(FHint, Value) <> 0 then - begin - FHint := Value; - Navigator.NavigatorChanged(nctProperties); - end; -end; - -function TcxNavigatorButton.GetInternalImageIndex: Integer; -begin - if (Buttons.Images <> nil) and (ImageIndex > -1) then - Result := ImageIndex - else - Result := DefaultIndex; -end; - -function TcxNavigatorButton.GetIternalImages: TCustomImageList; -begin - if (Buttons.Images <> nil) and (ImageIndex > -1) then - Result := Buttons.Images - else - Result := Buttons.DefaultImages; -end; - -procedure TcxNavigatorButton.InternalSetVisible(Value: Boolean; - AIsInternalSetting: Boolean = True); -begin - if not AIsInternalSetting then - FIsVisibleAssigned := True; - if FVisible <> Value then - begin - FVisible := Value; - Navigator.RefreshNavigator; - Navigator.NavigatorChanged(nctSize); - end; -end; - -function TcxNavigatorButton.IsVisibleStored: Boolean; -begin - Result := FIsVisibleAssigned; -end; - -procedure TcxNavigatorButton.SetImageIndex(Value: TImageIndex); -begin - if ImageIndex <> Value then - begin - FImageIndex := Value; - if Visible then - Navigator.RefreshNavigator; - Navigator.NavigatorChanged(nctLayout); - end; -end; - -procedure TcxNavigatorButton.SetOnClick(const Value: TNotifyEvent); -begin - FOnClick := Value; - Navigator.NavigatorChanged(nctProperties); -end; - -procedure TcxNavigatorButton.SetVisible(const Value: Boolean); -begin - InternalSetVisible(Value, False); -end; - -{ TcxCustomNavigatorButtons } - -constructor TcxCustomNavigatorButtons.Create(ANavigator: IcxNavigatorOwner); -begin - inherited Create; - FNavigator := ANavigator; - FImageChangeLink := TChangeLink.Create; - FImageChangeLink.OnChange := ImageListChange; - CreateButtons; - FConfirmDelete := True; -end; - -destructor TcxCustomNavigatorButtons.Destroy; -begin - FreeAndNil(FImageChangeLink); - DestroyButtons; - inherited Destroy; -end; - -procedure TcxCustomNavigatorButtons.Assign(Source: TPersistent); -var - I: Integer; -begin - if Source is TcxCustomNavigatorButtons then - with TcxCustomNavigatorButtons(Source) do - begin - for I := 0 to ButtonCount - 1 do - Self.FButtons[I].Assign(FButtons[I]); - Self.ConfirmDelete := ConfirmDelete; - Self.Images := Images; - Self.OnButtonClick := OnButtonClick; - end - else - inherited Assign(Source); -end; - -procedure TcxCustomNavigatorButtons.ClickButton(Index: Integer); -begin - Buttons[Index].Click; -end; - -procedure TcxCustomNavigatorButtons.ReleaseBookmark; -begin -end; - -procedure TcxCustomNavigatorButtons.CreateButtons; - - function IsButtonVisibleByDefault(AIndex: Integer): Boolean; - begin - Result := AIndex <> NBDI_APPEND; - end; - -var - I: Integer; -begin - for I := 0 to NavigatorButtonCount - 1 do - begin - FButtons[I] := TcxNavigatorButton.Create(Self, IsButtonVisibleByDefault(I)); - FButtons[I].DefaultIndex := I; - end; -end; - -function TcxCustomNavigatorButtons.GetOwner: TPersistent; -begin - Result := FNavigator.GetNavigatorOwner; -end; - -procedure TcxCustomNavigatorButtons.DestroyButtons; -var - I: Integer; -begin - for I := 0 to NavigatorButtonCount - 1 do - FButtons[I].Free; -end; - -procedure TcxCustomNavigatorButtons.DoButtonClick(ADefaultIndex: Integer); -begin -end; - -function TcxCustomNavigatorButtons.GetButtonEnabled(ADefaultIndex: Integer): Boolean; -begin - Result := IsNavigatorEnabled; -end; - -function TcxCustomNavigatorButtons.GetButtonHint(ADefaultIndex: Integer): string; -begin - case ADefaultIndex of - NBDI_FIRST: Result := cxGetResourceString(@cxNavigatorHint_First); - NBDI_PRIORPAGE: Result := cxGetResourceString(@cxNavigatorHint_PriorPage); - NBDI_PRIOR: Result := cxGetResourceString(@cxNavigatorHint_Prior); - NBDI_LAST: Result := cxGetResourceString(@cxNavigatorHint_Last); - NBDI_NEXT: Result := cxGetResourceString(@cxNavigatorHint_Next); - NBDI_NEXTPAGE: Result := cxGetResourceString(@cxNavigatorHint_NextPage); - NBDI_INSERT: Result := cxGetResourceString(@cxNavigatorHint_Insert); - NBDI_APPEND: Result := cxGetResourceString(@cxNavigatorHint_Append); - NBDI_DELETE: Result := cxGetResourceString(@cxNavigatorHint_Delete); - NBDI_EDIT: Result := cxGetResourceString(@cxNavigatorHint_Edit); - NBDI_POST: Result := cxGetResourceString(@cxNavigatorHint_Post); - NBDI_CANCEL: Result := cxGetResourceString(@cxNavigatorHint_Cancel); - NBDI_REFRESH: Result := cxGetResourceString(@cxNavigatorHint_Refresh); - NBDI_SAVEBOOKMARK: Result := cxGetResourceString(@cxNavigatorHint_SaveBookmark); - NBDI_GOTOBOOKMARK: Result := cxGetResourceString(@cxNavigatorHint_GotoBookmark); - NBDI_FILTER: Result := cxGetResourceString(@cxNavigatorHint_Filter); - else Result := ''; - end; -end; - -function TcxCustomNavigatorButtons.GetButtonImageOffset: Integer; -begin - Result := 2; -end; - -function TcxCustomNavigatorButtons.IsNavigatorEnabled: Boolean; -begin - Result := Navigator.GetNavigatorControl.Enabled; -end; - -function TcxCustomNavigatorButtons.GetButton(Index: Integer): TcxNavigatorButton; -begin - Result := FButtons[Index]; -end; - -function TcxCustomNavigatorButtons.GetButtonCount: Integer; -begin - Result := High(FButtons) - Low(FButtons) + 1; -end; - -function TcxCustomNavigatorButtons.GetDefaultImages: TCustomImageList; -begin - Result := NavigatorImages; -end; - -procedure TcxCustomNavigatorButtons.SetButton(Index: Integer; const Value: TcxNavigatorButton); -begin - FButtons[Index].Assign(Value); -end; - -procedure TcxCustomNavigatorButtons.SetConfirmDelete(const Value: Boolean); -begin - if FConfirmDelete <> Value then - begin - FConfirmDelete := Value; - Navigator.NavigatorChanged(nctProperties); - end; -end; - -procedure TcxCustomNavigatorButtons.SetImages(const Value: TCustomImageList); -begin - cxSetImageList(Value, FImages, FImageChangeLink, Navigator.GetNavigatorOwner); - Navigator.NavigatorChanged(nctLayout); -end; - -procedure TcxCustomNavigatorButtons.SetOnButtonClick( - const Value: TcxNavigatorButtonClickEvent); -begin - FOnButtonClick := Value; - Navigator.NavigatorChanged(nctProperties); -end; - -procedure TcxCustomNavigatorButtons.ImageListChange(Sender: TObject); -begin - Navigator.RefreshNavigator; -end; - -{ TcxNavigatorViewInfo } - -constructor TcxNavigatorViewInfo.Create(ANavigator: IcxNavigatorOwner; - AIsInplace: Boolean = True); -begin - inherited Create; - FNavigator := ANavigator; - FIsDirty := True; - FIsInplace := AIsInplace; - FButtons := TList.Create; - FHintWindowShowing := False; - FButtonPressTimer := TcxTimer.Create(nil); - FButtonPressTimer.Enabled := False; - FButtonPressTimer.OnTimer := DoButtonPressTimer; - FHintTimer := TcxTimer.Create(nil); - FHintTimer.Enabled := False; - FHintTimer.Interval := 500; - FHintTimer.OnTimer := DoHintTimer; - FCanvas := TcxCanvas.Create(nil); -end; - -destructor TcxNavigatorViewInfo.Destroy; -begin - FreeAndNil(FCanvas); - FreeAndNil(FHintTimer); - FreeAndNil(FButtonPressTimer); - FreeAndNil(FHintWindow); - Clear; - FreeAndNil(FButtons); - inherited Destroy; -end; - -procedure TcxNavigatorViewInfo.Calculate; -var - AHeight, AWidth: Integer; - I: Integer; - ANavigatorBounds: TRect; -begin - ANavigatorBounds := Navigator.GetNavigatorBounds; - with ANavigatorBounds do - begin - AWidth := Right - Left; - AHeight := Bottom - Top; - end; - CheckSize(AWidth, AHeight); - for I := 0 to ButtonCount - 1 do - begin - Buttons[I].Enabled := Buttons[I].Button.GetInternalEnabled; - Buttons[I].Hint := Buttons[I].Button.GetInternalHint; - end; - FIsDirty := False; -end; - -procedure TcxNavigatorViewInfo.CheckSize(var AWidth, AHeight: Integer; - ACheckMinHeight: Boolean = False); - - procedure CheckButtonCount; - var - APButtonViewInfo: TcxNavigatorButtonViewInfo; - AVisibleButtonCount, I: Integer; - begin - AVisibleButtonCount := GetVisibleButtonCount; - if AVisibleButtonCount < FButtons.Count then - for I := 1 to FButtons.Count - AVisibleButtonCount do - begin - TcxNavigatorButtonViewInfo(FButtons[AVisibleButtonCount]).Free; - FButtons.Delete(AVisibleButtonCount); - end - else - for I := FButtons.Count to AVisibleButtonCount - 1 do - begin - APButtonViewInfo := TcxNavigatorButtonViewInfo.Create; - FButtons.Add(APButtonViewInfo); - end; - end; - -var - AButtonViewInfo: TcxNavigatorButtonViewInfo; - AButtonVisibleIndex: Integer; - AMinWidth, AMinHeight, ADifX: Integer; - AMinSize: TSize; - ANavigatorBounds, AButtonBounds: TRect; - ANavigatorButtons: TcxCustomNavigatorButtons; - AVisibleButtonCount: Integer; - I: Integer; - AHotTrackButton, APressedButton: TcxNavigatorButton; -begin - ANavigatorBounds := Navigator.GetNavigatorBounds; - - FIsDirty := True; - AHotTrackButton := nil; - APressedButton := nil; - if FHotTrackButtonViewInfo <> nil then - AHotTrackButton := FHotTrackButtonViewInfo.Button; - if FPressedButtonViewInfo <> nil then - APressedButton := FPressedButtonViewInfo.Button; - FHotTrackButtonViewInfo := nil; - FPressedButtonViewInfo := nil; - - AMinWidth := 0; - AMinHeight := 0; - ANavigatorButtons := Navigator.GetNavigatorButtons; - AVisibleButtonCount := GetVisibleButtonCount; - CheckButtonCount; - AButtonVisibleIndex := 0; - - for I := 0 to ANavigatorButtons.ButtonCount - 1 do - if ANavigatorButtons[I].Visible then - begin - AButtonViewInfo := TcxNavigatorButtonViewInfo(FButtons[AButtonVisibleIndex]); - AButtonViewInfo.Button := ANavigatorButtons[I]; - if AButtonViewInfo.Button = APressedButton then - FPressedButtonViewInfo := AButtonViewInfo; - if AButtonViewInfo.Button = AHotTrackButton then - FHotTrackButtonViewInfo := AButtonViewInfo; - AMinSize := GetMinButtonSize(AButtonVisibleIndex, AVisibleButtonCount, - ACheckMinHeight); - Inc(AMinWidth, AMinSize.cx); - if AMinHeight < AMinSize.cy then - AMinHeight := AMinSize.cy; - Inc(AButtonVisibleIndex); - end; - ADifX := 0; - if AHeight < AMinHeight then - AHeight := AMinHeight; - if AWidth < AMinWidth then - AWidth := AMinWidth - else - begin - if ButtonCount > 0 then - ADifX := (AWidth - AMinWidth) div ButtonCount; - AWidth := AMinWidth + ADifX * ButtonCount; - end; - AButtonBounds.Right := ANavigatorBounds.Left; - AButtonBounds.Top := ANavigatorBounds.Top; - AButtonBounds.Bottom := AButtonBounds.Top + AHeight; - for I := 0 to ButtonCount - 1 do - begin - AButtonBounds.Left := AButtonBounds.Right; - AButtonBounds.Right := AButtonBounds.Right + GetMinButtonSize(I, AVisibleButtonCount).cx + ADifX; - Buttons[I].Bounds := AButtonBounds; - end; -end; - -procedure TcxNavigatorViewInfo.Clear; -var - I: Integer; -begin - FIsDirty := True; - FHotTrackButtonViewInfo := nil; - FPressedButtonViewInfo := nil; - for I := 0 to ButtonCount - 1 do - TcxNavigatorButtonViewInfo(FButtons[I]).Free; - FButtons.Clear; -end; - -procedure TcxNavigatorViewInfo.DoEnter; -begin - InvalidateButton(FocusedButton); - UpdateSelected; -end; - -procedure TcxNavigatorViewInfo.DoExit; -begin - InvalidateButton(FocusedButton); - UpdateSelected; -end; - -function TcxNavigatorViewInfo.GetButtonAt(const pt: TPoint): TcxNavigatorButton; -var - AViewInfo: TcxNavigatorButtonViewInfo; -begin - AViewInfo := GetButtonViewInfoAt(pt); - if AViewInfo <> nil then - Result := AViewInfo.Button - else - Result := nil; -end; - -function TcxNavigatorViewInfo.GetButtonViewInfoAt(const pt: TPoint): TcxNavigatorButtonViewInfo; -var - I: Integer; -begin - Result := nil; - for I := 0 to ButtonCount - 1 do - if PtInRect(Buttons[I].Bounds, pt) then - begin - Result := Buttons[I]; - Break; - end; -end; - -function TcxNavigatorViewInfo.GetButtonViewInfoByButton( - AButton: TcxNavigatorButton): TcxNavigatorButtonViewInfo; -var - I: Integer; -begin - Result := nil; - for I := 0 to ButtonCount - 1 do - if Buttons[I].Button = AButton then - begin - Result := Buttons[I]; - break; - end; -end; - -procedure TcxNavigatorViewInfo.MakeIsDirty; -begin - FIsDirty := True; -end; - -procedure TcxNavigatorViewInfo.MouseDown(X, Y: Integer); -var - AButtonViewInfo: TcxNavigatorButtonViewInfo; -begin - FHintTimer.Enabled := False; - HintActivate(False); - AButtonViewInfo := GetButtonViewInfoAt(Point(X, Y)); - if (AButtonViewInfo <> nil) - and (GetButtonState(AButtonViewInfo) <> cxbsDisabled) then - begin - FButtonPressTimer.Interval := cxInitRepeatPause; - FButtonPressTimer.Enabled := True; - PressedButtonViewInfo := AButtonViewInfo; - FocusedButton := AButtonViewInfo; - InvalidateButton(PressedButtonViewInfo); - end; - UpdateSelected; -end; - -procedure TcxNavigatorViewInfo.MouseMove(X, Y: Integer); -var - AButtonViewInfo: TcxNavigatorButtonViewInfo; -begin - AButtonViewInfo := GetButtonViewInfoAt(Point(X, Y)); - if AButtonViewInfo <> HotTrackButtonViewInfo then - begin - if (HotTrackButtonViewInfo <> nil) - and (GetButtonState(HotTrackButtonViewInfo) <> cxbsDisabled) then - InvalidateButton(HotTrackButtonViewInfo); - FHotTrackButtonViewInfo := AButtonViewInfo; - if (HotTrackButtonViewInfo <> nil) - and (GetButtonState(HotTrackButtonViewInfo) <> cxbsDisabled) then - InvalidateButton(HotTrackButtonViewInfo); - if FHintWindowShowing then - HintActivate(True) - else FHintTimer.Enabled := True; - end; - if HotTrackButtonViewInfo = nil then - HintActivate(False); - UpdateSelected; -end; - -procedure TcxNavigatorViewInfo.MouseUp(X, Y: Integer); -var - AButtonViewInfo: TcxNavigatorButtonViewInfo; -begin - FButtonPressTimer.Enabled := False; - AButtonViewInfo := PressedButtonViewInfo; - FPressedButtonViewInfo := nil; - InvalidateButton(AButtonViewInfo); - FHintTimer.Enabled := True; - UpdateSelected; - if (AButtonViewInfo <> nil) and PtInRect(AButtonViewInfo.Bounds, Point(X, Y)) and AButtonViewInfo.Enabled then - AButtonViewInfo.Button.DoClick; -end; - -procedure TcxNavigatorViewInfo.Paint; -var - R: TRect; - I: Integer; - ANavigatorControl: TWinControl; -begin - FCanvas.Canvas := Navigator.GetNavigatorCanvas; - if FIsDirty then - Calculate; - for I := 0 to ButtonCount - 1 do - PaintButton(I); - R := Navigator.GetNavigatorBounds; - ANavigatorControl := Navigator.GetNavigatorControl; - Navigator.GetNavigatorLookAndFeel.GetAvailablePainter(totButton).DrawButtonGroupBorder(Canvas, - R, FIsInplace and ANavigatorControl.Enabled, FIsSelected or (not FIsInplace and - (csDesigning in ANavigatorControl.ComponentState) and ANavigatorControl.Enabled)); - if FIsInplace then - Canvas.ExcludeClipRect(R); -end; - -procedure TcxNavigatorViewInfo.PressArrowKey(ALeftKey: Boolean); -var - AIndex: Integer; -begin - AIndex := FButtons.IndexOf(FocusedButton); - if AIndex < 0 then exit; - if ALeftKey then - begin - if AIndex > 0 then - FocusedButton := Buttons[AIndex - 1]; - end else - begin - if AIndex < ButtonCount - 1 then - FocusedButton := Buttons[AIndex + 1]; - end; -end; - -procedure TcxNavigatorViewInfo.UpdateButtonsEnabled; -var - I: Integer; -begin - for I := 0 to ButtonCount - 1 do - if Buttons[I].Enabled <> Buttons[I].Button.GetInternalEnabled then - begin - Buttons[I].Enabled := not Buttons[I].Enabled; - InvalidateButton(Buttons[I]); - end; -end; - -procedure TcxNavigatorViewInfo.InvalidateButton(AButton: TcxNavigatorButtonViewInfo); -var - ANavigatorControl: TWinControl; -begin - if AButton <> nil then - begin - ANavigatorControl := Navigator.GetNavigatorControl; - if ANavigatorControl.HandleAllocated then - Windows.InvalidateRect(ANavigatorControl.Handle, - @(AButton.Bounds), False); - end; -end; - -procedure TcxNavigatorViewInfo.PaintButton(AButtonIndex: Integer); - - procedure DrawButtonGlyph(ACanvas: TcxCanvas; const AGlyphRect: TRect); - var - AButton: TcxNavigatorButtonViewInfo; - AButtonState: TcxButtonState; - APainter: TcxCustomLookAndFeelPainterClass; - begin - AButton := TcxNavigatorButtonViewInfo(FButtons[AButtonIndex]); - AButtonState := GetButtonState(AButton); - APainter := Navigator.GetNavigatorLookAndFeel.GetAvailablePainter(totButton); - APainter.DrawNavigatorGlyph(ACanvas, AButton.Button.InternalImages, - AButton.Button.InternalImageIndex, AButtonIndex, AGlyphRect, - AButtonState <> cxbsDisabled, AButton.Button.IsUserImageListUsed); - end; - -var - ABitmap: TcxBitmap; - AButton: TcxNavigatorButtonViewInfo; - AButtonBounds, AContentRect, AImageRect, R1: TRect; - AButtonState: TcxButtonState; - AImageSize: TSize; - APainter: TcxCustomLookAndFeelPainterClass; - ACanvas: TcxCanvas; -begin - AButton := TcxNavigatorButtonViewInfo(FButtons[AButtonIndex]); - AButtonBounds := AButton.Bounds; - if not Canvas.RectVisible(AButtonBounds) then - Exit; - AButtonState := GetButtonState(AButton); - APainter := Navigator.GetNavigatorLookAndFeel.GetAvailablePainter(totButton); - AButtonBounds := APainter.AdjustGroupButtonDisplayRect(AButtonBounds, FButtons.Count, AButtonIndex); - AImageSize := AButton.Button.GetImageSize; - AContentRect := AButtonBounds; - ExtendRect(AContentRect, GetButtonBorderExtent(APainter, AButtonIndex, FButtons.Count)); - with AContentRect do - begin - AImageRect.Left := Left + (Right - Left - AImageSize.cx) div 2; - AImageRect.Top := Top + (Bottom - Top - AImageSize.cy) div 2; - AImageRect.Right := AImageRect.Left + AImageSize.cx; - AImageRect.Bottom := AImageRect.Top + AImageSize.cy; - if GetButtonState(AButton) = cxbsPressed then - OffsetRect(AImageRect, 1, 1); - end; - - ABitmap := TcxBitmap.CreateSize(AButtonBounds, pf32bit); - try - ACanvas := ABitmap.cxCanvas; - cxDrawTransparentControlBackground(Navigator.GetNavigatorControl, ACanvas, - AButtonBounds); - APainter.DrawButtonInGroup(ACanvas, ABitmap.ClientRect, - AButtonState, FButtons.Count, AButtonIndex, clWindow); - - R1 := AImageRect; - OffsetRect(R1, - AButtonBounds.Left, - AButtonBounds.Top); - DrawButtonGlyph(ACanvas, R1); - cxBitBlt(Canvas.Handle, ACanvas.Handle, AButtonBounds, cxNullPoint, SRCCOPY); - - if Navigator.GetNavigatorTabStop and (AButton = FocusedButton) and - Navigator.GetNavigatorFocused - then - Canvas.DrawFocusRect(AImageRect); - - if APainter = TcxWinXPLookAndFeelPainter then - Canvas.ExcludeClipRect(AButton.Bounds); - finally - FreeAndNil(ABitmap); - end; -end; - -procedure TcxNavigatorViewInfo.HintActivate(AShow: Boolean); - - function NeedShowHint(const AHint: string): Boolean; - begin - Result := AShow and Navigator.GetNavigatorShowHint and (AHint <> '') and - CanShowHint(Navigator.GetNavigatorControl); - end; - -var - AHint: string; - P: TPoint; - R: TRect; -begin - if FHintWindow <> nil then - begin - FHintWindow.Hide; - if IsWindowVisible(FHintWindow.Handle) then - ShowWindow(FHintWindow.Handle, SW_HIDE); - FreeAndNil(FHintWindow); - end; - FHintTimer.Enabled := False; - FHintWindowShowing := False; - if (HotTrackButtonViewInfo <> nil) then - AHint := GetShortHint(HotTrackButtonViewInfo.Hint) - else - AHint := ''; - if NeedShowHint(AHint) then - begin - FHintWindow := HintWindowClass.Create(nil); - P := InternalGetCursorPos; - Inc(P.Y, cxGetCursorSize.cy); - R := FHintWindow.CalcHintRect(Screen.Width, AHint, nil); - R := Rect(P.X, P.Y, P.X + R.Right, P.Y + R.Bottom - R.Top); - FHintWindow.Color := Application.HintColor; - {$IFDEF DELPHI7} - FHintWindow.ParentWindow := Application.Handle; //Bug in delphi7 and higher - {$ENDIF} - cxActivateHint(FHintWindow, R, AHint); - FHintWindowShowing := True; - end; -end; - -function TcxNavigatorViewInfo.GetButton(Index: Integer): TcxNavigatorButtonViewInfo; -begin - Result := TcxNavigatorButtonViewInfo(FButtons[Index]); -end; - -function TcxNavigatorViewInfo.GetButtonCount: Integer; -begin - Result := FButtons.Count; -end; - -function TcxNavigatorViewInfo.GetFocusedButton: TcxNavigatorButtonViewInfo; -begin - if (FFocusedButton <> nil) and not FFocusedButton.Visible then - FFocusedButton := nil; - if (FFocusedButton = nil) and (ButtonCount > 0) then - FFocusedButton := Buttons[0].Button; - if (FFocusedButton <> nil) then - Result := GetButtonViewInfoByButton(FFocusedButton) - else Result := nil; -end; - -procedure TcxNavigatorViewInfo.SetFocusedButton(Value: TcxNavigatorButtonViewInfo); -var - AOldButtonViewInfo: TcxNavigatorButtonViewInfo; -begin - AOldButtonViewInfo := GetFocusedButton; - if AOldButtonViewInfo <> Value then - begin - FFocusedButton := Value.Button; - InvalidateButton(AOldButtonViewInfo); - InvalidateButton(Value); - end; -end; - -function TcxNavigatorViewInfo.StopButtonPressTimerIfLeftMouseReleased: Boolean; -begin - if not (ssLeft in InternalGetShiftState) then - begin - FButtonPressTimer.Enabled := False; - MouseUp(-1, -1); - Result := True; - end - else - Result := False; -end; - -function TcxNavigatorViewInfo.GetButtonBorderExtent(APainter: TcxCustomLookAndFeelPainterClass; - AButtonIndex, AButtonCount: Integer): TRect; -begin - Result := APainter.ButtonGroupBorderSizes(AButtonCount, AButtonIndex); -end; - -function TcxNavigatorViewInfo.GetButtonState(AButton: TcxNavigatorButtonViewInfo): TcxButtonState; -begin - Result := cxbsNormal; - if not AButton.Enabled then - Result := cxbsDisabled - else - if (AButton = PressedButtonViewInfo) - and (AButton = HotTrackButtonViewInfo) then - Result := cxbsPressed - else - if AButton = HotTrackButtonViewInfo then - Result := cxbsHot; -end; - -function TcxNavigatorViewInfo.GetMiddleButtonBorderExtent( - APainter: TcxCustomLookAndFeelPainterClass): TRect; -begin - Result := APainter.ButtonGroupBorderSizes(3, 1); -end; - -function TcxNavigatorViewInfo.GetMinButtonSize( - AButtonIndex, AButtonCount: Integer; AAutoHeight: Boolean = False): TSize; -var - AButtonBorderExtent: TRect; - APainter: TcxCustomLookAndFeelPainterClass; -begin - Result := TcxNavigatorButtonViewInfo(FButtons[AButtonIndex]).Button.GetImageSize; - APainter := Navigator.GetNavigatorLookAndFeel.GetAvailablePainter(totButton); - AButtonBorderExtent := GetMiddleButtonBorderExtent(APainter); - Result.cx := Result.cx + AButtonBorderExtent.Left + AButtonBorderExtent.Right + 1; - if AAutoHeight then - Result.cy := Result.cy + AButtonBorderExtent.Top + AButtonBorderExtent.Bottom + 1 - else - Result.cy := AButtonBorderExtent.Top + AButtonBorderExtent.Bottom + 1; -end; - -function TcxNavigatorViewInfo.GetVisibleButtonCount: Integer; -var - ANavigatorButtons: TcxCustomNavigatorButtons; - I: Integer; -begin - Result := 0; - ANavigatorButtons := Navigator.GetNavigatorButtons; - for I := 0 to ANavigatorButtons.ButtonCount - 1 do - if ANavigatorButtons[I].Visible then - Inc(Result); -end; - -procedure TcxNavigatorViewInfo.DoButtonPressTimer(Sender: TObject); -begin - if StopButtonPressTimerIfLeftMouseReleased then - Exit; - FButtonPressTimer.Interval := cxRepeatPause; - if (HotTrackButtonViewInfo <> nil) and (HotTrackButtonViewInfo = PressedButtonViewInfo) and - PressedButtonViewInfo.Enabled and (PressedButtonViewInfo.Button.DefaultIndex in [NBDI_PRIOR, NBDI_NEXT]) then - try - PressedButtonViewInfo.Button.DoClick; - except - FButtonPressTimer.Enabled := False; - raise; - end; -end; - -procedure TcxNavigatorViewInfo.DoHintTimer(Sender: TObject); -begin - HintActivate(True); -end; - -procedure TcxNavigatorViewInfo.UpdateSelected; -var - AIsSelected: Boolean; - ANavigatorControl: TWinControl; - R1, R2: TRect; -begin - if not Navigator.GetNavigatorLookAndFeel.Painter.IsButtonHotTrack then - Exit; - ANavigatorControl := Navigator.GetNavigatorControl; - AIsSelected := (HotTrackButtonViewInfo <> nil) or (PressedButtonViewInfo <> nil) or - Navigator.GetNavigatorFocused; - if (AIsSelected <> FIsSelected) and ANavigatorControl.HandleAllocated then - begin - FIsSelected := AIsSelected; - R1 := Navigator.GetNavigatorBounds; - R2 := R1; - InflateRect(R2, -1, -1); - InternalInvalidate(ANavigatorControl.Handle, R1, R2, False); - end; -end; - -{ TcxCustomNavigator } - -constructor TcxCustomNavigator.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ControlStyle := ControlStyle - [csAcceptsControls, csSetCaption] + [csOpaque]; - FButtons := CreateButtons; - FViewInfo := GetViewInfoClass.Create(Self, False); - TabStop := False; - Height := 25; -end; - -destructor TcxCustomNavigator.Destroy; -begin - EndMouseTracking(Self); - FreeAndNil(FViewInfo); - FreeAndNil(FButtons); - inherited Destroy; -end; - -procedure TcxCustomNavigator.ClickButton(Index: Integer); -begin - CustomButtons.ClickButton(Index); -end; - -procedure TcxCustomNavigator.RestoreButtons; -var - I: Integer; -begin - with CustomButtons do - for I := 0 to ButtonCount - 1 do - FButtons[I].FIsVisibleAssigned := False; - InitButtons; -end; - -function TcxCustomNavigator.CanFocusOnClick: Boolean; -begin - Result := inherited CanFocusOnClick and TabStop; -end; - -function TcxCustomNavigator.CanResize(var NewWidth, NewHeight: Integer): Boolean; -begin - Result := inherited CanResize(NewWidth, NewHeight); - if Result and (FViewInfo <> nil) and HandleAllocated then - FViewInfo.CheckSize(NewWidth, NewHeight); -end; - -function TcxCustomNavigator.CreateButtons: TcxCustomNavigatorButtons; -begin - Result := TcxCustomNavigatorButtons.Create(Self); -end; - -procedure TcxCustomNavigator.Paint; -begin - FViewInfo.Paint; -end; - -procedure TcxCustomNavigator.DoEnter; -begin - inherited DoEnter; - FViewInfo.DoEnter; -end; - -procedure TcxCustomNavigator.DoExit; -begin - inherited DoExit; - FViewInfo.DoExit; -end; - -procedure TcxCustomNavigator.EnabledChanged; -begin - RefreshNavigator; -end; - -procedure TcxCustomNavigator.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - if (Key = VK_LEFT) or (Key = VK_RIGHT) then - FViewInfo.PressArrowKey(Key = VK_LEFT); - if (Key = VK_SPACE) and (FViewInfo.FocusedButton <> nil) - and FViewInfo.FocusedButton.Enabled then - FViewInfo.FocusedButton.Button.DoClick; -end; - -procedure TcxCustomNavigator.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if Button = mbLeft then - FViewInfo.MouseDown(X, Y); -end; - -procedure TcxCustomNavigator.MouseEnter(AControl: TControl); -begin - inherited MouseEnter(AControl); -{$IFDEF DELPHI7} - if IsDesigning then - Exit; -{$ENDIF} - BeginMouseTracking(Self, Bounds, Self); -end; - -procedure TcxCustomNavigator.MouseLeave(AControl: TControl); -begin - inherited MouseLeave(AControl); -{$IFDEF DELPHI7} - if IsDesigning then - Exit; -{$ENDIF} - EndMouseTracking(Self); - FViewInfo.MouseMove(-1, -1); -end; - -procedure TcxCustomNavigator.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - FViewInfo.MouseMove(X, Y); - BeginMouseTracking(Self, Bounds, Self); -end; - -procedure TcxCustomNavigator.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - FViewInfo.MouseUp(X, Y); -end; - -procedure TcxCustomNavigator.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited LookAndFeelChanged(Sender, AChangedValues); - RecreateWnd -end; - -procedure TcxCustomNavigator.NavigatorMouseLeave; -begin - FViewInfo.MouseMove(-1, -1); -// FViewInfo.FHintWindow.Free; -// FViewInfo.FHintWindow := THintWindow.Create(nil); -end; - -procedure TcxCustomNavigator.NavigatorChanged(AChangeType: TcxNavigatorChangeType); -begin -end; - -function TcxCustomNavigator.GetNavigatorBounds: TRect; -begin - Result := Rect(0, 0, ClientWidth, ClientHeight); -end; - -function TcxCustomNavigator.GetNavigatorButtons: TcxCustomNavigatorButtons; -begin - Result := CustomButtons; -end; - -function TcxCustomNavigator.GetNavigatorCanvas: TCanvas; -begin - Result := Canvas.Canvas; -end; - -function TcxCustomNavigator.GetNavigatorControl: TWinControl; -begin - Result := Self; -end; - -function TcxCustomNavigator.GetNavigatorLookAndFeel: TcxLookAndFeel; -begin - Result := LookAndFeel; -end; - -function TcxCustomNavigator.GetNavigatorFocused: Boolean; -begin - Result := Focused; -end; - -function TcxCustomNavigator.GetNavigatorShowHint: Boolean; -begin - Result := ShowHint; -end; - -function TcxCustomNavigator.GetNavigatorTabStop: Boolean; -begin - Result := TabStop; -end; - -function TcxCustomNavigator.GetViewInfoClass: TcxNavigatorViewInfoClass; -begin - Result := TcxNavigatorViewInfo; -end; - -procedure TcxCustomNavigator.InitButtons; -var - I: Integer; -begin - for I := 0 to FButtons.ButtonCount - 1 do - FButtons[I].RestoreDefaultVisible(True); -end; - -function TcxCustomNavigator.GetNavigatorOwner: TComponent; -begin - Result := Self; -end; - -procedure TcxCustomNavigator.NavigatorButtonsStateChanged; -begin - FViewInfo.UpdateButtonsEnabled; -end; - -procedure TcxCustomNavigator.RefreshNavigator; -var - AWidth, AHeight: Integer; -begin - if not HandleAllocated then - Exit; - AWidth := Width; - AHeight := Height; - FViewInfo.CheckSize(AWidth, AHeight); - if (AWidth <> Width) or (Height <> AHeight) then - SetBounds(Left, Top, AWidth, AHeight) - else - Invalidate; -end; - -procedure TcxCustomNavigator.CreateWnd; -begin - inherited CreateWnd; - RefreshNavigator; -end; - -procedure TcxCustomNavigator.WndProc(var Message: TMessage); -begin - if (FViewInfo <> nil) and (FViewInfo.FHintWindowShowing) then - with Message do - if ((Msg >= WM_KEYFIRST) and (Msg <= WM_KEYLAST)) or - ((Msg = CM_ACTIVATE) or (Msg = CM_DEACTIVATE)) or - (Msg = CM_APPKEYDOWN) or (Msg = CM_APPSYSCOMMAND) or - (Msg = WM_COMMAND) or ((Msg > WM_MOUSEMOVE) and - (Msg <= WM_MOUSELAST)) or (Msg = WM_NCMOUSEMOVE) then - FViewInfo.HintActivate(False); - inherited WndProc(Message); -end; - -procedure TcxCustomNavigator.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - Message.Result := DLGC_WANTARROWS; -end; - -procedure TcxCustomNavigator.CMEnabledChanged(var Message: TMessage); -begin - inherited; - EnabledChanged; -end; - -procedure TcxCustomNavigator.CMHintShow(var Message: TCMHintShow); -begin - Message.Result := 1; -end; - -{ TcxNavigatorControlNotifier } - -constructor TcxNavigatorControlNotifier.Create; -begin - inherited Create; - FList := TList.Create; -end; - -destructor TcxNavigatorControlNotifier.Destroy; -begin - FreeAndNil(FList); - inherited Destroy; -end; - -procedure TcxNavigatorControlNotifier.AddNavigator(ANavigator: IcxNavigatorOwner); -begin - if FList.IndexOf(Pointer(ANavigator)) < 0 then - FList.Add(Pointer(ANavigator)); -end; - -procedure TcxNavigatorControlNotifier.RemoveNavigator(ANavigator: IcxNavigatorOwner); -begin - FList.Remove(Pointer(ANavigator)); -end; - -procedure TcxNavigatorControlNotifier.RefreshNavigatorButtons; -var - I: Integer; -begin - for I := 0 to FList.Count - 1 do - IcxNavigatorOwner(FList[I]).NavigatorButtonsStateChanged; -end; - -{ TcxNavigatorControlButtons } -procedure TcxNavigatorControlButtons.ReleaseBookmark; -var - ANavigatorControl: IcxNavigator; -begin - ANavigatorControl := Control; - if (ANavigatorControl <> nil) and ANavigatorControl.IsBookmarkAvailable then - ANavigatorControl.ClearBookmark; -end; - -function TcxNavigatorControlButtons.GetControl: IcxNavigator; -begin - if Assigned(FOnGetControl) then - Result := FOnGetControl - else - Result := nil; -end; - -procedure TcxNavigatorControlButtons.DoButtonClick(ADefaultIndex: Integer); -var - ANavigatorControl: IcxNavigator; -begin - ANavigatorControl := Control; - if (ANavigatorControl <> nil) and ((ADefaultIndex <> NBDI_DELETE) or not ConfirmDelete or - ((MessageDlg(cxGetResourceString(@cxNavigator_DeleteRecordQuestion), - mtConfirmation, mbOKCancel, 0) = ID_OK))) then - ANavigatorControl.DoAction(ADefaultIndex); - FNavigator.NavigatorButtonsStateChanged; -end; - -function TcxNavigatorControlButtons.GetButtonEnabled(ADefaultIndex: Integer): Boolean; -var - ANavigatorControl: IcxNavigator; -begin - ANavigatorControl := Control; - Result := (ANavigatorControl <> nil) and IsNavigatorEnabled and - (ANavigatorControl.IsActive or (ADefaultIndex = NBDI_FILTER)); - if Result then - case ADefaultIndex of - NBDI_FIRST, NBDI_PRIOR, NBDI_PRIORPAGE: - Result := not ANavigatorControl.IsBof; - NBDI_LAST, NBDI_NEXT, NBDI_NEXTPAGE: - Result := not ANavigatorControl.IsEof; - NBDI_INSERT: - Result := ANavigatorControl.CanInsert; - NBDI_APPEND: - Result := ANavigatorControl.CanAppend; - NBDI_DELETE: - Result := ANavigatorControl.CanDelete; - NBDI_EDIT: - Result := ANavigatorControl.CanEdit and not ANavigatorControl.IsEditing; - NBDI_POST, NBDI_CANCEL: - Result := ANavigatorControl.IsEditing; - NBDI_GOTOBOOKMARK: - Result := ANavigatorControl.IsBookmarkAvailable; - end; -end; - -{ TcxCustomNavigatorControl } - -destructor TcxCustomNavigatorControl.Destroy; -begin - Control := nil; - inherited Destroy; -end; - -function TcxCustomNavigatorControl.CreateButtons: TcxCustomNavigatorButtons; -begin - Result := GetButtonsClass.Create(Self); - TcxNavigatorControlButtons(Result).OnGetControl := GetControl; -end; - -function TcxCustomNavigatorControl.GetButtonsClass: TcxNavigatorControlButtonsClass; -begin - Result := TcxNavigatorControlButtons; -end; - -procedure TcxCustomNavigatorControl.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = Control) then - Control := nil; -end; - -procedure TcxCustomNavigatorControl.InitButtons; -var - ANavigator: IcxNavigator; - I: Integer; -begin - if FControl = nil then - begin - for I := 0 to FButtons.ButtonCount - 1 do - FButtons[I].RestoreDefaultVisible(True); - end - else - begin - Supports(FControl, IcxNavigator, ANavigator); - for I := 0 to FButtons.ButtonCount - 1 do - FButtons[I].RestoreDefaultVisible(ANavigator.IsActionSupported(FButtons[I].DefaultIndex)); - end; -end; - -function TcxCustomNavigatorControl.GetButtons: TcxNavigatorControlButtons; -begin - Result := TcxNavigatorControlButtons(CustomButtons); -end; - -function TcxCustomNavigatorControl.GetControl: IcxNavigator; -begin - if Control <> nil then - Supports(Control, IcxNavigator, Result) - else - Result := nil; -end; - -procedure TcxCustomNavigatorControl.SetButtons(Value: TcxNavigatorControlButtons); -begin - CustomButtons.Assign(Value); -end; - -procedure TcxCustomNavigatorControl.SetControl(Value: TComponent); -var - ANavigator: IcxNavigator; -begin - if (Value <> FControl) and ((Value = nil) or Supports(Value, IcxNavigator, - ANavigator)) then - begin - if FControl <> nil then - begin - {$IFDEF DELPHI5} - FControl.RemoveFreeNotification(Self); - {$ENDIF} - Supports(FControl, IcxNavigator, ANavigator); - if ANavigator.GetNotifier <> nil then - ANavigator.GetNotifier.RemoveNavigator(Self); - end; - FControl := Value; - if (FControl <> nil) then - begin - FControl.FreeNotification(Self); - Supports(FControl, IcxNavigator, ANavigator); - if ANavigator.GetNotifier <> nil then - ANavigator.GetNotifier.AddNavigator(Self); - end; - InitButtons; - RefreshNavigator; - end; -end; - -initialization - -finalization - FreeAndNil(FNavigatorImages); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxProgressBar.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxProgressBar.pas deleted file mode 100644 index 3e2c272e..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxProgressBar.pas +++ /dev/null @@ -1,2712 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxProgressBar; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, Variants, -{$ENDIF} - Windows, Classes, Controls, Forms, Graphics, Messages, SysUtils, cxClasses, - cxContainer, cxControls, cxCustomData, cxEdit, cxExtEditConsts, - cxFilterControlUtils, cxGraphics, cxTextEdit, cxVariants, cxLookAndFeelPainters; - -const - cxProgressBarDefaultAnimationSpeed = 10; - cxProgressBarDefaultAnimationRestartDelay = 0; -type - TcxBorderWidth = 0..MaxWord; - TcxProgressBarAnimationSpeed = 0..20; - TcxProgressBarBevelOuter = (cxbvNone, cxbvLowered, cxbvRaised); - TcxProgressBarOrientation = (cxorHorizontal, cxorVertical); - TcxProgressBarTextStyle = (cxtsPercent, cxtsPosition, cxtsText); - TcxProgressBarBarStyle = (cxbsSolid, cxbsLEDs, cxbsGradient, - cxbsGradientLEDs, cxbsBitmap, cxbsBitmapLEDs, cxbsAnimation, - cxbsAnimationLEDs); - TcxProgressBarAnimationPath = (cxapCycle, cxapPingPong); - -const - cxDefaultShowTextStyle = cxtsPercent; - -type - { TcxCustomProgressBarViewInfo } - - TcxCustomProgressBar = class; - - TcxCustomProgressBarViewInfo = class(TcxCustomTextEditViewInfo) - private - FAnimationPath: TcxProgressBarAnimationPath; - FAnimationRestartDelay: Cardinal; - FAnimationPosition: Integer; - FAnimationDirection: Integer; - FAnimationSpeed: Cardinal; - FAnimationTimer: TcxTimer; - FAnimationRestartDelayTimer: TcxTimer; - FBeginColor: TColor; - FBarBevelOuter: TcxProgressBarBevelOuter; - FUsualBitmap: TcxBitmap; - FPainterBitmap: TcxBitmap; - FEndColor: TColor; - FMarquee: Boolean; - FMax: Double; - FMin: Double; - FNativeBitmap: TBitmap; - FPosition: Double; - FForegroundImage: TBitmap; - FOrientation: TcxProgressBarOrientation; - FShowText: Boolean; - FShowTextStyle: TcxProgressBarTextStyle; - FTextOrientation: TcxProgressBarOrientation; - FSolidTextColor: Boolean; - FBarStyle: TcxProgressBarBarStyle; - FOverloadValue: Double; - FOverloadBeginColor: TColor; - FOverloadEndColor: TColor; - FShowOverload: Boolean; - FPeakValue: Double; - FPeakColor: TColor; - FPeakSize: TcxNaturalNumber; - FShowPeak: Boolean; - FRealShowOverload: Boolean; - FRealShowPeak: Boolean; - FPropTransparent: Boolean; - procedure CalcDrawingParams(out ADrawProgressBarRect, ADrawOverloadBarRect, - ADrawPeakBarRect, ADrawAnimationBarRect, ASolidRect: TRect; out ALEDsWidth: Integer); - function CanAnimationBarShow: Boolean; - procedure CreateBarBmp; - procedure CreateNativeBitmap(const ASize: TSize); - procedure CreatePainterBitmap; - procedure ExcludeRects(ACanvas: TcxCanvas; const ABounds: TRect); - procedure ExcludeLEDRects(ACanvas: TcxCanvas; const ABounds: TRect); - function GetAnimationTimerInterval: Cardinal; - function GetAnimationOffset: Integer; - function GetMaxMinDiff: Double; - function GetRelativeOverloadValue: Double; - function GetRelativePeakValue: Double; - function GetRelativePosition: Double; - function IsLEDStyle: Boolean; - procedure DrawBackground(ACanvas: TcxCanvas; const ACanvasParent: TcxCanvas; const ABounds: TRect); - function GetDrawDelta: Integer; - function GetDrawText: string; - function GetIsDoubleBuffered: Boolean; - procedure DrawBarCaption(ACanvas: TcxCanvas); - procedure PaintBarBevelOuter(ACanvas: TcxCanvas; ABBORect: TRect); - procedure DrawBarBitmap(ACanvas: TcxCanvas; ARect: TRect); - procedure DrawGradientBar(ACanvas: TcxCanvas; const ANormalRect, AOverloadRect, ABarRect: TRect); - procedure DrawSolidBar(ACanvas: TcxCanvas; const ANormalRect, AOverloadRect: TRect); - procedure DrawAnimationBar(ACanvas: TcxCanvas; const ABar, ASolidRect: TRect); - procedure DrawAnimationBarBackground(ACanvas: TcxCanvas; const ASolidRect: TRect; ASolidColor: TColor; ADrawBar: Boolean); - function CalcLEDsWidth: Integer; - procedure AdjustForLEDsBarBounds(var ABarRect, AOverloadBarRect: TRect; const ALEDsWidth: Integer); - procedure DrawPeak(ACanvas: TcxCanvas; const APeakRect: TRect); - procedure DrawBorderLEDs(ACanvas: TcxCanvas; const ABarRect: TRect; ALEDsWidth: Integer); - procedure DoAnimationTimer(Sender: TObject); - procedure DoAnimationRestartDelayTimer(Sender: TObject); - procedure StartAnimationTimer; - procedure StartAnimationRestartDelayTimer; - procedure StopAnimationTimer; - procedure StopAnimationRestartDelayTimer; - procedure SetAnimationPath(AValue: TcxProgressBarAnimationPath); - procedure SetAnimationSpeed(AValue: Cardinal); - procedure SetMarquee(AValue: Boolean); - procedure SetBarStyle(AValue: TcxProgressBarBarStyle); - procedure SetAnimationFirstPosition; - procedure CalcAnimationCurrentPosition; - function GetCorrectAnimationBarRect: TRect; - function GetMinPositionInBounds: Integer; - function GetMaxPositionInBounds: Integer; - procedure SetOrientation(AValue: TcxProgressBarOrientation); - protected - ChangedBounds: Boolean; - ChangedBoundsBarRect: Boolean; - BarRect: TRect; - ProgressBarRect: TRect; - OverloadBarRect: TRect; - PeakBarRect: TRect; - AnimationBarRect: TRect; - procedure PaintProgressBarByPainter(ACanvas: TcxCanvas); - function GetAnimationBarDimension: Integer; virtual; - function GetAnimationDerection: Integer; virtual; - - property AnimationPath: TcxProgressBarAnimationPath read FAnimationPath - write SetAnimationPath; - property AnimationRestartDelay: Cardinal read FAnimationRestartDelay write FAnimationRestartDelay; - property AnimationSpeed: Cardinal read FAnimationSpeed write SetAnimationSpeed; - property BeginColor: TColor read FBeginColor write FBeginColor; - property BarBevelOuter: TcxProgressBarBevelOuter read FBarBevelOuter - write FBarBevelOuter; - property EndColor: TColor read FEndColor write FEndColor; - property Marquee: Boolean read FMarquee write SetMarquee; - property Min: Double read FMin write FMin; - property Max: Double read FMax write FMax; - property MaxMinDiff: Double read GetMaxMinDiff; - property OverloadValue: Double read FOverloadValue write FOverloadValue; - property PeakValue: Double read FPeakValue write FPeakValue; - property Position: Double read FPosition write FPosition; - property RelativePeakValue: Double read GetRelativePeakValue; - property RelativeOverloadValue: Double read GetRelativeOverloadValue; - property RelativePosition: Double read GetRelativePosition; - - property BarStyle: TcxProgressBarBarStyle read FBarStyle write SetBarStyle; - property ForegroundImage: TBitmap read FForegroundImage write FForegroundImage; - property IsDoubleBuffered: Boolean read GetIsDoubleBuffered; - property Orientation: TcxProgressBarOrientation read FOrientation write SetOrientation; - property OverloadBeginColor: TColor read FOverloadBeginColor write FOverloadBeginColor; - property OverloadEndColor: TColor read FOverloadEndColor write FOverloadEndColor; - property PeakColor: TColor read FPeakColor write FPeakColor; - property PeakSize: TcxNaturalNumber read FPeakSize write FPeakSize; - property PropTransparent: Boolean read FPropTransparent write FPropTransparent; - property ShowOverload: Boolean read FShowOverload write FShowOverload; - property ShowPeak: Boolean read FShowPeak write FShowPeak; - property ShowText: Boolean read FShowText write FShowText; - property ShowTextStyle: TcxProgressBarTextStyle read FShowTextStyle write FShowTextStyle; - property SolidTextColor: Boolean read FSolidTextColor write FSolidTextColor; - property TextOrientation: TcxProgressBarOrientation read FTextOrientation write FTextOrientation; - public - FocusRect: TRect; - HasForegroundImage: Boolean; - constructor Create; override; - destructor Destroy; override; - procedure DrawText(ACanvas: TcxCanvas); override; - function GetPercentDone: Integer; - function GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; override; - function NeedShowHint(ACanvas: TcxCanvas; const P: TPoint; out AText: TCaption; - out AIsMultiLine: Boolean; out ATextRect: TRect): Boolean; override; - procedure Paint(ACanvas: TcxCanvas); override; - procedure PaintProgressBar(ACanvas: TcxCanvas); virtual; - procedure Offset(DX: Integer; DY: Integer); override; - end; - - { TcxCustomProgressBarViewData } - - TcxCustomProgressBarProperties = class; - - TcxCustomProgressBarViewData = class(TcxCustomEditViewData) - private - function GetProperties: TcxCustomProgressBarProperties; - protected - procedure CalculateViewInfoProperties(AViewInfo: TcxCustomEditViewInfo); virtual; - function InternalGetEditConstantPartSize(ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; - var MinContentSize: TSize; AViewInfo: TcxCustomEditViewInfo): TSize; override; - function GetDrawTextFlags: Integer; virtual; - function GetIsEditClass: Boolean; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure CalculateButtonsViewInfo(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - property Properties: TcxCustomProgressBarProperties read GetProperties; - end; - - { TcxProgressBarPropertiesValues } - - TcxProgressBarPropertiesValues = class(TcxCustomEditPropertiesValues) - private - function GetMax: Boolean; - function GetMin: Boolean; - function IsMaxStored: Boolean; - function IsMinStored: Boolean; - procedure SetMax(Value: Boolean); - procedure SetMin(Value: Boolean); - published - property Max: Boolean read GetMax write SetMax stored IsMaxStored; - property Min: Boolean read GetMin write SetMin stored IsMinStored; - end; - - { TcxCustomProgressBarProperties } - - TcxCustomProgressBarProperties = class(TcxCustomEditProperties) - private - FAnimationPath: TcxProgressBarAnimationPath; - FAnimationRestartDelay: Cardinal; - FAnimationSpeed: TcxProgressBarAnimationSpeed; - FBeginColor: TColor; - FBarBevelOuter: TcxProgressBarBevelOuter; - FChangedForegroundImage: Boolean; - FChangedPosition: Boolean; - FEndColor: TColor; - FForegroundImage: TBitmap; - FMarquee: Boolean; - FOrientation: TcxProgressBarOrientation; - FShowText: Boolean; - FShowTextStyle: TcxProgressBarTextStyle; - FText: string; - FTextOrientation: TcxProgressBarOrientation; - FSolidTextColor: Boolean; - FBarStyle: TcxProgressBarBarStyle; - FTransparentImage: Boolean; - FBorderWidth: TcxBorderWidth; - FOverloadValue: Double; - FShowOverload: Boolean; - FOverloadBeginColor: TColor; - FOverloadEndColor: TColor; - FPeakValue: Double; - FShowPeak: Boolean; - FPeakColor: TColor; - FPeakSize: TcxNaturalNumber; - function GetAssignedValues: TcxProgressBarPropertiesValues; - function GetForegroundImage: TBitmap; - procedure ForegroundImageChanged(Sender: TObject); - function GetMax: Double; - function GetMin: Double; - function GetOverloadValueStored: Boolean; - function GetPeakValueStored: Boolean; - function GetRealPeakValue(APosition: Double): Double; - function IsMaxStored: Boolean; - function IsMinStored: Boolean; - function IsShowTextStyleStored: Boolean; - procedure SetAnimationPath(AValue: TcxProgressBarAnimationPath); - procedure SetAnimationRestartDelay(AValue: Cardinal); - procedure SetAnimationSpeed(AValue: TcxProgressBarAnimationSpeed); - procedure SetAssignedValues(Value: TcxProgressBarPropertiesValues); - procedure SetBeginColor(Value: TColor); - procedure SetBarBevelOuter(Value: TcxProgressBarBevelOuter); - procedure SetColorVista; - procedure SetEndColor(Value: TColor); - procedure SetForegroundImage(Value: TBitmap); - procedure SetMarquee(Value: Boolean); - procedure SetMax(Value: Double); - procedure SetMin(Value: Double); - procedure SetOrientation(Value: TcxProgressBarOrientation); - procedure SetShowText(Value: Boolean); - procedure SetShowTextStyle(Value: TcxProgressBarTextStyle); - procedure SetTextOrientation(Value: TcxProgressBarOrientation); - procedure SetSolidTextColor(Value: Boolean); - procedure SetBarStyle(Value: TcxProgressBarBarStyle); - procedure SetText(const AValue: string); - procedure SetTransparentImage(Value: Boolean); - procedure SetBorderWidth(Value: TcxBorderWidth); - procedure SetOverloadValue(Value: Double); - procedure SetShowOverload(Value: Boolean); - procedure SetOverloadBeginColor(Value: TColor); - procedure SetOverloadEndColor(Value: TColor); - procedure SetPeakValue(Value: Double); - procedure SetShowPeak(Value: Boolean); - procedure SetPeakColor(Value: TColor); - procedure SetPeakSize(Value: TcxNaturalNumber); - procedure PostMinValue; - procedure PostMaxValue; - procedure PostOverloadValue; - protected - procedure CorrectPositionWithMaxMin( - AViewInfo: TcxCustomProgressBarViewInfo); virtual; - class function GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; override; - function GetMaxValue: Double; override; - function GetMinValue: Double; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function HasDisplayValue: Boolean; override; - property AssignedValues: TcxProgressBarPropertiesValues read GetAssignedValues - write SetAssignedValues; - property ChangedForegroundImage: Boolean read FChangedForegroundImage - write FChangedForegroundImage default False; - property ChangedPosition: Boolean read FChangedPosition - write FChangedPosition default False; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CanCompareEditValue: Boolean; override; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - // !!! - property AnimationPath: TcxProgressBarAnimationPath read FAnimationPath - write SetAnimationPath default cxapCycle; - property AnimationRestartDelay: Cardinal read FAnimationRestartDelay write SetAnimationRestartDelay default cxProgressBarDefaultAnimationRestartDelay; - property AnimationSpeed: TcxProgressBarAnimationSpeed read FAnimationSpeed write SetAnimationSpeed default cxProgressBarDefaultAnimationSpeed; - property BarBevelOuter: TcxProgressBarBevelOuter read FBarBevelOuter - write SetBarBevelOuter default cxbvNone; - property BarStyle: TcxProgressBarBarStyle read FBarStyle write SetBarStyle - default cxbsSolid; - property BeginColor: TColor read FBeginColor write SetBeginColor - default clNavy; - property BorderWidth : TcxBorderWidth read FBorderWidth write SetBorderWidth - default 0; - property EndColor: TColor read FEndColor write SetEndColor default clWhite; - property ForegroundImage: TBitmap read GetForegroundImage - write SetForegroundImage; - property Marquee: Boolean read FMarquee write SetMarquee default False; - property Max: Double read GetMax write SetMax stored IsMaxStored; - property Min: Double read GetMin write SetMin stored IsMinStored; - property Orientation: TcxProgressBarOrientation read FOrientation - write SetOrientation default cxorHorizontal; - property OverloadBeginColor: TColor read FOverloadBeginColor - write SetOverloadBeginColor default $008080FF; - property OverloadEndColor: TColor read FOverloadEndColor - write SetOverloadEndColor default clFuchsia; - property OverloadValue: Double read FOverloadValue write SetOverloadValue - stored GetOverloadValueStored; - property PeakColor: TColor read FPeakColor write SetPeakColor default clRed; - property PeakSize: TcxNaturalNumber read FPeakSize write SetPeakSize - default 2; - property PeakValue: Double read FPeakValue write SetPeakValue - stored GetPeakValueStored; - property ShowOverload: Boolean read FShowOverload write SetShowOverload - default False; - property ShowPeak: Boolean read FShowPeak write SetShowPeak default False; - property ShowText: Boolean read FShowText write SetShowText default True; - property ShowTextStyle: TcxProgressBarTextStyle read FShowTextStyle - write SetShowTextStyle stored IsShowTextStyleStored; - property SolidTextColor: Boolean read FSolidTextColor - write SetSolidTextColor default False; - property Text: string read FText write SetText; - property TextOrientation: TcxProgressBarOrientation read FTextOrientation - write SetTextOrientation default cxorHorizontal; - property Transparent; // deprecated - property TransparentImage: Boolean read FTransparentImage - write SetTransparentImage default True; - end; - - { TcxProgressBarProperties } - - TcxProgressBarProperties = class(TcxCustomProgressBarProperties) - published - property AnimationPath; - property AnimationRestartDelay; - property AnimationSpeed; - property AssignedValues; - property BarBevelOuter; - property BarStyle; - property BeginColor; - property BorderWidth; - property EndColor; - property ForegroundImage; - property Marquee; - property Max; - property Min; - property Orientation; - property OverloadBeginColor; - property OverloadEndColor; - property OverloadValue; - property PeakColor; - property PeakSize; - property PeakValue; - property ShowOverload; - property ShowPeak; - property ShowText; - property ShowTextStyle; - property SolidTextColor; - property Text; - property TextOrientation; - property Transparent; // deprecated - property TransparentImage; - end; - - { TcxCustomProgressBar } - - TcxCustomProgressBar = class(TcxCustomEdit) - private - function GetPercentDone: Integer; - function GetPosition: Double; - function GetPositionStored: Boolean; - function GetProperties: TcxCustomProgressBarProperties; - function GetActiveProperties: TcxCustomProgressBarProperties; - function GetViewInfo: TcxCustomProgressBarViewInfo; - procedure SetProperties(Value: TcxCustomProgressBarProperties); - procedure SetPosition(Value: Double); - protected - procedure CheckEditorValueBounds; virtual; - procedure CheckEditValue; virtual; - function DefaultParentColor: Boolean; override; - procedure FillSizeProperties(var AEditSizeProperties: TcxEditSizeProperties); override; - procedure Initialize; override; - function InternalGetNotPublishedStyleValues: TcxEditStyleValues; override; - procedure SynchronizeDisplayValue; override; - procedure PropertiesChanged(Sender: TObject); override; - property ViewInfo: TcxCustomProgressBarViewInfo read GetViewInfo; - function CanFocusOnClick: Boolean; override; - function GetEditStateColorKind: TcxEditStateColorKind; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function CanFocus: Boolean; override; - property ActiveProperties: TcxCustomProgressBarProperties - read GetActiveProperties; - property PercentDone: Integer read GetPercentDone; - property Position: Double read GetPosition write SetPosition - stored GetPositionStored; - property Properties: TcxCustomProgressBarProperties read GetProperties - write SetProperties; - property Transparent; - end; - - { TcxCustomProgressBar } - - TcxProgressBar = class(TcxCustomProgressBar) - private - function GetActiveProperties: TcxProgressBarProperties; - function GetProperties: TcxProgressBarProperties; - procedure SetProperties(Value: TcxProgressBarProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxProgressBarProperties - read GetActiveProperties; - published - property Align; - property Anchors; - property AutoSize; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Position; - property Properties: TcxProgressBarProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -uses - Math, dxCore, cxEditConsts, cxDrawTextUtils, cxEditUtils, cxExtEditUtils, - cxSpinEdit, dxThemeConsts, dxThemeManager, dxUxTheme, cxGeometry, dxOffice11, - cxLookAndFeels; - -const - cxAnimationBarColorLightPercentage = 60; - cxAnimationBarMiddlePartWidth = 10; - cxAnimationBarTopPartWidth = 6; - cxAnimationBarTopBeginColorLightPercentage = 40; - cxAnimationBarTopEndColorLightPercentage = 80; - cxAnimationBarBorderExtPartColorLightPercentage = 90; - cxAnimationBarBorderIntPartColorLightPercentage = 80; - cxAnimationBarBorderExtPathWidth = 4; - cxAnimationBarBorderIntPathWidth = 20; - cxAnimationBarBackgroundBorderWidth = 8; - -type - { TcxFilterProgressBarHelper } - - TcxFilterProgressBarHelper = class(TcxFilterSpinEditHelper) - public - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - -procedure CalculateCustomProgressBarViewInfo(ACanvas: TcxCanvas; AViewData: TcxCustomProgressBarViewData; - AViewInfo: TcxCustomProgressBarViewInfo); - - procedure CheckFocusRectBounds; - begin - with AViewInfo do - begin - if FocusRect.Left < TextRect.Left - 1 then - FocusRect.Left := TextRect.Left - 1; - if FocusRect.Top < TextRect.Top - 1 then - FocusRect.Top := TextRect.Top - 1; - if FocusRect.Right > TextRect.Right + 1 then - FocusRect.Right := TextRect.Right + 1; - if FocusRect.Bottom > TextRect.Bottom + 1 then - FocusRect.Bottom := TextRect.Bottom + 1; - end; - end; - -begin - with AViewInfo do - begin - if not IsInplace and Focused then - if Length(Text) = 0 then - FocusRect := cxEmptyRect - else - begin - FocusRect := TextRect; - InflateRect(FocusRect, 1, 1); - CheckFocusRectBounds; - end; - end; -end; - -function CalculateDelta(const APositionDelta, ARectWidth, AMaxMinDelta: Double): Integer; -var - ACalc: Double; -begin - ACalc := (APositionDelta * ARectWidth) / AMaxMinDelta; - Result := Trunc(ACalc); -end; - -{ TcxCustomProgressBarViewInfo } - -constructor TcxCustomProgressBarViewInfo.Create; -begin - inherited Create; - FForegroundImage := TBitmap.Create; - ChangedBounds := False; - ChangedBoundsBarRect := False; - FMarquee := False; - FAnimationPath := cxapCycle; - FAnimationRestartDelay := cxProgressBarDefaultAnimationRestartDelay; - FUsualBitmap := TcxBitmap.CreateSize(0, 0, pf32bit); -end; - -destructor TcxCustomProgressBarViewInfo.Destroy; -begin - FreeAndNil(FForegroundImage); - FreeAndNil(FAnimationTimer); - FreeAndNil(FAnimationRestartDelayTimer); - FreeAndNil(FUsualBitmap); - FreeAndNil(FNativeBitmap); - FreeAndNil(FPainterBitmap); - inherited Destroy; -end; - -function TcxCustomProgressBarViewInfo.GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; -begin - Result := inherited GetUpdateRegion(AViewInfo); - if not (AViewInfo is TcxCustomProgressBarViewInfo) then Exit; -end; - -function TcxCustomProgressBarViewInfo.NeedShowHint(ACanvas: TcxCanvas; - const P: TPoint; out AText: TCaption; out AIsMultiLine: Boolean; - out ATextRect: TRect): Boolean; -begin - Result := False; -end; - -procedure TcxCustomProgressBarViewInfo.DrawText(ACanvas: TcxCanvas); -begin - DrawBarCaption(ACanvas); -end; - -function TcxCustomProgressBarViewInfo.GetPercentDone: Integer; -begin - Result := Math.Min(Round(RelativePosition * 100 / MaxMinDiff), 100); -end; - -procedure TcxCustomProgressBarViewInfo.Offset(DX: Integer; DY: Integer); -begin - inherited Offset(DX, DY); - InflateRectEx(BarRect, DX, DY, DX, DY); - InflateRectEx(ProgressBarRect, DX, DY, DX, DY); - InflateRectEx(OverloadBarRect, DX, DY, DX, DY); - InflateRectEx(PeakBarRect, DX, DY, DX, DY); -end; - -procedure TcxCustomProgressBarViewInfo.Paint(ACanvas: TcxCanvas); - - function NeedInvalidate: Boolean; - begin - Result := ChangedBounds or IsDoubleBuffered or (ShowText and (GetDrawText <> '')); - end; - -begin - if ChangedBoundsBarRect then - CreateBarBmp; - - if Assigned(FUsualBitmap) and NeedInvalidate then - begin - if Painter <> nil then - PaintProgressBarByPainter(ACanvas) - else - begin - if not (AreVisualStylesMustBeUsed(NativeStyle, totProgress) or - IsInplace and Transparent) then - DrawCustomEdit(ACanvas, Self, False, bpsSolid); - PaintProgressBar(ACanvas); - end; - end; -end; - -procedure TcxCustomProgressBarViewInfo.PaintProgressBar(ACanvas: TcxCanvas); -var - ALEDsWidth: Integer; - ADrawDelta: Integer; - ABarRect: TRect; - ADrawProgressBarRect: TRect; - ADrawOverloadBarRect: TRect; - ADrawPeakBarRect: TRect; - ADrawAnimationBarRect: TRect; - ASolidRect: TRect; - APrevLogFont: TLogFont; -begin - SaveCanvasFont(ACanvas, APrevLogFont); - try - ADrawDelta := GetDrawDelta; - CalcDrawingParams(ADrawProgressBarRect, ADrawOverloadBarRect, ADrawPeakBarRect, - ADrawAnimationBarRect, ASolidRect, ALEDsWidth); - ABarRect := BarRect; - if IsInplace then - InflateRectEx(ABarRect, -BarRect.Left, -BarRect.Top, -BarRect.Left, -BarRect.Top); - FUsualBitmap.cxCanvas.SaveClipRegion; - try - DrawBackground(FUsualBitmap.cxCanvas, ACanvas, ABarRect); - if FMarquee and not IsInplace then - begin - ExcludeRects(FUsualBitmap.cxCanvas, ASolidRect); - ExcludeRects(FUsualBitmap.cxCanvas, ADrawAnimationBarRect); - ExcludeLEDRects(FUsualBitmap.cxCanvas, ADrawAnimationBarRect); - ASolidRect := ADrawAnimationBarRect; - end - else - begin - ExcludeRects(FUsualBitmap.cxCanvas, ASolidRect); - ExcludeLEDRects(FUsualBitmap.cxCanvas, ASolidRect); - end; - case FBarStyle of - cxbsSolid, cxbsLEDs, cxbsGradient, cxbsGradientLEDs: - begin - if (FBarStyle in [cxbsSolid, cxbsLEDs]) and not NativeStyle then - DrawSolidBar(FUsualBitmap.cxCanvas, ADrawProgressBarRect, ADrawOverloadBarRect) - else - DrawGradientBar(FUsualBitmap.cxCanvas, ADrawProgressBarRect, ADrawOverloadBarRect, ABarRect); - if not IsLEDStyle then - PaintBarBevelOuter(FUsualBitmap.cxCanvas, ASolidRect); - end; - cxbsBitmap, cxbsBitmapLEDs: - if IsGlyphAssigned(FForegroundImage) then - DrawBarBitmap(FUsualBitmap.cxCanvas, ASolidRect); - cxbsAnimation, cxbsAnimationLEDs: - begin - if not (FMarquee and IsDesigning) then - DrawAnimationBarBackground(FUsualBitmap.cxCanvas, ASolidRect, FBeginColor, True); - if not FMarquee then - DrawAnimationBar(FUsualBitmap.cxCanvas, ADrawAnimationBarRect, ASolidRect); - end; - end; - if IsLEDStyle then - DrawBorderLEDs(FUsualBitmap.cxCanvas, ASolidRect, ALEDsWidth); - if not (FBarStyle in [cxbsAnimation, cxbsAnimationLEDs]) then - DrawPeak(FUsualBitmap.cxCanvas, ADrawPeakBarRect); - finally - FUsualBitmap.cxCanvas.RestoreClipRegion; - end; - DrawText(FUsualBitmap.cxCanvas); - cxBitBlt(ACanvas.Canvas.Handle, FUsualBitmap.cxCanvas.Handle, BarRect, cxPoint(ADrawDelta, ADrawDelta), SRCCOPY); - finally - RestoreCanvasFont(ACanvas, APrevLogFont); - end; -end; - -procedure TcxCustomProgressBarViewInfo.PaintProgressBarByPainter(ACanvas: TcxCanvas); -var - AChunkRect: TRect; - AContentRect: TRect; - ARect: TRect; - AVertical: Boolean; - - function CalcRect(AVertical: Boolean; const AContentRect: TRect; - AProgressKf: Double): TRect; - begin - Result := AContentRect; - if AVertical then - Inc(Result.Top, Trunc(RectHeight(Result) * (1 - AProgressKf))) - else - Result.Right := Result.Left + Trunc(RectWidth(Result) * AProgressKf); - end; - - procedure DrawOverload(ACanvas: TcxCanvas); - var - AOverloadRect: TRect; - begin - AOverloadRect := CalcRect(AVertical, AContentRect, RelativeOverloadValue / MaxMinDiff); - if AVertical then - begin - AOverloadRect.Bottom := AOverloadRect.Top; - AOverloadRect.Top := AChunkRect.Top; - end - else - begin - AOverloadRect.Left := AOverloadRect.Right; - AOverloadRect.Right := AChunkRect.Right; - end; - - if not IsRectEmpty(AOverloadRect) then - ACanvas.InvertRect(AOverloadRect); - end; - -begin - ARect := Bounds; - AVertical := Orientation = cxorVertical; - OffsetRect(ARect, -ARect.Left, -ARect.Top); - CreatePainterBitmap; - if not IsInplace then - cxDrawTransparentControlBackground(Edit, FPainterBitmap.cxCanvas, Bounds) - else - cxEditFillRect(FPainterBitmap.cxCanvas, ARect, BackgroundColor); - - ARect := Rect(BarRect.Left - Bounds.Left, BarRect.Top - Bounds.Top, - FPainterBitmap.Width - (Bounds.Right - BarRect.Right), - FPainterBitmap.Height - (Bounds.Bottom - BarRect.Bottom)); - - AContentRect := cxRectContent(ARect, Painter.ProgressBarBorderSize(AVertical)); - if FMarquee and not IsInplace then - AChunkRect := GetCorrectAnimationBarRect - else - AChunkRect := CalcRect(AVertical, AContentRect, RelativePosition / MaxMinDiff); - Painter.DrawProgressBarBorder(FPainterBitmap.cxCanvas, ARect, AVertical); - FPainterBitmap.cxCanvas.SetClipRegion(TcxRegion.Create(AContentRect), roSet); - Painter.DrawProgressBarChunk(FPainterBitmap.cxCanvas, AChunkRect, AVertical); - - if FRealShowOverload then - DrawOverload(FPainterBitmap.cxCanvas); - DrawText(FPainterBitmap.cxCanvas); - cxBitBlt(ACanvas.Handle, FPainterBitmap.cxCanvas.Handle, Bounds, cxNullPoint, SRCCOPY); -end; - -procedure TcxCustomProgressBarViewInfo.CalcDrawingParams(out ADrawProgressBarRect, ADrawOverloadBarRect, - ADrawPeakBarRect, ADrawAnimationBarRect, ASolidRect: TRect; out ALEDsWidth: Integer); -begin - ADrawProgressBarRect := ProgressBarRect; - ADrawOverloadBarRect := OverloadBarRect; - ADrawPeakBarRect := PeakBarRect; - ADrawAnimationBarRect := GetCorrectAnimationBarRect; - - if IsInplace then - begin - InflateRectEx(ADrawProgressBarRect, -BarRect.Left, -BarRect.Top, -BarRect.Left, -BarRect.Top); - InflateRectEx(ADrawOverloadBarRect, -BarRect.Left, -BarRect.Top, -BarRect.Left, -BarRect.Top); - InflateRectEx(ADrawPeakBarRect, -BarRect.Left, -BarRect.Top, -BarRect.Left, -BarRect.Top); - InflateRectEx(ADrawAnimationBarRect, -BarRect.Left, -BarRect.Top, -BarRect.Left, -BarRect.Top); - end; - - ALEDsWidth := CalcLEDsWidth; - - if IsLEDStyle then - AdjustForLEDsBarBounds(ADrawProgressBarRect, ADrawOverloadBarRect, ALEDsWidth); - - if not FRealShowOverload then - ASolidRect := ADrawProgressBarRect - else - if FOrientation = cxorHorizontal then - ASolidRect := Rect(ADrawProgressBarRect.Left, ADrawProgressBarRect.Top, - ADrawOverloadBarRect.Right, ADrawOverloadBarRect.Bottom) - else - ASolidRect := Rect(ADrawOverloadBarRect.Left, ADrawOverloadBarRect.Top, - ADrawProgressBarRect.Right, ADrawProgressBarRect.Bottom); -end; - -function TcxCustomProgressBarViewInfo.CanAnimationBarShow: Boolean; -begin - Result := (((FBarStyle in [cxbsAnimation, cxbsAnimationLEDs]) and not FMarquee) or FMarquee) and - (FAnimationSpeed > 0) and not IsDesigning and not IsInplace; -end; - -procedure TcxCustomProgressBarViewInfo.CreateBarBmp; -var - ADrawDelta: Integer; -begin - ADrawDelta := GetDrawDelta; - FUsualBitmap.SetSize(RectWidth(BarRect) + ADrawDelta, RectHeight(BarRect) + ADrawDelta); - ChangedBoundsBarRect := False; -end; - -procedure TcxCustomProgressBarViewInfo.CreateNativeBitmap(const ASize: TSize); -var - ATheme: TdxTheme; - ACreateNewBitmap: Boolean; - ANativeBitmapRect: TRect; -begin - ACreateNewBitmap := not Assigned(FNativeBitmap); - if not ACreateNewBitmap and - ((FNativeBitmap.Height <> ASize.cy) or (FNativeBitmap.Width <> ASize.cx)) then - ACreateNewBitmap := True; - if not ACreateNewBitmap then - Exit; - if not Assigned(FNativeBitmap) then - FNativeBitmap := TBitmap.Create; - ATheme := OpenTheme(totProgress); - FNativeBitmap.Width := ASize.cx; - FNativeBitmap.Height := ASize.cy; - ANativeBitmapRect := FNativeBitmap.Canvas.ClipRect; - if FOrientation = cxorHorizontal then - begin - ANativeBitmapRect.Left := -4; - DrawThemeBackground(ATheme, FNativeBitmap.Canvas.Handle, PP_CHUNK, 1, - ANativeBitmapRect); - end - else - begin - ANativeBitmapRect.Top := -4; - DrawThemeBackground(ATheme, FNativeBitmap.Canvas.Handle, PP_CHUNKVERT, 1, - ANativeBitmapRect); - end; -end; - -procedure TcxCustomProgressBarViewInfo.CreatePainterBitmap; -begin - if not Assigned(FPainterBitmap) then - FPainterBitmap := TcxBitmap.CreateSize(Bounds, pf32bit) - else - FPainterBitmap.SetSize(Bounds); -end; - -procedure TcxCustomProgressBarViewInfo.ExcludeRects(ACanvas: TcxCanvas; const ABounds: TRect); -begin - if (FBarStyle in [cxbsAnimation, cxbsAnimationLEDs]) and - NativeStyle then - begin - if FOrientation = cxorHorizontal then - begin - ACanvas.ExcludeClipRect(Rect(ABounds.Right, Bounds.Top, Bounds.Right, Bounds.Bottom)); - ACanvas.ExcludeClipRect(Rect(Bounds.Left, Bounds.Top, ABounds.Left, Bounds.Bottom)); - end - else - begin - ACanvas.ExcludeClipRect(Rect(Bounds.Left, Bounds.Top, Bounds.Right, ABounds.Top)); - ACanvas.ExcludeClipRect(Rect(Bounds.Left, ABounds.Bottom, Bounds.Right, Bounds.Bottom)) - end; - end - else - ACanvas.SetClipRegion(TcxRegion.Create(ABounds), roIntersect); -end; -procedure TcxCustomProgressBarViewInfo.ExcludeLEDRects(ACanvas: TcxCanvas; - const ABounds: TRect); -var - I, ALEDsWidth, ALEDsMaxCount: Integer; -begin - ALEDsWidth := CalcLEDsWidth; - if IsLEDStyle then - begin - if FOrientation = cxorHorizontal then - begin - ALEDsMaxCount := RectWidth(ABounds) div ALEDsWidth; - for I := 1 to ALEDsMaxCount do - ACanvas.ExcludeClipRect(Rect(ABounds.Left + I * ALEDsWidth - 2, ABounds.Top, - ABounds.Left + I * ALEDsWidth, ABounds.Bottom)); - end - else - begin - ALEDsMaxCount := RectHeight(ABounds) div ALEDsWidth; - for I := 1 to ALEDsMaxCount do - ACanvas.ExcludeClipRect(Rect(ABounds.Left, ABounds.Bottom - I * ALEDsWidth, - ABounds.Right, ABounds.Bottom - I * ALEDsWidth + 2)); - end; - end; -end; - -function TcxCustomProgressBarViewInfo.GetAnimationTimerInterval: Cardinal; -begin - if FAnimationSpeed <= High(FAnimationSpeed) div 2 then - Result := 30 - else - Result := 30 + (High(FAnimationSpeed) - FAnimationSpeed) * 4; -end; - -function TcxCustomProgressBarViewInfo.GetAnimationOffset: Integer; -begin - if FAnimationSpeed >= High(FAnimationSpeed) div 2 then - Result := 2 - else - Result := 2 + (FAnimationSpeed + High(FAnimationSpeed)) * 2; -end; - -function TcxCustomProgressBarViewInfo.GetMaxMinDiff: Double; -begin - Result := Max - Min; - if Result = 0 then - Result := 1; -end; - -function TcxCustomProgressBarViewInfo.GetRelativeOverloadValue: Double; -begin - Result := OverloadValue - Min; -end; - -function TcxCustomProgressBarViewInfo.GetRelativePeakValue: Double; -begin - Result := PeakValue - Min; -end; - -function TcxCustomProgressBarViewInfo.GetRelativePosition: Double; -begin - if FMarquee then - Result := Max - else - Result := Position - Min; -end; - -function TcxCustomProgressBarViewInfo.IsLEDStyle: Boolean; -begin - Result := FBarStyle in [cxbsLEDs, cxbsGradientLEDs, cxbsBitmapLEDs, - cxbsAnimationLEDs]; -end; - -procedure TcxCustomProgressBarViewInfo.DrawBackground(ACanvas: TcxCanvas; const ACanvasParent: TcxCanvas; const ABounds: TRect); -const - BarThemeTypeMap: array[TcxProgressBarOrientation] of Integer = (PP_BAR, PP_BARVERT); -begin - if PropTransparent then - begin - if not IsInplace then - begin - cxDrawTransparentControlBackground(Edit, ACanvas, Bounds); - end - else - begin - BitBlt(ACanvas.Handle, 0, 0, - ABounds.Right - ABounds.Left, ABounds.Bottom - ABounds.Top, - ACanvasParent.Handle, BarRect.Left, BarRect.Top, SRCCOPY); - end; - end - else - begin - if not (FBarStyle in [cxbsAnimation, cxbsAnimationLEDs]) then - begin - ACanvas.Brush.Style := bsSolid; - ACanvas.FillRect(ABounds, BackgroundColor); - end; - end; - if (NativeStyle or (FBarStyle in [cxbsAnimation, cxbsAnimationLEDs])) and - not IsInplace and not PropTransparent then - begin - if NativeStyle then - DrawThemeBackground(OpenTheme(totProgress), ACanvas.Handle, BarThemeTypeMap[FOrientation], 1, ABounds); - end; - if (FBarStyle in [cxbsAnimation, cxbsAnimationLEDs]) then - begin - if NativeStyle then - ACanvas.SetClipRegion(TcxRegion.CreateRoundCorners(ABounds, 2, 2), roIntersect); - if not PropTransparent then - DrawAnimationBarBackground(ACanvas, ABounds, BackgroundColor, False); - end; -end; - -function TcxCustomProgressBarViewInfo.GetDrawDelta: Integer; -begin - if NativeStyle or IsInplace or (Painter <> nil) then - Result := 0 - else - Result := 2; -end; - -function TcxCustomProgressBarViewInfo.GetDrawText: string; -begin - Result := ''; - case FShowTextStyle of - cxtsPercent: - Result := IntToStr(GetPercentDone) + ' %'; - cxtsPosition: - Result := FloatToStr(FPosition); - cxtsText: - Result := Text; - end; - if FMarquee then - Result := Text; -end; - -function TcxCustomProgressBarViewInfo.GetIsDoubleBuffered: Boolean; -begin - Result := Assigned(Edit) and Edit.DoubleBuffered; -end; - -procedure TcxCustomProgressBarViewInfo.DrawBarCaption(ACanvas: TcxCanvas); -var - ABarRect: TRect; - ABarText: string; - APainter: TcxCustomLookAndFeelPainterClass; - ATextRect: TRect; -begin - if not FShowText then Exit; - ABarRect := BarRect; - if IsInplace then - InflateRectEx(ABarRect, -BarRect.Left, -BarRect.Top, -BarRect.Left, -BarRect.Top); - APainter := Painter; - if APainter = nil then - APainter := TcxStandardLookAndFeelPainter; - ABarText := GetDrawText; - ACanvas.Font.Assign(Font); - ACanvas.Brush.Style := bsClear; - if FTextOrientation = cxorVertical then - ACanvas.SetFontAngle(270); - ATextRect := Rect(0, 0, ACanvas.TextWidth(ABarText), ACanvas.TextHeight(ABarText)); - if FTextOrientation = cxorVertical then - ATextRect := Rect(ATextRect.Top, ATextRect.Left, ATextRect.Bottom, ATextRect.Right); - OffsetRect(ATextRect, - GetDrawDelta + (RectWidth(ABarRect) - RectWidth(ATextRect)) div 2, - GetDrawDelta + (RectHeight(ABarRect) - RectHeight(ATextRect)) div 2); - APainter.DrawProgressBarText(ACanvas, TextOrientation = cxorVertical, - SolidTextColor, ABarText, ATextRect, ABarRect, ProgressBarRect, TextColor); -end; - -procedure TcxCustomProgressBarViewInfo.PaintBarBevelOuter( - ACanvas: TcxCanvas; ABBORect: TRect); -begin - if FBarBevelOuter = cxbvLowered then - begin - DrawEdge(ACanvas.Handle, ABBORect, BDR_SUNKENOUTER, BF_TOPLEFT); - DrawEdge(ACanvas.Handle, ABBORect, BDR_SUNKENOUTER, BF_BOTTOMRIGHT); - end; - if FBarBevelOuter = cxbvRaised then - begin - DrawEdge(ACanvas.Handle, ABBORect, BDR_RAISEDINNER, BF_TOPLEFT); - DrawEdge(ACanvas.Handle, ABBORect, BDR_RAISEDINNER, BF_BOTTOMRIGHT); - end; -end; - -procedure TcxCustomProgressBarViewInfo.DrawBarBitmap(ACanvas: TcxCanvas; ARect: TRect); -begin - ACanvas.Brush.Bitmap := FForegroundImage; - ACanvas.FillRect(ARect); -end; - -procedure TcxCustomProgressBarViewInfo.DrawGradientBar(ACanvas: TcxCanvas; const ANormalRect, AOverloadRect, ABarRect: TRect); -var - ASize: TSize; - R: TRect; -begin - with ACanvas do - begin - if NativeStyle then - begin - if FOrientation = cxorHorizontal then - with ANormalRect do - begin - ASize.cx := 1; - if RectHeight(ANormalRect) < 0 then - ASize.cy := 0 - else - ASize.cy := RectHeight(ANormalRect); - CreateNativeBitmap(ASize); - if not Assigned(FNativeBitmap) then - Exit; - StretchBlt(Handle, ANormalRect.Left, ANormalRect.Top, RectWidth(ANormalRect), - RectHeight(ANormalRect), FNativeBitmap.Canvas.Handle, 0, 0, - FNativeBitmap.Width, FNativeBitmap.Height, SRCCOPY); - end - else - with ANormalRect do - begin - ASize.cy := 1; - if RectWidth(ANormalRect) < 0 then - ASize.cx := 0 - else - ASize.cx := RectWidth(ANormalRect); - CreateNativeBitmap(ASize); - if not Assigned(FNativeBitmap) then - Exit; - StretchBlt(Handle, ANormalRect.Left, ANormalRect.Top, RectWidth(ANormalRect), - RectHeight(ANormalRect), FNativeBitmap.Canvas.Handle, 0, 0, - FNativeBitmap.Width, FNativeBitmap.Height, SRCCOPY); - end; - end - else - if FOrientation = cxorHorizontal then - FillGradientRect(Handle, ABarRect, FBeginColor, FEndColor, True) - else - FillGradientRect(Handle, ABarRect, FEndColor, FBeginColor, False); - - if FRealShowOverload then - begin - R := AOverloadRect; - R.Right := ABarRect.Right; - R.Top := ABarRect.Top; - if FOrientation = cxorHorizontal then - FillGradientRect(Handle, R, FOverloadBeginColor, FOverloadEndColor, True) - else - FillGradientRect(Handle, R, FOverloadEndColor, FOverloadBeginColor, False); - end; - end; -end; - -procedure TcxCustomProgressBarViewInfo.DrawSolidBar(ACanvas: TcxCanvas; const ANormalRect, AOverloadRect: TRect); -begin - with ACanvas do - begin - cxEditFillRect(ACanvas, ANormalRect, FBeginColor); - if FRealShowOverload then - cxEditFillRect(ACanvas, AOverloadRect, FOverloadBeginColor); - end; -end; - -procedure TcxCustomProgressBarViewInfo.DrawAnimationBar(ACanvas: TcxCanvas; const ABar, ASolidRect: TRect); - - procedure LightCanvasByGradient(ACanvas: TcxCanvas; const ARect: TRect; AIsHorizontal: Boolean = True); - var - I: Integer; - ABeginColor: TColor; - AEndColor: TColor; - ACurrentPercentage: Byte; - ADeltaPercentage: Byte; - AWidth: Integer; - begin - if AIsHorizontal then - begin - AWidth := RectWidth(ARect) div 2; - for I := ARect.Top to (ARect.Top + cxAnimationBarTopPartWidth - 1) do - begin - ABeginColor := ACanvas.Canvas.Pixels[ASolidRect.Left + 1, I]; - AEndColor := Light(ABeginColor, cxAnimationBarColorLightPercentage); - FillGradientRect(ACanvas.Handle, Rect(ARect.Left - AWidth, I, - ARect.Left + AWidth - cxAnimationBarMiddlePartWidth div 2, I + 1), - ABeginColor, AEndColor, True); - FillRectByColor(ACanvas.Handle, Rect(ARect.Left + AWidth - cxAnimationBarMiddlePartWidth div 2, - I, ARect.Left + AWidth + cxAnimationBarMiddlePartWidth div 2, I +1), AEndColor); - FillGradientRect(ACanvas.Handle, Rect(ARect.Left + AWidth + cxAnimationBarMiddlePartWidth div 2, - I, ARect.Right + AWidth, I + 1), AEndColor, ABeginColor, True); - end; - ACanvas.SaveClipRegion; - try - ACanvas.SetClipRegion(TcxRegion.Create(Rect(ARect.Left, ARect.Top, - ARect.Right, ARect.Bottom)), roIntersect); - for I := ARect.Left to ARect.Right do - begin - ACurrentPercentage := cxAnimationBarColorLightPercentage; - ADeltaPercentage := 0; - if I < (AWidth + ARect.Left - cxAnimationBarMiddlePartWidth div 2) then - ADeltaPercentage := (100 - cxAnimationBarColorLightPercentage) * - (AWidth + ARect.Left - (cxAnimationBarMiddlePartWidth div 2) - I) div - (AWidth - cxAnimationBarMiddlePartWidth div 2) - else - if I > (AWidth + ARect.Left + cxAnimationBarMiddlePartWidth div 2) then - ADeltaPercentage := (100 - cxAnimationBarColorLightPercentage) * - (I - AWidth - ARect.Left - cxAnimationBarMiddlePartWidth div 2) div - (AWidth - cxAnimationBarMiddlePartWidth div 2); - Inc(ACurrentPercentage, ADeltaPercentage); - ABeginColor := ACanvas.Canvas.Pixels[I, ARect.Top + cxAnimationBarTopPartWidth]; - AEndColor := Light(ABeginColor, ACurrentPercentage); - ACanvas.FillRect(Rect(I, ARect.Top + cxAnimationBarTopPartWidth, I + 1, - ARect.Bottom), AEndColor); - end; - finally - ACanvas.RestoreClipRegion; - end; - end - else - begin - AWidth := RectHeight(ARect) div 2; - for I := ARect.Left to (ARect.Left + cxAnimationBarTopPartWidth - 1) do - begin - ABeginColor := GetPixel(ACanvas.Handle, I, ASolidRect.Bottom - 2); - AEndColor := Light(ABeginColor, cxAnimationBarColorLightPercentage); - FillGradientRect(ACanvas.Handle, Rect(I, ARect.Top - AWidth, I + 1, - ARect.Top + AWidth - cxAnimationBarMiddlePartWidth div 2), ABeginColor, AEndColor, False); - ACanvas.FillRect(Rect(I, ARect.Top + AWidth - cxAnimationBarMiddlePartWidth div 2, - I + 1, ARect.Top + AWidth + cxAnimationBarMiddlePartWidth div 2), AEndColor); - FillGradientRect(ACanvas.Handle, Rect(I, ARect.Top + AWidth + cxAnimationBarMiddlePartWidth div 2, - I + 1, ARect.Bottom + AWidth), AEndColor, ABeginColor, False); - end; - ACanvas.SaveClipRegion; - try - ACanvas.SetClipRegion(TcxRegion.Create(Rect(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom)), roIntersect); - for I := ARect.Top to ARect.Bottom do - begin - ACurrentPercentage := cxAnimationBarColorLightPercentage; - ADeltaPercentage := 0; - if I < (AWidth + ARect.Top - cxAnimationBarMiddlePartWidth div 2) then - ADeltaPercentage := (100 - cxAnimationBarColorLightPercentage) * - (AWidth + ARect.Top - (cxAnimationBarMiddlePartWidth div 2) - I) div - (AWidth - cxAnimationBarMiddlePartWidth div 2) - else - if I > (AWidth + ARect.Top + cxAnimationBarMiddlePartWidth div 2) then - ADeltaPercentage := (100 - cxAnimationBarColorLightPercentage) * - (I - AWidth - ARect.Top - cxAnimationBarMiddlePartWidth div 2) div - (AWidth - cxAnimationBarMiddlePartWidth div 2); - Inc(ACurrentPercentage, ADeltaPercentage); - ABeginColor := ACanvas.Canvas.Pixels[ARect.Left + cxAnimationBarTopPartWidth, I]; - if (ABeginColor < 0) or (ABeginColor >= (1 shl 24)) then - Continue; - AEndColor := Light(ABeginColor, ACurrentPercentage); - ACanvas.FillRect(Rect(ARect.Left + cxAnimationBarTopPartWidth, I, ARect.Right, I + 1), AEndColor); - end; - finally - ACanvas.RestoreClipRegion; - end; - end; - end; - -begin - if not CanAnimationBarShow then - begin - StopAnimationTimer; - Exit; - end; - if not Assigned(FAnimationTimer) then - begin - if FAnimationSpeed > 0 then - StartAnimationTimer; - Exit; - end; - LightCanvasByGradient(ACanvas, ABar, (FOrientation = cxorHorizontal)); -end; - -procedure TcxCustomProgressBarViewInfo.DrawAnimationBarBackground(ACanvas: TcxCanvas; const ASolidRect: TRect; ASolidColor: TColor; ADrawBar: Boolean); -var - ABorderBeginColor, ABorderEndColor: TColor; - ATopBorderBeginColor, ATopBorderEndColor: TColor; - ABorderExtPathWidth, ABorderIntPathWidth, ABorderWidth: Integer; -begin - ATopBorderBeginColor := Light(ASolidColor, cxAnimationBarTopBeginColorLightPercentage); - ATopBorderEndColor := Light(ASolidColor, cxAnimationBarTopEndColorLightPercentage); - ABorderBeginColor := Dark(ASolidColor, cxAnimationBarBorderExtPartColorLightPercentage); - ABorderEndColor := Dark(ASolidColor, cxAnimationBarBorderIntPartColorLightPercentage); - - if ADrawBar then - begin - ABorderExtPathWidth := cxAnimationBarBorderExtPathWidth; - ABorderIntPathWidth := cxAnimationBarBorderIntPathWidth; -end - else - begin - ABorderExtPathWidth := 1; - ABorderIntPathWidth := cxAnimationBarBackgroundBorderWidth; - end; - ABorderWidth := ABorderExtPathWidth + ABorderIntPathWidth; - - with ACanvas do - begin - cxEditFillRect(ACanvas, ASolidRect, ASolidColor); - if FOrientation = cxorHorizontal then - begin - if ADrawBar and (RectWidth(ASolidRect) < 3 * ABorderWidth) then - begin - ABorderExtPathWidth := ABorderExtPathWidth * RectWidth(ASolidRect) div (3 * ABorderWidth); - ABorderIntPathWidth := ABorderIntPathWidth * RectWidth(ASolidRect) div (3 * ABorderWidth); - end; - ABorderWidth := ABorderIntPathWidth + ABorderExtPathWidth; - - with ASolidRect do - begin - FillGradientRect(Handle, Rect(Left, Top, Left + ABorderExtPathWidth, Bottom), - ABorderBeginColor, ABorderEndColor, True); - FillGradientRect(Handle, Rect(Right - ABorderExtPathWidth, Top, Right, Bottom), - ABorderEndColor, ABorderBeginColor, True); - - FillGradientRect(Handle, Rect(Left + ABorderExtPathWidth, Top, Left + ABorderWidth, - Bottom), ABorderEndColor, ASolidColor, True); - FillGradientRect(Handle, Rect(Right - ABorderWidth, Top, Right - ABorderExtPathWidth, Bottom), - ASolidColor, ABorderEndColor, True); - - FillGradientRect(Handle, Rect(Left, Top, Right, Top + cxAnimationBarTopPartWidth), - ATopBorderBeginColor, ATopBorderEndColor, False); - end; - end - else - begin - if RectHeight(ASolidRect) < 3 * ABorderWidth then - begin - ABorderExtPathWidth := ABorderExtPathWidth * RectHeight(ASolidRect) div (3 * ABorderWidth); - ABorderIntPathWidth := ABorderIntPathWidth * RectHeight(ASolidRect) div (3 * ABorderWidth); - end; - ABorderWidth := ABorderIntPathWidth + ABorderExtPathWidth; - - with ASolidRect do - begin - FillGradientRect(Handle, Rect(Left, Top, Right, Top + ABorderExtPathWidth), - ABorderBeginColor, ABorderEndColor, False); - FillGradientRect(Handle, Rect(Left, Bottom - ABorderExtPathWidth, ASolidRect.Right, Bottom), - ABorderEndColor, ABorderBeginColor, False); - - FillGradientRect(Handle, Rect(Left, Top + ABorderExtPathWidth, Right, - Top + ABorderWidth), ABorderEndColor, ASolidColor, False); - FillGradientRect(Handle, Rect(Left, Bottom - ABorderWidth, Right, Bottom - ABorderExtPathWidth), - ASolidColor, ABorderEndColor, False); - - FillGradientRect(Handle, Rect(Left, Top, Left + cxAnimationBarTopPartWidth, - Bottom), ATopBorderBeginColor, ATopBorderEndColor, True); - end; - end; - end; -end; - -function TcxCustomProgressBarViewInfo.CalcLEDsWidth: Integer; -begin - if FOrientation = cxorHorizontal then - begin - Result := Trunc(RectHeight(ProgressBarRect) * 2 / 3) + 2; - if (FBarStyle = cxbsBitmapLEDs) and - Assigned(FForegroundImage) and - (Result > FForegroundImage.Width) and - (FForegroundImage.Width > 0) then - Result := FForegroundImage.Width; - end - else - begin - Result := Trunc(RectWidth(ProgressBarRect) * 2 / 3) + 2; - if (FBarStyle = cxbsBitmapLEDs) and - Assigned(FForegroundImage) and - (Result > FForegroundImage.Height) and - (FForegroundImage.Height > 0) then - Result := FForegroundImage.Height; - end; -end; - -procedure TcxCustomProgressBarViewInfo.AdjustForLEDsBarBounds(var ABarRect, - AOverloadBarRect: TRect; const ALEDsWidth: Integer); -var - ALEDsDelta: Integer; -begin - if FOrientation = cxorHorizontal then - begin - if FRealShowOverload then - begin - ALEDsDelta := RectWidth(ABarRect) mod ALEDsWidth; - Dec(ABarRect.Right, ALEDsDelta); - Dec(AOverloadBarRect.Left, ALEDsDelta); - end; - end - else - begin - if FRealShowOverload then - begin - ALEDsDelta := RectHeight(ABarRect) mod ALEDsWidth; - Inc(ABarRect.Top, ALEDsDelta); - Inc(AOverloadBarRect.Bottom, ALEDsDelta); - end; - end; -end; - -procedure TcxCustomProgressBarViewInfo.DrawPeak(ACanvas: TcxCanvas; const APeakRect: TRect); -begin - if FRealShowPeak = True then - begin - ACanvas.SetClipRegion(TcxRegion.Create(APeakRect), roAdd); - cxEditFillRect(ACanvas, APeakRect, FPeakColor); - end; -end; - -procedure TcxCustomProgressBarViewInfo.DrawBorderLEDs(ACanvas: TcxCanvas; - const ABarRect: TRect; ALEDsWidth: Integer); -var - I, AMaxCount: Integer; -begin - if FBarBevelOuter = cxbvNone then - Exit; - if FOrientation = cxorHorizontal then - begin - AMaxCount := RectWidth(ABarRect) div ALEDsWidth; - for I := 1 to AMaxCount do - begin - PaintBarBevelOuter(ACanvas, Rect(ABarRect.Left + (I - 1) * ALEDsWidth, ABarRect.Top, - ABarRect.Left + I * ALEDsWidth - 2, ABarRect.Bottom)); - end; - if (ABarRect.Left + AMaxCount * ALEDsWidth) < ABarRect.Right then - PaintBarBevelOuter(ACanvas, Rect(ABarRect.Left + AMaxCount * ALEDsWidth, - ABarRect.Top, ABarRect.Right, ABarRect.Bottom)); - end - else - begin - AMaxCount := RectHeight(ABarRect) div ALEDsWidth; - for I := 1 to AMaxCount do - begin - PaintBarBevelOuter(ACanvas, Rect(ABarRect.Left, ABarRect.Bottom - (I - 1) * ALEDsWidth, - ABarRect.Right, ABarRect.Bottom - I * ALEDsWidth + 2)); - end; - if (ABarRect.Bottom - AMaxCount * ALEDsWidth) > ABarRect.Top then - PaintBarBevelOuter(ACanvas, Rect(ABarRect.Left, ABarRect.Bottom - AMaxCount * ALEDsWidth, - ABarRect.Right, ABarRect.Top)); - end; -end; - -procedure TcxCustomProgressBarViewInfo.DoAnimationTimer(Sender: TObject); -begin - if not CanAnimationBarShow then - StopAnimationTimer; - if not Assigned(FAnimationTimer) then Exit; - CalcAnimationCurrentPosition; - Edit.Repaint; -end; - -procedure TcxCustomProgressBarViewInfo.DoAnimationRestartDelayTimer(Sender: TObject); -begin - StopAnimationRestartDelayTimer; -end; - -procedure TcxCustomProgressBarViewInfo.StartAnimationTimer; -begin - if Assigned(FAnimationTimer) then - StopAnimationTimer; - if not CanAnimationBarShow then - Exit; - FAnimationTimer := TcxTimer.Create(nil); - with FAnimationTimer do - begin - Enabled := False; - Interval := GetAnimationTimerInterval; - OnTimer := DoAnimationTimer; - Enabled := True; - end; - SetAnimationFirstPosition; -end; - -procedure TcxCustomProgressBarViewInfo.StartAnimationRestartDelayTimer; -begin - if FAnimationRestartDelayTimer <> nil then - StopAnimationRestartDelayTimer; - if FAnimationRestartDelay = 0 then - Exit; - FAnimationRestartDelayTimer := TcxTimer.Create(nil); - with FAnimationRestartDelayTimer do - begin - Enabled := False; - Interval := AnimationRestartDelay; - OnTimer := DoAnimationRestartDelayTimer; - Enabled := True; - end; -end; - -procedure TcxCustomProgressBarViewInfo.StopAnimationTimer; -begin - FreeAndNil(FAnimationTimer); -end; - -procedure TcxCustomProgressBarViewInfo.StopAnimationRestartDelayTimer; -begin - FreeAndNil(FAnimationRestartDelayTimer); -end; - -procedure TcxCustomProgressBarViewInfo.SetAnimationPath(AValue: TcxProgressBarAnimationPath); -begin - if AValue <> FAnimationPath then - begin - FAnimationPath := AValue; - StartAnimationTimer; - end; -end; - -procedure TcxCustomProgressBarViewInfo.SetAnimationSpeed(AValue: Cardinal); -begin - if AValue <> FAnimationSpeed then - begin - FAnimationSpeed := AValue; - if Assigned(FAnimationTimer) then - begin - FAnimationTimer.Interval := GetAnimationTimerInterval; - if FAnimationSpeed = 0 then - StopAnimationTimer; - end - else - if FAnimationSpeed > 0 then - StartAnimationTimer; - end; -end; - -procedure TcxCustomProgressBarViewInfo.SetMarquee(AValue: Boolean); -begin - if AValue <> FMarquee then - begin - FMarquee := AValue; - StartAnimationTimer; - end; -end; - -procedure TcxCustomProgressBarViewInfo.SetBarStyle( - AValue: TcxProgressBarBarStyle); -begin - if AValue <> FBarStyle then - begin - FBarStyle := AValue; - StartAnimationTimer; - end; -end; - -procedure TcxCustomProgressBarViewInfo.CalcAnimationCurrentPosition; -begin - if FAnimationRestartDelayTimer <> nil then Exit; - Inc(FAnimationPosition, FAnimationDirection * GetAnimationOffset); - case FAnimationPath of - cxapCycle: - if (FAnimationPosition > (GetMaxPositionInBounds + GetAnimationBarDimension div 2)) or - (FAnimationPosition < (GetMinPositionInBounds - GetAnimationBarDimension div 2)) then - begin - SetAnimationFirstPosition; - StartAnimationRestartDelayTimer; - end; - cxapPingPong: - begin - if FAnimationDirection > 0 then - begin - if FAnimationPosition > (GetMaxPositionInBounds - GetAnimationBarDimension div 2) then - begin - FAnimationDirection := -FAnimationDirection; - Dec(FAnimationPosition); - StartAnimationRestartDelayTimer; - end; - end - else - begin - if FAnimationPosition < (GetMinPositionInBounds + GetAnimationBarDimension div 2) then - begin - FAnimationDirection := -FAnimationDirection; - Inc(FAnimationPosition); - StartAnimationRestartDelayTimer; - end; - end; - end; - end; -end; - -procedure TcxCustomProgressBarViewInfo.SetAnimationFirstPosition; -begin - case FAnimationPath of - cxapCycle: - if GetAnimationDerection > 0 then - FAnimationPosition := -GetAnimationBarDimension div 2 - else - FAnimationPosition := GetAnimationBarDimension div 2; - cxapPingPong: - FAnimationPosition := GetAnimationBarDimension div 2; - end; - if FOrientation = cxorHorizontal then - FAnimationDirection := GetAnimationDerection - else - begin - FAnimationDirection := -GetAnimationDerection; - FAnimationPosition := -FAnimationPosition; - end; - if FAnimationDirection > 0 then - Inc(FAnimationPosition, GetMinPositionInBounds) - else - Inc(FAnimationPosition, GetMaxPositionInBounds); -end; - -function TcxCustomProgressBarViewInfo.GetAnimationBarDimension: Integer; -begin - Result := 50; -end; - -function TcxCustomProgressBarViewInfo.GetAnimationDerection: Integer; -begin - Result := 1; -end; - -function TcxCustomProgressBarViewInfo.GetCorrectAnimationBarRect: TRect; -begin - Result := AnimationBarRect; - if FOrientation = cxorHorizontal then - OffsetRect(Result, FAnimationPosition, 0) - else - OffsetRect(Result, 0, FAnimationPosition); -end; - -function TcxCustomProgressBarViewInfo.GetMaxPositionInBounds: Integer; -begin - if FOrientation = cxorHorizontal then - Result := Trunc(RectWidth(Bounds) / GetMaxMinDiff * GetRelativePosition) - else - Result := RectHeight(Bounds); -end; - -function TcxCustomProgressBarViewInfo.GetMinPositionInBounds: Integer; -begin - if FOrientation = cxorHorizontal then - Result := 0 - else - Result := RectHeight(Bounds) - Trunc(RectHeight(Bounds) / GetMaxMinDiff * GetRelativePosition); -end; - -procedure TcxCustomProgressBarViewInfo.SetOrientation( - AValue: TcxProgressBarOrientation); -begin - if AValue <> FOrientation then - begin - FOrientation := AValue; - StartAnimationTimer; - end; -end; - -{ TcxCustomProgressBarViewData } - -procedure TcxCustomProgressBarViewData.CalculateViewInfoProperties(AViewInfo: TcxCustomEditViewInfo); -begin - with TcxCustomProgressBarViewInfo(AViewInfo) do - begin - AnimationPath := Properties.AnimationPath; - AnimationRestartDelay := Properties.AnimationRestartDelay; - AnimationSpeed := Properties.AnimationSpeed; - BeginColor := ColorToRGB(Properties.BeginColor); - EndColor := ColorToRGB(Properties.EndColor); - BarBevelOuter := Properties.BarBevelOuter; - Marquee := Properties.Marquee; - Min := Properties.Min; - Max := Properties.Max; - Orientation := Properties.Orientation; - ShowText := Properties.ShowText; - ShowTextStyle := Properties.ShowTextStyle; - Text := Properties.Text; - TextOrientation := Properties.TextOrientation; - SolidTextColor := Properties.SolidTextColor; - BarStyle := Properties.BarStyle; - BorderWidth := Properties.BorderWidth; - OverloadValue := Properties.OverloadValue; - OverloadBeginColor := ColorToRGB(Properties.OverloadBeginColor); - OverloadEndColor := ColorToRGB(Properties.OverloadEndColor); - ShowOverload := Properties.ShowOverload; - PeakValue := Properties.GetRealPeakValue(Position); - PeakColor := ColorToRGB(Properties.PeakColor); - PeakSize := Properties.PeakSize; - ShowPeak := Properties.ShowPeak; - if IsInplace then - PropTransparent := Transparent - else - PropTransparent := TcxCustomProgressBar(Edit).Transparent; - end; -end; - -procedure TcxCustomProgressBarViewData.Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); -var - FBounds : TRect; - FViewInfo : TcxCustomProgressBarViewInfo; - FRealNativeStyle: Boolean; - FBmp: TBitmap; - AProgressBarRect, ABarRect: TRect; - AOverloadBarRect, APeakBarRect: TRect; -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - if (ABounds.Bottom = MaxInt) or (ABounds.Right = MaxInt) then Exit; // B94428 - FViewInfo := TcxCustomProgressBarViewInfo(AViewInfo); - CalculateViewInfo(FViewInfo, AIsMouseEvent); - FViewInfo.Font := Style.GetVisibleFont; - CalculateViewInfoProperties(AViewInfo); - if AreVisualStylesMustBeUsed(NativeStyle, totProgress) then - begin - FBounds := ABounds; - FRealNativeStyle := True; - ABarRect := ABounds; - if IsInplace then - InflateRectEx(FBounds, (AViewInfo.BorderWidth + 2), (AViewInfo.BorderWidth + 2), - -(AViewInfo.BorderWidth + 2), -(AViewInfo.BorderWidth + 2)) - else - if not (Properties.BarStyle in [cxbsAnimation, cxbsAnimationLEDs]) then - InflateRectEx(FBounds, (AViewInfo.BorderWidth + 3), (AViewInfo.BorderWidth + 3), - -(AViewInfo.BorderWidth + 2), -(AViewInfo.BorderWidth + 2)) - else - InflateRectEx(FBounds, (AViewInfo.BorderWidth + 1), (AViewInfo.BorderWidth + 1), - -(AViewInfo.BorderWidth + 1), -(AViewInfo.BorderWidth + 1)); - AProgressBarRect := FBounds; - end - else - begin - if IsInplace then - ABarRect := ABounds - else - ABarRect := FViewInfo.BorderRect; - FBounds := FViewInfo.BorderRect; - FRealNativeStyle := False; - InflateRect(FBounds, -AViewInfo.BorderWidth, -AViewInfo.BorderWidth); - AProgressBarRect := FBounds; - end; - FViewInfo.NativeStyle := FRealNativeStyle; - CalculateCustomProgressBarViewInfo(ACanvas, Self, FViewInfo); - - if not Properties.Marquee then - begin - if FViewInfo.FOrientation = cxorHorizontal then - AProgressBarRect.Right := FBounds.Left + - CalculateDelta(FViewInfo.Position - FViewInfo.Min, RectWidth(FBounds), - FViewInfo.MaxMinDiff) - else - AProgressBarRect.Top := FBounds.Bottom - - CalculateDelta((FViewInfo.Position - FViewInfo.Min), RectHeight(FBounds), - FViewInfo.MaxMinDiff); - end; - - FViewInfo.FRealShowOverload := False; - if not Properties.Marquee and Properties.ShowOverload and - not FRealNativeStyle and - (FViewInfo.Position >= FViewInfo.OverloadValue) then - begin - FViewInfo.FRealShowOverload := True; - AOverloadBarRect := AProgressBarRect; - if FViewInfo.FOrientation = cxorHorizontal then - begin - AOverloadBarRect.Left := FBounds.Left + - CalculateDelta(FViewInfo.RelativeOverloadValue, RectWidth(FBounds), - FViewInfo.MaxMinDiff); - AOverloadBarRect.Right := Math.Min(AOverloadBarRect.Right, FBounds.Right); - AProgressBarRect.Right := AOverloadBarRect.Left; - end else - begin - AOverloadBarRect.Top := AOverloadBarRect.Bottom - - CalculateDelta(FViewInfo.RelativePosition, RectHeight(FBounds), - FViewInfo.MaxMinDiff); - AOverloadBarRect.Bottom := AOverloadBarRect.Bottom - - CalculateDelta(FViewInfo.RelativeOverloadValue, RectHeight(FBounds), - FViewInfo.MaxMinDiff); - AOverloadBarRect.Bottom := Math.Max(AOverloadBarRect.Bottom, FBounds.Top); - AProgressBarRect.Top := AOverloadBarRect.Bottom; - end; - end; - - FViewInfo.FRealShowPeak := FViewInfo.ShowPeak and not Properties.Marquee; - if FViewInfo.FRealShowPeak then - begin - APeakBarRect := AProgressBarRect; - if FViewInfo.FOrientation = cxorHorizontal then - begin - APeakBarRect.Left := FBounds.Left + - CalculateDelta(FViewInfo.RelativePeakValue, RectWidth(FBounds), - FViewInfo.MaxMinDiff); - APeakBarRect.Left := Math.Min(APeakBarRect.Left, FBounds.Right - FViewInfo.PeakSize); - APeakBarRect.Right := APeakBarRect.Left + FViewInfo.PeakSize; - end - else - begin - APeakBarRect.Bottom := FBounds.Bottom - - CalculateDelta(FViewInfo.RelativePeakValue, RectHeight(FBounds), - FViewInfo.MaxMinDiff); - APeakBarRect.Bottom := Math.Max(APeakBarRect.Bottom, FBounds.Top + FViewInfo.PeakSize); - APeakBarRect.Top := APeakBarRect.Bottom - FViewInfo.PeakSize; - end; - end; - if Properties.ChangedForegroundImage or - (FViewInfo.ForegroundImage.Width <= 0) or - (FViewInfo.ForegroundImage.Height <= 0) then - begin - FViewInfo.ForegroundImage.Assign(Properties.ForegroundImage); - Properties.ChangedForegroundImage := False; - if Properties.TransparentImage then - begin - FBmp := TBitmap.Create; - try - FViewInfo.ForegroundImage.Transparent := True; - FBmp.Width := FViewInfo.ForegroundImage.Width; - FBmp.Height := FViewInfo.ForegroundImage.Height; - FBmp.Canvas.Brush.Color := FViewInfo.BackgroundColor; - FBmp.Canvas.FillRect(FBmp.Canvas.ClipRect); - FBmp.Canvas.Draw(0, 0, FViewInfo.ForegroundImage); - FViewInfo.ForegroundImage.Assign(FBmp); - finally - FBmp.Free; - end; - end; - end; - - with FViewInfo do - if Properties.Orientation = cxorHorizontal then - begin - AnimationBarRect.Left := AProgressBarRect.Left; - AnimationBarRect.Top := AProgressBarRect.Top; - AnimationBarRect.Right := AProgressBarRect.Left + GetAnimationBarDimension; - AnimationBarRect.Bottom := AProgressBarRect.Bottom; - OffsetRect(AnimationBarRect, -GetAnimationBarDimension div 2, 0); - end - else - begin - AnimationBarRect.Left := AProgressBarRect.Left; - AnimationBarRect.Top := Bounds.Top; - AnimationBarRect.Right := AProgressBarRect.Right; - AnimationBarRect.Bottom := AnimationBarRect.Top + GetAnimationBarDimension; - OffsetRect(AnimationBarRect, 0, -GetAnimationBarDimension div 2); - end; - if not IsInplace then FViewInfo.DrawSelectionBar := False; - - if Properties.ChangedPosition and not AIsMouseEvent and - cxRectCompare(AProgressBarRect, FViewInfo.ProgressBarRect) and - cxRectCompare(ABarRect, FViewInfo.BarRect) and - (not FViewInfo.FRealShowOverload or cxRectCompare(AOverloadBarRect, FViewInfo.OverloadBarRect)) and - (not FViewInfo.FRealShowPeak or cxRectCompare(APeakBarRect, FViewInfo.PeakBarRect)) then - begin - FViewInfo.ChangedBounds := False; - end - else - begin - FViewInfo.ProgressBarRect := AProgressBarRect; - if not cxRectCompare(FViewInfo.BarRect, ABarRect) then - begin - FViewInfo.BarRect := ABarRect; - FViewInfo.ChangedBoundsBarRect := True; - end; - FViewInfo.OverloadBarRect := AOverloadBarRect; - FViewInfo.PeakBarRect := APeakBarRect; - FViewInfo.ChangedBounds := True; - end; - Properties.ChangedPosition := False; -end; - -procedure TcxCustomProgressBarViewData.CalculateButtonsViewInfo(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); -begin -end; - -procedure TcxCustomProgressBarViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -var - ADisplayValue: TcxEditValue; -begin - CalculateCustomProgressBarViewInfo(ACanvas, Self, - TcxCustomProgressBarViewInfo(AViewInfo)); - if PreviewMode then - Properties.PrepareDisplayValue(30, ADisplayValue, InternalFocused) - else - Properties.PrepareDisplayValue(AEditValue, ADisplayValue, InternalFocused); - TcxCustomProgressBarViewInfo(AViewInfo).Position := ADisplayValue; - Properties.CorrectPositionWithMaxMin(TcxCustomProgressBarViewInfo(AViewInfo)); -end; - -function TcxCustomProgressBarViewData.InternalGetEditConstantPartSize(ACanvas: TcxCanvas; - AIsInplace: Boolean; AEditSizeProperties: TcxEditSizeProperties; - var MinContentSize: TSize; AViewInfo: TcxCustomEditViewInfo): TSize; -var - APrevLogFont: TLogFont; - ASize1, ASize2: TSize; - AText: string; -begin - SaveCanvasFont(ACanvas, APrevLogFont); - try - Result := inherited InternalGetEditConstantPartSize(ACanvas, AIsInplace, - AEditSizeProperties, MinContentSize, AViewInfo); - - with TcxCustomProgressBarViewInfo(AViewInfo) do - begin - ASize1.cx := RectWidth(ProgressBarRect); - - if not(IsInplace or - AreVisualStylesMustBeUsed(AViewInfo.NativeStyle, totButton)) then - ASize1.cx := ASize1.cx + 4; - - AText := ''; - ASize2 := GetTextEditContentSize(ACanvas, Self, AText, - DrawTextFlagsTocxTextOutFlags(cxTextOutFlagsToDrawTextFlags(GetDrawTextFlags) and - not(CXTO_CENTER_VERTICALLY or CXTO_BOTTOM) or CXTO_TOP), AEditSizeProperties, 0, False); - ASize2.cx := ASize2.cx + 3; - ASize1.cx := ASize1.cx + ASize2.cx; - ASize1.cy := ASize2.cy; - end; - Result.cx := Result.cx + ASize1.cx; - Result.cy := Result.cy + ASize1.cy; - finally - RestoreCanvasFont(ACanvas, APrevLogFont); - end; -end; - -function TcxCustomProgressBarViewData.GetDrawTextFlags: Integer; -begin - Result := 0; -end; - -function TcxCustomProgressBarViewData.GetIsEditClass: Boolean; -begin - Result := False; -end; - -function TcxCustomProgressBarViewData.GetProperties: TcxCustomProgressBarProperties; -begin - Result := TcxCustomProgressBarProperties(FProperties); -end; - -{ TProgressBarPropertiesValues } - -function TcxProgressBarPropertiesValues.GetMax: Boolean; -begin - Result := MaxValue; -end; - -function TcxProgressBarPropertiesValues.GetMin: Boolean; -begin - Result := MinValue; -end; - -function TcxProgressBarPropertiesValues.IsMaxStored: Boolean; -begin - Result := Max and (TcxCustomProgressBarProperties(Properties).Max = 0); -end; - -function TcxProgressBarPropertiesValues.IsMinStored: Boolean; -begin - Result := Min and (TcxCustomProgressBarProperties(Properties).Min = 0); -end; - -procedure TcxProgressBarPropertiesValues.SetMax(Value: Boolean); -begin - MaxValue := Value; -end; - -procedure TcxProgressBarPropertiesValues.SetMin(Value: Boolean); -begin - MinValue := Value; -end; - -{ TcxCustomProgressBarProperties } - -constructor TcxCustomProgressBarProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); -// FCurrentPosition := 0; - FAnimationPath := cxapCycle; - FAnimationRestartDelay := cxProgressBarDefaultAnimationRestartDelay; - FChangedForegroundImage := False; - FChangedPosition := False; - FBeginColor := clNavy; - FEndColor := clWhite; - FBarBevelOuter := cxbvNone; - FPeakValue := 0; - FOverloadValue := 80; - FPeakSize := 2; - FOrientation := cxorHorizontal; - FShowText := True; - FShowTextStyle := cxDefaultShowTextStyle; - FTextOrientation := cxorHorizontal; - FSolidTextColor := False; - FBarStyle := cxbsSolid; - FTransparentImage := True; - FMarquee := False; - FOverloadValue := 80; - FBorderWidth := 0; - FShowOverload := False; - FOverloadBeginColor := $008080FF; - FOverloadEndColor := clFuchsia; - FShowPeak := False; - FPeakColor := clRed; - FAnimationSpeed := cxProgressBarDefaultAnimationSpeed; - FText := ''; -end; - -destructor TcxCustomProgressBarProperties.Destroy; -begin - if FForegroundImage <> nil then - FreeAndNil(FForegroundImage); - inherited Destroy; -end; - -procedure TcxCustomProgressBarProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomProgressBarProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomProgressBarProperties do - begin - Self.AnimationPath := AnimationPath; - Self.AnimationRestartDelay := AnimationRestartDelay; - Self.BeginColor := BeginColor; - Self.BarBevelOuter := BarBevelOuter; - Self.EndColor := EndColor; - Self.ForegroundImage := ForegroundImage; - Self.Marquee := Marquee; - Self.Min := Min; - Self.Max := Max; - Self.Orientation := Orientation; - Self.ShowText := ShowText; - Self.ShowTextStyle := ShowTextStyle; - Self.TextOrientation := TextOrientation; - Self.SolidTextColor := SolidTextColor; - Self.BarStyle := BarStyle; - Self.TransparentImage := TransparentImage; - Self.BorderWidth := BorderWidth; - Self.OverloadValue := OverloadValue; - Self.ShowOverload := ShowOverload; - Self.OverloadBeginColor := OverloadBeginColor; - Self.OverloadEndColor := OverloadEndColor; - Self.PeakValue := PeakValue; - Self.ShowPeak := ShowPeak; - Self.PeakColor := PeakColor; - Self.PeakSize := PeakSize; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomProgressBarProperties.CanCompareEditValue: Boolean; -begin - Result := True; -end; - -class function TcxCustomProgressBarProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxProgressBar; -end; - -function TcxCustomProgressBarProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -var - ADisplayValue: TcxEditValue; - AViewInfo: TcxCustomProgressBarViewInfo; -begin - PrepareDisplayValue(AEditValue, ADisplayValue, False); - AViewInfo := TcxCustomProgressBarViewInfo.Create; - try - AViewInfo.Position := ADisplayValue; - CorrectPositionWithMaxMin(AViewInfo); - AViewInfo.Min := Min; - AViewInfo.Max := Max; - AViewInfo.Marquee := Marquee; - AViewInfo.ShowTextStyle := ShowTextStyle; - AViewInfo.Text := Text; - Result := AViewInfo.GetDrawText; - finally - AViewInfo.Free; - end; -end; - -function TcxCustomProgressBarProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := [esoAlwaysHotTrack, esoFiltering, esoSorting]; -end; - -class function TcxCustomProgressBarProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomProgressBarViewInfo; -end; - -function TcxCustomProgressBarProperties.IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; -begin - Result := inherited IsEditValueValid(EditValue, AEditFocused); -end; - -procedure TcxCustomProgressBarProperties.PrepareDisplayValue(const AEditValue: - TcxEditValue; var DisplayValue: TcxEditValue; AEditFocused: Boolean); -var - AValue: Double; - ACode: Integer; -begin - DisplayValue := 0; - if VarIsStr(AEditValue) then - begin - Val(VarToStr(AEditValue), AValue, ACode); - if ACode = 0 then - DisplayValue := AValue; - end - else - if VarIsNumericEx(AEditValue) or VarIsDate(AEditValue) then - DisplayValue := AEditValue; -end; - -procedure TcxCustomProgressBarProperties.CorrectPositionWithMaxMin( - AViewInfo: TcxCustomProgressBarViewInfo); -begin - if Min < Max then - AViewInfo.Position := Math.Min(Math.Max(AViewInfo.Position, Min), Max); -end; - -class function TcxCustomProgressBarProperties.GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; -begin - Result := TcxProgressBarPropertiesValues; -end; - -function TcxCustomProgressBarProperties.GetMaxValue: Double; -begin - if AssignedValues.Max then - Result := inherited GetMaxValue - else - Result := 100; -end; - -function TcxCustomProgressBarProperties.GetMinValue: Double; -begin - if AssignedValues.Min then - Result := inherited GetMinValue - else - Result := 0; -end; - -class function TcxCustomProgressBarProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomProgressBarViewData; -end; - -function TcxCustomProgressBarProperties.HasDisplayValue: Boolean; -begin - Result := True; -end; - -function TcxCustomProgressBarProperties.GetAssignedValues: TcxProgressBarPropertiesValues; -begin - Result := TcxProgressBarPropertiesValues(FAssignedValues); -end; - -function TcxCustomProgressBarProperties.GetForegroundImage: TBitmap; -begin - if FForegroundImage = nil then - begin - FForegroundImage := TBitmap.Create; - FForegroundImage.OnChange := ForegroundImageChanged; - end; - Result := FForegroundImage; -end; - -procedure TcxCustomProgressBarProperties.ForegroundImageChanged(Sender: TObject); -begin - Changed; -end; - -function TcxCustomProgressBarProperties.GetMax: Double; -begin - Result := MaxValue; -end; - -function TcxCustomProgressBarProperties.GetMin: Double; -begin - Result := MinValue; -end; - -function TcxCustomProgressBarProperties.GetOverloadValueStored: Boolean; -begin - Result := FOverloadValue <> 80; -end; - -function TcxCustomProgressBarProperties.GetPeakValueStored: Boolean; -begin - Result := FPeakValue <> 0; -end; - -procedure TcxCustomProgressBarProperties.SetAnimationPath(AValue: TcxProgressBarAnimationPath); -begin - if AValue <> FAnimationPath then - begin - FAnimationPath := AValue; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetAnimationRestartDelay(AValue: Cardinal); -begin - if AValue <> FAnimationRestartDelay then - begin - FAnimationRestartDelay := AValue; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetAnimationSpeed(AValue: TcxProgressBarAnimationSpeed); -begin - if AValue < Low(AValue) then - AValue := Low(AValue); - if AValue > High(AValue) then - AValue := High(AValue); - if AValue <> FAnimationSpeed then - begin - FAnimationSpeed := AValue; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetAssignedValues( - Value: TcxProgressBarPropertiesValues); -begin - FAssignedValues.Assign(Value); -end; - -procedure TcxCustomProgressBarProperties.SetBeginColor(Value: TColor); -begin - if FBeginColor <> Value then - begin - FBeginColor := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetBarBevelOuter(Value: TcxProgressBarBevelOuter); -begin - if FBarBevelOuter <> Value then - begin - FBarBevelOuter := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetColorVista; -begin - FBeginColor := $D328; -end; - -procedure TcxCustomProgressBarProperties.SetEndColor(Value: TColor); -begin - if Value <> FEndColor then - begin - FEndColor := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetForegroundImage(Value: TBitmap); -begin - if Value = nil then - FreeAndNil(FForegroundImage) - else - ForegroundImage.Assign(Value); - ChangedForegroundImage := True; - Changed; -end; - -procedure TcxCustomProgressBarProperties.SetMarquee(Value: Boolean); -begin - if Value <> FMarquee then - begin - FMarquee := Value; - if FMarquee then - ShowTextStyle := cxtsText; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetMax(Value: Double); -begin - MaxValue := Value; - PostMaxValue; -end; - -procedure TcxCustomProgressBarProperties.SetMin(Value: Double); -begin - MinValue := Value; - PostMinValue; -end; - -procedure TcxCustomProgressBarProperties.SetOverloadValue(Value: Double); -begin - if FOverloadValue <> Value then - begin - FOverloadValue := Value; - PostOverloadValue; - Changed; - end; -end; - -function TcxCustomProgressBarProperties.GetRealPeakValue(APosition: Double): Double; -begin - Result := Math.Max(Math.Min(Math.Max(FPeakValue, Min), Max), APosition); - FPeakValue := Math.Max(FPeakValue, Result); -end; - -function TcxCustomProgressBarProperties.IsMaxStored: Boolean; -begin - Result := IsMaxValueStored; -end; - -function TcxCustomProgressBarProperties.IsMinStored: Boolean; -begin - Result := IsMinValueStored; -end; - -function TcxCustomProgressBarProperties.IsShowTextStyleStored: Boolean; -begin - Result := not Marquee and (FShowTextStyle <> cxDefaultShowTextStyle); -end; - -procedure TcxCustomProgressBarProperties.SetPeakValue(Value: Double); -begin - if FPeakValue <> Value then - begin - FPeakValue := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.PostMinValue; -begin - if Min > Max then Max := Min; -// if FCurrentPosition < FMin then FCurrentPosition := FMin; - if FOverloadValue < Min then FOverloadValue := Min; - if FPeakValue < Min then FPeakValue := Min; -end; - -procedure TcxCustomProgressBarProperties.PostMaxValue; -begin - if Min > Max then Min := Max; -// if FCurrentPosition > FMax then FCurrentPosition := FMax; - if FOverloadValue > Max then FOverloadValue := Max; - if FPeakValue > Max then FPeakValue := Max; -end; - -procedure TcxCustomProgressBarProperties.PostOverloadValue; -begin - if FOverloadValue < Min then - FOverloadValue := Min; - if FOverloadValue > Max then - FOverloadValue := Max; -end; - -procedure TcxCustomProgressBarProperties.SetOrientation(Value: TcxProgressBarOrientation); -begin - if FOrientation <> Value then - begin - FOrientation := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetShowText(Value: Boolean); -begin - if FShowText <> Value then - begin - FShowText := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetShowTextStyle(Value: TcxProgressBarTextStyle); -begin - if (FShowTextStyle <> Value) and (not Marquee or (Marquee and (Value = cxtsText))) then - begin - FShowTextStyle := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetTextOrientation(Value: TcxProgressBarOrientation); -begin - if FTextOrientation <> Value then - begin - FTextOrientation := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetSolidTextColor(Value: Boolean); -begin - if FSolidTextColor <> Value then - begin - FSolidTextColor := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetBarStyle(Value: TcxProgressBarBarStyle); -begin - if FBarStyle <> Value then - begin - FBarStyle := Value; - if FBarStyle in [cxbsAnimation, cxbsAnimationLEDs] then - SetColorVista; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetText(const AValue: string); -begin - if FText <> AValue then - begin - FText := AValue; - if Length(FText) > 0 then - ShowTextStyle := cxtsText; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetTransparentImage(Value: Boolean); -begin - if FTransparentImage <> Value then - begin - FTransparentImage := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetBorderWidth(Value: TcxBorderWidth); -begin - if FBorderWidth <> Value then - begin - FBorderWidth := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetShowOverload(Value: Boolean); -begin - if FShowOverload <> Value then - begin - FShowOverload := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetOverloadBeginColor(Value: TColor); -begin - if FOverloadBeginColor <> Value then - begin - FOverloadBeginColor := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetOverloadEndColor(Value: TColor); -begin - if FOverloadEndColor <> Value then - begin - FOverloadEndColor := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetShowPeak(Value: Boolean); -begin - if FShowPeak <> Value then - begin - FShowPeak := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetPeakColor(Value: TColor); -begin - if FPeakColor <> Value then - begin - FPeakColor := Value; - Changed; - end; -end; - -procedure TcxCustomProgressBarProperties.SetPeakSize(Value: TcxNaturalNumber); -begin - if FPeakSize <> Value then - begin - FPeakSize := Value; - Changed; - end; -end; - -{ TcxCustomProgressBar } - -class function TcxCustomProgressBar.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomProgressBarProperties; -end; - -procedure TcxCustomProgressBar.CheckEditorValueBounds; -var - AValue: Variant; -begin - KeyboardAction := True; - try - with ActiveProperties do - if Min < Max then - begin - PrepareDisplayValue(FEditValue, AValue, Focused); - if AValue < Min then - InternalSetEditValue(Min, False) - else - if AValue > Max then - InternalSetEditValue(Max, False); - end; - finally - KeyboardAction := False; - end; -end; - -procedure TcxCustomProgressBar.CheckEditValue; -begin - if not(IsInplace or IsDBEdit or PropertiesChangeLocked) then - CheckEditorValueBounds; -end; - -function TcxCustomProgressBar.DefaultParentColor: Boolean; -begin - Result := True; -end; - -procedure TcxCustomProgressBar.FillSizeProperties(var AEditSizeProperties: TcxEditSizeProperties); -begin - AEditSizeProperties := DefaultcxEditSizeProperties; - AEditSizeProperties.MaxLineCount := 1; - AEditSizeProperties.Width := ViewInfo.TextRect.Right - ViewInfo.TextRect.Left; -end; - -procedure TcxCustomProgressBar.Initialize; -begin - inherited Initialize; - ControlStyle := ControlStyle - [csDoubleClicks, csCaptureMouse, csClickEvents]; - Width := 121; - Height := 21; -end; - -function TcxCustomProgressBar.InternalGetNotPublishedStyleValues: TcxEditStyleValues; -begin - Result := inherited InternalGetNotPublishedStyleValues; - Include(Result, svHotTrack); -end; - -procedure TcxCustomProgressBar.SynchronizeDisplayValue; -var - ADisplayValue: TcxEditValue; -begin - ActiveProperties.PrepareDisplayValue(FEditValue, ADisplayValue, Focused); - TcxCustomProgressBarViewInfo(ViewInfo).Position := ADisplayValue; - if ActiveProperties.Transparent then - Invalidate; -// if not (IsInplace and (ActiveProperties.ShowTextStyle = cxtsPosition)) then - ActiveProperties.CorrectPositionWithMaxMin(ViewInfo); - ShortRefreshContainer(False); - //Invalidate; -end; - -procedure TcxCustomProgressBar.PropertiesChanged(Sender: TObject); -begin - CheckEditValue; -// if not (IsInplace and (ActiveProperties.ShowTextStyle = cxtsPosition)) then - ActiveProperties.CorrectPositionWithMaxMin(ViewInfo); - inherited PropertiesChanged(Sender); - if ActiveProperties.Transparent then - Invalidate; -end; - -function TcxCustomProgressBar.CanFocus: Boolean; -begin - Result := IsInplace; -end; - -function TcxCustomProgressBar.CanFocusOnClick: Boolean; -begin - Result := inherited CanFocusOnClick and IsInplace; -end; - -function TcxCustomProgressBar.GetEditStateColorKind: TcxEditStateColorKind; -begin - Result := cxEditStateColorKindMap[Enabled]; -end; - -function TcxCustomProgressBar.GetPercentDone: Integer; -begin - Result := ViewInfo.GetPercentDone; -end; - -function TcxCustomProgressBar.GetPosition: Double; -begin - Result := ViewInfo.Position; -end; - -function TcxCustomProgressBar.GetPositionStored: Boolean; -begin - Result := ViewInfo.Position <> 0; -end; - -function TcxCustomProgressBar.GetProperties: TcxCustomProgressBarProperties; -begin - Result := TcxCustomProgressBarProperties(FProperties); -end; - -function TcxCustomProgressBar.GetActiveProperties: TcxCustomProgressBarProperties; -begin - Result := TcxCustomProgressBarProperties(InternalGetActiveProperties); -end; - -function TcxCustomProgressBar.GetViewInfo: TcxCustomProgressBarViewInfo; -begin - Result := TcxCustomProgressBarViewInfo(FViewInfo); -end; - -procedure TcxCustomProgressBar.SetProperties( - Value: TcxCustomProgressBarProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomProgressBar.SetPosition(Value: Double); -begin - if Value = ViewInfo.Position then - Exit; - ActiveProperties.ChangedPosition := True; - with ActiveProperties do - if (not IsLoading) and (Min < Max) then - Value := Math.Min(Math.Max(Value, Min), Max); - EditValue := Value; -end; - -{ TcxProgressBar } - -class function TcxProgressBar.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxProgressBarProperties; -end; - -function TcxProgressBar.GetActiveProperties: TcxProgressBarProperties; -begin - Result := TcxProgressBarProperties(InternalGetActiveProperties); -end; - -function TcxProgressBar.GetProperties: TcxProgressBarProperties; -begin - Result := TcxProgressBarProperties(FProperties); -end; - -procedure TcxProgressBar.SetProperties(Value: TcxProgressBarProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterProgressBarHelper } - -class procedure TcxFilterProgressBarHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - with TcxCustomSpinEditProperties(AProperties) do - begin - Buttons.Add; - Buttons.Add; - MinValue := TcxCustomProgressBarProperties(AEditProperties).Min; - MaxValue := TcxCustomProgressBarProperties(AEditProperties).Max; - end; -end; - -initialization - GetRegisteredEditProperties.Register(TcxProgressBarProperties, scxSEditRepositoryProgressBarItem); - FilterEditsController.Register(TcxProgressBarProperties, TcxFilterProgressBarHelper); - -finalization - FilterEditsController.Unregister(TcxProgressBarProperties, TcxFilterProgressBarHelper); - GetRegisteredEditProperties.Unregister(TcxProgressBarProperties); - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxPropertiesConverters.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxPropertiesConverters.pas deleted file mode 100644 index f14228ac..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxPropertiesConverters.pas +++ /dev/null @@ -1,922 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxPropertiesConverters; - -{$I cxVer.inc} - -interface - -uses - cxCustomConverter, cxBlobEdit, StdCtrls, cxConverterUtils, cxImage, cxButtonEdit, - cxEdit, Classes, Graphics, cxCalc, cxCheckBox, cxDropDownEdit, cxCurrencyEdit, - cxCalendar, cxDBLookupComboBox, cxHyperLinkEdit, cxImageComboBox, Controls, SysUtils, - cxMaskEdit, cxMemo, cxMRUEdit, cxSpinEdit, cxTextEdit, cxTimeEdit; - -type - { TcxCustomPropertiesConverter } - TcxCustomPropertiesConverter = class(TcxCustomConverter) - protected - function ConvertPictureTransparency(const AValue: string): TcxImageTransparency; - function ConvertVertAlignment(const AVertAlignment: string): TcxEditVertAlignment; - end; - - { TcxBlobEditPropertiesConverter } - TcxBlobEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function ConvertBlobEditKind(const AKind: string): TcxBlobEditKind; - function ConvertBlobPaintStyle(const AStyle: string): TcxBlobPaintStyle; - function GetDestination: TcxBlobEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxBlobEditProperties read GetDestination; - end; - - { TcxButtonEditPropertiesConverter } - TcxButtonEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function ConvertButtonKind(const AButtonKind: string): TcxEditButtonKind; - function GetDestination: TcxButtonEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxButtonEditProperties read GetDestination; - end; - - { TcxCalcEditPropertiesConverter } - TcxCalcEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxCalcEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxCalcEditProperties read GetDestination; - end; - - { TcxCheckBoxPropertiesConverter } - TcxCheckBoxPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function ConvertNullFieldStyle(const AValue: string): TcxCheckBoxNullValueShowingStyle; - function GetDestination: TcxCheckBoxProperties; - protected - procedure DoImport; override; - public - property Destination: TcxCheckBoxProperties read GetDestination; - end; - - { TcxComboBoxPropertiesConverter } - TcxComboBoxPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxComboBoxProperties; - protected - procedure DoImport; override; - public - property Destination: TcxComboBoxProperties read GetDestination; - end; - - { TcxCurrencyEditPropertiesConverter } - TcxCurrencyEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxCurrencyEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxCurrencyEditProperties read GetDestination; - end; - - { TcxDateEditPropertiesConverter } - TcxDateEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxDateEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxDateEditProperties read GetDestination; - end; - - { TcxHyperLinkEditPropertiesConverter } - TcxHyperLinkEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxHyperLinkEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxHyperLinkEditProperties read GetDestination; - end; - - { TcxImagePropertiesConverter } - TcxImagePropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxImageProperties; - protected - procedure DoImport; override; - public - property Destination: TcxImageProperties read GetDestination; - end; - - { TcxImageComboBoxPropertiesConverter } - TcxImageComboBoxPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxImageComboBoxProperties; - protected - procedure DoImport; override; - public - property Destination: TcxImageComboBoxProperties read GetDestination; - end; - - { TcxLookupComboBoxPropertiesConverter } - TcxLookupComboBoxPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxLookupComboBoxProperties; - protected - procedure DoImport; override; - public - property Destination: TcxLookupComboBoxProperties read GetDestination; - end; - - { TcxMaskEditPropertiesConverter } - TcxMaskEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxMaskEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxMaskEditProperties read GetDestination; - end; - - { TcxMemoPropertiesConverter } - TcxMemoPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxMemoProperties; - protected - procedure DoImport; override; - public - property Destination: TcxMemoProperties read GetDestination; - end; - - { TcxMRUEditPropertiesConverter } - TcxMRUEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxMRUEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxMRUEditProperties read GetDestination; - end; - - { TcxPopupEditPropertiesConverter } - TcxPopupEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxPopupEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxPopupEditProperties read GetDestination; - end; - - { TcxSpinEditPropertiesConverter } - TcxSpinEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxSpinEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxSpinEditProperties read GetDestination; - end; - - { TcxTextEditPropertiesConverter } - TcxTextEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function GetDestination: TcxTextEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxTextEditProperties read GetDestination; - end; - - { TcxTimeEditPropertiesConverter } - TcxTimeEditPropertiesConverter = class(TcxCustomPropertiesConverter) - private - function ConvertTimeFormat(const AFormat: string): TcxTimeEditTimeFormat; - function GetDestination: TcxTimeEditProperties; - protected - procedure DoImport; override; - public - property Destination: TcxTimeEditProperties read GetDestination; - end; - -implementation - -uses - ImgList; - -type - TcxButtonEditPropertiesAccess = class(TcxButtonEditProperties); - -{ TcxCustomPropertiesConverter } - -function TcxCustomPropertiesConverter.ConvertPictureTransparency( - const AValue: string): TcxImageTransparency; -begin - if AValue = 'gtDefault' then - Result := gtDefault - else if AValue = 'gtOpaque' then - Result := gtOpaque - else if AValue = 'gtTransparent' then - Result := gtTransparent - else - Result := gtDefault; -end; - -function TcxCustomPropertiesConverter.ConvertVertAlignment(const AVertAlignment: string): TcxEditVertAlignment; -begin - if AVertAlignment = 'tlCenter' then - Result := taVCenter - else if AVertAlignment = 'tlTop' then - Result := taTopJustify - else if AVertAlignment = 'tlBottom' then - Result := taBottomJustify - else - Result := taVCenter; -end; - -{ TcxBlobEditPropertiesConverter } - -procedure TcxBlobEditPropertiesConverter.DoImport; -begin - with Destination do - begin - AlwaysSaveData := GetBooleanProperty(Source, 'AlwaysSaveText', AlwaysSaveData); - BlobEditKind := ConvertBlobEditKind(GetEnumProperty(Source, 'BlobKind')); - BlobPaintStyle := ConvertBlobPaintStyle(GetEnumProperty(Source, 'BlobPaintStyle')); - MemoCharCase := ConvertCharCase(GetEnumProperty(Source, 'MemoCharCase')); - MemoMaxLength := GetIntegerProperty(Source, 'MemoMaxLength', MemoMaxLength); - MemoOEMConvert := GetBooleanProperty(Source, 'MemoOEMConvert', MemoOEMConvert); - MemoScrollBars := ConvertScrollStyle(GetEnumProperty(Source, 'MemoScrollBars')); - MemoWantReturns := GetBooleanProperty(Source, 'MemoWantReturns', MemoWantReturns); - MemoWantTabs := GetBooleanProperty(Source, 'MemoWantTabs', MemoWantTabs); - MemoWordWrap := GetBooleanProperty(Source, 'MemoWordWrap', MemoWordWrap); - PictureAutoSize := GetBooleanProperty(Source, 'PictureAutoSize', PictureAutoSize); - PictureFilter := GetStringProperty(Source, 'PictureFilter', PictureFilter); - PictureTransparency := ConvertPictureTransparency(GetEnumProperty(Source, 'PictureTransparency')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - ShowExPopupItems := GetBooleanProperty(Source, 'ShowExPopupItems', ShowExPopupItems); - ShowPicturePopup := GetBooleanProperty(Source, 'ShowPicturePopup', ShowPicturePopup); - end; - inherited DoImport; -end; - -function TcxBlobEditPropertiesConverter.ConvertBlobEditKind( - const AKind: string): TcxBlobEditKind; -begin - if AKind = 'bkAuto' then - Result := bekAuto - else if AKind = 'bkBlob' then - Result := bekBlob - else if AKind = 'bkMemo' then - Result := bekMemo - else if AKind = 'bkOle' then - Result := bekOle - else if AKind = 'bkPict' then - Result := bekPict - else - Result := bekAuto; -end; - -function TcxBlobEditPropertiesConverter.ConvertBlobPaintStyle( - const AStyle: string): TcxBlobPaintStyle; -begin - if AStyle = 'bpsDefault' then - Result := bpsDefault - else if AStyle = 'bpsIcon' then - Result := bpsIcon - else if AStyle = 'bpsText' then - Result := bpsText - else - Result := bpsDefault; -end; - -function TcxBlobEditPropertiesConverter.GetDestination: TcxBlobEditProperties; -begin - Result := inherited Destination as TcxBlobEditProperties; -end; - -{ TcxButtonEditPropertiesConverter } - -procedure TcxButtonEditPropertiesConverter.DoImport; -var - AButtons: TObject; - AButton: TcxEditButton; - I: Integer; -begin - with TcxButtonEditPropertiesAccess(Destination) do - HideCursor := GetBooleanProperty(Source, 'HideEditCursor', HideCursor); - with Destination do - begin - CharCase := ConvertCharCase(GetEnumProperty(Source, 'CharCase')); - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - ClickKey := GetIntegerProperty(Source, 'ClickKey', ClickKey); - AButtons := GetClassProperty(Source, 'Buttons'); - if AButtons <> nil then - begin - if AButtons is TCollection then - with TCollection(AButtons) do - begin - Buttons.Clear; - for I := 0 to Count - 1 do - begin - AButton := Buttons.Add; - AButton.Default := GetBooleanProperty(Items[I], 'Default', AButton.Default); - AButton.Glyph.Assign(GetClassProperty(Items[I], 'Glyph') as TBitmap); - AButton.Kind := ConvertButtonKind(GetEnumProperty(Items[I], 'Kind')); - AButton.LeftAlignment := GetBooleanProperty(Items[I], 'LeftAlignment', AButton.LeftAlignment); - AButton.Visible := GetBooleanProperty(Items[I], 'Visible', AButton.Visible); - AButton.Width := GetIntegerProperty(Items[I], 'Width', AButton.Width); - end; - end; - end; - end; - inherited DoImport; -end; - -function TcxButtonEditPropertiesConverter.ConvertButtonKind(const AButtonKind: string): TcxEditButtonKind; -begin - if AButtonKind = 'bkDown' then - Result := bkDown - else if AButtonKind = 'bkEllipsis' then - Result := bkEllipsis - else if AButtonKind = 'bkGlyph' then - Result := bkGlyph - else - Result := bkDown; -end; - -function TcxButtonEditPropertiesConverter.GetDestination: TcxButtonEditProperties; -begin - Result := inherited Destination as TcxButtonEditProperties; -end; - -{ TcxCalcEditPropertiesConverter } - -procedure TcxCalcEditPropertiesConverter.DoImport; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - BeepOnError := GetBooleanProperty(Source, 'BeepOnError', BeepOnError); - ButtonGlyph.Assign(GetClassProperty(Source, 'ButtonGlyph') as TBitmap); - Precision := GetIntegerProperty(Source, 'Precision', Precision); - QuickClose := GetBooleanProperty(Source, 'QuickClose', QuickClose); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - end; - inherited DoImport; -end; - -function TcxCalcEditPropertiesConverter.GetDestination: TcxCalcEditProperties; -begin - Result := inherited Destination as TcxCalcEditProperties; -end; - -{ TcxCheckBoxPropertiesConverter } - -procedure TcxCheckBoxPropertiesConverter.DoImport; -begin - with Destination do - begin - Alignment := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - AllowGrayed := GetBooleanProperty(Source, 'AllowGrayed', AllowGrayed); - Glyph.Assign(GetClassProperty(Source, 'Glyph') as TBitmap); - GlyphCount := GetIntegerProperty(Source, 'GlyphCount', GlyphCount); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - ValueChecked := GetStringProperty(Source, 'ValueChecked', ''); - ValueGrayed := GetStringProperty(Source, 'ValueGrayed', ''); - ValueUnchecked := GetStringProperty(Source, 'ValueUnchecked', ''); - DisplayChecked := GetStringProperty(Source, 'DisplayChecked', DisplayChecked); - DisplayGrayed := GetStringProperty(Source, 'DisplayNull', DisplayGrayed); - DisplayUnchecked := GetStringProperty(Source, 'DisplayUnchecked', DisplayUnchecked); - NullStyle := ConvertNullFieldStyle(GetEnumProperty(Source, 'ShowNullFieldStyle')); - end; - inherited DoImport; -end; - -function TcxCheckBoxPropertiesConverter.ConvertNullFieldStyle(const AValue: string): TcxCheckBoxNullValueShowingStyle; -begin - if AValue = 'nsGrayedChecked' then - Result := nssGrayedChecked - else if AValue = 'nsInactive' then - Result := nssInactive - else if AValue = 'nsUnchecked' then - Result := nssUnchecked - else - Result := nssUnchecked; -end; - -function TcxCheckBoxPropertiesConverter.GetDestination: TcxCheckBoxProperties; -begin - Result := inherited Destination as TcxCheckBoxProperties; -end; - -{ TcxComboBoxPropertiesConverter } - -procedure TcxComboBoxPropertiesConverter.DoImport; -var - AObject: TObject; - I: Integer; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - ButtonGlyph.Assign(GetClassProperty(Source, 'ButtonGlyph') as TBitmap); - CharCase := ConvertCharCase(GetEnumProperty(Source, 'CharCase')); - DropDownRows := GetIntegerProperty(Source, 'DropDownRows', DropDownRows); - ImmediateDropDown := GetBooleanProperty(Source, 'ImmediateDropDown', ImmediateDropDown); - AObject := GetClassProperty(Source, 'Items'); - if AObject <> nil then - if AObject is TStrings then - for I := 0 to TStrings(AObject).Count - 1 do - Items.Add(TStrings(AObject)[I]); - MaxLength := GetIntegerProperty(Source, 'MaxLength', MaxLength); - OEMConvert := GetBooleanProperty(Source, 'OEMConvert', OEMConvert); - PopupAlignment := ConvertAlignment(GetEnumProperty(Source, 'PopupAlignment')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - Revertable := GetBooleanProperty(Source, 'Revertable', Revertable); - if GetBooleanProperty(Source, 'DropDownListStyle', False) then - DropDownListStyle := lsEditFixedList - else - DropDownListStyle := lsEditList; - end; - inherited DoImport; -end; - -function TcxComboBoxPropertiesConverter.GetDestination: TcxComboBoxProperties; -begin - Result := inherited Destination as TcxComboBoxProperties; -end; - -{ TcxCurrencyEditPropertiesConverter } - -procedure TcxCurrencyEditPropertiesConverter.DoImport; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - DecimalPlaces := GetIntegerProperty(Source, 'DecimalPlaces', DecimalPlaces); - DisplayFormat := GetStringProperty(Source, 'DisplayFormat', DisplayFormat); - MaxValue := GetFloatProperty(Source, 'MaxValue', MaxValue); - MinValue := GetFloatProperty(Source, 'MinValue', MinValue); - Nullable := GetBooleanProperty(Source, 'Nullable', Nullable); - NullString := GetStringProperty(Source, 'NullString', NullString); - UseThousandSeparator := GetBooleanProperty(Source, 'UseThousandSeparator', UseThousandSeparator); - end; - inherited DoImport; -end; - -function TcxCurrencyEditPropertiesConverter.GetDestination: TcxCurrencyEditProperties; -begin - Result := inherited Destination as TcxCurrencyEditProperties; -end; - -{ TcxDateEditPropertiesConverter } - -procedure TcxDateEditPropertiesConverter.DoImport; -var - ADateButtons: TStringList; - AcxDateButtons: TDateButtons; - I: Integer; - ADateOnError: string; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - ButtonGlyph.Assign(GetClassProperty(Source, 'ButtonGlyph') as TBitmap); - ADateButtons := TStringList.Create; - try - GetSetProperty(Source, 'DateButtons', ADateButtons); - ADateButtons.Sort; - AcxDateButtons := []; - if ADateButtons.Find('btnToday', I) then - Include(AcxDateButtons, btnToday); - if ADateButtons.Find('btnClear', I) then - Include(AcxDateButtons, btnClear); - DateButtons := AcxDateButtons; - finally - ADateButtons.Free; - end; - if GetBooleanProperty(Source, 'DateValidation') then - DateOnError := deNoChange - else - begin - ADateOnError := GetEnumProperty(Source, 'DateOnError'); - if ADateOnError = 'deToday'then - DateOnError := deToday - else if ADateOnError = 'deNull' then - DateOnError := deNull; - end; - SaveTime := GetBooleanProperty(Source, 'SaveTime', SaveTime); - if GetBooleanProperty(Source, 'UseEditMask', False) then - InputKind := ikMask - else - InputKind := ikRegExpr; - end; - inherited DoImport; -end; - -function TcxDateEditPropertiesConverter.GetDestination: TcxDateEditProperties; -begin - Result := inherited Destination as TcxDateEditProperties; -end; - -{ TcxHyperLinkEditPropertiesConverter } - -procedure TcxHyperLinkEditPropertiesConverter.DoImport; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - SingleClick := GetBooleanProperty(Source, 'SingleClick', SingleClick); - StartKey := GetIntegerProperty(Source, 'StartKey', StartKey); - end; - inherited DoImport; -end; - -function TcxHyperLinkEditPropertiesConverter.GetDestination: TcxHyperLinkEditProperties; -begin - Result := inherited Destination as TcxHyperLinkEditProperties; -end; - -{ TcxImagePropertiesConverter } - -procedure TcxImagePropertiesConverter.DoImport; -var - AObject: TObject; - AGlyph: TObject; - AButtons: TStringList; - AMenuItems: TcxPopupMenuItems; - I: Integer; -begin - with Destination do - begin - Center := GetBooleanProperty(Source, 'Center', Center); - CustomFilter := GetStringProperty(Source, 'CustomFilter', CustomFilter); - GraphicTransparency := ConvertPictureTransparency( - GetEnumProperty(Source, 'GraphicTransparency')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - Stretch := GetBooleanProperty(Source, 'Stretch', Stretch); - AObject := GetClassProperty(Source, 'PopupToolBar'); - if AObject <> nil then - begin - PopupMenuLayout.CustomMenuItemCaption := GetStringProperty(AObject, - 'CustomButtonCaption', PopupMenuLayout.CustomMenuItemCaption); - AGlyph := GetClassProperty(AObject, 'CustomButtonGlyph'); - PopupMenuLayout.CustomMenuItemGlyph.Assign(AGlyph as TBitmap); - AButtons := TStringList.Create; - try - GetSetProperty(AObject, 'Buttons', AButtons); - AButtons.Sort; - AMenuItems := []; - if AButtons.Find('ptbCut', I) then - Include(AMenuItems, pmiCut); - if AButtons.Find('ptbCopy', I) then - Include(AMenuItems, pmiCopy); - if AButtons.Find('ptbPaste', I) then - Include(AMenuItems, pmiPaste); - if AButtons.Find('ptbDelete', I) then - Include(AMenuItems, pmiDelete); - if AButtons.Find('ptbLoad', I) then - Include(AMenuItems, pmiLoad); - if AButtons.Find('ptbSave', I) then - Include(AMenuItems, pmiSave); - if AButtons.Find('ptbCustom', I) then - Include(AMenuItems, pmiCustom); - PopupMenuLayout.MenuItems := AMenuItems; - finally - AButtons.Free; - end; - end; - end; - inherited DoImport; -end; - -function TcxImagePropertiesConverter.GetDestination: TcxImageProperties; -begin - Result := inherited Destination as TcxImageProperties; -end; - -{ TcxImageComboBoxPropertiesConverter } - -procedure TcxImageComboBoxPropertiesConverter.DoImport; -var - AObject: TObject; - AItem: TcxImageComboBoxItem; - AdxImageIndexes: TObject; - AdxValues: TObject; - AdxDescriptions: TObject; - I: Integer; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - ButtonGlyph.Assign(GetClassProperty(Source, 'ButtonGlyph') as TBitmap); - DropDownRows := GetIntegerProperty(Source, 'DropDownRows', DropDownRows); - AObject := GetClassProperty(Source, 'Images'); - if AObject <> nil then - Images := AObject as TCustomImageList - else - Images := nil; - AObject := GetClassProperty(Source, 'LargeImages'); - if AObject <> nil then - LargeImages := AObject as TCustomImageList - else - LargeImages := nil; - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - MultiLineText := GetBooleanProperty(Source,'MultiLineText', MultiLineText); - ShowDescriptions := GetBooleanProperty(Source, 'ShowDescription', ShowDescriptions); - AdxImageIndexes := GetClassProperty(Source, 'ImageIndexes'); - AdxValues := GetClassProperty(Source, 'Values'); - AdxDescriptions := GetClassProperty(Source, 'Descriptions'); - if (AdxImageIndexes <> nil) and (AdxValues <> nil) and - (AdxDescriptions <> nil) then - begin - if (AdxImageIndexes is TStrings) and (AdxValues is TStrings) and - (AdxDescriptions is TStrings) then - begin - for I := 0 to TStrings(AdxImageIndexes).Count - 1 do - begin - AItem := Items.Add as TcxImageComboBoxItem; - AItem.ImageIndex := StrToInt(TStrings(AdxImageIndexes)[I]); - if I < TStrings(AdxDescriptions).Count then - AItem.Description := TStrings(AdxDescriptions)[I]; - if I < TStrings(AdxValues).Count then - AItem.Value := TStrings(AdxValues)[I]; - end; - end; - end; - end; - inherited DoImport; -end; - -function TcxImageComboBoxPropertiesConverter.GetDestination: TcxImageComboBoxProperties; -begin - Result := inherited Destination as TcxImageComboBoxProperties; -end; - -{ TcxLookupComboBoxPropertiesConverter } - -procedure TcxLookupComboBoxPropertiesConverter.DoImport; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - CharCase := ConvertCharCase(GetEnumProperty(Source, 'CharCase')); - ClearKey := GetIntegerProperty(Source, 'ClearKey', ClearKey); - ImmediateDropDown := GetBooleanProperty(Source, 'ImmediateDropDown', ImmediateDropDown); - OEMConvert := GetBooleanProperty(Source, 'OEMConvert', OEMConvert); - MaxLength := GetIntegerProperty(Source, 'MaxLength', MaxLength); - ButtonGlyph.Assign(GetClassProperty(Source, 'ButtonGlyph') as TBitmap); - DropDownRows := GetIntegerProperty(Source, 'DropDownRows', DropDownRows); - DropDownWidth := GetIntegerProperty(Source, 'DropDownWidth', DropDownWidth); - ListFieldNames := GetStringProperty(Source, 'ListFieldName', ListFieldNames); - PopupAlignment := ConvertAlignment(GetEnumProperty(Source, 'PopupAlignment')); - ListOptions.ShowHeader := False; - end; - inherited DoImport; -end; - -function TcxLookupComboBoxPropertiesConverter.GetDestination: TcxLookupComboBoxProperties; -begin - Result := inherited Destination as TcxLookupComboBoxProperties; -end; - -{ TcxMaskEditPropertiesConverter } - -procedure TcxMaskEditPropertiesConverter.DoImport; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - CharCase := ConvertCharCase(GetEnumProperty(Source, 'CharCase')); - EditMask := GetStringProperty(Source, 'EditMask', EditMask); - IgnoreMaskBlank := GetBooleanProperty(Source, 'IgnoreMaskBlank', IgnoreMaskBlank); - MaskKind := emkStandard; - MaxLength := GetIntegerProperty(Source, 'MaxLength', MaxLength); - OEMConvert := GetBooleanProperty(Source, 'OEMConvert', OEMConvert); - end; - inherited DoImport; -end; - -function TcxMaskEditPropertiesConverter.GetDestination: TcxMaskEditProperties; -begin - Result := inherited Destination as TcxMaskEditProperties; -end; - -{ TcxMemoPropertiesConverter } - -procedure TcxMemoPropertiesConverter.DoImport; -begin - with Destination do - begin - Alignment := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - CharCase := ConvertCharCase(GetEnumProperty(Source, 'CharCase')); - MaxLength := GetIntegerProperty(Source, 'MaxLength', MaxLength); - OEMConvert := GetBooleanProperty(Source, 'OEMConvert', OEMConvert); - ScrollBars := ConvertScrollStyle(GetEnumProperty(Source, 'ScrollBars')); - WantReturns := GetBooleanProperty(Source, 'WantReturns', WantReturns); - WantTabs := GetBooleanProperty(Source, 'WantTabs', WantTabs); - WordWrap := GetBooleanProperty(Source, 'WordWrap', WordWrap); - end; - inherited DoImport; -end; - -function TcxMemoPropertiesConverter.GetDestination: TcxMemoProperties; -begin - Result := inherited Destination as TcxMemoProperties; -end; - -{ TcxMRUEditPropertiesConverter } - -procedure TcxMRUEditPropertiesConverter.DoImport; -var - AObject: TObject; - AItems: TStringList; - I: Integer; -begin - with Destination do - begin - AItems := GetClassProperty(Source, 'Items') as TStringList; - if AItems <> nil then - for I := 0 to AItems.Count - 1 do - LookupItems.Add(AItems[I]); - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - AObject := GetClassProperty(Source, 'ButtonGlyph'); - ButtonGlyph.Assign(AObject as TBitmap); - DropDownRows := GetIntegerProperty(Source, 'DropDownRows', DropDownRows); - ImmediateDropDown := GetBooleanProperty(Source, 'ImmediateDropDown', ImmediateDropDown); - MaxItemCount := GetIntegerProperty(Source, 'MaxItemCount', MaxItemCount); - ShowEllipsis := GetBooleanProperty(Source, 'ShowEllipsis', ShowEllipsis); - end; - inherited DoImport; -end; - -function TcxMRUEditPropertiesConverter.GetDestination: TcxMRUEditProperties; -begin - Result := inherited Destination as TcxMRUEditProperties; -end; - -{ TcxPopupEditPropertiesConverter } - -procedure TcxPopupEditPropertiesConverter.DoImport; -var - AObject: TObject; - APanelStyle: string; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - CharCase := ConvertCharCase(GetEnumProperty(Source, 'CharCase')); - MaxLength := GetIntegerProperty(Source, 'MaxLength', MaxLength); - OEMConvert := GetBooleanProperty(Source, 'OEMConvert', OEMConvert); - PopupAutoSize := GetBooleanProperty(Source, 'PopupAutoSize', PopupAutoSize); - PopupClientEdge := GetBooleanProperty(Source, 'PopupFormClientEdge', PopupClientEdge); - AObject := GetClassProperty(Source, 'PopupControl'); - if AObject <> nil then - PopupControl := AObject as TControl - else - PopupControl := nil; - PopupHeight := GetIntegerProperty(Source, 'PopupHeight', PopupHeight); - PopupMinHeight := GetIntegerProperty(Source, 'PopupMinHeight', PopupMinHeight); - PopupMinWidth := GetIntegerProperty(Source, 'PopupMinWidth', PopupMinWidth); - PopupWidth := GetIntegerProperty(Source, 'PopupWidth', PopupWidth); - PopupSizeable := GetBooleanProperty(Source, 'PopupFormSizeable', PopupSizeable); - APanelStyle := GetEnumProperty(Source, 'PopupFormBorderStyle'); - PopupSysPanelStyle := APanelStyle = 'pbsSysPanel'; - end; - inherited DoImport; -end; - -function TcxPopupEditPropertiesConverter.GetDestination: TcxPopupEditProperties; -begin - Result := inherited Destination as TcxPopupEditProperties; -end; - -{ TcxSpinEditPropertiesConverter } - -procedure TcxSpinEditPropertiesConverter.DoImport; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - Increment := GetFloatProperty(Source, 'Increment', Increment); - MaxValue := GetFloatProperty(Source, 'MaxValue', MaxValue); - MinValue := GetFloatProperty(Source, 'MinValue', MinValue); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - end; - inherited DoImport; -end; - -function TcxSpinEditPropertiesConverter.GetDestination: TcxSpinEditProperties; -begin - Result := inherited Destination as TcxSpinEditProperties; -end; - -{ TcxTextEditPropertiesConverter } - -procedure TcxTextEditPropertiesConverter.DoImport; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - CharCase := ConvertCharCase(GetEnumProperty(Source, 'CharCase')); - MaxLength := GetIntegerProperty(Source, 'MaxLength', MaxLength); - OEMConvert := GetBooleanProperty(Source, 'OEMConvert', OEMConvert); - end; - inherited DoImport; -end; - -function TcxTextEditPropertiesConverter.GetDestination: TcxTextEditProperties; -begin - Result := inherited Destination as TcxTextEditProperties; -end; - -{ TcxTimeEditPropertiesConverter } - -procedure TcxTimeEditPropertiesConverter.DoImport; -begin - with Destination do - begin - Alignment.Horz := ConvertAlignment(GetEnumProperty(Source, 'Alignment')); - Alignment.Vert := ConvertVertAlignment(GetEnumProperty(Source, 'VertAlignment')); - ReadOnly := GetBooleanProperty(Source, 'ReadOnly', ReadOnly); - TimeFormat := ConvertTimeFormat(GetEnumProperty(Source, 'TimeEditFormat')); - end; - inherited DoImport; -end; - -function TcxTimeEditPropertiesConverter.ConvertTimeFormat(const AFormat: string): TcxTimeEditTimeFormat; -begin - if AFormat = 'tfHour' then - Result := tfHour - else if AFormat = 'tfHourMin' then - Result := tfHourMin - else if AFormat = 'tfHourMinSec' then - Result := tfHourMinSec - else - Result := tfHour; -end; - -function TcxTimeEditPropertiesConverter.GetDestination: TcxTimeEditProperties; -begin - Result := inherited Destination as TcxTimeEditProperties; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxRadioGroup.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxRadioGroup.pas deleted file mode 100644 index 0190e830..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxRadioGroup.pas +++ /dev/null @@ -1,2319 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxRadioGroup; - -{$I cxVer.inc} - -interface - -uses - Windows, - Messages, -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Classes, Controls, Forms, Graphics, ImgList, StdCtrls, SysUtils, cxClasses, - cxContainer, cxControls, cxDataStorage, cxEdit, cxGraphics, cxLookAndFeels, - Menus, cxTextEdit, cxGroupBox, dxUxTheme, cxDropDownEdit, cxFilterControlUtils; - -type - TcxRadioButtonState = (rbsDisabled, rbsHot, rbsNormal, rbsPressed); - TcxRadioGroupState = (rgsActive, rgsDisabled, rgsHot, rgsNormal); - - TcxCustomRadioGroup = class; - TcxCustomRadioGroupProperties = class; - - { TcxRadioButton } - - TcxRadioButton = class(TRadioButton, IUnknown, - IcxMouseTrackingCaller, IcxLookAndFeelContainer, IdxSkinSupport) - private - FButtonRect: TRect; - FCanvas: TcxCanvas; - FColumn: Integer; - FControlCanvas: TControlCanvas; - FLookAndFeel: TcxLookAndFeel; - FPopupMenu: TComponent; - FRow: Integer; - FState: TcxRadioButtonState; - FTransparent: Boolean; - {$IFNDEF DELPHI7} - FParentBackground: Boolean; - FWordWrap: Boolean; - {$ENDIF} - - procedure AdjustCanvasFontSettings(ACanvas: TcxCanvas); - function GetTextColor: TColor; - - procedure DrawItem(const DrawItemStruct: TDrawItemStruct); - function IsDisabledTextColorAssigned: Boolean; - function GetRadioButtonRect(const ARadioButtonSize: TSize; - ANativeStyle: Boolean): TRect; - procedure SetLookAndFeel(Value: TcxLookAndFeel); - procedure SetPopupMenu(Value: TComponent); - procedure SetState(Value: TcxRadioButtonState); - procedure SetTransparent(Value: Boolean); - {$IFNDEF DELPHI7} - procedure SetParentBackground(Value: Boolean); - procedure SetWordWrap(Value: Boolean); - {$ENDIF} - procedure WMContextMenu(var Message: TWMContextMenu); message WM_CONTEXTMENU; - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); - message WM_WINDOWPOSCHANGED; - procedure BMSetCheck(var Message: TMessage); message BM_SETCHECK; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE; - procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM; - procedure CNKeyDown(var Message: TWMKeyDown); message CN_KEYDOWN; - procedure CNMeasureItem(var Message: TWMMeasureItem); message CN_MEASUREITEM; - procedure CNSysKeyDown(var Message: TWMSysKeyDown); message CN_SYSKEYDOWN; - protected - procedure CreateHandle; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure DoEnter; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - - procedure CorrectTextRect(var R: TRect; ANativeStyle: Boolean); virtual; - procedure DoContextPopup(MousePos: TPoint; - var Handled: Boolean); {$IFNDEF DELPHI5}virtual{$ELSE}override{$ENDIF}; - function DoShowPopupMenu(APopupMenu: TComponent; - X, Y: Integer): Boolean; virtual; - procedure DrawBackground; virtual; - procedure DrawCaption(ACanvas: TcxCanvas; ANativeStyle: Boolean); virtual; - procedure EnabledChanged; dynamic; - procedure InternalPolyLine(const APoints: array of TPoint); - function IsInplace: Boolean; virtual; - function IsNativeBackground: Boolean; virtual; - function IsNativeStyle: Boolean; virtual; - function IsTransparent: Boolean; virtual; - function IsTransparentBackground: Boolean; virtual; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); virtual; - procedure MouseEnter(AControl: TControl); dynamic; - procedure MouseLeave(AControl: TControl); dynamic; - procedure Paint(ADrawOnlyFocusedState: Boolean); virtual; - procedure ShortUpdateState; - procedure UpdateState(Button: TcxMouseButton; Shift: TShiftState; - const P: TPoint); virtual; - - // IcxMouseTrackingCaller - procedure IcxMouseTrackingCaller.MouseLeave = MouseTrackingCallerMouseLeave; - procedure MouseTrackingCallerMouseLeave; - - // IcxLookAndFeelContainer - function GetLookAndFeel: TcxLookAndFeel; - - property Canvas: TcxCanvas read FCanvas; - property Column: Integer read FColumn; - property Row: Integer read FRow; - property State: TcxRadioButtonState read FState write SetState; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Focused: Boolean; override; - procedure Invalidate; override; - published - property LookAndFeel: TcxLookAndFeel read FLookAndFeel write SetLookAndFeel; - property PopupMenu: TComponent read FPopupMenu write SetPopupMenu; - property ParentBackground{$IFNDEF DELPHI7}: Boolean read FParentBackground write SetParentBackground{$ENDIF} default True; - property Transparent: Boolean read FTransparent write SetTransparent default False; - {$IFNDEF DELPHI7} - property WordWrap: Boolean read FWordWrap write SetWordWrap default False; - {$ENDIF} - end; - - { TcxRadioGroupButtonViewInfo } - - TcxRadioGroupButtonViewInfo = class(TcxGroupBoxButtonViewInfo) - public - function GetGlyphRect(ACanvas: TcxCanvas; AGlyphSize: TSize; AAlignment: TLeftRight; AIsPaintCopy: Boolean): TRect; override; - end; - - { TcxCustomRadioGroupViewInfo } - - TcxCustomRadioGroupViewInfo = class(TcxButtonGroupViewInfo) - private - function GetEdit: TcxCustomRadioGroup; - function ThemeHandle: TdxTheme; - protected - procedure DrawButtonCaption(ACanvas: TcxCanvas; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; const AGlyphRect: TRect); override; - procedure DrawButtonGlyph(ACanvas: TcxCanvas; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; const AGlyphRect: TRect); override; - function GetButtonViewInfoClass: TcxEditButtonViewInfoClass; override; - function IsButtonGlypthTransparent(AButtonViewInfo: TcxGroupBoxButtonViewInfo): Boolean; override; - public - ItemIndex: Integer; - constructor Create; override; - property Edit: TcxCustomRadioGroup read GetEdit; - end; - - { TcxCustomRadioGroupViewData } - - TcxCustomRadioGroupViewData = class(TcxButtonGroupViewData) - private - function GetProperties: TcxCustomRadioGroupProperties; - protected - procedure GetEditMetrics(AAutoHeight: Boolean; ACanvas: TcxCanvas; - out AMetrics: TcxEditMetrics); override; - procedure CalculateButtonNativeState(AViewInfo: TcxCustomEditViewInfo; - AButtonViewInfo: TcxGroupBoxButtonViewInfo); override; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - property Properties: TcxCustomRadioGroupProperties read GetProperties; - end; - - { TcxRadioGroupItem } - - TcxRadioGroupItem = class(TcxButtonGroupItem) - private - FValue: TcxEditValue; - function IsValueStored: Boolean; - procedure SetValue(const Value: TcxEditValue); - public - constructor Create(Collection: TCollection); override; - procedure Assign(Source: TPersistent); override; - published - property Caption; - property Value: TcxEditValue read FValue write SetValue stored IsValueStored; - property Tag; - end; - - { TcxRadioGroupItems } - - TcxRadioGroupItems = class(TcxButtonGroupItems) - private - function GetItem(Index: Integer): TcxRadioGroupItem; - procedure SetItem(Index: Integer; Value: TcxRadioGroupItem); - public - function Add: TcxRadioGroupItem; - property Items[Index: Integer]: TcxRadioGroupItem - read GetItem write SetItem; default; - end; - - { TcxCustomRadioGroupProperties } - - TcxCustomRadioGroupProperties = class(TcxCustomButtonGroupProperties) - private - FDefaultCaption: WideString; - FDefaultValue: TcxEditValue; - function GetItems: TcxRadioGroupItems; - function IsDefaultCaptionStored: Boolean; - function IsDefaultValueStored: Boolean; - procedure SetDefaultValue(const Value: TcxEditValue); - procedure SetItems(Value: TcxRadioGroupItems); - protected - function CreateItems: TcxButtonGroupItems; override; - function GetColumnCount: Integer; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function HasDisplayValue: Boolean; override; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - function CanCompareEditValue: Boolean; override; - function CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; override; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - function GetRadioGroupItemIndex(const AEditValue: TcxEditValue): Integer; - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsResetEditClass: Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - // !!! - property DefaultCaption: WideString read FDefaultCaption - write FDefaultCaption stored IsDefaultCaptionStored; - property DefaultValue: TcxEditValue read FDefaultValue write SetDefaultValue - stored IsDefaultValueStored; - property Items: TcxRadioGroupItems read GetItems write SetItems; - end; - - { TcxRadioGroupProperties } - - TcxRadioGroupProperties = class(TcxCustomRadioGroupProperties) - published - property AssignedValues; - property ClearKey; - property Columns; - property DefaultCaption; - property DefaultValue; - property ImmediatePost; - property Items; - property ReadOnly; - property WordWrap; - property OnChange; - property OnEditValueChanged; - end; - - { TcxCustomRadioGroupButton } - - TcxCustomRadioGroupButton = class(TcxRadioButton, IUnknown, - IcxContainerInnerControl) - private - FFocusingByMouse: Boolean; - FInternalSettingChecked: Boolean; - FIsClickLocked: Boolean; - function GetRadioGroup: TcxCustomRadioGroup; - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure CNCommand(var Message: TWMCommand); message CN_COMMAND; - protected - procedure Click; override; - procedure CorrectTextRect(var R: TRect; ANativeStyle: Boolean); override; - procedure DoEnter; override; - procedure DoExit; override; - procedure DrawBackground; override; - function IsInplace: Boolean; override; - function IsNativeBackground: Boolean; override; - function IsNativeStyle: Boolean; override; - function IsTransparent: Boolean; override; - function IsTransparentBackground: Boolean; override; - procedure KeyPress(var Key: Char); override; - procedure Paint(ADrawOnlyFocusedState: Boolean); override; - procedure SetChecked(Value: Boolean); override; - procedure WndProc(var Message: TMessage); override; - - // IcxContainerInnerControl - function GetControl: TWinControl; - function GetControlContainer: TcxContainer; - - procedure InternalSetChecked(AValue: Boolean); - - property RadioGroup: TcxCustomRadioGroup read GetRadioGroup; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - function CanFocus: Boolean; override; - procedure DefaultHandler(var Message); override; - end; - - TcxCustomRadioGroupButtonClass = class of TcxCustomRadioGroupButton; - - { TcxCustomRadioGroup } - - TcxCustomRadioGroup = class(TcxCustomButtonGroup) - private - FLoadedItemIndex: Integer; - FSkinsPaintCopy: Boolean; - function GetCheckedIndex: Integer; - function GetButton(Index: Integer): TcxCustomRadioGroupButton; - function GetProperties: TcxCustomRadioGroupProperties; - function GetActiveProperties: TcxCustomRadioGroupProperties; - function GetItemIndex: Integer; - function GetViewInfo: TcxCustomRadioGroupViewInfo; - procedure SetItemIndex(Value: Integer); - procedure SetProperties(Value: TcxCustomRadioGroupProperties); - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - procedure CMCtl3DChanged(var Message: TMessage); message CM_CTL3DCHANGED; - protected - procedure CursorChanged; override; - function GetButtonDC(AButtonIndex: Integer): THandle; override; - procedure Initialize; override; - procedure InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); override; - function IsContainerFocused: Boolean; override; - function IsDBEditPaintCopyDrawing: Boolean; override; - function IsInternalControl(AControl: TControl): Boolean; override; - procedure SetDragMode(Value: TDragMode); override; - procedure SetInternalValues(const AEditValue: TcxEditValue; - AValidateEditValue, AFromButtonChecked: Boolean); - procedure SynchronizeButtonsStyle; override; - procedure ParentBackgroundChanged; override; - procedure Resize; override; - procedure SetDragKind(Value: TDragKind); override; - procedure ArrangeButtons; override; - function GetButtonInstance: TWinControl; override; - procedure UpdateButtons; override; - - procedure AfterLoading; - function IsLoading: Boolean; - procedure Loaded; override; - procedure Updated; override; - - {$IFNDEF DELPHI12} - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - {$ENDIF} - procedure ButtonChecked(AButton: TcxCustomRadioGroupButton); - - property ViewInfo: TcxCustomRadioGroupViewInfo read GetViewInfo; - property SkinsPaintCopy: Boolean read FSkinsPaintCopy write FSkinsPaintCopy; - public - procedure Activate(var AEditData: TcxCustomEditData); override; - procedure Clear; override; - procedure FlipChildren(AllLevels: Boolean); override; - {$IFDEF DELPHI12} - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - {$ENDIF} - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure GetTabOrderList(List: TList); override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - procedure SetFocus; override; - property ActiveProperties: TcxCustomRadioGroupProperties read GetActiveProperties; - property Buttons[Index: Integer]: TcxCustomRadioGroupButton read GetButton; - property ItemIndex: Integer read GetItemIndex write SetItemIndex default -1; - property Properties: TcxCustomRadioGroupProperties read GetProperties - write SetProperties; - property Transparent; - end; - - { TcxRadioGroup } - - TcxRadioGroup = class(TcxCustomRadioGroup) - private - function GetActiveProperties: TcxRadioGroupProperties; - function GetProperties: TcxRadioGroupProperties; - procedure SetProperties(Value: TcxRadioGroupProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxRadioGroupProperties read GetActiveProperties; - published - property Align; - property Alignment; - property Anchors; - property BiDiMode; - property Caption; - property Constraints; - property Ctl3D; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ParentBackground; - property ParentBiDiMode; - property ParentColor; - property ParentCtl3D; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxRadioGroupProperties read GetProperties write SetProperties; - property ItemIndex; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnClick; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnStartDock; - property OnStartDrag; - end; - - { TcxFilterRadioGroupHelper } - - TcxFilterRadioGroupHelper = class(TcxFilterComboBoxHelper) - public - class procedure GetFilterValue(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties; var V: Variant; var S: TCaption); override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - class procedure SetFilterValue(AEdit: TcxCustomEdit; AEditProperties: TcxCustomEditProperties; - AValue: Variant); override; - class function UseDisplayValue: Boolean; override; - end; - -implementation - -uses - Math, dxThemeConsts, dxThemeManager, cxVariants, cxLookAndFeelPainters, - cxEditConsts, cxEditPaintUtils, cxEditUtils; - -const - AButtonStateMap: array [TcxRadioButtonState] of TcxButtonState = - (cxbsDisabled, cxbsHot, cxbsNormal, cxbsPressed); - -type - TCanvasAccess = class(TCanvas); - -function InternalGetShiftState: TShiftState; -var - AKeyState: TKeyBoardState; -begin - GetKeyboardState(AKeyState); - Result := KeyboardStateToShiftState(AKeyState); -end; - -{ TcxRadioButton } - -constructor TcxRadioButton.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ControlStyle := ControlStyle + [csDoubleClicks]; - FControlCanvas := TControlCanvas.Create; - FControlCanvas.Control := Self; - FCanvas := TcxCanvas.Create(TCanvas(FControlCanvas)); - FLookAndFeel := TcxLookAndFeel.Create(Self); - FLookAndFeel.OnChanged := LookAndFeelChanged; - FState := rbsNormal; - ParentBackground := True; - PrepareRadioButtonImageList; -end; - -destructor TcxRadioButton.Destroy; -begin - EndMouseTracking(Self); - FreeAndNil(FLookAndFeel); - FreeAndNil(FCanvas); - FreeAndNil(FControlCanvas); - inherited Destroy; -end; - -function TcxRadioButton.Focused: Boolean; -begin - Result := not(csDesigning in ComponentState) and - inherited Focused; -end; - -procedure TcxRadioButton.Invalidate; -begin - InternalInvalidateRect(Self, Rect(0, 0, Width, Height), False); -end; - -procedure TcxRadioButton.DoEnter; -begin - inherited DoEnter; - if not Checked and not ClicksDisabled then - begin - ClicksDisabled := True; - try - Checked := True; - finally - ClicksDisabled := False; - if not (csLoading in ComponentState) then - Click; - end; - end; -end; - -procedure TcxRadioButton.DrawCaption(ACanvas: TcxCanvas; ANativeStyle: Boolean); - - function GetDrawTextFlags: Integer; - begin - Result := cxAlignLeft or cxAlignVCenter or cxShowPrefix; - if WordWrap then - Result := Result or cxDontClip or cxWordBreak - else - Result := Result or cxSingleLine; - end; - - procedure CheckFocusRect(var R: TRect); - begin - if IsInplace then - begin - R.Top := Max(R.Top, 1); - R.Bottom := Min(R.Bottom, Height - 1); - R.Right := Min(R.Right, Width); - end - else - begin - R.Left := Min(R.Left, 0); - R.Top := Min(R.Top, 0); - R.Right := Min(R.Right, Width); - R.Bottom := Min(R.Bottom, Height); - if (Alignment = taLeftJustify) and (R.Right > FButtonRect.Left) then - R.Right := FButtonRect.Left; - end; - end; - -var - AFlags: Integer; - R: TRect; -begin - AdjustCanvasFontSettings(ACanvas); - - R := GetControlRect(Self); - if Alignment = taRightJustify then - R.Left := FButtonRect.Right - else - R.Right := FButtonRect.Left; - ACanvas.Brush.Style := bsClear; - CorrectTextRect(R, ANativeStyle); - AFlags := GetDrawTextFlags; - if IsNativeBackground then - ACanvas.Canvas.Refresh; - ACanvas.DrawText(Caption, R, AFlags, IsDisabledTextColorAssigned or - Supports(Self, IcxContainerInnerControl) or ANativeStyle or Enabled); - ACanvas.Brush.Style := bsSolid; - if Focused and (Caption <> '') then - begin - ACanvas.TextExtent(Caption, R, AFlags); - InflateRect(R, 1, 1); - Inc(R.Bottom); - if IsInplace then - CheckFocusRect(R); - ACanvas.Brush.Color := Color; - ACanvas.Font.Color := Font.Color; - TCanvasAccess(ACanvas.Canvas).RequiredState([csFontValid]); - ACanvas.Canvas.DrawFocusRect(R); - end; -end; - -procedure TcxRadioButton.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - UpdateState(ButtonTocxButton(Button), Shift, Point(X, Y)); -end; - -procedure TcxRadioButton.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - UpdateState(cxmbNone, Shift, Point(X, Y)); - BeginMouseTracking(Self, GetControlRect(Self), Self); -end; - -procedure TcxRadioButton.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - UpdateState(ButtonTocxButton(Button), Shift, Point(X, Y)); -end; - -procedure TcxRadioButton.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = PopupMenu) then - PopupMenu := nil; -end; - -procedure TcxRadioButton.CreateHandle; -begin - inherited CreateHandle; - ShortUpdateState; -end; - -procedure TcxRadioButton.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params do - Style := Style and not BS_RADIOBUTTON or BS_OWNERDRAW; -end; - -procedure TcxRadioButton.CorrectTextRect(var R: TRect; ANativeStyle: Boolean); - - function GetTextRectCorrection: TRect; - const - AInplaceTextRectCorrectionA: array [Boolean] of TRect = ( - (Left: 5; Top: 0; Right: 1; Bottom: 0), - (Left: 3; Top: 0; Right: 0; Bottom: 0) - ); - ATextRectCorrectionA: array [Boolean, TLeftRight] of TRect = ( - ((Left: 2; Top: -1; Right: 1; Bottom: 0), - (Left: 5; Top: -1; Right: 0; Bottom: 0)), - ((Left: 2; Top: -1; Right: 6; Bottom: 0), - (Left: 5; Top: -1; Right: 2; Bottom: 0)) - ); - ANativeStyleTextRectCorrectionA: array [Boolean, TLeftRight] of TRect = ( - ((Left: 0; Top: -1; Right: 1; Bottom: 0), - (Left: 3; Top: -1; Right: 0; Bottom: 0)), - ((Left: 0; Top: -1; Right: 3; Bottom: 0), - (Left: 3; Top: -1; Right: 0; Bottom: 0)) - ); - begin - if IsInplace then - Result := AInplaceTextRectCorrectionA[ANativeStyle] - else - if ANativeStyle then - begin - Result := ANativeStyleTextRectCorrectionA[WordWrap, Alignment]; - if EmulateStandardControlDrawing then - begin - Result.Top := 0; - Result.Bottom := 0; - end; - end - else - Result := ATextRectCorrectionA[WordWrap, Alignment]; - end; - -begin - ExtendRect(R, GetTextRectCorrection); -end; - -procedure TcxRadioButton.DoContextPopup(MousePos: TPoint; - var Handled: Boolean); -var - P: TPoint; -begin -{$IFDEF DELPHI5} - inherited DoContextPopup(MousePos, Handled); -{$ENDIF} - if not Handled then - begin - if (MousePos.X = -1) and (MousePos.Y = -1) then - P := ClientToScreen(Point(0, 0)) - else - P := ClientToScreen(MousePos); - Handled := DoShowPopupMenu(PopupMenu, P.X, P.Y); - end; -end; - -function TcxRadioButton.DoShowPopupMenu(APopupMenu: TComponent; - X, Y: Integer): Boolean; -begin - Result := ShowPopupMenu(Self, APopupMenu, X, Y); -end; - -procedure TcxRadioButton.DrawBackground; -begin - if not IsTransparentBackground then - cxEditFillRect(Canvas, GetControlRect(Self), Color); -end; - -procedure TcxRadioButton.EnabledChanged; -begin - ShortUpdateState; - Invalidate; -end; - -procedure TcxRadioButton.AdjustCanvasFontSettings(ACanvas: TcxCanvas); -var - AInnerControl: IcxContainerInnerControl; - ABackgroundColor, ATextColor: TColor; -begin - if Supports(Self, IcxContainerInnerControl, AInnerControl) then - begin - ACanvas.Font.Assign((AInnerControl.ControlContainer as TcxCustomRadioGroup).FCaptionFont); - (AInnerControl.ControlContainer as TcxCustomRadioGroup).GetColorSettingsByPainter(ABackgroundColor, ATextColor); - if ATextColor <> clDefault then - ACanvas.Font.Color := ATextColor; - end - else - begin - ACanvas.Font.Assign(Font); - ACanvas.Font.Color := GetTextColor; - end; -end; - -function TcxRadioButton.GetTextColor: TColor; -begin - Result := clDefault; - if Font.Color = clWindowText then - Result := LookAndFeel.Painter.DefaultEditorTextColor(not Enabled); - if Result = clDefault then - begin - if Enabled then - Result := Font.Color - else - Result := clBtnShadow; - end; -end; - -procedure TcxRadioButton.InternalPolyLine(const APoints: array of TPoint); -begin - Canvas.Polyline(APoints); - with APoints[High(APoints)] do - Canvas.Pixels[X, Y] := Canvas.Pen.Color; -end; - -function TcxRadioButton.IsDisabledTextColorAssigned: Boolean; -begin - Result := LookAndFeel.Painter.DefaultEditorTextColor(True) <> clDefault; -end; - -function TcxRadioButton.IsInplace: Boolean; -begin - Result := False; -end; - -function TcxRadioButton.IsNativeBackground: Boolean; -begin - Result := IsNativeStyle and ParentBackground and not IsInplace and - not Transparent; -end; - -function TcxRadioButton.IsNativeStyle: Boolean; -begin - Result := AreVisualStylesMustBeUsed(LookAndFeel.NativeStyle, totButton); -end; - -function TcxRadioButton.IsTransparent: Boolean; -begin - Result := Transparent and not IsInplace; -end; - -function TcxRadioButton.IsTransparentBackground: Boolean; -begin - Result := IsNativeBackground or IsTransparent; -end; - -procedure TcxRadioButton.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - Invalidate; -end; - -procedure TcxRadioButton.MouseEnter(AControl: TControl); -begin - ShortUpdateState; - BeginMouseTracking(Self, GetControlRect(Self), Self); -end; - -procedure TcxRadioButton.MouseLeave(AControl: TControl); -begin - UpdateState(cxmbNone, [], Point(-1, -1)); - EndMouseTracking(Self); -end; - -procedure TcxRadioButton.Paint(ADrawOnlyFocusedState: Boolean); - - function GetBackgroundColor: TColor; - begin - if IsTransparentBackground then - begin - if LookAndFeel.SkinPainter <> nil then - Result := clNone - else - Result := clDefault; - end else - Result := Color; - end; - - function GetNativeState: Integer; - const - ANativeStateMap: array [Boolean, TcxRadioButtonState] of Integer = ( - (RBS_UNCHECKEDDISABLED, RBS_UNCHECKEDHOT, RBS_UNCHECKEDNORMAL, - RBS_UNCHECKEDPRESSED), - (RBS_CHECKEDDISABLED, RBS_CHECKEDHOT, RBS_CHECKEDNORMAL, - RBS_CHECKEDPRESSED) - ); - begin - Result := ANativeStateMap[Checked, FState]; - end; - -var - ARadioButtonSize: TSize; - APainter: TcxCustomLookAndFeelPainterClass; -begin - if not ADrawOnlyFocusedState then - begin - if IsTransparent then - cxDrawTransparentControlBackground(Self, Canvas, GetControlRect(Self)) - else - if IsNativeBackground then - cxDrawThemeParentBackground(Self, Canvas, GetControlRect(Self)); - if IsNativeStyle then - DrawBackground; - end; - - APainter := LookAndFeel.GetAvailablePainter(totButton); - ARadioButtonSize := APainter.RadioButtonSize; - FButtonRect := GetRadioButtonRect(ARadioButtonSize, IsNativeStyle); - - APainter.DrawRadioButton(Canvas, FButtonRect.Left, FButtonRect.Top, - AButtonStateMap[State], Checked, Focused, GetBackgroundColor, - csDesigning in ComponentState); - Canvas.ExcludeClipRect(FButtonRect); - - if not ADrawOnlyFocusedState and not IsNativeStyle then - DrawBackground; - - DrawCaption(Canvas, IsNativeStyle); -end; - -procedure TcxRadioButton.ShortUpdateState; -begin - if not HandleAllocated then - Exit; - UpdateState(cxmbNone, InternalGetShiftState, ScreenToClient(InternalGetCursorPos)); -end; - -procedure TcxRadioButton.UpdateState(Button: TcxMouseButton; Shift: TShiftState; - const P: TPoint); -begin - if not Enabled then - State := rbsDisabled - else - if (csDesigning in ComponentState) then - State := rbsNormal - else - if GetCaptureControl = Self then // VCL only - if PtInRect(GetControlRect(Self), P) then - State := rbsPressed - else - State := rbsHot - else - if PtInRect(GetControlRect(Self), P) then - begin - if Shift = [] then - State := rbsHot - else - State := rbsNormal - end - else - State := rbsNormal; -end; - -// IcxMouseTrackingCaller -procedure TcxRadioButton.MouseTrackingCallerMouseLeave; -begin - MouseLeave(nil); -end; - -// IcxLookAndFeelContainer -function TcxRadioButton.GetLookAndFeel: TcxLookAndFeel; -begin - Result := LookAndFeel; -end; - -procedure TcxRadioButton.DrawItem(const DrawItemStruct: TDrawItemStruct); -begin - FCanvas.Canvas.Handle := DrawItemStruct.hDC; - Paint(DrawItemStruct.itemAction = ODA_FOCUS); // SC bug B19151 - FCanvas.Canvas.Handle := 0; -end; - -function TcxRadioButton.GetRadioButtonRect(const ARadioButtonSize: TSize; - ANativeStyle: Boolean): TRect; -begin - Result.Top := (Height - ARadioButtonSize.cy) div 2; - Result.Bottom := Result.Top + ARadioButtonSize.cy; - if Alignment = taRightJustify then - begin - if ANativeStyle then - Result.Left := 0 - else - if IsInplace then - Result.Left := 0 - else - Result.Left := 1; - Result.Right := Result.Left + ARadioButtonSize.cx; - end else - begin - Result.Right := Width; - Result.Left := Result.Right - ARadioButtonSize.cx; - end; -end; - -procedure TcxRadioButton.SetLookAndFeel(Value: TcxLookAndFeel); -begin - FLookAndFeel.Assign(Value); -end; - -procedure TcxRadioButton.SetPopupMenu(Value: TComponent); -var - AIPopupMenu: IcxPopupMenu; -begin - if (Value <> nil) and not((Value is TPopupMenu) or - Supports(Value, IcxPopupMenu, AIPopupMenu)) then - Value := nil; - if FPopupMenu <> Value then - begin - {$IFDEF DELPHI5} - if FPopupMenu <> nil then - FPopupMenu.RemoveFreeNotification(Self); - {$ENDIF} - FPopupMenu := Value; - if FPopupMenu <> nil then - FPopupMenu.FreeNotification(Self); - end; -end; - -procedure TcxRadioButton.SetState(Value: TcxRadioButtonState); -var - R: TRect; -begin - if Value <> FState then - begin - FState := Value; - R := FButtonRect; - InflateRect(R, 1, 1); - InternalInvalidateRect(Self, R, False); - end; -end; - -procedure TcxRadioButton.SetTransparent(Value: Boolean); -begin - if Value <> FTransparent then - begin - FTransparent := Value; - Invalidate; - end; -end; - -{$IFNDEF DELPHI7} -procedure TcxRadioButton.SetParentBackground(Value: Boolean); -begin - if Value <> FParentBackground then - begin - FParentBackground := Value; - Invalidate; - end; -end; - -procedure TcxRadioButton.SetWordWrap(Value: Boolean); -begin - if Value <> FWordWrap then - begin - FWordWrap := Value; - Invalidate; - end; -end; -{$ENDIF} - -procedure TcxRadioButton.WMContextMenu(var Message: TWMContextMenu); -var - AHandled: Boolean; - P, P1: TPoint; -begin - if Message.Result <> 0 then - Exit; - if csDesigning in ComponentState then - begin - inherited; - Exit; - end; - - P := SmallPointToPoint(Message.Pos); - if (P.X = -1) and (P.Y = -1) then - P1 := P - else - begin - P1 := ScreenToClient(P); - if not PtInRect(ClientRect, P1) then - begin - inherited; - Exit; - end; - end; - - AHandled := False; - DoContextPopup(P1, AHandled); - Message.Result := Ord(AHandled); - if not AHandled then - inherited; -end; - -procedure TcxRadioButton.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - Message.Result := 1; -end; - -procedure TcxRadioButton.WMWindowPosChanged(var Message: TWMWindowPosChanged); -begin - inherited; - if not (csDestroying in ComponentState) and IsTransparentBackground then - Invalidate; -end; - -procedure TcxRadioButton.BMSetCheck(var Message: TMessage); -begin - inherited; - InternalInvalidateRect(Self, FButtonRect, False); -end; - -procedure TcxRadioButton.CMEnabledChanged(var Message: TMessage); -begin - inherited; - EnabledChanged; -end; - -procedure TcxRadioButton.CMMouseEnter(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseEnter(Self) - else - MouseEnter(TControl(Message.lParam)); -end; - -procedure TcxRadioButton.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxRadioButton.CMSysColorChange(var Message: TMessage); -begin - inherited; - Invalidate; -end; - -procedure TcxRadioButton.CNDrawItem(var Message: TWMDrawItem); -begin - if not (csDestroying in ComponentState) then - DrawItem(Message.DrawItemStruct^); -end; - -procedure TcxRadioButton.CNKeyDown(var Message: TWMKeyDown); -begin - if IsPopupMenuShortCut(PopupMenu, Message) then - Message.Result := 1 - else - inherited; -end; - -procedure TcxRadioButton.CNMeasureItem(var Message: TWMMeasureItem); -var - ATempVar: TMeasureItemStruct; -begin - ATempVar := Message.MeasureItemStruct^; - ATempVar.itemWidth := Width; - ATempVar.itemHeight := Height; - Message.MeasureItemStruct^ := ATempVar; -end; - -procedure TcxRadioButton.CNSysKeyDown(var Message: TWMSysKeyDown); -begin - if IsPopupMenuShortCut(PopupMenu, Message) then - Message.Result := 1 - else - inherited; -end; - -{ TcxRadioGroupButtonViewInfo } - -function TcxRadioGroupButtonViewInfo.GetGlyphRect(ACanvas: TcxCanvas; - AGlyphSize: TSize; AAlignment: TLeftRight; AIsPaintCopy: Boolean): TRect; - - procedure CorrectRadioRect(var ACheckRect: TRect); - begin - if AIsPaintCopy and not Data.NativeStyle then - OffsetRect(ACheckRect, 1, 0); - end; - -begin - Result := inherited GetGlyphRect(ACanvas, AGlyphSize, AAlignment, AIsPaintCopy); - CorrectRadioRect(Result); -end; - -{ TcxCustomRadioGroupViewInfo } - -constructor TcxCustomRadioGroupViewInfo.Create; -begin - inherited Create; - PrepareRadioButtonImageList; -end; - -procedure TcxCustomRadioGroupViewInfo.DrawButtonCaption(ACanvas: TcxCanvas; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; const AGlyphRect: TRect); - - procedure CorrectTextRect(var R: TRect); - const - ANativeStyleTextRectCorrection: TRect = (Left: 3; Top: -1; Right: 0; Bottom: -1); - ATextRectCorrection: TRect = (Left: 5; Top: 0; Right: 1; Bottom: 0); - begin - if AButtonViewInfo.Data.NativeStyle then - ExtendRect(R, ANativeStyleTextRectCorrection) - else - ExtendRect(R, ATextRectCorrection); - if (Edit <> nil) and Edit.IsDBEditPaintCopyDrawing then - OffsetRect(R, 0, -1); - end; - -var - R: TRect; -begin - ACanvas.Font := Font; - ACanvas.Font.Color := TextColor; - PrepareCanvasFont(ACanvas.Canvas); - R := AButtonViewInfo.Bounds; - if Alignment = taRightJustify then - R.Left := AGlyphRect.Right - else - R.Right := AGlyphRect.Left; - ACanvas.Brush.Style := bsClear; - CorrectTextRect(R); - ACanvas.DrawText(AButtonViewInfo.Caption, R, DrawTextFlags); - ACanvas.Brush.Style := bsSolid; - if not IsInplace and Focused then - begin - ACanvas.TextExtent(AButtonViewInfo.Caption, R, DrawTextFlags); - InflateRect(R, 1, 1); - Inc(R.Bottom); - ACanvas.Brush.Color := BackgroundColor; - TCanvasAccess(ACanvas.Canvas).RequiredState([csFontValid]); - ACanvas.Canvas.DrawFocusRect(R); - end; -end; - -procedure TcxCustomRadioGroupViewInfo.DrawButtonGlyph(ACanvas: TcxCanvas; - AButtonViewInfo: TcxGroupBoxButtonViewInfo; const AGlyphRect: TRect); -const - ALookAndFeelKindMap: array [TcxEditButtonStyle] of TcxLookAndFeelKind = - (lfStandard, lfStandard, lfFlat, lfStandard, lfStandard, - lfUltraFlat, lfOffice11); - AButtonStateMap: array [TcxEditButtonState] of TcxButtonState = - (cxbsDisabled, cxbsNormal, cxbsPressed, cxbsHot); -var - APrevClipRegion: TcxRegion; - ABackgroundColor: TColor; - APainter: TcxCustomLookAndFeelPainterClass; -begin - APrevClipRegion := ACanvas.GetClipRegion; - try - ACanvas.IntersectClipRect(AButtonViewInfo.Bounds); - if AButtonViewInfo.Data.NativeStyle then - DrawThemeBackground(ThemeHandle, ACanvas.Handle, BP_RADIOBUTTON, - AButtonViewInfo.Data.NativeState, AGlyphRect) - else - begin - if IsBackgroundTransparent {and (Painter = nil)} then - ABackgroundColor := clDefault - else - ABackgroundColor := BackgroundColor; - if Painter = nil then - APainter := GetPainterClass(False, ALookAndFeelKindMap[AButtonViewInfo.Data.Style]) - else - APainter := Painter; - APainter.DrawRadioButton(ACanvas, AGlyphRect.Left, AGlyphRect.Top, - AButtonStateMap[AButtonViewInfo.Data.State], - ItemIndex = AButtonViewInfo.Index, False, ABackgroundColor, IsDesigning); - end; - finally - ACanvas.SetClipRegion(APrevClipRegion, roSet); - end; -end; - -function TcxCustomRadioGroupViewInfo.GetButtonViewInfoClass: TcxEditButtonViewInfoClass; -begin - Result := TcxRadioGroupButtonViewInfo; -end; - -function TcxCustomRadioGroupViewInfo.IsButtonGlypthTransparent(AButtonViewInfo: TcxGroupBoxButtonViewInfo): Boolean; -begin - Result := IsBackgroundTransparent or - AButtonViewInfo.Data.NativeStyle and - IsThemeBackgroundPartiallyTransparent(ThemeHandle, BP_RADIOBUTTON, AButtonViewInfo.Data.NativeState); -end; - -function TcxCustomRadioGroupViewInfo.GetEdit: TcxCustomRadioGroup; -begin - Result := TcxCustomRadioGroup(FEdit); -end; - -function TcxCustomRadioGroupViewInfo.ThemeHandle: TdxTheme; -begin - Result := OpenTheme(totButton); -end; - -{ TcxCustomRadioGroupViewData } - -procedure TcxCustomRadioGroupViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); -begin - with TcxCustomRadioGroupViewInfo(AViewInfo) do - Alignment := taRightJustify; - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - TcxCustomRadioGroupViewInfo(AViewInfo).GlyphSize := - Style.LookAndFeel.GetAvailablePainter(totButton).RadioButtonSize; - AViewInfo.BackgroundColor := Style.Color; -end; - -procedure TcxCustomRadioGroupViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -begin - if PreviewMode then - TcxCustomRadioGroupViewInfo(AViewInfo).ItemIndex := 0 - else - TcxCustomRadioGroupViewInfo(AViewInfo).ItemIndex := - Properties.GetRadioGroupItemIndex(AEditValue); - if epoAutoHeight in PaintOptions then - Include(AViewInfo.PaintOptions, epoAutoHeight); -end; - -procedure TcxCustomRadioGroupViewData.GetEditMetrics(AAutoHeight: Boolean; - ACanvas: TcxCanvas; out AMetrics: TcxEditMetrics); -const - AColumnWidthCorrectionA: array [Boolean] of Integer = (7, 5); - AAutoHeightColumnWidthCorrectionA: array [Boolean] of Integer = (3, 1); -var - ANativeStyle: Boolean; -begin - AMetrics.ClientLeftBoundCorrection := 6 - 5 * Integer(IsInplace); - AMetrics.ClientWidthCorrection := 4 * Integer(IsInplace) - 6; - AMetrics.ColumnOffset := 0; - if ACanvas = nil then - Exit; - - ANativeStyle := IsButtonNativeStyle(Style.LookAndFeel); - AMetrics.ButtonSize := Style.LookAndFeel.GetAvailablePainter(totButton).RadioButtonSize; - AMetrics.ColumnWidthCorrection := AColumnWidthCorrectionA[ANativeStyle]; - AMetrics.AutoHeightColumnWidthCorrection := - AAutoHeightColumnWidthCorrectionA[ANativeStyle]; - AMetrics.WidthCorrection := 6 - 5 * Integer(IsInplace); - AMetrics.AutoHeightWidthCorrection := Integer(IsInplace) - 6; -end; - -procedure TcxCustomRadioGroupViewData.CalculateButtonNativeState(AViewInfo: TcxCustomEditViewInfo; - AButtonViewInfo: TcxGroupBoxButtonViewInfo); -const - AButtonStateMap: array [Boolean, TcxEditButtonState] of Integer = ( - (RBS_UNCHECKEDDISABLED, RBS_UNCHECKEDNORMAL, RBS_UNCHECKEDPRESSED, RBS_UNCHECKEDHOT), - (RBS_CHECKEDDISABLED, RBS_CHECKEDNORMAL, RBS_CHECKEDPRESSED, RBS_CHECKEDHOT) - ); -var - ATheme: TdxTheme; -begin - with AButtonViewInfo do - begin - if not Data.NativeStyle then - Exit; - Data.NativePart := BP_RADIOBUTTON; - Data.NativeState := AButtonStateMap[Index = TcxCustomRadioGroupViewInfo(AViewInfo).ItemIndex, Data.State]; - ATheme := OpenTheme(totButton); - Data.BackgroundPartiallyTransparent := IsThemeBackgroundPartiallyTransparent(ATheme, - Data.NativePart, Data.NativeState); - end; -end; - -function TcxCustomRadioGroupViewData.GetProperties: TcxCustomRadioGroupProperties; -begin - Result := TcxCustomRadioGroupProperties(FProperties); -end; - -{ TcxRadioGroupItem } - -constructor TcxRadioGroupItem.Create(Collection: TCollection); -begin - FValue := Null; - inherited Create(Collection); -end; - -procedure TcxRadioGroupItem.Assign(Source: TPersistent); -begin - if Source is TcxRadioGroupItem then - Value := TcxRadioGroupItem(Source).Value; - inherited Assign(Source); -end; - -function TcxRadioGroupItem.IsValueStored: Boolean; -begin - Result := not VarIsNull(FValue); -end; - -procedure TcxRadioGroupItem.SetValue(const Value: TcxEditValue); -begin - if not InternalVarEqualsExact(Value, FValue) then - begin - FValue := Value; - if Assigned(Collection) then - TcxRadioGroupItems(Collection).InternalNotify(Self, -1, copChanged); - end; -end; - -{ TcxRadioGroupItems } - -function TcxRadioGroupItems.Add: TcxRadioGroupItem; -begin - Result := TcxRadioGroupItem(inherited Add); -end; - -function TcxRadioGroupItems.GetItem(Index: Integer): TcxRadioGroupItem; -begin - Result := TcxRadioGroupItem(inherited Items[Index]); -end; - -procedure TcxRadioGroupItems.SetItem(Index: Integer; Value: TcxRadioGroupItem); -begin - inherited Items[Index] := Value; -end; - -{ TcxCustomRadioGroupProperties } - -constructor TcxCustomRadioGroupProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FDefaultCaption := cxGetResourceString(@cxSRadioGroupDefaultCaption); - FDefaultValue := Null; -end; - -procedure TcxCustomRadioGroupProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomRadioGroupProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomRadioGroupProperties do - begin - Self.DefaultCaption := DefaultCaption; - Self.DefaultValue := DefaultValue; - Self.WordWrap := WordWrap; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomRadioGroupProperties.CanCompareEditValue: Boolean; -begin - Result := True; -end; - -function TcxCustomRadioGroupProperties.CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; -begin - Result := GetRadioGroupItemIndex(AEditValue1) = GetRadioGroupItemIndex(AEditValue2); -end; - -class function TcxCustomRadioGroupProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxRadioGroup; -end; - -function TcxCustomRadioGroupProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -var - AItemIndex: Integer; -begin - AItemIndex := GetRadioGroupItemIndex(AEditValue); - if AItemIndex = -1 then - Result := FDefaultCaption - else - Result := Items[AItemIndex].Caption; -end; - -function TcxCustomRadioGroupProperties.GetRadioGroupItemIndex( - const AEditValue: TcxEditValue): Integer; -var - I: Integer; - AIsNull: Boolean; - AItem: TcxRadioGroupItem; -begin - Result := -1; - for I := 0 to Items.Count - 1 do - begin - AItem := Items[I]; - AIsNull := VarIsNull(AItem.Value); - if AIsNull and InternalCompareString(AItem.Caption, VarToStr(AEditValue), True) or - not AIsNull and VarEqualsExact(AEditValue, AItem.Value) then - begin - Result := I; - Break; - end; - end; -end; - -function TcxCustomRadioGroupProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := inherited GetSupportedOperations + [esoHorzAlignment, esoSortingByDisplayText]; -end; - -class function TcxCustomRadioGroupProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomRadioGroupViewInfo; -end; - -function TcxCustomRadioGroupProperties.IsResetEditClass: Boolean; -begin - Result := True; -end; - -procedure TcxCustomRadioGroupProperties.PrepareDisplayValue(const AEditValue: - TcxEditValue; var DisplayValue: TcxEditValue; AEditFocused: Boolean); -begin - DisplayValue := GetRadioGroupItemIndex(AEditValue); -end; - -function TcxCustomRadioGroupProperties.CreateItems: TcxButtonGroupItems; -begin - Result := TcxRadioGroupItems.Create(Self, TcxRadioGroupItem); -end; - -function TcxCustomRadioGroupProperties.GetColumnCount: Integer; -begin - Result := Columns; - if Result > Items.Count then - Result := Items.Count; - if Result = 0 then - Result := 1; -end; - -class function TcxCustomRadioGroupProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomRadioGroupViewData; -end; - -function TcxCustomRadioGroupProperties.HasDisplayValue: Boolean; -begin - Result := True; -end; - -function TcxCustomRadioGroupProperties.GetItems: TcxRadioGroupItems; -begin - Result := TcxRadioGroupItems(inherited Items); -end; - -function TcxCustomRadioGroupProperties.IsDefaultCaptionStored: Boolean; -begin - Result := not InternalCompareString(FDefaultCaption, - cxGetResourceString(@cxSRadioGroupDefaultCaption), True); -end; - -function TcxCustomRadioGroupProperties.IsDefaultValueStored: Boolean; -begin - Result := not VarIsNull(FDefaultValue); -end; - -procedure TcxCustomRadioGroupProperties.SetDefaultValue(const Value: TcxEditValue); -begin - if not InternalVarEqualsExact(Value, FDefaultValue) then - begin - FDefaultValue := Value; - Changed; - end; -end; - -procedure TcxCustomRadioGroupProperties.SetItems(Value: TcxRadioGroupItems); -begin - inherited Items.Assign(Value); -end; - -{ TcxCustomRadioGroupButton } - -constructor TcxCustomRadioGroupButton.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - with TcxCustomRadioGroup(AOwner) do - begin - InternalButtons.Add(Self); - Self.LookAndFeel.MasterLookAndFeel := Style.LookAndFeel; - end; -end; - -destructor TcxCustomRadioGroupButton.Destroy; -begin - RadioGroup.InternalButtons.Remove(Self); - inherited Destroy; -end; - -function TcxCustomRadioGroupButton.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - RadioGroup.DataBinding.ExecuteAction(Action); -end; - -function TcxCustomRadioGroupButton.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - RadioGroup.DataBinding.UpdateAction(Action); -end; - -function TcxCustomRadioGroupButton.CanFocus: Boolean; -begin - Result := RadioGroup.CanFocus; -end; - -procedure TcxCustomRadioGroupButton.DefaultHandler(var Message); -begin - if not RadioGroup.InnerControlDefaultHandler(TMessage(Message)) then - inherited DefaultHandler(Message); -end; - -procedure TcxCustomRadioGroupButton.Click; -begin - inherited Click; - with RadioGroup do - if not IsLoading then - RadioGroup.Click; -end; - -procedure TcxCustomRadioGroupButton.CorrectTextRect(var R: TRect; ANativeStyle: Boolean); -begin - inherited CorrectTextRect(R, ANativeStyle); -end; - -procedure TcxCustomRadioGroupButton.DoEnter; -begin - with RadioGroup do - begin - ShortRefreshContainer(False); - if not Checked and not IsInplace and not FFocusingByMouse and DoEditing then - Checked := True; - end; -end; - -procedure TcxCustomRadioGroupButton.DoExit; -begin - inherited DoExit; - RadioGroup.ShortRefreshContainer(False); -end; - -procedure TcxCustomRadioGroupButton.DrawBackground; -var - APrevWindowOrg: TPoint; -begin - if RadioGroup.ViewInfo.IsCustomBackground then - begin - OffsetWindowOrgEx(Canvas.Handle, Left, Top, APrevWindowOrg); - try - RadioGroup.ViewInfo.DrawBackground(Canvas); - finally - SetWindowOrgEx(Canvas.Handle, APrevWindowOrg.X, APrevWindowOrg.Y, nil); - end; - end - else - if not IsTransparentBackground then - inherited DrawBackground; -end; - -function TcxCustomRadioGroupButton.IsInplace: Boolean; -begin - Result := RadioGroup.IsInplace; -end; - -function TcxCustomRadioGroupButton.IsNativeBackground: Boolean; -begin - Result := RadioGroup.IsNativeBackground; -end; - -function TcxCustomRadioGroupButton.IsNativeStyle: Boolean; -begin - Result := RadioGroup.IsButtonNativeStyle; -end; - -function TcxCustomRadioGroupButton.IsTransparent: Boolean; -begin - Result := RadioGroup.IsTransparent; -end; - -function TcxCustomRadioGroupButton.IsTransparentBackground: Boolean; -begin - Result := inherited IsTransparentBackground or RadioGroup.ViewInfo.IsCustomBackground; -end; - -procedure TcxCustomRadioGroupButton.KeyPress(var Key: Char); -begin - inherited KeyPress(Key); - if ((Key = #8) or (Key = ' ')) and not RadioGroup.CanModify then - Key := #0; -end; - -procedure TcxCustomRadioGroupButton.Paint(ADrawOnlyFocusedState: Boolean); - - procedure SetSkinsPaintCopy(AValue: Boolean); - begin - if RadioGroup <> nil then - RadioGroup.SkinsPaintCopy := AValue; - end; - - function DrawByPainter(APainter: TcxCustomLookAndFeelPainterClass): Boolean; - var - ABitmap: TcxBitmap; - ARadioButtonSize: TSize; - begin - Result := APainter <> nil; - if Result then - begin - ABitmap := TcxBitmap.CreateSize(ClientRect, pf32bit); - try - SetSkinsPaintCopy(True); - try - cxDrawTransparentControlBackground(Self, ABitmap.cxCanvas, ClientRect); - finally - SetSkinsPaintCopy(False); - end; - ARadioButtonSize := APainter.RadioButtonSize; - FButtonRect := GetRadioButtonRect(ARadioButtonSize, IsNativeStyle); - - with FButtonRect do - APainter.DrawRadioButton(ABitmap.cxCanvas, Left, Top, AButtonStateMap[State], - Checked, Focused, clNone, csDesigning in ComponentState); - - DrawCaption(ABitmap.cxCanvas, IsNativeStyle); - Canvas.Draw(0, 0, ABitmap); - finally - ABitmap.Free; - end; - end; - end; - -begin - if not DrawByPainter(LookAndFeel.SkinPainter) then - inherited Paint(ADrawOnlyFocusedState); -end; - -procedure TcxCustomRadioGroupButton.SetChecked(Value: Boolean); -begin - if Value = Checked then - Exit; - ClicksDisabled := True; - try - inherited SetChecked(Value); - finally - ClicksDisabled := False; - end; - if Value and not FInternalSettingChecked then - RadioGroup.ButtonChecked(Self); -end; - -procedure TcxCustomRadioGroupButton.WndProc(var Message: TMessage); -begin - if RadioGroup.InnerControlMenuHandler(Message) then - Exit; - if ((Message.Msg = WM_LBUTTONDOWN) or (Message.Msg = WM_LBUTTONDBLCLK)) and - (RadioGroup.DragMode = dmAutomatic) and not RadioGroup.IsDesigning then - RadioGroup.BeginAutoDrag - else - begin - if Message.Msg = WM_LBUTTONDOWN then - FFocusingByMouse := True; - inherited WndProc(Message); - if Message.Msg = WM_LBUTTONDOWN then - FFocusingByMouse := False; - end; -end; - -// IcxContainerInnerControl -function TcxCustomRadioGroupButton.GetControl: TWinControl; -begin - Result := Self; -end; - -function TcxCustomRadioGroupButton.GetControlContainer: TcxContainer; -begin - Result := RadioGroup; -end; - -procedure TcxCustomRadioGroupButton.InternalSetChecked(AValue: Boolean); -begin - if FInternalSettingChecked then - Exit; - FInternalSettingChecked := True; - try - Checked := AValue; - finally - FInternalSettingChecked := False; - end; -end; - -function TcxCustomRadioGroupButton.GetRadioGroup: TcxCustomRadioGroup; -begin - Result := TcxCustomRadioGroup(Owner); -end; - -procedure TcxCustomRadioGroupButton.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - inherited; - if RadioGroup.TabsNeeded and (GetKeyState(VK_CONTROL) >= 0) then - Message.Result := Message.Result or DLGC_WANTTAB; - if RadioGroup.IsInplace then - Message.Result := Message.Result or DLGC_WANTARROWS; -end; - -procedure TcxCustomRadioGroupButton.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - if not(csDestroying in ComponentState) and (Message.FocusedWnd <> RadioGroup.Handle) then - RadioGroup.FocusChanged; -end; - -procedure TcxCustomRadioGroupButton.WMSetFocus(var Message: TWMSetFocus); -begin - inherited; - if not(csDestroying in ComponentState) and (Message.FocusedWnd <> RadioGroup.Handle) then - RadioGroup.FocusChanged; -end; - -procedure TcxCustomRadioGroupButton.CNCommand(var Message: TWMCommand); -begin - if FIsClickLocked then - Exit; - FIsClickLocked := True; - try - try - with RadioGroup do - if ((Message.NotifyCode = BN_CLICKED) or (Message.NotifyCode = BN_DOUBLECLICKED)) and - (Checked or CanModify and DoEditing) then - inherited; - except - Application.HandleException(Self); - end; - finally - FIsClickLocked := False; - end; -end; - -{ TcxCustomRadioGroup } - -procedure TcxCustomRadioGroup.Activate(var AEditData: TcxCustomEditData); -var - ACheckedButtonIndex: Integer; -begin - inherited Activate(AEditData); - if InternalButtons.Count = 0 then - Exit; - ACheckedButtonIndex := ItemIndex; - if ACheckedButtonIndex = -1 then - ACheckedButtonIndex := 0; - if Buttons[ACheckedButtonIndex].CanFocus then - Buttons[ACheckedButtonIndex].SetFocus; -end; - -procedure TcxCustomRadioGroup.Clear; -begin - ItemIndex := -1; -end; - -procedure TcxCustomRadioGroup.FlipChildren(AllLevels: Boolean); -begin -end; - -class function TcxCustomRadioGroup.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomRadioGroupProperties; -end; - -procedure TcxCustomRadioGroup.GetTabOrderList(List: TList); -var - I: Integer; -begin - inherited GetTabOrderList(List); - List.Remove(Self); - if (TabStop or Focused) and (ItemIndex <> -1) then - for I := 0 to InternalButtons.Count - 1 do - if Buttons[I].Enabled then - List.Add(Buttons[I]); -end; - -procedure TcxCustomRadioGroup.PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); -begin - if ADisplayValue = -1 then - EditValue := ActiveProperties.DefaultValue - else - begin - EditValue := ActiveProperties.Items[ADisplayValue].Value; - if VarIsNull(EditValue) then - EditValue := ActiveProperties.Items[ADisplayValue].Caption; - end; -end; - -procedure TcxCustomRadioGroup.SetFocus; -var - ACheckedIndex: Integer; -begin - ACheckedIndex := GetCheckedIndex; - if (ACheckedIndex <> -1) and Buttons[ACheckedIndex].CanFocus then - Buttons[ACheckedIndex].SetFocus - else - inherited SetFocus; -end; - -procedure TcxCustomRadioGroup.CursorChanged; -var - I: Integer; -begin - inherited CursorChanged; - for I := 0 to InternalButtons.Count - 1 do - Buttons[I].Cursor := Cursor; -end; - -function TcxCustomRadioGroup.GetButtonDC(AButtonIndex: Integer): THandle; -begin - Result := Buttons[AButtonIndex].Canvas.Handle; -end; - -procedure TcxCustomRadioGroup.Initialize; -begin - inherited Initialize; - {$IFDEF DELPHI7} - ControlStyle := ControlStyle * [csParentBackground]; - {$ELSE} - ControlStyle := []; - {$ENDIF} - ControlStyle := ControlStyle + [csCaptureMouse, csClickEvents, csSetCaption, - csDoubleClicks, csReplicatable]; - - FLoadedItemIndex := -1; - Width := 185; - Height := 105; -end; - -procedure TcxCustomRadioGroup.InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); -begin - SetInternalValues(Value, AValidateEditValue, False); -end; - -function TcxCustomRadioGroup.IsContainerFocused: Boolean; -var - AIsButtonFocused: Boolean; - I: Integer; -begin - AIsButtonFocused := False; - for I := 0 to ActiveProperties.Items.Count - 1 do - if Buttons[I].Focused then - begin - AIsButtonFocused := True; - Break; - end; - if AIsButtonFocused then - Result := False - else - Result := inherited Focused; -end; - -function TcxCustomRadioGroup.IsDBEditPaintCopyDrawing: Boolean; -begin - Result := not FSkinsPaintCopy and inherited IsDBEditPaintCopyDrawing; -end; - -function TcxCustomRadioGroup.IsInternalControl(AControl: TControl): Boolean; -var - I: Integer; -begin - Result := AControl <> nil; - if Result then - begin - Result := inherited IsInternalControl(AControl); - if not Result then - for I := 0 to InternalButtons.Count - 1 do - if AControl = InternalButtons[I] then - begin - Result := True; - Exit; - end; - end; -end; - -procedure TcxCustomRadioGroup.SetDragMode(Value: TDragMode); -var - I: Integer; -begin - inherited SetDragMode(Value); - for I := 0 to InternalButtons.Count - 1 do - Buttons[I].DragMode := Value; -end; - -procedure TcxCustomRadioGroup.SetInternalValues(const AEditValue: TcxEditValue; - AValidateEditValue, AFromButtonChecked: Boolean); - - procedure FocusButton(AIndex: Integer); - begin - if Focused and (GetFocus <> Handle) then - Buttons[AIndex].SetFocus; - end; - - procedure SetButtonCheck(AItemIndex: Integer); - begin - if AFromButtonChecked then - FocusButton(AItemIndex) - else - begin - if AItemIndex < 0 then - Buttons[ItemIndex].InternalSetChecked(False) - else - begin - Buttons[AItemIndex].InternalSetChecked(True); - FocusButton(AItemIndex); - end; - if IsLoading or IsDesigning then - FLoadedItemIndex := AItemIndex; - end; - end; - -var - AItemIndex: Integer; -begin - LockChangeEvents(True); - try - inherited InternalSetEditValue(AEditValue, AValidateEditValue); - AItemIndex := ActiveProperties.GetRadioGroupItemIndex(AEditValue); - if AFromButtonChecked or (GetCheckedIndex <> AItemIndex) then - begin - SetButtonCheck(AItemIndex); - DoClick; - DoChange; - end; - if not KeyboardAction then - EditModified := False; - finally - LockChangeEvents(False); - end; - ShortRefreshContainer(False); -end; - -procedure TcxCustomRadioGroup.SynchronizeButtonsStyle; -const - AButtonLookAndFeelKinds: array [TcxEditButtonStyle] of TcxLookAndFeelKind = - (lfStandard, lfStandard, lfFlat, lfStandard, lfStandard, - lfUltraFlat, lfOffice11); -var - I: Integer; -begin - inherited SynchronizeButtonsStyle; - if Length(ViewInfo.ButtonsInfo) > 0 then - for I := 0 to InternalButtons.Count - 1 do - begin - Buttons[I].LookAndFeel.Kind := AButtonLookAndFeelKinds[ViewInfo.ButtonsInfo[0].Data.Style]; - Buttons[I].Transparent := Transparent; // Repaint buttons - end; -end; - -procedure TcxCustomRadioGroup.Resize; -begin - inherited Resize; - if IsDesigning and IsNativeBackground then - InvalidateRect(GetControlRect(Self), True); -end; - -procedure TcxCustomRadioGroup.ParentBackgroundChanged; -var - I: Integer; -begin - for I := 0 to InternalButtons.Count - 1 do - Buttons[I].ParentBackground := ParentBackground; -end; - -procedure TcxCustomRadioGroup.SetDragKind(Value: TDragKind); -var - I: Integer; -begin - inherited SetDragKind(Value); - for I := 0 to InternalButtons.Count - 1 do - Buttons[I].DragKind := Value; -end; - -procedure TcxCustomRadioGroup.ArrangeButtons; -var - AButtonViewInfo: TcxGroupBoxButtonViewInfo; - I: Integer; -begin - inherited ArrangeButtons; - for I := 0 to InternalButtons.Count - 1 do - begin - AButtonViewInfo := TcxGroupBoxButtonViewInfo(ViewInfo.ButtonsInfo[I]); - Buttons[I].FColumn := AButtonViewInfo.Column; - Buttons[I].FRow := AButtonViewInfo.Row; - end; -end; - -function TcxCustomRadioGroup.GetButtonInstance: TWinControl; -begin - Result := TcxCustomRadioGroupButton.Create(Self); -end; - -procedure TcxCustomRadioGroup.UpdateButtons; -var - I: Integer; - AItemIndex: Integer; -begin - AItemIndex := ItemIndex; - inherited UpdateButtons; - if IsLoading then - Exit; - if GetCheckedIndex <> AItemIndex then - ItemIndex := AItemIndex; - - for I := 0 to InternalButtons.Count - 1 do - begin - Buttons[I].Caption := ActiveProperties.Items[I].Caption; - Buttons[I].WordWrap := ActiveProperties.WordWrap; - end; -end; - -procedure TcxCustomRadioGroup.AfterLoading; -begin - LockChangeEvents(True); - LockClick(True); - try - if not IsDBEdit then - FEditValue := ActiveProperties.DefaultValue; - ItemIndex := FLoadedItemIndex; - finally - LockClick(False); - LockChangeEvents(False, False); - end; - UpdateButtons; -end; - -function TcxCustomRadioGroup.IsLoading: Boolean; -begin - Result := [csReading, csLoading, csUpdating] * ComponentState <> []; -end; - -procedure TcxCustomRadioGroup.Loaded; -begin - inherited; - AfterLoading; -end; - -procedure TcxCustomRadioGroup.Updated; -begin - inherited; - AfterLoading; -end; - -procedure TcxCustomRadioGroup.GetChildren(Proc: TGetChildProc; Root: TComponent); -begin -end; - -procedure TcxCustomRadioGroup.ButtonChecked(AButton: TcxCustomRadioGroupButton); -var - AEditValue: TcxEditValue; -begin - LockChangeEvents(True); - try - KeyboardAction := Focused; - try - if not IsLoading then - begin - PrepareEditValue(InternalButtons.IndexOf(AButton), AEditValue, InternalFocused); - SetInternalValues(AEditValue, True, True); - end; - finally - KeyboardAction := False; - end; - if Focused and ActiveProperties.ImmediatePost and CanPostEditValue and ValidateEdit(True) then - InternalPostEditValue; - finally - LockChangeEvents(False); - end; -end; - -function TcxCustomRadioGroup.GetCheckedIndex: Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to InternalButtons.Count - 1 do - if Buttons[I].Checked then - begin - Result := I; - Break; - end; -end; - -function TcxCustomRadioGroup.GetButton(Index: Integer): TcxCustomRadioGroupButton; -begin - Result := TcxCustomRadioGroupButton(InternalButtons[Index]); -end; - -function TcxCustomRadioGroup.GetProperties: TcxCustomRadioGroupProperties; -begin - Result := TcxCustomRadioGroupProperties(FProperties); -end; - -function TcxCustomRadioGroup.GetActiveProperties: TcxCustomRadioGroupProperties; -begin - Result := TcxCustomRadioGroupProperties(InternalGetActiveProperties); -end; - -function TcxCustomRadioGroup.GetItemIndex: Integer; -begin - if IsLoading or IsDesigning then - Result := FLoadedItemIndex - else - Result := GetCheckedIndex; -end; - -function TcxCustomRadioGroup.GetViewInfo: TcxCustomRadioGroupViewInfo; -begin - Result := TcxCustomRadioGroupViewInfo(FViewInfo); -end; - -procedure TcxCustomRadioGroup.SetItemIndex(Value: Integer); - - procedure InternalUpdateValues; - var - AEditValue: TcxEditValue; - begin - if Value < -1 then - Value := -1 - else - if Value >= InternalButtons.Count then - Value := InternalButtons.Count - 1; - - PrepareEditValue(Value, AEditValue, InternalFocused); - SetInternalValues(AEditValue, True, False); - end; - -begin - if not IsLoading then - InternalUpdateValues; - if IsLoading or IsDesigning then - FLoadedItemIndex := Value; -end; - -procedure TcxCustomRadioGroup.SetProperties(Value: TcxCustomRadioGroupProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomRadioGroup.CMDialogChar(var Message: TCMDialogChar); -begin - if IsAccel(Message.CharCode, Caption) and CanFocus then - begin - SelectFirst; - Message.Result := 1; - end - else - inherited; -end; - -procedure TcxCustomRadioGroup.CMCtl3DChanged(var Message: TMessage); -begin - inherited; - ShortRefreshContainer(False); -end; - -{ TcxRadioGroup } - -class function TcxRadioGroup.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxRadioGroupProperties; -end; - -function TcxRadioGroup.GetActiveProperties: TcxRadioGroupProperties; -begin - Result := TcxRadioGroupProperties(InternalGetActiveProperties); -end; - -function TcxRadioGroup.GetProperties: TcxRadioGroupProperties; -begin - Result := TcxRadioGroupProperties(FProperties); -end; - -procedure TcxRadioGroup.SetProperties(Value: TcxRadioGroupProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterRadioGroupHelper } - -class procedure TcxFilterRadioGroupHelper.GetFilterValue( - AEdit: TcxCustomEdit; AEditProperties: TcxCustomEditProperties; - var V: Variant; var S: TCaption); -var - AItemIndex: Integer; -begin - AItemIndex := TcxComboBox(AEdit).ItemIndex; - with TcxCustomRadioGroupProperties(AEditProperties) do - begin - if AItemIndex = -1 then - begin - V := DefaultValue; - S := DefaultCaption; - end - else - begin - V := Items[AItemIndex].Value; - S := Items[AItemIndex].Caption; - end; - end; -end; - -class function TcxFilterRadioGroupHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoBlanks, fcoNonBlanks]; - if AExtendedSet then Result := Result + [fcoInList, fcoNotInList]; -end; - -class procedure TcxFilterRadioGroupHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -var - ARadioGroupProperties: TcxCustomRadioGroupProperties; - I: Integer; -begin - ARadioGroupProperties := TcxCustomRadioGroupProperties(AEditProperties); - with TcxComboBoxProperties(AProperties).Items do - begin - Clear; - for I := 0 to ARadioGroupProperties.Items.Count - 1 do - Add(ARadioGroupProperties.Items[I].Caption); - end; - TcxComboBoxProperties(AProperties).DropDownListStyle := lsFixedList; - TcxComboBoxProperties(AProperties).IDefaultValuesProvider := nil; - ClearPropertiesEvents(AProperties); -end; - -class procedure TcxFilterRadioGroupHelper.SetFilterValue( - AEdit: TcxCustomEdit; AEditProperties: TcxCustomEditProperties; - AValue: Variant); -var - V: TcxEditValue; -begin - AEditProperties.PrepareDisplayValue(AValue, V, AEdit.Focused); - TcxComboBox(AEdit).ItemIndex := V; -end; - -class function TcxFilterRadioGroupHelper.UseDisplayValue: Boolean; -begin - Result := True; -end; - -initialization - GetRegisteredEditProperties.Register(TcxRadioGroupProperties, scxSEditRepositoryRadioGroupItem); - FilterEditsController.Register(TcxRadioGroupProperties, TcxFilterRadioGroupHelper); - -finalization - FilterEditsController.Unregister(TcxRadioGroupProperties, TcxFilterRadioGroupHelper); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxRegExpr.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxRegExpr.pas deleted file mode 100644 index e1d9d402..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxRegExpr.pas +++ /dev/null @@ -1,3115 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxRegExpr; - -{$I cxVer.inc} - -interface - -uses - SysUtils, Classes, cxClasses, cxEdit, cxEditConsts; - -type - { TcxRegExprError } - - TcxRegExprError = class - private - FChar: Integer; - FLine: Integer; - FMessage: string; - function GetFullMessage: string; - public - constructor Create(ALine: Integer; AChar: Integer; AMessage: string); - function Clone: TcxRegExprError; - property Char: Integer read FChar; - property FullMessage: string read GetFullMessage; - property Line: Integer read FLine; - property Message: string read FMessage; - end; - - { TcxRegExprErrors } - - TcxRegExprErrors = class - private - FErrors: TList; - function GetCount: Integer; - function GetItems(Index: Integer): TcxRegExprError; - public - constructor Create; - destructor Destroy; override; - procedure Add(AError: TcxRegExprError); - procedure Clear; - function Clone: TcxRegExprErrors; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxRegExprError read GetItems; default; - end; - - { EcxRegExprError } - - EcxRegExprError = class(EcxEditError) - private - FErrors: TcxRegExprErrors; - public - constructor Create(AErrors: TcxRegExprErrors); - property Errors: TcxRegExprErrors read FErrors; - end; - - { TcxLexem } - - TcxLexem = record - Char: Integer; - Code: Integer; - Line: Integer; - Value: string; - end; - PcxLexem = ^TcxLexem; - - { TcxRegExprLexemCode } - - TcxRegExprLexemCode = - ( - relcSymbol, - relcSpecial, - relcInteger, - relcAll, - relcId, - relcNotId, - relcDigit, - relcNotDigit, - relcSpace, - relcNotSpace, - relcReference, - relcDateSeparator, - relcTimeSeparator - ); - - { TcxLexems } - - TcxLexems = class - private - FLexems: TList; - function GetCount: Integer; - function GetItems(Index: Integer): TcxLexem; - public - constructor Create; - destructor Destroy; override; - procedure Add(ALexem: TcxLexem); - procedure Clear; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxLexem read GetItems; default; - end; - - { TcxRegExprItem } - - TcxRegExprItem = class - public - function Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; virtual; abstract; - function Clone: TcxRegExprItem; virtual; abstract; - end; - - { TcxRegExprSymbol } - - TcxRegExprSymbol = class(TcxRegExprItem) - private - FValue: Char; - public - constructor Create(AValue: Char); - function Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; override; - function Clone: TcxRegExprItem; override; - end; - - { TcxRegExprTimeSeparator } - - TcxRegExprTimeSeparator = class(TcxRegExprItem) - public - function Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; override; - function Clone: TcxRegExprItem; override; - function Value: Char; - end; - - { TcxRegExprDateSeparator } - - TcxRegExprDateSeparator = class(TcxRegExprItem) - public - function Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; override; - function Clone: TcxRegExprItem; override; - function Value: Char; - end; - - { TcxRegExprSubrange } - - TcxRegExprSubrange = class(TcxRegExprItem) - private - FStartValue: Char; - FFinishValue: Char; - public - constructor Create(AStartValue: Char; AFinishValue: Char); - function Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; override; - function Clone: TcxRegExprItem; override; - end; - - { TcxRegExprEnumeration } - - TcxRegExprEnumeration = class(TcxRegExprItem) - private - FInverse: Boolean; - public - constructor Create(AInverse: Boolean = False); - end; - - { TcxRegExprUserEnumeration } - - TcxRegExprUserEnumeration = class(TcxRegExprEnumeration) - private - FItems: TList; - function Item(AIndex: Integer): TcxRegExprItem; - public - constructor Create(AInverse: Boolean = False); - destructor Destroy; override; - procedure Add(AItem: TcxRegExprItem); - function Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; override; - function Clone: TcxRegExprItem; override; - end; - - { TcxRegExprDigit } - - TcxRegExprDigit = class(TcxRegExprEnumeration) - public - constructor Create(AInverse: Boolean = False); - function Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; override; - function Clone: TcxRegExprItem; override; - end; - - { TcxRegExprIdLetter } - - TcxRegExprIdLetter = class(TcxRegExprEnumeration) - public - constructor Create(AInverse: Boolean = False); - function Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; override; - function Clone: TcxRegExprItem; override; - end; - - { TcxRegExprSpace } - - TcxRegExprSpace = class(TcxRegExprEnumeration) - public - constructor Create(AInverse: Boolean = False); - function Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; override; - function Clone: TcxRegExprItem; override; - end; - - { TcxRegExprAll } - - TcxRegExprAll = class(TcxRegExprItem) - public - function Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; override; - function Clone: TcxRegExprItem; override; - end; - - TcxRegExprStates = class; - - { TcxRegExprState } - - TcxRegExprState = class - protected - FStates: TcxRegExprStates; - public - constructor Create; - destructor Destroy; override; - procedure Add(AState: TcxRegExprState); overload; - procedure Add(AStates: TcxRegExprStates); overload; - function Check(var AToken: Char; ACaseInsensitive: Boolean): TcxRegExprStates; virtual; - function Clone: TcxRegExprState; virtual; - function GetAllNextStates: TcxRegExprStates; - function GetSelf: TcxRegExprStates; virtual; - function Next(var AToken: Char; ACaseInsensitive: Boolean): TcxRegExprStates; - property States: TcxRegExprStates read FStates; - end; - - { TcxRegExprSimpleState } - - TcxRegExprSimpleState = class(TcxRegExprState) - private - FIsFinal: Boolean; - FValue: TcxRegExprItem; - public - constructor Create(AValue: TcxRegExprItem); - destructor Destroy; override; - function Check(var AToken: Char; ACaseInsensitive: Boolean): TcxRegExprStates; override; - function Clone: TcxRegExprState; override; - function GetSelf: TcxRegExprStates; override; - procedure SetFinal; - property IsFinal: Boolean read FIsFinal; - end; - - { TcxRegExprBlockState } - - TcxRegExprBlockState = class(TcxRegExprState) - public - function Check(var AToken: Char; ACaseInsensitive: Boolean): TcxRegExprStates; override; - function Clone: TcxRegExprState; override; - function GetSelf: TcxRegExprStates; override; - end; - - { TcxRegExprStates } - - TcxRegExprStates = class - private - FStates: TList; - function GetCount: Integer; - function GetState(AIndex: Integer): TcxRegExprState; - public - constructor Create; - destructor Destroy; override; - procedure Add(AState: TcxRegExprState); overload; - procedure Add(AStates: TcxRegExprStates); overload; - procedure Clear; - function Equ(var ASymbol: Char): Boolean; - function GetAllNextStates: TcxRegExprStates; - function IsFinal: Boolean; - function Next(var AToken: Char; ACaseInsensitive: Boolean): TcxRegExprStates; - property Count: Integer read GetCount; - property State[AIndex: Integer]: TcxRegExprState read GetState; default; - end; - - TcxRegExprParserAlts = class; - TcxRegExpr = class; - - { TcxRegExprAutomat } - - TcxRegExprAutomat = class - private - FCurrentStates: TcxRegExprStates; - FExpr: TcxRegExprParserAlts; - FHistory: TList; - FOwner: TcxRegExpr; - FStartState: TcxRegExprSimpleState; - function GetAllNextStates: TcxRegExprStates; - function Pop: TcxRegExprStates; - procedure Push(AStates: TcxRegExprStates); - public - constructor Create(AExpr: TcxRegExprParserAlts; AOwner: TcxRegExpr); - destructor Destroy; override; - function IsFinal: Boolean; - function IsStart: Boolean; - function Next(var AToken: Char; ACaseInsensitive: Boolean): Boolean; - function Prev: Boolean; - function Print: string; - procedure Reset; - procedure ReUpdate; - procedure Update; - end; - - { TcxRegExprQuantifier } - - TcxRegExprQuantifier = class - public - function CanMissing: Boolean; virtual; abstract; - function CanRepeat: Boolean; virtual; abstract; - function Clone: TcxRegExprQuantifier; virtual; abstract; - function Print: string; virtual; abstract; - end; - - { TcxRegExprSimpleQuantifier } - - TcxRegExprSimpleQuantifier = class(TcxRegExprQuantifier) // missing quantifier - public - function CanMissing: Boolean; override; - function CanRepeat: Boolean; override; - function Clone: TcxRegExprQuantifier; override; - function Print: string; override; - end; - - { TcxRegExprQuestionQuantifier } - - TcxRegExprQuestionQuantifier = class(TcxRegExprQuantifier) // ? - public - function CanMissing: Boolean; override; - function CanRepeat: Boolean; override; - function Clone: TcxRegExprQuantifier; override; - function Print: string; override; - end; - - { TcxRegExprStarQuantifier } - - TcxRegExprStarQuantifier = class(TcxRegExprQuantifier) // * - public - function CanMissing: Boolean; override; - function CanRepeat: Boolean; override; - function Clone: TcxRegExprQuantifier; override; - function Print: string; override; - end; - - { TcxRegExprPlusQuantifier } - - TcxRegExprPlusQuantifier = class(TcxRegExprQuantifier) // + - public - function CanMissing: Boolean; override; - function CanRepeat: Boolean; override; - function Clone: TcxRegExprQuantifier; override; - function Print: string; override; - end; - - { TcxRegExprParserItem } - - TcxRegExprParserItem = class - private - FQuantifier: TcxRegExprQuantifier; - public - constructor Create(AQuantifier: TcxRegExprQuantifier = nil); - destructor Destroy; override; - function CanEmpty: Boolean; virtual; abstract; - function CanMissing: Boolean; - function CanRepeat: Boolean; - function Clone: TcxRegExprParserItem; virtual; abstract; - function NotQuantifier: Boolean; - function Print: string; virtual; abstract; - procedure SetFinal; virtual; abstract; - procedure SetQuantifier(AQuantifier: TcxRegExprQuantifier); - end; - - { TcxRegExprParserSimpleItem } - - TcxRegExprParserSimpleItem = class(TcxRegExprParserItem) - private - FState: TcxRegExprState; - public - constructor Create(AState: TcxRegExprState; AQuantifier: TcxRegExprQuantifier = nil); - destructor Destroy; override; - function CanEmpty: Boolean; override; - function Clone: TcxRegExprParserItem; override; - function Print: string; override; - procedure SetFinal; override; - property State: TcxRegExprState read FState; - end; - - TcxRegExprParserAlt = class; - - { TcxRegExprParserBlockItem } - - TcxRegExprParserBlockItem = class(TcxRegExprParserItem) - private - FAlts: TcxRegExprParserAlts; - FFinishState: TcxRegExprState; - FStartState: TcxRegExprState; - public - constructor Create(AQuantifier: TcxRegExprQuantifier = nil); - destructor Destroy; override; - function CanEmpty: Boolean; override; - procedure CreateConnections; - procedure AddAlt(AAlt: TcxRegExprParserAlt); - procedure AddAlts(AAlts: TcxRegExprParserAlts); - function Clone: TcxRegExprParserItem; override; - function Print: string; override; - procedure SetFinal; override; - property Alts: TcxRegExprParserAlts read FAlts; - property FinishState: TcxRegExprState read FFinishState; - property StartState: TcxRegExprState read FStartState; - end; - - { TcxRegExprParserAlt } - - TcxRegExprParserAlt = class - private - FItems: TList; - function GetCount: Integer; - function GetFirstItem: TcxRegExprParserItem; - function GetItem(AIndex: Integer): TcxRegExprParserItem; - function GetLastItem: TcxRegExprParserItem; - procedure SetLastItem(AItem: TcxRegExprParserItem); - public - constructor Create; - destructor Destroy; override; - procedure Add(AItem: TcxRegExprParserItem); - function CanEmpty: Boolean; - function CanMissing: Boolean; - function Clone: TcxRegExprParserAlt; - procedure CreateConnections; - procedure CreateFinalStates; - function GetStartConnections: TcxRegExprStates; - function Print: string; - procedure SetFinishConnection(AFinishState: TcxRegExprState); - property Count: Integer read GetCount; - property FirstItem: TcxRegExprParserItem read GetFirstItem; - property Item[AIndex: Integer]: TcxRegExprParserItem read GetItem; default; - property LastItem: TcxRegExprParserItem read GetLastItem write SetLastItem; - end; - - { TcxRegExprParserAlts } - - TcxRegExprParserAlts = class - private - FAlts: TList; - function GetAlt(AIndex: Integer): TcxRegExprParserAlt; - function GetCount: Integer; - function GetLastAlt: TcxRegExprParserAlt; - public - constructor Create; - destructor Destroy; override; - procedure Add(AAlt: TcxRegExprParserAlt); - procedure AddAlt; - function CanEmpty: Boolean; - procedure CreateConnections; - procedure CreateFinalStates; - function Clone: TcxRegExprParserAlts; - function GetStartConnections: TcxRegExprStates; - function Print: string; - procedure SetFinishConnections(AFinishState: TcxRegExprState); - function StartStateIsFinal: Boolean; - function ThereIsEmptyAlt: Boolean; - property Alt[AIndex: Integer]: TcxRegExprParserAlt read GetAlt; default; - property Count: Integer read GetCount; - property LastAlt: TcxRegExprParserAlt read GetLastAlt; - end; - - TcxSymbolDeleteEvent = procedure of object; - TcxSymbolUpdateEvent = procedure(ASymbol: Char) of object; - - { TcxRegExpr } - - TcxRegExpr = class - private - FAutomat: TcxRegExprAutomat; - FBlocks: TList; - FChar: Integer; - FCaseInsensitive: Boolean; - FCompiled: Boolean; - FErrors: TcxRegExprErrors; - FFirstExpr: Boolean; - FIndex: Integer; - FLexemIndex: Integer; - FLexems: TcxLexems; - FLine: Integer; - FOnSymbolDelete: TcxSymbolDeleteEvent; - FOnSymbolUpdate: TcxSymbolUpdateEvent; - FStream: TMemoryStream; - FUpdateOn: Boolean; - procedure Clear; - function Decimal(AToken: Char): Boolean; - function EmptyStream: Boolean; - function CreateLexem(ALine: Integer; AChar: Integer; ACode: Integer; - AValue: string): TcxLexem; - function GetLexem(var ALexem: TcxLexem): Boolean; - function GetToken(out AToken: Char): Boolean; - function GetStream: TStream; - function Hexadecimal(AToken: Char): Boolean; - function LookToken(out AToken: Char; APtr: Integer): Boolean; - function ParseAlt(AAlt: TcxRegExprParserAlt; Global: Boolean = True): Boolean; - function ParseBlock: TcxRegExprParserBlockItem; - function ParseEnumeration: TcxRegExprParserSimpleItem; - procedure ParseExpr; - procedure ParseQuantifier(var A: Integer; var B: Integer); - procedure ScanASCII(ALine: Integer; AChar: Integer); - procedure ScanClass; - procedure ScanExpr; - procedure ScanEscape(ALine: Integer; AChar: Integer); - function ScanInteger(ALine: Integer; AChar: Integer; var AToken: Char): Boolean; - procedure ScanQuantifier; - procedure ScanString; - procedure SetUpdateOn(AUpdateOn: Boolean); - function Space(AToken: Char): Boolean; - procedure SymbolDelete; - procedure SymbolUpdate(ASymbol: Char); - procedure TestCompiledStatus; - public - constructor Create; - destructor Destroy; override; - procedure Compile(AStream: TStream); - function IsCompiled: Boolean; - function IsFinal: Boolean; - function IsStart: Boolean; - function Next(var AToken: Char): Boolean; - function NextEx(const AString: string): string; - function Prev: Boolean; - function Print: string; - procedure Reset; - property CaseInsensitive: Boolean read FCaseInsensitive write FCaseInsensitive; - property Stream: TStream read GetStream; - property UpdateOn: Boolean read FUpdateOn write SetUpdateOn; - property OnSymbolDelete: TcxSymbolDeleteEvent read FOnSymbolDelete write FOnSymbolDelete; - property OnSymbolUpdate: TcxSymbolUpdateEvent read FOnSymbolUpdate write FOnSymbolUpdate; - end; - - function IsTextFullValid(const AText, AMask: string): Boolean; - function IsTextValid(const AText, AMask: string): Boolean; - -implementation - -uses - cxEditUtils; - -{ TcxRegExprError } - -constructor TcxRegExprError.Create(ALine, AChar: Integer; AMessage: string); -begin - inherited Create; - FLine := ALine; - FChar := AChar; - FMessage := AMessage; -end; - -function TcxRegExprError.Clone: TcxRegExprError; -begin - Result := TcxRegExprError.Create(FLine, FChar, FMessage); -end; - -function TcxRegExprError.GetFullMessage: string; -begin - Result := ''; - if FLine > 0 then - begin - Result := Result + cxGetResourceString(@scxRegExprLine) + IntToStr(FLine); - if FChar > 0 then - Result := Result + ', ' + cxGetResourceString(@scxRegExprChar) + IntToStr(FChar); - Result := Result + ': '; - end; - Result := Result + FMessage; -end; - -{ TcxRegExprErrors } - -constructor TcxRegExprErrors.Create; -begin - inherited Create; - FErrors := TList.Create; -end; - -destructor TcxRegExprErrors.Destroy; -begin - Clear; - FErrors.Free; - inherited Destroy; -end; - -procedure TcxRegExprErrors.Add(AError: TcxRegExprError); -begin - FErrors.Add(AError); -end; - -procedure TcxRegExprErrors.Clear; -var - I: Integer; -begin - for I := 0 to FErrors.Count - 1 do - TcxRegExprError(FErrors[I]).Free; - FErrors.Clear; -end; - -function TcxRegExprErrors.Clone: TcxRegExprErrors; -var - I: Integer; -begin - Result := TcxRegExprErrors.Create; - - for I := 0 to Count - 1 do - Result.Add(Items[I].Clone); -end; - -function TcxRegExprErrors.GetCount: Integer; -begin - Result := FErrors.Count; -end; - -function TcxRegExprErrors.GetItems(Index: Integer): TcxRegExprError; -begin - Result := TcxRegExprError(FErrors[Index]); -end; - -{ EcxRegExprError } - -constructor EcxRegExprError.Create(AErrors: TcxRegExprErrors); -begin - FErrors := AErrors; -end; - -{ TcxLexems } - -constructor TcxLexems.Create; -begin - inherited Create; - FLexems := TList.Create; -end; - -destructor TcxLexems.Destroy; -begin - Clear; - FLexems.Free; - inherited Destroy; -end; - -procedure TcxLexems.Add(ALexem: TcxLexem); -var - LexemP: PcxLexem; -begin - New(LexemP); - LexemP^ := ALexem; - FLexems.Add(LexemP); -end; - -procedure TcxLexems.Clear; -var - I: Integer; -begin - for I := 0 to FLexems.Count - 1 do - Dispose(PcxLexem(FLexems[I])); - FLexems.Clear; -end; - -function TcxLexems.GetCount: Integer; -begin - Result := FLexems.Count; -end; - -function TcxLexems.GetItems(Index: Integer): TcxLexem; -begin - Result := PcxLexem(FLexems[Index])^; -end; - -{ TcxRegExprSymbol } - -constructor TcxRegExprSymbol.Create(AValue: Char); -begin - inherited Create; - FValue := AValue; -end; - -function TcxRegExprSymbol.Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; -begin - if ACaseInsensitive then - begin - Result := AnsiUpperCase(AToken) = AnsiUpperCase(FValue); - if Result then - AToken := FValue; - end - else - Result := AToken = FValue; -end; - -function TcxRegExprSymbol.Clone: TcxRegExprItem; -begin - Result := TcxRegExprSymbol.Create(FValue); -end; - -{ TcxRegExprTimeSeparator } - -function TcxRegExprTimeSeparator.Check(var AToken: Char; - ACaseInsensitive: Boolean): Boolean; -begin - Result := AToken = Value; -end; - -function TcxRegExprTimeSeparator.Clone: TcxRegExprItem; -begin - Result := TcxRegExprTimeSeparator.Create; -end; - -function TcxRegExprTimeSeparator.Value: Char; -begin - Result := TimeSeparator; -end; - -{ TcxRegExprDateSeparator } - -function TcxRegExprDateSeparator.Check(var AToken: Char; - ACaseInsensitive: Boolean): Boolean; -begin - Result := AToken = Value; -end; - -function TcxRegExprDateSeparator.Clone: TcxRegExprItem; -begin - Result := TcxRegExprDateSeparator.Create; -end; - -function TcxRegExprDateSeparator.Value: Char; -begin - Result := DateSeparator; -end; - -{ TcxRegExprSubrange } - -constructor TcxRegExprSubrange.Create(AStartValue, AFinishValue: Char); -begin - inherited Create; - FStartValue := AStartValue; - FFinishValue := AFinishValue; -end; - -function TcxRegExprSubrange.Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; -begin - Result := (AToken >= FStartValue) and (AToken <= FFinishValue); -end; - -function TcxRegExprSubrange.Clone: TcxRegExprItem; -begin - Result := TcxRegExprSubrange.Create(FStartValue, FFinishValue); -end; - -{ TcxRegExprEnumeration } - -constructor TcxRegExprEnumeration.Create(AInverse: Boolean = False); -begin - inherited Create; - FInverse := AInverse; -end; - -{ TcxRegExprUserEnumeration } - -constructor TcxRegExprUserEnumeration.Create(AInverse: Boolean); -begin - inherited Create(AInverse); - - FItems := TList.Create; -end; - -destructor TcxRegExprUserEnumeration.Destroy; -var - I: Integer; -begin - for I := 0 to FItems.Count - 1 do - Item(I).Free; - FItems.Free; - inherited Destroy; -end; - -procedure TcxRegExprUserEnumeration.Add(AItem: TcxRegExprItem); -begin - FItems.Add(AItem); -end; - -function TcxRegExprUserEnumeration.Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; -var - I: Integer; -begin - for I := 0 to FItems.Count - 1 do - if Item(I).Check(AToken, ACaseInsensitive) then - begin - Result := not FInverse; - Exit; - end; - - Result := FInverse; -end; - -function TcxRegExprUserEnumeration.Item(AIndex: Integer): TcxRegExprItem; -begin - Result := TcxRegExprItem(FItems[AIndex]); -end; - -function TcxRegExprUserEnumeration.Clone: TcxRegExprItem; -var - I: Integer; -begin - Result := TcxRegExprUserEnumeration.Create(FInverse); - - for I := 0 to FItems.Count - 1 do - TcxRegExprUserEnumeration(Result).Add(Item(I).Clone); -end; - -{ TcxRegExprDigit } - -constructor TcxRegExprDigit.Create(AInverse: Boolean); -begin - inherited Create(AInverse); -end; - -function TcxRegExprDigit.Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; -begin - if (AToken >= '0') and (AToken <= '9') then - Result := not FInverse - else - Result := FInverse; -end; - -function TcxRegExprDigit.Clone: TcxRegExprItem; -begin - Result := TcxRegExprDigit.Create(FInverse); -end; - -{ TcxRegExprIdLetter } - -constructor TcxRegExprIdLetter.Create(AInverse: Boolean); -begin - inherited Create(AInverse); -end; - -function TcxRegExprIdLetter.Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; -begin - if ((AToken >= 'a') and (AToken <= 'z')) or (AToken = '_') or - ((AToken >= 'A') and (AToken <= 'Z')) or - ((AToken >= '0') and (AToken <= '9')) then - Result := not FInverse - else - Result := FInverse; -end; - -function TcxRegExprIdLetter.Clone: TcxRegExprItem; -begin - Result := TcxRegExprIdLetter.Create(FInverse); -end; - -{ TcxRegExprSpace } - -constructor TcxRegExprSpace.Create(AInverse: Boolean); -begin - inherited Create(AInverse); -end; - -function TcxRegExprSpace.Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; -begin - if (AToken = ' ') or (AToken = #0) or (AToken = #9) or - (AToken = #10) or (AToken = #12) or (AToken = #13) then - Result := not FInverse - else - Result := FInverse; -end; - -function TcxRegExprSpace.Clone: TcxRegExprItem; -begin - Result := TcxRegExprSpace.Create(FInverse); -end; - -{ TcxRegExprAll } - -function TcxRegExprAll.Check(var AToken: Char; ACaseInsensitive: Boolean): Boolean; -begin - Result := True; -end; - -function TcxRegExprAll.Clone: TcxRegExprItem; -begin - Result := TcxRegExprAll.Create; -end; - -{ TcxRegExprState } - -constructor TcxRegExprState.Create; -begin - inherited Create; - FStates := TcxRegExprStates.Create; -end; - -destructor TcxRegExprState.Destroy; -begin - FStates.Free; - inherited Destroy; -end; - -procedure TcxRegExprState.Add(AState: TcxRegExprState); -begin - States.Add(AState); -end; - -procedure TcxRegExprState.Add(AStates: TcxRegExprStates); -begin - States.Add(AStates); -end; - -function TcxRegExprState.Check(var AToken: Char; ACaseInsensitive: Boolean): TcxRegExprStates; -begin - Result := TcxRegExprStates.Create; -end; - -function TcxRegExprState.Clone: TcxRegExprState; -begin - Result := TcxRegExprState.Create; -end; - -function TcxRegExprState.GetAllNextStates: TcxRegExprStates; -var - I: Integer; -begin - Result := TcxRegExprStates.Create; - - for I := 0 to States.Count - 1 do - Result.Add(States[I].GetSelf); -end; - -function TcxRegExprState.GetSelf: TcxRegExprStates; -begin - Result := TcxRegExprStates.Create; - - Result.Add(Self); -end; - -function TcxRegExprState.Next(var AToken: Char; ACaseInsensitive: Boolean): TcxRegExprStates; -var - I: Integer; -begin - Result := TcxRegExprStates.Create; - - for I := 0 to FStates.Count - 1 do - Result.Add(FStates[I].Check(AToken, ACaseInsensitive)); -end; - -{ TcxRegExprSimpleState } - -constructor TcxRegExprSimpleState.Create(AValue: TcxRegExprItem); -begin - inherited Create; - - FValue := AValue; - FIsFinal := False; -end; - -destructor TcxRegExprSimpleState.Destroy; -begin - if FValue <> nil then - FValue.Free; - - inherited Destroy; -end; - -function TcxRegExprSimpleState.Check(var AToken: Char; ACaseInsensitive: Boolean): TcxRegExprStates; -begin - Result := TcxRegExprStates.Create; - - if FValue.Check(AToken, ACaseInsensitive) then - Result.Add(Self); -end; - -function TcxRegExprSimpleState.Clone: TcxRegExprState; -begin - Result := TcxRegExprSimpleState.Create(FValue.Clone); -end; - -function TcxRegExprSimpleState.GetSelf: TcxRegExprStates; -begin - Result := TcxRegExprStates.Create; - - Result.Add(Self); -end; - -procedure TcxRegExprSimpleState.SetFinal; -begin - FIsFinal := True; -end; - -{ TcxRegExprBlockState } - -function TcxRegExprBlockState.Check(var AToken: Char; ACaseInsensitive: Boolean): TcxRegExprStates; -begin - Result := Next(AToken, ACaseInsensitive); -end; - -function TcxRegExprBlockState.Clone: TcxRegExprState; -begin - Result := TcxRegExprBlockState.Create; -end; - -function TcxRegExprBlockState.GetSelf: TcxRegExprStates; -var - I: Integer; -begin - Result := TcxRegExprStates.Create; - - for I := 0 to States.Count - 1 do - Result.Add(States[I].GetSelf); -end; - -{ TcxRegExprStates } - -constructor TcxRegExprStates.Create; -begin - inherited Create; - FStates := TList.Create; -end; - -destructor TcxRegExprStates.Destroy; -begin - FStates.Free; - inherited Destroy; -end; - -procedure TcxRegExprStates.Add(AState: TcxRegExprState); -begin - FStates.Add(AState); -end; - -procedure TcxRegExprStates.Add(AStates: TcxRegExprStates); -var - I: Integer; -begin - for I := 0 to AStates.Count - 1 do - Add(AStates.State[I]); - AStates.Free; -end; - -procedure TcxRegExprStates.Clear; -begin - FStates.Clear; -end; - -function TcxRegExprStates.Equ(var ASymbol: Char): Boolean; -var - I: Integer; - Flag: Boolean; -begin - if Count = 0 then - begin - Result := False; - Exit; - end; - - Flag := False; - - for I := 0 to Count - 1 do - begin - if State[I] is TcxRegExprSimpleState then - begin - with TcxRegExprSimpleState(State[I]) do - begin - if FValue is TcxRegExprSymbol then - begin - if not Flag then - begin - ASymbol := TcxRegExprSymbol(FValue).FValue; - Flag := True; - end - else - begin - if ASymbol <> TcxRegExprSymbol(FValue).FValue then - begin - Result := False; - Exit; - end; - end; - end - else if FValue is TcxRegExprTimeSeparator then - begin - if not Flag then - begin - ASymbol := TcxRegExprTimeSeparator(FValue).Value; - Flag := True; - end - else - begin - if ASymbol <> TcxRegExprTimeSeparator(FValue).Value then - begin - Result := False; - Exit; - end; - end; - end - else if FValue is TcxRegExprDateSeparator then - begin - if not Flag then - begin - ASymbol := TcxRegExprDateSeparator(FValue).Value; - Flag := True; - end - else - begin - if ASymbol <> TcxRegExprDateSeparator(FValue).Value then - begin - Result := False; - Exit; - end; - end; - end - else - begin - Result := False; - Exit; - end; - end; - end - else - begin - Result := False; - Exit; - end; - end; - - Result := True; -end; - -function TcxRegExprStates.GetAllNextStates: TcxRegExprStates; -var - I: Integer; -begin - Result := TcxRegExprStates.Create; - - for I := 0 to Count - 1 do - Result.Add(State[I].GetAllNextStates); -end; - -function TcxRegExprStates.IsFinal: Boolean; -var - I: Integer; -begin - for I := 0 to Count - 1 do - if TcxRegExprSimpleState(State[I]).IsFinal then - begin - Result := True; - Exit; - end; - - Result := False; -end; - -function TcxRegExprStates.Next(var AToken: Char; ACaseInsensitive: Boolean): TcxRegExprStates; -var - I: Integer; -begin - Result := TcxRegExprStates.Create; - - for I := 0 to Count - 1 do - Result.Add(State[I].Next(AToken, ACaseInsensitive)); -end; - -function TcxRegExprStates.GetCount: Integer; -begin - Result := FStates.Count; -end; - -function TcxRegExprStates.GetState(AIndex: Integer): TcxRegExprState; -begin - Result := TcxRegExprState(FStates[AIndex]); -end; - -{ TcxRegExprAutomat } - -constructor TcxRegExprAutomat.Create(AExpr: TcxRegExprParserAlts; AOwner: TcxRegExpr); -begin - inherited Create; - FHistory := TList.Create; - FExpr := AExpr; - FStartState := TcxRegExprSimpleState.Create(nil); - FStartState.Add(FExpr.GetStartConnections); - if FExpr.StartStateIsFinal then - FStartState.SetFinal; - FCurrentStates := TcxRegExprStates.Create; - FCurrentStates.Add(FStartState); - FOwner := AOwner; -end; - -destructor TcxRegExprAutomat.Destroy; -var - I: Integer; -begin - for I := 0 to FHistory.Count - 1 do - TcxRegExprStates(FHistory[I]).Free; - FHistory.Free; - FCurrentStates.Free; - FExpr.Free; - FStartState.Free; - inherited Destroy; -end; - -function TcxRegExprAutomat.GetAllNextStates: TcxRegExprStates; -begin - Result := FCurrentStates.GetAllNextStates -end; - -function TcxRegExprAutomat.IsFinal: Boolean; -begin - Result := FCurrentStates.IsFinal; -end; - -function TcxRegExprAutomat.IsStart: Boolean; -begin - Result := FCurrentStates[0] = FStartState; -end; - -function TcxRegExprAutomat.Next(var AToken: Char; ACaseInsensitive: Boolean): Boolean; -var - NextStates: TcxRegExprStates; -begin - NextStates := FCurrentStates.Next(AToken, ACaseInsensitive); - if NextStates.Count > 0 then - begin - Push(FCurrentStates); - FCurrentStates := NextStates; - Result := True; - end - else - begin - NextStates.Free; - Result := False; - end; -end; - -function TcxRegExprAutomat.Prev: Boolean; -var - LastStates: TcxRegExprStates; -begin - LastStates := Pop; - if LastStates = nil then - Result := False - else - begin - FCurrentStates.Free; - FCurrentStates := LastStates; - Result := True; - end; -end; - -function TcxRegExprAutomat.Print: string; -begin - Result := FExpr.Print; -end; - -procedure TcxRegExprAutomat.Reset; -var - I: Integer; -begin - for I := 0 to FHistory.Count - 1 do - TcxRegExprStates(FHistory[I]).Free; - FHistory.Clear; - FCurrentStates.Free; - FCurrentStates := TcxRegExprStates.Create; - FCurrentStates.Add(FStartState); -end; - -procedure TcxRegExprAutomat.ReUpdate; -var - ASymbol: Char; - PrevStates: TcxRegExprStates; - AllNextStates: TcxRegExprStates; -begin - while FCurrentStates.Equ(ASymbol) do - begin - PrevStates := Pop; - if PrevStates = nil then - begin - Push(PrevStates); - Exit; - end; - - AllNextStates := PrevStates.GetAllNextStates; - if not AllNextStates.Equ(ASymbol) or PrevStates.IsFinal then - begin - Push(PrevStates); - AllNextStates.Free; - Exit; - end - else - AllNextStates.Free; - - FOwner.SymbolDelete; - - FCurrentStates.Free; - FCurrentStates := PrevStates; - end; -end; - -procedure TcxRegExprAutomat.Update; -var - NextStates: TcxRegExprStates; - ASymbol: Char; -begin - if FCurrentStates.IsFinal then - Exit; - - NextStates := GetAllNextStates; - - while NextStates.Equ(ASymbol) do - begin - FOwner.SymbolUpdate(ASymbol); - - Push(FCurrentStates); - FCurrentStates := NextStates; - - if NextStates.IsFinal then - Exit; - - NextStates := GetAllNextStates; - end; - - NextStates.Free; -end; - -function TcxRegExprAutomat.Pop: TcxRegExprStates; -begin - if FHistory.Count > 0 then - begin - Result := TcxRegExprStates(FHistory.Last); - FHistory.Delete(FHistory.Count - 1); - end - else - Result := nil; -end; - -procedure TcxRegExprAutomat.Push(AStates: TcxRegExprStates); -begin - FHistory.Add(AStates); -end; - -{ TcxRegExprSimpleQuantifier } - -function TcxRegExprSimpleQuantifier.CanMissing: Boolean; -begin - Result := False; -end; - -function TcxRegExprSimpleQuantifier.CanRepeat: Boolean; -begin - Result := False; -end; - -function TcxRegExprSimpleQuantifier.Clone: TcxRegExprQuantifier; -begin - Result := TcxRegExprSimpleQuantifier.Create; -end; - -function TcxRegExprSimpleQuantifier.Print: string; -begin - Result := ''; -end; - -{ TcxRegExprQuestionQuantifier } - -function TcxRegExprQuestionQuantifier.CanMissing: Boolean; -begin - Result := True; -end; - -function TcxRegExprQuestionQuantifier.CanRepeat: Boolean; -begin - Result := False; -end; - -function TcxRegExprQuestionQuantifier.Clone: TcxRegExprQuantifier; -begin - Result := TcxRegExprQuestionQuantifier.Create; -end; - -function TcxRegExprQuestionQuantifier.Print: string; -begin - Result := '?'; -end; - -{ TcxRegExprStarQuantifier } - -function TcxRegExprStarQuantifier.CanMissing: Boolean; -begin - Result := True; -end; - -function TcxRegExprStarQuantifier.CanRepeat: Boolean; -begin - Result := True; -end; - -function TcxRegExprStarQuantifier.Clone: TcxRegExprQuantifier; -begin - Result := TcxRegExprStarQuantifier.Create; -end; - -function TcxRegExprStarQuantifier.Print: string; -begin - Result := '*'; -end; - -{ TcxRegExprPlusQuantifier } - -function TcxRegExprPlusQuantifier.CanMissing: Boolean; -begin - Result := False; -end; - -function TcxRegExprPlusQuantifier.CanRepeat: Boolean; -begin - Result := True; -end; - -function TcxRegExprPlusQuantifier.Clone: TcxRegExprQuantifier; -begin - Result := TcxRegExprPlusQuantifier.Create; -end; - -function TcxRegExprPlusQuantifier.Print: string; -begin - Result := '+'; -end; - -{ TcxRegExprParserItem } - -constructor TcxRegExprParserItem.Create(AQuantifier: TcxRegExprQuantifier = nil); -begin - inherited Create; - if AQuantifier = nil then - FQuantifier := TcxRegExprSimpleQuantifier.Create - else - FQuantifier := AQuantifier; -end; - -destructor TcxRegExprParserItem.Destroy; -begin - FQuantifier.Free; - inherited Destroy; -end; - -function TcxRegExprParserItem.CanMissing: Boolean; -begin - Result := FQuantifier.CanMissing; -end; - -function TcxRegExprParserItem.CanRepeat: Boolean; -begin - Result := FQuantifier.CanRepeat; -end; - -function TcxRegExprParserItem.NotQuantifier: Boolean; -begin - Result := FQuantifier is TcxRegExprSimpleQuantifier; -end; - -procedure TcxRegExprParserItem.SetQuantifier( - AQuantifier: TcxRegExprQuantifier); -begin - if AQuantifier <> nil then - begin - FQuantifier.Free; - FQuantifier := AQuantifier; - end; -end; - -{ TcxRegExprParserSimpleItem } - -constructor TcxRegExprParserSimpleItem.Create(AState: TcxRegExprState; - AQuantifier: TcxRegExprQuantifier); -begin - inherited Create(AQuantifier); - FState := AState; -end; - -destructor TcxRegExprParserSimpleItem.Destroy; -begin - if FState <> nil then - FState.Free; - inherited Destroy; -end; - -function TcxRegExprParserSimpleItem.CanEmpty: Boolean; -begin - Result := FQuantifier.CanMissing; -end; - -function TcxRegExprParserSimpleItem.Clone: TcxRegExprParserItem; -begin - Result := TcxRegExprParserSimpleItem.Create(FState.Clone, FQuantifier.Clone); -end; - -function TcxRegExprParserSimpleItem.Print: string; -begin - Result := 'item --> ' + FQuantifier.Print + #13#10; -end; - -procedure TcxRegExprParserSimpleItem.SetFinal; -begin - TcxRegExprSimpleState(State).SetFinal; -end; - -{ TcxRegExprParserBlockItem } - -constructor TcxRegExprParserBlockItem.Create(AQuantifier: TcxRegExprQuantifier = nil); -begin - inherited Create(AQuantifier); - - FStartState := TcxRegExprBlockState.Create; - FFinishState := TcxRegExprBlockState.Create; - FAlts := TcxRegExprParserAlts.Create; -end; - -destructor TcxRegExprParserBlockItem.Destroy; -begin - FStartState.Free; - FFinishState.Free; - FAlts.Free; - - inherited Destroy; -end; - -function TcxRegExprParserBlockItem.CanEmpty: Boolean; -begin - if FQuantifier.CanMissing then - Result := True - else - Result := Alts.CanEmpty; -end; - -procedure TcxRegExprParserBlockItem.CreateConnections; -begin - Alts.CreateConnections; -end; - -procedure TcxRegExprParserBlockItem.AddAlt(AAlt: TcxRegExprParserAlt); -begin - FAlts.Add(AAlt); -end; - -procedure TcxRegExprParserBlockItem.AddAlts(AAlts: TcxRegExprParserAlts); -var - I: Integer; -begin - for I := 0 to AAlts.Count - 1 do - FAlts.Add(AAlts[I]); - AAlts.Free; -end; - -function TcxRegExprParserBlockItem.Clone: TcxRegExprParserItem; -begin - Result := TcxRegExprParserBlockItem.Create(FQuantifier.Clone); - with TcxRegExprParserBlockItem(Result) do - begin - FAlts.Free; - FAlts := Self.Alts.Clone; - end; -end; - -function TcxRegExprParserBlockItem.Print: string; -begin - Result := ''#13#10; - Result := Result + Alts.Print; - Result := Result + ' --> ' + FQuantifier.Print + #13#10; -end; - -procedure TcxRegExprParserBlockItem.SetFinal; -begin - Alts.CreateFinalStates; -end; - -{ TcxRegExprParserAlt } - -constructor TcxRegExprParserAlt.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TcxRegExprParserAlt.Destroy; -var - I: Integer; -begin - for I := 0 to FItems.Count - 1 do - TcxRegExprParserItem(FItems[I]).Free; - FItems.Free; - inherited Destroy; -end; - -procedure TcxRegExprParserAlt.Add(AItem: TcxRegExprParserItem); -begin - FItems.Add(AItem); -end; - -function TcxRegExprParserAlt.CanEmpty: Boolean; -var - I: Integer; -begin - for I := 0 to Count - 1 do - if not Item[I].CanEmpty then - begin - Result := False; - Exit; - end; - - Result := True; -end; - -function TcxRegExprParserAlt.CanMissing: Boolean; -var - I: Integer; -begin - for I := 0 to Count - 1 do - if not Item[I].CanMissing then - begin - Result := False; - Exit; - end; - - Result := True; -end; - -function TcxRegExprParserAlt.Clone: TcxRegExprParserAlt; -var - I: Integer; -begin - Result := TcxRegExprParserAlt.Create; - - for I := 0 to Count - 1 do - Result.Add(Item[I].Clone); -end; - -procedure TcxRegExprParserAlt.CreateConnections; -var - I, J: Integer; -begin - for I := 0 to Count - 1 do - begin - if Item[I] is TcxRegExprParserSimpleItem then - begin - with TcxRegExprParserSimpleItem(Item[I]) do - begin - for J := I + 1 to Count - 1 do - begin - if Item[J] is TcxRegExprParserSimpleItem then - State.Add(TcxRegExprParserSimpleItem(Item[J]).State) - else if Item[J] is TcxRegExprParserBlockItem then - State.Add(TcxRegExprParserBlockItem(Item[J]).StartState); - - if not Item[J].CanMissing then - Break; - end; - - if Item[I].CanRepeat then - State.Add(State); - end; - end - else if Item[I] is TcxRegExprParserBlockItem then - begin - with TcxRegExprParserBlockItem(Item[I]) do - begin - for J := I + 1 to Count - 1 do - begin - if Item[J] is TcxRegExprParserSimpleItem then - FinishState.Add(TcxRegExprParserSimpleItem(Item[J]).State) - else if Item[J] is TcxRegExprParserBlockItem then - FinishState.Add(TcxRegExprParserBlockItem(Item[J]).StartState); - - if not Item[J].CanMissing then - Break; - end; - - if Item[I].CanRepeat then - FinishState.Add(StartState); - - StartState.Add(Alts.GetStartConnections); - if Alts.ThereIsEmptyAlt then - StartState.Add(FinishState); - - Alts.CreateConnections; - Alts.SetFinishConnections(FinishState); - end; - end; - end; -end; - -procedure TcxRegExprParserAlt.CreateFinalStates; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - begin - Item[I].SetFinal; - - if not Item[I].CanMissing then - Break; - end; -end; - -function TcxRegExprParserAlt.GetStartConnections: TcxRegExprStates; -var - I: Integer; -begin - Result := TcxRegExprStates.Create; - - for I := 0 to Count - 1 do - begin - if Item[I] is TcxRegExprParserSimpleItem then - Result.Add(TcxRegExprParserSimpleItem(Item[I]).State) - else if Item[I] is TcxRegExprParserBlockItem then - Result.Add(TcxRegExprParserBlockItem(Item[I]).StartState); - - if not Item[I].CanMissing then - Break; - end; -end; - -function TcxRegExprParserAlt.Print: string; -var - I: Integer; -begin - Result := ''#13#10; - for I := 0 to Count - 1 do - Result := Result + Item[I].Print; - Result := result + ''#13#10; -end; - -procedure TcxRegExprParserAlt.SetFinishConnection( - AFinishState: TcxRegExprState); -var - I: Integer; -begin - for I := Count - 1 downto 0 do - begin - if Item[I] is TcxRegExprParserSimpleItem then - TcxRegExprParserSimpleItem(Item[I]).State.Add(AFinishState) - else if Item[I] is TcxRegExprParserBlockItem then - TcxRegExprParserBlockItem(Item[I]).FinishState.Add(AFinishState); - - if not Item[I].CanMissing then - Break; - end; -end; - -function TcxRegExprParserAlt.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxRegExprParserAlt.GetFirstItem: TcxRegExprParserItem; -begin - Result := TcxRegExprParserItem(FItems[0]); -end; - -function TcxRegExprParserAlt.GetItem( - AIndex: Integer): TcxRegExprParserItem; -begin - Result := TcxRegExprParserItem(FItems[AIndex]); -end; - -function TcxRegExprParserAlt.GetLastItem: TcxRegExprParserItem; -begin - Result := TcxRegExprParserItem(FItems.Last); -end; - -procedure TcxRegExprParserAlt.SetLastItem(AItem: TcxRegExprParserItem); -begin - TcxRegExprParserItem(FItems[FItems.Count - 1]).Free; - FItems.Delete(FItems.Count - 1); - FItems.Add(AItem); -end; - -{ TcxRegExprParserAlts } - -constructor TcxRegExprParserAlts.Create; -begin - inherited Create; - FAlts := TList.Create; -end; - -destructor TcxRegExprParserAlts.Destroy; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Alt[I].Free; - FAlts.Free; - inherited Destroy; -end; - -procedure TcxRegExprParserAlts.Add(AAlt: TcxRegExprParserAlt); -begin - FAlts.Add(AAlt); -end; - -procedure TcxRegExprParserAlts.AddAlt; -begin - FAlts.Add(TcxRegExprParserAlt.Create) -end; - -function TcxRegExprParserAlts.CanEmpty: Boolean; -var - I: Integer; -begin - for I := 0 to Count - 1 do - if Alt[I].CanEmpty then - begin - Result := True; - Exit; - end; - - Result := False; -end; - -procedure TcxRegExprParserAlts.CreateConnections; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Alt[I].CreateConnections; -end; - -procedure TcxRegExprParserAlts.CreateFinalStates; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Alt[I].CreateFinalStates; -end; - -function TcxRegExprParserAlts.Clone: TcxRegExprParserAlts; -var - I: Integer; -begin - Result := TcxRegExprParserAlts.Create; - - for I := 0 to Count - 1 do - Result.Add(Alt[I].Clone); -end; - -function TcxRegExprParserAlts.GetStartConnections: TcxRegExprStates; -var - I: Integer; -begin - Result := TcxRegExprStates.Create; - - for I := 0 to Count - 1 do - Result.Add(Alt[I].GetStartConnections); -end; - -function TcxRegExprParserAlts.Print: string; -var - I: Integer; -begin - Result := ''; - for I := 0 to Count - 1 do - Result := Result + Alt[I].Print; -end; - -procedure TcxRegExprParserAlts.SetFinishConnections( - AFinishState: TcxRegExprState); -var - I: Integer; -begin - for I := 0 to Count - 1 do - Alt[I].SetFinishConnection(AFinishState); -end; - -function TcxRegExprParserAlts.StartStateIsFinal: Boolean; -var - I: Integer; -begin - for I := 0 to Count - 1 do - if Alt[I].CanMissing then - begin - Result := True; - Exit; - end; - - Result := False; -end; - -function TcxRegExprParserAlts.ThereIsEmptyAlt: Boolean; -var - I: Integer; -begin - for I := 0 to Count - 1 do - if Alt[I].CanMissing then - begin - Result := True; - Exit; - end; - - Result := False; -end; - -function TcxRegExprParserAlts.GetAlt(AIndex: Integer): TcxRegExprParserAlt; -begin - Result := TcxRegExprParserAlt(FAlts[AIndex]); -end; - -function TcxRegExprParserAlts.GetCount: Integer; -begin - Result := FAlts.Count; -end; - -function TcxRegExprParserAlts.GetLastAlt: TcxRegExprParserAlt; -begin - Result := TcxRegExprParserAlt(FAlts.Last); -end; - -{ TcxRegExpr } - -constructor TcxRegExpr.Create; -begin - inherited Create; - FStream := TMemoryStream.Create; - FErrors := TcxRegExprErrors.Create; - FLexems := TcxLexems.Create; - FBlocks := TList.Create; - FAutomat := nil; - FIndex := 0; - FLexemIndex := 0; - FLine := 1; - FChar := 0; - FFirstExpr := True; - FCompiled := False; - FUpdateOn := False; - FCaseInsensitive := False; -end; - -destructor TcxRegExpr.Destroy; -begin - Clear; - FStream.Free; - FLexems.Free; - FBlocks.Free; - FErrors.Free; - if FAutomat <> nil then - FAutomat.Free; - inherited Destroy; -end; - -procedure TcxRegExpr.Compile(AStream: TStream); -begin - if FFirstExpr then - FFirstExpr := False - else - Clear; - - try - FStream.LoadFromStream(AStream); - except - FErrors.Add(TcxRegExprError.Create(0, 0, cxGetResourceString(@scxRegExprNotAssignedSourceStream))); - raise EcxRegExprError.Create(FErrors); - end; - - if EmptyStream then - begin - FErrors.Add(TcxRegExprError.Create(0, 0, cxGetResourceString(@scxRegExprEmptySourceStream))); - raise EcxRegExprError.Create(FErrors); - end; - - ScanExpr; - if FErrors.Count > 0 then - raise EcxRegExprError.Create(FErrors); - - ParseExpr; - if FErrors.Count > 0 then - raise EcxRegExprError.Create(FErrors); - - FCompiled := True; - - if UpdateOn then - FAutomat.Update; -end; - -function TcxRegExpr.IsCompiled: Boolean; -begin - Result := FCompiled; -end; - -function TcxRegExpr.IsFinal: Boolean; -begin - TestCompiledStatus; - - Result := FAutomat.IsFinal; -end; - -function TcxRegExpr.IsStart: Boolean; -begin - TestCompiledStatus; - - Result := FAutomat.IsStart; -end; - -function TcxRegExpr.Next(var AToken: Char): Boolean; -begin - TestCompiledStatus; - - Result := FAutomat.Next(AToken, FCaseInsensitive); - - if not FAutomat.IsFinal and Result and UpdateOn then - FAutomat.Update; -end; - -function TcxRegExpr.NextEx(const AString: string): string; -var - C: Char; - I: Integer; -begin - TestCompiledStatus; - - Result := ''; - for I := 1 to Length(AString) do - begin - C := AString[I]; - if FAutomat.Next(C, FCaseInsensitive) then - Result := Result + AString[I]; - end; -end; - -function TcxRegExpr.Prev: Boolean; -begin - TestCompiledStatus; - - if UpdateOn then - FAutomat.ReUpdate; - - Result := FAutomat.Prev; -end; - -function TcxRegExpr.Print: string; -begin - Result := FAutomat.Print; -end; - -procedure TcxRegExpr.Reset; -begin - TestCompiledStatus; - - FAutomat.Reset; -end; - -procedure TcxRegExpr.Clear; -begin - FStream.Size := 0; - FErrors.Clear; - FLexems.Clear; - FBlocks.Clear; - - if FAutomat <> nil then - FAutomat.Free; - - FAutomat := nil; - FIndex := 0; - FLexemIndex := 0; - FChar := 0; - FLine := 1; - FCompiled := False; -end; - -function TcxRegExpr.Decimal(AToken: Char): Boolean; -begin - Result := cxIsDigitChar(AToken); -end; - -function TcxRegExpr.EmptyStream: Boolean; -var - AToken: Char; - I: Integer; -begin - if FStream.Size = 0 then - Result := True - else - begin - I := 0; - while LookToken(AToken, I) do - begin - if not Space(AToken) then - begin - Result := False; - Exit; - end; - - Inc(I); - end; - - Result := True; - end; -end; - -function TcxRegExpr.CreateLexem(ALine: Integer; AChar: Integer; ACode: Integer; - AValue: string): TcxLexem; -begin - Result.Line := ALine; - Result.Char := AChar; - Result.Code := ACode; - Result.Value := AValue; -end; - -function TcxRegExpr.GetLexem(var ALexem: TcxLexem): Boolean; -begin - if (FLexemIndex >= 0) and (FLexemIndex < FLexems.Count) then - begin - ALexem := FLexems[FLexemIndex]; - Inc(FLexemIndex); - - Result := True; - end - else - Result := False; -end; - -function TcxRegExpr.GetToken(out AToken: Char): Boolean; -begin - Result := LookToken(AToken, 0); - if Result then - begin - Inc(FIndex); - - if AToken = #13 then - Inc(FLine); - - if AToken = #10 then - FChar := 0 - else - Inc(FChar); - end; -end; - -function TcxRegExpr.GetStream: TStream; -begin - if FCompiled then - Result := FStream - else - Result := nil; -end; - -function TcxRegExpr.Hexadecimal(AToken: Char): Boolean; -begin - Result := (AToken >= '0') and (AToken <= '9') or - (AToken >= 'A') and (AToken <= 'F') or - (AToken >= 'a') and (AToken <= 'f'); -end; - -function TcxRegExpr.LookToken(out AToken: Char; APtr: Integer): Boolean; -begin - Result := ((FIndex + APtr) < FStream.Size) and ((FIndex + APtr) >= 0); - if Result then - AToken := Char(PByteArray(FStream.Memory)[FIndex + APtr]); -end; - -function TcxRegExpr.ParseAlt(AAlt: TcxRegExprParserAlt; Global: Boolean): Boolean; -var - ALexem: TcxLexem; - ACurrentItem: TcxRegExprParserItem; - - procedure AddItem(AItem: TcxRegExprParserItem); - begin - ACurrentItem := AItem; - AAlt.Add(AItem); - end; - - procedure SetQuantifier(AQuantifier: TcxRegExprQuantifier); - var - ABlock: TcxRegExprParserBlockItem; - begin - if ACurrentItem.NotQuantifier then - ACurrentItem.SetQuantifier(AQuantifier) - else - begin - ABlock := TcxRegExprParserBlockItem.Create(AQuantifier); - ABlock.Alts.AddAlt; - ABlock.Alts.LastAlt.Add(ACurrentItem); - ACurrentItem := ABlock; - AAlt.FItems[AAlt.FItems.Count - 1] := ABlock; - end; - end; - - function CreateParameterQuantifierBlock(AIndex, ACount: Integer): TcxRegExprParserItem; - begin - if AIndex < (ACount - 1) then - begin - Result := TcxRegExprParserBlockItem.Create(TcxRegExprQuestionQuantifier.Create); - with TcxRegExprParserBlockItem(Result).Alts do - begin - AddAlt; - LastAlt.Add(ACurrentItem.Clone); - LastAlt.Add(CreateParameterQuantifierBlock(AIndex + 1, ACount)); - end; - end - else - begin - Result := ACurrentItem.Clone; - Result.SetQuantifier(TcxRegExprQuestionQuantifier.Create); - end; - end; - - procedure SetParameterQuantifier(A, B: Integer); - var - ABlock: TcxRegExprParserBlockItem; - AItem: TcxRegExprParserItem; - I: Integer; - begin - if ACurrentItem.CanMissing then - begin - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - cxGetResourceString(@scxRegExprCantUseParameterQuantifier))); - Exit; - end; - - ABlock := TcxRegExprParserBlockItem.Create(TcxRegExprSimpleQuantifier.Create); - ABlock.Alts.AddAlt; - for I := 0 to A - 1 do - ABlock.Alts.LastAlt.Add(ACurrentItem.Clone); - if B = -1 then - begin - AItem := ACurrentItem.Clone; - AItem.SetQuantifier(TcxRegExprStarQuantifier.Create); - ABlock.Alts.LastAlt.Add(AItem); - end - else if B > A then - ABlock.Alts.LastAlt.Add(CreateParameterQuantifierBlock(A, B)); - ACurrentItem := ABlock; - AAlt.LastItem := ABlock; - end; - - procedure SetQuestionQuantifier; - begin - SetQuantifier(TcxRegExprQuestionQuantifier.Create); - end; - - procedure SetPlusQuantifier; - begin - if ACurrentItem.CanEmpty then - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - cxGetResourceString(@scxRegExprCantUsePlusQuantifier))) - else - SetQuantifier(TcxRegExprPlusQuantifier.Create); - end; - - procedure SetStarQuantifier; - begin - if ACurrentItem.CanEmpty then - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - cxGetResourceString(@scxRegExprCantUseStarQuantifier))) - else - SetQuantifier(TcxRegExprStarQuantifier.Create); - end; - -var - RefNumber: Integer; - A, B: Integer; -begin - ACurrentItem := nil; - - if GetLexem(ALexem) then - begin - if (TcxRegExprLexemCode(ALexem.Code) = relcSpecial) and (ALexem.Value[1] = '|') then - begin - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - cxGetResourceString(@scxRegExprCantCreateEmptyAlt))); - Result := True; - Exit; - end; - - if not Global then - begin - if (TcxRegExprLexemCode(ALexem.Code) = relcSpecial) and (ALexem.Value[1] = ')') then - begin - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - cxGetResourceString(@scxRegExprCantCreateEmptyBlock))); - Result := False; - Exit; - end; - end; - end - else - begin - FErrors.Add(TcxRegExprError.Create(0, 0, cxGetResourceString(@scxRegExprCantCreateEmptyAlt))); - Result := False; - Exit; - end; - - repeat - case TcxRegExprLexemCode(ALexem.Code) of - relcSymbol: - AddItem( - TcxRegExprParserSimpleItem.Create( - TcxRegExprSimpleState.Create( - TcxRegExprSymbol.Create( - ALexem.Value[1])))); - relcSpecial: - begin - case ALexem.Value[1] of - '|': - begin - Result := True; - Exit; - end; - '(': - AddItem(ParseBlock); - ')': - begin - if Global then - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - Format(cxGetResourceString(@scxRegExprIllegalSymbol), [')']))) - else - begin - Result := False; - Exit; - end; - end; - '[': - AddItem(ParseEnumeration); - ']': - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - Format(cxGetResourceString(@scxRegExprIllegalSymbol), [']']))); - '{': - begin - if ACurrentItem = nil then - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - cxGetResourceString(@scxRegExprIncorrectParameterQuantifier))) - else - begin - ParseQuantifier(A, B); - SetParameterQuantifier(A, B); - end; - end; - '}': - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - Format(cxGetResourceString(@scxRegExprIllegalSymbol), ['}']))); - '-': - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - Format(cxGetResourceString(@scxRegExprIllegalSymbol), ['-']))); - '?': - begin - if ACurrentItem = nil then - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - Format(cxGetResourceString(@scxRegExprIllegalQuantifier), ['?']))) - else - SetQuestionQuantifier; - end; - '+': - begin - if ACurrentItem = nil then - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - Format(cxGetResourceString(@scxRegExprIllegalQuantifier), ['+']))) - else - SetPlusQuantifier; - end; - '*': - begin - if ACurrentItem = nil then - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - Format(cxGetResourceString(@scxRegExprIllegalQuantifier), ['*']))) - else - SetStarQuantifier; - end; - end; - end; - relcInteger: - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - cxGetResourceString(@scxRegExprIllegalIntegerValue))); - relcTimeSeparator: - AddItem( - TcxRegExprParserSimpleItem.Create( - TcxRegExprSimpleState.Create( - TcxRegExprTimeSeparator.Create))); - relcDateSeparator: - AddItem( - TcxRegExprParserSimpleItem.Create( - TcxRegExprSimpleState.Create( - TcxRegExprDateSeparator.Create))); - relcAll: - AddItem( - TcxRegExprParserSimpleItem.Create( - TcxRegExprSimpleState.Create( - TcxRegExprAll.Create))); - relcId: - AddItem( - TcxRegExprParserSimpleItem.Create( - TcxRegExprSimpleState.Create( - TcxRegExprIdLetter.Create))); - relcNotId: - AddItem( - TcxRegExprParserSimpleItem.Create( - TcxRegExprSimpleState.Create( - TcxRegExprIdLetter.Create(True)))); - relcDigit: - AddItem( - TcxRegExprParserSimpleItem.Create( - TcxRegExprSimpleState.Create( - TcxRegExprDigit.Create))); - relcNotDigit: - AddItem( - TcxRegExprParserSimpleItem.Create( - TcxRegExprSimpleState.Create( - TcxRegExprDigit.Create(True)))); - relcSpace: - AddItem( - TcxRegExprParserSimpleItem.Create( - TcxRegExprSimpleState.Create( - TcxRegExprSpace.Create))); - relcNotSpace: - AddItem( - TcxRegExprParserSimpleItem.Create( - TcxRegExprSimpleState.Create( - TcxRegExprSpace.Create(True)))); - relcReference: - begin - RefNumber := StrToInt(ALexem.Value) - 1; - if RefNumber >= FBlocks.Count then - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - cxGetResourceString(@scxRegExprTooBigReferenceNumber))) - else - AddItem(TcxRegExprParserItem(FBlocks[RefNumber]).Clone); - end; - end; - until not GetLexem(ALexem); - - Result := False; -end; - -function TcxRegExpr.ParseBlock: TcxRegExprParserBlockItem; -begin - Result := TcxRegExprParserBlockItem.Create; - FBlocks.Add(Result); - - repeat - Result.Alts.AddAlt; - until not ParseAlt(Result.Alts.LastAlt, False); -end; - -function TcxRegExpr.ParseEnumeration: TcxRegExprParserSimpleItem; -var - ALexem: TcxLexem; - ALexem1: TcxLexem; - Enumeration: TcxRegExprUserEnumeration; -begin - GetLexem(ALexem); - - if (TcxRegExprLexemCode(ALexem.Code) = relcSpecial) and (ALexem.Value[1] = '^') then - begin - Enumeration := TcxRegExprUserEnumeration.Create(True); - GetLexem(ALexem); - end - else - Enumeration := TcxRegExprUserEnumeration.Create; - - Result := TcxRegExprParserSimpleItem.Create(TcxRegExprSimpleState.Create(Enumeration)); - - if (TcxRegExprLexemCode(ALexem.Code) = relcSpecial) and (ALexem.Value[1] = ']') then - begin - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - cxGetResourceString(@scxRegExprCantCreateEmptyEnum))); - Exit; - end; - - repeat - GetLexem(ALexem1); - - if (TcxRegExprLexemCode(ALexem1.Code) = relcSpecial) and (ALexem1.Value[1] = '-') then - begin - GetLexem(ALexem1); - if ALexem.Value[1] < ALexem1.Value[1] then - Enumeration.Add(TcxRegExprSubrange.Create(ALexem.Value[1], ALexem1.Value[1])) - else - FErrors.Add(TcxRegExprError.Create(ALexem1.Line, ALexem1.Char, - cxGetResourceString(@scxRegExprSubrangeOrder))); - - GetLexem(ALexem); - while (TcxRegExprLexemCode(ALexem.Code) = relcSpecial) and (ALexem.Value[1] = '-') do - begin - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - Format(cxGetResourceString(@scxRegExprIllegalSymbol), ['-']))); - GetLexem(ALexem); - end; - end - else - begin - case TcxRegExprLexemCode(ALexem.Code) of - relcTimeSeparator: - Enumeration.Add(TcxRegExprTimeSeparator.Create); - relcDateSeparator: - Enumeration.Add(TcxRegExprDateSeparator.Create); - relcAll: - Enumeration.Add(TcxRegExprAll.Create); - relcId: - Enumeration.Add(TcxRegExprIdLetter.Create); - relcNotId: - Enumeration.Add(TcxRegExprIdLetter.Create(True)); - relcDigit: - Enumeration.Add(TcxRegExprDigit.Create); - relcNotDigit: - Enumeration.Add(TcxRegExprDigit.Create(True)); - relcSpace: - Enumeration.Add(TcxRegExprSpace.Create); - relcNotSpace: - Enumeration.Add(TcxRegExprSpace.Create(True)); - else - Enumeration.Add(TcxRegExprSymbol.Create(ALexem.Value[1])); - end; - - ALexem := ALexem1; - end; - - until (TcxRegExprLexemCode(ALexem.Code) = relcSpecial) and (ALexem.Value[1] = ']'); -end; - -procedure TcxRegExpr.ParseExpr; -var - Expr: TcxRegExprParserAlts; -begin - Expr := TcxRegExprParserAlts.Create; - - repeat - Expr.AddAlt; - until not ParseAlt(Expr.LastAlt); - - if FErrors.Count > 0 then - Expr.Free - else - begin - Expr.CreateConnections; - Expr.CreateFinalStates; - FAutomat := TcxRegExprAutomat.Create(Expr, Self); - end; -end; - -procedure TcxRegExpr.ParseQuantifier(var A: Integer; var B: Integer); -var - ALexem: TcxLexem; -begin - GetLexem(ALexem); - if TcxRegExprLexemCode(ALexem.Code) = relcInteger then - begin - A := StrToInt(ALexem.Value); - GetLexem(ALexem); - if TcxRegExprLexemCode(ALexem.Code) = relcSpecial then - begin - if ALexem.Value = ',' then - begin - GetLexem(ALexem); - if TcxRegExprLexemCode(ALexem.Code) = relcInteger then - begin - B := StrToInt(ALexem.Value); - if B >= A then - begin - GetLexem(ALexem); - if (TcxRegExprLexemCode(ALexem.Code) = relcSpecial) and (ALexem.Value = '}') then - Exit; - end; - end - else if TcxRegExprLexemCode(ALexem.Code) = relcSpecial then - begin - if ALexem.Value = '}' then - begin - B := -1; - Exit; - end; - end; - end - else if ALexem.Value = '}' then - begin - B := A; - Exit; - end; - end; - end; - FErrors.Add(TcxRegExprError.Create(ALexem.Line, ALexem.Char, - cxGetResourceString(@scxRegExprIncorrectParameterQuantifier))); -end; - -procedure TcxRegExpr.ScanASCII(ALine: Integer; AChar: Integer); -var - AToken: Char; - ALexem: TcxLexem; -begin - if GetToken(AToken) then - begin - if Hexadecimal(AToken)then - ALexem.Value := AToken - else - begin - FErrors.Add(TcxRegExprError.Create(FLine, FChar, - Format(cxGetResourceString(@scxRegExprHexNumberExpected), [AToken]))); - Exit; - end; - - if GetToken(AToken) then - begin - if Hexadecimal(AToken)then - ALexem.Value := ALexem.Value + AToken - else - begin - FErrors.Add(TcxRegExprError.Create(FLine, FChar, - Format(cxGetResourceString(@scxRegExprHexNumberExpected), [AToken]))); - Exit; - end; - - ALexem.Line := ALine; - ALexem.Char := AChar; - ALexem.Code := Ord(relcSymbol); - ALexem.Value := Char(StrToInt('$' + ALexem.Value)); - FLexems.Add(ALexem); - end - else - FErrors.Add(TcxRegExprError.Create(FLine, FChar + 1, - cxGetResourceString(@scxRegExprHexNumberExpected0))); - end - else - FErrors.Add(TcxRegExprError.Create(FLine, FChar + 1, - cxGetResourceString(@scxRegExprHexNumberExpected0))); -end; - -procedure TcxRegExpr.ScanClass; -var - AToken: Char; - Flag: Boolean; - _Line: Integer; - _Char: Integer; -begin - while GetToken(AToken) do - begin - if Space(AToken) then - Continue; - case AToken of - '''': - begin - ScanString; - Break; - end; - '^': - begin - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSpecial), AToken)); - Break; - end; - ':': - begin - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcTimeSeparator), AToken)); - Break; - end; - '/': - begin - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcDateSeparator), AToken)); - Break; - end; - '\': - begin - ScanEscape(FLine, FChar); - Break; - end; - ']': - begin - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSpecial), AToken)); - Exit; - end; - else - begin - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSymbol), AToken)); - Break; - end; - end; - end; - - while GetToken(AToken) do - begin - if Space(AToken) then - Continue; - case AToken of - '''': - ScanString; - ']': - begin - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSpecial), AToken)); - Exit; - end; - '-': - begin - Flag := False; - _Line := FLine; - _Char := FChar; - while LookToken(AToken, 0) do - begin - if Space(AToken) then - begin - GetToken(AToken); - Continue; - end - else - begin - if AToken = ']' then - FLexems.Add(CreateLexem(_Line, _Char, Ord(relcSymbol), '-')) - else - FLexems.Add(CreateLexem(_Line, _Char, Ord(relcSpecial), '-')); - - Flag := True; - Break; - end; - end; - - if not Flag then - begin - FLexems.Add(CreateLexem(_Line, _Char, Ord(relcSpecial), '-')); - FErrors.Add(TcxRegExprError.Create(FLine, FChar + 1, - Format(cxGetResourceString(@scxRegExprMissing), [']']))); - Exit; - end; - end; - ':': - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcTimeSeparator), AToken)); - '/': - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcDateSeparator), AToken)); - '\': - ScanEscape(FLine, FChar); - else - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSymbol), AToken)); - end; - end; - - FErrors.Add(TcxRegExprError.Create(FLine, FChar + 1, - Format(cxGetResourceString(@scxRegExprMissing), [']']))); -end; - -procedure TcxRegExpr.ScanExpr; -var - AToken: Char; - AOpenSkobCounter: Integer; -begin - AOpenSkobCounter := 0; - - while GetToken(AToken) do - begin - if Space(AToken) then - Continue; - - case AToken of - '''': - ScanString; - '[': - begin - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSpecial), AToken)); - ScanClass; - end; - '{': - begin - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSpecial), AToken)); - ScanQuantifier; - end; - '.': - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcAll), AToken)); - ':': - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcTimeSeparator), AToken)); - '/': - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcDateSeparator), AToken)); - '\': - ScanEscape(FLine, FChar); - '(': - begin - Inc(AOpenSkobCounter); - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSpecial), AToken)); - end; - ')': - begin - Dec(AOpenSkobCounter); - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSpecial), AToken)); - end; - '+', '*', '?', '|': - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSpecial), AToken)); - else - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSymbol), AToken)); - end; - end; - - if AOpenSkobCounter > 0 then - FErrors.Add(TcxRegExprError.Create(0, 0, - Format(cxGetResourceString(@scxRegExprMissing), [')']))) - else if AOpenSkobCounter < 0 then - FErrors.Add(TcxRegExprError.Create(0, 0, - Format(cxGetResourceString(@scxRegExprUnnecessary), [')']))); -end; - -procedure TcxRegExpr.ScanEscape(ALine: Integer; AChar: Integer); -var - AToken: Char; -begin - while GetToken(AToken) do - begin - if Decimal(AToken) and (AToken <> '0') then - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcReference), AToken)); - Exit; - end - else - begin - if Space(AToken) then - begin - FErrors.Add(TcxRegExprError.Create(FLine, FChar, - cxGetResourceString(@scxRegExprIncorrectSpace))); - Exit; - end; - - case AToken of - 'x': - begin - ScanASCII(ALine, AChar); - Exit; - end; - 'w': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcId), AToken)); - Exit; - end; - 'W': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcNotId), AToken)); - Exit; - end; - 'd': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcDigit), AToken)); - Exit; - end; - 'D': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcNotDigit), AToken)); - Exit; - end; - 's': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcSpace), AToken)); - Exit; - end; - 'S': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcNotSpace), AToken)); - Exit; - end; - 't': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcSymbol), #9)); - Exit; - end; - 'n': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcSymbol), #10)); - Exit; - end; - 'r': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcSymbol), #13)); - Exit; - end; - 'f': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcSymbol), #12)); - Exit; - end; - 'a': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcSymbol), #7)); - Exit; - end; - 'e': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcSymbol), #27)); - Exit; - end; - 'p': - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcSymbol), DecimalSeparator)); - Exit; - end - else - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcSymbol), AToken)); - Exit; - end; - end; - end; - end; -end; - -function TcxRegExpr.ScanInteger(ALine, AChar: Integer; var AToken: Char): Boolean; -var - AValue: string; -begin - AValue := AToken; - while GetToken(AToken) do - begin - if Decimal(AToken) then - AValue := AValue + AToken - else - begin - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcInteger), AValue)); - Result := True; - Exit; - end; - end; - - FLexems.Add(CreateLexem(ALine, AChar, Ord(relcInteger), AValue)); - Result := False; -end; - -procedure TcxRegExpr.ScanQuantifier; -var - AToken: Char; - ALexem: TcxLexem; -begin - ALexem.Value := ''; - - while GetToken(AToken) do - begin - if Space(AToken) then - Continue - else if Decimal(AToken) then - begin - if not ScanInteger(FLine, FChar, AToken) then - Break; - if Space(AToken) then - Continue; - end; - - case AToken of - '''': - FErrors.Add(TcxRegExprError.Create(FLine, FChar, - Format(cxGetResourceString(@scxRegExprIllegalSymbol), [' '' ']))); - ',': - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSpecial), AToken)); - '}': - begin - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSpecial), AToken)); - Exit; - end; - else - FErrors.Add(TcxRegExprError.Create(FLine, FChar, - Format(cxGetResourceString(@scxRegExprIllegalSymbol), [AToken]))); - end; - end; - - FErrors.Add(TcxRegExprError.Create(FLine, FChar + 1, - Format(cxGetResourceString(@scxRegExprMissing), ['}']))); -end; - -procedure TcxRegExpr.ScanString; -var - AToken: Char; -begin - while GetToken(AToken) do - begin - if AToken = '''' then - begin - if LookToken(AToken, 0) then - begin - if AToken = '''' then - begin - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSymbol), '''')); - GetToken(AToken); - Continue; - end - else - Exit; - end - else - Exit; - end - else - FLexems.Add(CreateLexem(FLine, FChar, Ord(relcSymbol), AToken)); - end; - - FErrors.Add(TcxRegExprError.Create(FLine, FChar + 1, - Format(cxGetResourceString(@scxRegExprMissing), [' '' ']))); -end; - -procedure TcxRegExpr.SetUpdateOn(AUpdateOn: Boolean); -begin - FUpdateOn := AUpdateOn; - if FCompiled then - if FUpdateOn then - FAutomat.Update; -end; - -function TcxRegExpr.Space(AToken: Char): Boolean; -begin - Result := IsSpaceChar(AToken); -end; - -procedure TcxRegExpr.SymbolDelete; -begin - if Assigned(FOnSymbolDelete) then - FOnSymbolDelete; -end; - -procedure TcxRegExpr.SymbolUpdate(ASymbol: Char); -begin - if Assigned(FOnSymbolUpdate) then - FOnSymbolUpdate(ASymbol); -end; - -procedure TcxRegExpr.TestCompiledStatus; -begin - if not FCompiled then - raise EcxEditError.Create(cxGetResourceString(@scxRegExprNotCompiled)); -end; - -function IsTextFullValid(const AText, AMask: string): Boolean; -var - ARegExpr: TcxRegExpr; - AStream: TStringStream; - C: Char; - I: Integer; -begin - ARegExpr := TcxRegExpr.Create; - AStream := TStringStream.Create(AMask); - - Result := False; - try - try - ARegExpr.Compile(AStream); - - Result := True; - for I := 1 to Length(AText) do - begin - C := AText[I]; - if not ARegExpr.Next(C) then - begin - Result := False; - Break; - end; - end; - - if Result then - if not ARegExpr.IsFinal then - Result := False; - except - on E: EcxRegExprError do - raise EcxRegExprError.Create(E.Errors.Clone); - end; - finally - AStream.Free; - ARegExpr.Free; - end; -end; - -function IsTextValid(const AText, AMask: string): Boolean; -var - ARegExpr: TcxRegExpr; - AStream: TStringStream; - C: Char; - I: Integer; -begin - ARegExpr := TcxRegExpr.Create; - AStream := TStringStream.Create(AMask); - - Result := False; - try - try - ARegExpr.Compile(AStream); - - Result := True; - for I := 1 to Length(AText) do - begin - C := AText[I]; - if not ARegExpr.Next(C) then - begin - Result := False; - Break; - end; - end; - except - on E: EcxRegExprError do - raise EcxRegExprError.Create(E.Errors.Clone); - end; - finally - AStream.Free; - ARegExpr.Free; - end; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxRichEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxRichEdit.pas deleted file mode 100644 index dc149fb7..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxRichEdit.pas +++ /dev/null @@ -1,4866 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxRichEdit; - -{$I cxVer.inc} - -interface - -uses - Variants, Windows, Messages, ActiveX, OleDlg, OleConst, OleCtnrs, Classes, - ClipBrd, ComCtrls, Controls, Dialogs, Forms, Graphics, - Menus, RichEdit, StdCtrls, SysUtils, cxClasses, cxContainer, - cxControls, cxEdit, cxDrawTextUtils, cxGraphics, cxLookAndFeels, cxMemo, - cxScrollbar, cxTextEdit; - -(*$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IOleLink);'*) - -type - TcxRichEditStreamMode = (resmSelection, resmPlainRtf, resmRtfNoObjs, resmUnicode, resmTextIzed); - TcxRichEditStreamModes = set of TcxRichEditStreamMode; - - TcxTextRange = record - chrg: TCharRange; - lpstrText: PChar; - end; - - TReObject = packed record - cbStruct: DWORD; // Size of structure - cp: Cardinal; // Character position of object - clsid: TCLSID; // Class ID of object - oleobj: IOleObject; // OLE object interface - stg: IStorage; // Associated storage interface - olesite: IOLEClientSite;// Associated client site interface - sizel: TSize; // Size of object (may be 0,0) - dvaspect: DWORD; // Display aspect to use - dwFlags: DWORD; // Object status flags - dwUser: DWORD; // Dword for user's use - end; - - TcxCustomRichEdit = class; - - TcxRichEditURLClickEvent = procedure(Sender: TcxCustomRichEdit; const URLText: string; - Button: TMouseButton) of object; - TcxRichEditURLMoveEvent = procedure(Sender: TcxCustomRichEdit; const URLText: string) of object; - TcxRichEditQueryInsertObjectEvent = procedure(Sender: TcxCustomRichEdit; var AAllowInsertObject: Boolean; - const ACLSID: TCLSID) of object; - - TcxCustomRichEditViewInfo = class(TcxCustomMemoViewInfo) - public - DrawBitmap: HBITMAP; - IsDrawBitmapDirty: Boolean; - PrevDrawBitmapSize: TSize; - constructor Create; override; - destructor Destroy; override; - procedure DrawNativeStyleEditBackground(ACanvas: TcxCanvas; ADrawBackground: Boolean; - ABackgroundStyle: TcxEditBackgroundPaintingStyle; ABackgroundBrush: TBrushHandle); override; - procedure DrawText(ACanvas: TcxCanvas); override; - function GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; override; - function NeedShowHint(ACanvas: TcxCanvas; const P: TPoint; - const AVisibleBounds: TRect; out AText: TCaption; - out AIsMultiLine: Boolean; out ATextRect: TRect): Boolean; override; - procedure Paint(ACanvas: TcxCanvas); override; - end; - - TcxCustomRichEditProperties = class; - - TcxCustomRichEditViewData = class(TcxCustomMemoViewData) - private - function GetProperties: TcxCustomRichEditProperties; - protected - function InternalGetEditContentSize(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; override; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - property Properties: TcxCustomRichEditProperties read GetProperties; - end; - - {IRichEditOleCallback} - - TcxRichInnerEdit = class; - - IcxRichEditOleCallback = interface(IUnknown) - ['{00020D00-0000-0000-C000-000000000046}'] - function GetNewStorage(out stg: IStorage): HRESULT; stdcall; - function GetInPlaceContext(out Frame: IOleInPlaceFrame; - out Doc: IOleInPlaceUIWindow; lpFrameInfo: POleInPlaceFrameInfo): HRESULT; stdcall; - function ShowContainerUI(fShow: BOOL): HRESULT; stdcall; - function QueryInsertObject(const clsid: TCLSID; stg: IStorage; cp: longint): HRESULT; stdcall; - function DeleteObject(oleobj: IOLEObject): HRESULT; stdcall; - function QueryAcceptData(dataobj: IDataObject; var cfFormat: TClipFormat; - reco: DWORD; fReally: BOOL; hMetaPict: HGLOBAL): HRESULT; stdcall; - function ContextSensitiveHelp(fEnterMode: BOOL): HRESULT; stdcall; - function GetClipboardData(const chrg: TCharRange; reco: DWORD; - out dataobj: IDataObject): HRESULT; stdcall; - function GetDragDropEffect(fDrag: BOOL; grfKeyState: DWORD; - var dwEffect: DWORD): HRESULT; stdcall; - function GetContextMenu(seltype: Word; oleobj: IOleObject; - const chrg: TCharRange; var menu: HMENU): HRESULT; stdcall; - end; - - { IRichEditOle } - - IcxRichEditOle = interface(IUnknown) - ['{00020D00-0000-0000-C000-000000000046}'] - function GetClientSite(out clientSite: IOleClientSite): HResult; stdcall; - function GetObjectCount: HResult; stdcall; - function GetLinkCount: HResult; stdcall; - function GetObject(iob: Longint; out reobject: TReObject; - dwFlags: DWORD): HResult; stdcall; - function InsertObject(var reobject: TReObject): HResult; stdcall; - function ConvertObject(iob: Longint; rclsidNew: TIID; - lpstrUserTypeNew: LPCSTR): HResult; stdcall; - function ActivateAs(rclsid: TIID; rclsidAs: TIID): HResult; stdcall; - function SetHostNames(lpstrContainerApp: LPCSTR; - lpstrContainerObj: LPCSTR): HResult; stdcall; - function SetLinkAvailable(iob: Longint; fAvailable: BOOL): HResult; stdcall; - function SetDvaspect(iob: Longint; dvaspect: DWORD): HResult; stdcall; - function HandsOffStorage(iob: Longint): HResult; stdcall; - function SaveCompleted(iob: Longint; const stg: IStorage): HResult; stdcall; - function InPlaceDeactivate: HResult; stdcall; - function ContextSensitiveHelp(fEnterMode: BOOL): HResult; stdcall; - function GetClipboardData(var chrg: TCharRange; reco: DWORD; - out dataobj: IDataObject): HResult; stdcall; - function ImportDataObject(dataobj: IDataObject; cf: TClipFormat; - hMetaPict: HGLOBAL): HResult; stdcall; - end; - - { TcxRichEditOleCallback } - - TcxRichEditOleCallback = class(TcxIUnknownObject, IcxRichEditOleCallback) - private - FEdit: TcxRichInnerEdit; - FDocParentForm: IVCLFrameForm; - FParentFrame: IVCLFrameForm; - FAccelTable: HAccel; - FAccelCount: Integer; - procedure AssignParentFrame; - procedure CreateAccelTable; - procedure DestroyAccelTable; - protected - property ParentFrame: IVCLFrameForm read FParentFrame; - property DocParentForm: IVCLFrameForm read FDocParentForm; - public - constructor Create(AOwner: TcxRichInnerEdit); - - //IRichEditOleCallback - function ContextSensitiveHelp(fEnterMode: BOOL): HRESULT; stdcall; - function DeleteObject(oleobj: IOLEObject): HRESULT; stdcall; - function GetClipboardData(const chrg: TCharRange; reco: DWORD; - out dataobj: IDataObject): HRESULT; stdcall; - function GetContextMenu(seltype: Word; oleobj: IOleObject; - const chrg: TCharRange; var menu: HMENU): HRESULT; stdcall; - function GetDragDropEffect(fDrag: BOOL; grfKeyState: DWORD; - var dwEffect: DWORD): HRESULT; stdcall; - function GetInPlaceContext(out Frame: IOleInPlaceFrame; - out Doc: IOleInPlaceUIWindow; lpFrameInfo: POleInPlaceFrameInfo): HRESULT; stdcall; - function GetNewStorage(out stg: IStorage): HRESULT; stdcall; - function QueryInsertObject(const clsid: TCLSID; stg: IStorage; cp: longint): HRESULT; stdcall; - function QueryAcceptData(dataobj: IDataObject; var cfFormat: TClipFormat; - reco: DWORD; fReally: BOOL; hMetaPict: HGLOBAL): HRESULT; stdcall; - function ShowContainerUI(fShow: BOOL): HRESULT; stdcall; - end; - - { TcxCustomRichEditProperties } - - TcxRichEditClass = (recRichEdit10, recRichEdit20); - - TcxCustomRichEditProperties = class(TcxCustomMemoProperties) - private - FAllowObjects: Boolean; - FAutoURLDetect: Boolean; - FHideScrollBars: Boolean; - FMemoMode: Boolean; - FPlainText: Boolean; - FPlainTextChanged: Boolean; - FRichEditClass: TcxRichEditClass; - FSelectionBar: Boolean; - FStreamModes: TcxRichEditStreamModes; - FOnQueryInsertObject: TcxRichEditQueryInsertObjectEvent; - FOnProtectChange: TRichEditProtectChange; - FOnResizeRequest: TRichEditResizeEvent; - FOnSaveClipboard: TRichEditSaveClipboard; - FOnSelectionChange: TNotifyEvent; - FOnURLClick: TcxRichEditURLClickEvent; - FOnURLMove: TcxRichEditURLMoveEvent; - procedure SetAllowObjects(const Value: Boolean); - procedure SetAutoURLDetect(const Value: Boolean); - procedure SetHideScrollBars(Value: Boolean); - procedure SetMemoMode(Value: Boolean); - procedure SetPlainText(Value: Boolean); - procedure SetRichEditClass(AValue: TcxRichEditClass); - procedure SetSelectionBar(Value: Boolean); - procedure SetStreamModes(const Value: TcxRichEditStreamModes); - procedure SetOnQueryInsertObject(Value: TcxRichEditQueryInsertObjectEvent); - protected - function CanValidate: Boolean; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - property PlainTextChanged: Boolean read FPlainTextChanged; - public - constructor Create(AOwner: TPersistent); override; - - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsResetEditClass: Boolean; override; - property AllowObjects: Boolean read FAllowObjects write SetAllowObjects default False; - property AutoURLDetect: Boolean read FAutoURLDetect write SetAutoURLDetect default False; - property PlainText: Boolean read FPlainText write SetPlainText default False; - property RichEditClass: TcxRichEditClass read FRichEditClass write SetRichEditClass default recRichEdit20; - // !!! - property HideScrollBars: Boolean read FHideScrollBars - write SetHideScrollBars default True; - property MemoMode: Boolean read FMemoMode write SetMemoMode default False; - property SelectionBar: Boolean read FSelectionBar write SetSelectionBar - default False; - property StreamModes: TcxRichEditStreamModes read FStreamModes - write SetStreamModes default []; - property OnQueryInsertObject: TcxRichEditQueryInsertObjectEvent read FOnQueryInsertObject - write SetOnQueryInsertObject; - property OnProtectChange: TRichEditProtectChange read FOnProtectChange - write FOnProtectChange; - property OnResizeRequest: TRichEditResizeEvent read FOnResizeRequest - write FOnResizeRequest; - property OnSaveClipboard: TRichEditSaveClipboard read FOnSaveClipboard - write FOnSaveClipboard; - property OnSelectionChange: TNotifyEvent read FOnSelectionChange - write FOnSelectionChange; - property OnURLClick: TcxRichEditURLClickEvent read FOnURLClick - write FOnURLClick; - property OnURLMove: TcxRichEditURLMoveEvent read FOnURLMove - write FOnURLMove; - end; - - { TcxRichEditProperties } - - TcxRichEditProperties = class(TcxCustomRichEditProperties) - published - property Alignment; - property AllowObjects; - property AssignedValues; - property AutoSelect; - property AutoURLDetect; - property ClearKey; - property HideScrollBars; - property HideSelection; - property ImeMode; - property ImeName; - property MaxLength; - property MemoMode; - property OEMConvert; - property PlainText; - property ReadOnly; - property RichEditClass; - property ScrollBars; - property SelectionBar; - property StreamModes; - property VisibleLineCount; - property WantReturns; - property WantTabs; - property WordWrap; - property OnQueryInsertObject; - property OnChange; - property OnEditValueChanged; - property OnProtectChange; - property OnResizeRequest; - property OnSaveClipboard; - property OnSelectionChange; - property OnURLClick; - property OnURLMove; - end; - - { TcxOleUILinkInfo } - - TcxOleUILinkInfo = class(TcxIUnknownObject, IOleUILinkInfo) - private - FRichEdit: TcxRichInnerEdit; - FReObject: TReObject; - FOleLink: IOleLink; - public - constructor Create(AOwner: TcxRichInnerEdit; AReObject: TReObject); - destructor Destroy; override; - - //IOleUILinkInfo - function GetLastUpdate(dwLink: Longint; var LastUpdate: TFileTime): HResult; stdcall; - - //IOleUILinkContainer - function GetNextLink(dwLink: Longint): Longint; stdcall; - function SetLinkUpdateOptions(dwLink: Longint; dwUpdateOpt: Longint): HResult; stdcall; - function GetLinkUpdateOptions(dwLink: Longint; - var dwUpdateOpt: Longint): HResult; stdcall; - function SetLinkSource(dwLink: Longint; pszDisplayName: PChar; - lenFileName: Longint; var chEaten: Longint; - fValidateSource: BOOL): HResult; stdcall; - function GetLinkSource(dwLink: Longint; var pszDisplayName: PChar; - var lenFileName: Longint; var pszFullLinkType: PChar; - var pszShortLinkType: PChar; var fSourceAvailable: BOOL; - var fIsSelected: BOOL): HResult; stdcall; - function OpenLinkSource(dwLink: Longint): HResult; stdcall; - function UpdateLink(dwLink: Longint; fErrorMessage: BOOL; - fErrorAction: BOOL): HResult; stdcall; - function CancelLink(dwLink: Longint): HResult; stdcall; - end; - - { TcxOleUIObjInfo } - - TcxOleUIObjInfo = class(TcxIUnknownObject, IOleUIObjInfo) - private - FRichEdit: TcxRichInnerEdit; - FReObject: TReObject; - - function GetObjectDataSize: Integer; - public - constructor Create(AOwner: TcxRichInnerEdit; AReObject: TReObject); - - //IOleUIObjInfo - function GetObjectInfo(dwObject: Longint; - var dwObjSize: Longint; var lpszLabel: PChar; - var lpszType: PChar; var lpszShortType: PChar; - var lpszLocation: PChar): HResult; stdcall; - function GetConvertInfo(dwObject: Longint; var ClassID: TCLSID; - var wFormat: Word; var ConvertDefaultClassID: TCLSID; - var lpClsidExclude: PCLSID; var cClsidExclude: Longint): HResult; stdcall; - function ConvertObject(dwObject: Longint; const clsidNew: TCLSID): HResult; stdcall; - function GetViewInfo(dwObject: Longint; var hMetaPict: HGlobal; - var dvAspect: Longint; var nCurrentScale: Integer): HResult; stdcall; - function SetViewInfo(dwObject: Longint; hMetaPict: HGlobal; - dvAspect: Longint; nCurrentScale: Integer; - bRelativeToOrig: BOOL): HResult; stdcall; - end; - - { TcxCustomRichEdit } - - TcxCustomRichEdit = class(TcxCustomMemo) - private - FEditPopupMenu: TComponent; - FIsNullEditValue: Boolean; - FLastLineCount: Integer; - FPropertiesChange: Boolean; - procedure DoProtectChange(Sender: TObject; AStartPos, AEndPos: Integer; - var AAllowChange: Boolean); - procedure DoSaveClipboard(Sender: TObject; ANumObjects, ANumChars: Integer; - var ASaveClipboard: Boolean); - procedure EditPopupMenuClick(Sender: TObject); - function GetLines: TStrings; - function GetInnerRich: TcxRichInnerEdit; - procedure SetLines(Value: TStrings); - function GetActiveProperties: TcxCustomRichEditProperties; - function GetProperties: TcxCustomRichEditProperties; - function GetRichVersion: Integer; - procedure SetProperties(Value: TcxCustomRichEditProperties); - function GetCanUndo: Boolean; - function GetDefAttributes: TTextAttributes; - function GetDefaultConverter: TConversionClass; - function GetPageRect: TRect; - function GetParagraph: TParaAttributes; - function GetSelAttributes: TTextAttributes; - procedure RefreshScrollBars; - procedure SetDefAttributes(const Value: TTextAttributes); - procedure SetDefaultConverter(Value: TConversionClass); - procedure SetPageRect(const Value: TRect); - procedure SetSelAttributes(const Value: TTextAttributes); - procedure EMCanPaste(var Message: TMessage); message EM_CANPASTE; - procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED; - procedure WMSetFont(var Message: TWMSetFont); message WM_SETFONT; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - protected - procedure AdjustInnerEdit; override; - function CanFocusOnClick: Boolean; override; - function CanKeyDownModifyEdit(Key: Word; Shift: TShiftState): Boolean; override; - procedure ContainerStyleChanged(Sender: TObject); override; - function DoShowPopupMenu(AMenu: TComponent; X, Y: Integer): Boolean; override; - function GetEditValue: TcxEditValue; override; - function GetInnerEditClass: TControlClass; override; - procedure ChangeHandler(Sender: TObject); override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - procedure Initialize; override; - procedure InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); override; - procedure InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); override; - function CanDeleteSelection: Boolean; - procedure Changed(Sender: TObject); - procedure DoOnResizeRequest(const R: TRect); - procedure DoOnSelectionChange; - procedure DoTextChanged; override; - procedure PropertiesChanged(Sender: TObject); override; - procedure ResetEditValue; override; - procedure SetParent(AParent: TWinControl); override; - procedure SynchronizeDisplayValue; override; - procedure SynchronizeEditValue; override; - procedure UpdateScrollBars; override; - function GetEditPopupMenuInstance: TComponent; virtual; - function IsNavigationKey(Key: Word; Shift: TShiftState): Boolean; virtual; - function UpdateContentOnFocusChanging: Boolean; override; - procedure UpdateEditPopupMenuItems(APopupMenu: TComponent); virtual; - property EditPopupMenu: TComponent read FEditPopupMenu write FEditPopupMenu; - property InnerRich: TcxRichInnerEdit read GetInnerRich; - property PropertiesChange: Boolean read FPropertiesChange; - public - destructor Destroy; override; - - procedure ClearSelection; override; - procedure CutToClipboard; override; - function FindTexT(const ASearchStr: string; AStartPos, ALength: Integer; - AOptions: TSearchTypes; AForward: Boolean = True): Integer; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure PasteFromClipboard; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - procedure Print(const Caption: string); virtual; - procedure SaveSelectionToStream(Stream: TStream); virtual; - procedure Undo; override; - function InsertObject: Boolean; - function PasteSpecial: Boolean; - function ShowObjectProperties: Boolean; - class procedure RegisterConversionFormat(const AExtension: string; - AConversionClass: TConversionClass); - property ActiveProperties: TcxCustomRichEditProperties - read GetActiveProperties; - property CanUndo: Boolean read GetCanUndo; - property DefAttributes: TTextAttributes read GetDefAttributes write SetDefAttributes; - property DefaultConverter: TConversionClass - read GetDefaultConverter write SetDefaultConverter; - property Lines: TStrings read GetLines write SetLines; - property PageRect: TRect read GetPageRect write SetPageRect; - property Paragraph: TParaAttributes read GetParagraph; - property Properties: TcxCustomRichEditProperties read GetProperties - write SetProperties; - property RichVersion: Integer read GetRichVersion; - property SelAttributes: TTextAttributes read GetSelAttributes write SetSelAttributes; - end; - - { TcxRichEdit } - - TcxRichEdit = class(TcxCustomRichEdit) - private - function GetActiveProperties: TcxRichEditProperties; - function GetProperties: TcxRichEditProperties; - procedure SetProperties(Value: TcxRichEditProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxRichEditProperties read GetActiveProperties; - published - property Align; - property Anchors; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxRichEditProperties read GetProperties - write SetProperties; - property Lines; // must be after Properties because of Properties.Alignment - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnMouseWheel; - property OnMouseWheelDown; - property OnMouseWheelUp; - property OnStartDock; - property OnStartDrag; - end; - - TcxRichInnerEditHelper = class(TcxInterfacedPersistent, - IcxContainerInnerControl, IcxCustomInnerEdit, IcxInnerTextEdit, - IcxInnerMemo) - private - FEdit: TcxRichInnerEdit; - protected - property Edit: TcxRichInnerEdit read FEdit; - public - constructor Create(AEdit: TcxRichInnerEdit); reintroduce; virtual; - - // IcxContainerInnerControl - function GetControlContainer: TcxContainer; - function GetControl: TWinControl; - - // IcxCustomInnerEdit - function CallDefWndProc(AMsg: UINT; WParam: WPARAM; - LParam: LPARAM): LRESULT; - function CanProcessClipboardMessages: Boolean; - function GetEditValue: TcxEditValue; - function GetOnChange: TNotifyEvent; - procedure LockBounds(ALock: Boolean); - procedure SafelySetFocus; - procedure SetEditValue(const Value: TcxEditValue); - procedure SetParent(Value: TWinControl); - procedure SetOnChange(Value: TNotifyEvent); - - // IcxInnerTextEdit - procedure ClearSelection; - procedure CopyToClipboard; - function GetAlignment: TAlignment; - function GetAutoSelect: Boolean; - function GetCharCase: TEditCharCase; - function GetEchoMode: TcxEditEchoMode; - function GetFirstVisibleCharIndex: Integer; - function GetHideSelection: Boolean; - function GetImeLastChar: Char; - function GetImeMode: TImeMode; - function GetImeName: TImeName; - function GetInternalUpdating: Boolean; - function GetMaxLength: Integer; - function GetMultiLine: Boolean; - function GetOEMConvert: Boolean; - function GetOnSelChange: TNotifyEvent; - function GetPasswordChar: TCaptionChar; - function GetReadOnly: Boolean; - function GetSelLength: Integer; - function GetSelStart: Integer; - function GetSelText: string; - procedure SelectAll; - procedure SetAlignment(Value: TAlignment); - procedure SetAutoSelect(Value: Boolean); - procedure SetCharCase(Value: TEditCharCase); - procedure SetEchoMode(Value: TcxEditEchoMode); - procedure SetHideSelection(Value: Boolean); - procedure SetInternalUpdating(Value: Boolean); - procedure SetImeMode(Value: TImeMode); - procedure SetImeName(const Value: TImeName); - procedure SetMaxLength(Value: Integer); - procedure SetOEMConvert(Value: Boolean); - procedure SetOnSelChange(Value: TNotifyEvent); - procedure SetPasswordChar(Value: TCaptionChar); - procedure SetReadOnly(Value: Boolean); - procedure SetSelLength(Value: Integer); - procedure SetSelStart(Value: Integer); - procedure SetSelText(Value: string); - {$IFDEF DELPHI12} - function GetTextHint: string; - procedure SetTextHint(Value: string); - {$ENDIF} - - // IcxInnerMemo - function GetCaretPos: TPoint; - function GetLines: TStrings; - function GetScrollBars: TScrollStyle; - function GetWantReturns: Boolean; - function GetWantTabs: Boolean; - function GetWordWrap: Boolean; - procedure SetCaretPos(const Value: TPoint); - procedure SetScrollBars(Value: TScrollStyle); - procedure SetWantReturns(Value: Boolean); - procedure SetWantTabs(Value: Boolean); - procedure SetWordWrap(Value: Boolean); - end; - - { TcxRichEditStrings } - - TcxRichEditStreamOperation = (esoLoadFrom, esoSaveTo); - - TcxRichEditStreamOperationInfo = record - EditStream: TEditStream; - StreamInfo: TRichEditStreamInfo; - TextType: Longint; - {$IFDEF DELPHI12} - Encoding: TEncoding - {$ENDIF} - end; - - TcxRichEditStrings = class(TStrings) - private - FConverter: TConversion; - FIsModification: Boolean; - FRichEdit: TcxRichInnerEdit; - FTextType: Longint; - function CalcStreamTextType(AStreamOperation: TcxRichEditStreamOperation; ACustom: Boolean = False; - ACustomStreamModes: TcxRichEditStreamModes = []): Longint; - function GetAllowStreamModesByStreamOperation(AStreamOperation: TcxRichEditStreamOperation): TcxRichEditStreamModes; - function GetStreamModes: TcxRichEditStreamModes; - protected - function Get(Index: Integer): string; override; - procedure InitConverter(const AFileName: string); virtual; - procedure InitStreamOperation(AStream: TStream; - var AStreamOperationInfo: TcxRichEditStreamOperationInfo; - AStreamOperation: TcxRichEditStreamOperation; ACustom: Boolean = False; - ACustomStreamModes: TcxRichEditStreamModes = []); - function GetCount: Integer; override; - procedure Put(Index: Integer; const S: string); override; - procedure SetUpdateState(Updating: Boolean); override; - procedure SetTextStr(const Value: string); override; - function GetLineBreakString: string; virtual; - property IsModification: Boolean read FIsModification write FIsModification; - property RichEdit: TcxRichInnerEdit read FRichEdit; - public - constructor Create(ARichEdit: TcxRichInnerEdit); virtual; - destructor Destroy; override; - procedure Clear; override; - procedure AddStrings(Strings: TStrings); override; - procedure Delete(Index: Integer); override; - procedure Insert(Index: Integer; const S: string); override; - procedure LoadFromFile(const FileName: string{$IFDEF DELPHI12}; Encoding: TEncoding{$ENDIF}); override; - procedure LoadFromStream(Stream: TStream{$IFDEF DELPHI12}; Encoding: TEncoding{$ENDIF}); override; - procedure SaveToFile(const FileName: string{$IFDEF DELPHI12}; Encoding: TEncoding{$ENDIF}); override; - procedure SaveToStream(Stream: TStream{$IFDEF DELPHI12}; Encoding: TEncoding{$ENDIF}); override; - end; - - { TcxRichInnerEdit } - - TcxRichInnerEdit = class(TRichEdit, IUnknown, - IcxContainerInnerControl, IcxInnerEditHelper, IcxPaintControlsHelper) - private - FAllowObjects: Boolean; - FAutoSelect: Boolean; - FAutoURLDetect: Boolean; - FURLClickRange: TCharRange; - FURLClickBtn: TMouseButton; - FEchoMode: TcxEditEchoMode; - FEscapePressed: Boolean; - FHelper: TcxRichInnerEditHelper; - FInternalUpdating: Boolean; - FIsEraseBackgroundLocked: Boolean; - FKeyPressProcessed: Boolean; - FLockBoundsCount: Integer; - FMemoMode: Boolean; - FRichEditClass: TcxRichEditClass; - FRichEditOle: IUnknown; - FRichEditOleCallback: TObject; - FRichVersion: Integer; - {$IFDEF DELPHI12} - FSavedEditValue: Variant; - {$ENDIF} - FSavedPlainText: Boolean; - FSelectionBar: Boolean; - FStreamModes: TcxRichEditStreamModes; - FRichLines: TcxRichEditStrings; - FUseCRLF: Boolean; - FOnQueryInsertObject: TcxRichEditQueryInsertObjectEvent; - - procedure CloseOleObjects; - // IcxContainerInnerControl - function GetControl: TWinControl; - function GetControlContainer: TcxContainer; - - // IcxInnerEditHelper - function GetHelper: IcxCustomInnerEdit; - - function GetAutoURLDetect: Boolean; - function GetContainer: TcxCustomRichEdit; - function GetLineCount: Integer; - function GetLineIndex(AIndex: Integer): Integer; - function GetLineLength(AIndex: Integer): Integer; - function GetRichLines: TcxRichEditStrings; - function GetRichEditOle: IcxRichEditOle; - function GetRichEditOleCallBack: TcxRichEditOleCallback; - function GetTextRange(AStartPos, AEndPos: Longint): string; - procedure InternalSetMemoMode(AForcedReload: Boolean = False); - procedure SetAllowObjects(Value: Boolean); - procedure SetAutoURLDetect(Value: Boolean); - procedure SetMemoMode(Value: Boolean); - procedure SetRichEditClass(AValue: TcxRichEditClass); - procedure SetRichLines(Value: TcxRichEditStrings); - procedure SetSelectionBar(Value: Boolean); - procedure SetOleControlActive(AActive: Boolean); - procedure CMDocWindowActivate(var Message: TMessage); message CM_DOCWINDOWACTIVATE; - procedure WMChar(var Message: TWMChar); message WM_CHAR; - procedure WMClear(var Message: TMessage); message WM_CLEAR; - procedure WMCut(var Message: TMessage); message WM_CUT; - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure WMKeyDown(var Message: TWMKeyDown); message WM_KEYDOWN; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMMButtonDown(var Message: TWMMButtonDown); message WM_MBUTTONDOWN; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure WMPaint(var Message: TWMPaint); message WM_PAINT; - procedure WMPaste(var Message: TMessage); message WM_PASTE; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure WMSetFont(var Message: TWMSetFont); message WM_SETFONT; - procedure WMTimer(var Message: TWMTimer); message WM_TIMER; - procedure WMHScroll(var Message: TWMHScroll); message WM_HSCROLL; - procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL; - procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; - procedure WMWindowPosChanging(var Message: TWMWindowPosChanging); message WM_WINDOWPOSCHANGING; - procedure EMReplaceSel(var Message: TMessage); message EM_REPLACESEL; - procedure EMSetCharFormat(var Message: TMessage); message EM_SETCHARFORMAT; - procedure EMSetParaFormat(var Message: TMessage); message EM_SETPARAFORMAT; - procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; - procedure CNCommand(var Message: TWMCommand); message CN_COMMAND; - procedure CNKeyDown(var Message: TWMKeyDown); message CN_KEYDOWN; - procedure WMGetText(var Message: TMessage); message WM_GETTEXT; - procedure WMGetTextLength(var Message: TWMGetTextLength); message WM_GETTEXTLENGTH; - procedure WMSetText(var Message: TWMSetText); message WM_SETTEXT; - procedure WMIMEComposition(var Message: TMessage); message WM_IME_COMPOSITION; - procedure EMExLineFromChar(var Message: TMessage); message EM_EXLINEFROMCHAR; - procedure EMLineLength(var Message: TMessage); message EM_LINELENGTH; - protected - procedure BeforeInsertObject(var AAllowInsertObject: Boolean; const ACLSID: TCLSID); dynamic; - procedure Click; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWindowHandle(const Params: TCreateParams); override; - procedure DestroyWindowHandle; override; - procedure CreateWnd; override; - procedure DblClick; override; - procedure DestroyWnd; override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); override; - function GetSelText: string; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseLeave(AControl: TControl); dynamic; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure RequestAlign; override; - procedure RequestSize(const Rect: TRect); override; - procedure RichCreateParams(var Params: TCreateParams; - out ARichVersion: Integer); virtual; - procedure SelectionChange; override; - procedure URLClick(const AURLText: string; AButton: TMouseButton); dynamic; - procedure URLMove(const AURLText: string); dynamic; - procedure WndProc(var Message: TMessage); override; - function CanPaste: Boolean; - function GetSelection: TCharRange; virtual; - - // IcxPaintControlsHelper - function AllowDrawEdgesAndBorders: Boolean; - - property AllowObjects: Boolean read FAllowObjects write SetAllowObjects default True; - property AutoSelect: Boolean read FAutoSelect write FAutoSelect default False; - property AutoURLDetect: Boolean read GetAutoURLDetect write SetAutoURLDetect default True; - property Container: TcxCustomRichEdit read GetContainer; - property Helper: TcxRichInnerEditHelper read FHelper; - property MemoMode: Boolean read FMemoMode write SetMemoMode default False; - property RichEditClass: TcxRichEditClass read FRichEditClass write SetRichEditClass; - property RichEditOle: IcxRichEditOle read GetRichEditOle; - property RichEditOleCallBack: TcxRichEditOleCallback read GetRichEditOleCallBack; - property RichVersion: Integer read FRichVersion write FRichVersion; - property SelectionBar: Boolean read FSelectionBar write SetSelectionBar - default False; - property StreamModes: TcxRichEditStreamModes read FStreamModes - write FStreamModes default []; - property OnQueryInsertObject: TcxRichEditQueryInsertObjectEvent - read FOnQueryInsertObject write FOnQueryInsertObject; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - procedure DefaultHandler(var Message); override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function FindTexT(const ASearchStr: string; - AStartPos, ALength: Longint; AOptions: TSearchTypes; AForward: Boolean = True): Integer; - function InsertObject: Boolean; - function ShowObjectProperties: Boolean; - function PasteSpecial: Boolean; - procedure Print(const Caption: string); override; - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; - function UpdateAction(Action: TBasicAction): Boolean; override; - function CanFocus: Boolean; override; - function CanRedo: Boolean; virtual; - procedure Redo; virtual; - procedure Undo; virtual; - property RichLines: TcxRichEditStrings - read GetRichLines write SetRichLines; - end; - -function AdjustRichLineBreaks(ADest, ASource: PChar; AShortBreak: Boolean = False): Integer; -function AdjustRichLineBreaksA(ADest, ASource: PAnsiChar; AShortBreak: Boolean = False): Integer; -function AdjustRichLineBreaksW(ADest, ASource: PWideChar; AShortBreak: Boolean = False): Integer; -procedure SetRichEditText(ARichEdit: TRichEdit; - const AEditValue: TcxEditValue); - -implementation - -uses - CommDlg, Printers, cxEditPaintUtils, cxEditUtils, cxExtEditConsts, cxVariants, - cxDWMAPI, dxUxTheme, dxThemeConsts, dxThemeManager, ComObj, CommCtrl, - Math, Types, cxGeometry, dxCore; - -type - TcxStringArray = array of string; - TStringsAccess = class(TStrings); - PcxENLink = ^TENLink; - - PcxConversionFormat = ^TcxConversionFormat; - - TcxConversionFormat = record - ConversionClass: TConversionClass; - Extension: string; - Next: PcxConversionFormat; - end; - -const - cxMinVersionRichEditClass = {$IFNDEF DELPHI12}recRichEdit10{$ELSE}recRichEdit20{$ENDIF}; - - RTFConversionFormat: TcxConversionFormat = ( - ConversionClass: TConversion; - Extension: 'rtf'; - Next: nil - ); - TextConversionFormat: TcxConversionFormat = ( - ConversionClass: TConversion; - Extension: 'txt'; - Next: @RTFConversionFormat - ); - cxRichReadError = $0001; - cxRichWriteError = $0002; - cxRichNoError = $0000; - -const - cxRichEditVersions: array [TcxRichEditClass] of Integer = - (100, 200);//, 300, 410, 500); - cxRichEditClassNames: array [TcxRichEditClass] of string = - ('RICHEDIT', - {$IFDEF DELPHI12}'RICHEDIT20W'{$ELSE}'RICHEDIT20A'{$ENDIF}{, - 'RICHEDIT30', - 'RICHEDIT41', - 'RICHEDIT50'}); - -const - // Flags to specify which interfaces should be returned in the structure above - REO_GETOBJ_NO_INTERFACES = $00000000; - REO_GETOBJ_POLEOBJ = $00000001; - REO_GETOBJ_PSTG = $00000002; - REO_GETOBJ_POLESITE = $00000004; - REO_GETOBJ_ALL_INTERFACES = $00000007; - - // Place object at selection - REO_CP_SELECTION = $FFFFFFFF; - - // Use character position to specify object instead of index - REO_IOB_SELECTION = $FFFFFFFF; - REO_IOB_USE_CP = $FFFFFFFE; - - // Object flags - REO_NULL = $00000000; // No flags - REO_READWRITEMASK = $0000003F; // Mask out RO bits - REO_DONTNEEDPALETTE = $00000020; // Object doesn't need palette - REO_BLANK = $00000010; // Object is blank - REO_DYNAMICSIZE = $00000008; // Object defines size always - REO_INVERTEDSELECT = $00000004; // Object drawn all inverted if sel - REO_BELOWBASELINE = $00000002; // Object sits below the baseline - REO_RESIZABLE = $00000001; // Object may be resized - REO_LINK = $80000000; // Object is a link (RO) - REO_STATIC = $40000000; // Object is static (RO) - REO_SELECTED = $08000000; // Object selected (RO) - REO_OPEN = $04000000; // Object open in its server (RO) - REO_INPLACEACTIVE = $02000000; // Object in place active (RO) - REO_HILITED = $01000000; // Object is to be hilited (RO) - REO_LINKAVAILABLE = $00800000; // Link believed available (RO) - REO_GETMETAFILE = $00400000; // Object requires metafile (RO) - - RECO_PASTE = $00000000; // paste from clipboard - RECO_DROP = $00000001; // drop - RECO_COPY = $00000002; // copy to the clipboard - RECO_CUT = $00000003; // cut to the clipboard - RECO_DRAG = $00000004; // drag - - cxDataFormatCount = 6; - cxPasteFormatCount = 6; - -var - FRichEditLibrary: HMODULE = 0; - FRichRenderer, FRichConverter: TcxRichInnerEdit; - FConversionFormatList: PcxConversionFormat = @TextConversionFormat; - - FRichEditDLLNames: TcxStringArray; - - CFObjectDescriptor: Integer; - CFEmbeddedObject: Integer; - CFLinkSource: Integer; - CFRtf: Integer; - CFRETextObj: Integer; - -procedure ReleaseObject(var AObj); -begin - if IUnknown(AObj) <> nil then - IUnknown(AObj)._Release; - IUnknown(AObj) := nil; -end; - -function cxIsFormMDIChild(AForm: TCustomForm): Boolean; -begin - Result := (AForm is TForm) and (TForm(AForm).FormStyle = fsMDIChild); -end; - -function cxSetDrawAspect(AOleObject: IOleObject; AIconic: Boolean; - AIconMetaPict: HGlobal; var ADrawAspect: Cardinal): HResult; -var - AOleCache: IOleCache; - AEnumStatData: IEnumStatData; - AOldAspect: Cardinal; - AAdviseFlags, AConnection: Longint; - ATempMetaPict: HGlobal; - AFormatEtc: TFormatEtc; - AMedium: TStgMedium; - AClassID: TCLSID; - AStatData: TStatData; - AViewObject: IViewObject; -begin - AOldAspect := ADrawAspect; - if AIconic then - begin - ADrawAspect := DVASPECT_ICON; - AAdviseFlags := ADVF_NODATA; - end else - begin - ADrawAspect := DVASPECT_CONTENT; - AAdviseFlags := ADVF_PRIMEFIRST; - end; - if (ADrawAspect <> AOldAspect) or (ADrawAspect = DVASPECT_ICON) then - begin - AOleCache := AOleObject as IOleCache; - if ADrawAspect <> AOldAspect then - begin - OleCheck(AOleCache.EnumCache(AEnumStatData)); - if AEnumStatData <> nil then - while AEnumStatData.Next(1, AStatData, nil) = 0 do - if AStatData.formatetc.dwAspect = Integer(AOldAspect) then - AOleCache.Uncache(AStatData.dwConnection); - FillChar(AFormatEtc, SizeOf(FormatEtc), 0); - AFormatEtc.dwAspect := ADrawAspect; - AFormatEtc.lIndex := -1; - OleCheck(AOleCache.Cache(AFormatEtc, AAdviseFlags, AConnection)); - if AOleObject.QueryInterface(IViewObject, AViewObject) = 0 then - AViewObject.SetAdvise(ADrawAspect, 0, nil); - end; - if ADrawAspect = DVASPECT_ICON then - begin - ATempMetaPict := 0; - if AIconMetaPict = 0 then - begin - OleCheck(AOleObject.GetUserClassID(AClassID)); - ATempMetaPict := OleGetIconOfClass(AClassID, nil, True); - AIconMetaPict := ATempMetaPict; - end; - try - with AFormatEtc do - begin - cfFormat := CF_METAFILEPICT; - ptd := nil; - dwAspect := DVASPECT_ICON; - lindex := -1; - tymed := TYMED_MFPICT; - end; - with AMedium do - begin - tymed := TYMED_MFPICT; - hMetaFilePict := AIconMetaPict; - unkForRelease := nil; - end; - OleCheck(AOleCache.SetData(AFormatEtc, AMedium, False)); - finally - DestroyMetaPict(ATempMetaPict); - end; - end; - if ADrawAspect <> DVASPECT_ICON then - AOleObject.Update; - end; - Result := S_OK; -end; - -procedure cxCreateStorage(var AStorage: IStorage); -var - ALockBytes: ILockBytes; -begin - OleCheck(CreateILockBytesOnHGlobal(0, True, ALockBytes)); - OleCheck(StgCreateDocfileOnILockBytes(ALockBytes, STGM_READWRITE - or STGM_SHARE_EXCLUSIVE or STGM_CREATE, 0, AStorage)); - ReleaseObject(ALockBytes); -end; - -function cxWStrLen(AStr: PWideChar): Integer; -begin - Result := 0; - while AStr[Result] <> #0 do Inc(Result); -end; - -procedure cxCenterWindow(Wnd: HWnd); -var - ARect: TRect; -begin - ARect := cxGetWindowRect(Wnd); - SetWindowPos(Wnd, 0, - (GetSystemMetrics(SM_CXSCREEN) - cxRectWidth(ARect)) div 2, - (GetSystemMetrics(SM_CYSCREEN) - cxRectHeight(ARect)) div 3, - 0, 0, SWP_NOACTIVATE or SWP_NOSIZE or SWP_NOZORDER); -end; - -function cxOleDialogHook(Wnd: HWnd; Msg, WParam, LParam: Longint): Longint; stdcall; -begin - Result := 0; - if Msg = WM_INITDIALOG then - begin - if GetWindowLong(Wnd, GWL_STYLE) and WS_CHILD <> 0 then - Wnd := GetWindowLong(Wnd, GWL_HWNDPARENT); - cxCenterWindow(Wnd); - Result := 1; - end; -end; - -function cxOleStdGetFirstMoniker(const AMoniker: IMoniker): IMoniker; -var - AMksys: Longint; - AEnumMoniker: IEnumMoniker; -begin - Result := nil; - if AMoniker <> nil then - begin - if (AMoniker.IsSystemMoniker(AMksys) = 0) and - (AMksys = MKSYS_GENERICCOMPOSITE) then - begin - if AMoniker.Enum(True, AEnumMoniker) <> 0 then Exit; - AEnumMoniker.Next(1, Result, nil); - end - else - Result := AMoniker; - end; -end; - -function cxOleStdGetLenFilePrefixOfMoniker(const AMoniker: IMoniker): Integer; -var - AMkFirst: IMoniker; - ABindCtx: IBindCtx; - AMksys: Longint; - P: PWideChar; -begin - Result := 0; - if AMoniker <> nil then - begin - AMkFirst := cxOleStdGetFirstMoniker(AMoniker); - if (AMkFirst <> nil) and - (AMkFirst.IsSystemMoniker(AMksys) = 0) and - (AMksys = MKSYS_FILEMONIKER) and - (CreateBindCtx(0, ABindCtx) = 0) and - (AMkFirst.GetDisplayName(ABindCtx, nil, P) = 0) and (P <> nil) then - begin - Result := cxWStrLen(P); - CoTaskMemFree(P); - end; - end; -end; - -function cxCoAllocCStr(const S: AnsiString): PAnsiChar; overload; -begin - Result := StrCopy(CoTaskMemAlloc(Length(S) + 1), PAnsiChar(S)); -end; - -function cxCoAllocCStr(const S: WideString): PChar; overload; -begin -{$IFDEF DELPHI12} - Result := StrCopy(CoTaskMemAlloc(Length(S) + 1), PChar(S)); -{$ELSE} - Result := cxCoAllocCStr(dxWideStringToAnsiString(S)); -{$ENDIF} -end; - -function cxGetOleLinkDisplayName(const AOleLink: IOleLink): PChar; -var - P: PWideChar; -begin - AOleLink.GetSourceDisplayName(P); - Result := cxCoAllocCStr(P); -end; - -function cxGetOleObjectFullName(const AOleObject: IOleObject): PChar; -var - P: PWideChar; -begin - AOleObject.GetUserType(USERCLASSTYPE_FULL, P); - Result := cxCoAllocCStr(P); - CoTaskMemFree(P); -end; - -function cxGetOleObjectShortName(const AOleObject: IOleObject): PChar; -var - P: PWideChar; -begin - AOleObject.GetUserType(USERCLASSTYPE_SHORT, P); - Result := cxCoAllocCStr(P); - CoTaskMemFree(P); -end; - -function cxGetIconMetaPict(AOleObject: IOleObject; ADrawAspect: Longint): HGlobal; -var - ADataObject: IDataObject; - AFormatEtc: TFormatEtc; - AMedium: TStgMedium; - AClassID: TCLSID; -begin - Result := 0; - if ADrawAspect = DVASPECT_ICON then - begin - AOleObject.QueryInterface(IDataObject, ADataObject); - if ADataObject <> nil then - begin - with AFormatEtc do - begin - cfFormat := CF_METAFILEPICT; - ptd := nil; - dwAspect := DVASPECT_ICON; - lIndex := -1; - tymed := TYMED_MFPICT; - end; - if Succeeded(ADataObject.GetData(AFormatEtc, AMedium)) then - Result := AMedium.hMetaFilePict; - ReleaseObject(ADataObject); - end; - end; - if Result = 0 then - begin - OleCheck(AOleObject.GetUserClassID(AClassID)); - Result := OleGetIconOfClass(AClassID, nil, True); - end; -end; - -function cxRichEditGetOleInterface(ARichEdit: TcxRichInnerEdit; - out AOleInterface: IcxRichEditOle): Boolean; -begin - Result := Assigned(ARichEdit) and ARichEdit.HandleAllocated and - Boolean(SendMessage(ARichEdit.Handle, EM_GETOLEINTERFACE, 0, longint(@AOleInterface))); -end; - -function cxRichEditSetOleCallback(ARichEdit: TcxRichInnerEdit; - AOleInterface: IcxRichEditOleCallback): Boolean; -begin - Result := Assigned(ARichEdit) and ARichEdit.HandleAllocated and - Boolean(SendMessage(ARichEdit.Handle, EM_SETOLECALLBACK, 0, longint(AOleInterface))); -end; - -function cxGetVCLFrameForm(AForm: TCustomForm): IVCLFrameForm; -begin - if AForm.OleFormObject = nil then - TOleForm.Create(AForm); - Result := AForm.OleFormObject as IVCLFrameForm; -end; - -function cxSendStructMessageEx(AHandle: THandle; AMsg: UINT; const AStructure; AParam: Integer; AStructureIsLParam: Boolean): LRESULT; overload; -begin - if AStructureIsLParam then - Result := SendMessage(AHandle, AMsg, AParam, Integer(@AStructure)) - else - Result := SendMessage(AHandle, AMsg, Integer(@AStructure), AParam); -end; - -function cxSendStructMessage(AHandle: THandle; AMsg: UINT; WParam: WPARAM; const LParam): LRESULT; overload; -begin - Result := cxSendStructMessageEx(AHandle, AMsg, LParam, WParam, True); -end; - -function cxSendStructMessage(AHandle: THandle; AMsg: UINT; const WParam; LParam: LParam): LRESULT; overload; -begin - Result := cxSendStructMessageEx(AHandle, AMsg, WParam, LParam, False); -end; - -function cxRichEditDLLNames: TcxStringArray; - - procedure InitRichEditDLLNames; - const - cxRichEditDLLNamesCount = 3; - begin - SetLength(FRichEditDLLNames, cxRichEditDLLNamesCount); - FRichEditDLLNames[0] := 'Riched32.dll'; - FRichEditDLLNames[1] := 'Riched20.dll'; - FRichEditDLLNames[2] := 'Msftedit.dll'; - end; - -begin - if Length(FRichEditDLLNames) = 0 then - InitRichEditDLLNames; - Result := FRichEditDLLNames; -end; - -function AdjustRichLineBreaksW(ADest, ASource: PWideChar; AShortBreak: Boolean = False): Integer; -var - APrevDest: PWideChar; -begin - APrevDest := ADest; - repeat - if (ASource^ = WideChar($0D)) or (ASource^ = WideChar($0A)) then - begin - if AShortBreak then - ADest^ := WideChar($0D) - else - begin - ADest^ := WideChar($0D); - Inc(ADest); - ADest^ := WideChar($0A); - end; - if (ASource^ = WideChar($0D)) and ((ASource + 1)^ = WideChar($0A)) then - Inc(ASource); - end - else - ADest^ := ASource^; - Inc(ASource); - Inc(ADest); - until ASource^ = WideChar($00); - ADest^ := WideChar($00); - Result := ADest - APrevDest; -end; - -function AdjustRichLineBreaksA(ADest, ASource: PAnsiChar; AShortBreak: Boolean = False): Integer; -var - APrevDest: PAnsiChar; -begin - APrevDest := ADest; - repeat - if (ASource^ = AnsiChar($0D)) or (ASource^ = AnsiChar($0A)) then - begin - if AShortBreak then - ADest^ := AnsiChar($0D) - else - begin - ADest^ := AnsiChar($0D); - Inc(ADest); - ADest^ := AnsiChar($0A); - end; - if (ASource^ = AnsiChar($0D)) and ((ASource + 1)^ = AnsiChar($0A)) then - Inc(ASource); - end - else - ADest^ := ASource^; - Inc(ASource); - Inc(ADest); - until ASource^ = AnsiChar($00); - ADest^ := AnsiChar($00); - Result := ADest - APrevDest; -end; - -function AdjustRichLineBreaks(ADest, ASource: PChar; AShortBreak: Boolean = False): Integer; -begin -{$IFDEF DELPHI12} - Result := AdjustRichLineBreaksW(ADest, ASource, AShortBreak); -{$ELSE} - Result := AdjustRichLineBreaksA(ADest, ASource, AShortBreak); -{$ENDIF} -end; - -function cxRichEditStreamLoad(dwCookie: Longint; pbBuff: PByte; - cb: Longint; var pcb: Longint): Longint; stdcall; -var - AStreamInfo: TRichEditStreamInfo; -{$IFDEF DELPHI12} - P, APreamble: TBytes; -{$ENDIF} -begin - Result := cxRichNoError; - try - pcb := 0; - AStreamInfo := PRichEditStreamInfo(dwCookie)^; - if AStreamInfo.Converter <> nil then - begin - {$IFNDEF DELPHI12} - pcb := AStreamInfo.Converter.ConvertReadStream(AStreamInfo.Stream, PAnsiChar(pbBuff), cb); - {$ELSE} - SetLength(P, cb + 1); - pcb := AStreamInfo.Converter.ConvertReadStream(AStreamInfo.Stream, P, cb); - if AStreamInfo.PlainText then - begin - if AStreamInfo.Encoding = nil then - begin - P := TEncoding.Convert(TEncoding.Default, TEncoding.Unicode, P, 0, pcb); - pcb := Length(P); - end - else - begin - if not TEncoding.Unicode.Equals(AStreamInfo.Encoding) then - begin - P := TEncoding.Convert(AStreamInfo.Encoding, TEncoding.Unicode, P, 0, pcb); - pcb := Length(P); - end; - end; - end; - APreamble := TEncoding.Unicode.GetPreamble; - if (pcb >= 2) and (P[0] = APreamble[0]) and (P[1] = APreamble[1]) then - begin - AStreamInfo.Stream.Position := 2; - pcb := AStreamInfo.Converter.ConvertReadStream(AStreamInfo.Stream, P, cb); - end; - Move(P[0], pbBuff^, pcb); - {$ENDIF} - end; - except - Result := cxRichReadError; - end; -end; - -function cxRichEditStreamSave(dwCookie: Longint; pbBuff: PByte; cb: Longint; - var pcb: Longint): Longint; stdcall; - -{$IFDEF DELPHI12} - function BytesOf(AValue: PAnsiChar): TBytes; - var - ALength: Integer; - begin - ALength := StrLen(AValue) + 1; - SetLength(Result, ALength); - Move(AValue^, PAnsiChar(Result)^, ALength); - end; -{$ENDIF} - -var - AStreamInfo: TRichEditStreamInfo; -{$IFDEF DELPHI12} - P: TBytes; -{$ENDIF} -begin - Result := cxRichNoError; - try - pcb := 0; - AStreamInfo := PRichEditStreamInfo(dwCookie)^; - if AStreamInfo.Converter <> nil then - begin - {$IFDEF DELPHI12} - SetLength(P, cb); - Move(pbBuff^, P[0], cb); - if AStreamInfo.PlainText then - begin - if AStreamInfo.Encoding = nil then - P := TEncoding.Convert(TEncoding.Unicode, TEncoding.Default, P) - else - begin - if not TEncoding.Unicode.Equals(AStreamInfo.Encoding) then - P := TEncoding.Convert(TEncoding.Unicode, AStreamInfo.Encoding, P); - end; - end; - pcb := AStreamInfo.Converter.ConvertWriteStream(AStreamInfo.Stream, P, Length(P)); - if (pcb <> cb) and (pcb = Length(P)) then - pcb := cb; - {$ELSE} - pcb := AStreamInfo.Converter.ConvertWriteStream(AStreamInfo.Stream, PAnsiChar(pbBuff), cb); - {$ENDIF} - end; - except - Result := cxRichWriteError; - end; -end; - -function IsRichText(const AText: string): Boolean; -const - ARichPrefix = '{\rtf'; -begin - Result := Copy(AText, 1, Length(ARichPrefix)) = ARichPrefix; -end; - -procedure LoadRichFromString(ALines: TStrings; const S: string); - - procedure PrepareStream( - AStream: TStringStream); - begin - end; - -var - AStream: TStringStream; -{$IFDEF DELPHI12} - AEncoding: TEncoding; -{$ENDIF} -begin -{$IFDEF DELPHI12} - if IsRichText(S) then - AEncoding := TEncoding.Default - else - AEncoding := TEncoding.Unicode; -{$ENDIF} - AStream := TStringStream.Create(S{$IFDEF DELPHI12}, AEncoding{$ENDIF}); - try - PrepareStream(AStream); - ALines.LoadFromStream(AStream{$IFDEF DELPHI12}, AEncoding{$ENDIF}); - finally - AStream.Free; - end; -end; - -procedure ReleaseConversionFormatList; -var - AConversionFormatList: PcxConversionFormat; -begin - while FConversionFormatList <> @TextConversionFormat do - begin - AConversionFormatList := FConversionFormatList^.Next; - Dispose(FConversionFormatList); - FConversionFormatList := AConversionFormatList; - end; -end; - -function CreateInnerRich: TcxRichInnerEdit; -begin - Result := nil; - if Application.Handle <> 0 then - begin - Result := TcxRichInnerEdit.Create(nil); - Result.ParentWindow := Application.Handle; - SendMessage(Result.Handle, EM_SETEVENTMASK, 0, 0); - end; -end; - -function RichRenderer: TcxRichInnerEdit; -begin - if FRichRenderer = nil then - FRichRenderer := CreateInnerRich; - Result := FRichRenderer; -end; - -function RichConverter: TcxRichInnerEdit; -begin - if FRichConverter = nil then - FRichConverter := CreateInnerRich; - Result := FRichConverter; -end; - -procedure InternalSetRichEditText(ARichEdit: TRichEdit; const AText: string); -begin - if not ARichEdit.PlainText then - LoadRichFromString(ARichEdit.Lines, AText) - else - ARichEdit.Perform(WM_SETTEXT, 0, Longint(PChar(AText))); -end; - -function ConvertRichText(const AText: string): string; -begin - InternalSetRichEditText(RichConverter, AText); - Result := RichConverter.Text; -end; - -procedure SetRichDefAttributes(AEdit: TRichEdit; AFont: TFont; ATextColor: TColor); -begin - if not AEdit.HandleAllocated then - Exit; - - AEdit.DefAttributes.Assign(AFont); - AEdit.DefAttributes.Color := ATextColor; -end; - -procedure InitRichRenderer(AProperties: TcxCustomRichEditProperties; - AFont: TFont; AColor, ATextColor: TColor; const AText: string); -begin - with RichRenderer do - begin - MemoMode := TcxCustomRichEditProperties(AProperties).MemoMode; - PlainText := TcxCustomRichEditProperties(AProperties).PlainText; - Alignment := TcxCustomRichEditProperties(AProperties).Alignment; - AutoURLDetect := TcxCustomRichEditProperties(AProperties).AutoURLDetect; - AllowObjects := TcxCustomRichEditProperties(AProperties).AllowObjects; - RichEditClass := TcxCustomRichEditProperties(AProperties).RichEditClass; - HandleNeeded; - - if not RichRenderer.MemoMode then - LoadRichFromString(RichLines, AText) - else - Text := AText; - - if not IsRichText(AText) or MemoMode or PlainText then - SetRichDefAttributes(RichRenderer, AFont, ATextColor); - SendMessage(Handle, EM_SETBKGNDCOLOR, 0, ColorToRGB(AColor)); - end; -end; - -procedure DrawRichEdit(ADC: HDC; const ARect: TRect; const AText: string; - AProperties: TcxCustomRichEditProperties; AFont: TFont; - AColor, ATextColor: TColor; ACalculateHeight: Boolean; out AHeight: Integer); -const - TwipsPerInch = 1440; -var - AFormatRange: TFormatRange; - AStartIndex: Integer; -begin - if not ACalculateHeight then - FillRect(ADC, Rect(0, 0, ARect.Right - ARect.Left, - ARect.Bottom - ARect.Top), GetSolidBrush(AColor)); - InitRichRenderer(AProperties, AFont, AColor, ATextColor, AText); - SendMessage(RichRenderer.Handle, EM_FORMATRANGE, 0, 0); - - if ACalculateHeight then - AHeight := 0; - AFormatRange.hdc := ADC; - AFormatRange.hdcTarget := ADC; - AFormatRange.chrg.cpMin := 0; - AFormatRange.chrg.cpMax := -1; - repeat - AFormatRange.rc := cxEmptyRect; - AFormatRange.rc.Right := (ARect.Right - ARect.Left) * TwipsPerInch div GetDeviceCaps(ADC, LOGPIXELSX); - if ACalculateHeight then - AFormatRange.rc.Bottom := TwipsPerInch - else - AFormatRange.rc.Bottom := (ARect.Bottom - ARect.Top)(*65535*) * TwipsPerInch div GetDeviceCaps(ADC, LOGPIXELSY); - AFormatRange.rcPage := AFormatRange.rc; - AStartIndex := AFormatRange.chrg.cpMin; - AFormatRange.chrg.cpMin := cxSendStructMessage(RichRenderer.Handle, EM_FORMATRANGE, - WPARAM(not ACalculateHeight), AFormatRange); - if AFormatRange.chrg.cpMin <= AStartIndex then - Break; - if ACalculateHeight then - Inc(AHeight, AFormatRange.rc.Bottom - AFormatRange.rc.Top); - until not ACalculateHeight; - if ACalculateHeight then - AHeight := AHeight * GetDeviceCaps(ADC, LOGPIXELSY) div TwipsPerInch; - - SendMessage(RichRenderer.Handle, EM_FORMATRANGE, 0, 0); -end; - -procedure SetRichEditText(ARichEdit: TRichEdit; const AEditValue: TcxEditValue); -begin - InternalSetRichEditText(ARichEdit, VarToStr(AEditValue)); -end; - -{ TcxRichEdit } - -class function TcxRichEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxRichEditProperties; -end; - -function TcxRichEdit.GetActiveProperties: TcxRichEditProperties; -begin - Result := TcxRichEditProperties(InternalGetActiveProperties); -end; - -function TcxRichEdit.GetProperties: TcxRichEditProperties; -begin - Result := TcxRichEditProperties(FProperties); -end; - -procedure TcxRichEdit.SetProperties(Value: TcxRichEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxRichInnerEditHelper } - -constructor TcxRichInnerEditHelper.Create(AEdit: TcxRichInnerEdit); -begin - inherited Create(nil); - FEdit := AEdit; - FEdit.PlainText := False; - FEdit.WordWrap := False; -end; - -function TcxRichInnerEditHelper.GetControl: TWinControl; -begin - Result := Edit; -end; - -procedure TcxRichInnerEditHelper.LockBounds(ALock: Boolean); -begin - with Edit do - if ALock then - Inc(FLockBoundsCount) - else - if FLockBoundsCount > 0 then - Dec(FLockBoundsCount); -end; - -function TcxRichInnerEditHelper.GetOnChange: TNotifyEvent; -begin - Result := Edit.OnChange; -end; - -procedure TcxRichInnerEditHelper.SafelySetFocus; -var - APrevAutoSelect: Boolean; -begin - with Edit do - begin - APrevAutoSelect := AutoSelect; - AutoSelect := False; - SetFocus; - AutoSelect := APrevAutoSelect; - end; -end; - -function TcxRichInnerEditHelper.CallDefWndProc(AMsg: UINT; WParam: WPARAM; - LParam: LPARAM): LRESULT; -begin - Result := CallWindowProc(Edit.DefWndProc, Edit.Handle, AMsg, WParam, LParam); -end; - -function TcxRichInnerEditHelper.CanProcessClipboardMessages: Boolean; -begin - Result := True; -end; - -function TcxRichInnerEditHelper.GetEditValue: TcxEditValue; -begin - with Edit do - Result := Text; -end; - -procedure TcxRichInnerEditHelper.SetEditValue(const Value: TcxEditValue); -var - AContainer: TcxCustomRichEdit; -begin - AContainer := Edit.Container; - if AContainer.PropertiesChange then - Exit; - - if CanAllocateHandle(Edit) and not Edit.HandleAllocated then - Edit.HandleNeeded; - - if AContainer.ActiveProperties.MemoMode or not Edit.HandleAllocated then - Edit.Text := dxVariantToString(Value) - else - begin - Edit.Container.LockChangeEvents(True); - try - LoadRichFromString(Edit.RichLines, dxVariantToString(Value)); - finally - Edit.Container.LockChangeEvents(False); - end; - end; -end; - -procedure TcxRichInnerEditHelper.SetParent(Value: TWinControl); -begin - Edit.Parent := Value; -end; - -procedure TcxRichInnerEditHelper.SetOnChange(Value: TNotifyEvent); -begin - Edit.OnChange := Value; -end; - -// IcxInnerTextEdit -procedure TcxRichInnerEditHelper.ClearSelection; -begin - Edit.ClearSelection; -end; - -procedure TcxRichInnerEditHelper.CopyToClipboard; -begin - Edit.CopyToClipboard; -end; - -function TcxRichInnerEditHelper.GetAlignment: TAlignment; -begin - Result := Edit.Alignment; -end; - -function TcxRichInnerEditHelper.GetAutoSelect: Boolean; -begin - Result := Edit.AutoSelect; -end; - -function TcxRichInnerEditHelper.GetCharCase: TEditCharCase; -begin - Result := Edit.CharCase; -end; - -function TcxRichInnerEditHelper.GetEchoMode: TcxEditEchoMode; -begin - Result := eemNormal; -end; - -function TcxRichInnerEditHelper.GetFirstVisibleCharIndex: Integer; -var - R: TRect; -begin - SendMessage(Edit.Handle, EM_GETRECT, 0, Integer(@R)); - Result := SendMessage(Edit.Handle, EM_CHARFROMPOS, 0, LParam(@R.TopLeft)); -end; - -function TcxRichInnerEditHelper.GetHideSelection: Boolean; -begin - Result := Edit.HideSelection; -end; - -function TcxRichInnerEditHelper.GetInternalUpdating: Boolean; -begin - Result := Edit.FInternalUpdating; -end; - -function TcxRichInnerEditHelper.GetMaxLength: Integer; -begin - Result := Edit.MaxLength; -end; - -function TcxRichInnerEditHelper.GetMultiLine: Boolean; -begin - Result := True; -end; - -function TcxRichInnerEditHelper.GetOEMConvert: Boolean; -begin - Result := Edit.OEMConvert; -end; - -function TcxRichInnerEditHelper.GetOnSelChange: TNotifyEvent; -begin - Result := Edit.OnSelectionChange; -end; - -function TcxRichInnerEditHelper.GetPasswordChar: TCaptionChar; -begin - Result := #0; -end; - -function TcxRichInnerEditHelper.GetReadOnly: Boolean; -begin - Result := Edit.ReadOnly; -end; - -function TcxRichInnerEditHelper.GetSelLength: Integer; -begin - Result := Edit.SelLength; -end; - -function TcxRichInnerEditHelper.GetSelStart: Integer; -begin - Result := Edit.SelStart; -end; - -function TcxRichInnerEditHelper.GetSelText: string; -begin - Result := Edit.SelText; -end; - -procedure TcxRichInnerEditHelper.SelectAll; -begin - with Edit do - if HandleAllocated then - SelectAll; -end; - -procedure TcxRichInnerEditHelper.SetAlignment(Value: TAlignment); -begin - Edit.Alignment := Value; -end; - -procedure TcxRichInnerEditHelper.SetAutoSelect(Value: Boolean); -begin - Edit.AutoSelect := Value; -end; - -procedure TcxRichInnerEditHelper.SetCharCase(Value: TEditCharCase); -begin - Edit.CharCase := Value; -end; - -procedure TcxRichInnerEditHelper.SetEchoMode(Value: TcxEditEchoMode); -begin -end; - -procedure TcxRichInnerEditHelper.SetHideSelection(Value: Boolean); -begin - if not Edit.Container.IsInplace then - Edit.HideSelection := Value; -end; - -procedure TcxRichInnerEditHelper.SetInternalUpdating(Value: Boolean); -begin - Edit.FInternalUpdating := Value; -end; - -procedure TcxRichInnerEditHelper.SetImeMode(Value: TImeMode); -begin - Edit.ImeMode := Value; -end; - -procedure TcxRichInnerEditHelper.SetImeName(const Value: TImeName); -begin - Edit.ImeName := Value; -end; - -procedure TcxRichInnerEditHelper.SetMaxLength(Value: Integer); -begin - Edit.MaxLength := Value; -end; - -procedure TcxRichInnerEditHelper.SetOEMConvert(Value: Boolean); -begin - Edit.OEMConvert := Value; -end; - -procedure TcxRichInnerEditHelper.SetOnSelChange(Value: TNotifyEvent); -begin - Edit.OnSelectionChange := Value; -end; - -procedure TcxRichInnerEditHelper.SetPasswordChar(Value: TCaptionChar); -begin -end; - -procedure TcxRichInnerEditHelper.SetReadOnly(Value: Boolean); -begin - Edit.ReadOnly := Value; -end; - -procedure TcxRichInnerEditHelper.SetSelLength(Value: Integer); -begin - Edit.SelLength := Value; -end; - -procedure TcxRichInnerEditHelper.SetSelStart(Value: Integer); -begin - with Edit do - SelStart := Value; -end; - -procedure TcxRichInnerEditHelper.SetSelText(Value: string); -begin - Edit.SelText := Value; -end; - -function TcxRichInnerEditHelper.GetImeLastChar: Char; -begin - Result := #0; -end; - -function TcxRichInnerEditHelper.GetImeMode: TImeMode; -begin - Result := Edit.ImeMode; -end; - -function TcxRichInnerEditHelper.GetImeName: TImeName; -begin - Result := Edit.ImeName; -end; - -function TcxRichInnerEditHelper.GetControlContainer: TcxContainer; -begin - Result := Edit.Container; -end; - -// IcxInnerMemo -function TcxRichInnerEditHelper.GetCaretPos: TPoint; -begin - Result := Edit.CaretPos; -end; - -function TcxRichInnerEditHelper.GetLines: TStrings; -begin - Result := Edit.Lines; -end; - -function TcxRichInnerEditHelper.GetScrollBars: TScrollStyle; -begin - Result := Edit.ScrollBars; -end; - -function TcxRichInnerEditHelper.GetWantReturns: Boolean; -begin - Result := Edit.WantReturns; -end; - -function TcxRichInnerEditHelper.GetWantTabs: Boolean; -begin - Result := Edit.WantTabs; -end; - -function TcxRichInnerEditHelper.GetWordWrap: Boolean; -begin - Result := Edit.WordWrap; -end; - -{$IFDEF DELPHI12} -function TcxRichInnerEditHelper.GetTextHint: string; -begin - Result := Edit.TextHint; -end; - -procedure TcxRichInnerEditHelper.SetTextHint(Value: string); -begin - Edit.TextHint := Value; -end; -{$ENDIF} - -procedure TcxRichInnerEditHelper.SetCaretPos(const Value: TPoint); -begin - SetMemoCaretPos(Edit, Value); -end; - -procedure TcxRichInnerEditHelper.SetScrollBars(Value: TScrollStyle); -begin - Edit.ScrollBars := Value; -end; - -procedure TcxRichInnerEditHelper.SetWantReturns(Value: Boolean); -begin - Edit.WantReturns := Value; -end; - -procedure TcxRichInnerEditHelper.SetWantTabs(Value: Boolean); -begin - Edit.WantTabs := Value; -end; - -procedure TcxRichInnerEditHelper.SetWordWrap(Value: Boolean); -begin - Edit.WordWrap := Value; -end; - -{ TcxRichEditStrings } - -constructor TcxRichEditStrings.Create(ARichEdit: TcxRichInnerEdit); -begin - inherited Create; - FRichEdit := ARichEdit; - FTextType := SF_TEXT; -end; - -destructor TcxRichEditStrings.Destroy; -begin - FreeAndNil(FConverter); - inherited Destroy; -end; - -procedure TcxRichEditStrings.Clear; -begin - if Count > 0 then - RichEdit.Lines.Clear; -end; - -function TcxRichEditStrings.CalcStreamTextType(AStreamOperation: TcxRichEditStreamOperation; ACustom: Boolean; - ACustomStreamModes: TcxRichEditStreamModes): Longint; -var - AStreamModes, AAllowStreamModes: TcxRichEditStreamModes; -begin - if ACustom then - AStreamModes := ACustomStreamModes - else - AStreamModes := GetStreamModes; - if csDesigning in RichEdit.ComponentState then - begin - Result := SF_RTF; - Exit; - end; - AAllowStreamModes := GetAllowStreamModesByStreamOperation(AStreamOperation); - if RichEdit.MemoMode or RichEdit.PlainText then - begin - Result := SF_TEXT{$IFDEF DELPHI12} or SF_UNICODE{$ENDIF}; - if (resmUnicode in AStreamModes) and (resmUnicode in AAllowStreamModes) then - Result := Result or SF_UNICODE; - if (resmTextIzed in AStreamModes) and (resmTextIzed in AAllowStreamModes) then - Result := SF_TEXTIZED; - end - else - begin - Result := SF_RTF; - if (resmRtfNoObjs in AStreamModes) and (resmRtfNoObjs in AAllowStreamModes) then - Result := SF_RTFNOOBJS; - if (resmPlainRtf in AStreamModes) and (resmPlainRtf in AAllowStreamModes) then - Result := Result or SFF_PLAINRTF; - end; - if (resmSelection in AStreamModes) and (resmSelection in AAllowStreamModes) then - Result := Result or SFF_SELECTION; -end; - -function TcxRichEditStrings.GetAllowStreamModesByStreamOperation(AStreamOperation: TcxRichEditStreamOperation): TcxRichEditStreamModes; -begin - if AStreamOperation = esoSaveTo then - Result := [resmSelection, resmPlainRtf, resmRtfNoObjs, resmUnicode, resmTextIzed] - else - Result := [resmSelection, resmPlainRtf, resmUnicode]; -end; - -function TcxRichEditStrings.GetStreamModes: TcxRichEditStreamModes; -begin - Result := FRichEdit.StreamModes; -end; - -procedure TcxRichEditStrings.AddStrings(Strings: TStrings); -var - APrevSelectionChange: TNotifyEvent; -begin - APrevSelectionChange := RichEdit.OnSelectionChange; - RichEdit.OnSelectionChange := nil; - try - inherited AddStrings(Strings); - finally - RichEdit.OnSelectionChange := APrevSelectionChange; - end; -end; - -procedure TcxRichEditStrings.Delete(Index: Integer); -begin - FRichEdit.Lines.Delete(Index); -end; - -procedure TcxRichEditStrings.Insert(Index: Integer; const S: string); -var - AFormat: string; - AStr: PChar; - ASelection: TCharRange; -begin - if (Index < 0) or (Index > Count) then - Exit; - IsModification := True; - try - ASelection.cpMin := FRichEdit.GetLineIndex(Index); - if ASelection.cpMin < 0 then - begin - ASelection.cpMin := FRichEdit.GetLineIndex(Index - 1); - if ASelection.cpMin < 0 then - ASelection.cpMin := 0 - else - ASelection.cpMin := ASelection.cpMin + FRichEdit.GetLineLength(Index - 1); - AFormat := GetLineBreakString + '%s'; - end - else - AFormat := '%s'+ GetLineBreakString; - ASelection.cpMax := ASelection.cpMin; - AStr := PChar(Format(AFormat, [S])); - cxSendStructMessage(FRichEdit.Handle, EM_EXSETSEL, 0, ASelection); - AdjustRichLineBreaks(AStr, PChar(Format(AFormat, [S])), Length(GetLineBreakString) = 1); - SendMessage(FRichEdit.Handle, EM_REPLACESEL, 0, LongInt(AStr)); - if FRichEdit.SelStart <> (ASelection.cpMax + Length(AStr)) then - raise EOutOfResources.Create( - cxGetResourceString(@cxSEditRichEditLineInsertionError)); - finally - IsModification := False; - end; -end; - -procedure TcxRichEditStrings.LoadFromFile(const FileName: string{$IFDEF DELPHI12}; Encoding: TEncoding{$ENDIF}); -begin - InitConverter(FileName); - inherited LoadFromFile(FileName{$IFDEF DELPHI12}, Encoding{$ENDIF}); - FRichEdit.Container.EditModified := False -end; - -procedure TcxRichEditStrings.LoadFromStream(Stream: TStream{$IFDEF DELPHI12}; Encoding: TEncoding{$ENDIF}); -var - APos: Longint; - AStreamOperationInfo: TcxRichEditStreamOperationInfo; -begin - APos := Stream.Position; - try - {$IFDEF DELPHI12} - AStreamOperationInfo.StreamInfo.Encoding := Encoding; - {$ENDIF} - InitStreamOperation(Stream, AStreamOperationInfo, esoLoadFrom); - with AStreamOperationInfo do - begin - cxSendStructMessage(RichEdit.Handle, EM_STREAMIN, TextType, EditStream); - if ((TextType and SF_RTF) = SF_RTF) and (EditStream.dwError <> 0) then - begin - Stream.Position := APos; - TextType := SF_TEXT{$IFDEF DELPHI12} or SF_UNICODE{$ENDIF}; - cxSendStructMessage(RichEdit.Handle, EM_STREAMIN, TextType, EditStream); - end; - if EditStream.dwError <> 0 then - raise EOutOfResources.Create(cxGetResourceString(@cxSEditRichEditLoadFail)); - FTextType := TextType; - end; - finally - if FConverter = nil then - FreeAndNil(AStreamOperationInfo.StreamInfo.Converter); - end; - - with FRichEdit do - if Container <> nil then - Container.EditModified := False; -end; - -procedure TcxRichEditStrings.SaveToFile(const FileName: string{$IFDEF DELPHI12}; Encoding: TEncoding{$ENDIF}); -begin - InitConverter(FileName); - inherited SaveToFile(FileName{$IFDEF DELPHI12}, Encoding{$ENDIF}); -end; - -procedure TcxRichEditStrings.SaveToStream(Stream: TStream - {$IFDEF DELPHI12}; Encoding: TEncoding{$ENDIF}); -var - AStreamOperationInfo: TcxRichEditStreamOperationInfo; -{$IFDEF DELPHI12} - APreamble: TBytes; -{$ENDIF} -begin - try - {$IFDEF DELPHI12} - AStreamOperationInfo.StreamInfo.Encoding := Encoding; - {$ENDIF} - InitStreamOperation(Stream, AStreamOperationInfo, esoSaveTo); - {$IFDEF DELPHI12} - if (Encoding <> nil) and RichEdit.PlainText then - begin - APreamble := Encoding.GetPreamble; - if Length(APreamble) > 0 then - Stream.WriteBuffer(APreamble[0], Length(APreamble)); - end; - {$ENDIF} - with AStreamOperationInfo do - begin - cxSendStructMessage(RichEdit.Handle, EM_STREAMOUT, TextType, EditStream); - if EditStream.dwError <> 0 then - raise EOutOfResources.Create(cxGetResourceString(@cxSEditRichEditSaveFail)); - end; - finally - if FConverter = nil then - FreeAndNil(AStreamOperationInfo.StreamInfo.Converter); - end; -end; - -function TcxRichEditStrings.Get(Index: Integer): string; -begin - Result := FRichEdit.Lines[Index]; - while (Length(Result) > 0) and dxCharInSet(Result[Length(Result)], [#10, #13]) do - System.Delete(Result, Length(Result), 1); -end; - -procedure TcxRichEditStrings.InitConverter(const AFileName: string); -var - AExtension: string; - AConversionFormat: PcxConversionFormat; -begin - AExtension := AnsiLowerCaseFileName(ExtractFileExt(AFilename)); - System.Delete(AExtension, 1, 1); - AConversionFormat := FConversionFormatList; - while AConversionFormat <> nil do - with AConversionFormat^ do - if Extension <> AExtension then AConversionFormat := Next - else Break; - if AConversionFormat = nil then - AConversionFormat := @TextConversionFormat; - if (FConverter = nil) or - (FConverter.ClassType <> AConversionFormat^.ConversionClass) then - begin - FreeAndNil(FConverter); - FConverter := AConversionFormat^.ConversionClass.Create; - end; -end; - -procedure TcxRichEditStrings.InitStreamOperation(AStream: TStream; - var AStreamOperationInfo: TcxRichEditStreamOperationInfo; - AStreamOperation: TcxRichEditStreamOperation; ACustom: Boolean; - ACustomStreamModes: TcxRichEditStreamModes); - -{$IFDEF DELPHI12} - function ContainsPreamble(AStream: TStream; ASignature: TBytes): Boolean; - var - ABuffer: TBytes; - I, ALBufLen, ALSignatureLen, ALPosition: Integer; - begin - Result := True; - ALSignatureLen := Length(ASignature); - ALPosition := AStream.Position; - try - SetLength(ABuffer, ALSignatureLen); - ALBufLen := AStream.Read(ABuffer[0], ALSignatureLen); - finally - AStream.Position := ALPosition; - end; - - if ALBufLen = ALSignatureLen then - begin - for I := 1 to ALSignatureLen do - if ABuffer[I - 1] <> ASignature [I - 1] then - begin - Result := False; - Break; - end; - end - else - Result := False; - end; - - function GetEncoding: TEncoding; - begin - if ContainsPreamble(AStream, TEncoding.Unicode.GetPreamble) then - Result := TEncoding.Unicode - else - if ContainsPreamble(AStream, TEncoding.BigEndianUnicode.GetPreamble) then - Result := TEncoding.BigEndianUnicode - else - if ContainsPreamble(AStream, TEncoding.UTF8.GetPreamble) then - Result := TEncoding.UTF8 - else - Result := TEncoding.Default; - end; -{$ENDIF} - -var - AConverter: TConversion; -begin - if FConverter <> nil then - AConverter := FConverter - else - AConverter := RichEdit.DefaultConverter.Create; - with AStreamOperationInfo do - begin - {$IFDEF DELPHI12} - if (StreamInfo.Encoding = nil) and (AStreamOperation = esoLoadFrom) then - StreamInfo.Encoding := GetEncoding; - StreamInfo.PlainText := RichEdit.PlainText; - {$ENDIF} - StreamInfo.Converter := AConverter; - StreamInfo.Stream := AStream; - EditStream.dwCookie := Longint(Pointer(@StreamInfo)); - EditStream.dwError := 0; - if AStreamOperation = esoLoadFrom then - EditStream.pfnCallBack := @cxRichEditStreamLoad - else - EditStream.pfnCallBack := @cxRichEditStreamSave; - TextType := CalcStreamTextType(AStreamOperation, ACustom, ACustomStreamModes); - end; -end; - -function TcxRichEditStrings.GetCount: Integer; -begin - Result := RichEdit.GetLineCount; - if (Result > 0) and (RichEdit.GetLineLength(Result - 1) = 0) then - Dec(Result); -end; - -procedure TcxRichEditStrings.Put(Index: Integer; const S: string); -begin - TStringsAccess(FRichEdit.Lines).Put(Index, S); -end; - -procedure TcxRichEditStrings.SetUpdateState(Updating: Boolean); -begin - TStringsAccess(FRichEdit.Lines).SetUpdateState(Updating); -end; - -procedure TcxRichEditStrings.SetTextStr(const Value: string); -begin - FRichEdit.Container.Text := Value; -end; - -function TcxRichEditStrings.GetLineBreakString: string; -begin - if FRichEdit.RichVersion >= 200 then - Result := #13 - else - Result := #13#10 -end; - -{ TcxRichInnerEdit } - -constructor TcxRichInnerEdit.Create(AOwner: TComponent); -begin - inherited Create(AOwner); -{$IFDEF DELPHI12} - FSavedEditValue := Null; -{$ENDIF} - ParentColor := True; - ParentFont := True; - FAllowObjects := False; - FAutoURLDetect := False; - FEchoMode := eemNormal; - FHelper := TcxRichInnerEditHelper.Create(Self); - FInternalUpdating := False; - FRichLines := TcxRichEditStrings.Create(Self); - FStreamModes := []; - FUseCRLF := True; - FRichEditOleCallback := TcxRichEditOleCallback.Create(Self); - RichEditClass := recRichEdit20; -end; - -destructor TcxRichInnerEdit.Destroy; -begin - CloseOleObjects; - FRichEditOle := nil; - FreeAndNil(FRichLines); - FreeAndNil(FHelper); - inherited Destroy; - FreeAndNil(FRichEditOleCallBack); -end; - -procedure TcxRichInnerEdit.DefaultHandler(var Message); -begin - if (Container = nil) or not Container.InnerControlDefaultHandler(TMessage(Message)) then - inherited DefaultHandler(Message); -end; - -procedure TcxRichInnerEdit.DragDrop(Source: TObject; X, Y: Integer); -begin - Container.DragDrop(Source, Left + X, Top + Y); -end; - -function TcxRichInnerEdit.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or (Container <> nil) and - Container.DataBinding.ExecuteAction(Action); -end; - -function TcxRichInnerEdit.FindText(const ASearchStr: string; - AStartPos, ALength: Longint; AOptions: TSearchTypes; AForward: Boolean = True): Integer; - - function GetFindTextFlags: Integer; - begin - Result := IfThen(AForward, FR_Down) or - IfThen(stWholeWord in AOptions, {$IFDEF DELPHI12}FR_WHOLEWORD{$ELSE}FT_WHOLEWORD{$ENDIF}) or - IfThen(stMatchCase in AOptions, {$IFDEF DELPHI12}FR_MATCHCASE{$ELSE}FT_MATCHCASE{$ENDIF}); - end; - - procedure PrepareCharRange(var ACharRange: TCharRange); - begin - ACharRange.cpMin := AStartPos; - ACharRange.cpMax := AStartPos; - if AForward then - ACharRange.cpMax := ACharRange.cpMax + ALength - else - ACharRange.cpMax := ACharRange.cpMax - ALength; - end; - -var - AFindText: TFindText; -begin - PrepareCharRange(AFindText.Chrg); - AFindText.lpstrText := PChar(ASearchStr); - Result := cxSendStructMessage(Handle, EM_FINDTEXT, GetFindTextFlags, AFindText); -end; - -function TcxRichInnerEdit.InsertObject: Boolean; -var - AData: {$IFDEF DELPHI12}TOleUIInsertObjectA{$ELSE}TOleUIInsertObject{$ENDIF}; - ANameBuffer: array[0..255] of AnsiChar; - AOleClientSite: IOleClientSite; - AStorage: IStorage; - AReObject: TReObject; - AOleObject: IOleObject; - ASelection: TCharRange; - AIsNewObject: Boolean; -begin - Result := False; - if not FAllowObjects or not Assigned(FRichEditOle) then - Exit; - FillChar(AData, SizeOf(AData), 0); - FillChar(ANameBuffer, SizeOf(ANameBuffer), 0); - AStorage := nil; - try - cxCreateStorage(AStorage); - RichEditOle.GetClientSite(AOleClientSite); - with AData do - begin - cbStruct := SizeOf(AData); - dwFlags := IOF_SELECTCREATENEW or IOF_VERIFYSERVERSEXIST or - IOF_CREATENEWOBJECT or IOF_CREATEFILEOBJECT or IOF_CREATELINKOBJECT; - hWndOwner := Handle; - lpfnHook := cxOleDialogHook; - lpszFile := ANameBuffer; - cchFile := SizeOf(ANameBuffer); - oleRender := OLERENDER_DRAW; - iid := IOleObject; - lpIOleClientSite := AOleClientSite; - lpIStorage := AStorage; - ppvObj := @AOleObject; - end; - if {$IFDEF DELPHI12}OleUIInsertObjectA{$ELSE}OleUIInsertObject{$ENDIF}(AData) = OLEUI_OK then - try - AIsNewObject := AData.dwFlags and IOF_SELECTCREATENEW = IOF_SELECTCREATENEW; - FillChar(AReObject, SizeOf(AReObject), 0); - with AReObject do - begin - cbStruct := SizeOf(AReObject); - cp := REO_CP_SELECTION; - clsid := AData.clsid; - oleobj := AOleObject; - stg := AStorage; - olesite := AOleClientSite; - dvaspect := DVASPECT_CONTENT; - dwFlags := REO_RESIZABLE; - if AIsNewObject then - dwFlags := dwFlags or REO_BLANK; - OleCheck(cxSetDrawAspect(AOleObject, AData.dwFlags and IOF_CHECKDISPLAYASICON <> 0, - AData.hMetaPict, dvaspect)); - end; - if HandleAllocated then - begin - SendMessage(Handle, EM_EXGETSEL, 0, Longint(@ASelection)); - ASelection.cpMax := ASelection.cpMin + 1; - end; - if Succeeded(RichEditOle.InsertObject(AReObject)) then - begin - if HandleAllocated then - begin - SendMessage(Handle, EM_EXSETSEL, 0, Longint(@ASelection)); - SendMessage(Handle, EM_SCROLLCARET, 0, 0); - end; - RichEditOle.SetDvaspect(Longint(REO_IOB_SELECTION), AReObject.dvaspect); - if AIsNewObject then OleCheck(AReObject.oleobj.DoVerb(OLEIVERB_SHOW, nil, - AOleClientSite, 0, Handle, ClientRect)); - Result := True; - end; - finally - DestroyMetaPict(AData.hMetaPict); - ReleaseObject(AOleObject); - ZeroMemory(@AReObject,SizeOf(AReObject)); - end; - finally - ZeroMemory(@AData,SizeOf(AData)); - end; -end; - -function TcxRichInnerEdit.ShowObjectProperties: Boolean; -var - AObjectProps: TOleUIObjectProps; - APropSheet: TPropSheetHeader; - AGeneralProps: TOleUIGnrlProps; - AViewProps: TOleUIViewProps; - ALinkProps: TOleUILinkProps; - ADialogCaption: string; - AReObject: TReObject; -begin - Result := False; - if not Assigned(FRichEditOle) or - (RichEditOle.GetObjectCount <= 0) then - Exit; - if HandleAllocated and - not (SendMessage(Handle, EM_SELECTIONTYPE, 0, 0) in [SEL_OBJECT, SEL_MULTIOBJECT]) then - Exit; - FillChar(AObjectProps, SizeOf(AObjectProps), 0); - FillChar(APropSheet, SizeOf(APropSheet), 0); - FillChar(AGeneralProps, SizeOf(AGeneralProps), 0); - FillChar(AViewProps, SizeOf(AViewProps), 0); - FillChar(ALinkProps, SizeOf(ALinkProps), 0); - AReObject.cbStruct := SizeOf(AReObject); - OleCheck(RichEditOle.GetObject(Longint(REO_IOB_SELECTION), AReObject, REO_GETOBJ_POLEOBJ or - REO_GETOBJ_POLESITE or REO_GETOBJ_PSTG)); - with AObjectProps do - begin - cbStruct := SizeOf(AObjectProps); - dwFlags := 0; - lpPS := @APropSheet; - lpObjInfo := TcxOleUIObjInfo.Create(Self, AReObject); - if (AReObject.dwFlags and REO_LINK) <> 0 then - begin - dwFlags := AObjectProps.dwFlags or OPF_OBJECTISLINK; - lpLinkInfo := TcxOleUILinkInfo.Create(Self, AReObject); - end; - lpGP := @AGeneralProps; - lpVP := @AViewProps; - lpLP := @ALinkProps; - end; - with APropSheet do - begin - dwSize := SizeOf(APropSheet); - hWndParent := Application.Handle; - hInstance := MainInstance; - ADialogCaption := Format(SPropDlgCaption, [cxGetOleObjectFullName(AReObject.oleobj)]); - pszCaption := PChar(ADialogCaption); - end; - AGeneralProps.cbStruct := SizeOf(AGeneralProps); - AGeneralProps.lpfnHook := cxOleDialogHook; - with AViewProps do - begin - cbStruct := SizeOf(AViewProps); - dwFlags := VPF_DISABLESCALE; - end; - ALinkProps.cbStruct := SizeOf(ALinkProps); - ALinkProps.dwFlags := ELF_DISABLECANCELLINK; - Result := Container.CanModify and Container.DoEditing and - (OleUIObjectProperties(AObjectProps) = OLEUI_OK); - ZeroMemory(@AObjectProps, SizeOf(AObjectProps)); - ZeroMemory(@APropSheet, SizeOf(APropSheet)); - ZeroMemory(@AGeneralProps, SizeOf(AGeneralProps)); - ZeroMemory(@AViewProps, SizeOf(AViewProps)); - ZeroMemory(@ALinkProps, SizeOf(ALinkProps)); - ZeroMemory(@AReObject, SizeOf(AReObject)); -end; - -function TcxRichInnerEdit.PasteSpecial: Boolean; - - procedure SetPasteFormats(var APasteFormat: TOleUIPasteEntry; AFormat: TClipFormat; - Atymed: DWORD; const AFormatName, AResultText: string; AFlags: DWORD); - begin - with APasteFormat do begin - fmtetc.cfFormat := AFormat; - fmtetc.dwAspect := DVASPECT_CONTENT; - fmtetc.lIndex := -1; - fmtetc.tymed := Atymed; - if AFormatName <> '' then - lpstrFormatName := PChar(AFormatName) - else - lpstrFormatName := '%s'; - if AResultText <> '' then - lpstrResultText := PChar(AResultText) - else - lpstrResultText := '%s'; - dwFlags := AFlags; - end; - end; - -var - AData: TOleUIPasteSpecial; - APasteFormats: array[0..cxPasteFormatCount - 1] of TOleUIPasteEntry; - AFormat: Integer; - AReObject: TReObject; - AClientSite: IOleClientSite; - AStorage: IStorage; - AOleObject: IOleObject; - ASelection: TCharRange; -begin - Result := False; - if not CanPaste then Exit; - if not Assigned(FRichEditOle) then Exit; - FillChar(AData, SizeOf(AData), 0); - FillChar(APasteFormats, SizeOf(APasteFormats), 0); - with AData do - begin - cbStruct := SizeOf(AData); - dwFlags := PSF_SELECTPASTE; - hWndOwner := Application.Handle; - lpfnHook := cxOleDialogHook; - arrPasteEntries := @APasteFormats; - cPasteEntries := cxPasteFormatCount; - arrLinkTypes := @CFLinkSource; - cLinkTypes := 1; - end; - SetPasteFormats(APasteFormats[0], CFEmbeddedObject, TYMED_ISTORAGE, - '%s', '%s', OLEUIPASTE_PASTE or OLEUIPASTE_ENABLEICON); - SetPasteFormats(APasteFormats[1], CFLinkSource, TYMED_ISTREAM, - '%s', '%s', OLEUIPASTE_LINKTYPE1 or OLEUIPASTE_ENABLEICON); - SetPasteFormats(APasteFormats[2], CF_BITMAP, TYMED_GDI, - 'Windows bitmap', 'bitmap image', OLEUIPASTE_PASTE); - SetPasteFormats(APasteFormats[3], CFRtf, TYMED_ISTORAGE, - CF_RTF, CF_RTF, OLEUIPASTE_PASTE); - SetPasteFormats(APasteFormats[4], CF_TEXT, TYMED_HGLOBAL, - 'Unformatted text', 'text without any formatting', OLEUIPASTE_PASTE); - SetPasteFormats(APasteFormats[5], CFRETextObj, TYMED_ISTORAGE, - CF_RETEXTOBJ, CF_RETEXTOBJ, OLEUIPASTE_PASTE); - try - if OleUIPasteSpecial(AData) = OLEUI_OK then - begin - if AData.nSelectedIndex in [0, 1] then // CFEmbeddedObject, CFLinkSource - begin - FillChar(AReObject, SizeOf(AReObject), 0); - RichEditOle.GetClientSite(AClientSite); - cxCreateStorage(AStorage); - try - case AData.nSelectedIndex of - 0: {CFEmbeddedObject} - OleCheck(OleCreateFromData(AData.lpSrcDataObj, IOleObject, - OLERENDER_DRAW, nil, AClientSite, AStorage, AOleObject)); - 1: {CFLinkSource} - OleCheck(OleCreateLinkFromData(AData.lpSrcDataObj, IOleObject, - OLERENDER_DRAW, nil, AClientSite, AStorage, AOleObject)); - end; - try - with AReObject do - begin - cbStruct := SizeOf(AReObject); - cp := REO_CP_SELECTION; - oleobj := AOleObject; - AOleObject.GetUserClassID(clsid); - stg := AStorage; - olesite := AClientSite; - dvaspect := DVASPECT_CONTENT; - dwFlags := REO_RESIZABLE; - OleCheck(cxSetDrawAspect(oleobj, - AData.dwFlags and PSF_CHECKDISPLAYASICON <> 0, - AData.hMetaPict, dvaspect)); - end; - SendMessage(Handle, EM_EXGETSEL, 0, Longint(@ASelection)); - ASelection.cpMax := ASelection.cpMin + 1; - if Succeeded(RichEditOle.InsertObject(AReObject)) then - begin - SendMessage(Handle, EM_EXSETSEL, 0, Longint(@ASelection)); - OleCheck(RichEditOle.SetDvaspect(Longint(REO_IOB_SELECTION), AReObject.dvaspect)); - end; - finally - ZeroMemory(@AReObject, SizeOf(AReObject)); - end; - finally - ReleaseObject(AClientSite); - ReleaseObject(AStorage); - end; - end - else - begin - AFormat := APasteFormats[AData.nSelectedIndex].fmtetc.cfFormat; - if not Succeeded(RichEditOle.ImportDataObject(AData.lpSrcDataObj, - AFormat, AData.hMetaPict)) then - Exit; - end; - Result := True; - end; - finally - DestroyMetaPict(AData.hMetaPict); - ReleaseObject(AData.lpSrcDataObj); - ZeroMemory(@AData, SizeOf(AData)); - end; -end; - -procedure TcxRichInnerEdit.Print(const Caption: string); -var - AIsCRLFUsed: Boolean; -begin - AIsCRLFUsed := FUseCRLF; - FUseCRLF := False; - try - inherited; - finally - FUseCRLF := AIsCRLFUsed; - end; -end; - -procedure TcxRichInnerEdit.BeforeInsertObject(var AAllowInsertObject: Boolean; - const ACLSID: TCLSID); -begin - if Assigned(OnQueryInsertObject) then - OnQueryInsertObject(Container, AAllowInsertObject, ACLSID); -end; - -procedure TcxRichInnerEdit.Click; -begin - inherited Click; - _TcxContainerAccess.Click(Container); -end; - -procedure TcxRichInnerEdit.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - RichCreateParams(Params, FRichVersion); - with Params.WindowClass do - style := style or CS_VREDRAW or CS_HREDRAW; - if SelectionBar then - Params.Style := Params.Style or ES_SELECTIONBAR; - Params.Style := Params.Style or WS_CLIPSIBLINGS or WS_CLIPCHILDREN; -end; - -procedure TcxRichInnerEdit.CreateWindowHandle(const Params: TCreateParams); -begin - inherited CreateWindowHandle(Params); - if FAllowObjects then - begin - if not cxRichEditGetOleInterface(Self, IcxRichEditOle(FRichEditOle)) then - raise EOutOfResources.Create(cxGetResourceString(@cxSEditRichEditOleInterfaceFail)); - if not cxRichEditSetOleCallback(Self, RichEditOlecallback) then - raise EOutOfResources.Create(cxGetResourceString(@cxSEditRichEditCallBackFail)); - end; - if HandleAllocated then - SendMessage(Handle, EM_AUTOURLDETECT, Longint(FAutoURLDetect and not MemoMode and ((Container = nil) or not Container.IsDesigning)), 0); -end; - -procedure TcxRichInnerEdit.DestroyWindowHandle; -begin - SetOleControlActive(False); - CloseOleObjects; - FRichEditOle := nil; - inherited DestroyWindowHandle; -end; - -procedure TcxRichInnerEdit.CreateWnd; -begin - if Container <> nil then - begin - Alignment := Container.ActiveProperties.Alignment; - Container.ClearSavedChildControlRegions; - PlainText := FSavedPlainText; - end; - inherited CreateWnd; - if Container <> nil then - begin - PlainText := Container.ActiveProperties.PlainText or Container.ActiveProperties.MemoMode; - {$IFDEF DELPHI12} - ParentFont := Container.ParentFont; - if not VarIsNull(FSavedEditValue) then - Container.EditValue := FSavedEditValue; - {$ENDIF} - end; -{$IFDEF DELPHI12} - FSavedEditValue := Null; -{$ENDIF} - SendMessage(Handle, EM_SETEVENTMASK, 0, ENM_CHANGE or ENM_SELCHANGE or ENM_IMECHANGE or - ENM_REQUESTRESIZE or ENM_PROTECTED or ENM_KEYEVENTS or ENM_LINK or ENM_LANGCHANGE or - ENM_OBJECTPOSITIONS); - if MaxLength = 0 then - SendMessage(Handle, EM_EXLIMITTEXT, 0, MaxLongint); - InternalSetMemoMode; -end; - -procedure TcxRichInnerEdit.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); -begin - if FLockBoundsCount = 0 then - inherited SetBounds(ALeft, ATop, AWidth, AHeight); -end; - -function TcxRichInnerEdit.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or (Container <> nil) and - Container.DataBinding.UpdateAction(Action); -end; - -function TcxRichInnerEdit.CanFocus: Boolean; -begin - if Container = nil then - Result := inherited CanFocus - else - Result := Container.CanFocus; -end; - -function TcxRichInnerEdit.CanRedo: Boolean; -begin - Result := False; - if HandleAllocated then - Result := SendMessage(Handle, EM_CANREDO, 0, 0) <> 0; -end; - -procedure TcxRichInnerEdit.Redo; -begin - if HandleAllocated then - SendMessage(Handle, EM_REDO, 0, 0); -end; - -procedure TcxRichInnerEdit.Undo; -begin - if HandleAllocated then - SendMessage(Handle, EM_UNDO, 0, 0); -end; - -procedure TcxRichInnerEdit.DblClick; -begin - inherited DblClick; - _TcxContainerAccess.DblClick(Container); -end; - -procedure TcxRichInnerEdit.DestroyWnd; -begin - FSavedPlainText := PlainText; -{$IFDEF DELPHI12} - if Container <> nil then - FSavedEditValue := Container.EditValue; -{$ENDIF} - CloseOleObjects; - FRichEditOle := nil; - inherited DestroyWnd; -end; - -procedure TcxRichInnerEdit.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -begin - _TcxContainerAccess.DragOver(Container, Source, Left + X, Top + Y, State, Accept); -end; - -function TcxRichInnerEdit.GetSelText: string; -var - ALen: Integer; -begin - SetLength(Result, GetSelLength + 1); - ALen := SendMessage(Handle, EM_GETSELTEXT, 0, Longint(PChar(Result))); - SetLength(Result, ALen); -end; - -procedure TcxRichInnerEdit.KeyDown(var Key: Word; Shift: TShiftState); -begin - FInternalUpdating := False; - _TcxContainerAccess.KeyDown(Container, Key, Shift); - if Key = 0 then - FInternalUpdating := True - else - inherited KeyDown(Key, Shift); - if (Key = VK_RETURN) and Assigned(dxISpellChecker) then - Invalidate; - if (RichVersion >= 200) and (Key = VK_RETURN) and not WantReturns and - not(ssCtrl in InternalGetShiftState) then - begin - Key := 0; - Exit; - end; -end; - -procedure TcxRichInnerEdit.KeyPress(var Key: Char); -begin - FInternalUpdating := False; -// Ctrl+I calls KeyPress with Key = Char(VK_TAB). A tab must be inserted even when WantTabs = False -// if not WantTabs and (Key = Char(VK_TAB)) then -// Key := #0; - _TcxContainerAccess.KeyPress(Container, Key); - if Key = #0 then - FInternalUpdating := True - else - inherited KeyPress(Key); -end; - -procedure TcxRichInnerEdit.KeyUp(var Key: Word; Shift: TShiftState); -begin - FInternalUpdating := False; - if not WantTabs and ((Key = VK_TAB)) then - Key := 0; - _TcxContainerAccess.KeyUp(Container, Key, Shift); - if Key = 0 then - FInternalUpdating := True - else - inherited KeyUp(Key, Shift); -end; - -procedure TcxRichInnerEdit.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - _TcxContainerAccess.MouseDown(Container, Button, Shift, X + Left, Y + Top); -end; - -procedure TcxRichInnerEdit.MouseLeave(AControl: TControl); -begin - Container.ShortRefreshContainer(True); -end; - -procedure TcxRichInnerEdit.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - _TcxContainerAccess.MouseMove(Container, Shift, X + Left, Y + Top); -end; - -procedure TcxRichInnerEdit.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - _TcxContainerAccess.MouseUp(Container, Button, Shift, X + Left, Y + Top); -end; - -procedure TcxRichInnerEdit.RequestAlign; -begin -end; - -procedure TcxRichInnerEdit.RequestSize(const Rect: TRect); -var - R: TRect; -begin - if Container <> nil then - begin - R := Rect; - Dec(R.Left, Left); - Dec(R.Top, Top); - Inc(R.Right, Container.Width - Width - Left); - Inc(R.Bottom, Container.Height - Height - Top); - OffsetRect(R, Container.Left, Container.Top); - Container.DoOnResizeRequest(R); - end; -end; - -procedure TcxRichInnerEdit.RichCreateParams(var Params: TCreateParams; - out ARichVersion: Integer); -var - ARichClassName: string; - AWndClass: TWndClass; - I: Integer; - ARichClass: TcxRichEditClass; -begin - if FRichEditLibrary = 0 then - for I := High(cxRichEditDLLNames) downto Low(cxRichEditDLLNames) do - begin - FRichEditLibrary := LoadLibrary(PChar(cxRichEditDLLNames[I])); - if FRichEditLibrary <> 0 then - Break; - end; - if FRichEditLibrary = 0 then - raise EcxEditError.Create(cxGetResourceString(@cxSEditRichEditLibraryError)); - - for ARichClass := RichEditClass downto cxMinVersionRichEditClass do - begin - ARichClassName := cxRichEditClassNames[ARichClass]; - if GetClassInfo(HInstance, PChar(ARichClassName), AWndClass) then - Break; - end; - - if GetClassInfo(HInstance, PChar(ARichClassName), AWndClass) then - ARichVersion := cxRichEditVersions[ARichClass] - else - raise EcxEditError.Create(cxGetResourceString(@cxSEditRichEditLibraryError)); - CreateSubClass(Params, PChar(ARichClassName)); -end; - -procedure TcxRichInnerEdit.SelectionChange; -begin - inherited SelectionChange; - if Container <> nil then - Container.DoOnSelectionChange; -end; - -procedure TcxRichInnerEdit.URLClick(const AURLText: string; AButton: TMouseButton); -begin - if Assigned(Container.ActiveProperties.OnURLClick) then - Container.ActiveProperties.OnURLClick(Container, AURLText, AButton); -end; - -procedure TcxRichInnerEdit.URLMove(const AURLText: string); -begin - if Assigned(Container.ActiveProperties.OnURLMove) then - Container.ActiveProperties.OnURLMove(Container, AURLText); -end; - -procedure TcxRichInnerEdit.WndProc(var Message: TMessage); -begin - if (Container <> nil) then - if Container.InnerControlMenuHandler(Message) then - Exit; - if ((Message.Msg = WM_LBUTTONDOWN) or (Message.Msg = WM_LBUTTONDBLCLK)) and - (Container.DragMode = dmAutomatic) and not Container.IsDesigning then - begin - _TcxContainerAccess.BeginAutoDrag(Container); - Exit; - end; - inherited WndProc(Message); -end; - -function TcxRichInnerEdit.CanPaste: Boolean; -begin - Result := HandleAllocated and - (SendMessage(Handle, EM_CANPASTE, 0, 0) <> 0); -end; - -function TcxRichInnerEdit.GetSelection: TCharRange; -begin - cxSendStructMessage(Handle, EM_EXGETSEL, 0, Result); -end; - -function TcxRichInnerEdit.AllowDrawEdgesAndBorders: Boolean; -begin - Result := False; -end; - -function TcxRichInnerEdit.GetAutoURLDetect: Boolean; -begin - Result := FAutoURLDetect; - if HandleAllocated and not (csDesigning in ComponentState) then - Result := Boolean(SendMessage(Handle, EM_GETAUTOURLDETECT, 0, 0)); -end; - -procedure TcxRichInnerEdit.CloseOleObjects; -var - I: Integer; - AReObject: TReObject; -begin - if Assigned(FRichEditOle) then - begin - FillChar(AReObject, SizeOf(AReObject), 0); - AReObject.cbStruct := SizeOf(AReObject); - with IcxRichEditOle(FRichEditOle) do - begin - for I := GetObjectCount - 1 downto 0 do - if Succeeded(GetObject(I, AReObject, REO_GETOBJ_POLEOBJ)) then - begin - if AReObject.dwFlags and REO_INPLACEACTIVE <> 0 then - InPlaceDeactivate; - AReObject.oleobj.Close(OLECLOSE_NOSAVE); - end; - end; - end; -end; - -//IcxContainerInnerControl -function TcxRichInnerEdit.GetControl: TWinControl; -begin - Result := Self; -end; - -function TcxRichInnerEdit.GetControlContainer: TcxContainer; -begin - Result := Container; -end; - -// IcxInnerEditHelper -function TcxRichInnerEdit.GetHelper: IcxCustomInnerEdit; -begin - Result := Helper; -end; - -function TcxRichInnerEdit.GetContainer: TcxCustomRichEdit; -begin - if Parent is TcxCustomRichEdit then - Result := TcxCustomRichEdit(Parent) - else - Result := nil; -end; - -function TcxRichInnerEdit.GetLineCount: Integer; -begin - Result := SendMessage(Handle, EM_GETLINECOUNT, 0, 0); -end; - -function TcxRichInnerEdit.GetLineIndex(AIndex: Integer): Integer; -begin - Result := SendMessage(Handle, EM_LINEINDEX , AIndex, 0); -end; - -function TcxRichInnerEdit.GetLineLength(AIndex: Integer): Integer; -begin - if GetLineIndex(AIndex) <> -1 then - Result := SendMessage(Handle, EM_LINELENGTH, GetLineIndex(AIndex), 0) - else - Result := 0; -end; - -function TcxRichInnerEdit.GetRichLines: TcxRichEditStrings; -begin - Result := FRichLines; -end; - -function TcxRichInnerEdit.GetRichEditOle: IcxRichEditOle; -begin - if FRichEditOle <> nil then - Result := FRichEditOle as IcxRichEditOle - else - Result := nil; -end; - -function TcxRichInnerEdit.GetRichEditOleCallBack: TcxRichEditOleCallback; -begin - if Assigned(FRichEditOleCallback) then - Result := FRichEditOleCallback as TcxRichEditOleCallback - else - Result := nil; -end; - -function TcxRichInnerEdit.GetTextRange(AStartPos, AEndPos: Longint): string; -var - ATextRange: TcxTextRange; -begin - SetLength(Result, AEndPos - AStartPos + 1); - ATextRange.chrg.cpMin := AStartPos; - ATextRange.chrg.cpMax := AEndPos; - ATextRange.lpstrText := PChar(Result); - SetLength(Result, SendMessage(Handle, EM_GETTEXTRANGE, 0, Longint(@ATextRange))); -end; - -procedure TcxRichInnerEdit.InternalSetMemoMode(AForcedReload: Boolean); -var - AText: string; - ATextMode: LRESULT; -begin - if not HandleAllocated then - Exit; - ATextMode := SendMessage(Handle, EM_GETTEXTMODE, 0, 0); - if MemoMode and (ATextMode and TM_PLAINTEXT <> 0) or - not MemoMode and (ATextMode and TM_RICHTEXT <> 0) and - not AForcedReload then - Exit; - AText := Text; - SendMessage(Handle, WM_SETTEXT, 0, 0); - if MemoMode then - ATextMode := ATextMode and not TM_RICHTEXT or TM_PLAINTEXT - else - ATextMode := ATextMode and not TM_PLAINTEXT or TM_RICHTEXT; - SendMessage(Handle, EM_SETTEXTMODE, ATextMode, 0); - Text := AText; -end; - -procedure TcxRichInnerEdit.SetAllowObjects(Value: Boolean); -begin - if FAllowObjects <> Value then - begin - FAllowObjects := Value; - if not FAllowObjects then - begin - CloseOleObjects; - FRichEditOle := nil; - end; - RecreateWnd; - end; -end; - -procedure TcxRichInnerEdit.SetAutoURLDetect(Value: Boolean); -begin - if Value <> FAutoURLDetect then - begin - FAutoURLDetect := Value; - RecreateWnd; - end; -end; - -procedure TcxRichInnerEdit.SetMemoMode(Value: Boolean); -begin - if Value <> FMemoMode then - begin - FMemoMode := Value; - RecreateWnd; - end; -end; - -procedure TcxRichInnerEdit.SetRichEditClass(AValue: TcxRichEditClass); -begin - if AValue <> FRichEditClass then - begin - FRichEditClass := AValue; - RecreateWnd; - end; -end; - -procedure TcxRichInnerEdit.SetRichLines(Value: TcxRichEditStrings); -begin - FRichLines.Assign(Value); -end; - -procedure TcxRichInnerEdit.SetSelectionBar(Value: Boolean); -begin - if Value <> FSelectionBar then - begin - FSelectionBar := Value; - RecreateWnd; - end; -end; - -procedure TcxRichInnerEdit.SetOleControlActive(AActive: Boolean); -var - AForm: TCustomForm; -begin - try - AForm := GetParentForm(Self); - if AForm <> nil then - if AActive and Container.CanModify and Container.DoEditing then - begin - if (AForm.ActiveOleControl <> nil) and (AForm.ActiveOleControl <> Self) then - AForm.ActiveOleControl.Perform(CM_UIDEACTIVATE, 0, 0); - AForm.ActiveOleControl := Self; - if AllowObjects and CanFocus then SetFocus; - end - else - begin - if AForm.ActiveOleControl = Self then - AForm.ActiveOleControl := nil; - if (AForm.ActiveControl = Self) and AllowObjects then - begin - Windows.SetFocus(Handle); - SelectionChange; - end; - end; - except - Application.HandleException(Self); - end; -end; - -procedure TcxRichInnerEdit.WMClear(var Message: TMessage); -begin - if (Self.SelLength > 0) and Container.DoEditing then - inherited; -end; - -procedure TcxRichInnerEdit.WMCut(var Message: TMessage); -begin - if SelLength > 0 then - if Container.DoEditing then - inherited - else - Container.CopyToClipboard; -end; - -procedure TcxRichInnerEdit.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - if FIsEraseBackgroundLocked or (Container <> nil) and Container.IsInplace then - Message.Result := 1 - else - CallWindowProc(DefWndProc, Handle, Message.Msg, Message.DC, 0); -end; - -procedure TcxRichInnerEdit.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - inherited; - if Container.TabsNeeded and (GetKeyState(VK_CONTROL) >= 0) then - Message.Result := Message.Result or DLGC_WANTTAB; - if FEscapePressed then - Message.Result := Message.Result and not DLGC_WANTALLKEYS; -end; - -procedure TcxRichInnerEdit.WMKeyDown(var Message: TWMKeyDown); -var - AKey: Word; - APrevState: TcxCustomInnerTextEditPrevState; - AShiftState: TShiftState; -begin - if Message.CharCode <> VK_ESCAPE then - FKeyPressProcessed := True; - try - SaveTextEditState(Helper, False, APrevState); - FInternalUpdating := False; - inherited; - Container.SetScrollBarsParameters; - if FInternalUpdating then - Exit; - finally - FKeyPressProcessed := False; - end; - AShiftState := KeyDataToShiftState(Message.KeyData); - AKey := Message.CharCode; - if (AKey <> 0) and not Container.CanKeyDownModifyEdit(AKey, AShiftState) and - not CheckTextEditState(Helper, APrevState) and - not Container.IsNavigationKey(AKey, AShiftState) then - Container.DoAfterKeyDown(AKey, AShiftState); - Message.CharCode := AKey; -end; - -procedure TcxRichInnerEdit.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - if not(csDestroying in ComponentState) then - Container.FocusChanged; -end; - -procedure TcxRichInnerEdit.WMMButtonDown(var Message: TWMMButtonDown); -begin - Message.Result := 1; - SendMessage(Container.Handle, WM_MBUTTONDOWN, 0, - MakeLParam(Message.XPos + Left, Message.YPos + Top)); -end; - -procedure TcxRichInnerEdit.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - inherited; - if (Container <> nil) and not Container.ScrollBarsCalculating then - Container.SetScrollBarsParameters; -end; - -procedure TcxRichInnerEdit.WMNCPaint(var Message: TWMNCPaint); -begin - inherited; - if (Container <> nil) and UsecxScrollBars and Container.NeedsScrollBars and - Container.HScrollBar.Visible and Container.VScrollBar.Visible then - cxFillSizeGrip(Container); -end; - -procedure TcxRichInnerEdit.WMPaint(var Message: TWMPaint); -begin - if RichVersion >= 200 then - FIsEraseBackgroundLocked := True; - try - inherited; - finally - FIsEraseBackgroundLocked := False; - end; -end; - -procedure TcxRichInnerEdit.WMPaste(var Message: TMessage); -begin - if (Clipboard.FormatCount > 0) and Container.DoEditing then - inherited; -end; - -procedure TcxRichInnerEdit.WMSetFocus(var Message: TWMSetFocus); -begin - inherited; - if not(csDestroying in ComponentState) and (Message.FocusedWnd <> Container.Handle) then - Container.FocusChanged; - if AutoSelect and HandleAllocated then - PostMessage(Handle, EM_SETSEL, 0, -1); -end; - -procedure TcxRichInnerEdit.WMSetFont(var Message: TWMSetFont); -begin - if HandleAllocated and MemoMode then - begin - with TMessage(Message) do - Result := CallWindowProc(DefWndProc, Handle, Msg, WParam, LParam); - DefAttributes.Color := Font.Color; - end - else - inherited; -end; - -procedure TcxRichInnerEdit.WMTimer(var Message: TWMTimer); -begin - inherited; - if Container <> nil then - Container.RefreshScrollBars; -end; - -procedure TcxRichInnerEdit.WMHScroll(var Message: TWMHScroll); -begin - inherited; - if not Focused then - Container.SetScrollBarsParameters; -end; - -procedure TcxRichInnerEdit.WMVScroll(var Message: TWMVScroll); -begin - inherited; - if not Focused then - Container.SetScrollBarsParameters; -end; - -procedure TcxRichInnerEdit.WMWindowPosChanged(var Message: TWMWindowPosChanged); -begin - if Container <> nil then - Container.SetScrollBarsParameters; - inherited; -end; - -procedure TcxRichInnerEdit.WMWindowPosChanging(var Message: TWMWindowPosChanging); -var - ARgn: HRGN; -begin - inherited; - if (Container <> nil) and not(csDestroying in ComponentState) and - Container.NeedsScrollBars and Container.HScrollBar.Visible and Container.VScrollBar.Visible then - begin - ARgn := CreateRectRgnIndirect(GetSizeGripRect(Self)); - SendMessage(Handle, WM_NCPAINT, ARgn, 0); - Windows.DeleteObject(ARgn); - end; -end; - -procedure TcxRichInnerEdit.EMReplaceSel(var Message: TMessage); -begin - if RichLines.IsModification or not ((Container <> nil) and Container.Focused and not Container.DoEditing) then - inherited; -end; - -procedure TcxRichInnerEdit.EMSetCharFormat(var Message: TMessage); -begin - if Focused and (Message.WParam = SCF_SELECTION) and (SelLength > 0) then - Container.DoEditing; - inherited; -end; - -procedure TcxRichInnerEdit.EMSetParaFormat(var Message: TMessage); -begin - if (Container <> nil) and not Container.IsDestroying and - (Container.ComponentState * [csLoading, csReading] = []) and Focused then - Container.DoEditing; - inherited; -end; - -procedure TcxRichInnerEdit.CMColorChanged(var Message: TMessage); -begin - if (Container <> nil) and not Container.IsInplace then - inherited; -end; - -procedure TcxRichInnerEdit.CMFontChanged(var Message: TMessage); -begin - if HandleAllocated and MemoMode then - Perform(WM_SETFONT, Font.Handle, 0) - else - if (Container <> nil) and not Container.IsInplace then - SetRichDefAttributes(Self, Font, Container.VisibleFont.Color); -end; - -procedure TcxRichInnerEdit.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxRichInnerEdit.CNNotify(var Message: TWMNotify); - - procedure SetOutRange(var ARange: TCharRange); - begin - ARange.cpMin := -1; - ARange.cpMax := -1; - end; - -begin - if not (csDesigning in ComponentState) then - with Message do - case NMHdr^.code of - EN_REQUESTRESIZE: - begin - if NMHdr^.idFrom = 0 then - Exit; - end; - EN_LINK: - with PcxENLink(NMHdr)^ do - begin - case Msg of - WM_RBUTTONDOWN: - begin - FURLClickRange := chrg; - FURLClickBtn := mbRight; - end; - WM_RBUTTONUP: - begin - if (FURLClickBtn = mbRight) and (FURLClickRange.cpMin = chrg.cpMin) and - (FURLClickRange.cpMax = chrg.cpMax) then - URLClick(GetTextRange(chrg.cpMin, chrg.cpMax), mbRight); - SetOutRange(FURLClickRange); - end; - WM_LBUTTONDOWN: - begin - FURLClickRange := chrg; - FURLClickBtn := mbLeft; - end; - WM_LBUTTONUP: - begin - if (FURLClickBtn = mbLeft) and (FURLClickRange.cpMin = chrg.cpMin) and - (FURLClickRange.cpMax = chrg.cpMax) then - URLClick(GetTextRange(chrg.cpMin, chrg.cpMax), mbLeft); - SetOutRange(FURLClickRange); - end; - WM_MOUSEMOVE: - URLMove(GetTextRange(chrg.cpMin, chrg.cpMax)); - end; - end; - end; - inherited; -end; - -procedure TcxRichInnerEdit.CMDocWindowActivate(var Message: TMessage); -begin - if Assigned(FRichEditOleCallback) then - with TcxRichEditOleCallback(FRichEditOleCallback) do - if Assigned(DocParentForm) and - cxIsFormMDIChild(DocParentForm.Form) then - begin - if Message.WParam = 0 then - begin - ParentFrame.SetMenu(0, 0, 0); - ParentFrame.ClearBorderSpace; - end; - end; -end; - -procedure TcxRichInnerEdit.WMChar(var Message: TWMChar); -begin - if Message.CharCode <> VK_ESCAPE then - FKeyPressProcessed := True; - try - inherited; - finally - FKeyPressProcessed := False; - end; -end; - -procedure TcxRichInnerEdit.CNCommand(var Message: TWMCommand); -begin - if Message.NotifyCode <> EN_CHANGE then - begin - inherited; - Exit; - end; - - if (Container <> nil) and not Container.IsDestroying and - (Container.ComponentState * [csLoading, csReading] = []) and - Focused and FKeyPressProcessed then - Container.DoEditing; - inherited; -end; - -procedure TcxRichInnerEdit.CNKeyDown(var Message: TWMKeyDown); -begin - if Message.CharCode = VK_ESCAPE then - FEscapePressed := True; - try - inherited; - finally - FEscapePressed := False; - end; -end; - -const - UseCRLFFlag: array[Boolean] of DWORD = (0, 1); - -procedure TcxRichInnerEdit.WMGetText(var Message: TMessage); -var - ATextInfo: TGetTextEx; -begin - if (RichVersion >= 200) and HandleAllocated then - begin - ZeroMemory(@ATextInfo, SizeOf(ATextInfo)); - ATextInfo.flags := UseCRLFFlag[FUseCRLF]; - if IsWindowUnicode(Handle) then - begin - ATextInfo.codepage := 1200; - ATextInfo.cb := Message.WParam * SizeOf(WideChar); - end - else - ATextInfo.cb := Message.WParam; - Message.Result := cxSendStructMessage(Handle, EM_GETTEXTEX, ATextInfo, Message.LParam); - end - else - inherited; -end; - -procedure TcxRichInnerEdit.WMGetTextLength(var Message: TWMGetTextLength); -var - ATextInfo: TGetTextLengthEx; -begin - if (RichVersion >= 200) and HandleAllocated then - begin - ZeroMemory(@ATextInfo, SizeOf(ATextInfo)); - ATextInfo.flags := GTL_PRECISE or GTL_NUMCHARS or UseCRLFFlag[FUseCRLF]; - if IsWindowUnicode(Handle) then - ATextInfo.codepage := 1200; - Message.Result := cxSendStructMessage(Handle, EM_GETTEXTLENGTHEX, ATextInfo, 0); - end - else - inherited; -end; - -procedure TcxRichInnerEdit.WMSetText(var Message: TWMSetText); -begin - if MemoMode and IsRichText(Message.Text) then - Message.Text := PChar(ConvertRichText(Message.Text)); - inherited; -end; - -procedure TcxRichInnerEdit.WMIMEComposition(var Message: TMessage); -begin - if Container.DoEditing then - inherited; -end; - -procedure TcxRichInnerEdit.EMExLineFromChar(var Message: TMessage); -begin - inherited; - if MemoMode then - begin - if GetLineIndex(Message.Result + 1) = Message.LParam then - Message.Result := Message.Result + 1; - end; -end; - -procedure TcxRichInnerEdit.EMLineLength(var Message: TMessage); -var - ALineIndex: Integer; -begin - inherited; - if MemoMode then - begin - ALineIndex := SendMessage(Handle, EM_EXLINEFROMCHAR, 0, Message.WParam); - if (ALineIndex = GetLineCount - 1) and (Lines[ALineIndex] = '') then - Message.Result := 0; - end; -end; - -{ TcxOleUILinkInfo } - -constructor TcxOleUILinkInfo.Create(AOwner: TcxRichInnerEdit; AReObject: TReObject); -begin - inherited Create; - FRichEdit := AOwner; - FReObject := AReObject; - FReObject.oleobj.QueryInterface(IOleLink, FOleLink); -end; - -destructor TcxOleUILinkInfo.Destroy; -begin - ReleaseObject(FOleLink); - inherited Destroy; -end; - -//IOleUILinkInfo -function TcxOleUILinkInfo.GetLastUpdate(dwLink: Longint; - var LastUpdate: TFileTime): HResult; -begin - Result := S_OK; -end; - -//IOleUILinkContainer -function TcxOleUILinkInfo.GetNextLink(dwLink: Longint): Longint; -begin - if dwLink = 0 then - Result := Longint(FRichEdit) - else - Result := 0; -end; - -function TcxOleUILinkInfo.SetLinkUpdateOptions(dwLink: Longint; - dwUpdateOpt: Longint): HResult; -begin - Result := FOleLink.SetUpdateOptions(dwUpdateOpt); - if Succeeded(Result) then - FRichEdit.Modified := True; -end; - -function TcxOleUILinkInfo.GetLinkUpdateOptions(dwLink: Longint; - var dwUpdateOpt: Longint): HResult; -begin - Result := FOleLink.GetUpdateOptions(dwUpdateOpt); -end; - -function TcxOleUILinkInfo.SetLinkSource(dwLink: Longint; pszDisplayName: PChar; - lenFileName: Longint; var chEaten: Longint; - fValidateSource: BOOL): HResult; -var - ADisplayName: string; - ABuffer: array[0..255] of WideChar; -begin - Result := E_FAIL; - if fValidateSource then - begin - ADisplayName := pszDisplayName; - if Succeeded(FOleLink.SetSourceDisplayName(StringToWideChar(ADisplayName, - ABuffer, SizeOf(ABuffer) div 2))) then - begin - chEaten := Length(ADisplayName); - OleCheck(FReObject.oleobj.Update); - Result := S_OK; - end; - end - else - raise EOutOfResources.Create(cxGetResourceString(@cxSEditRichEditLinkFail)); -end; - -function TcxOleUILinkInfo.GetLinkSource(dwLink: Longint; var pszDisplayName: PChar; - var lenFileName: Longint; var pszFullLinkType: PChar; - var pszShortLinkType: PChar; var fSourceAvailable: BOOL; - var fIsSelected: BOOL): HResult; -var - AMoniker: IMoniker; -begin - if @pszDisplayName <> nil then - pszDisplayName := cxGetOleLinkDisplayName(FOleLink); - if @lenFileName <> nil then - begin - lenFileName := 0; - FOleLink.GetSourceMoniker(AMoniker); - if AMoniker <> nil then - begin - lenFileName := cxOleStdGetLenFilePrefixOfMoniker(AMoniker); - if Assigned(AMoniker) then - AMoniker._Release; - end; - end; - if @pszFullLinkType <> nil then - pszFullLinkType := cxGetOleObjectFullName(FReObject.oleobj); - if @pszShortLinkType <> nil then - pszShortLinkType := cxGetOleObjectShortName(FReObject.oleobj); - Result := S_OK; -end; - -function TcxOleUILinkInfo.OpenLinkSource(dwLink: Longint): HResult; -begin - OleCheck(FReObject.oleobj.DoVerb(OLEIVERB_SHOW, nil, FReObject.olesite, - 0, FRichEdit.Handle, FRichEdit.ClientRect)); - Result := S_OK; -end; - -function TcxOleUILinkInfo.UpdateLink(dwLink: Longint; fErrorMessage: BOOL; - fErrorAction: BOOL): HResult; -begin - OleCheck(FReObject.oleobj.Update); - Result := S_OK; -end; - -function TcxOleUILinkInfo.CancelLink(dwLink: Longint): HResult; -begin - Result := E_NOTIMPL; -end; - -{ TcxOleUIObjInfo } - -constructor TcxOleUIObjInfo.Create(AOwner: TcxRichInnerEdit; AReObject: TReObject); -begin - inherited Create; - FRichEdit := AOwner; - FReObject := AReObject; -end; - -function TcxOleUIObjInfo.GetObjectDataSize: Integer; -begin - Result := -1; -end; - -//IOleUIObjInfo -function TcxOleUIObjInfo.GetObjectInfo(dwObject: Longint; - var dwObjSize: Longint; var lpszLabel: PChar; - var lpszType: PChar; var lpszShortType: PChar; - var lpszLocation: PChar): HResult; -begin - if @dwObjSize <> nil then - dwObjSize := GetObjectDataSize; - if @lpszLabel <> nil then - lpszLabel := cxGetOleObjectFullName(FReObject.oleobj); - if @lpszType <> nil then - lpszType := cxGetOleObjectFullName(FReObject.oleobj); - if @lpszShortType <> nil then - lpszShortType := cxGetOleObjectShortName(FReObject.oleobj); - if @lpszLocation <> nil then - {$IFDEF DELPHI12} - lpszLocation := PChar(Application.Title); - {$ELSE} - lpszLocation := cxCoAllocCStr(Application.Title); - {$ENDIF} - Result := S_OK; -end; - -function TcxOleUIObjInfo.GetConvertInfo(dwObject: Longint; var ClassID: TCLSID; - var wFormat: Word; var ConvertDefaultClassID: TCLSID; - var lpClsidExclude: PCLSID; var cClsidExclude: Longint): HResult; -begin - FReObject.oleobj.GetUserClassID(ClassID); - Result := S_OK; -end; - -function TcxOleUIObjInfo.ConvertObject(dwObject: Longint; const clsidNew: TCLSID): HResult; -begin - Result := E_NOTIMPL; -end; - -function TcxOleUIObjInfo.GetViewInfo(dwObject: Longint; var hMetaPict: HGlobal; - var dvAspect: Longint; var nCurrentScale: Integer): HResult; -begin - if @hMetaPict <> nil then - hMetaPict := cxGetIconMetaPict(FReObject.oleobj, FReObject.dvaspect); - if @dvAspect <> nil then - dvAspect := FReObject.dvaspect; - if @nCurrentScale <> nil then - nCurrentScale := 100; - Result := S_OK; -end; - -function TcxOleUIObjInfo.SetViewInfo(dwObject: Longint; hMetaPict: HGlobal; - dvAspect: Longint; nCurrentScale: Integer; - bRelativeToOrig: BOOL): HResult; -var - AShowAsIcon: Boolean; -begin - if not Assigned(FRichEdit.FRichEditOle) then - begin - Result := E_NOTIMPL; - Exit; - end; - case dvAspect of - DVASPECT_CONTENT: AShowAsIcon := False; - DVASPECT_ICON: AShowAsIcon := True; - else - AShowAsIcon := FReObject.dvaspect = DVASPECT_ICON; - end; - FRichEdit.RichEditOle.InPlaceDeactivate; - Result := cxSetDrawAspect(FReObject.oleobj, AShowAsIcon, hMetaPict, - FReObject.dvaspect); - if Succeeded(Result) then - FRichEdit.RichEditOle.SetDvaspect(Longint(REO_IOB_SELECTION), - FReObject.dvaspect); -end; - -{ TcxRichEdit } - -destructor TcxCustomRichEdit.Destroy; -begin - FreeAndNil(FEditPopupMenu); - inherited Destroy; -end; - -function TcxCustomRichEdit.GetInnerEditClass: TControlClass; -begin - Result := TcxRichInnerEdit; -end; - -procedure TcxCustomRichEdit.DoProtectChange(Sender: TObject; - AStartPos, AEndPos: Integer; var AAllowChange: Boolean); -begin - with Properties do - if Assigned(OnProtectChange) then - OnProtectChange(Self, AStartPos, AEndPos, AAllowChange); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnProtectChange) then - OnProtectChange(Self, AStartPos, AEndPos, AAllowChange); -end; - -procedure TcxCustomRichEdit.DoSaveClipboard(Sender: TObject; - ANumObjects, ANumChars: Integer; var ASaveClipboard: Boolean); -begin - if IsDestroying then - Exit; - with Properties do - if Assigned(OnSaveClipboard) then - OnSaveClipboard(Self, ANumObjects, ANumChars, ASaveClipboard); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnSaveClipboard) then - OnSaveClipboard(Self, ANumObjects, ANumChars, ASaveClipboard); -end; - -procedure TcxCustomRichEdit.EditPopupMenuClick(Sender: TObject); -begin - case Integer(TMenuItem(Sender).Tag) of - -1: Undo; - -2: InnerRich.Redo; - -3: CutToClipboard; - -4: CopyToClipboard; - -5: PasteFromClipboard; - -6: ClearSelection; - -7: InnerRich.SelectAll; - end; -end; - -function TcxCustomRichEdit.GetLines: TStrings; -begin - Result := InnerRich.RichLines; -end; - -function TcxCustomRichEdit.GetInnerRich: TcxRichInnerEdit; -begin - Result := TcxRichInnerEdit(InnerControl); -end; - -procedure TcxCustomRichEdit.SetLines(Value: TStrings); -begin - InnerRich.RichLines.Assign(Value); -end; - -procedure TcxCustomRichEdit.ChangeHandler(Sender: TObject); -begin - FIsNullEditValue := False; - inherited ChangeHandler(Sender); - DoEditValueChanged; -end; - -procedure TcxCustomRichEdit.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); - - function GetScrollBarHandle(AScrollBarKind: TScrollBarKind): HWND; - var - AScrollBar: TcxScrollBar; - begin - Result := 0; - if AScrollBarKind = sbHorizontal then - AScrollBar := HScrollBar - else - AScrollBar := VScrollBar; - if AScrollBar <> nil then - Result := AScrollBar.Handle; - end; - -const - ScrollBarIDs: array[TScrollBarKind] of Integer = (SB_HORZ, SB_VERT); - ScrollMessages: array[TScrollBarKind] of UINT = (WM_HSCROLL, WM_VSCROLL); -begin - with InnerRich do - begin - CallWindowProc(DefWndProc, Handle, ScrollMessages[AScrollBarKind], - Word(AScrollCode) + Word(AScrollPos) shl 16, GetScrollBarHandle(AScrollBarKind)); - if AScrollCode <> scTrack then - AScrollPos := GetScrollPos(Handle, ScrollBarIDs[AScrollBarKind]); - end; - DoLayoutChanged; - if AScrollCode <> scTrack then - SetScrollBarsParameters; -end; - -procedure TcxCustomRichEdit.AdjustInnerEdit; -begin - if ActiveProperties.MemoMode or ActiveProperties.PlainText then - inherited AdjustInnerEdit - else - InnerRich.Color := ViewInfo.BackgroundColor; -end; - -function TcxCustomRichEdit.CanFocusOnClick: Boolean; -begin - Result := inherited CanFocusOnClick and - not(csLButtonDown in InnerRich.ControlState); -end; - -function TcxCustomRichEdit.CanKeyDownModifyEdit(Key: Word; Shift: TShiftState): Boolean; -begin - Result := inherited CanKeyDownModifyEdit(Key, Shift) or - (((Key = VK_DELETE) or (Key = VK_INSERT)) and (ssShift in Shift)) or - (((Key = Ord('V')) or (Key = Ord('X')) and (ssCtrl in Shift))) and - (Clipboard.FormatCount > 0); - Result := Result or (Key = VK_BACK); // !!! -end; - -procedure TcxCustomRichEdit.ContainerStyleChanged(Sender: TObject); -begin - inherited ContainerStyleChanged(Sender); - if not IsInplace and DataBinding.IDefaultValuesProvider.IsDataStorage and - not ActiveProperties.MemoMode and not ModifiedAfterEnter then - Reset; -end; - -function TcxCustomRichEdit.DoShowPopupMenu(AMenu: TComponent; X, Y: Integer): Boolean; -begin - if Assigned(AMenu) then - Result := inherited DoShowPopupMenu(AMenu, X, Y) - else - begin - UpdateEditPopupMenuItems(GetEditPopupMenuInstance); - Result := inherited DoShowPopupMenu(GetEditPopupMenuInstance, X, Y); - EditingChanged; - end; -end; - -function TcxCustomRichEdit.GetEditValue: TcxEditValue; -begin - if FIsNullEditValue then - Result := Null - else - PrepareEditValue('', Result, False); -end; - -{ TcxCustomRichEditViewData } - -procedure TcxCustomRichEditViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - TcxCustomRichEditViewInfo(AViewInfo).IsDrawBitmapDirty := True; -end; - -function TcxCustomRichEditViewData.InternalGetEditContentSize( - ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; -var - ADC: HDC; - AHeight: Integer; -begin - if (AEditSizeProperties.Width = -1) or (Properties.VisibleLineCount > 0) then - Result := inherited InternalGetEditContentSize(ACanvas, AEditValue, - AEditSizeProperties) - else - begin - ADC := CreateCompatibleDC(ACanvas.Handle); - try - Result.cx := AEditSizeProperties.Width; - DrawRichEdit(ADC, Rect(0, 0, AEditSizeProperties.Width, 0), VarToStr(AEditValue), - Properties, Style.Font, clWhite, clBlack, True, AHeight); - if AHeight > 0 then - Inc(AHeight, GetEditContentSizeCorrection.cy); - Result.cy := AHeight; - finally - DeleteDC(ADC); - end; - end; -end; - -function TcxCustomRichEditViewData.GetProperties: TcxCustomRichEditProperties; -begin - Result := TcxCustomRichEditProperties(FProperties); -end; - -{ TcxRichEditOleCallback } - -constructor TcxRichEditOleCallback.Create(AOwner: TcxRichInnerEdit); -begin - inherited Create; - FEdit := AOwner; - FAccelCount := 0; -end; - -function TcxRichEditOleCallback.ContextSensitiveHelp(fEnterMode: BOOL): HRESULT; -begin - Result := E_NOTIMPL; -end; - -function TcxRichEditOleCallback.DeleteObject(oleobj: IOLEObject): HRESULT; -begin - if Assigned(oleobj) then - oleobj.Close(OLECLOSE_NOSAVE); - Result := S_OK; -end; - -function TcxRichEditOleCallback.GetClipboardData(const chrg: TCharRange; reco: DWORD; - out dataobj: IDataObject): HRESULT; -begin - Result := E_NOTIMPL; -end; - -function TcxRichEditOleCallback.GetContextMenu(seltype: Word; oleobj: IOleObject; - const chrg: TCharRange; var menu: HMENU): HRESULT; -var - P: TPoint; -begin - P := GetMouseCursorPos; - PostMessage(FEdit.Container.Handle, WM_CONTEXTMENU, FEdit.Handle, Integer(PointToSmallPoint(P))); - Result := S_OK; -end; - -function TcxRichEditOleCallback.GetDragDropEffect(fDrag: BOOL; grfKeyState: DWORD; - var dwEffect: DWORD): HRESULT; - var Effect: DWORD; -begin - Result:= S_OK; - if not fDrag then - begin - if ((grfKeyState and (MK_CONTROL or MK_SHIFT)) = (MK_CONTROL or MK_SHIFT)) then - Effect := DROPEFFECT_LINK - else if ((grfKeyState and MK_CONTROL) = MK_CONTROL) then - Effect := DROPEFFECT_COPY - else - Effect := DROPEFFECT_MOVE; - if (Effect and dwEffect <> 0) then - dwEffect := Effect; - end; -end; - -function TcxRichEditOleCallback.GetInPlaceContext(out Frame: IOleInPlaceFrame; - out Doc: IOleInPlaceUIWindow; - lpFrameInfo: POleInPlaceFrameInfo): HRESULT; -begin - AssignParentFrame; - if Assigned(FParentFrame) and FEdit.AllowObjects then - begin - Frame := FParentFrame; - Doc := FDocParentForm; - CreateAccelTable; - with lpFrameInfo^ do - begin - fMDIApp := False; - FParentFrame.GetWindow(hWndFrame); - hAccel := FAccelTable; - cAccelEntries := FAccelCount; - end; - Result := S_OK; - end - else - Result := E_NOTIMPL; -end; - -function TcxRichEditOleCallback.GetNewStorage(out stg: IStorage): HRESULT; -var - LockBytes: ILockBytes; -begin - Result:= S_OK; - try - OleCheck(CreateILockBytesOnHGlobal(0, True, LockBytes)); - OleCheck(StgCreateDocfileOnILockBytes(LockBytes, STGM_READWRITE - or STGM_SHARE_EXCLUSIVE or STGM_CREATE, 0, stg)); - except - Result:= E_OUTOFMEMORY; - end; -end; - -function TcxRichEditOleCallback.QueryAcceptData(dataobj: IDataObject; var cfFormat: TClipFormat; - reco: DWORD; fReally: BOOL; hMetaPict: HGLOBAL): HRESULT; -begin - Result := S_OK; -end; - -function TcxRichEditOleCallback.QueryInsertObject(const clsid: TCLSID; - stg: IStorage; cp: longint): HRESULT; -var - AAllowInsertObject: Boolean; -begin - Result := S_OK; - if cp <> -1 then - Exit; - AAllowInsertObject := True; - FEdit.BeforeInsertObject(AAllowInsertObject, clsid); - if not AAllowInsertObject then - Result := E_NOTIMPL; -end; - -function TcxRichEditOleCallback.ShowContainerUI(fShow: BOOL): HRESULT; -begin - if not fShow then AssignParentFrame; - if Assigned(FEdit) then - begin - if fShow then - begin - FParentFrame.ClearBorderSpace; - DestroyAccelTable; - FParentFrame := nil; - FDocParentForm := nil; - FEdit.SetOleControlActive(False); - end - else - FEdit.SetOleControlActive(True); - Result := S_OK; - end - else - Result := E_NOTIMPL; -end; - -procedure TcxRichEditOleCallback.AssignParentFrame; -begin - if (GetParentForm(FEdit) <> nil) and not Assigned(FParentFrame) and - FEdit.AllowObjects then - begin - FDocParentForm := cxGetVCLFrameForm(ValidParentForm(FEdit)); - FParentFrame := FDocParentForm; - if cxIsFormMDIChild(FDocParentForm.Form) then - FParentFrame := cxGetVCLFrameForm(Application.MainForm); - end; -end; - -procedure TcxRichEditOleCallback.CreateAccelTable; -var - AMenu: TMainMenu; -begin - if (FAccelTable = 0) and Assigned(FParentFrame) then - begin - AMenu := FParentFrame.Form.Menu; - if AMenu <> nil then - AMenu.GetOle2AcceleratorTable(FAccelTable, FAccelCount, [0, 2, 4]); - end; -end; - -procedure TcxRichEditOleCallback.DestroyAccelTable; -begin - if FAccelTable <> 0 then - begin - DestroyAcceleratorTable(FAccelTable); - FAccelTable := 0; - FAccelCount := 0; - end; -end; - -{ TcxCustomRichEditProperties } - -constructor TcxCustomRichEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FHideScrollBars := True; - FAutoURLDetect := False; - FAllowObjects := False; - FStreamModes := []; - FRichEditClass := recRichEdit20; -end; - -procedure TcxCustomRichEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomRichEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomRichEditProperties do - begin - Self.AllowObjects := AllowObjects; - Self.AutoURLDetect := AutoURLDetect; - Self.HideScrollBars := HideScrollBars; - Self.MemoMode := MemoMode; - Self.PlainText := PlainText; - Self.RichEditClass := RichEditClass; - Self.SelectionBar := SelectionBar; - Self.StreamModes := StreamModes; - Self.OnQueryInsertObject := OnQueryInsertObject; - Self.OnProtectChange := OnProtectChange; - Self.OnResizeRequest := OnResizeRequest; - Self.OnSaveClipboard := OnSaveClipboard; - Self.OnSelectionChange := OnSelectionChange; - Self.OnURLClick := OnURLClick; - Self.OnURLMove := OnURLMove; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomRichEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxRichEdit; -end; - -function TcxCustomRichEditProperties.GetDisplayText( - const AEditValue: TcxEditValue; AFullText: Boolean = False; - AIsInplace: Boolean = True): WideString; -begin - if (MemoMode or not PlainText) and IsRichText(VarToStr(AEditValue)) then - Result := inherited GetDisplayText(ConvertRichText(VarToStr(AEditValue)), AFullText) - else - Result := inherited GetDisplayText(AEditValue, AFullText); -end; - -function TcxCustomRichEditProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := [esoAutoHeight, esoEditing, esoHorzAlignment]; -end; - -function TcxCustomRichEditProperties.CanValidate: Boolean; -begin - Result := False; -end; - -class function TcxCustomRichEditProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomRichEditViewData; -end; - -class function TcxCustomRichEditProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomRichEditViewInfo; -end; - -function TcxCustomRichEditProperties.IsResetEditClass: Boolean; -begin - Result := False; -end; - -procedure TcxCustomRichEditProperties.SetAllowObjects( - const Value: Boolean); -begin - if FAllowObjects <> Value then - begin - FAllowObjects := Value; - Changed; - end; -end; - -procedure TcxCustomRichEditProperties.SetAutoURLDetect( - const Value: Boolean); -begin - if Value <> FAutoURLDetect then - begin - FAutoURLDetect := Value; - Changed; - end; -end; - -procedure TcxCustomRichEditProperties.SetHideScrollBars(Value: Boolean); -begin - if Value <> FHideScrollBars then - begin - FHideScrollBars := Value; - Changed; - end; -end; - -procedure TcxCustomRichEditProperties.SetMemoMode(Value: Boolean); -begin - if Value <> FMemoMode then - begin - FMemoMode := Value; - Changed; - end; -end; - -procedure TcxCustomRichEditProperties.SetPlainText(Value: Boolean); -begin - if FPlainText <> Value then - begin - FPlainText := Value; - FPlainTextChanged := True; - try - Changed; - finally - FPlainTextChanged := False; - end; - end; -end; - -procedure TcxCustomRichEditProperties.SetRichEditClass(AValue: TcxRichEditClass); -begin - if (AValue <> FRichEditClass) and (AValue >= cxMinVersionRichEditClass) then - begin - FRichEditClass := AValue; - Changed; - end; -end; - -procedure TcxCustomRichEditProperties.SetSelectionBar(Value: Boolean); -begin - if Value <> FSelectionBar then - begin - FSelectionBar := Value; - Changed; - end; -end; - -procedure TcxCustomRichEditProperties.SetStreamModes(const Value: TcxRichEditStreamModes); -begin - if Value <> FStreamModes then - begin - FStreamModes := Value; - Changed; - end; -end; - -procedure TcxCustomRichEditProperties.SetOnQueryInsertObject( - Value: TcxRichEditQueryInsertObjectEvent); -begin - FOnQueryInsertObject := Value; - Changed; -end; - -{ TcxCustomRichEditViewInfo } - -constructor TcxCustomRichEditViewInfo.Create; -begin - inherited Create; - PrevDrawBitmapSize.cx := -1; - PrevDrawBitmapSize.cy := -1; -end; - -destructor TcxCustomRichEditViewInfo.Destroy; -begin - if DrawBitmap <> 0 then - DeleteObject(DrawBitmap); - inherited Destroy; -end; - -procedure TcxCustomRichEditViewInfo.DrawNativeStyleEditBackground(ACanvas: TcxCanvas; ADrawBackground: Boolean; - ABackgroundStyle: TcxEditBackgroundPaintingStyle; ABackgroundBrush: TBrushHandle); -begin - if IsInplace or (BorderStyle = ebsNone) or not IsCompositionEnabled then - inherited DrawNativeStyleEditBackground(ACanvas, ADrawBackground, ABackgroundStyle, ABackgroundBrush) - else - DrawThemeBackground(OpenTheme(totEdit), ACanvas.Handle, EP_EDITTEXT, ETS_NORMAL, Bounds); -end; - -procedure TcxCustomRichEditViewInfo.DrawText(ACanvas: TcxCanvas); - - procedure PrepareDrawBitmap; - var - ADC: HDC; - APrevBitmap: HBITMAP; - ATempVar: Integer; - begin - if IsDrawBitmapDirty then - begin - if (DrawBitmap = 0) or (PrevDrawBitmapSize.cx <> TextRect.Right - TextRect.Left) or - (PrevDrawBitmapSize.cy <> TextRect.Bottom - TextRect.Top) then - begin - if DrawBitmap <> 0 then - DeleteObject(DrawBitmap); - DrawBitmap := CreateCompatibleBitmap(ACanvas.Handle, - TextRect.Right - TextRect.Left, TextRect.Bottom - TextRect.Top); - end; - ADC := CreateCompatibleDC(ACanvas.Handle); - APrevBitmap := 0; - try - APrevBitmap := SelectObject(ADC, DrawBitmap); - DrawRichEdit(ADC, TextRect, Text, TcxCustomRichEditProperties(EditProperties), - Font, BackgroundColor, TextColor, False, ATempVar); - finally - if APrevBitmap <> 0 then - SelectObject(ADC, APrevBitmap); - DeleteDC(ADC); - end; - IsDrawBitmapDirty := False; - end; - end; - -var - ADC: HDC; - APrevBitmap: HBITMAP; -begin - PrepareDrawBitmap; - ADC := CreateCompatibleDC(ACanvas.Handle); - APrevBitmap := 0; - try - APrevBitmap := SelectObject(ADC, DrawBitmap); - with TextRect do - BitBlt(ACanvas.Handle, Left, Top, Right - Left, Bottom - Top, ADC, 0, 0, SRCCOPY); - finally - if APrevBitmap <> 0 then - SelectObject(ADC, APrevBitmap); - DeleteDC(ADC); - end; -end; - -function TcxCustomRichEditViewInfo.GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; -begin - Result := TcxRegion.Create(Self.Bounds); -end; - -function TcxCustomRichEditViewInfo.NeedShowHint(ACanvas: TcxCanvas; - const P: TPoint; const AVisibleBounds: TRect; out AText: TCaption; - out AIsMultiLine: Boolean; out ATextRect: TRect): Boolean; -begin - Result := False; -end; - -procedure TcxCustomRichEditViewInfo.Paint(ACanvas: TcxCanvas); -begin - ACanvas.Canvas.Lock; - try - if IsInplace and not Focused or IsDBEditPaintCopyDrawing then - begin - DrawText(ACanvas); - ACanvas.ExcludeClipRect(TextRect); - end; - DrawCustomEdit(ACanvas, Self, True, bpsComboListEdit); - finally - ACanvas.Canvas.Unlock; - end; -end; - -function TcxCustomRichEdit.GetActiveProperties: TcxCustomRichEditProperties; -begin - Result := TcxCustomRichEditProperties(InternalGetActiveProperties); -end; - -function TcxCustomRichEdit.GetProperties: TcxCustomRichEditProperties; -begin - Result := TcxCustomRichEditProperties(FProperties); -end; - -function TcxCustomRichEdit.GetRichVersion: Integer; -begin - Result := InnerRich.RichVersion; -end; - -procedure TcxCustomRichEdit.SetProperties(Value: TcxCustomRichEditProperties); -begin - FProperties.Assign(Value); -end; - -function TcxCustomRichEdit.GetCanUndo: Boolean; -begin - Result := InnerRich.CanUndo; -end; - -procedure TcxCustomRichEdit.Initialize; -begin - inherited Initialize; - InnerRich.OnProtectChange := DoProtectChange; - InnerRich.OnSaveClipboard := DoSaveClipboard; - Width := 185; - Height := 89; - FIsNullEditValue := True; -end; - -procedure TcxCustomRichEdit.InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); -begin - LockChangeEvents(True); - try - if HandleAllocated then - SendMessage(InnerRich.Handle, WM_SETREDRAW, 0, 0); - try - if HandleAllocated then - SendMessage(InnerRich.Handle, WM_SETTEXT, 0, Integer(PChar(''))); - InnerEdit.EditValue := Value; - EditModified := False; - FIsNullEditValue := VarIsNull(Value); - finally - if Parent <> nil then - begin - if HandleAllocated then - SendMessage(InnerRich.Handle, WM_SETREDRAW, 1, 0); - InnerRich.Invalidate; - end; - end; - finally - LockChangeEvents(False); - end; -end; - -procedure TcxCustomRichEdit.InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); -begin -end; - -procedure TcxCustomRichEdit.DoTextChanged; -var - ALineCount: Integer; -begin - inherited DoTextChanged; - if InnerControl.HandleAllocated and Assigned(dxISpellChecker) then - begin - ALineCount := InnerRich.Lines.Count; - if FLastLineCount <> ALineCount then - begin - FLastLineCount := ALineCount; - Invalidate; - end; - end; -end; - -procedure TcxCustomRichEdit.PropertiesChanged(Sender: TObject); -begin - with InnerRich do - begin - HideScrollBars := ActiveProperties.HideScrollBars; - MemoMode := ActiveProperties.MemoMode; - PlainText := ActiveProperties.PlainText or MemoMode; - SelectionBar := ActiveProperties.SelectionBar; - AutoURLDetect := ActiveProperties.AutoURLDetect; - AllowObjects := ActiveProperties.AllowObjects; - RichEditClass := ActiveProperties.RichEditClass; - StreamModes := ActiveProperties.StreamModes; - OnQueryInsertObject := ActiveProperties.OnQueryInsertObject; - end; - if not(IsInplace or IsDBEdit) then - FPropertiesChange := True; - try - inherited PropertiesChanged(Sender); - finally - FPropertiesChange := False; - end; -end; - -procedure TcxCustomRichEdit.ResetEditValue; -begin - if not IsInplace and IsDBEdit then - Reset; -end; - -procedure TcxCustomRichEdit.SetParent(AParent: TWinControl); -begin - inherited SetParent(AParent); - RefreshScrollBars; -end; - -procedure TcxCustomRichEdit.SynchronizeDisplayValue; -begin -end; - -procedure TcxCustomRichEdit.SynchronizeEditValue; -begin -end; - -function TcxCustomRichEdit.GetDefAttributes: TTextAttributes; -begin - Result := InnerRich.DefAttributes; -end; - -function TcxCustomRichEdit.GetDefaultConverter: TConversionClass; -begin - Result := InnerRich.DefaultConverter; -end; - -function TcxCustomRichEdit.GetPageRect: TRect; -begin - Result := InnerRich.PageRect; -end; - -function TcxCustomRichEdit.GetParagraph: TParaAttributes; -begin - Result := InnerRich.Paragraph; -end; - -function TcxCustomRichEdit.GetSelAttributes: TTextAttributes; -begin - if ActiveProperties.MemoMode then - Result := InnerRich.DefAttributes - else - Result := InnerRich.SelAttributes; -end; - -procedure TcxCustomRichEdit.RefreshScrollBars; -var - ARgn: HRGN; -begin - if HandleAllocated then - begin - if not NeedsScrollBars then - DoLayoutChanged - else - begin - ARgn := CreateRectRgnIndirect(GetControlRect(InnerRich)); - SendMessage(InnerRich.Handle, WM_NCPAINT, ARgn, 0); - SetScrollBarsParameters; - VScrollBar.Invalidate; - HScrollBar.Invalidate; - DeleteObject(ARgn); - end; - end; -end; - -procedure TcxCustomRichEdit.SetDefAttributes(const Value: TTextAttributes); -begin - InnerRich.DefAttributes := Value; -end; - -procedure TcxCustomRichEdit.SetDefaultConverter(Value: TConversionClass); -begin - InnerRich.DefaultConverter := Value; -end; - -procedure TcxCustomRichEdit.SetPageRect(const Value: TRect); -begin - InnerRich.PageRect := Value; -end; - -procedure TcxCustomRichEdit.SetSelAttributes(const Value: TTextAttributes); -begin - InnerRich.SelAttributes := Value; -end; - -procedure TcxCustomRichEdit.EMCanPaste(var Message: TMessage); -begin - InnerRich.Dispatch(Message); -end; - -procedure TcxCustomRichEdit.CMVisibleChanged(var Message: TMessage); -begin - inherited; - RefreshScrollBars; -end; - -procedure TcxCustomRichEdit.WMSetFont(var Message: TWMSetFont); -begin - inherited; - InnerRich.DefAttributes.Assign(Font); -end; - -procedure TcxCustomRichEdit.CMFontChanged(var Message: TMessage); -begin - inherited; - InnerRich.DefAttributes.Assign(Font); -end; - -function TcxCustomRichEdit.UpdateContentOnFocusChanging: Boolean; -begin - Result := False; -end; - -procedure TcxCustomRichEdit.UpdateScrollBars; -begin -end; - -function TcxCustomRichEdit.CanDeleteSelection: Boolean; -begin - Result := (SelLength > 0) and CanModify; -end; - -procedure TcxCustomRichEdit.Changed(Sender: TObject); -begin - DoEditing; -end; - -procedure TcxCustomRichEdit.DoOnResizeRequest(const R: TRect); -begin - with Properties do - if Assigned(OnResizeRequest) then - OnResizeRequest(Self, R); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnResizeRequest) then - OnResizeRequest(Self, R); -end; - -procedure TcxCustomRichEdit.DoOnSelectionChange; -begin - with Properties do - if Assigned(OnSelectionChange) then - OnSelectionChange(Self); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnSelectionChange) then - OnSelectionChange(Self); - InternalCheckSelection; -end; - -function TcxCustomRichEdit.GetEditPopupMenuInstance: TComponent; - - function NewItem(const ACaption: string; ATag: Integer): TMenuItem; - begin - Result := TMenuItem.Create(Self); - with Result do - begin - Caption := ACaption; - Tag := ATag; - OnClick := EditPopupMenuClick; - end; - end; - -var - APopupMenu: TPopupMenu; -begin - if Assigned(FEditPopupMenu) then - begin - Result := FEditPopupMenu; - Exit; - end; - APopupMenu := TPopupMenu.Create(Self); - FEditPopupMenu := APopupMenu; - APopupMenu.Items.Add( - NewItem(cxGetResourceString(@cxSEditRichEditUndoCaption), -1)); - APopupMenu.Items.Add( - NewItem(cxGetResourceString(@cxSEditRichEditRedoCaption), -2)); - APopupMenu.Items.Add(NewItem('-', MaxInt)); - APopupMenu.Items.Add( - NewItem(cxGetResourceString(@cxSEditRichEditCutCaption), -3)); - APopupMenu.Items.Add( - NewItem(cxGetResourceString(@cxSEditRichEditCopyCaption), -4)); - APopupMenu.Items.Add( - NewItem(cxGetResourceString(@cxSEditRichEditPasteCaption), -5)); - APopupMenu.Items.Add( - NewItem(cxGetResourceString(@cxSEditRichEditDeleteCaption), -6)); - APopupMenu.Items.Add(NewItem('-', MaxInt)); - APopupMenu.Items.Add( - NewItem(cxGetResourceString(@cxSEditRichEditSelectAllCaption), -7)); - Result := APopupMenu; -end; - -function TcxCustomRichEdit.IsNavigationKey(Key: Word; - Shift: TShiftState): Boolean; -begin - Result := (((Key = VK_UP) or (Key = VK_DOWN) or - (Key = VK_LEFT) or (Key = VK_RIGHT)) and (Shift = [])) or - (Key = VK_NEXT) or (Key = VK_PRIOR) or (Key = VK_HOME) or (Key = VK_END); -end; - -procedure TcxCustomRichEdit.UpdateEditPopupMenuItems(APopupMenu: TComponent); - - procedure UpdateItems(APopupMenu: TPopupMenu); - begin - APopupMenu.Items[0].Enabled := InnerRich.CanUndo and - ((ActiveProperties.RichEditClass = recRichEdit20) or not InnerRich.CanRedo); - APopupMenu.Items[1].Enabled := InnerRich.CanRedo; - APopupMenu.Items[3].Enabled := CanDeleteSelection; - APopupMenu.Items[4].Enabled := InnerRich.SelLength > 0; - APopupMenu.Items[5].Enabled := InnerRich.CanPaste; - APopupMenu.Items[6].Enabled := CanDeleteSelection; - APopupMenu.Items[8].Enabled := True; - end; - -begin - if not (APopupMenu is TPopupMenu) then - Exit; - InnerRich.ReadOnly := not DataBinding.CanModify or ActiveProperties.ReadOnly; - UpdateItems(TPopupMenu(APopupMenu)); - InnerRich.ReadOnly := RealReadOnly; // !!! ReadOnly must be True in DBRichEdit while DataSet is not in EditMode (for AddictSpellChecker) -end; - -procedure TcxCustomRichEdit.ClearSelection; -begin - InnerRich.ClearSelection; -end; - -procedure TcxCustomRichEdit.CutToClipboard; -begin - InnerRich.CutToClipboard; -end; - -function TcxCustomRichEdit.FindText(const ASearchStr: string; - AStartPos, ALength: Integer; AOptions: TSearchTypes; AForward: Boolean = True): Integer; -begin - Result := InnerRich.FindText(ASearchStr, AStartPos, ALength, AOptions, AForward); -end; - -class function TcxCustomRichEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomRichEditProperties; -end; - -procedure TcxCustomRichEdit.PasteFromClipboard; -begin - InnerRich.PasteFromClipboard; -end; - -procedure TcxCustomRichEdit.PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); -var - AStream: TStringStream; -begin - if ActiveProperties.MemoMode or ActiveProperties.PlainText or - (Parent = nil) or not Parent.HandleAllocated then - EditValue := InnerRich.Text - else - begin - AStream := TStringStream.Create(''); - try - Lines.SaveToStream(AStream); - EditValue := AStream.DataString; - finally - AStream.Free; - end; - end; -end; - -procedure TcxCustomRichEdit.Print(const Caption: string); -begin - InnerRich.Print(Caption); -end; - -procedure TcxCustomRichEdit.SaveSelectionToStream(Stream: TStream); -var - AStreamOperationInfo: TcxRichEditStreamOperationInfo; - ACustomStreamModes: TcxRichEditStreamModes; -begin - ACustomStreamModes := [resmSelection]; - TcxRichEditStrings(Lines).InitStreamOperation(Stream, - AStreamOperationInfo, esoSaveTo, True, ACustomStreamModes); - with AStreamOperationInfo do - begin - cxSendStructMessage(InnerRich.Handle, EM_STREAMOUT, TextType, EditStream); - if EditStream.dwError <> 0 then - raise EOutOfResources.Create(cxGetResourceString(@cxSEditRichEditSelectionSaveFail)); - end; -end; - -procedure TcxCustomRichEdit.Undo; -begin - InnerRich.Undo; -end; - -function TcxCustomRichEdit.InsertObject: Boolean; -begin - Result := InnerRich.InsertObject; -end; - -function TcxCustomRichEdit.PasteSpecial: Boolean; -begin - Result := InnerRich.PasteSpecial; -end; - -function TcxCustomRichEdit.ShowObjectProperties: Boolean; -begin - Result := InnerRich.ShowObjectProperties; -end; - -class procedure TcxCustomRichEdit.RegisterConversionFormat( - const AExtension: string; AConversionClass: TConversionClass); -var - AConversionFormat: PcxConversionFormat; -begin - New(AConversionFormat); - with AConversionFormat^ do - begin - Extension := AnsiLowerCaseFileName(AExtension); - ConversionClass := AConversionClass; - Next := FConversionFormatList; - end; - FConversionFormatList := AConversionFormat; - TCustomRichEdit.RegisterConversionFormat(AExtension, AConversionClass); -end; - -procedure Initialize; -begin - GetRegisteredEditProperties.Register(TcxRichEditProperties, - cxGetResourceString(@scxSEditRepositoryRichEditItem)); - CFObjectDescriptor := RegisterClipboardFormat('Object Descriptor'); - CFEmbeddedObject := RegisterClipboardFormat('Embedded Object'); - CFLinkSource := RegisterClipboardFormat('Link Source'); - CFRtf := RegisterClipboardFormat(CF_RTF); - CFRETextObj := RegisterClipboardFormat(CF_RETEXTOBJ); -end; - -initialization - Initialize; -finalization - FreeAndNil(FRichRenderer); - FreeAndNil(FRichConverter); - GetRegisteredEditProperties.Unregister(TcxRichEditProperties); - if FRichEditLibrary <> 0 then - FreeLibrary(FRichEditLibrary); - ReleaseConversionFormatList; -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxScrollCursors.res b/internal/x.46/ExpressEditors Library 5/Sources/cxScrollCursors.res deleted file mode 100644 index fa3a5867..00000000 Binary files a/internal/x.46/ExpressEditors Library 5/Sources/cxScrollCursors.res and /dev/null differ diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxSelectEditRepositoryItem.dfm b/internal/x.46/ExpressEditors Library 5/Sources/cxSelectEditRepositoryItem.dfm deleted file mode 100644 index 5bcaf4af..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxSelectEditRepositoryItem.dfm +++ /dev/null @@ -1,71 +0,0 @@ -object cxSelectRepositoryItem: TcxSelectRepositoryItem - Left = 403 - Top = 209 - BorderStyle = bsDialog - Caption = 'Select EditRepositoryItem' - ClientHeight = 392 - ClientWidth = 346 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Label1: TLabel - Left = 10 - Top = 320 - Width = 56 - Height = 13 - Caption = 'Description:' - end - object lbItems: TListBox - Left = 8 - Top = 8 - Width = 233 - Height = 305 - ItemHeight = 13 - Sorted = True - TabOrder = 0 - OnClick = lbItemsClick - OnMouseDown = lbItemsMouseDown - end - object Panel1: TPanel - Left = 8 - Top = 335 - Width = 329 - Height = 49 - BevelInner = bvLowered - Color = clInfoBk - TabOrder = 3 - object lbHint: TLabel - Left = 4 - Top = 4 - Width = 321 - Height = 41 - AutoSize = False - Caption = 'LongHint' - WordWrap = True - end - end - object btOk: TButton - Left = 256 - Top = 8 - Width = 75 - Height = 25 - Caption = '&Ok' - Default = True - Enabled = False - ModalResult = 1 - TabOrder = 1 - end - object btCancel: TButton - Left = 256 - Top = 40 - Width = 75 - Height = 25 - Cancel = True - Caption = '&Cancel' - ModalResult = 2 - TabOrder = 2 - end -end diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxSelectEditRepositoryItem.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxSelectEditRepositoryItem.pas deleted file mode 100644 index 588e4e62..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxSelectEditRepositoryItem.pas +++ /dev/null @@ -1,145 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxSelectEditRepositoryItem; - -{$I cxVer.inc} - -interface - -uses - Windows, SysUtils, Classes, Controls, Forms, StdCtrls, cxClasses, cxEdit, - ExtCtrls; - -type - TcxSelectRepositoryItemSetup = record - TopIndex: Integer; - Selected: Integer; - List: TcxRegisteredClasses; - Pos: TPoint; - end; - - TcxSelectRepositoryItem = class(TForm) - lbItems: TListBox; - Panel1: TPanel; - lbHint: TLabel; - Label1: TLabel; - btOk: TButton; - btCancel: TButton; - procedure lbItemsClick(Sender: TObject); - procedure lbItemsMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - private - FList: TcxRegisteredClasses; - procedure Setup(const AData: TcxSelectRepositoryItemSetup); - procedure SaveSetup(var AData: TcxSelectRepositoryItemSetup); - end; - -function GetEditRepositoryItemClass( - var ASetupData: TcxSelectRepositoryItemSetup): TcxEditRepositoryItemClass; - -implementation - -{$R *.dfm} - -function GetEditRepositoryItemClass( - var ASetupData: TcxSelectRepositoryItemSetup): TcxEditRepositoryItemClass; -var - ASelectRepositoryItem: TcxSelectRepositoryItem; -begin - Result := nil; - ASelectRepositoryItem := TcxSelectRepositoryItem.Create(nil); - try - ASelectRepositoryItem.Setup(ASetupData); - if ASelectRepositoryItem.ShowModal = mrOk then - Result := TcxEditRepositoryItemClass( - ASelectRepositoryItem.lbItems.Items.Objects[ASelectRepositoryItem.lbItems.ItemIndex]); - ASelectRepositoryItem.SaveSetup(ASetupData); - finally - ASelectRepositoryItem.Release; - end; -end; - -procedure TcxSelectRepositoryItem.lbItemsClick(Sender: TObject); -begin - btOk.Enabled := lbItems.ItemIndex <> -1; - if btOk.Enabled then - lbHint.Caption := FList.GetHintByClass( - TcxEditRepositoryItemClass(lbItems.Items.Objects[lbItems.ItemIndex])) - else - lbHint.Caption := ''; -end; - -procedure TcxSelectRepositoryItem.lbItemsMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - if (ssDouble in Shift) and (mbLeft = Button) and - (lbItems.ItemAtPos(Point(X, Y), True) <> -1) then ModalResult := mrOk; -end; - -procedure TcxSelectRepositoryItem.Setup(const AData: TcxSelectRepositoryItemSetup); -var - I: Integer; -begin - with AData do - begin - FList := List; - for I := 0 to List.Count - 1 do - lbItems.Items.AddObject(List.Descriptions[I], TObject(List[I])); - if (Pos.X = -1) and (Pos.Y = -1) then Position := poScreenCenter - else - begin - Left := Pos.X; - Top := Pos.Y; - end; - lbItems.TopIndex := TopIndex; - if (Selected = -1) or ((Selected > 0) and (Selected < List.Count)) then - lbItems.ItemIndex := Selected; - lbItemsClick(nil); - end; -end; - -procedure TcxSelectRepositoryItem.SaveSetup(var AData: TcxSelectRepositoryItemSetup); -begin - with AData do - begin - Pos := Point(Left, Top); - Selected := lbItems.ItemIndex; - TopIndex := lbItems.TopIndex; - end; -end; - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxShellBrowser.dfm b/internal/x.46/ExpressEditors Library 5/Sources/cxShellBrowser.dfm deleted file mode 100644 index 6e0e45c0..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxShellBrowser.dfm +++ /dev/null @@ -1,68 +0,0 @@ -object cxShellBrowserDlg: TcxShellBrowserDlg - Left = 455 - Top = 160 - ActiveControl = cxStv - AutoScroll = False - BorderIcons = [biSystemMenu] - Caption = 'Browse for Folder' - ClientHeight = 358 - ClientWidth = 308 - Color = clBtnFace - Constraints.MinHeight = 300 - Constraints.MinWidth = 250 - OldCreateOrder = True - Position = poScreenCenter - OnCreate = FormCreate - OnPaint = FormPaint - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - object lblFolder: TcxLabel - Left = 12 - Top = 8 - Caption = 'Current Folder' - Transparent = True - end - object cxStv: TcxShellTreeView - Left = 12 - Top = 56 - Width = 284 - Height = 261 - Anchors = [akLeft, akTop, akRight, akBottom] - HideSelection = False - Indent = 19 - Options.ShowNonFolders = False - RightClickSelect = True - TabOrder = 0 - OnChange = cxStvChange - end - object cxTeFolder: TcxTextEdit - Left = 12 - Top = 24 - Anchors = [akLeft, akTop, akRight, akBottom] - Properties.ReadOnly = True - TabOrder = 1 - Width = 284 - end - object cxButton1: TcxButton - Left = 139 - Top = 323 - Width = 75 - Height = 25 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object cxButton2: TcxButton - Left = 219 - Top = 323 - Width = 75 - Height = 25 - Anchors = [akRight, akBottom] - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 3 - end -end diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxShellBrowser.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxShellBrowser.pas deleted file mode 100644 index 5d3f306a..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxShellBrowser.pas +++ /dev/null @@ -1,296 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxShellBrowser; - -{$I cxVer.inc} - -{$IFDEF DELPHI6} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} - -interface - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, StdCtrls, cxControls, cxContainer, cxShellTreeView, - cxShellCommon, cxSHellControls, cxShellDlgs, - ShlObj, ComObj, ActiveX, cxEdit, cxTextEdit, FileCtrl, - ComCtrls, cxLookAndFeels, cxLookAndFeelPainters, - cxLabel, cxButtons, Menus, cxGraphics; - -type - { TcxShellBrowserDlg } - - TcxShellBrowserDlg = class(TForm) - cxStv: TcxShellTreeView; - lblFolder: TcxLabel; - cxTeFolder: TcxTextEdit; - cxButton1: TcxButton; - cxButton2: TcxButton; - procedure FormResize(Sender: TObject); - procedure cxStvChange(Sender: TObject; Node: TTreeNode); - procedure FormPaint(Sender: TObject); - procedure FormCreate(Sender: TObject); - private - FLookAndFeel: TcxLookAndFeel; - FSizeGripWidth: integer; - FSizeGripHeight: integer; - FSizeGripRect: TRect; - function GetFolder: string; - procedure SetFolder(const Value: string); - function GetCaption: string; - procedure SetCaption(const Value: string); - function GetFolderCaption: string; - procedure SetFolderCaption(const Value: string); - function GetShellOptions: TcxShellTreeViewOptions; - procedure SetShellOptions(Value: TcxShellTreeViewOptions); - function GetRoot: TcxShellTreeRoot; - procedure SetRoot(const Value: TcxShellTreeRoot); - function GetShButtons: boolean; - function GetShInfoTips: boolean; - function GetShShowLines: boolean; - function GetShShowRoot: boolean; - procedure SetSfShowRoot(const Value: boolean); - procedure SetShButtons(const Value: boolean); - procedure SetShInfoTips(const Value: boolean); - procedure SetShShowLines(const Value: boolean); - procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; - - procedure LFChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); - procedure SetLookAndFeel(Value: TcxLookAndFeel); - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - property DlgCaption: string read GetCaption write SetCaption; - property DlgFolderLabelCaption: string read GetFolderCaption write SetFolderCaption; - property DlgOptions: TcxShellTreeViewOptions read GetShellOptions - write SetShellOptions; - property DlgShowButtons: boolean read GetShButtons write SetShButtons; - property DlgShowInfoTips: boolean read GetShInfoTips write SetShInfoTips; - property DlgShowLines: boolean read GetShShowLines write SetShShowLines; - property DlgShowRoot: boolean read GetShShowRoot write SetSfShowRoot; - property DlgRoot: TcxShellTreeRoot read GetRoot write SetRoot; - property DlgFolder: string read GetFolder write SetFolder; - property LookAndFeel: TcxLookAndFeel read FLookAndFeel write SetLookAndFeel; - end; - -implementation - -{$R *.dfm} - -uses - Types, cxClasses, cxEditConsts, dxThemeConsts, dxThemeManager, dxUxTheme; - -{ TcxShellBrowserDlg } - -constructor TcxShellBrowserDlg.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FLookAndFeel := TcxLookAndFeel.Create(Self); - FLookAndFeel.OnChanged := LFChanged; - cxStv.Style.LookAndFeel.MasterLookAndFeel := FLookAndFeel; - cxTeFolder.Style.LookAndFeel.MasterLookAndFeel := FLookAndFeel; - cxButton1.LookAndFeel.MasterLookAndFeel := FLookAndFeel; - cxButton2.LookAndFeel.MasterLookAndFeel := FLookAndFeel; - cxButton1.Caption := cxGetResourceString(@cxSEditButtonOK); - cxButton2.Caption := cxGetResourceString(@cxSEditButtonCancel); -end; - -destructor TcxShellBrowserDlg.Destroy; -begin - FreeAndNil(FLookAndFeel); - inherited Destroy; -end; - -procedure TcxShellBrowserDlg.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - Params.ExStyle := WS_EX_DLGMODALFRAME or WS_EX_WINDOWEDGE; -end; - -procedure TcxShellBrowserDlg.CreateWnd; -begin - inherited CreateWnd; - SendMessage(Handle, WM_SETICON, 1, 0); -end; - -function TcxShellBrowserDlg.GetCaption: string; -begin - Result := Caption; -end; - -function TcxShellBrowserDlg.GetFolder: string; -begin - Result := cxStv.Path; -end; - -function TcxShellBrowserDlg.GetFolderCaption: string; -begin - Result := lblFolder.Caption; -end; - -procedure TcxShellBrowserDlg.SetCaption(const Value: string); -begin - Caption := Value; -end; - -procedure TcxShellBrowserDlg.SetFolder(const Value: string); -begin - cxStv.Path := Value; -end; - -procedure TcxShellBrowserDlg.SetFolderCaption(const Value: string); -begin - lblFolder.Caption := Value; -end; - -procedure TcxShellBrowserDlg.FormResize(Sender: TObject); -begin - cxTeFolder.Text := MinimizeName(cxStv.Path, Canvas, cxTeFolder.Width); - FSizeGripRect := ClientRect; - FSizeGripRect.Left := FSizeGripRect.Right - FSizeGripWidth; - FSizeGripRect.Top := FSizeGripRect.Bottom - FSizeGripHeight; - Refresh; -end; - -procedure TcxShellBrowserDlg.cxStvChange(Sender: TObject; - Node: TTreeNode); -begin - with cxTeFolder do - Text := MinimizeName(cxStv.Path, Self.Canvas, Width); - // cxStv.InnerTreeView.Selected.MakeVisible; -end; - -procedure TcxShellBrowserDlg.SetShellOptions(Value: TcxShellTreeViewOptions); -begin - cxStv.Options := Value; -end; - -function TcxShellBrowserDlg.GetRoot: TcxShellTreeRoot; -begin - Result := cxStv.Root; -end; - -procedure TcxShellBrowserDlg.SetRoot(const Value: TcxShellTreeRoot); -begin - cxStv.Root := Value; -end; - -function TcxShellBrowserDlg.GetShButtons: boolean; -begin - Result := cxStv.ShowButtons; -end; - -function TcxShellBrowserDlg.GetShellOptions: TcxShellTreeViewOptions; -begin - Result := cxStv.Options; -end; - -function TcxShellBrowserDlg.GetShInfoTips: boolean; -begin - Result := cxStv.ShowInfoTips; -end; - -function TcxShellBrowserDlg.GetShShowLines: boolean; -begin - Result := cxStv.ShowLines; -end; - -function TcxShellBrowserDlg.GetShShowRoot: boolean; -begin - Result := cxStv.ShowRoot; -end; - -procedure TcxShellBrowserDlg.SetSfShowRoot(const Value: boolean); -begin - cxStv.ShowRoot := Value; -end; - -procedure TcxShellBrowserDlg.SetShButtons(const Value: boolean); -begin - cxStv.ShowButtons := Value; -end; - -procedure TcxShellBrowserDlg.SetShInfoTips(const Value: boolean); -begin - cxStv.ShowInfoTips := Value; -end; - -procedure TcxShellBrowserDlg.SetShShowLines(const Value: boolean); -begin - cxStv.ShowLines := Value; -end; - -procedure TcxShellBrowserDlg.FormPaint(Sender: TObject); -var - ACanvas: TcxCanvas; -begin - ACanvas := TcxCanvas.Create(Canvas); - try - FLookAndFeel.Painter.DrawSizeGrip(ACanvas, FSizeGripRect, clNone); - finally - ACanvas.Free; - end; -end; - -procedure TcxShellBrowserDlg.FormCreate(Sender: TObject); -begin - FSizeGripWidth := GetSystemMetrics(SM_CXVSCROLL); - FSizeGripHeight := GetSystemMetrics(SM_CYHSCROLL); -end; - -procedure TcxShellBrowserDlg.WMNCHitTest(var Message: TWMNCHitTest); -begin - inherited; - if PtInRect(FSizeGripRect, - ScreenToClient(SmallPointToPoint(Message.Pos))) then - Message.Result := HTBOTTOMRIGHT; -end; - -procedure TcxShellBrowserDlg.LFChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); -begin -end; - -procedure TcxShellBrowserDlg.SetLookAndFeel(Value: TcxLookAndFeel); -begin - FLookAndFeel.Assign(Value); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxShellBrowserDialog.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxShellBrowserDialog.pas deleted file mode 100644 index 3c93ae8b..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxShellBrowserDialog.pas +++ /dev/null @@ -1,168 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxShellBrowserDialog; - -interface - -uses - Windows, Messages, SysUtils, Classes, Controls, Forms, - cxShellCommon, cxSHellControls, - cxShellDlgs, cxShellBrowser, cxLookAndFeels; - -type - { TcxCustomShellBrowserDialog } - - TcxCustomShellBrowserDialog = class(TComponent, IdxSkinSupport) - private - FDlg: TcxShellBrowserDlg; - FFolderCaption: string; - FLookAndFeel: TcxLookAndFeel; - FPath: string; - FRoot: TcxDlgShellRoot; - FShButtons: Boolean; - FShellOptions: TcxDlgShellOptions; - FShInfoTips: Boolean; - FShShowLines: Boolean; - FShShowRoot: Boolean; - FTitle: string; - procedure SetLookAndFeel(Value: TcxLookAndFeel); - protected - function CreateForm: TcxShellBrowserDlg; dynamic; - property FolderLabelCaption: string read FFolderCaption write FFolderCaption; - property LookAndFeel: TcxLookAndFeel read FLookAndFeel write SetLookAndFeel; - property Options: TcxDlgShellOptions read fShellOptions write fShellOptions; - property Path: string read fPath write fPath; - property Root: TcxDlgShellRoot read fRoot write fRoot; - property ShowButtons: Boolean read FShButtons write FShButtons default True; - property ShowInfoTips: Boolean read FShInfoTips write FShInfoTips default False; - property ShowLines: Boolean read fShShowLines write fShShowLines default True; - property ShowRoot: Boolean read FShShowRoot write FShShowRoot default True; - property Title: string read FTitle write FTitle; - public - constructor Create(aOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; - end; - - { TcxShellBrowserDialog } - - TcxShellBrowserDialog = class(TcxCustomShellBrowserDialog) - published - property FolderLabelCaption; - property LookAndFeel; - property Options; - property Path; - property Root; - property ShowButtons; - property ShowInfoTips; - property ShowLines; - property ShowRoot; - property Title; - end; - -implementation - -{ TcxCustomShellBrowser } - -constructor TcxCustomShellBrowserDialog.Create(aOwner: TComponent); -begin - inherited; - fShellOptions := TcxDlgShellOptions.Create; - fRoot := TcxDlgShellRoot.Create; - Title := ''; - FShShowRoot := True; - FShButtons := True; - fShShowLines := True; - FLookAndFeel := TcxLookAndFeel.Create(Self); -end; - -destructor TcxCustomShellBrowserDialog.Destroy; -begin - FreeAndNil(FLookAndFeel); - fRoot.Free; - fShellOptions.Free; - inherited; -end; - -function TcxCustomShellBrowserDialog.Execute: Boolean; -var - vOc: TCursor; -begin - vOc := Screen.Cursor; - Screen.Cursor := crHourglass; - try - FDlg := CreateForm; - with FDlg do - begin - if Length(Title) > 0 then - DlgCaption := Title; - if Length(FFolderCaption) > 0 then - DlgFolderLabelCaption := FFolderCaption; - DlgOptions.ShowFolders := fShellOptions.ShowFolders; - DlgOptions.ShowToolTip := fShellOptions.ShowToolTip; - DlgOptions.TrackShellChanges := fShellOptions.TrackShellChanges; - DlgOptions.ContextMenus := fShellOptions.ContextMenus; - DlgOptions.ShowNonFolders := fShellOptions.ShowNonFolders; - DlgOptions.ShowHidden := fShellOptions.ShowHidden; - DlgRoot.BrowseFolder := fRoot.BrowseFolder; - DlgRoot.CustomPath := fRoot.CustomPath; - DlgShowButtons := ShowButtons; - DlgShowInfoTips := ShowInfoTips; - DlgShowLines := ShowLines; - DlgShowRoot := ShowRoot; - DlgFolder := fPath; - FDlg.LookAndFeel.MasterLookAndFeel := Self.LookAndFeel; - Result := ShowModal = idOk; - if Result then - fPath := FDlg.DlgFolder; - end; - finally - FreeAndNil(FDlg); - Screen.Cursor := vOc; - end; -end; - -function TcxCustomShellBrowserDialog.CreateForm: TcxShellBrowserDlg; -begin - Result := TcxShellBrowserDlg.Create(Application); -end; - -procedure TcxCustomShellBrowserDialog.SetLookAndFeel(Value: TcxLookAndFeel); -begin - FLookAndFeel.Assign(Value); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxShellComboBox.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxShellComboBox.pas deleted file mode 100644 index f117ba88..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxShellComboBox.pas +++ /dev/null @@ -1,1876 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxShellComboBox; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, Classes, ComCtrls, Controls, ImgList, ShlObj, cxClasses, - cxContainer, cxDataUtils, cxDropDownEdit, cxEdit, cxGraphics, cxTextEdit, - cxShellListView, cxShellTreeView, cxShellCommon, cxShellControls; - -type - TcxShellComboBoxViewOption = (scvoShowFiles, scvoShowHidden); - TcxShellComboBoxViewOptions = set of TcxShellComboBoxViewOption; - - TcxPopupShellTreeViewOption = (tvoContextMenus, tvoHotTrack, tvoShowButtons, - tvoShowInfoTips, tvoShowLines, tvoShowRoot, tvoShowToolTip, - tvoRightClickSelect); - TcxPopupShellTreeViewOptions = set of TcxPopupShellTreeViewOption; - - TcxShellComboBoxShowFullPath = (sfpNever, sfpAlways, sfpNotFocused); - - { TcxShellComboBoxViewInfo } - - TcxShellComboBoxViewInfo = class(TcxCustomTextEditViewInfo) - public - ShellIconPosition: TPoint; - ShellSysIconIndex: Integer; - ShellSysIconOverlayIndex: Integer; - procedure Offset(DX, DY: Integer); override; - procedure Paint(ACanvas: TcxCanvas); override; - end; - - { TcxShellComboBoxViewData } - - TcxCustomShellComboBoxProperties = class; - - TcxShellComboBoxViewData = class(TcxCustomDropDownEditViewData) - private - function GetProperties: TcxCustomShellComboBoxProperties; - protected - function InternalEditValueToDisplayText(AEditValue: TcxEditValue): string; override; - function InternalGetEditConstantPartSize(ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; var MinContentSize: TSize; - AViewInfo: TcxCustomEditViewInfo): TSize; override; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AViewInfo: TcxCustomEditViewInfo; AIsMouseEvent: Boolean); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); override; - function GetClientExtent(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo): TRect; override; - property Properties: TcxCustomShellComboBoxProperties read GetProperties; - end; - - { TcxShellComboBoxRoot } - - TcxShellComboBoxRoot = class(TcxCustomShellRoot) - private - FOnChange: TNotifyEvent; - protected - procedure RootUpdated; override; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - end; - - { TcxShellComboBoxLookupData } - - TcxCustomShellComboBox = class; - - TcxShellComboBoxLookupData = class(TcxCustomTextEditLookupData) - private - function GetEdit: TcxCustomShellComboBox; - protected - function GetItem(Index: Integer): string; override; - function GetItemCount: Integer; override; - procedure ListChanged; override; - property Edit: TcxCustomShellComboBox read GetEdit; - end; - - { TcxCustomShellComboBoxProperties } - - TcxCustomShellComboBoxProperties = class(TcxCustomPopupEditProperties) - private - FFastSearch: Boolean; - FIncrementalSearch: Boolean; - FRoot: TcxShellComboBoxRoot; - FShowFullPath: TcxShellComboBoxShowFullPath; - FStoreRelativePath: Boolean; - FTreeViewOptions: TcxPopupShellTreeViewOptions; - FViewOptions: TcxShellComboBoxViewOptions; - FOnAddFolder: TcxShellAddFolderEvent; - FOnRootSettingsChanged: TNotifyEvent; - procedure DoRootSettingsChanged; - function GetDropDownSizeable: Boolean; - function GetDropDownWidth: Integer; - procedure RootChangeHandler(Sender: TObject); - procedure RootSettingsChanged(Sender: TObject); - procedure SetDropDownSizeable(Value: Boolean); - procedure SetDropDownWidth(Value: Integer); - procedure SetFastSearch(Value: Boolean); - procedure SetIncrementalSearch(Value: Boolean); - procedure SetShowFullPath(Value: TcxShellComboBoxShowFullPath); - procedure SetStoreRelativePath(Value: Boolean); - procedure SetTreeViewOptions(Value: TcxPopupShellTreeViewOptions); - procedure SetViewOptions(Value: TcxShellComboBoxViewOptions); - protected - class function GetPopupWindowClass: TcxCustomEditPopupWindowClass; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - procedure CheckRoot; - function EditValueToPIDL(const AEditValue: TcxEditValue): PItemIDList; virtual; - function GetShellViewOptions: TcxShellViewOptions; - procedure RootChanged; virtual; - property OnRootSettingsChanged: TNotifyEvent read FOnRootSettingsChanged - write FOnRootSettingsChanged; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; override; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - class function GetLookupDataClass: TcxInterfacedPersistentClass; override; - procedure GetShellDisplayValue(const AEditValue: TcxEditValue; - AFocused: Boolean; out AText: string; - out AShellSysIconIndex, AShellSysIconOverlayIndex: Integer); - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; override; - // !!! - property DropDownSizeable: Boolean read GetDropDownSizeable write SetDropDownSizeable default True; - property DropDownWidth: Integer read GetDropDownWidth write SetDropDownWidth - default 250; - property FastSearch: Boolean read FFastSearch write SetFastSearch default False; - property IncrementalSearch: Boolean read FIncrementalSearch - write SetIncrementalSearch default False; - property Root: TcxShellComboBoxRoot read FRoot write FRoot; - property ShowFullPath: TcxShellComboBoxShowFullPath read FShowFullPath - write SetShowFullPath default sfpNever; - property StoreRelativePath: Boolean read FStoreRelativePath write SetStoreRelativePath default True; - property TreeViewOptions: TcxPopupShellTreeViewOptions read FTreeViewOptions - write SetTreeViewOptions default [tvoContextMenus, tvoHotTrack, - tvoShowButtons, tvoShowLines, tvoShowRoot, tvoShowToolTip]; - property ViewOptions: TcxShellComboBoxViewOptions read FViewOptions - write SetViewOptions default []; - property OnAddFolder: TcxShellAddFolderEvent read FOnAddFolder - write FOnAddFolder; - end; - - { TcxShellComboBoxProperties } - - TcxShellComboBoxProperties = class(TcxCustomShellComboBoxProperties) - published - property Alignment; - property AssignedValues; - property AutoSelect; - property ButtonGlyph; - property ClearKey; - property DropDownSizeable; - property DropDownWidth; - property FastSearch; - property HideSelection; - property ImeMode; - property ImeName; - property IncrementalSearch; - property PopupAlignment; - property ReadOnly; - property Root; - property ShowFullPath; - property StoreRelativePath; - property TreeViewOptions; - property UseLeftAlignmentOnEditing; - property ValidateOnEnter; - property ViewOptions; - property OnAddFolder; - property OnChange; - property OnCloseUp; - property OnEditValueChanged; - property OnPopup; - end; - - { TcxPopupShellTreeView } - - TcxPopupShellTreeView = class(TcxShellTreeView) - private - function GetEdit: TcxCustomShellComboBox; - protected - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure DoSelectNode(AClosePopupReason: TcxEditCloseUpReason); virtual; - property Edit: TcxCustomShellComboBox read GetEdit; - end; - - TcxPopupShellTreeViewClass = class of TcxPopupShellTreeView; - - { TcxShellComboBoxPopupWindow } - - TcxShellComboBoxPopupWindow = class(TcxPopupEditPopupWindow) - private - procedure WMEnable(var Message: TMessage); message WM_ENABLE; - end; - - { TcxCustomShellComboBox } - - TcxCustomShellComboBox = class(TcxCustomPopupEdit) - private - FAbsolutePIDL: PItemIDList; - FIsDependentShellControlsNotification, FNotificationFromDependentShellControls: Boolean; - FIsSelectedNodeChangeEventLocked: Boolean; - FPopupShellTreeView: TcxPopupShellTreeView; - FPopupWindowShowing: Boolean; - FShellListView: TcxCustomShellListView; - FShellTreeView: TcxCustomShellTreeView; - procedure AddFolderHandler(Sender: TObject; AFolder: TcxShellFolder; - var ACanAdd: Boolean); - function GetAbsolutePIDL: PItemIDList; - function GetActiveProperties: TcxCustomShellComboBoxProperties; - function GetPath: string; - function GetProperties: TcxCustomShellComboBoxProperties; -// function GetRelativePath: string; - function GetViewInfo: TcxShellComboBoxViewInfo; - procedure RootChangeHandler(Sender: TObject); - procedure RootSettingsChanged(Sender: TObject); - procedure SetAbsolutePIDL(Value: PItemIDList); - procedure SetPath(const Value: string); - procedure SetProperties(Value: TcxCustomShellComboBoxProperties); - procedure SetRelativePIDL(Value: PItemIDList); -// procedure SetRelativePath(const Value: string); - procedure SetShellListView(Value: TcxCustomShellListView); - procedure SetShellTreeView(Value: TcxCustomShellTreeView); - procedure DSMDoNavigate(var Message: TMessage); message DSM_DONAVIGATE; - procedure DSMSynchronizeRoot(var Message: TMessage); message DSM_SYNCHRONIZEROOT; - protected - function CanDropDown: Boolean; override; - procedure CloseUp(AReason: TcxEditCloseUpReason); override; - procedure CreatePopupWindow; override; - procedure DoInitPopup; override; - procedure DropDown; override; - procedure HandleSelectItem(Sender: TObject); override; - procedure Initialize; override; - procedure InitializePopupWindow; override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure PopupWindowShowed(Sender: TObject); override; - procedure PopupWindowShowing(Sender: TObject); override; - procedure PropertiesChanged(Sender: TObject); override; - procedure SynchronizeDisplayValue; override; - procedure SynchronizeEditValue; override; - function CheckAbsolutePIDL(var APIDL: PItemIDList; - ACheckObjectExistence: Boolean): Boolean; - procedure CheckPopupShellTreeView; - function FindNodeAmongExpandedNodes(ANodeText: string): TTreeNode; - function GetPopupShellTreeViewClass: TcxPopupShellTreeViewClass; virtual; - procedure InternalSetAbsolutePIDL(Value: PItemIDList); - procedure InternalSynchronizeEditValue(APIDL: PItemIDList; - const ADisplayText: string = ''); virtual; - procedure InvalidateShellIconRect; - procedure SelectedNodeChangeHandler(Sender: TObject; ANode: TTreeNode); virtual; - procedure SynchronizeDependentShellControls; - procedure SynchronizePopupShellTreeView; - function TraverseAllVisibleNodes(var ANodeIndex: Integer; - ATreeNode: TTreeNode = nil): TTreeNode; - property ShellListView: TcxCustomShellListView read FShellListView write SetShellListView; - property ShellTreeView: TcxCustomShellTreeView read FShellTreeView write SetShellTreeView; - property ViewInfo: TcxShellComboBoxViewInfo read GetViewInfo; - public - destructor Destroy; override; - function CanHide: Boolean; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property AbsolutePIDL: PItemIDList read GetAbsolutePIDL write SetAbsolutePIDL; - property AbsolutePath: string read GetPath write SetPath; // deprecated - property ActiveProperties: TcxCustomShellComboBoxProperties - read GetActiveProperties; - property Path: string read GetPath write SetPath; - property PopupShellTreeView: TcxPopupShellTreeView read FPopupShellTreeView; - property Properties: TcxCustomShellComboBoxProperties read GetProperties - write SetProperties; - property RelativePIDL: PItemIDList write SetRelativePIDL; // TODO -// property RelativePath: string read GetRelativePath write SetRelativePath; - end; - - { TcxShellComboBox } - - TcxShellComboBox = class(TcxCustomShellComboBox) - private - function GetActiveProperties: TcxShellComboBoxProperties; - function GetProperties: TcxShellComboBoxProperties; - procedure SetProperties(Value: TcxShellComboBoxProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxShellComboBoxProperties - read GetActiveProperties; - published - property Align; - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxShellComboBoxProperties read GetProperties - write SetProperties; - property ShellListView; - property ShellTreeView; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -var - cxShellComboBoxImageList: TCustomImageList; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - ActiveX, CommCtrl, Graphics, ShellAPI, SysUtils, cxControls, cxDBEdit, - cxEditPaintUtils, cxEditUtils, cxExtEditConsts, cxFilterControlUtils, - cxGeometry, cxVariants; - -type - TcxDBTextEditDataBindingAccess = class(TcxDBTextEditDataBinding); - TcxCustomEditAccess = class(TcxCustomEdit); - TcxInnerShellListViewAccess = class(TcxInnerShellListView); - TcxInnerShellTreeViewAccess = class(TcxInnerShellTreeView); - TcxPopupEditPopupWindowAccess = class(TcxPopupEditPopupWindow); - TcxShellTreeItemProducerAccess = class(TcxShellTreeItemProducer); - -const - ShellRootIDL: Word = 0; - -type - { TcxFilterShellComboBoxHelper } - - TcxFilterShellComboBoxHelper = class(TcxFilterDropDownEditHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - end; - -class function TcxFilterShellComboBoxHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxShellComboBox; -end; - -procedure FreeAndNilPIDL(var APIDL: PItemIDList); -begin - if APIDL <> nil then - begin - cxMalloc.Free(APIDL); - APIDL := nil; - end; -end; - -procedure GetShellSysIconIndex(APIDL: PItemIDList; - out AShellSysIconIndex, AShellSysIconOverlayIndex: Integer); -const - SHGFI_ATTR_SPECIFIED = $20000; -var - AFlags: Integer; - ASHFileInfo: TSHFileInfo; -begin - AFlags := SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_SMALLICON or - SHGFI_ATTR_SPECIFIED or SHGFI_ATTRIBUTES; - ASHFileInfo.dwAttributes := SFGAO_LINK or SFGAO_SHARE; - SHGetFileInfo(Pointer(APIDL), 0, ASHFileInfo, SizeOf(ASHFileInfo), AFlags); - AShellSysIconIndex := ASHFileInfo.iIcon; - if ASHFileInfo.dwAttributes and SFGAO_LINK <> 0 then - AShellSysIconOverlayIndex := cxShellShortcutItemOverlayIndex - else - if ASHFileInfo.dwAttributes and SFGAO_SHARE <> 0 then - AShellSysIconOverlayIndex := cxShellSharedItemOverlayIndex - else - AShellSysIconOverlayIndex := cxShellNormalItemOverlayIndex; -end; - -procedure PrepareShellComboBoxImageList; -var - ASHFileInfo : TSHFileInfo; -begin - cxShellComboBoxImageList := TCustomImageList.Create(nil); - with cxShellComboBoxImageList do - begin - ShareImages := True; - Handle := SHGetFileInfo(@ShellRootIDL, 0, ASHFileInfo, SizeOf(ASHFileInfo), - SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_SMALLICON); - end; -end; - -{ TcxShellComboBoxViewInfo } - -procedure TcxShellComboBoxViewInfo.Offset(DX, DY: Integer); -begin - inherited Offset(DX, DY); - Inc(ShellIconPosition.X, DX); - Inc(ShellIconPosition.Y, DY); -end; - -procedure TcxShellComboBoxViewInfo.Paint(ACanvas: TcxCanvas); -var - R: TRect; -begin - if (ShellSysIconIndex <> -1) and (cxShellComboBoxImageList <> nil) then - begin - R.TopLeft := ShellIconPosition; - R.Right := R.Left + cxShellComboBoxImageList.Width; - R.Bottom := R.Top + cxShellComboBoxImageList.Height; - if not Transparent then - cxEditFillRect(ACanvas.Handle, R, GetSolidBrush(BackgroundColor)); - ImageList_Draw(cxShellComboBoxImageList.Handle, ShellSysIconIndex, - ACanvas.Handle, R.Left, R.Top, - ILD_TRANSPARENT or IndexToOverlayMask(ShellSysIconOverlayIndex + 1)); - if not Transparent then - ACanvas.ExcludeClipRect(R); - end; - inherited Paint(ACanvas); -end; - -{ TcxShellComboBoxViewData } - -procedure TcxShellComboBoxViewData.Calculate(ACanvas: TcxCanvas; - const ABounds: TRect; const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); - - function GetIconPosition: TPoint; - begin - if cxShellComboBoxImageList = nil then - Result := cxNullPoint - else - with TcxShellComboBoxViewInfo(AViewInfo) do - begin - Result.X := BorderRect.Left + 1; - Result.Y := BorderRect.Top + (BorderRect.Bottom - BorderRect.Top - - cxShellComboBoxImageList.Height) div 2 - end; - end; - -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - TcxShellComboBoxViewInfo(AViewInfo).ShellIconPosition := GetIconPosition; -end; - -procedure TcxShellComboBoxViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -begin - with TcxShellComboBoxViewInfo(AViewInfo) do - begin - Properties.GetShellDisplayValue(AEditValue, False, string(Text), - ShellSysIconIndex, ShellSysIconOverlayIndex); - DoOnGetDisplayText(string(Text)); - end; - PrepareSelection(AViewInfo); -end; - -function TcxShellComboBoxViewData.GetClientExtent(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo): TRect; -begin - Result := inherited GetClientExtent(ACanvas, AViewInfo); - if not (Properties.FastSearch and (Edit = nil) or (cxShellComboBoxImageList = nil)) then - Inc(Result.Left, cxShellComboBoxImageList.Width + 4); -end; - -function TcxShellComboBoxViewData.InternalGetEditConstantPartSize(ACanvas: TcxCanvas; - AIsInplace: Boolean; AEditSizeProperties: TcxEditSizeProperties; - var MinContentSize: TSize; AViewInfo: TcxCustomEditViewInfo): TSize; -begin - Result := inherited InternalGetEditConstantPartSize(ACanvas, AIsInplace, - AEditSizeProperties, MinContentSize, AViewInfo); - if IsInplace or (Edit <> nil) and TcxCustomEditAccess(Edit).AutoSize then - begin - if (cxShellComboBoxImageList <> nil) and - (MinContentSize.cy < cxShellComboBoxImageList.Height) then - MinContentSize.cy := cxShellComboBoxImageList.Height; - end; -end; - -function TcxShellComboBoxViewData.InternalEditValueToDisplayText( - AEditValue: TcxEditValue): string; -var - AShellSysIconIndex, AShellSysIconOverlayIndex: Integer; -begin - Properties.GetShellDisplayValue(AEditValue, Focused, Result, AShellSysIconIndex, - AShellSysIconOverlayIndex); -end; - -function TcxShellComboBoxViewData.GetProperties: TcxCustomShellComboBoxProperties; -begin - Result := TcxCustomShellComboBoxProperties(FProperties); -end; - -{ TcxShellComboBoxRoot } - -procedure TcxShellComboBoxRoot.RootUpdated; -begin - inherited RootUpdated; - TcxCustomShellComboBoxProperties(Owner).RootChangeHandler(Self); - if Assigned(FOnChange) then - FOnChange(Self); -end; - -{ TcxShellComboBoxLookupData } - -function TcxShellComboBoxLookupData.GetItem(Index: Integer): string; -begin - Result := Edit.TraverseAllVisibleNodes(Index).Text; -end; - -function TcxShellComboBoxLookupData.GetItemCount: Integer; -begin - if Edit.ActiveProperties.IncrementalSearch then - begin - Result := -1; - Edit.TraverseAllVisibleNodes(Result); - end - else - Result := 0; -end; - -procedure TcxShellComboBoxLookupData.ListChanged; -begin -end; - -function TcxShellComboBoxLookupData.GetEdit: TcxCustomShellComboBox; -begin - Result := TcxCustomShellComboBox(GetOwner); -end; - -{ TcxCustomShellComboBoxProperties } - -constructor TcxCustomShellComboBoxProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FRoot := TcxShellComboBoxRoot.Create(Self, 0); - FRoot.OnSettingsChanged := RootSettingsChanged; - DropDownSizeable := True; - ImmediateDropDown := False; - PopupAutoSize := False; - TreeViewOptions := [tvoContextMenus, tvoHotTrack, tvoShowButtons, - tvoShowLines, tvoShowRoot, tvoShowToolTip]; - ValidateOnEnter := True; - - FStoreRelativePath := True; -end; - -destructor TcxCustomShellComboBoxProperties.Destroy; -begin - FreeAndNil(FRoot); - inherited Destroy; -end; - -procedure TcxCustomShellComboBoxProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomShellComboBoxProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomShellComboBoxProperties do - begin - Self.FastSearch := FastSearch; - Self.IncrementalSearch := IncrementalSearch; - Self.Root.Assign(Root); - Self.ShowFullPath := ShowFullPath; - Self.StoreRelativePath := StoreRelativePath; - Self.TreeViewOptions := TreeViewOptions; - Self.ViewOptions := ViewOptions; - Self.OnAddFolder := OnAddFolder; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomShellComboBoxProperties.CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; -var - AShellSysIconIndex1, AShellSysIconIndex2: Integer; - AShellSysIconOverlayIndex1, AShellSysIconOverlayIndex2: Integer; - AText1, AText2: string; -begin - GetShellDisplayValue(AEditValue1, False, AText1, AShellSysIconIndex1, - AShellSysIconOverlayIndex1); - GetShellDisplayValue(AEditValue2, False, AText2, AShellSysIconIndex2, - AShellSysIconOverlayIndex2); - Result := InternalCompareString(AText1, AText2, True) and (FastSearch or - (AShellSysIconIndex1 = AShellSysIconIndex2) and - (AShellSysIconOverlayIndex1 = AShellSysIconOverlayIndex2)); -end; - -class function TcxCustomShellComboBoxProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxShellComboBox; -end; - -function TcxCustomShellComboBoxProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -var - AShellSysIconIndex, AShellSysIconOverlayIndex: Integer; - AText: string; -begin - GetShellDisplayValue(AEditValue, False, AText, AShellSysIconIndex, - AShellSysIconOverlayIndex); - Result := AText; -end; - -function TcxCustomShellComboBoxProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - Result := evsValue; -end; - -class function TcxCustomShellComboBoxProperties.GetLookupDataClass: TcxInterfacedPersistentClass; -begin - Result := TcxShellComboBoxLookupData; -end; - -procedure TcxCustomShellComboBoxProperties.GetShellDisplayValue( - const AEditValue: TcxEditValue; AFocused: Boolean; - out AText: string; out AShellSysIconIndex, AShellSysIconOverlayIndex: Integer); -var - APath: string; - - procedure GetShellObjectName; - var - APathLength: Integer; - I: Integer; - begin - APathLength := Length(APath); - for I := APathLength - 1 downto 1 do - if APath[I] = '\' then - begin - APath := Copy(APath, I + 1, APathLength - I); - Break; - end; - end; - -var - AAttributes, AParsedCharCount: ULONG; - APIDL: PItemIDList; -begin - AShellSysIconIndex := -1; - if FastSearch then - begin - if VarIsNull(AEditValue) or VarIsEmpty(AEditValue) then - AText := '' - else - begin - APath := VarToStr(AEditValue); - CheckRoot; - if APath = '' then - AText := GetPIDLDisplayName(Root.Pidl) - else - case CheckShellObjectPath(APath, GetPidlName(Root.Pidl), False) of - sptVirtual: - begin - AAttributes := SFGAO_HIDDEN or SFGAO_FOLDER; - GetDesktopIShellFolder.ParseDisplayName(0, nil, StringToOleStr(APath), - AParsedCharCount, APIDL, AAttributes); - if (APIDL <> nil) and not CheckViewOptions(GetShellViewOptions, AAttributes) then - APIDL := nil; - if APIDL = nil then - AText := APath - else - begin - AText := GetPIDLDisplayName(APIDL); - DisposePidl(APIDL); - end; - end; - else - begin - GetShellObjectName; - AText := APath; - end; - end; - end; - Exit; - end; - - if VarIsNull(AEditValue) or VarIsEmpty(AEditValue) then - APIDL := nil - else - APIDL := EditValueToPIDL(AEditValue); - if APIDL = nil then - AText := VarToStr(AEditValue) - else - begin - AText := GetPIDLDisplayName(APIDL, (ShowFullPath = sfpAlways) or - (ShowFullPath = sfpNotFocused) and not AFocused); - GetShellSysIconIndex(APIDL, AShellSysIconIndex, AShellSysIconOverlayIndex); - DisposePidl(APIDL); - end; - DisplayValueToDisplayText(AText); -end; - -class function TcxCustomShellComboBoxProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxShellComboBoxViewInfo; -end; - -function TcxCustomShellComboBoxProperties.IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; -begin - Result := True; -end; - -class function TcxCustomShellComboBoxProperties.GetPopupWindowClass: TcxCustomEditPopupWindowClass; -begin - Result := TcxShellComboBoxPopupWindow; -end; - -class function TcxCustomShellComboBoxProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxShellComboBoxViewData; -end; - -procedure TcxCustomShellComboBoxProperties.CheckRoot; -begin - if Root.ShellFolder = nil then - begin - BeginUpdate; - try - Root.CheckRoot; - finally - EndUpdate(False); - end; - end; -end; - -function TcxCustomShellComboBoxProperties.EditValueToPIDL(const AEditValue: TcxEditValue): PItemIDList; -begin - CheckRoot; - if VarIsNull(AEditValue) or VarIsEmpty(AEditValue) then - Result := nil - else - Result := PathToAbsolutePIDL(VarToStr(AEditValue), Root, GetShellViewOptions); -end; - -function TcxCustomShellComboBoxProperties.GetShellViewOptions: TcxShellViewOptions; -begin - Result := [svoShowFolders]; - if scvoShowFiles in FViewOptions then - Include(Result, svoShowFiles); - if scvoShowHidden in FViewOptions then - Include(Result, svoShowHidden); -end; - -procedure TcxCustomShellComboBoxProperties.RootChanged; -begin - Changed; -end; - -procedure TcxCustomShellComboBoxProperties.DoRootSettingsChanged; -begin - if Assigned(FOnRootSettingsChanged) then - FOnRootSettingsChanged(Self); -end; - -function TcxCustomShellComboBoxProperties.GetDropDownSizeable: Boolean; -begin - Result := PopupSizeable; -end; - -function TcxCustomShellComboBoxProperties.GetDropDownWidth: Integer; -begin - Result := PopupWidth; -end; - -procedure TcxCustomShellComboBoxProperties.RootChangeHandler(Sender: TObject); -begin - RootChanged; -end; - -procedure TcxCustomShellComboBoxProperties.RootSettingsChanged(Sender: TObject); -begin - DoRootSettingsChanged; -end; - -procedure TcxCustomShellComboBoxProperties.SetDropDownSizeable(Value: Boolean); -begin - PopupSizeable := Value; -end; - -procedure TcxCustomShellComboBoxProperties.SetDropDownWidth(Value: Integer); -begin - PopupWidth := Value; -end; - -procedure TcxCustomShellComboBoxProperties.SetFastSearch(Value: Boolean); -begin - if Value <> FFastSearch then - begin - FFastSearch := Value; - Changed; - end; -end; - -procedure TcxCustomShellComboBoxProperties.SetIncrementalSearch(Value: Boolean); -begin - if Value <> FIncrementalSearch then - begin - FIncrementalSearch := Value; - Changed; - end; -end; - -procedure TcxCustomShellComboBoxProperties.SetShowFullPath( - Value: TcxShellComboBoxShowFullPath); -begin - if Value <> FShowFullPath then - begin - FShowFullPath := Value; - Changed; - end; -end; - -procedure TcxCustomShellComboBoxProperties.SetStoreRelativePath(Value: Boolean); -begin - if Value <> FStoreRelativePath then - begin - FStoreRelativePath := Value; - Changed; - end; -end; - -procedure TcxCustomShellComboBoxProperties.SetTreeViewOptions(Value: TcxPopupShellTreeViewOptions); -begin - if Value <> FTreeViewOptions then - begin - FTreeViewOptions := Value; - Changed; - end; -end; - -procedure TcxCustomShellComboBoxProperties.SetViewOptions(Value: TcxShellComboBoxViewOptions); -begin - if Value <> FViewOptions then - begin - FViewOptions := Value; - Changed; - end; -end; - -{ TcxPopupShellTreeView } - -procedure TcxPopupShellTreeView.KeyDown(var Key: Word; Shift: TShiftState); -begin - if Key = VK_TAB then - Edit.DoEditKeyDown(Key, Shift); - inherited KeyDown(Key, Shift); - case Key of - VK_ESCAPE: - begin - DoSelectNode(crCancel); - Key := 0; - end; - VK_F4: - if not (ssAlt in Shift) then - begin - DoSelectNode(crClose); - Key := 0; - end; - VK_UP, VK_DOWN: - if ssAlt in Shift then - begin - DoSelectNode(crClose); - Key := 0; - end; - VK_RETURN: - if (Shift = []) and (InnerTreeView.Selected <> nil) then - DoSelectNode(crEnter); - end; -end; - -procedure TcxPopupShellTreeView.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - AHitTests : THitTests; -begin - inherited MouseUp(Button, Shift, X, Y); - AHitTests := InnerTreeView.GetHitTestInfoAt(X, Y); - if ((Button = mbLeft) and not RightClickSelect) or ((Button = mbRight) and RightClickSelect) then - if ([htOnIcon, htOnItem, htOnLabel] * AHitTests <> []) and (AHitTests <> [htOnIcon, htOnItem]) then - DoSelectNode(crEnter); -end; - -procedure TcxPopupShellTreeView.DoSelectNode(AClosePopupReason: TcxEditCloseUpReason); -begin - Edit.CloseUp(AClosePopupReason) -end; - -function TcxPopupShellTreeView.GetEdit: TcxCustomShellComboBox; -begin - Result := TcxCustomShellComboBox(TcxPopupEditPopupWindowAccess(Parent).Edit); -end; - -{ TcxShellComboBoxPopupWindow } - -procedure TcxShellComboBoxPopupWindow.WMEnable(var Message: TMessage); -begin - inherited; - if not IsInternalWindowsDisabling then - if Bool(Message.WParam) then - EnableAppWindows - else - DisableAppWindows; -end; - -{ TcxCustomShellComboBox } - -destructor TcxCustomShellComboBox.Destroy; -begin - if FAbsolutePIDL <> nil then - begin - DisposePidl(FAbsolutePIDL); - FAbsolutePIDL := nil; - end; - - if FShellListView <> nil then - with FShellListView do - if (InnerListView <> nil) and not(csDestroying in InnerListView.ComponentState) then - TcxInnerShellListViewAccess(InnerListView).ComboBoxControl := nil; - - if FShellTreeView <> nil then - with FShellTreeView do - if (InnerTreeView <> nil) and not(csDestroying in InnerTreeView.ComponentState) then - TcxInnerShellTreeViewAccess(InnerTreeView).ComboBoxControl := nil; - - inherited Destroy; -end; - -function TcxCustomShellComboBox.CanHide: Boolean; -begin - Result := not HasPopupWindow or IsWindowEnabled(PopupWindow.Handle); -end; - -class function TcxCustomShellComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomShellComboBoxProperties; -end; - -function TcxCustomShellComboBox.CanDropDown: Boolean; -begin - Result := True; -end; - -procedure TcxCustomShellComboBox.CloseUp(AReason: TcxEditCloseUpReason); -begin - if not HasPopupWindow then - Exit; - if AReason in [crTab, crEnter] then - begin - ValidateEdit(True); - SelectAll; - end; - FCloseUpReason := AReason; - PopupWindow.ClosePopup; -end; - -procedure TcxCustomShellComboBox.CreatePopupWindow; -begin - inherited CreatePopupWindow; - PopupWindow.ModalMode := False; -end; - -procedure TcxCustomShellComboBox.DoInitPopup; -begin - inherited DoInitPopup; - ActiveProperties.PopupControl := FPopupShellTreeView; -end; - -procedure TcxCustomShellComboBox.DropDown; -begin - FIsSelectedNodeChangeEventLocked := True; - inherited DropDown; -end; - -procedure TcxCustomShellComboBox.HandleSelectItem(Sender: TObject); -var - ANodeIndex: Integer; - APIDL: PItemIDList; -begin - ANodeIndex := ILookupData.CurrentKey; - APIDL := FPopupShellTreeView.GetNodeAbsolutePIDL(TraverseAllVisibleNodes(ANodeIndex)); - InternalSynchronizeEditValue(APIDL, ''); - DisposePidl(APIDL); - SelectAll; -end; - -procedure TcxCustomShellComboBox.Initialize; -begin - inherited Initialize; - ActiveProperties.Root.OnChange := RootChangeHandler; - ActiveProperties.Root.OnSettingsChanged := RootSettingsChanged; - if IsDesigning then - Exit; - FPopupShellTreeView := GetPopupShellTreeViewClass.Create(PopupWindow); - ActiveProperties.PopupControl := FPopupShellTreeView; - with FPopupShellTreeView do - begin - LookAndFeel.MasterLookAndFeel := Self.PopupControlsLookAndFeel; - ParentColor := True; - Parent := Self.PopupWindow; - Options.ShowNonFolders := False; - Style.BorderStyle := cbsNone; - Style.HotTrack := False; - Style.TransparentBorder := False; - TreeHotTrack := True; - InnerTreeView.ShowInfoTips := False; - OnAddFolder := Self.AddFolderHandler; - OnChange := Self.SelectedNodeChangeHandler; - end; -end; - -procedure TcxCustomShellComboBox.InitializePopupWindow; -begin - inherited InitializePopupWindow; - TcxPopupEditPopupWindowAccess(PopupWindow).SysPanelStyle := ActiveProperties.PopupSizeable; - PopupShellTreeView.Color := GetBackgroundColor; - PopupWindow.Font := VisibleFont; -end; - -procedure TcxCustomShellComboBox.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - - if Operation = opRemove then - if AComponent = ShellListView then - ShellListView := nil - else - if AComponent = ShellTreeView then - ShellTreeView := nil; -end; - -procedure TcxCustomShellComboBox.PopupWindowShowed(Sender: TObject); -begin - inherited PopupWindowShowed(Sender); - FPopupWindowShowing := False; -end; - -procedure TcxCustomShellComboBox.PopupWindowShowing(Sender: TObject); -var - ARootNode: TTreeNode; -begin - FPopupWindowShowing := True; - try - inherited PopupWindowShowing(Sender); - SynchronizePopupShellTreeView; - ARootNode := FPopupShellTreeView.InnerTreeView.Items.GetFirstNode; - if (ARootNode <> nil) and not ARootNode.Expanded then - ARootNode.Expanded := True; - finally - FIsSelectedNodeChangeEventLocked := False; - end; -end; - -procedure TcxCustomShellComboBox.PropertiesChanged(Sender: TObject); -begin - inherited PropertiesChanged(Sender); - ActiveProperties.PopupControl := FPopupShellTreeView; - if FPopupShellTreeView <> nil then - with FPopupShellTreeView do - begin - ImeMode := ActiveProperties.ImeMode; - ImeName := ActiveProperties.ImeName; - Options.ContextMenus := tvoContextMenus in ActiveProperties.TreeViewOptions; - Options.ShowHidden := scvoShowHidden in ActiveProperties.ViewOptions; - Options.ShowNonFolders := scvoShowFiles in ActiveProperties.ViewOptions; - Options.ShowToolTip := tvoShowToolTip in ActiveProperties.TreeViewOptions; - RightClickSelect := tvoRightClickSelect in ActiveProperties.TreeViewOptions; - ShowButtons := tvoShowButtons in ActiveProperties.TreeViewOptions; - ShowInfoTips := tvoShowInfoTips in ActiveProperties.TreeViewOptions; - ShowLines := tvoShowLines in ActiveProperties.TreeViewOptions; - ShowRoot := tvoShowRoot in ActiveProperties.TreeViewOptions; - TreeHotTrack := tvoHotTrack in ActiveProperties.TreeViewOptions - end; -end; - -procedure TcxCustomShellComboBox.SynchronizeDisplayValue; -var - APIDL: PItemIDList; - S: String; -begin - if DataBinding is TcxDBTextEditDataBinding then // TODO Remove cxDBEdit, IsDataSourceLive - with TcxDBTextEditDataBindingAccess(DataBinding) do - if not IsDataAvailable then - begin - ViewInfo.ShellSysIconIndex := -1; - Exit; - end; - - if VarIsNull(FEditValue) or VarIsEmpty(FEditValue) then - begin - ActiveProperties.CheckRoot; - APIDL := GetPidlCopy(ActiveProperties.Root.Pidl); - end - else - APIDL := ActiveProperties.EditValueToPIDL(FEditValue); - - InternalSetAbsolutePIDL(APIDL); - - if APIDL = nil then - begin - S := VarToStr(FEditValue); - ViewInfo.ShellSysIconIndex := -1; - end - else - begin - S := GetPIDLDisplayName(APIDL, (ActiveProperties.ShowFullPath = sfpAlways) or - (ActiveProperties.ShowFullPath = sfpNotFocused) and not IsFocused); - GetShellSysIconIndex(APIDL, ViewInfo.ShellSysIconIndex, - ViewInfo.ShellSysIconOverlayIndex); - DisposePidl(APIDL); - end; - - DataBinding.DisplayValue := S; -// SelStart := Length(S); - InvalidateShellIconRect; -end; - -procedure TcxCustomShellComboBox.SynchronizeEditValue; -var - APIDL: PItemIDList; - - function GetRootAbsolutePIDL: PItemIDList; - begin - Result := GetPidlCopy(ActiveProperties.Root.Pidl); - end; - - function GetSelectedNodeAbsolutePIDL: PItemIDList; - begin - with PopupShellTreeView do - Result := GetNodeAbsolutePIDL(InnerTreeView.Selected); - end; - - procedure InternalEditValueToPIDL; - var - ACSIDL: Integer; - ANode: TTreeNode; - AParentIFolder: IShellFolder; - AParentFolderPIDL: PItemIDList; - APath: string; - APathType: TcxShellObjectPathType; - AShellViewOptions: TcxShellViewOptions; - ATempPIDL: PItemIDList; - begin - APath := AnsiUpperCase(DisplayValue); - ActiveProperties.CheckRoot; - - if APath = '' then - begin - APIDL := GetRootAbsolutePIDL; - Exit; - end; - - if IsDesigning or (FPopupShellTreeView.InnerTreeView.Selected = nil) then - ATempPIDL := GetRootAbsolutePIDL - else - ATempPIDL := GetSelectedNodeAbsolutePIDL; - try - APathType := CheckShellObjectPath(APath, - AnsiUpperCase(GetPidlName(ATempPIDL)), True); - finally - DisposePidl(ATempPIDL); - end; - - APIDL := nil; - AShellViewOptions := ActiveProperties.GetShellViewOptions; - repeat - case APathType of - sptAbsolutePhysical, sptUNC, sptVirtual: - APIDL := InternalParseDisplayName(GetDesktopIShellFolder, APath, - AShellViewOptions); - sptInternalAbsoluteVirtual, sptInternalRelativeVirtual: - APIDL := ShellObjectInternalVirtualPathToPIDL(APath, ActiveProperties.Root, - AShellViewOptions); - sptRelativePhysical: - begin - if IsDesigning or (FPopupShellTreeView.InnerTreeView.Selected = nil) then - begin - AParentFolderPIDL := GetRootAbsolutePIDL; - AParentIFolder := ActiveProperties.Root.ShellFolder; - end - else - begin - AParentFolderPIDL := GetSelectedNodeAbsolutePIDL; - if APath = AnsiUpperCase(FPopupShellTreeView.InnerTreeView.Selected.Text) then - begin - APIDL := AParentFolderPIDL; - Break; - end; - GetDesktopIShellFolder.BindToObject(AParentFolderPIDL, nil, - IID_IShellFolder, Pointer(AParentIFolder)); - end; - if AParentIFolder <> nil then - begin - APIDL := InternalParseDisplayName(AParentIFolder, APath, - AShellViewOptions); - if APIDL <> nil then - begin - ATempPIDL := APIDL; - APIDL := ConcatenatePidls(AParentFolderPIDL, APIDL); - DisposePidl(ATempPIDL); - end; - DisposePidl(AParentFolderPIDL); - if APIDL <> nil then - Break; - end; - - if not IsDesigning then - begin - ANode := FindNodeAmongExpandedNodes(APath); - if ANode <> nil then - begin - APIDL := FPopupShellTreeView.GetNodeAbsolutePIDL(ANode); - Break; - end; - end; - - for ACSIDL := CSIDL_DESKTOP to CSIDL_HISTORY do - with cxShellSpecialFolderInfoTable[ACSIDL] do - if (PIDL <> nil) and (PIDLUpperCaseDisplayName = APath) and - CheckViewOptions(AShellViewOptions, Attributes) then - begin - APIDL := GetPidlCopy(PIDL); - Break; - end; - end; - end; - until True; - - if (APIDL <> nil) and not IsSubPath(ActiveProperties.Root.Pidl, APIDL) then - begin - DisposePidl(APIDL); - APIDL := nil; - end; - end; - -begin - if DataBinding is TcxDBTextEditDataBinding then // TODO Remove cxDBEdit, IsDataSourceLive - with TcxDBTextEditDataBindingAccess(DataBinding) do - if not IsDataAvailable then - begin - ViewInfo.ShellSysIconIndex := -1; - Exit; - end; - InternalEditValueToPIDL; - InternalSynchronizeEditValue(APIDL, DisplayValue); - DisposePidl(APIDL); -end; - -function TcxCustomShellComboBox.CheckAbsolutePIDL(var APIDL: PItemIDList; - ACheckObjectExistence: Boolean): Boolean; -begin - ActiveProperties.CheckRoot; - if APIDL = nil then - begin - Result := True; - APIDL := ActiveProperties.Root.Pidl; - end - else - begin - Result := IsSubPath(ActiveProperties.Root.Pidl, APIDL); - if Result and ACheckObjectExistence then - Result := CheckShellObjectExistence(APIDL); - end; -end; - -procedure TcxCustomShellComboBox.CheckPopupShellTreeView; -var - ARootNode: TTreeNode; -begin - if (FPopupShellTreeView = nil) or (FPopupShellTreeView.InnerTreeView = nil) or - (FPopupShellTreeView.InnerTreeView.Items.Count = 0) then - Exit; - - ARootNode := FPopupShellTreeView.InnerTreeView.Items[0]; - if not ARootNode.Expanded then - ARootNode.Expanded := True; -end; - -function TcxCustomShellComboBox.FindNodeAmongExpandedNodes(ANodeText: string): TTreeNode; - - function InternalFindPIDLAmongExpandedNodes(ANode: TTreeNode): TTreeNode; - var - AChildNode: TTreeNode; - begin - Result := nil; - if ANode = nil then - Exit; - if ANodeText = AnsiUpperCase(ANode.Text) then - begin - Result := ANode; - Exit; - end; - if not ANode.Expanded then - Exit; - AChildNode := ANode.GetFirstChild; - while AChildNode <> nil do - begin - Result := InternalFindPIDLAmongExpandedNodes(AChildNode); - if Result <> nil then - Break; - AChildNode := ANode.GetNextChild(AChildNode); - end; - end; - -begin - ANodeText := AnsiUpperCase(ANodeText); - with FPopupShellTreeView.InnerTreeView do - if (Selected <> nil) and (ANodeText = AnsiUpperCase(Selected.Text)) then - Result := Selected - else - Result := InternalFindPIDLAmongExpandedNodes(Items.GetFirstNode); -end; - -function TcxCustomShellComboBox.GetPopupShellTreeViewClass: TcxPopupShellTreeViewClass; -begin - Result := TcxPopupShellTreeView; -end; - -procedure TcxCustomShellComboBox.InternalSetAbsolutePIDL(Value: PItemIDList); -begin - if not EqualPIDLs(FAbsolutePIDL, Value) then - begin - if FAbsolutePIDL <> nil then - FreeAndNilPIDL(FAbsolutePIDL); - if Value <> nil then - begin - FAbsolutePIDL := GetPidlCopy(Value); - SynchronizeDependentShellControls; - end; - end; -end; - -procedure TcxCustomShellComboBox.InternalSynchronizeEditValue(APIDL: PItemIDList; - const ADisplayText: string = ''); -var - APIDLName: string; - - function UseInternalVirtualPathFormat: Boolean; - var - AShellSysIconIndex1, AShellSysIconOverlayIndex1: Integer; - AShellSysIconIndex2, AShellSysIconOverlayIndex2: Integer; - ATempPIDL: PItemIDList; - begin - APIDLName := GetPidlName(APIDL); - Result := APIDLName = ''; - if not Result then - begin - ATempPIDL := InternalParseDisplayName(GetDesktopIShellFolder, APIDLName, - ActiveProperties.GetShellViewOptions); - try - GetShellSysIconIndex(APIDL, AShellSysIconIndex1, AShellSysIconOverlayIndex1); - GetShellSysIconIndex(ATempPIDL, AShellSysIconIndex2, AShellSysIconOverlayIndex2); - Result := (AShellSysIconIndex1 <> AShellSysIconIndex2) or - (AShellSysIconOverlayIndex1 <> AShellSysIconOverlayIndex2); - finally - DisposePidl(ATempPIDL); - end; - end; - end; - -var - AIsEditValueChanged: Boolean; - ANewEditValue: string; - AParentIFolder: IShellFolder; - AStrRet: TStrRet; - ATempPIDL, ATempPIDL1: PItemIDList; - I: Integer; - S1, S2: string; -begin - InternalSetAbsolutePIDL(APIDL); - - if APIDL = nil then - begin - ViewInfo.ShellSysIconIndex := -1; - S1 := ADisplayText; - ANewEditValue := DisplayValue; - end - else - begin - if ActiveProperties.StoreRelativePath and EqualPIDLs(ActiveProperties.Root.Pidl, APIDL) then - begin - ANewEditValue := ''; - S1 := GetPIDLDisplayName(APIDL, (ActiveProperties.ShowFullPath = sfpAlways) or - (ActiveProperties.ShowFullPath = sfpNotFocused) and not IsFocused); - end - else - if UseInternalVirtualPathFormat then - begin - ATempPIDL := APIDL; - try - if ActiveProperties.StoreRelativePath then - begin - Integer(APIDL) := Integer(APIDL) + GetPidlSize(ActiveProperties.Root.Pidl); - S2 := cxShellObjectInternalRelativeVirtualPathPrefix; - AParentIFolder := ActiveProperties.Root.ShellFolder; - end - else - begin - S2 := cxShellObjectInternalAbsoluteVirtualPathPrefix; - AParentIFolder := GetDesktopIShellFolder; - end; - for I := 1 to GetPidlItemsCount(APIDL) do - begin - ATempPIDL1 := cxMalloc.Alloc(APIDL^.mkid.cb + SizeOf(SHITEMID)); - FillChar(ATempPIDL1^, APIDL^.mkid.cb + SizeOf(SHITEMID), 0); - CopyMemory(ATempPIDL1, APIDL, APIDL^.mkid.cb); - Integer(APIDL) := Integer(APIDL) + APIDL^.mkid.cb; - AParentIFolder.GetDisplayNameOf(ATempPIDL1, SHGDN_INFOLDER, AStrRet); - S1 := GetTextFromStrRet(AStrRet, ATempPIDL1); - S2 := S2 + '\' + S1; - AParentIFolder.BindToObject(ATempPIDL1, nil, IID_IShellFolder, - Pointer(AParentIFolder)); - DisposePidl(ATempPIDL1); - end; - ANewEditValue := S2; - finally - APIDL := ATempPIDL; - end; - end - else - begin - if ActiveProperties.StoreRelativePath then - begin - S1 := GetPidlName(ActiveProperties.Root.Pidl); - S2 := GetPidlName(APIDL); - if Pos(S1, S2) = 1 then - begin - if S1[Length(S1)] = '\' then - S1 := Copy(S2, Length(S1) + 1, Length(S2) - Length(S1)) - else - S1 := Copy(S2, Length(S1) + 2, Length(S2) - Length(S1) - 1); - if (Length(S1) >= 1) and (S1[1] = '\') then - S1 := Copy(S1, 2, Length(S1) - 1); - ANewEditValue := S1; - end - else - ANewEditValue := GetPidlName(APIDL); - end - else - ANewEditValue := APidlName; - S1 := GetPIDLDisplayName(APIDL, (ActiveProperties.ShowFullPath = sfpAlways) or - (ActiveProperties.ShowFullPath = sfpNotFocused) and not IsFocused); - end; - GetShellSysIconIndex(APIDL, ViewInfo.ShellSysIconIndex, - ViewInfo.ShellSysIconOverlayIndex); - end; - - AIsEditValueChanged := (VarType(FEditValue) <> VarType(ANewEditValue)) or - not VarEqualsExact(FEditValue, ANewEditValue); - FEditValue := ANewEditValue; - - DataBinding.DisplayValue := S1; -// SelStart := Length(S1); - InvalidateShellIconRect; - - if AIsEditValueChanged then - DoEditValueChanged; -end; - -procedure TcxCustomShellComboBox.InvalidateShellIconRect; -begin - with ViewInfo.ShellIconPosition do - InvalidateRect(Rect(X, Y, X + cxShellComboBoxImageList.Width, Y + - cxShellComboBoxImageList.Height), False); -end; - -procedure TcxCustomShellComboBox.SelectedNodeChangeHandler(Sender: TObject; - ANode: TTreeNode); -var - ANodeIndex: Integer; -begin - if (not HasPopupWindow) and not FNotificationFromDependentShellControls then - Exit; - - ANodeIndex := -1; - TraverseAllVisibleNodes(ANodeIndex, ANode); - TcxShellComboBoxLookupData(FLookupData).InternalSetCurrentKey(ANodeIndex); - - if FIsSelectedNodeChangeEventLocked or (not FPopupWindowShowing and - not DataBinding.Modified and not DoEditing) then - Exit; - - DataBinding.DisplayValue := - GetPIDLDisplayName(FPopupShellTreeView.GetNodeAbsolutePIDL(ANode), - ActiveProperties.ShowFullPath = sfpAlways); - if FPopupWindowShowing then - ModifiedAfterEnter := False - else - if IsFocused then - ModifiedAfterEnter := True; - SelStart := Length(DataBinding.DisplayValue); - ViewInfo.ShellSysIconIndex := ANode.ImageIndex; - ViewInfo.ShellSysIconOverlayIndex := ANode.OverlayIndex; - InvalidateShellIconRect; - - if ActiveProperties.ImmediatePost and CanPostEditValue and ValidateEdit(True) then - InternalPostEditValue; -end; - -procedure TcxCustomShellComboBox.SynchronizeDependentShellControls; -var - ATempPIDL: PItemIDList; -begin - if FIsDependentShellControlsNotification or FNotificationFromDependentShellControls then - Exit; - FIsDependentShellControlsNotification := True; - try - if FAbsolutePIDL = nil then - Exit; - ATempPIDL := GetPidlCopy(FAbsolutePIDL); - try - if (FShellTreeView <> nil) and FShellTreeView.HandleAllocated then - SendMessage(FShellTreeView.InnerTreeView.Handle, DSM_DONAVIGATE, - Integer(ATempPIDL), 0); - - if FShellListView <> nil then - FShellListView.ProcessTreeViewNavigate(ATempPIDL); - - SynchronizePopupShellTreeView; - finally - DisposePidl(ATempPIDL); - end; - finally - FIsDependentShellControlsNotification := False; - end; -end; - -procedure TcxCustomShellComboBox.SynchronizePopupShellTreeView; -begin - if FAbsolutePIDL = nil then - Exit; - - if not IsDesigning and (FPopupShellTreeView <> nil) and (HasPopupWindow(* or not IsInplace*)) then - with FPopupShellTreeView do - if (Parent <> nil) and Parent.HandleAllocated and (InnerTreeView <> nil) then - begin - InnerTreeView.HandleNeeded; - SendMessage(InnerTreeView.Handle, DSM_DONAVIGATE, WPARAM(FAbsolutePIDL), 0); - end; -end; - -function TcxCustomShellComboBox.TraverseAllVisibleNodes(var ANodeIndex: Integer; - ATreeNode: TTreeNode = nil): TTreeNode; -var - ANodeCount: Integer; - - function InternalTraverseAllVisibleNodes(ANode: TTreeNode): TTreeNode; - var - AChildNode: TTreeNode; - begin - Result := nil; - if ANode = nil then - Exit; - if (ANodeCount = ANodeIndex) or (ANode = ATreeNode) then - begin - Result := ANode; - Exit; - end; - Inc(ANodeCount); - if not ANode.Expanded then - Exit; - AChildNode := ANode.GetFirstChild; - while AChildNode <> nil do - begin - Result := InternalTraverseAllVisibleNodes(AChildNode); - if Result <> nil then - Break; - AChildNode := ANode.GetNextChild(AChildNode); - end; - end; - -begin - CheckPopupShellTreeView; - ANodeCount := 0; - if FPopupShellTreeView = nil then - Result := nil - else - with FPopupShellTreeView.InnerTreeView do - Result := InternalTraverseAllVisibleNodes(Items.GetFirstNode); - ANodeIndex := ANodeCount; -end; - -procedure TcxCustomShellComboBox.AddFolderHandler(Sender: TObject; - AFolder: TcxShellFolder; var ACanAdd: Boolean); - - procedure DoAddFolder(AProperties: TcxCustomShellComboBoxProperties); - begin - with AProperties do - if Assigned(OnAddFolder) then - OnAddFolder(Self, AFolder, ACanAdd); - end; - -begin - DoAddFolder(Properties); - if ACanAdd and (RepositoryItem <> nil) then - DoAddFolder(ActiveProperties); -end; - -function TcxCustomShellComboBox.GetAbsolutePIDL: PItemIDList; -begin - Result := GetPidlCopy(FAbsolutePIDL); -end; - -function TcxCustomShellComboBox.GetActiveProperties: TcxCustomShellComboBoxProperties; -begin - Result := TcxCustomShellComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxCustomShellComboBox.GetPath: string; -begin - if FAbsolutePIDL = nil then - Result := '' - else - Result := GetPidlName(FAbsolutePIDL); -end; - -function TcxCustomShellComboBox.GetProperties: TcxCustomShellComboBoxProperties; -begin - Result := TcxCustomShellComboBoxProperties(FProperties); -end; - -(*function TcxCustomShellComboBox.GetRelativePath: string; -begin -end;*) - -function TcxCustomShellComboBox.GetViewInfo: TcxShellComboBoxViewInfo; -begin - Result := TcxShellComboBoxViewInfo(FViewInfo); -end; - -procedure TcxCustomShellComboBox.RootChangeHandler(Sender: TObject); -begin - if not IsDesigning then - FPopupShellTreeView.Root.Assign(ActiveProperties.Root); - if not ActiveProperties.ChangedLocked and not ModifiedAfterEnter then - SynchronizeDisplayValue; -end; - -procedure TcxCustomShellComboBox.RootSettingsChanged(Sender: TObject); -begin - if IsLoading then - Exit; - if (ShellListView <> nil) and ShellListView.HandleAllocated then - SendMessage(ShellListView.InnerListView.Handle, DSM_SYNCHRONIZEROOT, - Integer(ActiveProperties.Root), 0); - if (ShellTreeView <> nil) and ShellTreeView.HandleAllocated then - SendMessage(ShellTreeView.InnerTreeView.Handle, DSM_SYNCHRONIZEROOT, - Integer(ActiveProperties.Root), 0); -end; - -procedure TcxCustomShellComboBox.SetAbsolutePIDL(Value: PItemIDList); -begin - if not CheckAbsolutePIDL(Value, True) then - Exit; - InternalSynchronizeEditValue(Value); -end; - -procedure TcxCustomShellComboBox.SetPath(const Value: string); -begin - InternalEditValue := Value; -end; - -procedure TcxCustomShellComboBox.SetProperties(Value: TcxCustomShellComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomShellComboBox.SetRelativePIDL(Value: PItemIDList); -var - ATempPIDL: PItemIDList; -begin - ActiveProperties.CheckRoot; - if Value = nil then - InternalSynchronizeEditValue(ActiveProperties.Root.Pidl) - else - begin - ATempPIDL := ConcatenatePidls(ActiveProperties.Root.Pidl, Value); - try - if CheckShellObjectExistence(ATempPIDL) then - InternalSynchronizeEditValue(ATempPIDL); - finally - DisposePidl(ATempPIDL); - end; - end; -end; - -(*procedure TcxCustomShellComboBox.SetRelativePath(const Value: string); -begin -end;*) - -procedure TcxCustomShellComboBox.SetShellListView(Value: TcxCustomShellListView); -begin - if Value = FShellListView then - Exit; - if FShellListView <> nil then - begin - if (FShellListView.InnerListView <> nil) and not(csDestroying in FShellListView.InnerListView.ComponentState) then - TcxInnerShellListViewAccess(FShellListView.InnerListView).ComboBoxControl := nil; -{$IFDEF DELPHI5} - FShellListView.RemoveFreeNotification(Self); -{$ENDIF} - end; - FShellListView := Value; - if FShellListView <> nil then - begin - FShellListView.FreeNotification(Self); - TcxInnerShellListViewAccess(FShellListView.InnerListView).ComboBoxControl := Self; - end; -end; - -procedure TcxCustomShellComboBox.SetShellTreeView(Value: TcxCustomShellTreeView); -begin - if Value = FShellTreeView then - Exit; - if FShellTreeView <> nil then - begin - if (FShellTreeView.InnerTreeView <> nil) and not(csDestroying in FShellTreeView.InnerTreeView.ComponentState) then - TcxInnerShellTreeViewAccess(FShellTreeView.InnerTreeView).ComboBoxControl := nil; -{$IFDEF DELPHI5} - FShellTreeView.RemoveFreeNotification(Self); -{$ENDIF} - end; - FShellTreeView := Value; - if FShellTreeView <> nil then - begin - FShellTreeView.FreeNotification(Self); - TcxInnerShellTreeViewAccess(FShellTreeView.InnerTreeView).ComboBoxControl := Self; - end; -end; - -procedure TcxCustomShellComboBox.DSMDoNavigate(var Message: TMessage); -var - APIDL: PItemIDList; -begin - if FIsDependentShellControlsNotification or FNotificationFromDependentShellControls then - Exit; - FNotificationFromDependentShellControls := True; - try - if FShellTreeView <> nil then - APIDL := FShellTreeView.AbsolutePIDL - else if FShellListView <> nil then - APIDL := FShellListView.AbsolutePIDL - else - APIDL := PItemIDList(Message.WParam); - if not CheckAbsolutePIDL(APIDL, False) then - Exit; - if not IsDesigning and (FPopupShellTreeView <> nil) then - with FPopupShellTreeView do - if (Parent <> nil) and Parent.HandleAllocated and (InnerTreeView <> nil) then - begin - InnerTreeView.HandleNeeded; - SendMessage(InnerTreeView.Handle, DSM_DONAVIGATE, WPARAM(APIDL), 0); - SynchronizeEditValue; - Exit; - end; - - InternalSynchronizeEditValue(APIDL); - finally - FNotificationFromDependentShellControls := False; - end; -end; - -procedure TcxCustomShellComboBox.DSMSynchronizeRoot(var Message: TMessage); -begin - if not IsLoading then - ActiveProperties.Root.Update(TcxCustomShellRoot(Message.WParam)); -end; - -{ TcxShellComboBox } - -class function TcxShellComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxShellComboBoxProperties; -end; - -function TcxShellComboBox.GetActiveProperties: TcxShellComboBoxProperties; -begin - Result := TcxShellComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxShellComboBox.GetProperties: TcxShellComboBoxProperties; -begin - Result := TcxShellComboBoxProperties(FProperties); -end; - -procedure TcxShellComboBox.SetProperties(Value: TcxShellComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -initialization - GetRegisteredEditProperties.Register(TcxShellComboBoxProperties, scxSEditRepositoryShellComboBoxItem); - FilterEditsController.Register(TcxShellComboBoxProperties, TcxFilterShellComboBoxHelper); - PrepareShellComboBoxImageList; - -finalization - FreeAndNil(cxShellComboBoxImageList); - FilterEditsController.Unregister(TcxShellComboBoxProperties, TcxFilterShellComboBoxHelper); - GetRegisteredEditProperties.Unregister(TcxShellComboBoxProperties); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxShellCommon.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxShellCommon.pas deleted file mode 100644 index 59fbba61..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxShellCommon.pas +++ /dev/null @@ -1,2921 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxShellCommon; - -{$I cxVer.inc} - -interface - -uses -{$IFNDEF DELPHI6} - Mask, -{$ELSE} - MaskUtils, -{$ENDIF} - Windows, ActiveX, Classes, ComObj, Controls, Dialogs, Forms, Math, Messages, - ShellApi, ShlObj, SyncObjs, SysUtils; - -resourcestring - SShellDefaultNameStr = 'Name'; - SShellDefaultSizeStr = 'Size'; - SShellDefaultTypeStr = 'Type'; - SShellDefaultModifiedStr = 'Modified'; - -const - cxShellObjectInternalAbsoluteVirtualPathPrefix = '::{9C211B58-E6F1-456A-9F22-7B3B418A7BB1}'; - cxShellObjectInternalRelativeVirtualPathPrefix = '::{63BE9ADB-E4B5-4623-96AA-57440B4EF5A8}'; - cxShellObjectInternalVirtualPathPrefixLength = 40; - - cxSFGAO_GHOSTED = $00008000; // Error in ShlObj.pas - - {$IFNDEF DELPHI6} - SID_IShellFolder2 = '{93F2F68C-1D1B-11D3-A30E-00C04F79ABD1}'; - SID_IEnumExtraSearch = '{0E700BE1-9DB6-11D1-A1CE-00C04FD75D13}'; - SID_IShellDetails = '{000214EC-0000-0000-C000-000000000046}'; - - {IShellFolder2.GetDefaultColumnState Values} - SHCOLSTATE_TYPE_STR = $00000001; - SHCOLSTATE_TYPE_INT = $00000002; - SHCOLSTATE_TYPE_DATE = $00000003; - SHCOLSTATE_TYPEMASK = $0000000F; - SHCOLSTATE_ONBYDEFAULT = $00000010; // should on by default in details view - SHCOLSTATE_SLOW = $00000020; // will be slow to compute; do on a background thread - SHCOLSTATE_EXTENDED = $00000040; // provided by a handler; not the folder - SHCOLSTATE_SECONDARYUI = $00000080; // not displayed in context menu; but listed in the "More..." dialog - SHCOLSTATE_HIDDEN = $00000100; // not displayed in the UI - - {$EXTERNALSYM IID_IShellDetails} - IID_IShellDetails: TGUID = ( - D1:$000214EC; D2:$0000; D3:$0000; D4:($C0,$00,$00,$00,$00,$00,$00,$46)); - {$ENDIF} - -// Interface declarations, that missed in D4 and D5 versions - -{$IFDEF BCB} -(*$HPPEMIT '#include '*) - {$IFNDEF DELPHI6} -(*$HPPEMIT '#if !defined(NO_WIN32_LEAN_AND_MEAN)'*) -(*$HPPEMIT 'typedef struct _STRRET'*) -(*$HPPEMIT '{'*) -(*$HPPEMIT ' UINT uType;'*) -(*$HPPEMIT ' union'*) -(*$HPPEMIT ' {'*) -(*$HPPEMIT ' LPWSTR pOleStr;'*) -(*$HPPEMIT ' LPSTR pStr;'*) -(*$HPPEMIT ' UINT uOffset;'*) -(*$HPPEMIT ' char cStr[MAX_PATH];'*) -(*$HPPEMIT ' } DUMMYUNIONNAME;'*) -(*$HPPEMIT '} STRRET, *LPSTRRET;'*) -(*$HPPEMIT '#endif'*) - {$ENDIF} -{$ENDIF} - -{$IFNDEF DELPHI6} -type - {$EXTERNALSYM PExtraSearch} - PExtraSearch = ^TExtraSearch; - {$EXTERNALSYM tagExtraSearch} - tagExtraSearch = record - guidSearch: TGUID; - wszFriendlyName, - wszMenuText: array[0..79] of WideChar; - wszHelpText: array[0..MAX_PATH] of WideChar; - wszUrl: array[0..2047] of WideChar; - wszIcon, - wszGreyIcon, - wszClrIcon: array[0..MAX_PATH+10] of WideChar; - end; - {$EXTERNALSYM TExtraSearch} - TExtraSearch = tagExtraSearch; - - {$EXTERNALSYM IEnumExtraSearch} - IEnumExtraSearch = interface - [SID_IEnumExtraSearch] - function Next(celt: ULONG; out rgelt: PExtraSearch; - out pceltFetched: ULONG): HResult; stdcall; - function Skip(celt: ULONG): HResult; stdcall; - function Reset: HResult; stdcall; - function Clone(out ppEnum: IEnumExtraSearch): HResult; stdcall; - end; - - {$EXTERNALSYM PShColumnID} - PShColumnID = ^TShColumnID; - {$EXTERNALSYM SHCOLUMNID} - SHCOLUMNID = record - fmtid: TGUID; - pid: DWORD; - end; - {$EXTERNALSYM TShColumnID} - TShColumnID = SHCOLUMNID; - - { IShellDetails is supported on Win9x and NT4; for >= NT5 use IShellFolder2 } - _SHELLDETAILS = record - fmt, - cxChar: Integer; - str: STRRET; - end; - {$EXTERNALSYM SHELLDETAILS} - SHELLDETAILS = _SHELLDETAILS; - TShellDetails = _SHELLDETAILS; - PShellDetails = ^TShellDetails; - - IShellDetails = interface - [SID_IShellDetails] - function GetDetailsOf(pidl: PItemIDList; iColumn: UINT; - var pDetails: TShellDetails): HResult; stdcall; - function ColumnClick(iColumn: UINT): HResult; stdcall; - end; - - {$EXTERNALSYM IShellFolder2} - IShellFolder2 = interface(IShellFolder) - [SID_IShellFolder2] - function GetDefaultSearchGUID(out pguid: TGUID): HResult; stdcall; - function EnumSearches(out ppEnum: IEnumExtraSearch): HResult; stdcall; - function GetDefaultColumn(dwRes: DWORD; var pSort: ULONG; - var pDisplay: ULONG): HResult; stdcall; - function GetDefaultColumnState(iColumn: UINT; var pcsFlags: DWORD): HResult; stdcall; - function GetDetailsEx(pidl: PItemIDList; const pscid: SHCOLUMNID; - pv: POleVariant): HResult; stdcall; - function GetDetailsOf(pidl: PItemIDList; iColumn: UINT; - var psd: TShellDetails): HResult; stdcall; - function MapNameToSCID(pwszName: LPCWSTR; var pscid: TShColumnID): HResult; stdcall; - end; -{$ENDIF} - -// cxShell common classes -type - ITEMIDLISTARRAY = array [0..MaxInt div SizeOf(PItemIDList) - 1] of PItemIDList; - PITEMIDLISTARRAY = ^ITEMIDLISTARRAY; - - TcxBrowseFolder =(bfCustomPath, bfAltStartup, bfBitBucket, - bfCommonDesktopDirectory, bfCommonDocuments, bfCommonFavorites, - bfCommonPrograms, bfCommonStartMenu, bfCommonStartup, bfCommonTemplates, - bfControls, bfDesktop, bfDesktopDirectory, bfDrives, bfPrinters, - bfFavorites, bfFonts, bfHistory, bfMyMusic, bfMyPictures, bfNetHood, - bfProfile, bfProgramFiles, bfPrograms, bfRecent, bfStartMenu, bfStartUp, - bfTemplates); - - TcxDropEffect = (deCopy, deMove, deLink); - TcxDropEffectSet = set of TcxDropEffect; - - TcxCustomItemProducer = class; - - IcxDropSource = interface(IDropSource) - ['{FCCB8EC5-ABB4-4256-B34C-25E3805EA046}'] - end; - - TcxDropSource=class(TInterfacedObject, IcxDropSource) - private - FOwner: TWinControl; - protected - function QueryContinueDrag(fEscapePressed: BOOL; - grfKeyState: Longint): HResult; stdcall; - function GiveFeedback(dwEffect: Longint): HResult; stdcall; - public - constructor Create(AOwner:TWinControl);virtual; - property Owner:TWinControl read FOwner; - end; - - { TcxShellOptions } - - TcxShellOptions = class(TPersistent) - private - FContextMenus: Boolean; - FOwner: TWinControl; - FShowFolders: Boolean; - FShowToolTip: Boolean; - FShowNonFolders: Boolean; - FShowHidden: Boolean; - FTrackShellChanges: Boolean; - FOnShowToolTipChanged: TNotifyEvent; - procedure SetShowFolders(Value: Boolean); - procedure SetShowHidden(Value: Boolean); - procedure SetShowNonFolders(Value: Boolean); - procedure SetShowToolTip(Value: Boolean); - procedure NotifyUpdateContents; - protected - property OnShowToolTipChanged: TNotifyEvent read FOnShowToolTipChanged - write FOnShowToolTipChanged; - public - constructor Create(AOwner: TWinControl); virtual; - procedure Assign(Source: TPersistent); override; - function GetEnumFlags: Cardinal; - property Owner: TWinControl read FOwner; - published - property ShowFolders: Boolean read FShowFolders write SetShowFolders default True; - property ShowNonFolders: Boolean read FShowNonFolders write SetShowNonFolders default True; - property ShowHidden: Boolean read FShowHidden write SetShowHidden default False; - property ContextMenus: Boolean read FContextMenus write FContextMenus default True; - property TrackShellChanges: Boolean read FTrackShellChanges write FTrackShellChanges default True; - property ShowToolTip: Boolean read FShowToolTip write SetShowToolTip default True; - end; - - TcxDetailItem = record - Text: string; - Width: Integer; - Alignment: TAlignment; - ID: Integer; - end; - - TcxRequestItem = record - ItemIndex: Integer; - ItemProducer: TcxCustomItemProducer; - Priority: Boolean; - end; - - PcxRequestItem=^TcxRequestItem; - - PcxDetailItem=^TcxDetailItem; - - TcxShellDetails=class - private - FItems: TList; - function GetItems(Index: Integer): PcxDetailItem; - function GetCount: Integer; - protected - property Items:TList read FItems; - public - constructor Create; - destructor Destroy;override; - procedure ProcessDetails(ACharWidth: Integer; AShellFolder: IShellFolder; - AFileSystem: Boolean); - procedure Clear; - function Add:PcxDetailItem; - procedure Remove(Item:PcxDetailItem); - property Item[Index:Integer]:PcxDetailItem read GetItems;default; - property Count:Integer read GetCount; - end; - - { TcxShellFolder } - - TcxShellFolderAttribute = (sfaGhosted, sfaHidden, sfaIsSlow, sfaLink, - sfaReadOnly, sfaShare); - TcxShellFolderAttributes = set of TcxShellFolderAttribute; - - TcxShellFolderCapability = (sfcCanCopy, sfcCanDelete, sfcCanLink, sfcCanMove, - sfcCanRename, sfcDropTarget, sfcHasPropSheet); - TcxShellFolderCapabilities = set of TcxShellFolderCapability; - - TcxShellFolderProperty = (sfpBrowsable, sfpCompressed, sfpEncrypted, - sfpNewContent, sfpNonEnumerated, sfpRemovable); - TcxShellFolderProperties = set of TcxShellFolderProperty; - - TcxShellFolderStorageCapability = (sfscFileSysAncestor, sfscFileSystem, - sfscFolder, sfscLink, sfscReadOnly, sfscStorage, sfscStorageAncestor, - sfscStream); - TcxShellFolderStorageCapabilities = set of TcxShellFolderStorageCapability; - - TcxShellFolder = class - private - FAbsolutePIDL: PItemIDList; - FParentShellFolder: IShellFolder; - FRelativePIDL: PItemIDList; - function GetAttributes: TcxShellFolderAttributes; - function GetCapabilities: TcxShellFolderCapabilities; - function GetDisplayName: string; - function GetIsFolder: Boolean; - function GetPathName: string; - function GetProperties: TcxShellFolderProperties; - function GetShellAttributes(ARequestedAttributes: LongWord): LongWord; - function GetShellFolder: IShellFolder; - function GetStorageCapabilities: TcxShellFolderStorageCapabilities; - function GetSubFolders: Boolean; - function HasShellAttribute(AAttribute: LongWord): Boolean; overload; - function HasShellAttribute(AAttributes, AAttribute: LongWord): Boolean; overload; - function InternalGetDisplayName(AFolder: IShellFolder; APIDL: PItemIDList; - ANameType: DWORD): string; - public - constructor Create(AAbsolutePIDL: PItemIDList); - destructor Destroy; override; - - property Attributes: TcxShellFolderAttributes read GetAttributes; - property Capabilities: TcxShellFolderCapabilities read GetCapabilities; - property IsFolder: Boolean read GetIsFolder; - property Properties: TcxShellFolderProperties read GetProperties; - property StorageCapabilities: TcxShellFolderStorageCapabilities - read GetStorageCapabilities; - property SubFolders: Boolean read GetSubFolders; - - property AbsolutePIDL: PItemIDList read FAbsolutePIDL; - property DisplayName: string read GetDisplayName; - property ParentShellFolder: IShellFolder read FParentShellFolder; - property PathName: string read GetPathName; - property RelativePIDL: PItemIDList read FRelativePIDL; - property ShellFolder: IShellFolder read GetShellFolder; - end; - - TcxCustomShellRoot=class(TPersistent) - private - FAttributes: Cardinal; - FBrowseFolder: TcxBrowseFolder; - FCustomPath: WideString; - FFolder: TcxShellFolder; - FIsRootChecking: Boolean; - FOwner: TPersistent; - FParentWindow: HWND; - FPidl: PItemIDList; - FRootChangingCount: Integer; - FShellFolder: IShellFolder; - FUpdating: Boolean; - FValid: Boolean; - FOnSettingsChanged: TNotifyEvent; - procedure SetBrowseFolder(Value: TcxBrowseFolder); - procedure SetCustomPath(const Value: WideString); - procedure SetPidl(const Value: PItemIDList); - function GetCurrentPath: WideString; - procedure UpdateFolder; - protected - procedure CheckRoot; virtual; - procedure DoSettingsChanged; - procedure RootUpdated; virtual; - property Owner: TPersistent read FOwner; - property ParentWindow: HWND read FParentWindow; - public - constructor Create(AOwner: TPersistent; AParentWindow: HWND); virtual; - destructor Destroy;override; - procedure Assign(Source: TPersistent); override; - procedure Update(ARoot: TcxCustomShellRoot); - property Attributes:Cardinal read FAttributes; - property CurrentPath:WideString read GetCurrentPath; - property Folder: TcxShellFolder read FFolder; - property IsValid:Boolean read FValid; - property Pidl:PItemIDList read FPidl write SetPidl; - property ShellFolder:IShellFolder read FShellFolder; - property OnSettingsChanged: TNotifyEvent read FOnSettingsChanged - write FOnSettingsChanged; - published - property BrowseFolder:TcxBrowseFolder read FBrowseFolder - write SetBrowseFolder default bfDesktop; - property CustomPath:WideString read FCustomPath write SetCustomPath; - end; - - TcxRootChangedEvent=procedure (Sender:TObject; Root:TcxCustomShellRoot) of object; - - TcxShellItemInfo = class - private - FCanRename: Boolean; - FDetails: TStrings; - FFolder: TcxShellFolder; - FFullPIDL: PItemIDList; - FHasSubfolder: Boolean; - FIconIndex: Integer; - FInfoTip: WideString; - FInitialized: Boolean; - FIsDropTarget: Boolean; - FIsFilesystem: Boolean; - FIsFolder: Boolean; - FIsGhosted: Boolean; - FIsLink: Boolean; - FIsRemovable: Boolean; - FIsShare: Boolean; - FItemProducer: TcxCustomItemProducer; - FName: WideString; - FOpenIconIndex: Integer; - Fpidl: PItemIDList; - FUpdated: Boolean; - FUpdating: Boolean; - protected - property Updating:Boolean read FUpdating write FUpdating; - public - constructor Create(AItemProducer: TcxCustomItemProducer; - AParentIFolder: IShellFolder; AParentPIDL, APIDL: PItemIDList; - AFast: Boolean); virtual; - destructor Destroy;override; - procedure CheckUpdate(ShellFolder:IShellFolder;FolderPidl:PItemIDList;Fast:Boolean); - procedure CheckInitialize(AIFolder: IShellFolder; APIDL: PItemIDList); - procedure FetchDetails(wnd:HWND;ShellFolder:IShellFolder;DetailsMap:TcxShellDetails); - procedure CheckSubitems(AParentIFolder: IShellFolder; - AEnumSettings: Cardinal); - procedure SetNewPidl(pFolder:IShellFolder;FolderPidl,apidl:PItemIDList); - property CanRename:Boolean read FCanRename; - property Details:TStrings read FDetails; - property Folder: TcxShellFolder read FFolder; - property FullPIDL: PItemIDList read FFullPIDL; - property HasSubfolder:Boolean read FHasSubfolder; - property IconIndex:Integer read FIconIndex; - property InfoTip:WideString read FInfoTip; - property Initialized:Boolean read FInitialized; - property IsDropTarget:Boolean read FIsDropTarget; - property IsFilesystem:Boolean read FIsFilesystem; - property IsFolder:Boolean read FIsFolder; - property IsGhosted:Boolean read FIsGhosted; - property IsLink:Boolean read FIsLink; - property IsRemovable:Boolean read FIsRemovable; - property IsShare:Boolean read FIsShare; - property ItemProducer: TcxCustomItemProducer read FItemProducer; - property Name:WideString read FName; - property OpenIconIndex:Integer read FOpenIconIndex; - property pidl:PItemIDList read Fpidl; - property Updated:Boolean read FUpdated write FUpdated; - end; - - PcxShellItemInfo = TcxShellItemInfo; - - { TcxShellItemsInfoGatherer } - - TcxShellItemsInfoGatherer = class - private - FFetchQueue: TList; - FFetchStoppedEvent: THandle; - FFetchThread: THandle; - FIsFetchQueueClearing: Boolean; - FOwner: TWinControl; - FStopFetchCount: Integer; - FStopFetchEvent: THandle; - FTerminateFetchThreadEvent: THandle; - procedure CreateFetchThread; - function CreateRequestItem(AItemProducer: TcxCustomItemProducer; - AIndex: Integer; APriority: Boolean): PcxRequestItem; - function GetFetchQueueItemIndex(AFetchQueue: TList; - AItemProducer: TcxCustomItemProducer; AIndex: Integer): Integer; - function GetIsFetchStopping: Boolean; - function GetIsFetchThreadTerminating: Boolean; - procedure FetchResumed; - procedure FetchStopped; - procedure InternalCloseHandle(var AHandle: THandle); - procedure TerminateFetchThread; - property FetchQueue: TList read FFetchQueue; - property IsFetchStopping: Boolean read GetIsFetchStopping; - property IsFetchThreadTerminating: Boolean read GetIsFetchThreadTerminating; - protected - procedure DestroyFetchThread; - public - constructor Create(AOwner: TWinControl); - destructor Destroy; override; - procedure ClearFetchQueue(AItemProducer: TcxCustomItemProducer); - procedure RequestItemInfo(AItemProducer: TcxCustomItemProducer; - AIndex: Integer; APriority: Boolean); - procedure ResumeFetch; - procedure StopFetch; - end; - - TcxCustomItemProducer = class - private - FDetails: TcxShellDetails; - FFolderPidl: PItemIDList; - FItems: TList; - FItemsLock: TMultiReadExclusiveWriteSynchronizer; - FOwner: TWinControl; - FShellFolder: IShellFolder; - protected - function AllowBackgroundProcessing: Boolean; virtual; abstract; - function CanAddFolder(AFolder: TcxShellFolder): Boolean; virtual; - function DoCompareItems(AItem1, AItem2: TcxShellFolder; - out ACompare: Integer): Boolean; virtual; - procedure DoSort; virtual; - procedure FetchItems(APreloadItems: Integer); - function GetEnumFlags: Cardinal; virtual; abstract; - function GetItemsInfoGatherer: TcxShellItemsInfoGatherer; virtual; abstract; - function GetShowToolTip: Boolean; virtual; abstract; - procedure InitializeItem(Item: TcxShellItemInfo); virtual; - procedure CheckForSubitems(AItem: TcxShellItemInfo); virtual; - procedure ClearFetchQueue; - property ItemsLock: TMultiReadExclusiveWriteSynchronizer read FItemsLock; - property ShellFolder: IShellFolder read FShellFolder; - property FolderPidl: PItemIDList read FFolderPidl write FFolderPidl; - property Owner: TWinControl read FOwner; - public - constructor Create(AOwner: TWinControl); virtual; - destructor Destroy; override; - procedure ProcessItems(AIFolder: IShellFolder; AFolderPIDL: PItemIDList; - cPreloadItems: Integer); virtual; - procedure ProcessDetails(ShellFolder: IShellFolder; CharWidth: Integer); virtual; - procedure FetchRequest(AIndex: Integer; APriority: Boolean = False); - procedure ClearItems; - procedure LockRead; - procedure LockWrite; - procedure UnlockRead; - procedure UnlockWrite; - procedure RequestItemsInfo; - procedure SetItemsCount(Count: Integer); virtual; - procedure NotifyUpdateItem(AItem: PcxRequestItem); virtual; abstract; - procedure NotifyRemoveItem(Index: Integer); virtual; - procedure NotifyAddItem(Index: Integer); virtual; - procedure DoGetInfoTip(Handle: HWND; ItemIndex: Integer; InfoTip: PChar; cch: Integer); - function GetItemByPidl(APidl: PItemIDList): TcxShellItemInfo; - function GetItemIndexByPidl(APidl: PItemIDList): Integer; - procedure Sort; - property Details: TcxShellDetails read FDetails; - property Items: TList read FItems; - property ItemsInfoGatherer: TcxShellItemsInfoGatherer read GetItemsInfoGatherer; - end; - - TcxDragDropSettings = class(TPersistent) - private - FAllowDragObjects: Boolean; - FDefaultDropEffect: TcxDropEffect; - FDropEffect: TcxDropEffectSet; - FScroll: Boolean; - FOnChange: TNotifyEvent; - function GetDefaultDropEffectAPI: Integer; - function GetDropEffectAPI: DWORD; - procedure SetAllowDragObjects(Value: Boolean); - protected - procedure Changed; - public - property DropEffectAPI: DWORD read GetDropEffectApi; - property DefaultDropEffectAPI: Integer read GetDefaultDropEffectAPI; - constructor Create; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - published - property AllowDragObjects: Boolean read FAllowDragObjects - write SetAllowDragObjects default True; - property DefaultDropEffect: TcxDropEffect read FDefaultDropEffect - write FDefaultDropEffect default deMove; - property DropEffect: TcxDropEffectSet read FDropEffect write FDropEffect - default [deCopy, deMove, deLink]; - property Scroll: Boolean read FScroll write FScroll stored False; // deprecated - end; - - TShChangeNotifyEntry = packed record - pidlPath: PItemIDList; - bWatchSubtree: BOOL; - end; - - DWORDITEMID=record - cb: SHORT; - dwItem1: DWORD; - dwItem2: DWORD; - end; - - PDWORDITEMID=^DWORDITEMID; - - PShChangeNotifyEntry = ^TShChangeNotifyEntry; - -function GetDesktopIShellFolder: IShellFolder; -function GetTextFromStrRet(var AStrRet: TStrRet; APIDL: PitemIDList): WideString; -function GetShellDetails(pFolder:IShellFolder;pidl:PItemIDList;out sd:IShellDetails):Hresult; -function HasSubItems(AParentIFolder: IShellFolder; AFullPIDL: PItemIDList; - AEnumSettings: Cardinal): Boolean; -function cxGetFolderLocation(AWnd: HWND; ACSIDL: Integer; AToken: THandle; - AReserwed: DWORD; var APIDL: PItemIDList): HRESULT; -function cxFileTimeToDateTime(fTime:FILETIME):TDateTime; -function cxMalloc: IMalloc; -procedure DisplayContextMenu(AWnd: HWND; AIFolder: IShellFolder; - AItemPIDLList: TList; const APos: TPoint); - -{ Pidl Tools} - -function GetPidlItemsCount(APidl: PItemIDList): Integer; -function GetPidlSize(APidl: PItemIDList): Integer; -function GetNextItemID(APidl: PItemIDList): PItemIDList; -function GetPidlCopy(APidl: PItemIDList): PItemIDList; -function GetLastPidlItem(APidl: PItemIDList): PItemIDList; -function GetPidlName(APIDL: PItemIDList): WideString; -function ConcatenatePidls(pidl1,pidl2:PItemIDList):PItemIDList; -procedure DisposePidl(APidl: PItemIDList); -function GetPidlParent(pidl:PItemIDList):PItemIDList; -function CreateEmptyPidl:PItemIDList; -function CreatePidlListFromList(List:TList):PItemIDList; -function ExtractParticularPidl(APidl: PItemIDList): PItemIDList; -function EqualPIDLs(APIDL1, APIDL2: PItemIDList): Boolean; -function IsSubPath(APIDL1, APIDL2: PItemIDList): Boolean; - -{ Unicode Tools } - -procedure StrPLCopyW(Dest:PWideChar;Source:WideString;MaxLen:Cardinal); -function StrPasW(Source:PWideChar):WideString; -function StrLenW(Source:PWideChar):Cardinal; -function UpperCaseW(Source:WideString):WideString; -function LowerCaseW(Source:WideString):WideString; - -procedure CheckShellRoot(ARoot: TcxCustomShellRoot); -function GetShellItemDisplayName(AIFolder: IShellFolder; - APIDL: PItemIDList; ACheckIsFolder: Boolean): WideString; - -function cxShellGetThreadSafeFileInfo(pszPath: PChar; dwFileAttributes: DWORD; - var psfi: TSHFileInfo; cbFileInfo, uFlags: UINT): DWORD; stdcall; - -const - DSM_SETCOUNT = CM_BASE + 315; - DSM_NOTIFYUPDATE = CM_BASE + 316; - DSM_NOTIFYREMOVEITEM = CM_BASE + 318; - DSM_NOTIFYADDITEM = CM_BASE + 319; - DSM_NOTIFYUPDATECONTENTS = CM_BASE + 320; - DSM_SHELLCHANGENOTIFY = CM_BASE + 321; - DSM_DONAVIGATE = CM_BASE + 322; - DSM_SYNCHRONIZEROOT = CM_BASE + 323; - DSM_SHELLTREECHANGENOTIFY = CM_BASE + 324; - DSM_SHELLTREERESTORECURRENTPATH = CM_BASE + 325; - DSM_SYSTEMSHELLCHANGENOTIFY = CM_BASE + 326; - - PRELOAD_ITEMS_COUNT = 10; - - SHCNF_ACCEPT_INTERRUPTS = $1; - SHCNF_ACCEPT_NON_INTERRUPTS = $2; - SHCNF_NO_PROXY = $8000; - -type - TPidlList = array [0..1] of PItemIDList; - PPidlList = ^TPidlList; - -var - SHChangeNotifyRegister: function (hwnd: HWND; dwFlags: DWORD; wEventMask: DWORD; - uMsg: UINT; cItems: DWORD; lpItems: PShChangeNotifyEntry): Cardinal; stdcall; - SHChangeNotifyUnregister: function (hNotify: Cardinal): Boolean; stdcall; - SHChangeNotification_Lock: function (hChange: Cardinal; dwProcId: DWORD; - var PPidls: PPidlList; var plEvent: Longint): Cardinal; stdcall; - SHChangeNotification_UnLock: function (hLock: Cardinal): BOOL; stdcall; - -implementation - -uses - cxContainer, cxControls, cxEdit, dxUxTheme, dxCore; - -const - ShellLibraryName = 'shell32.dll'; -{$IFNDEF DELPHI6} - PathDelim = '\'; - cxIID_IShellFolder2: TGUID = ( - D1:$93F2F68C; D2:$1D1B; D3:$11D3; D4:($A3,$0E,$00,$C0,$4F,$79,$AB,$D1)); -{$ENDIF} - SFGAO_ENCRYPTED = $00002000; - SFGAO_ISSLOW = $00004000; - SFGAO_STORAGE = $00000008; - SFGAO_STORAGEANCESTOR = $00800000; - SFGAO_STORAGECAPMASK = $70C50008; - SFGAO_STREAM = $00400000; - -type - TcxContextMenuMessageWindow = class(TcxMessageWindow) - private - FContextMenu: IContextMenu2; - protected - procedure WndProc(var Message: TMessage); override; - public - property ContextMenu: IContextMenu2 read FContextMenu write FContextMenu; - end; - - TSHGetPathFromIDList = function(APIDL: PItemIDList; APath: PChar): BOOL; stdcall; - TSHGetPathFromIDListW = function(APIDL: PItemIDList; APath: PWideChar): BOOL; stdcall; - -{$IFDEF DELPHI6} - cxIShellFolder2 = interface(IShellFolder2) - ['{93F2F68C-1D1B-11D3-A30E-00C04F79ABD1}'] - end; -{$ENDIF} - -var - FComInitializationSucceeded: Boolean; - FSysFileIconIndex: Integer = -1; - FSysFolderIconIndex: Integer = -1; - FSysFolderOpenIconIndex: Integer = -1; - cxSHGetFolderLocation: function (wnd: HWND; nFolder: Integer; hToken: THandle; - dwReserwed: DWORD; var ppidl: PItemIDList): HResult; stdcall; - cxSHGetPathFromIDList: TSHGetPathFromIDList = nil; - cxSHGetPathFromIDListW: TSHGetPathFromIDListW = nil; - ShellLibrary: HMODULE = 0; - FcxMalloc: IMalloc; - FShellItemsInfoGatherers: TList; - FShellLock: TCriticalSection; - -(*function GetShellItemDisplayName(AIFolder: IShellFolder; - APIDL: PItemIDList; ACheckIsFolder: Boolean): WideString; -var - AAttributes, AFlags: Cardinal; - AIsFolder: Boolean; - AStrRet: TStrRet; -begin - Result := ''; - - if ACheckIsFolder then - begin - AAttributes := SFGAO_FOLDER; - if not Succeeded(AIFolder.GetAttributesOf(1, APIDL, AAttributes)) then - Exit; - AIsFolder := AAttributes and SFGAO_FOLDER <> 0; - end - else - AIsFolder := False; - - AFlags := SHGDN_INFOLDER; - if AIsFolder then - AFlags := AFlags or SHGDN_FORPARSING; - - if not Succeeded(AIFolder.GetDisplayNameOf(APIDL, AFlags, AStrRet)) then - Exit; - Result := GetTextFromStrRet(AStrRet, APIDL); - if AIsFolder and (Length(Result) > 2) then - if (Result[1] = ':') and (Result[2] = ':') or - (Result[1] = '\') and (Result[2] = '\') then - begin - AIFolder.GetDisplayNameOf(APIDL, SHGDN_INFOLDER, AStrRet); - Result := GetTextFromStrRet(AStrRet, APIDL); - end; -end;*) - -procedure CheckShellRoot(ARoot: TcxCustomShellRoot); -begin - if ARoot.ShellFolder = nil then - ARoot.CheckRoot; -end; - -function GetShellItemDisplayName(AIFolder: IShellFolder; - APIDL: PItemIDList; ACheckIsFolder: Boolean): WideString; -var - AStrRet: TStrRet; -begin - if Succeeded(AIFolder.GetDisplayNameOf(APIDL, SHGDN_INFOLDER, AStrRet)) then - Result := GetTextFromStrRet(AStrRet, APIDL) - else - Result := ''; -end; - -function cxShellGetThreadSafeFileInfo(pszPath: PChar; dwFileAttributes: DWORD; - var psfi: TSHFileInfo; cbFileInfo, uFlags: UINT): DWORD; -begin - FShellLock.Enter; - Result := SHGetFileInfo(pszPath, dwFileAttributes, psfi, cbFileInfo, uFlags); - FShellLock.Leave; -end; - -function HasSubItems(AParentIFolder: IShellFolder; AFullPIDL: PItemIDList; - AEnumSettings: Cardinal): Boolean; - - function HasAttributes(AAttributes: UINT): Boolean; - var - ATempAttributes: UINT; - ATempPIDL: PItemIDList; - begin - ATempAttributes := AAttributes; - ATempPIDL := GetLastPidlItem(AFullPIDL); - AParentIFolder.GetAttributesOf(1, ATempPIDL, ATempAttributes); - Result := ATempAttributes and AAttributes = AAttributes; - end; - - function CheckLocalFolder(out AHasSubItems: Boolean): Boolean; - var - AAttributes, AParsedCharCount: ULONG; - ADesktopIFolder: IShellFolder; - AFileSearchAttributes: Integer; - ATempPIDL: PItemIDList; - ASearchRec: TSearchRec; - S: WideString; - begin - Result := False; - S := GetPidlName(AFullPIDL); - if (S = '')(* or (Pos('\\', S) = 1)*) then - Exit; - SHGetDesktopFolder(ADesktopIFolder); - AAttributes := 0; - ADesktopIFolder.ParseDisplayName(0, nil, PWideChar(S), - AParsedCharCount, ATempPIDL, AAttributes); - if ATempPIDL = nil then - Exit; - try - Result := True; - AHasSubItems := False; - - AFileSearchAttributes := faReadOnly or faSysFile or faArchive; - if AEnumSettings and SHCONTF_FOLDERS <> 0 then - AFileSearchAttributes := AFileSearchAttributes or faDirectory; - if AEnumSettings and SHCONTF_INCLUDEHIDDEN <> 0 then - AFileSearchAttributes := AFileSearchAttributes or faHidden; - - if S[Length(S)] = PathDelim then - Delete(S, Length(S), 1); - if FindFirst(S + PathDelim + '*.*', AFileSearchAttributes, ASearchRec) = 0 then - begin - repeat - if (ASearchRec.Name = '.') or (ASearchRec.Name = '..') then - begin - if FindNext(ASearchRec) <> 0 then - Break; - end - else - begin - AHasSubItems := True; - Break; - end; - until False; - FindClose(ASearchRec); - end; - finally - DisposePidl(ATempPIDL); - end; - end; - -var - ATempIFolder: IShellFolder; - ATempPIDL: PItemIDList; - AIEnum: IEnumIDList; - AFetchedItemCount: Cardinal; -begin - Result := HasAttributes(SFGAO_FOLDER); - if Result then - if AEnumSettings and SHCONTF_NONFOLDERS = 0 then - Result := HasAttributes(SFGAO_HASSUBFOLDER) - else - if not CheckLocalFolder(Result) then - begin - Result := HasAttributes(SFGAO_HASSUBFOLDER); - if not Result and Succeeded(AParentIFolder.BindToObject( - GetLastPidlItem(AFullPIDL), nil, IID_IShellFolder, ATempIFolder)) and - (ATempIFolder <> nil) and Succeeded(ATempIFolder.EnumObjects(0, AEnumSettings, AIEnum)) and - Assigned(AIEnum) and (AIEnum.Next(1, ATempPIDL, AFetchedItemCount) = S_OK) then - try - Result := AFetchedItemCount = 1; - finally - DisposePidl(ATempPIDL); - end; - end; -end; - -function GetDesktopIShellFolder: IShellFolder; -begin - OleCheck(SHGetDesktopFolder(Result)); -end; - -function GetTextFromStrRet(var AStrRet: TStrRet; APIDL: PitemIDList): WideString; -var - P: PChar; - ATmp: PChar; -begin - case AStrRet.uType of - STRRET_CSTR: - begin - ATmp := PChar(dxAnsiStringToString(AStrRet.cStr)); - SetString(Result, ATmp, lstrlen(ATmp)); - end; - STRRET_OFFSET: - begin - P := @APIDL.mkid.abID; - Inc(P, AStrRet.uOffset - SizeOf(APIDL.mkid.cb)); - SetString(Result, P, APIDL.mkid.cb - AStrRet.uOffset); - end; - STRRET_WSTR: - begin - Result := StrPasW(AStrRet.pOleStr); - cxMalloc.Free(AStrRet.pOleStr); - end; - end; -end; - -function GetShellDetails(pFolder:IShellFolder;pidl:PItemIDList;out sd:IShellDetails):Hresult; -begin - try - Result := pFolder.QueryInterface(IID_IShellDetails, sd); - if Result = S_OK then - Exit; - Result:=pFolder.GetUIObjectOf(0,0,pidl,IID_IShellDetails,nil,sd); - if Result = S_OK then - Exit; - Result:=pFolder.CreateViewObject(0,IID_IShellDetails,sd); - if Result = S_OK then - Exit; - Result:=pFolder.GetUIObjectOf(0,Integer(pidl<>nil)(*1*),pidl,IID_IShellDetails,nil,sd); - finally - if sd = nil then - Result := E_NOINTERFACE; - end; -end; - -function cxGetFolderLocation(AWnd: HWND; ACSIDL: Integer; AToken: THandle; - AReserwed: DWORD; var APIDL: PItemIDList): HRESULT; -begin - if Win32MajorVersion < 5 then - Result := SHGetSpecialFolderLocation(AWnd, ACSIDL, APIDL) - else - Result := cxSHGetFolderLocation(AWnd, ACSIDL, AToken, AReserwed, APIDL); -end; - -function cxFileTimeToDateTime(fTime:FILETIME):TDateTime; -var - LocalTime:TFileTime; - Age:Integer; -begin - FileTimeToLocalFileTime(FTime,LocalTime); - if FileTimeToDosDateTime(LocalTime,LongRec(Age).Hi,LongRec(Age).Lo) then - Result:=FileDateToDateTime(Age) - else - Result:=-1; -end; - -function cxMalloc: IMalloc; -begin - if FcxMalloc = nil then - SHGetMalloc(FcxMalloc); - Result := FcxMalloc; -end; - -procedure TcxContextMenuMessageWindow.WndProc(var Message: TMessage); -begin - case Message.Msg of - WM_INITMENUPOPUP: - begin - ContextMenu.HandleMenuMsg(Message.Msg, Message.wParam, Message.lParam); - Message.Result := 0; - end; - WM_DRAWITEM, WM_MEASUREITEM: - begin - ContextMenu.HandleMenuMsg(Message.Msg, Message.wParam, Message.lParam); - Message.Result := 1; - end; - else - inherited WndProc(Message); - end; -end; - -function CreateCallbackWnd(AContextMenu: IContextMenu2): TcxContextMenuMessageWindow; -begin - Result := TcxContextMenuMessageWindow.Create; - Result.ContextMenu := AContextMenu; -end; - -procedure DisplayContextMenu(AWnd: HWND; AIFolder: IShellFolder; - AItemPIDLList: TList; const APos: TPoint); -var - ACallbackWnd: TcxContextMenuMessageWindow; - ACmd: Longbool; - AContextMenu: IContextMenu; - AContextMenu2: IContextMenu2; - AInvokeCommandInfo: TCMInvokeCommandInfo; - AMenu: HMENU; - APIDLList: PItemIDList; -begin - if (AIFolder = nil) or (AItemPIDLList.Count = 0) then - Exit; - APIDLList := CreatePidlListFromList(AItemPIDLList); - try - if Failed(AIFolder.GetUIObjectOf(AWnd, AItemPIDLList.Count, - PItemIDList(APIDLList^), IID_IContextMenu, nil, AContextMenu)) then - Exit; - AMenu := CreatePopupMenu; - ACallbackWnd := nil; - if AMenu <> 0 then - try - if Failed(AContextMenu.QueryContextMenu(AMenu, 0, 1, $7FFF, CMF_NORMAL)) then - Exit; - if Succeeded(AContextMenu.QueryInterface(IID_IContextMenu2, AContextMenu2)) then - ACallbackWnd := CreateCallbackWnd(AContextMenu2); - if ACallbackWnd <> nil then - ACmd := TrackPopupMenu(AMenu, TPM_LEFTALIGN or TPM_LEFTBUTTON or - TPM_RIGHTBUTTON or TPM_RETURNCMD, APos.X, APos.Y, 0, ACallbackWnd.Handle, nil) - else - ACmd := TrackPopupMenu(AMenu, TPM_LEFTALIGN or TPM_LEFTBUTTON or - TPM_RIGHTBUTTON or TPM_RETURNCMD, APos.X, APos.Y, 0, AWnd, nil); - if ACmd then - begin - ZeroMemory(@AInvokeCommandInfo, SizeOf(AInvokeCommandInfo)); - AInvokeCommandInfo.cbSize := SizeOf(AInvokeCommandInfo); - AInvokeCommandInfo.hwnd := AWnd; - AInvokeCommandInfo.lpVerb := MakeIntResourceA(Longint(ACmd) - 1); - AInvokeCommandInfo.nShow := SW_SHOWNORMAL; - AContextMenu.InvokeCommand(AInvokeCommandInfo); - end; - finally - DestroyMenu(AMenu); - FreeAndNil(ACallbackWnd); - end; - finally - DisposePidl(APIDLList); - end; -end; - -function SysFileIconIndex: Integer; -var - AFileInfo: TSHFileInfo; -begin - if FSysFileIconIndex = -1 then - begin - cxShellGetThreadSafeFileInfo('C:\CXDUMMYFILE.TXT', FILE_ATTRIBUTE_NORMAL, AFileInfo, - SizeOf(AFileInfo), SHGFI_SYSICONINDEX or SHGFI_USEFILEATTRIBUTES); - FSysFileIconIndex := AFileInfo.iIcon; - end; - Result := FSysFileIconIndex; -end; - -function SysFolderIconIndex: Integer; -var - AFileInfo: TSHFileInfo; -begin - if FSysFolderIconIndex = -1 then - begin - cxShellGetThreadSafeFileInfo('C:\CXDUMMYFOLDER', FILE_ATTRIBUTE_DIRECTORY, AFileInfo, - SizeOf(AFileInfo), SHGFI_SYSICONINDEX or SHGFI_USEFILEATTRIBUTES); - FSysFolderIconIndex := AFileInfo.iIcon; - end; - Result := FSysFolderIconIndex; -end; - -function SysFolderOpenIconIndex: Integer; -var - AFileInfo: TSHFileInfo; -begin - if FSysFolderOpenIconIndex = -1 then - begin - cxShellGetThreadSafeFileInfo('C:\CXDUMMYFOLDER', FILE_ATTRIBUTE_DIRECTORY, AFileInfo, - SizeOf(AFileInfo), SHGFI_SYSICONINDEX or SHGFI_USEFILEATTRIBUTES or SHGFI_OPENICON); - FSysFolderOpenIconIndex := AFileInfo.iIcon; - end; - Result := FSysFolderOpenIconIndex; -end; - -{ Unicode Tools } - -function UpperCaseW(Source:WideString):WideString; -begin - Result:=AnsiUpperCase(Source); -end; - -function LowerCaseW(Source:WideString):WideString; -begin - Result:=AnsiLowerCase(Source); -end; - -function StrLenW(Source: PWideChar): Cardinal; -asm - MOV EDX, EDI - MOV EDI, EAX - MOV ECX, 0FFFFFFFFH - XOR AX, AX - REPNE SCASW - MOV EAX, 0FFFFFFFEH - SUB EAX, ECX - MOV EDI, EDX -end; - -function StrPasW(Source:PWideChar):WideString; -var - StringLength:Cardinal; -begin - StringLength:=StrLenW(Source); - SetLength(Result,StringLength); - CopyMemory(Pointer(Result),Source,StringLength*2); -end; - -procedure StrPLCopyW(Dest:PWideChar;Source:WideString;MaxLen:Cardinal); -begin - lstrcpynw(Dest,PWideChar(Source),MaxLen); -end; - -{ PidlTools} - -function GetPidlParent(pidl:PItemIDList):PItemIDList; -var - SourceSize:Integer; - PrevPidl:PItemIDList; - InitialPidl:PItemIDList; - TempPidl:PItemIDList; -begin - Result:=nil; - SourceSize:=0; - InitialPidl:=pidl; - PrevPidl:=nil; - if pidl<>nil then - begin - while pidl.mkid.cb<>0 do - begin - Inc(SourceSize,pidl.mkid.cb); - PrevPidl:=pidl; - pidl:=GetNextItemID(pidl); - end; - if SourceSize>0 then - Dec(SourceSize,PrevPidl.mkid.cb); - Result:=cxMalloc.Alloc(SourceSize+SizeOf(SHITEMID)); - CopyMemory(Result,InitialPidl,SourceSize); - TempPidl:=Pointer(Integer(Result)+SourceSize); - TempPidl.mkid.cb:=0; - TempPidl.mkid.abID[0]:=0; - end; -end; - -function CreateEmptyPidl:PItemIDList; -begin - Result:=cxMalloc.Alloc(SizeOf(ITEMIDLIST)); - Result.mkid.cb:=0; - Result.mkid.abID[0]:=0; -end; - -function CreatePidlListFromList(List:TList):PItemIDList; -var - i:Integer; - tempResult:PITEMIDLISTARRAY; -begin - Result:=nil; - if List=nil then - Exit; - tempResult:=cxMalloc.Alloc(List.Count*SizeOf(ITEMIDLIST)); - for i:=0 to List.Count-1 do - tempResult[i]:=List[i]; - Result:=Pointer(tempResult); -end; - -function ExtractParticularPidl(APidl: PItemIDList): PItemIDList; -var - ATemp: PItemIDList; -begin - Result := nil; - if (APidl <> nil) and (APidl.mkid.cb <> 0) then - begin - Result := cxMalloc.Alloc(APidl.mkid.cb + SizeOf(SHITEMID)); - CopyMemory(Result, APidl, APidl.mkid.cb + SizeOf(SHITEMID)); - ATemp := GetNextItemID(Result); - ATemp.mkid.cb := 0; - ATemp.mkid.abID[0] := 0; - end; -end; - -function EqualPIDLs(APIDL1, APIDL2: PItemIDList): Boolean; -var - L1, L2: Integer; -begin - Result := APIDL1 = APIDL2; - if not Result then - if (APIDL1 = nil) or (APIDL2 = nil) then - Exit - else - begin - L1 := GetPidlSize(APIDL1); - L2 := GetPidlSize(APIDL2); - Result := (L1 = L2) and CompareMem(APIDL1, APIDL2, L1); - end; -end; - -function IsSubPath(APIDL1, APIDL2: PItemIDList): Boolean; // TODO -var - L1, L2: Integer; -begin - L1 := GetPidlSize(APIDL1); - L2 := GetPidlSize(APIDL2); - Result := (L1 = 0) or (L2 >= L1) and CompareMem(APIDL1, APIDL2, L1); -end; - -function ConcatenatePidls(pidl1,pidl2:PItemIDList):PItemIDList; -var - cb1,cb2:Integer; -begin - if (pidl1=nil) and (pidl2=nil) then - Result:=nil - else - if pidl1=nil then - Result:=GetPidlCopy(pidl2) - else - if pidl2=nil then - Result:=GetPidlCopy(pidl1) - else - begin - cb1:=GetPidlSize(pidl1); - cb2:=GetPidlSize(pidl2)+SizeOf(SHITEMID); - Result:=cxMalloc.Alloc(cb1+cb2); - if Result<>nil then - begin - CopyMemory(Result,pidl1,cb1); - CopyMemory(Pointer(Integer(Result)+cb1),pidl2,cb2); - end; - end; -end; - -function GetPidlName(APIDL: PItemIDList): WideString; -var - P: PChar; - PW: PWideChar; -begin - Result := ''; - if APIDL = nil then - Exit; - if not Assigned(cxSHGetPathFromIDListW) then - begin - GetMem(P, MAX_PATH + 1); - try - cxSHGetPathFromIDList(APIDL, P); - Result := StrPas(P); - finally - FreeMem(P); - end; - end - else - begin - GetMem(PW, (MAX_PATH + 1) * 2); - try - cxSHGetPathFromIDListW(APIDL, PW); - Result := StrPasW(PW); - finally - FreeMem(PW); - end; - end; -end; - -function GetLastPidlItem(APidl: PItemIDList): PItemIDList; -var - ATempPidl: PItemIDList; -begin - Result := APidl; - if APidl <> nil then - begin - ATempPidl := APidl; - while ATempPidl.mkid.cb <> 0 do - begin - Result := ATempPidl; - ATempPidl := GetNextItemID(ATempPidl); - end; - end; -end; - -procedure DisposePidl(APidl: PItemIDList); -begin - if APidl <> nil then - cxMalloc.Free(APidl); -end; - -function GetPidlCopy(APidl: PItemIDList): PItemIDList; -var - ASize: Integer; -begin - Result := nil; - if APidl <> nil then - begin - ASize := GetPidlSize(APidl) + SizeOf(SHITEMID); - Result := cxMalloc.Alloc(ASize); - CopyMemory(Result, APidl, ASize); - end; -end; - -function GetPidlItemsCount(APidl: PItemIDList): Integer; -begin - Result := 0; - if APidl <> nil then - while APidl.mkid.cb <> 0 do - begin - Inc(Result); - APidl := GetNextItemID(APidl); - if Result > MAX_PATH then - begin - Result := -1; - Break; - end; - end; -end; - -function GetPidlSize(APidl: PItemIDList):Integer; -begin - Result := 0; - while (APidl <> nil) and (APidl.mkid.cb <> 0) do - begin - Inc(Result, APidl.mkid.cb); - APidl := GetNextItemID(APidl); - end; -end; - -function GetNextItemID(APidl: PItemIDList): PItemIDList; -begin - Result := nil; - if (APidl <> nil) and (APidl.mkid.cb <> 0) then - Result := PItemIDList(Integer(APidl) + APidl.mkid.cb); -end; - -function cxShellItemsInfoGathererFetchThreadFunction( - AItemsInfoGatherer: TcxShellItemsInfoGatherer): Integer; stdcall; - - function CanProcessFetchQueueItems: Boolean; - begin - Result := not AItemsInfoGatherer.IsFetchThreadTerminating and - not AItemsInfoGatherer.IsFetchStopping; - end; - - procedure ProcessFetchQueueItem(AItem: PcxRequestItem); - var - AItemData: TcxShellItemInfo; - AItemProducer: TcxCustomItemProducer; - begin - AItemProducer := AItem^.ItemProducer; - AItemProducer.LockRead; - try - if AItem^.ItemIndex >= AItemProducer.Items.Count then - Exit; - AItemData := AItemProducer.Items[AItem^.ItemIndex]; - AItemData.CheckUpdate(AItemProducer.ShellFolder, - AItemProducer.FolderPidl, False); - AItemProducer.CheckForSubItems(AItemData); - AItemData.Updated := True; - finally - AItem^.ItemProducer.UnlockRead; - end; - AItemProducer.NotifyUpdateItem(AItem); - end; - - procedure ProcessFetchQueueItems; - var - AFetchQueue: TList; - begin - AFetchQueue := AItemsInfoGatherer.FetchQueue; - while AFetchQueue.Count <> 0 do - begin - ProcessFetchQueueItem(PcxRequestItem(AFetchQueue[0])); - Dispose(AFetchQueue[0]); - AFetchQueue.Delete(0); - if not CanProcessFetchQueueItems then - Break; - end; - end; - -const - cxShellItemsInfoGathererSleepPause = 10; -var - ASucceeded: Boolean; -begin - Result := 0; - ASucceeded := Succeeded(CoInitializeEx(nil, COINIT_APARTMENTTHREADED)); - try - try - repeat - if CanProcessFetchQueueItems then - begin - AItemsInfoGatherer.FetchResumed; - if AItemsInfoGatherer.FetchQueue.Count <> 0 then - ProcessFetchQueueItems; - end; - if AItemsInfoGatherer.IsFetchThreadTerminating then - Break; - if AItemsInfoGatherer.IsFetchStopping then - AItemsInfoGatherer.FetchStopped; - Sleep(cxShellItemsInfoGathererSleepPause); - until False; - except - end; - finally - if ASucceeded then - CoUninitialize; - end; -end; - -procedure RegisterShellItemsInfoGatherer(AGatherer: TcxShellItemsInfoGatherer); -begin - if FShellItemsInfoGatherers = nil then - FShellItemsInfoGatherers := TList.Create; - FShellItemsInfoGatherers.Add(AGatherer); -end; - -procedure UnregisterShellItemsInfoGatherer(AGatherer: TcxShellItemsInfoGatherer); -begin - FShellItemsInfoGatherers.Remove(AGatherer); - if FShellItemsInfoGatherers.Count = 0 then - FreeAndNil(FShellItemsInfoGatherers); -end; - -{ TcxCustomShellRoot } - -procedure TcxCustomShellRoot.CheckRoot; -const - CSIDL_MYMUSIC = $0D; - CSIDL_PROGRAM_FILES = $26; - CSIDL_MYPICTURES = $27; - CSIDL_PROFILE = $28; - CSIDL_COMMON_TEMPLATES = $2D; - CSIDL_COMMON_DOCUMENTS = $2E; - - ACSIDLs: array[TcxBrowseFolder] of Integer = ( - CSIDL_DESKTOP, CSIDL_STARTUP, CSIDL_BITBUCKET, CSIDL_COMMON_DESKTOPDIRECTORY, - CSIDL_COMMON_DOCUMENTS, CSIDL_COMMON_FAVORITES, CSIDL_COMMON_PROGRAMS, - CSIDL_COMMON_STARTMENU, CSIDL_COMMON_STARTUP, CSIDL_COMMON_TEMPLATES, - CSIDL_CONTROLS, CSIDL_DESKTOP, CSIDL_DESKTOPDIRECTORY, CSIDL_DRIVES, - CSIDL_PRINTERS, CSIDL_FAVORITES, CSIDL_FONTS, CSIDL_HISTORY, CSIDL_MYMUSIC, - CSIDL_MYPICTURES, CSIDL_NETWORK, CSIDL_PROFILE, CSIDL_PROGRAM_FILES, - CSIDL_PROGRAMS, CSIDL_RECENT, CSIDL_STARTMENU, CSIDL_STARTUP, CSIDL_TEMPLATES); -var - ABrowseFolder: TcxBrowseFolder; - ADesktopFolder: IShellFolder; - AParsedCharCount, AAttributes: Cardinal; - ATempCustomPath: PWideChar; - ATempPIDL: PItemIDList; -begin - if FIsRootChecking then - Exit; - - ADesktopFolder := GetDesktopIShellFolder; - ATempPIDL := nil; - FValid := False; - FShellFolder := nil; - if FPidl <> nil then - begin - DisposePidl(FPidl); - FPidl := nil; - end; - - ABrowseFolder := BrowseFolder; - if (ABrowseFolder = bfCustomPath) and (CustomPath = '') then - ABrowseFolder := bfDesktop; - - FIsRootChecking := True; - try - try - if ABrowseFolder = bfCustomPath then - begin - ATempCustomPath := StringToOleStr(CustomPath); - OleCheck(ADesktopFolder.ParseDisplayName(ParentWindow, nil, - ATempCustomPath, AParsedCharCount, ATempPIDL, AAttributes)); - end - else - OleCheck(cxGetFolderLocation(ParentWindow, ACSIDLs[ABrowseFolder], 0, 0, ATempPIDL)); - except - on E: Exception do - if FRootChangingCount > 0 then - raise EcxEditError.Create(E.Message) - else - begin - RootUpdated; - Exit; - end; - end; - if ABrowseFolder = bfDesktop then - begin - FShellFolder := ADesktopFolder; - FPidl := GetPidlCopy(ATempPIDL); - FValid := True; - FAttributes := SFGAO_FILESYSTEM; - RootUpdated; - end - else - Pidl := ATempPIDL; - finally - FIsRootChecking := False; - if ATempPIDL <> nil then - DisposePidl(ATempPIDL); - end; -end; - -procedure TcxCustomShellRoot.DoSettingsChanged; -begin - if not FUpdating and Assigned(FOnSettingsChanged) then - FOnSettingsChanged(Self); -end; - -procedure TcxCustomShellRoot.RootUpdated; -begin - UpdateFolder; -end; - -procedure TcxCustomShellRoot.SetPidl(const Value: PItemIDList); -var - DesktopFolder:IShellFolder; - pFolder:IShellFolder; -begin - if Value = nil then - Exit; - if FPidl<>nil then - begin - DisposePidl(FPidl); - FPidl:=nil; - FValid:=False; - FAttributes:=0; - end; - if Failed(SHGetDesktopFolder(DesktopFolder)) then - Exit; - if Succeeded(DesktopFolder.BindToObject(Value,nil,IID_IShellFolder, pFolder)) then - begin - FShellFolder:=pFolder; - FPidl:=GetPidlCopy(Value); - FValid:=True; - FAttributes:=0; - if Failed(DesktopFolder.GetAttributesOf(1,FPidl,FAttributes)) then - FAttributes:=0; - end - else - begin - FShellFolder:=DesktopFolder; - FPidl:=GetPidlCopy(Value); - FValid:=True; - FAttributes:=SFGAO_FILESYSTEM; - end; - RootUpdated; -end; - -constructor TcxCustomShellRoot.Create(AOwner: TPersistent; AParentWindow: HWND); -begin - inherited Create; - FOwner := AOwner; - FParentWindow := AParentWindow; - FBrowseFolder := bfDesktop; - FCustomPath := ''; - FShellFolder := nil; - FPidl := nil; -end; - -destructor TcxCustomShellRoot.Destroy; -begin - FreeAndNil(FFolder); - FShellFolder := nil; - DisposePidl(FPidl); - inherited; -end; - -procedure TcxCustomShellRoot.Assign(Source: TPersistent); -var - APrevBrowseFolder: TcxBrowseFolder; - APrevCustomPath: WideString; -begin - if Source is TcxCustomShellRoot then - begin - APrevBrowseFolder := FBrowseFolder; - APrevCustomPath := FCustomPath; - try - FBrowseFolder := TcxCustomShellRoot(Source).FBrowseFolder; - FCustomPath := TcxCustomShellRoot(Source).FCustomPath; - Inc(Self.FRootChangingCount); - try - CheckRoot; - finally - Dec(FRootChangingCount); - end; - DoSettingsChanged; - except - FBrowseFolder := APrevBrowseFolder; - FCustomPath := APrevCustomPath; - CheckRoot; - raise; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxCustomShellRoot.Update(ARoot: TcxCustomShellRoot); -begin - if FUpdating then - Exit; - FUpdating := True; - try - Assign(ARoot); - finally - FUpdating := False; - end; -end; - -procedure TcxCustomShellRoot.SetBrowseFolder(Value: TcxBrowseFolder); -var - APrevBrowseFolder: TcxBrowseFolder; -begin - APrevBrowseFolder := FBrowseFolder; - try - Inc(FRootChangingCount); - try - if FBrowseFolder <> Value then - begin - FBrowseFolder := Value; - CheckRoot; - end - else - if Pidl = nil then - CheckRoot; - finally - Dec(FRootChangingCount); - end; - DoSettingsChanged; - except - FBrowseFolder := APrevBrowseFolder; - CheckRoot; - raise; - end; -end; - -procedure TcxCustomShellRoot.SetCustomPath(const Value: WideString); -var - APrevCustomPath: WideString; -begin - APrevCustomPath := FCustomPath; - try - FCustomPath := Value; - Inc(FRootChangingCount); - try - if BrowseFolder = bfCustomPath then - CheckRoot; - finally - Dec(FRootChangingCount); - end; - DoSettingsChanged; - except - FCustomPath := APrevCustomPath; - CheckRoot; - raise; - end; -end; - -function TcxCustomShellRoot.GetCurrentPath: WideString; -var - Desktop:IShellFolder; - StrName:TStrRet; -begin - Result:=''; - if Pidl<>nil then - begin - if Failed(SHGetDesktopFolder(Desktop)) then - Exit; - if Succeeded(Desktop.GetDisplayNameOf(Pidl,SHGDN_NORMAL or SHGDN_FORPARSING,StrName)) then - Result:=GetTextFromStrRet(StrName,Pidl); - end; -end; - -procedure TcxCustomShellRoot.UpdateFolder; -begin - FreeAndNil(FFolder); - FFolder := TcxShellFolder.Create(PIDL); -end; - -{ TcxCustomItemProducer } - -procedure TcxCustomItemProducer.ClearItems; - - (*function HasItems: Boolean; - begin - LockRead; - try - Result := Items.Count <> 0; - finally - UnlockRead; - end; - end;*) - -var - I: Integer; -begin - //if HasItems then - begin - ClearFetchQueue; - for I := 0 to Items.Count - 1 do - TcxShellItemInfo(Items[I]).Free; - Items.Clear; - end; - FShellFolder := nil; - if FFolderPidl <> nil then - begin - DisposePidl(FFolderPidl); - FFolderPidl := nil; - end; -end; - -constructor TcxCustomItemProducer.Create(AOwner: TWinControl); -begin - inherited Create; - FOwner := AOwner; - FDetails := TcxShellDetails.Create; - FItems := TList.Create; - FItemsLock := TMultiReadExclusiveWriteSynchronizer.Create; -end; - -procedure TcxCustomItemProducer.RequestItemsInfo; -var - I: Integer; -begin - ItemsInfoGatherer.StopFetch; - try - for I := 0 to Items.Count - 1 do - if not TcxShellItemInfo(Items[I]).Updated then - FetchRequest(I, False); - finally - ItemsInfoGatherer.ResumeFetch; - end; -end; - -destructor TcxCustomItemProducer.Destroy; -begin - ClearItems; - FreeAndNil(FDetails); - FreeAndNil(FItems); - FreeAndNil(FItemsLock); - inherited Destroy; -end; - -procedure TcxCustomItemProducer.LockRead; -begin - ItemsLock.BeginRead; -end; - -procedure TcxCustomItemProducer.LockWrite; -begin - ItemsLock.BeginWrite; -end; - -procedure TcxCustomItemProducer.ProcessItems(AIFolder: IShellFolder; - AFolderPIDL: PItemIDList; cPreloadItems: Integer); -begin - if FFolderPidl <> nil then - begin - DisposePidl(FFolderPidl); - FFolderPidl := nil; - end; - FShellFolder := AIFolder; - FFolderPidl := GetPidlCopy(AFolderPIDL); - ProcessDetails(ShellFolder, cPreloadItems); - FetchItems(cPreloadItems); - if AllowBackgroundProcessing then - RequestItemsInfo; -end; - -procedure TcxCustomItemProducer.SetItemsCount(Count: Integer); -begin - if Owner.HandleAllocated then - SendMessage(Owner.Handle, DSM_SETCOUNT, Count, 0); -end; - -procedure TcxCustomItemProducer.UnlockRead; -begin - ItemsLock.EndRead; -end; - -procedure TcxCustomItemProducer.UnlockWrite; -begin - ItemsLock.EndWrite; -end; - -procedure TcxCustomItemProducer.NotifyRemoveItem(Index: Integer); -begin - if Owner.HandleAllocated then - SendMessage(Owner.Handle, DSM_NOTIFYREMOVEITEM, Index, 0); -end; - -procedure TcxCustomItemProducer.NotifyAddItem(Index: Integer); -begin - if Owner.HandleAllocated then - SendMessage(Owner.Handle, DSM_NOTIFYADDITEM, Index, 0); -end; - -procedure TcxCustomItemProducer.InitializeItem(Item:TcxShellItemInfo); -begin - // Do nothing by default -end; - -function TcxCustomItemProducer.CanAddFolder(AFolder: TcxShellFolder): Boolean; -begin - Result := True; -end; - -function TcxCustomItemProducer.DoCompareItems(AItem1, AItem2: TcxShellFolder; - out ACompare: Integer): Boolean; -begin - Result := False; -end; - -procedure TcxCustomItemProducer.DoSort; - - function ShellSortFunction(Item1, Item2: Pointer): Integer; - const - R: array[Boolean] of Byte = (0, 1); - var - AItemInfo1, AItemInfo2: TcxShellItemInfo; - begin - AItemInfo1 := TcxShellItemInfo(Item1); - AItemInfo2 := TcxShellItemInfo(Item2); - if not AItemInfo1.ItemProducer.DoCompareItems(AItemInfo1.Folder, AItemInfo2.Folder, Result) then - begin - Result := R[AItemInfo2.IsFolder] - R[AItemInfo1.IsFolder]; - if Result = 0 then - Result := SmallInt(AItemInfo1.ItemProducer.ShellFolder.CompareIDs(0, AItemInfo1.pidl, AItemInfo2.pidl)); - end; - end; - -begin - Items.Sort(@ShellSortFunction); -end; - -procedure TcxCustomItemProducer.FetchItems(APreloadItems: Integer); -var - pEnum: IEnumIDList; - ACurrentCelt: Cardinal; - APidl: PItemIDList; - AItem: TcxShellItemInfo; - AHResult: HRESULT; - AIsEnumElementValid: Boolean; - -begin - if Succeeded(ShellFolder.EnumObjects(Owner.ParentWindow, GetEnumFlags, pEnum)) and - Assigned(pEnum) then - begin - ACurrentCelt := 1; - ShowHourglassCursor; - try - LockWrite; - try - repeat - AHResult := pEnum.Next(ACurrentCelt, APidl, ACurrentCelt); - if AHResult = E_INVALIDARG then - begin - ACurrentCelt := 1; - AHResult := pEnum.Next(ACurrentCelt, APidl, ACurrentCelt); - end; - AIsEnumElementValid := Succeeded(AHResult) and (AHResult <> S_FALSE) and - (ACurrentCelt <> 0) and (APidl <> nil); - if AIsEnumElementValid then - try - AItem := TcxShellItemInfo.Create(Self, ShellFolder, FFolderPidl, APidl, False); - if (AItem.Name = '') or not CanAddFolder(AItem.Folder) then - AItem.Free - else - begin - if APreloadItems > 0 then - begin - AItem.CheckUpdate(ShellFolder, FolderPidl, False); - Dec(APreloadItems); - end - else - InitializeItem(AItem); - Items.Add(AItem); - end; - finally - DisposePidl(APidl); - end; - until not AIsEnumElementValid; - Sort; - finally - UnlockWrite; - end; - SetItemsCount(Items.Count); - finally - HideHourglassCursor; - end; - end; -end; - -procedure TcxCustomItemProducer.ProcessDetails(ShellFolder: IShellFolder; - CharWidth: Integer); -var - DesktopFolder:IShellFolder; - Attr:Cardinal; - tempPidl:PitemIDList; -begin - if Failed(SHGetDesktopFolder(DesktopFolder)) then - Exit; - Attr:=0; - tempPidl:=GetPidlCopy(FolderPidl); - try - if Failed(DesktopFolder.GetAttributesOf(1,tempPidl,Attr)) then - Attr:=0; - Details.ProcessDetails(CharWidth,ShellFolder,(Attr and SFGAO_FILESYSTEM)=SFGAO_FILESYSTEM); - finally - DisposePidl(tempPidl); - end; -end; - -procedure TcxCustomItemProducer.DoGetInfoTip(Handle:HWND;ItemIndex: Integer; - InfoTip: PChar; cch: Integer); -var - ATempShellItem: TcxShellItemInfo; - ATempPidl: PItemIDList; - AQueryInfo: IQueryInfo; - AInfoStr: PWideChar; -{$IFNDEF DELPHI12}ADefaultChar: Char;{$ENDIF} -begin - if GetShowToolTip then - begin - if ItemIndex > Items.Count - 1 then - Exit; - ATempShellItem := Items[ItemIndex]; - ATempPidl := GetPidlCopy(ATempShellItem.pidl); - try - if Succeeded(ShellFolder.GetUIObjectOf(Handle, 1, ATempPidl, IQueryInfo, nil, AQueryInfo)) and - Succeeded(AQueryInfo.GetInfoTip(0, AInfoStr)) and (AInfoStr <> nil) then - begin - {$IFDEF DELPHI12} - StrLCopy(InfoTip, AInfoStr, cch); - {$ELSE} - ADefaultChar := #$7F; - cch := WideCharToMultiByte(0, 0, AInfoStr, -1, nil, 0, @ADefaultChar, nil); - WideCharToMultiByte(0, 0, AInfoStr, -1, InfoTip, cch, @ADefaultChar, nil); - StrPLCopy(InfoTip, StringReplace(InfoTip, ADefaultChar, '', [rfReplaceAll]), cch); - {$ENDIF} - cxMalloc.Free(AInfoStr); - end; - finally - DisposePidl(ATempPidl); - end; - end - else - StrPLCopy(InfoTip, '', cch); -end; - -function TcxCustomItemProducer.GetItemByPidl( - APidl: PItemIDList): TcxShellItemInfo; -var - AItemIndex: Integer; -begin - AItemIndex := GetItemIndexByPidl(APidl); - if AItemIndex <> -1 then - Result := Items[AItemIndex] - else - Result := nil; -end; - -function TcxCustomItemProducer.GetItemIndexByPidl( - APidl: PItemIDList): Integer; -var - I: Integer; - AItem: TcxShellItemInfo; -begin - Result := -1; - LockRead; - try - for I := 0 to Items.Count - 1 do - begin - AItem := Items[I]; - if SmallInt(ShellFolder.CompareIDs(0, AItem.pidl, APidl)) = 0 then - begin - Result := I; - Break; - end; - end; - finally - UnlockRead; - end; -end; - -procedure TcxCustomItemProducer.Sort; -begin - LockWrite; - try - DoSort; - finally - UnlockWrite; - end; -end; - -procedure TcxCustomItemProducer.FetchRequest(AIndex: Integer; - APriority: Boolean = False); -begin - ItemsInfoGatherer.RequestItemInfo(Self, AIndex, APriority); -end; - -procedure TcxCustomItemProducer.ClearFetchQueue; -begin - ItemsInfoGatherer.ClearFetchQueue(Self); -end; - -procedure TcxCustomItemProducer.CheckForSubitems(AItem: TcxShellItemInfo); -begin -end; - -{ TcxShellItemsInfoGatherer } - -constructor TcxShellItemsInfoGatherer.Create(AOwner: TWinControl); -begin - inherited Create; - FOwner := AOwner; - FFetchQueue := TList.Create; - CreateFetchThread; - RegisterShellItemsInfoGatherer(Self); -end; - -destructor TcxShellItemsInfoGatherer.Destroy; -begin - UnregisterShellItemsInfoGatherer(Self); - DestroyFetchThread; - FreeAndNil(FFetchQueue); - inherited Destroy; -end; - -procedure TcxShellItemsInfoGatherer.ClearFetchQueue( - AItemProducer: TcxCustomItemProducer); - - procedure InternalClearFetchQueue; - var - AItem: PcxRequestItem; - I: Integer; - begin - I := 0; - while I < FetchQueue.Count do - begin - AItem := FetchQueue[I]; - if (AItemProducer = nil) or (AItem.ItemProducer = AItemProducer) then - begin - FetchQueue.Remove(AItem); - Dispose(AItem); - end - else - Inc(I); - end; - end; - -begin - if FIsFetchQueueClearing then - Exit; - FIsFetchQueueClearing := True; - StopFetch; - try - InternalClearFetchQueue; - finally - FIsFetchQueueClearing := False; - ResumeFetch; - end; -end; - -procedure TcxShellItemsInfoGatherer.RequestItemInfo( - AItemProducer: TcxCustomItemProducer; AIndex: Integer; APriority: Boolean); -var - AItemIndex: Integer; -begin - StopFetch; - try - AItemIndex := GetFetchQueueItemIndex(FetchQueue, AItemProducer, AIndex); - if AItemIndex = -1 then - begin - if APriority then - FetchQueue.Insert(0, CreateRequestItem(AItemProducer, AIndex, True)) - else - FetchQueue.Add(CreateRequestItem(AItemProducer, AIndex, False)); - end - else - if APriority then - FetchQueue.Move(AItemIndex, 0); - finally - ResumeFetch; - end; -end; - -procedure TcxShellItemsInfoGatherer.ResumeFetch; -begin - if FStopFetchCount > 0 then - begin - Dec(FStopFetchCount); - if FStopFetchCount = 0 then - ResetEvent(FStopFetchEvent); - end; -end; - -procedure TcxShellItemsInfoGatherer.StopFetch; -begin - Inc(FStopFetchCount); - if FStopFetchCount = 1 then - begin - SetEvent(FStopFetchEvent); - WaitForSingleObject(FFetchStoppedEvent, INFINITE); - end; -end; - -procedure TcxShellItemsInfoGatherer.DestroyFetchThread; -begin - TerminateFetchThread; - InternalCloseHandle(FFetchThread); - InternalCloseHandle(FFetchStoppedEvent); - InternalCloseHandle(FStopFetchEvent); - InternalCloseHandle(FTerminateFetchThreadEvent); -end; - -procedure TcxShellItemsInfoGatherer.CreateFetchThread; -var - AFetchThreadID: DWORD; -begin - FFetchStoppedEvent := CreateEvent(nil, True, False, nil); - FStopFetchEvent := CreateEvent(nil, True, False, nil); - FTerminateFetchThreadEvent := CreateEvent(nil, True, False, nil); - FFetchThread := CreateThread(nil, 0, - @cxShellItemsInfoGathererFetchThreadFunction, Self, 0, AFetchThreadID); -end; - -function TcxShellItemsInfoGatherer.CreateRequestItem( - AItemProducer: TcxCustomItemProducer; AIndex: Integer; - APriority: Boolean): PcxRequestItem; -begin - New(Result); - Result.ItemIndex := AIndex; - Result.ItemProducer := AItemProducer; - Result.Priority := APriority; -end; - -function TcxShellItemsInfoGatherer.GetFetchQueueItemIndex( - AFetchQueue: TList; AItemProducer: TcxCustomItemProducer; - AIndex: Integer): Integer; -var - APItem: PcxRequestItem; - I: Integer; -begin - Result := -1; - for I := 0 to AFetchQueue.Count - 1 do - begin - APItem := AFetchQueue[I]; - if (APItem.ItemIndex = AIndex) and (APItem.ItemProducer = AItemProducer) then - begin - Result := I; - Break; - end; - end; -end; - -function TcxShellItemsInfoGatherer.GetIsFetchStopping: Boolean; -begin - Result := WaitForSingleObject(FStopFetchEvent, 0) = WAIT_OBJECT_0; -end; - -function TcxShellItemsInfoGatherer.GetIsFetchThreadTerminating: Boolean; -begin - Result := WaitForSingleObject(FTerminateFetchThreadEvent, 0) = WAIT_OBJECT_0; -end; - -procedure TcxShellItemsInfoGatherer.FetchResumed; -begin - ResetEvent(FFetchStoppedEvent); -end; - -procedure TcxShellItemsInfoGatherer.FetchStopped; -begin - SetEvent(FFetchStoppedEvent); -end; - -procedure TcxShellItemsInfoGatherer.InternalCloseHandle(var AHandle: THandle); -begin - CloseHandle(AHandle); - AHandle := 0; -end; - -procedure TcxShellItemsInfoGatherer.TerminateFetchThread; -begin - SetEvent(FTerminateFetchThreadEvent); - WaitForSingleObject(FFetchThread, INFINITE); -end; - -{ TcxShellFolder } - -constructor TcxShellFolder.Create(AAbsolutePIDL: PItemIDList); -var - AParentPIDL: PItemIDList; -begin - inherited Create; - FAbsolutePIDL := AAbsolutePIDL; - if GetPIDLItemsCount(FAbsolutePIDL) <= 1 then - begin - FParentShellFolder := GetDesktopIShellFolder; - FRelativePIDL := GetPIDLCopy(FAbsolutePIDL); - end - else - begin - AParentPIDL := GetPIDLParent(FAbsolutePIDL); - try - GetDesktopIShellFolder.BindToObject(AParentPIDL, nil, IID_IShellFolder, - FParentShellFolder); - finally - DisposePidl(AParentPIDL); - end; - FRelativePIDL := GetPIDLCopy(GetLastPIDLItem(FAbsolutePIDL)); - end; -end; - -destructor TcxShellFolder.Destroy; -begin - DisposePIDL(FRelativePIDL); - inherited Destroy; -end; - -function TcxShellFolder.GetAttributes: TcxShellFolderAttributes; - - procedure CheckAttribute(AShellAttributes, AAttributeShellAttribute: LongWord; - AAttribute: TcxShellFolderAttribute); - begin - if HasShellAttribute(AShellAttributes, AAttributeShellAttribute) then - Include(Result, AAttribute); - end; - -var - AShellAttributes: LongWord; -begin - AShellAttributes := GetShellAttributes(SFGAO_DISPLAYATTRMASK); - Result := []; - CheckAttribute(AShellAttributes, cxSFGAO_GHOSTED, sfaGhosted); - CheckAttribute(AShellAttributes, SFGAO_HIDDEN, sfaHidden); - CheckAttribute(AShellAttributes, SFGAO_ISSLOW, sfaIsSlow); - CheckAttribute(AShellAttributes, SFGAO_LINK, sfaLink); - CheckAttribute(AShellAttributes, SFGAO_READONLY, sfaReadOnly); - CheckAttribute(AShellAttributes, SFGAO_SHARE, sfaShare); -end; - -function TcxShellFolder.GetCapabilities: TcxShellFolderCapabilities; - - procedure CheckCapability(AShellAttributes, ACapabilityShellAttribute: LongWord; - ACapability: TcxShellFolderCapability); - begin - if HasShellAttribute(AShellAttributes, ACapabilityShellAttribute) then - Include(Result, ACapability); - end; - -var - AShellAttributes: LongWord; -begin - AShellAttributes := GetShellAttributes(SFGAO_CAPABILITYMASK); - Result := []; - CheckCapability(AShellAttributes, SFGAO_CANCOPY, sfcCanCopy); - CheckCapability(AShellAttributes, SFGAO_CANDELETE, sfcCanDelete); - CheckCapability(AShellAttributes, SFGAO_CANLINK, sfcCanLink); - CheckCapability(AShellAttributes, SFGAO_CANMOVE, sfcCanMove); - CheckCapability(AShellAttributes, SFGAO_CANRENAME, sfcCanRename); - CheckCapability(AShellAttributes, SFGAO_DROPTARGET, sfcDropTarget); - CheckCapability(AShellAttributes, SFGAO_HASPROPSHEET, sfcHasPropSheet); -end; - -function TcxShellFolder.GetDisplayName: string; -begin - Result := InternalGetDisplayName(ParentShellFolder, RelativePIDL, SHGDN_INFOLDER); -end; - -function TcxShellFolder.GetIsFolder: Boolean; -begin - Result := HasShellAttribute(SFGAO_FOLDER); -end; - -function TcxShellFolder.GetPathName: string; - - function GetDisplayName(ANameType: DWORD): string; - begin - Result := InternalGetDisplayName(GetDesktopIShellFolder, AbsolutePIDL, ANameType); - end; - -begin - Result := InternalGetDisplayName(GetDesktopIShellFolder, AbsolutePIDL, SHGDN_FORPARSING); - if Pos('::{', Result) = 1 then - Result := InternalGetDisplayName(GetDesktopIShellFolder, AbsolutePIDL, SHGDN_NORMAL); -end; - -function TcxShellFolder.GetProperties: TcxShellFolderProperties; - - procedure CheckProperty(AShellAttributes, APropertyShellAttribute: LongWord; - AProperty: TcxShellFolderProperty); - begin - if HasShellAttribute(AShellAttributes, APropertyShellAttribute) then - Include(Result, AProperty); - end; - -var - AShellAttributes: LongWord; -begin - AShellAttributes := GetShellAttributes(SFGAO_BROWSABLE or SFGAO_COMPRESSED or - SFGAO_ENCRYPTED or SFGAO_NEWCONTENT or SFGAO_NONENUMERATED or SFGAO_REMOVABLE); - Result := []; - CheckProperty(AShellAttributes, SFGAO_BROWSABLE, sfpBrowsable); - CheckProperty(AShellAttributes, SFGAO_COMPRESSED, sfpCompressed); - CheckProperty(AShellAttributes, SFGAO_ENCRYPTED, sfpEncrypted); - CheckProperty(AShellAttributes, SFGAO_NEWCONTENT, sfpNewContent); - CheckProperty(AShellAttributes, SFGAO_NONENUMERATED, sfpNonEnumerated); - CheckProperty(AShellAttributes, SFGAO_REMOVABLE, sfpRemovable); -end; - -function TcxShellFolder.GetShellAttributes(ARequestedAttributes: LongWord): LongWord; -begin - ParentShellFolder.GetAttributesOf(1, FRelativePIDL, ARequestedAttributes); - Result := ARequestedAttributes; -end; - -function TcxShellFolder.GetShellFolder: IShellFolder; -begin - if GetPIDLItemsCount(AbsolutePIDL) = 0 then - Result := GetDesktopIShellFolder - else - GetDesktopIShellFolder.BindToObject(AbsolutePIDL, nil, IID_IShellFolder, Result); -end; - -function TcxShellFolder.GetStorageCapabilities: TcxShellFolderStorageCapabilities; - - procedure CheckStorageCapability(AShellAttributes, AStorageCapabilityShellAttribute: LongWord; - AStorageCapability: TcxShellFolderStorageCapability); - begin - if HasShellAttribute(AShellAttributes, AStorageCapabilityShellAttribute) then - Include(Result, AStorageCapability); - end; - -var - AShellAttributes: LongWord; -begin - AShellAttributes := GetShellAttributes(SFGAO_STORAGECAPMASK); - Result := []; - CheckStorageCapability(AShellAttributes, SFGAO_FILESYSANCESTOR, sfscFileSysAncestor); - CheckStorageCapability(AShellAttributes, SFGAO_FILESYSTEM, sfscFileSystem); - CheckStorageCapability(AShellAttributes, SFGAO_FOLDER, sfscFolder); - CheckStorageCapability(AShellAttributes, SFGAO_LINK, sfscLink); - CheckStorageCapability(AShellAttributes, SFGAO_READONLY, sfscReadOnly); - CheckStorageCapability(AShellAttributes, SFGAO_STORAGE, sfscStorage); - CheckStorageCapability(AShellAttributes, SFGAO_STORAGEANCESTOR, sfscStorageAncestor); - CheckStorageCapability(AShellAttributes, SFGAO_STREAM, sfscStream); -end; - -function TcxShellFolder.GetSubFolders: Boolean; -begin - Result := HasShellAttribute(SFGAO_HASSUBFOLDER); -end; - -function TcxShellFolder.HasShellAttribute(AAttribute: LongWord): Boolean; -begin - Result := HasShellAttribute(GetShellAttributes(AAttribute), AAttribute); -end; - -function TcxShellFolder.HasShellAttribute(AAttributes, AAttribute: LongWord): Boolean; -begin - Result := AAttributes and AAttribute <> 0; -end; - -function TcxShellFolder.InternalGetDisplayName(AFolder: IShellFolder; - APIDL: PItemIDList; ANameType: DWORD): string; -var - AStrRet: TStrRet; -begin - AFolder.GetDisplayNameOf(APIDL, ANameType, AStrRet); - Result := GetTextFromStrRet(AStrRet, APIDL); -end; - -{ TcxShellItemInfo } - -procedure TcxShellItemInfo.CheckInitialize(AIFolder: IShellFolder; - APIDL: PItemIDList); -var - AAttributes: Cardinal; -begin - if Initialized then - Exit; - - AAttributes := SFGAO_FOLDER; - if Succeeded(AIFolder.GetAttributesOf(1, APIDL, AAttributes)) then - FIsFolder := AAttributes and SFGAO_FOLDER <> 0 - else - begin - FIsFolder := False; - FIsFilesystem := False; - FIsDropTarget := True; - FCanRename := True; - end; - if IsFolder then - FHasSubfolder := True - else - FHasSubfolder := False; - FName := GetShellItemDisplayName(AIFolder, APIDL, IsFolder); - if IsFolder then - begin - FIconIndex := sysFolderIconIndex; - FOpenIconIndex := sysFolderOpenIconIndex; - end - else - begin - FIconIndex := sysFileIconIndex; - FOpenIconIndex := sysFileIconIndex; - end; - FInitialized := True; -end; - -{ TcxShellItemInfo } - -procedure TcxShellItemInfo.CheckSubitems(AParentIFolder: IShellFolder; - AEnumSettings: Cardinal); -begin - FHasSubfolder := HasSubItems(AParentIFolder, FFullPIDL, AEnumSettings); -end; - -procedure TcxShellItemInfo.CheckUpdate(ShellFolder: IShellFolder; - FolderPidl:PItemIDList;Fast:Boolean); -var - attr:Cardinal; - FileInfo:TShFileInfo; - fqPidl:PItemIDList; - Flags:Cardinal; - pszName:PChar; - tempPidl:PItemIDList; -begin - if Updated or Updating then - Exit; - Updating:=True; - try - Assert(pidl<>nil,'Item object not initialized'); - if pidl=nil then - Exit; - fqPidl:=ConcatenatePidls(FolderPidl,pidl); - try - attr:=0; - tempPidl:=pidl; - CheckInitialize(ShellFolder,tempPidl); - if Fast then - begin - if not IsFolder then - begin - GetMem(pszName,MAX_PATH); - try - StrPLCopy(pszName,Name,MAX_PATH); - cxShellGetThreadSafeFileInfo(pszName,FILE_ATTRIBUTE_NORMAL,FileInfo,SizeOf(TShFileInfo), - SHGFI_SYSICONINDEX or SHGFI_USEFILEATTRIBUTES); - FIconIndex:=FileInfo.iIcon; - cxShellGetThreadSafeFileInfo(pszName,FILE_ATTRIBUTE_NORMAL,FileInfo,SizeOf(TShFileInfo), - SHGFI_SYSICONINDEX or SHGFI_USEFILEATTRIBUTES or - SHGFI_OPENICON); - FOpenIconIndex:=FileInfo.iIcon; - finally - FreeMem(pszName); - end; - end - else - begin - Flags:=SHGFI_PIDL or SHGFI_SYSICONINDEX; - cxShellGetThreadSafeFileInfo(PChar(fqPidl),0,FileInfo,SizeOf(FileInfo),Flags); - FIconIndex:=FileInfo.iIcon; - end; - end - else - begin - // Processing attributes - if Succeeded(ShellFolder.GetAttributesOf(1,TempPidl,attr)) then - FIsFilesystem:=(attr and SFGAO_FILESYSTEM)=SFGAO_FILESYSTEM; - attr:=SFGAO_HIDDEN or SFGAO_SHARE or SFGAO_LINK or SFGAO_REMOVABLE; - if Succeeded(ShellFolder.GetAttributesOf(1,TempPidl,attr)) then - begin - FIsGhosted:=(attr and SFGAO_HIDDEN)=SFGAO_HIDDEN; - FIsShare:=(attr and SFGAO_SHARE)=SFGAO_SHARE; - FIsLink:=(attr and SFGAO_LINK)=SFGAO_LINK; - FIsRemovable:=(attr and SFGAO_REMOVABLE)=SFGAO_REMOVABLE; - end; - attr:=SFGAO_CAPABILITYMASK; - if Succeeded(ShellFolder.GetAttributesOf(1,TempPidl,attr)) then - begin - FIsDropTarget:=(attr and SFGAO_DROPTARGET)=SFGAO_DROPTARGET; - FCanRename:=(attr and SFGAO_CANRENAME)=SFGAO_CANRENAME; - end; - // Processing icons - Flags:=SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_TYPENAME; - cxShellGetThreadSafeFileInfo(PChar(fqPidl),0,FileInfo,SizeOf(FileInfo),Flags); - FIconIndex:=FileInfo.iIcon; - if FIsFolder then - cxShellGetThreadSafeFileInfo(PChar(fqPidl),0,FileInfo,SizeOf(FileInfo),Flags or SHGFI_OPENICON); - FOpenIconIndex:=FileInfo.iIcon; - Updated:=True; - end; - finally - DisposePidl(fqPidl); - end; - finally - Updating:=False; - end; -end; - -constructor TcxShellItemInfo.Create(AItemProducer: TcxCustomItemProducer; - AParentIFolder: IShellFolder; AParentPIDL, APIDL: PItemIDList; - AFast: Boolean); -var - AWithoutAV: Boolean; -begin - inherited Create; - FItemProducer := AItemProducer; - // the following code required to get rid of bug, that occasionally appeared - // on Windows XP. The pidl received from thr shell, anothed memory block - // allocated internally, but occasionally appeared exception thad CopyMemory - // can't be performed - FDetails := TStringList.Create; - repeat - try - FPIDL := GetPidlCopy(APIDL); - AWithoutAV := True; - except - AWithoutAV := False; - end; - until AWithoutAV; - if not AFast then - CheckInitialize(AParentIFolder, APIDL) - else - begin - FName := ' '; - FIconIndex := sysFileIconIndex; - FOpenIconIndex := sysFileIconIndex; - end; - FInfoTip := ''; - FUpdated := False; - FUpdating := False; - FFullPIDL := ConcatenatePidls(AParentPIDL, APIDL); - FFolder := TcxShellFolder.Create(FFullPIDL); -end; - -destructor TcxShellItemInfo.Destroy; -begin - FreeAndNil(FFolder); - DisposePidl(FFullPIDL); - DisposePidl(Fpidl); - FreeAndNil(FDetails); - inherited; -end; - -procedure TcxShellItemInfo.FetchDetails(wnd:HWND;ShellFolder: IShellFolder;DetailsMap:TcxShellDetails); - - function FormatSizeStr(AStr: string): string; - begin - Result := FormatMaskText('!### ### ### KB;0;*', AStr); - end; - - function GetFileTypeInfo(const AFilename: string): string; - begin - Result := GetRegStringValue(GetRegStringValue(ExtractFileExt(AFileName), ''), ''); - end; - -var - AColumnDetails: TShellDetails; - AFileInfo: TWIN32FindData; - AFileSize: record - case integer of - 0:(l,h:cardinal); - 1:(c:int64); - end; - AFindFileHandle: THandle; - APDetailItem: PcxDetailItem; - AShellDetails: IShellDetails; - AShellFolder2: IShellFolder2; - AStrPath: TStrRet; - ATempName: PChar; - I: Integer; -begin - // Processing details - Details.Clear; - if Succeeded(ShellFolder.QueryInterface({$IFNDEF DELPHI6}cxIID_IShellFolder2{$ELSE}cxIShellFolder2{$ENDIF}, AShellFolder2)) then - begin - for I := 0 to DetailsMap.Count - 1 do - begin - APDetailItem := DetailsMap[I]; - if APDetailItem.ID = 0 then - Continue; // Name column already exists - if AShellFolder2.GetDetailsOf(pidl, APDetailItem.ID, AColumnDetails) = S_OK then - Details.Add(GetTextFromStrRet(AColumnDetails.str, pidl)) - else - Details.Add(''); - end; - end - else - if Succeeded(GetShellDetails(ShellFolder, pidl, AShellDetails)) then - begin - for I := 0 to DetailsMap.Count - 1 do - begin - APDetailItem := DetailsMap[I]; - if APDetailItem.ID = 0 then - Continue; // Name column already exists - if AShellDetails.GetDetailsOf(pidl, APDetailItem.ID, AColumnDetails) = S_OK then - Details.Add(GetTextFromStrRet(AColumnDetails.str, pidl)) - else - Details.Add(''); - end; - end - else - if IsFilesystem then - begin - if Failed(ShellFolder.GetDisplayNameOf(pidl, SHGDN_NORMAL or SHGDN_FORPARSING, AStrPath)) then - Exit; - GetMem(ATempName, MAX_PATH); - try - StrPLCopy(ATempName, GetTextFromStrRet(AStrPath, pidl), MAX_PATH); - AFindFileHandle := FindFirstFile(ATempName, AFileInfo); - if AFindFileHandle <> INVALID_HANDLE_VALUE then - try - AFileSize.h := AFileInfo.nFileSizeHigh; - AFileSize.l := AFileInfo.nFileSizeLow; - Details.Add(FormatSizeStr(IntToStr(Ceil(AFileSize.c/1024)))); - Details.Add(GetFileTypeInfo(AFileInfo.cFileName)); - Details.Add(DateTimeToStr(cxFileTimeToDateTime(AFileInfo.ftLastWriteTime))); - finally - Windows.FindClose(AFindFileHandle); - end; - finally - FreeMem(ATempName); - end; - end; -end; - -procedure TcxShellItemInfo.SetNewPidl(pFolder:IShellFolder;FolderPidl,apidl: PItemIDList); -begin - if apidl=nil then - Exit; - if Fpidl<>nil then - DisposePidl(FPidl); - FPidl:=GetPidlCopy(apidl); - Updated:=False; - CheckUpdate(pFolder,FolderPidl,False); -end; - -{ TcxShellOptions } - -constructor TcxShellOptions.Create(AOwner: TWinControl); -begin - inherited Create; - FOwner := AOwner; - FContextMenus := True; - FShowFolders := True; - FShowNonFolders := True; - FShowToolTip := True; - FTrackShellChanges := True; -end; - -procedure TcxShellOptions.Assign(Source: TPersistent); -begin - if Source is TcxShellOptions then - with TcxShellOptions(Source) do - begin - Self.FContextMenus := FContextMenus; - Self.FShowFolders := FShowFolders; - Self.FShowHidden := FShowHidden; - Self.FShowNonFolders := FShowNonFolders; - Self.ShowToolTip := ShowToolTip; - Self.FTrackShellChanges := FTrackShellChanges; - NotifyUpdateContents; - end - else - inherited Assign(Source); -end; - -function TcxShellOptions.GetEnumFlags: Cardinal; -begin - if ShowFolders then - Result := SHCONTF_FOLDERS - else - Result := 0; - if ShowNonFolders then - Result := Result or SHCONTF_NONFOLDERS; - if ShowHidden then - Result := Result or SHCONTF_INCLUDEHIDDEN; -end; - -procedure TcxShellOptions.NotifyUpdateContents; -begin - if Owner.HandleAllocated then - SendMessage(Owner.Handle, DSM_NOTIFYUPDATECONTENTS, 0, 0); -end; - -procedure TcxShellOptions.SetShowFolders(Value: Boolean); -begin - FShowFolders := Value; - NotifyUpdateContents; -end; - -procedure TcxShellOptions.SetShowHidden(Value: Boolean); -begin - FShowHidden := Value; - NotifyUpdateContents; -end; - -procedure TcxShellOptions.SetShowNonFolders(Value: Boolean); -begin - FShowNonFolders := Value; - NotifyUpdateContents; -end; - -procedure TcxShellOptions.SetShowToolTip(Value: Boolean); -begin - if Value <> FShowToolTip then - begin - FShowToolTip := Value; - if Assigned(FOnShowToolTipChanged) then - FOnShowToolTipChanged(Self); - end; -end; - -{ TcxShellDetails } - -function TcxShellDetails.Add: PcxDetailItem; -begin - New(Result); - Items.Add(Result); -end; - -procedure TcxShellDetails.Clear; -var - di:PcxDetailItem; -begin - while Items.Count<>0 do - begin - di:=Items.Last; - Items.Remove(di); - Dispose(di); - end; -end; - -constructor TcxShellDetails.Create; -begin - inherited Create; - FItems:=TList.Create; -end; - -destructor TcxShellDetails.Destroy; -begin - Clear; - FreeAndNil(FItems); -end; - -function TcxShellDetails.GetCount: Integer; -begin - Result:=Items.Count; -end; - -function TcxShellDetails.GetItems(Index: Integer): PcxDetailItem; -begin - Result:=Items[Index]; -end; - -procedure TcxShellDetails.ProcessDetails(ACharWidth: Integer; - AShellFolder: IShellFolder; AFileSystem: Boolean); -const - AAlignment: array[0..2] of TAlignment = (taLeftJustify, taRightJustify, taCenter); -var - AColumnDetails: TShellDetails; - AColumnFlags: Cardinal; - AColumnIndex: Integer; - SD: IShellDetails; - SF2: IShellFolder2; - - procedure SetItemInfo(AItem: PcxDetailItem; AText: string; AWidth:Integer; - AAlignment: TAlignment; AID:Integer); - begin - AItem.Text := AText; - AItem.Width := AWidth * ACharWidth; - AItem.Alignment := AAlignment; - AItem.ID := AID; - end; - - procedure AddItem(ADetails: TShellDetails; AIndex: Integer; AText: string); - var - ANewColumn: PcxDetailItem; - begin - ANewColumn := Add; - SetItemInfo(ANewColumn, AText, ADetails.cxChar, AAlignment[ADetails.fmt], AIndex); - end; - -var - ADefaultColumns: Boolean; - AText: WideString; -begin - ZeroMemory(@AColumnDetails, SizeOf(AColumnDetails)); - AColumnIndex := 0; - Clear; - if Succeeded(AShellFolder.QueryInterface({$IFNDEF DELPHI6}cxIID_IShellFolder2{$ELSE}cxIShellFolder2{$ENDIF}, SF2)) then - begin - ADefaultColumns := False; - while SF2.GetDetailsOf(nil, AColumnIndex, AColumnDetails) = S_OK do - begin - Inc(AColumnIndex); - AText := GetTextFromStrRet(AColumnDetails.str, nil); - if Succeeded(SF2.GetDefaultColumnState(AColumnIndex - 1, AColumnFlags)) then - begin - ADefaultColumns := ADefaultColumns or (AColumnFlags and SHCOLSTATE_ONBYDEFAULT = SHCOLSTATE_ONBYDEFAULT); - if not IsWinXPOrLater and ADefaultColumns and - (AColumnFlags and SHCOLSTATE_ONBYDEFAULT <> SHCOLSTATE_ONBYDEFAULT) then - Break; - if (AColumnFlags and SHCOLSTATE_ONBYDEFAULT <> SHCOLSTATE_ONBYDEFAULT) or - (AColumnFlags and SHCOLSTATE_HIDDEN = SHCOLSTATE_HIDDEN) then - Continue; - end; - AddItem(AColumnDetails, AColumnIndex - 1, AText); - end; - end - else - if GetShellDetails(AShellFolder, nil, SD) = S_OK then - begin - while SD.GetDetailsOf(nil, AColumnIndex, AColumnDetails) = S_OK do - begin - AText := GetTextFromStrRet(AColumnDetails.str, nil); - AddItem(AColumnDetails, AColumnIndex, AText); - Inc(AColumnIndex); - end; - end - else - begin // Processing creating columns manually (for Win95/98) - SetItemInfo(Add, SShellDefaultNameStr, 25, taLeftJustify, 0); - if AFileSystem then - begin - SetItemInfo(Add, SShellDefaultSizeStr, 10, taRightJustify, 1); - SetItemInfo(Add, SShellDefaultTypeStr, 10, taLeftJustify, 2); - SetItemInfo(Add, SShellDefaultModifiedStr, 14, taLeftJustify, 3); - end; - end; -end; - -procedure TcxShellDetails.Remove(Item: PcxDetailItem); -begin - Items.Remove(Item); - Dispose(Item); -end; - -{ TcxDropTarget } - -constructor TcxDropSource.Create(AOwner: TWinControl); -begin - inherited Create; - FOwner := AOwner; -end; - -function TcxDropSource.GiveFeedback(dwEffect: Integer): HResult; -begin - Result:=DRAGDROP_S_USEDEFAULTCURSORS; -end; - -function TcxDropSource.QueryContinueDrag(fEscapePressed: BOOL; - grfKeyState: Integer): HResult; -begin - if fEscapePressed then - Result:=DRAGDROP_S_CANCEL - else - if ((grfKeyState and MK_LBUTTON)<>MK_LBUTTON) and - ((grfKeyState and MK_RBUTTON)<>MK_RBUTTON) then - Result:=DRAGDROP_S_DROP - else - Result:=S_OK; -end; - -{ TcxDragDropSettings } - -constructor TcxDragDropSettings.Create; -begin - inherited Create; - FAllowDragObjects := True; - FDefaultDropEffect := deMove; - FDropEffect := [deMove, deCopy, deLink]; -end; - -procedure TcxDragDropSettings.Changed; -begin - if Assigned(FOnChange) then - FOnChange(Self); -end; - -function TcxDragDropSettings.GetDefaultDropEffectAPI: Integer; -begin - case DefaultDropEffect of - deCopy: - Result := DROPEFFECT_COPY; - deMove: - Result := DROPEFFECT_MOVE; - deLink: - Result := DROPEFFECT_LINK; - else - Result := DROPEFFECT_NONE; - end; -end; - -function TcxDragDropSettings.GetDropEffectAPI: DWORD; -begin - Result := 0; - if deCopy in DropEffect then - Result := Result or DROPEFFECT_COPY; - if deMove in DropEffect then - Result := Result or DROPEFFECT_MOVE; - if deLink in DropEffect then - Result := Result or DROPEFFECT_LINK; -end; - -procedure TcxDragDropSettings.SetAllowDragObjects(Value: Boolean); -begin - if Value <> FAllowDragObjects then - begin - FAllowDragObjects := Value; - Changed; - end; -end; - -procedure cxShellInitialize; -begin - FComInitializationSucceeded := Succeeded(OleInitialize(nil)); - FShellLock := TCriticalSection.Create; - ShellLibrary := LoadLibrary(ShellLibraryName); - cxSHGetFolderLocation := GetProcAddress(ShellLibrary, 'SHGetFolderLocation'); - SHChangeNotifyRegister := GetProcAddress(ShellLibrary,PChar(2)); - SHChangeNotifyUnregister := GetProcAddress(ShellLibrary,PChar(4)); - SHChangeNotification_Lock := GetProcAddress(ShellLibrary, PChar(644)); - SHChangeNotification_UnLock := GetProcAddress(ShellLibrary, PChar(645)); - cxSHGetPathFromIDList := GetProcAddress(ShellLibrary, 'SHGetPathFromIDListA'); - cxSHGetPathFromIDListW := GetProcAddress(ShellLibrary, 'SHGetPathFromIDListW'); -end; - -procedure cxShellUninitialize; -var - I: Integer; -begin - if FShellItemsInfoGatherers <> nil then - for I := 0 to FShellItemsInfoGatherers.Count - 1 do - TcxShellItemsInfoGatherer(FShellItemsInfoGatherers[I]).DestroyFetchThread; - - FcxMalloc := nil; - if ShellLibrary <> 0 then - FreeLibrary(ShellLibrary); - FreeAndNil(FShellLock); - if FComInitializationSucceeded then - OleUninitialize; -end; - -initialization - cxShellInitialize; - -finalization - cxShellUninitialize; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxShellControls.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxShellControls.pas deleted file mode 100644 index 77b83039..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxShellControls.pas +++ /dev/null @@ -1,2928 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxShellControls; - -{$I cxVer.inc} - -interface - -uses - Windows, ActiveX, Classes, ComCtrls, CommCtrl, ComObj, Controls, Dialogs, - Menus, Messages, ShellApi, ShlObj, SysUtils, dxCore, cxControls, cxShellCommon; - -const - cxShellNormalItemOverlayIndex = -1; - cxShellSharedItemOverlayIndex = 0; - cxShellShortcutItemOverlayIndex = 1; - -type - TcxCustomInnerShellListView = class; - TcxCustomInnerShellTreeView = class; - - TcxListViewStyle=(lvsIcon, lvsSmallIcon, lvsList, lvsReport); - // Custom listview styles added because D4 and D5 does not allow detect - // the ViewStyle change. Also, we can add more styles to this component: - // Tile/Thumbnails/Custom... - - TcxNavigationEvent = procedure (Sender: TcxCustomInnerShellListView; APIDL: PItemIDList; - ADisplayName: WideString) of object; - TcxShellExecuteItemEvent = procedure (Sender: TObject; APIDL: PItemIDList; var AHandled: Boolean) of object; - TcxShellAddFolderEvent = procedure(Sender: TObject; AFolder: TcxShellFolder; var ACanAdd: Boolean) of object; - TcxShellChangeEvent = procedure(Sender: TObject; AEventID: DWORD; APIDL1, APIDL2: PItemIDList) of object; - TcxShellCompareEvent = procedure(Sender: TObject; - AItem1, AItem2: TcxShellFolder; {$IFDEF BCB}var{$ELSE}out{$ENDIF} ACompare: Integer) of object; - - TcxShellListViewProducer = class(TcxCustomItemProducer) - private - function GetListView: TcxCustomInnerShellListView; - protected - function AllowBackgroundProcessing: Boolean; override; - function CanAddFolder(AFolder: TcxShellFolder): Boolean; override; - function DoCompareItems(AItem1, AItem2: TcxShellFolder; - out ACompare: Integer): Boolean; override; - function GetEnumFlags: Cardinal; override; - function GetItemsInfoGatherer: TcxShellItemsInfoGatherer; override; - function GetShowToolTip: Boolean; override; - property ListView: TcxCustomInnerShellListView read GetListView; - public - procedure NotifyUpdateItem(AItem: PcxRequestItem); override; - procedure ProcessDetails(ShellFolder: IShellFolder; CharWidth: Integer); override; - end; - - { TcxShellListRoot } - - TcxShellListRoot = class(TcxCustomShellRoot) - protected - procedure RootUpdated; override; - end; - - TDropTargetType = (dttNone, dttOpenFolder, dttItem); - - IcxDropTarget = interface(IDropTarget) - ['{F688E250-96A6-4222-AF9D-049EB6E7D05B}'] - end; - - { TcxShellListViewOptions } - - TcxShellListViewOptions = class(TcxShellOptions) - private - FAutoExecute: Boolean; - FAutoNavigate: Boolean; - public - constructor Create(AOwner: TWinControl); override; - procedure Assign(Source: TPersistent); override; - published - property AutoExecute: Boolean read FAutoExecute write FAutoExecute default True; - property AutoNavigate: Boolean read FAutoNavigate write FAutoNavigate default True; - end; - - IcxDataObject = interface(IDataObject) - ['{9A9CDB78-150E-4469-A551-608EFF415145}'] - end; - - TcxShellChangeNotifierData = record - Handle: THandle; - PIDL: PItemIDList; - end; - - { TcxCustomInnerShellListView } - - TcxCustomInnerShellListView = class(TCustomListView, IUnknown, IcxDropTarget) - private - FComboBoxControl: TWinControl; - FCurrentDropTarget: IcxDropTarget; - FDragDropSettings: TcxDragDropSettings; - FDraggedObject: IcxDataObject; - FDropTargetItemIndex: Integer; - FFirstUpdateItem: Integer; - FInternalLargeImages: THandle; - FInternalSmallImages: THandle; - FItemProducer: TcxShellListViewProducer; - FItemsInfoGatherer: TcxShellItemsInfoGatherer; - FLastUpdateItem: Integer; - FListViewStyle: TcxListViewStyle; - FNotificationLock: Boolean; - FOptions: TcxShellListViewOptions; - FRoot: TcxShellListRoot; - FShellChangeNotifierData: TcxShellChangeNotifierData; - FTreeViewControl: TWinControl; - - FAfterNavigation: TcxNavigationEvent; - FBeforeNavigation: TcxNavigationEvent; - FRootChanged: TcxRootChangedEvent; - FOnAddFolder: TcxShellAddFolderEvent; - FOnCompare: TcxShellCompareEvent; - FOnExecuteItem: TcxShellExecuteItemEvent; - FOnShellChange: TcxShellChangeEvent; - function GetFolder(AIndex: Integer): TcxShellFolder; - function GetFolderCount: Integer; - procedure RootSettingsChanged(Sender: TObject); - procedure SetListViewStyle(const Value: TcxListViewStyle); - procedure SetDropTargetItemIndex(Value: Integer); - procedure ShellChangeNotify(AEventID: Longint; APidl1, APidl2: PItemIDList); - procedure DSMSynchronizeRoot(var Message: TMessage); message DSM_SYNCHRONIZEROOT; - procedure DsmSystemShellChangeNotify(var Message: TMessage); message DSM_SYSTEMSHELLCHANGENOTIFY; - protected - procedure CreateWnd; override; - procedure DestroyWnd; override; - function OwnerDataFetch(Item: TListItem; Request: TItemRequest): Boolean; override; - function OwnerDataFind(Find: TItemFind; const FindString: string; - const FindPosition: TPoint; FindData: Pointer; StartIndex: Integer; - Direction: TSearchDirection; Wrap: Boolean): Integer; override; - procedure DblClick; override; - procedure DoContextPopup(MousePos: TPoint; var Handled: Boolean); override; - function CanEdit(Item: TListItem): Boolean; override; - procedure Loaded;override; - procedure Edit(const Item: TLVItem); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure DisplayContextMenu(const APos: TPoint); - procedure DoProcessDefaultCommand(Item:TcxShellItemInfo); virtual; - procedure DoProcessNavigation(Item:TcxShellItemInfo); - procedure DoBeforeNavigation(fqPidl:PItemIDList); - function DoAddFolder(AFolder: TcxShellFolder): Boolean; - procedure DoAfterNavigation; - function DoCompare(AItem1, AItem2: TcxShellFolder; - out ACompare: Integer): Boolean; virtual; - procedure CreateColumns; - procedure CreateDropTarget; - procedure CreateChangeNotification; - procedure RemoveColumns; - procedure RemoveDropTarget; - procedure RemoveChangeNotification; - procedure CheckUpdateItems; - procedure DoBeginDrag; - procedure DoNavigateTreeView; - procedure GetDropTarget(pt: TPoint; out New: Boolean); - procedure Navigate(APIDL: PItemIDList); virtual; - function TryReleaseDropTarget: HResult; - procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; - procedure DsmSetCount(var Message: TMessage); message DSM_SETCOUNT; - procedure DsmNotifyUpdateItem(var Message: TMessage); message DSM_NOTIFYUPDATE; - procedure DsmNotifyUpdateContents(var Message: TMessage); message DSM_NOTIFYUPDATECONTENTS; - procedure DsmShellChangeNotify(var Message: TMessage); message DSM_SHELLCHANGENOTIFY; - property ComboBoxControl: TWinControl read FComboBoxControl write FComboBoxControl; - property FirstUpdateItem: Integer read FFirstUpdateItem write FFirstUpdateItem; - property LastUpdateItem: Integer read FLastUpdateItem write FLastUpdateItem; - property ItemProducer: TcxShellListViewProducer read FItemProducer; - property CurrentDropTarget: IcxDropTarget read FCurrentDropTarget write FCurrentDropTarget; - property DropTargetItemIndex: Integer read FDropTargetItemIndex write SetDropTargetItemIndex; - property DraggedObject: IcxDataObject read FDraggedObject write FDraggedObject; - property TreeViewControl: TWinControl read FTreeViewControl write FTreeViewControl; - // IcxDropTarget methods - function DragEnter(const dataObj: IDataObject; grfKeyState: Longint; - pt: TPoint; var dwEffect: Longint): HResult; stdcall; - function IcxDropTarget.DragOver=IDropTargetDragOver; - function IDropTargetDragOver(grfKeyState: Longint; pt: TPoint; - var dwEffect: Longint): HResult; stdcall; - function DragLeave: HResult; stdcall; - function Drop(const dataObj: IDataObject; grfKeyState: Longint; pt: TPoint; - var dwEffect: Longint): HResult; stdcall; - property ItemsInfoGatherer: TcxShellItemsInfoGatherer read FItemsInfoGatherer; - - property OnAddFolder: TcxShellAddFolderEvent read FOnAddFolder write FOnAddFolder; - property OnCompare: TcxShellCompareEvent read FOnCompare write FOnCompare; - property OnExecuteItem: TcxShellExecuteItemEvent read FOnExecuteItem write FOnExecuteItem; - property OnShellChange: TcxShellChangeEvent read FOnShellChange write FOnShellChange; - public - constructor Create(AOwner:TComponent); override; - destructor Destroy; override; - procedure BrowseParent; - procedure SetTreeView(ATreeView:TWinControl); - procedure ProcessTreeViewNavigate(APIDL: PItemIDList); - procedure Sort; - procedure UpdateContent; - property DragDropSettings: TcxDragDropSettings read FDragDropSettings write FDragDropSettings; - property FolderCount: Integer read GetFolderCount; - property Folders[AIndex: Integer]: TcxShellFolder read GetFolder; - property ListViewStyle: TcxListViewStyle read FListViewStyle write SetListViewStyle; - property Options: TcxShellListViewOptions read FOptions write FOptions; - property Root: TcxShellListRoot read FRoot write FRoot; - - property AfterNavigation: TcxNavigationEvent read FAfterNavigation write FAfterNavigation; - property BeforeNavigation: TcxNavigationEvent read FBeforeNavigation write FBeforeNavigation; - property OnRootChanged: TcxRootChangedEvent read FRootChanged write FRootChanged; - end; - - TcxShellTreeRoot = class(TcxCustomShellRoot) - protected - procedure RootUpdated; override; - end; - - TcxShellTreeItemProducer = class(TcxCustomItemProducer) - private - FNode: TTreeNode; - FOnDestroy: TNotifyEvent; - function GetTreeView: TcxCustomInnerShellTreeView; - protected - function AllowBackgroundProcessing: Boolean; override; - function CanAddFolder(AFolder: TcxShellFolder): Boolean; override; - function GetEnumFlags: Cardinal; override; - function GetItemsInfoGatherer: TcxShellItemsInfoGatherer; override; - function GetShowToolTip: Boolean; override; - property Node: TTreeNode read FNode write FNode; - procedure InitializeItem(Item: TcxShellItemInfo); override; - procedure CheckForSubitems(AItem: TcxShellItemInfo); override; - property TreeView: TcxCustomInnerShellTreeView read GetTreeView; - public - constructor Create(AOwner: TWinControl); override; - destructor Destroy; override; - procedure SetItemsCount(Count: Integer); override; - procedure NotifyUpdateItem(AItem: PcxRequestItem); override; - procedure NotifyRemoveItem(Index: Integer); override; - procedure NotifyAddItem(Index: Integer); override; - procedure ProcessItems(AIFolder: IShellFolder; APIDL: PItemIDList; - ANode: TTreeNode; cPreloadItems: Integer); reintroduce; overload; - function CheckUpdates: Boolean; - property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy; - end; - - PcxShellTreeItemProducer = ^TcxShellTreeItemProducer; - - { TcxShellTreeViewOptions } - - TcxShellTreeViewOptions = class(TcxShellOptions) - end; - - TcxShellTreeViewStateData = record - CurrentPath: PItemIDList; - ExpandedNodeList: TList; - TopItemIndex: Integer; - end; - - TcxCustomInnerShellTreeView = class(TTreeView, IUnknown, IcxDropTarget) - private - FComboBoxControl: TWinControl; - FContextPopupItemProducer: TcxShellTreeItemProducer; - FCurrentDropTarget: IcxDropTarget; - FDragDropSettings: TcxDragDropSettings; - FDraggedObject: IcxDataObject; - FInternalSmallImages: THandle; - FIsChangeNotificationCreationLocked: Boolean; - FIsUpdating: Boolean; - FItemProducersList: TThreadList; - FItemsInfoGatherer: TcxShellItemsInfoGatherer; - FListView: TcxCustomInnerShellListView; - FNavigation: Boolean; - FOptions: TcxShellTreeViewOptions; - FPrevTargetNode: TTreeNode; - FRoot: TcxShellTreeRoot; - FRootChanged: TcxRootChangedEvent; - FShellChangeNotificationCreation: Boolean; - FShellChangeNotifierData: TcxShellChangeNotifierData; - FShowInfoTips: Boolean; - FStateData: TcxShellTreeViewStateData; - FOnAddFolder: TcxShellAddFolderEvent; - FOnShellChange: TcxShellChangeEvent; - procedure SetPrevTargetNode(const Value: TTreeNode); - procedure ContextPopupItemProducerDestroyHandler(Sender: TObject); - function GetFolder(AIndex: Integer): TcxShellFolder; - function GetFolderCount: Integer; - function GetNodeFromItem(const Item: TTVItem): TTreeNode; - procedure RestoreTreeState; - procedure SaveTreeState; - procedure SetListView(Value: TcxCustomInnerShellListView); - procedure RootSettingsChanged(Sender: TObject); - procedure SetShowInfoTips(Value: Boolean); - procedure ShellChangeNotify(AEventID: Longint; APidl1, APidl2: PItemIDList); - procedure ShowToolTipChanged(Sender: TObject); - - procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - procedure DSMShellTreeChangeNotify(var Message: TMessage); message DSM_SHELLTREECHANGENOTIFY; - procedure DSMShellTreeRestoreCurrentPath(var Message: TMessage); - message DSM_SHELLTREERESTORECURRENTPATH; - procedure DSMSynchronizeRoot(var Message: TMessage); message DSM_SYNCHRONIZEROOT; - procedure DSMSystemShellChangeNotify(var Message: TMessage); message DSM_SYSTEMSHELLCHANGENOTIFY; - - property CurrentDropTarget: IcxDropTarget read FCurrentDropTarget write FCurrentDropTarget; - property DraggedObject: IcxDataObject read FDraggedObject write FDraggedObject; - property ItemProducersList: TThreadList read FItemProducersList; - property Navigation: Boolean read FNavigation write FNavigation; - property PrevTargetNode: TTreeNode read FPrevTargetNode write SetPrevTargetNode; - protected - procedure CreateWnd; override; - procedure DestroyWnd; override; - procedure Change(Node: TTreeNode); override; - function CanEdit(Node: TTreeNode): Boolean; override; - procedure Edit(const Item: TTVItem); override; - function CanExpand(Node: TTreeNode): Boolean; override; - procedure Delete(Node: TTreeNode); override; - procedure CreateParams(var Params: TCreateParams); override; - procedure Loaded; override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure DoContextPopup(MousePos: TPoint; var Handled: Boolean); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - - procedure AddItemProducer(Producer:TcxShellTreeItemProducer); - procedure AdjustControlParams; - procedure CreateChangeNotification(ANode: TTreeNode = nil); - procedure CreateDropTarget; - function DoAddFolder(AFolder: TcxShellFolder): Boolean; - procedure DoBeginDrag; - procedure DoNavigateListView; - procedure DragDropSettingsChanged(Sender: TObject); virtual; - procedure GetDropTarget(out ANew: Boolean; APoint: TPoint); - function GetNodeByPIDL(APIDL: PItemIDList): TTreeNode; - function IsLoading: Boolean; virtual; - procedure RemoveChangeNotification; - procedure RemoveDropTarget; - procedure RemoveItemProducer(AProducer: TcxShellTreeItemProducer); - function TryReleaseDropTarget: HResult; - - procedure DsmSetCount(var Message: TMessage); message DSM_SETCOUNT; - procedure DsmNotifyUpdateItem(var Message: TMessage); message DSM_NOTIFYUPDATE; - procedure DsmNotifyRemoveItem(var Message: TMessage); message DSM_NOTIFYREMOVEITEM; - procedure DsmNotifyAddItem(var Message: TMessage); message DSM_NOTIFYADDITEM; - procedure DsmNotifyUpdateContents(var Message: TMessage); message DSM_NOTIFYUPDATECONTENTS; - procedure DsmShellChangeNotify(var Message: TMessage); message DSM_SHELLCHANGENOTIFY; - procedure DsmDoNavigate(var Message: TMessage); message DSM_DONAVIGATE; - procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; - // IcxDropTarget methods - function DragEnter(const dataObj: IDataObject; grfKeyState: Longint; - pt: TPoint; var dwEffect: Longint): HResult; stdcall; - function IcxDropTarget.DragOver = IDropTargetDragOver; - function IDropTargetDragOver(grfKeyState: Longint; pt: TPoint; - var dwEffect: Longint): HResult; stdcall; - function DragLeave: HResult; stdcall; - function Drop(const dataObj: IDataObject; grfKeyState: Longint; pt: TPoint; - var dwEffect: Longint): HResult; stdcall; - - property ComboBoxControl: TWinControl read FComboBoxControl write FComboBoxControl; - property ItemsInfoGatherer: TcxShellItemsInfoGatherer read FItemsInfoGatherer; - property OnAddFolder: TcxShellAddFolderEvent read FOnAddFolder - write FOnAddFolder; - property OnShellChange: TcxShellChangeEvent read FOnShellChange write FOnShellChange; - public - constructor Create(AOwner:TComponent); override; - destructor Destroy; override; - procedure UpdateContent; - procedure UpdateNode(ANode: TTreeNode; AFast: Boolean); - - property DragDropSettings:TcxDragDropSettings read FDragDropSettings write FDragDropSettings; - property FolderCount: Integer read GetFolderCount; - property Folders[AIndex: Integer]: TcxShellFolder read GetFolder; - property ListView:TcxCustomInnerShellListView read FListView write SetListView; - property Options: TcxShellTreeViewOptions read FOptions write FOptions; - property Root:TcxShellTreeRoot read FRoot write FRoot; - property ShowInfoTips: Boolean read FShowInfoTips write SetShowInfoTips default False; - property OnRootChanged:TcxRootChangedEvent read FRootChanged write FRootChanged; - end; - -implementation - -uses - Forms, ImgList, Math; - -type - TcxShellOptionsAccess = class(TcxShellOptions); - PPItemIDList = ^PItemIDList; - -procedure GetShellNotifyParams(Message: TMessage; out AEventID: Integer; out APidl1, APidl2: PItemIDList); -var - APidls: PPidlList; - ALock: Cardinal; -begin - ALock := SHChangeNotification_Lock(Message.WParam, Message.LParam, APidls, AEventID); - try - APidl1 := GetPidlCopy(APidls^[0]); - APidl2 := GetPidlCopy(APidls^[1]); - finally - SHChangeNotification_UnLock(ALock); - end; -end; - -function GetShellItemOverlayIndex(AItemData: TcxShellItemInfo): Integer; -const - SHGFI_OVERLAYINDEX = $40; -var - AFileInfo: TShFileInfo; - AFlags: Cardinal; -begin - if GetComCtlVersion >= ComCtlVersionIE5 then - begin - AFlags := SHGFI_PIDL or SHGFI_ICON or SHGFI_OVERLAYINDEX; - ZeroMemory(@AFileInfo, SizeOf(AFileInfo)); - cxShellGetThreadSafeFileInfo(PChar(AItemData.FullPIDL), 0, AFileInfo, SizeOf(AFileInfo), AFlags); - DestroyIcon(AFileInfo.hIcon); - Result := AFileInfo.iIcon; - Result := (Result shr ((SizeOf(Result) - 1) * 8)) and $FF - 1; - end - else - begin - if AItemData.IsLink then - Result := cxShellShortcutItemOverlayIndex - else - if AItemData.IsShare then - Result := cxShellSharedItemOverlayIndex - else - Result := cxShellNormalItemOverlayIndex; - end; -end; - -procedure UnregisterShellChangeNotifier( - var ANotifierData: TcxShellChangeNotifierData); -begin - if ANotifierData.Handle <> 0 then - begin - SHChangeNotifyUnregister(ANotifierData.Handle); - ANotifierData.Handle := 0; - DisposePidl(ANotifierData.PIDL); - ANotifierData.PIDL := nil; - end; -end; - -procedure RegisterShellChangeNotifier(ANotifierPIDL: PItemIDList; AWnd: HWND; - ANotificationMsg: Cardinal; AWatchSubtree: Boolean; - var ANotifierData: TcxShellChangeNotifierData); -var - AItems: PSHChangeNotifyEntry; -begin - if EqualPIDLs(ANotifierData.PIDL, ANotifierPIDL) then - Exit; - UnregisterShellChangeNotifier(ANotifierData); - ANotifierData.PIDL := GetPidlCopy(ANotifierPIDL); - New(AItems); - try - AItems.pidlPath := ANotifierData.PIDL; - AItems.bWatchSubtree := AWatchSubtree; - ANotifierData.Handle := SHChangeNotifyRegister(AWnd, - SHCNF_ACCEPT_INTERRUPTS or SHCNF_ACCEPT_NON_INTERRUPTS or SHCNF_NO_PROXY, - SHCNE_RENAMEITEM or SHCNE_CREATE or SHCNE_DELETE or SHCNE_MKDIR or - SHCNE_RMDIR or SHCNE_ATTRIBUTES or SHCNE_UPDATEDIR or SHCNE_UPDATEITEM or - SHCNE_UPDATEIMAGE or SHCNE_RENAMEFOLDER, ANotificationMsg, 1, AItems); - finally - Dispose(AItems); - end; -end; - -{ TcxShellListViewOptions } - -constructor TcxShellListViewOptions.Create(AOwner: TWinControl); -begin - inherited Create(AOwner); - FAutoNavigate := True; - FAutoExecute := True; -end; - -procedure TcxShellListViewOptions.Assign(Source: TPersistent); -begin - if Source is TcxShellListViewOptions then - begin - AutoExecute := TcxShellListViewOptions(Source).AutoExecute; - AutoNavigate := TcxShellListViewOptions(Source).AutoNavigate; - end; - inherited Assign(Source); -end; - -{ TcxCustomInnerShellListView } - -constructor TcxCustomInnerShellListView.Create(AOwner: TComponent); -var - AFileInfo: TShFileInfo; -begin - inherited Create(AOwner); - FDragDropSettings := TcxDragDropSettings.Create; - FDropTargetItemIndex := -1; - FFirstUpdateItem := -1; - FInternalLargeImages := SHGetFileInfo('C:\', 0, AFileInfo, SizeOf(AFileInfo), - SHGFI_SYSICONINDEX or SHGFI_LARGEICON); - FInternalSmallImages := SHGetFileInfo('C:\', 0, AFileInfo, SizeOf(AFileInfo), - SHGFI_SYSICONINDEX or SHGFI_SMALLICON); - FItemProducer := TcxShellListViewProducer.Create(Self); - FItemsInfoGatherer := TcxShellItemsInfoGatherer.Create(Self); - FLastUpdateItem := -1; - FOptions := TcxShellListViewOptions.Create(Self); - FRoot := TcxShellListRoot.Create(Self, 0); - FRoot.OnSettingsChanged := RootSettingsChanged; - DoubleBuffered := True; - DragMode := dmManual; - HideSelection := False; - OwnerData := True; -end; - -destructor TcxCustomInnerShellListView.Destroy; -begin - RemoveChangeNotification; - FreeAndNil(FDragDropSettings); - FreeAndNil(FItemProducer); - FreeAndNil(FItemsInfoGatherer); - FreeAndNil(FOptions); - FreeAndNil(FRoot); - inherited Destroy; -end; - -procedure TcxCustomInnerShellListView.BrowseParent; -var - APIDL: PItemIDList; -begin - APIDL := GetPidlParent(ItemProducer.FolderPidl); - try - Navigate(APIDL); - finally - DisposePidl(APIDL); - end; -end; - -function TcxCustomInnerShellListView.CanEdit(Item: TListItem): Boolean; -begin - Result := True; - if Item = nil then - Exit; - if Item.Index > ItemProducer.Items.Count - 1 then - begin - Result := False; - Exit; - end; - Result := TcxShellItemInfo(ItemProducer.Items[Item.Index]).CanRename; -end; - -procedure TcxCustomInnerShellListView.CheckUpdateItems; -begin - ItemProducer.ClearItems; - if IsWindow(WindowHandle) then - begin - if not Root.IsValid then - Items.Clear - else - if ItemProducer.Items.Count = 0 then - ItemProducer.ProcessItems(Root.ShellFolder, Root.Pidl, - PRELOAD_ITEMS_COUNT); - CreateChangeNotification; - Refresh; - end; -end; - -procedure TcxCustomInnerShellListView.CNNotify(var Message: TWMNotify); - - function GetOverlayIndex: Integer; - var - AItemData: TcxShellItemInfo; - begin - AItemData := ItemProducer.Items[PLVDispInfo(Message.NMHdr)^.item.iItem]; - AItemData.CheckUpdate(ItemProducer.ShellFolder, ItemProducer.FolderPidl, False); - Result := GetShellItemOverlayIndex(AItemData); - end; - -begin - if csDestroying in ComponentState then - Exit; - case Message.NMHdr^.code of - LVN_BEGINDRAG, LVN_BEGINRDRAG: - begin - if not DragDropSettings.AllowDragObjects then - begin - inherited; - Exit; - end; - if SelCount <= 0 then - Exit; - DoBeginDrag; - end; - LVN_GETINFOTIP: - ItemProducer.DoGetInfoTip(Handle, PNMLVGetInfoTip(Message.NMHdr)^.iItem, - PNMLVGetInfoTip(Message.NMHdr)^.pszText, - PNMLVGetInfoTip(Message.NMHdr)^.cchTextMax); - LVN_GETDISPINFO: - begin - inherited; - with PLVDispInfo(Message.NMHdr)^.item do - if (mask and LVIF_IMAGE <> 0) and (iSubItem = 0) then - if (iItem >= 0) and (iItem < ItemProducer.Items.Count) then - begin - state := IndexToOverlayMask(GetOverlayIndex + 1); - stateMask := ILD_OVERLAYMASK; - mask := mask or LVIF_STATE; - end; - end; - LVN_ODFINDITEM: - begin - if (PNMLVFindItem(Message.NMHdr)^.lvfi.flags and $4) <> 0 then {LVFI_SUBSTRING} - PNMLVFindItem(Message.NMHdr)^.lvfi.flags := PNMLVFindItem(Message.NMHdr)^.lvfi.flags or LVFI_PARTIAL; - inherited; - end; - else - inherited; - end; -end; - -procedure TcxCustomInnerShellListView.CreateChangeNotification; -begin - if not Options.TrackShellChanges then - RemoveChangeNotification - else - RegisterShellChangeNotifier(ItemProducer.FolderPidl, Handle, - DSM_SYSTEMSHELLCHANGENOTIFY, False, FShellChangeNotifierData); -end; - -procedure TcxCustomInnerShellListView.CreateColumns; -var - i: Integer; - Column: TListColumn; -begin - if ListViewStyle <> lvsReport then - Exit; - Columns.BeginUpdate; - try - Columns.Clear; - for i := 0 to ItemProducer.Details.Count - 1 do - begin - Column := Columns.Add; - Column.Caption := ItemProducer.Details[i].Text; - Column.Alignment := ItemProducer.Details[i].Alignment; - Column.Width := ItemProducer.Details[i].Width; - end; - finally - Columns.EndUpdate; - end; -end; - -procedure TcxCustomInnerShellListView.CreateDropTarget; -var - AIDropTarget: IcxDropTarget; -begin - GetInterface(IcxDropTarget, AIDropTarget); - RegisterDragDrop(Handle, IDropTarget(AIDropTarget)); -end; - -procedure TcxCustomInnerShellListView.CreateWnd; -begin - inherited CreateWnd; - if HandleAllocated then - begin - if FInternalSmallImages <> 0 then - SendMessage(Handle, LVM_SETIMAGELIST, LVSIL_SMALL, LParam(FInternalSmallImages)); - if FInternalLargeImages <> 0 then - SendMessage(Handle, LVM_SETIMAGELIST, LVSIL_NORMAL, LParam(FInternalLargeImages)); - CreateDropTarget; - if Root.Pidl = nil then - Root.CheckRoot - else - CheckUpdateItems; - end; -end; - -procedure TcxCustomInnerShellListView.DblClick; -var - AItem: TcxShellItemInfo; -begin - if not Options.AutoNavigate or (Selected = nil) then - Exit; - ItemProducer.LockRead; - try - AItem := ItemProducer.Items[Selected.Index]; - if AItem.IsFolder then - DoProcessNavigation(AItem) - else - if Options.AutoExecute then - DoProcessDefaultCommand(AItem); - finally - ItemProducer.UnlockRead; - end; -end; - -procedure TcxCustomInnerShellListView.DestroyWnd; -begin - RemoveChangeNotification; - RemoveColumns; - RemoveDropTarget; - inherited DestroyWnd; -end; - -function TcxCustomInnerShellListView.DoAddFolder(AFolder: TcxShellFolder): Boolean; -begin - Result := True; - if Assigned(FOnAddFolder) then - FOnAddFolder(Self, AFolder, Result); -end; - -procedure TcxCustomInnerShellListView.DoAfterNavigation; -begin - if Assigned(AfterNavigation) then - AfterNavigation(Self, Root.Pidl, Root.CurrentPath); -end; - -function TcxCustomInnerShellListView.DoCompare(AItem1, AItem2: TcxShellFolder; - out ACompare: Integer): Boolean; -begin - Result := Assigned(FOnCompare); - if Result then - FOnCompare(Self, AItem1, AItem2, ACompare); -end; - -procedure TcxCustomInnerShellListView.DoBeforeNavigation(fqPidl: PItemIDList); -var - Desktop: IShellFolder; - tempPath: WideString; - StrName: TStrRet; -begin - if Failed(SHGetDesktopFolder(Desktop)) then - Exit; - if Succeeded(Desktop.GetDisplayNameOf(fqPidl, SHGDN_NORMAL or SHGDN_FORPARSING, StrName)) then - tempPath := GetTextFromStrRet(StrName, fqPidl) - else - tempPath := ''; - if Assigned(BeforeNavigation) then - BeforeNavigation(Self, fqPidl, tempPath); -end; - -procedure TcxCustomInnerShellListView.DoBeginDrag; -var - i: Integer; - tempList: TList; - pidlList: PItemIDList; - pDataObject: IDataObject; - pDropSource: IcxDropSource; - dwEffect: Integer; - Item: TListItem; -begin - tempList := TList.Create; - try - Item := Selected; - while Item <> nil do - begin - tempList.Add(GetPidlCopy(TcxShellItemInfo(ItemProducer.Items[Item.Index]).pidl)); - Item := GetNextItem(Item, sdAll, [isSelected]); - end; - pidlList := CreatePidlListFromList(tempList); - try - if Failed(ItemProducer.ShellFolder.GetUIObjectOf(Handle, SelCount, PItemIDList(pidlList^), IDataObject, nil, Pointer(pDataObject))) then - Exit; - pDropSource := TcxDropSource.Create(Self); - dwEffect := DragDropSettings.DropEffectAPI; - DoDragDrop(pDataObject, pDropSource, dwEffect, dwEffect); - finally - DisposePidl(pidlList); - end; - finally - try - for i := 0 to tempList.Count - 1 do - DisposePidl(tempList[i]); - finally - FreeAndNil(tempList); - end; - end; -end; - -procedure TcxCustomInnerShellListView.DoContextPopup(MousePos: TPoint; - var Handled: Boolean); -begin - if Options.ContextMenus and (SelCount > 0) then - begin - Handled := True; - ItemProducer.LockRead; - try - DisplayContextMenu(ClientToScreen(MousePos)); - finally - ItemProducer.UnlockRead; - end; - end - else - inherited DoContextPopup(MousePos, Handled); -end; - -procedure TcxCustomInnerShellListView.DoProcessDefaultCommand( - Item: TcxShellItemInfo); -var - fqPidl: PItemIDList; - lpExecInfo: PShellExecuteInfo; - AHandled: Boolean; -begin - fqPidl := ConcatenatePidls(ItemProducer.FolderPidl, Item.pidl); - AHandled := False; - if Assigned(OnExecuteItem) then - OnExecuteItem(Self, fqPidl, AHandled); - if not AHandled then - try - New(lpExecInfo); - try - ZeroMemory(lpExecInfo, SizeOf(TShellExecuteInfo)); - lpExecInfo.cbSize := SizeOf(TShellExecuteInfo); - lpExecInfo.fMask := SEE_MASK_INVOKEIDLIST; - lpExecInfo.Wnd := Handle; - lpExecInfo.lpIDList := fqPidl; - lpExecInfo.nShow := SW_SHOW; - ShellExecuteEx(lpExecInfo); - finally - Dispose(lpExecInfo); - end; - finally - DisposePidl(fqPidl); - end; -end; - -procedure TcxCustomInnerShellListView.DoProcessNavigation( - Item: TcxShellItemInfo); -var - APIDL: PItemIDList; -begin - if not Item.IsFolder then - Exit; - APIDL := ConcatenatePidls(ItemProducer.FolderPidl, Item.pidl); - try - Navigate(APIDL); - finally - DisposePidl(APIDL); - end; -end; - -function TcxCustomInnerShellListView.DragEnter(const dataObj: IDataObject; - grfKeyState: Integer; pt: TPoint; var dwEffect: Integer): HResult; -var - new: Boolean; -begin - DraggedObject := IcxDataObject(dataObj); - GetDropTarget(pt, new); - dwEffect := DragDropSettings.DefaultDropEffectAPI; - if CurrentDropTarget = nil then - begin - dwEffect := DROPEFFECT_NONE; - Result := S_OK; - end - else - Result := CurrentDropTarget.DragEnter(dataObj, grfKeyState, pt, dwEffect) -end; - -function TcxCustomInnerShellListView.DragLeave: HResult; -begin - DraggedObject := nil; - Result := TryReleaseDropTarget; -end; - -function TcxCustomInnerShellListView.IDropTargetDragOver(grfKeyState: Integer; pt: TPoint; - var dwEffect: Integer): HResult; -var - New: Boolean; -begin - GetDropTarget(pt, new); - if CurrentDropTarget = nil then - begin - dwEffect := DROPEFFECT_NONE; - Result := S_OK; - end - else - begin - if New then - Result := CurrentDropTarget.DragEnter(DraggedObject, grfKeyState, pt, dwEffect) - else - Result := S_OK; - if Succeeded(Result) then - Result := CurrentDropTarget.DragOver(grfKeyState, pt, dwEffect); - end; -end; - -function TcxCustomInnerShellListView.Drop(const dataObj: IDataObject; - grfKeyState: Integer; pt: TPoint; var dwEffect: Integer): HResult; -var - New: Boolean; -begin - GetDropTarget(pt, new); - if CurrentDropTarget = nil then - begin - dwEffect := DROPEFFECT_NONE; - Result := S_OK; - end - else - begin - if New then - Result := CurrentDropTarget.DragEnter(dataObj, grfKeyState, pt, dwEffect) - else - Result := S_OK; - if Succeeded(Result) then - Result := CurrentDropTarget.Drop(dataObj, grfKeyState, pt, dwEffect); - end; - DraggedObject := nil; - TryReleaseDropTarget; -end; - -procedure TcxCustomInnerShellListView.DsmNotifyUpdateContents( - var Message: TMessage); -begin - if not (csLoading in ComponentState) then - CheckUpdateItems; -end; - -procedure TcxCustomInnerShellListView.DsmNotifyUpdateItem( - var Message: TMessage); -begin - UpdateItems(Message.WParam, Message.WParam); -end; - -procedure TcxCustomInnerShellListView.DsmSetCount(var Message: TMessage); -begin - Items.Count := Message.WParam; - ItemFocused := nil; - Selected := nil; -end; - -procedure TcxCustomInnerShellListView.DsmShellChangeNotify( - var Message: TMessage); -begin - ShellChangeNotify(Message.LParam, PPItemIDList(Message.WParam)^, - PPItemIDList(Message.WParam + SizeOf(Pointer))^); -end; - -procedure TcxCustomInnerShellListView.Edit(const Item: TLVItem); -var - tempItem: TcxShellItemInfo; - NewName: WideString; - pidlOut: PItemIDList; -begin - inherited; - if (ItemProducer.Items.Count - 1) < Item.iItem then - Exit; - tempItem := ItemProducer.Items[Item.iItem]; - NewName := StrPas(Item.pszText); - ItemProducer.ShellFolder.SetNameOf(Handle, tempItem.pidl, PWideChar(NewName), - SHGDN_INFOLDER or SHGDN_FORPARSING, pidlOut); - try - tempItem.SetNewPidl(ItemProducer.ShellFolder, ItemProducer.FolderPidl, pidlOut); - finally - DisposePidl(pidlOut); - end; -end; - -procedure TcxCustomInnerShellListView.KeyDown(var Key: Word; - Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - if not IsEditing then - case Key of - VK_RETURN: - DblClick; - VK_BACK: - if Options.AutoNavigate then - BrowseParent; - VK_F5: - UpdateContent; - end; -end; - -procedure TcxCustomInnerShellListView.DisplayContextMenu(const APos: TPoint); - - function GetItemPIDLList: TList; - var - AItem: TListItem; - AItemPIDL: PItemIDList; - begin - Result := TList.Create; - AItem := Selected; - while AItem <> nil do - begin - AItemPIDL := TcxShellItemInfo(ItemProducer.Items[AItem.Index]).pidl; - if AItemPIDL <> nil then - Result.Add(GetPidlCopy(AItemPIDL)); - AItem := GetNextItem(AItem, sdAll, [isSelected]); - end; - end; - -var - AItemPIDLList: TList; - I: Integer; -begin - if SelCount = 0 then - Exit; - - AItemPIDLList := GetItemPIDLList; - try - cxShellCommon.DisplayContextMenu(Handle, ItemProducer.ShellFolder, - AItemPIDLList, APos); - finally - for I := 0 to AItemPIDLList.Count - 1 do - DisposePidl(AItemPIDLList[I]); - AItemPIDLList.Free; - end; -end; - -procedure TcxCustomInnerShellListView.Loaded; -begin - inherited Loaded; - if csDesigning in ComponentState then - Root.RootUpdated; -end; - -procedure TcxCustomInnerShellListView.GetDropTarget(pt: TPoint; - out New: Boolean); - - function GetDropTargetItemIndex: Integer; - var - AItem: TListItem; - P: TPoint; - begin - Result := -1; - P := ScreenToClient(pt); - AItem := GetItemAt(P.X, P.Y); - if AItem <> nil then - Result := AItem.Index; - end; - -var - AItemIndex: Integer; - tempDropTarget: IcxDropTarget; - tempPidl: PItemIDList; -begin - AItemIndex := GetDropTargetItemIndex; - if AItemIndex = -1 then - begin // There are no items selected, so drop target is current opened folder - if (DropTargetItemIndex = -1) and (CurrentDropTarget <> nil) then - begin - New := False; - Exit; - end; - TryReleaseDropTarget; - New := True; - if Failed(ItemProducer.ShellFolder.CreateViewObject(Handle,IDropTarget, tempDropTarget)) then - Exit; - CurrentDropTarget := tempDropTarget; - end - else - begin // Use one of Items as Drop Target - if AItemIndex = DropTargetItemIndex then - begin - New := False; - Exit; - end; - TryReleaseDropTarget; - New := True; - tempPidl := GetPidlCopy(TcxShellItemInfo(ItemProducer.Items[AItemIndex]).pidl); - try - if Failed(ItemProducer.ShellFolder.GetUIObjectOf(Handle, 1, tempPidl, IDropTarget, nil, tempDropTarget)) then - Exit; - finally - DisposePidl(tempPidl); - end; - CurrentDropTarget := tempDropTarget; - DropTargetItemIndex := AItemIndex; - end; -end; - -procedure TcxCustomInnerShellListView.Navigate(APIDL: PItemIDList); -begin - if EqualPIDLs(APIDL, ItemProducer.FolderPidl) then - Exit; - Items.BeginUpdate; - try - DoBeforeNavigation(APIDL); - Root.Pidl := APIDL; - DoNavigateTreeView; - DoAfterNavigation; - finally - Items.EndUpdate; - end; -end; - -function TcxCustomInnerShellListView.OwnerDataFetch(Item: TListItem; - Request: TItemRequest): Boolean; -var - AShellItem: TcxShellItemInfo; - i: Integer; -begin - Result := True; - ItemProducer.LockRead; - try - if Item.Index >= ItemProducer.Items.Count then - Exit; - AShellItem := ItemProducer.Items[Item.Index]; - AShellItem.CheckUpdate(ItemProducer.ShellFolder, ItemProducer.FolderPidl, False); - Item.Caption := dxWideStringToString(AShellItem.Name); - Item.ImageIndex := AShellItem.IconIndex; - if ListViewStyle = lvsReport then - begin - if AShellItem.Details.Count = 0 then - AShellItem.FetchDetails(Handle, ItemProducer.ShellFolder, ItemProducer.Details); - for i := 0 to AShellItem.Details.Count - 1 do - Item.SubItems.Add(AShellItem.Details[i]); - end; - Item.Cut := AShellItem.IsGhosted; - if not AShellItem.Updated then - ItemProducer.FetchRequest(Item.Index, True); - finally - ItemProducer.UnlockRead; - end; - Result := inherited OwnerDataFetch(Item, Request); -end; - -function TcxCustomInnerShellListView.OwnerDataFind(Find: TItemFind; const FindString: string; - const FindPosition: TPoint; FindData: Pointer; StartIndex: Integer; - Direction: TSearchDirection; Wrap: Boolean): Integer; - - function IsItemSuitable(AIndex: Integer; AFind: TItemFind; - const AFindString: string): Boolean; - var - ACaption: string; - begin - ACaption := dxWideStringToString(TcxShellItemInfo(ItemProducer.Items[AIndex]).Name); - if AFind = ifPartialString then - ACaption := Copy(ACaption, 1, Length(FindString)); - Result := CompareText(FindString, ACaption) = 0; - end; - - function FindItemByCaption(AFind: TItemFind; const AFindString: string; - AStartIndex: Integer; AWrap: Boolean): Integer; - var - I: Integer; - begin - Result := -1; - AStartIndex := EnsureRange(AStartIndex, 0, ItemProducer.Items.Count - 1); - for I := AStartIndex to ItemProducer.Items.Count - 1 do - if IsItemSuitable(I, AFind, AFindString) then - begin - Result := I; - Break; - end; - if AWrap and (Result = -1) then - for I := 0 to AStartIndex - 1 do - if IsItemSuitable(I, AFind, AFindString) then - begin - Result := I; - Break; - end; - end; - -begin - Result := inherited OwnerDataFind(Find, FindString, FindPosition, FindData, - StartIndex, Direction, Wrap); - if (Result = -1) and (Find in [ifPartialString, ifExactString]) then - Result := FindItemByCaption(Find, FindString, StartIndex, Wrap); -end; - -procedure TcxCustomInnerShellListView.RemoveChangeNotification; -begin - UnregisterShellChangeNotifier(FShellChangeNotifierData); -end; - -procedure TcxCustomInnerShellListView.RemoveColumns; -begin - Columns.Clear; -end; - -procedure TcxCustomInnerShellListView.RemoveDropTarget; -begin - RevokeDragDrop(Handle); -end; - -procedure TcxCustomInnerShellListView.SetDropTargetItemIndex(Value: Integer); -begin - if FDropTargetItemIndex <> -1 then - Items[FDropTargetItemIndex].DropTarget := False; - FDropTargetItemIndex := Value; - if FDropTargetItemIndex <> -1 then - Items[FDropTargetItemIndex].DropTarget := True; -end; - -procedure TcxCustomInnerShellListView.ShellChangeNotify(AEventID: Longint; APidl1, APidl2: PItemIDList); -begin - if FNotificationLock then - Exit; - FNotificationLock := True; - try - CheckUpdateItems; - finally - FNotificationLock := False; - end; - if Assigned(FOnShellChange) then - FOnShellChange(Self, AEventID, APidl1, APidl2); -end; - -procedure TcxCustomInnerShellListView.DSMSynchronizeRoot(var Message: TMessage); -begin - if not((Parent <> nil) and (csLoading in Parent.ComponentState)) then - Root.Update(TcxCustomShellRoot(Message.WParam)); -end; - -procedure TcxCustomInnerShellListView.DsmSystemShellChangeNotify( - var Message: TMessage); -var - AEventID: Integer; - APidl1, APidl2: PItemIDList; -begin - GetShellNotifyParams(Message, AEventID, APidl1, APidl2); - try - ShellChangeNotify(AEventID, APidl1, APidl2); - finally - DisposePidl(APidl1); - DisposePidl(APidl2); - end; -end; - -function TcxCustomInnerShellListView.GetFolder(AIndex: Integer): TcxShellFolder; -begin - Result := TcxShellItemInfo(ItemProducer.Items[AIndex]).Folder; -end; - -function TcxCustomInnerShellListView.GetFolderCount: Integer; -begin - Result := Items.Count; -end; - -procedure TcxCustomInnerShellListView.RootSettingsChanged(Sender: TObject); -begin - if (Parent <> nil) and (csLoading in Parent.ComponentState) then - Exit; - if (FTreeViewControl <> nil) and FTreeViewControl.HandleAllocated then - SendMessage(FTreeViewControl.Handle, DSM_SYNCHRONIZEROOT, Integer(Root), 0); - if (FComboBoxControl <> nil) and FComboBoxControl.HandleAllocated then - SendMessage(FComboBoxControl.Handle, DSM_SYNCHRONIZEROOT, Integer(Root), 0); -end; - -procedure TcxCustomInnerShellListView.SetListViewStyle( - const Value: TcxListViewStyle); -begin - if FListViewStyle <> Value then - begin - FListViewStyle := Value; - case FListViewStyle of - lvsIcon: ViewStyle:=vsIcon; - lvsSmallIcon: ViewStyle:=vsSmallIcon; - lvsList: ViewStyle:=vsList; - lvsReport: ViewStyle:=vsReport; - end; - CheckUpdateItems; - end; -end; - -function TcxCustomInnerShellListView.TryReleaseDropTarget:HResult; -begin - Result := S_OK; - if CurrentDropTarget <> nil then - Result := CurrentDropTarget.DragLeave; - CurrentDropTarget := nil; - DropTargetItemIndex := -1; -end; - -procedure TcxCustomInnerShellListView.SetTreeView(ATreeView: TWinControl); -begin - TreeViewControl := ATreeView; -end; - -var - NavigationLock: Boolean; - -procedure TcxCustomInnerShellListView.DoNavigateTreeView; -var - ATempPidl: PItemIDList; -begin - if NavigationLock or (not Assigned(TreeViewControl) and not Assigned(ComboBoxControl)) then - Exit; - - ATempPidl := GetPidlCopy(Root.Pidl); - try - if Assigned(TreeViewControl) and (TreeViewControl.Parent <> nil) then - begin - TreeViewControl.HandleNeeded; - SendMessage(TreeViewControl.Handle, DSM_DONAVIGATE, WPARAM(ATempPidl), 0); - end; - if Assigned(ComboBoxControl) and (ComboBoxControl.Parent <> nil) then - begin - ComboBoxControl.HandleNeeded; - SendMessage(ComboBoxControl.Handle, DSM_DONAVIGATE, WPARAM(ATempPidl), 0); - end; - finally - DisposePidl(ATempPidl); - end; -end; - -procedure TcxCustomInnerShellListView.ProcessTreeViewNavigate( - APIDL: PItemIDList); - - function IsFolder(APIDL: PItemIDList): Boolean; - const - SHGFI_ATTR_SPECIFIED = $20000; - var - ASHFileInfo: TSHFileInfo; - begin - ASHFileInfo.dwAttributes := SFGAO_FOLDER; - cxShellGetThreadSafeFileInfo(Pointer(APIDL), 0, ASHFileInfo, SizeOf(ASHFileInfo), - SHGFI_PIDL or SHGFI_ATTR_SPECIFIED or SHGFI_ATTRIBUTES); - Result := ASHFileInfo.dwAttributes and SFGAO_FOLDER <> 0; - end; - -begin - NavigationLock := True; - try - if IsFolder(APIDL) and not EqualPIDLs(APIDL, Root.Pidl) then - Root.Pidl := APIDL; - finally - NavigationLock := False; - end; -end; - -procedure TcxCustomInnerShellListView.Sort; -begin - ItemProducer.Sort; -end; - -procedure TcxCustomInnerShellListView.UpdateContent; -var - AItemIndex: Integer; - ASelectedItemPID: PItemIDList; -begin - ASelectedItemPID := nil; - try - if not MultiSelect and (Selected <> nil) then - ASelectedItemPID := GetPidlCopy( - TcxShellItemInfo(ItemProducer.Items[Selected.Index]).pidl); - CheckUpdateItems; - if ASelectedItemPID <> nil then - begin - AItemIndex := ItemProducer.GetItemIndexByPidl(ASelectedItemPID); - if (AItemIndex >= 0) and (AItemIndex < Items.Count) then - Items[AItemIndex].Selected := True; - end; - finally - DisposePidl(ASelectedItemPID); - end; -end; - -{ TcxShellListRoot } - -procedure TcxShellListRoot.RootUpdated; -begin - inherited RootUpdated; - (Owner as TcxCustomInnerShellListView).CheckUpdateItems; - if Assigned(TcxCustomInnerShellListView(Owner).OnRootChanged) then - TcxCustomInnerShellListView(Owner).OnRootChanged(Owner, Self); -end; - -{ TcxShellListViewProducer } - -function TcxShellListViewProducer.AllowBackgroundProcessing: Boolean; -begin - Result := True; -end; - -function TcxShellListViewProducer.CanAddFolder(AFolder: TcxShellFolder): Boolean; -begin - Result := ListView.DoAddFolder(AFolder); -end; - -function TcxShellListViewProducer.DoCompareItems(AItem1, AItem2: TcxShellFolder; - out ACompare: Integer): Boolean; -begin - Result := ListView.DoCompare(AItem1, AItem2, ACompare); -end; - -function TcxShellListViewProducer.GetEnumFlags: Cardinal; -begin - Result := ListView.Options.GetEnumFlags; -end; - -function TcxShellListViewProducer.GetItemsInfoGatherer: TcxShellItemsInfoGatherer; -begin - Result := ListView.ItemsInfoGatherer; -end; - -function TcxShellListViewProducer.GetShowToolTip: Boolean; -begin - Result := ListView.Options.ShowToolTip; -end; - -function TcxShellListViewProducer.GetListView: TcxCustomInnerShellListView; -begin - Result := TcxCustomInnerShellListView(Owner); -end; - -procedure TcxShellListViewProducer.NotifyUpdateItem(AItem: PcxRequestItem); -begin - if AItem.Priority and Owner.HandleAllocated and (AItem.ItemIndex >= 0) and - (AItem.ItemIndex < Items.Count) then - PostMessage(Owner.Handle, DSM_NOTIFYUPDATE, AItem.ItemIndex, 0); -end; - -procedure TcxShellListViewProducer.ProcessDetails(ShellFolder: IShellFolder; - CharWidth: Integer); -begin - inherited ProcessDetails(ShellFolder, ListView.StringWidth('X')); - ListView.CreateColumns; -end; - -{ TcxShellTreeRoot } - -procedure TcxShellTreeRoot.RootUpdated; -begin - inherited RootUpdated; -// TcxCustomInnerShellTreeView(Owner).ItemsInfoGatherer.ClearFetchQueue(nil); - TcxCustomInnerShellTreeView(Owner).Items.Clear; - TcxCustomInnerShellTreeView(Owner).UpdateNode(nil, False); - if Assigned(TcxCustomInnerShellTreeView(Owner).OnRootChanged) then - TcxCustomInnerShellTreeView(Owner).OnRootChanged(Owner, Self); -end; - -{ TcxCustomInnerShellTreeView } - -procedure TcxCustomInnerShellTreeView.AddItemProducer( - Producer: TcxShellTreeItemProducer); -var - tempList: TList; -begin - tempList := ItemProducersList.LockList; - try - tempList.Add(Producer); - finally - ItemProducersList.UnlockList; - end; -end; - -procedure TcxCustomInnerShellTreeView.AdjustControlParams; -var - AStyle: Longint; -begin - if HandleAllocated then - begin - AStyle := GetWindowLong(Handle, GWL_STYLE) and not(TVS_INFOTIP) or TVS_NOTOOLTIPS; - if ShowInfoTips or Options.ShowToolTip then - AStyle := AStyle and not TVS_NOTOOLTIPS; - if ShowInfoTips then - AStyle := AStyle or TVS_INFOTIP; - SetWindowLong(Handle, GWL_STYLE, AStyle); - end; -end; - -function TcxCustomInnerShellTreeView.CanEdit(Node: TTreeNode): Boolean; -var - ItemProducer:TcxShellTreeItemProducer; -begin - Result := False; - if Node.Parent = nil then - Exit; - ItemProducer := TcxShellTreeItemProducer(Node.Parent.Data); - ItemProducer.LockRead; - try - if (ItemProducer.Items.Count - 1) < Node.Index then - Exit; - Result := TcxShellItemInfo(ItemProducer.Items[Node.Index]).CanRename; - Result := Result and inherited CanEdit(Node); - finally - ItemProducer.UnlockRead; - end; -end; - -function TcxCustomInnerShellTreeView.CanExpand(Node: TTreeNode): Boolean; - - function GetDataForProcessing(out AProcessingFolder: IShellFolder; - out AProcessingPidl: PItemIDList): Boolean; - var - AItemProducer: TcxShellTreeItemProducer; - AItemInfo: TcxShellItemInfo; - begin - if Node.Parent <> nil then - begin - AItemProducer := TcxShellTreeItemProducer(Node.Parent.Data); - AItemInfo := TcxShellItemInfo(AItemProducer.Items[Node.Index]); - Node.HasChildren := AItemInfo.IsFolder; - Result := AItemInfo.IsFolder and (Node.Index < AItemProducer.Items.Count) and - Succeeded(AItemProducer.ShellFolder.BindToObject(AItemInfo.pidl, nil, - IID_IShellFolder, AProcessingFolder)); - if Result then - AProcessingPidl := ConcatenatePidls(AItemProducer.FolderPidl, AItemInfo.pidl); - end - else - begin - Result := True; - AProcessingFolder := Root.ShellFolder; - AProcessingPidl := GetPidlCopy(Root.Pidl); - end; - end; - - function InternalCanExpand: Boolean; - var - AProcessingPidl: PItemIDList; - AProcessingFolder: IShellFolder; - begin - Result := GetDataForProcessing(AProcessingFolder, AProcessingPidl); - if Result then - try - TcxShellTreeItemProducer(Node.Data).ProcessItems(AProcessingFolder, - AProcessingPidl, Node, 0); - finally - DisposePidl(AProcessingPidl); - end; - end; - -begin - Result := ((Node.GetFirstChild <> nil) or InternalCanExpand) and - inherited CanExpand(Node); -end; - -procedure TcxCustomInnerShellTreeView.CNNotify(var Message: TWMNotify); -var - tempNode: TTreeNode; - ItemProducer: TcxShellTreeItemProducer; -begin - if (Message.NMHdr^.code = TVN_BEGINDRAG) or - (Message.NMHdr^.code = TVN_BEGINRDRAG) then - begin - with PNMTreeView(Message.NMHdr)^ do - Selected := GetNodeFromItem(ItemNew); - DoBeginDrag; - end - else - if Message.NMHdr^.code = TVN_GETINFOTIP then - begin - tempNode := Items.GetNode(PNMTVGetInfoTip(Message.NMHdr)^.hItem); - if (tempNode <> nil) and (tempNode.Parent <> nil) then - begin - ItemProducer := TcxShellTreeItemProducer(tempNode.Parent.Data); - ItemProducer.DoGetInfoTip(Handle,tempNode.Index, - PNMTVGetInfoTip(Message.NMHdr)^.pszText, - PNMTVGetInfoTip(Message.NMHdr)^.cchTextMax); - end; - end - else - inherited; -end; - -constructor TcxCustomInnerShellTreeView.Create(AOwner: TComponent); -var - FileInfo: TShFileInfo; -begin - inherited; - FItemsInfoGatherer := TcxShellItemsInfoGatherer.Create(Self); - FRoot := TcxShellTreeRoot.Create(Self, 0); - FRoot.OnSettingsChanged := RootSettingsChanged; - FDragDropSettings := TcxDragDropSettings.Create; - FDragDropSettings.OnChange := DragDropSettingsChanged; - FOptions := TcxShellTreeViewOptions.Create(Self); - TcxShellOptionsAccess(FOptions).OnShowToolTipChanged := ShowToolTipChanged; - FItemProducersList := TThreadList.Create; - FInternalSmallImages := SHGetFileInfo('C:\', 0, FileInfo, SizeOf(FileInfo), - SHGFI_SYSICONINDEX or SHGFI_SMALLICON); - ImageList_SetBkColor(FInternalSmallImages, CLR_NONE); - DoubleBuffered := True; - DragMode := dmAutomatic; - RightClickSelect := True; -end; - -procedure TcxCustomInnerShellTreeView.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - if ShowInfoTips then - Params.Style := (Params.Style or TVS_INFOTIP) and not TVS_NOTOOLTIPS; -end; - -procedure TcxCustomInnerShellTreeView.CreateWnd; -begin - inherited CreateWnd; - if HandleAllocated then - begin - if FInternalSmallImages <> 0 then - SendMessage(Handle, TVM_SETIMAGELIST, TVSIL_NORMAL, LParam(FInternalSmallImages)); - if not IsLoading and (Root.Pidl = nil) then - Root.CheckRoot; - UpdateNode(nil, False); - CreateDropTarget; - end; -end; - -procedure TcxCustomInnerShellTreeView.Delete(Node: TTreeNode); -var - ItemProducer: TcxShellTreeItemProducer; -begin - ItemProducer := TcxShellTreeItemProducer(Node.Data); - if ItemProducer <> nil then - begin - ItemProducer.Free; - Node.Data := nil; - end; - inherited; -end; - -destructor TcxCustomInnerShellTreeView.Destroy; -var - AList: TList; - I: Integer; -begin - if FListView <> nil then - FListView.SetTreeView(nil); - - RemoveChangeNotification; - - AList := FItemProducersList.LockList; - try - for I := 0 to AList.Count - 1 do - TcxShellTreeItemProducer(AList[I]).ClearFetchQueue; - finally - FItemProducersList.UnlockList; - end; - - Items.Clear; - FreeAndNil(FItemProducersList); - FreeAndNil(FOptions); - FreeAndNil(FDragDropSettings); - FreeAndNil(FRoot); - FreeAndNil(FItemsInfoGatherer); - inherited Destroy; -end; - -procedure TcxCustomInnerShellTreeView.UpdateContent; -var - APidls: TPidlList; -begin - if HandleAllocated then - begin - if Root.ShellFolder = nil then - Root.CheckRoot; - APidls[0] := Root.Pidl; - APidls[1] := nil; - SendMessage(Handle, DSM_SHELLTREECHANGENOTIFY, WPARAM(@APidls), 0); - end; -end; - -procedure TcxCustomInnerShellTreeView.DestroyWnd; -begin - RemoveChangeNotification; - RemoveDropTarget; - CreateWndRestores := False; - inherited DestroyWnd; -end; - -procedure TcxCustomInnerShellTreeView.DoBeginDrag; -var - ASourceItemProducer: TcxShellTreeItemProducer; - ATempPidl: PItemIDList; - ADataObject: IDataObject; - ADropSource: IcxDropSource; - AEffect: Integer; -begin - if Selected.Parent = nil then - Exit; - ASourceItemProducer := TcxShellTreeItemProducer(Selected.Parent.Data); - ASourceItemProducer.LockRead; - try - if Selected.Index < ASourceItemProducer.Items.Count then - begin - ATempPidl := GetPidlCopy(TcxShellItemInfo(ASourceItemProducer.Items[Selected.Index]).pidl); - try - if Succeeded(ASourceItemProducer.ShellFolder.GetUIObjectOf(Handle, 1, ATempPidl, - IDataObject, nil, ADataObject)) then - begin - ADropSource := TcxDropSource.Create(Self); - AEffect := DragDropSettings.DropEffectAPI; - DoDragDrop(ADataObject, ADropSource, AEffect, AEffect); - if not TcxShellTreeItemProducer(Selected.Parent.Data).CheckUpdates then - UpdateNode(Selected.Parent, False); - end; - finally - DisposePidl(ATempPidl); - end; - end; - finally - ASourceItemProducer.UnlockRead; - end; -end; - -procedure TcxCustomInnerShellTreeView.DoContextPopup(MousePos: TPoint; - var Handled: Boolean); -var - AItem: TcxShellItemInfo; - AItemPIDLList: TList; - ANode: TTreeNode; -begin - try - ANode := GetNodeAt(MousePos.X, MousePos.Y); - if not Options.ContextMenus or (ANode = nil) then - begin - inherited DoContextPopup(MousePos, Handled); - Exit; - end; - Handled := True; - if ANode.Parent = nil then - Exit; - - FContextPopupItemProducer := TcxShellTreeItemProducer(ANode.Parent.Data); - FContextPopupItemProducer.OnDestroy := ContextPopupItemProducerDestroyHandler; - FContextPopupItemProducer.LockRead; - try - CreateChangeNotification(ANode); - AItem := FContextPopupItemProducer.Items[ANode.Index]; - FIsChangeNotificationCreationLocked := True; - if AItem.pidl <> nil then - begin - AItemPIDLList := TList.Create; - try - AItemPIDLList.Add(GetPidlCopy(AItem.pidl)); - cxShellCommon.DisplayContextMenu(Handle, FContextPopupItemProducer.ShellFolder, - AItemPIDLList, ClientToScreen(MousePos)); - finally - DisposePidl(AItemPIDLList[0]); - AItemPIDLList.Free; - end; - end; - finally - if FContextPopupItemProducer <> nil then - FContextPopupItemProducer.UnlockRead; - end; - finally - FIsChangeNotificationCreationLocked := False; - if FContextPopupItemProducer <> nil then - begin - FContextPopupItemProducer.OnDestroy := nil; - FContextPopupItemProducer := nil; - end; - end; -end; - -procedure TcxCustomInnerShellTreeView.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - if Key = VK_F5 then - UpdateContent; -end; - -function TcxCustomInnerShellTreeView.DragEnter(const dataObj: IDataObject; - grfKeyState: Integer; pt: TPoint; var dwEffect: Integer): HResult; -var - ANew: Boolean; -begin - DraggedObject := IcxDataObject(dataObj); - GetDropTarget(ANew, pt); - dwEffect := DragDropSettings.DefaultDropEffectAPI; - if CurrentDropTarget = nil then - begin - dwEffect := DROPEFFECT_NONE; - Result := S_OK; - end - else - Result := CurrentDropTarget.DragEnter(dataObj, grfKeyState, pt, dwEffect) -end; - -function TcxCustomInnerShellTreeView.DragLeave: HResult; -begin - DraggedObject := nil; - Result := TryReleaseDropTarget; -end; - -function TcxCustomInnerShellTreeView.IDropTargetDragOver(grfKeyState: Integer; pt: TPoint; - var dwEffect: Integer): HResult; -var - ANew: Boolean; -begin - GetDropTarget(ANew, pt); - if CurrentDropTarget = nil then - begin - dwEffect := DROPEFFECT_NONE; - Result := S_OK; - end - else - begin - if ANew then - Result := CurrentDropTarget.DragEnter(DraggedObject, grfKeyState, pt, dwEffect) - else - Result := S_OK; - if Succeeded(Result) then - Result := CurrentDropTarget.DragOver(grfKeyState, pt, dwEffect); - end; -end; - -function TcxCustomInnerShellTreeView.Drop(const dataObj: IDataObject; - grfKeyState: Integer; pt: TPoint; var dwEffect: Integer): HResult; -var - ANew: Boolean; -begin - GetDropTarget(ANew, pt); - if CurrentDropTarget = nil then - begin - dwEffect := DROPEFFECT_NONE; - Result := S_OK; - end - else - begin - if ANew then - Result := CurrentDropTarget.DragEnter(dataObj, grfKeyState, pt, dwEffect) - else - Result := S_OK; - if Succeeded(Result) then - Result := CurrentDropTarget.Drop(dataObj, grfKeyState, pt, dwEffect); - end; - PostMessage(Handle, DSM_SHELLCHANGENOTIFY, WPARAM(PrevTargetNode), 0); - DraggedObject := nil; - TryReleaseDropTarget; -end; - -procedure TcxCustomInnerShellTreeView.DsmNotifyAddItem(var Message: TMessage); -var - Node, NewNode: TTreeNode; - ItemProducer: TcxShellTreeItemProducer; - tempShellItem: TcxShellItemInfo; -begin - Node := TTreeNode(Message.LParam); - ItemProducer := TcxShellTreeItemProducer(Node.Data); - ItemProducer.LockRead; - try - tempShellItem := ItemProducer.Items[Message.WParam]; - NewNode := Items.AddChild(Node, tempShellItem.Name); - NewNode.Data := TcxShellTreeItemProducer.Create(Self); - NewNode.ImageIndex := tempShellItem.IconIndex; - NewNode.SelectedIndex := tempShellItem.OpenIconIndex; - NewNode.HasChildren := tempShellItem.HasSubfolder; - finally - ItemProducer.UnlockRead; - end; -end; - -procedure TcxCustomInnerShellTreeView.DsmNotifyRemoveItem( - var Message: TMessage); -var - ANode: TTreeNode; -begin - ANode := TTreeNode(Message.LParam); - if Message.WParam < ANode.Count then - ANode.Item[Message.WParam].Delete; -end; - -procedure TcxCustomInnerShellTreeView.DsmNotifyUpdateContents( - var Message: TMessage); -begin - if not (csLoading in ComponentState) then - UpdateNode(nil, False); -end; - -procedure TcxCustomInnerShellTreeView.DsmNotifyUpdateItem( - var Message: TMessage); - - function GetChildNode(ANode: TTreeNode; AIndex: Integer): TTreeNode; - begin - Result := ANode.getFirstChild; - while (Result <> nil) and (AIndex > 0) do - begin - Result := ANode.GetNextChild(Result); - Dec(AIndex); - end; - end; - -var - AItem: TcxShellItemInfo; - AItemProducer: TcxShellTreeItemProducer; - ANode, ATempNode: TTreeNode; -begin - ANode := TTreeNode(Message.LParam); - if ANode.getFirstChild = nil then - Exit; - ATempNode := GetChildNode(ANode, Message.WParam); - if ATempNode = nil then - Exit; - - AItemProducer := TcxShellTreeItemProducer(ANode.Data); - AItemProducer.LockRead; - try - AItem := AItemProducer.Items[Message.WParam]; - ATempNode.ImageIndex := AItem.IconIndex; - ATempNode.SelectedIndex := AItem.OpenIconIndex; - ATempNode.Text := AItem.Name; - ATempNode.HasChildren := AItem.HasSubfolder; - ATempNode.Cut := AItem.IsGhosted; - ATempNode.OverlayIndex := GetShellItemOverlayIndex(AItem); - finally - AItemProducer.UnlockRead; - end; -end; - -procedure TcxCustomInnerShellTreeView.DsmSetCount(var Message: TMessage); -var - Node: TTreeNode; - ItemProducer: TcxShellTreeItemProducer; - i: Integer; - NewNode: TTreeNode; - tempShellItem: TcxShellItemInfo; -begin - Node := TTreeNode(Message.LParam); - if Message.WParam = 0 then - begin - Node.DeleteChildren; - Node.HasChildren := False; - Exit; - end; - ItemProducer := TcxShellTreeItemProducer(Node.Data); - ItemProducer.LockRead; - try - Items.BeginUpdate; - try - for i := 0 to ItemProducer.Items.Count-1 do - begin - tempShellItem := ItemProducer.Items[i]; - if not tempShellItem.Updated then - ItemProducer.FetchRequest(i, False); - NewNode := Items.AddChild(Node, tempShellItem.Name); - NewNode.Data := TcxShellTreeItemProducer.Create(Self); - NewNode.ImageIndex := tempShellItem.IconIndex; - NewNode.SelectedIndex := tempShellItem.OpenIconIndex; - NewNode.HasChildren := tempShellItem.HasSubfolder; - NewNode.Cut := tempShellItem.IsGhosted; - NewNode.OverlayIndex := GetShellItemOverlayIndex(tempShellItem); - end; - finally - Items.EndUpdate; - end; - if Node.GetFirstChild = nil then - Node.HasChildren := False; - finally - ItemProducer.UnlockRead; - end; -end; - -procedure TcxCustomInnerShellTreeView.DsmShellChangeNotify( - var Message: TMessage); -begin - Sleep(100); - if not TcxShellTreeItemProducer(TTreeNode(Message.WParam).Data).CheckUpdates then - UpdateNode(TTreeNode(Message.WParam), False); -end; - -procedure TcxCustomInnerShellTreeView.Edit(const Item: TTVItem); -var - AItemInfo: TcxShellItemInfo; - AItemProducer: TcxShellTreeItemProducer; - ANode: TTreeNode; - APIDL: PItemIDList; - APrevNodeText: string; -begin - ANode := GetNodeFromItem(Item); - APrevNodeText := ''; - if ANode <> nil then - APrevNodeText := ANode.Text; - inherited Edit(Item); - if (Item.pszText = nil) or (ANode = nil) or (ANode.Parent = nil) then - Exit; - AItemProducer := TcxShellTreeItemProducer(ANode.Parent.Data); - AItemInfo := AItemProducer.Items[ANode.Index]; - RemoveChangeNotification; - if AItemProducer.ShellFolder.SetNameOf(Handle, AItemInfo.pidl, PWideChar(WideString(ANode.Text)), - SHGDN_INFOLDER or SHGDN_FORPARSING, APIDL) = S_OK then - try - AItemInfo.SetNewPidl(AItemProducer.ShellFolder, AItemProducer.FolderPidl, APIDL); - UpdateNode(ANode, True); - finally - DisposePidl(APIDL); - end - else - ANode.Text := APrevNodeText; -end; - -procedure TcxCustomInnerShellTreeView.ContextPopupItemProducerDestroyHandler( - Sender: TObject); -begin - FContextPopupItemProducer.UnlockRead; - FContextPopupItemProducer.OnDestroy := nil; - FContextPopupItemProducer := nil; -end; - -function TcxCustomInnerShellTreeView.GetFolder(AIndex: Integer): TcxShellFolder; -var - ANode: TTreeNode; -begin - ANode := Items[AIndex]; - if ANode.Parent = nil then - Result := Root.Folder - else - Result := TcxShellItemInfo(TcxShellTreeItemProducer(ANode.Parent.Data).Items[ANode.Index]).Folder; -end; - -function TcxCustomInnerShellTreeView.GetFolderCount: Integer; -begin - Result := Items.Count; -end; - -function TcxCustomInnerShellTreeView.GetNodeFromItem( - const Item: TTVItem): TTreeNode; -begin - Result := nil; - if Items <> nil then - with Item do - if (state and TVIF_PARAM) <> 0 then - Result := Pointer(lParam) - else - Result := Items.GetNode(hItem); -end; - -procedure TcxCustomInnerShellTreeView.RestoreTreeState; - - procedure RestoreExpandedNodes; - - procedure ExpandNode(APIDL: PItemIDList); - var - ANode: TTreeNode; - begin - if Root.ShellFolder = nil then - Root.CheckRoot; - if APIDL = nil then - APIDL := Root.Pidl; - ANode := GetNodeByPIDL(APIDL); - if ANode <> nil then - ANode.Expand(False); - end; - - procedure DestroyExpandedNodeList; - var - I: Integer; - begin - if FStateData.ExpandedNodeList = nil then - Exit; - for I := 0 to FStateData.ExpandedNodeList.Count - 1 do - DisposePidl(PItemIDList(FStateData.ExpandedNodeList[I])); - FreeAndNil(FStateData.ExpandedNodeList); - end; - - var - I: Integer; - begin - try - for I := 0 to FStateData.ExpandedNodeList.Count - 1 do - ExpandNode(PItemIDList(FStateData.ExpandedNodeList[I])); - finally - DestroyExpandedNodeList; - end; - end; - - procedure RestoreTopItemIndex; - begin - if (FStateData.TopItemIndex >= 0) and (FStateData.TopItemIndex < Items.Count) then - TopItem := Items[FStateData.TopItemIndex]; - end; - - procedure RestoreCurrentPath; - var - ACurrentPath, ATempPIDL: PItemIDList; - begin - if FStateData.CurrentPath = nil then - Exit; - ACurrentPath := GetPidlCopy(FStateData.CurrentPath); - try - repeat - if GetNodeByPIDL(ACurrentPath) <> nil then - begin - PostMessage(Handle, DSM_SHELLTREERESTORECURRENTPATH, - WPARAM(GetPidlCopy(ACurrentPath)), 0); - Break; - end; - ATempPIDL := ACurrentPath; - ACurrentPath := GetPidlParent(ACurrentPath); - DisposePidl(ATempPIDL); - until False; - finally - DisposePidl(ACurrentPath); - end; - end; - -begin - try - RestoreExpandedNodes; - RestoreTopItemIndex; - RestoreCurrentPath; - finally - DisposePidl(FStateData.CurrentPath); - FStateData.CurrentPath := nil; - end; -end; - -procedure TcxCustomInnerShellTreeView.SaveTreeState; - - procedure SaveTopItemIndex; - begin - if TopItem <> nil then - FStateData.TopItemIndex := TopItem.AbsoluteIndex - else - FStateData.TopItemIndex := -1; - end; - - procedure SaveExpandedNodes; - - procedure SaveExpandedNode(ANode: TTreeNode); - var - AParentItemProducer: TcxShellTreeItemProducer; - begin - if ANode.Parent = nil then - FStateData.ExpandedNodeList.Add(nil) - else - begin - AParentItemProducer := TcxShellTreeItemProducer(ANode.Parent.Data); - FStateData.ExpandedNodeList.Add(GetPidlCopy( - TcxShellItemInfo(AParentItemProducer.Items[ANode.Index]).FullPIDL)); - end; - end; - - var - ANode: TTreeNode; - begin - FStateData.ExpandedNodeList := TList.Create; - ANode := Items.GetFirstNode; - while ANode <> nil do - begin - if ANode.Expanded then - SaveExpandedNode(ANode); - ANode := ANode.GetNext; - end; - end; - - procedure SaveCurrentPath; - begin - if Selected <> nil then - begin - if Selected.Parent = nil then - FStateData.CurrentPath := Root.Pidl - else - FStateData.CurrentPath := TcxShellItemInfo(TcxShellTreeItemProducer( - Selected.Parent.Data).Items[Selected.Index]).FullPIDL; - FStateData.CurrentPath := GetPidlCopy(FStateData.CurrentPath); - end - else - FStateData.CurrentPath := nil; - end; - -begin - SaveTopItemIndex; - SaveExpandedNodes; - SaveCurrentPath; -end; - -procedure TcxCustomInnerShellTreeView.Loaded; -begin - if Root.Pidl = nil then - Root.CheckRoot; - UpdateNode(nil, False); -end; - -procedure TcxCustomInnerShellTreeView.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if Operation = opRemove then - if AComponent = FListView then - FListView := nil -end; - -procedure TcxCustomInnerShellTreeView.CreateChangeNotification( - ANode: TTreeNode = nil); - - function GetShellChangeNotifierPIDL: PItemIDList; - begin - if Root.ShellFolder = nil then - Root.CheckRoot; - if ANode = nil then - if Selected = nil then - ANode := Items[0] - else - ANode := Selected; - if ANode.Parent = nil then - Result := Root.Pidl - else - Result := TcxShellItemInfo(TcxShellTreeItemProducer( - ANode.Parent.Data).Items[ANode.Index]).FullPIDL; - end; - -begin - if FIsChangeNotificationCreationLocked then - Exit; - FShellChangeNotificationCreation := True; - try - if not Options.TrackShellChanges or (Items.Count = 0) then - RemoveChangeNotification - else - RegisterShellChangeNotifier(GetShellChangeNotifierPIDL, Handle, - DSM_SYSTEMSHELLCHANGENOTIFY, True, FShellChangeNotifierData); - finally - FShellChangeNotificationCreation := False; - end; -end; - -procedure TcxCustomInnerShellTreeView.CreateDropTarget; -var - AIDropTarget: IcxDropTarget; -begin - GetInterface(IcxDropTarget, AIDropTarget); - RegisterDragDrop(Handle, IDropTarget(AIDropTarget)); -end; - -function TcxCustomInnerShellTreeView.DoAddFolder(AFolder: TcxShellFolder): Boolean; -begin - Result := True; - if Assigned(FOnAddFolder) then - FOnAddFolder(Self, AFolder, Result); -end; - -procedure TcxCustomInnerShellTreeView.SetPrevTargetNode(const Value: TTreeNode); -begin - if FPrevTargetNode <> nil then - FPrevTargetNode.DropTarget := False; - FPrevTargetNode := Value; - if FPrevTargetNode <> nil then - FPrevTargetNode.DropTarget := True; -end; - -function TcxCustomInnerShellTreeView.TryReleaseDropTarget: HResult; -begin - Result := S_OK; - if CurrentDropTarget <> nil then - Result := CurrentDropTarget.DragLeave; - CurrentDropTarget := nil; - PrevTargetNode := nil; -end; - -(*procedure TcxCustomInnerShellTreeView.UpdateNode(ANode: TTreeNode); -var - uNode:TTreeNode; -begin - if csLoading in ComponentState then - Exit; - uNode:=nil; - if IsWindow(Handle) and Root.IsValid then - begin - if ANode=nil then - begin - if (Items.Count > 0) and (Items[0].Data <> nil) then - Items.Clear; - if Items.Count=0 then - uNode:=Items.AddFirst(nil,'') - else - uNode:=Items[0]; - uNode.Data:=TcxShellTreeItemProducer.Create(Self); - end - else - uNode:=ANode; - uNode.HasChildren:=True; - end; - if uNode<>nil then - CanExpand(uNode); -end;*) - -procedure TcxCustomInnerShellTreeView.UpdateNode(ANode: TTreeNode; - AFast: Boolean); -var - AFullPIDL: PITemIDList; - AParentItemProducer: TcxShellTreeItemProducer; - ATempNode: TTreeNode; -begin - if csLoading in ComponentState then - Exit; - if IsWindow(WindowHandle) and Root.IsValid then - begin - if ANode = nil then - begin - if (Items.Count > 0) and (Items[0].Data <> nil) then - Items.Clear; - if Items.Count = 0 then - ATempNode := Items.AddFirst(nil, '') - else - ATempNode := Items[0]; - ATempNode.Data := TcxShellTreeItemProducer.Create(Self); - end - else - ATempNode := ANode; - if not AFast or (ATempNode.Parent = nil) then - begin - ATempNode.HasChildren := True; - CanExpand(ATempNode); - end - else - begin - AParentItemProducer := TcxShellTreeItemProducer(ATempNode.Parent.Data); - AFullPIDL := ConcatenatePidls(AParentItemProducer.FolderPidl, - TcxShellItemInfo(AParentItemProducer.Items[ATempNode.Index]).pidl); - TcxShellTreeItemProducer(ATempNode.Data).FolderPidl := AFullPIDL; - ATempNode.HasChildren := HasSubItems(AParentItemProducer.ShellFolder, - AFullPIDL, AParentItemProducer.GetEnumFlags); - end; - CreateChangeNotification; - end; -end; - -procedure TcxCustomInnerShellTreeView.SetListView( - Value: TcxCustomInnerShellListView); -begin - if FListView = Value then - Exit; - if FListView <> nil then - begin - FListView.SetTreeView(nil); - FListView.RemoveFreeNotification(Self); - end; - FListView := Value; - if FListView <> nil then - begin - FListView.FreeNotification(Self); - FListView.SetTreeView(Self); - end; - DoNavigateListView; -end; - -procedure TcxCustomInnerShellTreeView.RootSettingsChanged(Sender: TObject); -begin - if (Parent <> nil) and (csLoading in Parent.ComponentState) then - Exit; - if (FListView <> nil) and FListView.HandleAllocated then - SendMessage(FListView.Handle, DSM_SYNCHRONIZEROOT, Integer(Root), 0); - if (FComboBoxControl <> nil) and FComboBoxControl.HandleAllocated then - SendMessage(FComboBoxControl.Handle, DSM_SYNCHRONIZEROOT, Integer(Root), 0); -end; - -procedure TcxCustomInnerShellTreeView.SetShowInfoTips(Value: Boolean); -begin - if Value <> FShowInfoTips then - begin - FShowInfoTips := Value; - AdjustControlParams; - end; -end; - -procedure TcxCustomInnerShellTreeView.ShellChangeNotify(AEventID: Longint; APidl1, APidl2: PItemIDList); - - function NeedProcessMessage(AEventID: Longint; APidl1, APidl2: PItemIDList): Boolean; // TODO more detailed selection - begin - Result := (AEventID <> SHCNE_UPDATEITEM) or - (GetNodeByPIDL(APidl1) <> nil); - end; - - procedure DoShellTreeChange; - begin - if DraggedObject <> nil then - Exit; - Items.BeginUpdate; - FIsUpdating := True; - try - SendMessage(Parent.Handle, WM_SETREDRAW, 0, 0); - try - SaveTreeState; - try - Items.Clear; - UpdateNode(nil, False); - finally - RestoreTreeState; - end; - finally - SendMessage(Parent.Handle, WM_SETREDRAW, 1, 0); - Parent.Update; - end; - finally - FIsUpdating := False; - Items.EndUpdate; - end; - end; - -begin - if not FShellChangeNotificationCreation and not FIsUpdating and NeedProcessMessage(AEventID, APidl1, APidl2) then - try - DoShellTreeChange; - finally - if Assigned(FOnShellChange) then - FOnShellChange(Self, AEventID, APidl1, APidl2); - end; -end; - -procedure TcxCustomInnerShellTreeView.ShowToolTipChanged(Sender: TObject); -begin - ToolTips := Options.ShowToolTip; - AdjustControlParams; -end; - -procedure TcxCustomInnerShellTreeView.CMColorChanged(var Message: TMessage); -begin -{$IFDEF DELPHI11} - inherited; -{$ELSE} - if HandleAllocated then - inherited - else - Brush.Color := Color; -{$ENDIF} -end; - -procedure TcxCustomInnerShellTreeView.CMFontChanged(var Message: TMessage); -begin -{$IFDEF DELPHI11} - inherited; -{$ELSE} - if HandleAllocated then - inherited; -{$ENDIF} -end; - -procedure TcxCustomInnerShellTreeView.DSMShellTreeChangeNotify(var Message: TMessage); -begin - ShellChangeNotify(Message.LParam, PPItemIDList(Message.WParam)^, - PPItemIDList(Message.WParam + SizeOf(Pointer))^); -end; - -procedure TcxCustomInnerShellTreeView.DSMShellTreeRestoreCurrentPath(var Message: TMessage); -var - APrevAutoExpand: Boolean; -begin - if FIsChangeNotificationCreationLocked then - PostMessage(Handle, DSM_SHELLTREERESTORECURRENTPATH, Message.WPARAM, 0) - else - try - APrevAutoExpand := AutoExpand; - AutoExpand := False; - try - SendMessage(Handle, DSM_DONAVIGATE, Message.WPARAM, 0); - DoNavigateListView; - finally - AutoExpand := APrevAutoExpand; - end; - finally - DisposePidl(PItemIDList(Message.WPARAM)); - end; -end; - -procedure TcxCustomInnerShellTreeView.DSMSynchronizeRoot(var Message: TMessage); -begin - if not((Parent <> nil) and (csLoading in Parent.ComponentState)) then - Root.Update(TcxCustomShellRoot(Message.WParam)); -end; - -procedure TcxCustomInnerShellTreeView.DSMSystemShellChangeNotify(var Message: TMessage); -var - AEventID: Integer; - APidl1, APidl2: PItemIDList; -begin - GetShellNotifyParams(Message, AEventID, APidl1, APidl2); - try - ShellChangeNotify(AEventID, APidl1, APidl2); - finally - DisposePidl(APidl1); - DisposePidl(APidl2); - end; -end; - -procedure TcxCustomInnerShellTreeView.DoNavigateListView; -var - ATempPIDL: PItemIDList; -begin - if (Items.Count = 0) or (not Assigned(ListView) and not Assigned(ComboBoxControl)) then - Exit; - - if Selected <> nil then - ATempPIDL := TcxShellTreeItemProducer(Selected.Data).FolderPidl - else - ATempPIDL := TcxShellTreeItemProducer(Items[0].Data).FolderPidl; - if Assigned(ListView) then - ListView.ProcessTreeViewNavigate(ATempPIDL); - - if Assigned(ComboBoxControl) and (ComboBoxControl.Parent <> nil) then - begin - ComboBoxControl.HandleNeeded; - SendMessage(ComboBoxControl.Handle, DSM_DONAVIGATE, Integer(ATempPIDL), 0); - end; -end; - -procedure TcxCustomInnerShellTreeView.DragDropSettingsChanged(Sender: TObject); -begin - if DragDropSettings.AllowDragObjects then - DragMode := dmAutomatic - else - DragMode := dmManual; -end; - -procedure TcxCustomInnerShellTreeView.GetDropTarget(out ANew: Boolean; APoint: TPoint); - - function InternalGetDropTarget(ANode: TTreeNode; out ADropTarget: IcxDropTarget): Boolean; - var - AItemProducer: TcxShellTreeItemProducer; - ATempShellItemInfo: TcxShellItemInfo; - ATempPidl: PItemIDList; - ATempShellFolder: IShellFolder; - begin - if ANode.Parent = nil then - begin // Root object selected - ATempShellFolder := TcxShellTreeItemProducer(ANode.Data).ShellFolder; - Result := (ATempShellFolder <> nil) and - Succeeded(ATempShellFolder.CreateViewObject(Handle, IDropTarget, ADropTarget)); - end - else - begin // Non-root object selected - AItemProducer := TcxShellTreeItemProducer(ANode.Parent.Data); - ATempShellItemInfo := AItemProducer.Items[ANode.Index]; - ATempPidl := GetPidlCopy(ATempShellItemInfo.pidl); - try - if ATempShellItemInfo.IsFolder then - Result := Succeeded(AItemProducer.ShellFolder.BindToObject(ATempPidl, - nil, IID_IShellFolder, ATempShellFolder)) and - Succeeded(ATempShellFolder.CreateViewObject(Handle, IDropTarget, ADropTarget)) - else - Result := Succeeded(AItemProducer.ShellFolder.GetUIObjectOf(Handle, 1, - ATempPidl, IDropTarget, nil, ADropTarget)); - finally - DisposePidl(ATempPidl); - end; - end; - end; - -var - ANode: TTreeNode; - ADropTarget: IcxDropTarget; -begin - APoint := ScreenToClient(APoint); - ANode := GetNodeAt(APoint.X, APoint.Y); - if ANode = nil then - TryReleaseDropTarget; - ANew := (ANode <> nil) and ((ANode <> PrevTargetNode) or (CurrentDropTarget = nil)); - if ANew then - begin - TryReleaseDropTarget; - if InternalGetDropTarget(ANode, ADropTarget) then - begin - PrevTargetNode := ANode; - CurrentDropTarget := ADropTarget; - end; - end; -end; - -function TcxCustomInnerShellTreeView.GetNodeByPIDL(APIDL: PItemIDList): TTreeNode; -var - AItemIndex, I: Integer; - APID: PItemIDList; -begin - Result := nil; - if APIDL = nil then - Exit; - - if Root.ShellFolder = nil then - Root.CheckRoot; - if EqualPIDLs(Root.Pidl, APIDL) then - begin - Result := Items[0]; - Exit; - end; - - if not IsSubPath(Root.Pidl, APIDL) then - Exit; - - for I := 0 to GetPidlItemsCount(Root.Pidl) - 1 do - APIDL := GetNextItemID(APIDL); - Result := Items[0]; - for I := 0 to GetPidlItemsCount(APIDL) - 1 do - begin - APID := ExtractParticularPidl(APIDL); - if APID = nil then - Break; - try - AItemIndex := TcxShellTreeItemProducer(Result.Data).GetItemIndexByPidl(APID); - if (AItemIndex = -1) or (AItemIndex >= Result.Count) then - begin - Result := nil; - Break; - end; - Result := Result.Item[AItemIndex]; - APIDL := GetNextItemID(APIDL); - finally - DisposePidl(APID); - end; - end; -end; - -function TcxCustomInnerShellTreeView.IsLoading: Boolean; -begin - Result := csLoading in ComponentState; -end; - -procedure TcxCustomInnerShellTreeView.RemoveChangeNotification; -begin - UnregisterShellChangeNotifier(FShellChangeNotifierData); -end; - -procedure TcxCustomInnerShellTreeView.RemoveDropTarget; -begin - RevokeDragDrop(Handle); -end; - -procedure TcxCustomInnerShellTreeView.RemoveItemProducer( - AProducer: TcxShellTreeItemProducer); -var - ATempList: TList; -begin - ATempList := ItemProducersList.LockList; - try - ATempList.Remove(AProducer); - finally - ItemProducersList.UnlockList; - end; -end; - -procedure TcxCustomInnerShellTreeView.Change(Node: TTreeNode); -begin - inherited Change(Node); - UpdateNode(Selected, not Navigation); - if not Navigation then - DoNavigateListView; -end; - -procedure TcxCustomInnerShellTreeView.DsmDoNavigate(var Message: TMessage); -var - ASourcePidl, ADestPidl: PItemIDList; - AShellFolder: IShellFolder; - APartDstPidl: PItemIDList; - I: Integer; - ATempProducer: TcxShellTreeItemProducer; - ATempIndex: Integer; -begin - if Failed(SHGetDesktopFolder(AShellFolder)) then - Exit; - Navigation := True; - Items.BeginUpdate; - try - ASourcePidl := Root.Pidl; - ADestPidl := PItemIDList(Message.WParam); - if GetPidlItemsCount(ASourcePidl) > GetPidlItemsCount(ADestPidl) then - begin - Root.Pidl := ADestPidl; - Items[0].Selected := True; - Exit; - end; - for I := 0 to GetPidlItemsCount(ASourcePidl) - 1 do - ADestPidl := GetNextItemID(ADestPidl); - Selected := Items[0]; - for I := 0 to GetPidlItemsCount(ADestPidl) - 1 do - begin - ATempProducer := Selected.Data; - APartDstPidl := ExtractParticularPidl(ADestPidl); - ADestPidl := GetNextItemID(ADestPidl); - if APartDstPidl = nil then - Break; - try - ATempIndex := ATempProducer.GetItemIndexByPidl(APartDstPidl); - if ATempIndex = -1 then - Break; - Selected := Selected.Item[ATempIndex]; - finally - DisposePidl(APartDstPidl); - end; - end; - finally - Items.EndUpdate; - Navigation := False; - end; - - if Selected <> nil then - PostMessage(Handle, TVM_ENSUREVISIBLE, 0, LPARAM(Selected.ItemId)); -end; - -{ TcxShellTreeItemProducer } - -function TcxShellTreeItemProducer.GetItemsInfoGatherer: TcxShellItemsInfoGatherer; -begin - Result := TreeView.ItemsInfoGatherer; -end; - -procedure TcxShellTreeItemProducer.CheckForSubitems( - AItem: TcxShellItemInfo); -begin - inherited CheckForSubitems(AItem); - if (AItem <> nil) and (not AItem.IsRemovable) then - AItem.CheckSubitems(ShellFolder, GetEnumFlags); -end; - -function TcxShellTreeItemProducer.CheckUpdates: Boolean; - - procedure PopulateNewItemsList(pEnum: IEnumIDList; ANewItems: TList); - var - ACurrentCelt: Cardinal; - APidl: PItemIDList; - AItem: TcxShellItemInfo; - AHResult: HRESULT; - begin - ACurrentCelt := 1; - repeat - AHResult := pEnum.Next(ACurrentCelt, APidl, ACurrentCelt); - try - if AHResult = E_INVALIDARG then - begin - ACurrentCelt := 1; - AHResult := pEnum.Next(ACurrentCelt, APidl, ACurrentCelt); - end; - if Succeeded(AHResult) and (AHResult <> S_FALSE) and (ACurrentCelt <> 0) then - begin - AItem := TcxShellItemInfo.Create(Self, ShellFolder, FolderPidl, APidl, False); - if AItem.Name <> '' then - ANewItems.Add(AItem) - else - AItem.Free; - end - else - AHResult := S_FALSE; - finally - DisposePidl(APidl); - end; - until (AHResult = S_FALSE); - end; - - function ShellSortFunction(AItem1, AItem2: Pointer): Integer; - var - AItemInfo1, AItemInfo2: TcxShellItemInfo; - begin - Result := 0; - if (AItem1 = nil) or (AItem2 = nil) then - Exit; - AItemInfo1 := TcxShellItemInfo(AItem1); - AItemInfo2 := TcxShellItemInfo(AItem2); - Result := Byte(AItemInfo2.IsFolder) - Byte(AItemInfo1.IsFolder); - if Result = 0 then - Result := SmallInt(TcxShellTreeItemProducer( - AItemInfo1.ItemProducer).ShellFolder.CompareIDs(0, AItemInfo1.pidl, AItemInfo2.pidl)); - end; - - procedure MergeItems(AItems, ANewItems: TList); - var - I, J: Integer; - AItem, ANewItem: TcxShellItemInfo; - AFounded: Boolean; - begin - I := 0; - while (I < AItems.Count) do - begin - AItem := AItems[I]; - AFounded := False; - for J := 0 to ANewItems.Count - 1 do - begin - ANewItem := ANewItems[J]; - if SmallInt(ShellFolder.CompareIDs(0, AItem.pidl, ANewItem.pidl)) = 0 then - begin - AItem.Free; - AItems[I] := ANewItem; - ANewItems.Remove(ANewItem); - AFounded := True; - Break; - end; - end; - if not AFounded then - begin - NotifyRemoveItem(I); - AItems.Remove(AItem); - AItem.Free; - end - else - Inc(I); - end; - for I := 0 to ANewItems.Count - 1 do - if CanAddFolder(TcxShellItemInfo(ANewItems[I]).Folder) then - begin - AItems.Add(ANewItems[I]); - AItem := AItems.Last; - AItem.CheckUpdate(ShellFolder, FolderPidl, False); - NotifyAddItem(AItems.Count - 1); - end - else - TcxShellItemInfo(ANewItems[I]).Free; - end; - -var - pEnum: IEnumIDList; - ANewItems: TList; -begin - Result := False; - if (ShellFolder <> nil) and Succeeded(ShellFolder.EnumObjects(Owner.ParentWindow, - GetEnumFlags, pEnum)) and Assigned(pEnum) then - begin - ANewItems := TList.Create; - ShowHourglassCursor; - try - PopulateNewItemsList(pEnum, ANewItems); - ANewItems.Sort(@ShellSortFunction); - LockWrite; - try - MergeItems(Items, ANewItems); - finally - UnlockWrite; - end; - finally - HideHourglassCursor; - FreeAndNil(ANewItems); - end; - Result := True; - end; -end; - -constructor TcxShellTreeItemProducer.Create(AOwner: TWinControl); -begin - inherited Create(AOwner); - TreeView.AddItemProducer(Self); -end; - -destructor TcxShellTreeItemProducer.Destroy; -begin - if Assigned(FOnDestroy) then - FOnDestroy(Self); - TreeView.RemoveItemProducer(Self); - inherited Destroy; -end; - -function TcxShellTreeItemProducer.AllowBackgroundProcessing: Boolean; -begin - Result:= not TreeView.Navigation; -end; - -function TcxShellTreeItemProducer.CanAddFolder(AFolder: TcxShellFolder): Boolean; -begin - Result := TreeView.DoAddFolder(AFolder); -end; - -function TcxShellTreeItemProducer.GetEnumFlags: Cardinal; -begin - Result := TreeView.Options.GetEnumFlags; -end; - -function TcxShellTreeItemProducer.GetShowToolTip: Boolean; -begin - Result := TreeView.ShowInfoTips; -end; - -procedure TcxShellTreeItemProducer.InitializeItem(Item: TcxShellItemInfo); -begin - inherited; - Item.CheckUpdate(ShellFolder, FolderPidl, False); - CheckForSubitems(Item); -end; - -procedure TcxShellTreeItemProducer.NotifyAddItem(Index: Integer); -begin - if (Owner.HandleAllocated) and (Node <> nil) then - SendMessage(Owner.Handle, DSM_NOTIFYADDITEM, Index, Integer(Node)); -end; - -procedure TcxShellTreeItemProducer.NotifyRemoveItem(Index: Integer); -begin - if (Owner.HandleAllocated) and (Node <> nil) then - SendMessage(Owner.Handle, DSM_NOTIFYREMOVEITEM, Index, Integer(Node)); -end; - -procedure TcxShellTreeItemProducer.NotifyUpdateItem(AItem: PcxRequestItem); -begin - if (Owner.HandleAllocated) and (Node <> nil) then - PostMessage(Owner.Handle, DSM_NOTIFYUPDATE, AItem.ItemIndex, Integer(Node)); -end; - -procedure TcxShellTreeItemProducer.ProcessItems(AIFolder: IShellFolder; - APIDL: PItemIDList; ANode: TTreeNode; cPreloadItems: Integer); - - function SetNodeText: Boolean; - var - ATempPIDL: PItemIDList; - begin - Result := ANode.Parent <> nil; - if not Result then - Exit; - ATempPIDL := GetLastPidlItem(APIDL); - Node.Text := GetShellItemDisplayName( - TcxShellTreeItemProducer(Node.Parent.Data).ShellFolder, ATempPIDL, True); - end; - -var - AFileInfo: TShFileInfo; -begin - Node := ANode; - cxShellGetThreadSafeFileInfo(PChar(APIDL), 0, AFileInfo, SizeOf(AFileInfo), - SHGFI_PIDL or SHGFI_DISPLAYNAME or SHGFI_SYSICONINDEX); - if not SetNodeText then - Node.Text := StrPas(AFileInfo.szDisplayName); - ANode.ImageIndex := AFileInfo.iIcon; - cxShellGetThreadSafeFileInfo(PChar(APIDL), 0, AFileInfo, SizeOf(AFileInfo), - SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_OPENICON); - Node.SelectedIndex := AFileInfo.iIcon; - ProcessItems(AIFolder, APIDL, cPreloadItems); -end; - -procedure TcxShellTreeItemProducer.SetItemsCount(Count: Integer); -begin - if (Owner.HandleAllocated) and (Node <> nil) then - SendMessage(Owner.Handle, DSM_SETCOUNT, Count, Integer(Node)); -end; - -function TcxShellTreeItemProducer.GetTreeView: TcxCustomInnerShellTreeView; -begin - Result := TcxCustomInnerShellTreeView(Owner); -end; - -initialization - NavigationLock := False; - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxShellDlgs.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxShellDlgs.pas deleted file mode 100644 index 6baf10b1..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxShellDlgs.pas +++ /dev/null @@ -1,106 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxShellDlgs; - -interface - -uses - Windows, Messages, SysUtils, Classes, - cxShellCommon, cxLookAndFeels; - -type - { TcxDlgShellOptions } - - TcxDlgShellOptions = class(TPersistent) - private - FContextMenus: Boolean; - FShowFolders: Boolean; - FShowHidden: Boolean; - FShowNonFolders: Boolean; - FShowToolTip: Boolean; - FTrackShellChanges: Boolean; - public - constructor Create; - published - property ContextMenus: Boolean read FContextMenus write fContextMenus - default True; - property ShowFolders: Boolean read FShowFolders write FShowFolders - default True; - property ShowHidden: Boolean read FShowHidden write fShowHidden - default False; - property ShowNonFolders: Boolean read FShowNonFolders write fShowNonFolders - default False; - property ShowToolTip: Boolean read FShowToolTip write FShowToolTip - default True; - property TrackShellChanges: Boolean read FTrackShellChanges - write FTrackShellChanges default True; - end; - - { TcxDlgShellRoot } - - TcxDlgShellRoot = class(TPersistent) - private - fCustomPath: string; - fBroFold: TcxBrowseFolder; - public - constructor Create; - published - property BrowseFolder: TcxBrowseFolder read fBroFold write fBroFold default bfDesktop; - property CustomPath: string read fCustomPath write fCustomPath; - end; - -implementation - -{ TcxDdlgShellOptions } - -constructor TcxDlgShellOptions.Create; -begin - inherited Create; - FContextMenus := True; - FShowFolders := True; - FShowToolTip := True; - FTrackShellChanges := True; -end; - -{ TcxDlgShellRoot } - -constructor TcxDlgShellRoot.Create; -begin - inherited; - fBroFold := bfDesktop; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxShellEditRepositoryItems.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxShellEditRepositoryItems.pas deleted file mode 100644 index 3532058e..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxShellEditRepositoryItems.pas +++ /dev/null @@ -1,84 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxShellEditRepositoryItems; - -interface - -uses - cxEdit, cxShellComboBox; - -type - { TcxEditRepositoryShellComboBoxItem } - - TcxEditRepositoryShellComboBoxItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxShellComboBoxProperties; - procedure SetProperties(Value: TcxShellComboBoxProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxShellComboBoxProperties read GetProperties write SetProperties; - end; - -implementation - -uses - Classes; - -{ TcxEditRepositoryShellComboBoxItem } - -class function TcxEditRepositoryShellComboBoxItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxShellComboBoxProperties; -end; - -function TcxEditRepositoryShellComboBoxItem.GetProperties: TcxShellComboBoxProperties; -begin - Result := TcxShellComboBoxProperties(inherited Properties); -end; - -procedure TcxEditRepositoryShellComboBoxItem.SetProperties(Value: TcxShellComboBoxProperties); -begin - inherited Properties := Value; -end; - -initialization - RegisterClasses([TcxEditRepositoryShellComboBoxItem]); - -finalization - UnregisterClasses([TcxEditRepositoryShellComboBoxItem]); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxShellEditorsReg.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxShellEditorsReg.pas deleted file mode 100644 index 3bd8f95f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxShellEditorsReg.pas +++ /dev/null @@ -1,162 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxShellEditorsReg; - -{$I cxVer.inc} - -interface - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI6} - DesignEditors, DesignIntf, -{$ELSE} - DsgnIntf, -{$ENDIF} - Windows, Classes, Forms, ShellApi, cxDBShellComboBox, cxEditPropEditors, - cxEditRepositoryEditor, cxExtEditConsts, cxShellBrowserDialog, cxShellComboBox, - cxShellCommon, cxShellEditRepositoryItems, cxShellListView, cxShellTreeView, - cxLookAndFeels; - -const - cxShellBrowserEditorVerb = 'Test Browser...'; - -type -{$IFDEF DELPHI6} - { TcxShellEditorSelectionEditor } - - TcxShellEditorSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; -{$ENDIF} - - { TcxShellBrowserEditor } - - TcxShellBrowserEditor = class(TcxEditorsLibraryComponentEditorEx) - protected - function GetEditItemCaption: string; override; - procedure ExecuteEditAction; override; - public - procedure ExecuteVerb(Index: Integer); override; - end; - -{$IFDEF DELPHI6} -{ TcxShellEditorSelectionEditor } - -procedure TcxShellEditorSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc('ComCtrls'); - Proc('ShlObj'); - Proc('cxShellCommon'); -end; -{$ENDIF} - -{ TcxShellBrowserEditor } - -procedure TcxShellBrowserEditor.ExecuteVerb(Index: Integer); -begin - if Index = 4 then - ShellExecute(0, 'OPEN', 'http://www.devexpress.com', nil, nil, SW_SHOWMAXIMIZED) - else - inherited ExecuteVerb(Index); -end; - -function TcxShellBrowserEditor.GetEditItemCaption: string; -begin - Result := cxShellBrowserEditorVerb; -end; - -procedure TcxShellBrowserEditor.ExecuteEditAction; -var - ADialog: TcxShellBrowserDialog; -begin -ADialog := Component as TcxShellBrowserDialog; -with TcxShellBrowserDialog.Create(Application) do - try - if Length(ADialog.Title) > 0 then - Title := ADialog.Title; - if Length(ADialog.FolderLabelCaption) > 0 then - FolderLabelCaption := ADialog.FolderLabelCaption; - Options.ShowFolders := ADialog.Options.ShowFolders; - Options.ShowToolTip := ADialog.Options.ShowToolTip; - Options.TrackShellChanges := ADialog.Options.TrackShellChanges; - Options.ContextMenus := ADialog.Options.ContextMenus; - Options.ShowNonFolders := ADialog.Options.ShowNonFolders; - Options.ShowHidden := ADialog.Options.ShowHidden; - Root.BrowseFolder := ADialog.Root.BrowseFolder; - Root.CustomPath := ADialog.Root.CustomPath; - LookAndFeel.Kind := ADialog.LookAndFeel.Kind; - LookAndFeel.NativeStyle := ADialog.LookAndFeel.NativeStyle; - LookAndFeel.SkinName := ADialog.LookAndFeel.SkinName; - ShowButtons := ADialog.ShowButtons; - ShowInfoTips := ADialog.ShowInfoTips; - ShowLines := ADialog.ShowLines; - ShowRoot := ADialog.ShowRoot; - Path := ADialog.Path; - Execute; - finally - Free; - end; -end; - -procedure Register; -begin - RegisterComponents('Express Editors 6', [TcxShellComboBox]); - RegisterComponents('Express DBEditors 6', [TcxDBShellComboBox]); - RegisterComponents('Express Utilities', [TcxShellListView, TcxShellTreeView, - TcxShellBrowserDialog]); -{$IFDEF DELPHI6} - RegisterSelectionEditor(TcxCustomShellComboBox, TcxShellEditorSelectionEditor); - RegisterSelectionEditor(TcxCustomShellListView, TcxShellEditorSelectionEditor); - RegisterSelectionEditor(TcxCustomShellTreeView, TcxShellEditorSelectionEditor); -{$ENDIF} - RegisterComponentEditor(TcxShellBrowserDialog, TcxShellBrowserEditor); - RegisterPropertyEditor(TypeInfo(Boolean), TcxDragDropSettings, 'Scroll', nil); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomShellTreeView, 'RightClickSelect', nil); -end; - -initialization - RegisterEditRepositoryItem(TcxEditRepositoryShellComboBoxItem, - scxSEditRepositoryShellComboBoxItem); - -finalization - UnregisterEditRepositoryItem(TcxEditRepositoryShellComboBoxItem); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxShellListView.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxShellListView.pas deleted file mode 100644 index b68d4db8..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxShellListView.pas +++ /dev/null @@ -1,1819 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxShellListView; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, Comctrls, Controls, Forms, Classes, Menus, ShlObj, StdCtrls, - cxGraphics, cxGeometry, cxContainer, cxDataUtils, cxCustomData, cxScrollBar, - cxShellCommon, cxShellControls, cxHeader, cxLookAndFeels, cxLookAndFeelPainters; - -type - TcxShellObjectPathType = (sptAbsolutePhysical, sptRelativePhysical, sptUNC, sptVirtual, - sptInternalAbsoluteVirtual, sptInternalRelativeVirtual, sptIncorrect); - - TcxShellViewOption = (svoShowFiles, svoShowFolders, svoShowHidden); - TcxShellViewOptions = set of TcxShellViewOption; - - TcxCustomShellListView = class; - - TcxBeforeNavigationEvent = procedure(Sender: TcxCustomShellListView; ANewAbsolutePIDL: PItemIDList) of object; - TcxCurrentFolderChangedEvent = procedure(Sender: TcxCustomShellListView) of object; - - { TcxInnerShellListView } - - TcxInnerShellListView = class(TcxCustomInnerShellListView, IUnknown, - IcxContainerInnerControl) - private - FAbsolutePIDL: PItemIDList; - FCanvas: TcxCanvas; - FDefHeaderProc: Pointer; - FHeaderHandle: HWND; - FHeaderInstance: Pointer; - FPressedHeaderItemIndex: Integer; - FOnChange: TLVChangeEvent; - - function GetAbsolutePIDL: PItemIDList; - function GetPath: string; - procedure SaveAbsolutePIDL(AValue: PItemIDList); - procedure SetAbsolutePIDL(AValue: PItemIDList); - procedure SetPath(AValue: string); - // IcxContainerInnerControl - function GetControl: TWinControl; - function GetControlContainer: TcxContainer; - // header - function GetHeaderHotItemIndex: Integer; - function GetHeaderItemRect(AItemIndex: Integer): TRect; - function GetHeaderPressedItemIndex: Integer; - function HeaderItemIndex(AHeaderItem: Integer): Integer; - procedure HeaderWndProc(var Message: TMessage); - procedure LVMGetHeaderItemInfo(var Message: TCMHeaderItemInfo); message CM_GETHEADERITEMINFO; - - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCPaint(var Message: TMessage); message WM_NCPAINT; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure DSMShellChangeNotify(var Message: TMessage); message DSM_SHELLCHANGENOTIFY; - - property AbsolutePIDL: PItemIDList read GetAbsolutePIDL write SetAbsolutePIDL; - property Path: string read GetPath write SetPath; - protected - FContainer: TcxCustomShellListView; - procedure Click; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - procedure DblClick; override; - procedure DestroyWnd; override; - function DoCompare(AItem1, AItem2: TcxShellFolder; - out ACompare: Integer): Boolean; override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); override; - procedure DrawHeader; virtual; - function GetPopupMenu: TPopupMenu; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); virtual; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure Navigate(APIDL: PItemIDList); override; - procedure WndProc(var Message: TMessage); override; - procedure ChangeHandler(Sender: TObject; AItem: TListItem; - AChange: TItemChange); virtual; - procedure MouseEnter(AControl: TControl); dynamic; - procedure MouseLeave(AControl: TControl); dynamic; - - property Canvas: TcxCanvas read FCanvas; - property Container: TcxCustomShellListView read FContainer; - property OnChange: TLVChangeEvent read FOnChange write FOnChange; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure DefaultHandler(var Message); override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - function CanFocus: Boolean; override; - public - property Align; - property Anchors; - property BorderStyle; - property Color; - property DragDropSettings; - property HotTrack; - property IconOptions; - property Items; - property ListViewStyle; - property MultiSelect; - property Options; - property Root; - property Visible; - property AfterNavigation; - property BeforeNavigation; - property OnAddFolder; - property OnCompare; - property OnRootChanged; - property OnSelectItem; - property OnShellChange; - end; - - { TcxCustomShellListView } - - TcxCustomShellListView = class(TcxContainer) - private - FInnerListView: TcxInnerShellListView; - FIsExitProcessing: Boolean; - FScrollBarsCalculating: Boolean; - FOnAddFolder: TcxShellAddFolderEvent; - FOnBeforeNavigation: TcxBeforeNavigationEvent; - FOnChange: TLVChangeEvent; - FOnCurrentFolderChanged: TcxCurrentFolderChangedEvent; - FOnCompare: TcxShellCompareEvent; - FOnExecuteItem: TcxShellExecuteItemEvent; - FOnSelectItem: TLVSelectItemEvent; - FOnShellChange: TcxShellChangeEvent; - - procedure AddFolderHandler(Sender: TObject; AFolder: TcxShellFolder; var ACanAdd: Boolean); - procedure BeforeNavigationHandler(Sender: TcxCustomInnerShellListView; - APItemIDList: PItemIDList; AFolderPath: WideString); - procedure ChangeHandler(Sender: TObject; Item: TListItem; Change: TItemChange); - procedure ExecuteItemHandler(Sender: TObject; APIDL: PItemIDList; var AHandled: Boolean); - procedure SelectItemHandler(Sender: TObject; Item: TListItem; Selected: Boolean); - procedure ShellChangeHandler(Sender: TObject; AEventID: DWORD; - APIDL1, APIDL2: PItemIDList); - - function DoCompare(AItem1, AItem2: TcxShellFolder; - out ACompare: Integer): Boolean; - function GetAbsolutePIDL: PItemIDList; - function GetDragDropSettings: TcxDragDropSettings; - function GetFolder(AIndex: Integer): TcxShellFolder; - function GetFolderCount: Integer; - function GetIconOptions: TIconOptions; - function GetInnerListView: TcxInnerShellListView; - function GetListHotTrack: Boolean; - function GetMultiSelect: Boolean; - function GetOptions: TcxShellListViewOptions; - function GetPath: string; - function GetRoot: TcxShellListRoot; - function GetShowColumnHeaders: Boolean; - function GetViewStyle: TViewStyle; - procedure SetAbsolutePIDL(Value: PItemIDList); - procedure SetDragDropSettings(Value: TcxDragDropSettings); - procedure SetIconOptions(Value: TIconOptions); - procedure SetListHotTrack(Value: Boolean); - procedure SetMultiSelect(Value: Boolean); - procedure SetOptions(Value: TcxShellListViewOptions); - procedure SetPath(Value: string); - procedure SetRoot(Value: TcxShellListRoot); - procedure SetShowColumnHeaders(Value: Boolean); - procedure SetViewStyle(Value: TViewStyle); - protected - FDataBinding: TcxCustomDataBinding; - procedure DoExit; override; - procedure Loaded; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - function NeedsScrollBars: Boolean; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - procedure CurrentFolderChangedHandler(Sender: TObject; Root: TcxCustomShellRoot); virtual; - function GetDataBindingClass: TcxCustomDataBindingClass; virtual; - function GetViewOptions(AForNavigation: Boolean = False): TcxShellViewOptions; - procedure SetTreeView(ATreeView:TWinControl); - property DataBinding: TcxCustomDataBinding read FDataBinding; - property DragDropSettings: TcxDragDropSettings read GetDragDropSettings write SetDragDropSettings; - property IconOptions: TIconOptions read GetIconOptions write SetIconOptions; - property ListHotTrack: Boolean read GetListHotTrack write SetListHotTrack default False; - property MultiSelect: Boolean read GetMultiSelect write SetMultiSelect default False; - property Options: TcxShellListViewOptions read GetOptions write SetOptions; - property Root: TcxShellListRoot read GetRoot write SetRoot; - property ShowColumnHeaders: Boolean read GetShowColumnHeaders - write SetShowColumnHeaders default True; - property ViewStyle: TViewStyle read GetViewStyle write SetViewStyle default vsIcon; - - property OnAddFolder: TcxShellAddFolderEvent read FOnAddFolder write FOnAddFolder; - property OnBeforeNavigation: TcxBeforeNavigationEvent read FOnBeforeNavigation write FOnBeforeNavigation; - property OnChange: TLVChangeEvent read FOnChange write FOnChange; - property OnCompare: TcxShellCompareEvent read FOnCompare write FOnCompare; - property OnCurrentFolderChanged: TcxCurrentFolderChangedEvent - read FOnCurrentFolderChanged write FOnCurrentFolderChanged; - property OnExecuteItem: TcxShellExecuteItemEvent read FOnExecuteItem write FOnExecuteItem; - property OnSelectItem: TLVSelectItemEvent read FOnSelectItem write FOnSelectItem; - property OnShellChange: TcxShellChangeEvent read FOnShellChange write FOnShellChange; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - procedure SetFocus; override; - procedure BrowseParent; - function GetItemAbsolutePIDL(AIndex: Integer): PItemIDList; - procedure ProcessTreeViewNavigate(APidl: PItemIDList); - procedure Sort; - procedure UpdateContent; - property AbsolutePath: string read GetPath write SetPath; // deprecated - property AbsolutePIDL: PItemIDList read GetAbsolutePIDL write SetAbsolutePIDL; - property FolderCount: Integer read GetFolderCount; - property Folders[AIndex: Integer]: TcxShellFolder read GetFolder; - property InnerListView: TcxInnerShellListView read GetInnerListView; - property Path: string read GetPath write SetPath; - end; - - { TcxShellListView } - - TcxShellListView = class(TcxCustomShellListView) - published - property Align; - property Anchors; - property Constraints; - property DragDropSettings; - property Enabled; - property IconOptions; - property ListHotTrack; - property MultiSelect; - property Options; - property ParentColor default False; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Root; - property ShowColumnHeaders; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property ViewStyle; - property Visible; - property OnAddFolder; - property OnBeforeNavigation; - property OnChange; - property OnClick; - property OnCompare; - property OnContextPopup; - property OnCurrentFolderChanged; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExecuteItem; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnSelectItem; - property OnShellChange; - property OnStartDock; - property OnStartDrag; - end; - - TcxShellSpecialFolderInfoTableItem = record - Attributes: ULONG; - PIDL: PItemIDList; - PIDLDisplayName, PIDLName, PIDLUpperCaseDisplayName: string; - end; - -function CheckAbsolutePIDL(var APIDL: PItemIDList; ARoot: TcxCustomShellRoot; - ACheckObjectExistence: Boolean; ACheckIsSubPath: Boolean = True): Boolean; -function CheckShellObjectExistence(APIDL: PItemIDList): Boolean; -function CheckShellObjectPath(var APath: string; ACurrentPath: string; - AIsDisplayText: Boolean): TcxShellObjectPathType; -function CheckViewOptions(AViewOptions: TcxShellViewOptions; - AShellObjectAttributes: ULONG): Boolean; -function GetPIDLDisplayName(APIDL: PItemIDList; AShowFullPath: Boolean = False): string; -function InternalParseDisplayName(AParentIFolder: IShellFolder; - ADisplayName: string; AViewOptions: TcxShellViewOptions): PItemIDList; -function PathToAbsolutePIDL(APath: string; ARoot: TcxCustomShellRoot; - AViewOptions: TcxShellViewOptions; ACheckIsSubPath: Boolean = True): PItemIDList; -function ShellObjectInternalVirtualPathToPIDL(APath: string; - ARoot: TcxCustomShellRoot; AViewOptions: TcxShellViewOptions): PItemIDList; - -const - cxShellSpecialFolderInfoTableLength = CSIDL_HISTORY - CSIDL_DESKTOP + 1; - -var - cxShellSpecialFolderInfoTable: array[CSIDL_DESKTOP..CSIDL_HISTORY] of - TcxShellSpecialFolderInfoTableItem; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - SysUtils, CommCtrl, ComObj, Graphics, Types, ShellAPI, cxClasses, cxEdit, - cxControls, dxCore; - -type - TcxCustomDataBindingAccess = class(TcxCustomDataBinding); - TcxContainerAccess = class(TcxContainer); - TcxCustomShellRootAccess = class(TcxCustomShellRoot); - -function CheckAbsolutePIDL(var APIDL: PItemIDList; ARoot: TcxCustomShellRoot; - ACheckObjectExistence: Boolean; ACheckIsSubPath: Boolean = True): Boolean; -begin - CheckShellRoot(ARoot); - if APIDL = nil then - begin - Result := True; - APIDL := ARoot.Pidl; - end - else - begin - Result := not ACheckIsSubPath or IsSubPath(ARoot.Pidl, APIDL); - if Result and ACheckObjectExistence then - Result := CheckShellObjectExistence(APIDL); - end; -end; - -function CheckShellObjectExistence(APIDL: PItemIDList): Boolean; -var - ASHFileInfo: TSHFileInfo; -begin - Result := SHGetFileInfo(PChar(APIDL), 0, ASHFileInfo, SizeOf(ASHFileInfo), - SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_SMALLICON) <> 0; -end; - -function CheckShellObjectPath(var APath: string; ACurrentPath: string; - AIsDisplayText: Boolean): TcxShellObjectPathType; -var - APathLength: Integer; - S: string; -begin - APathLength := Length(APath); - Result := sptIncorrect; - if APathLength = 0 then - Exit; - - if (APathLength > 1) and (APath[APathLength] = '\') and (APath[APathLength - 1] <> ':') then - begin - Dec(APathLength); - SetLength(APath, APathLength); - end; - - if (APathLength > 2) and (APath[1] = '\') and (APath[2] = '\') then - begin - Result := sptUNC; - Exit; - end; - if APathLength >= cxShellObjectInternalVirtualPathPrefixLength then - begin - S := AnsiUpperCase(Copy(APath, 1, cxShellObjectInternalVirtualPathPrefixLength)); - if S = cxShellObjectInternalAbsoluteVirtualPathPrefix then - begin - Result := sptInternalAbsoluteVirtual; - Exit; - end; - if S = cxShellObjectInternalRelativeVirtualPathPrefix then - begin - Result := sptInternalRelativeVirtual; - Exit; - end; - if Copy(S, 1, 3) = '::{' then - begin - Result := sptVirtual; - Exit; - end; - end; - if (Length(APath) >= 3) and (APath[2] = ':') and (APath[3] = '\') and - dxCharInSet(APath[1], ['A'..'Z', 'a'..'z']) then - begin - Result := sptAbsolutePhysical; - Exit; - end; - if (APath[1] = '\') or (Length(APath) >= 2) and (APath[2] = ':') and - dxCharInSet(APath[1], ['A'..'Z', 'a'..'z']) then - begin - if (Length(ACurrentPath) < 3) or (ACurrentPath[2] <> ':') or - (ACurrentPath[3] <> '\') or not dxCharInSet(ACurrentPath[1], ['A'..'Z', 'a'..'z']) then - Exit; - if (APath[1] <> '\') and (UpperCase(APath[1]) <> UpperCase(ACurrentPath[1])) then - Exit; - if (APath[1] <> '\') and (APathLength = 2) then - begin - if AIsDisplayText then - begin - APath := ACurrentPath; - Result := sptAbsolutePhysical; - Exit; - end - else - Exit; - end - else - if APath[1] = '\' then - begin - if APathLength = 1 then - APath := Copy(ACurrentPath, 1, 3) - else - APath := Copy(ACurrentPath, 1, 2) + APath; - Result := sptAbsolutePhysical; - Exit; - end - else - if not AIsDisplayText then - Exit - else - begin - APath := Copy(APath, 3, APathLength - 2); - Result := sptRelativePhysical; - Exit; - end; - end; - Result := sptRelativePhysical; -end; - -function CheckViewOptions(AViewOptions: TcxShellViewOptions; - AShellObjectAttributes: ULONG): Boolean; -begin - Result := not((AShellObjectAttributes and SFGAO_HIDDEN <> 0) and - not(svoShowHidden in AViewOptions)); - Result := Result and not((AShellObjectAttributes and SFGAO_FOLDER = 0) and - not(svoShowFiles in AViewOptions)); - Result := Result and not((AShellObjectAttributes and SFGAO_FOLDER <> 0) and - not(svoShowFolders in AViewOptions)); -end; - -procedure DestroyShellSpecialFolderInfoTable; -var - ACSIDL: Integer; -begin - for ACSIDL := CSIDL_DESKTOP to CSIDL_HISTORY do - begin - DisposePidl(cxShellSpecialFolderInfoTable[ACSIDL].PIDL); - cxShellSpecialFolderInfoTable[ACSIDL].PIDL := nil; - end; -end; - -function GetShellEnumObjectsFlags(AViewOptions: TcxShellViewOptions): DWORD; -begin - Result := 0; - if svoShowFiles in AViewOptions then - Result := Result or SHCONTF_NONFOLDERS; - if svoShowFolders in AViewOptions then - Result := Result or SHCONTF_FOLDERS; - if svoShowHidden in AViewOptions then - Result := Result or SHCONTF_INCLUDEHIDDEN; -end; - -function GetPIDLDisplayName(APIDL: PItemIDList; AShowFullPath: Boolean = False): string; -var - AParentIFolder: IShellFolder; - AStrRet: TStrRet; - ATempPIDL: PItemIDList; - I: Integer; -begin - Result := ''; - if AShowFullPath then - begin - Result := GetPidlName(APIDL); - if Result <> '' then - Exit; - end; - AParentIFolder := GetDesktopIShellFolder; - for I := 1 to GetPidlItemsCount(APIDL) + Integer(AShowFullPath) - 1 do - begin - ATempPIDL := cxMalloc.Alloc(APIDL^.mkid.cb + SizeOf(SHITEMID)); - FillChar(ATempPIDL^, APIDL^.mkid.cb + SizeOf(SHITEMID), 0); - CopyMemory(ATempPIDL, APIDL, APIDL^.mkid.cb); - Integer(APIDL) := Integer(APIDL) + APIDL^.mkid.cb; - - if AShowFullPath then - begin - if AParentIFolder.GetDisplayNameOf(ATempPIDL, SHGDN_INFOLDER, AStrRet) <> S_OK then - Break; - if Result <> '' then - Result := Result + '\'; - Result := Result + GetTextFromStrRet(AStrRet, APIDL); - end; - - AParentIFolder.BindToObject(ATempPIDL, nil, IID_IShellFolder, Pointer(AParentIFolder)); - DisposePidl(ATempPIDL); - end; - - if not AShowFullPath and (AParentIFolder.GetDisplayNameOf(APIDL, SHGDN_NORMAL, AStrRet) = S_OK) then - Result := GetTextFromStrRet(AStrRet, APIDL); -end; - -function InternalParseDisplayName(AParentIFolder: IShellFolder; - ADisplayName: string; AViewOptions: TcxShellViewOptions): PItemIDList; -var - AAttributes, AFetchedItemCount, AParsedCharCount: ULONG; - AFlags: DWORD; - AIEnumIDList: IEnumIDList; -// AStrRet: TStrRet; - ATempPIDL: PItemIDList; -begin - Result := nil; - AAttributes := SFGAO_HIDDEN or SFGAO_FOLDER; - AParentIFolder.ParseDisplayName(0, nil, StringToOleStr(ADisplayName), - AParsedCharCount, Result, AAttributes); - if Result <> nil then - begin - if not CheckViewOptions(AViewOptions, AAttributes) then - Result := nil; - Exit; - end; - - AFlags := GetShellEnumObjectsFlags(AViewOptions); - if (AParentIFolder.EnumObjects(0, AFlags, AIEnumIDList) = S_OK) and - Assigned(AIEnumIDList) then - begin - ADisplayName := AnsiUpperCase(ADisplayName); - while AIEnumIDList.Next(1, ATempPIDL, AFetchedItemCount) = NOERROR do - begin -// FillChar(AStrRet, SizeOf(AStrRet), 0); -// AParentIFolder.GetDisplayNameOf(ATempPIDL, SHGDN_INFOLDER, AStrRet); -// if AnsiUpperCase(GetTextFromStrRet(AStrRet, ATempPIDL)) = ADisplayName then - if AnsiUpperCase(GetShellItemDisplayName(AParentIFolder, ATempPIDL, True)) = ADisplayName then - begin - Result := ATempPIDL; - Break; - end - else - DisposePidl(ATempPIDL); - end; - end; -end; - -function PathToAbsolutePIDL(APath: string; ARoot: TcxCustomShellRoot; - AViewOptions: TcxShellViewOptions; ACheckIsSubPath: Boolean = True): PItemIDList; - - function InternalPathToAbsolutePIDL: PItemIDList; - var - ACSIDL: Integer; - APathType: TcxShellObjectPathType; - ATempPIDL: PItemIDList; - begin - Result := nil; - APathType := CheckShellObjectPath(APath, AnsiUpperCase(GetPidlName(ARoot.Pidl)), False); - case APathType of - sptIncorrect: - Exit; - sptAbsolutePhysical, sptUNC, sptVirtual: - Result := InternalParseDisplayName(GetDesktopIShellFolder, APath, AViewOptions); - sptInternalAbsoluteVirtual, sptInternalRelativeVirtual: - Result := ShellObjectInternalVirtualPathToPIDL(APath, ARoot, AViewOptions); - sptRelativePhysical: - begin - ATempPIDL := InternalParseDisplayName(ARoot.ShellFolder, APath, AViewOptions); - if ATempPIDL <> nil then - begin - Result := ConcatenatePidls(ARoot.Pidl, ATempPIDL); - DisposePidl(ATempPIDL); - Exit; - end; - - for ACSIDL := CSIDL_DESKTOP to CSIDL_HISTORY do - with cxShellSpecialFolderInfoTable[ACSIDL] do - if (PIDL <> nil) and (PIDLUpperCaseDisplayName = APath) and - CheckViewOptions(AViewOptions, Attributes) then - begin - Result := GetPidlCopy(PIDL); - Break; - end; - end; - end; - end; - -begin - CheckShellRoot(ARoot); - - if APath = '' then - Result := GetPidlCopy(ARoot.Pidl) - else - begin - APath := AnsiUpperCase(APath); - Result := InternalPathToAbsolutePIDL; - end; - - if (Result <> nil) and ACheckIsSubPath and not IsSubPath(ARoot.Pidl, Result) then - begin - DisposePidl(Result); - Result := nil; - end; -end; - -function ShellObjectInternalVirtualPathToPIDL(APath: string; - ARoot: TcxCustomShellRoot; AViewOptions: TcxShellViewOptions): PItemIDList; -var - AAttributes: UINT; - AFetchedItemCount: ULONG; - AFlags: DWORD; - AIEnumIDList: IEnumIDList; - AParentIFolder: IShellFolder; - AStrRet: TStrRet; - ATempPIDL, ATempPIDL1, ATempPIDL2: PItemIDList; - I: Integer; - S: string; -begin - Result := nil; - - if Copy(APath, 1, cxShellObjectInternalVirtualPathPrefixLength) = cxShellObjectInternalAbsoluteVirtualPathPrefix then - begin - AParentIFolder := GetDesktopIShellFolder; - ATempPIDL := nil; - end - else - begin - AParentIFolder := ARoot.ShellFolder; - ATempPIDL := GetPidlCopy(ARoot.Pidl); - end; - APath := Copy(APath, cxShellObjectInternalVirtualPathPrefixLength + 2, - Length(APath) - cxShellObjectInternalVirtualPathPrefixLength - 1); - if APath = '' then - begin - Result := CreateEmptyPidl; - Exit; - end; - - repeat - I := Pos('\', APath); - if I = 0 then - begin - S := APath; - APath := ''; - end - else - begin - S := Copy(APath, 1, I - 1); - APath := Copy(APath, I + 1, Length(APath) - I); - end; - - AFlags := GetShellEnumObjectsFlags(AViewOptions); - if (AParentIFolder.EnumObjects(0, AFlags, AIEnumIDList) <> S_OK) or - not Assigned(AIEnumIDList) then - begin - DisposePidl(ATempPIDL); - Exit; - end; - while AIEnumIDList.Next(1, ATempPIDL1, AFetchedItemCount) = NOERROR do - begin - FillChar(AStrRet, SizeOf(AStrRet), 0); - AParentIFolder.GetDisplayNameOf(ATempPIDL1, SHGDN_INFOLDER, AStrRet); - if AnsiUpperCase(GetTextFromStrRet(AStrRet, ATempPIDL1)) = S then - begin - if APath = '' then - begin - Result := ConcatenatePidls(ATempPIDL, ATempPIDL1); - DisposePidl(ATempPIDL); - DisposePidl(ATempPIDL1); - Exit; - end; - AAttributes := SFGAO_FOLDER; - AParentIFolder.GetAttributesOf(1, ATempPIDL1, AAttributes); - if AAttributes and SFGAO_FOLDER = 0 then - begin - DisposePidl(ATempPIDL); - DisposePidl(ATempPIDL1); - Exit; - end; - AParentIFolder.BindToObject(ATempPIDL1, nil, IID_IShellFolder, Pointer(AParentIFolder)); - ATempPIDL2 := ATempPIDL; - ATempPIDL := ConcatenatePidls(ATempPIDL, ATempPIDL1); - DisposePidl(ATempPIDL1); - DisposePidl(ATempPIDL2); - Break; - end; - end; - until I = 0; -end; - -procedure PrepareShellSpecialFolderInfoTable; -var - ACSIDL: Integer; - ADesktopIFolder: IShellFolder; - ATempPIDL: PItemIDList; -begin - ADesktopIFolder := GetDesktopIShellFolder; - for ACSIDL := CSIDL_DESKTOP to CSIDL_HISTORY do - with cxShellSpecialFolderInfoTable[ACSIDL] do - begin - if SHGetSpecialFolderLocation(0, ACSIDL, PIDL) <> S_OK then - begin - Attributes := 0; - PIDL := nil; - PIDLDisplayName := ''; - PIDLName := ''; - PIDLUpperCaseDisplayName := ''; - Continue; - end; - - PIDLDisplayName := GetPIDLDisplayName(PIDL); - PIDLUpperCaseDisplayName := AnsiUpperCase(PIDLDisplayName); - PIDLName := AnsiUpperCase(GetPidlName(PIDL)); - - if PIDL <> nil then - begin - Attributes := SFGAO_HIDDEN or SFGAO_FOLDER; - ATempPIDL := GetLastPidlItem(PIDL); - if ADesktopIFolder.GetAttributesOf(1, ATempPIDL, Attributes) <> NOERROR then - raise EcxEditError.Create(''); - Attributes := Attributes and (SFGAO_HIDDEN or SFGAO_FOLDER); - end; - end; -end; - -{ TcxInnerShellListView } - -constructor TcxInnerShellListView.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - BorderStyle := bsNone; - ControlStyle := ControlStyle + [csDoubleClicks]; - ParentColor := False; - ParentFont := True; - ShowColumnHeaders := True; - FPressedHeaderItemIndex := -1; - FCanvas := TcxCanvas.Create(inherited Canvas); - inherited OnChange := ChangeHandler; -end; - -destructor TcxInnerShellListView.Destroy; -begin - FreeAndNil(FCanvas); - if FHeaderHandle <> 0 then - begin - SetWindowLong(FHeaderHandle, GWL_WNDPROC, Integer(FDefHeaderProc)); - FHeaderHandle := 0; - end; - FreeObjectInstance(FHeaderInstance); - SaveAbsolutePIDL(nil); - inherited Destroy; -end; - -procedure TcxInnerShellListView.DefaultHandler(var Message); -begin - if (Container = nil) or not Container.InnerControlDefaultHandler(TMessage(Message)) then - inherited DefaultHandler(Message); -end; - -procedure TcxInnerShellListView.DragDrop(Source: TObject; X, Y: Integer); -begin - if Container <> nil then - Container.DragDrop(Source, Left + X, Top + Y); -end; - -function TcxInnerShellListView.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - TcxCustomDataBindingAccess(Container.FDataBinding).ExecuteAction(Action); -end; - -function TcxInnerShellListView.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - TcxCustomDataBindingAccess(Container.FDataBinding).UpdateAction(Action); -end; - -function TcxInnerShellListView.CanFocus: Boolean; -begin - Result := Container.CanFocus; -end; - -procedure TcxInnerShellListView.Click; -begin - inherited Click; - if Container <> nil then - Container.Click; -end; - -procedure TcxInnerShellListView.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - if Container.IconOptions.AutoArrange then - Params.Style := Params.Style or LVS_AUTOARRANGE - else - Params.Style := Params.Style and not LVS_AUTOARRANGE; - if not Container.ShowColumnHeaders then - Params.Style := Params.Style or LVS_NOCOLUMNHEADER; -end; - -procedure TcxInnerShellListView.CreateWnd; -begin - inherited CreateWnd; - if FAbsolutePIDL <> nil then - AbsolutePIDL := FAbsolutePIDL; -end; - -procedure TcxInnerShellListView.DblClick; -begin - inherited DblClick; - if Container <> nil then - Container.DblClick; -end; - -procedure TcxInnerShellListView.DestroyWnd; -var - ATempPIDL: PItemIDList; -begin - ATempPIDL := AbsolutePIDL; - try - SaveAbsolutePIDL(ATempPIDL); - finally - DisposePidl(ATempPIDL); - end; - inherited DestroyWnd; -end; - -function TcxInnerShellListView.DoCompare(AItem1, AItem2: TcxShellFolder; - out ACompare: Integer): Boolean; -begin - Result := Container.DoCompare(AItem1, AItem2, ACompare); -end; - -function TcxInnerShellListView.DoMouseWheel(Shift: TShiftState; - WheelDelta: Integer; MousePos: TPoint): Boolean; -begin - Result := (Container <> nil) and Container.DoMouseWheel(Shift, - WheelDelta, MousePos); - if not Result then - inherited DoMouseWheel(Shift, WheelDelta, MousePos); -end; - -procedure TcxInnerShellListView.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -begin - if Container <> nil then - Container.DragOver(Source, Left + X, Top + Y, State, Accept); -end; - -procedure TcxInnerShellListView.DrawHeader; -var - I: Integer; -begin - Canvas.Brush.Color := clBtnFace; - Canvas.Font := Font; - Canvas.Font.Color := clBtnText; - for I := 0 to Columns.Count do - DrawHeaderSection(FHeaderHandle, I, Canvas, Container.LookAndFeel, SmallImages); -end; - -function TcxInnerShellListView.GetPopupMenu: TPopupMenu; -begin - if Container = nil then - Result := inherited GetPopupMenu - else - Result := Container.GetPopupMenu; -end; - -procedure TcxInnerShellListView.KeyDown(var Key: Word; Shift: TShiftState); -begin - if Container <> nil then - Container.KeyDown(Key, Shift); - if Key <> 0 then - inherited KeyDown(Key, Shift); -end; - -procedure TcxInnerShellListView.KeyPress(var Key: Char); -begin - if Key = Char(VK_TAB) then - Key := #0; - if Container <> nil then - Container.KeyPress(Key); - if Word(Key) = VK_RETURN then - Key := #0; - if Key <> #0 then - inherited KeyPress(Key); -end; - -procedure TcxInnerShellListView.KeyUp(var Key: Word; Shift: TShiftState); -begin - if Key = VK_TAB then - Key := 0; - if Container <> nil then - Container.KeyUp(Key, Shift); - if Key <> 0 then - inherited KeyUp(Key, Shift); -end; - -procedure TcxInnerShellListView.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - if FHeaderHandle <> 0 then - InvalidateRect(FHeaderHandle, nil, False); -end; - -procedure TcxInnerShellListView.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if Container <> nil then - with Container do - begin - InnerControlMouseDown := True; - try - MouseDown(Button, Shift, X + Self.Left, Y + Self.Top); - finally - InnerControlMouseDown := False; - end; - end; -end; - -procedure TcxInnerShellListView.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - if Container <> nil then - Container.MouseMove(Shift, X + Left, Y + Top); -end; - -procedure TcxInnerShellListView.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - if Container <> nil then - Container.MouseUp(Button, Shift, X + Left, Y + Top); -end; - -procedure TcxInnerShellListView.Navigate(APIDL: PItemIDList); -begin - inherited Navigate(APIDL); - if HandleAllocated then - begin - SendMessage(Handle, WM_HSCROLL, MakeWParam(SB_LEFT, 0), 0); - SendMessage(Handle, WM_VSCROLL, MakeWParam(SB_TOP, 0), 0); - end; -end; - -procedure TcxInnerShellListView.WndProc(var Message: TMessage); -var - AHeaderStyle: Integer; - S: string; -begin - if (Container <> nil) and Container.InnerControlMenuHandler(Message) then - Exit; - -{$IFNDEF DELPHI5} - if Message.Msg = WM_RBUTTONDOWN then - begin - Container.LockPopupMenu(True); - try - inherited WndProc(Message); - finally - Container.LockPopupMenu(False); - end; - Exit; - end; -{$ENDIF} - - if Container <> nil then - if ((Message.Msg = WM_LBUTTONDOWN) or (Message.Msg = WM_LBUTTONDBLCLK)) and - (Container.DragMode = dmAutomatic) and not Container.IsDesigning then - begin - Container.BeginAutoDrag; - Exit; - end; - - inherited WndProc(Message); - case Message.Msg of - DSM_NOTIFYUPDATECONTENTS, - DSM_NOTIFYUPDATE, - WM_HSCROLL, - WM_MOUSEWHEEL, - WM_VSCROLL, - WM_WINDOWPOSCHANGED, - CM_WININICHANGE, - LVM_SETITEMCOUNT: - Container.SetScrollBarsParameters; - WM_SETREDRAW: - if Message.WParam <> 0 then - Container.SetScrollBarsParameters; - WM_PARENTNOTIFY: - if Message.WParamLo = WM_CREATE then - begin - SetLength(S, 80); - SetLength(S, GetClassName(Message.LParam, PChar(S), Length(S))); - if S = 'SysHeader32' then - begin - FHeaderHandle := Message.LParam; - FHeaderInstance := MakeObjectInstance(HeaderWndProc); - FDefHeaderProc := Pointer(SetWindowLong(FHeaderHandle, GWL_WNDPROC, Integer(FHeaderInstance))); - AHeaderStyle := GetWindowLong(FHeaderHandle, GWL_STYLE); - SetWindowLong(FHeaderHandle, GWL_STYLE, AHeaderStyle or HDS_HOTTRACK); - end; - end; - end; -end; - -procedure TcxInnerShellListView.ChangeHandler(Sender: TObject; AItem: TListItem; - AChange: TItemChange); -begin - if AItem <> nil then - try - if Assigned(FOnChange) then - FOnChange(Sender, AItem, AChange); - finally - Container.SetScrollBarsParameters; - end; -end; - -procedure TcxInnerShellListView.MouseEnter(AControl: TControl); -begin -end; - -procedure TcxInnerShellListView.MouseLeave(AControl: TControl); -begin - if Container <> nil then - Container.ShortRefreshContainer(True); -end; - -function TcxInnerShellListView.GetAbsolutePIDL: PItemIDList; -begin - if HandleAllocated then - begin - CheckShellRoot(Root); - Result := GetPidlCopy(Root.Pidl); - end - else - Result := GetPidlCopy(FAbsolutePIDL); -end; - -function TcxInnerShellListView.GetPath: string; -var - ATempPIDL: PItemIDList; -begin - ATempPIDL := AbsolutePIDL; - try - Result := GetPidlName(ATempPIDL); - finally - DisposePidl(ATempPIDL); - end; -end; - -procedure TcxInnerShellListView.SaveAbsolutePIDL(AValue: PItemIDList); -var - ATempPIDL: PItemIDList; -begin - ATempPIDL := GetPidlCopy(AValue); - DisposePidl(FAbsolutePIDL); - FAbsolutePIDL := ATempPIDL; -end; - -procedure TcxInnerShellListView.SetAbsolutePIDL(AValue: PItemIDList); -begin - if HandleAllocated then - begin - if CheckAbsolutePIDL(AValue, Root, True, False) then - begin - ProcessTreeViewNavigate(AValue); - DoNavigateTreeView; - end; - end - else - SaveAbsolutePIDL(AValue); -end; - -procedure TcxInnerShellListView.SetPath(AValue: string); -var - APIDL: PItemIDList; -begin - APIDL := PathToAbsolutePIDL(AValue, Root, Container.GetViewOptions(True), False); - if APIDL <> nil then - try - AbsolutePIDL := APIDL; - finally - DisposePidl(APIDL); - end; -end; - -function TcxInnerShellListView.GetControl: TWinControl; -begin - Result := Self; -end; - -function TcxInnerShellListView.GetControlContainer: TcxContainer; -begin - Result := FContainer; -end; - -function TcxInnerShellListView.GetHeaderHotItemIndex: Integer; -var - AHitTestInfo: THDHitTestInfo; -begin - if WindowFromPoint(InternalGetCursorPos) <> FHeaderHandle then - begin - Result := -1; - Exit; - end; - - AHitTestInfo.Point := InternalGetCursorPos; - Windows.ScreenToClient(FHeaderHandle, AHitTestInfo.Point); - SendGetStructMessage(FHeaderHandle, HDM_HITTEST, 0, AHitTestInfo); - Result := AHitTestInfo.Item; -end; - -function TcxInnerShellListView.GetHeaderItemRect(AItemIndex: Integer): TRect; -var - AHeaderItem: THDItem; - I: Integer; - R: TRect; -begin - if GetComCtlVersion >= ComCtlVersionIE3 then - SendGetStructMessage(FHeaderHandle, HDM_GETITEMRECT, AItemIndex, Result) - else - begin - Result.Top := 0; - Result.Left := 0; - AHeaderItem.Mask := HDI_WIDTH; - for I := 0 to AItemIndex - 1 do - begin - SendGetStructMessage(FHeaderHandle, HDM_GETITEM, I, AHeaderItem); - Inc(Result.Left, AHeaderItem.cxy); - end; - R := cxGetWindowRect(FHeaderHandle); - Result.Bottom := cxRectHeight(R); - SendGetStructMessage(FHeaderHandle, HDM_GETITEM, AItemIndex, AHeaderItem); - Result.Right := Result.Left + AHeaderItem.cxy; - end; -end; - -function TcxInnerShellListView.GetHeaderPressedItemIndex: Integer; -var - AHitTestInfo: THDHitTestInfo; -begin - AHitTestInfo.Point := InternalGetCursorPos; - Windows.ScreenToClient(FHeaderHandle, AHitTestInfo.Point); - SendGetStructMessage(FHeaderHandle, HDM_HITTEST, 0, AHitTestInfo); - if AHitTestInfo.Flags and (HHT_ONDIVIDER or HHT_ONDIVOPEN) <> 0 then - Result := -1 - else - Result := AHitTestInfo.Item; -end; - -function TcxInnerShellListView.HeaderItemIndex(AHeaderItem: Integer): Integer; -begin - Result := AHeaderItem; - if GetComCtlVersion >= ComCtlVersionIE3 then - Result := SendMessage(FHeaderHandle, HDM_ORDERTOINDEX, AHeaderItem, 0); -end; - -procedure TcxInnerShellListView.HeaderWndProc(var Message: TMessage); - - procedure CallDefHeaderProc; - begin - Message.Result := CallWindowProc(FDefHeaderProc, FHeaderHandle, - Message.Msg, Message.WParam, Message.LParam); - end; - -var - ADC: HDC; - APaintStruct: TPaintStruct; - R: TRect; -begin - case Message.Msg of - WM_ERASEBKGND: - Message.Result := 1; - WM_PAINT, WM_PRINTCLIENT: - begin - ADC := Message.WParam; - if ADC = 0 then - ADC := BeginPaint(FHeaderHandle, APaintStruct); - try - Canvas.Canvas.Handle := ADC; - Canvas.Canvas.Refresh; - DrawHeader; - finally - if Message.WParam = 0 then - EndPaint(FHeaderHandle, APaintStruct); - end; - end; - WM_LBUTTONDOWN: - begin - CallDefHeaderProc; - if ColumnClick and (GetCapture = FHeaderHandle) then - FPressedHeaderItemIndex := GetHeaderPressedItemIndex; - end; - WM_CAPTURECHANGED: - begin - if FPressedHeaderItemIndex <> -1 then - begin - R := GetHeaderItemRect(FPressedHeaderItemIndex); - InvalidateRect(FHeaderHandle, @R, False); - end; - FPressedHeaderItemIndex := -1; - CallDefHeaderProc; - end; - CM_GETHEADERITEMINFO: - Perform(CM_GETHEADERITEMINFO, Message.WParam, Message.LParam); - else - CallDefHeaderProc; - end; -end; - -procedure TcxInnerShellListView.LVMGetHeaderItemInfo(var Message: TCMHeaderItemInfo); - - function GetItemState: TcxButtonState; - - function CanHotTrack: Boolean; - var - I: Integer; - begin - Result := ColumnClick; - if Result then - for I := 0 to Columns.Count - 1 do - if Columns[I].ImageIndex <> -1 then - begin - Result := False; - Break; - end; - end; - - var - AHeaderItemIndex: Integer; - begin - if not Parent.Enabled then - Result := cxbsDisabled - else - begin - AHeaderItemIndex := HeaderItemIndex(Message.Index); - if AHeaderItemIndex = FPressedHeaderItemIndex then - Result := cxbsPressed - else - if CanHotTrack and (AHeaderItemIndex = GetHeaderHotItemIndex) then - Result := cxbsHot - else - Result := cxbsNormal; - end; - end; - - function GetItemRect: TRect; - var - R: TRect; - begin - if Message.Index = Columns.Count then - begin - Windows.GetClientRect(FHeaderHandle, Result); - if Columns.Count > 0 then - begin - R := GetHeaderItemRect(HeaderItemIndex(Columns.Count - 1)); - Result.Left := R.Right; - end; - end - else - Result := GetHeaderItemRect(HeaderItemIndex(Message.Index)); - end; - -var - AIndex: Integer; - AHeaderItemInfo: PHeaderItemInfo; -begin - AIndex := Message.Index; - AHeaderItemInfo := Message.HeaderItemInfo; - ZeroMemory(AHeaderItemInfo, SizeOf(THeaderItemInfo)); - if AIndex < Columns.Count then - begin - AHeaderItemInfo.ImageIndex := Columns[AIndex].ImageIndex; - AHeaderItemInfo.SectionAlignment := Columns[AIndex].Alignment; - AHeaderItemInfo.SortOrder := soNone; - AHeaderItemInfo.Text := Columns[AIndex].Caption; - end - else - AHeaderItemInfo.ImageIndex := -1; - AHeaderItemInfo.Rect := GetItemRect; - AHeaderItemInfo.State := GetItemState; - Message.HeaderItemInfo := AHeaderItemInfo; -end; - -procedure TcxInnerShellListView.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - inherited; - if Container <> nil then - with Message do - begin - Result := Result or DLGC_WANTCHARS; - if GetKeyState(VK_CONTROL) >= 0 then - Result := Result or DLGC_WANTTAB; - end; -end; - -procedure TcxInnerShellListView.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - if (Container <> nil) and not Container.IsDestroying then - Container.FocusChanged; -end; - -procedure TcxInnerShellListView.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - inherited; - if UsecxScrollBars and not Container.FScrollBarsCalculating then - Container.SetScrollBarsParameters; -end; - -procedure TcxInnerShellListView.WMNCPaint(var Message: TMessage); -begin - if not UsecxScrollBars then - begin - inherited; - Exit; - end; - - Message.Result := 1; - if UsecxScrollBars and Container.HScrollBar.Visible and Container.VScrollBar.Visible then - cxFillSizeGrip(Container); -end; - -procedure TcxInnerShellListView.WMSetFocus(var Message: TWMSetFocus); -begin - inherited; - if (Container <> nil) and not Container.IsDestroying and not(csDestroying in ComponentState) - and (Message.FocusedWnd <> Container.Handle) then - Container.FocusChanged; -end; - -procedure TcxInnerShellListView.WMWindowPosChanged(var Message: TWMWindowPosChanged); -var - ARgn: HRGN; -begin - inherited; - if csDestroying in ComponentState then - Exit; - if Container.HScrollBar.Visible and Container.VScrollBar.Visible then - begin - ARgn := CreateRectRgnIndirect(GetSizeGripRect(Self)); - SendMessage(Handle, WM_NCPAINT, ARgn, 0); - DeleteObject(ARgn); - end; -end; - -procedure TcxInnerShellListView.CMMouseEnter(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseEnter(Self) - else - MouseEnter(TControl(Message.lParam)); -end; - -procedure TcxInnerShellListView.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxInnerShellListView.DSMShellChangeNotify(var Message: TMessage); -begin - inherited; - Container.SetScrollBarsParameters; -end; - -{ TcxCustomShellListView } - -constructor TcxCustomShellListView.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FDataBinding := GetDataBindingClass.Create(Self, Self); - with TcxCustomDataBindingAccess(FDataBinding) do - begin - OnDataChange := Self.DataChange; - OnDataSetChange := Self.DataSetChange; - OnUpdateData := Self.UpdateData; - end; - FInnerListView := TcxInnerShellListView.Create(Self); - with FInnerListView do - begin - FContainer := Self; - LookAndFeel.MasterLookAndFeel := Self.Style.LookAndFeel; - Parent := Self; - BeforeNavigation := Self.BeforeNavigationHandler; - OnAddFolder := Self.AddFolderHandler; - OnChange := Self.ChangeHandler; - OnExecuteItem := ExecuteItemHandler; - OnRootChanged := Self.CurrentFolderChangedHandler; - OnSelectItem := Self.SelectItemHandler; - OnShellChange := Self.ShellChangeHandler; - end; - InnerControl := FInnerListView; - HScrollBar.SmallChange := 1; - VScrollBar.SmallChange := 1; - Width := 250; - Height := 150; -end; - -destructor TcxCustomShellListView.Destroy; -begin - FreeAndNil(FInnerListView); - FreeAndNil(FDataBinding); - inherited Destroy; -end; - -function TcxCustomShellListView.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - TcxCustomDataBindingAccess(FDataBinding).ExecuteAction(Action); -end; - -function TcxCustomShellListView.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - TcxCustomDataBindingAccess(FDataBinding).UpdateAction(Action); -end; - -procedure TcxCustomShellListView.SetFocus; -begin - if not IsDesigning then - inherited SetFocus; -end; - -procedure TcxCustomShellListView.BrowseParent; -begin - FInnerListView.BrowseParent; -end; - -function TcxCustomShellListView.GetItemAbsolutePIDL(AIndex: Integer): PItemIDList; -begin - CheckShellRoot(Root); - Result := TcxShellItemInfo(InnerListView.ItemProducer.Items[AIndex]).pidl; - Result := ConcatenatePidls(Root.Pidl, Result); -end; - -procedure TcxCustomShellListView.ProcessTreeViewNavigate(APidl: PItemIDList); -begin - FInnerListView.ProcessTreeViewNavigate(APidl); -end; - -procedure TcxCustomShellListView.Sort; -begin - InnerListView.Sort; -end; - -procedure TcxCustomShellListView.UpdateContent; -begin - FInnerListView.UpdateContent; -end; - -procedure TcxCustomShellListView.DoExit; -begin - if IsDestroying or FIsExitProcessing then - Exit; - FIsExitProcessing := True; - try - try - DataBinding.UpdateDataSource; - except - SetFocus; - raise; - end; - inherited DoExit; - finally - FIsExitProcessing := False; - end; -end; - -procedure TcxCustomShellListView.Loaded; -begin - inherited Loaded; - InnerListView.Loaded; - SetScrollBarsParameters; -end; - -procedure TcxCustomShellListView.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited LookAndFeelChanged(Sender, AChangedValues); - if not FIsCreating then - InnerListView.LookAndFeelChanged(Sender, AChangedValues); -end; - -function TcxCustomShellListView.NeedsScrollBars: Boolean; -begin - Result := True; -end; - -procedure TcxCustomShellListView.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); - - procedure HorizontalScroll; - var - ACurrentScrollPos, I: Integer; - begin - with FInnerListView do - if AScrollCode = scTrack then - if ViewStyle = vsList then - begin - ACurrentScrollPos := GetScrollPos(Handle, SB_HORZ); - if AScrollPos <> ACurrentScrollPos then - begin - if AScrollPos > ACurrentScrollPos then - for I := ACurrentScrollPos + 1 to AScrollPos do - CallWindowProc(DefWndProc, Handle, WM_HSCROLL, Word(scLineDown) + - Word(I) shl 16, HScrollBar.Handle) - else - for I := ACurrentScrollPos - 1 downto AScrollPos do - CallWindowProc(DefWndProc, Handle, WM_HSCROLL, Word(scLineUp) + - Word(I) shl 16, HScrollBar.Handle); - end - end - else - CallWindowProc(DefWndProc, Handle, LVM_SCROLL, AScrollPos - - GetScrollPos(Handle, SB_HORZ), 0) - else - begin - CallWindowProc(DefWndProc, Handle, WM_HSCROLL, Word(AScrollCode) + - Word(AScrollPos) shl 16, HScrollBar.Handle); - AScrollPos := GetScrollPos(Handle, SB_HORZ); - end; - end; - - procedure VerticalScroll; - begin - with FInnerListView do - if AScrollCode = scTrack then - case ViewStyle of - vsReport: - SendMessage(Handle, LVM_SCROLL, 0, (AScrollPos - ListView_GetTopIndex(Handle)) * - (Self.Canvas.FontHeight(Font) + 1)); - vsIcon, vsSmallIcon: - CallWindowProc(DefWndProc, Handle, LVM_SCROLL, 0, AScrollPos - - GetScrollPos(Handle, SB_VERT)) - end - else - begin - CallWindowProc(DefWndProc, Handle, WM_VSCROLL, Word(AScrollCode) + - Word(AScrollPos) shl 16, VScrollBar.Handle); - AScrollPos := GetScrollPos(Handle, SB_VERT); - end; - end; - -begin - inherited Scroll(AScrollBarKind, AScrollCode, AScrollPos); - if not Enabled then - Exit; - if AScrollBarKind = sbHorizontal then - HorizontalScroll - else - VerticalScroll; - SetScrollBarsParameters; -end; - -procedure TcxCustomShellListView.CurrentFolderChangedHandler(Sender: TObject; Root: TcxCustomShellRoot); -begin - try - if Assigned(FOnCurrentFolderChanged) then - FOnCurrentFolderChanged(Self); - finally - SetScrollBarsParameters; - end; -end; - -function TcxCustomShellListView.GetDataBindingClass: TcxCustomDataBindingClass; -begin - Result := TcxDataBinding; -end; - -function TcxCustomShellListView.GetViewOptions(AForNavigation: Boolean = False): TcxShellViewOptions; -begin - if AForNavigation then - Result := [svoShowFolders, svoShowHidden] - else - with InnerListView do - begin - Result := []; - if Options.ShowNonFolders then - Include(Result, svoShowFiles); - if Options.ShowFolders then - Include(Result, svoShowFolders); - if Options.ShowHidden then - Include(Result, svoShowHidden); - end; -end; - -procedure TcxCustomShellListView.SetTreeView(ATreeView: TWinControl); -begin - FInnerListView.SetTreeView(ATreeView); -end; - -procedure TcxCustomShellListView.AddFolderHandler(Sender: TObject; - AFolder: TcxShellFolder; var ACanAdd: Boolean); -begin - if Assigned(FOnAddFolder) then - FOnAddFolder(Self, AFolder, ACanAdd); -end; - -procedure TcxCustomShellListView.BeforeNavigationHandler(Sender: TcxCustomInnerShellListView; - APItemIDList: PItemIDList; AFolderPath: WideString); -begin - if Assigned(FOnBeforeNavigation) then - FOnBeforeNavigation(Self, APItemIDList); -end; - -procedure TcxCustomShellListView.ChangeHandler(Sender: TObject; Item: TListItem; - Change: TItemChange); -begin - if Assigned(FOnChange) then - FOnChange(Self, Item, Change); -end; - -procedure TcxCustomShellListView.ExecuteItemHandler(Sender: TObject; APIDL: PItemIDList; var AHandled: Boolean); -begin - if Assigned(OnExecuteItem) then - OnExecuteItem(Self, APIDL, AHandled); -end; - -procedure TcxCustomShellListView.SelectItemHandler(Sender: TObject; Item: TListItem; - Selected: Boolean); -begin - if Assigned(FOnSelectItem) then - FOnSelectItem(Self, Item, Selected); -end; - -procedure TcxCustomShellListView.ShellChangeHandler(Sender: TObject; - AEventID: DWORD; APIDL1, APIDL2: PItemIDList); -begin - if Assigned(FOnShellChange) then - FOnShellChange(Self, AEventID, APIDL1, APIDL2); -end; - -function TcxCustomShellListView.DoCompare(AItem1, AItem2: TcxShellFolder; - out ACompare: Integer): Boolean; -begin - Result := Assigned(FOnCompare); - if Result then - FOnCompare(Self, AItem1, AItem2, ACompare); -end; - -function TcxCustomShellListView.GetAbsolutePIDL: PItemIDList; -begin - Result := nil; - if not IsDestroying then - Result := FInnerListView.AbsolutePIDL; -end; - -function TcxCustomShellListView.GetDragDropSettings: TcxDragDropSettings; -begin - Result := TcxDragDropSettings(FInnerListView.DragDropSettings); -end; - -function TcxCustomShellListView.GetFolder(AIndex: Integer): TcxShellFolder; -begin - Result := FInnerListView.Folders[AIndex]; -end; - -function TcxCustomShellListView.GetFolderCount: Integer; -begin - Result := FInnerListView.FolderCount; -end; - -function TcxCustomShellListView.GetIconOptions: TIconOptions; -begin - Result := FInnerListView.IconOptions; -end; - -function TcxCustomShellListView.GetInnerListView: TcxInnerShellListView; -begin - Result := FInnerListView; -end; - -function TcxCustomShellListView.GetListHotTrack: Boolean; -begin - Result := FInnerListView.HotTrack; -end; - -function TcxCustomShellListView.GetMultiSelect: Boolean; -begin - Result := FInnerListView.MultiSelect; -end; - -function TcxCustomShellListView.GetOptions: TcxShellListViewOptions; -begin - Result := FInnerListView.Options; -end; - -function TcxCustomShellListView.GetPath: string; -begin - Result := ''; - if not IsDestroying then - Result := FInnerListView.Path; -end; - -function TcxCustomShellListView.GetRoot: TcxShellListRoot; -begin - Result := TcxShellListRoot(FInnerListView.Root) -end; - -function TcxCustomShellListView.GetShowColumnHeaders: Boolean; -begin - Result := FInnerListView.ShowColumnHeaders; -end; - -function TcxCustomShellListView.GetViewStyle: TViewStyle; -begin - Result := FInnerListView.ViewStyle; -end; - -procedure TcxCustomShellListView.SetAbsolutePIDL(Value: PItemIDList); -begin - if not IsDestroying then - FInnerListView.AbsolutePIDL := Value; -end; - -procedure TcxCustomShellListView.SetDragDropSettings(Value: TcxDragDropSettings); -begin - FInnerListView.DragDropSettings := Value; -end; - -procedure TcxCustomShellListView.SetIconOptions(Value: TIconOptions); -begin - FInnerListView.IconOptions := Value; -end; - -procedure TcxCustomShellListView.SetListHotTrack(Value: Boolean); -begin - FInnerListView.HotTrack := Value; -end; - -procedure TcxCustomShellListView.SetMultiSelect(Value: Boolean); -begin - FInnerListView.MultiSelect := Value; -end; - -procedure TcxCustomShellListView.SetOptions(Value: TcxShellListViewOptions); -begin - FInnerListView.Options.Assign(Value); -end; - -procedure TcxCustomShellListView.SetPath(Value: string); -begin - if not IsDestroying then - FInnerListView.Path := Value; -end; - -procedure TcxCustomShellListView.SetRoot(Value: TcxShellListRoot); -begin - FInnerListView.Root := Value; -end; - -procedure TcxCustomShellListView.SetShowColumnHeaders(Value: Boolean); -begin - InnerListView.ShowColumnHeaders := Value; -end; - -procedure TcxCustomShellListView.SetViewStyle(Value: TViewStyle); -begin - FInnerListView.ListViewStyle := TcxListViewStyle(Value); - SetScrollBarsParameters; -end; - -initialization - PrepareShellSpecialFolderInfoTable; - -finalization - DestroyShellSpecialFolderInfoTable; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxShellTreeView.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxShellTreeView.pas deleted file mode 100644 index 9c7bac9f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxShellTreeView.pas +++ /dev/null @@ -1,1204 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxShellTreeView; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, Classes, ComCtrls, CommCtrl, Controls, Forms, Graphics, - ImgList, Menus, ShlObj, StdCtrls, cxContainer, cxDataUtils, cxShellListView, - cxShellCommon, cxShellControls; - -type - TcxCustomShellTreeView = class; - - { TcxInnerShellTreeView } - - TcxInnerShellTreeView = class(TcxCustomInnerShellTreeView, IUnknown, - IcxContainerInnerControl) - private - FAbsolutePIDL: PItemIDList; - FIndent: Integer; - // IcxContainerInnerControl - function GetControl: TWinControl; - function GetControlContainer: TcxContainer; - - function GetAbsolutePIDL: PItemIDList; - function GetIndent: Integer; - function GetPath: string; - procedure SaveAbsolutePIDL(AValue: PItemIDList); - procedure SetAbsolutePIDL(AValue: PItemIDList); - procedure SetIndent(const Value: Integer); - procedure SetPath(AValue: string); - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCPaint(var Message: TMessage); message WM_NCPAINT; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure DSMShellChangeNotify(var Message: TMessage); message DSM_SHELLCHANGENOTIFY; - procedure TVMEnsureVisible(var Message: TMessage); message TVM_ENSUREVISIBLE; - protected - FContainer: TcxCustomShellTreeView; - procedure Click; override; - procedure CreateWnd; override; - procedure DestroyWnd; override; - procedure DblClick; override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); override; - function GetPopupMenu: TPopupMenu; override; - function IsLoading: Boolean; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure CreateWindowHandle(const Params: TCreateParams); override; - procedure WndProc(var Message: TMessage); override; - procedure MouseEnter(AControl: TControl); dynamic; - procedure MouseLeave(AControl: TControl); dynamic; - - property AbsolutePIDL: PItemIDList read GetAbsolutePIDL write SetAbsolutePIDL; - property Container: TcxCustomShellTreeView read FContainer; - property Path: string read GetPath write SetPath; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function CanFocus: Boolean; override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - - property Cursor; - property DragDropSettings; - property ListView; - property Options; - property Root; - property OnAddFolder; - property OnRootChanged; - property OnShellChange; - published - property Indent: Integer read GetIndent write SetIndent; - end; - - { TcxCustomShellTreeView } - - TcxCustomShellTreeView = class(TcxContainer) - private - FInnerTreeView: TcxInnerShellTreeView; - FIsExitProcessing: Boolean; - FScrollBarsCalculating: Boolean; - FOnAddFolder: TcxShellAddFolderEvent; - FOnChange: TTVChangedEvent; - FOnChanging: TTVChangingEvent; - FOnCollapsed: TTVExpandedEvent; - FOnCollapsing: TTVCollapsingEvent; - FOnEdited: TTVEditedEvent; - FOnEditing: TTVEditingEvent; - FOnExpanded: TTVExpandedEvent; - FOnExpanding: TTVExpandingEvent; - FOnShellChange: TcxShellChangeEvent; - - procedure AddFolderHandler(Sender: TObject; AFolder: TcxShellFolder; - var ACanAdd: Boolean); - procedure ChangeHandler(Sender: TObject; Node: TTreeNode); - procedure ChangingHandler(Sender: TObject; Node: TTreeNode; - var AllowChange: Boolean); - procedure CollapsedHandler(Sender: TObject; Node: TTreeNode); - procedure CollapsingHandler(Sender: TObject; Node: TTreeNode; - var AllowCollapse: Boolean); - procedure EditedHandler(Sender: TObject; Node: TTreeNode; var S: string); - procedure EditingHandler(Sender: TObject; Node: TTreeNode; - var AllowEdit: Boolean); - procedure ExpandedHandler(Sender: TObject; Node: TTreeNode); - procedure ExpandingHandler(Sender: TObject; Node: TTreeNode; - var AllowExpansion: Boolean); - procedure ShellChangeHandler(Sender: TObject; AEventID: DWORD; - APIDL1, APIDL2: PItemIDList); - - function GetAbsolutePIDL: PItemIDList; - function GetAutoExpand: Boolean; - function GetChangeDelay: Integer; - function GetDragDropSettings: TcxDragDropSettings; - function GetFolder(AIndex: Integer): TcxShellFolder; - function GetFolderCount: Integer; - function GetHideSelection: Boolean; - function GetIndent: Integer; - function GetInnerTreeView: TcxInnerShellTreeView; - function GetOptions: TcxShellTreeViewOptions; - function GetPath: string; - function GetRightClickSelect: Boolean; - function GetRoot: TcxShellTreeRoot; - function GetShellListView: TcxCustomShellListView; - function GetShowButtons: Boolean; - function GetShowInfoTips: Boolean; - function GetShowLines: Boolean; - function GetShowRoot: Boolean; - function GetStateImages: TCustomImageList; - function GetTreeHotTrack: Boolean; - procedure SetAbsolutePIDL(Value: PItemIDList); - procedure SetAutoExpand(Value: Boolean); - procedure SetChangeDelay(Value: Integer); - procedure SetDragDropSettings(Value: TcxDragDropSettings); - procedure SetHideSelection(Value: Boolean); - procedure SetIndent(Value: Integer); - procedure SetOptions(Value: TcxShellTreeViewOptions); - procedure SetPath(const Value: string); - procedure SetRightClickSelect(Value: Boolean); - procedure SetRoot(Value: TcxShellTreeRoot); - procedure SetShellListView(Value: TcxCustomShellListView); - procedure SetShowButtons(Value: Boolean); - procedure SetShowInfoTips(Value: Boolean); - procedure SetShowLines(Value: Boolean); - procedure SetShowRoot(Value: Boolean); - procedure SetStateImages(Value: TCustomImageList); - procedure SetTreeHotTrack(Value: Boolean); - protected - FDataBinding: TcxCustomDataBinding; - procedure DoExit; override; - procedure Loaded; override; - function NeedsScrollBars: Boolean; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - procedure CurrentFolderChangedHandler(Sender: TObject; Root: TcxCustomShellRoot); virtual; - function GetDataBindingClass: TcxCustomDataBindingClass; virtual; - function GetViewOptions(AForNavigation: Boolean = False): TcxShellViewOptions; - property AutoExpand: Boolean read GetAutoExpand write SetAutoExpand default False; - property ChangeDelay: Integer read GetChangeDelay write SetChangeDelay default 0; - property DataBinding: TcxCustomDataBinding read FDataBinding; - property DragDropSettings: TcxDragDropSettings read GetDragDropSettings write SetDragDropSettings; - property HideSelection: Boolean read GetHideSelection write SetHideSelection default True; - property Indent: Integer read GetIndent write SetIndent; - property Options: TcxShellTreeViewOptions read GetOptions write SetOptions; - property RightClickSelect: Boolean read GetRightClickSelect - write SetRightClickSelect default False; - property Root: TcxShellTreeRoot read GetRoot write SetRoot; - property ShellListView: TcxCustomShellListView read GetShellListView write SetShellListView; - property ShowButtons: Boolean read GetShowButtons write SetShowButtons default True; - property ShowInfoTips: Boolean read GetShowInfoTips - write SetShowInfoTips default False; - property ShowLines: Boolean read GetShowLines write SetShowLines default True; - property ShowRoot: Boolean read GetShowRoot write SetShowRoot default True; - property StateImages: TCustomImageList read GetStateImages write SetStateImages; - property TreeHotTrack: Boolean read GetTreeHotTrack write SetTreeHotTrack default False; - property OnAddFolder: TcxShellAddFolderEvent read FOnAddFolder write FOnAddFolder; - property OnChange: TTVChangedEvent read FOnChange write FOnChange; - property OnChanging: TTVChangingEvent read FOnChanging write FOnChanging; - property OnCollapsed: TTVExpandedEvent read FOnCollapsed write FOnCollapsed; - property OnCollapsing: TTVCollapsingEvent read FOnCollapsing write FOnCollapsing; - property OnEdited: TTVEditedEvent read FOnEdited write FOnEdited; - property OnEditing: TTVEditingEvent read FOnEditing write FOnEditing; - property OnExpanded: TTVExpandedEvent read FOnExpanded write FOnExpanded; - property OnExpanding: TTVExpandingEvent read FOnExpanding write FOnExpanding; - property OnShellChange: TcxShellChangeEvent read FOnShellChange write FOnShellChange; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - procedure SetFocus; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - function GetNodeAbsolutePIDL(ANode: TTreeNode): PItemIDList; - procedure UpdateContent; - property AbsolutePath: string read GetPath write SetPath; // deprecated; - property AbsolutePIDL: PItemIDList read GetAbsolutePIDL write SetAbsolutePIDL; - property FolderCount: Integer read GetFolderCount; - property Folders[AIndex: Integer]: TcxShellFolder read GetFolder; - property InnerTreeView: TcxInnerShellTreeView read GetInnerTreeView; - property Path: string read GetPath write SetPath; -// property RelativePIDL: PItemIDList write SetRelativePIDL; // TODO - end; - - { TcxShellTreeView } - - TcxShellTreeView = class(TcxCustomShellTreeView) - published - property Align; - property Anchors; - property AutoExpand; - property ChangeDelay; - property Constraints; - property DragDropSettings; - property Enabled; - property HideSelection; - property Indent; - property Options; - property ParentColor default False; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property RightClickSelect; - property Root; - property ShellListView; - property ShowButtons; - property ShowHint; - property ShowInfoTips; - property ShowLines; - property ShowRoot; - property StateImages; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property TreeHotTrack; - property Visible; - property OnAddFolder; - property OnChange; - property OnChanging; - property OnClick; - property OnCollapsed; - property OnCollapsing; - property OnDblClick; - property OnEdited; - property OnEditing; - property OnEnter; - property OnExit; - property OnExpanded; - property OnExpanding; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnShellChange; - end; - -implementation - -uses - SysUtils, cxClasses, cxEdit, cxScrollBar; - -type - TcxContainerAccess = class(TcxContainer); - TcxCustomDataBindingAccess = class(TcxCustomDataBinding); - TcxInnerShellListViewAccess = class(TcxInnerShellListView); - TcxShellTreeItemProducerAccess = class(TcxShellTreeItemProducer); - -{ TcxInnerShellTreeView } - -constructor TcxInnerShellTreeView.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - BorderStyle := bsNone; - ControlStyle := ControlStyle + [csDoubleClicks]; - ParentColor := False; - ParentFont := True; - FIndent := -1; -end; - -destructor TcxInnerShellTreeView.Destroy; -begin - SaveAbsolutePIDL(nil); - inherited Destroy; -end; - -function TcxInnerShellTreeView.CanFocus: Boolean; -begin - Result := Container.CanFocus; -end; - -procedure TcxInnerShellTreeView.DragDrop(Source: TObject; X, Y: Integer); -begin - if Container <> nil then - Container.DragDrop(Source, Left + X, Top + Y); -end; - -function TcxInnerShellTreeView.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - TcxCustomDataBindingAccess(Container.FDataBinding).ExecuteAction(Action); -end; - -function TcxInnerShellTreeView.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - TcxCustomDataBindingAccess(Container.FDataBinding).UpdateAction(Action); -end; - -procedure TcxInnerShellTreeView.Click; -begin - inherited Click; - if Container <> nil then - Container.Click; -end; - -procedure TcxInnerShellTreeView.CreateWnd; -begin - inherited CreateWnd; - if FIndent <> -1 then - Indent := FIndent; - if FAbsolutePIDL <> nil then - AbsolutePIDL := FAbsolutePIDL; -end; - -procedure TcxInnerShellTreeView.DestroyWnd; -var - ATempPIDL: PItemIDList; -begin - ATempPIDL := AbsolutePIDL; - try - SaveAbsolutePIDL(ATempPIDL); - finally - DisposePidl(ATempPIDL); - end; - FIndent := Indent; - inherited DestroyWnd; -end; - -procedure TcxInnerShellTreeView.DblClick; -begin - inherited DblClick; - if Container <> nil then - Container.DblClick; -end; - -function TcxInnerShellTreeView.DoMouseWheel(Shift: TShiftState; - WheelDelta: Integer; MousePos: TPoint): Boolean; -begin - Result := (Container <> nil) and Container.DoMouseWheel(Shift, - WheelDelta, MousePos); - if not Result then - inherited DoMouseWheel(Shift, WheelDelta, MousePos); -end; - -procedure TcxInnerShellTreeView.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -begin - if Container <> nil then - Container.DragOver(Source, Left + X, Top + Y, State, Accept); -end; - -function TcxInnerShellTreeView.GetPopupMenu: TPopupMenu; -begin - if Container = nil then - Result := inherited GetPopupMenu - else - Result := Container.GetPopupMenu; -end; - -function TcxInnerShellTreeView.IsLoading: Boolean; -begin - Result := csLoading in Container.ComponentState; -end; - -procedure TcxInnerShellTreeView.KeyDown(var Key: Word; Shift: TShiftState); -begin - if Container <> nil then - Container.KeyDown(Key, Shift); - if Key <> 0 then - inherited KeyDown(Key, Shift); -end; - -procedure TcxInnerShellTreeView.KeyPress(var Key: Char); -begin - if Key = Char(VK_TAB) then - Key := #0; - if Container <> nil then - Container.KeyPress(Key); - if Word(Key) = VK_RETURN then - Key := #0; - if Key <> #0 then - inherited KeyPress(Key); -end; - -procedure TcxInnerShellTreeView.KeyUp(var Key: Word; Shift: TShiftState); -begin - if Key = VK_TAB then - Key := 0; - if Container <> nil then - Container.KeyUp(Key, Shift); - if Key <> 0 then - inherited KeyUp(Key, Shift); -end; - -procedure TcxInnerShellTreeView.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if Container <> nil then - with Container do - begin - InnerControlMouseDown := True; - try - MouseDown(Button, Shift, X + Self.Left, Y + Self.Top); - finally - InnerControlMouseDown := False; - end; - end; -end; - -procedure TcxInnerShellTreeView.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - if Container <> nil then - Container.MouseMove(Shift, X + Left, Y + Top); -end; - -procedure TcxInnerShellTreeView.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - if Container <> nil then - Container.MouseUp(Button, Shift, X + Left, Y + Top); -end; - -procedure TcxInnerShellTreeView.CreateWindowHandle(const Params: TCreateParams); -begin - inherited CreateWindowHandle(Params); - Container.SetScrollBarsParameters; -end; - -procedure TcxInnerShellTreeView.WndProc(var Message: TMessage); -begin - if (Container <> nil) and Container.InnerControlMenuHandler(Message) then - Exit; - -{$IFNDEF DELPHI5} - if Message.Msg = WM_RBUTTONDOWN then - begin - Container.LockPopupMenu(True); - try - inherited WndProc(Message); - finally - Container.LockPopupMenu(False); - end; - Exit; - end; -{$ENDIF} - - if Container <> nil then - if ((Message.Msg = WM_LBUTTONDOWN) or (Message.Msg = WM_LBUTTONDBLCLK)) and - (Container.DragMode = dmAutomatic) and not Container.IsDesigning then - begin - Container.BeginAutoDrag; - Exit; - end; - - inherited WndProc(Message); - case Message.Msg of - WM_HSCROLL, -// WM_MOUSEWHEEL, - WM_VSCROLL, - WM_WINDOWPOSCHANGED, - CM_WININICHANGE: - Container.SetScrollBarsParameters; - end; -end; - -procedure TcxInnerShellTreeView.MouseEnter(AControl: TControl); -begin -end; - -procedure TcxInnerShellTreeView.MouseLeave(AControl: TControl); -begin - if Container <> nil then - Container.ShortRefreshContainer(True); -end; - -function TcxInnerShellTreeView.GetControl: TWinControl; -begin - Result := Self; -end; - -function TcxInnerShellTreeView.GetControlContainer: TcxContainer; -begin - Result := FContainer; -end; - -function TcxInnerShellTreeView.GetAbsolutePIDL: PItemIDList; -begin - if HandleAllocated then - begin - Result := nil; - if Selected <> nil then - Result := Container.GetNodeAbsolutePIDL(Selected); - end - else - Result := GetPidlCopy(FAbsolutePIDL); -end; - -function TcxInnerShellTreeView.GetIndent: Integer; -begin - if HandleAllocated then - Result := inherited Indent - else - Result := FIndent; -end; - -function TcxInnerShellTreeView.GetPath: string; -var - ATempPIDL: PItemIDList; -begin - ATempPIDL := AbsolutePIDL; - try - Result := GetPidlName(ATempPIDL); - finally - DisposePidl(ATempPIDL); - end; -end; - -procedure TcxInnerShellTreeView.SaveAbsolutePIDL(AValue: PItemIDList); -var - ATempPIDL: PItemIDList; -begin - ATempPIDL := GetPidlCopy(AValue); - DisposePidl(FAbsolutePIDL); - FAbsolutePIDL := ATempPIDL; -end; - -procedure TcxInnerShellTreeView.SetAbsolutePIDL(AValue: PItemIDList); -begin - if HandleAllocated then - begin - if CheckAbsolutePIDL(AValue, Root, True) then - begin - SendMessage(Handle, DSM_DONAVIGATE, WPARAM(AValue), 0); - DoNavigateListView; - end; - end - else - SaveAbsolutePIDL(AValue); -end; - -procedure TcxInnerShellTreeView.SetIndent(const Value: Integer); -begin - if HandleAllocated then - inherited Indent := Value - else - FIndent := Value; -end; - -procedure TcxInnerShellTreeView.SetPath(AValue: string); -var - APIDL: PItemIDList; -begin - APIDL := PathToAbsolutePIDL(AValue, Root, Container.GetViewOptions(True)); - if APIDL <> nil then - try - AbsolutePIDL := APIDL; - finally - DisposePidl(APIDL); - end; -end; - -procedure TcxInnerShellTreeView.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - inherited; - if Container <> nil then - with Message do - begin - Result := Result or DLGC_WANTCHARS; - if GetKeyState(VK_CONTROL) >= 0 then - Result := Result or DLGC_WANTTAB; - end; -end; - -procedure TcxInnerShellTreeView.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - if (Container <> nil) and not Container.IsDestroying then - Container.FocusChanged; -end; - -procedure TcxInnerShellTreeView.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - inherited; - if UsecxScrollBars and not Container.FScrollBarsCalculating then - Container.SetScrollBarsParameters; -end; - -procedure TcxInnerShellTreeView.WMNCPaint(var Message: TMessage); -begin - if not UsecxScrollBars then - begin - inherited; - Exit; - end; - - Message.Result := 1; - if UsecxScrollBars and Container.HScrollBar.Visible and Container.VScrollBar.Visible then - cxFillSizeGrip(Container); -end; - -procedure TcxInnerShellTreeView.WMSetFocus(var Message: TWMSetFocus); -begin - inherited; - if (Container <> nil) and not Container.IsDestroying and not(csDestroying in ComponentState) - and (Message.FocusedWnd <> Container.Handle) then - Container.FocusChanged; -end; - -procedure TcxInnerShellTreeView.WMWindowPosChanged(var Message: TWMWindowPosChanged); -var - ARgn: HRGN; -begin - inherited; - if csDestroying in ComponentState then - Exit; - if Container.HScrollBar.Visible and Container.VScrollBar.Visible then - begin - ARgn := CreateRectRgnIndirect(GetSizeGripRect(Self)); - SendMessage(Handle, WM_NCPAINT, ARgn, 0); - DeleteObject(ARgn); - end; -end; - -procedure TcxInnerShellTreeView.CMMouseEnter(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseEnter(Self) - else - MouseEnter(TControl(Message.lParam)); -end; - -procedure TcxInnerShellTreeView.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxInnerShellTreeView.DSMShellChangeNotify(var Message: TMessage); -begin - inherited; - Container.SetScrollBarsParameters; -end; - -procedure TcxInnerShellTreeView.TVMEnsureVisible(var Message: TMessage); -begin - inherited; - Container.SetScrollBarsParameters; -end; - -{ TcxCustomShellTreeView } - -constructor TcxCustomShellTreeView.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FDataBinding := GetDataBindingClass.Create(Self, Self); - with TcxCustomDataBindingAccess(FDataBinding) do - begin - OnDataChange := Self.DataChange; - OnDataSetChange := Self.DataSetChange; - OnUpdateData := Self.UpdateData; - end; - FInnerTreeView := TcxInnerShellTreeView.Create(Self); - with FInnerTreeView do - begin - FContainer := Self; - LookAndFeel.MasterLookAndFeel := Self.Style.LookAndFeel; - Parent := Self; - - OnAddFolder := Self.AddFolderHandler; - OnChange := Self.ChangeHandler; - OnChanging := Self.ChangingHandler; - OnCollapsed := Self.CollapsedHandler; - OnCollapsing := Self.CollapsingHandler; - OnEdited := Self.EditedHandler; - OnEditing := Self.EditingHandler; - OnExpanded := Self.ExpandedHandler; - OnExpanding := Self.ExpandingHandler; - OnRootChanged := Self.CurrentFolderChangedHandler; - OnShellChange := Self.ShellChangeHandler; - end; - InnerControl := FInnerTreeView; - HScrollBar.SmallChange := 1; - VScrollBar.SmallChange := 1; - Width := 121; - Height := 97; -end; - -destructor TcxCustomShellTreeView.Destroy; -begin - FreeAndNil(FInnerTreeView); - FreeAndNil(FDataBinding); - inherited Destroy; -end; - -function TcxCustomShellTreeView.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - TcxCustomDataBindingAccess(FDataBinding).ExecuteAction(Action); -end; - -procedure TcxCustomShellTreeView.SetFocus; -begin - if not IsDesigning then - inherited SetFocus; -end; - -function TcxCustomShellTreeView.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - TcxCustomDataBindingAccess(FDataBinding).UpdateAction(Action); -end; - -function TcxCustomShellTreeView.GetNodeAbsolutePIDL(ANode: TTreeNode): PItemIDList; -var - AIFolder: IShellFolder; - AList: TStringList; - ATempPIDL1, ATempPIDL2: PItemIDList; - AViewOptions: TcxShellViewOptions; - I: Integer; -begin - with TcxShellTreeItemProducerAccess(ANode.Data) do - if FolderPidl <> nil then - begin - Result := GetPidlCopy(FolderPidl); - Exit; - end; - - CheckShellRoot(Root); - Result := GetPidlCopy(Root.Pidl); - if ANode.Parent = nil then - Exit; - - AList := TStringList.Create; - try - repeat - AList.Insert(0, ANode.Text); - ANode := ANode.Parent; - until ANode.Parent = nil; - AIFolder := Root.ShellFolder; - AViewOptions := GetViewOptions; - for I := 0 to AList.Count - 1 do - begin - ATempPIDL1 := InternalParseDisplayName(AIFolder, AList[I], AViewOptions); - ATempPIDL2 := Result; - Result := ConcatenatePidls(Result, ATempPIDL1); - if I < AList.Count - 1 then - AIFolder.BindToObject(ATempPIDL1, nil, IID_IShellFolder, Pointer(AIFolder)); - DisposePidl(ATempPIDL1); - DisposePidl(ATempPIDL2); - end; - finally - AList.Free; - end; -end; - -procedure TcxCustomShellTreeView.UpdateContent; -begin - FInnerTreeView.UpdateContent; -end; - -procedure TcxCustomShellTreeView.DoExit; -begin - if IsDestroying or FIsExitProcessing then - Exit; - FIsExitProcessing := True; - try - try - DataBinding.UpdateDataSource; - except - SetFocus; - raise; - end; - inherited DoExit; - finally - FIsExitProcessing := False; - end; -end; - -procedure TcxCustomShellTreeView.Loaded; -begin - inherited Loaded; - InnerTreeView.Loaded; - SetScrollBarsParameters; -end; - -function TcxCustomShellTreeView.NeedsScrollBars: Boolean; -begin - Result := True; -end; - -procedure TcxCustomShellTreeView.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -var - AScrollInfo: TScrollInfo; -begin - inherited Scroll(AScrollBarKind, AScrollCode, AScrollPos); - if not Enabled then - Exit; - with FInnerTreeView do - if AScrollBarKind = sbHorizontal then - begin - CallWindowProc(DefWndProc, Handle, WM_HSCROLL, Word(AScrollCode) + - Word(AScrollPos) shl 16, HScrollBar.Handle); - AScrollPos := GetScrollPos(Handle, SB_HORZ); - end - else - begin - if (AScrollCode = scTrack) and (Win32MajorVersion >= 6) then - begin - AScrollInfo.cbSize := SizeOf(AScrollInfo); - AScrollInfo.fMask := SIF_POS; - AScrollInfo.nPos := AScrollPos; - SetScrollInfo(Handle, SB_VERT, AScrollInfo, True); - end; - CallWindowProc(DefWndProc, Handle, WM_VSCROLL, Word(AScrollCode) + - Word(AScrollPos) shl 16, VScrollBar.Handle); - AScrollPos := GetScrollPos(Handle, SB_VERT); - end; - SetScrollBarsParameters(True); -end; - -procedure TcxCustomShellTreeView.CurrentFolderChangedHandler(Sender: TObject; - Root: TcxCustomShellRoot); -begin - SetScrollBarsParameters; -end; - -function TcxCustomShellTreeView.GetDataBindingClass: TcxCustomDataBindingClass; -begin - Result := TcxDataBinding; -end; - -function TcxCustomShellTreeView.GetViewOptions(AForNavigation: Boolean = False): TcxShellViewOptions; -begin - with InnerTreeView do - begin - Result := []; - if Options.ShowNonFolders then - Include(Result, svoShowFiles); - if Options.ShowFolders then - Include(Result, svoShowFolders); - if AForNavigation or Options.ShowHidden then - Include(Result, svoShowHidden); - end; -end; - -procedure TcxCustomShellTreeView.AddFolderHandler(Sender: TObject; - AFolder: TcxShellFolder; var ACanAdd: Boolean); -begin - if Assigned(FOnAddFolder) then - FOnAddFolder(Self, AFolder, ACanAdd); -end; - -procedure TcxCustomShellTreeView.ChangeHandler(Sender: TObject; Node: TTreeNode); -begin - try - if Assigned(FOnChange) then - FOnChange(Self, Node); - finally - SetScrollBarsParameters; - end; -end; - -procedure TcxCustomShellTreeView.ChangingHandler(Sender: TObject; Node: TTreeNode; - var AllowChange: Boolean); -begin - if Assigned(FOnChanging) then - FOnChanging(Self, Node, AllowChange); -end; - -procedure TcxCustomShellTreeView.CollapsedHandler(Sender: TObject; - Node: TTreeNode); -begin - try - if Assigned(FOnCollapsed) then - FOnCollapsed(Self, Node); - finally - SetScrollBarsParameters; - end; -end; - -procedure TcxCustomShellTreeView.CollapsingHandler(Sender: TObject; - Node: TTreeNode; var AllowCollapse: Boolean); -begin - if Assigned(FOnCollapsing) then - FOnCollapsing(Self, Node, AllowCollapse); -end; - -procedure TcxCustomShellTreeView.EditedHandler(Sender: TObject; - Node: TTreeNode; var S: string); -begin - try - if Assigned(FOnEdited) then - FOnEdited(Self, Node, S); - finally - SetScrollBarsParameters; - end; -end; - -procedure TcxCustomShellTreeView.EditingHandler(Sender: TObject; Node: TTreeNode; - var AllowEdit: Boolean); -begin - if Assigned(FOnEditing) then - FOnEditing(Self, Node, AllowEdit); -end; - -procedure TcxCustomShellTreeView.ExpandedHandler(Sender: TObject; - Node: TTreeNode); -begin - try - if Assigned(FOnExpanded) then - FOnExpanded(Self, Node); - finally - SetScrollBarsParameters; - end; -end; - -procedure TcxCustomShellTreeView.ExpandingHandler(Sender: TObject; - Node: TTreeNode; var AllowExpansion: Boolean); -begin - if Assigned(FOnExpanding) then - FOnExpanding(Self, Node, AllowExpansion); -end; - -procedure TcxCustomShellTreeView.ShellChangeHandler(Sender: TObject; - AEventID: DWORD; APIDL1, APIDL2: PItemIDList); -begin - if Assigned(FOnShellChange) then - FOnShellChange(Self, AEventID, APIDL1, APIDL2); -end; - -function TcxCustomShellTreeView.GetAbsolutePIDL: PItemIDList; -begin - Result := nil; - if not IsDestroying then - Result := FInnerTreeView.AbsolutePIDL; -end; - -function TcxCustomShellTreeView.GetAutoExpand: Boolean; -begin - Result := FInnerTreeView.AutoExpand; -end; - -function TcxCustomShellTreeView.GetChangeDelay: Integer; -begin - Result := FInnerTreeView.ChangeDelay; -end; - -function TcxCustomShellTreeView.GetDragDropSettings: TcxDragDropSettings; -begin - Result := TcxDragDropSettings(FInnerTreeView.DragDropSettings); -end; - -function TcxCustomShellTreeView.GetFolder(AIndex: Integer): TcxShellFolder; -begin - Result := FInnerTreeView.Folders[AIndex]; -end; - -function TcxCustomShellTreeView.GetFolderCount: Integer; -begin - Result := FInnerTreeView.FolderCount; -end; - -function TcxCustomShellTreeView.GetHideSelection: Boolean; -begin - Result := FInnerTreeView.HideSelection; -end; - -function TcxCustomShellTreeView.GetIndent: Integer; -begin - Result := FInnerTreeView.Indent; -end; - -function TcxCustomShellTreeView.GetInnerTreeView: TcxInnerShellTreeView; -begin - Result := FInnerTreeView; -end; - -function TcxCustomShellTreeView.GetOptions: TcxShellTreeViewOptions; -begin - Result := TcxShellTreeViewOptions(FInnerTreeView.Options); -end; - -function TcxCustomShellTreeView.GetPath: string; -begin - Result := ''; - if not IsDestroying then - Result := FInnerTreeView.Path; -end; - -function TcxCustomShellTreeView.GetRightClickSelect: Boolean; -begin - Result := FInnerTreeView.RightClickSelect; -end; - -function TcxCustomShellTreeView.GetRoot: TcxShellTreeRoot; -begin - Result := TcxShellTreeRoot(FInnerTreeView.Root) -end; - -function TcxCustomShellTreeView.GetShellListView: TcxCustomShellListView; -begin - if FInnerTreeView.ListView is TcxInnerShellListView then - Result := TcxInnerShellListViewAccess(FInnerTreeView.ListView).Container - else - Result := nil; -end; - -function TcxCustomShellTreeView.GetShowButtons: Boolean; -begin - Result := FInnerTreeView.ShowButtons; -end; - -function TcxCustomShellTreeView.GetShowInfoTips: Boolean; -begin - Result := FInnerTreeView.ShowInfoTips; -end; - -function TcxCustomShellTreeView.GetShowLines: Boolean; -begin - Result := FInnerTreeView.ShowLines; -end; - -function TcxCustomShellTreeView.GetShowRoot: Boolean; -begin - Result := FInnerTreeView.ShowRoot; -end; - -function TcxCustomShellTreeView.GetStateImages: TCustomImageList; -begin - Result := FInnerTreeView.StateImages; -end; - -function TcxCustomShellTreeView.GetTreeHotTrack: Boolean; -begin - Result := FInnerTreeView.HotTrack; -end; - -procedure TcxCustomShellTreeView.SetAbsolutePIDL(Value: PItemIDList); -begin - if not IsDestroying then - FInnerTreeView.AbsolutePIDL := Value; -end; - -procedure TcxCustomShellTreeView.SetAutoExpand(Value: Boolean); -begin - FInnerTreeView.AutoExpand := Value; -end; - -procedure TcxCustomShellTreeView.SetChangeDelay(Value: Integer); -begin - FInnerTreeView.ChangeDelay := Value; -end; - -procedure TcxCustomShellTreeView.SetDragDropSettings(Value: TcxDragDropSettings); -begin - FInnerTreeView.DragDropSettings := Value; -end; - -procedure TcxCustomShellTreeView.SetHideSelection(Value: Boolean); -begin - FInnerTreeView.HideSelection := Value; -end; - -procedure TcxCustomShellTreeView.SetIndent(Value: Integer); -var - APrevIndent: Integer; -begin - APrevIndent := FInnerTreeView.Indent; - FInnerTreeView.Indent := Value; - if APrevIndent <> FInnerTreeView.Indent then - SetScrollBarsParameters; -end; - -procedure TcxCustomShellTreeView.SetOptions(Value: TcxShellTreeViewOptions); -begin - FInnerTreeView.Options.Assign(Value); -end; - -procedure TcxCustomShellTreeView.SetPath(const Value: string); -begin - if not IsDestroying then - FInnerTreeView.Path := Value; -end; - -procedure TcxCustomShellTreeView.SetRightClickSelect(Value: Boolean); -begin - FInnerTreeView.RightClickSelect := Value; -end; - -procedure TcxCustomShellTreeView.SetRoot(Value: TcxShellTreeRoot); -begin - FInnerTreeView.Root := Value; -end; - -procedure TcxCustomShellTreeView.SetShellListView(Value: TcxCustomShellListView); -begin - if Value = nil then - FInnerTreeView.ListView := nil - else - FInnerTreeView.ListView := Value.InnerListView; -end; - -procedure TcxCustomShellTreeView.SetShowButtons(Value: Boolean); -begin - FInnerTreeView.ShowButtons := Value; -end; - -procedure TcxCustomShellTreeView.SetShowInfoTips(Value: Boolean); -begin - FInnerTreeView.ShowInfoTips := Value; -end; - -procedure TcxCustomShellTreeView.SetShowLines(Value: Boolean); -begin - FInnerTreeView.ShowLines := Value; -end; - -procedure TcxCustomShellTreeView.SetShowRoot(Value: Boolean); -begin - FInnerTreeView.ShowRoot := Value; -end; - -procedure TcxCustomShellTreeView.SetStateImages(Value: TCustomImageList); -begin - FInnerTreeView.StateImages := Value; -end; - -procedure TcxCustomShellTreeView.SetTreeHotTrack(Value: Boolean); -begin - FInnerTreeView.HotTrack := Value; -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxSpinButton.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxSpinButton.pas deleted file mode 100644 index 492c69ee..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxSpinButton.pas +++ /dev/null @@ -1,560 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxSpinButton; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, Forms, Graphics, Messages, StdCtrls, SysUtils, - cxClasses, cxContainer, cxControls, cxCustomData, cxEdit, cxExtEditConsts, - cxExtEditUtils, cxGraphics, cxMaskEdit, cxSpinEdit, cxTextEdit, cxVariants; - -type - { TcxSpinButtonViewData } - - TcxCustomSpinButtonProperties = class; - - TcxSpinButtonViewData = class(TcxSpinEditViewData) - private - function GetProperties: TcxCustomSpinButtonProperties; - protected - function CanPressButton(AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: Integer): - Boolean; override; - function IsButtonPressed(AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: - Integer): Boolean; override; - public - PressedState: TcxSpinEditPressedState; - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - property Properties: TcxCustomSpinButtonProperties read GetProperties; - end; - - { TcxCustomSpinButtonProperties } - - TcxCustomSpinButton = class; - - TcxCustomSpinButtonProperties = class(TcxCustomSpinEditProperties) - protected - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function IsDisplayValueNumeric: Boolean; override; - function IsEditValueNumeric: Boolean; override; - function PreserveSelection: Boolean; override; - public - constructor Create(AOwner: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - end; - - { TcxSpinButtonProperties } - - TcxSpinButtonProperties = class(TcxCustomSpinButtonProperties) - published - property Alignment; - property AssignedValues; - property AutoSelect; - property BeepOnError; - property HideSelection; - property ImmediatePost; - property Increment; - property LargeIncrement; - property MaxValue; - property MinValue; - property ReadOnly; - property SpinButtons; - property UseCtrlIncrement; - property UseLeftAlignmentOnEditing; - property ValueType default vtInt; - property OnChange; - property OnEditValueChanged; - end; - - { TcxSpinButtonControlHook } - - TcxSpinButtonControlHook = class(TcxControlHook) - private - FParent: TWinControl; - protected - procedure HookWndProc(var AMsg: TMessage); override; - public - destructor Destroy; override; - end; - - { TcxCustomSpinButton } - - TcxCustomSpinButton = class(TcxCustomSpinEdit) - private - FAssociate: TWinControl; - FAutoWidth: Boolean; - FSpinButtonControlHook: TcxSpinButtonControlHook; - function GetActiveProperties: TcxCustomSpinButtonProperties; - function GetProperties: TcxCustomSpinButtonProperties; - procedure SetAssociate(AValue: TWinControl); - procedure SetAutoWidth(Value: Boolean); - procedure SetProperties(Value: TcxCustomSpinButtonProperties); - protected - procedure InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); override; - procedure InternalSetDisplayValue(const Value: TcxEditValue); override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - function CanFocusOnClick: Boolean; override; - procedure SetSize; override; - procedure Initialize; override; - function InternalDoEditing: Boolean; override; - procedure JoinToAssociate; virtual; - procedure SetAssociateText(const AValue: Variant); virtual; - function GetValue: Variant; override; - procedure SynchronizeEditValueFromAssociate; virtual; - property Associate: TWinControl read FAssociate write SetAssociate; - property AutoWidth: Boolean read FAutoWidth write SetAutoWidth default True; - property TabStop default False; - public - destructor Destroy; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function Increment(AButton: TcxSpinEditButton): Boolean; override; - property ActiveProperties: TcxCustomSpinButtonProperties read GetActiveProperties; - property Properties: TcxCustomSpinButtonProperties read GetProperties - write SetProperties; - end; - - { TcxSpinButton } - - TcxSpinButton = class(TcxCustomSpinButton) - private - function GetActiveProperties: TcxSpinButtonProperties; - function GetProperties: TcxSpinButtonProperties; - procedure SetProperties(Value: TcxSpinButtonProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxSpinButtonProperties read GetActiveProperties; - published - property Anchors; - property Associate; - property AutoSize; - property AutoWidth; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxSpinButtonProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Value; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -uses - cxEditConsts, cxEditUtils, dxThemeConsts, dxThemeManager; - -type - TWinControlAccess = class(TWinControl); - -{ TcxSpinButtonControlHook } - -destructor TcxSpinButtonControlHook.Destroy; -begin - FParent := nil; - inherited Destroy; -end; - -procedure TcxSpinButtonControlHook.HookWndProc(var AMsg: TMessage); -var - AKey: Longint; -begin - if Assigned(WinControl) and not IsDestroying and - ((AMsg.Msg = WM_KEYDOWN) or (AMsg.Msg = WM_KEYUP)) then - begin - AKey := AMsg.WParam; - if (FParent <> nil) and (AKey in [VK_UP, VK_DOWN, VK_NEXT, VK_PRIOR]) then - PostMessage(FParent.Handle, AMsg.Msg, AKey, AMsg.LParam); - end; - inherited HookWndProc(AMsg); -end; - -{ TcxSpinButtonViewData } - -procedure TcxSpinButtonViewData.Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - TcxSpinEditViewInfo(AViewInfo).Text := ''; -end; - -function TcxSpinButtonViewData.CanPressButton(AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer): Boolean; -begin - Result := inherited CanPressButton(AViewInfo, AButtonVisibleIndex); -end; - -function TcxSpinButtonViewData.IsButtonPressed(AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer): Boolean; -begin - Result := inherited IsButtonPressed(AViewInfo, AButtonVisibleIndex); -end; - -function TcxSpinButtonViewData.GetProperties: TcxCustomSpinButtonProperties; -begin - Result := TcxCustomSpinButtonProperties(FProperties); -end; - -{ TcxCustomSpinButtonProperties } - -constructor TcxCustomSpinButtonProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - HideCursor := True; -end; - -class function TcxCustomSpinButtonProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxSpinButton; -end; - -class function TcxCustomSpinButtonProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxSpinButtonViewData; -end; - -function TcxCustomSpinButtonProperties.IsDisplayValueNumeric: Boolean; -begin - Result := True; -end; - -function TcxCustomSpinButtonProperties.IsEditValueNumeric: Boolean; -begin - Result := True; -end; - -function TcxCustomSpinButtonProperties.PreserveSelection: Boolean; -begin - Result := False; -end; - -{ TcxCustomSpinButton } - -destructor TcxCustomSpinButton.Destroy; -begin - FSpinButtonControlHook.Free; - inherited Destroy; -end; - -class function TcxCustomSpinButton.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomSpinButtonProperties; -end; - -function TcxCustomSpinButton.GetValue: Variant; -const - AVarTypeMap: array [TcxSpinEditValueType] of TVarType = (varInteger, varDouble); -begin - PrepareEditValue(Text, Result, InternalFocused); - if not VarIsNumeric(Result) then - Result := VarAsType(ActiveProperties.MinValue, AVarTypeMap[ActiveProperties.ValueType]); -end; - -procedure TcxCustomSpinButton.InternalSetDisplayValue(const Value: TcxEditValue); -begin - if IsDestroying then - Exit; - inherited InternalSetDisplayValue(Value); - SetAssociateText(Value); -end; - -procedure TcxCustomSpinButton.InternalSetEditValue(const Value: TcxEditValue; AValidateEditValue: Boolean); -begin - if IsDestroying then - Exit; - inherited InternalSetEditValue(Value, AValidateEditValue); - SetAssociateText(Value); -end; - -procedure TcxCustomSpinButton.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = FAssociate) then - Associate := nil; -end; - -function TcxCustomSpinButton.CanFocusOnClick: Boolean; -begin - Result := False; -end; - -function TcxCustomSpinButton.Increment(AButton: TcxSpinEditButton): Boolean; -begin - if Assigned(Associate) then SynchronizeEditValueFromAssociate; - Result := inherited Increment(AButton); - if not Result then - Exit; - KeyboardAction := True; - try - SynchronizeEditValue; - SetAssociateText(EditValue); - finally - KeyboardAction := False; - end; -end; - -procedure TcxCustomSpinButton.SynchronizeEditValueFromAssociate; -var - FAssociateValue: TcxEditValue; -begin - if not((FAssociate is TCustomEdit) or (FAssociate is TcxCustomTextEdit)) then - Exit; - if ActiveProperties.ValueType = vtInt then - begin - if FAssociate is TcxCustomTextEdit then - FAssociateValue := cxStrToInt(TcxCustomTextEdit(FAssociate).Text, True) - else - FAssociateValue := cxStrToInt(TCustomEdit(FAssociate).Text, True); - end - else - begin - if FAssociate is TcxCustomTextEdit then - FAssociateValue := cxStrToFloat(TcxCustomTextEdit(FAssociate).Text, True) - else - FAssociateValue := cxStrToFloat(TCustomEdit(FAssociate).Text, True); - end; - if FAssociateValue <> Value then - Value := FAssociateValue; -end; - -procedure TcxCustomSpinButton.SetSize; -var - AWidth: Integer; -begin - inherited SetSize; - if not AutoWidth then - Exit; - with ViewInfo do - begin - AWidth := (BorderRect.Right - BorderRect.Left) - (TextRect.Right - TextRect.Left); - if Painter <> nil then - Dec(AWidth) - else - if Length(ButtonsInfo) > 0 then - if not ButtonsInfo[0].Data.NativeStyle then - begin - AWidth := Succ(AWidth); - if Shadow then - AWidth := AWidth + cxContainerShadowWidth; - end; - end; - Width := AWidth; -end; - -procedure TcxCustomSpinButton.Initialize; -begin - inherited Initialize; - FAutoWidth := True; - FSpinButtonControlHook := TcxSpinButtonControlHook.Create; - FSpinButtonControlHook.FParent := Self; - AutoSize := False; - TabStop := False; -end; - -function TcxCustomSpinButton.InternalDoEditing: Boolean; -begin - Result := True; -end; - -function TcxCustomSpinButton.GetActiveProperties: TcxCustomSpinButtonProperties; -begin - Result := TcxCustomSpinButtonProperties(InternalGetActiveProperties); -end; - -function TcxCustomSpinButton.GetProperties: TcxCustomSpinButtonProperties; -begin - Result := TcxCustomSpinButtonProperties(FProperties); -end; - -procedure TcxCustomSpinButton.SetAssociate(AValue: TWinControl); -var - I: Integer; - FCompoundControl: IcxCompoundControl; - - function IsClass(ClassType: TClass; const Name: string): Boolean; - begin - Result := True; - while ClassType <> nil do - begin - if ClassType.ClassNameIs(Name) then Exit; - ClassType := ClassType.ClassParent; - end; - Result := False; - end; - -begin - if AValue <> nil then - for I := 0 to Parent.ControlCount - 1 do {Is control already associated ?} - if (Parent.Controls[I] is TcxCustomSpinButton) and (Parent.Controls[I] <> Self) then - if TcxCustomSpinButton(Parent.Controls[I]).Associate = AValue then - raise EcxEditError.Create(AValue.Name + - cxGetResourceString(@scxUDAssociated) + Parent.Controls[I].Name); - - if FAssociate <> nil then - begin - FSpinButtonControlHook.WinControl := nil; - FAssociate := nil; - end; - - if (AValue <> nil) and (AValue.Parent = Self.Parent) and - not (AValue is TcxCustomSpinButton) and - not IsClass(AValue.ClassType, 'TcxDBTextEdit') and - not IsClass(AValue.ClassType, 'TcxDBMemo') and - not IsClass(AValue.ClassType, 'TDBTextEdit') and - not IsClass(AValue.ClassType, 'TDBMemo') then - begin - FAssociate := AValue; - if Supports(FAssociate, IcxCompoundControl, FCompoundControl) then - FSpinButtonControlHook.WinControl := FCompoundControl.ActiveControl - else - FSpinButtonControlHook.WinControl := FAssociate; - JoinToAssociate; - SetAssociateText(Value); - end; -end; - -procedure TcxCustomSpinButton.SetAutoWidth(Value: Boolean); -begin - if FAutoWidth <> Value then - begin - FAutoWidth := Value; - if Value then - begin - CheckHandle; - ActiveProperties.ViewStyle := vsNormal; - end - else - ActiveProperties.ViewStyle := vsButtonsOnly; - if Value then - begin - SetSize; - ShortRefreshContainer(False); - end; - end; -end; - -procedure TcxCustomSpinButton.SetProperties(Value: TcxCustomSpinButtonProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomSpinButton.JoinToAssociate; -begin - if FAssociate is TcxCustomEdit then - Font := TcxCustomEdit(FAssociate).Style.Font - else - Font := TWinControlAccess(FAssociate).Font; - Top := FAssociate.Top; - Left := FAssociate.Left + FAssociate.Width; - Height := FAssociate.Height; -end; - -procedure TcxCustomSpinButton.SetAssociateText(const AValue: Variant); -begin - if (FAssociate = nil) or ((not (FAssociate is TcxCustomTextEdit)) and - (not (FAssociate is TCustomEdit))) then Exit; - if (FAssociate is TcxCustomTextEdit) then - TcxCustomTextEdit(FAssociate).Text := VarToStr(AValue) - else - if (FAssociate is TCustomEdit) then - TCustomEdit(FAssociate).Text := VarToStr(AValue); -end; - -{ TcxSpinButton } - -class function TcxSpinButton.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxSpinButtonProperties; -end; - -function TcxSpinButton.GetActiveProperties: TcxSpinButtonProperties; -begin - Result := TcxSpinButtonProperties(InternalGetActiveProperties); -end; - -function TcxSpinButton.GetProperties: TcxSpinButtonProperties; -begin - Result := TcxSpinButtonProperties(FProperties); -end; - -procedure TcxSpinButton.SetProperties(Value: TcxSpinButtonProperties); -begin - FProperties.Assign(Value); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxSpinEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxSpinEdit.pas deleted file mode 100644 index e385b5d6..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxSpinEdit.pas +++ /dev/null @@ -1,2362 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxSpinEdit; - -{$I cxVer.inc} - -interface - -uses - Windows, -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Classes, Controls, Forms, Graphics, SysUtils, cxClasses, cxContainer, - cxControls, cxDataStorage, cxDataUtils, cxEdit, cxGraphics, cxMaskEdit, - cxTextEdit, cxVariants, cxLookAndFeelPainters, cxFilterControlUtils; - -const - cxSpinBackwardButtonIndex = 0; - cxSpinForwardButtonIndex = 1; - cxSpinFastBackwardButtonIndex = 2; - cxSpinFastForwardButtonIndex = 3; - -type - TcxSpinBoundsCheckingKind = (bckDoNotExceed, bckExtendToBound, bckCircular); - TcxSpinEditButtonsPosition = (sbpHorzLeftRight, sbpHorzRight, sbpVert); - TcxSpinEditButton = (sebBackward, sebForward, sebFastBackward, sebFastForward); - - { TcxSpinEditViewInfo } - - TcxSpinEditViewInfo = class(TcxCustomTextEditViewInfo) - protected - procedure DrawHotFlatButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); override; - procedure DrawNativeButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); override; - procedure DrawUltraFlatButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - AIsOffice11Style: Boolean; var ARect: TRect; var AContentRect: TRect; out APenColor, ABrushColor: TColor); override; - - procedure DrawNativeButtonBackground(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; const ARect: TRect); override; - function GetPartRect(APart: Integer): TRect; override; - procedure InternalPaint(ACanvas: TcxCanvas); override; - public - ArrowSize: Integer; - ButtonsPosition: TcxSpinEditButtonsPosition; - DelimiterLine: array[0..1] of TPoint; - - procedure DrawButtonContent(ACanvas: TcxCanvas; AButtonVisibleIndex: Integer; - const AContentRect: TRect; APenColor, ABrushColor: TColor; - ANeedOffsetContent: Boolean); override; - end; - - { TcxSpinEditViewData } - - TcxSpinEditPressedState = (epsNone, epsDown, epsUp, epsFastDown, epsFastUp); - TcxCustomSpinEditProperties = class; - - TcxSpinEditViewData = class(TcxCustomTextEditViewData) - private - function GetProperties: TcxCustomSpinEditProperties; - protected - function CanPressButton(AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: Integer): - Boolean; override; - function IsButtonPressed(AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: - Integer): Boolean; override; - procedure CalculateButtonNativeInfo(AButtonViewInfo: TcxEditButtonViewInfo); override; - public - PressedState: TcxSpinEditPressedState; - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure CalculateButtonBounds(ACanvas: TcxCanvas; AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer; var ButtonsRect: TRect); override; - procedure CalculateButtonViewInfo(ACanvas: TcxCanvas; AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer; var ButtonsRect: TRect); override; - procedure CheckButtonsOnly(AViewInfo: TcxCustomEditViewInfo; - APrevButtonsWidth, AButtonsWidth: Integer); override; - function IgnoreButtonWhileStretching( - AButtonVisibleIndex: Integer): Boolean; override; - property Properties: TcxCustomSpinEditProperties read GetProperties; - end; - - { TcxSpinEditButtons } - - TcxSpinEditButtons = class(TPersistent) - private - FOwner: TPersistent; - FPosition: TcxSpinEditButtonsPosition; - FShowFastButtons: Boolean; - FVisible: Boolean; - function GetProperties: TcxCustomSpinEditProperties; - procedure SetPosition(Value: TcxSpinEditButtonsPosition); - procedure SetShowFastButtons(Value: Boolean); - procedure SetVisible(Value: Boolean); - protected - procedure Changed; - property Properties: TcxCustomSpinEditProperties read GetProperties; - public - constructor Create(AOwner: TPersistent); virtual; - procedure Assign(Source: TPersistent); override; - published - property Position: TcxSpinEditButtonsPosition read FPosition - write SetPosition default sbpVert; - property ShowFastButtons: Boolean read FShowFastButtons - write SetShowFastButtons default False; - property Visible: Boolean read FVisible - write SetVisible default True; - end; - - { TcxSpinEditPropertiesValues } - - TcxSpinEditPropertiesValues = class(TcxTextEditPropertiesValues) - private - FValueType: Boolean; - procedure SetValueType(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property ValueType: Boolean read FValueType write SetValueType stored False; - end; - - { TcxCustomSpinEditProperties } - - TcxSpinEditValueType = (vtInt, vtFloat); - - TcxCustomSpinEdit = class; - - TcxSpinEditGetValueEvent = procedure(Sender: TObject; const AText: TCaption; - out AValue: Variant; var ErrorText: TCaption; var Error: Boolean) of object; - - TcxCustomSpinEditProperties = class(TcxCustomMaskEditProperties) - private - FSpinButtons: TcxSpinEditButtons; - FCanEdit: Boolean; - FCircular: Boolean; - FIncrement, FLargeIncrement: Double; - FExceptionOnInvalidInput: Boolean; - FUseCtrlIncrement: Boolean; - FValueType: TcxSpinEditValueType; - FOnGetValue: TcxSpinEditGetValueEvent; - function DoubleAsValueType(AValue: Double; - AValueType: TcxSpinEditValueType): Double; - function GetAssignedValues: TcxSpinEditPropertiesValues; - function GetValueType: TcxSpinEditValueType; - function IsIncrementStored: Boolean; - function IsLargeIncrementStored: Boolean; - function IsValueTypeStored: Boolean; - procedure ReadZeroIncrement(Reader: TReader); - procedure ReadZeroLargeIncrement(Reader: TReader); - procedure SetAssignedValues(Value: TcxSpinEditPropertiesValues); - procedure SetCircular(Value: Boolean); - procedure SetSpinButtons(Value: TcxSpinEditButtons); - procedure SetValueType(Value: TcxSpinEditValueType); - function TryTextToValue(S: string; out AValue: TcxEditValue): Boolean; - function VarToCurrentValueType(AValue: TcxEditValue): TcxEditValue; - procedure WriteZeroIncrement(Writer: TWriter); - procedure WriteZeroLargeIncrement(Writer: TWriter); - protected - function DefaultFocusedDisplayValue: TcxEditValue; override; - procedure DefineProperties(Filer: TFiler); override; - procedure DoChanged; override; - class function GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function IsEditValueNumeric: Boolean; override; - function CheckValueBounds(const Value: Variant): Variant; - function ExtendValueUpToBound: Boolean; virtual; - function GetBoundsCheckingKind: TcxSpinBoundsCheckingKind; virtual; - function GetIncrement(AButton: TcxSpinEditButton): Double; - function GetMaxMinValueForCurrentValueType( - AMinValue: Boolean = True): TcxEditValue; - function InternalMaxValue: TcxEditValue; virtual; - function InternalMinValue: TcxEditValue; virtual; - function IsDisplayValueNumeric: Boolean; virtual; - function IsValueBoundsValid(AValue: Extended): Boolean; - function PrepareValue(const AValue: TcxEditValue): Variant; virtual; - function PreserveSelection: Boolean; virtual; - function SetVariantType(const Value: TcxEditValue): TcxEditValue; - property AssignedValues: TcxSpinEditPropertiesValues read GetAssignedValues - write SetAssignedValues; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CreateViewData(AStyle: TcxCustomEditStyle; - AIsInplace: Boolean; APreviewMode: Boolean = False): TcxCustomEditViewData; override; - class function GetContainerClass: TcxContainerClass; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsDisplayValueValid(var DisplayValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - function IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; override; - procedure ValidateDisplayValue(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var AError: Boolean; - AEdit: TcxCustomEdit); override; - // !!! - property CanEdit: Boolean read FCanEdit write FCanEdit default True; - property Circular: Boolean read FCircular write SetCircular default False; - property ExceptionOnInvalidInput: Boolean read FExceptionOnInvalidInput - write FExceptionOnInvalidInput default False; - property Increment: Double read FIncrement write FIncrement stored IsIncrementStored; - property LargeIncrement: Double read FLargeIncrement write FLargeIncrement - stored IsLargeIncrementStored; - property SpinButtons: TcxSpinEditButtons read FSpinButtons write SetSpinButtons; - property UseCtrlIncrement: Boolean read FUseCtrlIncrement write FUseCtrlIncrement default False; - property ValueType: TcxSpinEditValueType read GetValueType write SetValueType stored IsValueTypeStored; - property OnGetValue: TcxSpinEditGetValueEvent read FOnGetValue - write FOnGetValue; - end; - - { TcxSpinEditProperties } - - TcxSpinEditProperties = class(TcxCustomSpinEditProperties) - published - property Alignment; - property AssignedValues; - property AutoSelect; - property BeepOnError; - property CanEdit; - property ClearKey; - property DisplayFormat; - property EchoMode; - property EditFormat; - property ExceptionOnInvalidInput; - property HideSelection; - property ImeMode; - property ImeName; - property ImmediatePost; - property Increment; - property LargeIncrement; - property MaxValue; - property MinValue; - property PasswordChar; - property ReadOnly; - property SpinButtons; - property UseCtrlIncrement; - property UseDisplayFormatWhenEditing; - property UseLeftAlignmentOnEditing; - property ValidateOnEnter; - property ValueType; - property OnChange; - property OnEditValueChanged; - property OnGetValue; - property OnValidate; - end; - - { TcxCustomSpinEdit } - - TcxCustomSpinEdit = class(TcxCustomMaskEdit) - private - FInternalValue: TcxEditValue; - FIsCustomText: Boolean; - FIsCustomTextAction: Boolean; - FPressedState: TcxSpinEditPressedState; - FTimer: TcxTimer; - function GetProperties: TcxCustomSpinEditProperties; - function GetActiveProperties: TcxCustomSpinEditProperties; - procedure HandleTimer(Sender: TObject); - function IsValueStored: Boolean; - procedure SetInternalValue(AValue: TcxEditValue); - procedure SetPressedState(Value: TcxSpinEditPressedState); - procedure SetProperties(Value: TcxCustomSpinEditProperties); - procedure StopTracking; - protected - procedure ChangeHandler(Sender: TObject); override; - procedure CheckEditorValueBounds; override; - procedure DoButtonDown(AButtonVisibleIndex: Integer); override; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); override; - procedure DoEditKeyPress(var Key: Char); override; - procedure DoEditKeyUp(var Key: Word; Shift: TShiftState); override; - function DoMouseWheelDown(Shift: TShiftState; MousePos: - TPoint): Boolean; override; - function DoMouseWheelUp(Shift: TShiftState; MousePos: - TPoint): Boolean; override; - procedure FocusChanged; override; - procedure Initialize; override; - function InternalGetEditingValue: TcxEditValue; override; - function InternalGetNotPublishedStyleValues: TcxEditStyleValues; override; - function IsValidChar(AChar: Char): Boolean; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure PropertiesChanged(Sender: TObject); override; - function DoRefreshContainer(const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): Boolean; override; - procedure SynchronizeDisplayValue; override; - procedure SynchronizeEditValue; override; - procedure DoOnGetValue(const AText: TCaption; out AValue: Variant; - var ErrorText: TCaption; var Error: Boolean); - function GetIncrement(AButton: TcxSpinEditButton): Double; virtual; - function GetValue: Variant; virtual; - function IncrementValueToStr(const AValue: TcxEditValue): string; virtual; - function InternalPrepareEditValue(const ADisplayValue: TcxEditValue; - ARaiseException: Boolean; out EditValue: TcxEditValue; - out AErrorText: TCaption): Boolean; - function IsOnGetValueEventAssigned: Boolean; - procedure SetValue(const Value: Variant); virtual; - property PressedState: TcxSpinEditPressedState read FPressedState write SetPressedState; - property Value: Variant read GetValue write SetValue stored IsValueStored; - public - procedure ClearSelection; override; - procedure CutToClipboard; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function Increment(AButton: TcxSpinEditButton): Boolean; virtual; - procedure PasteFromClipboard; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - property ActiveProperties: TcxCustomSpinEditProperties read GetActiveProperties; - property Properties: TcxCustomSpinEditProperties read GetProperties - write SetProperties; - end; - - { TcxSpinEdit } - - TcxSpinEdit = class(TcxCustomSpinEdit) - private - function GetActiveProperties: TcxSpinEditProperties; - function GetProperties: TcxSpinEditProperties; - procedure SetProperties(Value: TcxSpinEditProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxSpinEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragMode; - property Enabled; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxSpinEditProperties read GetProperties write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Value; - property Visible; - property DragCursor; - property DragKind; - property ImeMode; - property ImeName; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnEndDock; - property OnStartDock; - end; - - { TcxFilterSpinEditHelper } - - TcxFilterSpinEditHelper = class(TcxFilterMaskEditHelper) - public - class function EditPropertiesHasButtons: Boolean; override; - class function GetFilterEditClass: TcxCustomEditClass; override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - -implementation - -uses - Math, dxCore, cxGeometry, dxOffice11, dxThemeConsts, dxThemeManager, dxUxTheme, - cxEditConsts, cxEditPaintUtils, cxEditUtils, cxFormats, cxDWMApi; - -const - cxSpinEditTimerInitialInterval = 400; - cxSpinEditTimerInterval = 100; -{$IFDEF DELPHI6} - MaxIntValue = High(Int64); - MinIntValue = Low(Int64); -{$ELSE} - MaxIntValue = High(Integer); - MinIntValue = Low(Integer); -{$ENDIF} - -type - TcxSpinEditUltraFlatButtonPosition = (sufbpLeftMost, sufbpMiddle, sufbpRightMost, - sufbpMiddleTop, sufbpMiddleBottom, sufbpRightTop, sufbpRightBottom); - TcxSpinEditFlatButtonPosition = (sfbpLeftSide, sfbpLeftSideRightMost, - sfbpRightSide, sfbpRightSideLeftMost, sfbpMiddleTop, sfbpMiddleBottom, - sfbpRightTop, sfbpRightBottom); - -procedure CalculateSpinEditViewInfo(AViewData: TcxSpinEditViewData; - AViewInfo: TcxSpinEditViewInfo); -const - AButtonNativeStateMap: array [TcxEditButtonState] of Integer = - (UPS_DISABLED, UPS_NORMAL, UPS_PRESSED, UPS_HOT); -var - ATheme: TdxTheme; - I: Integer; -begin - if Length(AViewInfo.ButtonsInfo) = 0 then - Exit; - with AViewInfo do - if NativeStyle and AreVisualStylesMustBeUsed(NativeStyle, totSpin) then - begin - ATheme := OpenTheme(totSpin); - for I := 0 to Length(AViewInfo.ButtonsInfo) - 1 do - begin - ButtonsInfo[I].Data.NativeState := AButtonNativeStateMap[ButtonsInfo[I].Data.State]; - ButtonsInfo[I].Data.BackgroundPartiallyTransparent := IsThemeBackgroundPartiallyTransparent( - ATheme, ButtonsInfo[I].Data.NativePart, ButtonsInfo[I].Data.NativeState); - end - end - else - for I := 0 to Length(AViewInfo.ButtonsInfo) - 1 do - ButtonsInfo[I].Data.NativeState := TC_NONE; -end; - -procedure DrawSpinEdit(ACanvas: TcxCanvas; AViewInfo: TcxSpinEditViewInfo); -var - APrevClipRgn: TcxRegion; -begin - DrawTextEdit(ACanvas, AViewInfo); - with AViewInfo do - if (Length(ButtonsInfo) > 0) and (ButtonsInfo[0].Data.NativePart <> TC_NONE) and - (ButtonsPosition <> sbpHorzLeftRight) and not IsCustomDrawButton then - begin - APrevClipRgn := ACanvas.GetClipRegion; - try - ACanvas.IntersectClipRect(AViewInfo.BorderRect); - InternalPolyLine(ACanvas, [DelimiterLine[0], DelimiterLine[1]], BackgroundColor, True); - finally - ACanvas.SetClipRegion(APrevClipRgn, roSet); - end; - end; -end; - -procedure DrawSpinEditFlatButtonBorder(ACanvas: TcxCanvas; - AButtonPosition: TcxSpinEditFlatButtonPosition; var R: TRect; AContentColor, ABorderColor: TColor); -begin - with R do - case AButtonPosition of - sfbpLeftSide: - begin - DrawButtonBorder(ACanvas, R, [bBottom, bLeft, bTop], ABorderColor); - DrawButtonBorder(ACanvas, R, [bRight], AContentColor); - end; - sfbpLeftSideRightMost, sfbpRightSideLeftMost, sfbpRightTop: - begin - ACanvas.FrameRect(R, ABorderColor); - InflateRect(R, -1, -1); - end; - sfbpRightSide, sfbpMiddleTop: - begin - DrawButtonBorder(ACanvas, R, [bTop, bRight, bBottom], ABorderColor); - DrawButtonBorder(ACanvas, R, [bLeft], AContentColor); - end; - sfbpMiddleBottom: - begin - DrawButtonBorder(ACanvas, R, [bBottom, bRight], ABorderColor); - DrawButtonBorder(ACanvas, R, [bLeft, bTop], AContentColor); - end; - sfbpRightBottom: - begin - DrawButtonBorder(ACanvas, R, [bLeft, bBottom, bRight], ABorderColor); - DrawButtonBorder(ACanvas, R, [bTop], AContentColor); - end; - end; -end; - -procedure DrawSpinEditUltraFlatButtonBorder(ACanvas: TcxCanvas; R: TRect; - AButtonPosition: TcxSpinEditUltraFlatButtonPosition; ABrushColor: TColor; - AButtonViewInfo: TcxEditButtonViewInfo; const ABounds: TRect; - AIsEditBackgroundTransparent, AHasExternalBorder: Boolean; - AEditBorderStyle: TcxEditBorderStyle; out ABackgroundRect, AContentRect: TRect); -var - AHighlightColor: TColor; -begin - AHighlightColor := GetEditBorderHighlightColor( - AButtonViewInfo.Data.Style = btsOffice11); - - if (AButtonViewInfo.Data.State in [ebsDisabled, ebsNormal]) or - not AButtonViewInfo.Data.IsInplace and (AEditBorderStyle = ebsNone) or - AButtonViewInfo.Data.IsInplace and not AHasExternalBorder then - begin - if not(AButtonViewInfo.Data.State in [ebsDisabled, ebsNormal]) then - ACanvas.FrameRect(R, AHighlightColor) - else - if not AIsEditBackgroundTransparent then - ACanvas.FrameRect(R, AButtonViewInfo.Data.BackgroundColor); - InflateRect(R, -1, -1); - ABackgroundRect := R; - end - else - begin - ABackgroundRect := R; - case AButtonPosition of - sufbpLeftMost: - begin - DrawButtonBorder(ACanvas, R, [bRight], AHighlightColor); - Dec(ABackgroundRect.Right); - ExtendRect(R, Rect(1, 1, 0, 1)); - end; - sufbpMiddle: - if R.Left = ABounds.Left then - begin - DrawButtonBorder(ACanvas, R, [bRight], AHighlightColor); - Dec(ABackgroundRect.Right); - ExtendRect(R, Rect(1, 1, 0, 1)); - end - else - begin - DrawButtonBorder(ACanvas, R, [bLeft, bRight], AHighlightColor); - ExtendRect(ABackgroundRect, Rect(1, 0, 1, 0)); - ExtendRect(R, Rect(0, 1, 0, 1)); - end; - sufbpRightMost: - begin - DrawButtonBorder(ACanvas, R, [bLeft], AHighlightColor); - Inc(ABackgroundRect.Left); - ExtendRect(R, Rect(0, 1, 1, 1)); - end; - sufbpRightTop: - begin - DrawButtonBorder(ACanvas, R, [bBottom], AHighlightColor); - Dec(ABackgroundRect.Bottom); - if R.Left = ABounds.Left then - Inc(R.Left) - else - begin - DrawButtonBorder(ACanvas, R, [bLeft], AHighlightColor); - Inc(ABackgroundRect.Left); - end; - ExtendRect(R, Rect(0, 1, 1, 0)); - end; - sufbpRightBottom: - begin - DrawButtonBorder(ACanvas, R, [bTop], AHighlightColor); - Inc(ABackgroundRect.Top); - if R.Left = ABounds.Left then - Inc(R.Left) - else - begin - DrawButtonBorder(ACanvas, R, [bLeft], AHighlightColor); - Inc(ABackgroundRect.Left); - end; - ExtendRect(R, Rect(0, 0, 1, 1)); - end; - sufbpMiddleTop: - begin - DrawButtonBorder(ACanvas, R, [bLeft, bBottom, bRight], AHighlightColor); - ExtendRect(ABackgroundRect, Rect(1, 0, 1, 1)); - Inc(R.Top); - end; - sufbpMiddleBottom: - begin - DrawButtonBorder(ACanvas, R, [bLeft, bTop, bRight], AHighlightColor); - ExtendRect(ABackgroundRect, Rect(1, 1, 1, 0)); - Dec(R.Bottom); - end; - end; - end; - AContentRect := R; -end; - -{ TcxSpinEditViewInfo } - -procedure TcxSpinEditViewInfo.DrawButtonContent(ACanvas: TcxCanvas; - AButtonVisibleIndex: Integer; const AContentRect: TRect; - APenColor, ABrushColor: TColor; ANeedOffsetContent: Boolean); - -const - APainterArrowMap: array[Boolean, 0..3] of TcxEditBtnKind = ( - (cxbkSpinLeftBtn, cxbkSpinRightBtn, cxbkSpinLeftBtn, cxbkSpinRightBtn), - (cxbkSpinDownBtn, cxbkSpinUpBtn, cxbkSpinDownBtn, cxbkSpinUpBtn)); - - procedure InternalDrawArrow(const R: TRect; AColor: TColor); - const - AArrowDirectionMap: array[Boolean, 0..3] of TcxArrowDirection = ( - (adLeft, adRight, adLeft, adRight), - (adDown, adUp, adLeft, adRight) - ); - begin - DrawArrow(ACanvas, ArrowSize, R, - AArrowDirectionMap[ButtonsPosition = sbpVert, AButtonVisibleIndex], - AButtonVisibleIndex > 1, ANeedOffsetContent, AColor); - end; - -var - AButtonInfo: TcxEditButtonViewInfo; -begin - AButtonInfo := ButtonsInfo[AButtonVisibleIndex]; - if Painter <> nil then - begin - Painter.DrawEditorButton(ACanvas, AContentRect, - APainterArrowMap[ButtonsPosition = sbpVert, AButtonVisibleIndex], - EditBtnState2ButtonState[AButtonInfo.Data.State]); - end - else - if AButtonInfo.Data.State <> ebsDisabled then - InternalDrawArrow(AContentRect, APenColor) - else - begin - InternalDrawArrow(cxRectOffset(AContentRect, 1, 1), clBtnHighlight); - InternalDrawArrow(AContentRect, clBtnShadow); - end; -end; - -procedure TcxSpinEditViewInfo.DrawHotFlatButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); - - function GetButtonPosition: TcxSpinEditFlatButtonPosition; - const - AButtonPositionA: array[Boolean, TcxSpinEditButtonsPosition, sebBackward..sebForward] of TcxSpinEditFlatButtonPosition = ( - ( - (sfbpLeftSideRightMost, sfbpRightSideLeftMost), - (sfbpRightSideLeftMost, sfbpRightSide), - (sfbpRightBottom, sfbpRightTop) - ), - ( - (sfbpLeftSideRightMost, sfbpRightSideLeftMost), - (sfbpRightSide, sfbpRightSide), - (sfbpMiddleBottom, sfbpMiddleTop) - ) - ); - AFastButtonPositionA: array[TcxSpinEditButtonsPosition, sebFastBackward..sebFastForward] of TcxSpinEditFlatButtonPosition = ( - (sfbpLeftSide, sfbpRightSide), - (sfbpRightSideLeftMost, sfbpRightSide), - (sfbpRightSideLeftMost, sfbpRightSide) - ); - begin - if AButtonViewInfo.Index > 1 then - Result := AFastButtonPositionA[ButtonsPosition, TcxSpinEditButton(AButtonViewInfo.Index)] - else - Result := AButtonPositionA[Length(ButtonsInfo) > 2, ButtonsPosition, - TcxSpinEditButton(AButtonViewInfo.Index)]; - end; - -const - ABrushColorA: array [TcxEditButtonState] of TColor = ( - clBtnFace, clBtnFace, clBtnText, clBtnShadow - ); -begin - with AButtonViewInfo do - begin - ABrushColor := ABrushColorA[Data.State]; - if Data.Transparent then - ABrushColor := Data.BackgroundColor; - - if Data.State in [ebsPressed, ebsSelected] then - if Data.Transparent and (Data.State = ebsSelected) then - APenColor := clBtnShadow - else - APenColor := clBtnHighlight - else - APenColor := clBtnText; - DrawSpinEditFlatButtonBorder(ACanvas, GetButtonPosition, ARect, ABrushColor, clBtnShadow); - - AContentRect := ARect; - end; -end; - -procedure TcxSpinEditViewInfo.DrawNativeButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - var ARect: TRect; out AContentRect: TRect; var APenColor, ABrushColor: TColor); -begin - if IsCustomDrawButton then - AContentRect := ARect - else - AContentRect := cxEmptyRect; -end; - -procedure TcxSpinEditViewInfo.DrawUltraFlatButtonBorder(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; - AIsOffice11Style: Boolean; var ARect: TRect; var AContentRect: TRect; out APenColor, ABrushColor: TColor); -var - AButtonPosition: TcxSpinEditUltraFlatButtonPosition; -begin - with ACanvas, AButtonViewInfo do - begin - if AButtonViewInfo.Data.Transparent then - ABrushColor := Data.BackgroundColor - else - if AButtonViewInfo.Data.State = ebsDisabled then - ABrushColor := clBtnFace - else - if AButtonViewInfo.Data.State = ebsNormal then - if AIsOffice11Style then - ABrushColor := dxOffice11DockColor1 - else - ABrushColor := clBtnFace - else - ABrushColor := GetEditButtonHighlightColor( - AButtonViewInfo.Data.State = ebsPressed, AIsOffice11Style); - case AButtonViewInfo.Index of - cxSpinFastBackwardButtonIndex: - if ButtonsPosition = sbpHorzLeftRight then - AButtonPosition := sufbpLeftMost - else - AButtonPosition := sufbpMiddle; - cxSpinFastForwardButtonIndex: - AButtonPosition := sufbpRightMost; - cxSpinBackwardButtonIndex: - if ButtonsPosition = sbpVert then - if Length(ButtonsInfo) > 2 then - AButtonPosition := sufbpMiddleBottom - else - AButtonPosition := sufbpRightBottom - else - if (Length(ButtonsInfo) = 2) and (ButtonsPosition = sbpHorzLeftRight) then - AButtonPosition := sufbpLeftMost - else - AButtonPosition := sufbpMiddle; - else - if ButtonsPosition = sbpVert then - if Length(ButtonsInfo) > 2 then - AButtonPosition := sufbpMiddleTop - else - AButtonPosition := sufbpRightTop - else - if Length(ButtonsInfo) > 2 then - AButtonPosition := sufbpMiddle - else - AButtonPosition := sufbpRightMost; - end; - DrawSpinEditUltraFlatButtonBorder(ACanvas, ARect, - AButtonPosition, ABrushColor, AButtonViewInfo, BorderRect, - Transparent, epoHasExternalBorder in PaintOptions, Self.BorderStyle, - ARect, AContentRect); - end; -end; - -procedure TcxSpinEditViewInfo.DrawNativeButtonBackground(ACanvas: TcxCanvas; AButtonViewInfo: TcxEditButtonViewInfo; const ARect: TRect); -begin - with AButtonViewInfo do - DrawThemeBackground(OpenTheme(totSpin), ACanvas.Handle, Data.NativePart, - Data.NativeState, ARect) -end; - -function TcxSpinEditViewInfo.GetPartRect(APart: Integer): TRect; -begin - case APart of - ecpNone: - Result := cxNullRect; - else - Result := BorderRect; - end; -end; - -procedure TcxSpinEditViewInfo.InternalPaint(ACanvas: TcxCanvas); -begin - DrawSpinEdit(ACanvas, Self); -end; - -{ TcxSpinEditViewData } - -procedure TcxSpinEditViewData.Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - CalculateSpinEditViewInfo(Self, TcxSpinEditViewInfo(AViewInfo)); -end; - -procedure TcxSpinEditViewData.CalculateButtonBounds(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: Integer; - var ButtonsRect: TRect); -var - AButtonWidth, ADefaultButtonHeight, AFastButtonWidth: Integer; - ANativeStyle: Boolean; - ASpinButtonsPosition: TcxSpinEditButtonsPosition; - Y: Integer; - - procedure CalculateButtonMetrics; - var - AClientExtent: TRect; - AEditButtonsExtent: TRect; - begin - ACanvas.Font := Style.GetVisibleFont; - AButtonWidth := CalculateEditDefaultButtonWidth(ACanvas, AViewInfo.ButtonsInfo[AButtonVisibleIndex]); - - AClientExtent := GetClientExtent(ACanvas, AViewInfo); - AEditButtonsExtent := GetButtonsExtent(ACanvas); - TcxSpinEditViewInfo(AViewInfo).ArrowSize := GetArrowSize(Size(AButtonWidth + 2, - (ButtonsRect.Bottom - ButtonsRect.Top) div 2 + 2), adUp).cy; - if ANativeStyle then - begin - ADefaultButtonHeight := ACanvas.TextHeight('Zg') + - Self.GetEditContentSizeCorrection.cy + (AClientExtent.Top + AClientExtent.Bottom) - - (AEditButtonsExtent.Top + AEditButtonsExtent.Bottom) - 1; - ADefaultButtonHeight := ADefaultButtonHeight div 2 + Integer(Odd(ADefaultButtonHeight)); - end - else - if Style.LookAndFeel.SkinPainter <> nil then - begin - with Style.LookAndFeel.SkinPainter.EditButtonSize do - begin - ADefaultButtonHeight := cy div 2 + TcxSpinEditViewInfo(AViewInfo).ArrowSize; - AFastButtonWidth := ADefaultButtonHeight * 3 div 2 + Integer(Odd(cy)); - Exit; - end; - end - else - ADefaultButtonHeight := (TcxSpinEditViewInfo(AViewInfo).ArrowSize * 2 - 1) * 2 + 1 - 2; - AFastButtonWidth := MulDiv(ADefaultButtonHeight, 3, 2) + Integer(Odd(AFastButtonWidth)); - end; - - procedure UpdateButtonsNativePart; - - procedure SetButtonsNativePart; - begin - if ASpinButtonsPosition = sbpVert then - begin - AViewInfo.ButtonsInfo[cxSpinBackwardButtonIndex].Data.NativePart := SPNP_DOWN; - AViewInfo.ButtonsInfo[cxSpinForwardButtonIndex].Data.NativePart := SPNP_UP; - end - else - begin - AViewInfo.ButtonsInfo[cxSpinBackwardButtonIndex].Data.NativePart := SPNP_DOWNHORZ; - AViewInfo.ButtonsInfo[cxSpinForwardButtonIndex].Data.NativePart := SPNP_UPHORZ; - end; - if Length(AViewInfo.ButtonsInfo) > 2 then - begin - AViewInfo.ButtonsInfo[cxSpinFastBackwardButtonIndex].Data.NativePart := SPNP_DOWNHORZ; - AViewInfo.ButtonsInfo[cxSpinFastForwardButtonIndex].Data.NativePart := SPNP_UPHORZ; - end; - end; - - procedure ResetButtonsNativePart; - var - I: Integer; - begin - for I := Low(AViewInfo.ButtonsInfo) to High(AViewInfo.ButtonsInfo) do - AViewInfo.ButtonsInfo[I].Data.NativePart := TC_NONE; - end; - - begin - if NativeStyle then - begin - SetButtonsNativePart; - end - else - ResetButtonsNativePart; - end; - - function GetDelimiterSize: Integer; - begin - if ANativeStyle and not AViewInfo.IsCustomDrawButton - then - Result := 1 - else - Result := 0; - end; - - function GetBottomCorrection: Integer; - begin - if ANativeStyle and IsCompositionEnabled and not AViewInfo.IsCustomDrawButton then - Result := 1 - else - Result := 0; - end; - -var - APrevButtonsRect: TRect; - AShowFastButtons: Boolean; -begin - if AButtonVisibleIndex <> ButtonVisibleCount - 1 then - Exit; - APrevButtonsRect := ButtonsRect; - AShowFastButtons := Properties.SpinButtons.ShowFastButtons; - ASpinButtonsPosition := Properties.SpinButtons.Position; - ANativeStyle := AreVisualStylesMustBeUsed(AViewInfo.NativeStyle, totSpin); - TcxSpinEditViewInfo(AViewInfo).ButtonsPosition := Properties.SpinButtons.Position; - - CalculateButtonMetrics; - if AShowFastButtons then - with AViewInfo.ButtonsInfo[cxSpinFastForwardButtonIndex] do - begin - Bounds := Rect(ButtonsRect.Right - AFastButtonWidth, ButtonsRect.Top, - ButtonsRect.Right, ButtonsRect.Bottom - GetBottomCorrection); - ButtonsRect.Right := Bounds.Left; - end; - - if ASpinButtonsPosition = sbpVert then - begin - with AViewInfo.ButtonsInfo[cxSpinForwardButtonIndex] do - begin - Bounds := Rect(ButtonsRect.Right - AButtonWidth, ButtonsRect.Top, - ButtonsRect.Right, ButtonsRect.Top + (cxRectHeight(ButtonsRect) - GetDelimiterSize) div 2); - Y := Bounds.Bottom + GetDelimiterSize; - end; - with AViewInfo.ButtonsInfo[cxSpinBackwardButtonIndex] do - begin - Bounds := Rect(ButtonsRect.Right - AButtonWidth, Y, - ButtonsRect.Right, ButtonsRect.Bottom); - ButtonsRect.Right := Bounds.Left; - end; - end - else - begin - with AViewInfo.ButtonsInfo[cxSpinForwardButtonIndex] do - begin - Bounds := Rect(ButtonsRect.Right - ADefaultButtonHeight, ButtonsRect.Top, - ButtonsRect.Right, ButtonsRect.Bottom - GetBottomCorrection); - ButtonsRect.Right := Bounds.Left; - Dec(ButtonsRect.Right, GetDelimiterSize); - end; - end; - - if ASpinButtonsPosition = sbpHorzLeftRight then - begin - if AShowFastButtons then - with AViewInfo.ButtonsInfo[cxSpinFastBackwardButtonIndex] do - begin - Bounds := Rect(ButtonsRect.Left, ButtonsRect.Top, - ButtonsRect.Left + AFastButtonWidth, ButtonsRect.Bottom - GetBottomCorrection); - ButtonsRect.Left := Bounds.Right; - end; - with AViewInfo.ButtonsInfo[cxSpinBackwardButtonIndex] do - begin - Bounds := Rect(ButtonsRect.Left, ButtonsRect.Top, - ButtonsRect.Left + ADefaultButtonHeight, ButtonsRect.Bottom - GetBottomCorrection); - ButtonsRect.Left := Bounds.Right; - end; - end - else - begin - if ASpinButtonsPosition = sbpHorzRight then - begin - with AViewInfo.ButtonsInfo[cxSpinBackwardButtonIndex] do - begin - Bounds := Rect(ButtonsRect.Right - ADefaultButtonHeight, ButtonsRect.Top, - ButtonsRect.Right, ButtonsRect.Bottom); - ButtonsRect.Right := Bounds.Left; - end; - end; - if AShowFastButtons then - with AViewInfo.ButtonsInfo[cxSpinFastBackwardButtonIndex] do - begin - Bounds := Rect(ButtonsRect.Right - AFastButtonWidth, ButtonsRect.Top, - ButtonsRect.Right, ButtonsRect.Bottom - GetBottomCorrection); - ButtonsRect.Right := Bounds.Left; - end; - end; - UpdateButtonsNativePart; -end; - -procedure TcxSpinEditViewData.CalculateButtonViewInfo(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo; AButtonVisibleIndex: Integer; - var ButtonsRect: TRect); -begin - inherited CalculateButtonViewInfo(ACanvas, AViewInfo, AButtonVisibleIndex, - ButtonsRect); - if Properties.SpinButtons.Position = sbpHorzLeftRight then - begin - AViewInfo.ButtonsInfo[cxSpinBackwardButtonIndex].Data.LeftAlignment := True; - if Length(AViewInfo.ButtonsInfo) > 2 then - AViewInfo.ButtonsInfo[cxSpinFastBackwardButtonIndex].Data.LeftAlignment := True; - end; -end; - -procedure TcxSpinEditViewData.CheckButtonsOnly(AViewInfo: TcxCustomEditViewInfo; - APrevButtonsWidth, AButtonsWidth: Integer); - - procedure SetButtonsVisibleBounds; - var - I: Integer; - begin - for I := 0 to Length(AViewInfo.ButtonsInfo) - 1 do - with AViewInfo.ButtonsInfo[I] do - IntersectRect(VisibleBounds, Bounds, AViewInfo.BorderRect); - end; - -var - ASpinEditViewInfo: TcxSpinEditViewInfo; -begin - inherited CheckButtonsOnly(AViewInfo, APrevButtonsWidth, AButtonsWidth); - if Properties.SpinButtons.Position = sbpVert then - with AViewInfo.ButtonsInfo[cxSpinForwardButtonIndex].Bounds do - begin - AViewInfo.ButtonsInfo[cxSpinBackwardButtonIndex].Bounds.Left := Left; - AViewInfo.ButtonsInfo[cxSpinBackwardButtonIndex].Bounds.Right := Right; - end; - SetButtonsVisibleBounds; - if AreVisualStylesMustBeUsed(AViewInfo.NativeStyle, totSpin) then - begin - ASpinEditViewInfo := TcxSpinEditViewInfo(AViewInfo); - case Properties.SpinButtons.Position of - sbpHorzLeftRight: - with ASpinEditViewInfo do - FillChar(DelimiterLine, SizeOf(DelimiterLine), 0); - sbpHorzRight: - with AViewInfo.ButtonsInfo[cxSpinBackwardButtonIndex].Bounds do - begin - ASpinEditViewInfo.DelimiterLine[0] := Point(Right, Top); - ASpinEditViewInfo.DelimiterLine[1] := Point(Right, Bottom - 1); - end; - sbpVert: - with AViewInfo.ButtonsInfo[cxSpinForwardButtonIndex].Bounds do - begin - ASpinEditViewInfo.DelimiterLine[0] := Point(Left, Bottom); - ASpinEditViewInfo.DelimiterLine[1] := Point(Right - 1, Bottom); - end; - end; - end; -end; - -function TcxSpinEditViewData.IgnoreButtonWhileStretching( - AButtonVisibleIndex: Integer): Boolean; -begin - Result := (Properties.SpinButtons.Position = sbpVert) and - (AButtonVisibleIndex = cxSpinBackwardButtonIndex); -end; - -function TcxSpinEditViewData.CanPressButton(AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer): Boolean; -begin - if Edit <> nil then - Result := TcxCustomSpinEdit(Edit).PressedState = epsNone - else - Result := True; -end; - -function TcxSpinEditViewData.IsButtonPressed(AViewInfo: TcxCustomEditViewInfo; - AButtonVisibleIndex: Integer): Boolean; -var - APressedState: TcxSpinEditPressedState; -begin - if Edit = nil then - APressedState := epsNone - else - APressedState := TcxCustomSpinEdit(Edit).PressedState; - Result := (AButtonVisibleIndex + 1) = Integer(APressedState) -end; - -procedure TcxSpinEditViewData.CalculateButtonNativeInfo(AButtonViewInfo: TcxEditButtonViewInfo); -begin -end; - -function TcxSpinEditViewData.GetProperties: TcxCustomSpinEditProperties; -begin - Result := TcxCustomSpinEditProperties(FProperties); -end; - -{ TcxSpinEditButtons } - -constructor TcxSpinEditButtons.Create(AOwner: TPersistent); -begin - inherited Create; - FOwner := AOwner; - FPosition := sbpVert; - FVisible := True; -end; - -procedure TcxSpinEditButtons.Assign(Source: TPersistent); -begin - if Source is TcxSpinEditButtons then - begin - Properties.BeginUpdate; - try - with TcxSpinEditButtons(Source) do - begin - Self.Position := Position; - Self.ShowFastButtons := ShowFastButtons; - Self.Visible := Visible; - end; - finally - Properties.EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxSpinEditButtons.Changed; -begin - Properties.Changed; -end; - -function TcxSpinEditButtons.GetProperties: TcxCustomSpinEditProperties; -begin - Result := TcxCustomSpinEditProperties(FOwner); -end; - -procedure TcxSpinEditButtons.SetPosition(Value: TcxSpinEditButtonsPosition); -begin - if Value <> FPosition then - begin - FPosition := Value; - Changed; - end; -end; - -procedure TcxSpinEditButtons.SetShowFastButtons(Value: Boolean); -begin - if Value <> FShowFastButtons then - begin - FShowFastButtons := Value; - Changed; - end; -end; - -procedure TcxSpinEditButtons.SetVisible(Value: Boolean); -begin - if Value <> FVisible then - begin - FVisible := Value; - Changed; - end; -end; - -{ TcxSpinEditPropertiesValues } - -procedure TcxSpinEditPropertiesValues.Assign(Source: TPersistent); -begin - if Source is TcxSpinEditPropertiesValues then - begin - BeginUpdate; - try - inherited Assign(Source); - ValueType := TcxSpinEditPropertiesValues(Source).ValueType; - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxSpinEditPropertiesValues.RestoreDefaults; -begin - BeginUpdate; - try - inherited RestoreDefaults; - ValueType := False; - finally - EndUpdate; - end; -end; - -procedure TcxSpinEditPropertiesValues.SetValueType(Value: Boolean); -begin - if Value <> FValueType then - begin - FValueType := Value; - Changed; - end; -end; - -{ TcxCustomSpinEditProperties } - -constructor TcxCustomSpinEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - Buttons.Add; - Buttons.Add; - FSpinButtons := TcxSpinEditButtons.Create(Self); - FCanEdit := True; - FIncrement := 1.0; - FLargeIncrement := 10.0; -end; - -destructor TcxCustomSpinEditProperties.Destroy; -begin - FreeAndNil(FSpinButtons); - inherited Destroy; -end; - -procedure TcxCustomSpinEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomSpinEditProperties then - begin - BeginUpdate; - try - with Source as TcxCustomSpinEditProperties do - begin - Self.FIDefaultValuesProvider := FIDefaultValuesProvider; - Self.AssignedValues.ValueType := False; - if AssignedValues.ValueType then - Self.ValueType := ValueType; - end; - inherited Assign(Source); - with Source as TcxCustomSpinEditProperties do - begin - Self.CanEdit := CanEdit; - Self.Circular := Circular; - Self.ExceptionOnInvalidInput := ExceptionOnInvalidInput; - Self.Increment := Increment; - Self.LargeIncrement := LargeIncrement; - Self.SpinButtons := SpinButtons; - Self.UseCtrlIncrement := UseCtrlIncrement; - Self.OnGetValue := OnGetValue; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomSpinEditProperties.CreateViewData(AStyle: TcxCustomEditStyle; - AIsInplace: Boolean; APreviewMode: Boolean = False): TcxCustomEditViewData; -begin - Result := inherited CreateViewData(AStyle, AIsInplace, APreviewMode); - with TcxSpinEditViewData(Result) do - if Edit <> nil then - PressedState := TcxCustomSpinEdit(Edit).FPressedState - else - PressedState := epsNone; -end; - -class function TcxCustomSpinEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxSpinEdit; -end; - -class function TcxCustomSpinEditProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxSpinEditViewInfo; -end; - -function TcxCustomSpinEditProperties.IsDisplayValueValid(var DisplayValue: TcxEditValue; AEditFocused: Boolean): - Boolean; -var - AValue: TcxEditValue; -begin - Result := inherited IsDisplayValueValid(DisplayValue, AEditFocused); - if not Result or not IsDisplayValueNumeric then - Exit; - try - if DisplayValue <> '' then - begin - Result := TryTextToValue(Trim(VarToStr(DisplayValue)), AValue); - if not Result then - Exit; - if (AValue < InternalMinValue) or (AValue > InternalMaxValue) then - DisplayValue := VarToStr(AValue); - end; - Result := True; - except - on EConvertError do - Result := False; - end; -end; - -function TcxCustomSpinEditProperties.IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; -var - AValue: TcxEditValue; -begin - if VarIsStr(EditValue) or VarIsNumericEx(EditValue) then - begin - Result := TryTextToValue(VarToStr(EditValue), AValue); - if Result then - EditValue := AValue; - end - else - Result := {VarIsNumericEx(EditValue) or} VarIsSoftNull(EditValue) or - VarIsDate(EditValue); - if not Result then - Exit; - try - EditValue := PrepareValue(EditValue); -// EditValue := CheckValueBounds(EditValue); - EditValue := SetVariantType(EditValue); - except - Result := False; - end; -end; - -procedure TcxCustomSpinEditProperties.ValidateDisplayValue( - var ADisplayValue: TcxEditValue; var AErrorText: TCaption; - var AError: Boolean; AEdit: TcxCustomEdit); -var - AEditValue: TcxEditValue; - AIsUserErrorDisplayValue: Boolean; -begin - if TcxCustomSpinEdit(AEdit).FIsCustomText then - AError := not TcxCustomSpinEdit(AEdit).InternalPrepareEditValue(ADisplayValue, - False, AEditValue, AErrorText) - else - AEditValue := TcxCustomSpinEdit(AEdit).FInternalValue; - if not AError then - begin - if VarIsNull(AEditValue) then - begin - AEditValue := CheckValueBounds(0); - AEditValue := SetVariantType(AEditValue); - end; - if not ExceptionOnInvalidInput then - if AEditValue < InternalMinValue then - AEditValue := InternalMinValue - else - if AEditValue > InternalMaxValue then - AEditValue := InternalMaxValue; - ADisplayValue := VarToStr(AEditValue); - if ExceptionOnInvalidInput then - begin - AError := (AEditValue < InternalMinValue) or (AEditValue > InternalMaxValue); - if AError then - AErrorText := cxGetResourceString(@cxSEditValueOutOfBounds); - end; - end; - - DoValidate(ADisplayValue, AErrorText, AError, AEdit, AIsUserErrorDisplayValue); -end; - -function TcxCustomSpinEditProperties.DefaultFocusedDisplayValue: TcxEditValue; -begin - PrepareDisplayValue(CheckValueBounds(0), Result, True) -end; - -procedure TcxCustomSpinEditProperties.DefineProperties(Filer: TFiler); - - function HasZeroIncrement: Boolean; - begin - Result := (Increment = 0) and ((Filer.Ancestor = nil) or - (TcxCustomSpinEditProperties(Filer.Ancestor).Increment <> Increment)); - end; - - function HasZeroLargeIncrement: Boolean; - begin - Result := (LargeIncrement = 0) and ((Filer.Ancestor = nil) or - (TcxCustomSpinEditProperties(Filer.Ancestor).LargeIncrement <> LargeIncrement)); - end; - -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('ZeroIncrement', ReadZeroIncrement, WriteZeroIncrement, - HasZeroIncrement); - Filer.DefineProperty('ZeroLargeIncrement', ReadZeroLargeIncrement, - WriteZeroLargeIncrement, HasZeroLargeIncrement); -end; - -procedure TcxCustomSpinEditProperties.DoChanged; - - function GetButtonCount: Integer; - begin - Result := 0; - if SpinButtons.Visible then - begin - Inc(Result, 2); - if SpinButtons.ShowFastButtons then - Inc(Result, 2); - end; - end; - -var - AButtonCount: Integer; -begin - if FSpinButtons <> nil then - begin - BeginUpdate; - try - AButtonCount := GetButtonCount; - while Buttons.Count < AButtonCount do - Buttons.Add; - while Buttons.Count > AButtonCount do - Buttons[0].Free; - finally - EndUpdate(False); - end; - end; - inherited; -end; - -class function TcxCustomSpinEditProperties.GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; -begin - Result := TcxSpinEditPropertiesValues; -end; - -function TcxCustomSpinEditProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - if not AEditFocused and not AssignedValues.DisplayFormat then - Result := evsText - else - Result := evsValue; -end; - -class function TcxCustomSpinEditProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxSpinEditViewData; -end; - -function TcxCustomSpinEditProperties.IsEditValueNumeric: Boolean; -begin - Result := True; -end; - -function TcxCustomSpinEditProperties.CheckValueBounds(const Value: Variant): Variant; -begin - Result := Value; - if VarIsNumericEx(Result) then - if IsValueBoundDefined(evbMin) and (Result < MinValue) then - Result := MinValue - else - if IsValueBoundDefined(evbMax) and (Result > MaxValue) then - Result := MaxValue; -end; - -function TcxCustomSpinEditProperties.ExtendValueUpToBound: Boolean; -begin - Result := True; -end; - -function TcxCustomSpinEditProperties.GetBoundsCheckingKind: TcxSpinBoundsCheckingKind; -begin - if FCircular then - Result := bckCircular - else - if ExtendValueUpToBound then - Result := bckExtendToBound - else - Result := bckDoNotExceed; -end; - -function TcxCustomSpinEditProperties.GetIncrement(AButton: TcxSpinEditButton): Double; -begin - case AButton of - sebBackward: Result := - Increment; - sebForward: Result := Increment; - sebFastBackward: Result := - LargeIncrement; - sebFastForward: Result := LargeIncrement; - else - raise EdxException.Create('TcxCustomSpinEditProperties.GetIncrement fails'); - end; -end; - -function TcxCustomSpinEditProperties.GetMaxMinValueForCurrentValueType( - AMinValue: Boolean = True): TcxEditValue; -begin - if ValueType = vtInt then - if AMinValue then - Result := MinIntValue - else - Result := MaxIntValue - else - if AMinValue then - Result := -MaxDouble - else - Result := MaxDouble; -end; - -function TcxCustomSpinEditProperties.InternalMaxValue: TcxEditValue; -begin - if IsValueBoundDefined(evbMax) then - Result := DoubleAsValueType(MaxValue, ValueType) - else - Result := GetMaxMinValueForCurrentValueType(False); - Result := VarToCurrentValueType(Result); -end; - -function TcxCustomSpinEditProperties.InternalMinValue: TcxEditValue; -begin - if IsValueBoundDefined(evbMin) then - Result := DoubleAsValueType(MinValue, ValueType) - else - Result := GetMaxMinValueForCurrentValueType; - Result := VarToCurrentValueType(Result); -end; - -function TcxCustomSpinEditProperties.IsDisplayValueNumeric: Boolean; -begin - Result := True; -end; - -function TcxCustomSpinEditProperties.IsValueBoundsValid(AValue: Extended): Boolean; -begin - if ValueType = vtInt then - Result := (AValue >= MinIntValue) and (AValue <= MaxIntValue) - else - Result := (AValue >= -MaxDouble) and (AValue <= MaxDouble); -end; - -function TcxCustomSpinEditProperties.PrepareValue(const AValue: TcxEditValue): Variant; -begin - if VarIsSoftNull(AValue) then - Result := VarToCurrentValueType(0) - else - Result := VarToCurrentValueType(AValue); -end; - -function TcxCustomSpinEditProperties.PreserveSelection: Boolean; -begin - Result := False; -end; - -function TcxCustomSpinEditProperties.SetVariantType(const Value: TcxEditValue): TcxEditValue; -begin - if VarIsNumericEx(Value) then - Result := VarToCurrentValueType(Value) - else - Result := Value; -end; - -function TcxCustomSpinEditProperties.DoubleAsValueType(AValue: Double; - AValueType: TcxSpinEditValueType): Double; -begin - if AValueType = vtInt then - Result := Round(AValue) - else - Result := AValue; -end; - -function TcxCustomSpinEditProperties.GetAssignedValues: TcxSpinEditPropertiesValues; -begin - Result := TcxSpinEditPropertiesValues(FAssignedValues); -end; - -function TcxCustomSpinEditProperties.GetValueType: TcxSpinEditValueType; -const - ASpinEditValueTypeMap: array [Boolean] of TcxSpinEditValueType = (vtInt, vtFloat); -begin - if AssignedValues.ValueType then - Result := FValueType - else - if IDefaultValuesProvider <> nil then - Result := ASpinEditValueTypeMap[IDefaultValuesProvider.DefaultIsFloatValue] - else - Result := vtFloat; -end; - -function TcxCustomSpinEditProperties.IsIncrementStored: Boolean; -begin - Result := FIncrement <> 1.0; -end; - -function TcxCustomSpinEditProperties.IsLargeIncrementStored: Boolean; -begin - Result := FLargeIncrement <> 10.0; -end; - -function TcxCustomSpinEditProperties.IsValueTypeStored: Boolean; -begin - Result := AssignedValues.ValueType; -end; - -procedure TcxCustomSpinEditProperties.ReadZeroIncrement(Reader: TReader); -begin - Reader.ReadBoolean; - Increment := 0; -end; - -procedure TcxCustomSpinEditProperties.ReadZeroLargeIncrement(Reader: TReader); -begin - Reader.ReadBoolean; - LargeIncrement := 0; -end; - -procedure TcxCustomSpinEditProperties.SetAssignedValues( - Value: TcxSpinEditPropertiesValues); -begin - FAssignedValues.Assign(Value); -end; - -procedure TcxCustomSpinEditProperties.SetCircular(Value: Boolean); -begin - if Value <> FCircular then - begin - FCircular := Value; - Changed; - end; -end; - -procedure TcxCustomSpinEditProperties.SetSpinButtons(Value: TcxSpinEditButtons); -begin - FSpinButtons.Assign(Value); -end; - -function TcxCustomSpinEditProperties.TryTextToValue(S: string; - out AValue: TcxEditValue): Boolean; -var - AExtendedValue: Extended; - AIntegerValue: {$IFDEF DELPHI6}Int64{$ELSE}Integer{$ENDIF}; -{$IFNDEF DELPHI6} - E: Integer; -{$ENDIF} -begin - AValue := Null; - AIntegerValue := 0; - if ValueType = vtInt then - begin - {$IFDEF DELPHI6} - Result := TryStrToInt64(S, AIntegerValue); - {$ELSE} - Val(S, AIntegerValue, E); - Result := E = 0; - {$ENDIF} - end - else - begin - Result := TextToFloat(PChar(S), AExtendedValue, fvExtended); - Result := Result and IsValueBoundsValid(AExtendedValue); - end; - if Result then - begin - if ValueType = vtInt then - AValue := AIntegerValue - else - AValue := AExtendedValue; - end; -end; - -procedure TcxCustomSpinEditProperties.SetValueType(Value: TcxSpinEditValueType); -begin - if AssignedValues.ValueType and (Value = FValueType) then - Exit; - AssignedValues.FValueType := True; - FValueType := Value; - Changed; -end; - -function TcxCustomSpinEditProperties.VarToCurrentValueType(AValue: TcxEditValue): TcxEditValue; -begin - if ValueType = vtFloat then - Result := VarAsType(AValue, varDouble) - else - Result := VarAsType(AValue, {$IFDEF DELPHI6}varInt64{$ELSE}varInteger{$ENDIF}); -end; - -procedure TcxCustomSpinEditProperties.WriteZeroIncrement(Writer: TWriter); -begin - Writer.WriteBoolean(True); -end; - -procedure TcxCustomSpinEditProperties.WriteZeroLargeIncrement(Writer: TWriter); -begin - Writer.WriteBoolean(True); -end; - -{ TcxCustomSpinEdit } - -procedure TcxCustomSpinEdit.ClearSelection; -begin - if not (Focused and not ActiveProperties.CanEdit) then - begin - FIsCustomTextAction := True; - try - inherited ClearSelection; - finally - FIsCustomTextAction := False; - end; - end; -end; - -procedure TcxCustomSpinEdit.CutToClipboard; -begin - if not (Focused and not ActiveProperties.CanEdit) then - begin - FIsCustomTextAction := True; - try - inherited CutToClipboard; - finally - FIsCustomTextAction := False; - end; - end; -end; - -class function TcxCustomSpinEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomSpinEditProperties; -end; - -function TcxCustomSpinEdit.Increment(AButton: TcxSpinEditButton): Boolean; - - function GetMinMaxValueDelta(const AValue: Variant; - AIsMin: Boolean = True): Variant; - var - ADelta, AMaxRange, ARange: Variant; - begin - if AIsMin then - begin - AMaxRange := ActiveProperties.GetMaxMinValueForCurrentValueType; - ARange := ActiveProperties.InternalMinValue; - end - else - begin - AMaxRange := ActiveProperties.GetMaxMinValueForCurrentValueType(False); - ARange := ActiveProperties.InternalMaxValue; - end; - - if (ARange > 0) and (AValue > 0) or - (ARange < 0) and (AValue < 0) then - Result := ARange - AValue - else - begin - ADelta := AMaxRange - ARange; - ADelta := ADelta + AValue; - if (ADelta < 0) and (AValue < 0) or - (ADelta > 0) and (AValue > 0) then - Result := AMaxRange - else - Result := ARange - AValue; - end; - end; - - function InternalIncrement(var AValue: Variant; AIncrement: Variant): Boolean; - var - AMaxValueDelta, AMinValueDelta: TcxEditValue; - begin - Result := True; - AIncrement := ActiveProperties.VarToCurrentValueType(AIncrement); - AMinValueDelta := GetMinMaxValueDelta(AValue); - AMaxValueDelta := GetMinMaxValueDelta(AValue, False); - if (AIncrement < AMinValueDelta) or (AIncrement > AMaxValueDelta) then - case ActiveProperties.GetBoundsCheckingKind of - bckDoNotExceed: - begin - Result := False; - Exit; - end; - bckExtendToBound: - if AIncrement < AMinValueDelta then - AValue := ActiveProperties.InternalMinValue - else - AValue := ActiveProperties.InternalMaxValue; - bckCircular: - if AIncrement < AMinValueDelta then - AValue := ActiveProperties.InternalMaxValue + AIncrement + 1 - - AMinValueDelta - else - AValue := ActiveProperties.InternalMinValue + AIncrement - 1 - - AMaxValueDelta; - end - else - AValue := AValue + AIncrement; - end; - - function GetNewValue(out AValue: Variant): Boolean; - var - ABoundsCheckingKind: TcxSpinBoundsCheckingKind; - begin - Result := False; - with ActiveProperties do - begin - ABoundsCheckingKind := ActiveProperties.GetBoundsCheckingKind; - AValue := Value; - if AValue < InternalMinValue then - if AButton in [sebForward, sebFastForward] then - AValue := InternalMinValue - else - if ABoundsCheckingKind = bckCircular then - AValue := InternalMaxValue - else - Exit - else - if AValue > InternalMaxValue then - if AButton in [sebBackward, sebFastBackward] then - AValue := InternalMaxValue - else - if ABoundsCheckingKind = bckCircular then - AValue := InternalMinValue - else - Exit - else - begin - if not InternalIncrement(AValue, Self.GetIncrement(AButton)) then - Exit; - end; - end; - Result := True; - AValue := ActiveProperties.SetVariantType(AValue); - end; - -var - ADisplayValue: TcxEditValue; - APrevText: string; - AValue: Variant; - APrevSelStart: Integer; - APrevSelLength: Integer; -begin - LockChangeEvents(True); - try - Result := False; - if not DoEditing then - Exit; - if not GetNewValue(AValue) then - Exit; - - APrevText := Text; - - ADisplayValue := IncrementValueToStr(AValue); - APrevSelStart := SelStart; - APrevSelLength := SelLength; - SetInternalValue(AValue); - KeyboardAction := True; - try - SetInternalDisplayValue(ADisplayValue); - finally - KeyboardAction := False; - end; - Result := not InternalCompareString(APrevText, Text, True); - if Result then - begin - ModifiedAfterEnter := True; - if ActiveProperties.PreserveSelection then - SetSelection(APrevSelStart, APrevSelLength) - else - SelStart := Length(Text); - if ActiveProperties.ImmediatePost and CanPostEditValue and ValidateEdit(True) then - begin - InternalPostEditValue; - SynchronizeDisplayValue; - end; - end; - finally - LockChangeEvents(False); - end; -end; - -procedure TcxCustomSpinEdit.PasteFromClipboard; -begin - if not (Focused and not ActiveProperties.CanEdit) then - begin - FIsCustomTextAction := True; - try - inherited PasteFromClipboard; - finally - FIsCustomTextAction := False; - end; - end; -end; - -procedure TcxCustomSpinEdit.PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); -var - AErrorText: TCaption; -begin - InternalPrepareEditValue(ADisplayValue, True, EditValue, AErrorText); -end; - -procedure TcxCustomSpinEdit.ChangeHandler(Sender: TObject); -begin - FIsCustomText := FIsCustomTextAction; - inherited ChangeHandler(Sender); - FIsCustomTextAction := False; -end; - -procedure TcxCustomSpinEdit.CheckEditorValueBounds; -begin - KeyboardAction := ModifiedAfterEnter; - try - with ActiveProperties do - if Value < InternalMinValue then - Value := InternalMinValue - else - if Value > InternalMaxValue then - Value := InternalMaxValue; - finally - KeyboardAction := False; - end; -end; - -procedure TcxCustomSpinEdit.DoButtonDown(AButtonVisibleIndex: Integer); - - procedure CreateTimer; - begin - if ActiveProperties.ReadOnly or not DataBinding.IsDataAvailable then - Exit; - if FTimer <> nil then - FTimer.Free; - FTimer := TcxTimer.Create(Self); - FTimer.Interval := cxSpinEditTimerInitialInterval; - FTimer.OnTimer := HandleTimer; - end; - -begin - inherited DoButtonDown(AButtonVisibleIndex); - if GetCaptureControl <> Self then - ShortRefreshContainer(False); - if FPressedState = epsNone then - with ViewInfo do - if PressedButton <> -1 then - begin - Increment(TcxSpinEditButton(PressedButton)); - CreateTimer; - end; -end; - -procedure TcxCustomSpinEdit.DoEditKeyDown(var Key: Word; Shift: TShiftState); -const - APressedStateMap: array[TcxSpinEditButton] of TcxSpinEditPressedState = - (epsDown, epsUp, epsFastDown, epsFastUp); -var - AButton: TcxSpinEditButton; -begin - FIsCustomTextAction := False; - if ((Key = VK_UP) or (Key = VK_DOWN) or (Key = VK_NEXT) or (Key = VK_PRIOR)) and - not (ActiveProperties.UseCtrlIncrement and not (ssCtrl in Shift)) then - begin - if not DataBinding.Modified and not DoEditing then - Exit; - case Key of - VK_UP: - AButton := sebForward; - VK_DOWN: - AButton := sebBackward; - VK_PRIOR: - AButton := sebFastForward; - else - AButton := sebFastBackward; - end; - PressedState := APressedStateMap[AButton]; - - if HasNativeHandle(Self, GetCapture) then - SetCaptureControl(nil); - Increment(AButton); - Key := 0; - end - else - begin - StopTracking; - if Key <> VK_ESCAPE then - FIsCustomTextAction := True; - if not ActiveProperties.CanEdit and CanKeyDownModifyEdit(Key, Shift) then - begin - DoAfterKeyDown(Key, Shift); - Key := 0; - end; - end; - - if Key <> 0 then - inherited DoEditKeyDown(Key, Shift); -end; - -procedure TcxCustomSpinEdit.DoEditKeyPress(var Key: Char); -begin - if (Key = '.') or (Key = ',') then - Key := DecimalSeparator; - if IsTextChar(Key) or (Key = Char(VK_BACK)) or (Key = Char(VK_DELETE)) then - if not IsValidChar(Key) then - begin - Key := #0; - Beep; - end - else - FIsCustomTextAction := True; - if Key <> #0 then - inherited DoEditKeyPress(Key); -end; - -procedure TcxCustomSpinEdit.DoEditKeyUp(var Key: Word; Shift: TShiftState); -begin - FIsCustomTextAction := False; - inherited DoEditKeyUp(Key, Shift); - if Key = 0 then - Exit; - if (Key = VK_UP) or (Key = VK_DOWN) or (Key = VK_NEXT) or (Key = VK_PRIOR) then - StopTracking; -end; - -function TcxCustomSpinEdit.DoMouseWheelDown(Shift: TShiftState; - MousePos: TPoint): Boolean; -begin - Result := HandleMouseWheel(Shift); - if Result then - Increment(sebBackward); -end; - -function TcxCustomSpinEdit.DoMouseWheelUp(Shift: TShiftState; - MousePos: TPoint): Boolean; -begin - Result := HandleMouseWheel(Shift); - if Result then - Increment(sebForward); -end; - -procedure TcxCustomSpinEdit.FocusChanged; -begin - StopTracking; - inherited FocusChanged; -end; - -procedure TcxCustomSpinEdit.Initialize; -begin - inherited Initialize; - InternalEditValue := 0; - FPressedState := epsNone; -end; - -function TcxCustomSpinEdit.InternalGetEditingValue: TcxEditValue; -begin - Result := Value; -end; - -function TcxCustomSpinEdit.InternalGetNotPublishedStyleValues: TcxEditStyleValues; -begin - Result := inherited InternalGetNotPublishedStyleValues - - [svButtonStyle, svButtonTransparency, svGradientButtons]; -end; - -function TcxCustomSpinEdit.IsValidChar(AChar: Char): Boolean; -begin - with ActiveProperties do - if CanEdit and IsOnGetValueEventAssigned then - begin - Result := True; - Exit; - end; - if ActiveProperties.ValueType = vtFloat then - Result := IsNumericChar(AChar, ntExponent) - else - Result := IsNumericChar(AChar, ntInteger) or - (AChar = 'e') or (AChar = 'E'); - Result := Result or (AChar < #32) or - (AnsiChar(AChar) in ActiveProperties.ValidChars); - if not ActiveProperties.CanEdit and Result and ((AChar >= #32) or - (AChar = Char(#8)) or (AChar = Char(VK_DELETE))) then - Result := False; -end; - -procedure TcxCustomSpinEdit.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if ButtonVisibleIndexAt(Point(X, Y)) = -1 then - StopTracking; -end; - -procedure TcxCustomSpinEdit.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - StopTracking; - inherited MouseUp(Button, Shift, X, Y); -end; - -procedure TcxCustomSpinEdit.PropertiesChanged(Sender: TObject); -begin - inherited PropertiesChanged(Sender); - if not DataBinding.CanCheckEditorValue and ModifiedAfterEnter then - CheckEditorValueBounds; -end; - -function TcxCustomSpinEdit.DoRefreshContainer(const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AIsMouseEvent: Boolean): Boolean; -begin - Result := inherited DoRefreshContainer(P, Button, Shift, AIsMouseEvent); - with ViewInfo do - if (Length(ButtonsInfo) > 0) and (PressedButton = -1) and (CaptureButtonVisibleIndex = -1) then - StopTracking; -end; - -procedure TcxCustomSpinEdit.SynchronizeDisplayValue; -var - AValue: TcxEditValue; -begin - AValue := EditValue; - with ActiveProperties do - if IsEditValueValid(AValue, Focused) then - SetInternalValue(PrepareValue(AValue)) - else - SetInternalValue(ActiveProperties.CheckValueBounds(0)); - inherited SynchronizeDisplayValue; -end; - -procedure TcxCustomSpinEdit.SynchronizeEditValue; -begin - inherited SynchronizeEditValue; - SetInternalValue(FEditValue); -end; - -procedure TcxCustomSpinEdit.DoOnGetValue(const AText: TCaption; - out AValue: Variant; var ErrorText: TCaption; var Error: Boolean); -begin - with Properties do - if Assigned(OnGetValue) then - OnGetValue(Self, AText, AValue, ErrorText, Error); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnGetValue) then - OnGetValue(Self, AText, AValue, ErrorText, Error); -end; - -function TcxCustomSpinEdit.GetIncrement(AButton: TcxSpinEditButton): Double; -begin - Result := ActiveProperties.GetIncrement(AButton); - if ActiveProperties.ValueType = vtInt then - Result := Round(Result); -end; - -function TcxCustomSpinEdit.GetProperties: TcxCustomSpinEditProperties; -begin - Result := TcxCustomSpinEditProperties(FProperties); -end; - -function TcxCustomSpinEdit.GetActiveProperties: TcxCustomSpinEditProperties; -begin - Result := TcxCustomSpinEditProperties(InternalGetActiveProperties); -end; - -function TcxCustomSpinEdit.GetValue: Variant; -begin - if Focused then - begin - if FIsCustomText then - PrepareEditValue(Text, Result, Focused) - else - Result := FInternalValue; - if not VarIsNumericEx(Result) then // Null - Result := ActiveProperties.CheckValueBounds(0); - end - else - begin - if VarIsNumericEx(EditValue) then - Result := EditValue - else - if VarIsStr(EditValue) then - begin - if EditValue = '' then - Result := ActiveProperties.CheckValueBounds(0) - else - if not ActiveProperties.TryTextToValue(EditValue, Result) then - Result := ActiveProperties.CheckValueBounds(0); - end - else - Result := ActiveProperties.CheckValueBounds(0); - end; - Result := ActiveProperties.SetVariantType(Result); -end; - -function TcxCustomSpinEdit.IncrementValueToStr(const AValue: TcxEditValue): string; -var - ADisplayValue: TcxEditValue; -begin - ActiveProperties.PrepareDisplayValue(AValue, ADisplayValue, InternalFocused); - Result := ADisplayValue; -end; - -function TcxCustomSpinEdit.InternalPrepareEditValue( - const ADisplayValue: TcxEditValue; ARaiseException: Boolean; - out EditValue: TcxEditValue; out AErrorText: TCaption): Boolean; -var - AError: Boolean; - AValue: Variant; -begin - Result := True; - if ADisplayValue = '' then - with ActiveProperties do - if (IDefaultValuesProvider <> nil) and IDefaultValuesProvider.DefaultRequired then - EditValue := ActiveProperties.CheckValueBounds(0) - else - EditValue := Null - else - begin - AError := not ActiveProperties.TryTextToValue(VarToStr(ADisplayValue), AValue); - if AError then - begin - AErrorText := ''; - if IsOnGetValueEventAssigned then - try - DoOnGetValue(ADisplayValue, AValue, AErrorText, AError); - except - on E: Exception do - if ARaiseException then - raise - else - begin - Result := False; - AErrorText := E.Message; - Exit; - end; - end; - end; - - if AError then - begin - if AErrorText = '' then - AErrorText := cxGetResourceString(@cxSSpinEditInvalidNumericValue); - if not ActiveProperties.ExceptionOnInvalidInput then - AErrorText := ''; - if ARaiseException and ActiveProperties.ExceptionOnInvalidInput then - raise EcxEditError.Create(AErrorText); - AValue := FInternalValue; - end; - EditValue := AValue; - Result := not AError; - end; -// ActiveProperties.CheckValueBounds(EditValue); - EditValue := ActiveProperties.SetVariantType(EditValue); -end; - -function TcxCustomSpinEdit.IsOnGetValueEventAssigned: Boolean; -begin - Result := Assigned(Properties.OnGetValue) or - Assigned(ActiveProperties.OnGetValue); -end; - -procedure TcxCustomSpinEdit.HandleTimer(Sender: TObject); -begin - if FTimer.Interval = cxSpinEditTimerInitialInterval then - FTimer.Interval := cxSpinEditTimerInterval; - if ViewInfo.PressedButton <> -1 then - Increment(TcxSpinEditButton(ViewInfo.PressedButton)); -end; - -function TcxCustomSpinEdit.IsValueStored: Boolean; -begin - Result := not VarEqualsExact(Value, 0); -end; - -procedure TcxCustomSpinEdit.SetInternalValue(AValue: TcxEditValue); -begin - FInternalValue := ActiveProperties.SetVariantType(AValue); -end; - -procedure TcxCustomSpinEdit.SetPressedState(Value: TcxSpinEditPressedState); -const - ASpinButtonMap: array[TcxSpinEditPressedState] of TcxSpinEditButton = - (sebBackward, sebBackward, sebForward, sebFastBackward, sebFastForward); -var - I: Integer; -begin - if (Length(ViewInfo.ButtonsInfo) > 0) and (Value <> FPressedState) then - begin - FPressedState := Value; - CalculateViewInfo(False); - for I := 0 to Length(ViewInfo.ButtonsInfo) - 1 do - InvalidateRect(ViewInfo.ButtonsInfo[I].Bounds, False); - end; -end; - -procedure TcxCustomSpinEdit.SetProperties(Value: TcxCustomSpinEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomSpinEdit.SetValue(const Value: Variant); -var - AValue: TcxEditValue; -begin - if VarIsNumericEx(Value) then - begin - AValue := Value; - if ActiveProperties.IsEditValueValid(AValue, Focused) then - InternalEditValue := AValue; - end; -end; - -procedure TcxCustomSpinEdit.StopTracking; -var - I: Integer; -begin - FreeAndNil(FTimer); - CaptureButtonVisibleIndex := -1; - if Length(ViewInfo.ButtonsInfo) > 0 then - for I := 0 to 1 do - if ViewInfo.ButtonsInfo[I].Data.State = ebsPressed then - ViewInfo.ButtonsInfo[I].Data.State := ebsNormal; - PressedState := epsNone; - - if GetCaptureControl = Self then - SetCaptureControl(nil); -end; - -{ TcxSpinEdit } - -class function TcxSpinEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxSpinEditProperties; -end; - -function TcxSpinEdit.GetActiveProperties: TcxSpinEditProperties; -begin - Result := TcxSpinEditProperties(InternalGetActiveProperties); -end; - -function TcxSpinEdit.GetProperties: TcxSpinEditProperties; -begin - Result := TcxSpinEditProperties(FProperties); -end; - -procedure TcxSpinEdit.SetProperties(Value: TcxSpinEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterSpinEditHelper } - -class function TcxFilterSpinEditHelper.EditPropertiesHasButtons: Boolean; -begin - Result := True; -end; - -class function TcxFilterSpinEditHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxSpinEdit; -end; - -class function TcxFilterSpinEditHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual..fcoGreaterEqual, fcoBlanks, fcoNonBlanks]; - if AExtendedSet then - Result := Result + [fcoBetween..fcoNotInList] -end; - -class procedure TcxFilterSpinEditHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - with TcxCustomSpinEditProperties(AProperties) do - CanEdit := True; -end; - -initialization - GetRegisteredEditProperties.Register(TcxSpinEditProperties, scxSEditRepositorySpinItem); - FilterEditsController.Register(TcxSpinEditProperties, TcxFilterSpinEditHelper); - -finalization - FilterEditsController.Unregister(TcxSpinEditProperties, TcxFilterSpinEditHelper); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxSplitter.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxSplitter.pas deleted file mode 100644 index f100607f..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxSplitter.pas +++ /dev/null @@ -1,2494 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxSplitter; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, Controls, Forms, Graphics, Messages, SysUtils, cxClasses, - cxControls, cxExtEditConsts, cxExtEditUtils, cxGraphics, cxLookAndFeels; - -type - TcxPositionAfterOpen = 2..High(Integer); - TcxSplitterAlign = (salBottom, salLeft, salRight, salTop); - TcxSplitterDragState = (sstNormal, sstResizing, sstHotZoneClick); - TcxSplitterMouseState = (smsClicked, smsInHotZone); - TcxSplitterMouseStates = set of TcxSplitterMouseState; - TcxSplitterState = (ssOpened, ssClosed); - TcxSplitterDirection = (cxsdLeftToRight, cxsdRightToLeft, cxsdTopToBottom, cxsdBottomToTop); - TCanResizeEvent = procedure(Sender: TObject; var NewSize: Integer; var Accept: Boolean) of object; - TBeforeOpenHotZoneEvent = procedure(Sender: TObject; - var NewSize: Integer; var AllowOpen: Boolean) of object; - TBeforeCloseHotZoneEvent = procedure(Sender: TObject; var AllowClose: Boolean) of object; - -type - TcxCustomSplitter = class; - - { TcxHotZoneStyle } - - TcxHotZoneStyle = class(TPersistent) - private - FOwner: TcxCustomSplitter; - FSizePercent: TcxNaturalNumber; - FVisible: Boolean; - FHotZoneRect: TRect; - procedure SetSizePercent(Value: TcxNaturalNumber); - procedure SetVisible(Value: Boolean); - protected - procedure Changed; virtual; - function SplitterDirection: TcxSplitterDirection; virtual; - function CalculateHotZoneRect(const ABounds: TRect): TRect; virtual; - function GetMinSize: TcxNaturalNumber; virtual; - function GetMaxSize: TcxNaturalNumber; virtual; - function DrawHotZone(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean): TRect; virtual; - procedure DrawBackground(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); virtual; - public - constructor Create(AOwner: TcxCustomSplitter); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - property SizePercent: TcxNaturalNumber read FSizePercent write SetSizePercent default 30; - property Visible: Boolean read FVisible write SetVisible default True; - property HotZoneRect: TRect read FHotZoneRect write FHotZoneRect; - property Owner: TcxCustomSplitter read FOwner; - end; - - TcxHotZoneStyleClass = class of TcxHotZoneStyle; - - { TcxMediaPlayer9Style } - TcxMediaPlayer9Style = class(TcxHotZoneStyle) - private - FArrowRect: TRect; - FArrowColor: TColor; - FArrowHighlightColor: TColor; - FLightColor: TColor; - FBorderColor: TColor; - FShadowStartColor: TColor; - FShadowHighlightStartColor: TColor; - procedure SetArrowColor(Value: TColor); - procedure SetArrowHighlightColor(Value: TColor); - procedure SetLightColor(Value: TColor); - procedure SetBorderColor(Value: TColor); - procedure SetShadowStartColor(Value: TColor); - procedure SetShadowHighlightStartColor(Value: TColor); - protected - function DrawHotZone(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean): TRect; override; - procedure DrawBackground(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); override; - function CalculateHotZoneRect(const ABounds: TRect): TRect; override; - public - constructor Create(AOwner: TcxCustomSplitter); override; - procedure Assign(Source: TPersistent); override; - published - property SizePercent; - property Visible; - property ArrowColor: TColor read FArrowColor write SetArrowColor default clWindowText; - property ArrowHighlightColor: TColor read FArrowHighlightColor write SetArrowHighlightColor default clBlue; - property LightColor: TColor read FLightColor write SetLightColor default clWindow; - property BorderColor: TColor read FBorderColor write SetBorderColor default clBtnShadow; - property ShadowStartColor: TColor read FShadowStartColor write SetShadowStartColor default $00F5E6CD; - property ShadowHighlightStartColor: TColor read FShadowHighlightStartColor - write SetShadowHighlightStartColor default $00AFF5C3; - end; - - { TcxMediaPlayer8Style } - TcxMediaPlayer8Style = class(TcxHotZoneStyle) - private - FLTPointsRect: TRect; - FRBPointsRect: TRect; - FArrowRect: TRect; - FArrowColor: TColor; - FArrowHighlightColor: TColor; - FLightColor: TColor; - FShadowColor: TColor; - procedure SetArrowColor(Value: TColor); - procedure SetArrowHighlightColor(Value: TColor); - procedure SetLightColor(Value: TColor); - procedure SetShadowColor(Value: TColor); - procedure DrawArrowRect(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); - protected - function DrawHotZone(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean): TRect; override; - procedure DrawBackground(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); override; - function CalculateHotZoneRect(const ABounds: TRect): TRect; override; - public - constructor Create(AOwner: TcxCustomSplitter); override; - procedure Assign(Source : TPersistent); override; - published - property SizePercent; - property Visible; - property ArrowColor: TColor read FArrowColor write SetArrowColor default clWindowText; - property ArrowHighlightColor: TColor read FArrowHighlightColor write SetArrowHighlightColor default clWindow; - property LightColor: TColor read FLightColor write SetLightColor default clWindow; - property ShadowColor: TColor read FShadowColor write SetShadowColor default clBtnShadow; - end; - - { TcxXPTaskBarStyle } - TcxXPTaskBarStyle = class(TcxHotZoneStyle) - private - FLightColor: TColor; - FShadowColor: TColor; - FLTPointsRect: TRect; - FRBPointsRect: TRect; - procedure SetLightColor(Value: TColor); - procedure SetShadowColor(Value: TColor); - protected - function DrawHotZone(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean): TRect; override; - procedure DrawBackground(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); override; - function CalculateHotZoneRect(const ABounds: TRect): TRect; override; - public - constructor Create(AOwner: TcxCustomSplitter); override; - procedure Assign(Source : TPersistent); override; - published - property SizePercent; - property Visible; - property LightColor: TColor read FLightColor write SetLightColor default clWindow; - property ShadowColor: TColor read FShadowColor write SetShadowColor default clBtnShadow; - end; - - { TcxSimpleStyle } - TcxSimpleStyle = class(TcxHotZoneStyle) - private - FArrowColor: TColor; - FArrowHighlightColor: TColor; - FLightColor: TColor; - FShadowColor: TColor; - FDotsColor: TColor; - FDotsShadowColor: TColor; - FLTArrowRect: TRect; - FRBArrowRect: TRect; - procedure SetArrowColor(Value: TColor); - procedure SetArrowHighlightColor(Value: TColor); - procedure SetLightColor(Value: TColor); - procedure SetShadowColor(Value: TColor); - procedure SetDotsColor(Value: TColor); - procedure SetDotsShadowColor(Value: TColor); - protected - function DrawHotZone(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean): TRect; override; - procedure DrawBackground(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); override; - function CalculateHotZoneRect(const ABounds: TRect): TRect; override; - public - constructor Create(AOwner: TcxCustomSplitter); override; - procedure Assign(Source : TPersistent); override; - published - property SizePercent; - property Visible; - property ArrowColor: TColor read FArrowColor write SetArrowColor default clWindowText; - property ArrowHighlightColor: TColor read FArrowHighlightColor write SetArrowHighlightColor default clWindow; - property LightColor: TColor read FLightColor write SetLightColor default clWindow; - property ShadowColor: TColor read FShadowColor write SetShadowColor default clBtnShadow; - property DotsColor: TColor read FDotsColor write SetDotsColor default clHighlight; - property DotsShadowColor: TColor read FDotsShadowColor write SetDotsShadowColor default clWindow; - end; - - {TdxSplitterDragImage} - - TdxSplitterDragImage = class(TcxCustomDragImage) - protected - procedure Paint; override; - end; - - { TcxCustomSplitter } - - TcxCustomSplitter = class(TcxControl) - private - FActiveControl: TWinControl; - FAlignSplitter: TcxSplitterAlign; - FAllowHotZoneDrag: Boolean; - FAutoPosition: Boolean; - FAutoSnap: Boolean; - FBrush: TBrush; - FControl: TControl; - FDragImage: TdxSplitterDragImage; - FDragThreshold: TcxNaturalNumber; - FDrawCanvas: TcxCanvas; - FHotZone: TcxHotZoneStyle; - FHotZoneClickPoint: TPoint; - FHotZoneEvents: TNotifyEvent; - FHotZoneStyleClass: TcxHotZoneStyleClass; - FInvertDirection: Boolean; - FLastPatternDrawPosition: Integer; - FMaxSize: Word; - FMinSize: TcxNaturalNumber; - FMouseStates: TcxSplitterMouseStates; - FNativeBackground: Boolean; - FNewSize: Integer; - FOldSize: Integer; - FOnAfterClose: TNotifyEvent; - FOnAfterOpen: TNotifyEvent; - FOnBeforeClose: TBeforeCloseHotZoneEvent; - FOnBeforeOpen: TBeforeOpenHotZoneEvent; - FOnCanResize: TCanResizeEvent; - FOnMoved: TNotifyEvent; - FPositionAfterOpen: TcxPositionAfterOpen; - FPrevKeyDown: TKeyEvent; - FResizeIgnoreSnap: Boolean; //deprecated - FResizeUpdate: Boolean; - FSavedParentShowHint: Boolean; - FSavedShowHint: Boolean; - FSplit: Integer; - FSplitterClickPoint: TPoint; - FSplitterState: TcxSplitterDragState; - FState: TcxSplitterState; - procedure CalcSplitSize(X, Y: Integer; var NewSize, Split: Integer; - ACorrectWithMaxMin: Boolean = True); - procedure ControlResizing(X, Y: Integer); - function FindControl: TControl; - procedure FocusKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - function GetMaxControlSize: Integer; - function IsAllControlHotZoneStyle: Boolean; - procedure UpdateControlSize; - procedure UpdateSize(X, Y: Integer); - - function GetDragImageTopLeft: TPoint; - procedure InitDragImage; - procedure MoveDragImage; - procedure ReleaseDragImage; - - procedure SetAlignSplitter(Value: TcxSplitterAlign); - procedure SetSplitterState(Value: TcxSplitterState); - procedure SetAllowHotZoneDrag(Value: Boolean); - procedure SetInvertDirection(Value: Boolean); - procedure SetHotZone(Value: TcxHotZoneStyle); - procedure SetNativeBackground(Value: Boolean); - procedure SetDefaultStates; - procedure RecalcLastPosition; - procedure NormalizeSplitterSize; - procedure SetHotZoneStyleClass(const Value: TcxHotZoneStyleClass); - function GetHotZoneClassName: string; - procedure SetHotZoneClassName(Value: string); - procedure InitResize(X, Y: Integer); - - procedure InternalOpenSplitter(ANewSize: Integer = 0); - procedure InternalCloseSplitter; - - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure WMCancelMode(var Message: TWMCancelMode); message WM_CANCELMODE; - procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; - protected - { Protected declarations } - FDrawBitmap: TBitmap; - FPositionBeforeClose: Integer; - function CanFocusOnClick: Boolean; override; - function CanResize(var NewSize: Integer): Boolean; reintroduce; virtual; - function DoCanResize(var NewSize: Integer): Boolean; virtual; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure HotZoneStyleChanged; virtual; - procedure DrawHotZone; virtual; - procedure Paint; override; - procedure StopSizing; virtual; - function GetSplitterMinSize: TcxNaturalNumber; virtual; - function GetSplitterMaxSize: TcxNaturalNumber; virtual; - procedure CreateHotZone; virtual; - procedure DestroyHotZone; virtual; - procedure DoEventBeforeOpen(var ANewSize: Integer; - var AllowOpenHotZone: Boolean); virtual; - procedure DoEventAfterOpen; virtual; - procedure DoEventBeforeClose(var AllowCloseHotZone: Boolean); virtual; - procedure DoEventAfterClose; virtual; - procedure DoEventMoved; virtual; - function InternalGetMinSize: Integer; - procedure Notification(ACOmponent: TComponent; Operation: TOperation); override; - procedure Loaded; override; - function CalculateSplitterDirection: TcxSplitterDirection; virtual; - procedure UpdateMouseStates(X, Y: Integer); virtual; - property AlignSplitter: TcxSplitterAlign read FAlignSplitter - write SetAlignSplitter default salLeft; - property AutoPosition: Boolean read FAutoPosition write FAutoPosition default True; - property AutoSnap: Boolean read FAutoSnap write FAutoSnap default False; - property AllowHotZoneDrag: Boolean read FAllowHotZoneDrag write SetAllowHotZoneDrag default True; - property DragThreshold: TcxNaturalNumber read FDragThreshold write FDragThreshold default 3; - property InvertDirection: Boolean read FInvertDirection - write SetInvertDirection default False; - property MinSize: TcxNaturalNumber read FMinSize write FMinSize default 30; - property PositionAfterOpen: TcxPositionAfterOpen read FPositionAfterOpen - write FPositionAfterOpen default 30; - property ResizeUpdate: Boolean read FResizeUpdate - write FResizeUpdate default False; - property ResizeIgnoreSnap: Boolean read FResizeIgnoreSnap - write FResizeIgnoreSnap stored False; //deprecated - property Control: TControl read FControl write FControl; - property NativeBackground: Boolean read FNativeBackground write SetNativeBackground default True; - property OnCanResize: TCanResizeEvent read FOnCanResize write FOnCanResize; - property OnMoved: TNotifyEvent read FOnMoved write FOnMoved; - property OnBeforeOpen: TBeforeOpenHotZoneEvent read FOnBeforeOpen write FOnBeforeOpen; - property OnAfterOpen: TNotifyEvent read FOnAfterOpen write FOnAfterOpen; - property OnBeforeClose: TBeforeCloseHotZoneEvent read FOnBeforeClose write FOnBeforeClose; - property OnAfterClose: TNotifyEvent read FOnAfterClose write FOnAfterClose; - public - { Public declarations } - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure OpenSplitter; - procedure CloseSplitter; - property State: TcxSplitterState read FState write SetSplitterState; - function IsPointInHotZone(const X, Y: Integer): Boolean; - function IsPointInSplitter(const X, Y: Integer): Boolean; - property HotZoneStyleClass: TcxHotZoneStyleClass read FHotZoneStyleClass - write SetHotZoneStyleClass; - property Direction: TcxSplitterDirection read CalculateSplitterDirection; - published - property HotZoneClassName: string read GetHotZoneClassName write SetHotZoneClassName; - property HotZone: TcxHotZoneStyle read FHotZone write SetHotZone; - property HotZoneEvents: TNotifyEvent read FHotZoneEvents write FHotZoneEvents; - end; - - { TcxSplitter } - TcxSplitter = class(TcxCustomSplitter) - published - { Public declarations } - property AlignSplitter; - property AllowHotZoneDrag; - property AutoPosition; - property DragThreshold; - property NativeBackground; - property PositionAfterOpen; - property AutoSnap; - property InvertDirection; - property MinSize; - property ResizeUpdate; - property ResizeIgnoreSnap; //deprecated - property Control; - property OnCanResize; - property OnMoved; - property OnBeforeOpen; - property OnAfterOpen; - property OnBeforeClose; - property OnAfterClose; - property Color; - property ShowHint; - property ParentColor; - property ParentShowHint; - property Visible; - end; - -function GetRegisteredHotZoneStyles: TcxRegisteredClasses; - -implementation - -uses - Math, cxContainer, dxThemeConsts, dxThemeManager, dxUxTheme; - -type - TWinControlAccess = class(TWinControl); - -const - SplitterDefaultSize = 8; - -var - FRegisteredHotZoneStyles: TcxRegisteredClasses; - -function GetRegisteredHotZoneStyles: TcxRegisteredClasses; -begin - if FRegisteredHotZoneStyles = nil then - FRegisteredHotZoneStyles := TcxRegisteredClasses.Create; - Result := FRegisteredHotZoneStyles; -end; - -procedure DrawSplitterDots(ACanvas: TcxCanvas; const ARect: TRect; const AClicked: Boolean; - const AFromLeftTop: Boolean; const ALightColor, AShadowColor: TColor; - const ASplitterDirection: TcxSplitterDirection; const ABetweenPoints, AIndent: Integer); -var - I, ANextDotPoint: Integer; - - procedure PaintOuterDot(X, Y: Integer); - begin - ACanvas.Brush.Color := ALightColor; - ACanvas.FillRect(Rect(X, Y, X + 2, Y + 2)); - ACanvas.Brush.Color := AShadowColor; - ACanvas.FillRect(Rect(X + 1, Y + 1, X + 3, Y + 3)); - end; - - procedure PaintInnerDot(X, Y: Integer); - begin - ACanvas.Brush.Color := ALightColor; - ACanvas.FillRect(Rect(X + 1, Y + 1, X + 3, Y + 3)); - ACanvas.Brush.Color := AShadowColor; - ACanvas.FillRect(Rect(X, Y, X + 2, Y + 2)); - end; - -begin - if AFromLeftTop = True then - begin - if (ASplitterDirection = cxsdLeftToRight) or (ASplitterDirection = cxsdRightToLeft) then - begin - ANextDotPoint := ARect.Top + ABetweenPoints; - for I := ARect.Top + ABetweenPoints to ARect.Bottom - ABetweenPoints do - if (I = ANextDotPoint) and ((I + ABetweenPoints) <= ARect.Bottom) then - begin - if AClicked = False then - PaintOuterDot(ARect.Left + AIndent, I) - else - PaintInnerDot(ARect.Left + AIndent, I); - Inc(ANextDotPoint, ABetweenPoints + 2); - end; - end - else - begin - ANextDotPoint := ARect.Left + ABetweenPoints; - for I := ARect.Left + ABetweenPoints to ARect.Right - ABetweenPoints do - if (I = ANextDotPoint) and ((I + ABetweenPoints) <= ARect.Right) then - begin - if AClicked = False then - PaintOuterDot(I, ARect.Top + AIndent) - else - PaintInnerDot(I, ARect.Top + AIndent); - Inc(ANextDotPoint, ABetweenPoints + 2); - end; - end; - end - else - begin - if (ASplitterDirection = cxsdLeftToRight) or (ASplitterDirection = cxsdRightToLeft) then - begin - ANextDotPoint := ARect.Bottom - (ABetweenPoints * 2); - for I := ARect.Bottom - (ABetweenPoints * 2) downto ARect.Top do - if (I = ANextDotPoint) and (I >= ARect.Top) then - begin - if AClicked = False then - PaintOuterDot(ARect.Left + AIndent, I) - else - PaintInnerDot(ARect.Left + AIndent, I); - Dec(ANextDotPoint, ABetweenPoints + 2); - end; - end - else - begin - ANextDotPoint := ARect.Right - (ABetweenPoints * 2); - for I := ARect.Right - (ABetweenPoints * 2) downto ARect.Left do - if (I = ANextDotPoint) and (I >= ARect.Left) then - begin - if AClicked = False then - PaintOuterDot(I, ARect.Top + AIndent) - else - PaintInnerDot(I, ARect.Top + AIndent); - Dec(ANextDotPoint, ABetweenPoints + 2); - end; - end; - end; -end; - -procedure DrawHotZoneArrow(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean; const ArrowColor, ArrowHighlightColor: TColor; - const ASplitterDirection: TcxSplitterDirection); -var - I, ADelta, ACenter, ARectSize: Integer; - ALocalArrowColor: TColor; -begin - if (AHighlighted = False) or (AClicked = True) then - ALocalArrowColor := ArrowColor - else - ALocalArrowColor := ArrowHighlightColor; - if (ASplitterDirection = cxsdLeftToRight) or (ASplitterDirection = cxsdRightToLeft) then - begin - ARectSize := ARect.Bottom - ARect.Top; - if (ARectSize mod 2) <> 0 then Dec(ARectSize, 1); - ACenter := (ARectSize div 2) + 1; - end - else - begin - ARectSize := ARect.Right - ARect.Left; - if (ARectSize mod 2) <> 0 then Dec(ARectSize, 1); - ACenter := (ARectSize div 2) + 1; - end; - case ASplitterDirection of - cxsdLeftToRight: - begin - for I := 0 to 3 do - begin - if I = 3 then - ADelta := 1 - else - ADelta := 0; - DrawCanvasLine(ACanvas.Canvas, ALocalArrowColor, Point(ARect.Left + 4 - I + ADelta, - ARect.Top + ACenter - I), Point(ARect.Left + 6 - I, ARect.Top + ACenter - I)); - DrawCanvasLine(ACanvas.Canvas, ALocalArrowColor, Point(ARect.Left + 4 - I + ADelta, - ARect.Top + ACenter + I), Point(ARect.Left + 6 - I, ARect.Top + ACenter + I)); - end; - end; - cxsdRightToLeft: - begin - for I := 0 to 3 do - begin - if I = 3 then - ADelta := -1 - else - ADelta := 0; - DrawCanvasLine(ACanvas.Canvas, ALocalArrowColor, Point(ARect.Left + 2 + I, - ARect.Top + ACenter - I), Point(ARect.Left + 4 + I + ADelta, ARect.Top + ACenter - I)); - DrawCanvasLine(ACanvas.Canvas, ALocalArrowColor, Point(ARect.Left + 2 + I, - ARect.Top + ACenter + I), Point(ARect.Left + 4 + I + ADelta, ARect.Top + ACenter + I)); - end; - end; - cxsdTopToBottom: - begin - for I := 0 to 3 do - begin - if I = 3 then - ADelta := 1 - else - ADelta := 0; - DrawCanvasLine(ACanvas.Canvas, ALocalArrowColor, Point(ARect.Left + ACenter - I, - ARect.Top + 4 - I + ADelta), Point(ARect.Left + ACenter - I, ARect.Top + 6 - I)); - DrawCanvasLine(ACanvas.Canvas, ALocalArrowColor, Point(ARect.Left + ACenter + I, - ARect.Top + 4 - I + ADelta), Point(ARect.Left + ACenter + I, ARect.Top + 6 - I)); - end; - end; - cxsdBottomToTop: - begin - for I := 0 to 3 do - begin - if I = 3 then - ADelta := -1 - else - ADelta := 0; - DrawCanvasLine(ACanvas.Canvas, ALocalArrowColor, Point(ARect.Left + ACenter - I, - ARect.Top + 2 + I), Point(ARect.Left + ACenter - I, ARect.Top + 4 + I + ADelta)); - DrawCanvasLine(ACanvas.Canvas, ALocalArrowColor, Point(ARect.Left + ACenter + I, - ARect.Top + 2 + I), Point(ARect.Left + ACenter + I, ARect.Top + 4 + I + ADelta)); - end; - end; - end; -end; - -{ TcxHotZoneStyle } -constructor TcxHotZoneStyle.Create(AOwner: TcxCustomSplitter); -begin - inherited Create; - FOwner := AOwner; - FSizePercent := 30; - FVisible := True; -end; - -destructor TcxHotZoneStyle.Destroy; -begin - FOwner := nil; - inherited; -end; - -procedure TcxHotZoneStyle.Assign(Source: TPersistent); -begin - if (Source is TcxHotZoneStyle) then - begin - with (Source as TcxHotZoneStyle) do - begin - Self.SizePercent := SizePercent; - Self.Visible := Visible; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxHotZoneStyle.Changed; -begin - if Assigned(FOwner) then FOwner.HotZoneStyleChanged; -end; - -function TcxHotZoneStyle.SplitterDirection: TcxSplitterDirection; -begin - if Assigned(FOwner) then - Result := FOwner.CalculateSplitterDirection - else - Result := Low(TcxSplitterDirection); -end; - -procedure TcxHotZoneStyle.SetSizePercent(Value: TcxNaturalNumber); -begin - if FSizePercent <> Value then - begin - FSizePercent := Value; - Changed; - end; -end; - -procedure TcxHotZoneStyle.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - FVisible := Value; - Changed; - end; -end; - -function TcxHotZoneStyle.DrawHotZone(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean): TRect; -begin - { Dummy } -end; - -procedure TcxHotZoneStyle.DrawBackground(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); -begin - { Dummy } -end; - -function TcxHotZoneStyle.GetMinSize: TcxNaturalNumber; -begin - Result := SplitterDefaultSize; -end; - -function TcxHotZoneStyle.GetMaxSize: TcxNaturalNumber; -begin - Result := SplitterDefaultSize; -end; - -function TcxHotZoneStyle.CalculateHotZoneRect(const ABounds: TRect): TRect; -var - ARect : TRect; - AHotZoneRectSize, APos: Integer; -begin - ARect := ABounds; - if (SplitterDirection = cxsdLeftToRight) or (SplitterDirection = cxsdRightToLeft) then - begin - ARect.Right := ARect.Left + SplitterDefaultSize - 1; - AHotZoneRectSize := ((ARect.Bottom - ARect.Top) * SizePercent) div 100; - APos := ((ARect.Bottom - ARect.Top) div 2) - (AHotZoneRectSize div 2); - Result := Rect(ARect.Left, APos, ARect.Right, APos + AHotZoneRectSize); - end - else - begin - ARect.Bottom := ARect.Top + SplitterDefaultSize - 1; - AHotZoneRectSize := ((ARect.Right - ARect.Left) * SizePercent) div 100; - APos := ((ARect.Right - ARect.Left) div 2) - (AHotZoneRectSize div 2); - Result := Rect(APos, ARect.Top, APos + AHotZoneRectSize, ARect.Bottom); - end; - HotZoneRect := Result; -end; -{ TcxHotZoneStyle } - -{ TcxMediaPlayer9Style } -constructor TcxMediaPlayer9Style.Create(AOwner: TcxCustomSplitter); -begin - inherited Create(AOwner); - FArrowColor := clWindowText; - FArrowHighlightColor := clBlue; - FLightColor := clWindow; - FBorderColor := clBtnShadow; - FShadowStartColor := $00F5E6CD; - FShadowHighlightStartColor := $00AFF5C3; -end; - -procedure TcxMediaPlayer9Style.Assign(Source: TPersistent); -begin - if (Source is TcxMediaPlayer9Style) then - begin - inherited Assign(Source); - with (Source as TcxMediaPlayer9Style) do - begin - Self.ArrowColor := ArrowColor; - Self.ArrowHighlightColor := ArrowHighlightColor; - Self.LightColor := LightColor; - Self.BorderColor := BorderColor; - Self.ShadowStartColor := ShadowStartColor; - Self.ShadowHighlightStartColor := ShadowHighlightStartColor; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxMediaPlayer9Style.SetArrowColor(Value: TColor); -begin - if FArrowColor <> Value then - begin - FArrowColor := Value; - Changed; - end; -end; - -procedure TcxMediaPlayer9Style.SetArrowHighlightColor(Value: TColor); -begin - if FArrowHighlightColor <> Value then - begin - FArrowHighlightColor := Value; - Changed; - end; -end; - -procedure TcxMediaPlayer9Style.SetLightColor(Value: TColor); -begin - if FLightColor <> Value then - begin - FLightColor := Value; - Changed; - end; -end; - -procedure TcxMediaPlayer9Style.SetBorderColor(Value: TColor); -begin - if FBorderColor <> Value then - begin - FBorderColor := Value; - Changed; - end; -end; - -procedure TcxMediaPlayer9Style.SetShadowStartColor(Value: TColor); -begin - if FShadowStartColor <> Value then - begin - FShadowStartColor := Value; - Changed; - end; -end; - -procedure TcxMediaPlayer9Style.SetShadowHighlightStartColor(Value: TColor); -begin - if FShadowHighlightStartColor <> Value then - begin - FShadowHighlightStartColor := Value; - Changed; - end; -end; - -function TcxMediaPlayer9Style.DrawHotZone(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean): TRect; -begin - Result := CalculateHotZoneRect(ARect); - ACanvas.Canvas.Lock; - try - ACanvas.Canvas.Brush.Color := Owner.Color; - DrawBackground(ACanvas, HotZoneRect, AHighlighted, AClicked); - DrawHotZoneArrow(ACanvas, FArrowRect, AHighlighted, AClicked, FArrowColor, - FArrowHighlightColor, SplitterDirection); - finally - ACanvas.Canvas.Unlock; - end; -end; - -function TcxMediaPlayer9Style.CalculateHotZoneRect(const ABounds: TRect): TRect; -begin - Result := inherited CalculateHotZoneRect(ABounds); - if (SplitterDirection = cxsdLeftToRight) or (SplitterDirection = cxsdRightToLeft) then - FArrowRect := Rect(Result.Left, Result.Top + (RectHeight(Result) div 2) - 7, - Result.Left + SplitterDefaultSize - 1, - Result.Top + (RectHeight(Result) div 2) + 7) - else - FArrowRect := Rect(Result.Left + (RectWidth(Result) div 2) - 7, - Result.Top, Result.Left + (RectWidth(Result) div 2) + 7, - Result.Top + SplitterDefaultSize - 1); - HotZoneRect := Result; -end; - -procedure TcxMediaPlayer9Style.DrawBackground(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); -var - FRect: TRect; - FXDelta, FYDelta, FShadowStepDelta, FShadowStep: Integer; - FLocalShadowColor: TColor; -begin - FRect := ARect; - case SplitterDirection of - cxsdLeftToRight, cxsdRightToLeft: InflateRectEx(FRect, 0, 1, 0, -1); - cxsdTopToBottom, cxsdBottomToTop: InflateRectEx(FRect, 1, 0, -1, 0); - end; - ACanvas.Pen.Color := BorderColor; - ACanvas.Brush.Color := LightColor; - ACanvas.FillRect(FRect); - DrawBounds(ACanvas, FRect, BorderColor, BorderColor); - if AHighlighted = False then - FLocalShadowColor := ShadowStartColor - else - FLocalShadowColor := ShadowHighlightStartColor; - if not AClicked then - begin - FXDelta := 4; - FYDelta := 2; - FShadowStep := 0; - FShadowStepDelta := -30; - end - else - begin - FXDelta := 1; - FYDelta := 0; - FShadowStep := -60; - FShadowStepDelta := 30; - end; - case SplitterDirection of - cxsdLeftToRight, cxsdRightToLeft: - begin - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Top + 1), - Point(ARect.Right - 1, ARect.Top + 1)); - DrawCanvasLine(ACanvas.Canvas, BorderColor, Point(ARect.Left + 1, ARect.Top), - Point(ARect.Right, ARect.Top)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Bottom - 1), - Point(ARect.Right - 1, ARect.Bottom - 1)); - DrawCanvasLine(ACanvas.Canvas, BorderColor, Point(ARect.Left + 1, ARect.Bottom), - Point(ARect.Right, ARect.Bottom)); - DrawCanvasLine(ACanvas.Canvas, IncColor(FLocalShadowColor, FShadowStep, FShadowStep, FShadowStep), - Point(ARect.Left + FXDelta, ARect.Top + FYDelta), Point(ARect.Left + FXDelta, - ARect.Bottom + FYDelta - 2)); - Inc(FShadowStep, FShadowStepDelta); - DrawCanvasLine(ACanvas.Canvas, IncColor(FLocalShadowColor, FShadowStep, FShadowStep, FShadowStep), - Point(ARect.Left + FXDelta + 1, ARect.Top + FYDelta + 1), - Point(ARect.Left + FXDelta + 1, ARect.Bottom + FYDelta - 2)); - Inc(FShadowStep, FShadowStepDelta); - DrawCanvasLine(ACanvas.Canvas, IncColor(FLocalShadowColor, FShadowStep, FShadowStep, FShadowStep), - Point(ARect.Left + FXDelta + 2, ARect.Top + FYDelta + 1), - Point(ARect.Left + FXDelta + 2, ARect.Bottom + FYDelta - 3)); - end; - cxsdTopToBottom, cxsdBottomToTop: - begin - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 1, ARect.Top + 2), - Point(ARect.Left + 1, ARect.Bottom - 1)); - DrawCanvasLine(ACanvas.Canvas, BorderColor, Point(ARect.Left, ARect.Top + 1), - Point(ARect.Left, ARect.Bottom)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Right - 1, ARect.Top + 2), - Point(ARect.Right - 1, ARect.Bottom - 1)); - DrawCanvasLine(ACanvas.Canvas, BorderColor, Point(ARect.Right, ARect.Top + 1), - Point(ARect.Right, ARect.Bottom)); - DrawCanvasLine(ACanvas.Canvas, IncColor(FLocalShadowColor, FShadowStep, FShadowStep, FShadowStep), - Point(ARect.Left + FYDelta, ARect.Top + FXDelta), - Point(ARect.Right + FYDelta - 2, ARect.Top + FXDelta)); - Inc(FShadowStep, FShadowStepDelta); - DrawCanvasLine(ACanvas.Canvas, IncColor(FLocalShadowColor, FShadowStep, FShadowStep, FShadowStep), - Point(ARect.Left + FYDelta + 1, ARect.Top + FXDelta + 1), - Point(ARect.Right + FYDelta - 2, ARect.Top + FXDelta + 1)); - Inc(FShadowStep, FShadowStepDelta); - DrawCanvasLine(ACanvas.Canvas, IncColor(FLocalShadowColor, FShadowStep, FShadowStep, FShadowStep), - Point(ARect.Left + FYDelta + 1, ARect.Top + FXDelta + 2), - Point(ARect.Right + FYDelta - 3, ARect.Top + FXDelta + 2)); - end; - end; - ACanvas.Pen.Color := FOwner.Color; - ACanvas.Brush.Color := FOwner.Color; -end; -{ TcxMediaPlayer9Style } - -{ TcxMediaPlayer8Style } -constructor TcxMediaPlayer8Style.Create(AOwner: TcxCustomSplitter); -begin - inherited Create(AOwner); - FArrowColor := clWindowText; - FArrowHighlightColor := clWindow; - FLightColor := clWindow; - FShadowColor := clBtnShadow; -end; - -procedure TcxMediaPlayer8Style.Assign(Source: TPersistent); -begin - if (Source is TcxMediaPlayer8Style) then - begin - inherited Assign(Source); - with (Source as TcxMediaPlayer8Style) do - begin - Self.ShadowColor := ShadowColor; - Self.LightColor := LightColor; - Self.ArrowColor := ArrowColor; - Self.ArrowHighlightColor := ArrowHighlightColor; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxMediaPlayer8Style.SetShadowColor(Value: TColor); -begin - if FShadowColor <> Value then - begin - FShadowColor := Value; - Changed; - end; -end; - -procedure TcxMediaPlayer8Style.SetLightColor(Value: TColor); -begin - if FLightColor <> Value then - begin - FLightColor := Value; - Changed; - end; -end; - -procedure TcxMediaPlayer8Style.SetArrowColor(Value: TColor); -begin - if FArrowColor <> Value then - begin - FArrowColor := Value; - Changed; - end; -end; - -procedure TcxMediaPlayer8Style.SetArrowHighlightColor(Value: TColor); -begin - if FArrowHighlightColor <> Value then - begin - FArrowHighlightColor := Value; - Changed; - end; -end; - -function TcxMediaPlayer8Style.DrawHotZone(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean): TRect; -begin - Result := CalculateHotZoneRect(ARect); - ACanvas.Canvas.Lock; - try - ACanvas.Canvas.Brush.Color := Owner.Color; - DrawBackground(ACanvas, HotZoneRect, AHighlighted, AClicked); - DrawSplitterDots(ACanvas, FLTPointsRect, AClicked, False, FLightColor, - FShadowColor, SplitterDirection, 3, 3); - DrawSplitterDots(ACanvas, FRBPointsRect, AClicked, True, FLightColor, - FShadowColor, SplitterDirection, 3, 3); - DrawArrowRect(ACanvas, FArrowRect, AHighlighted, AClicked); - DrawHotZoneArrow(ACanvas, FArrowRect, AHighlighted, AClicked, FArrowColor, - FArrowHighlightColor, SplitterDirection); - finally - ACanvas.Canvas.Unlock; - end; -end; - -function TcxMediaPlayer8Style.CalculateHotZoneRect(const ABounds: TRect): TRect; -var - FRect : TRect; - FHotZoneRectSize, FPos: Integer; - FHotZonePointsRectHeight, FHotZoneRoundRectHeight: Integer; -begin - FRect := ABounds; - if (SplitterDirection = cxsdLeftToRight) or (SplitterDirection = cxsdRightToLeft) then - begin - FRect.Right := FRect.Left + SplitterDefaultSize - 1; - FHotZoneRectSize := ((FRect.Bottom - FRect.Top) * SizePercent) div 100; - FPos := ((FRect.Bottom - FRect.Top) div 2) - (FHotZoneRectSize div 2); - HotZoneRect := Rect(FRect.Left, FPos, FRect.Right, FPos + FHotZoneRectSize); - end - else - begin - FRect.Bottom := FRect.Top + SplitterDefaultSize - 1; - FHotZoneRectSize := ((FRect.Right - FRect.Left) * SizePercent) div 100; - FPos := ((FRect.Right - FRect.Left) div 2) - (FHotZoneRectSize div 2); - HotZoneRect := Rect(FPos, FRect.Top, FPos + FHotZoneRectSize, FRect.Bottom); - end; - - FHotZoneRoundRectHeight := 4; - FHotZonePointsRectHeight := (FHotZoneRectSize - (FHotZoneRoundRectHeight * 2) - 19) div 2; - if (SplitterDirection = cxsdLeftToRight) or (SplitterDirection = cxsdRightToLeft) then - begin - FLTPointsRect := Rect(HotZoneRect.Left, HotZoneRect.Top + FHotZoneRoundRectHeight, - HotZoneRect.Left + HotZoneRect.Right - HotZoneRect.Left, - HotZoneRect.Top + FHotZoneRoundRectHeight + FHotZonePointsRectHeight); - FRBPointsRect := Rect(HotZoneRect.Left, HotZoneRect.Bottom - FHotZoneRoundRectHeight - FHotZonePointsRectHeight, - HotZoneRect.Left + HotZoneRect.Right - HotZoneRect.Left, - HotZoneRect.Bottom - FHotZoneRoundRectHeight - FHotZonePointsRectHeight + FHotZonePointsRectHeight); - FArrowRect := Rect(HotZoneRect.Left, HotZoneRect.Top + FHotZonePointsRectHeight + FHotZoneRoundRectHeight, - HotZoneRect.Left + SplitterDefaultSize - 1, - HotZoneRect.Top + FHotZonePointsRectHeight + FHotZoneRoundRectHeight + 19); - end - else - begin - FLTPointsRect := Rect(HotZoneRect.Left + FHotZoneRoundRectHeight, - HotZoneRect.Top, HotZoneRect.Left + FHotZoneRoundRectHeight + FHotZonePointsRectHeight, - HotZoneRect.Bottom); - FRBPointsRect := Rect(HotZoneRect.Right - FHotZoneRoundRectHeight - FHotZonePointsRectHeight, - HotZoneRect.Top, HotZoneRect.Right - FHotZoneRoundRectHeight - FHotZonePointsRectHeight + FHotZonePointsRectHeight, - HotZoneRect.Bottom); - FArrowRect := Rect(HotZoneRect.Left + FHotZonePointsRectHeight + FHotZoneRoundRectHeight, - HotZoneRect.Top, HotZoneRect.Left + FHotZonePointsRectHeight + FHotZoneRoundRectHeight + 19, - HotZoneRect.Top + SplitterDefaultSize - 1); - end; - Result := HotZoneRect; -end; - -procedure TcxMediaPlayer8Style.DrawBackground(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); -begin - ACanvas.Pen.Color := FOwner.Color; - ACanvas.Brush.Color := FOwner.Color; - ACanvas.FillRect(ARect); - case SplitterDirection of - cxsdLeftToRight: - begin - {Shadow border} - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left, ARect.Bottom - 4), - Point(ARect.Left, ARect.Top + 3)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right, ARect.Bottom), - Point(ARect.Right, ARect.Top)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 1, ARect.Bottom - 2), - Point(ARect.Left + 1, ARect.Bottom - 4)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 1, ARect.Top + 2), - Point(ARect.Left + 1, ARect.Top + 4)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 2, ARect.Bottom - 1), - Point(ARect.Left + 4, ARect.Bottom - 1)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 2, ARect.Top + 1), - Point(ARect.Left + 4, ARect.Top + 1)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 4, ARect.Bottom), - Point(ARect.Right, ARect.Bottom)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 4, ARect.Top), - Point(ARect.Right + 1, ARect.Top)); - {Light border} - if AClicked = False then - begin - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 1, ARect.Bottom - 4), - Point(ARect.Left + 1, ARect.Top + 3)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Top + 2), - Point(ARect.Left + 2, ARect.Top + 4)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Top + 2), - Point(ARect.Left + 4, ARect.Top + 2)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 4, ARect.Top + 1), - Point(ARect.Right, ARect.Top + 1)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Bottom - 2), - Point(ARect.Left + 2, ARect.Bottom - 4)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Bottom - 2), - Point(ARect.Left + 4, ARect.Bottom - 2)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 4, ARect.Bottom - 1), - Point(ARect.Left + 5, ARect.Bottom - 1)); - end - else - begin - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Right - 1, ARect.Bottom - 1), - Point(ARect.Right - 1, ARect.Top + 1)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Bottom - 2), - Point(ARect.Left + 4, ARect.Bottom - 2)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 4, ARect.Bottom - 1), - Point(ARect.Left + 7, ARect.Bottom - 1)); - end; - end; - cxsdRightToLeft: - begin - {Shadow border} - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right, ARect.Bottom - 4), - Point(ARect.Right, ARect.Top + 3)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left, ARect.Bottom), - Point(ARect.Left, ARect.Top)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right - 1, ARect.Bottom - 2), - Point(ARect.Right - 1, ARect.Bottom - 4)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right - 1, ARect.Top + 2), - Point(ARect.Right - 1, ARect.Top + 4)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right - 2, ARect.Bottom - 1), - Point(ARect.Right - 4, ARect.Bottom - 1)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right - 2, ARect.Top + 1), - Point(ARect.Right - 4, ARect.Top + 1)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right - 4, ARect.Bottom), - Point(ARect.Left, ARect.Bottom)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right - 3, ARect.Top), - Point(ARect.Left - 1, ARect.Top)); - {Light border} - if AClicked = False then - begin - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 1, ARect.Bottom - 1), - Point(ARect.Left + 1, ARect.Top + 1)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 1, ARect.Top + 1), - Point(ARect.Left + 4, ARect.Top + 1)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 4, ARect.Top + 2), - Point(ARect.Left + 6, ARect.Top + 2)); - end - else - begin - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 3, ARect.Top + 1), - Point(ARect.Left + 4, ARect.Top + 1)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 4, ARect.Top + 2), - Point(ARect.Left + 6, ARect.Top + 2)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 5, ARect.Top + 2), - Point(ARect.Left + 5, ARect.Top + 4)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 6, ARect.Top + 4), - Point(ARect.Left + 6, ARect.Bottom - 3)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 1, ARect.Bottom - 1), - Point(ARect.Left + 4, ARect.Bottom - 1)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 4, ARect.Bottom - 2), - Point(ARect.Left + 6, ARect.Bottom - 2)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 5, ARect.Bottom - 2), - Point(ARect.Left + 5, ARect.Bottom - 4)); - end; - end; - cxsdTopToBottom: - begin - {Shadow border} - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 4, ARect.Top), - Point(ARect.Right - 3, ARect.Top)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left, ARect.Bottom), - Point(ARect.Right, ARect.Bottom)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 2, ARect.Top + 1), - Point(ARect.Left + 4, ARect.Top + 1)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right - 2, ARect.Top + 1), - Point(ARect.Right - 4, ARect.Top + 1 )); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 1, ARect.Top + 2), - Point(ARect.Left + 1, ARect.Top + 4)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right - 1, ARect.Top + 2), - Point(ARect.Right - 1,ARect.Top + 4)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left, ARect.Top + 4), - Point(ARect.Left, ARect.Bottom)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right, ARect.Top + 4), - Point(ARect.Right, ARect.Bottom + 1)); - {Light border} - if AClicked = False then - begin - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 4, ARect.Top + 1), - Point(ARect.Right - 3, ARect.Top + 1)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Right - 2, ARect.Top + 2), - Point(ARect.Right - 4, ARect.Top + 2)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Right - 2, ARect.Top + 2), - Point(ARect.Right - 2, ARect.Top + 4)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Right - 1, ARect.Top + 4), - Point(ARect.Right - 1, ARect.Bottom)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Top + 2), - Point(ARect.Left + 4, ARect.Top + 2)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Top + 2), - Point(ARect.Left + 2, ARect.Top + 4)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 1, ARect.Top + 4), - Point(ARect.Left + 1, ARect.Top + 5)); - end - else - begin - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 1, ARect.Bottom - 1), - Point(ARect.Right - 1, ARect.Bottom - 1)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Top + 2), - Point(ARect.Left + 2, ARect.Top + 4)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 1, ARect.Top + 4), - Point(ARect.Left + 1, ARect.Top + 7)); - end; - end; - cxsdBottomToTop: - begin - {Shadow border} - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 4, ARect.Bottom), - Point(ARect.Right - 3, ARect.Bottom)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left, ARect.Top), - Point(ARect.Right, ARect.Top)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 2, ARect.Bottom - 1), - Point(ARect.Left + 4, ARect.Bottom - 1)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right - 2, ARect.Bottom - 1), - Point(ARect.Right - 4, ARect.Bottom - 1 )); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left + 1, ARect.Bottom - 2), - Point(ARect.Left + 1, ARect.Bottom - 4)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right - 1, ARect.Bottom - 2), - Point(ARect.Right - 1,ARect.Bottom - 4)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Left, ARect.Bottom - 4), - Point(ARect.Left, ARect.Top)); - DrawCanvasLine(ACanvas.Canvas, ShadowColor, Point(ARect.Right, ARect.Bottom - 3), - Point(ARect.Right, ARect.Top - 1)); - {Light border} - if AClicked = False then - begin - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 1, ARect.Top + 1), - Point(ARect.Right - 1, ARect.Top + 1)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Bottom - 2), - Point(ARect.Left + 2, ARect.Bottom - 4)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 1, ARect.Bottom - 4), - Point(ARect.Left + 1, ARect.Bottom - 7)); - end - else - begin - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 4, ARect.Bottom - 1), - Point(ARect.Right - 3, ARect.Bottom - 1)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Right - 2, ARect.Bottom - 2), - Point(ARect.Right - 4, ARect.Bottom - 2)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Right - 2, ARect.Bottom - 2), - Point(ARect.Right - 2, ARect.Bottom - 4)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Right - 1, ARect.Bottom - 4), - Point(ARect.Right - 1, ARect.Top)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Bottom - 2), - Point(ARect.Left + 4, ARect.Bottom - 2)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 2, ARect.Bottom - 2), - Point(ARect.Left + 2, ARect.Bottom - 4)); - DrawCanvasLine(ACanvas.Canvas, LightColor, Point(ARect.Left + 1, ARect.Bottom - 4), - Point(ARect.Left + 1, ARect.Bottom - 5)); - end; - end; - end; -end; - -procedure TcxMediaPlayer8Style.DrawArrowRect(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); -begin - ACanvas.Brush.Color := FOwner.Color; - ACanvas.FillRect(ARect); - if AClicked = False then - DrawBounds(ACanvas, ARect, FShadowColor, FLightColor) - else - DrawBounds(ACanvas, ARect, FLightColor, FShadowColor); -end; -{ TcxMediaPlayer8Style } - -{ TcxXPTaskBarStyle } -constructor TcxXPTaskBarStyle.Create(AOwner: TcxCustomSplitter); -begin - inherited Create(AOwner); - FLightColor := clWindow; - FShadowColor := clBtnShadow; -end; - -procedure TcxXPTaskBarStyle.Assign(Source: TPersistent); -begin - if (Source is TcxXPTaskBarStyle) then - begin - inherited Assign(Source); - with (Source as TcxXPTaskBarStyle) do - begin - Self.LightColor := LightColor; - Self.ShadowColor := ShadowColor; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxXPTaskBarStyle.SetLightColor(Value: TColor); -begin - if FLightColor <> Value then - begin - FLightColor := Value; - Changed; - end; -end; - -procedure TcxXPTaskBarStyle.SetShadowColor(Value: TColor); -begin - if FShadowColor <> Value then - begin - FShadowColor := Value; - Changed; - end; -end; - -function TcxXPTaskBarStyle.DrawHotZone(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean): TRect; -begin - Result := CalculateHotZoneRect(ARect); - ACanvas.Canvas.Lock; - try - ACanvas.Canvas.Brush.Color := Owner.Color; - DrawBackground(ACanvas, HotZoneRect, AHighlighted, AClicked); - DrawSplitterDots(ACanvas, FLTPointsRect, not AClicked, True, FLightColor, - FShadowColor, SplitterDirection, 4, 0); - DrawSplitterDots(ACanvas, FRBPointsRect, not AClicked, True, FLightColor, - FShadowColor, SplitterDirection, 4, 0); - finally - ACanvas.Canvas.Unlock; - end; -end; - -function TcxXPTaskBarStyle.CalculateHotZoneRect(const ABounds: TRect): TRect; -var - FRect : TRect; - FHotZoneRectSize, FPos: Integer; -begin - Result := inherited CalculateHotZoneRect(ABounds); - - FRect := ABounds; - case SplitterDirection of - cxsdLeftToRight, cxsdRightToLeft: - begin - FRect.Right := FRect.Left + SplitterDefaultSize - 1; - FHotZoneRectSize := ((FRect.Bottom - FRect.Top) * SizePercent) div 100; - FPos := ((FRect.Bottom - FRect.Top) div 2) - (FHotZoneRectSize div 2); - Result := Rect(FRect.Left, FPos, FRect.Right, FPos + FHotZoneRectSize); - FLTPointsRect := Rect(Result.Left + 1, Result.Top, - (Result.Right div 2), Result.Bottom); - FRBPointsRect := Rect((Result.Right div 2) + 1, Result.Top + 3, - Result.Right, Result.Bottom); - end; - else - begin - FRect.Bottom := FRect.Top + SplitterDefaultSize - 1; - FHotZoneRectSize := ((FRect.Right - FRect.Left) * SizePercent) div 100; - FPos := ((FRect.Right - FRect.Left) div 2) - (FHotZoneRectSize div 2); - Result := Rect(FPos, FRect.Top, FPos + FHotZoneRectSize, FRect.Bottom); - FLTPointsRect := Rect(Result.Left, Result.Top + 1, - Result.Right, Result.Bottom div 2); - FRBPointsRect := Rect(Result.Left + 3, (Result.Bottom div 2) + 1, - Result.Right, Result.Bottom); - end; - end; - HotZoneRect := Result; -end; - -procedure TcxXPTaskBarStyle.DrawBackground(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); -begin - if AreVisualStylesAvailable and Owner.NativeBackground then - cxDrawThemeParentBackground(Owner, ACanvas, ARect) - else - begin - ACanvas.Brush.Color := Owner.Color; - ACanvas.FillRect(ARect); - end; -end; -{ TcxXPTaskBarStyle } - -{ TcxSimpleStyle } -constructor TcxSimpleStyle.Create(AOwner: TcxCustomSplitter); -begin - inherited Create(AOwner); - FLightColor := clWindow; - FShadowColor := clBtnShadow; - FArrowColor := clWindowText; - FArrowHighlightColor := clWindow; - FDotsColor := clHighlight; - FDotsShadowColor := clWindow; -end; - -procedure TcxSimpleStyle.Assign(Source: TPersistent); -begin - if (Source is TcxSimpleStyle) then - begin - inherited Assign(Source); - with (Source as TcxSimpleStyle) do - begin - Self.LightColor := LightColor; - Self.ShadowColor := ShadowColor; - Self.ArrowColor := ArrowColor; - Self.ArrowHighlightColor := ArrowHighlightColor; - Self.DotsColor := DotsColor; - Self.DotsShadowColor := DotsShadowColor; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxSimpleStyle.SetLightColor(Value: TColor); -begin - if FLightColor <> Value then - begin - FLightColor := Value; - Changed; - end; -end; - -procedure TcxSimpleStyle.SetShadowColor(Value: TColor); -begin - if FShadowColor <> Value then - begin - FShadowColor := Value; - Changed; - end; -end; - -procedure TcxSimpleStyle.SetArrowColor(Value: TColor); -begin - if FArrowColor <> Value then - begin - FArrowColor := Value; - Changed; - end; -end; - -procedure TcxSimpleStyle.SetArrowHighlightColor(Value: TColor); -begin - if FArrowHighlightColor <> Value then - begin - FArrowHighlightColor := Value; - Changed; - end; -end; - -procedure TcxSimpleStyle.SetDotsColor(Value: TColor); -begin - if FDotsColor <> Value then - begin - FDotsColor := Value; - Changed; - end; -end; - -procedure TcxSimpleStyle.SetDotsShadowColor(Value: TColor); -begin - if FDotsShadowColor <> Value then - begin - FDotsShadowColor := Value; - Changed; - end; -end; - -function TcxSimpleStyle.DrawHotZone(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean): TRect; -begin - Result := CalculateHotZoneRect(ARect); - ACanvas.Canvas.Lock; - try - ACanvas.Canvas.Brush.Color := Owner.Color; - DrawBackground(ACanvas, HotZoneRect, AHighlighted, AClicked); - DrawHotZoneArrow(ACanvas, FLTArrowRect, AHighlighted, AClicked, FArrowColor, - FArrowHighlightColor, SplitterDirection); - DrawHotZoneArrow(ACanvas, FRBArrowRect, AHighlighted, AClicked, FArrowColor, - FArrowHighlightColor, SplitterDirection); - finally - ACanvas.Canvas.Unlock; - end; -end; - -function TcxSimpleStyle.CalculateHotZoneRect(const ABounds: TRect): TRect; -begin - Result := inherited CalculateHotZoneRect(ABounds); - case SplitterDirection of - cxsdLeftToRight, cxsdRightToLeft: - begin - FLTArrowRect := Rect(Result.Left, Result.Top + 5, Result.Right, Result.Top + 12); - FRBArrowRect := Rect(Result.Left, Result.Bottom - 12, Result.Right, Result.Bottom - 5); - end; - else - begin - FLTArrowRect := Rect(Result.Left + 5, Result.Top, Result.Left + 12, Result.Bottom); - FRBArrowRect := Rect(Result.Right - 12, Result.Top, Result.Right - 5, Result.Bottom); - end; - end; - HotZoneRect := Result; -end; - -procedure TcxSimpleStyle.DrawBackground(ACanvas: TcxCanvas; const ARect: TRect; - const AHighlighted, AClicked: Boolean); -var - MiddlePos, I_count : Integer; - FRect: TRect; -begin - with ACanvas, ARect do - begin - FRect := DrawBounds(ACanvas, HotZoneRect, ShadowColor, ShadowColor); - Brush.Color := Owner.Color; - FillRect(FRect); - {Draw Border} - if AClicked = False then - DrawBounds(ACanvas, FRect, LightColor, Owner.Color) - else - DrawBounds(ACanvas, FRect, Owner.Color, LightColor); - - Pen.Color := clHighlight; - Brush.Color := clHighlight; - if (SplitterDirection = cxsdTopToBottom) or (SplitterDirection = cxsdBottomToTop) then - begin - MiddlePos:=Top + (Bottom - Top) div 2; - for I_count := 0 to ((Right - Left - 32) div 3) do - begin - if AClicked = False then - begin - Pixels[Left + 15 + I_count * 3, MiddlePos] := DotsShadowColor; - Pixels[Left + 16 + I_count * 3, MiddlePos + 1] := DotsColor; - end - else - begin - Pixels[Left + 15 + I_count * 3, MiddlePos] := DotsColor; - Pixels[Left + 16 + I_count * 3, MiddlePos + 1] := DotsShadowColor; - end; - end; - end - else - begin - MiddlePos := Left + (Right - Left) div 2; - for I_count := 0 to ((Bottom - Top - 32) div 3) do - begin - if AClicked = False then - begin - Pixels[MiddlePos, Top + 15 + I_count * 3] := DotsShadowColor; - Pixels[MiddlePos + 1, Top + 16 + I_count * 3] := DotsColor; - end - else - begin - Pixels[MiddlePos, Top + 15 + I_count * 3] := DotsColor; - Pixels[MiddlePos + 1, Top + 16 + I_count * 3] := DotsShadowColor; - end; - end; - end; - end; -end; -{ TcxSimpleStyle } - -{TdxSplitterDragImage} - -procedure TdxSplitterDragImage.Paint; -begin - Canvas.Canvas.FillRect(ClientRect); -end; - -{ TcxCustomSplitter } -constructor TcxCustomSplitter.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ControlStyle := ControlStyle - [csSetCaption]; - FResizeUpdate := False; - FSplitterState := sstNormal; - FMouseStates := []; - FAllowHotZoneDrag := True; - FDragThreshold := 3; - FResizeIgnoreSnap := False; //deprecated - FAutoPosition := True; - FMinSize := 30; - FPositionAfterOpen := 30; - FNativeBackground := True; - FInvertDirection := False; - FNewSize := 30; - FOldSize := -1; - FPositionBeforeClose := FMinSize; - FHotZone := nil; - FHotZoneClickPoint := Point(-1, -1); - FLastPatternDrawPosition := -1; - FDrawBitmap := TBitmap.Create; - FDrawCanvas := TcxCanvas.Create(FDrawBitmap.Canvas); - BorderStyle := cxcbsNone; - Align := alNone; - SetBounds(0, 0, SplitterDefaultSize, 100 {must be >= 10}); - SetAlignSplitter(salLeft); - TabStop := False; -end; - -destructor TcxCustomSplitter.Destroy; -begin - FControl := nil; - DestroyHotZone; - if Assigned(FBrush) then FreeAndNil(FBrush); - if Assigned(FDrawCanvas) then FreeAndNil(FDrawCanvas); - if Assigned(FDrawBitmap) then FreeAndNil(FDrawBitmap); - inherited Destroy; -end; - -procedure TcxCustomSplitter.Loaded; -begin - inherited Loaded; - if FControl = nil then - FControl := FindControl; - SetAlignSplitter(FAlignSplitter); -end; - -procedure TcxCustomSplitter.Notification(AComponent: TComponent; Operation: Toperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (FControl <> nil) and - (AComponent = FControl) then - FControl := nil; -end; - -procedure TcxCustomSplitter.SetHotZoneStyleClass(const Value: TcxHotZoneStyleClass); -var - ASavedHotZone: TcxHotZoneStyle; -begin - if FHotZoneStyleClass <> Value then - begin - ASavedHotZone := nil; - try - if Assigned(FHotZone) then - begin - ASavedHotZone := TcxHotZoneStyle.Create(Self); - ASavedHotZone.Assign(FHotZone); - end; - DestroyHotZone; - FHotZoneStyleClass := Value; - CreateHotZone; - if Assigned(FHotZone) and Assigned(ASavedHotZone) then - FHotZone.Assign(ASavedHotZone); - finally - if Assigned(ASavedHotZone) then - FreeAndNil(ASavedHotZone); - end; - NormalizeSplitterSize; - end; -end; - -function TcxCustomSplitter.GetHotZoneClassName: string; -begin - if FHotZone = nil then - Result := '' - else - Result := FHotZone.ClassName; -end; - -procedure TcxCustomSplitter.SetHotZoneClassName(Value: string); -begin - HotZoneStyleClass := TcxHotZoneStyleClass(GetRegisteredHotZoneStyles.FindByClassName(Value)); -end; - -procedure TcxCustomSplitter.CreateHotZone; -begin - if FHotZoneStyleClass <> nil then - FHotZone := FHotZoneStyleClass.Create(Self); - Invalidate; -end; - -procedure TcxCustomSplitter.DestroyHotZone; -begin - if Assigned(FHotZone) then FreeAndNil(FHotZone); -end; - -procedure TcxCustomSplitter.SetHotZone(Value: TcxHotZoneStyle); -begin - FHotZone := Value; - NormalizeSplitterSize; - Invalidate; -end; - -procedure TcxCustomSplitter.SetNativeBackground(Value: Boolean); -begin - if FNativeBackground <> Value then - begin - FNativeBackground := Value; - Invalidate; - end; -end; - -procedure TcxCustomSplitter.SetDefaultStates; -begin - FMouseStates := []; - FSplitterState := sstNormal; -end; - -function TcxCustomSplitter.GetMaxControlSize: Integer; -begin - Result := 0; - if FControl = nil then - Exit; - case AlignSplitter of - salBottom, salTop: - Result := FControl.Constraints.MaxHeight; - salLeft, salRight: - Result := FControl.Constraints.MaxWidth; - end; -end; - -function TcxCustomSplitter.IsAllControlHotZoneStyle: Boolean; -begin - Result := LookAndFeel.SkinPainter <> nil; -end; - -function TcxCustomSplitter.GetDragImageTopLeft: TPoint; -begin - Result := Point(Left, Top); - if Align in [alLeft, alRight] then - Result.X := Left + FSplit + 1 - else - Result.Y := Top + FSplit + 1; - Result := Parent.ClientToScreen(Result); -end; - -procedure TcxCustomSplitter.InitDragImage; -begin - if not ResizeUpdate then - begin - FDragImage := TdxSplitterDragImage.Create; - FDragImage.Canvas.Brush.Bitmap := AllocPatternBitmap(clBlack, clWhite); - FDragImage.SetBounds(GetDragImageTopLeft.X, GetDragImageTopLeft.Y, - Width - 1, Height - 1); - FDragImage.Show; - end; -end; - -procedure TcxCustomSplitter.MoveDragImage; -begin - FDragImage.MoveTo(GetDragImageTopLeft); -end; - -procedure TcxCustomSplitter.ReleaseDragImage; -begin - FreeAndNil(FDragImage); -end; - -procedure TcxCustomSplitter.CMMouseLeave(var Message: TMessage); -begin - inherited; - if smsInHotZone in FMouseStates then - Invalidate; - Exclude(FMouseStates, smsInHotZone); -end; - -procedure TcxCustomSplitter.SetAlignSplitter(Value: TcxSplitterAlign); -begin - FAlignSplitter := Value; - if Assigned(FHotZone) then - NormalizeSplitterSize; - case FAlignSplitter of - salBottom: Align := alBottom; - salLeft: Align := alLeft; - salRight: Align := alRight; - salTop: Align := alTop; - end; -end; - -function TcxCustomSplitter.GetSplitterMinSize: TcxNaturalNumber; -var - AHorizontal: Boolean; -begin - if LookAndFeel.SkinPainter <> nil then - begin - AHorizontal := AlignSplitter in [salBottom, salTop]; - if AHorizontal then - Result := LookAndFeel.SkinPainter.GetSplitterSize(AHorizontal).cy - else - Result := LookAndFeel.SkinPainter.GetSplitterSize(AHorizontal).cx; - end - else - if Assigned(FHotZone) then - Result := FHotZone.GetMinSize - else - Result := SplitterDefaultSize; -end; - -function TcxCustomSplitter.GetSplitterMaxSize: TcxNaturalNumber; -var - AHorizontal: Boolean; -begin - if LookAndFeel.SkinPainter <> nil then - begin - AHorizontal := AlignSplitter in [salBottom, salTop]; - if AHorizontal then - Result := LookAndFeel.SkinPainter.GetSplitterSize(AHorizontal).cy - else - Result := LookAndFeel.SkinPainter.GetSplitterSize(AHorizontal).cx; - end - else - if Assigned(FHotZone) then - Result := FHotZone.GetMaxSize - else - Result := SplitterDefaultSize; -end; - -procedure TcxCustomSplitter.NormalizeSplitterSize; - - procedure AdjustSplitterSize; - begin - case FAlignSplitter of - salBottom, salTop: Height := GetSplitterMinSize; - salLeft, salRight: Width := GetSplitterMinSize; - end; - case FAlignSplitter of - salBottom, salTop:begin - Constraints.MinWidth := 0; - Constraints.MaxWidth := 0; - Constraints.MinHeight := GetSplitterMinSize; - Constraints.MaxHeight := GetSplitterMaxSize; - if (Height < Constraints.MinHeight) or (Height > Constraints.MaxHeight) then - Height := Constraints.MinHeight; - end; - salLeft, salRight:begin - Constraints.MinWidth := GetSplitterMinSize; - Constraints.MaxWidth := GetSplitterMaxSize; - Constraints.MinHeight := 0; - Constraints.MaxHeight := 0; - if (Width < Constraints.MinWidth) or (Width > Constraints.MaxWidth) then - Width := Constraints.MinWidth; - end; - end; - end; - -begin - if not Assigned(FHotZone) and (LookAndFeel.SkinPainter = nil) then - begin - Constraints.MinWidth := 0; - Constraints.MaxWidth := 0; - Constraints.MinHeight := 0; - Constraints.MaxHeight := 0; - end - else - AdjustSplitterSize; -end; - -function TcxCustomSplitter.CalculateSplitterDirection: TcxSplitterDirection; -begin - Result := Low(TcxSplitterDirection); - case FAlignSplitter of - salTop: - if ((State = ssOpened) and (not InvertDirection)) or - ((State = ssClosed) and (InvertDirection)) then - Result := cxsdBottomToTop - else - Result := cxsdTopToBottom; - salBottom: - if ((State = ssOpened) and (not InvertDirection)) or - ((State = ssClosed) and (InvertDirection)) then - Result := cxsdTopToBottom - else - Result := cxsdBottomToTop; - salLeft: - if ((State = ssOpened) and (not InvertDirection)) or - ((State = ssClosed) and (InvertDirection)) then - Result := cxsdRightToLeft - else - Result := cxsdLeftToRight; - salRight: - if ((State = ssOpened) and (not InvertDirection)) or - ((State = ssClosed) and (InvertDirection)) then - Result := cxsdLeftToRight - else - Result := cxsdRightToLeft; - end; -end; - -procedure TcxCustomSplitter.UpdateMouseStates(X, Y: Integer); -begin - if IsPointInHotZone(X, Y) then - Include(FMouseStates, smsInHotZone) - else - Exclude(FMouseStates, smsInHotZone); -end; - -procedure TcxCustomSplitter.SetSplitterState(Value: TcxSplitterState); -begin - if FState <> Value then - begin - if Assigned(FControl) then - begin - case Value of - ssOpened: InternalOpenSplitter; - ssClosed: InternalCloseSplitter; - end; - end - else - FState := Value; - end; -end; - -procedure TcxCustomSplitter.SetAllowHotZoneDrag(Value: Boolean); -begin - if FAllowHotZoneDrag <> Value then - begin - StopSizing; - FAllowHotZoneDrag := Value; - end; -end; - -procedure TcxCustomSplitter.SetInvertDirection(Value: Boolean); -begin - if FInvertDirection <> Value then - begin - FInvertDirection := Value; - StopSizing; - Invalidate; - end; -end; - -function TcxCustomSplitter.FindControl: TControl; -var - P: TPoint; - I_count: Integer; - R, FRReligned: TRect; -begin - Result := nil; - P := Point(Left, Top); - case Align of - alLeft: Dec(P.X); - alRight: Inc(P.X, Width); - alTop: Dec(P.Y); - alBottom: Inc(P.Y, Height); - else Exit; - end; - for I_count:=0 to Parent.ControlCount-1 do - begin - Result := Parent.Controls[I_count]; - if (Result.Visible) and (Result.Enabled) then - begin - R := Result.BoundsRect; - if (R.Right - R.Left) = 0 then - if (Align in [alTop, alLeft]) then - Dec(R.Left) - else - Inc(R.Right); - if (R.Bottom - R.Top) = 0 then - if (Align in [alTop, alLeft]) then - Dec(R.Top) - else - Inc(R.Bottom); - if PtInRect(R, P) = True then Exit - else - begin - if (Result.Align = Self.Align) then - begin - FRReligned := Result.BoundsRect; - case Result.Align of - alLeft: if (FRReligned.Right = FRReligned.Left) and - (FRReligned.Left = Self.Width) then Exit; - alRight: if (FRReligned.Right = FRReligned.Left) and - (FRReligned.Right = Self.Left) then Exit; - alTop: if (FRReligned.Bottom = FRReligned.Top) and - (FRReligned.Top = Self.Height) then Exit; - alBottom: if (FRReligned.Bottom = FRReligned.Top) and - (FRReligned.Bottom = Self.Top) then Exit; - end; - end; - end; - end; - end; - Result := nil; -end; - -procedure TcxCustomSplitter.HotZoneStyleChanged; -begin - Invalidate; -end; - -procedure TcxCustomSplitter.Paint; -var - R: TRect; -begin - R := ClientRect; - FDrawBitmap.Width := RectWidth(R); - FDrawBitmap.Height := RectHeight(R); - FDrawBitmap.Canvas.Brush.Color := Color; - if LookAndFeel.SkinPainter = nil then - begin - if AreVisualStylesAvailable and NativeBackground then - begin - cxDrawThemeParentBackground(Self, Canvas, R); - BitBlt(FDrawBitmap.Canvas.Handle, 0, 0, RectWidth(R), RectHeight(R), - Canvas.Handle, 0, 0, SRCCOPY); - end - else - FDrawBitmap.Canvas.FillRect(R); - if (HotZone <> nil) and HotZone.Visible then - DrawHotZone; - end else - begin - cxDrawTransparentControlBackground(Self, FDrawCanvas, R); - LookAndFeel.SkinPainter.DrawSplitter(FDrawCanvas, R, smsInHotZone in FMouseStates, - (smsClicked in FMouseStates) and (smsInHotZone in FMouseStates), - AlignSplitter in [salBottom, salTop]); - end; - BitBlt(Canvas.Handle, 0, 0, RectWidth(R), RectHeight(R), - FDrawBitmap.Canvas.Handle, 0, 0, SRCCOPY); -end; - -procedure TcxCustomSplitter.DrawHotZone; -begin - if HotZone <> nil then - HotZone.DrawHotZone(FDrawCanvas, FDrawCanvas.Canvas.ClipRect, - (smsInHotZone in FMouseStates), - (smsClicked in FMouseStates) and (smsInHotZone in FMouseStates)); -end; - -function TcxCustomSplitter.DoCanResize(var NewSize: Integer): Boolean; -begin - Result := CanResize(NewSize); - if Result and AutoSnap and (NewSize < InternalGetMinSize) then - NewSize := 0; -end; - -procedure TcxCustomSplitter.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited LookAndFeelChanged(Sender, AChangedValues); - NormalizeSplitterSize; - if [lfvSkinName, lfvNativeStyle] * AChangedValues <> [] then - Invalidate; -end; - -function TcxCustomSplitter.CanFocusOnClick: Boolean; -begin - Result := False; -end; - -function TcxCustomSplitter.CanResize(var NewSize: Integer): Boolean; -begin - Result := True; - if Assigned(FOnCanResize) then FOnCanResize(Self, NewSize, Result); -end; - -procedure TcxCustomSplitter.UpdateControlSize; - - procedure CorrectSelfPosition; - begin - if FOldSize <= 0 then - case Align of - alLeft: - Left := FControl.Left + FControl.Width; - alTop: - Top := FControl.Top + FControl.Height; - alRight: - Left := FControl.BoundsRect.Right - Width; - alBottom: - Top := FControl.BoundsRect.Bottom - Height; - end; - end; - -begin - if not Assigned(FControl) or (FNewSize = FOldSize) then - Exit; - Parent.DisableAlign; - try - case Align of - alLeft: - FControl.SetBounds(FControl.Left, FControl.Top, FNewSize, FControl.Height); - alTop: - FControl.SetBounds(FControl.Left, FControl.Top, FControl.Width, FNewSize); - alRight: - FControl.SetBounds(FControl.Left + FControl.Width - FNewSize, - FControl.Top, FNewSize, FControl.Height); - alBottom: - FControl.SetBounds(FControl.Left, - FControl.Top + FControl.Height - FNewSize, FControl.Width, FNewSize); - end; - finally - Parent.EnableAlign; - CorrectSelfPosition; - end; - FOldSize := FNewSize; - DoEventMoved; -end; - -procedure TcxCustomSplitter.CalcSplitSize(X, Y: Integer; - var NewSize, Split: Integer; ACorrectWithMaxMin: Boolean = True); -var - S: Integer; -begin - if not Assigned(FControl) then Exit; - if Align in [alLeft, alRight] then - Split := X - FSplitterClickPoint.X - else - Split := Y - FSplitterClickPoint.Y; - S:=0; - case Align of - alLeft: S := FControl.Width + Split; - alRight: S := FControl.Width - Split; - alTop: S := FControl.Height + Split; - alBottom: S := FControl.Height - Split; - end; - NewSize := S; - if not ACorrectWithMaxMin then - Exit; - if NewSize < 0 then - NewSize := 0; - - if (S < InternalGetMinSize) then - begin - if AutoSnap then - NewSize := 0 - else - NewSize := InternalGetMinSize; - end - else - if S > FMaxSize then - NewSize := FMaxSize; - - if S <> NewSize then - begin - if Align in [alRight, alBottom] then - S := S - NewSize - else - S := NewSize - S; - Inc(Split, S); - end; -end; - -procedure TcxCustomSplitter.ControlResizing(X, Y: Integer); - - procedure UpdateStateAfterMoving(ANewSize: Integer); - begin - if (ANewSize < MinSize) then - begin - if (State = ssOpened) and not AutoSnap then - FNewSize := MinSize - else - case State of - ssClosed: - if ANewSize >= 0 then - InternalOpenSplitter(ANewSize) - else - FNewSize := 0; - ssOpened: - InternalCloseSplitter; - end; - end - else - InternalOpenSplitter(ANewSize); - end; - -var - ASplit, ANewSize: Integer; -begin - FLastPatternDrawPosition := -1; - ParentShowHint := FSavedParentShowHint; - ShowHint := FSavedShowHint; - FHotZoneClickPoint := Point(-1, -1); - case FSplitterState of - sstHotZoneClick: - if (smsInHotZone in FMouseStates) then - begin - UpdateMouseStates(X, Y); - case FState of - ssClosed: InternalOpenSplitter; - ssOpened: InternalCloseSplitter; - end; - end; - sstResizing: - begin - StopSizing; - CalcSplitSize(X, Y, ANewSize, ASplit, False); - UpdateStateAfterMoving(ANewSize); - UpdateControlSize; - if (ANewSize >= 0) then - RecalcLastPosition; - end; - end; - SetDefaultStates; - Invalidate; -end; - -procedure TcxCustomSplitter.UpdateSize(X, Y: Integer); -begin - CalcSplitSize(X, Y, FNewSize, FSplit); -end; - -function TcxCustomSplitter.IsPointInHotZone(const X, Y: Integer): Boolean; -var - AHotZoneRect: TRect; -begin - if not IsAllControlHotZoneStyle then - begin - if HotZone <> nil then - begin - AHotZoneRect := HotZone.CalculateHotZoneRect(ClientRect); - Result := (X >= AHotZoneRect.Left) and (X <= AHotZoneRect.Right) and - (Y >= AHotZoneRect.Top) and (Y <= AHotZoneRect.Bottom); - end - else - Result := False; - end - else - Result := (X >= ClientRect.Left) and (X <= ClientRect.Right) and - (Y >= ClientRect.Top) and (Y <= ClientRect.Bottom); -end; - -function TcxCustomSplitter.IsPointInSplitter(const X, Y: Integer): Boolean; -var - FRect : TRect; -begin - FRect := ClientRect; - Result := ((X >= FRect.Left) and (X <= FRect.Right) and - (Y >= FRect.Top) and (Y <= FRect.Bottom)); -end; - -procedure TcxCustomSplitter.InitResize(X, Y: Integer); - - function GetMaxSize: Integer; - var - AMaxControlSize: Integer; - begin - Result := 0; - case Align of - alLeft: - Result := Parent.ClientWidth - Width - FControl.Left; - alRight: - Result := FControl.Left + FControl.Width - Width; - alTop: - Result := Parent.ClientHeight - Height - FControl.Top; - alBottom: - Result := FControl.Top + FControl.Height - Height; - end; - Dec(Result, FMinSize); - AMaxControlSize := GetMaxControlSize; - if (AMaxControlSize <> 0) and (Result > AMaxControlSize) then - Result := AMaxControlSize; - end; - -begin - FMaxSize := GetMaxSize; - UpdateSize(X, Y); - InitDragImage; - with ValidParentForm(Self) do - if ActiveControl <> nil then - begin - FActiveControl := ActiveControl; - FPrevKeyDown := TWinControlAccess(FActiveControl).OnKeyDown; - TWinControlAccess(FActiveControl).OnKeyDown := FocusKeyDown; - end; - if not ResizeUpdate then - MoveDragImage; -end; - -procedure TcxCustomSplitter.InternalOpenSplitter(ANewSize: Integer = 0); -var - AAllowOpenHotZone: Boolean; -begin - if State = ssOpened then Exit; - if ANewSize = 0 then - begin - if FAutoPosition = True then - ANewSize := FPositionBeforeClose - else - ANewSize := PositionAfterOpen; - end; - ANewSize := Max(ANewSize, InternalGetMinSize); - AAllowOpenHotZone := True; - DoEventBeforeOpen(ANewSize, AAllowOpenHotZone); - if AAllowOpenHotZone then - begin - FState := ssOpened; - FNewSize := ANewSize; - RecalcLastPosition; - UpdateControlSize; - DoEventAfterOpen; - Invalidate; - end; -end; - -procedure TcxCustomSplitter.InternalCloseSplitter; -var - FAllowCloseHotZone: Boolean; -begin - if State = ssClosed then Exit; - FAllowCloseHotZone := True; - DoEventBeforeClose(FAllowCloseHotZone); - if FAllowCloseHotZone then - begin - FState := ssClosed; - FNewSize := 0; - RecalcLastPosition; - UpdateControlSize; - DoEventAfterClose; - Invalidate; - end; -end; - -procedure TcxCustomSplitter.WMCancelMode(var Message: TWMCancelMode); -begin - inherited; - if FSplitterState = sstResizing then - ControlResizing(Left, Top); -end; - -procedure TcxCustomSplitter.WMSetCursor(var Message: TWMSetCursor); -begin -end; - -procedure TcxCustomSplitter.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if (Button = mbLeft) and Assigned(FControl) then - begin - FSplitterClickPoint := Point(X, Y); - FSavedShowHint := ShowHint; - FSavedParentShowHint := ParentShowHint; - ShowHint := False; - Include(FMouseStates, smsClicked); - UpdateMouseStates(X, Y); - if (smsInHotZone in FMouseStates) then - begin - FSplitterState := sstHotZoneClick; - FHotZoneClickPoint := Point(X, Y); - Invalidate; - end - else - begin - FSplitterState := sstResizing; - InitResize(X, Y); - end; - end; -end; - -procedure TcxCustomSplitter.MouseMove(Shift: TShiftState; X, Y: Integer); -var - ACursor: TCursor; - ALocalNewSize: Integer; - ASavedMouseStates: TcxSplitterMouseStates; -begin - inherited; - ASavedMouseStates := FMouseStates; - UpdateMouseStates(X, Y); - if (ssLeft in Shift) and (Assigned(FControl)) then - begin - CalcSplitSize(X, Y, ALocalNewSize, FSplit); - case FSplitterState of - sstResizing: - begin - if DoCanResize(ALocalNewSize) then - begin - FNewSize := ALocalNewSize; - if not ResizeUpdate then - MoveDragImage - else - begin - RecalcLastPosition; - UpdateControlSize; - end; - end; - end; - sstHotZoneClick: - begin - if AllowHotZoneDrag then - begin - if (((FHotZoneClickPoint.X + DragThreshold) <= X) or - ((FHotZoneClickPoint.X - DragThreshold) >= X) or - ((FHotZoneClickPoint.Y + DragThreshold) <= Y) or - ((FHotZoneClickPoint.Y - DragThreshold) >= Y)) and - DoCanResize(ALocalNewSize) then - begin - FSplitterState := sstResizing; - InitResize(X, Y); - end; - end - else - if (FMouseStates <> ASavedMouseStates) then - Invalidate; - end; - end; - end; - if Shift * [ssLeft, ssRight] = [] then - begin - if FMouseStates <> ASavedMouseStates then - Invalidate; - if (smsInHotZone in FMouseStates) and not IsAllControlHotZoneStyle then - ACursor := crDefault - else - begin - ACursor := Cursor; - if ACursor = crDefault then - if Align in [alBottom, alTop] then - ACursor := crVSplit - else - ACursor := crHSplit; - end; - SetCursor(Screen.Cursors[ACursor]); - end; -end; - -procedure TcxCustomSplitter.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - if (Button = mbLeft) and Assigned(FControl) and (smsClicked in FMouseStates) then - ControlResizing(X, Y); -end; - -procedure TcxCustomSplitter.FocusKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); -begin - if (Key = VK_ESCAPE) then - begin - StopSizing; - SetDefaultStates; - end - else - if Assigned(FPrevKeyDown) then FPrevKeyDown(Sender, Key, Shift); -end; - -procedure TcxCustomSplitter.StopSizing; -var - AMousePoint: TPoint; -begin - if Assigned(FControl) then - begin - ReleaseDragImage; - AMousePoint := ScreenToClient(Mouse.CursorPos); - UpdateMouseStates(AMousePoint.X, AMousePoint.Y); - if Assigned(FActiveControl) then - begin - TWinControlAccess(FActiveControl).OnKeyDown := FPrevKeyDown; - FActiveControl := nil; - end; - FSplitterState := sstNormal; - end; -end; - -procedure TcxCustomSplitter.OpenSplitter; -begin - InternalOpenSplitter; -end; - -procedure TcxCustomSplitter.CloseSplitter; -begin - InternalCloseSplitter; -end; - -procedure TcxCustomSplitter.RecalcLastPosition; -begin - if (FControl<>nil) then - case FAlignSplitter of - salBottom, salTop: - FPositionBeforeClose := FControl.Height; - salLeft, salRight: - FPositionBeforeClose := FControl.Width; - end; -end; - -procedure TcxCustomSplitter.DoEventBeforeOpen(var ANewSize: Integer; - var AllowOpenHotZone: Boolean); -begin - if Assigned(FOnBeforeOpen) then - FOnBeforeOpen(Self, ANewSize, AllowOpenHotZone); -end; - -procedure TcxCustomSplitter.DoEventAfterOpen; -begin - if Assigned(FOnAfterOpen) then FOnAfterOpen(Self); -end; - -procedure TcxCustomSplitter.DoEventBeforeClose(var AllowCloseHotZone: Boolean); -begin - if Assigned(FOnBeforeClose) then FOnBeforeClose(Self, AllowCloseHotZone); -end; - -procedure TcxCustomSplitter.DoEventAfterClose; -begin - if Assigned(FOnAfterClose) then FOnAfterClose(Self); -end; - -procedure TcxCustomSplitter.DoEventMoved; -begin - if Assigned(FOnMoved) then FOnMoved(Self); -end; - -function TcxCustomSplitter.InternalGetMinSize: Integer; -var - AMinSizeConstraints: Integer; -begin - Result := FMinSize; - if FControl = nil then - Exit; - case AlignSplitter of - salBottom, salTop: - AMinSizeConstraints := FControl.Constraints.MinHeight; - salLeft, salRight: - AMinSizeConstraints := FControl.Constraints.MinWidth; - else - AMinSizeConstraints := 0; - end; - if AMinSizeConstraints > FMinSize then - Result := AMinSizeConstraints; -end; - -initialization - GetRegisteredHotZoneStyles.Register(TcxMediaPlayer8Style, scxHotZoneStyleMediaPlayer8); - GetRegisteredHotZoneStyles.Register(TcxMediaPlayer9Style, scxHotZoneStyleMediaPlayer9); - GetRegisteredHotZoneStyles.Register(TcxXPTaskBarStyle, scxHotZoneStyleXPTaskBar); - GetRegisteredHotZoneStyles.Register(TcxSimpleStyle, scxHotZoneStyleSimple); - -finalization - GetRegisteredHotZoneStyles.Unregister(TcxMediaPlayer8Style); - GetRegisteredHotZoneStyles.Unregister(TcxMediaPlayer9Style); - GetRegisteredHotZoneStyles.Unregister(TcxXPTaskBarStyle); - GetRegisteredHotZoneStyles.Unregister(TcxSimpleStyle); - FreeAndNil(FRegisteredHotZoneStyles); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxSplitterEditor.dfm b/internal/x.46/ExpressEditors Library 5/Sources/cxSplitterEditor.dfm deleted file mode 100644 index 90cec4f1..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxSplitterEditor.dfm +++ /dev/null @@ -1,255 +0,0 @@ -object cxSplitEditor: TcxSplitEditor - Left = 224 - Top = 210 - ActiveControl = cxCbAhd - BorderStyle = bsDialog - ClientHeight = 383 - ClientWidth = 466 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object cxGroupBox1: TcxGroupBox - Left = 8 - Top = 200 - Width = 449 - Height = 145 - Caption = ' Preview ' - TabOrder = 0 - object Panel1: TPanel - Left = 8 - Top = 16 - Width = 426 - Height = 121 - BevelOuter = bvNone - TabOrder = 0 - object cxListBox1: TcxListBox - Left = 0 - Top = 0 - Width = 145 - Height = 121 - TabStop = False - Align = alLeft - ItemHeight = 13 - TabOrder = 0 - end - object cxSplit: TcxSplitter - Left = 145 - Top = 0 - Width = 8 - Height = 121 - AutoPosition = False - AutoSnap = True - Control = cxListBox1 - end - object cxListBox2: TcxListBox - Left = 153 - Top = 0 - Width = 273 - Height = 121 - TabStop = False - Align = alClient - ItemHeight = 13 - TabOrder = 2 - end - end - end - object cxGroupBox2: TcxGroupBox - Left = 8 - Top = 8 - Width = 153 - Height = 189 - Caption = ' Operation ' - TabOrder = 1 - object Label1: TLabel - Left = 27 - Top = 119 - Width = 40 - Height = 13 - Caption = 'Min Size' - end - object Label2: TLabel - Left = 28 - Top = 61 - Width = 88 - Height = 13 - Caption = 'Position after open' - end - object cxCbAhd: TcxCheckBox - Left = 8 - Top = 16 - Width = 121 - Height = 21 - Caption = 'Allow HotZone Drag' - TabOrder = 0 - OnClick = cxCbAhdClick - end - object cxCbAp: TcxCheckBox - Left = 8 - Top = 40 - Width = 105 - Height = 21 - Caption = 'Auto Position' - TabOrder = 1 - OnClick = cxCbApClick - end - object cxCbSnap: TcxCheckBox - Left = 8 - Top = 99 - Width = 105 - Height = 21 - Caption = 'Auto Snap' - TabOrder = 3 - OnClick = cxCbSnapClick - end - object cxCbRu: TcxCheckBox - Left = 8 - Top = 161 - Width = 105 - Height = 21 - Caption = 'Resize Update' - TabOrder = 5 - OnClick = cxCbRuClick - end - object cxSeMs: TcxSpinEdit - Left = 27 - Top = 133 - Width = 89 - Height = 21 - Properties.MaxValue = 145.000000000000000000 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeMsPropertiesChange - TabOrder = 4 - Value = 30 - end - object cxSePao: TcxSpinEdit - Left = 28 - Top = 75 - Width = 89 - Height = 21 - Properties.MaxValue = 200.000000000000000000 - Properties.MinValue = 1.000000000000000000 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSePaoPropertiesChange - TabOrder = 2 - Value = 200 - end - end - object cxGroupBox3: TcxGroupBox - Left = 168 - Top = 8 - Width = 289 - Height = 189 - Caption = ' Hot Zone ' - TabOrder = 2 - object Label3: TLabel - Left = 9 - Top = 120 - Width = 73 - Height = 13 - Caption = 'HotZone Width' - end - object cxRbHzNone: TcxRadioButton - Left = 9 - Top = 40 - Width = 113 - Height = 17 - Caption = 'None' - Checked = True - TabOrder = 1 - TabStop = True - OnClick = cxRbHzNoneClick - end - object cxRbHzMp8: TcxRadioButton - Left = 9 - Top = 65 - Width = 96 - Height = 17 - Hint = 'MediaPlayer8' - Caption = 'Media Player 8' - TabOrder = 2 - OnClick = cxRbHzMp8Click - end - object cxRbHzMp9: TcxRadioButton - Left = 106 - Top = 65 - Width = 113 - Height = 17 - Hint = 'MediaPlayer9' - Caption = 'Media Player 9' - TabOrder = 3 - OnClick = cxRbHzMp8Click - end - object cxRbHzSimple: TcxRadioButton - Left = 106 - Top = 90 - Width = 113 - Height = 17 - Hint = 'Simple' - Caption = 'Simple' - TabOrder = 4 - OnClick = cxRbHzMp8Click - end - object cxRbHzXp: TcxRadioButton - Left = 9 - Top = 90 - Width = 96 - Height = 17 - Hint = 'XPTaskBar' - Caption = 'XP Task Bar' - TabOrder = 5 - OnClick = cxRbHzMp8Click - end - object cxCbHzVisible: TcxCheckBox - Left = 9 - Top = 16 - Width = 121 - Height = 21 - Caption = 'Visible' - Enabled = False - Properties.OnChange = cxCbHzVisiblePropertiesChange - TabOrder = 0 - end - object cxTbHzWidth: TcxTrackBar - Left = 8 - Top = 136 - Width = 273 - Height = 49 - Position = 10 - Properties.Frequency = 5 - Properties.Min = 10 - Properties.Max = 100 - Properties.SelectionStart = 30 - Properties.SelectionEnd = 60 - Properties.SelectionColor = clGreen - Properties.OnChange = cxTbHzWidthPropertiesChange - TabOrder = 6 - end - end - object cxBtnOK: TcxButton - Left = 304 - Top = 352 - Width = 75 - Height = 25 - Caption = 'OK' - ModalResult = 1 - TabOrder = 3 - end - object cxBtnCancel: TcxButton - Left = 384 - Top = 352 - Width = 75 - Height = 25 - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 4 - end - object cxLookAndFeelController1: TcxLookAndFeelController - Kind = lfFlat - NativeStyle = True - Left = 200 - Top = 344 - end -end diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxSplitterEditor.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxSplitterEditor.pas deleted file mode 100644 index 5ae282dd..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxSplitterEditor.pas +++ /dev/null @@ -1,242 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxSplitterEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, Dialogs, ExtCtrls, Forms, Graphics, Messages, - StdCtrls, SysUtils, cxButtons, cxCheckBox, cxContainer, cxControls, cxEdit, - cxGroupBox, cxListBox, cxLookAndFeelPainters, cxLookAndFeels, cxMaskEdit, - cxRadioGroup, cxSpinEdit, cxSplitter, cxTextEdit, cxTrackBar; - -type - TcxSplitEditor = class(TForm) - cxGroupBox1: TcxGroupBox; - Panel1: TPanel; - cxListBox1: TcxListBox; - cxSplit: TcxSplitter; - cxListBox2: TcxListBox; - cxGroupBox2: TcxGroupBox; - cxCbAhd: TcxCheckBox; - cxCbAp: TcxCheckBox; - cxCbSnap: TcxCheckBox; - cxCbRu: TcxCheckBox; - Label1: TLabel; - cxSeMs: TcxSpinEdit; - Label2: TLabel; - cxSePao: TcxSpinEdit; - cxGroupBox3: TcxGroupBox; - cxRbHzNone: TcxRadioButton; - cxRbHzMp8: TcxRadioButton; - cxRbHzMp9: TcxRadioButton; - cxRbHzSimple: TcxRadioButton; - cxRbHzXp: TcxRadioButton; - cxLookAndFeelController1: TcxLookAndFeelController; - cxCbHzVisible: TcxCheckBox; - cxTbHzWidth: TcxTrackBar; - Label3: TLabel; - cxBtnOK: TcxButton; - cxBtnCancel: TcxButton; - procedure cxCbAhdClick(Sender: TObject); - procedure cxCbApClick(Sender: TObject); - procedure cxCbSnapClick(Sender: TObject); - procedure cxCbRuClick(Sender: TObject); - procedure cxSeMsPropertiesChange(Sender: TObject); - procedure cxSePaoPropertiesChange(Sender: TObject); - procedure cxCbHzVisiblePropertiesChange(Sender: TObject); - procedure cxRbHzNoneClick(Sender: TObject); - procedure cxRbHzMp8Click(Sender: TObject); - procedure cxTbHzWidthPropertiesChange(Sender: TObject); - public - procedure SetSplitControls; - end; - -procedure ShowSplitterEditor(ASplitter: TcxSplitter); - -implementation - -{$R *.dfm} - -uses - cxExtEditConsts; - -procedure ShowSplitterEditor(ASplitter: TcxSplitter); -var - AOwnerCaption: string; -begin - with TcxSplitEditor.Create(Application) do - try - if ASplitter.Owner <> nil then - AOwnerCaption := ASplitter.Owner.Name + '.' - else - AOwnerCaption := ''; - Caption := Format('%s%s - Splitter Control', [AOwnerCaption, ASplitter.Name]); - cxSplit.AllowHotZoneDrag := ASplitter.AllowHotZoneDrag; - cxSplit.AutoPosition := ASplitter.AutoPosition; - cxSplit.AutoSnap := ASplitter.AutoSnap; - cxSplit.PositionAfterOpen := ASplitter.PositionAfterOpen; - cxSplit.MinSize := ASplitter.MinSize; - cxSplit.ResizeUpdate := ASplitter.ResizeUpdate; - if Assigned(ASplitter.HotZone) then - begin - cxSplit.HotZoneClassName := ASplitter.HotZoneClassName; - cxSplit.HotZone.Assign(ASplitter.Hotzone); - end; - SetSplitControls; - if ShowModal = mrOK then - begin - ASplitter.AllowHotZoneDrag := cxSplit.AllowHotZoneDrag; - ASplitter.AutoPosition := cxSplit.AutoPosition; - ASplitter.AutoSnap := cxSplit.AutoSnap; - ASplitter.PositionAfterOpen := cxSplit.PositionAfterOpen; - ASplitter.MinSize := cxSplit.MinSize; - ASplitter.ResizeUpdate := cxSplit.ResizeUpdate; - if Assigned(cxSplit.HotZone) then - begin - ASplitter.HotZoneClassName := cxSplit.HotZoneClassName; - ASplitter.HotZone.Assign(cxSplit.HotZone); - end - else - ASplitter.HotZoneClassName := ''; - SetDesignerModified(ASplitter); - end; - finally - Free; - end; -end; - -procedure TcxSplitEditor.cxCbAhdClick(Sender: TObject); -begin - cxSplit.AllowHotZoneDrag := cxCbAhd.Checked; -end; - -procedure TcxSplitEditor.cxCbApClick(Sender: TObject); -begin - cxSplit.AutoPosition := cxCbAp.Checked; -end; - -procedure TcxSplitEditor.cxCbSnapClick(Sender: TObject); -begin - cxSplit.AutoSnap := cxCbSnap.Checked; -end; - -procedure TcxSplitEditor.cxCbRuClick(Sender: TObject); -begin - cxSplit.ResizeUpdate := cxCbRu.Checked; -end; - -procedure TcxSplitEditor.cxSeMsPropertiesChange(Sender: TObject); -begin - cxSplit.MinSize := Integer(cxSeMs.Value); -end; - -procedure TcxSplitEditor.cxSePaoPropertiesChange(Sender: TObject); -begin - cxSplit.PositionAfterOpen := Integer(cxSePao.Value); -end; - -procedure TcxSplitEditor.cxCbHzVisiblePropertiesChange(Sender: TObject); -begin - if Assigned(cxSplit.Hotzone) then - cxSplit.HotZone.Visible := cxCbHzVisible.Checked; -end; - -procedure TcxSplitEditor.cxRbHzNoneClick(Sender: TObject); -begin - cxCbHzVisible.Checked := False; - cxSplit.HotZoneClassName := ''; - cxCbHzVisible.Enabled := False; - cxTbHzWidth.Enabled := False; -end; - -procedure TcxSplitEditor.cxRbHzMp8Click(Sender: TObject); -var - vText: string; - vHzcl: TcxHotZoneStyleClass; -begin - vText := TcxRadioButton(Sender).Hint; - vHzCl := TcxHotZoneStyleClass(GetRegisteredHotZoneStyles.FindByClassName(vText)); - if vHzCl = nil then - vHzCl := TcxHotZoneStyleClass(GetRegisteredHotZoneStyles.FindByDescription(vText)); - cxSplit.HotZoneStyleClass := vHzCl; - cxCbHzVisible.Enabled := True; - cxCbHzVisible.Checked := True; - cxTbHzWidth.Enabled := True; - cxTbHzWidth.EditValue := Variant(cxSplit.HotZone.SizePercent); -end; - -procedure TcxSplitEditor.cxTbHzWidthPropertiesChange(Sender: TObject); -begin - if Assigned(cxSplit.HotZone) then - cxSplit.HotZone.SizePercent := Integer(cxTbHzWidth.EditValue); -end; - -Procedure TcxSplitEditor.SetSplitControls; -Var - vHzt: Integer; -Begin - cxCbAhd.Checked := cxSplit.AllowHotZoneDrag; - cxCbAp.Checked := cxSplit.AutoPosition; - cxSePao.Value := Variant(cxSplit.PositionAfterOpen); - cxCbSnap.Checked := cxSplit.AutoSnap; - cxSeMs.Value := Variant(cxSplit.MinSize); - cxCbRu.Checked := cxSplit.ResizeUpdate; - if Assigned(cxSplit.HotZone) then - begin - cxTbHzWidth.EditValue := TcxEditValue(cxSplit.HotZone.SizePercent); - cxCbHzVisible.Checked := cxSplit.HotZone.Visible; - vHzt := GetRegisteredHotZoneStyles.GetIndexByClass(cxSplit.HotZone.ClassType); - case vHzt of - 0: cxRbHzMp8.Checked := True; - 1: cxRbHzMp9.Checked := True; - 2: cxRbHzXp.Checked := True; - 3: cxRbHzSimple.Checked := True; - end; - end - else - begin - cxRbHzNone.Checked := True; - end; - cxTbHzWidth.Enabled := Assigned(cxSplit.HotZone); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxStandardMask.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxStandardMask.pas deleted file mode 100644 index 6e8d4fd2..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxStandardMask.pas +++ /dev/null @@ -1,741 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} -unit cxStandardMask; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils; - -type - { TcxStandardMaskCustomItem } - - TcxStandardMaskCustomItem = class - public - function Check(var AChar: Char): Boolean; virtual; abstract; - end; - - { TcxStandardMaskLiteralItem } - - TcxStandardMaskLiteralItem = class(TcxStandardMaskCustomItem) - private - FLiteral: Char; - public - constructor Create(ALiteral: Char); - function Check(var AChar: Char): Boolean; override; - property Literal: Char read FLiteral; - end; - - { TcxCaseControl } - - TcxCaseControl = (ccUpperCase, ccLowerCase, ccUserCase); - - { TcxStandardMaskManyItem } - - TcxStandardMaskManyItem = class(TcxStandardMaskCustomItem) - private - FCaseControl: TcxCaseControl; - FOptional: Boolean; - protected - procedure DoCaseControl(var AChar: Char); - public - constructor Create(AOptional: Boolean; ACaseControl: TcxCaseControl); - property Optional: Boolean read FOptional; - end; - - { TcxStandardMaskAlphaItem } - - TcxStandardMaskAlphaItem = class(TcxStandardMaskManyItem) - public - function Check(var AChar: Char): Boolean; override; - end; - - { TcxStandardMaskAlphaNumericItem } - - TcxStandardMaskAlphaNumericItem = class(TcxStandardMaskManyItem) - public - function Check(var AChar: Char): Boolean; override; - end; - - { TcxStandardMaskASCIIItem } - - TcxStandardMaskASCIIItem = class(TcxStandardMaskManyItem) - public - function Check(var AChar: Char): Boolean; override; - end; - - { TcxStandardMaskNumericItem } - - TcxStandardMaskNumericItem = class(TcxStandardMaskManyItem) - public - function Check(var AChar: Char): Boolean; override; - end; - - { TcxStandardMaskNumericSymbolItem } - - TcxStandardMaskNumericSymbolItem = class(TcxStandardMaskManyItem) - public - constructor Create(AOptional: Boolean; ACaseControl: TcxCaseControl); - function Check(var AChar: Char): Boolean; override; - end; - - { TcxStandardMask } - - TcxStandardMask = class - private - FBlank: Char; - FItems: TList; - FLeading: Boolean; - FSaveLiteralCharacters: Boolean; - FMask: string; - procedure Clear; - procedure DoCompileBody(const AMask: string); - procedure DoCompileHead(var AMask: string); - function GetCount: Integer; - function GetEmptyString: string; - function GetFullEmptyString: string; - function GetItems(AIndex: Integer): TcxStandardMaskCustomItem; - public - constructor Create; - destructor Destroy; override; - procedure Compile(AMask: string); - procedure Format(var AText: string; AChangeCharCase: Boolean = True; - AMatchForBlanksAndLiterals: Boolean = True); - procedure Format2(var AText: string); - function IsFullValid(var AText: string): Boolean; - function IsValid(var AText: string): Boolean; - property Blank: Char read FBlank write FBlank; - property Count: Integer read GetCount; - property EmptyString: string read GetEmptyString; - property FullEmptyString: string read GetFullEmptyString; - property Items[AIndex: Integer]: TcxStandardMaskCustomItem read GetItems; - property Mask: string read FMask; - property SaveLiteralCharacters: Boolean read FSaveLiteralCharacters; - end; - - function EmptyString(const AMask: string; const ABlank: Char = #0): string; - function FormatText(const AText, AMask: string; const ABlank: Char = #0): string; - function IsTextFullValid(const AText, AMask: string): Boolean; - function IsTextValid(const AText, AMask: string): Boolean; - function MaskBlank(const AMask: string): Char; - function SaveLiteralChars(const AMask: string): Boolean; - -const - cxDefaultBlank = '_'; - -implementation - -uses - dxCore; - -function EmptyString(const AMask: string; const ABlank: Char): string; -var - AMaskObject: TcxStandardMask; -begin - AMaskObject := TcxStandardMask.Create; - try - AMaskObject.Compile(AMask); - if ABlank <> #0 then - AMaskObject.Blank := ABlank; - Result := AMaskObject.EmptyString; - finally - AMaskObject.Free; - end; -end; - -function FormatText(const AText, AMask: string; const ABlank: Char): string; -var - AMaskObject: TcxStandardMask; -begin - AMaskObject := TcxStandardMask.Create; - try - AMaskObject.Compile(AMask); - Result := AText; - if ABlank <> #0 then - AMaskObject.Blank := ABlank; - AMaskObject.Format(Result); - finally - AMaskObject.Free; - end; -end; - -function IsTextFullValid(const AText, AMask: string): Boolean; -var - AMaskObject: TcxStandardMask; - AAText: string; -begin - AMaskObject := TcxStandardMask.Create; - try - AMaskObject.Compile(AMask); - AAText := AText; - Result := AMaskObject.IsFullValid(AAText); - finally - AMaskObject.Free; - end; -end; - -function IsTextValid(const AText, AMask: string): Boolean; -var - AMaskObject: TcxStandardMask; - AAText: string; -begin - AMaskObject := TcxStandardMask.Create; - try - AMaskObject.Compile(AMask); - AAText := AText; - Result := AMaskObject.IsValid(AAText); - finally - AMaskObject.Free; - end; -end; - -function MaskBlank(const AMask: string): Char; -var - AMaskObject: TcxStandardMask; -begin - AMaskObject := TcxStandardMask.Create; - try - AMaskObject.Compile(AMask); - Result := AMaskObject.Blank; - finally - AMaskObject.Free; - end; -end; - -function SaveLiteralChars(const AMask: string): Boolean; -var - AMaskObject: TcxStandardMask; -begin - AMaskObject := TcxStandardMask.Create; - try - AMaskObject.Compile(AMask); - Result := AMaskObject.SaveLiteralCharacters; - finally - AMaskObject.Free; - end; -end; - -{ TcxStandardMaskLiteralItem } - -constructor TcxStandardMaskLiteralItem.Create(ALiteral: Char); -begin - inherited Create; - FLiteral := ALiteral; -end; - -function TcxStandardMaskLiteralItem.Check(var AChar: Char): Boolean; -begin - Result := AChar = FLiteral; -end; - -{ TcxStandardMaskManyItem } - -constructor TcxStandardMaskManyItem.Create(AOptional: Boolean; ACaseControl: TcxCaseControl); -begin - inherited Create; - FOptional := AOptional; - FCaseControl := ACaseControl; -end; - -procedure TcxStandardMaskManyItem.DoCaseControl(var AChar: Char); -var - AStr: string; -begin - AStr := AChar; - - case FCaseControl of - ccUpperCase: - AStr := UpperCase(AStr); - ccLowerCase: - AStr := LowerCase(AStr); - ccUsercase:; - end; - - AChar := AStr[1]; -end; - -{ TcxStandardMaskAlphaItem } - -function TcxStandardMaskAlphaItem.Check(var AChar: Char): Boolean; -begin - Result := dxCharInSet(AChar, ['a'..'z', 'A'..'Z']); - DoCaseControl(AChar); -end; - -{ TcxStandardMaskAlphaNumericItem } - -function TcxStandardMaskAlphaNumericItem.Check(var AChar: Char): Boolean; -begin - Result := dxCharInSet(AChar, ['a'..'z', 'A'..'Z', '0'..'9']); - DoCaseControl(AChar); -end; - -{ TcxStandardMaskASCIIItem } - -function TcxStandardMaskASCIIItem.Check(var AChar: Char): Boolean; -begin - Result := True; - DoCaseControl(AChar); -end; - -{ TcxStandardMaskNumericItem } - -function TcxStandardMaskNumericItem.Check(var AChar: Char): Boolean; -begin - Result := dxCharInSet(AChar, ['0'..'9']); - DoCaseControl(AChar); -end; - -{ TcxStandardMaskNumericSymbolItem } - -constructor TcxStandardMaskNumericSymbolItem.Create(AOptional: Boolean; ACaseControl: TcxCaseControl); -begin - inherited Create(True, ACaseControl); -end; - -function TcxStandardMaskNumericSymbolItem.Check(var AChar: Char): Boolean; -begin - Result := dxCharInSet(AChar, ['0'..'9', '+', '-']); - DoCaseControl(AChar); -end; - -{ TcxStandardMask } - -constructor TcxStandardMask.Create; -begin - inherited Create; - FMask := ''; - FLeading := False; - FSaveLiteralCharacters := True; - FBlank := cxDefaultBlank; - FItems := TList.Create; -end; - -destructor TcxStandardMask.Destroy; -begin - Clear; - FItems.Free; - - inherited Destroy; -end; - -procedure TcxStandardMask.Compile(AMask: string); -var - AString: string; -begin - Clear; - - FMask := AMask; - AString := AMask; - DoCompileHead(AString); - DoCompileBody(AString); -end; - -procedure TcxStandardMask.Format(var AText: string; AChangeCharCase: Boolean = True; - AMatchForBlanksAndLiterals: Boolean = True); -var - AChar: Char; - ANotTestedPos, AStep, I, J: Integer; - AResult: string; -begin - AResult := FullEmptyString; - - if FLeading then - begin - ANotTestedPos := Count - 1; - AStep := -1; - I := Length(AText); - end - else - begin - ANotTestedPos := 0; - AStep := 1; - I := 1; - end; - - while (I >= 1) and (I <= Length(AText)) do - begin - AChar := AText[I]; - J := ANotTestedPos; - while (J >= 0) and (J < Count) do - begin - if not SaveLiteralCharacters and not AMatchForBlanksAndLiterals and - (Items[J] is TcxStandardMaskLiteralItem) then - begin - Inc(J, AStep); - Continue; - end; - if Items[J].Check(AChar) then - begin - Delete(AResult, J + 1, 1); - if AChangeCharCase then - Insert(AChar, AResult, J + 1) - else - Insert(AText[I], AResult, J + 1); - ANotTestedPos := J + AStep; - Break; - end - else - begin - if ((AText[I] = FBlank) or (AText[I] = ' ')) and (Items[J] is TcxStandardMaskManyItem) then - begin - ANotTestedPos := J + AStep; - Break; - end; - end; - Inc(J, AStep); - end; - Inc(I, AStep); - end; - - AText := AResult; -end; - -// The AText must be fotmatted by Format procedure already -procedure TcxStandardMask.Format2(var AText: string); - - function FormatWithLiteralCharacters: string; - var - I: Integer; - begin - Result := ''; - for I := 1 to Length(AText) do - begin - if I > Count then - Break; - if Items[I - 1] is TcxStandardMaskLiteralItem then - Result := Result + AText[I] - else if Items[I - 1] is TcxStandardMaskManyItem then - begin - if AText[I] = FBlank then - Result := Result + ' ' - else - Result := Result + AText[I]; - end; - end; - end; - - function FormatWithoutLiteralCharacters: string; - var - I: Integer; - begin - Result := ''; - for I := 1 to Length(AText) do - begin - if I > Count then - Break; - if Items[I - 1] is TcxStandardMaskManyItem then - if AText[I] = FBlank then - Result := Result + ' ' - else - Result := Result + AText[I]; - end; - end; - -begin - if SaveLiteralCharacters then - AText := FormatWithLiteralCharacters - else - AText := FormatWithoutLiteralCharacters; -end; - -function TcxStandardMask.IsFullValid(var AText: string): Boolean; -var - AIsCharValid: Boolean; - I: Integer; -begin - if Length(AText) = Count then - begin - Result := True; - for I := 1 to Length(AText) do - begin - AIsCharValid := Items[I - 1].Check(AText[I]); - if not AIsCharValid then - begin - if ((AText[I] = FBlank) or (AText[I] = ' ')) and (Items[I - 1] is TcxStandardMaskManyItem) and - (TcxStandardMaskManyItem(Items[I - 1]).Optional) then - Continue - else - begin - Result := False; - Break; - end; - end; - end; - end - else - Result := False; -end; - -function TcxStandardMask.IsValid(var AText: string): Boolean; -var - AIsCharValid: Boolean; - I: Integer; -begin - if Length(AText) <= Count then - begin - Result := True; - for I := 1 to Length(AText) do - begin - AIsCharValid := Items[I - 1].Check(AText[I]); - if not AIsCharValid then - begin - if ((AText[I] = FBlank) or (AText[I] = ' ')) and (Items[I - 1] is TcxStandardMaskManyItem) then - Continue - else - begin - Result := False; - Break; - end; - end; - end; - end - else - Result := False; -end; - -procedure TcxStandardMask.Clear; -var - I: Integer; -begin - FMask := ''; - FLeading := False; - FSaveLiteralCharacters := True; - FBlank := cxDefaultBlank; - for I := 0 to FItems.Count - 1 do - TcxStandardMaskCustomItem(FItems[I]).Free; - FItems.Clear; -end; - -procedure TcxStandardMask.DoCompileBody(const AMask: string); -var - I: Integer; - ACaseControl: TcxCaseControl; -begin - I := 1; - ACaseControl := ccUserCase; - while I <= Length(AMask) do - begin - case AMask[I] of - 'L': - begin - FItems.Add(TcxStandardMaskAlphaItem.Create(False, ACaseControl)); - Inc(I); - end; - 'l': - begin - FItems.Add(TcxStandardMaskAlphaItem.Create(True, ACaseControl)); - Inc(I); - end; - 'A': - begin - FItems.Add(TcxStandardMaskAlphaNumericItem.Create(False, ACaseControl)); - Inc(I); - end; - 'a': - begin - FItems.Add(TcxStandardMaskAlphaNumericItem.Create(True, ACaseControl)); - Inc(I); - end; - 'C': - begin - FItems.Add(TcxStandardMaskASCIIItem.Create(False, ACaseControl)); - Inc(I); - end; - 'c': - begin - FItems.Add(TcxStandardMaskASCIIItem.Create(True, ACaseControl)); - Inc(I); - end; - '0': - begin - FItems.Add(TcxStandardMaskNumericItem.Create(False, ACaseControl)); - Inc(I); - end; - '9': - begin - FItems.Add(TcxStandardMaskNumericItem.Create(True, ACaseControl)); - Inc(I); - end; - '#': - begin - FItems.Add(TcxStandardMaskNumericSymbolItem.Create(True, ACaseControl)); - Inc(I); - end; - ':': - begin - FItems.Add(TcxStandardMaskLiteralItem.Create(TimeSeparator)); - Inc(I); - end; - '/': - begin - FItems.Add(TcxStandardMaskLiteralItem.Create(DateSeparator)); - Inc(I); - end; - '\': - begin - Inc(I); - if I <= Length(AMask) then - begin - FItems.Add(TcxStandardMaskLiteralItem.Create(AMask[I])); - Inc(I); - end; - end; - '<': - begin - ACaseControl := ccLowerCase; - Inc(I); - if I <= Length(AMask) then - if AMask[I] = '>' then - begin - ACaseControl := ccUserCase; - Inc(I); - end; - end; - '>': - begin - ACaseControl := ccUpperCase; - Inc(I); - end; - ';': - begin - if Length(AMask) - I = 3 then - begin - if AMask[I + 2] = ';' then - begin - if (AMask[I + 1] = '0') or (AMask[I + 1] = '1') then - begin - FSaveLiteralCharacters := AMask[I + 1] <> '0'; - FBlank := AMask[I + 3]; - Inc(I, 4); - end - else - begin - FItems.Add(TcxStandardMaskLiteralItem.Create(AMask[I])); - Inc(I); - end; - end - else - begin - FItems.Add(TcxStandardMaskLiteralItem.Create(AMask[I])); - Inc(I); - end; - end - else if Length(AMask) - I = 1 then - begin - if (AMask[I + 1] = '0') or (AMask[I + 1] = '1') then - begin - FSaveLiteralCharacters := AMask[I + 1] <> '0'; - Inc(I, 2); - end - else - begin - FItems.Add(TcxStandardMaskLiteralItem.Create(AMask[I])); - Inc(I); - end; - end - else - begin - FItems.Add(TcxStandardMaskLiteralItem.Create(AMask[I])); - Inc(I); - end; - end; - else - begin - FItems.Add(TcxStandardMaskLiteralItem.Create(AMask[I])); - Inc(I); - end; - end; - end; -end; - -procedure TcxStandardMask.DoCompileHead(var AMask: string); -begin - if AMask <> '' then - begin - if AMask[1] = '!' then - begin - FLeading := True; - Delete(AMask, 1, 1); - end - else - FLeading := False; - end; -end; - -function TcxStandardMask.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxStandardMask.GetEmptyString: string; -var - I: Integer; -begin - Result := ''; - for I := 0 to Count - 1 do - begin - if Items[I] is TcxStandardMaskLiteralItem then - begin - if FSaveLiteralCharacters then - Result := Result + TcxStandardMaskLiteralItem(Items[I]).Literal - end - else - Result := Result + ' '; - end; -end; - -function TcxStandardMask.GetFullEmptyString: string; -var - I: Integer; -begin - Result := ''; - for I := 0 to Count - 1 do - begin - if Items[I] is TcxStandardMaskLiteralItem then - Result := Result + TcxStandardMaskLiteralItem(Items[I]).Literal - else if Items[I] is TcxStandardMaskManyItem then - Result := Result + FBlank - end; -end; - -function TcxStandardMask.GetItems(AIndex: Integer): TcxStandardMaskCustomItem; -begin - Result := TcxStandardMaskCustomItem(FItems[AIndex]); -end; - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxTextEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxTextEdit.pas deleted file mode 100644 index 04f8f909..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxTextEdit.pas +++ /dev/null @@ -1,5883 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxTextEdit; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Classes, Clipbrd, Controls, Forms, Graphics, Menus, StdCtrls, SysUtils, cxClasses, - cxContainer, cxControls, cxDataUtils, cxEdit, cxDrawTextUtils, cxFormats, - cxGraphics, cxVariants, cxFilterControlUtils; - -const - cxEditDefaultDropDownPageRowCount = 8; - ekValueOutOfBounds = 1; - - WM_SPELLCHECKERAUTOCORRECT: Cardinal = WM_DX + 101; - -type - TcxEditEchoMode = (eemNormal, eemPassword); - TcxEditScrollCause = (escKeyboard, escMouseWheel); - TcxEditValueBound = (evbMin, evbMax); - TcxTextEditViewStyle = (vsNormal, vsHideCursor, vsButtonsOnly, vsButtonsAutoWidth); - TcxTextEditCustomDrawHandler = procedure(ACanvas: TcxCanvas; ARect: TRect) of object; - - TcxCustomTextEdit = class; - - IcxInnerTextEdit = interface(IcxCustomInnerEdit) - ['{263EBB8D-1EA9-4CAC-8367-ADD74D2A9651}'] - procedure ClearSelection; - procedure CopyToClipboard; - function GetAlignment: TAlignment; - function GetAutoSelect: Boolean; - function GetCharCase: TEditCharCase; - function GetEchoMode: TcxEditEchoMode; - function GetFirstVisibleCharIndex: Integer; - function GetHideSelection: Boolean; - function GetImeLastChar: Char; - function GetImeMode: TImeMode; - function GetImeName: TImeName; - function GetInternalUpdating: Boolean; - function GetMaxLength: Integer; - function GetMultiLine: Boolean; - function GetOEMConvert: Boolean; - function GetOnSelChange: TNotifyEvent; - function GetPasswordChar: TCaptionChar; - function GetSelLength: Integer; - function GetSelStart: Integer; - function GetSelText: string; - procedure SelectAll; - procedure SetAlignment(Value: TAlignment); - procedure SetAutoSelect(Value: Boolean); - procedure SetCharCase(Value: TEditCharCase); - procedure SetEchoMode(Value: TcxEditEchoMode); - procedure SetHideSelection(Value: Boolean); - procedure SetInternalUpdating(Value: Boolean); - procedure SetImeMode(Value: TImeMode); - procedure SetImeName(const Value: TImeName); - procedure SetMaxLength(Value: Integer); - procedure SetOEMConvert(Value: Boolean); - procedure SetOnSelChange(Value: TNotifyEvent); - procedure SetPasswordChar(Value: TCaptionChar); - procedure SetSelLength(Value: Integer); - procedure SetSelStart(Value: Integer); - procedure SetSelText(Value: string); - {$IFDEF DELPHI12} - function GetTextHint: string; - procedure SetTextHint(Value: string); - {$ENDIF} - property Alignment: TAlignment read GetAlignment write SetAlignment; - property AutoSelect: Boolean read GetAutoSelect write SetAutoSelect; - property CharCase: TEditCharCase read GetCharCase write SetCharCase; - property EchoMode: TcxEditEchoMode read GetEchoMode write SetEchoMode; - property HideSelection: Boolean read GetHideSelection write SetHideSelection; - property ImeLastChar: Char read GetImeLastChar; - property ImeMode: TImeMode read GetImeMode write SetImeMode; - property ImeName: TImeName read GetImeName write SetImeName; - property InternalUpdating: Boolean read GetInternalUpdating write SetInternalUpdating; - property MaxLength: Integer read GetMaxLength write SetMaxLength; - property MultiLine: Boolean read GetMultiLine; - property OEMConvert: Boolean read GetOEMConvert write SetOEMConvert; - property PasswordChar: TCaptionChar read GetPasswordChar write SetPasswordChar; - property SelLength: Integer read GetSelLength write SetSelLength; - property SelStart: Integer read GetSelStart write SetSelStart; - property SelText: string read GetSelText write SetSelText; - {$IFDEF DELPHI12} - property TextHint: string read GetTextHint write SetTextHint; - {$ENDIF} - property OnSelChange: TNotifyEvent read GetOnSelChange write SetOnSelChange; - end; - - { TcxCustomInnerTextEditHelper } - - TcxCustomInnerTextEdit = class; - - TcxCustomInnerTextEditHelper = class(TcxInterfacedPersistent, - IcxContainerInnerControl, IcxCustomInnerEdit, IcxInnerTextEdit) - private - FAlignmentLock: Boolean; - FEdit: TcxCustomInnerTextEdit; - FSelLength: Integer; - FSelStart: Integer; - function GetUseLeftAlignmentOnEditing: Boolean; - protected - property Edit: TcxCustomInnerTextEdit read FEdit; - property UseLeftAlignmentOnEditing: Boolean read GetUseLeftAlignmentOnEditing; - public - constructor Create(AEdit: TcxCustomInnerTextEdit); reintroduce; virtual; - - // IcxContainerInnerControl - function GetControlContainer: TcxContainer; - function GetControl: TWinControl; - - // IcxCustomInnerEdit - function CallDefWndProc(AMsg: UINT; WParam: WPARAM; - LParam: LPARAM): LRESULT; - function CanProcessClipboardMessages: Boolean; - function GetEditValue: TcxEditValue; - function GetOnChange: TNotifyEvent; - procedure LockBounds(ALock: Boolean); - procedure SafelySetFocus; - procedure SetEditValue(const Value: TcxEditValue); - procedure SetParent(Value: TWinControl); - procedure SetOnChange(Value: TNotifyEvent); - - // IcxInnerTextEdit - procedure ClearSelection; - procedure CopyToClipboard; - function GetAlignment: TAlignment; - function GetAutoSelect: Boolean; - function GetCharCase: TEditCharCase; - function GetEchoMode: TcxEditEchoMode; - function GetFirstVisibleCharIndex: Integer; - function GetHideSelection: Boolean; - function GetImeLastChar: Char; - function GetImeMode: TImeMode; - function GetImeName: TImeName; - function GetInternalUpdating: Boolean; - function GetIsInplace: Boolean; - function GetMaxLength: Integer; - function GetMultiLine: Boolean; - function GetOEMConvert: Boolean; - function GetOnSelChange: TNotifyEvent; - function GetPasswordChar: TCaptionChar; - function GetReadOnly: Boolean; - function GetSelLength: Integer; - function GetSelStart: Integer; - function GetSelText: string; - procedure SelectAll; - procedure SetAlignment(Value: TAlignment); - procedure SetAutoSelect(Value: Boolean); - procedure SetCharCase(Value: TEditCharCase); - procedure SetEchoMode(Value: TcxEditEchoMode); - procedure SetHideSelection(Value: Boolean); - procedure SetInternalUpdating(Value: Boolean); - procedure SetImeMode(Value: TImeMode); - procedure SetImeName(const Value: TImeName); - procedure SetMaxLength(Value: Integer); - procedure SetOEMConvert(Value: Boolean); - procedure SetOnSelChange(Value: TNotifyEvent); - procedure SetPasswordChar(Value: TCaptionChar); - procedure SetReadOnly(Value: Boolean); - procedure SetSelLength(Value: Integer); - procedure SetSelStart(Value: Integer); - procedure SetSelText(Value: string); - {$IFDEF DELPHI12} - function GetTextHint: string; - procedure SetTextHint(Value: string); - {$ENDIF} - end; - - { TcxCustomInnerTextEdit } - - TcxCustomInnerTextEditPrevState = record - IsPrevTextSaved: Boolean; - PrevText: string; - PrevSelLength, PrevSelStart: Integer; - end; - - TcxCustomInnerTextEdit = class(TCustomEdit, IUnknown, - IcxContainerInnerControl, IcxInnerEditHelper) - private - FAlignment: TAlignment; - FEchoMode: TcxEditEchoMode; - FDblClickLock: Boolean; - FDblClickTimer: TcxTimer; - FHelper: TcxCustomInnerTextEditHelper; - FImeCharCount: Integer; - FImeLastChar: Char; - FInternalUpdating: Boolean; - FIsCreating: Boolean; - FLockBoundsCount: Integer; - FPasswordChar: TCaptionChar; - FRepaintOnGlass: Boolean; - FOnSelChange: TNotifyEvent; - procedure DblClickTimerHandle(Sender: TObject); - function GetContainer: TcxCustomTextEdit; - function GetCursorPos: Integer; - function GetIsDestroying: Boolean; - procedure InitializeDblClickTimer; - procedure SetBasedAlignment; - function NeedAdjustAlignment: Boolean; - procedure UpdateEchoMode; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure EMReplaceSel(var Message: TMessage); message EM_REPLACESEL; - procedure EMSetSel(var Message: TMessage); message EM_SETSEL; - procedure WMChar(var Message: TWMChar); message WM_CHAR; - procedure WMClear(var Message: TMessage); message WM_CLEAR; - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure WMIMEChar(var Message: TMessage); message WM_IME_CHAR; - procedure WMIMEComposition(var Message: TMessage); message WM_IME_COMPOSITION; - procedure WMKeyDown(var Message: TWMKeyDown); message WM_KEYDOWN; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure WMSize(var Message: TWMSize); message WM_SIZE; - procedure WMUndo(var Message: TWMSize); message WM_UNDO; - protected - procedure AdjustAlignment; virtual; - procedure Change; override; // for Delphi .NET - procedure Click; override; - procedure CreateHandle; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWindowHandle(const Params: TCreateParams); override; - procedure CreateWnd; override; - procedure DblClick; override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); override; - function GetBasedAlignment: TAlignment; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure WndProc(var Message: TMessage); override; - procedure AdjustMargins; virtual; - procedure MouseEnter(AControl: TControl); dynamic; - procedure MouseLeave(AControl: TControl); dynamic; - procedure RecreateWnd; // for Delphi .NET - - // IcxContainerInnerControl - function GetControl: TWinControl; - function GetControlContainer: TcxContainer; - - // IcxInnerEditHelper - function GetHelper: IcxCustomInnerEdit; - - property Alignment: TAlignment read FAlignment; - property Container: TcxCustomTextEdit read GetContainer; - property CursorPos: Integer read GetCursorPos; - property Helper: TcxCustomInnerTextEditHelper read FHelper; - property IsDestroying: Boolean read GetIsDestroying; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - function CanFocus: Boolean; override; - procedure DefaultHandler(var Message); override; - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; - property AutoSelect; - property CharCase; - property HideSelection; - property ImeMode; - property ImeName; - property MaxLength; - property OEMConvert; - property ReadOnly; - property OnChange; - property OnSelChange: TNotifyEvent read FOnSelChange write FOnSelChange; - end; - - { TcxTextEditPropertiesValues } - - TcxTextEditPropertiesValues = class(TcxCustomEditPropertiesValues) - private - FDisplayFormat: Boolean; - FEditFormat: Boolean; - FMaxLength: Boolean; - function IsDisplayFormatStored: Boolean; - function IsEditFormatStored: Boolean; - procedure SetDisplayFormat(Value: Boolean); - procedure SetEditFormat(Value: Boolean); - procedure SetMaxLength(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property DisplayFormat: Boolean read FDisplayFormat write SetDisplayFormat - stored IsDisplayFormatStored; - property EditFormat: Boolean read FEditFormat write SetEditFormat - stored IsEditFormatStored; - property MaxLength: Boolean read FMaxLength write SetMaxLength stored False; - property MaxValue; - property MinValue; - end; - - { TcxCustomEditListBox } - - TcxCustomEditListBox = class(TcxCustomInnerListBox) - private - FHotTrack: Boolean; - FOnSelectItem: TNotifyEvent; - function GetEdit: TcxCustomTextEdit; - {$IFNDEF DELPHI6} - function GetItemIndex: Integer; - {$ENDIF} - procedure CMShowingChanged(var Message: TMessage); message CM_SHOWINGCHANGED; - protected - procedure Click; override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; - function GetItemData(Index: Integer): Longint; override; - function NeedDrawFocusRect: Boolean; override; - procedure MeasureItem(Index: Integer; var Height: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure SetItemData(Index: Integer; - AData: Longint); override; - function DoDrawItem(AIndex: Integer; const ARect: TRect; - AState: TOwnerDrawState): Boolean; virtual; - procedure DoSelectItem; - function GetDefaultItemHeight: Integer; - function GetItem(Index: Integer): string; virtual; - procedure InternalRecreateWindow; - procedure RecreateWindow; virtual; - procedure SetItemCount(Value: Integer); - procedure SetItemIndex(const Value: Integer); {$IFDEF DELPHI6}override;{$ELSE}virtual;{$ENDIF} - property Edit: TcxCustomTextEdit read GetEdit; - property HotTrack: Boolean read FHotTrack write FHotTrack; -{$IFNDEF DELPHI6} - property ItemIndex: Integer read GetItemIndex write SetItemIndex; -{$ENDIF} - property OnSelectItem: TNotifyEvent read FOnSelectItem write FOnSelectItem; - public - constructor Create(AOwner: TComponent); override; - function GetHeight(ARowCount: Integer; AMaxHeight: Integer): Integer; virtual; - function GetItemHeight(AIndex: Integer = -1): Integer; virtual; - function GetItemWidth(AIndex: Integer): Integer; virtual; - function IsVisible: Boolean; - procedure SetScrollWidth(Value: Integer); - end; - - TcxCustomEditListBoxClass = class of TcxCustomEditListBox; - - { IcxTextEditLookupData } - - TcxEditLookupDataGoDirection = (egdBegin, egdEnd, egdNext, egdPrev, egdPageUp, egdPageDown); - - IcxTextEditLookupData = interface - ['{F49C5F08-7758-4362-A360-1DF02354E708}'] - function CanResizeVisualArea(var NewSize: TSize; - AMaxHeight: Integer = 0; AMaxWidth: Integer = 0): Boolean; - procedure CloseUp; - procedure Deinitialize; - procedure DropDown; - procedure DroppedDown(const AFindStr: string); - function Find(const AText: string): Boolean; - function GetActiveControl: TControl; - function GetCurrentKey: TcxEditValue; - function GetDisplayText(const AKey: TcxEditValue): string; overload; - function GetOnCurrentKeyChanged: TNotifyEvent; - function GetOnSelectItem: TNotifyEvent; - function GetVisualAreaPreferredSize(AMaxHeight: Integer; AWidth: Integer = 0): TSize; - procedure Go(ADirection: TcxEditLookupDataGoDirection; ACircular: Boolean); - procedure Initialize(AVisualControlsParent: TWinControl); - function IsEmpty: Boolean; - function IsMouseOverList(const P: TPoint): Boolean; - function Locate(var AText, ATail: string; ANext: Boolean): Boolean; - procedure PositionVisualArea(const AClientRect: TRect); - procedure PropertiesChanged; - procedure SelectItem; - procedure SetCurrentKey(const AKey: TcxEditValue); - procedure SetOnCurrentKeyChanged(Value: TNotifyEvent); - procedure SetOnSelectItem(Value: TNotifyEvent); - procedure TextChanged; - property ActiveControl: TControl read GetActiveControl; - property CurrentKey: TcxEditValue read GetCurrentKey write SetCurrentKey; - property OnCurrentKeyChanged: TNotifyEvent read GetOnCurrentKeyChanged write SetOnCurrentKeyChanged; - property OnSelectItem: TNotifyEvent read GetOnSelectItem write SetOnSelectItem; - end; - - { TcxCustomTextEditLookupData } - - TcxCustomTextEditProperties = class; - - TcxCustomTextEditLookupData = class(TcxInterfacedPersistent, IcxTextEditLookupData) - private - FCurrentKey: Integer; - FItemIndex: Integer; - FList: TcxCustomEditListBox; - FOwner: TPersistent; - FOnCurrentKeyChanged: TNotifyEvent; - FOnSelectItem: TNotifyEvent; - function GetEdit: TcxCustomTextEdit; - function GetItems: TStrings; - function GetActiveProperties: TcxCustomTextEditProperties; - function IndexOf(const AText: string): Integer; - procedure SetItemIndex(Value: Integer); - procedure SetItems(Value: TStrings); - protected - function GetOwner: TPersistent; override; - procedure DoCurrentKeyChanged; - procedure DoSelectItem; - function GetItem(Index: Integer): string; virtual; - function GetItemCount: Integer; virtual; - function GetListBoxClass: TcxCustomEditListBoxClass; virtual; - procedure HandleSelectItem(Sender: TObject); virtual; // TODO test for CLX - function InternalLocate(var AText, ATail: string; ANext, ASynchronizeWithText: Boolean): - Boolean; virtual; - procedure InternalSetItemIndex(Value: Integer); - procedure ListChanged; virtual; - procedure SetListItemIndex(Value: Integer); - property Edit: TcxCustomTextEdit read GetEdit; - property ItemIndex: Integer read FItemIndex write SetItemIndex stored False; - property Items: TStrings read GetItems write SetItems; - property List: TcxCustomEditListBox read FList; - property ActiveProperties: TcxCustomTextEditProperties read GetActiveProperties; - public - constructor Create(AOwner: TPersistent); override; - function CanResizeVisualArea(var NewSize: TSize; - AMaxHeight: Integer = 0; AMaxWidth: Integer = 0): Boolean; virtual; - procedure CloseUp; - procedure Deinitialize; - procedure DropDown; virtual; - procedure DroppedDown(const AFindStr: string); virtual; - function Find(const AText: string): Boolean; virtual; - function GetActiveControl: TControl; - function GetCurrentKey: TcxEditValue; - function GetDisplayText(const AKey: TcxEditValue): string; overload; - function GetOnCurrentKeyChanged: TNotifyEvent; - function GetOnSelectItem: TNotifyEvent; - function GetVisualAreaPreferredSize(AMaxHeight: Integer; AWidth: Integer = 0): TSize; virtual; - procedure Go(ADirection: TcxEditLookupDataGoDirection; ACircular: Boolean); - procedure Initialize(AVisualControlsParent: TWinControl); virtual; - procedure InternalSetCurrentKey(Value: Integer); - function IsEmpty: Boolean; - function IsMouseOverList(const P: TPoint): Boolean; - function Locate(var AText, ATail: string; ANext: Boolean): Boolean; - procedure PositionVisualArea(const AClientRect: TRect); virtual; - procedure PropertiesChanged; virtual; - procedure SelectItem; - procedure SetCurrentKey(const AKey: TcxEditValue); - procedure SetOnCurrentKeyChanged(Value: TNotifyEvent); - procedure SetOnSelectItem(Value: TNotifyEvent); - procedure TextChanged; virtual; - property ActiveControl: TControl read GetActiveControl; - property CurrentKey: TcxEditValue read GetCurrentKey write SetCurrentKey; - property OnCurrentKeyChanged: TNotifyEvent read GetOnCurrentKeyChanged write SetOnCurrentKeyChanged; - property OnSelectItem: TNotifyEvent read GetOnSelectItem write SetOnSelectItem; - end; - - { TcxCustomTextEditViewData } - - TcxCustomTextEditViewData = class(TcxCustomEditViewData) - private - FIsValueEditorWithValueFormatting: Boolean; - function GetProperties: TcxCustomTextEditProperties; - function InvertColor(AColor: TColor): TColor; - protected - procedure CalculateButtonNativeInfo(AButtonViewInfo: TcxEditButtonViewInfo); override; - function GetIsEditClass: Boolean; virtual; - function GetMaxLineCount: Integer; virtual; - procedure InitCacheData; override; - function InternalEditValueToDisplayText(AEditValue: TcxEditValue): string; override; - function InternalGetEditContentSize(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - const AEditSizeProperties: TcxEditSizeProperties): TSize; override; - function IsComboBoxStyle: Boolean; virtual; - procedure PrepareDrawTextFlags(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo); virtual; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure DisplayValueToDrawValue(const ADisplayValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); virtual; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - function GetClientExtent(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo): TRect; override; - function GetDrawTextFlags: DWORD; virtual; - function GetDrawTextOffset: TRect; virtual; - procedure PrepareSelection(AViewInfo: TcxCustomEditViewInfo); - property Properties: TcxCustomTextEditProperties read GetProperties; - end; - - { TcxCustomTextEditViewInfo } - - TcxTextOutData = record - ForceEndEllipsis: Boolean; - Initialized: Boolean; - RowCount: Integer; - SelStart, SelLength: Integer; - SelBackgroundColor, SelTextColor: TColor; - TextParams: TcxTextParams; - TextRect: TRect; - TextRows: TcxTextRows; - end; - - TcxCustomTextEditViewInfo = class(TcxCustomEditViewInfo) - protected - procedure InternalPaint(ACanvas: TcxCanvas); override; - public - ComboBoxStyle: Boolean; - CustomDrawHandler: TcxTextEditCustomDrawHandler; - DrawSelectionBar: Boolean; - DrawTextFlags: DWORD; - EditingStyle: TcxEditEditingStyle; - HasPopupWindow: Boolean; - IsEditClass: Boolean; - IsOwnerDrawing: Boolean; - MaxLineCount: Integer; - SelStart, SelLength: Integer; - SelTextColor, SelBackgroundColor: TColor; - Text: string; - TextOutData: TcxTextOutData; - TextRect: TRect; - destructor Destroy; override; - function NeedShowHint(ACanvas: TcxCanvas; const P: TPoint; - const AVisibleBounds: TRect; out AText: TCaption; - out AIsMultiLine: Boolean; out ATextRect: TRect): Boolean; override; - procedure Offset(DX, DY: Integer); override; - procedure DrawText(ACanvas: TcxCanvas); virtual; - {$IFDEF DELPHI10} - function GetTextBaseLine: Integer; virtual; - {$ENDIF} - end; - -{ TcxCustomTextEditProperties } - - TcxNewLookupDisplayTextEvent = procedure(Sender: TObject; const AText: TCaption) of object; - TcxTextEditChars = set of AnsiChar; - - TcxCustomTextEditProperties = class(TcxCustomEditProperties, IcxFormatControllerListener) - private - FCharCase: TEditCharCase; - FDisplayFormat: string; - FEchoMode: TcxEditEchoMode; - FEditFormat: string; - FFixedListSelection: Boolean; - FFormatChanging: Boolean; - FHideCursor: Boolean; - FHideSelection: Boolean; - FImeMode: TImeMode; - FImeName: TImeName; - FImmediateUpdateText: Boolean; - FIncrementalSearch: Boolean; - FLookupItems: TStringList; - FMaxLength: Integer; - FMRUMode: Boolean; - FOEMConvert: Boolean; - FPasswordChar: TCaptionChar; - FUseDisplayFormatWhenEditing: Boolean; - FValidChars: TcxTextEditChars; - FOnNewLookupDisplayText: TcxNewLookupDisplayTextEvent; - function GetAssignedValues: TcxTextEditPropertiesValues; - function GetDisplayFormat: string; - function GetEditFormat: string; - function GetInnerEditMaxLength: Integer; - function GetLookupItems: TStrings; - function GetLookupItemsSorted: Boolean; - function GetMaxLength: Integer; - function GetViewStyle: TcxTextEditViewStyle; - function IsDisplayFormatStored: Boolean; - function IsEditFormatStored: Boolean; - function IsMaxLengthStored: Boolean; - procedure LookupItemsChanged(Sender: TObject); - procedure ReadIsDisplayFormatAssigned(Reader: TReader); // obsolete - procedure SetAssignedValues(Value: TcxTextEditPropertiesValues); - procedure SetDisplayFormat(const Value: string); - procedure SetEchoMode(Value: TcxEditEchoMode); - procedure SetEditFormat(const Value: string); - procedure SetFixedListSelection(Value: Boolean); - procedure SetHideCursor(Value: Boolean); - procedure SetHideSelection(Value: Boolean); - procedure SetImeMode(Value: TImeMode); - procedure SetImeName(const Value: TImeName); - procedure SetIncrementalSearch(Value: Boolean); - procedure SetLookupItems(Value: TStrings); - procedure SetLookupItemsSorted(Value: Boolean); - procedure SetMaxLength(Value: Integer); - procedure SetMRUMode(Value: Boolean); - procedure SetOEMConvert(Value: Boolean); - procedure SetPasswordChar(Value: TCaptionChar); - procedure SetUseDisplayFormatWhenEditing(Value: Boolean); - procedure SetViewStyle(Value: TcxTextEditViewStyle); - protected - procedure AlignmentChangedHandler(Sender: TObject); override; - procedure BaseSetAlignment(Value: TcxEditAlignment); override; - function CanValidate: Boolean; override; - procedure DefineProperties(Filer: TFiler); override; // obsolete - class function GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; override; - function GetDisplayFormatOptions: TcxEditDisplayFormatOptions; override; - function GetValidateErrorText(AErrorKind: TcxEditErrorKind): string; override; - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function HasDisplayValue: Boolean; override; - - // IcxFormatControllerListener - procedure FormatChanged; virtual; - - function CanIncrementalSearch: Boolean; - procedure CheckEditorValueBounds(var DisplayValue: TcxEditValue; - var ErrorText: TCaption; var Error: Boolean; AEdit: TcxCustomEdit); virtual; - function DefaultFocusedDisplayValue: TcxEditValue; virtual; - function FindLookupText(const AText: string): Boolean; virtual; - function GetDefaultDisplayFormat: string; virtual; - function GetDefaultDisplayValue(const AEditValue: TcxEditValue; AEditFocused: Boolean): TcxEditValue; - function GetDefaultMaxLength: Integer; virtual; - function GetDropDownPageRowCount: Integer; virtual; - function GetEditingStyle: TcxEditEditingStyle; virtual; - class function GetLookupDataClass: TcxInterfacedPersistentClass; virtual; - function HasDigitGrouping(AIsDisplayValueSynchronizing: Boolean): Boolean; virtual; - function InternalGetEditFormat(out AIsCurrency, AIsOnGetTextAssigned: Boolean; - AEdit: TcxCustomTextEdit = nil): string; virtual; - function IsEditValueNumeric: Boolean; virtual; - function IsLookupDataVisual: Boolean; virtual; - function IsMultiLine: Boolean; virtual; - function IsPopupKey(Key: Word; Shift: TShiftState): Boolean; virtual; - function IsValueBoundDefined(ABound: TcxEditValueBound): Boolean; virtual; - function IsValueBoundsDefined: Boolean; virtual; - procedure LookupDataChanged(Sender: TObject); virtual; - procedure MaxLengthChanged; virtual; - procedure SetCharCase(Value: TEditCharCase); virtual; - function UseLookupData: Boolean; virtual; - property AssignedValues: TcxTextEditPropertiesValues read GetAssignedValues - write SetAssignedValues; - property EditingStyle: TcxEditEditingStyle read GetEditingStyle; - property FixedListSelection: Boolean read FFixedListSelection - write SetFixedListSelection default True; - property FormatChanging: Boolean read FFormatChanging; - property HideCursor: Boolean read FHideCursor write SetHideCursor - stored False; - property MRUMode: Boolean read FMRUMode write SetMRUMode default False; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CanCompareEditValue: Boolean; override; - function CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; override; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - function IsResetEditClass: Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - procedure ValidateDisplayValue(var DisplayValue: TcxEditValue; var ErrorText: TCaption; - var Error: Boolean; AEdit: TcxCustomEdit); override; - procedure DisplayValueToDisplayText(var ADisplayValue: string); virtual; - function IsDisplayValueValid(var DisplayValue: TcxEditValue; AEditFocused: Boolean): Boolean; virtual; - procedure SetMinMaxValues(AMinValue, AMaxValue: Double); - property ValidChars: TcxTextEditChars read FValidChars write FValidChars; - // !!! - property CharCase: TEditCharCase read FCharCase write SetCharCase default ecNormal; - property DisplayFormat: string read GetDisplayFormat write SetDisplayFormat - stored IsDisplayFormatStored; - property EchoMode: TcxEditEchoMode read FEchoMode write SetEchoMode default eemNormal; - property EditFormat: string read GetEditFormat write SetEditFormat - stored IsEditFormatStored; - property HideSelection: Boolean read FHideSelection write SetHideSelection default True; - property ImeMode: TImeMode read FImeMode write SetImeMode default imDontCare; - property ImeName: TImeName read FImeName write SetImeName; - property ImmediateUpdateText: Boolean read FImmediateUpdateText write FImmediateUpdateText default False; - property IncrementalSearch: Boolean read FIncrementalSearch - write SetIncrementalSearch default True; - property LookupItems: TStrings read GetLookupItems write SetLookupItems; - property LookupItemsSorted: Boolean read GetLookupItemsSorted write - SetLookupItemsSorted default False; - property MaxLength: Integer read GetMaxLength write SetMaxLength stored IsMaxLengthStored; - property MaxValue; - property MinValue; - property OEMConvert: Boolean read FOEMConvert write SetOEMConvert default False; - property PasswordChar: TCaptionChar read FPasswordChar write SetPasswordChar - default #0; - property UseDisplayFormatWhenEditing: Boolean - read FUseDisplayFormatWhenEditing write SetUseDisplayFormatWhenEditing - default False; - property ViewStyle: TcxTextEditViewStyle read GetViewStyle write SetViewStyle default vsNormal; - property OnNewLookupDisplayText: TcxNewLookupDisplayTextEvent read - FOnNewLookupDisplayText write FOnNewLookupDisplayText; - end; - - { TcxTextEditProperties } - - TcxTextEditProperties = class(TcxCustomTextEditProperties) - published - property Alignment; - property AssignedValues; - property AutoSelect; - property BeepOnError; - property CharCase; - property ClearKey; - property EchoMode; - property HideSelection; - property ImeMode; - property ImeName; - property IncrementalSearch; - property LookupItems; - property LookupItemsSorted; - property MaxLength; - property OEMConvert; - property PasswordChar; - property ReadOnly; - property UseLeftAlignmentOnEditing; - property ValidateOnEnter; - property OnChange; - property OnEditValueChanged; - property OnNewLookupDisplayText; - property OnValidate; - end; - - { TcxCustomTextEdit } - - TcxCustomTextEdit = class(TcxCustomEdit, IcxFormatControllerListener) - private - FBeepOnEnter: Boolean; - FDisableRefresh: Boolean; - FFindSelection: Boolean; - FInternalTextSetting: Boolean; - FIsDisplayValueSynchronizing: Boolean; - FLastFirstVisibleCharIndex: Integer; - FLastSelLength: Integer; - FLastSelPosition: Integer; - FLookupItemsScrolling: Boolean; - FText: TCaption; - function GetCursorPos: Integer; - function GetEditingText: TCaption; - function GetInnerTextEdit: IcxInnerTextEdit; - function GetILookupData: IcxTextEditLookupData; - function GetLookupData: TcxCustomTextEditLookupData; - function GetProperties: TcxCustomTextEditProperties; - function GetActiveProperties: TcxCustomTextEditProperties; - function GetSelLength: Integer; - function GetSelStart: Integer; - function GetSelText: TCaption; - function GetViewInfo: TcxCustomTextEditViewInfo; - procedure SetFindSelection(Value: Boolean); - procedure SetItemObject(Value: TObject); - procedure SetProperties(Value: TcxCustomTextEditProperties); - procedure SetSelLength(Value: Integer); - procedure SetSelStart(Value: Integer); - {$IFDEF DELPHI12} - function GetTextHint: string; - procedure SetTextHint(Value: string); - {$ENDIF} - procedure WMClear(var Message: TMessage); message WM_CLEAR; - procedure WMCommand(var Message: TWMCommand); message WM_COMMAND; - procedure WMGetText(var Message: TWMGetText); message WM_GETTEXT; - procedure WMGetTextLength(var Message: TWMGetTextLength); message WM_GETTEXTLENGTH; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure WMSetText(var Message: TWMSetText); message WM_SETTEXT; - protected - FInnerEditPositionAdjusting: Boolean; - FIsPopupWindowJustClosed: Boolean; - FLookupData: TcxInterfacedPersistent; - FLookupDataTextChangedLocked: Boolean; - FIsChangeBySpellChecker: Boolean; - procedure AdjustInnerEditPosition; override; - function CanKeyDownModifyEdit(Key: Word; Shift: TShiftState): Boolean; override; - function CanKeyPressModifyEdit(Key: Char): Boolean; override; - procedure ChangeHandler(Sender: TObject); override; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); override; - procedure DoEditKeyPress(var Key: Char); override; - procedure DoEditValueChanged; override; - procedure DoExit; override; - function DoRefreshContainer(const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): Boolean; override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure FillSizeProperties(var AEditSizeProperties: TcxEditSizeProperties); override; - function GetDisplayValue: string; override; - function GetInnerControlBounds(const AInnerControlsRegion: TRect; - AInnerControl: TControl): TcxContainerInnerControlBounds; override; - function GetInnerEditClass: TControlClass; override; - procedure Initialize; override; - function InternalDoEditing: Boolean; override; - function InternalGetEditingValue: TcxEditValue; override; - procedure InternalSetDisplayValue(const Value: TcxEditValue); override; - procedure InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); override; - function IsTextInputMode: Boolean; virtual; - function IsValidChar(AChar: Char): Boolean; override; - procedure KeyPress(var Key: Char); override; - procedure Loaded; override; - procedure PropertiesChanged(Sender: TObject); override; - function SetDisplayText(const Value: string): Boolean; override; - procedure SetInternalDisplayValue(Value: TcxEditValue); override; - function WantNavigationKeys: Boolean; override; - procedure LockedInnerEditWindowProc(var Message: TMessage); override; - procedure UnlockInnerEditRepainting; override; - procedure WndProc(var Message: TMessage); override; - - // IcxFormatControllerListener - procedure FormatChanged; virtual; - - // SpellChecking - procedure DoDrawMisspellings; virtual; - procedure DoLayoutChanged; virtual; - procedure DoSelectionChanged; virtual; - procedure DoTextChanged; virtual; - procedure InternalCheckSelection; - procedure InternalSpellCheckerHandler(Message: TMessage); virtual; - procedure RedrawMisspelledWords; - procedure SpellCheckerSetSelText(const AValue: string; APost: Boolean = False); override; - - procedure AdjustInnerEdit; virtual; - function CanChangeSelText(const Value: string; out ANewText: string; - out ANewSelStart: Integer): Boolean; virtual; - procedure CheckEditValue; virtual; - procedure CheckEditorValueBounds; virtual; - procedure DoOnNewLookupDisplayText(const AText: string); virtual; - function GetInnerEditHeight: Integer; virtual; - function GetItemIndex: Integer; virtual; - function GetItemObject: TObject; virtual; - function GetScrollLookupDataList(AScrollCause: TcxEditScrollCause): Boolean; virtual; - procedure HandleSelectItem(Sender: TObject); virtual; - function InternalGetText: string; virtual; - function InternalSetText(const Value: string): Boolean; virtual; - function ItemIndexToLookupKey(AItemIndex: Integer): TcxEditValue; virtual; - procedure LockLookupDataTextChanged; - function LookupKeyToEditValue(const AKey: TcxEditValue): TcxEditValue; virtual; - function LookupKeyToItemIndex(const AKey: TcxEditValue): Integer; virtual; - function NeedResetInvalidTextWhenPropertiesChanged: Boolean; virtual; - procedure ResetOnNewDisplayValue; virtual; - procedure SelChange(Sender: TObject); virtual; - procedure SetEditingText(const Value: TCaption); virtual; - procedure SetItemIndex(Value: Integer); virtual; - procedure SetSelText(const Value: TCaption); virtual; - procedure SynchronizeDisplayValue; override; - procedure SynchronizeEditValue; override; - procedure UndoPerformed; virtual; - procedure UnlockLookupDataTextChanged; - procedure UpdateDrawValue; override; - procedure UpdateDisplayValue; virtual; - - property BeepOnEnter: Boolean read FBeepOnEnter write FBeepOnEnter default True; - property InnerTextEdit: IcxInnerTextEdit read GetInnerTextEdit; - property ItemIndex: Integer read GetItemIndex write SetItemIndex stored False; - property ItemObject: TObject read GetItemObject write SetItemObject; - property LookupData: TcxCustomTextEditLookupData read GetLookupData; - property LookupItemsScrolling: Boolean read FLookupItemsScrolling write FLookupItemsScrolling; - property ParentColor default False; - property ViewInfo: TcxCustomTextEditViewInfo read GetViewInfo; - {$IFDEF DELPHI12} - property TextHint: string read GetTextHint write SetTextHint; - {$ENDIF} - public - {$IFDEF CBUILDER10} - constructor Create(AOwner: TComponent); override; - {$ENDIF} - destructor Destroy; override; - procedure Activate(var AEditData: TcxCustomEditData); override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - procedure CopyToClipboard; override; - procedure CutToClipboard; override; - function IsEditClass: Boolean; override; - procedure PasteFromClipboard; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - procedure SelectAll; override; - {$IFDEF DELPHI10} - function GetTextBaseLine: Integer; override; - function HasTextBaseLine: Boolean; override; - {$ENDIF} - procedure ClearSelection; virtual; - function DoInnerControlDefaultHandler(var Message: TMessage): Boolean; override; - function IsChildWindow(AWnd: THandle): Boolean; override; - procedure SetScrollBarsParameters(AIsScrolling: Boolean = False); override; - procedure SetSelection(ASelStart: Integer; ASelLength: Integer); - procedure Undo; virtual; - property ActiveProperties: TcxCustomTextEditProperties read GetActiveProperties; - property CursorPos: Integer read GetCursorPos; - property EditingText: TCaption read GetEditingText write SetEditingText; - property FindSelection: Boolean read FFindSelection write SetFindSelection; - property ILookupData: IcxTextEditLookupData read GetILookupData; - property Properties: TcxCustomTextEditProperties read GetProperties - write SetProperties; - property SelLength: Integer read GetSelLength write SetSelLength; - property SelStart: Integer read GetSelStart write SetSelStart; - property SelText: TCaption read GetSelText write SetSelText; - property Text; - end; - - { TcxTextEdit } - - TcxTextEdit = class(TcxCustomTextEdit) - private - function GetActiveProperties: TcxTextEditProperties; - function GetProperties: TcxTextEditProperties; - procedure SetProperties(Value: TcxTextEditProperties); - protected - function SupportsSpelling: Boolean; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxTextEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxTextEditProperties read GetProperties write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Text; - {$IFDEF DELPHI12} - property TextHint; - {$ENDIF} - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - - { TcxFilterTextEditHelper } - - TcxFilterTextEditHelper = class(TcxCustomFilterEditHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - class procedure SetFilterValue(AEdit: TcxCustomEdit; AEditProperties: TcxCustomEditProperties; - AValue: Variant); override; - end; - -procedure CheckCharsRegister(var AText: string; ACharCase: TEditCharCase); -function CheckTextEditState(ATextEdit: IcxInnerTextEdit; const APrevState: - TcxCustomInnerTextEditPrevState): Boolean; -procedure DrawEditText(ACanvas: TcxCanvas; AViewInfo: TcxCustomTextEditViewInfo); -procedure DrawTextEdit(ACanvas: TcxCanvas; AViewInfo: TcxCustomTextEditViewInfo); -function GetTextEditContentSize(ACanvas: TcxCanvas; AViewData: TcxCustomEditViewData; - const AText: string; ADrawTextFlags: DWORD; const AEditSizeProperties: TcxEditSizeProperties; - ALineCount: Integer = 0; ACorrectWidth: Boolean = True): TSize; -function GetTextEditDrawTextOffset(AViewData: TcxCustomEditViewData): TRect; overload; -function GetTextEditDrawTextOffset(AAlignment: TAlignment; AIsInplace: Boolean): TRect; overload; // deprecated -procedure InternalTextOut(ACanvas: TCanvas; AViewInfo: TcxCustomTextEditViewInfo; - AText: PcxCaptionChar; var R: TRect; AFormat: TcxTextOutFormat; ASelStart, - ASelLength: Integer; ASelBackgroundColor, ASelTextColor: TColor; - AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; ARightIndent: Integer = 0); -procedure InsertThousandSeparator(var S: string); -function RemoveExponentialPart(var S: string): string; -procedure RemoveThousandSeparator(var S: string); -procedure SaveTextEditState(ATextEdit: IcxInnerTextEdit; - ASaveText: Boolean; - var APrevState: TcxCustomInnerTextEditPrevState); -procedure SeparateDigitGroups(AEdit: TcxCustomTextEdit); - -implementation - -uses -{$IFDEF DELPHI6} - FMTBcd, -{$ENDIF} - Types, cxGeometry, cxEditConsts, cxEditUtils, dxThemeConsts, dxThemeManager, - cxDWMApi, dxCore; - -type - TCanvasAccess = class(TCanvas); - TControlAccess = class(TControl); - TWinControlAccess = class(TWinControl); - //TcxEditDataBindingAccess = class(TcxEditDataBinding) - -const - WM_REDRAWMISSPELLINGS: Cardinal = WM_DX + 100; - -procedure CalculateTextEditViewInfo(ACanvas: TcxCanvas; AViewData: TcxCustomTextEditViewData; - AViewInfo: TcxCustomTextEditViewInfo; AIsMouseEvent: Boolean); -begin - with AViewInfo do - begin - TextRect := ClientRect; - ExtendRect(TextRect, AViewData.GetDrawTextOffset); - if not IsInplace and (TextRect.Bottom - TextRect.Top < ACanvas.TextHeight('Zg')) then - begin - TextRect.Bottom := ACanvas.TextHeight('Zg') + TextRect.Top; - if TextRect.Bottom > ClientRect.Bottom then - TextRect.Bottom := ClientRect.Bottom; - end; - end; -end; - -procedure CheckCharsRegister(var AText: string; ACharCase: TEditCharCase); -begin - if ACharCase = ecUpperCase then - AText := AnsiUpperCase(AText) - else - if ACharCase = ecLowerCase then - AText := AnsiLowerCase(AText); -end; - -function CheckTextEditState(ATextEdit: IcxInnerTextEdit; const APrevState: - TcxCustomInnerTextEditPrevState): Boolean; -begin - if not ATextEdit.Control.HandleAllocated then - Result := True - else - with APrevState do - Result := (PrevSelStart <> ATextEdit.SelStart) or - (PrevSelLength <> ATextEdit.SelLength) or - IsPrevTextSaved and not InternalCompareString(PrevText, ATextEdit.EditValue, False); -end; - -procedure DrawEditText(ACanvas: TcxCanvas; AViewInfo: TcxCustomTextEditViewInfo); -var - AText: PcxCaptionChar; - ATextColor: TColor; - R: TRect; -begin - with AViewInfo do - begin - AText := PcxCaptionChar(Text); -{$IFNDEF NOFLICKER} - if StrLen(AText) = 0 then - Exit; -{$ENDIF} - - R := TextRect; - if DrawSelectionBar then - ATextColor := clHighlightText - else - ATextColor := TextColor; - ACanvas.Font := Font; - ACanvas.Font.Color := ATextColor; - PrepareCanvasFont(ACanvas.Canvas); - InternalTextOut(ACanvas.Canvas, AViewInfo, AText, R, DrawTextFlags, - SelStart, SelLength, SelBackgroundColor, SelTextColor, MaxLineCount); - end; -end; - -procedure DrawTextEdit(ACanvas: TcxCanvas; AViewInfo: TcxCustomTextEditViewInfo); - - function GetBackgroundPaintingStyle: TcxEditBackgroundPaintingStyle; - begin - with AViewInfo do - if ComboBoxStyle then - if EditingStyle in [esFixedList, esNoEdit] then - Result := bpsComboListEdit - else - Result := bpsComboEdit - else - Result := bpsSolid; - end; - - procedure InternalDrawFocusRect(R: TRect); - begin - with AViewInfo, ACanvas do - if not IsEditClass and Focused and not IsInplace and not HasPopupWindow then - begin - if DrawSelectionBar then - begin - Canvas.Font.Color := clHighlightText; - Canvas.Brush.Color := clHighlight; - end else - begin - Canvas.Font.Color := clBtnText; - Canvas.Brush.Color := AViewInfo.BackgroundColor; - end; - TCanvasAccess(Canvas).RequiredState([csFontValid]); - Canvas.DrawFocusRect(R); - end; - end; - -var - ARealTransparent: Boolean; - R: TRect; -begin - with AViewInfo, ACanvas do - begin - ARealTransparent := Transparent or DrawSelectionBar; - DrawCustomEdit(ACanvas, AViewInfo, not ARealTransparent, GetBackgroundPaintingStyle); - R := ClientRect; - if not IsInplace then - begin - if ((NativeState = TC_NONE) or DrawSelectionBar) and not Transparent and - (AViewInfo.EditingStyle <> esNoEdit) then - FrameRect(R, BackgroundColor); - InflateRect(R, -1, -1); - end; - if IsOwnerDrawing then - CustomDrawHandler(ACanvas, R) - else - begin - if DrawSelectionBar then - begin - Brush.Color := clHighlight; - FillRect(R); - end; - if IsDBEditPaintCopyDrawing or not HasInnerEdit or not IsEditClass then - AViewInfo.DrawText(ACanvas); - end; - InternalDrawFocusRect(R); - end; -end; - -function GetTextEditContentSize(ACanvas: TcxCanvas; AViewData: TcxCustomEditViewData; - const AText: string; ADrawTextFlags: DWORD; const AEditSizeProperties: TcxEditSizeProperties; - ALineCount: Integer = 0; ACorrectWidth: Boolean = True): TSize; - - function GetAutoHeightSize: TSize; - var - AAlignment: TcxEditAlignment; - AFlags: DWORD; - ARowCount: Integer; - ATextParams: TcxTextParams; - ATextRows: TcxTextRows; - ASizeCorrection: TSize; - AWidth: Integer; - R: TRect; - begin - AAlignment := nil; - if not AViewData.IsInplace and (AViewData is TcxCustomTextEditViewData) then - with TcxCustomTextEditProperties(AViewData.Properties) do - if (EditingStyle in [esFixedList, esNoEdit]) and - not (not AViewData.IsInplace and TcxCustomTextEditViewData(AViewData).IsComboBoxStyle and - AreVisualStylesMustBeUsed(AViewData.Style.LookAndFeel.NativeStyle, totEdit)) then - AAlignment := Alignment; - ACanvas.Font := AViewData.Style.GetVisibleFont; - AFlags := ADrawTextFlags; - ASizeCorrection := AViewData.GetEditContentSizeCorrection; - AWidth := AEditSizeProperties.Width; - - if ALineCount > 0 then - begin - Result.cy := ACanvas.TextHeight('Zg') * ALineCount; - Result.cx := AEditSizeProperties.Width; - end - else - begin - if AViewData.IsInplace then - Dec(AWidth, 2); - if AAlignment <> nil then - Dec(AWidth); - if AWidth <= 0 then - begin - Result.cx := 0; - if (epoAllowZeroHeight in AViewData.PaintOptions) and (Length(AText) = 0) then - Result.cy := 0 - else - Result.cy := ACanvas.TextHeight('Zg'); - end - else - begin - Result.cx := AEditSizeProperties.Width; - if Length(AText) = 0 then - if epoAllowZeroHeight in AViewData.PaintOptions then - Result.cy := 0 - else - Result.cy := ACanvas.TextHeight('Zg') - else - begin - AFlags := AFlags or CXTO_CALCROWCOUNT; - if AFlags and CXTO_SINGLELINE <> 0 then - AFlags := AFlags and not CXTO_SINGLELINE or CXTO_WORDBREAK or - CXTO_EDITCONTROL; - AFlags := AFlags and not(CXTO_CENTER_VERTICALLY or CXTO_BOTTOM) or CXTO_TOP; - R := Rect(0, 0, AWidth, MaxInt); - ATextParams := cxCalcTextParams(ACanvas.Canvas, AFlags); - cxMakeTextRows(ACanvas.Canvas, PChar(AText), Length(AText), R, ATextParams, - ATextRows, ARowCount, AEditSizeProperties.MaxLineCount); - Result.cy := ARowCount * ACanvas.TextHeight('Zg'); - cxResetTextRows(ATextRows); - end; - end; - end; - if Result.cy > 0 then - Result.cy := Result.cy + ASizeCorrection.cy; - end; - - function GetBestFitSize: TSize; - var - AAlignment: TcxEditAlignment; - AFlags: DWORD; - ARowCount: Integer; - ATextParams: TcxTextParams; - ATextRows: TcxTextRows; - ATextFlags: Integer; - ASizeCorrection: TSize; - R: TRect; - begin - AAlignment := nil; - if not AViewData.IsInplace and (AViewData is TcxCustomTextEditViewData) then - with TcxCustomTextEditProperties(AViewData.Properties) do - if (EditingStyle in [esFixedList, esNoEdit]) and - not (not AViewData.IsInplace and TcxCustomTextEditViewData(AViewData).IsComboBoxStyle and - AreVisualStylesMustBeUsed(AViewData.Style.LookAndFeel.NativeStyle, totEdit)) then - AAlignment := Alignment; - ACanvas.Font := AViewData.Style.GetVisibleFont; - AFlags := ADrawTextFlags; - ASizeCorrection := AViewData.GetEditContentSizeCorrection; - - if (AFlags and CXTO_SINGLELINE <> 0) and not ((epoAutoHeight in AViewData.PaintOptions) and - (esoAutoHeight in AViewData.Properties.GetSupportedOperations)) then - begin - ATextFlags := cxTextOutFlagsToDrawTextFlags(AFlags); - Result.cy := ACanvas.TextHeight('Zg'); - R := Rect(0, 0, MaxInt, 0); - if Length(AText) = 0 then - Result.cx := 0 - else - begin - ACanvas.TextExtent(AText, R, ATextFlags); - Result.cx := R.Right - R.Left; - end; - end - else - begin - if AFlags and CXTO_SINGLELINE <> 0 then - AFlags := AFlags and not CXTO_SINGLELINE or - CXTO_WORDBREAK or CXTO_EDITCONTROL; - AFlags := AFlags or CXTO_CALCRECT; - R := Rect(0, 0, MaxInt, MaxInt); - - ARowCount := ALineCount; - if ARowCount = 0 then - ARowCount := AEditSizeProperties.MaxLineCount; - ATextParams := cxCalcTextParams(ACanvas.Canvas, AFlags); - cxMakeTextRows(ACanvas.Canvas, PChar(AText), Length(AText), R, ATextParams, ATextRows, ARowCount, ARowCount); - Result.cx := cxGetLongestTextRowWidth(ATextRows, ARowCount); - cxResetTextRows(ATextRows); - Result.cy := ACanvas.TextHeight('Zg'); - if ALineCount > 0 then - Result.cy := Result.cy * ALineCount; - end; - if AAlignment <> nil then - Result.cx := Result.cx + 1; - if ACorrectWidth then - Result.cx := Result.cx + ASizeCorrection.cx; - if Result.cy > 0 then - Result.cy := Result.cy + ASizeCorrection.cy; - end; - -begin - if AEditSizeProperties.Width >= 0 then - Result := GetAutoHeightSize - else - Result := GetBestFitSize; -end; - -function GetTextEditDrawTextOffset(AViewData: TcxCustomEditViewData): TRect; -begin - Result := AViewData.EditContentParams.Offsets; - if not AViewData.IsInplace and (AViewData is TcxCustomTextEditViewData) then - if TcxCustomTextEditProperties(AViewData.Properties).EditingStyle in [esFixedList, esNoEdit] then - begin - Inc(Result.Top); - Dec(Result.Bottom); - if AViewData.HorzAlignment = taRightJustify then - Inc(Result.Right) - else - Inc(Result.Left); - end; -end; - -function GetTextEditDrawTextOffset(AAlignment: TAlignment; AIsInplace: Boolean): TRect; // deprecated -begin - Result := EditContentDefaultOffsets[AIsInplace]; -end; - -procedure PrepareTextRows(ACanvas: TCanvas; var TextOutData: TcxTextOutData; - AText: PcxCaptionChar; var R: TRect; AFormat: TcxTextOutFormat; ASelStart, - ASelLength: Integer; ASelBackgroundColor, ASelTextColor: TColor; - AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; ARightIndent: Integer = 0); - - procedure InternalPrepareTextRows; - var - ATextLength: Integer; - begin - TextOutData.RowCount := 0; - cxResetTextRows(TextOutData.TextRows); - ATextLength := StrLen(AText); - if ATextLength = 0 then - Exit; - TextOutData.TextParams := cxCalcTextParams(ACanvas.Handle, AFormat); - TextOutData.TextRect := cxPrepareRect(R, TextOutData.TextParams, ALeftIndent, - ARightIndent); - - if not IsRectEmpty(TextOutData.TextRect) then - begin - TextOutData.ForceEndEllipsis := not cxMakeTextRows(ACanvas.Handle, AText, - ATextLength, TextOutData.TextRect, TextOutData.TextParams, - TextOutData.TextRows, TextOutData.RowCount, AMaxLineCount); - if TextOutData.RowCount <> 0 then - begin - cxPlaceTextRows(ACanvas.Handle, TextOutData.TextRect, TextOutData.TextParams, TextOutData.TextRows, TextOutData.RowCount); - if (ASelStart < 0) or (ASelStart >= ATextLength) then - ASelLength := 0 - else - if (ASelLength + ASelStart) > ATextLength then - ASelLength := ATextLength - ASelStart; - - TextOutData.SelStart := ASelStart; - TextOutData.SelLength := ASelLength; - TextOutData.SelBackgroundColor := ASelBackgroundColor; - TextOutData.SelTextColor := ASelTextColor; - end; - end; - end; - -begin - TextOutData.Initialized := True; - InternalPrepareTextRows; -end; - -procedure InternalTextOut(ACanvas: TCanvas; AViewInfo: TcxCustomTextEditViewInfo; - AText: PcxCaptionChar; var R: TRect; AFormat: TcxTextOutFormat; ASelStart, - ASelLength: Integer; ASelBackgroundColor, ASelTextColor: TColor; - AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; ARightIndent: Integer = 0); -begin - if not AViewInfo.TextOutData.Initialized then - PrepareTextRows(ACanvas, AViewInfo.TextOutData, AText, R, AFormat, ASelStart, - ASelLength, ASelBackgroundColor, ASelTextColor, AMaxLineCount, ALeftIndent, - ARightIndent); - TCanvasAccess(ACanvas).RequiredState([csFontValid]); - with AViewInfo.TextOutData do - cxTextRowsOutHighlight(ACanvas.Handle, TextRect, TextParams, TextRows, - RowCount, SelStart, SelLength, SelBackgroundColor, SelTextColor, ForceEndEllipsis); -end; - -procedure PrepareTextEditDrawTextFlags(ACanvas: TcxCanvas; AViewData: TcxCustomTextEditViewData; - AViewInfo: TcxCustomTextEditViewInfo); -var - ADrawTextOffset: TRect; - AFlags: DWORD; - R: TRect; - ATextHeight: Integer; - ATextParams: TcxTextParams; - ATextRows: TcxTextRows; - ARowCount: Integer; -begin - if AViewData.Style.GetVisibleFont = nil then - Exit; - ACanvas.Font := AViewData.Style.GetVisibleFont; - with AViewInfo do - begin - DrawTextFlags := AViewData.GetDrawTextFlags; - AFlags := DrawTextFlags and not CXTO_SINGLELINE or - CXTO_WORDBREAK or CXTO_EDITCONTROL or CXTO_CALCROWCOUNT; - R := Rect(0, 0, TextRect.Right - TextRect.Left, MaxInt); - ADrawTextOffset := AViewData.GetDrawTextOffset; - Inc(R.Right, ADrawTextOffset.Left + ADrawTextOffset.Right); - Dec(R.Right, AViewData.GetEditContentSizeCorrection.cx); - Dec(R.Right, AViewData.ContentOffset.Left + AViewData.ContentOffset.Right); - if TcxCustomTextEditProperties(AViewData.Properties).Alignment.Horz = taRightJustify then - Inc(R.Right); - ATextParams := cxCalcTextParams(ACanvas.Canvas, AFlags); -// TODO optimize - cxMakeTextRows(ACanvas.Canvas, PChar(Text), Length(Text), R, ATextParams, ATextRows, ARowCount, - (TextRect.Bottom - TextRect.Top + ATextParams.RowHeight - 1) div ATextParams.RowHeight + 1); - ATextHeight := ARowCount * ATextParams.RowHeight; - if ARowCount > 1 then - begin - DrawTextFlags := DrawTextFlags and not CXTO_SINGLELINE or - CXTO_WORDBREAK or CXTO_EDITCONTROL; - if ATextHeight > TextRect.Bottom - TextRect.Top then - DrawTextFlags := DrawTextFlags and not CXTO_BOTTOM - and not CXTO_CENTER_VERTICALLY or CXTO_TOP; - end; - cxResetTextRows(ATextRows); - end; -end; - -procedure InsertThousandSeparator(var S: string); -var - I, J: Integer; - ACaption: string; - APrefix, ASuffix: string; -begin - APrefix := TrimRight(S); - ASuffix := Copy(S, Length(APrefix) + 1, Length(S) - Length(APrefix)); - APrefix := TrimLeft(S); - APrefix := Copy(S, 1, Length(S) - Length(APrefix)); - S := Trim(S); - ACaption := RemoveExponentialPart(S); - RemoveThousandSeparator(S); - I := Pos(DecimalSeparator, S); - if I = 0 then - I := Length(S) - else - Dec(I); - J := 0; - while (I > 1) and cxIsDigitChar(S[I - 1]) do - begin - Inc(J); - if J = 3 then - begin - Insert(ThousandSeparator, S, I); - J := 0; - end; - Dec(I); - end; - S := APrefix + S + ACaption + ASuffix; -end; - -function RemoveExponentialPart(var S: string): string; -var - APos: Integer; -begin - APos := Pos('E', UpperCase(S)); - if APos > 0 then - begin - Result := Copy(S, APos, Length(S) - APos + 1); - Delete(S, APos, Length(S) - APos + 1); - end - else - Result := ''; -end; - -procedure RemoveThousandSeparator(var S: string); -var - APos: Integer; -begin - repeat - APos := Pos(ThousandSeparator, S); - if APos <> 0 then - Delete(S, APos, 1); - until APos = 0; -end; - -procedure SaveTextEditState(ATextEdit: IcxInnerTextEdit; - ASaveText: Boolean; - var APrevState: TcxCustomInnerTextEditPrevState); -begin - with APrevState do - begin - IsPrevTextSaved := ASaveText; - if ASaveText then - PrevText := ATextEdit.EditValue; - PrevSelStart := ATextEdit.SelStart; - PrevSelLength := ATextEdit.SelLength; - end; -end; - -procedure SeparateDigitGroups(AEdit: TcxCustomTextEdit); - - function IsValidNumber(S: string): Boolean; - var - AValue: Extended; - begin - RemoveThousandSeparator(S); - Result := (S <> '') and TextToFloat(PChar(S), AValue, fvExtended); - end; - - function GetRealCaretPos: Integer; - var - I: Integer; - begin - Result := 0; - for I := 1 to AEdit.SelStart do - if AEdit.Text[I] <> ThousandSeparator then - Inc(Result); - end; - - procedure SetRealCaretPos(APrevCaretPos: Integer); - var - I: Integer; - S: string; - begin - S := AEdit.Text; - for I := 1 to Length(S) do - begin - if S[I] <> ThousandSeparator then - Dec(APrevCaretPos); - if APrevCaretPos = 0 then - begin - AEdit.SelStart := I; - Break; - end; - end; - end; - -var - ACaretPos: Integer; - S: string; -begin - S := AEdit.Text; - InsertThousandSeparator(S); - if IsValidNumber(S) then - begin - ACaretPos := GetRealCaretPos; - AEdit.SetInternalDisplayValue(S); - SetRealCaretPos(ACaretPos); - end; -end; - -{ TcxCustomInnerTextEditHelper } - -constructor TcxCustomInnerTextEditHelper.Create(AEdit: TcxCustomInnerTextEdit); -begin - inherited Create(nil); - FEdit := AEdit; - FAlignmentLock := False; -end; - -// IcxContainerInnerControl -function TcxCustomInnerTextEditHelper.GetControlContainer: TcxContainer; -begin - Result := Edit.Container; -end; - -function TcxCustomInnerTextEditHelper.GetControl: TWinControl; -begin - Result := Edit; -end; - -// IcxCustomInnerEdit -function TcxCustomInnerTextEditHelper.CallDefWndProc(AMsg: UINT; WParam: WPARAM; - LParam: LPARAM): LRESULT; -begin - Result := CallWindowProc(Edit.DefWndProc, Edit.Handle, AMsg, WParam, LParam); -end; - -function TcxCustomInnerTextEditHelper.CanProcessClipboardMessages: Boolean; -begin - Result := False; -end; - -function TcxCustomInnerTextEditHelper.GetEditValue: TcxEditValue; -begin - Result := (Edit.Text); -end; - -function TcxCustomInnerTextEditHelper.GetOnChange: TNotifyEvent; -begin - Result := Edit.OnChange; -end; - -procedure TcxCustomInnerTextEditHelper.LockBounds(ALock: Boolean); -begin - with Edit do - if ALock then - Inc(FLockBoundsCount) - else - if FLockBoundsCount > 0 then - Dec(FLockBoundsCount); -end; - -procedure TcxCustomInnerTextEditHelper.SafelySetFocus; -var - APrevAutoSelect: Boolean; -begin - with Edit do - begin - APrevAutoSelect := AutoSelect; - AutoSelect := False; - SetFocus; - AutoSelect := APrevAutoSelect; - end; -end; - -procedure TcxCustomInnerTextEditHelper.SetEditValue(const Value: TcxEditValue); -var - ATextChanged: Boolean; - AIsDesigning: Boolean; -begin - with Edit do - begin - AIsDesigning := csDesigning in ComponentState; - if AIsDesigning then - ATextChanged := not InternalCompareString(Text, VarToStr(Value), True) - else - ATextChanged := False; - Text := VarToStr(Value); - if ATextChanged then - Change; - end; -end; - -procedure TcxCustomInnerTextEditHelper.SetParent(Value: TWinControl); -begin - Edit.Parent := Value; -end; - -procedure TcxCustomInnerTextEditHelper.SetOnChange(Value: TNotifyEvent); -begin - Edit.OnChange := Value; -end; - -// IcxInnerTextEdit -procedure TcxCustomInnerTextEditHelper.ClearSelection; -begin - Edit.ClearSelection; -end; - -procedure TcxCustomInnerTextEditHelper.CopyToClipboard; -begin - Edit.CopyToClipboard; -end; - -function TcxCustomInnerTextEditHelper.GetAlignment: TAlignment; -begin - Result := Edit.FAlignment; -end; - -function TcxCustomInnerTextEditHelper.GetAutoSelect: Boolean; -begin - Result := Edit.AutoSelect; -end; - -function TcxCustomInnerTextEditHelper.GetCharCase: TEditCharCase; -begin - Result := Edit.CharCase; -end; - -function TcxCustomInnerTextEditHelper.GetEchoMode: TcxEditEchoMode; -begin - Result := Edit.FEchoMode; -end; - -function TcxCustomInnerTextEditHelper.GetFirstVisibleCharIndex: Integer; -begin - Result := LoWord(SendMessage(Edit.Handle, EM_CHARFROMPOS, 0, 0)); -end; - -function TcxCustomInnerTextEditHelper.GetHideSelection: Boolean; -begin - Result := Edit.HideSelection; -end; - -function TcxCustomInnerTextEditHelper.GetImeLastChar: Char; -begin - if Edit.FImeCharCount = 2 then - Result := Edit.FImeLastChar - else - Result := #0; -end; - -function TcxCustomInnerTextEditHelper.GetImeMode: TImeMode; -begin - Result := Edit.ImeMode; -end; - -function TcxCustomInnerTextEditHelper.GetImeName: TImeName; -begin - Result := Edit.ImeName; -end; - -function TcxCustomInnerTextEditHelper.GetInternalUpdating: Boolean; -begin - Result := Edit.FInternalUpdating; -end; - -function TcxCustomInnerTextEditHelper.GetIsInplace: Boolean; -begin - Result := Edit.Container.IsInplace; -end; - -function TcxCustomInnerTextEditHelper.GetMaxLength: Integer; -begin - Result := Edit.MaxLength; -end; - -function TcxCustomInnerTextEditHelper.GetMultiLine: Boolean; -begin - Result := False; -end; - -function TcxCustomInnerTextEditHelper.GetPasswordChar: TCaptionChar; -begin - Result := Edit.FPasswordChar; -end; - -function TcxCustomInnerTextEditHelper.GetOEMConvert: Boolean; -begin - Result := Edit.OEMConvert; -end; - -function TcxCustomInnerTextEditHelper.GetOnSelChange: TNotifyEvent; -begin - Result := Edit.OnSelChange; -end; - -function TcxCustomInnerTextEditHelper.GetReadOnly: Boolean; -begin - Result := Edit.ReadOnly; -end; - -function TcxCustomInnerTextEditHelper.GetSelLength: Integer; -begin - with Edit do - if FImeCharCount > 0 then - Result := Self.FSelLength - else - Result := SelLength; -end; - -function TcxCustomInnerTextEditHelper.GetSelStart: Integer; -begin - with Edit do - if FImeCharCount > 0 then - Result := Self.FSelStart - else - Result := SelStart; -end; - -function TcxCustomInnerTextEditHelper.GetSelText: string; -begin - Result := Edit.SelText; -end; - -procedure TcxCustomInnerTextEditHelper.SelectAll; -begin - with Edit do - if HandleAllocated then - SelectAll; -end; - -procedure TcxCustomInnerTextEditHelper.SetAlignment(Value: TAlignment); -begin - if FAlignmentLock then Exit; - if GetUseLeftAlignmentOnEditing and GetIsInplace then - Value := taLeftJustify; - with Edit do - if Value <> FAlignment then - begin - FAlignment := Value; - FAlignmentLock := True; - try - RecreateWnd; - if CanAllocateHandle(Edit) then - HandleNeeded; - finally - FAlignmentLock := False; - end; - end; -end; - -procedure TcxCustomInnerTextEditHelper.SetAutoSelect(Value: Boolean); -begin - Edit.AutoSelect := Value; -end; - -procedure TcxCustomInnerTextEditHelper.SetCharCase(Value: TEditCharCase); -begin - with Edit do - begin - CharCase := Value; - end; -end; - -procedure TcxCustomInnerTextEditHelper.SetEchoMode(Value: TcxEditEchoMode); -begin - with Edit do - if Value <> FEchoMode then - begin - FEchoMode := Value; - UpdateEchoMode; - end; -end; - -procedure TcxCustomInnerTextEditHelper.SetHideSelection(Value: Boolean); -begin - Edit.HideSelection := Value; -end; - -procedure TcxCustomInnerTextEditHelper.SetInternalUpdating(Value: Boolean); -begin - Edit.FInternalUpdating := Value; -end; - -procedure TcxCustomInnerTextEditHelper.SetImeMode(Value: TImeMode); -begin - Edit.ImeMode := Value; -end; - -procedure TcxCustomInnerTextEditHelper.SetImeName(const Value: TImeName); -begin - Edit.ImeName := Value; -end; - -procedure TcxCustomInnerTextEditHelper.SetMaxLength(Value: Integer); -begin - Edit.MaxLength := Value; -end; - -procedure TcxCustomInnerTextEditHelper.SetOEMConvert(Value: Boolean); -begin - Edit.OEMConvert := Value; -end; - -procedure TcxCustomInnerTextEditHelper.SetOnSelChange(Value: TNotifyEvent); -begin - Edit.OnSelChange := Value; -end; - -procedure TcxCustomInnerTextEditHelper.SetPasswordChar(Value: TCaptionChar); -begin - with Edit do - if Value <> FPasswordChar then - begin - FPasswordChar := Value; - if FEchoMode = eemPassword then - UpdateEchoMode; - end; -end; - -procedure TcxCustomInnerTextEditHelper.SetReadOnly(Value: Boolean); -begin - Edit.ReadOnly := Value; -end; - -procedure TcxCustomInnerTextEditHelper.SetSelLength(Value: Integer); -begin - with Edit do - if HandleAllocated then - if FImeCharCount > 0 then - Self.FSelLength := Value - else - SelLength := Value; -end; - -procedure TcxCustomInnerTextEditHelper.SetSelStart(Value: Integer); -begin - with Edit do - begin - if not HandleAllocated then - Exit; - if FImeCharCount > 0 then - begin - Self.FSelStart := Value; - Exit; - end; - SelStart := Value; - end; -end; - -procedure TcxCustomInnerTextEditHelper.SetSelText(Value: string); -begin - Edit.SelText := Value; -end; - -{$IFDEF DELPHI12} -function TcxCustomInnerTextEditHelper.GetTextHint: string; -begin - Result := Edit.TextHint; -end; - -procedure TcxCustomInnerTextEditHelper.SetTextHint(Value: string); -begin - Edit.TextHint := Value; -end; -{$ENDIF} - -function TcxCustomInnerTextEditHelper.GetUseLeftAlignmentOnEditing: Boolean; -begin - Result := Edit.Container.ActiveProperties.UseLeftAlignmentOnEditing; -end; - -{ TcxCustomInnerTextEdit } - -constructor TcxCustomInnerTextEdit.Create(AOwner: TComponent); -begin - FIsCreating := True; - inherited Create(AOwner); - InitializeDblClickTimer; - FHelper := TcxCustomInnerTextEditHelper.Create(Self); - ControlStyle := ControlStyle + [csDoubleClicks]; - ParentColor := True; - ParentFont := False; - FAlignment := cxEditDefaultHorzAlignment; - FInternalUpdating := False; - FEchoMode := eemNormal; - UpdateEchoMode; - FIsCreating := False; -end; - -destructor TcxCustomInnerTextEdit.Destroy; -begin - FreeAndNil(FHelper); - FreeAndNil(FDblClickTimer); - inherited Destroy; -end; - -procedure TcxCustomInnerTextEdit.DragDrop(Source: TObject; X, Y: Integer); -begin - Container.DragDrop(Source, Left + X, Top + Y); -end; - -function TcxCustomInnerTextEdit.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - Container.DataBinding.ExecuteAction(Action); -end; - -function TcxCustomInnerTextEdit.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - Container.DataBinding.UpdateAction(Action); -end; - -function TcxCustomInnerTextEdit.CanFocus: Boolean; -begin - Result := Container.CanFocus; -end; - -procedure TcxCustomInnerTextEdit.DefaultHandler(var Message); -begin - if not Container.InnerControlDefaultHandler(TMessage(Message)) then - inherited DefaultHandler(Message); -end; - -procedure TcxCustomInnerTextEdit.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); -begin - if not FIsCreating and (FLockBoundsCount = 0) then - begin - Container.LockAlignControls(True); - try - inherited SetBounds(ALeft, ATop, AWidth, AHeight); - finally - Container.LockAlignControls(False); - end; - end; -end; - -procedure TcxCustomInnerTextEdit.AdjustAlignment; -begin - if NeedAdjustAlignment then - begin - if Container.IsActiveControl then - begin - Helper.SetAlignment(taLeftJustify); - Container.ShortRefreshContainer(False); - end - else - SetBasedAlignment; - end; -end; - -// for Delphi .NET -procedure TcxCustomInnerTextEdit.Change; -begin - inherited Change; -end; - -procedure TcxCustomInnerTextEdit.Click; -begin - inherited Click; - Container.Click; -end; - -procedure TcxCustomInnerTextEdit.CreateHandle; -begin - Container.ClearSavedChildControlRegions; - inherited CreateHandle; -end; - -procedure TcxCustomInnerTextEdit.CreateParams(var Params: TCreateParams); -const - AAlignmentMap: array[TAlignment] of DWORD = (ES_LEFT, ES_RIGHT, ES_CENTER); -begin - inherited CreateParams(Params); - with Params do - begin - Style := Style or AAlignmentMap[Alignment]; - Style := Style and (not WS_BORDER); - Style := Style and (not WS_DLGFRAME); - Style := Style and (not WS_SIZEBOX); - Style := Style and (not WS_THICKFRAME); - Style := Style or ES_AUTOHSCROLL; - ExStyle := ExStyle and (not WS_EX_CLIENTEDGE); - end; -end; - -procedure TcxCustomInnerTextEdit.CreateWindowHandle(const Params: TCreateParams); -var - AParams: TCreateParams; -begin - AParams := Params; - AParams.Caption := ''; - inherited CreateWindowHandle(AParams); - if HandleAllocated then - CallWindowProc(DefWndProc, Handle, WM_SETTEXT, 0, Integer(WindowText)); -end; - -procedure TcxCustomInnerTextEdit.CreateWnd; -begin - inherited CreateWnd; - AdjustMargins; -end; - -procedure TcxCustomInnerTextEdit.DblClick; -begin - inherited DblClick; - Container.DblClick; -end; - -function TcxCustomInnerTextEdit.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; -begin - Result := False; -end; - -procedure TcxCustomInnerTextEdit.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -begin - Container.DragOver(Source, Left + X, Top + Y, State, Accept); -end; - -function TcxCustomInnerTextEdit.GetBasedAlignment: TAlignment; -begin - Result := Container.ActiveProperties.Alignment.Horz; -end; - -procedure TcxCustomInnerTextEdit.KeyDown(var Key: Word; Shift: TShiftState); -begin - FDblClickTimer.Enabled := False; - FInternalUpdating := False; - try - Container.KeyDown(Key, Shift); - finally - if Key = 0 then - FInternalUpdating := True; - end; - if Key <> 0 then - inherited KeyDown(Key, Shift); -end; - -procedure TcxCustomInnerTextEdit.KeyPress(var Key: Char); -var - AKey: Word; -begin - FInternalUpdating := False; - try - AKey := Word(Key); - if (AKey = VK_TAB) then - Key := #0; - Container.KeyPress(Key); - - AKey := Word(Key); - if (Container.IsInplace or Container.FIsPopupWindowJustClosed or - (not Container.BeepOnEnter and (AKey = VK_RETURN))) and - ((AKey = VK_RETURN) or (AKey = VK_ESCAPE)) then - begin - Key := #0; - Container.FIsPopupWindowJustClosed := False; - end; - finally - if Key = #0 then - FInternalUpdating := True - end; - if Key <> #0 then - inherited KeyPress(Key); -end; - -procedure TcxCustomInnerTextEdit.KeyUp(var Key: Word; Shift: TShiftState); -begin - FInternalUpdating := False; - try - if (Key = VK_TAB) then - Key := 0; - Container.KeyUp(Key, Shift); - finally - if Key = 0 then - FInternalUpdating := True; - end; - if Key <> 0 then - inherited KeyUp(Key, Shift); -end; - -procedure TcxCustomInnerTextEdit.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - with Container do - begin - InnerControlMouseDown := True; - try - MouseDown(Button, Shift, X + Self.Left, Y + Self.Top); - finally - InnerControlMouseDown := False; - end; - end; -end; - -procedure TcxCustomInnerTextEdit.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - Container.MouseMove(Shift, X + Left, Y + Top); -end; - -procedure TcxCustomInnerTextEdit.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - Container.MouseUp(Button, Shift, X + Left, Y + Top); -end; - -procedure TcxCustomInnerTextEdit.WndProc(var Message: TMessage); -begin - if Container.InnerControlMenuHandler(Message) then - Exit; - case Message.Msg of - WM_MOUSEMOVE: - begin - inherited WndProc(Message); - if FDblClickLock then - begin - SetSelStart(SelLength + SelStart); - SetSelLength(0); - end; - end; - WM_LBUTTONDOWN: - if NeedAdjustAlignment and (FAlignment <> taLeftJustify) then - begin - inherited WndProc(Message); - FDblClickTimer.Enabled := True; - FDblClickLock := True; - end - else - begin - if (Container.DragMode = dmAutomatic) and not Container.IsDesigning then - Container.BeginAutoDrag - else - begin - if FDblClickTimer.Enabled then - begin - Message.Msg := WM_LBUTTONDBLCLK; - FDblClickTimer.Enabled := False; - FDblClickTimer.Enabled := True; - end; - FDblClickLock := False; - inherited WndProc(Message); - end; - end; - WM_LBUTTONDBLCLK: - begin - if (Container.DragMode = dmAutomatic) and not Container.IsDesigning then - Container.BeginAutoDrag - else - begin - if not FDblClickTimer.Enabled then - inherited WndProc(Message); - end; - end; - WM_PAINT: - begin - if Container.OnGlass and IsCompositionEnabled then - begin - WMPaintWindowOnGlass(Handle); - Message.Result := 0; - end - else - inherited WndProc(Message); - end; - CN_CTLCOLOREDIT, CN_CTLCOLORSTATIC: - begin - inherited WndProc(Message); - if not FRepaintOnGlass and Container.OnGlass and - IsCompositionEnabled then - begin - FRepaintOnGlass := True; - PostMessage(Handle, CM_BUFFEREDPAINTONGLASS, 0, 0); - end; - end; - CM_BUFFEREDPAINTONGLASS: - if FRepaintOnGlass then - begin - RepaintWindowOnGlass(Handle); - FRepaintOnGlass := False; - end; - else - inherited WndProc(Message); - end; -end; - -procedure TcxCustomInnerTextEdit.AdjustMargins; -begin - SendMessage(Handle, EM_SETMARGINS, EC_LEFTMARGIN + EC_RIGHTMARGIN, 1 shl 16); -end; - -procedure TcxCustomInnerTextEdit.MouseEnter(AControl: TControl); -begin -end; - -procedure TcxCustomInnerTextEdit.MouseLeave(AControl: TControl); -begin - Container.ShortRefreshContainer(True); -end; - -// for Delphi .NET -procedure TcxCustomInnerTextEdit.RecreateWnd; -begin - inherited RecreateWnd; -end; - -// IcxContainerInnerControl -function TcxCustomInnerTextEdit.GetControl: TWinControl; -begin - Result := Self; -end; - -function TcxCustomInnerTextEdit.GetControlContainer: TcxContainer; -begin - Result := Container; -end; - -// IcxInnerEditHelper -function TcxCustomInnerTextEdit.GetHelper: IcxCustomInnerEdit; -begin - Result := Helper; -end; - -procedure TcxCustomInnerTextEdit.DblClickTimerHandle(Sender: TObject); -begin - FDblClickTimer.Enabled := False; -end; - -function TcxCustomInnerTextEdit.GetContainer: TcxCustomTextEdit; -begin - Result := TcxCustomTextEdit(Owner); -end; - -function TcxCustomInnerTextEdit.GetCursorPos: Integer; -var - X: Integer; - P: TPoint; - I, I0, I1: Smallint; - ATextLength: Integer; -begin - ATextLength := Length(Text); - GetCaretPos(P); - I0 := 0; - I1 := ATextLength - 1; - repeat - I := (I0 + I1) div 2; - X := Smallint(SendMessage(Handle, EM_POSFROMCHAR, I, 0) and $FFFF); - if X < P.X then - I0 := I - else - I1 := I; - until I1 - I0 < 2; - if SendMessage(Handle, EM_POSFROMCHAR, I0, 0) and $FFFF = P.X then - Result := I0 - else if SendMessage(Handle, EM_POSFROMCHAR, I1, 0) and $FFFF = P.X then - Result := I1 - else - Result := I1 + 1; -end; - -function TcxCustomInnerTextEdit.GetIsDestroying: Boolean; -begin - Result := csDestroying in ComponentState; -end; - -procedure TcxCustomInnerTextEdit.InitializeDblClickTimer; -begin - FreeAndNil(FDblClickTimer); - FDblClickTimer := TcxTimer.Create(Self); - with FDblClickTimer do - begin - Enabled := False; - OnTimer := DblClickTimerHandle; - Interval := GetDoubleClickTime; - end; -end; - -procedure TcxCustomInnerTextEdit.SetBasedAlignment; -begin - Helper.SetAlignment(GetBasedAlignment); - Container.ShortRefreshContainer(False); -end; - -function TcxCustomInnerTextEdit.NeedAdjustAlignment: Boolean; -begin - Result := Helper.UseLeftAlignmentOnEditing and (GetBasedAlignment <> taLeftJustify); -end; - -procedure TcxCustomInnerTextEdit.UpdateEchoMode; -begin - if FEchoMode = eemNormal then - PasswordChar := #0 - else - if FPasswordChar = #0 then - PasswordChar := '*' - else - PasswordChar := FPasswordChar; -end; - -procedure TcxCustomInnerTextEdit.WMChar(var Message: TWMChar); -var - APrevState: TcxCustomInnerTextEditPrevState; -begin - SaveTextEditState(Helper, True, APrevState); - FInternalUpdating := False; - inherited; - if FImeCharCount > 0 then - begin - Dec(FImeCharCount); - if (FImeCharCount = 0) and Container.FindSelection then - begin - SelStart := Helper.FSelStart; - SelLength := Helper.FSelLength; - end; - end; - Container.UnlockLookupDataTextChanged; - if FInternalUpdating then - Exit; - if CheckTextEditState(Helper, APrevState) then - Container.FindSelection := False; -end; - -procedure TcxCustomInnerTextEdit.WMClear(var Message: TMessage); -begin - if not ReadOnly then - with Container do - begin - KeyboardAction := True; - try - ClearSelection; - finally - KeyboardAction := False; - end; - end; -end; - -procedure TcxCustomInnerTextEdit.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - Message.Result := 1; -end; - -procedure TcxCustomInnerTextEdit.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - inherited; - with Message do - begin - Result := Result or DLGC_WANTCHARS; - if Container.TabsNeeded and (GetKeyState(VK_CONTROL) >= 0) then - Result := Result or DLGC_WANTTAB; - if Container.IsInplace or Container.HasPopupWindow then - Result := Result or DLGC_WANTALLKEYS; - end; -end; - -procedure TcxCustomInnerTextEdit.WMIMEChar(var Message: TMessage); -begin - if not IsWindowUnicode(Handle) then - begin - if (Message.WParam and $FF00) shr 8 <> 0 then - begin - FImeCharCount := 2; - FImeLastChar := Char(Message.WParam and $FF); - end - else - FImeCharCount := 1; - - Helper.FSelStart := SelStart; - Helper.FSelLength := SelLength; - end; - inherited; -end; - -procedure TcxCustomInnerTextEdit.WMIMEComposition(var Message: TMessage); -begin - if Container.DoEditing then - inherited; -end; - -procedure TcxCustomInnerTextEdit.WMKeyDown(var Message: TWMKeyDown); -var - AKey: Word; - APrevState: TcxCustomInnerTextEditPrevState; - AShiftState: TShiftState; -begin - AShiftState := KeyDataToShiftState(Message.KeyData); - if Container.HasPopupWindow and Container.ActiveProperties.IsPopupKey(Message.CharCode, AShiftState) then - with Container.ILookupData do - if ActiveControl is TWinControl then - begin - SendMessage(TWinControl(ActiveControl).Handle, WM_KEYDOWN, TMessage(Message).WParam, TMessage(Message).LParam); - if Message.Result = 0 then - Exit; - end; - - SaveTextEditState(Helper, True, APrevState); - FInternalUpdating := False; - inherited; - if (Message.CharCode = 0) or FInternalUpdating then - Exit; - if not CheckTextEditState(Helper, APrevState) then - begin - AKey := Message.CharCode; - AShiftState := KeyDataToShiftState(Message.KeyData); - Container.DoAfterKeyDown(AKey, AShiftState); - Message.CharCode := AKey; - end; -end; - -procedure TcxCustomInnerTextEdit.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - if not IsDestroying then - begin - FDblClickTimer.Enabled := False; - SetBasedAlignment; - Container.FocusChanged; - end; -end; - -procedure TcxCustomInnerTextEdit.WMNCPaint(var Message: TWMNCPaint); -begin - Message.Result := 0; - Exit; -end; - -procedure TcxCustomInnerTextEdit.WMSetFocus(var Message: TWMSetFocus); -begin - if not IsDestroying then - AdjustAlignment; - inherited; - if not IsDestroying then - begin - if Message.FocusedWnd <> Container.Handle then - Container.FocusChanged; - end; -end; - -procedure TcxCustomInnerTextEdit.WMSize(var Message: TWMSize); -begin - inherited; - AdjustMargins; -end; - -procedure TcxCustomInnerTextEdit.WMUndo(var Message: TWMSize); -begin - inherited; - Container.UndoPerformed; -end; - -procedure TcxCustomInnerTextEdit.CMMouseEnter(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseEnter(Self) - else - MouseEnter(TControl(Message.lParam)); -end; - -procedure TcxCustomInnerTextEdit.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxCustomInnerTextEdit.EMReplaceSel(var Message: TMessage); -begin - if not ((Container <> nil) and Container.Focused and not Container.DoEditing) then - inherited; -end; - -procedure TcxCustomInnerTextEdit.EMSetSel(var Message: TMessage); -begin - inherited; - if Assigned(OnSelChange) then - OnSelChange(Self); -end; - -{ TcxTextEditPropertiesValues } - -procedure TcxTextEditPropertiesValues.Assign(Source: TPersistent); -begin - if Source is TcxTextEditPropertiesValues then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxTextEditPropertiesValues do - begin - Self.DisplayFormat := DisplayFormat; - Self.EditFormat := EditFormat; - Self.MaxLength := MaxLength; - end; - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TcxTextEditPropertiesValues.RestoreDefaults; -begin - BeginUpdate; - try - inherited RestoreDefaults; - DisplayFormat := False; - EditFormat := False; - MaxLength := False; - finally - EndUpdate; - end; -end; - -function TcxTextEditPropertiesValues.IsDisplayFormatStored: Boolean; -begin - Result := DisplayFormat and - (TcxCustomTextEditProperties(Properties).FDisplayFormat = '') and - IsPropertiesPropertyVisible('DisplayFormat'); -end; - -function TcxTextEditPropertiesValues.IsEditFormatStored: Boolean; -begin - Result := EditFormat and - (TcxCustomTextEditProperties(Properties).FEditFormat = '') and - IsPropertiesPropertyVisible('EditFormat'); -end; - -procedure TcxTextEditPropertiesValues.SetDisplayFormat(Value: Boolean); -begin - if Value <> FDisplayFormat then - begin - FDisplayFormat := Value; - Changed; - end; -end; - -procedure TcxTextEditPropertiesValues.SetEditFormat(Value: Boolean); -begin - if Value <> FEditFormat then - begin - FEditFormat := Value; - Changed; - end; -end; - -procedure TcxTextEditPropertiesValues.SetMaxLength(Value: Boolean); -begin - if Value <> FMaxLength then - begin - FMaxLength := Value; - TcxCustomTextEditProperties(Properties).MaxLengthChanged; - end; -end; - -{ TcxCustomEditListBox } - -constructor TcxCustomEditListBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FHotTrack := True; - BorderStyle := bsNone; -end; - -function TcxCustomEditListBox.GetHeight(ARowCount: Integer; AMaxHeight: Integer): Integer; -begin - Result := ARowCount * GetItemHeight; -end; - -function TcxCustomEditListBox.GetItemHeight(AIndex: Integer = -1): Integer; -begin - Result := GetDefaultItemHeight; -end; - -function TcxCustomEditListBox.GetItemWidth(AIndex: Integer): Integer; -begin - Canvas.Font.Assign(Font); - Result := Canvas.TextWidth(GetItem(AIndex)); -end; - -function TcxCustomEditListBox.IsVisible: Boolean; -begin - Result := HandleAllocated and IsWindowVisible(Handle); -end; - -procedure TcxCustomEditListBox.SetScrollWidth(Value: Integer); -begin - ScrollWidth := 0; - ScrollWidth := Value; -end; - -procedure TcxCustomEditListBox.Click; -begin - inherited Click; - DoSelectItem; -end; - -function TcxCustomEditListBox.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; -const - AScrollDirectionMap: array [Boolean] of Integer = (SB_LINEDOWN, SB_LINEUP); -var - I: Integer; -begin - Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); - if Result then - Exit; - for I := 0 to Mouse.WheelScrollLines - 1 do - Result := (SendMessage(Handle, WM_VScroll, AScrollDirectionMap[WheelDelta > 0], 0) = 0); -end; - -procedure TcxCustomEditListBox.DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); -var - AFlags: Longint; - AText: string; -begin - if DoDrawItem(Index, Rect, State) then - Exit; - Canvas.FillRect(Rect); - if (Index >= 0) and (Index < Items.Count) then - begin - AFlags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX); - if not UseRightToLeftAlignment then - Inc(Rect.Left, 2) - else - Dec(Rect.Right, 2); - AText := GetItem(Index); - DrawText(Canvas.Handle, PChar(AText), Length(AText), Rect, AFlags); - end; -end; - -function TcxCustomEditListBox.GetItemData(Index: Integer): - Longint; -begin - Result := 0; -end; - -function TcxCustomEditListBox.NeedDrawFocusRect: Boolean; -begin - Result := Edit.ActiveProperties.EditingStyle in [esFixedList, esNoEdit]; -end; - -procedure TcxCustomEditListBox.MeasureItem(Index: Integer; var Height: Integer); -begin - Height := GetItemHeight; -end; - -procedure TcxCustomEditListBox.MouseMove(Shift: TShiftState; X, Y: Integer); -var - AItemIndex: Integer; -begin - inherited MouseMove(Shift, X, Y); - if (GetCaptureControl <> Self) and HotTrack then - begin - AItemIndex := ItemAtPos(Point(X, Y), False); - if (AItemIndex <> -1) and (ItemIndex <> AItemIndex) then - ItemIndex := AItemIndex; - end; -end; - -procedure TcxCustomEditListBox.SetItemData(Index: Integer; - AData: Longint); -begin -end; - -function TcxCustomEditListBox.DoDrawItem(AIndex: Integer; const ARect: TRect; - AState: TOwnerDrawState): Boolean; -begin - Result := False; -end; - -procedure TcxCustomEditListBox.DoSelectItem; -begin - SetExternalScrollBarsParameters; - if Assigned(FOnSelectItem) then - FOnSelectItem(Self); -end; - -function TcxCustomEditListBox.GetDefaultItemHeight: Integer; -begin - Canvas.Font := Font; - Result := Canvas.TextHeight('Wg'); -end; - -function TcxCustomEditListBox.GetItem(Index: Integer): string; -begin - Result := Items[Index]; -end; - -procedure TcxCustomEditListBox.InternalRecreateWindow; -begin - RecreateWnd; -end; - -procedure TcxCustomEditListBox.RecreateWindow; -begin -end; - -procedure TcxCustomEditListBox.SetItemCount(Value: Integer); -var - I: Integer; -begin - with Items do - begin - if Value = Count then - Exit; - BeginUpdate; - try - if Value > Count then - for I := 1 to Value - Count do - Add('') - else - for I := 1 to Count - Value do - Delete(Count - 1); - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomEditListBox.SetItemIndex(const Value: Integer); -begin -{$IFDEF DELPHI6} - inherited SetItemIndex(Value); -{$ELSE} - inherited ItemIndex := Value; -{$ENDIF} - DoSelectItem; -end; - -procedure TcxCustomEditListBox.CMShowingChanged(var Message: TMessage); -begin - inherited; - CallWindowProc(DefWndProc, Handle, WM_SETFOCUS, 0, 0); -end; - -function TcxCustomEditListBox.GetEdit: TcxCustomTextEdit; -begin - Result := TcxCustomTextEdit(TcxCustomPopupWindow(Owner).OwnerControl); -end; - -{$IFNDEF DELPHI6} -function TcxCustomEditListBox.GetItemIndex: Integer; -begin - Result := inherited ItemIndex; -end; -{$ENDIF} - -{ TcxCustomTextEditLookupData } - -constructor TcxCustomTextEditLookupData.Create(AOwner: TPersistent); -begin - inherited Create(nil); - FOwner:= AOwner; - FCurrentKey := -1; - FItemIndex := -1; -end; - -function TcxCustomTextEditLookupData.CanResizeVisualArea(var NewSize: TSize; - AMaxHeight: Integer = 0; AMaxWidth: Integer = 0): Boolean; -begin - Result := True; -end; - -procedure TcxCustomTextEditLookupData.CloseUp; -begin - if not Edit.EditModeSetting then - InternalSetItemIndex(FCurrentKey); -end; - -procedure TcxCustomTextEditLookupData.Deinitialize; -begin -end; - -procedure TcxCustomTextEditLookupData.DropDown; -begin -end; - -procedure TcxCustomTextEditLookupData.DroppedDown(const AFindStr: string); -begin -end; - -function TcxCustomTextEditLookupData.Find(const AText: string): Boolean; -begin - Result := IndexOf(AText) <> -1; -end; - -function TcxCustomTextEditLookupData.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -procedure TcxCustomTextEditLookupData.DoCurrentKeyChanged; -begin - if Assigned(FOnCurrentKeyChanged) then - FOnCurrentKeyChanged(Self); -end; - -procedure TcxCustomTextEditLookupData.DoSelectItem; -begin - if Assigned(FOnSelectItem) then - FOnSelectItem(Self); -end; - -function TcxCustomTextEditLookupData.GetItem(Index: Integer): string; -begin - Result := ActiveProperties.FLookupItems[Index]; -end; - -function TcxCustomTextEditLookupData.GetItemCount: Integer; -begin - Result := ActiveProperties.FLookupItems.Count; -end; - -function TcxCustomTextEditLookupData.GetDisplayText(const AKey: TcxEditValue): string; -begin - if (AKey < 0) or (AKey >= GetItemCount) then - Result := '' - else - Result := GetItem(AKey); -end; - -function TcxCustomTextEditLookupData.GetListBoxClass: TcxCustomEditListBoxClass; -begin - Result := nil; -end; - -procedure TcxCustomTextEditLookupData.HandleSelectItem(Sender: TObject); -begin - FItemIndex := FList.ItemIndex; -end; - -function TcxCustomTextEditLookupData.InternalLocate(var AText, ATail: string; - ANext, ASynchronizeWithText: Boolean): Boolean; - - procedure CheckCurrentKey; - var - ACorrectCurrentKey: Boolean; - begin - case ActiveProperties.EditingStyle of - esEditList: - ACorrectCurrentKey := ASynchronizeWithText or (AText = ''); - esFixedList: - ACorrectCurrentKey := ASynchronizeWithText; - else - ACorrectCurrentKey := True; - end; - if ACorrectCurrentKey then - InternalSetCurrentKey(-1); - end; - -var - AItem: string; - AIStart, AItemIndex, I, L: Integer; - S: string; -begin - Result := False; - if GetItemCount = 0 then - begin - CheckCurrentKey; - Exit; - end; - - if ASynchronizeWithText and ActiveProperties.MRUMode then - begin - AItemIndex := IndexOf(AText); - if AItemIndex = -1 then - InternalSetCurrentKey(-1) - else - begin - Result := True; - ATail := ''; - InternalSetCurrentKey(AItemIndex); - end; - Exit; - end; - - if ANext then - AIStart := ItemIndex - else - AIStart := -1; - I := AIStart; - L := Length(AText); - repeat - Inc(I); - if (I = GetItemCount) or (I = AIStart) or (L = 0) then - Break; - - AItem := GetItem(I); - S := Copy(AItem, 1, L); - - if InternalCompareString(AText, S, False) then - begin - if ActiveProperties.EditingStyle <> esEdit then - AText := S; - ATail := Copy(AItem, L + 1, Length(AItem) - L); - InternalSetCurrentKey(I); - Result := True; - Break; - end; - until Result; - - if not Result then - CheckCurrentKey; -end; - -function TcxCustomTextEditLookupData.GetVisualAreaPreferredSize(AMaxHeight: Integer; - AWidth: Integer = 0): TSize; -begin - Result := cxNullSize; -end; - -procedure TcxCustomTextEditLookupData.Go(ADirection: TcxEditLookupDataGoDirection; - ACircular: Boolean); -var - ANewCurrentKey: Integer; - AItemIndex: Integer; -begin - if GetItemCount = 0 then - Exit; - ANewCurrentKey := 0; - if ItemIndex = -1 then - AItemIndex := CurrentKey - else - AItemIndex := ItemIndex; - case ADirection of - egdBegin: - ANewCurrentKey := 0; - egdEnd: - ANewCurrentKey := GetItemCount - 1; - egdPrev: - begin - ANewCurrentKey := AItemIndex - 1; - if (ANewCurrentKey < 0) then - if ACircular then - ANewCurrentKey := GetItemCount - 1 - else - ANewCurrentKey := AItemIndex; - end; - egdNext: - begin - ANewCurrentKey := AItemIndex + 1; - if (ANewCurrentKey = GetItemCount) then - if ACircular then - ANewCurrentKey := 0 - else - ANewCurrentKey := AItemIndex; - end; - egdPageUp: - if AItemIndex = -1 then - if ACircular then - ANewCurrentKey := GetItemCount - 1 - else - ANewCurrentKey := AItemIndex - else - begin - ANewCurrentKey := AItemIndex - ActiveProperties.GetDropDownPageRowCount + 1; - if (ANewCurrentKey < 0) then - if ACircular then - if AItemIndex = 0 then - ANewCurrentKey := GetItemCount - 1 - else - ANewCurrentKey := 0 - else - ANewCurrentKey := 0; - end; - egdPageDown: - begin - if AItemIndex = -1 then - ANewCurrentKey := AItemIndex + ActiveProperties.GetDropDownPageRowCount - else - ANewCurrentKey := AItemIndex + ActiveProperties.GetDropDownPageRowCount - 1; - if (ANewCurrentKey >= GetItemCount) then - if ACircular then - if AItemIndex = GetItemCount - 1 then - ANewCurrentKey := 0 - else - ANewCurrentKey := GetItemCount - 1 - else - ANewCurrentKey := GetItemCount - 1; - end; - end; - if (FList = nil) or not FList.IsVisible or - ActiveProperties.ImmediateUpdateText and Edit.DoEditing then - CurrentKey := ANewCurrentKey - else - InternalSetItemIndex(ANewCurrentKey); -end; - -procedure TcxCustomTextEditLookupData.Initialize(AVisualControlsParent: TWinControl); -begin - if (FList = nil) and (GetListBoxClass <> nil) then - FList := GetListBoxClass.Create(AVisualControlsParent); - with FList do - begin - Color := Edit.GetBackgroundColor; - Font := Edit.VisibleFont; - Canvas.Font := Font; - Parent := AVisualControlsParent; - OnSelectItem := HandleSelectItem; - SetItemCount(GetItemCount); - ItemIndex := FItemIndex; - RecreateWindow; - end; - TextChanged; -end; - -procedure TcxCustomTextEditLookupData.InternalSetCurrentKey(Value: Integer); -begin - if (Value >= -1) and (Value < GetItemCount) then - begin - FCurrentKey := Value; - InternalSetItemIndex(Value); - end; -end; - -function TcxCustomTextEditLookupData.IsEmpty: Boolean; -begin - Result := GetItemCount = 0; -end; - -function TcxCustomTextEditLookupData.IsMouseOverList(const P: TPoint): Boolean; -begin - Result := PtInRect(FList.BoundsRect, FList.ScreenToClient(P)); -end; - -procedure TcxCustomTextEditLookupData.ListChanged; -begin - if FList <> nil then - FList.SetItemCount(GetItemCount); -end; - -procedure TcxCustomTextEditLookupData.SetListItemIndex(Value: Integer); -begin - FList.ItemIndex := Value; -end; - -function TcxCustomTextEditLookupData.Locate(var AText, ATail: string; - ANext: Boolean): Boolean; -begin - Result := InternalLocate(AText, ATail, ANext, False); -end; - -procedure TcxCustomTextEditLookupData.PositionVisualArea(const AClientRect: TRect); -begin - with AClientRect do - begin - FList.SetBounds(Left, Top, Right - Left, Bottom - Top); - if FList.HandleAllocated then - FList.SetScrollWidth(FList.ScrollWidth); - end; -end; - -procedure TcxCustomTextEditLookupData.PropertiesChanged; -begin - ListChanged; -end; - -procedure TcxCustomTextEditLookupData.SelectItem; -var - APrevCurrentKey: TcxEditValue; -begin - if (FItemIndex = -1) or (CurrentKey <> FItemIndex) and not Edit.DoEditing then - Exit; - APrevCurrentKey := CurrentKey; - CurrentKey := FItemIndex; - if VarEqualsExact(APrevCurrentKey, CurrentKey) then - DoSelectItem; -end; - -function TcxCustomTextEditLookupData.GetActiveControl: TControl; -begin - Result := FList; -end; - -function TcxCustomTextEditLookupData.GetCurrentKey: TcxEditValue; -begin - Result := FCurrentKey; -end; - -function TcxCustomTextEditLookupData.GetOnCurrentKeyChanged: TNotifyEvent; -begin - Result := FOnCurrentKeyChanged; -end; - -function TcxCustomTextEditLookupData.GetOnSelectItem: TNotifyEvent; -begin - Result := FOnSelectItem; -end; - -function TcxCustomTextEditLookupData.GetEdit: TcxCustomTextEdit; -begin - Result := TcxCustomTextEdit(FOwner); -end; - -function TcxCustomTextEditLookupData.GetItems: TStrings; -begin - Result := ActiveProperties.FLookupItems; -end; - -function TcxCustomTextEditLookupData.GetActiveProperties: TcxCustomTextEditProperties; -begin - Result := Edit.ActiveProperties; -end; - -function TcxCustomTextEditLookupData.IndexOf(const AText: string): Integer; -var - ACount, I: Integer; -begin - Result := -1; - ACount := GetItemCount; - for I := 0 to ACount - 1 do - if InternalCompareString(AText, GetItem(I), False) then - begin - Result := I; - Break; - end; -end; - -procedure TcxCustomTextEditLookupData.InternalSetItemIndex(Value: Integer); -begin - if (Value < -1) or (Value >= GetItemCount) or (Value = FItemIndex) and (Value <> -1) then - Exit; - if (FList <> nil) and (GetItemCount > 0) then - begin - if Value = -1 then - SetListItemIndex(0); - SetListItemIndex(Value); - end; - FItemIndex := Value; -end; - -procedure TcxCustomTextEditLookupData.SetCurrentKey(const AKey: TcxEditValue); -var - APrevCurrentKey: TcxEditValue; -begin - APrevCurrentKey := FCurrentKey; - InternalSetCurrentKey(AKey); - if Edit <> nil then - Edit.LockLookupDataTextChanged; - try - if not VarEqualsExact(APrevCurrentKey, FCurrentKey) or ((AKey >= 0) and (AKey < GetItemCount) and not InternalCompareString(Edit.Text, GetItem(AKey), True)) then - DoSelectItem; - finally - if Edit <> nil then - Edit.UnlockLookupDataTextChanged; - end; -end; - -procedure TcxCustomTextEditLookupData.SetItemIndex(Value: Integer); -begin - if (FList = nil) or not FList.IsVisible or ActiveProperties.ImmediateUpdateText then - CurrentKey := Value - else - InternalSetItemIndex(Value); -end; - -procedure TcxCustomTextEditLookupData.SetItems(Value: TStrings); -begin - ActiveProperties.FLookupItems.Assign(Value); -end; - -procedure TcxCustomTextEditLookupData.SetOnCurrentKeyChanged(Value: TNotifyEvent); -begin - FOnCurrentKeyChanged := Value; -end; - -procedure TcxCustomTextEditLookupData.SetOnSelectItem(Value: TNotifyEvent); -begin - FOnSelectItem := Value; -end; - -procedure TcxCustomTextEditLookupData.TextChanged; -var - AText, ATail: string; -begin - if Edit.EditModeSetting then - Exit; - AText := Edit.Text; - if (ItemIndex >= GetItemCount) or - not InternalCompareString(GetDisplayText(ItemIndex), AText, False) then - InternalLocate(AText, ATail, False, True); -end; - -{ TcxCustomTextEditViewData } - -procedure TcxCustomTextEditViewData.Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - with AViewInfo as TcxCustomTextEditViewInfo do - begin - DrawSelectionBar := False; - EditingStyle := Properties.EditingStyle; - IsEditClass := GetIsEditClass; - if Edit <> nil then - TcxCustomTextEditViewInfo(AViewInfo).HasPopupWindow := Edit.HasPopupWindow - else - TcxCustomTextEditViewInfo(AViewInfo).HasPopupWindow := False; - CalculateTextEditViewInfo(ACanvas, Self, TcxCustomTextEditViewInfo(AViewInfo), AIsMouseEvent); - MaxLineCount := Self.GetMaxLineCount; - TextOutData.Initialized := False; - end; - PrepareDrawTextFlags(ACanvas, AViewInfo); -end; - -procedure TcxCustomTextEditViewData.DisplayValueToDrawValue(const ADisplayValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); -begin - with TcxCustomTextEditViewInfo(AViewInfo) do - begin - Text := ADisplayValue; - Properties.DisplayValueToDisplayText(Text); - end; -end; - -procedure TcxCustomTextEditViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -begin - if PreviewMode then - TcxCustomTextEditViewInfo(AViewInfo).Text := '' - else - TcxCustomTextEditViewInfo(AViewInfo).Text := - string(EditValueToDisplayText(AEditValue)); - PrepareSelection(AViewInfo); -end; - -function TcxCustomTextEditViewData.GetClientExtent(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo): TRect; -begin - Result := inherited GetClientExtent(ACanvas, AViewInfo); - if not IsInplace and IsComboBoxStyle and - AreVisualStylesMustBeUsed(Style.LookAndFeel.NativeStyle, totEdit) then - Inc(Result.Right); -end; - -function TcxCustomTextEditViewData.GetDrawTextFlags: DWORD; -const - AHorzAlignmentFlags: array [TcxEditHorzAlignment] of DWORD = ( - CXTO_LEFT, CXTO_RIGHT, CXTO_CENTER_HORIZONTALLY - ); - AVertAlignmentFlags: array [TcxEditVertAlignment] of DWORD = ( - CXTO_TOP, CXTO_BOTTOM, CXTO_CENTER_VERTICALLY - ); -begin - Result := AHorzAlignmentFlags[HorzAlignment]; - Result := Result or AVertAlignmentFlags[VertAlignment]; - Result := Result or CXTO_SINGLELINE; - Result := Result or CXTO_PREVENT_LEFT_EXCEED or CXTO_PREVENT_TOP_EXCEED; -end; - -function TcxCustomTextEditViewData.GetDrawTextOffset: TRect; -begin - Result := GetTextEditDrawTextOffset(Self); -end; - -procedure TcxCustomTextEditViewData.PrepareSelection(AViewInfo: TcxCustomEditViewInfo); -var - ACustomTextEditViewInfo: TcxCustomTextEditViewInfo; -begin - ACustomTextEditViewInfo := TcxCustomTextEditViewInfo(AViewInfo); - ACustomTextEditViewInfo.SelStart := SelStart; - ACustomTextEditViewInfo.SelLength := SelLength; - if SelLength = 0 then - Exit; - if SelBackgroundColor = clDefault then - begin - if SelTextColor = clDefault then - begin - if Style.Color = clHighlight then - begin - ACustomTextEditViewInfo.SelBackgroundColor := clBlack; - ACustomTextEditViewInfo.SelTextColor := clWhite; - end - else - begin - ACustomTextEditViewInfo.SelBackgroundColor := clHighlight; - ACustomTextEditViewInfo.SelTextColor := clHighlightText; - end; - end - else - begin - ACustomTextEditViewInfo.SelTextColor := SelTextColor; - ACustomTextEditViewInfo.SelBackgroundColor := InvertColor(SelTextColor); - end; - end - else - begin - ACustomTextEditViewInfo.SelBackgroundColor := SelBackgroundColor; - if SelTextColor = clDefault then - ACustomTextEditViewInfo.SelTextColor := InvertColor(SelBackgroundColor) - else - ACustomTextEditViewInfo.SelTextColor := SelTextColor; - end; -end; - -procedure TcxCustomTextEditViewData.CalculateButtonNativeInfo(AButtonViewInfo: TcxEditButtonViewInfo); -begin - inherited CalculateButtonNativeInfo(AButtonViewInfo); - if NativeStyle and IsCompositionEnabled and not IsInplace and - (Properties.EditingStyle = esFixedList) and - AButtonViewInfo.Data.ComboBoxStyle and - (AButtonViewInfo.Data.NativeState <> CBXS_DISABLED) then - AButtonViewInfo.Data.NativeState := CBXS_NORMAL; -end; - -function TcxCustomTextEditViewData.GetIsEditClass: Boolean; -begin - Result := (Edit <> nil) and Edit.IsEditClass; -end; - -function TcxCustomTextEditViewData.GetMaxLineCount: Integer; -begin - Result := MaxLineCount; -end; - -procedure TcxCustomTextEditViewData.InitCacheData; -begin - inherited InitCacheData; - FIsValueEditorWithValueFormatting := Properties.IsValueEditorWithValueFormatting; -end; - -function TcxCustomTextEditViewData.InternalEditValueToDisplayText( - AEditValue: TcxEditValue): string; -begin - Result := ''; - try - if FIsValueEditorWithValueFormatting then - Result := VarToStr(AEditValue) - else - Result := Properties.GetDefaultDisplayValue(AEditValue, InternalFocused); - finally - Properties.DisplayValueToDisplayText(string(Result)); - end; -end; - -function TcxCustomTextEditViewData.InternalGetEditContentSize(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; const AEditSizeProperties: TcxEditSizeProperties): TSize; -var - AContentSize: TSize; -begin - AContentSize := inherited InternalGetEditContentSize(ACanvas, AEditValue, - AEditSizeProperties); - Result := GetTextEditContentSize(ACanvas, Self, - EditValueToDisplayText(AEditValue), GetDrawTextFlags, AEditSizeProperties); - CheckSize(Result, AContentSize); -end; - -function TcxCustomTextEditViewData.IsComboBoxStyle: Boolean; -begin - Result := False; -end; - -procedure TcxCustomTextEditViewData.PrepareDrawTextFlags(ACanvas: TcxCanvas; - AViewInfo: TcxCustomEditViewInfo); -begin - with TcxCustomTextEditViewInfo(AViewInfo) do - begin - if not Properties.IsMultiLine and (esoAutoHeight in Properties.GetSupportedOperations) and - (epoAutoHeight in Self.PaintOptions) then - PrepareTextEditDrawTextFlags(ACanvas, Self, TcxCustomTextEditViewInfo(AViewInfo)) - else - DrawTextFlags := GetDrawTextFlags; - if epoShowEndEllipsis in PaintOptions then - DrawTextFlags := DrawTextFlags or CXTO_END_ELLIPSIS; - ComboBoxStyle := IsComboBoxStyle; - end; -end; - -function TcxCustomTextEditViewData.GetProperties: TcxCustomTextEditProperties; -begin - Result := TcxCustomTextEditProperties(FProperties); -end; - -function TcxCustomTextEditViewData.InvertColor(AColor: TColor): TColor; -begin - Result := ColorToRGB(AColor) xor $FFFFFF; -end; - -{ TcxCustomTextEditViewInfo } - -destructor TcxCustomTextEditViewInfo.Destroy; -begin - cxResetTextRows(TextOutData.TextRows); - inherited Destroy; -end; - -function TcxCustomTextEditViewInfo.NeedShowHint(ACanvas: TcxCanvas; - const P: TPoint; const AVisibleBounds: TRect; out AText: TCaption; - out AIsMultiLine: Boolean; out ATextRect: TRect): Boolean; - - function GetRealVisibleBounds: TRect; - begin - Result := AVisibleBounds; - if EqualRect(Result, cxEmptyRect) then - Result := TextRect - else - begin - OffsetRect(Result, -Left, -Top); - IntersectRect(Result, TextRect, Result); - end; - end; - - function IsMultiLine(ATextFlags: DWORD): Boolean; - begin - Result := (ATextFlags and CXTO_SINGLELINE = 0) and (ATextFlags and CXTO_WORDBREAK <> 0); - end; - - function GetCalcTextFlags: Integer; - begin - Result := DrawTextFlags and not (CXTO_CENTER_VERTICALLY or CXTO_BOTTOM or CXTO_SINGLELINE) or - CXTO_CALCRECT; - end; - - function IsTextNotFullyVisible(const ARealVisibleBounds: TRect): Boolean; - var - R: TRect; - begin - ACanvas.Font := Font; - R := ARealVisibleBounds; - cxTextOut(ACanvas.Canvas, Text, R, GetCalcTextFlags); - Result := (R.Bottom > ARealVisibleBounds.Bottom) or (R.Right > ARealVisibleBounds.Right); - end; - -var - ARealVisibleBounds: TRect; -begin - ARealVisibleBounds := GetRealVisibleBounds; - Result := PtInRect(ARealVisibleBounds, Point(P.X - Left, P.Y - Top)) and - IsTextNotFullyVisible(ARealVisibleBounds); - if Result then - begin - AIsMultiLine := IsMultiLine(DrawTextFlags); - AText := Text; - ATextRect := TextRect; - OffsetRect(ATextRect, Left, Top); - end - else - Result := inherited NeedShowHint(ACanvas, P, AVisibleBounds, AText, AIsMultiLine, ATextRect); -end; - -procedure TcxCustomTextEditViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - inherited Offset(DX, DY); - OffsetRect(TextRect, DX, DY); - with TextOutData do - if Initialized then - begin - OffsetRect(TextRect, DX, DY); - for I := 0 to cxGetTextRowCount(TextRows) - 1 do - with cxGetTextRow(TextRows, I)^ do - begin - TextOriginX := TextOriginX + DX; - TextOriginY := TextOriginY + DY; - end; - end; -end; - -procedure TcxCustomTextEditViewInfo.DrawText(ACanvas: TcxCanvas); -begin - DrawEditText(ACanvas, Self); -end; - -{$IFDEF DELPHI10} -function TcxCustomTextEditViewInfo.GetTextBaseLine: Integer; -var - ACanvas: TcxScreenCanvas; - ATextMetric: TTextMetric; -begin - ACanvas := TcxScreenCanvas.Create; - try - ACanvas.Font := Font; - GetTextMetrics(ACanvas.Handle, ATextMetric); - case EditProperties.Alignment.Vert of - taTopJustify: - Result := TextRect.Top + ATextMetric.tmAscent + 1; - taBottomJustify: - Result := TextRect.Bottom - ATextMetric.tmDescent + 1; - else - Result := TextRect.Top + (TextRect.Bottom - TextRect.Top - ATextMetric.tmHeight) div 2 + ATextMetric.tmAscent + 1; - end; - finally - ACanvas.Free; - end; -end; -{$ENDIF} - -procedure TcxCustomTextEditViewInfo.InternalPaint(ACanvas: TcxCanvas); -begin - DrawTextEdit(ACanvas, Self); -end; - -{ TcxCustomTextEditProperties } - -constructor TcxCustomTextEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FCharCase := ecNormal; - FEchoMode := eemNormal; - FFixedListSelection := True; - FHideSelection := True; - FImeMode := imDontCare; - FIncrementalSearch := True; - FLookupItems := TStringList.Create; - FLookupItems.Duplicates := dupAccept; - FLookupItems.OnChange := LookupItemsChanged; - cxFormatController.AddListener(Self); -end; - -destructor TcxCustomTextEditProperties.Destroy; -begin - cxFormatController.RemoveListener(Self); - FreeAndNil(FLookupItems); - inherited Destroy; -end; - -procedure TcxCustomTextEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomTextEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomTextEditProperties do - begin - Self.CharCase := CharCase; - Self.EchoMode := EchoMode; - Self.FixedListSelection := FixedListSelection; - Self.HideCursor := HideCursor; - Self.HideSelection := HideSelection; - Self.ImmediateUpdateText := ImmediateUpdateText; - Self.IncrementalSearch := IncrementalSearch; - Self.MRUMode := MRUMode; - Self.ValidChars := ValidChars; - - Self.LookupItemsSorted := False; - Self.LookupItems.Assign(LookupItems); - Self.LookupItemsSorted := LookupItemsSorted; - - Self.AssignedValues.DisplayFormat := False; - if AssignedValues.DisplayFormat then - Self.DisplayFormat := DisplayFormat; - - Self.AssignedValues.EditFormat := False; - if AssignedValues.EditFormat then - Self.EditFormat := EditFormat; - - Self.AssignedValues.MaxLength := False; - if AssignedValues.MaxLength then - Self.MaxLength := MaxLength; - - Self.OEMConvert := OEMConvert; - Self.ImeMode := ImeMode; - Self.ImeName := ImeName; - Self.PasswordChar := PasswordChar; - Self.UseDisplayFormatWhenEditing := UseDisplayFormatWhenEditing; - Self.OnNewLookupDisplayText := OnNewLookupDisplayText; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomTextEditProperties.CanCompareEditValue: Boolean; -begin - Result := True; -end; - -function TcxCustomTextEditProperties.CompareDisplayValues( - const AEditValue1, AEditValue2: TcxEditValue): Boolean; -var - AText1, AText2: string; -begin - AText1 := GetDisplayText(AEditValue1, True); - AText2 := GetDisplayText(AEditValue2, True); - Result := InternalCompareString(AText1, AText2, True); -end; - -class function TcxCustomTextEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxTextEdit; -end; - -function TcxCustomTextEditProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -var - AText: string; -begin - AText := ''; - try - if IsValueEditorWithValueFormatting then - AText := VarToStr(AEditValue) - else - AText := GetDefaultDisplayValue(AEditValue, - not AIsInplace and not IsEditValueConversionDependOnFocused); - finally - DisplayValueToDisplayText(AText); - Result := AText; - end; -end; - -function TcxCustomTextEditProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := inherited GetSupportedOperations + [esoAutoHeight, esoEditing, - esoFiltering, esoHorzAlignment, esoIncSearch, esoSorting]; -end; - -class function TcxCustomTextEditProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomTextEditViewInfo; -end; - -function TcxCustomTextEditProperties.IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; -begin - Result := VarIsNull(EditValue) or not VarIsStr(EditValue) or - IsDisplayValueValid(EditValue, AEditFocused); -end; - -procedure TcxCustomTextEditProperties.PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); - - procedure InternalPrepareDisplayValue(AValue: Variant); - - var - AEditFormat: string; - AIsCurrency, AIsOnGetTextAssigned: Boolean; - S: string; -{$IFDEF DELPHI6} - APrecision: Integer; - V: TBcd; -{$ENDIF} - begin - if AEditFocused then - begin - AEditFormat := InternalGetEditFormat(AIsCurrency, AIsOnGetTextAssigned); - -{$IFDEF DELPHI6} - if IDefaultValuesProvider = nil then - APrecision := cxEditDefaultPrecision - else - APrecision := IDefaultValuesProvider.DefaultPrecision; -{$ENDIF} - - if AIsCurrency then -{$IFDEF DELPHI6} - begin - DisplayValue := VarToStr(AValue); - if TryStrToBcd(DisplayValue, V) then - DisplayValue := BcdToStrF(V, ffFixed, APrecision, CurrencyDecimals); - end -{$ELSE} - DisplayValue := FloatToStrF(AValue, ffFixed, cxEditDefaultPrecision, CurrencyDecimals) -{$ENDIF} - else - if AEditFormat = '' then - begin -{$IFDEF DELPHI6} - S := VarToStr(AValue); - if TryStrToBcd(S, V) then - S := BcdToStrF(V, ffGeneral, APrecision, 0); -{$ELSE} - S := FloatToStrF(AValue, ffGeneral, cxEditDefaultPrecision, 0); -{$ENDIF} - if HasDigitGrouping(False) then - InsertThousandSeparator(S); - DisplayValue := S; - end - else - DisplayValue := FormatFloat(AEditFormat, AValue); - end - else - if DisplayFormat <> '' then - DisplayValue := FormatFloat(DisplayFormat, AValue) - else - DisplayValue := VarToStr(AValue); - end; - -begin - if IsEditValueNumeric then - begin - if VarIsSoftNull(AEditValue) then - DisplayValue := '' - else - if not VarIsNumericEx(AEditValue) and not VarIsStr(AEditValue) then - raise EConvertError.CreateFmt(cxGetResourceString(@cxSEditNumericValueConvertError), []) - else - InternalPrepareDisplayValue(AEditValue); - end - else - if VarIsArray(AEditValue) and not (VarArrayDimCount(AEditValue) = 1) then - DisplayValue := '' - else - DisplayValue := dxVariantToString(AEditValue); -end; - -procedure TcxCustomTextEditProperties.ValidateDisplayValue(var DisplayValue: TcxEditValue; - var ErrorText: TCaption; var Error: Boolean; AEdit: TcxCustomEdit); -begin - if IsEditValueNumeric and IsValueBoundsDefined then - CheckEditorValueBounds(DisplayValue, ErrorText, Error, AEdit); - inherited ValidateDisplayValue(DisplayValue, ErrorText, Error, AEdit); -end; - -procedure TcxCustomTextEditProperties.DisplayValueToDisplayText( - var ADisplayValue: string); - - function GetPasswordChar: TCaptionChar; - begin - if PasswordChar = #0 then - Result := '*' - else - Result := PasswordChar; - end; - -begin - if EchoMode <> eemNormal then - ADisplayValue := StringOfChar(GetPasswordChar, Length(ADisplayValue)) - else - if CharCase <> ecNormal then - CheckCharsRegister(ADisplayValue, CharCase); -end; - -function TcxCustomTextEditProperties.IsDisplayValueValid(var DisplayValue: TcxEditValue; AEditFocused: Boolean): Boolean; -var - AText: string; -begin - AText := VarToStr(DisplayValue); - Result := not((AText <> '') and (EditingStyle in [esEditList, esFixedList]) and - UseLookupData and not FindLookupText(AText)); - if Result then - begin - CheckCharsRegister(AText, CharCase); - DisplayValue := AText; - end; -end; - -procedure TcxCustomTextEditProperties.SetMinMaxValues(AMinValue, AMaxValue: Double); -begin - FillMinMaxValues(AMinValue, AMaxValue); -end; - -procedure TcxCustomTextEditProperties.AlignmentChangedHandler(Sender: TObject); -begin - BeginUpdate; - try - inherited AlignmentChangedHandler(Sender); - finally - EndUpdate; - end; -end; - -procedure TcxCustomTextEditProperties.BaseSetAlignment(Value: TcxEditAlignment); -begin - BeginUpdate; - try - inherited BaseSetAlignment(Value); - finally - EndUpdate; - end; -end; - -function TcxCustomTextEditProperties.CanValidate: Boolean; -begin - Result := True; -end; - -// obsolete -procedure TcxCustomTextEditProperties.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('IsDisplayFormatAssigned', ReadIsDisplayFormatAssigned, - nil, False); -end; - -class function TcxCustomTextEditProperties.GetAssignedValuesClass: TcxCustomEditPropertiesValuesClass; -begin - Result := TcxTextEditPropertiesValues; -end; - -function TcxCustomTextEditProperties.GetDisplayFormatOptions: TcxEditDisplayFormatOptions; -begin - Result := [dfoSupports]; -end; - -function TcxCustomTextEditProperties.GetValidateErrorText(AErrorKind: TcxEditErrorKind): string; -begin - if AErrorKind = ekValueOutOfBounds then - Result := cxGetResourceString(@cxSEditValueOutOfBounds) - else - Result := inherited GetValidateErrorText(AErrorKind); -end; - -class function TcxCustomTextEditProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomTextEditViewData; -end; - -function TcxCustomTextEditProperties.GetEditingStyle: TcxEditEditingStyle; -begin - if FHideCursor then - Result := esNoEdit - else - Result := esEdit; -end; - -class function TcxCustomTextEditProperties.GetLookupDataClass: TcxInterfacedPersistentClass; -begin - Result := TcxCustomTextEditLookupData; -end; - -function TcxCustomTextEditProperties.HasDigitGrouping( - AIsDisplayValueSynchronizing: Boolean): Boolean; -begin - Result := False; -end; - -function TcxCustomTextEditProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - Result := evsText; -end; - -function TcxCustomTextEditProperties.HasDisplayValue: Boolean; -begin - Result := True; -end; - -procedure TcxCustomTextEditProperties.FormatChanged; -begin - FFormatChanging := True; - try - Changed; - finally - FFormatChanging := False; - end; -end; - -function TcxCustomTextEditProperties.IsResetEditClass: Boolean; -begin - Result := EditingStyle <> esNoEdit; -end; - -function TcxCustomTextEditProperties.CanIncrementalSearch: Boolean; -begin - Result := (EditingStyle = esEdit) and IncrementalSearch or - (EditingStyle in [esEditList, esFixedList]) -end; - -procedure TcxCustomTextEditProperties.CheckEditorValueBounds(var DisplayValue: TcxEditValue; - var ErrorText: TCaption; var Error: Boolean; AEdit: TcxCustomEdit); -var - AEditValue: TcxEditValue; -begin - AEdit.PrepareEditValue(DisplayValue, AEditValue, AEdit.InternalFocused); - if (VarIsNumericEx(AEditValue) or VarIsDate(AEditValue)) and - (IsValueBoundDefined(evbMin) and (AEditValue < MinValue) or - IsValueBoundDefined(evbMax) and (AEditValue > MaxValue)) then - begin - Error := True; - ErrorText := GetValidateErrorText(ekValueOutOfBounds); - end; -end; - -function TcxCustomTextEditProperties.DefaultFocusedDisplayValue: TcxEditValue; -begin - Result := ''; -end; - -function TcxCustomTextEditProperties.FindLookupText(const AText: string): Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to FLookupItems.Count - 1 do - if InternalCompareString(AText, FLookupItems[I], False) then - begin - Result := True; - Break; - end; -end; - -function TcxCustomTextEditProperties.GetDefaultDisplayFormat: string; -begin - Result := ''; -end; - -function TcxCustomTextEditProperties.GetDefaultDisplayValue(const AEditValue: TcxEditValue; - AEditFocused: Boolean): TcxEditValue; -var - AValue: TcxEditValue; -begin - AValue := AEditValue; - if IsEditValueValid(AValue, AEditFocused) then - PrepareDisplayValue(AValue, Result, AEditFocused) - else - if VarIsDate(AEditValue) then - Result := DateTimeToStr(AEditValue) - else - Result := VarToStr(AEditValue) -end; - -function TcxCustomTextEditProperties.GetDefaultMaxLength: Integer; -begin - if IDefaultValuesProvider = nil then - Result := 0 - else - Result := IDefaultValuesProvider.DefaultMaxLength; -end; - -function TcxCustomTextEditProperties.GetDropDownPageRowCount: Integer; -begin - Result := cxEditDefaultDropDownPageRowCount; -end; - -function TcxCustomTextEditProperties.InternalGetEditFormat( - out AIsCurrency, AIsOnGetTextAssigned: Boolean; - AEdit: TcxCustomTextEdit = nil): string; -begin - AIsCurrency := False; - AIsOnGetTextAssigned := False; - Result := ''; - if AssignedValues.EditFormat then - Result := FEditFormat - else - begin - if not ((AEdit <> nil) and AEdit.IsInplace) and (IDefaultValuesProvider <> nil) and - IDefaultValuesProvider.IsOnGetTextAssigned then - begin - AIsOnGetTextAssigned := True; - Exit; - end; - if (IDefaultValuesProvider <> nil) and - (IDefaultValuesProvider.DefaultEditFormat <> '') then - Result := IDefaultValuesProvider.DefaultEditFormat - else - begin - if AssignedValues.DisplayFormat then - Result := DisplayFormat - else - if (IDefaultValuesProvider <> nil) and (IDefaultValuesProvider.DefaultDisplayFormat <> '') then - Result := IDefaultValuesProvider.DefaultDisplayFormat - else - if GetDefaultDisplayFormat <> '' then - Result := GetDefaultDisplayFormat - else - if IDefaultValuesProvider <> nil then - AIsCurrency := not(dfoNoCurrencyValue in DisplayFormatOptions) and - IDefaultValuesProvider.IsCurrency; - if not UseDisplayFormatWhenEditing then - Result := ''; - end; - end; -end; - -function TcxCustomTextEditProperties.IsEditValueNumeric: Boolean; -begin - Result := False; -end; - -function TcxCustomTextEditProperties.IsLookupDataVisual: Boolean; -begin - Result := False; -end; - -function TcxCustomTextEditProperties.IsMultiLine: Boolean; -begin - Result := False; -end; - -function TcxCustomTextEditProperties.IsPopupKey(Key: Word; Shift: TShiftState): Boolean; -begin - Result := False; -end; - -function TcxCustomTextEditProperties.IsValueBoundDefined( - ABound: TcxEditValueBound): Boolean; -begin - if Integer(AssignedValues.MinValue) + Integer(AssignedValues.MaxValue) = 1 then - Result := (ABound = evbMin) and AssignedValues.MinValue or - (ABound = evbMax) and AssignedValues.MaxValue - else - Result := MinValue < MaxValue; -end; - -function TcxCustomTextEditProperties.IsValueBoundsDefined: Boolean; -begin - Result := IsValueBoundDefined(evbMin) or IsValueBoundDefined(evbMax); -end; - -procedure TcxCustomTextEditProperties.LookupDataChanged(Sender: TObject); -begin - Changed; -end; - -procedure TcxCustomTextEditProperties.MaxLengthChanged; -begin - Changed; -end; - -procedure TcxCustomTextEditProperties.SetCharCase(Value: TEditCharCase); -begin - if Value <> FCharCase then - begin - FCharCase := Value; - Changed; - end; -end; - -function TcxCustomTextEditProperties.UseLookupData: Boolean; -begin - Result := GetLookupDataClass <> nil; -end; - -function TcxCustomTextEditProperties.GetAssignedValues: TcxTextEditPropertiesValues; -begin - Result := TcxTextEditPropertiesValues(FAssignedValues); -end; - -function TcxCustomTextEditProperties.GetDisplayFormat: string; -begin - if AssignedValues.DisplayFormat then - Result := FDisplayFormat - else - if (IDefaultValuesProvider = nil) or - (IDefaultValuesProvider.DefaultDisplayFormat = '') then - Result := GetDefaultDisplayFormat - else - Result := IDefaultValuesProvider.DefaultDisplayFormat; -end; - -function TcxCustomTextEditProperties.GetEditFormat: string; -var - A: Boolean; -begin - Result := InternalGetEditFormat(A, A); -end; - -function TcxCustomTextEditProperties.GetInnerEditMaxLength: Integer; -begin - Result := GetMaxLength; -end; - -function TcxCustomTextEditProperties.GetLookupItems: TStrings; -begin - Result := FLookupItems; -end; - -function TcxCustomTextEditProperties.GetLookupItemsSorted: Boolean; -begin - Result := FLookupItems.Sorted; -end; - -function TcxCustomTextEditProperties.GetMaxLength: Integer; -begin - if AssignedValues.MaxLength then - Result := FMaxLength - else - Result := GetDefaultMaxLength; -end; - -function TcxCustomTextEditProperties.GetViewStyle: TcxTextEditViewStyle; -const - AViewStyleMap: array[TcxEditButtonsViewStyle] of TcxTextEditViewStyle = - (vsNormal, vsButtonsOnly, vsButtonsAutoWidth); -begin - if ButtonsViewStyle <> bvsNormal then - Result := AViewStyleMap[ButtonsViewStyle] - else - if HideCursor then - Result := vsHideCursor - else - Result := vsNormal; -end; - -function TcxCustomTextEditProperties.IsDisplayFormatStored: Boolean; -begin - Result := AssignedValues.DisplayFormat; -end; - -function TcxCustomTextEditProperties.IsEditFormatStored: Boolean; -begin - Result := AssignedValues.EditFormat; -end; - -function TcxCustomTextEditProperties.IsMaxLengthStored: Boolean; -begin - Result := AssignedValues.MaxLength; -end; - -procedure TcxCustomTextEditProperties.LookupItemsChanged(Sender: TObject); -begin - Changed; -end; - -procedure TcxCustomTextEditProperties.ReadIsDisplayFormatAssigned(Reader: TReader); -begin - AssignedValues.DisplayFormat := Reader.ReadBoolean; -end; - -procedure TcxCustomTextEditProperties.SetDisplayFormat(const Value: string); -begin - if AssignedValues.DisplayFormat and (Value = FDisplayFormat) then - Exit; - - AssignedValues.FDisplayFormat := True; - FDisplayFormat := Value; - Changed; -end; - -// obsolete -procedure TcxCustomTextEditProperties.SetAssignedValues( - Value: TcxTextEditPropertiesValues); -begin - FAssignedValues.Assign(Value); -end; - -procedure TcxCustomTextEditProperties.SetEchoMode(Value: TcxEditEchoMode); -begin - if Value <> FEchoMode then - begin - FEchoMode := Value; - Changed; - end; -end; - -procedure TcxCustomTextEditProperties.SetEditFormat(const Value: string); -begin - if AssignedValues.EditFormat and (Value = FEditFormat) then - Exit; - - AssignedValues.FEditFormat := True; - FEditFormat := Value; - Changed; -end; - -procedure TcxCustomTextEditProperties.SetFixedListSelection(Value: Boolean); -begin - if Value <> FFixedListSelection then - begin - FFixedListSelection := Value; - if EditingStyle = esFixedList then - Changed; - end; -end; - -procedure TcxCustomTextEditProperties.SetHideCursor(Value: Boolean); -begin - if Value <> FHideCursor then - begin - FHideCursor := Value; - Changed; - end; -end; - -procedure TcxCustomTextEditProperties.SetHideSelection(Value: Boolean); -begin - if Value <> FHideSelection then - begin - FHideSelection := Value; - Changed; - end; -end; - -procedure TcxCustomTextEditProperties.SetImeMode(Value: TImeMode); -begin - if FImeMode <> Value then - begin - FImeMode := Value; - Changed; - end; -end; - -procedure TcxCustomTextEditProperties.SetImeName(const Value: TImeName); -begin - if FImeName <> Value then - begin - FImeName := Value; - Changed; - end; -end; - -procedure TcxCustomTextEditProperties.SetIncrementalSearch(Value: Boolean); -begin - if Value <> FIncrementalSearch then - begin - FIncrementalSearch := Value; - Changed; - end; -end; - -procedure TcxCustomTextEditProperties.SetLookupItems(Value: TStrings); -begin - FLookupItems.Assign(Value); -end; - -procedure TcxCustomTextEditProperties.SetLookupItemsSorted(Value: Boolean); -begin - FLookupItems.Sorted := Value; -end; - -procedure TcxCustomTextEditProperties.SetMaxLength(Value: Integer); -begin - if Value < 0 then - Value := 0; - if AssignedValues.MaxLength and (Value = FMaxLength) then - Exit; - - AssignedValues.FMaxLength := True; - FMaxLength := Value; - MaxLengthChanged; -end; - -procedure TcxCustomTextEditProperties.SetMRUMode(Value: Boolean); -begin - if Value <> FMRUMode then - begin - FMRUMode := Value; - Changed; - end; -end; - -procedure TcxCustomTextEditProperties.SetOEMConvert(Value: Boolean); -begin - if Value <> FOEMConvert then - begin - FOEMConvert := Value; - Changed; - end; -end; - -procedure TcxCustomTextEditProperties.SetPasswordChar(Value: TCaptionChar); -begin - if Value <> FPasswordChar then - begin - FPasswordChar := Value; - Changed; - end; -end; - -procedure TcxCustomTextEditProperties.SetUseDisplayFormatWhenEditing( - Value: Boolean); -begin - if Value <> FUseDisplayFormatWhenEditing then - begin - FUseDisplayFormatWhenEditing := Value; - Changed; - end; -end; - -procedure TcxCustomTextEditProperties.SetViewStyle(Value: TcxTextEditViewStyle); -const - AButtonsViewStyleMap: array[TcxTextEditViewStyle] of TcxEditButtonsViewStyle = - (bvsNormal, bvsNormal, bvsButtonsOnly, bvsButtonsAutoWidth); -begin - if Value <> ViewStyle then - begin - BeginUpdate; - try - ButtonsViewStyle := AButtonsViewStyleMap[Value]; - HideCursor := Value <> vsNormal; - finally - EndUpdate; - end; - end; -end; - -{ TcxCustomTextEdit } - -{$IFDEF CBUILDER10} -constructor TcxCustomTextEdit.Create(AOwner: TComponent); -begin - inherited Create(AOwner); -end; -{$ENDIF} - -destructor TcxCustomTextEdit.Destroy; -begin - FText := Text; - cxFormatController.RemoveListener(Self); - FreeAndNil(FLookupData); - inherited Destroy; -end; - -procedure TcxCustomTextEdit.Activate(var AEditData: TcxCustomEditData); -begin - inherited Activate(AEditData); - if HandleAllocated then - begin - SelStart := 0; - if ActiveProperties.AutoSelect then - SelectAll; - end; -end; - -class function TcxCustomTextEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomTextEditProperties; -end; - -procedure TcxCustomTextEdit.CopyToClipboard; -begin - if ActiveProperties.EditingStyle in [esFixedList, esNoEdit] then - SelectAll; - if SelLength > 0 then - InnerTextEdit.CopyToClipboard; -end; - -procedure TcxCustomTextEdit.CutToClipboard; -var - ANewSelStart: Integer; - ANewText, S: string; - APrevKeyboardAction: Boolean; -begin - if SelLength = 0 then - Exit; - if Focused then - begin - APrevKeyboardAction := KeyboardAction; - KeyboardAction := True; - try - S := ''; - if CanChangeSelText(S, ANewText, ANewSelStart) then - InnerEdit.CallDefWndProc(WM_CUT, 0, 0); - finally - KeyboardAction := APrevKeyboardAction; - end; - end - else - begin - InnerTextEdit.CopyToClipboard; - SelText := ''; - end; -end; - -function TcxCustomTextEdit.IsEditClass: Boolean; -begin - Result := (ActiveProperties.EditingStyle in [esEdit, esEditList]) - and not PropertiesChangeLocked and not IsDesigning; -end; - -procedure TcxCustomTextEdit.PasteFromClipboard; -var - ANewSelStart: Integer; - ANewText, S: string; - APrevKeyboardAction: Boolean; -begin - if Clipboard.HasFormat(CF_TEXT) then - if Focused then - begin - APrevKeyboardAction := KeyboardAction; - KeyboardAction := True; - try - S := Clipboard.AsText; - if CanChangeSelText(S, ANewText, ANewSelStart) then - InnerEdit.CallDefWndProc(WM_PASTE, 0, 0); - finally - KeyboardAction := APrevKeyboardAction; - end; - end - else - SelText := Clipboard.AsText; -end; - -procedure TcxCustomTextEdit.PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); -begin - EditValue := ADisplayValue; -end; - -procedure TcxCustomTextEdit.SelectAll; -begin - InnerTextEdit.SelectAll; -end; - -{$IFDEF DELPHI10} -function TcxCustomTextEdit.GetTextBaseLine: Integer; -begin - Result := ViewInfo.GetTextBaseLine; -end; - -function TcxCustomTextEdit.HasTextBaseLine: Boolean; -begin - Result := True; -end; -{$ENDIF} - -procedure TcxCustomTextEdit.ClearSelection; -var - APrevKeyboardAction: Boolean; - APrevSelStart: Integer; - AText: string; -begin - if SelLength = 0 then - Exit; - APrevKeyboardAction := KeyboardAction; - KeyboardAction := Focused or FIsChangeBySpellChecker; - try - AText := DisplayValue; - Delete(AText, SelStart + 1, SelLength); - APrevSelStart := SelStart; - if SetDisplayText(AText) then - SelStart := APrevSelStart; - finally - KeyboardAction := APrevKeyboardAction; - end; -end; - -function TcxCustomTextEdit.DoInnerControlDefaultHandler(var Message: TMessage): Boolean; -begin - InternalSpellCheckerHandler(Message); - Result := inherited DoInnerControlDefaultHandler(Message); -end; - -function TcxCustomTextEdit.IsChildWindow(AWnd: THandle): Boolean; -begin - Result := inherited IsChildWindow(AWnd) or - (Assigned(dxISpellChecker) and dxISpellChecker.IsSpellCheckerDialogControl(AWnd)); -end; - -procedure TcxCustomTextEdit.SetScrollBarsParameters(AIsScrolling: Boolean = False); -begin - inherited SetScrollBarsParameters(AIsScrolling); - InternalCheckSelection; -end; - -procedure TcxCustomTextEdit.SetSelection(ASelStart: Integer; ASelLength: Integer); -begin - SelStart := ASelStart; - SelLength := ASelLength; -end; - -procedure TcxCustomTextEdit.Undo; -begin - Reset; -end; - -procedure TcxCustomTextEdit.AdjustInnerEditPosition; -var - AInnerEditBounds: TRect; - AInnerEditHeight, AInnerEditTop: Integer; - R: TRect; -begin - if (InnerTextEdit = nil) or FInnerEditPositionAdjusting then - Exit; - FInnerEditPositionAdjusting := True; - try - AInnerEditHeight := GetInnerEditHeight; - AInnerEditTop := 0; - R := ViewInfo.ClientRect; - case TcxCustomTextEditProperties(ActiveProperties).Alignment.Vert of - taTopJustify: - AInnerEditTop := R.Top + ContentParams.Offsets.Top; - taBottomJustify: - AInnerEditTop := R.Bottom - AInnerEditHeight - ContentParams.Offsets.Bottom; - taVCenter: - AInnerEditTop := R.Top + ContentParams.Offsets.Top + (R.Bottom - R.Top - AInnerEditHeight - ContentParams.Offsets.Top - ContentParams.Offsets.Bottom) div 2; - end; - if AInnerEditTop < R.Top + ContentParams.Offsets.Top then - AInnerEditTop := R.Top + ContentParams.Offsets.Top; - with ContentParams.Offsets do - AInnerEditBounds := Rect(R.Left + Left, AInnerEditTop, - R.Right - R.Left + 1 - (Left + Right), AInnerEditHeight); - with AInnerEditBounds do - if not EqualRect(InnerEdit.Control.BoundsRect, Rect(Left, Top, Left + Right, Top + Bottom)) then - InnerEdit.Control.SetBounds(Left, Top, Right, Bottom); - if IsInplace then - begin - Inc(R.Top); - Dec(R.Bottom); - end; - if not IsInplace and (ViewInfo.NativeState <> TC_NONE) and - ViewInfo.ComboBoxStyle and (ActiveProperties.EditingStyle in [esEdit, esEditList]) then - begin - Dec(R.Right); - Dec(R.Bottom); - end; - AlignControls(InnerEdit.Control, R); - finally - FInnerEditPositionAdjusting := False; - end; -end; - -function TcxCustomTextEdit.CanKeyDownModifyEdit(Key: Word; Shift: TShiftState): Boolean; -begin - Result := inherited CanKeyDownModifyEdit(Key, Shift); - Result := Result or (Key = VK_DELETE); - if ActiveProperties.UseLookupData and not ILookupData.IsEmpty and - GetScrollLookupDataList(escKeyboard) then - case Key of - VK_DOWN, VK_UP: - Result := not(ssAlt in Shift) and not HasPopupWindow; - VK_PRIOR, VK_NEXT: - Result := not HasPopupWindow; - end; -end; - -function TcxCustomTextEdit.CanKeyPressModifyEdit(Key: Char): Boolean; -begin - Result := (Key = #8) or (Key = #22) or (Key = #24) or IsTextChar(Key); -end; - -procedure TcxCustomTextEdit.ChangeHandler(Sender: TObject); -begin - LockChangeEvents(True); - try - inherited ChangeHandler(Sender); - if not ViewInfo.IsEditClass then - UpdateDrawValue; - if Focused and ActiveProperties.IsEditValueNumeric and - ActiveProperties.HasDigitGrouping(FIsDisplayValueSynchronizing) then - SeparateDigitGroups(Self); - finally - LockChangeEvents(False); - end; -end; - -procedure TcxCustomTextEdit.DoEditKeyDown(var Key: Word; Shift: TShiftState); -var - AEditingStyle: TcxEditEditingStyle; - AFindSelection: Boolean; - APrevCurrentKey: TcxEditValue; - APrevKey: Word; -begin - AEditingStyle := ActiveProperties.EditingStyle; - if (AEditingStyle = esFixedList) and not IsSpecialKey(Key, Shift) then - case Key of - VK_LEFT, VK_RIGHT, VK_DELETE: - begin - FindSelection := False; - DoAfterKeyDown(Key, Shift); - Key := 0; - end; - end; - - InnerTextEdit.InternalUpdating := True; - APrevKey := Key; - AFindSelection := FindSelection; - inherited DoEditKeyDown(Key, Shift); - if (TranslateKey(APrevKey) = VK_RETURN) and AFindSelection then - SelectAll; - if Key = 0 then - Exit; - - case Key of - VK_LEFT, VK_RIGHT: - begin - if not(ssShift in Shift) and (SelLength > 0) then - begin - if Key = VK_RIGHT then - SelStart := SelStart + SelLength - else - SelStart := SelStart; - SelLength := 0; - Key := 0; - end; - FindSelection := False; - end; - - VK_DOWN, VK_UP, VK_PRIOR, VK_NEXT, VK_HOME, VK_END: - begin - if ((Key <> VK_HOME) and (Key <> VK_END) or (AEditingStyle = esFixedList)) and - ActiveProperties.UseLookupData and GetScrollLookupDataList(escKeyboard) and - not ILookupData.IsEmpty then - begin - LockChangeEvents(True); - LookupItemsScrolling := True; - try - APrevCurrentKey := ILookupData.CurrentKey; - LockClick(True); - try - case Key of - VK_PRIOR: - if ssCtrl in Shift then - ILookupData.Go(egdBegin, False) - else - ILookupData.Go(egdPageUp, False); - VK_NEXT: - if ssCtrl in Shift then - ILookupData.Go(egdEnd, False) - else - ILookupData.Go(egdPageDown, False); - VK_UP: - ILookupData.Go(egdPrev, False); - VK_DOWN: - ILookupData.Go(egdNext, False); - VK_HOME: - ILookupData.Go(egdBegin, False); - VK_END: - ILookupData.Go(egdEnd, False); - end; - finally - LockClick(False); - end; - if not VarEqualsExact(APrevCurrentKey, ILookupData.CurrentKey) then - begin - DoClick; - if CanPostEditValue and ActiveProperties.ImmediatePost and - ValidateEdit(True) then - InternalPostEditValue; - end; - Key := 0; - finally - LookupItemsScrolling := False; - LockChangeEvents(False); - end; - end; - if (Key <> VK_HOME) and (Key <> VK_END) and not InnerTextEdit.MultiLine then - begin - if Key <> 0 then - DoAfterKeyDown(Key, Shift); - Key := 0; - end; - end; - - VK_DELETE: - begin - if AEditingStyle = esEditList then - begin - DoAfterKeyDown(Key, Shift); - Key := 0; - end - else - FindSelection := False; - end; - end; - if (Key = VK_END) and (SelLength = 0) and (AEditingStyle <> esFixedList) then - FindSelection := False; - - if Key <> 0 then - InnerTextEdit.InternalUpdating := False; -end; - -procedure TcxCustomTextEdit.DoEditKeyPress(var Key: Char); - - function FillFromList(var AFindText: string): Boolean; - var - ATail: string; - L: Integer; - S: string; - begin - S := AFindText; - if InnerTextEdit.ImeLastChar <> #0 then - S := S + InnerTextEdit.ImeLastChar; - Result := ILookupData.Locate(S, ATail, False); - if Result then - begin - AFindText := S; - if InnerTextEdit.ImeLastChar <> #0 then - begin - L := Length(AFindText); - Insert(Copy(AFindText, L, 1), ATail, 1); - Delete(AFindText, L, 1); - end; - end; - FFindSelection := Result; - if AFindText = '' then - begin - if ActiveProperties.EditingStyle <> esFixedList then - InternalSetDisplayValue(''); - FFindSelection := False; - end; - if Result then - begin - DataBinding.DisplayValue := AFindText + ATail; - SelStart := Length(AFindText); - SelLength := Length(ATail); - end; - UpdateDrawValue; - end; - - function CanContinueIncrementalSearch: Boolean; - begin - Result := ActiveProperties.EditingStyle in [esEditList, esFixedList]; - if not Result then - Result := (SelLength = 0) and (SelStart = Length(DisplayValue)) or - FindSelection or (SelLength > 0); - end; - -var - AEditingStyle: TcxEditEditingStyle; - AFindText: string; - AFound: Boolean; - APrevCurrentKey: TcxEditValue; - APrevFindSelection: Boolean; -begin - InnerTextEdit.InternalUpdating := True; - inherited DoEditKeyPress(Key); - if Key = #0 then - Exit; - - UnlockLookupDataTextChanged; - KeyboardAction := True; - AEditingStyle := ActiveProperties.EditingStyle; - if AEditingStyle = esFixedList then - case Key of - #8: - if not ActiveProperties.FixedListSelection then - begin - Key := #0; - FindSelection := False; - end; - end; - - APrevCurrentKey := ILookupData.CurrentKey; - APrevFindSelection := FindSelection; - AFound := False; - LockClick(True); - try - if Key = #8 then - begin - if ActiveProperties.UseLookupData and ActiveProperties.CanIncrementalSearch then - begin - if (AEditingStyle = esEditList) and (Length(DisplayValue) > 0) and not FindSelection then - begin - SelLength := Length(DisplayValue) - SelStart; - FindSelection := True; - end; - if FindSelection then - begin - AFindText := Copy(DisplayValue, 1, Length(DisplayValue) - SelLength); - SetLength(AFindText, Length(AFindText) - Length(AnsiLastChar(AFindText))); - LockLookupDataTextChanged; - AFound := FillFromList(AFindText); - end; - if AEditingStyle = esFixedList then - Key := #0; - end; - end - else - if IsTextChar(Key) then - begin - if ActiveProperties.UseLookupData then - begin - if ActiveProperties.CanIncrementalSearch and CanContinueIncrementalSearch then - begin - LockLookupDataTextChanged; - AFound := False; - AFindText := DisplayValue; - if SelLength > 0 then - AFindText := Copy(AFindText, 1, SelStart) + Key - else - if AEditingStyle = esFixedList then - if FindSelection then - begin - AFindText := AFindText + Key; - AFound := FillFromList(AFindText); - if not AFound then - AFindText := Key; - end - else - AFindText := Key - else - Insert(Key, AFindText, SelStart + 1); - if not AFound then - AFound := FillFromList(AFindText); - if (AEditingStyle = esFixedList) and not ActiveProperties.FixedListSelection and not AFound then - begin - AFindText := Key; - AFound := FillFromList(AFindText); - end; - end; - if (AEditingStyle in [esEditList, esFixedList]) and not AFound then - begin - Key := #0; - if (AEditingStyle = esEditList) and (DisplayValue <> '') or - (AEditingStyle = esFixedList) and ActiveProperties.FixedListSelection and APrevFindSelection then - FindSelection := True; - end; - end; - end; - finally - LockClick(False); - KeyboardAction := False; - if ActiveProperties.UseLookupData and not VarEqualsExact(APrevCurrentKey, - ILookupData.CurrentKey) then - DoClick; - end; - if AFound then - Key := #0; - if Key <> #0 then - InnerTextEdit.InternalUpdating := False; -end; - -procedure TcxCustomTextEdit.DoEditValueChanged; -begin - inherited DoEditValueChanged; - DoTextChanged; -end; - -procedure TcxCustomTextEdit.DoExit; -begin - inherited DoExit; - FindSelection := False; -end; - -function TcxCustomTextEdit.DoRefreshContainer(const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AIsMouseEvent: Boolean): Boolean; -begin - Result := inherited DoRefreshContainer(P, Button, Shift, AIsMouseEvent); - if Result then - AdjustInnerEdit; -end; - -function TcxCustomTextEdit.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; -const - AGoDirectionMap: array [Boolean] of TcxEditLookupDataGoDirection = (egdNext, egdPrev); -var - APrevCurrentKey: TcxEditValue; -begin - Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); - if Result then - Exit; - - Result := GetScrollLookupDataList(escMouseWheel) and not HasPopupWindow and - ActiveProperties.UseLookupData and not ILookupData.IsEmpty and HandleMouseWheel(Shift); - if not(Result and DoEditing) then - Exit; - - APrevCurrentKey := ILookupData.CurrentKey; - LockChangeEvents(True); - LookupItemsScrolling := True; - try - LockClick(True); - try - ILookupData.Go(AGoDirectionMap[WheelDelta > 0], False); - finally - LockClick(False); - if not VarEqualsExact(APrevCurrentKey, ILookupData.CurrentKey) then - begin - DoClick; - if CanPostEditValue and ActiveProperties.ImmediatePost and ValidateEdit(True) then - InternalPostEditValue; - end; - end; - finally - LookupItemsScrolling := False; - LockChangeEvents(False); - end; -end; - -procedure TcxCustomTextEdit.FillSizeProperties(var AEditSizeProperties: TcxEditSizeProperties); -begin - if ViewInfo = nil then - Exit; - AEditSizeProperties := DefaultcxEditSizeProperties; - AEditSizeProperties.MaxLineCount := 1; -end; - -function TcxCustomTextEdit.GetInnerControlBounds(const AInnerControlsRegion: TRect; - AInnerControl: TControl): TcxContainerInnerControlBounds; -begin - if IsEditClass then - Result := inherited GetInnerControlBounds(AInnerControlsRegion, AInnerControl) - else - begin - Result.IsEmpty := False; - Result.Rect := cxEmptyRect; - end; -end; - -function TcxCustomTextEdit.GetDisplayValue: string; -begin - if InnerEdit = nil then - Result := '' - else - Result := InnerEdit.EditValue; -end; - -function TcxCustomTextEdit.GetInnerEditClass: TControlClass; -begin - Result := TcxCustomInnerTextEdit; -end; - -procedure TcxCustomTextEdit.Initialize; -var - ALookupDataClass: TcxInterfacedPersistentClass; -begin - inherited Initialize; - FBeepOnEnter := True; - FFindSelection := False; - - if InnerTextEdit <> nil then - begin - TControlAccess(InnerTextEdit.Control).Color := clWindow; - InnerTextEdit.OnSelChange := SelChange; - end; - Width := 121; - Height := 21; - - ALookupDataClass := Properties.GetLookupDataClass; - if ALookupDataClass <> nil then - begin - FLookupData := ALookupDataClass.Create(Self); - ILookupData.OnSelectItem := HandleSelectItem; - end; - - cxFormatController.AddListener(Self); -end; - -function TcxCustomTextEdit.InternalDoEditing: Boolean; -begin - Result := ActiveProperties.EditingStyle <> esNoEdit; -end; - -function TcxCustomTextEdit.InternalGetEditingValue: TcxEditValue; -begin - Result := Text; -end; - -procedure TcxCustomTextEdit.InternalSetDisplayValue(const Value: TcxEditValue); -begin - DataBinding.DisplayValue := Value; - if not KeyboardAction then - begin - ResetOnNewDisplayValue; - SynchronizeEditValue; - EditModified := False; - end; -end; - -procedure TcxCustomTextEdit.InternalValidateDisplayValue(const ADisplayValue: TcxEditValue); -//var -// APrevFindSelection: Boolean; -begin -// APrevFindSelection := FindSelection; -// try - if (ActiveProperties.EditingStyle = esEdit) and ActiveProperties.UseLookupData and - not ILookupData.Find(ADisplayValue) then - DoOnNewLookupDisplayText(ADisplayValue); - inherited InternalValidateDisplayValue(ADisplayValue); -// finally -// FindSelection := APrevFindSelection; -// end; -end; - -function TcxCustomTextEdit.IsTextInputMode: Boolean; -begin - with ActiveProperties do - Result := (EchoMode = eemNormal) and CanModify; -end; - -function TcxCustomTextEdit.IsValidChar(AChar: Char): Boolean; -begin - Result := inherited IsValidChar(AChar) or - (AnsiChar(AChar) in ActiveProperties.ValidChars); -end; - -procedure TcxCustomTextEdit.KeyPress(var Key: Char); -begin - if (Word(Key) = VK_ESCAPE) and IsEditValueResetting and - FIsPopupWindowJustClosed and not HasPopupWindow then - FIsPopupWindowJustClosed := False; - inherited KeyPress(Key); -end; - -procedure TcxCustomTextEdit.Loaded; -begin - inherited Loaded; - ShortRefreshContainer(False); -end; - -procedure TcxCustomTextEdit.PropertiesChanged(Sender: TObject); -begin - if InnerTextEdit <> nil then - InnerTextEdit.Alignment := ActiveProperties.FAlignment.Horz; - if ActiveProperties.UseLookupData then - ILookupData.PropertiesChanged; - if ActiveProperties.UseLookupData and not FLookupDataTextChangedLocked then - ILookupData.TextChanged; - if not PropertiesChangeLocked and not IsEditClass then - UpdateDrawValue; - - if InnerTextEdit = nil then - Exit; - - ImeMode := ActiveProperties.ImeMode; - ImeName := ActiveProperties.ImeName; - with InnerTextEdit do - begin - Alignment := ActiveProperties.Alignment.Horz; - AutoSelect := ActiveProperties.AutoSelect and not IsInplace; - CharCase := ActiveProperties.FCharCase; - EchoMode := ActiveProperties.FEchoMode; - HideSelection := ActiveProperties.FHideSelection; - ImeMode := ActiveProperties.ImeMode; - ImeName := ActiveProperties.ImeName; - MaxLength := ActiveProperties.GetInnerEditMaxLength; - OEMConvert := ActiveProperties.OEMConvert; - PasswordChar := ActiveProperties.PasswordChar; - end; - - CheckEditValue; - if not IsPosting then - UpdateDisplayValue; - UpdateDrawValue; - inherited PropertiesChanged(Sender); - if InnerTextEdit <> nil then - InnerTextEdit.Control.Invalidate; -end; - -function TcxCustomTextEdit.SetDisplayText(const Value: string): Boolean; -var - ADisplayValue: TcxEditValue; -begin - ADisplayValue := Value; - Result := ActiveProperties.IsDisplayValueValid(ADisplayValue, InternalFocused); - if Result then - Result := not(KeyboardAction and not DoEditing); - if Result then - InternalSetDisplayValue(ADisplayValue); -end; - -procedure TcxCustomTextEdit.SetInternalDisplayValue(Value: TcxEditValue); -begin - if InnerEdit <> nil then - InnerEdit.EditValue := Value; -end; - -function TcxCustomTextEdit.WantNavigationKeys: Boolean; -begin - Result := True; -end; - -procedure TcxCustomTextEdit.LockedInnerEditWindowProc(var Message: TMessage); -begin - if Message.Msg = WM_SETFOCUS then - begin - if InnerTextEdit.AutoSelect then - SelectAll; - end - else - inherited LockedInnerEditWindowProc(Message); -end; - -procedure TcxCustomTextEdit.UnlockInnerEditRepainting; -var - APrevAutoSelect: Boolean; -begin - inherited UnlockInnerEditRepainting; - APrevAutoSelect := InnerTextEdit.AutoSelect; - InnerTextEdit.AutoSelect := False; - SendMessage(InnerEdit.Control.Handle, WM_SETFOCUS, 0, 0); - InnerTextEdit.AutoSelect := APrevAutoSelect; -end; - -procedure TcxCustomTextEdit.WndProc(var Message: TMessage); -var - ASaveHideSelection: Boolean; -begin - if (Message.Msg = WM_SPELLCHECKERAUTOCORRECT) and (InnerControl <> nil) and - InnerControl.HandleAllocated then - with PdxSpellCheckerAutoCorrectWordRange(Message.LParam)^ do - begin - ASaveHideSelection := ActiveProperties.HideSelection; - ActiveProperties.HideSelection := True; - try - Self.SelStart := SelStart; - Self.SelLength := SelLength; - SendMessageW(InnerControl.Handle, EM_REPLACESEL, 1, Longint(PWideChar(Replacement))); - Self.SelStart := NewSelStart; - finally - ActiveProperties.HideSelection := ASaveHideSelection; - end; - end; - inherited WndProc(Message); -end; - -procedure TcxCustomTextEdit.FormatChanged; -begin - ActiveProperties.Changed; - SynchronizeDisplayValue; -end; - -procedure TcxCustomTextEdit.AdjustInnerEdit; -var - AFont: TFont; -begin - if (InnerTextEdit = nil) or FIsCreating then - Exit; - InnerEdit.LockBounds(True); - try - with TControlAccess(InnerTextEdit.Control) do - begin - Color := ViewInfo.BackgroundColor; - AFont := TFont.Create; - try - AFont.Assign(VisibleFont); - AFont.Color := ViewInfo.TextColor; - AssignFonts(Font, AFont); - finally - FreeAndNil(AFont); - end; - end; - finally - InnerEdit.LockBounds(False); - end; -end; - -function TcxCustomTextEdit.CanChangeSelText(const Value: string; - out ANewText: string; out ANewSelStart: Integer): Boolean; -var - ADisplayValue: TcxEditValue; - AEditingStyle: TcxEditEditingStyle; - AValue: string; -begin - AValue := string(PChar(Value)); - Result := False; - AEditingStyle := ActiveProperties.EditingStyle; - if KeyboardAction and (AEditingStyle = esNoEdit) then - Exit; - if AEditingStyle in [esFixedList, esNoEdit] then - SelectAll; - if KeyboardAction and (AEditingStyle in [esEdit, esNoEdit]) and (ActiveProperties.MaxLength > 0) then - begin - ANewText := Copy(Text, 1, SelStart) + AValue; - ANewSelStart := Length(WideString(ANewText)); - if ANewSelStart > ActiveProperties.MaxLength then - ANewSelStart := ActiveProperties.MaxLength; - ANewSelStart := Length(string(Copy(WideString(ANewText), 1, ANewSelStart))); - if ANewSelStart < SelStart then - Exit; - - ANewText := ANewText + Copy(Text, SelStart + SelLength + 1, Length(Text) - SelStart - SelLength); - if Length(WideString(ANewText)) > ActiveProperties.MaxLength then - ANewText := Copy(WideString(ANewText), 1, ActiveProperties.MaxLength); - end else - begin - if ActiveProperties.EditingStyle <> esFixedList then - begin - ANewText := Text; - ANewText := Copy(ANewText, 1, SelStart) + AValue + - Copy(ANewText, SelStart + SelLength + 1, Length(ANewText) - SelLength - SelStart); - end - else - ANewText := AValue; - ANewSelStart := SelStart + Length(AValue); - end; - ADisplayValue := ANewText; - Result := ActiveProperties.IsDisplayValueValid(ADisplayValue, InternalFocused) and - not (KeyboardAction and not DoEditing); - if Result then - ANewText := VarToStr(ADisplayValue); -end; - -procedure TcxCustomTextEdit.CheckEditValue; -begin - if DataBinding.CanCheckEditorValue and ActiveProperties.IsEditValueNumeric and - not PropertiesChangeLocked and ActiveProperties.IsValueBoundsDefined then - CheckEditorValueBounds; -end; - -procedure TcxCustomTextEdit.CheckEditorValueBounds; -begin -end; - -procedure TcxCustomTextEdit.DoOnNewLookupDisplayText(const AText: string); -begin - with Properties do - if Assigned(OnNewLookupDisplayText) then - OnNewLookupDisplayText(Self, AText); - if RepositoryItem <> nil then - with ActiveProperties do - if Assigned(OnNewLookupDisplayText) then - OnNewLookupDisplayText(Self, AText); -end; - -procedure TcxCustomTextEdit.DoDrawMisspellings; -begin - if Assigned(dxISpellChecker) then - dxISpellChecker.DrawMisspellings(InnerControl); -end; - -procedure TcxCustomTextEdit.DoSelectionChanged; -begin - if Assigned(dxISpellChecker) then - dxISpellChecker.SelectionChanged(InnerControl); -end; - -procedure TcxCustomTextEdit.DoLayoutChanged; -begin - FLastFirstVisibleCharIndex := InnerTextEdit.GetFirstVisibleCharIndex; - if Assigned(dxISpellChecker) then - dxISpellChecker.LayoutChanged(InnerControl); -end; - -procedure TcxCustomTextEdit.DoTextChanged; -begin - if Assigned(dxISpellChecker) then - dxISpellChecker.TextChanged(InnerControl); -end; - -procedure TcxCustomTextEdit.InternalCheckSelection; -begin - if InnerControl.HandleAllocated then - begin - if FLastFirstVisibleCharIndex <> InnerTextEdit.GetFirstVisibleCharIndex then - DoLayoutChanged - else - if (InnerTextEdit.SelStart <> FLastSelPosition) or - (InnerTextEdit.SelLength <> FLastSelLength) then - begin - FLastSelPosition := InnerTextEdit.SelStart; - FLastSelLength := InnerTextEdit.SelLength; - DoSelectionChanged; - end; - end; -end; - -procedure TcxCustomTextEdit.InternalSpellCheckerHandler(Message: TMessage); -begin - case Message.Msg of - WM_SETFOCUS: - if Assigned(dxISpellChecker) then - dxISpellChecker.CheckStart(InnerControl); - WM_KILLFOCUS: - if Assigned(dxISpellChecker) then - dxISpellChecker.CheckFinish; - WM_SETFONT, WM_SIZE: - DoLayoutChanged; - WM_LBUTTONUP, WM_MBUTTONUP, WM_RBUTTONUP, WM_KEYUP: - InternalCheckSelection; - CN_CTLCOLOREDIT: - if not InnerTextEdit.MultiLine then - RedrawMisspelledWords; - WM_CTLCOLOREDIT: - if InnerTextEdit.MultiLine then - RedrawMisspelledWords; - WM_PAINT: - RedrawMisspelledWords; - WM_UNDO, EM_UNDO: - if Assigned(dxISpellChecker) then - dxISpellChecker.Undo; - else - if Message.Msg = WM_REDRAWMISSPELLINGS then - DoDrawMisspellings; - end; -end; - -procedure TcxCustomTextEdit.RedrawMisspelledWords; -begin - if InnerControl.HandleAllocated then - PostMessage(InnerControl.Handle, WM_REDRAWMISSPELLINGS, 0, 0); -end; - -procedure TcxCustomTextEdit.SpellCheckerSetSelText( - const AValue: string; APost: Boolean = False); -begin - FIsChangeBySpellChecker := True; - try - SelText := AValue; - if APost and not IsInplace and CanPostEditValue and not Focused then - begin - LockChangeEvents(True); - try - SpellCheckerSetValue(DisplayValue); - InternalPostEditValue; - finally - LockChangeEvents(False); - end; - end; - ModifiedAfterEnter := True; - finally - FIsChangeBySpellChecker := False; - end; -end; - -function TcxCustomTextEdit.GetInnerEditHeight: Integer; -begin - Result := cxTextHeight(TControlAccess(InnerTextEdit.Control).Font); -end; - -function TcxCustomTextEdit.GetItemIndex: Integer; -begin - Result := LookupKeyToItemIndex(ILookupData.CurrentKey); -end; - -function TcxCustomTextEdit.GetItemObject: TObject; -begin - if ItemIndex <> -1 then - Result := ActiveProperties.LookupItems.Objects[ItemIndex] - else - Result := nil; -end; - -function TcxCustomTextEdit.GetScrollLookupDataList(AScrollCause: TcxEditScrollCause): Boolean; -begin - Result := False; -end; - -procedure TcxCustomTextEdit.HandleSelectItem(Sender: TObject); -var - ANewEditValue: TcxEditValue; - AEditValueChanged: Boolean; -begin - ANewEditValue := LookupKeyToEditValue(ILookupData.CurrentKey); - AEditValueChanged := not VarEqualsExact(EditValue, ANewEditValue); - if AEditValueChanged and not DoEditing then - Exit; - SaveModified; - LockLookupDataTextChanged; - try - InternalEditValue := ANewEditValue; - finally - UnlockLookupDataTextChanged; - RestoreModified; - end; - if AEditValueChanged then - ModifiedAfterEnter := True; - SelectAll; - ShortRefreshContainer(False); -end; - -function TcxCustomTextEdit.InternalGetText: string; -begin - Result := DisplayValue; -end; - -function TcxCustomTextEdit.InternalSetText(const Value: string): Boolean; -begin - Result := SetDisplayText(Value); -end; - -function TcxCustomTextEdit.ItemIndexToLookupKey(AItemIndex: Integer): TcxEditValue; -begin - Result := AItemIndex; -end; - -procedure TcxCustomTextEdit.LockLookupDataTextChanged; -begin - FLookupDataTextChangedLocked := True; -end; - -function TcxCustomTextEdit.LookupKeyToEditValue(const AKey: TcxEditValue): TcxEditValue; -var - AText: string; -begin - AText := ILookupData.GetDisplayText(AKey); - PrepareEditValue(AText, Result, False); -end; - -function TcxCustomTextEdit.LookupKeyToItemIndex(const AKey: TcxEditValue): Integer; -begin - Result := AKey; -end; - -function TcxCustomTextEdit.NeedResetInvalidTextWhenPropertiesChanged: Boolean; -begin - Result := not IsInplace and not DataBinding.IDefaultValuesProvider.IsDataStorage; -end; - -procedure TcxCustomTextEdit.ResetOnNewDisplayValue; -begin - if ActiveProperties.UseLookupData then - FindSelection := False; -end; - -procedure TcxCustomTextEdit.SelChange(Sender: TObject); -begin -end; - -procedure TcxCustomTextEdit.SetEditingText(const Value: TCaption); -begin - if DoEditing then - begin - Text := Value; - ModifiedAfterEnter := True; - end; -end; - -procedure TcxCustomTextEdit.SetItemIndex(Value: Integer); -var - ANewEditValue: TcxEditValue; - APrevItemIndex: Integer; -begin - APrevItemIndex := ItemIndex; - LockClick(True); - try - ILookupData.CurrentKey := ItemIndexToLookupKey(Value); - ANewEditValue := LookupKeyToEditValue(ILookupData.CurrentKey); - if not VarEqualsExact(EditValue, ANewEditValue) then - EditValue := ANewEditValue; - finally - LockClick(False); - end; - if ItemIndex <> APrevItemIndex then - begin - EditModified := False; - Click; - end; -end; - -procedure TcxCustomTextEdit.SynchronizeDisplayValue; -var - ADisplayValue, AEditValue: TcxEditValue; - AIsEditValueValid: Boolean; -begin - if ActiveProperties.CanValidate then - begin - AEditValue := EditValue; - AIsEditValueValid := ActiveProperties.IsEditValueValid(AEditValue, InternalFocused); - if not AIsEditValueValid and not Focused then - try - if VarIsDate(EditValue) then - ADisplayValue := DateTimeToStr(EditValue) - else - ADisplayValue := VarToStr(EditValue) - except - on EVariantError do - ADisplayValue := ''; - end - else - if AIsEditValueValid then - PrepareDisplayValue(AEditValue, ADisplayValue, InternalFocused) - else - ADisplayValue := ActiveProperties.DefaultFocusedDisplayValue; - end - else - PrepareDisplayValue(EditValue, ADisplayValue, InternalFocused); - SaveModified; - FIsDisplayValueSynchronizing := True; - try - DataBinding.DisplayValue := ADisplayValue; - finally - FIsDisplayValueSynchronizing := False; - RestoreModified; - ResetOnNewDisplayValue; - UpdateDrawValue; - end; -end; - -procedure TcxCustomTextEdit.SynchronizeEditValue; -var - APrevEditValue: TcxEditValue; - ACompareEditValue, AEditValueChanged: Boolean; -begin - ACompareEditValue := ActiveProperties.CanCompareEditValue; - if ACompareEditValue then - APrevEditValue := EditValue - else - APrevEditValue := Null; - PrepareEditValue(DisplayValue, FEditValue, InternalFocused); - - if ACompareEditValue then - AEditValueChanged := not InternalVarEqualsExact(APrevEditValue, FEditValue) - else - AEditValueChanged := False; - if KeyboardAction then - ModifiedAfterEnter := True - else - EditModified := False; - if AEditValueChanged then - begin - DoEditValueChanged; - if not ActiveProperties.HasDisplayValue then - DoChange; - end; -end; - -procedure TcxCustomTextEdit.UndoPerformed; -begin -end; - -procedure TcxCustomTextEdit.UnlockLookupDataTextChanged; -begin - FLookupDataTextChangedLocked := False; -end; - -procedure TcxCustomTextEdit.UpdateDrawValue; - - procedure SetTextSelection; - var - AEditingStyle: TcxEditEditingStyle; - begin - AEditingStyle := ActiveProperties.EditingStyle; - if AEditingStyle in [esFixedList, esNoEdit] then - with ViewInfo do - if (AEditingStyle = esNoEdit) or not FindSelection or not ActiveProperties.FixedListSelection then - SelLength := 0 - else - begin - if DrawSelectionBar then - begin - SelStart := 0; - SelLength := Length(Text) - Self.SelLength; - SelBackgroundColor := clHighlightText; - SelTextColor := clHighlight; - end else - begin - SelStart := Self.SelStart; - SelLength := Self.SelLength; - SelBackgroundColor := clHighlight; - SelTextColor := clHighlightText; - end; - end; - end; - -var - AViewData: TcxCustomTextEditViewData; -begin - AViewData := TcxCustomTextEditViewData(CreateViewData); - try - AViewData.DisplayValueToDrawValue(DisplayValue, ViewInfo); - finally - AViewData.Free; - end; - if HandleAllocated then - begin - CalculateViewInfo(False); - SetTextSelection; - InvalidateRect(Rect(0, 0, Width, Height), False); - end; -end; - -procedure TcxCustomTextEdit.UpdateDisplayValue; -var - ADisplayValue: TcxEditValue; -begin - if PropertiesChangeLocked then - Exit; - - if ActiveProperties.EditingStyle in [esEditList, esFixedList] then - begin - if ModifiedAfterEnter and not IsEditValidated or NeedResetInvalidTextWhenPropertiesChanged then - begin - ADisplayValue := DisplayValue; - if not ActiveProperties.IsDisplayValueValid(ADisplayValue, True) then - begin - SaveModified; - DataBinding.DisplayValue := ActiveProperties.DefaultFocusedDisplayValue; - RestoreModified; - if not ModifiedAfterEnter then - SynchronizeEditValue; - end; - end - else - SynchronizeDisplayValue; - end - else - if not ModifiedAfterEnter then - DataBinding.UpdateDisplayValue; -end; - -function TcxCustomTextEdit.GetCursorPos: Integer; -begin - if InnerTextEdit.Control is TcxCustomInnerTextEdit then - Result := TcxCustomInnerTextEdit(InnerTextEdit.Control).CursorPos - else - Result := 0; -end; - -function TcxCustomTextEdit.GetEditingText: TCaption; -begin - Result := Text; -end; - -function TcxCustomTextEdit.GetInnerTextEdit: IcxInnerTextEdit; -begin - Result := InnerEdit as IcxInnerTextEdit; -end; - -function TcxCustomTextEdit.GetILookupData: IcxTextEditLookupData; -begin - Result := FLookupData as IcxTextEditLookupData; -end; - -function TcxCustomTextEdit.GetLookupData: TcxCustomTextEditLookupData; -begin - Result := TcxCustomTextEditLookupData(FLookupData); -end; - -function TcxCustomTextEdit.GetProperties: TcxCustomTextEditProperties; -begin - Result := TcxCustomTextEditProperties(FProperties); -end; - -function TcxCustomTextEdit.GetActiveProperties: TcxCustomTextEditProperties; -begin - Result := TcxCustomTextEditProperties(InternalGetActiveProperties); -end; - -function TcxCustomTextEdit.GetSelLength: Integer; -var - AEditingStyle: TcxEditEditingStyle; -begin - AEditingStyle := ActiveProperties.EditingStyle; - if (AEditingStyle = esFixedList) and not FindSelection or (AEditingStyle = esNoEdit) then - Result := 0 - else - Result := InnerTextEdit.SelLength; -end; - -function TcxCustomTextEdit.GetSelStart: Integer; -var - AEditingStyle: TcxEditEditingStyle; -begin - AEditingStyle := ActiveProperties.EditingStyle; - if (AEditingStyle = esFixedList) and not FindSelection or (AEditingStyle = esNoEdit) then - Result := 0 - else - Result := InnerTextEdit.SelStart; -end; - -function TcxCustomTextEdit.GetSelText: TCaption; -var - AEditingStyle: TcxEditEditingStyle; -begin - AEditingStyle := ActiveProperties.EditingStyle; - if (AEditingStyle = esFixedList) and not FindSelection or (AEditingStyle = esNoEdit) then - Result := '' - else - Result := InnerTextEdit.SelText; -end; - -function TcxCustomTextEdit.GetViewInfo: TcxCustomTextEditViewInfo; -begin - Result := TcxCustomTextEditViewInfo(FViewInfo); -end; - -procedure TcxCustomTextEdit.SetFindSelection(Value: Boolean); -begin - if not HandleAllocated or (Value = FindSelection) or FDisableRefresh then - Exit; - FFindSelection := Value; - CalculateViewInfo(False); - UpdateDrawValue; -end; - -procedure TcxCustomTextEdit.SetItemObject(Value: TObject); -begin - ItemIndex := ActiveProperties.LookupItems.IndexOfObject(Value); -end; - -procedure TcxCustomTextEdit.SetProperties(Value: TcxCustomTextEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomTextEdit.SetSelLength(Value: Integer); -begin - if ActiveProperties.EditingStyle <> esNoEdit then - InnerTextEdit.SelLength := Value; -end; - -procedure TcxCustomTextEdit.SetSelStart(Value: Integer); -begin - if ActiveProperties.EditingStyle <> esNoEdit then - InnerTextEdit.SelStart := Value; -end; - -{$IFDEF DELPHI12} -function TcxCustomTextEdit.GetTextHint: string; -begin - Result := InnerTextEdit.TextHint; -end; - -procedure TcxCustomTextEdit.SetTextHint(Value: string); -begin - InnerTextEdit.TextHint := Value; -end; -{$ENDIF} - - -procedure TcxCustomTextEdit.SetSelText(const Value: TCaption); -var - ANewSelStart: Integer; - ANewText: string; - APrevKeyboardAction: Boolean; -begin - APrevKeyboardAction := KeyboardAction; - KeyboardAction := Focused or FIsChangeBySpellChecker; - try - if CanChangeSelText(Value, ANewText, ANewSelStart) then - begin - InternalSetDisplayValue(ANewText); - SelStart := ANewSelStart; - end; - finally - KeyboardAction := APrevKeyboardAction; - end; -end; - -procedure TcxCustomTextEdit.WMClear(var Message: TMessage); -begin - KeyboardAction := True; - try - if (not ActiveProperties.ReadOnly) and DataBinding.IsDataAvailable then - ClearSelection; - finally - KeyboardAction := False; - end; -end; - -procedure TcxCustomTextEdit.WMCommand(var Message: TWMCommand); -begin - inherited; - case Message.NotifyCode of - EN_CHANGE: - DoTextChanged; - EN_VSCROLL, EN_HSCROLL: - DoLayoutChanged; - end; -end; - -procedure TcxCustomTextEdit.WMGetText(var Message: TWMGetText); -var - S: string; -begin - if Message.TextMax > 0 then - begin - if FProperties = nil then - S := FText - else - S := InternalGetText; - - if Length(S) > Message.TextMax - 1 then - SetLength(S, Message.TextMax - 1); - StrLCopy(Message.Text, PChar(S), Message.TextMax - 1); - Message.Result := Length(S); - end - else - Message.Result := 0; -end; - -procedure TcxCustomTextEdit.WMGetTextLength(var Message: TWMGetTextLength); -begin - if FProperties = nil then - Message.Result := Length(FText) - else - Message.Result := Length(InternalGetText); -end; - -procedure TcxCustomTextEdit.WMSetFocus(var Message: TWMSetFocus); -begin - if HasInnerEdit and not IsInplace and not (csDestroyingHandle in ControlState) then - InnerControl.HandleNeeded; - inherited; -end; - -procedure TcxCustomTextEdit.WMSetText(var Message: TWMSetText); -begin - if FInternalTextSetting then - inherited - else - begin - Message.Result := 0; - FInternalTextSetting := True; - try - if InternalSetText(string(Message.Text)) then - Message.Result := 1; - finally - FInternalTextSetting := False; - end; - end; -end; - -{ TcxTextEdit } - -class function TcxTextEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxTextEditProperties; -end; - -function TcxTextEdit.GetActiveProperties: TcxTextEditProperties; -begin - Result := TcxTextEditProperties(InternalGetActiveProperties); -end; - -function TcxTextEdit.GetProperties: TcxTextEditProperties; -begin - Result := TcxTextEditProperties(FProperties); -end; - -function TcxTextEdit.SupportsSpelling: Boolean; -begin - Result := IsTextInputMode; -end; - -procedure TcxTextEdit.SetProperties(Value: TcxTextEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterTextEditHelper } - -class function TcxFilterTextEditHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxTextEdit; -end; - -class procedure TcxFilterTextEditHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - with TcxCustomTextEditProperties(AProperties) do - begin - AutoSelect := True; - HideSelection := True; - ViewStyle := vsNormal; - end; -end; - -class procedure TcxFilterTextEditHelper.SetFilterValue(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties; AValue: Variant); -begin - AEdit.EditValue := AValue; -end; - -initialization - WM_REDRAWMISSPELLINGS := RegisterWindowMessage('WM_REDRAWMISSPELLINGS'); - WM_SPELLCHECKERAUTOCORRECT := RegisterWindowMessage('WM_SPELLCHECKERAUTOCORRECT'); - GetRegisteredEditProperties.Register(TcxTextEditProperties, scxSEditRepositoryTextItem); - FilterEditsController.Register(TcxTextEditProperties, TcxFilterTextEditHelper); - -finalization - FilterEditsController.Unregister(TcxTextEditProperties, TcxFilterTextEditHelper); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxTimeEdit.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxTimeEdit.pas deleted file mode 100644 index 0b5724c0..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxTimeEdit.pas +++ /dev/null @@ -1,1158 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxTimeEdit; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, - Classes, Controls, SysUtils, cxClasses, cxContainer, cxDataUtils, cxDateUtils, - cxEdit, cxFormats, cxMaskEdit, cxSpinEdit, cxVariants, cxFilterControlUtils; - -type - TcxTimeEditZoneKind = (tzHour, tzMin, tzSec, tzTimeSuffix); - - TcxTimeEditZoneInfo = record - Kind: TcxTimeEditZoneKind; - Start, Length: Integer; - TimeSuffixKind: TcxTimeSuffixKind; - Use24HourFormat: Boolean; - end; - - { TcxTimeEditMaskMode } - - TcxTimeEditMaskMode = class(TcxMaskEditStandardMode) - protected - function GetBlank(APos: Integer): Char; override; - end; - - { TcxCustomTimeEditProperties } - - TcxCustomTimeEdit = class; - TcxTimeEditTimeFormat = (tfHourMinSec, tfHourMin, tfHour); - - TcxCustomTimeEditProperties = class(TcxCustomSpinEditProperties) - private - FAutoCorrectHours: Boolean; - FShowDate: Boolean; - FTimeFormat: TcxTimeEditTimeFormat; - FUse24HourFormat: Boolean; - FUseTimeFormatWhenUnfocused: Boolean; - procedure SetAutoCorrectHours(Value: Boolean); - procedure SetUse24HourFormat(Value: Boolean); - procedure SetShowDate(Value: Boolean); - procedure SetTimeFormat(Value: TcxTimeEditTimeFormat); - procedure SetUseTimeFormatWhenUnfocused(Value: Boolean); - protected - function DefaultFocusedDisplayValue: TcxEditValue; override; - function ExtendValueUpToBound: Boolean; override; - procedure FormatChanged; override; - function GetDisplayFormatOptions: TcxEditDisplayFormatOptions; override; - function GetModeClass(AMaskKind: TcxEditMaskKind): TcxMaskEditCustomModeClass; override; - procedure GetTimeZoneInfo(APos: Integer; - out AInfo: TcxTimeEditZoneInfo); virtual; - function IsDisplayValueNumeric: Boolean; override; - function IsEditValueNumeric: Boolean; override; - function PrepareValue(const AValue: TcxEditValue): Variant; override; - function PreserveSelection: Boolean; override; - function GetEditingPlace(APos: Integer): TcxTimeEditZoneKind; - function GetTimePartLength(AKind: TcxTimeEditZoneKind): Integer; virtual; - function GetTimePartPos(AKind: TcxTimeEditZoneKind): Integer; virtual; - function GetTimeSuffixKind: TcxTimeSuffixKind; virtual; - procedure UpdateEditMask; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - function GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; override; - function IsDisplayValueValid(var DisplayValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - function IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; - AEditFocused: Boolean); override; - procedure ValidateDisplayValue(var ADisplayValue: TcxEditValue; - var AErrorText: TCaption; var AError: Boolean; - AEdit: TcxCustomEdit); override; - // !!! - property AutoCorrectHours: Boolean read FAutoCorrectHours - write SetAutoCorrectHours default True; - property ShowDate: Boolean read FShowDate write SetShowDate default False; - property TimeFormat: TcxTimeEditTimeFormat read FTimeFormat write SetTimeFormat default tfHourMinSec; - property Use24HourFormat: Boolean read FUse24HourFormat write SetUse24HourFormat default True; - property UseTimeFormatWhenUnfocused: Boolean read FUseTimeFormatWhenUnfocused - write SetUseTimeFormatWhenUnfocused default True; - end; - - { TcxTimeEditProperties } - - TcxTimeEditProperties = class(TcxCustomTimeEditProperties) - published - property Alignment; - property AssignedValues; - property AutoCorrectHours; - property AutoSelect; - property BeepOnError; - property Circular; - property ClearKey; - property HideSelection; - property ImeMode; - property ImeName; - property ImmediatePost; - property Increment; - property LargeIncrement; - property ReadOnly; - property ShowDate; - property SpinButtons; - property TimeFormat; - property UseCtrlIncrement; - property UseLeftAlignmentOnEditing; - property Use24HourFormat; - property UseTimeFormatWhenUnfocused; - property ValidateOnEnter; - property OnChange; - property OnEditValueChanged; - property OnValidate; - end; - - { TcxCustomTimeEdit } - - TcxCustomTimeEdit = class(TcxCustomSpinEdit) - private - FSavedDate: TDate; - function GetProperties: TcxCustomTimeEditProperties; - function GetActiveProperties: TcxCustomTimeEditProperties; - function GetTime: TTime; - procedure SetProperties(Value: TcxCustomTimeEditProperties); - procedure SetTime(Value: TTime); - protected - function GetIncrement(AButton: TcxSpinEditButton): Double; override; - function GetValue: Variant; override; - function IncrementValueToStr(const AValue: TcxEditValue): string; override; - procedure Initialize; override; - function InternalGetEditingValue: TcxEditValue; override; - function InternalGetText: string; override; - procedure InternalSetDisplayValue(const Value: TcxEditValue); override; - procedure InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); override; - function InternalSetText(const Value: string): Boolean; override; - function IsValidChar(AChar: Char): Boolean; override; - function IsCharValidForPos(var AChar: Char; APos: Integer): Boolean; override; - procedure PropertiesChanged(Sender: TObject); override; - procedure SetValue(const Value: Variant); override; - function EditingPlace: TcxTimeEditZoneKind; - public - procedure Clear; override; - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - function Increment(AButton: TcxSpinEditButton): Boolean; override; - procedure PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); override; - property ActiveProperties: TcxCustomTimeEditProperties read GetActiveProperties; - property Properties: TcxCustomTimeEditProperties read GetProperties - write SetProperties; - property Time: TTime read GetTime write SetTime stored False; - end; - - { TcxTimeEdit } - - TcxTimeEdit = class(TcxCustomTimeEdit) - private - function GetActiveProperties: TcxTimeEditProperties; - function GetProperties: TcxTimeEditProperties; - procedure SetProperties(Value: TcxTimeEditProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxTimeEditProperties read GetActiveProperties; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragMode; - property EditValue; - property Enabled; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties: TcxTimeEditProperties read GetProperties write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Time; - property Visible; - property DragCursor; - property DragKind; - property ImeMode; - property ImeName; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDrag; - property OnEndDock; - property OnStartDock; - end; - - { TcxFilterTimeEditHelper } - - TcxFilterTimeEditHelper = class(TcxFilterSpinEditHelper) - protected - class procedure InitializeEdit(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties); override; - public - class function GetFilterEditClass: TcxCustomEditClass; override; - end; - -function IsCharValidForTimeEdit(ATimeEdit: TcxCustomMaskEdit; - var AChar: Char; APos: Integer; - const ATimeZoneInfo: TcxTimeEditZoneInfo): Boolean; - -implementation - -uses - StdCtrls, cxControls, cxEditConsts, cxTextEdit{$IFDEF DELPHI6}, DateUtils{$ENDIF}, - Forms, Dialogs, Math; - -type - - { TcxTimeEditFormatListener } - - TcxTimeEditFormatListener = class(TcxInterfacedPersistent, IcxFormatControllerListener) - protected - procedure FormatChanged; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - end; - -var - cxTimeEditHalfDayIncrement, - cxTimeEditOneHourIncrement, - cxTimeEditOneMinIncrement, - cxTimeEditOneSecIncrement: Double; - FTimeEditFormatListener: TcxTimeEditFormatListener; - - cxTimeEditFormats: array [TcxTimeEditTimeFormat, Boolean, 0 .. 1] of string = ( - (('hh:nn:ss ampm', '00:00:00 LL;1;0'), ('hh:nn:ss', '00:00:00;1;0')), - (('hh:nn ampm', '00:00 LL;1;0'), ('hh:nn', '00:00;1;0')), - (('hh ampm', '00 LL;1;0'), ('hh', '00;1;0')) - ); - -function EqualChars(C1, C2: Char): Boolean; -begin - Result := UpperCase(C1) = UpperCase(C2); -end; - -function GetFirstDifferenceIndex(const S1, S2: string): Integer; -var - ACount, I: Integer; -begin - Result := -1; - ACount := Min(Length(S1), Length(S2)); - for I := 1 to ACount do - if not EqualChars(S1[I], S2[I]) then - begin - Result := I; - Break; - end; - if (Result = -1) and (Length(S1) <> Length(S2)) then - Result := ACount + 1; -end; - -procedure GetTimeSuffixes(ATimeSuffixKind: TcxTimeSuffixKind; - out ATimeSuffix1, ATimeSuffix2: string); -begin - case ATimeSuffixKind of - tskAP: - begin - ATimeSuffix1 := 'A'; - ATimeSuffix2 := 'P'; - end; - tskAMPM: - begin - ATimeSuffix1 := 'AM'; - ATimeSuffix2 := 'PM'; - end; - tskAMPMString: - begin - ATimeSuffix1 := TimeAMString; - ATimeSuffix2 := TimePMString; - end; - end; -end; - -function IsCharValidForTimeEdit(ATimeEdit: TcxCustomMaskEdit; - var AChar: Char; APos: Integer; - const ATimeZoneInfo: TcxTimeEditZoneInfo): Boolean; - - procedure GetTimeValueItemValueRange(out AMinValue, AMaxValue: Integer); - begin - AMinValue := 0; - if ATimeZoneInfo.Kind = tzHour then - if not ATimeZoneInfo.Use24HourFormat then - begin - AMinValue := 1; - AMaxValue := 12; - end - else - AMaxValue := 23 - else - AMaxValue := 59; - end; - - procedure SetEditText(const AText: string; APos: Integer); - var - ASelStart: Integer; - S: string; - begin - S := ATimeEdit.Text; - Delete(S, APos, Length(AText)); - Insert(AText, S, APos); - ASelStart := ATimeEdit.SelStart; - TCustomEdit(ATimeEdit.InnerControl).Text := S; - ATimeEdit.SelStart := ASelStart; - end; - - function CheckTimeSuffix: Boolean; - var - AFirstDifferenceIndex: Integer; - ATimeSuffix, ATimeSuffix1, ATimeSuffix2: string; - begin - GetTimeSuffixes(ATimeZoneInfo.TimeSuffixKind, ATimeSuffix1, ATimeSuffix2); - AFirstDifferenceIndex := ATimeZoneInfo.Start + - GetFirstDifferenceIndex(ATimeSuffix1, ATimeSuffix2) - 1; - if APos < AFirstDifferenceIndex then - begin - Result := EqualChars(AChar, ATimeSuffix1[APos - ATimeZoneInfo.Start + 1]); - if Result then - AChar := ATimeSuffix1[APos - ATimeZoneInfo.Start + 1]; - end - else - if APos > AFirstDifferenceIndex then - begin - Result := EqualChars(AChar, ATimeEdit.Text[APos]); - if Result then - AChar := ATimeEdit.Text[APos]; - end - else - begin - Result := True; - if EqualChars(AChar, ATimeSuffix1[APos - ATimeZoneInfo.Start + 1]) then - ATimeSuffix := ATimeSuffix1 - else if EqualChars(AChar, ATimeSuffix2[APos - ATimeZoneInfo.Start + 1]) then - ATimeSuffix := ATimeSuffix2 - else - Result := False; - if Result then - begin - AChar := #0; - SetEditText(ATimeSuffix, ATimeZoneInfo.Start); - ATimeEdit.SelStart := ATimeZoneInfo.Start + ATimeZoneInfo.Length; - end; - end; - end; - - function CheckTimeValueItemFirstDigit(ADigit: Char): Boolean; - var - AMaxTimeZoneValue, AMinTimeZoneValue: Integer; - begin - Result := True; - GetTimeValueItemValueRange(AMinTimeZoneValue, AMaxTimeZoneValue); - if ADigit = '0' then - begin - SetEditText('0' + ATimeEdit.Text[APos], APos); - ATimeEdit.SelStart := ATimeEdit.SelStart + 1; - AChar := #0; - end - else - if ADigit <= IntToStr(AMaxTimeZoneValue)[1] then - begin - SetEditText(ADigit + '0', APos); - ATimeEdit.SelStart := ATimeEdit.SelStart + 1; - AChar := #0; - end - else - begin - SetEditText('0', APos); - ATimeEdit.SelStart := ATimeEdit.SelStart + 1; - end - end; - - function CheckTimeValueItemSecondDigit(ADigit: Char): Boolean; - begin - Result := ADigit <> '0'; - if Result then - begin - SetEditText('0', APos - 1); - Result := True; - end; - end; - - function CheckTimeValueItem: Boolean; - var - AMaxTimeZoneValue, AMinTimeZoneValue: Integer; - S: string; - begin - S := Copy(ATimeEdit.Text, ATimeZoneInfo.Start, ATimeZoneInfo.Length); - S[APos - ATimeZoneInfo.Start + 1] := AChar; - GetTimeValueItemValueRange(AMinTimeZoneValue, AMaxTimeZoneValue); - Result := (StrToInt(S) >= AMinTimeZoneValue) and (StrToInt(S) <= AMaxTimeZoneValue); - if not Result then - if APos = ATimeZoneInfo.Start then - Result := CheckTimeValueItemFirstDigit(AChar) - else - Result := CheckTimeValueItemSecondDigit(AChar); - end; - -begin - if ATimeZoneInfo.Kind = tzTimeSuffix then - Result := CheckTimeSuffix - else - Result := CheckTimeValueItem; -end; - -function IsSpace(AChar: Char): Boolean; -begin - Result := AChar = ' '; -end; - -procedure PrepareTimeEditMasks; -var - AMask: string; - ATimeFormat: TcxTimeEditTimeFormat; - I: Integer; - S: string; -begin - S := FormatDateTime('hh:mm:ss AMPM', 1.5); - AMask := ''; - for I := 9 to Length(S) do - if IsSpace(S[I]) then - AMask := AMask + ' ' - else - AMask := AMask + 'c'; - AMask := TrimRight(AMask); - for ATimeFormat := tfHourMinSec to tfHour do - begin - S := cxTimeEditFormats[ATimeFormat, False, 1]; - S := Copy(S, 1, (3 - Integer(ATimeFormat)) * 3 - 1); - S := S + AMask + ';1;0'; - cxTimeEditFormats[ATimeFormat, False, 1] := S; - end; -end; - -{ TcxTimeEditFormatListener } - -constructor TcxTimeEditFormatListener.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - cxFormatController.AddListener(Self); - PrepareTimeEditMasks; -end; - -destructor TcxTimeEditFormatListener.Destroy; -begin - cxFormatController.RemoveListener(Self); - inherited Destroy; -end; - -procedure TcxTimeEditFormatListener.FormatChanged; -begin - PrepareTimeEditMasks; -end; - -{ TcxTimeEditMaskMode } - -function TcxTimeEditMaskMode.GetBlank(APos: Integer): Char; -begin - if TcxCustomTimeEditProperties(Properties).GetEditingPlace(APos) = tzTimeSuffix then - Result := #0 - else - Result := '0'; -end; - -{ TcxCustomTimeEditProperties } - -constructor TcxCustomTimeEditProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FTimeFormat := tfHourMinSec; - ValueType := vtFloat; - FAutoCorrectHours := True; - FUse24HourFormat := True; - FUseTimeFormatWhenUnfocused := True; - UpdateEditMask; - IgnoreMaskBlank := True; - Increment := 1; - MinValue := 0; - MaxValue := 24 * 60 * 60 - 1; - AlwaysShowBlanksAndLiterals := True; -end; - -procedure TcxCustomTimeEditProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomTimeEditProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomTimeEditProperties do - begin - Self.AutoCorrectHours := AutoCorrectHours; - Self.ShowDate := ShowDate; - Self.TimeFormat := TimeFormat; - Self.Use24HourFormat := Use24HourFormat; - Self.UseTimeFormatWhenUnfocused := UseTimeFormatWhenUnfocused; - end - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -class function TcxCustomTimeEditProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxTimeEdit; -end; - -function TcxCustomTimeEditProperties.IsDisplayValueValid(var DisplayValue: TcxEditValue; - AEditFocused: Boolean): Boolean; -var - AText: string; - ADateTime: TDateTime; -begin - AText := VarToStr(DisplayValue); - Result := True; - try - ADateTime := StrToDateTime(AText); - DisplayValue := FormatDateTime(cxTimeEditFormats[TimeFormat, FUse24HourFormat, 0], ADateTime); - DisplayValue := TrimRight(DisplayValue); - except - Result := False; - end; -end; - -function TcxCustomTimeEditProperties.IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; -begin - if VarIsStr(EditValue) then - Result := IsDisplayValueValid(EditValue, AEditFocused) - else - Result := VarIsNull(EditValue) or VarIsDate(EditValue) or VarIsNumericEx(EditValue); -end; - -procedure TcxCustomTimeEditProperties.PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); - - function InternalFormatDateTime(AValue: TcxEditValue): string; - begin - if AEditFocused or FUseTimeFormatWhenUnfocused and - ((AValue = 0) or not ShowDate or (DateOf(AValue) = 0)) then - Result := FormatDateTime(cxTimeEditFormats[TimeFormat, Use24HourFormat, 0], AValue) - else - if (AValue = 0) or not ShowDate or (DateOf(AValue) = 0) then - Result := TimeToStr(AValue) - else - Result := DateTimeToStr(AValue); - Result := TrimRight(Result); - end; - -begin - if VarIsNull(AEditValue) then - if not AEditFocused then - DisplayValue := '' - else - begin - DisplayValue := FormatDateTime(cxTimeEditFormats[TimeFormat, FUse24HourFormat, 0], 0); - DisplayValue := TrimRight(DisplayValue); - end - else - if not VarIsDate(AEditValue) and not VarIsNumericEx(AEditValue) and - not VarIsStr(AEditValue) then - raise EConvertError.CreateFmt(cxGetResourceString(@cxSEditTimeConvertError), []) - else - try - if VarIsStr(AEditValue) then - DisplayValue := InternalFormatDateTime(StrToDateTime(AEditValue)) - else - DisplayValue := InternalFormatDateTime(AEditValue); - except - DisplayValue := InternalFormatDateTime(SysUtils.Now); - end; -end; - -procedure TcxCustomTimeEditProperties.ValidateDisplayValue( - var ADisplayValue: TcxEditValue; var AErrorText: TCaption; - var AError: Boolean; AEdit: TcxCustomEdit); -var - AIsUserErrorDisplayValue: Boolean; -begin - if AErrorText = '' then - AErrorText := cxGetResourceString(@cxSEditTimeConvertError); - DoValidate(ADisplayValue, AErrorText, AError, AEdit, AIsUserErrorDisplayValue); -end; - -function TcxCustomTimeEditProperties.GetEditValueSource(AEditFocused: Boolean): TcxDataEditValueSource; -begin - Result := GetValueEditorEditValueSource(AEditFocused); -end; - -function TcxCustomTimeEditProperties.DefaultFocusedDisplayValue: TcxEditValue; -begin - Result := FormatDateTime(cxTimeEditFormats[TimeFormat, FUse24HourFormat, 0], 0); - Result := TrimRight(Result); -end; - -function TcxCustomTimeEditProperties.ExtendValueUpToBound: Boolean; -begin - Result := False; -end; - -procedure TcxCustomTimeEditProperties.FormatChanged; -begin - BeginUpdate; - try - UpdateEditMask; - finally - EndUpdate; - end; -end; - -function TcxCustomTimeEditProperties.GetDisplayFormatOptions: TcxEditDisplayFormatOptions; -begin - Result := [dfoSupports, dfoNoCurrencyValue]; -end; - -function TcxCustomTimeEditProperties.GetModeClass( - AMaskKind: TcxEditMaskKind): TcxMaskEditCustomModeClass; -begin - Result := TcxTimeEditMaskMode; -end; - -procedure TcxCustomTimeEditProperties.GetTimeZoneInfo(APos: Integer; - out AInfo: TcxTimeEditZoneInfo); -begin - AInfo.Kind := GetEditingPlace(APos); - AInfo.Start := GetTimePartPos(AInfo.Kind); - AInfo.Length := GetTimePartLength(AInfo.Kind); - AInfo.TimeSuffixKind := GetTimeSuffixKind; - AInfo.Use24HourFormat := Use24HourFormat; -end; - -function TcxCustomTimeEditProperties.GetTimePartLength(AKind: TcxTimeEditZoneKind): Integer; -begin - Result := 2; -end; - -function TcxCustomTimeEditProperties.GetTimePartPos(AKind: TcxTimeEditZoneKind): Integer; -begin - if AKind = tzTimeSuffix then - Result := (3 - Integer(TimeFormat)) * 3 + 1 - else - Result := Integer(AKind) * 3 + 1; -end; - -function TcxCustomTimeEditProperties.GetTimeSuffixKind: TcxTimeSuffixKind; -begin - Result := tskAMPMString; -end; - -function TcxCustomTimeEditProperties.IsDisplayValueNumeric: Boolean; -begin - Result := False; -end; - -function TcxCustomTimeEditProperties.IsEditValueNumeric: Boolean; -begin - Result := False; -end; - -function TcxCustomTimeEditProperties.PrepareValue(const AValue: TcxEditValue): Variant; -begin - Result := 0; -end; - -function TcxCustomTimeEditProperties.PreserveSelection: Boolean; -begin - Result := True; -end; - -function TcxCustomTimeEditProperties.GetEditingPlace( - APos: Integer): TcxTimeEditZoneKind; -var - ATimeStringLength: Integer; - ATimeZoneChar: Char; - S: string; -begin - ATimeStringLength := (3 - Integer(TimeFormat)) * 3 - 1; - if (MaxLength > 0) and (APos > MaxLength) then - APos := MaxLength; - if (APos > ATimeStringLength) and not Use24HourFormat then - begin - Result := tzTimeSuffix; - Exit; - end; - S := UpperCase(cxTimeEditFormats[TimeFormat, Use24HourFormat, 0]); - if APos > Length(S) then - APos := Length(S); - ATimeZoneChar := S[APos]; - if not ((ATimeZoneChar = 'H') or (ATimeZoneChar = 'N') or - (ATimeZoneChar = 'S')) then - begin - Inc(APos); - if APos > Length(S) then - APos := Length(S); - ATimeZoneChar := S[APos]; - end; - - case ATimeZoneChar of - 'H': - Result := tzHour; - 'N': - Result := tzMin; - else - Result := tzSec; - end; -end; - -procedure TcxCustomTimeEditProperties.UpdateEditMask; -begin - EditMask := cxTimeEditFormats[FTimeFormat, FUse24HourFormat, 1]; -end; - -procedure TcxCustomTimeEditProperties.SetAutoCorrectHours(Value: Boolean); -begin - if Value <> FAutoCorrectHours then - FAutoCorrectHours := Value; -end; - -procedure TcxCustomTimeEditProperties.SetUse24HourFormat(Value: Boolean); -begin - if Value <> FUse24HourFormat then - begin - FUse24HourFormat := Value; - UpdateEditMask; - Changed; - end; -end; - -procedure TcxCustomTimeEditProperties.SetShowDate(Value: Boolean); -begin - if Value <> FShowDate then - begin - FShowDate := Value; - Changed; - end; -end; - -procedure TcxCustomTimeEditProperties.SetTimeFormat(Value: TcxTimeEditTimeFormat); -begin - if FTimeFormat <> Value then - begin - FTimeFormat := Value; - UpdateEditMask; - Changed; - end; -end; - -procedure TcxCustomTimeEditProperties.SetUseTimeFormatWhenUnfocused( - Value: Boolean); -begin - if FUseTimeFormatWhenUnfocused <> Value then - begin - FUseTimeFormatWhenUnfocused := Value; - Changed; - end; -end; - -{ TcxCustomTimeEdit } - -procedure TcxCustomTimeEdit.Clear; -begin - Time := 0; -end; - -class function TcxCustomTimeEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomTimeEditProperties; -end; - -function TcxCustomTimeEdit.Increment(AButton: TcxSpinEditButton): Boolean; -var - ACursorPosition: Integer; - ASelStart, ASelLength: Integer; -begin - ACursorPosition := 0; - ASelLength := 0; - if HandleAllocated then - begin - ASelStart := SelStart; - if EditingPlace = tzTimeSuffix then - begin - ACursorPosition := (3 - Integer(ActiveProperties.TimeFormat)) * 3; - while IsSpace(DisplayValue[ACursorPosition]) do - Inc(ACursorPosition); - if IsPM(TDateTime(Time)) then - ASelLength := Length(TimeAMString) - else - ASelLength := Length(TimePMString); - Dec(ACursorPosition); - end else - begin - ASelLength := 1; - case ASelStart of - 0..1: - ACursorPosition := 1; - 2..4: - ACursorPosition := 4; - else - ACursorPosition := 7; - end; - end; - end; - Result := inherited Increment(AButton); - if HandleAllocated then - SetSelection(ACursorPosition, ASelLength); -end; - -procedure TcxCustomTimeEdit.PrepareEditValue(const ADisplayValue: TcxEditValue; - out EditValue: TcxEditValue; AEditFocused: Boolean); - - function GetCorrectTimeSuffix(const ASuffix: string): string; - var - APos: Integer; - begin - APos := Pos(TimeAMString, ASuffix); - if APos <> 0 then - Result := TimeAMString - else - Result := TimePMString; - end; - -var - ATimeStringLength: Integer; - AText: string; - AValue: Double; -begin - AText := ADisplayValue; - ATimeStringLength := (3 - Integer(ActiveProperties.TimeFormat)) * 3 - 1; - if not ActiveProperties.Use24HourFormat then - AText := Copy(AText, 1, ATimeStringLength); - if Length(AText) = 2 then - AText := AText + ':00'; // delphi bug - if not ActiveProperties.Use24HourFormat then - AText := AText + GetCorrectTimeSuffix( - Copy(ADisplayValue, ATimeStringLength + 1, - Length(ADisplayValue) - ATimeStringLength)); - AValue := 0; - try - try - if AText <> '' then - AValue := StrToTime(AText); - except - AValue := 0; - end - finally - AValue := FSavedDate + AValue * cxSign(FSavedDate); - EditValue := AValue; - end; - if EditValue <> 0 then - EditValue := VarAsType(EditValue, varDate); -end; - -function TcxCustomTimeEdit.GetIncrement(AButton: TcxSpinEditButton): Double; -var - AEditingPlace: TcxTimeEditZoneKind; - AIsForwardDirection: Boolean; - AMultiplier: Double; -begin - Result := 0; - AEditingPlace := EditingPlace; - - AMultiplier := ActiveProperties.GetIncrement(AButton); - case AEditingPlace of - tzTimeSuffix: - begin - AIsForwardDirection := AButton in [sebForward, sebFastForward]; - if AIsForwardDirection then - begin - Result := cxTimeEditHalfDayIncrement; - if Value >= cxTimeEditHalfDayIncrement then - Result := -Result; - end - else - begin - Result := -cxTimeEditHalfDayIncrement; - if Value < cxTimeEditHalfDayIncrement then - Result := -Result; - end; - end; - tzHour: Result := cxTimeEditOneHourIncrement * AMultiplier; - tzMin: Result := cxTimeEditOneMinIncrement * AMultiplier; - tzSec: Result := cxTimeEditOneSecIncrement * AMultiplier; - end; -end; - -function TcxCustomTimeEdit.GetValue: Variant; -var - AHours, ATimeSuffixLength, AValue: Integer; - S: string; -begin - S := Text; - AHours := StrToInt(Copy(S, 1, 2)); - if not ActiveProperties.Use24HourFormat then - AHours := AHours mod 12; - AValue := AHours * 60 * 60; - if ActiveProperties.TimeFormat <> tfHour then - AValue := AValue + StrToInt(Copy(S, 4, 2)) * 60; - if ActiveProperties.TimeFormat = tfHourMinSec then - AValue := AValue + StrToInt(Copy(S, 7, 2)); - ATimeSuffixLength := Length(TimePMString); - if not ActiveProperties.Use24HourFormat and InternalCompareString(Copy(S, - Length(S) - ATimeSuffixLength + 1, ATimeSuffixLength), TimePMString, True) then - Inc(AValue, 12 * 60 * 60); - Result := AValue; -end; - -function TcxCustomTimeEdit.IncrementValueToStr(const AValue: TcxEditValue): string; -var - ATime: TDateTime; -begin - ATime := AValue; - Result := inherited IncrementValueToStr(ATime * {$IFDEF DELPHI7}MSecsPerSec{$ELSE}1000{$ENDIF} / MSecsPerDay); -end; - -procedure TcxCustomTimeEdit.Initialize; -begin - inherited Initialize; - ControlStyle := ControlStyle - [csSetCaption]; -end; - -function TcxCustomTimeEdit.InternalGetEditingValue: TcxEditValue; -begin - PrepareEditValue(Text, Result, True); -end; - -function TcxCustomTimeEdit.InternalGetText: string; -begin - Result := DisplayValue; -end; - -procedure TcxCustomTimeEdit.InternalSetDisplayValue(const Value: TcxEditValue); -begin - if ActiveProperties.Use24HourFormat or (VarToStr(Value) <> '') then - inherited InternalSetDisplayValue(Value) - else - InnerTextEdit.EditValue := Value; -end; - -procedure TcxCustomTimeEdit.InternalSetEditValue(const Value: TcxEditValue; - AValidateEditValue: Boolean); -var - AValue: TcxEditValue; - AIsEditValueValid: Boolean; -begin - AValue := Value; - AIsEditValueValid := not AValidateEditValue or ActiveProperties.IsEditValueValid(AValue, InternalFocused); - if VarIsNull(Value) or not AIsEditValueValid then - FSavedDate := 0 - else - if VarIsStr(AValue) then - FSavedDate := TDate(DateOf(StrToDateTime(Value))) - else - FSavedDate := TDate(DateOf(Value)); - inherited InternalSetEditValue(Value, AValidateEditValue); -end; - -function TcxCustomTimeEdit.InternalSetText(const Value: string): Boolean; -begin - Result := SetDisplayText(Value); -end; - -function TcxCustomTimeEdit.IsValidChar(AChar: Char): Boolean; -begin - Result := True; -end; - -function TcxCustomTimeEdit.IsCharValidForPos(var AChar: Char; - APos: Integer): Boolean; -var - ATimeZoneInfo: TcxTimeEditZoneInfo; -begin - ActiveProperties.GetTimeZoneInfo(APos, ATimeZoneInfo); - Result := IsCharValidForTimeEdit(Self, AChar, APos, ATimeZoneInfo); -end; - -procedure TcxCustomTimeEdit.PropertiesChanged(Sender: TObject); -begin - if not Focused then - DataBinding.UpdateDisplayValue; - SelStart := Length(DisplayValue); - inherited PropertiesChanged(Sender); -end; - -procedure TcxCustomTimeEdit.SetValue(const Value: Variant); -var - ATime: TDateTime; -begin - ATime := Value; - Time := ATime * {$IFDEF DELPHI7}MSecsPerSec{$ELSE}1000{$ENDIF} / MSecsPerDay; -end; - -function TcxCustomTimeEdit.EditingPlace: TcxTimeEditZoneKind; -begin - Result := ActiveProperties.GetEditingPlace(SelStart + 1); -end; - -function TcxCustomTimeEdit.GetProperties: TcxCustomTimeEditProperties; -begin - Result := TcxCustomTimeEditProperties(FProperties); -end; - -function TcxCustomTimeEdit.GetActiveProperties: TcxCustomTimeEditProperties; -begin - Result := TcxCustomTimeEditProperties(InternalGetActiveProperties); -end; - -function TcxCustomTimeEdit.GetTime: TTime; -var - AValue: TcxEditValue; -begin - Result := TTime(SysUtils.Now); - try - if Focused then - begin - PrepareEditValue(DisplayValue, AValue, True); - Result := TTime(VarAsType(AValue, varDate)); - end - else - if VarIsStr(EditValue) then - Result := TTime(StrToDateTime(EditValue)) - else - begin - Result := TTime(VarAsType(EditValue, varDate)); - end; - finally - Result := Abs(Frac(Result)); - end; -end; - -procedure TcxCustomTimeEdit.SetProperties(Value: TcxCustomTimeEditProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomTimeEdit.SetTime(Value: TTime); -begin - InternalEditValue := VarToDateTime( - Abs(Frac(Value)) * cxSign(FSavedDate) + FSavedDate); -end; - -{ TcxTimeEdit } - -class function TcxTimeEdit.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxTimeEditProperties; -end; - -function TcxTimeEdit.GetActiveProperties: TcxTimeEditProperties; -begin - Result := TcxTimeEditProperties(InternalGetActiveProperties); -end; - -function TcxTimeEdit.GetProperties: TcxTimeEditProperties; -begin - Result := TcxTimeEditProperties(FProperties); -end; - -procedure TcxTimeEdit.SetProperties(Value: TcxTimeEditProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterTimeEditHelper } - -class procedure TcxFilterTimeEditHelper.InitializeEdit(AEdit: TcxCustomEdit; - AEditProperties: TcxCustomEditProperties); -begin - inherited InitializeEdit(AEdit, AEditProperties); - TcxTimeEdit(AEdit).Time := 0; -end; - -class function TcxFilterTimeEditHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxTimeEdit; -end; - -initialization - cxTimeEditHalfDayIncrement := 12 * 60 * 60; - cxTimeEditOneHourIncrement := 60 * 60; - cxTimeEditOneMinIncrement := 60; - cxTimeEditOneSecIncrement := 1; - FTimeEditFormatListener := TcxTimeEditFormatListener.Create(nil); - - GetRegisteredEditProperties.Register(TcxTimeEditProperties, scxSEditRepositoryTimeItem); - FilterEditsController.Register(TcxTimeEditProperties, TcxFilterTimeEditHelper); - -finalization - FilterEditsController.Unregister(TcxTimeEditProperties, TcxFilterTimeEditHelper); - FreeAndNil(FTimeEditFormatListener); - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxTrackBar.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxTrackBar.pas deleted file mode 100644 index c51d77f8..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxTrackBar.pas +++ /dev/null @@ -1,2370 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxTrackBar; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, Variants, -{$ENDIF} - Windows, Classes, Controls, Forms, Graphics, Messages, SysUtils, cxClasses, - cxContainer, cxControls, cxCustomData, cxEdit, cxExtEditConsts, cxLookAndFeelPainters, - cxFilterControlUtils, cxGraphics, cxLookAndFeels, cxTextEdit, cxVariants, Math; - -type - TcxTrackBarOrientation = (tboHorizontal, tboVertical); - TcxTrackBarTextOrientation = (tbtoHorizontal, tbtoVertical); - TcxTrackBarTickMarks = (cxtmBoth, cxtmTopLeft, cxtmBottomRight); - TcxTrackBarTickType = (tbttTicks, tbttNumbers, tbttValueNumber); - TcxTrackBarMouseState = (tbmpInControl, tbmpUnderThumb, tbmpSliding); - TcxTrackBarMouseStates = set of TcxTrackBarMouseState; - TcxTrackBarSlideState = (tbksNormal, tbksIncludeSelection); - TcxTrackBarThumbType = (cxttNone, cxttRegular, cxttCustom); - TcxTrackBarThumbStep = (cxtsNormal, cxtsJump); - - TcxGetThumbRectEvent = procedure(Sender: TObject; var ARect: TRect) of object; - TcxDrawThumbEvent = procedure(Sender: TObject; ACanvas: TcxCanvas; - const ARect: TRect) of object; - - { TcxTrackBarStyle } - - TcxTrackBarStyle = class(TcxEditStyle) - protected - function DefaultBorderStyle: TcxContainerBorderStyle; override; - function DefaultHotTrack: Boolean; override; - end; - - { TcxCustomTrackBarViewInfo } - - TcxCustomTrackBar = class; - - TcxCustomTrackBarViewInfo = class(TcxCustomTextEditViewInfo) - private - FLookAndFeel: TcxLookAndFeel; - FPosition: Integer; - FSelectionEnd: Integer; - FSelectionStart: Integer; - FShowSelection: Boolean; - FTBBitmap: TBitmap; - FTBCanvas: TcxCanvas; - FThumbHeight: Integer; - FThumbWidth: Integer; - FTrackBarState: Integer; - FTrackSize: Integer; - function GetEdit: TcxCustomTrackBar; - protected - RealTrackBarRect: TRect; - TrackBarRect: TRect; - TrackZoneRect: TRect; - TrackRect: TRect; - ThumbRect: TRect; - SelectionRect: TRect; - FromBorderIndent: Integer; - procedure DrawTrack(ACanvas: TcxCanvas); virtual; - procedure DrawSelection(ACanvas: TcxCanvas); virtual; - procedure DrawTicks(ACanvas: TcxCanvas); virtual; - procedure DrawThumb(ACanvas: TcxCanvas); virtual; - function DrawingThumbRectToRealThumbRect(ACanvas: TcxCanvas): TRect; virtual; - function GetThumbThemeType: Byte; virtual; - procedure PaintTrackBar(ACanvas: TcxCanvas); virtual; - public - FocusRect: TRect; - HasForegroundImage: Boolean; - MouseStates: TcxTrackBarMouseStates; - NeedPointer: Boolean; - ThumbLargeSize, ThumbSize, TrackRectDelta: Integer; - TickColor: TColor; - TickOffset: Double; - TrackBarBorderWidth: Integer; - TrackHeight, TrackWidth: Integer; - - procedure Assign(Source: TObject); override; - procedure DrawText(ACanvas: TcxCanvas); override; - function GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; override; - function IsHotTrack: Boolean; overload; override; - function IsHotTrack(P: TPoint): Boolean; overload; override; - function NeedShowHint(ACanvas: TcxCanvas; const P: TPoint; out AText: TCaption; - out AIsMultiLine: Boolean; out ATextRect: TRect): Boolean; override; - procedure Offset(DX, DY: Integer); override; - procedure Paint(ACanvas: TcxCanvas); override; - constructor Create; override; - destructor Destroy; override; - - property Edit: TcxCustomTrackBar read GetEdit; - property LookAndFeel: TcxLookAndFeel read FLookAndFeel write FLookAndFeel; - property Position: Integer read FPosition write FPosition; - property SelectionEnd: Integer read FSelectionEnd write FSelectionEnd; - property SelectionStart: Integer read FSelectionStart write FSelectionStart; - property ThumbHeight: Integer read FThumbHeight write FThumbHeight; - property ThumbWidth: Integer read FThumbWidth write FThumbWidth; - property TrackBarState: Integer read FTrackBarState write FTrackBarState; - property TrackSize: Integer read FTrackSize write FTrackSize; - end; - - { TcxCustomTrackBarViewData } - - TcxCustomTrackBarProperties = class; - - TcxCustomTrackBarViewData = class(TcxCustomEditViewData) - private - procedure GetOnGetThumbRect(out AValue: TcxGetThumbRectEvent); - function GetProperties: TcxCustomTrackBarProperties; - protected - procedure CalculateCustomTrackBarRects(ACanvas: TcxCanvas; - AViewInfo: TcxCustomTrackBarViewInfo); virtual; - function InternalGetEditConstantPartSize(ACanvas: TcxCanvas; AIsInplace: Boolean; - AEditSizeProperties: TcxEditSizeProperties; - var MinContentSize: TSize; AViewInfo: TcxCustomEditViewInfo): TSize; override; - function GetTopLeftTickSize(ACanvas: TcxCanvas; - AViewInfo: TcxCustomTrackBarViewInfo; ALeftTop: Boolean): Integer; virtual; - procedure CalculateTBViewInfoProps(AViewInfo: TcxCustomEditViewInfo); virtual; - procedure CalculateTrackBarRect(AViewInfo: TcxCustomTrackBarViewInfo); virtual; - procedure CalculateTrackZoneRect(ACanvas: TcxCanvas; - AViewInfo: TcxCustomTrackBarViewInfo); virtual; - procedure CalculateTrackRect(AViewInfo: TcxCustomTrackBarViewInfo); virtual; - procedure CalculateThumbSize(AViewInfo: TcxCustomTrackBarViewInfo); virtual; - procedure CalculateThumbRect(ACanvas: TcxCanvas; - AViewInfo: TcxCustomTrackBarViewInfo); virtual; - procedure CalculateSelectionRect(AViewInfo: TcxCustomTrackBarViewInfo); virtual; - procedure DoOnGetThumbRect(var ARect: TRect); - function IsOnGetThumbRectEventAssigned: Boolean; - public - procedure Calculate(ACanvas: TcxCanvas; const ABounds: TRect; const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); override; - procedure EditValueToDrawValue(ACanvas: TcxCanvas; const AEditValue: TcxEditValue; - AViewInfo: TcxCustomEditViewInfo); override; - property Properties: TcxCustomTrackBarProperties read GetProperties; - end; - - { TcxCustomTrackBarProperties } - - TcxCustomTrackBarProperties = class(TcxCustomEditProperties) - private - FAutoSize: Boolean; - FBorderWidth: Integer; - FFrequency: Integer; - FMin: Integer; - FMax: Integer; - FOrientation: TcxTrackBarOrientation; - FTextOrientation: TcxTrackBarTextOrientation; - FPageSize: TcxNaturalNumber; - FSelectionStart: Integer; - FSelectionEnd: Integer; - FSelectionColor: TColor; - FShowTicks: Boolean; - FThumbType: TcxTrackBarThumbType; - FShowTrack: Boolean; - FTickColor: TColor; - FTickType: TcxTrackBarTickType; - FTickMarks: TcxTrackBarTickMarks; - FTickSize: TcxNaturalNumber; - FTrackColor: TColor; - FTrackSize: Integer; - FTrackRect: TRect; - FThumbRect: TRect; - FThumbHeight: Integer; - FThumbWidth: Integer; - FThumbColor: TColor; - FThumbHighlightColor: TColor; - FThumbStep: TcxTrackBarThumbStep; - FTickOffset: Double; - FOnGetThumbRect: TcxGetThumbRectEvent; - FOnDrawThumb: TcxDrawThumbEvent; - procedure SetAutoSize(Value: Boolean); - procedure SetBorderWidth(Value: Integer); - procedure SetFrequency(Value: Integer); - procedure SetMin(Value: Integer); - procedure SetMax(Value: Integer); - procedure SetOrientation(Value: TcxTrackBarOrientation); - procedure SetTextOrientation(Value: TcxTrackBarTextOrientation); - procedure SetPageSize(Value: TcxNaturalNumber); - procedure SetSelectionStart(Value: Integer); - procedure SetSelectionEnd(Value: Integer); - procedure SetSelectionColor(Value: TColor); - procedure SetShowTicks(Value: Boolean); - procedure SetThumbType(Value: TcxTrackBarThumbType); - procedure SetShowTrack(Value: Boolean); - procedure SetTickColor(Value: TColor); - procedure SetTickType(Value: TcxTrackBarTickType); - procedure SetTickMarks(Value: TcxTrackBarTickMarks); - procedure SetTickSize(Value: TcxNaturalNumber); - procedure SetTrackColor(Value: TColor); - procedure SetTrackSize(Value: Integer); - procedure SetThumbHeight(Value: Integer); - procedure SetThumbWidth(Value: Integer); - procedure SetThumbColor(Value: TColor); - procedure SetThumbHighlightColor(Value: TColor); - procedure DoDrawThumb(Sender: TObject; ACanvas: TcxCanvas; const ARect: TRect); - protected - class function GetViewDataClass: TcxCustomEditViewDataClass; override; - function HasDisplayValue: Boolean; override; - function FixPosition(const APosition: Integer): Integer; virtual; - function EditValueToPosition(const AEditValue: TcxEditValue): Integer; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function CanCompareEditValue: Boolean; override; - class function GetContainerClass: TcxContainerClass; override; - function GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; override; - class function GetStyleClass: TcxCustomEditStyleClass; override; - function GetSupportedOperations: TcxEditSupportedOperations; override; - class function GetViewInfoClass: TcxContainerViewInfoClass; override; - function IsEditValueValid(var EditValue: TcxEditValue; AEditFocused: Boolean): Boolean; override; - procedure PrepareDisplayValue(const AEditValue: TcxEditValue; - var DisplayValue: TcxEditValue; AEditFocused: Boolean); override; - // !!! - property AutoSize: Boolean read FAutoSize write SetAutoSize default True; - property BorderWidth: Integer read FBorderWidth write SetBorderWidth - default 0; - property Frequency: Integer read FFrequency write SetFrequency default 1; - property Max: Integer read FMax write SetMax default 10; - property Min: Integer read FMin write SetMin default 0; - property Orientation: TcxTrackBarOrientation read FOrientation - write SetOrientation default tboHorizontal; - property PageSize: TcxNaturalNumber read FPageSize write SetPageSize - default 1; - property SelectionColor: TColor read FSelectionColor write SetSelectionColor - default clHighlight; - property SelectionEnd: Integer read FSelectionEnd write SetSelectionEnd - default 0; - property SelectionStart: Integer read FSelectionStart - write SetSelectionStart default 0; - property ShowTicks: Boolean read FShowTicks write SetShowTicks default True; - property ShowTrack: Boolean read FShowTrack write SetShowTrack default True; - property TextOrientation: TcxTrackBarTextOrientation read FTextOrientation - write SetTextOrientation default tbtoHorizontal; - property ThumbColor: TColor read FThumbColor write SetThumbColor - default clBtnFace; - property ThumbHeight: Integer read FThumbHeight write SetThumbHeight - default 12; - property ThumbHighlightColor: TColor read FThumbHighlightColor - write SetThumbHighlightColor default clSilver; - property ThumbStep: TcxTrackBarThumbStep read FThumbStep write FThumbStep - default cxtsNormal; - property ThumbType: TcxTrackBarThumbType read FThumbType write SetThumbType - default cxttRegular; - property ThumbWidth: Integer read FThumbWidth write SetThumbWidth default 7; - property TickColor: TColor read FTickColor write SetTickColor - default clWindowText; - property TickMarks: TcxTrackBarTickMarks read FTickMarks write SetTickMarks - default cxtmBottomRight; - property TickSize: TcxNaturalNumber read FTickSize write SetTickSize - default 3; - property TickType: TcxTrackBarTickType read FTickType write SetTickType - default tbttTicks; - property TrackColor: TColor read FTrackColor write SetTrackColor - default clWindow; - property TrackSize : Integer read FTrackSize write SetTrackSize default 5; - property OnDrawThumb: TcxDrawThumbEvent read FOnDrawThumb - write FOnDrawThumb; - property OnGetThumbRect: TcxGetThumbRectEvent read FOnGetThumbRect - write FOnGetThumbRect; - end; - - { TcxTrackBarProperties } - - TcxTrackBarProperties = class(TcxCustomTrackBarProperties) - published - property AutoSize; - property BorderWidth; - property ClearKey; - property Frequency; - property Max; - property Min; - property Orientation; - property PageSize; - property SelectionColor; - property SelectionEnd; - property SelectionStart; - property ShowTicks; - property ShowTrack; - property TextOrientation; - property ThumbColor; - property ThumbHeight; - property ThumbHighlightColor; - property ThumbStep; - property ThumbType; - property ThumbWidth; - property TickColor; - property TickMarks; - property TickSize; - property TickType; - property TrackColor; - property TrackSize; - property OnChange; - property OnDrawThumb; - property OnGetThumbRect; - end; - - { TcxCustomTrackBar } - - TcxCustomTrackBar = class(TcxCustomEdit) - private - FSlideState: TcxTrackBarSlideState; - FStartSelectionPosition: Integer; - function GetStyle: TcxTrackBarStyle; - procedure SetStyle(Value: TcxTrackBarStyle); - procedure SetNewSelectionPosition(const ANewPosition: Integer); - function GetPosition: Integer; - procedure SetPosition(Value: Integer); - function GetProperties: TcxCustomTrackBarProperties; - function GetActiveProperties: TcxCustomTrackBarProperties; - procedure GetOnGetThumbRect(out AValue: TcxGetThumbRectEvent); - function GetViewInfo: TcxCustomTrackBarViewInfo; - procedure SetProperties(Value: TcxCustomTrackBarProperties); - procedure WMLButtonUp(var Message: TWMLButtonUp); message WM_LBUTTONUP; - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - protected - function DefaultParentColor: Boolean; override; - procedure FillSizeProperties(var AEditSizeProperties: TcxEditSizeProperties); override; - procedure Initialize; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseEnter(AControl: TControl); override; - procedure MouseLeave(AControl: TControl); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure SynchronizeDisplayValue; override; - function WantNavigationKeys: Boolean; override; - procedure InternalSetPosition(Value: Integer); - property ViewInfo: TcxCustomTrackBarViewInfo read GetViewInfo; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxCustomTrackBarProperties - read GetActiveProperties; - property Position: Integer read GetPosition write SetPosition default 0; - property Properties: TcxCustomTrackBarProperties read GetProperties - write SetProperties; - property Style: TcxTrackBarStyle read GetStyle write SetStyle; - property Transparent; - end; - - { TcxCustomTrackBar } - - TcxTrackBar = class(TcxCustomTrackBar) - private - function GetActiveProperties: TcxTrackBarProperties; - function GetProperties: TcxTrackBarProperties; - procedure SetProperties(Value: TcxTrackBarProperties); - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxTrackBarProperties read GetActiveProperties; - published - property Align; - property Anchors; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Position; - property Properties: TcxTrackBarProperties read GetProperties - write SetProperties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Transparent; - property Visible; - property OnContextPopup; - property OnDragDrop; - property OnDragOver; - property OnEditing; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseEnter; - property OnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - end; - -implementation - -uses - cxEditConsts, cxEditPaintUtils, cxEditUtils, cxExtEditUtils, cxSpinEdit, - dxThemeConsts, dxThemeManager, dxUxTheme; - -const - BetweenTrackAndTick = 1; - FromBorderIndent = 7; - -type - { TcxFilterTrackBarHelper } - - TcxFilterTrackBarHelper = class(TcxFilterSpinEditHelper) - public - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - -procedure CalculateCustomTrackBarViewInfo(ACanvas: TcxCanvas; AViewData: TcxCustomTrackBarViewData; - AViewInfo: TcxCustomTrackBarViewInfo); - - procedure CheckFocusRectBounds; - begin - with AViewInfo do - begin - if FocusRect.Left < TextRect.Left - 1 then - FocusRect.Left := TextRect.Left - 1; - if FocusRect.Top < TextRect.Top - 1 then - FocusRect.Top := TextRect.Top - 1; - if FocusRect.Right > TextRect.Right + 1 then - FocusRect.Right := TextRect.Right + 1; - if FocusRect.Bottom > TextRect.Bottom + 1 then - FocusRect.Bottom := TextRect.Bottom + 1; - end; - end; - -begin - with AViewInfo do - begin - BackgroundColor := AViewData.Style.Color; - if not IsInplace and Focused then - if Length(Text) = 0 then - FocusRect := cxEmptyRect - else - begin - FocusRect := TextRect; - InflateRect(FocusRect, 1, 1); - CheckFocusRectBounds; - end; - end; -end; - -procedure DrawBottomRightThumb(ACanvas: TcxCanvas; const AThumbRect: TRect; - const AOrientation: TcxTrackBarOrientation; const AThumbSize: Integer; - const AKind: TcxLookAndFeelKind; const AThumbColor: TColor); -var - FX, FY: Integer; - FLightPolyLine: array[0..3] of TPoint; - FShadowPolyLine: array[0..2] of TPoint; - FDarkPolyLine: array[0..2] of TPoint; - FPolygon: array[0..5] of TPoint; -begin - if AOrientation = tboVertical then - begin - FX := AThumbRect.Right - (AThumbSize div 2); - - FLightPolyLine[0] := Point(AThumbRect.Left, AThumbRect.Bottom); - FLightPolyLine[1] := Point(AThumbRect.Left, AThumbRect.Top); - FLightPolyLine[2] := Point(FX, AThumbRect.Top); - FLightPolyLine[3] := Point(AThumbRect.Right, AThumbRect.Top + (AThumbSize div 2)); - - FShadowPolyLine[0] := Point(AThumbRect.Left + 1, AThumbRect.Bottom); - FShadowPolyLine[1] := Point(AThumbRect.Right - (AThumbSize div 2), AThumbRect.Bottom); - FShadowPolyLine[2] := Point(AThumbRect.Right - 1, AThumbRect.Bottom - (AThumbSize div 2) + 1); - - FDarkPolyLine[0] := Point(AThumbRect.Left, AThumbRect.Bottom + 1); - FDarkPolyLine[1] := Point(AThumbRect.Right - (AThumbSize div 2), AThumbRect.Bottom + 1); - FDarkPolyLine[2] := Point(AThumbRect.Right, AThumbRect.Bottom - (AThumbSize div 2) + 1); - - FPolygon[0] := Point(AThumbRect.Left + 1, AThumbRect.Bottom); - FPolygon[1] := Point(AThumbRect.Left + 1, AThumbRect.Top + 1); - FPolygon[2] := Point(FX, AThumbRect.Top + 1); - FPolygon[3] := Point(AThumbRect.Right - 1, AThumbRect.Top + (AThumbSize div 2)); - FPolygon[4] := Point(AThumbRect.Right - 1, AThumbRect.Top + (AThumbSize div 2) + 1); - FPolygon[5] := Point(AThumbRect.Right - (AThumbSize div 2), AThumbRect.Bottom); - end else - begin - FY := AThumbRect.Bottom - (AThumbSize div 2); - - FLightPolyLine[0] := Point(AThumbRect.Right, AThumbRect.Top); - FLightPolyLine[1] := Point(AThumbRect.Left, AThumbRect.Top); - FLightPolyLine[2] := Point(AThumbRect.Left, FY); - FLightPolyLine[3] := Point(AThumbRect.Left + (AThumbSize div 2), AThumbRect.Bottom); - - FShadowPolyLine[0] := Point(AThumbRect.Left + (AThumbSize div 2), AThumbRect.Bottom - 1); - FShadowPolyLine[1] := Point(AThumbRect.Right - 1, FY); - FShadowPolyLine[2] := Point(AThumbRect.Right - 1, AThumbRect.Top + 1); - - FDarkPolyLine[0] := Point(AThumbRect.Left + (AThumbSize div 2), AThumbRect.Bottom); - FDarkPolyLine[1] := Point(AThumbRect.Right, FY); - FDarkPolyLine[2] := Point(AThumbRect.Right, AThumbRect.Top); - - FPolygon[0] := Point(AThumbRect.Right - 1, AThumbRect.Top + 1); - FPolygon[1] := Point(AThumbRect.Left + 1, AThumbRect.Top + 1); - FPolygon[2] := Point(AThumbRect.Left + 1, FY); - FPolygon[3] := Point(AThumbRect.Left + (AThumbSize div 2) - 1, AThumbRect.Bottom - 1); - FPolygon[4] := Point(AThumbRect.Left + (AThumbSize div 2), AThumbRect.Bottom - 1); - FPolygon[5] := Point(AThumbRect.Right - 1, FY); - end; - InternalPolyLine(ACanvas, FLightPolyLine, clWindow); - InternalPolyLine(ACanvas, FShadowPolyLine, clBtnShadow); - InternalPolyLine(ACanvas, FDarkPolyLine, clWindowText); - ACanvas.Pen.Color := AThumbColor; - ACanvas.Brush.Color := AThumbColor; - ACanvas.Polygon(FPolygon); - case AKind of - lfStandard: - begin - InternalPolyLine(ACanvas, FLightPolyLine, clBtnHighlight); - InternalPolyLine(ACanvas, FShadowPolyLine, clBtnShadow); - InternalPolyLine(ACanvas, FDarkPolyLine, cl3DDkShadow); - end; - lfFlat: - begin - InternalPolyLine(ACanvas, FLightPolyLine, clBtnHighlight); - InternalPolyLine(ACanvas, FDarkPolyLine, clBtnShadow); - end; - lfUltraFlat, lfOffice11: - begin - InternalPolyLine(ACanvas, FLightPolyLine, clWindowText); - InternalPolyLine(ACanvas, FDarkPolyLine, clWindowText); - end; - end; -end; - -procedure DrawTopLeftThumb(ACanvas: TcxCanvas; const AThumbRect: TRect; - const AOrientation: TcxTrackBarOrientation; const AThumbSize: Integer; - const AKind: TcxLookAndFeelKind; const AThumbColor: TColor); -var - FX, FY: Integer; - FLightPolyLine: array[0..2] of TPoint; - FShadowPolyLine: array[0..3] of TPoint; - FDarkPolyLine: array[0..3] of TPoint; - FPolygon: array[0..5] of TPoint; -begin - if AOrientation = tboVertical then - begin - FX := AThumbRect.Left + (AThumbSize div 2); - - FLightPolyLine[0] := Point(AThumbRect.Right, AThumbRect.Top); - FLightPolyLine[1] := Point(FX, AThumbRect.Top); - FLightPolyLine[2] := Point(AThumbRect.Left, AThumbRect.Top + (AThumbSize div 2)); - - FShadowPolyLine[0] := Point(AThumbRect.Right - 1, AThumbRect.Top + 1); - FShadowPolyLine[1] := Point(AThumbRect.Right - 1, AThumbRect.Bottom); - FShadowPolyLine[2] := Point(AThumbRect.Left + (AThumbSize div 2), AThumbRect.Bottom); - FShadowPolyLine[3] := Point(AThumbRect.Left + 1, AThumbRect.Bottom - (AThumbSize div 2) + 1); - - FDarkPolyLine[0] := Point(AThumbRect.Right, AThumbRect.Top); - FDarkPolyLine[1] := Point(AThumbRect.Right, AThumbRect.Bottom + 1); - FDarkPolyLine[2] := Point(AThumbRect.Left + (AThumbSize div 2), AThumbRect.Bottom + 1); - FDarkPolyLine[3] := Point(AThumbRect.Left, AThumbRect.Bottom - (AThumbSize div 2) + 1); - - FPolygon[0] := Point(AThumbRect.Right - 2, AThumbRect.Bottom); - FPolygon[1] := Point(AThumbRect.Right - 2, AThumbRect.Top + 1); - FPolygon[2] := Point(FX, AThumbRect.Top + 1); - FPolygon[3] := Point(AThumbRect.Left + 1, AThumbRect.Top + (AThumbSize div 2)); - FPolygon[4] := Point(AThumbRect.Left + 1, AThumbRect.Top + (AThumbSize div 2) + 1); - FPolygon[5] := Point(AThumbRect.Left + (AThumbSize div 2), AThumbRect.Bottom); - end else - begin - FY := AThumbRect.Top + (AThumbSize div 2); - - FLightPolyLine[0] := Point(AThumbRect.Left, AThumbRect.Bottom); - FLightPolyLine[1] := Point(AThumbRect.Left, FY); - FLightPolyLine[2] := Point(AThumbRect.Left + (AThumbSize div 2), AThumbRect.Top); - - FShadowPolyLine[0] := Point(AThumbRect.Left + (AThumbSize div 2), AThumbRect.Top + 1); - FShadowPolyLine[1] := Point(AThumbRect.Right - 1, FY); - FShadowPolyLine[2] := Point(AThumbRect.Right - 1, AThumbRect.Bottom - 1); - FShadowPolyLine[3] := Point(AThumbRect.Left, AThumbRect.Bottom - 1); - - FDarkPolyLine[0] := Point(AThumbRect.Left + (AThumbSize div 2), AThumbRect.Top); - FDarkPolyLine[1] := Point(AThumbRect.Right, FY); - FDarkPolyLine[2] := Point(AThumbRect.Right, AThumbRect.Bottom); - FDarkPolyLine[3] := Point(AThumbRect.Left, AThumbRect.Bottom); - - FPolygon[0] := Point(AThumbRect.Right - 1, AThumbRect.Bottom - 2); - FPolygon[1] := Point(AThumbRect.Left + 1, AThumbRect.Bottom - 2); - FPolygon[2] := Point(AThumbRect.Left + 1, FY); - FPolygon[3] := Point(AThumbRect.Left + (AThumbSize div 2) - 1, AThumbRect.Top + 2); - FPolygon[4] := Point(AThumbRect.Left + (AThumbSize div 2), AThumbRect.Top + 2); - FPolygon[5] := Point(AThumbRect.Right - 1, FY); - end; - ACanvas.Pen.Color := AThumbColor; - ACanvas.Brush.Color := AThumbColor; - ACanvas.Polygon(FPolygon); - case AKind of - lfStandard: - begin - InternalPolyLine(ACanvas, FLightPolyLine, clBtnHighlight); - InternalPolyLine(ACanvas, FShadowPolyLine, clBtnShadow); - InternalPolyLine(ACanvas, FDarkPolyLine, cl3DDkShadow); - end; - lfFlat: - begin - InternalPolyLine(ACanvas, FLightPolyLine, clBtnHighlight); - InternalPolyLine(ACanvas, FDarkPolyLine, clBtnShadow); - end; - lfUltraFlat, lfOffice11: - begin - InternalPolyLine(ACanvas, FLightPolyLine, clWindowText); - InternalPolyLine(ACanvas, FDarkPolyLine, clWindowText); - end; - end; -end; - -{ TcxTrackBarStyle } - -function TcxTrackBarStyle.DefaultBorderStyle: TcxContainerBorderStyle; -begin - if IsBaseStyle then - Result := cbsNone - else - Result := inherited DefaultBorderStyle; -end; - -function TcxTrackBarStyle.DefaultHotTrack: Boolean; -begin - Result := False; -end; - -{ TcxCustomTrackBarViewInfo } - -constructor TcxCustomTrackBarViewInfo.Create; -begin - inherited Create; - FLookAndFeel := TcxLookAndFeel.Create(nil); - FTBBitmap := TBitmap.Create; - FTBBitmap.PixelFormat := pfDevice; - FTBCanvas := TcxCanvas.Create(FTBBitmap.Canvas); - MouseStates := []; -end; - -destructor TcxCustomTrackBarViewInfo.Destroy; -begin - FreeAndNil(FTBBitmap); - FreeAndNil(FTBCanvas); - FreeAndNil(FLookAndFeel); - inherited Destroy; -end; - -procedure TcxCustomTrackBarViewInfo.Assign(Source: TObject); -begin - inherited Assign(Source); - if Source is TcxCustomTrackBarViewInfo then - with Source as TcxCustomTrackBarViewInfo do - begin - Self.LookAndFeel.Assign(LookAndFeel); - Self.Position := Position; - Self.TrackSize := TrackSize; - Self.ThumbWidth := ThumbWidth; - Self.ThumbHeight := ThumbHeight; - Self.TrackBarBorderWidth := TrackBarBorderWidth; - Self.TrackBarState := TrackBarState; - Self.SelectionStart := SelectionStart; - Self.SelectionEnd := SelectionEnd; - end; -end; - -function TcxCustomTrackBarViewInfo.GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; -begin - Result := inherited GetUpdateRegion(AViewInfo); - if not (AViewInfo is TcxCustomTrackBarViewInfo) then Exit; -end; - -function TcxCustomTrackBarViewInfo.IsHotTrack: Boolean; -begin - Result := True; -end; - -function TcxCustomTrackBarViewInfo.IsHotTrack(P: TPoint): Boolean; -begin - Result := True; -end; - -function TcxCustomTrackBarViewInfo.NeedShowHint(ACanvas: TcxCanvas; - const P: TPoint; out AText: TCaption; out AIsMultiLine: Boolean; - out ATextRect: TRect): Boolean; -begin - Result := False; -end; - -procedure TcxCustomTrackBarViewInfo.DrawText(ACanvas: TcxCanvas); -begin - {Dummy} -end; - -procedure TcxCustomTrackBarViewInfo.Offset(DX, DY: Integer); -begin - inherited Offset(DX, DY); - OffsetRect(RealTrackBarRect, DX, DY); -end; - -procedure TcxCustomTrackBarViewInfo.Paint(ACanvas: TcxCanvas); - - procedure FillBackground; - var - AIsCustomBackground: Boolean; - begin - if IsInplace then - begin - if Transparent then - BitBlt(FTBCanvas.Canvas.Handle, 0, 0, FTBBitmap.Width, FTBBitmap.Height, - ACanvas.Handle, Bounds.Left, Bounds.Top, SRCCOPY) - else - begin - FTBCanvas.WindowOrg := Bounds.TopLeft; - try - AIsCustomBackground := DrawBackground(FTBCanvas); - finally - FTBCanvas.WindowOrg := Point(0, 0); - end; - if not AIsCustomBackground then - begin - FTBCanvas.Brush.Color := BackgroundColor; - FTBCanvas.FillRect(Rect(0, 0, FTBBitmap.Width, FTBBitmap.Height)); - end; - end; - end - else - if Edit.Transparent or NativeStyle or (Painter <> nil) then - cxDrawTransparentControlBackground(Edit, FTBCanvas, Bounds) - else - DrawCustomEdit(FTBCanvas, Self, True, bpsSolid); - end; - -var - APrevClipRgn: TcxRegion; -begin - FTBBitmap.Width := RectWidth(Bounds); - FTBBitmap.Height := RectHeight(Bounds); - - FillBackground; - - APrevClipRgn := FTBCanvas.GetClipRegion; - try - FTBCanvas.SetClipRegion(TcxRegion.Create(TrackBarRect), roSet); - PaintTrackBar(FTBCanvas); - finally - FTBCanvas.SetClipRegion(APrevClipRgn, roSet); - end; - BitBlt(ACanvas.Canvas.Handle, Bounds.Left, Bounds.Top, - FTBBitmap.Width, FTBBitmap.Height, - FTBCanvas.Handle, 0, 0, SRCCOPY); -end; - -procedure TcxCustomTrackBarViewInfo.PaintTrackBar(ACanvas: TcxCanvas); -var - AEditProperties: TcxCustomTrackBarProperties; -begin - AEditProperties := TcxCustomTrackBarProperties(EditProperties); - if AEditProperties.ShowTrack then - begin - DrawTrack(ACanvas); - if FShowSelection then - DrawSelection(ACanvas); - end; - if AEditProperties.ShowTicks then - DrawTicks(ACanvas); - case AEditProperties.ThumbType of - cxttRegular: - DrawThumb(ACanvas); - cxttCustom: - AEditProperties.DoDrawThumb(Self, ACanvas, ThumbRect); - end; -end; - -procedure TcxCustomTrackBarViewInfo.DrawTrack(ACanvas: TcxCanvas); -var - FEdgeTrackRect: TRect; - FTheme: TdxTheme; - FTrackThemeType: Byte; -begin - FEdgeTrackRect := TrackRect; - if Painter <> nil then - Painter.DrawTrackBar(ACanvas, FEdgeTrackRect, SelectionRect, FShowSelection, - Enabled, TcxCustomTrackBarProperties(EditProperties).Orientation = tboHorizontal) - else - if AreVisualStylesMustBeUsed(LookAndFeel.NativeStyle, totTrackBar) then - begin - FTheme := OpenTheme(totTrackBar); - if TcxCustomTrackBarProperties(EditProperties).Orientation = tboHorizontal then - FTrackThemeType := TKP_TRACK - else - FTrackThemeType := TKP_TRACKVERT; - DrawThemeBackground(FTheme, ACanvas.Handle, FTrackThemeType, FTrackBarState, - FEdgeTrackRect); - end - else - begin - cxEditFillRect(ACanvas, FEdgeTrackRect, TcxCustomTrackBarProperties(EditProperties).TrackColor); - Dec(FEdgeTrackRect.Right); - case LookAndFeel.Kind of - lfStandard: - begin - FEdgeTrackRect := DrawBounds(ACanvas, FEdgeTrackRect, clBtnShadow, clBtnHighlight); - FEdgeTrackRect := DrawBounds(ACanvas, FEdgeTrackRect, cl3DDkShadow, cl3DLight); - end; - lfFlat: - begin - FEdgeTrackRect := DrawBounds(ACanvas, FEdgeTrackRect, clBtnShadow, clBtnHighlight); - FEdgeTrackRect := DrawBounds(ACanvas, FEdgeTrackRect, clBtnFace, clBtnFace); - end; - lfUltraFlat, lfOffice11: - FEdgeTrackRect := DrawBounds(ACanvas, FEdgeTrackRect, clWindowFrame, clWindowFrame); - end; - end; -end; - -procedure TcxCustomTrackBarViewInfo.DrawSelection(ACanvas: TcxCanvas); -begin - if Painter = nil then - cxEditFillRect(ACanvas, SelectionRect, - TcxCustomTrackBarProperties(EditProperties).SelectionColor); -end; - -procedure TcxCustomTrackBarViewInfo.DrawTicks(ACanvas: TcxCanvas); -var - I, X, Y, FDeltaTopLeft, FDeltaX, FDeltaY: Integer; - FCalcTickSize: Integer; - FFrequencyCondition: Boolean; - FTickAsLine: Boolean; - FTextWidth, FTextHeight: Integer; - FLocalFont: TFont; - FTM: TTextMetric; - FLF: TLogFont; - - procedure PrepareIndirectFont(const Angle: Integer); - begin - FLocalFont := TFont.Create; - FLocalFont.Assign(Font); - GetTextMetrics(FLocalFont.Handle, FTM); - if (FTM.tmPitchAndFamily and TMPF_TRUETYPE) = 0 then - FLocalFont.Name := 'Arial'; - cxGetFontData(FLocalFont.Handle, FLF); - FLF.lfEscapement := Angle * 10; - ACanvas.Font.Handle := CreateFontIndirect(FLF); - end; - - procedure RemoveIndirectFont; - begin - FLF.lfEscapement := 0; - ACanvas.Font.Handle := CreateFontIndirect(FLF); - FLocalFont.Free; - end; - - function DrawTickAsLine(ATickValue: Integer): Boolean; - var - AEditProperties: TcxCustomTrackBarProperties; - begin - AEditProperties := TcxCustomTrackBarProperties(EditProperties); - Result := (AEditProperties.TickType = tbttTicks) or ((AEditProperties.TickType = tbttValueNumber) and - not ((ATickValue = AEditProperties.Min) or (ATickValue = AEditProperties.Max) or (ATickValue = Position))); - end; - - function GetBounds(ALeft, ATop, AWidth, AHeight: Integer): TRect; - begin - {$IFDEF DELPHI6} - Result := Types.Bounds(ALeft, ATop, AWidth, AHeight); - {$ELSE} - Result := Classes.Bounds(ALeft, ATop, AWidth, AHeight); - {$ENDIF} - end; - -var - AEditProperties: TcxCustomTrackBarProperties; -begin - AEditProperties := TcxCustomTrackBarProperties(EditProperties); - ACanvas.Font.Assign(Font); - ACanvas.Brush.Color := clBtnFace; - if Painter <> nil then - begin - ACanvas.Font.Color := Painter.TrackBarTicksColor(True); - ACanvas.Pen.Color := Painter.TrackBarTicksColor(False); - end - else - begin - ACanvas.Font.Color := TextColor; - ACanvas.Pen.Color := TickColor; - end; - - if AEditProperties.TextOrientation = tbtoVertical then PrepareIndirectFont(90); - try - if AEditProperties.Orientation = tboVertical then - begin - for I := AEditProperties.Min to AEditProperties.Max do - begin - Y := Trunc(TickOffset * (I - AEditProperties.Min)) + TrackRect.Top + (ThumbSize div 2); - FTickAsLine := DrawTickAsLine(I); - FCalcTickSize := AEditProperties.TickSize; - if (I = AEditProperties.Min) or (I = AEditProperties.Max) then FCalcTickSize := FCalcTickSize + (AEditProperties.TickSize div 2); - FFrequencyCondition := (I = AEditProperties.Min) or (I = AEditProperties.Max) or ((AEditProperties.Frequency > 0) and ((I mod AEditProperties.Frequency) = 0)); - if not FFrequencyCondition then Continue; - if not FTickAsLine then - begin - FTextWidth := ACanvas.TextWidth(IntToStr(I)); - FTextHeight := ACanvas.TextHeight(IntToStr(I)); - if AEditProperties.TextOrientation = tbtoVertical then - begin - FDeltaTopLeft := FTextWidth div 2; - FDeltaX := FTextHeight; - end - else - begin - FDeltaTopLeft := -(FTextHeight div 2); - FDeltaX := FTextWidth; - end; - SetBkMode(ACanvas.Handle, Windows.Transparent); - if AEditProperties.TickMarks in [cxtmBottomRight, cxtmBoth] then - ACanvas.DrawText(IntToStr(I), GetBounds(ThumbRect.Right + BetweenTrackAndTick + 1, - Y + FDeltaTopLeft, FTextWidth + 2, FTextHeight + 2), 0, True); - if AEditProperties.TickMarks in [cxtmTopLeft, cxtmBoth] then - ACanvas.DrawText(IntToStr(I), GetBounds(ThumbRect.Left - BetweenTrackAndTick - FDeltaX, - Y + FDeltaTopLeft, FTextWidth + 2, FTextHeight + 2), 0, True); - end - else - begin - if AEditProperties.TickMarks in [cxtmBottomRight, cxtmBoth] then - begin - ACanvas.MoveTo(ThumbRect.Right + BetweenTrackAndTick + 1, Y); - ACanvas.LineTo(ThumbRect.Right + BetweenTrackAndTick + FCalcTickSize + 1, Y); - end; - if AEditProperties.TickMarks in [cxtmTopLeft, cxtmBoth] then - begin - ACanvas.MoveTo(ThumbRect.Left - (BetweenTrackAndTick + FCalcTickSize), Y); - ACanvas.LineTo(ThumbRect.left - BetweenTrackAndTick, Y); - end; - end; - end; - end - else - begin - for I := AEditProperties.Min to AEditProperties.Max do - begin - X := Trunc(TickOffset * (I - AEditProperties.Min)) + TrackRect.Left + (ThumbSize div 2); - FTickAsLine := DrawTickAsLine(I); - FCalcTickSize := AEditProperties.TickSize; - if (I = AEditProperties.Min) or (I = AEditProperties.Max) then FCalcTickSize := FCalcTickSize + (AEditProperties.TickSize div 2); - FFrequencyCondition := (I = AEditProperties.Min) or (I = AEditProperties.Max) or ((AEditProperties.Frequency > 0) and ((I mod AEditProperties.Frequency) = 0)); - if not FFrequencyCondition then Continue; - if not FTickAsLine then - begin - FTextWidth := ACanvas.TextWidth(IntToStr(I)); - FTextHeight := ACanvas.TextHeight(IntToStr(I)); - if AEditProperties.TextOrientation = tbtoVertical then - begin - FDeltaTopLeft := (FTextHeight div 2) - 1; - FDeltaX := FTextWidth; - FDeltaY := 0; - end - else - begin - FDeltaTopLeft := (FTextWidth div 2); - FDeltaX := 0; - FDeltaY := FTextHeight; - end; - SetBkMode(ACanvas.Handle, Windows.Transparent); - if AEditProperties.TickMarks in [cxtmBottomRight, cxtmBoth] then - ACanvas.DrawText(IntToStr(I), GetBounds(X - FDeltaTopLeft, - ThumbRect.Bottom + BetweenTrackAndTick + FDeltaX, FTextWidth + 2, FTextHeight + 2), 0, True); - if AEditProperties.TickMarks in [cxtmTopLeft, cxtmBoth] then - ACanvas.DrawText(IntToStr(I), GetBounds(X - FDeltaTopLeft, - ThumbRect.Top - (BetweenTrackAndTick + FDeltaY), FTextWidth + 2, FTextHeight + 2), 0, True); - end - else - begin - if AEditProperties.TickMarks in [cxtmBottomRight, cxtmBoth] then - begin - ACanvas.MoveTo(X, ThumbRect.Bottom + BetweenTrackAndTick + 1); - ACanvas.LineTo(X, ThumbRect.Bottom + BetweenTrackAndTick + FCalcTickSize + 1); - end; - if AEditProperties.TickMarks in [cxtmTopLeft, cxtmBoth] then - begin - ACanvas.MoveTo(X, ThumbRect.Top - (BetweenTrackAndTick + FCalcTickSize)); - ACanvas.LineTo(X, ThumbRect.Top - BetweenTrackAndTick); - end; - end; - end; - end; - finally - if AEditProperties.TextOrientation = tbtoVertical then RemoveIndirectFont; - end; -end; - -procedure TcxCustomTrackBarViewInfo.DrawThumb(ACanvas: TcxCanvas); -const - ATrackBarStates2BtnStates: array[1..5] of TcxButtonState = - (cxbsNormal, cxbsHot, cxbsPressed, cxbsHot, cxbsDisabled); - ATrackBarTicks2TicksAlign: array[TcxTrackBarTickMarks] of TcxTrackBarTicksAlign = - (tbtaBoth, tbtaUp, tbtaDown); - - function GetThumbRealColor: TColor; - begin - case TrackBarState of - TUS_DISABLED: - Result := clBtnShadow; - TUS_PRESSED, TUS_HOT: - if LookAndFeel.Kind in [lfUltraFlat, lfOffice11] then - Result := GetEditButtonHighlightColor( - TrackBarState = TUS_PRESSED, LookAndFeel.Kind = lfOffice11) - else - Result := TcxCustomTrackBarProperties(EditProperties).ThumbHighLightColor; - else - Result := TcxCustomTrackBarProperties(EditProperties).ThumbColor; - end; - end; - -var - AEditProperties: TcxCustomTrackBarProperties; - FDrawThumbRect: TRect; - FTheme: TdxTheme; - FThumbRealColor: TColor; -begin - AEditProperties := TcxCustomTrackBarProperties(EditProperties); - if Painter <> nil then - begin - Painter.DrawTrackBarThumb(ACanvas, ThumbRect, - ATrackBarStates2BtnStates[TrackBarState], - AEditProperties.Orientation = tboHorizontal, - ATrackBarTicks2TicksAlign[AEditProperties.TickMarks]); - end - else - if AreVisualStylesMustBeUsed(LookAndFeel.NativeStyle, totTrackBar) then - begin - FTheme := OpenTheme(totTrackBar); - DrawThemeBackground(FTheme, ACanvas.Handle, GetThumbThemeType, - FTrackBarState, ThumbRect); - end - else - begin - FThumbRealColor := GetThumbRealColor; - if NeedPointer then - begin - if (AEditProperties.TickMarks = cxtmBottomRight) then - DrawBottomRightThumb(ACanvas, ThumbRect, AEditProperties.Orientation, ThumbSize, LookAndFeel.Kind, FThumbRealColor) - else - DrawTopLeftThumb(ACanvas, ThumbRect, AEditProperties.Orientation, ThumbSize, LookAndFeel.Kind, FThumbRealColor); - end - else - begin - case LookAndFeel.Kind of - lfStandard: - begin - FDrawThumbRect := DrawBounds(ACanvas, ThumbRect, clWindow, clWindowFrame); - FDrawThumbRect := DrawBounds(ACanvas, FDrawThumbRect, clBtnFace, clBtnShadow); - end; - lfFlat: - FDrawThumbRect := DrawBounds(ACanvas, ThumbRect, clWindow, clBtnShadow); - lfUltraFlat, lfOffice11: - FDrawThumbRect := DrawBounds(ACanvas, ThumbRect, clWindowFrame, clWindowFrame); - end; - - Inc(FDrawThumbRect.Right); - Inc(FDrawThumbRect.Bottom); - ACanvas.Brush.Color := FThumbRealColor; - ACanvas.FillRect(FDrawThumbRect); - end; - end; -end; - -function TcxCustomTrackBarViewInfo.DrawingThumbRectToRealThumbRect( - ACanvas: TcxCanvas): TRect; -var - AThumbSize: TSize; -begin - Result := ThumbRect; - if AreVisualStylesMustBeUsed(NativeStyle, totTrackBar) then - begin - GetThemePartSize(OpenTheme(totTrackBar), ACanvas.Handle, - GetThumbThemeType, TrackBarState, Result, TS_DRAW, AThumbSize); - Result.Left := Result.Left + - (RectWidth(Result) - AThumbSize.cx) div 2; - Result.Top := Result.Top + - (RectHeight(Result) - AThumbSize.cy) div 2; - Result.Right := Result.Left + AThumbSize.cx; - Result.Bottom := Result.Top + AThumbSize.cy; - end - else - ExtendRect(Result, Rect(0, 0, -1, -1)); - OffsetRect(Result, RealTrackBarRect.Left, RealTrackBarRect.Top); -end; - -function TcxCustomTrackBarViewInfo.GetThumbThemeType: Byte; -const - AThumbThemeParts: array[TcxTrackBarTickMarks, Boolean] of Byte = ( - (TKP_THUMB, TKP_THUMBVERT), - (TKP_THUMBTOP, TKP_THUMBLEFT), - (TKP_THUMBBOTTOM, TKP_THUMBRIGHT) - ); -begin - Result := AThumbThemeParts[TcxCustomTrackBarProperties(EditProperties).TickMarks, - TcxCustomTrackBarProperties(EditProperties).Orientation = tboVertical]; -end; - -function TcxCustomTrackBarViewInfo.GetEdit: TcxCustomTrackBar; -begin - Result := TcxCustomTrackBar(FEdit); -end; - -{ TcxCustomTrackBarViewData } - -procedure TcxCustomTrackBarViewData.CalculateTBViewInfoProps(AViewInfo: TcxCustomEditViewInfo); -begin - with TcxCustomTrackBarViewInfo(AViewInfo) do - begin - TrackBarBorderWidth := Properties.BorderWidth; - TrackSize := Properties.TrackSize; - SelectionStart := Properties.SelectionStart; - SelectionEnd := Properties.SelectionEnd; - if not Enabled then - TickColor := clBtnShadow - else - TickColor := Properties.TickColor; - ThumbHeight := Properties.ThumbHeight; - ThumbWidth := Properties.ThumbWidth; - end; -end; - -function TcxCustomTrackBarViewData.GetTopLeftTickSize( - ACanvas: TcxCanvas; AViewInfo: TcxCustomTrackBarViewInfo; - ALeftTop: Boolean): Integer; -var - ACalcNumValue: string; -begin - Result := 0; - if ((Properties.TickMarks <> cxtmBottomRight) and (ALeftTop = True)) or - (Properties.TickMarks <> cxtmTopLeft) and (ALeftTop = False) then - case Properties.TickType of - tbttTicks: Result := Properties.TickSize + BetweenTrackAndTick; - tbttNumbers, tbttValueNumber: - begin - if ((Properties.Orientation = tboHorizontal) and - (Properties.TextOrientation = tbtoHorizontal)) or - ((Properties.Orientation = tboVertical) and - (Properties.TextOrientation = tbtoVertical)) then - Result := ACanvas.TextHeight(IntToStr(Properties.Min)) - else - begin - if Length(IntToStr(Properties.Min)) > Length(IntToStr(Properties.Max)) then - ACalcNumValue := IntToStr(Properties.Min) - else - ACalcNumValue := IntToStr(Properties.Max); - Result := ACanvas.TextWidth(ACalcNumValue); - end; - end; - end; - if AViewInfo.TrackBarBorderWidth = 0 then - Inc(Result, 1); -end; - -procedure TcxCustomTrackBarViewData.CalculateTrackBarRect( - AViewInfo: TcxCustomTrackBarViewInfo); -begin - AViewInfo.RealTrackBarRect := AViewInfo.ClientRect; - AViewInfo.TrackBarRect := AViewInfo.ClientRect; - OffsetRect(AViewInfo.TrackBarRect, -Bounds.Left, -Bounds.Top); - if (RectWidth(AViewInfo.TrackBarRect) div 2) < AViewInfo.TrackBarBorderWidth then - AViewInfo.TrackBarBorderWidth := RectWidth(AViewInfo.TrackBarRect) div 2; - if (RectHeight(AViewInfo.TrackBarRect) div 2) < AViewInfo.TrackBarBorderWidth then - AViewInfo.TrackBarBorderWidth := RectHeight(AViewInfo.TrackBarRect) div 2; -end; - -procedure TcxCustomTrackBarViewData.CalculateTrackZoneRect(ACanvas: TcxCanvas; - AViewInfo: TcxCustomTrackBarViewInfo); -var - FTopLeftIndent, FBottomRightIndent: Integer; - FTrackZoneSize, FRealTrackZoneSize: Integer; - FCustomRect: TRect; -begin - FTopLeftIndent := GetTopLeftTickSize(ACanvas, AViewInfo, True); - FBottomRightIndent := GetTopLeftTickSize(ACanvas, AViewInfo, False); - if Properties.Orientation = tboHorizontal then - FTrackZoneSize := RectHeight(AViewInfo.TrackBarRect) - FTopLeftIndent - FBottomRightIndent - else - FTrackZoneSize := RectWidth(AViewInfo.TrackBarRect) - FTopLeftIndent - FBottomRightIndent; - FRealTrackZoneSize := FTrackZoneSize; - if FTrackZoneSize < 10 then FRealTrackZoneSize := 10; - if FTrackZoneSize > 21 then FRealTrackZoneSize := 21; - - if (Properties.ThumbType = cxttCustom) and - IsOnGetThumbRectEventAssigned then - begin - DoOnGetThumbRect(FCustomRect); -// Properties.OnGetThumbRect(Properties, FCustomRect); - if (Properties.Orientation = tboHorizontal) and - (RectHeight(FCustomRect) > FRealTrackZoneSize) then - FRealTrackZoneSize := RectHeight(FCustomRect); - if (Properties.Orientation = tboVertical) and - (RectWidth(FCustomRect) > FRealTrackZoneSize) then - FRealTrackZoneSize := RectWidth(FCustomRect); - end; - - AViewInfo.FromBorderIndent := FromBorderIndent; - if AViewInfo.Painter <> nil then - AViewInfo.TrackSize := AViewInfo.Painter.TrackBarTrackSize - else - if Properties.AutoSize then - AViewInfo.TrackSize := FRealTrackZoneSize div 2; - - if Properties.Orientation = tboHorizontal then - begin - AViewInfo.TrackZoneRect.Top := AViewInfo.TrackBarRect.Top + - ((FTrackZoneSize - FRealTrackZoneSize) div 2) + FTopLeftIndent; - AViewInfo.TrackZoneRect.Bottom := AViewInfo.TrackZoneRect.Top + FRealTrackZoneSize; - AViewInfo.TrackZoneRect.Left := AViewInfo.TrackBarRect.Left + - AViewInfo.TrackBarBorderWidth + AViewInfo.FromBorderIndent; - AViewInfo.TrackZoneRect.Right := AViewInfo.TrackBarRect.Right - - AViewInfo.TrackBarBorderWidth - AViewInfo.FromBorderIndent; - end - else - begin - AViewInfo.TrackZoneRect.Left := AViewInfo.TrackBarRect.Left + - ((FTrackZoneSize - FRealTrackZoneSize) div 2) + FTopLeftIndent; - AViewInfo.TrackZoneRect.Right := AViewInfo.TrackZoneRect.Left + FRealTrackZoneSize; - AViewInfo.TrackZoneRect.Top := AViewInfo.TrackBarRect.Top + - AViewInfo.TrackBarBorderWidth + AViewInfo.FromBorderIndent; - AViewInfo.TrackZoneRect.Bottom := AViewInfo.TrackBarRect.Bottom - - AViewInfo.TrackBarBorderWidth - AViewInfo.FromBorderIndent; - end; -end; - -procedure TcxCustomTrackBarViewData.CalculateTrackRect( - AViewInfo: TcxCustomTrackBarViewInfo); -begin - if Properties.Orientation = tboHorizontal then - begin - AViewInfo.TrackRect.Left := AViewInfo.TrackZoneRect.Left; - AViewInfo.TrackRect.Right := AViewInfo.TrackZoneRect.Right; - AViewInfo.TrackRect.Top := AViewInfo.TrackZoneRect.Top + - (RectHeight(AViewInfo.TrackZoneRect) - AViewInfo.TrackSize) div 2; - AViewInfo.TrackRect.Bottom := AViewInfo.TrackRect.Top + AViewInfo.TrackSize; - end - else - begin - AViewInfo.TrackRect.Top := AViewInfo.TrackZoneRect.Top; - AViewInfo.TrackRect.Bottom := AViewInfo.TrackZoneRect.Bottom; - AViewInfo.TrackRect.Left := AViewInfo.TrackZoneRect.Left + - (RectWidth(AViewInfo.TrackZoneRect) - AViewInfo.TrackSize) div 2; - AViewInfo.TrackRect.Right := AViewInfo.TrackRect.Left + AViewInfo.TrackSize; - end; - Properties.FTrackRect := AViewInfo.TrackRect; -end; - -procedure TcxCustomTrackBarViewData.CalculateThumbSize( - AViewInfo: TcxCustomTrackBarViewInfo); -var - FMinMaxDiff: Integer; - FTickOffset: Double; - FThumbSize, FThumbLargeSize: Integer; - FCustomRect: TRect; - AThumbSize: TSize; -begin - FMinMaxDiff := Properties.Max - Properties.Min; - if FMinMaxDiff = 0 then FMinMaxDiff := 1; - AViewInfo.NeedPointer := (Properties.TickMarks <> cxtmBoth); - if (Properties.ThumbType = cxttCustom) and IsOnGetThumbRectEventAssigned then - begin - DoOnGetThumbRect(FCustomRect); - if Properties.Orientation = tboHorizontal then - begin - FThumbSize := RectWidth(FCustomRect); - FThumbLargeSize := RectHeight(FCustomRect); - end - else - begin - FThumbSize := RectHeight(FCustomRect); - FThumbLargeSize := RectWidth(FCustomRect); - end; - AViewInfo.ThumbWidth := FThumbSize; - AViewInfo.ThumbHeight := FThumbLargeSize; - end - else - if AViewInfo.Painter <> nil then - begin - AThumbSize := AViewInfo.Painter.TrackBarThumbSize(Properties.Orientation = tboHorizontal); - if Properties.Orientation = tboHorizontal then - begin - FThumbSize := AThumbSize.cx; - FThumbLargeSize := Min(AThumbSize.cy, RectHeight(AViewInfo.TrackZoneRect)); - end - else - begin - FThumbSize := AThumbSize.cy; - FThumbLargeSize := Min(AThumbSize.cx, RectWidth(AViewInfo.TrackZoneRect)); - end; - end - else - begin - if Properties.AutoSize then - begin - FThumbSize := AViewInfo.TrackSize; - if Properties.Orientation = tboHorizontal then - begin - if (FThumbSize mod 2) = 1 then Inc(FThumbSize); - end - else - begin - if (FThumbSize mod 2) = 1 then Dec(FThumbSize); - end; - FThumbLargeSize := FThumbSize * 2 - 1; - end - else - begin - FThumbSize := AViewInfo.ThumbWidth; - FThumbLargeSize := AViewInfo.ThumbHeight - 1; - end; - end; - - if Properties.Orientation = tboHorizontal then - FTickOffset := (RectWidth(AViewInfo.TrackRect) - FThumbSize) / FMinMaxDiff - else - FTickOffset := (RectHeight(AViewInfo.TrackRect) - FThumbSize) / FMinMaxDiff; - AViewInfo.ThumbSize := FThumbSize; - AViewInfo.ThumbLargeSize := FThumbLargeSize; - AViewInfo.TickOffset := FTickOffset; - Properties.FTickOffset := FTickOffset; -end; - -procedure TcxCustomTrackBarViewData.CalculateThumbRect(ACanvas: TcxCanvas; - AViewInfo: TcxCustomTrackBarViewInfo); -var - FCurrentTickOffset: Integer; - FDelta: Integer; -begin - if Properties.Orientation = tboHorizontal then - begin - FCurrentTickOffset := Trunc((AViewInfo.TickOffset * (AViewInfo.Position - Properties.Min)) + - AViewInfo.TrackRect.Left) + (AViewInfo.ThumbSize div 2); - AViewInfo.ThumbRect.Left := FCurrentTickOffset - (AViewInfo.ThumbSize div 2); - AViewInfo.ThumbRect.Right := FCurrentTickOffset + (AViewInfo.ThumbSize div 2); - AViewInfo.ThumbRect.Top := AViewInfo.TrackRect.Top + (AViewInfo.TrackSize div 2) - - (AViewInfo.ThumbLargeSize div 2); - AViewInfo.ThumbRect.Bottom := AViewInfo.ThumbRect.Top + AViewInfo.ThumbLargeSize; - end - else - begin - FCurrentTickOffset := Trunc((AViewInfo.TickOffset * (AViewInfo.Position - Properties.Min)) + - AViewInfo.TrackRect.Top) + (AViewInfo.ThumbSize div 2); - AViewInfo.ThumbRect.Top := FCurrentTickOffset - (AViewInfo.ThumbSize div 2); - AViewInfo.ThumbRect.Bottom := FCurrentTickOffset + (AViewInfo.ThumbSize div 2); - case Properties.TickMarks of - cxtmTopLeft: - if AViewInfo.Painter = nil then - FDelta := -1 - else - FDelta := 0; - else - FDelta := 0; - end; - AViewInfo.ThumbRect.Left := AViewInfo.TrackRect.Left + (AViewInfo.TrackSize - - AViewInfo.ThumbLargeSize) div 2 + FDelta; - AViewInfo.ThumbRect.Right := AViewInfo.ThumbRect.Left + AViewInfo.ThumbLargeSize + FDelta; - end; - if NativeStyle then - begin - if Properties.Orientation = tboHorizontal then - InflateRectEx(AViewInfo.ThumbRect, 1, 0, 1, 0) - else - InflateRectEx(AViewInfo.ThumbRect, 0, 1, 0, 1); - end; - Properties.FThumbRect := AViewInfo.DrawingThumbRectToRealThumbRect(ACanvas); -end; - -procedure TcxCustomTrackBarViewData.CalculateSelectionRect( - AViewInfo: TcxCustomTrackBarViewInfo); -begin - if AViewInfo.SelectionStart < Properties.Min then - AViewInfo.SelectionStart := Properties.Min; - if AViewInfo.SelectionEnd < Properties.Min then - AViewInfo.SelectionEnd := Properties.Min; - if AViewInfo.SelectionStart > Properties.Max then - AViewInfo.SelectionStart := Properties.Max; - if AViewInfo.SelectionEnd > Properties.Max then - AViewInfo.SelectionEnd := Properties.Max; - AViewInfo.FShowSelection := (AViewInfo.SelectionStart < AViewInfo.SelectionEnd); - if AViewInfo.FShowSelection then - begin - if Properties.Orientation = tboHorizontal then - begin - AViewInfo.SelectionRect.Left := Trunc((AViewInfo.TickOffset * (AViewInfo.SelectionStart - Properties.Min)) + - AViewInfo.TrackRect.Left) + (AViewInfo.ThumbSize div 2); - AViewInfo.SelectionRect.Right := Trunc((AViewInfo.TickOffset * (AViewInfo.SelectionEnd - Properties.Min)) + - AViewInfo.TrackRect.Left) + (AViewInfo.ThumbSize div 2) + 1; - AViewInfo.SelectionRect.Top := AViewInfo.TrackRect.Top; - AViewInfo.SelectionRect.Bottom := AViewInfo.TrackRect.Bottom; - if AViewInfo.Painter = nil then - begin - Inc(AViewInfo.SelectionRect.Top, 2); - Dec(AViewInfo.SelectionRect.Bottom); - end; - end - else - begin - AViewInfo.SelectionRect.Top := Trunc((AViewInfo.TickOffset * (AViewInfo.SelectionStart - Properties.Min)) + - AViewInfo.TrackRect.Top) + (AViewInfo.ThumbSize div 2); - AViewInfo.SelectionRect.Bottom := Trunc((AViewInfo.TickOffset * (AViewInfo.SelectionEnd - Properties.Min)) + - AViewInfo.TrackRect.Top) + (AViewInfo.ThumbSize div 2) + 1; - AViewInfo.SelectionRect.Left := AViewInfo.TrackRect.Left; - AViewInfo.SelectionRect.Right := AViewInfo.TrackRect.Right; - if AViewInfo.Painter = nil then - begin - Inc(AViewInfo.SelectionRect.Left, 2); - Dec(AViewInfo.SelectionRect.Right, 2); - end; - end; - end; -end; - -procedure TcxCustomTrackBarViewData.DoOnGetThumbRect(var ARect: TRect); -var - AOnGetThumbRect: TcxGetThumbRectEvent; -begin - GetOnGetThumbRect(AOnGetThumbRect); - AOnGetThumbRect(Properties, ARect); -end; - -function TcxCustomTrackBarViewData.IsOnGetThumbRectEventAssigned: Boolean; -var - AOnGetThumbRect: TcxGetThumbRectEvent; -begin - GetOnGetThumbRect(AOnGetThumbRect); - Result := Assigned(AOnGetThumbRect); -end; - -procedure TcxCustomTrackBarViewData.CalculateCustomTrackBarRects(ACanvas: TcxCanvas; - AViewInfo: TcxCustomTrackBarViewInfo); -begin - CalculateTrackBarRect(AViewInfo); - CalculateTrackZoneRect(ACanvas, AViewInfo); - CalculateTrackRect(AViewInfo); - CalculateThumbSize(AViewInfo); - CalculateThumbRect(ACanvas, AViewInfo); - CalculateSelectionRect(AViewInfo); -end; - -procedure TcxCustomTrackBarViewData.Calculate(ACanvas: TcxCanvas; const ABounds: TRect; - const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; AViewInfo: TcxCustomEditViewInfo; - AIsMouseEvent: Boolean); -var - FViewInfo : TcxCustomTrackBarViewInfo; - FDisplayValue: TcxEditValue; -begin - inherited Calculate(ACanvas, ABounds, P, Button, Shift, AViewInfo, AIsMouseEvent); - - FViewInfo := TcxCustomTrackBarViewInfo(AViewInfo); - - {Standart properties} - FViewInfo.LookAndFeel.Assign(Style.LookAndFeel); - FViewInfo.IsEditClass := False; - FViewInfo.DrawSelectionBar := False; - FViewInfo.HasPopupWindow := False; - FViewInfo.DrawTextFlags := 0; - FViewInfo.DrawSelectionBar := False; - if not FViewInfo.Enabled then - FViewInfo.TrackBarState := TUS_DISABLED - else - begin - if tbmpSliding in FViewInfo.MouseStates then - FViewInfo.TrackBarState := TUS_PRESSED - else - if tbmpUnderThumb in FViewInfo.MouseStates then - FViewInfo.TrackBarState := TUS_HOT - else - FViewInfo.TrackBarState := TUS_NORMAL; - end; - {TrackBar properties} - if Assigned(Edit) and not FViewInfo.IsDBEditPaintCopyDrawing then - begin - Properties.PrepareDisplayValue(Edit.EditValue, FDisplayValue, Focused); - FViewInfo.Position := FDisplayValue; - end; - CalculateTBViewInfoProps(AViewInfo); - CalculateCustomTrackBarViewInfo(ACanvas, Self, FViewInfo); - CalculateCustomTrackBarRects(ACanvas, FViewInfo); -end; - -procedure TcxCustomTrackBarViewData.EditValueToDrawValue(ACanvas: TcxCanvas; - const AEditValue: TcxEditValue; AViewInfo: TcxCustomEditViewInfo); -var - ADisplayValue: TcxEditValue; -begin - Properties.PrepareDisplayValue(AEditValue, ADisplayValue, InternalFocused); - TcxCustomTrackBarViewInfo(AViewInfo).Position := ADisplayValue; -end; - -function TcxCustomTrackBarViewData.InternalGetEditConstantPartSize(ACanvas: TcxCanvas; - AIsInplace: Boolean; AEditSizeProperties: TcxEditSizeProperties; - var MinContentSize: TSize; AViewInfo: TcxCustomEditViewInfo): TSize; -var - ASize1: TSize; -begin - Result := inherited InternalGetEditConstantPartSize(ACanvas, AIsInplace, - AEditSizeProperties, MinContentSize, AViewInfo); - - ASize1.cx := RectWidth(TcxCustomTrackBarViewInfo(AViewInfo).ThumbRect); - ASize1.cy := GetTextEditContentSize(ACanvas, Self, 'Wg', 0, - AEditSizeProperties, 0, False).cy; - Result.cx := Result.cx + ASize1.cx; - Result.cy := Result.cy + ASize1.cy; -end; - -procedure TcxCustomTrackBarViewData.GetOnGetThumbRect(out AValue: TcxGetThumbRectEvent); -begin - if Edit = nil then - AValue := Properties.OnGetThumbRect - else - TcxCustomTrackBar(Edit).GetOnGetThumbRect(AValue); -end; - -function TcxCustomTrackBarViewData.GetProperties: TcxCustomTrackBarProperties; -begin - Result := TcxCustomTrackBarProperties(FProperties); -end; - -{ TcxCustomTrackBarProperties } - -constructor TcxCustomTrackBarProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FAutoSize := True; - FBorderWidth := 0; - FFrequency := 1; - FMin := 0; - FMax := 10; - FOrientation := tboHorizontal; - FTextOrientation := tbtoHorizontal; - FPageSize := 1; - FTrackColor := clWindow; - FTrackSize := 5; - FTickColor := clWindowText; - FSelectionStart := 0; - FSelectionEnd := 0; - FSelectionColor := clHighlight; - FShowTicks := True; - FThumbType := cxttRegular; - FShowTrack := True; - FTickType := tbttTicks; - FTickMarks := cxtmBottomRight; - FTickSize := 3; - FThumbHeight := 12; - FThumbWidth := 7; - FThumbColor := clBtnFace; - FThumbHighlightColor := clSilver; - FThumbStep := cxtsNormal; -end; - -destructor TcxCustomTrackBarProperties.Destroy; -begin - inherited Destroy; -end; - -procedure TcxCustomTrackBarProperties.Assign(Source: TPersistent); -begin - if Source is TcxCustomTrackBarProperties then - begin - BeginUpdate; - try - inherited Assign(Source); - with Source as TcxCustomTrackBarProperties do - begin - Self.AutoSize := AutoSize; - Self.BorderWidth := BorderWidth; - Self.Frequency := Frequency; - Self.Min := Min; - Self.Max := Max; - Self.Orientation := Orientation; - Self.TextOrientation := TextOrientation; - Self.PageSize := PageSize; - Self.SelectionStart := SelectionStart; - Self.SelectionEnd := SelectionEnd; - Self.SelectionColor := SelectionColor; - Self.ShowTicks := ShowTicks; - Self.ThumbStep := ThumbStep; - Self.ThumbType := ThumbType; - Self.ShowTrack := ShowTrack; - Self.TickColor := TickColor; - Self.TickType := TickType; - Self.TickMarks := TickMarks; - Self.TickSize := TickSize; - Self.TrackColor := TrackColor; - Self.TrackSize := TrackSize; - Self.ThumbHeight := ThumbHeight; - Self.ThumbWidth := ThumbWidth; - Self.ThumbColor := ThumbColor; - Self.ThumbHighlightColor := ThumbHighlightColor; - Self.OnGetThumbRect := OnGetThumbRect; - Self.OnDrawThumb := OnDrawThumb; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -function TcxCustomTrackBarProperties.CanCompareEditValue: Boolean; -begin - Result := True; -end; - -class function TcxCustomTrackBarProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxTrackBar; -end; - -function TcxCustomTrackBarProperties.GetDisplayText(const AEditValue: TcxEditValue; - AFullText: Boolean = False; AIsInplace: Boolean = True): WideString; -var - ADisplayValue: TcxEditValue; -begin - PrepareDisplayValue(AEditValue, ADisplayValue, False); - Result := ADisplayValue; -end; - -class function TcxCustomTrackBarProperties.GetStyleClass: TcxCustomEditStyleClass; -begin - Result := TcxTrackBarStyle; -end; - -function TcxCustomTrackBarProperties.GetSupportedOperations: TcxEditSupportedOperations; -begin - Result := [esoAlwaysHotTrack, esoEditing, esoFiltering, esoSorting, - esoTransparency]; -end; - -class function TcxCustomTrackBarProperties.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxCustomTrackBarViewInfo; -end; - -function TcxCustomTrackBarProperties.IsEditValueValid(var EditValue: TcxEditValue; - AEditFocused: Boolean): Boolean; -begin - Result := inherited IsEditValueValid(EditValue, AEditFocused); -end; - -procedure TcxCustomTrackBarProperties.PrepareDisplayValue(const AEditValue: - TcxEditValue; var DisplayValue: TcxEditValue; AEditFocused: Boolean); -begin - LockUpdate(True); - try - DisplayValue := FixPosition(EditValueToPosition(AEditValue)); - finally - LockUpdate(False); - end; -end; - -function TcxCustomTrackBarProperties.EditValueToPosition( - const AEditValue: TcxEditValue): Integer; -begin - if IsVarEmpty(AEditValue) or - not (VarIsOrdinal(AEditValue) or VarIsStr(AEditValue)) then - Result := FMin - else - begin - if VarIsOrdinal(AEditValue) then - Result := VarAsType(AEditValue, varInteger) - else - begin - if IsValidStringForInt(VarToStr(AEditValue)) then - Result := cxStrToInt(VarToStr(AEditValue), False) - else - Result := FMin; - end; - end; -end; - -class function TcxCustomTrackBarProperties.GetViewDataClass: TcxCustomEditViewDataClass; -begin - Result := TcxCustomTrackBarViewData; -end; - -function TcxCustomTrackBarProperties.HasDisplayValue: Boolean; -begin - Result := False; -end; - -procedure TcxCustomTrackBarProperties.SetTrackColor(Value: TColor); -begin - if FTrackColor <> Value then - begin - FTrackColor := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetPageSize(Value: TcxNaturalNumber); -begin - if Value <> FPageSize then - begin - FPageSize := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetSelectionStart(Value: Integer); -begin - if FSelectionStart <> Value then - begin - FSelectionStart := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetSelectionEnd(Value: Integer); -begin - if FSelectionEnd <> Value then - begin - FSelectionEnd := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetSelectionColor(Value: TColor); -begin - if FSelectionColor <> Value then - begin - FSelectionColor := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetBorderWidth(Value: Integer); -begin - if FBorderWidth <> Value then - begin - if Value < 0 then - FBorderWidth := 0 - else - FBorderWidth := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetFrequency(Value: Integer); -begin - if FFrequency <> Value then - begin - if Value < 0 then - FFrequency := 0 - else - FFrequency := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetMin(Value: Integer); -begin - if FMin <> Value then - begin - FMin := Value; - if FMax < FMin then FMax := FMin; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetMax(Value: Integer); -begin - if FMax <> Value then - begin - FMax := Value; - if FMin > FMax then FMin := FMax; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetOrientation(Value: TcxTrackBarOrientation); -begin - if FOrientation <> Value then - begin - FOrientation := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetTextOrientation(Value: TcxTrackBarTextOrientation); -begin - if FTextOrientation <> Value then - begin - FTextOrientation := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetShowTrack(Value: Boolean); -begin - if FShowTrack <> Value then - begin - FShowTrack := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetShowTicks(Value: Boolean); -begin - if FShowTicks <> Value then - begin - FShowTicks := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetThumbType(Value: TcxTrackBarThumbType); -begin - if FThumbType <> Value then - begin - FThumbType := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetTickColor(Value: TColor); -begin - if FTickColor <> Value then - begin - FTickColor := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetTickType(Value: TcxTrackBarTickType); -begin - if FTickType <> Value then - begin - FTickType := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetTickMarks(Value: TcxTrackBarTickMarks); -begin - if FTickMarks <> Value then - begin - FTickMarks := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetTickSize(Value: TcxNaturalNumber); -begin - if FTickSize <> Value then - begin - FTickSize := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetTrackSize(Value: Integer); -begin - if FTrackSize <> Value then - begin - FTrackSize := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetThumbHeight(Value: Integer); -begin - if FThumbHeight <> Value then - begin - FThumbHeight := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetThumbWidth(Value: Integer); -begin - if FThumbWidth <> Value then - begin - FThumbWidth := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetAutoSize(Value: Boolean); -begin - if FAutoSize <> Value then - begin - FAutoSize := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetThumbColor(Value: TColor); -begin - if FThumbColor <> Value then - begin - FThumbColor := Value; - Changed; - end; -end; - -procedure TcxCustomTrackBarProperties.SetThumbHighlightColor(Value: TColor); -begin - if FThumbHighlightColor <> Value then - begin - FThumbHighlightColor := Value; - Changed; - end; -end; - -function TcxCustomTrackBarProperties.FixPosition(const APosition: Integer): Integer; -begin - Result := APosition; - if Result < Min then Result := Min - else - begin - if Result > Max then Result := Max; - end; -end; - -procedure TcxCustomTrackBarProperties.DoDrawThumb(Sender: TObject; ACanvas: TcxCanvas; - const ARect: TRect); -begin - if Assigned(OnDrawThumb) then - OnDrawThumb(Self, ACanvas, ARect); -end; - -{ TcxCustomTrackBar } - -class function TcxCustomTrackBar.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomTrackBarProperties; -end; - -function TcxCustomTrackBar.GetStyle: TcxTrackBarStyle; -begin - Result := TcxTrackBarStyle(FStyles.Style); -end; - -procedure TcxCustomTrackBar.SetStyle(Value: TcxTrackBarStyle); -begin - FStyles.Style := Value; -end; - -procedure TcxCustomTrackBar.SetNewSelectionPosition(const ANewPosition: Integer); -begin - if ANewPosition < FStartSelectionPosition then - begin - ActiveProperties.FSelectionStart := ANewPosition; - ActiveProperties.FSelectionEnd := FStartSelectionPosition; - end - else - begin - ActiveProperties.FSelectionStart := FStartSelectionPosition; - ActiveProperties.FSelectionEnd := ANewPosition; - end; -end; - -function TcxCustomTrackBar.DefaultParentColor: Boolean; -begin - Result := True; -end; - -procedure TcxCustomTrackBar.FillSizeProperties(var AEditSizeProperties: TcxEditSizeProperties); -begin - AEditSizeProperties := DefaultcxEditSizeProperties; - AEditSizeProperties.MaxLineCount := 1; - AEditSizeProperties.Width := ViewInfo.TextRect.Right - ViewInfo.TextRect.Left; -end; - -procedure TcxCustomTrackBar.Initialize; -begin - inherited Initialize; - FEditValue := 0; - FSlideState := tbksNormal; - AutoSize := False; - ControlStyle := ControlStyle - [csDoubleClicks, csClickEvents]; - Width := 196; - Height := 76; -end; - -procedure TcxCustomTrackBar.KeyDown(var Key: Word; Shift: TShiftState); - - function GetNewPosition: Integer; - begin - case Key of - VK_PRIOR: - Result := ActiveProperties.FixPosition(Position - ActiveProperties.PageSize); - VK_NEXT: - Result := ActiveProperties.FixPosition(Position + ActiveProperties.PageSize); - VK_END: - Result := ActiveProperties.Max; - VK_HOME: - Result := ActiveProperties.Min; - VK_LEFT, VK_UP: - Result := ActiveProperties.FixPosition(Pred(Position)); - VK_RIGHT, VK_DOWN: - Result := ActiveProperties.FixPosition(Succ(Position)); - else - Result := Position; - end; - end; - -var - ANewPosition: Integer; -begin - inherited KeyDown(Key, Shift); - - if Key = VK_SHIFT then - begin - if not IsInplace and (FSlideState <> tbksIncludeSelection) then - begin - FSlideState := tbksIncludeSelection; - FStartSelectionPosition := Position; - end; - Exit; - end; - - ANewPosition := GetNewPosition; - if ANewPosition <> Position then - begin - if FSlideState = tbksIncludeSelection then - SetNewSelectionPosition(ANewPosition); - InternalSetPosition(ANewPosition); - end; -end; - -procedure TcxCustomTrackBar.KeyUp(var Key: Word; Shift: TShiftState); -begin - inherited KeyUp(Key, Shift); - if not IsInplace and (Key = VK_SHIFT) then - FSlideState := tbksNormal; -end; - -procedure TcxCustomTrackBar.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - - function GetPositionAfterJump: Integer; - var - FX, FY: Integer; - begin - if ActiveProperties.Orientation = tboHorizontal then - begin - FX := X - ActiveProperties.FTrackRect.Left; - Result := Trunc(FX / ActiveProperties.FTickOffset) + ActiveProperties.Min; - end - else - begin - FY := Y - ActiveProperties.FTrackRect.Top; - Result := Trunc(FY / ActiveProperties.FTickOffset) + ActiveProperties.Min; - end; - end; - - function GetNewHorizontalPosition: Integer; - begin - Result := Position; - if X > ActiveProperties.FThumbRect.Right then - begin - if ActiveProperties.ThumbStep = cxtsNormal then - Result := Position + 1 - else - Result := GetPositionAfterJump; - end - else - if X < ActiveProperties.FThumbRect.Left then - begin - if ActiveProperties.ThumbStep = cxtsNormal then - Result := Position - 1 - else - Result := GetPositionAfterJump; - end; - end; - - function GetNewVerticalPosition: Integer; - begin - Result := Position; - if Y > ActiveProperties.FThumbRect.Bottom then - begin - if ActiveProperties.ThumbStep = cxtsNormal then - Result := Position + 1 - else - Result := GetPositionAfterJump; - end - else - if Y < ActiveProperties.FThumbRect.Top then - begin - if ActiveProperties.ThumbStep = cxtsNormal then - Result := Position - 1 - else - Result := GetPositionAfterJump; - end; - end; - - function GetNewPosition: Integer; - begin - if ActiveProperties.Orientation = tboHorizontal then - Result := GetNewHorizontalPosition - else - Result := GetNewVerticalPosition; - Result := ActiveProperties.FixPosition(Result); - end; - -var - ANewPosition: Integer; -begin - inherited MouseDown(Button, Shift, X, Y); - if (Button = mbLeft) and PtInRect(ClientBounds, Point(X, Y)) then - if PtInRect(ActiveProperties.FThumbRect, Point(X, Y)) then - begin - Include(ViewInfo.MouseStates, tbmpSliding); - if ssCtrl in Shift then - begin - FSlideState := tbksNormal; - ActiveProperties.FSelectionStart := 0; - ActiveProperties.FSelectionEnd := 0; - end; - ShortRefreshContainer(False); - end - else - begin - ANewPosition := GetNewPosition; - if ANewPosition <> Position then - InternalSetPosition(ANewPosition); - end; -end; - -procedure TcxCustomTrackBar.MouseEnter(AControl: TControl); -begin - inherited; - Include(ViewInfo.MouseStates, tbmpInControl); - if (tbmpSliding in ViewInfo.MouseStates) and - not (ssLeft in CurrentShiftState) then - begin - Exclude(ViewInfo.MouseStates, tbmpSliding); - Exclude(ViewInfo.MouseStates, tbmpUnderThumb); - end; -end; - -procedure TcxCustomTrackBar.MouseLeave(AControl: TControl); -begin - Exclude(ViewInfo.MouseStates, tbmpInControl); - Exclude(ViewInfo.MouseStates, tbmpUnderThumb); - inherited; - ShortRefreshContainer(False); -end; - -procedure TcxCustomTrackBar.MouseMove(Shift: TShiftState; X, Y: Integer); -var - FThumbOffset: Double; - NewPos: Integer; - FOldMouseStates: TcxTrackBarMouseStates; - FNewPosition: Integer; -begin - inherited MouseMove(Shift, X, Y); - if (tbmpSliding in ViewInfo.MouseStates) and (ssLeft in CurrentShiftState) then - begin - if ActiveProperties.Orientation = tboVertical then - begin - FThumbOffset := (ActiveProperties.FMax - ActiveProperties.FMin) / Height; - NewPos := Round((Y - ActiveProperties.FThumbRect.Top - - ((ActiveProperties.FThumbRect.Bottom - ActiveProperties.FThumbRect.Top) div 2)) * FThumbOffset); - FNewPosition := ActiveProperties.FixPosition(Position + NewPos); - end - else - begin - FThumbOffset := (ActiveProperties.Max - ActiveProperties.Min) / Width; - NewPos := Round((X - ActiveProperties.FThumbRect.Left - - ((ActiveProperties.FThumbRect.Right - ActiveProperties.FThumbRect.Left) div 2)) * FThumbOffset); - FNewPosition := ActiveProperties.FixPosition(Position + NewPos); - end; - if FNewPosition <> Position then - begin - if (ssShift in CurrentShiftState) and - (FSlideState = tbksIncludeSelection) then - SetNewSelectionPosition(FNewPosition); - InternalSetPosition(FNewPosition); - end; - end - else - begin - FOldMouseStates := ViewInfo.MouseStates; - if PtInRect(ActiveProperties.FThumbRect, Point(X, Y)) then - Include(ViewInfo.MouseStates, tbmpUnderThumb) - else - Exclude(ViewInfo.MouseStates, tbmpUnderThumb); - if ViewInfo.MouseStates <> FOldMouseStates then - ShortRefreshContainer(False); -// ActiveProperties.ThumbChanged; - end; -end; - -procedure TcxCustomTrackBar.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - FOldMouseStates: TcxTrackBarMouseStates; -begin - inherited MouseUp(Button, Shift, X, Y); - FOldMouseStates := ViewInfo.MouseStates; - Exclude(ViewInfo.MouseStates, tbmpSliding); - if PtInRect(ActiveProperties.FThumbRect, Point(X, Y)) then - Include(ViewInfo.MouseStates, tbmpUnderThumb) - else - Exclude(ViewInfo.MouseStates, tbmpUnderThumb); - if FOldMouseStates <> ViewInfo.MouseStates then - ShortRefreshContainer(False); -// ActiveProperties.ThumbChanged; - SetCaptureControl(nil); -end; - -procedure TcxCustomTrackBar.SynchronizeDisplayValue; -begin - ShortRefreshContainer(False); -end; - -function TcxCustomTrackBar.WantNavigationKeys: Boolean; -begin - Result := True; -end; - -procedure TcxCustomTrackBar.InternalSetPosition(Value: Integer); -begin - Value := ActiveProperties.FixPosition(Value); - if (Value <> Position) and DoEditing then - begin - InternalEditValue := Value; - ActiveProperties.Changed; - ModifiedAfterEnter := True; - InternalPostEditValue; - end; -end; - -function TcxCustomTrackBar.GetProperties: TcxCustomTrackBarProperties; -begin - Result := TcxCustomTrackBarProperties(FProperties); -end; - -function TcxCustomTrackBar.GetActiveProperties: TcxCustomTrackBarProperties; -begin - Result := TcxCustomTrackBarProperties(InternalGetActiveProperties); -end; - -procedure TcxCustomTrackBar.GetOnGetThumbRect(out AValue: TcxGetThumbRectEvent); -begin - AValue := Properties.OnGetThumbRect; - if not Assigned(AValue) then - AValue := ActiveProperties.OnGetThumbRect; -end; - -function TcxCustomTrackBar.GetViewInfo: TcxCustomTrackBarViewInfo; -begin - Result := TcxCustomTrackBarViewInfo(FViewInfo); -end; - -procedure TcxCustomTrackBar.SetProperties(Value: TcxCustomTrackBarProperties); -begin - FProperties.Assign(Value); -end; - -procedure TcxCustomTrackBar.WMLButtonUp(var Message: TWMLButtonUp); -begin - ControlState := ControlState - [csClicked]; - inherited; -end; - -procedure TcxCustomTrackBar.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - Message.Result := DLGC_WANTARROWS; - if IsInplace then - Message.Result := Message.Result or DLGC_WANTTAB; -end; - -function TcxCustomTrackBar.GetPosition: Integer; -begin - Result := ActiveProperties.FixPosition( - ActiveProperties.EditValueToPosition(FEditValue)); -end; - -procedure TcxCustomTrackBar.SetPosition(Value: Integer); -begin - if not IsLoading then - Value := ActiveProperties.FixPosition(Value); - if Value <> Position then - InternalEditValue := Value; -end; - -{ TcxCustomTrackBar } - -class function TcxTrackBar.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxTrackBarProperties; -end; - -function TcxTrackBar.GetActiveProperties: TcxTrackBarProperties; -begin - Result := TcxTrackBarProperties(InternalGetActiveProperties); -end; - -function TcxTrackBar.GetProperties: TcxTrackBarProperties; -begin - Result := TcxTrackBarProperties(FProperties); -end; - -procedure TcxTrackBar.SetProperties(Value: TcxTrackBarProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxFilterTrackBarHelper } - -class procedure TcxFilterTrackBarHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - with TcxCustomSpinEditProperties(AProperties) do - begin - Buttons.Add; - Buttons.Add; - MinValue := TcxCustomTrackBarProperties(AEditProperties).Min; - MaxValue := TcxCustomTrackBarProperties(AEditProperties).Max; - LargeIncrement := TcxCustomTrackBarProperties(AEditProperties).PageSize; - end; -end; - -initialization - GetRegisteredEditProperties.Register(TcxTrackBarProperties, scxSEditRepositoryTrackBarItem); - FilterEditsController.Register(TcxTrackBarProperties, TcxFilterTrackBarHelper); - -finalization - FilterEditsController.Unregister(TcxTrackBarProperties, TcxFilterTrackBarHelper); - GetRegisteredEditProperties.Unregister(TcxTrackBarProperties); - -end. - diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxTreeView.pas b/internal/x.46/ExpressEditors Library 5/Sources/cxTreeView.pas deleted file mode 100644 index 9d58e71c..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxTreeView.pas +++ /dev/null @@ -1,1511 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -{$DEFINE USETCXSCROLLBAR} - -unit cxTreeView; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, ComCtrls, CommCtrl, Controls, Forms, ImgList, Menus, - Messages, StdCtrls, SysUtils, cxClasses, cxContainer, cxControls, - cxExtEditConsts, cxGraphics, cxLookAndFeels, cxScrollBar; - -type - { TcxCustomInnerTreeView } - - TcxCustomTreeView = class; - - TcxCustomInnerTreeView = class(TTreeView, IUnknown, - IcxContainerInnerControl) - private - FCanvas: TcxCanvas; - FContainer: TcxCustomTreeView; - FIsRedrawLocked: Boolean; - FItemHeight: Integer; - FLookAndFeel: TcxLookAndFeel; - function GetControl: TWinControl; - function GetControlContainer: TcxContainer; - procedure HScrollHandler(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); - procedure SetItemHeight(Value: Integer); - procedure SetLookAndFeel(Value: TcxLookAndFeel); - procedure VScrollHandler(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); -{$IFNDEF DELPHI6} - function GetScrollWidth: Integer; - procedure SetScrollWidth(const Value: Integer); -{$ENDIF} - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure WMSetRedraw(var Message: TWMSetRedraw); message WM_SETREDRAW; - procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; - procedure WMFontChange(var Message: TMessage); message WM_FONTCHANGE; - procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; - protected - procedure Click; override; - procedure DblClick; override; - procedure DestroyWindowHandle; override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure CreateWindowHandle(const Params: TCreateParams); override; - procedure WndProc(var Message: TMessage); override; - procedure MouseEnter(AControl: TControl); dynamic; - procedure MouseLeave(AControl: TControl); dynamic; - property Container: TcxCustomTreeView read FContainer; - property LookAndFeel: TcxLookAndFeel read FLookAndFeel write SetLookAndFeel; - procedure Expand(Node: TTreeNode); override; - procedure Change(Node: TTreeNode); override; - procedure Collapse(Node: TTreeNode); override; - procedure UpdateItemHeight; - property IsRedrawLocked: Boolean read FIsRedrawLocked; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure DefaultHandler(var Message); override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; - property Canvas: TcxCanvas read FCanvas; - property ItemHeight: Integer read FItemHeight write SetItemHeight default -1; -{$IFNDEF DELPHI6} - property ScrollWidth: Integer read GetScrollWidth write SetScrollWidth default 0; -{$ENDIF} - end; - - TcxCustomInnerTreeViewClass = class of TcxCustomInnerTreeView; - - { TcxCustomTreeView } - - TcxCustomTreeView = class(TcxContainer) - private - FTreeView: TcxCustomInnerTreeView; - function GetAutoExpand: Boolean; - function GetChangeDelay: Integer; - function GetHideSelection: Boolean; - function GetHotTrack: Boolean; - function GetImages: TCustomImageList; - function GetItemHeight: Integer; - function GetTreeNodes: TTreeNodes; - function GetIndent: Integer; -{$IFDEF DELPHI6} - function GetMultiSelect: Boolean; - function GetMultiSelectStyle: TMultiSelectStyle; - function GetOnCreateNodeClass: TTVCreateNodeClassEvent; - procedure SetMultiSelectStyle(Value: TMultiSelectStyle); - procedure SetOnCreateNodeClass(Value: TTVCreateNodeClassEvent); - function GetOnAddition: TTVExpandedEvent; - function GetOnCancelEdit: TTVChangedEvent; -{$ENDIF} - function GetReadOnly: Boolean; - function GetRightClickSelect: Boolean; - function GetRowSelect: Boolean; - function GetShowButtons: Boolean; - function GetShowLines: Boolean; - function GetShowRoot: Boolean; - function GetSortType: TSortType; - function GetStateImages: TCustomImageList; - function GetToolTips: Boolean; - function GetTreeViewCanvas: TcxCanvas; -{$IFDEF DELPHI5} - function GetOnAdvancedCustomDraw: TTVAdvancedCustomDrawEvent; - function GetOnAdvancedCustomDrawItem: TTVAdvancedCustomDrawItemEvent; -{$ENDIF} - function GetOnChange: TTVChangedEvent; - function GetOnChanging: TTVChangingEvent; - function GetOnCollapsed: TTVExpandedEvent; - function GetOnCollapsing: TTVCollapsingEvent; - function GetOnCompare: TTVCompareEvent; - function GetOnCustomDraw: TTVCustomDrawEvent; - function GetOnCustomDrawItem: TTVCustomDrawItemEvent; - function GetOnDeletion: TTVExpandedEvent; - function GetOnEditing: TTVEditingEvent; - function GetOnEdited: TTVEditedEvent; - function GetOnExpanding: TTVExpandingEvent; - function GetOnExpanded: TTVExpandedEvent; - function GetOnGetImageIndex: TTVExpandedEvent; - function GetOnGetSelectedIndex: TTVExpandedEvent; - function GetDropTarget: TTreeNode; - function GetSelected: TTreeNode; - function GetTopItem: TTreeNode; -{$IFDEF DELPHI6} - function GetSelectionCount: Cardinal; - function GetSelection(Index: Integer): TTreeNode; - procedure SetMultiSelect(Value: Boolean); -{$ENDIF} - procedure SetAutoExpand(Value: Boolean); - procedure SetChangeDelay(Value: Integer); - procedure SetHideSelection(Value: Boolean); - procedure SetHotTrack(Value: Boolean); - procedure SetImages(Value: TCustomImageList); - procedure SetTreeNodes(Value: TTreeNodes); - procedure SetIndent(Value: Integer); - procedure SetItemHeight(Value: Integer); - procedure SetRightClickSelect(Value: Boolean); - procedure SetReadOnly(Value: Boolean); - procedure SetRowSelect(Value: Boolean); - procedure SetShowButtons(Value: Boolean); - procedure SetShowLines(Value: Boolean); - procedure SetShowRoot(Value: Boolean); - procedure SetSortType(Value: TSortType); - procedure SetStateImages(Value: TCustomImageList); - procedure SetToolTips(Value: Boolean); -{$IFDEF DELPHI6} - procedure SetOnAddition(Value: TTVExpandedEvent); - procedure SetOnCancelEdit(Value: TTVChangedEvent); -{$ENDIF} -{$IFDEF DELPHI5} - procedure SetOnAdvancedCustomDraw(Value: TTVAdvancedCustomDrawEvent); - procedure SetOnAdvancedCustomDrawItem(Value: TTVAdvancedCustomDrawItemEvent); -{$ENDIF} - procedure SetOnChange(Value: TTVChangedEvent); - procedure SetOnChanging(Value: TTVChangingEvent); - procedure SetOnCollapsed(Value: TTVExpandedEvent); - procedure SetOnCollapsing(Value: TTVCollapsingEvent); - procedure SetOnCompare(Value: TTVCompareEvent); - procedure SetOnCustomDraw(Value: TTVCustomDrawEvent); - procedure SetOnCustomDrawItem(Value: TTVCustomDrawItemEvent); - procedure SetOnDeletion(Value: TTVExpandedEvent); - procedure SetOnEditing(Value: TTVEditingEvent); - procedure SetOnEdited(Value: TTVEditedEvent); - procedure SetOnExpanding(Value: TTVExpandingEvent); - procedure SetOnExpanded(Value: TTVExpandedEvent); - procedure SetOnGetImageIndex(Value: TTVExpandedEvent); - procedure SetOnGetSelectedIndex(Value: TTVExpandedEvent); - procedure SetDropTarget(Value: TTreeNode); - procedure SetSelected(Value: TTreeNode); - procedure SetTopItem(Value: TTreeNode); - procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; - protected - { Protected declarations } - function CanResize(var NewWidth, NewHeight: Integer): Boolean; override; - procedure FontChanged; override; - function IsReadOnly: Boolean; override; - function NeedsScrollBars: Boolean; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - procedure SetSize; override; - procedure WriteState(Writer: TWriter); override; - - function GetInnerTreeView: TcxCustomInnerTreeView; virtual; - class function GetTreeViewClass: TcxCustomInnerTreeViewClass; virtual; - procedure InternalInitTreeView; virtual; - {TreeView} - function CanChange(Node: TTreeNode): Boolean; virtual; - function CanCollapse(Node: TTreeNode): Boolean; virtual; - function CanEdit(Node: TTreeNode): Boolean; virtual; - function CanExpand(Node: TTreeNode): Boolean; virtual; - procedure Collapse(Node: TTreeNode); - procedure Expand(Node: TTreeNode); - // - property AutoExpand: Boolean read GetAutoExpand write SetAutoExpand; - property ChangeDelay: Integer read GetChangeDelay write SetChangeDelay default 0; - property HideSelection: Boolean read GetHideSelection write SetHideSelection default True; - property HotTrack: Boolean read GetHotTrack write SetHotTrack; - property Images: TCustomImageList read GetImages write SetImages; - property ItemHeight: Integer read GetItemHeight write SetItemHeight default -1; - property Items: TTreeNodes read GetTreeNodes write SetTreeNodes; - property Indent: Integer read GetIndent write SetIndent default 19; -{$IFDEF DELPHI6} - property MultiSelect: Boolean read GetMultiSelect write SetMultiSelect; - property MultiSelectStyle: TMultiSelectStyle read GetMultiSelectStyle - write SetMultiSelectStyle default [msControlSelect]; -{$ENDIF} - property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False; - property RightClickSelect: Boolean read GetRightClickSelect write SetRightClickSelect; - property RowSelect: Boolean read GetRowSelect write SetRowSelect; - property ShowButtons: Boolean read GetShowButtons write SetShowButtons; - property ShowLines: Boolean read GetShowLines write SetShowLines; - property ShowRoot: Boolean read GetShowRoot write SetShowRoot; - property SortType: TSortType read GetSortType write SetSortType; - property StateImages: TCustomImageList read GetStateImages write SetStateImages; - property ToolTips: Boolean read GetToolTips write SetToolTips; -{$IFDEF DELPHI6} - property OnAddition: TTVExpandedEvent read GetOnAddition write SetOnAddition; - property OnCancelEdit: TTVChangedEvent read GetOnCancelEdit write SetOnCancelEdit; -{$ENDIF} -{$IFDEF DELPHI5} - property OnAdvancedCustomDraw: TTVAdvancedCustomDrawEvent read GetOnAdvancedCustomDraw write SetOnAdvancedCustomDraw; - property OnAdvancedCustomDrawItem: TTVAdvancedCustomDrawItemEvent read GetOnAdvancedCustomDrawItem write SetOnAdvancedCustomDrawItem; -{$ENDIF} - property OnChange: TTVChangedEvent read GetOnChange write SetOnChange; - property OnChanging: TTVChangingEvent read GetOnChanging write SetOnChanging; - property OnCollapsed: TTVExpandedEvent read GetOnCollapsed write SetOnCollapsed; - property OnCollapsing: TTVCollapsingEvent read GetOnCollapsing write SetOnCollapsing; - property OnCompare: TTVCompareEvent read GetOnCompare write SetOnCompare; - property OnCustomDraw: TTVCustomDrawEvent read GetOnCustomDraw write SetOnCustomDraw; - property OnCustomDrawItem: TTVCustomDrawItemEvent read GetOnCustomDrawItem write SetOnCustomDrawItem; - property OnDeletion: TTVExpandedEvent read GetOnDeletion write SetOnDeletion; - property OnEditing: TTVEditingEvent read GetOnEditing write SetOnEditing; - property OnEdited: TTVEditedEvent read GetOnEdited write SetOnEdited; - property OnExpanding: TTVExpandingEvent read GetOnExpanding write SetOnExpanding; - property OnExpanded: TTVExpandedEvent read GetOnExpanded write SetOnExpanded; - property OnGetImageIndex: TTVExpandedEvent read GetOnGetImageIndex write SetOnGetImageIndex; - property OnGetSelectedIndex: TTVExpandedEvent read GetOnGetSelectedIndex write SetOnGetSelectedIndex; -{$IFDEF DELPHI6} - property OnCreateNodeClass: TTVCreateNodeClassEvent read GetOnCreateNodeClass write SetOnCreateNodeClass; -{$ENDIF} - public - { Public declarations } - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function AlphaSort{$IFDEF DELPHI6}( - ARecurse: Boolean = True){$ENDIF}: Boolean; - function CustomSort(SortProc: TTVCompare; Data: Longint{$IFDEF DELPHI6}; - ARecurse: Boolean = True{$ENDIF}): Boolean; - procedure FullCollapse; - procedure FullExpand; - function GetHitTestInfoAt(X, Y: Integer): THitTests; - function GetNodeAt(X, Y: Integer): TTreeNode; - function IsEditing: Boolean; - procedure LoadFromFile(const FileName: string); - procedure LoadFromStream(Stream: TStream); - procedure SaveToFile(const FileName: string); - procedure SaveToStream(Stream: TStream); - procedure SetScrollBarsParameters(AIsScrolling: Boolean = False); override; - property DropTarget: TTreeNode read GetDropTarget write SetDropTarget; - property Selected: TTreeNode read GetSelected write SetSelected; - property TopItem: TTreeNode read GetTopItem write SetTopItem; - property TreeViewCanvas: TcxCanvas read GetTreeViewCanvas; -{$IFDEF DELPHI6} - procedure Select(Node: TTreeNode; ShiftState: TShiftState = []); overload; virtual; - procedure Select(const Nodes: array of TTreeNode); overload; virtual; - procedure Select(Nodes: TList); overload; virtual; - procedure Deselect(Node: TTreeNode); virtual; - procedure Subselect(Node: TTreeNode; Validate: Boolean = False); virtual; - property SelectionCount: Cardinal read GetSelectionCount; - property Selections[Index: Integer]: TTreeNode read GetSelection; - procedure ClearSelection(KeepPrimary: Boolean = False); virtual; - function GetSelections(AList: TList): TTreeNode; - function FindNextToSelect: TTreeNode; virtual; -{$ENDIF} - property InnerTreeView: TcxCustomInnerTreeView read GetInnerTreeView; - end; - - { TcxTreeView } - - TcxTreeView = class(TcxCustomTreeView) - public - property TreeViewCanvas; - published - property Align; - property Anchors; - property BiDiMode; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property Height default 100; - property ParentBiDiMode; - property ParentColor default False; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property Width default 120; - property OnClick; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property AutoExpand default False; - property ChangeDelay default 0; - property HideSelection default True; - property HotTrack default False; - property Images; - property ItemHeight; - property Items; - property Indent; -{$IFDEF DELPHI6} - property MultiSelect default False; - property MultiSelectStyle; -{$ENDIF} - property ReadOnly; - property RightClickSelect default False; - property RowSelect default False; - property ShowButtons default True; - property ShowLines default True; - property ShowRoot default True; - property SortType default stNone; - property StateImages; - property ToolTips default True; -{$IFDEF DELPHI6} - property OnAddition; - property OnCancelEdit; -{$ENDIF} -{$IFDEF DELPHI5} - property OnAdvancedCustomDraw; - property OnAdvancedCustomDrawItem; -{$ENDIF} - property OnChange; - property OnChanging; - property OnCollapsed; - property OnCollapsing; - property OnCompare; - property OnCustomDraw; - property OnCustomDrawItem; - property OnDeletion; - property OnEditing; - property OnEdited; - property OnExpanding; - property OnExpanded; - property OnGetImageIndex; - property OnGetSelectedIndex; -{$IFDEF DELPHI6} - property OnCreateNodeClass; -{$ENDIF} - end; - -implementation - -uses - Graphics; - -{ TcxCustomInnerTreeView } - -constructor TcxCustomInnerTreeView.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FCanvas := TcxCanvas.Create(inherited Canvas); - FItemHeight := -1; - FLookAndFeel := TcxLookAndFeel.Create(Self); - BorderStyle := bsNone; - ControlStyle := ControlStyle + [csDoubleClicks]; - ParentColor := False; - ParentFont := True; -end; - -destructor TcxCustomInnerTreeView.Destroy; -begin - FreeAndNil(FLookAndFeel); - FreeAndNil(FCanvas); - inherited Destroy; -end; - -procedure TcxCustomInnerTreeView.DefaultHandler(var Message); -begin - if (Container = nil) or - not Container.InnerControlDefaultHandler(TMessage(Message)) then - inherited DefaultHandler(Message); -end; - -procedure TcxCustomInnerTreeView.DragDrop(Source: TObject; X, Y: Integer); -begin - if Container <> nil then - Container.DragDrop(Source, Left + X, Top + Y); -end; - -procedure TcxCustomInnerTreeView.Click; -begin - inherited Click; - if Container <> nil then - _TcxContainerAccess.Click(Container); -end; - -procedure TcxCustomInnerTreeView.DblClick; -begin - inherited DblClick; - if Container <> nil then - _TcxContainerAccess.DblClick(Container); -end; - -procedure TcxCustomInnerTreeView.DestroyWindowHandle; -begin - FIsRedrawLocked := False; - inherited DestroyWindowHandle; -end; - -function TcxCustomInnerTreeView.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; -begin - Result := (Container <> nil) and - _TcxContainerAccess.DoMouseWheel(Container, Shift, WheelDelta, MousePos); - if not Result then - inherited DoMouseWheel(Shift, WheelDelta, MousePos); -end; - -procedure TcxCustomInnerTreeView.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -begin - if Container <> nil then - _TcxContainerAccess.DragOver(Container, Source, Left + X, Top + Y, State, Accept); -end; - -procedure TcxCustomInnerTreeView.KeyDown(var Key: Word; Shift: TShiftState); -begin - if Container <> nil then - _TcxContainerAccess.KeyDown(Container, Key, Shift); - if Key <> 0 then - inherited KeyDown(Key, Shift); -end; - -procedure TcxCustomInnerTreeView.KeyPress(var Key: Char); -begin - if (Key = Char(VK_TAB)) then - Key := #0; - if Container <> nil then - _TcxContainerAccess.KeyPress(Container, Key); - if Word(Key) = VK_RETURN then - Key := #0; - if Key <> #0 then - inherited KeyPress(Key); -end; - -procedure TcxCustomInnerTreeView.KeyUp(var Key: Word; Shift: TShiftState); -begin - if (Key = VK_TAB) then - Key := 0; - if Container <> nil then - _TcxContainerAccess.KeyUp(Container, Key, Shift); - if Key <> 0 then - inherited KeyUp(Key, Shift); -end; - -procedure TcxCustomInnerTreeView.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if Container <> nil then - with Container do - begin - InnerControlMouseDown := True; - try - MouseDown(Button, Shift, X + Self.Left, Y + Self.Top); - finally - InnerControlMouseDown := False; - end; - end; -end; - -procedure TcxCustomInnerTreeView.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - if Container <> nil then - _TcxContainerAccess.MouseMove(Container, Shift, X + Left, Y + Top); -end; - -procedure TcxCustomInnerTreeView.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - if Container <> nil then - _TcxContainerAccess.MouseUp(Container, Button, Shift, X + Left, Y + Top); -end; - -procedure TcxCustomInnerTreeView.CreateWindowHandle(const Params: TCreateParams); -begin - inherited CreateWindowHandle(Params); - UpdateItemHeight; - Container.SetScrollBarsParameters; -end; - -procedure TcxCustomInnerTreeView.WndProc(var Message: TMessage); -begin - if (Container <> nil) and Container.InnerControlMenuHandler(Message) then - Exit; - - if Message.Msg = WM_RBUTTONUP then - begin - Container.LockPopupMenu(True); - try - inherited WndProc(Message); - finally - Container.LockPopupMenu(False); - end; - Exit; - end; - - if ((Message.Msg = WM_LBUTTONDOWN) or (Message.Msg = WM_LBUTTONDBLCLK)) and - (Container.DragMode = dmAutomatic) and (Container.DragKind = dkDock) and - not Container.IsDesigning then - begin - _TcxContainerAccess.BeginAutoDrag(Container); - Exit; - end; - - inherited WndProc(Message); - case Message.Msg of - WM_HSCROLL, - WM_MOUSEWHEEL, - WM_VSCROLL, - CM_WININICHANGE, - TVM_ENSUREVISIBLE, - TVM_EXPAND, - TVM_INSERTITEM, - TVM_SELECTITEM: - Container.SetScrollBarsParameters; - end; -end; - -procedure TcxCustomInnerTreeView.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - inherited; - if not Container.ScrollBarsCalculating then - Container.SetScrollBarsParameters; -end; - -procedure TcxCustomInnerTreeView.WMFontChange(var Message: TMessage); -begin - inherited; - if not Container.ScrollBarsCalculating then - Container.SetScrollBarsParameters; -end; - -procedure TcxCustomInnerTreeView.WMLButtonDown(var Message: TWMLButtonDown); -begin - inherited; - if Dragging then - begin - CancelDrag; - Container.BeginDrag(False); - end; -end; - -procedure TcxCustomInnerTreeView.MouseEnter(AControl: TControl); -begin -end; - -procedure TcxCustomInnerTreeView.MouseLeave(AControl: TControl); -begin - if Container <> nil then - Container.ShortRefreshContainer(True); -end; - -function TcxCustomInnerTreeView.GetControl: TWinControl; -begin - Result := Self; -end; - -function TcxCustomInnerTreeView.GetControlContainer: TcxContainer; -begin - Result := FContainer; -end; - -procedure TcxCustomInnerTreeView.HScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); -begin - CallWindowProc(DefWndProc, Handle, WM_HSCROLL, Word(ScrollCode) + - Word(ScrollPos) shl 16, Container.HScrollBar.Handle); - ScrollPos := GetScrollPos(Handle, SB_HORZ); -end; - -procedure TcxCustomInnerTreeView.SetItemHeight(Value: Integer); -begin - if Value <> FItemHeight then - begin - FItemHeight := Value; - UpdateItemHeight; - end; -end; - -procedure TcxCustomInnerTreeView.SetLookAndFeel(Value: TcxLookAndFeel); -begin - FLookAndFeel.Assign(Value); -end; - -procedure TcxCustomInnerTreeView.VScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); -var - AScrollInfo: TScrollInfo; -begin - if (ScrollCode in [scPosition, scTrack]) and (Win32MajorVersion >= 6) then - begin - AScrollInfo.cbSize := SizeOf(AScrollInfo); - AScrollInfo.fMask := SIF_POS; - AScrollInfo.nPos := ScrollPos; - SetScrollInfo(Handle, SB_VERT, AScrollInfo, True); - end; - CallWindowProc(DefWndProc, Handle, WM_VSCROLL, Word(ScrollCode) + - Word(ScrollPos) shl 16, Container.VScrollBar.Handle); - ScrollPos := GetScrollPos(Handle, SB_VERT); -end; - -{$IFNDEF DELPHI6} -function TcxCustomInnerTreeView.GetScrollWidth: Integer; -begin - Result := SendMessage(Handle, LB_GETHORIZONTALEXTENT, 0, 0); -end; - -procedure TcxCustomInnerTreeView.SetScrollWidth(const Value: Integer); -begin - if Value <> ScrollWidth then - SendMessage(Handle, LB_SETHORIZONTALEXTENT, Value, 0); -end; -{$ENDIF} - -procedure TcxCustomInnerTreeView.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - inherited; - if Container <> nil then - with Message do - begin - Result := Result or DLGC_WANTCHARS; - if GetKeyState(VK_CONTROL) >= 0 then - Result := Result or DLGC_WANTTAB; - end; -end; - -procedure TcxCustomInnerTreeView.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - if (Container <> nil) and not Container.IsDestroying then - Container.FocusChanged; -end; - -procedure TcxCustomInnerTreeView.WMNCPaint(var Message: TWMNCPaint); -begin - if UsecxScrollBars then - begin - if Container.HScrollBar.Visible and Container.VScrollBar.Visible then - cxFillSizeGrip(Container); - if Container.HScrollBar.Visible then - Container.HScrollBar.Repaint; - if Container.VScrollBar.Visible then - Container.VScrollBar.Repaint; - end; -end; - -procedure TcxCustomInnerTreeView.WMSetFocus(var Message: TWMSetFocus); -begin - inherited; - if (Container <> nil) and not Container.IsDestroying and - not(csDestroying in ComponentState) and - (Message.FocusedWnd <> Container.Handle) then - Container.FocusChanged; -end; - -procedure TcxCustomInnerTreeView.WMSetRedraw(var Message: TWMSetRedraw); -begin - inherited; - FIsRedrawLocked := Message.Redraw = 0; - if not (csDestroying in ComponentState) and not FIsRedrawLocked then - Container.SetScrollBarsParameters; -end; - -procedure TcxCustomInnerTreeView.WMWindowPosChanged( - var Message: TWMWindowPosChanged); -var - ARgn: HRGN; -begin - inherited; - if csDestroying in ComponentState then - Exit; - Container.SetScrollBarsParameters; - if Container.HScrollBar.Visible and Container.VScrollBar.Visible then - begin - ARgn := CreateRectRgnIndirect(GetSizeGripRect(Self)); - SendMessage(Handle, WM_NCPAINT, ARgn, 0); - DeleteObject(ARgn); - end; -end; - -procedure TcxCustomInnerTreeView.CMMouseEnter(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseEnter(Self) - else - MouseEnter(TControl(Message.lParam)); -end; - -procedure TcxCustomInnerTreeView.CNNotify( - var Message: TWMNotify); -begin - inherited; - if Message.NMHdr.code = TVN_DELETEITEM then - Container.SetScrollBarsParameters; -end; - -procedure TcxCustomInnerTreeView.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxCustomInnerTreeView.Expand(Node: TTreeNode); -begin - inherited; - Container.SetScrollBarsParameters; -end; - -procedure TcxCustomInnerTreeView.Change(Node: TTreeNode); -begin - inherited; - Container.SetScrollBarsParameters; -end; - -procedure TcxCustomInnerTreeView.Collapse(Node: TTreeNode); -begin - inherited; - Container.SetScrollBarsParameters; -end; - -procedure TcxCustomInnerTreeView.UpdateItemHeight; -begin - if HandleAllocated then - TreeView_SetItemHeight(Handle, ItemHeight); -end; - -{ TcxCustomTreeView } - -constructor TcxCustomTreeView.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - InternalInitTreeView; - InnerTreeView.AutoSize := False; - InnerTreeView.Align := alClient; - InnerTreeView.BorderStyle := bsNone; - InnerTreeView.Parent := Self; - InnerTreeView.FContainer := Self; - InnerControl := InnerTreeView; - InnerTreeView.LookAndFeel.MasterLookAndFeel := Style.LookAndFeel; - Width := 120; - Height := 100; -end; - -destructor TcxCustomTreeView.Destroy; -begin - FreeAndNil(FTreeView); - inherited Destroy; -end; - -function TcxCustomTreeView.GetInnerTreeView: TcxCustomInnerTreeView; -begin - Result := FTreeView; -end; - -procedure TcxCustomTreeView.InternalInitTreeView; -begin - FTreeView := GetTreeViewClass.Create(Self); -end; - -class function TcxCustomTreeView.GetTreeViewClass: TcxCustomInnerTreeViewClass; -begin - Result := TcxCustomInnerTreeView; -end; - -function TcxCustomTreeView.CanResize(var NewWidth, NewHeight: Integer): Boolean; -begin - Result := True; - if not Result or IsLoading then Exit; - if Align in [alLeft, alRight, alClient] then Exit; -end; - -procedure TcxCustomTreeView.FontChanged; -begin - inherited FontChanged; - SetSize; - InnerTreeView.Invalidate; -end; - -function TcxCustomTreeView.IsReadOnly: Boolean; -begin - Result := ReadOnly; -end; - -function TcxCustomTreeView.NeedsScrollBars: Boolean; -begin - Result := True; -end; - -procedure TcxCustomTreeView.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -begin - inherited Scroll(AScrollBarKind, AScrollCode, AScrollPos); -{$IFDEF USETCXSCROLLBAR} - if AScrollBarKind = sbHorizontal then - InnerTreeView.HScrollHandler(Self, AScrollCode, AScrollPos) - else - InnerTreeView.VScrollHandler(Self, AScrollCode, AScrollPos); - SetScrollBarsParameters; -{$ENDIF} -end; - -procedure TcxCustomTreeView.SetSize; -var - APrevBoundsRect: TRect; -begin - if IsLoading then - Exit; - APrevBoundsRect := InnerTreeView.BoundsRect; - inherited SetSize; - if not EqualRect(APrevBoundsRect, InnerTreeView.BoundsRect) and - InnerTreeView.HandleAllocated then - KillMessages(InnerTreeView.Handle, WM_MOUSEMOVE, WM_MOUSEMOVE); -end; - -procedure TcxCustomTreeView.WriteState(Writer: TWriter); -begin - FTreeView.HandleNeeded; - inherited; -end; - -procedure TcxCustomTreeView.CNNotify(var Message: TWMNotify); -begin - if InnerTreeView <> nil then - begin - InnerTreeView.CNNotify(Message); - Exit; - end; - inherited; -end; - -function TcxCustomTreeView.AlphaSort{$IFDEF DELPHI6}( - ARecurse: Boolean = True){$ENDIF}: Boolean; -begin - Result := InnerTreeView.AlphaSort({$IFDEF DELPHI6}ARecurse{$ENDIF}); -end; - -function TcxCustomTreeView.CustomSort(SortProc: TTVCompare; - Data: Longint{$IFDEF DELPHI6}; ARecurse: Boolean = True{$ENDIF}): Boolean; -begin - Result := InnerTreeView.CustomSort(SortProc, Data{$IFDEF DELPHI6}, - ARecurse{$ENDIF}); -end; - -procedure TcxCustomTreeView.FullCollapse; -begin - InnerTreeView.FullCollapse; -end; - -procedure TcxCustomTreeView.FullExpand; -begin - InnerTreeView.FullExpand; -end; - -function TcxCustomTreeView.GetHitTestInfoAt(X, Y: Integer): THitTests; -begin - Result := InnerTreeView.GetHitTestInfoAt(X - InnerTreeView.Left, - Y - InnerTreeView.Top); -end; - -function TcxCustomTreeView.GetNodeAt(X, Y: Integer): TTreeNode; -begin - Result := InnerTreeView.GetNodeAt(X - InnerTreeView.Left, Y - InnerTreeView.Top); -end; - -function TcxCustomTreeView.IsEditing: Boolean; -begin - Result := InnerTreeView.IsEditing; -end; - -procedure TcxCustomTreeView.LoadFromFile(const FileName: string); -begin - InnerTreeView.LoadFromFile(FileName); -end; - -procedure TcxCustomTreeView.LoadFromStream(Stream: TStream); -begin - InnerTreeView.LoadFromStream(Stream); -end; - -procedure TcxCustomTreeView.SaveToFile(const FileName: string); -begin - InnerTreeView.SaveToFile(FileName); -end; - -procedure TcxCustomTreeView.SaveToStream(Stream: TStream); -begin - InnerTreeView.SaveToStream(Stream); -end; - -procedure TcxCustomTreeView.SetScrollBarsParameters(AIsScrolling: Boolean = False); -begin - if (InnerTreeView <> nil) and not InnerTreeView.IsRedrawLocked then - inherited SetScrollBarsParameters(AIsScrolling); -end; - -{$IFDEF DELPHI6} -procedure TcxCustomTreeView.Select(Node: TTreeNode; ShiftState: TShiftState = []); -begin - InnerTreeView.Select(Node, ShiftState); -end; - -procedure TcxCustomTreeView.Select(const Nodes: array of TTreeNode); -begin - InnerTreeView.Select(Nodes); -end; - -procedure TcxCustomTreeView.Select(Nodes: TList); -begin - InnerTreeView.Select(Nodes); -end; - -procedure TcxCustomTreeView.Deselect(Node: TTreeNode); -begin - InnerTreeView.Deselect(Node); -end; - -procedure TcxCustomTreeView.Subselect(Node: TTreeNode; Validate: Boolean = False); -begin - InnerTreeView.Subselect(Node, Validate); -end; - -procedure TcxCustomTreeView.ClearSelection(KeepPrimary: Boolean = False); -begin - InnerTreeView.ClearSelection(KeepPrimary); -end; - -function TcxCustomTreeView.GetSelections(AList: TList): TTreeNode; -begin - Result := InnerTreeView.GetSelections(AList); -end; - -function TcxCustomTreeView.FindNextToSelect: TTreeNode; -begin - Result := InnerTreeView.FindNextToSelect; -end; -{$ENDIF} - -function TcxCustomTreeView.GetAutoExpand: Boolean; -begin - Result := InnerTreeView.AutoExpand; -end; - -function TcxCustomTreeView.GetChangeDelay: Integer; -begin - Result := InnerTreeView.ChangeDelay; -end; - -function TcxCustomTreeView.GetHideSelection: Boolean; -begin - Result := InnerTreeView.HideSelection; -end; - -function TcxCustomTreeView.GetHotTrack: Boolean; -begin - Result := InnerTreeView.HotTrack; -end; - -function TcxCustomTreeView.GetImages: TCustomImageList; -begin - Result := InnerTreeView.Images; -end; - -function TcxCustomTreeView.GetItemHeight: Integer; -begin - Result := InnerTreeView.ItemHeight; -end; - -function TcxCustomTreeView.GetTreeNodes: TTreeNodes; -begin - Result := InnerTreeView.Items; -end; - -function TcxCustomTreeView.GetIndent: Integer; -begin - Result := InnerTreeView.Indent; -end; - -{$IFDEF DELPHI6} -function TcxCustomTreeView.GetMultiSelect: Boolean; -begin - Result := InnerTreeView.MultiSelect; -end; - -function TcxCustomTreeView.GetMultiSelectStyle: TMultiSelectStyle; -begin - Result := InnerTreeView.MultiSelectStyle; -end; -{$ENDIF} - -function TcxCustomTreeView.GetReadOnly: Boolean; -begin - Result := InnerTreeView.ReadOnly; -end; - -function TcxCustomTreeView.GetRightClickSelect: Boolean; -begin - Result := InnerTreeView.RightClickSelect; -end; - -function TcxCustomTreeView.GetRowSelect: Boolean; -begin - Result := InnerTreeView.RowSelect; -end; - -function TcxCustomTreeView.GetShowButtons: Boolean; -begin - Result := InnerTreeView.ShowButtons; -end; - -function TcxCustomTreeView.GetShowLines: Boolean; -begin - Result := InnerTreeView.ShowLines; -end; - -function TcxCustomTreeView.GetShowRoot: Boolean; -begin - Result := InnerTreeView.ShowRoot; -end; - -function TcxCustomTreeView.GetSortType: TSortType; -begin - Result := InnerTreeView.SortType; -end; - -function TcxCustomTreeView.GetStateImages: TCustomImageList; -begin - Result := InnerTreeView.StateImages; -end; - -function TcxCustomTreeView.GetToolTips: Boolean; -begin - Result := InnerTreeView.ToolTips; -end; - -function TcxCustomTreeView.GetTreeViewCanvas: TcxCanvas; -begin - Result := InnerTreeView.Canvas; -end; - -{$IFDEF DELPHI6} -function TcxCustomTreeView.GetOnAddition: TTVExpandedEvent; -begin - Result := InnerTreeView.OnAddition; -end; -{$ENDIF} - -{$IFDEF DELPHI5} -function TcxCustomTreeView.GetOnAdvancedCustomDraw: TTVAdvancedCustomDrawEvent; -begin - Result := InnerTreeView.OnAdvancedCustomDraw; -end; - -function TcxCustomTreeView.GetOnAdvancedCustomDrawItem: TTVAdvancedCustomDrawItemEvent; -begin - Result := InnerTreeView.OnAdvancedCustomDrawItem; -end; -{$ENDIF} - -{$IFDEF DELPHI6} -function TcxCustomTreeView.GetOnCancelEdit: TTVChangedEvent; -begin - Result := InnerTreeView.OnCancelEdit; -end; -{$ENDIF} - -function TcxCustomTreeView.GetOnChange: TTVChangedEvent; -begin - Result := InnerTreeView.OnChange; -end; - -function TcxCustomTreeView.GetOnChanging: TTVChangingEvent; -begin - Result := InnerTreeView.OnChanging; -end; - -function TcxCustomTreeView.GetOnCollapsed: TTVExpandedEvent; -begin - Result := InnerTreeView.OnCollapsed; -end; - -function TcxCustomTreeView.GetOnCollapsing: TTVCollapsingEvent; -begin - Result := InnerTreeView.OnCollapsing; -end; - -function TcxCustomTreeView.GetOnCompare: TTVCompareEvent; -begin - Result := InnerTreeView.OnCompare; -end; - -function TcxCustomTreeView.GetOnCustomDraw: TTVCustomDrawEvent; -begin - Result := InnerTreeView.OnCustomDraw; -end; - -function TcxCustomTreeView.GetOnCustomDrawItem: TTVCustomDrawItemEvent; -begin - Result := InnerTreeView.OnCustomDrawItem; -end; - -function TcxCustomTreeView.GetOnDeletion: TTVExpandedEvent; -begin - Result := InnerTreeView.OnDeletion; -end; - -function TcxCustomTreeView.GetOnEditing: TTVEditingEvent; -begin - Result := InnerTreeView.OnEditing; -end; - -function TcxCustomTreeView.GetOnEdited: TTVEditedEvent; -begin - Result := InnerTreeView.OnEdited; -end; - -function TcxCustomTreeView.GetOnExpanding: TTVExpandingEvent; -begin - Result := InnerTreeView.OnExpanding; -end; - -function TcxCustomTreeView.GetOnExpanded: TTVExpandedEvent; -begin - Result := InnerTreeView.OnExpanded; -end; - -function TcxCustomTreeView.GetOnGetImageIndex: TTVExpandedEvent; -begin - Result := InnerTreeView.OnGetImageIndex; -end; - -function TcxCustomTreeView.GetOnGetSelectedIndex: TTVExpandedEvent; -begin - Result := InnerTreeView.OnGetSelectedIndex; -end; - -{$IFDEF DELPHI6} -function TcxCustomTreeView.GetOnCreateNodeClass: TTVCreateNodeClassEvent; -begin - Result := InnerTreeView.OnCreateNodeClass; -end; -{$ENDIF} - -function TcxCustomTreeView.GetDropTarget: TTreeNode; -begin - Result := InnerTreeView.DropTarget; -end; - -function TcxCustomTreeView.GetSelected: TTreeNode; -begin - Result := InnerTreeView.Selected; -end; - -function TcxCustomTreeView.GetTopItem: TTreeNode; -begin - Result := InnerTreeView.TopItem; -end; - -{$IFDEF DELPHI6} -function TcxCustomTreeView.GetSelectionCount: Cardinal; -begin - Result := InnerTreeView.SelectionCount; -end; - -function TcxCustomTreeView.GetSelection(Index: Integer): TTreeNode; -begin - Result := InnerTreeView.Selections[Index]; -end; -{$ENDIF} - -procedure TcxCustomTreeView.SetAutoExpand(Value: Boolean); -begin - InnerTreeView.AutoExpand := Value; -end; - -procedure TcxCustomTreeView.SetChangeDelay(Value: Integer); -begin - InnerTreeView.ChangeDelay := Value; -end; - -procedure TcxCustomTreeView.SetHideSelection(Value: Boolean); -begin - InnerTreeView.HideSelection := Value; -end; - -procedure TcxCustomTreeView.SetHotTrack(Value: Boolean); -begin - InnerTreeView.HotTrack := Value; -end; - -procedure TcxCustomTreeView.SetImages(Value: TCustomImageList); -begin - InnerTreeView.Images := Value; -end; - -procedure TcxCustomTreeView.SetTreeNodes(Value: TTreeNodes); -begin - InnerTreeView.Items := Value; -end; - -procedure TcxCustomTreeView.SetIndent(Value: Integer); -begin - InnerTreeView.Indent := Value; -end; - -procedure TcxCustomTreeView.SetItemHeight(Value: Integer); -begin - InnerTreeView.ItemHeight := Value; -end; - -{$IFDEF DELPHI6} -procedure TcxCustomTreeView.SetMultiSelect(Value: Boolean); -begin - InnerTreeView.MultiSelect := Value; -end; - -procedure TcxCustomTreeView.SetMultiSelectStyle(Value: TMultiSelectStyle); -begin - InnerTreeView.MultiSelectStyle := Value; -end; -{$ENDIF} - -procedure TcxCustomTreeView.SetRightClickSelect(Value: Boolean); -begin - InnerTreeView.RightClickSelect := Value; -end; - -procedure TcxCustomTreeView.SetReadOnly(Value: Boolean); -begin - if Value <> ReadOnly then - begin - InnerTreeView.ReadOnly := Value; - DataSetChange; - end; -end; - -procedure TcxCustomTreeView.SetRowSelect(Value: Boolean); -begin - InnerTreeView.RowSelect := Value; -end; - -procedure TcxCustomTreeView.SetShowButtons(Value: Boolean); -begin - InnerTreeView.ShowButtons := Value; -end; - -procedure TcxCustomTreeView.SetShowLines(Value: Boolean); -begin - InnerTreeView.ShowLines := Value; -end; - -procedure TcxCustomTreeView.SetShowRoot(Value: Boolean); -begin - InnerTreeView.ShowRoot := Value; -end; - -procedure TcxCustomTreeView.SetSortType(Value: TSortType); -begin - InnerTreeView.SortType := Value; -end; - -procedure TcxCustomTreeView.SetStateImages(Value: TCustomImageList); -begin - InnerTreeView.StateImages := Value; -end; - -procedure TcxCustomTreeView.SetToolTips(Value: Boolean); -begin - InnerTreeView.ToolTips := Value; -end; - -{$IFDEF DELPHI6} -procedure TcxCustomTreeView.SetOnAddition(Value: TTVExpandedEvent); -begin - InnerTreeView.OnAddition := Value; -end; -{$ENDIF} - -{$IFDEF DELPHI5} -procedure TcxCustomTreeView.SetOnAdvancedCustomDraw(Value: TTVAdvancedCustomDrawEvent); -begin - InnerTreeView.OnAdvancedCustomDraw := Value; -end; - -procedure TcxCustomTreeView.SetOnAdvancedCustomDrawItem(Value: TTVAdvancedCustomDrawItemEvent); -begin - InnerTreeView.OnAdvancedCustomDrawItem := Value; -end; -{$ENDIF} - -{$IFDEF DELPHI6} -procedure TcxCustomTreeView.SetOnCancelEdit(Value: TTVChangedEvent); -begin - InnerTreeView.OnCancelEdit := Value; -end; -{$ENDIF} - -procedure TcxCustomTreeView.SetOnChange(Value: TTVChangedEvent); -begin - InnerTreeView.OnChange := Value; -end; - -procedure TcxCustomTreeView.SetOnChanging(Value: TTVChangingEvent); -begin - InnerTreeView.OnChanging := Value; -end; - -procedure TcxCustomTreeView.SetOnCollapsed(Value: TTVExpandedEvent); -begin - InnerTreeView.OnCollapsed := Value; -end; - -procedure TcxCustomTreeView.SetOnCollapsing(Value: TTVCollapsingEvent); -begin - InnerTreeView.OnCollapsing := Value; -end; - -procedure TcxCustomTreeView.SetOnCompare(Value: TTVCompareEvent); -begin - InnerTreeView.OnCompare := Value; -end; - -procedure TcxCustomTreeView.SetOnCustomDraw(Value: TTVCustomDrawEvent); -begin - InnerTreeView.OnCustomDraw := Value; -end; - -procedure TcxCustomTreeView.SetOnCustomDrawItem(Value: TTVCustomDrawItemEvent); -begin - InnerTreeView.OnCustomDrawItem := Value; -end; - -procedure TcxCustomTreeView.SetOnDeletion(Value: TTVExpandedEvent); -begin - InnerTreeView.OnDeletion := Value; -end; - -procedure TcxCustomTreeView.SetOnEditing(Value: TTVEditingEvent); -begin - InnerTreeView.OnEditing := Value; -end; - -procedure TcxCustomTreeView.SetOnEdited(Value: TTVEditedEvent); -begin - InnerTreeView.OnEdited := Value; -end; - -procedure TcxCustomTreeView.SetOnExpanding(Value: TTVExpandingEvent); -begin - InnerTreeView.OnExpanding := Value; -end; - -procedure TcxCustomTreeView.SetOnExpanded(Value: TTVExpandedEvent); -begin - InnerTreeView.OnExpanded := Value; -end; - -procedure TcxCustomTreeView.SetOnGetImageIndex(Value: TTVExpandedEvent); -begin - InnerTreeView.OnGetImageIndex := Value; -end; - -procedure TcxCustomTreeView.SetOnGetSelectedIndex(Value: TTVExpandedEvent); -begin - InnerTreeView.OnGetSelectedIndex := Value; -end; - -{$IFDEF DELPHI6} -procedure TcxCustomTreeView.SetOnCreateNodeClass(Value: TTVCreateNodeClassEvent); -begin - InnerTreeView.OnCreateNodeClass := Value; -end; -{$ENDIF} - -procedure TcxCustomTreeView.SetDropTarget(Value: TTreeNode); -begin - InnerTreeView.DropTarget := Value; -end; - -procedure TcxCustomTreeView.SetSelected(Value: TTreeNode); -begin - InnerTreeView.Selected := Value; -end; - -procedure TcxCustomTreeView.SetTopItem(Value: TTreeNode); -begin - InnerTreeView.TopItem := Value; -end; - -function TcxCustomTreeView.CanEdit(Node: TTreeNode): Boolean; -begin - Result := InnerTreeView.CanEdit(Node); -end; - -function TcxCustomTreeView.CanChange(Node: TTreeNode): Boolean; -begin - Result := InnerTreeView.CanChange(Node); -end; - -function TcxCustomTreeView.CanCollapse(Node: TTreeNode): Boolean; -begin - Result := InnerTreeView.CanCollapse(Node); -end; - -function TcxCustomTreeView.CanExpand(Node: TTreeNode): Boolean; -begin - Result := InnerTreeView.CanExpand(Node); -end; - -procedure TcxCustomTreeView.Collapse(Node: TTreeNode); -begin - InnerTreeView.Collapse(Node); -end; - -procedure TcxCustomTreeView.Expand(Node: TTreeNode); -begin - InnerTreeView.Expand(Node); -end; - -end. diff --git a/internal/x.46/ExpressEditors Library 5/Sources/cxVer.inc b/internal/x.46/ExpressEditors Library 5/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/ExpressEditors Library 5/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC10.bpk b/internal/x.46/ExpressExport Library/Packages/cxExportC10.bpk deleted file mode 100644 index 13fb27ea..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportC10.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = cxExportC10.bpl -OBJFILES = cxExportC10.obj cxXLSExport.obj \ - cxHtmlXmlTxtExport.obj cxExport.obj cxExportStrs.obj -RESFILES = cxExportC10.res -MAINSOURCE = cxExportC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi cxLibraryC10.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib vcl.bpi dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Export Library (VCL Edition) by Developer Express Inc." \ - -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC10.cpp b/internal/x.46/ExpressExport Library/Packages/cxExportC10.cpp deleted file mode 100644 index 26d012be..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportC10.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxExportC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEUNIT("cxXLSExport.pas"); -USEUNIT("cxHtmlXmlTxtExport.pas"); -USEUNIT("cxExport.pas"); -USEUNIT("cxExportStrs.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC10.res b/internal/x.46/ExpressExport Library/Packages/cxExportC10.res deleted file mode 100644 index 291a7039..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportC10.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC11.bpk b/internal/x.46/ExpressExport Library/Packages/cxExportC11.bpk deleted file mode 100644 index 963c8773..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportC11.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = cxExportC11.bpl -OBJFILES = cxExportC11.obj cxXLSExport.obj \ - cxHtmlXmlTxtExport.obj cxExport.obj cxExportStrs.obj -RESFILES = cxExportC11.res -MAINSOURCE = cxExportC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi cxLibraryC11.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib vcl.bpi dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Export Library (VCL Edition) by Developer Express Inc." \ - -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC11.cpp b/internal/x.46/ExpressExport Library/Packages/cxExportC11.cpp deleted file mode 100644 index ff3c40c2..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportC11.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxExportC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEUNIT("cxXLSExport.pas"); -USEUNIT("cxHtmlXmlTxtExport.pas"); -USEUNIT("cxExport.pas"); -USEUNIT("cxExportStrs.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC11.res b/internal/x.46/ExpressExport Library/Packages/cxExportC11.res deleted file mode 100644 index b3edd525..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportC11.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC12.bpk b/internal/x.46/ExpressExport Library/Packages/cxExportC12.bpk deleted file mode 100644 index b044dd14..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportC12.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = cxExportC12.bpl -OBJFILES = cxExportC12.obj cxXLSExport.obj \ - cxHtmlXmlTxtExport.obj cxExport.obj cxExportStrs.obj -RESFILES = cxExportC12.res -MAINSOURCE = cxExportC12.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi cxLibraryC12.bpi dxCoreC12.bpi -SPARELIBS = rtl.lib vcl.bpi dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Export Library (VCL Edition) by Developer Express Inc." \ - -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC12.cpp b/internal/x.46/ExpressExport Library/Packages/cxExportC12.cpp deleted file mode 100644 index 1866c579..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportC12.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxExportC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEUNIT("cxXLSExport.pas"); -USEUNIT("cxHtmlXmlTxtExport.pas"); -USEUNIT("cxExport.pas"); -USEUNIT("cxExportStrs.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC12.res b/internal/x.46/ExpressExport Library/Packages/cxExportC12.res deleted file mode 100644 index 4b8222b7..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportC12.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC14.bpk b/internal/x.46/ExpressExport Library/Packages/cxExportC14.bpk deleted file mode 100644 index d07c87d3..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportC14.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = cxExportC14.bpl -OBJFILES = cxExportC14.obj cxXLSExport.obj \ - cxHtmlXmlTxtExport.obj cxExport.obj cxExportStrs.obj -RESFILES = cxExportC14.res -MAINSOURCE = cxExportC14.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi cxLibraryC14.bpi dxCoreC14.bpi -SPARELIBS = rtl.lib vcl.bpi dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Export Library (VCL Edition) by Developer Express Inc." \ - -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC14.cpp b/internal/x.46/ExpressExport Library/Packages/cxExportC14.cpp deleted file mode 100644 index 26da1f40..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportC14.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxExportC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEUNIT("cxXLSExport.pas"); -USEUNIT("cxHtmlXmlTxtExport.pas"); -USEUNIT("cxExport.pas"); -USEUNIT("cxExportStrs.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC14.res b/internal/x.46/ExpressExport Library/Packages/cxExportC14.res deleted file mode 100644 index 6cbfcfd7..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportC14.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC5.bpk b/internal/x.46/ExpressExport Library/Packages/cxExportC5.bpk deleted file mode 100644 index 5339763d..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportC5.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = cxExportC5.bpl -OBJFILES = cxExportC5.obj cxXLSExport.obj \ - cxHtmlXmlTxtExport.obj cxExport.obj cxExportStrs.obj -RESFILES = cxExportC5.res -MAINSOURCE = cxExportC5.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = vcl50.bpi vcldb50.bpi cxLibraryVCLC5.bpi -SPARELIBS = vcl50.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Export Library (VCL Edition) by Developer Express Inc." \ - -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC5.cpp b/internal/x.46/ExpressExport Library/Packages/cxExportC5.cpp deleted file mode 100644 index 7218e8b8..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportC5.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxExportC5.res"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vcldb50.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USEUNIT("cxXLSExport.pas"); -USEUNIT("cxHtmlXmlTxtExport.pas"); -USEUNIT("cxExport.pas"); -USEUNIT("cxExportStrs.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportC5.res b/internal/x.46/ExpressExport Library/Packages/cxExportC5.res deleted file mode 100644 index adc0d728..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportC5.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD10.dpk b/internal/x.46/ExpressExport Library/Packages/cxExportD10.dpk deleted file mode 100644 index ead63ce0..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportD10.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package cxExportD10; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express Cross Platform Export Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - dbrtl, - cxLibraryD10; - -contains - cxExport, - cxHtmlXmlTxtExport, - cxXLSExport, - cxExportStrs; - -end. diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD10.res b/internal/x.46/ExpressExport Library/Packages/cxExportD10.res deleted file mode 100644 index 5f741007..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportD10.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD11.dpk b/internal/x.46/ExpressExport Library/Packages/cxExportD11.dpk deleted file mode 100644 index ae7556f6..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportD11.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package cxExportD11; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express Cross Platform Export Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - dbrtl, - cxLibraryD11; - -contains - cxExport, - cxHtmlXmlTxtExport, - cxXLSExport, - cxExportStrs; - -end. diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD11.res b/internal/x.46/ExpressExport Library/Packages/cxExportD11.res deleted file mode 100644 index f7528ec5..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportD11.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD12.dpk b/internal/x.46/ExpressExport Library/Packages/cxExportD12.dpk deleted file mode 100644 index b0cafbfe..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportD12.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package cxExportD12; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express Cross Platform Export Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - dbrtl, - cxLibraryD12; - -contains - cxExport, - cxHtmlXmlTxtExport, - cxXLSExport, - cxExportStrs; - -end. diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD12.res b/internal/x.46/ExpressExport Library/Packages/cxExportD12.res deleted file mode 100644 index cc9509b2..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportD12.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD14.dpk b/internal/x.46/ExpressExport Library/Packages/cxExportD14.dpk deleted file mode 100644 index ca6802f3..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportD14.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package cxExportD14; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express Cross Platform Export Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - dbrtl, - cxLibraryD14; - -contains - cxExport, - cxHtmlXmlTxtExport, - cxXLSExport, - cxExportStrs; - -end. diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD14.res b/internal/x.46/ExpressExport Library/Packages/cxExportD14.res deleted file mode 100644 index bcf06488..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportD14.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD5.dpk b/internal/x.46/ExpressExport Library/Packages/cxExportD5.dpk deleted file mode 100644 index a963e4e1..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportD5.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package cxExportD5; - -{$R *.RES} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express Cross Platform Export Library (VCL Edition) by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl50, - vcldb50, - cxLibraryVCLD5; - -contains - cxExport, - cxHtmlXmlTxtExport, - cxXLSExport, - cxExportStrs; - -end. diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD5.res b/internal/x.46/ExpressExport Library/Packages/cxExportD5.res deleted file mode 100644 index 1779ffaf..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportD5.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD9.dpk b/internal/x.46/ExpressExport Library/Packages/cxExportD9.dpk deleted file mode 100644 index 1d6d3649..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportD9.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package cxExportD9; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express Cross Platform Export Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - dbrtl, - cxLibraryD9; - -contains - cxExport, - cxHtmlXmlTxtExport, - cxXLSExport, - cxExportStrs; - -end. diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportD9.res b/internal/x.46/ExpressExport Library/Packages/cxExportD9.res deleted file mode 100644 index bc5f8e02..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportD9.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportVCLC6.bpk b/internal/x.46/ExpressExport Library/Packages/cxExportVCLC6.bpk deleted file mode 100644 index 01fddbf0..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportVCLC6.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = cxExportVCLC6.bpl -OBJFILES = cxExportVCLC6.obj cxXLSExport.obj \ - cxHtmlXmlTxtExport.obj cxExport.obj cxExportStrs.obj -RESFILES = cxExportVCLC6.res -MAINSOURCE = cxExportVCLC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi cxLibraryVCLC6.bpi dxCoreC6.bpi -SPARELIBS = rtl.lib vcl.bpi dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Export Library (VCL Edition) by Developer Express Inc." \ - -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportVCLC6.cpp b/internal/x.46/ExpressExport Library/Packages/cxExportVCLC6.cpp deleted file mode 100644 index 712e842d..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportVCLC6.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxExportVCLC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEUNIT("cxXLSExport.pas"); -USEUNIT("cxHtmlXmlTxtExport.pas"); -USEUNIT("cxExport.pas"); -USEUNIT("cxExportStrs.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportVCLC6.res b/internal/x.46/ExpressExport Library/Packages/cxExportVCLC6.res deleted file mode 100644 index 0d9f3798..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportVCLC6.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportVCLD6.dpk b/internal/x.46/ExpressExport Library/Packages/cxExportVCLD6.dpk deleted file mode 100644 index c9b3c5b7..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportVCLD6.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package cxExportVCLD6; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express Cross Platform Export Library (VCL Edition) by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - dbrtl, - cxLibraryVCLD6; - -contains - cxExport, - cxHtmlXmlTxtExport, - cxXLSExport, - cxExportStrs; - -end. diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportVCLD6.res b/internal/x.46/ExpressExport Library/Packages/cxExportVCLD6.res deleted file mode 100644 index 7cc9955b..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportVCLD6.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportVCLD7.dpk b/internal/x.46/ExpressExport Library/Packages/cxExportVCLD7.dpk deleted file mode 100644 index 782836a2..00000000 --- a/internal/x.46/ExpressExport Library/Packages/cxExportVCLD7.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package cxExportVCLD7; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express Cross Platform Export Library (VCL Edition) by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - dbrtl, - cxLibraryVCLD7; - -contains - cxExport, - cxHtmlXmlTxtExport, - cxXLSExport, - cxExportStrs; - -end. diff --git a/internal/x.46/ExpressExport Library/Packages/cxExportVCLD7.res b/internal/x.46/ExpressExport Library/Packages/cxExportVCLD7.res deleted file mode 100644 index 9c3ef317..00000000 Binary files a/internal/x.46/ExpressExport Library/Packages/cxExportVCLD7.res and /dev/null differ diff --git a/internal/x.46/ExpressExport Library/Sources/cxExport.pas b/internal/x.46/ExpressExport Library/Sources/cxExport.pas deleted file mode 100644 index ad4ad5f9..00000000 --- a/internal/x.46/ExpressExport Library/Sources/cxExport.pas +++ /dev/null @@ -1,983 +0,0 @@ - -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ ExpressExport } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEXPORT AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit cxExport; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, SysUtils, Math, Graphics, dxCore, cxExportStrs; - -type - EcxExportData = class(EdxException); - TcxExportProviderClass = class of TcxCustomExportProvider; - TcxCustomExportProvider = class; - IcxCellInternalCache = interface; - - PWord =^Word; - PInteger =^Integer; - PIntArray = ^TIntArray; - TIntArray = array[0..MaxInt div SizeOf(Integer) - 1] of Integer; - - { Define CX style items } - TcxAlignText = (catLeft, catCenter, catRight); - TcxBrushStyle = (cbsClear, cbsSolid); - TcxFontStyle = (cfsBold, cfsItalic, cfsUnderline, cfsStrikeOut); - TcxFontStyles = set of TcxFontStyle; - - { TcxCellBorders } - TcxCellBorders = packed record - IsDefault: Boolean; - Width: Integer; - Color: Integer; - end; - - { TcxCacheCellStyle } - PcxCacheCellStyle = ^TcxCacheCellStyle; - TcxCacheCellStyle = packed record - AlignText: TcxAlignText; - FontName: array[0..64 - 1] of Byte; - FontStyle: TcxFontStyles; - FontColor: Integer; - FontSize: Integer; - FontCharset: Integer; - Borders: array[0..3] of TcxCellBorders; - BrushStyle: TcxBrushStyle; - BrushBkColor: Integer; - BrushFgColor: Integer; - HashCode: Integer; - end; - - { TcxCellInternalCache } - TcxCellInternalCache = record - Cache: IcxCellInternalCache; - Index: Integer; - end; - - { TcxCacheItem } - TcxCacheItem = record - InternalCache: TcxCellInternalCache; - Data: Pointer; - DataSize: Integer; - DataType: Integer; - StyleIndex: Integer; - IsHidden: Boolean; - case IsUnion: Boolean of - False:(); - True: (Width, Height: Integer); - end; - - TcxEnumExportTypes = procedure(const AExportType: Integer; const AExportName: string); - TcxEnumTypes = procedure(const AExportType: Integer); - - { IcxCellInternalCache } - IcxCellInternalCache = interface - ['{DEF62C25-0B11-4BD0-AE25-BABF7EDD7883}'] - procedure CommitCache(AStream: TStream; AParam: Pointer); - procedure CommitStyle(AStream: TStream; AParam: Pointer); - procedure DeleteCacheFromCell(const ACol, ARow: Integer); - procedure SetCacheIntoCell(const ACol, ARow: Integer; ACache: IcxCellInternalCache); - end; - - { TcxExportProvider } - IcxExportProvider = interface - ['{442A08A8-CDDA-4FD6-8E15-9D8BD34554F6}'] - procedure Commit; - function GetCellStyle(const ACol, ARow: Integer): PcxCacheCellStyle; - function GetStyle(AStyleIndex: Integer): PcxCacheCellStyle; - function RegisterStyle(const AStyle: TcxCacheCellStyle): Integer; - procedure SetCellDataDouble(const ACol, ARow: Integer; const AValue: Double); - procedure SetCellDataInteger(const ACol, ARow: Integer; const AValue: Integer); - procedure SetCellDataString(const ACol, ARow: Integer; const AText: string); - procedure SetCellDataWideString(const ACol, ARow: Integer; const AText: Widestring); - procedure SetCellStyle(const ACol, ARow, AStyleIndex: Integer); overload; - procedure SetCellStyle(const ACol, ARow, AExampleCol, AExampleRow: Integer); overload; - procedure SetCellStyle(const ACol, ARow: Integer; const AStyle: TcxCacheCellStyle); overload; - procedure SetCellStyleEx(const ACol, ARow, H, W: Integer; const AStyleIndex: Integer); - procedure SetCellUnion(const ACol, ARow: Integer; H, W: Integer); - procedure SetCellValue(const ACol, ARow: Integer; const AValue: Variant); - procedure SetColumnWidth(const ACol, AWidth: Integer); - procedure SetDefaultStyle(const AStyle: TcxCacheCellStyle); - procedure SetRange(const AColCount, ARowCount: Integer; IsVisible: Boolean = True); - procedure SetRowHeight(const ARow, AHeight: Integer); - // export graphic extension - procedure SetCellDataGraphic(const ACol, ARow: Integer; var AGraphic: TGraphic); - function SupportGraphic: Boolean; - end; - - { IcxExportWithSeparators } - IcxExportWithSeparators = interface - ['{0E2919A6-8B49-49D7-B55B-B44B6DECF2E5}'] - procedure AddSeparator(const ASeparator: string); - end; - - { TcxCustomExportProvider } - TcxCustomExportProvider = class(TInterfacedObject) - private - FFileName: WideString; - protected - procedure Clear; dynamic; - property FileName: WideString read FFileName; - public - constructor Create(const AFileName: string); virtual; - procedure BeforeDestruction; override; - class function ExportType: Integer; virtual; - class function ExportName: string; virtual; - end; - - { TcxExport } - TcxExport = class - protected - class function GetExportClassByType( - AExportType: Integer): TcxExportProviderClass; virtual; - public - class function Provider(AExportType: Integer; - const AFileName: string): TcxCustomExportProvider; - class procedure SupportExportTypes(EnumSupportTypes: TcxEnumExportTypes); - class procedure SupportTypes(EnumFunc: TcxEnumTypes); - class function RegisterProviderClass(AProviderClass: TcxExportProviderClass): Boolean; - end; - - { TcxExportStyleManager } - TcxExportStyleManager = class - private - FRefCount: Integer; - FStyles: TList; - FFileName: string; - constructor CreateInstance(const AFileName: string); - function GetCount: Integer; - function GetItem(AIndex: Integer): TcxCacheCellStyle; - function StyleCompare(const AStyle1, AStyle2: PcxCacheCellStyle): Boolean; - public - constructor Create; - destructor Destroy; override; - procedure Clear; - class function GetInstance(const AFileName: string): TcxExportStyleManager; - function GetStyle(const AIndex: Integer): PcxCacheCellStyle; - function RegisterStyle(const AStyle: TcxCacheCellStyle): Integer; - property Items[AIndex: Integer]: TcxCacheCellStyle read GetItem; default; - property Count: Integer read GetCount; - end; - - { TFileStreamEx } - - TFileStreamEx = class(TFileStream) - public - constructor Create(const FileName: string; Mode: Word); overload; - end; - - TFileStreamClass = class of TFileStream; - - { TcxExportIntList } - - TcxExportIntList = class(TList) - private - function GetItem(AIndex: Integer): Integer; - procedure SetItem(AIndex, AValue: Integer); - public - procedure Add(AValue: Integer); - procedure AddPairs(AValue1, AValue2: Integer); - function Last: Integer; - function First: Integer; - - property Items[Index: Integer]: Integer read GetItem write SetItem; default; - end; - - { TcxExportScale } - - TcxExportScale = class(TcxExportIntList) - private - function GetVisibleCount: Integer; - function GetDelta(AIndex: Integer): Integer; - public - procedure Arrange; - function IndexOf(AItem: Integer): Integer; - function IndexOfEx(AValue, AFirstIndex, ALastIndex: Integer): Integer; - procedure GetPosition(AValue1, AValue2: Integer; out AIndex1, AIndex2: Integer); - procedure GetPositionEx(AValue1, AValue2, AFirstIndex, ALastIndex: Integer; out AIndex1, AIndex2: Integer); - - property Delta[Index: Integer]: Integer read GetDelta; - property VisibleCount: Integer read GetVisibleCount; - end; - - TcxColorToRgbProc = function(AColor: Integer): Integer; - TcxGetResourceStringProc = function(const ResString: Pointer): string; - -// unicode supported function prototypes - -function cxUnicodeToStr(const AText: WideString; ACharset: Integer = 0): string; -function cxStrToUnicode(const AText: string; ACharset: Integer = 0): Widestring; -function cxStrUnicodeNeeded(const AText: string; ACheckNormal: Boolean = False): Boolean; - -function cxChangeFileExtExW(const AFileName: WideString; const ANewExt: string): WideString; -function cxExtractFileNameEx(const AFileName: string): WideString; -function cxExtractFileNameExW(const AFileName: WideString): WideString; -function cxExtractFilePathExW(const AFileName: WideString): WideString; -function cxValidateFileName(const AFileName: string): WideString; -function cxValidateFileNameW(const AFileName: WideString): WideString; - -{$IFNDEF DELPHI5} -procedure FreeAndNil(var Obj); -function Supports(Instance: TObject; const Intf: TGUID; out Inst): Boolean; -{$ENDIF} - -function cxColorToRGB(const AColor: Integer): Integer; -function GetHashCode(const Buffer; Count: Integer): Integer; - -function SupportGraphic(AGraphic: TGraphic): Boolean; overload; -function SupportGraphic(AGraphicClass: TGraphicClass): Boolean; overload; - -procedure GetGraphicAsText(const AFileName: string; - var AGraphic: TGraphic; var AGraphicText: AnsiString); -procedure GetTextAsGraphicStream(const AText: AnsiString; - var AFileName: string; var AStream: AnsiString); - -procedure cxExportInit(AGetResString: TcxGetResourceStringProc; - AColorProc: Pointer; AIsNativeColor: Boolean); - -procedure UseGraphicImages(AUse: Boolean); - -var - DefaultCellStyle: TcxCacheCellStyle; - cxFileStreamClass: TFileStreamClass = TFileStreamEx; - cxBlackColor: Integer; - cxWindowColor: Integer; - cxBtnTextColor: Integer; - cxBtnShadowColor: Integer; - cxBtnFaceColor: Integer; - cxGetResString: TcxGetResourceStringProc; - cxUnicodeSupported: Boolean; - -const - cxExportGraphicClass: TGraphicClass = TBitmap; - cxExportToBinary = Integer($FFFFFFFF); - cxExportToHtml = Integer($00000002); - cxExportToXml = Integer($00000003); - cxExportToText = Integer($00000004); - cxExportToExcel = Integer($00000001); - - cxExportCurrencyFormat: string = ''; - cxDataTypeAnsiString = Integer($00000001); - cxDataTypeWideString = Integer($00000002); - cxDataTypeDouble = Integer($00000003); - cxDataTypeInteger = Integer($00000004); - cxDataTypeGraphic = Integer($00000005); - - cxDataTypeString = cxDataTypeAnsiString; - -resourcestring - cxExportListIndexError = 'List index out of bounds (%d)'; -implementation - -var - StylesCache: TStringList; - RegisteredClasses: array of TcxExportProviderClass; - cxGetRgbColor: TcxColorToRgbProc; - IsNativeColor: Boolean; - GraphicCount: Integer; - GraphicRef: Integer; - -function CopyEx(const ASource: WideString; AFrom: Integer; ACount: Integer = MaxInt): WideString; -begin - Result := ''; - ACount := Min(Length(ASource) - AFrom + 1, ACount); - if ACount <= 0 then Exit; - SetLength(Result, ACount); - Move(ASource[AFrom], Result[1], ACount * SizeOf(WideChar)); -end; - -function GetLastDelimiterPos(const AFileName: WideString; ADelimiter: WideChar): Integer; -begin - Result := Length(AFileName); - if Result = 0 then Exit; - while (Result > 1) and (AFileName[Result] <> ADelimiter) do - Dec(Result); - if AFileName[Result] = ADelimiter then - Inc(Result); -end; - -function cxChangeFileExtExW(const AFileName: WideString; const ANewExt: string): WideString; -var - APos: Integer; -begin - APos := GetLastDelimiterPos(AFileName, '.'); - if APos <= 1 then - Result := AFileName - else - Result := CopyEx(AFileName, 1, APos - 2); - Result := Result + cxStrToUnicode(ANewExt); -end; - -function cxExtractFileNameEx(const AFileName: string): Widestring; -begin - Result := cxExtractFileNameExW(cxStrToUnicode(AFileName)); -end; - -function cxExtractFileNameExW(const AFileName: WideString): WideString; -begin - Result := CopyEx(AFileName, GetLastDelimiterPos(AFileName, '\')); -end; - -function cxExtractFilePathExW(const AFileName: WideString): WideString; -begin - Result := CopyEx(AFileName, 1, GetLastDelimiterPos(AFileName, '\') - 1); -end; - -function cxValidateFileName(const AFileName: string): WideString; -begin - Result := cxValidateFileNameW(cxStrToUnicode(AFileName)); -end; - -function cxValidateFileNameW(const AFileName: WideString): WideString; -begin - Result := AFileName; - while Pos('/', Result) <> 0 do - Result[Pos('/', Result)] := '\'; -end; - -procedure UseGraphicImages(AUse: Boolean); -begin - if AUse then - Inc(GraphicRef) - else - Dec(GraphicRef); - if GraphicRef = 0 then - GraphicCount := 0; -end; - -function CreateDefaultCellStyle: TcxCacheCellStyle; -var - I: Integer; -begin - with Result do - begin - AlignText := catCenter; - FillChar(FontName, SizeOf(FontName), 0); - dxStringToBytes('Tahoma', FontName); - FontStyle := []; - FontColor := cxBtnTextColor; - FontSize := 8; - FontCharSet := 0; - for I := 0 to 3 do - begin - Borders[I].IsDefault := False; - Borders[I].Width := 1; - Borders[I].Color := cxBtnShadowColor; - end; - BrushStyle := cbsSolid; - BrushBkColor := cxWindowColor; - BrushFgColor := cxBlackColor; - end; -end; - -function cxColorToRGB(const AColor: Integer): Integer; -type - TRGB = packed record - R, G, B, A: Byte; - end; - -begin - Result := cxGetRgbColor(AColor); - if IsNativeColor then Exit; - with TRGB(cxGetRgbColor(AColor)) do - begin - if AColor < 0 then - Result := R shl 16 + G shl 8 + B; - end; -end; - -{$IFDEF WIN32} -function cxUnicodeToStr(const AText: WideString; ACharset: Integer = 0): string; -begin - Result := dxWideStringToString(AText, dxGetCodePageFromCharset(ACharset)); -end; - -function cxStrToUnicode(const AText: string; ACharset: Integer = 0): Widestring; -begin - Result := dxStringToWideString(AText, dxGetCodePageFromCharset(ACharset)); -end; -{$ELSE} -function cxStrToUnicode(const AText: string; ACharset: Integer = 0): Widestring; -begin - Result := AText; -end; -{$ENDIF} - -function cxStrUnicodeNeeded(const AText: string; ACheckNormal: Boolean = False): Boolean; -var - I: Integer; -const - ANormal = ['0'..'9', ':', ';', '*', '+', ',', '-', '.', '/', '!', ' ', - 'A'..'Z', 'a'..'z', '_', '(', ')']; -begin - Result := False; - for I := 1 to Length(AText) do - if (Ord(AText[I]) > $7F) or (ACheckNormal and not dxCharInSet(AText[I], ANormal)) then - begin - Result := True; - Break; - end -end; - -function GetHashCode(const Buffer; Count: Integer): Integer; assembler; -asm - MOV ECX, EDX - MOV EDX, EAX - XOR EAX, EAX -@@1: ROL EAX, 5 - XOR AL, [EDX] - INC EDX - DEC ECX - JNE @@1 -end; - -function GetGraphicFileName(const AFileName, AExt: string): string; -begin - Result := ChangeFileExt(AFileName, '.images') + '\' + ChangeFileExt( - ExtractFileName(AFileName), '') + '_' + IntToStr(GraphicCount) + '.' + AExt; - Inc(GraphicCount); -end; - -function PrepareGraphic(AGraphic: TGraphic): TGraphic; -begin - Result := AGraphic; - if not SupportGraphic(cxExportGraphicClass) then - begin - Result := cxExportGraphicClass.Create; - try - try - Result.Assign(AGraphic); - except - Result.Free; - Result := AGraphic; - end; - finally - if Result <> AGraphic then - AGraphic.Free; - end; - end; -end; - -function SupportGraphic(AGraphic: TGraphic): Boolean; -begin - Result := SupportGraphic(TGraphicClass(AGraphic.ClassType)); -end; - -function SupportGraphic(AGraphicClass: TGraphicClass): Boolean; -begin - Result := (AGraphicClass <> nil) and - (AGraphicClass.InheritsFrom(TBitmap) or - AGraphicClass.InheritsFrom(TMetaFile)); -end; - -procedure GetGraphicAsText(const AFileName: string; - var AGraphic: TGraphic; var AGraphicText: AnsiString); -var - L: Integer; - AName: AnsiString; - AMemStream: TMemoryStream; -begin - AGraphic := PrepareGraphic(AGraphic); - AName := dxStringToAnsiString(GetGraphicFileName(AFileName, - GraphicExtension(TGraphicClass(AGraphic.ClassType)))); - AMemStream := TMemoryStream.Create; - try - AGraphic.SaveToStream(AMemStream); - L := Length(AName); - SetLength(AGraphicText, AMemStream.Size + L + SizeOf(L)); - Move(L, AGraphicText[1], SizeOf(L) * SizeOf(Char)); - Move(AName[1], AGraphicText[1 + SizeOf(L)], L); - Move(AMemStream.Memory^, AGraphicText[1 + SizeOf(L) + L], AMemStream.Size); - finally - AMemStream.Free; - end; -end; - -procedure GetTextAsGraphicStream(const AText: AnsiString; - var AFileName: string; var AStream: AnsiString); -var - L: Integer; - AFileNameA: AnsiString; -begin - Move(AText[1], L, SizeOf(L)); - SetLength(AFileNameA, L); - Move(AText[1 + SizeOf(L)], AFileNameA[1], L); - SetLength(AStream, Length(AText) - SizeOf(L) - L); - Move(AText[1 + SizeOf(L) + L], AStream[1], Length(AStream)); - AFileName := dxAnsiStringToString(AFileNameA); -end; - -{$IFNDEF DELPHI5} -procedure FreeAndNil(var Obj); -var - Temp: TObject; -begin - Temp := TObject(Obj); - Pointer(Obj) := nil; - Temp.Free; -end; - -function Supports(Instance: TObject; const Intf: TGUID; out Inst): Boolean; -begin - Result := (Instance <> nil) and Instance.GetInterface(Intf, Inst); -end; -{$ENDIF} - -{ TcxExport } -class function TcxExport.Provider(AExportType: Integer; - const AFileName: string): TcxCustomExportProvider; -begin - Result := GetExportClassByType(AExportType).Create(AFileName); -end; - -class procedure TcxExport.SupportExportTypes( - EnumSupportTypes: TcxEnumExportTypes); -var - I: Integer; -begin - for I := 0 to Length(RegisteredClasses) - 1 do - begin - with RegisteredClasses[I] do - EnumSupportTypes(ExportType, ExportName); - end; -end; - -class procedure TcxExport.SupportTypes(EnumFunc: TcxEnumTypes); -var - I: Integer; -begin - for I := 0 to Length(RegisteredClasses) - 1 do - EnumFunc(RegisteredClasses[I].ExportType); -end; - -class function TcxExport.RegisterProviderClass(AProviderClass: TcxExportProviderClass): Boolean; -var - I: Integer; -begin - Result := False; - if AProviderClass = nil then - Exit; - for I := 0 to Length(RegisteredClasses) - 1 do - begin - if (AProviderClass.ExportType = RegisteredClasses[I].ExportType) or - (AProviderClass = RegisteredClasses[I]) then Exit; - end; - I := Length(RegisteredClasses); - SetLength(RegisteredClasses, I + 1); - RegisteredClasses[I] := AProviderClass; - Result := True; -end; - -class function TcxExport.GetExportClassByType( - AExportType: Integer): TcxExportProviderClass; -var - I: Integer; -begin - for I := 0 to Length(RegisteredClasses) - 1 do - begin - if RegisteredClasses[I].ExportType = AExportType then - begin - Result := RegisteredClasses[I]; - Exit; - end; - end; - raise EcxExportData.CreateFmt(cxGetResString(@scxUnsupportedExport), [AExportType]); -end; - -{ TcxCustomExportProvider } -constructor TcxCustomExportProvider.Create(const AFileName: string); -begin - FFileName := cxValidateFileName(AFileName); -end; - -procedure TcxCustomExportProvider.BeforeDestruction; -begin - Clear; -end; - -class function TcxCustomExportProvider.ExportType: Integer; -begin - Result := -1; -end; - -class function TcxCustomExportProvider.ExportName: string; -begin - Result := ''; -end; - -procedure TcxCustomExportProvider.Clear; -begin -end; - -{ TcxExportStyleManager } -constructor TcxExportStyleManager.Create; -begin - raise EcxExportData.Create(cxGetResString(@scxStyleManagerCreate)); -end; - -destructor TcxExportStyleManager.Destroy; -begin - if FRefCount <> 0 then - raise EcxExportData.Create(cxGetResString(@scxStyleManagerKill)); - inherited Destroy; -end; - -procedure TcxExportStyleManager.Clear; -var - I: Integer; -begin - Dec(FRefCount); - if FRefCount = 0 then - begin - try - for I := 0 to FStyles.Count - 1 do - FreeMem(PcxCacheCellStyle(FStyles[I])); - if StylesCache.Find(FFileName, I) then - StylesCache.Delete(I); - finally - FStyles.Free; - Destroy; - end; - end; -end; - -class function TcxExportStyleManager.GetInstance( - const AFileName: string): TcxExportStyleManager; -var - AIndex: Integer; -begin - if StylesCache.Find(AFileName, AIndex) then - begin - Result := TcxExportStyleManager(StylesCache.Objects[AIndex]); - Result.RegisterStyle(DefaultCellStyle); - Inc(Result.FRefCount); - end - else - Result := CreateInstance(AFileName); -end; - -function TcxExportStyleManager.GetStyle(const AIndex: Integer): PcxCacheCellStyle; -begin - Result := FStyles[AIndex]; -end; - -function TcxExportStyleManager.RegisterStyle( - const AStyle: TcxCacheCellStyle): Integer; -var - I: Integer; - NewStyleItem, AStylePtr: PcxCacheCellStyle; -begin - AStylePtr := @AStyle; - AStylePtr^.HashCode := - cxExport.GetHashCode(AStyle, SizeOf(TcxCacheCellStyle) - SizeOf(Integer)); - for I := 0 to FStyles.Count - 1 do - if StyleCompare(FStyles[I], @AStyle) then - begin - Result := I; - Exit; - end; - New(NewStyleItem); - NewStyleItem^ := AStylePtr^; - Result := FStyles.Add(NewStyleItem); -end; - -function TcxExportStyleManager.GetCount: Integer; -begin - Result := FStyles.Count; -end; - -function TcxExportStyleManager.GetItem(AIndex: Integer): TcxCacheCellStyle; -begin - Result := GetStyle(AIndex)^; -end; - -constructor TcxExportStyleManager.CreateInstance(const AFileName: string); -begin - FStyles := TList.Create; - StylesCache.AddObject(AFileName, Self); - FFileName := AFileName; - FRefCount := 1; -end; - -function TcxExportStyleManager.StyleCompare( - const AStyle1, AStyle2: PcxCacheCellStyle): Boolean; -begin - Result := (AStyle1.HashCode = AStyle2.HashCode) and - CompareMem(AStyle1, AStyle2, SizeOf(TcxCacheCellStyle) - SizeOf(Integer)); -end; - -constructor TFileStreamEx.Create(const FileName: string; Mode: Word); -{$IFDEF DELPHI6} -var - AName: WideString; -{$ENDIF} -begin -{$IFDEF DELPHI6} - if cxUnicodeSupported then - begin - AName := cxStrToUnicode(FileName); - FHandle := Integer(CreateFileW(PWideChar(AName), GENERIC_READ or GENERIC_WRITE, - 0, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0)); - end - else -{$ENDIF} - inherited Create(FileName, Mode); -end; - -function CompareValues(AItem1, AItem2: Pointer): Integer; -begin - Result := Integer(AItem1) - Integer(AItem2); -end; - -{ TcxExportIntList } - -procedure TcxExportIntList.Add(AValue: Integer); -begin - if Capacity - Count < 2 then - if Count * 2 < 1024 then - Capacity := 1024 - else - Capacity := Count * 2; - inherited Add(Pointer(AValue)); -end; - -procedure TcxExportIntList.AddPairs(AValue1, AValue2: Integer); -begin - if Capacity - Count < 2 then - if Count * 2 < 1024 then - Capacity := 1024 - else - Capacity := Count * 2; - inherited Add(Pointer(AValue1)); - inherited Add(Pointer(AValue2)); -end; - -function TcxExportIntList.Last: Integer; -begin - Result := Integer(inherited Last); -end; - -function TcxExportIntList.First: Integer; -begin - Result := Integer(inherited First); -end; - -function TcxExportIntList.GetItem(AIndex: Integer): Integer; -begin - Result := Integer(List^[AIndex]); -end; - -procedure TcxExportIntList.SetItem(AIndex, AValue: Integer); -begin - Integer(List^[AIndex]) := AValue -end; - -{ TcxExportScale } - -procedure TcxExportScale.Arrange; -var - AIndex, I: Integer; -begin - Sort(@CompareValues); - AIndex := 0; - for I := 1 to Count - 1 do - begin - if List^[AIndex] <> List^[I] then - Inc(AIndex); - List^[AIndex] := List^[I]; - end; - if Count > 0 then - Count := AIndex + 1; -end; - -function TcxExportScale.IndexOf(AItem: Integer): Integer; -begin - Result := IndexOfEx(AItem, 0, VisibleCount); -end; - -function TcxExportScale.IndexOfEx(AValue, AFirstIndex, ALastIndex: Integer): Integer; -var - L, H, I, C: Integer; -begin - Result := -1; - // binary search - L := AFirstIndex; - H := ALastIndex; - while L <= H do - begin - I := (L + H) shr 1; - C := Integer(List^[I]) - AValue; - if C < 0 then - L := I + 1 - else - begin - H := I - 1; - if C = 0 then - begin - Result := I; - Break; - end; - end; - end; - if Result = - 1 then - Error(@cxExportListIndexError, AValue); -end; - -procedure TcxExportScale.GetPosition( - AValue1, AValue2: Integer; out AIndex1, AIndex2: Integer); -begin - AIndex1 := IndexOf(AValue1); - AIndex2 := IndexOfEx(AValue2, AIndex1, Count - 1); -end; - -procedure TcxExportScale.GetPositionEx(AValue1, AValue2, - AFirstIndex, ALastIndex: Integer; out AIndex1, AIndex2: Integer); -begin - AIndex1 := IndexOfEx(AValue1, AFirstIndex, ALastIndex); - AIndex2 := IndexOfEx(AValue2, AIndex1, ALastIndex); -end; - -function TcxExportScale.GetVisibleCount: Integer; -begin - Result := Count; - Dec(Result); -end; - -function TcxExportScale.GetDelta(AIndex: Integer): Integer; -begin - Result := Integer(List^[AIndex + 1]) - Integer(List^[AIndex]); -end; - -function GetCurrencyFormat: string; - - function GetCharString(C: Char; ACount: Integer): string; - var - I: Integer; - begin - Result := ''; - for I := 1 to ACount do - Result := Result + C; - end; - - function GetPositiveCurrencyFormat(const AFormat, ACurrStr: string): string; - begin - if Length(ACurrStr) > 0 then - case Sysutils.CurrencyFormat of - 0: Result := ACurrStr + AFormat; { '$1' } - 1: Result := AFormat + ACurrStr; { '1$' } - 2: Result := ACurrStr + ' ' + AFormat; { '$ 1' } - 3: Result := AFormat + ' ' + ACurrStr; { '1 $' } - end; - end; - - function GetNegativeCurrencyFormat(const AFormat, ACurrStr: string): string; - begin - case Sysutils.NegCurrFormat of - 0: Result := '(' + ACurrStr + AFormat + ')'; - 1: Result := '-' + ACurrStr + AFormat; - 2: Result := ACurrStr + '-' + AFormat; - 3: Result := ACurrStr + AFormat + '-'; - 4: Result := '(' + AFormat + ACurrStr + ')'; - 5: Result := '-' + AFormat + ACurrStr; - 6: Result := AFormat + '-' + ACurrStr; - 7: Result := AFormat + ACurrStr + '-'; - 8: Result := '-' + AFormat + ' ' + ACurrStr; - 9: Result := '-' + ACurrStr + ' ' + AFormat; - 10: Result := AFormat + ' ' + ACurrStr + '-'; - 11: Result := ACurrStr + ' ' + AFormat + '-'; - 12: Result := ACurrStr + ' ' + '-' + AFormat; - 13: Result := AFormat + '-' + ' ' + ACurrStr; - 14: Result := '(' + ACurrStr + ' ' + AFormat + ')'; - 15: Result := '(' + AFormat + ' ' + ACurrStr + ')'; - end; - end; - -var - ACurrStr: string; - I: Integer; - C: Char; -begin - if CurrencyDecimals > 0 then - Result := GetCharString('0', CurrencyDecimals) - else - Result := ''; - Result := ',0.' + Result; - ACurrStr := ''; - for I := 1 to Length(CurrencyString) do - begin - C := CurrencyString[I]; - if (C = ',') or (C = '.') then - ACurrStr := ACurrStr + '''' + C + '''' - else - ACurrStr := ACurrStr + C; - end; - Result := GetPositiveCurrencyFormat(Result, ACurrStr) + ';' + - GetNegativeCurrencyFormat(Result, ACurrStr); -end; - -procedure cxExportInit(AGetResString: TcxGetResourceStringProc; - AColorProc: Pointer; AIsNativeColor: Boolean); -begin - cxGetResString := AGetResString; - cxGetRgbColor := AColorProc; - IsNativeColor := AIsNativeColor; - cxUnicodeSupported := IsWin2KOrLater; -{$IFDEF WIN32} - cxWindowColor := Windows.GetSysColor(COLOR_WINDOW); - cxBtnTextColor := Windows.GetSysColor(COLOR_BTNTEXT); - cxBtnFaceColor := Windows.GetSysColor(COLOR_BTNFACE); - cxBtnShadowColor := Windows.GetSysColor(COLOR_BTNSHADOW); -{$ELSE} - cxWindowColor := cxColorToRGB(clWindow); - cxBtnTextColor := cxColorToRGB(clBtnText); - cxBtnFaceColor := cxColorToRGB(clBtnFace); - cxBtnShadowColor := ColorToRGB(clBtnShadow); -{$ENDIF} - FreeAndNil(StylesCache); - StylesCache := TStringList.Create; - DefaultCellStyle := CreateDefaultCellStyle; - cxExportCurrencyFormat := GetCurrencyFormat; -end; - -initialization - StylesCache := nil; - -finalization - FreeAndNil(StylesCache); - -end. diff --git a/internal/x.46/ExpressExport Library/Sources/cxExportStrs.pas b/internal/x.46/ExpressExport Library/Sources/cxExportStrs.pas deleted file mode 100644 index bf0548d5..00000000 --- a/internal/x.46/ExpressExport Library/Sources/cxExportStrs.pas +++ /dev/null @@ -1,106 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ ExpressExport } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEXPORT AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit cxExportStrs; - -{$I cxVer.inc} - -interface - -resourcestring - scxUnsupportedExport = 'Unsupported export type: %1'; - scxStyleManagerKill = 'The Style Manager is currently being used elsewhere and can not be released at this stage'; - scxStyleManagerCreate = 'Can''t create style manager'; - - scxExportToHtml = 'Export to Web page (*.html)'; - scxExportToXml = 'Export to XML document (*.xml)'; - scxExportToText = 'Export to text format (*.txt)'; - - scxEmptyExportCache = 'Export cache is empty'; - scxIncorrectUnion = 'Incorrect union of cells'; - scxIllegalWidth = 'Illegal width of the column'; - scxInvalidColumnRowCount = 'Invalid column or row count'; - scxIllegalHeight = 'Illegal height of the row'; - scxInvalidColumnIndex = 'The column index %d out of bounds'; - scxInvalidRowIndex = 'The row index %d out of bounds'; - scxInvalidStyleIndex = 'Invalid style index %d'; - - scxExportToExcel = 'Export to MS Excel (*.xls)'; - scxWorkbookWrite = 'Error write XLS file'; - scxInvalidCellDimension = 'Invalid cell dimension'; - scxBoolTrue = 'True'; - scxBoolFalse = 'False'; - -implementation - -uses - dxCore; - - procedure AddExpressExportResourceStringNames(AProduct: TdxProductResourceStrings); - - procedure InternalAdd(const AResourceStringName: string; AAdress: Pointer); - begin - AProduct.Add(AResourceStringName, AAdress); - end; - -begin - InternalAdd('scxUnsupportedExport', @scxUnsupportedExport); - InternalAdd('scxStyleManagerKill', @scxStyleManagerKill); - InternalAdd('scxStyleManagerCreate', @scxStyleManagerCreate); - InternalAdd('scxExportToHtml', @scxExportToHtml); - InternalAdd('scxExportToXml', @scxExportToXml); - InternalAdd('scxExportToText', @scxExportToText); - InternalAdd('scxEmptyExportCache', @scxEmptyExportCache); - InternalAdd('scxIncorrectUnion', @scxIncorrectUnion); - InternalAdd('scxIllegalWidth', @scxIllegalWidth); - InternalAdd('scxInvalidColumnRowCount', @scxInvalidColumnRowCount); - InternalAdd('scxIllegalHeight', @scxIllegalHeight); - InternalAdd('scxInvalidColumnIndex', @scxInvalidColumnIndex); - InternalAdd('scxInvalidRowIndex', @scxInvalidRowIndex); - InternalAdd('scxInvalidStyleIndex', @scxInvalidStyleIndex); - InternalAdd('scxExportToExcel', @scxExportToExcel); - InternalAdd('scxWorkbookWrite', @scxWorkbookWrite); - InternalAdd('scxInvalidCellDimension', @scxInvalidCellDimension); - InternalAdd('scxBoolTrue', @scxBoolTrue); - InternalAdd('scxBoolFalse', @scxBoolFalse); -end; - -initialization - dxResourceStringsRepository.RegisterProduct('ExpressExport', @AddExpressExportResourceStringNames); - -finalization - dxResourceStringsRepository.UnRegisterProduct('ExpressExport'); - -end. diff --git a/internal/x.46/ExpressExport Library/Sources/cxHtmlXmlTxtExport.pas b/internal/x.46/ExpressExport Library/Sources/cxHtmlXmlTxtExport.pas deleted file mode 100644 index 77ce4fa4..00000000 --- a/internal/x.46/ExpressExport Library/Sources/cxHtmlXmlTxtExport.pas +++ /dev/null @@ -1,1771 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ ExpressExport } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEXPORT AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxHtmlXmlTxtExport; - -{$I cxVer.inc} - -interface -uses - SysUtils, Math, Classes, - Windows, -{$IFDEF DELPHI6} Variants, {$IFNDEF NONDB} FMTBcd, SqlTimSt, {$ENDIF} {$ENDIF} - cxExport, cxExportStrs, Graphics; - -const - CharsetTag: string = {$IFDEF DELPHI12}' charset=utf-8' {$ELSE} '' {$ENDIF}; - EncodingTag: string = ''; - -type - { TcxCustomHtmlXmlTXTExportProvider } - TcxCustomHtmlXmlTXTExportProvider = class(TcxCustomExportProvider, IcxExportProvider) - private - FCache: array of array of TcxCacheItem; - FColumns: array of Integer; - FDefaultStyle: TcxCacheCellStyle; - FInternalCacheList: TInterfaceList; - FName: string; - FRows: array of Integer; - FStyleManager: TcxExportStyleManager; - function GetCacheItem(ACol, ARow: Integer): TcxCacheItem; - function GetCellHeight(ACol, ARow: Integer): Integer; - function GetCellWidth(ACol, ARow: Integer): Integer; - function GetColumns(ACol: Integer): Integer; - function GetDefaultStyle: PcxCacheCellStyle; - function GetHeight: Integer; - function GetInternalCacheCount: Integer; - function GetInternalCacheItems(AIndex: Integer): IcxCellInternalCache; - function GetRows(ARow: Integer): Integer; - function GetStyleCount: Integer; - function GetWidth: Integer; - procedure TestIndex(ACol, ARow: Integer); - procedure TestCol(ACol: Integer); - procedure TestRow(ARow: Integer); - procedure TestStyleIndex(AStyleIndex: Integer); - protected - procedure Clear; override; - function GetCellData(const ACol, ARow: Integer; var AData): Boolean; - procedure SetData(const ACol, ARow, ADataSize, ADataType: Integer; const AData); - procedure SetEmptyData(const ACol, ARow, ADataType: Integer); - procedure Commit; dynamic; - function GetCacheName: string; - function GetCellStyle(const ACol, ARow: Integer): PcxCacheCellStyle; - function GetExportType: Integer; - function GetExportName: string; - function GetStyle(AStyleIndex: Integer): PcxCacheCellStyle; - function RegisterStyle(const AStyle: TcxCacheCellStyle): Integer; - procedure SetCellDataString(const ACol, ARow: Integer; const AText: string); virtual; - procedure SetCellDataAnsiString(const ACol, ARow: Integer; const AText: AnsiString); virtual; - procedure SetCellDataWideString(const ACol, ARow: Integer; const AText: WideString); virtual; - procedure SetCellDataDouble(const ACol, ARow: Integer; const AValue: Double); virtual; - procedure SetCellDataInteger(const ACol, ARow: Integer; const AValue: Integer); virtual; - procedure SetCellStyle(const ACol, ARow, AStyleIndex: Integer); overload; virtual; - procedure SetCellStyle(const ACol, ARow, AExampleCol, AExampleRow: Integer); overload; virtual; - procedure SetCellStyle(const ACol, ARow: Integer; const AStyle: TcxCacheCellStyle); overload; virtual; - procedure SetCellStyleEx(const ACol, ARow, H, W: Integer; const AStyleIndex: Integer); - procedure SetCellUnion(const ACol, ARow: Integer; H, W: Integer); - procedure SetCellValue(const ACol, ARow: Integer; const AValue: Variant); - procedure SetColumnWidth(const ACol, AWidth: Integer); - procedure SetDefaultStyle(const AStyle: TcxCacheCellStyle); - procedure SetRange(const AColCount, ARowCount: Integer; IsVisible: Boolean = True); - procedure SetRowHeight(const ARow, AHeight: Integer); - // export graphic extension - procedure SetCellDataGraphic(const ACol, ARow: Integer; var AGraphic: TGraphic); - function SupportGraphic: Boolean; virtual; - - property Cache[ACol, ARow: Integer]: TcxCacheItem read GetCacheItem; - property Columns[ACol: Integer]: Integer read GetColumns; - property DefaultStyle: PcxCacheCellStyle read GetDefaultStyle; - property RowCount: Integer read GetHeight; - property InternalCacheCount: Integer read GetInternalCacheCount; - property InternalCacheItems[AIndex: Integer]: IcxCellInternalCache read GetInternalCacheItems; - property Name: string read FName write FName; - property Rows[ARow: Integer]: Integer read GetRows; - property StyleCount: Integer read GetStyleCount; - property Styles[AIndex: Integer]: PcxCacheCellStyle read GetStyle; - property CellHeight[ACol, ARow: Integer]: Integer read GetCellHeight; - property CellWidth[ACol, ARow: Integer]: Integer read GetCellWidth; - property ColCount: Integer read GetWidth; - public - constructor Create(const AFileName: string); override; - destructor Destroy; override; - end; - - { TcxCustomExportProviderSupportedCellInternalChache } - TcxCustomExportProviderSupportedCellInternalChache = class(TcxCustomHtmlXmlTXTExportProvider, IcxCellInternalCache) - protected - procedure CommitCache(AStream: TStream; AParam: Pointer); virtual; - procedure CommitStyle(AStream: TStream; AParam: Pointer); virtual; - procedure DeleteCacheFromCell(const ACol, ARow: Integer); - procedure SetCacheIntoCell(const ACol, ARow: Integer; ACache: IcxCellInternalCache); - procedure SetEmptyCellsStyle; - end; - - { TcxHTMLExportProvider } - TcxHTMLExportProvider = class(TcxCustomExportProviderSupportedCellInternalChache) - private - procedure CommitHTML(AStream: TStream); - function GetStyle(AStyle: TcxCacheCellStyle): string; - function GetScaleRow: string; - protected - procedure CommitCache(AStream: TStream; AParam: Pointer); override; - procedure CommitStyle(AStream: TStream; AParam: Pointer); override; - function GetContentWidth: Integer; - public - procedure Commit; override; - class function ExportType: Integer; override; - class function ExportName: string; override; - end; - - { TcxXMLExportProvider } - TcxXMLExportProvider = class(TcxCustomExportProviderSupportedCellInternalChache) - private - FHideDotsOn: Boolean; - FXSLFileName: WideString; - procedure CommitXML(AStream: TStream); - procedure CommitXSL(AStream: TStream); - function ConvertTextToXML(const AText: string; ACol, ARow: Integer): string; - function GetBorderStyle(AStyle: TcxCacheCellStyle): string; - function GetCellParams(ACol, ARow: Integer): string; - function GetData(ACol, ARow: Integer): string; - function GetStyle(AStyle: TcxCacheCellStyle): string; - procedure HideDots; - function GetScaleLine: string; - protected - procedure CommitCache(AStream: TStream; AParam: Pointer); override; - procedure CommitStyle(AStream: TStream; AParam: Pointer); override; - public - constructor Create(const AFileName: string); override; - procedure Commit; override; - class function ExportType: Integer; override; - class function ExportName: string; override; - end; - - { TcxTXTExportProvider } - TcxTXTExportProvider = class(TcxCustomExportProviderSupportedCellInternalChache, IcxExportWithSeparators) - private - FBeginString: string; - FColMaxWidth: array of Integer; - FEndString: string; - FIndex: Integer; - FSeparator: string; - procedure CalculateColMaxWidth; - function GetData(ACol, ARow: Integer): string; - protected - procedure AddSeparator(const ASeparator: string); - procedure CommitCache(AStream: TStream; AParam: Pointer); override; - function SupportGraphic: Boolean; override; - public - constructor Create(const AFileName: string); override; - procedure Commit; override; - class function ExportType: Integer; override; - class function ExportName: string; override; - end; - -const - cxXMLEmptyChar = '.'; - cxExportDefaultEmptyString: string = ' '; - -implementation - -uses - dxCore; - -function HasBorders(ACellStyle: PcxCacheCellStyle): Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to 3 do - Result := Result or (ACellStyle.Borders[I].Width > 0); -end; - -function DirExist(const ADirectory: string): Boolean; -{$IFNDEF DELPHI6} -var - ACode: Integer; -{$ENDIF} -begin -{$IFDEF DELPHI6} - Result := DirectoryExists(ADirectory); -{$ELSE} - ACode := GetFileAttributes(PChar(ADirectory)); - Result := (ACode <> -1) and (FILE_ATTRIBUTE_DIRECTORY and ACode <> 0); -{$ENDIF} -end; - -function GraphicNeeded(const ADir, AGraphicData: AnsiString; AddTags: Boolean = True): string; -var - F: File; - AGraphicStream: AnsiString; -begin - GetTextAsGraphicStream(AGraphicData, Result, AGraphicStream); - if not DirExist(ExtractFileDir(Result)) then - CreateDir(ExtractFileDir(Result)); - AssignFile(F, Result); - Rewrite(F, 1); - try - BlockWrite(F, AGraphicStream[1], Length(AGraphicStream)); - finally - CloseFile(F); - end; - Delete(Result, 1, Length(ADir)); - while Pos('\', Result) <> 0 do - Result[Pos('\', Result)] := '/'; - if AddTags then - Result := ''; -end; - -function GetHTMLColor(AColor: Integer): string; -begin - Result := Format('rgb(%d,%d,%d)', [GetRValue(AColor), GetGValue(AColor), GetBValue(AColor)]); -end; - -function ConvertCRLFSymbols(const AString: string): string; -var - I: Integer; -begin - Result := ''; - for I := 1 to Length(AString) do - begin - if AString[I] = #13 then - begin - if I < Length(AString) then - if AString[I + 1] = #10 then - begin - Result := Result + '
'; - Continue; - end; - end - else if AString[I] = #10 then - begin - if I > 1 then - begin - if AString[I - 1] <> #13 then - Result := Result + '
'; - end - else - Result := Result + '
'; - Continue; - end; - Result := Result + AString[I]; - end; -end; - -function ConvertSpecialCharacters(const AString: string): string; -var - I: Integer; -begin - Result := ''; - for I := 1 to Length(AString) do - begin - if AString[I] = '<' then - Result := Result + '<' - else if AString[I] = '>' then - Result := Result + '>' - else if AString[I] = '&' then - Result := Result + '&' - else if AString[I] = '"' then - Result := Result + '"' - else - Result := Result + AString[I]; - end; -end; - -function CheckedUnicodeString(const S: string; ACharset: Integer = 0): string; -var - I: Integer; - W: WideString; -begin - if cxStrUnicodeNeeded(S, True) then - begin - W := cxStrToUnicode(S, ACharset); - Result := ''; - for I := 1 to Length(W) do - Result := Result + '&#' + IntToStr(Integer(W[I])) + ';'; - end - else - Result := S; -end; - -function CheckedUnicodeStringW(const S: WideString): string; -var - I: Integer; -begin - if cxUnicodeSupported then - begin - Result := ''; - for I := 1 to Length(S) do - Result := Result + '&#' + IntToStr(Integer(S[I])) + ';'; - end - else - Result := cxUnicodeToStr(S); -end; - -{ TcxCustomHtmlXmlTXTExportProvider } -constructor TcxCustomHtmlXmlTXTExportProvider.Create(const AFileName: string); -begin - inherited Create(AFileName); - FDefaultStyle := DefaultCellStyle; - FInternalCacheList := TInterfaceList.Create; - FStyleManager := TcxExportStyleManager.GetInstance(AFileName); - FName := ''; - UseGraphicImages(True); -end; - -destructor TcxCustomHtmlXmlTXTExportProvider.Destroy; -begin - UseGraphicImages(False); - FInternalCacheList.Free; - FStyleManager.Clear; - inherited Destroy; -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.Clear; -var - I, J: Integer; -begin - for I := 0 to Length(FCache) - 1 do - for J := 0 to Length(FCache[I]) - 1 do - try - with FCache[I, J] do - ReallocMem(FCache[I, J].Data, 0); - finally - FCache[I, J].Data := nil; - FCache[I, J].InternalCache.Cache := nil; - FCache[I, J].InternalCache.Index := -1; - end; - - FInternalCacheList.Clear; - SetLength(FCache, 0, 0); - SetLength(FColumns, 0); - SetLength(FRows, 0); -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetCacheName: string; -begin - Result := FName; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetCellData(const ACol, ARow: Integer; var AData): Boolean; -begin - TestIndex(ACol, ARow); - - with FCache[ACol, ARow] do - begin - Result := Data <> nil; - if Result then - Move(Data^, AData, DataSize); - end; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetCellStyle(const ACol, - ARow: Integer): PcxCacheCellStyle; -begin - TestIndex(ACol, ARow); - with FCache[ACol, ARow] do - begin - if StyleIndex < 0 then - Result := @FDefaultStyle - else - Result := FStyleManager.GetStyle(StyleIndex); - end; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetExportType: Integer; -begin - Result := ExportType; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetExportName: string; -begin - Result := ExportName; -end; - -function TcxCustomHtmlXmlTXTExportProvider.RegisterStyle(const AStyle: TcxCacheCellStyle): Integer; -begin - Result := FStyleManager.RegisterStyle(AStyle) -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellDataString(const ACol, ARow: Integer; const AText: string); -const - ADataTypeMap: array[Boolean] of Integer = (cxDataTypeString, cxDataTypeWideString); -var - ADataType: Integer; -begin - ADataType := ADataTypeMap[SizeOf(Char) > 1]; - - if AText <> '' then - SetData(ACol, ARow, dxStringSize(AText), ADataType, AText[1]) - else - SetEmptyData(ACol, ARow, ADataType); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellDataAnsiString(const ACol, ARow: Integer; const AText: AnsiString); -begin - if AText <> '' then - SetData(ACol, ARow, Length(AText), cxDataTypeString, AText[1]) - else - SetEmptyData(ACol, ARow, cxDataTypeString); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellDataWideString(const ACol, ARow: Integer; const AText: WideString); -begin - if AText <> '' then - SetData(ACol, ARow, Length(AText) * SizeOf(Char), cxDataTypeWideString, AText[1]) - else - SetEmptyData(ACol, ARow, cxDataTypeWideString); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellDataDouble(const ACol, ARow: Integer; const AValue: Double); -begin - SetData(ACol, ARow, Sizeof(Double), cxDataTypeDouble, AValue); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellDataInteger(const ACol, ARow: Integer; const AValue: Integer); -begin - SetData(ACol, ARow, Sizeof(Integer), cxDataTypeInteger, AValue); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellStyle(const ACol, ARow, AStyleIndex: Integer); -begin - TestIndex(ACol, ARow); - TestStyleIndex(AStyleIndex); - - FCache[ACol, ARow].StyleIndex := AStyleIndex; -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellStyle(const ACol, ARow, AExampleCol, - AExampleRow: Integer); -begin - TestIndex(ACol, ARow); - TestIndex(AExampleCol, AExampleRow); - - FCache[ACol, ARow].StyleIndex := FCache[AExampleCol, AExampleRow].StyleIndex; -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellStyle(const ACol, ARow: Integer; - const AStyle: TcxCacheCellStyle); -begin - TestIndex(ACol, ARow); - - FCache[ACol, ARow].StyleIndex := RegisterStyle(AStyle); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellStyleEx( - const ACol, ARow, H, W: Integer; const AStyleIndex: Integer); -begin - SetCellStyle(ACol, ARow, AStyleIndex); - SetCellUnion(ACol, ARow, H, W); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellUnion(const ACol, ARow: Integer; - H, W: Integer); -var - I, J: Integer; -begin - TestIndex(ACol, ARow); - W := Min(W, Length(FCache) - ACol); - if W < 1 then - W := 1; - H := Min(H, Length(FCache[ACol]) - ARow); - if H < 1 then - H := 1; - with FCache[ACol, ARow] do - begin - IsUnion := True; - Height := H; - Width := W; - for I := ACol to ACol + Width - 1 do - for J := ARow to ARow + Height - 1 do - FCache[I, J].IsHidden := not ((I = ACol) and (J = ARow)); - end; -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellValue(const ACol, - ARow: Integer; const AValue: Variant); -var -{$IFDEF DELPHI6} - {$IFNDEF NONDB} - ACurr: Currency; - {$ENDIF} -{$ENDIF} - AText: string; -begin - if VarIsNull(AValue) then - AText := '' - else - if TVarData(AValue).VType = varCurrency then - AText := FormatFloat(cxExportCurrencyFormat, Currency(AValue)) - else -{$IFDEF DELPHI6} - {$IFNDEF NONDB} - if TVarData(AValue).VType = VarSQLTimeStamp then - AText := DateTimeToStr(AValue) - else - if TVarData(AValue).VType = VarFMTBcd then - begin - if BcdToCurr(VarToBcd(AValue), ACurr) then - AText := FormatFloat(cxExportCurrencyFormat, ACurr) - else - AText := FloatToStr(Double(BcdToDouble(VarToBcd(AValue)))); - end - else - {$ENDIF} -{$ENDIF} - AText := AValue; - SetCellDataString(ACol, ARow, AText); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetColumnWidth(const ACol, AWidth: Integer); -begin - TestCol(ACol); - if AWidth < 0 then - raise EcxExportData.Create(cxGetResString(@scxIllegalWidth)); - FColumns[ACol] := Abs(AWidth); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetDefaultStyle(const AStyle: TcxCacheCellStyle); -begin - FDefaultStyle := AStyle; -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetData(const ACol, ARow, ADataSize, - ADataType: Integer; const AData); -begin - TestIndex(ACol, ARow); - - with FCache[ACol, ARow] do - begin - ReallocMem(Data, ADataSize); - Move(AData, Data^, ADataSize); - DataSize := ADataSize; - DataType := ADataType; - end; -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetEmptyData(const ACol, ARow, ADataType: Integer); -begin - TestIndex(ACol, ARow); - - with FCache[ACol, ARow] do - begin - ReallocMem(Data, 0); - Data := nil; - DataSize := 0; - DataType := ADataType; - end; -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.Commit; -begin -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetRange(const AColCount, ARowCount: Integer; - IsVisible: Boolean); -var - I, J, K: Integer; - ABorderWidth: Integer; -begin - if (AColCount <= 0) or (ARowCount <= 0) then - raise EcxExportData.Create(cxGetResString(@scxInvalidColumnRowCount)); - - SetLength(FCache, AColCount, ARowCount); - SetLength(FColumns, AColCount); - SetLength(FRows, ARowCount); - for I := 0 to ColCount - 1 do - begin - FColumns[I] := 0; - for J := 0 to RowCount - 1 do - begin - with FCache[I, J] do - begin - IsHidden := False; - IsUnion := False; - Height := 1; - Width := 1; - Data := nil; - InternalCache.Cache := nil; - InternalCache.Index := -1; - SetCellStyle(I, J, -1); - end; - end; - end; - if IsVisible then - ABorderWidth := 1 - else - ABorderWidth := 0; - for K := 0 to 3 do - FDefaultStyle.Borders[K].Width := ABorderWidth; - for I := 0 to RowCount - 1 do - FRows[I] := 0; -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetRowHeight(const ARow, AHeight: Integer); -begin - TestRow(ARow); - if AHeight < 0 then - raise EcxExportData.Create(cxGetResString(@scxIllegalHeight)); - - FRows[ARow] := AHeight; -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.SetCellDataGraphic( - const ACol, ARow: Integer; var AGraphic: TGraphic); -var - AGraphicText: AnsiString; -begin - GetGraphicAsText(cxUnicodeToStr(FileName), AGraphic, AGraphicText); - SetData(ACol, ARow, Length(AGraphicText), cxDataTypeGraphic, AGraphicText[1]); -end; - -function TcxCustomHtmlXmlTXTExportProvider.SupportGraphic: Boolean; -begin - Result := True; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetCacheItem(ACol, ARow: Integer): TcxCacheItem; -begin - TestIndex(ACol, ARow); - - Result := FCache[ACol, ARow]; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetCellHeight(ACol, ARow: Integer): Integer; -var - I: Integer; -begin - TestIndex(ACol, ARow); - - if FCache[ACol, ARow].IsUnion then - begin - Result := 0; - for I := 0 to FCache[ACol, ARow].Height - 1 do - Inc(Result, Rows[ARow + I]); - end - else - Result := Rows[ARow]; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetCellWidth(ACol, ARow: Integer): Integer; -var - I: Integer; -begin - TestIndex(ACol, ARow); - - if FCache[ACol, ARow].IsUnion then - begin - Result := 0; - for I := 0 to FCache[ACol, ARow].Width - 1 do - Inc(Result, Columns[ACol + I]); - end - else - Result := Columns[ACol]; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetColumns(ACol: Integer): Integer; -begin - TestCol(ACol); - - Result := FColumns[ACol]; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetDefaultStyle: PcxCacheCellStyle; -begin - Result := @FDefaultStyle; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetHeight: Integer; -begin - Result := Length(FRows); -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetInternalCacheCount: Integer; -begin - Result := FInternalCacheList.Count; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetInternalCacheItems( - AIndex: Integer): IcxCellInternalCache; -begin - Result := FInternalCacheList[AIndex] as IcxCellInternalCache; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetRows(ARow: Integer): Integer; -begin - TestRow(ARow); - - Result := FRows[ARow]; -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetStyle(AStyleIndex: Integer): PcxCacheCellStyle; -begin - TestStyleIndex(AStyleIndex); - if AStyleIndex < 0 then - Result := @FDefaultStyle - else - Result := FStyleManager.GetStyle(AStyleIndex); -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetWidth: Integer; -begin - Result := Length(FColumns); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.TestIndex(ACol, ARow: Integer); -begin - TestCol(ACol); - TestRow(ARow); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.TestCol(ACol: Integer); -begin - if (ACol < 0) or (ACol >= Length(FCache)) then - raise EcxExportData.CreateFmt(cxGetResString(@scxInvalidColumnIndex), [ACol]); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.TestRow(ARow: Integer); -begin - if (ARow < 0) or (ARow >= Length(FCache[0])) then - raise EcxExportData.CreateFmt(cxGetResString(@scxInvalidRowIndex), [ARow]); -end; - -procedure TcxCustomHtmlXmlTXTExportProvider.TestStyleIndex(AStyleIndex: Integer); -begin - if AStyleIndex >= FStyleManager.Count then - raise EcxExportData.CreateFmt(cxGetResString(@scxInvalidStyleIndex), [AStyleIndex]); -end; - -function TcxCustomHtmlXmlTXTExportProvider.GetStyleCount: Integer; -begin - Result := FStyleManager.Count; -end; - -{ TcxCustomExportProviderSupportedCellInternalChache } - -procedure TcxCustomExportProviderSupportedCellInternalChache.CommitCache( - AStream: TStream; AParam: Pointer); -begin - SetEmptyCellsStyle; -end; - -procedure TcxCustomExportProviderSupportedCellInternalChache.CommitStyle( - AStream: TStream; AParam: Pointer); -begin -end; - -procedure TcxCustomExportProviderSupportedCellInternalChache.DeleteCacheFromCell( - const ACol, ARow: Integer); -begin - SetCacheIntoCell(ACol, ARow, nil); -end; - -procedure TcxCustomExportProviderSupportedCellInternalChache.SetCacheIntoCell( - const ACol, ARow: Integer; ACache: IcxCellInternalCache); -begin - TestIndex(ACol, ARow); - if ACache <> nil then - begin - if FCache[ACol, ARow].InternalCache.Cache <> nil then - SetCacheIntoCell(ACol, ARow, nil); - FCache[ACol, ARow].InternalCache.Cache := ACache; - FCache[ACol, ARow].InternalCache.Index := FInternalCacheList.Add(ACache); - end - else - begin - if FCache[ACol, ARow].InternalCache.Cache <> nil then - begin - FCache[ACol, ARow].InternalCache.Cache := nil; - FInternalCacheList.Delete(FCache[ACol, ARow].InternalCache.Index); - FCache[ACol, ARow].InternalCache.Index := -1; - end; - end; -end; - -procedure TcxCustomExportProviderSupportedCellInternalChache.SetEmptyCellsStyle; -var - I, J: Integer; - ACell: TcxCacheItem; - ANewStyle: TcxCacheCellStyle; -begin - for I := 0 to RowCount - 1 do - for J := 0 to ColCount - 1 do - begin - ACell := Cache[J, I]; - if not (ACell.DataType in [0,1]) or (ACell.DataSize <> 0) or (GetCellStyle(J, I) = nil) then Continue; - begin - ANewStyle := GetCellStyle(J, I)^; - ANewStyle.FontSize := 1; - SetCellStyle(J, I, ANewStyle); - end; - end; -end; - -{ TcxHTMLExportProvider } -procedure TcxHTMLExportProvider.Commit; -var - AStream: TFileStream; -begin - AStream := cxFileStreamClass.Create(cxUnicodeToStr(FileName), fmCreate); - try - CommitHTML(AStream); - finally - AStream.Free; - end; -end; - -class function TcxHTMLExportProvider.ExportType: Integer; -begin - Result := cxExportToHTML; -end; - -class function TcxHTMLExportProvider.ExportName: string; -begin - Result := cxGetResString(@scxExportToHTML); -end; - -procedure TcxHTMLExportProvider.CommitCache(AStream: TStream; AParam: Pointer); -var - ABuffer: string; - ADisplayValue: string; - AStringValue: AnsiString; - AWideStringValue: WideString; - ADoubleValue: Double; - AIntegerValue: Integer; - I, J: Integer; - ACellStyle: PcxCacheCellStyle; -begin - inherited CommitCache(AStream, AParam); - ABuffer := ABuffer + Format(''#13#10, [GetContentWidth]); - ABuffer := ABuffer + GetScaleRow + #13#10; - for I := 0 to RowCount - 1 do - begin - ABuffer := ABuffer + ''#13#10; - for J := 0 to ColCount - 1 do - begin - ACellStyle := GetCellStyle(J, I); - ADisplayValue := ''; - with Cache[J, I] do - begin - if IsHidden then - Continue; - - if IsUnion then - begin - ABuffer := ABuffer + ' 1 then - ABuffer := ABuffer + ' COLSPAN=' + IntToStr(Width); - if Height > 1 then - ABuffer := ABuffer + ' ROWSPAN=' + IntToStr(Height); - end - else - ABuffer := ABuffer + ''; - - if Cache[J, I].InternalCache.Cache <> nil then - begin - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); - ABuffer := ''; - ADisplayValue := ''; - Cache[J, I].InternalCache.Cache.CommitCache(AStream, nil); - end - else - begin - if Cache[J, I].DataType = cxDataTypeGraphic then - begin - SetLength(AStringValue, Cache[J, I].DataSize); - GetCellData(J, I, AStringValue[1]); - ADisplayValue := GraphicNeeded(dxStringToAnsiString(ExtractFilePath(FileName)), AStringValue); - end - else - if Cache[J, I].DataType = cxDataTypeString then - begin - if Cache[J, I].DataSize > 0 then - begin - SetLength(AStringValue, Cache[J, I].DataSize); - if GetCellData(J, I, AStringValue[1]) then - ADisplayValue := ConvertCRLFSymbols(ConvertSpecialCharacters(dxAnsiStringToString(AStringValue))) - end - end - else if Cache[J, I].DataType = cxDataTypeWideString then - begin - if Cache[J, I].DataSize > 0 then - begin - SetLength(AWideStringValue, Cache[J, I].DataSize div SizeOf(Char)); - if GetCellData(J, I, AWideStringValue[1]) then - ADisplayValue := ConvertCRLFSymbols(ConvertSpecialCharacters(AWideStringValue)) - end - end - else if Cache[J, I].DataType = cxDataTypeDouble then - begin - if GetCellData(J, I, ADoubleValue) then - ADisplayValue := FloatToStr(ADoubleValue) - end - else if Cache[J, I].DataType = cxDataTypeInteger then - begin - if GetCellData(J, I, AIntegerValue) then - ADisplayValue := IntToStr(AIntegerValue) - end - end; - end; - if ADisplayValue = '' then - ADisplayValue := cxExportDefaultEmptyString; - ABuffer := ABuffer + ADisplayValue + ''#13#10; - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); - ABuffer := ''; - end; - ABuffer := ABuffer + ''#13#10; - - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); - ABuffer := ''; - end; - ABuffer := ABuffer + '
'#13#10; - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); -end; - -procedure TcxHTMLExportProvider.CommitStyle(AStream: TStream; AParam: Pointer); -var - ABuffer: string; - I: Integer; -begin - SetEmptyCellsStyle; - for I := 0 to FStyleManager.Count - 1 do - begin - ABuffer := ABuffer + '.Style' + IntToStr(I) + ' {' + - GetStyle(FStyleManager[I]) + '}' + #13#10#13#10 ; - end; - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); -end; - -function TcxHTMLExportProvider.GetContentWidth: Integer; -var - J: Integer; -begin - Result := 0; - for J := 0 to ColCount - 1 do - Inc(Result, Columns[J]); -end; - -procedure TcxHTMLExportProvider.CommitHTML(AStream: TStream); -var - ABuffer: string; -begin - dxWriteStandardEncodingSignature(AStream); - ABuffer := ''; - ABuffer := ABuffer + #13#10 + ''#13#10 + - ''#13#10 + '' + FileName + ''#13#10 + - '' + #13#10 + - ''#13#10 + - ''#13#10 + ''#13#10; - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); - ABuffer := ''; - - CommitCache(AStream, nil); - - ABuffer := ABuffer + ''#13#10 + ''; - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); -end; - -function TcxHTMLExportProvider.GetStyle(AStyle: TcxCacheCellStyle): string; -var - ABorderWidth: array[0..3] of Integer; - ABorderColor: array[0..3] of Integer; - I: Integer; -begin - Result := ''; - with AStyle do - begin - for I := 0 to 3 do - begin - if Borders[I].IsDefault then - begin - ABorderWidth[I] := 0; - ABorderColor[I] := 0; - end - else - begin - ABorderWidth[I] := Borders[I].Width; - ABorderColor[I] := Borders[I].Color; - end; - end; - Result := Result + ' border-style: solid;'; - if FontSize = 1 then - Result := Result + 'padding:0px;' - else - Result := Result + ' padding:3;'; - Result := Result + ' border-left-width: ' + IntToStr(ABorderWidth[0]) + ';'; - Result := Result + ' border-top-width: ' + IntToStr(ABorderWidth[1]) + ';'; - Result := Result + ' border-right-width: ' + IntToStr(ABorderWidth[2]) + ';'; - Result := Result + ' border-bottom-width: ' + IntToStr(ABorderWidth[3]) + ';'; - Result := Result + ' border-left-color: ' + GetHTMLColor(ABorderColor[0]) + ';'; - Result := Result + ' border-top-color: ' + GetHTMLColor(ABorderColor[1]) + ';'; - Result := Result + ' border-right-color: ' + GetHTMLColor(ABorderColor[2]) + ';'; - Result := Result + ' border-bottom-color: ' + GetHTMLColor(ABorderColor[3]) + ';'; - Result := Result + ' font-family: ''' + PChar(@FontName) + ''';'; - Result := Result + ' mso-font-charset: ' + IntToStr(FontCharset) + ';'; - if cfsBold in FontStyle then - Result := Result + ' font-weight: bold;'; - if cfsItalic in FontStyle then - Result := Result + ' font-style: italic;'; - if cfsUnderline in FontStyle then - Result := Result + ' text-decoration: underline;' - else if cfsStrikeOut in FontStyle then - Result := Result + ' text-decoration: line-through;'; - Result := Result + ' font-size: ' + IntToStr(FontSize) + 'pt;'; - Result := Result + ' color: ' + GetHTMLColor(FontColor) + ';'; - Result := Result + ' background-color: ' + GetHTMLColor(BrushBkColor); - end; -end; - -function TcxHTMLExportProvider.GetScaleRow: string; -var - J: Integer; -begin - Result := ''#13#10; - for J := 0 to ColCount - 1 do - begin - Result := Result + ''; - Result := Result + ''#13#10; - end; - Result := Result + ''; -end; - -{ TcxXMLExportProvider } - -constructor TcxXMLExportProvider.Create(const AFileName: string); -begin - inherited Create(AFileName); - FHideDotsOn := True; - FXSLFileName := '_'; -end; - -procedure TcxXMLExportProvider.Commit; -var - AXMLStream: TFileStream; - AXSLStream: TFileStream; -begin - AXMLStream := cxFileStreamClass.Create(cxUnicodeToStr(FileName), fmCreate); - FXSLFileName := cxChangeFileExtExW(FileName, '.xsl'); - AXSlStream := cxFileStreamClass.Create(cxUnicodeToStr(FXSLFileName), fmCreate); - try - CommitXML(AXMLStream); - CommitXSL(AXSLStream); - finally - AXSlStream.Free; - AXMLStream.Free; - end; -end; - -class function TcxXMLExportProvider.ExportType: Integer; -begin - Result := cxExportToXML; -end; - -class function TcxXMLExportProvider.ExportName: string; -begin - Result := cxGetResString(@scxExportToXML); -end; - -procedure TcxXMLExportProvider.CommitCache(AStream: TStream; AParam: Pointer); -var - ABuffer: string; - I, J: Integer; - AValue: AnsiString; -begin - inherited CommitCache(AStream, AParam); - if FHideDotsOn then - begin - HideDots; - FHideDotsOn := False; - Exit; - end; - - ABuffer := ''#13#10; - - ABuffer := ABuffer + GetScaleLine; - for I := 0 to RowCount - 1 do - begin - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); - ABuffer := ''#13#10; - for J := 0 to ColCount - 1 do - begin - if Cache[J, I].IsHidden then - Continue; - - ABuffer := ABuffer + ''; - - with Cache[J, I] do - begin - if DataType = cxDataTypeGraphic then - begin - SetLength(AValue, DataSize); - GetCellData(J, I, AValue[1]); - AValue := dxStringToAnsiString(GraphicNeeded( - dxStringToAnsiString(ExtractFilePath(FileName)), AValue, False)); - ABuffer := ABuffer + ''; - end; - end; - - if Cache[J, I].InternalCache.Cache <> nil then - begin - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); - ABuffer := ''; - Cache[J, I].InternalCache.Cache.CommitCache(AStream, nil); - end - else - ABuffer := ABuffer + {''}; - ABuffer := ABuffer + ''#13#10; - end; - ABuffer := ABuffer + ''; - end; - - ABuffer := ABuffer + ''; - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); -end; - -procedure TcxXMLExportProvider.CommitStyle(AStream: TStream; AParam: Pointer); -var - I: Integer; - ABuffer: string; -begin - SetEmptyCellsStyle; - ABuffer := ''#13#10; - - for I := 0 to FStyleManager.Count - 1 do - begin - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); - ABuffer := ''#13#10 - end; - - ABuffer := ABuffer + ''#13#10; - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)) -end; - -procedure TcxXMLExportProvider.CommitXML(AStream: TStream); -var - ABuffer: string; - AFileExt: string; - AFileName: string; -begin - AFileName := FileName; - AFileExt := ExtractFileExt(AFileName); - if AFileExt <> '' then - Delete(AFileName, Length(AFileName) - Length(AFileExt) + 1, Length(AFileExt)); - dxWriteStandardEncodingSignature(AStream); - ABuffer := ''#13#10; - ABuffer := ABuffer + ''#13#10; -// CheckedUnicodeStringW(cxExtractFileNameExW(FXSLFileName)) + '"?>'#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + '' + - CheckedUnicodeStringW(cxExtractFileNameExW(cxChangeFileExtExW(FXSLFileName, ''))) + ''#13#10; - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); - - CommitCache(nil, nil); - CommitStyle(AStream, nil); - CommitCache(AStream, nil); - - ABuffer := ''; - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); -end; - -procedure TcxXMLExportProvider.CommitXSL(AStream: TStream); -var - ABuffer: string; -begin - dxWriteStandardEncodingSignature(AStream); - ABuffer := ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + '<xsl:value-of select="." />'#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + '.Style'#13#10; - ABuffer := ABuffer + '{ border-style: solid;'#13#10; - ABuffer := ABuffer + ' padding: ;'#13#10; - ABuffer := ABuffer + ' font-family: ;'#13#10; - ABuffer := ABuffer + ' mso-font-charset: ;'#13#10; - ABuffer := ABuffer + ' font-size: pt;'#13#10; - ABuffer := ABuffer + ' color: ;'#13#10; - ABuffer := ABuffer + ' background-color: ;'#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ' font-weight: bold;'#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ' font-style: italic;'#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ' text-decoration: underline;'#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ' text-decoration: line-through;'#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + '}'#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + 'border-left-width: px;'#13#10; - ABuffer := ABuffer + 'border-left-color: ;'#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + 'border-top-width: px;'#13#10; - ABuffer := ABuffer + 'border-top-color: ;'#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + 'border-right-width: px;'#13#10; - ABuffer := ABuffer + 'border-right-color: ;'#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + 'border-bottom-width: px;'#13#10; - ABuffer := ABuffer + 'border-bottom-color: ;'#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + '
'#13#10; - ABuffer := ABuffer + '
'#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + 'Style'#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10; - ABuffer := ABuffer + ''#13#10#13#10; - - ABuffer := ABuffer + '
'#13#10; - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); -end; - -function TcxXMLExportProvider.ConvertTextToXML(const AText: string; ACol, ARow: Integer): string; -var - I: Integer; - W: WideString; -begin - Result := ''; - if not cxStrUnicodeNeeded(AText, True) then - Result := AText - else - begin - W := cxStrToUnicode(AText, GetCellStyle(ACol, ARow)^.FontCharset); - for I := 1 to Length(W) do - Result := Result + '&#' + IntToStr(Integer(W[I])) + ';'; - end; -end; - -function TcxXMLExportProvider.GetBorderStyle(AStyle: TcxCacheCellStyle): string; - - function GetBorderStyle(AIndex: Integer): string; - begin - with AStyle.Borders[AIndex] do - begin - Result := ''; - if IsDefault then - Result := Result + ' IsDefault="True"' - else - Result := Result + ' IsDefault="False"'; - Result := Result + ' Width="' + IntToStr(Width) + '"'; - Result := Result + ' Color="' + GetHTMLColor(Color) + '"'; - end; - end; - -begin - Result := ''#13#10; - Result := Result + ''#13#10; - Result := Result + ''#13#10; - Result := Result + ''#13#10; -end; - -function TcxXMLExportProvider.GetCellParams(ACol, ARow: Integer): string; -var - ACellWidth: Integer; - ACellStyle: PcxCacheCellStyle; -begin - Result := ''; - - with Cache[ACol, ARow] do - begin - ACellWidth := CellWidth[ACol, ARow]; - if ACellWidth > 0 then - Result := Result + ' Width="' + IntToStr(ACellWidth) + '"'; - ACellStyle := GetCellStyle(ACol, ARow); - Result := Result + ' Align="'; - case ACellStyle^.AlignText of - catLeft: - Result := Result + 'left"'; - catCenter: - Result := Result + 'center"'; - catRight: - Result := Result + 'right"'; - end; - if IsUnion then - begin - if Width > 1 then - Result := Result + ' ColSpan="' + IntToStr(Width) + '"'; - if Height > 1 then - Result := Result + ' RowSpan="' + IntToStr(Height) + '"'; - end; - Result := Result + ' StyleClass="' + IntToStr(StyleIndex) + '"'; - end; -end; - -function TcxXMLExportProvider.GetData(ACol, ARow: Integer): string; -var - AAnsiStringValue: AnsiString; - AWideStringValue: WideString; - ADoubleValue: Double; - AIntegerValue: Integer; -begin - if Cache[ACol, ARow].InternalCache.Cache <> nil then - Result := '' - else - begin - if Cache[ACol, ARow].DataType = cxDataTypeGraphic then - begin - Result := cxXMLEmptyChar; - end - else if Cache[ACol, ARow].DataType = cxDataTypeAnsiString then - begin - if Cache[ACol, ARow].DataSize > 0 then - begin - SetLength(AAnsiStringValue, Cache[ACol, ARow].DataSize); - if GetCellData(ACol, ARow, AAnsiStringValue[1]) then - Result := dxAnsiStringToString(AAnsiStringValue) - else - Result := cxXMLEmptyChar; - end - else - Result := cxXMLEmptyChar; - end - else if Cache[ACol, ARow].DataType = cxDataTypeWideString then - begin - if Cache[ACol, ARow].DataSize > 0 then - begin - SetLength(AWideStringValue, Cache[ACol, ARow].DataSize div SizeOf(Char)); - if GetCellData(ACol, ARow, AWideStringValue[1]) then - Result := AWideStringValue - else - Result := cxXMLEmptyChar; - end - else - Result := cxXMLEmptyChar; - end - else if Cache[ACol, ARow].DataType = cxDataTypeDouble then - begin - if GetCellData(ACol, ARow, ADoubleValue) then - Result := FloatToStr(ADoubleValue) - else - Result := cxXMLEmptyChar; - end - else if Cache[ACol, ARow].DataType = cxDataTypeInteger then - begin - if GetCellData(ACol, ARow, AIntegerValue) then - Result := IntToStr(AIntegerValue) - else - Result := cxXMLEmptyChar; - end - else - Result := cxXMLEmptyChar; - end; -end; - -function TcxXMLExportProvider.GetStyle(AStyle: TcxCacheCellStyle): string; - function GetAlignText(AAlign: TcxAlignText): string; - begin - case AAlign of - catLeft: - Result := 'Left'; - catCenter: - Result := 'Center'; - catRight: - Result := 'Right'; - end; - end; - - function GetFontStyles(AStyles: TcxFontStyles): string; - begin - Result := ''; - - if cfsBold in AStyles then - Result := Result + ' Bold="True"' - else - Result := Result + ' Bold="False"'; - - if cfsItalic in AStyles then - Result := Result + ' Italic="True"' - else - Result := Result + ' Italic="False"'; - - if cfsUnderline in AStyles then - Result := Result + ' Underline="True"' - else - Result := Result + ' Underline="False"'; - - if cfsStrikeOut in AStyles then - Result := Result + ' StrikeOut="True"' - else - Result := Result + ' StrikeOut="False"'; - end; - - function GetBrushStyle(AStyle: TcxBrushStyle): string; - begin - case AStyle of - cbsSolid: - Result := 'Solid'; - cbsClear: - Result := 'Clear'; - end; - end; - -begin - with AStyle do - begin - Result := 'AlignText="' + GetAlignText(AlignText) + '"'; - if FontSize = 1 then - Result := Result + ' CellPadding="0px"' - else - Result := Result + ' CellPadding=" 3"'; - Result := Result + ' FontName="' + CheckedUnicodeString(PChar(@FontName), AStyle.FontCharset) + '"'; - Result := Result + ' FontCharset="' + IntToStr(FontCharset) + '"'; - Result := Result + GetFontStyles(FontStyle); - Result := Result + ' FontColor="' + GetHTMLColor(FontColor) + '"'; - Result := Result + ' FontSize="' + IntToStr(FontSize) + '"'; - Result := Result + ' BrushStyle="' + GetBrushStyle(BrushStyle) + '"'; - Result := Result + ' BrushBkColor="' + GetHTMLColor(BrushBkColor) + '"'; - Result := Result + ' BrushFgColor="' + GetHTMLColor(BrushFgColor) + '"'; - end; -end; - -procedure TcxXMLExportProvider.HideDots; -var - I, J: Integer; - AData: string; - AStyle: TcxCacheCellStyle; -begin - for J := 0 to RowCount - 1 do - begin - for I := 0 to ColCount - 1 do - begin - if Cache[I, J].InternalCache.Cache <> nil then - Cache[I, J].InternalCache.Cache.CommitCache(nil, nil) - else - begin - AData := GetData(I, J); - if AData = cxXMLEmptyChar then - begin - AStyle := GetCellStyle(I, J)^; - AStyle.FontColor := AStyle.BrushBkColor; - SetCellStyle(I, J, AStyle); - end; - end; - end; - end; -end; - -function TcxXMLExportProvider.GetScaleLine: string; -var - J: Integer; -begin - Result := ''#13#10; - for J := 0 to ColCount - 1 do - begin - Result := Result + ''#13#10; - Result := Result + ''#13#10; - end; - Result := Result + ''#13#10; -end; - -{ TcxTXTExportProvider } - -constructor TcxTXTExportProvider.Create(const AFileName: string); -begin - inherited Create(AFileName); - FSeparator := ''; - FBeginString := ''; - FEndString := ''; - FIndex := 0; -end; - -procedure TcxTXTExportProvider.CommitCache(AStream: TStream; AParam: Pointer); -var - I, J, K: Integer; - ABuffer: string; - ASpace: string; - AData: string; -begin - dxWriteStandardEncodingSignature(AStream); - SetLength(FColMaxWidth, ColCount); - - CalculateColMaxWidth; - for J := 0 to RowCount - 1 do - begin - ABuffer := ''; - for I := 0 to ColCount - 1 do - begin - AData := GetData(I, J); - ASpace := ' '; - for K := 1 to FColMaxWidth[I] - Length(AData) do - ASpace := ASpace + ' '; - if FSeparator <> '' then - ASpace := ''; - if I < (ColCount - 1) then - ABuffer := ABuffer + FBeginString + AData + FEndString + FSeparator + ASpace - else - ABuffer := ABuffer + FBeginString + AData + FEndString + ASpace; - end; - ABuffer := ABuffer + #13#10; - AStream.WriteBuffer(ABuffer[1], dxStringSize(ABuffer)); - end; - - SetLength(FColMaxWidth, 0); -end; - -function TcxTXTExportProvider.SupportGraphic: Boolean; -begin - Result := False; -end; - -procedure TcxTXTExportProvider.AddSeparator(const ASeparator: string); -begin - case FIndex of - 0: - FSeparator := ASeparator; - 1: - FBeginString := ASeparator; - 2: - FEndString := ASeparator; - end; - Inc(FIndex); -end; - -class function TcxTXTExportProvider.ExportType: Integer; -begin - Result := cxExportToText; -end; - -class function TcxTXTExportProvider.ExportName: string; -begin - Result := cxGetResString(@scxExportToText); -end; - -procedure TcxTXTExportProvider.Commit; -var - AStream: TFileStream; -begin - AStream := cxFileStreamClass.Create(cxUnicodeToStr(FileName), fmCreate); - try - CommitCache(AStream, Pointer(0)); - finally - AStream.Free; - end; -end; - -procedure TcxTXTExportProvider.CalculateColMaxWidth; -var - I, J, K: Integer; - AMaxWidth: Integer; - ACurrentWidth: Integer; -begin - for I := 0 to ColCount - 1 do - begin - AMaxWidth := 0; - for J := 0 to RowCount - 1 do - if Cache[I, J].IsUnion then - begin - ACurrentWidth := Length(GetData(I, J)) div Cache[I, J].Width; - for K := 1 to Cache[I, J].Width - 1 do - FColMaxWidth[I + K] := Max(FColMaxWidth[I + K], ACurrentWidth); - AMaxWidth := Max(AMaxWidth, ACurrentWidth); - end - else - AMaxWidth := Max(AMaxWidth, Length(GetData(I, J))); - - FColMaxWidth[I] := AMaxWidth; - end; -end; - -function TcxTXTExportProvider.GetData(ACol, ARow: Integer): string; -var - AAnsiStringValue: AnsiString; - AWideStringValue: WideString; - ADoubleValue: Double; - AIntegerValue: Integer; -begin - if Cache[ACol, ARow].InternalCache.Cache <> nil then - Result := '' - else - begin - if Cache[ACol, ARow].DataType = cxDataTypeAnsiString then - begin - if Cache[ACol, ARow].DataSize > 0 then - begin - SetLength(AAnsiStringValue, Cache[ACol, ARow].DataSize); - if GetCellData(ACol, ARow, AAnsiStringValue[1]) then - Result := dxAnsiStringToString(AAnsiStringValue) - else - Result := ''; - end - else - Result := ''; - end - else if Cache[ACol, ARow].DataType = cxDataTypeWideString then - begin - if Cache[ACol, ARow].DataSize > 0 then - begin - SetLength(AWideStringValue, Cache[ACol, ARow].DataSize div SizeOf(Char)); - if GetCellData(ACol, ARow, AWideStringValue[1]) then - Result := AWideStringValue - else - Result := ''; - end - else - Result := ''; - end - else if Cache[ACol, ARow].DataType = cxDataTypeDouble then - begin - if GetCellData(ACol, ARow, ADoubleValue) then - Result := FloatToStr(ADoubleValue) - else - Result := ''; - end - else if Cache[ACol, ARow].DataType = cxDataTypeInteger then - begin - if GetCellData(ACol, ARow, AIntegerValue) then - Result := IntToStr(AIntegerValue) - else - Result := ''; - end - else - Result := ''; - end; -end; - -initialization - TcxExport.RegisterProviderClass(TcxHTMLExportProvider); - TcxExport.RegisterProviderClass(TcxTXTExportProvider); - TcxExport.RegisterProviderClass(TcxXMLExportProvider); - -end. diff --git a/internal/x.46/ExpressExport Library/Sources/cxVer.inc b/internal/x.46/ExpressExport Library/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/ExpressExport Library/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/ExpressExport Library/Sources/cxXLSExport.pas b/internal/x.46/ExpressExport Library/Sources/cxXLSExport.pas deleted file mode 100644 index f050f199..00000000 --- a/internal/x.46/ExpressExport Library/Sources/cxXLSExport.pas +++ /dev/null @@ -1,2363 +0,0 @@ - -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ ExpressExport } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEXPORT AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit cxXLSExport; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils, Math, -{$IFDEF WIN32} - Windows, -{$ELSE} - Types, -{$ENDIF} -{$IFDEF DELPHI6} Variants, {$IFNDEF NONDB} FMTBcd, SqlTimSt, {$ENDIF} {$ENDIF} - cxExport, cxExportStrs, Graphics; -type - TxlsExportOptimization = (optBySize, optBySpeed); - { TcxColorItemType } - TcxColorItemType = (ciFontColor, ciBrushBKColor, ciBrushFGColor, ciBorderColor); - - TcxXLSCellsData = class; - TcxXLSRecordsList = class; - TcxXLSSharedStringTable = class; - TcxXLSWorkBookWriter = class; - - TcxMergeRect = packed record - Top, Bottom, Left, Right: Word; - end; - - { TcxXLSCell } - PcxXLSCell = ^TcxXLSCell; - TcxXLSCell = packed record - RecType: Word; - RecSize: Word; - Row: Word; - Col: Word; - XF: Word; - case Integer of - 1: (VarWords: array[0..$FFFF shr 1 - 1] of Word); - 2: (VarBytes: array[0..$FFFF - 1] of Byte); - 3: (SSTIndex: Integer); - 4: (Num: Double); - 5: (StrLen: Word; case StrType: Boolean of - False: (StrDataA: array[0..255] of AnsiChar); - True: (StrDataW: array[0..127] of WideChar)); - 6: (BoolErrValue, ErrFlag: Boolean); - end; - - PcxUnionCellsArray = ^TcxUnionCellsArray; - TcxUnionCellsArray = array[0..MaxInt div SizeOf(TcxMergeRect) - 1] of TcxMergeRect; - - {SST block types} - TSSTBlock = packed record - StringCount: Word; - StringOffset: Word; - RecType: Word; - DataSize: Word; - Data: array[0..8191] of Byte; - end; - - TExtSSTBlock = packed record - StreamOffset: Integer; - StringOffset: Word; - Reserved: Word; - end; - - TExtSST = packed record - RecType: Word; - DataSize: Word; - StringPerBlock: Word; - Data: array[0..255] of TExtSSTBlock; - end; - - TSSSTStringInfo = packed record - HashCode: Word; - StrSize: Word; - Block: Word; - Offset: Word; - end; - - TSSTList = array of TSSTBlock; - TSSSTStringsInfo = array of TSSSTStringInfo; - - { TSSTStringTable } - TcxXLSSharedStringTable = class - private - FExtSST: TExtSST; - FSST: TSSTList; - FOptimaze: Boolean; - FStringsInfo: TSSSTStringsInfo; - function GetStringCount: Integer; - function GetUniqueStringCount: Integer; - protected - procedure AddStringToBlock(ASource: Pointer; var ADest: TSSTBlock; ASize: Word); - procedure CreateExtSST(ASSTOffset: Integer); - function GetPackedSize: Integer; - function IndexOf(const AString: WideString): Integer; - procedure InsertStr(const AString: WideString); - property ExtSST: TExtSST read FExtSST; - property SST: TSSTList read FSST; - property StringsInfo: TSSSTStringsInfo read FStringsInfo; - public - constructor Create; virtual; - destructor Destroy; override; - function Add(AString: WideString): Integer; - procedure Clear; - procedure SaveToStream(AStream: TStream; APosition: Integer = -1); virtual; - property PackedSize: Integer read GetPackedSize; - property TotalStringCount: Integer read GetStringCount; - property UniqueStringCount: Integer read GetUniqueStringCount; - end; - - { TcxOLEFileHeader } - PcxOLEFileHeader = ^TcxOLEFileHeader; - TcxOLEFileHeader = packed record - Signature : Int64; - CLSID : array[0..1] of Int64; - OLEVersion : Integer; - ByteOrder : Word; - SectorShift : Word; - MiniSectorShift : Word; - Reserved : Word; - Reserved1 : LongInt; - Reserved2 : LongInt; - CountSectFAT : LongInt; - SectDIRStart : LongInt; - TransSignature : LongInt; - MiniSectorCutOff: LongInt; - SectMiniFATStart: LongInt; - CountSectMiniFAT: LongInt; - SectDIFStart : Longint; - CountSectDIF : LongInt; - SectFAT : array[0..108] of Integer; - end; - - { TcxOLEDIREntryType } - TcxOLEDIREntryType = (ET_INVALID, ET_STORAGE, ET_STREAM, ET_LOCKBYTES, ET_PROPERTY, ET_ROOT); - - { TcxOLEDIREntry } - PcxOLEDIREntry = ^TcxOLEDIREntry; - TcxOLEDIREntry = record - Name : array[0..64 - 1] of Byte; - NameLen : Word; - EntryType : TcxOLEDIREntryType; - BFlag : Byte; - LeftSib : LongWord; - RightSib : LongWord; - ChildSib : LongWord; - Guid : TGUID; - UserFlag : LongInt; - C_M_Time : array[0..1] of TTimeStamp; - StartSector: LongInt; - Size : LongInt; - Reserved : LongInt - end; - - { TcxFATSector } - PcxFATSector = ^TcxFATSector; - TcxFATSector = packed array[0..512 div SizeOf(Integer) - 1] of Integer; - - PcxFATSectors = ^TcxFATSectors; - TcxFATSectors = packed array[0..MaxInt div SizeOf(TcxFATSector) - 1] of TcxFATSector; - - { TcxWorkBookReader } - TcxXLSWorkBookWriter = class - protected - FBuffer: PByteArray; - FBufferSize: Integer; - FCapacity: Integer; - FFATBlockCount: Integer; - FIsSmallFile: Boolean; - FSectCount: Integer; - FStreamSize: Integer; - procedure CreateLocalFAT; - function GetDIFSector(ASector: Integer): PcxFATSector; - function GetDIREntry(AIndex: Integer): PcxOLEDIREntry; - function GetHeader: PcxOleFileHeader; - function GetFATSector(ASector: Integer): PcxFATSector; - protected - procedure Check(ACondition: Boolean); - procedure CreateDIF; virtual; - procedure CreateDIR; virtual; - procedure CreateFAT; virtual; - procedure CreateHeader; virtual; - procedure CreateSmallFAT; virtual; - procedure ReallocBuffer(const ASize: Integer); - property IsSmallFile: Boolean read FIsSmallFile; - property DIR[AEntry: Integer]: PcxOLEDIREntry read GetDIREntry; - property DIF[ASector: Integer]: PcxFATSector read GetDIFSector; - property FAT[ASector: Integer]: PcxFATSector read GetFATSector; - property Header: PcxOleFileHeader read GetHeader; - property Memory: PByteArray read FBuffer; - property Size: Integer read FBufferSize; - public - procedure CreateOLEStream(ADataSize: Integer; ADstStream: TStream); - end; - - { IcxNamedExportProvider } - - IcxNameExportProvider = interface - ['{FC69194E-E3C7-41F4-98AE-5948813210AE}'] - procedure SetName(const AName: string); - procedure SetRangeName(const AName: AnsiString; const ARange: TRect); - end; - - { TcxCacheExportXLS } - TcxXLSExportProvider = class(TcxCustomExportProvider, IcxExportProvider, IcxNameExportProvider) - private - FCells: TcxXLSCellsData; - FColStyles: TcxXLSRecordsList; - FFonts: TcxXLSRecordsList; - FMaxCol: Integer; - FMaxRow: Integer; - FStyles: TcxXLSRecordsList; - FStyleCache: TcxExportStyleManager; - FUnionCells: PcxUnionCellsArray; - FUnionCellsCapacity: Integer; - FUnionCellsCount: Integer; - FUsedColors: Integer; - FPalette: array[0..55] of Integer; - FRowStyles: TcxXLSRecordsList; - FSheetName: WideString; - FSST: TcxXLSSharedStringTable; - FStream: TStream; - FVisibleGrid: Boolean; - FWorkBookWriter: TcxXLSWorkBookWriter; - // - FRangeNameBytes: array of Byte; - FRangeName: AnsiString; - FNamedRange: TRect; - protected - procedure Commit; virtual; - function GetCellStyle(const ACol, ARow: Integer): PcxCacheCellStyle; - function GetStyle(AStyleIndex: Integer): PcxCacheCellStyle; - function PlaceParsedString(const ACol, ARow: Integer; const AText: string): Boolean; - function RegisterStyle(const AStyle: TcxCacheCellStyle): Integer; - procedure SetCellDataBoolean(const ACol, ARow: Integer; const AValue: Boolean); virtual; - procedure SetCellDataCurrency(const ACol, ARow: Integer; const AValue: Currency); virtual; - procedure SetCellDataDateTime(const ACol, ARow: Integer; const AValue: TDateTime); virtual; - procedure SetCellDataDouble(const ACol, ARow: Integer; const AValue: Double); virtual; - procedure SetCellDataInteger(const ACol, ARow: Integer; const AValue: Integer); virtual; - procedure SetCellDataString(const ACol, ARow: Integer; const AText: string); virtual; - procedure SetCellDataWideString(const ACol, ARow: Integer; const AText: Widestring); virtual; - procedure SetCellStyle(const ACol, ARow, AStyleIndex: Integer); overload; - procedure SetCellStyle(const ACol, ARow, AExampleCol, AExampleRow: Integer); overload; - procedure SetCellStyle(const ACol, ARow: Integer; const AStyle: TcxCacheCellStyle); overload; - procedure SetCellStyleEx(const ACol, ARow, H, W: Integer; const AStyleIndex: Integer); - procedure SetCellUnion(const ACol, ARow: Integer; H, W: Integer); - procedure SetCellValue(const ACol, ARow: Integer; const AValue: Variant); - procedure SetColumnWidth(const ACol, AWidth: Integer); - procedure SetDefaultStyle(const AStyle: TcxCacheCellStyle); - procedure SetRange(const AColCount, ARowCount: Integer; IsVisible: Boolean = True); - procedure SetRowHeight(const ARow, AHeight: Integer); - // export graphic extension - procedure SetCellDataGraphic(const ACol, ARow: Integer; var AGraphic: TGraphic); - function SupportGraphic: Boolean; - // IcxNameExportProvider - procedure SetName(const AName: string); - procedure SetRangeName(const AName: AnsiString; const ARange: TRect); - protected - function CalculateStoredSize: Integer; dynamic; -// function xlsCellIsMerge(ACol, ARow: Integer; var XFStyle: Word): Boolean; - function xlsCheckColor(const AColor: Integer; AItemType: TcxColorItemType): Word; - function xlsCheckPos(const ACol, ARow: Integer): Boolean; - procedure xlsCreateStyles; - function xlsRegisterFont(const AStyle: TcxCacheCellStyle): Integer; - function xlsRegisterStyle(const AStyle: TcxCacheCellStyle; - var AType: Word; IsMerge: Boolean = False): Integer; - procedure xlsWriteBuf(const RecData: array of Byte); overload; - procedure xlsWriteBuf(const RecID: Word; const RecData: array of Byte); overload; - procedure xlsWriteBuf(const RecID, DataSize: Word; const RecData: array of Byte); overload; - procedure xlsWriteBuffer(const ARecData: array of Word); overload; - procedure xlsWriteBuffer(const RecID, DataSize: Word; const RecData); overload; - procedure xlsWriteHeader; - procedure xlsWriteWorkBook; - property DataStream: TStream read FStream; - public - constructor Create(const AFileName: string); override; - destructor Destroy; override; - class function ExportType: Integer; override; - class function ExportName: string; override; - end; - - { TxlsCellsData } - TcxXLSCellsData = class - private - FCellsList: array of PcxXLSCell; - FCellPerCol: Integer; - function GetFullSize: Integer; - protected - function GetCell(const ACol, ARow: Integer): PcxXLSCell; - function PrepareCellStyle(var AType: Word): Word; - function ReallocCellData(const ACol, ARow: Integer; AVarDataSize: Integer = 0): PcxXLSCell; - procedure SetCellDataBoolean(const ACol, ARow: Integer; const AValue: Boolean); - procedure SetCellDataBlank(const ACol, ARow: Integer); - procedure SetCellDataCurrency(const ACol, ARow: Integer; const AValue: Currency); - procedure SetCellDataDateTime(const ACol, ARow: Integer; const AValue: TDateTime); - procedure SetCellDataDouble(const ACol, ARow: Integer; const AValue: Double); - procedure SetCellDataInteger(const ACol, ARow: Integer; const AValue: Integer); - procedure SetCellDataStringA(const ACol, ARow: Integer; const AText: string); - procedure SetCellDataStringW(const ACol, ARow: Integer; const AText: Widestring); - procedure SetCellDataSSTString(const ACol, ARow, AIndex: Integer); - procedure SetRange(const AColCount, ARowCount: Integer); - property FullSize: Integer read GetFullSize; - public - destructor Destroy; override; - procedure SaveToStream(AStream: TStream); - end; - - { TxlsRecordList } - TcxXLSRecordsList = class(TList) - private - FID: Word; - function GetFullSize: Integer; - function GetItem(AIndex: Integer): Pointer; - function GetItemSize(AIndex: Integer): Integer; - function GetRealItem(AIndex: Integer): Pointer; - public - constructor Create(const RecordID: Word); - destructor Destroy; override; - function AddData(const AData; DataSize: Word): Integer; - function AddUniqueData(var AData: PByteArray): Integer; - procedure Clear; override; - procedure SaveToStream(AStream: TStream); - property Items[AIndex: Integer]: Pointer read GetItem; - property ItemSize[AIndex: Integer]: Integer read GetItemSize; - property FullSize: Integer read GetFullSize; - end; - -const - Optimization: TxlsExportOptimization = optBySpeed; - NeedStringParse: Boolean = False; - -implementation - -var - cxBlankCharCode: Integer; - cxThousandCharCode: Integer; - cxDecimalCharCode: Integer; - -const - ScaledFactor: Double = 1; - - cxXLSMaxColumn = $FF; - cxXLSMaxRow = $FFFF; - cxXLSMaxBlockSize = 8192; - cxXLSBlankCellSize = 10; - cxXLSMaxLenShortStringA = $FF; - cxXLSMaxLenShortStringW = cxXLSMaxLenShortStringA shr 1; - - XLS_Font = $0031; // Font Description - XLS_XF = $00E0; // Extended Format - XLS_COLINFO = $007D; // Column Formatting Information - XLS_Row = $0208; // Describes a Row - XLS_Palette = $0092; // Color Palette Definition - XLS_BoundSheet = $0085; // Sheet Information - XLS_MergeCells = $00E5; // Merged Cells - XLS_Currency = $1003; // not native Excel constant for currency - XLS_DateTime = $1000; // not native Excel constant for datetime - XLS_Date = $1001; // not native Excel constant for datetime - XLS_Time = $1002; // not native Excel constant for datetime - XLS_MergeState = $2000; // not native Excel constant for merged cell - XLS_BoolErr = $0205; // Cell Value - Boolean - XLS_Blank = $0201; // Cell Value, Blank Cell - XLS_Number = $0203; // Cell Value, Floating-Point Number - XLS_Label = $0204; // Cell Value, String Constant - XLS_LabelSST = $00FD; // Cell Value, String Constant/SST - XLS_ExtSST = $00FF; // Extended Shared String Table - XLS_SST = $00FC; // Shared String Table - XLS_Continue = $003C; // Continues Long Records - XLS_NAME = $0018; // Named cells range - - ptgArea3d = $3B; - - cxXLS_BOF: array[0..19] of Byte = - ($09, $08, $10, $00, $00, $06, $05, $00, $BB, $0D, - $CC, $07, $00, $00, $00, $00, $06, $00, $00, $00); - cxXLS_EOF: array[0..3] of Byte = - ($0A, $00, $00, $00); - cxXLS_WINDOW1: array[0..21] of Byte = - ($3D, $00, $12, $00, $E0, $01, $69, $00, $CC, $42, $7F, - $26, $38, $00, $00, $00, $00, $00, $01, $00, $58, $02); - cxXLS_WINDOW2: array[0..21] of Byte = - ($3E, $02, $12, $00, $B6, $06, $00, $00, $00, $00, $40, - $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00); - cxXLS_Font: array[0..29] of Byte = - ($31, $00, $1A, $00, $C8, 00, $00, $00, $FF, $7F, $90, $01, $00, $00, $00, - $00, $00, $00, $05, $01, $41, $00, $72, $00, $69, $00, $61, $00, $6C, $00); - cxXLS_TabID: array[0..5] of Byte = - ($3D, $01, $02, $00, $00, $00); - cxXLS_SupBook: array[0..7] of Byte = - ($AE, $01, $04, $00, $01, $00, $01, $04); - cxXLS_ExternSheet: array[0..11] of Byte = - ($17, $00, $08, $00, $01, $00, $00, $00, $00, $00, $00, $00); - cxXLS_Dimension: array[0..17] of Byte = - ($00, $02, $0E, $00, $00, $00, $00, $00, $01, - $00, $00, $00, $00, $00, $01, $00, $00, $00); - - cxXLS_STYLE: array[0..48 - 1] of Byte = - ($93, $02, $04, $00, $10, $80, $03, $FF, $93, $02, $04, $00, $11, $80, $06, $FF, - $93, $02, $04, $00, $10, $80, $04, $FF, $93, $02, $04, $00, $10, $80, $07, $FF, - $93, $02, $04, $00, $00, $80, $00, $FF, $93, $02, $04, $00, $10, $80, $05, $FF); - - cxXLS_XF: packed array[0..16, 0..23] of Byte = - (($E0, $00, $14, $00, $00, $00, $00, $00, $F5, $FF, $20, $00, - $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $01, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $01, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $02, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $02, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $00, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $00, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $00, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $00, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $00, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $00, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $00, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $00, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $00, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $00, $00, $00, $00, $F5, $FF, $20, $00, - $00, $F4, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $00, $00, $00, $00, $01, $00, $20, $00, - $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20), - ($E0, $00, $14, $00, $01, $00, $2b, $00, $F5, $FF, $20, $00, - $00, $F8, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $20)); - - cxXLS_Palette: array[0..55] of Integer = - ($000000, $FFFFFF, $0000FF, $00FF00, $FF0000, $00FFFF, $FF00FF, $FFFF00, - $000080, $008000, $800000, $008080, $800080, $808000, $C0C0C0, $808080, - $FF9999, $663399, $CCFFFF, $FFFFCC, $660066, $8080FF, $CC6600, $FFCCCC, - $800000, $FF00FF, $00FFFF, $FFFF00, $800080, $000080, $808000, $FF0000, - $FFCC00, $FFFFCC, $CCFFCC, $99FFFF, $FFCC99, $CC99FF, $FF99CC, $99CCFF, - $FF6633, $CCCC33, $00CC99, $00CCFF, $0099FF, $0066FF, $996666, $969696, - $663300, $669933, $003300, $003333, $003399, $663399, $993333, $333333); - - cxXLSDefaultDataSize = SizeOf(cxXLS_BOF) * 2 + SizeOf(cxXLS_EOF) * 2 + - SizeOf(cxXLS_WINDOW1) + SizeOf(cxXLS_WINDOW2) + SizeOf(cxXLS_Font) * 5 + - SizeOf(cxXLS_TabID) + SizeOf(cxXLS_SupBook) + SizeOf(cxXLS_ExternSheet) + - (SizeOf(cxXLS_Palette) + 6) + SizeOf(cxXLS_STYLE) + SizeOf(cxXLS_Dimension) + 12 + - SizeOf(cxXLS_XF); - -// OLE data control codes - oleSignature = Int64($E11AB1A1E011CFD0); // header signature - oleDIFBlock = Integer($FFFFFFFC); // double inDIRect FAT - oleSpecBlock = Integer($FFFFFFFD); // special block begining - oleEndOfChain = Integer($FFFFFFFE); // end of chain - oleUnused = Integer($FFFFFFFF); // unused - oleEmpty = Integer($00000000); // empty - oleDLLVersion = Integer($0003003E); // specification version - olePlatformOrder = Word($FFFE); // order for intel platform - oleSectorsInMasterFAT = 109; // sectors in master FAT from header - oleBlockIDPerBigBlock = 128; // id cound in big block - oleMaxBlockIdInBigBlock = 127; // id cound in big block - oleContinueFATItem = 126; // id continue DIF block item - oleBigBlockShift = 9; // big block shift - oleSmallBlockShift = 6; // small block shift - oleReservedSectorCount = 2; // header and DIRecotry sectors - oleMiniSectorMaxSize = Integer($000001000);// max minisector size - oleSmallBlockSize = 1 shl oleSmallBlockShift; // size of small block - oleBigBlockSize = 1 shl oleBigBlockShift; // size of big block in bytes - oleDIRBlockSize = SizeOf(TcxOLEDIREntry); // size of DIRectory block in bytes - oleIndexSize = SizeOf(Integer); // size of index - - oleRoot : WideString = 'Root Entry'; - oleWorkbook : WideString = 'Workbook'; - oleInvalidName: WideString = ''; - - cxNegInfinity = -1/0; - - // Default OLE Storage header template - oleHeaderTemplate: TcxOLEFileHeader = - (Signature : oleSignature; - CLSID : (oleEmpty, oleEmpty); - OLEVersion : oleDLLVersion; - ByteOrder : olePlatformOrder; - SectorShift : oleBigBlockShift; - MiniSectorShift : oleSmallBlockShift; - Reserved : oleEmpty; - Reserved1 : oleEmpty; - Reserved2 : oleEmpty; - CountSectFAT : 1; - SectDIRStart : 1; - TransSignature : oleEmpty; - MiniSectorCutOff: oleMiniSectorMaxSize; - SectMiniFATStart: oleEndOfChain; - CountSectMiniFAT: oleEmpty; - SectDIFStart : oleEndOfChain; - CountSectDIF : oleEmpty); - -function cxValidateStr(const AValue: string): string; -var - I: Integer; -begin - Result := AValue; - I := 1; - while I <= Length(Result) do - begin - if Result[I] = #13 then - Delete(Result, I, 1) - else - Inc(I) - end; -end; - -function GetDateTimeFormat(var AValue: Double): Word; -begin - if (Int(AValue) <> 0) and (Round(Int(AValue)) <= 60) then - AValue := AValue - 1; - Result := XLS_DateTime; - if Int(AValue) = 0 then - Result := XLS_Time - else - if (Frac(AValue) = 0) then - Result := XLS_Date; -end; - -function RoundDiv(const Number, Denominator: Integer): Integer; -begin - Result := Number div Denominator; - if (Number mod Denominator) <> 0 then - Inc(Result); -end; - -procedure FixSetRecType(var AType: Word; NewType: Word); -begin - if (AType and XLS_MergeState) = XLS_MergeState then - AType := NewType or XLS_MergeState - else - AType := NewType; -end; - -// string conversion routines -procedure SetControlCodes; -begin - if ThousandSeparator = '' then - ThousandSeparator := ','; - cxBlankCharCode := Integer(' ') - Integer('0'); - cxThousandCharCode := Integer(ThousandSeparator) - Integer('0'); - cxDecimalCharCode := Integer(DecimalSeparator) - Integer('0'); -end; - -function cxTryStrToFloat(const AString: string; out Value: Double): Boolean; -var - ARet: Extended; -begin - Result := TextToFloat(PChar(AString), ARet, fvExtended) and - (ARet > MinDouble) and (ARet < MaxDouble); - if Result then - Value := ARet - else - Value := 0; -end; -{ -function cxTryStrToInt(const AString: string; out Value: Integer): Boolean; -var - ErrCode: Integer; - S: string; -begin - S := Trim(AString); - Val(S, Value, ErrCode); - Result := ErrCode = 0; - if not Result then Value := 0; -end; -} - -{$IFNDEF DELPHI6} -function DateTimeFromStr(const strIn: WideString; lcid: DWORD; dwFlags: Longint; - out dateOut: TDateTime): HRESULT; stdcall; external 'oleaut32.dll' name 'VarDateFromStr'; -{$ENDIF} - -function cxTryStrToDateTime(const S: string; out ADateTime: TDateTime): Boolean; -begin - {$IFNDEF DELPHI6} - Result := DateTimeFromStr(S, $400, 0, ADateTime) = 0; - {$ELSE} - Result := TryStrToDateTime(S, ADateTime); - {$ENDIF} -end; - -function cxTryStrToBool(const AString: string; var Value: Boolean): Boolean; -var - AStr: string; -begin - AStr := AnsiUpperCase(AString); - Value := AStr = cxGetResString(@scxBoolTrue); - Result := (AStr = cxGetResString(@scxBoolTrue)) or (AStr = cxGetResString(@scxBoolTrue)); -end; - -function cxTryStrToCurr(const S: string; var Value: Currency): Boolean; -var - APos, Code: Integer; - IntPart, FrucPart: Double; - HasCurrencyStr: Boolean; - HasThousandSeparator: Boolean; - - function CheckCurrencyStr: Boolean; - var - CharCount: Integer; - begin - Result := not HasCurrencyStr and (Length(CurrencyString) > 0); - CharCount := 0; - while Result and (APos <= Length(S)) do - begin - if CharCount < Length(CurrencyString) then - begin - Result := S[APos + CharCount] = CurrencyString[CharCount + 1]; - if Result then - Inc(CharCount); - end - else - begin - HasCurrencyStr := CharCount = Length(CurrencyString); - Result := HasCurrencyStr; - if Result then - Inc(APos, CharCount - 1); - Break; - end; - end; - end; - - function ScanIntPart: Boolean; - var - NumCount: Integer; - begin - Result := APos <= Length(S); - if Result then - begin - NumCount := 0; - HasThousandSeparator := False; - IntPart := 0; - while Result and (APos <= Length(S)) do - begin - Code := Integer(S[APos]) - Integer('0'); - if (Code >= 0) and (Code <= 9) then - begin - IntPart := IntPart * 10 + Code; - if HasThousandSeparator then Inc(NumCount); - end - else - begin - if Code = cxDecimalCharCode then - Break - else - if Code = cxThousandCharCode then - begin - Result := not HasThousandSeparator or (NumCount = 3); - HasThousandSeparator := True; - NumCount := 0; - end - else - Result := (Code = cxBlankCharCode) or CheckCurrencyStr; - end; - Inc(APos); - end; - end; - end; - - function ScanFrucPart: Boolean; - var - C: Double; - begin - Result := True; - Inc(APos); - FrucPart := 0; - C := 0.1; - while Result and (APos <= Length(S)) do - begin - Code := Integer(S[APos]) - Integer('0'); - if (Code >= 0) and (Code <= 9) then - begin - FrucPart := FrucPart + Code * C; - C := C / 10; - end - else - Result := (Code = cxBlankCharCode) or - (CheckCurrencyStr and (APos = Length(S))); - Inc(APos); - end; - end; - -begin - APos := 1; - HasCurrencyStr := False; - Result := ScanIntPart and ScanFrucPart and - (((ThousandSeparator <> '') and HasThousandSeparator) or HasCurrencyStr); - if Result then - Value := IntPart + FrucPart - else - Value := 0; -end; - -{ TcxCacheExportXLS } -constructor TcxXLSExportProvider.Create(const AFileName: string); -begin - FSheetName := cxExtractFileNameEx(ChangeFileExt(AFileName, '')); - inherited Create(AFileName); - SetControlCodes; - if FileExists(AFileName) then - SysUtils.DeleteFile(AFileName); - FStream := cxFileStreamClass.Create(cxUnicodeToStr(FileName), fmCreate); - FFonts := TcxXLSRecordsList.Create(XLS_Font); - FStyles := TcxXLSRecordsList.Create(XLS_XF); - FCells := TcxXLSCellsData.Create; - FColStyles := TcxXLSRecordsList.Create(XLS_ColInfo); - FRowStyles := TcxXLSRecordsList.Create(XLS_Row); - FStyleCache := TcxExportStyleManager.GetInstance(AFileName); - FSST := TcxXLSSharedStringTable.Create; - FWorkBookWriter := TcxXLSWorkBookWriter.Create; - FMaxCol := -1; - FMaxRow := -1; - FUsedColors := High(FPalette); - Move(cxXLS_Palette, FPalette[0], SizeOf(cxXLS_Palette)); -end; - -destructor TcxXLSExportProvider.Destroy; -begin - FCells.Free; - FWorkBookWriter.Free; - FStream.Free; - FColStyles.Free; - FRowStyles.Free; - FSST.Free; - FFonts.Free; - if Assigned(FStyleCache) then - FStyleCache.Clear; - FStyles.Free; - FreeMem(FUnionCells); - inherited Destroy; -end; - -class function TcxXLSExportProvider.ExportType: Integer; -begin - Result := cxExportToExcel; -end; - -class function TcxXLSExportProvider.ExportName: string; -begin - Result := cxGetResString(@scxExportToExcel); -end; - -procedure TcxXLSExportProvider.Commit; -begin - xlsWriteHeader; - xlsWriteWorkBook; - FreeAndNil(FStream); -end; - -function TcxXLSExportProvider.GetCellStyle(const ACol, ARow: Integer): PcxCacheCellStyle; -begin - Result := nil; - if xlsCheckPos(ACol, ARow) then - begin - with FCells.GetCell(ACol, ARow)^ do - begin - if XF > $10 then - Result := FStyleCache.GetStyle(XF - $10) - else - Result := FStyleCache.GetStyle(0); - end; - end; -end; - -function TcxXLSExportProvider.PlaceParsedString(const ACol, ARow: Integer; - const AText: string): Boolean; -var - AFloat: Double; - ACur: Currency; - ABool: Boolean; - ADT: TDateTime; -begin - Result := True; - if cxTryStrToFloat(AText, AFloat) then - SetCellDataDouble(ACol, ARow, AFloat) - else - if cxTryStrToDateTime(AText, ADT) then - SetCellDataDateTime(ACol, ARow, ADt) - else - if cxTryStrToCurr(AText, ACur) then - SetCellDataCurrency(ACol, ARow, ACur) - else - if cxTryStrToBool(AText, ABool) then - SetCellDataBoolean(ACol, ARow, ABool) - else - Result := False; -end; - -function TcxXLSExportProvider.GetStyle(AStyleIndex: Integer): PcxCacheCellStyle; -begin - Result := FStyleCache.GetStyle(AStyleIndex); -end; - -function TcxXLSExportProvider.RegisterStyle(const AStyle: TcxCacheCellStyle): Integer; -begin - Result := FStyleCache.RegisterStyle(AStyle); -end; - -procedure TcxXLSExportProvider.SetCellDataBoolean(const ACol, ARow: Integer; const AValue: Boolean); -begin - if xlsCheckPos(ACol, ARow) then - FCells.SetCellDataBoolean(ACol, ARow, AValue); -end; - -procedure TcxXLSExportProvider.SetCellDataCurrency(const ACol, ARow: Integer; - const AValue: Currency); -begin - if xlsCheckPos(ACol, ARow) then - FCells.SetCellDataCurrency(ACol, ARow, AValue); -end; - -procedure TcxXLSExportProvider.SetCellDataDateTime(const ACol, ARow: Integer; - const AValue: TDateTime); -begin - if xlsCheckPos(ACol, ARow) then - FCells.SetCellDataDateTime(ACol, ARow, AValue); -end; - -procedure TcxXLSExportProvider.SetCellDataDouble(const ACol, ARow: Integer; - const AValue: Double); -begin - if xlsCheckPos(ACol, ARow) then - FCells.SetCellDataDouble(ACol, ARow, AValue); -end; - -procedure TcxXLSExportProvider.SetCellDataInteger(const ACol, ARow: Integer; - const AValue: Integer); -begin - if xlsCheckPos(ACol, ARow) then - FCells.SetCellDataInteger(ACol, ARow, AValue); -end; - -procedure TcxXLSExportProvider.SetCellDataString(const ACol, ARow: Integer; - const AText: string); - - function TextToUnicode: WideString; - begin - Result := cxStrToUnicode(cxValidateStr(AText), GetCellStyle(ACol, ARow)^.FontCharset); - end; - -var - ALen: Integer; - -begin - ALen := Length(AText); - if xlsCheckPos(ACol, ARow) and (ALen <> 0) then - begin - if not (NeedStringParse and PlaceParsedString(ACol, ARow, AText)) then - begin - if (Optimization = optBySize) or (cxStrUnicodeNeeded(AText)) then - begin - if (Optimization <> optBySize) and (ALen <= cxXLSMaxLenShortStringW) then - FCells.SetCellDataStringW(ACol, ARow, TextToUnicode) - else - FCells.SetCellDataSSTString(ACol, ARow, FSST.Add(TextToUnicode)); - end - else - begin - if ALen <= cxXLSMaxLenShortStringA then - begin - if ALen = 0 then - FCells.SetCellDataBlank(ACol, ARow) - else - {$IFDEF DELPHI12} - FCells.SetCellDataStringW(ACol, ARow, cxValidateStr(AText)); - {$ELSE} - FCells.SetCellDataStringA(ACol, ARow, cxValidateStr(AText)); - {$ENDIF} - end - else - FCells.SetCellDataSSTString(ACol, ARow, FSST.Add(cxValidateStr(AText))); - end; - end; - end; -end; - -procedure TcxXLSExportProvider.SetCellDataWideString(const ACol, ARow: Integer; - const AText: Widestring); -var - ALen: Integer; -begin - ALen := Length(AText); - if xlsCheckPos(ACol, ARow) and (ALen <> 0) then - begin - if not (NeedStringParse and PlaceParsedString(ACol, ARow, AText)) then - begin - if (Optimization <> optBySize) and (ALen <= cxXLSMaxLenShortStringW) then - begin - if ALen = 0 then - FCells.SetCellDataBlank(ACol, ARow) - else - FCells.SetCellDataStringW(ACol, ARow, cxValidateStr(AText)); - end - else - FCells.SetCellDataSSTString(ACol, ARow, FSST.Add(cxValidateStr(AText))); - end; - end; -end; - -procedure TcxXLSExportProvider.SetCellStyle(const ACol, ARow, AStyleIndex: Integer); -begin - if xlsCheckPos(ACol, ARow) then - with FCells.GetCell(ACol, ARow)^ do - begin - if RecType and XLS_MergeState <> XLS_MergeState then - XF := AStyleIndex + $10; - end; -end; - -procedure TcxXLSExportProvider.SetCellStyle(const ACol, ARow, AExampleCol, AExampleRow: Integer); -begin - if xlsCheckPos(AExampleCol, AExampleRow) then - SetCellStyle(ACol, ARow, GetCellStyle(AExampleCol, AExampleRow)^); -end; - -procedure TcxXLSExportProvider.SetCellStyle(const ACol, ARow: Integer; const AStyle: TcxCacheCellStyle); -begin - if xlsCheckPos(ACol, ARow) then - SetCellStyle(ACol, ARow, RegisterStyle(AStyle)); -end; - -// TODO: grid export optimization -procedure TcxXLSExportProvider.SetCellStyleEx( - const ACol, ARow, H, W: Integer; const AStyleIndex: Integer); -var - I, J, AUnionStyleID, AW, AH: Integer; -begin - if (ACol >= cxXLSMaxColumn) or (ARow >= cxXLSMaxRow) then Exit; - AW := Min(W, cxXLSMaxColumn + 1 - ACol); - AH := Min(H, cxXLSMaxRow + 1 - ARow); - if (H = 1) and (W = 1) then - SetCellStyle(ACol, ARow, AStyleIndex) - else - begin - SetCellUnion(ACol, ARow, H, W); - with FCells.GetCell(ACol, ARow)^ do - begin - AUnionStyleID := xlsRegisterStyle(FStyleCache.Items[AStyleIndex], RecType, True); - RecType := RecType or XLS_MergeState; - XF := AUnionStyleID; - end; - for I := ACol to ACol + AW - 1 do - for J := ARow to ARow + AH - 1 do - if (I = ACol) and (J = ARow) then - Continue - else - with FCells.GetCell(I, J)^ do - begin - RecType := RecType or XLS_MergeState; - XF := AUnionStyleID; - end; - end; -end; - -procedure TcxXLSExportProvider.SetCellUnion(const ACol, ARow: Integer; H, W: Integer); -begin - W := Min(W, cxXLSMaxColumn + 1 - ACol); - H := Min(H, cxXLSMaxRow + 1 - ARow); - if FUnionCellsCount = FUnionCellsCapacity then - begin - FUnionCellsCapacity := (FUnionCellsCapacity shr 1 + 1) shl 2; - ReallocMem(FUnionCells, FUnionCellsCapacity * SizeOf(TcxMergeRect)); - end; - with FUnionCells^[FUnionCellsCount] do - begin - Top := ARow and $FFFF; - Bottom := (ARow + H - 1) and $FFFF; - Left := ACol and $00FF; - Right := (ACol + W - 1) and $00FF; - end; - Inc(FUnionCellsCount); -end; - -procedure TcxXLSExportProvider.SetCellValue(const ACol, ARow: Integer; const AValue: Variant); -{$IFDEF DELPHI6} -var - ACurr: Currency; -{$ENDIF} -begin - case TVarData(AValue).VType of - {$IFDEF DELPHI6} - VarInt64, - {$ENDIF} - varSingle, varDouble: - SetCellDataDouble(ACol, ARow, AValue); - varCurrency: - SetCellDataCurrency(ACol, ARow, AValue); - varDate: - SetCellDataDateTime(ACol, ARow, AValue); - {$IFDEF DELPHI12} - varUString, - {$ENDIF} - varOleStr : - SetCellDataWideString(ACol, ARow, AValue); - varSmallInt, varInteger, - {$IFDEF DELPHI6} - varWord, varShortInt, varLongWord, - {$ENDIF} - varByte: - SetCellDataInteger(ACol, ARow, AValue); - varBoolean: - SetCellDataBoolean(ACol, ARow, AValue); - varString: - SetCellDataString(ACol, ARow, cxValidateStr(AValue)); -{$IFDEF DELPHI6} - {$IFNDEF NONDB} - else - if TVarData(AValue).VType = VarSQLTimeStamp then - SetCellDataDateTime(ACol, ARow, AValue) - else - if TVarData(AValue).VType = VarFMTBcd then - begin - if BcdToCurr(VarToBcd(AValue), ACurr) then - SetCellValue(ACol, ARow, Currency(ACurr)) - else - SetCellValue(ACol, ARow, Double(BcdToDouble(VarToBcd(AValue)))); - end; - {$ENDIF} -{$ENDIF} - end; -end; - -procedure TcxXLSExportProvider.SetColumnWidth(const ACol, AWidth: Integer); -var - AColInfo: PWordArray; -const - ColRecSize = 11; -begin - if ACol > cxXLSMaxColumn then Exit; - AColInfo := AllocMem(ColRecSize + SizeOf(Word) + 1); - AColInfo^[0] := ColRecSize; - AColInfo^[1] := ACol; - AColInfo^[2] := ACol; - AColInfo^[3] := Round(AWidth * 36.6 / ScaledFactor); - AColInfo^[4] := $000F; - FColStyles.Add(AColInfo); -end; - -procedure TcxXLSExportProvider.SetDefaultStyle(const AStyle: TcxCacheCellStyle); -begin - RegisterStyle(AStyle); -end; - -procedure TcxXLSExportProvider.SetRange(const AColCount, ARowCount: Integer; IsVisible: Boolean = True); -begin - FMaxCol := Min(AColCount, cxXLSMaxColumn + 1); - FMaxRow := Min(ARowCount, cxXLSMaxRow + 1); - FColStyles.Capacity := FMaxCol; - FRowStyles.Capacity := FMaxRow; - FVisibleGrid := IsVisible; - FCells.SetRange(FMaxCol, FMaxRow); -end; - -procedure TcxXLSExportProvider.SetRowHeight(const ARow, AHeight: Integer); -var - ARowInfo: PWordArray; -const - RowRecSize = 16; -begin - if ARow >= cxXLSMaxRow then Exit; - ARowInfo := AllocMem(RowRecSize + SizeOf(Word)); - ARowInfo^[0] := RowRecSize; - ARowInfo^[1] := ARow; - ARowInfo^[3] := $0100; - ARowInfo^[4] := Round(AHeight * 20 / (1.325 * ScaledFactor)); - ARowInfo^[7] := $01C0; - ARowInfo^[8] := $0F; - FRowStyles.Add(ARowInfo); -end; - -procedure TcxXLSExportProvider.SetCellDataGraphic( - const ACol, ARow: Integer; var AGraphic: TGraphic); -begin -end; - -function TcxXLSExportProvider.SupportGraphic: Boolean; -begin - Result := False; -end; - -procedure TcxXLSExportProvider.SetName(const AName: string); -begin - FSheetName := cxStrToUnicode(AName); -end; - -procedure TcxXLSExportProvider.SetRangeName(const AName: AnsiString; const ARange: TRect); -var - I: Integer; - ANameDef: array of Byte; - - procedure CreateNameDef; - begin - SetLength(ANameDef, 11); - ANameDef[0] := ptgArea3D; - PWord(@ANameDef[1])^ := 0; - PWord(@ANameDef[3])^ := ARange.Top and $FFFF; - PWord(@ANameDef[5])^ := ARange.Bottom and $FFFF; - PWord(@ANameDef[7])^ := ARange.Left and $FF; - PWord(@ANameDef[9])^ := ARange.Right and $FF; - end; - -begin - FRangeName := AName; - FNamedRange := ARange; - if AName <> '' then - begin - SetLength(FRangeNameBytes, 19 + Length(AName) + 11); - FillChar(FRangeNameBytes[0], Length(FRangeNameBytes), 0); - PWordArray(@FRangeNameBytes[0])^[0] := XLS_NAME; - PWordArray(@FRangeNameBytes[0])^[1] := Length(FRangeNameBytes) - 4; - PWordArray(@FRangeNameBytes[0])^[2] := 0; - FRangeNameBytes[7] := Length(AName); - PWordArray(@FRangeNameBytes[8])^[0] := 11; - FRangeNameBytes[18] := 0; - Move(AName[1], FRangeNameBytes[19], Length(AName)); - I := 18 + Length(AName) + 2; - - FRangeNameBytes[I - 1] := ptgArea3d; - PWordArray(@FRangeNameBytes[I])^[0] := 0; - PWordArray(@FRangeNameBytes[I])^[1] := ARange.Top and $FFFF; - PWordArray(@FRangeNameBytes[I])^[2] := ARange.Bottom and $FFFF; - PWordArray(@FRangeNameBytes[I])^[3] := ARange.Left and $FF; - PWordArray(@FRangeNameBytes[I])^[4] := ARange.Right and $FF; - end - else - SetLength(FRangeNameBytes, 0); -end; - -function TcxXLSExportProvider.CalculateStoredSize: Integer; -var - ASize: Integer; -begin - Result := cxXLSDefaultDataSize; - Inc(Result, FStyles.GetFullSize); - Inc(Result, FFonts.GetFullSize); - Inc(Result, Length(FRangeNameBytes)); - Inc(Result, Length(FSheetName) * 2); - Inc(Result, FSST.PackedSize); - Inc(Result, FColStyles.FullSize); - Inc(Result, FRowStyles.FullSize); - Inc(Result, FCells.FullSize); - if FUnionCellsCount > 0 then - begin - ASize := FUnionCellsCount shl 3; - Result := Result + ASize + (Ceil(ASize / $2000) * 6); - end; -end; - -function TcxXLSExportProvider.xlsCheckColor(const AColor: Integer; - AItemType: TcxColorItemType): Word; -var - I, C: Integer; -const - DefaultColorValue: array[TcxColorItemType] of Word = ($7FFF, $40, $40, $40); -begin - Result := 0; - case AItemType of - ciFontColor: - if AColor = 0 then - Result := $7FFF; - ciBrushBKColor: - if AColor = cxWindowColor then - Result := $40; - ciBrushFGColor, ciBorderColor: - if AColor = 0 then - Result := $40; - end; - if Result > 0 then Exit; - for I := High(FPalette) downto 0 do - begin - if FPalette[I] = AColor then - begin - if I <= FUsedColors then - begin - if I <> FUsedColors then - begin - C := FPalette[FUsedColors]; - FPalette[FUsedColors] := FPalette[I]; - FPalette[I] := C; - end; - Result := FUsedColors + 8; - Dec(FUsedColors); - end - else - Result := I + 8; - Exit; - end; - end; - if FUsedColors >= 0 then - begin - FPalette[FUsedColors] := AColor; - Result := FUsedColors + 8; - Dec(FUsedColors); - end - else - Result := DefaultColorValue[AItemType]; -end; - -function TcxXLSExportProvider.xlsCheckPos(const ACol, ARow: Integer): Boolean; -begin - if (FMaxCol < 0) or (FMaxRow < 0) then - raise EcxExportData.Create(cxGetResString(@scxInvalidCellDimension)); - Result := (ACol < FMaxCol) and (ARow < FMaxRow) and (ACol >= 0) and (ARow >= 0); -end; - -procedure TcxXLSExportProvider.xlsCreateStyles; -var - I: Integer; -begin - for I := 0 to Length(FCells.FCellsList) - 1 do - begin - with FCells.FCellsList[I]^ do - begin - if (XF >= $10) and ((RecType and XLS_MergeState) <> XLS_MergeState) then - XF := xlsRegisterStyle(FStyleCache.Items[XF - $10], RecType); - end; - end; -end; - -function TcxXLSExportProvider.xlsRegisterFont(const AStyle: TcxCacheCellStyle): Integer; -var - AFont: PByteArray; - AWName: WideString; - ASize: Integer; -const - ABold: array[Boolean] of Word = ($190, $2BC); - AItalic: array[Boolean] of Word = (0, $02); - AStrikeOut: array[Boolean] of Word = (0, $08); -begin - with AStyle do - begin - ASize := StrLen(PChar(@AStyle.FontName)) shl 1 + 16; - AWName := PChar(@AStyle.FontName); - AFont := AllocMem(ASize + 6); - PWord(AFont)^ := ASize; - PWord(@AFont^[2])^ := FontSize * 20; - PWord(@AFont^[4])^ := AItalic[cfsItalic in FontStyle] or AStrikeOut[cfsStrikeOut in FontStyle]; - PWord(@AFont^[6])^ := xlsCheckColor(FontColor, ciFontColor); - PWord(@AFont^[8])^ := ABold[cfsBold in FontStyle]; - AFont^[12] := Byte(cfsUnderLine in FontStyle); - AFont^[14] := Byte(FontCharset); - AFont^[16] := Length(AWName); - AFont^[17] := 1; - Move(AWName[1], AFont^[18], AFont^[16] shl 1); - PInteger(@AFont^[ASize + 2])^ := cxExport.GetHashCode(AFont^[2], ASize); - end; - Result := FFonts.AddUniqueData(AFont) + 6; -end; - -function TcxXLSExportProvider.xlsRegisterStyle(const AStyle: TcxCacheCellStyle; - var AType: Word; IsMerge: Boolean = False): Integer; - - function GetPackedFillStyle(AStyle: Byte; AFgColor, ABkColor: Integer): Integer; - begin - Result := 0; - AFgColor := xlsCheckColor(AFGColor, ciBrushBKColor); - ABkColor := $41; - if AFgColor <> $40 then - PWordArray(@Result)^[0] := AStyle shl 10; - PWordArray(@Result)^[1] := (ABkColor and $7F shl 7) or (AFgColor and $7F); - end; - -var - XF: PByteArray; - I, W: Byte; -const - AColorShift: array[0..3] of Byte = (0, 7, 16, 23); - ALeftRightBorders: array[0..3] of Byte = (0, 2, 1, 3); - BordersWidth: array[Boolean] of Byte = (1, 5); - XFStyleState = $0400 or $0800 or $1000 or $2000 or $4000 or $8000; - XFSize = 20; -begin - XF := AllocMem(26); - Move(cxXLS_XF[15, 2], XF^, 22); - PWord(@XF^[2])^ := xlsRegisterFont(AStyle) and $FFFF; - PWord(@XF^[4])^ := FCells.PrepareCellStyle(AType); - PWord(@XF^[10])^ := PWord(@XF^[10])^ or XFStyleState; - with AStyle do - begin - PWord(@XF^[8])^ := (Byte(AlignText) + 1) or $8; - PWord(@XF^[10])^ := PWord(@XF^[10])^ or (Byte(IsMerge) shl 5); - for I := 0 to 3 do - begin - with Borders[ALeftRightBorders[I]] do - begin - if not IsDefault and (Width > 0) then - begin - if Width = 2 then - W := 2 - else - W := BordersWidth[Width > 2]; - PWord(@XF^[12])^ := PWord(@XF^[12])^ or (W shl (4 * I)); - PInteger(@XF^[14])^ := PInteger(@XF^[14])^ or - xlsCheckColor(Color, ciBorderColor) shl AColorShift[I]; - end; - end; - end; - if Byte(BrushStyle) <> 0 then - PInteger(@XF[18])^ := GetPackedFillStyle(Byte(BrushStyle), BrushBkColor, BrushFGColor); - end; - PInteger(@XF^[22])^ := cxExport.GetHashCode(XF^[2], 20); - Result := FStyles.AddUniqueData(XF); - Inc(Result, $11); -end; - -procedure TcxXLSExportProvider.xlsWriteBuf(const RecData: array of Byte); -begin - FStream.Write(RecData[0], Length(RecData)); -end; - -procedure TcxXLSExportProvider.xlsWriteBuf(const RecID: Word; - const RecData: array of Byte); -begin - FStream.WriteBuffer(RecID, SizeOf(RecID)); - FStream.Write(RecData[0], Length(RecData)); -end; - -procedure TcxXLSExportProvider.xlsWriteBuf(const RecID, DataSize: Word; - const RecData: array of Byte); -begin - FStream.WriteBuffer(RecID, SizeOf(RecID)); - FStream.WriteBuffer(DataSize, SizeOf(DataSize)); - FStream.WriteBuffer(RecData, DataSize); -end; - -procedure TcxXLSExportProvider.xlsWriteBuffer(const ARecData: array of Word); -begin - FStream.WriteBuffer(ARecData[0], Length(ARecData) shl 1); -end; - -procedure TcxXLSExportProvider.xlsWriteBuffer(const RecID, DataSize: Word; const RecData); -begin - FStream.WriteBuffer(RecID, SizeOf(RecID)); - FStream.Write(RecData, DataSize); -end; - -procedure TcxXLSExportProvider.xlsWriteHeader; -var - B: Byte; - I, APos: Integer; - ASheetPos: Integer; -begin - xlsCreateStyles; - FWorkBookWriter.CreateOLEStream(CalculateStoredSize, FStream); - APos := FStream.Position; - cxXLS_BOF[6] := $05; - xlsWriteBuf(cxXLS_BOF); - xlsWriteBuf(cxXLS_TabID); - xlsWriteBuf(cxXLS_Window1); - for I := 0 to 4 do - xlsWriteBuf(cxXLS_Font); - FFonts.SaveToStream(FStream); - FStream.WriteBuffer(cxXLS_XF, SizeOf(cxXLS_XF)); - FStyles.SaveToStream(FStream); - xlsWriteBuffer([XLS_Palette, SizeOf(FPalette) + 2, 56]); - FStream.WriteBuffer(FPalette, SizeOf(FPalette)); - FStream.WriteBuffer(cxXLS_STYLE[0], SizeOf(cxXLS_STYLE)); - ASheetPos := FStream.Position + 4; - xlsWriteBuffer([XLS_BoundSheet, Length(FSheetName) * 2 + 8, 0, 0, 0]); - B := Length(FSheetName); - FStream.WriteBuffer(B, SizeOf(B)); - B := 1; - FStream.WriteBuffer(B, SizeOf(B)); - FStream.WriteBuffer(FSheetName[1], Length(FSheetName) * 2); - // - FSST.SaveToStream(FStream); - xlsWriteBuf(cxXLS_SupBook); - xlsWriteBuf(cxXLS_ExternSheet); -// define range name - if Length(FRangeNameBytes) > 0 then - FStream.WriteBuffer(FRangeNameBytes[0], Length(FRangeNameBytes)); -// - xlsWriteBuf(cxXLS_EOF); - // - FStream.Seek(ASheetPos, soFrombeginning); - ASheetPos := FStream.Size - APos; - FStream.WriteBuffer(ASheetPos, SizeOf(ASheetPos)); - FStream.Seek(0, soFromEnd); -end; - -procedure TcxXLSExportProvider.xlsWriteWorkBook; -var - I: Integer; - C, ASize: Word; -const - VisibleGridState: array[Boolean] of Word = ($6B4, $6B6); -begin - // bof - cxXLS_BOF[6] := $10; - xlsWriteBuf(cxXLS_BOF); - // dimension - PIntArray(@cxXLS_Dimension)^[2] := FMaxRow{ + 1}; - PWordArray(@cxXLS_Dimension)^[7] := FMaxCol{ + 1}; - xlsWriteBuf(cxXLS_Dimension); - // window 2 - PWordArray(@cxXLS_WINDOW2)^[2] := VisibleGridState[FVisibleGrid]; - xlsWriteBuf(cxXLS_WINDOW2); - // Column, Row formatting and cells data - FColStyles.SaveToStream(FStream); - FRowStyles.SaveToStream(FStream); - FCells.SaveToStream(FStream); - if FUnionCellsCount > 0 then - begin - C := Min(FUnionCellsCount, 1024); - ASize := C shl 3 + 2; - xlsWriteBuffer([XLS_MergeCells, ASize, C]); - for I := 1 to FUnionCellsCount do - begin - FStream.WriteBuffer(FUnionCells^[I - 1], SizeOf(TcxMergeRect)); - if (I mod 1024) = 0 then - begin - C := Min(FUnionCellsCount - I, 1024); - ASize := C shl 3 + 2; - xlsWriteBuffer([XLS_MergeCells, ASize, C]); - end; - end; - end; - xlsWriteBuf(cxXLS_EOF); -end; - -{ TxlsCellsData } -destructor TcxXLSCellsData.Destroy; -var - I: Integer; -begin - try - for I := 0 to Length(FCellsList) - 1 do - FreeMem(FCellsList[I]); - finally - inherited Destroy; - end; -end; - -procedure TcxXLSCellsData.SaveToStream(AStream: TStream); -var - I: Integer; - ACell: PcxXLSCell; -begin - for I := 0 to Length(FCellsList) - 1 do - begin - ACell := FCellsList[I]; - ACell^.RecType := ACell^.RecType and not XLS_MergeState; - if ACell^.RecType <> 0 then - AStream.WriteBuffer(ACell^, ACell^.RecSize + 4); - end; -end; - -function TcxXLSCellsData.GetCell(const ACol, ARow: Integer): PcxXLSCell; -begin - Result := FCellsList[FCellPerCol * ACol + ARow]; -end; - -function TcxXLSCellsData.PrepareCellStyle(var AType: Word): Word; -const - AFormats: array[0..3] of Word = ($16, $0E, $15, $07); -begin - if (AType and $1000) <> 0 then - begin - Result := AFormats[AType xor $1000]; - AType := XLS_Number; - end - else - Result := 0; -end; - -function TcxXLSCellsData.ReallocCellData(const ACol, ARow: Integer; AVarDataSize: Integer = 0): PcxXLSCell; -var - AIndex: Integer; -begin - AIndex := FCellPerCol * ACol + ARow; - Result := FCellsList[AIndex]; - ReallocMem(Result, cxXLSBlankCellSize + AVarDataSize); - FCellsList[AIndex] := Result; - Result^.RecSize := AVarDataSize + 6; -end; - -procedure TcxXLSCellsData.SetCellDataBoolean(const ACol, ARow: Integer; - const AValue: Boolean); -begin - with GetCell(ACol, ARow)^ do - begin - FixSetRecType(RecType, XLS_BoolErr); - RecSize := cxXLSBlankCellSize + 2; - BoolErrValue := AValue; - ErrFlag := False; - end; -end; - -procedure TcxXLSCellsData.SetCellDataBlank(const ACol, ARow: Integer); -begin - with GetCell(ACol, ARow)^ do - begin - if RecType <> XLS_Blank then - begin - FixSetRecType(RecType, XLS_Blank); - RecSize := cxXLSBlankCellSize - end; - end; -end; - -procedure TcxXLSCellsData.SetCellDataCurrency(const ACol, ARow: Integer; - const AValue: Currency); -begin - with GetCell(ACol, ARow)^ do - begin - FixSetRecType(RecType, XLS_Currency); - RecSize := cxXLSBlankCellSize + SizeOf(Double); - Num := AValue; - end; -end; - -procedure TcxXLSCellsData.SetCellDataDateTime(const ACol, ARow: Integer; - const AValue: TDateTime); -var - V: Double; -begin - with GetCell(ACol, ARow)^ do - begin - V := AValue; - FixSetRecType(RecType, GetDateTimeFormat(V)); - RecSize := cxXLSBlankCellSize + SizeOf(Double); - Num := V; - end; -end; - -procedure TcxXLSCellsData.SetCellDataDouble( - const ACol, ARow: Integer; const AValue: Double); -begin - with GetCell(ACol, ARow)^ do - begin - FixSetRecType(RecType, XLS_Number); - RecSize := cxXLSBlankCellSize + SizeOf(Double); - Num := AValue; - end; -end; - -procedure TcxXLSCellsData.SetCellDataInteger( - const ACol, ARow: Integer; const AValue: Integer); -begin - SetCellDataDouble(ACol, ARow, AValue); -end; - -procedure TcxXLSCellsData.SetCellDataStringA( - const ACol, ARow: Integer; const AText: string); -begin - with ReallocCellData(ACol, ARow, Length(AText) + 3)^ do - begin - FixSetRecType(RecType, XLS_Label); - StrLen := Length(AText); - StrType := False; - Move(AText[1], StrDataA[0], StrLen); - end; -end; - -procedure TcxXLSCellsData.SetCellDataStringW( - const ACol, ARow: Integer; const AText: Widestring); -begin - with ReallocCellData(ACol, ARow, Length(AText) shl 1 + 3)^ do - begin - FixSetRecType(RecType, XLS_Label); - StrLen := Length(AText); - StrType := True; - Move(AText[1], StrDataA[0], StrLen shl 1); - end; -end; - -procedure TcxXLSCellsData.SetCellDataSSTString(const ACol, ARow, AIndex: Integer); -begin - with GetCell(ACol, ARow)^ do - begin - FixSetRecType(RecType, XLS_LabelSST); - Inc(RecSize, SizeOf(Integer)); - SSTIndex := AIndex; - end; -end; - -procedure TcxXLSCellsData.SetRange(const AColCount, ARowCount: Integer); -var - I, J, AIndex: Integer; -begin - SetLength(FCellsList, AColCount * ARowCount); - AIndex := 0; - FCellPerCol := ARowCount; - for I := 0 to AColCount - 1 do - for J := 0 to ARowCount - 1 do - begin - GetMem(FCellsList[AIndex], cxXLSBlankCellSize + SizeOf(Double)); - with FCellsList[AIndex]^ do - begin - RecType := XLS_Blank; - RecSize := 6; - Col := I; - Row := J; - XF := $10; - end; - Inc(AIndex); - end; -end; - -function TcxXLSCellsData.GetFullSize: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Length(FCellsList) - 1 do - begin - with FCellsList[I]^ do - begin - if RecType <> 0 then - begin - Inc(Result, RecSize); - Inc(Result, 4); - end; - end; - end; -end; - -{ TSSTStringTable } -constructor TcxXLSSharedStringTable.Create; -begin - FOptimaze := Optimization = optBySize; - Clear; -end; - -destructor TcxXLSSharedStringTable.Destroy; -begin - Clear; - inherited Destroy; -end; - -function TcxXLSSharedStringTable.Add(AString: WideString): Integer; -begin - if Length(AString) > 4096 then - SetLength(AString, 4096); - Result := IndexOf(AString); - if Result = -1 then - begin - Result := UniqueStringCount; - InsertStr(AString); - Inc(PInteger(@FSST[0].Data[4])^); - end; - Inc(PInteger(@FSST[0].Data[0])^); -end; - -procedure TcxXLSSharedStringTable.Clear; -begin - SetLength(FSST, 0); - SetLength(FStringsInfo, 0); - FillChar(FExtSST, SizeOf(FExtSST), 0); - FExtSST.RecType := XLS_ExtSST; -end; - -procedure TcxXLSSharedStringTable.SaveToStream(AStream: TStream; APosition: Integer = -1); -var - I: Integer; -begin - if APosition = -1 then - APosition := AStream.Position; - CreateExtSST(APosition); - with AStream do - begin - for I := 0 to Length(FSST) - 1 do - if FExtSST.DataSize > 0 then - WriteBuffer(FSST[I].RecType, FSST[I].DataSize + 4); - if FExtSST.DataSize > 0 then - WriteBuffer(FExtSST.RecType, FExtSST.DataSize + 4); - end; -end; - -procedure TcxXLSSharedStringTable.AddStringToBlock(ASource: Pointer; var ADest: TSSTBlock; ASize: Word); -begin - with ADest do - begin - Data[DataSize] := 1; - Inc(DataSize, 1); - Move(ASource^, Data[DataSize], ASize); - Inc(DataSize, ASize); - end; -end; - -procedure TcxXLSSharedStringTable.CreateExtSST(ASSTOffset: Integer); - - function GetSkipSize(ABlock: Word): Integer; - var - I: Integer; - begin - Result := 4; - for I := 1 to ABlock - 1 do - Result := Result + FSST[I].DataSize; - end; - -var - ABlocksCount: Integer; - AStringCount: Word; - I: Integer; -begin - if Length(FSST) = 0 then Exit; - AStringCount := 8; - ABlocksCount := 1; - while (UniqueStringCount - AStringCount * ABlocksCount) > 0 do - begin - Inc(AStringCount, 8); - if ABlocksCount < 127 then - if (UniqueStringCount - AStringCount * ABlocksCount) > 0 then Inc(ABlocksCount); - end; - while ((ABlocksCount - 1)* AStringCount) > UniqueStringCount do - Dec(ABlocksCount); - FExtSST.DataSize := 2 + ABlocksCount * 8; - FExtSST.StringPerBlock := AStringCount; - for I := 0 to ABlocksCount - 1 do - with FStringsInfo[I * AStringCount] do - FExtSST.Data[I].StreamOffset := ASSTOffset + GetSkipSize(Block) + Offset; -end; - -function TcxXLSSharedStringTable.GetPackedSize: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Length(FSST) - 1 do - Inc(Result, FSST[I].DataSize + 4); - if Result <> 0 then - begin - CreateExtSST(0); - Inc(Result, FExtSST.DataSize + 4); - end; -end; - -function TcxXLSSharedStringTable.IndexOf(const AString: WideString): Integer; - - function CheckString(ABlock, AOffset, ASize: Word): Boolean; - var - AStrPtr: PByteArray; - ALen: Integer; - AStrPos: Integer; - begin - AStrPtr := @AString[1]; - if (ASize + AOffset) <= FSST[ABlock].DataSize then - Result := CompareMem(@FSST[ABlock].Data[AOffset], AStrPtr, ASize) - else - begin - Result := True; - AStrPos := 0; - while ASize > 0 do - begin - with FSST[ABlock] do - begin - ALen := (DataSize - AOffset); - if ALen < ASize then - begin - Result := Result and CompareMem(@Data[AOffset], @AStrPtr^[AStrPos], ALen); - Dec(ASize, ALen); - Inc(AStrPos, ALen); - AOffset := 1; - Inc(ABlock); - end - else - begin - Result := Result and CompareMem(@Data[AOffset], @AStrPtr^[AStrPos], ASize); - Break; - end; - end; - end; - end; - end; - -var - I: Integer; - ASrcLen: Word; - AHashCode: Word; - -begin - if not FOptimaze then - begin - Result := -1; - Exit; - end; - ASrcLen := Length(AString); - if ASrcLen > 32768 then - ASrcLen := 32768; - Result := -1; - ASrcLen := ASrcLen shl 1; - AHashCode := cxExport.GetHashCode(Pointer(@AString[1])^, ASrcLen); - for I := 0 to UniqueStringCount - 1 do - begin - with FStringsInfo[I] do - begin - if (HashCode = AHashCode) and (ASrcLen = StrSize) then - if CheckString(Block, Offset + 3, StrSize) then - begin - Result := I; - Break; - end; - end; - end; -end; - -procedure TcxXLSSharedStringTable.InsertStr(const AString: WideString); - - function AddBlock: Integer; - begin - Result := Length(FSST); - SetLength(FSST, Result + 1); - FillChar(FSST[Result], SizeOf(TSSTBlock), 0); - FSST[Result].RecType := XLS_Continue; - end; - - procedure AddStringInfo(ABlock, AOffset, ASize: Word); - var - AInfoCount: Integer; - AInfoIndex: Integer; - begin - AInfoCount := Length(FStringsInfo); - AInfoIndex := UniqueStringCount; - if AInfoCount <= UniqueStringCount then - SetLength(FStringsInfo, AInfoCount + 512); - with FStringsInfo[AInfoIndex] do - begin - HashCode := cxExport.GetHashCode(Pointer(@AString[1])^, ASize); - StrSize := ASize; - Block := ABlock; - Offset := AOffset; - end; - end; - -var - AEndBlock: SmallInt; - AStrSize: Word; - AWriteSize: Word; - AOffset: Word; - -begin - AEndBlock := Length(FSST) - 1; - if AEndBlock < 0 then - begin - AEndBlock := AddBlock; - with FSST[AEndBlock] do - begin - RecType := XLS_SST; - DataSize := 8; - StringOffset := 8; - end; - end; - AStrSize := Length(AString); - if AStrSize > 32768 then - AStrSize := 32768; - AStrSize := AStrSize shl 1; - - if (FSST[AEndBlock].DataSize + 4) > cxXLSMaxBlockSize then - AEndBlock := AddBlock; - AWriteSize := cxXLSMaxBlockSize - (FSST[AEndBlock].DataSize + 3); - if AWriteSize > AStrSize then - AWriteSize := AStrSize - else - begin - if (AWriteSize and $1) <> 0 then - Dec(AWriteSize); - end; - with FSST[AEndBlock] do - begin - if StringCount = 0 then - StringOffset := DataSize; - AddStringInfo(AEndBlock, DataSize, AStrSize); - Inc(StringCount); - PWord(@Data[DataSize])^ := AStrSize shr 1; - Inc(DataSize, 2); - end; - AddStringToBlock(@AString[1], FSST[AEndBlock], AWriteSize); - AOffset := 0; - while (AStrSize - AWriteSize) > 0 do - begin - Inc(AOffset, AWriteSize); - Dec(AStrSize, AWriteSize); - AEndBlock := AddBlock; - if AStrSize > (cxXLSMaxBlockSize - 1) then - AWriteSize := cxXLSMaxBlockSize - 1 - else - AWriteSize := AStrSize; - AddStringToBlock(@PByteArray(@AString[1])^[AOffset], FSST[AEndBlock], AWriteSize); - end; -end; - -function TcxXLSSharedStringTable.GetStringCount: Integer; -begin - if Length(FSST) > 0 then - Result := PIntArray(@FSST[0].Data)^[0] - else - Result := 0; -end; - -function TcxXLSSharedStringTable.GetUniqueStringCount: Integer; -begin - if Length(FSST) > 0 then - Result := PIntArray(@FSST[0].Data)^[1] - else - Result := 0; -end; - -{ TxlsRecordList } - -constructor TcxXLSRecordsList.Create(const RecordID: Word); -begin - inherited Create; - FID := RecordID; -end; - -destructor TcxXLSRecordsList.Destroy; -begin - Clear; - inherited Destroy; -end; - -function TcxXLSRecordsList.AddData(const AData; DataSize: Word): Integer; -var - NewData: PByteArray; -begin - GetMem(NewData, DataSize + SizeOf(Word) + SizeOf(Integer)); - PWord(NewData)^ := DataSize; - PInteger(@NewData[DataSize + SizeOf(Word)])^ := cxExport.GetHashCode(AData, DataSize); - System.Move(AData, NewData^[SizeOf(Word)], DataSize); - Result := Add(NewData); -end; - -function TcxXLSRecordsList.AddUniqueData(var AData: PByteArray): Integer; -var - I: Integer; - Item: PByteArray; - AHashCode: Integer; - ASize: Word; -begin - AHashCode := PInteger(@AData^[PWord(AData)^ + 2])^; - ASize := PWord(AData)^; - for I := 0 to Count - 1 do - begin - Item := inherited Items[I]; - if (AHashCode = PInteger(@Item^[PWord(Item)^ + 2])^) and - CompareMem(Item, AData, ASize) then - begin - Result := I; - FreeMem(AData); - AData := nil; - Exit; - end; - end; - Result := Add(AData); -end; - -procedure TcxXLSRecordsList.Clear; -var - I: Integer; -begin - try - for I := 0 to Count - 1 do - FreeMem(inherited Items[I]); - finally - inherited Clear; - end; -end; - -procedure TcxXLSRecordsList.SaveToStream(AStream: TStream); -var - I: Integer; - AItem: Pointer; -begin - for I := 0 to Count - 1 do - begin - AStream.WriteBuffer(FID, SizeOf(Word)); - AItem := GetRealItem(I); - AStream.WriteBuffer(AItem^, PWord(AItem)^ + SizeOf(Word)); - end; -end; - -function TcxXLSRecordsList.GetFullSize: Integer; -var - I: Integer; -begin - Result := Count shl 2; - for I := 0 to Count - 1 do - Inc(Result, PWord(inherited Items[I])^); -end; - -function TcxXLSRecordsList.GetItem(AIndex: Integer): Pointer; -begin - Result := inherited Items[AIndex]; - Inc(Integer(Result), SizeOf(Word)); -end; - -function TcxXLSRecordsList.GetItemSize(AIndex: Integer): Integer; -begin - Result := PWord(inherited Items[AIndex])^; -end; - -function TcxXLSRecordsList.GetRealItem(AIndex: Integer): Pointer; -begin - Result := inherited Items[AIndex]; -end; - -{ TcxWorkBookReader } -procedure TcxXLSWorkBookWriter.CreateOLEStream(ADataSize: Integer; - ADstStream: TStream); -var - ASize: Integer; -begin - FBuffer := nil; - Check((ADataSize > 0) and (ADstStream <> nil)); - FStreamSize := ADataSize; - FSectCount := RoundDIV(FStreamSize, oleBigBlockSize); - ASize := RoundDIV(FSectCount, oleBlockIDPerBigBlock) + 3; - FIsSmallFile := FStreamSize < oleMiniSectorMaxSize; - if not IsSmallFile then - ReallocBuffer(oleBigBlockSize * (ASize + RoundDiv(ASize, oleMaxBlockIDInBigBlock))) - else - ReallocBuffer(4 shl oleBigBlockShift); - CreateHeader; - CreateDIR; - CreateFAT; - try - ADstStream.WriteBuffer(FBuffer^, Size); - finally - ReallocBuffer(oleEmpty); - end; -end; - -procedure TcxXLSWorkBookWriter.Check(ACondition: Boolean); -begin - if not ACondition then - raise EcxExportData.Create(cxGetResString(@scxWorkbookWrite)); -end; - -procedure TcxXLSWorkBookWriter.CreateDIF; -var - I, AId: Integer; - ACurDIF: PcxFATSector; - ACurSect: Integer; - AIndex, ASectorID: Integer; -begin - AIndex := 0; - ACurSect := 0; - ACurDIF := DIF[ACurSect]; - AId := 0; - with Header^ do - begin - for I := oleSectorsInMasterFAT - 1 to CountSectFAT - 2 do - begin - ASectorID := I - 108; - if AIndex = oleMaxBlockIdInBigBlock then - begin - ACurDIF^[oleMaxBlockIdInBigBlock] := ASectorID + 111 + AId; - ACurDIF := DIF[ACurSect + 1]; - AIndex := 0; - Inc(ACurSect); - end; - if ((ASectorID + AId - 1) mod oleBlockIDPerBigBlock) = 0 then - Inc(AId); - ACurDIF^[AIndex] := ASectorID + 110 + AId; - Inc(AIndex); - end; - FillChar(ACurDIF^[AIndex], (oleBlockIDPerBigBlock - AIndex) * oleIndexSize, oleUnused); - end; -end; - -procedure TcxXLSWorkBookWriter.CreateDIR; - - procedure CreateEntry(const AName: WideString; - AType: TcxOLEDIREntryType; AEntry: PcxOLEDIREntry); - begin - with AEntry^ do - begin - EntryType := AType; - BFlag := Byte(AType = ET_STREAM); - LeftSib := LongWord(oleUnused); - RightSib := LongWord(oleUnused); - ChildSib := LongWord(oleUnused); - if AType in [ET_STREAM, ET_ROOT] then - begin - NameLen := (Length(AName) + 1) * 2; - if NameLen > 2 then - Move(AName[1], Name, NameLen - 2); - end; - end; - end; - -begin - FillChar(DIR[0]^, oleBigBlockSize, oleEmpty); - CreateEntry(oleRoot, ET_ROOT, DIR[0]); - CreateEntry(oleWorkBook, ET_STREAM, DIR[1]); - DIR[0]^.ChildSib := 1; - if not IsSmallFile then - begin - DIR[0]^.StartSector := oleEndOfChain; - with Header^ do - DIR[1]^.StartSector := CountSectFAT + CountSectDIF + 1; - end - else - begin - DIR[0]^.StartSector := 3; - DIR[0]^.Size := FSectCount shl oleBigBlockShift; - end; - DIR[1]^.Size := FStreamSize; -end; - -procedure TcxXLSWorkBookWriter.CreateFAT; -var - I: Integer; -begin - with Header^ do - begin - if not FIsSmallFile then - begin - for I := 0 to Min(CountSectFAT, oleSectorsInMasterFAT) - 1 do - begin - if I = 0 then - Header^.SectFAT[0] := 0 - else - Header^.SectFAT[I] := I + 1; - end; - if CountSectDIF > 0 then - CreateDIF; - CreateLocalFAT; - end - else - begin - SectFAT[0] := 0; - CreateSmallFAT; - end; - end; -end; - -procedure TcxXLSWorkBookWriter.CreateHeader; -var - ACount: Integer; -begin - with Header^ do - begin - Move(oleHeaderTemplate, Header^, oleBigBlockSize - SizeOf(SectFAT)); - FillChar(SectFAT, SizeOf(SectFAT), oleUnused); - if not FIsSmallFile then - begin - CountSectFAT := RoundDIV(FSectCount + 3, oleMaxBlockIdInBigBlock); - if CountSectFAT > oleSectorsInMasterFAT then - begin - ACount := CountSectFAT - oleSectorsInMasterFAT; - CountSectDIF := RoundDIV(ACount, oleMaxBlockIdInBigBlock); - SectDIFStart := oleSectorsInMasterFAT + oleReservedSectorCount; - end; - ReallocBuffer((CountSectFAT + CountSectDIF + oleReservedSectorCount) shl oleBigBlockShift); - end - else - begin - SectMiniFATStart := 2; - CountSectMiniFAT := 1; - end; - end; -end; - -procedure TcxXLSWorkBookWriter.CreateSmallFAT; -var - ABigFAT: PcxFATSector; - ASmallFAT: PcxFATSector; - ABlockCount: Integer; - I: Integer; -begin - ABigFAT := @FBuffer^[oleBigBlockSize]; - ASmallFAT := @FBuffer^[3 shl oleBigBlockShift]; - ABlockCount := RoundDiv(FStreamSize, oleSmallBlockSize); - FillChar(ABigFAT^, oleBigBlockSize, oleUnused); - ABigFAT^[0] := oleSpecBlock; - ABigFAT^[1] := oleEndOfChain; - ABigFAT^[2] := oleEndOfChain; - I := 3; - while (I - 3) < (FSectCount - 1) do - begin - ABigFAT^[I] := I + 1; - Inc(I); - end; - ABigFAT^[I] := oleEndOfChain; - for I := 0 to ABlockCount - 2 do - ASmallFAT^[I] := I + 1; - ASmallFAT^[ABlockCount - 1] := oleEndOfChain; - FillChar(ASmallFAT^[ABlockCount], - (oleBlockIDPerBigBlock - ABlockCount) * oleIndexSize, oleUnused); -end; - -procedure TcxXLSWorkBookWriter.ReallocBuffer(const ASize: Integer); -begin - FBufferSize := (RoundDIV(ASize, oleMiniSectorMaxSize) + 1) * oleMiniSectorMaxSize; - try - if FBufferSize > FCapacity then - begin - FCapacity := FBufferSize; - ReallocMem(FBuffer, FCapacity); - end - finally - if ASize = 0 then - begin - FreeMem(FBuffer, FCapacity); - FBuffer := nil; - end; - FBufferSize := ASize; - end; -end; - -procedure TcxXLSWorkBookWriter.CreateLocalFAT; -var - I: Integer; - AIndex: Integer; - ASector: Integer; - ACurSector: PcxFATSector; - ADIF: Integer; - - procedure IncCurrentIndexAndSetValue(const Value: Integer); - begin - ACurSector^[AIndex] := Value; - if AIndex = oleMaxBlockIdInBigBlock then - begin - Inc(ASector); - ACurSector := FAT[ASector]; - AIndex := 0; - end - else - Inc(AIndex); - end; - -begin - AIndex := 0; - ASector := 0; - ADIF := 0; - ACurSector := FAT[ASector]; - IncCurrentIndexAndSetValue(oleSpecBlock); - IncCurrentIndexAndSetValue(oleEndOfChain); - with Header^ do - begin - for I := 1 to CountSectFAT + CountSectDIF - 1 do - begin - if CountSectDIF > 0 then - if (ADIF + SectDIFStart - 1) = I then - begin - Inc(ADIF, oleBlockIDPerBigBlock); - IncCurrentIndexAndSetValue(oleDIFBlock); - Continue; - end; - IncCurrentIndexAndSetValue(oleSpecBlock); - end; - end; - with DIR[1]^ do - for I := StartSector + 1 to StartSector + FSectCount - 1 do - IncCurrentIndexAndSetValue(I); - IncCurrentIndexAndSetValue(oleEndOfChain); - if AIndex <> 0 then - begin - I := oleBlockIDPerBigBlock - AIndex; - if I > 0 then - FillChar(ACurSector^[AIndex], I * 4, oleUnused); - end; -end; - -function TcxXLSWorkBookWriter.GetDIFSector(ASector: Integer): PcxFATSector; -begin - Result := @PcxFATSectors(FBuffer)^[Header^.SectDIFStart + - (ASector * oleBlockIDPerBigBlock) + 1]; -end; - -function TcxXLSWorkBookWriter.GetDIREntry(AIndex: Integer): PcxOLEDIREntry; -begin - Result := @FBuffer[oleReservedSectorCount shl oleBigBlockShift + - AIndex * oleDIRBlockSize]; -end; - -function TcxXLSWorkBookWriter.GetHeader: PcxOleFileHeader; -begin - Result := PcxOleFileHeader(FBuffer); -end; - -function TcxXLSWorkBookWriter.GetFATSector(ASector: Integer): PcxFATSector; -var - ADIFBlock: Integer; -begin - if ASector = 0 then - Result := @PcxFATSectors(FBuffer)^[1] - else - begin - if ASector < oleSectorsInMasterFAT then - Result := @PcxFATSectors(FBuffer)^[ASector + 2] - else - begin - ASector := ASector - oleSectorsInMasterFAT; - ADIFBlock := 0; - while (ASector - oleMaxBlockIdInBigBlock) >= 0 do - begin - Dec(ASector, oleMaxBlockIdInBigBlock); - Inc(ADIFBlock); - end; - Result := @PcxFATSectors(FBuffer)^[DIF[ADIFBlock]^[ASector] + 1]; - end; - end; -end; - -{$IFDEF WIN32} -var - DC: HDC; -{$ENDIF} - -initialization - TcxExport.RegisterProviderClass(TcxXLSExportProvider); - -{$IFDEF WIN32} - DC := GetDC(0); - try - ScaledFactor := GetDeviceCaps(DC, LOGPIXELSY) / 96; - if ScaledFactor < 1 then ScaledFactor := 1; - finally - ReleaseDC(0, DC) - end; -{$ENDIF} - -end. diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC10.bpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC10.bpk deleted file mode 100644 index bc282c75..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC10.bpk +++ /dev/null @@ -1,192 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxGDIPlusC10.bpl -OBJFILES = dxGDIPlusClasses.obj dxGDIPlusAPI.obj dxGDIPlusC10.obj -RESFILES = dxGDIPlusC10.res -MAINSOURCE = dxGDIPlusC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressGDI+ Library by Developer Express Inc." -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC10.cpp b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC10.cpp deleted file mode 100644 index 718967bf..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC10.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxGDIPlusC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10"); -USEUNIT("dxGDIPlusClasses.pas"); -USEUNIT("dxGDIPlusAPI.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC10.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC10.res deleted file mode 100644 index 017f80d3..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC10.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC11.bpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC11.bpk deleted file mode 100644 index 688d0063..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC11.bpk +++ /dev/null @@ -1,192 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxGDIPlusC11.bpl -OBJFILES = dxGDIPlusClasses.obj dxGDIPlusAPI.obj dxGDIPlusC11.obj -RESFILES = dxGDIPlusC11.res -MAINSOURCE = dxGDIPlusC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressGDI+ Library by Developer Express Inc." -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC11.cpp b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC11.cpp deleted file mode 100644 index e6ae588e..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC11.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxGDIPlusC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEUNIT("dxGDIPlusClasses.pas"); -USEUNIT("dxGDIPlusAPI.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC11.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC11.res deleted file mode 100644 index 6be5524a..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC11.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC12.bpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC12.bpk deleted file mode 100644 index f3d8bafe..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC12.bpk +++ /dev/null @@ -1,192 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxGDIPlusC12.bpl -OBJFILES = dxGDIPlusClasses.obj dxGDIPlusAPI.obj dxGDIPlusC12.obj -RESFILES = dxGDIPlusC12.res -MAINSOURCE = dxGDIPlusC12.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dxCoreC12.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressGDI+ Library by Developer Express Inc." -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC12.cpp b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC12.cpp deleted file mode 100644 index 54784182..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC12.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxGDIPlusC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEUNIT("dxGDIPlusClasses.pas"); -USEUNIT("dxGDIPlusAPI.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC12.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC12.res deleted file mode 100644 index 7a39b33c..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC12.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC14.bpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC14.bpk deleted file mode 100644 index 1ad24ee6..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC14.bpk +++ /dev/null @@ -1,192 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxGDIPlusC14.bpl -OBJFILES = dxGDIPlusClasses.obj dxGDIPlusAPI.obj dxGDIPlusC14.obj -RESFILES = dxGDIPlusC14.res -MAINSOURCE = dxGDIPlusC14.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dxCoreC14.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressGDI+ Library by Developer Express Inc." -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC14.cpp b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC14.cpp deleted file mode 100644 index cb76ccfc..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC14.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxGDIPlusC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEUNIT("dxGDIPlusClasses.pas"); -USEUNIT("dxGDIPlusAPI.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC14.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC14.res deleted file mode 100644 index 1689a4f8..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC14.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC5.bpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC5.bpk deleted file mode 100644 index f3b55d7f..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC5.bpk +++ /dev/null @@ -1,193 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxGDIPlusC5.bpl -OBJFILES = dxGDIPlusClasses.obj dxGDIPlusAPI.obj dxGDIPlusC5.obj -RESFILES = dxGDIPlusC5.res -MAINSOURCE = dxGDIPlusC5.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = vcl50.bpi dxCoreC5.bpi -SPARELIBS = vcl50.lib dxCoreC5.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressGDI+ Library by Developer Express Inc." -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC5.cpp b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC5.cpp deleted file mode 100644 index 2b0fd863..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC5.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxGDIPlusC5.res"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("dxCoreC5.bpi"); -USEUNIT("dxGDIPlusClasses.pas"); -USEUNIT("dxGDIPlusAPI.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC5.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC5.res deleted file mode 100644 index 5a93571a..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC5.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC6.bpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC6.bpk deleted file mode 100644 index 2f5d98b5..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC6.bpk +++ /dev/null @@ -1,192 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxGDIPlusC6.bpl -OBJFILES = dxGDIPlusClasses.obj dxGDIPlusAPI.obj dxGDIPlusC6.obj -RESFILES = dxGDIPlusC6.res -MAINSOURCE = dxGDIPlusC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi dxCoreC6.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressGDI+ Library by Developer Express Inc." -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC6.cpp b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC6.cpp deleted file mode 100644 index 07402da6..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC6.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxGDIPlusC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEUNIT("dxGDIPlusClasses.pas"); -USEUNIT("dxGDIPlusAPI.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC6.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC6.res deleted file mode 100644 index 2c04c6fa..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusC6.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD10.dpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD10.dpk deleted file mode 100644 index 094aaf49..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD10.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxGDIPlusD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressGDI+ Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl, - dxCoreD10; - -contains - dxGDIPlusAPI, - dxGDIPlusClasses; - -end. - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD10.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD10.res deleted file mode 100644 index f9d7dc9f..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD10.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD11.dpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD11.dpk deleted file mode 100644 index a083a0cb..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD11.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxGDIPlusD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressGDI+ Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl, - dxCoreD11; - -contains - dxGDIPlusAPI, - dxGDIPlusClasses; - -end. - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD11.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD11.res deleted file mode 100644 index d015c4d0..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD11.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD12.dpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD12.dpk deleted file mode 100644 index 873626fa..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD12.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxGDIPlusD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressGDI+ Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl, - dxCoreD12; - -contains - dxGDIPlusAPI, - dxGDIPlusClasses; - -end. - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD12.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD12.res deleted file mode 100644 index a7d0e51b..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD12.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD14.dpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD14.dpk deleted file mode 100644 index 39be53a9..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD14.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxGDIPlusD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressGDI+ Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl, - dxCoreD14; - -contains - dxGDIPlusAPI, - dxGDIPlusClasses; - -end. - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD14.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD14.res deleted file mode 100644 index 3ec92bb7..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD14.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD5.dpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD5.dpk deleted file mode 100644 index f6bba938..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD5.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxGDIPlusD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressGDI+ Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxCoreD5; - -contains - dxGDIPlusAPI, - dxGDIPlusClasses; - -end. - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD5.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD5.res deleted file mode 100644 index b6c4870c..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD5.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD6.dpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD6.dpk deleted file mode 100644 index db62890c..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxGDIPlusD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressGDI+ Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl, - dxCoreD6; - -contains - dxGDIPlusAPI, - dxGDIPlusClasses; - -end. - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD6.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD6.res deleted file mode 100644 index e487e279..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD6.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD7.dpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD7.dpk deleted file mode 100644 index 038067e9..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxGDIPlusD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressGDI+ Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl, - dxCoreD7; - -contains - dxGDIPlusAPI, - dxGDIPlusClasses; - -end. - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD7.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD7.res deleted file mode 100644 index a5645175..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD7.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD9.dpk b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD9.dpk deleted file mode 100644 index 9af10414..00000000 --- a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD9.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxGDIPlusD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressGDI+ Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl, - dxCoreD9; - -contains - dxGDIPlusAPI, - dxGDIPlusClasses; - -end. - diff --git a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD9.res b/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD9.res deleted file mode 100644 index c382fe1f..00000000 Binary files a/internal/x.46/ExpressGDI+ Library/Packages/dxGDIPlusD9.res and /dev/null differ diff --git a/internal/x.46/ExpressGDI+ Library/Sources/cxVer.inc b/internal/x.46/ExpressGDI+ Library/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/ExpressGDI+ Library/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/ExpressGDI+ Library/Sources/dxGDIPlusAPI.pas b/internal/x.46/ExpressGDI+ Library/Sources/dxGDIPlusAPI.pas deleted file mode 100644 index 05e59b17..00000000 --- a/internal/x.46/ExpressGDI+ Library/Sources/dxGDIPlusAPI.pas +++ /dev/null @@ -1,1212 +0,0 @@ - -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ GDI+ Library } -{ } -{ Copyright (c) 2002-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE GDIPLUS LIBRARY AND ALL ACCOMPANYING } -{ VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxGDIPlusAPI; - -{$ALIGN ON} -{$MINENUMSIZE 4} - -{$I cxVer.inc} - - -interface - -(**************************************************************************\ -* -* GDI+ public header file -* -\**************************************************************************) - -uses - Windows, Graphics, Classes, SysUtils, ActiveX; - -const - QualityModeInvalid = -1; - QualityModeDefault = 0; - QualityModeLow = 1; // Best performance - QualityModeHigh = 2; // Best rendering quality - - InterpolationModeInvalid = QualityModeInvalid; - InterpolationModeDefault = QualityModeDefault; - InterpolationModeLowQuality = QualityModeLow; - InterpolationModeHighQuality = QualityModeHigh; - InterpolationModeBilinear = 3; - InterpolationModeBicubic = 4; - InterpolationModeNearestNeighbor = 5; - InterpolationModeHighQualityBilinear = 6; - InterpolationModeHighQualityBicubic = 7; - -// Alpha Compositing mode constants - CompositingModeSourceOver = 0; - CompositingModeSourceCopy = 1; - -// Alpha Compositing quality constants - CompositingQualityInvalid = QualityModeInvalid; - CompositingQualityDefault = QualityModeDefault; - CompositingQualityHighSpeed = QualityModeLow; - CompositingQualityHighQuality = QualityModeHigh; - CompositingQualityGammaCorrected = 3; - CompositingQualityAssumeLinear = 4; - - PixelFormat32bppPARGB = $E200B; - -type - TSingleDynArray = array of Single; - - // GDI+ base memory allocation class - TdxGPBase = class - public - class function NewInstance: TObject; override; - procedure FreeInstance; override; - end; - - TgpImageAbort = function: Bool; - -// Unit constants - Unit_ = ( - UnitWorld, // 0 -- World coordinate (non-physical unit) - UnitDisplay, // 1 -- Variable -- for PageTransform only - UnitPixel, // 2 -- Each unit is one device pixel. - UnitPoint, // 3 -- Each unit is a printer's point, or 1/72 inch. - UnitInch, // 4 -- Each unit is 1 inch. - UnitDocument, // 5 -- Each unit is 1/300 inch. - UnitMillimeter // 6 -- Each unit is 1 millimeter. - ); - TdxGPUnit = Unit_; - -// Fill mode constants - FillMode = ( - FillModeAlternate, // 0 - FillModeWinding // 1 - ); - TdxGPFillMode = FillMode; - -// Various wrap modes for brushes - WrapMode = ( - WrapModeTile, // 0 - WrapModeTileFlipX, // 1 - WrapModeTileFlipY, // 2 - WrapModeTileFlipXY, // 3 - WrapModeClamp // 4 - ); - TdxGPWrapMode = WrapMode; - -// Various hatch styles - HatchStyle = ( - HatchStyleHorizontal, // = 0, - HatchStyleVertical, // = 1, - HatchStyleForwardDiagonal, // = 2, - HatchStyleBackwardDiagonal, // = 3, - HatchStyleCross, // = 4, - HatchStyleDiagonalCross, // = 5, - HatchStyle05Percent, // = 6, - HatchStyle10Percent, // = 7, - HatchStyle20Percent, // = 8, - HatchStyle25Percent, // = 9, - HatchStyle30Percent, // = 10, - HatchStyle40Percent, // = 11, - HatchStyle50Percent, // = 12, - HatchStyle60Percent, // = 13, - HatchStyle70Percent, // = 14, - HatchStyle75Percent, // = 15, - HatchStyle80Percent, // = 16, - HatchStyle90Percent, // = 17, - HatchStyleLightDownwardDiagonal, // = 18, - HatchStyleLightUpwardDiagonal, // = 19, - HatchStyleDarkDownwardDiagonal, // = 20, - HatchStyleDarkUpwardDiagonal, // = 21, - HatchStyleWideDownwardDiagonal, // = 22, - HatchStyleWideUpwardDiagonal, // = 23, - HatchStyleLightVertical, // = 24, - HatchStyleLightHorizontal, // = 25, - HatchStyleNarrowVertical, // = 26, - HatchStyleNarrowHorizontal, // = 27, - HatchStyleDarkVertical, // = 28, - HatchStyleDarkHorizontal, // = 29, - HatchStyleDashedDownwardDiagonal, // = 30, - HatchStyleDashedUpwardDiagonal, // = 31, - HatchStyleDashedHorizontal, // = 32, - HatchStyleDashedVertical, // = 33, - HatchStyleSmallConfetti, // = 34, - HatchStyleLargeConfetti, // = 35, - HatchStyleZigZag, // = 36, - HatchStyleWave, // = 37, - HatchStyleDiagonalBrick, // = 38, - HatchStyleHorizontalBrick, // = 39, - HatchStyleWeave, // = 40, - HatchStylePlaid, // = 41, - HatchStyleDivot, // = 42, - HatchStyleDottedGrid, // = 43, - HatchStyleDottedDiamond, // = 44, - HatchStyleShingle, // = 45, - HatchStyleTrellis, // = 46, - HatchStyleSphere, // = 47, - HatchStyleSmallGrid, // = 48, - HatchStyleSmallCheckerBoard, // = 49, - HatchStyleLargeCheckerBoard, // = 50, - HatchStyleOutlinedDiamond, // = 51, - HatchStyleSolidDiamond, // = 52, - - HatchStyleTotal // = 53, - ); - -const - HatchStyleLargeGrid = HatchStyleCross; // 4 - HatchStyleMin = HatchStyleHorizontal; - HatchStyleMax = HatchStyleSolidDiamond; - -type - TdxGPHatchStyle = HatchStyle; - -// Dash style constants - DashStyle = ( - DashStyleSolid, // 0 - DashStyleDash, // 1 - DashStyleDot, // 2 - DashStyleDashDot, // 3 - DashStyleDashDotDot, // 4 - DashStyleCustom // 5 - ); - TdxGPDashStyle = DashStyle; - -// WarpMode constants - WarpMode = ( - WarpModePerspective, // 0 - WarpModeBilinear // 1 - ); - TdxGPWarpMode = WarpMode; - -// LineGradient Mode - LinearGradientMode = ( - LinearGradientModeHorizontal, // 0 - LinearGradientModeVertical, // 1 - LinearGradientModeForwardDiagonal, // 2 - LinearGradientModeBackwardDiagonal // 3 - ); - TdxGPLinearGradientMode = LinearGradientMode; - -// Pen types - PenAlignment = ( - PenAlignmentCenter, // = 0, - PenAlignmentInset // = 1 - ); - TdxGPPenAlignment = PenAlignment; - -// Brush types - BrushType = ( - BrushTypeSolidColor, // = 0, - BrushTypeHatchFill, // = 1, - BrushTypeTextureFill, // = 2, - BrushTypePathGradient, // = 3, - BrushTypeLinearGradient // = 4 - ); - TdxGPBrushType = BrushType; - -// Pen's Fill types - {$EXTERNALSYM PenType} - PenType = Integer; -const - PenTypeSolidColor = 0; - PenTypeHatchFill = 1; - PenTypeTextureFill = 2; - PenTypePathGradient = 3; - PenTypeLinearGradient = 4; - PenTypeUnknown = -1; - -type - TdxGPPenType = PenType; - -// Status return values from GDI+ methods -type - Status = ( - Ok, - GenericError, - InvalidParameter, - OutOfMemory, - ObjectBusy, - InsufficientBuffer, - NotImplemented, - Win32Error, - WrongState, - Aborted, - FileNotFound, - ValueOverflow, - AccessDenied, - UnknownImageFormat, - FontFamilyNotFound, - FontStyleNotFound, - NotTrueTypeFont, - UnsupportedGdiplusVersion, - GdiplusNotInitialized, - PropertyNotFound, - PropertyNotSupported - ); - TdxGPStatus = Status; - -type - // Represents a dimension in a 2D coordinate system (floating-point coordinates) - PdxGPSizeF = ^TdxGPSizeF; - TdxGPSizeF = packed record - Width : Single; - Height : Single; - end; - - // Represents a dimension in a 2D coordinate system (integer coordinates) - PdxGPSize = ^TdxGPSize; - TdxGPSize = packed record - Width : Integer; - Height : Integer; - end; - - // Represents a location in a 2D coordinate system (floating-point coordinates) - PdxGPPointF = ^TdxGPPointF; - TdxGPPointF = packed record - X : Single; - Y : Single; - end; - TdxGPPointFDynArray = array of TdxGPPointF; - - // Represents a location in a 2D coordinate system (integer coordinates) - PdxGPPoint = ^TdxGPPoint; - TdxGPPoint = packed record - X : Integer; - Y : Integer; - end; - TdxGPPointDynArray = array of TdxGPPoint; - - // Represents a rectangle in a 2D coordinate system (floating-point coordinates) - PdxGPRectF = ^TdxGPRectF; - TdxGPRectF = packed record - X : Single; - Y : Single; - Width : Single; - Height: Single; - end; - TdxGPRectFDynArray = array of TdxGPRectF; - - PdxGPRect = ^TdxGPRect; - TdxGPRect = packed record - X : Integer; - Y : Integer; - Width : Integer; - Height: Integer; - end; - TdxGPRectDynArray = array of TdxGPRect; - - PdxGPImageCodecInfo = ^TdxGPImageCodecInfo; - TdxGPImageCodecInfo = packed record - Clsid: TGUID; - FormatID: TGUID; - CodecName: Pointer; - DllName: Pointer; - FormatDescription: Pointer; - FilenameExtension: Pointer; - MimeType: Pointer; - Flags: DWORD; - Version: DWORD; - SigCount: DWORD; - SigSize: DWORD; - SigPattern: PBYTE; - SigMask: PBYTE; - end; - - - TEncoderParameter = packed record - Guid : TGUID; // GUID of the parameter - NumberOfValues : ULONG; // Number of the parameter values - Type_ : ULONG; // Value type, like ValueTypeLONG etc. - Value : Pointer; // A pointer to the parameter values - end; - PEncoderParameter = ^TEncoderParameter; - - TEncoderParameters = packed record - Count : UINT; // Number of parameters in this structure - Parameter : array[0..0] of TEncoderParameter; // Parameter values - end; - PEncoderParameters = ^TEncoderParameters; - - DebugEventLevel = ( - DebugEventLevelFatal, - DebugEventLevelWarning - ); - TDebugEventLevel = DebugEventLevel; - - DebugEventProc = procedure(level: DebugEventLevel; message: PChar); stdcall; - - NotificationHookProc = function(out token: ULONG): Status; stdcall; - NotificationUnhookProc = procedure(token: ULONG); stdcall; - - // Input structure for GdiplusStartup - GdiplusStartupInput = packed record - GdiplusVersion : Cardinal; // Must be 1 - DebugEventCallback : DebugEventProc; // Ignored on free builds - SuppressBackgroundThread: BOOL; // FALSE unless you're prepared to call - // the hook/unhook functions properly - SuppressExternalCodecs : BOOL; // FALSE unless you want GDI+ only to use - end; // its internal image codecs. - TGdiplusStartupInput = GdiplusStartupInput; - PGdiplusStartupInput = ^TGdiplusStartupInput; - - // Output structure for GdiplusStartup() - GdiplusStartupOutput = packed record - NotificationHook : NotificationHookProc; - NotificationUnhook: NotificationUnhookProc; - end; - TGdiplusStartupOutput = GdiplusStartupOutput; - PGdiplusStartupOutput = ^TGdiplusStartupOutput; - -// Private GDI+ classes for internal type checking - GpGraphics = Pointer; - ARGB = DWORD; - PARGB = ^ARGB; - - GpBrush = Pointer; - GpTexture = Pointer; - GpSolidFill = Pointer; - GpLineGradient = Pointer; - GpPathGradient = Pointer; - GpHatch = Pointer; - GpPen = Pointer; - GpImage = Pointer; - GpBitmap = Pointer; - GpCachedBitmap = Pointer; - - GPStatus = TdxGPStatus; - GpFillMode = TdxGPFillMode; - GpWrapMode = TdxGPWrapMode; - GpUnit = TdxGPUnit; - GpPointF = PdxGPPointF; - GpPoint = PdxGPPoint; - GpRectF = PdxGPRectF; - GpRect = PdxGPRect; - GpSizeF = PdxGPSizeF; - GpHatchStyle = TdxGPHatchStyle; - GpDashStyle = TdxGPDashStyle; - GpPenAlignment = TdxGPPenAlignment; - GpPenType = TdxGPPenType; - GpBrushType = TdxGPBrushType; - - BitmapData = packed record - Width : UINT; - Height : UINT; - Stride : Integer; - PixelFormat : Integer; - Scan0 : Pointer; - Reserved : UINT; - end; - TBitmapData = BitmapData; - PBitmapData = ^TBitmapData; - -type - TdxProc = procedure; - - TdxUnitsLoader = class - protected - FinalizeList: TList; - InitializeList: TList; - public - constructor Create(); - destructor Destroy; override; - procedure AddUnit(const AInitializeProc, AFinalizeProc: Pointer); - procedure RemoveUnit(const AFinalizeProc: Pointer); - procedure Finalize; - procedure Initialize; - end; - -var - // codecs - PNGCodec: TGUID; - // GDI+ Memory managment methods - GdipAlloc: function(size: ULONG): pointer; stdcall; - GdipFree: procedure(ptr: pointer); stdcall; - // GDI+ initialization/finalization methods - GdiplusStartup: function(out token: DWORD; const input: GdiplusStartupInput; output: PGdiplusStartupOutput): Status; stdcall; - GdiplusShutdown: procedure(token: DWORD); stdcall; - // GDI+ Brush methods - GdipCloneBrush: function(brush :GpBrush; var clonebrush :GpBrush) :GPStatus; stdcall; - GdipDeleteBrush: function(brush :GpBrush) :GPStatus; stdcall; - GdipGetBrushType: function(brush :GpBrush; var bt :GpBrushType) :GPStatus; stdcall; - // GDI+ Solid Brush methods - GdipCreateSolidFill: function(color :ARGB; var brush :GpSolidFill) :GPStatus; stdcall; - GdipSetSolidFillColor: function(brush :GpSolidFill; color :ARGB) :GPStatus; stdcall; - GdipGetSolidFillColor: function(brush :GpSolidFill; var color :ARGB) :GPStatus; stdcall; - // GDI+ Gradient Brush methods - GdipCreateLineBrushFromRectI: function(const rect :GpRect; color1,color2 :ARGB; mode :LinearGradientMode; - wrapmode :GpWrapMode; var lineGradient :GpLineGradient) :GPStatus; stdcall; - GdipGetLineRectI: function(brush :GpLineGradient; var rect :GpRect) :GPStatus; stdcall; - GdipSetLineColors: function(brush :GpLineGradient; color1,color2 :ARGB) :GPStatus; stdcall; - GdipGetLineColors: function(brush :GpLineGradient; colors :PARGB) :GPStatus; stdcall; - GdipSetLineWrapMode: function(brush :GpLineGradient; wrapmode :GpWrapMode) :GPStatus; stdcall; - GdipGetLineWrapMode: function(brush :GpLineGradient; wrapmode :GpWrapMode) :GPStatus; stdcall; - // GDI+ Hatch Brush methods - GdipCreateHatchBrush: function(hatchstyle :GpHatchStyle; forecol,backcol :ARGB; var brush :GpHatch) :GPStatus; stdcall; - GdipGetHatchStyle: function(brush :GpHatch; var hatchstyle :GpHatchStyle) :GPStatus; stdcall; - GdipGetHatchForegroundColor: function(brush :GpHatch; var forecol :ARGB) :GPStatus; stdcall; - GdipGetHatchBackgroundColor: function(brush :GpHatch; var backcol :ARGB) :GPStatus; stdcall; - // GDI+ Pen methods - GdipCreatePen1: function(color :ARGB; width :single; u :GpUnit; var pen :GpPen) :GPStatus; stdcall; - GdipCreatePen2: function(brush :GpBrush; width :single; u :GpUnit; var pen :GpPen) :GPStatus; stdcall; - GdipClonePen: function(pen :GpPen; var clonepen :GpPen) :GPStatus; stdcall; - GdipDeletePen: function(pen :GpPen) :GPStatus; stdcall; - GdipGetPenFillType: function(pen :GpPen; var penType :GpPenType) :GPStatus; stdcall; - GdipSetPenBrushFill: function(pen :GpPen; brush :GpBrush) :GPStatus; stdcall; - GdipGetPenBrushFill: function(pen :GpPen; var brush :GpBrush) :GPStatus; stdcall; - GdipSetPenColor: function(pen :GpPen; color :ARGB) :GPStatus; stdcall; - GdipGetPenColor: function(pen :GpPen; var color :ARGB) :GPStatus; stdcall; - GdipSetPenMode: function(pen :GpPen; penMode :GpPenAlignment) :GPStatus; stdcall; - GdipGetPenMode: function(pen :GpPen; var penMode :GpPenAlignment) :GPStatus; stdcall; - GdipSetPenWidth: function(pen :GpPen; width :single) :GPStatus; stdcall; - GdipGetPenWidth: function(pen :GpPen; var width :single) :GPStatus; stdcall; - // GDI+ Graphis methods - GdipCreateFromHDC: function(hdc :HDC; var graphics :GpGraphics) :GPStatus; stdcall; - GdipDeleteGraphics: function(graphics :GpGraphics) :GPStatus; stdcall; - GdipGetDC: function(graphics :GpGraphics; var hdc :HDC) :GPStatus; stdcall; - GdipReleaseDC: function(graphics :GpGraphics; hdc :HDC) :GPStatus; stdcall; - GdipGraphicsClear: function(graphics :GpGraphics; color :ARGB) :GPStatus; stdcall; - GdipDrawLineI: function(graphics :GpGraphics; pen :GpPen; x1,y1,x2,y2 :integer) :GPStatus; stdcall; - GdipFillRectangleI: function(graphics :GpGraphics; brush :GpBrush; x,y,width,height :integer) :GPStatus; stdcall; - GdipDrawArcI: function(graphics :GpGraphics; pen :GpPen; x,y,width,height :integer; - startAngle,sweepAngle :single) :GPStatus; stdcall; - GdipDrawBezierI: function(graphics :GpGraphics; pen :GpPen; x1,y1,x2,y2,x3,y3,x4,y4 :integer) :GPStatus; stdcall; - GdipDrawRectangleI: function(graphics :GpGraphics; pen :GpPen; x,y,width,height :integer) :GPStatus; stdcall; - GdipDrawEllipseI: function(graphics :GpGraphics; pen :GpPen; x,y,width,height :integer) :GPStatus; stdcall; - GdipDrawPieI: function(graphics :GpGraphics; pen :GpPen; x,y,width,height :integer; - startAngle,sweepAngle :single) :GPStatus; stdcall; - GdipDrawPolygonI: function(graphics :GpGraphics; pen :GpPen; const points :GpPoint; - count :integer) :GPStatus; stdcall; - GdipDrawCurve2I: function(graphics :GpGraphics; pen :GpPen; const points :GpPoint; - count :integer; tension :single) :GPStatus; stdcall; - GdipDrawClosedCurve2I: function(graphics :GpGraphics; pen :GpPen; const points :GpPoint; - count :integer; tension :single) :GPStatus; stdcall; - GdipFillPolygonI: function(graphics :GpGraphics; brush :GpBrush; const points :GpPoint; - count :integer; fillmode :GpFillMode) :GPStatus; stdcall; - GdipFillEllipseI: function(graphics :GpGraphics; brush :GpBrush; x,y,width,height :integer) :GPStatus; stdcall; - GdipFillPieI: function(graphics :GpGraphics; brush :GpBrush; x,y,width,height :integer; - startAngle,sweepAngle :single) :GPStatus; stdcall; - GdipFillClosedCurveI: function(graphics :GpGraphics; brush :GpBrush; const points :GpPoint; - count :integer) :GPStatus; stdcall; - // added from MSN - GdipLoadImageFromStream: function(stream: IStream; var image: GpImage): GPStatus; stdcall; - GdipCreateHBITMAPFromBitmap: function(image: GpBitmap; var bitmap: HBitmap; color :ARGB): GPStatus; stdcall; - GdipCreateBitmapFromFile: function(filename: PWideChar; var bitmap: GpBitmap): GPStatus; stdcall; - GdipCreateBitmapFromStream: function(stream: IStream; var bitmap: GpBitmap): GPStatus; stdcall; - GdipCreateBitmapFromStreamICM: function (stream: ISTREAM; out bitmap: GpBitmap): GPStatus; stdcall; - GdipLoadImageFromFile: function(filename: PWideChar; var image: GpImage): GPStatus; stdcall; - GdipGetImageDimension: function(image: GpImage; var weidth, height: Single): GPStatus; stdcall; - GdipDrawImageRectI: function(graphics: GpGraphics; image: GpImage; - x, y: Integer; width, height: Integer): GPStatus; stdcall; - GdipDisposeImage: function(image: GpImage): GPStatus; stdcall; - GdipGetImageEncodersSize: function(out numEncoders: Integer; out size: Integer): GPStatus; stdcall; - GdipGetImageEncoders: function(numEncoders: Integer; size: Integer; encoders: PdxGPImageCodecInfo): GPStatus; stdcall; - GdipGetEncoderParameterListSize: function(image: GpImage; clsidEncoder: PGUID; out size: UINT): GPStatus; stdcall; - GdipGetEncoderParameterList: function(image: GpImage; clsidEncoder: PGUID; - size: UINT; buffer: PENCODERPARAMETERS): GPStatus; stdcall; - GdipCreateBitmapFromGdiDib: function (gdiBitmapInfo: PBitmapInfo; - gdiBitmapData: Pointer; out bitmap: GpBitmap): GPStatus; stdcall; - GdipCreateBitmapFromScan0: function (width: Integer; height: Integer; - stride: Integer; format: integer; scan0: PBYTE; - out bitmap: GpImage): GPStatus; stdcall; - GdipBitmapLockBits: function (bitmap: GpBitmap; rect: GPRECT; flags: UINT; - format: Integer; lockedBitmapData: PBITMAPDATA): GPStatus; stdcall; - GdipBitmapUnlockBits: function(bitmap: GpBitmap; - lockedBitmapData: PBITMAPDATA): GPStatus; stdcall; - GdipDrawImageRectRectI: function(graphics: GpGraphics; image: GpImage; - dstx, dsty, dstwidth, dstheight: Integer; srcx, srcy, srcwidth, srcheight: Integer; - srcUnit: GPUNIT; imageAttributes: Pointer; callback: TgpImageAbort; callbackData: Pointer): GPStatus; stdcall; - GdipDrawImageRectRect: function(graphics: GPGRAPHICS; image: GPIMAGE; - dstx: Single; dsty: Single; dstwidth: Single; dstheight: Single; - srcx: Single; srcy: Single; srcwidth: Single; srcheight: Single; - srcUnit: GPUNIT; imageAttributes: Pointer; callback: TgpImageAbort; callbackData: Pointer): GPSTATUS; stdcall; - GdipDrawImagePointRect: function(graphics: GPGRAPHICS; image: GPIMAGE; - x: Single; y: Single; srcx: Single; srcy: Single; srcwidth: Single; - srcheight: Single; srcUnit: GPUNIT): GPSTATUS; stdcall; - GdipCloneImage: function(image: GPIMAGE; out cloneImage: GPIMAGE): GPSTATUS; stdcall; - - //lcm - GdipSetInterpolationMode: function(graphics: GpGraphics; imode: Integer): GpStatus; stdcall; - GdipGetInterpolationMode: function(graphics: GpGraphics; out imode: Integer): GpStatus; stdcall; - GdipCreateCachedBitmap: function(bitmap: GpBitmap; graphics: GpGraphics; out cachedBitmap: GpCachedBitmap): GpStatus; stdcall; - GdipDeleteCachedBitmap: function(cachedBitmap: GpCachedBitmap): GpStatus; stdcall; - GdipDrawCachedBitmap: function(graphics: GpGraphics; cachedBitmap: GpCachedBitmap; x, y: Integer): GpStatus; stdcall; - GdipCreateBitmapFromGraphics: function(width, height: Integer; target: GpGraphics; var bitmap: GpBitmap): GpStatus; stdcall; - GdipGetImageGraphicsContext: function(image: GpImage; out graphics: GpGraphics): GpStatus; stdcall; - GdipGetImageWidth: function(image: GpImage; out width: Integer): GpStatus; stdcall; - GdipGetImageHeight: function(image: GpImage; out height: Integer): GpStatus; stdcall; - GdipSetCompositingMode: function(graphics: GpGraphics; cmode: Integer): GpStatus; stdcall; - GdipGetCompositingMode: function(graphics: GpGraphics; out cmode: Integer): GpStatus; stdcall; - GdipSetCompositingQuality: function(graphics: GpGraphics; cq: Integer): GpStatus; stdcall; - GdipGetCompositingQuality: function(graphics: GpGraphics; out cq: Integer): GpStatus; stdcall; - GdipSetSmoothingMode: function(graphics: GpGraphics; sm: Integer): GpStatus; stdcall; - GdipGetSmoothingMode: function(graphics: GpGraphics; out sm: Integer): GpStatus; stdcall; - GdipCloneBitmapAreaI: function(x: Integer; y: Integer; width: Integer; - height: Integer; format: Cardinal; srcBitmap: GPBITMAP; out dstBitmap: GPBITMAP): GPSTATUS; stdcall; - - {$EXTERNALSYM GdipBitmapUnlockBits} - - GdipSaveImageToStream: function(image: GpImage; stream: ISTREAM; clsidEncoder: PGUID; encoderParams: pointer): GpStatus; stdcall; - GdipCreateBitmapFromHBITMAP: function(hbm: HBITMAP; hpal: HPALETTE; out bitmap: GpImage): GpStatus; stdcall; - - GdipIsVisibleRect: function (Graphics: GpGraphics; X, Y, Width, Height: Single; var Result: LongBool): GpStatus; stdcall; - GdipIsVisibleRectI: function (Graphics: GpGraphics; X, Y, Width, Height: Integer; var Result: LongBool): GpStatus; stdcall; - -function MakePoint(X, Y: Integer): TdxGPPoint; overload; -function MakePoint(X, Y: Single): TdxGPPointF; overload; -function MakeRect(x, y, width, height: Integer): TdxGPRect; overload; -function MakeRect(location: TdxGPPoint; size: TdxGPSize): TdxGPRect; overload; -function MakeRect(Rect: TRect): TdxGPRect; overload; -function MakeRect(x, y, width, height: Single): TdxGPRectF; overload; -function MakeRect(location: TdxGPPointF; size: TdxGPSizeF): TdxGPRectF; overload; -function MakeSize(Width, Height: Single): TdxGPSizeF; overload; -function MakeSize(Width, Height: Integer): TdxGPSize; overload; - -// image conversion -function DifferentImage2Bitmap(AStream: TStream): TBitmap; overload; -function DifferentImage2Bitmap(const AFileName: string): TBitmap; overload; -procedure Bitmap2PNG(ABitmap: TBitmap; AStream: TStream); overload; -procedure Bitmap2PNG(ABitmap: TBitmap; const AFileName: string); overload; -// codecs -function GetCodecID(const CodecName: string; out Clsid: TGUID): GPStatus; -procedure CheckPngCodec; -// check errors -procedure GdipCheck(AStatus: Boolean); overload; -procedure GdipCheck(AStatus: GPStatus); overload; - -function dxGpColorToARGB(AColor: TColor; AAlpha: Byte = 255): ARGB; -function dxGpMakeARGBColor(A, R, G, B: Byte): ARGB; - -procedure dxGpFillRect(DC: HDC; const R: TRect; AColor: TColor; AColorAlpha: Byte = 255); overload; -procedure dxGpFillRect(AGraphics: GpGraphics; const R: TRect; AColor: ARGB); overload; -procedure dxGpFillRectByGradient(AGraphics: GpGraphics; const R: TRect; - AColor1, AColor2: ARGB; AMode: TdxGPLinearGradientMode); overload; -procedure dxGpFillRectByGradient(DC: HDC; const R: TRect; - AColor1, AColor2: TColor; AMode: TdxGPLinearGradientMode; - AColor1Alpha: Byte = 255; AColor2Alpha: Byte = 255); overload; - -function dxGpIsRectVisible(AGraphics: GpGraphics; const R: TRect): LongBool; - -// CLR - -procedure dxInitializeGDIPlus; stdcall; -procedure dxFinalizeGDIPlus; stdcall; - -function dxUnitsLoader: TdxUnitsLoader; -function CheckGdiPlus: Boolean; - -resourcestring - scxGdipInvalidOperation = 'Invalid operation in GDI+'; - -implementation - -uses - dxCore; - -const - GDIPlusLibraryName = 'gdiplus.dll'; - -var - FGDIPlusLibrary: Integer; - FGDIPlusToken: DWORD; - FGdiPlusHook: TGdiplusStartupOutput; - FGDIPresent: Boolean; - FGDIInitialized: Boolean; - UnitsLoader: TdxUnitsLoader; - -function IsDLL: Boolean; -begin - Result := ModuleIsLib and not ModuleIsPackage; -end; - -function dxGpColorToARGB(AColor: TColor; AAlpha: Byte = 255): ARGB; -begin - if AColor = clNone then - Result := 0 - else - Result := ARGB(dxColorToRGBQuad(AColor, AAlpha)); -end; - -function dxGpMakeARGBColor(A, R, G, B: Byte): ARGB; -begin - Result := DWORD(B) or (DWORD(G) shl 8) or (DWORD(R) shl 16) or (DWORD(A) shl 24); -end; - -procedure dxGpFillRect(DC: HDC; const R: TRect; AColor: TColor; AColorAlpha: Byte = 255); -var - AGraphics: GpGraphics; -begin - GdipCheck(GdipCreateFromHDC(DC, AGraphics)); - dxGpFillRect(AGraphics, R, dxGpColorToARGB(AColor, AColorAlpha)); - GdipCheck(GdipDeleteGraphics(AGraphics)); -end; - -procedure dxGpFillRect(AGraphics: GpGraphics; const R: TRect; AColor: ARGB); -var - ABrush: GpSolidFill; - R1: TdxGPRect; -begin - R1 := MakeRect(R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top); - GdipCheck(GdipCreateSolidFill(AColor, ABrush)); - GdipCheck(GdipFillRectangleI(AGraphics, ABrush, R1.X, R1.Y, R1.Width, R1.Height)); - GdipCheck(GdipDeleteBrush(ABrush)); -end; - -procedure dxGpFillRectByGradient(DC: HDC; const R: TRect; - AColor1, AColor2: TColor; AMode: TdxGPLinearGradientMode; - AColor1Alpha: Byte = 255; AColor2Alpha: Byte = 255); -var - AGraphics: GpGraphics; -begin - GdipCheck(GdipCreateFromHDC(DC, AGraphics)); - dxGpFillRectByGradient(AGraphics, R, dxGpColorToARGB(AColor1, AColor1Alpha), - dxGpColorToARGB(AColor2, AColor2Alpha), AMode); - GdipCheck(GdipDeleteGraphics(AGraphics)); -end; - -procedure dxGpFillRectByGradient(AGraphics: GpGraphics; const R: TRect; - AColor1, AColor2: ARGB; AMode: TdxGPLinearGradientMode); -var - ABrush: GpLineGradient; - R1: TdxGPRect; -begin - R1 := MakeRect(R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top); - GdipCheck(GdipCreateLineBrushFromRectI(@R1, AColor1, AColor2, AMode, WrapModeTile, ABrush)); - GdipCheck(GdipFillRectangleI(AGraphics, ABrush, R1.X, R1.Y, R1.Width, R1.Height)); - GdipCheck(GdipDeleteBrush(ABrush)); -end; - -function dxGpIsRectVisible(AGraphics: GpGraphics; const R: TRect): LongBool; -begin - GdipCheck(GdipIsVisibleRectI(AGraphics, - R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, Result)); -end; - -{ TdxLoader } - -constructor TdxUnitsLoader.Create(); -begin - FinalizeList := TList.Create; - InitializeList := TList.Create; -end; - -destructor TdxUnitsLoader.Destroy; -begin - Finalize; - FinalizeList.Free; - InitializeList.Free; - inherited Destroy; -end; - -procedure TdxUnitsLoader.AddUnit(const AInitializeProc, AFinalizeProc: Pointer); -var - AProc: TdxProc; -begin - if AInitializeProc <> nil then - begin - AProc := AInitializeProc; - if not IsDLL then - begin - FGDIInitialized := True; - AProc; - end - else - InitializeList.Add(AInitializeProc); - end; - if AFinalizeProc <> nil then - FinalizeList.Add(AFinalizeProc); -end; - -procedure TdxUnitsLoader.RemoveUnit(const AFinalizeProc: Pointer); -var - AProc: TdxProc; -begin - AProc := AFinalizeProc; - if (FinalizeList.Remove(AFinalizeProc) >=0) and (AFinalizeProc <> nil) then - AProc; -end; - -procedure TdxUnitsLoader.Finalize; -var - I: Integer; - AProc: TdxProc; -begin - if FGDIInitialized then - for I := FinalizeList.Count - 1 downto 0 do - begin - AProc := TdxProc(FinalizeList[I]); - if Assigned(AProc) then AProc; - end; - FGDIInitialized := False; - FinalizeList.Clear; -end; - -procedure TdxUnitsLoader.Initialize; -var - I: Integer; - AProc: TdxProc; -begin - for I := 0 to InitializeList.Count - 1 do - begin - AProc := TdxProc(InitializeList[I]); - if Assigned(AProc) then AProc; - end; - InitializeList.Clear; - FGDIInitialized := True; -end; - -{ GDI+ loading } - -procedure GdiPlusLoad; -const - DefaultStartup: GdiplusStartupInput = - (GdiplusVersion: 1; - DebugEventCallback: nil; - SuppressBackgroundThread: True; - SuppressExternalCodecs: False); - - function LoadGdiPlusMethod(const ProcName: string): Pointer; - begin - Result := nil; - if FGDIPresent then - Result := GetProcAddress(FGDIPlusLibrary, PChar(ProcName)); - FGDIPresent := Result <> nil; - end; - -begin - if FGDIPresent then - Exit; - FGDIPlusLibrary := SafeLoadLibrary(GDIPlusLibraryName); - FGDIPresent := FGDIPlusLibrary <> 0; - if FGDIPresent then - begin - // GDI+ Memory managment methods loading - GdipAlloc := LoadGdiPlusMethod('GdipAlloc'); - GdipFree := LoadGdiPlusMethod('GdipFree'); - // GDI+ initialization/finalization methods loading - GdiplusStartup := LoadGdiPlusMethod('GdiplusStartup'); - GdiplusShutdown := LoadGdiPlusMethod('GdiplusShutdown'); - // GDI+ Brush methods loading - GdipCloneBrush := LoadGdiPlusMethod('GdipCloneBrush'); - GdipDeleteBrush := LoadGdiPlusMethod('GdipDeleteBrush'); - GdipGetBrushType := LoadGdiPlusMethod('GdipGetBrushType'); - // GDI+ Solid Brush methods loading - GdipCreateSolidFill := LoadGdiPlusMethod('GdipCreateSolidFill'); - GdipSetSolidFillColor := LoadGdiPlusMethod('GdipSetSolidFillColor'); - GdipGetSolidFillColor := LoadGdiPlusMethod('GdipGetSolidFillColor'); - // GDI+ Gradient Brush methods loading - GdipCreateLineBrushFromRectI := LoadGdiPlusMethod('GdipCreateLineBrushFromRectI'); - GdipGetLineRectI := LoadGdiPlusMethod('GdipGetLineRectI'); - GdipSetLineColors := LoadGdiPlusMethod('GdipSetLineColors'); - GdipGetLineColors := LoadGdiPlusMethod('GdipGetLineColors'); - GdipSetLineWrapMode := LoadGdiPlusMethod('GdipSetLineWrapMode'); - GdipGetLineWrapMode := LoadGdiPlusMethod('GdipGetLineWrapMode'); - // GDI+ Hatch Brush methods loading - GdipCreateHatchBrush := LoadGdiPlusMethod('GdipCreateHatchBrush'); - GdipGetHatchStyle := LoadGdiPlusMethod('GdipGetHatchStyle'); - GdipGetHatchForegroundColor := LoadGdiPlusMethod('GdipGetHatchForegroundColor'); - GdipGetHatchBackgroundColor := LoadGdiPlusMethod('GdipGetHatchBackgroundColor'); - // GDI+ Pen methods loading - GdipCreatePen1 := LoadGdiPlusMethod('GdipCreatePen1'); - GdipCreatePen2 := LoadGdiPlusMethod('GdipCreatePen2'); - GdipClonePen := LoadGdiPlusMethod('GdipClonePen'); - GdipDeletePen := LoadGdiPlusMethod('GdipDeletePen'); - GdipGetPenFillType := LoadGdiPlusMethod('GdipGetPenFillType'); - GdipSetPenBrushFill := LoadGdiPlusMethod('GdipSetPenBrushFill'); - GdipGetPenBrushFill := LoadGdiPlusMethod('GdipGetPenBrushFill'); - GdipSetPenColor := LoadGdiPlusMethod('GdipSetPenColor'); - GdipGetPenColor := LoadGdiPlusMethod('GdipGetPenColor'); - GdipSetPenMode := LoadGdiPlusMethod('GdipSetPenMode'); - GdipGetPenMode := LoadGdiPlusMethod('GdipGetPenMode'); - GdipSetPenWidth := LoadGdiPlusMethod('GdipSetPenWidth'); - GdipGetPenWidth := LoadGdiPlusMethod('GdipGetPenWidth'); - // GDI+ Graphis methods loading - GdipCreateFromHDC := LoadGdiPlusMethod('GdipCreateFromHDC'); - GdipDeleteGraphics := LoadGdiPlusMethod('GdipDeleteGraphics'); - GdipGetDC := LoadGdiPlusMethod('GdipGetDC'); - GdipReleaseDC := LoadGdiPlusMethod('GdipReleaseDC'); - GdipGraphicsClear := LoadGdiPlusMethod('GdipGraphicsClear'); - GdipDrawLineI := LoadGdiPlusMethod('GdipDrawLineI'); - GdipFillRectangleI := LoadGdiPlusMethod('GdipFillRectangleI'); - GdipDrawArcI := LoadGdiPlusMethod('GdipDrawArcI'); - GdipDrawBezierI := LoadGdiPlusMethod('GdipDrawBezierI'); - GdipDrawRectangleI := LoadGdiPlusMethod('GdipDrawRectangleI'); - GdipDrawEllipseI := LoadGdiPlusMethod('GdipDrawEllipseI'); - GdipDrawPieI := LoadGdiPlusMethod('GdipDrawPieI'); - GdipDrawPolygonI := LoadGdiPlusMethod('GdipDrawPolygonI'); - GdipDrawCurve2I := LoadGdiPlusMethod('GdipDrawCurve2I'); - GdipDrawClosedCurve2I := LoadGdiPlusMethod('GdipDrawClosedCurve2I'); - GdipFillPolygonI := LoadGdiPlusMethod('GdipFillPolygonI'); - GdipFillEllipseI := LoadGdiPlusMethod('GdipFillEllipseI'); - GdipFillPieI := LoadGdiPlusMethod('GdipFillPieI'); - GdipFillClosedCurveI := LoadGdiPlusMethod('GdipFillClosedCurveI'); - // added from MSN - GdipLoadImageFromStream := LoadGdiPlusMethod('GdipLoadImageFromStream'); - GdipCreateBitmapFromFile := LoadGdiPlusMethod('GdipCreateBitmapFromFile'); - GdipCreateBitmapFromStream := LoadGdiPlusMethod('GdipCreateBitmapFromStream'); - GdipCreateBitmapFromStreamICM := LoadGdiPlusMethod('GdipCreateBitmapFromStreamICM'); - GdipCreateHBITMAPFromBitmap := LoadGdiPlusMethod('GdipCreateHBITMAPFromBitmap'); - GdipLoadImageFromFile := LoadGdiPlusMethod('GdipLoadImageFromFile'); - GdipGetImageDimension := LoadGdiPlusMethod('GdipGetImageDimension'); - GdipDrawImageRectI := LoadGdiPlusMethod('GdipDrawImageRectI'); - GdipDisposeImage := LoadGdiPlusMethod('GdipDisposeImage'); - GdipGetImageEncodersSize := LoadGdiPlusMethod('GdipGetImageEncodersSize'); - GdipGetImageEncoders := LoadGdiPlusMethod('GdipGetImageEncoders'); - GdipSaveImageToStream := LoadGdiPlusMethod('GdipSaveImageToStream'); - GdipCreateBitmapFromHBITMAP := LoadGdiPlusMethod('GdipCreateBitmapFromHBITMAP'); - GdipIsVisibleRect := LoadGdiPlusMethod('GdipIsVisibleRect'); - GdipIsVisibleRectI := LoadGdiPlusMethod('GdipIsVisibleRectI'); - GdipGetEncoderParameterListSize := LoadGdiPlusMethod('GdipGetEncoderParameterListSize'); - GdipGetEncoderParameterList := LoadGdiPlusMethod('GdipGetEncoderParameterList'); - GdipCreateBitmapFromGdiDib := LoadGdiPlusMethod('GdipCreateBitmapFromGdiDib'); - GdipCreateBitmapFromScan0 := LoadGdiPlusMethod('GdipCreateBitmapFromScan0'); - GdipBitmapLockBits := LoadGdiPlusMethod('GdipBitmapLockBits'); - GdipBitmapUnlockBits := LoadGdiPlusMethod('GdipBitmapUnlockBits'); - GdipDrawImageRectRectI := LoadGdiPlusMethod('GdipDrawImageRectRectI'); - GdipDrawImageRectRect := LoadGdiPlusMethod('GdipDrawImageRectRect'); - GdipDrawImagePointRect := LoadGdiPlusMethod('GdipDrawImagePointRect'); - GdipCloneImage := LoadGdiPlusMethod('GdipCloneImage'); - //lcm - GdipSetInterpolationMode := LoadGdiPlusMethod('GdipSetInterpolationMode'); - GdipGetInterpolationMode := LoadGdiPlusMethod('GdipGetInterpolationMode'); - GdipCreateCachedBitmap := LoadGdiPlusMethod('GdipCreateCachedBitmap'); - GdipDeleteCachedBitmap := LoadGdiPlusMethod('GdipDeleteCachedBitmap'); - GdipDrawCachedBitmap := LoadGdiPlusMethod('GdipDrawCachedBitmap'); - GdipCreateBitmapFromGraphics := LoadGdiPlusMethod('GdipCreateBitmapFromGraphics'); - GdipGetImageGraphicsContext := LoadGdiPlusMethod('GdipGetImageGraphicsContext'); - GdipGetImageWidth := LoadGdiPlusMethod('GdipGetImageWidth'); - GdipGetImageHeight := LoadGdiPlusMethod('GdipGetImageHeight'); - GdipSetCompositingMode := LoadGdiPlusMethod('GdipSetCompositingMode'); - GdipGetCompositingMode := LoadGdiPlusMethod('GdipGetCompositingMode'); - GdipSetCompositingQuality := LoadGdiPlusMethod('GdipSetCompositingQuality'); - GdipGetCompositingQuality := LoadGdiPlusMethod('GdipGetCompositingQuality'); - GdipSetSmoothingMode := LoadGdiPlusMethod('GdipSetSmoothingMode'); - GdipGetSmoothingMode := LoadGdiPlusMethod('GdipGetSmoothingMode'); - GdipCloneBitmapAreaI := LoadGdiPlusMethod('GdipCloneBitmapAreaI'); - // - if (GdiPlusStartup(FGDIPlusToken, DefaultStartup, @FGdiPlusHook) <> OK) or - (FGdiPlusHook.NotificationHook(FGDIPlusToken) <> Ok) then - begin - FGDIPresent := False; - FillChar(FGdiPlusHook, SizeOf(FGdiPlusHook), 0); - end; - end; -end; - -function CheckGdiPlus: Boolean; -begin - if not FGDIPresent then - GdiPlusLoad; - Result := FGDIPresent; -end; - -function dxUnitsLoader: TdxUnitsLoader; -begin - if UnitsLoader = nil then - UnitsLoader := TdxUnitsLoader.Create; - Result := UnitsLoader; -end; - -procedure dxInitializeGDIPlus; -begin - dxUnitsLoader.Initialize; -end; - -procedure dxFinalizeGDIPlus; -begin - dxUnitsLoader.Finalize; -end; - -procedure GdiPlusUnload; -begin - if FGDIPresent then - begin - FGdiPlusHook.NotificationUnhook(FGDIPlusToken); - GdiPlusShutdown(FGDIPlusToken); - end; - if FGDIPlusLibrary <> 0 then - FreeLibrary(FGDIPlusLibrary); - FGDIPresent := False; -end; - -{ TGdiplusBase } - -class function TdxGPBase.NewInstance: TObject; -begin - Result := InitInstance(GdipAlloc(ULONG(instanceSize))); -end; - -procedure TdxGPBase.FreeInstance; -begin - CleanupInstance; - GdipFree(Self); -end; - -{ TdxGPPoint } - -function MakePoint(X, Y: Integer): TdxGPPoint; -begin - result.X := X; - result.Y := Y; -end; - -function MakePoint(X, Y: Single): TdxGPPointF; -begin - Result.X := X; - result.Y := Y; -end; - -{ TdxGPSizeF } - -function MakeSize(Width, Height: Single): TdxGPSizeF; -begin - result.Width := Width; - result.Height := Height; -end; - -function MakeSize(Width, Height: Integer): TdxGPSize; -begin - result.Width := Width; - result.Height := Height; -end; - -{ TdxGPRectF } - -function MakeRect(x, y, width, height: Single): TdxGPRectF; overload; -begin - Result.X := x; - Result.Y := y; - Result.Width := width; - Result.Height := height; -end; - -function MakeRect(location: TdxGPPointF; size: TdxGPSizeF): TdxGPRectF; overload; -begin - Result.X := location.X; - Result.Y := location.Y; - Result.Width := size.Width; - Result.Height := size.Height; -end; - -{ TdxGPRect } - -function MakeRect(x, y, width, height: Integer): TdxGPRect; overload; -begin - Result.X := x; - Result.Y := y; - Result.Width := width; - Result.Height := height; -end; - -function MakeRect(location: TdxGPPoint; size: TdxGPSize): TdxGPRect; overload; -begin - Result.X := location.X; - Result.Y := location.Y; - Result.Width := size.Width; - Result.Height := size.Height; -end; - -function MakeRect(Rect: TRect): TdxGPRect; overload; -begin - Result.X := Rect.Left; - Result.Y := Rect.Top; - Result.Width := Rect.Right - Rect.Left; - Result.Height := Rect.Bottom - Rect.Top; -end; - -function GetCodecID(const CodecName: string; out Clsid: TGUID): GPStatus; -var - Count, Size, Index: Integer; - CodecInfo, StartInfo: PdxGPImageCodecInfo; -begin - Count := 0; - Size := 0; - Result := GenericError; - if not CheckGdiPlus or (GdipGetImageEncodersSize(Count, Size) <> Ok) or (Size <= 0) then Exit; - GetMem(StartInfo, Size); - CodecInfo := StartInfo; - try - if GdipGetImageEncoders(Count, Size, CodecInfo) = Ok then - for Index := 0 to Count - 1 do - begin - if SameText(PWideChar(CodecInfo^.MimeType), CodecName) then - begin - Clsid := CodecInfo^.Clsid; - Result := Ok; - Break; - end; - Inc(Integer(CodecInfo), SizeOf(TdxGPImageCodecInfo)); - end; - finally - FreeMem(StartInfo, Size); - end; -end; - -procedure CheckPngCodec; -begin - if (PngCodec.D1 = 0) and (PngCodec.D2 = 0) and (PngCodec.D3 = 0) then - GetCodecID('image/png', PngCodec); -end; - -procedure GdipCheck(AStatus: GPStatus); -begin - GdipCheck(AStatus = Ok); -end; - -procedure GdipCheck(AStatus: Boolean); -begin - Assert(AStatus, scxGdipInvalidOperation); -end; - -function DifferentImage2Bitmap(AStream: TStream): TBitmap; -var - Data: HGlobal; - DataPtr: Pointer; - Image: GpImage; - AccessStream: IStream; - Handle: HBitmap; - Header: TBitmapFileHeader; -begin - Result := TBitmap.Create; - try - if AStream.Size > SizeOf(Header) then - begin - AStream.ReadBuffer(Header, SizeOf(Header)); - if Header.bfType = $4D42 then - begin - AStream.Position := 0; - Result.LoadFromStream(AStream); - Result.PixelFormat := pf32Bit; - Exit; - end; - end; - if not CheckGdiPlus then Exit; - Data := GlobalAlloc(GMEM_MOVEABLE+GMEM_DDESHARE, AStream.Size); - try - DataPtr := GlobalLock(Data); - try - AStream.Position := 0; - AStream.Read(DataPtr^, AStream.Size); - Image := nil; - GdipCheck(CreateStreamOnHGlobal(Data, False, AccessStream) = s_OK); - GdipCheck(GdipCreateBitmapFromStream(AccessStream, Image)); - GdipCheck(GdipCreateHBITMAPFromBitmap(Image, Handle, 0)); - Result.Handle := Handle; - GdipCheck(GdipDisposeImage(Image)); - - finally - GlobalUnlock(Data); - AccessStream := nil; - end; - finally - GlobalFree(Data); - end; - Result.PixelFormat := pf32Bit; - except - Result.Free; - end; -end; - -function DifferentImage2Bitmap(const AFileName: string): TBitmap; overload; -var - AStream: TStream; -begin - AStream := TFileStream.Create(AFileName, fmOpenRead or fmShareDenyNone); - try - Result := DifferentImage2Bitmap(AStream); - finally - AStream.Free; - end; -end; - -procedure Bitmap2PNG(ABitmap: TBitmap; AStream: TStream); -var - Image: GpImage; - Picture: Pointer; - RowSize, Row: Integer; -const - PixelFormat32bppPARGB = $E200B; -begin - CheckPngCodec; - Picture := nil; - try - if ABitmap.PixelFormat = pf32bit then - begin - RowSize := ABitmap.Width * 4; - GetMem(Picture, RowSize * ABitmap.Height); - for Row := 0 to ABitmap.Height - 1 do - Move(ABitmap.ScanLine[Row]^, PByteArray(Picture)^[Row * RowSize], RowSize); - GdipCheck(GdipCreateBitmapFromScan0(ABitmap.Width, - ABitmap.Height, ABitmap.Width * 4, PixelFormat32bppPARGB, Picture, Image)); - end - else - GdipCheck(GdipCreateBitmapFromHBITMAP(ABitmap.Handle, ABitmap.Palette, Image)); - GdipCheck(GdipSaveImageToStream(Image, - TStreamAdapter.Create(AStream, soReference), @PngCodec, nil)); - GdipCheck(GdipDisposeImage(Image)); - finally - FreeMem(Picture); - end; -end; - -procedure Bitmap2PNG(ABitmap: TBitmap; const AFileName: string); -var - AStream: TStream; -begin - AStream := TFileStream.Create(AFileName, fmCreate); - try - Bitmap2PNG(ABitmap, AStream); - finally - AStream.Free; - end; -end; - -procedure RegisterAssistants; -begin - FGDIPresent := False; -end; - -procedure UnregisterAssistants; -begin - GdiPlusUnload; -end; - -initialization - dxUnitsLoader.AddUnit(@RegisterAssistants, @UnregisterAssistants); - -finalization - if FGDIPresent and IsDLL and (UnitsLoader.FinalizeList.Count > 0) then - raise Exception.Create('Need call dxFinalizeGDIPlus before free library!'); - FreeAndNil(UnitsLoader); - -end. - diff --git a/internal/x.46/ExpressGDI+ Library/Sources/dxGDIPlusClasses.pas b/internal/x.46/ExpressGDI+ Library/Sources/dxGDIPlusClasses.pas deleted file mode 100644 index 948b999a..00000000 --- a/internal/x.46/ExpressGDI+ Library/Sources/dxGDIPlusClasses.pas +++ /dev/null @@ -1,1221 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ GDI+ Library } -{ } -{ Copyright (c) 2002-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE GDIPLUS LIBRARY AND ALL ACCOMPANYING } -{ VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxGDIPlusClasses; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, SysUtils, Graphics, dxGDIPlusAPI, ActiveX; - -type - TdxGPBrush = class(TdxGPBase) - private - FNativeBrush: GpBrush; - FLastResult: TdxGPStatus; - protected - constructor CreateNative (nativeBrush: GpBrush; AStatus: Status); - procedure SetNativeBrush(ANativeBrush: GpBrush); - function SetStatus(AStatus: TdxGPStatus): TdxGPStatus; - public - constructor Create; - destructor Destroy; override; - function Clone: TdxGPBrush; virtual; - function GetType: BrushType; - function GetLastStatus: Status; - end; - - TdxGPSolidBrush = class(TdxGPBrush) - private - function GetColor: DWORD; - procedure SetColor(const Value: DWORD); - public - constructor Create; overload; - constructor Create(color: TColor); overload; - property Color: DWORD read GetColor write SetColor; - end; - - TdxGPTextureBrush = class(TdxGPBrush) - end; - - TdxGPLinearGradientBrush = class(TdxGPBrush) - private - procedure SetWrapMode(const Value: TdxGPWrapMode); - function GetWrapMode: TdxGPWrapMode; - public - constructor Create; overload; - constructor Create(rect: TdxGPRect; color1, color2: DWORD; mode: TdxGPLinearGradientMode); overload; - function SetLinearColors(color1, color2: DWORD): TdxGPStatus; - function GetLinearColors(out color1, color2: DWORD): TdxGPStatus; - function GetRectangle: TdxGPRect; overload; - property WrapMode: TdxGPWrapMode read GetWrapMode write SetWrapMode; - end; - - TdxGPHatchBrush = class(TdxGPBrush) - public - constructor Create; overload; - constructor Create(hatchStyle: TdxGPHatchStyle; foreColor: DWORD; backColor: DWORD); overload; - function GetHatchStyle: TdxGPHatchStyle; - function GetForegroundColor: DWORD; - function GetBackgroundColor: DWORD; - end; - - TdxGPPen = class(TdxGPBase) - private - FNativePen: GpPen; - FLastResult: TdxGPStatus; - - function GetAlignment: TdxGPPenAlignment; - function GetColor: DWORD; - function GetBrush: TdxGPBrush; - function GetWidth: Single; - procedure SetAlignment(const Value: TdxGPPenAlignment); - procedure SetColor(const Value: DWORD); - procedure SetBrush(const Value: TdxGPBrush); - procedure SetWidth(const Value: Single); - protected - procedure SetNativePen(ANativePen: GpPen); - function SetStatus(status: TdxGPStatus): TdxGPStatus; - public - constructor Create(color: DWORD; width: Single = 1.0); overload; - constructor Create(brush: TdxGPBrush; width: Single = 1.0); overload; - destructor Destroy; override; - function GetLastStatus: TdxGPStatus; - function GetPenType: TdxGPPenType; - property ALignment: TdxGPPenAlignment read GetAlignment write SetAlignment; - property Brush: TdxGPBrush read GetBrush write SetBrush; - property Color: DWORD read GetColor write SetColor; - property Width: Single read GetWidth write SetWidth; - end; - - TdxGPGraphics = class(TdxGPBase) - private - FNativeGraphics: GpGraphics; - FLastResult: TdxGPStatus; - protected - procedure SetNativeGraphics(AGraphics: GpGraphics); - function SetStatus(status: TdxGPStatus): TdxGPStatus; - function GetNativeGraphics: GpGraphics; - function GetNativePen(pen: TdxGPPen): GpPen; - public - constructor Create(hdc: HDC); overload; - destructor Destroy; override; - function GetHDC: HDC; - procedure ReleaseHDC(hdc: HDC); - function GetLastStatus: TdxGPStatus; - - function DrawLine(pen: TdxGPPen; x1, y1, x2, y2: Integer): TdxGPStatus; overload; - function DrawLine(pen: TdxGPPen; const pt1, pt2: TdxGPPoint): TdxGPStatus; overload; - function DrawArc(pen: TdxGPPen; const rect: TdxGPRect; startAngle, sweepAngle: Single): TdxGPStatus; overload; - function DrawBezier(pen: TdxGPPen; x1, y1, x2, y2, x3, y3, x4, y4: Integer): TdxGPStatus; overload; - function DrawBezier(pen: TdxGPPen; const pt1, pt2, pt3, pt4: TdxGPPoint): TdxGPStatus; overload; - function DrawRectangle(pen: TdxGPPen; const rect: TdxGPRect): TdxGPStatus; overload; - function DrawEllipse(pen: TdxGPPen; const rect: TdxGPRect): TdxGPStatus; overload; - function DrawPie(pen: TdxGPPen; const rect: TdxGPRect; startAngle, sweepAngle: Single): TdxGPStatus; overload; - function DrawPolygon(pen: TdxGPPen; points: PdxGPPoint; count: Integer): TdxGPStatus; overload; - function DrawCurve(pen: TdxGPPen; points: PdxGPPoint; count: Integer; tension: Single): TdxGPStatus; overload; - function DrawClosedCurve(pen: TdxGPPen; points: PdxGPPoint; count: Integer; tension: Single): TdxGPStatus; overload; - function Clear(color: TColor): TdxGPStatus; - procedure FillRectangle(brush: TdxGPBrush; const rect: TdxGPRect); - function FillPolygon(brush: TdxGPBrush; points: PdxGPPoint; count: Integer): TdxGPStatus; overload; - function FillEllipse(brush: TdxGPBrush; const rect: TdxGPRect): TdxGPStatus; overload; - function FillPie(brush: TdxGPBrush; const rect: TdxGPRect; startAngle, sweepAngle: Single): TdxGPStatus; overload; - function FillClosedCurve(brush: TdxGPBrush; points: PdxGPPoint; count: Integer): TdxGPStatus; overload; - end; - - TdxRGBColors = array of TRGBQuad; - - TdxGPImage = class(TdxGPBase) - private - FBits: TdxRGBColors; - FHandle: GpImage; - function GetHeight: Integer; - function GetWidth: Integer; - private - class procedure GetBitmapBitsByScanLine(ABitmap: TBitmap; var AColors: TdxRGBColors); - procedure LoadFromDataStream(AStream: TStream); virtual; - public - constructor CreateFromBitmap(ABitmap: TBitmap); virtual; - constructor CreateFromPattern(const AWidth, AHeight: Integer; - const ABits: TdxRGBColors; AHasAlphaChannel: Boolean); virtual; - constructor CreateFromStream(AStream: TStream); virtual; - destructor Destroy; override; - function Clone: TdxGPImage; - procedure Draw(DC: HDC; const R: TRect); - class function GetBitmapBits(ABitmap: TBitmap): TdxRGBColors; - function MakeComposition(AOverlay: TdxGPImage; AAlpha: Byte): TdxGPImage; - procedure SaveToStream(AStream: TStream); - - property Handle: GpImage read FHandle; - property Height: Integer read GetHeight; - property Width: Integer read GetWidth; - end; - - TdxGPImageClass = class of TdxGPImage; - - TdxGPNullImage = class(TdxGPImage) - public - class function NewInstance: TObject; override; - procedure FreeInstance; override; - end; - - TdxPNGImage = class(TGraphic) - private - FHandle: TdxGPImage; - FIsAlphaUsed: Boolean; - FIsAlphaUsedAssigned: Boolean; - procedure SetHandle(AHandle: TdxGPImage); - protected - procedure AssignTo(Dest: TPersistent); override; - procedure Changed(Sender: TObject); override; - function CheckAlphaUsed: Boolean; - procedure Draw(ACanvas: TCanvas; const ARect: TRect); override; - function GetEmpty: Boolean; override; - function GetHeight: Integer; override; - function GetIsAlphaUsed: Boolean; - function GetSize: TSize; - function GetTransparent: Boolean; override; - function GetWidth: Integer; override; - procedure SetHeight(Value: Integer); override; - procedure SetWidth(Value: Integer); override; - public - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - class function CreateFromBitmap(ASource: TBitmap): TdxGPImage; - function Compare(AImage: TdxPngImage): Boolean; virtual; - procedure DrawEx(Graphics: GpGraphics; const ADest, ASource: TRect); - function GetAsBitmap: TBitmap; virtual; - procedure SetBitmap(ABitmap: TBitmap); virtual; - procedure LoadFromStream(Stream: TStream); override; - procedure SaveToStream(Stream: TStream); override; - procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle; - APalette: HPALETTE); override; - procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; - var APalette: HPALETTE); override; - procedure StretchDraw(DC: HDC; const ADest: TRect); overload; virtual; - procedure StretchDraw(DC: HDC; const ADest, ASource: TRect); overload; virtual; - procedure StretchDrawEx(Graphics: GpGraphics; const ADest, ASource: TRect); virtual; - - property Handle: TdxGPImage read FHandle write SetHandle; - property IsAlphaUsed: Boolean read GetIsAlphaUsed; - end; - -var - dxGPImageClass: TdxGPImageClass; - -implementation - -{ TdxGPBrush } - -constructor TdxGPBrush.Create; -begin - SetStatus(NotImplemented); - FNativeBrush := nil; -end; - -destructor TdxGPBrush.Destroy; -begin - GdipDeleteBrush(FNativeBrush); - inherited; -end; - -constructor TdxGPBrush.CreateNative(nativeBrush: GpBrush; AStatus: Status); -begin - inherited Create; - FLastResult := AStatus; - SetNativeBrush(FNativeBrush); -end; - -function TdxGPBrush.Clone: TdxGPBrush; -var - gpB: GpBrush; -begin - gpB := nil; - Result := nil; - SetStatus (GdipCloneBrush(FNativeBrush, gpB)); - try - Result := TdxGPBrush.CreateNative(gpB, FLastResult); - except - GdipDeleteBrush(gpB); - end; -end; - -function TdxGPBrush.GetLastStatus: Status; -begin - Result := FLastResult; - FLastResult := Ok; -end; - -function TdxGPBrush.GetType: BrushType; -begin - SetStatus(GdipGetBrushType (FNativeBrush, Result)); -end; - -procedure TdxGPBrush.SetNativeBrush(ANativeBrush: GpBrush); -begin - FNativeBrush := ANativeBrush; -end; - -function TdxGPBrush.SetStatus(AStatus: TdxGPStatus): TdxGPStatus; -begin - Result := AStatus; - if (AStatus <> Ok) and (FLastResult <> AStatus) then - Result := GenericError; -end; - -{ TdxGPSolidBrush } - -constructor TdxGPSolidBrush.Create(color: TColor); -var - ABrush: GpSolidFill; -begin - ABrush := nil; - FLastResult := GdipCreateSolidFill(color, ABrush); - SetNativeBrush(ABrush); -end; - -constructor TdxGPSolidBrush.Create; -begin -// hide parent method -end; - -function TdxGPSolidBrush.GetColor: DWORD; -begin - SetStatus(GdipGetSolidFillColor(GPSOLIDFILL(FNativeBrush), Result)); -end; - -procedure TdxGPSolidBrush.SetColor(const Value: DWORD); -begin - SetStatus(GdipSetSolidFillColor(GpSolidFill(FNativeBrush), Value)); -end; - -{ TdxGPLinearGradientBrush } - -constructor TdxGPLinearGradientBrush.Create(rect: TdxGPRect; color1, color2: DWORD; mode: TdxGPLinearGradientMode); -var - ABrush: GpLineGradient; -begin - ABrush := nil; - FLastResult := GdipCreateLineBrushFromRectI(@rect, color1, color2, mode, WrapModeTile, ABrush); - SetNativeBrush(ABrush); -end; - -constructor TdxGPLinearGradientBrush.Create; -begin -// hide parent method -end; - -function TdxGPLinearGradientBrush.GetLinearColors(out color1, color2: DWORD): TdxGPStatus; -var - AColors: array[0..1] of DWORD; -begin - SetStatus(GdipGetLineColors(GpLineGradient(FNativeBrush), PARGB(@AColors))); - if (FLastResult = Ok) then - begin - color1 := AColors[0]; - color2 := AColors[1]; - end; - Result := FLastResult; -end; - -function TdxGPLinearGradientBrush.GetRectangle: TdxGPRect; -var - ARect: PdxGPRect; -begin - ARect := @Result; - SetStatus(GdipGetLineRectI(GpLineGradient(FNativeBrush), ARect)); -end; - -function TdxGPLinearGradientBrush.GetWrapMode: TdxGPWrapMode; -begin - Result := WrapModeTile; - SetStatus(GdipGetLineWrapMode(GpLineGradient(FNativeBrush), Result)); -end; - -function TdxGPLinearGradientBrush.SetLinearColors(color1, color2: DWORD): TdxGPStatus; -begin - Result := SetStatus(GdipSetLineColors(GpLineGradient(FNativeBrush), color1, color2)); -end; - -procedure TdxGPLinearGradientBrush.SetWrapMode(const Value: TdxGPWrapMode); -begin - SetStatus(GdipSetLineWrapMode(GpLineGradient(FNativeBrush), Value)); -end; - -{ TdxGPHatchBrush } - -constructor TdxGPHatchBrush.Create; -begin -// hide parent method -end; - -constructor TdxGPHatchBrush.Create(hatchStyle: TdxGPHatchStyle; foreColor, - backColor: DWORD); -var - ABrush: GpHatch; -begin - ABrush := nil; - FLastResult := GdipCreateHatchBrush(hatchStyle, foreColor, backColor, ABrush); - SetNativeBrush(ABrush); -end; - -function TdxGPHatchBrush.GetBackgroundColor: DWORD; -begin - SetStatus(GdipGetHatchBackgroundColor(GpHatch(FNativeBrush), Result)); -end; - -function TdxGPHatchBrush.GetForegroundColor: DWORD; -begin - SetStatus(GdipGetHatchForegroundColor(GpHatch(FNativeBrush), Result)); -end; - -function TdxGPHatchBrush.GetHatchStyle: TdxGPHatchStyle; -begin - SetStatus(GdipGetHatchStyle(GpHatch(FNativeBrush), Result)); -end; - -{ TdxGPPen } - -constructor TdxGPPen.Create(brush: TdxGPBrush; width: Single); -var - unit_: TdxGPUnit; -begin - unit_ := UnitWorld; - FNativePen := nil; - FLastResult := GdipCreatePen2(brush.FNativeBrush, width, unit_, FNativePen); -end; - -constructor TdxGPPen.Create(color: DWORD; width: Single); -var - unit_: TdxGPUnit; -begin - unit_ := UnitWorld; - FNativePen := nil; - FLastResult := GdipCreatePen1(color, width, unit_, FNativePen); -end; - -destructor TdxGPPen.Destroy; -begin - GdipDeletePen(FNativePen); - inherited; -end; - -function TdxGPPen.GetAlignment: TdxGPPenAlignment; -begin - SetStatus(GdipGetPenMode(FNativePen, Result)); -end; - -function TdxGPPen.GetBrush: TdxGPBrush; -var - type_: TdxGPPenType; - ABrush: TdxGPBrush; - ANativeBrush: GpBrush; -begin - type_ := GetPenType; - ABrush := nil; - case type_ of - PenTypeSolidColor : ABrush := TdxGPSolidBrush.Create; - PenTypeHatchFill : ABrush := TdxGPHatchBrush.Create; - PenTypeTextureFill : ABrush := TdxGPTextureBrush.Create; - PenTypePathGradient : ABrush := TdxGPBrush.Create; - PenTypeLinearGradient : ABrush := TdxGPLinearGradientBrush.Create; - end; - if ABrush <> nil then - begin - SetStatus(GdipGetPenBrushFill(FNativePen, ANativeBrush)); - brush.SetNativeBrush(ANativeBrush); - end; - Result := ABrush; -end; - -function TdxGPPen.GetColor: DWORD; -var - type_: TdxGPPenType; - argb: DWORD; -begin - type_ := GetPenType; - Result := 0; - if (type_ = PenTypeSolidColor) then - begin - SetStatus(GdipGetPenColor(FNativePen, argb)); - if FLastResult = Ok then Result := argb; - end; -end; - -function TdxGPPen.GetLastStatus: TdxGPStatus; -begin - Result := FLastResult; - FLastResult := Ok; -end; - -function TdxGPPen.GetPenType: TdxGPPenType; -begin - SetStatus(GdipGetPenFillType(FNativePen, Result)); -end; - -function TdxGPPen.GetWidth: Single; -begin - SetStatus(GdipGetPenWidth(FNativePen, Result)); -end; - -procedure TdxGPPen.SetAlignment(const Value: TdxGPPenAlignment); -begin - SetStatus(GdipSetPenMode(FNativePen, Value)); -end; - -procedure TdxGPPen.SetBrush(const Value: TdxGPBrush); -begin - SetStatus(GdipSetPenBrushFill(FNativePen, Value.FNativeBrush)); -end; - -procedure TdxGPPen.SetColor(const Value: DWORD); -begin - SetStatus(GdipSetPenColor(FNativePen, Value)); -end; - -procedure TdxGPPen.SetNativePen(ANativePen: GpPen); -begin - FNativePen := ANativePen; -end; - -function TdxGPPen.SetStatus(status: TdxGPStatus): TdxGPStatus; -begin - if (status <> Ok) then FLastResult := status; - Result := status; -end; - -procedure TdxGPPen.SetWidth(const Value: Single); -begin - SetStatus(GdipSetPenWidth(FNativePen, Value)); -end; - -{ TdxGPGraphics } - -constructor TdxGPGraphics.Create(hdc: HDC); -var - AGraphics :GpGraphics; -begin - inherited Create; - AGraphics := nil; - FLastResult := GdipCreateFromHDC(hdc, AGraphics); - SetNativeGraphics(AGraphics); -end; - -destructor TdxGPGraphics.Destroy; -begin - GdipDeleteGraphics(FNativeGraphics); - inherited; -end; - -procedure TdxGPGraphics.FillRectangle(brush: TdxGPBrush; const rect: TdxGPRect); -begin - SetStatus(GdipFillRectangleI(FNativeGraphics, brush.FNativeBrush, rect.X, rect.Y, rect.Width, rect.Height)); -end; - -procedure TdxGPGraphics.SetNativeGraphics(AGraphics: GpGraphics); -begin - FNativeGraphics := AGraphics -end; - -function TdxGPGraphics.Clear(color: TColor): TdxGPStatus; -begin - Result := SetStatus(GdipGraphicsClear(FNativeGraphics, color)); -end; - -function TdxGPGraphics.DrawArc(pen: TdxGPPen; const rect: TdxGPRect; - startAngle, sweepAngle: Single): TdxGPStatus; -begin - Result := SetStatus(GdipDrawArcI(FNativeGraphics, pen.FNativePen, - rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)); -end; - -function TdxGPGraphics.DrawBezier(pen: TdxGPPen; const pt1, pt2, pt3, - pt4: TdxGPPoint): TdxGPStatus; -begin - Result := SetStatus(GdipDrawBezierI(FNativeGraphics, pen.FNativePen, - pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt1.Y)); -end; - -function TdxGPGraphics.DrawBezier(pen: TdxGPPen; x1, y1, x2, y2, x3, y3, - x4, y4: Integer): TdxGPStatus; -begin - Result := SetStatus(GdipDrawBezierI(FNativeGraphics, pen.FNativePen, - x1, y1, x2, y2, x3, y3, x4, y4)); -end; - -function TdxGPGraphics.DrawClosedCurve(pen: TdxGPPen; points: PdxGPPoint; - count: Integer; tension: Single): TdxGPStatus; -begin - Result := SetStatus(GdipDrawClosedCurve2I(FNativeGraphics, pen.FNativePen, - points, count, tension)); -end; - -function TdxGPGraphics.DrawCurve(pen: TdxGPPen; points: PdxGPPoint; - count: Integer; tension: Single): TdxGPStatus; -begin - Result := SetStatus(GdipDrawCurve2I(FNativeGraphics, pen.FNativePen, - points, count, tension)); -end; - -function TdxGPGraphics.DrawEllipse(pen: TdxGPPen; - const rect: TdxGPRect): TdxGPStatus; -begin - Result := SetStatus(GdipDrawEllipseI(FNativeGraphics, pen.FNativePen, - rect.X, rect.Y, rect.Width, rect.Height)); -end; - -function TdxGPGraphics.DrawLine(pen: TdxGPPen; x1, y1, x2, y2: Integer): TdxGPStatus; -begin - Result := SetStatus(GdipDrawLineI(FNativeGraphics, pen.FNativePen, x1, y1, x2, y2)); -end; - -function TdxGPGraphics.DrawLine(pen: TdxGPPen; const pt1, pt2: TdxGPPoint): TdxGPStatus; -begin - Result := SetStatus(GdipDrawLineI(FNativeGraphics, pen.FNativePen, pt1.X, pt1.Y, pt2.X, pt2.Y)); -end; - -function TdxGPGraphics.DrawPie(pen: TdxGPPen; const rect: TdxGPRect; - startAngle, sweepAngle: Single): TdxGPStatus; -begin - Result := SetStatus(GdipDrawPieI(FNativeGraphics, pen.FNativePen, - rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)); -end; - -function TdxGPGraphics.DrawPolygon(pen: TdxGPPen; points: PdxGPPoint; - count: Integer): TdxGPStatus; -begin - Result := SetStatus(GdipDrawPolygonI(FNativeGraphics, pen.FNativePen, points, count)); -end; - -function TdxGPGraphics.DrawRectangle(pen: TdxGPPen; - const rect: TdxGPRect): TdxGPStatus; -begin - Result := SetStatus(GdipDrawRectangleI(FNativeGraphics, pen.FNativePen, - rect.X, rect.Y, rect.Width, rect.Height)); -end; - -function TdxGPGraphics.FillClosedCurve(brush: TdxGPBrush; points: PdxGPPoint; - count: Integer): TdxGPStatus; -begin - Result := SetStatus(GdipFillClosedCurveI(FNativeGraphics, brush.FNativeBrush, - points, count)); -end; - -function TdxGPGraphics.FillEllipse(brush: TdxGPBrush; - const rect: TdxGPRect): TdxGPStatus; -begin - Result := SetStatus(GdipFillEllipseI(FNativeGraphics, brush.FNativeBrush, - rect.X, rect.Y, rect.Width, rect.Height)); -end; - -function TdxGPGraphics.FillPie(brush: TdxGPBrush; const rect: TdxGPRect; - startAngle, sweepAngle: Single): TdxGPStatus; -begin - Result := SetStatus(GdipFillPieI(FNativeGraphics, brush.FNativeBrush, - rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)); -end; - -function TdxGPGraphics.FillPolygon(brush: TdxGPBrush; points: PdxGPPoint; - count: Integer): TdxGPStatus; -begin - Result := SetStatus(GdipFillPolygonI(FNativeGraphics, brush.FNativeBrush, - points, count, FillModeAlternate)); -end; - -function TdxGPGraphics.GetHDC: HDC; -begin - SetStatus(GdipGetDC(FNativeGraphics, Result)); -end; - -function TdxGPGraphics.GetLastStatus: TdxGPStatus; -begin - Result := FLastResult; - FLastResult := Ok; -end; - -function TdxGPGraphics.GetNativeGraphics: GpGraphics; -begin - Result := FNativeGraphics; -end; - -function TdxGPGraphics.GetNativePen(pen: TdxGPPen): GpPen; -begin - Result := pen.FNativePen; -end; - -procedure TdxGPGraphics.ReleaseHDC(hdc: HDC); -begin - SetStatus(GdipReleaseDC(FNativeGraphics, hdc)); -end; - -function TdxGPGraphics.SetStatus(status: TdxGPStatus): TdxGPStatus; -begin - if (status <> Ok) then FLastResult := status; - Result := status; -end; - -{ TdxGPImage } - -constructor TdxGPImage.CreateFromBitmap(ABitmap: TBitmap); -begin - CheckPngCodec; - CreateFromPattern(ABitmap.Width, ABitmap.Height, - GetBitmapBits(ABitmap), ABitmap.PixelFormat = pf32Bit); -end; - -constructor TdxGPImage.CreateFromPattern(const AWidth, AHeight: Integer; - const ABits: TdxRGBColors; AHasAlphaChannel: Boolean); -var - I: Integer; -begin - FBits := ABits; - if not AHasAlphaChannel then - for I := 0 to Length(FBits) - 1 do - FBits[I].rgbReserved := 255; - GdipCheck(GdipCreateBitmapFromScan0(AWidth, AHeight, - AWidth * 4, PixelFormat32bppPARGB, @FBits[0], FHandle)); -end; - -constructor TdxGPImage.CreateFromStream(AStream: TStream); -var - Bitmap: TBitmap; - Header: TBitmapFileHeader; -begin - if not CheckGdiPlus or (AStream.Size < SizeOf(Header)) then Exit; - AStream.ReadBuffer(Header, SizeOf(Header)); - AStream.Seek(-SizeOf(Header), soFromCurrent); - if Header.bfType = $4D42 then - begin - Bitmap := TBitmap.Create; - try - Bitmap.LoadFromStream(AStream); - CreateFromBitmap(Bitmap); - finally - Bitmap.Free; - end; - end - else - LoadFromDataStream(AStream); -end; - -destructor TdxGPImage.Destroy; -begin - if Handle <> nil then - GdipCheck(GdipDisposeImage(Handle)); - FBits := nil; - inherited Destroy; -end; - -function TdxGPImage.Clone: TdxGPImage; -begin - if Length(FBits) > 0 then - Result := dxGpImageClass.CreateFromPattern(Width, Height, FBits, True) - else - begin - Result := dxGpImageClass.Create; - GdipCheck(GdipCloneImage(Handle, Result.FHandle)); - end; -end; - -procedure TdxGPImage.SaveToStream(AStream: TStream); -begin - GdipCheck(GdipSaveImageToStream(Handle, - TStreamAdapter.Create(AStream, soReference), @PngCodec, nil)); -end; - -function TdxGPImage.MakeComposition(AOverlay: TdxGPImage; AAlpha: Byte): TdxGPImage; -var - A: Single; - ABits: TdxRGBColors; - ADest, ASource: TRGBQuad; - I, ACount: Integer; -begin - Result := nil; - if Length(FBits) > 0 then - begin - ACount := Width * Height; - A := AAlpha / 255; - SetLength(ABits, ACount); - for I := 0 to ACount - 1 do - begin - ADest := FBits[I]; - ASource := AOverlay.FBits[I]; - ADest.rgbBlue := Round(ADest.rgbBlue * (1 - A) + ASource.rgbBlue * A); - ADest.rgbGreen := Round(ADest.rgbGreen * (1 - A) + ASource.rgbGreen * A); - ADest.rgbRed := Round(ADest.rgbRed * (1 - A) + ASource.rgbRed * A); - ADest.rgbReserved := Round(ADest.rgbReserved * (1 - A) + ASource.rgbReserved * A); - ABits[I] := ADest; - end; - Result := dxGpImageClass.CreateFromPattern(Width, Height, ABits, True); - end; -end; - -procedure TdxGPImage.Draw(DC: HDC; const R: TRect); -var - AGraphics: GpGraphics; -begin - if GdipCreateFromHDC(DC, AGraphics) = Ok then - begin - GdipCheck(GdipDrawImageRectRectI(AGraphics, Handle, R.Left, R.Top, - R.Right - R.Left, R.Bottom - R.Top, 0, 0, Width, Height, UnitPixel, - nil, nil, nil)); - GdipCheck(GdipDeleteGraphics(AGraphics)); - end; -end; - -class function TdxGPImage.GetBitmapBits(ABitmap: TBitmap): TdxRGBColors; -var - AInfo: TBitmapInfo; - AScreenDC: HDC; -begin - SetLength(Result, ABitmap.Width * ABitmap.Height); - FillChar(AInfo, SizeOf(AInfo), 0); - AInfo.bmiHeader.biSize := SizeOf(TBitmapInfoHeader); - AInfo.bmiHeader.biWidth := ABitmap.Width; - AInfo.bmiHeader.biHeight := -ABitmap.Height; - AInfo.bmiHeader.biPlanes := 1; - AInfo.bmiHeader.biBitCount := 32; - AInfo.bmiHeader.biCompression := BI_RGB; - AScreenDC := GetDC(0); - if GetDIBits(AScreenDC, ABitmap.Handle, 0, ABitmap.Height, Result, AInfo, - DIB_RGB_COLORS) = 0 - then - GetBitmapBitsByScanLine(ABitmap, Result); - ReleaseDC(0, AScreenDC); -end; - -class procedure TdxGPImage.GetBitmapBitsByScanLine(ABitmap: TBitmap; - var AColors: TdxRGBColors); -var - AIndex: Integer; - AQuad: PRGBQuad; - I, J: Integer; -begin - // todo: try to get bitmap bits if GetDIBits fail - if ABitmap.PixelFormat = pf32bit then - begin - if Length(AColors) <> ABitmap.Width * ABitmap.Height then - SetLength(AColors, ABitmap.Width * ABitmap.Height); - AIndex := 0; - for J := 0 to ABitmap.Height - 1 do - begin - AQuad := ABitmap.ScanLine[J]; - for I := 0 to ABitmap.Width - 1 do - begin - AColors[AIndex] := AQuad^; - Inc(AQuad); - Inc(AIndex); - end; - end; - end; -end; - -function TdxGPImage.GetHeight: Integer; -begin - GdipCheck(GdipGetImageHeight(Handle, Result)); -end; - -function TdxGPImage.GetWidth: Integer; -begin - GdipCheck(GdipGetImageWidth(Handle, Result)); -end; - -procedure TdxGPImage.LoadFromDataStream(AStream: TStream); -var - Data: HGlobal; - DataPtr: Pointer; - AccessStream: IStream; -begin - Data := GlobalAlloc(GMEM_MOVEABLE + GMEM_DDESHARE, AStream.Size); - try - DataPtr := GlobalLock(Data); - try - AStream.Read(DataPtr^, AStream.Size); - GdipCheck(CreateStreamOnHGlobal(Data, False, AccessStream) = s_OK); - GdipCheck(GdipCreateBitmapFromStream(AccessStream, FHandle)); - finally - GlobalUnlock(Data); - AccessStream := nil; - end; - finally - GlobalFree(Data); - end; -end; - -{ TdxGPNullImage } - -class function TdxGPNullImage.NewInstance: TObject; -begin - Result := InitInstance(AllocMem(InstanceSize)); -end; - -procedure TdxGPNullImage.FreeInstance; -var - P: Pointer; -begin - CleanupInstance; - P := Self; - FreeMem(P); -end; - -{ TdxPNGImage } - -destructor TdxPNGImage.Destroy; -begin - Handle := nil; - inherited Destroy; -end; - -procedure TdxPNGImage.Assign(Source: TPersistent); -begin - if Source is TBitmap then - Handle := CreateFromBitmap(TBitmap(Source)) - else - if (Source is TdxPNGImage) and (TdxPNGImage(Source).Handle <> nil) then - Handle := TdxPNGImage(Source).Handle.Clone - else - inherited Assign(Source); -end; - -function TdxPNGImage.Compare(AImage: TdxPngImage): Boolean; - - function GetColors(AImage: TdxPNGImage): TdxRGBColors; - var - ABitmap: TBitmap; - begin - ABitmap := AImage.GetAsBitmap; - try - Result := AImage.Handle.GetBitmapBits(ABitmap); - finally - ABitmap.Free; - end; - end; - - function CompareColors(Color1, Color2: TRGBQuad): Boolean; - begin - Result := (Color1.rgbBlue = Color2.rgbBlue) and - (Color1.rgbGreen = Color2.rgbGreen) and - (Color1.rgbRed = Color2.rgbRed) and - (Color1.rgbReserved = Color2.rgbReserved); - end; - -var - AColors: TdxRGBColors; - AColors2: TdxRGBColors; - I: Integer; -begin - AColors := nil; - AColors2 := nil; - Result := (AImage.Height = Height) and (AImage.Width = Width); - if Result and not (AImage.Empty or Empty) then - begin - AColors := GetColors(AImage); - AColors2 := GetColors(Self); - for I := 0 to High(AColors) do - begin - Result := CompareColors(AColors[I], AColors2[I]); - if not Result then - Exit; - end; - end; -end; - -procedure TdxPNGImage.DrawEx( - Graphics: GpGraphics; const ADest, ASource: TRect); -begin - if Handle = nil then Exit; - StretchDrawEx(Graphics, ADest, ASource); -end; - -function TdxPNGImage.GetAsBitmap: TBitmap; -var - AHandle: HBitmap; -begin - GdipCheck(GdipCreateHBITMAPFromBitmap(Handle.Handle, AHandle, 0)); - Result := TBitmap.Create; - Result.PixelFormat := pf32Bit; - Result.Handle := AHandle; -end; - -class function TdxPNGImage.CreateFromBitmap(ASource: TBitmap): TdxGPImage; -begin - CheckGdiPlus; - Result := dxGPImageClass.CreateFromBitmap(ASource); -end; - -procedure TdxPNGImage.LoadFromStream(Stream: TStream); -begin - if Stream.Size = 0 then - Handle := nil - else - Handle := dxGPImageClass.CreateFromStream(Stream) -end; - -procedure TdxPNGImage.SaveToStream(Stream: TStream); -var - ADest: TMemoryStream; -begin - if Handle <> nil then - begin - ADest := TMemoryStream.Create(); - try - Handle.SaveToStream(ADest); - ADest.Position := 0; - Stream.CopyFrom(ADest, ADest.Size); - finally - ADest.Free; - end; - end; -end; - -procedure TdxPNGImage.LoadFromClipboardFormat(AFormat: Word; AData: THandle; - APalette: HPALETTE); -var - ABitmap: TBitmap; -begin - ABitmap := TBitmap.Create; - try - ABitmap.PixelFormat := pf32Bit; - ABitmap.HandleType := bmDIB; - ABitmap.LoadFromClipboardFormat(AFormat, AData, APalette); - finally - ABitmap.Free; - end; - SetBitmap(ABitmap); -end; - -procedure TdxPNGImage.SaveToClipboardFormat(var AFormat: Word; var AData: THandle; - var APalette: HPALETTE); -var - ABitmap: TBitmap; -begin - ABitmap := TBitmap.Create; - try - ABitmap.Width := Width; - ABitmap.Height := Height; - ABitmap.Canvas.Brush.Color := clWhite; - ABitmap.Canvas.FillRect(Rect(0, 0, Width, Height)); - Draw(ABitmap.Canvas, Rect(0, 0, Width, Height)); - ABitmap.SaveToClipboardFormat(AFormat, AData, APalette); - finally - ABitmap.Free; - end; -end; - -procedure TdxPNGImage.SetBitmap(ABitmap: TBitmap); -begin - Handle := CreateFromBitmap(ABitmap); -end; - -procedure TdxPNGImage.StretchDraw(DC: HDC; const ADest: TRect); -begin - StretchDraw(DC, ADest, Rect(0, 0, Width, Height)); -end; - -procedure TdxPNGImage.StretchDraw(DC: HDC; const ADest, ASource: TRect); -var - Gp: GpGraphics; -begin - if Handle = nil then Exit; - GdipCheck(GdipCreateFromHDC(DC, Gp)); - StretchDrawEx(Gp, ADest, ASource); - GdipCheck(GdipDeleteGraphics(Gp)); -end; - -procedure TdxPNGImage.StretchDrawEx( - Graphics: GpGraphics; const ADest, ASource: TRect); -var - DstH, DstW, SrcH, SrcW: Single; -begin - if (Handle <> nil) and dxGpIsRectVisible(Graphics, ADest) then - begin - SrcW := ASource.Right - ASource.Left; - SrcH := ASource.Bottom - ASource.Top; - DstW := ADest.Right - ADest.Left; - DstH := ADest.Bottom - ADest.Top; - if (SrcW < 1) or (SrcH < 1) or (DstW < 1) or (DstH < 1) then Exit; - if (DstW > SrcW) and (SrcW > 1) then - SrcW := SrcW - 1; - if (DstH > SrcH) and (SrcH > 1) then - SrcH := SrcH - 1; - GdipCheck(GdipDrawImageRectRect(Graphics, Handle.Handle, ADest.Left, ADest.Top, - DstW, DstH, ASource.Left, ASource.Top, SrcW, SrcH, UnitPixel, nil, nil, nil)) - end; -end; - -procedure TdxPNGImage.AssignTo(Dest: TPersistent); -var - ABitmap: TBitmap; -begin - if Dest is TdxPNGImage then - (Dest as TdxPNGImage).Assign(Self) - else - if Dest is TBitmap then - begin - ABitmap := GetAsBitmap; - try - (Dest as TBitmap).Assign(ABitmap); - finally - ABitmap.Free; - end; - end - else - inherited AssignTo(Dest); -end; - -procedure TdxPNGImage.Changed(Sender: TObject); -begin - FIsAlphaUsedAssigned := False; - inherited Changed(Sender); -end; - -function TdxPNGImage.CheckAlphaUsed: Boolean; -var - ABitmap: TBitmap; - AColors: TdxRGBColors; - I: Integer; -begin - Result := False; - ABitmap := GetAsBitmap; - try - AColors := Handle.GetBitmapBits(ABitmap); - for I := Low(AColors) to High(AColors) do - begin - Result := AColors[I].rgbReserved <> 255; - if Result then - Break; - end; - finally - ABitmap.Free; - end; -end; - -procedure TdxPNGImage.Draw(ACanvas: TCanvas; const ARect: TRect); -begin - StretchDraw(ACanvas.Handle, ARect, Rect(0, 0, Width, Height)); -end; - -function TdxPNGImage.GetEmpty: Boolean; -begin - with GetSize do - Result := (cx <= 0) or (cy <= 0) -end; - -function TdxPNGImage.GetHeight: Integer; -begin - Result := GetSize.cy; -end; - -function TdxPNGImage.GetIsAlphaUsed: Boolean; -begin - if FIsAlphaUsedAssigned then - Result := FIsAlphaUsed - else - begin - FIsAlphaUsed := CheckAlphaUsed; - FIsAlphaUsedAssigned := True; - Result := FIsAlphaUsed; - end; -end; - -function TdxPNGImage.GetSize: TSize; -var - W, H: Single; -begin - if Handle <> nil then - GdipCheck(GdipGetImageDimension(Handle.Handle, W, H)) - else - begin - W := 0; - H := 0; - end; - Result.cx := Trunc(W); - Result.cy := Trunc(H); -end; - -function TdxPNGImage.GetTransparent: Boolean; -begin - Result := True; -end; - -function TdxPNGImage.GetWidth: Integer; -begin - Result := GetSize.cx; -end; - -procedure TdxPNGImage.SetWidth(Value: Integer); -begin -end; - -procedure TdxPNGImage.SetHeight(Value: Integer); -begin -end; - -procedure TdxPNGImage.SetHandle(AHandle: TdxGPImage); -begin - if AHandle <> FHandle then - begin - if FHandle <> nil then - FHandle.Free; - FHandle := AHandle; - end; -end; - -procedure RegisterAssistants; -begin - dxGPImageClass := TdxGPNullImage; - if CheckGdiPlus then - begin - CheckPngCodec; - dxGPImageClass := TdxGPImage; - RegisterClasses([TdxPNGImage]); - TPicture.RegisterFileFormat('PNG', 'PNG graphics from DevExpress', TdxPNGImage); - end; -end; - -procedure UnregisterAssistants; -begin - TPicture.UnregisterGraphicClass(TdxPNGImage); - UnregisterClasses([TdxPNGImage]); -end; - -initialization - dxUnitsLoader.AddUnit(@RegisterAssistants, @UnregisterAssistants); - -finalization - dxUnitsLoader.RemoveUnit(@UnregisterAssistants); - -end. diff --git a/internal/x.46/ExpressLayout Control 2/EULA.txt b/internal/x.46/ExpressLayout Control 2/EULA.txt deleted file mode 100644 index b4c115d9..00000000 --- a/internal/x.46/ExpressLayout Control 2/EULA.txt +++ /dev/null @@ -1,123 +0,0 @@ -DEVELOPER EXPRESS INC -ExpressLayout Control 2(tm) COMPONENT SUITE -Copyright (C) 1999-2009 Developer Express Inc. - -END-USER LICENSE AGREEMENT -FOR ALL SOFTWARE COMPONENT PRODUCT(S) - -IMPORTANT- READ CAREFULLY: This DEVELOPER EXPRESS INC ("DEVEXPRESS") End-User License Agreement ("EULA") is a legal agreement between you, a developer of software applications, ("Developer End User") and DEVEXPRESS for all DEVEXPRESS products, controls, source code, demos, intermediate files, media, printed materials, and "online" or electronic documentation ("SOFTWARE COMPONENT PRODUCT(S)") contained in this installation file. - -DEVEXPRESS grants to you as an individual, a personal, nonexclusive license to install and use the SOFTWARE COMPONENT PRODUCT(S) for the sole purposes of designing, developing, testing, and deploying application programs which you create. By installing, copying, or otherwise using the SOFTWARE COMPONENT PRODUCT(S), you agree to be bound by the terms of this EULA. If you do not agree to any part of the terms of this EULA, DO NOT INSTALL, USE, EVALUATE, OR REPLICATE IN ANY MANNER, ANY PART, FILE OR PORTION OF THE SOFTWARE COMPONENT PRODUCT(S). - -All SOFTWARE COMPONENT PRODUCT(S) is licensed, not sold. If you are an individual, you must acquire an individual license for the SOFTWARE COMPONENT PRODUCT(S) from DEVEXPRESS or its authorized resellers. If you are an entity, you must acquire and assign an individual license for each Developer End User within your organization using and or developing with the SOFTWARE COMPONENT PRODUCT(S) from DEVEXPRESS or its authorized resellers. - -If the SOFTWARE COMPONENT PRODUCT(S) you have obtained is marked as a "TRIAL" or "EVALUATION," you may install one copy of the SOFTWARE COMPONENT PRODUCT(S) for testing purposes for a period of 30 calendar days from the date of installation ("Evaluation Period"). Upon expiration of the Evaluation Period, the SOFTWARE COMPONENT PRODUCT(S) must be uninstalled and all copies destroyed. - -RIGOROUS ENFORCEMENT OF INTELLECTUAL PROPERTY RIGHTS. If the licensed right of use for this SOFTWARE COMPONENT PRODUCT(S) is purchased by you with any intent to reverse engineer, decompile, create derivative works, and the exploitation or unauthorized transfer of, any DEVEXPRESS intellectual property and trade secrets, to include any exposed methods or source code where provided, no licensed right of use shall exist, and any PRODUCT(s) created as a result shall be judged illegal by definition of all applicable law. Any sale or resale of intellectual property or created derivatives so obtained will be prosecuted to the fullest extent of all local, federal and international law. - -1. GRANT OF LICENSE. - -This EULA, if legally executed as defined herein, licenses and so grants the single individual Developer End User the following rights: - -SOFTWARE COMPONENT PRODUCT(S) - Developer End User may install and use the SOFTWARE COMPONENT PRODUCT(S) on a single computer. Developer End User may also install and use the SOFTWARE COMPONENT PRODUCT(S) on a portable computer. - -2. LIMITATIONS ON REVERSE ENGINEERING, DECOMPILATION, AND DISASSEMBLY. - -You may not reverse engineer, decompile, create derivative works, translate, or disassemble the SOFTWARE COMPONENT PRODUCT(S), and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. You agree to take all reasonable, legal and appropriate measures to prohibit the illegal dissemination of the SOFTWARE COMPONENT PRODUCT(S) or any of its constituent parts and redistributables to the fullest extent of all applicable local, US Codes and International Laws and Treaties regarding anti-circumvention, including but not limited to, the Geneva and Berne World Intellectual Property Organization (WIPO) Diplomatic Conferences. - -3. SEPARATION OF COMPONENTS. - -The SOFTWARE COMPONENT PRODUCT(S) is licensed as a single PRODUCT(s). The SOFTWARE COMPONENT PRODUCT(S) and its constituent parts and any provided redistributables may not be reverse engineered, decompiled, disassembled or separated for use on more than one computer, nor placed for distribution, sale, or resale as individual creations by Developer End User. The provision of source code, if included with the SOFTWARE COMPONENT PRODUCT(S), does not constitute transfer of any legal rights to such code, and resale or distribution of all or any portion of all source code and intellectual property will be prosecuted to the fullest extent of all applicable local, federal and international laws. All DEVEXPRESS libraries, source code, redistributables and other files remain DEVEXPRESS's exclusive property. You may not distribute any files, except those that DEVEXPRESS has expressly designated as Redistributable. - -4. RENTAL. - -You may not rent, lease, or lend the SOFTWARE COMPONENT PRODUCT(S). - -5. TRANSFER. - -You may NOT permanently or temporarily transfer ANY of your rights under this EULA to any individual or entity without prior written approval from DEVEXPRESS. Regardless of any modifications which you make and regardless of how you might compile, link, and/or package your programs, under no circumstances may the libraries, Redistributables, and/or other files of the SOFTWARE COMPONENT PRODUCT(S) (including any portions thereof) be used for developing programs by anyone other than you. Only you as the licensed Developer End User have the right to use the libraries, redistributables, or other files of the SOFTWARE COMPONENT PRODUCT(S) (or any portions thereof) for developing programs created with the SOFTWARE COMPONENT PRODUCT(S). In particular, you may not share copies of the Redistributables with other co-developers. You may not reproduce or distribute any DEVEXPRESS documentation without DEVEXPRESS's explicit permission. - -If you are an entity (Company), you must acquire and assign a license to each Developer End User within your organization using and or developing with the SOFTWARE COMPONENT PRODUCT(S). With written notification to DEVEXPRESS, Company may transfer the license obtained for a Developer End User to another Developer End User employed or otherwise engaged by Company if the initial Developer End User is no longer employed or engaged by Company or is reassigned to another function within Company and no longer develops software applications using the SOFTWARE COMPONENT PRODUCT(S). In addition, with written notification to DEVEXPRESS, Company may transfer its license of the SOFTWARE COMPONENT PRODUCT(S) to a successor Company. - -6. ROYALTY FREE REDISTRIBUTION. - -DEVEXPRESS PRODUCT(s) may include certain files ("Redistributable(s)") intended for distribution by you to the users of software applications which you create. Redistributables include, for example, those files identified in printed or on-line documentation as redistributable files, or those files preselected for deployment by an install utility provided with the SOFTWARE COMPONENT PRODUCT(S) (if any). In all circumstances, the Redistributables for the SOFTWARE COMPONENT PRODUCT(S) are only those files specifically designated as such by DEVEXPRESS. - -Subject to all of the terms and conditions in this EULA, you may reproduce and distribute copies of the Redistributables, provided that such copies are made from the original copy of the Redistributables included with the SOFTWARE COMPONENT PRODUCT(S) or modified versions of the Redistributables which are provided to you by DEVEXPRESS or those which you create. Copies of Redistributables may only be distributed with and for the sole purpose of executing application programs permitted under this EULA that you have created using the SOFTWARE COMPONENT PRODUCT(S). - -REDISTRIBUTABLES. To obtain a list of redistributables that apply under this EULA, contact support@devexpress.com - -AT NO TIME MAY DEVELOPER END USER CREATE ANY TOOL, REDISTRIBUTABLE, OR SOFTWARE COMPONENT PRODUCT(S) THAT DIRECTLY OR INDIRECTLY COMPETES WITH DEVEXPRESS SOFTWARE COMPONENT PRODUCT(S) WHICH UTILIZES ALL OR ANY PORTION OF THE SOFTWARE COMPONENT PRODUCT(S) contained within this installation. - -Distribution by the Developer End User of any design-time tools (EXE's OCX's or DLL's), executables, and source code distributed to Developer End User by DEVEXPRESS as part of this SOFTWARE COMPONENT PRODUCT(S) and not explicitly identified as a redistributable file is strictly prohibited. The Developer End User shall not develop software applications that provide an application programming interface to the SOFTWARE COMPONENT PRODUCT(S) or the SOFTWARE COMPONENT PRODUCT(S) as modified. - -The Developer End User may NOT distribute the SOFTWARE COMPONENT PRODUCT(S), in any format, to other users for development or application compilation purposes. Specifically, if Developer End User creates a control using the SOFTWARE COMPONENT PRODUCT(S) as a constituent control, Developer End User may NOT distribute the control created with the SOFTWARE COMPONENT PRODUCT(S) (in any format) to users to be used used at design time and or for ANY development purposes. - -Developer End User MAY NOT REDISTRIBUTE any SOFTWARE COMPONENT PRODUCT(s) files if using an evaluation, trial, Not for Resale, or demo version of the SOFTWARE COMPONENT PRODUCT(s). - -7. UPGRADES. - -If the SOFTWARE COMPONENT PRODUCT(S) is labeled as an upgrade, you must be properly licensed to use the SOFTWARE COMPONENT PRODUCT(S) identified by DEVEXPRESS as being eligible for the upgrade in order to use the SOFTWARE COMPONENT PRODUCT(S). A SOFTWARE COMPONENT PRODUCT(S) labeled as an upgrade replaces and/or supplements the SOFTWARE COMPONENT PRODUCT(S) that formed the basis for your eligibility for the upgrade, and together constitutes a single PRODUCT(S). You may use the resulting upgraded PRODUCT(S) only in accordance with all the terms of this EULA. - -8. COPYRIGHT. - -All title and copyrights in and to the SOFTWARE COMPONENT PRODUCT(S) (including but not limited to any copywritten images, demos, source code, intermediate files, packages, photographs, redistributables, animations, video, audio, music, text, and "applets" incorporated into the SOFTWARE COMPONENT PRODUCT(S) the accompanying printed materials, and any copies of the SOFTWARE COMPONENT PRODUCT(S)) are owned by DEVEXPRESS or its subsidiaries. The SOFTWARE COMPONENT PRODUCT(S) is protected by copyright laws and international treaty provisions and therefore, you must treat the SOFTWARE COMPONENT PRODUCT(S) like any other copyrighted material except that you may install the SOFTWARE COMPONENT PRODUCT(S) as described in this EULA. - -9. DUAL-MEDIA SOFTWARE COMPONENT PRODUCT(S). - -You may receive the SOFTWARE COMPONENT PRODUCT(S) in more than one medium. Regardless of the medium, you may use only one medium that is appropriate for your single computer. You may not loan, sell, rent, lease, or otherwise transfer in any manner the other medium to another user or entity. - -10. U.S. GOVERNMENT RESTRICTED RIGHTS. - -The Licensed Software is Commercial Computer Software provided with RESTRICTED RIGHTS under Federal Acquisition Regulations and agency supplements to them. Use, duplication or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFAR 255.227-7013 et. seq. or 252.211-7015, or subparagraphs (a) through (d) of the Commercial Computer Software Restricted Rights at FAR 52.227-19, as applicable, or similar clauses in the NASA FAR Supplement. Contractor-manufacturer is Developer Express Inc. / 801 N. Brand Blvd Suite 850, Glendale CA 91203. - -11. EXPORT RESTRICTIONS. - -DEVEXPRESS expressly complies with all export restrictions imposed by the government of the United States of America. You, as Developer End User, must agree not to export or re-export the SOFTWARE COMPONENT PRODUCT(S) within any created application to any country, person, entity or end user subject to U.S.A. export restrictions. Restricted countries currently include, but are not necessarily limited to Cuba, Iran, Iraq, Libya, North Korea, Sudan, and Syria. You warrant and represent that neither the U.S.A. Bureau of Export Administration nor any other federal agency has suspended, revoked or denied your export privileges. - -12. NOTE ON JAVA SUPPORT. - -Certain SOFTWARE COMPONENT PRODUCT(S) may contain support for programs written in Java. Java technology is not fault tolerant and is not designed, manufactured, or intended for use or resale as on-line control equipment in hazardous environments requiring fail-safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of Java technology could lead directly to death, personal injury, or severe physical or environmental damage. - -13. DISCLAIMER OF WARRANTY. - -DEVEXPRESS expressly disclaims any warranty for the SOFTWARE COMPONENT PRODUCT(S). THE SOFTWARE COMPONENT PRODUCT(S) AND ANY RELATED DOCUMENTATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. DEVEXPRESS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF THE USE, OF THE SOFTWARE COMPONENT PRODUCT(S) IN TERMS OF CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE COMPONENT PRODUCT(S) REMAINS WITH YOU. No oral or written information or advice given by DEVEXPRESS or its employees shall create a warranty or in any way increase the scope of this warranty. - -14. LIMITATIONS ON LIABILITY. - -To the maximum extent permitted by applicable law, in no event shall DEVEXPRESS be liable for any special, incidental, indirect, or consequential damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use the SOFTWARE COMPONENT PRODUCT(S) or the provision of or failure to provide Support Services, even if DEVEXPRESS has been advised of the possibility of such damages. - -Developer End User understands that the SOFTWARE COMPONENT PRODUCT(S) may produce inaccurate results because of a failure or fault within the SOFTWARE COMPONENT PRODUCT(S) or failure by Developer End User to properly use and or deploy the SOFTWARE COMPONENT PRODUCT(S). Developer End User assumes full and sole responsibility for any use of the SOFTWARE COMPONENT PRODUCT(S), and bears the entire risk for failures or faults within the SOFTWARE COMPONENT PRODUCT(S). You agree that regardless of the cause of failure or fault or the form of any claim, YOUR SOLE REMEDY AND DEVEXPRESS'S SOLE OBLIGATION SHALL BE GOVERNED BY THIS AGREEMENT AND IN NO EVENT SHALL DEVEXPRESS'S LIABILITY EXCEED THE PRICE PAID TO DEVEXPRESS FOR THE SOFTWARE COMPONENT PRODUCT(S). This Limited Warranty is void if failure of the SOFTWARE COMPONENT PRODUCT(S) has resulted from accident, abuse, alteration, unauthorized use or misapplication of the SOFTWARE COMPONENT PRODUCT(S). - -15. INDEMNIFICATION. - -You hereby agree to indemnify DEVEXPRESS and its officers, directors, employees, agents, and representatives from each and every demand, claim, loss, liability, or damage of any kind, including actual attorneys fees, whether in tort or contract, that it or any of them may incur by reason of, or arising out of, any claim which is made by any third party with respect to any breach or violation of this Agreement by you or any claims based on the Applications and the SOFTWARE COMPONENT PRODUCT(S) included herein. - -16. FOR SOFTWARE COMPONENT PRODUCTS THAT EMULATE THE LOOK & FEEL AND CAPABILITIES OF THE MICROSOFT(R) OFFICE(R) 2007 UI. - -No rights are provided to Developer End User to the Microsoft(r) Office(r) 2007 UI under this DEVEXPRESS License Agreement. To learn more about licensing requirements for the Microsoft(r) Office(r) 2007 UI, you must contact Microsoft Corporation directly. Information related to Microsoft's licensing requirements for the Office(r) 2007 UI can be found at: http://msdn.microsoft.com/officeui. - -17. SUPPORT SERVICES. - -DEVEXPRESS may provide you with support services related to the SOFTWARE COMPONENT PRODUCT(S) ("Support Services"). Use of Support Services is governed by DEVEXPRESS policies and programs described in the user manual, in "on line" documentation and/or other DEVEXPRESS provided materials. Any supplemental SOFTWARE COMPONENT PRODUCT(S) provided to you as part of the Support Services shall be considered part of the SOFTWARE COMPONENT PRODUCT(S) and subject to the terms and conditions of this EULA. With respect to technical information you provide to DEVEXPRESS as part of the Support Services, DEVEXPRESS may use such information for its business purposes, including for SOFTWARE COMPONENT PRODUCT(s) support and development. DEVEXPRESS will not utilize such technical information in a form that personally identifies you. - -18. TERMINATION. - -Without prejudice to any other rights or remedies, DEVEXPRESS will terminate this EULA upon your failure to comply with all the terms and conditions of this EULA. In such events, you must destroy all copies of the SOFTWARE COMPONENT PRODUCT(S) and all of its component parts including any related documentation, and must remove ANY and ALL use of such technology immediately from any applications using technology contained in the SOFTWARE COMPONENT PRODUCT(S) developed by you, whether in native, altered or compiled state. - -19. TAX. - -DEVEXPRESS delivers its software electronically and does not collect sales or use tax for residents of US states in which it operates. You should confirm that your local, state, or federal government does not impose any sales or use tax on electronically delivered software. You are entirely liable for any such sales or use tax. - -20. MISCELLANEOUS. - -This EULA shall be construed, interpreted and governed by the laws of the State of Nevada, U.S.A. This EULA gives you specific legal rights; you may have others that vary from state to state and from country to country. - -This EULA may only be modified in writing signed by you and an authorized officer of DEVELOPER EXPRESS INC. If any provision of this EULA is found void or unenforceable, the remainder will remain valid and enforceable according to its terms. If any remedy provided is determined to have failed for its essential purpose, all limitations of liability and exclusions of damages set forth in the Limited Warranty shall remain in effect. - -DEVEXPRESS reserves all rights not specifically granted in this EULA. - -ACKNOWLEDGEMENTS. Developer End User acknowledges that he or she has read this Agreement, understands it, and agrees to be bound by its terms and conditions. - -Should you have any questions concerning this EULA, or if you desire to contact DEVEXPRESS for any reason, please contact us directly in the United States at +1 (818) 844 3383, or write: Developer Express Inc. Legal department / 801 N. Brand Blvd Suite 850, Glendale CA 91203. - diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC12.bpk b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC12.bpk deleted file mode 100644 index ca396027..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC12.bpk +++ /dev/null @@ -1,129 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxLayoutControlC12.bpl -OBJFILES = dxLayoutLookAndFeelListDesignForm.obj \ - dxLayoutControlReg.obj \ - dcldxLayoutControlC12.obj -MAINSOURCE = dcldxLayoutControlC12.cpp -RESFILES = dcldxLayoutControlC12.res dxLayoutControlReg.dcr -RESDEPEN = $(RESFILES) dxLayoutLookAndFeelListDesignForm.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi designide.bpi dxLayoutControlC12.bpi dclcxLibraryC12.bpi vcl.bpi dxComnC12.bpi vclx.bpi dxCoreC12.bpi dxGDIPlusC12.bpi dxThemeC12.bpi cxLibraryC12.bpi dbrtl.bpi vcldb.bpi vclimg.bpi cxDataC12.bpi cxEditorsC12.bpi cxExtEditorsC12.bpi cxPageControlC12.bpi dcldxCoreC12.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressLayout Control 2 by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpd -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC12.cpp b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC12.cpp deleted file mode 100644 index 46216f0c..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC12.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxLayoutControlC12.res"); -USERES("dxLayoutControlReg.dcr.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxLayoutControlC12.bpi"); -USEPACKAGE("dclcxLibraryC12.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxComnC12.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dxGDIPlusC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("vclimg.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("cxExtEditorsC12.bpi"); -USEPACKAGE("cxPageControlC12.bpi"); -USEPACKAGE("dcldxCoreC12.bpi"); -USEUNIT("dxLayoutLookAndFeelListDesignForm.pas"); -USEUNIT("dxLayoutControlReg.pas"); -USEFORMNS("dxLayoutLookAndFeelListDesignForm.pas", dxLayoutLookAndFeelListDesignForm, dxLayoutLookAndFeelListDesignForm); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC12.res b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC12.res deleted file mode 100644 index c421d556..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC12.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC14.bpk b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC14.bpk deleted file mode 100644 index 26242dbe..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC14.bpk +++ /dev/null @@ -1,129 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxLayoutControlC14.bpl -OBJFILES = dxLayoutLookAndFeelListDesignForm.obj \ - dxLayoutControlReg.obj \ - dcldxLayoutControlC14.obj -MAINSOURCE = dcldxLayoutControlC14.cpp -RESFILES = dcldxLayoutControlC14.res dxLayoutControlReg.dcr -RESDEPEN = $(RESFILES) dxLayoutLookAndFeelListDesignForm.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi designide.bpi dxLayoutControlC14.bpi dclcxLibraryC14.bpi vcl.bpi dxComnC14.bpi vclx.bpi dxCoreC14.bpi dxGDIPlusC14.bpi dxThemeC14.bpi cxLibraryC14.bpi dbrtl.bpi vcldb.bpi vclimg.bpi cxDataC14.bpi cxEditorsC14.bpi cxExtEditorsC14.bpi cxPageControlC14.bpi dcldxCoreC14.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressLayout Control 2 by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpd -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC14.cpp b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC14.cpp deleted file mode 100644 index 01cf9804..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC14.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxLayoutControlC14.res"); -USERES("dxLayoutControlReg.dcr.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxLayoutControlC14.bpi"); -USEPACKAGE("dclcxLibraryC14.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxComnC14.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dxGDIPlusC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("vclimg.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("cxExtEditorsC14.bpi"); -USEPACKAGE("cxPageControlC14.bpi"); -USEPACKAGE("dcldxCoreC14.bpi"); -USEUNIT("dxLayoutLookAndFeelListDesignForm.pas"); -USEUNIT("dxLayoutControlReg.pas"); -USEFORMNS("dxLayoutLookAndFeelListDesignForm.pas", dxLayoutLookAndFeelListDesignForm, dxLayoutLookAndFeelListDesignForm); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC14.res b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC14.res deleted file mode 100644 index 41b35a1e..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlC14.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD10.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD10.dpk deleted file mode 100644 index 526574e3..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD10.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dcldxLayoutControlD10; - -{$R *.res} -{$R dxLayoutControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxLayoutControlD10, - dclcxLibraryD10; - -contains - dxLayoutLookAndFeelListDesignForm, - dxLayoutControlReg; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD10.res b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD10.res deleted file mode 100644 index 4818c64d..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD10.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD11.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD11.dpk deleted file mode 100644 index c524db09..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD11.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dcldxLayoutControlD11; - -{$R *.res} -{$R dxLayoutControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxLayoutControlD11, - dclcxLibraryD11; - -contains - dxLayoutLookAndFeelListDesignForm, - dxLayoutControlReg; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD11.res b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD11.res deleted file mode 100644 index 0a5a7cb7..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD11.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD12.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD12.dpk deleted file mode 100644 index 6d5beba6..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD12.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dcldxLayoutControlD12; - -{$R *.res} -{$R dxLayoutControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxLayoutControlD12, - dclcxLibraryD12; - -contains - dxLayoutLookAndFeelListDesignForm, - dxLayoutControlReg; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD12.res b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD12.res deleted file mode 100644 index 2f0561e7..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD12.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD14.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD14.dpk deleted file mode 100644 index 0c55972b..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD14.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dcldxLayoutControlD14; - -{$R *.res} -{$R dxLayoutControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxLayoutControlD14, - dclcxLibraryD14; - -contains - dxLayoutLookAndFeelListDesignForm, - dxLayoutControlReg; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD14.res b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD14.res deleted file mode 100644 index 48fccaf7..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD14.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD7.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD7.dpk deleted file mode 100644 index bef15aec..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD7.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dcldxLayoutControlD7; - -{$R *.res} -{$R dxLayoutControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxLayoutControlD7, - dclcxLibraryVCLD7; - -contains - dxLayoutLookAndFeelListDesignForm, - dxLayoutControlReg; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD7.res b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD7.res deleted file mode 100644 index ab099e8f..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD7.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD9.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD9.dpk deleted file mode 100644 index 65f7a631..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD9.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dcldxLayoutControlD9; - -{$R *.res} -{$R dxLayoutControlReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxLayoutControlD9, - dclcxLibraryD9; - -contains - dxLayoutLookAndFeelListDesignForm, - dxLayoutControlReg; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD9.res b/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD9.res deleted file mode 100644 index c97b4194..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dcldxLayoutControlD9.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC12.bpk b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC12.bpk deleted file mode 100644 index 4853eb7f..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC12.bpk +++ /dev/null @@ -1,136 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxLayoutControlC12.bpl -OBJFILES = dxLayoutLookAndFeels.obj \ - dxLayoutControl.obj \ - dxLayoutControlAdapters.obj \ - dxLayoutCustomizeForm.obj \ - dxLayoutEditForm.obj \ - dxLayoutDragAndDrop.obj \ - dxLayoutSelection.obj \ - dxLayoutCommon.obj \ - dxLayoutcxEditAdapters.obj \ - dxLayoutControlC12.obj -MAINSOURCE = dxLayoutControlC12.cpp -RESFILES = dxLayoutControlC12.res -RESDEPEN = $(RESFILES) dxLayoutCustomizeForm.dfm dxLayoutEditForm.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi dxComnC12.bpi cxLibraryC12.bpi cxEditorsC12.bpi cxExtEditorsC12.bpi cxPageControlC12.bpi vcl.bpi vclx.bpi dxCoreC12.bpi dxGDIPlusC12.bpi dxThemeC12.bpi dbrtl.bpi vcldb.bpi vclimg.bpi cxDataC12.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressLayout Control 2 by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpr -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC12.cpp b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC12.cpp deleted file mode 100644 index ba96ff3d..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC12.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxLayoutControlC12.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxComnC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("cxExtEditorsC12.bpi"); -USEPACKAGE("cxPageControlC12.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dxGDIPlusC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("vclimg.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEUNIT("dxLayoutLookAndFeels.pas"); -USEUNIT("dxLayoutControl.pas"); -USEUNIT("dxLayoutControlAdapters.pas"); -USEUNIT("dxLayoutCustomizeForm.pas"); -USEUNIT("dxLayoutEditForm.pas"); -USEUNIT("dxLayoutDragAndDrop.pas"); -USEUNIT("dxLayoutSelection.pas"); -USEUNIT("dxLayoutCommon.pas"); -USEUNIT("dxLayoutcxEditAdapters.pas"); -USEFORMNS("dxLayoutCustomizeForm.pas", dxLayoutCustomizeForm, dxLayoutControlCustomizeForm); -USEFORMNS("dxLayoutEditForm.pas", dxLayoutEditForm, LayoutEditForm); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC12.res b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC12.res deleted file mode 100644 index c68e1140..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC12.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC14.bpk b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC14.bpk deleted file mode 100644 index 1e9496cf..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC14.bpk +++ /dev/null @@ -1,136 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxLayoutControlC14.bpl -OBJFILES = dxLayoutLookAndFeels.obj \ - dxLayoutControl.obj \ - dxLayoutControlAdapters.obj \ - dxLayoutCustomizeForm.obj \ - dxLayoutEditForm.obj \ - dxLayoutDragAndDrop.obj \ - dxLayoutSelection.obj \ - dxLayoutCommon.obj \ - dxLayoutcxEditAdapters.obj \ - dxLayoutControlC14.obj -MAINSOURCE = dxLayoutControlC14.cpp -RESFILES = dxLayoutControlC14.res -RESDEPEN = $(RESFILES) dxLayoutCustomizeForm.dfm dxLayoutEditForm.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = -PACKAGES = rtl.bpi dxComnC14.bpi cxLibraryC14.bpi cxEditorsC14.bpi cxExtEditorsC14.bpi cxPageControlC14.bpi vcl.bpi vclx.bpi dxCoreC14.bpi dxGDIPlusC14.bpi dxThemeC14.bpi dbrtl.bpi vcldb.bpi vclimg.bpi cxDataC14.bpi -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -O2 -w- -Vx -Ve -a8 -k- -vi -c -b- -tWM -PFLAGS = -DBCB -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = -LFLAGS = -D"ExpressLayout Control 2 by Developer Express Inc." -aa -Tpp -x -Gn -Gl -Gi -Gpr -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC14.cpp b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC14.cpp deleted file mode 100644 index ecd4c1ab..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC14.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxLayoutControlC14.res"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxComnC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("cxExtEditorsC14.bpi"); -USEPACKAGE("cxPageControlC14.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dxGDIPlusC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("vclimg.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEUNIT("dxLayoutLookAndFeels.pas"); -USEUNIT("dxLayoutControl.pas"); -USEUNIT("dxLayoutControlAdapters.pas"); -USEUNIT("dxLayoutCustomizeForm.pas"); -USEUNIT("dxLayoutEditForm.pas"); -USEUNIT("dxLayoutDragAndDrop.pas"); -USEUNIT("dxLayoutSelection.pas"); -USEUNIT("dxLayoutCommon.pas"); -USEUNIT("dxLayoutcxEditAdapters.pas"); -USEFORMNS("dxLayoutCustomizeForm.pas", dxLayoutCustomizeForm, dxLayoutControlCustomizeForm); -USEFORMNS("dxLayoutEditForm.pas", dxLayoutEditForm, LayoutEditForm); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC14.res b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC14.res deleted file mode 100644 index 8fa7df8c..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlC14.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD10.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD10.dpk deleted file mode 100644 index 8f2a8ce9..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD10.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxLayoutControlD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxComnD10, - cxLibraryD10, - cxEditorsD10, - cxExtEditorsD10, - cxPageControlD10; - -contains - dxLayoutLookAndFeels, - dxLayoutControl, - dxLayoutControlAdapters, - dxLayoutCustomizeForm, - dxLayoutEditForm, - dxLayoutDragAndDrop, - dxLayoutSelection, - dxLayoutCommon, - dxLayoutcxEditAdapters; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD10.res b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD10.res deleted file mode 100644 index 8cfa67a2..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD10.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD11.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD11.dpk deleted file mode 100644 index 93619c40..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD11.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxLayoutControlD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxComnD11, - cxLibraryD11, - cxEditorsD11, - cxExtEditorsD11, - cxPageControlD11; - -contains - dxLayoutLookAndFeels, - dxLayoutControl, - dxLayoutControlAdapters, - dxLayoutCustomizeForm, - dxLayoutEditForm, - dxLayoutDragAndDrop, - dxLayoutSelection, - dxLayoutCommon, - dxLayoutcxEditAdapters; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD11.res b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD11.res deleted file mode 100644 index c509ade9..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD11.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD12.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD12.dpk deleted file mode 100644 index 7d3aec25..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD12.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxLayoutControlD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxComnD12, - cxLibraryD12, - cxEditorsD12, - cxExtEditorsD12, - cxPageControlD12; - -contains - dxLayoutLookAndFeels, - dxLayoutControl, - dxLayoutControlAdapters, - dxLayoutCustomizeForm, - dxLayoutEditForm, - dxLayoutDragAndDrop, - dxLayoutSelection, - dxLayoutCommon, - dxLayoutcxEditAdapters; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD12.res b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD12.res deleted file mode 100644 index f3dcb19b..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD12.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD14.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD14.dpk deleted file mode 100644 index 089e17cb..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD14.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxLayoutControlD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxComnD14, - cxLibraryD14, - cxEditorsD14, - cxExtEditorsD14, - cxPageControlD14; - -contains - dxLayoutLookAndFeels, - dxLayoutControl, - dxLayoutControlAdapters, - dxLayoutCustomizeForm, - dxLayoutEditForm, - dxLayoutDragAndDrop, - dxLayoutSelection, - dxLayoutCommon, - dxLayoutcxEditAdapters; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD14.res b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD14.res deleted file mode 100644 index bcf56884..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD14.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD7.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD7.dpk deleted file mode 100644 index 616a82c7..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD7.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxLayoutControlD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxComnD7, - cxLibraryVCLD7, - cxEditorsVCLD7, - cxExtEditorsVCLD7, - cxPageControlVCLD7; - -contains - dxLayoutLookAndFeels, - dxLayoutControl, - dxLayoutControlAdapters, - dxLayoutCustomizeForm, - dxLayoutEditForm, - dxLayoutDragAndDrop, - dxLayoutSelection, - dxLayoutCommon, - dxLayoutcxEditAdapters; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD7.res b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD7.res deleted file mode 100644 index 841fac7a..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD7.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD9.dpk b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD9.dpk deleted file mode 100644 index 3c4cb99e..00000000 --- a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD9.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxLayoutControlD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressLayout Control 2 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxComnD9, - cxLibraryD9, - cxEditorsD9, - cxExtEditorsD9, - cxPageControlD9; - -contains - dxLayoutLookAndFeels, - dxLayoutControl, - dxLayoutControlAdapters, - dxLayoutCustomizeForm, - dxLayoutEditForm, - dxLayoutDragAndDrop, - dxLayoutSelection, - dxLayoutCommon, - dxLayoutcxEditAdapters; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD9.res b/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD9.res deleted file mode 100644 index 8c0c1b36..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Packages/dxLayoutControlD9.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Sources/cxVer.inc b/internal/x.46/ExpressLayout Control 2/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutCommon.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutCommon.pas deleted file mode 100644 index a93c399b..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutCommon.pas +++ /dev/null @@ -1,99 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl common routines } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutCommon; - -{$I cxVer.inc} - -interface - -uses - SysUtils, TypInfo, Windows, Classes, Graphics, Forms, cxClasses; - -type - TdxLayoutSide = (sdLeft, sdRight, sdTop, sdBottom); - - IdxLayoutComponent = interface - ['{F31C9078-5732-44D8-9347-3EA7B93837E3}'] - procedure SelectionChanged; stdcall; - end; - - { IdxLayoutControlDesignerHelper } - - IdxLayoutDesignTimeHelper = interface - ['{9A1C2CD3-7CD9-4A7D-8E51-9305994B2F2E}'] - function IsToolSelected: Boolean; - end; - -function GetHotTrackColor: TColor; -function GetPlainString(const S: string): string; -procedure SetComponentName(AComponent: TComponent; const ABaseName: string; - AIsDesigning, AIsLoading: Boolean); - -var - dxLayoutDesignTimeHelper: IdxLayoutDesignTimeHelper; - -implementation - -uses - dxCore, dxLayoutStrs; - -{ routines } - -function GetHotTrackColor: TColor; -begin - Result := GetSysColor(COLOR_HOTLIGHT); -end; - -function GetPlainString(const S: string): string; -const - SpecialChars = [#10, #13]; -var - I: Integer; -begin - Result := S; - for I := Length(Result) downto 1 do - if dxCharInSet(Result[I], SpecialChars) then - Delete(Result, I, 1); -end; - -procedure SetComponentName(AComponent: TComponent; const ABaseName: string; - AIsDesigning, AIsLoading: Boolean); -begin - AComponent.Name := GetValidName(AComponent, ABaseName, True); -end; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControl.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControl.pas deleted file mode 100644 index 9247af36..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControl.pas +++ /dev/null @@ -1,11709 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl main components } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutControl; - -{$I cxVer.inc} - -interface - -uses - Messages, Windows, SysUtils, Classes, Controls, Graphics, Forms, StdCtrls, ExtCtrls, IniFiles, Contnrs, - ImgList, dxCore, cxClasses, cxGeometry, cxGraphics, cxControls, cxLookAndFeels, cxLibraryConsts, - dxLayoutLookAndFeels, dxLayoutCommon, cxPC, dxLayoutSelection; - -const - htError = -1; - htNone = 0; - htCustomizeForm = 1; - htItem = 10; - htGroup = 20; - htClientArea = 30; - htAvailableItems = 40; - htTreeViewItems = 50; - - dxLayoutItemControlDefaultMinHeight = 20; - dxLayoutItemControlDefaultMinWidth = 20; - - dxLayoutItemMinSize = 5; - -// DXM_FREEITEM = WM_DX + 25; - DXM_PLACECONTROLS = WM_DX + 26; - DXM_BUILDSELECTIONLAYER = WM_DX + 27; - DXM_INVALIDATESELECTIONLAYER = WM_DX + 28; - -type - //Base - TdxCustomLayoutItem = class; - TdxCustomLayoutItemClass = class of TdxCustomLayoutItem; - TdxLayoutItem = class; - TdxLayoutGroup = class; - TdxLayoutGroupClass = class of TdxLayoutGroup; - TdxCustomLayoutControl = class; - - //Secondary - TdxLayoutAlignmentConstraint = class; - TdxCustomLayoutHitTest = class; - TdxLayoutGroupHelper = class; - TdxLayoutGroupHelperClass = class of TdxLayoutGroupHelper; - - //Painter - TdxCustomLayoutItemPainterClass = class of TdxCustomLayoutItemPainter; - TdxCustomLayoutItemPainter = class; - TdxLayoutItemPainterClass = class of TdxLayoutItemPainter; - TdxLayoutItemPainter = class; - TdxLayoutGroupPainterClass = class of TdxLayoutGroupPainter; - TdxLayoutGroupPainter = class; - TdxLayoutControlPainterClass = class of TdxLayoutControlPainter; - TdxLayoutControlPainter = class; - TdxLayoutItemControlPainterClass = class of TdxLayoutItemControlPainter; - TdxLayoutItemControlPainter = class; - TdxCustomLayoutItemCaptionPainterClass = class of TdxCustomLayoutItemCaptionPainter; - TdxCustomLayoutItemCaptionPainter = class; - - // ViewInfo - TdxCustomLayoutElementViewInfo = class; - TdxCustomLayoutItemElementViewInfo = class; - TdxCustomLayoutItemCaptionViewInfo = class; - TdxCustomLayoutItemViewInfoClass = class of TdxCustomLayoutItemViewInfo; - TdxCustomLayoutItemViewInfo = class; - TdxLayoutItemCaptionViewInfo = class; - TdxLayoutItemControlViewInfo = class; - TdxLayoutItemViewInfoClass = class of TdxLayoutItemViewInfo; - TdxLayoutItemViewInfo = class; - TdxLayoutGroupViewInfoClass = class of TdxLayoutGroupViewInfo; - TdxLayoutGroupViewInfo = class; - TdxLayoutControlViewInfoClass = class of TdxLayoutControlViewInfo; - TdxLayoutControlViewInfo = class; - - TdxLayoutGroupViewInfoSpecific = class; - TdxLayoutGroupViewInfoSpecificClass = class of TdxLayoutGroupViewInfoSpecific; - TdxLayoutGroupViewInfoTabbedSpecific = class; - - // custom item - - TdxLayoutAlignHorz = (ahLeft, ahCenter, ahRight, ahClient, ahParentManaged); - TdxLayoutAlignVert = (avTop, avCenter, avBottom, avClient, avParentManaged); - TdxLayoutAutoAlign = (aaHorizontal, aaVertical); - TdxLayoutAutoAligns = set of TdxLayoutAutoAlign; - TdxLayoutDirection = (ldHorizontal, ldVertical, ldTabbed); - TdxLayoutAreaPart = (apNone, apLeft, apTop, apRight, apBottom, apCenter, - apBefore, apAfter, apBeforeContent, apAfterContent, apFirstChild, apLastChild); - TdxLayoutActionType = (atNone, atInsert, atCreateGroup, atContentInsert); - - { CustomizeForm } - - TdxLayoutControlCustomCustomizeForm = class(TForm) - private - FControl: TdxCustomLayoutControl; - procedure SetControl(AValue: TdxCustomLayoutControl); - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - - procedure InitializeControl; virtual; - public - destructor Destroy; override; - - function GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; virtual; - procedure UpdateCaption; virtual; - procedure UpdateContent; virtual; - procedure UpdateSelection; virtual; - procedure UpdateView; virtual; - - property Control: TdxCustomLayoutControl read FControl write SetControl; - end; - TdxLayoutControlCustomCustomizeFormClass = class of TdxLayoutControlCustomCustomizeForm; - - TdxCustomLayoutItemOptions = class(TPersistent) - private - FItem: TdxCustomLayoutItem; - protected - procedure Changed; virtual; - property Item: TdxCustomLayoutItem read FItem; - public - constructor Create(AItem: TdxCustomLayoutItem); virtual; - end; - - { TdxLayoutItemImageOptions } - - TdxCustomLayoutItemImageOptions = class(TdxCustomLayoutItemOptions) - private - FGlyph: TBitmap; - FImageIndex: Integer; - procedure SetGlyph(AValue: TBitmap); - procedure SetImageIndex(AValue: Integer); - - procedure GlyphChanged(Sender: TObject); - protected - procedure BeginUpdate; - procedure EndUpdate; - - function GetCurrentImage(out AImage: TBitmap; out AImageList: TCustomImageList; out AImageIndex: Integer): Boolean; - function GetImageList(AEnabled: Boolean): TCustomImageList; - function GetImageSize: TSize; - function IsImageAssigned: Boolean; - public - constructor Create(AItem: TdxCustomLayoutItem); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - published - property Glyph: TBitmap read FGlyph write SetGlyph; - property ImageIndex: Integer read FImageIndex write SetImageIndex default -1; - end; - - TdxLayoutItemCaptionVisibleElement = (cveImage, cveText); - TdxLayoutItemCaptionVisibleElements = set of TdxLayoutItemCaptionVisibleElement; - - TdxCustomLayoutItemCaptionOptions = class(TdxCustomLayoutItemOptions) - private - FAlignHorz: TAlignment; - FImageOptions: TdxCustomLayoutItemImageOptions; - FShowAccelChar: Boolean; - FText: string; - FVisibleElements: TdxLayoutItemCaptionVisibleElements; - FVisible: Boolean; - function GetGlyph: TBitmap; - function GetImageIndex: Integer; - procedure SetAlignHorz(Value: TAlignment); - procedure SetGlyph(AValue: TBitmap); - procedure SetImageIndex(AValue: Integer); - procedure SetImageOptions(Value: TdxCustomLayoutItemImageOptions); - procedure SetShowAccelChar(Value: Boolean); - procedure SetText(const Value: string); - procedure SetVisibleElements(Value: TdxLayoutItemCaptionVisibleElements); - procedure SetVisible(Value: Boolean); - protected - property Glyph: TBitmap read GetGlyph write SetGlyph; - property ImageIndex: Integer read GetImageIndex write SetImageIndex default -1; - property ImageOptions: TdxCustomLayoutItemImageOptions read FImageOptions write SetImageOptions; - property VisibleElements: TdxLayoutItemCaptionVisibleElements read FVisibleElements write SetVisibleElements default [cveImage, cveText]; - public - constructor Create(AItem: TdxCustomLayoutItem); override; - destructor Destroy; override; - published - property AlignHorz: TAlignment read FAlignHorz write SetAlignHorz default taLeftJustify; - property ShowAccelChar: Boolean read FShowAccelChar write SetShowAccelChar default True; - property Text: string read FText write SetText; - property Visible: Boolean read FVisible write SetVisible default True; - end; - TdxCustomLayoutItemCaptionOptionsClass = class of TdxCustomLayoutItemCaptionOptions; - - TdxLayoutOffsets = class(TdxCustomLayoutItemOptions) - private - FBottom: Integer; - FLeft: Integer; - FRight: Integer; - FTop: Integer; - function GetValue(Index: Integer): Integer; - procedure SetValue(Index: Integer; Value: Integer); - published - property Bottom: Integer index 1 read GetValue write SetValue default 0; - property Left: Integer index 2 read GetValue write SetValue default 0; - property Right: Integer index 3 read GetValue write SetValue default 0; - property Top: Integer index 4 read GetValue write SetValue default 0; - end; - - TdxLayoutItemChangeType = (ictHard, ictMedium, ictLight); - - TdxCustomLayoutItemAssignedValue = (liavEnabled); - TdxCustomLayoutItemAssignedValues = set of TdxCustomLayoutItemAssignedValue; - - TdxCustomLayoutItem = class(TComponent, IdxLayoutLookAndFeelUser, IdxLayoutSelectableItem) - private - FAlignHorz: TdxLayoutAlignHorz; - FAlignmentConstraint: TdxLayoutAlignmentConstraint; - FAlignVert: TdxLayoutAlignVert; - FAllowRemove: Boolean; - FAssignedValues: TdxCustomLayoutItemAssignedValues; - FCachedTextHeight: Integer; - FCaptionOptions: TdxCustomLayoutItemCaptionOptions; - FContainer: TdxCustomLayoutControl; - FEnabled: Boolean; - FLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; - FOffsets: TdxLayoutOffsets; - FParent: TdxLayoutGroup; - FViewInfo: TdxCustomLayoutItemViewInfo; - FVisible: Boolean; - - FOnCaptionClick: TNotifyEvent; - - function GetRealAlignHorz: TdxLayoutAlignHorz; - function GetRealAlignVert: TdxLayoutAlignVert; - - function GetActuallyVisible: Boolean; - function GetAutoAligns: TdxLayoutAutoAligns; - function GetAlignHorz: TdxLayoutAlignHorz; - function GetAlignVert: TdxLayoutAlignVert; - function GetCaption: string; - function GetCaptionForCustomizeForm: string; - function GetEnabled: Boolean; - function GetHasMouse: Boolean; - function GetIndex: Integer; - function GetIsAvailable: Boolean; - function GetIsDesigning: Boolean; - function GetIsDestroying: Boolean; - function GetIsDragged: Boolean; - function GetIsLoading: Boolean; - function GetIsSelected: Boolean; - function GetIsRoot: Boolean; - function GetVisibleIndex: Integer; - procedure SetAlignHorz(Value: TdxLayoutAlignHorz); - procedure SetAlignmentConstraint(Value: TdxLayoutAlignmentConstraint); - procedure SetAlignVert(Value: TdxLayoutAlignVert); - procedure SetAutoAligns(Value: TdxLayoutAutoAligns); - procedure SetCaption(const Value: string); - procedure SetContainer(Value: TdxCustomLayoutControl); - procedure SetEnabled(Value: Boolean); - procedure SetLayoutLookAndFeel(Value: TdxCustomLayoutLookAndFeel); - procedure SetHasMouse(Value: Boolean); - procedure SetIndex(Value: Integer); - procedure SetParent(Value: TdxLayoutGroup); - procedure SetShowCaption(Value: Boolean); - procedure SetVisible(Value: Boolean); - procedure SetVisibleIndex(Value: Integer); - - function IsAlignHorzStored: Boolean; - function IsAlignVertStored: Boolean; - protected - procedure SetName(const Value: TComponentName); override; - procedure SetParentComponent(Value: TComponent); override; - - // LayoutLookAndFeel - procedure LayoutLookAndFeelChanged; virtual; - procedure LayoutLookAndFeelChanging; virtual; - // IdxLayoutLookAndFeelUser - procedure IdxLayoutLookAndFeelUser.BeginLookAndFeelDestroying = BeginLayoutLookAndFeelUserDestroying; - procedure IdxLayoutLookAndFeelUser.EndLookAndFeelDestroying = EndLayoutLookAndFeelUserDestroying; - procedure IdxLayoutLookAndFeelUser.LookAndFeelChanged = LayoutLookAndFeelUserChanged; - procedure IdxLayoutLookAndFeelUser.LookAndFeelDestroyed = LayoutLookAndFeelUserDestroyed; - procedure BeginLayoutLookAndFeelUserDestroying; stdcall; - procedure EndLayoutLookAndFeelUserDestroying; stdcall; - procedure LayoutLookAndFeelUserChanged; stdcall; - procedure LayoutLookAndFeelUserDestroyed; stdcall; - - function CanDragAndDrop: Boolean; virtual; - function CanFocusOnClick(X, Y: Integer): Boolean; virtual; - function CanProcessAccel(out AItem: TdxCustomLayoutItem): Boolean; virtual; abstract; - function CanRemove: Boolean; virtual; - - procedure CustomizationChanged; virtual; - procedure ContainerChanged; virtual; - procedure DoCaptionDown; dynamic; - procedure DoCaptionClick; dynamic; - procedure DoPack; virtual; - function DoProcessAccel: Boolean; dynamic; - procedure EnabledChanged; virtual; - function GetParentManagedAlignHorz: TdxLayoutAlignHorz; virtual; - function GetParentManagedAlignVert: TdxLayoutAlignVert; virtual; - function GetBaseName: string; virtual; - function GetCursor(X, Y: Integer): TCursor; virtual; - function GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; virtual; - function GetParentHelperClass: TdxLayoutGroupHelperClass; - function GetShowCaption: Boolean; virtual; // #DG !!! - function GetViewInfoClass: TdxCustomLayoutItemViewInfoClass; virtual; abstract; - function GetVisible: Boolean; - function HasControl: Boolean; virtual; - - procedure BeforeCalculateViewInfo; virtual; - procedure AfterCalculateViewInfo; virtual; - - function IsParentGroup(AParentGroup: TdxLayoutGroup): Boolean; - function IsChildItem(AChildItem: TdxCustomLayoutItem): Boolean; - - function CanInit: Boolean; virtual; - procedure DoInit; virtual; - procedure Init; - - function HasCaption: Boolean; virtual; // #DG !!! - procedure MouseEnter; dynamic; - procedure MouseLeave; dynamic; - procedure CustomizationMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); virtual; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); dynamic; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); dynamic; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); dynamic; - procedure ProcessAccel; dynamic; - function ProcessDialogChar(ACharCode: Word): Boolean; virtual; - procedure RestoreItemControlSize; virtual; abstract; - - function GetCaptionOptionsClass: TdxCustomLayoutItemCaptionOptionsClass; virtual; - - procedure ResetCachedTextHeight; - - //IdxLayoutSelectableItem - function CanDelete: Boolean; virtual; - function IsChild(AOwner: TComponent): Boolean; virtual; - procedure SelectComponent(AShift: TShiftState = []); virtual; - procedure SelectParent; virtual; - procedure SelectionChanged; virtual; - function IdxLayoutSelectableItem.IsVisible = IsSelectableItemVisible; - function IsSelectableItemVisible: Boolean; virtual; - function IdxLayoutSelectableItem.IsDragged = GetIsDragged; - - property CachedTextHeight: Integer read FCachedTextHeight write FCachedTextHeight; - property HasMouse: Boolean read GetHasMouse write SetHasMouse; - property IsAvailable: Boolean read GetIsAvailable; - property IsDesigning: Boolean read GetIsDesigning; - property IsDestroying: Boolean read GetIsDestroying; - property IsDragged: Boolean read GetIsDragged; - property IsLoading: Boolean read GetIsLoading; - property IsSelected: Boolean read GetIsSelected; - public - constructor Create(AOwner: TComponent); override; - procedure BeforeDestruction; override; - destructor Destroy; override; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - - procedure Changed(AType: TdxLayoutItemChangeType = ictHard); - function CanMoveTo(AParent: TdxCustomLayoutItem): Boolean; virtual; - procedure MakeVisible; - function Move(AParent: TdxLayoutGroup; AIndex: Integer; APack: Boolean = False): Boolean; - function MoveTo(AParent: TdxLayoutGroup; AVisibleIndex: Integer; APack: Boolean = False): Boolean; - procedure Pack; - function PutIntoHiddenGroup(ALayoutDirection: TdxLayoutDirection): TdxLayoutGroup; - - property ActuallyVisible: Boolean read GetActuallyVisible; - property CaptionForCustomizeForm: string read GetCaptionForCustomizeForm; - property Container: TdxCustomLayoutControl read FContainer write SetContainer; - property Index: Integer read GetIndex write SetIndex; - property IsRoot: Boolean read GetIsRoot; - property Parent: TdxLayoutGroup read FParent write SetParent; - property ViewInfo: TdxCustomLayoutItemViewInfo read FViewInfo; - property VisibleIndex: Integer read GetVisibleIndex write SetVisibleIndex; - published - property AutoAligns: TdxLayoutAutoAligns read GetAutoAligns write SetAutoAligns stored False; // obsolette - property AlignHorz: TdxLayoutAlignHorz read GetAlignHorz write SetAlignHorz stored IsAlignHorzStored; - property AlignVert: TdxLayoutAlignVert read GetAlignVert write SetAlignVert stored IsAlignVertStored; - property AlignmentConstraint: TdxLayoutAlignmentConstraint read FAlignmentConstraint - write SetAlignmentConstraint; - - property AllowRemove: Boolean read FAllowRemove write FAllowRemove default True; - property Caption: string read GetCaption write SetCaption stored False; // obsolette - property CaptionOptions: TdxCustomLayoutItemCaptionOptions read FCaptionOptions write FCaptionOptions; - property Enabled: Boolean read GetEnabled write SetEnabled default True; - property LookAndFeel: TdxCustomLayoutLookAndFeel read FLayoutLookAndFeel write SetLayoutLookAndFeel stored False; // osolette - property LayoutLookAndFeel: TdxCustomLayoutLookAndFeel read FLayoutLookAndFeel write SetLayoutLookAndFeel; - property Offsets: TdxLayoutOffsets read FOffsets write FOffsets; - property ShowCaption: Boolean read GetShowCaption write SetShowCaption stored False; // obsolette - property Visible: Boolean read FVisible write SetVisible default True; - - property OnCaptionClick: TNotifyEvent read FOnCaptionClick write FOnCaptionClick; - end; - - // item - - TdxCustomLayoutControlAdapter = class(TPersistent) - private - FItem: TdxLayoutItem; - function GetControl: TControl; - function GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; - protected - function AllowCheckSize: Boolean; virtual; - procedure HideControlBorder; virtual; - procedure Init; virtual; - procedure InternalLayoutLookAndFeelChanged; virtual; - function ShowBorder: Boolean; virtual; - function ShowItemCaption: Boolean; virtual; - function UseItemColor: Boolean; virtual; - - property Control: TControl read GetControl; - property Item: TdxLayoutItem read FItem; - property LayoutLookAndFeel: TdxCustomLayoutLookAndFeel read GetLayoutLookAndFeel; - public - constructor Create(AItem: TdxLayoutItem); virtual; - procedure LayoutLookAndFeelChanged; virtual; - class procedure Register(AControlClass: TControlClass); - class procedure Unregister(AControlClass: TControlClass); - end; - TdxCustomLayoutControlAdapterClass = class of TdxCustomLayoutControlAdapter; - - TdxCaptionLayout = (clLeft, clTop, clRight, clBottom); - TdxAlignmentVert = (tavTop, tavCenter, tavBottom); - - TdxLayoutItemCaptionOptions = class(TdxCustomLayoutItemCaptionOptions) - private - FAlignVert: TdxAlignmentVert; - FLayout: TdxCaptionLayout; - FWidth: Integer; - procedure SetAlignVert(Value: TdxAlignmentVert); - procedure SetLayout(Value: TdxCaptionLayout); - procedure SetWidth(Value: Integer); - published - constructor Create(AItem: TdxCustomLayoutItem); override; - - property AlignVert: TdxAlignmentVert read FAlignVert write SetAlignVert default tavCenter; - property Glyph; - property ImageIndex; - property Layout: TdxCaptionLayout read FLayout write SetLayout default clLeft; - property VisibleElements; - property Width: Integer read FWidth write SetWidth default 0; - end; - - TdxLayoutItemControlOptions = class(TdxCustomLayoutItemOptions) - private - FAutoAlignment: Boolean; - FAutoColor: Boolean; - FFixedSize: Boolean; - FMinHeight: Integer; - FMinWidth: Integer; - FOpaque: Boolean; - FShowBorder: Boolean; - procedure SetAutoAlignment(Value: Boolean); - procedure SetAutoColor(Value: Boolean); - procedure SetFixedSize(Value: Boolean); - procedure SetMinHeight(Value: Integer); - procedure SetMinWidth(Value: Integer); - procedure SetOpaque(Value: Boolean); - procedure SetShowBorder(Value: Boolean); - public - constructor Create(AItem: TdxCustomLayoutItem); override; - published - property AutoAlignment: Boolean read FAutoAlignment write SetAutoAlignment default True; - property AutoColor: Boolean read FAutoColor write SetAutoColor default False; - property FixedSize: Boolean read FFixedSize write SetFixedSize default False; - property MinHeight: Integer read FMinHeight write SetMinHeight default dxLayoutItemControlDefaultMinHeight; - property MinWidth: Integer read FMinWidth write SetMinWidth default dxLayoutItemControlDefaultMinWidth; - property Opaque: Boolean read FOpaque write SetOpaque default False; - property ShowBorder: Boolean read FShowBorder write SetShowBorder default True; - end; - TdxLayoutItemControlOptionsClass = class of TdxLayoutItemControlOptions; - - TdxLayoutItem = class(TdxCustomLayoutItem) - private - FControl: TControl; - FControlLocked: Boolean; - FControlAdapter: TdxCustomLayoutControlAdapter; - FControlOptions: TdxLayoutItemControlOptions; - FControlSizeBeforeDestruction: TPoint; - FOriginalControlSize: TPoint; - - FCustomizeControlHelper: TdxControlsDesignSelectorHelper; - FDefaultControlWndProc: TWndMethod; - - function GetCaptionOptions: TdxLayoutItemCaptionOptions; - function GetViewInfo: TdxLayoutItemViewInfo; - procedure SetCaptionOptions(Value: TdxLayoutItemCaptionOptions); - procedure SetControl(Value: TControl); - - function CanFocusControlOnCaptionClick: Boolean; - procedure CreateControlAdapter; - //procedure PostFree; - protected - function CanFocusOnClick(X, Y: Integer): Boolean; override; - function CanProcessAccel(out AItem: TdxCustomLayoutItem): Boolean; override; - procedure ContainerChanged; override; - procedure CustomizationChanged; override; - procedure DoCaptionDown; override; - function GetParentManagedAlignVert: TdxLayoutAlignVert; override; - function GetBaseName: string; override; - function GetViewInfoClass: TdxCustomLayoutItemViewInfoClass; override; - procedure DoInit; override; - procedure Loaded; override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure ProcessAccel; override; - procedure RestoreItemControlSize; override; - - procedure CustomizationMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - - procedure AfterCalculateViewInfo; override; - procedure LayoutLookAndFeelChanged; override; - - function GetCaptionOptionsClass: TdxCustomLayoutItemCaptionOptionsClass; override; - function GetControlOptionsClass: TdxLayoutItemControlOptionsClass; virtual; - - function CanFocusControl: Boolean; virtual; - function CanTabStopControl: Boolean; - procedure ControlWndProc(var Message: TMessage); virtual; - function HasControl: Boolean; override; - function HasWinControl: Boolean; - procedure SaveControlSizeBeforeDestruction; - procedure SaveOriginalControlSize; - procedure SetControlEnablement; - procedure SetControlFocus; - procedure SetControlVisibility; - procedure UpdateDesignSelectors; - - property ControlAdapter: TdxCustomLayoutControlAdapter read FControlAdapter; - property ControlSizeBeforeDestruction: TPoint read FControlSizeBeforeDestruction; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - property OriginalControlSize: TPoint read FOriginalControlSize write FOriginalControlSize; - property ViewInfo: TdxLayoutItemViewInfo read GetViewInfo; - published - property CaptionOptions: TdxLayoutItemCaptionOptions read GetCaptionOptions - write SetCaptionOptions; - property Control: TControl read FControl write SetControl; - property ControlOptions: TdxLayoutItemControlOptions read FControlOptions - write FControlOptions; - end; - TdxLayoutItemClass = class of TdxLayoutItem; - - // group - - TdxLayoutGroupHelper = class - public - class function GetChildItemsAlignHorz: TdxLayoutAlignHorz; virtual; - class function GetChildItemsAlignVert: TdxLayoutAlignVert; virtual; - class function GetOrthogonalDirection: TdxLayoutDirection; virtual; - class function GetSpecificClass: TdxLayoutGroupViewInfoSpecificClass; virtual; - end; - - TdxLayoutHorizontalGroupHelper = class(TdxLayoutGroupHelper) - public - class function GetChildItemsAlignHorz: TdxLayoutAlignHorz; override; - class function GetChildItemsAlignVert: TdxLayoutAlignVert; override; - class function GetOrthogonalDirection: TdxLayoutDirection; override; - class function GetSpecificClass: TdxLayoutGroupViewInfoSpecificClass; override; - end; - - TdxLayoutVerticalGroupHelper = class(TdxLayoutGroupHelper) - public - class function GetChildItemsAlignHorz: TdxLayoutAlignHorz; override; - class function GetChildItemsAlignVert: TdxLayoutAlignVert; override; - class function GetOrthogonalDirection: TdxLayoutDirection; override; - class function GetSpecificClass: TdxLayoutGroupViewInfoSpecificClass; override; - end; - - TdxLayoutTabbedGroupHelper = class(TdxLayoutHorizontalGroupHelper) - public - class function GetChildItemsAlignHorz: TdxLayoutAlignHorz; override; - class function GetChildItemsAlignVert: TdxLayoutAlignVert; override; - class function GetOrthogonalDirection: TdxLayoutDirection; override; - class function GetSpecificClass: TdxLayoutGroupViewInfoSpecificClass; override; - end; - - TdxLayoutGroup = class(TdxCustomLayoutItem) - private - FItemIndex: Integer; - FHidden: Boolean; - FIsUserDefined: Boolean; - FItems: TcxComponentList; - FVisibleItems: TcxComponentList; - FLayoutDirection: TdxLayoutDirection; - FLocked: Boolean; - FLayoutLookAndFeelException: Boolean; - FShowBorder: Boolean; - FUseIndent: Boolean; - - function GetCount: Integer; - function GetItem(Index: Integer): TdxCustomLayoutItem; - function GetShowBorder: Boolean; - function GetViewInfo: TdxLayoutGroupViewInfo; - function GetVisibleCount: Integer; - function GetVisibleItem(Index: Integer): TdxCustomLayoutItem; - procedure SetItemIndex(Value: Integer); - procedure SetHidden(Value: Boolean); - procedure SetLayoutDirection(Value: TdxLayoutDirection); - procedure SetLocked(Value: Boolean); - procedure SetLayoutLookAndFeelException(Value: Boolean); - procedure SetShowBorder(Value: Boolean); - procedure SetUseIndent(Value: Boolean); - - procedure AddItem(AItem: TdxCustomLayoutItem); - procedure ExtractItem(AItem: TdxCustomLayoutItem); - procedure ItemListChanged(Sender: TObject; AComponent: TComponent; AAction: TcxComponentCollectionNotification); - - function IsChildActuallyVisible(AChild: TdxCustomLayoutItem): Boolean; - function GetChildLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; - protected - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - procedure Loaded; override; - procedure SetChildOrder(Child: TComponent; Order: Integer); override; - procedure SetParentComponent(Value: TComponent); override; - - // TdxCustomLayoutItem - function CanDelete: Boolean; override; - function CanProcessAccel(out AItem: TdxCustomLayoutItem): Boolean; override; - function CanRemove: Boolean; override; - procedure ContainerChanged; override; - procedure CustomizationChanged; override; - procedure DoPack; override; - function GetBaseName: string; override; - function GetShowCaption: Boolean; override; - function GetViewInfoClass: TdxCustomLayoutItemViewInfoClass; override; - function ProcessDialogChar(ACharCode: Word): Boolean; override; - procedure RestoreItemControlSize; override; - - procedure LayoutLookAndFeelChanged; override; - procedure LayoutLookAndFeelChanging; override; - procedure BeforeCalculateViewInfo; override; - procedure AfterCalculateViewInfo; override; - - procedure BuildVisibleItemsList; - function GetHelperClass: TdxLayoutGroupHelperClass; - - function AllowDrawChild(AChild: TdxCustomLayoutItem): Boolean; virtual; - - procedure ChangeItemIndex(AItem: TdxCustomLayoutItem; Value: Integer); - procedure ChangeItemVisibleIndex(AItem: TdxCustomLayoutItem; Value: Integer); - function GetItemIndex(AItemVisibleIndex: Integer): Integer; - function IndexOf(AItem: TdxCustomLayoutItem): Integer; - function IsSuperfluous: Boolean; - function VisibleIndexOf(AItem: TdxCustomLayoutItem): Integer; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - function CreateGroup(AGroupClass: TdxLayoutGroupClass = nil): TdxLayoutGroup; - function CreateItem(AItemClass: TdxCustomLayoutItemClass = nil): TdxCustomLayoutItem; - function CreateItemForControl(AControl: TControl): TdxLayoutItem; - - function CanMoveTo(AParent: TdxCustomLayoutItem): Boolean; override; - procedure MoveChildrenToParent; - function PutChildrenIntoHiddenGroup: TdxLayoutGroup; - - property Count: Integer read GetCount; - property Items[Index: Integer]: TdxCustomLayoutItem read GetItem; default; - property IsUserDefined: Boolean read FIsUserDefined; - property ViewInfo: TdxLayoutGroupViewInfo read GetViewInfo; - property VisibleCount: Integer read GetVisibleCount; - property VisibleItems[Index: Integer]: TdxCustomLayoutItem read GetVisibleItem; - published - property ItemIndex: Integer read FItemIndex write SetItemIndex default 0; - property Hidden: Boolean read FHidden write SetHidden default False; - property LayoutDirection: TdxLayoutDirection read FLayoutDirection write SetLayoutDirection default ldVertical; - property Locked: Boolean read FLocked write SetLocked default False; - property LookAndFeelException: Boolean read FLayoutLookAndFeelException write SetLayoutLookAndFeelException stored False; // obsolette - property LayoutLookAndFeelException: Boolean read FLayoutLookAndFeelException write SetLayoutLookAndFeelException default False; - property ShowBorder: Boolean read GetShowBorder write SetShowBorder default True; - property UseIndent: Boolean read FUseIndent write SetUseIndent default True; - end; - - // alignment constraint - - TdxLayoutAlignmentConstraintKind = (ackLeft, ackTop, ackRight, ackBottom); - - TdxLayoutAlignmentConstraint = class(TComponent) - private - FControl: TdxCustomLayoutControl; - FItems: TList; - FKind: TdxLayoutAlignmentConstraintKind; - function GetCount: Integer; - function GetItem(Index: Integer): TdxCustomLayoutItem; - procedure SetKind(Value: TdxLayoutAlignmentConstraintKind); - procedure CreateItems; - procedure DestroyItems; - - procedure InternalAddItem(AItem: TdxCustomLayoutItem); - procedure InternalRemoveItem(AItem: TdxCustomLayoutItem); - protected - procedure SetParentComponent(Value: TComponent); override; - - procedure BeginUpdate; - function CanAddItem(AItem: TdxCustomLayoutItem): Boolean; virtual; - procedure Changed; virtual; - procedure EndUpdate; - - property Control: TdxCustomLayoutControl read FControl; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - - procedure AddItem(AItem: TdxCustomLayoutItem); - procedure RemoveItem(AItem: TdxCustomLayoutItem); - - property Count: Integer read GetCount; - property Items[Index: Integer]: TdxCustomLayoutItem read GetItem; - published - property Kind: TdxLayoutAlignmentConstraintKind read FKind write SetKind default ackLeft; - end; - TdxLayoutAlignmentConstraintClass = class of TdxLayoutAlignmentConstraint; - - { TdxLayoutControlPersistent } - - TdxLayoutControlPersistent = class(TPersistent) - private - FControl: TdxCustomLayoutControl; - protected - procedure Changed; virtual; - function GetOwner: TPersistent; override; - public - constructor Create(AControl: TdxCustomLayoutControl); virtual; - property Control: TdxCustomLayoutControl read FControl; - end; - - { controls } - - { TdxLayoutImageOptions } - - TdxLayoutImageOptions = class(TdxLayoutControlPersistent) - private - FDisabledImages: TCustomImageList; - FDisabledImagesChangeLink: TChangeLink; - FImages: TCustomImageList; - FImagesChangeLink: TChangeLink; - - FNotifyComponent: TcxFreeNotificator; - - procedure SetImages(AValue: TCustomImageList); - procedure SetDisabledImages(AValue: TCustomImageList); - - procedure DisabledImagesChange(Sender: TObject); - procedure ImagesChange(Sender: TObject); - - procedure SetImageList(var ANewValue, AOldValue: TCustomImageList; const AChangeLink: TChangeLink); - procedure FreeNotification(AComponent: TComponent); - protected - procedure Changed; override; - - procedure BeginUpdate; - procedure EndUpdate; - public - constructor Create(AControl: TdxCustomLayoutControl); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - published - property DisabledImages: TCustomImageList read FDisabledImages write SetDisabledImages; - property Images: TCustomImageList read FImages write SetImages; - end; - - { TdxUndoRedoManager } - - TdxUndoRedoManager = class(TdxLayoutControlPersistent) - private - FUndoList: TcxObjectList; - FIndex: Integer; - FCurrentLayout: TMemIniFile; - FLockCount: Integer; - procedure AddUndo(ALayout: TMemIniFile); - function GetRedoCount: Integer; - function GetUndoCount: Integer; - protected - procedure SaveLayout; - - function IsLocked: Boolean; - property RedoCount: Integer read GetRedoCount; - property UndoCount: Integer read GetUndoCount; - public - constructor Create(AControl: TdxCustomLayoutControl); override; - destructor Destroy; override; - - function CanRedo: Boolean; - function CanUndo: Boolean; - - procedure Redo; - procedure Undo; - - procedure Clear; - end; - - { TdxStoringOptions } - - TdxStoringOptions = class(TPersistent) - private - FIniFileName: string; - FRegistryPath: string; - FStoreToIniFile: Boolean; - FStoreToRegistry: Boolean; - protected - function CanStoreToIniFile: Boolean; - function CanStoreToRegistry: Boolean; - function CanRestoreFromIniFile: Boolean; - function CanRestoreFromRegistry: Boolean; - public - procedure Assign(Source: TPersistent); override; - published - property IniFileName: string read FIniFileName write FIniFileName; - property RegistryPath: string read FRegistryPath write FRegistryPath; - property StoreToIniFile: Boolean read FStoreToIniFile write FStoreToIniFile default False; - property StoreToRegistry: Boolean read FStoreToRegistry write FStoreToRegistry default False; - end; - - TdxLayoutAutoContentSize = (acsWidth, acsHeight); - TdxLayoutAvailableItemsViewKind = (oivkList, oivkTree); - TdxLayoutCustomizeFormUpdateType = (cfutCaption, cfutContent, cfutSelection, cfutView); - TdxLayoutCustomizeFormUpdateTypes = set of TdxLayoutCustomizeFormUpdateType; - TdxLayoutAutoContentSizes = set of TdxLayoutAutoContentSize; - - TdxCustomLayoutControl = class(TcxControl, IdxLayoutLookAndFeelUser, IdxLayoutComponent, - IdxSkinSupport, IdxLayoutDesignerHelper, IdxSelectionChanged, IdxCustomizeControlsHelper) - private - FAlignmentConstraints: TList; - FAutoControlAlignment: Boolean; - FAutoControlTabOrders: Boolean; - FBoldFont: TFont; - FFocusControlOnItemCaptionClick: Boolean; - FItemWithMouse: TdxCustomLayoutItem; - FLeftPos: Integer; - FLoadingCount:Integer; - FRightButtonPressed: Boolean; - FShowHiddenGroupsBounds: Boolean; - FTopPos: Integer; - FUpdateLockCount: Integer; - - // Objects - FOptionsImage: TdxLayoutImageOptions; - FOptionsStoring: TdxStoringOptions; - FRootGroup: TdxLayoutGroup; - FLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; - FPainter: TdxLayoutControlPainter; - FViewInfo: TdxLayoutControlViewInfo; - - // Items - FAbsoluteItems: TcxComponentList; - FAvailableItems: TcxComponentList; - - // Customization - FShowDesignSelectors: Boolean; - FHighlightRoot: Boolean; - FCustomization: Boolean; - FCustomizeAvailableItemsViewKind: TdxLayoutAvailableItemsViewKind; - FCustomizeForm: TdxLayoutControlCustomCustomizeForm; - FCustomizeFormBounds: TRect; - FCustomizeFormClass: TdxLayoutControlCustomCustomizeFormClass; - FCustomizeFormTabbedView: Boolean; - FCustomizeFormUpdateLockCount: Integer; - - // Internal Flags - FIsPlaceControlsNeeded: Boolean; - FIsPlacingControls: Boolean; - - // Storing - FStoredStream: TMemoryStream; - - // UndoRedo - FUndoRedoManager: TdxUndoRedoManager; - - FOnCustomization: TNotifyEvent; - - // Get/Set Properties - function GetAbsoluteItem(Index: Integer): TdxCustomLayoutItem; - function GetAbsoluteItemCount: Integer; - function GetAlignmentConstraint(Index: Integer): TdxLayoutAlignmentConstraint; - function GetAlignmentConstraintCount: Integer; - function GetAllowDrop: Boolean; - function GetAvailableItem(Index: Integer): TdxCustomLayoutItem; - function GetAvailableItemCount: Integer; - function GetAutoContentSizes: TdxLayoutAutoContentSizes; - function GetContentBounds: TRect; - function GetIsLayoutLoading: Boolean; - function GetLayoutDirection: TdxLayoutDirection; - function GetOccupiedClientWidth: Integer; - function GetOccupiedClientHeight: Integer; - procedure SetAutoContentSizes(Value: TdxLayoutAutoContentSizes); - procedure SetAutoControlAlignment(Value: Boolean); - procedure SetAutoControlTabOrders(Value: Boolean); - procedure SetCustomization(Value: Boolean); - procedure SetCustomizeAvailableItemsViewKind(Value: TdxLayoutAvailableItemsViewKind); - procedure SetCustomizeFormTabbedView(Value: Boolean); - procedure SetOptionsImage(Value: TdxLayoutImageOptions); - procedure SetShowDesignSelectors(Value: Boolean); - procedure SetHighlightRoot(Value: Boolean); - procedure SetIsPlaceControlsNeeded(Value: Boolean); - procedure SetRootGroup(Value: TdxLayoutGroup); - procedure SetItemWithMouse(Value: TdxCustomLayoutItem); - procedure SetLeftPos(Value: Integer); - procedure SetLayoutDirection(Value: TdxLayoutDirection); - procedure SetLayoutLookAndFeel(Value: TdxCustomLayoutLookAndFeel); - procedure SetShowHiddenGroupsBounds(Value: Boolean); - procedure SetTopPos(Value: Integer); - - // Storing - procedure SetOptionsStoring(Value: TdxStoringOptions); - function GetIniFileName: string; - function GetRegistryPath: string; - function GetStoreInIniFile: Boolean; - function GetStoreInRegistry: Boolean; - procedure SetIniFileName(const Value: string); - procedure SetRegistryPath(const Value: string); - procedure SetStoreInIniFile(const Value: Boolean); - procedure SetStoreInRegistry(const Value: Boolean); - - procedure CreateHandlers; - procedure DestroyHandlers; - - // Constraints - procedure CreateConstraints; - procedure DestroyConstraints; - procedure AddAlignmentConstraint(AConstraint: TdxLayoutAlignmentConstraint); - procedure RemoveAlignmentConstraint(AConstraint: TdxLayoutAlignmentConstraint); - - // Items - procedure AddAbsoluteItem(AItem: TdxCustomLayoutItem); - procedure ExtractAbsoluteItem(AItem: TdxCustomLayoutItem); - - procedure AddAvailableItem(AItem: TdxCustomLayoutItem); - procedure ExtractAvailableItem(AItem: TdxCustomLayoutItem); - procedure AvailableItemListChanged(Sender: TObject; AComponent: TComponent; AAction: TcxComponentCollectionNotification); - - // Other - procedure InitializeSubControlsCxLookAndFeel; - procedure PlaceControls(AItemViewInfo: TdxCustomLayoutItemViewInfo); - procedure RefreshBoldFont; - - procedure WMNCDestroy(var Message: TWMNCDestroy); message WM_NCDESTROY; - {$IFNDEF DELPHI7} - procedure WMPrintClient(var Message: TWMPrintClient); message WM_PRINTCLIENT; - {$ENDIF} - procedure CMControlChange(var Message: TCMControlChange); message CM_CONTROLCHANGE; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - //procedure CMFreeItem(var Message: TMessage); message CM_FREEITEM; - procedure DXMPlaceControls(var Message: TMessage); message DXM_PLACECONTROLS; - procedure DXMBuildSelectionLayer(var Message: TMessage); message DXM_BUILDSELECTIONLAYER; - procedure DXMInvalidateSelectionLayer(var Message: TMessage); message DXM_INVALIDATESELECTIONLAYER; - protected - FSelectionHelper: IdxLayoutDesignerHelper; - - procedure AlignControls(AControl: TControl; var Rect: TRect); override; - procedure CreateParams(var Params: TCreateParams); override; - {$IFNDEF DELPHI12} - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - {$ENDIF} - function GetCursor(X, Y: Integer): TCursor; override; - procedure Loaded; override; - procedure Paint; override; - procedure SetName(const Value: TComponentName); override; - {$IFDEF DELPHI7} - procedure SetParentBackground(Value: Boolean); override; - {$ENDIF} - procedure WriteState(Writer: TWriter); override; - procedure WndProc(var Message: TMessage); override; - - // Conditions - function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override; - function CanFocusOnClick(X, Y: Integer): Boolean; override; - function HasBackground: Boolean; override; - function IsInternalControl(AControl: TControl): Boolean; override; - function NeedRedrawOnResize: Boolean; override; - - // Notifications - procedure BoundsChanged; override; - procedure FontChanged; override; - - // Mouse - procedure DblClick; override; - function GetDesignHitTest(X, Y: Integer; Shift: TShiftState): Boolean; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseLeave(AControl: TControl); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - - // Scrollbars - procedure InitScrollBarsParameters; override; - function NeedsToBringInternalControlsToFront: Boolean; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - - // Drag and Drop - function AllowAutoDragAndDropAtDesignTime(X, Y: Integer; Shift: TShiftState): Boolean; override; - function AllowDragAndDropWithoutFocus: Boolean; override; - function CanDrag(X, Y: Integer): Boolean; override; - function CanDragAndDrop: Boolean; - function GetDragAndDropObjectClass: TcxDragAndDropObjectClass; override; - function StartDragAndDrop(const P: TPoint): Boolean; override; - - function GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; - function GetCxLookAndFeel: TcxLookAndFeel; - // IdxLayoutLookAndFeelUser - procedure IdxLayoutLookAndFeelUser.BeginLookAndFeelDestroying = BeginLayoutLookAndFeelUserDestroying; - procedure IdxLayoutLookAndFeelUser.EndLookAndFeelDestroying = EndLayoutLookAndFeelUserDestroying; - procedure IdxLayoutLookAndFeelUser.LookAndFeelChanged = LayoutLookAndFeelUserChanged; - procedure IdxLayoutLookAndFeelUser.LookAndFeelDestroyed = LayoutLookAndFeelUserDestroyed; - procedure BeginLayoutLookAndFeelUserDestroying; stdcall; - procedure EndLayoutLookAndFeelUserDestroying; stdcall; - procedure LayoutLookAndFeelUserChanged; stdcall; - procedure LayoutLookAndFeelUserDestroyed; stdcall; - - // IdxLayoutComponent - procedure SelectionChanged; stdcall; - - //IdxCustomizeControlsHelper - function CanProcessChildren: Boolean; virtual; - - function GetPainterClass: TdxLayoutControlPainterClass; virtual; - function GetViewInfoClass: TdxLayoutControlViewInfoClass; virtual; - - procedure AssignItemWithMouse(X, Y: Integer); - - function CalculateCustomizeFormBounds(const AFormBounds: TRect): TRect; - function CanMultiSelect: Boolean; virtual; - function CanShowSelection: Boolean; virtual; - procedure CheckLeftPos(var Value: Integer); - procedure CheckPositions; - procedure CheckTopPos(var Value: Integer); - procedure CustomizeFormBeginUpdate; - procedure CustomizeFormCancelUpdate; - procedure CustomizeFormEndUpdate; - procedure CustomizeFormUpdate(AUpdateTypes: TdxLayoutCustomizeFormUpdateTypes); - procedure DoCustomization; dynamic; - procedure DragAndDropBegan; dynamic; - function GetAlignmentConstraintClass: TdxLayoutAlignmentConstraintClass; dynamic; - function GetDefaultGroupClass: TdxLayoutGroupClass; virtual; - function GetDefaultItemClass: TdxLayoutItemClass; virtual; - function GetDesignSelectorRect: TRect; - function IsCustomization: Boolean; - function IsToolSelected: Boolean; - function IsUpdateLocked: Boolean; - procedure LayoutChanged(ANeedPack: Boolean = True); - procedure CreateRootGroup; - //procedure PostFree(AObject: TObject); - procedure ScrollContent(APrevPos, ACurPos: Integer; AHorzScrolling: Boolean); - - // selections - function GetSelectionHelperClass: TdxLayoutRunTimeSelectionHelperClass; - procedure InvalidateSelectionLayer(const R: TRect); virtual; - procedure PostBuildSelectionLayer; virtual; - procedure PostInvalidateSelectionLayer(const R: TRect); virtual; - - // storing - function GetRootSectionName(AIniFile: TCustomIniFile): string; - procedure InternalLoadFromCustomIniFile(AIniFile: TCustomIniFile; ADestroyNonLoadedItems: Boolean); virtual; - procedure InternalSaveToCustomIniFile(AIniFile: TCustomIniFile); virtual; - procedure LoadFromCustomIniFile(AIniFile: TCustomIniFile); virtual; - procedure SaveToCustomIniFile(AIniFile: TCustomIniFile); virtual; - - // IdxLayoutDesignerHelper - procedure AddSelectionChangedListener(AListener: TPersistent); - function IsActive: Boolean; - function CanDeleteComponent(AComponent: TComponent): Boolean; - procedure ClearSelection; - procedure DeleteSelection; - procedure GetSelection(AList: TList); - function IsComponentSelected(AComponent: TPersistent): Boolean; - procedure RemoveSelectionChangedListener(AListener: TPersistent); - procedure SelectComponent(AComponent: TPersistent; AShift: TShiftState = []); - procedure SetSelection(AList: TList); - function UniqueName(const BaseName: string): string; - - //IdxSelectionChanged - procedure IdxSelectionChanged.SelectionChanged = LayoutSelectionChanged; - procedure LayoutSelectionChanged(ASelection: TList; AAction: TdxSelectionAction); - - // Undo - procedure SaveToUndo; - - property AllowDrop: Boolean read GetAllowDrop; - property BoldFont: TFont read FBoldFont; - property IsPlaceControlsNeeded: Boolean read FIsPlaceControlsNeeded write SetIsPlaceControlsNeeded; - property IsLayoutLoading: Boolean read GetIsLayoutLoading; - property ItemWithMouse: TdxCustomLayoutItem read FItemWithMouse write SetItemWithMouse; - property cxLookAndFeel: TcxLookAndFeel read GetCxLookAndFeel; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - procedure BeginDragAndDrop; override; - {$IFDEF DELPHI12} - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - {$ENDIF} - - procedure Clear; - function CreateAlignmentConstraint: TdxLayoutAlignmentConstraint; - function FindItem(AControl: TControl): TdxLayoutItem; overload; - function FindItem(const AName: string): TdxCustomLayoutItem; overload; - function GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; overload; - function GetHitTest(X, Y: Integer): TdxCustomLayoutHitTest; overload; - - procedure BeginUpdate; - procedure CancelUpdate; - procedure EndUpdate(ANeedPack: Boolean = True); - - function CreateGroup(AGroupClass: TdxLayoutGroupClass = nil; AParent: TdxLayoutGroup = nil): TdxLayoutGroup; - function CreateItem(AItemClass: TdxCustomLayoutItemClass = nil; AParent: TdxLayoutGroup = nil): TdxCustomLayoutItem; - function CreateItemForControl(AControl: TControl; AParent: TdxLayoutGroup = nil): TdxLayoutItem; - - // Storing - function CanRestore: Boolean; - procedure Restore; - procedure Store; - - procedure LoadFromIniFile(const AFileName: string); - procedure LoadFromRegistry(const ARegistryPath: string); - procedure LoadFromStream(AStream: TStream); - procedure SaveToIniFile(const AFileName: string); - procedure SaveToRegistry(const ARegistryPath: string); - procedure SaveToStream(AStream: TStream); - - property AbsoluteItemCount: Integer read GetAbsoluteItemCount; - property AbsoluteItems[Index: Integer]: TdxCustomLayoutItem read GetAbsoluteItem; - property AlignmentConstraintCount: Integer read GetAlignmentConstraintCount; - property AlignmentConstraints[Index: Integer]: TdxLayoutAlignmentConstraint read GetAlignmentConstraint; - - property AutoContentSizes: TdxLayoutAutoContentSizes read GetAutoContentSizes write SetAutoContentSizes; - property LayoutDirection: TdxLayoutDirection read GetLayoutDirection write SetLayoutDirection; - - property AutoControlAlignment: Boolean read FAutoControlAlignment - write SetAutoControlAlignment default True; - property AutoControlTabOrders: Boolean read FAutoControlTabOrders - write SetAutoControlTabOrders default True; - property AvailableItemCount: Integer read GetAvailableItemCount; - property AvailableItems[Index: Integer]: TdxCustomLayoutItem read GetAvailableItem; - property FocusControlOnItemCaptionClick: Boolean read FFocusControlOnItemCaptionClick write FFocusControlOnItemCaptionClick default False; - property Items: TdxLayoutGroup read FRootGroup; - property IsPlacingControls: Boolean read FIsPlacingControls; - property LeftPos: Integer read FLeftPos write SetLeftPos; - - property LookAndFeel: TdxCustomLayoutLookAndFeel read FLayoutLookAndFeel write SetLayoutLookAndFeel; - property LayoutLookAndFeel: TdxCustomLayoutLookAndFeel read FLayoutLookAndFeel write SetLayoutLookAndFeel; - - property ShowHiddenGroupsBounds: Boolean read FShowHiddenGroupsBounds write SetShowHiddenGroupsBounds; - property TopPos: Integer read FTopPos write SetTopPos; - - // Customization properties - property Customization: Boolean read FCustomization write SetCustomization; - property CustomizeAvailableItemsViewKind: TdxLayoutAvailableItemsViewKind read FCustomizeAvailableItemsViewKind - write SetCustomizeAvailableItemsViewKind; - property CustomizeForm: TdxLayoutControlCustomCustomizeForm read FCustomizeForm; - property CustomizeFormBounds: TRect read FCustomizeFormBounds write FCustomizeFormBounds; - property CustomizeFormClass: TdxLayoutControlCustomCustomizeFormClass read FCustomizeFormClass write FCustomizeFormClass; - property CustomizeFormTabbedView: Boolean read FCustomizeFormTabbedView write SetCustomizeFormTabbedView; - property ShowDesignSelectors: Boolean read FShowDesignSelectors write SetShowDesignSelectors; - property HighlightRoot: Boolean read FHighlightRoot write SetHighlightRoot; - - property ContentBounds: TRect read GetContentBounds; - property OccupiedClientWidth: Integer read GetOccupiedClientWidth; - property OccupiedClientHeight: Integer read GetOccupiedClientHeight; - - // Options - property OptionsImage: TdxLayoutImageOptions read FOptionsImage write SetOptionsImage; - - // Storing properties - property OptionsStoring: TdxStoringOptions read FOptionsStoring write SetOptionsStoring; - property IniFileName: string read GetIniFileName write SetIniFileName; - property RegistryPath: string read GetRegistryPath write SetRegistryPath; - property StoreInIniFile: Boolean read GetStoreInIniFile write SetStoreInIniFile; - property StoreInRegistry: Boolean read GetStoreInRegistry write SetStoreInRegistry; - - // Undo - property UndoRedoManager: TdxUndoRedoManager read FUndoRedoManager; - - property Painter: TdxLayoutControlPainter read FPainter; - property ViewInfo: TdxLayoutControlViewInfo read FViewInfo; - - property OnCustomization: TNotifyEvent read FOnCustomization write FOnCustomization; - end; - - TdxLayoutControl = class(TdxCustomLayoutControl) - published - property Align; - property Anchors; - {$IFDEF DELPHI6} - property BevelEdges; - property BevelInner; - property BevelOuter; - property BevelKind; - property BevelWidth; - property BorderWidth; - {$ENDIF} - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property FocusOnClick; - property Font; - {$IFDEF DELPHI7} - property ParentBackground default False; - {$ENDIF} - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ShowHint; - property TabOrder; - property TabStop; - property Visible; - - property AutoContentSizes stored False; // obsolette - property AutoControlAlignment; - property AutoControlTabOrders; - property AutoSize; - property FocusControlOnItemCaptionClick; - - property LookAndFeel stored False; // obsolette - property LayoutLookAndFeel; - - // Customization properties - property CustomizeFormTabbedView default False; - property ShowDesignSelectors default True; - property HighlightRoot default True; - - // Options - property OptionsImage; - - // Storing properties - property OptionsStoring; - property IniFileName stored False; // obsolette - property RegistryPath stored False; // obsolette - property StoreInIniFile stored False; // obsolette - property StoreInRegistry stored False; // obsolette - - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnMouseWheel; - property OnMouseWheelDown; - property OnMouseWheelUp; - property OnResize; - property OnStartDock; - property OnStartDrag; - - property OnCustomization; - property OnMouseEnter; - property OnMouseLeave; - end; - - { hit tests } - - TdxCustomLayoutHitTestClass = class of TdxCustomLayoutHitTest; - - TdxCustomLayoutHitTest = class - private - FHitItem: TdxCustomLayoutItem; - FHitPoint: TPoint; - public - function Cursor: TCursor; dynamic; - class function HitTestCode: Integer; virtual; - class function Instance: TdxCustomLayoutHitTest; - function IsDeterminedAreaPart: Boolean; virtual; - function GetAreaPart: TdxLayoutAreaPart; virtual; - function GetGroupForInsert: TdxLayoutGroup; virtual; - - function GetDesinationItem: TdxCustomLayoutItem; virtual; - function GetSourceItem: TdxCustomLayoutItem; virtual; - - property HitItem: TdxCustomLayoutItem read FHitItem write FHitItem; - property HitPoint: TPoint read FHitPoint write FHitPoint; - end; - - TdxCustomLayoutItemHitTest = class(TdxCustomLayoutHitTest); - - TdxLayoutNoneHitTest = class(TdxCustomLayoutHitTest) - public - class function HitTestCode: Integer; override; - end; - - TdxCustomLayoutItemHitTestClass = class of TdxCustomLayoutItemHitTest; - - TdxLayoutItemHitTest = class(TdxCustomLayoutItemHitTest) - private - function GetHitItem: TdxLayoutItem; - procedure SethitItem(Value: TdxLayoutItem); - public - class function HitTestCode: Integer; override; - function GetGroupForInsert: TdxLayoutGroup; override; - - property HitItem: TdxLayoutItem read GetHitItem write SetHitItem; - end; - - TdxLayoutGroupHitTest = class(TdxCustomLayoutItemHitTest) - private - function GetHitItem: TdxLayoutGroup; - procedure SetHitItem(Value: TdxLayoutGroup); - public - class function HitTestCode: Integer; override; - function GetGroupForInsert: TdxLayoutGroup; override; - - property HitItem: TdxLayoutGroup read GetHitItem write SetHitItem; - end; - - TdxLayoutTabbedGroupHitTest = class(TdxLayoutGroupHitTest) - private - function GetSpecific: TdxLayoutGroupViewInfoTabbedSpecific; - property Specific: TdxLayoutGroupViewInfoTabbedSpecific read GetSpecific; - public - function GetDesinationItem: TdxCustomLayoutItem; override; - function GetSourceItem: TdxCustomLayoutItem; override; - end; - - TdxLayoutCustomizeFormHitTest = class(TdxCustomLayoutHitTest) - public - class function HitTestCode: Integer; override; - function IsDeterminedAreaPart: Boolean; override; - function GetAreaPart: TdxLayoutAreaPart; override; - function GetDesinationItem: TdxCustomLayoutItem; override; - end; - - TdxLayoutCustomizeFormAvailableItemsHitTest = class(TdxLayoutCustomizeFormHitTest) - public - class function HitTestCode: Integer; override; - end; - - TdxLayoutCustomizeFormTreeViewItemsHitTest = class(TdxLayoutCustomizeFormHitTest) - public - class function HitTestCode: Integer; override; - end; - - TdxLayoutClientAreaHitTest = class(TdxCustomLayoutHitTest) - private - FControl: TdxCustomLayoutControl; - public - class function HitTestCode: Integer; override; - function GetGroupForInsert: TdxLayoutGroup; override; - function GetDesinationItem: TdxCustomLayoutItem; override; - - property Control: TdxCustomLayoutControl read FControl write FControl; - end; - - { Painters } - - { TdxCustomLayoutElementPainter } - - TdxCustomLayoutElementPainter = class - private - FCanvas: TcxCanvas; - FViewInfo: TdxCustomLayoutElementViewInfo; - protected - property Canvas: TcxCanvas read FCanvas; - property ViewInfo: TdxCustomLayoutElementViewInfo read FViewInfo; - public - constructor Create(ACanvas: TcxCanvas; AViewInfo: TdxCustomLayoutElementViewInfo); virtual; - procedure Paint; virtual; abstract; - end; - - { TdxCustomLayoutItemElementPainter } - - TdxCustomLayoutItemElementPainter = class(TdxCustomLayoutElementPainter) - private - function GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; - function GetViewInfo: TdxCustomLayoutItemElementViewInfo; - protected - property LayoutLookAndFeel: TdxCustomLayoutLookAndFeel read GetLayoutLookAndFeel; - property ViewInfo: TdxCustomLayoutItemElementViewInfo read GetViewInfo; - end; - - TdxCustomLayoutItemCaptionPainter = class(TdxCustomLayoutItemElementPainter) - private - function GetViewInfo: TdxCustomLayoutItemCaptionViewInfo; - protected - procedure DoDrawText; virtual; - procedure DoDrawGlyph; virtual; - - procedure AfterDrawText; virtual; - procedure BeforeDrawText; virtual; - - procedure DoPaint; virtual; - - procedure DrawBackground; virtual; - procedure DrawGlyph; - procedure DrawText; - property ViewInfo: TdxCustomLayoutItemCaptionViewInfo read GetViewInfo; - public - procedure Paint; override; - end; - - TdxLayoutGroupCaptionPainter = class(TdxCustomLayoutItemCaptionPainter); - TdxLayoutItemCaptionPainter = class(TdxCustomLayoutItemCaptionPainter); - - TdxCustomLayoutItemPainter = class(TdxCustomLayoutElementPainter) - private - function GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; - function GetViewInfo: TdxCustomLayoutItemViewInfo; - protected - function GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; virtual; abstract; - - procedure DoDrawBackground; virtual; - procedure DoDrawCaption; virtual; - procedure DoDrawSpecificPart; virtual; - procedure DoDrawSelectionFrame; virtual; - - procedure DrawBackground; virtual; - procedure DrawCaption; virtual; - procedure DrawContent; virtual; - procedure DrawItem; - - function CanDrawBackground: Boolean; virtual; - function CanDrawCaption: Boolean; virtual; - - function CanPaint: Boolean; virtual; - function CanPaintSpecificPart: Boolean; virtual; - - property LayoutLookAndFeel: TdxCustomLayoutLookAndFeel read GetLayoutLookAndFeel; - property ViewInfo: TdxCustomLayoutItemViewInfo read GetViewInfo; - public - procedure Paint; override; - - // DragImagePaint - procedure PaintSpecificPart; virtual; - procedure PaintDesignFeatures; virtual; - end; - - { TdxLayoutItemControlPainter } - - TdxLayoutItemControlPainter = class(TdxCustomLayoutItemElementPainter) - private - function GetViewInfo: TdxLayoutItemControlViewInfo; - protected - procedure DrawBorders; virtual; - property ViewInfo: TdxLayoutItemControlViewInfo read GetViewInfo; - public - procedure Paint; override; - end; - - TdxLayoutItemPainter = class(TdxCustomLayoutItemPainter) - private - function GetViewInfo: TdxLayoutItemViewInfo; - protected - function CanDrawBackground: Boolean; override; - function CanDrawCaption: Boolean; override; - function CanPaintSpecificPart: Boolean; override; - - function GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; override; - function GetControlPainterClass: TdxLayoutItemControlPainterClass; virtual; - - procedure DoDrawControlBorder; virtual; - procedure DoDrawSpecificPart; override; - - procedure DrawContent; override; - procedure DrawControlBorder; virtual; - - property ViewInfo: TdxLayoutItemViewInfo read GetViewInfo; - end; - - { TdxLayoutGroupPainter } - - TdxLayoutGroupPainter = class(TdxCustomLayoutItemPainter) - private - function GetViewInfo: TdxLayoutGroupViewInfo; - protected - function GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; override; - - procedure DoDrawSpecificPart; override; - procedure DoDrawSelectionFrame; override; - procedure DoDrawBackground; override; - procedure DrawContent; override; - - procedure DoDrawBorders; virtual; - procedure DoDrawRestSpace; virtual; - procedure DoDrawBoundsFrame; virtual; - - procedure DrawBorders; virtual; - procedure DrawBoundsFrame; virtual; - procedure DrawItems; virtual; - procedure DrawRestSpace; virtual; - procedure DrawItemsArea; virtual; - - property ViewInfo: TdxLayoutGroupViewInfo read GetViewInfo; - public - procedure PaintSpecificPart; override; - procedure PaintDesignFeatures; override; - end; - - // Layout Control - - { TdxCustomLayoutControlHandler } - - TdxCustomLayoutControlHandler = class - private - FControl: TdxCustomLayoutControl; - function GetViewInfo: TdxLayoutControlViewInfo; - protected - property Control: TdxCustomLayoutControl read FControl; - property ViewInfo: TdxLayoutControlViewInfo read GetViewInfo; - public - constructor Create(AControl: TdxCustomLayoutControl); virtual; - end; - - TdxLayoutControlPainter = class(TdxCustomLayoutControlHandler) - protected - function GetInternalCanvas: TcxCanvas; virtual; - procedure MakeCanvasClipped(ACanvas: TcxCanvas); - - procedure DrawBackground(ACanvas: TcxCanvas); virtual; - procedure DrawDesignSelector(ACanvas: TcxCanvas); virtual; - procedure DrawItems(ACanvas: TcxCanvas); virtual; - procedure DrawDesignFeatures(ACanvas: TcxCanvas); - - procedure PlaceControls(AItemViewInfo: TdxCustomLayoutItemViewInfo); - - property InternalCanvas: TcxCanvas read GetInternalCanvas; - public - function GetCanvas: TcxCanvas; virtual; - - procedure Paint; virtual; - end; - - { ViewInfos } - - { TdxCustomLayoutElementViewInfo } - - TdxCustomLayoutElementViewInfo = class - private - FBounds: TRect; - FOriginalBounds: TRect; - protected - function GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; virtual; abstract; - property OriginalBounds: TRect read FOriginalBounds; - public - procedure Calculate(const ABounds: TRect); virtual; - - property Bounds: TRect read FBounds; - property LayoutLookAndFeel: TdxCustomLayoutLookAndFeel read GetLayoutLookAndFeel; - end; - - { TdxCustomLayoutItemElementViewInfo } - - TdxCustomLayoutItemElementViewInfo = class(TdxCustomLayoutElementViewInfo) - private - FItemViewInfo: TdxCustomLayoutItemViewInfo; - FHeight: Integer; - FPressed: Boolean; - FWidth: Integer; - function GetItem: TdxCustomLayoutItem; - function GetHeight: Integer; - function GetWidth: Integer; - procedure SetHeight(Value: Integer); - procedure SetWidth(Value: Integer); - protected - function GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; override; - - function GetEnabled: Boolean; virtual; - function GetCursor(X, Y: Integer): TCursor; virtual; - function GetVisible: Boolean; virtual; - procedure Invalidate(const ABounds: TRect); virtual; - procedure MouseEnter; dynamic; - procedure MouseLeave; dynamic; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); dynamic; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); dynamic; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); dynamic; - function WantsMouse(X, Y: Integer): Boolean; - - property Item: TdxCustomLayoutItem read GetItem; - property ItemViewInfo: TdxCustomLayoutItemViewInfo read FItemViewInfo; - property Pressed: Boolean read FPressed write FPressed; - property Visible: Boolean read GetVisible; - public - constructor Create(AItemViewInfo: TdxCustomLayoutItemViewInfo); virtual; - - function CalculateMinHeight: Integer; virtual; - function CalculateMinWidth: Integer; virtual; - function CalculateHeight: Integer; virtual; - function CalculateWidth: Integer; virtual; - - property Enabled: Boolean read GetEnabled; - property Height: Integer read GetHeight write SetHeight; - property Width: Integer read GetWidth write SetWidth; - end; - - TdxCustomLayoutItemCaptionViewInfo = class(TdxCustomLayoutItemElementViewInfo) - private - FHotTracked: Boolean; - function GetCanvas: TcxCanvas; - function GetIsCustomization: Boolean; - function GetIsImageVisible: Boolean; - function GetIsTextVisible: Boolean; - procedure SetHotTracked(Value: Boolean); - protected - function GetCursor(X, Y: Integer): TCursor; override; - function GetVisible: Boolean; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseLeave; override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - - function CalculateTextFlags: Integer; virtual; - function CanDoCaptionClick(X, Y: Integer): Boolean; virtual; - function GetAlignHorz: TAlignment; virtual; - function GetAlignVert: TdxAlignmentVert; virtual; abstract; - function GetColor: TColor; virtual; - function GetFont: TFont; virtual; - function GetHotTrackBounds: TRect; virtual; - function GetHotTrackStyles: TdxLayoutHotTrackStyles; virtual; - function GetIsDefaultColor: Boolean; virtual; - function GetIsHotTrackable: Boolean; virtual; - function GetIsTextUnderlined: Boolean; virtual; - function GetIsTransparent: Boolean; virtual; - function GetMultiLine: Boolean; virtual; abstract; - function GetOptions: TdxLayoutLookAndFeelCaptionOptions; virtual; - function GetSpaceBetweenImageText: Integer; virtual; - function GetText: string; virtual; - function GetTextAreaBounds: TRect; virtual; - function GetTextColor: TColor; virtual; - function GetTextHotColor: TColor; virtual; - function GetTextNormalColor: TColor; virtual; - function GetTextHeight: Integer; virtual; - function GetTextWidth: Integer; virtual; - function GetVisibleText: string; virtual; - function IsNeedSpaceBetweenImageText: Boolean; - function IsPointInHotTrackBounds(const P: TPoint): Boolean; virtual; - procedure PrepareCanvas; virtual; - - function GetImageAreaBounds: TRect; virtual; - function GetImageBounds: TRect; virtual; - function GetImageHeight: Integer; virtual; - function GetImageWidth: Integer; virtual; - - property AlignHorz: TAlignment read GetAlignHorz; - property AlignVert: TdxAlignmentVert read GetAlignVert; - property Canvas: TcxCanvas read GetCanvas; - property HotTrackBounds: TRect read GetHotTrackBounds; - property HotTrackStyles: TdxLayoutHotTrackStyles read GetHotTrackStyles; - property ImageAreaBounds: TRect read GetImageAreaBounds; - property ImageBounds: TRect read GetImageBounds; - property ImageHeight: Integer read GetImageHeight; - property ImageWidth: Integer read GetImageWidth; - property IsCustomization: Boolean read GetIsCustomization; - property IsDefaultColor: Boolean read GetIsDefaultColor; - property IsHotTrackable: Boolean read GetIsHotTrackable; - property IsImageVisible: Boolean read GetIsImageVisible; - property IsTextVisible: Boolean read GetIsTextVisible; - property IsTransparent: Boolean read GetIsTransparent; - property MultiLine: Boolean read GetMultiLine; - property Options: TdxLayoutLookAndFeelCaptionOptions read GetOptions; - property TextHeight: Integer read GetTextHeight; - property TextWidth: Integer read GetTextWidth; - public - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - - property Color: TColor read GetColor; - property Font: TFont read GetFont; - property HotTracked: Boolean read FHotTracked write SetHotTracked; - property IsTextUnderlined: Boolean read GetIsTextUnderlined; - property Text: string read GetText; - property TextAreaBounds: TRect read GetTextAreaBounds; - property TextColor: TColor read GetTextColor; - property VisibleText: string read GetVisibleText; - end; - TdxCustomLayoutItemCaptionViewInfoClass = class of TdxCustomLayoutItemCaptionViewInfo; - - TdxCustomLayoutItemViewInfo = class(TdxCustomLayoutElementViewInfo) - private - FOffsets: array[TdxLayoutSide] of Integer; - FCaptionViewInfo: TdxCustomLayoutItemCaptionViewInfo; - FContainerViewInfo: TdxLayoutControlViewInfo; - FParentViewInfo: TdxLayoutGroupViewInfo; - FElements: TObjectList; - FElementWithMouse: TdxCustomLayoutItemElementViewInfo; - FItem: TdxCustomLayoutItem; - FNotifyComponent: TcxFreeNotificator; - - function GetMinHeight: Integer; - function GetMinWidth: Integer; - function GetHeight: Integer; - function GetWidth: Integer; - - function GetAlignHorz: TdxLayoutAlignHorz; - function GetAlignVert: TdxLayoutAlignVert; - function GetBackgroundBounds: TRect; - function GetCanPaint: Boolean; - function GetIsAvailable: Boolean; - function GetIsCustomization: Boolean; - function GetIsDragged: Boolean; - function GetIsDraggedWithParent: Boolean; - function GetIsDragImagePainted: Boolean; - function GetOffset(ASide: TdxLayoutSide): Integer; - function GetOffsetsHeight: Integer; - function GetOffsetsWidth: Integer; - function GetSelected: Boolean; - function GetSelectionArea: TRect; - function GetSelectionBorderRect: TRect; - procedure SetElementWithMouse(Value: TdxCustomLayoutItemElementViewInfo); - procedure SetOffset(ASide: TdxLayoutSide; Value: Integer); - - function CreateHitTest(const P: TPoint): TdxCustomLayoutItemHitTest; - protected - procedure DoCreateViewInfos; virtual; - procedure CreateViewInfos; - procedure DestroyViewInfos; virtual; - procedure FreeNotification(AComponent: TComponent); virtual; - - function CanDrawBackground: Boolean; virtual; - function GetBackgroundColor: TColor; virtual; - - function GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; virtual; abstract; - function GetHitTestClass: TdxCustomLayoutItemHitTestClass; virtual; abstract; - function GetPainterClass: TdxCustomLayoutItemPainterClass; virtual; abstract; - - function CalculateMinHeight: Integer; - function CalculateMinWidth: Integer; - function CalculateHeight: Integer; - function CalculateWidth: Integer; - function DoCalculateHeight(AIsMinHeight: Boolean): Integer; virtual; - function DoCalculateWidth(AIsMinWidth: Boolean): Integer; virtual; - - function CalculateOffset(ASide: TdxLayoutSide): Integer; virtual; - function GetAreaPart(const P: TPoint): TdxLayoutAreaPart; virtual; - function GetActuallyVisible: Boolean; virtual; - function GetColor: TColor; virtual; abstract; - function GetCursor(X, Y: Integer): TCursor; virtual; - function GetElement(AIndex: Integer): TdxCustomLayoutItemElementViewInfo; - function GetElementCount: Integer; - function GetEnabled: Boolean; virtual; - function GetIsDefaultColor: Boolean; virtual; abstract; - function GetIsTransparent: Boolean; virtual; - function GetOptions: TdxCustomLayoutLookAndFeelOptions; virtual; abstract; - - function HasBackground: Boolean; - function HasCaption: Boolean; virtual; // #DG !!! - function HasBorder: Boolean; virtual; - - procedure MouseEnter; dynamic; - procedure MouseLeave; dynamic; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); dynamic; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); dynamic; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); dynamic; - - function GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; override; - - // selections - procedure PaintSelectionLayer; virtual; - - function IsParentLocked: Boolean; - function IsParentSelected: Boolean; - - property ActuallyVisible: Boolean read GetActuallyVisible; - property BackgroundBounds: TRect read GetBackgroundBounds; - property CanPaint: Boolean read GetCanPaint; // todo: rename - property ContainerViewInfo: TdxLayoutControlViewInfo read FContainerViewInfo; - property ElementCount: Integer read GetElementCount; - property Elements[Index: Integer]: TdxCustomLayoutItemElementViewInfo read GetElement; - property ElementWithMouse: TdxCustomLayoutItemElementViewInfo read FElementWithMouse write SetElementWithMouse; - property IsAvailable: Boolean read GetIsAvailable; - property IsCustomization: Boolean read GetIsCustomization; - property IsDefaultColor: Boolean read GetIsDefaultColor; - property IsDragged: Boolean read GetIsDragged; - property IsDraggedWithParent: Boolean read GetIsDraggedWithParent; - property IsDragImagePainted: Boolean read GetIsDragImagePainted; - property IsTransparent: Boolean read GetIsTransparent; - property Item: TdxCustomLayoutItem read FItem; - property OffsetsHeight: Integer read GetOffsetsHeight; - property OffsetsWidth: Integer read GetOffsetsWidth; - property Options: TdxCustomLayoutLookAndFeelOptions read GetOptions; - property ParentViewInfo: TdxLayoutGroupViewInfo read FParentViewInfo; - public - constructor Create(AContainerViewInfo: TdxLayoutControlViewInfo; - AParentViewInfo: TdxLayoutGroupViewInfo; AItem: TdxCustomLayoutItem); virtual; - destructor Destroy; override; - procedure Calculate(const ABounds: TRect); override; - - procedure CalculateTabOrders(var AAvailTabOrder: Integer); virtual; abstract; - function GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; virtual; - function GetItemWithMouse(const P: TPoint): TdxCustomLayoutItem; virtual; - procedure ResetOffset(ASide: TdxLayoutSide); - - property AlignHorz: TdxLayoutAlignHorz read GetAlignHorz; - property AlignVert: TdxLayoutAlignVert read GetAlignVert; - property CaptionViewInfo: TdxCustomLayoutItemCaptionViewInfo read FCaptionViewInfo; - property Color: TColor read GetColor; - property Enabled: Boolean read GetEnabled; - - property MinWidth: Integer read GetMinWidth; - property MinHeight: Integer read GetMinHeight; - property Width: Integer read GetWidth; - property Height: Integer read GetHeight; - - property Offsets[ASide: TdxLayoutSide]: Integer read GetOffset write SetOffset; - property Selected: Boolean read GetSelected; - property SelectionBorderRect: TRect read GetSelectionBorderRect; - property SelectionArea: TRect read GetSelectionArea; - end; - - { ItemViewInfos } - - { TdxLayoutItemCaptionViewInfo } - - TdxLayoutItemCaptionViewInfo = class(TdxCustomLayoutItemCaptionViewInfo) - private - function GetItem: TdxLayoutItem; - function GetItemViewInfo: TdxLayoutItemViewInfo; - protected - function GetAlignVert: TdxAlignmentVert; override; - function GetIsFixedWidth: Boolean; virtual; - function GetMultiLine: Boolean; override; - function GetSpaceBetweenImageText: Integer; override; - function GetTextAreaBounds: TRect; override; - function GetTextWidth: Integer; override; - - property IsFixedWidth: Boolean read GetIsFixedWidth; - property Item: TdxLayoutItem read GetItem; - property ItemViewInfo: TdxLayoutItemViewInfo read GetItemViewInfo; - public - function CalculateMinWidth: Integer; override; - end; - TdxLayoutItemControlViewInfoClass = class of TdxLayoutItemControlViewInfo; - - TdxLayoutItemControlViewInfo = class(TdxCustomLayoutItemElementViewInfo) - private - FControlBounds: TRect; - function GetBorderColor: TColor; - function GetBorderStyle: TdxLayoutBorderStyle; - function GetControl: TControl; - function GetItem: TdxLayoutItem; - function GetItemViewInfo: TdxLayoutItemViewInfo; - function GetOpaqueControl: Boolean; - protected - function GetVisible: Boolean; override; - - function CalculateControlBounds: TRect; virtual; - function GetBorderWidth(ASide: TdxLayoutSide): Integer; virtual; - function GetControlAreaHeight(AControlHeight: Integer): Integer; virtual; - function GetControlAreaWidth(AControlWidth: Integer): Integer; virtual; - - function HasBorder: Boolean; - - property BorderWidths[ASide: TdxLayoutSide]: Integer read GetBorderWidth; - property Item: TdxLayoutItem read GetItem; - property ItemViewInfo: TdxLayoutItemViewInfo read GetItemViewInfo; - public - procedure Calculate(const ABounds: TRect); override; - procedure CalculateTabOrder(var AAvailTabOrder: Integer); virtual; - - function CalculateMinHeight: Integer; override; - function CalculateMinWidth: Integer; override; - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - - property BorderColor: TColor read GetBorderColor; - property BorderStyle: TdxLayoutBorderStyle read GetBorderStyle; - property Control: TControl read GetControl; - property ControlBounds: TRect read FControlBounds; - property OpaqueControl: Boolean read GetOpaqueControl; - end; - - TdxLayoutItemViewInfo = class(TdxCustomLayoutItemViewInfo) - private - FControlViewInfo: TdxLayoutItemControlViewInfo; - function GetCaptionViewInfo: TdxLayoutItemCaptionViewInfo; - function GetItem: TdxLayoutItem; - function GetOptionsEx: TdxLayoutLookAndFeelItemOptions; - function GetDesignSelectorRect: TRect; - protected - procedure DoCreateViewInfos; override; - - function GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; override; - function GetControlViewInfoClass: TdxLayoutItemControlViewInfoClass; virtual; - function GetHitTestClass: TdxCustomLayoutItemHitTestClass; override; - function GetPainterClass: TdxCustomLayoutItemPainterClass; override; - - procedure CalculateViewInfosBounds(var ACaptionBounds, AControlBounds: TRect); virtual; - - function DoCalculateHeight(AIsMinHeight: Boolean): Integer; override; - function DoCalculateWidth(AIsMinWidth: Boolean): Integer; override; - - function GetAutoControlAlignment: Boolean; virtual; - function GetCaptionLayout: TdxCaptionLayout; virtual; - function GetColor: TColor; override; - function GetContentBounds: TRect; virtual; - function GetControlOffsetHorz: Integer; virtual; - function GetControlOffsetVert: Integer; virtual; - function GetIsDefaultColor: Boolean; override; - function GetOptions: TdxCustomLayoutLookAndFeelOptions; override; - function HasControl: Boolean; virtual; - - // selections - procedure PaintSelectionLayer; override; - function PtInDesignSelectorRect(const P: TPoint): Boolean; - - property ControlOffsetHorz: Integer read GetControlOffsetHorz; - property ControlOffsetVert: Integer read GetControlOffsetVert; - property Item: TdxLayoutItem read GetItem; - property Options: TdxLayoutLookAndFeelItemOptions read GetOptionsEx; - public - procedure Calculate(const ABounds: TRect); override; - procedure CalculateTabOrders(var AAvailTabOrder: Integer); override; - - property AutoControlAlignment: Boolean read GetAutoControlAlignment; - property CaptionLayout: TdxCaptionLayout read GetCaptionLayout; - property CaptionViewInfo: TdxLayoutItemCaptionViewInfo read GetCaptionViewInfo; - property ContentBounds: TRect read GetContentBounds; - property ControlViewInfo: TdxLayoutItemControlViewInfo read FControlViewInfo; - property DesignSelectorRect: TRect read GetDesignSelectorRect; - end; - - { GroupViewInfos } - - { TdxLayoutGroupCaptionViewInfo } - - TdxLayoutGroupCaptionViewInfo = class(TdxCustomLayoutItemCaptionViewInfo) - protected - function GetAlignVert: TdxAlignmentVert; override; - function GetMultiLine: Boolean; override; - public - function CalculateMinWidth: Integer; override; - end; - - TItemInfo = record - ViewInfo: TdxCustomLayoutItemViewInfo; - AlignHorz: TdxLayoutAlignHorz; - CalculatedWidth, MinWidth, Width, Height: Integer; - Bounds: TRect; - Calculated: Boolean; - end; - TItemInfos = array of TItemInfo; - - TdxLayoutGroupViewInfoSpecific = class - private - FGroupViewInfo: TdxLayoutGroupViewInfo; - FItemInfos: TItemInfos; - - procedure PrepareItemInfos; - procedure CalculateItemViewInfos; - - function GetContainer: TdxCustomLayoutControl; - function GetItemOffset: Integer; - function GetItemViewInfo(Index: Integer): TdxCustomLayoutItemViewInfo; - function GetItemViewInfoCount: Integer; - function GetLayoutDirection: TdxLayoutDirection; - protected - // Drawing - procedure DrawSpecificPart(ACanvas: TcxCanvas); virtual; // !!! - procedure DrawSpecificBackground(ACanvas: TcxCanvas); virtual; // !!! - - // Calculating - procedure CalculateItemsHorizontalBounds(const AItemsAreaBounds: TRect); virtual; - procedure CalculateItemsVerticalBounds(const AItemsAreaBounds: TRect); virtual; - procedure CalculateTabOrders(var ATabOrder: Integer); virtual; - - // Dragging - procedure CorrectAreaPart(var AAreaPart: TdxLayoutAreaPart); virtual; - function GetActionType(AAreaPart: TdxLayoutAreaPart): TdxLayoutActionType; virtual; abstract; - function GetAreaPart(const P: TPoint): TdxLayoutAreaPart; virtual; - function GetAreaPartBounds(AAreaPart: TdxLayoutAreaPart; AItemViewInfo: TdxCustomLayoutItemViewInfo): TRect; virtual; - - // Sizes - procedure ConvertCoords(var R: TRect); virtual; - function GetCustomHeight(AIsMinHeight: Boolean): Integer; virtual; - function GetCustomWidth(AIsMinWidth: Boolean): Integer; virtual; - function GetItemAlignHorz(AViewInfo: TdxCustomLayoutItemViewInfo): TdxLayoutAlignHorz; virtual; abstract; - function GetItemAlignVert(AViewInfo: TdxCustomLayoutItemViewInfo): TdxLayoutAlignVert; virtual; abstract; - - function GetItemHeight(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; virtual; abstract; - function GetItemWidth(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; virtual; abstract; - function GetItemMinHeight(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; virtual; abstract; - function GetItemMinWidth(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; virtual; abstract; - - function GetItemsAreaOffset(ASide: TdxLayoutSide): Integer; virtual; - - // Selection - procedure AddSelectionControls; virtual; - procedure RemoveSelectionControls; virtual; - - // Specific Objects - procedure CreateSpecificControls; virtual; - procedure DestroySpecificControls; virtual; - procedure CreateViewInfos; virtual; - procedure SetControlVisibility; virtual; - - property Container: TdxCustomLayoutControl read GetContainer; - property GroupViewInfo: TdxLayoutGroupViewInfo read FGroupViewInfo; - property ItemOffset: Integer read GetItemOffset; - property ItemViewInfoCount: Integer read GetItemViewInfoCount; - property ItemViewInfos[Index: Integer]: TdxCustomLayoutItemViewInfo read GetItemViewInfo; - property LayoutDirection: TdxLayoutDirection read GetLayoutDirection; - public - constructor Create(AGroupViewInfo: TdxLayoutGroupViewInfo); virtual; - destructor Destroy; override; - - procedure Calculate(const AItemsAreaBounds: TRect); virtual; - procedure CalculateItemsBounds(AItemsAreaBounds: TRect); - function CanDrawBackground: Boolean; virtual; - function GetItemsAreaHeight(AIsMinHeight: Boolean): Integer; virtual; - function GetItemsAreaWidth(AIsMinWidth: Boolean): Integer; virtual; - function IsAtInsertionPos(const R: TRect; const P: TPoint): Boolean; virtual; abstract; - - function AllowDrawChild(AChild: TdxCustomLayoutItem): Boolean; virtual; - function AllowChildHasBorder: Boolean; virtual; - end; - - TdxLayoutGroupViewInfoHorizontalSpecific = class(TdxLayoutGroupViewInfoSpecific) - protected - function GetActionType(AAreaPart: TdxLayoutAreaPart): TdxLayoutActionType; override; - function GetAreaPartBounds(AAreaPart: TdxLayoutAreaPart; AItemViewInfo: TdxCustomLayoutItemViewInfo): TRect; override; - function GetItemAlignHorz(AViewInfo: TdxCustomLayoutItemViewInfo): TdxLayoutAlignHorz; override; - function GetItemAlignVert(AViewInfo: TdxCustomLayoutItemViewInfo): TdxLayoutAlignVert; override; - function GetItemHeight(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; override; - function GetItemWidth(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; override; - function GetItemMinHeight(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; override; - function GetItemMinWidth(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; override; - public - function IsAtInsertionPos(const R: TRect; const P: TPoint): Boolean; override; - end; - - TdxLayoutGroupViewInfoVerticalSpecific = class(TdxLayoutGroupViewInfoSpecific) - protected - procedure ConvertCoords(var R: TRect); override; - function GetActionType(AAreaPart: TdxLayoutAreaPart): TdxLayoutActionType; override; - function GetAreaPartBounds(AAreaPart: TdxLayoutAreaPart; AItemViewInfo: TdxCustomLayoutItemViewInfo): TRect; override; - function GetItemAlignHorz(AViewInfo: TdxCustomLayoutItemViewInfo): TdxLayoutAlignHorz; override; - function GetItemAlignVert(AViewInfo: TdxCustomLayoutItemViewInfo): TdxLayoutAlignVert; override; - function GetItemHeight(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; override; - function GetItemWidth(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; override; - function GetItemMinHeight(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; override; - function GetItemMinWidth(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; override; - public - function GetItemsAreaHeight(AIsMinHeight: Boolean): Integer; override; - function GetItemsAreaWidth(AIsMinWidth: Boolean): Integer; override; - function IsAtInsertionPos(const R: TRect; const P: TPoint): Boolean; override; - end; - - TdxLayoutTabbedGroupTabControl = class(TcxTabControl) - private - FOnPaint: TNotifyEvent; - procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; - protected - procedure BoundsChanged; override; - function GetDesignHitTest(X, Y: Integer; Shift: TShiftState): Boolean; override; - procedure Paint; override; - - procedure DoPaint; - - property OnPaint: TNotifyEvent read FOnPaint write FOnPaint; - end; - - TdxTabControlElementViewInfo = class(TdxCustomLayoutItemElementViewInfo) - private - FTabControl: TdxLayoutTabbedGroupTabControl; - protected - function GetVisible: Boolean; override; - procedure MouseEnter; override; - procedure MouseLeave; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - end; - - TdxLayoutGroupViewInfoTabbedSpecific = class(TdxLayoutGroupViewInfoHorizontalSpecific) - private - FSpecificPainting: Boolean; - FTabControl: TdxLayoutTabbedGroupTabControl; - FTabControlElementViewInfo: TdxTabControlElementViewInfo; - - procedure ActiveTabChanged(ASender: TObject); - procedure TabControlPaint(ASender: TObject); - protected - // Drawing - procedure DrawSpecificPart(ACanvas: TcxCanvas); override; - procedure DrawSpecificBackground(ACanvas: TcxCanvas); override; - - // Calculating - procedure CalculateItemsHorizontalBounds(const AItemsAreaBounds: TRect); override; - procedure CalculateItemsVerticalBounds(const AItemsAreaBounds: TRect); override; - procedure CalculateTabOrders(var ATabOrder: Integer); override; - - // Dragging - function GetActionType(AAreaPart: TdxLayoutAreaPart): TdxLayoutActionType; override; - procedure CorrectAreaPart(var AAreaPart: TdxLayoutAreaPart); override; - function GetAreaPart(const P: TPoint): TdxLayoutAreaPart; override; - function GetAreaPartBounds(AAreaPart: TdxLayoutAreaPart; AItemViewInfo: TdxCustomLayoutItemViewInfo): TRect; override; - - // Sizes - function GetCustomHeight(AIsMinHeight: Boolean): Integer; override; - function GetCustomWidth(AIsMinWidth: Boolean): Integer; override; - - function GetItemsAreaOffset(ASide: TdxLayoutSide): Integer; override; - - // Specific Objects - procedure CreateSpecificControls; override; - procedure DestroySpecificControls; override; - procedure CreateViewInfos; override; - procedure SetControlVisibility; override; - - procedure CreateTabControl; - procedure DestroyTabControl; - function HasTabControl: Boolean; - public - procedure Calculate(const AItemsAreaBounds: TRect); override; - function AllowDrawChild(AChild: TdxCustomLayoutItem): Boolean; override; - function AllowChildHasBorder: Boolean; override; - function CanDrawBackground: Boolean; override; - end; - - TdxLayoutGroupViewInfo = class(TdxCustomLayoutItemViewInfo) - private - FOffsetsCalculated: Boolean; - FItemOffset: Integer; - FItemsAreaOffsetHorz: Integer; - FItemsAreaOffsetVert: Integer; - FItemViewInfos: TObjectList; - FSpecific: TdxLayoutGroupViewInfoSpecific; - - function GetBorderBounds(ASide: TdxLayoutSide): TRect; - function GetBorderRestSpaceBounds(ASide: TdxLayoutSide): TRect; - function GetBordersHeight: Integer; - function GetBordersWidth: Integer; - function GetCaptionViewInfo: TdxLayoutGroupCaptionViewInfo; - function GetGroup: TdxLayoutGroup; - function GetIsLocked: Boolean; - function GetItemViewInfo(Index: Integer): TdxCustomLayoutItemViewInfo; - function GetItemViewInfoCount: Integer; - function GetLayoutDirection: TdxLayoutDirection; - function GetOptionsEx: TdxLayoutLookAndFeelGroupOptions; - - function GetOffset(Index: Integer): Integer; - - procedure CreateItemViewInfos; - procedure CreateSpecific; - procedure DestroyItemViewInfos; - procedure DestroySpecific; - protected - FCaptionAreaBounds: TRect; - FClientAreaBounds: TRect; - FItemsAreaBounds: TRect; - - procedure DoCreateViewInfos; override; - procedure DestroyViewInfos; override; - procedure FreeNotification(AComponent: TComponent); override; - - // Classes - function GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; override; - function GetHitTestClass: TdxCustomLayoutItemHitTestClass; override; - function GetPainterClass: TdxCustomLayoutItemPainterClass; override; - - // Drawing attributes - function GetBackgroundColor: TColor; override; - function GetColor: TColor; override; - function GetIsDefaultColor: Boolean; override; - function GetOptions: TdxCustomLayoutLookAndFeelOptions; override; - - // Calculating - function DoCalculateHeight(AIsMinHeight: Boolean = False): Integer; override; - function DoCalculateWidth(AIsMinWidth: Boolean = False): Integer; override; - - // Dragging - procedure CorrectAreaPart(var AAreaPart: TdxLayoutAreaPart); - function GetActionType(AAreaPart: TdxLayoutAreaPart): TdxLayoutActionType; - function GetAreaPart(const P: TPoint): TdxLayoutAreaPart; override; - function GetAreaPartBounds(AAreaPart: TdxLayoutAreaPart; AItemViewInfo: TdxCustomLayoutItemViewInfo): TRect; - - // Conditions - function HasCaption: Boolean; override; - function HasBorder: Boolean; override; - - // TdxLayoutGroupViewInfo methods - // Calculating - procedure CalculateCaptionViewInfoBounds; virtual; - procedure CalculateClientBounds; virtual; - procedure CalculateItemsAreaBounds; virtual; - procedure CalculateOffsets; - - // Sizes - function GetClientAreaBounds(const ABounds: TRect): TRect; - function GetItemAreaBounds(const AClientRect: TRect): TRect; - function GetBorderWidth(ASide: TdxLayoutSide): Integer; virtual; - function GetHeight(AItemsAreaHeight: Integer): Integer; virtual; - function GetWidth(AItemsAreaWidth: Integer): Integer; virtual; - function GetMinVisibleHeight: Integer; virtual; - function GetMinVisibleWidth: Integer; virtual; - function GetRestSpaceBounds: TRect; virtual; - - // Conditions - function AllowChildHasBorder: Boolean; - function HasBoundsFrame: Boolean; virtual; - function UseItemOffset: Boolean; virtual; - function UseItemsAreaOffsets: Boolean; virtual; - - // Classes - function GetItemViewInfoClass(AItem: TdxCustomLayoutItem): TdxCustomLayoutItemViewInfoClass; virtual; - function GetSpecificClass: TdxLayoutGroupViewInfoSpecificClass; virtual; - - // Selections - procedure PaintSelectionLayer; override; - - property ItemOffset: Integer index 0 read GetOffset write FItemOffset; - property ItemsAreaOffsetHorz: Integer index 1 read GetOffset write FItemsAreaOffsetHorz; - property ItemsAreaOffsetVert: Integer index 2 read GetOffset write FItemsAreaOffsetVert; - property MinVisibleHeight: Integer read GetMinVisibleHeight; - property MinVisibleWidth: Integer read GetMinVisibleWidth; - property RestSpaceBounds: TRect read GetRestSpaceBounds; - - property Group: TdxLayoutGroup read GetGroup; - property LayoutDirection: TdxLayoutDirection read GetLayoutDirection; - property Options: TdxLayoutLookAndFeelGroupOptions read GetOptionsEx; - property Specific: TdxLayoutGroupViewInfoSpecific read FSpecific; - public - procedure Calculate(const ABounds: TRect); override; - procedure CalculateTabOrders(var AAvailTabOrder: Integer); override; - function GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; override; - function GetItemWithMouse(const P: TPoint): TdxCustomLayoutItem; override; - function GetInsertionPos(const P: TPoint): Integer; virtual; - - property BorderBounds[ASide: TdxLayoutSide]: TRect read GetBorderBounds; - property BorderRestSpaceBounds[ASide: TdxLayoutSide]: TRect read GetBorderRestSpaceBounds; - property BorderWidths[ASide: TdxLayoutSide]: Integer read GetBorderWidth; - property BordersHeight: Integer read GetBordersHeight; - property BordersWidth: Integer read GetBordersWidth; - property CaptionViewInfo: TdxLayoutGroupCaptionViewInfo read GetCaptionViewInfo; - property ClientBounds: TRect read FClientAreaBounds; - property IsLocked: Boolean read GetIsLocked; - property ItemsAreaBounds: TRect read FItemsAreaBounds; - property ItemViewInfoCount: Integer read GetItemViewInfoCount; - property ItemViewInfos[Index: Integer]: TdxCustomLayoutItemViewInfo read GetItemViewInfo; - end; - - // control - - TdxLayoutControlViewInfo = class(TdxCustomLayoutControlHandler) - private - FCanvas: TcxCanvas; - FContentBounds: TRect; - FItemsViewInfo: TdxLayoutGroupViewInfo; - FSelectionLayer: TdxSelectionLayer; - - FIsDragImagePainted: Boolean; - - procedure CreateSelectionLayer; - procedure BuildSelectionLayer; - function GetClientHeight: Integer; - function GetClientWidth: Integer; - function GetContentHeight: Integer; - function GetContentWidth: Integer; - function GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; - function GetSelectionLayer: TdxSelectionLayer; - protected - procedure CreateViewInfos; virtual; - procedure DestroyViewInfos; virtual; - function GetItemsViewInfoClass: TdxLayoutGroupViewInfoClass; virtual; - procedure RecreateViewInfos; - - procedure AlignItems; virtual; - procedure AutoAlignControls; virtual; - procedure CalculateItemsViewInfo; virtual; - procedure CalculateTabOrders; virtual; - function GetIsTransparent: Boolean; virtual; - function HasBackground: Boolean; - function NeedHighlightRoot: Boolean; - procedure PrepareData; virtual; - procedure ResetContentBounds; - - function GetCanvas: TcxCanvas; virtual; - function GetClientBounds: TRect; virtual; - function GetContentBounds: TRect; virtual; - - property Canvas: TcxCanvas read GetCanvas; - property IsDragImagePainted: Boolean read FIsDragImagePainted write FIsDragImagePainted; - property IsTransparent: Boolean read GetIsTransparent; - property SelectionLayer: TdxSelectionLayer read GetSelectionLayer; - public - constructor Create(AControl: TdxCustomLayoutControl); override; - destructor Destroy; override; - procedure Calculate; virtual; - procedure DoCalculateTabOrders; virtual; - function GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; overload; virtual; - function GetHitTest(X, Y: Integer): TdxCustomLayoutHitTest; overload; - function GetItemWithMouse(const P: TPoint): TdxCustomLayoutItem; - - property ClientBounds: TRect read GetClientBounds; - property ClientHeight: Integer read GetClientHeight; - property ClientWidth: Integer read GetClientWidth; - property ContentBounds: TRect read GetContentBounds; - property ContentHeight: Integer read GetContentHeight; - property ContentWidth: Integer read GetContentWidth; - property ItemsViewInfo: TdxLayoutGroupViewInfo read FItemsViewInfo; - property LayoutLookAndFeel: TdxCustomLayoutLookAndFeel read GetLayoutLookAndFeel; - end; - -var - dxLayoutDesignTimeSelectionHelperClass: TdxLayoutRunTimeSelectionHelperClass; - dxLayoutRunTimeSelectionHelperClass: TdxLayoutRunTimeSelectionHelperClass; - -implementation - -{$R *.res} - -uses - Types, TypInfo, Menus, Registry, Math, Variants, -{$IFDEF DELPHI7} - UxTheme, Themes, -{$ENDIF} - cxContainer, dxOffice11, dxLayoutControlAdapters, dxLayoutCustomizeForm, dxLayoutStrs, dxLayoutDragAndDrop; - -type - TControlAccess = class(TControl); - TdxCustomLayoutLookAndFeelAccess = class(TdxCustomLayoutLookAndFeel); - TcxPCCustomPainterAccess = class(TcxPCCustomPainter); - -const - ScrollStep = 10; - - dxLayoutSelectionDefaultColor: TColor = $EDC8A3; - dxLayoutControlSelectionDefaultColor: TColor = $582801; - dxLayoutSelectionBorderDefaultColor: TColor = $BD8753; - dxLayoutSelectionDefaultAlphaChannel: Byte = 80; - dxLayoutSelectionBorderMarkerInnerDefaultColor: TColor = clWhite; - dxLayoutHiddenGroupBackgroundDefaultColor: TColor = $F0E3D1; - dxLayoutHiddenGroupBorderDefaultColor: TColor = $C8BCB5; - dxLayoutSelectionOffset = 2; - dxLayoutGlyphSpace = 4; - dxLayoutSelectionMarkerWidth = 5; - dxLayoutThinPartWidth = 2; - -procedure dxDrawSelectionMarkers(ACanvas: TcxCanvas; const ABorderBounds: TRect; - ABorderColor, ABorderMarkerInnerColor: TColor; AMarkerWidth: Integer); - - procedure DrawSelectionBorderMarker(const P: TPoint); - var - R: TRect; - begin - R.TopLeft := P; - R.BottomRight := P; - InflateRect(R, (AMarkerWidth - 1) div 2, (AMarkerWidth - 1) div 2); - Inc(R.Bottom); - Inc(R.Right); - ACanvas.Brush.Color := ABorderMarkerInnerColor; - ACanvas.Pen.Color := ABorderColor; - ACanvas.Canvas.Rectangle(R); - ACanvas.ExcludeClipRect(R); - end; - -var - AMiddleX: Integer; - AMiddleY: Integer; -begin - with ABorderBounds do - begin - DrawSelectionBorderMarker(TopLeft); - DrawSelectionBorderMarker(Point(Right - 1, Bottom - 1)); - DrawSelectionBorderMarker(Point(Left, Bottom - 1)); - DrawSelectionBorderMarker(Point(Right - 1, Top)); - AMiddleX := (Left + Right - 1) div 2; - AMiddleY := (Top + Bottom - 1) div 2; - DrawSelectionBorderMarker(Point(AMiddleX, Top)); - DrawSelectionBorderMarker(Point(AMiddleX, Bottom - 1)); - DrawSelectionBorderMarker(Point(Left, AMiddleY)); - DrawSelectionBorderMarker(Point(Right - 1, AMiddleY)); - end; -end; - -type - { TdxCustomizationControlHelper } - - TdxCustomizationControlHelper = class(TdxControlsDesignSelectorHelper) - private - FLayoutItem: TdxLayoutItem; - - FIsValuesStored: Boolean; - FStoredSelStart: Integer; - FStoredSelEnd: Integer; - FStoredTabStop: Boolean; - - procedure SetLayoutItem(AValue: TdxLayoutItem); - protected - function DoControlWndProc(var Message: TMessage): Boolean; override; - function GetChildClass: TdxControlsDesignSelectorHelperClass; override; - - function IsActiveDesignSelector: Boolean; override; - function IsSelected: Boolean; override; - function IsValid: Boolean; override; - - function CanDrawDesignSelector: Boolean; override; - - function IsCustomization: Boolean; - function IsDesigning: Boolean; - - procedure CustomizationChanged; - procedure StoreValues; - procedure RestoreValues; - public - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - property LayoutItem: TdxLayoutItem read FLayoutItem write SetLayoutItem; - end; - - { TdxDesignCustomizationHelper } - - TdxDesignCustomizationHelper = class - private - FLayoutControls: TcxComponentList; - protected - function FindActiveDesigner(out ADesigner: IdxLayoutDesignerHelper): Boolean; - public - constructor Create; - destructor Destroy; override; - - class procedure AddLayout(ALayout: TdxCustomLayoutControl); - class procedure RemoveLayout(ALayout: TdxCustomLayoutControl); - end; - - { TdxLayoutControlAdapterDefs } - - PControlAdapterRecord = ^TControlAdapterRecord; - TControlAdapterRecord = record - ControlClass: TControlClass; - AdapterClass: TdxCustomLayoutControlAdapterClass; - end; - - TdxLayoutControlAdapterDefs = class - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TControlAdapterRecord; - procedure ClearItems; - protected - procedure Delete(AIndex: Integer); - property Count: Integer read GetCount; - property Items[Index: Integer]: TControlAdapterRecord read GetItem; - public - constructor Create; - destructor Destroy; override; - function GetAdapterClass(AControl: TControl): TdxCustomLayoutControlAdapterClass; - procedure Register(AControlClass: TControlClass; - AAdapterClass: TdxCustomLayoutControlAdapterClass); - procedure Unregister(AControlClass: TControlClass; - AAdapterClass: TdxCustomLayoutControlAdapterClass); - end; - -var - FdxLayoutControlAdapterDefs: TdxLayoutControlAdapterDefs; - FDesignCustomizationHelper: TdxDesignCustomizationHelper; - -function dxDesignCustomizationHelper: TdxDesignCustomizationHelper; -begin - if FDesignCustomizationHelper = nil then - FDesignCustomizationHelper := TdxDesignCustomizationHelper.Create; - Result := FDesignCustomizationHelper; -end; - -function dxLayoutControlAdapterDefs: TdxLayoutControlAdapterDefs; -begin - if FdxLayoutControlAdapterDefs = nil then - FdxLayoutControlAdapterDefs := TdxLayoutControlAdapterDefs.Create; - Result := FdxLayoutControlAdapterDefs; -end; - -function dxGetCenterAreaBounds(const AItemBounds: TRect): TRect; -begin - Result := AItemBounds; - with Result do - InflateRect(Result, -(Right - Left) div 4, -(Bottom - Top) div 4); -end; - -{ TdxCustomizationControlHelper } - -destructor TdxCustomizationControlHelper.Destroy; -begin - RestoreValues; - inherited Destroy; -end; - -procedure TdxCustomizationControlHelper.Assign(Source: TPersistent); -var - AItem: TdxCustomizationControlHelper; -begin - if Source is TdxCustomizationControlHelper then - begin - AItem := Source as TdxCustomizationControlHelper; - FLayoutItem := AItem.LayoutItem; - end; - inherited Assign(Source); -end; - -function TdxCustomizationControlHelper.DoControlWndProc(var Message: TMessage): Boolean; -begin - Result := True; - if IsValid and IsCustomization then - case Message.Msg of - WM_NCHITTEST: - begin - Message.Result := HTTRANSPARENT; - Result := False; - end; - CM_HITTEST: - begin - Message.Result := HTNOWHERE; - Result := False; - end; - end; - if IsValid then - case Message.Msg of - WM_PAINT, WM_ERASEBKGND, WM_NCPAINT, CM_INVALIDATE, CM_TEXTCHANGED: - if (Control = nil) or not (csPaintCopy in Control.ControlState) then - LayoutItem.Container.PostInvalidateSelectionLayer(LayoutItem.ViewInfo.ControlViewInfo.Bounds); - end; - Result := Result and inherited DoControlWndProc(Message);; -end; - -function TdxCustomizationControlHelper.GetChildClass: TdxControlsDesignSelectorHelperClass; -begin - Result := TdxCustomizationControlHelper; -end; - -procedure TdxCustomizationControlHelper.CustomizationChanged; -begin - if not IsValid then - Exit; - if IsCustomization then - StoreValues - else - RestoreValues; -end; - -procedure TdxCustomizationControlHelper.StoreValues; -var - I: Integer; -begin - if not IsValid or not IsWinControl or IsDesigning or FIsValuesStored then - Exit; - SendMessage(ControlWnd, EM_GETSEL, Integer(@FStoredSelStart), Integer(@FStoredSelEnd)); - SendMessage(ControlWnd, EM_SETSEL, FStoredSelEnd, FStoredSelEnd); - if Control <> nil then - begin - FStoredTabStop := ControlAsWinControl.TabStop; - ControlAsWinControl.TabStop := False; - end; - FIsValuesStored := True; - for I := 0 to Children.Count - 1 do - TdxCustomizationControlHelper(Children[I]).StoreValues; -end; - -procedure TdxCustomizationControlHelper.RestoreValues; -var - I: Integer; -begin - if not IsValid or not IsWinControl or IsDesigning or not FIsValuesStored then - Exit; - SendMessage(ControlWnd, EM_SETSEL, FStoredSelStart, FStoredSelEnd); - if Control <> nil then - ControlAsWinControl.TabStop := FStoredTabStop; - FIsValuesStored := False; - for I := 0 to Children.Count - 1 do - TdxCustomizationControlHelper(Children[I]).RestoreValues; -end; - -function TdxCustomizationControlHelper.IsActiveDesignSelector: Boolean; -begin - Result := inherited IsActiveDesignSelector and IsDesigning and LayoutItem.Container.ShowDesignSelectors; -end; - -function TdxCustomizationControlHelper.IsSelected: Boolean; -begin - Result := (not LayoutItem.Container.Customization and LayoutItem.ViewInfo.Selected) or - (LayoutItem.Container.Customization and LayoutItem.Container.IsComponentSelected(LayoutItem.Control)); -end; - -function TdxCustomizationControlHelper.IsCustomization: Boolean; -begin - Result := LayoutItem.Container.Customization; -end; - -function TdxCustomizationControlHelper.IsDesigning: Boolean; -begin - Result := LayoutItem.IsDesigning; -end; - -function TdxCustomizationControlHelper.IsValid: Boolean; -begin - Result := inherited IsValid and (LayoutItem <> nil) and (LayoutItem.ViewInfo <> nil); -end; - -function TdxCustomizationControlHelper.CanDrawDesignSelector: Boolean; -begin - Result := inherited CanDrawDesignSelector and LayoutItem.ActuallyVisible; -end; - -procedure TdxCustomizationControlHelper.SetLayoutItem(AValue: TdxLayoutItem); -begin - if AValue <> FLayoutItem then - begin - FLayoutItem := AValue; - CheckChildren; - end; -end; - -{ TdxDesignCustomizationHelper } - -var - FKeyboardHookHandle: HHOOK; - -function IsParentFocused(AParent: THandle): Boolean; -begin - Result := (AParent <> 0) and ((AParent = GetFocus) or IsChildClassWindow(AParent) and IsParentFocused(GetParent(AParent))); -end; - -function ProcessKeyboardMessage(AKey: WPARAM; AFlags: LPARAM): Boolean; - - function SelectItemParent(AComponent: TComponent): Boolean; - var - AIntf: IdxLayoutSelectableItem; - begin - Result := Supports(AComponent, IdxLayoutSelectableItem, AIntf); - if Result then - AIntf.SelectParent; - end; - - function KeyPressed: Boolean; - begin - Result := (AFlags shr 31) and 1 = 0; - end; - - function IsDragged(AList: TcxComponentList): Boolean; - var - I: Integer; - AIntf: IdxLayoutSelectableItem; - begin - Result := False; - for I := 0 to AList.Count - 1 do - begin - Result := Supports(AList[I], IdxLayoutSelectableItem, AIntf) and AIntf.IsDragged; - if Result then - Break; - end; - end; - - function CanProcessKeyDown(AList: TcxComponentList): Boolean; - begin - Result := not IsDragged(AList); - end; - -var - AList: TcxComponentList; - ADesigner: IdxLayoutDesignerHelper; -begin - Result := KeyPressed; - if Result then - begin - AList := TcxComponentList.Create; - try - if dxDesignCustomizationHelper.FindActiveDesigner(ADesigner) then - ADesigner.GetSelection(AList); - Result := (AList.Count > 0) and CanProcessKeyDown(AList); - if Result then - case AKey of - VK_DELETE: - begin - ADesigner.DeleteSelection; - Result := False; - end; - VK_ESCAPE: - Result := SelectItemParent(AList[0]); - else - Result := False; - end; - finally - AList.Free; - end; - end; -end; - -function KeyboardHookProc(Code: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; -begin - if (Code = HC_ACTION) and ProcessKeyboardMessage(wParam, lParam) then - Result := 1 - else - Result := CallNextHookEx(FKeyboardHookHandle, Code, wParam, lParam); -end; - -constructor TdxDesignCustomizationHelper.Create; -begin - inherited; - FLayoutControls := TcxComponentList.Create(False); - SetHook(FKeyboardHookHandle, WH_KEYBOARD, KeyboardHookProc); -end; - -destructor TdxDesignCustomizationHelper.Destroy; -begin - ReleaseHook(FKeyboardHookHandle); - FreeAndNil(FLayoutControls); - inherited; -end; - -class procedure TdxDesignCustomizationHelper.AddLayout(ALayout: TdxCustomLayoutControl); -begin - if dxDesignCustomizationHelper.FLayoutControls.IndexOf(ALayout) = -1 then - dxDesignCustomizationHelper.FLayoutControls.Add(ALayout); -end; - -class procedure TdxDesignCustomizationHelper.RemoveLayout(ALayout: TdxCustomLayoutControl); -begin - dxDesignCustomizationHelper.FLayoutControls.Extract(ALayout); -end; - -function TdxDesignCustomizationHelper.FindActiveDesigner(out ADesigner: IdxLayoutDesignerHelper): Boolean; -var - I: Integer; - ALayout: TdxCustomLayoutControl; -begin - Result := False; - for I := 0 to FLayoutControls.Count - 1 do - begin - ALayout := FLayoutControls[I] as TdxCustomLayoutControl; - Result := Supports(ALayout, IdxLayoutDesignerHelper, ADesigner) and ADesigner.IsActive and ALayout.HandleAllocated and - ((ALayout.Handle = GetFocus) or ((ALayout.Parent <> nil) and ALayout.Parent.HandleAllocated and IsParentFocused(ALayout.Parent.Handle))); - if Result then - Break; - end; -end; - -{ TdxLayoutControlAdapterDefs } - -constructor TdxLayoutControlAdapterDefs.Create; -begin - inherited; - FItems := TList.Create; -end; - -destructor TdxLayoutControlAdapterDefs.Destroy; -begin - ClearItems; - FItems.Free; - inherited; -end; - -function TdxLayoutControlAdapterDefs.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxLayoutControlAdapterDefs.GetItem(Index: Integer): TControlAdapterRecord; -begin - Result := PControlAdapterRecord(FItems[Index])^; -end; - -procedure TdxLayoutControlAdapterDefs.ClearItems; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Delete(I); -end; - -procedure TdxLayoutControlAdapterDefs.Delete(AIndex: Integer); -begin - Dispose(PControlAdapterRecord(FItems[AIndex])); - FItems.Delete(AIndex); -end; - -function TdxLayoutControlAdapterDefs.GetAdapterClass(AControl: TControl): TdxCustomLayoutControlAdapterClass; -var - I: Integer; - AControlAdapterRecord: TControlAdapterRecord; -begin - for I := Count - 1 downto 0 do - begin - AControlAdapterRecord := Items[I]; - if AControl.InheritsFrom(AControlAdapterRecord.ControlClass) then - begin - Result := AControlAdapterRecord.AdapterClass; - Exit; - end; - end; - Result := TdxCustomLayoutControlAdapter; -end; - -procedure TdxLayoutControlAdapterDefs.Register(AControlClass: TControlClass; - AAdapterClass: TdxCustomLayoutControlAdapterClass); -var - AControlAdapterRecord: PControlAdapterRecord; -begin - New(AControlAdapterRecord); - with AControlAdapterRecord^ do - begin - ControlClass := AControlClass; - AdapterClass := AAdapterClass; - end; - FItems.Add(AControlAdapterRecord); -end; - -procedure TdxLayoutControlAdapterDefs.Unregister(AControlClass: TControlClass; - AAdapterClass: TdxCustomLayoutControlAdapterClass); -var - I: Integer; - AControlAdapterRecord: TControlAdapterRecord; -begin - for I := 0 to Count - 1 do - begin - AControlAdapterRecord := Items[I]; - with AControlAdapterRecord do - if (ControlClass = AControlClass) and (AdapterClass = AAdapterClass) then - begin - Delete(I); - Break; - end; - end; - if Count = 0 then - FreeAndNil(FdxLayoutControlAdapterDefs); -end; - -{ TdxLayoutControlCustomCustomizeForm } - -destructor TdxLayoutControlCustomCustomizeForm.Destroy; -begin - Control.Customization := False; - inherited Destroy; -end; - -function TdxLayoutControlCustomCustomizeForm.GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; -begin - Result := TdxLayoutCustomizeFormHitTest.Instance; - TdxLayoutCustomizeFormHitTest(Result).HitItem := nil; -end; - -procedure TdxLayoutControlCustomCustomizeForm.UpdateCaption; -begin -end; - -procedure TdxLayoutControlCustomCustomizeForm.UpdateContent; -begin -end; - -procedure TdxLayoutControlCustomCustomizeForm.UpdateSelection; -begin -end; - -procedure TdxLayoutControlCustomCustomizeForm.UpdateView; -begin -end; - -procedure TdxLayoutControlCustomCustomizeForm.CreateParams(var Params: TCreateParams); -begin - inherited; - if Control <> nil then - Params.WndParent := Control.Handle; -end; - -procedure TdxLayoutControlCustomCustomizeForm.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited; - if (Operation = opRemove) and (AComponent = Control) then - Free; -end; - -procedure TdxLayoutControlCustomCustomizeForm.InitializeControl; -begin - UpdateCaption; -end; - -procedure TdxLayoutControlCustomCustomizeForm.SetControl(AValue: TdxCustomLayoutControl); - - procedure StoreMetrics; - begin - cxDialogsMetricsStore.StoreMetrics(Self); - end; - - procedure RestoreMetrics; - begin - if Control <> nil then - if EqualRect(Control.CustomizeFormBounds, cxNullRect) then - BoundsRect := Control.CalculateCustomizeFormBounds(BoundsRect) - else - BoundsRect := Control.CustomizeFormBounds; - cxDialogsMetricsStore.InitDialog(Self); - Position := poDesigned; - end; - -begin - if Control <> AValue then - begin - if Control <> nil then - begin - StoreMetrics; - Control.RemoveFreeNotification(Self); - end; - FControl := AValue; - if Control <> nil then - begin - Control.FreeNotification(Self); - RestoreMetrics; - end; - RecreateWnd; - end; - InitializeControl; -end; - -{ TdxCustomLayoutItemOptions } - -constructor TdxCustomLayoutItemOptions.Create(AItem: TdxCustomLayoutItem); -begin - inherited Create; - FItem := AItem; -end; - -procedure TdxCustomLayoutItemOptions.Changed; -begin - FItem.Changed; -end; - -{ TdxCustomLayoutItemImageOptions } - -constructor TdxCustomLayoutItemImageOptions.Create(AItem: TdxCustomLayoutItem); -begin - inherited Create(AItem); - FGlyph := TBitmap.Create; - FGlyph.OnChange := GlyphChanged; - FImageIndex := -1; -end; - -destructor TdxCustomLayoutItemImageOptions.Destroy; -begin - FreeAndNil(FGlyph); - inherited Destroy; -end; - -procedure TdxCustomLayoutItemImageOptions.Assign(Source: TPersistent); -begin - if Source is TdxCustomLayoutItemImageOptions then - with Source as TdxCustomLayoutItemImageOptions do - begin - Self.BeginUpdate; - try - Self.Glyph := Glyph; - Self.ImageIndex := ImageIndex; - finally - Self.EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TdxCustomLayoutItemImageOptions.BeginUpdate; -begin - Item.Container.BeginUpdate; -end; - -procedure TdxCustomLayoutItemImageOptions.EndUpdate; -begin - Item.Container.CancelUpdate; - Changed; -end; - -function TdxCustomLayoutItemImageOptions.GetCurrentImage(out AImage: TBitmap; out AImageList: TCustomImageList; out AImageIndex: Integer): Boolean; -var - AImages: TCustomImageList; -begin - AImage := nil; - AImageList := nil; - AImageIndex := -1; - Result := not Glyph.Empty; - if Result then - AImage := Glyph - else - begin - AImages := GetImageList(Item.Enabled); - Result := cxGraphics.IsImageAssigned(AImages, ImageIndex); - if Result then - begin - AImageList := AImages; - AImageIndex := ImageIndex; - end; - end; -end; - -function TdxCustomLayoutItemImageOptions.GetImageList(AEnabled: Boolean): TCustomImageList; -var - ADesabledImages: TCustomImageList; -begin - ADesabledImages := Item.Container.OptionsImage.DisabledImages; - if AEnabled or not Assigned(ADesabledImages) then - Result := Item.Container.OptionsImage.Images - else - Result := ADesabledImages; -end; - -function TdxCustomLayoutItemImageOptions.GetImageSize: TSize; -var - AGlyph: TBitmap; - AImageList: TCustomImageList; - AImageIndex: Integer; -begin - Result := cxNullSize; - if GetCurrentImage(AGlyph, AImageList, AImageIndex) then - if Assigned(AGlyph) then - Result := cxClasses.Size(AGlyph.Width, AGlyph.Height) - else - if Assigned(AImageList) then - Result := cxClasses.Size(AImageList.Width, AImageList.Height); -end; - -function TdxCustomLayoutItemImageOptions.IsImageAssigned: Boolean; -var - AImage: TBitmap; - AImageList: TCustomImageList; - AImageIndex: Integer; -begin - Result := GetCurrentImage(AImage, AImageList, AImageIndex); -end; - -procedure TdxCustomLayoutItemImageOptions.SetGlyph(AValue: TBitmap); -begin - FGlyph.Assign(AValue); -end; - -procedure TdxCustomLayoutItemImageOptions.SetImageIndex(AValue: Integer); -begin - if FImageIndex <> AValue then - begin - FImageIndex := AValue; - Changed; - end; -end; - -procedure TdxCustomLayoutItemImageOptions.GlyphChanged(Sender: TObject); -begin - Changed; -end; - -{ TdxCustomLayoutItemCaptionOptions } - -constructor TdxCustomLayoutItemCaptionOptions.Create(AItem: TdxCustomLayoutItem); -begin - inherited; - FImageOptions := TdxCustomLayoutItemImageOptions.Create(AItem); - FShowAccelChar := True; - FVisibleElements := [cveImage, cveText]; - FVisible := True; -end; - -destructor TdxCustomLayoutItemCaptionOptions.Destroy; -begin - FreeAndNil(FImageOptions); - inherited Destroy; -end; - -function TdxCustomLayoutItemCaptionOptions.GetGlyph: TBitmap; -begin - Result := ImageOptions.Glyph; -end; - -function TdxCustomLayoutItemCaptionOptions.GetImageIndex: Integer; -begin - Result := ImageOptions.ImageIndex; -end; - -procedure TdxCustomLayoutItemCaptionOptions.SetAlignHorz(Value: TAlignment); -begin - if FAlignHorz <> Value then - begin - FAlignHorz := Value; - Changed; - end; -end; - -procedure TdxCustomLayoutItemCaptionOptions.SetGlyph(AValue: TBitmap); -begin - ImageOptions.Glyph := AValue; -end; - -procedure TdxCustomLayoutItemCaptionOptions.SetImageIndex(AValue: Integer); -begin - ImageOptions.ImageIndex := AValue; -end; - -procedure TdxCustomLayoutItemCaptionOptions.SetImageOptions(Value: TdxCustomLayoutItemImageOptions); -begin - FImageOptions.Assign(Value); -end; - -procedure TdxCustomLayoutItemCaptionOptions.SetShowAccelChar(Value: Boolean); -begin - if FShowAccelChar <> Value then - begin - FShowAccelChar := Value; - Changed; - end; -end; - -procedure TdxCustomLayoutItemCaptionOptions.SetText(const Value: string); -begin - if FText <> Value then - begin - FText := Value; - Item.ResetCachedTextHeight; - Changed; - Item.Container.CustomizeFormUpdate([cfutContent, cfutSelection]); - end; -end; - -procedure TdxCustomLayoutItemCaptionOptions.SetVisibleElements(Value: TdxLayoutItemCaptionVisibleElements); -begin - if FVisibleElements <> Value then - begin - FVisibleElements := Value; - Changed; - end; -end; - -procedure TdxCustomLayoutItemCaptionOptions.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - FVisible := Value; - Changed; - end; -end; - -{ TdxLayoutOffsets } - -function TdxLayoutOffsets.GetValue(Index: Integer): Integer; -begin - case Index of - 1: Result := FBottom; - 2: Result := FLeft; - 3: Result := FRight; - 4: Result := FTop; - else - Result := 0; - end; -end; - -procedure TdxLayoutOffsets.SetValue(Index: Integer; Value: Integer); -begin - if Value < 0 then Value := 0; - if GetValue(Index) <> Value then - begin - case Index of - 1: FBottom := Value; - 2: FLeft := Value; - 3: FRight := Value; - 4: FTop := Value; - end; - Changed; - end; -end; - -{ TdxCustomLayoutItem } - -constructor TdxCustomLayoutItem.Create(AOwner: TComponent); -begin - inherited; - FAllowRemove := True; - FAlignHorz := ahParentManaged; - FAlignVert := avParentManaged; - FCaptionOptions := GetCaptionOptionsClass.Create(Self); - FEnabled := True; - FOffsets := TdxLayoutOffsets.Create(Self); - FVisible := True; -end; - -procedure TdxCustomLayoutItem.BeforeDestruction; -begin - Container.BeginUpdate; - inherited; - Container.FinishDragAndDrop(False); - AlignmentConstraint := nil; -end; - -destructor TdxCustomLayoutItem.Destroy; -var - AContainer: TdxCustomLayoutControl; -begin - HasMouse := False; - LayoutLookAndFeel := nil; - FreeAndNil(FOffsets); - FreeAndNil(FCaptionOptions); - AContainer := Container; - cxClearObjectLinks(Self); - inherited; - AContainer.EndUpdate; -end; - -function TdxCustomLayoutItem.GetRealAlignHorz: TdxLayoutAlignHorz; -begin - if AlignHorz = ahParentManaged then - Result := GetParentManagedAlignHorz - else - Result := AlignHorz; -end; - -function TdxCustomLayoutItem.GetRealAlignVert: TdxLayoutAlignVert; -begin - if AlignVert = avParentManaged then - Result := GetParentManagedAlignVert - else - Result := AlignVert; -end; - -function TdxCustomLayoutItem.GetActuallyVisible: Boolean; -begin - Result := GetVisible and (IsRoot or (FParent <> nil) and FParent.IsChildActuallyVisible(Self)); -end; - -function TdxCustomLayoutItem.GetAlignHorz: TdxLayoutAlignHorz; -begin - Result := FAlignHorz; -end; - -function TdxCustomLayoutItem.GetAlignVert: TdxLayoutAlignVert; -begin - Result := FAlignVert; -end; - -function TdxCustomLayoutItem.GetCaption: string; -begin - Result := CaptionOptions.Text; -end; - -function TdxCustomLayoutItem.GetAutoAligns: TdxLayoutAutoAligns; -begin - Result := []; - if AlignHorz = ahParentManaged then - Include(Result, aaHorizontal); - if AlignVert = avParentManaged then - Include(Result, aaVertical); -end; - -function TdxCustomLayoutItem.GetCaptionForCustomizeForm: string; -begin - if (csDesigning in ComponentState) or (Caption = '') then - Result := Name - else - Result := StripHotKey(Caption); -end; - -function TdxCustomLayoutItem.GetEnabled: Boolean; -begin - if not (liavEnabled in FAssignedValues) and (Parent <> nil) then - Result := Parent.Enabled - else - Result := FEnabled; -end; - -function TdxCustomLayoutItem.GetHasMouse: Boolean; -begin - Result := FContainer.ItemWithMouse = Self; -end; - -function TdxCustomLayoutItem.GetIndex: Integer; -begin - if FParent = nil then - Result := -1 - else - Result := FParent.IndexOf(Self); -end; - -function TdxCustomLayoutItem.GetIsAvailable: Boolean; -begin - Result := not IsRoot and ((Parent = nil) or Parent.IsAvailable); -end; - -function TdxCustomLayoutItem.GetIsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -function TdxCustomLayoutItem.GetIsDestroying: Boolean; -begin - Result := csDestroying in ComponentState; -end; - -function TdxCustomLayoutItem.GetIsDragged: Boolean; -var - ADragObject: TdxLayoutControlDragAndDropObject; -begin - Result := Container.DragAndDropState <> ddsNone; - if Result then - begin - ADragObject := Container.DragAndDropObject as TdxLayoutControlDragAndDropObject; - Result := ADragObject.SourceItem = Self; - end; -end; - -function TdxCustomLayoutItem.GetIsLoading: Boolean; -begin - Result := csLoading in ComponentState; -end; - -function TdxCustomLayoutItem.GetIsSelected: Boolean; -begin - Result := Container.IsComponentSelected(Self); -end; - -function TdxCustomLayoutItem.GetIsRoot: Boolean; -begin - Result := (FContainer <> nil) and (FContainer.FRootGroup = Self); -end; - -function TdxCustomLayoutItem.GetVisibleIndex: Integer; -begin - if FParent = nil then - Result := -1 - else - Result := FParent.VisibleIndexOf(Self); -end; - -procedure TdxCustomLayoutItem.SetAlignHorz(Value: TdxLayoutAlignHorz); -begin - if AlignHorz <> Value then - begin - FAlignHorz := Value; - Changed; - end; -end; - -procedure TdxCustomLayoutItem.SetAlignmentConstraint(Value: TdxLayoutAlignmentConstraint); -begin - if FAlignmentConstraint <> Value then - begin - Container.BeginUpdate; - try - if FAlignmentConstraint <> nil then - FAlignmentConstraint.InternalRemoveItem(Self); - FAlignmentConstraint := Value; - if FAlignmentConstraint <> nil then - FAlignmentConstraint.InternalAddItem(Self); - finally - Container.EndUpdate; - end; - end; -end; - -procedure TdxCustomLayoutItem.SetAlignVert(Value: TdxLayoutAlignVert); -begin - if AlignVert <> Value then - begin - FAlignVert := Value; - Changed; - end; -end; - -procedure TdxCustomLayoutItem.SetAutoAligns(Value: TdxLayoutAutoAligns); - - function GetLoadedAlignHorz: TdxLayoutAlignHorz; - begin - if AlignHorz = ahParentManaged then - Result := ahLeft - else - Result := AlignHorz; - end; - - function GetLoadedAlignVert: TdxLayoutAlignVert; - begin - if AlignVert = avParentManaged then - Result := avTop - else - Result := AlignVert; - end; - -begin - if AutoAligns <> Value then - begin - Container.BeginUpdate; - try - if aaHorizontal in Value then - AlignHorz := ahParentManaged - else - AlignHorz := GetLoadedAlignHorz; - if aaVertical in Value then - AlignVert := avParentManaged - else - AlignVert := GetLoadedAlignVert; - finally - Container.EndUpdate; - end; - end; -end; - -procedure TdxCustomLayoutItem.SetCaption(const Value: string); -begin - CaptionOptions.Text := Value; -end; - -procedure TdxCustomLayoutItem.SetContainer(Value: TdxCustomLayoutControl); -begin - if FContainer <> Value then - begin - if not IsRoot and (FContainer <> nil) then - FContainer.ExtractAbsoluteItem(Self); - FContainer := Value; - if not IsRoot then - begin - if FContainer <> nil then - FContainer.AddAbsoluteItem(Self); - if Self.Name = '' then - SetComponentName(Self, GetBaseName, IsDesigning, IsLoading); - end - else - Name := GetValidName(Self, GetBaseName + '_Root'); - ContainerChanged; - end; -end; - -procedure TdxCustomLayoutItem.SetEnabled(Value: Boolean); -begin - if Enabled <> Value then - begin - FEnabled := Value; - if FEnabled then - Exclude(FAssignedValues, liavEnabled) - else - Include(FAssignedValues, liavEnabled); - EnabledChanged; - end; -end; - -procedure TdxCustomLayoutItem.SetLayoutLookAndFeel(Value: TdxCustomLayoutLookAndFeel); -begin - if FLayoutLookAndFeel <> Value then - begin - if FLayoutLookAndFeel <> nil then - FLayoutLookAndFeel.RemoveUser(Self); - FLayoutLookAndFeel := Value; - if FLayoutLookAndFeel <> nil then - FLayoutLookAndFeel.AddUser(Self); - LayoutLookAndFeelUserChanged; - end; -end; - -procedure TdxCustomLayoutItem.SetHasMouse(Value: Boolean); -begin - if HasMouse <> Value then - if Value then - FContainer.ItemWithMouse := Self - else - FContainer.ItemWithMouse := nil; -end; - -procedure TdxCustomLayoutItem.SetIndex(Value: Integer); -begin - if FParent <> nil then - FParent.ChangeItemIndex(Self, Value); -end; - -procedure TdxCustomLayoutItem.SetParent(Value: TdxLayoutGroup); -var - APrevParent: TdxLayoutGroup; -begin - if (FParent <> Value) and CanMoveTo(Value) then - begin - APrevParent := FParent; - if FParent <> nil then - FParent.ExtractItem(Self) - else - if FContainer <> nil then - FContainer.ExtractAvailableItem(Self); - if Value <> nil then - Value.AddItem(Self) - else - if (APrevParent <> nil) and not APrevParent.IsDestroying then - FContainer.AddAvailableItem(Self); - Changed; - end; -end; - -procedure TdxCustomLayoutItem.SetShowCaption(Value: Boolean); -begin - CaptionOptions.Visible := Value; -end; - -procedure TdxCustomLayoutItem.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - FVisible := Value; - Changed; - end; -end; - -procedure TdxCustomLayoutItem.SetVisibleIndex(Value: Integer); -begin - if FParent <> nil then - FParent.ChangeItemVisibleIndex(Self, Value); -end; - -function TdxCustomLayoutItem.IsAlignHorzStored: Boolean; -begin - Result := IsRoot or (AlignHorz <> ahParentManaged); -end; - -function TdxCustomLayoutItem.IsAlignVertStored: Boolean; -begin - Result := IsRoot or (AlignVert <> avParentManaged); -end; - -procedure TdxCustomLayoutItem.SetName(const Value: TComponentName); -begin - inherited; - if Container.IsDesigning then - Container.CustomizeFormUpdate([cfutContent, cfutSelection]); -end; - -procedure TdxCustomLayoutItem.SetParentComponent(Value: TComponent); -begin - inherited; - if Value is TdxLayoutGroup then - Parent := TdxLayoutGroup(Value) - else - if Value is TdxCustomLayoutControl then - TdxCustomLayoutControl(Value).AddAvailableItem(Self); -end; - -procedure TdxCustomLayoutItem.CustomizationChanged; -begin -// do nothing -end; - -procedure TdxCustomLayoutItem.LayoutLookAndFeelChanged; -begin -// do nothing -end; - -procedure TdxCustomLayoutItem.LayoutLookAndFeelChanging; -begin - ResetCachedTextHeight; -end; - -procedure TdxCustomLayoutItem.BeginLayoutLookAndFeelUserDestroying; -begin - FContainer.BeginUpdate; -end; - -procedure TdxCustomLayoutItem.EndLayoutLookAndFeelUserDestroying; -begin - FContainer.EndUpdate; -end; - -procedure TdxCustomLayoutItem.LayoutLookAndFeelUserChanged; -begin - if IsDestroying or IsLoading or not ActuallyVisible then Exit; - LayoutLookAndFeelChanging; - Changed; - LayoutLookAndFeelChanged; -end; - -procedure TdxCustomLayoutItem.LayoutLookAndFeelUserDestroyed; -begin - LayoutLookAndFeel := nil; -end; - -function TdxCustomLayoutItem.CanDragAndDrop: Boolean; -begin - Result := not IsRoot; -end; - -function TdxCustomLayoutItem.CanFocusOnClick(X, Y: Integer): Boolean; -begin - Result := False; -end; - -function TdxCustomLayoutItem.CanRemove: Boolean; -begin - Result := FAllowRemove; -end; - -procedure TdxCustomLayoutItem.ContainerChanged; -begin -// do nothing -end; - -procedure TdxCustomLayoutItem.DoCaptionDown; -begin -// do nothing -end; - -procedure TdxCustomLayoutItem.DoCaptionClick; -begin - CallNotify(FOnCaptionClick, Self); -end; - -procedure TdxCustomLayoutItem.DoPack; -begin -// do nothing -end; - -function TdxCustomLayoutItem.DoProcessAccel: Boolean; -var - AItem: TdxCustomLayoutItem; -begin - Result := CanProcessAccel(AItem); - if Result then - AItem.ProcessAccel; -end; - -procedure TdxCustomLayoutItem.EnabledChanged; -begin - Changed(ictMedium); -end; - -function TdxCustomLayoutItem.GetParentManagedAlignHorz: TdxLayoutAlignHorz; -begin - Result := GetParentHelperClass.GetChildItemsAlignHorz; -end; - -function TdxCustomLayoutItem.GetParentManagedAlignVert: TdxLayoutAlignVert; -begin - Result := GetParentHelperClass.GetChildItemsAlignVert; -end; - -function TdxCustomLayoutItem.GetBaseName: string; -begin - Result := FContainer.Name; -end; - -function TdxCustomLayoutItem.GetCursor(X, Y: Integer): TCursor; -begin - if ViewInfo <> nil then - Result := ViewInfo.GetCursor(X, Y) - else - Result := crDefault; -end; - -function TdxCustomLayoutItem.GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; -begin - Result := FLayoutLookAndFeel; - if Result = nil then - if FParent <> nil then - Result := FParent.GetChildLayoutLookAndFeel - else - Result := FContainer.GetLayoutLookAndFeel; -end; - -function TdxCustomLayoutItem.GetParentHelperClass: TdxLayoutGroupHelperClass; -begin - if Parent <> nil then - Result := Parent.GetHelperClass - else - Result := TdxLayoutGroupHelper; -end; - -function TdxCustomLayoutItem.GetShowCaption: Boolean; -begin - Result := CaptionOptions.Visible; -end; - -function TdxCustomLayoutItem.GetVisible: Boolean; -begin - Result := FVisible or IsDesigning; -end; - -function TdxCustomLayoutItem.HasControl: Boolean; -begin - Result := False; -end; - -procedure TdxCustomLayoutItem.BeforeCalculateViewInfo; -begin -// do nothing -end; - -procedure TdxCustomLayoutItem.AfterCalculateViewInfo; -begin -// do nothing -end; - -function TdxCustomLayoutItem.IsParentGroup(AParentGroup: TdxLayoutGroup): Boolean; -begin - Result := AParentGroup.IsChildItem(Self); -end; - -function TdxCustomLayoutItem.IsChildItem(AChildItem: TdxCustomLayoutItem): Boolean; -begin - while (AChildItem <> nil) and (AChildItem <> Self) do - AChildItem := AChildItem.Parent; - Result := AChildItem = Self; -end; - -function TdxCustomLayoutItem.HasCaption: Boolean; -begin - Result := ShowCaption and (Caption <> ''); -end; - -function TdxCustomLayoutItem.CanInit: Boolean; -begin - Result := not (IsLoading or Container.IsLayoutLoading); -end; - -procedure TdxCustomLayoutItem.DoInit; -begin - if GetLayoutLookAndFeel <> nil then - LayoutLookAndFeelChanged; -end; - -procedure TdxCustomLayoutItem.Init; -begin - if CanInit then - DoInit; -end; - -procedure TdxCustomLayoutItem.MouseEnter; -begin - ViewInfo.MouseEnter; -end; - -procedure TdxCustomLayoutItem.MouseLeave; -begin - if FViewInfo <> nil then - FViewInfo.MouseLeave; -end; - -procedure TdxCustomLayoutItem.CustomizationMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - AHitTest: TdxCustomLayoutHitTest; -begin - AHitTest := ViewInfo.GetHitTest(Point(X, Y)); - if AHitTest is TdxCustomLayoutItemHitTest then - begin - if not IsDesigning and Container.Customization then - Container.SetFocus; - TdxCustomLayoutItemHitTest(AHitTest).GetSourceItem.SelectComponent(Shift); - end; -end; - -procedure TdxCustomLayoutItem.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - ViewInfo.MouseDown(Button, Shift, X, Y); - if Container.Customization or Container.IsDesigning then - CustomizationMouseDown(Button, Shift, X, Y); -end; - -procedure TdxCustomLayoutItem.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - ViewInfo.MouseMove(Shift, X, Y); -end; - -procedure TdxCustomLayoutItem.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - ViewInfo.MouseUp(Button, Shift, X, Y); -end; - -procedure TdxCustomLayoutItem.ProcessAccel; -begin -end; - -function TdxCustomLayoutItem.ProcessDialogChar(ACharCode: Word): Boolean; -begin - Result := HasCaption and FCaptionOptions.ShowAccelChar and - IsAccel(ACharCode, Caption) and DoProcessAccel; -end; - -function TdxCustomLayoutItem.GetCaptionOptionsClass: TdxCustomLayoutItemCaptionOptionsClass; -begin - Result := TdxCustomLayoutItemCaptionOptions; -end; - -procedure TdxCustomLayoutItem.ResetCachedTextHeight; -begin - FCachedTextHeight := 0; -end; - -//IdxLayoutSelectableItem -function TdxCustomLayoutItem.CanDelete: Boolean; -begin - Result := IsDesigning; -end; - -function TdxCustomLayoutItem.IsChild(AOwner: TComponent): Boolean; -begin - Result := Container = AOwner; -end; - -procedure TdxCustomLayoutItem.SelectComponent(AShift: TShiftState = []); -begin - Container.SelectComponent(Self, AShift); -end; - -procedure TdxCustomLayoutItem.SelectParent; -begin - if Parent = nil then - Container.SelectComponent(Container) - else - Container.SelectComponent(Parent); -end; - -procedure TdxCustomLayoutItem.SelectionChanged; -begin -// do nothing -end; - -function TdxCustomLayoutItem.IsSelectableItemVisible: Boolean; -begin - Result := ActuallyVisible; -end; - -function TdxCustomLayoutItem.GetParentComponent: TComponent; -begin - if FParent = nil then - Result := FContainer - else - Result := FParent; -end; - -function TdxCustomLayoutItem.HasParent: Boolean; -begin - Result := True; -end; - -procedure TdxCustomLayoutItem.Changed(AType: TdxLayoutItemChangeType); -begin - if IsDestroying or Container.IsLoading or Container.IsDestroying or Container.IsUpdateLocked then Exit; - case AType of - ictHard: Container.LayoutChanged(False); - ictMedium: - if ViewInfo <> nil then - begin - Container.BeginUpdate; - try - BeforeCalculateViewInfo; - ViewInfo.Calculate(ViewInfo.Bounds); - AfterCalculateViewInfo; - Container.InvalidateRect(ViewInfo.Bounds, False); - finally - Container.CancelUpdate; - end; - Container.PostBuildSelectionLayer; - end; - ictLight: - if ViewInfo <> nil then - Container.InvalidateRect(ViewInfo.Bounds, False); - end; -end; - -function TdxCustomLayoutItem.CanMoveTo(AParent: TdxCustomLayoutItem): Boolean; -begin - Result := AParent <> Self; -end; - -procedure TdxCustomLayoutItem.MakeVisible; -var - R, AClientR: TRect; - - procedure MakeVisibleInOneDirection(AItemMin, AItemMax, - AClientMin, AClientMax: Integer; AIsHorizontal: Boolean); - var - AOffset: Integer; - - procedure ChangeOffset(ADelta: Integer); - begin - Inc(AOffset, ADelta); - Dec(AItemMin, ADelta); - Dec(AItemMax, ADelta); - end; - - procedure ApplyOffset; - begin - with FContainer do - if AIsHorizontal then - LeftPos := LeftPos + AOffset - else - TopPos := TopPos + AOffset; - end; - - begin - AOffset := 0; - if AItemMax > AClientMax then - ChangeOffset(AItemMax - AClientMax); - if AItemMin < AClientMin then - ChangeOffset(-(AClientMin - AItemMin)); - ApplyOffset; - end; - - procedure MakeActuallyVisible(AItem: TdxCustomLayoutItem); - begin - if AItem.Parent <> nil then - begin - AItem.Parent.ItemIndex := AItem.Index; - MakeActuallyVisible(AItem.Parent); - end; - end; - - function CanBeActuallyVisible(AItem: TdxCustomLayoutItem): Boolean; - begin - Result := AItem.Visible and (AItem.IsRoot or (AItem.Parent <> nil) and CanBeActuallyVisible(AItem.Parent)); - end; - -begin - if not CanBeActuallyVisible(Self) then Exit; - if not ActuallyVisible then - MakeActuallyVisible(Self); - R := ViewInfo.Bounds; - AClientR := FContainer.ClientBounds; - MakeVisibleInOneDirection(R.Left, R.Right, AClientR.Left, AClientR.Right, True); - MakeVisibleInOneDirection(R.Top, R.Bottom, AClientR.Top, AClientR.Bottom, False); -end; - -function TdxCustomLayoutItem.Move(AParent: TdxLayoutGroup; AIndex: Integer; - APack: Boolean = False): Boolean; -var - ASourceContainer, ADestinationContainer: TdxCustomLayoutControl; -begin - Result := CanMoveTo(AParent) and (APack or (AParent <> Parent) or (Index <> AIndex)); - if not Result then Exit; - ASourceContainer := Container; - ADestinationContainer := AParent.Container; - ADestinationContainer.BeginUpdate; - ASourceContainer.BeginUpdate; - try - Parent := AParent; - Index := AIndex; - finally - ASourceContainer.EndUpdate(APack); - ADestinationContainer.EndUpdate(APack); - end; -end; - -function TdxCustomLayoutItem.MoveTo(AParent: TdxLayoutGroup; AVisibleIndex: Integer; - APack: Boolean = False): Boolean; -var - AIndex: Integer; -begin - if AParent = nil then - AIndex := -1 - else - AIndex := AParent.GetItemIndex(AVisibleIndex); - Result := Move(AParent, AIndex, APack); -end; - -procedure TdxCustomLayoutItem.Pack; -begin - DoPack; -end; - -function TdxCustomLayoutItem.PutIntoHiddenGroup(ALayoutDirection: TdxLayoutDirection): TdxLayoutGroup; -var - AIndex: Integer; -begin - if FParent = nil then - Result := nil - else - begin - AIndex := Index; - Result := FParent.CreateGroup; - with Result do - begin - Hidden := True; - LayoutDirection := ALayoutDirection; - Index := AIndex; - end; - Move(Result, 0); - end; -end; - -{ TdxCustomLayoutControlAdapter } - -constructor TdxCustomLayoutControlAdapter.Create(AItem: TdxLayoutItem); -begin - inherited Create; - FItem := AItem; - if not FItem.IsLoading then - begin - Init; - if FItem.ActuallyVisible then - LayoutLookAndFeelChanged; - end; -end; - -function TdxCustomLayoutControlAdapter.GetControl: TControl; -begin - Result := FItem.Control; -end; - -function TdxCustomLayoutControlAdapter.GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; -begin - Result := FItem.GetLayoutLookAndFeel; -end; - -function TdxCustomLayoutControlAdapter.AllowCheckSize: Boolean; -begin - Result := True; -end; - -procedure TdxCustomLayoutControlAdapter.HideControlBorder; -begin - SetEnumProp(Control, 'BorderStyle', 'bsNone'); -end; - -procedure TdxCustomLayoutControlAdapter.Init; -var - AHeight: Integer; -begin - FItem.ControlOptions.AutoColor := UseItemColor; - if FItem.IsDesigning and (FItem.Caption = '') then - FItem.Caption := Control.Name;//GetPlainString(TControlAccess(Control).Caption); - if FItem.IsDesigning then - FItem.ShowCaption := ShowItemCaption; - FItem.ControlOptions.ShowBorder := ShowBorder; - if ShowBorder then - begin - AHeight := Control.ClientHeight; - HideControlBorder; - Control.Height := AHeight; - end; -end; - -procedure TdxCustomLayoutControlAdapter.InternalLayoutLookAndFeelChanged; -begin - if Item.ControlOptions.AutoColor and (Item.ViewInfo <> nil) then - TControlAccess(Control).Color := Item.ViewInfo.Color; -end; - -function TdxCustomLayoutControlAdapter.ShowBorder: Boolean; -begin - Result := - IsPublishedProp(Control, 'BorderStyle') and - (GetPropInfo(Control, 'BorderStyle').PropType^ = TypeInfo(Forms.TBorderStyle)); -end; - -function TdxCustomLayoutControlAdapter.ShowItemCaption: Boolean; -begin - Result := not IsPublishedProp(Control, 'Caption'); -end; - -function TdxCustomLayoutControlAdapter.UseItemColor: Boolean; -begin - Result := - TControlAccess(Control).ParentColor and IsPublishedProp(Control, 'Color'); -end; - -procedure TdxCustomLayoutControlAdapter.LayoutLookAndFeelChanged; -var - ALookAndFeelContainer: IcxLookAndFeelContainer; -begin - InternalLayoutLookAndFeelChanged; - if Supports(Control, IcxLookAndFeelContainer, ALookAndFeelContainer) then - LayoutLookAndFeel.InitializeSubControlCxLookAndFeel(ALookAndFeelContainer.GetLookAndFeel); -end; - -class procedure TdxCustomLayoutControlAdapter.Register(AControlClass: TControlClass); -begin - dxLayoutControlAdapterDefs.Register(AControlClass, Self); -end; - -class procedure TdxCustomLayoutControlAdapter.Unregister(AControlClass: TControlClass); -begin - dxLayoutControlAdapterDefs.Unregister(AControlClass, Self); -end; - -{ TdxLayoutItemCaptionOptions } - -constructor TdxLayoutItemCaptionOptions.Create(AItem: TdxCustomLayoutItem); -begin - inherited; - FAlignVert := tavCenter; -end; - -procedure TdxLayoutItemCaptionOptions.SetAlignVert(Value: TdxAlignmentVert); -begin - if FAlignVert <> Value then - begin - FAlignVert := Value; - Changed; - end; -end; - -procedure TdxLayoutItemCaptionOptions.SetLayout(Value: TdxCaptionLayout); -begin - if FLayout <> Value then - begin - FLayout := Value; - Changed; - end; -end; - -procedure TdxLayoutItemCaptionOptions.SetWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FWidth <> Value then - begin - FWidth := Value; - Item.ResetCachedTextHeight; - Changed; - end; -end; - -{ TdxLayoutItemControlOptions } - -constructor TdxLayoutItemControlOptions.Create(AItem: TdxCustomLayoutItem); -begin - inherited; - FAutoAlignment := True; - FMinHeight := dxLayoutItemControlDefaultMinHeight; - FMinWidth := dxLayoutItemControlDefaultMinWidth; - FShowBorder := True; -end; - -procedure TdxLayoutItemControlOptions.SetAutoAlignment(Value: Boolean); -begin - if FAutoAlignment <> Value then - begin - FAutoAlignment := Value; - Changed; - end; -end; - -procedure TdxLayoutItemControlOptions.SetAutoColor(Value: Boolean); -begin - if FAutoColor <> Value then - begin - FAutoColor := Value; - Item.LayoutLookAndFeelUserChanged; - end; -end; - -procedure TdxLayoutItemControlOptions.SetFixedSize(Value: Boolean); -begin - if FFixedSize <> Value then - begin - FFixedSize := Value; - Changed; - end; -end; - -procedure TdxLayoutItemControlOptions.SetMinHeight(Value: Integer); -begin - if Value < 0 then Value := 0; - if FMinHeight <> Value then - begin - FMinHeight := Value; - Changed; - end; -end; - -procedure TdxLayoutItemControlOptions.SetMinWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FMinWidth <> Value then - begin - FMinWidth := Value; - Changed; - end; -end; - -procedure TdxLayoutItemControlOptions.SetOpaque(Value: Boolean); -begin - if FOpaque <> Value then - begin - FOpaque := Value; - Changed; - end; -end; - -procedure TdxLayoutItemControlOptions.SetShowBorder(Value: Boolean); -begin - if FShowBorder <> Value then - begin - FShowBorder := Value; - Changed; - end; -end; - -{ TdxLayoutItem } - -constructor TdxLayoutItem.Create(AOwner: TComponent); -begin - inherited; - FControlOptions := GetControlOptionsClass.Create(Self); -end; - -destructor TdxLayoutItem.Destroy; -begin - Control := nil; - FControlOptions.Free; - FreeAndNil(FCustomizeControlHelper); - inherited; -end; - -function TdxLayoutItem.GetCaptionOptions: TdxLayoutItemCaptionOptions; -begin - Result := TdxLayoutItemCaptionOptions(inherited CaptionOptions); -end; - -function TdxLayoutItem.GetViewInfo: TdxLayoutItemViewInfo; -begin - Result := TdxLayoutItemViewInfo(inherited ViewInfo); -end; - -procedure TdxLayoutItem.SetCaptionOptions(Value: TdxLayoutItemCaptionOptions); -begin - inherited CaptionOptions := Value; -end; - -procedure TdxLayoutItem.SetControl(Value: TControl); - - procedure CheckValue; - var - AItem: TdxLayoutItem; - begin - if Value <> nil then - begin - if Value = Container then - raise EdxException.Create(sdxLayoutControlContainerCannotBeControl); - AItem := FContainer.FindItem(Value); - if AItem <> nil then - raise EdxException.Create(Format(sdxLayoutControlControlIsUsed, [Value.Name, AItem.Name])) - end; - end; - - procedure UnprepareControl; - begin - Control.RemoveFreeNotification(Self); - if IsDesigning then - with Control do - ControlStyle := ControlStyle - [csNoDesignVisible]; - - FreeAndNil(FCustomizeControlHelper); - Control.WindowProc := FDefaultControlWndProc; - FDefaultControlWndProc := nil; - - FreeAndNil(FControlAdapter); - - if IsDesigning and not (csDestroying in Control.ComponentState) then - begin - Control.Left := 0; - Control.Top := 0; - end; - end; - - procedure PrepareControl; - begin - Control.Enabled := Enabled; - FDefaultControlWndProc := Control.WindowProc; - Control.WindowProc := ControlWndProc; - Control.FreeNotification(Self); - if IsDesigning then - with FControl do - ControlStyle := ControlStyle + [csNoDesignVisible]; - Control.Parent := Container; - SaveOriginalControlSize; - CreateControlAdapter; - SaveOriginalControlSize; - if HasWinControl and not TWinControl(Control).HandleAllocated then - SaveControlSizeBeforeDestruction; - - FCustomizeControlHelper := TdxCustomizationControlHelper.Create(Control); - (FCustomizeControlHelper as TdxCustomizationControlHelper).LayoutItem := Self; - end; - -begin - if FControl <> Value then - begin - CheckValue; - FControlLocked := True; - try - if FControl <> nil then - UnprepareControl; - FControl := Value; - if Value <> nil then - PrepareControl; - finally - FControlLocked := False; - end; - Changed; - end; -end; - -function TdxLayoutItem.CanFocusControlOnCaptionClick: Boolean; -begin - Result := not Container.IsCustomization and Container.FocusControlOnItemCaptionClick and CanFocusControl; -end; - -procedure TdxLayoutItem.CreateControlAdapter; -begin - FControlAdapter := - dxLayoutControlAdapterDefs.GetAdapterClass(FControl).Create(Self); -end; - -{procedure TdxLayoutItem.PostFree; -begin - Container.PostFree(Self); -end;} - -function TdxLayoutItem.CanFocusOnClick(X, Y: Integer): Boolean; -begin - Result := CanFocusControlOnCaptionClick and ViewInfo.CaptionViewInfo.CanDoCaptionClick(X, Y); -end; - -function TdxLayoutItem.CanProcessAccel(out AItem: TdxCustomLayoutItem): Boolean; -begin - Result := CanFocusControl and CanTabStopControl; - if Result then - AItem := Self; -end; - -procedure TdxLayoutItem.CustomizationChanged; -begin - if HasControl then - (FCustomizeControlHelper as TdxCustomizationControlHelper).CustomizationChanged; -end; - -procedure TdxLayoutItem.ContainerChanged; - - procedure ResetControlParent; - var - ASavedControl: TControl; - begin - if Control.Parent <> Container then - begin - ASavedControl := Control; - Control := nil; - Control := ASavedControl; - end; - end; - -begin - if HasControl and (Container <> nil) then - ResetControlParent; -end; - -procedure TdxLayoutItem.DoCaptionDown; -begin - if CanFocusControlOnCaptionClick then - SetControlFocus; -end; - -function TdxLayoutItem.GetParentManagedAlignVert: TdxLayoutAlignVert; -begin - Result := avTop; -end; - -function TdxLayoutItem.GetBaseName: string; -begin - Result := inherited GetBaseName + 'Item'; -end; - -function TdxLayoutItem.GetViewInfoClass: TdxCustomLayoutItemViewInfoClass; -begin - Result := TdxCustomLayoutItemViewInfoClass(GetLayoutLookAndFeel.GetItemViewInfoClass); -end; - -procedure TdxLayoutItem.DoInit; -var - ACommonValue: Variant; - - function IsCommonValue(AValueIndex: Integer; var ACommonValue: Variant): Boolean; - var - I: Integer; - AValue: Variant; - - function CheckValue(AItem: TdxCustomLayoutItem): Boolean; - begin - if AItem <> Self then - case AValueIndex of - 0..2: Result := AItem is TdxLayoutItem; -// 3..4: Result := True; - else - Result := False; - end - else - Result := False; - end; - - function GetValue(AItem: TdxCustomLayoutItem): Variant; - begin - case AValueIndex of - 0: Result := TdxLayoutItem(AItem).CaptionOptions.Layout; - 1: Result := TdxLayoutItem(AItem).CaptionOptions.AlignHorz; - 2: Result := TdxLayoutItem(AItem).CaptionOptions.AlignVert; -// 3: Result := AItem.AlignHorz; -// 4: Result := AItem.AlignVert; - else - Result := Null; - end; - end; - - begin - Result := (Parent <> nil) and not Parent.Hidden; - if not Result then Exit; - Result := False; - ACommonValue := Unassigned; - for I := 0 to Parent.VisibleCount - 1 do - if CheckValue(Parent.VisibleItems[I]) then - begin - AValue := GetValue(Parent.VisibleItems[I]); - if VarIsEmpty(ACommonValue) then - ACommonValue := AValue; - Result := AValue = ACommonValue; - if not Result then Break; - end; - end; - -begin - inherited; - if IsCommonValue(0, ACommonValue) then - CaptionOptions.FLayout := ACommonValue; - if IsCommonValue(1, ACommonValue) then - CaptionOptions.FAlignHorz := ACommonValue; - if IsCommonValue(2, ACommonValue) then - CaptionOptions.FAlignVert := ACommonValue; - - {if IsCommonValue(3, ACommonValue) then - AlignHorz := ACommonValue; - items lose client alignment} - {if IsCommonValue(4, ACommonValue) then - AlignVert := ACommonValue; - because some controls cannot be made client aligned } -end; - -procedure TdxLayoutItem.Loaded; -begin - inherited; - if HasControl then - SaveOriginalControlSize; -end; - -procedure TdxLayoutItem.LayoutLookAndFeelChanged; -begin - inherited; - if FControlAdapter <> nil then - FControlAdapter.LayoutLookAndFeelChanged; -end; - -procedure TdxLayoutItem.UpdateDesignSelectors; -var - R: TRect; -begin - if HasControl and (FCustomizeControlHelper <> nil) then - begin - R := ViewInfo.DesignSelectorRect; - R := cxRectOffset(R, ViewInfo.ControlViewInfo.Bounds.TopLeft, False); - FCustomizeControlHelper.SelectorBounds := R; - end; -end; - -procedure TdxLayoutItem.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited; - if (Operation = opRemove) and (AComponent = FControl) then - begin - Control := nil; - Free; // #DG -// #DG PostFree; - end; -end; - -procedure TdxLayoutItem.ProcessAccel; -begin - SetControlFocus; -end; - -procedure TdxLayoutItem.RestoreItemControlSize; -begin - if HasControl then - Control.SetBounds(Control.Left, Control.Top, FOriginalControlSize.X, FOriginalControlSize.Y); -end; - -procedure TdxLayoutItem.CustomizationMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - if Container.ShowDesignSelectors and IsDesigning and Container.Customization and HasControl and PtInRect(ViewInfo.DesignSelectorRect, Point(X, Y)) then - Container.SelectComponent(Control, Shift) - else - inherited CustomizationMouseDown(Button, Shift, X, Y); -end; - -procedure TdxLayoutItem.AfterCalculateViewInfo; -begin - SetControlVisibility; - SetControlEnablement; - inherited; -end; - -function TdxLayoutItem.GetCaptionOptionsClass: TdxCustomLayoutItemCaptionOptionsClass; -begin - Result := TdxLayoutItemCaptionOptions; -end; - -function TdxLayoutItem.GetControlOptionsClass: TdxLayoutItemControlOptionsClass; -begin - Result := TdxLayoutItemControlOptions; -end; - -function TdxLayoutItem.CanFocusControl: Boolean; -begin - Result := HasWinControl and TWinControl(Control).CanFocus; -end; - -function TdxLayoutItem.CanTabStopControl: Boolean; -begin - Result := HasWinControl and TWinControl(Control).TabStop; -end; - -procedure TdxLayoutItem.ControlWndProc(var Message: TMessage); - - function IsControlMoved: Boolean; - begin - Result := (Message.LParam = 0) or (PWindowPos(Message.LParam)^.flags and SWP_NOMOVE = 0); - end; - - function IsControlResized: Boolean; - begin - Result := (Message.LParam = 0) or (PWindowPos(Message.LParam)^.flags and SWP_NOSIZE = 0); - end; - - function ControlSizeChanged: Boolean; - begin - Result := not cxPointIsEqual(Point(Control.Width, Control.Height), FOriginalControlSize); - end; - - function NeedSaveOriginalControlSize: Boolean; - begin - Result := IsControlResized and FControlAdapter.AllowCheckSize and ControlSizeChanged; - end; - -begin - FDefaultControlWndProc(Message); - if not FControlLocked then - with Message do - case Msg of - WM_CREATE: - if (Control.Width <> ControlSizeBeforeDestruction.X) or - (Control.Height <> ControlSizeBeforeDestruction.Y) then - begin - SaveOriginalControlSize; - Changed; - end; - WM_DESTROY: - SaveControlSizeBeforeDestruction; - WM_SETFOCUS: - MakeVisible; - WM_WINDOWPOSCHANGED: - if not Container.IsPlacingControls and (IsControlMoved or - (IsControlResized and FControlAdapter.AllowCheckSize)) then - begin - if NeedSaveOriginalControlSize then - SaveOriginalControlSize; - Changed; - end; - CM_TABSTOPCHANGED: - Container.ViewInfo.DoCalculateTabOrders; - CM_ENABLEDCHANGED: - Enabled := Control.Enabled; - end; -end; - -function TdxLayoutItem.HasControl: Boolean; -begin - Result := FControl <> nil; -end; - -function TdxLayoutItem.HasWinControl: Boolean; -begin - Result := HasControl and (FControl is TWinControl); -end; - -procedure TdxLayoutItem.SaveControlSizeBeforeDestruction; -begin - FControlSizeBeforeDestruction := Point(Control.Width, Control.Height); -end; - -procedure TdxLayoutItem.SaveOriginalControlSize; -begin - if HasWinControl and CanAllocateHandle(TWinControl(FControl)) then - TWinControl(FControl).HandleNeeded; // for cxEditors - FOriginalControlSize := Point(FControl.Width, FControl.Height); -end; - -procedure TdxLayoutItem.SetControlEnablement; -begin - if HasControl then - Control.Enabled := Enabled; -end; - -procedure TdxLayoutItem.SetControlFocus; -begin - TWinControl(FControl).SetFocus; -end; - -procedure TdxLayoutItem.SetControlVisibility; - - procedure InternalSetControlVisibility(AValue: Boolean); - begin - if Control.Visible <> AValue then - begin - Control.Visible := AValue; - // to make the control invisible on showing - if not AValue then - Control.SetBounds(10000, 10000, FOriginalControlSize.X, FOriginalControlSize.Y) - else - Control.BoundsRect := ViewInfo.FControlViewInfo.ControlBounds; - end; - end; - -begin - if HasControl then - InternalSetControlVisibility(ActuallyVisible and ViewInfo.ActuallyVisible); -end; - -{ TdxLayoutGroup } - -constructor TdxLayoutGroup.Create(AOwner: TComponent); -begin - inherited; - FIsUserDefined := True; - FItems := TcxComponentList.Create(True); - FItems.OnComponentListChanged := ItemListChanged; - FVisibleItems := TcxComponentList.Create; - FLayoutDirection := ldVertical; - FShowBorder := True; - FUseIndent := True; -end; - -destructor TdxLayoutGroup.Destroy; -var - ANeedCreateNewRootGroup: Boolean; -begin - ANeedCreateNewRootGroup := IsRoot and not (csReading in Container.ComponentState) and - not Container.IsDestroying; - if ANeedCreateNewRootGroup then - Container.CreateRootGroup; - FreeAndNil(FVisibleItems); - FreeAndNil(FItems); - if ANeedCreateNewRootGroup then - Container.LayoutChanged; - inherited; -end; - -function TdxLayoutGroup.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxLayoutGroup.GetItem(Index: Integer): TdxCustomLayoutItem; -begin - Result := TdxCustomLayoutItem(FItems[Index]); -end; - -function TdxLayoutGroup.GetShowBorder: Boolean; -begin - Result := not FHidden and FShowBorder; -end; - -function TdxLayoutGroup.GetViewInfo: TdxLayoutGroupViewInfo; -begin - Result := TdxLayoutGroupViewInfo(inherited ViewInfo); -end; - -function TdxLayoutGroup.GetVisibleCount: Integer; -begin - Result := FVisibleItems.Count; -end; - -function TdxLayoutGroup.GetVisibleItem(Index: Integer): TdxCustomLayoutItem; -begin - Result := TdxCustomLayoutItem(FVisibleItems[Index]); -end; - -procedure TdxLayoutGroup.SetItemIndex(Value: Integer); -begin - if not IsLoading and (Value > VisibleCount) then - Value := -1; - if FItemIndex <> Value then - begin - FItemIndex := Value; - Changed(ictMedium); - end; -end; - -procedure TdxLayoutGroup.SetHidden(Value: Boolean); -begin - if FHidden <> Value then - begin - FHidden := Value; - if not IsRoot then - Changed; - end; -end; - -procedure TdxLayoutGroup.SetLayoutDirection(Value: TdxLayoutDirection); -begin - if FLayoutDirection <> Value then - begin - FLayoutDirection := Value; - Changed; - end; -end; - -procedure TdxLayoutGroup.SetLocked(Value: Boolean); -begin - if FLocked <> Value then - begin - FLocked := Value; - end; -end; - -procedure TdxLayoutGroup.SetLayoutLookAndFeelException(Value: Boolean); -begin - if FLayoutLookAndFeelException <> Value then - begin - FLayoutLookAndFeelException := Value; - LayoutLookAndFeelUserChanged; - end; -end; - -procedure TdxLayoutGroup.SetShowBorder(Value: Boolean); -begin - if FShowBorder <> Value then - begin - FShowBorder := Value; - Changed; - end; -end; - -procedure TdxLayoutGroup.SetUseIndent(Value: Boolean); -begin - if FUseIndent <> Value then - begin - FUseIndent := Value; - Changed; - end; -end; - -procedure TdxLayoutGroup.AddItem(AItem: TdxCustomLayoutItem); -begin - FItems.Add(AItem); - AItem.FParent := Self; - AItem.Container := FContainer; - AItem.Init; -end; - -procedure TdxLayoutGroup.ExtractItem(AItem: TdxCustomLayoutItem); -begin - if not (csDestroying in ComponentState) then - begin - FItems.Extract(AItem); - AItem.FParent := nil; - Changed; - end; -end; - -procedure TdxLayoutGroup.ItemListChanged(Sender: TObject; AComponent: TComponent; AAction: TcxComponentCollectionNotification); -begin - if IsLoading then - Exit; - BuildVisibleItemsList; - if ItemIndex > VisibleCount - 1 then - ItemIndex := VisibleCount - 1 - else - if (ItemIndex = -1) and (VisibleCount > 0) then - ItemIndex := 0; - - Changed; -end; - -function TdxLayoutGroup.IsChildActuallyVisible(AChild: TdxCustomLayoutItem): Boolean; -begin - Result := ActuallyVisible and AllowDrawChild(AChild); -end; - -function TdxLayoutGroup.GetChildLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; -begin - if LayoutLookAndFeelException and (Parent <> nil) then - Result := Parent.GetChildLayoutLookAndFeel - else - Result := GetLayoutLookAndFeel; -end; - -function TdxLayoutGroup.CanDelete: Boolean; -var - I: Integer; -begin - Result := not IsRoot and not Locked and IsUserDefined; - if Result then - for I := 0 to Count - 1 do - begin - Result := Items[I].CanDelete; - if not Result then - Break; - end; -end; - -function TdxLayoutGroup.CanProcessAccel(out AItem: TdxCustomLayoutItem): Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to VisibleCount - 1 do - begin - AItem := VisibleItems[I]; - Result := AItem.CanProcessAccel(AItem); - if Result then Break; - end; -end; - -function TdxLayoutGroup.CanRemove: Boolean; -var - I: Integer; -begin - Result := inherited CanRemove; - if Result then - for I := 0 to Count - 1 do - begin - Result := Items[I].CanRemove; - if not Result then Break; - end; -end; - -procedure TdxLayoutGroup.ContainerChanged; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Container := Container; -end; - -procedure TdxLayoutGroup.CustomizationChanged; -var - I: Integer; -begin - for I := 0 to FItems.Count - 1 do - Items[I].CustomizationChanged; -end; - -procedure TdxLayoutGroup.DoPack; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Items[I].Pack; - if IsSuperfluous then - begin - if (Parent <> nil) and (Parent.Count = 1) and (Count > 0) then - Parent.LayoutDirection := LayoutDirection; - MoveChildrenToParent; - Free; - end; -end; - -function TdxLayoutGroup.GetBaseName: string; -begin - Result := inherited GetBaseName + 'Group'; -end; - -procedure TdxLayoutGroup.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - I: Integer; -begin - inherited; - for I := 0 to Count - 1 do - if Items[I].Owner = Root then - Proc(Items[I]); -end; - -function TdxLayoutGroup.GetShowCaption: Boolean; -begin - Result := {#DG ShowBorder and }inherited GetShowCaption; -end; - -function TdxLayoutGroup.GetViewInfoClass: TdxCustomLayoutItemViewInfoClass; -begin - Result := TdxCustomLayoutItemViewInfoClass(GetLayoutLookAndFeel.GetGroupViewInfoClass); -end; - -procedure TdxLayoutGroup.Loaded; -begin - inherited; - FIsUserDefined := False; -end; - -procedure TdxLayoutGroup.LayoutLookAndFeelChanged; -var - I: Integer; -begin - inherited; - for I := 0 to VisibleCount - 1 do - VisibleItems[I].LayoutLookAndFeelChanged; -end; - -procedure TdxLayoutGroup.LayoutLookAndFeelChanging; -var - I: Integer; -begin - inherited; - for I := 0 to VisibleCount - 1 do - VisibleItems[I].LayoutLookAndFeelChanging; -end; - -function TdxLayoutGroup.ProcessDialogChar(ACharCode: Word): Boolean; -var - I: Integer; -begin - Result := inherited ProcessDialogChar(ACharCode); - if not Result then - for I := 0 to VisibleCount - 1 do - begin - Result := VisibleItems[I].ProcessDialogChar(ACharCode); - if Result then Break; - end; -end; - -procedure TdxLayoutGroup.RestoreItemControlSize; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].RestoreItemControlSize; -end; - -procedure TdxLayoutGroup.SetChildOrder(Child: TComponent; Order: Integer); -begin - inherited; - (Child as TdxCustomLayoutItem).Index := Order; -end; - -procedure TdxLayoutGroup.SetParentComponent(Value: TComponent); -begin -//#DG - if Value is TdxCustomLayoutControl and - not TdxCustomLayoutControl(Value).Items.IsLoading and - not (csAncestor in ComponentState) then - TdxCustomLayoutControl(Value).SetRootGroup(Self) - else - inherited; -end; - -procedure TdxLayoutGroup.BeforeCalculateViewInfo; -var - I: Integer; -begin - BuildVisibleItemsList; - for I := 0 to Count - 1 do - Items[I].BeforeCalculateViewInfo; -end; - -procedure TdxLayoutGroup.AfterCalculateViewInfo; -var - I: Integer; -begin - if ViewInfo <> nil then - ViewInfo.Specific.SetControlVisibility; - for I := 0 to Count - 1 do - Items[I].AfterCalculateViewInfo; - inherited; -end; - -procedure TdxLayoutGroup.BuildVisibleItemsList; -var - I: Integer; -begin - FVisibleItems.Clear; - for I := 0 to Count - 1 do - if Items[I].GetVisible then - FVisibleItems.Add(Items[I]); -end; - -function TdxLayoutGroup.GetHelperClass: TdxLayoutGroupHelperClass; -begin - case LayoutDirection of - ldHorizontal: Result := TdxLayoutHorizontalGroupHelper; - ldVertical: Result := TdxLayoutVerticalGroupHelper; - ldTabbed: Result := TdxLayoutTabbedGroupHelper; - else - raise EdxException.Create('TdxLayoutGroup.GetHelperClass fails'); - end; -end; - -function TdxLayoutGroup.AllowDrawChild(AChild: TdxCustomLayoutItem): Boolean; -begin - Result := (ViewInfo = nil) or ViewInfo.Specific.AllowDrawChild(AChild); -end; - -procedure TdxLayoutGroup.ChangeItemIndex(AItem: TdxCustomLayoutItem; - Value: Integer); -begin - if AItem.Index <> Value then - begin - FItems.Move(AItem.Index, Value); - if AItem.GetVisible then - begin - BuildVisibleItemsList; - Changed; - end; - end; -end; - -procedure TdxLayoutGroup.ChangeItemVisibleIndex(AItem: TdxCustomLayoutItem; - Value: Integer); -begin - ChangeItemIndex(AItem, GetItemIndex(Value)); -end; - -function TdxLayoutGroup.GetItemIndex(AItemVisibleIndex: Integer): Integer; -begin - if (0 <= AItemVisibleIndex) and (AItemVisibleIndex < VisibleCount) then - Result := VisibleItems[AItemVisibleIndex].Index - else - Result := Count; -end; - -function TdxLayoutGroup.IndexOf(AItem: TdxCustomLayoutItem): Integer; -begin - Result := FItems.IndexOf(AItem); -end; - -function TdxLayoutGroup.IsSuperfluous: Boolean; -begin - Result := not IsRoot and not Locked and Hidden and ((Count = 0) or (Count = 1) or (Parent <> nil) and (Parent.Count = 1)); -end; - -function TdxLayoutGroup.VisibleIndexOf(AItem: TdxCustomLayoutItem): Integer; -begin - Result := FVisibleItems.IndexOf(AItem); -end; - -function TdxLayoutGroup.CreateGroup(AGroupClass: TdxLayoutGroupClass = nil): TdxLayoutGroup; -begin - Result := Container.CreateGroup(AGroupClass, Self); -end; - -function TdxLayoutGroup.CreateItem(AItemClass: TdxCustomLayoutItemClass = nil): TdxCustomLayoutItem; -begin - Result := Container.CreateItem(AItemClass, Self); -end; - -function TdxLayoutGroup.CreateItemForControl(AControl: TControl): TdxLayoutItem; -begin - Result := Container.CreateItemForControl(AControl, Self); -end; - -function TdxLayoutGroup.CanMoveTo(AParent: TdxCustomLayoutItem): Boolean; -begin - Result := (AParent = nil) or inherited CanMoveTo(AParent) and not IsChildItem(AParent); -end; - -procedure TdxLayoutGroup.MoveChildrenToParent; -var - AInsertionIndex, I: Integer; -begin - AInsertionIndex := Index; - for I := Count - 1 downto 0 do - Items[I].Move(Parent, AInsertionIndex); -end; - -function TdxLayoutGroup.PutChildrenIntoHiddenGroup: TdxLayoutGroup; -var - I: Integer; -begin - Result := CreateGroup; - Result.Hidden := True; - Result.LayoutDirection := LayoutDirection; - for I := Count - 2 downto 0 do - Items[I].Move(Result, 0); -end; - -{ TdxLayoutGroupHelper } - -class function TdxLayoutGroupHelper.GetChildItemsAlignHorz: TdxLayoutAlignHorz; -begin - Result := ahClient; -end; - -class function TdxLayoutGroupHelper.GetChildItemsAlignVert: TdxLayoutAlignVert; -begin - Result := avClient; -end; - -class function TdxLayoutGroupHelper.GetOrthogonalDirection: TdxLayoutDirection; -begin - Result := ldVertical; -end; - -class function TdxLayoutGroupHelper.GetSpecificClass: TdxLayoutGroupViewInfoSpecificClass; -begin - Result := TdxLayoutGroupViewInfoSpecific; -end; - -{ TdxLayoutHorizontalGroupHelper } - -class function TdxLayoutHorizontalGroupHelper.GetChildItemsAlignHorz: TdxLayoutAlignHorz; -begin - Result := ahLeft; -end; - -class function TdxLayoutHorizontalGroupHelper.GetChildItemsAlignVert: TdxLayoutAlignVert; -begin - Result := avClient; -end; - -class function TdxLayoutHorizontalGroupHelper.GetOrthogonalDirection: TdxLayoutDirection; -begin - Result := ldVertical; -end; - -class function TdxLayoutHorizontalGroupHelper.GetSpecificClass: TdxLayoutGroupViewInfoSpecificClass; -begin - Result := TdxLayoutGroupViewInfoHorizontalSpecific; -end; - -{ TdxLayoutVerticalGroupHelper } - -class function TdxLayoutVerticalGroupHelper.GetChildItemsAlignHorz: TdxLayoutAlignHorz; -begin - Result := ahClient; -end; - -class function TdxLayoutVerticalGroupHelper.GetChildItemsAlignVert: TdxLayoutAlignVert; -begin - Result := avTop; -end; - -class function TdxLayoutVerticalGroupHelper.GetOrthogonalDirection: TdxLayoutDirection; -begin - Result := ldHorizontal; -end; - -class function TdxLayoutVerticalGroupHelper.GetSpecificClass: TdxLayoutGroupViewInfoSpecificClass; -begin - Result := TdxLayoutGroupViewInfoVerticalSpecific; -end; - -{ TdxLayoutTabbedGroupHelper } - -class function TdxLayoutTabbedGroupHelper.GetChildItemsAlignHorz: TdxLayoutAlignHorz; -begin - Result := ahClient; -end; - -class function TdxLayoutTabbedGroupHelper.GetChildItemsAlignVert: TdxLayoutAlignVert; -begin - Result := avClient; -end; - -class function TdxLayoutTabbedGroupHelper.GetOrthogonalDirection: TdxLayoutDirection; -begin - Result := ldTabbed; -end; - -class function TdxLayoutTabbedGroupHelper.GetSpecificClass: TdxLayoutGroupViewInfoSpecificClass; -begin - Result := TdxLayoutGroupViewInfoTabbedSpecific; -end; - -{ TdxLayoutAlignmentConstraint } - -constructor TdxLayoutAlignmentConstraint.Create(AOwner: TComponent); -begin - inherited; - CreateItems; -end; - -destructor TdxLayoutAlignmentConstraint.Destroy; -begin - DestroyItems; - if FControl <> nil then - FControl.RemoveAlignmentConstraint(Self); - inherited; -end; - -function TdxLayoutAlignmentConstraint.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxLayoutAlignmentConstraint.GetItem(Index: Integer): TdxCustomLayoutItem; -begin - Result := FItems[Index]; -end; - -procedure TdxLayoutAlignmentConstraint.SetKind(Value: TdxLayoutAlignmentConstraintKind); -begin - if FKind <> Value then - begin - FKind := Value; - Changed; - end; -end; - -procedure TdxLayoutAlignmentConstraint.CreateItems; -begin - FItems := TList.Create; -end; - -procedure TdxLayoutAlignmentConstraint.DestroyItems; -var - I: Integer; -begin - BeginUpdate; - try - for I := Count - 1 downto 0 do - RemoveItem(Items[I]); - finally - EndUpdate; - end; - FreeAndNil(FItems); -end; - -procedure TdxLayoutAlignmentConstraint.InternalAddItem(AItem: TdxCustomLayoutItem); -begin - FItems.Add(AItem); -end; - -procedure TdxLayoutAlignmentConstraint.InternalRemoveItem(AItem: TdxCustomLayoutItem); -begin - FItems.Remove(AItem); - if not (csDestroying in ComponentState) and (Count < 2) then - Free; -end; - -procedure TdxLayoutAlignmentConstraint.SetParentComponent(Value: TComponent); -begin - inherited; - if Value is TdxCustomLayoutControl then - TdxCustomLayoutControl(Value).AddAlignmentConstraint(Self); -end; - -procedure TdxLayoutAlignmentConstraint.BeginUpdate; -begin - FControl.BeginUpdate; -end; - -function TdxLayoutAlignmentConstraint.CanAddItem(AItem: TdxCustomLayoutItem): Boolean; -begin - Result := (AItem <> nil) and (AItem.Container = Control); -end; - -procedure TdxLayoutAlignmentConstraint.Changed; -begin - FControl.LayoutChanged; -end; - -procedure TdxLayoutAlignmentConstraint.EndUpdate; -begin - FControl.EndUpdate; -end; - -function TdxLayoutAlignmentConstraint.GetParentComponent: TComponent; -begin - Result := FControl; -end; - -function TdxLayoutAlignmentConstraint.HasParent: Boolean; -begin - Result := FControl <> nil; -end; - -procedure TdxLayoutAlignmentConstraint.AddItem(AItem: TdxCustomLayoutItem); -begin - if CanAddItem(AItem) then - AItem.AlignmentConstraint := Self; -end; - -procedure TdxLayoutAlignmentConstraint.RemoveItem(AItem: TdxCustomLayoutItem); -begin - if FItems.IndexOf(AItem) <> -1 then - AItem.AlignmentConstraint := nil; -end; - -{ TdxLayoutControlPersistent } - -constructor TdxLayoutControlPersistent.Create(AControl: TdxCustomLayoutControl); -begin - inherited Create; - FControl := AControl; -end; - -procedure TdxLayoutControlPersistent.Changed; -begin -end; - -function TdxLayoutControlPersistent.GetOwner: TPersistent; -begin - Result := FControl; -end; - -{ TdxLayoutImageOptions } - -constructor TdxLayoutImageOptions.Create(AControl: TdxCustomLayoutControl); -begin - inherited Create(AControl); - FNotifyComponent := TcxFreeNotificator.Create(nil); - FNotifyComponent.OnFreeNotification := FreeNotification; - - FDisabledImagesChangeLink := TChangeLink.Create; - FDisabledImagesChangeLink.OnChange := DisabledImagesChange; - FImagesChangeLink := TChangeLink.Create; - FImagesChangeLink.OnChange := ImagesChange; -end; - -destructor TdxLayoutImageOptions.Destroy; -begin - FreeAndNil(FImagesChangeLink); - FreeAndNIl(FDisabledImagesChangeLink); - - FreeAndNil(FNotifyComponent); - inherited Destroy; -end; - -procedure TdxLayoutImageOptions.Assign(Source: TPersistent); -begin - if Source is TdxLayoutImageOptions then - with Source as TdxLayoutImageOptions do - begin - Self.BeginUpdate; - try - Self.DisabledImages := DisabledImages; - Self.Images := Images; - finally - Self.EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -procedure TdxLayoutImageOptions.Changed; -begin - Control.LayoutChanged(False); -end; - -procedure TdxLayoutImageOptions.BeginUpdate; -begin - Control.BeginUpdate;; -end; - -procedure TdxLayoutImageOptions.EndUpdate; -begin - Control.CancelUpdate; - Changed; -end; - -procedure TdxLayoutImageOptions.SetImages(AValue: TCustomImageList); -begin - SetImageList(AValue, FImages, FImagesChangeLink); -end; - -procedure TdxLayoutImageOptions.SetDisabledImages(AValue: TCustomImageList); -begin - SetImageList(AValue, FDisabledImages, FDisabledImagesChangeLink); -end; - -procedure TdxLayoutImageOptions.DisabledImagesChange(Sender: TObject); -begin - Changed; -end; - -procedure TdxLayoutImageOptions.ImagesChange(Sender: TObject); -begin - Changed; -end; - -procedure TdxLayoutImageOptions.SetImageList(var ANewValue, AOldValue: TCustomImageList; const AChangeLink: TChangeLink); -begin - cxSetImageList(ANewValue, AOldValue, AChangeLink, FNotifyComponent); -end; - -procedure TdxLayoutImageOptions.FreeNotification(AComponent: TComponent); -begin - if AComponent = DisabledImages then DisabledImages := nil; - if AComponent = Images then Images := nil; -end; - -{ TdxUndoRedoManager } - -constructor TdxUndoRedoManager.Create(AControl: TdxCustomLayoutControl); -begin - inherited Create(AControl); - FUndoList := TcxObjectList.Create; -end; - -destructor TdxUndoRedoManager.Destroy; -begin - FreeAndNil(FUndoList); - FreeAndNil(FCurrentLayout); - inherited; -end; - -function TdxUndoRedoManager.CanRedo: Boolean; -begin - Result := RedoCount > 0; -end; - -function TdxUndoRedoManager.CanUndo: Boolean; -begin - Result := UndoCount > 0; -end; - -procedure TdxUndoRedoManager.Redo; -var - AIni: TMemIniFile; -begin - if CanRedo then - begin - Inc(FLockCount); - try - Inc(FIndex); - if FIndex = FUndoList.Count then - AIni := FCurrentLayout - else - AIni := TMemIniFile(FUndoList[FIndex]); - Control.InternalLoadFromCustomIniFile(AIni, True); - finally - Dec(FLockCount); - end; - end; -end; - -procedure TdxUndoRedoManager.Undo; -var - AIni: TMemIniFile; -begin - if CanUndo then - begin - if FCurrentLayout = nil then - begin - FCurrentLayout := TMemIniFile.Create(''); - Control.InternalSaveToCustomIniFile(FCurrentLayout); - end; - Inc(FLockCount); - try - Dec(FIndex); - AIni := TMemIniFile(FUndoList[FIndex]); - Control.InternalLoadFromCustomIniFile(AIni, True); - finally - Dec(FLockCount); - end; - end; -end; - -procedure TdxUndoRedoManager.SaveLayout; -var - AIni: TMemIniFile; -begin - if IsLocked then - Exit; - AIni := TMemIniFile.Create(''); - Control.InternalSaveToCustomIniFile(AIni); - AddUndo(AIni); -end; - -function TdxUndoRedoManager.IsLocked: Boolean; -begin - Result := FLockCount > 0; -end; - -procedure TdxUndoRedoManager.Clear; -begin - FUndoList.Clear; - FreeAndNil(FCurrentLayout); -end; - -procedure TdxUndoRedoManager.AddUndo(ALayout: TMemIniFile); -begin - while FIndex < FUndoList.Count do - FUndoList.Delete(FIndex); - FreeAndNil(FCurrentLayout); - FUndoList.Add(ALayout); - FIndex := FUndoList.Count; -end; - -function TdxUndoRedoManager.GetRedoCount: Integer; -begin - Result := FUndoList.Count - UndoCount; -end; - -function TdxUndoRedoManager.GetUndoCount: Integer; -begin - Result := FIndex; -end; - -{ TdxStoringOptions } - -procedure TdxStoringOptions.Assign(Source: TPersistent); -var - ASourceOptions: TdxStoringOptions; -begin - if Source is TdxStoringOptions then - begin - ASourceOptions := TdxStoringOptions(Source); - IniFileName := ASourceOptions.IniFileName; - RegistryPath := ASourceOptions.RegistryPath; - StoreToIniFile := ASourceOptions.StoreToIniFile; - StoreToRegistry := ASourceOptions.StoreToRegistry; - end - else - inherited; -end; - -function TdxStoringOptions.CanStoreToIniFile: Boolean; -begin - Result := StoreToIniFile and (IniFileName <> ''); -end; - -function TdxStoringOptions.CanStoreToRegistry: Boolean; -begin - Result := StoreToRegistry and (RegistryPath <> ''); -end; - -function TdxStoringOptions.CanRestoreFromIniFile: Boolean; -begin - Result := CanStoreToIniFile and FileExists(IniFileName); -end; - -function TdxStoringOptions.CanRestoreFromRegistry: Boolean; -var - ARegistry: TRegistry; -begin - Result := CanStoreToRegistry; - if Result then - begin - ARegistry := TRegistry.Create(KEY_ALL_ACCESS); - try - Result := ARegistry.OpenKey(RegistryPath, False); - ARegistry.CloseKey; - finally - ARegistry.Free; - end; - end; -end; - -{ TdxCustomLayoutControl } - -constructor TdxCustomLayoutControl.Create(AOwner: TComponent); -begin - inherited; - ControlStyle := ControlStyle + [csAcceptsControls, csOpaque]; -{$IFDEF DELPHI7} - ParentBackground := False; -{$ENDIF} -{ - with cxLookAndFeel do - begin - Kind := lfStandard; - NativeStyle := True; - end; -} - TabStop := False; - Width := 300; - Height := 250; - FOptionsImage := TdxLayoutImageOptions.Create(Self); - FAbsoluteItems := TcxComponentList.Create; - FAvailableItems := TcxComponentList.Create; - FAvailableItems.OnComponentListChanged := AvailableItemListChanged; - FOptionsStoring := TdxStoringOptions.Create; - FStoredStream := TMemoryStream.Create; - FUndoRedoManager := TdxUndoRedoManager.Create(Self); - - FAutoControlAlignment := True; - FAutoControlTabOrders := True; - FHighlightRoot := True; - FShowDesignSelectors := True; - FBoldFont := TFont.Create; - RefreshBoldFont; - FCustomizeFormClass := TdxLayoutControlCustomizeForm; - GetLayoutLookAndFeel.AddUser(Self); - InitializeSubControlsCxLookAndFeel; - CreateRootGroup; - //FGroups.UseIndent := False; - CreateConstraints; - - dxDesignCustomizationHelper.AddLayout(Self); - FSelectionHelper := GetSelectionHelperClass.Create(Self); - FSelectionHelper.AddSelectionChangedListener(Self); - FCustomizeAvailableItemsViewKind := oivkTree; -end; - -destructor TdxCustomLayoutControl.Destroy; -begin - FSelectionHelper.RemoveSelectionChangedListener(Self); - dxDesignCustomizationHelper.RemoveLayout(Self); - Customization := False; - FSelectionHelper := nil; - if not IsDesigning then - Store; - SetRootGroup(nil); - LayoutLookAndFeel := nil; - GetLayoutLookAndFeel.RemoveUser(Self); - DestroyConstraints; - dxLayoutTextMetrics.Unregister(FBoldFont); - dxLayoutTextMetrics.Unregister(Font); - FreeAndNil(FBoldFont); - - FreeAndNil(FUndoRedoManager); - FreeAndNil(FStoredStream); - FreeAndNil(FOptionsStoring); - FAvailableItems.OwnsObjects := True; - FreeAndNil(FAvailableItems); - FreeAndNil(FAbsoluteItems); - FreeAndNil(FOptionsImage); - inherited; -end; - -procedure TdxCustomLayoutControl.BeginDragAndDrop; -begin - DragAndDropState := ddsInProcess; - inherited; -end; - -function TdxCustomLayoutControl.GetAbsoluteItem(Index: Integer): TdxCustomLayoutItem; -begin - Result := TdxCustomLayoutItem(FAbsoluteItems[Index]); -end; - -function TdxCustomLayoutControl.GetAbsoluteItemCount: Integer; -begin - Result := FAbsoluteItems.Count; -end; - -function TdxCustomLayoutControl.GetAlignmentConstraint(Index: Integer): TdxLayoutAlignmentConstraint; -begin - Result := FAlignmentConstraints[Index]; -end; - -function TdxCustomLayoutControl.GetAlignmentConstraintCount: Integer; -begin - Result := FAlignmentConstraints.Count; -end; - -function TdxCustomLayoutControl.GetAllowDrop: Boolean; -begin - Result := IsDesigning; -end; - -function TdxCustomLayoutControl.GetAvailableItem(Index: Integer): TdxCustomLayoutItem; -begin - Result := TdxCustomLayoutItem(FAvailableItems[Index]); -end; - -function TdxCustomLayoutControl.GetAvailableItemCount: Integer; -begin - Result := FAvailableItems.Count; -end; - -function TdxCustomLayoutControl.GetContentBounds: TRect; -begin - Result := ViewInfo.ContentBounds; -end; - -function TdxCustomLayoutControl.GetIsLayoutLoading: Boolean; -begin - Result := FLoadingCount > 0; -end; - -function TdxCustomLayoutControl.GetOccupiedClientWidth: Integer; -begin - Result := ViewInfo.ItemsViewInfo.CalculateWidth; -end; - -function TdxCustomLayoutControl.GetOccupiedClientHeight: Integer; -begin - Result := ViewInfo.ItemsViewInfo.CalculateHeight; -end; - -function TdxCustomLayoutControl.GetLayoutDirection: TdxLayoutDirection; -begin - Result := FRootGroup.LayoutDirection; -end; - -function TdxCustomLayoutControl.GetAutoContentSizes: TdxLayoutAutoContentSizes; -begin - Result := TdxLayoutAutoContentSizes(FRootGroup.AutoAligns); -end; - -procedure TdxCustomLayoutControl.SetAutoContentSizes(Value: TdxLayoutAutoContentSizes); -begin - FRootGroup.AutoAligns := TdxLayoutAutoAligns(Value); -end; - -procedure TdxCustomLayoutControl.SetAutoControlAlignment(Value: Boolean); -begin - if FAutoControlAlignment <> Value then - begin - FAutoControlAlignment := Value; - LayoutChanged; - end; -end; - -procedure TdxCustomLayoutControl.SetAutoControlTabOrders(Value: Boolean); -begin - if FAutoControlTabOrders <> Value then - begin - FAutoControlTabOrders := Value; - LayoutChanged; - end; -end; - -procedure TdxCustomLayoutControl.SetCustomization(Value: Boolean); -var - AParentForm: TCustomForm; -begin - if (FCustomization <> Value) and (not Value or HandleAllocated) then - begin - if Value then - begin - if not IsDestroying and not IsDesigning and IsChildWindow(Self, GetFocus) then - begin - AParentForm := GetParentForm(Self); - if (AParentForm <> nil) and Visible then - AParentForm.ActiveControl := Self; - end; - FCustomizeForm := CustomizeFormClass.Create(nil); - FCustomizeForm.Control := Self; - FCustomization := True; - CustomizeFormUpdate([cfutContent, cfutSelection, cfutView]); - FCustomizeForm.Show; - end - else - begin - FCustomization := False; - with FCustomizeForm do - if not (csDestroying in ComponentState) then - Free; - if not IsDesigning then - FSelectionHelper.ClearSelection; - if not IsDesigning then - FSelectionHelper.ClearSelection; - end; - DoCustomization; - end - else - if FCustomization and HandleAllocated then - FCustomizeForm.BringToFront; -end; - -procedure TdxCustomLayoutControl.SetCustomizeAvailableItemsViewKind(Value: TdxLayoutAvailableItemsViewKind); -begin - if FCustomizeAvailableItemsViewKind <> Value then - begin - FCustomizeAvailableItemsViewKind := Value; - CustomizeFormUpdate([cfutContent, cfutSelection, cfutView]); - end; -end; - -procedure TdxCustomLayoutControl.SetCustomizeFormTabbedView(Value: Boolean); -begin - if FCustomizeFormTabbedView <> Value then - begin - FCustomizeFormTabbedView := Value; - CustomizeFormUpdate([cfutView]); - end; -end; - -procedure TdxCustomLayoutControl.SetShowDesignSelectors(Value: Boolean); -begin - if FShowDesignSelectors <> Value then - begin - FShowDesignSelectors := Value; - InvalidateWithChildren; - CustomizeFormUpdate([cfutView]); - end; -end; - -procedure TdxCustomLayoutControl.SetHighlightRoot(Value: Boolean); -begin - if FHighlightRoot <> Value then - begin - FHighlightRoot := Value; - LayoutChanged(False); - CustomizeFormUpdate([cfutView]); - end; -end; - -procedure TdxCustomLayoutControl.SetIsPlaceControlsNeeded(Value: Boolean); -begin - if FIsPlaceControlsNeeded <> Value then - begin - FIsPlaceControlsNeeded := Value; - if Value then - PlaceControls(nil); - end; -end; - -procedure TdxCustomLayoutControl.SetOptionsImage(Value: TdxLayoutImageOptions); -begin - FOptionsImage.Assign(Value); -end; - -procedure TdxCustomLayoutControl.SetRootGroup(Value: TdxLayoutGroup); -begin - ItemWithMouse := nil; - DestroyHandlers; - if Value <> nil then - begin - if FRootGroup <> nil then - begin - Value.FAlignHorz := FRootGroup.AlignHorz; - Value.FAlignVert := FRootGroup.AlignVert; - end - else - begin - Value.FAlignHorz := ahLeft; - Value.FAlignVert := avTop; - end; - end; - if IsDestroying or ((FRootGroup <> nil) and not FRootGroup.IsDestroying) then - FRootGroup.Free; - FRootGroup := Value; - if Value = nil then Exit; - FRootGroup.Container := Self; - CreateHandlers; - FRootGroup.Hidden := True; -end; - -procedure TdxCustomLayoutControl.SetItemWithMouse(Value: TdxCustomLayoutItem); -begin - if FItemWithMouse <> Value then - begin - if FItemWithMouse <> nil then - FItemWithMouse.MouseLeave; - FItemWithMouse := Value; - if FItemWithMouse <> nil then - FItemWithMouse.MouseEnter; - end; -end; - -procedure TdxCustomLayoutControl.SetLayoutDirection(Value: TdxLayoutDirection); -begin - FRootGroup.LayoutDirection := Value; -end; - -procedure TdxCustomLayoutControl.SetLeftPos(Value: Integer); -var - APrevLeftPos: Integer; -begin - CheckLeftPos(Value); - if FLeftPos <> Value then - begin - Update; - APrevLeftPos := FLeftPos; - FLeftPos := Value; - LayoutChanged; - ScrollContent(APrevLeftPos, FLeftPos, True); - end; -end; - -procedure TdxCustomLayoutControl.SetLayoutLookAndFeel(Value: TdxCustomLayoutLookAndFeel); -begin - if FLayoutLookAndFeel <> Value then - begin - GetLayoutLookAndFeel.RemoveUser(Self); - FLayoutLookAndFeel := Value; - GetLayoutLookAndFeel.AddUser(Self); - LayoutLookAndFeelUserChanged; - end; -end; - -procedure TdxCustomLayoutControl.SetShowHiddenGroupsBounds(Value: Boolean); -begin - if FShowHiddenGroupsBounds <> Value then - begin - FShowHiddenGroupsBounds := Value; - LayoutChanged; - end; -end; - -procedure TdxCustomLayoutControl.SetTopPos(Value: Integer); -var - APrevTopPos: Integer; -begin - CheckTopPos(Value); - if FTopPos <> Value then - begin - Update; - APrevTopPos := FTopPos; - FTopPos := Value; - LayoutChanged; - ScrollContent(APrevTopPos, FTopPos, False); - end; -end; - -function TdxCustomLayoutControl.GetIniFileName: string; -begin - Result := OptionsStoring.IniFileName; -end; - -function TdxCustomLayoutControl.GetRegistryPath: string; -begin - Result := OptionsStoring.RegistryPath; -end; - -function TdxCustomLayoutControl.GetStoreInIniFile: Boolean; -begin - Result := OptionsStoring.StoreToIniFile; -end; - -function TdxCustomLayoutControl.GetStoreInRegistry: Boolean; -begin - Result := OptionsStoring.StoreToRegistry; -end; - -procedure TdxCustomLayoutControl.SetIniFileName(const Value: string); -begin - OptionsStoring.IniFileName := Value; -end; - -procedure TdxCustomLayoutControl.SetRegistryPath(const Value: string); -begin - OptionsStoring.RegistryPath := Value; -end; - -procedure TdxCustomLayoutControl.SetStoreInIniFile(const Value: Boolean); -begin - OptionsStoring.StoreToIniFile := Value; -end; - -procedure TdxCustomLayoutControl.SetStoreInRegistry(const Value: Boolean); -begin - OptionsStoring.StoreToRegistry := Value; -end; - -procedure TdxCustomLayoutControl.SetOptionsStoring(Value: TdxStoringOptions); -begin - FOptionsStoring.Assign(Value); -end; - -procedure TdxCustomLayoutControl.CreateHandlers; -begin - FPainter := GetPainterClass.Create(Self); - FViewInfo := GetViewInfoClass.Create(Self); -end; - -procedure TdxCustomLayoutControl.DestroyHandlers; -begin - FreeAndNil(FViewInfo); - FreeAndNil(FPainter); -end; - -procedure TdxCustomLayoutControl.CreateConstraints; -begin - FAlignmentConstraints := TList.Create; -end; - -procedure TdxCustomLayoutControl.DestroyConstraints; -var - I: Integer; -begin - for I := AlignmentConstraintCount - 1 downto 0 do - AlignmentConstraints[I].Free; - FreeAndNil(FAlignmentConstraints); -end; - -procedure TdxCustomLayoutControl.AddAlignmentConstraint(AConstraint: TdxLayoutAlignmentConstraint); -begin - FAlignmentConstraints.Add(AConstraint); - AConstraint.FControl := Self; - SetComponentName(AConstraint, Name + 'AlignmentConstraint', IsDesigning, IsLoading); -end; - -procedure TdxCustomLayoutControl.RemoveAlignmentConstraint(AConstraint: TdxLayoutAlignmentConstraint); -begin - FAlignmentConstraints.Remove(AConstraint); - AConstraint.FControl := nil; -end; - -procedure TdxCustomLayoutControl.RefreshBoldFont; -begin - FBoldFont.Assign(Font); - with FBoldFont do - Style := Style + [fsBold]; - dxLayoutTextMetrics.Unregister(FBoldFont); -end; - -procedure TdxCustomLayoutControl.InitializeSubControlsCxLookAndFeel; -begin - GetLayoutLookAndFeel.InitializeSubControlCxLookAndFeel(HScrollBar.LookAndFeel); - GetLayoutLookAndFeel.InitializeSubControlCxLookAndFeel(VScrollBar.LookAndFeel); - GetLayoutLookAndFeel.InitializeSubControlCxLookAndFeel(SizeGrip.LookAndFeel); -end; - -procedure TdxCustomLayoutControl.PlaceControls(AItemViewInfo: TdxCustomLayoutItemViewInfo); -begin - if AItemViewInfo <> nil then - begin - IsPlaceControlsNeeded := False; - Painter.PlaceControls(AItemViewInfo); - end - else - if TdxCustomLayoutLookAndFeelAccess(GetLayoutLookAndFeel).ForceControlArrangement then - SendMessage(Handle, DXM_PLACECONTROLS, 0, 0) - else - PostMessage(Handle, DXM_PLACECONTROLS, 0, 0); -end; - -procedure TdxCustomLayoutControl.AddAbsoluteItem(AItem: TdxCustomLayoutItem); -begin - FAbsoluteItems.Add(AItem); -end; - -procedure TdxCustomLayoutControl.ExtractAbsoluteItem(AItem: TdxCustomLayoutItem); -begin - FAbsoluteItems.Extract(AItem); -end; - -procedure TdxCustomLayoutControl.AddAvailableItem(AItem: TdxCustomLayoutItem); -begin - FAvailableItems.Add(AItem); - AItem.Container := Self; -end; - -procedure TdxCustomLayoutControl.ExtractAvailableItem(AItem: TdxCustomLayoutItem); -begin - FAvailableItems.Extract(AItem); -end; - -procedure TdxCustomLayoutControl.WMNCDestroy(var Message: TWMNCDestroy); -begin - IsPlaceControlsNeeded := False; - inherited; -end; - -{$IFNDEF DELPHI7} -procedure TdxCustomLayoutControl.WMPrintClient(var Message: TWMPrintClient); -begin - with Message do - if Result <> 1 then - if ((Flags and PRF_CHECKVISIBLE) = 0) or Visible then - PaintHandler(TWMPaint(Message)) - else - inherited - else - inherited; -end; -{$ENDIF} - -procedure TdxCustomLayoutControl.CMControlChange(var Message: TCMControlChange); -var - AControl: TControl; - P: TPoint; - AGroup: TdxLayoutGroup; - AIndex: Integer; -begin - inherited; - if not (IsLoading or IsDestroying) then - begin - AControl := Message.Control; - if Message.Inserting then - begin - if (csAncestor in AControl.ComponentState) or - IsInternalControl(AControl) or (FindItem(AControl) <> nil) then - Exit; - P := AControl.BoundsRect.TopLeft; - AGroup := ViewInfo.GetHitTest(P).GetGroupForInsert; - if AGroup = nil then - AGroup := Items; - CustomizeFormBeginUpdate; - try - AIndex := AGroup.ViewInfo.GetInsertionPos(P); - AGroup.CreateItemForControl(AControl).VisibleIndex := AIndex; - finally - CustomizeFormEndUpdate; - end; - end -// #DG else -// #DG FindItem(AControl).Free; - end; -end; - -procedure TdxCustomLayoutControl.CMDialogChar(var Message: TCMDialogChar); -begin - if FRootGroup.ProcessDialogChar(Message.CharCode) then - Message.Result := 1 - else - inherited; -end; - -{ -procedure TdxCustomLayoutControl.CMFreeItem(var Message: TMessage); -begin - TObject(Message.WParam).Free; -end; -} -procedure TdxCustomLayoutControl.DXMPlaceControls(var Message: TMessage); -begin - IsPlaceControlsNeeded := False; - Painter.PlaceControls(ViewInfo.ItemsViewInfo); -end; - -procedure TdxCustomLayoutControl.DXMBuildSelectionLayer(var Message: TMessage); -begin - if not IsUpdateLocked and (ViewInfo <> nil) then - ViewInfo.BuildSelectionLayer; -end; - -procedure TdxCustomLayoutControl.DXMInvalidateSelectionLayer(var Message: TMessage); -var - R: TRect; -begin - with Message do - R := Rect(WParamLo, WParamHi, LParamLo, LParamHi); - InvalidateSelectionLayer(R); -end; - -function TdxCustomLayoutControl.CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; -begin - if IsDesigning then - Result := False - else - begin - Result := True; - if (ViewInfo.ItemsViewInfo.AlignHorz <> ahClient) and (Align in [alNone, alLeft, alRight]) then - NewWidth := cxRectWidth(ContentBounds); - if (ViewInfo.ItemsViewInfo.AlignVert <> avClient) and (Align in [alNone, alTop, alBottom]) then - NewHeight := cxRectHeight(ContentBounds); - end; -end; - -procedure TdxCustomLayoutControl.AlignControls(AControl: TControl; var Rect: TRect); -begin -end; - -function TdxCustomLayoutControl.AllowAutoDragAndDropAtDesignTime(X, Y: Integer; - Shift: TShiftState): Boolean; -begin - Result := not GetDesignHitTest(X, Y, Shift); -end; - -function TdxCustomLayoutControl.AllowDragAndDropWithoutFocus: Boolean; -begin - Result := FCustomization; -end; - -procedure TdxCustomLayoutControl.BoundsChanged; -begin - LayoutChanged(False); - inherited; -end; - -function TdxCustomLayoutControl.CanDrag(X, Y: Integer): Boolean; -begin - Result := inherited CanDrag(X, Y) and not IsDesigning; -end; - -function TdxCustomLayoutControl.CanFocusOnClick(X, Y: Integer): Boolean; -begin - Result := inherited CanFocusOnClick(X, Y) and not IsCustomization; - if ItemWithMouse <> nil then - Result := Result and not ItemWithMouse.CanFocusOnClick(X, Y); -end; - -procedure TdxCustomLayoutControl.CreateParams(var Params: TCreateParams); -begin - inherited; - with Params do - WindowClass.style := WindowClass.style and not (CS_HREDRAW or CS_VREDRAW); -end; - -procedure TdxCustomLayoutControl.DblClick; -begin - inherited; - if IsDesigning then - Customization := True; -end; - -procedure TdxCustomLayoutControl.FontChanged; -begin - inherited; - dxLayoutTextMetrics.Unregister(Font); - RefreshBoldFont; - LayoutLookAndFeelUserChanged; -end; - -procedure TdxCustomLayoutControl.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - I: Integer; -begin - inherited; - if Owner = Root then - begin - Proc(FRootGroup); - for I := 0 to AvailableItemCount - 1 do - Proc(AvailableItems[I]); - for I := 0 to AlignmentConstraintCount - 1 do - Proc(AlignmentConstraints[I]); - end; -end; - -function TdxCustomLayoutControl.GetCursor(X, Y: Integer): TCursor; -var - AHitTest: TdxCustomLayoutHitTest; -begin - Result := crDefault; - if DragAndDropState = ddsNone then - begin - AHitTest := ViewInfo.GetHitTest(X, Y); - if AHitTest.HitItem <> nil then - Result := AHitTest.HitItem.GetCursor(X, Y); - if Result = crDefault then - Result := inherited GetCursor(X, Y); - end; -end; - -function TdxCustomLayoutControl.GetDesignHitTest(X, Y: Integer; Shift: TShiftState): Boolean; - - function IsGrabHandle(AHandle: THandle): Boolean; - const - GrabHandleClassName = 'TGrabHandle'; - begin - Result := cxGetClassName(AHandle) = GrabHandleClassName; - end; - -var - AHitTest: TdxCustomLayoutHitTest; -begin - Result := inherited GetDesignHitTest(X, Y, Shift); - if not Result then - begin - AHitTest := ViewInfo.GetHitTest(X, Y); - Result := not (ssRight in Shift) and not FRightButtonPressed and - (AHitTest is TdxCustomLayoutItemHitTest) and - not IsToolSelected and not IsGrabHandle(cxWindowFromPoint(ClientToScreen(Point(X, Y)))); - end; - FRightButtonPressed := ssRight in Shift; -end; - -function TdxCustomLayoutControl.HasBackground: Boolean; -begin - Result := {$IFDEF DELPHI7}ThemeServices.ThemesEnabled and ParentBackground{$ELSE}inherited HasBackground{$ENDIF}; -end; - -function TdxCustomLayoutControl.IsInternalControl(AControl: TControl): Boolean; -begin - Result := inherited IsInternalControl(AControl) or (AControl is TdxLayoutTabbedGroupTabControl); -end; - -function TdxCustomLayoutControl.NeedRedrawOnResize: Boolean; -begin - Result := ViewInfo.LayoutLookAndFeel.NeedRedrawOnResize; -end; - -procedure TdxCustomLayoutControl.Loaded; -begin - inherited; - if not IsDesigning then - Restore; - LayoutChanged(False); -end; - -procedure TdxCustomLayoutControl.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - AssignItemWithMouse(X, Y); - inherited; - if ItemWithMouse <> nil then - ItemWithMouse.MouseDown(Button, Shift, X, Y); -end; - -procedure TdxCustomLayoutControl.MouseLeave(AControl: TControl); -begin - inherited; - ItemWithMouse := nil; -end; - -procedure TdxCustomLayoutControl.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - AssignItemWithMouse(X, Y); - if ItemWithMouse <> nil then - ItemWithMouse.MouseMove(Shift, X, Y); - inherited; -end; - -procedure TdxCustomLayoutControl.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited; - AssignItemWithMouse(X, Y); - if ItemWithMouse <> nil then - ItemWithMouse.MouseUp(Button, Shift, X, Y); -end; - -procedure TdxCustomLayoutControl.Paint; -begin - if not IsUpdateLocked then - begin - inherited; - Painter.Paint; - end; -end; - -procedure TdxCustomLayoutControl.SetName(const Value: TComponentName); - - function GetItem(ACaller: TComponent; Index: Integer): TComponent; - begin - if Index = 0 then - Result := TdxCustomLayoutControl(ACaller).Items - else - Result := TdxCustomLayoutControl(ACaller).AbsoluteItems[Index - 1]; - end; - - function GetAlignmentConstraint(ACaller: TComponent; Index: Integer): TComponent; - begin - Result := TdxCustomLayoutControl(ACaller).AlignmentConstraints[Index]; - end; - -var - AOldName: string; -begin - AOldName := Name; - inherited; - RenameComponents(Self, Owner, Name, AOldName, 1 + AbsoluteItemCount, @GetItem); - RenameComponents(Self, Owner, Name, AOldName, AlignmentConstraintCount, @GetAlignmentConstraint); - CustomizeFormUpdate([cfutCaption, cfutContent, cfutSelection]); -end; - -{$IFDEF DELPHI7} -procedure TdxCustomLayoutControl.SetParentBackground(Value: Boolean); -begin - if Value then - ControlStyle := ControlStyle - [csOpaque] - else - ControlStyle := ControlStyle + [csOpaque]; - inherited; -end; -{$ENDIF} - -procedure TdxCustomLayoutControl.WriteState(Writer: TWriter); -begin - if HandleAllocated then - SendMessage(Handle, WM_SETREDRAW, 0, 0); - try - Items.RestoreItemControlSize; - inherited; - finally - if HandleAllocated then - SendMessage(Handle, WM_SETREDRAW, 1, 0); - LayoutChanged; - end; -end; - -procedure TdxCustomLayoutControl.WndProc(var Message: TMessage); - - function PtInDesignSelectorRect(const P: TPoint): Boolean; - var - AControl: TControl; - AHitTest: TdxCustomLayoutHitTest; - begin - Result := False; - AControl := ControlAtPos(P, True); - if (AControl <> nil) and not (AControl is TWinControl) then - begin - AHitTest := ViewInfo.GetHitTest(P); - Result := (AHitTest <> nil) and - (AHitTest is TdxLayoutItemHitTest) and - (AHitTest as TdxLayoutItemHitTest).HitItem.ViewInfo.PtInDesignSelectorRect(P); - end; - end; - -begin - if (IsDesigning or Customization) and HandleAllocated then - case Message.Msg of - WM_LBUTTONDOWN: - if (GetCapture <> Handle) and (Customization or PtInDesignSelectorRect(SmallPointToPoint(TWMMouse(Message).Pos))) then - SetCaptureControl(Self); - end; - inherited WndProc(Message); -end; - -procedure TdxCustomLayoutControl.InitScrollBarsParameters; -begin - inherited; - SetScrollBarInfo(sbHorizontal, 0, ViewInfo.ContentWidth - 1, - ScrollStep, ViewInfo.ClientWidth, LeftPos, True, True); - SetScrollBarInfo(sbVertical, 0, ViewInfo.ContentHeight - 1, - ScrollStep, ViewInfo.ClientHeight, TopPos, True, True); -end; - -function TdxCustomLayoutControl.NeedsToBringInternalControlsToFront: Boolean; -begin - Result := True; -end; - -procedure TdxCustomLayoutControl.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); - - function GetContentPos: Integer; - begin - if AScrollBarKind = sbHorizontal then - Result := LeftPos - else - Result := TopPos; - end; - - procedure SetContentPos(Value: Integer); - begin - if AScrollBarKind = sbHorizontal then - LeftPos := Value - else - TopPos := Value; - end; - - function GetPageScrollStep: Integer; - begin - if AScrollBarKind = sbHorizontal then - Result := ClientWidth - else - Result := ClientHeight; - end; - -begin - inherited; - case AScrollCode of - scLineUp: - SetContentPos(GetContentPos - ScrollStep); - scLineDown: - SetContentPos(GetContentPos + ScrollStep); - scPageUp: - SetContentPos(GetContentPos - GetPageScrollStep); - scPageDown: - SetContentPos(GetContentPos + GetPageScrollStep); - scTrack: - SetContentPos(AScrollPos); - end; - AScrollPos := GetContentPos; -end; - -function TdxCustomLayoutControl.CanDragAndDrop: Boolean; -begin - Result := not IsDesigning or not (csInline in Owner.ComponentState); -end; - -function TdxCustomLayoutControl.GetDragAndDropObjectClass: TcxDragAndDropObjectClass; -begin - Result := TdxLayoutControlDragAndDropObject; -end; - -function TdxCustomLayoutControl.StartDragAndDrop(const P: TPoint): Boolean; -var - AHitTest: TdxCustomLayoutHitTest; - AItem: TdxCustomLayoutItem; -begin - Result := False; - if IsCustomization and CanDragAndDrop then - begin - AHitTest := ViewInfo.GetHitTest(P); - AItem := AHitTest.GetSourceItem; - if (AItem <> nil) and AItem.CanDragAndDrop then - begin - (DragAndDropObject as TdxLayoutControlDragAndDropObject).Init(dsControl, AItem); - Result := True; - end; - end; -end; - -function TdxCustomLayoutControl.GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; -begin - Result := FLayoutLookAndFeel; - if Result = nil then - Result := dxLayoutDefaultLookAndFeel; -end; - -function TdxCustomLayoutControl.GetCxLookAndFeel: TcxLookAndFeel; -begin - Result := inherited LookAndFeel; -end; - -procedure TdxCustomLayoutControl.BeginLayoutLookAndFeelUserDestroying; -begin - BeginUpdate; -end; - -procedure TdxCustomLayoutControl.EndLayoutLookAndFeelUserDestroying; -begin - EndUpdate; -end; - -procedure TdxCustomLayoutControl.LayoutLookAndFeelUserChanged; -begin - if (LayoutLookAndFeel <> nil) and not DoubleBuffered then - DoubleBuffered := LayoutLookAndFeel.NeedDoubleBuffered; - if (FRootGroup <> nil) and (GetLayoutLookAndFeel <> nil) then - FRootGroup.LayoutLookAndFeelUserChanged; - InitializeSubControlsCxLookAndFeel; - InvalidateControl(Self, True, True); - CustomizeFormUpdate([cfutView]); -end; - -procedure TdxCustomLayoutControl.LayoutLookAndFeelUserDestroyed; -begin - LayoutLookAndFeel := nil; -end; - -procedure TdxCustomLayoutControl.SelectionChanged; -begin - Items.SelectionChanged; -end; - -function TdxCustomLayoutControl.CanProcessChildren: Boolean; -begin - Result := True; -end; - -function TdxCustomLayoutControl.GetPainterClass: TdxLayoutControlPainterClass; -begin - Result := TdxLayoutControlPainter; -end; - -function TdxCustomLayoutControl.GetViewInfoClass: TdxLayoutControlViewInfoClass; -begin - Result := TdxLayoutControlViewInfo; -end; - -procedure TdxCustomLayoutControl.AssignItemWithMouse(X, Y: Integer); -begin - ItemWithMouse := ViewInfo.GetItemWithMouse(Point(X, Y)); -end; - -procedure TdxCustomLayoutControl.AvailableItemListChanged(Sender: TObject; AComponent: TComponent; AAction: TcxComponentCollectionNotification); -begin - CustomizeFormUpdate([cfutContent, cfutSelection]); -end; - -function TdxCustomLayoutControl.CalculateCustomizeFormBounds(const AFormBounds: TRect): TRect; -var - AControlBounds, ADesktopBounds: TRect; -begin - AControlBounds := BoundsRect; - MapWindowPoints(Parent.Handle, 0, AControlBounds, 2); - ADesktopBounds := GetDesktopWorkArea(AControlBounds.TopLeft); - - Result := AFormBounds; - with AControlBounds do - begin - if (ADesktopBounds.Right - Right >= Result.Right - Result.Left) or - (ADesktopBounds.Right - Right >= Left - ADesktopBounds.Left) then - OffsetRect(Result, Right - Result.Left, 0) - else - OffsetRect(Result, Left - Result.Right, 0); - OffsetRect(Result, 0, - (Top + Bottom - (Result.Bottom - Result.Top)) div 2 - Result.Top); - end; - with ADesktopBounds do - begin - if Result.Left < Left then - OffsetRect(Result, Left - Result.Left, 0); - if Result.Right > Right then - OffsetRect(Result, Right - Result.Right, 0); - if Result.Top < Top then - OffsetRect(Result, 0, Top - Result.Top); - end; -end; - -function TdxCustomLayoutControl.CanMultiSelect: Boolean; -begin - Result := True; -end; - -function TdxCustomLayoutControl.CanShowSelection: Boolean; -begin - Result := {$IFDEF DELPHI6}True{$ELSE}CanMultiSelect{$ENDIF}; -end; - -function TdxCustomLayoutControl.GetSelectionHelperClass: TdxLayoutRunTimeSelectionHelperClass; -begin - if IsDesigning then - Result := dxLayoutDesignTimeSelectionHelperClass - else - Result := dxLayoutRunTimeSelectionHelperClass; -end; - -procedure TdxCustomLayoutControl.InvalidateSelectionLayer(const R: TRect); -begin - if (ViewInfo <> nil) and (ViewInfo.SelectionLayer <> nil) then - ViewInfo.SelectionLayer.InvalidateRect(R); -end; - -procedure TdxCustomLayoutControl.PostBuildSelectionLayer; -begin - if HandleAllocated then - PostMessage(Handle, DXM_BUILDSELECTIONLAYER, 0, 0); -end; - -procedure TdxCustomLayoutControl.PostInvalidateSelectionLayer(const R: TRect); -begin - if HandleAllocated then - with R do - PostMessage(Handle, DXM_INVALIDATESELECTIONLAYER, MakeWParam(Left, Top), MakeLParam(Right, Bottom)); -end; - -procedure TdxCustomLayoutControl.CheckLeftPos(var Value: Integer); -begin - Value := Max(Min(Value, ViewInfo.ContentWidth - ViewInfo.ClientWidth), 0); -end; - -procedure TdxCustomLayoutControl.CheckPositions; -begin - LeftPos := LeftPos; - TopPos := TopPos; -end; - -procedure TdxCustomLayoutControl.CheckTopPos(var Value: Integer); -begin - Value := Max(Min(Value, ViewInfo.ContentHeight - ViewInfo.ClientHeight), 0); -end; - -procedure TdxCustomLayoutControl.CustomizeFormBeginUpdate; -begin - Inc(FCustomizeFormUpdateLockCount); -end; - -procedure TdxCustomLayoutControl.CustomizeFormCancelUpdate; -begin - Dec(FCustomizeFormUpdateLockCount); -end; - -procedure TdxCustomLayoutControl.CustomizeFormEndUpdate; -begin - Dec(FCustomizeFormUpdateLockCount); - CustomizeFormUpdate([cfutCaption, cfutContent, cfutSelection, cfutView]); -end; - -procedure TdxCustomLayoutControl.CustomizeFormUpdate( - AUpdateTypes: TdxLayoutCustomizeFormUpdateTypes); -begin - if not Customization or IsUpdateLocked or (FCustomizeFormUpdateLockCount <> 0) or - (csDestroying in FCustomizeForm.ComponentState) then - Exit; - if cfutCaption in AUpdateTypes then - CustomizeForm.UpdateCaption; - if cfutContent in AUpdateTypes then - CustomizeForm.UpdateContent; - if cfutSelection in AUpdateTypes then - CustomizeForm.UpdateSelection; - if cfutView in AUpdateTypes then - CustomizeForm.UpdateView; -end; - -procedure TdxCustomLayoutControl.DoCustomization; -begin - CallNotify(FOnCustomization, Self); - if not IsDestroying then - Items.CustomizationChanged; -end; - -procedure TdxCustomLayoutControl.DragAndDropBegan; -begin -// todo: remove -end; - -function TdxCustomLayoutControl.GetAlignmentConstraintClass: TdxLayoutAlignmentConstraintClass; -begin - Result := TdxLayoutAlignmentConstraint; -end; - -function TdxCustomLayoutControl.GetDefaultGroupClass: TdxLayoutGroupClass; -begin - Result := TdxLayoutGroup; -end; - -function TdxCustomLayoutControl.GetDefaultItemClass: TdxLayoutItemClass; -begin - Result := TdxLayoutItem; -end; - -function TdxCustomLayoutControl.GetDesignSelectorRect: TRect; -const - Offset = 3; - Width = 16; -begin - with ClientBounds do - Result := Rect(Right - Width - Offset, Bottom - Width - Offset, Right - Offset, Bottom - Offset); -end; - -function TdxCustomLayoutControl.IsCustomization: Boolean; -begin - Result := Customization or IsDesigning; -end; - -function TdxCustomLayoutControl.IsToolSelected: Boolean; -begin - Result := IsDesigning and (dxLayoutDesignTimeHelper <> nil) and - dxLayoutDesignTimeHelper.IsToolSelected; -end; - -function TdxCustomLayoutControl.IsUpdateLocked: Boolean; -begin - Result := FUpdateLockCount <> 0; -end; - -procedure TdxCustomLayoutControl.LayoutChanged(ANeedPack: Boolean = True); - - procedure BeforeCalculateViewInfo; - var - I: Integer; - begin - Items.BeforeCalculateViewInfo; - for I := 0 to AvailableItemCount - 1 do - AvailableItems[I].BeforeCalculateViewInfo; - end; - - procedure AfterCalculateViewInfo; - var - I: Integer; - begin - Items.AfterCalculateViewInfo; - for I := 0 to AvailableItemCount - 1 do - AvailableItems[I].AfterCalculateViewInfo; - end; - -begin - if not IsDestroying and not IsLoading and not IsUpdateLocked then - begin - BeginUpdate; - try - if ANeedPack then - Items.Pack; - BeforeCalculateViewInfo; - ViewInfo.Calculate; - AfterCalculateViewInfo; - finally - CancelUpdate; - end; - if ANeedPack then - CustomizeFormUpdate([cfutContent, cfutSelection]); - - AdjustSize; - {$IFDEF DELPHI12} - TControlAccess(Parent).AdjustSize; // bug in D12 - {$ENDIF} - UpdateScrollBars; - Invalidate; - PostBuildSelectionLayer; - end; -end; - -procedure TdxCustomLayoutControl.CreateRootGroup; -begin - SetRootGroup(GetDefaultGroupClass.Create(Owner{nil})); -end; - -{procedure TdxCustomLayoutControl.PostFree(AObject: TObject); -begin - if HandleAllocated then - PostMessage(Handle, CM_FREEITEM, WParam(AObject), 0); -end;} - -procedure TdxCustomLayoutControl.ScrollContent(APrevPos, ACurPos: Integer; - AHorzScrolling: Boolean); -var - ADelta: Integer; - AScrollBounds: TRect; -begin - if not HandleAllocated then Exit; - ADelta := -(ACurPos - APrevPos); - AScrollBounds := ViewInfo.ClientBounds; - //ValidateRect(Handle, @AScrollBounds); - ScrollWindowEx(Handle, Ord(AHorzScrolling) * ADelta, Ord(not AHorzScrolling) * ADelta, - @AScrollBounds, nil, 0, nil, SW_INVALIDATE or SW_ERASE{ or SW_SCROLLCHILDREN bug in WinAPI}); - UpdateWindow(Handle); -end; - -type - PdxLayoutItemPosition = ^TdxLayoutItemPosition; - TdxLayoutItemPosition = record - Item: TdxCustomLayoutItem; - ParentName: string; - Index: Integer; - end; - -function ComparePositions(Item1, Item2: Pointer): Integer; -begin - Result := PdxLayoutItemPosition(Item1).Index - PdxLayoutItemPosition(Item2).Index; -end; - -function TdxCustomLayoutControl.GetRootSectionName(AIniFile: TCustomIniFile): string; -begin - if AIniFile.SectionExists(Name) then - Result := Name - else - Result := ''; -end; - -procedure TdxCustomLayoutControl.InternalLoadFromCustomIniFile(AIniFile: TCustomIniFile; ADestroyNonLoadedItems: Boolean); -var - AItems: TList; - APositions: TList; - AItemCount, I: Integer; - ARootSection: string; - - function CreateItemsList: TList; - begin - Result := TList.Create; - Result.Count := AbsoluteItemCount; - Move(FAbsoluteItems.List^, Result.List^, Result.Count * SizeOf(Pointer)); - end; - - procedure PrepareItems; - var - I: Integer; - begin - for I := 0 to AbsoluteItemCount - 1 do - AbsoluteItems[I].Parent := nil; - end; - - function GetItemSection(AIndex: Integer): string; - begin - Result := 'Item' + IntToStr(AIndex); - if ARootSection <> '' then - Result := ARootSection + '\' + Result; - end; - - procedure AddPosition(AItem: TdxCustomLayoutItem; const AParentName: string; - AIndex: Integer); - var - APosition: PdxLayoutItemPosition; - begin - New(APosition); - with APosition^ do - begin - Item := AItem; - ParentName := AParentName; - Index := AIndex; - end; - APositions.Add(APosition); - end; - - procedure LoadItem(const ASection: string); - var - AItem: TdxCustomLayoutItem; - - procedure LoadCaption; - var - AItemCaptionOptions: TdxLayoutItemCaptionOptions; - begin - AItem.Caption := AIniFile.ReadString(ASection, 'Caption', ''); - AItem.CaptionOptions.AlignHorz := TAlignment(AIniFile.ReadInteger(ASection, 'CaptionAlignHorz', 0)); - if AItem.CaptionOptions is TdxLayoutItemCaptionOptions then - begin - AItemCaptionOptions := AItem.CaptionOptions as TdxLayoutItemCaptionOptions; - AItemCaptionOptions.AlignVert := TdxAlignmentVert(AIniFile.ReadInteger(ASection, 'CaptionAlignVert', 1)); - AItemCaptionOptions.Layout := TdxCaptionLayout(AIniFile.ReadInteger(ASection, 'CaptionLayout', 0)); - end; - end; - - var - AName, AParentName: string; - AIndex: Integer; - AGroup: TdxLayoutGroup; - begin - AName := AIniFile.ReadString(ASection, 'Name', ''); - if AName = '' then Exit; - AItem := FindItem(AName); - AItems.Remove(AItem); - if AItem = nil then - begin - AItem := CreateGroup; - AItem.Name := AName; - end; - - AParentName := AIniFile.ReadString(ASection, 'ParentName', ''); - AIndex := AIniFile.ReadInteger(ASection, 'Index', -1); - AddPosition(AItem, AParentName, AIndex); - - if AItem is TdxLayoutGroup then - begin - AGroup := TdxLayoutGroup(AItem); - AGroup.Hidden := AIniFile.ReadBool(ASection, 'Hidden', False); - AGroup.LayoutDirection := - TdxLayoutDirection(AIniFile.ReadInteger(ASection, 'LayoutDirection', 0)); - end; - LoadCaption; - AItems.Extract(AItem); - end; - - procedure DestroyNonLoadedItems; - var - I: Integer; - begin - for I := 0 to AItems.Count - 1 do - if ADestroyNonLoadedItems and TdxCustomLayoutItem(AItems[I]).CanDelete then - TObject(AItems[I]).Free; - end; - - procedure UpdatePositions; - var - I: Integer; - APosition: PdxLayoutItemPosition; - begin - APositions.Sort(ComparePositions); - for I := 0 to APositions.Count - 1 do - begin - APosition := PdxLayoutItemPosition(APositions[I]); - with APosition^ do - begin - Item.Parent := FindItem(ParentName) as TdxLayoutGroup; - Item.Index := Index; - end; - end; - end; - -begin - AItems := CreateItemsList; - APositions := TList.Create; - try - ARootSection := GetRootSectionName(AIniFile); - AItemCount := AIniFile.ReadInteger(ARootSection, 'ItemCount', -1); - if AItemCount = -1 then Exit; - BeginUpdate; - Inc(FLoadingCount); - try - PrepareItems; - for I := 0 to AItemCount - 1 do - LoadItem(GetItemSection(I)); - DestroyNonLoadedItems; - UpdatePositions; - finally - Dec(FLoadingCount); - EndUpdate; - end; - finally - for I := 0 to APositions.Count - 1 do - Dispose(PdxLayoutItemPosition(APositions[I])); - APositions.Free; - AItems.Free; - end; -end; - -function CompareItems(Item1, Item2: Pointer): Integer; - - function GetLevel(AItem: TdxCustomLayoutItem): Integer; - begin - if AItem.Parent <> nil then - Result := GetLevel(AItem.Parent) + 1 - else - Result := 0; - end; - -var - AItem1, AItem2: TdxCustomLayoutItem; -begin - AItem1 := TdxCustomLayoutItem(Item1); - AItem2 := TdxCustomLayoutItem(Item2); - Result := GetLevel(AItem1) - GetLevel(AItem2); - if Result = 0 then - if (AItem1.Parent = AItem2.Parent) and (AItem1.Parent <> nil) then - Result := AItem1.Index - AItem2.Index - else - Result := Integer(AItem1.Parent = nil) - Integer(AItem2.Parent = nil); - - if (Result = 0) and (AItem1.Parent <> nil) then - Result := CompareItems(AItem1.Parent, AItem2.Parent); - - if Result = 0 then - if (AItem1 is TdxLayoutGroup) and (AItem2 is TdxLayoutGroup) then - Result := - Ord(TdxLayoutGroup(AItem2).IsUserDefined) - Ord(TdxLayoutGroup(AItem1).IsUserDefined) - else - Result := Ord(AItem2 is TdxLayoutGroup) - Ord(AItem1 is TdxLayoutGroup); - if Result = 0 then - Result := Integer(Item1) - Integer(Item2); -end; - -procedure TdxCustomLayoutControl.InternalSaveToCustomIniFile(AIniFile: TCustomIniFile); -var - AItems: TList; - I: Integer; - ARootSection: string; - - function CreateItemsList: TList; - begin - Result := TList.Create; - Result.Count := AbsoluteItemCount; - Move(FAbsoluteItems.List^, Result.List^, Result.Count * SizeOf(Pointer)); - Result.Sort(CompareItems); - Result.Insert(0, Items); - end; - - function GetItemSection(AIndex: Integer): string; - begin - Result := 'Item' + IntToStr(AIndex); - if ARootSection <> '' then - Result := ARootSection + '\' + Result; - end; - - procedure DeletePrevSettings; - var - ABaseSectionName: string; - ASections: TStringList; - I: Integer; - begin - ABaseSectionName := ARootSection; - if ABaseSectionName <> '' then - ABaseSectionName := ABaseSectionName + '\'; - ASections := TStringList.Create; - try - AIniFile.ReadSections(ASections); - for I := 0 to ASections.Count - 1 do - if Copy(ASections[I], 1, Length(ABaseSectionName)) = ABaseSectionName then - AIniFile.EraseSection(ASections[I]); - finally - ASections.Free; - end; - end; - - procedure SaveItem(const ASection: string; AItem: TdxCustomLayoutItem); - var - AGroup: TdxLayoutGroup; - - function GetParentName: string; - begin - if AItem.Parent <> nil then - Result := AItem.Parent.Name - else - Result := ''; - end; - - procedure SaveCaption; - var - AItemCaptionOptions: TdxLayoutItemCaptionOptions; - begin - AIniFile.WriteString(ASection, 'Caption', AItem.Caption); - AIniFile.WriteInteger(ASection, 'CaptionAlignHorz', Integer(AItem.CaptionOptions.AlignHorz)); - if AItem.CaptionOptions is TdxLayoutItemCaptionOptions then - begin - AItemCaptionOptions := AItem.CaptionOptions as TdxLayoutItemCaptionOptions; - AIniFile.WriteInteger(ASection, 'CaptionAlignVert', Integer(AItemCaptionOptions.AlignVert)); - AIniFile.WriteInteger(ASection, 'CaptionLayout', Integer(AItemCaptionOptions.Layout)); - end; - end; - - begin - AIniFile.WriteString(ASection, 'Name', AItem.Name); - AIniFile.WriteString(ASection, 'ParentName', GetParentName); - AIniFile.WriteInteger(ASection, 'Index', AItem.Index); - - if AItem is TdxLayoutGroup then - begin - AGroup := TdxLayoutGroup(AItem); - AIniFile.WriteBool(ASection, 'Hidden', AGroup.Hidden); - AIniFile.WriteInteger(ASection, 'LayoutDirection', Integer(AGroup.LayoutDirection)); - end; - SaveCaption; - end; - -begin - ARootSection := Name; - DeletePrevSettings; - AItems := CreateItemsList; - try - AIniFile.WriteInteger(ARootSection, 'ItemCount', AItems.Count); - for I := 0 to AItems.Count - 1 do - SaveItem(GetItemSection(I), AItems[I]); - finally - AItems.Free; - end; -end; - -procedure TdxCustomLayoutControl.LoadFromCustomIniFile(AIniFile: TCustomIniFile); -begin - InternalLoadFromCustomIniFile(AIniFile, False); -end; - -procedure TdxCustomLayoutControl.SaveToCustomIniFile(AIniFile: TCustomIniFile); -begin - InternalSaveToCustomIniFile(AIniFile); -end; - -procedure TdxCustomLayoutControl.AddSelectionChangedListener(AListener: TPersistent); -begin - if (FSelectionHelper <> nil) then - FSelectionHelper.AddSelectionChangedListener(AListener); -end; - -function TdxCustomLayoutControl.IsActive: Boolean; -begin - Result := (FSelectionHelper <> nil) and FSelectionHelper.IsActive; -end; - -function TdxCustomLayoutControl.CanDeleteComponent(AComponent: TComponent): Boolean; -begin - Result := (FSelectionHelper <> nil) and FSelectionHelper.CanDeleteComponent(AComponent); -end; - -procedure TdxCustomLayoutControl.ClearSelection; -begin - if (FSelectionHelper <> nil) then - FSelectionHelper.ClearSelection; -end; - -procedure TdxCustomLayoutControl.DeleteSelection; -begin - if (FSelectionHelper <> nil) then - FSelectionHelper.DeleteSelection; -end; - - -procedure TdxCustomLayoutControl.GetSelection(AList: TList); -begin - if (FSelectionHelper <> nil) then - FSelectionHelper.GetSelection(AList); -end; - -function TdxCustomLayoutControl.IsComponentSelected(AComponent: TPersistent): Boolean; -begin - Result := (FSelectionHelper <> nil) and FSelectionHelper.IsComponentSelected(AComponent); -end; - -procedure TdxCustomLayoutControl.RemoveSelectionChangedListener(AListener: TPersistent); -begin - if FSelectionHelper <> nil then - FSelectionHelper.RemoveSelectionChangedListener(AListener); -end; - -procedure TdxCustomLayoutControl.SelectComponent(AComponent: TPersistent; - AShift: TShiftState = []); -begin - if FSelectionHelper <> nil then - FSelectionHelper.SelectComponent(AComponent, AShift); -end; - -procedure TdxCustomLayoutControl.SetSelection(AList: TList); -begin - if FSelectionHelper <> nil then - FSelectionHelper.SetSelection(AList); -end; - -function TdxCustomLayoutControl.UniqueName(const BaseName: string): string; -begin - if FSelectionHelper <> nil then - Result := FSelectionHelper.UniqueName(BaseName); -end; - -//IdxLayoutSelectionChanged -procedure TdxCustomLayoutControl.LayoutSelectionChanged(ASelection: TList; AAction: TdxSelectionAction); -begin - if not IsDestroying and (AAction in [saAdded, saChanged]) and not IsUpdateLocked then - begin - ViewInfo.BuildSelectionLayer; - if IsDesigning then - InvalidateRect(GetDesignSelectorRect, True); - CustomizeFormUpdate([cfutSelection]); - end; -end; - -procedure TdxCustomLayoutControl.SaveToUndo; -begin - if ([csLoading, csReading, csDestroying] * ComponentState = []) and not IsUpdateLocked then - UndoRedoManager.SaveLayout; -end; - -procedure TdxCustomLayoutControl.Clear; -var - I: Integer; - AItem: TdxCustomLayoutItem; -begin - BeginUpdate; - try - for I := AbsoluteItemCount - 1 downto 0 do - begin - AItem := AbsoluteItems[I]; - if (AItem is TdxLayoutItem) and (TdxLayoutItem(AItem).Control <> nil) then - TdxLayoutItem(AItem).Control.Free; - end; - - while AbsoluteItemCount <> 0 do - AbsoluteItems[0].Free; - finally - EndUpdate; - end; -end; - -function TdxCustomLayoutControl.CreateAlignmentConstraint: TdxLayoutAlignmentConstraint; -begin - Result := GetAlignmentConstraintClass.Create(Owner); - AddAlignmentConstraint(Result); -end; - -function TdxCustomLayoutControl.FindItem(AControl: TControl): TdxLayoutItem; -var - I: Integer; - AItem: TdxCustomLayoutItem; -begin - for I := 0 to AbsoluteItemCount - 1 do - begin - AItem := AbsoluteItems[I]; - if AItem is TdxLayoutItem then - begin - Result := TdxLayoutItem(AItem); - if Result.Control = AControl then Exit; - end; - end; - Result := nil; -end; - -function TdxCustomLayoutControl.FindItem(const AName: string): TdxCustomLayoutItem; -var - I: Integer; -begin - if AName <> '' then - begin - Result := Items; - if SameText(Result.Name, AName) then Exit; - for I := 0 to AbsoluteItemCount - 1 do - begin - Result := AbsoluteItems[I]; - if SameText(Result.Name, AName) then Exit; - end; - end; - Result := nil; -end; - -function TdxCustomLayoutControl.GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; -begin - Result := ViewInfo.GetHitTest(P); -end; - -function TdxCustomLayoutControl.GetHitTest(X, Y: Integer): TdxCustomLayoutHitTest; -begin - Result := ViewInfo.GetHitTest(X, Y); -end; - -procedure TdxCustomLayoutControl.BeginUpdate; -begin - Inc(FUpdateLockCount); -end; - -procedure TdxCustomLayoutControl.CancelUpdate; -begin - Dec(FUpdateLockCount); -end; - -procedure TdxCustomLayoutControl.EndUpdate(ANeedPack: Boolean = True); -begin - Dec(FUpdateLockCount); - LayoutChanged(ANeedPack); -end; - -function TdxCustomLayoutControl.CreateGroup(AGroupClass: TdxLayoutGroupClass = nil; - AParent: TdxLayoutGroup = nil): TdxLayoutGroup; -begin - if AGroupClass = nil then - AGroupClass := GetDefaultGroupClass; - Result := TdxLayoutGroup(CreateItem(AGroupClass, AParent)); -end; - -function TdxCustomLayoutControl.CreateItem(AItemClass: TdxCustomLayoutItemClass = nil; - AParent: TdxLayoutGroup = nil): TdxCustomLayoutItem; -begin - if AItemClass = nil then - AItemClass := GetDefaultItemClass; - Result := AItemClass.Create(Owner); - AddAvailableItem(Result); - Result.Parent := AParent; - Modified; -end; - -function TdxCustomLayoutControl.CreateItemForControl(AControl: TControl; - AParent: TdxLayoutGroup = nil): TdxLayoutItem; -begin - Result := TdxLayoutItem(CreateItem(GetDefaultItemClass, AParent)); - Result.Control := AControl; -end; - -function TdxCustomLayoutControl.CanRestore: Boolean; -begin - Result := OptionsStoring.CanRestoreFromIniFile or OptionsStoring.CanRestoreFromRegistry or (FStoredStream.Size > 0); -end; - -procedure TdxCustomLayoutControl.Restore; -begin - if not CanRestore then - Exit; - if OptionsStoring.CanRestoreFromRegistry then - LoadFromRegistry(OptionsStoring.RegistryPath) - else - if OptionsStoring.CanRestoreFromIniFile then - LoadFromIniFile(OptionsStoring.IniFileName) - else - begin - FStoredStream.Position := 0; - LoadFromStream(FStoredStream); - end; -end; - -procedure TdxCustomLayoutControl.Store; -begin - if OptionsStoring.CanStoreToIniFile then - SaveToIniFile(OptionsStoring.IniFileName); - if OptionsStoring.CanStoreToRegistry then - SaveToRegistry(OptionsStoring.RegistryPath); - if not IsDestroying then - begin - FStoredStream.Clear; - SaveToStream(FStoredStream); - end; -end; - -procedure TdxCustomLayoutControl.LoadFromIniFile(const AFileName: string); -var - AIniFile: TMemIniFile; -begin - if AFileName = '' then Exit; - AIniFile := TMemIniFile.Create(AFileName); - try - LoadFromCustomIniFile(AIniFile); - finally - AIniFile.Free; - end; -end; - -procedure TdxCustomLayoutControl.LoadFromRegistry(const ARegistryPath: string); -var - AIniFile: TRegistryIniFile; -begin - if ARegistryPath = '' then Exit; - AIniFile := TRegistryIniFile.Create(ARegistryPath); - try - LoadFromCustomIniFile(AIniFile); - finally - AIniFile.Free; - end; -end; - -procedure TdxCustomLayoutControl.LoadFromStream(AStream: TStream); -var - AIniFile: TMemIniFile; - AStrings: TStringList; -begin - AIniFile := TMemIniFile.Create(''); - AStrings := TStringList.Create; - try - AStrings.LoadFromStream(AStream); - AIniFile.SetStrings(AStrings); - LoadFromCustomIniFile(AIniFile); - finally - AStrings.Free; - AIniFile.Free; - end; -end; - -procedure TdxCustomLayoutControl.SaveToIniFile(const AFileName: string); -var - AIniFile: TMemIniFile; -begin - if AFileName = '' then Exit; - AIniFile := TMemIniFile.Create(AFileName); - try - SaveToCustomIniFile(AIniFile); - AIniFile.UpdateFile; - finally - AIniFile.Free; - end; -end; - -procedure TdxCustomLayoutControl.SaveToRegistry(const ARegistryPath: string); -var - AIniFile: TRegistryIniFile; -begin - if ARegistryPath = '' then Exit; - AIniFile := TRegistryIniFile.Create(ARegistryPath); - try - SaveToCustomIniFile(AIniFile); - finally - AIniFile.Free; - end; -end; - -procedure TdxCustomLayoutControl.SaveToStream(AStream: TStream); -var - AIniFile: TMemIniFile; - AStrings: TStringList; -begin - AIniFile := TMemIniFile.Create(''); - AStrings := TStringList.Create; - try - SaveToCustomIniFile(AIniFile); - AIniFile.GetStrings(AStrings); - AStrings.SaveToStream(AStream); - finally - AStrings.Free; - AIniFile.Free; - end; -end; - -{ THitTests } - -type - THitTests = class - private - FItems: TList; - function GetCount: Integer; - function GetInstance(AClass: TdxCustomLayoutHitTestClass): TdxCustomLayoutHitTest; - function GetItem(Index: Integer): TdxCustomLayoutHitTest; - protected - function GetObjectByClass(AClass: TdxCustomLayoutHitTestClass): TdxCustomLayoutHitTest; - property Count: Integer read GetCount; - property Items[Index: Integer]: TdxCustomLayoutHitTest read GetItem; - public - constructor Create; - destructor Destroy; override; - property Instances[AClass: TdxCustomLayoutHitTestClass]: TdxCustomLayoutHitTest read GetInstance; default; - end; - -var - HitTests: THitTests; - -constructor THitTests.Create; -begin - inherited; - FItems := TList.Create; -end; - -destructor THitTests.Destroy; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Free; - FItems.Free; - inherited; -end; - -function THitTests.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function THitTests.GetInstance(AClass: TdxCustomLayoutHitTestClass): TdxCustomLayoutHitTest; -begin - Result := GetObjectByClass(AClass); - if Result = nil then - begin - Result := AClass.Create; - FItems.Add(Result); - end; -end; - -function THitTests.GetItem(Index: Integer): TdxCustomLayoutHitTest; -begin - Result := FItems[Index]; -end; - -function THitTests.GetObjectByClass(AClass: TdxCustomLayoutHitTestClass): TdxCustomLayoutHitTest; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.ClassType = AClass then Exit; - end; - Result := nil; -end; - -{ TdxCustomLayoutHitTest } - -function TdxCustomLayoutHitTest.Cursor: TCursor; -begin - Result := crDefault; -end; - -class function TdxCustomLayoutHitTest.HitTestCode: Integer; -begin - Result := htError; -end; - -class function TdxCustomLayoutHitTest.Instance: TdxCustomLayoutHitTest; -begin - Result := HitTests.Instances[Self]; -end; - -function TdxCustomLayoutHitTest.IsDeterminedAreaPart: Boolean; -begin - Result := False; -end; - -function TdxCustomLayoutHitTest.GetAreaPart: TdxLayoutAreaPart; -begin - Result := apNone; -end; - -function TdxCustomLayoutHitTest.GetGroupForInsert: TdxLayoutGroup; -begin - Result := nil; -end; - -function TdxCustomLayoutHitTest.GetDesinationItem: TdxCustomLayoutItem; -begin - Result := HitItem; -end; - -function TdxCustomLayoutHitTest.GetSourceItem: TdxCustomLayoutItem; -begin - Result := HitItem; -end; - -{ TdxLayoutNoneHitTest } - -class function TdxLayoutNoneHitTest.HitTestCode: Integer; -begin - Result := htNone; -end; - -{ TdxLayoutItemHitTest } - -function TdxLayoutItemHitTest.GetHitItem: TdxLayoutItem; -begin - Result := TdxLayoutItem(inherited HitItem); -end; - -procedure TdxLayoutItemHitTest.SetHitItem(Value: TdxLayoutItem); -begin - inherited HitItem := Value; -end; - -class function TdxLayoutItemHitTest.HitTestCode: Integer; -begin - Result := htItem; -end; - -function TdxLayoutItemHitTest.GetGroupForInsert: TdxLayoutGroup; -begin - Result := HitItem.Parent; -end; - -{ TdxLayoutGroupHitTest } - -function TdxLayoutGroupHitTest.GetHitItem: TdxLayoutGroup; -begin - Result := TdxLayoutGroup(inherited HitItem); -end; - -procedure TdxLayoutGroupHitTest.SetHitItem(Value: TdxLayoutGroup); -begin - inherited HitItem := Value; -end; - -class function TdxLayoutGroupHitTest.HitTestCode: Integer; -begin - Result := htGroup; -end; - -function TdxLayoutGroupHitTest.GetGroupForInsert: TdxLayoutGroup; -begin - Result := HitItem; -end; - -{ TdxLayoutTabbedGroupHitTest } - -function TdxLayoutTabbedGroupHitTest.GetDesinationItem: TdxCustomLayoutItem; -var - ATabIndex: Integer; - AClientPoint: TPoint; -begin - if Specific.HasTabControl then - begin - AClientPoint := cxPointOffset(FHitPoint, Point(Specific.FTabControl.Left, Specific.FTabControl.Top), False); - ATabIndex := Specific.FTabControl.IndexOfTabAt(AClientPoint.X, AClientPoint.Y); - if ATabIndex <> -1 then - Result := HitItem.ViewInfo.ItemViewInfos[ATabIndex].Item - else - Result := inherited GetDesinationItem; - end - else - Result := inherited GetDesinationItem; -end; - -function TdxLayoutTabbedGroupHitTest.GetSourceItem: TdxCustomLayoutItem; -var - ATabIndex: Integer; - AClientPoint: TPoint; -begin - if Specific.HasTabControl then - begin - AClientPoint := cxPointOffset(FHitPoint, Point(Specific.FTabControl.Left, Specific.FTabControl.Top), False); - ATabIndex := Specific.FTabControl.IndexOfTabAt(AClientPoint.X, AClientPoint.Y); - if ATabIndex <> -1 then - Result := HitItem.ViewInfo.ItemViewInfos[ATabIndex].Item - else - Result := inherited GetSourceItem; - end - else - Result := inherited GetSourceItem; -end; - -function TdxLayoutTabbedGroupHitTest.GetSpecific: TdxLayoutGroupViewInfoTabbedSpecific; -begin - Result := HitItem.ViewInfo.Specific as TdxLayoutGroupViewInfoTabbedSpecific; -end; - -{ TdxLayoutCustomizeFormHitTest } - -class function TdxLayoutCustomizeFormHitTest.HitTestCode: Integer; -begin - Result := htCustomizeForm; -end; - -function TdxLayoutCustomizeFormHitTest.IsDeterminedAreaPart: Boolean; -begin - Result := True; -end; - -function TdxLayoutCustomizeFormHitTest.GetAreaPart: TdxLayoutAreaPart; -begin - if HitItem is TdxLayoutGroup then - Result := apLastChild - else - if (HitItem is TdxLayoutItem) and (HitItem.Parent <> nil) then - Result := apAfter - else - Result := apNone; -end; - -function TdxLayoutCustomizeFormHitTest.GetDesinationItem: TdxCustomLayoutItem; -begin -//#DG feature is not ready yet Result := HitItem; - Result := nil; -end; - -{ TdxLayoutCustomizeFormAvailableItemsHitTest } - -class function TdxLayoutCustomizeFormAvailableItemsHitTest.HitTestCode: Integer; -begin - Result := htAvailableItems; -end; - -{ TdxLayoutCustomizeFormTreeViewItemsHitTest } - -class function TdxLayoutCustomizeFormTreeViewItemsHitTest.HitTestCode: Integer; -begin - Result := htTreeViewItems; -end; - -{ TdxLayoutClientAreaHitTest } - -class function TdxLayoutClientAreaHitTest.HitTestCode: Integer; -begin - Result := htClientArea; -end; - -function TdxLayoutClientAreaHitTest.GetGroupForInsert: TdxLayoutGroup; -begin - Result := Control.Items; -end; - -function TdxLayoutClientAreaHitTest.GetDesinationItem: TdxCustomLayoutItem; -begin - Result := Control.Items; -end; - -{ TdxCustomLayoutControlHandler } - -constructor TdxCustomLayoutControlHandler.Create(AControl: TdxCustomLayoutControl); -begin - inherited Create; - FControl := AControl; -end; - -function TdxCustomLayoutControlHandler.GetViewInfo: TdxLayoutControlViewInfo; -begin - Result := FControl.ViewInfo; -end; - -{ TdxCustomLayoutElementPainter } - -constructor TdxCustomLayoutElementPainter.Create(ACanvas: TcxCanvas; AViewInfo: TdxCustomLayoutElementViewInfo); -begin - inherited Create; - FCanvas := ACanvas; - FViewInfo := AViewInfo; -end; - -{ TdxCustomLayoutItemElementPainter } - -function TdxCustomLayoutItemElementPainter.GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; -begin - Result := ViewInfo.LayoutLookAndFeel; -end; - -function TdxCustomLayoutItemElementPainter.GetViewInfo: TdxCustomLayoutItemElementViewInfo; -begin - Result := inherited ViewInfo as TdxCustomLayoutItemElementViewInfo; -end; - -{ TdxCustomLayoutItemCaptionPainter } - -function TdxCustomLayoutItemCaptionPainter.GetViewInfo: TdxCustomLayoutItemCaptionViewInfo; -begin - Result := TdxCustomLayoutItemCaptionViewInfo(inherited ViewInfo); -end; - -procedure TdxCustomLayoutItemCaptionPainter.AfterDrawText; -begin - with Canvas do - Brush.Style := bsSolid; -end; - -procedure TdxCustomLayoutItemCaptionPainter.BeforeDrawText; -begin - with Canvas do - begin - Brush.Style := bsClear; - Font := ViewInfo.Font; - Font.Color := ViewInfo.TextColor; - if ViewInfo.IsTextUnderlined then - Font.Style := Font.Style + [fsUnderline]; - end; -end; - -procedure TdxCustomLayoutItemCaptionPainter.DoPaint; -begin - DrawBackground; - DrawText; - DrawGlyph; -end; - -procedure TdxCustomLayoutItemCaptionPainter.DrawBackground; -begin -end; - -procedure TdxCustomLayoutItemCaptionPainter.DrawGlyph; -begin - if ViewInfo.IsImageVisible then - DoDrawGlyph; -end; - -procedure TdxCustomLayoutItemCaptionPainter.DrawText; -begin - if ViewInfo.IsTextVisible then - begin - BeforeDrawText; - DoDrawText; - AfterDrawText; - end; -end; - -procedure TdxCustomLayoutItemCaptionPainter.DoDrawText; -begin - with ViewInfo do - Self.Canvas.DrawText(Text, TextAreaBounds, CalculateTextFlags, Enabled); -end; - -procedure TdxCustomLayoutItemCaptionPainter.DoDrawGlyph; -const - DrawModes: array [Boolean] of TcxImageDrawMode = (idmDisabled, idmNormal); -var - AGlyph: TBitmap; - R: TRect; - AImageList: TCustomImageList; - AImageIndex: Integer; - - function TransformToDisabledImage: Boolean; - begin - Result := ViewInfo.Enabled or (not IsGlyphAssigned(AGlyph) and (AImageList = ViewInfo.Item.Container.OptionsImage.DisabledImages)); - end; - -begin - if ViewInfo.Item.CaptionOptions.ImageOptions.GetCurrentImage(AGlyph, AImageList, AImageIndex) then - begin - R := ViewInfo.ImageBounds; - cxDrawImage(Canvas.Handle, R, R, AGlyph, AImageList, AImageIndex, DrawModes[TransformToDisabledImage]); - end; -end; - -procedure TdxCustomLayoutItemCaptionPainter.Paint; -begin - if RectVisible(Canvas.Handle, ViewInfo.Bounds) then - DoPaint; -end; - -{ TdxCustomLayoutItemPainter } - -function TdxCustomLayoutItemPainter.GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; -begin - Result := ViewInfo.LayoutLookAndFeel; -end; - -function TdxCustomLayoutItemPainter.GetViewInfo: TdxCustomLayoutItemViewInfo; -begin - Result := inherited ViewInfo as TdxCustomLayoutItemViewInfo; -end; - -procedure TdxCustomLayoutItemPainter.DoDrawBackground; -begin - if ViewInfo.HasBackground then - Canvas.FillRect(ViewInfo.BackgroundBounds, ViewInfo.GetBackgroundColor); -end; - -procedure TdxCustomLayoutItemPainter.DoDrawCaption; -begin - with GetCaptionPainterClass.Create(Canvas, ViewInfo.CaptionViewInfo) do - try - Paint; - finally - Free; - end; -end; - -procedure TdxCustomLayoutItemPainter.DoDrawSpecificPart; -begin -// do nothing -end; - -procedure TdxCustomLayoutItemPainter.DoDrawSelectionFrame; -begin - FrameRectByColor(Canvas.Handle, ViewInfo.SelectionBorderRect, dxLayoutSelectionBorderDefaultColor); -end; - -procedure TdxCustomLayoutItemPainter.DrawBackground; -begin - if CanDrawBackground then - DoDrawBackground; -end; - -procedure TdxCustomLayoutItemPainter.DrawCaption; -begin - if CanDrawCaption then - DoDrawCaption; -end; - -procedure TdxCustomLayoutItemPainter.DrawItem; -begin - DrawBackground; - DrawContent; -end; - -procedure TdxCustomLayoutItemPainter.DrawContent; -begin - DrawCaption; -end; - -function TdxCustomLayoutItemPainter.CanDrawBackground: Boolean; -begin - Result := ViewInfo.CanDrawBackground; -end; - -function TdxCustomLayoutItemPainter.CanDrawCaption: Boolean; -begin - Result := ViewInfo.HasCaption; -end; - -function TdxCustomLayoutItemPainter.CanPaint: Boolean; -begin - Result := ViewInfo.CanPaint; -end; - -function TdxCustomLayoutItemPainter.CanPaintSpecificPart: Boolean; -begin - Result := CanPaint and ViewInfo.IsDragImagePainted; -end; - -procedure TdxCustomLayoutItemPainter.PaintSpecificPart; -begin - if CanPaintSpecificPart then - DoDrawSpecificPart; -end; - -procedure TdxCustomLayoutItemPainter.PaintDesignFeatures; -begin -// do nothing -end; - -procedure TdxCustomLayoutItemPainter.Paint; -begin - if CanPaint and RectVisible(Canvas.Handle, ViewInfo.Bounds) then - begin - DrawItem; -//#DG selection breaks Canvas.ExcludeClipRect(ViewInfo.Bounds); - end; -end; - -{ TdxLayoutItemControlPainter } - -function TdxLayoutItemControlPainter.GetViewInfo: TdxLayoutItemControlViewInfo; -begin - Result := TdxLayoutItemControlViewInfo(inherited ViewInfo); -end; - -procedure TdxLayoutItemControlPainter.DrawBorders; -begin - LayoutLookAndFeel.DrawItemControlBorder(Canvas, ViewInfo.ItemViewInfo.Options, ViewInfo.Bounds); -end; - -procedure TdxLayoutItemControlPainter.Paint; -begin - if ViewInfo.HasBorder and RectVisible(Canvas.Handle, ViewInfo.Bounds) then - DrawBorders; -end; - -{ TdxLayoutItemPainter } - -function TdxLayoutItemPainter.GetViewInfo: TdxLayoutItemViewInfo; -begin - Result := TdxLayoutItemViewInfo(inherited ViewInfo); -end; - -function TdxLayoutItemPainter.CanDrawBackground: Boolean; -begin - Result := inherited CanDrawBackground and not ViewInfo.IsTransparent; -end; - -function TdxLayoutItemPainter.CanDrawCaption: Boolean; -begin - Result := inherited CanDrawCaption or (ViewInfo.IsDragImagePainted and not ViewInfo.ActuallyVisible); -end; - -function TdxLayoutItemPainter.CanPaintSpecificPart: Boolean; -begin - Result := CanPaint and ViewInfo.ActuallyVisible and ViewInfo.HasControl; -end; - -function TdxLayoutItemPainter.GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; -begin - Result := TdxLayoutItemCaptionPainter; -end; - -function TdxLayoutItemPainter.GetControlPainterClass: TdxLayoutItemControlPainterClass; -begin - Result := TdxLayoutItemControlPainter; -end; - -procedure TdxLayoutItemPainter.DoDrawControlBorder; -begin - with GetControlPainterClass.Create(Canvas, ViewInfo.ControlViewInfo) do - try - Paint; - finally - Free; - end; -end; - -procedure TdxLayoutItemPainter.DoDrawSpecificPart; - - function GetControlRect(AControl: TControl): TRect; // copy from cxPC - begin - Result := Rect(0, 0, AControl.Width, AControl.Height); - end; - -var - AControl: TWinControl; -begin - Canvas.SaveState; - try - if ViewInfo.Item.Control is TWinControl then - begin - AControl := TWinControl(ViewInfo.Item.Control); - with ViewInfo.Item.Control.BoundsRect.TopLeft do - AControl.PaintTo(Canvas.Canvas, X, Y); - end - else - begin - with ViewInfo.Item.Control.BoundsRect.TopLeft do - MoveWindowOrg(Canvas.Handle, X, Y); - Canvas.IntersectClipRect(GetControlRect(ViewInfo.Item.Control)); - ViewInfo.Item.Control.Perform(WM_ERASEBKGND, Canvas.Handle, Canvas.Handle); - ViewInfo.Item.Control.Perform(WM_PAINT, Canvas.Handle, 0); - end; - finally - Canvas.RestoreState; - end; -end; - -procedure TdxLayoutItemPainter.DrawContent; -begin - DrawControlBorder; - inherited; -end; - -procedure TdxLayoutItemPainter.DrawControlBorder; -begin - if ViewInfo.HasControl then - DoDrawControlBorder; -end; - -{ TdxLayoutGroupPainter } - -procedure TdxLayoutGroupPainter.PaintSpecificPart; -var - I: Integer; - AViewInfo: TdxCustomLayoutItemViewInfo; -begin - inherited; - for I := 0 to ViewInfo.ItemViewInfoCount - 1 do - begin - AViewInfo := ViewInfo.ItemViewInfos[I]; - with AViewInfo.GetPainterClass.Create(Canvas, AViewInfo) do - try - PaintSpecificPart; - finally - Free; - end; - end; -end; - -procedure TdxLayoutGroupPainter.PaintDesignFeatures; -var - I: Integer; - AViewInfo: TdxCustomLayoutItemViewInfo; -begin - inherited; - - for I := 0 to ViewInfo.ItemViewInfoCount - 1 do - begin - AViewInfo := ViewInfo.ItemViewInfos[I]; - with AViewInfo.GetPainterClass.Create(Canvas, AViewInfo) do - try - PaintDesignFeatures; - finally - Free; - end; - end; -end; - -function TdxLayoutGroupPainter.GetViewInfo: TdxLayoutGroupViewInfo; -begin - Result := TdxLayoutGroupViewInfo(inherited ViewInfo); -end; - -function TdxLayoutGroupPainter.GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; -begin - Result := TdxLayoutGroupCaptionPainter; -end; - -procedure TdxLayoutGroupPainter.DoDrawSpecificPart; -begin - inherited; - ViewInfo.Specific.DrawSpecificPart(Canvas); -end; - -procedure TdxLayoutGroupPainter.DoDrawSelectionFrame; -begin - DrawBoundsFrame; - inherited; -end; - -procedure TdxLayoutGroupPainter.DoDrawBackground; -begin - inherited; - ViewInfo.Specific.DrawSpecificBackground(Canvas); -end; - -procedure TdxLayoutGroupPainter.DrawContent; -begin - DrawBorders; - DrawItemsArea; - inherited; - //DrawBoundsFrame; -end; - -procedure TdxLayoutGroupPainter.DoDrawBorders; -//todo: #SC -{var - ASide: TdxLayoutSide;} -begin -//todo: #SC - {with Canvas do - begin - Brush.Color := ViewInfo.Color; - for ASide := Low(TdxLayoutSide) to High(TdxLayoutSide) do - Canvas.FillRect(ViewInfo.BorderRestSpaceBounds[ASide]); - end;} -end; - -procedure TdxLayoutGroupPainter.DoDrawRestSpace; -begin - Canvas.Brush.Color := ViewInfo.Color; - Canvas.FillRect(ViewInfo.ClientBounds); -end; - -procedure TdxLayoutGroupPainter.DoDrawBoundsFrame; -begin - FrameRectByColor(Canvas.Handle, ViewInfo.SelectionBorderRect, dxLayoutHiddenGroupBorderDefaultColor); -end; - -procedure TdxLayoutGroupPainter.DrawBorders; -begin - if ViewInfo.HasBorder and not ViewInfo.IsTransparent then - begin - Canvas.SaveClipRegion; - try - Canvas.ExcludeClipRect(ViewInfo.CaptionViewInfo.Bounds); - DoDrawBorders; - finally - Canvas.RestoreClipRegion; - end; - end; -end; - -procedure TdxLayoutGroupPainter.DrawBoundsFrame; -begin - if ViewInfo.HasBoundsFrame then - DoDrawBoundsFrame; -end; - -procedure TdxLayoutGroupPainter.DrawItems; -var - I: Integer; - AItemViewInfo: TdxCustomLayoutItemViewInfo; -begin - for I := 0 to ViewInfo.ItemViewInfoCount - 1 do - begin - AItemViewInfo := ViewInfo.ItemViewInfos[I]; - if AItemViewInfo.CanPaint then - with AItemViewInfo.GetPainterClass.Create(Canvas, AItemViewInfo) do - try - Paint; - finally - Free; - end; - end; -end; - -procedure TdxLayoutGroupPainter.DrawRestSpace; -begin - if not ViewInfo.IsTransparent then - DoDrawRestSpace; -end; - -procedure TdxLayoutGroupPainter.DrawItemsArea; -begin - DrawItems; -//todo: #SC DrawRestSpace; -end; - -{ TdxLayoutControlPainter } - -function TdxLayoutControlPainter.GetInternalCanvas: TcxCanvas; -begin - Result := FControl.Canvas; -end; - -procedure TdxLayoutControlPainter.MakeCanvasClipped(ACanvas: TcxCanvas); -begin - ACanvas.IntersectClipRect(ViewInfo.ClientBounds); -end; - -procedure TdxLayoutControlPainter.DrawBackground(ACanvas: TcxCanvas); -begin - if not ViewInfo.IsTransparent then - ViewInfo.LayoutLookAndFeel.DrawLayoutControlBackground(ACanvas, ViewInfo.ClientBounds); -end; - -procedure TdxLayoutControlPainter.DrawDesignSelector(ACanvas: TcxCanvas); -begin - if Control.IsDesigning and Control.ShowDesignSelectors then - cxDrawDesignRect(ACanvas, Control.GetDesignSelectorRect, Control.IsComponentSelected(Control)); -end; - -procedure TdxLayoutControlPainter.DrawItems(ACanvas: TcxCanvas); -var - AItemsViewInfo: TdxLayoutGroupViewInfo; -begin - AItemsViewInfo := ViewInfo.ItemsViewInfo; - with AItemsViewInfo.GetPainterClass.Create(ACanvas, AItemsViewInfo) do - try - Paint; - finally - Free; - end; -end; - -procedure TdxLayoutControlPainter.DrawDesignFeatures(ACanvas: TcxCanvas); -var - AItemsViewInfo: TdxLayoutGroupViewInfo; -begin - AItemsViewInfo := ViewInfo.ItemsViewInfo; - with AItemsViewInfo.GetPainterClass.Create(ACanvas, AItemsViewInfo) do - try - PaintDesignFeatures; - finally - Free; - end; -end; - -procedure TdxLayoutControlPainter.PlaceControls(AItemViewInfo: TdxCustomLayoutItemViewInfo); -var - AControlViewInfos, AWinControlViewInfos: TList; - - procedure RetrieveControlViewInfos(AItemViewInfo: TdxCustomLayoutItemViewInfo); - var - I: Integer; - AControlViewInfo: TdxLayoutItemControlViewInfo; - begin - if AItemViewInfo is TdxLayoutGroupViewInfo then - with TdxLayoutGroupViewInfo(AItemViewInfo) do - for I := 0 to ItemViewInfoCount - 1 do - RetrieveControlViewInfos(ItemViewInfos[I]) - else - begin - AControlViewInfo := TdxLayoutItemViewInfo(AItemViewInfo).ControlViewInfo; - if TdxLayoutItemViewInfo(AItemViewInfo).ActuallyVisible and (AControlViewInfo.Control <> nil) then - if AControlViewInfo.Control is TWinControl then - AWinControlViewInfos.Add(AControlViewInfo) - else - AControlViewInfos.Add(AControlViewInfo); - end; - end; - - procedure ProcessControls; - var - I: Integer; - AViewInfo: TdxLayoutItemControlViewInfo; - begin - for I := 0 to AControlViewInfos.Count - 1 do - begin - AViewInfo := TdxLayoutItemControlViewInfo(AControlViewInfos[I]); - AViewInfo.Control.BoundsRect := AViewInfo.ControlBounds; - end; - end; - - procedure ProcessWinControls; - var - AWindowsStruct: HDWP; - I: Integer; - AControlViewInfo: TdxLayoutItemControlViewInfo; - R: TRect; - begin - AWindowsStruct := BeginDeferWindowPos(AWinControlViewInfos.Count); - try - for I := 0 to AWinControlViewInfos.Count - 1 do - begin - AControlViewInfo := TdxLayoutItemControlViewInfo(AWinControlViewInfos[I]); - R := AControlViewInfo.ControlBounds; - DeferWindowPos(AWindowsStruct, (AControlViewInfo.Control as TWinControl).Handle, 0, - R.Left, R.Top, cxRectWidth(R), cxRectHeight(R), SWP_NOZORDER or SWP_NOACTIVATE); - end; - finally - EndDeferWindowPos(AWindowsStruct); - end; - end; - - function CheckControlSizes(AControlViewInfos: TList): Boolean; - var - I: Integer; - begin - Result := True; - for I := 0 to AControlViewInfos.Count - 1 do - with TdxLayoutItemControlViewInfo(AControlViewInfos[I]) do - begin - Result := - ((ItemViewInfo.AlignHorz = ahClient) or (Control.Width = cxRectWidth(ControlBounds))) and - ((ItemViewInfo.AlignVert = avClient) or (Control.Height = cxRectHeight(ControlBounds))); - if not Result then - begin - Item.SaveOriginalControlSize; - Break; - end; - end; - end; - -begin - AControlViewInfos := TList.Create; - AWinControlViewInfos := TList.Create; - try - Control.FIsPlacingControls := True; - try - RetrieveControlViewInfos(AItemViewInfo); - ProcessControls; - ProcessWinControls; - finally - Control.FIsPlacingControls := False; - end; - if not CheckControlSizes(AControlViewInfos) or not CheckControlSizes(AWinControlViewInfos) then - Control.LayoutChanged; - finally - AWinControlViewInfos.Free; - AControlViewInfos.Free; - end; -end; - -function TdxLayoutControlPainter.GetCanvas: TcxCanvas; -begin - Result := InternalCanvas; - MakeCanvasClipped(Result); -end; - -procedure TdxLayoutControlPainter.Paint; -var - ACanvas: TcxCanvas; -begin - ACanvas := GetCanvas; - ACanvas.SaveState; - try - { moved to TdxLayoutControlViewInfo.Calculate }//PlaceControls; // because of selection drawing - DrawBackground(ACanvas); - DrawItems(ACanvas); - DrawDesignFeatures(ACanvas); - DrawDesignSelector(ACanvas); -// PlaceControls; - finally - ACanvas.RestoreState; - end; -end; - -{ TdxCustomLayoutElementViewInfo } - -procedure TdxCustomLayoutElementViewInfo.Calculate(const ABounds: TRect); -begin - FBounds := ABounds; - FOriginalBounds := ABounds; -end; - -{ TdxCustomLayoutItemElementViewInfo } - -constructor TdxCustomLayoutItemElementViewInfo.Create(AItemViewInfo: TdxCustomLayoutItemViewInfo); -begin - inherited Create; - FItemViewInfo := AItemViewInfo; -end; - -function TdxCustomLayoutItemElementViewInfo.CalculateMinHeight: Integer; -begin - Result := 0; -end; - -function TdxCustomLayoutItemElementViewInfo.CalculateMinWidth: Integer; -begin - Result := 0; -end; - -function TdxCustomLayoutItemElementViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TdxCustomLayoutItemElementViewInfo.CalculateWidth: Integer; -begin - Result := 0; -end; - -function TdxCustomLayoutItemElementViewInfo.GetHeight: Integer; -begin - Result := FHeight; - if Result = 0 then - begin - Result := cxRectHeight(Bounds); - if Result = 0 then - Result := CalculateHeight; - end; -end; - -function TdxCustomLayoutItemElementViewInfo.GetItem: TdxCustomLayoutItem; -begin - Result := FItemViewInfo.Item; -end; - -function TdxCustomLayoutItemElementViewInfo.GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; -begin - Result := FItemViewInfo.LayoutLookAndFeel; -end; - -function TdxCustomLayoutItemElementViewInfo.GetWidth: Integer; -begin - Result := FWidth; - if Result = 0 then - begin - Result := cxRectWidth(Bounds); - if Result = 0 then - Result := CalculateWidth; - end; -end; - -procedure TdxCustomLayoutItemElementViewInfo.SetHeight(Value: Integer); -begin - FHeight := Value; -end; - -procedure TdxCustomLayoutItemElementViewInfo.SetWidth(Value: Integer); -begin - FWidth := Value; -end; - -function TdxCustomLayoutItemElementViewInfo.GetEnabled: Boolean; -begin - Result := FItemViewInfo.Enabled; -end; - -function TdxCustomLayoutItemElementViewInfo.GetCursor(X, Y: Integer): TCursor; -begin - Result := crDefault; -end; - -function TdxCustomLayoutItemElementViewInfo.GetVisible: Boolean; -begin - Result := False; -end; - -procedure TdxCustomLayoutItemElementViewInfo.Invalidate(const ABounds: TRect); -begin - Item.Container.InvalidateRect(ABounds, False); -end; - -procedure TdxCustomLayoutItemElementViewInfo.MouseEnter; -begin -end; - -procedure TdxCustomLayoutItemElementViewInfo.MouseLeave; -begin - Pressed := False; -end; - -procedure TdxCustomLayoutItemElementViewInfo.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - Pressed := True; -end; - -procedure TdxCustomLayoutItemElementViewInfo.MouseMove(Shift: TShiftState; - X, Y: Integer); -begin -end; - -procedure TdxCustomLayoutItemElementViewInfo.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - Pressed := False; -end; - -function TdxCustomLayoutItemElementViewInfo.WantsMouse(X, Y: Integer): Boolean; -begin - Result := Visible and PtInRect(Bounds, Point(X, Y)); -end; - -{ TdxCustomLayoutItemCaptionViewInfo } - -function TdxCustomLayoutItemCaptionViewInfo.GetCanvas: TcxCanvas; -begin - Result := ItemViewInfo.ContainerViewInfo.Canvas; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetIsCustomization: Boolean; -begin - Result := FItemViewInfo.IsCustomization; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetIsImageVisible: Boolean; -begin - Result := (cveImage in Item.CaptionOptions.VisibleElements) and Item.CaptionOptions.ImageOptions.IsImageAssigned; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetIsTextVisible: Boolean; -begin - Result := (cveText in Item.CaptionOptions.VisibleElements) and (Text <> ''); -end; - -procedure TdxCustomLayoutItemCaptionViewInfo.SetHotTracked(Value: Boolean); -begin - if FHotTracked <> Value then - begin - FHotTracked := Value; - Invalidate(HotTrackBounds); - end; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetCursor(X, Y: Integer): TCursor; -begin - if HotTracked and (htsHandPoint in HotTrackStyles) then - Result := crcxHandPoint - else - Result := inherited GetCursor(X, Y); -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetVisible: Boolean; -begin - Result := ItemViewInfo.HasCaption or (ItemViewInfo.IsDragImagePainted and not ItemViewInfo.ActuallyVisible); -end; - -procedure TdxCustomLayoutItemCaptionViewInfo.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited; - if CanDoCaptionClick(X, Y) then - Item.DoCaptionDown; -end; - -procedure TdxCustomLayoutItemCaptionViewInfo.MouseLeave; -begin - inherited; - HotTracked := False; -end; - -procedure TdxCustomLayoutItemCaptionViewInfo.MouseMove(Shift: TShiftState; - X, Y: Integer); -begin - inherited; - if IsHotTrackable then - HotTracked := IsPointInHotTrackBounds(Point(X, Y)); -end; - -procedure TdxCustomLayoutItemCaptionViewInfo.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -var - APressed: Boolean; -begin - APressed := Pressed; - inherited; - if CanDoCaptionClick(X, Y) and APressed then - Item.DoCaptionClick; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetColor: TColor; -begin - Result := ItemViewInfo.Color; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetFont: TFont; -begin - Result := Options.GetFont(Item.Container); -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetHotTrackBounds: TRect; -begin - Result := TextAreaBounds; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetHotTrackStyles: TdxLayoutHotTrackStyles; -begin - Result := Options.HotTrackStyles; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetIsDefaultColor: Boolean; -begin - Result := ItemViewInfo.IsDefaultColor; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetIsHotTrackable: Boolean; -begin - Result := not IsCustomization and Enabled and Options.HotTrack; -end; - -function TdxCustomLayoutItemCaptionViewInfo.CalculateTextFlags: Integer; -const - MultiLines: array[Boolean] of Integer = (cxSingleLine, cxWordBreak); - AlignsVert: array[TdxAlignmentVert] of Integer = - (cxAlignTop, cxAlignVCenter, cxAlignBottom); -begin - Result := MultiLines[MultiLine] or cxAlignmentsHorz[AlignHorz] or AlignsVert[AlignVert]; - if Item.CaptionOptions.ShowAccelChar then - Inc(Result, cxShowPrefix); -end; - -function TdxCustomLayoutItemCaptionViewInfo.CanDoCaptionClick(X, Y: Integer): Boolean; -begin - Result := Enabled and IsPointInHotTrackBounds(Point(X, Y)); -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetAlignHorz: TAlignment; -begin - Result := Item.CaptionOptions.AlignHorz; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetIsTextUnderlined: Boolean; -begin - Result := - IsHotTrackable and not HotTracked and (htsUnderlineCold in HotTrackStyles) or - HotTracked and (htsUnderlineHot in HotTrackStyles); -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetIsTransparent: Boolean; -begin - Result := ItemViewInfo.ContainerViewInfo.HasBackground and IsDefaultColor; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetOptions: TdxLayoutLookAndFeelCaptionOptions; -begin - Result := ItemViewInfo.Options.CaptionOptions; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetSpaceBetweenImageText: Integer; -begin - Result := dxLayoutGlyphSpace; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetText: string; -begin - Result := Item.Caption; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetTextAreaBounds: TRect; -var - AImageAreaWidth: Integer; -begin - if IsTextVisible then - begin - Result := Bounds; - if IsImageVisible then - begin - AImageAreaWidth := cxRectWidth(ImageAreaBounds); - if IsNeedSpaceBetweenImageText then - Inc(AImageAreaWidth, GetSpaceBetweenImageText); - if Item.CaptionOptions.AlignHorz = taRightJustify then - Result.Right := Result.Right - AImageAreaWidth - else - Result.Left := Result.Left + AImageAreaWidth; - end; - if Enabled and (Text <> '') then - with Result do - begin - Dec(Right); - Dec(Bottom); - end; - end - else - Result := cxNullRect; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetTextColor: TColor; -begin - if HotTracked then - Result := GetTextHotColor - else - Result := GetTextNormalColor; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetTextHotColor: TColor; -begin - Result := Options.GetTextHotColor; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetTextNormalColor: TColor; -begin - Result := Options.GetTextColor; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetTextHeight: Integer; -var - R: TRect; -begin - if IsTextVisible then - begin - if Item.CachedTextHeight = 0 then - begin - PrepareCanvas; - if MultiLine then - begin - R := Rect(0, 0, TextWidth - 1 {for disabling}, 0); - Canvas.TextExtent(Text, R, CalculateTextFlags); - Result := R.Bottom - R.Top; - end - else - Result := Canvas.TextHeight(Text); - Item.CachedTextHeight := Result; - end - else - Result := Item.CachedTextHeight; - Inc(Result); // for disabling - end - else - Result := 0; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetTextWidth: Integer; -var - AText: string; -begin - if IsTextVisible then - begin - AText := VisibleText; - PrepareCanvas; - Result := Canvas.TextWidth(AText); - Inc(Result); // for disabling - end - else - Result := 0; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetVisibleText: string; -begin - Result := Text; - if Item.CaptionOptions.ShowAccelChar then - Result := StripHotKey(Result); -end; - -function TdxCustomLayoutItemCaptionViewInfo.IsNeedSpaceBetweenImageText: Boolean; -begin - Result := IsTextVisible and IsImageVisible; -end; - -function TdxCustomLayoutItemCaptionViewInfo.IsPointInHotTrackBounds(const P: TPoint): Boolean; -var - ABounds: TRectArray; - I: Integer; -begin - Result := IsImageVisible and PtInRect(ImageBounds, P); - if not Result and IsTextVisible then - begin - PrepareCanvas; - Canvas.GetTextStringsBounds(Text, TextAreaBounds, - CalculateTextFlags, Enabled, ABounds); - try - for I := 0 to High(ABounds) do - begin - Result := PtInRect(ABounds[I], P); - if Result then Break; - end; - finally - ABounds := nil; - end; - end; -end; - -procedure TdxCustomLayoutItemCaptionViewInfo.PrepareCanvas; -begin - Canvas.Font := Font; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetImageAreaBounds: TRect; -begin - Result := Bounds; - if Item.CaptionOptions.AlignHorz = taRightJustify then - Result.Left := Result.Right - ImageWidth - else - Result.Right := Result.Left + ImageWidth; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetImageBounds: TRect; -begin - if IsImageVisible then - Result := cxRectCenter(ImageAreaBounds, ImageWidth, ImageHeight) - else - Result := cxNullRect; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetImageHeight: Integer; -begin - Result := Item.CaptionOptions.ImageOptions.GetImageSize.cy; -end; - -function TdxCustomLayoutItemCaptionViewInfo.GetImageWidth: Integer; -begin - Result := Item.CaptionOptions.ImageOptions.GetImageSize.cx; -end; - -function TdxCustomLayoutItemCaptionViewInfo.CalculateHeight: Integer; -begin - if Visible then - Result := Max(TextHeight, ImageHeight) - else - Result := 0; -end; - -function TdxCustomLayoutItemCaptionViewInfo.CalculateWidth: Integer; -begin - if Visible then - begin - Result := TextWidth + ImageWidth; - if IsNeedSpaceBetweenImageText then - Inc(Result, GetSpaceBetweenImageText); - end - else - Result := 0; -end; - -{ TdxCustomLayoutItemViewInfo } - -constructor TdxCustomLayoutItemViewInfo.Create(AContainerViewInfo: TdxLayoutControlViewInfo; - AParentViewInfo: TdxLayoutGroupViewInfo; AItem: TdxCustomLayoutItem); -begin - inherited Create; - FContainerViewInfo := AContainerViewInfo; - FParentViewInfo := AParentViewInfo; - - FNotifyComponent := TcxFreeNotificator.Create(nil); - FNotifyComponent.OnFreeNotification := FreeNotification; - FItem := AItem; - FItem.FViewInfo := Self; - FItem.FreeNotification(FNotifyComponent); - - CreateViewInfos; -end; - -destructor TdxCustomLayoutItemViewInfo.Destroy; -begin - DestroyViewInfos; - if FItem <> nil then - FItem.FViewInfo := nil; - FreeAndNil(FNotifyComponent); - inherited; -end; - -function TdxCustomLayoutItemViewInfo.GetAlignHorz: TdxLayoutAlignHorz; -begin -//#DG Result := Item.AlignHorz; - Result := Item.GetRealAlignHorz; -end; - -function TdxCustomLayoutItemViewInfo.GetAlignVert: TdxLayoutAlignVert; -begin -//#DG Result := Item.AlignVert; - Result := Item.GetRealAlignVert; -end; - -function TdxCustomLayoutItemViewInfo.GetBackgroundBounds: TRect; -begin - if IsDragImagePainted then - Result := SelectionBorderRect - else - Result := Bounds; -end; - -function TdxCustomLayoutItemViewInfo.GetCanPaint: Boolean; -begin - Result := ActuallyVisible or - IsDragImagePainted and (IsDragged or IsDraggedWithParent and ParentViewInfo.CanPaint and - ParentViewInfo.Specific.AllowDrawChild(Item)); -end; - -function TdxCustomLayoutItemViewInfo.GetIsAvailable: Boolean; -begin - Result := Item.IsAvailable; -end; - -function TdxCustomLayoutItemViewInfo.GetIsCustomization: Boolean; -begin - Result := FItem.Container.IsCustomization; -end; - -function TdxCustomLayoutItemViewInfo.GetIsDragged: Boolean; -begin - Result := Item.IsDragged; -end; - -function TdxCustomLayoutItemViewInfo.GetIsDraggedWithParent: Boolean; -begin - Result := (ParentViewInfo <> nil) and (ParentViewInfo.IsDragged or ParentViewInfo.IsDraggedWithParent); -end; - -function TdxCustomLayoutItemViewInfo.GetIsDragImagePainted: Boolean; -begin - Result := ContainerViewInfo.IsDragImagePainted; -end; - -function TdxCustomLayoutItemViewInfo.GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; -begin - Result := Item.GetLayoutLookAndFeel; -end; - -procedure TdxCustomLayoutItemViewInfo.PaintSelectionLayer; -var - ABitmap, ABackgroundBitmap: TcxAlphaBitmap; -begin - if Selected and ActuallyVisible then - begin - ABitmap := ContainerViewInfo.SelectionLayer.SelectionImage; - - ABackgroundBitmap := TcxAlphaBitmap.CreateSize(SelectionBorderRect); - try - ABackgroundBitmap.cxCanvas.FillRect(ABackgroundBitmap.ClientRect, dxLayoutControlSelectionDefaultColor); - ABackgroundBitmap.SetAlphaChannel(dxLayoutSelectionDefaultAlphaChannel); - ABitmap.CopyBitmap(ABackgroundBitmap, SelectionBorderRect, cxNullPoint); - finally - ABackgroundBitmap.Free; - end; - - dxDrawSelectionMarkers(ABitmap.cxCanvas, SelectionBorderRect, dxLayoutSelectionBorderDefaultColor, - dxLayoutSelectionBorderMarkerInnerDefaultColor, dxLayoutSelectionMarkerWidth); - ABitmap.cxCanvas.FrameRect(SelectionBorderRect, dxLayoutSelectionBorderDefaultColor, 1, cxBordersAll, True); - end; -end; - -function TdxCustomLayoutItemViewInfo.IsParentLocked: Boolean; -begin - Result := (ParentViewInfo <> nil) and ParentViewInfo.IsLocked; -end; - -function TdxCustomLayoutItemViewInfo.IsParentSelected: Boolean; -begin - Result := (ParentViewInfo <> nil) and (ParentViewInfo.Selected or ParentViewInfo.IsParentSelected); -end; - -function TdxCustomLayoutItemViewInfo.GetMinHeight: Integer; -begin - if AlignVert = avClient then - Result := CalculateMinHeight - else - Result := CalculateHeight; -end; - -function TdxCustomLayoutItemViewInfo.GetMinWidth: Integer; -begin - if AlignHorz = ahClient then - Result := CalculateMinWidth - else - Result := CalculateWidth; -end; - -function TdxCustomLayoutItemViewInfo.GetHeight: Integer; -begin - Result := CalculateHeight; -end; - -function TdxCustomLayoutItemViewInfo.GetWidth: Integer; -begin - Result := CalculateWidth; -end; - -function TdxCustomLayoutItemViewInfo.GetOffset(ASide: TdxLayoutSide): Integer; -begin - Result := FOffsets[ASide]; - if Result = 0 then - Result := CalculateOffset(ASide); -end; - -function TdxCustomLayoutItemViewInfo.GetOffsetsHeight: Integer; -begin - Result := Offsets[sdTop] + Offsets[sdBottom]; -end; - -function TdxCustomLayoutItemViewInfo.GetOffsetsWidth: Integer; -begin - Result := Offsets[sdLeft] + Offsets[sdRight]; -end; - -function TdxCustomLayoutItemViewInfo.GetSelected: Boolean; -begin - Result := Item.Container.IsComponentSelected(Item); -end; - -function TdxCustomLayoutItemViewInfo.GetSelectionBorderRect: TRect; -const - SelectionGab = dxLayoutSelectionOffset / 2; - - function CanUseSelectionOffset: Boolean; - var - ARootViewInfo: TdxLayoutGroupViewInfo; - begin - ARootViewInfo := ContainerViewInfo.ItemsViewInfo; - Result := ((ParentViewInfo = nil) and (not Item.IsRoot or - ((ARootViewInfo.ItemsAreaOffsetHorz > SelectionGab) and (ARootViewInfo.ItemsAreaOffsetVert > SelectionGab)))) or - ((ParentViewInfo <> nil) and (ParentViewInfo.UseItemOffset and (ParentViewInfo.ItemOffset > SelectionGab))); - end; - - function GetSelectionBoundsOffset: Integer; - begin - if CanUseSelectionOffset then - Result := dxLayoutSelectionOffset - else - Result := 0; - if Item.IsRoot then - Result := -Result; - end; - -var - ABoundsOffset: Integer; -begin - Result := Bounds; - ABoundsOffset := GetSelectionBoundsOffset; - InflateRect(Result, ABoundsOffset, ABoundsOffset); -end; - -function TdxCustomLayoutItemViewInfo.GetSelectionArea: TRect; -begin - Result := SelectionBorderRect; - InflateRect(Result, dxLayoutSelectionMarkerWidth div 2, dxLayoutSelectionMarkerWidth div 2); -end; - -procedure TdxCustomLayoutItemViewInfo.SetElementWithMouse(Value: TdxCustomLayoutItemElementViewInfo); -begin - if FElementWithMouse <> Value then - begin - if FElementWithMouse <> nil then - FElementWithMouse.MouseLeave; - FElementWithMouse := Value; - if FElementWithMouse <> nil then - FElementWithMouse.MouseEnter; - end; -end; - -procedure TdxCustomLayoutItemViewInfo.SetOffset(ASide: TdxLayoutSide; Value: Integer); -begin - FOffsets[ASide] := Value; -end; - -function TdxCustomLayoutItemViewInfo.CreateHitTest(const P: TPoint): TdxCustomLayoutItemHitTest; -begin - Result := GetHitTestClass.Instance as TdxCustomLayoutItemHitTest; - Result.HitItem := Item; - Result.HitPoint := P; -end; - -procedure TdxCustomLayoutItemViewInfo.FreeNotification(AComponent: TComponent); -begin - FItem := nil; -end; - -procedure TdxCustomLayoutItemViewInfo.DoCreateViewInfos; -begin - FCaptionViewInfo := GetCaptionViewInfoClass.Create(Self); - FElements.Add(FCaptionViewInfo); -end; - -procedure TdxCustomLayoutItemViewInfo.CreateViewInfos; -begin - FElements := TObjectList.Create; - DoCreateViewInfos; -end; - -procedure TdxCustomLayoutItemViewInfo.DestroyViewInfos; -begin - FreeAndNil(FElements); -end; - -function TdxCustomLayoutItemViewInfo.CanDrawBackground: Boolean; -begin - Result := HasBackground; -end; - -function TdxCustomLayoutItemViewInfo.GetBackgroundColor: TColor; -begin - if IsDragImagePainted then - Result := dxLayoutSelectionDefaultColor - else - Result := Color; -end; - -function TdxCustomLayoutItemViewInfo.CalculateMinHeight: Integer; -begin - Result := DoCalculateHeight(True); -end; - -function TdxCustomLayoutItemViewInfo.CalculateMinWidth: Integer; -begin - Result := DoCalculateWidth(True); -end; - -function TdxCustomLayoutItemViewInfo.CalculateOffset(ASide: TdxLayoutSide): Integer; -begin - case ASide of - sdLeft: - Result := Item.Offsets.Left; - sdRight: - Result := Item.Offsets.Right; - sdTop: - Result := Item.Offsets.Top; - sdBottom: - Result := Item.Offsets.Bottom; - else - Result := 0; - end; -end; - -function TdxCustomLayoutItemViewInfo.GetAreaPart(const P: TPoint): TdxLayoutAreaPart; -const - Parts: array[Boolean, Boolean] of TdxLayoutAreaPart = ((apBottom, apRight), (apLeft, apTop)); - - function GetSign(const P1, P2, P: TPoint): Integer; - begin - Result := (P.X - P1.X) * (P2.Y - P1.Y) - (P.Y - P1.Y) * (P2.X - P1.X); - end; - -var - ASign1, ASign2: Integer; -begin - with Bounds do - begin - ASign1 := GetSign(Point(Left, Bottom), Point(Right, Top), P); - ASign2 := GetSign(TopLeft, BottomRight, P); - end; - Result := Parts[ASign1 >= 0, ASign2 >= 0]; - if ParentViewInfo <> nil then - ParentViewInfo.CorrectAreaPart(Result); -end; - -function TdxCustomLayoutItemViewInfo.GetActuallyVisible: Boolean; -begin - Result := Item.ActuallyVisible; -end; - -function TdxCustomLayoutItemViewInfo.DoCalculateHeight(AIsMinHeight: Boolean): Integer; -begin - Result := OffsetsHeight; -end; - -function TdxCustomLayoutItemViewInfo.DoCalculateWidth(AIsMinWidth: Boolean): Integer; -begin - Result := OffsetsWidth; -end; - -function TdxCustomLayoutItemViewInfo.GetCursor(X, Y: Integer): TCursor; -var - I: Integer; -begin - for I := 0 to ElementCount - 1 do - if Elements[I].WantsMouse(X, Y) then - begin - Result := Elements[I].GetCursor(X, Y); - Exit; - end; - Result := crDefault; -end; - -function TdxCustomLayoutItemViewInfo.GetElement(AIndex: Integer): TdxCustomLayoutItemElementViewInfo; -begin - if (AIndex >= 0) and (AIndex < GetElementCount) then - Result := TdxCustomLayoutItemElementViewInfo(FElements[AIndex]) - else - Result := nil; -end; - -function TdxCustomLayoutItemViewInfo.GetElementCount: Integer; -begin - Result := FElements.Count; -end; - -function TdxCustomLayoutItemViewInfo.GetEnabled: Boolean; -begin - Result := Item.Enabled; -end; - -function TdxCustomLayoutItemViewInfo.GetIsTransparent: Boolean; -begin - Result := ContainerViewInfo.HasBackground and IsDefaultColor; -end; - -function TdxCustomLayoutItemViewInfo.HasBackground: Boolean; -begin - Result := (ParentViewInfo = nil) {IsRoot} or - (LayoutLookAndFeel <> ParentViewInfo.LayoutLookAndFeel) or - IsDragImagePainted and IsDragged; -end; - -function TdxCustomLayoutItemViewInfo.HasCaption: Boolean; -begin - Result := Item.HasCaption; -end; - -function TdxCustomLayoutItemViewInfo.HasBorder: Boolean; -begin - Result := False; -end; - -procedure TdxCustomLayoutItemViewInfo.MouseEnter; -begin -end; - -procedure TdxCustomLayoutItemViewInfo.MouseLeave; -begin - ElementWithMouse := nil; -end; - -procedure TdxCustomLayoutItemViewInfo.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - if ElementWithMouse <> nil then - ElementWithMouse.MouseDown(Button, Shift, X, Y); -end; - -procedure TdxCustomLayoutItemViewInfo.MouseMove(Shift: TShiftState; X, Y: Integer); -var - I: Integer; -begin - for I := 0 to ElementCount - 1 do - if Elements[I].WantsMouse(X, Y) then - begin - ElementWithMouse := Elements[I]; - Elements[I].MouseMove(Shift, X, Y); - Exit; - end; - ElementWithMouse := nil; -end; - -procedure TdxCustomLayoutItemViewInfo.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - if ElementWithMouse <> nil then - ElementWithMouse.MouseUp(Button, Shift, X, Y); -end; - -procedure TdxCustomLayoutItemViewInfo.Calculate(const ABounds: TRect); -begin - inherited; - Inc(FBounds.Left, Offsets[sdLeft]); - Inc(FBounds.Top, Offsets[sdTop]); - Dec(FBounds.Right, Offsets[sdRight]); - Dec(FBounds.Bottom, Offsets[sdBottom]); -end; - -function TdxCustomLayoutItemViewInfo.CalculateHeight: Integer; -begin - Result := DoCalculateHeight(False); -end; - -function TdxCustomLayoutItemViewInfo.CalculateWidth: Integer; -begin - Result := DoCalculateWidth(False); -end; - -function TdxCustomLayoutItemViewInfo.GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; -begin - if not IsParentLocked and PtInRect(Bounds, P) and ActuallyVisible then - Result := CreateHitTest(P) - else - Result := nil; -end; - -function TdxCustomLayoutItemViewInfo.GetItemWithMouse(const P: TPoint): TdxCustomLayoutItem; -begin - if not IsParentLocked and PtInRect(Bounds, P) and ActuallyVisible then - Result := Item - else - Result := nil; -end; - -procedure TdxCustomLayoutItemViewInfo.ResetOffset(ASide: TdxLayoutSide); -begin - FOffsets[ASide] := 0; -end; - -{ TdxLayoutItemCaptionViewInfo } - -function TdxLayoutItemCaptionViewInfo.GetItem: TdxLayoutItem; -begin - Result := TdxLayoutItem(inherited GetItem); -end; - -function TdxLayoutItemCaptionViewInfo.GetItemViewInfo: TdxLayoutItemViewInfo; -begin - Result := TdxLayoutItemViewInfo(inherited ItemViewInfo); -end; - -function TdxLayoutItemCaptionViewInfo.GetAlignVert: TdxAlignmentVert; -begin - Result := Item.CaptionOptions.AlignVert; -end; - -function TdxLayoutItemCaptionViewInfo.GetIsFixedWidth: Boolean; -begin - Result := Item.CaptionOptions.Width <> 0; -end; - -function TdxLayoutItemCaptionViewInfo.GetMultiLine: Boolean; -begin - Result := IsFixedWidth; -end; - -function TdxLayoutItemCaptionViewInfo.GetSpaceBetweenImageText: Integer; -begin - Result := ItemViewInfo.ControlOffsetHorz; -end; - -function TdxLayoutItemCaptionViewInfo.GetTextAreaBounds: TRect; -var - ADelta: Integer; -begin - Result := inherited GetTextAreaBounds; - if IsFixedWidth then - with Result do - begin - ADelta := Width - CalculateWidth; - case AlignHorz of - taLeftJustify: - Dec(Right, ADelta); - taRightJustify: - Inc(Left, ADelta); - taCenter: - begin - Inc(Left, ADelta div 2); - Dec(Right, ADelta - ADelta div 2); - end; - end; - end; -end; - -function TdxLayoutItemCaptionViewInfo.GetTextWidth: Integer; -begin - if Visible and IsFixedWidth then - Result := Item.CaptionOptions.Width - else - Result := inherited GetTextWidth; -end; - -function TdxLayoutItemCaptionViewInfo.CalculateMinWidth: Integer; -begin - if FWidth = 0 then - Result := CalculateWidth - else - Result := Width; -end; - -{ TdxLayoutItemControlViewInfo } - -function TdxLayoutItemControlViewInfo.GetBorderColor: TColor; -begin - Result := ItemViewInfo.Options.GetControlBorderColor; -end; - -function TdxLayoutItemControlViewInfo.GetBorderStyle: TdxLayoutBorderStyle; -begin - Result := ItemViewInfo.Options.ControlBorderStyle; -end; - -function TdxLayoutItemControlViewInfo.GetControl: TControl; -begin - Result := Item.Control; -end; - -function TdxLayoutItemControlViewInfo.GetItem: TdxLayoutItem; -begin - Result := TdxLayoutItem(inherited Item); -end; - -function TdxLayoutItemControlViewInfo.GetItemViewInfo: TdxLayoutItemViewInfo; -begin - Result := TdxLayoutItemViewInfo(inherited ItemViewInfo); -end; - -function TdxLayoutItemControlViewInfo.GetOpaqueControl: Boolean; -begin - Result := Item.ControlOptions.Opaque; -end; - -function TdxLayoutItemControlViewInfo.GetVisible: Boolean; -begin - Result := ItemViewInfo.HasControl and not ItemViewInfo.IsAvailable and (not ItemViewInfo.IsDragImagePainted or ItemViewInfo.ActuallyVisible); -end; - -function TdxLayoutItemControlViewInfo.CalculateControlBounds: TRect; -begin - Result := Bounds; - Inc(Result.Left, BorderWidths[sdLeft]); - Dec(Result.Right, BorderWidths[sdRight]); - Inc(Result.Top, BorderWidths[sdTop]); - Dec(Result.Bottom, BorderWidths[sdBottom]); -end; - -function TdxLayoutItemControlViewInfo.GetBorderWidth(ASide: TdxLayoutSide): Integer; -begin - if HasBorder then - Result := LayoutLookAndFeel.ItemControlBorderWidths[ASide] - else - Result := 0 -end; - -function TdxLayoutItemControlViewInfo.GetControlAreaHeight(AControlHeight: Integer): Integer; -begin - Result := BorderWidths[sdTop] + AControlHeight + BorderWidths[sdBottom]; -end; - -function TdxLayoutItemControlViewInfo.GetControlAreaWidth(AControlWidth: Integer): Integer; -begin - Result := BorderWidths[sdLeft] + AControlWidth + BorderWidths[sdRight]; -end; - -function TdxLayoutItemControlViewInfo.HasBorder: Boolean; -begin - Result := Item.ControlOptions.ShowBorder and not ItemViewInfo.IsAvailable; -end; - -procedure TdxLayoutItemControlViewInfo.Calculate(const ABounds: TRect); -begin - inherited; - FControlBounds := CalculateControlBounds; -end; - -procedure TdxLayoutItemControlViewInfo.CalculateTabOrder(var AAvailTabOrder: Integer); -begin - if Item.HasWinControl then - begin - TWinControl(Control).TabOrder := AAvailTabOrder; - Inc(AAvailTabOrder); - end; -end; - -function TdxLayoutItemControlViewInfo.CalculateMinHeight: Integer; -begin - if Item.ControlOptions.FixedSize then - Result := CalculateHeight - else - if Visible then - Result := GetControlAreaHeight(Item.ControlOptions.MinHeight) - else - Result := 0; -end; - -function TdxLayoutItemControlViewInfo.CalculateMinWidth: Integer; -begin - if Item.ControlOptions.FixedSize then - Result := CalculateWidth - else - if Visible then - Result := GetControlAreaWidth(Item.ControlOptions.MinWidth) - else - Result := 0; -end; - -function TdxLayoutItemControlViewInfo.CalculateHeight: Integer; -begin - if Visible then - Result := GetControlAreaHeight(Item.OriginalControlSize.Y) - else - Result := 0; -end; - -function TdxLayoutItemControlViewInfo.CalculateWidth: Integer; -begin - if Visible then - Result := GetControlAreaWidth(Item.OriginalControlSize.X) - else - Result := 0; -end; - -{ TdxLayoutItemViewInfo } - -function TdxLayoutItemViewInfo.GetCaptionViewInfo: TdxLayoutItemCaptionViewInfo; -begin - Result := TdxLayoutItemCaptionViewInfo(inherited CaptionViewInfo); -end; - -function TdxLayoutItemViewInfo.GetItem: TdxLayoutItem; -begin - Result := TdxLayoutItem(inherited Item); -end; - -function TdxLayoutItemViewInfo.GetOptionsEx: TdxLayoutLookAndFeelItemOptions; -begin - Result := TdxLayoutLookAndFeelItemOptions(inherited Options); -end; - -function TdxLayoutItemViewInfo.GetDesignSelectorRect: TRect; -const - SelectorRectOffset = 3; - SelectorRectWidth = 10; -var - AControlBounds: TRect; -begin - AControlBounds := ControlViewInfo.ControlBounds; - Result := AControlBounds; - Result.Left := Result.Right - SelectorRectWidth; - Result.Top := Result.Bottom - SelectorRectWidth; - OffsetRect(Result, -SelectorRectOffset, -SelectorRectOffset); -end; - -procedure TdxLayoutItemViewInfo.DoCreateViewInfos; -begin - inherited; - FControlViewInfo := GetControlViewInfoClass.Create(Self); - FElements.Add(FControlViewInfo); -end; - -function TdxLayoutItemViewInfo.GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; -begin - Result := TdxLayoutItemCaptionViewInfo; -end; - -function TdxLayoutItemViewInfo.GetControlViewInfoClass: TdxLayoutItemControlViewInfoClass; -begin - Result := TdxLayoutItemControlViewInfo; -end; - -function TdxLayoutItemViewInfo.GetHitTestClass: TdxCustomLayoutItemHitTestClass; -begin - Result := TdxLayoutItemHitTest; -end; - -function TdxLayoutItemViewInfo.GetPainterClass: TdxCustomLayoutItemPainterClass; -begin - Result := TdxCustomLayoutItemPainterClass(LayoutLookAndFeel.GetItemPainterClass); -end; - -procedure TdxLayoutItemViewInfo.CalculateViewInfosBounds(var ACaptionBounds, - AControlBounds: TRect); -var - ACaptionSize, AControlSize: TPoint; - ACaptionVisible, AControlVisible: Boolean; - - procedure CalculateElementViewInfoSize(AElementViewInfo: TdxCustomLayoutItemElementViewInfo; - var ASize: TPoint; var AVisible: Boolean); - begin - AVisible := AElementViewInfo.Visible; - if AVisible then - ASize := Point(AElementViewInfo.Width, AElementViewInfo.Height) - else - ASize := cxNullPoint; - AVisible := AVisible and not cxPointIsEqual(ASize, cxNullPoint); - //AVisible := AVisible and (ASize.X <> 0) and (ASize.Y <> 0); - end; - - procedure CalculateMainBounds; - - procedure InitBounds(var ABounds: TRect; const ASize: TPoint; AVisible: Boolean); - begin - if AVisible then - ABounds := ContentBounds - else - SetRectEmpty(ABounds); - end; - - procedure CalculateWithFixedControl; - begin - case CaptionLayout of - clLeft: - begin - AControlBounds.Left := AControlBounds.Right - AControlSize.X; - ACaptionBounds.Right := AControlBounds.Left - ControlOffsetHorz; - end; - clTop: - begin - AControlBounds.Top := AControlBounds.Bottom - AControlSize.Y; - ACaptionBounds.Bottom := AControlBounds.Top - ControlOffsetVert; - end; - clRight: - begin - AControlBounds.Right := AControlBounds.Left + AControlSize.X; - ACaptionBounds.Left := AControlBounds.Right + ControlOffsetHorz; - end; - clBottom: - begin - AControlBounds.Bottom := AControlBounds.Top + AControlSize.Y; - ACaptionBounds.Top := AControlBounds.Bottom + ControlOffsetVert; - end; - end - end; - - procedure CalculateWithFixedCaption; - begin - case CaptionLayout of - clLeft: - begin - ACaptionBounds.Right := ACaptionBounds.Left + ACaptionSize.X; - AControlBounds.Left := ACaptionBounds.Right + ControlOffsetHorz; - end; - clTop: - begin - ACaptionBounds.Bottom := ACaptionBounds.Top + ACaptionSize.Y; - AControlBounds.Top := ACaptionBounds.Bottom + ControlOffsetVert; - end; - clRight: - begin - ACaptionBounds.Left := ACaptionBounds.Right - ACaptionSize.X; - AControlBounds.Right := ACaptionBounds.Left - ControlOffsetHorz; - end; - clBottom: - begin - ACaptionBounds.Top := ACaptionBounds.Bottom - ACaptionSize.Y; - AControlBounds.Bottom := ACaptionBounds.Top - ControlOffsetVert; - end; - end; - end; - - begin - InitBounds(ACaptionBounds, ACaptionSize, ACaptionVisible); - InitBounds(AControlBounds, AControlSize, AControlVisible); - if ACaptionVisible and AControlVisible then - if Item.ControlOptions.FixedSize then - CalculateWithFixedControl - else - CalculateWithFixedCaption - else - if AControlVisible and Item.ControlOptions.FixedSize then - begin - AControlBounds.Right := AControlBounds.Left + AControlSize.X; - AControlBounds.Bottom := AControlBounds.Top + AControlSize.Y; - end; - end; - - procedure CalculateRestBounds(var ABounds: TRect; const ASize: TPoint; - AAlignHorz: TAlignment; AAlignVert: TdxAlignmentVert); - begin - with ABounds do - case CaptionLayout of - clLeft, clRight: - case AAlignVert of - tavTop: - Bottom := Top + ASize.Y; - tavCenter: - begin - Top := (Top + Bottom - ASize.Y) div 2; - Bottom := Top + ASize.Y; - end; - tavBottom: - Top := Bottom - ASize.Y; - end; - clTop, clBottom: - case AAlignHorz of - taLeftJustify: - Right := Left + ASize.X; - taCenter: - begin - Left := (Left + Right - ASize.X) div 2; - Right := Left + ASize.X; - end; - taRightJustify: - Left := Right - ASize.X; - end; - end; - end; - -begin - CalculateElementViewInfoSize(CaptionViewInfo, ACaptionSize, ACaptionVisible); - CalculateElementViewInfoSize(ControlViewInfo, AControlSize, AControlVisible); - CalculateMainBounds; - if ACaptionVisible then - begin - CalculateRestBounds(ACaptionBounds, ACaptionSize, - Item.CaptionOptions.AlignHorz, Item.CaptionOptions.AlignVert); - if AControlVisible and - ((AlignHorz <> ahClient) or (CaptionLayout in [clLeft, clRight])) and - ((AlignVert <> avClient) or (CaptionLayout in [clTop, clBottom])) then - CalculateRestBounds(AControlBounds, AControlSize, taLeftJustify, tavTop); - end; -end; - -function TdxLayoutItemViewInfo.DoCalculateHeight(AIsMinHeight: Boolean): Integer; -var - AHeight: Integer; -begin - Result := CaptionViewInfo.Height; - if AIsMinHeight then - AHeight := ControlViewInfo.CalculateMinHeight - else - AHeight := ControlViewInfo.CalculateHeight; - - case CaptionLayout of - clLeft, clRight: - Result := Max(Result, AHeight); - clTop, clBottom: - begin - if (Result <> 0) and ControlViewInfo.Visible{(AHeight <> 0)} then - Inc(Result, ControlOffsetVert); - Inc(Result, AHeight); - end; - else - Result := 0; - end; - - Inc(Result, inherited DoCalculateHeight(AIsMinHeight)); -end; - -function TdxLayoutItemViewInfo.DoCalculateWidth(AIsMinWidth: Boolean): Integer; -var - AWidth: Integer; -begin - if AIsMinWidth then - begin - Result := CaptionViewInfo.CalculateMinWidth; - AWidth := ControlViewInfo.CalculateMinWidth; - end - else - begin - Result := CaptionViewInfo.Width; - AWidth := ControlViewInfo.CalculateWidth; - end; - - case CaptionLayout of - clLeft, clRight: - begin - if (Result <> 0) and CaptionViewInfo.IsTextVisible and ControlViewInfo.Visible{(AWidth <> 0)} then - Inc(Result, ControlOffsetHorz); - Inc(Result, AWidth); - end; - clTop, clBottom: - Result := Max(Result, AWidth); - else - Result := 0; - end; - - Inc(Result, inherited DoCalculateWidth(AIsMinWidth)); -end; - -function TdxLayoutItemViewInfo.GetAutoControlAlignment: Boolean; - - function AreAlignmentAndCaptionLayoutLinked: Boolean; - begin - case CaptionLayout of - clLeft: - Result := AlignHorz in [ahLeft, ahClient]; - clTop: - Result := AlignVert in [avTop, avClient]; - clRight: - Result := AlignHorz in [ahRight, ahClient]; - clBottom: - Result := AlignVert in [avBottom, avClient]; - else - Result := False; - end; - end; - -begin - Result := - Item.ControlOptions.AutoAlignment and HasCaption and HasControl and - AreAlignmentAndCaptionLayoutLinked; -end; - -function TdxLayoutItemViewInfo.GetCaptionLayout: TdxCaptionLayout; -begin - Result := Item.CaptionOptions.Layout; -end; - -function TdxLayoutItemViewInfo.GetColor: TColor; -begin - if ParentViewInfo <> nil then // for dragging - Result := ParentViewInfo.GetColor - else - Result := ContainerViewInfo.ItemsViewInfo.GetColor; -end; - -function TdxLayoutItemViewInfo.GetContentBounds: TRect; -begin - Result := Bounds; -end; - -function TdxLayoutItemViewInfo.GetControlOffsetHorz: Integer; -begin - Result := LayoutLookAndFeel.GetControlOffsetHorz(Item.Container); -end; - -function TdxLayoutItemViewInfo.GetControlOffsetVert: Integer; -begin - Result := LayoutLookAndFeel.GetControlOffsetVert(Item.Container); -end; - -function TdxLayoutItemViewInfo.GetIsDefaultColor: Boolean; -begin - Result := ParentViewInfo.IsDefaultColor; -end; - -function TdxLayoutItemViewInfo.GetOptions: TdxCustomLayoutLookAndFeelOptions; -begin - Result := LayoutLookAndFeel.ItemOptions; -end; - -function TdxLayoutItemViewInfo.HasControl: Boolean; -begin - Result := Item.HasControl; -end; - -procedure TdxLayoutItemViewInfo.PaintSelectionLayer; -begin - inherited; - if HasControl and ActuallyVisible and IsParentSelected and not Selected then - ContainerViewInfo.SelectionLayer.SelectionImage.cxCanvas.FillRect(ControlViewInfo.Bounds, 0); -end; - -function TdxLayoutItemViewInfo.PtInDesignSelectorRect(const P: TPoint): Boolean; -begin - Result := PtInRect(DesignSelectorRect, P); -end; - -procedure TdxLayoutItemViewInfo.Calculate(const ABounds: TRect); -var - ACaptionViewInfoBounds, AControlViewInfoBounds: TRect; -begin - inherited; - CalculateViewInfosBounds(ACaptionViewInfoBounds, AControlViewInfoBounds); - CaptionViewInfo.Calculate(ACaptionViewInfoBounds); - ControlViewInfo.Calculate(AControlViewInfoBounds); - Item.UpdateDesignSelectors; -end; - -procedure TdxLayoutItemViewInfo.CalculateTabOrders(var AAvailTabOrder: Integer); -begin - ControlViewInfo.CalculateTabOrder(AAvailTabOrder); -end; - -{ TdxLayoutGroupCaptionViewInfo } - -function TdxLayoutGroupCaptionViewInfo.GetAlignVert: TdxAlignmentVert; -begin - Result := tavTop; -end; - -function TdxLayoutGroupCaptionViewInfo.GetMultiLine: Boolean; -begin - Result := False; -end; - -function TdxLayoutGroupCaptionViewInfo.CalculateMinWidth: Integer; -begin - Result := CalculateWidth; -end; - -{ TdxLayoutGroupViewInfoSpecific } - -constructor TdxLayoutGroupViewInfoSpecific.Create(AGroupViewInfo: TdxLayoutGroupViewInfo); -begin - inherited Create; - FGroupViewInfo := AGroupViewInfo; - CreateSpecificControls; -end; - -destructor TdxLayoutGroupViewInfoSpecific.Destroy; -begin - DestroySpecificControls; - inherited Destroy; -end; - -procedure TdxLayoutGroupViewInfoSpecific.Calculate(const AItemsAreaBounds: TRect); -begin - CalculateItemsBounds(AItemsAreaBounds); -end; - -procedure TdxLayoutGroupViewInfoSpecific.PrepareItemInfos; -var - I: Integer; -begin - SetLength(FItemInfos, ItemViewInfoCount); - for I := 0 to ItemViewInfoCount - 1 do - begin - FItemInfos[I].ViewInfo := ItemViewInfos[I]; - FItemInfos[I].AlignHorz := GetItemAlignHorz(FItemInfos[I].ViewInfo); - FItemInfos[I].CalculatedWidth := GetItemWidth(FItemInfos[I].ViewInfo); - FItemInfos[I].Height := GetItemHeight(FItemInfos[I].ViewInfo); - FItemInfos[I].MinWidth := GetItemMinWidth(FItemInfos[I].ViewInfo); - FItemInfos[I].Calculated := False; - end; -end; - -procedure TdxLayoutGroupViewInfoSpecific.CalculateItemsHorizontalBounds(const AItemsAreaBounds: TRect); -var - ASpace, AAvailableSpace: Integer; - - procedure CalculateSpaces; - var - AItemOffsets, I: Integer; - AIsFirstItem: Boolean; - begin - AItemOffsets := 0; - ASpace := 0; - AIsFirstItem := True; - for I := 0 to ItemViewInfoCount - 1 do - if FItemInfos[I].AlignHorz <> ahCenter then - begin - if not AIsFirstItem then - Inc(AItemOffsets, ItemOffset); - Inc(ASpace, FItemInfos[I].CalculatedWidth); - AIsFirstItem := False; - end; - AAvailableSpace := cxRectWidth(AItemsAreaBounds) - AItemOffsets; - end; - - procedure InternalCalculateItemsVisibleSizes; - - procedure CalculateNonClientAlignedItemsVisibleSizes; - var - I: Integer; - begin - for I := 0 to ItemViewInfoCount - 1 do - if FItemInfos[I].AlignHorz <> ahClient then - begin - FItemInfos[I].Width := FItemInfos[I].CalculatedWidth; - if FItemInfos[I].AlignHorz <> ahCenter then - begin - Dec(ASpace, FItemInfos[I].Width); - Dec(AAvailableSpace, FItemInfos[I].Width); - end; - FItemInfos[I].Calculated := True; - end; - end; - - procedure CalculateClientAlignedItemsVisibleSizes; - var - ANeedRecalculating: Boolean; - ANextSpace, ANextAvailableSpace, I: Integer; - begin - repeat - ANeedRecalculating := False; - ANextSpace := ASpace; - ANextAvailableSpace := AAvailableSpace; - - for I := 0 to ItemViewInfoCount - 1 do - if not FItemInfos[I].Calculated then - begin - FItemInfos[I].Width := MulDiv(AAvailableSpace, FItemInfos[I].CalculatedWidth, ASpace); - if FItemInfos[I].Width < FItemInfos[I].MinWidth then - begin - FItemInfos[I].Width := FItemInfos[I].MinWidth; - Dec(ANextSpace, FItemInfos[I].CalculatedWidth); - Dec(ANextAvailableSpace, FItemInfos[I].Width); - FItemInfos[I].Calculated := True; - ANeedRecalculating := True; - end; - end; - - ASpace := ANextSpace; - AAvailableSpace := ANextAvailableSpace; - until not ANeedRecalculating; - end; - - begin - CalculateNonClientAlignedItemsVisibleSizes; - CalculateClientAlignedItemsVisibleSizes; - end; - - procedure InternalCalculateItemsBounds; - - procedure CalculateLeftAlignedItemsBounds; - var - AOffset, I: Integer; - begin - AOffset := AItemsAreaBounds.Left; - for I := 0 to ItemViewInfoCount - 1 do - with FItemInfos[I] do - case AlignHorz of - ahLeft, ahClient: - begin - Bounds.Left := AOffset; - Bounds.Right := AOffset + Width; - Inc(AOffset, Width + ItemOffset); - end; - ahCenter: - begin - Bounds.Left := (AItemsAreaBounds.Left + AItemsAreaBounds.Right - Width) div 2; - Bounds.Right := Bounds.Left + Width; - end; - end; - end; - - procedure CalculateRightAlignedItemsBounds; - var - AOffset, I: Integer; - begin - AOffset := AItemsAreaBounds.Right; - for I := ItemViewInfoCount - 1 downto 0 do - with FItemInfos[I] do - if AlignHorz = ahRight then - begin - Bounds.Right := AOffset; - Bounds.Left := AOffset - Width; - Dec(AOffset, Width + ItemOffset); - end; - end; - - begin - CalculateLeftAlignedItemsBounds; - CalculateRightAlignedItemsBounds; - end; - -begin - CalculateSpaces; - InternalCalculateItemsVisibleSizes; - InternalCalculateItemsBounds; -end; - -procedure TdxLayoutGroupViewInfoSpecific.CalculateItemsVerticalBounds(const AItemsAreaBounds: TRect); -var - I: Integer; -begin - for I := 0 to ItemViewInfoCount - 1 do - with FItemInfos[I] do - case GetItemAlignVert(ViewInfo) of - avTop: - begin - Bounds.Top := AItemsAreaBounds.Top; - Bounds.Bottom := Bounds.Top + Height; - end; - avCenter: - begin - Bounds.Top := (AItemsAreaBounds.Top + AItemsAreaBounds.Bottom - Height) div 2; - Bounds.Bottom := Bounds.Top + Height; - end; - avBottom: - begin - Bounds.Bottom := AItemsAreaBounds.Bottom; - Bounds.Top := Bounds.Bottom - Height; - end; - avClient: - begin - Bounds.Top := AItemsAreaBounds.Top; - Bounds.Bottom := AItemsAreaBounds.Bottom; - end; - end; -end; - -procedure TdxLayoutGroupViewInfoSpecific.CalculateTabOrders(var ATabOrder: Integer); -begin -// do nothing -end; - -procedure TdxLayoutGroupViewInfoSpecific.CalculateItemViewInfos; -var - I: Integer; -begin - for I := 0 to ItemViewInfoCount - 1 do - begin - ConvertCoords(FItemInfos[I].Bounds); - FItemInfos[I].ViewInfo.Calculate(FItemInfos[I].Bounds); - end; -end; - -function TdxLayoutGroupViewInfoSpecific.GetContainer: TdxCustomLayoutControl; -begin - Result := GroupViewInfo.ContainerViewInfo.Control; -end; - -function TdxLayoutGroupViewInfoSpecific.GetItemOffset: Integer; -begin - Result := FGroupViewInfo.ItemOffset; -end; - -function TdxLayoutGroupViewInfoSpecific.GetItemViewInfo(Index: Integer): TdxCustomLayoutItemViewInfo; -begin - Result := FGroupViewInfo.ItemViewInfos[Index]; -end; - -function TdxLayoutGroupViewInfoSpecific.GetItemViewInfoCount: Integer; -begin - Result := FGroupViewInfo.ItemViewInfoCount; -end; - -function TdxLayoutGroupViewInfoSpecific.GetLayoutDirection: TdxLayoutDirection; -begin - Result := FGroupViewInfo.LayoutDirection; -end; - -procedure TdxLayoutGroupViewInfoSpecific.CreateSpecificControls; -begin -// do nothing -end; - -procedure TdxLayoutGroupViewInfoSpecific.DestroySpecificControls; -begin -// do nothing -end; - -procedure TdxLayoutGroupViewInfoSpecific.CreateViewInfos; -begin -// do nothing -end; - -procedure TdxLayoutGroupViewInfoSpecific.SetControlVisibility; -begin -// do nothing -end; - -procedure TdxLayoutGroupViewInfoSpecific.AddSelectionControls; -begin -// do nothing -end; - -procedure TdxLayoutGroupViewInfoSpecific.RemoveSelectionControls; -begin -// do nothing -end; - -procedure TdxLayoutGroupViewInfoSpecific.DrawSpecificPart(ACanvas: TcxCanvas); -begin -// do nothing -end; - -procedure TdxLayoutGroupViewInfoSpecific.DrawSpecificBackground(ACanvas: TcxCanvas); -begin - if GroupViewInfo.HasBackground then - ACanvas.FillRect(GroupViewInfo.BackgroundBounds, GroupViewInfo.GetBackgroundColor); -end; - -function TdxLayoutGroupViewInfoSpecific.GetCustomHeight(AIsMinHeight: Boolean): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ItemViewInfoCount - 1 do - if AIsMinHeight then - Result := Max(Result, GetItemMinHeight(ItemViewInfos[I])) - else - Result := Max(Result, GetItemHeight(ItemViewInfos[I])) -end; - -function TdxLayoutGroupViewInfoSpecific.GetCustomWidth(AIsMinWidth: Boolean): Integer; -var - AIsFirstItem: Boolean; - I: Integer; - AItemViewInfo: TdxCustomLayoutItemViewInfo; -begin - Result := 0; - AIsFirstItem := True; - for I := 0 to ItemViewInfoCount - 1 do - begin - AItemViewInfo := ItemViewInfos[I]; - if GetItemAlignHorz(AItemViewInfo) <> ahCenter then - begin - if not AIsFirstItem then - Inc(Result, ItemOffset); - if AIsMinWidth then - Inc(Result, GetItemMinWidth(AItemViewInfo)) - else - Inc(Result, GetItemWidth(AItemViewInfo)); - AIsFirstItem := False; - end; - end; - for I := 0 to ItemViewInfoCount - 1 do - begin - AItemViewInfo := ItemViewInfos[I]; - if GetItemAlignHorz(AItemViewInfo) = ahCenter then - if AIsMinWidth then - Result := Max(Result, GetItemMinWidth(AItemViewInfo)) - else - Result := Max(Result, GetItemWidth(AItemViewInfo)) - end; -end; - -procedure TdxLayoutGroupViewInfoSpecific.CorrectAreaPart(var AAreaPart: TdxLayoutAreaPart); -begin -// do nothing -end; - -function TdxLayoutGroupViewInfoSpecific.GetAreaPart(const P: TPoint): TdxLayoutAreaPart; -begin - Result := apNone; - if (GroupViewInfo.Group.VisibleCount = 0) and PtInRect(dxGetCenterAreaBounds(GroupViewInfo.Bounds), P) then - Result := apCenter; -end; - -function TdxLayoutGroupViewInfoSpecific.GetAreaPartBounds(AAreaPart: TdxLayoutAreaPart; AItemViewInfo: TdxCustomLayoutItemViewInfo): TRect; -begin - Result := cxInvalidRect; -end; - -function TdxLayoutGroupViewInfoSpecific.GetItemsAreaOffset(ASide: TdxLayoutSide): Integer; -begin - Result := 0; -end; - -procedure TdxLayoutGroupViewInfoSpecific.ConvertCoords(var R: TRect); -begin -end; - -procedure TdxLayoutGroupViewInfoSpecific.CalculateItemsBounds(AItemsAreaBounds: TRect); -begin - ConvertCoords(AItemsAreaBounds); - PrepareItemInfos; - CalculateItemsHorizontalBounds(AItemsAreaBounds); - CalculateItemsVerticalBounds(AItemsAreaBounds); - CalculateItemViewInfos; -end; - -function TdxLayoutGroupViewInfoSpecific.CanDrawBackground: Boolean; -begin - Result := False; -end; - -function TdxLayoutGroupViewInfoSpecific.GetItemsAreaHeight(AIsMinHeight: Boolean): Integer; -begin - Result := GetCustomHeight(AIsMinHeight); -end; - -function TdxLayoutGroupViewInfoSpecific.GetItemsAreaWidth(AIsMinWidth: Boolean): Integer; -begin - Result := GetCustomWidth(AIsMinWidth); -end; - -function TdxLayoutGroupViewInfoSpecific.AllowDrawChild(AChild: TdxCustomLayoutItem): Boolean; -begin - Result := True; -end; - -function TdxLayoutGroupViewInfoSpecific.AllowChildHasBorder: Boolean; -begin - Result := True; -end; - -{ TdxLayoutGroupHorizontalSpecific } - -function TdxLayoutGroupViewInfoHorizontalSpecific.GetActionType(AAreaPart: TdxLayoutAreaPart): TdxLayoutActionType; -begin - if AAreaPart in [apLeft, apRight, apAfter, apBefore] then - Result := atInsert - else - Result := atCreateGroup; -end; - -function TdxLayoutGroupViewInfoHorizontalSpecific.GetAreaPartBounds(AAreaPart: TdxLayoutAreaPart; AItemViewInfo: TdxCustomLayoutItemViewInfo): TRect; -begin - if AAreaPart = apCenter then - begin - Result := GroupViewInfo.ClientBounds; - with Result do - Right := Left + dxLayoutThinPartWidth; - InflateRect(Result, Integer(cxRectWidth(Result) = 0), Integer(cxRectHeight(Result) = 0)); - end - else - Result := inherited GetAreaPartBounds(AAreaPart, AItemViewInfo); -end; - -function TdxLayoutGroupViewInfoHorizontalSpecific.GetItemAlignHorz(AViewInfo: TdxCustomLayoutItemViewInfo): TdxLayoutAlignHorz; -begin - Result := AViewInfo.AlignHorz; -end; - -function TdxLayoutGroupViewInfoHorizontalSpecific.GetItemAlignVert(AViewInfo: TdxCustomLayoutItemViewInfo): TdxLayoutAlignVert; -begin - Result := AViewInfo.AlignVert; -end; - -function TdxLayoutGroupViewInfoHorizontalSpecific.GetItemHeight(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; -begin - Result := AViewInfo.Height; -end; - -function TdxLayoutGroupViewInfoHorizontalSpecific.GetItemWidth(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; -begin - Result := AViewInfo.Width; -end; - -function TdxLayoutGroupViewInfoHorizontalSpecific.GetItemMinHeight(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; -begin - Result := AViewInfo.MinHeight; -end; - -function TdxLayoutGroupViewInfoHorizontalSpecific.GetItemMinWidth(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; -begin - Result := AViewInfo.MinWidth; -end; - -function TdxLayoutGroupViewInfoHorizontalSpecific.IsAtInsertionPos(const R: TRect; - const P: TPoint): Boolean; -begin - Result := P.X < (R.Left + R.Right) div 2; -end; - -{ TdxLayoutGroupViewInfoVerticalSpecific } - -procedure TdxLayoutGroupViewInfoVerticalSpecific.ConvertCoords(var R: TRect); -begin - ExchangeLongWords(R.Left, R.Top); - ExchangeLongWords(R.Right, R.Bottom); -end; - -function TdxLayoutGroupViewInfoVerticalSpecific.GetActionType(AAreaPart: TdxLayoutAreaPart): TdxLayoutActionType; -begin - if AAreaPart in [apTop, apBottom, apAfter, apBefore] then - Result := atInsert - else - Result := atCreateGroup; -end; - -function TdxLayoutGroupViewInfoVerticalSpecific.GetAreaPartBounds(AAreaPart: TdxLayoutAreaPart; AItemViewInfo: TdxCustomLayoutItemViewInfo): TRect; -begin - if AAreaPart = apCenter then - begin - Result := GroupViewInfo.ClientBounds; - with Result do - Bottom := Top + dxLayoutThinPartWidth; - InflateRect(Result, Integer(cxRectWidth(Result) = 0), Integer(cxRectHeight(Result) = 0)); - end - else - Result := inherited GetAreaPartBounds(AAreaPart, AItemViewInfo); -end; - -function TdxLayoutGroupViewInfoVerticalSpecific.GetItemAlignHorz(AViewInfo: TdxCustomLayoutItemViewInfo): TdxLayoutAlignHorz; -begin - Result := TdxLayoutAlignHorz(AViewInfo.AlignVert); -end; - -function TdxLayoutGroupViewInfoVerticalSpecific.GetItemAlignVert(AViewInfo: TdxCustomLayoutItemViewInfo): TdxLayoutAlignVert; -begin - Result := TdxLayoutAlignVert(AViewInfo.AlignHorz); -end; - -function TdxLayoutGroupViewInfoVerticalSpecific.GetItemHeight(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; -begin - Result := AViewInfo.GetWidth; -end; - -function TdxLayoutGroupViewInfoVerticalSpecific.GetItemWidth(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; -begin - Result := AViewInfo.GetHeight; -end; - -function TdxLayoutGroupViewInfoVerticalSpecific.GetItemMinHeight(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; -begin - Result := AViewInfo.MinWidth; -end; - -function TdxLayoutGroupViewInfoVerticalSpecific.GetItemMinWidth(AViewInfo: TdxCustomLayoutItemViewInfo): Integer; -begin - Result := AViewInfo.MinHeight; -end; - -function TdxLayoutGroupViewInfoVerticalSpecific.GetItemsAreaHeight(AIsMinHeight: Boolean): Integer; -begin - Result := inherited GetItemsAreaWidth(AIsMinHeight); -end; - -function TdxLayoutGroupViewInfoVerticalSpecific.GetItemsAreaWidth(AIsMinWidth: Boolean): Integer; -begin - Result := inherited GetItemsAreaHeight(AIsMinWidth); -end; - -function TdxLayoutGroupViewInfoVerticalSpecific.IsAtInsertionPos(const R: TRect; - const P: TPoint): Boolean; -begin - Result := P.Y < (R.Top + R.Bottom) div 2; -end; - -{ TdxLayoutTabbedGroupTabControl } - -procedure TdxLayoutTabbedGroupTabControl.BoundsChanged; -var - ARegion: TcxRegion; -begin - inherited; - - if HandleAllocated then - begin - ARegion := TcxRegion.Create(Bounds); - try - ARegion.Combine(TcxRegion.Create(DisplayRect), roSubtract); - SetWindowRgn(Handle, ARegion.Handle, False); - finally - ARegion.Free; - end; - end; -end; - -function TdxLayoutTabbedGroupTabControl.GetDesignHitTest(X, Y: Integer; Shift: TShiftState): Boolean; -begin - Result := True; -end; - -procedure TdxLayoutTabbedGroupTabControl.Paint; -begin - inherited; - DoPaint; -end; - -procedure TdxLayoutTabbedGroupTabControl.DoPaint; -begin - CallNotify(FOnPaint, Self); -end; - -procedure TdxLayoutTabbedGroupTabControl.WMNCHitTest(var Message: TWMNCHitTest); -begin - Message.Result := HTTRANSPARENT; -end; - -{ TdxTabControlElementViewInfo } - -function TdxTabControlElementViewInfo.GetVisible: Boolean; -begin - Result := not cxRectIsEmpty(Bounds); -end; - -procedure TdxTabControlElementViewInfo.MouseEnter; -begin - FTabControl.MouseEnter(nil); -end; - -procedure TdxTabControlElementViewInfo.MouseLeave; -begin - FTabControl.MouseLeave(nil); -end; - -procedure TdxTabControlElementViewInfo.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - FTabControl.MouseDown(Button, Shift, X - FTabControl.Left, Y - FTabControl.Top); -end; - -procedure TdxTabControlElementViewInfo.MouseMove(Shift: TShiftState; X, Y: Integer); -var - ATabIndex: Integer; - AClientPoint: TPoint; -begin - FTabControl.MouseMove(Shift, X - FTabControl.Left, Y - FTabControl.Top); - if ItemViewInfo.ContainerViewInfo.Control.DragAndDropState <> ddsNone then - begin - AClientPoint := cxPointOffset(Point(X, Y), Point(FTabControl.Left, FTabControl.Top), False); - ATabIndex := FTabControl.IndexOfTabAt(AClientPoint.X, AClientPoint.Y); - if ATabIndex <> -1 then - FTabControl.TabIndex := ATabIndex; - end; -end; - -procedure TdxTabControlElementViewInfo.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - FTabControl.MouseUp(Button, Shift, X - FTabControl.Left, Y - FTabControl.Top); -end; - -{ TdxLayoutGroupViewInfoTabbedSpecific } - -procedure TdxLayoutGroupViewInfoTabbedSpecific.Calculate(const AItemsAreaBounds: TRect); -var - ARect: TRect; -begin - inherited; - - if HasTabControl then - begin - FTabControl.BoundsRect := GroupViewInfo.ClientBounds; - FTabControl.Parent := Container; - FTabControl.LockChangeEvent(True); - try - FTabControl.TabIndex := GroupViewInfo.Group.ItemIndex; - finally - FTabControl.LockChangeEvent(False); - end; - - ARect := GroupViewInfo.ClientBounds; - ARect.Bottom := GroupViewInfo.ItemsAreaBounds.Top; - FTabControlElementViewInfo.Calculate(ARect); - FTabControlElementViewInfo.FTabControl := FTabControl; - end - else - FTabControlElementViewInfo.Calculate(cxEmptyRect); -end; - -function TdxLayoutGroupViewInfoTabbedSpecific.AllowDrawChild(AChild: TdxCustomLayoutItem): Boolean; -begin - Result := inherited AllowDrawChild(AChild) and (AChild.VisibleIndex = GroupViewInfo.Group.ItemIndex); -end; - -function TdxLayoutGroupViewInfoTabbedSpecific.AllowChildHasBorder: Boolean; -begin - Result := False; -end; - -function TdxLayoutGroupViewInfoTabbedSpecific.CanDrawBackground: Boolean; -begin - Result := True; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.CalculateItemsHorizontalBounds(const AItemsAreaBounds: TRect); -var - I: Integer; -begin - for I := 0 to ItemViewInfoCount - 1 do - with FItemInfos[I] do - begin - Width := CalculatedWidth; - - case GetItemAlignHorz(ViewInfo) of - ahLeft: - begin - Bounds.Left := AItemsAreaBounds.Left; - Bounds.Right := Bounds.Left + Width; - end; - ahCenter: - begin - Bounds.Left := (AItemsAreaBounds.Left + AItemsAreaBounds.Right - Width) div 2; - Bounds.Right := Bounds.Left + Width; - end; - ahRight: - begin - Bounds.Right := AItemsAreaBounds.Right; - Bounds.Left := Bounds.Right - Width; - end; - ahClient: - begin - Bounds.Left := AItemsAreaBounds.Left; - Bounds.Right := AItemsAreaBounds.Right; - end; - end; - end; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.CalculateItemsVerticalBounds(const AItemsAreaBounds: TRect); -begin - inherited; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.CalculateTabOrders(var ATabOrder: Integer); -begin - if HasTabControl then - begin - FTabControl.TabOrder := ATabOrder; - Inc(ATabOrder); - end; -end; - -function TdxLayoutGroupViewInfoTabbedSpecific.GetActionType(AAreaPart: TdxLayoutAreaPart): TdxLayoutActionType; -begin - Result := atInsert; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.CorrectAreaPart(var AAreaPart: TdxLayoutAreaPart); -begin - if AAreaPart in [apLeft, apTop] then - AAreaPart := apBefore; - if AAreaPart in [apRight, apBottom] then - AAreaPart := apAfter; -end; - -function TdxLayoutGroupViewInfoTabbedSpecific.GetAreaPart(const P: TPoint): TdxLayoutAreaPart; -begin - if HasTabControl and PtInRect(FTabControl.BoundsRect, P) then - Result := apLastChild - else - Result := inherited GetAreaPart(P); -end; - -function TdxLayoutGroupViewInfoTabbedSpecific.GetAreaPartBounds(AAreaPart: TdxLayoutAreaPart; AItemViewInfo: TdxCustomLayoutItemViewInfo): TRect; -begin - //#DG ToDo: refactor - case AAreaPart of - apBefore: - begin - Result := FTabControl.TabsTabs[FTabControl.TabIndex].VisibleRect; - Result.Right := Result.Left; - Result.Right := Result.Right + dxLayoutThinPartWidth; - OffsetRect(Result, FTabControl.Left, FTabControl.Top); - end; - apAfter: - begin - Result := FTabControl.TabsTabs[FTabControl.TabIndex].VisibleRect; - Result.Left := Result.Right; - Result.Right := Result.Right + dxLayoutThinPartWidth; - OffsetRect(Result, FTabControl.Left, FTabControl.Top); - end; - apLastChild: - begin - Result := FTabControl.TabsTabs[FTabControl.Tabs.Count - 1].VisibleRect; - Result.Left := Result.Right; - Result.Right := Result.Right + dxLayoutThinPartWidth; - OffsetRect(Result, FTabControl.Left, FTabControl.Top); - end; - else - Result := inherited GetAreaPartBounds(AAreaPart, AItemviewInfo); - end; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.DrawSpecificPart(ACanvas: TcxCanvas); -var - ARegion: TcxRegion; -begin - inherited DrawSpecificPart(ACanvas); - if HasTabControl then - begin - ACanvas.SaveState; - try - with FTabControl.BoundsRect.TopLeft do - MoveWindowOrg(ACanvas.Handle, X, Y); - ARegion := TcxRegion.Create; - try - GetWindowRgn(FTabControl.Handle, ARegion.Handle); - ACanvas.SetClipRegion(ARegion, roIntersect, False); - finally - ARegion.Free; - end; - FTabControl.PaintTo(ACanvas.Handle, 0, 0); - finally - ACanvas.RestoreState; - end; - end; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.DrawSpecificBackground(ACanvas: TcxCanvas); -var - P: TPoint; - ADisplayRect, ABoundsRect: TRect; -begin - if not HasTabControl or FSpecificPainting then - inherited - else - begin - ACanvas.SaveState; - FSpecificPainting := True; - try - ABoundsRect := FTabControl.BoundsRect; - ADisplayRect := FTabControl.DisplayRect; - P := cxPointOffset(ADisplayRect.TopLeft, ABoundsRect.TopLeft); - cxPaintTo(FTabControl, ACanvas, P, ADisplayRect, False); - finally - FSpecificPainting := False; - ACanvas.RestoreState; - end; - end; -end; - -function TdxLayoutGroupViewInfoTabbedSpecific.GetCustomHeight(AIsMinHeight: Boolean): Integer; -begin - Result := inherited GetCustomHeight(AIsMinHeight); -end; - -function TdxLayoutGroupViewInfoTabbedSpecific.GetCustomWidth(AIsMinWidth: Boolean): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ItemViewInfoCount - 1 do - if AIsMinWidth then - Result := Max(Result, GetItemMinWidth(ItemViewInfos[I])) - else - Result := Max(Result, GetItemWidth(ItemViewInfos[I])) -end; - -function TdxLayoutGroupViewInfoTabbedSpecific.GetItemsAreaOffset(ASide: TdxLayoutSide): Integer; -begin - Result := inherited GetItemsAreaOffset(ASide); - - // #DG !!! - if HasTabControl then - begin - Inc(Result, GroupViewInfo.LayoutLookAndFeel.GetItemsAreaOffset(GroupViewInfo.Group.Container)); - case ASide of - sdLeft: Inc(Result, TcxPCCustomPainterAccess(FTabControl.Painter).GetClientRectOffset.Left); - sdRight: Inc(Result, TcxPCCustomPainterAccess(FTabControl.Painter).GetClientRectOffset.Right); - sdTop: Inc(Result, TcxPCCustomPainterAccess(FTabControl.Painter).GetClientRectOffset.Top); - sdBottom: Inc(Result, TcxPCCustomPainterAccess(FTabControl.Painter).GetClientRectOffset.Bottom); - end; - end; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.CreateSpecificControls; -begin - inherited CreateSpecificControls; - CreateTabControl; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.DestroySpecificControls; -begin - inherited DestroySpecificControls; - DestroyTabControl; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.CreateViewInfos; -begin - FTabControlElementViewInfo := TdxTabControlElementViewInfo.Create(GroupViewInfo); - GroupViewInfo.FElements.Add(FTabControlElementViewInfo); -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.SetControlVisibility; -begin - if HasTabControl then - FTabControl.Visible := GroupViewInfo.ActuallyVisible; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.CreateTabControl; -var - I: Integer; -begin - if GroupViewInfo.Group.VisibleCount = 0 then - Exit; - FTabControl := TdxLayoutTabbedGroupTabControl.Create(GroupViewInfo.Group); - FTabControl.Font := Container.Font; - for I := 0 to GroupViewInfo.Group.VisibleCount - 1 do - FTabControl.Tabs.Add(GroupViewInfo.Group.VisibleItems[I].Caption); - GroupViewInfo.LayoutLookAndFeel.InitializeSubControlCxLookAndFeel(FTabControl.LookAndFeel); - FTabControl.OnChange := ActiveTabChanged; - FTabControl.OnPaint := TabControlPaint; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.DestroyTabControl; -begin - FreeAndNil(FTabControl); -end; - -function TdxLayoutGroupViewInfoTabbedSpecific.HasTabControl: Boolean; -begin - Result := FTabControl <> nil; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.ActiveTabChanged(ASender: TObject); -var - AContainer: TdxCustomLayoutControl; -begin - AContainer := GroupViewInfo.Group.Container; - GroupViewInfo.Group.ItemIndex := FTabControl.TabIndex; - AContainer.Modified; -end; - -procedure TdxLayoutGroupViewInfoTabbedSpecific.TabControlPaint(ASender: TObject); -begin - if not (csPaintCopy in FTabControl.ControlState) then - GroupViewInfo.Group.Container.PostInvalidateSelectionLayer(FTabControl.BoundsRect); -end; - -{ TdxLayoutGroupViewInfo } - -function TdxLayoutGroupViewInfo.GetBorderBounds(ASide: TdxLayoutSide): TRect; -begin - Result := Bounds; - with ClientBounds do - case ASide of - sdLeft: - Result.Right := Left; - sdTop: - Result.Bottom := Top; - sdRight: - Result.Left := Right; - sdBottom: - Result.Top := Bottom; - end; -end; - -function TdxLayoutGroupViewInfo.GetBorderRestSpaceBounds(ASide: TdxLayoutSide): TRect; -begin - Result := RestSpaceBounds; - with ClientBounds do - case ASide of - sdLeft: - Result.Right := Left; - sdTop: - Result.Bottom := Top; - sdRight: - Result.Left := Right; - sdBottom: - Result.Top := Bottom; - end; -end; - -function TdxLayoutGroupViewInfo.GetBordersHeight: Integer; -begin - Result := BorderWidths[sdLeft] + BorderWidths[sdRight]; -end; - -function TdxLayoutGroupViewInfo.GetBordersWidth: Integer; -begin - Result := BorderWidths[sdTop] + BorderWidths[sdBottom]; -end; - -function TdxLayoutGroupViewInfo.GetCaptionViewInfo: TdxLayoutGroupCaptionViewInfo; -begin - Result := TdxLayoutGroupCaptionViewInfo(inherited CaptionViewInfo); -end; - -function TdxLayoutGroupViewInfo.GetGroup: TdxLayoutGroup; -begin - Result := TdxLayoutGroup(inherited Item); -end; - -function TdxLayoutGroupViewInfo.GetIsLocked: Boolean; -begin - Result := Group.Locked and IsCustomization or IsParentLocked; -end; - -function TdxLayoutGroupViewInfo.GetItemViewInfo(Index: Integer): TdxCustomLayoutItemViewInfo; -begin - Result := TdxCustomLayoutItemViewInfo(FItemViewInfos[Index]); -end; - -function TdxLayoutGroupViewInfo.GetItemViewInfoCount: Integer; -begin - Result := FItemViewInfos.Count; -end; - -function TdxLayoutGroupViewInfo.GetLayoutDirection: TdxLayoutDirection; -begin - Result := Group.LayoutDirection; -end; - -function TdxLayoutGroupViewInfo.GetOptionsEx: TdxLayoutLookAndFeelGroupOptions; -begin - Result := TdxLayoutLookAndFeelGroupOptions(inherited Options); -end; - -function TdxLayoutGroupViewInfo.GetOffset(Index: Integer): Integer; -begin - if not FOffsetsCalculated then - begin - CalculateOffsets; - FOffsetsCalculated := True; - end; - case Index of - 0: Result := FItemOffset; - 1: Result := FItemsAreaOffsetHorz; - 2: Result := FItemsAreaOffsetVert; - else - Result := -1; - end; -end; - -procedure TdxLayoutGroupViewInfo.CreateItemViewInfos; -var - I: Integer; - AItem: TdxCustomLayoutItem; - AItemViewInfo: TdxCustomLayoutItemViewInfo; -begin - FItemViewInfos := TObjectList.Create; - for I := 0 to Group.Count - 1 do - begin - AItem := Group.Items[I]; - if AItem.GetVisible or (IsDragImagePainted and IsAvailable) then - begin - AItemViewInfo := GetItemViewInfoClass(AItem).Create(FContainerViewInfo, Self, AItem); - FItemViewInfos.Add(AItemViewInfo); - end; - end; -end; - -procedure TdxLayoutGroupViewInfo.CreateSpecific; -begin - FSpecific := GetSpecificClass.Create(Self); -end; - -procedure TdxLayoutGroupViewInfo.DestroyItemViewInfos; -begin - FreeAndNil(FItemViewInfos); -end; - -procedure TdxLayoutGroupViewInfo.DestroySpecific; -begin - FreeAndNil(FSpecific); -end; - -function TdxLayoutGroupViewInfo.GetClientAreaBounds(const ABounds: TRect): TRect; -var - AMargins: TRect; -begin - with LayoutLookAndFeel do - AMargins := Rect(GetBorderWidth(sdLeft), GetBorderWidth(sdTop), GetBorderWidth(sdRight), GetBorderWidth(sdBottom)); - - Result := cxRectContent(ABounds, AMargins); -end; - -function TdxLayoutGroupViewInfo.GetItemAreaBounds(const AClientRect: TRect): TRect; -var - AMargins: TRect; -begin - with LayoutLookAndFeel do - AMargins := Rect(GetBorderWidth(sdLeft), GetBorderWidth(sdTop), GetBorderWidth(sdRight), GetBorderWidth(sdBottom)); - - Result := cxRectInflate(AClientRect, AMargins); -end; - -function TdxLayoutGroupViewInfo.GetBackgroundColor: TColor; -begin - if Group.IsRoot and ContainerViewInfo.NeedHighlightRoot then - Result := dxLayoutHiddenGroupBackgroundDefaultColor - else - Result := inherited GetBackgroundColor; -end; - -procedure TdxLayoutGroupViewInfo.DoCreateViewInfos; -begin - inherited; - CreateSpecific; - CreateItemViewInfos; - Specific.CreateViewInfos; -end; - -procedure TdxLayoutGroupViewInfo.DestroyViewInfos; -begin - DestroyItemViewInfos; - DestroySpecific; - inherited; -end; - -procedure TdxLayoutGroupViewInfo.FreeNotification(AComponent: TComponent); -begin - inherited; - Specific.DestroySpecificControls; -end; - -function TdxLayoutGroupViewInfo.GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; -begin - Result := TdxLayoutGroupCaptionViewInfo; -end; - -function TdxLayoutGroupViewInfo.GetHitTestClass: TdxCustomLayoutItemHitTestClass; -begin - if Group.LayoutDirection = ldTabbed then - Result := TdxLayoutTabbedGroupHitTest - else - Result := TdxLayoutGroupHitTest; -end; - -function TdxLayoutGroupViewInfo.GetPainterClass: TdxCustomLayoutItemPainterClass; -begin - Result := TdxCustomLayoutItemPainterClass(LayoutLookAndFeel.GetGroupPainterClass); -end; - -function TdxLayoutGroupViewInfo.DoCalculateHeight(AIsMinHeight: Boolean = False): Integer; -begin - Result := inherited DoCalculateHeight(AIsMinHeight) + GetHeight(Specific.GetItemsAreaHeight(AIsMinHeight)); -end; - -function TdxLayoutGroupViewInfo.DoCalculateWidth(AIsMinWidth: Boolean = False): Integer; -begin - Result := inherited DoCalculateWidth(AIsMinWidth) + GetWidth(Specific.GetItemsAreaWidth(AIsMinWidth)); -end; - -procedure TdxLayoutGroupViewInfo.CorrectAreaPart(var AAreaPart: TdxLayoutAreaPart); -begin - Specific.CorrectAreaPart(AAreaPart); -end; - -function TdxLayoutGroupViewInfo.GetActionType(AAreaPart: TdxLayoutAreaPart): TdxLayoutActionType; -begin - if AAreaPart = apNone then - Result := atNone - else - if (AAreaPart in [apCenter, apFirstChild, apLastChild]) then - Result := atInsert - else - Result := Specific.GetActionType(AAreaPart); -end; - -function TdxLayoutGroupViewInfo.GetAreaPart(const P: TPoint): TdxLayoutAreaPart; -begin - Result := Specific.GetAreaPart(P); - if Result = apNone then - Result := inherited GetAreaPart(P); -end; - -function TdxLayoutGroupViewInfo.GetAreaPartBounds(AAreaPart: TdxLayoutAreaPart; AItemViewInfo: TdxCustomLayoutItemViewInfo): TRect; -const - PartWidth = 2; -begin - Result := AItemViewInfo.SelectionBorderRect; - case AAreaPart of - apLeft: - with Result do - Right := Left + PartWidth; - apTop: - with Result do - Bottom := Top + PartWidth; - apRight: - with Result do - Left := Right - PartWidth; - apBottom: - with Result do - Top := Bottom - PartWidth; - else - Result := Specific.GetAreaPartBounds(AAreaPart, AItemViewInfo); - end; -end; - -function TdxLayoutGroupViewInfo.HasCaption: Boolean; -begin - Result := inherited HasCaption and HasBorder; -end; - -function TdxLayoutGroupViewInfo.HasBorder: Boolean; -begin - Result := Group.ShowBorder and ((ParentViewInfo = nil) or - ParentViewInfo.AllowChildHasBorder or IsDragImagePainted and IsDragged); -end; - -procedure TdxLayoutGroupViewInfo.CalculateCaptionViewInfoBounds; -begin - FCaptionAreaBounds := cxNullRect; -end; - -procedure TdxLayoutGroupViewInfo.CalculateClientBounds; -begin - FClientAreaBounds := GetClientAreaBounds(FBounds); -end; - -procedure TdxLayoutGroupViewInfo.CalculateItemsAreaBounds; -begin - FItemsAreaBounds := cxRectInflate(ClientBounds, -ItemsAreaOffsetHorz, -ItemsAreaOffsetVert); - - Inc(FItemsAreaBounds.Left, Specific.GetItemsAreaOffset(sdLeft)); - Dec(FItemsAreaBounds.Right, Specific.GetItemsAreaOffset(sdRight)); - Inc(FItemsAreaBounds.Top, Specific.GetItemsAreaOffset(sdTop)); - Dec(FItemsAreaBounds.Bottom, Specific.GetItemsAreaOffset(sdBottom)); -end; - -procedure TdxLayoutGroupViewInfo.CalculateOffsets; -begin - if UseItemsAreaOffsets then - if Group.IsRoot then - begin - ItemsAreaOffsetHorz := LayoutLookAndFeel.GetRootItemsAreaOffsetHorz(Item.Container); - ItemsAreaOffsetVert := LayoutLookAndFeel.GetRootItemsAreaOffsetVert(Item.Container); - end - else - begin - ItemsAreaOffsetHorz := LayoutLookAndFeel.GetItemsAreaOffsetHorz(Item.Container); - ItemsAreaOffsetVert := LayoutLookAndFeel.GetItemsAreaOffsetVert(Item.Container); - end - else - begin - ItemsAreaOffsetHorz := 0; - ItemsAreaOffsetVert := 0; - end; - - if UseItemOffset then - ItemOffset := LayoutLookAndFeel.GetItemOffset(Item.Container) - else - ItemOffset := 0; -end; - -function TdxLayoutGroupViewInfo.GetBorderWidth(ASide: TdxLayoutSide): Integer; -begin -//#DG !!! - if HasBorder then - Result := LayoutLookAndFeel.GetGroupBorderWidth(Item.Container, ASide, HasCaption) - else - Result := 0; -end; - -function TdxLayoutGroupViewInfo.GetColor: TColor; -begin - Result := Options.GetColor; -end; - -function TdxLayoutGroupViewInfo.GetIsDefaultColor: Boolean; -begin - Result := Options.Color = clDefault; -end; - -function TdxLayoutGroupViewInfo.GetItemViewInfoClass(AItem: TdxCustomLayoutItem): TdxCustomLayoutItemViewInfoClass; -begin - Result := AItem.GetViewInfoClass; -end; - -function TdxLayoutGroupViewInfo.GetMinVisibleHeight: Integer; -begin - Result := dxLayoutItemMinSize; -end; - -function TdxLayoutGroupViewInfo.GetMinVisibleWidth: Integer; -begin - if HasCaption then - Result := CaptionViewInfo.CalculateMinWidth - else - Result := 0; - Result := Max(Result, dxLayoutItemMinSize); -end; - -function TdxLayoutGroupViewInfo.GetOptions: TdxCustomLayoutLookAndFeelOptions; -begin - Result := LayoutLookAndFeel.GroupOptions; -end; - -function TdxLayoutGroupViewInfo.GetRestSpaceBounds: TRect; -begin - Result := Bounds; -end; - -function TdxLayoutGroupViewInfo.AllowChildHasBorder: Boolean; -begin - Result := Specific.AllowChildHasBorder; -end; - -function TdxLayoutGroupViewInfo.GetSpecificClass: TdxLayoutGroupViewInfoSpecificClass; -begin - Result := Group.GetHelperClass.GetSpecificClass; -end; - -procedure TdxLayoutGroupViewInfo.PaintSelectionLayer; -var - I: Integer; -begin - inherited; - for I := 0 to ItemViewInfoCount - 1 do - ItemViewInfos[I].PaintSelectionLayer; -end; - -function TdxLayoutGroupViewInfo.GetHeight(AItemsAreaHeight: Integer): Integer; -begin - Result := Max(MinVisibleHeight, - BorderWidths[sdTop] + ItemsAreaOffsetVert + Specific.GetItemsAreaOffset(sdTop) + - AItemsAreaHeight + - BorderWidths[sdBottom] + ItemsAreaOffsetVert + Specific.GetItemsAreaOffset(sdBottom)); -end; - -function TdxLayoutGroupViewInfo.GetWidth(AItemsAreaWidth: Integer): Integer; -begin - Result := Max(MinVisibleWidth, - BorderWidths[sdLeft] + ItemsAreaOffsetHorz + Specific.GetItemsAreaOffset(sdLeft) + - AItemsAreaWidth + - BorderWidths[sdRight] + ItemsAreaOffsetHorz + Specific.GetItemsAreaOffset(sdRight)); -end; - -function TdxLayoutGroupViewInfo.HasBoundsFrame: Boolean; -begin - Result := Group.IsRoot and (Group.Container.ShowHiddenGroupsBounds or Group.Container.IsDesigning); -end; - -function TdxLayoutGroupViewInfo.UseItemOffset: Boolean; -begin - Result := Group.UseIndent; -end; - -function TdxLayoutGroupViewInfo.UseItemsAreaOffsets: Boolean; -begin -// #DG !!! Result := Group.ShowBorder or Group.IsRoot; - Result := HasBorder or Group.IsRoot; -end; - -procedure TdxLayoutGroupViewInfo.Calculate(const ABounds: TRect); -begin - inherited; - - CalculateClientBounds; - CalculateItemsAreaBounds; - CalculateCaptionViewInfoBounds; - CaptionViewInfo.Calculate(FCaptionAreaBounds); - Specific.Calculate(ItemsAreaBounds); -end; - -procedure TdxLayoutGroupViewInfo.CalculateTabOrders(var AAvailTabOrder: Integer); -var - I: Integer; -begin - Specific.CalculateTabOrders(AAvailTabOrder); - for I := 0 to ItemViewInfoCount - 1 do - ItemViewInfos[I].CalculateTabOrders(AAvailTabOrder); -end; - -function TdxLayoutGroupViewInfo.GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; -var - I: Integer; -begin - Result := nil; - for I := 0 to ItemViewInfoCount - 1 do - begin - Result := ItemViewInfos[I].GetHitTest(P); - if Result <> nil then - Break; - end; - if Result = nil then - Result := inherited GetHitTest(P); -end; - -function TdxLayoutGroupViewInfo.GetItemWithMouse(const P: TPoint): TdxCustomLayoutItem; -var - I: Integer; -begin - Result := nil; - for I := 0 to ItemViewInfoCount - 1 do - begin - Result := ItemViewInfos[I].GetItemWithMouse(P); - if Result <> nil then - Break; - end; - if Result = nil then - Result := inherited GetItemWithMouse(P); -end; - -function TdxLayoutGroupViewInfo.GetInsertionPos(const P: TPoint): Integer; -var - R: TRect; -begin - if PtInRect(Bounds, P) then - for Result := 0 to ItemViewInfoCount - 1 do - begin - R := ItemViewInfos[Result].Bounds; - if Specific.IsAtInsertionPos(R, P) then Exit; - end; - Result := ItemViewInfoCount; -end; - -{ TdxLayoutControlViewInfo } - -constructor TdxLayoutControlViewInfo.Create(AControl: TdxCustomLayoutControl); -begin - inherited; - CreateViewInfos; -end; - -destructor TdxLayoutControlViewInfo.Destroy; -begin - DestroyViewInfos; - FCanvas.Free; - FreeAndNil(FSelectionLayer); - inherited; -end; - -procedure TdxLayoutControlViewInfo.CreateSelectionLayer; -begin - FSelectionLayer := TdxSelectionLayer.Create(Control, Control.Handle); -end; - -procedure TdxLayoutControlViewInfo.BuildSelectionLayer; - - function CanBuildSelectionLayer: Boolean; - var - I: Integer; - AList: TcxObjectList; - AIntf: IdxLayoutSelectableItem; - begin - Result := (Control.IsDesigning or Control.Customization) and not Control.IsUpdateLocked; - if Result then - begin - Result := False; - AList := TcxObjectList.Create(False); - try - Control.GetSelection(AList); - for I := 0 to AList.Count - 1 do - begin - if Supports(AList[I], IdxLayoutSelectableItem, AIntf) and AIntf.IsChild(Control) and AIntf.IsVisible then - begin - Result := True; - AIntf := nil; - Break; - end; - end; - finally - AList.Free; - end; - end; - end; - -begin - if CanBuildSelectionLayer then - begin - SelectionLayer.BoundsRect := ClientBounds; - SelectionLayer.SelectionImage.Clear; - ItemsViewInfo.PaintSelectionLayer; - SelectionLayer.SelectionImage.RecoverAlphaChannel(0); - SelectionLayer.Show; - end - else - FreeAndNil(FSelectionLayer); -end; - -function TdxLayoutControlViewInfo.GetClientHeight: Integer; -begin - Result := cxRectHeight(ClientBounds); -end; - -function TdxLayoutControlViewInfo.GetClientWidth: Integer; -begin - Result := cxRectWidth(ClientBounds); -end; - -function TdxLayoutControlViewInfo.GetContentHeight: Integer; -begin - Result := cxRectHeight(ContentBounds); -end; - -function TdxLayoutControlViewInfo.GetContentWidth: Integer; -begin - Result := cxRectWidth(ContentBounds); -end; - -function TdxLayoutControlViewInfo.GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; -begin - Result := FControl.GetLayoutLookAndFeel; -end; - -function TdxLayoutControlViewInfo.GetSelectionLayer: TdxSelectionLayer; -begin - if FSelectionLayer = nil then - CreateSelectionLayer; - Result := FSelectionLayer; -end; - -procedure TdxLayoutControlViewInfo.CreateViewInfos; -begin - if LayoutLookAndFeel <> nil then - FItemsViewInfo := GetItemsViewInfoClass.Create(Self, nil, FControl.Items); -end; - -procedure TdxLayoutControlViewInfo.DestroyViewInfos; -begin - FreeAndNil(FItemsViewInfo); -end; - -function TdxLayoutControlViewInfo.GetItemsViewInfoClass: TdxLayoutGroupViewInfoClass; -begin - Result := TdxLayoutGroupViewInfoClass(FControl.Items.GetViewInfoClass); -end; - -procedure TdxLayoutControlViewInfo.RecreateViewInfos; -begin - DestroyViewInfos; - CreateViewInfos; -end; - -procedure TdxLayoutControlViewInfo.AlignItems; -var - I: Integer; - - procedure ProcessConstraint(AConstraint: TdxLayoutAlignmentConstraint); - var - AItemViewInfos: TList; - - procedure RetrieveItemViewInfos; - var - I: Integer; - AViewInfo: TdxCustomLayoutItemViewInfo; - begin - for I := 0 to AConstraint.Count - 1 do - begin - AViewInfo := AConstraint.Items[I].ViewInfo; - if AViewInfo <> nil then - AItemViewInfos.Add(AViewInfo); - end; - end; - - function GetSide: TdxLayoutSide; - begin - if AConstraint.Kind in [ackLeft, ackRight] then - Result := sdLeft - else - Result := sdTop; - end; - - function AlignItemViewInfos: Boolean; - var - AMaxBorderValue, I: Integer; - - function GetBorderValue(AItemViewInfoIndex: Integer): Integer; - begin - with TdxCustomLayoutItemViewInfo(AItemViewInfos[AItemViewInfoIndex]) do - case AConstraint.Kind of - ackLeft: - Result := Bounds.Left - CalculateOffset(sdLeft); - ackTop: - Result := Bounds.Top - CalculateOffset(sdTop); - ackRight: - Result := Bounds.Right + CalculateOffset(sdRight); - ackBottom: - Result := Bounds.Bottom + CalculateOffset(sdBottom); - else - Result := 0; - end; - end; - - function FindMaxBorderValue: Integer; - var - I: Integer; - begin - Result := -MaxInt; - for I := 0 to AItemViewInfos.Count - 1 do - Result := Max(Result, GetBorderValue(I)); - end; - - procedure ChangeOffset(AItemViewInfoIndex, ADelta: Integer); - begin - with TdxCustomLayoutItemViewInfo(AItemViewInfos[AItemViewInfoIndex]) do - Offsets[GetSide] := Offsets[GetSide] + ADelta; - end; - - function AreItemViewInfosAligned: Boolean; - var - I, ABorderValue: Integer; - begin - ABorderValue := 0; - for I := 0 to AItemViewInfos.Count - 1 do - if I = 0 then - ABorderValue := GetBorderValue(I) - else - begin - Result := GetBorderValue(I) = ABorderValue; - if not Result then Exit; - end; - Result := True; - end; - - begin - AMaxBorderValue := FindMaxBorderValue; - for I := 0 to AItemViewInfos.Count - 1 do - ChangeOffset(I, AMaxBorderValue - GetBorderValue(I)); - CalculateItemsViewInfo; - Result := AreItemViewInfosAligned; - end; - - procedure ResetOffsets; - var - I: Integer; - begin - for I := 0 to AItemViewInfos.Count - 1 do - TdxCustomLayoutItemViewInfo(AItemViewInfos[I]).ResetOffset(GetSide); - CalculateItemsViewInfo; - end; - - begin - AItemViewInfos := TList.Create; - try - RetrieveItemViewInfos; - while not AlignItemViewInfos do //!!! to think about invisible items if items will be deleted - begin - ResetOffsets; - if AItemViewInfos.Count > 2 then - AItemViewInfos.Count := AItemViewInfos.Count - 1 - else - Break; - end; - finally - AItemViewInfos.Free; - end; - end; - -begin - for I := 0 to FControl.AlignmentConstraintCount - 1 do - ProcessConstraint(FControl.AlignmentConstraints[I]); -end; - -function CompareAllItemViewInfos(Item1, Item2: TdxLayoutItemViewInfo): Integer; -begin - Result := Ord(Item2.CaptionLayout) - Ord(Item1.CaptionLayout); -end; - -function CompareItemViewInfos(Item1, Item2: TdxLayoutItemViewInfo): Integer; -begin - case Item1.CaptionLayout of - clLeft: - Result := Item1.Bounds.Left - Item2.Bounds.Left; - clTop: - Result := Item1.Bounds.Top - Item2.Bounds.Top; - clRight: - Result := Item1.Bounds.Right - Item2.Bounds.Right; - clBottom: - Result := Item1.Bounds.Bottom - Item2.Bounds.Bottom; - else - Result := 0; - end; -end; - -procedure TdxLayoutControlViewInfo.AutoAlignControls; -var - AAllItemViewInfos: TList; - ACaptionLayout: TdxCaptionLayout; - - procedure FindAllItemViewInfos(ACustomItemViewInfo: TdxCustomLayoutItemViewInfo); - var - I: Integer; - begin - if ACustomItemViewInfo is TdxLayoutGroupViewInfo then - with TdxLayoutGroupViewInfo(ACustomItemViewInfo) do - for I := 0 to ItemViewInfoCount - 1 do - FindAllItemViewInfos(ItemViewInfos[I]) - else - if TdxLayoutItemViewInfo(ACustomItemViewInfo).AutoControlAlignment then - AAllItemViewInfos.Add(ACustomItemViewInfo); - end; - - procedure SortAllItemViewInfos; - begin - AAllItemViewInfos.Sort(@CompareAllItemViewInfos); - end; - - procedure ProcessItemViewInfos(ACaptionLayout: TdxCaptionLayout); - var - AItemViewInfos: TList; - AGroupedCount: Integer; - - procedure ExtractItemViewInfos; - var - I, ACount: Integer; - begin - I := AAllItemViewInfos.Count - 1; - while (I <> -1) and - (TdxLayoutItemViewInfo(AAllItemViewInfos[I]).CaptionLayout = ACaptionLayout) do - Dec(I); - ACount := AAllItemViewInfos.Count - 1 - I; - - AItemViewInfos.Count := ACount; - Move(AAllItemViewInfos.List^[I + 1], AItemViewInfos.List^[0], - ACount * SizeOf(Pointer)); - - AAllItemViewInfos.Count := I + 1; - end; - - procedure SortItemViewInfos; - begin - AItemViewInfos.Sort(@CompareItemViewInfos); - end; - - function FindGroup: Boolean; - var - AItemViewInfo1, AItemViewInfo2: TdxLayoutItemViewInfo; - begin - AItemViewInfo1 := AItemViewInfos[0]; - AGroupedCount := 1; - while AGroupedCount < AItemViewInfos.Count do - begin - AItemViewInfo2 := AItemViewInfos[AGroupedCount]; - if CompareItemViewInfos(AItemViewInfo1, AItemViewInfo2) <> 0 then - Break; - Inc(AGroupedCount); - end; - Result := AGroupedCount <> 1; - end; - - procedure AlignControls; - - function IsCaptionLayoutHorizontal: Boolean; - begin - Result := ACaptionLayout in [clLeft, clRight]; - end; - - function GetMaxCaptionSize: Integer; - var - I, ACaptionSize: Integer; - begin - Result := 0; - for I := 0 to AGroupedCount - 1 do - begin - with TdxLayoutItemViewInfo(AItemViewInfos[I]).CaptionViewInfo do - if IsCaptionLayoutHorizontal then - ACaptionSize := Width - else - ACaptionSize := Height; - Result := Max(Result, ACaptionSize); - end; - end; - - procedure AssignCaptionSizes(AMaxCaptionSize: Integer); - var - I: Integer; - begin - for I := 0 to AGroupedCount - 1 do - with TdxLayoutItemViewInfo(AItemViewInfos[I]).CaptionViewInfo do - if IsCaptionLayoutHorizontal then - Width := AMaxCaptionSize - else - Height := AMaxCaptionSize; - end; - - begin - AssignCaptionSizes(GetMaxCaptionSize); - CalculateItemsViewInfo; - end; - - procedure RemoveProcessedItemViewInfos; - begin - Move(AItemViewInfos.List^[AGroupedCount], AItemViewInfos.List^[0], - (AItemViewInfos.Count - AGroupedCount) * SizeOf(Pointer)); - AItemViewInfos.Count := AItemViewInfos.Count - AGroupedCount; - end; - - begin - AItemViewInfos := TList.Create; - try - ExtractItemViewInfos; - while AItemViewInfos.Count <> 0 do - begin - SortItemViewInfos; - if FindGroup then - AlignControls; - RemoveProcessedItemViewInfos; - end; - finally - AItemViewInfos.Free; - end; - end; - -begin - AAllItemViewInfos := TList.Create; - try - FindAllItemViewInfos(ItemsViewInfo); - SortAllItemViewInfos; - for ACaptionLayout := Low(ACaptionLayout) to High(ACaptionLayout) do - ProcessItemViewInfos(ACaptionLayout); - finally - AAllItemViewInfos.Free; - end; -end; - -procedure TdxLayoutControlViewInfo.CalculateItemsViewInfo; -begin - ResetContentBounds; - ItemsViewInfo.Calculate(ContentBounds); -end; - -procedure TdxLayoutControlViewInfo.CalculateTabOrders; -var - AAvailTabOrder: Integer; -begin - AAvailTabOrder := 0; - ItemsViewInfo.CalculateTabOrders(AAvailTabOrder); -end; - -function TdxLayoutControlViewInfo.GetIsTransparent: Boolean; -begin - Result := HasBackground; -end; - -function TdxLayoutControlViewInfo.HasBackground: Boolean; -begin - Result := Control.HasBackground; -end; - -function TdxLayoutControlViewInfo.NeedHighlightRoot: Boolean; -begin - Result := Control.HighlightRoot and Control.IsDesigning; -end; - -procedure TdxLayoutControlViewInfo.PrepareData; -begin - RecreateViewInfos; -end; - -procedure TdxLayoutControlViewInfo.ResetContentBounds; -begin - SetRectEmpty(FContentBounds); -end; - -function TdxLayoutControlViewInfo.GetCanvas: TcxCanvas; -begin - if Control.HandleAllocated then - begin - FreeAndNil(FCanvas); - Result := Control.Canvas; - end - else - begin - if FCanvas = nil then - FCanvas := TcxScreenCanvas.Create; - Result := FCanvas; - end; -end; - -function TdxLayoutControlViewInfo.GetClientBounds: TRect; -begin - Result := FControl.ClientBounds; -end; - -function TdxLayoutControlViewInfo.GetContentBounds: TRect; - - function CalculateContentWidth: Integer; - begin -//#DG if acsWidth in Control.AutoContentSizes then - if ItemsViewInfo.AlignHorz = ahClient then - Result := Max(cxRectWidth(ClientBounds), ItemsViewInfo.MinWidth) - else - Result := ItemsViewInfo.CalculateWidth; - end; - - function CalculateContentHeight: Integer; - begin -//#DG if acsHeight in Control.AutoContentSizes then - if ItemsViewInfo.AlignVert = avClient then - Result := Max(cxRectHeight(ClientBounds), ItemsViewInfo.MinHeight) - else - Result := ItemsViewInfo.CalculateHeight; - end; - -begin - if IsRectEmpty(FContentBounds) then - FContentBounds := cxRectBounds(-Control.LeftPos, -Control.TopPos, CalculateContentWidth, CalculateContentHeight); - Result := FContentBounds; -end; - -procedure TdxLayoutControlViewInfo.Calculate; -begin - PrepareData; - CalculateItemsViewInfo; - AlignItems; - if Control.AutoControlAlignment then - begin - AutoAlignControls; - AlignItems; - end; - Control.CheckPositions; - DoCalculateTabOrders; - if Control.HandleAllocated then - Control.IsPlaceControlsNeeded := True; -end; - -procedure TdxLayoutControlViewInfo.DoCalculateTabOrders; -begin - if Control.AutoControlTabOrders then - CalculateTabOrders; -end; - -function TdxLayoutControlViewInfo.GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; -begin - //{#MS - if Control.Customization and PtInRect(Control.CustomizeForm.BoundsRect, Control.ClientToScreen(P)) then - Result := Control.CustomizeForm.GetHitTest(Control.CustomizeForm.ScreenToClient(Control.ClientToScreen(P))) - else - begin - if PtInRect(ClientBounds, P) and not (Control.ShowDesignSelectors and PtInRect(Control.GetDesignSelectorRect, P)) then - begin - Result := ItemsViewInfo.GetHitTest(P); - if Result = nil then - begin - Result := TdxLayoutClientAreaHitTest.Instance; - TdxLayoutClientAreaHitTest(Result).Control := Control; - end; - end - else - Result := nil; - end; - if Result = nil then - Result := TdxLayoutNoneHitTest.Instance; -end; - -function TdxLayoutControlViewInfo.GetHitTest(X, Y: Integer): TdxCustomLayoutHitTest; -begin - Result := GetHitTest(Point(X, Y)); -end; - -function TdxLayoutControlViewInfo.GetItemWithMouse(const P: TPoint): TdxCustomLayoutItem; -begin - Result := ItemsViewInfo.GetItemWithMouse(P); -end; - -initialization - RegisterClasses([TdxLayoutItem, TdxLayoutGroup, TdxLayoutAlignmentConstraint]); - - HitTests := THitTests.Create; - - dxLayoutRunTimeSelectionHelperClass := TdxLayoutRunTimeSelectionHelper; - dxLayoutDesignTimeSelectionHelperClass := TdxLayoutRunTimeSelectionHelper; - PageControlDependsControls.Add(Pointer(TdxCustomLayoutControl)); - -finalization - PageControlDependsControls.Remove(Pointer(TdxCustomLayoutControl)); - FreeAndNil(HitTests); - FreeAndNil(FDesignCustomizationHelper); - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControl.res b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControl.res deleted file mode 100644 index 5313bf49..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControl.res and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControlAdapters.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControlAdapters.pas deleted file mode 100644 index 12d89473..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControlAdapters.pas +++ /dev/null @@ -1,97 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl control adapters } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutControlAdapters; - -{$I cxVer.inc} - -interface - -uses - Classes, dxLayoutControl; - -type - TdxLayoutComboAdapter = class(TdxCustomLayoutControlAdapter) - protected - function AllowCheckSize: Boolean; override; - end; - - TdxLayoutPanelAdapter = class(TdxCustomLayoutControlAdapter) - protected - function ShowBorder: Boolean; override; - function UseItemColor: Boolean; override; - end; - -implementation - -uses - StdCtrls, ExtCtrls; - -type -{$IFNDEF DELPHI6} - TCustomCombo = TCustomComboBox; -{$ENDIF} - TCustomComboAccess = class(TCustomCombo); - -{ TdxLayoutComboAdapter } - -function TdxLayoutComboAdapter.AllowCheckSize: Boolean; -begin - Result := {$IFDEF DELPHI6}not TCustomComboAccess(Control).FDroppingDown{$ELSE}True{$ENDIF}; -end; - -{ TdxLayoutPanelAdapter } - -function TdxLayoutPanelAdapter.ShowBorder: Boolean; -begin - Result := False; -end; - -function TdxLayoutPanelAdapter.UseItemColor: Boolean; -begin - Result := True; -end; - -initialization - RegisterClasses([TdxLayoutComboAdapter]); - TdxLayoutComboAdapter.Register(TCustomCombo); - TdxLayoutPanelAdapter.Register(TCustomPanel); - -finalization - TdxLayoutPanelAdapter.Unregister(TCustomPanel); - TdxLayoutComboAdapter.Unregister(TCustomCombo); - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControlReg.dcr b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControlReg.dcr deleted file mode 100644 index d35d6115..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControlReg.dcr and /dev/null differ diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControlReg.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControlReg.pas deleted file mode 100644 index ce32f601..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutControlReg.pas +++ /dev/null @@ -1,891 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl registering unit } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutControlReg; - -{$I cxVer.inc} - -interface - -procedure Register; - -implementation - -uses - Windows, SysUtils, Classes, Graphics, Controls, Contnrs, Forms, StdCtrls, ExtCtrls, - Messages, DesignIntf, DesignEditors, DesignMenus, VCLEditors, DesignWindows, - ComponentDesigner, TypInfo, ImgList, - dxCore, cxClasses, cxControls, cxContainer, dxCoreReg, cxLibraryReg, cxDesignWindows, dxRegEd, - dxLayoutCommon, dxLayoutControl, dxLayoutLookAndFeels, cxPropEditors, dxLayoutEditForm, - dxLayoutLookAndFeelListDesignForm, dxLayoutSelection; - -const - dxLayoutControlMajorVersion = '2'; - dxLayoutControlProductName = 'ExpressLayoutControl'; - -type - TControlAccess = class(TControl); - TLabelAccess = class(TCustomLabel); - TdxLayoutGroupAcsess = class(TdxLayoutGroup); - TdxLayoutControlAccess = class(TdxLayoutControl); - TdxCustomLayoutItemAccess = class(TdxCustomLayoutItem); - TdxLayoutItemAccess = class(TdxLayoutItem); - TStaticTextAccess = class(TCustomStaticText); - TdxCustomLayoutItemCaptionOptionsAccess = class(TdxCustomLayoutItemCaptionOptions); - - { TdxLayoutCustomControlEditor } - - TdxLayoutCustomControlEditor = class(TdxComponentEditor) - protected - function GetProductMajorVersion: string; override; - function GetProductMinorVersion: string; override; - function GetProductName: string; override; - end; - - { TdxLayoutControlEditor } - - TdxLayoutControlEditor = class(TdxLayoutCustomControlEditor) - protected - function InternalGetVerb(AIndex: Integer): string; override; - function InternalGetVerbCount: Integer; override; - procedure InternalExecuteVerb(AIndex: Integer); override; - function GetControl: TdxLayoutControl; virtual; - procedure DoImport; - - property Control: TdxLayoutControl read GetControl; - public - procedure PrepareItem(Index: Integer; const AItem: IMenuItem); override; - end; - - { TdxLayoutControlItemsEditor } - - TdxLayoutControlItemsEditor = class(TdxLayoutControlEditor) - private - function GetItem: TdxCustomLayoutItem; - protected - function GetControl: TdxLayoutControl; override; - - property Item: TdxCustomLayoutItem read GetItem; - end; - - { TdxLayoutDesignTimeSelectionHelper } - - TdxLayoutDesignTimeSelectionHelper = class(TdxLayoutRunTimeSelectionHelper, IcxDesignSelectionChanged) - private - FIsActive: Boolean; - FDesignHelper: TcxDesignHelper; - FLayoutControl: TdxCustomLayoutControl; - FOldSelection: TcxComponentList; - protected - //IcxDesignSelectionChanged - procedure DesignSelectionChanged(ASelection: TList); - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - - function IsActive: Boolean; override; - procedure AddSelectionChangedListener(AListener: TPersistent); override; - procedure RemoveSelectionChangedListener(AListener: TPersistent); override; - function CanDeleteComponent(AComponent: TComponent): Boolean; override; - procedure ClearSelection; override; - procedure GetSelection(AList: TList); override; - function IsComponentSelected(AComponent: TPersistent): Boolean; override; - procedure SelectComponent(AComponent: TPersistent; AShift: TShiftState = []); override; - procedure SetSelection(AList: TList); override; - function UniqueName(const BaseName: string): string; override; - end; - - TdxLayoutColorProperty = class(TColorProperty) - public - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - procedure ListDrawValue(const Value: string; ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean); - procedure PropDrawValue(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean); - end; - - TdxLayoutRegistryPathProperty = class(TStringProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - - TdxLayoutLookAndFeelListEditor = class(TdxLayoutCustomControlEditor) - private - function GetLookAndFeelList: TdxLayoutLookAndFeelList; - protected - function InternalGetVerb(AIndex: Integer): string; override; - function InternalGetVerbCount: Integer; override; - procedure InternalExecuteVerb(AIndex: Integer); override; - - property LookAndFeelList: TdxLayoutLookAndFeelList read GetLookAndFeelList; - end; - - { TdxLayoutLookAndFeelProperty } - - TdxLayoutLookAndFeelProperty = class(TComponentProperty) - private - FLookAndFeelLists: TComponentList; - function GetLookAndFeelLists: TComponentList; - procedure GetLookAndFeelListNameProc(const S: string); - public - function AutoFill: Boolean; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - TdxLayoutItemSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - - { TdxLayoutItemImageIndexProperty } - - TdxLayoutItemImageIndexProperty = class(TImageIndexProperty) - private - function GetControl: TdxCustomLayoutControl; - public - function GetImages: TCustomImageList; override; - - property Control: TdxCustomLayoutControl read GetControl; - end; - -const - sCreateNewLookAndFeelInListBegin = ' Control) and - not (csNoDesignVisible in AControl.ControlStyle) and not (csSubComponent in AControl.ComponentStyle); - end; - - function GetControlsCombo: TComboBox; - - function AddItems(AControl: TWinControl; AStrings: TStrings; - AInsertionIndex: Integer): Boolean; - var - I: Integer; - begin - with AControl do - begin - Result := CanExport(AControl) and (csAcceptsControls in ControlStyle); - if Result then - begin - AStrings.Insert(AInsertionIndex, Name); - AInsertionIndex := AStrings.Count; - for I := 0 to ControlCount - 1 do - if Controls[I] is TWinControl then - if AddItems(TWinControl(Controls[I]), AStrings, AInsertionIndex) then - Inc(AInsertionIndex); - end; - end; - end; - - begin - Result := TComboBox.Create(nil); - with Result do - begin - Visible := False; - Parent := GetParentForm(Control); - DropDownCount := 15; - Style := csDropDownList; - AddItems(GetRoot, Items, 0); - if Items.Count <> 0 then - ItemIndex := 0; - end; - end; - - function GetControl: TWinControl; - begin - if GetRoot.Name = AControlName then - Result := GetRoot - else - Result := GetRoot.FindComponent(AControlName) as TWinControl; - end; - - function ExportControl(AControl: TControl; AGroup: TdxLayoutGroup; - out AControlBounds: TRect): Boolean; - var - AControlCaption: string; - AItem: TdxCustomLayoutItem; - - function IsControlGroup: Boolean; - begin - Result := (AControl = GetRoot) or - (AControl is TCustomGroupBox) or (AControl is TCustomPanel); - end; - - procedure ExportGroupControl; - - procedure ExportChildren; - var - AFirstBounds, ABounds: TRect; - AIsLayoutDirectionAssigned: Boolean; - I: Integer; - - function GetLayoutDirection(const R1, R2: TRect): TdxLayoutDirection; - begin - if (R1.Right <= R2.Left) or (R2.Right <= R1.Left) then - Result := ldHorizontal - else - Result := ldVertical; - end; - - begin - SetRectEmpty(AFirstBounds); - AIsLayoutDirectionAssigned := False; - I := 0; - while I < TWinControl(AControl).ControlCount do - begin - if not ExportControl(TWinControl(AControl).Controls[I], TdxLayoutGroup(AItem), ABounds) then - Inc(I); - if not IsRectEmpty(ABounds) then - if IsRectEmpty(AFirstBounds) then - AFirstBounds := ABounds - else - if not AIsLayoutDirectionAssigned then - begin - TdxLayoutGroup(AItem).LayoutDirection := GetLayoutDirection(AFirstBounds, ABounds); - AIsLayoutDirectionAssigned := True; - end; - end; - end; - - begin - if AControl = GetRoot then - AItem := AGroup - else - begin - AItem := AGroup.CreateGroup; - TdxLayoutGroup(AItem).Hidden := AControl is TCustomPanel; - AItem.Caption := AControlCaption; - end; - ExportChildren; - end; - - procedure ExportNonGroupControl; - var - AFocusControl: TWinControl; - ACaptionIndex: Integer; - AControlItem: TdxLayoutItem; - ACaptionLayout: TdxCaptionLayout; - - function GetFocusControl: TWinControl; - begin - if AControl is TCustomLabel then - Result := TLabelAccess(AControl).FocusControl - else - if AControl is TCustomStaticText then - Result := TStaticTextAccess(AControl).FocusControl - else - Result := nil; - end; - - function IsLabel: Boolean; - begin - Result := (AControl is TCustomLabel) or (AControl is TCustomStaticText); - end; - - function GetCaptionLayout: TdxCaptionLayout; - begin - if AControl.BoundsRect.Right <= AFocusControl.BoundsRect.Left then - Result := clLeft - else - if AControl.BoundsRect.Left >= AFocusControl.BoundsRect.Right then - Result := clRight - else - if AControl.BoundsRect.Bottom <= AFocusControl.BoundsRect.Top then - Result := clTop - else - Result := clBottom; - end; - - procedure AssignItemCaptionData(AItem: TdxLayoutItem; - const ACaption: string; ACaptionLayout: TdxCaptionLayout); - begin - AItem.Caption := ACaption; - AItem.CaptionOptions.Layout := ACaptionLayout; - end; - - begin - if IsLabel then - SetRectEmpty(AControlBounds); - AFocusControl := GetFocusControl; - if AFocusControl = nil then - begin - if (AControl is TCustomLabeledEdit) or IsLabel then Exit; - Result := True; - AItem := AGroup.CreateItemForControl(AControl); - ACaptionIndex := AControlCaptions.IndexOfObject(AControl); - if ACaptionIndex <> -1 then - AssignItemCaptionData(TdxLayoutItem(AItem), AControlCaptions[ACaptionIndex], - TdxCaptionLayout(ACaptionLayouts[ACaptionIndex])); - end - else - begin - AControlItem := Control.FindItem(AFocusControl); - ACaptionLayout := GetCaptionLayout; - if AControlItem <> nil then - AssignItemCaptionData(AControlItem, AControlCaption, ACaptionLayout) - else - begin - AControlCaptions.AddObject(AControlCaption, AFocusControl); - ACaptionLayouts.Add(Pointer(ACaptionLayout)); - end; - end; - end; - - procedure ProcessAnchors; - const - AlignHorzs: array[Boolean, Boolean] of TdxLayoutAlignHorz = - ((ahLeft, ahRight), (ahLeft, ahClient)); - AlignVerts: array[Boolean, Boolean] of TdxLayoutAlignVert = - ((avTop, avBottom), (avTop, avClient)); - begin - if (AItem = nil) or AItem.IsRoot then Exit; - with AControl do - begin - AItem.AlignHorz := AlignHorzs[akLeft in Anchors, akRight in Anchors]; - AItem.AlignVert := AlignVerts[akTop in Anchors, akBottom in Anchors]; - end; - end; - - begin - Result := False; - SetRectEmpty(AControlBounds); - if not CanExport(AControl) then Exit; - AControlCaption := TControlAccess(AControl).Caption; - AControlBounds := AControl.BoundsRect; - AItem := nil; - if IsControlGroup then - ExportGroupControl - else - ExportNonGroupControl; - ProcessAnchors; - end; - -begin - AControlName := ''; - if not TLayoutEditForm.Run('Import', 'Choose a control to import data from:', - AControlName, GetControlsCombo) then Exit; - AControlCaptions := TStringList.Create; - ACaptionLayouts := TList.Create; - try - Control.BeginUpdate; - try - ExportControl(GetControl, Control.Items, R); - Control.Items.Pack; - finally - Control.EndUpdate; - end; - finally - ACaptionLayouts.Free; - AControlCaptions.Free; - end; -end; - -procedure TdxLayoutControlEditor.PrepareItem(Index: Integer; const AItem: IMenuItem); -begin - inherited; - if Index in [1, 2] then - AItem.Enabled := not IsInInlined; -end; - -{ TdxLayoutControlItemsEditor } - -function TdxLayoutControlItemsEditor.GetControl: TdxLayoutControl; -begin - Result := TdxLayoutControl(Item.Container); -end; - -function TdxLayoutControlItemsEditor.GetItem: TdxCustomLayoutItem; -begin - Result := TdxCustomLayoutItem(Component); -end; - -{ TdxLayoutDesignTimeSelectionHelper } - -constructor TdxLayoutDesignTimeSelectionHelper.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FLayoutControl := AOwner as TdxCustomLayoutControl; - FOldSelection := TcxComponentList.Create(False); - FDesignHelper := TcxDesignHelper.Create(Component); -end; - -destructor TdxLayoutDesignTimeSelectionHelper.Destroy; -begin - FDesignHelper := nil; - FreeAndNil(FOldSelection); - inherited Destroy; -end; - -Function TdxLayoutDesignTimeSelectionHelper.IsActive: Boolean; -begin - Result := FIsActive; -end; - -procedure TdxLayoutDesignTimeSelectionHelper.AddSelectionChangedListener(AListener: TPersistent); -begin - inherited AddSelectionChangedListener(AListener); - if Listeners.Count > 0 then - FDesignHelper.AddSelectionChangedListener(Self); -end; - -procedure TdxLayoutDesignTimeSelectionHelper.RemoveSelectionChangedListener(AListener: TPersistent); -begin - inherited RemoveSelectionChangedListener(AListener); - if Listeners.Count = 0 then - FDesignHelper.RemoveSelectionChangedListener(Self); -end; - -function TdxLayoutDesignTimeSelectionHelper.CanDeleteComponent(AComponent: TComponent): Boolean; -begin - Result := FDesignHelper.CanDeleteComponent(Component, AComponent); -end; - -procedure TdxLayoutDesignTimeSelectionHelper.ClearSelection; -begin - FDesignHelper.SelectObject(Component, Component); -end; - -procedure TdxLayoutDesignTimeSelectionHelper.GetSelection(AList: TList); -begin - FDesignHelper.GetSelection(AList); -end; - -function TdxLayoutDesignTimeSelectionHelper.IsComponentSelected(AComponent: TPersistent): Boolean; -begin - Result := FDesignHelper.IsObjectSelected(AComponent); -end; - -procedure TdxLayoutDesignTimeSelectionHelper.SelectComponent(AComponent: TPersistent; AShift: TShiftState = []); -begin - if (ssShift in AShift) and IsComponentSelected(AComponent) then - FDesignHelper.UnselectObject(AComponent) - else - FDesignHelper.SelectObject(AComponent, not (ssShift in AShift)); -end; - -procedure TdxLayoutDesignTimeSelectionHelper.SetSelection(AList: TList); -begin - FDesignHelper.SetSelection(AList); -end; - -function TdxLayoutDesignTimeSelectionHelper.UniqueName(const BaseName: string): string; -begin - Result := FDesignHelper.UniqueName(BaseName) -end; - -//IcxDesignSelectionChanged -procedure TdxLayoutDesignTimeSelectionHelper.DesignSelectionChanged(ASelection: TList); - - procedure CopyList(AFrom, ATo: TList); - var - I: Integer; - begin - ATo.Clear; - for I := 0 to AFrom.Count - 1 do - ATo.Add(AFrom[I]); - end; - - procedure GetSelectionDifference(AList: TList); - var - I: Integer; - begin - CopyList(FOldSelection, AList); - for I := 0 to ASelection.Count - 1 do - if AList.IndexOf(ASelection[I]) = -1 then - AList.Add(ASelection[I]) - else - AList.Extract(ASelection[I]); - end; - - procedure UpdateItemControls(AList: TcxObjectList); - var - I: Integer; - begin - for I := 0 to AList.Count - 1 do - if (AList[I] is TControl) and ((AList[I] as TControl).Parent = FLayoutControl) then - (AList[I] as TControl).Invalidate; - end; - -var - AList: TcxObjectList; - AIntf: IdxLayoutSelectableItem; -begin - AList := TcxObjectList.Create(False); - try - GetSelectionDifference(AList); - FIsActive := (AList.Count > 0) and Supports(TObject(AList.Last), IdxLayoutSelectableItem, AIntf) and AIntf.IsChild(FLayoutControl); - UpdateItemControls(AList); - NotifyListeners(ASelection, saChanged); - finally - AList.Free; - CopyList(ASelection, FOldSelection); - end; -end; - -{ TdxLayoutLookAndFeelListEditor } - -function TdxLayoutLookAndFeelListEditor.GetLookAndFeelList: TdxLayoutLookAndFeelList; -begin - Result := TdxLayoutLookAndFeelList(Component); -end; - -function TdxLayoutLookAndFeelListEditor.InternalGetVerb(AIndex: Integer): string; -begin - Result := 'Designer...' -end; - -function TdxLayoutLookAndFeelListEditor.InternalGetVerbCount: Integer; -begin - Result := 1; -end; - -procedure TdxLayoutLookAndFeelListEditor.InternalExecuteVerb(AIndex: Integer); -var - AForm: TdxLayoutLookAndFeelListDesignForm; -begin - if dxLayoutLookAndFeelsDesigner = nil then - begin - AForm := TdxLayoutLookAndFeelListDesignForm.Create(nil); - AForm.Designer := Designer; - AForm.Show; - end; - dxLayoutLookAndFeelsDesigner.SetList(LookAndFeelList); -end; - -{ TdxLayoutColorProperty } - -const - DefaultColorText = 'clDefault'; - -function TdxLayoutColorProperty.GetValue: string; -begin - if GetOrdValue = clDefault then - Result := DefaultColorText - else - Result := inherited GetValue; -end; - -procedure TdxLayoutColorProperty.GetValues(Proc: TGetStrProc); -begin - Proc(DefaultColorText); - inherited; -end; - -procedure TdxLayoutColorProperty.SetValue(const Value: string); -begin - if SameText(Value, DefaultColorText) then - SetOrdValue(clDefault) - else - inherited; -end; - -procedure TdxLayoutColorProperty.ListDrawValue(const Value: string; - ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean); -begin - if Value = DefaultColorText then - with ARect do - ACanvas.TextRect(ARect, Left + (Bottom - Top) + 1, Top + 1, Value) - else - inherited; -end; - -procedure TdxLayoutColorProperty.PropDrawValue(ACanvas: TCanvas; - const ARect: TRect; ASelected: Boolean); -begin - if GetVisualValue = DefaultColorText then - with ARect do - ACanvas.TextRect(ARect, Left + 1, Top + 1, GetVisualValue) - else - inherited; -end; - -{ TdxLayoutRegistryPathProperty } - -procedure TdxLayoutRegistryPathProperty.Edit; -var - AControl: TdxLayoutControl; - S: string; -begin - AControl := TdxLayoutControl(GetComponent(0)); - S := AControl.RegistryPath; - if dxGetRegistryPath(S) then - begin - AControl.RegistryPath := S; - Designer.Modified; - end; -end; - -function TdxLayoutRegistryPathProperty.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -{ TdxLayoutLookAndFeelProperty } - -function TdxLayoutLookAndFeelProperty.AutoFill: Boolean; -begin - Result := False; -end; - -function TdxLayoutLookAndFeelProperty.GetLookAndFeelLists: TComponentList; -begin - Result := TComponentList.Create(False); - FLookAndFeelLists := Result; - Designer.GetComponentNames(GetTypeData(TdxLayoutLookAndFeelList.ClassInfo), - GetLookAndFeelListNameProc); -end; - -procedure TdxLayoutLookAndFeelProperty.GetLookAndFeelListNameProc(const S: string); -begin - FLookAndFeelLists.Add(Designer.GetComponent(S)); -end; - -procedure TdxLayoutLookAndFeelProperty.GetValues(Proc: TGetStrProc); -var - ALookAndFeelLists: TList; - I: Integer; -begin - ALookAndFeelLists := GetLookAndFeelLists; - try - for I := 0 to ALookAndFeelLists.Count - 1 do - begin - Proc(sCreateNewLookAndFeelInListBegin + - Designer.GetComponentName(ALookAndFeelLists.Items[I]) + - sCreateNewLookAndFeelInListEnd); - end; - finally - ALookAndFeelLists.Free; - end; - Proc(sCreateNewLookAndFeelInNewList); - inherited GetValues(Proc); -end; - -procedure TdxLayoutLookAndFeelProperty.SetValue(const Value: string); - - procedure CreateAndAssignNewLookAndFeel(ALookAndFeelList: TdxLayoutLookAndFeelList); - var - ALookAndFeel: TdxCustomLayoutLookAndFeel; - ALookAndFeelClass: TdxCustomLayoutLookAndFeelClass; - begin - if dxLayoutControlSelectLookAndFeel(Designer.Root as TWinControl, ALookAndFeelClass) then - begin - ALookAndFeel := ALookAndFeelList.CreateItem(ALookAndFeelClass); - ALookAndFeel.Name := CreateUniqueName(ALookAndFeel.Owner, nil, ALookAndFeel, '', ''); - FindRootDesigner(ALookAndFeel).Modified; - SetOrdValue(Integer(ALookAndFeel)); - end; - end; - -var - ALookAndFeelList: TdxLayoutLookAndFeelList; - AName: string; -begin - if Value = sCreateNewLookAndFeelInNewList then - begin - ALookAndFeelList := TdxLayoutLookAndFeelList.Create(Designer.Root); - ALookAndFeelList.Name := Designer.UniqueName( - Copy(ALookAndFeelList.ClassName, 2, Length(ALookAndFeelList.ClassName))); - CreateAndAssignNewLookAndFeel(ALookAndFeelList); - end - else - if Copy(Value, 1, Length(sCreateNewLookAndFeelInListBegin)) = sCreateNewLookAndFeelInListBegin then - begin - AName := Copy(Value, Length(sCreateNewLookAndFeelInListBegin) + 1, - Length(Value) - Length(sCreateNewLookAndFeelInListBegin) - - Length(sCreateNewLookAndFeelInListEnd)); - CreateAndAssignNewLookAndFeel(Designer.GetComponent(AName) as TdxLayoutLookAndFeelList); - end - else - inherited SetValue(Value); -end; - -{ TdxLayoutItemSelectionEditor } - -procedure TdxLayoutItemSelectionEditor.RequiresUnits(Proc: TGetStrProc); -var - I: Integer; - AComponent: TComponent; - AItem: TdxLayoutItemAccess; -begin - for I := 0 to Designer.Root.ComponentCount - 1 do - begin - AComponent := Designer.Root.Components[I]; - if AComponent is TdxLayoutItem then - begin - AItem := TdxLayoutItemAccess(AComponent); - if AItem.ControlAdapter <> nil then - Proc(dxShortStringToString(GetTypeData(PTypeInfo(AItem.ControlAdapter.ClassType.ClassInfo)).UnitName)); - end; - end; -end; - -{ TdxLayoutItemImageIndexProperty } - -function TdxLayoutItemImageIndexProperty.GetImages: TCustomImageList; -begin - Result := Control.OptionsImage.Images; -end; - -function TdxLayoutItemImageIndexProperty.GetControl: TdxCustomLayoutControl; -var - AOptions: TdxCustomLayoutItemCaptionOptions; -begin - AOptions := GetComponent(0) as TdxCustomLayoutItemCaptionOptions; - Result := TdxCustomLayoutItemCaptionOptionsAccess(AOptions).Item.Container; -end; - -procedure Register; -begin - RegisterComponentEditor(TdxLayoutControl, TdxLayoutControlEditor); - RegisterComponentEditor(TdxCustomLayoutItem, TdxLayoutControlItemsEditor); - RegisterComponentEditor(TdxLayoutLookAndFeelList, TdxLayoutLookAndFeelListEditor); - - RegisterPropertyEditor(TypeInfo(TColor), TdxCustomLayoutLookAndFeelOptions, '', TdxLayoutColorProperty); - RegisterPropertyEditor(TypeInfo(TColor), TdxLayoutLookAndFeelCaptionOptions, '', TdxLayoutColorProperty); - RegisterPropertyEditor(TypeInfo(TdxCustomLayoutLookAndFeel), nil, '', TdxLayoutLookAndFeelProperty); - RegisterPropertyEditor(TypeInfo(string), TdxLayoutControl, 'RegistryPath', TdxLayoutRegistryPathProperty); - RegisterPropertyEditor(TypeInfo(TBitmap), TdxCustomLayoutItemCaptionOptions, 'Glyph', TcxBitmapProperty); - RegisterPropertyEditor(TypeInfo(Integer), TdxCustomLayoutItemCaptionOptions, 'ImageIndex', TdxLayoutItemImageIndexProperty); - - RegisterSelectionEditor(TdxLayoutItem, TdxLayoutItemSelectionEditor); - - HideClassProperties(TdxLayoutControl, ['AutoContentSizes', 'LookAndFeel', - 'CustomizeFormTabbedView', 'HighlightRoot', 'ShowDesignSelectors', - 'IniFileName', 'RegistryPath', 'StoreInIniFile', 'StoreInRegistry']); - HideClassProperties(TdxCustomLayoutItem, ['AutoAligns', 'LookAndFeel', 'Caption', 'ShowCaption']); - HideClassProperties(TdxLayoutGroup, ['LookAndFeelException']); - - RegisterNoIcon([TdxLayoutItem, TdxLayoutGroup, TdxLayoutAlignmentConstraint, - TdxLayoutStandardLookAndFeel, TdxLayoutOfficeLookAndFeel, TdxLayoutWebLookAndFeel]); - RegisterComponents('ExpressLayoutControl', [TdxLayoutControl, TdxLayoutLookAndFeelList]); -end; - -type - - { TdxLayoutDesignTimeHelper } - - TdxLayoutDesignTimeHelper = class(TInterfacedObject, IdxLayoutDesignTimeHelper) - protected - //IdxLayoutDesignTimeHelper - function IsToolSelected: Boolean; - end; - -{ TdxLayoutDesignTimeHelper } - -function TdxLayoutDesignTimeHelper.IsToolSelected: Boolean; -begin - Result := {$IFDEF DELPHI9}(ActiveDesigner <> nil) and{$ENDIF} - ActiveDesigner.Environment.GetToolSelected; -end; - -initialization - dxLayoutDesignTimeSelectionHelperClass := TdxLayoutDesignTimeSelectionHelper; - dxLayoutDesignTimeHelper := TdxLayoutDesignTimeHelper.Create; - -finalization - dxLayoutDesignTimeHelper := nil; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutCustomizeForm.dfm b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutCustomizeForm.dfm deleted file mode 100644 index 8ad799e2..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutCustomizeForm.dfm +++ /dev/null @@ -1,1473 +0,0 @@ -object dxLayoutControlCustomizeForm: TdxLayoutControlCustomizeForm - Left = 114 - Top = 225 - ActiveControl = btnClose - AutoScroll = False - BorderIcons = [biSystemMenu] - ClientHeight = 463 - ClientWidth = 427 - Color = clBtnFace - OldCreateOrder = False - ShowHint = True - OnClose = FormClose - OnKeyDown = FormKeyDown - OnShortCut = FormShortCut - PixelsPerInch = 96 - TextHeight = 13 - object lcMain: TdxLayoutControl - Left = 0 - Top = 0 - Width = 427 - Height = 463 - Align = alClient - TabOrder = 0 - TabStop = False - HighlightRoot = False - object tvItems: TcxTreeView - Left = 22 - Top = 84 - Width = 200 - Height = 369 - PopupMenu = pmTreeViewActions - Style.TransparentBorder = False - TabOrder = 10 - OnKeyDown = FormKeyDown - OnMouseDown = tvItemsMouseDown - OnMouseMove = ItemsMouseMove - OnMouseUp = ItemsMouseUp - OnContextPopup = tvItemsContextPopup - HideSelection = False - Images = ilItems - MultiSelect = True - MultiSelectStyle = [msControlSelect, msShiftSelect] - RightClickSelect = True - OnChange = tvItemsChange - OnChanging = tvItemsChanging - OnCustomDrawItem = tvItemsCustomDrawItem - OnEditing = tvItemsEditing - OnEdited = tvItemsEdited - end - object tvAvailableItems: TcxTreeView - Left = 229 - Top = 84 - Width = 200 - Height = 369 - PopupMenu = pmAvailableItemsActions - Style.TransparentBorder = False - TabOrder = 17 - OnKeyDown = FormKeyDown - OnMouseDown = tvItemsMouseDown - OnMouseMove = ItemsMouseMove - OnMouseUp = ItemsMouseUp - OnContextPopup = tvAvailableItemsContextPopup - HideSelection = False - Images = ilItems - MultiSelect = True - MultiSelectStyle = [msControlSelect, msShiftSelect] - RightClickSelect = True - OnChange = tvItemsChange - OnChanging = tvItemsChanging - OnCustomDrawItem = tvItemsCustomDrawItem - OnEditing = tvItemsEditing - OnEdited = tvItemsEdited - end - object btnClose: TcxButton - Left = 342 - Top = 428 - Width = 75 - Height = 25 - Action = acClose - TabOrder = 19 - end - object cbTabbedView: TcxCheckBox - Left = 10 - Top = 432 - Action = acTabbedView - Style.TransparentBorder = False - TabOrder = 18 - Transparent = True - Width = 121 - end - object btnShowDesignSelectors: TcxButton - Left = 130 - Top = 10 - Width = 23 - Height = 22 - Action = acShowDesignSelectors - TabOrder = 5 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.GroupIndex = 2 - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnHighlightRoot: TcxButton - Left = 107 - Top = 10 - Width = 23 - Height = 22 - Action = acHighlightRoot - TabOrder = 4 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.GroupIndex = 1 - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnRestore: TcxButton - Left = 84 - Top = 10 - Width = 23 - Height = 22 - Action = acRestore - TabOrder = 3 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnStore: TcxButton - Left = 61 - Top = 10 - Width = 23 - Height = 22 - Action = acStore - TabOrder = 2 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnRedo: TcxButton - Left = 33 - Top = 10 - Width = 23 - Height = 22 - Action = acRedo - TabOrder = 1 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnUndo: TcxButton - Left = 10 - Top = 10 - Width = 23 - Height = 22 - Action = acUndo - TabOrder = 0 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAlignBy: TcxButton - Left = 101 - Top = 56 - Width = 23 - Height = 22 - Action = acAlignBy - TabOrder = 9 - DropDownMenu = pmAlign - Kind = cxbkDropDown - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnTreeViewItemsDelete: TcxButton - Left = 73 - Top = 56 - Width = 23 - Height = 22 - Action = acTreeViewItemsDelete - TabOrder = 8 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnTreeViewCollapseAll: TcxButton - Left = 45 - Top = 56 - Width = 23 - Height = 22 - Action = acTreeViewCollapseAll - TabOrder = 7 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnTreeViewExpandAll: TcxButton - Left = 22 - Top = 56 - Width = 23 - Height = 22 - Action = acTreeViewExpandAll - TabOrder = 6 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAvailableItemsViewAsList: TcxButton - Left = 354 - Top = 56 - Width = 23 - Height = 22 - Action = acAvailableItemsViewAsList - TabOrder = 16 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.GroupIndex = 3 - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAvailableItemsDelete: TcxButton - Left = 326 - Top = 56 - Width = 23 - Height = 22 - Action = acAvailableItemsDelete - TabOrder = 15 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAddItem: TcxButton - Left = 303 - Top = 56 - Width = 23 - Height = 22 - Action = acAddItem - TabOrder = 14 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAddGroup: TcxButton - Left = 280 - Top = 56 - Width = 23 - Height = 22 - Action = acAddGroup - TabOrder = 13 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAvailableItemsCollapseAll: TcxButton - Left = 252 - Top = 56 - Width = 23 - Height = 22 - Action = acAvailableItemsCollapseAll - TabOrder = 12 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAvailableItemsExpandAll: TcxButton - Left = 229 - Top = 56 - Width = 23 - Height = 22 - Action = acAvailableItemsExpandAll - TabOrder = 11 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object lcMainGroup_Root: TdxLayoutGroup - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Visible = False - Hidden = True - ShowBorder = False - object lcMainGroup2: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - LayoutDirection = ldHorizontal - ShowBorder = False - UseIndent = False - object liUndo: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnUndo - ControlOptions.ShowBorder = False - end - object liRedo: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnRedo - ControlOptions.ShowBorder = False - end - object lgSeparator1: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - ShowBorder = False - end - object liStore: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnStore - ControlOptions.ShowBorder = False - end - object liRestore: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnRestore - ControlOptions.ShowBorder = False - end - object liHighlightRoot: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnHighlightRoot - ControlOptions.ShowBorder = False - end - object liShowDesignSelectors: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnShowDesignSelectors - ControlOptions.ShowBorder = False - end - end - object lcMainGroup1: TdxLayoutGroup - AlignVert = avClient - CaptionOptions.Text = 'New Group' - CaptionOptions.Visible = False - LayoutDirection = ldHorizontal - ShowBorder = False - object lcgTreeView: TdxLayoutGroup - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Text = '&Layout Tree View' - object lgTreeView: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - LayoutDirection = ldHorizontal - ShowBorder = False - UseIndent = False - object lcMainItem10: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnTreeViewExpandAll - ControlOptions.ShowBorder = False - end - object lcMainItem9: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnTreeViewCollapseAll - ControlOptions.ShowBorder = False - end - object lgSeparator2: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - ShowBorder = False - end - object lcMainItem7: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnTreeViewItemsDelete - ControlOptions.ShowBorder = False - end - object lgSeparator3: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - ShowBorder = False - end - object lcMainItem2: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAlignBy - ControlOptions.ShowBorder = False - end - end - object lcMainItem6: TdxLayoutItem - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Text = 'cxTreeView1' - CaptionOptions.Visible = False - Control = tvItems - ControlOptions.ShowBorder = False - end - end - object lcgAvailableItems: TdxLayoutGroup - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Text = '&Available Items' - object lgAvailableItems: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - LayoutDirection = ldHorizontal - ShowBorder = False - UseIndent = False - object lcMainItem15: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAvailableItemsExpandAll - ControlOptions.ShowBorder = False - end - object lcMainItem14: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAvailableItemsCollapseAll - ControlOptions.ShowBorder = False - end - object lgSeparator4: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - ShowBorder = False - end - object lcMainItem13: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAddGroup - ControlOptions.ShowBorder = False - end - object liAddItem: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAddItem - ControlOptions.ShowBorder = False - end - object lcMainItem11: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAvailableItemsDelete - ControlOptions.ShowBorder = False - end - object lgSeparator5: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - ShowBorder = False - end - object lcMainItem3: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAvailableItemsViewAsList - ControlOptions.ShowBorder = False - end - end - object lcMainItem8: TdxLayoutItem - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Text = 'cxTreeView2' - CaptionOptions.Visible = False - Control = tvAvailableItems - ControlOptions.ShowBorder = False - end - end - end - object lcMainGroup3: TdxLayoutGroup - AlignVert = avBottom - Hidden = True - LayoutDirection = ldHorizontal - ShowBorder = False - object lcMainItem4: TdxLayoutItem - AlignHorz = ahLeft - AlignVert = avCenter - CaptionOptions.Text = 'cxCheckBox1' - CaptionOptions.Visible = False - Control = cbTabbedView - ControlOptions.ShowBorder = False - end - object lcMainItem1: TdxLayoutItem - AlignHorz = ahRight - AlignVert = avCenter - CaptionOptions.Text = 'cxButton1' - CaptionOptions.Visible = False - Control = btnClose - ControlOptions.ShowBorder = False - end - end - end - end - object pmAlign: TPopupMenu - Left = 48 - Top = 360 - object Left1: TMenuItem - Action = acAlignLeftSide - end - object Right1: TMenuItem - Tag = 2 - Action = acAlignRightSide - end - object miSeparator3: TMenuItem - Caption = '-' - end - object op1: TMenuItem - Tag = 1 - Action = acAlignTopSide - end - object Bottom1: TMenuItem - Tag = 3 - Action = acAlignBottomSide - end - object miSeparator4: TMenuItem - Caption = '-' - end - object None1: TMenuItem - Tag = -1 - Action = acAlignNone - end - end - object alMain: TActionList - Images = ilActions - Left = 16 - Top = 360 - object acAddGroup: TAction - Category = 'Buttons' - Caption = 'Add &Group' - Hint = 'Add Group' - ImageIndex = 6 - ShortCut = 32839 - OnExecute = acAddGroupExecute - end - object acAddItem: TAction - Category = 'Buttons' - Caption = 'Add &Item' - Hint = 'Add Item' - ImageIndex = 5 - ShortCut = 32841 - OnExecute = acAddItemExecute - end - object acAvailableItemsDelete: TAction - Category = 'Buttons' - Caption = 'Delete' - Hint = 'Delete' - ImageIndex = 2 - OnExecute = acAvailableItemsDeleteExecute - end - object acTreeViewItemsDelete: TAction - Category = 'Buttons' - Caption = 'Delete' - Hint = 'Delete' - ImageIndex = 2 - OnExecute = acTreeViewItemsDeleteExecute - end - object acClose: TAction - Category = 'Buttons' - Caption = '&Close' - Hint = 'Close' - ShortCut = 27 - OnExecute = acCloseExecute - end - object acAvailableItemsExpandAll: TAction - Category = 'Buttons' - Caption = 'Expand All' - Hint = 'Expand All' - ImageIndex = 3 - OnExecute = acAvailableItemsExpandAllExecute - end - object acAvailableItemsCollapseAll: TAction - Category = 'Buttons' - Caption = 'Callapse All' - Hint = 'Collapse All' - ImageIndex = 1 - OnExecute = acAvailableItemsCollapseAllExecute - end - object acTreeViewExpandAll: TAction - Category = 'Buttons' - Caption = 'Expand All' - Hint = 'Expand All' - ImageIndex = 3 - OnExecute = acTreeViewExpandAllExecute - end - object acTreeViewCollapseAll: TAction - Category = 'Buttons' - Caption = 'Callapse All' - Hint = 'Collapse All' - ImageIndex = 1 - OnExecute = acTreeViewCollapseAllExecute - end - object acAlignLeftSide: TAction - Category = 'Aligns' - Caption = 'Left Side' - OnExecute = AlignExecute - end - object acAlignRightSide: TAction - Tag = 2 - Category = 'Aligns' - Caption = 'Right Side' - OnExecute = AlignExecute - end - object acAlignTopSide: TAction - Tag = 1 - Category = 'Aligns' - Caption = 'Top Side' - OnExecute = AlignExecute - end - object acAlignBottomSide: TAction - Tag = 3 - Category = 'Aligns' - Caption = 'Bottom Side' - OnExecute = AlignExecute - end - object acAlignNone: TAction - Tag = -1 - Category = 'Aligns' - Caption = 'None' - OnExecute = AlignExecute - end - object acAvailableItemsViewAsList: TAction - Category = 'Buttons' - AutoCheck = True - Caption = 'ViewAsList' - Hint = 'ViewAsList' - ImageIndex = 8 - OnExecute = acAvailableItemsViewAsListExecute - end - object acTabbedView: TAction - Category = 'Buttons' - AutoCheck = True - Caption = 'Tabbed View' - Hint = 'Tabbed View' - ImageIndex = 9 - OnExecute = acTabbedViewExecute - end - object acHighlightRoot: TAction - Category = 'Buttons' - AutoCheck = True - Caption = 'acHighlightRoot' - Hint = 'Highlight Root' - ImageIndex = 4 - OnExecute = acHighlightRootExecute - end - object acShowDesignSelectors: TAction - Category = 'Buttons' - AutoCheck = True - Caption = 'acHighlightControlSelectors' - Hint = 'Show Design Selectors' - ImageIndex = 7 - OnExecute = acShowDesignSelectorsExecute - end - object acStore: TAction - Category = 'Buttons' - Caption = 'Store' - ImageIndex = 9 - OnExecute = acStoreExecute - end - object acRestore: TAction - Category = 'Buttons' - Caption = 'acRestore' - ImageIndex = 10 - OnExecute = acRestoreExecute - end - object acTreeViewItemRename: TAction - Category = 'Buttons' - Caption = 'Rename' - Hint = 'Rename' - ImageIndex = 13 - OnExecute = acTreeViewItemRenameExecute - end - object acAvailableItemRename: TAction - Category = 'Buttons' - Caption = 'Rename' - Hint = 'Rename' - ImageIndex = 13 - OnExecute = acAvailableItemRenameExecute - end - object acUndo: TAction - Category = 'Buttons' - Caption = 'Undo' - Hint = 'Undo' - ImageIndex = 11 - OnExecute = acUndoExecute - end - object acRedo: TAction - Category = 'Buttons' - Caption = 'Redo' - Hint = 'Redo' - ImageIndex = 12 - OnExecute = acRedoExecute - end - object acAlignBy: TAction - Category = 'Aligns' - Caption = 'acAlignBy' - Hint = 'Align By' - ImageIndex = 0 - OnExecute = acAlignByExecute - end - end - object ilActions: TcxImageList - FormatVersion = 1 - DesignInfo = 25690128 - ImageInfo = < - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000302017FF00000002000000090000000F00000011000000120000000D0000 - 0003000000000000000000000000000000000000000000000000000000000000 - 0000332319FF0000000650433ABE6C594CFF675447FF645143FF46382FC30000 - 000C000000000000000000000000000000000000000000000000000000000000 - 000036251BFF00000006766257FFF4E3D3FFE5C3A0FFE2BE9BFF635044FF0000 - 0010000000000000000000000000000000000000000000000000000000000000 - 000039291FFF000000047B675CFFFAEEE2FFF9EBDFFFF3E1D0FF675447FF0000 - 000D000000000000000000000000000000000000000000000000000000000000 - 00003E2C22FF000000015E4F47BF7A675CFF766256FF715D51FF504139C30000 - 0007000000000000000000000000000000000000000000000000000000000000 - 0000423125FF0000000000000003000000070000000A0000000E0000000F0000 - 000F0000000F0000001100000013000000150000000F00000004000000000000 - 0000463529FF000000005C4F47B87D695EFF79655AFF766256FF725E52FF6E5B - 4FFF6B584CFF685548FF655244FF634F42FF46382FC60000000F000000000000 - 00004B392DFF00000000836F65FFF6E6D6FFEBCBA9FFE9C7A6FFE7C5A3FFE5C2 - A0FFE3BF9CFFE1BD98FFDFBB96FFDEB893FF635043FF00000014000000000000 - 00004F3D31FF00000000867267FFFCF0E4FFFBEFE2FFFAEDE1FFF9ECDFFFF7EA - DDFFF6E8DAFFF5E6D8FFF3E5D6FFEFDDCAFF655245FF00000011000000000000 - 0000544135FF0000000065574FBD867268FF837065FF806C61FF7D695EFF7966 - 5BFF766256FF715E53FF6E5B4EFF6B584BFF4D3F36C60000000A000000000000 - 0000574438FF000000000000000300000007000000090000000C000000100000 - 001300000017000000140000000B000000090000000700000002000000000000 - 00005B483BFF00000001584A41B9766257FF725E52FF6E5A4EFF6A564AFF6653 - 46FF645043FF46382EC50000000E000000000000000000000000000000000000 - 00005E4A3EFF000000007F6B61FFF6E6D6FFEBCBA9FFE9C8A6FFE7C4A3FFE4C1 - 9EFFE2BE99FF645144FF00000012000000000000000000000000000000000000 - 0000614D40FF00000000836F65FFFBF0E4FFFBEFE3FFFAEEE1FFF9ECDEFFF7EA - DCFFF1E0CEFF685548FF0000000F000000000000000000000000000000000000 - 0000634F42FF0000000064554EBD847066FF816C62FF7D695EFF796559FF7461 - 55FF705C50FF504239C300000008000000000000000000000000000000000000 - 0000634F42FF0000000000000000000000000000000000000000000000010000 - 0003000000040000000400000001000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 000000000000000000030000000900000010000000170000001A000000190000 - 00140000000D0000000400000001000000000000000000000000000000000000 - 000100000007000701280022067D00370ABD00480DE7005010FC00450DE80034 - 0AC2001E0687000601320000000C000000020000000000000000000000010000 - 000700190456003F0BC0126D22FF0D741DFF107C22FF138123FF10791EFF0B6D - 19FF055E14FF00360ACA001404660000000F0000000200000000000000040019 - 0452095415D7218432FF1D9A32FF1E9D30FF1D9E2FFF1B962CFF189026FF1588 - 23FF127D20FF096818FF02430EDF001404650000000B000000010008011F0144 - 0ABB2D903FFF26AC3DFF21A036FF1E9732FF1D992FFF1C9B2EFF1B942BFF198C - 26FF168522FF137F20FF096818FF00360BC900060131000000040028066D2384 - 34FF43BD5CFF25AB3FFF85BF8FFFF4F4F3FF8BBE93FF1B8E2CFF8CBE93FFFFFF - FFFF8AC090FF168824FF127E20FF065E14FF001E06830000000B01450BAE46A8 - 59FF37BD55FF22A13CFF17832CFF81B28AFFF6F5F5FF84B18BFFFFFFFFFF88B7 - 8EFF198D29FF1B9729FF158723FF0B6C1AFF01330ABE00000011015D0EDE62C4 - 79FF31BD51FF2CB94BFF22A13CFF17832CFF82B38BFFF6F6F6FF87B88FFF1C96 - 2DFF1D9D2EFF1B9C2DFF189027FF10791EFF00460DE600000014016C10FB74D6 - 8DFF3CC35FFF2EBA4FFF2AB048FF1F9537FF167C2AFF85B98EFF1E9232FF1E96 - 31FF1D9B2FFF1D9D2EFF1A962CFF138123FF005210FC0000001400610EDD65C9 - 7FFF4DCB70FF31BC53FF84C293FFECEBEBFF88BA93FF209437FF8FC398FFFFFF - FFFF8CC595FF1E9F30FF1D9E2FFF117E22FF00480DE400000011004A0BA84BB2 - 63FF64D483FF2CAF4EFF1D8C39FF7FB28BFFECECEBFF83B28DFFFAFAFAFF8ABC - 93FF1F9B35FF20A434FF1E9F2FFF0D751EFF00380AB60000000B002D06642994 - 3DFF79DA95FF56CE77FF2BAE4DFF1D8C38FF7FB28BFFECECECFF86B890FF23A2 - 3DFF25AC3CFF23A93AFF1C9B32FF126E22FF0022067400000006000A01150150 - 0CB044AD5CFF75DA92FF55CE77FF2BAF4EFF1D8C39FF82B98FFF28AA45FF29B2 - 45FF26B042FF26AD3EFF218532FF003F0BBA000701200000000200000000001F - 04430B671ACE44AC5CFF79DA95FF64D483FF3FB35EFF3ABE5BFF2FBC50FF37BD - 54FF43BD5CFF2D903FFF095516D30019044D0000000400000000000000000000 - 0000001F044301500BB029953DFF4BB263FF66C87EFF74D58DFF61C479FF46A9 - 59FF238534FF01450BB5001A044A000000030000000000000000000000000000 - 000000000000000A0115002D0763014B0AA701610FDC016D10FB005E0EDD0046 - 0BA9002906670008011900000002000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000100000003000000010000000000000000000000000000 - 0000000000010000000400000001000000000000000000000000000000000000 - 00000000000300000011040315480000000F0000000200000000000000000000 - 0003000000130303135000000019000000050000000000000000000000000000 - 0003000000140C0B41AA14136EFD060624780000001100000002000000020000 - 0014050522820E0D64FD080738B6000000210000000500000000000000010000 - 000D0C0C42A6151573FF071EC9FF14136EFD0606247800000013000000140505 - 237E0F0F67FD061BC7FF0E0D65FF080738B60000001800000001000000020504 - 173F181675FA0B28CEFF0625DCFF071EC9FF121479FD0606247E060624801011 - 74FD061BC7FF041DD8FF061BC5FF0E0D63FC0302134F00000004000000010000 - 00080808286B181774FB0A28CEFF0525DCFF071ECAFF121479FE121378FE061B - C7FF041DD8FF061BC6FF100E66FC0504227F0000001200000001000000000000 - 0001000000090808276A171A7EFB0A28CEFF0625DCFF061ECBFF061CCAFF041D - D8FF061BC6FF101171FB0505237C000000120000000200000000000000000000 - 0000000000010000000A0908286D171A7FFC0929CFFF0627DDFF0420DAFF061C - C9FF121376FD0605247E00000012000000020000000000000000000000000000 - 000000000001000000080908286A181B82FE0C2ED4FF072CE0FF0625DCFF071E - CCFF121479FE0606247A00000011000000020000000000000000000000000000 - 00010000000609092A631A1E86FD0E3CDAFF0B39E7FF6379E3FF6175E0FF0625 - DCFF071ECAFF121478FD060524740000000F0000000200000000000000000000 - 00030A0A2B5E1D1C7EFC1348DFFF0F49EFFF6580E7FF181B80FC161A7FFC6175 - DFFF0625DCFF071ECAFF14136FFD060624730000000C00000001000000000504 - 13281E1E83FC4E7BEBFF1356F4FF6789EAFF191D84FA090828680808276A1719 - 7EFA6275DFFF0625DCFF071EC9FF14136EFD0302103700000002000000000000 - 00020E0D3A751F1E85FF88A7F1FF1B2087FA09092A6100000007000000080808 - 286717197EFA6175DFFF161573FF090832870000000C00000001000000000000 - 0000000000030E0D3A751C238CFA0A092B5D0000000500000001000000010000 - 00070808286517197EFA0A0933820000000D0000000200000000000000000000 - 0000000000000000000204041327000000030000000000000000000000000000 - 0001000000050404112E00000008000000010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000100000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 000000000000000000030000000900000010000000170000001A000000190000 - 00140000000D0000000400000001000000000000000000000000000000000000 - 000100000007000A0128002D067D014B0ABD01610EE7016E10FC005D0EE80046 - 0BC201290687000801320000000C000000020000000000000000000000010000 - 0007001F045601500BC0137F22FF0D7E1EFF118222FF138222FF107D1EFF0B76 - 1AFF066E15FF01450BCA001A04660000000F000000020000000000000004001F - 0552096316D7218E33FF1C9A31FF1E9F30FF1D9A2EFF19912BFF188E26FF1587 - 23FF127F20FF0A7118FF02500EDF001904650000000B00000001000A011F0150 - 0CBB2D983FFF26AD3EFF23AA3AFF21A334FF1C942EFF8CC293FF198D29FF1B97 - 29FF178C24FF138020FF096F18FF003F0BC90007013100000004002D066D238D - 34FF43BC5CFF26B141FF25AB3CFF209B35FF89B990FFFFFFFFFF89BC90FF198F - 29FF1B972AFF178C25FF127F20FF056515FF002206830000000B004B0AAE46AC - 59FF37BD55FF29B345FF23A23CFF85B68DFFFBFAFAFF86B38DFFFFFFFFFF89BC - 90FF198D29FF1B972AFF158723FF0B6F1AFF00380ABE0000001100610EDE62C5 - 79FF31BE52FF2BB44AFF7FB78BFFEDEDEEFF88B891FF137425FF8BBB93FFFFFF - FFFF8BC392FF1B982CFF189026FF10791EFF00480EE600000014016C10FB74D6 - 8DFF3CC35FFF27A744FF1C8C34FF1F9437FF219939FF88BC91FF147826FF1989 - 2BFF1D9B2FFF1D9D2EFF1B962CFF138122FF005210FC00000014015E0EDD66C7 - 7FFF4ECB70FF31C155FF2EBB4FFF28AA45FF7FB28AFFF0F0F0FF89BE92FF209B - 35FF20A435FF1FA132FF1D9E2FFF117D21FF00460DE40000001101450BA84BAF - 63FF64D383FF34C35BFF2DB04FFF84B68FFFF4F4F4FF86B590FFFFFFFFFF8DC2 - 96FF209B34FF20A435FF1E9D30FF0D701EFF01330AB60000000B00280664288C - 3CFF79DA95FF54CA74FF7EB88DFFE2E3E3FF86B992FF198130FF8CBE96FFFFFF - FFFF8EC998FF22A437FF1D9B32FF136721FF001E067400000006000801150144 - 0AB044A55BFF60C07BFF359A4FFF29A148FF2FB752FF26A543FF1C8C34FF1F96 - 38FF24A83FFF26AC3DFF217E32FF00360BBA0006012000000002000000000019 - 04430B5719CE44A25BFF79D995FF64D383FF4ECC70FF3CC35EFF31BD51FF37BD - 54FF43BC5CFF2D883EFF094816D30014044D0000000400000000000000000000 - 000000180443003F0AB028833CFF4BA763FF66C57EFF74D58CFF61C079FF46A0 - 59FF237533FF00360BB50014044A000000030000000000000000000000000000 - 000000000000000701150022066300370AA700480DDC005010FB00450DDD0034 - 0AA9001E06670006011900000002000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000030201036638196C000000000B06030C6F3D - 1C75000000000000000000000000000000000000000000000000000000000000 - 000000000000301A0C3300000000140B0515EE823BFC391F0E3C7D441F84CC70 - 33D80000000028160A2A44251148000000000000000000000000000000000000 - 0000000000009C5527A5965225A01F110828402310530F080425100904283C21 - 0F5228160A35CC7033DB4F2B1454000000000000000000000000000000000000 - 0000000000003A200E3F48271259321C06735B330CBE764410ED744310EE5530 - 0CC32D1A067D4425115D0F08041422130824412410450000000000000000AD5F - 2BB7AF602CBA301A0C3D48290A92A3662CFFC88952FFE9A975FFEAAC76FFC88B - 56FF9C632DFF3E24099F3B200F53D17234E04124104500000000000000000905 - 02096035186A351F076AA6662AFFD58E58FFEA9B5FFFEE9957FFF09B59FFF0A0 - 64FFD7935DFF9A602BFF2D1A067B3C210F490000000000000000090502094425 - 11482213092A633A0DB4BF7940FFDD864AFFE18646FFE38B4CFFE68D4CFFE58A - 4BFFE38C4FFFBB7944FF56310CC1321B0D46914F2499603518666F3D1C75E07B - 38ED130B051A874F12E9CA7A43FFD3763AFFD97C3EFFDC7F41FFDB8344FFDC81 - 41FFD87B3EFFCE7E46FF744311ED120A05279652259F1F110821000000000603 - 01060A06030F894F11E8C46930FFD1753EFFDC8952FFE49561FFE59661FFDF8B - 54FFD57B42FFC56E34FF764411EC0C06031F0B06030C00000000000000007741 - 1E7E43251149663B0DAFB15D20FFDF9D76FFEAB999FFEBB999FFEBB99AFFEABA - 9AFFE09F79FFAC5B22FF59330CBB40231051DA7836E73C210F3F361E0D39914F - 2499522D145737200760A25918FFDFB296FFF2D9CBFFF2D9CBFFF2D9CBFFF2D9 - CBFFDFB396FF985417FF321C076F341C0D3D301A0C3311090412000000000000 - 00001C10071E4828124E4D2C0A83B57D48FFD8B194FFEFDACDFFEFDACDFFD7B0 - 94FFB17948FF4729098E48281257613518680000000000000000000000000000 - 00008E4E23969A5426A3201108233720075F673C0EAE894F11E8884E12E8633B - 0DB2351E0766190D06225E331765BB662FC61A0E061B00000000000000000000 - 00002D190B3000000000321B0C35874A228F23130926120A051611090416150B - 051A8448218E67381A6D00000000000000000000000000000000000000000000 - 00000000000000000000412410459C5527A503020103A45A29AE9C5527A50000 - 00004A28124E8046208700000000000000000000000000000000000000000000 - 000000000000000000000B06030C0000000000000000391F0E3C3E2210420000 - 0000000000000302010300000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000004D0FFF004D0FFF004D0FFF000000000000000000000000000000000000 - 000000000001000000050000000E0000001800000020000000210000001B0000 - 001100550FFF40D077FF00550FFF000000000000000000000000000000000000 - 000100000009100B05383E29129465431ED2825626F36B461FF6005E10FF005D - 10FF005D0FFF41D179FF005D10FF005E10FF015D10FF00000000000000000000 - 00082015095462401CC8AD6F36FFC87F41FFDC8B49FFAD6D39FF016610FF43D4 - 7EFF43D47EFF44D47DFF43D47EFF43D47EFF006610FF0000000000000003100A - 053162411BC4B77538FFE08C49FFE08C49FFE08C4AFFBA743DFF016F11FF016F - 10FF017011FF47D781FF016F10FF016F11FF016F10FF00000000000000073F28 - 1186AB6B31FFDB8545FFDB8645FFDB8544FFDA8644FFD18042FFB66F39FF8753 - 2AFF017611FF48DB86FF017711FF0000001100000000000000000000000A6942 - 1AC4BF7336FFD67F40FFD57F40FFD67F40FFD67F40FFD57F3FFFD67F40FFB16A - 34FF017C11FF017C11FF017C11FF0000001A00000000000000000000000B8855 - 20EECA7538FFCF783AFFD78348FFDE8C54FFE3935DFFE3935DFFDE8C54FFCD7D - 45FFAD6430FF9E5C2CFF71451CF50000001F0000000000000000000000098954 - 20EDC46F32FFD78751FFE9A678FFE9A678FFE9A578FFE9A679FFE9A678FFE9A5 - 77FFD78751FFC46F33FF8A541FF30000001E0000000000000000000000066C41 - 17BFB5662AFFE6AC86FFEFBD9BFFEFBD9BFFEFBC9AFFEFBD9BFFEEBC9BFFEFBC - 9BFFE6AC85FFB5652AFF6D4118CF000000160000000000000000000000034327 - 0E79A75E23FFEABFA3FFF5D6C1FFF6D6C1FFF5D6C1FFF6D6C1FFF5D6C1FFF5D6 - C1FFEABFA3FFA75E23FF43280E910000000C000000000000000000000001120A - 03226B3F15B6B97B4BFFFAECE3FFFBEDE4FFFBEDE4FFFBEDE3FFFBEDE4FFFAEC - E3FFB97B4AFF6B3E15C5120A0335000000040000000000000000000000000000 - 00012314073E6C3E14B6B06F3AFFCFA381FFEFDFD2FFEFDED2FFCFA381FFAF6F - 3AFF6C3E14C12314065000000008000000000000000000000000000000000000 - 000000000001120A032146280C77724013BD915319ED915219ED724114C24627 - 0C81120A032D0000000600000001000000000000000000000000000000000000 - 0000000000000000000000000002000000040000000700000008000000080000 - 0005000000020000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 000000000002000000080000000E000000140000001400000010000000090000 - 000200000000004D0FFF004D0FFF004D0FFF0000000000000000000000000000 - 00020000000F01200774023A0DBE034D11ED034B11ED02380DC0011E07780000 - 00130000000300550FFF40D077FF00550FFF0000000000000000000000010000 - 000D022F0A93167326FF2F943FFF44B054FF44AF54FF2F923FFF125B20FF005E - 10FF005D10FF005D0FFF41D179FF005D10FF005E10FF015D10FF000000050123 - 066D167726FF32A544FF29AF3DFF18A92EFF18A92EFF29AF3DFF278035FF0166 - 10FF43D47EFF43D47EFF44D47DFF43D47EFF43D47EFF006610FF000000070243 - 0CB7259035FF1BA32DFF0F9D22FF0F9E22FF0F9D23FF0F9E23FF168726FF016F - 11FF016F10FF017011FF47D781FF016F10FF016F11FF016F10FF00000009035C - 11EA229530FF0D931DFF0D931CFF0D911CFF0D931CFF0D911CFF0C8A1BFF1C7A - 27FF07320CFE017611FF48DB86FF017711FF000000030000000000000008035E - 10E911861CFF1B942CFF34AA4DFF48BD68FF48BD68FF34AB4DFF1C952CFF1182 - 1CFF104A16FF017C11FF017C11FF017C11FF0100001300000002000000050247 - 0CB3077211FF64B774FF8DD1A0FF8DD2A0FF8DD2A0FF8DD1A0FF65B774FF076C - 11FF3C5E23FFBE8053FFAA764DFF83552BFF2F1D0A7800000009000000020127 - 0665046C11FF8AC091FFC4E3CAFFC4E3CAFFC4E3CAFFC4E3CAFF89BF91FF0461 - 11FF7F6F34FFDF8B4FFFE39156FFBE7E4BFF593512C000000010000000000000 - 000602360989398B43FF88BA8DFFC7E0C9FFC7DFCAFF88B98DFF398544FF5E66 - 28FFCF8147FFDB8547FFDA8046FFD0824DFF794819ED00000014000000000000 - 0001000000060126076502470CB50F6513FD136515FF3E6620FF807439FFD991 - 60FFE49864FFE08E59FFD78049FFC8743CFF7B4918ED00000013000000000000 - 000000000000000000020000000A663E12B5AE6028FFD99C77FFE6B798FFEBB9 - 9BFFEBBB9DFFEBBB9DFFE1A37DFFB0622BFF5D3812BD0000000E000000000000 - 000000000000000000000000000239220A65A66021FFE0B59AFFF2DACCFFF2DA - CCFFF2DACCFFF3DACCFFE0B59AFF9D5A20FF341F0A7200000007000000000000 - 0000000000000000000000000000010000064F2F0E88B9824FFFDAB498FFF0DC - CFFFF0DCCFFFD9B398FFB47F4FFF492C0E920100000E00000002000000000000 - 0000000000000000000000000000000000010100000639230A64694014B38D55 - 1AE98B551BEA663F13B636210A6C0100000C0000000200000000000000000000 - 0000000000000000000000000000000000000000000000000002000000050000 - 0007000000080000000700000004000000010000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000030000 - 000E0000001400000016000000180000001A0000001C0000001E000000200000 - 002200000024000000260000002700000029000000210000000A0000000B036B - 0EFF02690EFF03680EFF03670EFF02650EFF03640EFF02630EFF02600EFF025F - 0EFF025E0EFF025E0EFF035C0EFF035B0EFF025A0EFF000000210000000B036C - 0EFF60C27EFF2BAE54FF219945FF27AB4FFF25AB4DFF1A943EFF20A948FF1FA8 - 45FF158E37FF1AA640FF18A43FFF0F8830FF025A0EFF0000002900000009026D - 0EFF68D08BFF2BAB53FF33BE5FFF31BD5DFF25A44CFF2CBB58FF29BA55FF1E9C - 44FF24B750FF22B54CFF17953BFF18A43EFF025C0EFF0000002700000008026F - 0EFF61C380FF39C166FF36C063FF2AA951FF31BD5DFF2FBC5AFF22A249FF28B9 - 54FF27B852FF1B9A41FF22B54CFF1BA540FF025E0EFF00000025000000060371 - 0EFF6CD18EFF3CC268FF2EAD56FF36C063FF33BF5FFF27A64EFF2EBC5AFF2CBA - 58FF209F46FF26B852FF24B750FF158D37FF025E0EFF00000023000000050371 - 0EFF6ED290FF32B15AFF3CC268FF39C166FF2CAB54FF33BE5FFF31BD5EFF25A4 - 4CFF2CBB58FF29B954FF1E9C44FF1FA745FF025F0EFF00000020000000040373 - 0EFF66C785FF3FC56EFF3EC36BFF30AF58FF39C165FF35BF63FF29A951FF31BD - 5DFF2EBB5BFF22A249FF28BA55FF21A848FF03620EFF0000001E000000030374 - 0EFF71D494FF41C570FF34B35DFF3DC36BFF3CC268FF2EAD56FF36BF63FF33BE - 5FFF26A74EFF2EBC5BFF2CBB58FF1A943EFF03630EFF0000001C000000030375 - 0EFF73D495FF37B660FF42C56FFF40C46EFF32B15AFF3BC268FF39C166FF2BAB - 53FF34BE60FF31BD5DFF24A54BFF25AB4DFF02640EFF0000001A000000020377 - 0EFF69CA88FF47C774FF45C772FF35B45FFF3FC46EFF3EC46BFF30B058FF39C1 - 66FF35C063FF29A951FF31BD5EFF28AC4FFF02650EFF00000017000000010378 - 0EFF75D598FF48C775FF38B862FF45C772FF42C670FF34B35CFF3EC36AFF3BC2 - 68FF2DAE56FF35BF64FF34BF60FF219A45FF02670EFF00000015000000000379 - 0EFF77D79AFF3AB964FF49C776FF47C774FF37B660FF42C56FFF40C56EFF32B1 - 5BFF3BC268FF39C166FF2BAB53FF2BAE54FF03680EFF00000013000000000379 - 0EFF6ACA8AFF77D69AFF75D698FF69CA88FF72D495FF71D494FF65C685FF6DD2 - 90FF6BD18EFF62C280FF68D08BFF5FC17EFF03690EFF0000001000000000037B - 0EFF03790EFF03790EFF03780EFF03770EFF03750EFF03740EFF03730EFF0371 - 0EFF02710EFF03700EFF036D0EFF026C0EFF026C0EFF0000000B000000000000 - 0000000000000000000000000000000000010000000100000002000000030000 - 0003000000040000000500000006000000080000000800000003} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000021732 - 68BB1E4190FF1B3E8DFF193D8AFF183989FF102861C30000000C000000000000 - 0000000000000000000000000000000000000000000000000000000000022148 - 94FF86D8FBFF43BFF5FF39B9F2FF31B4EEFF183989FF0000000F000000000000 - 0000000000005C5C5CFF565656FF515051FF4B4B4AFF464645FF414140FF244A - 97FF8CDCFEFF4DC5F9FF52C4F7FF79D0F6FF193B8AFF0000000D000000000000 - 000000000000636262FF0000000000000000000000000000000000000000264E - 98FF90DEFFFF70B5E3FF204592FF1D4190FF142E69C300000007000000000000 - 000000000000686969FF00000000000000000000000000000000000000001E3D - 73BD264E99FF1B3970BE00000004000000040000000400000001000000000000 - 0000000000006F6F6FFF00000000000000000000000000000000000000010000 - 00070000000E0000001200000016000000180000001200000005000000000000 - 000000000000767575FF00000000000000000000000000000000000000031731 - 68BC1E4190FF1B3E8DFF193D8AFF183989FF102761C900000012000000000000 - 0000000000007C7B7BFF00000000000000000000000000000000000000022148 - 94FF86D8FBFF43BFF5FF39B9F2FF31B4EEFF183989FF00000017000000000000 - 000000000000828282FF7C7C7CFF757675FF6F6F6FFF686868FF636263FF244A - 97FF8CDCFEFF4DC5F9FF52C4F7FF79D0F6FF193B8AFF00000014000000000000 - 000000000000888888FF0000000000000000000000000000000000000000264E - 98FF90DEFFFF70B5E3FF204592FF1D4190FF142E68C60000000B000000010000 - 00070000000E8E8E8EFF00000016000000180000001200000005000000001E3D - 73BD264E99FF1B3970BE00000006000000060000000600000002000000031731 - 68BC1E4190FF1B3E8DFF193D8AFF183989FF102761C900000012000000000000 - 0000000000000000000000000000000000000000000000000000000000022148 - 94FF86D8FBFF43BFF5FF39B9F2FF31B4EEFF183989FF00000017000000000000 - 000000000000000000000000000000000000000000000000000000000000244A - 97FF8CDCFEFF4DC5F9FF52C4F7FF79D0F6FF193B8AFF00000014000000000000 - 000000000000000000000000000000000000000000000000000000000000264E - 98FF90DEFFFF70B5E3FF204592FF1D4190FF142E68C60000000B000000000000 - 0000000000000000000000000000000000000000000000000000000000001E3D - 73BD264E99FF1B3970BE00000006000000060000000600000002000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000020000 - 0010000000220000002C0000002F0000002F0000003100000032000000320000 - 00330000003400000035000000340000002A00000014000000030000000D744E - 26CA9F6B33FF9D6932FF4C453FFF453E38FF3C352FFF332C27FF2A231EFF211B - 16FF1F1914FF1F1914FF8A5824FF895723FF613E18D0000000120000001CA46F - 37FFF1CBA2FFEAB77FFF5D564FFFE4AC70FFE2AA6DFF433C36FF37302BFF2A24 - 1FFF211B16FF1F1914FFD99E5FFFD99D5EFF885723FF0000002900000021A671 - 39FFFCD7B1FFFAC790FF6E665FFFF9BF81FFF8BD7FFF564F48FF49423CFF3B35 - 2FFF2E2722FF221C17FFF3B575FFDA9E60FF8A5824FF000000330000001EA873 - 3AFFFCDAB4FFFBC992FF79716AFFF9C184FFF9BF81FF655E57FF5A534CFF4C45 - 3FFF3C3630FF2E2722FFF4B673FFDCA063FF8C5A25FF000000320000001BAB75 - 3BFFFEDCB8FFFCCB95FF877F77FF7D756DFF787069FF716A62FF686059FF5B54 - 4DFF4C453FFF3C3530FFF4B777FFDCA264FF8D5C26FF0000003000000018AD77 - 3DFFFEDEBCFFFDCC98FFFCC589FFFBC387FFFAC285FFF9C084FFF9BF81FFF8BD - 7FFFF6BC7DFFF6B97AFFF5B878FFDFA466FF8F5D28FF0000002E00000016AF79 - 3FFFFEE0BFFFFBCB97FFF1BB80FFEAB57BFFE7B176FFE4AE73FFE2AB71FFE1A9 - 6EFFDFA76CFFE3AB6EFFF0B477FFE1A669FF915F29FF0000002C00000014B17A - 40FFFFE1C1FFF6C694FFBE8D57FFB98955FFB48552FFAF814FFFAB7C4BFFA678 - 48FFA17444FF9E7141FFE3AB6EFFE4A96CFF93612AFF0000002900000012B37C - 41FFFFE3C5FFF6C795FFC1905AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFA37544FFDFA76CFFE5AD6FFF96632CFF0000002600000010B47E - 42FFFFE5C8FFF8CB9BFFC4915CFFFFFFFFFFA9A9A8FFA3A2A3FF9B9B9BFF9393 - 93FFFFFFFFFFA87A49FFE1AA6EFFE9B073FF98652EFF000000230000000EB57F - 44FFFFE6CAFFF9CD9EFFC4915CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFAF7F4EFFE2AC6FFFECB376FF9A6730FF000000200000000DB780 - 44FFFFE7CDFFFBD5ACFFC4915CFFFFFFFFFFA8A8A8FFA3A3A2FF9B9B9BFF9494 - 93FFFFFFFFFFB58551FFE4B27BFFEFBC86FF9D6931FF0000001C00000009B881 - 45FFFFEBD6FFFCE4C9FFC4915CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFBA8B56FFE7C199FFF6D0A8FF9F6B33FF00000014000000038860 - 33C1B88246FFB68044FFC4915CFFC4915CFFC4915CFFC4915CFFC4915CFFC491 - 5CFFC3905BFFBF8E59FFA26E35FFA47037FF775128C600000008000000000000 - 0003000000070000000A0000000B0000000C0000000D0000000E0000000F0000 - 00100000001100000011000000110000000E0000000600000001} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 00000000000000000000000000020000000700000010000000170000001A0000 - 0017000000120000000900000002000000000000000000000000000000000000 - 000000000000000000020000000F2E1C0C61693F1BB68F5625E5A5632AFC8C54 - 22E5653C19B9341F0C7300000015000000050000000100000000000000000000 - 0000000000010100000B4E2F158AA6672EF4AB682CFFA7642AFFAA672CFFAE6A - 2EFFB06C2FFFA76429FE553112AA0D0803300000000500000000000000000000 - 0000000000031F1308408C5628D23D240F790F0904350100001F211308544C2D - 1299995B25F1B26C2FFFA8642AFF502C0FAA0000001500000002000000000000 - 00000402010B553215861E1107400000000B0000000300000002000000050000 - 0011331D0B73935621F1AD692DFF985720FE2C1707730000000A000000010000 - 00070000000D000000140000001400000014000000130000000B000000020000 - 00020000001146260D989D5A21FFA15D24FF552C0EB80000001100000009C170 - 2DFFB76828FFAE5F22FFA2571DFF9C521AFF975018FF48270C8D000000060000 - 0000000000061C0F0553904D19FFA66228FF784016E4000000160000000CC776 - 32FFD58D4DFFC57636FFBE6E2FFFB16428FF5D310FAB00000011000000020000 - 0000000000040F0702398C4815FFA96429FF955523FC000000190000000BCC7B - 36FFDD9552FFD0823EFFC77635FFB46527FF2F19085F00000007000000000000 - 0000000000062311055C934F1CFFA76329FF8B5527E3000000150000000AD07F - 39FFDF9B55FFDB914CFFD28844FFC17332FF6135139D0000000E000000050000 - 00050000001147230A99A35D26FFA9662DFF6D4725B40000000F00000009D182 - 3EFFD98F48FFDA914DFFDD9654FFD38746FFBB7031F66236139C2A1608542815 - 0656562D0FA0A15D28F5B26C32FFB37239FE3D29166C0000000800000007D185 - 44FF67401F8B955D2BBDD78E49FFDF9856FFD78D4BFFC77839FFB8692AFFB163 - 28FFB76C32FFC2783FFFC0783FFF684424A00000000F00000001000000046844 - 258400000008130C052071461F95D18540FDD68B49FFD98F51FFD99053FFD388 - 4BFFC97E44FFBF783EFE6742219D120C07270000000300000000000000010000 - 00020000000100000001000000064329125C7D4B21A5A8622ADCBE6E2FFBA15F - 2ADD734620A93D2713620000000B000000030000000100000000000000000000 - 0000000000000000000000000000000000020000000500000007000000080000 - 0008000000070000000400000001000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000080000001E00000027000000200000000900000000000000000000 - 0000000000000000000000000002000000040000000200000000000000000000 - 00000000001C176126FF176126FF176026FF0000001F00000000000000000000 - 000000000000000000020000000D071E0C600000000A00000000000000000000 - 00020104012F1A6529FF4CA967FF175F26FD0000002400000000000000000000 - 0000000000010000000A071F0B68176426FF0000001400000000000000000000 - 0009071B0A6F2C7A3EFF31974DFF135120E90000001E00000000000000000000 - 000100000008071F0C632E8142FF176526FF0000001900000003000000080103 - 012310411ABF2C8C46FF1A8236FF0E3B17BD0000001500000000000000010000 - 0006071F0B5E2F8443FF37B461FF176526FF061C0B6601040126061C0B651141 - 1ABB30904AFF229A47FF247838FE07200C770000000B0000000000000004071F - 0C59308644FF3DBA67FF39B763FF176626FF176526FF186728FF1E7733FF2A90 - 46FF41AC61FF388F4EFF0D3615A900000015000000020000000007200C52378A - 4AFF7ED39BFF69CB8BFF3CB866FF39B562FF76CB92FF72C68EFF63B77CFF4D9E - 63FF338146FE0C3615A40209032D000000040000000000000000000000030720 - 0B5536894AFF7DD29BFF69C98AFF176726FF176626FE176425FB135520DF0E3E - 17AE07210C690000000F00000004000000000000000000000000000000000000 - 000307200C5436894AFF7DD29AFF176825FF000000120000000B0000000B0000 - 0009000000050000000100000000000000000000000000000000000000000000 - 00000000000307200B54368949FF176825FF0000000800000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000207200B54176826FF0000000600000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000207200B500000000200000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000040000 - 000F000000140000001100000005000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000C1766 - 25FF176526FF176525FF00000011000000000000000000000000000000020000 - 00050000000200000000000000000000000000000000000000000000000C1764 - 25FB69C88AFF196828FF010401210000000200000000000000000000000B071D - 0C63000000110000000200000000000000000000000000000000000000091357 - 20DD60BC7EFF267F3BFF071C0B5D000000060000000000000000000000151762 - 26FF071D0B730000001100000002000000000000000000000000000000050E40 - 17A64DA666FF43A25EFF0F421AB20103011900000006000000030000001A1762 - 26FF2B7B3EFF071D0B7300000011000000020000000000000000000000020722 - 0C5B348848FD6CCC8DFF3C9F58FF0F431AB1071C0A5D01040223061B0B671763 - 25FF59B675FF1A732FFF071D0B73000000110000000200000000000000000000 - 00050D381494469F5FFF6BCA8CFF41A05DFF257C3BFF186728FF176326FF1763 - 26FF27A24DFF229E47FF19722FFF071D0C720000001000000002000000000000 - 00010209031C0D381494338847FD4AA363FF5CB879FF64C283FF63C181FF60BE - 7EFF5DBB7AFF26A14BFF229D46FF257738FF071D0C6300000005000000000000 - 0000000000010000000407210C5B0E3E17A5135620DC176325FB176526FE1764 - 25FF5EBD7CFF28A34EFF26793AFF071E0B6C0000000E00000002000000000000 - 000000000000000000000000000200000004000000070000000A000000161764 - 26FF61BE7EFF287C3CFF071E0B680000000C0000000200000000000000000000 - 00000000000000000000000000000000000000000000000000000000000B1765 - 26FF2E8141FF071E0C630000000A000000010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000071765 - 26FF071F0B5D0000000800000001000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000003071F - 0B53000000050000000100000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0001000000010000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000442717FF4427 - 17FF140B074D422516FF422516FF000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000442717FF0000000000000000000000000000000000000000000000070000 - 000B0000000E0000000F00000011000000120000001400000016000000170000 - 0019452819FF0000001C0000001E0000001E0000001400000005883C0EBDBA53 - 13FFB95012FFB74F11FFB44E10FFB24C10FFB14A0FFFAE490EFFAC480EFFAB46 - 0DFF4B2B1AFF937967FF907866FF8F7665FF665447CC00000014BF5614FFD68D - 48FFD38B47FFD28945FFD08743FFCE8541FFCE8440FFCC833EFFCB823DFFCA80 - 3CFF4C2E1EFFF8F2EAFFF7F0E7FFF7EFE4FF8F7463FF0000001DC05816FFD78E - 4AFFFFFFFFFFD48B46FFD28844FFDEAB7CFFFFFFFFFFFFFFFFFFFFFFFFFFCA81 - 3DFF503120FFF8F3ECFFF8F2EAFFF7F0E7FF8F7663FF0000001DC25916FFD88F - 4BFFFFFFFFFFD58B47FFD38A46FFFFFFFFFFD08742FFCE8541FFCC833FFFCB82 - 3DFF553424FFF9F5EEFFF8F3EBFFF8F2EAFF907866FF0000001CC45A16FFDA91 - 4CFFFFFFFFFFD68D49FFD58B47FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCD83 - 3FFF593727FFF9F5F0FFF8F5EEFFF8F2EBFF927967FF0000001AC55B18FFDB91 - 4EFFFFFFFFFFFFFFFFFFE2AF80FFFFFFFFFFD28944FFD18743FFFFFFFFFFCD84 - 40FF5C3C2AFFFAF6F2FFF9F5F0FFF9F4EEFF937969FF00000018C75D18FFDB93 - 4FFFFFFFFFFFD98F4CFFFFFFFFFFE2AF7FFFFFFFFFFFFFFFFFFFDEAB7CFFCE85 - 41FF603D2EFFFBF8F3FFFAF6F2FFF9F5F0FF947A69FF00000016C85F19FFDD94 - 50FFDC924EFFDA914DFFD88F4BFFD68D49FFD48B47FFD38A46FFD18844FFD087 - 42FF654231FFFBF8F5FFFAF7F3FFFAF6F2FF947C6AFF00000013964613BDC85E - 19FFC75B18FFC45A17FFC05816FFC05815FFBD5414FFBC5413FFB95213FFB750 - 11FF674534FF9D8474FF998171FF98806EFF6F5C50C80000000C000000000000 - 0000000000000000000100000002000000020000000400000005000000060000 - 00086B4737FF0000000B0000000C0000000D0000000A00000003000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00006E4B3AFF0000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000724E3DFF724E - 3DFF2218124D704B3CFF6E4B3AFF000000000000000000000000} - end> - end - object ilItems: TcxImageList - FormatVersion = 1 - DesignInfo = 23593072 - ImageInfo = < - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000100B051D3E29127065431DB7815526EA815526EA6543 - 1DB73E291270100B051D00000000000000000000000000000000000000000000 - 0000000000002015093962401CB0AD6F36FFC87F41FFDC8B49FFDC8B49FFC87F - 41FFAD7035FF62401CB020150939000000000000000000000000000000000000 - 0000100A051D63401BB0B77538FFE08C49FFE08C49FFE08C4AFFE08B49FFE08C - 4AFFE08B4AFFB87438FF63401CB0100B051D0000000000000000000000000000 - 00003F281170AB6B31FFDB8545FFDB8645FFDB8544FFDA8644FFDB8645FFDB86 - 44FFDB8644FFDA8645FFAB6B31FF402911700000000000000000000000000000 - 000069421AB7BF7336FFD67F40FFD57F40FFD67F40FFD67F40FFD57F3FFFD67F - 40FFD57F3FFFD57F3FFFBF7336FF69421BB70000000000000000000000000000 - 0000885420EACA7538FFCF783AFFD78348FFDE8C54FFE3935DFFE3935DFFDE8C - 54FFD78348FFD0783AFFCA7538FF885421EA0000000000000000000000000000 - 000089541FEAC46F32FFD78751FFE9A678FFE9A678FFE9A578FFE9A679FFE9A6 - 78FFE9A577FFD78751FFC46F33FF8A541FEA0000000000000000000000000000 - 00006C4117B7B5662AFFE6AC86FFEFBD9BFFEFBD9BFFEFBC9AFFEFBD9BFFEEBC - 9BFFEFBC9BFFE6AC85FFB5652AFF6D4118B70000000000000000000000000000 - 000043280E70A75E23FFEABFA3FFF5D6C1FFF6D6C1FFF5D6C1FFF6D6C1FFF5D6 - C1FFF5D6C1FFEABFA3FFA75E23FF43280E700000000000000000000000000000 - 0000120A031D6B3F15B0B97B4BFFFAECE3FFFBEDE4FFFBEDE4FFFBEDE3FFFBED - E4FFFAECE3FFB97B4AFF6B3E15B0120A031D0000000000000000000000000000 - 000000000000231406396C3E14B0B06F3AFFCFA381FFEFDFD2FFEFDED2FFCFA3 - 81FFAF6F3AFF6C3E13B023140639000000000000000000000000000000000000 - 00000000000000000000120A031D46280C70724013B7915319EA915219EA7241 - 13B746280C70120A031D00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000020000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00010120075C023A0DAB034E11E6034C11E602380DAB021E075D301D09695D37 - 12AC7B4A18E6794A18E6583512AB2F1D095C010000010000000000000001022F - 0A80167326FF2F943FFF44B054FF44AF54FF2F923FFF166D26FF42531EFFBB84 - 53FFE8AC7AFFEAAF7CFFCA905CFFA06935FF41280E80010000010123065C1677 - 26FF32A544FF29AF3DFF18A92EFF18A92EFF29AF3DFF32A344FF166D26FF7D72 - 3CFFE7975BFFF09F60FFF1A36AFFD99762FF9D6634FF2F1D0A5C02430CAB2590 - 35FF1BA32DFF0F9D22FF0F9E22FF0F9D23FF0F9E23FF1BA22EFF258B35FF3959 - 1FFFD6874EFFE79153FFE68F52FFE39156FFBE7E4BFF593612AB035C10E62295 - 30FF0D931DFF0D931CFF0D911CFF0D931CFF0D911CFF0D911CFF22932FFF1254 - 16FFCB7942FFDC884BFFDD8648FFDA8046FFD0824DFF794919E6035E10E61186 - 1CFF1B942CFF34AA4DFF48BD68FF48BD68FF34AB4DFF1C952CFF11821CFF1256 - 17FFD28B5DFFE69965FFE08E59FFD78049FFC8743CFF7B4A18E602470CAB0772 - 11FF64B774FF8DD1A0FF8DD2A0FF8DD2A0FF8DD1A0FF65B774FF076C11FF3B67 - 32FFDDAE92FFEBBB9DFFEBBB9DFFE1A37DFFB0622BFF5D3812AB0127065C046C - 11FF8AC091FFC4E3CAFFC4E3CAFFC4E3CAFFC4E3CAFF89BF91FF046111FF8093 - 72FFE9D2C5FFF2DACCFFF3DACCFFE0B59AFF9D5A20FF341F0A5C000000010236 - 0980398B43FF88BA8DFFC7E0C9FFC7DFCAFF88B98DFF398544FF496128FFCAA7 - 8DFFEEDACDFFF0DCCFFFD9B398FFB47F4FFF492C0E8001000001000000000000 - 00010127075C02470CAB035E11E6035C10E602430DAB0223075D35210969693F - 14AC8D5519E68B551AE6663F13AB36210A5C0100000100000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 00000000000000000000000000010120075C023A0DAB034E11E6034C11E60238 - 0DAB011E075C0000000100000000000000000000000000000000000000000000 - 00000000000000000001022F0A80167326FF2F943FFF44B054FF44AF54FF2F92 - 3FFF166D26FF022A0A8000000001000000000000000000000000000000000000 - 0000000000000123065C167726FF32A544FF29AF3DFF18A92EFF18A92EFF29AF - 3DFF32A344FF166D26FF011E075C000000000000000000000000000000000000 - 00000000000002430CAB259035FF1BA32DFF0F9D22FF0F9E22FF0F9D23FF0F9E - 23FF1BA22EFF258B35FF02380DAB000000000000000000000000000000000000 - 000000000000035C10E6229530FF0D931DFF0D931CFF0D911CFF0D931CFF0D91 - 1CFF0D911CFF22932FFF044C11E6000000000000000000000000000000000000 - 000000000000035E10E611861CFF1B942CFF34AA4DFF48BD68FF48BD68FF34AB - 4DFF1C952CFF11821CFF034D11E6000000000000000000000000000000000000 - 00000000000002470CAB077211FF64B774FF8DD1A0FF8DD2A0FF8DD2A0FF8DD1 - A0FF65B774FF076C11FF023A0DAB000000000000000000000000000000000000 - 0000000000000227075D046C11FF8AC091FFC4E3CAFFC4E3CAFFC4E3CAFFC4E3 - CAFF89BF91FF046111FF0120075D000000000000000000000000000000000000 - 00000000000036220A5D43601CFF398B43FF88BA8DFFC7E0C9FFC7DFCAFF88B9 - 8DFF398544FF3F571EFF2F1D0A5D000000000000000000000000000000000000 - 000000000000663E13ABB37543FF766F31FF39691FFF126717FF126616FF3A66 - 21FF796F34FFB07546FF593612AB000000000000000000000000000000000000 - 0000000000008B551AE6CB7E49FFCD7740FFCC7942FFCB7942FFCA7D45FFCF7E - 43FFD27B44FFCE814CFF794919E6000000000000000000000000000000000000 - 0000000000008D5519E6C67037FFD37A45FFDE8D57FFE59865FFE69965FFE08E - 59FFD78049FFC8743CFF7B4A18E6000000000000000000000000000000000000 - 000000000000694013ABB46329FFE0A17BFFEBBB9BFFECBA9CFFEBBB9DFFEBBB - 9DFFE1A37DFFB0622BFF5D3812AB000000000000000000000000000000000000 - 00000000000039230A5CA66021FFE0B59AFFF2DACCFFF2DACCFFF2DACCFFF3DA - CCFFE0B59AFF9D5A20FF341F0A5C000000000000000000000000000000000000 - 000000000000010000014F2F0F80B9824FFFDAB498FFF0DCCFFFF0DCCFFFD9B3 - 98FFB47F4FFF492C0E8001000001000000000000000000000000000000000000 - 000000000000000000000100000139220A5C694013AB8D5519E68B551AE6663F - 13AB36210A5C0100000100000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000301F10489A62 - 30E7A86A33FFA66731FDA5662FFFA5642CFFA3632AFFA26229FFA15F27FFA05F - 25FF9F5E23FF9E5C22FF9D5B21FF9D5A20FF96571FF32D1A0A489B6434E4DCA4 - 75FFE7A065FFE59D62FFE39A5FFFE0975CFFDE9559FFDD9257FFDA8F54FFD88C - 51FFD78A4FFFD5884CFFD38649FFD18548FFC2773BFF8D511EE4AD723CFFF6C1 - 96FFF3AB71FFF1A96EFFEFA66BFFEEA469FFECA166FFEB9F64FFE99D61FFE89A - 5FFFE6985CFFE5965AFFE49458FFDE8F52FFD18447FF9D5A20FFAF733EFFF8C5 - 9BFFF4AD73FFF3AA70FFF0A86EFFF0A56BFFEEA368FFECA166FFEB9E63FFE99C - 61FFE89A5FFFE6985CFFE5955AFFE39458FFD38549FF9D5B21FFB17641FFF9C8 - 9EFFF5AE74FFF4AC72FFF2AA70FFF1A86EFFEFA66BFFEEA368FFECA165FFEB9E - 63FFE99D60FFE7995EFFE6975CFFE49659FFD4874CFF9E5C22FFB27842FFFACB - A3FFF6B077FFF5AF74FFF3AC72FFF2AA6FFFF1A86DFFEFA56AFFEDA368FFECA0 - 65FFEB9F62FFE99B60FFE79A5EFFE6975BFFD6894EFF9F5D23FFB37944FFFBCC - A5FFF7B279FFF6B076FFF5AF74FFF4AC72FFF2A970FFF0A76DFFEFA46AFFEEA3 - 68FFECA066FFEA9E62FFE99C60FFE7995DFFD88B50FFA05E25FFB47B47FFFCCF - A8FFF8B47BFFF7B278FFF6B076FFF4AE74FFF3AB71FFF2A96FFFF0A76CFFEFA4 - 6AFFEDA367FFEBA065FFEA9D62FFE99B60FFDA8E52FFA15F27FFB57C48FFFCD0 - ACFFFAB57DFFF8B47AFFF8B278FFF6B076FFF4AE73FFF6C399FFF5C095FFF4BD - 92FFF3BB8EFFF1B78AFFEFB485FFEEB282FFD29463FF935925E7B67D4AFFFDD3 - AFFFFBB87EFFFAB67CFFF8B47AFFF7B278FFAF743EFFAD723CFFAD703AFFAB6E - 38FFAA6C35FFA86A33FFA76830FFA5662EFF915828E028180A3FB77F4CFFFDD5 - B1FFFCBF8BFFFBB77EFFFAB57CFFF8B37AFFB07540FFDFDEDEFFCDCDCDFFBCBE - BEFF8A8A8AFF6A6A6AFF00000000000000000000000000000000A67446E7ECBF - 9AFFFED5B2FFFDD3B0FFFCD1ADFFE9B990FFB58050FFEFEFEFFFE7E7E7FFD6D6 - D6FFA5A5A4FF616162E7000000000000000000000000000000002D20133F9166 - 3DC9B77F4CFFB67E4AFFB57C48FFA27041E86F6153D66F6F70FF6E6E6FFF6E6E - 6EFF606160E01B1B1B3F00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end> - end - object pmTreeViewActions: TPopupMenu - Images = ilActions - Left = 80 - Top = 360 - object Undo1: TMenuItem - Action = acUndo - end - object Redo1: TMenuItem - Action = acRedo - end - object N1: TMenuItem - Caption = '-' - end - object miExpandAll: TMenuItem - Action = acTreeViewExpandAll - end - object miCallapseAll: TMenuItem - Action = acTreeViewCollapseAll - end - object miSeparator1: TMenuItem - Caption = '-' - end - object miTreeViewDelete: TMenuItem - Action = acTreeViewItemsDelete - end - object miSeparator2: TMenuItem - Caption = '-' - end - object miAlignBy: TMenuItem - Action = acAlignBy - end - object Rename1: TMenuItem - Action = acTreeViewItemRename - end - end - object pmAvailableItemsActions: TPopupMenu - Images = ilActions - Left = 78 - Top = 392 - object Undo2: TMenuItem - Action = acUndo - end - object Redo2: TMenuItem - Action = acRedo - end - object N2: TMenuItem - Caption = '-' - end - object AddGroup1: TMenuItem - Action = acAddGroup - end - object AddItem1: TMenuItem - Action = acAddItem - end - object Delete1: TMenuItem - Action = acAvailableItemsDelete - SubMenuImages = ilActions - end - object Rename2: TMenuItem - Action = acAvailableItemRename - end - end - object ilHelper: TcxImageList - FormatVersion = 1 - DesignInfo = 25690224 - end -end diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutCustomizeForm.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutCustomizeForm.pas deleted file mode 100644 index afc998c3..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutCustomizeForm.pas +++ /dev/null @@ -1,1546 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl customize form } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutCustomizeForm; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, SysUtils, Classes, Graphics, Contnrs, Controls, Forms, Dialogs, - ComCtrls, ActnList, Menus, ToolWin, StdCtrls, ImgList, cxClasses, - dxLayoutLookAndFeels, cxControls, cxGraphics, dxLayoutControl, dxLayoutDragAndDrop, - cxLookAndFeelPainters, cxButtons, cxContainer, cxEdit, cxGroupBox, - cxLookAndFeels, cxTreeView, cxCheckBox, dxLayoutcxEditAdapters; - -type - TdxLayoutControlCustomizeForm = class(TdxLayoutControlCustomCustomizeForm) - alMain: TActionList; - acAddGroup: TAction; - acAddItem: TAction; - acClose: TAction; - acTreeViewExpandAll: TAction; - acTreeViewCollapseAll: TAction; - acTreeViewItemsDelete: TAction; - acAlignLeftSide: TAction; - acAlignRightSide: TAction; - acAlignTopSide: TAction; - acAlignBottomSide: TAction; - acAlignNone: TAction; - ilActions: TcxImageList; - ilItems: TcxImageList; - pmTreeViewActions: TPopupMenu; - miExpandAll: TMenuItem; - miCallapseAll: TMenuItem; - miSeparator1: TMenuItem; - miTreeViewDelete: TMenuItem; - miSeparator2: TMenuItem; - miAlignBy: TMenuItem; - pmAvailableItemsActions: TPopupMenu; - AddGroup1: TMenuItem; - AddItem1: TMenuItem; - Delete1: TMenuItem; - pmAlign: TPopupMenu; - Left1: TMenuItem; - Right1: TMenuItem; - op1: TMenuItem; - Bottom1: TMenuItem; - miSeparator3: TMenuItem; - miSeparator4: TMenuItem; - None1: TMenuItem; - lcMainGroup_Root: TdxLayoutGroup; - lcMain: TdxLayoutControl; - lcgTreeView: TdxLayoutGroup; - lcgAvailableItems: TdxLayoutGroup; - acAvailableItemsDelete: TAction; - acAvailableItemsExpandAll: TAction; - acAvailableItemsCollapseAll: TAction; - acAvailableItemsViewAsList: TAction; - acTabbedView: TAction; - acHighlightRoot: TAction; - lcMainGroup1: TdxLayoutGroup; - acShowDesignSelectors: TAction; - acStore: TAction; - acRestore: TAction; - ilHelper: TcxImageList; - acTreeViewItemRename: TAction; - Rename1: TMenuItem; - Rename2: TMenuItem; - acAvailableItemRename: TAction; - acUndo: TAction; - acRedo: TAction; - N1: TMenuItem; - Undo1: TMenuItem; - Redo1: TMenuItem; - N2: TMenuItem; - Undo2: TMenuItem; - Redo2: TMenuItem; - acAlignBy: TAction; - tvItems: TcxTreeView; - lcMainItem6: TdxLayoutItem; - tvAvailableItems: TcxTreeView; - lcMainItem8: TdxLayoutItem; - btnClose: TcxButton; - lcMainItem1: TdxLayoutItem; - lcMainGroup3: TdxLayoutGroup; - cbTabbedView: TcxCheckBox; - lcMainItem4: TdxLayoutItem; - liShowDesignSelectors: TdxLayoutItem; - btnShowDesignSelectors: TcxButton; - liHighlightRoot: TdxLayoutItem; - btnHighlightRoot: TcxButton; - liRestore: TdxLayoutItem; - btnRestore: TcxButton; - liStore: TdxLayoutItem; - btnStore: TcxButton; - liRedo: TdxLayoutItem; - btnRedo: TcxButton; - liUndo: TdxLayoutItem; - btnUndo: TcxButton; - lcMainGroup2: TdxLayoutGroup; - lgSeparator1: TdxLayoutGroup; - lcMainItem2: TdxLayoutItem; - btnAlignBy: TcxButton; - lcMainItem7: TdxLayoutItem; - btnTreeViewItemsDelete: TcxButton; - lcMainItem9: TdxLayoutItem; - btnTreeViewCollapseAll: TcxButton; - lcMainItem10: TdxLayoutItem; - btnTreeViewExpandAll: TcxButton; - lgTreeView: TdxLayoutGroup; - lgSeparator2: TdxLayoutGroup; - lgSeparator3: TdxLayoutGroup; - lgAvailableItems: TdxLayoutGroup; - lcMainItem3: TdxLayoutItem; - btnAvailableItemsViewAsList: TcxButton; - lcMainItem11: TdxLayoutItem; - btnAvailableItemsDelete: TcxButton; - liAddItem: TdxLayoutItem; - btnAddItem: TcxButton; - lcMainItem13: TdxLayoutItem; - btnAddGroup: TcxButton; - lcMainItem14: TdxLayoutItem; - btnAvailableItemsCollapseAll: TcxButton; - lcMainItem15: TdxLayoutItem; - btnAvailableItemsExpandAll: TcxButton; - lgSeparator4: TdxLayoutGroup; - lgSeparator5: TdxLayoutGroup; - procedure acCloseExecute(Sender: TObject); - procedure acAddGroupExecute(Sender: TObject); - procedure acAddItemExecute(Sender: TObject); - procedure tvItemsEdited(Sender: TObject; Node: TTreeNode; - var S: String); - procedure tvItemsMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure ItemsMouseMove(Sender: TObject; Shift: TShiftState; X, - Y: Integer); - procedure ItemsMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure tvItemsChange(Sender: TObject; Node: TTreeNode); - procedure tvItemsChanging(Sender: TObject; Node: TTreeNode; - var AllowChange: Boolean); - procedure AlignExecute(Sender: TObject); - procedure acTreeViewItemsDeleteExecute(Sender: TObject); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure tvItemsContextPopup(Sender: TObject; MousePos: TPoint; - var Handled: Boolean); - procedure acAvailableItemsDeleteExecute(Sender: TObject); - procedure tvItemsCustomDrawItem(Sender: TCustomTreeView; - Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean); - procedure tvAvailableItemsContextPopup(Sender: TObject; - MousePos: TPoint; var Handled: Boolean); - procedure acAvailableItemsExpandAllExecute(Sender: TObject); - procedure acAvailableItemsCollapseAllExecute(Sender: TObject); - procedure acTreeViewExpandAllExecute(Sender: TObject); - procedure acTreeViewCollapseAllExecute(Sender: TObject); - procedure acAvailableItemsViewAsListExecute(Sender: TObject); - procedure tvItemsEditing(Sender: TObject; Node: TTreeNode; - var AllowEdit: Boolean); - procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean); - procedure FormKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure acTabbedViewExecute(Sender: TObject); - procedure acHighlightRootExecute(Sender: TObject); - procedure acShowDesignSelectorsExecute(Sender: TObject); - procedure acStoreExecute(Sender: TObject); - procedure acRestoreExecute(Sender: TObject); - procedure acTreeViewItemRenameExecute(Sender: TObject); - procedure acAvailableItemRenameExecute(Sender: TObject); - procedure acUndoExecute(Sender: TObject); - procedure acRedoExecute(Sender: TObject); - procedure ToolBarsCustomDraw(Sender: TToolBar; const ARect: TRect; - var DefaultDraw: Boolean); - procedure acAlignByExecute(Sender: TObject); - private - FDragHelper: TdxLayoutDragAndDropHelper; - FLockCount: Integer; - FAvailableItemsWndProc: TWndMethod; - FItemsWndProc: TWndMethod; - procedure AddItemNode(ANodes: TTreeNodes; ANode: TTreeNode; AItem: TdxCustomLayoutItem; - const ACustomName: string = ''); - procedure AvailableItemsWndProc(var Message: TMessage); - procedure DoAfterInsertionItem(AItem: TdxCustomLayoutItem); - function GetImageIndex(AItem: TdxCustomLayoutItem): Integer; - function GetIsLocked: Boolean; - function GetNextToSelectItem(ATreeView: TcxTreeView): TdxCustomLayoutItem; - procedure InitializePopupMenu; - procedure ItemsWndProc(var Message: TMessage); - procedure RefreshImages; - procedure RefreshLists(ARefreshSelection: Boolean = False); - procedure RefreshButtonStates; - procedure RefreshView; - procedure SelectItem(AItem: TdxCustomLayoutItem); - procedure SetItemsSelections(AList: TList); - procedure SetLayoutItemsSelections(ATreeView: TTreeView); - function TreeViewWndProcHandler(ATreeView: TTreeView; var Message: TMessage): Boolean; - protected - procedure CreateWindowHandle(const Params: TCreateParams); override; - procedure DestroyWindowHandle; override; - procedure Loaded; override; - - procedure CalculateDeleteItemsActionStates; - function CanDeleteItems(ATreeView: TcxTreeView): Boolean; - procedure DeleteItems(AList: TComponentList; ASelectedItem: TdxCustomLayoutItem); - procedure InitializeControl; override; - procedure Localize; virtual; - function NeedRefreshItemsAfterDeleting(AComponent: TPersistent): Boolean; - procedure RefreshAvailableItems; - procedure RefreshEnableds; - procedure RefreshTreeView; - - procedure StoreTreeViewWndProc(ATreeView: TTreeView; var AStoredWndMethod: TWndMethod; ANewWndMethod: TWndMethod); - procedure RestoreTreeViewWndProc(ATreeView: TTreeView; var AStoredWndMethod: TWndMethod); - - property DragHelper: TdxLayoutDragAndDropHelper read FDragHelper; - property IsLocked: Boolean read GetIsLocked; - property LockCount: Integer read FLockCount; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - function GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; override; - - // Updates - procedure BeginUpdate; - procedure CancelUpdate; - procedure EndUpdate; - procedure UpdateCaption; override; - procedure UpdateContent; override; - procedure UpdateSelection; override; - procedure UpdateView; override; - end; - -procedure cxTreeViewGetSelection(ATreeView: TTreeView; AList: TList); -procedure cxTreeViewSyncSelection(ATreeView: TTreeView; AList: TList); - -implementation - -{$R *.DFM} - -uses - Types, Math, CommCtrl, dxLayoutCommon, dxLayoutEditForm, cxGeometry, - dxLayoutStrs, dxCore, dxOffice11, dxLayoutSelection; - -type - TdxLayoutControlAccess = class(TdxCustomLayoutControl); - TdxCustomLayoutItemAccess = class(TdxCustomLayoutItem); - TdxCustomLayoutItemViewInfoAccess = class(TdxCustomLayoutItemViewInfo); - TToolBarAccess = class(TToolBar); - -function CompareItemsByClass(Item1, Item2: Pointer): Integer; -var - AItem1, AItem2: TdxCustomLayoutItem; -begin - AItem1 := TdxCustomLayoutItem(Item1); - AItem2 := TdxCustomLayoutItem(Item2); - Result := Integer(AItem1.ClassType) - Integer(AItem2.ClassType); -end; - -function CompareItemsByName(Item1, Item2: Pointer): Integer; - - procedure SplitNameByTrailingDigits(const AName: string; out ATrailingDigits: Integer; - out ANameWithoutTrailingDigitals: string); - var - ACurrentLength: Integer; - begin - ANameWithoutTrailingDigitals := AName; - ACurrentLength := Length(ANameWithoutTrailingDigitals); - while (ACurrentLength > 0) and - dxCharIsNumeric(ANameWithoutTrailingDigitals[ACurrentLength]) do - begin - ATrailingDigits := ATrailingDigits * 10 + - StrToInt(ANameWithoutTrailingDigitals[ACurrentLength]); - ANameWithoutTrailingDigitals := Copy(ANameWithoutTrailingDigitals, 1, ACurrentLength - 1); - ACurrentLength := Length(ANameWithoutTrailingDigitals); - end; - if ACurrentLength = Length(AName) then - ATrailingDigits := -1 - else - ATrailingDigits := StrToInt(Copy(AName, ACurrentLength + 1, Length(AName) - ACurrentLength)); - end; - -var - AName1, AName2: string; - ANameWithoutLastDigitals1, ANameWithoutLastDigitals2: string; - ANumber1, ANumber2: Integer; -begin - Result := CompareItemsByClass(Item1, Item2); - if Result = 0 then - begin - AName1 := TdxCustomLayoutItem(Item1).CaptionForCustomizeForm; - SplitNameByTrailingDigits(AName1, ANumber1, ANameWithoutLastDigitals1); - AName2 := TdxCustomLayoutItem(Item2).CaptionForCustomizeForm; - SplitNameByTrailingDigits(AName2, ANumber2, ANameWithoutLastDigitals2); - Result := CompareText(ANameWithoutLastDigitals1, ANameWithoutLastDigitals2); - if Result = 0 then - Result := ANumber1 - ANumber2; - end; -end; - -function CompareItems(Item1, Item2: Pointer): Integer; -begin - Result := CompareItemsByClass(Item1, Item2); - if (Result = 0) and (TObject(Item1) is TdxLayoutGroup) then - Result := Integer(TdxLayoutGroup(Item1).Count > 0) - Integer(TdxLayoutGroup(Item2).Count > 0); - if Result = 0 then - Result := CompareItemsByName(Item1, Item2); -end; - -procedure cxTreeViewGetSelection(ATreeView: TTreeView; AList: TList); -var - I: Integer; -begin - for I := 0 to ATreeView.SelectionCount - 1 do - AList.Add(ATreeView.Selections[I].Data); -end; - -procedure cxTreeViewSyncSelection(ATreeView: TTreeView; AList: TList); - - procedure InternalSyncSelection(ANode: TTreeNode); - var - I: Integer; - begin - if ANode = nil then - Exit; - if ANode.Selected xor (ANode.Data <> nil) and (AList.IndexOf(ANode.Data) >= 0) then - if ANode.Selected then - ATreeView.Deselect(ANode) - else - ATreeView.Select(ANode, [ssCtrl]); - ANode.Focused := ANode.Selected; - for I := 0 to ANode.Count - 1 do - InternalSyncSelection(ANode[I]); - end; - -var - I: Integer; -begin - with ATreeView do - begin - if AList.Count > 0 then - for I := 0 to Items.Count - 1 do - InternalSyncSelection(Items[I]) - else - ATreeView.ClearSelection(False); - end; - if ATreeView.SelectionCount = 0 then - ATreeView.Selected := nil; -end; - -{ TdxLayoutDesignForm } - -constructor TdxLayoutControlCustomizeForm.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - Localize; - InitializePopupMenu; - RefreshImages; - tvItems.InnerTreeView.PopupMenu := pmTreeViewActions; - tvAvailableItems.InnerTreeView.PopupMenu := pmAvailableItemsActions; -end; - -destructor TdxLayoutControlCustomizeForm.Destroy; -begin - FreeAndNil(FDragHelper); - inherited; -end; - -function TdxLayoutControlCustomizeForm.GetHitTest(const P: TPoint): TdxCustomLayoutHitTest; -const - dxAreaPart: array [Boolean] of TdxLayoutAreaPart = (apAfterContent, apCenter); - - function GetHitNode(ATreeView: TcxTreeView): TTreeNode; - begin - with cxPointOffset(P, ATreeView.BoundsRect.TopLeft, False) do - if htOnItem in ATreeView.GetHitTestInfoAt(X, Y) then - Result := ATreeView.GetNodeAt(X, Y) - else - Result := nil; - end; - -var - AItem: TdxCustomLayoutItem; - ANode: TTreeNode; -begin - ANode := nil; - if tvItems.Visible and PtInRect(tvItems.BoundsRect, P) then - begin - Result := TdxLayoutCustomizeFormTreeViewItemsHitTest.Instance; - ANode := GetHitNode(tvItems); - end - else - if tvAvailableItems.Visible and PtInRect(tvAvailableItems.BoundsRect, P) then - begin - Result := TdxLayoutCustomizeFormAvailableItemsHitTest.Instance; - ANode := GetHitNode(tvAvailableItems); - end - else - Result := inherited GetHitTest(P); - if ANode <> nil then - begin - AItem := TdxCustomLayoutItem(ANode.Data); - TdxLayoutCustomizeFormHitTest(Result).HitItem := AItem; - end - else - TdxLayoutCustomizeFormHitTest(Result).HitItem := nil; -end; - -procedure TdxLayoutControlCustomizeForm.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TdxLayoutControlCustomizeForm.CancelUpdate; -begin - Dec(FLockCount); -end; - -procedure TdxLayoutControlCustomizeForm.EndUpdate; -begin - Dec(FLockCount); - if LockCount = 0 then - RefreshLists(True); -end; - -procedure TdxLayoutControlCustomizeForm.UpdateCaption; -begin - if Control.IsDesigning then - Caption := Format(cxGetResourceString(@sdxLayoutControlDesignerCaptionFormat), [cxGetFullComponentName(Control)]) - else - Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormCaption); -end; - -procedure TdxLayoutControlCustomizeForm.UpdateContent; -begin - RefreshLists; - RefreshButtonStates; - if (FDragHelper.DragItem <> nil) and (Control.DragAndDropState = ddsNone) then - FDragHelper.Reset; -end; - -procedure TdxLayoutControlCustomizeForm.UpdateSelection; -var - AList: TList; - AIntf: IdxLayoutDesignerHelper; -begin - if IsLocked then - Exit; - AList := TList.Create; - try - if Supports(Control, IdxLayoutDesignerHelper, AIntf) then - begin - AIntf.GetSelection(AList); - AIntf := nil; - end; - SetItemsSelections(AList); - finally - AList.Free; - end; -end; - -procedure TdxLayoutControlCustomizeForm.UpdateView; -begin - RefreshView; -end; - -procedure TdxLayoutControlCustomizeForm.CreateWindowHandle(const Params: TCreateParams); -begin - inherited CreateWindowHandle(Params); - StoreTreeViewWndProc(tvItems.InnerTreeView, FItemsWndProc, ItemsWndProc); - StoreTreeViewWndProc(tvAvailableItems.InnerTreeView, FAvailableItemsWndProc, AvailableItemsWndProc); -end; - -procedure TdxLayoutControlCustomizeForm.DestroyWindowHandle; -begin - inherited DestroyWindowHandle; - RestoreTreeViewWndProc(tvItems.InnerTreeView, FItemsWndProc); - RestoreTreeViewWndProc(tvAvailableItems.InnerTreeView, FAvailableItemsWndProc); -end; - -procedure TdxLayoutControlCustomizeForm.Loaded; -begin - inherited Loaded; - Constraints.MinHeight := Height div 2; - Constraints.MinWidth := Width; -end; - -procedure TdxLayoutControlCustomizeForm.CalculateDeleteItemsActionStates; -begin - acTreeViewItemsDelete.Enabled := CanDeleteItems(tvItems); - acAvailableItemsDelete.Enabled := CanDeleteItems(tvAvailableItems); -end; - -function TdxLayoutControlCustomizeForm.CanDeleteItems(ATreeView: TcxTreeView): Boolean; -var - AList: TList; - I: Integer; - AIntf: IdxLayoutDesignerHelper; -begin - Result := not ATreeView.IsEditing; - if Result then - begin - AList := TList.Create; - try - cxTreeViewGetSelection(ATreeView.InnerTreeView, AList); - Result := AList.Count > 0; - if Result then - for I := 0 to AList.Count - 1 do - begin - if Supports(Control, IdxLayoutDesignerHelper, AIntf) then - begin - Result := AIntf.CanDeleteComponent(TComponent(AList[I])); - AIntf := nil; - end; - if not Result then - Break; - end; - finally - AList.Free; - end; - end; -end; - -procedure TdxLayoutControlCustomizeForm.DeleteItems(AList: TComponentList; - ASelectedItem: TdxCustomLayoutItem); -begin - if AList.Count = 0 then - Exit; - TdxLayoutControlAccess(Control).SaveToUndo; - BeginUpdate; - try - SelectItem(ASelectedItem); - Control.BeginUpdate; - try - while AList.Count > 0 do - AList[0].Free; - finally - Control.EndUpdate; - end; - finally - CancelUpdate; - end; - RefreshLists(True); -end; - -procedure TdxLayoutControlCustomizeForm.InitializeControl; -begin - inherited; - FDragHelper.Free; - FDragHelper := TdxLayoutDragAndDropHelper.Create(Control); -end; - -procedure TdxLayoutControlCustomizeForm.Localize; -begin - acAddGroup.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormAddGroup); - acAddGroup.Hint := StripHotKey(acAddGroup.Caption); - - acAddItem.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormAddItem); - acAddItem.Hint := StripHotKey(acAddItem.Caption); - - acAvailableItemsDelete.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormDelete); - acAvailableItemsDelete.Hint := cxGetResourceString(@sdxLayoutControlCustomizeFormDeleteHint); - - acTreeViewItemsDelete.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormDelete); - acTreeViewItemsDelete.Hint := cxGetResourceString(@sdxLayoutControlCustomizeFormDeleteHint); - - acAlignBy.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormAlignBy); - acAlignBy.Hint := StripHotKey(acAlignBy.Caption); - - acClose.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormClose); - acClose.Hint := StripHotKey(acClose.Caption); - - acTreeViewExpandAll.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormExpandAll); - acTreeViewExpandAll.Hint := StripHotKey(acTreeViewExpandAll.Caption); - - acAvailableItemsExpandAll.Caption := acTreeViewExpandAll.Caption; - acAvailableItemsExpandAll.Hint := acTreeViewExpandAll.Hint; - - acTreeViewCollapseAll.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormCollapseAll); - acTreeViewCollapseAll.Hint := StripHotKey(acTreeViewCollapseAll.Caption); - - acAvailableItemsCollapseAll.Caption := acTreeViewCollapseAll.Caption; - acAvailableItemsCollapseAll.Hint := StripHotKey(acTreeViewCollapseAll.Hint); - - acAlignLeftSide.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormAlignLeftSide); - acAlignRightSide.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormAlignRightSide); - acAlignTopSide.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormAlignTopSide); - acAlignBottomSide.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormAlignBottomSide); - acAlignNone.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormAlignNone); - - lcgTreeView.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormTreeViewGroup); - lcgAvailableItems.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormListViewGroup); - - acTabbedView.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormTabbedView); - acTabbedView.Hint := StripHotKey(acTabbedView.Caption); - - acAvailableItemsViewAsList.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormTreeView); - acAvailableItemsViewAsList.Hint := StripHotKey(acAvailableItemsViewAsList.Caption); - - acStore.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormStore); - acStore.Hint := StripHotKey(acStore.Caption); - - acRestore.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormRestore); - acRestore.Hint := StripHotKey(acRestore.Caption); - - acTreeViewItemRename.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormRename); - acTreeViewItemRename.Hint := acTreeViewItemRename.Caption; - - acAvailableItemRename.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormRename); - acAvailableItemRename.Hint := acAvailableItemRename.Caption; - - acUndo.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormUndo); - acUndo.Hint := acUndo.Caption; - - acRedo.Caption := cxGetResourceString(@sdxLayoutControlCustomizeFormRedo); - acRedo.Hint := acRedo.Caption; - - btnUndo.Caption := ''; - btnRedo.Caption := ''; - btnStore.Caption := ''; - btnRestore.Caption := ''; - btnHighlightRoot.Caption := ''; - btnShowDesignSelectors.Caption := ''; - - btnTreeViewExpandAll.Caption := ''; - btnTreeViewCollapseAll.Caption := ''; - btnTreeViewItemsDelete.Caption := ''; - btnAlignBy.Caption := ''; - - btnAvailableItemsExpandAll.Caption := ''; - btnAvailableItemsCollapseAll.Caption := ''; - btnAddGroup.Caption := ''; - btnAddItem.Caption := ''; - btnAvailableItemsDelete.Caption := ''; - btnAvailableItemsViewAsList.Caption := ''; -end; - -function TdxLayoutControlCustomizeForm.NeedRefreshItemsAfterDeleting(AComponent: TPersistent): Boolean; -begin - Result := (AComponent is TdxCustomLayoutItem) and - (TdxCustomLayoutItem(AComponent).Container = Control); -end; - -procedure TdxLayoutControlCustomizeForm.RefreshAvailableItems; - - procedure PopulateItemChildren(AList: TList; AItem: TdxCustomLayoutItem); - var - I: Integer; - begin - if AItem is TdxLayoutGroup then - begin - for I := 0 to TdxLayoutGroup(AItem).Count - 1 do - begin - AList.Add(TdxLayoutGroup(AItem).Items[I]); - PopulateItemChildren(AList, TdxLayoutGroup(AItem).Items[I]); - end; - end; - end; - - procedure PopulateItems(AList: TList); - var - I: Integer; - begin - for I := 0 to Control.AvailableItemCount - 1 do - begin - AList.Add(Control.AvailableItems[I]); - if Control.CustomizeAvailableItemsViewKind = oivkList then - PopulateItemChildren(AList, Control.AvailableItems[I]); - end; - end; - -var - AList: TList; - I: Integer; -begin - with tvAvailableItems do - begin - Items.BeginUpdate; - try - Items.Clear; - AList := TList.Create; - try - PopulateItems(AList); - case Control.CustomizeAvailableItemsViewKind of - oivkList: - begin - AList.Sort(CompareItemsByName); - for I := 0 to AList.Count - 1 do - with Items.AddObject(Items.GetFirstNode, - TdxCustomLayoutItem(AList[I]).CaptionForCustomizeForm, AList[I]) do - begin - ImageIndex := GetImageIndex(AList[I]); - SelectedIndex := ImageIndex; - Selected := False; - Focused := False; - end; - end; - oivkTree: - begin - AList.Sort(CompareItems); - for I := 0 to AList.Count - 1 do - AddItemNode(Items, nil, TdxCustomLayoutItem(AList[I])); - end; - end; - finally - AList.Free; - end; - FullExpand; - finally - Items.EndUpdate; - end; - end; - tvAvailableItems.ShowRoot := Control.CustomizeAvailableItemsViewKind = oivkTree; -end; - -procedure TdxLayoutControlCustomizeForm.RefreshEnableds; -begin - if not IsLocked then - begin - acAlignBy.Enabled := (tvItems.SelectionCount > 1); - acAvailableItemsExpandAll.Enabled := Control.CustomizeAvailableItemsViewKind = oivkTree; - acAvailableItemsCollapseAll.Enabled := Control.CustomizeAvailableItemsViewKind = oivkTree; - acRestore.Enabled := Control.CanRestore; - CalculateDeleteItemsActionStates; - acTreeViewItemRename.Enabled := (tvItems.Selected <> nil) and (tvItems.SelectionCount = 1) and not (TObject(tvItems.Selected.Data) as TdxCustomLayoutItem).IsRoot; - acAvailableItemRename.Enabled := (tvAvailableItems.Selected <> nil) and (tvAvailableItems.SelectionCount = 1); - acUndo.Enabled := Control.UndoRedoManager.CanUndo; - acRedo.Enabled := Control.UndoRedoManager.CanRedo; - acAddItem.Enabled := Control.IsDesigning; - end; -end; - -procedure TdxLayoutControlCustomizeForm.RefreshTreeView; -begin - with tvItems do - begin - Items.BeginUpdate; - try - Items.Clear; - AddItemNode(Items, Items.GetFirstNode, Control.Items, cxGetResourceString(@sdxLayoutControlRoot)); - FullExpand; - finally - Items.EndUpdate; - end; - end; -end; - -procedure TdxLayoutControlCustomizeForm.StoreTreeViewWndProc(ATreeView: TTreeView; var AStoredWndMethod: TWndMethod; ANewWndMethod: TWndMethod); -begin - AStoredWndMethod := ATreeView.WindowProc; - ATreeView.WindowProc := ANewWndMethod; -end; - -procedure TdxLayoutControlCustomizeForm.RestoreTreeViewWndProc(ATreeView: TTreeView; var AStoredWndMethod: TWndMethod); -begin - if Assigned(AStoredWndMethod) then - ATreeView.WindowProc := AStoredWndMethod; - AStoredWndMethod := nil; -end; - -procedure TdxLayoutControlCustomizeForm.AddItemNode(ANodes: TTreeNodes; ANode: TTreeNode; AItem: TdxCustomLayoutItem; - const ACustomName: string = ''); -var - AName: string; - I: Integer; - AThisNode: TTreeNode; - AGroup: TdxLayoutGroup; -begin - if ACustomName = '' then - AName := AItem.CaptionForCustomizeForm - else - AName := ACustomName; - if ANode = nil then - AThisNode := ANodes.AddObject(ANodes.GetFirstNode, AName, AItem) - else - AThisNode := ANodes.AddChildObject(ANode, AName, AItem); - - if AItem is TdxLayoutGroup then - begin - AGroup := TdxLayoutGroup(AItem); - for I := 0 to AGroup.Count - 1 do - AddItemNode(ANodes, AThisNode, AGroup[I]); - end; - AThisNode.ImageIndex := GetImageIndex(AItem); - AThisNode.SelectedIndex := AThisNode.ImageIndex; - AThisNode.Selected := False; - AThisNode.Focused := False; -end; - -procedure TdxLayoutControlCustomizeForm.AvailableItemsWndProc(var Message: TMessage); -begin - if not TreeViewWndProcHandler(tvAvailableItems.InnerTreeView, Message) then - begin - FAvailableItemsWndProc(Message); - case Message.Msg of - WM_DESTROY: - RestoreTreeViewWndProc(tvAvailableItems.InnerTreeView, FAvailableItemsWndProc); - end; - end; -end; - -procedure TdxLayoutControlCustomizeForm.DoAfterInsertionItem(AItem: TdxCustomLayoutItem); -var - AIntf: IdxLayoutDesignerHelper; -begin - if Supports(Control, IdxLayoutDesignerHelper, AIntf) then - begin - AIntf.SelectComponent(AItem); - AIntf := nil; - end; -end; - -function TdxLayoutControlCustomizeForm.GetImageIndex(AItem: TdxCustomLayoutItem): Integer; -var - AGroup: TdxLayoutGroup; -begin - if AItem is TdxLayoutGroup then - begin - AGroup := AItem as TdxLayoutGroup; - Result := 1 + Integer(AGroup.LayoutDirection); - if AGroup.Hidden and not AGroup.IsRoot then - Inc(Result, 4); - end - else - Result := 0; -end; - -function TdxLayoutControlCustomizeForm.GetIsLocked: Boolean; -begin - Result := (LockCount > 0) or TdxLayoutControlAccess(Control).IsUpdateLocked; -end; - -function TdxLayoutControlCustomizeForm.GetNextToSelectItem(ATreeView: TcxTreeView): TdxCustomLayoutItem; -var - ANode: TTreeNode; -begin - Result := nil; - ANode := ATreeView.FindNextToSelect; - if ANode <> nil then - Result := TdxCustomLayoutItem(ANode.Data) - else - begin - ANode := ATreeView.Selected; - while (ANode <> nil) and ANode.Selected do - ANode := ANode.GetPrev; - if ANode <> nil then - Result := TdxCustomLayoutItem(ANode.Data); - end; -end; - -procedure TdxLayoutControlCustomizeForm.InitializePopupMenu; -var - I: Integer; - AMenuItem: TMenuItem; -begin - for I := 0 to pmAlign.Items.Count - 1 do - begin - AMenuItem := TMenuItem.Create(miAlignBy); - AMenuItem.Caption := pmAlign.Items[I].Caption; - AMenuItem.Action := pmAlign.Items[I].Action; - miAlignBy.Add(AMenuItem); - end; -end; - -procedure TdxLayoutControlCustomizeForm.ItemsWndProc(var Message: TMessage); -begin - if not TreeViewWndProcHandler(tvItems.InnerTreeView, Message) then - begin - FItemsWndProc(Message); - case Message.Msg of - WM_DESTROY: - RestoreTreeViewWndProc(tvItems.InnerTreeView, FItemsWndProc); - end; - end; -end; - -procedure TdxLayoutControlCustomizeForm.RefreshImages; -begin - cxTransformImages(ilItems, ilHelper, clWindow, False); - if not IsXPManifestEnabled then - cxTransformImages(ilItems, clWindow); - ilItems.AddImages(ilHelper); - ilHelper.Clear; -end; - -procedure TdxLayoutControlCustomizeForm.RefreshLists(ARefreshSelection: Boolean = False); -begin - if IsLocked then - Exit; - BeginUpdate; - try - RefreshAvailableItems; - RefreshTreeView; - finally - CancelUpdate; - end; - if ARefreshSelection then - UpdateSelection; -end; - -procedure TdxLayoutControlCustomizeForm.RefreshButtonStates; -begin - acAvailableItemsViewAsList.Checked := Control.CustomizeAvailableItemsViewKind = oivkTree; - acTabbedView.Checked := Control.CustomizeFormTabbedView; - acHighlightRoot.Checked := Control.HighlightRoot; - acShowDesignSelectors.Checked := Control.ShowDesignSelectors; - - RefreshEnableds; -end; - -procedure TdxLayoutControlCustomizeForm.RefreshView; -begin - if Control.CustomizeFormTabbedView then - lcMainGroup1.LayoutDirection := ldTabbed - else - lcMainGroup1.LayoutDirection := ldHorizontal; - acShowDesignSelectors.Visible := Control.IsDesigning; - liShowDesignSelectors.Visible := acShowDesignSelectors.Visible; - acHighlightRoot.Visible := Control.IsDesigning; - liHighlightRoot.Visible := acHighlightRoot.Visible; - acStore.Visible := not Control.IsDesigning; - liStore.Visible := acStore.Visible; - acRestore.Visible := not Control.IsDesigning; - liRestore.Visible := acRestore.Visible; - acUndo.Visible := not Control.IsDesigning; - liUndo.Visible := acUndo.Visible; - acRedo.Visible := not Control.IsDesigning; - liRedo.Visible := acRedo.Visible; - lgSeparator1.Visible := acRedo.Visible; - acAddItem.Visible := Control.IsDesigning; - liAddItem.Visible := acAddItem.Visible; - lcMain.LayoutLookAndFeel := TdxLayoutControlAccess(Control).GetLayoutLookAndFeel; -end; - -procedure TdxLayoutControlCustomizeForm.SelectItem(AItem: TdxCustomLayoutItem); -var - AIntf: IdxLayoutDesignerHelper; -begin - if Supports(Control, IdxLayoutDesignerHelper, AIntf) then - begin - if AItem <> nil then - AIntf.SelectComponent(AItem) - else - AIntf.SelectComponent(Control); - AIntf := nil; - end; - RefreshEnableds; -end; - -procedure TdxLayoutControlCustomizeForm.SetItemsSelections(AList: TList); - - procedure SetTreeViewAsActiveControl(ATreeView: TcxTreeView); - begin - if ATreeView.Visible then - ActiveControl := ATreeView.InnerTreeView - else - ActiveControl := nil; - end; - -var - AItem: TdxCustomLayoutItemAccess; -begin - if IsLocked then - Exit; - BeginUpdate; - try - cxTreeViewSyncSelection(tvItems.InnerTreeView, AList); - cxTreeViewSyncSelection(tvAvailableItems.InnerTreeView, AList); - if (AList.Count > 0) and (TObject(AList.Last) is TdxCustomLayoutItem) then - begin - AItem := TdxCustomLayoutItemAccess(AList.Last); - if AItem.IsAvailable then - SetTreeViewAsActiveControl(tvAvailableItems) - else - SetTreeViewAsActiveControl(tvItems); - end; - finally - CancelUpdate; - end; - RefreshEnableds; -end; - -procedure TdxLayoutControlCustomizeForm.SetLayoutItemsSelections(ATreeView: TTreeView); -var - AList: TList; - AIntf: IdxLayoutDesignerHelper; -begin - AList := TList.Create; - try - cxTreeViewGetSelection(ATreeView, AList); - if Supports(Control, IdxLayoutDesignerHelper, AIntf) then - begin - AIntf.SetSelection(AList); - AIntf := nil; - end; - finally - AList.Free; - end; -end; - -function TdxLayoutControlCustomizeForm.TreeViewWndProcHandler(ATreeView: TTreeView; var Message: TMessage): Boolean; - - {$IFNDEF DELPHI12} - procedure ShowContextMenu; - var - AHitTest: THitTests; - begin - AHitTest := ATreeView.GetHitTestInfoAt(Message.LParamLo, Message.LParamHi); - if (htOnItem in AHitTest) then - ATreeView.Perform(WM_CONTEXTMENU, ATreeView.Handle, Integer(PointToSmallPoint(GetMouseCursorPos))); - end; - {$ENDIF} - -var - ANode: TTreeNode; - AShift: TShiftState; -begin - Result := False; - case Message.Msg of - {$IFNDEF DELPHI12} - CN_NOTIFY: - case TWMNotify(Message).NMHdr^.code of - NM_RCLICK: - begin - ShowContextMenu; - Message.Result := 1; - Result := True; - end; - end; - {$ENDIF} - WM_RBUTTONDOWN: - begin - ANode := ATreeView.GetNodeAt(Message.LParamLo, Message.LParamHi); - if ANode <> nil then - begin - ANode.Focused := True; - AShift := KeysToShiftState(Message.WParam); - if not ANode.Selected then - begin - if [ssShift, ssCtrl] * AShift <> [] then - AShift := []; - BeginUpdate; - try - ATreeView.Select(ANode, AShift); - finally - CancelUpdate; - end; - SetLayoutItemsSelections(ATreeView); - end; - end; - {$IFNDEF DELPHI12} - Message.Result := 1; - Result := True; - {$ENDIF} - end; - WM_LBUTTONDOWN: - begin - ANode := ATreeView.GetNodeAt(Message.LParamLo, Message.LParamHi); - if (ANode <> nil) and (ATreeView.SelectionCount > 1) then - begin - ANode.Focused := True; - AShift := KeysToShiftState(Message.WParam); - if ANode.Selected and ([ssCtrl, ssShift] * AShift = []) then - begin - BeginUpdate; - try - ATreeView.ClearSelection; - finally - CancelUpdate; - end; - end; - end; - end; - end; -end; - -procedure TdxLayoutControlCustomizeForm.acCloseExecute(Sender: TObject); -begin - Close; -end; - -procedure TdxLayoutControlCustomizeForm.acAddGroupExecute(Sender: TObject); -var - AGroup: TdxLayoutGroup; -begin - TdxLayoutControlAccess(Control).SaveToUndo; - Control.BeginUpdate; - try - AGroup := Control.CreateGroup; - AGroup.Caption := cxGetResourceString(@sdxLayoutControlNewGroupCaption); - finally - Control.EndUpdate; - end; - DoAfterInsertionItem(AGroup); -end; - -procedure TdxLayoutControlCustomizeForm.acAddItemExecute(Sender: TObject); -var - AItem: TdxCustomLayoutItem; -begin - Control.BeginUpdate; - try - AItem := Control.CreateItem; - AItem.Caption := cxGetResourceString(@sdxLayoutControlNewItemCaption); - finally - Control.EndUpdate; - end; - DoAfterInsertionItem(AItem); -end; - -procedure TdxLayoutControlCustomizeForm.tvItemsEdited(Sender: TObject; Node: TTreeNode; - var S: String); -begin - if TdxCustomLayoutItem(Node.Data).IsRoot then - Exit; - TdxLayoutControlAccess(Control).SaveToUndo; - BeginUpdate; - try - if Control.IsDesigning then - TdxCustomLayoutItem(Node.Data).Name := S - else - TdxCustomLayoutItem(Node.Data).Caption := S; - Node.Text := TdxCustomLayoutItem(Node.Data).CaptionForCustomizeForm; - finally - CancelUpdate; - end; -end; - -procedure TdxLayoutControlCustomizeForm.tvItemsMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - ANode: TTreeNode; - ATreeView: TcxTreeView; - AHitTests: THitTests; -begin - ATreeView := TcxTreeView(Sender); - AHitTests := ATreeView.GetHitTestInfoAt(X, Y); - if htOnItem in AHitTests then - begin - ANode := ATreeView.GetNodeAt(X, Y); - if ANode = nil then - Exit; - ANode.Selected := True; - if (Button = mbLeft) and ANode.Selected and (ANode = ATreeView.Selected) then - DragHelper.InitializeDragItem(ATreeView.Selected.Data, X, Y); - if (Button = mbRight) or (ssCtrl in Shift) then - SetLayoutItemsSelections(ATreeView.InnerTreeView); - end; -end; - -procedure TdxLayoutControlCustomizeForm.ItemsMouseMove(Sender: TObject; Shift: TShiftState; - X, Y: Integer); -var - ASource: TdxLayoutDragSource; -begin - if Sender = tvItems then - ASource := dsCustomizeFormTreeViewItems - else - ASource := dsCustomizeFormAvailableItems; - if ssLeft in Shift then - DragHelper.TryBeginDragAndDrop(X, Y, ASource); -end; - -procedure TdxLayoutControlCustomizeForm.ItemsMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - if Button = mbLeft then - DragHelper.Reset; -end; - -procedure TdxLayoutControlCustomizeForm.tvItemsChange(Sender: TObject; Node: TTreeNode); -begin - if not IsLocked then - SetLayoutItemsSelections(Sender as TTreeView); -end; - -procedure TdxLayoutControlCustomizeForm.tvItemsChanging(Sender: TObject; Node: TTreeNode; - var AllowChange: Boolean); -begin - AllowChange := (Node = nil) or (Node.Data <> nil); -end; - -procedure TdxLayoutControlCustomizeForm.AlignExecute(Sender: TObject); -var - AList: TList; - I: Integer; - ATag: Integer; - AIntf: IdxLayoutDesignerHelper; -begin - //todo: TdxLayoutControlAccess(Control).SaveToUndo; - ATag := (Sender as TAction).Tag; - AList := TList.Create; - try - if Supports(Control, IdxLayoutDesignerHelper, AIntf) then - begin - AIntf.GetSelection(AList); - AIntf := nil; - end; - BeginUpdate; - try - Control.BeginUpdate; - try - if ATag = -1 then - for I := 0 to AList.Count - 1 do - TdxCustomLayoutItem(AList[I]).AlignmentConstraint := nil - else - with Control.CreateAlignmentConstraint do - begin - Kind := TdxLayoutAlignmentConstraintKind(ATag); - for I := 0 to AList.Count - 1 do - AddItem(TdxCustomLayoutItem(AList[I])); - end; - finally - Control.EndUpdate; - end; - finally - CancelUpdate; - end; - finally - AList.Free; - end; -end; - -procedure TdxLayoutControlCustomizeForm.acTreeViewItemsDeleteExecute(Sender: TObject); - - procedure CheckSelectedParent(ANode: TTreeNode); - var - AParentNode: TTreeNode; - AItem: TdxCustomLayoutItem; - ANotSelectedChildCount: Integer; - I: Integer; - begin - AParentNode := ANode.Parent; - if AParentNode = nil then - Exit; - AItem := TdxCustomLayoutItem(AParentNode.Data); - if not AParentNode.Selected and not AItem.IsRoot and (AItem is TdxLayoutGroup) - and TdxLayoutGroup(AItem).Hidden then - begin - ANotSelectedChildCount := AParentNode.Count; - for I := 0 to AParentNode.Count - 1 do - if AParentNode[I].Selected then - Dec(ANotSelectedChildCount); - if ANotSelectedChildCount < 2 then - tvItems.Select(AParentNode, [ssCtrl]); - end; - end; - - procedure SelectChildren(ANode: TTreeNode); - var - I: Integer; - begin - if ANode.Count > 0 then - for I := 0 to ANode.Count - 1 do - begin - tvItems.Select(ANode[I], [ssCtrl]); - SelectChildren(ANode[I]); - end - end; - - procedure CheckNeighbors(ANode: TTreeNode); - var - I: Integer; - AParentNode: TTreeNode; - ANeighborsSelectedCount: Integer; - begin - if (ANode.Parent = nil) or (ANode.Parent.Count = 0) then - Exit; - AParentNode := ANode.Parent; - ANeighborsSelectedCount := 0; - for I := 0 to AParentNode.Count - 1 do - if AParentNode[I].Selected then - Inc(ANeighborsSelectedCount); - if AParentNode.Count - ANeighborsSelectedCount = 1 then - for I := 0 to AParentNode.Count - 1 do - if not AParentNode[I].Selected and (TObject(AParentNode[I].Data) is TdxLayoutGroup) and - TdxLayoutGroup(AParentNode[I].Data).Hidden then - tvItems.Select(AParentNode[I], [ssCtrl]); - end; - - procedure AdjustSelectionForDeletion; - var - I: Integer; - AList: TList; - ASaveSelectedNode: TTreeNode; - begin - BeginUpdate; - try - AList := TList.Create; - try - ASaveSelectedNode := tvItems.GetSelections(AList); - for I := 0 to AList.Count - 1 do - begin - SelectChildren(AList[I]); - CheckNeighbors(AList[I]); - CheckSelectedParent(AList[I]); - end; - with ASaveSelectedNode do - TreeView_SelectItem(Handle, ItemId); - finally - AList.Free; - end; - finally - CancelUpdate; - end; - end; - -var - AList: TComponentList; -begin - if tvItems.IsEditing then - Exit; - AList := TComponentList.Create; - try - cxTreeViewGetSelection(tvItems.InnerTreeView, AList); - AdjustSelectionForDeletion; - DeleteItems(AList, GetNextToSelectItem(tvItems)); - finally - AList.Free; - end; -end; - -procedure TdxLayoutControlCustomizeForm.FormClose(Sender: TObject; - var Action: TCloseAction); -begin - cxDialogsMetricsStore.StoreMetrics(Self); - Action := caFree; -end; - -procedure TdxLayoutControlCustomizeForm.tvItemsContextPopup( - Sender: TObject; MousePos: TPoint; var Handled: Boolean); -begin - CalculateDeleteItemsActionStates; - acAvailableItemsDelete.Enabled := False; -end; - -procedure TdxLayoutControlCustomizeForm.acAvailableItemsDeleteExecute( - Sender: TObject); -var - AList: TComponentList; -begin - if tvAvailableItems.IsEditing then - Exit; - AList := TComponentList.Create; - try - cxTreeViewGetSelection(tvAvailableItems.InnerTreeView, AList); - DeleteItems(AList, GetNextToSelectItem(tvAvailableItems)); - finally - AList.Free; - end; -end; - -procedure TdxLayoutControlCustomizeForm.tvItemsCustomDrawItem( - Sender: TCustomTreeView; Node: TTreeNode; State: TCustomDrawState; - var DefaultDraw: Boolean); -begin - if (TObject(Node.Data) is TdxLayoutGroup) and TdxLayoutGroup(Node.Data).Hidden and - not TdxLayoutGroup(Node.Data).IsRoot then - Sender.Canvas.Font.Style := [fsItalic]; -end; - -procedure TdxLayoutControlCustomizeForm.tvAvailableItemsContextPopup( - Sender: TObject; MousePos: TPoint; var Handled: Boolean); -begin - CalculateDeleteItemsActionStates; - acTreeViewItemsDelete.Enabled := False; -end; - -procedure TdxLayoutControlCustomizeForm.acAvailableItemsExpandAllExecute( - Sender: TObject); -begin - tvAvailableItems.FullExpand; -end; - -procedure TdxLayoutControlCustomizeForm.acAvailableItemsCollapseAllExecute( - Sender: TObject); -begin - tvAvailableItems.FullCollapse; -end; - -procedure TdxLayoutControlCustomizeForm.acTreeViewExpandAllExecute( - Sender: TObject); -begin - tvItems.FullExpand; -end; - -procedure TdxLayoutControlCustomizeForm.acTreeViewCollapseAllExecute( - Sender: TObject); -begin - tvItems.FullCollapse; -end; - -procedure TdxLayoutControlCustomizeForm.acAvailableItemsViewAsListExecute( - Sender: TObject); -begin - if acAvailableItemsViewAsList.Checked then - Control.CustomizeAvailableItemsViewKind := oivkTree - else - Control.CustomizeAvailableItemsViewKind := oivkList; -end; - -procedure TdxLayoutControlCustomizeForm.tvItemsEditing(Sender: TObject; - Node: TTreeNode; var AllowEdit: Boolean); - - function IsKeyDown(AShift: TShiftState): Boolean; - begin - Result := (AShift * KeyboardStateToShiftState) <> []; - end; - -begin - AllowEdit := not (TdxCustomLayoutItem(Node.Data).IsRoot or (DragHelper.DragItem <> nil) or - IsKeyDown([ssCtrl, ssShift])); - if not AllowEdit or Control.IsDesigning then - Exit; - Node.Text := TdxCustomLayoutItem(Node.Data).Caption; - RefreshEnableds; -end; - -procedure TdxLayoutControlCustomizeForm.FormShortCut(var Msg: TWMKey; - var Handled: Boolean); -begin - case Msg.CharCode of - VK_ESCAPE: - begin - Handled := tvItems.IsEditing or tvAvailableItems.IsEditing; - if Handled then - if tvItems.Selected <> nil then - tvItems.Selected.EndEdit(True) - else - if tvAvailableItems.Selected <> nil then - tvAvailableItems.Selected.EndEdit(True); - end; - end; -end; - -procedure TdxLayoutControlCustomizeForm.FormKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if Key = VK_DELETE then - begin - if tvItems.Focused and not tvItems.IsEditing then - acTreeViewItemsDelete.Execute; - if tvAvailableItems.Focused and not tvAvailableItems.IsEditing then - acAvailableItemsDelete.Execute; - end; -end; - -procedure TdxLayoutControlCustomizeForm.acTabbedViewExecute( - Sender: TObject); -begin - Control.CustomizeFormTabbedView := acTabbedView.Checked; -end; - -procedure TdxLayoutControlCustomizeForm.acHighlightRootExecute( - Sender: TObject); -begin - Control.HighlightRoot := acHighlightRoot.Checked; -end; - -procedure TdxLayoutControlCustomizeForm.acShowDesignSelectorsExecute( - Sender: TObject); -begin - Control.ShowDesignSelectors := acShowDesignSelectors.Checked; -end; - -procedure TdxLayoutControlCustomizeForm.acStoreExecute(Sender: TObject); -begin - Control.Store; - RefreshEnableds; -end; - -procedure TdxLayoutControlCustomizeForm.acRestoreExecute(Sender: TObject); -begin - TdxLayoutControlAccess(Control).SaveToUndo; - Control.Restore; -end; - -procedure TdxLayoutControlCustomizeForm.acTreeViewItemRenameExecute( - Sender: TObject); -begin - tvItems.Selected.EditText; -end; - -procedure TdxLayoutControlCustomizeForm.acAvailableItemRenameExecute( - Sender: TObject); -begin - tvAvailableItems.Selected.EditText; -end; - -procedure TdxLayoutControlCustomizeForm.acUndoExecute(Sender: TObject); -begin - Control.UndoRedoManager.Undo; - RefreshButtonStates; -end; - -procedure TdxLayoutControlCustomizeForm.acRedoExecute(Sender: TObject); -begin - Control.UndoRedoManager.Redo; - RefreshButtonStates; -end; - -procedure TdxLayoutControlCustomizeForm.ToolBarsCustomDraw( - Sender: TToolBar; const ARect: TRect; var DefaultDraw: Boolean); -begin - cxDrawTransparentControlBackground(Sender, Sender.Canvas, Sender.ClientRect, False); -end; - -procedure TdxLayoutControlCustomizeForm.acAlignByExecute(Sender: TObject); -begin -// for popup -end; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutDragAndDrop.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutDragAndDrop.pas deleted file mode 100644 index 80d1d4b7..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutDragAndDrop.pas +++ /dev/null @@ -1,711 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl common routines } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutDragAndDrop; - -{$I cxVer.inc} - -interface - -uses - Controls, Windows, Graphics, - cxClasses, cxControls, cxGraphics, dxLayoutControl; - -type - TdxLayoutDragSource = (dsControl, dsCustomizeFormAvailableItems, dsCustomizeFormTreeViewItems); - - { TdxLayoutControlDragAndDropObject } - - TdxLayoutControlDragAndDropObject = class(TcxDragAndDropObject) - private - FAreaPart: TdxLayoutAreaPart; - FDragImage: TcxDragImage; - FDragImageOffset: TPoint; - FDestinationControl: TdxCustomLayoutControl; - FDestinationGroup: TdxLayoutGroup; - FDestinationImage: TcxDragImage; - FDestinationItem: TdxCustomLayoutItem; - FHitTest: TdxCustomLayoutHitTest; - FNeedRepaintDestinationImage: Boolean; - FSource: TdxLayoutDragSource; - FSourceItem: TdxCustomLayoutItem; - FSourceItemBounds: TRect; - FStartDragPoint: TPoint; - - function CanDrop: Boolean; - function CanRemove: Boolean; - function GetSourceControl: TdxCustomLayoutControl; - procedure ResetDragAndDropObjects; - procedure ResetDragAndDrop; - procedure SetAreaPart(Value: TdxLayoutAreaPart); - procedure SetDestinationControl(Value: TdxCustomLayoutControl); - procedure SetDestinationGroup(Value: TdxLayoutGroup); - procedure SetDestinationItem(Value: TdxCustomLayoutItem); - procedure SetSourceItem(Value: TdxCustomLayoutItem); - protected - procedure CreateDragImage; - procedure CreateDestinationImage; - procedure DirtyChanged; override; - function GetDragAndDropCursor(Accepted: Boolean): TCursor; override; - - procedure PaintDestinationImage; - procedure PaintDragImage; - procedure RefreshDestinationImage; - procedure ShowDragImage(const P: TPoint); - - property AreaPart: TdxLayoutAreaPart read FAreaPart write SetAreaPart; - property DestinationControl: TdxCustomLayoutControl read FDestinationControl write SetDestinationControl; - property DestinationGroup: TdxLayoutGroup read FDestinationGroup write SetDestinationGroup; - property DestinationItem: TdxCustomLayoutItem read FDestinationItem write SetDestinationItem; - property Source: TdxLayoutDragSource read FSource write FSource; - property SourceControl: TdxCustomLayoutControl read GetSourceControl; - property SourceItemBounds: TRect read FSourceItemBounds; - public - procedure BeginDragAndDrop; override; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - procedure EndDragAndDrop(Accepted: Boolean); override; - procedure Init(ASource: TdxLayoutDragSource; ASourceItem: TdxCustomLayoutItem); virtual; - property SourceItem: TdxCustomLayoutItem read FSourceItem write SetSourceItem; - end; - - { TdxLayoutDragAndDropHelper } - - TdxLayoutDragAndDropHelper = class(TdxLayoutControlPersistent) - private - FDragItem: TdxCustomLayoutItem; - FMouseDownPos: TPoint; - procedure BeginDragAndDrop(ASource: TdxLayoutDragSource); - function CanBeginDragAndDrop(X, Y: Integer): Boolean; - function GetDragAndDropObject: TdxLayoutControlDragAndDropObject; - protected - property DragAndDropObject: TdxLayoutControlDragAndDropObject read GetDragAndDropObject; - public - constructor Create(AControl: TdxCustomLayoutControl); override; - - procedure InitializeDragItem(AItem: TdxCustomLayoutItem; X, Y: Integer); - procedure Reset; - procedure TryBeginDragAndDrop(X, Y: Integer; ASource: TdxLayoutDragSource); - - property DragItem: TdxCustomLayoutItem read FDragItem; - end; - -implementation - -uses - Classes, SysUtils, Forms, cxLibraryConsts, cxGeometry; - -const - dxLayoutSelectionBorderDefaultColor: TColor = $BD8753; - dxLayoutDestinationColor = $D0D0EE; - dxLayoutDestinationBorderColor = $000059; - -type - TdxCustomLayoutControlAccess = class(TdxCustomLayoutControl); - TdxCustomLayoutItemAccess = class(TdxCustomLayoutItem); - TdxLayoutGroupAccess = class(TdxLayoutGroup); - TdxCustomLayoutItemViewInfoAccess = class(TdxCustomLayoutItemViewInfo); - TdxLayoutGroupViewInfoAccess = class(TdxLayoutGroupViewInfo); - TdxLayoutControlViewInfoAccess = class(TdxLayoutControlViewInfo); - TdxCustomLayoutItemPainterAccess = class(TdxCustomLayoutItemPainter); - -{ TdxLayoutControlDragAndDropObject } - - -function TdxLayoutControlDragAndDropObject.CanDrop: Boolean; -begin - Result := (DestinationItem <> nil) or (SourceControl.ViewInfo.GetHitTest(CurMousePos).HitTestCode in - [{//#DG feature is not ready yet htTreeViewItems, }htClientArea, htGroup, htItem]); -end; - -function TdxLayoutControlDragAndDropObject.CanRemove: Boolean; -begin - Result := (SourceControl.ViewInfo.GetHitTest(CurMousePos).HitTestCode in [htAvailableItems, htNone]) and - TdxCustomLayoutItemAccess(SourceItem).CanRemove and (Source <> dsCustomizeFormAvailableItems); -end; - -function TdxLayoutControlDragAndDropObject.GetSourceControl: TdxCustomLayoutControl; -begin - Result := TdxCustomLayoutControl(inherited Control); -end; - -procedure TdxLayoutControlDragAndDropObject.ResetDragAndDropObjects; -begin - SourceItem := nil; - DestinationItem := nil; - DestinationGroup := nil; - FHitTest := nil; -end; - -procedure TdxLayoutControlDragAndDropObject.ResetDragAndDrop; -begin - ResetDragAndDropObjects; - TdxCustomLayoutControlAccess(SourceControl).CustomizeFormUpdate([cfutContent, cfutSelection]); -end; - -procedure TdxLayoutControlDragAndDropObject.SetAreaPart(Value: TdxLayoutAreaPart); -begin - if FAreaPart <> Value then - begin - FAreaPart := Value; - Dirty := True; - end; -end; - -procedure TdxLayoutControlDragAndDropObject.SetDestinationControl(Value: TdxCustomLayoutControl); -begin - if FDestinationControl <> Value then - begin - FDestinationControl := Value; - Dirty := True; - end; -end; - -procedure TdxLayoutControlDragAndDropObject.SetDestinationGroup(Value: TdxLayoutGroup); -begin - if FDestinationGroup <> Value then - begin - if FDestinationGroup <> nil then - FreeAndNil(FDestinationImage); - FDestinationGroup := Value; - if FDestinationGroup <> nil then - CreateDestinationImage; - Dirty := True; - end; -end; - -procedure TdxLayoutControlDragAndDropObject.SetDestinationItem(Value: TdxCustomLayoutItem); -begin - if FDestinationItem <> Value then - begin - FDestinationItem := Value; - Dirty := True; - end; -end; - -procedure TdxLayoutControlDragAndDropObject.SetSourceItem(Value: TdxCustomLayoutItem); -begin - if FSourceItem <> Value then - FSourceItem := Value; -end; - - -procedure TdxLayoutControlDragAndDropObject.CreateDragImage; -begin - FDragImage := TcxDragImage.Create; - PaintDragImage; -end; - -procedure TdxLayoutControlDragAndDropObject.CreateDestinationImage; -var - R: TRect; -begin - if (DestinationItem = nil) or TdxCustomLayoutItemAccess(DestinationItem).IsAvailable then - Exit; - FDestinationImage := TcxDragImage.Create; - FDestinationImage.PopupParent := GetParentForm(DestinationControl); - R := DestinationGroup.ViewInfo.SelectionArea; - OffsetRect(R, -R.Left, -R.Top); - FDestinationImage.SetBounds(R.Left, R.Top, R.Right, R.Bottom); -end; - -procedure TdxLayoutControlDragAndDropObject.DirtyChanged; -begin - inherited DirtyChanged; - FNeedRepaintDestinationImage := True; -end; - -function TdxLayoutControlDragAndDropObject.GetDragAndDropCursor(Accepted: Boolean): TCursor; -begin - if CanDrop then - Result := crDefault - else - if CanRemove then - Result := crdxLayoutControlRemove - else - Result := crdxLayoutControlNoDrop; -end; - -procedure TdxLayoutControlDragAndDropObject.PaintDestinationImage; -var - R: TRect; -begin - FDestinationImage.Canvas.SaveState; - try - R := FDestinationImage.ClientRect; - FDestinationImage.Canvas.FrameRect(R, dxLayoutDestinationBorderColor); - InflateRect(R, -1, -1); - FDestinationImage.Canvas.FillRect(R, dxLayoutDestinationColor); - R := TdxLayoutGroupViewInfoAccess(DestinationGroup.ViewInfo).GetAreaPartBounds(AreaPart, DestinationItem.ViewInfo); - with DestinationGroup.ViewInfo.SelectionArea do - OffsetRect(R, -Left, -Top); - FDestinationImage.Canvas.FrameRect(R, dxLayoutDestinationBorderColor); - finally - FDestinationImage.Canvas.RestoreState; - end; - FNeedRepaintDestinationImage := False; -end; - -procedure TdxLayoutControlDragAndDropObject.PaintDragImage; -var - AViewInfo: TdxCustomLayoutItemViewInfo; - - function GetItemDragBounds: TRect; - begin - Result := AViewInfo.SelectionBorderRect; - end; - - procedure CalculateDragImageOffset; - begin - if not SourceItem.ActuallyVisible then - FDragImageOffset := cxNullPoint - else - begin - case Source of - dsControl: - FDragImageOffset := cxPointOffset(GetItemDragBounds.TopLeft, - SourceControl.ScreenToClient(FStartDragPoint), False); - dsCustomizeFormTreeViewItems: - FDragImageOffset := cxPointOffset(GetItemDragBounds.TopLeft, cxRectCenter(GetItemDragBounds), False); - else - FDragImageOffset := cxNullPoint; - end; - end; - end; - - function GetViewInfoBounds(AHasBorderChanged: Boolean): TRect; - begin - if TdxCustomLayoutItemAccess(SourceItem).IsAvailable or not TdxCustomLayoutItemViewInfoAccess(AViewInfo).ActuallyVisible then - Result := Rect(-TdxCustomLayoutItemViewInfoAccess(AViewInfo).CalculateMinWidth, -TdxCustomLayoutItemViewInfoAccess(AViewInfo).CalculateMinHeight, 0, 0) - else - begin - Result := TdxCustomLayoutItemViewInfoAccess(AViewInfo).OriginalBounds; - if AHasBorderChanged then - Result := TdxLayoutGroupViewInfoAccess(AViewInfo).GetItemAreaBounds(Result); - end; - end; - -var - ANeedDestroyViewInfo: Boolean; - APrevHasBorder: Boolean; - APrevBounds: TRect; -begin - if TdxCustomLayoutItemAccess(SourceItem).IsAvailable then - begin - AViewInfo := TdxCustomLayoutItemAccess(SourceItem).GetViewInfoClass.Create(SourceControl.ViewInfo, nil, SourceItem); - ANeedDestroyViewInfo := True; - end - else - begin - AViewInfo := SourceItem.ViewInfo; - ANeedDestroyViewInfo := False; - APrevBounds := AViewInfo.Bounds; - end; - try - APrevHasBorder := TdxCustomLayoutItemViewInfoAccess(SourceItem.ViewInfo).HasBorder; - TdxLayoutControlViewInfoAccess(SourceControl.ViewInfo).IsDragImagePainted := True; - try - AViewInfo.Calculate(GetViewInfoBounds(TdxCustomLayoutItemViewInfoAccess(SourceItem.ViewInfo).HasBorder <> APrevHasBorder)); - - FDragImage.SetBounds(0, 0, cxRectWidth(GetItemDragBounds), cxRectHeight(GetItemDragBounds)); - FDragImage.Canvas.WindowOrg := GetItemDragBounds.TopLeft; - try - with TdxCustomLayoutItemPainterAccess(TdxCustomLayoutItemViewInfoAccess(AViewInfo).GetPainterClass.Create(FDragImage.Canvas, AViewInfo)) do - try - Paint; - DoDrawSelectionFrame; - PaintSpecificPart; - finally - Free; - end; - finally - FDragImage.Canvas.WindowOrg := cxNullPoint; - end; - CalculateDragImageOffset; - finally - TdxLayoutControlViewInfoAccess(SourceControl.ViewInfo).IsDragImagePainted := False; - end; - finally - if ANeedDestroyViewInfo then - AViewInfo.Destroy - else - AViewInfo.Calculate(APrevBounds); - end; -end; - -procedure TdxLayoutControlDragAndDropObject.RefreshDestinationImage; -const - CustomizeFormHitTestCodes = [htCustomizeForm, htAvailableItems, htTreeViewItems]; -var - P: TPoint; -begin - if (DestinationGroup = nil) or (DestinationItem = nil) or (AreaPart = apNone) or (FHitTest.HitTestCode in CustomizeFormHitTestCodes) then Exit; - PaintDestinationImage; - if FDestinationImage.Visible then - FDestinationImage.Invalidate - else - begin - P := DestinationControl.ClientToScreen(DestinationGroup.ViewInfo.SelectionArea.TopLeft); - FDestinationImage.MoveTo(P); - FDestinationImage.Show; - end; -end; - -procedure TdxLayoutControlDragAndDropObject.ShowDragImage(const P: TPoint); -begin - if FDragImage <> nil then - begin - FDragImage.MoveTo(P); - FDragImage.Show; - end; -end; - -procedure TdxLayoutControlDragAndDropObject.BeginDragAndDrop; -begin - inherited BeginDragAndDrop; -//#DG SourceItem.SelectComponent([]); - TdxCustomLayoutControlAccess(SourceControl).DragAndDropBegan; - CreateDragImage; -end; - -procedure TdxLayoutControlDragAndDropObject.DragAndDrop(const P: TPoint; var Accepted: Boolean); - - function FindDestLayoutControl(const P: TPoint): TdxCustomLayoutControl; - var - AControl: TWinControl; - AWnd: THandle; - begin - Result := nil; - AWnd := cxWindowFromPoint(P); - while (Result = nil) and (AWnd <> 0) do - begin - AControl := FindControl(AWnd); - if (AControl is TdxCustomLayoutControl) and (AControl.Owner = SourceControl.Owner) and - TdxCustomLayoutControlAccess(AControl).AllowDrop then - Result := TdxLayoutControl(AControl); - AWnd := GetAncestor(AWnd, GA_PARENT); - end; - if Result = nil then - Result := SourceControl; - end; - - procedure DetermineDestinationControl(const P: TPoint); - begin - DestinationControl := FindDestLayoutControl(P); - end; - - procedure DetermineDestinationItem; - begin - // DetermineDestinationItems(ADestItems); - // UpdatedestinationPlaces(AScreenPoint, ADestItems, ADestinationItem); - - DestinationItem := FHitTest.GetDesinationItem; - if (DestinationItem = SourceItem) or - ((DestinationItem is TdxLayoutItem) and TdxCustomLayoutItemAccess(DestinationItem).IsAvailable and (DestinationItem.Parent = nil)) or - ((DestinationItem is TdxLayoutGroup) and not SourceItem.CanMoveTo(DestinationItem)) then - DestinationItem := nil; - end; - - procedure DetermineAreaPart(const P: TPoint); - const - CustomizeFormTreeViewItemAreaPart: array [TdxLayoutDirection] of TdxLayoutAreaPart = (apRight, apBottom, apBottom); - var - AAreaPart: TdxLayoutAreaPart; - begin - AAreaPart := apNone; - if FHitTest.IsDeterminedAreaPart then - AAreaPart := FHitTest.GetAreaPart - else - if (DestinationItem <> nil) then - AAreaPart := TdxCustomLayoutItemViewInfoAccess(DestinationItem.ViewInfo).GetAreaPart(P); - AreaPart := AAreaPart; - end; - - procedure DetermineDestinationGroup; - begin - if DestinationItem = nil then - DestinationGroup := nil - else - begin - if DestinationItem.IsRoot or (AreaPart in [apCenter, apFirstChild, apLastChild]) then - DestinationGroup := TdxLayoutGroup(DestinationItem) - else - DestinationGroup := DestinationItem.Parent; - end; - end; - - procedure DetermineHitTest(const P: TPoint); - begin - if IsWindowVisible(DestinationControl.Handle) then - FHitTest := DestinationControl.ViewInfo.GetHitTest(P) - else - FHitTest := SourceControl.ViewInfo.GetHitTest(P); - end; - - procedure UpdateDestinationImageState; - begin - if FNeedRepaintDestinationImage then - RefreshDestinationImage; - end; - -var - AScreenPoint, ADestPoint, ADragImagePoint: TPoint; -begin - AScreenPoint := Control.ClientToScreen(P); - DetermineDestinationControl(AScreenPoint); - ADestPoint := DestinationControl.ScreenToClient(AScreenPoint); - - ADragImagePoint := cxPointOffset(AScreenPoint, FDragImageOffset); - ShowDragImage(ADragImagePoint); - - DetermineHitTest(ADestPoint); - DetermineDestinationItem; - DetermineAreaPart(ADestPoint); - DetermineDestinationGroup; - - Accepted := AreaPart <> apNone; - - UpdateDestinationImageState; - inherited; -end; - -procedure TdxLayoutControlDragAndDropObject.EndDragAndDrop(Accepted: Boolean); - - function GetDestPosition: Integer; - begin - case AreaPart of - apRight, apBottom, apAfter: - if DestinationItem = DestinationGroup then - Result := DestinationGroup.VisibleCount - else - Result := DestinationItem.VisibleIndex + 1; - apLeft, apTop, apBefore: - if DestinationItem = DestinationGroup then - Result := 0 - else - Result := DestinationItem.VisibleIndex; - apLastChild: - Result := DestinationGroup.VisibleCount; - else - Result := 0; - end; - if (SourceItem.Parent = DestinationGroup) and (SourceItem.VisibleIndex < Result) then - Dec(Result); - end; - - function GetLayoutDirection: TdxLayoutDirection; - begin - Result := DestinationGroup.LayoutDirection; - end; - - function GetOrthogonalDirection: TdxLayoutDirection; - begin - Result := TdxLayoutGroupAccess(DestinationItem.Parent).GetHelperClass.GetOrthogonalDirection; - end; - - function IsHorizontalAreaPart: Boolean; - begin - Result := AreaPart in [apLeft, apRight, apAfter, apBefore]; - end; - - function IsVerticalAreaPart: Boolean; - begin - Result := AreaPart in [apTop, apBottom, apAfter, apBefore]; - end; - - procedure DoInsert; - begin - SourceItem.MoveTo(DestinationGroup, GetDestPosition, True); - end; - - procedure DoCreateGroup; - const - LayoutDirections: array[Boolean] of TdxLayoutDirection = - (ldVertical, ldHorizontal); - var - AGroup: TdxLayoutGroup; - begin - if DestinationItem.IsRoot then - begin - DestinationGroup.PutChildrenIntoHiddenGroup; - DestinationGroup.LayoutDirection := LayoutDirections[IsHorizontalAreaPart]; - SourceItem.MoveTo(DestinationGroup, GetDestPosition, True); - end - else - begin - AGroup := DestinationItem.PutIntoHiddenGroup(GetOrthogonalDirection); - SourceItem.MoveTo(AGroup, GetDestPosition, True); - end; - end; - - procedure DoContentInsert; - begin - DestinationGroup.PutChildrenIntoHiddenGroup; - DestinationGroup.LayoutDirection := GetOrthogonalDirection; - SourceItem.MoveTo(DestinationGroup, GetDestPosition, True); - end; - - function CanProcessDrop: Boolean; - begin - Result := Accepted and (DestinationControl <> nil) and ((CanDrop and (DestinationItem <> nil)) or CanRemove); - end; - -var - ANeedUpdateCustomizeForm: Boolean; - ALinkSelf: TcxObjectLink; -begin - FreeAndNil(FDragImage); - Dirty := True; - if CanProcessDrop then - begin - ANeedUpdateCustomizeForm := False; - TdxCustomLayoutControlAccess(SourceControl).CustomizeFormBeginUpdate; - TdxCustomLayoutControlAccess(DestinationControl).CustomizeFormBeginUpdate; - try - TdxCustomLayoutControlAccess(DestinationControl).SaveToUndo; - DestinationControl.BeginUpdate; - TdxCustomLayoutControlAccess(SourceControl).SaveToUndo; - SourceControl.BeginUpdate; - try - if CanDrop and (DestinationGroup <> nil) then - begin - ANeedUpdateCustomizeForm := True; - case TdxLayoutGroupViewInfoAccess(DestinationGroup.ViewInfo).GetActionType(AreaPart) of - atInsert: - DoInsert; - atCreateGroup: - DoCreateGroup; - atContentInsert: - DoContentInsert; - end; - end - else - if CanRemove then - begin - SourceItem.Parent := nil; - ANeedUpdateCustomizeForm := True; - end; - finally - ALinkSelf := cxAddObjectLink(SourceItem); - try - ResetDragAndDropObjects; - SourceControl.EndUpdate; - DestinationControl.EndUpdate; - if ALinkSelf.Ref <> nil then - (ALinkSelf.Ref as TdxCustomLayoutItem).MakeVisible; - finally - cxRemoveObjectLink(ALinkSelf); - end; - end; - finally - TdxCustomLayoutControlAccess(SourceControl).CustomizeFormCancelUpdate; - TdxCustomLayoutControlAccess(DestinationControl).CustomizeFormCancelUpdate; - if ANeedUpdateCustomizeForm then - begin - TdxCustomLayoutControlAccess(SourceControl).CustomizeFormUpdate([cfutContent, cfutSelection]); - if (DestinationControl <> SourceControl) and TdxCustomLayoutControlAccess(DestinationControl).IsCustomization then - TdxCustomLayoutControlAccess(DestinationControl).CustomizeFormUpdate([cfutContent, cfutSelection]); - end; - end; - SourceControl.Update; - if DestinationControl <> SourceControl then - DestinationControl.Update; - TdxCustomLayoutControlAccess(SourceControl).Modified; - end - else - ResetDragAndDrop; - inherited; -end; - -procedure TdxLayoutControlDragAndDropObject.Init(ASource: TdxLayoutDragSource; - ASourceItem: TdxCustomLayoutItem); -begin - SourceControl.Update; - Source := ASource; - SourceItem := ASourceItem; - FStartDragPoint := GetMouseCursorPos; -end; - -{ TdxLayoutDragAndDropHelper } - -constructor TdxLayoutDragAndDropHelper.Create( - AControl: TdxCustomLayoutControl); -begin - inherited Create(AControl); - Reset; -end; - -procedure TdxLayoutDragAndDropHelper.InitializeDragItem(AItem: TdxCustomLayoutItem; - X, Y: Integer); -begin - FMouseDownPos := Point(X, Y); - FDragItem := AItem; -end; - -procedure TdxLayoutDragAndDropHelper.Reset; -begin - FDragItem := nil; - FMouseDownPos := cxInvalidPoint; -end; - -procedure TdxLayoutDragAndDropHelper.TryBeginDragAndDrop(X, Y: Integer; - ASource: TdxLayoutDragSource); -begin - if CanBeginDragAndDrop(X, Y) then - BeginDragAndDrop(ASource); -end; - -function TdxLayoutDragAndDropHelper.CanBeginDragAndDrop(X, Y: Integer): Boolean; -begin - Result := TdxCustomLayoutControlAccess(Control).CanDragAndDrop and (Control.DragAndDropState = ddsNone) and - not cxPointIsEqual(FMouseDownPos, cxInvalidPoint) and not IsPointInDragDetectArea(FMouseDownPos, X, Y) and - (DragItem <> nil) and TdxCustomLayoutItemAccess(DragItem).CanDragAndDrop; -end; - -procedure TdxLayoutDragAndDropHelper.BeginDragAndDrop(ASource: TdxLayoutDragSource); -begin - DragAndDropObject.Init(ASource, DragItem); - Control.BeginDragAndDrop; -end; - -function TdxLayoutDragAndDropHelper.GetDragAndDropObject: TdxLayoutControlDragAndDropObject; -begin - Result := TdxLayoutControlDragAndDropObject(Control.DragAndDropObject); -end; - -initialization - Screen.Cursors[crdxLayoutControlNoDrop] := LoadCursor(HInstance, 'DXLAYOUTCONTROLNODROP'); - Screen.Cursors[crdxLayoutControlRemove] := LoadCursor(HInstance, 'DXLAYOUTCONTROLREMOVE'); - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutEditForm.dfm b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutEditForm.dfm deleted file mode 100644 index 4e4b4d5e..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutEditForm.dfm +++ /dev/null @@ -1,82 +0,0 @@ -object LayoutEditForm: TLayoutEditForm - Left = 233 - Top = 209 - BorderStyle = bsDialog - Caption = 'LayoutEditForm' - ClientHeight = 88 - ClientWidth = 282 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object LayoutControl: TdxLayoutControl - Left = 0 - Top = 0 - Width = 282 - Height = 88 - Align = alClient - TabOrder = 0 - TabStop = False - AutoContentSizes = [acsWidth] - object edMain: TEdit - Left = 12 - Top = 30 - Width = 121 - Height = 17 - BorderStyle = bsNone - TabOrder = 0 - Text = 'edMain' - end - object btnOK: TButton - Left = 116 - Top = 55 - Width = 75 - Height = 23 - Caption = 'btnOK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 197 - Top = 55 - Width = 75 - Height = 23 - Cancel = True - Caption = 'btnCancel' - ModalResult = 2 - TabOrder = 2 - end - object TdxLayoutGroup - ShowCaption = False - Hidden = True - ShowBorder = False - object LayoutControlItemEdit: TdxLayoutItem - Caption = 'Edit1' - CaptionOptions.Layout = clTop - Control = edMain - end - object dxLayoutControl1Group1: TdxLayoutGroup - AutoAligns = [aaVertical] - AlignHorz = ahRight - ShowCaption = False - LayoutDirection = ldHorizontal - ShowBorder = False - object dxLayoutControl1Item2: TdxLayoutItem - Caption = 'Button1' - ShowCaption = False - Control = btnOK - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item3: TdxLayoutItem - Caption = 'Button2' - ShowCaption = False - Control = btnCancel - ControlOptions.ShowBorder = False - end - end - end - end -end diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutEditForm.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutEditForm.pas deleted file mode 100644 index 841c718c..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutEditForm.pas +++ /dev/null @@ -1,139 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl edit form } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutEditForm; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, dxLayoutControl, cxControls, dxLayoutLookAndFeels; - -type - TLayoutEditForm = class(TForm) - LayoutControl: TdxLayoutControl; - edMain: TEdit; - LayoutControlItemEdit: TdxLayoutItem; - dxLayoutControl1Group1: TdxLayoutGroup; - btnOK: TButton; - dxLayoutControl1Item2: TdxLayoutItem; - btnCancel: TButton; - dxLayoutControl1Item3: TdxLayoutItem; - public - constructor Create(AOwner: TComponent); override; - class function Run(const ACaption, AEditCaption: string; var Value: string; - AEditControl: TWinControl = nil): Boolean; - end; - -function dxLayoutControlSelectLookAndFeel(AParent: TWinControl; - var ALookAndFeelClass: TdxCustomLayoutLookAndFeelClass): Boolean; - -implementation - -{$R *.DFM} - -uses - cxClasses, dxLayoutStrs; - -type - TControlAccess = class(TControl); - -function dxLayoutControlSelectLookAndFeel(AParent: TWinControl; - var ALookAndFeelClass: TdxCustomLayoutLookAndFeelClass): Boolean; - - function GetDescriptionsComboBox: TComboBox; - var - I: Integer; - begin - Result := TComboBox.Create(nil); - Result.Style := csDropDownList; - Result.Visible := False; - Result.Parent := AParent; - for I := 0 to dxLayoutLookAndFeelDefs.Count - 1 do - Result.Items.Add(dxLayoutLookAndFeelDefs[I].Description); - if Result.Items.Count <> 0 then - Result.ItemIndex := 0; - end; - -var - ADescription: string; -begin - ADescription := ''; - Result := TLayoutEditForm.Run('New Look & Feel', - 'Choose a new look && feel style:', ADescription, GetDescriptionsComboBox); - if Result then - ALookAndFeelClass := dxLayoutLookAndFeelDefs.GetItemByDescription(ADescription); -end; - -constructor TLayoutEditForm.Create(AOwner: TComponent); -begin - inherited; - btnOK.Caption := cxGetResourceString(@sdxLayoutControlEditFormOK); - btnCancel.Caption := cxGetResourceString(@sdxLayoutControlEditFormCancel); -end; - -class function TLayoutEditForm.Run(const ACaption, AEditCaption: string; - var Value: string; AEditControl: TWinControl = nil): Boolean; -begin - with Self.Create(nil) do - try - Caption := ACaption; - LayoutControlItemEdit.Caption := AEditCaption; - - if AEditControl = nil then - edMain.Text := Value - else - begin - LayoutControlItemEdit.Control := AEditControl; - edMain.Visible := False; - ActiveControl := AEditControl; - TControlAccess(AEditControl).Text := Value; - end; - - Result := ShowModal = mrOk; - - if AEditControl = nil then - Value := edMain.Text - else - Value := TControlAccess(AEditControl).Text; - finally - Free; - end; -end; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutLookAndFeelListDesignForm.dfm b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutLookAndFeelListDesignForm.dfm deleted file mode 100644 index c31faac6..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutLookAndFeelListDesignForm.dfm +++ /dev/null @@ -1,650 +0,0 @@ -object dxLayoutLookAndFeelListDesignForm: TdxLayoutLookAndFeelListDesignForm - Left = 532 - Top = 129 - AutoScroll = False - ClientHeight = 474 - ClientWidth = 357 - Color = clBtnFace - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lcMain: TdxLayoutControl - Left = 0 - Top = 0 - Width = 357 - Height = 474 - Align = alClient - TabOrder = 0 - TabStop = False - object lbItems: TListBox - Left = 12 - Top = 40 - Width = 331 - Height = 121 - Style = lbOwnerDrawFixed - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - TabOrder = 1 - OnClick = lbItemsClick - OnKeyDown = lbItemsKeyDown - end - object tlbGroups: TToolBar - Left = 10 - Top = 10 - Width = 46 - Height = 22 - Align = alNone - AutoSize = True - Caption = 'Commands' - EdgeInner = esNone - EdgeOuter = esNone - Flat = True - Images = ilMain - ParentShowHint = False - ShowHint = True - TabOrder = 0 - object tbAddItem: TToolButton - Left = 0 - Top = 0 - Action = acAdd - DropdownMenu = PopupMenu1 - end - object tbDelete: TToolButton - Left = 23 - Top = 0 - Action = acDelete - end - end - object lcPreview: TdxLayoutControl - Left = 22 - Top = 220 - Width = 277 - Height = 232 - BevelKind = bkSoft - TabOrder = 2 - TabStop = False - AutoSize = True - object cxTextEdit1: TcxTextEdit - Left = 84 - Top = 101 - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 1 - Text = 'cxTextEdit1' - Width = 186 - end - object cxMemo1: TcxMemo - Left = 10000 - Top = 10000 - Lines.Strings = ( - 'cxMemo1') - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 9 - Visible = False - Height = 75 - Width = 169 - end - object cxCheckBox3: TcxCheckBox - Left = 22 - Top = 155 - Caption = 'cxCheckBox1' - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 3 - Transparent = True - Width = 248 - end - object cxTextEdit2: TcxTextEdit - Left = 84 - Top = 128 - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 2 - Text = 'cxTextEdit2' - Width = 186 - end - object cxRichEdit1: TcxRichEdit - Left = 10000 - Top = 10000 - Lines.Strings = ( - 'cxRichEdit1') - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 5 - Visible = False - Height = 65 - Width = 186 - end - object cxButton1: TcxButton - Left = 10000 - Top = 10000 - Width = 72 - Height = 25 - Caption = 'cxButton1' - TabOrder = 6 - Visible = False - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - end - object cxButton2: TcxButton - Left = 10000 - Top = 10000 - Width = 72 - Height = 25 - Caption = 'cxButton2' - TabOrder = 7 - Visible = False - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - end - object cxButton3: TcxButton - Left = 10000 - Top = 10000 - Width = 72 - Height = 25 - Caption = 'cxButton3' - TabOrder = 8 - Visible = False - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - end - object cxCheckBox1: TcxCheckBox - Left = 22 - Top = 182 - Caption = 'cxCheckBox2' - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.HotTrack = False - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 4 - Transparent = True - Width = 121 - end - object TdxLayoutGroup - AlignHorz = ahParentManaged - AlignVert = avParentManaged - CaptionOptions.Visible = False - Hidden = True - ShowBorder = False - object lcPreviewGroup4: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - LayoutLookAndFeel = dxLayoutWebLookAndFeel2 - ShowBorder = False - UseIndent = False - object liWarning: TdxLayoutItem - CaptionOptions.Text = - 'This preview is built using editors shipped with the ExpressEdit' + - 'ors Library. We recommend that you use our editors to avoid pain' + - 'ting issues with standard VCL editors.' - CaptionOptions.Glyph.Data = { - 36100000424D3610000000000000360000002800000020000000200000000100 - 2000000000000010000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001515 - 155D262626B2282828CA252525CA232323CA202020CA1D1D1DCA191919CA1818 - 18CA151515CA121212CA111111CA0E0E0ECA0C0C0CCA0A0A0ACA080808CA0606 - 06CA050505CA020202CA020202CA000000CA000000CA000000CA000000CA0000 - 00CA000000CA000000CA000000CA000000B20000005D00000000101010403838 - 38E83B3B3BFF373737FF343434FF313131FF2D2D2DFF292929FF252525FF2222 - 22FF1F1F1FFF1B1B1BFF191919FF161616FF121212FF101010FF0D0D0DFF0B0B - 0BFF080808FF060606FF040404FF020202FF000000FF000000FF000000FF0000 - 00FF000000FF000000FF000000FF000000FF000000E800000040343434BC4343 - 43FF404040FF3C3C3CFF363332FF302927FF2C2523FF29221FFF251D1BFF221A - 18FF1F1714FF1B1310FF18100DFF140C09FF120A06FF0F0703FF0C0400FF0900 - 00FF070000FF050000FF020000FF000000FF000000FF000000FF000000FF0000 - 00FF000000FF000000FF000000FF000000FF000000FF000000BC454545EA4848 - 48FF454545FF3F3D3DFF70AABAFF86DBF3FF89E4FFFF85E2FFFF81E0FFFF7FDE - FFFF7BDDFFFF79DCFFFF76DAFFFF73D9FFFF71D7FFFF6FD6FFFF6CD4FFFF6BD4 - FFFF68D3FFFF68D2FFFF67D1FFFF67D1FFFF67D0FFFF66D0FFFF66CFFFFF65CF - FFFF63CBFAFF5492A5FF000000FF000000FF000000FF000000EA3F3F3FCA4C4C - 4CFF494949FF443F3DFF73B8C9FF63EEFFFF56E5FFFF52E3FFFF4CE0FFFF48DC - FFFF43DAFFFF3ED8FFFF39D5FFFF34D3FFFF48DDFFFF4ED4FFFF4AD3FFFF3ED8 - FFFF21C9FFFF20C8FFFF20C7FFFF20C7FFFF1FC6FFFF1FC5FFFF1EC5FFFF1DC4 - FFFF25CBFFFF398FB6FF000000FF000000FF000000FF000000CA2222226B4F4F - 4FFF4C4C4CFF444140FF8EB4BDFF96F1FFFF74E2FFFF5FDDFFFF4FD8FFFF40D3 - FFFF3BCFFFFF38CEFFFF31CAFFFF48D4FFFF559DB7FF2D3A3FFF2A373CFF4D98 - B5FF35CBFFFF14BAFFFF16BAFFFF15B9FFFF14B8FFFF14B7FFFF13B6FFFF10B5 - FFFF1EC2FFFF3582A5FF000000FF000000FF000000FF0000006B0404040B5757 - 57D5646464FF585756FF7A7E7FFFD4F7FCFFC2F5FFFFAFEEFFFF98EAFFFF79E1 - FFFF5AD9FFFF41D2FFFF37D1FFFF55C5ECFF32393CFF1F1714FF1B1310FF2831 - 35FF44BCEAFF1BC0FFFF17BBFFFF17BAFFFF17B9FFFF16B9FFFF15B8FFFF11B7 - FFFF35C1FCFF1B333EFF000000FF000000FF000000D50000000B000000002C2C - 2C5C757575FF6E6E6EFF656363FFB0C6CCFFC9FCFFFFBAF2FFFFB3EFFFFFAAEC - FFFF9BE9FFFF7EE2FFFF5BDDFFFF59C0E3FF303537FF24201EFF211C1AFF292D - 2FFF44B6E3FF1FC3FFFF1ABDFFFF18BBFFFF17BAFFFF17BAFFFF14B8FFFF1FC4 - FFFF3A8AAEFF040302FF030202FF020202FF0000005C00000000000000000303 - 03085E5E5EC7747474FF696868FF818688FFCCF4FBFFBCF4FFFFB3F0FFFFABED - FFFFA1EBFFFF98E9FFFF8BE5FFFF8CE8FDFF5C808DFF2C3031FF2A2D2EFF4B7C - 8DFF48D2FEFF1FC0FFFF1EBFFFFF1ABDFFFF18BBFFFF17BBFFFF13BBFFFF39C1 - FAFF1E343EFF050100FF050606FF020202C70000000800000000000000000000 - 00002525254C797979FE737373FF6A6868FFADC2C6FFC8FCFFFFB7F1FFFFAFF0 - FFFFA5EDFFFF9BEAFFFF8FE7FFFF89E6FFFF91E8FFFF75BCD3FF5DB2CEFF54D5 - FFFF2EC9FFFF24C3FFFF22C2FFFF1EBFFFFF1ABDFFFF16BBFFFF23C7FFFF3C86 - A5FF0C0705FF0A0909FF080808FE0101014C0000000000000000000000000000 - 0000000000005B5B5BB67A7A7AFF6F6F6EFF818687FFC9F1F9FFBCF5FFFFB3F1 - FFFFAAEFFFFF9FECFFFF95E9FFFF88E5FFFF8CF0FFFF6D929DFF537581FF4FD7 - FFFF2AC9FFFF2AC7FFFF26C5FFFF21C1FFFF1DBFFFFF16BFFFFF3DC1F5FF2536 - 3CFF0E0A08FF0E0E0EFF060606B6000000000000000000000000000000000000 - 0000000000001D1D1D397C7C7CFA797979FF6F6D6CFFACC0C5FFC7FCFFFFB5F2 - FFFFAEF0FFFFA4EDFFFF9AEBFFFF8FE8FFFF97F0FFFF5A6E73FF4A5558FF71DA - FBFF38D0FFFF2EC9FFFF2AC7FFFF26C4FFFF1EC1FFFF2ACCFFFF4087A2FF160F - 0DFF141514FF101010FA03030339000000000000000000000000000000000000 - 00000000000000000000545454A37F7F7FFF757474FF838788FFC8F0F6FFBCF5 - FFFFB2F1FFFFA9EFFFFF9FECFFFF95EDFFFF9AE3F6FF515C5FFF434748FF80D3 - ECFF55DBFFFF36CDFFFF2FCAFFFF2AC8FFFF23C7FFFF45C4F1FF2D3A3FFF1814 - 12FF181818FF0C0C0CA300000000000000000000000000000000000000000000 - 000000000000000000001616162B7D7D7DF17F7F7FFF747171FFABBFC3FFC6FB - FFFFB5F2FFFFADF1FFFFA4EEFFFF9DF1FFFF9CD8E6FF484A4AFF3D3938FF80C1 - D4FF6BE3FFFF49D4FFFF34CEFFFF2DC9FFFF38D4FFFF4A89A0FF201916FF1F1F - 1FFF191919F10404042B00000000000000000000000000000000000000000000 - 000000000000000000000000000050505094848484FF7C7B7AFF86898AFFC7EE - F6FFBBF6FFFFB0F1FFFFA8EFFFFFA7F6FFFF93BFC9FF43403FFF403C3AFF739E - AAFF7AE8FFFF59D9FFFF3ED2FFFF33D0FFFF53CAF1FF364145FF242120FF2323 - 23FF121212940000000000000000000000000000000000000000000000000000 - 00000000000000000000000000001010101D7D7D7DEB848484FF797877FFABBD - C0FFC6FCFFFFB5F3FFFFACF1FFFFB1F9FFFF7E979CFF474444FF43403FFF6478 - 7DFF87EDFFFF64DDFFFF4BD6FFFF4BDDFFFF558D9FFF2B2624FF2A2A2AFF2222 - 22EB0303031D0000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000004545457C898989FF818080FF8B8E - 8EFFC6EEF5FFBAF6FFFFB0F2FFFFB8F8FFFF6E787AFF4B4948FF494645FF5962 - 64FF8DE2F6FF6DE3FFFF57DEFFFF63D1F1FF414C4FFF312E2DFF2F2F2FFF1515 - 157C000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000B0B0B147B7B7BDE898989FF7F7D - 7DFFADBFC2FFC6FCFFFFB6F7FFFFB4E8F2FF666B6CFF51504FFF4F4D4DFF5456 - 56FF8ACEDEFF76E8FFFF71EAFFFF6196A3FF393331FF373737FF2C2C2CDE0303 - 0314000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000003C3C3C698E8E8EFF8685 - 85FF8D8F90FFC6EEF3FFBEFDFFFFB0DDE6FF646667FF565555FF545353FF5251 - 4FFF88C3D1FF80F2FFFF83DAEEFF4C5457FF3D3A39FF3C3C3CFF161616690000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000005050509787878D28E8E - 8EFF848181FFADBEC2FFC8FEFFFFBEEEF5FF6F7475FF585656FF565454FF5C5E - 5FFF96D7E4FF90F6FFFF759DA6FF433E3DFF444444FF343434D2020202090000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000343434599292 - 92FF8B8A8AFF909292FFC6EBF2FFC9FFFFFFA5BFC3FF656565FF5F5E5DFF8DA9 - B0FFA5F8FFFF98DFEFFF5E6264FF4B4949FF484848FF17171759000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000030303067171 - 71C2929292FF898786FFADBDC0FFC8FBFFFFC3FAFFFFB7E7EFFFB0E3EDFFAEF3 - FFFFA4F7FFFF86A5ABFF585553FF525252FF383838C201010106000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000002929 - 2945939494FC909090FF929393FFC6E9EFFFBEF9FFFFB6F8FFFFAEF7FFFFA6F6 - FFFFA8E0EBFF6E7071FF616160FF555555FC1515154500000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00006A6A6AAF969696FF8E8C8CFFADBABDFFCAFCFFFFB9F5FFFFB1F4FFFFB6FA - FFFF93A9ACFF6A6665FF686869FF3E3E3EAF0000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000020202035959595F8949494FF959595FFC7E8EDFFC0F9FFFFB9F9FFFFB7E4 - EBFF7C7E7DFF717070FF696969F8131313350000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000636363A09A9A9AFF918F8FFFADB9BBFFD0FFFFFFCAFFFFFF9EAF - B2FF797676FF787878FF464646A0000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000019191928939393F0999898FF979797FFACB7B8FFA7B3B5FF8889 - 89FF818181FF757575F012121228000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000005858588D9E9E9EFF989898FF908E8EFF8C8A8AFF8C8B - 8BFF878787FF4747478D00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000001010101A8B8B8BDE9D9D9DFF989898FF949494FF9090 - 90FF787878DE0D0D0D1A00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000002A2A2A42939393EA9D9D9DFF989898FF8888 - 88EA252525420000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000003C3C3C5F6F6F6FB56D6D6DB53838 - 385F000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - CaptionOptions.Width = 235 - end - end - object lcPreviewGroup2: TdxLayoutGroup - AlignVert = avClient - CaptionOptions.Text = 'New Group' - LayoutDirection = ldTabbed - ShowBorder = False - object dxLayoutGroup1: TdxLayoutGroup - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Text = 'Group 1' - object lcPreviewItem1: TdxLayoutItem - CaptionOptions.Text = 'cxTextEdit1' - Control = cxTextEdit1 - ControlOptions.ShowBorder = False - end - object lcPreviewItem8: TdxLayoutItem - CaptionOptions.Text = 'cxTextEdit2' - Control = cxTextEdit2 - ControlOptions.ShowBorder = False - end - object lcPreviewItem2: TdxLayoutItem - CaptionOptions.Text = 'cxCheckBox3' - CaptionOptions.Visible = False - Control = cxCheckBox3 - ControlOptions.ShowBorder = False - end - object lcPreviewItem10: TdxLayoutItem - CaptionOptions.Text = 'cxCheckBox1' - CaptionOptions.Visible = False - Control = cxCheckBox1 - ControlOptions.ShowBorder = False - end - end - object dxLayoutControl1Group2: TdxLayoutGroup - AlignVert = avClient - CaptionOptions.Text = 'Group2' - object lcPreviewItem3: TdxLayoutItem - AlignVert = avClient - CaptionOptions.Text = 'cxRichEdit1' - Control = cxRichEdit1 - ControlOptions.ShowBorder = False - end - object lcPreviewGroup1: TdxLayoutGroup - Hidden = True - LayoutDirection = ldHorizontal - ShowBorder = False - object lcPreviewItem4: TdxLayoutItem - CaptionOptions.Text = 'cxButton1' - CaptionOptions.Visible = False - Control = cxButton1 - ControlOptions.ShowBorder = False - end - object lcPreviewItem6: TdxLayoutItem - CaptionOptions.Text = 'cxButton2' - CaptionOptions.Visible = False - Control = cxButton2 - ControlOptions.ShowBorder = False - end - object lcPreviewItem9: TdxLayoutItem - CaptionOptions.Text = 'cxButton3' - CaptionOptions.Visible = False - Control = cxButton3 - ControlOptions.ShowBorder = False - end - end - end - object dxLayoutControl1Group3: TdxLayoutGroup - AlignVert = avClient - CaptionOptions.Text = 'Group3' - object lcPreviewItem5: TdxLayoutItem - AlignVert = avClient - CaptionOptions.Text = 'cxMemo1' - Control = cxMemo1 - ControlOptions.ShowBorder = False - end - end - end - end - end - object TdxLayoutGroup - AlignHorz = ahParentManaged - AlignVert = avParentManaged - CaptionOptions.Visible = False - Hidden = True - ShowBorder = False - object lcMainItem5: TdxLayoutItem - CaptionOptions.Visible = False - Control = tlbGroups - ControlOptions.AutoColor = True - ControlOptions.ShowBorder = False - end - object lcMainItem1: TdxLayoutItem - AlignHorz = ahClient - AlignVert = avClient - Control = lbItems - end - object lcMainGroup3: TdxLayoutGroup - CaptionOptions.Text = 'Preview' - object lcMainItem2: TdxLayoutItem - CaptionOptions.Text = 'lcPreview' - CaptionOptions.Visible = False - Control = lcPreview - ControlOptions.ShowBorder = False - end - end - end - end - object lflMain: TdxLayoutLookAndFeelList - Left = 256 - Top = 116 - end - object alMain: TActionList - Left = 8 - Top = 296 - object acAdd: TAction - Category = 'Buttons' - Caption = '&Add' - Hint = 'Add' - ImageIndex = 0 - OnExecute = btnAddClick - end - object acDelete: TAction - Category = 'Buttons' - Caption = '&Delete' - Hint = 'Delete' - ImageIndex = 1 - OnExecute = acDeleteExecute - end - object acClose: TAction - Category = 'Buttons' - Caption = '&Close' - Hint = 'Close' - ImageIndex = 2 - end - end - object PopupMenu1: TPopupMenu - Left = 72 - Top = 32 - end - object ilMain: TcxImageList - CompressData = True - FormatVersion = 1 - DesignInfo = 13631640 - ImageInfo = < - item - Image.Data = { - 920200005844424D020004023604850000424D36040000000000003600000028 - 0000000210000000830100200000000000000400001900000000860000000400 - 0000120000001D0000001F00000015000000050A00000000860000000F2E703C - FF00550FFF00520FFF2A6739FF000000150A00000000860000001601590FFF3E - 9D53FF04811DFF00520FFF0000001F0A000000008600000015015C10FF57BC71 - FF069727FF00540FFF0000001F06000000008A00000002000000080000000E00 - 00001100000022005F10FF59BF76FF089C2EFF00570FFF00000033020000001F - 82000000150000000502000000008E00000006378947FF016A10FF006810FF00 - 6510FF01620FFF0DA73DFF0BA235FF005910FF005710FF005410FF00520FFF2A - 6739FF0000001502000000008E00000008017010FF47B86EFF2AC367FF14B952 - FF12B34BFF0FAD43FF0DA83DFF0BA135FF099C2EFF069727FF04811DFF00520F - FF0000001F02000000008E00000006007210FF4ABE74FF63D692FF61D38EFF60 - D08AFF5ECB84FF0FAD43FF0DA73CFF59BF76FF58BC71FF409F55FF01540FFF00 - 00001D02000000008E00000003358F45FF017211FF017011FF016D10FF016A10 - FF60CF8AFF12B34BFF006210FF015F10FF005B10FF015910FF296D39FF000000 - 1202000000008E0000000100000003000000060000000800000011016E10FF62 - D38EFF14B852FF006410FF000000220000001500000016000000100000000406 - 000000008600000008017011FF63D692FF29C367FF006810FF000000110A0000 - 00008600000006017211FF4ABF74FF4ABB70FF006B10FF0000000E0A00000000 - 8600000003358F45FF017311FF007010FF328642FF000000090A000000008600 - 00000100000003000000060000000800000006000000021500000000} - end - item - Image.Data = { - 9E0300005844424D020004023604850000424D36040000000000003600000028 - 0000000210000000830100200000000000000400000700000000830000000100 - 0000030000000104000000008300000001000000040000000105000000008500 - 00000300000011040315480000000F0000000202000000008500000003000000 - 1303031350000000190000000503000000008600000003000000140C0B41AA14 - 136EFD06062478000000110200000002C600000014050522820E0D64FD080738 - B6000000210000000500000000000000010000000D0C0C42A6151573FF071EC9 - FF14136EFD0606247800000013000000140505237E0F0F67FD061BC7FF0E0D65 - FF080738B60000001800000001000000020504173F181675FA0B28CEFF0625DC - FF071EC9FF121479FD0606247E06062480101174FD061BC7FF041DD8FF061BC5 - FF0E0D63FC0302134F0000000400000001000000080808286B181774FB0A28CE - FF0525DCFF071ECAFF121479FE121378FE061BC7FF041DD8FF061BC6FF100E66 - FC0504227F00000012000000010000000000000001000000090808276A171A7E - FB0A28CEFF0625DCFF061ECBFF061CCAFF041DD8FF061BC6FF101171FB050523 - 7C000000120000000203000000008C000000010000000A0908286D171A7FFC09 - 29CFFF0627DDFF0420DAFF061CC9FF121376FD0605247E000000120000000204 - 000000008C00000001000000080908286A181B82FE0C2ED4FF072CE0FF0625DC - FF071ECCFF121479FE0606247A000000110000000203000000008E0000000100 - 00000609092A631A1E86FD0E3CDAFF0B39E7FF6379E3FF6175E0FF0625DCFF07 - 1ECAFF121478FD060524740000000F000000020200000000AF000000030A0A2B - 5E1D1C7EFC1348DFFF0F49EFFF6580E7FF181B80FC161A7FFC6175DFFF0625DC - FF071ECAFF14136FFD060624730000000C0000000100000000050413281E1E83 - FC4E7BEBFF1356F4FF6789EAFF191D84FA090828680808276A17197EFA6275DF - FF0625DCFF071EC9FF14136EFD030210370000000200000000000000020E0D3A - 751F1E85FF88A7F1FF1B2087FA09092A6100000007000000080808286717197E - FA6175DFFF161573FF090832870000000C00000001020000000085000000030E - 0D3A751C238CFA0A092B5D00000005020000000186000000070808286517197E - FA0A0933820000000D0000000204000000008300000002040413270000000303 - 000000008500000001000000050404112E00000008000000010D000000008100 - 0000010400000000} - end> - end - object ilMainDisabled: TcxImageList - CompressData = True - FormatVersion = 1 - DesignInfo = 13631672 - ImageInfo = < - item - Image.Data = { - 920200005844424D020004023604850000424D36040000000000003600000028 - 0000000210000000830100200000000000000400001900000000860000000400 - 0000120000001D0000001F00000015000000050A00000000860000000F2E703C - FF00550FFF00520FFF2A6739FF000000150A00000000860000001601590FFF3E - 9D53FF04811DFF00520FFF0000001F0A000000008600000015015C10FF57BC71 - FF069727FF00540FFF0000001F06000000008A00000002000000080000000E00 - 00001100000022005F10FF59BF76FF089C2EFF00570FFF00000033020000001F - 82000000150000000502000000008E00000006378947FF016A10FF006810FF00 - 6510FF01620FFF0DA73DFF0BA235FF005910FF005710FF005410FF00520FFF2A - 6739FF0000001502000000008E00000008017010FF47B86EFF2AC367FF14B952 - FF12B34BFF0FAD43FF0DA83DFF0BA135FF099C2EFF069727FF04811DFF00520F - FF0000001F02000000008E00000006007210FF4ABE74FF63D692FF61D38EFF60 - D08AFF5ECB84FF0FAD43FF0DA73CFF59BF76FF58BC71FF409F55FF01540FFF00 - 00001D02000000008E00000003358F45FF017211FF017011FF016D10FF016A10 - FF60CF8AFF12B34BFF006210FF015F10FF005B10FF015910FF296D39FF000000 - 1202000000008E0000000100000003000000060000000800000011016E10FF62 - D38EFF14B852FF006410FF000000220000001500000016000000100000000406 - 000000008600000008017011FF63D692FF29C367FF006810FF000000110A0000 - 00008600000006017211FF4ABF74FF4ABB70FF006B10FF0000000E0A00000000 - 8600000003358F45FF017311FF007010FF328642FF000000090A000000008600 - 00000100000003000000060000000800000006000000021500000000} - end - item - Image.Data = { - 9E0300005844424D020004023604850000424D36040000000000003600000028 - 0000000210000000830100200000000000000400000700000000830000000100 - 0000030000000104000000008300000001000000040000000105000000008500 - 00000300000011040315480000000F0000000202000000008500000003000000 - 1303031350000000190000000503000000008600000003000000140C0B41AA14 - 136EFD06062478000000110200000002C600000014050522820E0D64FD080738 - B6000000210000000500000000000000010000000D0C0C42A6151573FF071EC9 - FF14136EFD0606247800000013000000140505237E0F0F67FD061BC7FF0E0D65 - FF080738B60000001800000001000000020504173F181675FA0B28CEFF0625DC - FF071EC9FF121479FD0606247E06062480101174FD061BC7FF041DD8FF061BC5 - FF0E0D63FC0302134F0000000400000001000000080808286B181774FB0A28CE - FF0525DCFF071ECAFF121479FE121378FE061BC7FF041DD8FF061BC6FF100E66 - FC0504227F00000012000000010000000000000001000000090808276A171A7E - FB0A28CEFF0625DCFF061ECBFF061CCAFF041DD8FF061BC6FF101171FB050523 - 7C000000120000000203000000008C000000010000000A0908286D171A7FFC09 - 29CFFF0627DDFF0420DAFF061CC9FF121376FD0605247E000000120000000204 - 000000008C00000001000000080908286A181B82FE0C2ED4FF072CE0FF0625DC - FF071ECCFF121479FE0606247A000000110000000203000000008E0000000100 - 00000609092A631A1E86FD0E3CDAFF0B39E7FF6379E3FF6175E0FF0625DCFF07 - 1ECAFF121478FD060524740000000F000000020200000000AF000000030A0A2B - 5E1D1C7EFC1348DFFF0F49EFFF6580E7FF181B80FC161A7FFC6175DFFF0625DC - FF071ECAFF14136FFD060624730000000C0000000100000000050413281E1E83 - FC4E7BEBFF1356F4FF6789EAFF191D84FA090828680808276A17197EFA6275DF - FF0625DCFF071EC9FF14136EFD030210370000000200000000000000020E0D3A - 751F1E85FF88A7F1FF1B2087FA09092A6100000007000000080808286717197E - FA6175DFFF161573FF090832870000000C00000001020000000085000000030E - 0D3A751C238CFA0A092B5D00000005020000000186000000070808286517197E - FA0A0933820000000D0000000204000000008300000002040413270000000303 - 000000008500000001000000050404112E00000008000000010D000000008100 - 0000010400000000} - end> - end - object dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList - object dxLayoutWebLookAndFeel2: TdxLayoutWebLookAndFeel - GroupOptions.Color = clInfoBk - ItemOptions.CaptionOptions.TextColor = clInfoText - end - end -end diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutLookAndFeelListDesignForm.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutLookAndFeelListDesignForm.pas deleted file mode 100644 index 70564089..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutLookAndFeelListDesignForm.pas +++ /dev/null @@ -1,433 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl Look & Feel design-time form } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutLookAndFeelListDesignForm; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, ImgList, ActnList, -{$IFDEF DELPHI6} - Variants, DesignIntf, -{$ELSE} - DsgnIntf, -{$ENDIF} - cxControls, dxLayoutControl, dxLayoutLookAndFeels, cxDesignWindows, cxGraphics, - Menus, dxLayoutControlAdapters, cxMemo, cxCheckBox, cxContainer, cxEdit, - cxTextEdit, cxLookAndFeelPainters, cxButtons, cxRichEdit, - dxLayoutcxEditAdapters; - -type - - TdxLayoutLookAndFeelListDesignForm = class(TcxDesignFormEditor, IdxLayoutLookAndFeelsDesigner) - lcMain: TdxLayoutControl; - lbItems: TListBox; - lcMainItem1: TdxLayoutItem; - lcMainGroup3: TdxLayoutGroup; - lflMain: TdxLayoutLookAndFeelList; - lcPreview: TdxLayoutControl; - dxLayoutGroup1: TdxLayoutGroup; - dxLayoutControl1Group2: TdxLayoutGroup; - dxLayoutControl1Group3: TdxLayoutGroup; - alMain: TActionList; - acAdd: TAction; - acDelete: TAction; - acClose: TAction; - lcMainItem5: TdxLayoutItem; - tlbGroups: TToolBar; - tbAddItem: TToolButton; - tbDelete: TToolButton; - PopupMenu1: TPopupMenu; - ilMain: TcxImageList; - ilMainDisabled: TcxImageList; - cxTextEdit1: TcxTextEdit; - lcPreviewItem1: TdxLayoutItem; - cxMemo1: TcxMemo; - lcPreviewItem5: TdxLayoutItem; - cxCheckBox3: TcxCheckBox; - lcPreviewItem2: TdxLayoutItem; - cxTextEdit2: TcxTextEdit; - lcPreviewItem8: TdxLayoutItem; - cxRichEdit1: TcxRichEdit; - lcPreviewItem3: TdxLayoutItem; - cxButton1: TcxButton; - lcPreviewItem4: TdxLayoutItem; - cxButton2: TcxButton; - lcPreviewItem6: TdxLayoutItem; - lcPreviewGroup1: TdxLayoutGroup; - cxButton3: TcxButton; - lcPreviewItem9: TdxLayoutItem; - lcPreviewGroup2: TdxLayoutGroup; - liWarning: TdxLayoutItem; - dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList; - dxLayoutWebLookAndFeel2: TdxLayoutWebLookAndFeel; - lcPreviewGroup4: TdxLayoutGroup; - lcMainItem2: TdxLayoutItem; - cxCheckBox1: TcxCheckBox; - lcPreviewItem10: TdxLayoutItem; - procedure btnAddClick(Sender: TObject); - procedure lbItemsClick(Sender: TObject); - procedure acDeleteExecute(Sender: TObject); - procedure lbItemsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure FormCreate(Sender: TObject); - private - function CanModify: Boolean; - function GetListBoxItemHeight: Integer; - function GetList: TdxLayoutLookAndFeelList; - procedure SynchronizeListBoxSelection; - protected - procedure SetComponent(AValue: TComponent); override; - procedure UpdateCaption; override; - procedure UpdateContent; override; - - procedure DeleteItems; - function NeedRefreshItemsAfterDeleting(AComponent: TPersistent): Boolean; - procedure Refresh(ARefreshSelection: Boolean = False); - procedure RefreshEnableds; - procedure RefreshListBox; - procedure SetAddItemsActionEnabled(AEnabled: Boolean); - procedure SetDeleteItemsActionEnabled(AEnabled: Boolean); - procedure SynchronizeControlsSelection(AList: TList); - procedure SynchronizeSelection(AList: TList); - //IdxLayoutLookAndFeelsDesigner - procedure ComponentNameChanged(ALookAndFeelList: TdxLayoutLookAndFeelList); - procedure ItemsChanged(ALookAndFeelList: TdxLayoutLookAndFeelList); - procedure SetList(ALookAndFeelList: TdxLayoutLookAndFeelList); - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - procedure AfterConstruction; override; - procedure ItemDeleted(const ADesigner: IDesigner; AItem: TPersistent); override; - procedure SelectionsChanged(const ASelection: TDesignerSelectionList); override; - - property List: TdxLayoutLookAndFeelList read GetList; - end; - -implementation - -{$R *.dfm} - -uses - Math, cxClasses, dxCore; - -{ TdxLayoutLookAndFeelListDesignForm } - -constructor TdxLayoutLookAndFeelListDesignForm.Create(AOwner: TComponent); - - procedure PopulatePopupMenuItems; - var - I: Integer; - AItem: TMenuItem; - begin - for I := 0 to dxLayoutLookAndFeelDefs.Count - 1 do - begin - AItem := TMenuItem.Create(PopupMenu1); - AItem.Caption := dxLayoutLookAndFeelDefs[I].Description; - AItem.Tag := I; - AItem.OnClick := btnAddClick; - PopupMenu1.Items.Add(AItem); - end; - end; - -begin - inherited; - dxLayoutLookAndFeelsDesigner := Self; -{$IFDEF DELPHI9} - PopupMode := pmExplicit; -{$ENDIF} - - if not IsXPManifestEnabled then - begin - cxTransformImages(ilMain, clBtnFace); - tlbGroups.DisabledImages := ilMainDisabled; - cxTransformImages(ilMainDisabled, clBtnFace, False); - end; - - PopulatePopupMenuItems; -end; - -destructor TdxLayoutLookAndFeelListDesignForm.Destroy; -begin - dxLayoutLookAndFeelsDesigner := nil; - inherited; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.AfterConstruction; -begin - inherited; - lbItems.ItemHeight := GetListBoxItemHeight; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.ItemDeleted(const ADesigner: IDesigner; AItem: TPersistent); -begin - if (LockCount = 0) and (AItem <> Component) and not Closing and - NeedRefreshItemsAfterDeleting(AItem) then - Refresh(True); -end; - -procedure TdxLayoutLookAndFeelListDesignForm.SelectionsChanged(const ASelection: TDesignerSelectionList); -var - AList: TList; -begin - inherited; - if Component = nil then - Exit; - AList := TList.Create; - try - GetSelectionList(AList); - SynchronizeSelection(AList); - finally - AList.Free; - end; -end; - -function TdxLayoutLookAndFeelListDesignForm.CanModify: Boolean; -begin - Result := not Designer.IsSourceReadOnly and (List <> nil) and - not (csDestroying in List.ComponentState) and - not (csInline in List.Owner.ComponentState); -end; - -function TdxLayoutLookAndFeelListDesignForm.GetListBoxItemHeight: Integer; -begin - Result := 2 + lbItems.Canvas.TextHeight('Qq') + 2; -end; - -function TdxLayoutLookAndFeelListDesignForm.GetList: TdxLayoutLookAndFeelList; -begin - Result := TdxLayoutLookAndFeelList(Component); -end; - -procedure TdxLayoutLookAndFeelListDesignForm.SynchronizeListBoxSelection; -var - AList: TList; -begin - if LockCount > 0 then - Exit; - AList := TList.Create; - try - ListBoxGetSelection(lbItems, AList); - SynchronizeSelection(AList); - finally - AList.Free; - end; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.DeleteItems; - - procedure InternalDeleteItems; - var - AList: TcxObjectList; - begin - AList := TcxObjectList.Create; - try - GetSelectionList(AList); - if AList.Count > 0 then - begin - BeginUpdate; - try - AList.Clear; - UpdateContent; - finally - EndUpdate; - end; - Designer.Modified; - end; - finally - AList.Free; - end; - end; - -var - AIndex: Integer; -begin - AIndex := lbItems.ItemIndex; - InternalDeleteItems; - RefreshListBox; - if lbItems.Count > 0 then - begin - AIndex := Min(AIndex, lbItems.Count - 1); - lbItems.ItemIndex := AIndex; - lbItems.Selected[AIndex] := True; - end; - SynchronizeListBoxSelection; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.SetComponent(AValue: TComponent); -begin - if Component <> nil then - Component.RemoveFreeNotification(Self); - inherited; - if Component <> nil then - Component.FreeNotification(Self); - UpdateCaption; - Refresh(True); -end; - -procedure TdxLayoutLookAndFeelListDesignForm.UpdateCaption; -begin - Caption := cxGetFullComponentName(Component) + ' - Designer'; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.UpdateContent; -begin - inherited; - Refresh(True); -end; - -function TdxLayoutLookAndFeelListDesignForm.NeedRefreshItemsAfterDeleting(AComponent: TPersistent): Boolean; -begin - Result := (AComponent is TdxCustomLayoutLookAndFeel) and - (TdxCustomLayoutLookAndFeel(AComponent).List = List); -end; - -procedure TdxLayoutLookAndFeelListDesignForm.Refresh(ARefreshSelection: Boolean = False); -begin - if (LockCount > 0) or (Component = nil) then - Exit; - RefreshListBox; - if ARefreshSelection then - UpdateSelection; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.RefreshEnableds; -var - ACanModify: Boolean; -begin - ACanModify := CanModify; - SetAddItemsActionEnabled(ACanModify); - SetDeleteItemsActionEnabled(ACanModify and (lbItems.SelCount > 0)); -end; - -procedure TdxLayoutLookAndFeelListDesignForm.RefreshListBox; -var - I: Integer; - AItem: TdxCustomLayoutLookAndFeel; -begin - with lbItems.Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to List.Count - 1 do - begin - AItem := List[I]; - AddObject(AItem.Name, AItem); - end; - finally - EndUpdate; - end; - end; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.SetAddItemsActionEnabled(AEnabled: Boolean); -begin - acAdd.Enabled := AEnabled; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.SetDeleteItemsActionEnabled(AEnabled: Boolean); -begin - acDelete.Enabled := AEnabled; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.SynchronizeControlsSelection(AList: TList); -begin - ListBoxSyncSelection(lbItems, AList); -end; - -procedure TdxLayoutLookAndFeelListDesignForm.SynchronizeSelection(AList: TList); -begin - SelectComponents(AList, nil); - SynchronizeControlsSelection(AList); - RefreshEnableds; - lcPreview.Visible := (AList.Count = 1) and (TPersistent(AList[0]) is TdxCustomLayoutLookAndFeel); - if lcPreview.Visible then - lcPreview.LookAndFeel := TdxCustomLayoutLookAndFeel(AList[0]); -end; - -procedure TdxLayoutLookAndFeelListDesignForm.ComponentNameChanged(ALookAndFeelList: TdxLayoutLookAndFeelList); -begin - if ALookAndFeelList = List then - UpdateCaption; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.ItemsChanged(ALookAndFeelList: TdxLayoutLookAndFeelList); -begin - if ALookAndFeelList = List then - UpdateContent; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.SetList(ALookAndFeelList: TdxLayoutLookAndFeelList); -begin - Component := ALookAndFeelList; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.btnAddClick(Sender: TObject); -var - ALookAndFeel: TdxCustomLayoutLookAndFeel; -begin - ALookAndFeel := List.CreateItem(dxLayoutLookAndFeelDefs.Items[(Sender as TComponent).Tag]); - Designer.SelectComponent(ALookAndFeel); -end; - -procedure TdxLayoutLookAndFeelListDesignForm.lbItemsClick(Sender: TObject); -begin - SynchronizeListBoxSelection; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.acDeleteExecute(Sender: TObject); -begin - DeleteItems; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.lbItemsKeyDown( - Sender: TObject; var Key: Word; Shift: TShiftState); -begin - if (Key = VK_DELETE) and (lbItems.SelCount > 0) then - DeleteItems; -end; - -procedure TdxLayoutLookAndFeelListDesignForm.FormCreate(Sender: TObject); -begin - liWarning.CaptionOptions.Width := Round(liWarning.CaptionOptions.Width * Screen.PixelsPerInch / 96); -end; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutLookAndFeels.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutLookAndFeels.pas deleted file mode 100644 index 44bfdabe..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutLookAndFeels.pas +++ /dev/null @@ -1,2004 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl Look & Feel components } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutLookAndFeels; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, Controls, Graphics, cxGraphics, dxLayoutCommon, - cxLookAndFeels, cxLookAndFeelPainters; - -type - TdxCustomLayoutLookAndFeelOptions = class; - TdxCustomLayoutLookAndFeel = class; - TdxLayoutWebLookAndFeelGroupOptions = class; - TdxLayoutLookAndFeelList = class; - - // custom - - IdxLayoutLookAndFeelUser = interface - ['{651F19FE-CBCB-4C16-8615-BBD57ED7255A}'] - procedure BeginLookAndFeelDestroying; stdcall; - procedure EndLookAndFeelDestroying; stdcall; - procedure LookAndFeelChanged; stdcall; - procedure LookAndFeelDestroyed; stdcall; - end; - - TdxCustomLayoutLookAndFeelPart = class(TPersistent) - private - FLookAndFeel: TdxCustomLayoutLookAndFeel; - protected - procedure Changed; virtual; - property LookAndFeel: TdxCustomLayoutLookAndFeel read FLookAndFeel; - public - constructor Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); virtual; - end; - - TdxLayoutHotTrackStyle = (htsHandPoint, htsUnderlineCold, htsUnderlineHot); - TdxLayoutHotTrackStyles = set of TdxLayoutHotTrackStyle; - - TdxLayoutLookAndFeelCaptionOptionsClass = class of TdxLayoutLookAndFeelCaptionOptions; - - TdxLayoutLookAndFeelCaptionOptions = class(TPersistent) - private - FFont: TFont; - FHotTrack: Boolean; - FHotTrackStyles: TdxLayoutHotTrackStyles; - FOptions: TdxCustomLayoutLookAndFeelOptions; - FTextColor: TColor; - FTextHotColor: TColor; - FUseDefaultFont: Boolean; - - procedure SetFont(Value: TFont); - procedure SetHotTrack(Value: Boolean); - procedure SetHotTrackStyles(Value: TdxLayoutHotTrackStyles); - procedure SetTextColor(Value: TColor); - procedure SetTextHotColor(Value: TColor); - procedure SetUseDefaultFont(Value: Boolean); - - procedure FontChanged(Sender: TObject); - function IsFontStored: Boolean; - protected - procedure Changed; virtual; - // colors - function GetDefaultTextColor: TColor; virtual; abstract; - function GetDefaultTextHotColor: TColor; virtual; - // font - function GetDefaultFont(AControl: TControl): TFont; virtual; - - property Options: TdxCustomLayoutLookAndFeelOptions read FOptions; - public - constructor Create(AOptions: TdxCustomLayoutLookAndFeelOptions); virtual; - destructor Destroy; override; - // colors - function GetTextColor: TColor; virtual; - function GetTextHotColor: TColor; virtual; - // font - function GetFont(AControl: TControl): TFont; virtual; - published - property Font: TFont read FFont write SetFont stored IsFontStored; - property HotTrack: Boolean read FHotTrack write SetHotTrack default False; - property HotTrackStyles: TdxLayoutHotTrackStyles read FHotTrackStyles - write SetHotTrackStyles default [htsHandPoint, htsUnderlineHot]; - property TextColor: TColor read FTextColor write SetTextColor default clDefault; - property TextHotColor: TColor read FTextHotColor write SetTextHotColor - default clDefault; - property UseDefaultFont: Boolean read FUseDefaultFont write SetUseDefaultFont - default True; - end; - - TdxCustomLayoutLookAndFeelOptions = class(TdxCustomLayoutLookAndFeelPart) - private - FCaptionOptions: TdxLayoutLookAndFeelCaptionOptions; - protected - function GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; virtual; - public - constructor Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); override; - destructor Destroy; override; - published - property CaptionOptions: TdxLayoutLookAndFeelCaptionOptions read FCaptionOptions - write FCaptionOptions; - end; - - TdxLayoutLookAndFeelGroupOptionsClass = class of TdxLayoutLookAndFeelGroupOptions; - - TdxLayoutLookAndFeelGroupOptions = class(TdxCustomLayoutLookAndFeelOptions) - private - FColor: TColor; - procedure SetColor(Value: TColor); - protected - // colors - function GetDefaultColor: TColor; virtual; abstract; - public - constructor Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); override; - // colors - function GetColor: TColor; virtual; - published - property Color: TColor read FColor write SetColor default clDefault; - end; - - TdxLayoutBorderStyle = (lbsNone, lbsSingle, lbsFlat, lbsStandard); - - TdxLayoutLookAndFeelItemOptionsClass = class of TdxLayoutLookAndFeelItemOptions; - - TdxLayoutLookAndFeelItemOptions = class(TdxCustomLayoutLookAndFeelOptions) - private - FControlBorderColor: TColor; - FControlBorderStyle: TdxLayoutBorderStyle; - procedure SetControlBorderColor(Value: TColor); - procedure SetControlBorderStyle(Value: TdxLayoutBorderStyle); - protected - // colors - function GetDefaultControlBorderColor: TColor; virtual; - public - constructor Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); override; - // colors - function GetControlBorderColor: TColor; virtual; - published - property ControlBorderColor: TColor read FControlBorderColor - write SetControlBorderColor default clDefault; - property ControlBorderStyle: TdxLayoutBorderStyle read FControlBorderStyle - write SetControlBorderStyle default lbsStandard; - end; - - TdxLayoutLookAndFeelOffsetsClass = class of TdxLayoutLookAndFeelOffsets; - - TdxLayoutLookAndFeelOffsets = class(TdxCustomLayoutLookAndFeelPart) - private - FControlOffsetHorz: Integer; - FControlOffsetVert: Integer; - FItemOffset: Integer; - FItemsAreaOffsetHorz: Integer; - FItemsAreaOffsetVert: Integer; - FRootItemsAreaOffsetHorz: Integer; - FRootItemsAreaOffsetVert: Integer; - protected - function GetDefaultValue(Index: Integer): Integer; virtual; - function GetValue(Index: Integer): Integer; virtual; - function IsValueStored(Index: Integer): Boolean; - procedure SetValue(Index: Integer; Value: Integer); virtual; - public - constructor Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); override; - published - property ControlOffsetHorz: Integer index 0 read GetValue write SetValue stored IsValueStored; - property ControlOffsetVert: Integer index 1 read GetValue write SetValue stored IsValueStored; - property ItemOffset: Integer index 2 read GetValue write SetValue stored IsValueStored; - property ItemsAreaOffsetHorz: Integer index 3 read GetValue write SetValue stored IsValueStored; - property ItemsAreaOffsetVert: Integer index 4 read GetValue write SetValue stored IsValueStored; - property RootItemsAreaOffsetHorz: Integer index 5 read GetValue write SetValue stored IsValueStored; - property RootItemsAreaOffsetVert: Integer index 6 read GetValue write SetValue stored IsValueStored; - end; - - TdxCustomLayoutLookAndFeelClass = class of TdxCustomLayoutLookAndFeel; - - TdxCustomLayoutLookAndFeel = class(TComponent) - private - FGroupOptions: TdxLayoutLookAndFeelGroupOptions; - FItemOptions: TdxLayoutLookAndFeelItemOptions; - FList: TdxLayoutLookAndFeelList; - FNotifyingAboutDestroying: Boolean; - FOffsets: TdxLayoutLookAndFeelOffsets; - FUsers: TList; - - function GetIsDesigning: Boolean; - function GetUser(Index: Integer): IdxLayoutLookAndFeelUser; - function GetUserCount: Integer; - protected - procedure SetName(const Value: TComponentName); override; - procedure SetParentComponent(Value: TComponent); override; - - procedure Changed; - class function GetBaseName: string; virtual; - procedure GetTextMetric(AFont: TFont; var ATextMetric: TTextMetric); - function GetGroupCaptionFont(AControl: TControl): TFont; - function GetItemCaptionFont(AControl: TControl): TFont; - procedure NotifyUsersAboutDestroying; - - // Conditions - function ForceControlArrangement: Boolean; virtual; - function DoesCxLookAndFeelHavePriority: Boolean; virtual; - - // options classes - function GetGroupOptionsClass: TdxLayoutLookAndFeelGroupOptionsClass; virtual; - function GetItemOptionsClass: TdxLayoutLookAndFeelItemOptionsClass; virtual; - function GetOffsetsClass: TdxLayoutLookAndFeelOffsetsClass; virtual; - - // dimensions - function GetItemControlBorderWidth(ASide: TdxLayoutSide): Integer; virtual; - - // internal name - function GetInternalName: string; virtual; - procedure SetInternalName(const Value: string); virtual; - - property IsDesigning: Boolean read GetIsDesigning; - property UserCount: Integer read GetUserCount; - property Users[Index: Integer]: IdxLayoutLookAndFeelUser read GetUser; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - - function NeedDoubleBuffered: Boolean; virtual; - function NeedRedrawOnResize: Boolean; virtual; - procedure InitializeSubControlCxLookAndFeel(AcxLookAndFeel: TcxLookAndFeel); virtual; - - procedure AddUser(AUser: TComponent); - procedure RemoveUser(AUser: TComponent); - - class function Description: string; virtual; - function DLUToPixels(AFont: TFont; ADLU: Integer): Integer; - function HDLUToPixels(AFont: TFont; ADLU: Integer): Integer; - function VDLUToPixels(AFont: TFont; ADLU: Integer): Integer; - - // painter classes - function GetGroupPainterClass: TClass{TdxLayoutGroupPainterClass}; virtual; abstract; - function GetItemPainterClass: TClass{TdxLayoutItemPainterClass}; virtual; - - // viewinfo classes - function GetGroupViewInfoClass: TClass{TdxLayoutGroupViewInfoClass}; virtual; - function GetItemViewInfoClass: TClass{TdxLayoutItemViewInfoClass}; virtual; - - // dimensions - function GetControlOffsetHorz(AControl: TControl): Integer; virtual; - function GetControlOffsetVert(AControl: TControl): Integer; virtual; - function GetGroupBorderWidth(AControl: TControl; ASide: TdxLayoutSide; - AHasCaption: Boolean): Integer; virtual; - function GetItemOffset(AControl: TControl): Integer; virtual; - function GetItemsAreaOffset(AControl: TControl): Integer; - function GetItemsAreaOffsetHorz(AControl: TControl): Integer; virtual; - function GetItemsAreaOffsetVert(AControl: TControl): Integer; virtual; - function GetRootItemsAreaOffsetHorz(AControl: TControl): Integer; virtual; - function GetRootItemsAreaOffsetVert(AControl: TControl): Integer; virtual; - - // drawing routines - procedure DrawLayoutControlBackground(ACanvas: TcxCanvas; const R: TRect); virtual; - procedure DrawItemControlBorder(ACanvas: TcxCanvas; AItemOptions: TdxLayoutLookAndFeelItemOptions; R: TRect); virtual; - // colors - function GetEmptyAreaColor: TColor; virtual; - - property ItemControlBorderWidths[ASide: TdxLayoutSide]: Integer read GetItemControlBorderWidth; - property InternalName: string read GetInternalName write SetInternalName; - property List: TdxLayoutLookAndFeelList read FList; - published - property GroupOptions: TdxLayoutLookAndFeelGroupOptions read FGroupOptions - write FGroupOptions; - property ItemOptions: TdxLayoutLookAndFeelItemOptions read FItemOptions - write FItemOptions; - property Offsets: TdxLayoutLookAndFeelOffsets read FOffsets write FOffsets; - end; - - // standard - - TdxLayoutStandardLookAndFeelGroupCaptionOptions = class(TdxLayoutLookAndFeelCaptionOptions) - protected - function GetDefaultTextColor: TColor; override; - end; - - TdxLayoutStandardLookAndFeelGroupOptions = class(TdxLayoutLookAndFeelGroupOptions) - protected - function GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; override; - function GetDefaultColor: TColor; override; - end; - - TdxLayoutStandardLookAndFeelItemCaptionOptions = class(TdxLayoutLookAndFeelCaptionOptions) - protected - function GetDefaultTextColor: TColor; override; - end; - - TdxLayoutStandardLookAndFeelItemOptions = class(TdxLayoutLookAndFeelItemOptions) - protected - function GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; override; - end; - - TdxLayoutStandardLookAndFeel = class(TdxCustomLayoutLookAndFeel) - protected - function GetGroupOptionsClass: TdxLayoutLookAndFeelGroupOptionsClass; override; - function GetItemOptionsClass: TdxLayoutLookAndFeelItemOptionsClass; override; - function GetFrameWidth(ASide: TdxLayoutSide): Integer; virtual; - public - class function Description: string; override; - procedure InitializeSubControlCxLookAndFeel(AcxLookAndFeel: TcxLookAndFeel); override; - - function GetGroupPainterClass: TClass{TdxLayoutGroupPainterClass}; override; - function GetGroupViewInfoClass: TClass{TdxLayoutGroupViewInfoClass}; override; - - function GetGroupBorderWidth(AControl: TControl; ASide: TdxLayoutSide; - AHasCaption: Boolean): Integer; override; - - property FrameWidths[ASide: TdxLayoutSide]: Integer read GetFrameWidth; - end; - - // office - - TdxLayoutOfficeLookAndFeel = class(TdxLayoutStandardLookAndFeel) - protected - function GetFrameWidth(ASide: TdxLayoutSide): Integer; override; - public - class function Description: string; override; - procedure InitializeSubControlCxLookAndFeel(AcxLookAndFeel: TcxLookAndFeel); override; - - function GetGroupPainterClass: TClass{TdxLayoutGroupPainterClass}; override; - function GetGroupViewInfoClass: TClass{TdxLayoutGroupViewInfoClass}; override; - - function GetGroupBorderWidth(AControl: TControl; ASide: TdxLayoutSide; - AHasCaption: Boolean): Integer; override; - end; - - // web - - TdxLayoutWebLookAndFeelGroupCaptionOptions = class(TdxLayoutLookAndFeelCaptionOptions) - private - FColor: TColor; - FSeparatorWidth: Integer; - function GetOptions: TdxLayoutWebLookAndFeelGroupOptions; - procedure SetColor(Value: TColor); - procedure SetSeparatorWidth(Value: Integer); - protected - // colors - function GetDefaultColor: TColor; virtual; - function GetDefaultTextColor: TColor; override; - // font - function GetDefaultFont(AControl: TControl): TFont; override; - - property Options: TdxLayoutWebLookAndFeelGroupOptions read GetOptions; - public - constructor Create(AOptions: TdxCustomLayoutLookAndFeelOptions); override; - // colors - function GetColor: TColor; virtual; - published - property Color: TColor read FColor write SetColor default clDefault; - property SeparatorWidth: Integer read FSeparatorWidth write SetSeparatorWidth - default 0; - end; - - TdxLayoutWebLookAndFeelGroupOptions = class(TdxLayoutLookAndFeelGroupOptions) - private - FFrameColor: TColor; - FFrameWidth: Integer; - FOffsetCaption: Boolean; - FOffsetItems: Boolean; - - function GetCaptionOptions: TdxLayoutWebLookAndFeelGroupCaptionOptions; - procedure SetCaptionOptions(Value: TdxLayoutWebLookAndFeelGroupCaptionOptions); - procedure SetFrameColor(Value: TColor); - procedure SetFrameWidth(Value: Integer); - procedure SetOffsetCaption(Value: Boolean); - procedure SetOffsetItems(Value: Boolean); - protected - function GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; override; - // colors - function GetDefaultColor: TColor; override; - function GetDefaultFrameColor: TColor; virtual; - public - constructor Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); override; - // colors - function GetFrameColor: TColor; virtual; - - function HasCaptionSeparator(AHasCaption: Boolean): Boolean; - published - property CaptionOptions: TdxLayoutWebLookAndFeelGroupCaptionOptions - read GetCaptionOptions write SetCaptionOptions; - property FrameColor: TColor read FFrameColor write SetFrameColor - default clDefault; - property FrameWidth: Integer read FFrameWidth write SetFrameWidth default 1; - property OffsetCaption: Boolean read FOffsetCaption write SetOffsetCaption - default True; - property OffsetItems: Boolean read FOffsetItems write SetOffsetItems - default True; - end; - - TdxLayoutWebLookAndFeelItemCaptionOptions = class(TdxLayoutLookAndFeelCaptionOptions) - protected - function GetDefaultTextColor: TColor; override; - end; - - TdxLayoutWebLookAndFeelItemOptions = class(TdxLayoutLookAndFeelItemOptions) - protected - function GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; override; - public - constructor Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); override; - published - property ControlBorderStyle default lbsSingle; - end; - - TdxLayoutWebLookAndFeel = class(TdxCustomLayoutLookAndFeel) - private - function GetGroupOptions: TdxLayoutWebLookAndFeelGroupOptions; - procedure SetGroupOptions(Value: TdxLayoutWebLookAndFeelGroupOptions); - protected - function GetGroupOptionsClass: TdxLayoutLookAndFeelGroupOptionsClass; override; - function GetItemOptionsClass: TdxLayoutLookAndFeelItemOptionsClass; override; - public - class function Description: string; override; - procedure InitializeSubControlCxLookAndFeel(AcxLookAndFeel: TcxLookAndFeel); override; - - function GetGroupPainterClass: TClass{TdxLayoutGroupPainterClass}; override; - function GetGroupViewInfoClass: TClass{TdxLayoutGroupViewInfoClass}; override; - - function GetGroupBorderWidth(AControl: TControl; ASide: TdxLayoutSide; - AHasCaption: Boolean): Integer; override; - published - property GroupOptions: TdxLayoutWebLookAndFeelGroupOptions read GetGroupOptions - write SetGroupOptions; - end; - - // CX style - { TdxLayoutCxLookAndFeel } //todo: rename? - - TdxLayoutCxLookAndFeel = class(TdxLayoutStandardLookAndFeel, IdxSkinSupport) - private - FLookAndFeel: TcxLookAndFeel; - function GetIsSkinPainterUsed: Boolean; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - procedure SetLookAndFeel(AValue: TcxLookAndFeel); - protected - function DoesCxLookAndFeelHavePriority: Boolean; override; - function GetGroupOptionsClass: TdxLayoutLookAndFeelGroupOptionsClass; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - class function Description: string; override; - procedure InitializeSubControlCxLookAndFeel(AcxLookAndFeel: TcxLookAndFeel); override; - function NeedRedrawOnResize: Boolean; override; - - // dimensions - function GetGroupBorderWidth(AControl: TControl; ASide: TdxLayoutSide; - AHasCaption: Boolean): Integer; override; - function GetItemControlBorderWidth(ASide: TdxLayoutSide): Integer; override; - - // drawing routines - procedure DrawLayoutControlBackground(ACanvas: TcxCanvas; const R: TRect); override; - procedure DrawItemControlBorder(ACanvas: TcxCanvas; AItemOptions: TdxLayoutLookAndFeelItemOptions; R: TRect); override; - function GetEmptyAreaColor: TColor; override; - - function GetGroupPainterClass: TClass {TdxLayoutGroupPainterClass}; override; - function GetGroupViewInfoClass: TClass {TdxLayoutGroupViewInfoClass}; override; - function GetItemViewInfoClass: TClass {TdxLayoutItemViewInfoClass}; override; - // - property IsSkinPainterUsed: Boolean read GetIsSkinPainterUsed; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - published - property LookAndFeel: TcxLookAndFeel read FLookAndFeel write SetLookAndFeel; - end; - - { TdxLayoutSkinLookAndFeel } - - TdxLayoutSkinLookAndFeel = class(TdxLayoutCxLookAndFeel) - protected - procedure DefineProperties(Filer: TFiler); override; - procedure ReadSkinName(Reader: TReader); - procedure ReadSkinNameAssigned(Reader: TReader); - public - class function Description: string; override; - end; - - { TdxLayoutCxLookAndFeelGroupOptions } - - TdxLayoutCxLookAndFeelGroupOptions = class(TdxLayoutStandardLookAndFeelGroupOptions) - protected - function GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; override; - end; - - { TdxLayoutCxLookAndFeelGroupCaptionOptions } - - TdxLayoutCxLookAndFeelGroupCaptionOptions = class(TdxLayoutStandardLookAndFeelGroupCaptionOptions) - private - function GetLookAndFeel: TdxLayoutCxLookAndFeel; - protected - function GetDefaultTextColor: TColor; override; - // - property LookAndFeel: TdxLayoutCxLookAndFeel read GetLookAndFeel; - end; - - // list and definitions - - TdxLayoutLookAndFeelList = class(TComponent) - private - FItems: TList; - function GetCount: Integer; - function GetIsDesigning: Boolean; - function GetItem(Index: Integer): TdxCustomLayoutLookAndFeel; - - procedure AddItem(AItem: TdxCustomLayoutLookAndFeel); - procedure RemoveItem(AItem: TdxCustomLayoutLookAndFeel); - procedure ClearItems; - protected - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - procedure Modified; - procedure SetName(const Value: TComponentName); override; - property IsDesigning: Boolean read GetIsDesigning; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function CreateItem(AClass: TdxCustomLayoutLookAndFeelClass): TdxCustomLayoutLookAndFeel; - property Count: Integer read GetCount; - property Items[Index: Integer]: TdxCustomLayoutLookAndFeel read GetItem; default; - end; - - TdxLayoutLookAndFeelDefs = class - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TdxCustomLayoutLookAndFeelClass; - public - constructor Create; - destructor Destroy; override; - function GetItemByDescription(const Value: string): TdxCustomLayoutLookAndFeelClass; - procedure Register(AClass: TdxCustomLayoutLookAndFeelClass); - procedure Unregister(AClass: TdxCustomLayoutLookAndFeelClass); - property Count: Integer read GetCount; - property Items[Index: Integer]: TdxCustomLayoutLookAndFeelClass read GetItem; default; - end; - - // text metric manager - - PdxLayoutTextMetric = ^TdxLayoutTextMetric; - TdxLayoutTextMetric = record - Font: TFont; - TextMetric: TTextMetric; - end; - - TdxLayoutTextMetrics = class - private - FItems: TList; - function GetCount: Integer; - function GetItem(AIndex: Integer): PdxLayoutTextMetric; - procedure DestroyItems; - protected - procedure CalculateItem(AIndex: Integer); - procedure Delete(AIndex: Integer); - function IndexOf(AFont: TFont): Integer; - property Count: Integer read GetCount; - property Items[AIndex: Integer]: PdxLayoutTextMetric read GetItem; - public - constructor Create; - destructor Destroy; override; - procedure Get(AFont: TFont; var ATextMetric: TTextMetric); - //procedure Update(AFont: TFont); - procedure Unregister(AFont: TFont); - end; - - IdxLayoutLookAndFeelsDesigner = interface - ['{EA24F329-D483-4D4F-A72C-1F67EC4F7E21}'] - procedure ComponentNameChanged(ALookAndFeelList: TdxLayoutLookAndFeelList); - procedure ItemsChanged(ALookAndFeelList: TdxLayoutLookAndFeelList); - procedure SetList(ALookAndFeelList: TdxLayoutLookAndFeelList); - end; - -var - dxLayoutTextMetrics: TdxLayoutTextMetrics; - dxLayoutLookAndFeelDefs: TdxLayoutLookAndFeelDefs; - dxLayoutDefaultLookAndFeel: TdxCustomLayoutLookAndFeel; - dxLayoutLookAndFeelsDesigner: IdxLayoutLookAndFeelsDesigner; - -implementation - -uses - SysUtils, Forms, cxClasses, dxLayoutControl, dxLayoutPainters; - -type - TControlAccess = class(TControl); - TdxLayoutControlAccess = class(TdxCustomLayoutControl); - -{ TdxCustomLayoutLookAndFeelPart } - -constructor TdxCustomLayoutLookAndFeelPart.Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); -begin - inherited Create; - FLookAndFeel := ALookAndFeel; -end; - -procedure TdxCustomLayoutLookAndFeelPart.Changed; -begin - FLookAndFeel.Changed; -end; - -{ TdxLayoutLookAndFeelCaptionOptions } - -constructor TdxLayoutLookAndFeelCaptionOptions.Create(AOptions: TdxCustomLayoutLookAndFeelOptions); -begin - inherited Create; - FOptions := AOptions; - FFont := TFont.Create; - FFont.OnChange := FontChanged; - FHotTrackStyles := [htsHandPoint, htsUnderlineHot]; - FTextColor := clDefault; - FTextHotColor := clDefault; - FUseDefaultFont := True; -end; - -destructor TdxLayoutLookAndFeelCaptionOptions.Destroy; -begin - dxLayoutTextMetrics.Unregister(FFont); - FFont.Free; - inherited; -end; - -procedure TdxLayoutLookAndFeelCaptionOptions.SetFont(Value: TFont); -begin - FFont.Assign(Value) -end; - -procedure TdxLayoutLookAndFeelCaptionOptions.SetHotTrack(Value: Boolean); -begin - if FHotTrack <> Value then - begin - FHotTrack := Value; - Changed; - end; -end; - -procedure TdxLayoutLookAndFeelCaptionOptions.SetHotTrackStyles(Value: TdxLayoutHotTrackStyles); -begin - if FHotTrackStyles <> Value then - begin - FHotTrackStyles := Value; - Changed; - end; -end; - -procedure TdxLayoutLookAndFeelCaptionOptions.SetTextColor(Value: TColor); -begin - if FTextColor <> Value then - begin - FTextColor := Value; - Changed; - end; -end; - -procedure TdxLayoutLookAndFeelCaptionOptions.SetTextHotColor(Value: TColor); -begin - if FTextHotColor <> Value then - begin - FTextHotColor := Value; - Changed; - end; -end; - -procedure TdxLayoutLookAndFeelCaptionOptions.SetUseDefaultFont(Value: Boolean); -begin - if FUseDefaultFont <> Value then - begin - FUseDefaultFont := Value; - Changed; - end; -end; - -procedure TdxLayoutLookAndFeelCaptionOptions.FontChanged(Sender: TObject); -begin - FUseDefaultFont := False; - dxLayoutTextMetrics.Unregister(FFont); - Changed; -end; - -function TdxLayoutLookAndFeelCaptionOptions.IsFontStored: Boolean; -begin - Result := not FUseDefaultFont; -end; - -procedure TdxLayoutLookAndFeelCaptionOptions.Changed; -begin - FOptions.Changed; -end; - -function TdxLayoutLookAndFeelCaptionOptions.GetDefaultTextHotColor: TColor; -begin - Result := GetHotTrackColor; -end; - -function TdxLayoutLookAndFeelCaptionOptions.GetDefaultFont(AControl: TControl): TFont; -begin - Result := TControlAccess(AControl).Font; -end; - -function TdxLayoutLookAndFeelCaptionOptions.GetTextColor: TColor; -begin - Result := FTextColor; - if Result = clDefault then - Result := GetDefaultTextColor; -end; - -function TdxLayoutLookAndFeelCaptionOptions.GetTextHotColor: TColor; -begin - Result := FTextHotColor; - if Result = clDefault then - Result := GetDefaultTextHotColor; -end; - -function TdxLayoutLookAndFeelCaptionOptions.GetFont(AControl: TControl): TFont; -begin - if FUseDefaultFont then - Result := GetDefaultFont(AControl) - else - Result := FFont; -end; - -{ TdxCustomLayoutLookAndFeelOptions } - -constructor TdxCustomLayoutLookAndFeelOptions.Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); -begin - inherited; - FCaptionOptions := GetCaptionOptionsClass.Create(Self); -end; - -destructor TdxCustomLayoutLookAndFeelOptions.Destroy; -begin - FCaptionOptions.Free; - inherited; -end; - -function TdxCustomLayoutLookAndFeelOptions.GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; -begin - Result := TdxLayoutLookAndFeelCaptionOptions; -end; - -{ TdxLayoutLookAndFeelGroupOptions } - -constructor TdxLayoutLookAndFeelGroupOptions.Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); -begin - inherited; - FColor := clDefault; -end; - -procedure TdxLayoutLookAndFeelGroupOptions.SetColor(Value: TColor); -begin - if FColor <> Value then - begin - FColor := Value; - Changed; - end; -end; - -function TdxLayoutLookAndFeelGroupOptions.GetColor: TColor; -begin - Result := FColor; - if Result = clDefault then - Result := GetDefaultColor; -end; - -{ TdxLayoutLookAndFeelItemOptions } - -constructor TdxLayoutLookAndFeelItemOptions.Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); -begin - inherited; - FControlBorderColor := clDefault; - FControlBorderStyle := lbsStandard; -end; - -procedure TdxLayoutLookAndFeelItemOptions.SetControlBorderColor(Value: TColor); -begin - if FControlBorderColor <> Value then - begin - FControlBorderColor := Value; - Changed; - end; -end; - -procedure TdxLayoutLookAndFeelItemOptions.SetControlBorderStyle(Value: TdxLayoutBorderStyle); -begin - if FControlBorderStyle <> Value then - begin - FControlBorderStyle := Value; - Changed; - end; -end; - -function TdxLayoutLookAndFeelItemOptions.GetDefaultControlBorderColor: TColor; -begin - Result := clWindowFrame; -end; - -function TdxLayoutLookAndFeelItemOptions.GetControlBorderColor: TColor; -begin - Result := FControlBorderColor; - if Result = clDefault then - Result := GetDefaultControlBorderColor; -end; - -{ TdxLayoutLookAndFeelOffsets } - -constructor TdxLayoutLookAndFeelOffsets.Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); -begin - inherited; - FControlOffsetHorz := GetDefaultValue(0); - FControlOffsetVert := GetDefaultValue(1); - FItemOffset := GetDefaultValue(2); - FItemsAreaOffsetHorz := GetDefaultValue(3); - FItemsAreaOffsetVert := GetDefaultValue(4); - FRootItemsAreaOffsetHorz := GetDefaultValue(5); - FRootItemsAreaOffsetVert := GetDefaultValue(6); -end; - -function TdxLayoutLookAndFeelOffsets.GetDefaultValue(Index: Integer): Integer; -begin - case Index of - 0: Result := 3; - 1: Result := 3; - 2: Result := 4; - 3: Result := 0; - 4: Result := 0; - 5: Result := 7; - 6: Result := 7; - else - Result := 0; - end; -end; - -function TdxLayoutLookAndFeelOffsets.GetValue(Index: Integer): Integer; -begin - case Index of - 0: Result := FControlOffsetHorz; - 1: Result := FControlOffsetVert; - 2: Result := FItemOffset; - 3: Result := FItemsAreaOffsetHorz; - 4: Result := FItemsAreaOffsetVert; - 5: Result := FRootItemsAreaOffsetHorz; - 6: Result := FRootItemsAreaOffsetVert; - else - Result := 0; - end; -end; - -function TdxLayoutLookAndFeelOffsets.IsValueStored(Index: Integer): Boolean; -begin - Result := GetValue(Index) <> GetDefaultValue(Index); -end; - -procedure TdxLayoutLookAndFeelOffsets.SetValue(Index: Integer; Value: Integer); -begin - if Value < 0 then Value := 0; - if GetValue(Index) <> Value then - begin - case Index of - 0: FControlOffsetHorz := Value; - 1: FControlOffsetVert := Value; - 2: FItemOffset := Value; - 3: FItemsAreaOffsetHorz := Value; - 4: FItemsAreaOffsetVert := Value; - 5: FRootItemsAreaOffsetHorz := Value; - 6: FRootItemsAreaOffsetVert := Value; - end; - Changed; - end; -end; - -{ TdxCustomLayoutLookAndFeel } - -constructor TdxCustomLayoutLookAndFeel.Create(AOwner: TComponent); -begin - inherited; - FUsers := TList.Create; - FGroupOptions := GetGroupOptionsClass.Create(Self); - FItemOptions := GetItemOptionsClass.Create(Self); - FOffsets := GetOffsetsClass.Create(Self); -end; - -destructor TdxCustomLayoutLookAndFeel.Destroy; -begin - NotifyUsersAboutDestroying; - if FList <> nil then FList.RemoveItem(Self); - FUsers.Free; - FOffsets.Free; - FItemOptions.Free; - FGroupOptions.Free; - inherited; -end; - -function TdxCustomLayoutLookAndFeel.GetIsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -function TdxCustomLayoutLookAndFeel.GetUser(Index: Integer): IdxLayoutLookAndFeelUser; -begin - TComponent(FUsers[Index]).GetInterface(IdxLayoutLookAndFeelUser, Result); -end; - -function TdxCustomLayoutLookAndFeel.GetUserCount: Integer; -begin - Result := FUsers.Count; -end; - -procedure TdxCustomLayoutLookAndFeel.SetName(const Value: TComponentName); -begin - inherited; - if dxLayoutLookAndFeelsDesigner <> nil then - dxLayoutLookAndFeelsDesigner.ItemsChanged(FList); -end; - -procedure TdxCustomLayoutLookAndFeel.SetParentComponent(Value: TComponent); -begin - inherited; - if Value is TdxLayoutLookAndFeelList then - TdxLayoutLookAndFeelList(Value).AddItem(Self); -end; - -procedure TdxCustomLayoutLookAndFeel.Changed; -var - I: Integer; -begin - for I := 0 to UserCount - 1 do - Users[I].LookAndFeelChanged; -end; - -function TdxCustomLayoutLookAndFeel.ForceControlArrangement: Boolean; -begin - Result := False; -end; - -function TdxCustomLayoutLookAndFeel.DoesCxLookAndFeelHavePriority: Boolean; -begin - Result := False; -end; - -class function TdxCustomLayoutLookAndFeel.GetBaseName: string; -begin - Result := ClassName; - Delete(Result, 1, 1); -end; - -procedure TdxCustomLayoutLookAndFeel.GetTextMetric(AFont: TFont; - var ATextMetric: TTextMetric); -begin - dxLayoutTextMetrics.Get(AFont, ATextMetric); -end; - -function TdxCustomLayoutLookAndFeel.GetGroupCaptionFont(AControl: TControl): TFont; -begin - Result := FGroupOptions.CaptionOptions.GetFont(AControl); -end; - -function TdxCustomLayoutLookAndFeel.GetItemCaptionFont(AControl: TControl): TFont; -begin - Result := FItemOptions.CaptionOptions.GetFont(AControl); -end; - -procedure TdxCustomLayoutLookAndFeel.NotifyUsersAboutDestroying; - - procedure BeginNotification; - var - I: Integer; - begin - FNotifyingAboutDestroying := True; - for I := 0 to UserCount - 1 do - Users[I].BeginLookAndFeelDestroying; - end; - - procedure Notify; - var - I: Integer; - begin - for I := 0 to UserCount - 1 do - Users[I].LookAndFeelDestroyed; - end; - - procedure EndNotification; - var - I: Integer; - begin - for I := 0 to UserCount - 1 do - Users[I].EndLookAndFeelDestroying; - FNotifyingAboutDestroying := False; - end; - -begin - BeginNotification; - try - Notify; - finally - EndNotification; - end; -end; - -function TdxCustomLayoutLookAndFeel.GetGroupOptionsClass: TdxLayoutLookAndFeelGroupOptionsClass; -begin - Result := TdxLayoutLookAndFeelGroupOptions; -end; - -function TdxCustomLayoutLookAndFeel.GetItemOptionsClass: TdxLayoutLookAndFeelItemOptionsClass; -begin - Result := TdxLayoutLookAndFeelItemOptions; -end; - -function TdxCustomLayoutLookAndFeel.GetOffsetsClass: TdxLayoutLookAndFeelOffsetsClass; -begin - Result := TdxLayoutLookAndFeelOffsets; -end; - -function TdxCustomLayoutLookAndFeel.GetParentComponent: TComponent; -begin - Result := FList; -end; - -function TdxCustomLayoutLookAndFeel.HasParent: Boolean; -begin - Result := True; -end; - -function TdxCustomLayoutLookAndFeel.NeedDoubleBuffered: Boolean; -begin - Result := False; -end; - -function TdxCustomLayoutLookAndFeel.NeedRedrawOnResize: Boolean; -begin - Result := False; -end; - -procedure TdxCustomLayoutLookAndFeel.InitializeSubControlCxLookAndFeel(AcxLookAndFeel: TcxLookAndFeel); -begin - AcxLookAndFeel.MasterLookAndFeel := nil; -end; - -procedure TdxCustomLayoutLookAndFeel.DrawLayoutControlBackground(ACanvas: TcxCanvas; const R: TRect); -begin - ACanvas.FillRect(R, GetEmptyAreaColor); -end; - -procedure TdxCustomLayoutLookAndFeel.DrawItemControlBorder(ACanvas: TcxCanvas; AItemOptions: TdxLayoutLookAndFeelItemOptions; R: TRect); - - procedure DrawSingleBorder; - begin - ACanvas.FrameRect(R, AItemOptions.GetControlBorderColor); - end; - - procedure DrawStandardBorder; - begin - ACanvas.DrawEdge(R, True, True); - InflateRect(R, -1, -1); - ACanvas.DrawEdge(R, True, False); - end; - - procedure DrawFlatBorder; - begin - ACanvas.DrawEdge(R, True, True); - InflateRect(R, -1, -1); - ACanvas.FrameRect(R, clBtnFace); - end; - -begin - case AItemOptions.ControlBorderStyle of - lbsSingle: - DrawSingleBorder; - lbsFlat: - DrawFlatBorder; - lbsStandard: - DrawStandardBorder; - end; -end; - -procedure TdxCustomLayoutLookAndFeel.AddUser(AUser: TComponent); -begin - FUsers.Add(AUser); -end; - -procedure TdxCustomLayoutLookAndFeel.RemoveUser(AUser: TComponent); -begin - if FNotifyingAboutDestroying then Exit; - FUsers.Remove(AUser); -end; - -class function TdxCustomLayoutLookAndFeel.Description: string; -begin - Result := ''; -end; - -function TdxCustomLayoutLookAndFeel.DLUToPixels(AFont: TFont; ADLU: Integer): Integer; -var - ATextMetric: TTextMetric; -begin - GetTextMetric(AFont, ATextMetric); - Result := - (MulDiv(ADLU, ATextMetric.tmAveCharWidth, 4) + - MulDiv(ADLU, ATextMetric.tmHeight, 8)) div 2; -end; - -function TdxCustomLayoutLookAndFeel.HDLUToPixels(AFont: TFont; ADLU: Integer): Integer; -var - ATextMetric: TTextMetric; -begin - GetTextMetric(AFont, ATextMetric); - Result := MulDiv(ADLU, ATextMetric.tmAveCharWidth, 4); -end; - -function TdxCustomLayoutLookAndFeel.VDLUToPixels(AFont: TFont; ADLU: Integer): Integer; -var - ATextMetric: TTextMetric; -begin - GetTextMetric(AFont, ATextMetric); - Result := MulDiv(ADLU, ATextMetric.tmHeight, 8); -end; - -function TdxCustomLayoutLookAndFeel.GetItemPainterClass: TClass{TdxLayoutItemPainterClass}; -begin - Result := TdxLayoutItemPainter; -end; - -function TdxCustomLayoutLookAndFeel.GetGroupViewInfoClass: TClass{TdxLayoutGroupViewInfoClass}; -begin - Result := TdxLayoutGroupViewInfo; -end; - -function TdxCustomLayoutLookAndFeel.GetItemViewInfoClass: TClass{TdxLayoutItemViewInfoClass}; -begin - Result := TdxLayoutItemViewInfo; -end; - -function TdxCustomLayoutLookAndFeel.GetControlOffsetHorz(AControl: TControl): Integer; -begin - Result := DLUToPixels(GetItemCaptionFont(AControl), Offsets.ControlOffsetHorz); -end; - -function TdxCustomLayoutLookAndFeel.GetControlOffsetVert(AControl: TControl): Integer; -begin - Result := DLUToPixels(GetItemCaptionFont(AControl), Offsets.ControlOffsetVert); -end; - -function TdxCustomLayoutLookAndFeel.GetGroupBorderWidth(AControl: TControl; - ASide: TdxLayoutSide; AHasCaption: Boolean): Integer; -begin - Result := 0; -end; - -function TdxCustomLayoutLookAndFeel.GetInternalName: string; -begin - Result := ''; -end; - -function TdxCustomLayoutLookAndFeel.GetItemControlBorderWidth(ASide: TdxLayoutSide): Integer; -begin - case FItemOptions.ControlBorderStyle of - lbsSingle: - Result := 1; - lbsFlat: - Result := 2; - lbsStandard: - Result := 2; - else - Result := 0; - end -end; - -function TdxCustomLayoutLookAndFeel.GetItemOffset(AControl: TControl): Integer; -begin - Result := DLUToPixels(GetItemCaptionFont(AControl), Offsets.ItemOffset); -end; - -function TdxCustomLayoutLookAndFeel.GetItemsAreaOffset(AControl: TControl): Integer; -begin - Result := DLUToPixels(GetGroupCaptionFont(AControl), 7); -end; - -function TdxCustomLayoutLookAndFeel.GetItemsAreaOffsetHorz(AControl: TControl): Integer; -begin - Result := DLUToPixels(GetGroupCaptionFont(AControl), Offsets.ItemsAreaOffsetHorz); -end; - -function TdxCustomLayoutLookAndFeel.GetItemsAreaOffsetVert(AControl: TControl): Integer; -begin - Result := DLUToPixels(GetGroupCaptionFont(AControl), Offsets.ItemsAreaOffsetVert); -end; - -function TdxCustomLayoutLookAndFeel.GetRootItemsAreaOffsetHorz(AControl: TControl): Integer; -begin - Result := DLUToPixels(GetGroupCaptionFont(AControl), Offsets.RootItemsAreaOffsetHorz); -end; - -function TdxCustomLayoutLookAndFeel.GetRootItemsAreaOffsetVert(AControl: TControl): Integer; -begin - Result := DLUToPixels(GetGroupCaptionFont(AControl), Offsets.RootItemsAreaOffsetVert); -end; - -function TdxCustomLayoutLookAndFeel.GetEmptyAreaColor: TColor; -begin - Result := FGroupOptions.GetColor; -end; - -procedure TdxCustomLayoutLookAndFeel.SetInternalName(const Value: string); -begin -end; - -{ TdxLayoutStandardLookAndFeelGroupCaptionOptions } - -function TdxLayoutStandardLookAndFeelGroupCaptionOptions.GetDefaultTextColor: TColor; -begin - Result := clBtnText; -end; - -{ TdxLayoutStandardLookAndFeelGroupOptions } - -function TdxLayoutStandardLookAndFeelGroupOptions.GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; -begin - Result := TdxLayoutStandardLookAndFeelGroupCaptionOptions; -end; - -function TdxLayoutStandardLookAndFeelGroupOptions.GetDefaultColor: TColor; -begin - Result := clBtnFace; -end; - -{ TdxLayoutStandardLookAndFeelItemCaptionOptions } - -function TdxLayoutStandardLookAndFeelItemCaptionOptions.GetDefaultTextColor: TColor; -begin - Result := clBtnText; -end; - -{ TdxLayoutStandardLookAndFeelItemOptions } - -function TdxLayoutStandardLookAndFeelItemOptions.GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; -begin - Result := TdxLayoutStandardLookAndFeelItemCaptionOptions; -end; - -{ TdxLayoutStandardLookAndFeel } - -function TdxLayoutStandardLookAndFeel.GetGroupOptionsClass: TdxLayoutLookAndFeelGroupOptionsClass; -begin - Result := TdxLayoutStandardLookAndFeelGroupOptions; -end; - -function TdxLayoutStandardLookAndFeel.GetItemOptionsClass: TdxLayoutLookAndFeelItemOptionsClass; -begin - Result := TdxLayoutStandardLookAndFeelItemOptions; -end; - -function TdxLayoutStandardLookAndFeel.GetFrameWidth(ASide: TdxLayoutSide): Integer; -begin - Result := 2; -end; - -class function TdxLayoutStandardLookAndFeel.Description: string; -begin - Result := 'Standard'; -end; - -procedure TdxLayoutStandardLookAndFeel.InitializeSubControlCxLookAndFeel(AcxLookAndFeel: TcxLookAndFeel); -begin - AcxLookAndFeel.Kind := lfStandard; - AcxLookAndFeel.NativeStyle := False; - AcxLookAndFeel.SkinName := ''; -end; - -function TdxLayoutStandardLookAndFeel.GetGroupPainterClass: TClass{TdxLayoutGroupPainterClass}; -begin - Result := TdxLayoutGroupStandardPainter; -end; - -function TdxLayoutStandardLookAndFeel.GetGroupViewInfoClass: TClass{TdxLayoutGroupViewInfoClass}; -begin - Result := TdxLayoutGroupStandardViewInfo; -end; - -function TdxLayoutStandardLookAndFeel.GetGroupBorderWidth(AControl: TControl; - ASide: TdxLayoutSide; AHasCaption: Boolean): Integer; -var - AFont: TFont; -begin - AFont := GetGroupCaptionFont(AControl); - if ASide = sdTop then - Result := VDLUToPixels(AFont, 4) + FrameWidths[ASide] div 2 + DLUToPixels(AFont, 7) - else - Result := FrameWidths[ASide] + DLUToPixels(AFont, 7); -end; - -{ TdxLayoutOfficeLookAndFeel } - -function TdxLayoutOfficeLookAndFeel.GetFrameWidth(ASide: TdxLayoutSide): Integer; -begin - if ASide = sdTop then - Result := inherited GetFrameWidth(ASide) - else - Result := 0; -end; - -class function TdxLayoutOfficeLookAndFeel.Description: string; -begin - Result := 'Office'; -end; - -procedure TdxLayoutOfficeLookAndFeel.InitializeSubControlCxLookAndFeel(AcxLookAndFeel: TcxLookAndFeel); -begin - AcxLookAndFeel.Kind := lfFlat; - AcxLookAndFeel.NativeStyle := False; - AcxLookAndFeel.SkinName := ''; -end; - -function TdxLayoutOfficeLookAndFeel.GetGroupPainterClass: TClass{TdxLayoutGroupPainterClass}; -begin - Result := TdxLayoutGroupOfficePainter; -end; - -function TdxLayoutOfficeLookAndFeel.GetGroupViewInfoClass: TClass{TdxLayoutGroupViewInfoClass}; -begin - Result := TdxLayoutGroupOfficeViewInfo; -end; - -function TdxLayoutOfficeLookAndFeel.GetGroupBorderWidth(AControl: TControl; - ASide: TdxLayoutSide; AHasCaption: Boolean): Integer; -begin - if ASide = sdBottom then - Result := DLUToPixels(GetGroupCaptionFont(AControl), 3) - else - Result := inherited GetGroupBorderWidth(AControl, ASide, AHasCaption); -end; - -{ TdxLayoutWebLookAndFeelGroupCaptionOptions } - -constructor TdxLayoutWebLookAndFeelGroupCaptionOptions.Create(AOptions: TdxCustomLayoutLookAndFeelOptions); -begin - inherited; - FColor := clDefault; -end; - -function TdxLayoutWebLookAndFeelGroupCaptionOptions.GetOptions: TdxLayoutWebLookAndFeelGroupOptions; -begin - Result := TdxLayoutWebLookAndFeelGroupOptions(inherited Options); -end; - -procedure TdxLayoutWebLookAndFeelGroupCaptionOptions.SetColor(Value: TColor); -begin - if FColor <> Value then - begin - FColor := Value; - Changed; - end; -end; - -procedure TdxLayoutWebLookAndFeelGroupCaptionOptions.SetSeparatorWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FSeparatorWidth <> Value then - begin - FSeparatorWidth := Value; - Changed; - end; -end; - -function TdxLayoutWebLookAndFeelGroupCaptionOptions.GetDefaultColor: TColor; -begin - Result := Options.GetColor; -end; - -function TdxLayoutWebLookAndFeelGroupCaptionOptions.GetDefaultTextColor: TColor; -begin - Result := clWindowText; -end; - -function TdxLayoutWebLookAndFeelGroupCaptionOptions.GetDefaultFont(AControl: TControl): TFont; -begin - Result := TdxLayoutControlAccess(AControl).BoldFont; -end; - -function TdxLayoutWebLookAndFeelGroupCaptionOptions.GetColor: TColor; -begin - Result := FColor; - if Result = clDefault then - Result := GetDefaultColor; -end; - -{ TdxLayoutWebLookAndFeelGroupOptions } - -constructor TdxLayoutWebLookAndFeelGroupOptions.Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); -begin - inherited; - FFrameColor := clDefault; - FFrameWidth := 1; - FOffsetCaption := True; - FOffsetItems := True; -end; - -function TdxLayoutWebLookAndFeelGroupOptions.GetCaptionOptions: TdxLayoutWebLookAndFeelGroupCaptionOptions; -begin - Result := TdxLayoutWebLookAndFeelGroupCaptionOptions(inherited CaptionOptions); -end; - -procedure TdxLayoutWebLookAndFeelGroupOptions.SetCaptionOptions(Value: TdxLayoutWebLookAndFeelGroupCaptionOptions); -begin - inherited CaptionOptions := Value; -end; - -procedure TdxLayoutWebLookAndFeelGroupOptions.SetFrameColor(Value: TColor); -begin - if FFrameColor <> Value then - begin - FFrameColor := Value; - Changed; - end; -end; - -procedure TdxLayoutWebLookAndFeelGroupOptions.SetFrameWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FFrameWidth <> Value then - begin - FFrameWidth := Value; - Changed; - end; -end; - -procedure TdxLayoutWebLookAndFeelGroupOptions.SetOffsetCaption(Value: Boolean); -begin - if FOffsetCaption <> Value then - begin - FOffsetCaption := Value; - Changed; - end; -end; - -procedure TdxLayoutWebLookAndFeelGroupOptions.SetOffsetItems(Value: Boolean); -begin - if FOffsetItems <> Value then - begin - FOffsetItems := Value; - Changed; - end; -end; - -function TdxLayoutWebLookAndFeelGroupOptions.GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; -begin - Result := TdxLayoutWebLookAndFeelGroupCaptionOptions; -end; - -function TdxLayoutWebLookAndFeelGroupOptions.GetDefaultColor: TColor; -begin - Result := clWindow; -end; - -function TdxLayoutWebLookAndFeelGroupOptions.GetDefaultFrameColor: TColor; -begin - Result := clBtnFace; -end; - -function TdxLayoutWebLookAndFeelGroupOptions.GetFrameColor: TColor; -begin - Result := FFrameColor; - if Result = clDefault then - Result := GetDefaultFrameColor; -end; - -function TdxLayoutWebLookAndFeelGroupOptions.HasCaptionSeparator(AHasCaption: Boolean): Boolean; -begin - Result := AHasCaption or (FFrameWidth = 0); -end; - -{ TdxLayoutWebLookAndFeelItemCaptionOptions } - -function TdxLayoutWebLookAndFeelItemCaptionOptions.GetDefaultTextColor: TColor; -begin - Result := clWindowText; -end; - -{ TdxLayoutWebLookAndFeelItemOptions } - -constructor TdxLayoutWebLookAndFeelItemOptions.Create(ALookAndFeel: TdxCustomLayoutLookAndFeel); -begin - inherited; - ControlBorderStyle := lbsSingle; -end; - -function TdxLayoutWebLookAndFeelItemOptions.GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; -begin - Result := TdxLayoutWebLookAndFeelItemCaptionOptions; -end; - -{ TdxLayoutWebLookAndFeel } - -function TdxLayoutWebLookAndFeel.GetGroupOptions: TdxLayoutWebLookAndFeelGroupOptions; -begin - Result := TdxLayoutWebLookAndFeelGroupOptions(inherited GroupOptions); -end; - -procedure TdxLayoutWebLookAndFeel.SetGroupOptions(Value: TdxLayoutWebLookAndFeelGroupOptions); -begin - inherited GroupOptions := Value; -end; - -function TdxLayoutWebLookAndFeel.GetGroupOptionsClass: TdxLayoutLookAndFeelGroupOptionsClass; -begin - Result := TdxLayoutWebLookAndFeelGroupOptions; -end; - -function TdxLayoutWebLookAndFeel.GetItemOptionsClass: TdxLayoutLookAndFeelItemOptionsClass; -begin - Result := TdxLayoutWebLookAndFeelItemOptions; -end; - -class function TdxLayoutWebLookAndFeel.Description: string; -begin - Result := 'Web'; -end; - -procedure TdxLayoutWebLookAndFeel.InitializeSubControlCxLookAndFeel(AcxLookAndFeel: TcxLookAndFeel); -begin - AcxLookAndFeel.Kind := lfUltraFlat; - AcxLookAndFeel.NativeStyle := False; - AcxLookAndFeel.SkinName := ''; -end; - -function TdxLayoutWebLookAndFeel.GetGroupPainterClass: TClass{TdxLayoutGroupPainterClass}; -begin - Result := TdxLayoutGroupWebPainter; -end; - -function TdxLayoutWebLookAndFeel.GetGroupViewInfoClass: TClass{TdxLayoutGroupViewInfoClass}; -begin - Result := TdxLayoutGroupWebViewInfo; -end; - -function TdxLayoutWebLookAndFeel.GetGroupBorderWidth(AControl: TControl; - ASide: TdxLayoutSide; AHasCaption: Boolean): Integer; -var - AFont: TFont; -begin - AFont := GetGroupCaptionFont(AControl); - if ASide in [sdTop, sdBottom] then - begin - Result := DLUToPixels(AFont, 4); - if ASide = sdTop then - begin - if AHasCaption then - Inc(Result, VDLUToPixels(AFont, 11{12})); - if GroupOptions.HasCaptionSeparator(AHasCaption) then - Inc(Result, GroupOptions.CaptionOptions.SeparatorWidth); - end; - end - else - if GroupOptions.OffsetItems then - Result := DLUToPixels(AFont, 7) - else - Result := DLUToPixels(AFont, 2); - Inc(Result, GroupOptions.FrameWidth); -end; - -{ TdxLayoutLookAndFeelList } - -constructor TdxLayoutLookAndFeelList.Create(AOwner: TComponent); -begin - inherited; - FItems := TList.Create; -end; - -destructor TdxLayoutLookAndFeelList.Destroy; -begin - ClearItems; - FItems.Free; - inherited; -end; - -function TdxLayoutLookAndFeelList.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxLayoutLookAndFeelList.GetIsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -function TdxLayoutLookAndFeelList.GetItem(Index: Integer): TdxCustomLayoutLookAndFeel; -begin - Result := FItems[Index]; -end; - -procedure TdxLayoutLookAndFeelList.AddItem(AItem: TdxCustomLayoutLookAndFeel); -begin - FItems.Add(AItem); - AItem.FList := Self; -end; - -procedure TdxLayoutLookAndFeelList.RemoveItem(AItem: TdxCustomLayoutLookAndFeel); -begin - FItems.Remove(AItem); - AItem.FList := nil; -end; - -procedure TdxLayoutLookAndFeelList.ClearItems; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Items[I].Free; -end; - -procedure TdxLayoutLookAndFeelList.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - I: Integer; -begin - inherited; - if Owner = Root then - for I := 0 to Count - 1 do Proc(Items[I]); -end; - -procedure TdxLayoutLookAndFeelList.Modified; -var - AForm: TCustomForm; -begin - if Owner is TCustomForm then - begin - AForm := TCustomForm(Owner); - if AForm.Designer <> nil then AForm.Designer.Modified; - end; -end; - -procedure TdxLayoutLookAndFeelList.SetName(const Value: TComponentName); -begin - inherited; - if dxLayoutLookAndFeelsDesigner <> nil then - dxLayoutLookAndFeelsDesigner.ComponentNameChanged(Self); -end; - -function TdxLayoutLookAndFeelList.CreateItem(AClass: TdxCustomLayoutLookAndFeelClass): TdxCustomLayoutLookAndFeel; -begin - Result := AClass.Create(Owner); - AddItem(Result); - SetComponentName(Result, AClass.GetBaseName, IsDesigning, False); - Modified; -end; - -{ TdxLayoutLookAndFeelDefs } - -constructor TdxLayoutLookAndFeelDefs.Create; -begin - inherited; - FItems := TList.Create; -end; - -destructor TdxLayoutLookAndFeelDefs.Destroy; -begin - FItems.Free; - inherited; -end; - -function TdxLayoutLookAndFeelDefs.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxLayoutLookAndFeelDefs.GetItem(Index: Integer): TdxCustomLayoutLookAndFeelClass; -begin - Result := TdxCustomLayoutLookAndFeelClass(FItems[Index]); -end; - -function TdxLayoutLookAndFeelDefs.GetItemByDescription(const Value: string): TdxCustomLayoutLookAndFeelClass; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.Description = Value then Exit; - end; - Result := nil; -end; - -procedure TdxLayoutLookAndFeelDefs.Register(AClass: TdxCustomLayoutLookAndFeelClass); -begin - FItems.Add(AClass); - RegisterClass(AClass); -end; - -procedure TdxLayoutLookAndFeelDefs.Unregister(AClass: TdxCustomLayoutLookAndFeelClass); -begin - FItems.Remove(AClass); -end; - -{ TdxLayoutTextMetrics } - -constructor TdxLayoutTextMetrics.Create; -begin - inherited; - FItems := TList.Create; -end; - -destructor TdxLayoutTextMetrics.Destroy; -begin - DestroyItems; - FItems.Free; - inherited; -end; - -function TdxLayoutTextMetrics.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxLayoutTextMetrics.GetItem(AIndex: Integer): PdxLayoutTextMetric; -begin - Result := FItems[AIndex]; -end; - -procedure TdxLayoutTextMetrics.DestroyItems; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Delete(I); -end; - -procedure TdxLayoutTextMetrics.CalculateItem(AIndex: Integer); -var - ADC: HDC; - APrevFont: HFONT; -begin - ADC := GetDC(0); - try - APrevFont := SelectObject(ADC, Items[AIndex]^.Font.Handle); - GetTextMetrics(ADC, Items[AIndex]^.TextMetric); - SelectObject(ADC, APrevFont); - finally - ReleaseDC(0, ADC); - end; -end; - -procedure TdxLayoutTextMetrics.Delete(AIndex: Integer); -begin - Dispose(Items[AIndex]); - FItems.Delete(AIndex); -end; - -function TdxLayoutTextMetrics.IndexOf(AFont: TFont): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result]^.Font = AFont then Exit; - Result := -1; -end; - -procedure TdxLayoutTextMetrics.Get(AFont: TFont; var ATextMetric: TTextMetric); -var - AIndex: Integer; - - function CreateItem: Integer; - var - AItem: PdxLayoutTextMetric; - begin - New(AItem); - AItem^.Font := AFont; - Result := FItems.Add(AItem); - CalculateItem(Result); - end; - -begin - AIndex := IndexOf(AFont); - if AIndex = -1 then - AIndex := CreateItem; - ATextMetric := Items[AIndex]^.TextMetric; -end; - -{procedure TdxLayoutTextMetrics.Update(AFont: TFont); -var - AIndex: Integer; -begin - AIndex := IndexOf(AFont); - if AIndex <> -1 then - CalculateItem(AIndex); -end;} - -procedure TdxLayoutTextMetrics.Unregister(AFont: TFont); -var - AIndex: Integer; -begin - AIndex := IndexOf(AFont); - if AIndex <> -1 then Delete(AIndex); -end; - -{ TdxLayoutCxLookAndFeel } - -constructor TdxLayoutCxLookAndFeel.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FLookAndFeel := TcxLookAndFeel.Create(Self); - FLookAndFeel.OnChanged := LookAndFeelChanged; -end; - -destructor TdxLayoutCxLookAndFeel.Destroy; -begin - FreeAndNil(FLookAndFeel); - inherited Destroy; -end; - -class function TdxLayoutCxLookAndFeel.Description: string; -begin - Result := 'Use TcxLookAndFeel'; -end; - -procedure TdxLayoutCxLookAndFeel.DrawLayoutControlBackground( - ACanvas: TcxCanvas; const R: TRect); -begin - LookAndFeelPainter.DrawLayoutControlBackground(ACanvas, R); -end; - -procedure TdxLayoutCxLookAndFeel.DrawItemControlBorder(ACanvas: TcxCanvas; AItemOptions: TdxLayoutLookAndFeelItemOptions; R: TRect); -begin - LookAndFeelPainter.DrawBorder(ACanvas, R); -end; - -procedure TdxLayoutCxLookAndFeel.InitializeSubControlCxLookAndFeel(AcxLookAndFeel: TcxLookAndFeel); -begin - AcxLookAndFeel.Kind := LookAndFeel.Kind; - AcxLookAndFeel.NativeStyle := LookAndFeel.NativeStyle; - AcxLookAndFeel.SkinName := LookAndFeel.SkinName; -end; - -function TdxLayoutCxLookAndFeel.NeedRedrawOnResize: Boolean; -begin - Result := LookAndFeelPainter.NeedRedrawOnResize; -end; - -function TdxLayoutCxLookAndFeel.GetEmptyAreaColor: TColor; -begin - Result := LookAndFeelPainter.LayoutControlEmptyAreaColor; - if Result = clDefault then - Result := inherited GetEmptyAreaColor; -end; - -function TdxLayoutCxLookAndFeel.GetGroupBorderWidth( - AControl: TControl; ASide: TdxLayoutSide; AHasCaption: Boolean): Integer; -begin - if IsSkinPainterUsed then - Result := FrameWidths[ASide] + DLUToPixels(GetGroupCaptionFont(AControl), 7) - else - Result := inherited GetGroupBorderWidth(AControl, ASide, AHasCaption); -end; - -function TdxLayoutCxLookAndFeel.GetItemControlBorderWidth(ASide: TdxLayoutSide): Integer; -begin - Result := LookAndFeelPainter.BorderSize; -end; - -function TdxLayoutCxLookAndFeel.GetGroupPainterClass: TClass; -begin - Result := TdxLayoutGroupCxLookAndFeelPainter; -end; - -function TdxLayoutCxLookAndFeel.GetGroupViewInfoClass: TClass; -begin - Result := TdxLayoutGroupCxLookAndFeelViewInfo; -end; - -function TdxLayoutCxLookAndFeel.GetItemViewInfoClass: TClass; -begin - Result := TdxLayoutItemCxLookAndFeelViewInfo; -end; - -function TdxLayoutCxLookAndFeel.GetIsSkinPainterUsed: Boolean; -begin - Result := Assigned(LookAndFeel.SkinPainter); -end; - -function TdxLayoutCxLookAndFeel.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := LookAndFeel.Painter; -end; - -function TdxLayoutCxLookAndFeel.DoesCxLookAndFeelHavePriority: Boolean; -begin - Result := True; -end; - -function TdxLayoutCxLookAndFeel.GetGroupOptionsClass: TdxLayoutLookAndFeelGroupOptionsClass; -begin - Result := TdxLayoutCxLookAndFeelGroupOptions; -end; - -procedure TdxLayoutCxLookAndFeel.LookAndFeelChanged( - Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); -begin - Changed; -end; - -procedure TdxLayoutCxLookAndFeel.SetLookAndFeel(AValue: TcxLookAndFeel); -begin - FLookAndFeel.Assign(AValue); -end; - -{ TdxLayoutCxLookAndFeelGroupOptions } - -function TdxLayoutCxLookAndFeelGroupOptions.GetCaptionOptionsClass: TdxLayoutLookAndFeelCaptionOptionsClass; -begin - Result := TdxLayoutCxLookAndFeelGroupCaptionOptions; -end; - -{ TdxLayoutCxLookAndFeelGroupCaptionOptions } - -function TdxLayoutCxLookAndFeelGroupCaptionOptions.GetLookAndFeel: TdxLayoutCxLookAndFeel; -begin - Result := TdxLayoutCxLookAndFeel(Options.LookAndFeel); -end; - -function TdxLayoutCxLookAndFeelGroupCaptionOptions.GetDefaultTextColor: TColor; -begin - Result := LookAndFeel.LookAndFeelPainter.GroupBoxTextColor(True, cxgpTop); -end; - -{ TdxLayoutSkinLookAndFeel } - -class function TdxLayoutSkinLookAndFeel.Description: string; -begin - Result := 'Skin'; -end; - -procedure TdxLayoutSkinLookAndFeel.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('SkinName', ReadSkinName, nil, False); - Filer.DefineProperty('SkinNameAssigned', ReadSkinNameAssigned, nil, False); -end; - -procedure TdxLayoutSkinLookAndFeel.ReadSkinName(Reader: TReader); -begin - LookAndFeel.SkinName := Reader.ReadString; -end; - -procedure TdxLayoutSkinLookAndFeel.ReadSkinNameAssigned(Reader: TReader); -begin - if Reader.ReadBoolean then - LookAndFeel.AssignedValues := LookAndFeel.AssignedValues + [lfvSkinName] - else - LookAndFeel.AssignedValues := LookAndFeel.AssignedValues - [lfvSkinName] -end; - -initialization - dxLayoutTextMetrics := TdxLayoutTextMetrics.Create; - - dxLayoutLookAndFeelDefs := TdxLayoutLookAndFeelDefs.Create; - - dxLayoutLookAndFeelDefs.Register(TdxLayoutStandardLookAndFeel); - dxLayoutLookAndFeelDefs.Register(TdxLayoutOfficeLookAndFeel); - dxLayoutLookAndFeelDefs.Register(TdxLayoutWebLookAndFeel); - dxLayoutLookAndFeelDefs.Register(TdxLayoutCxLookAndFeel); - dxLayoutLookAndFeelDefs.Register(TdxLayoutSkinLookAndFeel); - - dxLayoutDefaultLookAndFeel := dxLayoutLookAndFeelDefs[0].Create(nil); - -finalization - FreeAndNil(dxLayoutDefaultLookAndFeel); - - dxLayoutLookAndFeelDefs.Unregister(TdxLayoutWebLookAndFeel); - dxLayoutLookAndFeelDefs.Unregister(TdxLayoutOfficeLookAndFeel); - dxLayoutLookAndFeelDefs.Unregister(TdxLayoutStandardLookAndFeel); - - FreeAndNil(dxLayoutLookAndFeelDefs); - - FreeAndNil(dxLayoutTextMetrics); -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutPainters.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutPainters.pas deleted file mode 100644 index 044375e7..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutPainters.pas +++ /dev/null @@ -1,818 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl main components } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutPainters; - -{$I cxVer.inc} - -interface - -uses - Classes, Types, Windows, Graphics, dxLayoutLookAndFeels, dxLayoutControl, - cxLookAndFeels, cxLookAndFeelPainters, dxLayoutCommon; - -type - TdxLayoutGroupStandardViewInfo = class; - TdxLayoutGroupWebViewInfo = class; - TdxLayoutGroupCaptionStandardViewInfo = class; - - { Painters } - - TdxLayoutGroupStandardPainter = class(TdxLayoutGroupPainter) - private - function GetViewInfo: TdxLayoutGroupStandardViewInfo; - protected - function GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; override; - procedure DoDrawBorders; override; - procedure DrawFrame; virtual; - property ViewInfo: TdxLayoutGroupStandardViewInfo read GetViewInfo; - end; - - TdxLayoutGroupOfficePainter = class(TdxLayoutGroupStandardPainter) - protected - function GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; override; - procedure DrawFrame; override; - end; - - TdxLayoutGroupWebPainter = class(TdxLayoutGroupPainter) - private - function GetLayoutLookAndFeel: TdxLayoutWebLookAndFeel; - function GetViewInfo: TdxLayoutGroupWebViewInfo; - protected - function GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; override; - procedure DoDrawBorders; override; - procedure DrawCaptionSeparator; virtual; - procedure DrawFrame; virtual; - property LayoutLookAndFeel: TdxLayoutWebLookAndFeel read GetLayoutLookAndFeel; - property ViewInfo: TdxLayoutGroupWebViewInfo read GetViewInfo; - end; - - TdxLayoutGroupCaptionStandardPainter = class(TdxLayoutGroupCaptionPainter) - private - function GetViewInfo: TdxLayoutGroupCaptionStandardViewInfo; - protected - procedure DoDrawText; override; - property ViewInfo: TdxLayoutGroupCaptionStandardViewInfo read GetViewInfo; - end; - - TdxLayoutGroupCaptionWebPainter = class(TdxLayoutGroupCaptionPainter) - protected - procedure DrawBackground; override; - end; - - { ViewInfos } - - // standard - - TdxLayoutGroupCaptionStandardViewInfo = class(TdxLayoutGroupCaptionViewInfo) - private - function GetItemViewInfo: TdxLayoutGroupStandardViewInfo; - protected - function GetAlignHorz: TAlignment; override; - property ItemViewInfo: TdxLayoutGroupStandardViewInfo read GetItemViewInfo; - public - function CalculateWidth: Integer; override; - end; - - TdxLayoutGroupStandardViewInfo = class(TdxLayoutGroupViewInfo) - private - function GetStandardLookAndFeel: TdxLayoutStandardLookAndFeel; - protected - procedure CalculateCaptionViewInfoBounds; override; - function GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; override; - function GetMinVisibleWidth: Integer; override; - - function GetCaptionViewInfoOffset: Integer; virtual; - function GetFrameBounds: TRect; virtual; - - property CaptionViewInfoOffset: Integer read GetCaptionViewInfoOffset; - property LayoutLookAndFeel: TdxLayoutStandardLookAndFeel read GetStandardLookAndFeel; - public - property FrameBounds: TRect read GetFrameBounds; - end; - - // office - - TdxLayoutGroupCaptionOfficeViewInfo = class(TdxLayoutGroupCaptionViewInfo) - public - function CalculateWidth: Integer; override; - end; - - TdxLayoutGroupOfficeViewInfo = class(TdxLayoutGroupStandardViewInfo) - protected - function GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; override; - function GetCaptionViewInfoOffset: Integer; override; - function GetFrameBounds: TRect; override; - function GetMinVisibleWidth: Integer; override; - end; - - // web - - TdxLayoutGroupCaptionWebViewInfo = class(TdxLayoutGroupCaptionViewInfo) - private - function GetItemViewInfo: TdxLayoutGroupWebViewInfo; - function GetWebLookAndFeel: TdxLayoutWebLookAndFeel; - function GetOptionsEx: TdxLayoutWebLookAndFeelGroupCaptionOptions; - function GetSeparatorWidth: Integer; - protected - function GetAlignVert: TdxAlignmentVert; override; - function GetColor: TColor; override; - function GetIsDefaultColor: Boolean; override; - function GetTextAreaBounds: TRect; override; - - function GetTextOffset: Integer; virtual; - - property ItemViewInfo: TdxLayoutGroupWebViewInfo read GetItemViewInfo; - property LookAndFeel: TdxLayoutWebLookAndFeel read GetWebLookAndFeel; - property Options: TdxLayoutWebLookAndFeelGroupCaptionOptions read GetOptionsEx; - property TextOffset: Integer read GetTextOffset; - public - function CalculateHeight: Integer; override; - function CalculateMinWidth: Integer; override; - - property SeparatorWidth: Integer read GetSeparatorWidth; - end; - - TdxLayoutGroupWebViewInfo = class(TdxLayoutGroupViewInfo) - private - function GetCaptionViewInfo: TdxLayoutGroupCaptionWebViewInfo; - function GetInsideFrameBounds: TRect; - function GetWebLookAndFeel: TdxLayoutWebLookAndFeel; - function GetOptionsEx: TdxLayoutWebLookAndFeelGroupOptions; - protected - procedure CalculateCaptionViewInfoBounds; override; - function GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; override; - function GetMinVisibleWidth: Integer; override; - function GetRestSpaceBounds: TRect; override; - - function GetCaptionSeparatorAreaBounds: TRect; virtual; - function GetCaptionSeparatorBounds: TRect; virtual; - - property LookAndFeel: TdxLayoutWebLookAndFeel read GetWebLookAndFeel; - property InsideFrameBounds: TRect read GetInsideFrameBounds; - property Options: TdxLayoutWebLookAndFeelGroupOptions read GetOptionsEx; - public - property CaptionSeparatorAreaBounds: TRect read GetCaptionSeparatorAreaBounds; - property CaptionSeparatorBounds: TRect read GetCaptionSeparatorBounds; - property CaptionViewInfo: TdxLayoutGroupCaptionWebViewInfo read GetCaptionViewInfo; - end; - - { TdxLayoutGroupCaptionCxLookAndFeelViewInfo } - - TdxLayoutGroupCaptionCxLookAndFeelViewInfo = class(TdxLayoutGroupCaptionStandardViewInfo) - private - function GetCaptionContentOffsets: TRect; - function GetIsSkinPainterUsed: Boolean; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - protected - function GetAlignHorz: TAlignment; override; - function GetTextAreaBounds: TRect; override; - function GetTextColor: TColor; override; - public - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - // - property CaptionContentOffsets: TRect read GetCaptionContentOffsets; - property IsSkinPainterUsed: Boolean read GetIsSkinPainterUsed; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - end; - - { TdxLayoutGroupCxLookAndFeelViewInfo } - - TdxLayoutGroupCxLookAndFeelViewInfo = class(TdxLayoutGroupStandardViewInfo) - private - function GetIsSkinPainterUsed: Boolean; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - protected - procedure CalculateCaptionViewInfoBounds; override; - function CanDrawBackground: Boolean; override; - function GetBorderWidth(ASide: TdxLayoutSide): Integer; override; - function GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; override; - function GetCaptionViewInfoOffset: Integer; override; - function GetFrameBounds: TRect; override; - // - property IsSkinPainterUsed: Boolean read GetIsSkinPainterUsed; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - end; - - { TdxLayoutGroupCaptionCxLookAndFeelPainter } - - TdxLayoutGroupCaptionCxLookAndFeelPainter = class(TdxLayoutGroupCaptionPainter) - private - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - protected - procedure DoDrawText; override; - procedure DrawBackground; override; - public - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - end; - - { TdxLayoutGroupCxLookAndFeelPainter } - - TdxLayoutGroupCxLookAndFeelPainter = class(TdxLayoutGroupStandardPainter) - private - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - protected - function GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; override; - procedure DrawFrame; override; - public - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - end; - - { TdxLayoutItemCxLookAndFeelViewInfo } - - TdxLayoutItemCxLookAndFeelViewInfo = class(TdxLayoutItemViewInfo) - protected - function CanDrawBackground: Boolean; override; - end; - -implementation - -uses -{$IFDEF DELPHI7} - UxTheme, Themes, -{$ENDIF} - cxGraphics, cxGeometry; - -type - TdxLayoutControlViewInfoAccess = class(TdxLayoutControlViewInfo); - TdxCustomLayoutItemCaptionViewInfoAccess = class(TdxCustomLayoutItemCaptionViewInfo); - -{ TdxLayoutGroupStandardPainter } - -function TdxLayoutGroupStandardPainter.GetViewInfo: TdxLayoutGroupStandardViewInfo; -begin - Result := TdxLayoutGroupStandardViewInfo(inherited ViewInfo); -end; - -function TdxLayoutGroupStandardPainter.GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; -begin - Result := TdxLayoutGroupCaptionStandardPainter; -end; - -procedure TdxLayoutGroupStandardPainter.DoDrawBorders; -begin - inherited; - DrawFrame; -end; - -procedure TdxLayoutGroupStandardPainter.DrawFrame; -var - R: TRect; -begin -{$IFDEF DELPHI7} - if ThemeServices.ThemesEnabled then - begin - ThemeServices.DrawElement(Canvas.Handle, ThemeServices.GetElementDetails(tbGroupBoxNormal), - ViewInfo.FrameBounds); - Exit; - end; -{$ENDIF} - R := ViewInfo.FrameBounds; - Canvas.DrawEdge(R, True, True); - InflateRect(R, -1, -1); - Canvas.DrawEdge(R, False, False); -end; - -{ TdxLayoutGroupOfficePainter } - -function TdxLayoutGroupOfficePainter.GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; -begin - Result := TdxLayoutGroupCaptionPainter; -end; - -procedure TdxLayoutGroupOfficePainter.DrawFrame; -var - R: TRect; -begin - R := ViewInfo.FrameBounds; - with Canvas do - begin - DrawEdge(R, True, True, [bTop]); - Inc(R.Top); - DrawEdge(R, False, False, [bTop]); - end; -end; - -{ TdxLayoutGroupWebPainter } - -function TdxLayoutGroupWebPainter.GetLayoutLookAndFeel: TdxLayoutWebLookAndFeel; -begin - Result := TdxLayoutWebLookAndFeel(inherited LayoutLookAndFeel); -end; - -function TdxLayoutGroupWebPainter.GetViewInfo: TdxLayoutGroupWebViewInfo; -begin - Result := TdxLayoutGroupWebViewInfo(inherited ViewInfo); -end; - -function TdxLayoutGroupWebPainter.GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; -begin - Result := TdxLayoutGroupCaptionWebPainter; -end; - -procedure TdxLayoutGroupWebPainter.DoDrawBorders; -begin - DrawFrame; - DrawCaptionSeparator; - inherited; -end; - -procedure TdxLayoutGroupWebPainter.DrawCaptionSeparator; -begin - with Canvas do - begin - Brush.Color := ViewInfo.Color; - FillRect(ViewInfo.CaptionSeparatorAreaBounds); - Brush.Color := ViewInfo.Options.GetFrameColor; - FillRect(ViewInfo.CaptionSeparatorBounds); - end; -end; - -procedure TdxLayoutGroupWebPainter.DrawFrame; -var - R: TRect; - I: Integer; -begin - R := ViewInfo.Bounds; - for I := 1 to ViewInfo.Options.FrameWidth do - begin - Canvas.FrameRect(R, ViewInfo.Options.GetFrameColor); - InflateRect(R, -1, -1); - end; -end; - -{ TdxLayoutGroupCaptionStandardPainter } - -procedure TdxLayoutGroupCaptionStandardPainter.DoDrawText; -{$IFDEF DELPHI7} -const - Enableds: array[Boolean] of Integer = (DTT_GRAYED, 0); -{$ENDIF} -begin -{$IFDEF DELPHI7} - if ThemeServices.ThemesEnabled then - with ViewInfo do - ThemeServices.DrawText(Canvas.Handle, ThemeServices.GetElementDetails(tbGroupBoxNormal), - Text, TextAreaBounds, cxFlagsToDTFlags(CalculateTextFlags), Enableds[Enabled]) - else - inherited; -{$ELSE} - inherited; -{$ENDIF} -end; - -function TdxLayoutGroupCaptionStandardPainter.GetViewInfo: TdxLayoutGroupCaptionStandardViewInfo; -begin - Result := inherited ViewInfo as TdxLayoutGroupCaptionStandardViewInfo; -end; - -{ TdxLayoutGroupCaptionWebPainter } - -procedure TdxLayoutGroupCaptionWebPainter.DrawBackground; -begin - if not TdxCustomLayoutItemCaptionViewInfoAccess(ViewInfo).IsTransparent then - begin - Canvas.Brush.Color := ViewInfo.Color; - Canvas.FillRect(ViewInfo.Bounds); - end; -end; - -{ TdxLayoutGroupStandardCaptionViewInfo } - -function TdxLayoutGroupCaptionStandardViewInfo.GetItemViewInfo: TdxLayoutGroupStandardViewInfo; -begin - Result := TdxLayoutGroupStandardViewInfo(inherited ItemViewInfo); -end; - -function TdxLayoutGroupCaptionStandardViewInfo.GetAlignHorz: TAlignment; -begin - Result := taCenter; -end; - -function TdxLayoutGroupCaptionStandardViewInfo.CalculateWidth: Integer; -begin - Result := inherited CalculateWidth; - if Visible then - Inc(Result, 2 + 2); -end; - -{ TdxLayoutGroupStandardViewInfo } - -function TdxLayoutGroupStandardViewInfo.GetStandardLookAndFeel: TdxLayoutStandardLookAndFeel; -begin - Result := TdxLayoutStandardLookAndFeel(inherited LayoutLookAndFeel); -end; - -procedure TdxLayoutGroupStandardViewInfo.CalculateCaptionViewInfoBounds; -var - ACaptionWidth: Integer; -begin - FCaptionAreaBounds := BorderBounds[sdTop]; - ACaptionWidth := CaptionViewInfo.CalculateWidth; - with FCaptionAreaBounds do - begin - case Item.CaptionOptions.AlignHorz of - taLeftJustify: - begin - Inc(Left, CaptionViewInfoOffset); - Right := Left + ACaptionWidth; - end; - taRightJustify: - begin - Dec(Right, CaptionViewInfoOffset); - Left := Right - ACaptionWidth; - end; - taCenter: - begin - Left := (Left + Right - ACaptionWidth) div 2; - Right := Left + ACaptionWidth; - end; - end; - Bottom := Top + CaptionViewInfo.CalculateHeight; - end; -end; - -function TdxLayoutGroupStandardViewInfo.GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; -begin - Result := TdxLayoutGroupCaptionStandardViewInfo; -end; - -function TdxLayoutGroupStandardViewInfo.GetMinVisibleWidth: Integer; -begin - Result := inherited GetMinVisibleWidth; - if HasCaption then - Inc(Result, 2 * CaptionViewInfoOffset); -end; - -function TdxLayoutGroupStandardViewInfo.GetCaptionViewInfoOffset: Integer; -begin - Result := LayoutLookAndFeel.HDLUToPixels(CaptionViewInfo.Font, 7) - 2; -end; - -function TdxLayoutGroupStandardViewInfo.GetFrameBounds: TRect; -begin - Result := Bounds; - Inc(Result.Top, LayoutLookAndFeel.VDLUToPixels(CaptionViewInfo.Font, 4) - - LayoutLookAndFeel.FrameWidths[sdTop] div 2); -end; - -{ TdxLayoutGroupOfficeCaptionViewInfo } - -function TdxLayoutGroupCaptionOfficeViewInfo.CalculateWidth: Integer; -var - AOffset: Integer; -begin - Result := inherited CalculateWidth; - if Visible then - begin - AOffset := LayoutLookAndFeel.HDLUToPixels(Font, 5); - if AlignHorz = taCenter then - AOffset := 2 * AOffset; - Inc(Result, AOffset); - end; -end; - -{ TdxLayoutGroupOfficeViewInfo } - -function TdxLayoutGroupOfficeViewInfo.GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; -begin - Result := TdxLayoutGroupCaptionOfficeViewInfo; -end; - -function TdxLayoutGroupOfficeViewInfo.GetCaptionViewInfoOffset: Integer; -begin - Result := 0; -end; - -function TdxLayoutGroupOfficeViewInfo.GetFrameBounds: TRect; -begin - Result := inherited GetFrameBounds; - Result.Bottom := Result.Top + 2; -end; - -function TdxLayoutGroupOfficeViewInfo.GetMinVisibleWidth: Integer; -begin - Result := inherited GetMinVisibleWidth; - if HasCaption then - Inc(Result, 20); -end; - -{ TdxLayoutGroupCaptionWebViewInfo } - -function TdxLayoutGroupCaptionWebViewInfo.GetItemViewInfo: TdxLayoutGroupWebViewInfo; -begin - Result := TdxLayoutGroupWebViewInfo(inherited ItemViewInfo); -end; - -function TdxLayoutGroupCaptionWebViewInfo.GetWebLookAndFeel: TdxLayoutWebLookAndFeel; -begin - Result := TdxLayoutWebLookAndFeel(inherited LayoutLookAndFeel); -end; - -function TdxLayoutGroupCaptionWebViewInfo.GetOptionsEx: TdxLayoutWebLookAndFeelGroupCaptionOptions; -begin - Result := TdxLayoutWebLookAndFeelGroupCaptionOptions(inherited Options); -end; - -function TdxLayoutGroupCaptionWebViewInfo.GetSeparatorWidth: Integer; -begin - Result := Options.SeparatorWidth; -end; - -function TdxLayoutGroupCaptionWebViewInfo.GetAlignVert: TdxAlignmentVert; -begin - Result := tavCenter; -end; - -function TdxLayoutGroupCaptionWebViewInfo.GetColor: TColor; -begin - Result := Options.GetColor; -end; - -function TdxLayoutGroupCaptionWebViewInfo.GetIsDefaultColor: Boolean; -begin - Result := Options.Color = clDefault; -end; - -function TdxLayoutGroupCaptionWebViewInfo.GetTextAreaBounds: TRect; -begin - Result := inherited GetTextAreaBounds; - Inc(Result.Left, TextOffset); -end; - -function TdxLayoutGroupCaptionWebViewInfo.GetTextOffset: Integer; -begin - if ItemViewInfo.Options.OffsetCaption then - Result := LookAndFeel.VDLUToPixels(Font, 5) - else - Result := LookAndFeel.DLUToPixels(Font, 2); -end; - -function TdxLayoutGroupCaptionWebViewInfo.CalculateHeight: Integer; -begin - if Visible then - Result := LookAndFeel.VDLUToPixels(Font, 11{12}) - else - Result := inherited CalculateHeight; -end; - -function TdxLayoutGroupCaptionWebViewInfo.CalculateMinWidth: Integer; -begin - Result := 2 * TextOffset + inherited CalculateMinWidth; -end; - -{ TdxLayoutGroupWebViewInfo } - -function TdxLayoutGroupWebViewInfo.GetCaptionViewInfo: TdxLayoutGroupCaptionWebViewInfo; -begin - Result := TdxLayoutGroupCaptionWebViewInfo(inherited CaptionViewInfo); -end; - -function TdxLayoutGroupWebViewInfo.GetInsideFrameBounds: TRect; -begin - Result := cxRectInflate(Bounds, -Options.FrameWidth, -Options.FrameWidth); -end; - -function TdxLayoutGroupWebViewInfo.GetWebLookAndFeel: TdxLayoutWebLookAndFeel; -begin - Result := TdxLayoutWebLookAndFeel(inherited LayoutLookAndFeel); -end; - -function TdxLayoutGroupWebViewInfo.GetOptionsEx: TdxLayoutWebLookAndFeelGroupOptions; -begin - Result := TdxLayoutWebLookAndFeelGroupOptions(inherited Options); -end; - -procedure TdxLayoutGroupWebViewInfo.CalculateCaptionViewInfoBounds; -begin - FCaptionAreaBounds := InsideFrameBounds; - FCaptionAreaBounds.Bottom := FCaptionAreaBounds.Top + CaptionViewInfo.CalculateHeight; -end; - -function TdxLayoutGroupWebViewInfo.GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; -begin - Result := TdxLayoutGroupCaptionWebViewInfo; -end; - -function TdxLayoutGroupWebViewInfo.GetMinVisibleWidth: Integer; -begin - Result := inherited GetMinVisibleWidth; - Inc(Result, 2 * Options.FrameWidth); -end; - -function TdxLayoutGroupWebViewInfo.GetRestSpaceBounds: TRect; -begin - Result := cxRectInflate(inherited GetRestSpaceBounds, -Options.FrameWidth, -Options.FrameWidth); - if HasCaption then - Result.Top := CaptionViewInfo.Bounds.Bottom; - if Options.HasCaptionSeparator(HasCaption) then - Inc(Result.Top, CaptionViewInfo.SeparatorWidth); -end; - -function TdxLayoutGroupWebViewInfo.GetCaptionSeparatorAreaBounds: TRect; -begin - Result := RestSpaceBounds; - Result.Bottom := Result.Top; - Dec(Result.Top, CaptionViewInfo.SeparatorWidth); -end; - -function TdxLayoutGroupWebViewInfo.GetCaptionSeparatorBounds: TRect; -begin - Result := CaptionSeparatorAreaBounds; - if not Options.OffsetCaption and not Options.OffsetItems and - (Options.FrameWidth = 0) and (CaptionViewInfo.Color = Color) then - begin - Result.Left := ClientBounds.Left; - Result.Right := ClientBounds.Right; - end; -end; - -{ TdxLayoutGroupCaptionCxLookAndFeelViewInfo } - -function TdxLayoutGroupCaptionCxLookAndFeelViewInfo.CalculateHeight: Integer; -begin - with CaptionContentOffsets do - Result := inherited CalculateHeight + Top + Bottom; -end; - -function TdxLayoutGroupCaptionCxLookAndFeelViewInfo.CalculateWidth: Integer; -begin - with CaptionContentOffsets do - Result := inherited CalculateWidth + Left + Right; -end; - -function TdxLayoutGroupCaptionCxLookAndFeelViewInfo.GetCaptionContentOffsets: TRect; -begin - Result := LookAndFeelPainter.GroupBoxBorderSize(True, cxgpTop); -end; - -function TdxLayoutGroupCaptionCxLookAndFeelViewInfo.GetIsSkinPainterUsed: Boolean; -begin - Result := TdxLayoutCxLookAndFeel(LayoutLookAndFeel).IsSkinPainterUsed; -end; - -function TdxLayoutGroupCaptionCxLookAndFeelViewInfo.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := TdxLayoutCxLookAndFeel(LayoutLookAndFeel).LookAndFeel.Painter; -end; - -function TdxLayoutGroupCaptionCxLookAndFeelViewInfo.GetAlignHorz: TAlignment; -begin - if IsSkinPainterUsed then - Result := Item.CaptionOptions.AlignHorz - else - Result := inherited GetAlignHorz; -end; - -function TdxLayoutGroupCaptionCxLookAndFeelViewInfo.GetTextAreaBounds: TRect; -begin - Result := cxRectContent(inherited GetTextAreaBounds, CaptionContentOffsets); -end; - -function TdxLayoutGroupCaptionCxLookAndFeelViewInfo.GetTextColor: TColor; -begin - Result := LookAndFeelPainter.GroupBoxTextColor(Enabled, cxgpTop); - if Result = clDefault then - Result := inherited GetTextColor; -end; - -{ TdxLayoutGroupCxLookAndFeelViewInfo } - -procedure TdxLayoutGroupCxLookAndFeelViewInfo.CalculateCaptionViewInfoBounds; -begin - if IsSkinPainterUsed then - begin - FCaptionAreaBounds := Bounds; - FCaptionAreaBounds.Bottom := FCaptionAreaBounds.Top + CaptionViewInfo.CalculateHeight; - end - else - inherited CalculateCaptionViewInfoBounds; -end; - -function TdxLayoutGroupCxLookAndFeelViewInfo.CanDrawBackground: Boolean; -begin - Result := not (IsDefaultColor or IsTransparent) or Specific.CanDrawBackground or - (Group.IsRoot and TdxLayoutControlViewInfoAccess(ContainerViewInfo).NeedHighlightRoot); -end; - -function TdxLayoutGroupCxLookAndFeelViewInfo.GetBorderWidth(ASide: TdxLayoutSide): Integer; -begin - Result := inherited GetBorderWidth(ASide); - if (ASide = sdTop) and IsSkinPainterUsed and Group.ShowBorder and Group.ShowCaption and not Group.Hidden then - Inc(Result, CaptionViewInfo.CalculateHeight); -end; - -function TdxLayoutGroupCxLookAndFeelViewInfo.GetCaptionViewInfoClass: TdxCustomLayoutItemCaptionViewInfoClass; -begin - Result := TdxLayoutGroupCaptionCxLookAndFeelViewInfo; -end; - -function TdxLayoutGroupCxLookAndFeelViewInfo.GetCaptionViewInfoOffset: Integer; -begin - if IsSkinPainterUsed then - Result := LookAndFeelPainter.GroupBoxBorderSize(True, cxgpTop).Left - else - Result := inherited GetCaptionViewInfoOffset; -end; - -function TdxLayoutGroupCxLookAndFeelViewInfo.GetFrameBounds: TRect; -begin - if IsSkinPainterUsed then - begin - Result := Bounds; - Inc(Result.Top, CaptionViewInfo.CalculateHeight); - end - else - Result := inherited GetFrameBounds; -end; - -function TdxLayoutGroupCxLookAndFeelViewInfo.GetIsSkinPainterUsed: Boolean; -begin - Result := TdxLayoutCxLookAndFeel(LayoutLookAndFeel).IsSkinPainterUsed; -end; - -function TdxLayoutGroupCxLookAndFeelViewInfo.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := TdxLayoutCxLookAndFeel(LayoutLookAndFeel).LookAndFeelPainter; -end; - -{ TdxLayoutGroupCaptionCxLookAndFeelPainter } - -procedure TdxLayoutGroupCaptionCxLookAndFeelPainter.DoDrawText; -begin - with TdxLayoutGroupCaptionCxLookAndFeelViewInfo(ViewInfo) do - Self.Canvas.DrawText(Text, TextAreaBounds, CalculateTextFlags); -end; - -procedure TdxLayoutGroupCaptionCxLookAndFeelPainter.DrawBackground; -begin - LookAndFeelPainter.DrawGroupBoxCaption(Canvas, ViewInfo.Bounds, cxgpTop); -end; - -function TdxLayoutGroupCaptionCxLookAndFeelPainter.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := TdxLayoutCxLookAndFeel(LayoutLookAndFeel).LookAndFeelPainter; -end; - -{ TdxLayoutGroupCxLookAndFeelPainter } - -procedure TdxLayoutGroupCxLookAndFeelPainter.DrawFrame; -const - CaptionPositionMap: array[Boolean] of TcxGroupBoxCaptionPosition = (cxgpCenter, cxgpTop); -begin - LookAndFeelPainter.DrawGroupBoxFrame(Canvas, ViewInfo.FrameBounds, - ViewInfo.Enabled, CaptionPositionMap[ViewInfo.HasCaption]); -end; - -function TdxLayoutGroupCxLookAndFeelPainter.GetCaptionPainterClass: TdxCustomLayoutItemCaptionPainterClass; -begin - Result := TdxLayoutGroupCaptionCxLookAndFeelPainter; -end; - -function TdxLayoutGroupCxLookAndFeelPainter.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := TdxLayoutCxLookAndFeel(LayoutLookAndFeel).LookAndFeelPainter; -end; - -{ TdxLayoutItemCxLookAndFeelViewInfo } - -function TdxLayoutItemCxLookAndFeelViewInfo.CanDrawBackground: Boolean; -begin - Result := False; -end; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutSelection.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutSelection.pas deleted file mode 100644 index 05abc24b..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutSelection.pas +++ /dev/null @@ -1,903 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl common routines } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutSelection; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, Graphics, Classes, Controls, cxClasses, cxGraphics; - -const - DXM_CHECKCHILDREN = WM_DX + 30; - -type - TdxSelectionAction = (saAdded, saChanged, saExtracted); - - { IdxSelectionChanged } - - IdxSelectionChanged = interface - ['{ECB1A3AE-1C91-4E5F-8ADC-34120676B1CA}'] - procedure SelectionChanged(ASelection: TList; AAction: TdxSelectionAction); - end; - - { IdxLayoutSelectableItem } - - IdxLayoutSelectableItem = interface - ['{2887168D-78EB-44A0-A440-E284B01BE407}'] - function CanDelete: Boolean; - function IsChild(AOwner: TComponent): Boolean; - procedure SelectComponent(AShift: TShiftState = []); - procedure SelectParent; - procedure SelectionChanged; - function IsDragged: Boolean; - function IsVisible: Boolean; - end; - - { IdxLayoutDesignerHelper } - - IdxLayoutDesignerHelper = interface - ['{B364658F-B4CE-46C3-83D5-D537F34B9482}'] - procedure AddSelectionChangedListener(AListener: TPersistent); - function IsActive: Boolean; - function CanDeleteComponent(AComponent: TComponent): Boolean; - procedure ClearSelection; - procedure DeleteSelection; - procedure GetSelection(AList: TList); - function IsComponentSelected(AComponent: TPersistent): Boolean; - procedure RemoveSelectionChangedListener(AListener: TPersistent); - procedure SelectComponent(AComponent: TPersistent; AShift: TShiftState = []); - procedure SetSelection(AList: TList); - function UniqueName(const BaseName: string): string; - end; - - { TdxLayoutRunTimeSelectionHelper } - - TdxLayoutRunTimeSelectionHelper = class(TcxOwnedPersistent, IdxLayoutDesignerHelper) - private - FListeners: TList; - FRefCount: Integer; - FSelectionList: TcxComponentList; - function GetComponent: TComponent; - procedure SelectionListNotifyHandler(Sender: TObject; AComponent: TComponent; AAction: TListNotification); - procedure SelectionListChangedHandler(Sender: TObject; AComponent: TComponent; AAction: TcxComponentCollectionNotification); - protected - function GetComponentClass(AComponent: TComponent): TComponentClass; - procedure NotifyListeners(AList: TList; AAction: TdxSelectionAction); - procedure SelectionListNotify(AComponent: TComponent; AAction: TListNotification); - - procedure DoDeleteComponents(AList: TcxComponentList); virtual; - - //IUnknown - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - - property Component: TComponent read GetComponent; - property Listeners: TList read FListeners; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - - // IdxLayoutControlSelectionController - procedure AddSelectionChangedListener(AListener: TPersistent); virtual; - procedure RemoveSelectionChangedListener(AListener: TPersistent); virtual; - - //IcxLayoutControlDesignerHelper - function IsActive: Boolean; virtual; - function CanDeleteComponent(AComponent: TComponent): Boolean; virtual; - procedure ClearSelection; virtual; - procedure DeleteSelection; virtual; - procedure GetSelection(AList: TList); virtual; - function IsComponentSelected(AComponent: TPersistent): Boolean; virtual; - procedure SelectComponent(AComponent: TPersistent; AShift: TShiftState = []); virtual; - procedure SetSelection(AList: TList); virtual; - function UniqueName(const BaseName: string): string; virtual; - end; - - TdxLayoutRunTimeSelectionHelperClass = class of TdxLayoutRunTimeSelectionHelper; - - { TdxSelectionLayer } - - TdxSelectionLayer = class(TCustomControl) - private - FSelectionImage: TcxAlphaBitmap; - FWindowCanvas: TcxCanvas; - FParentControl: TWinControl; - FOnHide: TNotifyEvent; - FOnShow: TNotifyEvent; - function GetWindowCanvas: TcxCanvas; - procedure SetParentControl(AValue: TWinControl); - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; - protected - procedure CreateParams(var Params: TCreateParams); override; - - procedure DoHide; virtual; - procedure DoShow; virtual; - procedure InternalPaint; virtual; - property WindowCanvas: TcxCanvas read GetWindowCanvas; - public - constructor Create(AParentControl: TWinControl; AParentWindow: HWND); reintroduce; virtual; - destructor Destroy; override; - - procedure Paint; override; - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; - - procedure InvalidateRect(const R: TRect); - procedure MoveTo(const P: TPoint); - procedure Hide; - procedure Show; - - property SelectionImage: TcxAlphaBitmap read FSelectionImage; - property ParentControl: TWinControl read FParentControl write SetParentControl; - property OnHide: TNotifyEvent read FOnHide write FOnHide; - property OnShow: TNotifyEvent read FOnShow write FOnShow; - end; - - { IdxCustomizeControlsHelper } - - IdxCustomizeControlsHelper = interface - ['{AD2130FB-EDA5-4034-A551-9C26A8DAAE41}'] - function CanProcessChildren: Boolean; - end; - - { TdxControlsDesignSelectorHelper } - - TdxControlsDesignSelectorHelperClass = class of TdxControlsDesignSelectorHelper; - - TdxControlsDesignSelectorHelper = class(TComponent) - private - FControl: TControl; - FControlWnd: THandle; - - FControlWndProcInstance: Pointer; - FDefaultControlWndProcInstance: Pointer; - FDefaultControlWndProc: TWndMethod; - - FChildren: TcxComponentList; - - FParent: TdxControlsDesignSelectorHelper; - FSelectorBounds: TRect; - - function GetControlWnd: THandle; - function GetParentControl: TWinControl; - procedure SetSelectorBounds(const AValue: TRect); - protected - procedure CallDefaultWndProc(var Message: TMessage); - procedure ControlWndProc(var Message: TMessage); - function DoControlWndProc(var Message: TMessage): Boolean; virtual; - - procedure CheckChildren; virtual; - function GetChildClass: TdxControlsDesignSelectorHelperClass; virtual; - procedure ParentCheckChildren; virtual; - - procedure PrepareChild(AItem: TdxControlsDesignSelectorHelper); virtual; - - function GetSelectorBoundsForChild(AChild: TdxControlsDesignSelectorHelper): TRect; - - function ClientToScreen(const P: TPoint): TPoint; - function ScreenToClient(const P: TPoint): TPoint; - - function IsActiveDesignSelector: Boolean; virtual; - function IsSelected: Boolean; virtual; - function IsValid: Boolean; virtual; - - function IsWinControl: Boolean; - function ControlAsWinControl: TWinControl; - - // Draw - function CanDrawDesignSelector: Boolean; virtual; - procedure DoDrawDesignSelector(DC: HDC); virtual; - procedure DrawDesignSelector(DC: HDC); - - property Children: TcxComponentList read FChildren; - property ControlWnd: THandle read GetControlWnd; - property Parent: TdxControlsDesignSelectorHelper read FParent write FParent; - property ParentControl: TWinControl read GetParentControl; - public - constructor Create(AOwner: TComponent); override; - constructor CreateEx(AControlWnd: THandle); virtual; - destructor Destroy; override; - - procedure Assign(Source: TPersistent); override; - - property Control: TControl read FControl; - property SelectorBounds: TRect read FSelectorBounds write SetSelectorBounds; - end; - -implementation - -uses - SysUtils, Types, cxGeometry; - -{ TdxLayoutControlRunTimeSelectionHelper } - -constructor TdxLayoutRunTimeSelectionHelper.Create(AOwner: TPersistent); -begin - inherited; - FSelectionList := TcxComponentList.Create; - FListeners := TList.Create; - FSelectionList.OnNotify := SelectionListNotifyHandler; - FSelectionList.OnComponentListChanged := SelectionListChangedHandler; -end; - -destructor TdxLayoutRunTimeSelectionHelper.Destroy; -begin - FreeAndNil(FSelectionList); - FreeAndNil(FListeners); - inherited; -end; - -procedure TdxLayoutRunTimeSelectionHelper.AddSelectionChangedListener(AListener: TPersistent); -begin - if (AListener <> nil) and Supports(AListener, IdxSelectionChanged) and - (FListeners.IndexOf(AListener) < 0) then - FListeners.Add(AListener); -end; - -procedure TdxLayoutRunTimeSelectionHelper.RemoveSelectionChangedListener(AListener: TPersistent); -begin - FListeners.Remove(AListener); -end; - -function TdxLayoutRunTimeSelectionHelper.IsActive: Boolean; -begin - Result := True; -end; - -function TdxLayoutRunTimeSelectionHelper.CanDeleteComponent( - AComponent: TComponent): Boolean; -var - ASelectableItem: IdxLayoutSelectableItem; -begin - Result := not (csDestroying in AComponent.ComponentState) and - Supports(AComponent, IdxLayoutSelectableItem, ASelectableItem) and - ASelectableItem.CanDelete; -end; - -procedure TdxLayoutRunTimeSelectionHelper.ClearSelection; -begin - FSelectionList.Clear; -end; - -procedure TdxLayoutRunTimeSelectionHelper.DeleteSelection; - - procedure CheckDeleteItems(AList: TcxComponentList); - var - I: Integer; - AIntf: IdxLayoutSelectableItem; - begin - for I := AList.Count - 1 downto 0 do - if not Supports(AList[0], IdxLayoutSelectableItem, AIntf) or not AIntf.CanDelete then - AList.Extract(AList[I]); - end; - -var - AList: TcxComponentList; -begin - AList := TcxComponentList.Create(True); - try - GetSelection(AList); - CheckDeleteItems(AList); - DoDeleteComponents(AList); - finally - AList.Free; - end; -end; - -procedure TdxLayoutRunTimeSelectionHelper.GetSelection(AList: TList); -var - I: Integer; -begin - for I := 0 to FSelectionList.Count - 1 do - AList.Add(FSelectionList[I]); -end; - -function TdxLayoutRunTimeSelectionHelper.IsComponentSelected(AComponent: TPersistent): Boolean; -begin - Result := FSelectionList.IndexOf(TComponent(AComponent)) <> -1; -end; - -procedure TdxLayoutRunTimeSelectionHelper.SelectComponent( - AComponent: TPersistent; AShift: TShiftState); -begin - FSelectionList.BeginUpdate; - try - if (ssCtrl in AShift) and IsComponentSelected(AComponent) then - FSelectionList.Delete(FSelectionList.IndexOf(TComponent(AComponent))) - else - begin - if [ssCtrl, ssShift] * AShift = [] then - ClearSelection; - if not IsComponentSelected(AComponent) then - FSelectionList.Add(TComponent(AComponent)); - end; - finally - FSelectionList.EndUpdate; - end; -end; - -procedure TdxLayoutRunTimeSelectionHelper.SetSelection(AList: TList); -var - I: Integer; -begin - FSelectionList.BeginUpdate; - try - ClearSelection; - for I := 0 to AList.Count - 1 do - if FSelectionList.IndexOf(AList[I]) = -1 then - FSelectionList.Add(AList[I]); - finally - FSelectionList.EndUpdate; - end; -end; - -function TdxLayoutRunTimeSelectionHelper.UniqueName(const BaseName: string): string; -begin - Result := ''; -end; - -function TdxLayoutRunTimeSelectionHelper.GetComponentClass(AComponent: TComponent): TComponentClass; -begin - Result := TComponentClass(AComponent.ClassType); -end; - -procedure TdxLayoutRunTimeSelectionHelper.NotifyListeners(AList: TList; AAction: TdxSelectionAction); -var - I: Integer; - AIntf: IdxSelectionChanged; -begin - for I := 0 to FListeners.Count - 1 do - if Supports(TObject(FListeners[I]), IdxSelectionChanged, AIntf) then - begin - AIntf.SelectionChanged(AList, AAction); - AIntf := nil; - end; -end; - -procedure TdxLayoutRunTimeSelectionHelper.SelectionListNotify(AComponent: TComponent; - AAction: TListNotification); -var - ASelectableItem: IdxLayoutSelectableItem; -begin - if not (csDestroying in AComponent.ComponentState) and - Supports(AComponent, IdxLayoutSelectableItem, ASelectableItem) then - ASelectableItem.SelectionChanged; -end; - -procedure TdxLayoutRunTimeSelectionHelper.DoDeleteComponents(AList: TcxComponentList); -var - ASavedOwnsObjects: Boolean; -begin - ASavedOwnsObjects := AList.OwnsObjects; - AList.OwnsObjects := True; - AList.Clear; - AList.OwnsObjects := ASavedOwnsObjects; -end; - -function TdxLayoutRunTimeSelectionHelper.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TdxLayoutRunTimeSelectionHelper._AddRef: Integer; -begin - Result := InterlockedIncrement(FRefCount); -end; - -function TdxLayoutRunTimeSelectionHelper._Release: Integer; -begin - Result := InterlockedDecrement(FRefCount); - if Result = 0 then - Destroy; -end; - -function TdxLayoutRunTimeSelectionHelper.GetComponent: TComponent; -begin - Result := TComponent(Owner); -end; - -procedure TdxLayoutRunTimeSelectionHelper.SelectionListNotifyHandler(Sender: TObject; - AComponent: TComponent; AAction: TListNotification); -begin - SelectionListNotify(AComponent, AAction); -end; - -procedure TdxLayoutRunTimeSelectionHelper.SelectionListChangedHandler(Sender: TObject; - AComponent: TComponent; AAction: TcxComponentCollectionNotification); -const - Action: array[TcxComponentCollectionNotification] of TdxSelectionAction = (saAdded, saChanged, saExtracted, saExtracted, saExtracted); -var - AList: TList; -begin - if AAction in [ccnAdded, ccnChanged, ccnExtracted] then - begin - AList := TList.Create; - try - GetSelection(AList); - NotifyListeners(AList, Action[AAction]); - finally - AList.Free; - end; - end; -end; - -{ TdxSelectionLayer } - -constructor TdxSelectionLayer.Create(AParentControl: TWinControl; AParentWindow: HWND); -begin - CreateParented(AParentWindow); - FSelectionImage := TcxAlphaBitmap.Create; - FWindowCanvas := TcxCanvas.Create(inherited Canvas); - Visible := False; - ParentControl := AParentControl; -end; - -destructor TdxSelectionLayer.Destroy; -begin - FreeAndNil(FWindowCanvas); - FreeAndNil(FSelectionImage); - inherited Destroy; -end; - -procedure TdxSelectionLayer.Paint; -begin - inherited; - InternalPaint; -end; - -procedure TdxSelectionLayer.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); -begin - inherited SetBounds(ALeft, ATop, AWidth, AHeight); - SelectionImage.SetSize(Width, Height); -end; - -procedure TdxSelectionLayer.InvalidateRect(const R: TRect); -begin - if HandleAllocated then - cxInvalidateRect(Handle, R, False); -end; - -procedure TdxSelectionLayer.MoveTo(const P: TPoint); -begin - SetBounds(P.X, P.Y, Width, Height); -end; - -procedure TdxSelectionLayer.Hide; -begin - if HandleAllocated then - begin - ShowWindow(Handle, SW_HIDE); - DoHide; - end; -end; - -procedure TdxSelectionLayer.Show; -begin - ShowWindow(Handle, SW_SHOWNOACTIVATE); - Update; - Invalidate; - BringWindowToTop(Handle); - DoShow; -end; - -procedure TdxSelectionLayer.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params do - begin - Style := Style and not WS_POPUP; - ExStyle := ExStyle or WS_EX_TOOLWINDOW or WS_EX_TOPMOST; - end; - if ParentControl <> nil then - Params.WndParent := ParentControl.Handle; -end; - -procedure TdxSelectionLayer.DoHide; -begin - CallNotify(FOnHide, Self); -end; - -procedure TdxSelectionLayer.DoShow; -begin - CallNotify(FOnShow, Self); -end; - -procedure TdxSelectionLayer.InternalPaint; -var -// R: TRect; - ABitmap: TcxBitmap32; -begin - ABitmap := TcxBitmap32.CreateSize(ClientRect); - try -// R := cxRectOffset(ClientRect, Left, Top); -//#DG cxPaintControlTo(ParentControl, ABitmap.cxCanvas, cxPointInvert(R.TopLeft), cxPointInvert(R.TopLeft), R, False); - cxPaintTo(ParentControl, ABitmap.cxCanvas, cxNullPoint, ClientRect); - cxAlphaBlend(ABitmap.cxCanvas.Handle, SelectionImage.cxCanvas.Handle, ClientRect, ClientRect); - cxBitBlt(WindowCanvas.Handle, ABitmap.cxCanvas.Handle, ClientRect, cxNullPoint, SRCCOPY); - finally - ABitmap.Free; - end; -end; - -function TdxSelectionLayer.GetWindowCanvas: TcxCanvas; -begin - Result := FWindowCanvas; -end; - -procedure TdxSelectionLayer.SetParentControl(AValue: TWinControl); -begin - if FParentControl <> AValue then - begin - FParentControl := AValue; - RecreateWnd; - end; -end; - -procedure TdxSelectionLayer.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - Message.Result := 1; -end; - -procedure TdxSelectionLayer.WMNCHitTest(var Message: TWMNCHitTest); -begin - Message.Result := HTTRANSPARENT; -end; - -{ TdxControlsDesignSelectorHelper } - -constructor TdxControlsDesignSelectorHelper.Create(AOwner: TComponent); -begin - inherited Create(nil); - FControl := AOwner as TControl; - FSelectorBounds := cxInvalidRect; - FChildren := TcxComponentList.Create(True); - if Control <> nil then - begin - FDefaultControlWndProc := Control.WindowProc; - Control.WindowProc := ControlWndProc; - end; -end; - -constructor TdxControlsDesignSelectorHelper.CreateEx(AControlWnd: THandle); -begin - Create(nil); - FControlWnd := AControlWnd; - FControlWndProcInstance := Classes.MakeObjectInstance(ControlWndProc); - FDefaultControlWndProcInstance := Pointer(GetWindowLong(ControlWnd, GWL_WNDPROC)); - SetWindowLong(ControlWnd, GWL_WNDPROC, Integer(FControlWndProcInstance)); -end; - -destructor TdxControlsDesignSelectorHelper.Destroy; -begin - if Assigned(FDefaultControlWndProc) then - begin - Control.WindowProc := FDefaultControlWndProc; - FDefaultControlWndProc := nil; - end - else - if FDefaultControlWndProcInstance <> nil then - begin - SetWindowLong(ControlWnd, GWL_WNDPROC, Integer(FDefaultControlWndProcInstance)); - Classes.FreeObjectInstance(FControlWndProcInstance); - end; - FreeAndNil(FChildren); - inherited Destroy; -end; - -procedure TdxControlsDesignSelectorHelper.Assign(Source: TPersistent); -var - AItem: TdxControlsDesignSelectorHelper; -begin - if Source is TdxControlsDesignSelectorHelper then - begin - AItem := Source as TdxControlsDesignSelectorHelper; - FSelectorBounds := AItem.GetSelectorBoundsForChild(Self); - CheckChildren; - end - else - inherited Assign(Source); -end; - -procedure TdxControlsDesignSelectorHelper.ControlWndProc(var Message: TMessage); - - procedure InternalPaint(DC: HDC); - var - ADC: HDC; - begin - if not IsActiveDesignSelector then - Exit; - if DC <> 0 then - DrawDesignSelector(DC) - else - if IsWinControl then - begin - ADC := GetWindowDC(ControlWnd); - DrawDesignSelector(ADC); - ReleaseDC(ControlWnd, ADC); - end; - end; - -begin - if DoControlWndProc(Message) then - CallDefaultWndProc(Message); - case Message.Msg of - CM_CONTROLCHANGE, DXM_CHECKCHILDREN: - CheckChildren; - WM_WINDOWPOSCHANGED: - ParentCheckChildren; - WM_PAINT: - InternalPaint(TWMPaint(Message).DC); - WM_NCPAINT: - InternalPaint(0); - end; -end; - -function TdxControlsDesignSelectorHelper.DoControlWndProc(var Message: TMessage): Boolean; - - function PtInSelectorBounds(const P: TPoint): Boolean; - begin - Result := PtInRect(SelectorBounds, P); - end; - -begin - Result := True; - if IsValid and IsActiveDesignSelector then - case Message.Msg of - WM_NCHITTEST: - if PtInSelectorBounds(ScreenToClient(Point(Message.LParamLo, Message.LParamHi))) then - begin - Message.Result := HTTRANSPARENT; - Result := False; - end; - CM_HITTEST: - if PtInSelectorBounds(Point(Message.LParamLo, Message.LParamHi)) then - begin - Message.Result := HTNOWHERE; - Result := False; - end; - end; -end; - -procedure TdxControlsDesignSelectorHelper.CallDefaultWndProc(var Message: TMessage); -begin - if FDefaultControlWndProcInstance <> nil then - with Message do - Result := CallWindowProc(FDefaultControlWndProcInstance, ControlWnd, Msg, WParam, LParam) - else - FDefaultControlWndProc(Message); -end; - -procedure TdxControlsDesignSelectorHelper.CheckChildren; - - procedure TryAddChild(AControl: TControl); overload; - var - AIntf: IdxCustomizeControlsHelper; - begin - if (csDestroying in AControl.ComponentState) or (Supports(AControl, IdxCustomizeControlsHelper, AIntf) and AIntf.CanProcessChildren) then - Exit; - PrepareChild(GetChildClass.Create(AControl)); - end; - - procedure TryAddChild(AControlWnd: THandle); overload; - begin - PrepareChild(GetChildClass.CreateEx(AControlWnd)); - end; - -var - I: Integer; - AControl: TControl; - AWnd: THandle; - AIntf: IdxCustomizeControlsHelper; -begin - FChildren.Clear; - if IsWinControl and ((Control <> nil) and (not Supports(Control, IdxCustomizeControlsHelper, AIntf) or not AIntf.CanProcessChildren)) then - begin - if Control <> nil then - for I := 0 to ControlAsWinControl.ControlCount - 1 do - TryAddChild(ControlAsWinControl.Controls[I]); - AWnd := GetWindow(ControlWnd, GW_CHILD); - if AWnd <> 0 then - AWnd := GetWindow(AWnd, GW_HWNDFIRST); - while AWnd <> 0 do - begin - AControl := FindControl(AWnd); - if (AControl <> nil) then - begin - if not ControlAsWinControl.ContainsControl(AControl) then - TryAddChild(AControl); - end - else - TryAddChild(AWnd); - AWnd := GetWindow(AWnd, GW_HWNDNEXT); - end; - end; -end; - -function TdxControlsDesignSelectorHelper.GetChildClass: TdxControlsDesignSelectorHelperClass; -begin - Result := TdxControlsDesignSelectorHelper; -end; - -procedure TdxControlsDesignSelectorHelper.ParentCheckChildren; -var - AParentHandle: THandle; -begin - if (Parent <> nil) and Parent.IsWinControl then - begin - AParentHandle := Parent.ControlWnd; - if AParentHandle <> 0 then - PostMessage(AParentHandle, DXM_CHECKCHILDREN, 0, 0); - end; -end; - -procedure TdxControlsDesignSelectorHelper.PrepareChild(AItem: TdxControlsDesignSelectorHelper); -begin - if FChildren.IndexOf(AItem) = -1 then - FChildren.Add(AItem); - AItem.Parent := Self; - AItem.Assign(Self); -end; - -function TdxControlsDesignSelectorHelper.GetSelectorBoundsForChild(AChild: TdxControlsDesignSelectorHelper): TRect; -var - P: TPoint; -begin - Result := SelectorBounds; - if AChild.IsWinControl and ((AChild.Control = nil) or AChild.ControlAsWinControl.HandleAllocated) then - P := ScreenToClient(AChild.ClientToScreen(cxNullPoint)) - else - P := AChild.Control.BoundsRect.TopLeft; - Result := cxRectOffset(Result, P, False); -end; - -function TdxControlsDesignSelectorHelper.ClientToScreen(const P: TPoint): TPoint; -begin - if IsWinControl and ((Control = nil) or ControlAsWinControl.HandleAllocated) then - begin - Result := P; - Windows.ClientToScreen(ControlWnd, Result); - end - else - Result := Control.ClientToScreen(P); -end; - -function TdxControlsDesignSelectorHelper.ScreenToClient(const P: TPoint): TPoint; -begin - if IsWinControl and ((Control = nil) or ControlAsWinControl.HandleAllocated) then - begin - Result := P; - Windows.ScreenToClient(ControlWnd, Result); - end - else - Result := Control.ScreenToClient(P); -end; - -function TdxControlsDesignSelectorHelper.IsActiveDesignSelector: Boolean; -var - R: TRect; -begin - GetWindowRect(ControlWnd, R); - Result := IsValid and (cxRectWidth(R) >= cxRectWidth(SelectorBounds)) and (cxRectHeight(R) >= cxRectHeight(SelectorBounds)); -end; - -function TdxControlsDesignSelectorHelper.IsSelected: Boolean; -begin - Result := False; -end; - -function TdxControlsDesignSelectorHelper.IsValid: Boolean; -begin - Result := not (csDestroying in ComponentState) and ((Control <> nil) or (ControlWnd <> 0)); -end; - -function TdxControlsDesignSelectorHelper.IsWinControl: Boolean; -begin - Result := ((Control = nil) and (FControlWnd <> 0)) or (Control is TWinControl); -end; - -function TdxControlsDesignSelectorHelper.ControlAsWinControl: TWinControl; -begin - Result := Control as TWinControl; -end; - -function TdxControlsDesignSelectorHelper.CanDrawDesignSelector: Boolean; -begin - Result := IsActiveDesignSelector and ((Parent = nil) or (IsWinControl and IsWindowVisible(ControlWnd))); -end; - -procedure TdxControlsDesignSelectorHelper.DoDrawDesignSelector(DC: HDC); -var - R: TRect; - P: TPoint; -begin - cxPaintCanvas.BeginPaint(DC); - try - SelectClipRgn(cxPaintCanvas.Handle, 0); - R := SelectorBounds; - if (Control <> nil) and not (csPaintCopy in Control.ControlState) and (Control.Parent <> nil) then - begin - P := Control.Parent.ScreenToClient(Control.ClientToScreen(cxNullPoint)); - P := cxPointOffset(P, Control.BoundsRect.TopLeft, False); - R := cxRectOffset(R, P); - end; - cxDrawDesignRect(cxPaintCanvas, R, IsSelected); - finally - cxPaintCanvas.EndPaint; - end; -end; - -procedure TdxControlsDesignSelectorHelper.DrawDesignSelector(DC: HDC); -begin - if CanDrawDesignSelector then - DoDrawDesignSelector(DC); -end; - -function TdxControlsDesignSelectorHelper.GetControlWnd: THandle; -begin - if IsWinControl then - begin - if (Control <> nil) and ControlAsWincontrol.HandleAllocated then - Result := ControlAsWincontrol.Handle - else - Result := FControlWnd; - end - else - Result := 0; -end; - -function TdxControlsDesignSelectorHelper.GetParentControl: TWinControl; -begin - Result := Control.Parent; -end; - -procedure TdxControlsDesignSelectorHelper.SetSelectorBounds(const AValue: TRect); -begin - if not EqualRect(AValue, FSelectorBounds) then - begin - FSelectorBounds := AValue; - CheckChildren; - if Control.Visible then - Control.Invalidate; - end; -end; - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutStrs.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutStrs.pas deleted file mode 100644 index f06c3aff..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutStrs.pas +++ /dev/null @@ -1,85 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl common routines } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutStrs; - -{$I cxVer.inc} - -interface - -resourcestring - - sdxLayoutControlContainerCannotBeControl = 'Container cannot be a control for its item.'; - sdxLayoutControlControlIsUsed = 'The %s control is already used by %s item.'; - - sdxLayoutControlNewGroupCaption = 'New Group'; - sdxLayoutControlRoot = 'Root'; - sdxLayoutControlNewItemCaption = 'New Item'; - - sdxLayoutControlCustomizeFormCaption = 'Customize'; - - sdxLayoutControlCustomizeFormAddGroup = 'Add Group'; - sdxLayoutControlCustomizeFormAddItem = 'Add Item'; - sdxLayoutControlCustomizeFormDelete = 'Delete'; - sdxLayoutControlCustomizeFormDeleteHint = 'Delete (Del)'; - sdxLayoutControlCustomizeFormAlignBy = 'Align by'; - sdxLayoutControlCustomizeFormClose = '&Close'; - sdxLayoutControlCustomizeFormExpandAll = 'Expand All'; - sdxLayoutControlCustomizeFormCollapseAll = 'Collapse All'; - sdxLayoutControlCustomizeFormAlignLeftSide = 'Left Side'; - sdxLayoutControlCustomizeFormAlignRightSide = 'Right Side'; - sdxLayoutControlCustomizeFormAlignTopSide = 'Top Side'; - sdxLayoutControlCustomizeFormAlignBottomSide = 'Bottom Side'; - sdxLayoutControlCustomizeFormAlignNone = 'None'; - sdxLayoutControlCustomizeFormTreeViewGroup = '&Layout Tree View'; - sdxLayoutControlCustomizeFormListViewGroup = '&Available Items'; - sdxLayoutControlCustomizeFormTabbedView = '&Tabbed View'; - sdxLayoutControlCustomizeFormTreeView = 'View as Tree / Plain List'; - sdxLayoutControlCustomizeFormStore = 'Store Layout'; - sdxLayoutControlCustomizeFormRestore = 'Restore Layout'; - sdxLayoutControlCustomizeFormRename = 'Rename'; - sdxLayoutControlCustomizeFormUndo = 'Undo'; - sdxLayoutControlCustomizeFormRedo = 'Redo'; - - sdxLayoutControlEditFormOK = 'OK'; - sdxLayoutControlEditFormCancel = 'Cancel'; - - // Dialogs - sdxLayoutControlDesignerCaptionFormat = '%s - Designer'; - -implementation - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutcxEditAdapters.pas b/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutcxEditAdapters.pas deleted file mode 100644 index b1f0dcf7..00000000 --- a/internal/x.46/ExpressLayout Control 2/Sources/dxLayoutcxEditAdapters.pas +++ /dev/null @@ -1,128 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressLayoutControl cxEditors adapters } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSLAYOUTCONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxLayoutcxEditAdapters; - -interface - -uses - Classes, dxLayoutControl, cxEdit; - -type - TdxLayoutcxEditAdapter = class(TdxCustomLayoutControlAdapter) - private - function GetControl: TcxCustomEdit; - function GetControlStyle: TcxCustomEditStyle; - protected - procedure Init; override; - procedure InternalLayoutLookAndFeelChanged; override; - function IsDefaultSkinAssigned: Boolean; - - property Control: TcxCustomEdit read GetControl; - property ControlStyle: TcxCustomEditStyle read GetControlStyle; - end; - -implementation - -uses - cxContainer, dxLayoutLookAndFeels, cxLookAndFeels; - -type - TcxCustomEditAccess = class(TcxCustomEdit); - TcxCustomEditStyleAccess = class(TcxCustomEditStyle); - TdxCustomLayoutLookAndFeelAccess = class(TdxCustomLayoutLookAndFeel); - -{ TdxLayoutcxEditAdapter } - -function TdxLayoutcxEditAdapter.GetControl: TcxCustomEdit; -begin - Result := TcxCustomEdit(inherited Control); -end; - -function TdxLayoutcxEditAdapter.GetControlStyle: TcxCustomEditStyle; -begin - Result := TcxCustomEditAccess(Control).Style; -end; - -function TdxLayoutcxEditAdapter.IsDefaultSkinAssigned: Boolean; -begin - with ControlStyle.LookAndFeel do - Result := (MasterLookAndFeel <> nil) and (MasterLookAndFeel.SkinName <> ''); -end; - -procedure TdxLayoutcxEditAdapter.Init; -begin - inherited; - TcxCustomEditStyleAccess(ControlStyle).HotTrack := False; -end; - -procedure TdxLayoutcxEditAdapter.InternalLayoutLookAndFeelChanged; -const - BorderStyles: array[TdxLayoutBorderStyle] of TcxEditBorderStyle = - (ebsNone, ebsSingle, ebsFlat, ebs3D); - ButtonStyles: array[TdxLayoutBorderStyle] of TcxEditButtonStyle = - (btsHotFlat, btsHotFlat, btsFlat, bts3D); - PopupBorderStyles: array[TdxLayoutBorderStyle] of TcxEditPopupBorderStyle = - (epbsSingle, epbsSingle, epbsFlat, epbsFrame3D); -var - AControlStyle: TcxCustomEditStyleAccess; - AItemBorderStyle: TdxLayoutBorderStyle; -begin - inherited; - AControlStyle := TcxCustomEditStyleAccess(ControlStyle); - if TdxCustomLayoutLookAndFeelAccess(LayoutLookAndFeel).DoesCxLookAndFeelHavePriority then - AControlStyle.AssignedValues := [] - else - begin - AItemBorderStyle := LayoutLookAndFeel.ItemOptions.ControlBorderStyle; - if AControlStyle.DefaultBorderStyle <> cbsNone then - begin - AControlStyle.BorderColor := LayoutLookAndFeel.ItemOptions.GetControlBorderColor; - AControlStyle.BorderStyle := BorderStyles[AItemBorderStyle]; - end; - AControlStyle.ButtonStyle := ButtonStyles[AItemBorderStyle]; - AControlStyle.PopupBorderStyle := PopupBorderStyles[AItemBorderStyle]; - end; -end; - -initialization - RegisterClasses([TdxLayoutcxEditAdapter]); - TdxLayoutcxEditAdapter.Register(TcxCustomEdit); - -finalization - TdxLayoutcxEditAdapter.Unregister(TcxCustomEdit); - -end. diff --git a/internal/x.46/ExpressLayout Control 2/Whats New.pdf b/internal/x.46/ExpressLayout Control 2/Whats New.pdf deleted file mode 100644 index 1888973c..00000000 Binary files a/internal/x.46/ExpressLayout Control 2/Whats New.pdf and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC10.bpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryC10.bpk deleted file mode 100644 index 7e1224f5..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryC10.bpk +++ /dev/null @@ -1,203 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = cxLibraryC10.bpl -OBJFILES = cxLibraryC10.obj cxStyleSheetEditor.obj \ - cxContainer.obj cxControls.obj \ - cxGraphics.obj cxLookAndFeelPainters.obj \ - cxLookAndFeels.obj cxScrollBar.obj \ - cxStorage.obj cxStyles.obj cxDateUtils.obj cxFormats.obj \ - cxClasses.obj cxLibraryStrs.obj cxPropertiesStore.obj \ - cxConverterUtils.obj cxCustomConverter.obj cxLibraryConsts.obj \ - cxGeometry.obj cxDrawTextUtils.obj cxAccessibility.obj cxDWMApi.obj \ - dxSkinInfo.obj dxSkinsCore.obj dxSkinsStrs.obj dxFading.obj cxLocalization.obj -RESFILES = cxLibraryC10.res -MAINSOURCE = cxLibraryC10.cpp -RESDEPEN = $(RESFILES) cxStyleSheetEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dxThemeC10.bpi dxGDIPlusC10.bpi rtl.bpi vcl.bpi vclx.bpi dxCoreC10.bpi -SPARELIBS = dxThemeC10.lib dxGDIPlusC10.lib rtl.lib vcl.lib vclx.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Library by Developer Express Inc." \ - -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC10.cpp b/internal/x.46/ExpressLibrary/Packages/cxLibraryC10.cpp deleted file mode 100644 index 8db42412..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryC10.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxLibraryC10.res"); -USEPACKAGE("dxGDIPlusC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEFORMNS("cxStyleSheetEditor.pas", Cxstylesheeteditor, frmcxStyleSheetEditor); -USEUNIT("cxContainer.pas"); -USEUNIT("cxControls.pas"); -USEUNIT("cxGraphics.pas"); -USEUNIT("cxLookAndFeelPainters.pas"); -USEUNIT("cxLookAndFeels.pas"); -USEUNIT("cxScrollBar.pas"); -USEUNIT("cxStorage.pas"); -USEUNIT("cxStyles.pas"); -USEUNIT("cxClasses.pas"); -USEUNIT("cxLibraryStrs.pas"); -USEUNIT("cxPropertiesStore.pas"); -USEUNIT("cxConverterUtils.pas"); -USEUNIT("cxCustomConverter.pas"); -USEUNIT("cxGeometry.pas"); -USEUNIT("cxDrawTextUtils.pas"); -USEUNIT("cxAccessibility.pas"); -USEUNIT("cxDWMApi.pas"); -USEUNIT("cxDateUtils.pas"); -USEUNIT("cxFormats.pas"); -USEUNIT("cxLibraryConsts.pas"); -USEUNIT("dxSkinInfo.pas"); -USEUNIT("dxSkinsCore.pas"); -USEUNIT("dxSkinsStrs.pas"); -USEUNIT("dxFading.pas"); -USEUNIT("cxLocalization.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC10.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryC10.res deleted file mode 100644 index af57f605..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryC10.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC11.bpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryC11.bpk deleted file mode 100644 index d9ef0ba1..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryC11.bpk +++ /dev/null @@ -1,203 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = cxLibraryC11.bpl -OBJFILES = cxLibraryC11.obj cxStyleSheetEditor.obj \ - cxContainer.obj cxControls.obj \ - cxGraphics.obj cxLookAndFeelPainters.obj \ - cxLookAndFeels.obj cxScrollBar.obj \ - cxStorage.obj cxStyles.obj cxDateUtils.obj cxFormats.obj \ - cxClasses.obj cxLibraryStrs.obj cxPropertiesStore.obj \ - cxConverterUtils.obj cxCustomConverter.obj cxLibraryConsts.obj \ - cxGeometry.obj cxDrawTextUtils.obj cxAccessibility.obj cxDWMApi.obj \ - dxSkinInfo.obj dxSkinsCore.obj dxSkinsStrs.obj dxFading.obj cxLocalization.obj -RESFILES = cxLibraryC11.res -MAINSOURCE = cxLibraryC11.cpp -RESDEPEN = $(RESFILES) cxStyleSheetEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dxThemeC11.bpi dxGDIPlusC11.bpi rtl.bpi vcl.bpi vclx.bpi dxCoreC11.bpi -SPARELIBS = dxThemeC11.lib dxGDIPlusC11.lib rtl.lib vcl.lib vclx.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Library by Developer Express Inc." \ - -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC11.cpp b/internal/x.46/ExpressLibrary/Packages/cxLibraryC11.cpp deleted file mode 100644 index 20bcff1d..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryC11.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxLibraryC11.res"); -USEPACKAGE("dxGDIPlusC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEFORMNS("cxStyleSheetEditor.pas", Cxstylesheeteditor, frmcxStyleSheetEditor); -USEUNIT("cxContainer.pas"); -USEUNIT("cxControls.pas"); -USEUNIT("cxGraphics.pas"); -USEUNIT("cxLookAndFeelPainters.pas"); -USEUNIT("cxLookAndFeels.pas"); -USEUNIT("cxScrollBar.pas"); -USEUNIT("cxStorage.pas"); -USEUNIT("cxStyles.pas"); -USEUNIT("cxClasses.pas"); -USEUNIT("cxLibraryStrs.pas"); -USEUNIT("cxPropertiesStore.pas"); -USEUNIT("cxConverterUtils.pas"); -USEUNIT("cxCustomConverter.pas"); -USEUNIT("cxGeometry.pas"); -USEUNIT("cxDrawTextUtils.pas"); -USEUNIT("cxAccessibility.pas"); -USEUNIT("cxDWMApi.pas"); -USEUNIT("cxDateUtils.pas"); -USEUNIT("cxFormats.pas"); -USEUNIT("cxLibraryConsts.pas"); -USEUNIT("dxSkinInfo.pas"); -USEUNIT("dxSkinsCore.pas"); -USEUNIT("dxSkinsStrs.pas"); -USEUNIT("dxFading.pas"); -USEUNIT("cxLocalization.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC11.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryC11.res deleted file mode 100644 index cef36958..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryC11.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC12.bpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryC12.bpk deleted file mode 100644 index e7db9510..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryC12.bpk +++ /dev/null @@ -1,203 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = cxLibraryC12.bpl -OBJFILES = cxLibraryC12.obj cxStyleSheetEditor.obj \ - cxContainer.obj cxControls.obj \ - cxGraphics.obj cxLookAndFeelPainters.obj \ - cxLookAndFeels.obj cxScrollBar.obj \ - cxStorage.obj cxStyles.obj cxDateUtils.obj cxFormats.obj \ - cxClasses.obj cxLibraryStrs.obj cxPropertiesStore.obj \ - cxConverterUtils.obj cxCustomConverter.obj cxLibraryConsts.obj \ - cxGeometry.obj cxDrawTextUtils.obj cxAccessibility.obj cxDWMApi.obj \ - dxSkinInfo.obj dxSkinsCore.obj dxSkinsStrs.obj dxFading.obj cxLocalization.obj -RESFILES = cxLibraryC12.res -MAINSOURCE = cxLibraryC12.cpp -RESDEPEN = $(RESFILES) cxStyleSheetEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dxThemeC12.bpi dxGDIPlusC12.bpi rtl.bpi vcl.bpi vclx.bpi dxCoreC12.bpi -SPARELIBS = dxThemeC12.lib dxGDIPlusC12.lib rtl.lib vcl.lib vclx.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Library by Developer Express Inc." \ - -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC12.cpp b/internal/x.46/ExpressLibrary/Packages/cxLibraryC12.cpp deleted file mode 100644 index 0f3eea53..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryC12.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxLibraryC12.res"); -USEPACKAGE("dxGDIPlusC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEFORMNS("cxStyleSheetEditor.pas", Cxstylesheeteditor, frmcxStyleSheetEditor); -USEUNIT("cxContainer.pas"); -USEUNIT("cxControls.pas"); -USEUNIT("cxGraphics.pas"); -USEUNIT("cxLookAndFeelPainters.pas"); -USEUNIT("cxLookAndFeels.pas"); -USEUNIT("cxScrollBar.pas"); -USEUNIT("cxStorage.pas"); -USEUNIT("cxStyles.pas"); -USEUNIT("cxClasses.pas"); -USEUNIT("cxLibraryStrs.pas"); -USEUNIT("cxPropertiesStore.pas"); -USEUNIT("cxConverterUtils.pas"); -USEUNIT("cxCustomConverter.pas"); -USEUNIT("cxGeometry.pas"); -USEUNIT("cxDrawTextUtils.pas"); -USEUNIT("cxAccessibility.pas"); -USEUNIT("cxDWMApi.pas"); -USEUNIT("cxDateUtils.pas"); -USEUNIT("cxFormats.pas"); -USEUNIT("cxLibraryConsts.pas"); -USEUNIT("dxSkinInfo.pas"); -USEUNIT("dxSkinsCore.pas"); -USEUNIT("dxSkinsStrs.pas"); -USEUNIT("dxFading.pas"); -USEUNIT("cxLocalization.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC12.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryC12.res deleted file mode 100644 index cc6f85a4..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryC12.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC14.bpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryC14.bpk deleted file mode 100644 index 7dbb9846..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryC14.bpk +++ /dev/null @@ -1,203 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = cxLibraryC14.bpl -OBJFILES = cxLibraryC14.obj cxStyleSheetEditor.obj \ - cxContainer.obj cxControls.obj \ - cxGraphics.obj cxLookAndFeelPainters.obj \ - cxLookAndFeels.obj cxScrollBar.obj \ - cxStorage.obj cxStyles.obj cxDateUtils.obj cxFormats.obj \ - cxClasses.obj cxLibraryStrs.obj cxPropertiesStore.obj \ - cxConverterUtils.obj cxCustomConverter.obj cxLibraryConsts.obj \ - cxGeometry.obj cxDrawTextUtils.obj cxAccessibility.obj cxDWMApi.obj \ - dxSkinInfo.obj dxSkinsCore.obj dxSkinsStrs.obj dxFading.obj cxLocalization.obj -RESFILES = cxLibraryC14.res -MAINSOURCE = cxLibraryC14.cpp -RESDEPEN = $(RESFILES) cxStyleSheetEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dxThemeC14.bpi dxGDIPlusC14.bpi rtl.bpi vcl.bpi vclx.bpi dxCoreC14.bpi -SPARELIBS = dxThemeC14.lib dxGDIPlusC14.lib rtl.lib vcl.lib vclx.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Library by Developer Express Inc." \ - -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC14.cpp b/internal/x.46/ExpressLibrary/Packages/cxLibraryC14.cpp deleted file mode 100644 index 32d8b99f..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryC14.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxLibraryC14.res"); -USEPACKAGE("dxGDIPlusC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEFORMNS("cxStyleSheetEditor.pas", Cxstylesheeteditor, frmcxStyleSheetEditor); -USEUNIT("cxContainer.pas"); -USEUNIT("cxControls.pas"); -USEUNIT("cxGraphics.pas"); -USEUNIT("cxLookAndFeelPainters.pas"); -USEUNIT("cxLookAndFeels.pas"); -USEUNIT("cxScrollBar.pas"); -USEUNIT("cxStorage.pas"); -USEUNIT("cxStyles.pas"); -USEUNIT("cxClasses.pas"); -USEUNIT("cxLibraryStrs.pas"); -USEUNIT("cxPropertiesStore.pas"); -USEUNIT("cxConverterUtils.pas"); -USEUNIT("cxCustomConverter.pas"); -USEUNIT("cxGeometry.pas"); -USEUNIT("cxDrawTextUtils.pas"); -USEUNIT("cxAccessibility.pas"); -USEUNIT("cxDWMApi.pas"); -USEUNIT("cxDateUtils.pas"); -USEUNIT("cxFormats.pas"); -USEUNIT("cxLibraryConsts.pas"); -USEUNIT("dxSkinInfo.pas"); -USEUNIT("dxSkinsCore.pas"); -USEUNIT("dxSkinsStrs.pas"); -USEUNIT("dxFading.pas"); -USEUNIT("cxLocalization.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryC14.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryC14.res deleted file mode 100644 index 28783ea9..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryC14.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryD10.dpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryD10.dpk deleted file mode 100644 index 0da54bda..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryD10.dpk +++ /dev/null @@ -1,65 +0,0 @@ -package cxLibraryD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dxCoreD10, - dxGDIPlusD10, - dxThemeD10; - -contains - cxClasses, - cxControls, - cxGraphics, - cxLookAndFeelPainters, - cxLookAndFeels, - cxStorage, - cxStyles, - cxScrollBar, - cxStyleSheetEditor, - cxContainer, - cxLibraryStrs, - cxPropertiesStore, - cxConverterUtils, - cxCustomConverter, - cxGeometry, - cxDrawTextUtils, - cxAccessibility, - cxDateUtils, - cxFormats, - cxDWMApi, - cxLibraryConsts, - dxFading, - dxSkinInfo, - dxSkinsCore, - dxSkinsStrs, - cxLocalization; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryD10.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryD10.res deleted file mode 100644 index 96d6432c..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryD10.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryD11.dpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryD11.dpk deleted file mode 100644 index 5efe17a8..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryD11.dpk +++ /dev/null @@ -1,65 +0,0 @@ -package cxLibraryD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dxCoreD11, - dxGDIPlusD11, - dxThemeD11; - -contains - cxClasses, - cxControls, - cxGraphics, - cxLookAndFeelPainters, - cxLookAndFeels, - cxStorage, - cxStyles, - cxScrollBar, - cxStyleSheetEditor, - cxContainer, - cxLibraryStrs, - cxPropertiesStore, - cxConverterUtils, - cxCustomConverter, - cxGeometry, - cxDrawTextUtils, - cxAccessibility, - cxDateUtils, - cxFormats, - cxDWMApi, - cxLibraryConsts, - dxFading, - dxSkinInfo, - dxSkinsCore, - dxSkinsStrs, - cxLocalization; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryD11.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryD11.res deleted file mode 100644 index 2774e743..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryD11.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryD12.dpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryD12.dpk deleted file mode 100644 index 2154814f..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryD12.dpk +++ /dev/null @@ -1,65 +0,0 @@ -package cxLibraryD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dxCoreD12, - dxGDIPlusD12, - dxThemeD12; - -contains - cxClasses, - cxControls, - cxGraphics, - cxLookAndFeelPainters, - cxLookAndFeels, - cxStorage, - cxStyles, - cxScrollBar, - cxStyleSheetEditor, - cxContainer, - cxLibraryStrs, - cxPropertiesStore, - cxConverterUtils, - cxCustomConverter, - cxGeometry, - cxDrawTextUtils, - cxAccessibility, - cxDateUtils, - cxFormats, - cxDWMApi, - cxLibraryConsts, - dxFading, - dxSkinInfo, - dxSkinsCore, - dxSkinsStrs, - cxLocalization; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryD12.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryD12.res deleted file mode 100644 index dce385a6..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryD12.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryD14.dpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryD14.dpk deleted file mode 100644 index b913d1a7..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryD14.dpk +++ /dev/null @@ -1,65 +0,0 @@ -package cxLibraryD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dxCoreD14, - dxGDIPlusD14, - dxThemeD14; - -contains - cxClasses, - cxControls, - cxGraphics, - cxLookAndFeelPainters, - cxLookAndFeels, - cxStorage, - cxStyles, - cxScrollBar, - cxStyleSheetEditor, - cxContainer, - cxLibraryStrs, - cxPropertiesStore, - cxConverterUtils, - cxCustomConverter, - cxGeometry, - cxDrawTextUtils, - cxAccessibility, - cxDateUtils, - cxFormats, - cxDWMApi, - cxLibraryConsts, - dxFading, - dxSkinInfo, - dxSkinsCore, - dxSkinsStrs, - cxLocalization; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryD14.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryD14.res deleted file mode 100644 index 232ea7f6..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryD14.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryD9.dpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryD9.dpk deleted file mode 100644 index b273c3fe..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryD9.dpk +++ /dev/null @@ -1,65 +0,0 @@ -package cxLibraryD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dxCoreD9, - dxGDIPlusD9, - dxThemeD9; - -contains - cxClasses, - cxControls, - cxGraphics, - cxLookAndFeelPainters, - cxLookAndFeels, - cxStorage, - cxStyles, - cxScrollBar, - cxStyleSheetEditor, - cxContainer, - cxLibraryStrs, - cxPropertiesStore, - cxConverterUtils, - cxCustomConverter, - cxGeometry, - cxDrawTextUtils, - cxAccessibility, - cxDateUtils, - cxFormats, - cxDWMApi, - cxLibraryConsts, - dxFading, - dxSkinInfo, - dxSkinsCore, - dxSkinsStrs, - cxLocalization; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryD9.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryD9.res deleted file mode 100644 index 02168a95..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryD9.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLC6.bpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLC6.bpk deleted file mode 100644 index 899d6822..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLC6.bpk +++ /dev/null @@ -1,202 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = cxLibraryVCLC6.bpl -OBJFILES = cxLibraryVCLC6.obj cxStyleSheetEditor.obj \ - cxContainer.obj cxControls.obj \ - cxGraphics.obj cxLookAndFeelPainters.obj \ - cxLookAndFeels.obj cxScrollBar.obj \ - cxStorage.obj cxStyles.obj cxDateUtils.obj cxFormats.obj \ - cxClasses.obj cxLibraryStrs.obj cxPropertiesStore.obj \ - cxConverterUtils.obj cxCustomConverter.obj cxLibraryConsts.obj \ - cxGeometry.obj cxDrawTextUtils.obj cxAccessibility.obj cxDWMApi.obj dxFading.obj cxLocalization.obj -RESFILES = cxLibraryVCLC6.res -MAINSOURCE = cxLibraryVCLC6.cpp -RESDEPEN = $(RESFILES) cxStyleSheetEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dxThemeC6.bpi dxGDIPlusC6.bpi rtl.bpi vcl.bpi vclx.bpi dxCoreC6.bpi -SPARELIBS = dxThemeC6.lib dxGDIPlusC6.lib rtl.lib vcl.lib vclx.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Library (VCL Edition) by Developer Express Inc." \ - -aa -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLC6.cpp b/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLC6.cpp deleted file mode 100644 index 07e32ffd..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLC6.cpp +++ /dev/null @@ -1,47 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxLibraryVCLC6.res"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("dxGDIPlusC6.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEFORMNS("cxStyleSheetEditor.pas", Cxstylesheeteditor, frmcxStyleSheetEditor); -USEUNIT("cxContainer.pas"); -USEUNIT("cxControls.pas"); -USEUNIT("cxGraphics.pas"); -USEUNIT("cxLookAndFeelPainters.pas"); -USEUNIT("cxLookAndFeels.pas"); -USEUNIT("cxScrollBar.pas"); -USEUNIT("cxStorage.pas"); -USEUNIT("cxStyles.pas"); -USEUNIT("cxClasses.pas"); -USEUNIT("cxLibraryStrs.pas"); -USEUNIT("cxPropertiesStore.pas"); -USEUNIT("cxConverterUtils.pas"); -USEUNIT("cxCustomConverter.pas"); -USEUNIT("cxGeometry.pas"); -USEUNIT("cxDrawTextUtils.pas"); -USEUNIT("cxAccessibility.pas"); -USEUNIT("cxDWMApi.pas"); -USEUNIT("cxDateUtils.pas"); -USEUNIT("cxFormats.pas"); -USEUNIT("cxLibraryConsts.pas"); -USEUNIT("dxFading.pas"); -USEUNIT("cxLocalization.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLC6.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLC6.res deleted file mode 100644 index 9dc2347b..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLC6.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD6.dpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD6.dpk deleted file mode 100644 index 941b9f78..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD6.dpk +++ /dev/null @@ -1,65 +0,0 @@ -package cxLibraryVCLD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library (VCL Edition) by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dxCoreD6, - dxGDIPlusD6, - dxThemeD6; - -contains - cxClasses, - cxControls, - cxGraphics, - cxLookAndFeelPainters, - cxLookAndFeels, - cxStorage, - cxStyles, - cxScrollBar, - cxStyleSheetEditor, - cxContainer, - cxLibraryStrs, - cxPropertiesStore, - cxConverterUtils, - cxCustomConverter, - cxGeometry, - cxDrawTextUtils, - cxAccessibility, - cxDateUtils, - cxFormats, - cxDWMApi, - cxLibraryConsts, - dxFading, - dxSkinInfo, - dxSkinsCore, - dxSkinsStrs, - cxLocalization; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD6.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD6.res deleted file mode 100644 index 0c7a6f3e..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD6.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD7.dpk b/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD7.dpk deleted file mode 100644 index e787141b..00000000 --- a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD7.dpk +++ /dev/null @@ -1,65 +0,0 @@ -package cxLibraryVCLD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library (VCL Edition) by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dxCoreD7, - dxGDIPlusD7, - dxThemeD7; - -contains - cxClasses, - cxControls, - cxGraphics, - cxLookAndFeelPainters, - cxLookAndFeels, - cxStorage, - cxStyles, - cxScrollBar, - cxStyleSheetEditor, - cxContainer, - cxLibraryStrs, - cxPropertiesStore, - cxConverterUtils, - cxCustomConverter, - cxGeometry, - cxDrawTextUtils, - cxAccessibility, - cxDateUtils, - cxFormats, - cxDWMApi, - cxLibraryConsts, - dxFading, - dxSkinInfo, - dxSkinsCore, - dxSkinsStrs, - cxLocalization; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD7.res b/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD7.res deleted file mode 100644 index 9d2210e8..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/cxLibraryVCLD7.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC10.bpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC10.bpk deleted file mode 100644 index 91f8d952..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC10.bpk +++ /dev/null @@ -1,205 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxLibraryC10.bpl -OBJFILES = dclcxLibraryC10.obj cxClassesReg.obj \ - cxDesignWindows.obj \ - cxPropEditors.obj \ - cxStyleRepositoryEditor.obj \ - cxStyleSheetsLoad.obj cxLibraryReg.obj cxPropertiesStoreEditor.obj \ - cxImportDialog.obj cxConverterFactory.obj \ - cxComponentCollectionEditor.obj cxImageListEditor.obj cxImageListEditorView.obj -RESFILES = dclcxLibraryC10.res cxLibraryReg.dcr -MAINSOURCE = dclcxLibraryC10.cpp -RESDEPEN = $(RESFILES) cxDesignWindows.dfm \ - cxStyleRepositoryEditor.dfm \ - cxStyleSheetsLoad.dfm cxPropertiesStoreEditor.dfm \ - cxComponentCollectionEditor.dfm cxImageListEditorView.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dxGDIPlusC10.bpi cxLibraryC10.bpi dxThemeC10.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - vcldb.bpi dxCoreC10.bpi dcldxCoreC10.bpi -SPARELIBS = rtl.lib vcl.lib vclx.lib CXLIBRARYC10.lib dxGDIPlusC10.lib dbrtl.lib vcldb.lib dxCoreC10.lib dcldxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Library by Developer Express Inc." \ - -aa -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC10.cpp b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC10.cpp deleted file mode 100644 index 4b787c75..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC10.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxLibraryC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dcldxCoreC10.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("dxGDIPlusC10.bpi"); -USEUNIT("cxClassesReg.pas"); -USEFORMNS("cxDesignWindows.pas", Cxdesignwindows, cxDesignFormEditor); -USEUNIT("cxPropEditors.pas"); -USEFORMNS("cxStyleRepositoryEditor.pas", Cxstylerepositoryeditor, cxStyleRepositoryEditor); -USEFORMNS("cxStyleSheetsLoad.pas", Cxstylesheetsload, frmcxStyleSheetsLoad); -USEUNIT("cxLibraryReg.pas"); -USERES("cxLibraryReg.dcr"); -USEUNIT("cxPropertiesStoreEditor.pas"); -USEUNIT("cxImportDialog.pas"); -USEUNIT("cxConverterFactory.pas"); -USEFORMNS("cxComponentCollectionEditor.pas", Cxcomponentcollectioneditor, cxComponentCollectionEditor); -USEUNIT("cxImageListEditor.pas"); -USEFORMNS("cxImageListEditorView.pas", Cximagelisteditorview, cxImageListEditorView); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC10.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC10.res deleted file mode 100644 index b2a3ba00..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC10.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC11.bpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC11.bpk deleted file mode 100644 index 2b815f2b..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC11.bpk +++ /dev/null @@ -1,205 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxLibraryC11.bpl -OBJFILES = dclcxLibraryC11.obj cxClassesReg.obj \ - cxDesignWindows.obj \ - cxPropEditors.obj \ - cxStyleRepositoryEditor.obj \ - cxStyleSheetsLoad.obj cxLibraryReg.obj cxPropertiesStoreEditor.obj \ - cxImportDialog.obj cxConverterFactory.obj \ - cxComponentCollectionEditor.obj cxImageListEditor.obj cxImageListEditorView.obj -RESFILES = dclcxLibraryC11.res cxLibraryReg.dcr -MAINSOURCE = dclcxLibraryC11.cpp -RESDEPEN = $(RESFILES) cxDesignWindows.dfm \ - cxStyleRepositoryEditor.dfm \ - cxStyleSheetsLoad.dfm cxPropertiesStoreEditor.dfm \ - cxComponentCollectionEditor.dfm cxImageListEditorView.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dxGDIPlusC11.bpi cxLibraryC11.bpi dxThemeC11.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - vcldb.bpi dxCoreC11.bpi dcldxCoreC11.bpi -SPARELIBS = rtl.lib vcl.lib vclx.lib CXLIBRARYC11.lib dxGDIPlusC11.lib dbrtl.lib vcldb.lib dxCoreC11.lib dcldxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Library by Developer Express Inc." \ - -aa -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC11.cpp b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC11.cpp deleted file mode 100644 index 57ae0361..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC11.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxLibraryC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dcldxCoreC11.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("dxGDIPlusC11.bpi"); -USEUNIT("cxClassesReg.pas"); -USEFORMNS("cxDesignWindows.pas", Cxdesignwindows, cxDesignFormEditor); -USEUNIT("cxPropEditors.pas"); -USEFORMNS("cxStyleRepositoryEditor.pas", Cxstylerepositoryeditor, cxStyleRepositoryEditor); -USEFORMNS("cxStyleSheetsLoad.pas", Cxstylesheetsload, frmcxStyleSheetsLoad); -USEUNIT("cxLibraryReg.pas"); -USERES("cxLibraryReg.dcr"); -USEUNIT("cxPropertiesStoreEditor.pas"); -USEUNIT("cxImportDialog.pas"); -USEUNIT("cxConverterFactory.pas"); -USEFORMNS("cxComponentCollectionEditor.pas", Cxcomponentcollectioneditor, cxComponentCollectionEditor); -USEUNIT("cxImageListEditor.pas"); -USEFORMNS("cxImageListEditorView.pas", Cximagelisteditorview, cxImageListEditorView); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC11.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC11.res deleted file mode 100644 index 9e56c55a..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC11.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC12.bpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC12.bpk deleted file mode 100644 index ee20a6f9..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC12.bpk +++ /dev/null @@ -1,205 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxLibraryC12.bpl -OBJFILES = dclcxLibraryC12.obj cxClassesReg.obj \ - cxDesignWindows.obj \ - cxPropEditors.obj \ - cxStyleRepositoryEditor.obj \ - cxStyleSheetsLoad.obj cxLibraryReg.obj cxPropertiesStoreEditor.obj \ - cxImportDialog.obj cxConverterFactory.obj \ - cxComponentCollectionEditor.obj cxImageListEditor.obj cxImageListEditorView.obj -RESFILES = dclcxLibraryC12.res cxLibraryReg.dcr -MAINSOURCE = dclcxLibraryC12.cpp -RESDEPEN = $(RESFILES) cxDesignWindows.dfm \ - cxStyleRepositoryEditor.dfm \ - cxStyleSheetsLoad.dfm cxPropertiesStoreEditor.dfm \ - cxComponentCollectionEditor.dfm cxImageListEditorView.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dxGDIPlusC12.bpi cxLibraryC12.bpi dxThemeC12.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - vcldb.bpi dxCoreC12.bpi dcldxCoreC12.bpi -SPARELIBS = rtl.lib vcl.lib vclx.lib CXLIBRARYC12.lib dxGDIPlusC12.lib dbrtl.lib vcldb.lib dxCoreC12.lib dcldxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Library by Developer Express Inc." \ - -aa -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC12.cpp b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC12.cpp deleted file mode 100644 index 3d767f52..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC12.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxLibraryC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dcldxCoreC12.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("dxGDIPlusC12.bpi"); -USEUNIT("cxClassesReg.pas"); -USEFORMNS("cxDesignWindows.pas", Cxdesignwindows, cxDesignFormEditor); -USEUNIT("cxPropEditors.pas"); -USEFORMNS("cxStyleRepositoryEditor.pas", Cxstylerepositoryeditor, cxStyleRepositoryEditor); -USEFORMNS("cxStyleSheetsLoad.pas", Cxstylesheetsload, frmcxStyleSheetsLoad); -USEUNIT("cxLibraryReg.pas"); -USERES("cxLibraryReg.dcr"); -USEUNIT("cxPropertiesStoreEditor.pas"); -USEUNIT("cxImportDialog.pas"); -USEUNIT("cxConverterFactory.pas"); -USEFORMNS("cxComponentCollectionEditor.pas", Cxcomponentcollectioneditor, cxComponentCollectionEditor); -USEUNIT("cxImageListEditor.pas"); -USEFORMNS("cxImageListEditorView.pas", Cximagelisteditorview, cxImageListEditorView); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC12.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC12.res deleted file mode 100644 index 475d8d9a..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC12.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC14.bpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC14.bpk deleted file mode 100644 index 4de46a14..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC14.bpk +++ /dev/null @@ -1,205 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxLibraryC14.bpl -OBJFILES = dclcxLibraryC14.obj cxClassesReg.obj \ - cxDesignWindows.obj \ - cxPropEditors.obj \ - cxStyleRepositoryEditor.obj \ - cxStyleSheetsLoad.obj cxLibraryReg.obj cxPropertiesStoreEditor.obj \ - cxImportDialog.obj cxConverterFactory.obj \ - cxComponentCollectionEditor.obj cxImageListEditor.obj cxImageListEditorView.obj -RESFILES = dclcxLibraryC14.res cxLibraryReg.dcr -MAINSOURCE = dclcxLibraryC14.cpp -RESDEPEN = $(RESFILES) cxDesignWindows.dfm \ - cxStyleRepositoryEditor.dfm \ - cxStyleSheetsLoad.dfm cxPropertiesStoreEditor.dfm \ - cxComponentCollectionEditor.dfm cxImageListEditorView.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi dxGDIPlusC14.bpi cxLibraryC14.bpi dxThemeC14.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - vcldb.bpi dxCoreC14.bpi dcldxCoreC14.bpi -SPARELIBS = rtl.lib vcl.lib vclx.lib CXLIBRARYC14.lib dxGDIPlusC14.lib dbrtl.lib vcldb.lib dxCoreC14.lib dcldxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Library by Developer Express Inc." \ - -aa -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC14.cpp b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC14.cpp deleted file mode 100644 index ad3d3593..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC14.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxLibraryC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dcldxCoreC14.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("dxGDIPlusC14.bpi"); -USEUNIT("cxClassesReg.pas"); -USEFORMNS("cxDesignWindows.pas", Cxdesignwindows, cxDesignFormEditor); -USEUNIT("cxPropEditors.pas"); -USEFORMNS("cxStyleRepositoryEditor.pas", Cxstylerepositoryeditor, cxStyleRepositoryEditor); -USEFORMNS("cxStyleSheetsLoad.pas", Cxstylesheetsload, frmcxStyleSheetsLoad); -USEUNIT("cxLibraryReg.pas"); -USERES("cxLibraryReg.dcr"); -USEUNIT("cxPropertiesStoreEditor.pas"); -USEUNIT("cxImportDialog.pas"); -USEUNIT("cxConverterFactory.pas"); -USEFORMNS("cxComponentCollectionEditor.pas", Cxcomponentcollectioneditor, cxComponentCollectionEditor); -USEUNIT("cxImageListEditor.pas"); -USEFORMNS("cxImageListEditorView.pas", Cximagelisteditorview, cxImageListEditorView); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC14.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC14.res deleted file mode 100644 index a1ee5026..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryC14.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD10.dpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD10.dpk deleted file mode 100644 index 04257a67..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD10.dpk +++ /dev/null @@ -1,53 +0,0 @@ -package dclcxLibraryD10; - -{$R *.res} -{$R cxLibraryReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES ON} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD10, - dcldxCoreD10, - cxLibraryD10, - dxGDIPlusD10; - -contains - cxDesignWindows, - cxStyleRepositoryEditor, - cxPropEditors, - cxLibraryReg, - cxStyleSheetsLoad, - cxPropertiesStoreEditor, - cxImportDialog, - cxConverterFactory, - cxComponentCollectionEditor, - cxImageListEditor, - cxImageListEditorView, - cxClassesReg; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD10.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD10.res deleted file mode 100644 index 93801679..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD10.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD11.dpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD11.dpk deleted file mode 100644 index 67642415..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD11.dpk +++ /dev/null @@ -1,53 +0,0 @@ -package dclcxLibraryD11; - -{$R *.res} -{$R cxLibraryReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES ON} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD11, - dcldxCoreD11, - cxLibraryD11, - dxGDIPlusD11; - -contains - cxDesignWindows, - cxStyleRepositoryEditor, - cxPropEditors, - cxLibraryReg, - cxStyleSheetsLoad, - cxPropertiesStoreEditor, - cxImportDialog, - cxConverterFactory, - cxComponentCollectionEditor, - cxImageListEditor, - cxImageListEditorView, - cxClassesReg; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD11.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD11.res deleted file mode 100644 index 8a31f8ea..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD11.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD12.dpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD12.dpk deleted file mode 100644 index 01c4c14a..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD12.dpk +++ /dev/null @@ -1,52 +0,0 @@ -package dclcxLibraryD12; - -{$R *.res} -{$R cxLibraryReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES ON} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD12, - dcldxCoreD12, - cxLibraryD12; - -contains - cxDesignWindows, - cxStyleRepositoryEditor, - cxPropEditors, - cxLibraryReg, - cxStyleSheetsLoad, - cxPropertiesStoreEditor, - cxImportDialog, - cxConverterFactory, - cxComponentCollectionEditor, - cxImageListEditor, - cxImageListEditorView, - cxClassesReg; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD12.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD12.res deleted file mode 100644 index 69f4c43e..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD12.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD14.dpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD14.dpk deleted file mode 100644 index 5eaad895..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD14.dpk +++ /dev/null @@ -1,52 +0,0 @@ -package dclcxLibraryD14; - -{$R *.res} -{$R cxLibraryReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES ON} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD14, - dcldxCoreD14, - cxLibraryD14; - -contains - cxDesignWindows, - cxStyleRepositoryEditor, - cxPropEditors, - cxLibraryReg, - cxStyleSheetsLoad, - cxPropertiesStoreEditor, - cxImportDialog, - cxConverterFactory, - cxComponentCollectionEditor, - cxImageListEditor, - cxImageListEditorView, - cxClassesReg; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD14.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD14.res deleted file mode 100644 index f643bfed..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD14.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD9.dpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD9.dpk deleted file mode 100644 index 9e7d6eea..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD9.dpk +++ /dev/null @@ -1,52 +0,0 @@ -package dclcxLibraryD9; - -{$R *.res} -{$R cxLibraryReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES ON} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD9, - dcldxCoreD9, - cxLibraryD9, - dxGDIPlusD9; - -contains - cxDesignWindows, - cxStyleRepositoryEditor, - cxPropEditors, - cxLibraryReg, - cxStyleSheetsLoad, - cxPropertiesStoreEditor, - cxImportDialog, - cxConverterFactory, - cxImageListEditor, - cxImageListEditorView, - cxClassesReg; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD9.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD9.res deleted file mode 100644 index d566f028..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryD9.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLC6.bpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLC6.bpk deleted file mode 100644 index 2255838a..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLC6.bpk +++ /dev/null @@ -1,204 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxLibraryVCLC6.bpl -OBJFILES = dclcxLibraryVCLC6.obj cxClassesReg.obj \ - cxDesignWindows.obj \ - cxPropEditors.obj cxStyleRepositoryEditor.obj \ - cxStyleSheetsLoad.obj cxLibraryReg.obj cxPropertiesStoreEditor.obj \ - cxImportDialog.obj cxConverterFactory.obj \ - cxComponentCollectionEditor.obj cxImageListEditor.obj cxImageListEditorView.obj -RESFILES = dclcxLibraryVCLC6.res cxLibraryReg.dcr -MAINSOURCE = dclcxLibraryVCLC6.cpp -RESDEPEN = $(RESFILES) cxDesignWindows.dfm \ - cxStyleRepositoryEditor.dfm \ - cxStyleSheetsLoad.dfm cxPropertiesStoreEditor.dfm \ - cxComponentCollectionEditor.dfm cxImageListEditorView.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = designide.bpi cxLibraryVCLC6.bpi dxGDIPlusC6.bpi dxThemeC6.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - vcldb.bpi dxCoreC6.bpi dcldxCoreC6.bpi -SPARELIBS = rtl.lib vcl.lib vclx.lib CXLIBRARYVCLC6.lib dxGDIPlusC6.lib dbrtl.lib vcldb.lib dxCoreC6.lib dcldxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform Library (VCL Edition) by Developer Express Inc." \ - -aa -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLC6.cpp b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLC6.cpp deleted file mode 100644 index 76105345..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLC6.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxLibraryVCLC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dcldxCoreC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("Vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("dxGDIPlusC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEUNIT("cxClassesReg.pas"); -USEFORMNS("cxDesignWindows.pas", Cxdesignwindows, cxDesignFormEditor); -USEUNIT("cxPropEditors.pas"); -USEFORMNS("cxStyleRepositoryEditor.pas", Cxstylerepositoryeditor, cxStyleRepositoryEditor); -USEFORMNS("cxStyleSheetsLoad.pas", Cxstylesheetsload, frmcxStyleSheetsLoad); -USEUNIT("cxLibraryReg.pas"); -USERES("cxLibraryReg.dcr"); -USEUNIT("cxPropertiesStoreEditor.pas"); -USEUNIT("cxImportDialog.pas"); -USEUNIT("cxConverterFactory.pas"); -USEFORMNS("cxComponentCollectionEditor.pas", Cxcomponentcollectioneditor, cxComponentCollectionEditor); -USEUNIT("cxImageListEditor.pas"); -USEFORMNS("cxImageListEditorView.pas", Cximagelisteditorview, cxImageListEditorView); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLC6.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLC6.res deleted file mode 100644 index 74162c57..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLC6.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD6.dpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD6.dpk deleted file mode 100644 index 5cf2025d..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD6.dpk +++ /dev/null @@ -1,53 +0,0 @@ -package dclcxLibraryVCLD6; - -{$R *.res} -{$R cxLibraryReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES ON} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library (VCL Edition) by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD6, - dcldxCoreD6, - cxLibraryVCLD6, - dxGDIPlusD6; - -contains - cxDesignWindows, - cxStyleRepositoryEditor, - cxPropEditors, - cxLibraryReg, - cxStyleSheetsLoad, - cxPropertiesStoreEditor, - cxImportDialog, - cxConverterFactory, - cxComponentCollectionEditor, - cxImageListEditor, - cxImageListEditorView, - cxClassesReg; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD6.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD6.res deleted file mode 100644 index 19b14d8c..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD6.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD7.dpk b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD7.dpk deleted file mode 100644 index e55bcdd5..00000000 --- a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD7.dpk +++ /dev/null @@ -1,53 +0,0 @@ -package dclcxLibraryVCLD7; - -{$R *.res} -{$R cxLibraryReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES ON} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform Library (VCL Edition) by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxCoreD7, - dcldxCoreD7, - cxLibraryVCLD7, - dxGDIPlusD7; - -contains - cxDesignWindows, - cxStyleRepositoryEditor, - cxPropEditors, - cxLibraryReg, - cxStyleSheetsLoad, - cxPropertiesStoreEditor, - cxImportDialog, - cxConverterFactory, - cxComponentCollectionEditor, - cxImageListEditor, - cxImageListEditorView, - cxClassesReg; - -end. diff --git a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD7.res b/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD7.res deleted file mode 100644 index 71b3a159..00000000 Binary files a/internal/x.46/ExpressLibrary/Packages/dclcxLibraryVCLD7.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Sources/Images/TcxImageList.bmp b/internal/x.46/ExpressLibrary/Sources/Images/TcxImageList.bmp deleted file mode 100644 index 37b7a605..00000000 Binary files a/internal/x.46/ExpressLibrary/Sources/Images/TcxImageList.bmp and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Sources/Images/TcxLocalizer.bmp b/internal/x.46/ExpressLibrary/Sources/Images/TcxLocalizer.bmp deleted file mode 100644 index c637929c..00000000 Binary files a/internal/x.46/ExpressLibrary/Sources/Images/TcxLocalizer.bmp and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Sources/Images/TcxLookAndFeelController.bmp b/internal/x.46/ExpressLibrary/Sources/Images/TcxLookAndFeelController.bmp deleted file mode 100644 index 4aad7998..00000000 Binary files a/internal/x.46/ExpressLibrary/Sources/Images/TcxLookAndFeelController.bmp and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Sources/Images/TcxPropertiesStore.bmp b/internal/x.46/ExpressLibrary/Sources/Images/TcxPropertiesStore.bmp deleted file mode 100644 index d7f5e928..00000000 Binary files a/internal/x.46/ExpressLibrary/Sources/Images/TcxPropertiesStore.bmp and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Sources/Images/TcxStyleRepository.bmp b/internal/x.46/ExpressLibrary/Sources/Images/TcxStyleRepository.bmp deleted file mode 100644 index 9f1488a8..00000000 Binary files a/internal/x.46/ExpressLibrary/Sources/Images/TcxStyleRepository.bmp and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Sources/cxAccessibility.pas b/internal/x.46/ExpressLibrary/Sources/cxAccessibility.pas deleted file mode 100644 index 226d6de1..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxAccessibility.pas +++ /dev/null @@ -1,1047 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library graphics classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxAccessibility; - -interface - -{$I cxVer.inc} - -uses - Windows, ActiveX, Classes, OleServer, Messages, dxCore, cxClasses; - -(*$HPPEMIT '#include *) - -const - cxAccessibleObjectSelfID = 0; - - SID_IcxAccessible = '{618736E0-3C3D-11CF-810C-00AA00389B71}'; - IID_IcxAccessible: TGUID = SID_IcxAccessible; - -type - TcxAccessibilityHelper = class; - - TcxAccessibleSimpleChildElementID = 0..MaxInt; - - TcxAccessibleObjectProperty = (aopDefaultAction, aopDescription, aopFocus, - aopLocation, aopShortcut, aopValue); - TcxAccessibleObjectProperties = set of TcxAccessibleObjectProperty; - - TcxAccessibleObjectHitTest = (aohtNone, aohtSelf, aohtChild); - - TcxAccessibilityNavigationDirection = (andLeft, andUp, andRight, andDown, - andPrev, andNext); - - { IcxAccessible } - - IcxAccessible = interface(IDispatch) - [SID_IcxAccessible] - function Get_accParent(out ppdispParent: IDispatch): HResult; stdcall; - function Get_accChildCount(out pcountChildren: Integer): HResult; stdcall; - function Get_accChild(varChild: OleVariant; out ppdispChild: IDispatch): HResult; stdcall; - function Get_accName(varChild: OleVariant; out pszName: WideString): HResult; stdcall; - function Get_accValue(varChild: OleVariant; out pszValue: WideString): HResult; stdcall; - function Get_accDescription(varChild: OleVariant; out pszDescription: WideString): HResult; stdcall; - function Get_accRole(varChild: OleVariant; out pvarRole: OleVariant): HResult; stdcall; - function Get_accState(varChild: OleVariant; out pvarState: OleVariant): HResult; stdcall; - function Get_accHelp(varChild: OleVariant; out pszHelp: WideString): HResult; stdcall; - function Get_accHelpTopic(out pszHelpFile: WideString; varChild: OleVariant; - out pidTopic: Integer): HResult; stdcall; - function Get_accKeyboardShortcut(varChild: OleVariant; out pszKeyboardShortcut: WideString): HResult; stdcall; - function Get_accFocus(out pvarChild: OleVariant): HResult; stdcall; - function Get_accSelection(out pvarChildren: OleVariant): HResult; stdcall; - function Get_accDefaultAction(varChild: OleVariant; out pszDefaultAction: WideString): HResult; stdcall; - function accSelect(flagsSelect: Integer; varChild: OleVariant): HResult; stdcall; - function accLocation(out pxLeft: Integer; out pyTop: Integer; out pcxWidth: Integer; - out pcyHeight: Integer; varChild: OleVariant): HResult; stdcall; - function accNavigate(navDir: Integer; varStart: OleVariant; out pvarEndUpAt: OleVariant): HResult; stdcall; - function accHitTest(xLeft: Integer; yTop: Integer; out pvarChild: OleVariant): HResult; stdcall; - function accDoDefaultAction(varChild: OleVariant): HResult; stdcall; - function Set_accName(varChild: OleVariant; const pszName: WideString): HResult; stdcall; - function Set_accValue(varChild: OleVariant; const pszValue: WideString): HResult; stdcall; - end; - - IcxAccessibilityHelper = interface - ['{D4890860-09B2-4648-BD9E-DFFBD140E5F1}'] - function GetHelper: TcxAccessibilityHelper; - procedure OwnerObjectDestroyed; - end; - - TcxAccessibilityHelper = class(TInterfacedObject, IDispatch, IOleWindow, - IcxAccessible, IcxAccessibilityHelper) - private - FIsOwnerObjectLive: Boolean; - - // IDispatch - function GetIDsOfNames(const IID: TGUID; Names: Pointer; - NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; stdcall; - function GetTypeInfo(Index, LocaleID: Integer; out TypeInfo): HResult; stdcall; - function GetTypeInfoCount(out Count: Integer): HResult; stdcall; - function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer; - Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; stdcall; - // IOleWindow - function ContextSensitiveHelp(fEnterMode: BOOL): HResult; stdcall; - function GetWindow(out wnd: HWnd): HResult; stdcall; - // IcxAccessible - function accDoDefaultAction(varChild: OleVariant): HResult; stdcall; - function accHitTest(xLeft: Integer; yTop: Integer; out pvarChild: OleVariant): HResult; stdcall; - function accLocation(out pxLeft: Integer; out pyTop: Integer; out pcxWidth: Integer; - out pcyHeight: Integer; varChild: OleVariant): HResult; stdcall; - function accNavigate(navDir: Integer; varStart: OleVariant; out pvarEndUpAt: OleVariant): HResult; stdcall; - function accSelect(flagsSelect: Integer; varChild: OleVariant): HResult; stdcall; - function Get_accChild(varChild: OleVariant; out ppdispChild: IDispatch): HResult; stdcall; - function Get_accChildCount(out pcountChildren: Integer): HResult; stdcall; - function Get_accDefaultAction(varChild: OleVariant; out pszDefaultAction: WideString): HResult; stdcall; - function Get_accDescription(varChild: OleVariant; out pszDescription: WideString): HResult; stdcall; - function Get_accFocus(out pvarChild: OleVariant): HResult; stdcall; - function Get_accHelp(varChild: OleVariant; out pszHelp: WideString): HResult; stdcall; - function Get_accHelpTopic(out pszHelpFile: WideString; varChild: OleVariant; - out pidTopic: Integer): HResult; stdcall; - function Get_accKeyboardShortcut(varChild: OleVariant; out pszKeyboardShortcut: WideString): HResult; stdcall; - function Get_accName(varChild: OleVariant; out pszName: WideString): HResult; stdcall; - function Get_accParent(out ppdispParent: IDispatch): HResult; stdcall; - function Get_accRole(varChild: OleVariant; out pvarRole: OleVariant): HResult; stdcall; - function Get_accSelection(out pvarChildren: OleVariant): HResult; stdcall; - function Get_accState(varChild: OleVariant; out pvarState: OleVariant): HResult; stdcall; - function Get_accValue(varChild: OleVariant; out pszValue: WideString): HResult; stdcall; - function Set_accName(varChild: OleVariant; const pszName: WideString): HResult; stdcall; - function Set_accValue(varChild: OleVariant; const pszValue: WideString): HResult; stdcall; - - function CheckIsOwnerObjectLive(out AErrorCode: HResult): Boolean; - procedure CheckSimpleChildElementToBeReturned(var AVarChild: OleVariant); - procedure CheckStringToBeReturned(const AStr: WideString; out AResult: HResult); - function GetSimpleChildElementID(AChildID: OleVariant; - out ASimpleChildElementID: TcxAccessibleSimpleChildElementID; - out AErrorCode: HResult): Boolean; - function GetVisible: Boolean; - protected - FOwnerObject: TObject; - - // IcxAccessibilityHelper - function GetHelper: TcxAccessibilityHelper; - procedure OwnerObjectDestroyed; virtual; - - function ChildIsSimpleElement(AIndex: Integer): Boolean; virtual; - procedure DoDefaultAction(AChildID: TcxAccessibleSimpleChildElementID); virtual; - function Focused(out AIsChildFocused: Boolean; - out AFocusedChildIndex: Integer): Boolean; virtual; - function GetChild(AIndex: Integer): TcxAccessibilityHelper; virtual; - function GetChildCount: Integer; virtual; - function GetChildIndex(AChild: TcxAccessibilityHelper): Integer; virtual; - function GetDefaultActionDescription(AChildID: TcxAccessibleSimpleChildElementID): string; virtual; - function GetDescription(AChildID: TcxAccessibleSimpleChildElementID): string; virtual; - function GetHitTest(AScreenX, AScreenY: Integer; out AChildIndex: Integer): TcxAccessibleObjectHitTest; virtual; - procedure GetKeyboardAccessParameters(AChildID: TcxAccessibleSimpleChildElementID; - out AShortCut: TShortCut; out ACaptionWithAccelChars: string); virtual; - function GetName(AChildID: TcxAccessibleSimpleChildElementID): string; virtual; - function GetOwnerObjectWindow: HWND; virtual; - function GetParent: TcxAccessibilityHelper; virtual; - function GetRole(AChildID: TcxAccessibleSimpleChildElementID): Integer; virtual; - function GetScreenBounds(AChildID: TcxAccessibleSimpleChildElementID): TRect; virtual; - function GetSelectable: Boolean; virtual; - function GetState(AChildID: TcxAccessibleSimpleChildElementID): Integer; virtual; - function GetSupportedProperties(AChildID: TcxAccessibleSimpleChildElementID): TcxAccessibleObjectProperties; virtual; - function GetValue(AChildID: TcxAccessibleSimpleChildElementID): string; virtual; - function NavigateToChild(ACurrentChildIndex: Integer; ADirection: TcxAccessibilityNavigationDirection): Integer; virtual; // andPrev, andNext must prevent looping - procedure SetValue(AChildID: TcxAccessibleSimpleChildElementID; const Value: string); virtual; - - function GetRootHelper: TcxAccessibilityHelper; - public - constructor Create(AOwnerObject: TObject); virtual; - function GetNextSelectableChildIndex(AStartIndex: Integer; - AGoForward: Boolean): Integer; - property Childs[AIndex: Integer]: TcxAccessibilityHelper read GetChild; - property ChildCount: Integer read GetChildCount; - property IsOwnerObjectLive: Boolean read FIsOwnerObjectLive; - property OwnerObject: TObject read FOwnerObject; - property OwnerObjectWindow: HWND read GetOwnerObjectWindow; - property Parent: TcxAccessibilityHelper read GetParent; - property Selectable: Boolean read GetSelectable; - property States[AChildID: TcxAccessibleSimpleChildElementID]: Integer read GetState; - property Visible: Boolean read GetVisible; - end; - - TcxAccessibilityHelperClass = class of TcxAccessibilityHelper; - -const - cxROLE_SYSTEM_TITLEBAR = $1; - cxROLE_SYSTEM_MENUBAR = $2; - cxROLE_SYSTEM_SCROLLBAR = $3; - cxROLE_SYSTEM_GRIP = $4; - cxROLE_SYSTEM_SOUND = $5; - cxROLE_SYSTEM_CURSOR = $6; - cxROLE_SYSTEM_CARET = $7; - cxROLE_SYSTEM_ALERT = $8; - cxROLE_SYSTEM_WINDOW = $9; - cxROLE_SYSTEM_CLIENT = $a; - cxROLE_SYSTEM_MENUPOPUP = $b; - cxROLE_SYSTEM_MENUITEM = $c; - cxROLE_SYSTEM_TOOLTIP = $d; - cxROLE_SYSTEM_APPLICATION = $e; - cxROLE_SYSTEM_DOCUMENT = $f; - cxROLE_SYSTEM_PANE = $10; - cxROLE_SYSTEM_CHART = $11; - cxROLE_SYSTEM_DIALOG = $12; - cxROLE_SYSTEM_BORDER = $13; - cxROLE_SYSTEM_GROUPING = $14; - cxROLE_SYSTEM_SEPARATOR = $15; - cxROLE_SYSTEM_TOOLBAR = $16; - cxROLE_SYSTEM_STATUSBAR = $17; - cxROLE_SYSTEM_TABLE = $18; - cxROLE_SYSTEM_COLUMNHEADER = $19; - cxROLE_SYSTEM_ROWHEADER = $1a; - cxROLE_SYSTEM_COLUMN = $1b; - cxROLE_SYSTEM_ROW = $1c; - cxROLE_SYSTEM_CELL = $1d; - cxROLE_SYSTEM_LINK = $1e; - cxROLE_SYSTEM_HELPBALLOON = $1f; - cxROLE_SYSTEM_CHARACTER = $20; - cxROLE_SYSTEM_LIST = $21; - cxROLE_SYSTEM_LISTITEM = $22; - cxROLE_SYSTEM_OUTLINE = $23; - cxROLE_SYSTEM_OUTLINEITEM = $24; - cxROLE_SYSTEM_PAGETAB = $25; - cxROLE_SYSTEM_PROPERTYPAGE = $26; - cxROLE_SYSTEM_INDICATOR = $27; - cxROLE_SYSTEM_GRAPHIC = $28; - cxROLE_SYSTEM_STATICTEXT = $29; - cxROLE_SYSTEM_TEXT = $2a; - cxROLE_SYSTEM_PUSHBUTTON = $2b; - cxROLE_SYSTEM_CHECKBUTTON = $2c; - cxROLE_SYSTEM_RADIOBUTTON = $2d; - cxROLE_SYSTEM_COMBOBOX = $2e; - cxROLE_SYSTEM_DROPLIST = $2f; - cxROLE_SYSTEM_PROGRESSBAR = $30; - cxROLE_SYSTEM_DIAL = $31; - cxROLE_SYSTEM_HOTKEYFIELD = $32; - cxROLE_SYSTEM_SLIDER = $33; - cxROLE_SYSTEM_SPINBUTTON = $34; - cxROLE_SYSTEM_DIAGRAM = $35; - cxROLE_SYSTEM_ANIMATION = $36; - cxROLE_SYSTEM_EQUATION = $37; - cxROLE_SYSTEM_BUTTONDROPDOWN = $38; - cxROLE_SYSTEM_BUTTONMENU = $39; - cxROLE_SYSTEM_BUTTONDROPDOWNGRID = $3a; - cxROLE_SYSTEM_WHITESPACE = $3b; - cxROLE_SYSTEM_PAGETABLIST = $3c; - cxROLE_SYSTEM_CLOCK = $3d; - cxROLE_SYSTEM_SPLITBUTTON = $3e; - cxROLE_SYSTEM_IPADDRESS = $3f; - cxROLE_SYSTEM_OUTLINEBUTTON = $40; - - cxSTATE_SYSTEM_NORMAL = $0; - cxSTATE_SYSTEM_UNAVAILABLE = $1; - cxSTATE_SYSTEM_SELECTED = $2; - cxSTATE_SYSTEM_FOCUSED = $4; - cxSTATE_SYSTEM_PRESSED = $8; - cxSTATE_SYSTEM_CHECKED = $10; - cxSTATE_SYSTEM_MIXED = $20; - cxSTATE_SYSTEM_INDETERMINATE = cxSTATE_SYSTEM_MIXED; - cxSTATE_SYSTEM_READONLY = $40; - cxSTATE_SYSTEM_HOTTRACKED = $80; - cxSTATE_SYSTEM_DEFAULT = $100; - cxSTATE_SYSTEM_EXPANDED = $200; - cxSTATE_SYSTEM_COLLAPSED = $400; - cxSTATE_SYSTEM_BUSY = $800; - cxSTATE_SYSTEM_FLOATING = $1000; - cxSTATE_SYSTEM_MARQUEED = $2000; - cxSTATE_SYSTEM_ANIMATED = $4000; - cxSTATE_SYSTEM_INVISIBLE = $8000; - cxSTATE_SYSTEM_OFFSCREEN = $10000; - cxSTATE_SYSTEM_SIZEABLE = $20000; - cxSTATE_SYSTEM_MOVEABLE = $40000; - cxSTATE_SYSTEM_SELFVOICING = $80000; - cxSTATE_SYSTEM_FOCUSABLE = $100000; - cxSTATE_SYSTEM_SELECTABLE = $200000; - cxSTATE_SYSTEM_LINKED = $400000; - cxSTATE_SYSTEM_TRAVERSED = $800000; - cxSTATE_SYSTEM_MULTISELECTABLE = $1000000; - cxSTATE_SYSTEM_EXTSELECTABLE = $2000000; - cxSTATE_SYSTEM_ALERT_LOW = $4000000; - cxSTATE_SYSTEM_ALERT_MEDIUM = $8000000; - cxSTATE_SYSTEM_ALERT_HIGH = $10000000; - cxSTATE_SYSTEM_PROTECTED = $20000000; - cxSTATE_SYSTEM_VALID = $7fffffff; - cxSTATE_SYSTEM_HASPOPUP = $40000000; - -function WMGetObjectResultFromIAccessibilityHelper( - const AWMGetObjectMessage: TMessage; AIHelper: IcxAccessibilityHelper): LRESULT; - -function CanReturnAccessibleObject(const AWMGetObjectMessage: TMessage): Boolean; -function IsAccessibilitySupported: Boolean; - -implementation - -uses - Menus, SysUtils, cxControls; - -const - NAVDIR_UP = $1 ; - NAVDIR_DOWN = $2 ; - NAVDIR_LEFT = $3 ; - NAVDIR_RIGHT = $4 ; - NAVDIR_NEXT = $5 ; - NAVDIR_PREVIOUS = $6 ; - NAVDIR_FIRSTCHILD = $7 ; - NAVDIR_LASTCHILD = $8 ; - - CO_E_OBJECTNOTCONNECTED = 0; // TODO - - OleaccLibraryName = 'oleacc.dll'; - -var - FcxAccessibleObjectFromWindow: function(hwnd: THandle; dwId: DWORD; - const riid: TGUID; out ppvObject): HRESULT; stdcall = nil; - FcxLResultFromObject: function(const riid: TGUID; - wParam: WPARAM; punk: IUnknown): LRESULT; stdcall = nil; - FOleaccLibrary: HMODULE; - -function WMGetObjectResultFromIAccessibilityHelper( - const AWMGetObjectMessage: TMessage; AIHelper: IcxAccessibilityHelper): LRESULT; -begin - Result := FcxLResultFromObject(IID_IcxAccessible, AWMGetObjectMessage.WParam, - AIHelper as IcxAccessible); -end; - -function CanReturnAccessibleObject(const AWMGetObjectMessage: TMessage): Boolean; -begin - Result := IsAccessibilitySupported and - (Cardinal(AWMGetObjectMessage.LParam) = OBJID_CLIENT); -end; - -function IsAccessibilitySupported: Boolean; -begin - Result := Assigned(FcxLResultFromObject); -end; - -function cxGetAccessibleObjectFromWindow(hwnd: THandle; dwId: DWORD; - const riid: TGUID; out ppvObject): HRESULT; -begin - Result := FcxAccessibleObjectFromWindow(hwnd, dwId, riid, ppvObject); -end; - -{ TcxAccessibilityHelper } - -constructor TcxAccessibilityHelper.Create(AOwnerObject: TObject); -begin - inherited Create; - FIsOwnerObjectLive := True; - FOwnerObject := AOwnerObject; -end; - -function TcxAccessibilityHelper.GetNextSelectableChildIndex(AStartIndex: Integer; - AGoForward: Boolean): Integer; -var - ACount, AStep, I: Integer; -begin - Result := -1; - - ACount := ChildCount; - if AStartIndex < 0 then - if AGoForward then - AStartIndex := -1 - else - AStartIndex := ACount - else - if AStartIndex >= ACount then - raise EdxException.Create(''); - I := AStartIndex; - - if AGoForward then - AStep := 1 - else - AStep := -1; - - repeat - Inc(I, AStep); - if (I < 0) or (I = ACount) then - Break; - if Childs[I].Selectable then - Result := I; - until Result <> -1; -end; - -// IcxAccessibilityHelper -function TcxAccessibilityHelper.GetHelper: TcxAccessibilityHelper; -begin - Result := Self; -end; - -procedure TcxAccessibilityHelper.OwnerObjectDestroyed; -begin - FIsOwnerObjectLive := False; -end; - -function TcxAccessibilityHelper.ChildIsSimpleElement(AIndex: Integer): Boolean; -begin - raise EdxException.Create(''); -end; - -procedure TcxAccessibilityHelper.DoDefaultAction( - AChildID: TcxAccessibleSimpleChildElementID); -begin -end; - -function TcxAccessibilityHelper.Focused(out AIsChildFocused: Boolean; - out AFocusedChildIndex: Integer): Boolean; -begin - Result := False; -end; - -function TcxAccessibilityHelper.GetChild( - AIndex: Integer): TcxAccessibilityHelper; -begin - Result := nil; -end; - -function TcxAccessibilityHelper.GetChildCount: Integer; -begin - Result := 0; -end; - -function TcxAccessibilityHelper.GetChildIndex( - AChild: TcxAccessibilityHelper): Integer; -begin - raise EdxException.Create(''); -end; - -function TcxAccessibilityHelper.GetDefaultActionDescription( - AChildID: TcxAccessibleSimpleChildElementID): string; -begin - Result := ''; -end; - -function TcxAccessibilityHelper.GetDescription( - AChildID: TcxAccessibleSimpleChildElementID): string; -begin - Result := ''; -end; - -function TcxAccessibilityHelper.GetHitTest(AScreenX, AScreenY: Integer; - out AChildIndex: Integer): TcxAccessibleObjectHitTest; -begin - Result := aohtNone; -end; - -procedure TcxAccessibilityHelper.GetKeyboardAccessParameters( - AChildID: TcxAccessibleSimpleChildElementID; out AShortCut: TShortCut; - out ACaptionWithAccelChars: string); -begin - AShortCut := 0; - ACaptionWithAccelChars := ''; -end; - -function TcxAccessibilityHelper.GetName( - AChildID: TcxAccessibleSimpleChildElementID): string; -begin - Result := ''; -end; - -function TcxAccessibilityHelper.GetOwnerObjectWindow: HWND; -begin - Result := 0; -end; - -function TcxAccessibilityHelper.GetParent: TcxAccessibilityHelper; -begin - Result := nil; -end; - -function TcxAccessibilityHelper.GetRole( - AChildID: TcxAccessibleSimpleChildElementID): Integer; -begin - Result := 0; -end; - -function TcxAccessibilityHelper.GetScreenBounds( - AChildID: TcxAccessibleSimpleChildElementID): TRect; -begin - Result := Rect(0, 0, 0, 0); -end; - -function TcxAccessibilityHelper.GetSelectable: Boolean; -begin - Result := False; -end; - -function TcxAccessibilityHelper.GetState( - AChildID: TcxAccessibleSimpleChildElementID): Integer; -begin - Result := cxSTATE_SYSTEM_NORMAL; -end; - -function TcxAccessibilityHelper.GetSupportedProperties( - AChildID: TcxAccessibleSimpleChildElementID): TcxAccessibleObjectProperties; -begin - Result := []; -end; - -function TcxAccessibilityHelper.GetValue( - AChildID: TcxAccessibleSimpleChildElementID): string; -begin - raise EdxException.Create(''); -end; - -function TcxAccessibilityHelper.NavigateToChild( - ACurrentChildIndex: Integer; ADirection: TcxAccessibilityNavigationDirection): Integer; -begin - raise EdxException.Create(''); -end; - -procedure TcxAccessibilityHelper.SetValue( - AChildID: TcxAccessibleSimpleChildElementID; const Value: string); -begin -end; - -function TcxAccessibilityHelper.GetRootHelper: TcxAccessibilityHelper; -var - AParent: TcxAccessibilityHelper; -begin - Result := Self; - repeat - AParent := Result.Parent; - if AParent <> nil then - Result := AParent; - until (AParent = nil); -end; - -// IDispatch -function TcxAccessibilityHelper.GetIDsOfNames(const IID: TGUID; Names: Pointer; - NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; -begin - Result := E_NOTIMPL; -end; - -function TcxAccessibilityHelper.GetTypeInfo(Index, LocaleID: Integer; - out TypeInfo): HResult; -begin - Result := E_NOTIMPL; -end; - -function TcxAccessibilityHelper.GetTypeInfoCount(out Count: Integer): HResult; -begin - Result := E_NOTIMPL; -end; - -function TcxAccessibilityHelper.Invoke(DispID: Integer; const IID: TGUID; - LocaleID: Integer; Flags: Word; var Params; - VarResult, ExcepInfo, ArgErr: Pointer): HResult; -begin - Result := E_NOTIMPL; -end; - -// IOleWindow -function TcxAccessibilityHelper.ContextSensitiveHelp(fEnterMode: BOOL): HResult; -begin - Result := S_OK; -end; - -function TcxAccessibilityHelper.GetWindow(out wnd: HWnd): HResult; -begin - if CheckIsOwnerObjectLive(Result) then - begin - wnd := GetOwnerObjectWindow; - Result := S_OK; // TODO - end; -end; - -// IcxAccessible -function TcxAccessibilityHelper.accDoDefaultAction( - varChild: OleVariant): HResult; -var - ASimpleChildElementID: TcxAccessibleSimpleChildElementID; -begin - if GetSimpleChildElementID(varChild, ASimpleChildElementID, Result) then - if aopDefaultAction in GetSupportedProperties(ASimpleChildElementID) then - begin - DoDefaultAction(ASimpleChildElementID); - Result := S_OK; - end - else - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.accHitTest(xLeft: Integer; yTop: Integer; - out pvarChild: OleVariant): HResult; -var - AChildIndex: Integer; -begin - VariantInit(pvarChild); - if CheckIsOwnerObjectLive(Result) then - if aopLocation in GetSupportedProperties(cxAccessibleObjectSelfID) then - begin - if PtInRect(GetScreenBounds(cxAccessibleObjectSelfID), Point(xLeft, yTop)) then - begin - case GetHitTest(xLeft, yTop, AChildIndex) of - aohtSelf: - begin - TVarData(pvarChild).VType := VT_I4; - pvarChild := CHILDID_SELF; - end; - aohtChild: - begin - TVarData(pvarChild).VType := VT_I4; - pvarChild := AChildIndex + 1; - CheckSimpleChildElementToBeReturned(pvarChild); - end; - end; - end; - if TVarData(pvarChild).VType <> VT_EMPTY then - Result := S_OK - else - Result := S_FALSE; - end - else - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.accLocation(out pxLeft: Integer; - out pyTop: Integer; out pcxWidth: Integer; out pcyHeight: Integer; - varChild: OleVariant): HResult; -var - ASimpleChildElementID: TcxAccessibleSimpleChildElementID; -begin - if GetSimpleChildElementID(varChild, ASimpleChildElementID, Result) then - if aopLocation in GetSupportedProperties(cxAccessibleObjectSelfID) then - with GetScreenBounds(ASimpleChildElementID) do - begin - pxLeft := Left; - pyTop := Top; - pcxWidth := Right - Left; - pcyHeight := Bottom - Top; - Result := S_OK; - end - else - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.accNavigate(navDir: Integer; - varStart: OleVariant; out pvarEndUpAt: OleVariant): HResult; - - procedure NavigateToFirstOrLastChild; - var - AChildCount: Integer; - begin - if varStart <> CHILDID_SELF then - Result := E_INVALIDARG - else - if not (aopLocation in GetSupportedProperties(cxAccessibleObjectSelfID)) then - Result := DISP_E_MEMBERNOTFOUND - else - begin - AChildCount := GetChildCount; - if AChildCount = 0 then - Result := S_FALSE - else - begin - TVarData(pvarEndUpAt).VType := VT_I4; - if navDir = NAVDIR_FIRSTCHILD then - pvarEndUpAt := 1 - else - pvarEndUpAt := AChildCount; - Result := S_OK; - end; - end; - end; - - procedure NavigateToNeighboringChildViaParent; - var - AParent: TcxAccessibilityHelper; - AStartChildID: OleVariant; - begin - Result := S_FALSE; - AParent := GetParent; // TODO get_accParent - if (AParent <> nil) and AParent.CheckIsOwnerObjectLive(Result) and - (aopLocation in AParent.GetSupportedProperties(cxAccessibleObjectSelfID)) then - begin - TVarData(AStartChildID).VType := VT_I4; - AStartChildID := AParent.GetChildIndex(Self) + 1; - if (AParent as IcxAccessible).accNavigate(navDir, AStartChildID, pvarEndUpAt) = S_OK then - Result := S_OK; - end; - end; - - procedure NavigateToNeighboringChild; - - function GetNavigationDirection: TcxAccessibilityNavigationDirection; - begin - case navDir of - NAVDIR_DOWN: Result := andDown; - NAVDIR_LEFT: Result := andLeft; - NAVDIR_NEXT: Result := andNext; - NAVDIR_PREVIOUS: Result := andPrev; - NAVDIR_RIGHT: Result := andRight; - else - Result := andUp; - end; - end; - - var - AChildIndex: Integer; - begin - if varStart > GetChildCount then - Result := E_INVALIDARG - else - if not (aopLocation in GetSupportedProperties(cxAccessibleObjectSelfID)) then - Result := DISP_E_MEMBERNOTFOUND - else - begin - AChildIndex := NavigateToChild(varStart - 1, GetNavigationDirection); - if AChildIndex <> varStart - 1 then - begin - TVarData(pvarEndUpAt).VType := VT_I4; - pvarEndUpAt := AChildIndex + 1; - Result := S_OK; - end - else - Result := S_FALSE; - end; - end; - -begin - VariantInit(pvarEndUpAt); - if not CheckIsOwnerObjectLive(Result) then - Exit; - if (navDir = NAVDIR_FIRSTCHILD) or (navDir = NAVDIR_LASTCHILD) then - NavigateToFirstOrLastChild - else - if varStart = CHILDID_SELF then - NavigateToNeighboringChildViaParent - else - NavigateToNeighboringChild; - - if Result = S_OK then - CheckSimpleChildElementToBeReturned(pvarEndUpAt); -end; - -function TcxAccessibilityHelper.accSelect(flagsSelect: Integer; - varChild: OleVariant): HResult; -begin - Result := DISP_E_MEMBERNOTFOUND; // TODO -end; - -function TcxAccessibilityHelper.Get_accChild(varChild: OleVariant; - out ppdispChild: IDispatch): HResult; -begin - if not CheckIsOwnerObjectLive(Result) then - Exit; - if (TVarData(varChild).VType = VT_EMPTY) or (varChild > GetChildCount) then - Result := E_INVALIDARG - else - if ChildIsSimpleElement(varChild - 1) then - Result := S_FALSE - else - begin - ppdispChild := GetChild(varChild - 1); - Result := S_OK; - end; -end; - -function TcxAccessibilityHelper.Get_accChildCount( - out pcountChildren: Integer): HResult; -begin - if CheckIsOwnerObjectLive(Result) then - begin - pcountChildren := GetChildCount; - Result := S_OK; - end; -end; - -function TcxAccessibilityHelper.Get_accDefaultAction(varChild: OleVariant; - out pszDefaultAction: WideString): HResult; -var - ASimpleChildElementID: TcxAccessibleSimpleChildElementID; -begin - if GetSimpleChildElementID(varChild, ASimpleChildElementID, Result) then - if aopDefaultAction in GetSupportedProperties(ASimpleChildElementID) then - begin - pszDefaultAction := GetDefaultActionDescription(ASimpleChildElementID); -// CheckStringToBeReturned(pszDefaultAction, Result); - Result := S_OK; - end - else - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.Get_accDescription(varChild: OleVariant; - out pszDescription: WideString): HResult; -var - ASimpleChildElementID: TcxAccessibleSimpleChildElementID; -begin - if GetSimpleChildElementID(varChild, ASimpleChildElementID, Result) then - if aopDescription in GetSupportedProperties(ASimpleChildElementID) then - begin - pszDescription := GetDescription(ASimpleChildElementID); - CheckStringToBeReturned(pszDescription, Result); - end - else - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.Get_accFocus( - out pvarChild: OleVariant): HResult; -var - AFocusedChildIndex: Integer; - AIsChildFocused: Boolean; -begin - VariantInit(pvarChild); - if CheckIsOwnerObjectLive(Result) then - if aopFocus in GetSupportedProperties(cxAccessibleObjectSelfID) then - begin - if not Focused(AIsChildFocused, AFocusedChildIndex) then - Result := S_FALSE - else - begin - TVarData(pvarChild).VType := VT_I4; - if not AIsChildFocused then - pvarChild := CHILDID_SELF - else - pvarChild := AFocusedChildIndex + 1; - CheckSimpleChildElementToBeReturned(pvarChild); - Result := S_OK; - end; - end - else - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.Get_accHelp(varChild: OleVariant; - out pszHelp: WideString): HResult; -begin - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.Get_accHelpTopic(out pszHelpFile: WideString; - varChild: OleVariant; out pidTopic: Integer): HResult; -begin - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.Get_accKeyboardShortcut(varChild: OleVariant; - out pszKeyboardShortcut: WideString): HResult; -var - ACaption: string; - AShortCut: TShortCut; - ASimpleChildElementID: TcxAccessibleSimpleChildElementID; -begin - if GetSimpleChildElementID(varChild, ASimpleChildElementID, Result) then - if aopShortcut in GetSupportedProperties(ASimpleChildElementID) then - begin - GetKeyboardAccessParameters(ASimpleChildElementID, AShortCut, ACaption); - if GetHotKey(ACaption) <> '' then - pszKeyboardShortcut := UpperCase(GetHotKey(ACaption)) - else - pszKeyboardShortcut := ShortCutToText(AShortCut); - CheckStringToBeReturned(pszKeyboardShortcut, Result); - end - else - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.Get_accName(varChild: OleVariant; - out pszName: WideString): HResult; -var - ASimpleChildElementID: TcxAccessibleSimpleChildElementID; -begin - if GetSimpleChildElementID(varChild, ASimpleChildElementID, Result) then - begin - pszName := GetName(ASimpleChildElementID); - CheckStringToBeReturned(pszName, Result); - end; -end; - -function TcxAccessibilityHelper.Get_accParent( - out ppdispParent: IDispatch): HResult; -var - AParentWnd: HWND; -begin - if CheckIsOwnerObjectLive(Result) then - begin - ppdispParent := GetParent; - if (ppdispParent = nil) and (GetOwnerObjectWindow <> 0) then - begin - if IsChildClassWindow(GetOwnerObjectWindow) then - AParentWnd := Windows.GetParent(GetOwnerObjectWindow) - else - AParentWnd := GetDesktopWindow; - if cxGetAccessibleObjectFromWindow(AParentWnd, OBJID_WINDOW, - IID_IcxAccessible, ppdispParent) <> S_OK then - ppdispParent := nil; - end; - if ppdispParent <> nil then - Result := S_OK - else - Result := S_FALSE; - end; -end; - -function TcxAccessibilityHelper.Get_accRole(varChild: OleVariant; - out pvarRole: OleVariant): HResult; -var - ASimpleChildElementID: TcxAccessibleSimpleChildElementID; -begin - if GetSimpleChildElementID(varChild, ASimpleChildElementID, Result) then - begin - TVarData(pvarRole).VType := VT_I4; - pvarRole := GetRole(ASimpleChildElementID); - Result := S_OK; - end; -end; - -function TcxAccessibilityHelper.Get_accSelection( - out pvarChildren: OleVariant): HResult; -begin - Result := DISP_E_MEMBERNOTFOUND; // TODO -end; - -function TcxAccessibilityHelper.Get_accState(varChild: OleVariant; - out pvarState: OleVariant): HResult; -var - ASimpleChildElementID: TcxAccessibleSimpleChildElementID; -begin - if GetSimpleChildElementID(varChild, ASimpleChildElementID, Result) then - begin - TVarData(pvarState).VType := VT_I4; - pvarState := GetState(ASimpleChildElementID); - Result := S_OK; - end; -end; - -function TcxAccessibilityHelper.Get_accValue(varChild: OleVariant; - out pszValue: WideString): HResult; -var - ASimpleChildElementID: TcxAccessibleSimpleChildElementID; -begin - if GetSimpleChildElementID(varChild, ASimpleChildElementID, Result) then - if aopValue in GetSupportedProperties(ASimpleChildElementID) then - begin - pszValue := GetValue(ASimpleChildElementID); - Result := S_OK; - end - else - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.Set_accName(varChild: OleVariant; - const pszName: WideString): HResult; -begin - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.Set_accValue(varChild: OleVariant; - const pszValue: WideString): HResult; -var - ASimpleChildElementID: TcxAccessibleSimpleChildElementID; -begin - if GetSimpleChildElementID(varChild, ASimpleChildElementID, Result) then - if aopValue in GetSupportedProperties(ASimpleChildElementID) then - begin - SetValue(ASimpleChildElementID, pszValue); - Result := S_OK; - end - else - Result := DISP_E_MEMBERNOTFOUND; -end; - -function TcxAccessibilityHelper.CheckIsOwnerObjectLive( - out AErrorCode: HResult): Boolean; -begin - Result := FIsOwnerObjectLive; - if not Result then - AErrorCode := CO_E_OBJECTNOTCONNECTED; -end; - -procedure TcxAccessibilityHelper.CheckSimpleChildElementToBeReturned( - var AVarChild: OleVariant); -var - AChild: TcxAccessibilityHelper; -begin - if (AVarChild <> CHILDID_SELF) and - not ChildIsSimpleElement(AVarChild - 1) then - begin - AChild := GetChild(AVarChild - 1); - VariantInit(AVarChild); - AVarChild := AChild as IDispatch; - TVarData(AVarChild).VType := VT_DISPATCH; - end; -end; - -procedure TcxAccessibilityHelper.CheckStringToBeReturned(const AStr: WideString; - out AResult: HResult); -begin - if Length(AStr) <> 0 then - AResult := S_OK - else - AResult := S_FALSE; -end; - -function TcxAccessibilityHelper.GetSimpleChildElementID(AChildID: OleVariant; - out ASimpleChildElementID: TcxAccessibleSimpleChildElementID; - out AErrorCode: HResult): Boolean; -begin - Result := CheckIsOwnerObjectLive(AErrorCode); - if not Result then - Exit; - if AChildID = CHILDID_SELF then - ASimpleChildElementID := cxAccessibleObjectSelfID - else - if (AChildID > GetChildCount) or not ChildIsSimpleElement(AChildID - 1) then - begin - AErrorCode := E_INVALIDARG; - Result := False; - end - else - ASimpleChildElementID := AChildID - 1; -end; - -function TcxAccessibilityHelper.GetVisible: Boolean; -begin - Result := States[cxAccessibleObjectSelfID] and cxSTATE_SYSTEM_INVISIBLE = 0; -end; - -initialization - FOleaccLibrary := LoadLibrary(OleaccLibraryName); - if FOleaccLibrary <> 0 then - begin - FcxAccessibleObjectFromWindow := GetProcAddress(FOleaccLibrary, 'AccessibleObjectFromWindow'); - FcxLResultFromObject := GetProcAddress(FOleaccLibrary, 'LresultFromObject'); - end; - -finalization - if FOleaccLibrary <> 0 then - FreeLibrary(FOleaccLibrary); - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxClasses.pas b/internal/x.46/ExpressLibrary/Sources/cxClasses.pas deleted file mode 100644 index fcd1ff8a..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxClasses.pas +++ /dev/null @@ -1,2986 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxClasses; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, ShellAPI, TypInfo, SysUtils, Classes, Forms, Contnrs, dxCore; - -const - WM_DX = WM_APP + 100; - - dxEndOfLine = #13#10; - cxE_NOINTERFACE = HResult($80004002); - -type - TcxAlignmentVert = (vaTop, vaBottom, vaCenter); - TcxTopBottom = vaTop..vaBottom; - TcxCollectionOperation = (copAdd, copDelete, copChanged); - TcxDirection = (dirNone, dirLeft, dirRight, dirUp, dirDown); - TcxGetComponent = function(ACaller: TComponent; Index: Integer): TComponent; - TcxGetCaptionForIntegerItemFunc = function(AItem: Integer): string; - TcxPosition = (posNone, posLeft, posRight, posTop, posBottom); - TdxSkinName = type string; - -{$IFNDEF DELPHI5} - TImageIndex = Integer; -{$ENDIF} - - TcxTag = Longint; - - TcxResourceStringID = Pointer; - - IcxDesignSelectionChanged = interface - ['{66B3AA59-1EBD-4135-AB18-E980F9C970F3}'] - procedure DesignSelectionChanged(ASelection: TList); - end; - - IcxDesignHelper = interface - ['{4C78CC4F-699B-43BD-94AC-E3BD2233F7A1}'] - procedure AddSelectionChangedListener(AObject: TPersistent); - function CanAddComponent(AOwner: TComponent): Boolean; - function CanDeleteComponent(AOwner: TComponent; AComponent: TComponent): Boolean; - procedure ChangeSelection(AOwner: TComponent; AObject: TPersistent); - function IsObjectSelected(AOwner: TComponent; AObject: TPersistent): Boolean; - procedure Modified; - procedure RemoveSelectionChangedListener(AObject: TPersistent); - procedure SelectObject(AOwner: TComponent; AObject: TPersistent; AClearSelection: Boolean = True; - AActivateOwner: Boolean = True); - procedure ShowComponentDefaultEventHandler(AComponent: TComponent); - function UniqueName(const ABaseName: string): string; - procedure UnselectObject(AOwner: TComponent; AObject: TPersistent); - end; - - { TcxIUnknownObject } - - TcxIUnknownObject = class(TObject, IUnknown) - protected - // IUnknown - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - end; - - { TcxInterfacedPersistent } - - TcxInterfacedPersistentClass = class of TcxInterfacedPersistent; - - TcxInterfacedPersistent = class({$IFDEF DELPHI6}TInterfacedPersistent{$ELSE}TPersistent, IUnknown{$ENDIF}) - private - FOwner: TPersistent; - {$IFNDEF DELPHI6} - FOwnerInterface: IUnknown; - {$ENDIF} - protected - function GetOwner: TPersistent; override; - {$IFNDEF DELPHI6} - { IUnknown } - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall; - {$ENDIF} - public - constructor Create(AOwner: TPersistent); virtual; - {$IFNDEF DELPHI6} - procedure AfterConstruction; override; - {$ENDIF} - property Owner: TPersistent read FOwner; - end; - - { TcxOwnedPersistent } - - TcxOwnedPersistent = class(TPersistent) - private - FOwner: TPersistent; - protected - function GetOwner: TPersistent; override; - property Owner: TPersistent read FOwner write FOwner; - public - constructor Create(AOwner: TPersistent); virtual; - end; - - { TcxOwnedInterfacedPersistent } - - TcxOwnedInterfacedPersistent = class(TcxOwnedPersistent, IUnknown) - protected - // IUnknown - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall; - end; - - { TcxComponent} - - TcxComponent = class(TComponent{$IFNDEF DELPHI6}, IUnknown{$ENDIF}) - private - FFakeComponentLink1: TComponent; - FFakeComponentLink2: TComponent; - FFakeComponentLink3: TComponent; - function GetFakeComponentLinkCount: Integer; - function GetIsDesigning: Boolean; - function GetIsDestroying: Boolean; - procedure SetFakeComponentLink(Index: Integer; Value: TComponent); - protected - procedure GetFakeComponentLinks(AList: TList); virtual; - procedure Loaded; override; - procedure UpdateFakeLinks; - public - destructor Destroy; override; - procedure BeforeDestruction; override; - property IsDesigning: Boolean read GetIsDesigning; - property IsDestroying: Boolean read GetIsDestroying; - published - property FakeComponentLink1: TComponent read FFakeComponentLink1 write FFakeComponentLink1 stored False; - property FakeComponentLink2: TComponent read FFakeComponentLink2 write FFakeComponentLink2 stored False; - property FakeComponentLink3: TComponent read FFakeComponentLink3 write FFakeComponentLink3 stored False; - end; - - { TcxInterfacedCollectionItem } - - TcxInterfacedCollectionItem = class(TCollectionItem, IUnknown) - private - FOwnerInterface: IUnknown; - protected - // IUnknown - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall; - public - procedure AfterConstruction; override; - end; - - { TcxHashedStringList } - - TcxHashedStringList = class(TObject) - private - FList: TStringList; - function GetCount: Integer; - function GetHash(Index: Integer): Integer; - function GetString(Index: Integer): string; - procedure SetString(Index: Integer; const AValue: string); - public - constructor Create; virtual; - destructor Destroy; override; - function Add(const S: string): Integer; virtual; - function IndexOf(const S: string): Integer; virtual; - procedure Clear; virtual; - // - property Count: Integer read GetCount; - property Hash[Index: Integer]: Integer read GetHash; - property Strings[Index: Integer]: string read GetString write SetString; - end; - - { TcxCollection } - - TcxCollection = class(TCollection) - public - procedure Assign(Source: TPersistent); override; - {$IFNDEF DELPHI6} - function Owner: TPersistent; - {$ENDIF} - end; - - { TcxOwnedInterfacedCollection } - - TcxCollectionNotifyEvent = procedure (Sender: TObject; AItem: TCollectionItem) of Object; - TcxCollectionCompareEvent = function(ASender: TObject; AItem1, AItem2: TCollectionItem): Integer of object; - TcxCollectionInternalState = (cisDestroying, cisUpdating, cisSorting); - TcxCollectionInternalStates = set of TcxCollectionInternalState; - - TcxOwnedInterfacedCollection = class(TOwnedCollection, IUnknown) - private - FInternalState: TcxCollectionInternalStates; - FSorted: Boolean; - FOnChange: TcxCollectionNotifyEvent; - FOnCompare: TcxCollectionCompareEvent; - - function CompareItems(AList: TStringList; AIndex1, AIndex2: Integer): Integer; - function GetIsDestroying: Boolean; - procedure SetSorted(AValue: Boolean); - protected - procedure Update(Item: TCollectionItem); override; - - function DoCompareItems(AItem1, AItem2: TcxInterfacedCollectionItem): Integer; virtual; - procedure Sort; - - property Sorted: Boolean read FSorted write SetSorted; - - // IUnknown - function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - - property IsDestroying: Boolean read GetIsDestroying; - property OnCompare: TcxCollectionCompareEvent read FOncompare write FOnCompare; - public - destructor Destroy; override; - - property OnChange: TcxCollectionNotifyEvent read FOnChange write FOnChange; - end; - - { TcxObjectList } - - TcxObjectList = class(TList) - private - FOwnObjects: Boolean; - function GetItem(Index: Integer): TObject; - public - constructor Create(AOwnObjects: Boolean = True); - procedure Clear; override; - - property Items[Index: Integer]: TObject read GetItem; default; - property OwnObjects: Boolean read FOwnObjects; - end; - - { TcxEventHandlerCollection } - - TcxEventHandler = procedure (Sender: TObject; const AEventArgs) of object; - - TcxEventHandlerCollection = class(TObject) - private - FEvents: array of TcxEventHandler; - procedure Delete(AIndex: Integer); - function IndexOf(AEvent: TcxEventHandler): Integer; - public - procedure Add(AEvent: TcxEventHandler); - procedure CallEvents(Sender: TObject; const AEventArgs); - procedure Remove(AEvent: TcxEventHandler); - end; - - { TcxRegisteredClassList } - - TcxRegisteredClassListItemData = class - ItemClass: TClass; - RegisteredClass: TClass; - end; - - TcxRegisteredClassList = class - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxRegisteredClassListItemData; - protected - function Find(AItemClass: TClass; var AIndex: Integer): Boolean; virtual; - public - constructor Create; - destructor Destroy; override; - procedure Clear; - function FindClass(AItemClass: TClass): TClass; - procedure Register(AItemClass, ARegisteredClass: TClass); virtual; - procedure Unregister(AItemClass, ARegisteredClass: TClass); virtual; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxRegisteredClassListItemData read GetItem; default; - end; - - { TcxRegisteredClasses } // TODO: Name - - TcxRegisteredClasses = class - private - FItems: TStringList; - FRegisterClasses: Boolean; - FSorted: Boolean; - function GetCount: Integer; - function GetDescription(Index: Integer): string; - function GetHint(Index: Integer): string; - function GetItem(Index: Integer): TClass; - procedure SetSorted(Value: Boolean); - protected - function CompareItems(AIndex1, AIndex2: Integer): Integer; virtual; - procedure Sort; virtual; - public - constructor Create(ARegisterClasses: Boolean = False); - destructor Destroy; override; - procedure Clear; - function FindByClassName(const AClassName: string): TClass; - function FindByDescription(const ADescription: string): TClass; - function GetDescriptionByClass(AClass: TClass): string; - function GetHintByClass(AClass: TClass): string; - function GetIndexByClass(AClass: TClass): Integer; - procedure Register(AClass: TClass; const ADescription: string); - procedure Unregister(AClass: TClass); - property Count: Integer read GetCount; - property Descriptions[Index: Integer]: string read GetDescription; - property Hints[Index: Integer]: string read GetHint; - property Items[Index: Integer]: TClass read GetItem; default; - property RegisterClasses: Boolean read FRegisterClasses write FRegisterClasses; - property Sorted: Boolean read FSorted write SetSorted; - end; - - { TcxAutoWidthObject } - - TcxAutoWidthItem = class - public - MinWidth: Integer; - Width: Integer; - Fixed: Boolean; - AutoWidth: Integer; - constructor Create; - end; - - TcxAutoWidthObject = class - private - FAvailableWidth: Integer; - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxAutoWidthItem; - function GetWidth: Integer; - protected - procedure Clear; - public - constructor Create(ACount: Integer); - destructor Destroy; override; - function AddItem: TcxAutoWidthItem; - procedure Calculate; - property AvailableWidth: Integer read FAvailableWidth write FAvailableWidth; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxAutoWidthItem read GetItem; default; - property Width: Integer read GetWidth; - end; - - { TcxAlignment } - - TcxAlignment = class(TPersistent) - private - FDefaultHorz: TAlignment; - FDefaultVert: TcxAlignmentVert; - FHorz: TAlignment; - FIsHorzAssigned: Boolean; - FIsVertAssigned: Boolean; - FOwner: TPersistent; - FUseAssignedValues: Boolean; - FVert: TcxAlignmentVert; - FOnChanged: TNotifyEvent; - function IsHorzStored: Boolean; - function IsVertStored: Boolean; - procedure SetHorz(const Value: TAlignment); - procedure SetVert(const Value: TcxAlignmentVert); - protected - procedure DoChanged; - function GetOwner: TPersistent; override; - public - constructor Create(AOwner: TPersistent; AUseAssignedValues: Boolean = False; - ADefaultHorz: TAlignment = taLeftJustify; - ADefaultVert: TcxAlignmentVert = vaTop); virtual; - procedure Assign(Source: TPersistent); override; - procedure Reset; - property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; - published - property Horz: TAlignment read FHorz write SetHorz stored IsHorzStored; - property Vert: TcxAlignmentVert read FVert write SetVert stored IsVertStored; - end; - - { Object Links } - - TcxObjectLink = class - Ref: TObject; - end; - - TcxObjectLinkController = class - private - FLinks: TList; - public - constructor Create; - destructor Destroy; override; - - function AddLink(AObject: TObject): TcxObjectLink; - procedure RemoveLink(ALink: TcxObjectLink); - procedure ClearLinks(AObject: TObject); - end; - - { TcxFreeNotificator } - - TcxFreeNotificationEvent = procedure(Sender: TComponent) of object; - - TcxFreeNotificator = class(TComponent) - private - FOnFreeNotification: TcxFreeNotificationEvent; - protected - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - public - procedure AddSender(ASender: TComponent); - procedure RemoveSender(ASender: TComponent); - property OnFreeNotification: TcxFreeNotificationEvent read FOnFreeNotification write FOnFreeNotification; - end; - - { MRU items support } - - TcxMRUItemClass = class of TcxMRUItem; - - TcxMRUItem = class - public - function Equals(AItem: TcxMRUItem): Boolean; {$IFDEF DELPHI12}reintroduce; {$ENDIF} virtual; abstract; - end; - - TcxMRUItems = class - private - FItems: TList; - FMaxCount: Integer; - function GetCount: Integer; - function GetItem(Index: Integer): TcxMRUItem; - procedure SetCount(Value: Integer); - procedure SetMaxCount(Value: Integer); - protected - procedure Delete(AIndex: Integer); - procedure UpdateCount; - public - constructor Create; virtual; - destructor Destroy; override; - procedure Add(AItem: TcxMRUItem); - procedure ClearItems; - function IndexOf(AItem: TcxMRUItem): Integer; - - property Count: Integer read GetCount write SetCount; - property Items[Index: Integer]: TcxMRUItem read GetItem; default; - property MaxCount: Integer read FMaxCount write SetMaxCount; - end; - - { Open list } - - TcxOpenList = class(TList) - private - function GetItem(Index: Integer): TObject; - procedure SetItem(Index: Integer; Value: TObject); - public - property Items[Index: Integer]: TObject read GetItem write SetItem; default; - end; - - { TcxComponentCollectionItem } - - TcxComponentCollection = class; - - TcxComponentCollectionItem = class(TComponent) - private - FCollection: TcxComponentCollection; - FID: Integer; - procedure AddToCollection(ACollection: TcxComponentCollection); - function GetIndex: Integer; - procedure RemoveFromCollection(ACollection: TcxComponentCollection); - protected - procedure Changed(AAllItems: Boolean); - function GetCollectionFromParent(AParent: TComponent): TcxComponentCollection; virtual; abstract; - function GetDisplayName: string; virtual; - procedure SetCollection(AValue: TcxComponentCollection); virtual; - procedure SetIndex(AValue: Integer); virtual; - public - destructor Destroy; override; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - procedure SetParentComponent(Value: TComponent); override; - - property Collection: TcxComponentCollection read FCollection write SetCollection; - property DisplayName: string read GetDisplayName; - property ID: Integer read FID; - property Index: Integer read GetIndex write SetIndex; - end; - - TcxComponentCollectionItemClass = class of TcxComponentCollectionItem; - - { TcxComponentCollection } - - TcxComponentCollectionNotification = (ccnAdded, ccnChanged, ccnExtracting, ccnExtracted, ccnDeleting); - TcxComponentCollectionChangeEvent = procedure(Sender: TObject; - AItem: TcxComponentCollectionItem; AAction: TcxComponentCollectionNotification) of object; - - TcxComponentCollection = class(TPersistent) - private - FItemClass: TcxComponentCollectionItemClass; - FItems: TList; - FNextID: Integer; - FParentComponent: TComponent; - FUpdateCount: Integer; - FOnChange: TcxComponentCollectionChangeEvent; - function GetCount: Integer; - procedure InsertItem(AItem: TcxComponentCollectionItem); - procedure RemoveItem(AItem: TcxComponentCollectionItem); - protected - procedure Changed(AItem: TcxComponentCollectionItem = nil; - AAction: TcxComponentCollectionNotification = ccnChanged); - function GetItem(AIndex: Integer): TcxComponentCollectionItem; - function GetOwner: TPersistent; override; - procedure Notify(AItem: TcxComponentCollectionItem; - AAction: TcxComponentCollectionNotification); virtual; - procedure SetItem(AIndex: Integer; Value: TcxComponentCollectionItem); - procedure SetItemName(AItem: TcxComponentCollectionItem); virtual; - procedure Update(AItem: TcxComponentCollectionItem; - AAction: TcxComponentCollectionNotification); virtual; - - property NextID: Integer read FNextID; - property UpdateCount: Integer read FUpdateCount; - public - constructor Create(AParentComponent: TComponent; AItemClass: TcxComponentCollectionItemClass); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function Add: TcxComponentCollectionItem; - procedure BeginUpdate; virtual; - procedure Clear; - procedure Delete(AIndex: Integer); - procedure EndUpdate(AForceUpdate: Boolean = True); virtual; - function FindItemByID(ID: Integer): TcxComponentCollectionItem; - function Insert(AIndex: Integer): TcxComponentCollectionItem; - procedure Remove(AItem: TcxComponentCollectionItem); - - property Count: Integer read GetCount; - property ParentComponent: TComponent read FParentComponent; - property Items[AIndex: Integer]: TcxComponentCollectionItem read GetItem write SetItem; default; - property OnChange: TcxComponentCollectionChangeEvent read FOnChange write FOnChange; - end; - - { TcxDialogMetricsInfo } - - IcxDialogMetricsInfoData = interface - ['{DBFB3040-4677-4C9D-913C-45A1EE41E35A}'] - function GetInfoData: Pointer; - function GetInfoDataSize: Integer; - procedure SetInfoData(AData: Pointer); - end; - - TcxDialogMetricsInfo = class - private - FClientHeight: Integer; - FClientWidth: Integer; - FData: Pointer; - FDialogClass: TClass; - FLeft: Integer; - FTop: Integer; - FMaximized: Boolean; - procedure FreeCustomData; - protected - procedure Restore(AForm: TForm); - procedure Store(AForm: TForm); - public - constructor Create(AForm: TForm); - destructor Destroy; override; - property ClientHeight: Integer read FClientHeight; - property ClientWidth: Integer read FClientWidth; - property Data: Pointer read FData; - property DialogClass: TClass read FDialogClass; - property Left: Integer read FLeft; - property Maximized: Boolean read FMaximized; - property Top: Integer read FTop; - end; - - { TcxDialogsMetricsStore } - - TcxDialogsMetricsStore = class - private - FDefaultPosition: TPosition; - FMetrics: TcxObjectList; - protected - function CreateMetrics(AForm: TForm): TcxDialogMetricsInfo; - function FindMetrics(AForm: TForm): Integer; - property Metrics: TcxObjectList read FMetrics; - public - constructor Create; virtual; - destructor Destroy; override; - procedure InitDialog(AForm: TForm); - procedure StoreMetrics(AForm: TForm); - - property DefaultPosition: TPosition read FDefaultPosition write FDefaultPosition default poMainFormCenter; - end; - - { TcxThread } - - TcxThread = class(TThread) - private - FException: Exception; - procedure DoHandleException; - protected - procedure HandleException; virtual; - procedure ResetException; - end; - - { TcxComponentList } - - TcxComponentListNotifyEvent = procedure (Sender: TObject; AComponent: TComponent; AAction: TListNotification) of object; - TcxComponentListChangeEvent = procedure (Sender: TObject; AComponent: TComponent; AAction: TcxComponentCollectionNotification) of object; - - TcxComponentList = class(TComponentList) - private - FUpdateCount: Integer; - FOnComponentListChanged: TcxComponentListChangeEvent; - FOnNotify: TcxComponentListNotifyEvent; - protected - procedure DoNotify(AItem: TComponent; AAction: TListNotification); virtual; - function GetItemClass: TClass; virtual; - procedure Notify(Ptr: Pointer; Action: TListNotification); override; - procedure Update(AItem: TComponent = nil; AAction: TcxComponentCollectionNotification = ccnChanged); - public - constructor Create; overload; - destructor Destroy; override; - - procedure Clear; override; - procedure BeginUpdate; - procedure CancelUpdate; - procedure EndUpdate; - property OnComponentListChanged: TcxComponentListChangeEvent read FOnComponentListChanged write FOnComponentListChanged; - property OnNotify: TcxComponentListNotifyEvent read FOnNotify write FOnNotify; - end; - - TcxNotifyProcedure = procedure(Sender: TObject); - -// component dialogs metrics storage -function cxDialogsMetricsStore: TcxDialogsMetricsStore; - -function cxAddObjectLink(AObject: TObject): TcxObjectLink; -procedure cxRemoveObjectLink(ALink: TcxObjectLink); -procedure cxClearObjectLinks(AObject: TObject); - -procedure CallNotify(ANotifyEvent: TNotifyEvent; ASender: TObject); -function ClassInheritsFrom(AClass: TClass; const AParentClassName: string): Boolean; -procedure CopyList(ASource, ADestination: TList); -function EqualMethods(const AMethod1, AMethod2: TMethod): Boolean; -procedure FillStringsWithEnumTypeValues(AStrings: TStrings; ATypeInfo: PTypeInfo; - AGetTypeItemCaption: TcxGetCaptionForIntegerItemFunc); -function GetPersistentOwner(APersistent: TPersistent): TPersistent; -function GetSubobjectName(AObject, ASubobject: TPersistent): string; -function GetValidName(AComponent: TComponent; const AName: string; - AIsBaseName: Boolean = False): string; -function HexToByte(const AHex: string): Byte; -procedure RenameComponents(ACaller, AOwner: TComponent; - ANewName, AOldName: TComponentName; - AComponentCount: Integer; AGetComponent: TcxGetComponent); -function RoundDiv(I1, I2: Integer): Integer; -function Size(cx, cy: Longint): TSize; -procedure SwapIntegers(var I1, I2: Integer); -function GetRangeCenter(ABound1, ABound2: Integer): Integer; -function StreamsEqual(AStream1, AStream2: TMemoryStream): Boolean; -procedure OpenWebPage(const AWebAddress: string); -function GetCorrectPath(const S: string): string; - -{$IFNDEF DELPHI6} -function IfThen(AValue: Boolean; ATrue: Integer; AFalse: Integer = 0): Integer; -function InRange(AValue, AMin, AMax: Integer): Boolean; -function Supports(const Instance: TObject; const IID: TGUID): Boolean; overload; -{$IFNDEF DELPHI5} -function Supports(const Instance: IUnknown; const Intf: TGUID; out Inst): Boolean; overload; -function Supports(Instance: TObject; const Intf: TGUID; out Inst): Boolean; overload; -procedure FreeAndNil(var Obj); -{$ENDIF} -{$ENDIF} - -function cxGetClassName(AWnd: THandle): string; -function cxGetLocaleInfo(ALocale, ALocaleType: Integer; const ADefaultValue: string): string; -function cxStrCharLength(const AStr: string; AIndex: Integer = 1): Integer; -function cxNextCharPos(const AStr: string; AIndex: Integer): Integer; -function cxPrevCharPos(const AStr: string; AIndex: Integer): Integer; - -function cxGetResourceString(AResString: TcxResourceStringID): string; overload; -procedure cxSetResourceString(AResString: TcxResourceStringID; const Value: string); -function cxGetResourceString(const AResString: string): string; overload;{$IFDEF DELPHI6} deprecated;{$ENDIF} -function cxGetResourceStringNet(const AResString: string): string;{$IFDEF DELPHI6} deprecated;{$ENDIF} -procedure cxSetResourceStringNet(const AResString, Value: string);{$IFDEF DELPHI6} deprecated;{$ENDIF} -procedure cxClearResourceStrings; - -function CreateUniqueName(AOwnerForm, AOwnerComponent, AComponent: TComponent; - const APrefixName, ASuffixName: string): string; -function cxGenerateComponentName(AOwnerComponent: TComponent; - const AClassName, APrefixName, ASuffixName: string; ANumber: Integer): string; - -function cxSign(const AValue: Double): Integer; - -procedure SetHook(var AHook: HHook; AHookId: Integer; AHookProc: TFNHookProc); -procedure ReleaseHook(var AHook: HHOOK); - -implementation - -uses - Math, Graphics, Controls; - -type - TPersistentAccess = class(TPersistent); - -var - FObjectLinkController: TcxObjectLinkController; - FObjectLinkControllerRefCount: Integer; - FDialogsMetrics: TcxDialogsMetricsStore; - -function GetShortHint(const Hint: string): string; -var - I: Integer; -begin - I := AnsiPos('|', Hint); - if I = 0 then - Result := Hint else - Result := Copy(Hint, 1, I - 1); -end; - -function GetLongHint(const Hint: string): string; -var - I: Integer; -begin - I := AnsiPos('|', Hint); - if I = 0 then - Result := Hint else - Result := Copy(Hint, I + 1, Maxint); -end; - -{$IFNDEF DELPHI6} -function IfThen(AValue: Boolean; ATrue, AFalse: Integer): Integer; -begin - if AValue then - Result := ATrue - else - Result := AFalse; -end; - -function InRange(AValue, AMin, AMax: Integer): Boolean; -begin - Result := (AValue <= AMax) and (AValue >= AMin); -end; - -function Supports(const Instance: TObject; const IID: TGUID): Boolean; -var - Temp: IUnknown; -begin - Result := Supports(Instance, IID, Temp); -end; -{$IFNDEF DELPHI5} -function Supports(const Instance: IUnknown; const Intf: TGUID; out Inst): Boolean; overload; -begin - Result := (Instance <> nil) and (Instance.QueryInterface(Intf, Inst) = 0); -end; - -function Supports(Instance: TObject; const Intf: TGUID; out Inst): Boolean; overload; -var - Unk: IUnknown; -begin - Result := (Instance <> nil) and Instance.GetInterface(IUnknown, Unk) and - Supports(Unk, Intf, Inst); -end; - -procedure FreeAndNil(var Obj); -var - Temp: TObject; -begin - Temp := TObject(Obj); - Pointer(Obj) := nil; - Temp.Free; -end; -{$ENDIF} -{$ENDIF} - -function cxGetClassName(AWnd: THandle): string; -var - ABuf: array[0..1023] of Char; -begin - FillChar(ABuf, SizeOf(ABuf), 0); - if GetClassName(AWnd, @ABuf, SizeOf(ABuf)) > 0 then - Result := ABuf - else - Result := ''; -end; - -function cxGetLocaleInfo(ALocale, ALocaleType: Integer; const ADefaultValue: string): string; -var - ABuffer: string; - ABufferSize: Integer; -begin - ABufferSize := GetLocaleInfo(ALocale, ALocaleType, nil, 0); - if ABufferSize = 0 then - Result := ADefaultValue - else - begin - SetLength(ABuffer, ABufferSize); - GetLocaleInfo(ALocale, ALocaleType, PChar(ABuffer), ABufferSize); - Result := Copy(ABuffer, 1, ABufferSize - 1) - end; -end; - -function GetPChar(const AStr: string; AIndex: Integer): PChar; -begin - Result := PChar(AStr) + AIndex - 1; -end; - -function cxStrCharLength(const AStr: string; AIndex: Integer = 1): Integer; -begin - Result := Integer(CharNext(GetPChar(AStr, AIndex))) - Integer(GetPChar(AStr, AIndex)); -end; - -function cxNextCharPos(const AStr: string; AIndex: Integer): Integer; -begin - Result := Integer(CharNext(GetPChar(AStr, AIndex))) - Integer(GetPChar(AStr, 1)) + 1; -end; - -function cxPrevCharPos(const AStr: string; AIndex: Integer): Integer; -begin - Result := Integer(CharPrev(GetPChar(AStr, 1), GetPChar(AStr, AIndex))) - Integer(GetPChar(AStr, 1)) + 1; -end; - -{ TcxIUnknownObject } - -function TcxIUnknownObject.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := S_OK - else - Result := E_NOINTERFACE; -end; - -function TcxIUnknownObject._AddRef: Integer; -begin - Result := -1; -end; - -function TcxIUnknownObject._Release: Integer; -begin - Result := -1; -end; - -{ TcxInterfacedPersistent } - -constructor TcxInterfacedPersistent.Create(AOwner: TPersistent); -begin - inherited Create; - FOwner := AOwner; -end; - -function TcxInterfacedPersistent.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -{$IFNDEF DELPHI6} - -function TcxInterfacedPersistent._AddRef: Integer; -begin - if FOwnerInterface <> nil then - Result := FOwnerInterface._AddRef - else - Result := -1; -end; - -function TcxInterfacedPersistent._Release: Integer; -begin - if FOwnerInterface <> nil then - Result := FOwnerInterface._Release - else - Result := -1; -end; - -function TcxInterfacedPersistent.QueryInterface(const IID: TGUID; out Obj): HResult; -const - E_NOINTERFACE = HResult($80004002); -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -procedure TcxInterfacedPersistent.AfterConstruction; -begin - inherited; - if GetOwner <> nil then - GetOwner.GetInterface(IUnknown, FOwnerInterface); -end; -{$ENDIF} - -{ TcxOwnedPersistent } - -constructor TcxOwnedPersistent.Create(AOwner: TPersistent); -begin - inherited Create; - FOwner := AOwner; -end; - -function TcxOwnedPersistent.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -{ TcxOwnedInterfacedPersistent } - -function TcxOwnedInterfacedPersistent._AddRef: Integer; -begin - Result := -1; -end; - -function TcxOwnedInterfacedPersistent._Release: Integer; -begin - Result := -1; -end; - -function TcxOwnedInterfacedPersistent.QueryInterface( - const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := cxE_NOINTERFACE; -end; - -{ TcxComponent } - -destructor TcxComponent.Destroy; -begin - cxClearObjectLinks(Self); - inherited Destroy; -end; - -procedure TcxComponent.Loaded; -begin - inherited Loaded; - UpdateFakeLinks; -end; - -procedure TcxComponent.BeforeDestruction; -begin - if not IsDestroying then Destroying; -end; - -procedure TcxComponent.GetFakeComponentLinks(AList: TList); -begin -end; - -procedure TcxComponent.UpdateFakeLinks; -var - I: Integer; - AList: TList; -begin - if not IsDesigning or IsDestroying or (Owner = nil) then Exit; - AList := TList.Create; - try - GetFakeComponentLinks(AList); - for I := 0 to GetFakeComponentLinkCount - 1 do - if I < AList.Count then - SetFakeComponentLink(I, TComponent(AList[I])) - else - SetFakeComponentLink(I, nil); - finally - AList.Free; - end; -end; - -function TcxComponent.GetFakeComponentLinkCount: Integer; -begin - Result := 3; -end; - -function TcxComponent.GetIsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -function TcxComponent.GetIsDestroying: Boolean; -begin - Result := csDestroying in ComponentState; -end; - -procedure TcxComponent.SetFakeComponentLink(Index: Integer; Value: TComponent); -begin - case Index of - 0: FFakeComponentLink1 := Value; - 1: FFakeComponentLink2 := Value; - 2: FFakeComponentLink3 := Value; - end; -end; - -{ TcxInterfacedCollectionItem } - -procedure TcxInterfacedCollectionItem.AfterConstruction; -begin - inherited AfterConstruction; - if GetOwner <> nil then - GetOwner.GetInterface(IUnknown, FOwnerInterface); -end; - -function TcxInterfacedCollectionItem._AddRef: Integer; -begin - if FOwnerInterface <> nil then - Result := FOwnerInterface._AddRef - else - Result := -1; -end; - -function TcxInterfacedCollectionItem._Release: Integer; -begin - if FOwnerInterface <> nil then - Result := FOwnerInterface._Release - else - Result := -1; -end; - -function TcxInterfacedCollectionItem.QueryInterface(const IID: TGUID; - out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := cxE_NOINTERFACE; -end; - -{ TcxCollection } - -procedure TcxCollection.Assign(Source: TPersistent); -var - I: Integer; - AItem: TCollectionItem; -begin - if Source is TCollection then - begin - if (Count = 0) and (TCollection(Source).Count = 0) then Exit; - BeginUpdate; - try - for I := 0 to TCollection(Source).Count - 1 do - begin - if I > Count - 1 then - AItem := Add - else - AItem := Items[I]; - AItem.Assign(TCollection(Source).Items[I]); - end; - for I := Count - 1 downto TCollection(Source).Count do - Delete(I); - finally - EndUpdate; - end; - end - else - inherited; -end; - -{$IFNDEF DELPHI6} -function TcxCollection.Owner: TPersistent; -begin - Result := GetOwner; -end; -{$ENDIF} - -{ TcxOwnedInterfacedCollection } - -destructor TcxOwnedInterfacedCollection.Destroy; -begin - Include(FInternalState, cisDestroying); - inherited; -end; - -procedure TcxOwnedInterfacedCollection.Update(Item: TCollectionItem); -begin - if cisUpdating in FInternalState then Exit; - Include(FInternalState, cisUpdating); - try - if Sorted and (Item = nil) then - Sort; - inherited; - if not IsDestroying and Assigned(OnChange) then - OnChange(Self, Item); - finally - Exclude(FInternalState, cisUpdating); - end; -end; - -type - TcxStringListCompareEvent = function(AList: TStringList; AIndex1, AIndex2: Integer): Integer of object; - - TcxStringList = class(TStringList) - private - FOnCompare: TcxStringListCompareEvent; - public - procedure Sort; override; - property OnCompare: TcxStringListCompareEvent read FOnCompare write FOnCompare; - end; - -{ TcxStringList } - -function cxStringListCompareStrings(AList: TStringList; AIndex1, AIndex2: Integer): Integer; -begin - Result := TcxStringList(AList).OnCompare(AList, AIndex1, AIndex2); -end; - -procedure TcxStringList.Sort; -begin - if Assigned(OnCompare) then - CustomSort(cxStringListCompareStrings) - else - inherited; -end; - -function TcxOwnedInterfacedCollection.DoCompareItems(AItem1, AItem2: TcxInterfacedCollectionItem): Integer; -begin - Result := Sign(AItem1.Index - AItem2.Index); -end; - -procedure TcxOwnedInterfacedCollection.Sort; -var - AList: TcxStringList; - I: Integer; -begin - if (UpdateCount > 0) or (cisSorting in FInternalState) then Exit; - Include(FInternalState, cisSorting); - try - AList := TcxStringList.Create; - try - for I := 0 to Count - 1 do - AList.AddObject(IntToStr(I), Items[I]); - - AList.OnCompare := CompareItems; - AList.Sort; - - BeginUpdate; - try - for I := 0 to AList.Count - 1 do - TcxInterfacedCollectionItem(AList.Objects[I]).Index := I; - finally - EndUpdate; - end; - finally - AList.Free; - end; - finally - Exclude(FInternalState, cisSorting); - end; -end; - -function TcxOwnedInterfacedCollection.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := S_OK - else - Result := E_NOINTERFACE; -end; - -function TcxOwnedInterfacedCollection._AddRef: Integer; -begin - Result := -1; -end; - -function TcxOwnedInterfacedCollection._Release: Integer; -begin - Result := -1; -end; - -function TcxOwnedInterfacedCollection.CompareItems(AList: TStringList; AIndex1, AIndex2: Integer): Integer; -var - AItem1, AItem2: TcxInterfacedCollectionItem; -begin - AItem1 := TcxInterfacedCollectionItem(AList.Objects[AIndex1]); - AItem2 := TcxInterfacedCollectionItem(AList.Objects[AIndex2]); - if Assigned(OnCompare) then - Result := OnCompare(Self, AItem1, AItem2) - else - Result := DoCompareItems(AItem1, AItem2); -end; - -function TcxOwnedInterfacedCollection.GetIsDestroying: Boolean; -begin - Result := cisDestroying in FInternalState; -end; - -procedure TcxOwnedInterfacedCollection.SetSorted(AValue: Boolean); -begin - if Sorted <> AValue then - begin - FSorted := AValue; - if Sorted then - Sort; - end; -end; - -{ TcxObjectList } - -constructor TcxObjectList.Create(AOwnObjects: Boolean = True); -begin - inherited Create; - FOwnObjects := AOwnObjects; -end; - -procedure TcxObjectList.Clear; -var - I: Integer; -begin - if OwnObjects then - begin - for I := 0 to Count - 1 do - Items[I].Free; - end; - inherited Clear; -end; - -function TcxObjectList.GetItem(Index: Integer): TObject; -begin - Result := inherited Items[Index]; -end; - -{ TcxEventHandlerCollection } - -procedure TcxEventHandlerCollection.Add(AEvent: TcxEventHandler); -var - ALength: Integer; -begin - if IndexOf(AEvent) <> -1 then Exit; - ALength := Length(FEvents); - SetLength(FEvents, ALength + 1); - FEvents[ALength] := AEvent; -end; - -procedure TcxEventHandlerCollection.CallEvents(Sender: TObject; const AEventArgs); -var - I: Integer; -begin - for I := Low(FEvents) to High(FEvents) do - FEvents[I](Sender, AEventArgs); -end; - -procedure TcxEventHandlerCollection.Delete(AIndex: Integer); -var - ALength, I: Integer; -begin - ALength := Length(FEvents); - if (AIndex < 0) or (AIndex >= ALength) then Exit; - for I := AIndex to ALength - 2 do - FEvents[I] := FEvents[I + 1]; - SetLength(FEvents, ALength - 1); -end; - -function TcxEventHandlerCollection.IndexOf(AEvent: TcxEventHandler): Integer; -var - I: Integer; -begin - Result := -1; - for I := Low(FEvents) to High(FEvents) do - if EqualMethods(TMethod(AEvent), TMethod(FEvents[I])) then - begin - Result := I; - Break; - end; -end; - -procedure TcxEventHandlerCollection.Remove(AEvent: TcxEventHandler); -begin - Delete(IndexOf(AEvent)); -end; - -{ TcxRegisteredClassList } - -constructor TcxRegisteredClassList.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TcxRegisteredClassList.Destroy; -begin - Clear; - FreeAndNil(FItems); - inherited Destroy; -end; - -procedure TcxRegisteredClassList.Clear; -var - I: Integer; -begin - for I := 0 to FItems.Count - 1 do - TcxRegisteredClassListItemData(FItems[I]).Free; - FItems.Clear; -end; - -function TcxRegisteredClassList.FindClass(AItemClass: TClass): TClass; -var - AIndex: Integer; -begin - if Find(AItemClass, AIndex) then - Result := Items[AIndex].RegisteredClass - else - Result := nil; -end; - -procedure TcxRegisteredClassList.Register(AItemClass, ARegisteredClass: TClass); -var - AIndex: Integer; - AData: TcxRegisteredClassListItemData; -begin - AIndex := -1; - AData := TcxRegisteredClassListItemData.Create; - AData.ItemClass := AItemClass; - AData.RegisteredClass := ARegisteredClass; - if Find(AItemClass, AIndex) then - FItems.Insert(AIndex + 1, AData) - else - if AIndex <> -1 then - FItems.Insert(AIndex, AData) - else - FItems.Add(AData); -end; - -procedure TcxRegisteredClassList.Unregister(AItemClass, ARegisteredClass: TClass); -var - I: Integer; - AData: TcxRegisteredClassListItemData; -begin - for I := FItems.Count - 1 downto 0 do - begin - AData := Items[I]; - if (AData.ItemClass = AItemClass) and (AData.RegisteredClass = ARegisteredClass) then - begin - AData.Free; - FItems.Delete(I); - end; - end; -end; - -function TcxRegisteredClassList.Find(AItemClass: TClass; var AIndex: Integer): Boolean; -var - I: Integer; - AData: TcxRegisteredClassListItemData; -begin - Result := False; - for I := FItems.Count - 1 downto 0 do - begin - AData := Items[I]; - if AItemClass.InheritsFrom(AData.ItemClass) then - begin - AIndex := I; - Result := True; - Break; - end - else - if AData.ItemClass.InheritsFrom(AItemClass) then - AIndex := I; - end; -end; - -function TcxRegisteredClassList.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxRegisteredClassList.GetItem(Index: Integer): TcxRegisteredClassListItemData; -begin - Result := TcxRegisteredClassListItemData(FItems[Index]); -end; - -{ TcxRegisteredClasses } - -type - TcxRegisteredClassesStringList = class(TStringList) - public - Owner: TcxRegisteredClasses; - end; - -constructor TcxRegisteredClasses.Create(ARegisterClasses: Boolean = False); -begin - inherited Create; - FRegisterClasses := ARegisterClasses; - FItems := TcxRegisteredClassesStringList.Create; - TcxRegisteredClassesStringList(FItems).Owner := Self; -end; - -destructor TcxRegisteredClasses.Destroy; -begin - Clear; - FItems.Free; - inherited Destroy; -end; - -function TcxRegisteredClasses.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxRegisteredClasses.GetDescription(Index: Integer): string; -begin - Result := GetShortHint(FItems[Index]); -end; - -function TcxRegisteredClasses.GetHint(Index: Integer): string; -begin - Result := GetLongHint(FItems[Index]); -end; - -function TcxRegisteredClasses.GetItem(Index: Integer): TClass; -begin - Result := TClass(FItems.Objects[Index]); -end; - -procedure TcxRegisteredClasses.SetSorted(Value: Boolean); -begin - if FSorted <> Value then - begin - FSorted := Value; - if FSorted then Sort; - end; -end; - -function TcxRegisteredClasses.CompareItems(AIndex1, AIndex2: Integer): Integer; -begin - Result := AnsiCompareText(Descriptions[AIndex1], Descriptions[AIndex2]); -end; - -function SortClasses(List: TStringList; Index1, Index2: Integer): Integer; -begin - Result := TcxRegisteredClassesStringList(List).Owner.CompareItems(Index1, Index2); -end; - -procedure TcxRegisteredClasses.Sort; -begin - FItems.CustomSort(SortClasses); -end; - -procedure TcxRegisteredClasses.Clear; -begin - FItems.Clear; -end; - -function TcxRegisteredClasses.FindByClassName(const AClassName: string): TClass; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - begin - if Items[I].ClassName = AClassName then - begin - Result := Items[I]; - Break; - end; - end; -end; - -function TcxRegisteredClasses.FindByDescription(const ADescription: string): TClass; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - begin - if Descriptions[I] = ADescription then - begin - Result := Items[I]; - Break; - end; - end; -end; - -function TcxRegisteredClasses.GetDescriptionByClass(AClass: TClass): string; -var - AIndex: Integer; -begin - AIndex := GetIndexByClass(AClass); - if AIndex = -1 then - Result := '' - else - Result := Descriptions[AIndex]; -end; - -function TcxRegisteredClasses.GetHintByClass(AClass: TClass): string; -var - AIndex: Integer; -begin - AIndex := GetIndexByClass(AClass); - if AIndex = -1 then - Result := '' - else - Result := Hints[AIndex]; -end; - -function TcxRegisteredClasses.GetIndexByClass(AClass: TClass): Integer; -begin - Result := FItems.IndexOfObject(TObject(AClass)); -end; - -procedure TcxRegisteredClasses.Register(AClass: TClass; const ADescription: string); -begin - if GetIndexByClass(AClass) = -1 then - begin - FItems.AddObject(ADescription, TObject(AClass)); - if FSorted then Sort; - if FRegisterClasses then RegisterClass(TPersistentClass(AClass)); - end; -end; - -procedure TcxRegisteredClasses.Unregister(AClass: TClass); -var - I: Integer; -begin - I := GetIndexByClass(AClass); - if I <> -1 then - FItems.Delete(I); -end; - -{ TcxAutoWidthItem } - -constructor TcxAutoWidthItem.Create; -begin - inherited; - AutoWidth := -1; -end; - -{ TcxAutoWidthObject } - -constructor TcxAutoWidthObject.Create(ACount: Integer); -begin - inherited Create; - FItems := TList.Create; - FItems.Capacity := ACount; -end; - -destructor TcxAutoWidthObject.Destroy; -begin - Clear; - FItems.Free; - inherited; -end; - -function TcxAutoWidthObject.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxAutoWidthObject.GetItem(Index: Integer): TcxAutoWidthItem; -begin - Result := TcxAutoWidthItem(FItems[Index]); -end; - -function TcxAutoWidthObject.GetWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - Inc(Result, Items[I].Width); -end; - -procedure TcxAutoWidthObject.Clear; -var - I: Integer; -begin - for I := Count - 1 downto 0 do Items[I].Free; -end; - -function TcxAutoWidthObject.AddItem: TcxAutoWidthItem; -begin - Result := TcxAutoWidthItem.Create; - FItems.Add(Result); -end; - -procedure TcxAutoWidthObject.Calculate; -var - AAvailableWidth, AWidth, ANewAvailableWidth, ANewWidth, AOffset, I, - AItemAutoWidth: Integer; - AAssignAllWidths, AItemWithMinWidthFound: Boolean; - - procedure RemoveItemFromCalculation(AItem: TcxAutoWidthItem); - begin - with AItem do - begin - Dec(ANewAvailableWidth, AutoWidth); - Dec(ANewWidth, Width); - end; - end; - - procedure ProcessFixedItems; - var - I: Integer; - - procedure ProcessItem(AItem: TcxAutoWidthItem); - begin - with AItem do - if Fixed then - begin - AutoWidth := Width; - RemoveItemFromCalculation(AItem); - end; - end; - - begin - for I := 0 to Count - 1 do ProcessItem(Items[I]); - end; - - {procedure ProcessFixedColumns; - var - AFixedIndex, I: Integer; - begin - if not (gcsColumnSizing in GridDefinition.Controller.State) then Exit; - AFixedIndex := - (GridDefinition.Controller.DragAndDropObject as TcxGridColumnHeaderSizingObject).Column.VisibleIndex; - if AFixedIndex = Count - 1 then Exit; - for I := 0 to Count - 1 do - if I <= AFixedIndex then - begin - AColumnWidth := Items[I].CalculateWidth; - Items[I].Width := AColumnWidth; - Dec(AAvailableWidth, AColumnWidth); - Dec(AWidth, AColumnWidth); - end; - end;} - - procedure ProcessItem(AItem: TcxAutoWidthItem); - - function CalculateItemAutoWidth: Integer; - begin - Result := - MulDiv(AOffset + AItem.Width, AAvailableWidth, AWidth) - - MulDiv(AOffset, AAvailableWidth, AWidth); - end; - - begin - AItemAutoWidth := CalculateItemAutoWidth; - if AAssignAllWidths then - AItem.AutoWidth := AItemAutoWidth - else - if AItemAutoWidth <= AItem.MinWidth then - begin - AItem.AutoWidth := AItem.MinWidth; - RemoveItemFromCalculation(AItem); - AItemWithMinWidthFound := True; - end; - Inc(AOffset, AItem.Width); - end; - -begin - AAvailableWidth := FAvailableWidth; - AWidth := Width; - - ANewAvailableWidth := AAvailableWidth; - ANewWidth := AWidth; - ProcessFixedItems; - AAssignAllWidths := False; - repeat - AAvailableWidth := ANewAvailableWidth; - AWidth := ANewWidth; - AOffset := 0; - AItemWithMinWidthFound := False; - - for I := 0 to Count - 1 do - if Items[I].AutoWidth = -1 then ProcessItem(Items[I]); - - if not AItemWithMinWidthFound then - AAssignAllWidths := not AAssignAllWidths; - until (ANewWidth = 0) or not AItemWithMinWidthFound and not AAssignAllWidths; -end; - -{ TcxAlignment } - -constructor TcxAlignment.Create(AOwner: TPersistent; AUseAssignedValues: Boolean = False; - ADefaultHorz: TAlignment = taLeftJustify; ADefaultVert: TcxAlignmentVert = vaTop); -begin - inherited Create; - FOwner := AOwner; - FUseAssignedValues := AUseAssignedValues; - FDefaultHorz := ADefaultHorz; - FDefaultVert := ADefaultVert; - FHorz := FDefaultHorz; - FVert := FDefaultVert; -end; - -procedure TcxAlignment.Assign(Source: TPersistent); -var - AChanged: Boolean; -begin - if Source is TcxAlignment then - with Source as TcxAlignment do - begin - AChanged := Self.FHorz <> FHorz; - Self.FHorz := FHorz; - AChanged := AChanged or (Self.FVert <> FVert); - Self.FVert := FVert; - Self.FIsHorzAssigned := FIsHorzAssigned; - Self.FIsVertAssigned := FIsVertAssigned; - if AChanged then - Self.DoChanged; - end - else - inherited Assign(Source); -end; - -procedure TcxAlignment.Reset; -var - AChanged: Boolean; -begin - FIsHorzAssigned := False; - FIsVertAssigned := False; - AChanged := FHorz <> FDefaultHorz; - FHorz := FDefaultHorz; - AChanged := AChanged or (FVert <> FDefaultVert); - FVert := FDefaultVert; - if AChanged then - DoChanged; -end; - -procedure TcxAlignment.DoChanged; -begin - if Assigned(FOnChanged) then - FOnChanged(Self); -end; - -function TcxAlignment.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -function TcxAlignment.IsHorzStored: Boolean; -begin - if FUseAssignedValues then - Result := FIsHorzAssigned - else - Result := FHorz <> FDefaultHorz; -end; - -function TcxAlignment.IsVertStored: Boolean; -begin - if FUseAssignedValues then - Result := FIsVertAssigned - else - Result := FVert <> FDefaultVert; -end; - -procedure TcxAlignment.SetHorz(const Value: TAlignment); -begin - FIsHorzAssigned := True; - if Value <> FHorz then - begin - FHorz := Value; - DoChanged; - end; -end; - -procedure TcxAlignment.SetVert(const Value: TcxAlignmentVert); -begin - FIsVertAssigned := True; - if Value <> FVert then - begin - FVert := Value; - DoChanged; - end; -end; - -{ TcxObjectLinkController } - -constructor TcxObjectLinkController.Create; -begin - inherited Create; - FLinks := TList.Create; -end; - -destructor TcxObjectLinkController.Destroy; -begin - FreeAndNil(FLinks); - inherited Destroy; -end; - -function TcxObjectLinkController.AddLink(AObject: TObject): TcxObjectLink; -begin - Result := TcxObjectLink.Create; - Result.Ref := AObject; - FLinks.Add(Result); -end; - -procedure TcxObjectLinkController.RemoveLink(ALink: TcxObjectLink); -begin - if ALink.Ref <> nil then - FLinks.Remove(ALink); - ALink.Free; -end; - -procedure TcxObjectLinkController.ClearLinks(AObject: TObject); -var - I: Integer; - ALink: TcxObjectLink; -begin - for I := FLinks.Count - 1 downto 0 do - begin - ALink := TcxObjectLink(FLinks[I]); - if ALink.Ref = AObject then - begin - ALink.Ref := nil; - FLinks.Delete(I); - end; - end; -end; - -{ TcxFreeNotificator } - -procedure TcxFreeNotificator.AddSender(ASender: TComponent); -begin - if ASender <> nil then - ASender.FreeNotification(Self); -end; - -procedure TcxFreeNotificator.RemoveSender(ASender: TComponent); -begin -{$IFDEF DELPHI5} - if ASender <> nil then - ASender.RemoveFreeNotification(Self); -{$ENDIF} -end; - -procedure TcxFreeNotificator.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and Assigned(FOnFreeNotification) then - FOnFreeNotification(AComponent); -end; - -procedure AddObjectLinkControllerRefCount; -begin - Inc(FObjectLinkControllerRefCount); - if FObjectLinkController = nil then - FObjectLinkController := TcxObjectLinkController.Create; -end; - -procedure ReleaseObjectLinkControllerRefCount; -begin - Dec(FObjectLinkControllerRefCount); - if FObjectLinkControllerRefCount = 0 then - FreeAndNil(FObjectLinkController); -end; - -function cxAddObjectLink(AObject: TObject): TcxObjectLink; -begin - if AObject <> nil then - begin - AddObjectLinkControllerRefCount; - Result := FObjectLinkController.AddLink(AObject); - end - else - Result := nil; -end; - -procedure cxRemoveObjectLink(ALink: TcxObjectLink); -begin - if ALink <> nil then - begin - FObjectLinkController.RemoveLink(ALink); - ReleaseObjectLinkControllerRefCount; - end; -end; - -procedure cxClearObjectLinks(AObject: TObject); -begin - if FObjectLinkController <> nil then - FObjectLinkController.ClearLinks(AObject); -end; - -{ TcxMRUItems } - -constructor TcxMRUItems.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TcxMRUItems.Destroy; -begin - ClearItems; - FItems.Free; - inherited; -end; - -function TcxMRUItems.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxMRUItems.GetItem(Index: Integer): TcxMRUItem; -begin - Result := TcxMRUItem(FItems[Index]); -end; - -procedure TcxMRUItems.SetCount(Value: Integer); -var - I: Integer; -begin - if Value < Count then - for I := Count - 1 downto Value do - Delete(I); -end; - -procedure TcxMRUItems.SetMaxCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FMaxCount <> Value then - begin - FMaxCount := Value; - UpdateCount; - end; -end; - -procedure TcxMRUItems.Delete(AIndex: Integer); -begin - Items[AIndex].Free; - FItems.Delete(AIndex); -end; - -procedure TcxMRUItems.UpdateCount; -begin - if MaxCount <> 0 then Count := MaxCount; -end; - -procedure TcxMRUItems.Add(AItem: TcxMRUItem); -var - AIndex: Integer; -begin - AIndex := IndexOf(AItem); - if AIndex = -1 then - begin - FItems.Insert(0, AItem); - UpdateCount; - end - else - begin - FItems.Move(AIndex, 0); - AItem.Free; - end; -end; - -procedure TcxMRUItems.ClearItems; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Delete(I); -end; - -function TcxMRUItems.IndexOf(AItem: TcxMRUItem): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].Equals(AItem) then Exit; - Result := -1; -end; - -{ TcxOpenList } - -function TcxOpenList.GetItem(Index: Integer): TObject; -begin - Result := TObject(inherited Items[Index]); -end; - -procedure TcxOpenList.SetItem(Index: Integer; Value: TObject); -begin - Count := Max(Count, 1 + Index); - inherited Items[Index] := Value; -end; - -{ TcxComponentCollectionItem } - -destructor TcxComponentCollectionItem.Destroy; -begin - SetCollection(nil); - inherited Destroy; -end; - -procedure TcxComponentCollectionItem.Changed(AAllItems: Boolean); -begin - if not (csDestroying in ComponentState) and (Collection <> nil) then - if AAllItems then - Collection.Changed - else - Collection.Changed(Self); -end; - -function TcxComponentCollectionItem.GetDisplayName: string; -begin - Result := Name; -end; - -function TcxComponentCollectionItem.GetParentComponent: TComponent; -begin - if Collection <> nil then - Result := Collection.ParentComponent - else - Result := inherited GetParentComponent; -end; - -function TcxComponentCollectionItem.HasParent: Boolean; -begin - Result := GetParentComponent <> nil; -end; - -procedure TcxComponentCollectionItem.SetParentComponent(Value: TComponent); -begin - Collection := GetCollectionFromParent(Value); -end; - -procedure TcxComponentCollectionItem.SetCollection(AValue: TcxComponentCollection); -begin - if Collection <> AValue then - begin - RemoveFromCollection(Collection); - AddToCollection(AValue); - end; -end; - -procedure TcxComponentCollectionItem.SetIndex(AValue: Integer); -var - ACurIndex: Integer; -begin - ACurIndex := GetIndex; - if (ACurIndex >= 0) and (ACurIndex <> AValue) then - begin - Collection.FItems.Move(ACurIndex, AValue); - Changed(True); - end; -end; - -procedure TcxComponentCollectionItem.AddToCollection(ACollection: TcxComponentCollection); -begin - if ACollection <> nil then - ACollection.InsertItem(Self); -end; - -function TcxComponentCollectionItem.GetIndex: Integer; -begin - if Collection <> nil then - Result := Collection.FItems.IndexOf(Self) - else - Result := -1; -end; - -procedure TcxComponentCollectionItem.RemoveFromCollection(ACollection: TcxComponentCollection); -begin - if ACollection <> nil then - ACollection.RemoveItem(Self); -end; - -{ TcxComponentCollection } - -constructor TcxComponentCollection.Create(AParentComponent: TComponent; AItemClass: TcxComponentCollectionItemClass); -begin - inherited Create; - FParentComponent := AParentComponent; - FItemClass := AItemClass; - FItems := TList.Create; -end; - -destructor TcxComponentCollection.Destroy; -begin - FUpdateCount := 1; - if FItems <> nil then - Clear; - FItems.Free; - inherited Destroy; -end; - -procedure TcxComponentCollection.Assign(Source: TPersistent); -var - I: Integer; -begin - if Source is TcxComponentCollection then - begin - BeginUpdate; - try - Clear; - for I := 0 to TcxComponentCollection(Source).Count - 1 do - Add.Assign(TcxComponentCollection(Source).Items[I]); - finally - EndUpdate; - end; - end - else - inherited Assign(Source); -end; - -function TcxComponentCollection.Add: TcxComponentCollectionItem; -begin - Result := FItemClass.Create(ParentComponent.Owner); - Result.SetParentComponent(ParentComponent); - SetItemName(Result); -end; - -procedure TcxComponentCollection.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TcxComponentCollection.Clear; -begin - if FItems.Count = 0 then Exit; - BeginUpdate; - try - while FItems.Count > 0 do - TObject(FItems.Last).Free; - finally - EndUpdate; - end; -end; - -procedure TcxComponentCollection.Delete(AIndex: Integer); -begin - Notify(Items[AIndex], ccnDeleting); - Items[AIndex].Free; -end; - -procedure TcxComponentCollection.EndUpdate(AForceUpdate: Boolean = True); -begin - Dec(FUpdateCount); - if AForceUpdate then - Changed; -end; - -function TcxComponentCollection.FindItemByID(ID: Integer): TcxComponentCollectionItem; -var - I: Integer; -begin - for I := 0 to FItems.Count-1 do - begin - Result := Items[I]; - if Result.ID = ID then - Exit; - end; - Result := nil; -end; - -function TcxComponentCollection.Insert(AIndex: Integer): TcxComponentCollectionItem; -begin - Result := Add; - Result.Index := AIndex; -end; - -procedure TcxComponentCollection.Remove(AItem: TcxComponentCollectionItem); -var - AIndex: Integer; -begin - AIndex := FItems.IndexOf(AItem); - if AIndex > -1 then - Delete(AIndex); -end; - -procedure TcxComponentCollection.InsertItem(AItem: TcxComponentCollectionItem); -begin - if not (AItem is FItemClass) then - Exit; - FItems.Add(AItem); - AItem.FCollection := Self; - AItem.FID := FNextID; - Inc(FNextID); - Notify(AItem, ccnAdded); - Changed(AItem, ccnAdded); -end; - -procedure TcxComponentCollection.RemoveItem(AItem: TcxComponentCollectionItem); -begin - Notify(AItem, ccnExtracting); - FItems.Remove(AItem); - AItem.FCollection := nil; - Notify(AItem, ccnExtracted); - Changed(AItem, ccnExtracted); -end; - -procedure TcxComponentCollection.Changed(AItem: TcxComponentCollectionItem = nil; - AAction: TcxComponentCollectionNotification = ccnChanged); -begin - if FUpdateCount = 0 then - Update(AItem, AAction); -end; - -function TcxComponentCollection.GetItem(AIndex: Integer): TcxComponentCollectionItem; -begin - Result := TcxComponentCollectionItem(FItems[AIndex]); -end; - -function TcxComponentCollection.GetOwner: TPersistent; -begin - Result := ParentComponent; -end; - -procedure TcxComponentCollection.Notify(AItem: TcxComponentCollectionItem; - AAction: TcxComponentCollectionNotification); -begin -end; - -procedure TcxComponentCollection.SetItem(AIndex: Integer; Value: TcxComponentCollectionItem); -begin - Items[AIndex].Assign(Value); -end; - -procedure TcxComponentCollection.SetItemName(AItem: TcxComponentCollectionItem); -begin - -end; - -procedure TcxComponentCollection.Update(AItem: TcxComponentCollectionItem; - AAction: TcxComponentCollectionNotification); -begin - if Assigned(OnChange) then - OnChange(Self, AItem, AAction); -end; - -function TcxComponentCollection.GetCount: Integer; -begin - Result := FItems.Count; -end; - -{ functions } - -procedure CallNotify(ANotifyEvent: TNotifyEvent; ASender: TObject); -begin - if Assigned(ANotifyEvent) then - ANotifyEvent(ASender); -end; - -function ClassInheritsFrom(AClass: TClass; const AParentClassName: string): Boolean; -var - AParentClass: TClass; -begin - AParentClass := AClass; - repeat - Result := AParentClass.ClassName = AParentClassName; - if Result then Break; - AParentClass := AParentClass.ClassParent; - until AParentClass = nil; -end; - -procedure CopyList(ASource, ADestination: TList); -begin - ADestination.Count := ASource.Count; - Move(ASource.List^, ADestination.List^, ASource.Count * SizeOf(Pointer)); -end; - -function EqualMethods(const AMethod1, AMethod2: TMethod): Boolean; -begin - Result := (AMethod1.Code = AMethod2.Code) and (AMethod1.Data = AMethod2.Data); -end; - -procedure FillStringsWithEnumTypeValues(AStrings: TStrings; ATypeInfo: PTypeInfo; - AGetTypeItemCaption: TcxGetCaptionForIntegerItemFunc); -var - ATypeData: PTypeData; - I: Integer; - S: string; -begin - ATypeData := GetTypeData(ATypeInfo); - AStrings.BeginUpdate; - try - for I := ATypeData.MinValue to ATypeData.MaxValue do - begin - S := AGetTypeItemCaption(I); - if S <> '' then - AStrings.AddObject(S, TObject(I)); - end; - finally - AStrings.EndUpdate; - end; -end; - -function GetPersistentOwner(APersistent: TPersistent): TPersistent; -begin - Result := TPersistentAccess(APersistent).GetOwner; -end; - -function GetSubobjectName(AObject, ASubobject: TPersistent): string; -var - APropList: PPropList; - I: Integer; -begin - Result := ''; - I := GetPropList(AObject.ClassInfo, [tkClass], nil); - GetMem(APropList, I * SizeOf(PPropInfo)); - GetPropList(AObject.ClassInfo, [tkClass], APropList); - try - for I := 0 to I - 1 do - if APropList[I].PropType^ = ASubobject.ClassInfo then - begin - Result := dxShortStringToString(APropList[I].Name); - Break; - end; - finally - FreeMem(APropList); - end; -end; - -function GetValidName(AComponent: TComponent; const AName: string; - AIsBaseName: Boolean = False): string; -var - AOwner: TComponent; - I: Integer; - - function GetNextName: string; - begin - Result := AName + IntToStr(I); - Inc(I); - end; - -begin - Result := AName; - AOwner := AComponent.Owner; - if AOwner = nil then Exit; - I := 1; - if AIsBaseName then Result := GetNextName; - while AOwner.FindComponent(Result) <> nil do - Result := GetNextName; -end; - -function HexToByte(const AHex: string): Byte; - - function CharToByte(C: Char): Byte; - begin - if C <= '9' then - Result := Ord(C) - Ord('0') - else - Result := 10 + Ord(Upcase(C)) - Ord('A'); - end; - -begin - Result := 16 * CharToByte(AHex[1]) + CharToByte(AHex[2]); -end; - -procedure RenameComponents(ACaller, AOwner: TComponent; - ANewName, AOldName: TComponentName; - AComponentCount: Integer; AGetComponent: TcxGetComponent); -var - I: Integer; - AComponent: TComponent; - AComponentName, ANamePrefix: TComponentName; -begin - // Components introduced in an ancestor will be renamed by IDE. - // We cannot rename components introduced in a successor because - // IDE will not refresh source code in a successor. - if csAncestor in ACaller.ComponentState then Exit; - for I := 0 to AComponentCount - 1 do - begin - AComponent := AGetComponent(ACaller, I); - if (AComponent.Owner = AOwner) {and not (csAncestor in AComponent.ComponentState)} then - begin - AComponentName := AComponent.Name; - if Length(AComponentName) > Length(AOldName) then - begin - ANamePrefix := Copy(AComponentName, 1, Length(AOldName)); - if CompareText(AOldName, ANamePrefix) = 0 then - begin - Delete(AComponentName, 1, Length(AOldName)); - Insert(ANewName, AComponentName, 1); - try - AComponent.Name := AComponentName; - except - on EComponentError do { Ignore rename errors }; - end; - end; - end; - end; - end; -end; - -function RoundDiv(I1, I2: Integer): Integer; -begin - Result := I1 div I2 + Ord(I1 mod I2 <> 0); -end; - -function Size(cx, cy: Longint): TSize; -begin - Result.cx := cx; - Result.cy := cy; -end; - -procedure SwapIntegers(var I1, I2: Integer); -var - I: Integer; -begin - I := I1; - I1 := I2; - I2 := I; -end; - -function GetRangeCenter(ABound1, ABound2: Integer): Integer; -begin - if ABound1 + ABound2 > 0 then - Result := (ABound1 + ABound2) div 2 - else - Result := (ABound1 + ABound2 - 1) div 2; -end; - -function StreamsEqual(AStream1, AStream2: TMemoryStream): Boolean; -begin - Result := (AStream1.Size = AStream2.Size) and - CompareMem(AStream1.Memory, AStream2.Memory, AStream1.Size); -end; - -procedure OpenWebPage(const AWebAddress: string); -begin - ShellExecute(0, 'OPEN', PChar(string(AWebAddress)), nil, nil, SW_SHOWMAXIMIZED); -end; - -function GetCorrectPath(const S: string): string; -var - I: Integer; -begin - Result := S; - for I := 1 to Length(Result) do - if Result[I] = '/' then - Result[I] := {$IFDEF DELPHI6}PathDelim{$ELSE}'\'{$ENDIF}; -end; - -type - TcxResourceStringsModificationMode = (rmmByResStringValue, rmmByResStringID, rmmUndefined); - - TcxResOriginalStrings = class(TStringList) - public - {$IFNDEF DELPHI6} - function IndexOf(const S: string): Integer; override; - {$ELSE} - constructor Create; - {$ENDIF} - end; - -{$IFNDEF DELPHI6} -function TcxResOriginalStrings.IndexOf(const S: string): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if AnsiCompareStr(Get(I), S) = 0 then - begin - Result := I; - Break; - end; -end; -{$ELSE} -constructor TcxResOriginalStrings.Create; -begin - inherited Create; - CaseSensitive := True; -end; -{$ENDIF} - -var - FResOriginalStrings: TcxResOriginalStrings; - FResStrings: TStringList; - FResStringsModificationMode: TcxResourceStringsModificationMode = rmmUndefined; - -procedure CreateResStringLists( - AResStringsModificationMode: TcxResourceStringsModificationMode); -begin - if AResStringsModificationMode = rmmUndefined then - raise EdxException.Create(''); - if (FResStringsModificationMode <> rmmUndefined) and - (AResStringsModificationMode <> FResStringsModificationMode) then - raise EdxException.Create('You cannot mix cxSetResourceString and cxSetResourceStringNet calls'); - - if FResStringsModificationMode = rmmUndefined then - begin - FResStringsModificationMode := AResStringsModificationMode; - FResOriginalStrings := TcxResOriginalStrings.Create; - FResStrings := TStringList.Create; - end; -end; - -procedure DestroyResStringLists; -begin - FResStringsModificationMode := rmmUndefined; - FreeAndNil(FResOriginalStrings); - FreeAndNil(FResStrings); -end; - -function GetResOriginalStringIndex(AResString: TcxResourceStringID): Integer; -begin - case FResStringsModificationMode of - rmmByResStringValue: - Result := FResOriginalStrings.IndexOf(LoadResString(AResString)); - rmmByResStringID: - Result := FResOriginalStrings.IndexOfObject(TObject(AResString)); - else - Result := -1; - end; -end; - -function cxGetResourceString(AResString: TcxResourceStringID): string; -var - AIndex: Integer; -begin - AIndex := GetResOriginalStringIndex(AResString); - if AIndex <> -1 then - Result := FResStrings[AIndex] - else - Result := LoadResString(AResString); -end; - -procedure cxSetResourceString(AResString: TcxResourceStringID; - const Value: string); -var - AIndex: Integer; -begin - CreateResStringLists(rmmByResStringID); - AIndex := GetResOriginalStringIndex(AResString); - if AIndex <> -1 then - FResStrings[AIndex] := Value - else - begin - FResOriginalStrings.AddObject(LoadResString(AResString), TObject(AResString)); - FResStrings.Add(Value); - end; -end; - -function cxGetResourceString(const AResString: string): string;{$IFDEF DELPHI6} deprecated;{$ENDIF} -begin - Result := cxGetResourceStringNet(AResString); -end; - -function cxGetResourceStringNet(const AResString: string): string;{$IFDEF DELPHI6} deprecated;{$ENDIF} -var - AIndex: Integer; -begin - Result := AResString; - if FResOriginalStrings <> nil then - begin - AIndex := FResOriginalStrings.IndexOf(AResString); - if AIndex <> -1 then - Result := FResStrings[AIndex]; - end -end; - -procedure cxSetResourceStringNet(const AResString, Value: string);{$IFDEF DELPHI6} deprecated;{$ENDIF} -var - AIndex: Integer; -begin - CreateResStringLists(rmmByResStringValue); - AIndex := FResOriginalStrings.IndexOf(AResString); - if AIndex <> -1 then - FResStrings[AIndex] := Value - else - begin - FResOriginalStrings.Add(AResString); - FResStrings.Add(Value); - end; -end; - -procedure cxClearResourceStrings; -begin - if FResStrings <> nil then - FResStrings.Clear; - if FResOriginalStrings <> nil then - FResOriginalStrings.Clear; -end; - -function CreateUniqueName(AOwnerForm, AOwnerComponent, AComponent: TComponent; - const APrefixName, ASuffixName: string): string; - - function IsUnique(const AName: string): Boolean; - var - I: Integer; - begin - Result := True; - with AOwnerForm do - for I := 0 to ComponentCount - 1 do - if (Components[I] <> AComponent) and - (CompareText(Components[I].Name, AName) = 0) then - begin - Result := False; - Break; - end; - end; - -var - I, J: Integer; -begin - J := Ord(ASuffixName = ''); - for I := J to MaxInt do - begin - Result := cxGenerateComponentName(AOwnerComponent, - AComponent.ClassName, APrefixName, ASuffixName, I); - if IsUnique(Result) then - Break; - end; -end; - -function cxGenerateComponentName(AOwnerComponent: TComponent; - const AClassName, APrefixName, ASuffixName: string; ANumber: Integer): string; -var - S: string; - - procedure CheckName(var AName: string); - var - I: Integer; - begin - I := 1; - while I <= Length(AName) do - if dxCharInSet(AName[I], ['A'..'Z','a'..'z','_','0'..'9']) then - Inc(I) - else - if dxCharInSet(AName[I], LeadBytes) then - Delete(AName, I, 2) - else - Delete(AName, I, 1); - end; - -begin - S := ASuffixName; - CheckName(S); - if ((S = '') or dxCharInSet(S[1], ['0'..'9'])) and (AClassName <> '') then - begin - if (APrefixName <> '') and - (CompareText(APrefixName, Copy(AClassName, 1, Length(APrefixName))) = 0) then - S := Copy(AClassName, Length(APrefixName) + 1, Length(AClassName)) + S - else - begin - S := AClassName + S; - if S[1] = 'T' then Delete(S, 1, 1); - end; - end; - - if AOwnerComponent <> nil then - Result := AOwnerComponent.Name + S - else - Result := S; - - if ANumber > 0 then - Result := Result + IntToStr(ANumber); -end; - -function cxSign(const AValue: Double): Integer; -begin - Result := IfThen(AValue >= 0, 1, -1); -end; - -procedure SetHook(var AHook: HHook; AHookId: Integer; AHookProc: TFNHookProc); -begin - Assert(AHook = 0); - AHook := SetWindowsHookEx(AHookId, AHookProc, 0, GetCurrentThreadId); -end; - -procedure ReleaseHook(var AHook: HHOOK); -begin - if AHook <> 0 then - begin - UnhookWindowsHookEx(AHook); - AHook := 0; - end; -end; - -{ TcxDialogMetricsInfo } - -constructor TcxDialogMetricsInfo.Create(AForm: TForm); -begin - Store(AForm); -end; - -destructor TcxDialogMetricsInfo.Destroy; -begin - FreeCustomData; - inherited Destroy; -end; - -procedure TcxDialogMetricsInfo.Restore(AForm: TForm); -var - AIntf: IcxDialogMetricsInfoData; -begin - if FMaximized then - begin - ShowWindow(AForm.Handle, WS_MAXIMIZE); - AForm.WindowState := wsMaximized; - end - else - begin - AForm.Left := FLeft; - AForm.Top := FTop; - if AForm.BorderStyle in [bsSizeable, bsSizeToolWin] then - begin - AForm.ClientHeight := FClientHeight; - AForm.ClientWidth := FClientWidth; - end; - end; - if Supports(TObject(AForm), IcxDialogMetricsInfoData, AIntf) and (FData <> nil) then - AIntf.SetInfoData(FData); -end; - -procedure TcxDialogMetricsInfo.Store(AForm: TForm); -var - AIntf: IcxDialogMetricsInfoData; -begin - FDialogClass := AForm.ClassType; - FLeft := AForm.Left; - FTop := AForm.Top; - FClientHeight := AForm.ClientHeight; - FClientWidth := AForm.ClientWidth; - FMaximized := AForm.WindowState = wsMaximized; - FreeCustomData; - if Supports(TObject(AForm), IcxDialogMetricsInfoData, AIntf) and (AIntf.GetInfoDataSize > 0) then - begin - GetMem(FData, AIntf.GetInfoDataSize); - Move(AIntf.GetInfoData^, FData^, AIntf.GetInfoDataSize); - end; -end; - -procedure TcxDialogMetricsInfo.FreeCustomData; -begin - if FData <> nil then - begin - FreeMem(FData); - FData := nil; - end; -end; - -{ TcxThread } - -procedure TcxThread.DoHandleException; -begin - if FException is Exception then - Application.ShowException(FException) - else - SysUtils.ShowException(FException, nil); -end; - -procedure TcxThread.HandleException; -begin - FException := Exception(ExceptObject); - try - // Don't show EAbort messages - if not (FException is EAbort) then - Synchronize(DoHandleException); - finally - ResetException; - end; -end; - -procedure TcxThread.ResetException; -begin - FException := nil; -end; - -{ TcxComponentList } - -constructor TcxComponentList.Create; -begin - inherited Create(False); -end; - -destructor TcxComponentList.Destroy; -begin - FUpdateCount := 1; - inherited Destroy; -end; - -procedure TcxComponentList.Clear; -begin - if Count > 0 then - begin - BeginUpdate; - try - while Count > 0 do - Delete(0); - finally - EndUpdate; - end; - end; - inherited; // to free memory -end; - -procedure TcxComponentList.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TcxComponentList.CancelUpdate; -begin - Dec(FUpdateCount); -end; - -procedure TcxComponentList.EndUpdate; -begin - Dec(FUpdateCount); - Update; -end; - -procedure TcxComponentList.DoNotify(AItem: TComponent; AAction: TListNotification); - - function ConvertNotificaton(ANotification: TListNotification): TcxComponentCollectionNotification; - begin - case ANotification of - lnAdded: Result := ccnAdded; - lnExtracted: Result := ccnExtracted; - else {lnDeleted} - Result := ccnDeleting; - end; - end; - -begin - inherited Notify(AItem, AAction); - if Assigned(OnNotify) then - OnNotify(Self, AItem, AAction); - Update(AItem, ConvertNotificaton(AAction)); -end; - -function TcxComponentList.GetItemClass: TClass; -begin - Result := TComponent; -end; - -procedure TcxComponentList.Notify(Ptr: Pointer; Action: TListNotification); -begin - if TObject(Ptr) is GetItemClass then - DoNotify(Ptr, Action) - else - if Action = lnAdded then - Extract(Ptr); -end; - -procedure TcxComponentList.Update(AItem: TComponent = nil; - AAction: TcxComponentCollectionNotification = ccnChanged); -begin - if (FUpdateCount = 0) and Assigned(OnComponentListChanged) then - OnComponentListChanged(Self, AItem, AAction); -end; - -{ TcxDialogsMetricsStore } - -constructor TcxDialogsMetricsStore.Create; -begin - inherited; - FMetrics := TcxObjectList.Create; - FDefaultPosition := poMainFormCenter; -end; - -destructor TcxDialogsMetricsStore.Destroy; -begin - FMetrics.Free; - inherited Destroy; -end; - -procedure TcxDialogsMetricsStore.InitDialog(AForm: TForm); -begin - if FindMetrics(AForm) >= 0 then - begin - AForm.Position := poDesigned; - TcxDialogMetricsInfo(FMetrics[FindMetrics(AForm)]).Restore(AForm) - end - else - begin - AForm.Position := DefaultPosition; - FMetrics.Add(CreateMetrics(AForm)); - end; -end; - -procedure TcxDialogsMetricsStore.StoreMetrics(AForm: TForm); -begin - if FindMetrics(AForm) >= 0 then - TcxDialogMetricsInfo(FMetrics[FindMetrics(AForm)]).Store(AForm) -end; - -function TcxDialogsMetricsStore.CreateMetrics( - AForm: TForm): TcxDialogMetricsInfo; -begin - Result := TcxDialogMetricsInfo.Create(AForm); -end; - -function TcxDialogsMetricsStore.FindMetrics( - AForm: TForm): Integer; -begin - Result := FMetrics.Count - 1; - while Result >= 0 do - begin - if TcxDialogMetricsInfo(FMetrics[Result]).DialogClass = AForm.ClassType then - Break; - Dec(Result); - end; -end; - -function cxDialogsMetricsStore: TcxDialogsMetricsStore; -begin - if FDialogsMetrics = nil then - FDialogsMetrics := TcxDialogsMetricsStore.Create; - Result := FDialogsMetrics; -end; - -{ TcxHashedStringList } - -constructor TcxHashedStringList.Create; -begin - inherited Create; - FList := TStringList.Create; -end; - -destructor TcxHashedStringList.Destroy; -begin - FreeAndNil(FList); - inherited Destroy; -end; - -function TcxHashedStringList.Add(const S: string): Integer; -begin - Result := FList.Add(S) -end; - -procedure TcxHashedStringList.Clear; -begin - FList.Clear; -end; - -function TcxHashedStringList.IndexOf(const S: string): Integer; -var - I, AStrHash: Integer; -begin - Result := -1; - AStrHash := dxElfHash(S); - for I := 0 to Count - 1 do - if Hash[I] = AStrHash then - begin - if (Length(S) = Length(Strings[I])) and SameText(S, Strings[I]) then - begin - Result := I; - Break; - end; - end; -end; - -function TcxHashedStringList.GetCount: Integer; -begin - Result := FList.Count; -end; - -function TcxHashedStringList.GetHash(Index: Integer): Integer; -begin - Result := Integer(FList.Objects[Index]); - if Result = 0 then - begin - Result := dxElfHash(Strings[Index]); - FList.Objects[Index] := TObject(Result); - end; -end; - -function TcxHashedStringList.GetString(Index: Integer): string; -begin - Result := FList.Strings[Index]; -end; - -procedure TcxHashedStringList.SetString(Index: Integer; const AValue: string); -begin - FList.Strings[Index] := AValue; - FList.Objects[Index] := nil; -end; - -initialization -{$IFDEF DELPHI6} - StartClassGroup(TControl); - GroupDescendentsWith(TcxComponent, TControl); -{$ENDIF} - -finalization - FreeAndNil(FDialogsMetrics); - DestroyResStringLists; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxClassesReg.pas b/internal/x.46/ExpressLibrary/Sources/cxClassesReg.pas deleted file mode 100644 index 74108967..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxClassesReg.pas +++ /dev/null @@ -1,64 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxClassesReg; - -{$I cxVer.inc} - -interface - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI6} - DesignIntf, DesignEditors, -{$ELSE} - DsgnIntf, -{$ENDIF} - Classes, cxClasses, cxComponentCollectionEditor; - -procedure Register; -begin - RegisterPropertyEditor(TypeInfo(TComponent), TcxComponent, 'FakeComponentLink1', nil); - RegisterPropertyEditor(TypeInfo(TComponent), TcxComponent, 'FakeComponentLink2', nil); - RegisterPropertyEditor(TypeInfo(TComponent), TcxComponent, 'FakeComponentLink3', nil); - - RegisterPropertyEditor(TypeInfo(TcxComponentCollection), nil, '', TcxComponentCollectionProperty); -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxComponentCollectionEditor.dfm b/internal/x.46/ExpressLibrary/Sources/cxComponentCollectionEditor.dfm deleted file mode 100644 index 16fcf157..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxComponentCollectionEditor.dfm +++ /dev/null @@ -1,466 +0,0 @@ -object frmComponentCollectionEditor: TfrmComponentCollectionEditor - Left = 534 - Top = 162 - HelpContext = 26150 - HorzScrollBar.Increment = 10 - VertScrollBar.Increment = 11 - BorderIcons = [biSystemMenu] - BorderStyle = bsSizeToolWin - Caption = 'CollectionEditor' - ClientHeight = 152 - ClientWidth = 183 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = True - Position = poDesigned - ShowHint = True - OnClose = FormClose - OnDestroy = FormDestroy - OnKeyDown = FormKeyDown - OnKeyPress = FormKeyPress - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object ToolBar1: TToolBar - Left = 0 - Top = 0 - Width = 183 - Height = 28 - AutoSize = True - ButtonHeight = 24 - ButtonWidth = 24 - EdgeBorders = [ebTop, ebBottom] - Images = ImageList - PopupMenu = PopupMenu2 - TabOrder = 1 - Wrapable = False - object ToolButton1: TToolButton - Left = 0 - Top = 0 - Action = acAdd - end - object ToolButton2: TToolButton - Left = 24 - Top = 0 - Action = acDelete - end - object ToolButton3: TToolButton - Left = 48 - Top = 0 - Width = 8 - Caption = 'ToolButton3' - ImageIndex = 2 - Style = tbsSeparator - end - object ToolButton4: TToolButton - Left = 56 - Top = 0 - Action = acMoveUp - end - object ToolButton5: TToolButton - Left = 80 - Top = 0 - Action = acMoveDown - end - end - object Panel: TPanel - Left = 0 - Top = 28 - Width = 183 - Height = 124 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object ListView1: TListView - Left = 0 - Top = 0 - Width = 183 - Height = 124 - Align = alClient - Columns = < - item - AutoSize = True - end> - ColumnClick = False - DragMode = dmAutomatic - HideSelection = False - MultiSelect = True - ReadOnly = True - RowSelect = True - PopupMenu = PopupMenu1 - ShowColumnHeaders = False - TabOrder = 0 - ViewStyle = vsReport - OnChange = ListView1Change - OnDragDrop = ListView1DragDrop - OnDragOver = ListView1DragOver - OnKeyDown = ListView1KeyDown - OnKeyPress = ListView1KeyPress - end - end - object ImageList: TImageList - Left = 40 - Top = 40 - Bitmap = { - 494C010104000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400848484000000000000000000848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 0000FFFFFF0000FFFF0000000000848484000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 0000FFFFFF0000FFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6 - C60000000000FFFFFF000000000084848400848484000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6 - C60000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF - FF00C6C6C6000000000000000000848484000000840000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF - FF00C6C6C6000000000000000000848484000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 000000000000000000000000000084848400000084000000840000FFFF00FFFF - FF0000FFFF00FFFFFF00848484000000840000FFFF00FFFFFF00000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000000000FFFFFF008484 - 840000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00000000008484840084848400000084008484840000FF - FF00FFFFFF00848484000000840084848400FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000848484000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 0000000000000000000000000000000000008484840000FFFF0000FFFF008484 - 8400FFFFFF0000FFFF008484840000FFFF00FFFFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000848484000000000000008400000084008484 - 840000FFFF000000840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 0000000000000000000000000000000000000000000084848400FFFFFF008484 - 840000FFFF008484840000FFFF00FFFFFF0000FFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000848484000000000084848400000084000000 - 84000000840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000848484000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 000000000000000000000000000000000000848484008484840084848400FFFF - FF0084848400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000848484000000000084848400000084000000 - 840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF008484840000FF - FF00FFFFFF008484840084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000008484840000008400000084000000 - 8400000084008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 000000000000000000000000000000000000000000008484840000FFFF008484 - 840000FFFF008484840000FFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000840000008400848484000000 - 0000000084000000840084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000008484840000FFFF00000000008484 - 8400FFFFFF00000000008484840000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000840000008400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000FFFF0000000000000000008484 - 840000FFFF000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000008400000084008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFC000C000FFFFFFFF - 80008000FFFFFFFF80008000FFFFFFFF80000000F83FFEFF80000000F83FFC7F - 80000000F83FF83F00000000F83FF01F00008000C007E00F80008000E00FC007 - 00008000F01FF83F00010001F83FF83F81FF11FFFC7FF83F24FFF8FFFEFFF83F - 66FFFC7FFFFFFFFFE7FFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object ActionList: TActionList - Images = ImageList - Left = 8 - Top = 40 - object acAdd: TAction - Caption = '&Add' - Hint = 'Add New' - ImageIndex = 0 - ShortCut = 45 - OnExecute = acAddExecute - end - object acDelete: TAction - Caption = '&Delete' - Enabled = False - Hint = 'Delete Selected' - ImageIndex = 1 - ShortCut = 46 - OnExecute = acDeleteExecute - OnUpdate = SelectionUpdate - end - object acMoveUp: TAction - Caption = 'Move &Up' - Enabled = False - Hint = 'Move Selected Up' - ImageIndex = 2 - ShortCut = 16422 - OnExecute = acMoveUpExecute - OnUpdate = SelectionUpdate - end - object acMoveDown: TAction - Caption = 'Move Dow&n' - Enabled = False - Hint = 'Move Selected Down' - ImageIndex = 3 - ShortCut = 16424 - OnExecute = acMoveDownExecute - OnUpdate = SelectionUpdate - end - object acSelectAll: TAction - Caption = '&Select All' - Enabled = False - ShortCut = 16449 - OnExecute = acSelectAllExecute - OnUpdate = SelectAllCommandUpdate - end - object acToolbar: TAction - Caption = '&Toolbar' - Checked = True - OnExecute = acToolbarExecute - OnUpdate = acToolbarUpdate - end - object acTextLabels: TAction - Caption = 'Text &Labels' - OnExecute = acTextLabelsExecute - end - end - object PopupMenu1: TPopupMenu - Images = ImageList - Left = 72 - Top = 40 - object miAdd: TMenuItem - Action = acAdd - end - object miDelete: TMenuItem - Action = acDelete - end - object miMoveUp: TMenuItem - Action = acMoveUp - end - object miMoveDown: TMenuItem - Action = acMoveDown - end - object SelectAll1: TMenuItem - Action = acSelectAll - end - object N1: TMenuItem - Caption = '-' - end - object miToolbar: TMenuItem - Action = acToolbar - end - end - object PopupMenu2: TPopupMenu - Left = 104 - Top = 40 - object miTextLabels: TMenuItem - Action = acTextLabels - end - end -end diff --git a/internal/x.46/ExpressLibrary/Sources/cxComponentCollectionEditor.pas b/internal/x.46/ExpressLibrary/Sources/cxComponentCollectionEditor.pas deleted file mode 100644 index 8e206659..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxComponentCollectionEditor.pas +++ /dev/null @@ -1,823 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCommonLibrary } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCOMMONLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxComponentCollectionEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, - DesignIntf, DesignWindows, ComponentDesigner, DesignConst, DesignEditors, ColnEdit, -{$ELSE} - DsgnWnds, DsgnIntf, LibIntf, DesignConst, ColnEdit, -{$ENDIF} - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, - StdCtrls, Menus, ExtCtrls, ComCtrls, ImgList, ActnList, ToolWin, - cxClasses, cxDesignWindows; - -type - - { TfrmComponentCollectionEditor } - - TfrmComponentCollectionEditor = class(TcxDesignFormEditor) - acAdd: TAction; - acDelete: TAction; - acMoveDown: TAction; - acMoveUp: TAction; - acSelectAll: TAction; - acTextLabels: TAction; - acToolbar: TAction; - ImageList: TImageList; - ListView1: TListView; - miAdd: TMenuItem; - miDelete: TMenuItem; - miMoveDown: TMenuItem; - miMoveUp: TMenuItem; - miTextLabels: TMenuItem; - miToolbar: TMenuItem; - N1: TMenuItem; - Panel: TPanel; - PopupMenu1: TPopupMenu; - PopupMenu2: TPopupMenu; - Toolbar1: TToolbar; - ToolButton1: TToolButton; - ToolButton2: TToolButton; - ToolButton3: TToolButton; - ToolButton4: TToolButton; - ToolButton5: TToolButton; - ActionList: TActionList; - SelectAll1: TMenuItem; - procedure acAddExecute(Sender: TObject); - procedure acDeleteExecute(Sender: TObject); - procedure acMoveDownExecute(Sender: TObject); - procedure acMoveUpExecute(Sender: TObject); - procedure acSelectAllExecute(Sender: TObject); - procedure acTextLabelsExecute(Sender: TObject); - procedure acToolbarExecute(Sender: TObject); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure FormDestroy(Sender: TObject); - procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure FormKeyPress(Sender: TObject; var Key: Char); - procedure FormShow(Sender: TObject); - procedure ListView1Change(Sender: TObject; Item: TListItem; Change: TItemChange); - procedure ListView1DragDrop(Sender, Source: TObject; X, Y: Integer); - procedure ListView1DragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); - procedure ListView1KeyDown(Sender: TObject; var Key: word; Shift: TShiftState); - procedure ListView1KeyPress(Sender: TObject; var Key: Char); - procedure SelectAllCommandUpdate(Sender: TObject); - procedure SelectionUpdate(Sender: TObject); - procedure acToolbarUpdate(Sender: TObject); - private - FAddedItemIDList: TList; - FCollectionClassName: string; - FSelectionError: Boolean; - FColOptions: TColOptions; - procedure AMDeferUpdate(var Msg); message AM_DeferUpdate; - function GetCollection: TcxComponentCollection; - function GetRegKey: string; - procedure SetColOptions(Value: TColOptions); - procedure WMActivate(var Message: TWMActivate); message WM_ACTIVATE; - protected - procedure Activated; override; - function CanAdd(Index: Integer): Boolean; virtual; - procedure InitFormEditor; override; - procedure SelectAll(DoUpdate: Boolean = True); - procedure SelectNone(DoUpdate: Boolean = True); - procedure UpdateCaption; override; - procedure UpdateContent; override; - public - constructor Create(AOwner: TComponent); override; - procedure DoItemsModified; override; - function GetItemName(ItemIndex: Integer): string; - procedure GetSelection; - procedure SelectionsChanged(const ASelection: TDesignerSelectionList); override; - procedure SetSelection; - procedure UpdateListbox; - - property Collection: TcxComponentCollection read GetCollection; - property CollectionPropertyName: string read ComponentPropertyName; - property Options: TColOptions read FColOptions write SetColOptions - default [coAdd, coDelete, coMove]; - end; - - { TcxComponentCollectionProperty } - - TcxComponentCollectionEditorClass = class of TfrmComponentCollectionEditor; - - TcxComponentCollectionProperty = class(TClassProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - function GetEditorClass: TcxComponentCollectionEditorClass; virtual; - function GetColOptions: TColOptions; virtual; - end; - -implementation - -{$R *.dfm} - -uses - Registry, TypInfo, dxCore; - -type - TPersistentAccess = class(TPersistent); // used for protected method access - -{ TcxComponentCollectionProperty } - -procedure TcxComponentCollectionProperty.Edit; -var - Obj: TPersistent; -begin - Obj := GetComponent(0); - while (Obj <> nil) and not (Obj is TComponent) do - Obj := TPersistentAccess(Obj).GetOwner; - TfrmComponentCollectionEditor(ShowFormEditorClass(Designer, TComponent(Obj), - TcxComponentCollection(GetOrdValue), GetName, GetEditorClass)).Options := GetColOptions; -end; - -function TcxComponentCollectionProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paDialog, paReadOnly]; -end; - -function TcxComponentCollectionProperty.GetEditorClass: TcxComponentCollectionEditorClass; -begin - Result := TfrmComponentCollectionEditor; -end; - -function TcxComponentCollectionProperty.GetColOptions: TColOptions; -begin - Result := [coAdd, coDelete, coMove]; -end; - -{ TfrmComponentCollectionEditor } - -constructor TfrmComponentCollectionEditor.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FColOptions := [coAdd, coDelete, coMove]; -end; - -procedure TfrmComponentCollectionEditor.acAddExecute(Sender: TObject); -var - Item: TListItem; - PrevCount, PrevListCount: Integer; -begin - BeginUpdate; - SelectNone(False); - Collection.BeginUpdate; - try - PrevCount := Collection.Count + 1; - PrevListCount := ListView1.Items.Count; - Collection.Add; - { Take into account collections that free items } - if (PrevCount <> Collection.Count) then - UpdateListBox - else - if ListView1.Items.Count > PrevListCount then - ListView1.Items[ListView1.Items.Count - 1].Selected := True - else - ListView1.Selected := ListView1.Items.Add; - finally - Collection.EndUpdate; - end; - CancelUpdate; - SetSelection; - if csAncestor in Component.ComponentState then - begin - if FAddedItemIDList = nil then - FAddedItemIDList := TList.Create; - FAddedItemIDList.Add(Pointer(Collection.Items[Collection.Count - 1].ID)); - end; - Item := ListView1.Items[ListView1.Items.Count-1]; - Item.Focused := True; - Item.MakeVisible(False); -end; - -procedure TfrmComponentCollectionEditor.acDeleteExecute(Sender: TObject); -var - I, J, K: Integer; - Item: TcxComponentCollectionItem; - Found: Boolean; -begin - BeginUpdate; - Collection.BeginUpdate; - try - Designer.SetSelections(nil); - if ListView1.Selected <> nil then - J := ListView1.Selected.Index - else - J := -1; - if (ListView1.SelCount = Collection.Count) and ((csAncestor in Component.ComponentState) = False) then - Collection.Clear - else if ListView1.SelCount > 0 then - for I := ListView1.Items.Count - 1 downto 0 do - if ListView1.Items[I].Selected then - begin - Found := False; - if (FAddedItemIDList <> nil) and (FAddedItemIDList.Count > 0) then - for K := 0 to FAddedItemIDList.Count -1 do - begin - Item := Collection.FindItemByID(Integer(FAddedItemIDList[K])); - if Item = Collection.Items[i] then - begin - FAddedItemIDList.Delete(K); - Found := True; - Break; - end - else Found := False; - end; - if (not Found) and (csAncestor in Component.ComponentState) then - raise EdxException.Create(SCantDeleteAncestor) - else - Collection.Items[I].Free; - end; - finally - Collection.EndUpdate; - CancelUpdate; - end; - UpdateListbox; - if J >= ListView1.Items.Count then - J := ListView1.Items.Count - 1; - if (J > -1) and (J < ListView1.Items.Count) then - ListView1.Selected := ListView1.Items[J]; - SetSelection; -end; - -procedure TfrmComponentCollectionEditor.acMoveDownExecute(Sender: TObject); -var - I, InsPos: Integer; -begin - if (ListView1.SelCount = 0) or - (ListView1.SelCount = Collection.Count) then Exit; - - InsPos := ListView1.Items.Count - 1; - while not ListView1.Items[InsPos].Selected do - Dec(InsPos); - if InsPos < (ListView1.Items.Count -1) then Inc(InsPos); - - Collection.BeginUpdate; - try - for I := ListView1.Items.Count - 1 downto 0 do - if ListView1.Items[I].Selected then - begin - Collection.Items[I].Index := InsPos; - Dec(InsPos); - end; - finally - Collection.EndUpdate; - end; - Designer.Modified; - UpdateContent; -end; - -procedure TfrmComponentCollectionEditor.acMoveUpExecute(Sender: TObject); -var - I, InsPos: Integer; -begin - if (ListView1.SelCount = 0) or - (ListView1.SelCount = Collection.Count) then Exit; - - InsPos := 0; - while not ListView1.Items[InsPos].Selected do - Inc(InsPos); - if InsPos > 0 then Dec(InsPos); - - Collection.BeginUpdate; - try - for I := 0 to ListView1.Items.Count - 1 do - if ListView1.Items[I].Selected then - begin - Collection.Items[I].Index := InsPos; - Inc(InsPos); - end; - finally - Collection.EndUpdate; - end; - Designer.Modified; - UpdateContent; -end; - -procedure TfrmComponentCollectionEditor.acSelectAllExecute(Sender: TObject); -begin - SelectAll; -end; - -procedure TfrmComponentCollectionEditor.acTextLabelsExecute(Sender: TObject); -begin - with acTextLabels do - begin - Checked := not Checked; - Toolbar1.ShowCaptions := Checked; - if not Checked then - begin - Toolbar1.ButtonHeight := 24; - Toolbar1.ButtonWidth := 24; - end; - end; -end; - -procedure TfrmComponentCollectionEditor.acToolbarExecute(Sender: TObject); -begin - with acToolbar do - begin - Checked := not Checked; - Toolbar1.Visible := Checked; - end; -end; - -procedure TfrmComponentCollectionEditor.acToolbarUpdate(Sender: TObject); -begin - (Sender as TAction).Checked := Toolbar1.Visible; -end; - -procedure TfrmComponentCollectionEditor.SetColOptions(Value: TColOptions); -begin - FColOptions := Value; - acAdd.Enabled := coAdd in Value; -end; - -procedure TfrmComponentCollectionEditor.WMActivate(var Message: TWMActivate); -begin - inherited; - if (Message.Active <> WA_INACTIVE) and (Collection <> nil) then - SetSelection; -end; - -procedure TfrmComponentCollectionEditor.DoItemsModified; -begin - if Collection <> nil then - begin - UpdateListbox; - GetSelection; - end; -end; - -function TfrmComponentCollectionEditor.GetItemName(ItemIndex: Integer): string; -var - AName: string; -begin - AName := Collection.Items[ItemIndex].DisplayName; - if AName = '' then - AName := ''; - Result := Format('%d - %s',[ItemIndex, AName]) -end; - -function TfrmComponentCollectionEditor.GetCollection: TcxComponentCollection; -begin - Result := TcxComponentCollection(ComponentProperty); -end; - -function TfrmComponentCollectionEditor.GetRegKey: string; -begin - Result := GetBaseRegKey + '\ComponentCollection Editor'; -end; - -procedure TfrmComponentCollectionEditor.GetSelection; -var - I: Integer; - Item: TcxComponentCollectionItem; - List: {$IFDEF DELPHI6}IDesignerSelections{$ELSE}TDesignerSelectionList{$ENDIF}; -begin - BeginUpdate; - try - ListView1.Selected := nil; - finally - CancelUpdate; - end; -{$IFDEF DELPHI6} - List := CreateSelectionList; -{$ELSE} - List := TDesignerSelectionList.Create; - try -{$ENDIF} - Designer.GetSelections(List); - if (List.Count = 0) or (List.Count > Collection.Count) then Exit; - if not ((List[0] = Component) or (List[0] = Collection) - or (TcxComponentCollectionItem(List[0]).Collection = Collection)) then Exit; - if List.Count > ListView1.Items.Count then - UpdateListbox; - BeginUpdate; - try - {$IFDEF DELPHI6} - ListView1.ClearSelection; - {$ELSE} - for I := 0 to ListView1.Items.Count - 1 do - ListView1.Items[I].Selected := False; - {$ENDIF} - for I := 0 to List.Count - 1 do - begin - if List[I] is TcxComponentCollectionItem then - begin - Item := TcxComponentCollectionItem(List[I]); - ListView1.Items[Item.Index].Selected := True - end; - end; - finally - CancelUpdate; - end; -{$IFNDEF DELPHI6} - finally - List.Free; - end; -{$ENDIF} -end; - -procedure TfrmComponentCollectionEditor.SelectionsChanged(const ASelection: TDesignerSelectionList); -begin - UpdateContent; -end; - -procedure TfrmComponentCollectionEditor.SetSelection; -var - I: Integer; - List: {$IFDEF DELPHI6}IDesignerSelections{$ELSE}TDesignerSelectionList{$ENDIF}; -begin - if csAncestor in Component.ComponentState then - UpdateListBox; - if FSelectionError then Exit; - try - if ListView1.SelCount > 0 then - begin - {$IFDEF DELPHI6} - List := CreateSelectionList; - {$ELSE} - List := TDesignerSelectionList.Create; - try - {$ENDIF} - for I := 0 to ListView1.Items.Count - 1 do - if ListView1.Items[I].Selected then - List.Add(Collection.Items[I]); - Designer.SetSelections(List); - {$IFNDEF DELPHI6} - finally - List.Free; - end; - {$ENDIF} - end - else - Designer.SelectComponent(Collection); - except - FSelectionError := True; - Application.HandleException(ExceptObject); - Close; - end; -end; - -procedure TfrmComponentCollectionEditor.UpdateListbox; - - procedure FetchItems(List: TStrings); - var - I: Integer; - begin - if Collection <> nil then - for I := 0 to Collection.Count - 1 do - if CanAdd(I) then - List.AddObject(GetItemName(I), nil); - end; - - function ItemsEqual(ListItems: TListItems; Items: TStrings): Boolean; - var - I: Integer; - begin - Result := False; - if ListItems.Count <> Items.Count then Exit; - for I := 0 to ListItems.Count - 1 do - begin - if ListItems[I].Caption <> Items[I] then - Exit; - end; - Result := True; - end; - -var - I: Integer; - TmpItems: TStringList; -begin - if Collection = nil then Exit; - BeginUpdate; - try - TmpItems := TStringList.Create; - FetchItems(TmpItems); - try - if (TmpItems.Count = 0) or not ItemsEqual(ListView1.Items, TmpItems) then - begin - ListView1.Items.BeginUpdate; - try - ListView1.Items.Clear; - for I := 0 to TmpItems.Count - 1 do - with ListView1.Items.Add do - Caption := TmpItems[I]; - finally - ListView1.Items.EndUpdate; - end; - end; - finally - TmpItems.Free; - end; - finally - CancelUpdate; - end; -end; - -procedure TfrmComponentCollectionEditor.FormClose(Sender: TObject; - var Action: TCloseAction); -begin - if Component <> nil then - Designer.SelectComponent(Component); - with TRegIniFile.Create(GetRegKey) do - try - EraseSection(FCollectionClassName); - WriteInteger(FCollectionClassName, 'Left', Left); - WriteInteger(FCollectionClassName, 'Top', Top); - WriteInteger(FCollectionClassName, 'Width', Width); - WriteInteger(FCollectionClassName, 'Height', Height); - WriteBool(FCollectionClassName, 'TextLabels', acTextLabels.Checked); - WriteBool(FCollectionClassName, 'Toolbar', ToolBar1.Visible); - finally - Free; - end; - BeginUpdate; - inherited; -end; - -procedure TfrmComponentCollectionEditor.FormDestroy(Sender: TObject); -begin - if FAddedItemIDList <> nil then - FreeAndNil(FAddedItemIDList); - inherited; -end; - -procedure TfrmComponentCollectionEditor.FormKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if Key = VK_PROCESSKEY then - {$IFDEF DELPHI6} - ComponentDesigner.Environment.ModalEdit(#0,Self); - {$ELSE} - DelphiIDE.ModalEdit(#0, Self); - {$ENDIF} -end; - -procedure TfrmComponentCollectionEditor.FormKeyPress(Sender: TObject; var Key: Char); -begin - if Key = #13 then - {$IFDEF DELPHI6} - ComponentDesigner.Environment.ModalEdit(#0,Self); - {$ELSE} - DelphiIDE.ModalEdit(#0, Self); - {$ENDIF} -end; - -procedure TfrmComponentCollectionEditor.FormShow(Sender: TObject); - - procedure UpdateSizes; - begin - with TRegIniFile.Create(GetRegKey) do - try - Top := ReadInteger(FCollectionClassName, 'Top', 100); - Left := ReadInteger(FCollectionClassName, 'Left', 100); - Width := ReadInteger(FCollectionClassName, 'Width', Width); - Height := ReadInteger(FCollectionClassName, 'Height', Height); - ToolBar1.Visible := ReadBool(FCollectionClassName, 'Toolbar', True); - acTextLabels.Checked := ReadBool(FCollectionClassName, 'TextLabels', False); - finally - Free; - end; - end; - -{$IFNDEF DELPHI6} -var - ALeft: Integer; - ATop: Integer; -{$ENDIF} -begin - UpdateSizes; -{$IFNDEF DELPHI6} - ALeft := Left; - ATop := Top; - if Left + Width > Monitor.Left + Monitor.Width then - ALeft := Monitor.Left + Monitor.Width - Width; - if Left < Monitor.Left then - ALeft := Monitor.Left; - if Top + Height > Monitor.Top + Monitor.Height then - ATop := Monitor.Top + Monitor.Height - Height; - if Top < Monitor.Top then - ATop := Monitor.Top; - SetBounds(ALeft, ATop, Width, Height); -{$ELSE} - MakeFullyVisible; -{$ENDIF} -end; - -procedure TfrmComponentCollectionEditor.ListView1Change(Sender: TObject; - Item: TListItem; Change: TItemChange); -var - Msg: TMsg; -begin - if (Change = ctState) and (LockCount = 0) then - if not PeekMessage(Msg, Handle, AM_DeferUpdate, AM_DeferUpdate, PM_NOREMOVE) then - PostMessage(Handle, AM_DeferUpdate, 0, 0); -end; - -procedure TfrmComponentCollectionEditor.ListView1DragDrop(Sender, Source: TObject; X, - Y: Integer); -var - Item: TListItem; - I, J, InsPos: Integer; - L: TList; -begin - Item := ListView1.GetItemAt(X, Y); - if Item <> nil then - InsPos := Item.Index - else Exit; - L := TList.Create; - try - for I := 0 to ListView1.Items.Count - 1 do - if ListView1.Items[I].Selected then - L.Add(Collection.Items[I]); - - Collection.BeginUpdate; - try - for I := 0 to L.Count - 1 do - with TcxComponentCollectionItem(L[I]) do - begin - J := Index; - Index := InsPos; - if (J > InsPos) and (InsPos < Collection.Count) then - Inc(InsPos); - end; - finally - Collection.EndUpdate; - end; - finally - L.Free; - end; - GetSelection; -end; - -procedure TfrmComponentCollectionEditor.ListView1DragOver(Sender, Source: TObject; X, - Y: Integer; State: TDragState; var Accept: Boolean); -var - Item: TListItem; -begin - Item := ListView1.GetItemAt(X, Y); - Accept := (Item <> nil) and (Source = ListView1) and - (not Item.Selected); -end; - -procedure TfrmComponentCollectionEditor.ListView1KeyDown(Sender: TObject; var Key: word; - Shift: TShiftState); -begin - if Key = VK_PROCESSKEY then - {$IFDEF DELPHI6} - ComponentDesigner.Environment.ModalEdit(#0,Self); - {$ELSE} - DelphiIDE.ModalEdit(#0, Self); - {$ENDIF} -end; - -procedure TfrmComponentCollectionEditor.ListView1KeyPress(Sender: TObject; - var Key: Char); -begin - if dxCharInSet(Key, ['!'..'~']) then - begin - {$IFDEF DELPHI6} - ComponentDesigner.Environment.ModalEdit(Key,Self); - {$ELSE} - DelphiIDE.ModalEdit(Key, Self); - {$ENDIF} - Key := #0; - end; -end; - -procedure TfrmComponentCollectionEditor.SelectAllCommandUpdate(Sender: TObject); -begin - (Sender as TAction).Enabled := (ListView1.Items.Count > 0) and - (ListView1.SelCount <> ListView1.Items.Count); -end; - -procedure TfrmComponentCollectionEditor.AMDeferUpdate(var Msg); -begin - if LockCount = 0 then - begin - if TMessage(Msg).WParam = 0 then - SetSelection - else - ItemsModified(nil); - end - else - PostMessage(Handle, AM_DeferUpdate, TMessage(Msg).WParam, TMessage(Msg).LParam); -end; - -procedure TfrmComponentCollectionEditor.SelectionUpdate(Sender: TObject); -var - Enabled: Boolean; -begin - Enabled := ListView1.Selected <> nil; - if Enabled then - if Sender = acDelete then - Enabled := coDelete in Options - else - if (Sender = acMoveUp) or (Sender = acMoveDown) then - Enabled := coMove in Options; - (Sender as TAction).Enabled := Enabled; -end; - -procedure TfrmComponentCollectionEditor.SelectAll(DoUpdate: Boolean); -var - I: Integer; -begin - BeginUpdate; - ListView1.Items.BeginUpdate; - try - for I := 0 to Listview1.Items.Count-1 do - Listview1.Items[I].Selected := True; - finally - ListView1.Items.EndUpdate; - CancelUpdate; - if DoUpdate then SetSelection; - end; -end; - -procedure TfrmComponentCollectionEditor.SelectNone(DoUpdate: Boolean); -var - I: Integer; -begin - BeginUpdate; - ListView1.Items.BeginUpdate; - try - for I := 0 to Listview1.Items.Count-1 do - Listview1.Items[I].Selected := False; - finally - ListView1.Items.EndUpdate; - CancelUpdate; - if DoUpdate then SetSelection; - end; -end; - -procedure TfrmComponentCollectionEditor.UpdateCaption; -begin - Caption := Format('Editing %s%s%s', [Component.Name, DotSep, ComponentPropertyName]); -end; - -procedure TfrmComponentCollectionEditor.UpdateContent; -begin - UpdateListbox; - GetSelection; -end; - -procedure TfrmComponentCollectionEditor.Activated; -begin - inherited; - SetSelection; -end; - -function TfrmComponentCollectionEditor.CanAdd(Index: Integer): Boolean; -begin - Result := True; -end; - -procedure TfrmComponentCollectionEditor.InitFormEditor; -begin - FCollectionClassName := Collection.ClassName; - UpdateListbox; - inherited InitFormEditor; - Options := FColOptions; //refresh -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxContainer.pas b/internal/x.46/ExpressLibrary/Sources/cxContainer.pas deleted file mode 100644 index d13d9810..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxContainer.pas +++ /dev/null @@ -1,6466 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCommonLibrary } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCOMMONLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -{$DEFINE USETCXSCROLLBAR} - -unit cxContainer; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, - dxThemeManager, dxUxTheme, - Classes, Controls, Forms, Graphics, Menus, StdCtrls, SysUtils, cxClasses, - cxControls, cxGraphics, cxLookAndFeels, cxScrollBar, cxLookAndFeelPainters; - -const - CM_CLOSEPOPUPWINDOW = WM_DX + 25; - CM_SHOWPOPUPWINDOW = WM_DX + 26; - CM_SHORTREFRESHCONTAINER = WM_DX + 27; - CM_UPDATESCROLLBARS = WM_DX + 28; - CM_BUFFEREDPAINTONGLASS = WM_DX + 29; - - cxDefaultAutoCompleteDelay = 500; - - cxContainerMaxBorderWidth = 2; - cxContainerShadowWidth = 3; - - cxEmptyBrush: TBrushHandle = 0; - - cxContainerDefaultBorderExtent: TRect = ( - Left: cxContainerMaxBorderWidth; - Top: cxContainerMaxBorderWidth; - Right: cxContainerMaxBorderWidth; - Bottom: cxContainerMaxBorderWidth - ); - -type - TcxContainerBorderStyle = (cbsNone, cbsSingle, cbsThick, cbsFlat, cbs3D, - cbsUltraFlat, cbsOffice11); - TcxContainerHotState = (chsNoHotTrack, chsNormal, chsSelected); - TcxContainerStateItem = (csNormal, csActive, csDisabled, csHotTrack); - TcxContainerState = set of TcxContainerStateItem; - TcxMouseButton = (cxmbNone, cxmbLeft, cxmbRight, cxmbMiddle); - TcxNativeHandle = HWND; - - TcxContainerStyleValue = 0..SizeOf(Integer) * 8 - 1; - TcxContainerStyleValues = set of TcxContainerStyleValue; - -const - csvBorderColor = 0; - csvBorderStyle = 1; - csvColor = 2; - csvEdges = 3; - csvFont = 4; - csvHotTrack = 5; - csvShadow = 6; - csvTextColor = 7; - csvTextStyle = 8; - csvTransparentBorder = 9; - - cxContainerStyleValueCount = 10; - - cxContainerStyleValueNameA: array[0..cxContainerStyleValueCount - 1] of string = ( - 'BorderColor', - 'BorderStyle', - 'Color', - 'Edges', - 'Font', - 'HotTrack', - 'Shadow', - 'TextColor', - 'TextStyle', - 'TransparentBorder' - ); - -type - TcxContainer = class; - TcxContainerClass = class of TcxContainer; - - { TcxContainerViewInfo } - - TcxContainerViewInfo = class - private - FBackgroundColor: TColor; - protected - procedure DrawBorder(ACanvas: TcxCanvas; R: TRect); virtual; - function GetContainerBorderStyle: TcxContainerBorderStyle; virtual; - procedure InternalPaint(ACanvas: TcxCanvas); virtual; - procedure SetBackgroundColor(Value: TColor); virtual; - public - BorderColor: TColor; - BorderRect: TRect; - BorderStyle: TcxContainerBorderStyle; - BorderWidth: Integer; - Bounds: TRect; - ClientRect: TRect; - ContainerState: TcxContainerState; - Edges: TcxBorders; - HotState: TcxContainerHotState; - NativePart: Integer; - NativeState: Integer; - NativeStyle: Boolean; - Painter: TcxCustomLookAndFeelPainterClass; - Shadow: Boolean; - ThemedObjectType: TdxThemedObjectType; - property BackgroundColor: TColor read FBackgroundColor write SetBackgroundColor; - constructor Create; virtual; - procedure Assign(Source: TObject); virtual; - function GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; virtual; - procedure Offset(DX, DY: Integer); virtual; - procedure Paint(ACanvas: TcxCanvas); virtual; - end; - - TcxContainerViewInfoClass = class of TcxContainerViewInfo; - - { TcxContainerStyle } - - TcxStyleController = class; - - TcxContainerStyleData = record - Color: TColor; - Font: TFont; - FontColor: TColor; - end; - - TcxContainerStyle = class(TcxInterfacedPersistent, IUnknown, IdxSkinSupport) - private - FBorderColor: TColor; - FBorderStyle: TcxContainerBorderStyle; - FEdges: TcxBorders; - FHotTrack: Boolean; - FShadow: Boolean; - FTransparentBorder: Boolean; - - FDirectAccessMode: Boolean; - FFontAssignedValueLockCount: Integer; - FIsDestroying: Boolean; - FLookAndFeel: TcxLookAndFeel; - FModified: Boolean; - FOwner: TPersistent; - FParentStyle: TcxContainerStyle; - FState: TcxContainerStateItem; - FTextStyle: TFontStyles; - FUpdateCount: Integer; - FVisibleFont: TFont; - FOnChanged: TNotifyEvent; - - function GetAssignedValues: TcxContainerStyleValues; - function GetBorderColor: TColor; - function GetBorderStyle: TcxContainerBorderStyle; - function GetEdges: TcxBorders; - function GetFont: TFont; - function GetHotTrack: Boolean; - function GetShadow: Boolean; - function GetTransparentBorder: Boolean; - - function InternalGetBorderColor(var BorderColor: TColor): Boolean; - function InternalGetBorderStyle(var BorderStyle: TcxContainerBorderStyle): Boolean; - function InternalGetEdges(var Edges: TcxBorders): Boolean; - function InternalGetFont(var Font: TFont): Boolean; - function InternalGetHotTrack(var HotTrack: Boolean): Boolean; - function InternalGetShadow(var Shadow: Boolean): Boolean; - function InternalGetTextColor(var TextColor: TColor): Boolean; - function InternalGetTextStyle(var TextStyle: TFontStyles): Boolean; - function InternalGetTransparentBorder(var TransparentBorder: Boolean): Boolean; - - function IsBorderColorStored: Boolean; - function IsBorderStyleStored: Boolean; - function IsColorStored: Boolean; - function IsEdgesStored: Boolean; - function IsFontStored: Boolean; - function IsHotTrackStored: Boolean; - function IsShadowStored: Boolean; - function IsStyleControllerStored: Boolean; - function IsTextColorStored: Boolean; - function IsTextStyleStored: Boolean; - function IsTransparentBorderStored: Boolean; - - procedure SetAssignedValues(Value: TcxContainerStyleValues); - procedure SetBorderColor(Value: TColor); - procedure SetBorderStyle(Value: TcxContainerBorderStyle); - procedure SetColor(Value: TColor); - procedure SetEdges(Value: TcxBorders); - procedure SetFont(Value: TFont); - procedure SetHotTrack(Value: Boolean); - procedure SetShadow(Value: Boolean); - procedure SetTextColor(Value: TColor); - procedure SetTextStyle(Value: TFontStyles); - procedure SetTransparentBorder(Value: Boolean); - - procedure CheckChanges; - procedure CreateFont; - function GetActiveStyleController: TcxStyleController; - function GetBaseStyle: TcxContainerStyle; - function GetContainer: TcxContainer; - function GetLookAndFeel: TcxLookAndFeel; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); - procedure ReadIsFontAssigned(Reader: TReader); - procedure RestoreFont(AFont: TFont); - procedure SetLookAndFeel(Value: TcxLookAndFeel); - procedure UpdateVisibleFont; - procedure WriteIsFontAssigned(Writer: TWriter); - protected - FAssignedValues: TcxContainerStyleValues; - FStyleController: TcxStyleController; - procedure DefineProperties(Filer: TFiler); override; - function BaseGetStyleController: TcxStyleController; - procedure BaseSetStyleController(Value: TcxStyleController); - procedure Changed; virtual; - procedure ControllerChangedNotification(AStyleController: TcxStyleController); virtual; - procedure ControllerFreeNotification(AStyleController: TcxStyleController); virtual; - - function DefaultBorderColor: TColor; virtual; - function DefaultBorderStyle: TcxContainerBorderStyle; virtual; - function DefaultColor: TColor; virtual; - function DefaultEdges: TcxBorders; virtual; - function DefaultHotTrack: Boolean; virtual; - function DefaultShadow: Boolean; virtual; - function DefaultTextColor: TColor; virtual; - function DefaultTextStyle: TFontStyles; virtual; - function DefaultTransparentBorder: Boolean; virtual; - - procedure FontChanged(Sender: TObject); virtual; - function GetColor: TColor; virtual; - function GetDefaultStyleController: TcxStyleController; virtual; - function GetStyleColor: TColor; virtual; - function GetTextColor: TColor; virtual; - function GetTextStyle: TFontStyles; virtual; - function InternalGetColor(var Color: TColor): Boolean; - function InternalGetNotPublishedExtendedStyleValues: TcxContainerStyleValues; virtual; - function IsBaseStyle: Boolean; - function IsDestroying: Boolean; - function IsFontAssignedValueLocked: Boolean; - procedure LockFontAssignedValue(ALock: Boolean); - procedure UpdateFont; - property ParentStyle: TcxContainerStyle read FParentStyle; - property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; - public - StyleData: TcxContainerStyleData; - constructor Create(AOwner: TPersistent; ADirectAccessMode: Boolean; - AParentStyle: TcxContainerStyle = nil; - AState: TcxContainerStateItem = csNormal); reintroduce; virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure BeginUpdate; - procedure EndUpdate; - function GetStyleValue(const APropertyName: string; - out StyleValue: TcxContainerStyleValue): Boolean; - function GetStyleValueCount: Integer; virtual; - function GetStyleValueName(AStyleValue: TcxContainerStyleValue; - out StyleValueName: string): Boolean; virtual; - function GetVisibleFont: TFont; - function HasBorder: Boolean; virtual; - function IsExtendedStylePropertyPublished( - const APropertyName: string): Boolean; - function IsValueAssigned(AValue: TcxContainerStyleValue): Boolean; virtual; - procedure RestoreDefaults; virtual; - property ActiveStyleController: TcxStyleController read GetActiveStyleController; - property BaseStyle: TcxContainerStyle read GetBaseStyle; - property Container: TcxContainer read GetContainer; - property DirectAccessMode: Boolean read FDirectAccessMode; - property State: TcxContainerStateItem read FState; - published - property AssignedValues: TcxContainerStyleValues read GetAssignedValues - write SetAssignedValues stored False; - property BorderColor: TColor read GetBorderColor write SetBorderColor - stored IsBorderColorStored; - property BorderStyle: TcxContainerBorderStyle read GetBorderStyle - write SetBorderStyle stored IsBorderStyleStored; - property Color: TColor read GetColor write SetColor stored IsColorStored; - property Edges: TcxBorders read GetEdges write SetEdges stored IsEdgesStored; - property Font: TFont read GetFont write SetFont stored IsFontStored; - property HotTrack: Boolean read GetHotTrack write SetHotTrack stored IsHotTrackStored; - property LookAndFeel: TcxLookAndFeel read GetLookAndFeel - write SetLookAndFeel; - property Shadow: Boolean read GetShadow write SetShadow stored IsShadowStored; - property StyleController: TcxStyleController read BaseGetStyleController - write BaseSetStyleController stored IsStyleControllerStored; - property TextColor: TColor read GetTextColor write SetTextColor - stored IsTextColorStored; - property TextStyle: TFontStyles read GetTextStyle write SetTextStyle - stored IsTextStyleStored; - property TransparentBorder: Boolean read GetTransparentBorder - write SetTransparentBorder stored IsTransparentBorderStored; - end; - - TcxCustomContainerStyle = TcxContainerStyle; // TODO Remove - - TcxContainerStyleClass = class of TcxContainerStyle; - - { TcxContainerStyles } - - TcxContainerStyles = class - private - FStyles: array[TcxContainerStateItem] of TcxContainerStyle; - function GetStyle(AState: TcxContainerStateItem): TcxContainerStyle; - function GetStyleDisabled: TcxContainerStyle; - function GetStyleFocused: TcxContainerStyle; - function GetStyleHot: TcxContainerStyle; - function GetStyleNormal: TcxContainerStyle; - procedure SetOnChanged(Value: TNotifyEvent); - procedure SetStyle(AState: TcxContainerStateItem; Value: TcxContainerStyle); - procedure SetStyleDisabled(Value: TcxContainerStyle); - procedure SetStyleFocused(Value: TcxContainerStyle); - procedure SetStyleHot(Value: TcxContainerStyle); - procedure SetStyleNormal(Value: TcxContainerStyle); - public - constructor Create(AOwner: TPersistent; - AStyleClass: TcxContainerStyleClass); virtual; - destructor Destroy; override; - procedure RestoreDefaults; - property Style: TcxContainerStyle read GetStyleNormal write SetStyleNormal; - property StyleDisabled: TcxContainerStyle read GetStyleDisabled - write SetStyleDisabled; - property StyleFocused: TcxContainerStyle read GetStyleFocused - write SetStyleFocused; - property StyleHot: TcxContainerStyle read GetStyleHot - write SetStyleHot; - property Styles[AState: TcxContainerStateItem]: TcxContainerStyle - read GetStyle write SetStyle; default; - property OnChanged: TNotifyEvent write SetOnChanged; - end; - - TcxContainerStylesClass = class of TcxContainerStyles; - - { TcxStyleController } - - TcxStyleController = class(TComponent) - private - FIsDestruction: Boolean; - FIsFontScaled: Boolean; - FListeners: TList; - FOnStyleChanged: TNotifyEvent; - function GetFakeStyleController: TcxStyleController; - function GetStyle: TcxContainerStyle; - function GetInternalStyle(AState: TcxContainerStateItem): TcxContainerStyle; - procedure SetFakeStyleController(Value: TcxStyleController); - procedure SetInternalStyle(AState: TcxContainerStateItem; Value: TcxContainerStyle); - procedure StyleChanged(Sender: TObject); - protected - FStyles: TcxContainerStyles; - procedure Loaded; override; - procedure AddListener(AListener: TcxContainerStyle); virtual; - procedure Changed; - procedure ChangeFontScale(M, D: Integer); - function GetStyleClass: TcxContainerStyleClass; virtual; - function GetStylesClass: TcxContainerStylesClass; virtual; - function IsDestruction: Boolean; - procedure RemoveListener(AListener: TcxContainerStyle); virtual; - property Style: TcxContainerStyle read GetStyle; - property Listeners: TList read FListeners; - property OnStyleChanged: TNotifyEvent read FOnStyleChanged write FOnStyleChanged; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure RestoreStyles; - property Styles[AState: TcxContainerStateItem]: TcxContainerStyle - read GetInternalStyle write SetInternalStyle; - published - property FakeStyleController: TcxStyleController read GetFakeStyleController - write SetFakeStyleController stored False; - end; - - { IcxContainerInnerControl } - - IcxContainerInnerControl = interface - ['{1B111318-D9C9-4C35-9EFF-5D95793C0106}'] - function GetControl: TWinControl; - function GetControlContainer: TcxContainer; - property Control: TWinControl read GetControl; - property ControlContainer: TcxContainer read GetControlContainer; - end; - - TcxScrollBarInfo = TScrollBarInfo; - - { TcxContainer } - - TcxContainerActiveStyleData = record - ContainerState: TcxContainerState; - ActiveStyle: TcxContainerStyle; - end; - - TcxContainerInnerControlBounds = record - IsEmpty: Boolean; - Rect: TRect; - end; - - TcxContainerSizeGripData = record - Bounds: TRect; - Visible: Boolean; - end; - - TcxContainer = class(TcxControl, IUnknown, - IcxCompoundControl, IcxMouseTrackingCaller) - private - FActiveStyleData: TcxContainerActiveStyleData; - FInnerControl: TWinControl; - FInnerControlBounds: TcxContainerInnerControlBounds; - FInnerControlMouseDown: Boolean; - FInnerControlBufferedPaint: Boolean; - FSaveInnerControlWndProc: TWndMethod; - FIsViewInfoCalculated: Boolean; - FLockAlignControlsCount: Integer; - FOnGlass: Boolean; - FRepaintOnGlass: Boolean; - FPopupMenuLockCount: Integer; - FScrollBarsCalculating: Boolean; - FSizeGripData: TcxContainerSizeGripData; - FRefreshLockCount: Integer; - function GetActiveControl: TWinControl; - function GetFakeStyleController: TcxStyleController; - function GetInternalStyle(AState: TcxContainerStateItem): TcxContainerStyle; - function GetIsDestroying: Boolean; - function GetStyle: TcxContainerStyle; - function GetStyleDisabled: TcxContainerStyle; - function GetStyleFocused: TcxContainerStyle; - function GetStyleHot: TcxContainerStyle; - function GetVisibleFont: TFont; - procedure SetFakeStyleController(Value: TcxStyleController); - procedure SetInnerControl(Value: TWinControl); - procedure SetStyle(Value: TcxContainerStyle); - procedure SetStyleDisabled(Value: TcxContainerStyle); - procedure SetStyleFocused(Value: TcxContainerStyle); - procedure SetStyleHot(Value: TcxContainerStyle); - procedure SetInternalStyle(AState: TcxContainerStateItem; - Value: TcxContainerStyle); - function GetDragKind: TDragKind; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); - message WM_WINDOWPOSCHANGED; - procedure WMWindowPosChanging(var Message: TWMWindowPosChanging); - message WM_WINDOWPOSCHANGING; - procedure CMCtl3DChanged(var Message: TMessage); message CM_CTL3DCHANGED; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - procedure CMParentColorChanged(var Message: TMessage); message CM_PARENTCOLORCHANGED; - procedure CMShortRefreshContainer(var Message: TMessage); message CM_SHORTREFRESHCONTAINER; - procedure CMParentFontChanged(var Message: TMessage); message CM_PARENTFONTCHANGED; - procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE; - procedure CMUpdateScrollBars(var Message: TMessage); message CM_UPDATESCROLLBARS; - protected - FInternalSetting: Boolean; - FIsCreating: Boolean; - FStyles: TcxContainerStyles; - FViewInfo: TcxContainerViewInfo; - - // IcxMouseTrackingCaller - procedure IcxMouseTrackingCaller.MouseLeave = MouseTrackingCallerMouseLeave; - procedure MouseTrackingCallerMouseLeave; - - // IcxLookAndFeelContainer - function GetLookAndFeelValue: TcxLookAndFeel; override; - - procedure AdjustClientRect(var Rect: TRect); override; - procedure AlignControls(AControl: TControl; var Rect: TRect); override; - function AllowAutoDragAndDropAtDesignTime(X, Y: Integer; - Shift: TShiftState): Boolean; override; - function CanFocusOnClick: Boolean; override; - procedure ChangeScale(M, D: Integer); override; - procedure ColorChanged; override; - procedure CursorChanged; override; - procedure DoContextPopup(MousePos: TPoint; - var Handled: Boolean); override; - procedure DragCanceled; override; - procedure DrawBordersBackgroundByPainter(ACanvas: TcxCanvas; - APainter: TcxCustomLookAndFeelPainterClass); - procedure FocusChanged; override; - function FocusWhenChildIsClicked(AChild: TControl): Boolean; override; - function GetClientBounds: TRect; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure Loaded; override; - function MayFocus: Boolean; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseEnter(AControl: TControl); override; - procedure MouseLeave(AControl: TControl); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - function NeedsScrollBars: Boolean; override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure Paint; override; - procedure Resize; override; - procedure SetDragMode(Value: TDragMode); override; - procedure CreateHandle; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWindowHandle(const Params: TCreateParams); override; - procedure WndProc(var Message: TMessage); override; - - procedure AdjustInnerControl; virtual; - procedure AdjustScrollBarPosition(AScrollBar: TcxScrollBar); virtual; - procedure CalculateViewInfo(const P: TPoint; AMouseTracking: Boolean); virtual; - function CanContainerHandleTabs: Boolean; virtual; - function CanHaveTransparentBorder: Boolean; virtual; - function CanRefreshContainer: Boolean; virtual; - function CanShowPopupMenu(const P: TPoint): Boolean; virtual; - procedure CheckIsViewInfoCalculated; - procedure ContainerStyleChanged(Sender: TObject); virtual; - procedure DataChange; virtual; - procedure DataSetChange; virtual; - function DefaultParentColor: Boolean; virtual; - function DoInnerControlDefaultHandler(var Message: TMessage): Boolean; virtual; - function DoRefreshContainer(const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): Boolean; virtual; - procedure EnabledChanged; dynamic; - procedure EndMouseTracking; virtual; - function GetActiveStyle: TcxContainerStyle; virtual; - function GetBackgroundColor: TColor; virtual; - function GetBorderColor: TColor; virtual; - function GetBorderExtent: TRect; virtual; - procedure GetColorSettingsByPainter(out ABackground, ATextColor: TColor); virtual; - function GetEditStateColorKind: TcxEditStateColorKind; virtual; - function GetInnerControlBounds(const AInnerControlsRegion: TRect; - AInnerControl: TControl): TcxContainerInnerControlBounds; virtual; - function GetShadowBounds: TRect; virtual; - function GetShadowBoundsExtent: TRect; virtual; - function GetStyleClass: TcxContainerStyleClass; virtual; - function GetStylesClass: TcxContainerStylesClass; virtual; - function GetViewInfoClass: TcxContainerViewInfoClass; virtual; - function HasShadow: Boolean; virtual; - procedure InnerControlWndProc(var Message: TMessage); virtual; - function InternalGetActiveStyle: TcxContainerStyle; virtual; - function InternalGetNotPublishedStyleValues: TcxContainerStyleValues; virtual; - - function IsAdjustingScrollBarPositionNeeded( - const AScrollBarInfo: TcxScrollBarInfo): Boolean; virtual; - function IsAlignControlsLocked: Boolean; - function IsContainerFocused: Boolean; virtual; - function IsInnerControlBoundsChanged(AControl: TWinControl; - const ABounds: TcxContainerInnerControlBounds): Boolean; - function IsContainerClass: Boolean; virtual; - function IsMouseTracking: Boolean; virtual; - function IsNativeStyle: Boolean; virtual; - function IsPopupMenuLocked: Boolean; - function IsReadOnly: Boolean; virtual; - function IsTransparentBackground: Boolean; virtual; - - function RefreshContainer(const P: TPoint; Button: TcxMouseButton; Shift: TShiftState; - AIsMouseEvent: Boolean): Boolean; - procedure SaveInnerControlBounds(AControl: TWinControl; - const ABounds: TcxContainerInnerControlBounds); - procedure SetShadowRegion; virtual; - procedure SetSize; virtual; - procedure SetVisibleBoundsClipRect; virtual; - procedure UpdateData; virtual; - function GetBackgroundThemedObjectType: TdxThemedObjectType; virtual; - function GetBackgroundNativePart: Integer; virtual; - function GetBackgroundNativeState: Integer; virtual; - function GetScrollBarBounds(const AScrollBarRect: TRect): TRect; virtual; - function GetScrollBarEnabled(AScrollBar: TcxScrollBar; - const AScrollBarinfo: TcxScrollBarInfo): Boolean; virtual; - function GetScrollBarInfo(var AScrollBarInfo: TcxScrollBarInfo; - const AKind: TScrollBarKind): Boolean; virtual; - procedure SafeSelectionFocusInnerControl; virtual; - procedure SetDragKind(Value: TDragKind); virtual; - procedure SetScrollBarVisible(AScrollBar: TcxScrollBar; AVisible: Boolean); virtual; - - property ActiveStyle: TcxContainerStyle read GetActiveStyle; - property DragKind: TDragKind read GetDragKind write SetDragKind default dkDrag; - property IsViewInfoCalculated: Boolean read FIsViewInfoCalculated - write FIsViewInfoCalculated; - property ScrollBarsCalculating: Boolean read FScrollBarsCalculating; - property Style: TcxContainerStyle read GetStyle write SetStyle; - property StyleDisabled: TcxContainerStyle read GetStyleDisabled - write SetStyleDisabled; - property StyleFocused: TcxContainerStyle read GetStyleFocused - write SetStyleFocused; - property StyleHot: TcxContainerStyle read GetStyleHot write SetStyleHot; - property ViewInfo: TcxContainerViewInfo read FViewInfo; - property VisibleFont: TFont read GetVisibleFont; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Focused: Boolean; override; - function GetDragImages: TDragImageList; override; - procedure GetTabOrderList(List: TList); override; - procedure SetFocus; override; - procedure ClearSavedChildControlRegions; virtual; - function GetVisibleBounds: TRect; virtual; - function HasPopupWindow: Boolean; virtual; - function InnerControlDefaultHandler(var Message: TMessage): Boolean; - function InnerControlMenuHandler(var Message: TMessage): Boolean; virtual; - procedure Invalidate; override; - function IsInplace: Boolean; virtual; - function IsStylePropertyPublished(const APropertyName: string; - AExtendedStyle: Boolean): Boolean; - procedure LockAlignControls(ALock: Boolean); - procedure LockPopupMenu(ALock: Boolean); - procedure RestoreStyles; - procedure SetScrollBarsParameters(AIsScrolling: Boolean = False); virtual; - function ShortRefreshContainer(AIsMouseEvent: Boolean): Boolean; - procedure Update; override; - // IdxLocalizerListener - procedure TranslationChanged; override; - - procedure UpdateScrollBarsParameters; - property InnerControl: TWinControl read FInnerControl write SetInnerControl; - property InnerControlMouseDown: Boolean read FInnerControlMouseDown - write FInnerControlMouseDown; - property IsDestroying: Boolean read GetIsDestroying; - property OnGlass: Boolean read FOnGlass write FOnGlass; - property ParentColor; - property ParentFont; - property Styles[AState: TcxContainerStateItem]: TcxContainerStyle - read GetInternalStyle write SetInternalStyle; - property VisibleBounds: TRect read GetVisibleBounds; - published - property FakeStyleController: TcxStyleController read GetFakeStyleController - write SetFakeStyleController stored False; - property TabStop default True; - end; - - { TcxCustomPopupWindow } - - TcxCustomPopupWindow = class(TcxPopupWindow) - private - FCaptureFocus: Boolean; - FDeactivateLockCount: Integer; - FDeactivation: Boolean; - FFocusedControl: TWinControl; - FIsTopMost: Boolean; - FJustClosed: Boolean; - FModalMode: Boolean; - FTerminateOnDestroy: Boolean; - FOwnerControl: TWinControl; - FOnClosed: TNotifyEvent; - FOnClosing: TNotifyEvent; - FOnShowed: TNotifyEvent; - FOnShowing: TNotifyEvent; - function GetJustClosed: Boolean; - procedure SetCaptureFocus(Value: Boolean); - procedure SetIsTopMost(Value: Boolean); - procedure WMActivateApp(var Message: TWMActivateApp); message WM_ACTIVATEAPP; - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure CMClosePopupWindow(var Message: TMessage); message CM_CLOSEPOPUPWINDOW; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CMShowPopupWindow(var Message: TMessage); message CM_SHOWPOPUPWINDOW; - protected - FStyle: TcxContainerStyle; - FViewInfo: TcxContainerViewInfo; - procedure AdjustClientRect(var Rect: TRect); override; - procedure Deactivate; override; - function GetOwnerScreenBounds: TRect; override; - procedure InitPopup; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure Paint; override; - procedure VisibleChanged; override; - procedure CreateHandle; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - function AcceptsAnySize: Boolean; virtual; - procedure DoClosed; virtual; - procedure DoClosing; virtual; - procedure DoShowed; virtual; - procedure DoShowing; virtual; - function GetFirstFocusControl(AControl: TWinControl): TWinControl; - function HasBackground: Boolean; virtual; - function IsDeactivateLocked: Boolean; - function IsOwnerControlVisible: Boolean; - function IsSysKeyAccepted(Key: Word): Boolean; virtual; - procedure ModalCloseUp; virtual; - procedure MouseEnter(AControl: TControl); dynamic; - procedure MouseLeave(AControl: TControl); dynamic; - function NeedIgnoreMouseMessageAfterCloseUp(AWnd: THandle; AMsg: Cardinal; - AShift: TShiftState; const APos: TPoint): Boolean; virtual; - procedure PopupWindowStyleChanged(Sender: TObject); virtual; - procedure RecreateWindow; - property Style: TcxContainerStyle read FStyle; - property ViewInfo: TcxContainerViewInfo read FViewInfo; - public - constructor Create(AOwnerControl: TWinControl); reintroduce; virtual; - destructor Destroy; override; - function Focused: Boolean; override; -{$IFDEF DELPHI5} - function CanFocus: Boolean; override; -{$ENDIF} - procedure ClosePopup; - procedure CloseUp; override; - procedure CorrectBoundsWithDesktopWorkArea(var APosition: TPoint); virtual; - function GetStyleClass: TcxContainerStyleClass; virtual; - function GetViewInfoClass: TcxContainerViewInfoClass; virtual; - function HasCapture: Boolean; - function IsShortCut(var Message: TWMKey): Boolean; override; - function IsVisible: Boolean; - procedure LockDeactivate(ALock: Boolean); - procedure Popup(AFocusedControl: TWinControl); reintroduce; virtual; - function SetFocusedControl(Control: TWinControl): Boolean; override; - property CaptureFocus: Boolean read FCaptureFocus write SetCaptureFocus default True; - property FocusedControl: TWinControl read FFocusedControl write FFocusedControl; - property IsTopMost: Boolean read FIsTopMost write SetIsTopMost; - property JustClosed: Boolean read GetJustClosed; - property ModalMode: Boolean read FModalMode write FModalMode default True; - property OwnerControl: TWinControl read FOwnerControl; - property TerminateOnDestroy: Boolean read FTerminateOnDestroy write FTerminateOnDestroy; - property OnClosed: TNotifyEvent read FOnClosed write FOnClosed; - property OnClosing: TNotifyEvent read FOnClosing write FOnClosing; - property OnCloseQuery; - property OnShowed: TNotifyEvent read FOnShowed write FOnShowed; - property OnShowing: TNotifyEvent read FOnShowing write FOnShowing; - end; - - { TcxCustomInnerListBox } - - TcxCustomInnerListBox = class(TListBox, IUnknown, - IcxContainerInnerControl) - private - {$IFNDEF DELPHI6} - FAutoComplete: Boolean; - {$ENDIF} - {$IFNDEF DELPHI8} - FAutoCompleteDelay: Cardinal; - {$ENDIF} - FAutoCompleteFilter: string; - FCanvas: TcxCanvas; - FHScrollBar: TcxScrollBar; - FIsRedrawLocked: Boolean; - FLookAndFeel: TcxLookAndFeel; - FPrevBrushColor: TColor; - FPrevFontColor: TColor; - FPrevKeyPressTime: DWORD; - FScrollBarsCalculating: Boolean; - FScrollBarsLockCount: Integer; - FVScrollBar: TcxScrollBar; - procedure CreateScrollBars; - function FindAutoCompleteString(const S: string): Integer; - function GetControlContainer: TcxContainer; - function GetControl: TWinControl; - procedure HScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); - procedure SetLookAndFeel(Value: TcxLookAndFeel); - procedure VScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); -{$IFNDEF DELPHI6} - function GetScrollWidth: Integer; - procedure SetScrollWidth(const Value: Integer); -{$ENDIF} - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure WMPrint(var Message: TWMPrint); message WM_PRINT; - procedure WMPrintClient(var Message: TWMPrintClient); message WM_PRINTCLIENT; - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure WMSetRedraw(var Message: TWMSetRedraw); message WM_SETREDRAW; - procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM; - protected - FContainer: TcxContainer; - procedure Click; override; - procedure DblClick; override; - procedure DestroyWindowHandle; override; - procedure DoAutoComplete(var Key: Char); virtual; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); override; - function GetPopupMenu: TPopupMenu; override; - function GetSizeGripRect: TRect; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); virtual; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseEnter(AControl: TControl); dynamic; - procedure MouseLeave(AControl: TControl); dynamic; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure DrawSizeGrip(ADC: HDC); - function NeedDrawFocusRect: Boolean; virtual; - procedure Notification(AComponent: TComponent; - Operation: TOperation); override; - procedure RestoreCanvasParametersForFocusRect; - procedure SaveCanvasParametersForFocusRect; - procedure WndProc(var Message: TMessage); override; - property Container: TcxContainer read FContainer write FContainer; - property IsRedrawLocked: Boolean read FIsRedrawLocked; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure DefaultHandler(var Message); override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; - procedure SetExternalScrollBarsParameters; virtual; -{$IFNDEF DELPHI6} - procedure AddItem(AItem: string; AObject: TObject); - procedure ClearSelection; - procedure DeleteSelected; - procedure SelectAll; -{$ENDIF} - function ItemVisible(Index: Integer): Boolean; - property Canvas: TcxCanvas read FCanvas; - property HScrollBar: TcxScrollBar read FHScrollBar; - property LookAndFeel: TcxLookAndFeel read FLookAndFeel write SetLookAndFeel; - property VScrollBar: TcxScrollBar read FVScrollBar; -{$IFNDEF DELPHI6} - property ScrollWidth: Integer read GetScrollWidth write SetScrollWidth default 0; -{$ENDIF} - published - {$IFNDEF DELPHI6} - property AutoComplete: Boolean read FAutoComplete write FAutoComplete default True; - {$ENDIF} - {$IFNDEF DELPHI8} - property AutoCompleteDelay: Cardinal read FAutoCompleteDelay - write FAutoCompleteDelay default cxDefaultAutoCompleteDelay; - {$ENDIF} - end; - - TcxCustomListBox = TcxCustomInnerListBox; // TODO Remove - - { _TWinControlAccess } - - _TWinControlAccess = class - public - class procedure _RecreateWnd(AInstance: TWinControl); - end; - - { _TcxContainerAccess } - - _TcxContainerAccess = class - public - class procedure BeginAutoDrag(AInstance: TcxContainer); - class procedure Click(AInstance: TcxContainer); - class procedure DblClick(AInstance: TcxContainer); - class function DoMouseWheel(AInstance: TcxContainer; Shift: TShiftState; - WheelDelta: Integer; MousePos: TPoint): Boolean; - class procedure DragOver(AInstance: TcxContainer; Source: TObject; - X, Y: Integer; State: TDragState; var Accept: Boolean); - class procedure KeyDown(AInstance: TcxContainer; var Key: Word; - Shift: TShiftState); - class procedure KeyPress(AInstance: TcxContainer; var Key: Char); - class procedure KeyUp(AInstance: TcxContainer; var Key: Word; - Shift: TShiftState); - class procedure MouseDown(AInstance: TcxContainer; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - class procedure MouseMove(AInstance: TcxContainer; Shift: TShiftState; - X, Y: Integer); - class procedure MouseUp(AInstance: TcxContainer; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - end; - -procedure AssignFonts(AFont1, AFont2: TFont); -function ButtonTocxButton(Button: TMouseButton): TcxMouseButton; -function CanShowHint(AControl: TWinControl): Boolean; -function CheckParentsNativeHandle(AControl: TWinControl; - ANativeHandle: TcxNativeHandle): Boolean; -function cxGetScrollBarInfo(hwnd: HWND; idObject: Longint; - var psbi: TcxScrollBarInfo): BOOL; -function DefaultContainerStyleController: TcxStyleController; -procedure DrawContainerShadow(ACanvas: TcxCanvas; const ARect: TRect); -procedure ExtendRectByBorders(var R: TRect; ABorderWidth: Integer; AEdges: TcxBorders); -function FindFirstNonChildParentWindow(AWnd: HWND): HWND; -function GetContainerBorderWidth(ABorderStyle: TcxContainerBorderStyle): Integer; overload; -function GetContainerBorderWidth(ALookAndFeelKind: TcxLookAndFeelKind): Integer; overload; -function GetControlRect(AControl: TControl): TRect; -function GetcxContainer(AControl: TWinControl): TcxContainer; -function GetInnerControlContainer(AControl: TWinControl): TWinControl; -function GetPopupOwnerControl(AWnd: HWND): HWND; -function HasHandle(AControl: TWinControl; AHandle: TcxHandle): Boolean; -function HasNativeHandle(AControl: TWinControl; - ANativeHandle: TcxNativeHandle; ACheckChildren: Boolean = False): Boolean; -function HasOpenedPopupWindow(AControl: TWinControl): Boolean; -procedure InflateRectByBorders(var R: TRect; ABorderWidth: Integer; - AEdges: TcxBorders); -function InternalCompareString(const S1, S2: TCaption; - ACaseSensitive: Boolean): Boolean; -function InternalGetCursorPos: TPoint; -function InternalGetShiftState: TShiftState; -procedure InternalInvalidate(AHandle: TcxHandle; const AOuterRect, AInternalRect: TRect; - AEraseBackground: Boolean = False); -procedure InternalInvalidateRect(AControl: TWinControl; const R: TRect; - AEraseBackground: Boolean); -function InternalIsWindowVisible(AControl: TWinControl): Boolean; -function IsChildWindow(AParent: TWinControl; AChildHandle: TcxNativeHandle): Boolean; -function IsFormActive(AForm: TCustomForm): Boolean; -function MouseButtonToShift(Button: TMouseButton): TShiftState; -function NativeHandle(Handle: TcxHandle): TcxNativeHandle; -procedure SetWindowRegion(AControl: TWinControl; - const ABounds: TcxContainerInnerControlBounds); -procedure SetWindowShadowRegion(AWindowHandle: TcxHandle; - const AShadowBounds, AShadowBoundsExtent: TRect; - ANativeStyle, AShadow: Boolean; const AExcludeRect: TRect); -function UsecxScrollBars: Boolean; -function AreVisualStylesMustBeUsed(ANativeStyle: Boolean; AThemedObjectType: - TdxThemedObjectType): Boolean; -procedure SetHooksSettingMode(ASetHooksOnlyWhenPopupsAreVisible: Boolean); - -function GetSizeGripRect(AControl: IcxContainerInnerControl): TRect; overload; -function GetSizeGripRect(AContainer: TcxContainer): TRect; overload; -procedure cxFillSizeGrip(AContainer: TcxContainer); overload; -procedure cxFillSizeGrip(AContainer: TcxContainer; const ARect: TRect); overload; - -procedure DisableWindow(AWindowList: TList; AWnd: HWND); -procedure EnableWindows(AWindowList: TList); - -procedure DisableAppWindows(ANeedDisable: Boolean = True); -procedure EnableAppWindows; -function IsInternalWindowsDisabled: Boolean; -function IsInternalWindowsDisabling: Boolean; - -//messages -function IsMessageInQueue(AWnd: HWND; AMessage: DWORD): Boolean; -function KillMessages(AWnd: HWND; AMsgFilterMin, AMsgFilterMax: UINT; - AKillAllMessages: Boolean = True): Boolean; -procedure LockCMActivateMessages(ALock: Boolean); - -//vista extension -procedure DrawWindowOnGlass(ADC: HDC; const ABounds: TRect; AWnd: HWND); -procedure RepaintWindowOnGlass(AWnd: HWND); -procedure WMPaintWindowOnGlass(AWnd: HWND); - -var - cxContainerDefaultStyleController: TcxStyleController; - cxContainerShadowColor: TColor = clBtnShadow; - TopMostComboBoxes: Boolean = True; - -implementation - -uses - dxThemeConsts, dxOffice11, cxDWMApi, dxCore, cxGeometry; - -const - cxContainerBorderWidthA1: array [TcxContainerBorderStyle] of Integer = - (0, 1, 2, 2, 2, 1, 1); - cxContainerBorderWidthA2: array [TcxLookAndFeelKind] of Integer = - (2, 2, 1, 1); - -type - TCanvasAccess = class(TCanvas); - TCustomFormAccess = class(TCustomForm); - TWinControlAccess = class(TWinControl); - - TGetScrollBarInfo = function(hwnd: HWND; idObject: Longint; - var psbi: TScrollBarInfo): BOOL; stdcall; - -var - FBeingShownPopupWindow: TcxPopupWindow; - FCMActivateMessagesLockCount: Integer = 0; - FPopupWindowShowing: Boolean = False; - FShiftState: TShiftState; - FUsecxScrollBars: Boolean; - FVisiblePopupWindowList: TList; - FApplicationCallWndProcHook: HHOOK = 0; - FApplicationGetMessageMsgHook: HHOOK = 0; - FApplicationMouseMsgHook: HHOOK = 0; - FCaptionInactivationLocked: Boolean; - FOldWndProc: Pointer; - FSetHooksOnlyWhenPopupsAreVisible: Boolean; - GetScrollBarInfoProc: TGetScrollBarInfo = nil; - -procedure RemoveHooks; forward; -procedure SetHooks; forward; - -procedure RegisterVisiblePopupWindow(AWindow: TcxCustomPopupWindow); -begin - // Requires - Assert((AWindow <> nil) and (FVisiblePopupWindowList.IndexOf(AWindow) = -1)); - // - FVisiblePopupWindowList.Add(AWindow); - if FSetHooksOnlyWhenPopupsAreVisible and (FVisiblePopupWindowList.Count = 1) then - SetHooks; -end; - -procedure UnregisterVisiblePopupWindow(AWindow: TcxCustomPopupWindow); -begin - // Requires - Assert((AWindow <> nil) and (FVisiblePopupWindowList.IndexOf(AWindow) <> -1)); - // - FVisiblePopupWindowList.Remove(AWindow); - if FSetHooksOnlyWhenPopupsAreVisible and (FVisiblePopupWindowList.Count = 0) then - RemoveHooks; -end; - -{ _TWinControlAccess } - -class procedure _TWinControlAccess._RecreateWnd(AInstance: TWinControl); -begin - TWinControlAccess(AInstance).RecreateWnd; -end; - -{ _TcxContainerAccess } - -class procedure _TcxContainerAccess.BeginAutoDrag(AInstance: TcxContainer); -begin - AInstance.BeginAutoDrag; -end; - -class procedure _TcxContainerAccess.Click(AInstance: TcxContainer); -begin - AInstance.Click; -end; - -class procedure _TcxContainerAccess.DblClick(AInstance: TcxContainer); -begin - AInstance.DblClick; -end; - -class function _TcxContainerAccess.DoMouseWheel(AInstance: TcxContainer; - Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; -begin - Result := AInstance.DoMouseWheel(Shift, WheelDelta, MousePos); -end; - -class procedure _TcxContainerAccess.DragOver(AInstance: TcxContainer; - Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); -begin - AInstance.DragOver(Source, X, Y, State, Accept); -end; - -class procedure _TcxContainerAccess.KeyDown(AInstance: TcxContainer; - var Key: Word; Shift: TShiftState); -begin - AInstance.KeyDown(Key, Shift); -end; - -class procedure _TcxContainerAccess.KeyPress(AInstance: TcxContainer; - var Key: Char); -begin - AInstance.KeyPress(Key); -end; - -class procedure _TcxContainerAccess.KeyUp(AInstance: TcxContainer; var Key: Word; - Shift: TShiftState); -begin - AInstance.KeyUp(Key, Shift); -end; - -class procedure _TcxContainerAccess.MouseDown(AInstance: TcxContainer; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - AInstance.MouseDown(Button, Shift, X, Y); -end; - -class procedure _TcxContainerAccess.MouseMove(AInstance: TcxContainer; - Shift: TShiftState; X, Y: Integer); -begin - AInstance.MouseMove(Shift, X, Y); -end; - -class procedure _TcxContainerAccess.MouseUp(AInstance: TcxContainer; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - AInstance.MouseUp(Button, Shift, X, Y); -end; - -procedure AssignFonts(AFont1, AFont2: TFont); -begin -{$IFDEF DELPHI9} -{$ENDIF} - AFont1.Assign(AFont2); -end; - -function ButtonTocxButton(Button: TMouseButton): TcxMouseButton; -const - AButtonMap: array[TMouseButton] of TcxMouseButton = (cxmbLeft, cxmbRight, cxmbMiddle); -begin - Result := AButtonMap[Button]; -end; - -function CanShowHint(AControl: TWinControl): Boolean; - - function GetForm(AWnd: HWND; out AForm: TCustomForm; - out AFormStyle: TFormStyle): Boolean; - var - AControl: TWinControl; - begin - AControl := FindControl(AWnd); - Result := AControl is TCustomForm; - if Result then - begin - AForm := TCustomForm(AControl); - AFormStyle := TCustomFormAccess(AForm).FormStyle; - end; - end; - - function GetRootParent(AWnd: HWND): HWND; - var - AFormStyle: TFormStyle; - AParentForm: TCustomForm; - begin - repeat - if IsChildClassWindow(AWnd) then - Result := GetParent(AWnd) - else - Result := 0; - if Result = 0 then - Break; - AWnd := Result; - if GetForm(AWnd, AParentForm, AFormStyle) and - (AFormStyle = fsMDIChild) then - Break; - until False; - Result := AWnd; - end; - -var - AForm: TCustomForm; - AFormStyle: TFormStyle; - ARootParent: HWND; -begin - Result := Application.Active and AControl.HandleAllocated and - IsWindowVisible(AControl.Handle) and - (FindVCLWindow(GetMouseCursorPos) = AControl); - if Result then - begin - ARootParent := GetRootParent(AControl.Handle); - Result := not GetForm(ARootParent, AForm, AFormStyle) or - AForm.Active or (AFormStyle = fsMDIForm) or (FVisiblePopupWindowList.Count > 0) and - IsChild(ARootParent, TcxCustomPopupWindow(FVisiblePopupWindowList[0]).OwnerControl.Handle); - end; -end; - -function CheckParentsNativeHandle(AControl: TWinControl; - ANativeHandle: TcxNativeHandle): Boolean; -var - AParentForm: TCustomForm; - AParentHandle, AParentHandle1: HWND; -begin - Result := False; - if AControl = nil then - Exit; - AParentForm := GetParentForm(AControl); - if AParentForm = nil then - Exit; - Result := HasNativeHandle(AParentForm, ANativeHandle, True); - if not Result and (AParentForm.Parent = nil) then - begin - AParentHandle := AParentForm.Handle; - repeat - AParentHandle1 := GetParent(AParentHandle); - if (AParentHandle1 = 0) or not IsChild(AParentHandle1, AParentHandle) then - Break; - AParentHandle := AParentHandle1; - until False; - if AParentHandle <> AParentForm.Handle then - Result := (AParentHandle = ANativeHandle) or IsChild(AParentHandle, ANativeHandle); - end; -end; - -function cxGetScrollBarInfo(hwnd: HWND; idObject: Longint; - var psbi: TcxScrollBarInfo): BOOL; -begin - psbi.cbSize := SizeOf(psbi); - Result := FUsecxScrollBars and GetScrollBarInfoProc(hwnd, idObject, psbi); -end; - -function DefaultContainerStyleController: TcxStyleController; -begin - Result := cxContainerDefaultStyleController; -end; - -procedure DrawContainerShadow(ACanvas: TcxCanvas; const ARect: TRect); -var - R: TRect; -begin - with ACanvas do - begin - Brush.Color := cxContainerShadowColor; - with R do - begin - Left := ARect.Left + cxContainerShadowWidth; - Top := ARect.Bottom; - Right := ARect.Right; - Bottom := Top + cxContainerShadowWidth; - FillRect(R); - ExcludeClipRect(R); - - Left := ARect.Right; - Top := ARect.Top + cxContainerShadowWidth; - Right := Left + cxContainerShadowWidth; - Bottom := ARect.Bottom + cxContainerShadowWidth; - FillRect(R); - ExcludeClipRect(R); - end; - end; -end; - -procedure ExtendRectByBorders(var R: TRect; ABorderWidth: Integer; AEdges: TcxBorders); -begin - if bLeft in AEdges then - Dec(R.Left, ABorderWidth); - if bTop in AEdges then - Dec(R.Top, ABorderWidth); - if bRight in AEdges then - Inc(R.Right, ABorderWidth); - if bBottom in AEdges then - Inc(R.Bottom, ABorderWidth); -end; - -function FindFirstNonChildParentWindow(AWnd: HWND): HWND; -begin - Result := 0; - while (AWnd <> 0) and (Result = 0) do - begin - if (GetWindowLong(AWnd, GWL_STYLE) and WS_CHILD) = 0 then - Result := AWnd; - AWnd := GetParent(AWnd); - end; -end; - -function GetContainerBorderWidth(ABorderStyle: TcxContainerBorderStyle): Integer; -begin - Result := cxContainerBorderWidthA1[ABorderStyle]; -end; - -function GetContainerBorderWidth(ALookAndFeelKind: TcxLookAndFeelKind): Integer; -begin - Result := cxContainerBorderWidthA2[ALookAndFeelKind]; -end; - -function GetControlRect(AControl: TControl): TRect; -begin - Result := Rect(0, 0, AControl.Width, AControl.Height); -end; - -function GetcxContainer(AControl: TWinControl): TcxContainer; -var - AIContainerInnerControl: IcxContainerInnerControl; -begin - Result := nil; - if AControl is TcxContainer then - Result := TcxContainer(AControl) - else - if (AControl <> nil) and Supports(AControl, IcxContainerInnerControl, AIContainerInnerControl) then - Result := AIContainerInnerControl.ControlContainer; -end; - -function GetInnerControlContainer(AControl: TWinControl): TWinControl; -var - AInnerControl: IcxContainerInnerControl; -begin - if Supports(AControl, IcxContainerInnerControl, AInnerControl) then - Result := AInnerControl.ControlContainer - else - Result := AControl; -end; - -function GetWindowShadowRegion(AWindowHandle: TcxHandle; - AShadowBounds, AShadowBoundsExtent: TRect; ANativeStyle, AShadow: Boolean; - const AExcludeRect: TRect): TcxRegionHandle; -var - ATempRegion: TcxRegionHandle; -begin - Result := 0; - if not (ANativeStyle or EqualRect(cxGetClientRect(AWindowHandle), AShadowBounds)) then - begin - Result := CreateRectRgnIndirect(AShadowBounds); - if AShadow then - begin - OffsetRect(AShadowBounds, cxContainerShadowWidth, cxContainerShadowWidth); - Inc(AShadowBounds.Top, AShadowBoundsExtent.Top); - Inc(AShadowBounds.Left, AShadowBoundsExtent.Left); - Dec(AShadowBounds.Right, AShadowBoundsExtent.Right); - Dec(AShadowBounds.Bottom, AShadowBoundsExtent.Bottom); - ATempRegion := CreateRectRgnIndirect(AShadowBounds); - CombineRgn(Result, Result, ATempRegion, RGN_OR); - DeleteObject(ATempRegion); - end; - if not IsRectEmpty(AExcludeRect) then - begin - ATempRegion := CreateRectRgnIndirect(AExcludeRect); - CombineRgn(Result, Result, ATempRegion, RGN_DIFF); - DeleteObject(ATempRegion); - end; - end; -end; - -function GetPopupOwnerControl(AWnd: HWND): HWND; -var - AControl: TWinControl; -begin - Result := AWnd; - while AWnd <> 0 do - begin - AControl := FindControl(AWnd); - if AControl is TcxCustomPopupWindow then - begin - if TcxCustomPopupWindow(AControl).OwnerControl.HandleAllocated then - Result := TcxCustomPopupWindow(AControl).OwnerControl.Handle; - Break; - end; - AWnd := GetParent(AWnd); - end; -end; - -function HasHandle(AControl: TWinControl; AHandle: TcxHandle): Boolean; -begin - Result := HasNativeHandle(AControl, NativeHandle(AHandle)); -end; - -function HasNativeHandle(AControl: TWinControl; ANativeHandle: TcxNativeHandle; - ACheckChildren: Boolean = False): Boolean; -begin - Result := (AControl <> nil) and ((AControl.Handle = ANativeHandle) or - ACheckChildren and IsChildWindow(AControl, ANativeHandle)); -end; - -function HasOpenedPopupWindow(AControl: TWinControl): Boolean; -var - AContainer: TcxContainer; -begin - AContainer := GetcxContainer(AControl); - Result := (AContainer <> nil) and AContainer.HasPopupWindow; -end; - -procedure InflateRectByBorders(var R: TRect; ABorderWidth: Integer; - AEdges: TcxBorders); -begin - if not(bLeft in AEdges) then - Inc(R.Left, ABorderWidth); - if not(bTop in AEdges) then - Inc(R.Top, ABorderWidth); - if not(bRight in AEdges) then - Dec(R.Right, ABorderWidth); - if not(bBottom in AEdges) then - Dec(R.Bottom, ABorderWidth); -end; - -function InternalCompareString(const S1, S2: TCaption; ACaseSensitive: Boolean): Boolean; -begin - if ACaseSensitive then - Result := AnsiCompareStr(S1, S2) = 0 - else - Result := AnsiUpperCase(S1) = AnsiUpperCase(S2); -end; - -procedure InternalFillRect(ACanvas: TcxCanvas; const AOuterRect, AInternalRect: TRect; - AColor: TColor); -begin - if IsRectEmpty(AOuterRect) or EqualRect(AOuterRect, AInternalRect) then - Exit; - with ACanvas do - begin - Brush.Color := AColor; - if IsRectEmpty(AInternalRect) then - FillRect(AOuterRect) - else - begin - FillRect(Rect(AOuterRect.Left, AOuterRect.Top, - AInternalRect.Left, AOuterRect.Bottom)); - FillRect(Rect(AInternalRect.Left, AOuterRect.Top, - AInternalRect.Right, AInternalRect.Top)); - FillRect(Rect(AInternalRect.Right, AOuterRect.Top, - AOuterRect.Right, AOuterRect.Bottom)); - FillRect(Rect(AInternalRect.Left, AInternalRect.Bottom, - AInternalRect.Right, AOuterRect.Bottom)); - end; - end; -end; - -function InternalGetCursorPos: TPoint; -begin - GetCursorPos(Result); -end; - -function InternalGetShiftState: TShiftState; -var - AKeyState: TKeyBoardState; -begin - GetKeyboardState(AKeyState); - Result := KeyboardStateToShiftState(AKeyState); -end; - -procedure InternalInvalidate(AHandle: TcxHandle; const AOuterRect, AInternalRect: TRect; - AEraseBackground: Boolean = False); - - procedure InternalInvalidateRect(const R: TRect); - begin - InvalidateRect(AHandle, @R, AEraseBackground); - end; - -begin - if IsRectEmpty(AInternalRect) then - InternalInvalidateRect(AOuterRect) - else - begin - InternalInvalidateRect(Rect(AOuterRect.Left, AOuterRect.Top, AInternalRect.Left, - AOuterRect.Bottom)); - InternalInvalidateRect(Rect(AInternalRect.Left, AOuterRect.Top, AInternalRect.Right, - AInternalRect.Top)); - InternalInvalidateRect(Rect(AInternalRect.Right, AOuterRect.Top, AOuterRect.Right, - AOuterRect.Bottom)); - InternalInvalidateRect(Rect(AInternalRect.Left, AInternalRect.Bottom, AInternalRect.Right, - AOuterRect.Bottom)); - end; -end; - -procedure InternalInvalidateRect(AControl: TWinControl; const R: TRect; - AEraseBackground: Boolean); -begin - if AControl.HandleAllocated then - InvalidateRect(AControl.Handle, @R, AEraseBackground); -end; - -function InternalIsWindowVisible(AControl: TWinControl): Boolean; -begin - with AControl do - begin - Result := HandleAllocated; - Result := Result and IsWindowVisible(Handle); - end; -end; - -function IsChildWindow(AParent: TWinControl; AChildHandle: TcxNativeHandle): Boolean; - - function InternalNativeIsChildWindow(AParent: TWinControl): Boolean; - begin - Result := IsChild(NativeHandle(AParent.Handle), AChildHandle); - end; - - function InternalIsChildWindow(AParent: TWinControl): Boolean; - var - I: Integer; - APopupWindow: TcxCustomPopupWindow; - begin - with AParent do - for I := 0 to ControlCount - 1 do - if Controls[I] is TWinControl then - begin - if HasNativeHandle(TWinControl(Controls[I]), AChildHandle) then - begin - Result := True; - Exit; - end else - begin - Result := InternalIsChildWindow(TWinControl(Controls[I])); - if Result then - Exit; - end; - Result := InternalNativeIsChildWindow(TWinControl(Controls[I])); - if Result then - Exit; - end; - if AParent is TcxCustomPopupWindow then - for I := 0 to FVisiblePopupWindowList.Count - 1 do - begin - APopupWindow := TcxCustomPopupWindow(FVisiblePopupWindowList[I]); - if (APopupWindow = AParent) or (GetParentForm(APopupWindow.OwnerControl) <> AParent) then - Continue; - if HasNativeHandle(APopupWindow, AChildHandle) then - begin - Result := True; - Exit; - end else - begin - Result := InternalIsChildWindow(APopupWindow); - if Result then Exit; - end; - end; - for I := 0 to FVisiblePopupWindowList.Count - 1 do - begin - APopupWindow := TcxCustomPopupWindow(FVisiblePopupWindowList[I]); - if APopupWindow.OwnerControl = AParent then - begin - Result := HasNativeHandle(APopupWindow, AChildHandle) or - InternalIsChildWindow(APopupWindow); - if Result then Exit; - end; - end; - Result := False; - end; - -begin - Result := False; - if (AParent = nil) or (AChildHandle = 0) or HasNativeHandle(AParent, AChildHandle) then - Exit; - Result := InternalNativeIsChildWindow(AParent); - if not Result then - Result := InternalIsChildWindow(AParent); -end; - -function IsFormActive(AForm: TCustomForm): Boolean; - - function IsWindowActive(AWindowHandle: HWND): Boolean; - begin - Result := AWindowHandle = GetActiveWindow; - end; - - function IsMDIChildActive(AForm: TCustomForm): Boolean; - begin - Result := IsMDIChild(AForm) and IsWindowActive(Application.MainForm.Handle) and (Application.MainForm.ActiveMDIChild = AForm); - end; - - function IsParentActive(AForm: TCustomForm): Boolean; - begin - Result := not IsMDIChild(AForm) and IsWindowActive(FindFirstNonChildParentWindow(AForm.Handle)); - end; - -begin - Result := (AForm <> nil) and AForm.HandleAllocated and - (IsWindowActive(AForm.Handle) or IsMDIChildActive(AForm) or IsParentActive(AForm)); -end; - -function IsMessageInQueue(AWnd: HWND; AMessage: DWORD): Boolean; -var - AMsg: TMSG; -begin - Result := PeekMessage(AMsg, AWnd, AMessage, AMessage, PM_NOREMOVE) and (AMsg.hwnd = AWnd); -end; - -function KillMessages(AWnd: HWND; AMsgFilterMin, AMsgFilterMax: UINT; - AKillAllMessages: Boolean = True): Boolean; -var - AMsg: TMsg; -begin - Result := False; - while PeekMessage(AMsg, AWnd, AMsgFilterMin, AMsgFilterMax, PM_REMOVE) do - if AMsg.message = WM_QUIT then - begin - PostQuitMessage(AMsg.wParam); - Break; - end - else - begin - Result := True; - if not AKillAllMessages then - Break; - end; -end; - -procedure LockCMActivateMessages(ALock: Boolean); -begin - if ALock then - Inc(FCMActivateMessagesLockCount) - else - Dec(FCMActivateMessagesLockCount); -end; - -function MouseButtonToShift(Button: TMouseButton): TShiftState; -begin - case Button of - mbLeft: - Result := [ssLeft]; - mbMiddle: - Result := [ssMiddle]; - mbRight: - Result := [ssRight]; - end; -end; - -function NativeHandle(Handle: TcxHandle): TcxNativeHandle; -begin - Result := Handle; -end; - -procedure SetUsecxScrollBars; -var - ALibrary: HMODULE; -begin -{$IFDEF USETCXSCROLLBAR} - ALibrary := GetModuleHandle('User32'); - if ALibrary <> 0 then - begin - @GetScrollBarInfoProc := GetProcAddress(ALibrary, 'GetScrollBarInfo'); - FUsecxScrollBars := Assigned(GetScrollBarInfoProc); - end; -{$ELSE} - FUsecxScrollBars := False; -{$ENDIF} -end; - -procedure SetWindowRegion(AControl: TWinControl; - const ABounds: TcxContainerInnerControlBounds); -begin - if ABounds.IsEmpty then - Windows.SetWindowRgn(AControl.Handle, 0, True) - else - Windows.SetWindowRgn(AControl.Handle, CreateRectRgnIndirect(ABounds.Rect), True); -end; - -procedure SetWindowShadowRegion(AWindowHandle: TcxHandle; - const AShadowBounds, AShadowBoundsExtent: TRect; - ANativeStyle, AShadow: Boolean; const AExcludeRect: TRect); -var - ARgnChanged: Boolean; - ARgnType: Integer; - ATempRegion, AWindowRegion: HRGN; -begin - AWindowRegion := GetWindowShadowRegion(AWindowHandle, AShadowBounds, - AShadowBoundsExtent, ANativeStyle, AShadow, AExcludeRect); - - ATempRegion := CreateRectRgn(0, 0, 0, 0); - ARgnType := Integer(GetWindowRgn(AWindowHandle, ATempRegion)); - ARgnChanged := not ((AWindowRegion = 0) and ((ARgnType = NULLREGION) or - (ARgnType = ERROR))) and not EqualRgn(AWindowRegion, ATempRegion); - DeleteObject(ATempRegion); - - if ARgnChanged then - SetWindowRgn(AWindowHandle, AWindowRegion, True) - else - if AWindowRegion <> 0 then - DeleteObject(AWindowRegion); -end; - -function UsecxScrollBars: Boolean; -begin - Result := FUsecxScrollBars; -end; - -function AreVisualStylesMustBeUsed(ANativeStyle: Boolean; - AThemedObjectType: TdxThemedObjectType): Boolean; -begin - Result := ANativeStyle and (OpenTheme(AThemedObjectType) <> 0); -end; - -function GetSizeGripRect(AControl: IcxContainerInnerControl): TRect; overload; -begin - Result := GetSizeGripRect(AControl.ControlContainer); -end; - -function GetSizeGripRect(AContainer: TcxContainer): TRect; overload; -var - R: TRect; -begin - with AContainer do - if HScrollBar.Visible and VScrollBar.Visible then - begin - Result.TopLeft := ClientToScreen(Point(VScrollBar.Left, HScrollBar.Top)); - R := cxGetWindowRect(AContainer.InnerControl); - Dec(Result.Left, R.Left); - Dec(Result.Top, R.Top); - Result.Right := Result.Left + VScrollBar.Width; - Result.Bottom := Result.Top + HScrollBar.Height; - end - else - Result := cxEmptyRect; -end; - -procedure cxFillSizeGrip(AContainer: TcxContainer; const ARect: TRect); -var - DC: HDC; - ABrush: HBRUSH; -begin - if not IsRectEmpty(ARect) then - begin - DC := GetWindowDC(AContainer.InnerControl.Handle); - ABrush := 0; - try - ABrush := CreateSolidBrush(ColorToRGB(AContainer.LookAndFeel.Painter.DefaultSizeGripAreaColor)); - FillRect(DC, ARect, ABrush); - finally - if ABrush <> 0 then - DeleteObject(ABrush); - ReleaseDC(AContainer.InnerControl.Handle, DC); - end; - end; -end; - -procedure cxFillSizeGrip(AContainer: TcxContainer); -begin - cxFillSizeGrip(AContainer, GetSizeGripRect(AContainer)); -end; - -procedure SetHooksSettingMode(ASetHooksOnlyWhenPopupsAreVisible: Boolean); -begin - if ASetHooksOnlyWhenPopupsAreVisible <> FSetHooksOnlyWhenPopupsAreVisible then - begin - FSetHooksOnlyWhenPopupsAreVisible := ASetHooksOnlyWhenPopupsAreVisible; - if FVisiblePopupWindowList.Count = 0 then - if ASetHooksOnlyWhenPopupsAreVisible then - RemoveHooks - else - SetHooks; - end; -end; - -var - FDisablingWindowsCounter: Integer; - FTopLevelWindowList: TList; - FInternalWindowsEnabling: Boolean; - -procedure DisableWindow(AWindowList: TList; AWnd: HWND); -begin - if IsWindowEnabled(AWnd) then - begin - AWindowList.Add(Pointer(AWnd)); - EnableWindow(AWnd, False); - end; -end; - -procedure EnableWindows(AWindowList: TList); -var - I: Integer; - AWnd: HWND; -begin - if AWindowList <> nil then - for I := 0 to AWindowList.Count - 1 do - begin - AWnd := HWND(AWindowList[I]); - if IsWindow(AWnd) then - EnableWindow(AWnd, True); - end; -end; - -function DisableTopLevelWindow(AWnd: HWND; AInfo: Pointer): BOOL; stdcall; -var - AProcessId: Cardinal; -begin - Result := True; - GetWindowThreadProcessId(AWnd, @AProcessId); - if (AProcessId = GetCurrentProcessId) then - DisableWindow(FTopLevelWindowList, AWnd); -end; - -procedure DisableAppWindows(ANeedDisable: Boolean = True); -begin - Inc(FDisablingWindowsCounter); - - if (FDisablingWindowsCounter = 1) and ANeedDisable then - try - FInternalWindowsEnabling := True; - FTopLevelWindowList := TList.Create; - EnumWindows(@DisableTopLevelWindow, 0); - finally - FInternalWindowsEnabling := False; - end; -end; - -procedure EnableAppWindows; -begin - Dec(FDisablingWindowsCounter); - - if FDisablingWindowsCounter = 0 then - try - FInternalWindowsEnabling := True; - EnableWindows(FTopLevelWindowList); - FreeAndNil(FTopLevelWindowList); - finally - FInternalWindowsEnabling := False; - end; -end; - -function IsInternalWindowsDisabled: Boolean; -begin - Result := FDisablingWindowsCounter > 0; -end; - -function IsInternalWindowsDisabling: Boolean; -begin - Result := FInternalWindowsEnabling; -end; - -procedure DrawWindowOnGlass(ADC: HDC; const ABounds: TRect; AWnd: HWND); -var - AMemDC: HDC; - APaintBuffer: THandle; -begin - APaintBuffer := BeginBufferedPaint(ADC, @ABounds, BPBF_COMPOSITED, nil, AMemDC); - try - SendMessage(AWnd, WM_ERASEBKGND, AMemDC, AMemDC); - SendMessage(AWnd, WM_PRINTCLIENT, AMemDC, PRF_CLIENT); - BufferedPaintSetAlpha(APaintBuffer, @ABounds, 255); - finally - HideCaret(AWnd); - EndBufferedPaint(APaintBuffer, True); - ShowCaret(AWnd); - end; -end; - -procedure RepaintWindowOnGlass(AWnd: HWND); -var - R: TRect; - DC: HDC; -begin - DC := GetDC(AWnd); - try - Windows.GetClientRect(AWnd, R); - DrawWindowOnGlass(DC, R, AWnd); - finally - ReleaseDC(AWnd, DC); - end; -end; - -procedure WMPaintWindowOnGlass(AWnd: HWND); -var - DC: HDC; - PS: TPaintStruct; -begin - DC := BeginPaint(AWnd, PS); - try - DrawWindowOnGlass(DC, PS.rcPaint, AWnd); - finally - EndPaint(AWnd, PS); - end; -end; - -function IsCMActivateMessagesLocked: Boolean; -begin - Result := FCMActivateMessagesLockCount <> 0; -end; - -{ TcxContainerViewInfo } - -constructor TcxContainerViewInfo.Create; -begin - inherited Create; - ContainerState := [csNormal]; -end; - -procedure TcxContainerViewInfo.Assign(Source: TObject); -begin - if Source is TcxContainerViewInfo then - with Source as TcxContainerViewInfo do - Self.ClientRect := ClientRect; -end; - -function TcxContainerViewInfo.GetUpdateRegion(AViewInfo: TcxContainerViewInfo): TcxRegion; -begin - Result := TcxRegion.Create; -end; - -procedure TcxContainerViewInfo.Offset(DX, DY: Integer); -begin - OffsetRect(BorderRect, DX, DY); - OffsetRect(Bounds, DX, DY); - OffsetRect(ClientRect, DX, DY); -end; - -procedure TcxContainerViewInfo.Paint(ACanvas: TcxCanvas); -begin - InternalPaint(ACanvas); -end; - -procedure TcxContainerViewInfo.DrawBorder(ACanvas: TcxCanvas; R: TRect); -begin - if Painter <> nil then - ACanvas.FrameRect(R, BorderColor, BorderWidth) - else - case BorderStyle of - cbsSingle, cbsThick: - ACanvas.FrameRect(R, BorderColor, BorderWidth); - cbsFlat: - begin - ACanvas.DrawEdge(R, True, True, Edges); - InflateRect(R, -1, -1); - ACanvas.FrameRect(R, clBtnFace); - end; - cbs3D: - begin - ACanvas.DrawEdge(R, True, True, Edges); - InflateRect(R, -1, -1); - ACanvas.DrawComplexFrame(R, cl3DDkShadow, cl3DLight, Edges); - end; - end; -end; - -function TcxContainerViewInfo.GetContainerBorderStyle: TcxContainerBorderStyle; -begin - Result := BorderStyle; -end; - -procedure TcxContainerViewInfo.InternalPaint(ACanvas: TcxCanvas); - - procedure DrawBackground; - var - R: TRect; - begin - R := BorderRect; - Dec(R.Left, BorderWidth); - Dec(R.Top, BorderWidth); - if bRight in Edges then Inc(R.Right, BorderWidth); - if bBottom in Edges then Inc(R.Bottom, BorderWidth); - if Shadow then - DrawContainerShadow(ACanvas, R); - if not(bRight in Edges) then Inc(R.Right, BorderWidth); - if not(bBottom in Edges) then Inc(R.Bottom, BorderWidth); - DrawBorder(ACanvas, R); - with ACanvas do - begin - Brush.Color := BackgroundColor; - FillRect(BorderRect); - end; - end; - - procedure DrawNativeStyleBackground; - - function IsBorderNeeded: Boolean; - begin - Result := BorderStyle <> cbsNone; - end; - - var - AThemedObjectType: TdxThemedObjectType; - APart, AState: Integer; - R: TRect; - AColor: COLORREF; - begin - if not IsBorderNeeded then - begin - ACanvas.Brush.Color := BackgroundColor; - ACanvas.FillRect(Bounds); - end - else - begin - GetThemeBackgroundContentRect(OpenTheme(ThemedObjectType), ACanvas.Handle, EP_EDITTEXT, - NativeState, Bounds, R); - ACanvas.Brush.Color := BackgroundColor; - ACanvas.FillRect(R); - if IsCompositionEnabled then - begin - AThemedObjectType := totListBox; - APart := LBCP_BORDER_NOSCROLL; - AState := LBPSN_NORMAL; - end - else - begin - AThemedObjectType := totComboBox; - APart := CP_DROPDOWNBUTTON; - AState := CBXS_NORMAL; - end; - GetThemeColor(OpenTheme(AThemedObjectType), APart, AState, TMT_BORDERCOLOR, AColor); - InternalFillRect(ACanvas, Bounds, R, AColor); - end; - end; - -begin - if NativeStyle then - DrawNativeStyleBackground - else - DrawBackground; -end; - -procedure TcxContainerViewInfo.SetBackgroundColor(Value: TColor); -begin - FBackgroundColor := Value; -end; - -{ TcxContainerStyles } - -constructor TcxContainerStyles.Create(AOwner: TPersistent; - AStyleClass: TcxContainerStyleClass); - - function CreateStyle(AState: TcxContainerStateItem): TcxContainerStyle; - begin - if AState = csNormal then - Result := AStyleClass.Create(AOwner, False, nil, AState) - else - Result := AStyleClass.Create(AOwner, False, FStyles[csNormal], AState); - end; - -var - AState: TcxContainerStateItem; -begin - inherited Create; - for AState := Low(TcxContainerStateItem) to High(TcxContainerStateItem) do - FStyles[AState] := CreateStyle(AState); -end; - -destructor TcxContainerStyles.Destroy; -var - AState: TcxContainerStateItem; -begin - for AState := High(TcxContainerStateItem) downto Low(TcxContainerStateItem) do - FreeAndNil(FStyles[AState]); - inherited Destroy; -end; - -procedure TcxContainerStyles.RestoreDefaults; -var - AState: TcxContainerStateItem; -begin - for AState := Low(TcxContainerStateItem) to High(TcxContainerStateItem) do - FStyles[AState].RestoreDefaults; -end; - -function TcxContainerStyles.GetStyle(AState: TcxContainerStateItem): TcxContainerStyle; -begin - Result := FStyles[AState]; -end; - -function TcxContainerStyles.GetStyleDisabled: TcxContainerStyle; -begin - Result := FStyles[csDisabled]; -end; - -function TcxContainerStyles.GetStyleFocused: TcxContainerStyle; -begin - Result := FStyles[csActive]; -end; - -function TcxContainerStyles.GetStyleHot: TcxContainerStyle; -begin - Result := FStyles[csHotTrack]; -end; - -function TcxContainerStyles.GetStyleNormal: TcxContainerStyle; -begin - Result := FStyles[csNormal]; -end; - -procedure TcxContainerStyles.SetOnChanged(Value: TNotifyEvent); -var - AState: TcxContainerStateItem; -begin - for AState := Low(TcxContainerStateItem) to High(TcxContainerStateItem) do - FStyles[AState].OnChanged := Value; -end; - -procedure TcxContainerStyles.SetStyle(AState: TcxContainerStateItem; Value: TcxContainerStyle); -begin - FStyles[AState].Assign(Value); -end; - -procedure TcxContainerStyles.SetStyleDisabled(Value: TcxContainerStyle); -begin - FStyles[csDisabled].Assign(Value); -end; - -procedure TcxContainerStyles.SetStyleFocused(Value: TcxContainerStyle); -begin - FStyles[csActive].Assign(Value); -end; - -procedure TcxContainerStyles.SetStyleHot(Value: TcxContainerStyle); -begin - FStyles[csHotTrack].Assign(Value); -end; - -procedure TcxContainerStyles.SetStyleNormal(Value: TcxContainerStyle); -begin - FStyles[csNormal].Assign(Value); -end; - -{ TcxStyleController } - -constructor TcxStyleController.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FListeners := TList.Create; - FStyles := TcxContainerStyles.Create(Self, GetStyleClass); - FStyles.OnChanged := StyleChanged; -end; - -destructor TcxStyleController.Destroy; -var - I: Integer; -begin - FIsDestruction := True; - for I := FListeners.Count - 1 downto 0 do - TcxContainerStyle(FListeners[I]).ControllerFreeNotification(Self); - FreeAndNil(FStyles); - FreeAndNil(FListeners); - inherited Destroy; -end; - -procedure TcxStyleController.RestoreStyles; -begin - FStyles.RestoreDefaults; -end; - -procedure TcxStyleController.Loaded; -begin - inherited Loaded; - Changed; -end; - -procedure TcxStyleController.AddListener(AListener: TcxContainerStyle); -begin - if (AListener = nil) or (FListeners.IndexOf(AListener) >= 0) then - Exit; - FListeners.Add(AListener); - AListener.LookAndFeel.MasterLookAndFeel := Style.LookAndFeel; -end; - -procedure TcxStyleController.Changed; -var - I: Integer; -begin - if Assigned(FOnStyleChanged) then - FOnStyleChanged(Self); - if not IsDestruction then - for I := 0 to Listeners.Count - 1 do - TcxContainerStyle(Listeners[I]).ControllerChangedNotification(Self); -end; - -procedure TcxStyleController.ChangeFontScale(M, D: Integer); -begin - if not (csvFont in Style.AssignedValues) then - Style.ActiveStyleController.ChangeFontScale(M, D) - else - if not FIsFontScaled then - begin - FIsFontScaled := True; - Style.Font.Size := MulDiv(Style.Font.Size, M, D); - end; -end; - -function TcxStyleController.GetStyleClass: TcxContainerStyleClass; -begin - Result := TcxContainerStyle; -end; - -function TcxStyleController.GetStylesClass: TcxContainerStylesClass; -begin - Result := TcxContainerStyles; -end; - -function TcxStyleController.IsDestruction: Boolean; -begin - Result := FIsDestruction; -end; - -procedure TcxStyleController.RemoveListener(AListener: TcxContainerStyle); -begin - if (AListener = nil) or (FListeners.IndexOf(AListener) < 0) then - Exit; - FListeners.Remove(AListener); - AListener.LookAndFeel.MasterLookAndFeel := nil; -end; - -function TcxStyleController.GetFakeStyleController: TcxStyleController; -begin - Result := Style.StyleController; -end; - -function TcxStyleController.GetStyle: TcxContainerStyle; -begin - Result := FStyles.Style; -end; - -function TcxStyleController.GetInternalStyle(AState: TcxContainerStateItem): TcxContainerStyle; -begin - Result := FStyles[AState]; -end; - -procedure TcxStyleController.SetFakeStyleController(Value: TcxStyleController); -begin -end; - -procedure TcxStyleController.SetInternalStyle(AState: TcxContainerStateItem; - Value: TcxContainerStyle); -begin - FStyles[AState].Assign(Value); -end; - -procedure TcxStyleController.StyleChanged(Sender: TObject); -begin - Changed; -end; - -{ TcxContainerStyle } - -constructor TcxContainerStyle.Create(AOwner: TPersistent; - ADirectAccessMode: Boolean; AParentStyle: TcxContainerStyle = nil; - AState: TcxContainerStateItem = csNormal); -begin - inherited Create(AOwner); - FDirectAccessMode := ADirectAccessMode; - FOwner := AOwner; - if AState <> csNormal then - FParentStyle := AParentStyle; - FState := AState; - if DirectAccessMode then - FAssignedValues := [csvColor, csvFont, csvTextColor, csvTextStyle]; // TODO ??? - CreateFont; - FVisibleFont := TFont.Create; - if IsBaseStyle then - begin - FLookAndFeel := TcxLookAndFeel.Create(Self); - FLookAndFeel.OnChanged := LookAndFeelChanged; - StyleController := GetDefaultStyleController; - end; -end; - -destructor TcxContainerStyle.Destroy; -begin - FIsDestroying := True; - if IsBaseStyle and (ActiveStyleController <> nil) then - ActiveStyleController.RemoveListener(Self); - FreeAndNil(FLookAndFeel); - FreeAndNil(FVisibleFont); - if not DirectAccessMode and IsBaseStyle then - FreeAndNil(StyleData.Font); - inherited Destroy; -end; - -procedure TcxContainerStyle.Assign(Source: TPersistent); -begin - if Source is TcxContainerStyle then - begin - BeginUpdate; - try - with Source as TcxContainerStyle do - begin - if Self.IsBaseStyle then - begin - Self.StyleController := StyleController; - Self.LookAndFeel := LookAndFeel; - end; - - Self.FBorderColor := FBorderColor; - Self.FBorderStyle := FBorderStyle; - Self.FEdges := FEdges; - Self.FHotTrack := FHotTrack; - Self.FShadow := FShadow; - Self.FTransparentBorder := FTransparentBorder; - Self.StyleData.Color := StyleData.Color; - - if Self.DirectAccessMode then - begin - Self.StyleData.Font := Font; - Self.StyleData.FontColor := TextColor; - end - else - begin - Self.StyleData.Font.Assign(Font); - if DirectAccessMode then - Self.StyleData.Font.Color := TextColor; - Self.StyleData.FontColor := TextColor; - Self.FTextStyle := TextStyle; - end; - - Self.FAssignedValues := FAssignedValues; - - Self.Changed; - end; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -procedure TcxContainerStyle.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TcxContainerStyle.EndUpdate; -begin - if FUpdateCount > 0 then - begin - Dec(FUpdateCount); - CheckChanges; - end; -end; - -function TcxContainerStyle.GetStyleValue(const APropertyName: string; - out StyleValue: TcxContainerStyleValue): Boolean; -var - I: TcxContainerStyleValue; - S: string; -begin - Result := False; - for I := 0 to GetStyleValueCount - 1 do - begin - GetStyleValueName(I, S); - if InternalCompareString(S, APropertyName, False) then - begin - StyleValue := I; - Result := True; - Break; - end; - end; -end; - -function TcxContainerStyle.GetStyleValueCount: Integer; -begin - Result := cxContainerStyleValueCount; -end; - -function TcxContainerStyle.GetStyleValueName(AStyleValue: TcxContainerStyleValue; - out StyleValueName: string): Boolean; -begin - Result := AStyleValue < cxContainerStyleValueCount; - if Result then - StyleValueName := cxContainerStyleValueNameA[AStyleValue]; -end; - -function TcxContainerStyle.GetVisibleFont: TFont; -begin - UpdateVisibleFont; - Result := FVisibleFont; -end; - -function TcxContainerStyle.HasBorder: Boolean; -begin - if IsBaseStyle then - Result := True - else - Result := ParentStyle.HasBorder; -end; - -function TcxContainerStyle.IsExtendedStylePropertyPublished( - const APropertyName: string): Boolean; -var - AStyleValue: TcxContainerStyleValue; -begin - if (APropertyName = 'LookAndFeel') or (APropertyName = 'StyleController') then - begin - Result := False; - Exit; - end; - Result := True; - if GetStyleValue(APropertyName, AStyleValue) then - Result := not(AStyleValue in InternalGetNotPublishedExtendedStyleValues); -end; - -function TcxContainerStyle.IsValueAssigned(AValue: TcxContainerStyleValue): Boolean; -var - ABorderStyle: TcxContainerBorderStyle; - AColor: TColor; - AEdges: TcxBorders; - AFont: TFont; - ATempBool: Boolean; - ATextStyle: TFontStyles; -begin - Result := False; - case AValue of - csvBorderColor: - Result := InternalGetBorderColor(AColor); - csvBorderStyle: - Result := InternalGetBorderStyle(ABorderStyle); - csvColor: - Result := InternalGetColor(AColor); - csvEdges: - Result := InternalGetEdges(AEdges); - csvFont: - Result := InternalGetFont(AFont); - csvHotTrack: - Result := InternalGetHotTrack(ATempBool); - csvShadow: - Result := InternalGetShadow(ATempBool); - csvTextColor: - Result := InternalGetTextColor(AColor); - csvTextStyle: - Result := InternalGetTextStyle(ATextStyle); - end; -end; - -procedure TcxContainerStyle.RestoreDefaults; -begin - BeginUpdate; - try - AssignedValues := []; - if IsBaseStyle then - begin - LookAndFeel.Reset; - if Container <> nil then - begin - Container.ParentColor := False; - Container.ParentFont := True; - end - else - if not DirectAccessMode then - RestoreFont(StyleData.Font); - if (Container <> nil) and Container.DefaultParentColor and - ((ActiveStyleController = nil) or not ActiveStyleController.Style.IsValueAssigned(csvColor)) then - Container.ParentColor := True; - end; - finally - EndUpdate; - end; -end; - -procedure TcxContainerStyle.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('IsFontAssigned', ReadIsFontAssigned, - WriteIsFontAssigned, IsFontStored); -end; - -function TcxContainerStyle.BaseGetStyleController: TcxStyleController; -begin - if IsBaseStyle then - if FStyleController = GetDefaultStyleController then - Result := nil - else - Result := FStyleController - else - Result := ParentStyle.StyleController; -end; - -procedure TcxContainerStyle.BaseSetStyleController(Value: TcxStyleController); - - function CheckStyleController(AStyleController: TcxStyleController): Boolean; - begin - Result := False; - if AStyleController.Style = Self then - Exit; - repeat - AStyleController := AStyleController.Style.StyleController; - if AStyleController = nil then - Break; - if AStyleController.Style = Self then - Exit; - until False; - Result := True; - end; - -begin - if not IsBaseStyle then - ParentStyle.StyleController := Value - else - begin - if FOwner = GetDefaultStyleController then - Exit; - if Value = nil then - Value := GetDefaultStyleController; - if (Value <> nil) and (not CheckStyleController(Value)) then - Exit; - - if Value <> FStyleController then - begin - if FStyleController <> nil then - FStyleController.RemoveListener(Self); - FStyleController := Value; - if FStyleController <> nil then - FStyleController.AddListener(Self); - ControllerChangedNotification(FStyleController); - end; - end; -end; - -procedure TcxContainerStyle.Changed; -begin - FModified := True; - CheckChanges; -end; - -procedure TcxContainerStyle.ControllerChangedNotification(AStyleController: TcxStyleController); -begin - UpdateFont; - Changed; -end; - -procedure TcxContainerStyle.ControllerFreeNotification(AStyleController: TcxStyleController); -begin - if AStyleController = ActiveStyleController then - StyleController := nil; -end; - -function TcxContainerStyle.DefaultBorderColor: TColor; -begin - if State = csDisabled then - Result := clBtnShadow - else - if IsBaseStyle then - Result := clWindowFrame - else - Result := ParentStyle.BorderColor; -end; - -function TcxContainerStyle.DefaultBorderStyle: TcxContainerBorderStyle; -const - AStyleBorderStyles: array [TcxLookAndFeelKind] of TcxContainerBorderStyle = - (cbsFlat, cbs3D, cbsUltraFlat, cbsOffice11); - ABorderStyles: array [TcxContainerStateItem, TcxContainerBorderStyle] of TcxContainerBorderStyle = ( - (cbsNone, cbsSingle, cbsThick, cbsFlat, cbs3D, cbsUltraFlat, cbsOffice11), - (cbsFlat, cbsThick, cbsThick, cbs3D, cbs3D, cbsUltraFlat, cbsOffice11), - (cbsNone, cbsSingle, cbsThick, cbsFlat, cbs3D, cbsUltraFlat, cbsOffice11), - (cbsFlat, cbsThick, cbsThick, cbs3D, cbs3D, cbsUltraFlat, cbsOffice11) - ); -var - AState: TcxContainerStateItem; -begin - if IsBaseStyle then - Result := AStyleBorderStyles[LookAndFeel.Kind] - else - begin - if HotTrack or (State = csDisabled) then - AState := State - else - AState := csNormal; - Result := ABorderStyles[AState, ParentStyle.BorderStyle]; - end; -end; - -function TcxContainerStyle.DefaultColor: TColor; -var - AIsDefaultParentColor: Boolean; -begin - AIsDefaultParentColor := (Container = nil) or Container.DefaultParentColor; - if IsBaseStyle then - begin - if AIsDefaultParentColor then - Result := clBtnFace - else - Result := clWindow; - end - else - if (State = csDisabled) and not AIsDefaultParentColor then - Result := clBtnFace - else - Result := ParentStyle.Color; -end; - -function TcxContainerStyle.DefaultEdges: TcxBorders; -begin - Result := [bLeft, bTop, bRight, bBottom]; -end; - -function TcxContainerStyle.DefaultHotTrack: Boolean; -begin - Result := True; -end; - -function TcxContainerStyle.DefaultShadow: Boolean; -begin - Result := False; -end; - -function TcxContainerStyle.DefaultTextColor: TColor; -begin - if State = csDisabled then - Result := clBtnShadow - else - if IsBaseStyle then - Result := StyleData.Font.Color - else - Result := ParentStyle.TextColor; -end; - -function TcxContainerStyle.DefaultTextStyle: TFontStyles; -begin - if IsBaseStyle then - Result := StyleData.Font.Style - else - Result := ParentStyle.TextStyle; -end; - -function TcxContainerStyle.DefaultTransparentBorder: Boolean; -begin - Result := True; -end; - -procedure TcxContainerStyle.FontChanged(Sender: TObject); -begin - if not IsFontAssignedValueLocked then - Include(FAssignedValues, csvFont); - Changed; -end; - -function TcxContainerStyle.GetColor: TColor; -var - AContainer: TcxContainer; -begin - if DirectAccessMode then - Result := StyleData.Color - else - begin - AContainer := Container; - if IsBaseStyle and (AContainer <> nil) and - AContainer.ParentColor and (AContainer.Parent <> nil) then - Result := TWinControlAccess(AContainer.Parent).Color - else - if not InternalGetColor(Result) then - Result := DefaultColor; - end; -end; - -function TcxContainerStyle.GetDefaultStyleController: TcxStyleController; -begin - Result := DefaultContainerStyleController; -end; - -function TcxContainerStyle.GetStyleColor: TColor; -var - AContainer: TcxContainer; -begin - if FDirectAccessMode then - Result := StyleData.Color - else - if not InternalGetColor(Result) then - if not IsBaseStyle then - Result := DefaultColor - else - begin - AContainer := Container; - if (AContainer <> nil) and not AContainer.IsInplace and - AContainer.ParentColor and (AContainer.Parent <> nil) then - Result := TWinControlAccess(AContainer.Parent).Color - else - Result := DefaultColor; - end; -end; - -function TcxContainerStyle.GetTextColor: TColor; -begin - if DirectAccessMode then - Result := StyleData.FontColor - else - if not InternalGetTextColor(Result) then - Result := DefaultTextColor; -end; - -function TcxContainerStyle.GetTextStyle: TFontStyles; -begin - if DirectAccessMode then - Result := StyleData.Font.Style - else - if not InternalGetTextStyle(Result) then - Result := DefaultTextStyle; -end; - -function TcxContainerStyle.InternalGetColor(var Color: TColor): Boolean; -begin - Result := csvColor in FAssignedValues; - if Result then - Color := StyleData.Color - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[State].InternalGetColor(Color); -end; - -function TcxContainerStyle.InternalGetNotPublishedExtendedStyleValues: TcxContainerStyleValues; -begin - Result := [csvEdges, csvFont, csvHotTrack, csvShadow, csvTransparentBorder]; -end; - -function TcxContainerStyle.IsBaseStyle: Boolean; -begin - Result := ParentStyle = nil; -end; - -function TcxContainerStyle.IsDestroying: Boolean; -begin - Result := FIsDestroying; -end; - -function TcxContainerStyle.IsFontAssignedValueLocked: Boolean; -begin - Result := FFontAssignedValueLockCount > 0; -end; - -procedure TcxContainerStyle.LockFontAssignedValue(ALock: Boolean); -begin - if ALock then - Inc(FFontAssignedValueLockCount) - else - if FFontAssignedValueLockCount > 0 then - Dec(FFontAssignedValueLockCount); -end; - -procedure TcxContainerStyle.UpdateFont; -var - AFont: TFont; -begin - if DirectAccessMode or (csvFont in AssignedValues) then - Exit; - LockFontAssignedValue(True); - try - if InternalGetFont(AFont) then - StyleData.Font.Assign(AFont) - else - if (Container = nil) or not Container.ParentFont then - RestoreFont(StyleData.Font); - finally - LockFontAssignedValue(False); - end; -end; - -function TcxContainerStyle.GetAssignedValues: TcxContainerStyleValues; -begin - if DirectAccessMode then - Result := [0..GetStyleValueCount - 1] - else - Result := FAssignedValues; -end; - -function TcxContainerStyle.GetBorderColor: TColor; -begin - if DirectAccessMode then - Result := clDefault - else - if not InternalGetBorderColor(Result) then - Result := DefaultBorderColor; -end; - -function TcxContainerStyle.GetBorderStyle: TcxContainerBorderStyle; -begin - if DirectAccessMode then - if csvBorderStyle in FAssignedValues then - Result := FBorderStyle - else - Result := DefaultBorderStyle - else - if not InternalGetBorderStyle(Result) then - Result := DefaultBorderStyle; -end; - -function TcxContainerStyle.GetEdges: TcxBorders; -begin - if DirectAccessMode then - Result := [] - else - if not IsBaseStyle then - Result := ParentStyle.Edges - else - if not InternalGetEdges(Result) then - Result := DefaultEdges; -end; - -function TcxContainerStyle.GetFont: TFont; -begin - if IsBaseStyle then - Result := StyleData.Font - else - Result := ParentStyle.Font; -end; - -function TcxContainerStyle.GetHotTrack: Boolean; -begin - if DirectAccessMode then - begin - if csvHotTrack in FAssignedValues then - Result := FHotTrack - else - Result := DefaultHotTrack; - end - else - if not IsBaseStyle then - Result := ParentStyle.HotTrack - else - if not InternalGetHotTrack(Result) then - Result := DefaultHotTrack; -end; - -function TcxContainerStyle.GetShadow: Boolean; -begin - if DirectAccessMode then - Result := False - else - if not IsBaseStyle then - Result := ParentStyle.Shadow - else - if not InternalGetShadow(Result) then - Result := DefaultShadow; -end; - -function TcxContainerStyle.GetTransparentBorder: Boolean; -begin - if DirectAccessMode then - Result := True - else - if not IsBaseStyle then - Result := ParentStyle.TransparentBorder - else - if not InternalGetTransparentBorder(Result) then - Result := DefaultTransparentBorder; -end; - -function TcxContainerStyle.InternalGetBorderColor(var BorderColor: TColor): Boolean; -begin - Result := csvBorderColor in FAssignedValues; - if Result then - BorderColor := FBorderColor - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[State].InternalGetBorderColor(BorderColor); -end; - -function TcxContainerStyle.InternalGetBorderStyle( - var BorderStyle: TcxContainerBorderStyle): Boolean; -begin - Result := csvBorderStyle in FAssignedValues; - if Result then - BorderStyle := FBorderStyle - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[State].InternalGetBorderStyle(BorderStyle); -end; - -function TcxContainerStyle.InternalGetEdges(var Edges: TcxBorders): Boolean; -begin - Result := csvEdges in FAssignedValues; - if Result then - Edges := FEdges - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[State].InternalGetEdges(Edges); -end; - -function TcxContainerStyle.InternalGetFont(var Font: TFont): Boolean; -begin - Result := csvFont in FAssignedValues; - if Result then - Font := StyleData.Font - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[State].InternalGetFont(Font); -end; - -function TcxContainerStyle.InternalGetHotTrack(var HotTrack: Boolean): Boolean; -begin - Result := csvHotTrack in FAssignedValues; - if Result then - HotTrack := FHotTrack - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[State].InternalGetHotTrack(HotTrack); -end; - -function TcxContainerStyle.InternalGetShadow(var Shadow: Boolean): Boolean; -begin - Result := csvShadow in FAssignedValues; - if Result then - Shadow := FShadow - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[State].InternalGetShadow(Shadow); -end; - -function TcxContainerStyle.InternalGetTextColor(var TextColor: TColor): Boolean; -begin - Result := csvTextColor in FAssignedValues; - if Result then - TextColor := StyleData.FontColor - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[State].InternalGetTextColor(TextColor); -end; - -function TcxContainerStyle.InternalGetTextStyle(var TextStyle: TFontStyles): Boolean; -begin - Result := csvTextStyle in FAssignedValues; - if Result then - TextStyle := FTextStyle - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[State].InternalGetTextStyle(TextStyle); -end; - -function TcxContainerStyle.InternalGetTransparentBorder( - var TransparentBorder: Boolean): Boolean; -begin - Result := csvTransparentBorder in FAssignedValues; - if Result then - TransparentBorder := FTransparentBorder - else - if ActiveStyleController <> nil then - Result := ActiveStyleController.Styles[State].InternalGetTransparentBorder(TransparentBorder); -end; - -function TcxContainerStyle.IsBorderColorStored: Boolean; -begin - Result := (csvBorderColor in FAssignedValues) and ((Container = nil) or - Container.IsStylePropertyPublished('BorderColor', State <> csNormal)); -end; - -function TcxContainerStyle.IsBorderStyleStored: Boolean; -begin - Result := (csvBorderStyle in FAssignedValues) and ((Container = nil) or - Container.IsStylePropertyPublished('BorderStyle', State <> csNormal)); -end; - -function TcxContainerStyle.IsColorStored: Boolean; -begin - Result := (csvColor in FAssignedValues) and ((Container = nil) or - Container.IsStylePropertyPublished('Color', State <> csNormal)); -end; - -function TcxContainerStyle.IsEdgesStored: Boolean; -begin - Result := (csvEdges in FAssignedValues) and ((Container = nil) or - Container.IsStylePropertyPublished('Edges', State <> csNormal)); -end; - -function TcxContainerStyle.IsFontStored: Boolean; -begin - Result := (csvFont in FAssignedValues) and ((Container = nil) or - Container.IsStylePropertyPublished('Font', State <> csNormal)); -end; - -function TcxContainerStyle.IsHotTrackStored: Boolean; -begin - Result := (csvHotTrack in FAssignedValues) and ((Container = nil) or - Container.IsStylePropertyPublished('HotTrack', State <> csNormal)); -end; - -function TcxContainerStyle.IsShadowStored: Boolean; -begin - Result := (csvShadow in FAssignedValues) and ((Container = nil) or - Container.IsStylePropertyPublished('Shadow', State <> csNormal)); -end; - -function TcxContainerStyle.IsStyleControllerStored: Boolean; -begin - Result := (State = csNormal); -end; - -function TcxContainerStyle.IsTextColorStored: Boolean; -begin - Result := (csvTextColor in FAssignedValues) and ((Container = nil) or - Container.IsStylePropertyPublished('TextColor', State <> csNormal)); -end; - -function TcxContainerStyle.IsTextStyleStored: Boolean; -begin - Result := (csvTextStyle in FAssignedValues) and ((Container = nil) or - Container.IsStylePropertyPublished('TextStyle', State <> csNormal)); -end; - -function TcxContainerStyle.IsTransparentBorderStored: Boolean; -begin - Result := (csvTransparentBorder in FAssignedValues) and ((Container = nil) or - Container.IsStylePropertyPublished('TransparentBorder', State <> csNormal)); -end; - -procedure TcxContainerStyle.SetAssignedValues(Value: TcxContainerStyleValues); -begin - if FAssignedValues <> Value then - begin - FAssignedValues := Value; - if IsBaseStyle then - UpdateFont; - Changed; - end; -end; - -procedure TcxContainerStyle.SetBorderColor(Value: TColor); -begin - if (csvBorderColor in FAssignedValues) and (Value = FBorderColor) then - Exit; - FBorderColor := Value; - Include(FAssignedValues, csvBorderColor); - Changed; -end; - -procedure TcxContainerStyle.SetBorderStyle(Value: TcxContainerBorderStyle); -begin - if (csvBorderStyle in FAssignedValues) and (Value = FBorderStyle) then - Exit; - FBorderStyle := Value; - Include(FAssignedValues, csvBorderStyle); - Changed; -end; - -procedure TcxContainerStyle.SetColor(Value: TColor); -begin - if (csvColor in FAssignedValues) and (Value = StyleData.Color) then - Exit; - StyleData.Color := Value; - Include(FAssignedValues, csvColor); - Changed; -end; - -procedure TcxContainerStyle.SetEdges(Value: TcxBorders); -begin - if not IsBaseStyle then - ParentStyle.Edges := Value - else - begin - if (csvEdges in FAssignedValues) and (Value = FEdges) then - Exit; - FEdges := Value; - Include(FAssignedValues, csvEdges); - Changed; - end; -end; - -procedure TcxContainerStyle.SetFont(Value: TFont); -begin - if DirectAccessMode then - StyleData.Font := Value - else - if not IsBaseStyle then - ParentStyle.Font := Value - else - begin - StyleData.Font.Assign(Value); - Include(FAssignedValues, csvFont); - Changed; - end; -end; - -procedure TcxContainerStyle.SetHotTrack(Value: Boolean); -begin - if not IsBaseStyle then - ParentStyle.HotTrack := Value - else - begin - if (csvHotTrack in FAssignedValues) and (Value = FHotTrack) then - Exit; - FHotTrack := Value; - Include(FAssignedValues, csvHotTrack); - Changed; - end; -end; - -procedure TcxContainerStyle.SetShadow(Value: Boolean); -begin - if not IsBaseStyle then - ParentStyle.Shadow := Value - else - begin - if (csvShadow in FAssignedValues) and (Value = FShadow) then - Exit; - FShadow := Value; - Include(FAssignedValues, csvShadow); - Changed; - end; -end; - -procedure TcxContainerStyle.SetTextColor(Value: TColor); -begin - if (csvTextColor in FAssignedValues) and (Value = TextColor) then - Exit; - StyleData.FontColor := Value; - Include(FAssignedValues, csvTextColor); - Changed; -end; - -procedure TcxContainerStyle.SetTextStyle(Value: TFontStyles); -begin - if (csvTextStyle in FAssignedValues) and (Value = TextStyle) then - Exit; - FTextStyle := Value; - Include(FAssignedValues, csvTextStyle); - Changed; -end; - -procedure TcxContainerStyle.SetTransparentBorder(Value: Boolean); -begin - if not IsBaseStyle then - ParentStyle.TransparentBorder := Value - else - begin - if (csvTransparentBorder in FAssignedValues) and (Value = FTransparentBorder) then - Exit; - FTransparentBorder := Value; - Include(FAssignedValues, csvTransparentBorder); - Changed; - end; -end; - -procedure TcxContainerStyle.CheckChanges; -begin - if FModified and (FUpdateCount = 0) then - begin - FModified := False; - if not IsDestroying and not DirectAccessMode and Assigned(FOnChanged) then - FOnChanged(Self); - end; -end; - -procedure TcxContainerStyle.CreateFont; -begin - if not DirectAccessMode and IsBaseStyle then - begin - StyleData.Font := TFont.Create; - StyleData.Font.OnChange := FontChanged; - end - else - StyleData.Font := nil; -end; - -function TcxContainerStyle.GetActiveStyleController: TcxStyleController; -begin - if IsBaseStyle then - Result := FStyleController - else - Result := ParentStyle.FStyleController; -end; - -function TcxContainerStyle.GetBaseStyle: TcxContainerStyle; -begin - if IsBaseStyle then - Result := Self - else - Result := ParentStyle; -end; - -function TcxContainerStyle.GetContainer: TcxContainer; -begin - if FOwner is TcxContainer then - Result := TcxContainer(FOwner) - else - Result := nil; -end; - -function TcxContainerStyle.GetLookAndFeel: TcxLookAndFeel; -begin - if IsBaseStyle then - Result := FLookAndFeel - else - Result := ParentStyle.LookAndFeel; -end; - -procedure TcxContainerStyle.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - Changed; -end; - -procedure TcxContainerStyle.ReadIsFontAssigned(Reader: TReader); -begin - Reader.ReadBoolean; - AssignedValues := AssignedValues + [csvFont]; -end; - -procedure TcxContainerStyle.RestoreFont(AFont: TFont); -var - ATempFont: TFont; -begin - ATempFont := TFont.Create; - try - AFont.Assign(ATempFont); - finally - ATempFont.Free; - end; -end; - -procedure TcxContainerStyle.SetLookAndFeel(Value: TcxLookAndFeel); -begin - if IsBaseStyle then - FLookAndFeel.Assign(Value) - else - ParentStyle.LookAndFeel := Value; -end; - -procedure TcxContainerStyle.UpdateVisibleFont; -begin - FVisibleFont.Assign(Font); - FVisibleFont.Color := TextColor; - FVisibleFont.Style := TextStyle; -end; - -procedure TcxContainerStyle.WriteIsFontAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(True); -end; - -{ TcxContainer } - -constructor TcxContainer.Create(AOwner: TComponent); -var - AColor: TColor; -begin - inherited Create(AOwner); - FIsCreating := True; - - FSizeGripData.Visible := False; - - FStyles := GetStylesClass.Create(Self, GetStyleClass); - FStyles.OnChanged := ContainerStyleChanged; - - FActiveStyleData.ContainerState := [csNormal]; - FActiveStyleData.ActiveStyle := FStyles.Style; - - FViewInfo := GetViewInfoClass.Create; - LookAndFeel.MasterLookAndFeel := FStyles.Style.LookAndFeel; - - ControlStyle := ControlStyle + [csSetCaption, csCaptureMouse]; - TabStop := True; - ParentColor := DefaultParentColor and not IsInplace and - not Style.InternalGetColor(AColor); - if not ParentColor then - Color := clWindow; - ClearSavedChildControlRegions; - - FIsCreating := False; -end; - -destructor TcxContainer.Destroy; -begin - cxControls.EndMouseTracking(Self); - FreeAndNil(FViewInfo); - FStyles.OnChanged := nil; - FreeAndNil(FStyles); - inherited Destroy; -end; - -function TcxContainer.Focused: Boolean; -begin - if IsDesigning or (csDestroyingHandle in ControlState) then - Result := False - else - begin - Result := inherited Focused; - Result := Result or (InnerControl <> nil) and - InnerControl.Focused; - end; -end; - -function TcxContainer.GetDragImages: TDragImageList; -begin - if InnerControl = nil then - Result := inherited GetDragImages - else - Result := TWinControlAccess(InnerControl).GetDragImages; -end; - -procedure TcxContainer.GetTabOrderList(List: TList); -var - AActiveControl: TWinControl; -begin - if IsContainerClass then - inherited GetTabOrderList(List) - else - begin - AActiveControl := GetParentForm(Self).ActiveControl; - if (AActiveControl <> Self) and CanFocus and (InnerControl <> nil) and - (InnerControl = AActiveControl) then - begin - List.Add(InnerControl); - List.Remove(Self); - end; - end; -end; - -procedure TcxContainer.SetFocus; -var - AParentForm: TCustomForm; -begin - if IsDesigning or IsContainerFocused then - Exit; - inherited SetFocus; - if (InnerControl <> nil) and InnerControl.HandleAllocated and (GetFocus = Handle) then - begin - AParentForm := GetParentForm(Self); - SafeSelectionFocusInnerControl; - AParentForm.FocusControl(InnerControl); - end; -end; - -procedure TcxContainer.ClearSavedChildControlRegions; -begin - FInnerControlBounds.IsEmpty := True; -end; - -function TcxContainer.GetVisibleBounds: TRect; -var - ABorderWidth, ABorderMaskedPartWidth: Integer; -begin - Result := GetControlRect(Self); - if IsInplace then - Exit; - try - if ViewInfo.Shadow then - begin - Dec(Result.Right, cxContainerShadowWidth); - Dec(Result.Bottom, cxContainerShadowWidth); - end; - - if not Style.HasBorder then - begin - if Style.TransparentBorder then - InflateRect(Result, -cxContainerMaxBorderWidth, -cxContainerMaxBorderWidth); - Exit; - end; - if ViewInfo.NativeStyle then - begin - if Style.TransparentBorder and (Style.BorderStyle = cbsNone) then - InflateRect(Result, -cxContainerMaxBorderWidth, -cxContainerMaxBorderWidth); - Exit; - end; - if not Style.TransparentBorder then - Exit; - - ABorderWidth := GetContainerBorderWidth(ViewInfo.BorderStyle); - ABorderMaskedPartWidth := cxContainerMaxBorderWidth - ABorderWidth; - InflateRect(Result, -ABorderMaskedPartWidth, -ABorderMaskedPartWidth); - InflateRectByBorders(Result, ABorderWidth, ViewInfo.Edges); - finally - if Result.Top > Result.Bottom then - Result := Rect(Result.Left, 0, Result.Right, 0); - end; -end; - -function TcxContainer.HasPopupWindow: Boolean; -begin - Result := False; -end; - -function TcxContainer.InnerControlDefaultHandler(var Message: TMessage): Boolean; -begin - Result := (InnerControl <> nil) and not(csDestroying in ComponentState) and - DoInnerControlDefaultHandler(Message); -end; - -function TcxContainer.InnerControlMenuHandler(var Message: TMessage): Boolean; -begin - case Message.Msg of - CN_KEYDOWN, CN_SYSKEYDOWN: - begin - Result := IsMenuKey(TWMKey(Message)); - if Result then - Message.Result := 1; - end; - - {$IFDEF DELPHI12} - WM_CONTEXTMENU: - begin - SetFocus; - with Message do - Result := Perform(Msg, Handle, LParam); - Result := Message.Result <> 0; - end; - {$ENDIF} - - else - Result := False; - end; -end; - -procedure TcxContainer.Invalidate; -begin - inherited Invalidate; - if InnerControl <> nil then - InnerControl.Invalidate; -end; - -function TcxContainer.IsInplace: Boolean; -begin - Result := False; -end; - -function TcxContainer.IsStylePropertyPublished(const APropertyName: string; - AExtendedStyle: Boolean): Boolean; -var - AStyleValue: TcxContainerStyleValue; -begin - if AExtendedStyle then - Result := Style.IsExtendedStylePropertyPublished(APropertyName) - else - Result := True; - if Result and Style.GetStyleValue(APropertyName, AStyleValue) then - Result := not(AStyleValue in InternalGetNotPublishedStyleValues); -end; - -procedure TcxContainer.LockAlignControls(ALock: Boolean); -begin - if ALock then - Inc(FLockAlignControlsCount) - else - if FLockAlignControlsCount > 0 then - Dec(FLockAlignControlsCount); -end; - -procedure TcxContainer.LockPopupMenu(ALock: Boolean); -begin - if ALock then - Inc(FPopupMenuLockCount) - else - if FPopupMenuLockCount > 0 then - Dec(FPopupMenuLockCount); -end; - -procedure TcxContainer.RestoreStyles; -begin - FStyles.RestoreDefaults; -end; - -procedure TcxContainer.SetScrollBarsParameters(AIsScrolling: Boolean = False); - - procedure SetScrollBarParameters(AScrollBar: TcxScrollBar); - const - ABarFlags: array [TScrollBarKind] of Integer = (SB_HORZ, SB_VERT); - var - AScrollInfo: TScrollInfo; - begin - if not AIsScrolling then - AdjustScrollBarPosition(AScrollBar); - if not AScrollBar.Visible then - Exit; - - AScrollInfo.cbSize := SizeOf(AScrollInfo); - AScrollInfo.fMask := SIF_ALL; - GetScrollInfo(FInnerControl.Handle, ABarFlags[AScrollBar.Kind], AScrollInfo); - with AScrollInfo do - begin - if Integer(nPage) > nMax then - Integer(nPage) := nMax; - AScrollBar.SetScrollParams(nMin, nMax, nPos, nPage, True); - end; - end; - - procedure GetSizeGripData(out ASizeGripData: TcxContainerSizeGripData); - var - AIContainerInnerControl: IcxContainerInnerControl; - begin - ASizeGripData.Visible := HScrollBar.Visible and VScrollBar.Visible and - (InnerControl <> nil) and InnerControl.HandleAllocated and - Supports(InnerControl, IcxContainerInnerControl, AIContainerInnerControl); - if ASizeGripData.Visible then - ASizeGripData.Bounds := GetSizeGripRect(AIContainerInnerControl); - end; - - function NeedsRepaintSizeGrip( - const APrevSizeGripData, ASizeGripData: TcxContainerSizeGripData): Boolean; - begin - Result := not APrevSizeGripData.Visible and ASizeGripData.Visible or - APrevSizeGripData.Visible and ASizeGripData.Visible and - not EqualRect(APrevSizeGripData.Bounds, ASizeGripData.Bounds); - end; - - procedure RepaintSizeGrip(const ASizeGripRect: TRect); - var - ARgn: HRGN; - begin - ARgn := CreateRectRgnIndirect(ASizeGripRect); - SendMessage(InnerControl.Handle, WM_NCPAINT, ARgn, 0); - DeleteObject(ARgn); - end; - -var - ASizeGripData: TcxContainerSizeGripData; -begin -{$IFDEF USETCXSCROLLBAR} - if (FInnerControl = nil) or not NeedsScrollBars or IsDestroying or not UsecxScrollBars then - Exit; - FScrollBarsCalculating := True; - try - SetScrollBarParameters(HScrollBar); - SetScrollBarParameters(VScrollBar); - GetSizeGripData(ASizeGripData); - if NeedsRepaintSizeGrip(FSizeGripData, ASizeGripData) then - RepaintSizeGrip(ASizeGripData.Bounds); - FSizeGripData := ASizeGripData; - finally - FScrollBarsCalculating := False; - end; -{$ENDIF} -end; - -function TcxContainer.ShortRefreshContainer(AIsMouseEvent: Boolean): Boolean; -var - ACursorPos: TPoint; - AWindowFromPoint: THandle; -begin - AWindowFromPoint := WindowFromPoint(InternalGetCursorPos); - if HandleAllocated and IsChildEx(Handle, AWindowFromPoint) then - ACursorPos := ScreenToClient(InternalGetCursorPos) - else - ACursorPos := cxInvalidPoint; - Result := RefreshContainer(ACursorPos, cxmbNone, InternalGetShiftState, AIsMouseEvent); -end; - -procedure TcxContainer.Update; -begin - inherited Update; - if InnerControl <> nil then - InnerControl.Update; -end; - -procedure TcxContainer.TranslationChanged; -begin - inherited; - ShortRefreshContainer(False); -end; - -procedure TcxContainer.UpdateScrollBarsParameters; -begin - if not IsDestroying and HandleAllocated and (InnerControl <> nil) then - PostMessage(Handle, CM_UPDATESCROLLBARS, 0, 0); -end; - -procedure TcxContainer.MouseTrackingCallerMouseLeave; -begin - EndMouseTracking; -end; - -function TcxContainer.GetLookAndFeelValue: TcxLookAndFeel; -begin - Result := Style.LookAndFeel; -end; - -procedure TcxContainer.AdjustClientRect(var Rect: TRect); -begin - if not IsDestroying then - Rect := ViewInfo.ClientRect; -end; - -procedure TcxContainer.AlignControls(AControl: TControl; var Rect: TRect); -var - AInnerControlBounds: TcxContainerInnerControlBounds; -begin - if IsContainerClass then - begin - inherited AlignControls(AControl, Rect); - Exit; - end; - - if IsAlignControlsLocked or IsInternalControl(AControl) then // ??? !!! - Exit; - if AControl = nil then - inherited AlignControls(AControl, Rect); - if FIsCreating or (AControl = nil) then - Exit; - if (AControl is TWinControl) and TWinControl(AControl).HandleAllocated then - begin - AInnerControlBounds := GetInnerControlBounds(Rect, AControl); - if IsInnerControlBoundsChanged(TWinControl(AControl), AInnerControlBounds) then - begin - SetWindowRegion(TWinControl(AControl), AInnerControlBounds); - SaveInnerControlBounds(TWinControl(AControl), AInnerControlBounds); - end; - end; -end; - -function TcxContainer.AllowAutoDragAndDropAtDesignTime(X, Y: Integer; - Shift: TShiftState): Boolean; -begin - Result := False; -end; - -function TcxContainer.CanFocusOnClick: Boolean; -begin - Result := inherited CanFocusOnClick and not((FInnerControl <> nil) and - FInnerControl.HandleAllocated and FInnerControl.Focused or - InnerControlMouseDown); -end; - -procedure TcxContainer.ChangeScale(M, D: Integer); - - function NeedFontScaling: Boolean; - begin - Result := (M <> D) and Style.IsValueAssigned(csvFont) and - (not IsLoading or (sfFont in ScalingFlags)); - end; - -var - ANeedFontScaling: Boolean; -begin - ANeedFontScaling := NeedFontScaling; - - FInternalSetting := not ParentFont; - try - inherited ChangeScale(M, D); - finally - FInternalSetting := False; - end; - - if ANeedFontScaling then - if csvFont in Style.AssignedValues then - Style.Font.Size := MulDiv(Style.Font.Size, M, D) - else - if IsLoading then - Style.ActiveStyleController.ChangeFontScale(M, D); -end; - -procedure TcxContainer.ColorChanged; -begin - if not FInternalSetting then - FStyles.Style.Color := Color - else - begin - inherited ColorChanged; - ShortRefreshContainer(False); - end; -end; - -procedure TcxContainer.CursorChanged; -begin - inherited CursorChanged; - if FInnerControl <> nil then - begin - FInnerControl.Cursor := Cursor; - end; -end; - -procedure TcxContainer.DoContextPopup(MousePos: TPoint; - var Handled: Boolean); -begin - if not IsPopupMenuLocked and ((MousePos.X = -1) and (MousePos.Y = -1) or - CanShowPopupMenu(MousePos)) then - inherited DoContextPopup(MousePos, Handled) - else - Handled := True; -end; - -procedure TcxContainer.DragCanceled; -begin - inherited DragCanceled; - if InnerControl <> nil then - TWinControlAccess(InnerControl).DragCanceled; -end; - -procedure TcxContainer.FocusChanged; -begin - inherited FocusChanged; - ShortRefreshContainer(False); -end; - -function TcxContainer.FocusWhenChildIsClicked(AChild: TControl): Boolean; -begin - Result := False; -end; - -function TcxContainer.GetClientBounds: TRect; -begin - Result := ViewInfo.ClientRect; -end; - -function TcxContainer.IsContainerFocused: Boolean; -begin - Result := Focused; -end; - -procedure TcxContainer.KeyDown(var Key: Word; Shift: TShiftState); -var - AParentForm: TCustomForm; -begin - inherited KeyDown(Key, Shift); - case Key of - VK_TAB: - if Focused and (Shift * [ssAlt, ssCtrl] = []) and CanContainerHandleTabs then - begin - Key := 0; - AParentForm := GetParentForm(Self); - TWinControlAccess(AParentForm).SelectNext(AParentForm.ActiveControl, - not(ssShift in Shift), True); - if HandleAllocated and (InnerControl <> nil) then - if GetFocus = Handle then - InnerControl.SetFocus; - end; - end; -end; - -procedure TcxContainer.Loaded; -begin - inherited Loaded; - SetSize; - ContainerStyleChanged(FStyles.Style); -end; - -function TcxContainer.MayFocus: Boolean; -begin - Result := not((InnerControl <> nil) and InnerControl.Focused); -end; - -procedure TcxContainer.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if IsMouseTracking then - begin - FShiftState := Shift; - RefreshContainer(Point(X, Y), ButtonTocxButton(Button), FShiftState, True); - end; -end; - -procedure TcxContainer.MouseEnter(AControl: TControl); -begin - inherited MouseEnter(AControl); - ShortRefreshContainer(True); - BeginMouseTracking(Self, Bounds, Self); -end; - -procedure TcxContainer.MouseLeave(AControl: TControl); -begin - inherited MouseLeave(AControl); - FShiftState := []; - ShortRefreshContainer(True); - cxControls.EndMouseTracking(Self); -end; - -procedure TcxContainer.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - RefreshContainer(Point(X, Y), cxmbNone, Shift, True); - BeginMouseTracking(Self, Bounds, Self); -end; - -procedure TcxContainer.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - FShiftState := Shift; - RefreshContainer(Point(X, Y), ButtonTocxButton(Button), FShiftState, True); -end; - -function TcxContainer.NeedsScrollBars: Boolean; -begin - Result := False; -end; - -procedure TcxContainer.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = InnerControl) then - InnerControl := nil; -end; - -procedure TcxContainer.DrawBordersBackgroundByPainter(ACanvas: TcxCanvas; - APainter: TcxCustomLookAndFeelPainterClass); -var - R: TRect; -begin - if (APainter <> nil) and (ViewInfo.BorderStyle <> cbsNone) then - begin - ACanvas.SaveClipRegion; - try - R := ViewInfo.BorderRect; - InflateRect(R, 1, 1); - ACanvas.ExcludeClipRect(R); - cxDrawTransparentControlBackground(Self, ACanvas, ViewInfo.Bounds, False); - finally - ACanvas.RestoreClipRegion; - end; - end; -end; - -procedure TcxContainer.Paint; -begin - if RectVisible(Canvas.Handle, ViewInfo.Bounds) then - begin - if csPaintCopy in ControlState then - SetVisibleBoundsClipRect; - CheckIsViewInfoCalculated; - DrawBordersBackgroundByPainter(Canvas, ViewInfo.Painter); - ViewInfo.Paint(Canvas); - end; -end; - -procedure TcxContainer.Resize; -begin - inherited Resize; - ShortRefreshContainer(False); -end; - -procedure TcxContainer.SetDragMode(Value: TDragMode); -begin - inherited SetDragMode(Value); - if InnerControl <> nil then - TWinControlAccess(InnerControl).DragMode := Value; -end; - -procedure TcxContainer.CreateHandle; -begin - inherited CreateHandle; - - if (InnerControl <> nil) and CanAllocateHandle(InnerControl) then - InnerControl.HandleNeeded; - ShortRefreshContainer(False); -end; - -procedure TcxContainer.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params.WindowClass do - style := style and not(CS_HREDRAW or CS_VREDRAW); -end; - -procedure TcxContainer.CreateWindowHandle(const Params: TCreateParams); -var - AParams: TCreateParams; -begin - if Length(Params.Caption) > $FFFF then - begin - AParams := Params; - AParams.Caption := ''; - inherited CreateWindowHandle(AParams); - if HandleAllocated then - CallWindowProc(DefWndProc, Handle, WM_SETTEXT, 0, Integer(WindowText)); - end - else - inherited CreateWindowHandle(Params); -end; - -procedure TcxContainer.WndProc(var Message: TMessage); -begin - case Message.Msg of - WM_CHAR, WM_KEYDOWN, WM_KEYUP, CN_CHAR, CN_KEYDOWN, CN_KEYUP: - if InnerControl <> nil then - begin - with TMessage(Message) do - Result := SendMessage(InnerControl.Handle, Msg, WParam, LParam); - Exit; - end; - WM_SETFOCUS: - if not Visible then - Exit; - WM_LBUTTONDOWN, WM_LBUTTONDBLCLK: - if (DragMode = dmAutomatic) and not IsDesigning then - begin - BeginAutoDrag; - Exit; - end; - WM_PAINT: - begin - if OnGlass and IsCompositionEnabled then - begin - WMPaintWindowOnGlass(Handle); - Message.Result := 0; - end - else - inherited WndProc(Message); - end; - CN_CTLCOLOREDIT, CN_CTLCOLORSTATIC: - begin - inherited WndProc(Message); - if not FRepaintOnGlass and OnGlass and - IsCompositionEnabled then - begin - FRepaintOnGlass := True; - PostMessage(Handle, CM_BUFFEREDPAINTONGLASS, 0, 0); - end; - end; - CM_BUFFEREDPAINTONGLASS: - if FRepaintOnGlass then - begin - RepaintWindowOnGlass(Handle); - FRepaintOnGlass := False; - end; - WM_NCCALCSIZE: - if FRefreshLockCount > 0 then - begin - Message.Result := 0; - Exit; - end; - end; - inherited WndProc(Message); -end; - -procedure TcxContainer.AdjustInnerControl; -begin - if FInnerControl <> nil then - with TWinControlAccess(FInnerControl) do - begin - Color := ViewInfo.BackgroundColor; - AssignFonts(Font, GetVisibleFont); - end; -end; - -procedure TcxContainer.CalculateViewInfo(const P: TPoint; AMouseTracking: Boolean); - - function GetContainerState: TcxContainerState; - begin - if Enabled then - if IsDesigning then - Result := [csNormal] - else - begin - if Focused then - Result := [csActive] - else - Result := [csNormal]; - if PtInRect(GetVisibleBounds, P) and AMouseTracking then - Include(Result, csHotTrack); - end - else - Result := [csDisabled]; - end; - - procedure CalculateContainerState; - var - ASelected: Boolean; - begin - ViewInfo.ContainerState := GetContainerState; - - ASelected := ViewInfo.ContainerState * [csActive, csHotTrack] <> []; - if not ActiveStyle.HotTrack then - ViewInfo.HotState := chsNoHotTrack - else - if ASelected then - ViewInfo.HotState := chsSelected - else - ViewInfo.HotState := chsNormal; - - if ViewInfo.NativeStyle then - ViewInfo.BorderStyle := Style.BorderStyle - else - begin - ViewInfo.BorderStyle := ActiveStyle.BorderStyle; - if ViewInfo.BorderStyle in [cbsUltraFlat, cbsOffice11] then - ViewInfo.BorderStyle := cbsSingle; - end; - end; - -var - APrevBorderWidth: Integer; -begin - ViewInfo.NativeStyle := IsNativeStyle; - ViewInfo.Painter := Style.LookAndFeel.SkinPainter; - - APrevBorderWidth := GetContainerBorderWidth(ViewInfo.BorderStyle); - CalculateContainerState; - if not ViewInfo.NativeStyle and - (GetContainerBorderWidth(ViewInfo.BorderStyle) < APrevBorderWidth) then - CalculateContainerState; - - if ViewInfo.NativeStyle then - begin - ViewInfo.ThemedObjectType := GetBackgroundThemedObjectType; - ViewInfo.NativePart := GetBackgroundNativePart; - ViewInfo.NativeState := GetBackgroundNativeState; - end; - - ViewInfo.Bounds := GetControlRect(Self); - ViewInfo.BorderRect := ViewInfo.Bounds; - with ViewInfo do - ExtendRect(BorderRect, GetBorderExtent); - ViewInfo.ClientRect := ViewInfo.BorderRect; - if ViewInfo.Painter <> nil then - ViewInfo.BorderWidth := 1 - else - ViewInfo.BorderWidth := GetContainerBorderWidth(ViewInfo.BorderStyle); - ViewInfo.Edges := ActiveStyle.Edges; - ViewInfo.Shadow := HasShadow; - ViewInfo.BorderColor := GetBorderColor; - ViewInfo.BackgroundColor := GetBackgroundColor; -end; - -function TcxContainer.CanContainerHandleTabs: Boolean; -begin - Result := True; -end; - -function TcxContainer.CanHaveTransparentBorder: Boolean; -begin - Result := not (ViewInfo.NativeStyle and (ViewInfo.BorderStyle <> cbsNone)); -end; - -function TcxContainer.CanRefreshContainer: Boolean; -begin - Result := (FRefreshLockCount = 0) and - not FIsCreating and not IsDestroying and - not (csDestroyingHandle in ControlState) and HandleAllocated; -end; - -function TcxContainer.CanShowPopupMenu(const P: TPoint): Boolean; -begin - Result := True;//PtInRect(ViewInfo.ClientRect, P); -end; - -procedure TcxContainer.CheckIsViewInfoCalculated; -begin - if not IsViewInfoCalculated then - ShortRefreshContainer(False); -end; - -procedure TcxContainer.ContainerStyleChanged(Sender: TObject); -begin - if FIsCreating or IsLoading then - Exit; - ShortRefreshContainer(False); - - if not ParentColor or (csvColor in Style.AssignedValues) then - begin - FInternalSetting := True; - try - Color := Style.GetStyleColor; - finally - FInternalSetting := False; - end; - end; - - FInternalSetting := True; - try - Font := Style.Font; - finally - FInternalSetting := False; - end; - - if Style.IsValueAssigned(csvFont) then - ParentFont := False; -end; - -procedure TcxContainer.DataChange; -begin -end; - -procedure TcxContainer.DataSetChange; -begin - ShortRefreshContainer(False); -end; - -function TcxContainer.DefaultParentColor: Boolean; -begin - Result := False; -end; - -function TcxContainer.DoInnerControlDefaultHandler(var Message: TMessage): Boolean; - - procedure DoBufferedPaint(DC: HDC; Rect: TRect); - var - MemDC: HDC; - PaintBuffer: THandle;//HPAINTBUFFER; - begin - PaintBuffer := BeginBufferedPaint(DC, @Rect, BPBF_TOPDOWNDIB, nil, MemDC); - try - SendMessage(InnerControl.Handle, WM_PRINTCLIENT, MemDC, PRF_CLIENT); - BufferedPaintSetAlpha(PaintBuffer, @Rect, 255); - finally - EndBufferedPaint(PaintBuffer, True); - end; - end; - - procedure BufferedPaintOnGlass; - var - DC: HDC; - begin - DC := GetDC(InnerControl.Handle); - try - DoBufferedPaint(DC, InnerControl.ClientRect); - finally - ReleaseDC(InnerControl.Handle, DC); - end; - end; - -begin - Result := False; - case Message.Msg of - WM_CONTEXTMENU: - begin - with Message do - Result := Perform(Msg, WParam, LParam); - Result := Message.Result <> 0; - end; - CN_CTLCOLOREDIT: - if OnGlass and IsCompositionEnabled and not FInnerControlBufferedPaint then - begin - FInnerControlBufferedPaint := True; - PostMessage(InnerControl.Handle, CM_BUFFEREDPAINTONGLASS, 0, 0); - end; - CM_BUFFEREDPAINTONGLASS: - if FInnerControlBufferedPaint then - try - BufferedPaintOnGlass; - finally - FInnerControlBufferedPaint := False; - end; - end; -end; - -function TcxContainer.DoRefreshContainer(const P: TPoint; - Button: TcxMouseButton; Shift: TShiftState; AIsMouseEvent: Boolean): Boolean; -begin - CalculateViewInfo(P, (Shift = []) and ActiveStyle.HotTrack); - SetSize; - AdjustInnerControl; - SetShadowRegion; - if FInnerControl = nil then - InvalidateRect(GetControlRect(Self), False) - else - InternalInvalidate(Handle, GetControlRect(Self), ViewInfo.BorderRect, False); - - if csHotTrack in ViewInfo.ContainerState then - BeginMouseTracking(Self, Bounds, Self); - Result := True; -end; - -procedure TcxContainer.EnabledChanged; -var - I: Integer; -begin - for I := 0 to ControlCount - 1 do - if Controls[I] is TcxScrollBar then - TcxScrollBar(Controls[I]).Enabled := Enabled; - ShortRefreshContainer(False); -end; - -procedure TcxContainer.EndMouseTracking; -begin - MouseLeave(nil); - cxControls.EndMouseTracking(Self); -end; - -function TcxContainer.GetActiveStyle: TcxContainerStyle; -begin - if FActiveStyleData.ContainerState = ViewInfo.ContainerState then - Result := FActiveStyleData.ActiveStyle - else - begin - FActiveStyleData.ContainerState := ViewInfo.ContainerState; - FActiveStyleData.ActiveStyle := InternalGetActiveStyle; - Result := FActiveStyleData.ActiveStyle; - end; -end; - -function TcxContainer.GetBackgroundColor: TColor; -var - AColor: COLORREF; - ATextColor: TColor; -begin - GetColorSettingsByPainter(Result, ATextColor); - if Result = clDefault then - begin - Result := ActiveStyle.Color; - if ViewInfo.NativeStyle and not (Enabled or ActiveStyle.IsValueAssigned(csvColor)) then - begin - GetThemeColor(OpenTheme(ViewInfo.ThemedObjectType), - ViewInfo.NativePart, ViewInfo.NativeState, TMT_FILLCOLOR, AColor); - Result := AColor; - end; - end; -end; - -function TcxContainer.GetBorderColor: TColor; -var - AIsHighlightBorder: Boolean; -begin - AIsHighlightBorder := (csActive in ViewInfo.ContainerState) or - (csHotTrack in ViewInfo.ContainerState) and ActiveStyle.HotTrack or - IsDesigning and Enabled; - - if Style.LookAndFeel.SkinPainter <> nil then - Result := Style.LookAndFeel.SkinPainter.GetContainerBorderColor(AIsHighlightBorder) - else - if not (ActiveStyle.BorderStyle in [cbsUltraFlat, cbsOffice11]) then - Result := ActiveStyle.BorderColor - else - if not AIsHighlightBorder then - Result := clBtnShadow - else - if ActiveStyle.BorderStyle = cbsOffice11 then - Result := dxOffice11SelectedBorderColor - else - Result := clHighlight; -end; - -function TcxContainer.GetBorderExtent: TRect; -var - ABorderWidth: Integer; - ANativeStyle: Boolean; -begin - ANativeStyle := IsNativeStyle; - if ActiveStyle.TransparentBorder and (Style.LookAndFeel.SkinPainter = nil) then - Result := cxContainerDefaultBorderExtent - else - if not ActiveStyle.HasBorder or ANativeStyle and (Style.BorderStyle = cbsNone) then - Result := cxEmptyRect - else - if ANativeStyle then - Result := cxContainerDefaultBorderExtent - else - begin - ABorderWidth := GetContainerBorderWidth(ViewInfo.BorderStyle); - Result := cxEmptyRect; - if bLeft in ActiveStyle.Edges then - Result.Left := ABorderWidth; - if bTop in ActiveStyle.Edges then - Result.Top := ABorderWidth; - if bRight in ActiveStyle.Edges then - Result.Right := ABorderWidth; - if bBottom in ActiveStyle.Edges then - Result.Bottom := ABorderWidth; - end; - if HasShadow then - begin - Inc(Result.Right, cxContainerShadowWidth); - Inc(Result.Bottom, cxContainerShadowWidth); - end; -end; - -procedure TcxContainer.GetColorSettingsByPainter(out ABackground, ATextColor: TColor); - - function IsStyleAssigned(AValue: TcxContainerStyleValue): Boolean; - begin - Result := Style.IsValueAssigned(AValue) or ActiveStyle.IsValueAssigned(AValue); - end; - -begin - ATextColor := clDefault; - ABackground := clDefault; - if Assigned(ViewInfo.Painter) then - begin - if not IsStyleAssigned(csvTextColor) then - ATextColor := ViewInfo.Painter.DefaultEditorTextColorEx(GetEditStateColorKind); - if not (ParentColor or IsStyleAssigned(csvColor)) then - ABackground := ViewInfo.Painter.DefaultEditorBackgroundColorEx(GetEditStateColorKind); - end; -end; - -function TcxContainer.GetEditStateColorKind: TcxEditStateColorKind; -begin - if not Enabled then - Result := esckDisabled - else - if Focused then - Result := esckNormal - else - Result := esckInactive; -end; - -function TcxContainer.GetInnerControlBounds(const AInnerControlsRegion: TRect; - AInnerControl: TControl): TcxContainerInnerControlBounds; -var - R: TRect; -begin - if AInnerControl = nil then - begin - Result.IsEmpty := True; - Exit; - end; - - Result.IsEmpty := False; - Result.Rect := GetControlRect(AInnerControl); - R := Result.Rect; - with AInnerControl.BoundsRect do - begin - if Left < AInnerControlsRegion.Left then - Result.Rect.Left := AInnerControlsRegion.Left - Left; - if Top < AInnerControlsRegion.Top then - Result.Rect.Top := AInnerControlsRegion.Top - Top; - if Right > AInnerControlsRegion.Right then - Dec(Result.Rect.Right, Right - AInnerControlsRegion.Right); - if Bottom > AInnerControlsRegion.Bottom then - Dec(Result.Rect.Bottom, Bottom - AInnerControlsRegion.Bottom); - end; - if EqualRect(Result.Rect, R) then - Result.IsEmpty := True; -end; - -function TcxContainer.GetShadowBounds: TRect; -var - ABorderWidth: Integer; -begin - Result := ViewInfo.Bounds; - ExtendRect(Result, GetBorderExtent); - ABorderWidth := GetContainerBorderWidth(ViewInfo.GetContainerBorderStyle); - InflateRect(Result, ABorderWidth, ABorderWidth); - InflateRectByBorders(Result, ABorderWidth, ActiveStyle.Edges); -end; - -function TcxContainer.GetShadowBoundsExtent: TRect; -begin - Result := cxEmptyRect; -end; - -function TcxContainer.GetStyleClass: TcxContainerStyleClass; -begin - Result := TcxContainerStyle; -end; - -function TcxContainer.GetStylesClass: TcxContainerStylesClass; -begin - Result := TcxContainerStyles; -end; - -function TcxContainer.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxContainerViewInfo; -end; - -function TcxContainer.HasShadow: Boolean; -begin - Result := ActiveStyle.Shadow and not IsNativeStyle; -end; - -procedure TcxContainer.InnerControlWndProc(var Message: TMessage); -begin - FSaveInnerControlWndProc(Message); -end; - -function TcxContainer.InternalGetActiveStyle: TcxContainerStyle; -begin - if csDisabled in ViewInfo.ContainerState then - Result := FStyles.StyleDisabled - else if csActive in ViewInfo.ContainerState then - Result := FStyles.StyleFocused - else if Style.HotTrack and (csHotTrack in ViewInfo.ContainerState) then - Result := FStyles.StyleHot - else - Result := FStyles.Style; -end; - -function TcxContainer.InternalGetNotPublishedStyleValues: TcxContainerStyleValues; -begin - Result := []; -end; - -function TcxContainer.IsAlignControlsLocked: Boolean; -begin - Result := FLockAlignControlsCount > 0; -end; - -function TcxContainer.IsInnerControlBoundsChanged(AControl: TWinControl; - const ABounds: TcxContainerInnerControlBounds): Boolean; -begin - Result := (AControl = nil) or (AControl <> FInnerControl); - if not Result and not (FInnerControlBounds.IsEmpty and ABounds.IsEmpty) then - begin - Result := FInnerControlBounds.IsEmpty or ABounds.IsEmpty; - if not Result then - Result := not EqualRect(FInnerControlBounds.Rect, ABounds.Rect); - end; -end; - -function TcxContainer.IsContainerClass: Boolean; -begin - Result := False; -end; - -function TcxContainer.IsMouseTracking: Boolean; -begin - Result := cxControls.IsMouseTracking(Self); -end; - -function TcxContainer.IsPopupMenuLocked: Boolean; -begin - Result := FPopupMenuLockCount > 0; -end; - -function TcxContainer.IsReadOnly: Boolean; -begin - Result := False; -end; - -function TcxContainer.IsTransparentBackground: Boolean; -begin - Result := False; -end; - -function TcxContainer.RefreshContainer(const P: TPoint; Button: TcxMouseButton; - Shift: TShiftState; AIsMouseEvent: Boolean): Boolean; -begin - Result := False; - if CanRefreshContainer then - begin - Inc(FRefreshLockCount); - try - Result := DoRefreshContainer(P, Button, Shift, AIsMouseEvent); - finally - Dec(FRefreshLockCount); - end; - end; - IsViewInfoCalculated := Result; -end; - -procedure TcxContainer.SaveInnerControlBounds(AControl: TWinControl; - const ABounds: TcxContainerInnerControlBounds); -begin - FInnerControlBounds := ABounds; -end; - -procedure TcxContainer.SetShadowRegion; -begin - if HandleAllocated then - begin - SetWindowShadowRegion(Handle, GetShadowBounds, GetShadowBoundsExtent, - ViewInfo.NativeStyle and (ViewInfo.BorderStyle <> cbsNone), - ViewInfo.Shadow, cxEmptyRect); - end; -end; - -procedure TcxContainer.SetSize; -begin - if (InnerControl <> nil) and - not EqualRect(InnerControl.BoundsRect, ViewInfo.ClientRect) then - begin - Inc(FRefreshLockCount); - try - with ViewInfo.ClientRect do - InnerControl.SetBounds(Left, Top, Right - Left, Bottom - Top); - finally - Dec(FRefreshLockCount); - end; - end; -end; - -procedure TcxContainer.SetVisibleBoundsClipRect; -var - AClipRgn: TcxRegionHandle; -begin - AClipRgn := GetWindowShadowRegion(Handle, GetShadowBounds, GetShadowBoundsExtent, - not CanHaveTransparentBorder, ViewInfo.Shadow, cxEmptyRect); - if AClipRgn <> 0 then - Canvas.SetClipRegion(TcxRegion.Create(AClipRgn), roIntersect); -end; - -procedure TcxContainer.UpdateData; -begin -end; - -procedure TcxContainer.AdjustScrollBarPosition(AScrollBar: TcxScrollBar); -var - AScrollBarInfo: TcxScrollBarInfo; - R: TRect; -begin - if GetScrollBarInfo(AScrollBarInfo, AScrollBar.Kind) and - IsAdjustingScrollBarPositionNeeded(AScrollBarInfo) then - begin - AScrollBar.Enabled := GetScrollBarEnabled(AScrollBar, AScrollBarInfo); - R := GetScrollBarBounds(AScrollBarInfo.rcScrollBar); - AScrollBar.SetBounds(R.Left, R.Top, R.Right, R.Bottom); - SetScrollBarVisible(AScrollBar, (R.Right > 0) and (R.Bottom > 0)); - end - else - SetScrollBarVisible(AScrollBar, False); -end; - -function TcxContainer.GetBackgroundThemedObjectType: TdxThemedObjectType; -begin - Result := totEdit; -end; - -function TcxContainer.GetBackgroundNativePart: Integer; -begin - if IsCompositionEnabled then - Result := EP_BACKGROUND - else - Result := EP_EDITTEXT; -end; - -function TcxContainer.GetBackgroundNativeState: Integer; -begin - with ViewInfo do - begin - if not Enabled then - Result := ETS_DISABLED - else if IsReadOnly then - Result := ETS_READONLY - else if Focused then - Result := ETS_FOCUSED - else if csHotTrack in ContainerState then - Result := ETS_HOT - else - Result := ETS_NORMAL; - end; -end; - -function TcxContainer.GetScrollBarBounds(const AScrollBarRect: TRect): TRect; -begin - with AScrollBarRect do - begin - Result.TopLeft := ScreenToClient(TopLeft); - Result.Right := Right - Left; - Result.Bottom := Bottom - Top; - end; - if (Result.Left < 0) or (Result.Right > Width) or - (Result.Top < 0) or (Result.Bottom > Height) then - Result := cxEmptyRect; -end; - -function TcxContainer.GetScrollBarEnabled(AScrollBar: TcxScrollBar; - const AScrollBarinfo: TcxScrollBarInfo): Boolean; -begin - Result := (AScrollBar.Parent <> nil) and - AScrollBar.Parent.Enabled and - (AScrollBarInfo.rgstate[0] and STATE_SYSTEM_UNAVAILABLE = 0); -end; - -function TcxContainer.GetScrollBarInfo(var AScrollBarInfo: TcxScrollBarInfo; - const AKind: TScrollBarKind): Boolean; -const - AScrollBarObjects: array [TScrollBarKind] of Longword = (OBJID_HSCROLL, OBJID_VSCROLL); -begin - Result := not IsDestroying and (Parent <> nil) and HandleAllocated and - FInnerControl.HandleAllocated; - if Result then - begin - Result := cxGetScrollBarInfo(FInnerControl.Handle, - Integer(AScrollBarObjects[AKind]), AScrollBarInfo); - end; -end; - -function TcxContainer.IsAdjustingScrollBarPositionNeeded( - const AScrollBarInfo: TcxScrollBarInfo): Boolean; -begin - Result := AScrollBarInfo.rgstate[0] and - (STATE_SYSTEM_INVISIBLE or STATE_SYSTEM_OFFSCREEN) = 0; -end; - -function TcxContainer.IsNativeStyle: Boolean; -begin - Result := AreVisualStylesMustBeUsed(Style.LookAndFeel.NativeStyle, - GetBackgroundThemedObjectType); -end; - -procedure TcxContainer.SafeSelectionFocusInnerControl; -begin - InnerControl.SetFocus; -end; - -procedure TcxContainer.SetDragKind(Value: TDragKind); -begin - inherited DragKind := Value; - if InnerControl <> nil then - TWinControlAccess(InnerControl).DragKind := Value; -end; - -procedure TcxContainer.SetScrollBarVisible(AScrollBar: TcxScrollBar; - AVisible: Boolean); -begin - AScrollBar.Visible := AVisible; - if AVisible then - begin - AScrollBar.Ctl3D := False; - AScrollBar.BringToFront; - end; -end; - -function TcxContainer.GetActiveControl: TWinControl; -begin - if FInnerControl = nil then - Result := Self - else - Result := FInnerControl; -end; - -function TcxContainer.GetFakeStyleController: TcxStyleController; -begin - Result := Style.StyleController; -end; - -function TcxContainer.GetInternalStyle(AState: TcxContainerStateItem): TcxContainerStyle; -begin - Result := FStyles[AState]; -end; - -function TcxContainer.GetIsDestroying: Boolean; -begin - Result := (csDestroying in ComponentState); -end; - -function TcxContainer.GetStyle: TcxContainerStyle; -begin - Result := TcxContainerStyle(FStyles.Style); -end; - -function TcxContainer.GetStyleDisabled: TcxContainerStyle; -begin - Result := TcxContainerStyle(FStyles.StyleDisabled); -end; - -function TcxContainer.GetStyleFocused: TcxContainerStyle; -begin - Result := TcxContainerStyle(FStyles.StyleFocused); -end; - -function TcxContainer.GetStyleHot: TcxContainerStyle; -begin - Result := TcxContainerStyle(FStyles.StyleHot); -end; - -function TcxContainer.GetVisibleFont: TFont; -var - ABkColor, ATextColor: TColor; -begin - Result := ActiveStyle.GetVisibleFont; - GetColorSettingsByPainter(ABkColor, ATextColor); - if ATextColor <> clDefault then - Result.Color := ATextColor; -end; - -procedure TcxContainer.SetFakeStyleController(Value: TcxStyleController); -begin -end; - -procedure TcxContainer.SetInnerControl(Value: TWinControl); -begin - if FInnerControl <> Value then - begin - if FInnerControl <> nil then - FInnerControl.RemoveFreeNotification(Self); - FInnerControl := Value; - if FInnerControl <> nil then - FInnerControl.FreeNotification(Self); - end; -end; - -procedure TcxContainer.SetStyle(Value: TcxContainerStyle); -begin - FStyles.Style := Value; -end; - -procedure TcxContainer.SetStyleDisabled(Value: TcxContainerStyle); -begin - FStyles.StyleDisabled := Value; -end; - -procedure TcxContainer.SetStyleFocused(Value: TcxContainerStyle); -begin - FStyles.StyleFocused := Value; -end; - -procedure TcxContainer.SetStyleHot(Value: TcxContainerStyle); -begin - FStyles.StyleHot := Value; -end; - -procedure TcxContainer.SetInternalStyle(AState: TcxContainerStateItem; - Value: TcxContainerStyle); -begin - FStyles[AState] := Value; -end; - -function TcxContainer.GetDragKind: TDragKind; -begin - Result := inherited DragKind; -end; - -procedure TcxContainer.WMKillFocus(var Message: TWMKillFocus); -begin - if InnerControl <> nil then - begin - if not InnerControl.HandleAllocated or (Message.FocusedWnd <> InnerControl.Handle) then - begin - inherited; - Exit; - end; - Message.Msg := 0; - Message.Result := 0; - end - else - inherited; -end; - -procedure TcxContainer.WMNCPaint(var Message: TWMNCPaint); -begin - Message.Result := 0; -end; - -procedure TcxContainer.WMSetCursor(var Message: TWMSetCursor); -begin - with Message do - if (FInnerControl <> nil) and (CursorWnd = Handle) and - (Smallint(HitTest) = HTCLIENT) and not PtInRect(ViewInfo.ClientRect, ScreenToClient(InternalGetCursorPos)) then - begin - Windows.SetCursor(Screen.Cursors[crArrow]); - Result := 1; - Exit; - end; - inherited; -end; - -procedure TcxContainer.WMSetFocus(var Message: TWMSetFocus); -begin - if not IsDestroying and HandleAllocated and (InnerControl <> nil) and - InnerControl.HandleAllocated then - begin - if Message.FocusedWnd <> InnerControl.Handle then - begin - inherited; - if InnerControl.CanFocus then - InnerControl.SetFocus; - Exit; - end; - Message.Msg := 0; - Message.Result := 0; - end - else - inherited; -end; - -procedure TcxContainer.WMWindowPosChanged(var Message: TWMWindowPosChanged); -begin - inherited; - if not IsDestroying and IsTransparentBackground then - ShortRefreshContainer(False); -end; - -procedure TcxContainer.WMWindowPosChanging(var Message: TWMWindowPosChanging); -var - AParentForm: TCustomForm; -begin - if IsDestroying then - begin - Message.Result := 0; - Exit; - end - else - inherited; - if (GetFocus = Handle) and (InnerControl <> nil) and InnerControl.HandleAllocated and - InnerControl.CanFocus and not (csFocusing in ControlState) then - begin - AParentForm := GetParentForm(Self); - AParentForm.FocusControl(InnerControl); - end; -end; - -procedure TcxContainer.CMCtl3DChanged(var Message: TMessage); -begin - inherited; - ShortRefreshContainer(False); -end; - -procedure TcxContainer.CMEnabledChanged(var Message: TMessage); -begin - inherited; - EnabledChanged; -end; - -procedure TcxContainer.CMFontChanged(var Message: TMessage); -var - APrevIsFontAssigned: Boolean; -begin - if not FInternalSetting then - begin - APrevIsFontAssigned := csvFont in Style.FAssignedValues; - Style.Font := Font; - if not APrevIsFontAssigned then - Exclude(Style.FAssignedValues, csvFont); - inherited; - end - else - begin - inherited; - SetSize; - SetScrollBarsParameters; - ShortRefreshContainer(False); - end; -end; - -procedure TcxContainer.CMParentColorChanged(var Message: TMessage); -var - APrevIsStyleColorAssigned: Boolean; -begin - APrevIsStyleColorAssigned := csvColor in FStyles.Style.FAssignedValues; - inherited; // TODO CLX ??? - if not APrevIsStyleColorAssigned or ParentColor then - Exclude(FStyles.Style.FAssignedValues, csvColor); - if Color <> Style.Color then - ContainerStyleChanged(Style); - - if IsTransparentBackground and not ParentColor then - Invalidate; -end; - -procedure TcxContainer.CMShortRefreshContainer(var Message: TMessage); -begin - ShortRefreshContainer(False); -end; - -procedure TcxContainer.CMParentFontChanged(var Message: TMessage); -var - APrevIsStyleFontAssigned: Boolean; -begin - APrevIsStyleFontAssigned := csvFont in FStyles.Style.FAssignedValues; - inherited; // TODO CLX ??? - if not ParentFont then - FStyles.Style.UpdateFont; - if not APrevIsStyleFontAssigned or ParentFont then - Exclude(FStyles.Style.FAssignedValues, csvFont); -end; - -procedure TcxContainer.CMSysColorChange(var Message: TMessage); -begin - inherited; - ShortRefreshContainer(False); -end; - -procedure TcxContainer.CMUpdateScrollBars(var Message: TMessage); -begin - SetScrollBarsParameters; -end; - -{ TcxCustomPopupWindow } - -constructor TcxCustomPopupWindow.Create(AOwnerControl: TWinControl); -begin - inherited Create; - FormStyle := fsNormal; - Visible := False; - - FStyle := GetStyleClass.Create(Self, False); - FStyle.OnChanged := PopupWindowStyleChanged; - FViewInfo := GetViewInfoClass.Create; - - FCaptureFocus := True; - FOwnerControl := AOwnerControl; - - KeyPreview := True; - FModalMode := True; -end; - -destructor TcxCustomPopupWindow.Destroy; -begin - cxClearObjectLinks(Self); -{$IFDEF DELPHI9} - PopupMode := pmNone; // to set FInternalPopupParent to nil -// PopupParent := nil; -{$ENDIF} - if IsVisible and (FVisiblePopupWindowList.IndexOf(Self) <> -1) then - UnregisterVisiblePopupWindow(Self); - FreeAndNil(FViewInfo); - FStyle.OnChanged := nil; - FreeAndNil(FStyle); - inherited Destroy; -end; - -function TcxCustomPopupWindow.Focused: Boolean; -var - AFocusedControl: TcxNativeHandle; - AIndex: Integer; -begin - Result := False; - AIndex := FVisiblePopupWindowList.IndexOf(Self); - if AIndex = -1 then - Exit; - if CaptureFocus then - begin - AFocusedControl := GetFocus; - Result := HasNativeHandle(Self, AFocusedControl, True); - end; -end; - -{$IFDEF DELPHI5} -function TcxCustomPopupWindow.CanFocus: Boolean; -begin - Result := Visible; -end; -{$ENDIF} - -procedure TcxCustomPopupWindow.ClosePopup; -begin - PostMessage(NativeHandle(Handle), CM_CLOSEPOPUPWINDOW, 0, 0); -end; - -procedure TcxCustomPopupWindow.CloseUp; -var - AParentForm: TCustomForm; -begin - if FVisiblePopupWindowList.IndexOf(Self) = -1 then - Exit; - - LockCMActivateMessages(True); - try - UnregisterVisiblePopupWindow(Self); - DoClosing; - - FPopupWindowShowing := True; - FBeingShownPopupWindow := Self; - ShowWindow(NativeHandle(Handle), SW_HIDE); - Hide; - DoClosed; - if HandleAllocated and HasNativeHandle(Self, GetCapture, True) then - SetCaptureControl(nil); - finally - FPopupWindowShowing := False; - LockCMActivateMessages(False); - end; - - if FVisiblePopupWindowList.Count = 0 then - begin - AParentForm := GetParentForm(OwnerControl); - if (AParentForm <> nil) and AParentForm.HandleAllocated and - ((TCustomFormAccess(AParentForm).FormStyle <> fsMDIForm) and not AParentForm.Active) then - SendMessage(AParentForm.Handle, WM_NCACTIVATE, 0, 0); - end; -end; - -procedure TcxCustomPopupWindow.CorrectBoundsWithDesktopWorkArea( - var APosition: TPoint); -var - ADesktopWorkArea: TRect; - AWidth, AHeight: Integer; -begin - if not AcceptsAnySize then - Exit; - - AWidth := Width; - AHeight := Height; - ADesktopWorkArea := GetDesktopWorkArea(APosition); - with APosition do - begin - if X < ADesktopWorkArea.Left then - begin - AWidth := AWidth + X - ADesktopWorkArea.Left; - X := ADesktopWorkArea.Left; - end; - if Y < ADesktopWorkArea.Top then - begin - AHeight := AHeight + Y - ADesktopWorkArea.Top; - Y := ADesktopWorkArea.Top; - end; - if AWidth > ADesktopWorkArea.Right - X then - AWidth := ADesktopWorkArea.Right - X; - if AHeight > ADesktopWorkArea.Bottom - Y then - AHeight := ADesktopWorkArea.Bottom - Y; - Width := AWidth; - Height := AHeight; - if (Height <> AHeight) and (Y = ADesktopWorkArea.Top) then - Inc(APosition.Y, AHeight - Height); - end; -end; - -function TcxCustomPopupWindow.GetStyleClass: TcxContainerStyleClass; -begin - Result := TcxContainerStyle; -end; - -function TcxCustomPopupWindow.GetViewInfoClass: TcxContainerViewInfoClass; -begin - Result := TcxContainerViewInfo; -end; - -function TcxCustomPopupWindow.HasCapture: Boolean; -begin - Result := HasNativeHandle(Self, GetCapture); -end; - -function TcxCustomPopupWindow.IsShortCut(var Message: TWMKey): Boolean; -var - AParentForm: TCustomForm; -begin - Result := inherited IsShortCut(Message); - if not Result then - begin - AParentForm := GetParentForm(OwnerControl); - if AParentForm <> nil then - Result := AParentForm.IsShortCut(Message); - end; -end; - -function TcxCustomPopupWindow.IsVisible: Boolean; -begin - Result := (FVisiblePopupWindowList <> nil) and - (FVisiblePopupWindowList.IndexOf(Self) <> -1); -end; - -procedure TcxCustomPopupWindow.LockDeactivate(ALock: Boolean); -begin - if ALock then - Inc(FDeactivateLockCount) - else - Dec(FDeactivateLockCount); -end; - -procedure TcxCustomPopupWindow.AdjustClientRect(var Rect: TRect); -begin - Rect := ViewInfo.ClientRect; -end; - -procedure TcxCustomPopupWindow.Deactivate; -var - AActiveWnd: TcxHandle; - APopupWindow: TcxCustomPopupWindow; - I: Integer; -begin - FDeactivation := False; - if IsDeactivateLocked then - Exit; - - if FVisiblePopupWindowList.Count > 0 then - begin - AActiveWnd := GetActiveWindow; - for I := FVisiblePopupWindowList.Count - 1 downto 0 do - begin - APopupWindow := TcxCustomPopupWindow(FVisiblePopupWindowList[I]); - if HasHandle(APopupWindow, AActiveWnd) then - Exit; - if IsWindowEnabled(APopupWindow.Handle) and not APopupWindow.IsDeactivateLocked then - APopupWindow.CloseUp; - end; - end; - if FVisiblePopupWindowList.Count > 0 then CloseUp; -end; - -function TcxCustomPopupWindow.GetOwnerScreenBounds: TRect; -begin - Result := OwnerBounds; - if IsChildClassWindow(OwnerControl.Handle) then - with Result do - begin - TopLeft := OwnerParent.ClientToScreen(TopLeft); - BottomRight := OwnerParent.ClientToScreen(BottomRight); - end; -end; - -procedure TcxCustomPopupWindow.InitPopup; -begin -end; - -procedure TcxCustomPopupWindow.KeyDown(var Key: Word; Shift: TShiftState); -begin - if IsVisible and HasCapture and (Key = VK_ESCAPE) then - begin - SetCaptureControl(nil); - Key := 0; - end - else - inherited KeyDown(Key, Shift); -end; - -procedure TcxCustomPopupWindow.Paint; -begin - ViewInfo.Paint(Canvas); -end; - -procedure TcxCustomPopupWindow.VisibleChanged; -var - AParentForm: TCustomForm; -begin - inherited VisibleChanged; - if CaptureFocus and (OwnerControl <> nil) and HandleAllocated and - not IsWindowVisible(NativeHandle(Handle)) then - begin - AParentForm := GetParentForm(FOwnerControl); - if (AParentForm <> nil) and HasNativeHandle(AParentForm, GetFocus) and - OwnerControl.CanFocus and not (csDesigning in AParentForm.ComponentState) then - OwnerControl.SetFocus; - end; -end; - -procedure TcxCustomPopupWindow.CreateHandle; -var - AIsInVisiblePopupWindowList: Boolean; -begin - AIsInVisiblePopupWindowList := False; - if FVisiblePopupWindowList.IndexOf(Self) = -1 then - RegisterVisiblePopupWindow(Self) - else - AIsInVisiblePopupWindowList := True; - try - inherited CreateHandle; - finally - if not AIsInVisiblePopupWindowList then - UnregisterVisiblePopupWindow(Self); - end; -end; - -procedure TcxCustomPopupWindow.CreateParams(var Params: TCreateParams); -var - AParentForm: TCustomForm; -begin - inherited CreateParams(Params); - with Params do - begin - if CaptureFocus then - begin - AParentForm := GetParentForm(OwnerControl); - if AParentForm <> nil then - WndParent := AParentForm.Handle; - Style := Style and not WS_CHILD; - Style := Style or WS_POPUP; -// ExStyle := ExStyle or WS_EX_TOOLWINDOW; - if FIsTopMost and ((AParentForm = nil) or (GetWindowLong(AParentForm.Handle, - GWL_EXSTYLE) and WS_EX_TOPMOST <> 0)) then - ExStyle := ExStyle or WS_EX_TOPMOST; - end else - begin - Style := WS_CHILD; - ExStyle := ExStyle or WS_EX_TOOLWINDOW; - if Params.WndParent = 0 then - Params.WndParent := cxMessageWindow.Handle; - end; - Style := Style or WS_CLIPCHILDREN; - end; -end; - -procedure TcxCustomPopupWindow.CreateWnd; -begin -{$IFDEF DELPHI9} - if CaptureFocus then - PopupParent := GetParentForm(FOwnerControl) - else - PopupParent := nil; -{$ENDIF} - inherited CreateWnd; - if not CaptureFocus then - Windows.SetParent(Handle, 0); -end; - -procedure TcxCustomPopupWindow.PopupWindowStyleChanged(Sender: TObject); -begin -end; - -procedure TcxCustomPopupWindow.RecreateWindow; -begin - if HandleAllocated then - RecreateWnd; -end; - -procedure TcxCustomPopupWindow.Popup(AFocusedControl: TWinControl); - - function IsTopMostPopupWindow: Boolean; - var - I: Integer; - AParentForm: TCustomForm; - begin - AParentForm := GetParentForm(OwnerControl); - Result := (AParentForm = nil) or - (GetWindowLong(AParentForm.Handle, GWL_EXSTYLE) and WS_EX_TOPMOST <> 0); - if not Result and not CaptureFocus then - for I := 0 to Screen.FormCount - 1 do - if (Screen.Forms[I].FormStyle = fsStayOnTop) and not Screen.Forms[I].Visible then - begin - Result := True; - Break; - end; - end; - - function GetPopupWindowShowingFlags: UINT; - begin - if IsTopMostPopupWindow or (not CaptureFocus and TopMostComboBoxes) then - Result := HWND_TOPMOST - else - Result := 0; - end; - - procedure ShowPopupWindow; - var - P: TPoint; - begin - InitPopup; - CalculateSize; - P := CalculatePosition; - CorrectBoundsWithDesktopWorkArea(P); - FPopupWindowShowing := True; - FCaptionInactivationLocked := True; - FBeingShownPopupWindow := Self; - try - RegisterVisiblePopupWindow(Self); - DoShowing; - SetBounds(P.X, P.Y, Width, Height); - Show; - {$IFDEF DELPHI8} - SetBounds(P.X, P.Y, Width, Height); - {$ENDIF} - if CaptureFocus then - FFocusedControl := GetFirstFocusControl(AFocusedControl) - else - FFocusedControl := AFocusedControl; - if FFocusedControl = nil then - SetFocus - else - FFocusedControl.SetFocus; - SetWindowPos(NativeHandle(Handle), GetPopupWindowShowingFlags, 0, 0, 0, 0, - SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE or SWP_SHOWWINDOW); - finally - FPopupWindowShowing := False; - FCaptionInactivationLocked := False; - end; - end; - -var - Msg: TMsg; - ALinkSelf: TcxObjectLink; -begin - if (FVisiblePopupWindowList.IndexOf(Self) <> -1) or not IsOwnerControlVisible then - Exit; - - ShowPopupWindow; - ModalResult := mrNone; - DoShowed; - if FCaptureFocus and ModalMode then - begin - ALinkSelf := cxAddObjectLink(Self); - try - while (ALinkSelf.Ref <> nil) and Visible and not Application.Terminated do - begin - if PeekMessage(Msg, 0, WM_SYSKEYDOWN, WM_SYSKEYDOWN, PM_NOREMOVE) then - case Msg.wParam of - Windows.VK_MENU, Windows.VK_RETURN, Windows.VK_SPACE: - PeekMessage(Msg, 0, Msg.message, Msg.message, PM_REMOVE); - end; - if ModalResult <> mrNone then - if CloseQuery then - ModalCloseUp - else - ModalResult := mrNone; - Application.HandleMessage; - end; - finally - cxRemoveObjectLink(ALinkSelf); - end; - end; -end; - -function TcxCustomPopupWindow.SetFocusedControl(Control: TWinControl): Boolean; -begin - LockCMActivateMessages(True); - try - Result := inherited SetFocusedControl(Control); - finally - LockCMActivateMessages(False); - end; -end; - -function TcxCustomPopupWindow.AcceptsAnySize: Boolean; -begin - Result := False; -end; - -procedure TcxCustomPopupWindow.DoClosed; -begin - if Assigned(FOnClosed) then - FOnClosed(Self); -end; - -procedure TcxCustomPopupWindow.DoClosing; -begin - if Assigned(FOnClosing) then - FOnClosing(Self); -end; - -procedure TcxCustomPopupWindow.DoShowed; -begin - if Assigned(FOnShowed) then - FOnShowed(Self); -end; - -procedure TcxCustomPopupWindow.DoShowing; -begin - if Assigned(FOnShowing) then - FOnShowing(Self); -end; - -function TcxCustomPopupWindow.GetFirstFocusControl(AControl: TWinControl): TWinControl; -begin - if AControl = nil then - Result := Self - else - if AControl.CanFocus and AControl.TabStop then - Result := AControl - else - begin - Result := FindNextControl(nil, True, True, False); - if Result = nil then - Result := Self; - end; -end; - -function TcxCustomPopupWindow.HasBackground; -begin - Result := False; -end; - -function TcxCustomPopupWindow.IsDeactivateLocked: Boolean; -begin - Result := FDeactivateLockCount <> 0; -end; - -function TcxCustomPopupWindow.IsOwnerControlVisible: Boolean; -begin - Result := OwnerControl.HandleAllocated and IsWindowVisible(OwnerControl.Handle); -end; - -function TcxCustomPopupWindow.IsSysKeyAccepted(Key: Word): Boolean; -begin - case Key of - Windows.VK_F4, Windows.VK_LEFT, Windows.VK_RIGHT, Windows.VK_UP, - Windows.VK_DOWN, Windows.VK_PRIOR, Windows.VK_NEXT, Windows.VK_HOME, - Windows.VK_END: - Result := True; - else - Result := False; - end; -end; - -procedure TcxCustomPopupWindow.ModalCloseUp; -begin - CloseUp; -end; - -procedure TcxCustomPopupWindow.MouseEnter(AControl: TControl); -begin -end; - -procedure TcxCustomPopupWindow.MouseLeave(AControl: TControl); -begin -end; - -function TcxCustomPopupWindow.NeedIgnoreMouseMessageAfterCloseUp(AWnd: THandle; - AMsg: Cardinal; AShift: TShiftState; const APos: TPoint): Boolean; -begin - Result := False; -end; - -function TcxCustomPopupWindow.GetJustClosed: Boolean; -begin - Result := FJustClosed; - FJustClosed := False; -end; - -procedure TcxCustomPopupWindow.SetCaptureFocus(Value: Boolean); -begin - if Value <> FCaptureFocus then - begin - FCaptureFocus := Value; - RecreateWindow; - if IsVisible then - begin - CloseUp; - Popup(FocusedControl); - end; - end; -end; - -procedure TcxCustomPopupWindow.SetIsTopMost(Value: Boolean); -begin - if Value <> FIsTopMost then - begin - FIsTopMost := Value; - RecreateWindow; - if IsVisible then - begin - CloseUp; - Popup(FocusedControl); - end; - end; -end; - -procedure TcxCustomPopupWindow.WMActivateApp(var Message: TWMActivateApp); -begin -end; - -procedure TcxCustomPopupWindow.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - if HasBackground then - inherited - else - Message.Result := 1; -end; - -procedure TcxCustomPopupWindow.CMClosePopupWindow(var Message: TMessage); -begin - LockDeactivate(True); - try - CloseUp; - finally - LockDeactivate(False); - end; - if OwnerControl.HandleAllocated then - SendMessage(OwnerControl.Handle, WM_SETFOCUS, 0, 0); -end; - -procedure TcxCustomPopupWindow.CMMouseEnter(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseEnter(Self) - else - MouseEnter(TControl(Message.lParam)); -end; - -procedure TcxCustomPopupWindow.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxCustomPopupWindow.CMShowPopupWindow(var Message: TMessage); -begin - Popup(FocusedControl); -end; - -{ TcxCustomInnerListBox } - -constructor TcxCustomInnerListBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); -{$IFNDEF DELPHI6} - FAutoComplete := True; -{$ENDIF} -{$IFNDEF DELPHI8} - FAutoCompleteDelay := cxDefaultAutoCompleteDelay; -{$ENDIF} - FCanvas := TcxCanvas.Create(inherited Canvas); - CreateScrollBars; - FLookAndFeel := TcxLookAndFeel.Create(Self); - FLookAndFeel.OnChanged := LookAndFeelChanged; - FHScrollBar.LookAndFeel.MasterLookAndFeel := FLookAndFeel; - FVScrollBar.LookAndFeel.MasterLookAndFeel := FLookAndFeel; - BorderStyle := bsNone; - ControlStyle := ControlStyle + [csDoubleClicks] - [csOpaque]; - ParentColor := False; - ParentFont := True; -end; - -destructor TcxCustomInnerListBox.Destroy; -begin - if (FHScrollBar <> nil) and (FHScrollBar.Parent = nil) then - FreeAndNil(FHScrollBar); - if (FVScrollBar <> nil) and (FVScrollBar.Parent = nil) then - FreeAndNil(FVScrollBar); - FreeAndNil(FLookAndFeel); - FreeAndNil(FCanvas); - inherited Destroy; -end; - -procedure TcxCustomInnerListBox.DefaultHandler(var Message); -begin - if (Container = nil) or - not Container.InnerControlDefaultHandler(TMessage(Message)) then - inherited DefaultHandler(Message); -end; - -procedure TcxCustomInnerListBox.DragDrop(Source: TObject; X, Y: Integer); -begin - if Container <> nil then - Container.DragDrop(Source, Left + X, Top + Y); -end; - -procedure TcxCustomInnerListBox.SetExternalScrollBarsParameters; - - procedure AdjustScrollBarPosition(AScrollBar: TcxScrollBar); - const - AScrollBarObjects: array [TScrollBarKind] of Longword = (OBJID_HSCROLL, OBJID_VSCROLL); - var - AScrollBarInfo: TcxScrollBarInfo; - AScrollBarState: DWORD; - AScrollBarVisible: Boolean; - R: TRect; - begin - AScrollBarVisible := False; - repeat - if Parent = nil then - Break; - if not cxGetScrollBarInfo(Handle, Integer(AScrollBarObjects[AScrollBar.Kind]), AScrollBarInfo) then - Break; - AScrollBarState := AScrollBarInfo.rgstate[0]; - if AScrollBarState and (STATE_SYSTEM_INVISIBLE or STATE_SYSTEM_OFFSCREEN) <> 0 then - Break; - AScrollBarVisible := True; - AScrollBar.Enabled := (AScrollBarState and STATE_SYSTEM_UNAVAILABLE = 0) and - (AScrollBar.Parent <> nil) and AScrollBar.Parent.Enabled; - with AScrollBarInfo.rcScrollBar do - begin - R.TopLeft := Parent.ScreenToClient(TopLeft); - R.Right := Right - Left; - R.Bottom := Bottom - Top; - end; - with R do - begin - if (Left < 0) or (Right > Width) or (Top < 0) or (Bottom > Height) then - AScrollBarVisible := False - else - AScrollBar.SetBounds(Left, Top, Right, Bottom); - end; - until True; - if AScrollBarVisible then - begin - Inc(FScrollBarsLockCount); - try - AScrollBar.Parent := Parent; - finally - Dec(FScrollBarsLockCount); - end; - AScrollBar.Ctl3D := False; - AScrollBar.BringToFront; - end - else - AScrollBar.SetBounds(0, 0, 0, 0); - AScrollBar.Visible := AScrollBarVisible; - end; - - procedure SetScrollBarParameters(AScrollBar: TcxScrollBar); - const - ABarFlags: array [TScrollBarKind] of Integer = (SB_HORZ, SB_VERT); - var - AScrollInfo: TScrollInfo; - begin - AdjustScrollBarPosition(AScrollBar); - if not AScrollBar.Visible then - Exit; - - AScrollInfo.cbSize := SizeOf(AScrollInfo); - AScrollInfo.fMask := SIF_ALL; - GetScrollInfo(Handle, ABarFlags[AScrollBar.Kind], AScrollInfo); - with AScrollInfo do - begin - if Integer(nPage) > nMax then - Integer(nPage) := nMax; - AScrollBar.SetScrollParams(nMin, nMax, nPos, nPage, True); - end; - end; - -begin - if (csDestroying in ComponentState) or (FScrollBarsLockCount > 0) or - not UsecxScrollBars or IsRedrawLocked then - Exit; - FScrollBarsCalculating := True; - try - SetScrollBarParameters(FHScrollBar); - SetScrollBarParameters(FVScrollBar); - finally - FScrollBarsCalculating := False; - end; -end; - -{$IFNDEF DELPHI6} -procedure TcxCustomInnerListBox.AddItem(AItem: string; AObject: TObject); -var - S: string; -begin - SetString(S, PChar(AItem), StrLen(PChar(AItem))); - Items.AddObject(S, AObject); -end; - -procedure TcxCustomInnerListBox.ClearSelection; -var - I: Integer; -begin - if MultiSelect then - for I := 0 to Items.Count - 1 do - Selected[I] := False - else - ItemIndex := -1; -end; - -procedure TcxCustomInnerListBox.DeleteSelected; -var - I: Integer; -begin - if MultiSelect then - for I := Items.Count - 1 downto 0 do - begin - if Selected[I] then - Items.Delete(I); - end - else - if ItemIndex <> -1 then - Items.Delete(ItemIndex); -end; - -procedure TcxCustomInnerListBox.SelectAll; -var - I: Integer; -begin - if MultiSelect then - for I := 0 to Items.Count - 1 do - Selected[I] := True; -end; -{$ENDIF} - -function TcxCustomInnerListBox.ItemVisible(Index: Integer): Boolean; -var - R: TRect; -begin - R := GetControlRect(Self); - with ItemRect(Index) do - begin - Result := PtInRect(R, TopLeft); - Result := Result or PtInRect(R, Point(Right - 1, Top)); - Result := Result or PtInRect(R, Point(Left, Bottom - 1)); - Result := Result or PtInRect(R, Point(Right - 1, Bottom - 1)); - end; -end; - -procedure TcxCustomInnerListBox.Click; -begin - inherited Click; - FVScrollBar.Position := TopIndex; - if Container <> nil then - Container.Click; -end; - -procedure TcxCustomInnerListBox.DblClick; -begin - inherited DblClick; - if Container <> nil then - Container.DblClick; -end; - -procedure TcxCustomInnerListBox.DestroyWindowHandle; -begin - FIsRedrawLocked := False; - inherited DestroyWindowHandle; -end; - -procedure TcxCustomInnerListBox.DoAutoComplete(var Key: Char); -var - AIndex: Integer; - AMsg: TMsg; -begin - if not AutoComplete then - Exit; - if GetTickCount - FPrevKeyPressTime >= AutoCompleteDelay then - FAutoCompleteFilter := ''; - FPrevKeyPressTime := GetTickCount; - - if Key = Char(VK_BACK) then - begin - AIndex := Length(FAutoCompleteFilter); - while ByteType(FAutoCompleteFilter, AIndex) = mbTrailByte do - Dec(AIndex); - Delete(FAutoCompleteFilter, AIndex, Length(FAutoCompleteFilter) - AIndex + 1); - end - else - if dxCharInSet(Key, LeadBytes) then - begin - if PeekMessage(AMsg, Handle, WM_CHAR, WM_CHAR, PM_REMOVE) then - begin - FAutoCompleteFilter := FAutoCompleteFilter + Key + Chr(AMsg.wParam); - Key := #0; - end; - end - else - FAutoCompleteFilter := FAutoCompleteFilter + Key; - - if Length(FAutoCompleteFilter) > 0 then - begin - AIndex := FindAutoCompleteString(FAutoCompleteFilter); - if AIndex <> -1 then - begin - if MultiSelect then - begin - ClearSelection; - SendMessage(Handle, LB_SELITEMRANGE, 1, MakeLParam(AIndex, AIndex)); - end; - ItemIndex := AIndex; - Click; - end; - if not (Ord(Key) in [VK_RETURN, VK_BACK, VK_ESCAPE]) then - Key := #0; - end - else - begin - ItemIndex := 0; - Click; - end; -end; - -function TcxCustomInnerListBox.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; -begin - Result := (Container <> nil) and Container.DoMouseWheel(Shift, - WheelDelta, MousePos); - if not Result then - Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); -end; - -procedure TcxCustomInnerListBox.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -begin - if Container <> nil then - Container.DragOver(Source, Left + X, Top + Y, State, Accept); -end; - -function TcxCustomInnerListBox.GetPopupMenu: TPopupMenu; -begin - if Container = nil then - Result := inherited GetPopupMenu - else - Result := Container.GetPopupMenu; -end; - -function TcxCustomInnerListBox.GetSizeGripRect: TRect; -var - R: TRect; -begin - if FHScrollBar.Visible and FVScrollBar.Visible then - begin - Result.TopLeft := Parent.ClientToScreen(Point(FVScrollBar.Left, FHScrollBar.Top)); - R := cxGetWindowRect(Self); - Dec(Result.Left, R.Left); - Dec(Result.Top, R.Top); - Result.Right := Result.Left + FVScrollBar.Width; - Result.Bottom := Result.Top + FHScrollBar.Height; - end - else - Result := cxEmptyRect; -end; - -procedure TcxCustomInnerListBox.KeyDown(var Key: Word; Shift: TShiftState); -begin - if Container <> nil then - Container.KeyDown(Key, Shift); - if Key <> 0 then - inherited KeyDown(Key, Shift); -end; - -procedure TcxCustomInnerListBox.KeyPress(var Key: Char); -begin - if Key = Char(VK_TAB) then - Key := #0; - if (Key <> #0) and (Container <> nil) then - Container.KeyPress(Key); - if Key = Char(VK_RETURN) then - Key := #0; - if Key <> #0 then - begin - if Assigned(OnKeyPress) then - OnKeyPress(Self, Key); - if Key <> #0 then - DoAutoComplete(Key); - end; -end; - -procedure TcxCustomInnerListBox.KeyUp(var Key: Word; Shift: TShiftState); -begin - if (Key = VK_TAB) then - Key := 0; - if Container <> nil then - Container.KeyUp(Key, Shift); - if Key <> 0 then - inherited KeyUp(Key, Shift); -end; - -procedure TcxCustomInnerListBox.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - if HandleAllocated then - Invalidate; -end; - -procedure TcxCustomInnerListBox.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseDown(Button, Shift, X, Y); - if Container <> nil then - with Container do - begin - InnerControlMouseDown := True; - try - MouseDown(Button, Shift, X + Self.Left, Y + Self.Top); - finally - InnerControlMouseDown := False; - end; - end; -end; - -procedure TcxCustomInnerListBox.MouseEnter(AControl: TControl); -begin -end; - -procedure TcxCustomInnerListBox.MouseLeave(AControl: TControl); -begin - if Container <> nil then - Container.ShortRefreshContainer(True); -end; - -procedure TcxCustomInnerListBox.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited MouseMove(Shift, X, Y); - if Container <> nil then - Container.MouseMove(Shift, X + Left, Y + Top); -end; - -procedure TcxCustomInnerListBox.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - if Container <> nil then - Container.MouseUp(Button, Shift, X + Left, Y + Top); -end; - -procedure TcxCustomInnerListBox.DrawSizeGrip(ADC: HDC); -begin - if (Container <> nil) and UsecxScrollBars and HScrollBar.Visible and VScrollBar.Visible then - cxFillSizeGrip(Container, GetSizeGripRect); -end; - -function TcxCustomInnerListBox.NeedDrawFocusRect: Boolean; -begin - Result := not Assigned(OnDrawItem); -end; - -procedure TcxCustomInnerListBox.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if Operation = opRemove then - if AComponent = FHScrollBar then - FHScrollBar := nil - else if AComponent = FVScrollBar then - FVScrollBar := nil; -end; - -procedure TcxCustomInnerListBox.RestoreCanvasParametersForFocusRect; -begin - Canvas.Brush.Color := FPrevBrushColor; - Canvas.Font.Color := FPrevFontColor; - TCanvasAccess(Canvas.Canvas).RequiredState([csHandleValid, csBrushValid]); -end; - -procedure TcxCustomInnerListBox.SaveCanvasParametersForFocusRect; -begin - FPrevBrushColor := Canvas.Brush.Color; - FPrevFontColor := Canvas.Font.Color; -end; - -procedure TcxCustomInnerListBox.WndProc(var Message: TMessage); -begin - if (Container <> nil) and Container.InnerControlMenuHandler(Message) then - Exit; - inherited WndProc(Message); - case Message.Msg of - CM_WININICHANGE, - LB_ADDSTRING, - LB_DELETESTRING, - LB_INSERTSTRING, - LB_RESETCONTENT, - LB_SETCARETINDEX, - LB_SETCURSEL, - LB_SETHORIZONTALEXTENT, - LB_SETTOPINDEX, - WM_HSCROLL, - WM_MOUSEWHEEL, - WM_VSCROLL, - WM_WINDOWPOSCHANGED: - SetExternalScrollBarsParameters; - WM_SETREDRAW: - if Message.WParam <> 0 then - SetExternalScrollBarsParameters; - end; -end; - -procedure TcxCustomInnerListBox.CreateScrollBars; - - procedure InitializeScrollBar(AScrollBar: TcxScrollBar); - begin - AScrollBar.SmallChange := 1; - AScrollBar.Visible := False; - end; - -begin - FHScrollBar := TcxScrollBar.Create(Self); - FHScrollBar.FreeNotification(Self); - FHScrollBar.Kind := sbHorizontal; - FHScrollBar.OnScroll := HScrollHandler; - InitializeScrollBar(FHScrollBar); - - FVScrollBar := TcxScrollBar.Create(Self); - FVScrollBar.FreeNotification(Self); - FVScrollBar.Kind := sbVertical; - FVScrollBar.OnScroll := VScrollHandler; - InitializeScrollBar(FVScrollBar); -end; - -function TcxCustomInnerListBox.FindAutoCompleteString(const S: string): Integer; -begin -{$IFDEF DELPHI6} - if Style in [lbVirtual, lbVirtualOwnerDraw] then - Result := DoFindData(S) - else -{$ENDIF} - Result := SendMessage(Handle, LB_FINDSTRING, -1, LPARAM(PChar(S))); -end; - -function TcxCustomInnerListBox.GetControlContainer: TcxContainer; -begin - Result := FContainer; -end; - -function TcxCustomInnerListBox.GetControl: TWinControl; -begin - Result := Self; -end; - -procedure TcxCustomInnerListBox.HScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); -begin - if FHScrollBar.HandleAllocated then - begin - CallWindowProc(DefWndProc, Handle, WM_HSCROLL, Word(ScrollCode) + - Word(ScrollPos) shl 16, FHScrollBar.Handle); - ScrollPos := GetScrollPos(Handle, SB_HORZ); - end; -end; - -procedure TcxCustomInnerListBox.SetLookAndFeel(Value: TcxLookAndFeel); -begin - FLookAndFeel.Assign(Value); -end; - -procedure TcxCustomInnerListBox.VScrollHandler(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); -begin - if FVScrollBar.HandleAllocated then - if ScrollCode in [scLineUp, scLineDown] then - TopIndex := ScrollPos - else - begin - if ScrollCode in [scPosition, scTrack] then - TopIndex := ScrollPos - else - CallWindowProc(DefWndProc, Handle, WM_VSCROLL, Word(ScrollCode) + - Word(ScrollPos) shl 16, FVScrollBar.Handle); - ScrollPos := GetScrollPos(Handle, SB_VERT); - end; -end; - -{$IFNDEF DELPHI6} -function TcxCustomInnerListBox.GetScrollWidth: Integer; -begin - Result := SendMessage(Handle, LB_GETHORIZONTALEXTENT, 0, 0); -end; - -procedure TcxCustomInnerListBox.SetScrollWidth(const Value: Integer); -begin - if Value <> ScrollWidth then - SendMessage(Handle, LB_SETHORIZONTALEXTENT, Value, 0); -end; -{$ENDIF} - -procedure TcxCustomInnerListBox.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - inherited; - if Container <> nil then - with Message do - begin - Result := Result or DLGC_WANTCHARS; - if GetKeyState(VK_CONTROL) >= 0 then - Result := Result or DLGC_WANTTAB; - end; -end; - -procedure TcxCustomInnerListBox.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - if (Container <> nil) and not Container.IsDestroying then - Container.FocusChanged; -end; - -procedure TcxCustomInnerListBox.WMLButtonDown(var Message: TWMLButtonDown); - - function NeedImmediateBeginDrag: Boolean; - var - AItemIndex : Integer; - AShiftState: TShiftState; - begin - Result := False; - AShiftState := KeysToShiftState(Message.Keys); - if MultiSelect then - if not(ssShift in AShiftState) or (ssCtrl in AShiftState) then - begin - AItemIndex := ItemAtPos(SmallPointToPoint(Message.Pos), True); - Result := (AItemIndex >= 0) and Selected[AItemIndex]; - end; - end; - - function NeedBeginDrag: Boolean; - var - AShiftState: TShiftState; - begin - AShiftState := KeysToShiftState(Message.Keys); - Result := not(MultiSelect and ((ssCtrl in AShiftState) or - (ssShift in AShiftState))); - end; - -var - APrevDragMode: TDragMode; -begin - if not((Container <> nil) and (DragMode = dmAutomatic) and - not Container.IsDesigning) then - begin - inherited; - Exit; - end; - - APrevDragMode := DragMode; - try - DragMode := dmManual; - if NeedImmediateBeginDrag then - begin - Container.BeginDrag(False); - Exit; - end; - inherited; - if NeedBeginDrag then - Container.BeginDrag(False); - finally - DragMode := APrevDragMode; - end; -end; - -procedure TcxCustomInnerListBox.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - inherited; - if not FScrollBarsCalculating then - SetExternalScrollBarsParameters; -end; - -procedure TcxCustomInnerListBox.WMNCPaint(var Message: TWMNCPaint); -var - ADC: HDC; -begin - inherited; - if UsecxScrollBars and HScrollBar.Visible and VScrollBar.Visible then - begin - ADC := GetWindowDC(Handle); - try - DrawSizeGrip(ADC); - finally - ReleaseDC(Handle, ADC); - end; - end; -end; - -procedure TcxCustomInnerListBox.WMPrint(var Message: TWMPrint); -begin - if UsecxScrollBars and (Message.Flags and PRF_NONCLIENT <> 0) then - begin - Message.Flags := Message.Flags and not PRF_NONCLIENT; - DrawSizeGrip(Message.DC); - end; - inherited; -end; - -procedure TcxCustomInnerListBox.WMPrintClient(var Message: TWMPrintClient); -begin - DefaultHandler(Message); -end; - -procedure TcxCustomInnerListBox.WMSetFocus(var Message: TWMSetFocus); -begin - inherited; - if (Container <> nil) and not Container.IsDestroying and not(csDestroying in ComponentState) - and (Message.FocusedWnd <> Container.Handle) then - Container.FocusChanged; -end; - -procedure TcxCustomInnerListBox.WMSetRedraw(var Message: TWMSetRedraw); -begin - inherited; - FIsRedrawLocked := Message.Redraw = 0; - if not (csDestroying in ComponentState) and not FIsRedrawLocked then - SetExternalScrollBarsParameters; -end; - -procedure TcxCustomInnerListBox.WMWindowPosChanged(var Message: TWMWindowPosChanged); -var - ARgn: HRGN; -begin - inherited; - if csDestroying in ComponentState then - Exit; - if FHScrollBar.Visible and FVScrollBar.Visible then - begin - ARgn := CreateRectRgnIndirect(GetSizeGripRect); - SendMessage(Handle, WM_NCPAINT, ARgn, 0); - DeleteObject(ARgn); - end; -end; - -procedure TcxCustomInnerListBox.CMMouseEnter(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseEnter(Self) - else - MouseEnter(TControl(Message.lParam)); -end; - -procedure TcxCustomInnerListBox.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxCustomInnerListBox.CNDrawItem(var Message: TWMDrawItem); -var - ACanvas: TCanvas; - AItemState: TOwnerDrawState; -begin - with Message.DrawItemStruct^ do - begin - AItemState := TOwnerDrawState(LongRec(itemState).Lo); - ACanvas := inherited Canvas; - ACanvas.Handle := hDC; - ACanvas.Font := Font; - ACanvas.Brush := Brush; - if (Integer(itemID) >= 0) and (odSelected in AItemState) then - begin - ACanvas.Brush.Color := clHighlight; - ACanvas.Font.Color := clHighlightText - end; - if Integer(itemID) >= 0 then - DrawItem(itemID, rcItem, AItemState) - else - ACanvas.FillRect(rcItem); - if (odFocused in AItemState) and NeedDrawFocusRect then - DrawFocusRect(hDC, rcItem); - ACanvas.Handle := 0; - end; -end; - -function WndProc(hWnd: HWND; Msg: Windows.UINT; WParam: WPARAM; LParam: LPARAM): LRESULT stdcall; -begin - SetWindowLong(hwnd, GWL_WNDPROC, Longint(FOldWndProc)); - Result := 1; -end; - -function ApplicationCallWndProcHookProc(Code: Integer; - WParam, LParam: Longint): Longint stdcall; - - procedure LockMessage(AWnd: HWND); - begin - FOldWndProc := Pointer(GetWindowLong(AWnd, GWL_WNDPROC)); - SetWindowLong(AWnd, GWL_WNDPROC, Longint(@WndProc)); - end; - -var - AParentForm: TCustomForm; - AParentWindow: HWND; - APopupWindow: TcxCustomPopupWindow; - I, J: Integer; -begin - if Code <> HC_ACTION then - begin - Result := CallNextHookEx(FApplicationCallWndProcHook, Code, WParam, LParam); - Exit; - end; - - with Windows.PCWPStruct(LParam)^ do - if ((message = CM_ACTIVATE) or (message = CM_DEACTIVATE)) and IsCMActivateMessagesLocked then - LockMessage(hwnd); - - if FVisiblePopupWindowList.Count = 0 then - begin - Result := CallNextHookEx(FApplicationCallWndProcHook, Code, WParam, LParam); - Exit; - end; - - with Windows.PCWPStruct(LParam)^ do - case message of - WM_NCACTIVATE: - if wParam = 0 then - if FCaptionInactivationLocked then - LockMessage(hwnd) - else - for I := 0 to FVisiblePopupWindowList.Count - 1 do - begin - APopupWindow := TcxCustomPopupWindow(FVisiblePopupWindowList[I]); - if csDestroying in APopupWindow.ComponentState then - Continue; - AParentForm := GetParentForm(APopupWindow.OwnerControl); - if (AParentForm <> nil) and (NativeHandle(AParentForm.Handle) = hwnd) then - LockMessage(hwnd); - end; - - WM_ACTIVATEAPP: - if wParam = 0 then - begin - I := 0; - while I < FVisiblePopupWindowList.Count do - begin - APopupWindow := TcxCustomPopupWindow(FVisiblePopupWindowList[I]); - AParentForm := GetParentForm(APopupWindow.OwnerControl); - if AParentForm <> nil then - PostMessage(NativeHandle(AParentForm.Handle), WM_NCACTIVATE, 0, 0); - if APopupWindow.CaptureFocus and APopupWindow.Active or not IsWindowEnabled(APopupWindow.Handle) then - begin - Inc(I); - Continue; - end; - APopupWindow.CloseUp; - if APopupWindow.OwnerControl is TcxContainer then - TcxContainer(APopupWindow.OwnerControl).FocusChanged; - I := 0; - end; - end; - - WM_DESTROY: - for I := 0 to FVisiblePopupWindowList.Count - 1 do - begin - APopupWindow := TcxCustomPopupWindow(FVisiblePopupWindowList[I]); - if csDestroying in APopupWindow.ComponentState then - Continue; - if HasNativeHandle(APopupWindow, hwnd) then - begin - APopupWindow.Close; - if FVisiblePopupWindowList.IndexOf(APopupWindow) = -1 then - with APopupWindow do - if not (csDestroying in ComponentState) and FTerminateOnDestroy then - Application.Terminate; - Break; - end; - end; - - WM_CLOSE: - for I := 0 to FVisiblePopupWindowList.Count - 1 do - begin - APopupWindow := TcxCustomPopupWindow(FVisiblePopupWindowList[I]); - if csDestroying in APopupWindow.ComponentState then - Continue; - if HasNativeHandle(APopupWindow, hwnd) then - begin - if APopupWindow.CloseQuery then - APopupWindow.CloseUp; - if (FVisiblePopupWindowList.IndexOf(APopupWindow) = -1) and - APopupWindow.CaptureFocus and not(csDestroying in APopupWindow.OwnerControl.ComponentState) then - begin - AParentWindow := FindFirstNonChildParentWindow(APopupWindow.OwnerControl.Handle); - SendMessage(AParentWindow, WM_CLOSE, 0, 0); - end; - Break; - end; - if not APopupWindow.CaptureFocus and not(csDestroying in APopupWindow.OwnerControl.ComponentState) then - begin - AParentForm := GetParentForm(APopupWindow.OwnerControl); - if not AParentForm.HandleAllocated or HasNativeHandle(AParentForm, hwnd) then - APopupWindow.CloseUp; - Break; - end; - end; - - WM_SHOWWINDOW: - if wParam = 0 then - for I := FVisiblePopupWindowList.Count - 1 downto 0 do - begin - APopupWindow := TcxCustomPopupWindow(FVisiblePopupWindowList[I]); - if csDestroying in APopupWindow.ComponentState then - Continue; - with APopupWindow.OwnerControl do - if (csDestroying in ComponentState) or not HandleAllocated then - Continue; - if HasNativeHandle(APopupWindow.OwnerControl, hwnd) then - begin - for J := FVisiblePopupWindowList.Count - 1 downto I do - TcxCustomPopupWindow(FVisiblePopupWindowList[J]).CloseUp; - Break; - end; - end; - - WM_WINDOWPOSCHANGED: - begin - I := 0; - while I < FVisiblePopupWindowList.Count do - begin - APopupWindow := TcxCustomPopupWindow(FVisiblePopupWindowList[I]); - if (csDestroying in APopupWindow.ComponentState) or not APopupWindow.HandleAllocated then - begin - Inc(I); - Continue; - end; - with APopupWindow.OwnerControl do - if (csDestroying in ComponentState) or not HandleAllocated then - begin - Inc(I); - Continue; - end; - if not HasNativeHandle(APopupWindow.OwnerControl, hwnd) then - begin - Inc(I); - Continue; - end; - if InternalIsWindowVisible(APopupWindow.OwnerControl) then - Inc(I) - else - begin - APopupWindow.CloseUp; - I := 0; - Continue; - end; - end; - end; - end; - Result := CallNextHookEx(FApplicationCallWndProcHook, Code, WParam, LParam); -end; - -function ApplicationGetMessageMsgHookProc(Code: Integer; - WParam, LParam: Longint):Longint stdcall; -var - APMsg: Windows.PMSG; - APopupWindow: TcxCustomPopupWindow; -begin - if (FVisiblePopupWindowList.Count > 0) and (Code = HC_ACTION) and (WParam = PM_REMOVE) then - begin - APMsg := Windows.PMSG(LParam); - if (APMsg^.message = WM_SYSKEYDOWN) and (FVisiblePopupWindowList.Count > 0) then - with FVisiblePopupWindowList do - begin - APopupWindow := TcxCustomPopupWindow(Items[Count - 1]); - if (not APopupWindow.CaptureFocus or not APopupWindow.ModalMode) and - not APopupWindow.IsSysKeyAccepted(APMsg^.wParam) then - APMsg^.message := 0; - end; - end; - Result := CallNextHookEx(FApplicationGetMessageMsgHook, Code, WParam, LParam); -end; - -function ApplicationMouseMsgHookProc(Code: Integer; - WParam, LParam: Longint): Longint stdcall; - - function MDIParentOrAnotherMDIChild(APopupWindow: TcxCustomPopupWindow; AWnd: HWND): Boolean; - var - AMDIChildForm, AMDIParentForm: TCustomForm; - AMDIClientNativeHandle, AParentNativeHandle: HWND; - AParentForm: TCustomForm; - I, J: Integer; - begin - AParentForm := GetParentForm(APopupWindow.OwnerControl); - AParentNativeHandle := GetParent(NativeHandle(AParentForm.Handle)); - Result := AParentNativeHandle = AWnd; - if Result then - Exit; - for I := 0 to Screen.FormCount - 1 do - begin - AMDIParentForm := Screen.Forms[I]; - if (TCustomFormAccess(AMDIParentForm).FormStyle = fsMDIForm) and (TCustomFormAccess(AMDIParentForm).ClientHandle <> 0) then - begin - AMDIClientNativeHandle := NativeHandle(TCustomFormAccess(AMDIParentForm).ClientHandle); - if AParentNativeHandle = AMDIClientNativeHandle then // TODO Check CLX - begin - Result := HasNativeHandle(AMDIParentForm, AWnd, True); - if Result then - Break; - - for J := 0 to TCustomFormAccess(AMDIParentForm).MDIChildCount - 1 do - begin - AMDIChildForm := TCustomFormAccess(AMDIParentForm).MDIChildren[J]; - if AMDIChildForm = AParentForm then - Continue; - Result := HasNativeHandle(AMDIChildForm, AWnd, True); - if Result then - Break; - end; - - Break; - end; - end; - end; - end; - - function InternalNeedIgnoreMouseMessageAfterCloseUp(AWnd: THandle; - APopupWindow: TcxCustomPopupWindow): Boolean; - var - P: TPoint; - begin - P := PMouseHookStruct(LParam)^.pt; - Result := APopupWindow.NeedIgnoreMouseMessageAfterCloseUp(AWnd, WParam, - InternalGetShiftState, P); - end; - - function CheckWindow(AWnd: HWND): Boolean; - var - I: Integer; - ACallNextHook, ANeedCheckIgnoreMouseMessage: Boolean; - APopupWindow: TcxCustomPopupWindow; - AParentForm: TCustomForm; - begin - Result := True; - ACallNextHook := True; - I := 0; - while I < FVisiblePopupWindowList.Count do - begin - ANeedCheckIgnoreMouseMessage := True; - APopupWindow := TcxCustomPopupWindow(FVisiblePopupWindowList[I]); - if APopupWindow.CaptureFocus and not APopupWindow.Active then - begin - Inc(I); - Continue; - end; - with APopupWindow do - begin - if HasNativeHandle(APopupWindow, AWnd, True) then - begin - Inc(I); - Continue; - end; - AParentForm := GetParentForm(OwnerControl); -// if HasNativeHandle(AParentForm, AWnd, True) then - if CheckParentsNativeHandle(OwnerControl, AWnd) or ((AParentForm is TcxCustomPopupWindow) and not TcxCustomPopupWindow(AParentForm).IsVisible) then - begin - if HasNativeHandle(OwnerControl, AWnd, True) then - if (WParam = WM_LBUTTONDOWN) or (WParam = WM_LBUTTONDBLCLK) then - begin - if PtInRect(OwnerScreenBounds, PMouseHookStruct(LParam)^.pt) then - begin - ACallNextHook := False; - if InternalNeedIgnoreMouseMessageAfterCloseUp(AWnd, APopupWindow) then - FJustClosed := True; - ANeedCheckIgnoreMouseMessage := False; - end; - end; - - FCaptionInactivationLocked := True; - LockDeactivate(True); - try - if Result and ANeedCheckIgnoreMouseMessage then - Result := not InternalNeedIgnoreMouseMessageAfterCloseUp(AWnd, APopupWindow); - APopupWindow.CloseUp; - if not ACallNextHook and ((csDestroying in OwnerControl.ComponentState) - or not OwnerControl.Visible) then - Result := False; - finally - LockDeactivate(False); - FCaptionInactivationLocked := False; - end; - I := 0; - end - else - begin - AParentForm := GetParentForm(OwnerControl); - if (TCustomFormAccess(AParentForm).FormStyle = fsMDIChild) and MDIParentOrAnotherMDIChild(APopupWindow, AWnd) then - begin - Result := Result and not InternalNeedIgnoreMouseMessageAfterCloseUp(AWnd, APopupWindow); - APopupWindow.CloseUp; - I := 0; - end - else - begin - Inc(I); - Continue; - end; - end; - end; - end; - end; - -begin - if (FVisiblePopupWindowList.Count > 0) and (Code = HC_ACTION) then - case WParam of - WM_NCLBUTTONDOWN, WM_NCLBUTTONDBLCLK, WM_LBUTTONDOWN, WM_LBUTTONDBLCLK, - WM_NCRBUTTONDOWN, WM_NCRBUTTONDBLCLK, WM_RBUTTONDOWN, WM_RBUTTONDBLCLK, - WM_NCMBUTTONDOWN, WM_NCMBUTTONDBLCLK, WM_MBUTTONDOWN, WM_MBUTTONDBLCLK: - if not CheckWindow(PMouseHookStruct(LParam)^.hwnd) then - begin - Result := 1; - Exit; - end; - end; - Result := CallNextHookEx(FApplicationMouseMsgHook, Code, WParam, LParam); -end; - -procedure RemoveHooks; -begin - ReleaseHook(FApplicationMouseMsgHook); - ReleaseHook(FApplicationGetMessageMsgHook); - ReleaseHook(FApplicationCallWndProcHook); -end; - -procedure SetHooks; -begin - // Requires - Assert(FApplicationMouseMsgHook = 0); - // - SetHook(FApplicationCallWndProcHook, WH_CALLWNDPROC, ApplicationCallWndProcHookProc); - SetHook(FApplicationGetMessageMsgHook, WH_GETMESSAGE, ApplicationGetMessageMsgHookProc); - SetHook(FApplicationMouseMsgHook, WH_MOUSE, ApplicationMouseMsgHookProc); -end; - -initialization - SetUsecxScrollBars; -{$IFDEF DELPHI6} - StartClassGroup(TControl); - GroupDescendentsWith(TcxStyleController, TControl); -{$ENDIF} - FVisiblePopupWindowList := TList.Create; - if not FSetHooksOnlyWhenPopupsAreVisible then - SetHooks; - cxControls.cxGetParentWndForDocking := GetPopupOwnerControl; - -finalization - cxControls.cxGetParentWndForDocking := nil; - RemoveHooks; - FreeAndNil(FVisiblePopupWindowList); - -end. - diff --git a/internal/x.46/ExpressLibrary/Sources/cxControls.pas b/internal/x.46/ExpressLibrary/Sources/cxControls.pas deleted file mode 100644 index 06a9de74..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxControls.pas +++ /dev/null @@ -1,5491 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library controls } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -{$DEFINE USETCXSCROLLBAR} - -unit cxControls; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, -{$IFDEF DELPHI6} - Types, -{$ENDIF} - Forms, Controls, Graphics, Dialogs, Classes, StdCtrls, Menus, cxGraphics, -{$IFDEF USETCXSCROLLBAR} - cxScrollBar, -{$ENDIF} - cxClasses, - cxLookAndFeels, - cxLookAndFeelPainters, dxCore; - -const - CM_NCSIZECHANGED = WM_DX + 1; - WM_SYNCHRONIZETHREADS = WM_DX + 2; - - {$IFNDEF DELPHI7} - WM_APPCOMMAND = $0319; - {$EXTERNALSYM WM_APPCOMMAND} - {$ENDIF} - - FAPPCOMMAND_MASK = $0000F000; - {$EXTERNALSYM FAPPCOMMAND_MASK} - APPCOMMAND_BROWSER_BACKWARD = 1; - {$EXTERNALSYM APPCOMMAND_BROWSER_BACKWARD} - APPCOMMAND_BROWSER_FORWARD = 2; - {$EXTERNALSYM APPCOMMAND_BROWSER_FORWARD} - -type - TcxHandle = HWND; - - TcxDragDetect = (ddNone, ddDrag, ddCancel); - - TcxNumberType = (ntInteger, ntFloat, ntExponent); - -{$IFNDEF DELPHI7} - TWMPrint = packed record - Msg: Cardinal; - DC: HDC; - Flags: Cardinal; - Result: Integer; - end; - - TWMPrintClient = TWMPrint; -{$ENDIF} - - TLBGetItemRect = packed record - Msg: Cardinal; - ItemIndex: Integer; - Rect: PRect; - Result: Longint; - end; - - TcxControl = class; - - TDragControlObjectClass = class of TDragControlObject; - - IdxSpellChecker = interface - ['{4515FCEE-2D09-4709-A170-E29C556355BF}'] - procedure CheckFinish; - procedure CheckStart(AControl: TWinControl); - procedure DrawMisspellings(AControl: TWinControl); - function IsSpellCheckerDialogControl(AWnd: THandle): Boolean; - procedure KeyPress(AKey: Char); - procedure LayoutChanged(AControl: TWinControl); - function QueryPopup(APopup: TComponent; const P: TPoint): Boolean; - procedure SelectionChanged(AControl: TWinControl); - procedure TextChanged(AControl: TWinControl); - procedure Undo; - end; - - IdxSpellCheckerControl = interface - ['{2DEA4CCA-3C6D-4283-9441-AABBD61F74F3}'] - function SupportsSpelling: Boolean; - procedure SetSelText(const AText: string; APost: Boolean = False); - procedure SetIsBarControl(AValue: Boolean); - procedure SetValue(const AValue: Variant); - end; - - TdxSpellCheckerAutoCorrectWordRange = record - Replacement: WideString; - SelStart: Integer; - SelLength: Integer; - NewSelStart: Integer; - end; - PdxSpellCheckerAutoCorrectWordRange = ^TdxSpellCheckerAutoCorrectWordRange; - - IcxMouseCaptureObject = interface - ['{ACB73657-6066-4564-9A3D-D4D0273AA82F}'] - procedure DoCancelMode; - end; - - IcxMouseTrackingCaller = interface - ['{84A4BCBE-E001-4D60-B7A6-75E2B0DCD3E9}'] - procedure MouseLeave; - end; - - IcxMouseTrackingCaller2 = interface(IcxMouseTrackingCaller) - ['{3A5D973B-F016-4F22-80B6-1D35668D7743}'] - function PtInCaller(const P: TPoint): Boolean; - end; - - { IcxCompoundControl } - - IcxCompoundControl = interface - ['{A4A77F28-1D03-425B-9A83-0B853B5D8DEF}'] - function GetActiveControl: TWinControl; - property ActiveControl: TWinControl read GetActiveControl; - end; - - { IcxPopupMenu } - - IcxPopupMenu = interface - ['{61EEDA7D-88CC-45BF-8A00-5C25174D6501}'] - function IsShortCutKey(var Message: TWMKey): Boolean; - procedure Popup(X, Y: Integer); - end; - - { control child component } - - TcxControlChildComponent = class(TcxComponent) - private - FControl: TcxControl; - function GetIsLoading: Boolean; - protected - function GetIsDestroying: Boolean; virtual; - procedure Initialize; virtual; - procedure SetControl(Value: TcxControl); virtual; - public - constructor Create(AOwner: TComponent); override; - constructor CreateEx(AControl: TcxControl; - AAssignOwner: Boolean = True); virtual; - destructor Destroy; override; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - procedure SetParentComponent(Value: TComponent); override; - property Control: TcxControl read FControl write SetControl; - property IsDestroying: Boolean read GetIsDestroying; - property IsLoading: Boolean read GetIsLoading; - end; - - { scrollbar and size grip } - - TcxScrollBarData = record - Min: Integer; - Max: Integer; - Position: Integer; - PageSize: Integer; - SmallChange: TScrollBarInc; - LargeChange: TScrollBarInc; - Enabled: Boolean; - Visible: Boolean; - AllowShow: Boolean; - AllowHide: Boolean; - end; - - TcxControlScrollBar = class({$IFDEF USETCXSCROLLBAR}TcxScrollBar{$ELSE}TScrollBar{$ENDIF}) - private - function GetVisible: Boolean; - procedure SetVisible(Value: Boolean); - procedure CMDesignHitTest(var Message: TCMDesignHitTest); message CM_DESIGNHITTEST; - protected - procedure WndProc(var Message: TMessage); override; - procedure FocusParent; virtual; - public - Data: TcxScrollBarData; - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure ApplyData; - property Visible: Boolean read GetVisible write SetVisible; - end; - - TcxSizeGrip = class(TCustomControl) - private - FLookAndFeel: TcxLookAndFeel; - procedure WMEraseBkgnd(var AMessage: TWMEraseBkgnd); message WM_ERASEBKGND; - protected - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); - procedure Paint; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - property LookAndFeel: TcxLookAndFeel read FLookAndFeel; - end; - - { drag & drop objects } - - TcxDragAndDropObjectClass = class of TcxDragAndDropObject; - - TcxDragAndDropObject = class - private - FCanvas: TcxCanvas; - FControl: TcxControl; - FDirty: Boolean; - procedure SetDirty(Value: Boolean); - protected - procedure ChangeMousePos(const P: TPoint); - procedure DirtyChanged; virtual; - function GetDragAndDropCursor(Accepted: Boolean): TCursor; virtual; - function GetImmediateStart: Boolean; virtual; - - procedure AfterDragAndDrop(Accepted: Boolean); virtual; - procedure BeginDragAndDrop; virtual; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); virtual; - procedure EndDragAndDrop(Accepted: Boolean); virtual; - - property Canvas: TcxCanvas read FCanvas write FCanvas; - property Control: TcxControl read FControl; - property Dirty: Boolean read FDirty write SetDirty; - public - CurMousePos: TPoint; - PrevMousePos: TPoint; - constructor Create(AControl: TcxControl); virtual; - - procedure DoBeginDragAndDrop; - procedure DoDragAndDrop(const P: TPoint; var Accepted: Boolean); - procedure DoEndDragAndDrop(Accepted: Boolean); - - property ImmediateStart: Boolean read GetImmediateStart; - end; - - TcxDragControlObject = class(TDragControlObject) - protected - procedure Finished(Target: TObject; X, Y: Integer; Accepted: Boolean); override; - function GetDragCursor(Accepted: Boolean; X, Y: Integer): TCursor; override; - end; - - TcxDragImageListClass = class of TcxDragImageList; - - TcxDragImageList = class(TDragImageList); - - { control } - - TcxControlBorderStyle = (cxcbsNone, cxcbsDefault); - TcxDragAndDropState = (ddsNone, ddsStarting, ddsInProcess); - - TcxKey = (kAll, kArrows, kChars, kTab); - TcxKeys = set of TcxKey; - - TcxMouseWheelScrollingKind = (mwskNone, mwskHorizontal, mwskVertical); - - TcxControlListernerLink = class - Ref: TcxControl; - end; - - TcxControl = class(TCustomControl{$IFNDEF DELPHI6}, IUnknown{$ENDIF}, - IcxLookAndFeelContainer, IdxLocalizerListener) - private - FActiveCanvas: TcxCanvas; - FBorderStyle: TcxControlBorderStyle; - FCalculatingScrollBarsParams: Boolean; - FCanvas: TcxCanvas; - FCreatingWindow: Boolean; - FDefaultCursor: TCursor; - FDragAndDropObject: TcxDragAndDropObject; - FDragAndDropObjectClass: TcxDragAndDropObjectClass; - FDragAndDropPrevCursor: TCursor; - FDragAndDropState: TcxDragAndDropState; - FDragImages: TcxDragImageList; - FFinishingDragAndDrop: Boolean; - FFocusOnClick: Boolean; - FFontListenerList: IInterfaceList; - FHScrollBar: TcxControlScrollBar; - FInitialHScrollBarVisible: Boolean; - FInitialVScrollBarVisible: Boolean; - FIsInitialScrollBarsParams: Boolean; - FKeys: TcxKeys; - FLookAndFeel: TcxLookAndFeel; - FMouseButtonPressed: Boolean; - FMouseCaptureObject: TObject; - FMouseDownPos: TPoint; - FMouseRightButtonReleased: Boolean; - FPopupMenu: TComponent; - FScrollBars: TScrollStyle; - FScrollBarsLockCount: Integer; - FScrollBarsUpdateNeeded: Boolean; - FSizeGrip: TcxSizeGrip; - FUpdatingScrollBars: Boolean; - FVScrollBar: TcxControlScrollBar; - FIsScrollingContent: Boolean; - FLastParentBackground: Boolean; - {$IFNDEF DELPHI7} - FParentBackground: Boolean; - {$ENDIF} - FOnFocusChanged: TNotifyEvent; - FOnMouseEnter: TNotifyEvent; - FOnMouseLeave: TNotifyEvent; - - function GetActiveCanvas: TcxCanvas; - function GetDragAndDropObject: TcxDragAndDropObject; - function GetHScrollBarVisible: Boolean; - function GetIsDestroying: Boolean; - function GetIsLoading: Boolean; - function GetVScrollBarVisible: Boolean; - procedure SetBorderStyle(Value: TcxControlBorderStyle); - procedure SetDragAndDropState(Value: TcxDragAndDropState); - procedure SetLookAndFeel(Value: TcxLookAndFeel); - procedure SetKeys(Value: TcxKeys); - procedure SetMouseCaptureObject(Value: TObject); - procedure SetPopupMenu(Value: TComponent); - procedure SetScrollBars(Value: TScrollStyle); - {$IFNDEF DELPHI7} - procedure SetParentBackground(Value: Boolean); - {$ENDIF} - - procedure WMCancelMode(var Message: TWMCancelMode); message WM_CANCELMODE; - procedure WMContextMenu(var Message: TWMContextMenu); message WM_CONTEXTMENU; - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMPaint(var Message: TWMPaint); message WM_PAINT; - procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; - procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED; - procedure CMCursorChanged(var Message: TMessage); message CM_CURSORCHANGED; - procedure CMDesignHitTest(var Message: TCMDesignHitTest); message CM_DESIGNHITTEST; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - procedure CMInvalidate(var Message: TMessage); message CM_INVALIDATE; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CMNCSizeChanged(var Message: TMessage); message CM_NCSIZECHANGED; - procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; - procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED; - procedure CNKeyDown(var Message: TWMKeyDown); message CN_KEYDOWN; - procedure CNSysKeyDown(var Message: TWMKeyDown); message CN_SYSKEYDOWN; - procedure CreateScrollBars; - procedure DestroyScrollBars; - procedure ScrollEvent(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); - protected - FBounds: TRect; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - procedure Resize; override; - procedure WndProc(var Message: TMessage); override; - procedure DestroyWindowHandle; override; - procedure DoContextPopup(MousePos: TPoint; - var Handled: Boolean); override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; override; - function DoShowPopupMenu(AMenu: TComponent; X, Y: Integer): Boolean; virtual; - function GetPopupMenu: TPopupMenu; override; - function IsMenuKey(var Message: TWMKey): Boolean; - procedure Modified; virtual; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure Paint; override; - - procedure AddChildComponent(AComponent: TcxControlChildComponent); dynamic; - procedure RemoveChildComponent(AComponent: TcxControlChildComponent); dynamic; - - procedure AfterMouseDown(AButton: TMouseButton; X, Y: Integer); virtual; - procedure BeforeMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); virtual; - procedure BringInternalControlsToFront; virtual; - procedure CancelMouseOperations; virtual; - procedure DoCancelMode; dynamic; - function GetBorderSize: Integer; virtual; - function GetBounds: TRect; virtual; - function GetClientBounds: TRect; virtual; - function GetCursor(X, Y: Integer): TCursor; virtual; - function GetDesignHitTest(X, Y: Integer; Shift: TShiftState): Boolean; dynamic; - function GetDragObjectClass: TDragControlObjectClass; dynamic; - function GetIsDesigning: Boolean; virtual; - function GetIsFocused: Boolean; virtual; - function GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; virtual; - procedure InitControl; virtual; - class procedure InvalidateControl(AControl: TWinControl; ANeedInvalidateSelf, ANeedInvalidateChildren: Boolean); - procedure MouseEnter(AControl: TControl); dynamic; - procedure MouseLeave(AControl: TControl); dynamic; - - // Conditions - function CanFocusOnClick: Boolean; overload; virtual; - function CanFocusOnClick(X, Y: Integer): Boolean; overload; virtual; - function FocusWhenChildIsClicked(AChild: TControl): Boolean; virtual; - function HasBackground: Boolean; virtual; - function IsInternalControl(AControl: TControl): Boolean; virtual; - function MayFocus: Boolean; dynamic; - function NeedRedrawOnResize: Boolean; virtual; - function UpdateMousePositionIfControlMoved: Boolean; virtual; - - // Notifications - procedure BoundsChanged; dynamic; - procedure ColorChanged; dynamic; - procedure ParentBackgroundChanged; virtual; - procedure CursorChanged; dynamic; - procedure FocusChanged; dynamic; - procedure FontChanged; dynamic; - procedure TextChanged; dynamic; - procedure VisibleChanged; dynamic; - - // IcxLookAndFeelContainer - function IcxLookAndFeelContainer.GetLookAndFeel = GetLookAndFeelValue; - function GetLookAndFeelValue: TcxLookAndFeel; virtual; - - // look&feel - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; virtual; - procedure LookAndFeelChangeHandler(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); virtual; - property LookAndFeel: TcxLookAndFeel read FLookAndFeel write SetLookAndFeel; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - - // scrollbars - function CanScrollLineWithoutScrollBars(ADirection: TcxDirection): Boolean; virtual; - procedure CheckNeedsScrollBars; - procedure DoScrolling; - function GetHScrollBarBounds: TRect; virtual; - function GetSizeGripBounds: TRect; virtual; - function GetVScrollBarBounds: TRect; virtual; - procedure InitScrollBars; - procedure InitScrollBarsParameters; virtual; - function IsPixelScrollBar(AKind: TScrollBarKind): Boolean; virtual; - function NeedsScrollBars: Boolean; virtual; - function NeedsToBringInternalControlsToFront: Boolean; virtual; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); virtual; - procedure SetInternalControlsBounds; virtual; - procedure UpdateInternalControlsState; virtual; - procedure UpdateScrollBars; virtual; - - property CalculatingScrollBarsParams: Boolean read FCalculatingScrollBarsParams; - property HScrollBar: TcxControlScrollBar read FHScrollBar; - property HScrollBarVisible: Boolean read GetHScrollBarVisible; - property ScrollBars: TScrollStyle read FScrollBars write SetScrollBars default ssBoth; - property SizeGrip: TcxSizeGrip read FSizeGrip; - property UpdatingScrollBars: Boolean read FUpdatingScrollBars; - property VScrollBar: TcxControlScrollBar read FVScrollBar; - property VScrollBarVisible: Boolean read GetVScrollBarVisible; - - // internal drag and drop (columns moving, ...) - function AllowAutoDragAndDropAtDesignTime(X, Y: Integer; Shift: TShiftState): Boolean; virtual; - function AllowDragAndDropWithoutFocus: Boolean; dynamic; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); dynamic; - procedure EndDragAndDrop(Accepted: Boolean); dynamic; - function GetDragAndDropObjectClass: TcxDragAndDropObjectClass; virtual; - function StartDragAndDrop(const P: TPoint): Boolean; dynamic; - - // delphi drag and drop - function CanDrag(X, Y: Integer): Boolean; dynamic; - procedure DoStartDrag(var DragObject: TDragObject); override; - procedure DoEndDrag(Target: TObject; X, Y: Integer); override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); override; - procedure DrawDragImage(ACanvas: TcxCanvas; const R: TRect); virtual; - function GetDragImagesClass: TcxDragImageListClass; virtual; - function GetDragImagesSize: TPoint; virtual; - function GetIsCopyDragDrop: Boolean; virtual; - function HasDragImages: Boolean; virtual; - procedure HideDragImage; - procedure InitDragImages(ADragImages: TcxDragImageList); virtual; - procedure ShowDragImage; - property DragImages: TcxDragImageList read FDragImages; - property IsCopyDragDrop: Boolean read GetIsCopyDragDrop; - - property BorderSize: Integer read GetBorderSize; - property BorderStyle: TcxControlBorderStyle read FBorderStyle write SetBorderStyle; - property CreatingWindow: Boolean read FCreatingWindow; - property FocusOnClick: Boolean read FFocusOnClick write FFocusOnClick default True; - property FontListenerList: IInterfaceList read FFontListenerList; - property Keys: TcxKeys read FKeys write SetKeys; - property MouseRightButtonReleased: Boolean read FMouseRightButtonReleased; - property MouseWheelScrollingKind: TcxMouseWheelScrollingKind read GetMouseWheelScrollingKind; - property PopupMenu: TComponent read FPopupMenu write SetPopupMenu; - property IsScrollingContent: Boolean read FIsScrollingContent; - property ParentBackground{$IFNDEF DELPHI7}: Boolean read FParentBackground - write SetParentBackground{$ENDIF} default True; - - property OnFocusChanged: TNotifyEvent read FOnFocusChanged write FOnFocusChanged; - property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter; - property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function GetDragImages: TDragImageList; override; - function CanFocusEx: Boolean; virtual; - function AcceptMousePosForClick(X, Y: Integer): Boolean; virtual; - procedure InvalidateRect(const R: TRect; EraseBackground: Boolean); - procedure InvalidateRgn(ARegion: TcxRegion; EraseBackground: Boolean); - procedure InvalidateWithChildren; - function IsMouseInPressedArea(X, Y: Integer): Boolean; - procedure PostMouseMove(AMousePos: TPoint); overload; - procedure PostMouseMove; overload; - procedure ScrollContent(ADirection: TcxDirection); - procedure ScrollWindow(DX, DY: Integer; const AScrollRect: TRect); - procedure SetScrollBarInfo(AScrollBarKind: TScrollBarKind; - AMin, AMax, AStep, APage, APos: Integer; AAllowShow, AAllowHide: Boolean); - function StartDrag(DragObject: TDragObject): Boolean; dynamic; - procedure UpdateWithChildren; - - // internal drag and drop (columns moving, ...) - procedure BeginDragAndDrop; dynamic; - procedure FinishDragAndDrop(Accepted: Boolean); - property DragAndDropObject: TcxDragAndDropObject read GetDragAndDropObject; - property DragAndDropObjectClass: TcxDragAndDropObjectClass read GetDragAndDropObjectClass - write FDragAndDropObjectClass; - property DragAndDropState: TcxDragAndDropState read FDragAndDropState - write SetDragAndDropState; - - procedure AddFontListener(AListener: IcxFontListener); - procedure RemoveFontListener(AListener: IcxFontListener); - - procedure LockScrollBars; - procedure UnlockScrollBars; - - // IdxLocalizerListener - procedure TranslationChanged; virtual; - - property ActiveCanvas: TcxCanvas read GetActiveCanvas; - property Bounds: TRect read GetBounds; - property Canvas: TcxCanvas read FCanvas; - property ClientBounds: TRect read GetClientBounds; - property IsDesigning: Boolean read GetIsDesigning; - property IsDestroying: Boolean read GetIsDestroying; - property IsLoading: Boolean read GetIsLoading; - property IsFocused: Boolean read GetIsFocused; - property MouseCaptureObject: TObject read FMouseCaptureObject write SetMouseCaptureObject; - property MouseDownPos: TPoint read FMouseDownPos write FMouseDownPos; - - property TabStop default True; // MayFocus = True - end; - - { customize listbox } - - TcxCustomizeListBox = class(TListBox) - private - FDragAndDropItemIndex: Integer; - FMouseDownPos: TPoint; - function GetDragAndDropItemObject: TObject; - function GetItemObject: TObject; - procedure SetItemObject(Value: TObject); - procedure WMCancelMode(var Message: TWMCancelMode); message WM_CANCELMODE; - procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE; - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - - procedure BeginDragAndDrop; dynamic; - - property DragAndDropItemIndex: Integer read FDragAndDropItemIndex; - property DragAndDropItemObject: TObject read GetDragAndDropItemObject; - public - constructor Create(AOwner: TComponent); override; - property ItemObject: TObject read GetItemObject write SetItemObject; - end; - - { TcxMessageWindow } - - TcxMessageWindow = class - private - FHandle: HWND; - protected - procedure WndProc(var Message: TMessage); virtual; - public - constructor Create; virtual; - destructor Destroy; override; - property Handle: HWND read FHandle; - end; - - { TcxSystemController } - - TcxSystemController = class(TcxMessageWindow) -{$IFDEF DELPHI6} - private - FPrevWakeMainThread: TNotifyEvent; - procedure WakeMainThread(Sender: TObject); - procedure HookSynchronizeWakeup; - procedure UnhookSynchronizeWakeup; - protected - procedure WndProc(var Message: TMessage); override; - public - constructor Create; override; - destructor Destroy; override; -{$ENDIF} - end; - - { TcxBaseHintWindow } - - TcxHintAnimationStyle = (cxhaSlideFromLeft, cxhaSlideFromRight, cxhaSlideDownward, cxhaSlideUpward, - cxhaSlideFromCenter, cxhaHide, cxhaActivate, cxhaFadeIn, cxhaAuto, cxhaNone); - - TcxBaseHintWindow = class(THintWindow) - private - FAnimationStyle: TcxHintAnimationStyle; - FAnimationDelay: Integer; - FBorderStyle: TBorderStyle; - FNeedEraseBackground: Boolean; - procedure WMEraseBkgnd(var Message: TWmEraseBkgnd); message WM_ERASEBKGND; - protected - FStandardHint: Boolean; - procedure CreateParams(var Params: TCreateParams); override; - - function GetAnimationStyle: TcxHintAnimationStyle; - procedure DisableRegion; virtual; - procedure EnableRegion; virtual; - procedure Show; virtual; - public - constructor Create(AOwner: TComponent); override; - procedure ActivateHint(ARect: TRect; const AHint: string); override; - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; - - property AnimationStyle: TcxHintAnimationStyle read FAnimationStyle write FAnimationStyle; - property AnimationDelay: Integer read FAnimationDelay write FAnimationDelay; - property BorderStyle: TBorderStyle read FBorderStyle write FBorderStyle; - property NeedEraseBackground: Boolean read FNeedEraseBackground write FNeedEraseBackground; - end; - - { popup } - - TcxPopupAlignHorz = (pahLeft, pahCenter, pahRight); - TcxPopupAlignVert = (pavTop, pavCenter, pavBottom); - TcxPopupDirection = (pdHorizontal, pdVertical); - - TcxPopupWindow = class(TForm) - private - FAdjustable: Boolean; - FAlignHorz: TcxPopupAlignHorz; - FAlignVert: TcxPopupAlignVert; - FBorderSpace: Integer; - FBorderStyle: TcxPopupBorderStyle; - FCanvas: TcxCanvas; - FDirection: TcxPopupDirection; - FFrameColor: TColor; - FOwnerBounds: TRect; - FOwnerParent: TControl; - FPrevActiveWindow: HWND; - function GetNCHeight: Integer; - function GetNCWidth: Integer; - procedure SetBorderSpace(Value: Integer); - procedure SetBorderStyle(Value: TcxPopupBorderStyle); - procedure WMActivate(var Message: TWMActivate); message WM_ACTIVATE; - procedure WMActivateApp(var Message: TWMActivateApp); message WM_ACTIVATEAPP; - procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED; - protected - procedure Deactivate; override; - procedure Paint; override; - procedure VisibleChanged; dynamic; - - function CalculatePosition: TPoint; virtual; - procedure CalculateSize; virtual; - function GetBorderWidth(ABorder: TcxBorder): Integer; virtual; - function GetClientBounds: TRect; virtual; - function GetFrameWidth(ABorder: TcxBorder): Integer; virtual; - function GetOwnerScreenBounds: TRect; virtual; - procedure InitPopup; virtual; - procedure RestoreControlsBounds; - - procedure DrawFrame; virtual; - - property BorderWidths[ABorder: TcxBorder]: Integer read GetBorderWidth; - property Canvas: TcxCanvas read FCanvas; - property FrameWidths[ABorder: TcxBorder]: Integer read GetFrameWidth; - property NCHeight: Integer read GetNCHeight; - property NCWidth: Integer read GetNCWidth; - public - constructor Create; reintroduce; virtual; - destructor Destroy; override; - procedure CloseUp; virtual; - procedure Popup; virtual; - - property Adjustable: Boolean read FAdjustable write FAdjustable; - property AlignHorz: TcxPopupAlignHorz read FAlignHorz write FAlignHorz; - property AlignVert: TcxPopupAlignVert read FAlignVert write FAlignVert; - property BorderSpace: Integer read FBorderSpace write SetBorderSpace; - property BorderStyle: TcxPopupBorderStyle read FBorderStyle write SetBorderStyle; - property ClientBounds: TRect read GetClientBounds; - property Direction: TcxPopupDirection read FDirection write FDirection; - property FrameColor: TColor read FFrameColor write FFrameColor; - property OwnerBounds: TRect read FOwnerBounds write FOwnerBounds; - property OwnerParent: TControl read FOwnerParent write FOwnerParent; - property OwnerScreenBounds: TRect read GetOwnerScreenBounds; - end; - - { drag image } - - TcxCustomDragImage = class(TcxPopupWindow) - private - {$IFNDEF DELPHI9} - FPopupParent: TCustomForm; - {$ENDIF} - FPositionOffset: TPoint; - function GetAlphaBlended: Boolean; - function GetVisible: Boolean; - procedure SetVisible(Value: Boolean); - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; - protected - procedure CreateParams(var Params: TCreateParams); override; - public - constructor Create; override; - {$IFDEF DELPHI9} - destructor Destroy; override; - {$ENDIF} - procedure Init(const ASourceBounds: TRect; const ASourcePoint: TPoint); - procedure MoveTo(const APosition: TPoint); - procedure Show; - procedure Hide; - - property AlphaBlended: Boolean read GetAlphaBlended; - {$IFNDEF DELPHI9} - property PopupParent: TCustomForm read FPopupParent write FPopupParent; - {$ENDIF} - property PositionOffset: TPoint read FPositionOffset write FPositionOffset; - property Visible: Boolean read GetVisible write SetVisible; - end; - - TcxDragImage = class(TcxCustomDragImage) - private - FImage: TBitmap; - FImageCanvas: TcxCanvas; - function GetWindowCanvas: TcxCanvas; - protected - procedure Paint; override; - property Image: TBitmap read FImage; - property WindowCanvas: TcxCanvas read GetWindowCanvas; - public - constructor Create; override; - destructor Destroy; override; - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; - property Canvas: TcxCanvas read FImageCanvas; - end; - - TcxDragImageClass = class of TcxDragImage; - - { TcxSizeFrame } - - TcxSizeFrame = class(TcxCustomDragImage) - private - FFillSelection: Boolean; - FFrameWidth: Integer; - FRegion: TcxRegion; - - procedure InitializeFrameRegion; - procedure SetWindowRegion; - protected - procedure Paint; override; - - property FrameWidth: Integer read FFrameWidth; - public - constructor Create(AFrameWidth: Integer = 2); reintroduce; virtual; - destructor Destroy; override; - - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; - - procedure DrawSizeFrame(const ARect: TRect); overload; - procedure DrawSizeFrame(const ARect: TRect; const ARegion: TcxRegion); overload; - - property FillSelection: Boolean read FFillSelection write FFillSelection; - end; - - { TcxDragAndDropArrow } - - TcxArrowPlace = (apLeft, apTop, apRight, apBottom); - - TcxDragAndDropArrowClass = class of TcxDragAndDropArrow; - - TcxDragAndDropArrow = class(TcxDragImage) - private - FTransparent: Boolean; - function GetTransparent: Boolean; - protected - function GetImageBackColor: TColor; virtual; - property ImageBackColor: TColor read GetImageBackColor; - public - constructor Create(ATransparent: Boolean); reintroduce; virtual; - procedure Init(AOwner: TControl; const AAreaBounds, AClientRect: TRect; - APlace: TcxArrowPlace); - property Transparent: Boolean read GetTransparent; - end; - - { TcxTimer } - - TcxTimer = class (TComponent) - private - FEnabled: Boolean; - FEventID: Cardinal; - FInterval: Cardinal; - FTimerOn: Boolean; - FOnTimer: TNotifyEvent; - function CanSetTimer: Boolean; - procedure KillTimer; - procedure SetEnabled(Value: Boolean); - procedure SetInterval(Value: Cardinal); - procedure SetOnTimer(Value: TNotifyEvent); - procedure SetTimer; - procedure SetTimerOn(Value: Boolean); - procedure UpdateTimer; - property TimerOn: Boolean read FTimerOn write SetTimerOn; - protected - procedure TimeOut; dynamic; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - published - property Enabled: Boolean read FEnabled write SetEnabled default True; - property Interval: Cardinal read FInterval write SetInterval default 1000; - property OnTimer: TNotifyEvent read FOnTimer write SetOnTimer; - end; - - { TcxDesignController } - - TcxDesignState = (dsDesignerModifying); - TcxDesignStates = set of TcxDesignState; - - TcxDesignController = class - private - FLockDesignerModifiedCount: Integer; - protected - FState: TcxDesignStates; - public - procedure DesignerModified(AForm: TCustomForm); overload; - function IsDesignerModifiedLocked: Boolean; - procedure LockDesignerModified; - procedure UnLockDesignerModified; - end; - -// HINTS -procedure cxActivateHint(AHintWindow: THintWindow; const ARect: TRect; const AHint: string); -procedure cxActivateHintData(AHintWindow: THintWindow; const ARect: TRect; const AHint: string; AData: Pointer); -function cxProcessControlHintInfo(out AHintInfo: THintInfo; - var AHintWindow: THintWindow; AControl: TControl; const AHint: string; - var AHintWinRect: TRect; AData: Pointer = nil): Boolean; - -// WINDOW HANDLE -function CanAllocateHandle(AControl: TWinControl): Boolean; -procedure MapWindowPoint(AHandleFrom, AHandleTo: TcxHandle; var P: TPoint); -procedure MapWindowRect(AHandleFrom, AHandleTo: TcxHandle; var R: TRect); -procedure RecreateControlWnd(AControl: TWinControl); -function cxGetClientRect(AHandle: THandle): TRect; overload; -function cxGetClientRect(AControl: TWinControl): TRect; overload; -function cxGetWindowRect(AHandle: THandle): TRect; overload; -function cxGetWindowRect(AControl: TWinControl): TRect; overload; -function cxWindowFromPoint(P: TPoint): HWND; - -// MOUSE -function GetMouseKeys: WPARAM; -function GetDblClickInterval: Integer; -function GetMouseCursorPos: TPoint; -function GetPointPosition(const ARect: TRect; const P: TPoint; - AHorzSeparation, AVertSeparation: Boolean): TcxPosition; - -// MONITOR -function GetDesktopWorkArea(const P: TPoint): TRect; -function GetMonitorWorkArea(const AMonitor: Integer): TRect; -procedure MakeVisibleOnDesktop(var ABounds: TRect; const ADesktopPoint: TPoint); overload; -procedure MakeVisibleOnDesktop(AControl: TControl); overload; - -// PARENT STRAIN -function IsChildClassWindow(AWnd: HWND): Boolean; -function IsChildEx(AParentWnd, AWnd: HWND): Boolean; -function IsMDIChild(AForm: TCustomForm): Boolean; -function IsMDIForm(AForm: TCustomForm): Boolean; -function IsOwner(AOwnerWnd, AWnd: HWND): Boolean; -function IsOwnerEx(AOwnerWnd, AWnd: HWND): Boolean; -function IsWindowEnabledEx(AWindowHandle: HWND): Boolean; - -// CHARS -function GetCharFromKeyCode(ACode: Word): Char; -function IsCtrlPressed: Boolean; -function IsEditStartChar(C: Char): Boolean; -function IsIncSearchStartChar(C: Char): Boolean; -function IsNumericChar(C: Char; AType: TcxNumberType): Boolean; -function IsSysKey(AKey: Word): Boolean; -function IsTextChar(C: Char): Boolean; -function RemoveAccelChars(const S: AnsiString; AAppendTerminatingUnderscore: Boolean = True): AnsiString; overload; -function RemoveAccelChars(const S: WideString; AAppendTerminatingUnderscore: Boolean = True): WideString; overload; -function ShiftStateToKeys(AShift: TShiftState): WORD; -function TranslateKey(Key: Word): Word; - -// MOUSE TRACKING -procedure BeginMouseTracking(AControl: TWinControl; const ABounds: TRect; - ACaller: IcxMouseTrackingCaller); -procedure EndMouseTracking(ACaller: IcxMouseTrackingCaller); -function IsMouseTracking(ACaller: IcxMouseTrackingCaller): Boolean; - -// HOURGLASS -procedure HideHourglassCursor; -procedure ShowHourglassCursor; - -// POPUPMENU -function GetPopupMenuHeight(APopupMenu: TPopupMenu): Integer; -function IsPopupMenuShortCut(APopupMenu: TComponent; - var Message: TWMKey): Boolean; -function ShowPopupMenu(ACaller, AComponent: TComponent; X, Y: Integer): Boolean; -function ShowPopupMenuFromCursorPos(ACaller, AComponent: TComponent): Boolean; - -// DRAG&DROP -function cxExtractDragObjectSource(ADragObject: TObject): TObject; -function DragDetect(Wnd: HWND): TcxDragDetect; -function GetDragObject: TDragObject; -function IsPointInDragDetectArea(const AMouseDownPos: TPoint; X, Y: Integer): Boolean; - -// DRAG&DROP ARROW -function GetDragAndDropArrowBounds(const AAreaBounds, AClientRect: TRect; APlace: TcxArrowPlace): TRect; -procedure GetDragAndDropArrowPoints(const ABounds: TRect; APlace: TcxArrowPlace; - out P: TPointArray; AForRegion: Boolean); -procedure DrawDragAndDropArrow(ACanvas: TcxCanvas; const ABounds: TRect; APlace: TcxArrowPlace); - -// WINDOWS -function cxMessageWindow: TcxMessageWindow; -function cxMessageDlg(const AMessage, ACaption: string; ADlgType: TMsgDlgType; - AButtons: TMsgDlgButtons; AHelpCtx: Longint): Integer; -procedure DialogApplyFont(ADialog: TCustomForm; AFont: TFont); - -// DESIGNER -function DesignController: TcxDesignController; -procedure SetDesignerModified(AComponent: TComponent); -function cxGetFullComponentName(AComponent: TComponent): string; - -function GET_APPCOMMAND_LPARAM(lParam: LPARAM): Integer; -{$EXTERNALSYM GET_APPCOMMAND_LPARAM} - -{$IFNDEF DELPHI6} -function CheckWin32Version(AMajor: Integer; AMinor: Integer = 0): Boolean; -{$ENDIF} - -type - TcxGetParentFormForDockingFunc = function (AControl: TControl): TCustomForm; - TcxGetParentWndForDockingFunc = function (AWnd: HWND): HWND; - -var - cxDragAndDropWindowTransparency: Byte = 180; - cxGetParentFormForDocking: TcxGetParentFormForDockingFunc = nil; - cxGetParentWndForDocking: TcxGetParentWndForDockingFunc = nil; - dxISpellChecker: IdxSpellChecker; - dxWMGetSkinnedMessage: WORD; - dxWMSetSkinnedMessage: WORD; - -implementation - -{$R cxControls.res} - -uses - SysUtils, Math, dxUxTheme, dxThemeConsts, cxGeometry, cxLibraryConsts, - cxContainer; - -const - crFullScroll = crBase + 1; - crHorScroll = crBase + 2; - crVerScroll = crBase + 3; - crUpScroll = crBase + 4; - crRightScroll = crBase + 5; - crDownScroll = crBase + 6; - crLeftScroll = crBase + 7; - - ScreenHandle = 0; - dxWMGetSkinnedMessageID = '{B2CE3777-44D8-4998-9701-47BBBC10B656}'; - dxWMSetSkinnedMessageID = '{B2CE3777-44D8-1321-4656-12C54AA613BB}'; - -type - TControlAccess = class(TControl); - TCustomFormAccess = class(TCustomForm); - TMenuItemAccess = class(TMenuItem); - - TcxTimerWindow = class(TcxMessageWindow) - protected - procedure WndProc(var Message: TMessage); override; - end; - -var - FUnitIsFinalized: Boolean; - FDragObject: TDragObject; - FUser32DLL: HMODULE; - FcxMessageWindow: TcxMessageWindow; - FcxTimerWindow: TcxTimerWindow; - FActiveTimerList: TList; - FDesignController: TcxDesignController; - FSystemController: TcxSystemController; - -function IsMonitorValid(const P: TPoint): Boolean; -var - AMonitor: TMonitor; - AForm: TCustomForm; - AControl: TWinControl; -begin - AMonitor := Screen.MonitorFromPoint(P); - if AMonitor = nil then - begin - AControl := FindVCLWindow(P); - if AControl <> nil then - AForm := GetParentForm(AControl) - else - AForm := Application.MainForm; - if AForm <> nil then - AMonitor := AForm.Monitor; - end; - Result := AMonitor <> nil; -end; - -procedure cxActivateHint(AHintWindow: THintWindow; const ARect: TRect; const AHint: string); -begin -{$IFNDEF DELPHI12} - if not IsMonitorValid(ARect.TopLeft) then Exit; -{$ENDIF} - AHintWindow.ActivateHint(ARect, AHint); -end; - -procedure cxActivateHintData(AHintWindow: THintWindow; const ARect: TRect; const AHint: string; AData: Pointer); -begin -{$IFNDEF DELPHI12} - if not IsMonitorValid(ARect.TopLeft) then Exit; -{$ENDIF} - AHintWindow.ActivateHintData(ARect, AHint, AData); -end; - -function cxProcessControlHintInfo(out AHintInfo: THintInfo; - var AHintWindow: THintWindow; AControl: TControl; const AHint: string; - var AHintWinRect: TRect; AData: Pointer = nil): Boolean; - - procedure ValidateHintWindow(AHintClass: THintWindowClass; AColor: TColor); - begin - if AHintClass = nil then AHintClass := HintWindowClass; - if (AHintWindow = nil) or (AHintWindow.ClassType <> AHintClass) then - begin - AHintWindow.Free; - AHintWindow := AHintClass.Create(Application); - AHintWindow.Color := AColor; - end; - end; - - function MultiLineWidth(const Value: string): Integer; - var - W: Integer; - P, Start: PChar; - S: string; - begin - Result := 0; - P := Pointer(Value); - if P <> nil then - while P^ <> #0 do - begin - Start := P; - while not dxCharInSet(P^, [#0, #10, #13]) do - P := StrNextChar(P); - SetString(S, Start, P - Start); - W := AHintWindow.Canvas.TextWidth(S); - if W > Result then - Result := W; - if P^ = #13 then Inc(P); - if P^ = #10 then Inc(P); - end; - end; - -var - AClientOrigin, AParentOrigin: TPoint; - ADelta: Integer; -begin - Result := True; - AHintInfo.HintControl := AControl; - AHintInfo.HintWindowClass := THintWindowClass(AHintWindow.ClassType); - AHintInfo.HintPos := AHintWinRect.TopLeft; - AHintInfo.HintMaxWidth := Screen.Width; - AHintInfo.HintColor := Application.HintColor; - AHintInfo.CursorPos := AControl.ScreenToClient(GetMouseCursorPos); - AHintInfo.ReshowTimeout := 0; - AHintInfo.HideTimeout := Application.HintHidePause; - AHintInfo.HintStr := AHint; - AHintInfo.HintData := AData; - AHintInfo.CursorRect := AControl.BoundsRect; - AClientOrigin := AControl.ClientOrigin; - AParentOrigin.X := 0; - AParentOrigin.Y := 0; - if AControl.Parent <> nil then - AParentOrigin := AControl.Parent.ClientOrigin - else - if (AControl is TWinControl) and (TWinControl(AControl).ParentWindow <> 0) then - Windows.ClientToScreen(TWinControl(AControl).ParentWindow, AParentOrigin); - OffsetRect(AHintInfo.CursorRect, AParentOrigin.X - AClientOrigin.X, AParentOrigin.Y - AClientOrigin.Y); - if Assigned(Application.OnShowHint) then - begin - Application.OnShowHint(AHintInfo.HintStr, Result, AHintInfo); - if Result and (AHintInfo.HintStr <> '') then - begin - ValidateHintWindow(AHintInfo.HintWindowClass, AHintInfo.HintColor); - AHintWindow.BiDiMode := AControl.BiDiMode; - with AHintInfo do - begin - AHintWinRect := AHintWindow.CalcHintRect(HintMaxWidth, HintStr, HintData); - OffsetRect(AHintWinRect, HintPos.X, HintPos.Y); - end; - if AHintWindow.UseRightToLeftAlignment then - with AHintWinRect do - begin - ADelta := MultiLineWidth(AHintInfo.HintStr) + 5; - Dec(Left, ADelta); - Dec(Right, ADelta); - end; - end; - end; -end; - -{$IFNDEF DELPHI7} - -type - TSetLayeredWindowAttributes = function(Hwnd: THandle; crKey: COLORREF; bAlpha: Byte; dwFlags: DWORD): Boolean; stdcall; - -var - SetLayeredWindowAttributes: TSetLayeredWindowAttributes = nil; - -procedure InitSetLayeredWindowAttributes; -var - AModule: HMODULE; -begin - AModule := GetModuleHandle('User32.dll'); - if AModule <> 0 then - @SetLayeredWindowAttributes := GetProcAddress(AModule, 'SetLayeredWindowAttributes'); -end; - -{$ENDIF} - -function CanAllocateHandle(AControl: TWinControl): Boolean; -begin - Result := AControl.HandleAllocated or - not (csDestroying in AControl.ComponentState) and - ((AControl.ParentWindow <> 0) or - (AControl.Parent <> nil) and CanAllocateHandle(AControl.Parent) or - ((AControl is TCustomForm) or (AControl is TCustomFrame)) and (Application <> nil) and (Application.Handle <> 0)); -end; - -function cxMessageWindow: TcxMessageWindow; -begin - if (FcxMessageWindow = nil) and not FUnitIsFinalized then - FcxMessageWindow := TcxMessageWindow.Create; - Result := FcxMessageWindow; -end; - -function cxMessageDlg(const AMessage, ACaption: string; ADlgType: TMsgDlgType; - AButtons: TMsgDlgButtons; AHelpCtx: Longint): Integer; -begin - with CreateMessageDialog(AMessage, ADlgType, AButtons) do - try - if ACaption <> '' then - Caption := ACaption; - HelpContext := AHelpCtx; - Position := poScreenCenter; - Result := ShowModal; - finally - Free; - end; -end; - -function DragDetect(Wnd: HWND): TcxDragDetect; -var - NoDragZone: TRect; - P: TPoint; - Msg: TMsg; -begin - Result := ddCancel; - - P := GetMouseCursorPos; - NoDragZone.Right := 2 * Mouse.DragThreshold;//GetSystemMetrics(SM_CXDRAG); - NoDragZone.Bottom := 2 * Mouse.DragThreshold;//GetSystemMetrics(SM_CYDRAG); - NoDragZone.Left := P.X - NoDragZone.Right div 2; - NoDragZone.Top := P.Y - NoDragZone.Bottom div 2; - Inc(NoDragZone.Right, NoDragZone.Left); - Inc(NoDragZone.Bottom, NoDragZone.Top); - - SetCapture(Wnd); - try - while GetCapture = Wnd do - begin - case Integer(GetMessage(Msg, 0, 0, 0)) of - -1: Break; - 0: begin - PostQuitMessage(Msg.wParam); - Break; - end; - end; - try - case Msg.message of - WM_KEYDOWN, WM_KEYUP: - if Msg.wParam = VK_ESCAPE then Break; - WM_MOUSEMOVE: - if Msg.hwnd = Wnd then - begin - P := Point(LoWord(Msg.lParam), HiWord(Msg.lParam)); - ClientToScreen(Msg.hwnd, P); - if not PtInRect(NoDragZone, P) then - begin - Result := ddDrag; - Break; - end; - end; - WM_LBUTTONUP, WM_RBUTTONUP, WM_MBUTTONUP: - begin - Result := ddNone; - Break; - end; - end; - finally - TranslateMessage(Msg); - DispatchMessage(Msg); - end; - end; - finally - if GetCapture = Wnd then ReleaseCapture; - end; -end; - -function GetCharFromKeyCode(ACode: Word): Char; -const - MAPVK_VK_TO_VSC = 0; - -var - AScanCode: UINT; - AKeyState: TKeyboardState; - ABufChar: Word; -begin - ABufChar := 0; - AScanCode := MapVirtualKey(ACode, MAPVK_VK_TO_VSC); - GetKeyboardState(AKeyState); -{$IFDEF DELPHI12} - if ToUnicode(ACode, AScanCode, AKeyState, ABufChar, 1, 0) = 1 then - Result := Char(ABufChar) - else - Result := #0; -{$ELSE} - if ToAscii(ACode, AScanCode, AKeyState, @ABufChar, 0) = 1 then - Result := PChar(@ABufChar)^ - else - Result := #0; -{$ENDIF} -end; - -function GetMouseKeys: WPARAM; -begin - Result := 0; - if GetAsyncKeyState(VK_LBUTTON) < 0 then Inc(Result, MK_LBUTTON); - if GetAsyncKeyState(VK_MBUTTON) < 0 then Inc(Result, MK_MBUTTON); - if GetAsyncKeyState(VK_RBUTTON) < 0 then Inc(Result, MK_RBUTTON); - if GetAsyncKeyState(VK_CONTROL) < 0 then Inc(Result, MK_CONTROL); - if GetAsyncKeyState(VK_SHIFT) < 0 then Inc(Result, MK_SHIFT); -end; - -function GetDblClickInterval: Integer; -begin - Result := GetDoubleClickTime; -end; - -type - HMONITOR = type Integer; - PMonitorInfo = ^TMonitorInfo; - TMonitorInfo = packed record - cbSize: DWORD; - rcMonitor: TRect; - rcWork: TRect; - dwFalgs: DWORD; - end; - -function GetDesktopWorkArea(const P: TPoint): TRect; -const - MONITOR_DEFAULTTONEAREST = $2; -var - AMonitor: Integer; - MonitorFromPoint: function(ptScreenCoords: TPoint; dwFlags: DWORD): HMONITOR; stdcall; -begin - AMonitor := 0; - if FUser32DLL > 32 then - begin - MonitorFromPoint := GetProcAddress(FUser32DLL, 'MonitorFromPoint'); - if Assigned(MonitorFromPoint) then - begin - AMonitor := MonitorFromPoint(P, MONITOR_DEFAULTTONEAREST); - end; - end; - Result := GetMonitorWorkArea(AMonitor); -end; - -function GetMonitorWorkArea(const AMonitor: Integer): TRect; -var - Info: TMonitorInfo; - GetMonitorInfo: function(hMonitor: HMONITOR; - lpMonitorInfo: PMonitorInfo): Boolean; stdcall; -begin - if FUser32DLL > 32 then - GetMonitorInfo := GetProcAddress(FUser32DLL,{$IFDEF DELPHI12} 'GetMonitorInfoW' {$ELSE} 'GetMonitorInfoA' {$ENDIF}) - else - GetMonitorInfo := nil; - if (AMonitor = 0) or not Assigned(GetMonitorInfo) then - SystemParametersInfo(SPI_GETWORKAREA, 0, @Result, 0) - else - begin - Info.cbSize := SizeOf(Info); - GetMonitorInfo(AMonitor, @Info); - Result := Info.rcWork; - end; -end; - -function GetMouseCursorPos: TPoint; -begin - if not Windows.GetCursorPos(Result) then - Result := cxInvalidPoint; -end; - -function GetPointPosition(const ARect: TRect; const P: TPoint; - AHorzSeparation, AVertSeparation: Boolean): TcxPosition; -const - Positions: array[Boolean, Boolean] of TcxPosition = - ((posBottom, posRight), (posLeft, posTop)); -type - TCorner = (BottomLeft, TopLeft, TopRight, BottomRight); - - function GetCornerCoords(ACorner: TCorner): TPoint; - begin - case ACorner of - BottomLeft: - Result := Point(ARect.Left, ARect.Bottom); - TopLeft: - Result := ARect.TopLeft; - TopRight: - Result := Point(ARect.Right, ARect.Top); - BottomRight: - Result := ARect.BottomRight; - end; - end; - - function GetSign(const P1, P2, P: TPoint): Integer; - begin - Result := (P.X - P1.X) * (P2.Y - P1.Y) - (P.Y - P1.Y) * (P2.X - P1.X); - end; - -var - ASign1, ASign2: Integer; -begin - if AHorzSeparation and AVertSeparation then - begin - ASign1 := GetSign(GetCornerCoords(BottomLeft), GetCornerCoords(TopRight), P); - ASign2 := GetSign(GetCornerCoords(TopLeft), GetCornerCoords(BottomRight), P); - Result := Positions[ASign1 >= 0, ASign2 >= 0]; - end - else - if AHorzSeparation then - if P.X < GetRangeCenter(ARect.Left, ARect.Right) then - Result := posLeft - else - Result := posRight - else - if AVertSeparation then - if P.Y < GetRangeCenter(ARect.Top, ARect.Bottom) then - Result := posTop - else - Result := posBottom - else - Result := posNone; -end; - -function IsChildClassWindow(AWnd: HWND): Boolean; -begin - Result := GetWindowLong(AWnd, GWL_STYLE) and WS_CHILD = WS_CHILD; -end; - -function IsChildEx(AParentWnd, AWnd: HWND): Boolean; -begin - Result := (AParentWnd <> 0) and ((AParentWnd = AWnd) or IsChild(AParentWnd, AWnd)); -end; - -function FormStyle(AForm: TCustomForm): TFormStyle; -begin - Result := TCustomFormAccess(AForm).FormStyle; -end; - -function IsMDIChild(AForm: TCustomForm): Boolean; -begin - Result := (AForm <> nil) and not (csDesigning in AForm.ComponentState) and - (FormStyle(AForm) = fsMDIChild); -end; - -function IsMDIForm(AForm: TCustomForm): Boolean; -begin - Result := (AForm <> nil) and not (csDesigning in AForm.ComponentState) and - (FormStyle(AForm) = fsMDIForm); -end; - -function IsCtrlPressed: Boolean; -begin - Result := GetAsyncKeyState(VK_CONTROL) < 0; -end; - -function IsEditStartChar(C: Char): Boolean; -begin - Result := IsTextChar(C) or (C = #8) or (C = ^V) or (C = ^X); -end; - -function IsIncSearchStartChar(C: Char): Boolean; -begin - Result := IsTextChar(C) or (C = #8); -end; - -function IsOwner(AOwnerWnd, AWnd: HWND): Boolean; -begin - if AOwnerWnd <> 0 then - repeat - AWnd := GetParent(AWnd); - Result := AWnd = AOwnerWnd; - until Result or (AWnd = 0) - else - Result := False; -end; - -function IsOwnerEx(AOwnerWnd, AWnd: HWND): Boolean; -begin - Result := (AOwnerWnd <> 0) and ((AOwnerWnd = AWnd) or IsOwner(AOwnerWnd, AWnd)); -end; - -function IsWindowEnabledEx(AWindowHandle: HWND): Boolean; -begin - Result := IsWindowEnabled(AWindowHandle); - if IsChildClassWindow(AWindowHandle) then - Result := Result and IsWindowEnabledEx(GetParent(AWindowHandle)) -end; - -function IsPointInDragDetectArea(const AMouseDownPos: TPoint; X, Y: Integer): Boolean; -begin - Result := - (Abs(X - AMouseDownPos.X) < Mouse.DragThreshold) and - (Abs(Y - AMouseDownPos.Y) < Mouse.DragThreshold); -end; - -function IsNumericChar(C: Char; AType: TcxNumberType): Boolean; -begin -{$IFDEF DELPHI12} - Result := (C = '-') or (C = '+') or - (dxGetWideCharCType1(C) and C1_DIGIT > 0); -{$ELSE} - Result := C in ['-', '+', '0'..'9']; -{$ENDIF} - if AType in [ntFloat, ntExponent] then - begin - Result := Result or (C = DecimalSeparator); - if AType = ntExponent then - Result := Result or (C = 'e') or (C = 'E'); - end; -end; - -function IsSysKey(AKey: Word): Boolean; -begin - Result := AKey in [VK_CANCEL, VK_BACK, VK_TAB, VK_CLEAR, VK_RETURN, VK_SHIFT, VK_CONTROL, - VK_MENU, VK_PAUSE, VK_CAPITAL, VK_ESCAPE, VK_PRIOR..VK_HELP, - VK_LWIN..VK_SCROLL, VK_LSHIFT..VK_RMENU, VK_PROCESSKEY, VK_ATTN..VK_OEM_CLEAR]; -end; - -function IsTextChar(C: Char): Boolean; -begin -{$IFDEF DELPHI12} - Result := not (dxGetWideCharCType1(C) and C1_CNTRL > 0); -{$ELSE} - Result := C in [#32..#255]; -{$ENDIF} -end; - -procedure MakeVisibleOnDesktop(var ABounds: TRect; const ADesktopPoint: TPoint); -var - ADesktopBounds: TRect; -begin - ADesktopBounds := GetDesktopWorkArea(ADesktopPoint); - if ABounds.Right > ADesktopBounds.Right then - Offsetrect(ABounds, ADesktopBounds.Right - ABounds.Right, 0); - if ABounds.Bottom > ADesktopBounds.Bottom then - OffsetRect(ABounds, 0, ADesktopBounds.Bottom - ABounds.Bottom); - if ABounds.Left < ADesktopBounds.Left then - OffsetRect(ABounds, ADesktopBounds.Left - ABounds.Left, 0); - if ABounds.Top < ADesktopBounds.Top then - OffsetRect(ABounds, 0, ADesktopBounds.Top - ABounds.Top); -end; - -procedure MakeVisibleOnDesktop(AControl: TControl); -var - ABounds: TRect; -begin - ABounds := AControl.BoundsRect; - MakeVisibleOnDesktop(ABounds, ABounds.TopLeft); - AControl.BoundsRect := ABounds; -end; - -procedure MapWindowPoint(AHandleFrom, AHandleTo: TcxHandle; var P: TPoint); -begin {10} - MapWindowPoints(AHandleFrom, AHandleTo, P, 1); -end; - -procedure MapWindowRect(AHandleFrom, AHandleTo: TcxHandle; var R: TRect); -var - p: TPoint; -begin - p := R.TopLeft; - MapWindowPoint(AHandleFrom, AHandleTo, p); - R.TopLeft := p; - p := R.BottomRight; - MapWindowPoint(AHandleFrom, AHandleTo, p); - R.BottomRight := p; -end; - -procedure RecreateControlWnd(AControl: TWinControl); -begin - if AControl.HandleAllocated then - AControl.Perform(CM_RECREATEWND, 0, 0); -end; - -function cxGetClientRect(AHandle: THandle): TRect; -begin - if not GetClientRect(AHandle, Result) then - Result := cxEmptyRect; -end; - -function cxGetClientRect(AControl: TWinControl): TRect; -begin - if not AControl.HandleAllocated or not GetClientRect(AControl.Handle, Result) then - Result := cxEmptyRect; -end; - -function cxGetWindowRect(AHandle: THandle): TRect; -begin - if not GetWindowRect(AHandle, Result) then - Result := cxEmptyRect; -end; - -function cxGetWindowRect(AControl: TWinControl): TRect; -begin - if not AControl.HandleAllocated or not GetWindowRect(AControl.Handle, Result) then - Result := cxEmptyRect; -end; - -function cxWindowFromPoint(P: TPoint): HWND; - - function FindOne(Wnd: HWND; P: TPoint): HWND; - begin - Result := ChildWindowFromPointEx(Wnd, P, CWP_SKIPINVISIBLE); - if Result = 0 then - Result := Wnd - else - if Result <> Wnd then - begin - MapWindowPoints(Wnd, Result, P, 1); - Result := FindOne(Result, P); - end; - end; - -begin - Result := WindowFromPoint(P); - if Result <> 0 then - begin - ScreenToClient(Result, P); - Result := FindOne(Result, P); - end; -end; - -function RemoveAccelChars(const S: AnsiString; - AAppendTerminatingUnderscore: Boolean = True): AnsiString; -var - ALastIndex, I: Integer; -begin - Result := ''; - I := 1; - ALastIndex := Length(S); - while I <= ALastIndex do - begin - if S[I] = '&' then - if (I < ALastIndex) or not AAppendTerminatingUnderscore then - Inc(I) - else - begin - Result := Result + '_'; - Break; - end; - Result := Result + S[I]; - Inc(I); - end; -end; - -function RemoveAccelChars(const S: WideString; - AAppendTerminatingUnderscore: Boolean = True): WideString; -var - ALastIndex, I: Integer; -begin - Result := ''; - I := 1; - ALastIndex := Length(S); - while I <= ALastIndex do - begin - if S[I] = '&' then - if (I < ALastIndex) or not AAppendTerminatingUnderscore then - Inc(I) - else - begin - Result := Result + '_'; - Break; - end; - Result := Result + S[I]; - Inc(I); - end; -end; - -procedure SetDesignerModified(AComponent: TComponent); -var - ADesigner: IDesignerNotify; - //AParentForm: TCustomForm; -begin - if (AComponent is TcxControl) and not TcxControl(AComponent).IsDesigning or - not (AComponent is TcxControl) and not (csDesigning in AComponent.ComponentState) then - Exit; - ADesigner := nil; - {if AComponent is TControl then - begin - AParentForm := GetParentForm(TControl(AComponent)); - if AParentForm <> nil then - ADesigner := AParentForm.Designer; - end - else} - ADesigner := FindRootDesigner(AComponent); - if ADesigner <> nil then - ADesigner.Modified; -end; - -function cxGetFullComponentName(AComponent: TComponent): string; -begin - if AComponent = nil then - Result := '' - else - if AComponent.Owner = nil then - Result := AComponent.Name - else - Result := cxGetFullComponentName(AComponent.Owner) + '.' + AComponent.Name; -end; - -function ShiftStateToKeys(AShift: TShiftState): WORD; -begin - Result := 0; - if ssShift in AShift then Inc(Result, MK_SHIFT); - if ssCtrl in AShift then Inc(Result, MK_CONTROL); - if ssLeft in AShift then Inc(Result, MK_LBUTTON); - if ssRight in AShift then Inc(Result, MK_RBUTTON); - if ssMiddle in AShift then Inc(Result, MK_MBUTTON); -end; - -function TranslateKey(Key: Word): Word; -begin - Result := Key; -end; - - {$IFDEF USETCXSCROLLBAR} - -{ TcxSettingsController } - -type - TcxSettingsController = class - private - FList: TList; - protected - FWindow: HWND; - procedure MainWndProc(var Message: TMessage); - procedure WndProc(var Message: TMessage); virtual; - public - constructor Create; - destructor Destroy; override; - procedure AddListener(AListener: TcxControl); - procedure NotifyListeners; - procedure RemoveListener(AListener: TcxControl); - end; - -constructor TcxSettingsController.Create; -begin - inherited Create; - FList := TList.Create; -end; - -destructor TcxSettingsController.Destroy; -begin - FList.Free; - inherited Destroy; -end; - -procedure TcxSettingsController.AddListener(AListener: TcxControl); -begin - with FList do - if IndexOf(AListener) = -1 then - begin - if Count = 0 then - FWindow := AllocateHWnd(MainWndProc); - Add(AListener); - end; -end; - -procedure TcxSettingsController.RemoveListener(AListener: TcxControl); -begin - FList.Remove(AListener); - if FList.Count = 0 then - DeallocateHWnd(FWindow); -end; - -procedure TcxSettingsController.NotifyListeners; -var - I: Integer; -begin - for I := 0 to FList.Count - 1 do - if TCustomControl(FList[I]).HandleAllocated then - SendNotifyMessage(TCustomControl(FList[I]).Handle, CM_NCSIZECHANGED, 0, 0); -end; - -procedure TcxSettingsController.MainWndProc(var Message: TMessage); -begin - try - WndProc(Message); - except - Application.HandleException(Self); - end; -end; - -procedure TcxSettingsController.WndProc(var Message: TMessage); -begin - if (Message.Msg = WM_SETTINGCHANGE) and (Message.WParam = SPI_SETNONCLIENTMETRICS) then - begin - NotifyListeners; - Message.Result := 0; - Exit; - end; - with Message do Result := DefWindowProc(FWindow, Msg, wParam, lParam); -end; - -var - FSettingsController: TcxSettingsController; - -function cxSettingsController: TcxSettingsController; -begin - if FSettingsController = nil then - FSettingsController := TcxSettingsController.Create; - Result := FSettingsController; -end; - {$ENDIF} - -{ mouse tracking } - -var - FMouseTrackingTimerList: TList; - -function MouseTrackingTimerList: TList; -begin - if not FUnitIsFinalized and (FMouseTrackingTimerList = nil) then - FMouseTrackingTimerList := TList.Create; - Result := FMouseTrackingTimerList; -end; - -type - TMouseTrackingTimer = class(TcxTimer) - protected - procedure TimerHandler(Sender: TObject); - public - Caller: IcxMouseTrackingCaller; - Control: TWinControl; - Bounds: TRect; - constructor Create(AOwner: TComponent); override; - end; - -constructor TMouseTrackingTimer.Create(AOwner: TComponent); -begin - inherited; - Interval := 10; - OnTimer := TimerHandler; -end; - -procedure TMouseTrackingTimer.TimerHandler(Sender: TObject); -var - ACaller: IcxMouseTrackingCaller; - - function IsParentFormDisabled: Boolean; - begin - Result := (Control = nil) or not Control.HandleAllocated or not IsWindowEnabledEx(Control.Handle); - end; - - function PtInCaller: Boolean; - var - ACaller2: IcxMouseTrackingCaller2; - begin - if Supports(Caller, IcxMouseTrackingCaller2, ACaller2) then - Result := Control.HandleAllocated and - (Caller as IcxMouseTrackingCaller2).PtInCaller(Control.ScreenToClient(GetMouseCursorPos)) - else - Result := PtInRect(Bounds, GetMouseCursorPos); - end; - -begin - if not PtInCaller or IsParentFormDisabled then - begin - ACaller := Caller; - if (Control <> nil) and Control.HandleAllocated and - (not PtInRect(Control.ClientRect, Control.ScreenToClient(GetMouseCursorPos)) or IsParentFormDisabled) then - SendMessage(Control.Handle, CM_MOUSELEAVE, 0, LPARAM(Control)); - if ACaller <> nil then ACaller.MouseLeave; - EndMouseTracking(ACaller); - end; -end; - -procedure BeginMouseTracking(AControl: TWinControl; const ABounds: TRect; - ACaller: IcxMouseTrackingCaller); -var - ATimer: TMouseTrackingTimer; -begin - if FUnitIsFinalized or IsMouseTracking(ACaller) then Exit; - ATimer := TMouseTrackingTimer.Create(nil); - with ATimer do - begin - Control := AControl; - Bounds := ABounds; - if Control <> nil then - MapWindowRect(Control.Handle, ScreenHandle, Bounds); - Caller := ACaller; - end; - MouseTrackingTimerList.Add(ATimer); -end; - -function GetMouseTrackingTimer(ACaller: IcxMouseTrackingCaller): TMouseTrackingTimer; -var - I: Integer; -begin - if not FUnitIsFinalized then - begin - for I := 0 to MouseTrackingTimerList.Count - 1 do - begin - Result := TMouseTrackingTimer(MouseTrackingTimerList[I]); - if Result.Caller = ACaller then Exit; - end; - end; - Result := nil; -end; - -procedure EndMouseTracking(ACaller: IcxMouseTrackingCaller); -var - ATimer: TMouseTrackingTimer; -begin - ATimer := GetMouseTrackingTimer(ACaller); - if ATimer <> nil then - begin - MouseTrackingTimerList.Remove(ATimer); - ATimer.Free; - end; -end; - -{ hourglass cursor showing } - -var - FPrevScreenCursor: TCursor; - FHourglassCursorUseCount: Integer; - -function IsMouseTracking(ACaller: IcxMouseTrackingCaller): Boolean; -begin - Result := not FUnitIsFinalized and (GetMouseTrackingTimer(ACaller) <> nil); -end; - -procedure HideHourglassCursor; -begin - if FHourglassCursorUseCount <> 0 then - begin - Dec(FHourglassCursorUseCount); - if FHourglassCursorUseCount = 0 then - Screen.Cursor := FPrevScreenCursor; - end; -end; - -procedure ShowHourglassCursor; -begin - if FHourglassCursorUseCount = 0 then - begin - FPrevScreenCursor := Screen.Cursor; - Screen.Cursor := crHourglass; - end; - Inc(FHourglassCursorUseCount); -end; - -{ popup menu routines } - -function GetPopupMenuHeight(APopupMenu: TPopupMenu): Integer; - - function IsOwnerDrawItem(AMenuItem: TMenuItem): Boolean; - begin - Result := APopupMenu.OwnerDraw or (AMenuItem.GetImageList <> nil) or - not AMenuItem.Bitmap.Empty; - end; - -const - AMenuItemHeightCorrection = 4; - APopupMenuHeightCorrection = 4; -var - ACanvas: TcxScreenCanvas; - AMenuItemDefaultHeight, AMenuItemHeight, AMenuItemWidth, I: Integer; -begin - ACanvas := TcxScreenCanvas.Create; - try - ACanvas.Font.Assign(Screen.MenuFont); - AMenuItemDefaultHeight := ACanvas.TextHeight('Qg') + AMenuItemHeightCorrection; - - Result := 0; - for I := 0 to APopupMenu.Items.Count - 1 do - if APopupMenu.Items[I].Visible then - begin - AMenuItemHeight := AMenuItemDefaultHeight; - if IsOwnerDrawItem(APopupMenu.Items[I]) then - TMenuItemAccess(APopupMenu.Items[I]).MeasureItem(ACanvas.Canvas, - AMenuItemWidth, AMenuItemHeight); - Inc(Result, AMenuItemHeight); - end; - Inc(Result, APopupMenuHeightCorrection); - finally - ACanvas.Free; - end; -end; - -function IsPopupMenuShortCut(APopupMenu: TComponent; - var Message: TWMKey): Boolean; -var - AIcxPopupMenu: IcxPopupMenu; -begin - Result := False; - if APopupMenu = nil then - Exit; - - if Supports(APopupMenu, IcxPopupMenu, AIcxPopupMenu) then - Result := AIcxPopupMenu.IsShortCutKey(Message) - else - Result := (APopupMenu is TPopupMenu) and (TPopupMenu(APopupMenu).WindowHandle <> 0) and - TPopupMenu(APopupMenu).IsShortCut(Message); -end; - -function ShowPopupMenu(ACaller, AComponent: TComponent; X, Y: Integer): Boolean; -var - AIcxPopupMenu: IcxPopupMenu; -begin - Result := False; - if AComponent <> nil then - begin - Result := True; - if Supports(AComponent, IcxPopupMenu, AIcxPopupMenu) then - AIcxPopupMenu.Popup(X, Y) - else - if (AComponent is TPopupMenu) and TPopupMenu(AComponent).AutoPopup then - with TPopupMenu(AComponent) do - begin - PopupComponent := ACaller; - Popup(X, Y); - end - else - Result := False; - end; -end; - -function ShowPopupMenuFromCursorPos(ACaller, AComponent: TComponent): Boolean; -var - P: TPoint; -begin - GetCursorPos(P); - Result := ShowPopupMenu(ACaller, AComponent, P.X, P.Y); -end; - -function cxExtractDragObjectSource(ADragObject: TObject): TObject; -begin - if ADragObject is TcxDragControlObject then - Result := TcxDragControlObject(ADragObject).Control - else - Result := ADragObject; -end; - -function GetDragObject: TDragObject; -begin - Result := FDragObject; -end; - -{ drag and drop arrow } - -const - DragAndDropArrowWidth = 11; - DragAndDropArrowHeight = 9; - DragAndDropArrowBorderColor = clBlack; - DragAndDropArrowColor = clLime; - -function GetDragAndDropArrowBounds(const AAreaBounds, AClientRect: TRect; - APlace: TcxArrowPlace): TRect; - - procedure CheckResult; - begin - if IsRectEmpty(AClientRect) then Exit; - with AClientRect do - begin - Result.Left := Max(Result.Left, Left); - Result.Right := Max(Result.Right, Left); - Result.Left := Min(Result.Left, Right - 1); - Result.Right := Min(Result.Right, Right - 1); - - Result.Top := Max(Result.Top, Top); - Result.Bottom := Max(Result.Bottom, Top); - Result.Top := Min(Result.Top, Bottom - 1); - Result.Bottom := Min(Result.Bottom, Bottom - 1); - end; - end; - - procedure CalculateHorizontalArrowBounds; - begin - Result.Bottom := Result.Top + 1; - InflateRect(Result, 0, DragAndDropArrowWidth div 2); - if APlace = apLeft then - begin - Result.Right := Result.Left; - Dec(Result.Left, DragAndDropArrowHeight); - end - else - begin - Result.Left := Result.Right; - Inc(Result.Right, DragAndDropArrowHeight); - end; - end; - - procedure CalculateVerticalArrowBounds; - begin - Result.Right := Result.Left + 1; - InflateRect(Result, DragAndDropArrowWidth div 2, 0); - if APlace = apTop then - begin - Result.Bottom := Result.Top; - Dec(Result.Top, DragAndDropArrowHeight); - end - else - begin - Result.Top := Result.Bottom; - Inc(Result.Bottom, DragAndDropArrowHeight); - end; - end; - -begin - Result := AAreaBounds; - CheckResult; - if APlace in [apLeft, apRight] then - CalculateHorizontalArrowBounds - else - CalculateVerticalArrowBounds; -end; - -procedure GetDragAndDropArrowPoints(const ABounds: TRect; APlace: TcxArrowPlace; - out P: TPointArray; AForRegion: Boolean); - - procedure CalculatePointsForLeftArrow; - begin - with ABounds do - begin - P[0] := Point(Left + 3, Top - Ord(AForRegion)); - P[1] := Point(Left + 3, Top + 3); - P[2] := Point(Left, Top + 3); - P[3] := Point(Left, Bottom - 4 + Ord(AForRegion)); - P[4] := Point(Left + 3, Bottom - 4 + Ord(AForRegion)); - P[5] := Point(Left + 3, Bottom - 1 + Ord(AForRegion)); - P[6] := Point(Right - 1 + Ord(AForRegion), Top + 5); - end; - end; - - procedure CalculatePointsForTopArrow; - begin - with ABounds do - begin - P[0] := Point(Left + 3, Top); - P[1] := Point(Right - 4 + Ord(AForRegion), Top); - P[2] := Point(Right - 4 + Ord(AForRegion), Top + 3); - P[3] := Point(Right - 1 + Ord(AForRegion), Top + 3); - P[4] := Point(Left + 5, Bottom - 1 + Ord(AForRegion)); - P[5] := Point(Left, Top + 3); - P[6] := Point(Left + 3, Top + 3); - end; - end; - - procedure CalculatePointsForRightArrow; - begin - with ABounds do - begin - P[0] := Point(Right - 4 + Ord(AForRegion), Top - Ord(AForRegion)); - P[1] := Point(Right - 4 + Ord(AForRegion), Top + 3); - P[2] := Point(Right - 1 + Ord(AForRegion), Top + 3); - P[3] := Point(Right - 1 + Ord(AForRegion), Bottom - 4 + Ord(AForRegion)); - P[4] := Point(Right - 4 + Ord(AForRegion), Bottom - 4 + Ord(AForRegion)); - P[5] := Point(Right - 4 + Ord(AForRegion), Bottom - 1 + Ord(AForRegion)); - P[6] := Point(Left, Top + 5); - end; - end; - - procedure CalculatePointsForBottomArrow; - begin - with ABounds do - begin - P[0] := Point(Left + 3, Bottom - 1 + Ord(AForRegion)); - P[1] := Point(Right - 4 + Ord(AForRegion), Bottom - 1 + Ord(AForRegion)); - P[2] := Point(Right - 4 + Ord(AForRegion), Bottom - 4 + Ord(AForRegion)); - P[3] := Point(Right - 1 + Ord(AForRegion), Bottom - 4 + Ord(AForRegion)); - P[4] := Point(Left + 5, Top - Ord(AForRegion)); - P[5] := Point(Left - Ord(AForRegion), Bottom - 4 + Ord(AForRegion)); - P[6] := Point(Left + 3, Bottom - 4); - end; - end; - -begin - SetLength(P, 7); - case APlace of - apLeft: - CalculatePointsForLeftArrow; - apTop: - CalculatePointsForTopArrow; - apRight: - CalculatePointsForRightArrow; - apBottom: - CalculatePointsForBottomArrow; - end; -end; - -procedure DrawDragAndDropArrow(ACanvas: TcxCanvas; const ABounds: TRect; - APlace: TcxArrowPlace); -var - P: TPointArray; -begin - GetDragAndDropArrowPoints(ABounds, APlace, P, False); - ACanvas.Brush.Color := DragAndDropArrowColor; - ACanvas.Pen.Color := DragAndDropArrowBorderColor; - ACanvas.Polygon(P); -end; - -{ other } - -procedure DialogApplyFont(ADialog: TCustomForm; AFont: TFont); - - function GetTextHeight: Integer; - begin - Result := ADialog.Canvas.TextHeight('Qq'); - end; - -var - AOldTextHeight, ANewTextHeight: Integer; -begin - with ADialog do - begin - AOldTextHeight := GetTextHeight; - Font := AFont; - ANewTextHeight := GetTextHeight; - TCustomFormAccess(ADialog).ScaleControls(ANewTextHeight, AOldTextHeight); - ClientWidth := MulDiv(ClientWidth, ANewTextHeight, AOldTextHeight); - ClientHeight := MulDiv(ClientHeight, ANewTextHeight, AOldTextHeight); - end; -end; - -function DesignController: TcxDesignController; -begin - if (FDesignController = nil) and not FUnitIsFinalized then - FDesignController := TcxDesignController.Create; - Result := FDesignController; -end; - -function GET_APPCOMMAND_LPARAM(lParam: LPARAM): Integer; -begin - Result := Short(HiWord(lParam) and not FAPPCOMMAND_MASK); -end; - -{$IFNDEF DELPHI6} -function CheckWin32Version(AMajor: Integer; AMinor: Integer = 0): Boolean; -begin - Result := (Win32MajorVersion > AMajor) or - ((Win32MajorVersion = AMajor) and (Win32MinorVersion >= AMinor)); -end; -{$ENDIF} - -{ TcxControlChildComponent } - -constructor TcxControlChildComponent.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - Initialize; -end; - -constructor TcxControlChildComponent.CreateEx(AControl: TcxControl; AAssignOwner: Boolean = True); -begin - //FControl := AControl; - if AAssignOwner then - Create(AControl.Owner) - else - Create(nil); - Control := AControl; -end; - -destructor TcxControlChildComponent.Destroy; -begin - if FControl <> nil then - FControl.RemoveChildComponent(Self); - inherited; -end; - -function TcxControlChildComponent.GetIsLoading: Boolean; -begin - Result := csLoading in ComponentState; -end; - -function TcxControlChildComponent.GetIsDestroying: Boolean; -begin - Result := csDestroying in ComponentState; -end; - -procedure TcxControlChildComponent.Initialize; -begin -end; - -procedure TcxControlChildComponent.SetControl(Value: TcxControl); -begin - FControl := Value; -end; - -procedure TcxControlChildComponent.SetParentComponent(Value: TComponent); -begin - inherited; - if Value is TcxControl then - TcxControl(Value).AddChildComponent(Self); -end; - -function TcxControlChildComponent.GetParentComponent: TComponent; -begin - Result := FControl; -end; - -function TcxControlChildComponent.HasParent: Boolean; -begin - Result := FControl <> nil; -end; - -{ TcxControlScrollBar } - -constructor TcxControlScrollBar.Create(AOwner: TComponent); -begin - inherited; - Color := clBtnFace; - ControlStyle := ControlStyle - [csFramed] + [csNoDesignVisible]; - TabStop := False; - Visible := False; -end; - -destructor TcxControlScrollBar.Destroy; -begin - cxClearObjectLinks(Self); - inherited Destroy; -end; - -function TcxControlScrollBar.GetVisible: boolean; -begin - Result := inherited Visible; -end; - -procedure TcxControlScrollBar.SetVisible(Value: boolean); -begin - inherited Visible := Value; -end; - -procedure TcxControlScrollBar.CMDesignHitTest(var Message: TCMDesignHitTest); -begin - Message.Result := 1; -end; - -procedure TcxControlScrollBar.WndProc(var Message: TMessage); -var - ALink: TcxObjectLink; -begin - ALink := cxAddObjectLink(Self); - try - if Message.Msg = WM_LBUTTONDOWN then - FocusParent; - if ALink.Ref <> nil then - inherited; - finally - cxRemoveObjectLink(ALink); - end; -end; - -procedure TcxControlScrollBar.FocusParent; -begin - if Parent = nil then Exit; - if (Parent is TcxControl) and TcxControl(Parent).FocusWhenChildIsClicked(Self) or - not (Parent is TcxControl) and Parent.CanFocus then - Parent.SetFocus; -end; - -procedure TcxControlScrollBar.ApplyData; -begin - if Data.Visible then - begin -{$IFNDEF USETCXSCROLLBAR} - PageSize := Data.PageSize; - SetParams(Data.Position, Data.Min, Data.Max); - PageSize := Data.PageSize; // to resetup -{$ELSE} - SetScrollParams(Data.Min, Data.Max, Data.Position, Data.PageSize, True); -{$ENDIF} - SmallChange := Data.SmallChange; - LargeChange := Data.LargeChange; - end; - Enabled := Data.Enabled; - if Visible <> Data.Visible then - begin - Visible := Data.Visible; - {$IFDEF DELPHI11} - Perform(CM_SHOWINGCHANGED, 0, 0); - {$ENDIF} - end; -end; - -{ TcxSizeGrip } - -constructor TcxSizeGrip.Create(AOwner: TComponent); -begin - inherited; - Color := clBtnFace; - ControlStyle := ControlStyle + [csNoDesignVisible]; - FLookAndFeel := TcxLookAndFeel.Create(Self); - FLookAndFeel.OnChanged := LookAndFeelChanged; -end; - -destructor TcxSizeGrip.Destroy; -begin - FreeAndNil(FLookAndFeel); - inherited Destroy; -end; - -procedure TcxSizeGrip.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - Invalidate; -end; - -procedure TcxSizeGrip.WMEraseBkgnd(var AMessage: TWMEraseBkgnd); -begin - AMessage.Result := 1; -end; - -procedure TcxSizeGrip.Paint; -begin - Canvas.Brush.Color := LookAndFeel.Painter.DefaultSizeGripAreaColor; - Canvas.FillRect(ClientRect); -end; - -{ TcxDragAndDropObject } - -constructor TcxDragAndDropObject.Create(AControl: TcxControl); -begin - inherited Create; - FControl := AControl; - FCanvas := Control.Canvas; - CurMousePos := cxInvalidPoint; - PrevMousePos := cxInvalidPoint; -end; - -procedure TcxDragAndDropObject.SetDirty(Value: Boolean); -begin - if FDirty <> Value then - begin - FDirty := Value; - DirtyChanged; - end; -end; - -procedure TcxDragAndDropObject.ChangeMousePos(const P: TPoint); -begin - PrevMousePos := CurMousePos; - CurMousePos := P; -end; - -procedure TcxDragAndDropObject.DirtyChanged; -begin -end; - -function TcxDragAndDropObject.GetDragAndDropCursor(Accepted: Boolean): TCursor; -const - Cursors: array[Boolean] of TCursor = (crNoDrop, crDrag); -begin - Result := Cursors[Accepted]; -end; - -function TcxDragAndDropObject.GetImmediateStart: Boolean; -begin - Result := False; -end; - -procedure TcxDragAndDropObject.AfterDragAndDrop(Accepted: Boolean); -begin -end; - -procedure TcxDragAndDropObject.BeginDragAndDrop; -begin - DirtyChanged; -end; - -procedure TcxDragAndDropObject.DragAndDrop(const P: TPoint; var Accepted: Boolean); -begin - Dirty := False; - Screen.Cursor := GetDragAndDropCursor(Accepted); -end; - -procedure TcxDragAndDropObject.EndDragAndDrop(Accepted: Boolean); -begin - Dirty := True; -end; - -procedure TcxDragAndDropObject.DoBeginDragAndDrop; -begin - CurMousePos := Control.ScreenToClient(GetMouseCursorPos); - PrevMousePos := CurMousePos; - BeginDragAndDrop; -end; - -procedure TcxDragAndDropObject.DoDragAndDrop(const P: TPoint; var Accepted: Boolean); -begin - ChangeMousePos(P); - DragAndDrop(P, Accepted); -end; - -procedure TcxDragAndDropObject.DoEndDragAndDrop(Accepted: Boolean); -begin - EndDragAndDrop(Accepted); - AfterDragAndDrop(Accepted); -end; - -{ TcxDragControlObject } - -procedure TcxDragControlObject.Finished(Target: TObject; X, Y: Integer; Accepted: Boolean); -begin - inherited; - Free; -end; - -function TcxDragControlObject.GetDragCursor(Accepted: Boolean; X, Y: Integer): TCursor; -begin - if Accepted and (Control as TcxControl).IsCopyDragDrop then - Result := crDragCopy - else - Result := inherited GetDragCursor(Accepted, X, Y); -end; - -{ TcxControl } - -constructor TcxControl.Create(AOwner: TComponent); -begin - inherited; - if HasDragImages then - ControlStyle := ControlStyle + [csDisplayDragImage]; - FCanvas := TcxCanvas.Create(inherited Canvas); - FDefaultCursor := Cursor; - FFocusOnClick := True; - FFontListenerList := TInterfaceList.Create; - FLookAndFeel := TcxLookAndFeel.Create(Self); - FLookAndFeel.OnChanged := LookAndFeelChangeHandler; - FScrollBars := ssBoth; - CreateScrollBars; - TabStop := MayFocus; - FLastParentBackground := True; -{$IFDEF DELPHI7} - ControlStyle := ControlStyle + [csParentBackground]; -{$ELSE} - FParentBackground := True; -{$ENDIF} - dxResourceStringsRepository.AddListener(Self); -end; - -destructor TcxControl.Destroy; -begin - dxResourceStringsRepository.RemoveListener(Self); - EndDrag(False); - DestroyScrollBars; - FFontListenerList := nil; - FreeAndNil(FActiveCanvas); - FCanvas.Free; - FreeAndNil(FLookAndFeel); - cxClearObjectLinks(Self); - inherited Destroy; -end; - -function TcxControl.GetActiveCanvas: TcxCanvas; -begin - if HandleAllocated then - begin - if FActiveCanvas <> nil then FreeAndNil(FActiveCanvas); - Result := Canvas; - end - else - begin - if FActiveCanvas = nil then - FActiveCanvas := TcxScreenCanvas.Create; - Result := FActiveCanvas; - end; -end; - -function TcxControl.GetDragAndDropObject: TcxDragAndDropObject; -begin - if FDragAndDropObject = nil then - FDragAndDropObject := GetDragAndDropObjectClass.Create(Self); - Result := FDragAndDropObject; -end; - -function TcxControl.GetHScrollBarVisible: Boolean; -begin - if NeedsScrollBars then - if FCalculatingScrollBarsParams then - Result := FHScrollBar.Data.Visible - else - Result := FHScrollBar.Visible - else - Result := False; -end; - -function TcxControl.GetIsDestroying: Boolean; -begin - Result := csDestroying in ComponentState; -end; - -function TcxControl.GetIsLoading: Boolean; -begin - Result := csLoading in ComponentState; -end; - -function TcxControl.GetVScrollBarVisible: Boolean; -begin - if NeedsScrollBars then - if FCalculatingScrollBarsParams then - Result := FVScrollBar.Data.Visible - else - Result := FVScrollBar.Visible - else - Result := False; -end; - -procedure TcxControl.SetBorderStyle(Value: TcxControlBorderStyle); -begin - if FBorderStyle <> Value then - begin - FBorderStyle := Value; - BoundsChanged; - end; -end; - -procedure TcxControl.SetDragAndDropState(Value: TcxDragAndDropState); -begin - if FDragAndDropState <> Value then - begin - FDragAndDropState := Value; - if (Value = ddsNone) and not FFinishingDragAndDrop then DoCancelMode; - end; -end; - -procedure TcxControl.SetLookAndFeel(Value: TcxLookAndFeel); -begin - LookAndFeel.Assign(Value); -end; - -procedure TcxControl.SetKeys(Value: TcxKeys); -begin - if FKeys <> Value then - begin - FKeys := Value; - end; -end; - -procedure TcxControl.SetMouseCaptureObject(Value: TObject); -var - AIMouseCaptureObject: IcxMouseCaptureObject; - AMouseWasCaught: Boolean; -begin - if FMouseCaptureObject <> Value then - begin - if (FMouseCaptureObject <> nil) and - Supports(FMouseCaptureObject, IcxMouseCaptureObject, AIMouseCaptureObject) then - AIMouseCaptureObject.DoCancelMode; - FMouseCaptureObject := Value; - AMouseWasCaught := MouseCapture; - MouseCapture := FMouseCaptureObject <> nil; - if AMouseWasCaught and not MouseCapture and (DragAndDropState = ddsStarting) then - Perform(WM_CANCELMODE, 0, 0); - end; -end; - -procedure TcxControl.SetPopupMenu(Value: TComponent); -var - AIcxPopupMenu: IcxPopupMenu; -begin - // check Value - if (Value <> nil) and not ((Value is TPopupMenu) or - Supports(Value, IcxPopupMenu, AIcxPopupMenu)) then - Value := nil; - if FPopupMenu <> Value then - begin - if FPopupMenu <> nil then - FPopupMenu.RemoveFreeNotification(Self); - FPopupMenu := Value; - if FPopupMenu <> nil then - FPopupMenu.FreeNotification(Self); - end; -end; - -procedure TcxControl.SetScrollBars(Value: TScrollStyle); -begin - if FScrollBars <> Value then - begin - FScrollBars := Value; - BoundsChanged; - end; -end; - -{$IFNDEF DELPHI7} -procedure TcxControl.SetParentBackground(Value: Boolean); -begin - if FParentBackground <> Value then - begin - FParentBackground := Value; - Invalidate; - end; -end; -{$ENDIF} - -procedure TcxControl.WMCancelMode(var Message: TWMCancelMode); -begin - inherited; - FinishDragAndDrop(False); - DoCancelMode; -end; - -procedure TcxControl.WMContextMenu(var Message: TWMContextMenu); -var - Pt, Temp: TPoint; - Handled: Boolean; -begin - if Message.Result <> 0 then Exit; - if csDesigning in ComponentState then - begin - inherited; - Exit; - end; - - Pt := SmallPointToPoint(Message.Pos); - if (Pt.x = -1) and (Pt.y = -1) then - Temp := Pt - else - begin - Temp := ScreenToClient(Pt); - if not PtInRect(ClientRect, Temp) then - begin - inherited; - Exit; - end; - end; - - Handled := False; - DoContextPopup(Temp, Handled); - Message.Result := Ord(Handled); - if Handled then Exit; - - inherited; -end; - -procedure TcxControl.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - if HasBackground then - inherited - else - Message.Result := 0; -end; - -procedure TcxControl.WMGetDlgCode(var Message: TWMGetDlgCode); -const - DlgCodes: array[TcxKey] of Integer = - (DLGC_WANTALLKEYS, DLGC_WANTARROWS, DLGC_WANTCHARS, DLGC_WANTTAB); -var - I: TcxKey; - Res: Integer; -begin - Res := 0; - for I := Low(TcxKey) to High(TcxKey) do - if (I in FKeys) and ((I <> kTab) or (GetAsyncKeyState(VK_CONTROL) >= 0)) then - Inc(Res, DlgCodes[I]); - Message.Result := Res; -end; - -procedure TcxControl.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - inherited; - PostMessage(Handle, CM_NCSIZECHANGED, 0, 0); -end; - -procedure TcxControl.WMPaint(var Message: TWMPaint); -begin - HideDragImage; - inherited; - ShowDragImage; -end; - -procedure TcxControl.WMSetCursor(var Message: TWMSetCursor); -var - P: TPoint; -begin - P := ScreenToClient(GetMouseCursorPos); - with P do - if IsDesigning and (DragAndDropState = ddsNone) and GetDesignHitTest(X, Y, [ssLeft]) then - SetCursor(Screen.Cursors[GetCursor(X, Y)]) - else - inherited; -end; - -procedure TcxControl.CMColorChanged(var Message: TMessage); -begin - ColorChanged; - inherited; -end; - -procedure TcxControl.CMCursorChanged(var Message: TMessage); -begin - CursorChanged; - inherited; -end; - -procedure TcxControl.CMDesignHitTest(var Message: TCMDesignHitTest); -begin - inherited; - with Message do - if Result = 0 then - Result := Integer(GetDesignHitTest(XPos, YPos, KeysToShiftState(Keys))); -end; - -procedure TcxControl.CMFontChanged(var Message: TMessage); -begin - inherited; - FontChanged; -end; - -procedure TcxControl.CMInvalidate(var Message: TMessage); -begin - if HandleAllocated and not IsDestroying then - InvalidateControl(Self, Message.WParam = 0, NeedRedrawOnResize); -end; - -procedure TcxControl.CMMouseEnter(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseEnter(Self) - else - MouseEnter(TControl(Message.lParam)); -end; - -procedure TcxControl.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxControl.CMNCSizeChanged(var Message: TMessage); -var - ANewHeight, ANewWidth: Integer; -begin - if not NeedsScrollBars then Exit; - ANewHeight := GetSystemMetrics(SM_CYHSCROLL); - ANewWidth := GetSystemMetrics(SM_CXVSCROLL); - if (FHScrollBar.Height <> ANewHeight) or (FVScrollBar.Width <> ANewWidth) then - begin - FHScrollBar.Height := ANewHeight; - FVScrollBar.Width := ANewWidth; - BoundsChanged; - end; -end; - -procedure TcxControl.CMTextChanged(var Message: TMessage); -begin - inherited; - TextChanged; -end; - -procedure TcxControl.CMVisibleChanged(var Message: TMessage); -begin - inherited; - VisibleChanged; -end; - -procedure TcxControl.CNKeyDown(var Message: TWMKeyDown); -begin - // TODO: for D7 UpdateUIState(Message.CharCode);? - if IsMenuKey(Message) then - begin - Message.Result := 1; - Exit; - end; - if DragAndDropState <> ddsNone then - begin - FinishDragAndDrop(False); - Message.Result := 1; - Exit; - end; - inherited; -end; - -procedure TcxControl.CNSysKeyDown(var Message: TWMKeyDown); -begin - if IsMenuKey(Message) then - begin - Message.Result := 1; - Exit; - end; - inherited; -end; - -procedure TcxControl.CreateScrollBars; - - procedure SetControlsReplicatable(const AControls: array of TControl); - var - I: Integer; - begin - for I := Low(AControls) to High(AControls) do - with AControls[I] do - ControlStyle := ControlStyle + [csReplicatable]; - end; - -begin - if not NeedsScrollBars or (FSizeGrip <> nil) then Exit; - FHScrollBar := TcxControlScrollBar.Create(nil); - FHScrollBar.Kind := sbHorizontal; - FHScrollBar.OnScroll := ScrollEvent; - FVScrollBar := TcxControlScrollBar.Create(nil); - FVScrollBar.Kind := sbVertical; - FVScrollBar.OnScroll := ScrollEvent; - FSizeGrip := TcxSizeGrip.Create(nil); - FSizeGrip.LookAndFeel.MasterLookAndFeel := LookAndFeel; - SetControlsReplicatable([FHScrollBar, FVScrollBar, FSizeGrip]); -{$IFDEF USETCXSCROLLBAR} - FHScrollBar.LookAndFeel.MasterLookAndFeel := LookAndFeel; - FVScrollBar.LookAndFeel.MasterLookAndFeel := LookAndFeel; - cxSettingsController.AddListener(Self); -{$ENDIF} -end; - -procedure TcxControl.DestroyScrollBars; -begin - if FSizeGrip = nil then Exit; -{$IFDEF USETCXSCROLLBAR} - cxSettingsController.RemoveListener(Self); -{$ENDIF} - if IsDestroying and (FSizeGrip.Parent = Self) then //will be destroyed in TWinControl.Destroy - Exit; //SC B134824 - FreeAndNil(FSizeGrip); - FreeAndNil(FVScrollBar); - FreeAndNil(FHScrollBar); -end; - -procedure TcxControl.ScrollEvent(Sender: TObject; ScrollCode: TScrollCode; - var ScrollPos: Integer); -begin - Scroll(TcxControlScrollBar(Sender).Kind, ScrollCode, ScrollPos); -end; - -procedure TcxControl.CreateParams(var Params: TCreateParams); -begin - inherited; - with Params do - Style := Style or WS_CLIPCHILDREN; -end; - -procedure TcxControl.CreateWnd; -begin - FCreatingWindow := True; - try - inherited; - CheckNeedsScrollBars; - InitControl; - finally - FCreatingWindow := False; - end; -end; - -procedure TcxControl.Resize; -begin - inherited; - BoundsChanged; -end; - -procedure TcxControl.WndProc(var Message: TMessage); - - function GetMousePos: TPoint; - begin - if HandleAllocated and ((Width > 32768) or (Height > 32768)) then - Result := ScreenToClient(GetMouseCursorPos) - else - Result := SmallPointToPoint(TWMMouse(Message).Pos); - end; - - function GetMouseButton: TMouseButton; - begin - case Message.Msg of - WM_LBUTTONDOWN: - Result := mbLeft; - WM_RBUTTONDOWN: - Result := mbRight; - else - Result := mbMiddle; - end; - end; - - procedure DoAfterMouseDown; - begin - case Message.Msg of - WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_MBUTTONDOWN: - with GetMousePos do - AfterMouseDown(GetMouseButton, X, Y); - end; - end; - -var - ALink: TcxObjectLink; -begin - ALink := cxAddObjectLink(Self); - try - if ((Message.Msg = WM_LBUTTONDOWN) or (Message.Msg = WM_LBUTTONDBLCLK)) and not Dragging and - (IsDesigning and GetDesignHitTest(GetMousePos.X, GetMousePos.Y, [ssLeft]) or - not IsDesigning and (DragMode = dmAutomatic)) then - begin - if not IsControlMouseMsg(TWMMouse(Message)) then - begin - ControlState := ControlState + [csLButtonDown]; - Dispatch(Message); - ControlState := ControlState - [csLButtonDown]; - end; - Exit; - end; - if Message.Msg = WM_RBUTTONUP then - FMouseRightButtonReleased := True; - inherited; - finally - try - if (ALink.Ref <> nil) and not IsDestroying then - begin - case Message.Msg of - (*WM_KEYDOWN: - if Message.wParam = VK_ESCAPE then FinishDragAndDrop(False);//!!!*) - WM_RBUTTONUP: - FMouseRightButtonReleased := False; - WM_SETFOCUS, WM_KILLFOCUS: - FocusChanged; - WM_PAINT: - if ParentBackground <> FLastParentBackground then - begin - FLastParentBackground := ParentBackground; - ParentBackgroundChanged; - end; - end; - DoAfterMouseDown; - end; - finally - cxRemoveObjectLink(ALink); - end; - end; -end; - -procedure TcxControl.DestroyWindowHandle; -begin - inherited DestroyWindowHandle; - ControlState := ControlState - [csClicked]; -end; - -procedure TcxControl.DoContextPopup(MousePos: TPoint; - var Handled: Boolean); -var - P: TPoint; -begin - inherited; - if not Handled then - begin - if (MousePos.X = -1) and (MousePos.Y = -1) then - P := ClientToScreen(Point(0, 0)) // TODO: GetOffsetPos method - else - P := ClientToScreen(MousePos); - Handled := (Assigned(dxISpellChecker) and dxISpellChecker.QueryPopup(PopupMenu, MousePos)) or - DoShowPopupMenu(PopupMenu, P.X, P.Y); - end; -end; - -function TcxControl.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; -const - ADirections: array[Boolean, Boolean] of TcxDirection = ((dirLeft, dirRight), (dirUp, dirDown)); -var - I: Integer; -begin - Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); - if not Result and (MouseWheelScrollingKind <> mwskNone) then - begin - for I := 0 to Mouse.WheelScrollLines - 1 do - ScrollContent(ADirections[MouseWheelScrollingKind = mwskVertical, WheelDelta < 0]); - Result := True; - end; -end; - -function TcxControl.DoShowPopupMenu(AMenu: TComponent; X, Y: Integer): Boolean; -begin - Result := ShowPopupMenu(Self, AMenu, X, Y); -end; - -function TcxControl.GetPopupMenu: TPopupMenu; -begin - if FPopupMenu is TPopupMenu then - Result := TPopupMenu(FPopupMenu) - else - Result := nil; -end; - -function TcxControl.IsMenuKey(var Message: TWMKey): Boolean; -var - AControl: TWinControl; -begin - Result := False; - if not IsDesigning then - begin - AControl := Self; - repeat - if (AControl is TcxControl) and - IsPopupMenuShortCut(TcxControl(AControl).PopupMenu, Message) then - begin - Result := True; - Break; - end; - AControl := AControl.Parent; - until AControl = nil; - end; -end; - -procedure TcxControl.Modified; - - function IsValidComponentState(AComponent: TComponent): Boolean; - begin - Result := AComponent.ComponentState * [csLoading, csWriting, csDestroying] = []; - end; - -var - AControl: TWinControl; - ACanSetModified: Boolean; -begin - if not IsDesigning then Exit; - ACanSetModified := False; - AControl := Self; - while AControl is TWinControl do - begin - ACanSetModified := IsValidComponentState(AControl); - if not ACanSetModified then Break; - AControl := AControl.Parent; - end; - if ACanSetModified then - SetDesignerModified(Self); -end; - -procedure TcxControl.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - - procedure ProcessDragAndDrop; - begin - if (Button = mbLeft) and not (ssDouble in Shift) and StartDragAndDrop(Point(X, Y)) then - if DragAndDropObject.ImmediateStart then - BeginDragAndDrop - else - DragAndDropState := ddsStarting - else - FinishDragAndDrop(False); - end; - -var - ALink: TcxObjectLink; - AOriginalBounds: TRect; -begin - FMouseDownPos := Point(X, Y); - ALink := cxAddObjectLink(Self); - try - if CanFocusOnClick(X, Y) and not (ssDouble in Shift) then // to allow form showing on dbl click - begin - AOriginalBounds := BoundsRect; - SetFocus; - if ALink.Ref = nil then Exit; - // to workaround the bug in VCL with parented forms - if (GetParentForm(Self) <> nil) and (GetParentForm(Self).ActiveControl = Self) and - not IsFocused then - Windows.SetFocus(Handle); - if not IsFocused and not AllowDragAndDropWithoutFocus then - begin - MouseCapture := False; - Exit; - end; - if UpdateMousePositionIfControlMoved then - begin - Inc(X, AOriginalBounds.Left - Left); - Inc(Y, AOriginalBounds.Top - Top); - end; - end; - ProcessDragAndDrop; - if ALink.Ref = nil then Exit; - BeforeMouseDown(Button, Shift, X, Y); - if ALink.Ref = nil then Exit; - inherited; - finally - if ALink.Ref <> nil then - if MouseCapture then FMouseButtonPressed := True; - cxRemoveObjectLink(ALink); - end; -end; - -procedure TcxControl.MouseMove(Shift: TShiftState; X, Y: Integer); -var - AAccepted: Boolean; - - procedure SetCursor; - var - ACursor: TCursor; - begin - ACursor := FDefaultCursor; - Cursor := GetCursor(X, Y); - FDefaultCursor := ACursor; - end; - -begin - SetCursor; - inherited; - if (DragAndDropState = ddsStarting) and not IsMouseInPressedArea(X, Y) then - BeginDragAndDrop; - if DragAndDropState = ddsInProcess then - begin - AAccepted := False; - DragAndDrop(Point(X, Y), AAccepted); - end; -end; - -procedure TcxControl.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - FMouseButtonPressed := False; - CancelMouseOperations; - inherited; -end; - -procedure TcxControl.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited; - if (Operation = opRemove) and (AComponent = PopupMenu) then - PopupMenu := nil; -end; - -procedure TcxControl.Paint; -begin - if FBorderStyle = cxcbsDefault then - begin - LookAndFeelPainter.DrawBorder(Canvas, Bounds); - Canvas.IntersectClipRect(ClientBounds); - end; - inherited; - // CB9021 - bug in VCL: to actually show internal controls - // if they were made visible when one of the parent's Showing was False - UpdateInternalControlsState; -end; - -procedure TcxControl.ColorChanged; -begin -end; - -procedure TcxControl.DoScrolling; -const - ScrollTimeStep = 20; - ScrollValueStep = 5; - MaxSpeed = 12; -var - BreakOnMouseUp: Boolean; - AllowHorScrolling, AllowVerScrolling: Boolean; - P, PrevP, AnchorPos: TPoint; - AnchorSize, Speed, TimerHits: Integer; - AnchorWnd, CaptureWnd: HWND; - Direction: TcxDirection; - Timer: UINT; - Msg: TMsg; - - function CreateScrollingAnchorWnd: HWND; - var - B: TBitmap; - W, H: Integer; - Rgn: HRGN; - DC: HDC; - - function GetResourceBitmapName: string; - begin - if AllowHorScrolling and AllowVerScrolling then - Result := 'CX_FULLSCROLLBITMAP' - else - if AllowHorScrolling then - Result := 'CX_HORSCROLLBITMAP' - else - Result := 'CX_VERSCROLLBITMAP'; - end; - - begin - B := TBitmap.Create; - B.LoadFromResourceName(HInstance, GetResourceBitmapName); - - W := B.Width; - H := B.Height; - AnchorSize := W; - with AnchorPos do - Result := CreateWindowEx(WS_EX_TOPMOST, 'STATIC', nil, WS_POPUP, - X - W div 2, Y - H div 2, W, H, Handle, 0, HInstance, nil); - Rgn := CreateEllipticRgn(0, 0, W + 1, H + 1); - SetWindowRgn(Result, Rgn, True); - SetWindowPos(Result, 0, 0, 0, 0, 0, - SWP_NOZORDER or SWP_NOMOVE or SWP_NOSIZE or SWP_SHOWWINDOW or SWP_NOACTIVATE); - - DC := GetWindowDC(Result); - BitBlt(DC, 0, 0, W, H, B.Canvas.Handle, 0, 0, SRCCOPY); - Rgn := CreateEllipticRgn(0, 0, W + 1, H + 1); - FrameRgn(DC, Rgn, GetSysColorBrush(COLOR_WINDOWTEXT), 1, 1); - DeleteObject(Rgn); - ReleaseDC(Result, DC); - - B.Free; - end; - - procedure CalcDirectionAndSpeed(const P: TPoint); - var - DeltaX, DeltaY, SpeedValue: Integer; - - function GetNeutralZone: TRect; - begin - Result := Classes.Bounds(AnchorPos.X - AnchorSize div 2, AnchorPos.Y - AnchorSize div 2, AnchorSize, AnchorSize); - if not AllowHorScrolling then - begin - Result.Left := 0; - Result.Right := Screen.Width; - end; - if not AllowVerScrolling then - begin - Result.Top := 0; - Result.Bottom := Screen.Height; - end; - end; - - begin - if PtInRect(GetNeutralZone, P) then - begin - Direction := dirNone; - Speed := 0; - Exit; - end - else - begin - BreakOnMouseUp := True; - DeltaX := P.X - AnchorPos.X; - DeltaY := P.Y - AnchorPos.Y; - if AllowHorScrolling and (not AllowVerScrolling or (Abs(DeltaX) > Abs(DeltaY))) then - begin - if DeltaX < 0 then - Direction := dirLeft - else - Direction := dirRight; - SpeedValue := Abs(DeltaX); - end - else - begin - if DeltaY < 0 then - Direction := dirUp - else - Direction := dirDown; - SpeedValue := Abs(DeltaY); - end; - end; - Dec(SpeedValue, AnchorSize div 2); - Speed := 1 + SpeedValue div ScrollValueStep; - if Speed > MaxSpeed then Speed := MaxSpeed; - end; - - procedure SetMouseCursor; - var - Cursor: TCursor; - begin - case Direction of - dirLeft: - Cursor := crLeftScroll; - dirUp: - Cursor := crUpScroll; - dirRight: - Cursor := crRightScroll; - dirDown: - Cursor := crDownScroll; - else - if AllowHorScrolling and AllowVerScrolling then - Cursor := crFullScroll - else - if AllowHorScrolling then - Cursor := crHorScroll - else - Cursor := crVerScroll; - end; - SetCursor(Screen.Cursors[Cursor]); - end; - -begin - AllowHorScrolling := HScrollBarVisible; - AllowVerScrolling := VScrollBarVisible; - if not (AllowHorScrolling or AllowVerScrolling) then Exit; - FIsScrollingContent := True; - BreakOnMouseUp := False; - PrevP := GetMouseCursorPos; - AnchorPos := PrevP; - AnchorWnd := CreateScrollingAnchorWnd; - Direction := dirNone; - SetMouseCursor; - Speed := 1; - TimerHits := 0; - Timer := SetTimer(0, 0, ScrollTimeStep, nil); - - CaptureWnd := Handle; - SetCapture(CaptureWnd); - try - while GetCapture = CaptureWnd do - begin - case Integer(GetMessage(Msg, 0, 0, 0)) of - -1: Break; - 0: begin - PostQuitMessage(Msg.wParam); - Break; - end; - end; - if (Msg.message = WM_PAINT) and (Msg.hwnd = AnchorWnd) then - begin - ValidateRect(AnchorWnd, nil); - Continue; - end; - if (Msg.message >= WM_MOUSEFIRST) and (Msg.message <= WM_MOUSELAST) and - (Msg.message <> WM_MOUSEMOVE) and (Msg.message <> WM_MBUTTONUP) then - Break; - try - case Msg.message of - WM_KEYDOWN, WM_KEYUP: - if Msg.wParam = VK_ESCAPE then Break; - WM_MOUSEMOVE: - begin - P := SmallPointToPoint(TSmallPoint(Msg.lParam)); - Windows.ClientToScreen(Msg.hwnd, P); - if (P.X <> PrevP.X) or (P.Y <> PrevP.Y) then - begin - CalcDirectionAndSpeed(P); - SetMouseCursor; - PrevP := P; - end; - end; - WM_LBUTTONDOWN, WM_RBUTTONDOWN: - Break; - WM_MBUTTONUP: - if BreakOnMouseUp then Break; - WM_TIMER: - if UINT(Msg.wParam) = Timer then - begin - Inc(TimerHits); - if TimerHits mod (MaxSpeed - Speed + 1) = 0 then - ScrollContent(Direction); - end; - end; - finally - TranslateMessage(Msg); - DispatchMessage(Msg); - end; - end; - finally - if GetCapture = CaptureWnd then ReleaseCapture; - - KillTimer(0, Timer); - DestroyWindow(AnchorWnd); - FIsScrollingContent := False; - end; -end; - -procedure TcxControl.ParentBackgroundChanged; -begin -end; - -procedure TcxControl.VisibleChanged; -begin -end; - -procedure TcxControl.AddChildComponent(AComponent: TcxControlChildComponent); -begin - AComponent.Control := Self; -end; - -procedure TcxControl.RemoveChildComponent(AComponent: TcxControlChildComponent); -begin - AComponent.Control := nil; -end; - -procedure TcxControl.AfterMouseDown(AButton: TMouseButton; X, Y: Integer); -begin - if (DragMode = dmAutomatic) and (AButton = mbLeft) and - MouseCapture and { to prevent drag and drop when mouse button is released already } - (not IsDesigning or AllowAutoDragAndDropAtDesignTime(X, Y, [])) and - CanDrag(X, Y) and (DragDetect(Handle) = ddDrag) then - BeginDrag(True{False}); - if AButton = mbMiddle then DoScrolling; -end; - -function TcxControl.AllowAutoDragAndDropAtDesignTime(X, Y: Integer; - Shift: TShiftState): Boolean; -begin - Result := True; -end; - -function TcxControl.AllowDragAndDropWithoutFocus: Boolean; -begin - Result := False; -end; - -procedure TcxControl.BeforeMouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin -end; - -procedure TcxControl.BoundsChanged; -begin - UpdateScrollBars; - if NeedRedrawOnResize then - Invalidate; -end; - -procedure TcxControl.BringInternalControlsToFront; -begin - FHScrollBar.BringToFront; - FVScrollBar.BringToFront; - FSizeGrip.BringToFront; -end; - -procedure TcxControl.CancelMouseOperations; -begin - FinishDragAndDrop(True); - MouseCaptureObject := nil; -end; - -function TcxControl.CanDrag(X, Y: Integer): Boolean; -begin - Result := DragAndDropState = ddsNone; -end; - -function TcxControl.CanFocusOnClick: Boolean; -begin - Result := not IsDesigning and FFocusOnClick and MayFocus and CanFocus; -end; - -function TcxControl.CanFocusOnClick(X, Y: Integer): Boolean; -begin - Result := CanFocusOnClick; -end; - -procedure TcxControl.CursorChanged; -begin - FDefaultCursor := Cursor; -end; - -procedure TcxControl.DoCancelMode; -begin - FMouseButtonPressed := False; - MouseCaptureObject := nil; -end; - -procedure TcxControl.FocusChanged; -begin - if Assigned(FOnFocusChanged) then FOnFocusChanged(Self); -end; - -function TcxControl.FocusWhenChildIsClicked(AChild: TControl): Boolean; -begin - Result := CanFocusOnClick; -end; - -procedure TcxControl.FontChanged; -var - I: Integer; -begin - for I := 0 to FFontListenerList.Count - 1 do - IcxFontListener(FFontListenerList[I]).Changed(Self, Font); - Invalidate; -end; - -function TcxControl.GetBorderSize: Integer; -begin - if FBorderStyle = cxcbsNone then - Result := 0 - else - Result := LookAndFeelPainter.BorderSize; -end; - -function TcxControl.GetBounds: TRect; -begin - if IsRectEmpty(FBounds) then - if HandleAllocated then - Result := ClientRect - else - Result := Rect(0, 0, Width, Height) - else - Result := FBounds; -end; - -function TcxControl.GetClientBounds: TRect; -begin - Result := Bounds; - InflateRect(Result, -BorderSize, -BorderSize); - if HScrollBarVisible then - Dec(Result.Bottom, FHScrollBar.Height); - if VScrollBarVisible then - Dec(Result.Right, FVScrollBar.Width); -end; - -function TcxControl.GetCursor(X, Y: Integer): TCursor; -begin - Result := FDefaultCursor; -end; - -function TcxControl.GetDesignHitTest(X, Y: Integer; Shift: TShiftState): Boolean; -begin - Result := (DragAndDropState <> ddsNone) or FMouseButtonPressed; -end; - -function TcxControl.GetDragObjectClass: TDragControlObjectClass; -begin - Result := TcxDragControlObject; -end; - -function TcxControl.GetIsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -function TcxControl.GetIsFocused: Boolean; -begin {7} - Result := Focused; -end; - -function TcxControl.GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; -begin - if VScrollBarVisible then - Result := mwskVertical - else - Result := mwskNone; -end; - -function TcxControl.HasBackground: Boolean; -begin - Result := False; -end; - -procedure TcxControl.InitControl; -begin - InitScrollBars; -end; - -class procedure TcxControl.InvalidateControl(AControl: TWinControl; ANeedInvalidateSelf, ANeedInvalidateChildren: Boolean); - - function NeedInvalidateControl(AControl: TControl): Boolean; - begin - Result := (AControl is TWinControl) and - (not (csOpaque in AControl.ControlStyle) - {$IFDEF DELPHI7} or (csParentBackground in AControl.ControlStyle) {$ENDIF}); - end; - -var - I: Integer; -begin - if AControl.HandleAllocated then - begin - if AControl.Parent <> nil then - AControl.Parent.Perform(CM_INVALIDATE, 1, 0); - if ANeedInvalidateSelf then - begin - cxInvalidateRect(AControl.Handle, not (csOpaque in AControl.ControlStyle)); - if ANeedInvalidateChildren then - begin - for I := 0 to AControl.ControlCount - 1 do - if NeedInvalidateControl(AControl.Controls[I]) then - AControl.Controls[I].Invalidate; - end; - end; - end; -end; - -function TcxControl.IsInternalControl(AControl: TControl): Boolean; -begin - Result := (AControl = FHScrollBar) or (AControl = FVScrollBar) or - (AControl = FSizeGrip); -end; - -function TcxControl.MayFocus: Boolean; -begin - Result := True; -end; - -procedure TcxControl.MouseEnter(AControl: TControl); -begin - CallNotify(FOnMouseEnter, Self); -end; - -procedure TcxControl.MouseLeave(AControl: TControl); -begin - CallNotify(FOnMouseLeave, Self); -end; - -function TcxControl.NeedRedrawOnResize: Boolean; -begin - Result := False; -end; - -procedure TcxControl.TextChanged; -begin -end; - -function TcxControl.UpdateMousePositionIfControlMoved: Boolean; -begin - Result := True; -end; - -function TcxControl.GetLookAndFeelValue: TcxLookAndFeel; -begin - Result := LookAndFeel; -end; - -function TcxControl.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := LookAndFeel.Painter; -end; - -procedure TcxControl.LookAndFeelChangeHandler(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - if not (csDestroying in (Application.ComponentState + ComponentState)) then - LookAndFeelChanged(Sender, AChangedValues); -end; - -procedure TcxControl.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin -end; - -procedure TcxControl.InitScrollBarsParameters; -begin -end; - -function TcxControl.IsPixelScrollBar(AKind: TScrollBarKind): Boolean; -begin - Result := False; -end; - -function TcxControl.NeedsScrollBars: Boolean; -begin - Result := True; -end; - -function TcxControl.NeedsToBringInternalControlsToFront: Boolean; -begin -{$IFDEF DELPHI9} - Result := not IsDesigning; -{$ELSE} - Result := True; -{$ENDIF} -end; - -procedure TcxControl.Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); -begin -end; - -function TcxControl.CanScrollLineWithoutScrollBars(ADirection: TcxDirection): Boolean; -begin - Result := False; -end; - -procedure TcxControl.CheckNeedsScrollBars; -begin - if NeedsScrollBars then - begin - CreateScrollBars; - if HandleAllocated then - InitScrollBars; - end - else - DestroyScrollBars; -end; - -function TcxControl.GetHScrollBarBounds: TRect; -begin - Result := ClientBounds; - Result.Top := Result.Bottom; - Result.Bottom := Result.Top + FHScrollBar.Height; -end; - -function TcxControl.GetSizeGripBounds: TRect; -begin - with Result do - begin - Left := FVScrollBar.Left; - Right := Left + FVScrollBar.Width; - Top := FHScrollBar.Top; - Bottom := Top + FHScrollBar.Height; - end; -end; - -function TcxControl.GetVScrollBarBounds: TRect; -begin - Result := ClientBounds; - Result.Left := Result.Right; - Result.Right := Result.Left + FVScrollBar.Width; -end; - -procedure TcxControl.InitScrollBars; -begin - if NeedsScrollBars then - begin - FHScrollBar.Parent := Self; - FVScrollBar.Parent := Self; - FSizeGrip.Parent := Self; - end; -end; - -procedure TcxControl.SetInternalControlsBounds; -begin - if FHScrollBar.Visible then - FHScrollBar.BoundsRect := GetHScrollBarBounds; - if FVScrollBar.Visible then - FVScrollBar.BoundsRect := GetVScrollBarBounds; - if FSizeGrip.Visible then - FSizeGrip.BoundsRect := GetSizeGripBounds; -end; - -procedure TcxControl.UpdateInternalControlsState; -begin - if not NeedsScrollBars then Exit; - if FHScrollBar.Visible then - FHScrollBar.UpdateControlState; - if FVScrollBar.Visible then - FVScrollBar.UpdateControlState; - if FSizeGrip.Visible then - FSizeGrip.UpdateControlState; -end; - -procedure TcxControl.UpdateScrollBars; -var - APrevUpdatingScrollBars, APrevHScrollBarVisible, APrevVScrollBarVisible: Boolean; - - procedure CalculateScrollBarsParams; - var - APrevHScrollBarVisible, APrevVScrollBarVisible: Boolean; - - procedure CheckPixelScrollBars; - var - AHideScrollBar: array[TScrollBarKind] of Boolean; - I: TScrollBarKind; - - function GetScrollBar(AScrollBarKind: TScrollBarKind): TcxControlScrollBar; - begin - if AScrollBarKind = sbHorizontal then - Result := FHScrollBar - else - Result := FVScrollBar; - end; - - function CanHide(AScrollBarKind: TScrollBarKind): Boolean; - begin - with GetScrollBar(AScrollBarKind).Data do - Result := Visible and Enabled and AllowHide; - end; - - function GetOppositeScrollBarSize(AScrollBarKind: TScrollBarKind): Integer; - begin - if AScrollBarKind = sbHorizontal then - Result := FVScrollBar.Width - else - Result := FHScrollBar.Height; - end; - - procedure CheckPixelScrollBar(AScrollBarKind: TScrollBarKind); - begin - if IsPixelScrollBar(AScrollBarKind) then - with GetScrollBar(AScrollBarKind).Data do - if PageSize + GetOppositeScrollBarSize(AScrollBarKind) >= Max - Min + 1 then - AHideScrollBar[AScrollBarKind] := True; - end; - - begin - if not CanHide(sbHorizontal) or not CanHide(sbVertical) then Exit; - AHideScrollBar[sbHorizontal] := False; - AHideScrollBar[sbVertical] := False; - CheckPixelScrollBar(sbHorizontal); - CheckPixelScrollBar(sbVertical); - if AHideScrollBar[sbHorizontal] and AHideScrollBar[sbVertical] then - for I := Low(TScrollBarKind) to High(TScrollBarKind) do - with GetScrollBar(I).Data do - SetScrollBarInfo(I, Min, Max, SmallChange, PageSize + GetOppositeScrollBarSize(I), - Position, AllowShow, AllowHide); - end; - - begin - if FCalculatingScrollBarsParams then Exit; - FCalculatingScrollBarsParams := True; - try - FHScrollBar.Data.Visible := False; - FVScrollBar.Data.Visible := False; - repeat - APrevHScrollBarVisible := HScrollBarVisible; - APrevVScrollBarVisible := VScrollBarVisible; - //BoundsChanged; - causes things like Left/TopPos to be recalculated during scrolling - InitScrollBarsParameters; - until (HScrollBarVisible = APrevHScrollBarVisible) and - (VScrollBarVisible = APrevVScrollBarVisible); - CheckPixelScrollBars; - finally - FCalculatingScrollBarsParams := False; - end; - end; - - function GetIsInitialScrollBarsParams: Boolean; - begin - Result := APrevUpdatingScrollBars and - (FHScrollBar.Data.Visible = FInitialHScrollBarVisible) and - (FVScrollBar.Data.Visible = FInitialVScrollBarVisible); - end; - - procedure CheckScrollBarParams(AScrollBar: TcxControlScrollBar; AInitialVisible: Boolean); - begin - with AScrollBar do - if Visible <> AInitialVisible then - begin - Enabled := False; - Visible := True; - end; - end; - - function IsBoundsChangeNeeded: Boolean; - begin - Result := - (FHScrollBar.Visible <> APrevHScrollBarVisible) or - (FVScrollBar.Visible <> APrevVScrollBarVisible); - end; - -begin - if not NeedsScrollBars then Exit; - if FScrollBarsLockCount > 0 then - begin - FScrollBarsUpdateNeeded := True; - Exit; - end; - if not FUpdatingScrollBars then - begin - FInitialHScrollBarVisible := FHScrollBar.Visible; - FInitialVScrollBarVisible := FVScrollBar.Visible; - end; - APrevUpdatingScrollBars := FUpdatingScrollBars; - FUpdatingScrollBars := True; - try - APrevHScrollBarVisible := FHScrollBar.Visible; - APrevVScrollBarVisible := FVScrollBar.Visible; - if not FIsInitialScrollBarsParams then - begin - CalculateScrollBarsParams; - FIsInitialScrollBarsParams := GetIsInitialScrollBarsParams; - if FIsInitialScrollBarsParams then - begin - CheckScrollBarParams(FHScrollBar, FInitialHScrollBarVisible); - CheckScrollBarParams(FVScrollBar, FInitialVScrollBarVisible); - end - else - begin - FHScrollBar.ApplyData; - FVScrollBar.ApplyData; - end; - end; - if IsBoundsChangeNeeded then - BoundsChanged - else - begin - FSizeGrip.Visible := FHScrollBar.Visible and FVScrollBar.Visible; - SetInternalControlsBounds; - if NeedsToBringInternalControlsToFront then - BringInternalControlsToFront; - end; - finally - if not APrevUpdatingScrollBars then - FIsInitialScrollBarsParams := False; - FUpdatingScrollBars := APrevUpdatingScrollBars; - end; -end; - -procedure TcxControl.DragAndDrop(const P: TPoint; var Accepted: Boolean); -begin - DragAndDropObject.DoDragAndDrop(P, Accepted); -end; - -procedure TcxControl.EndDragAndDrop(Accepted: Boolean); -begin - DragAndDropState := ddsNone; - Screen.Cursor := FDragAndDropPrevCursor; - MouseCapture := False; - MouseCaptureObject := nil; - DragAndDropObject.DoEndDragAndDrop(Accepted); - {DragAndDropObject.DoEndDragAndDrop(Accepted); - SetCaptureControl(nil); - DragAndDropState := ddsNone; - Screen.Cursor := FDragAndDropPrevCursor;} -end; - -function TcxControl.GetDragAndDropObjectClass: TcxDragAndDropObjectClass; -begin - Result := FDragAndDropObjectClass; - if Result = nil then - Result := TcxDragAndDropObject; -end; - -function TcxControl.StartDragAndDrop(const P: TPoint): Boolean; -begin - Result := False; -end; - -procedure TcxControl.DoStartDrag(var DragObject: TDragObject); -begin - Update; - inherited; - if (DragObject = nil) and (GetDragObjectClass <> nil) then - DragObject := GetDragObjectClass.Create(Self); - if not StartDrag(DragObject) then - begin - DragObject.Free; - DragObject := nil; - CancelDrag; - end; -end; - -procedure TcxControl.DoEndDrag(Target: TObject; X, Y: Integer); -begin - inherited; - FreeAndNil(FDragImages); -end; - -procedure TcxControl.DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); -begin - if Source is TDragObject then - if State = dsDragLeave then - FDragObject := nil - else - FDragObject := TDragObject(Source); - inherited; -end; - -procedure TcxControl.DrawDragImage(ACanvas: TcxCanvas; const R: TRect); -begin -end; - -function TcxControl.GetDragImages: TDragImageList; -begin - if HasDragImages then - begin - if FDragImages = nil then - begin - FDragImages := GetDragImagesClass.Create(nil); - InitDragImages(FDragImages); - end; - if FDragImages.Count = 0 then - Result := nil - else - Result := FDragImages; - end - else - Result := nil; -end; - -function TcxControl.GetDragImagesClass: TcxDragImageListClass; -begin - Result := TcxDragImageList; -end; - -function TcxControl.GetDragImagesSize: TPoint; -begin - Result := Point(0, 0); -end; - -function TcxControl.GetIsCopyDragDrop: Boolean; -begin - Result := IsCtrlPressed; -end; - -function TcxControl.HasDragImages: Boolean; -begin - Result := False; -end; - -procedure TcxControl.HideDragImage; -begin - if GetDragObject <> nil then - GetDragObject.HideDragImage; -end; - -procedure TcxControl.InitDragImages(ADragImages: TcxDragImageList); -var - B: TBitmap; - ACanvas: TcxCanvas; -begin - with ADragImages, GetDragImagesSize do - begin - Width := X; - Height := Y; - if (X = 0) or (Y = 0) then Exit; - end; - - B := TBitmap.Create; - try - with B do - begin - Width := ADragImages.Width; - Height := ADragImages.Height; - ACanvas := TcxCanvas.Create(Canvas); - try - DrawDragImage(ACanvas, Rect(0, 0, Width, Height)); - finally - ACanvas.Free; - end; - end; - ADragImages.AddMasked(B, B.TransparentColor); - finally - B.Free; - end; -end; - -procedure TcxControl.ShowDragImage; -begin - if GetDragObject <> nil then - GetDragObject.ShowDragImage; -end; - -function TcxControl.CanFocusEx: Boolean; -var - AParentForm: TCustomForm; -begin - AParentForm := GetParentForm(Self); - Result := CanFocus and ((AParentForm = nil) or - AParentForm.CanFocus and AParentForm.Enabled and AParentForm.Visible); -end; - -function TcxControl.AcceptMousePosForClick(X, Y: Integer): Boolean; -begin - Result := (DragMode = dmManual) or IsMouseInPressedArea(X, Y); -end; - -procedure TcxControl.InvalidateRect(const R: TRect; EraseBackground: Boolean); -begin - if HandleAllocated then - cxInvalidateRect(Handle, R, EraseBackground); -end; - -procedure TcxControl.InvalidateRgn(ARegion: TcxRegion; EraseBackground: Boolean); -begin - if HandleAllocated and (ARegion <> nil) and not ARegion.IsEmpty then - Windows.InvalidateRgn(Handle, ARegion.Handle, EraseBackground); -end; - -procedure TcxControl.InvalidateWithChildren; -begin - if HandleAllocated then - RedrawWindow(Handle, nil, 0, RDW_ALLCHILDREN or RDW_INVALIDATE or RDW_NOERASE); -end; - -function TcxControl.IsMouseInPressedArea(X, Y: Integer): Boolean; -begin - Result := IsPointInDragDetectArea(MouseDownPos, X, Y); -end; - -procedure TcxControl.PostMouseMove; -begin - if HandleAllocated then - PostMouseMove(ScreenToClient(GetMouseCursorPos)); -end; - -procedure TcxControl.PostMouseMove(AMousePos: TPoint); -begin - if not HandleAllocated then Exit; - with AMousePos do - PostMessage(Handle, WM_MOUSEMOVE, 0, MakeLParam(X, Y)); -end; - -procedure TcxControl.ScrollContent(ADirection: TcxDirection); - - function GetScrollBarKind: TScrollBarKind; - begin - if ADirection in [dirLeft, dirRight] then - Result := sbHorizontal - else - Result := sbVertical; - end; - - function GetScrollCode: TScrollCode; - begin - if ADirection in [dirLeft, dirUp] then - Result := scLineUp - else - Result := scLineDown; - end; - - function GetScrollPos: Integer; - begin - if not NeedsScrollBars then - Result := 0 - else - if GetScrollBarKind = sbHorizontal then - Result := FHScrollBar.Position - else - Result := FVScrollBar.Position; - end; - -var - AScrollPos: Integer; -begin - if (ADirection = dirNone) or - not NeedsScrollBars and not CanScrollLineWithoutScrollBars(ADirection) then - Exit; - AScrollPos := GetScrollPos; - Scroll(GetScrollBarKind, GetScrollCode, AScrollPos); - Update; -end; - -procedure TcxControl.ScrollWindow(DX, DY: Integer; const AScrollRect: TRect); -begin - HideDragImage; - try - ScrollWindowEx(Handle, DX, DY, @AScrollRect, nil, 0, nil, SW_ERASE or SW_INVALIDATE); - finally - ShowDragImage; - end; -end; - -procedure TcxControl.SetScrollBarInfo(AScrollBarKind: TScrollBarKind; - AMin, AMax, AStep, APage, APos: Integer; AAllowShow, AAllowHide: Boolean); - - function GetScrollBar: TcxControlScrollBar; - begin - if AScrollBarKind = sbHorizontal then - Result := FHScrollBar - else - Result := FVScrollBar; - end; - -var - AScrollBarData: TcxScrollBarData; -begin - AScrollBarData := GetScrollBar.Data; - if AScrollBarKind = sbHorizontal then - AScrollBarData.AllowShow := AAllowShow and (FScrollBars in [ssHorizontal, ssBoth]) - else - AScrollBarData.AllowShow := AAllowShow and (FScrollBars in [ssVertical, ssBoth]); - AScrollBarData.AllowHide := AAllowHide; - if AScrollBarData.AllowShow then - if (AMax < AMin) or (AMax - AMin + 1 <= APage) or (APos < AMin) then - if AScrollBarData.AllowHide then - AScrollBarData.Visible := False - else - begin - AScrollBarData.Enabled := False; - AScrollBarData.Visible := True; - end - else - begin - AScrollBarData.PageSize := APage; - AScrollBarData.Min := AMin; - AScrollBarData.Max := AMax; - AScrollBarData.SmallChange := AStep; - AScrollBarData.LargeChange := APage; - AScrollBarData.Position := APos; - AScrollBarData.Enabled := True; - AScrollBarData.Visible := True; - end - else - AScrollBarData.Visible := False; - GetScrollBar.Data := AScrollBarData; -end; - -function TcxControl.StartDrag(DragObject: TDragObject): Boolean; -begin - Result := True; -end; - -procedure TcxControl.UpdateWithChildren; -begin - if HandleAllocated then - RedrawWindow(Handle, nil, 0, RDW_UPDATENOW or RDW_ALLCHILDREN); -end; - -procedure TcxControl.BeginDragAndDrop; -begin - DragAndDropObject.DoBeginDragAndDrop; - MouseCapture := True; - FDragAndDropPrevCursor := Screen.Cursor; - DragAndDropState := ddsInProcess; -end; - -procedure TcxControl.FinishDragAndDrop(Accepted: Boolean); -begin - if FFinishingDragAndDrop then Exit; - FFinishingDragAndDrop := True; - try - if DragAndDropState = ddsInProcess then - EndDragAndDrop(Accepted) - else - DragAndDropState := ddsNone; - FreeAndNil(FDragAndDropObject); - finally - FFinishingDragAndDrop := False; - end; -end; - -procedure TcxControl.AddFontListener(AListener: IcxFontListener); -begin - FFontListenerList.Add(AListener); -end; - -procedure TcxControl.RemoveFontListener(AListener: IcxFontListener); -begin - FFontListenerList.Remove(AListener); -end; - -procedure TcxControl.LockScrollBars; -begin - if FScrollBarsLockCount = 0 then - FScrollBarsUpdateNeeded := False; - Inc(FScrollBarsLockCount); -end; - -procedure TcxControl.UnlockScrollBars; -begin - if FScrollBarsLockCount > 0 then - begin - Dec(FScrollBarsLockCount); - if (FScrollBarsLockCount = 0) and FScrollBarsUpdateNeeded then - UpdateScrollBars; - end; -end; - -procedure TcxControl.TranslationChanged; -begin -end; - -{ TcxCustomizeListBox } - -constructor TcxCustomizeListBox.Create(AOwner: TComponent); -begin - inherited; - FDragAndDropItemIndex := -1; -end; - -function TcxCustomizeListBox.GetDragAndDropItemObject: TObject; -begin - Result := Items.Objects[FDragAndDropItemIndex]; -end; - -function TcxCustomizeListBox.GetItemObject: TObject; -begin - if ItemIndex = -1 then - Result := nil - else - Result := Items.Objects[ItemIndex]; -end; - -procedure TcxCustomizeListBox.SetItemObject(Value: TObject); -begin - if ItemObject <> Value then - begin - ItemIndex := Items.IndexOfObject(Value); - Click; - end; -end; - -procedure TcxCustomizeListBox.WMCancelMode(var Message: TWMCancelMode); -begin - inherited; - FDragAndDropItemIndex := -1; -end; - -procedure TcxCustomizeListBox.WMMouseMove(var Message: TWMMouseMove); -begin - if FDragAndDropItemIndex = -1 then - inherited - else - with Message do - MouseMove(KeysToShiftState(Keys), XPos, YPos); -end; - -procedure TcxCustomizeListBox.CreateParams(var Params: TCreateParams); -begin - inherited; - with Params.WindowClass do - style := style or CS_HREDRAW; -end; - -procedure TcxCustomizeListBox.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited; - if (Button = mbLeft) and (ItemAtPos(Point(X, Y), True) <> -1) and - (ItemObject <> nil) then - begin - FDragAndDropItemIndex := ItemIndex; - FMouseDownPos := Point(X, Y); - end; -end; - -procedure TcxCustomizeListBox.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited; - if (FDragAndDropItemIndex <> -1) and - (not IsPointInDragDetectArea(FMouseDownPos, X, Y) or - (ItemAtPos(Point(X, Y), True) <> FDragAndDropItemIndex)) then - begin - ItemIndex := FDragAndDropItemIndex; - BeginDragAndDrop; - FDragAndDropItemIndex := -1; - end; -end; - -procedure TcxCustomizeListBox.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited; - FDragAndDropItemIndex := -1; -end; - -procedure TcxCustomizeListBox.BeginDragAndDrop; -var - I: Integer; -begin - if MultiSelect then - with Items do - begin - BeginUpdate; - try - for I := 0 to Count - 1 do - Selected[I] := I = ItemIndex; - finally - EndUpdate; - end; - end; -end; - -{ TcxMessageWindow } - -constructor TcxMessageWindow.Create; -begin - inherited Create; - FHandle := AllocateHWnd(WndProc); -end; - -destructor TcxMessageWindow.Destroy; -begin - DeallocateHWnd(FHandle); - inherited Destroy; -end; - -procedure TcxMessageWindow.WndProc(var Message: TMessage); -begin - Message.Result := DefWindowProc(Handle, Message.Msg, Message.wParam, Message.lParam); -end; - -{ TcxSystemController } - -{$IFDEF DELPHI6} -constructor TcxSystemController.Create; -begin - inherited; - if IsLibrary then - HookSynchronizeWakeup; -end; - -destructor TcxSystemController.Destroy; -begin - if IsLibrary then - UnhookSynchronizeWakeup; - inherited; -end; - -procedure TcxSystemController.WndProc(var Message: TMessage); -begin - case Message.Msg of - WM_SYNCHRONIZETHREADS: CheckSynchronize; - else - inherited; - end; -end; - -procedure TcxSystemController.WakeMainThread(Sender: TObject); -begin - PostMessage(Handle, WM_SYNCHRONIZETHREADS, 0, 0); -end; - -procedure TcxSystemController.HookSynchronizeWakeup; -begin - FPrevWakeMainThread := Classes.WakeMainThread; - Classes.WakeMainThread := WakeMainThread; -end; - -procedure TcxSystemController.UnhookSynchronizeWakeup; -begin - Classes.WakeMainThread := FPrevWakeMainThread; -end; -{$ENDIF} - -{ TcxBaseHintWindow } - -constructor TcxBaseHintWindow.Create(AOwner: TComponent); -begin - inherited; - FAnimationStyle := cxhaAuto; - FAnimationDelay := 100; -end; - -procedure TcxBaseHintWindow.ActivateHint(ARect: TRect; const AHint: string); - - procedure ExecuteAnimation; - const - AAnimationStyleMap: array[TcxHintAnimationStyle] of Integer = (AW_HOR_POSITIVE, AW_HOR_NEGATIVE, - AW_VER_POSITIVE, AW_VER_NEGATIVE, AW_CENTER, AW_HIDE, AW_ACTIVATE, - AW_BLEND, AW_ACTIVATE, AW_ACTIVATE); - var - AAnimationStyle: TcxHintAnimationStyle; - begin - {MSDN.AnimateWindow: Function fails, if the window uses the window region. - Windows XP: This does not cause the function to fail. } - AAnimationStyle := GetAnimationStyle; - if AAnimationStyle <> cxhaNone then - begin - if not IsWinXP then - DisableRegion; - AnimateWindowProc(Handle, AnimationDelay, AAnimationStyleMap[AAnimationStyle] or AW_SLIDE); - end; - end; - -begin -{$IFNDEF DELPHI12} - if not IsMonitorValid(ARect.TopLeft) then Exit; -{$ENDIF} - if FStandardHint then - inherited - else - begin - Caption := AHint; - SetBounds(ARect.Left, ARect.Top, cxRectWidth(ARect), cxRectHeight(ARect)); - UpdateBoundsRect(ARect); - - SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE); - if IsWinXP then - EnableRegion; - if (Length(AHint) < 100) and Assigned(AnimateWindowProc) then - ExecuteAnimation; - if not IsWinXP then - EnableRegion; - - Show; - Invalidate; - end; -end; - -procedure TcxBaseHintWindow.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); - - procedure CorrectPosition; - var - AWorkArea: TRect; - begin - AWorkArea := GetDesktopWorkArea(Point(ALeft, ATop)); - ALeft := Max(Min(ALeft, AWorkArea.Right - AWidth), AWorkArea.Left); - ATop := Max(Min(ATop, AWorkArea.Bottom - Height), AWorkArea.Top); - end; - -begin - CorrectPosition; - inherited; -end; - -procedure TcxBaseHintWindow.CreateParams(var Params: TCreateParams); -{$IFNDEF DELPHI7} -const - CS_DROPSHADOW = $20000; - AShadowMap: array [Boolean] of UINT = (0, CS_DROPSHADOW); -{$ENDIF} -begin - inherited CreateParams(Params); - if not FStandardHint then - with Params do - begin - if BorderStyle = bsNone then - Style := Style and not WS_BORDER; - {$IFNDEF DELPHI7} - WindowClass.Style := WindowClass.Style or AShadowMap[IsWinXP]; - {$ENDIF} - ExStyle := ExStyle or WS_EX_TOPMOST; - end; -end; - -function TcxBaseHintWindow.GetAnimationStyle: TcxHintAnimationStyle; -var - AAnimationEnabled, AFadeEffectAnimation: BOOL; -begin - Result := FAnimationStyle; - if Result = cxhaNone then - Exit; - SystemParametersInfo(SPI_GETTOOLTIPANIMATION, 0, @AAnimationEnabled, 0); - if not AAnimationEnabled then - Result := cxhaNone - else - if Result = cxhaAuto then - begin - SystemParametersInfo(SPI_GETTOOLTIPFADE, 0, @AFadeEffectAnimation, 0); - if AFadeEffectAnimation then - Result := cxhaFadeIn - else - Result := cxhaSlideDownward; - end; -end; - -procedure TcxBaseHintWindow.DisableRegion; -begin - SetWindowRgn(Handle, 0, True); -end; - -procedure TcxBaseHintWindow.EnableRegion; -begin -// do nothing -end; - -procedure TcxBaseHintWindow.Show; -begin - ShowWindow(Handle, SW_SHOWNOACTIVATE); -end; - -procedure TcxBaseHintWindow.WMEraseBkgnd(var Message: TWmEraseBkgnd); -begin - if NeedEraseBackground then - inherited - else - Message.Result := 1; -end; - -{ TcxPopupWindow } - -constructor TcxPopupWindow.Create; -begin - CreateNew(nil); - inherited BorderStyle := bsNone; - DefaultMonitor := dmDesktop; - FormStyle := fsStayOnTop; - FAdjustable := True; - FAlignVert := pavBottom; - FCanvas := TcxCanvas.Create(inherited Canvas); - FDirection := pdVertical; - FFrameColor := clWindowText; -end; - -destructor TcxPopupWindow.Destroy; -begin - FCanvas.Free; - inherited; -end; - -function TcxPopupWindow.GetNCHeight: Integer; -begin - Result := BorderWidths[bTop] + BorderWidths[bBottom]; -end; - -function TcxPopupWindow.GetNCWidth: Integer; -begin - Result := BorderWidths[bLeft] + BorderWidths[bRight]; -end; - -procedure TcxPopupWindow.SetBorderSpace(Value: Integer); -begin - RestoreControlsBounds; - FBorderSpace := Value; -end; - -procedure TcxPopupWindow.SetBorderStyle(Value: TcxPopupBorderStyle); -begin - RestoreControlsBounds; - FBorderStyle := Value; -end; - -procedure TcxPopupWindow.WMActivate(var Message: TWMActivate); -begin - inherited; - if Message.Active <> WA_INACTIVE then - begin - FPrevActiveWindow := Message.ActiveWindow; - SendMessage(FPrevActiveWindow, WM_NCACTIVATE, WPARAM(True), 0); - end; -end; - -procedure TcxPopupWindow.WMActivateApp(var Message: TWMActivateApp); -begin - inherited; - if not Message.Active then - begin - SendMessage(FPrevActiveWindow, WM_NCACTIVATE, WPARAM(False), 0); - CloseUp; - end; -end; - -procedure TcxPopupWindow.CMVisibleChanged(var Message: TMessage); -begin - inherited; - VisibleChanged; -end; - -procedure TcxPopupWindow.Deactivate; -begin - inherited; - CloseUp; -end; - -procedure TcxPopupWindow.Paint; -begin - inherited; - DrawFrame; -end; - -procedure TcxPopupWindow.VisibleChanged; -begin -end; - -function TcxPopupWindow.CalculatePosition: TPoint; -var - AAlignHorz: TcxPopupAlignHorz; - AAlignVert: TcxPopupAlignVert; - AOwnerScreenBounds: TRect; - AOrigin: TPoint; - - procedure CalculateCommonPosition; - begin - with AOwnerScreenBounds do - begin - if AAlignHorz = pahCenter then - begin - Result.X := (Left + Right - Width) div 2; - AOrigin.X := Result.X; - end; - if AAlignVert = pavCenter then - begin - Result.Y := (Top + Bottom - Height) div 2; - AOrigin.Y := Result.Y; - end; - end; - end; - - procedure CalculateHorizontalPosition; - begin - with AOwnerScreenBounds do - begin - case AAlignHorz of - pahLeft: - begin - Result.X := Left - Width; - AOrigin.X := Left; - end; - pahRight: - begin - Result.X := Right; - AOrigin.X := Right; - end; - end; - case AAlignVert of - pavTop: - begin - Result.Y := Top; - AOrigin.Y := Top; - end; - pavBottom: - begin - Result.Y := Bottom - Height; - AOrigin.Y := Bottom; - end; - end; - end; - end; - - procedure CalculateVerticalPosition; - begin - with Result, AOwnerScreenBounds do - begin - case AAlignHorz of - pahLeft: - begin - X := Left; - AOrigin.X := Left; - end; - pahRight: - begin - X := Right - Width; - AOrigin.X := Right; - end; - end; - case AAlignVert of - pavTop: - begin - Y := Top - Height; - AOrigin.Y := Top; - end; - pavBottom: - begin - Y := Bottom; - AOrigin.Y := Bottom; - end; - end; - end; - end; - - procedure CheckPosition; - var - ADesktopWorkArea: TRect; - - procedure CheckCommonPosition; - begin - with Result, ADesktopWorkArea do - begin - if (FDirection = pdVertical) or (AAlignHorz = pahCenter) then - begin - if X + Width > Right then X := Right - Width; - if X < Left then X := Left; - end; - if (FDirection = pdHorizontal) or (AAlignVert = pavCenter) then - begin - if Y + Height > Bottom then Y := Bottom - Height; - if Y < Top then Y := Top; - end; - end; - end; - - procedure CheckHorizontalPosition; - - function MoreSpaceOnLeft: Boolean; - begin - with ADesktopWorkArea do - Result := AOwnerScreenBounds.Left - Left > Right - AOwnerScreenBounds.Right; - end; - - begin - with Result, ADesktopWorkArea do - case AAlignHorz of - pahLeft: - if (X < Left) and not MoreSpaceOnLeft then - AAlignHorz := pahRight; - pahRight: - if (X + Width > Right) and MoreSpaceOnLeft then - AAlignHorz := pahLeft; - end; - CalculateHorizontalPosition; - end; - - procedure CheckVerticalPosition; - - function MoreSpaceOnTop: Boolean; - begin - with ADesktopWorkArea do - Result := AOwnerScreenBounds.Top - Top > Bottom - AOwnerScreenBounds.Bottom; - end; - - begin - with Result, ADesktopWorkArea do - case AAlignVert of - pavTop: - if (Y < Top) and not MoreSpaceOnTop then - AAlignVert := pavBottom; - pavBottom: - if (Y + Height > Bottom) and MoreSpaceOnTop then - AAlignVert := pavTop; - end; - CalculateVerticalPosition; - end; - - begin - ADesktopWorkArea := GetDesktopWorkArea(AOrigin); - if FDirection = pdHorizontal then - CheckHorizontalPosition - else - CheckVerticalPosition; - CheckCommonPosition; - end; - -begin - AAlignHorz := FAlignHorz; - AAlignVert := FAlignVert; - AOwnerScreenBounds := OwnerScreenBounds; - CalculateCommonPosition; - if FDirection = pdHorizontal then - CalculateHorizontalPosition - else - CalculateVerticalPosition; - CheckPosition; -end; - -procedure TcxPopupWindow.CalculateSize; -var - AClientWidth, AClientHeight, I: Integer; - ABounds: TRect; - - procedure CheckClientSize; - begin - with ABounds do - begin - if Right > AClientWidth then AClientWidth := Right; - if Bottom > AClientHeight then AClientHeight := Bottom; - end; - end; - -begin - if not FAdjustable then Exit; - - AClientWidth := 0; - AClientHeight := 0; - for I := 0 to ControlCount - 1 do - begin - ABounds := Controls[I].BoundsRect; - CheckClientSize; - OffsetRect(ABounds, BorderWidths[bLeft], BorderWidths[bTop]); - Controls[I].BoundsRect := ABounds; - end; - - if (AClientWidth <> 0) or (ControlCount <> 0) then - Width := BorderWidths[bLeft] + AClientWidth + BorderWidths[bRight]; - if (AClientHeight <> 0) or (ControlCount <> 0) then - Height := BorderWidths[bTop] + AClientHeight + BorderWidths[bBottom]; -end; - -function TcxPopupWindow.GetBorderWidth(ABorder: TcxBorder): Integer; -begin - Result := FBorderSpace + FrameWidths[ABorder]; -end; - -function TcxPopupWindow.GetClientBounds: TRect; -var - ABorder: TcxBorder; -begin - Result := ClientRect; - for ABorder := Low(ABorder) to High(ABorder) do - case ABorder of - bLeft: - Inc(Result.Left, BorderWidths[ABorder]); - bTop: - Inc(Result.Top, BorderWidths[ABorder]); - bRight: - Dec(Result.Right, BorderWidths[ABorder]); - bBottom: - Dec(Result.Bottom, BorderWidths[ABorder]); - end; -end; - -function TcxPopupWindow.GetFrameWidth(ABorder: TcxBorder): Integer; -begin - case FBorderStyle of - pbsUltraFlat: - Result := 1; - pbsFlat: - Result := 1; - pbs3D: - Result := 2; - else - Result := 0; - end; -end; - -function TcxPopupWindow.GetOwnerScreenBounds: TRect; -begin - Result := OwnerBounds; - with Result do - begin - TopLeft := OwnerParent.ClientToScreen(TopLeft); - BottomRight := OwnerParent.ClientToScreen(BottomRight); - end; -end; - -procedure TcxPopupWindow.InitPopup; -begin - if FOwnerParent <> nil then - Font := TControlAccess(FOwnerParent).Font; -end; - -procedure TcxPopupWindow.RestoreControlsBounds; -var - I: Integer; - ABounds: TRect; -begin - for I := 0 to ControlCount - 1 do - begin - ABounds := Controls[I].BoundsRect; - OffsetRect(ABounds, -BorderWidths[bLeft], -BorderWidths[bTop]); - Controls[I].BoundsRect := ABounds; - end; -end; - -procedure TcxPopupWindow.DrawFrame; -var - R: TRect; - - procedure DrawUltraFlatBorder; - begin - Canvas.FrameRect(R, FrameColor); - end; - - procedure DrawFlatBorder; - begin - Canvas.DrawEdge(R, False, False); - end; - - procedure Draw3DBorder; - begin - Canvas.DrawEdge(R, False, True); - InflateRect(R, -1, -1); - Canvas.DrawEdge(R, False, False); - end; - -begin - R := Bounds(0, 0, Width, Height); - case FBorderStyle of - pbsUltraFlat: - DrawUltraFlatBorder; - pbsFlat: - DrawFlatBorder; - pbs3D: - Draw3DBorder; - end; -end; - -procedure TcxPopupWindow.CloseUp; -begin - Hide; -end; - -procedure TcxPopupWindow.Popup; - -begin - InitPopup; - CalculateSize; - Left := CalculatePosition.X; - Top := CalculatePosition.Y; - Show; -end; - -{ TcxCustomDragImage } - -constructor TcxCustomDragImage.Create; -begin - inherited; - SetBounds(0, 0, 0, 0); -{$IFDEF DELPHI6} - AlphaBlend := True; - AlphaBlendValue := cxDragAndDropWindowTransparency; -{$IFDEF DELPHI9} - PopupMode := pmExplicit; -{$ENDIF} -{$ENDIF} -end; - -{$IFDEF DELPHI9} -destructor TcxCustomDragImage.Destroy; -begin - PopupMode := pmNone; - inherited; -end; -{$ENDIF} - -function TcxCustomDragImage.GetAlphaBlended: Boolean; -begin -{$IFDEF DELPHI6} - Result := AlphaBlend and - Assigned(SetLayeredWindowAttributes); -{$ELSE} - Result := False; -{$ENDIF} -end; - -function TcxCustomDragImage.GetVisible: Boolean; -begin - Result := HandleAllocated and IsWindowVisible(Handle); -end; - -procedure TcxCustomDragImage.SetVisible(Value: Boolean); -begin - if Visible <> Value then - if Value then - Show - else - Hide; -end; - -procedure TcxCustomDragImage.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - Message.Result := 1; -end; - -procedure TcxCustomDragImage.WMNCHitTest(var Message: TWMNCHitTest); -begin - Message.Result := HTTRANSPARENT; -end; - -procedure TcxCustomDragImage.CreateParams(var Params: TCreateParams); -begin - inherited; - if PopupParent <> nil then - Params.WndParent := PopupParent.Handle - else - if Screen.ActiveForm <> nil then - Params.WndParent := Screen.ActiveForm.Handle; - with Params.WindowClass do - Style := Style or CS_SAVEBITS; -end; - -procedure TcxCustomDragImage.Init(const ASourceBounds: TRect; const ASourcePoint: TPoint); - - function CalculatePositionOffset: TPoint; - begin - Result.X := ASourcePoint.X - ASourceBounds.Left; - Result.Y := ASourcePoint.Y - ASourceBounds.Top; - end; - -begin - Width := ASourceBounds.Right - ASourceBounds.Left; - Height := ASourceBounds.Bottom - ASourceBounds.Top; - PositionOffset := CalculatePositionOffset; -end; - -procedure TcxCustomDragImage.MoveTo(const APosition: TPoint); -begin - HandleNeeded; // so that later CreateHandle won't reset Left and Top - SetBounds(APosition.X - PositionOffset.X, APosition.Y - PositionOffset.Y, Width, Height); -end; - -procedure TcxCustomDragImage.Show; -begin - ShowWindow(Handle, SW_SHOWNOACTIVATE); - Update; -end; - -procedure TcxCustomDragImage.Hide; -begin - if HandleAllocated then - ShowWindow(Handle, SW_HIDE); -end; - -{ TcxDragImage } - -constructor TcxDragImage.Create; -begin - inherited; - FImage := TBitmap.Create; - FImageCanvas := TcxCanvas.Create(Image.Canvas); -end; - -destructor TcxDragImage.Destroy; -begin - FreeAndNil(FImageCanvas); - FreeAndNil(FImage); - inherited; -end; - -function TcxDragImage.GetWindowCanvas: TcxCanvas; -begin - Result := inherited Canvas; -end; - -procedure TcxDragImage.Paint; -begin - inherited; - WindowCanvas.Draw(0, 0, Image); -end; - -procedure TcxDragImage.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); -begin - inherited; - if Image <> nil then - begin - Image.Width := Width; - Image.Height := Height; - end; -end; - -{ TcxSizeFrame } - -constructor TcxSizeFrame.Create(AFrameWidth: Integer = 2); -begin - inherited Create; -{$IFDEF DELPHI6} - AlphaBlend := False; -{$ENDIF} - FFrameWidth := AFrameWidth; - FRegion := TcxRegion.Create; - Canvas.Brush.Bitmap := AllocPatternBitmap(clBlack, clWhite); -end; - -destructor TcxSizeFrame.Destroy; -begin - FreeAndNil(FRegion); - inherited; -end; - -procedure TcxSizeFrame.Paint; -begin - Canvas.Canvas.FillRect(ClientRect); -end; - -procedure TcxSizeFrame.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); -begin - inherited SetBounds(ALeft, ATop, AWidth, AHeight); - if HandleAllocated and (AWidth > FrameWidth * 2) and (AHeight > FrameWidth * 2) then - begin - if not FillSelection then - InitializeFrameRegion; - SetWindowRegion; - end; -end; - -procedure TcxSizeFrame.DrawSizeFrame(const ARect: TRect); -begin - FRegion.Combine(TcxRegion.Create(cxRectBounds(0, 0, cxRectWidth(ARect), cxRectHeight(ARect))), roSet); - SetBounds(ARect.Left, ARect.Top, cxRectWidth(ARect), cxRectHeight(ARect)); -end; - -procedure TcxSizeFrame.DrawSizeFrame(const ARect: TRect; const ARegion: TcxRegion); -begin - FRegion.Combine(ARegion, roSet, False); - SetBounds(ARect.Left, ARect.Top, cxRectWidth(ARect), cxRectHeight(ARect)); -end; - -procedure TcxSizeFrame.InitializeFrameRegion; - - procedure OffsetFrameRegion(AFrameRegion: TcxRegion; AOffsetX, AOffsetY: Integer); - var - ARegion: TcxRegion; - begin - ARegion := TcxRegion.Create; - try - ARegion.Combine(AFrameRegion, roSet, False); - ARegion.Offset(AOffsetX, AOffsetY); - AFrameRegion.Combine(ARegion, roIntersect, False); - finally - ARegion.Free; - end; - end; - -var - AFrameRegion: TcxRegion; -begin - AFrameRegion := TcxRegion.Create; - try - AFrameRegion.Combine(FRegion, roSet, False); - - OffsetFrameRegion(AFrameRegion, FrameWidth, 0); - OffsetFrameRegion(AFrameRegion, 0, FrameWidth); - OffsetFrameRegion(AFrameRegion, -FrameWidth, 0); - OffsetFrameRegion(AFrameRegion, 0, -FrameWidth); - - FRegion.Combine(AFrameRegion, roSubtract, False); - finally - AFrameRegion.Free; - end; -end; - -procedure TcxSizeFrame.SetWindowRegion; -var - ANewWindowRegion, AOldWindowRegion: TcxRegion; -begin - ANewWindowRegion := TcxRegion.Create; - AOldWindowRegion := TcxRegion.Create; - try - ANewWindowRegion.Combine(FRegion, roSet, False); - GetWindowRgn(Handle, AOldWindowRegion.Handle); - if not ANewWindowRegion.IsEqual(AOldWindowRegion) then - begin - SetWindowRgn(Handle, ANewWindowRegion.Handle, True); - ANewWindowRegion.Handle := 0; - end; - finally - AOldWindowRegion.Free; - ANewWindowRegion.Free; - end; -end; - -{ TcxDragDropArrow } - -constructor TcxDragAndDropArrow.Create(ATransparent: Boolean); -begin - inherited Create; - FTransparent := ATransparent; -{$IFDEF DELPHI6} - AlphaBlend := False; - if Transparent then - begin - TransparentColorValue := ImageBackColor; - TransparentColor := True; - end; -{$ENDIF} -end; - -function TcxDragAndDropArrow.GetTransparent: Boolean; -begin -{$IFDEF DELPHI6} - Result := FTransparent and - Assigned(SetLayeredWindowAttributes); -{$ELSE} - Result := False; -{$ENDIF} -end; - -function TcxDragAndDropArrow.GetImageBackColor: TColor; -begin - Result := clFuchsia; -end; - -procedure TcxDragAndDropArrow.Init(AOwner: TControl; const AAreaBounds, AClientRect: TRect; - APlace: TcxArrowPlace); - - procedure DrawArrow; - begin - Canvas.Brush.Color := ImageBackColor; - Canvas.FillRect(ClientRect); - DrawDragAndDropArrow(Canvas, ClientRect, APlace); - end; - - procedure SetArrowRegion; - var - APoints: TPointArray; - ARegion: HRGN; - begin - GetDragAndDropArrowPoints(ClientRect, APlace, APoints, True); - ARegion := CreatePolygonRgn(APoints[0], Length(APoints), WINDING); - SetWindowRgn(Handle, ARegion, True); - end; - -var - R: TRect; -begin - R := GetDragAndDropArrowBounds(AAreaBounds, AClientRect, APlace); - if AOwner <> nil then - begin - R.TopLeft := AOwner.ClientToScreen(R.TopLeft); - R.BottomRight := AOwner.ClientToScreen(R.BottomRight); - end; - HandleNeeded; // so that later CreateHandle won't reset Left and Top - BoundsRect := R; - DrawArrow; - if not Transparent then - SetArrowRegion; -end; - -{ TcxDesignController } - -procedure TcxDesignController.DesignerModified(AForm: TCustomForm); -begin - if not (IsDesignerModifiedLocked or (dsDesignerModifying in FState)) then - begin - Include(FState, dsDesignerModifying); - try - if (AForm <> nil) and (AForm.Designer <> nil) then - AForm.Designer.Modified; - finally - Exclude(FState, dsDesignerModifying); - end; - end; -end; - -function TcxDesignController.IsDesignerModifiedLocked: Boolean; -begin - Result := FLockDesignerModifiedCount > 0; -end; - -procedure TcxDesignController.LockDesignerModified; -begin - Inc(FLockDesignerModifiedCount); -end; - -procedure TcxDesignController.UnLockDesignerModified; -begin - if FLockDesignerModifiedCount > 0 then - Dec(FLockDesignerModifiedCount); -end; - -{ TcxTimer } - -function ActiveTimerList: TList; -begin - if (FActiveTimerList = nil) and not FUnitIsFinalized then - FActiveTimerList := TList.Create; - Result := FActiveTimerList; -end; - -function cxTimerWindow: TcxTimerWindow; -begin - if (FcxTimerWindow = nil) and not FUnitIsFinalized then - FcxTimerWindow := TcxTimerWindow.Create; - Result := FcxTimerWindow; -end; - -procedure TcxTimerWindow.WndProc(var Message: TMessage); - - function cxTimer(APointer: Integer): TcxTimer; - begin - Result := TcxTimer(APointer); - end; - -begin - if Message.Msg = WM_TIMER then - begin - if ActiveTimerList.IndexOf(Pointer(Message.WParam)) <> -1 then - cxTimer(Message.WParam).TimeOut; - end - else - inherited WndProc(Message); -end; - -constructor TcxTimer.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FEnabled := True; - FInterval := 1000; - FEventID := Cardinal(Self); -end; - -destructor TcxTimer.Destroy; -begin - KillTimer; - inherited Destroy; -end; - -procedure TcxTimer.TimeOut; -begin - if Assigned(FOnTimer) then - FOnTimer(Self); -end; - -function TcxTimer.CanSetTimer: Boolean; -begin - Result := FEnabled and not TimerOn and Assigned(FOnTimer); -end; - -procedure TcxTimer.KillTimer; -begin - if TimerOn then - begin - Windows.KillTimer(cxTimerWindow.FHandle, FEventID); - TimerOn := False; - end; -end; - -procedure TcxTimer.SetEnabled(Value: Boolean); -begin - if FEnabled <> Value then - begin - FEnabled := Value; - UpdateTimer; - end; -end; - -procedure TcxTimer.SetInterval(Value: Cardinal); -begin - if (FInterval <> Value) and (Value > 0) then - begin - FInterval := Value; - UpdateTimer; - end; -end; - -procedure TcxTimer.SetOnTimer(Value: TNotifyEvent); -begin - FOnTimer := Value; - UpdateTimer; -end; - -procedure TcxTimer.SetTimer; -begin - if CanSetTimer then - TimerOn := Windows.SetTimer(cxTimerWindow.FHandle, FEventID, FInterval, nil) <> 0; -end; - -procedure TcxTimer.SetTimerOn(Value: Boolean); -begin - if FTimerOn <> Value then - begin - if Value then - ActiveTimerList.Add(Pointer(FEventID)) - else - ActiveTimerList.Remove(Pointer(FEventID)); - FTimerOn := Value; - end; -end; - -procedure TcxTimer.UpdateTimer; -begin - KillTimer; - SetTimer; -end; - -initialization - FUnitIsFinalized := False; // D10 bug - Screen.Cursors[crDragCopy] := LoadCursor(HInstance, 'CX_DRAGCOPYCURSOR'); - Screen.Cursors[crFullScroll] := LoadCursor(HInstance, 'CX_FULLSCROLLCURSOR'); - Screen.Cursors[crHorScroll] := LoadCursor(HInstance, 'CX_HORSCROLLCURSOR'); - Screen.Cursors[crVerScroll] := LoadCursor(HInstance, 'CX_VERSCROLLCURSOR'); - Screen.Cursors[crUpScroll] := LoadCursor(HInstance, 'CX_UPSCROLLCURSOR'); - Screen.Cursors[crRightScroll] := LoadCursor(HInstance, 'CX_RIGHTSCROLLCURSOR'); - Screen.Cursors[crDownScroll] := LoadCursor(HInstance, 'CX_DOWNSCROLLCURSOR'); - Screen.Cursors[crLeftScroll] := LoadCursor(HInstance, 'CX_LEFTSCROLLCURSOR'); - Screen.Cursors[crcxRemove] := LoadCursor(HInstance, 'CX_REMOVECURSOR'); - Screen.Cursors[crcxVertSize] := LoadCursor(HInstance, 'CX_VERTSIZECURSOR'); - Screen.Cursors[crcxHorzSize] := LoadCursor(HInstance, 'CX_HORZSIZECURSOR'); - Screen.Cursors[crcxDragMulti] := LoadCursor(HInstance, 'CX_MULTIDRAGCURSOR'); - Screen.Cursors[crcxNoDrop] := LoadCursor(HInstance, 'CX_NODROPCURSOR'); - Screen.Cursors[crcxDrag] := LoadCursor(HInstance, 'CX_DRAGCURSOR'); - Screen.Cursors[crcxHandPoint] := LoadCursor(0{HInstance}, IDC_HAND{'CX_HANDPOINTCURSOR'}); - Screen.Cursors[crcxColorPicker] := LoadCursor(HInstance, 'CX_COLORPICKERCURSOR'); - Screen.Cursors[crcxMultiDragCopy] := LoadCursor(HInstance, 'CX_MULTIDRAGCOPYCURSOR'); - FUser32DLL := LoadLibrary('USER32'); - dxWMGetSkinnedMessage := RegisterWindowMessage(dxWMGetSkinnedMessageID); - dxWMSetSkinnedMessage := RegisterWindowMessage(dxWMSetSkinnedMessageID); - -{$IFDEF DELPHI6} - //StartClassGroup(TControl); - GroupDescendentsWith(TcxControlChildComponent, TControl); -{$ENDIF} -{$IFNDEF DELPHI7} - InitSetLayeredWindowAttributes; -{$ENDIF} - - FSystemController := TcxSystemController.Create; - -finalization - FUnitIsFinalized := True; - FreeAndNil(FSystemController); - FreeAndNil(FDesignController); - if FMouseTrackingTimerList <> nil then - begin - if FMouseTrackingTimerList.Count <> 0 then - raise EdxException.Create('MouseTrackingTimerList.Count <> 0'); - FreeAndNil(FMouseTrackingTimerList); - end; - if FUser32DLL > 32 then FreeLibrary(FUser32DLL); - - {$IFDEF USETCXSCROLLBAR} - FreeAndNil(FSettingsController); - {$ENDIF} - FreeAndNil(FcxTimerWindow); - FreeAndNil(FActiveTimerList); - FreeAndNil(FcxMessageWindow); - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxControls.res b/internal/x.46/ExpressLibrary/Sources/cxControls.res deleted file mode 100644 index 96959d18..00000000 Binary files a/internal/x.46/ExpressLibrary/Sources/cxControls.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Sources/cxConverterFactory.pas b/internal/x.46/ExpressLibrary/Sources/cxConverterFactory.pas deleted file mode 100644 index 3906437f..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxConverterFactory.pas +++ /dev/null @@ -1,278 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxConverterFactory; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - DesignIntf, -{$ELSE} - DsgnIntf, -{$ENDIF} - Forms, SysUtils, cxStyles, Classes, - dxCore, cxClasses, cxLibraryStrs, cxDesignWindows, cxCustomConverter; - -type - TcxCustomConverterWithStyles = class; - TcxCustomConverterWithStylesClass = class of TcxCustomConverterWithStyles; - - { TcxCustomConverterWithStyles } - TcxCustomConverterWithStyles = class(TcxCustomConverter) - private - FConvertWithStyles: Boolean; - FDesigner: IDesigner; - FNameOfNewStyleRepository: string; - FStyleRepository: TcxStyleRepository; - function GetStyleRepository: TcxStyleRepository; - protected - function CreateStyleItem: TcxCustomStyle; - procedure DoImport; override; - procedure DoImportStyles; virtual; - public - property ConvertWithStyles: Boolean read FConvertWithStyles write FConvertWithStyles; - property Designer_: IDesigner read FDesigner write FDesigner; - property NameOfNewStyleRepository: string read FNameOfNewStyleRepository write FNameOfNewStyleRepository; - property StyleRepository: TcxStyleRepository read GetStyleRepository write FStyleRepository; - end; - - { TcxConverterFactoryItem } - PcxConverterFactoryItem = ^TcxConverterFactoryItem; - TcxConverterFactoryItem = record - Class_: TcxCustomConverterWithStylesClass; - Name: string; - end; - - { TcxConverterFactory } - TcxConverterFactory = class - private - FItems: TList; - constructor CreateInstance(AParam: Integer); - function GetCount: Integer; - function GetItems(AIndex: Integer): TcxConverterFactoryItem; - function IndexOf(AClass: TcxCustomConverterWithStylesClass): Integer; - public - constructor Create; - destructor Destroy; override; - function FindConverter(ASource: TObject): TcxCustomConverterWithStylesClass; - class function Instance(AConverterGroupName: string): TcxConverterFactory; - procedure RegisterConverter(const AName: string; const AClass: TcxCustomConverterWithStylesClass); - procedure UnregisterConverter(const AClass: TcxCustomConverterWithStylesClass); - property Count: Integer read GetCount; - property Items[AIndex: Integer]: TcxConverterFactoryItem read GetItems; default; - end; - - function ConverterFactory(AConverterGroupName: string): TcxConverterFactory; - -implementation - -function ConverterFactory(AConverterGroupName: string): TcxConverterFactory; -begin - Result := TcxConverterFactory.Instance(AConverterGroupName); -end; - -{ TcxCustomConverterWithStyles } - -function TcxCustomConverterWithStyles.CreateStyleItem: TcxCustomStyle; -var - AStyleRepository: TcxStyleRepository; -begin - AStyleRepository := StyleRepository; - if AStyleRepository = nil then - raise EcxConverterError.Create(cxGetResourceString(@scxConverterCantCreateStyleRepository)); - Result := AStyleRepository.CreateItemEx(TcxStyle, AStyleRepository.Owner); - Result.Name := CreateUniqueName(AStyleRepository.Owner, nil, Result, '', ''); - Designer_.Modified; -end; - -procedure TcxCustomConverterWithStyles.DoImport; -begin - if ConvertWithStyles then - begin - EnablePropertyException; - try - DoImportStyles; - finally - DisablePropertyException; - end; - end; - inherited DoImport; -end; - -procedure TcxCustomConverterWithStyles.DoImportStyles; -begin -end; - -function TcxCustomConverterWithStyles.GetStyleRepository: TcxStyleRepository; -begin - if FStyleRepository = nil then - begin - FStyleRepository := TcxStyleRepository.Create(Designer_.GetRoot); - FStyleRepository.Name := FNameOfNewStyleRepository; - Designer_.Modified; - end; - Result := FStyleRepository; -end; - -{ TcxConverterFactory } - -var - ConverterFactories: TStringList; - -procedure CreateConverterFactories; -begin - ConverterFactories := TStringList.Create; -end; - -procedure FreeConverterFactories; -var - I: Integer; -begin - for I := 0 to ConverterFactories.Count - 1 do - ConverterFactories.Objects[I].Free; - ConverterFactories.Free; -end; - -constructor TcxConverterFactory.Create; -begin - raise EdxException.CreateFmt('Access class %s through Instance only', [ClassName]); -end; - -destructor TcxConverterFactory.Destroy; -var - I: Integer; -begin - for I := 0 to FItems.Count - 1 do - Dispose(PcxConverterFactoryItem(FItems[I])); - FItems.Free; - - inherited Destroy; -end; - -function TcxConverterFactory.FindConverter(ASource: TObject): TcxCustomConverterWithStylesClass; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I].Class_; - if ClassInheritsFrom(ASource.ClassType, Result.GetSourceClassName) then Exit; - end; - Result := nil; -end; - -class function TcxConverterFactory.Instance(AConverterGroupName: string): TcxConverterFactory; -var - I: Integer; -begin - Result := nil; - for I := 0 to ConverterFactories.Count - 1 do - begin - if ConverterFactories[I] = AConverterGroupName then - begin - Result := ConverterFactories.Objects[I] as TcxConverterFactory; - Break; - end; - end; - if Result = nil then - begin - Result := CreateInstance(0); - ConverterFactories.AddObject(AConverterGroupName, Result); - end; -end; - -procedure TcxConverterFactory.RegisterConverter(const AName: string; const AClass: TcxCustomConverterWithStylesClass); -var - AP: PcxConverterFactoryItem; -begin - if IndexOf(AClass) = -1 then - begin - New(AP); - AP^.Name := AName; - AP^.Class_ := AClass; - FItems.Add(AP); - end; -end; - -procedure TcxConverterFactory.UnregisterConverter(const AClass: TcxCustomConverterWithStylesClass); -var - AIndex: Integer; -begin - AIndex := IndexOf(AClass); - if AIndex <> -1 then - begin - Dispose(PcxConverterFactoryItem(FItems[AIndex])); - FItems.Delete(AIndex); - end; -end; - -constructor TcxConverterFactory.CreateInstance; -begin - FItems := TList.Create; -end; - -function TcxConverterFactory.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxConverterFactory.GetItems(AIndex: Integer): TcxConverterFactoryItem; -begin - Result := PcxConverterFactoryItem(FItems[AIndex])^; -end; - -function TcxConverterFactory.IndexOf(AClass: TcxCustomConverterWithStylesClass): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if Items[I].Class_ = AClass then - begin - Result := I; - Break; - end; -end; - -initialization - CreateConverterFactories; - -finalization - FreeConverterFactories; - -end. - diff --git a/internal/x.46/ExpressLibrary/Sources/cxConverterUtils.pas b/internal/x.46/ExpressLibrary/Sources/cxConverterUtils.pas deleted file mode 100644 index 56eeaf5e..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxConverterUtils.pas +++ /dev/null @@ -1,131 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxConverterUtils; - -{$I cxVer.inc} - -interface - -uses - Classes, Graphics, StdCtrls; - - function CompareFonts(AFont1, AFont2: TFont): Boolean; - function ConvertAlignment(const AValue: string): TAlignment; - function ConvertCharCase(const AValue: string): TEditCharCase; - function ConvertScrollStyle(const AValue: string): TScrollStyle; - function DefaultFont(AFont: TFont): Boolean; - -implementation - -uses - dxCore; - -function CompareFonts(AFont1, - AFont2: TFont): Boolean; -begin - if (AFont1 = nil) or (AFont2 = nil) then - begin - Result := True; - Exit; - end; - with AFont1 do - begin - Result := - (Charset = AFont2.Charset) and - (Color = AFont2.Color) and - (Height = AFont2.Height) and - (Name = AFont2.Name) and - (Pitch = AFont2.Pitch) and - (Size = AFont2.Size) and - (Style = AFont2.Style); - end; -end; - -function ConvertAlignment(const AValue: string): TAlignment; -begin - if AValue = 'taLeftJustify' then - Result := taLeftJustify - else if AValue = 'taRightJustify' then - Result := taRightJustify - else if AValue = 'taCenter' then - Result := taCenter - else - Result := taLeftJustify; -end; - -function ConvertCharCase(const AValue: string): TEditCharCase; -begin - if AValue = 'ecNormal' then - Result := ecNormal - else if AValue = 'ecUpperCase' then - Result := ecUpperCase - else if AValue = 'ecLowerCase' then - Result := ecLowerCase - else - Result := ecNormal; -end; - -function ConvertScrollStyle(const AValue: string): TScrollStyle; -begin - if AValue = 'ssNone' then - Result := ssNone - else if AValue = 'ssHorizontal' then - Result := ssHorizontal - else if AValue = 'ssVertical' then - Result := ssVertical - else if AValue = 'ssBoth' then - Result := ssBoth - else - Result := ssNone; -end; - -function DefaultFont(AFont: TFont): Boolean; -begin - if AFont = nil then - begin - Result := True; - Exit; - end; - with AFont do - Result := - (Pitch = DefFontData.Pitch) and - (Style = DefFontData.Style) and - (Charset = DefFontData.Charset) and - (Name = dxShortStringToString(DefFontData.Name)) and - (Color = clWindowText) and - (Size = 8); -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxCustomConverter.pas b/internal/x.46/ExpressLibrary/Sources/cxCustomConverter.pas deleted file mode 100644 index 6ca56fba..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxCustomConverter.pas +++ /dev/null @@ -1,405 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxCustomConverter; - -{$I cxVer.inc} - -interface - -uses - TypInfo, Classes, SysUtils, dxCore; - -type - EcxUnknownProperty = class(EdxException); - EcxConverterError = class(EdxException); - - TcxCustomConverter = class; - TcxCustomConverterClass = class of TcxCustomConverter; - - { TcxCustomConverter } - TcxCustomConverter = class - private - FDestination: TObject; - FPropertyExceptionEnabled: Boolean; - FSource: TObject; - function GetObject(AObject: TObject): TObject; - function GetPropInfo_(AObject: TObject; const AName: string): PPropInfo; - function TestProperty(AObject: TObject; const AName: string; ATypeKind: TTypeKind): Boolean; - protected - function CanConvert: Boolean; virtual; - procedure DisablePropertyException; - procedure DoImport; virtual; - procedure EnablePropertyException; - function GetBooleanProperty(AObject: TObject; const AName: string; - const ADefaultValue: Boolean = False): Boolean; - function GetCharProperty(AObject: TObject; const AName: string; - const ADefaultValue: Char = #0): Char; - function GetClassProperty(AObject: TObject; const AName: string; - const ADefaultValue: TObject = nil): TObject; - function GetEnumProperty(AObject: TObject; const AName: string; - const ADefaultValue: string = ''): string; - function GetFloatProperty(AObject: TObject; const AName: string; - const ADefaultValue: Extended = 0): Extended; - function GetIntegerProperty(AObject: TObject; const AName: string; - const ADefaultValue: Integer = 0): Integer; - {$IFDEF DELPHI6} - function GetInterfaceProperty(AObject: TObject; const AName: string; - const ADefaultValue: IUnknown): IUnknown; - {$ENDIF} - function GetMethodProperty(AObject: TObject; const AName: string; - const ADefaultValue: TMethod): TMethod; - procedure GetSetProperty(AObject: TObject; const AName: string; AValues: TStrings); - function GetStringProperty(AObject: TObject; const AName: string; - const ADefaultValue: string = ''): string; - function GetVariantProperty(AObject: TObject; const AName: string; - const ADefaultValue: Variant): Variant; - function GetWideCharProperty(AObject: TObject; const AName: string; - const ADefaultValue: WideChar = #0): WideChar; - function GetWideStringProperty(AObject: TObject; const AName: string; - const ADefaultValue: WideString = ''): WideString; - procedure PostImport; virtual; - procedure PreImport; virtual; - public - constructor Create(ADestination: TObject); virtual; - class function GetSourceClassName: string; virtual; - procedure ImportFrom(ASource: TObject); - - property Destination: TObject read FDestination; - property Source: TObject read FSource write FSource; - end; - -implementation - -{ TcxCustomConverter } - -constructor TcxCustomConverter.Create(ADestination: TObject); -begin - FDestination := ADestination; -end; - -class function TcxCustomConverter.GetSourceClassName: string; -begin - Result := 'TObject'; -end; - -procedure TcxCustomConverter.ImportFrom(ASource: TObject); -begin - FSource := ASource; - if CanConvert then - begin - PreImport; - try - DoImport; - finally - PostImport; - end; - end; -end; - -function TcxCustomConverter.CanConvert: Boolean; -begin - Result := True; -end; - -procedure TcxCustomConverter.DisablePropertyException; -begin - FPropertyExceptionEnabled := False; -end; - -procedure TcxCustomConverter.DoImport; -begin -end; - -procedure TcxCustomConverter.EnablePropertyException; -begin - FPropertyExceptionEnabled := True; -end; - -function TcxCustomConverter.GetBooleanProperty(AObject: TObject; const AName: string; - const ADefaultValue: Boolean): Boolean; -begin - if TestProperty(AObject, AName, tkEnumeration) then - {$IFDEF DELPHI5} - Result := Boolean(GetOrdProp(GetObject(AObject), AName)) - {$ELSE} - Result := Boolean(GetOrdProp(GetObject(AObject), GetPropInfo_(AObject, AName))) - {$ENDIF} - else - Result := ADefaultValue; -end; - -function TcxCustomConverter.GetCharProperty(AObject: TObject; const AName: string; - const ADefaultValue: Char): Char; -begin - if TestProperty(AObject, AName, tkChar) then - {$IFDEF DELPHI5} - Result := Char(GetOrdProp(GetObject(AObject), AName)) - {$ELSE} - Result := Char(GetOrdProp(GetObject(AObject), GetPropInfo_(AObject, AName))) - {$ENDIF} - else - Result := ADefaultValue; -end; - -function TcxCustomConverter.GetClassProperty(AObject: TObject; const AName: string; - const ADefaultValue: TObject = nil): TObject; -begin - if TestProperty(AObject, AName, tkClass) then - {$IFDEF DELPHI5} - Result := GetObjectProp(GetObject(AObject), AName) - {$ELSE} - Result := TObject(GetOrdProp(GetObject(AObject), GetPropInfo_(AObject, AName))) - {$ENDIF} - else - Result := ADefaultValue; -end; - -function TcxCustomConverter.GetEnumProperty(AObject: TObject; const AName: string; - const ADefaultValue: string): string; -begin - if TestProperty(AObject, AName, tkEnumeration) then - {$IFDEF DELPHI5} - Result := GetEnumProp(GetObject(AObject), AName) - {$ELSE} - Result := GetEnumName(GetPropInfo_(AObject, AName).PropType^, - GetOrdProp(GetObject(AObject), GetPropInfo_(AObject, AName))) - {$ENDIF} - else - Result := ADefaultValue; -end; - -function TcxCustomConverter.GetFloatProperty(AObject: TObject; const AName: string; - const ADefaultValue: Extended): Extended; -begin - if TestProperty(AObject, AName, tkFloat) then - {$IFDEF DELPHI5} - Result := GetFloatProp(GetObject(AObject), AName) - {$ELSE} - Result := GetFloatProp(GetObject(AObject), GetPropInfo_(AObject, AName)) - {$ENDIF} - else - Result := ADefaultValue; -end; - -function TcxCustomConverter.GetIntegerProperty(AObject: TObject; const AName: string; - const ADefaultValue: Integer): Integer; -begin - if TestProperty(AObject, AName, tkInteger) then - {$IFDEF DELPHI5} - Result := GetOrdProp(GetObject(AObject), AName) - {$ELSE} - Result := GetOrdProp(GetObject(AObject), GetPropInfo_(AObject, AName)) - {$ENDIF} - else - Result := ADefaultValue; -end; - -{$IFDEF DELPHI6} -function TcxCustomConverter.GetInterfaceProperty(AObject: TObject; const AName: string; - const ADefaultValue: IUnknown): IUnknown; -begin - if TestProperty(AObject, AName, tkInterface) then - Result := GetInterfaceProp(GetObject(AObject), AName) - else - Result := ADefaultValue; -end; -{$ENDIF} - -function TcxCustomConverter.GetMethodProperty(AObject: TObject; const AName: string; - const ADefaultValue: TMethod): TMethod; -begin - if TestProperty(AObject, AName, tkMethod) then - {$IFDEF DELPHI5} - Result := GetMethodProp(GetObject(AObject), AName) - {$ELSE} - Result := GetMethodProp(GetObject(AObject), GetPropInfo_(AObject, AName)) - {$ENDIF} - else - Result := ADefaultValue; -end; - -procedure TcxCustomConverter.GetSetProperty(AObject: TObject; const AName: string; AValues: TStrings); -{$IFNDEF DELPHI5} -type - TIntegerSet = set of 0..SizeOf(Integer) * 8 - 1; -{$ENDIF} -var -{$IFDEF DELPHI5} - AString: string; -{$ELSE} - AIS: TIntegerSet; - ATypeInfo: PTypeInfo; - APropInfo: PPropInfo; -{$ENDIF} - I: Integer; -begin - if TestProperty(AObject, AName, tkSet) then - begin - if AValues <> nil then - begin - {$IFDEF DELPHI5} - AString := GetSetProp(GetObject(AObject), AName); - if AString <> '' then - begin - AValues.Add(''); - for I := 1 to Length(AString) do - begin - if AString[I] = ',' then - AValues.Add('') - else - AValues[AValues.Count - 1] := AValues[AValues.Count - 1] + AString[I]; - end; - end; - {$ELSE} - APropInfo := GetPropInfo_(AObject, AName); - Integer(AIS) := GetOrdProp(GetObject(AObject), APropInfo); - ATypeInfo := GetTypeData(APropInfo^.PropType^)^.CompType^; - for I := 0 to SizeOf(Integer) * 8 - 1 do - if I in AIS then - AValues.Add(GetEnumName(ATypeInfo, I)); - {$ENDIF} - end; - end; -end; - -function TcxCustomConverter.GetStringProperty(AObject: TObject; const AName: string; - const ADefaultValue: string): string; -begin - try - if not TestProperty(AObject, AName, tkString) then - if not TestProperty(AObject, AName, tkLString) then - begin - Result := ADefaultValue; - Exit; - end; - except - on EcxUnknownProperty do - TestProperty(AObject, AName, tkLString); - end; - - {$IFDEF DELPHI5} - Result := GetStrProp(GetObject(AObject), AName); - {$ELSE} - Result := GetStrProp(GetObject(AObject), GetPropInfo_(AObject, AName)); - {$ENDIF} -end; - -function TcxCustomConverter.GetVariantProperty(AObject: TObject; const AName: string; - const ADefaultValue: Variant): Variant; -begin - if TestProperty(AObject, AName, tkVariant) then - {$IFDEF DELPHI5} - Result := GetVariantProp(GetObject(AObject), AName) - {$ELSE} - Result := GetVariantProp(GetObject(AObject), GetPropInfo_(AObject, AName)) - {$ENDIF} - else - Result := ADefaultValue; -end; - -function TcxCustomConverter.GetWideCharProperty(AObject: TObject; const AName: string; - const ADefaultValue: WideChar): WideChar; -begin - if TestProperty(AObject, AName, tkWChar) then - {$IFDEF DELPHI5} - Result := WideChar(GetOrdProp(GetObject(AObject), AName)) - {$ELSE} - Result := WideChar(GetOrdProp(GetObject(AObject), GetPropInfo_(AObject, AName))) - {$ENDIF} - else - Result := ADefaultValue; -end; - -function TcxCustomConverter.GetWideStringProperty(AObject: TObject; const AName: string; - const ADefaultValue: WideString): WideString; -begin - if TestProperty(AObject, AName, tkWString) then - {$IFDEF DELPHI5} - Result := GetStrProp(GetObject(AObject), AName) - {$ELSE} - Result := GetStrProp(GetObject(AObject), GetPropInfo_(AObject, AName)) - {$ENDIF} - else - Result := ADefaultValue; -end; - -procedure TcxCustomConverter.PostImport; -begin -end; - -procedure TcxCustomConverter.PreImport; -begin -end; - -function TcxCustomConverter.GetObject(AObject: TObject): TObject; -begin - if AObject <> nil then - Result := AObject - else - Result := FSource; -end; - -function TcxCustomConverter.GetPropInfo_(AObject: TObject; const AName: string): PPropInfo; -begin - Result := GetPropInfo(GetObject(AObject).ClassInfo, AName); -end; - -function TcxCustomConverter.TestProperty(AObject: TObject; const AName: string; - ATypeKind: TTypeKind): Boolean; -var - APPropInfo: PPropInfo; -begin - Result := True; - APPropInfo := GetPropInfo_(AObject, AName); - if APPropInfo <> nil then - begin - if APPropInfo^.PropType^.Kind <> ATypeKind then - begin - if FPropertyExceptionEnabled then - raise EcxUnknownProperty.Create('Invalid property type') - else - Result := False; - end; - end - else - begin - if FPropertyExceptionEnabled then - raise EcxUnknownProperty.Create('Invalid property name') - else - Result := False; - end; -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxDWMApi.pas b/internal/x.46/ExpressLibrary/Sources/cxDWMApi.pas deleted file mode 100644 index dd9c3d4c..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxDWMApi.pas +++ /dev/null @@ -1,180 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDWMApi; - -{$I cxVer.inc} - -interface - -uses - Windows, dxUxTheme; - -const - {$EXTERNALSYM WM_DWMCOMPOSITIONCHANGED} - WM_DWMCOMPOSITIONCHANGED = $0031E; - {$EXTERNALSYM WM_DWMNCRENDERINGCHANGED} - WM_DWMNCRENDERINGCHANGED = $0031F; - {$EXTERNALSYM WM_DWMCOLORIZATIONCOLORCHANGED} - WM_DWMCOLORIZATIONCOLORCHANGED = $00320; - {$EXTERNALSYM WM_DWMWINDOWMAXIMIZEDCHANGE} - WM_DWMWINDOWMAXIMIZEDCHANGE = $00321; - - {$EXTERNALSYM DWM_EC_DISABLECOMPOSITION} - DWM_EC_DISABLECOMPOSITION = 0; - {$EXTERNALSYM DWM_EC_ENABLECOMPOSITION} - DWM_EC_ENABLECOMPOSITION = 1; - - // Blur behind data structures - {$EXTERNALSYM DWM_BB_ENABLE} - DWM_BB_ENABLE = $00000001; // fEnable has been specified - {$EXTERNALSYM DWM_BB_BLURREGION} - DWM_BB_BLURREGION = $00000002; // hRgnBlur has been specified} - {$EXTERNALSYM DWM_BB_TRANSITIONONMAXIMIZED} - DWM_BB_TRANSITIONONMAXIMIZED = $00000004; // fTransitionOnMaximized has been specified - - // Window attributes - {$EXTERNALSYM DWMWA_NCRENDERING_ENABLED} - DWMWA_NCRENDERING_ENABLED = 1; // [get] Is non-client rendering enabled/disabled - {$EXTERNALSYM DWMWA_NCRENDERING_POLICY} - DWMWA_NCRENDERING_POLICY = 2; // [set] Non-client rendering policy - {$EXTERNALSYM DWMWA_TRANSITIONS_FORCEDISABLED} - DWMWA_TRANSITIONS_FORCEDISABLED = 3; // [set] Potentially enable/forcibly disable transitions - {$EXTERNALSYM DWMWA_ALLOW_NCPAINT} - DWMWA_ALLOW_NCPAINT = 4; // [set] Allow contents rendered in the non-client area to be visible on the DWM-drawn frame. - {$EXTERNALSYM DWMWA_CAPTION_BUTTON_BOUNDS} - DWMWA_CAPTION_BUTTON_BOUNDS = 5; // [get] Bounds of the caption button area in window-relative space. - {$EXTERNALSYM DWMWA_NONCLIENT_RTL_LAYOUT} - DWMWA_NONCLIENT_RTL_LAYOUT = 6; // [set] Is non-client content RTL mirrored - {$EXTERNALSYM DWMWA_FORCE_ICONIC_REPRESENTATION} - DWMWA_FORCE_ICONIC_REPRESENTATION = 7; // [set] Force this window to display iconic thumbnails. - {$EXTERNALSYM DWMWA_FLIP3D_POLICY} - DWMWA_FLIP3D_POLICY = 8; // [set] Designates how Flip3D will treat the window. - {$EXTERNALSYM DWMWA_EXTENDED_FRAME_BOUNDS} - DWMWA_EXTENDED_FRAME_BOUNDS = 9; // [get] Gets the extended frame bounds rectangle in screen space - {$EXTERNALSYM DWMWA_LAST} - DWMWA_LAST = 10; - -type - _DWM_BLURBEHIND = packed record - dwFlags: DWORD; - fEnable: Bool; - hRgnBlur: HRGN; - fTransitionOnMaximized: Bool; - end; - DWM_BLURBEHIND = _DWM_BLURBEHIND; - PDWM_BLURBEHIND = ^_DWM_BLURBEHIND; - - // Non-client rendering policy attribute values - TDWMNCRENDERINGPOLICY = ( - DWMNCRP_USEWINDOWSTYLE, // Enable/disable non-client rendering based on window style - DWMNCRP_DISABLED, // Disabled non-client rendering; window style is ignored - DWMNCRP_ENABLED, // Enabled non-client rendering; window style is ignored - DWMNCRP_LAST); - -var - DwmDefWindowProc: function (wnd: HWND; msg: UINT; wParam: WPARAM; - lParam: LPARAM; plResult: LRESULT): HRESULT; stdcall; - DwmEnableBlurBehindWindow: function (wnd: HWND; - pBlurBehind: PDWM_BLURBEHIND): HRESULT; stdcall; - DwmEnableComposition: function (uCompositionAction: Boolean): HRESULT; stdcall; - DwmEnableMMCSS: function (fEnableMMCSS: Boolean): HRESULT; stdcall; - DwmExtendFrameIntoClientArea: function (wnd: HWND; - pMarInset: PdxMargins): HRESULT; stdcall; - DwmGetColorizationColor: function (out pcrColorization: DWORD; - out pfOpaqueBlend: BOOL): HRESULT; stdcall; - DwmGetWindowAttribute: function(hwnd: HWND; dwAttribute: DWORD; - pvAttribute: Pointer; cbAttribute: DWORD): HRESULT; stdcall; - DwmIsCompositionEnabled: function(out pfEnabled: BOOL): HRESULT; stdcall; - DwmSetWindowAttribute: function(hwnd: HWND; dwAttribute: DWORD; - pvAttribute: Pointer; cbAttribute: DWORD): HRESULT; stdcall; - -function IsDwmPresent: Boolean; -function IsCompositionEnabled: Boolean; - -implementation - -uses - SysUtils; - -var - dwmapiDLL: THandle; - dwmPresent: Boolean; - -function IsDwmPresent: Boolean; -begin - Result := dwmPresent; -end; - -function IsCompositionEnabled: Boolean; -var - B: BOOL; -begin - Result := IsDwmPresent; - if Result then - begin - DwmIsCompositionEnabled(B); - Result := B; - end; -end; - -function InitDWM: Boolean; -begin - Result := False; - if Win32MajorVersion < 6 then Exit; - dwmapiDLL := LoadLibrary('dwmapi.dll'); - if dwmapiDLL <> 0 then - begin - DwmDefWindowProc := GetProcAddress(dwmapiDLL, 'DwmDefWindowProc'); - DwmEnableBlurBehindWindow := GetProcAddress(dwmapiDLL, 'DwmEnableBlurBehindWindow'); - DwmEnableComposition := GetProcAddress(dwmapiDLL, 'DwmEnableComposition'); - DwmEnableMMCSS := GetProcAddress(dwmapiDLL, 'DwmEnableMMCSS'); - DwmExtendFrameIntoClientArea := GetProcAddress(dwmapiDLL, 'DwmExtendFrameIntoClientArea'); - DwmGetColorizationColor := GetProcAddress(dwmapiDLL, 'DwmGetColorizationColor'); - DwmGetWindowAttribute := GetProcAddress(dwmapiDLL, 'DwmGetWindowAttribute'); - DwmIsCompositionEnabled := GetProcAddress(dwmapiDLL, 'DwmIsCompositionEnabled'); - DwmSetWindowAttribute := GetProcAddress(dwmapiDLL, 'DwmSetWindowAttribute'); - Result := True; - end; -end; - -initialization - dwmPresent := InitDWM; - -finalization - if dwmapiDLL <> 0 then - FreeLibrary(dwmapiDLL); - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxDateUtils.pas b/internal/x.46/ExpressLibrary/Sources/cxDateUtils.pas deleted file mode 100644 index 20ebae74..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxDateUtils.pas +++ /dev/null @@ -1,4068 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDateUtils; - -{$I cxVer.inc} - -interface - -uses - Variants, SysUtils, - Windows, Controls, Classes, Graphics, cxClasses; - -type - TDay = (dSunday, dMonday, dTuesday, dWednesday, dThursday, dFriday, dSaturday); - TDays = set of TDay; - TDayOfWeek = 0..6; - TcxDateElement = (deYear, deMonth, deDay); - TcxFirstWeekOfYear = (fwySystem, fwyJan1, fwyFirstFullWeek, fwyFirstFourDays); - -const - DATE_YEARMONTH = $00000008; // use year month picture - {$EXTERNALSYM DATE_YEARMONTH} - DATE_LTRREADING = $00000010; // add marks for left to right reading order layout - {$EXTERNALSYM DATE_LTRREADING} - DATE_RTLREADING = $00000020; // add marks for right to left reading order layout - {$EXTERNALSYM DATE_RTLREADING} - - NullDate = -700000; - InvalidDate = NullDate + 1; - SmartTextToDateFunc: function(const AText: string; var ADate: TDateTime): Boolean = nil; - -{$IFNDEF DELPHI7} - ApproxDaysPerMonth: Double = 30.4375; - ApproxDaysPerYear: Double = 365.25; - DaysPerWeek = 7; - WeeksPerFortnight = 2; - MonthsPerYear = 12; - YearsPerDecade = 10; - YearsPerCentury = 100; - YearsPerMillennium = 1000; - HoursPerDay = 24; - MinsPerHour = 60; - SecsPerMin = 60; - MSecsPerSec = 1000; - MinsPerDay = HoursPerDay * MinsPerHour; - SecsPerDay = MinsPerDay * SecsPerMin; - MSecsPerDay = SecsPerDay * MSecsPerSec; - DayMonday = 1; - DayTuesday = 2; - DayWednesday = 3; - DayThursday = 4; - DayFriday = 5; - DaySaturday = 6; - DaySunday = 7; -{$ENDIF} - -const - CAL_GREGORIAN = 1; //Gregorian (localized) calendar - {$EXTERNALSYM CAL_GREGORIAN} - CAL_GREGORIAN_US = 2; //Gregorian (U.S.) calendar - {$EXTERNALSYM CAL_GREGORIAN_US} - CAL_JAPAN = 3; // Japanese Emperor Era calendar - {$EXTERNALSYM CAL_JAPAN} - CAL_TAIWAN = 4; // Republic of China Era calendar - {$EXTERNALSYM CAL_TAIWAN} - CAL_KOREA = 5; // Korean Tangun Era calendar - {$EXTERNALSYM CAL_KOREA} - CAL_HIJRI = 6; // Hijri (Arabic Lunar) calendar - {$EXTERNALSYM CAL_HIJRI} - CAL_THAI = 7; // Thai calendar - {$EXTERNALSYM CAL_THAI} - CAL_HEBREW = 8; // Hebrew calendar - {$EXTERNALSYM CAL_HEBREW} - CAL_GREGORIAN_ME_FRENCH = 9; // Gregorian Middle East French calendar - {$EXTERNALSYM CAL_GREGORIAN_ME_FRENCH} - CAL_GREGORIAN_ARABIC = 10; // Gregorian Arabic calendar - {$EXTERNALSYM CAL_GREGORIAN_ARABIC} - CAL_GREGORIAN_XLIT_ENGLISH = 11; // Gregorian Transliterated English calendar - {$EXTERNALSYM CAL_GREGORIAN_XLIT_ENGLISH} - CAL_GREGORIAN_XLIT_FRENCH = 12; // Gregorian Transliterated French calendar - {$EXTERNALSYM CAL_GREGORIAN_XLIT_FRENCH} - CAL_JULIAN = 13; // Julian calendar - {$EXTERNALSYM CAL_JULIAN} - CAL_JAPANESELUNISOLAR = 14; // Japanes Lunar/Solar calendar - {$EXTERNALSYM CAL_JAPANESELUNISOLAR} - CAL_CHINESELUNISOLAR = 15; // Chinese Lunar/Solar calendar - {$EXTERNALSYM CAL_CHINESELUNISOLAR} - CAL_SAKA = 16; // reserved to match Office but not implemented in our code - {$EXTERNALSYM CAL_SAKA} - CAL_LUNAR_ETO_CHN = 17; // reserved to match Office but not implemented in our code - {$EXTERNALSYM CAL_LUNAR_ETO_CHN} - CAL_LUNAR_ETO_KOR = 18; // reserved to match Office but not implemented in our code - {$EXTERNALSYM CAL_LUNAR_ETO_KOR} - CAL_LUNAR_ETO_ROKUYOU = 19; // reserved to match Office but not implemented in our code - {$EXTERNALSYM CAL_LUNAR_ETO_ROKUYOU} - CAL_KOREANLUNISOLAR = 20; // Korean Lunar/Solar calendar - {$EXTERNALSYM CAL_KOREANLUNISOLAR} - CAL_TAIWANLUNISOLAR = 21; // Taiwan Lunar/Solar calendar - {$EXTERNALSYM CAL_TAIWANLUNISOLAR} - CAL_PERSIAN = 22; // Persian calendar - {$EXTERNALSYM CAL_PERSIAN} - CAL_UMALQURA = 23; // UmAlQura Hijri (Arabic Lunar) calendar } - {$EXTERNALSYM CAL_UMALQURA} - - CAL_SSHORTESTDAYNAME1 = $00000060; // Windows Vista or later: Short native name of the first day of the week. - {$EXTERNALSYM CAL_SSHORTESTDAYNAME1} - CAL_SSHORTESTDAYNAME2 = $00000061; // Windows Vista or later: Short native name of the second day of the week. - {$EXTERNALSYM CAL_SSHORTESTDAYNAME2} - CAL_SSHORTESTDAYNAME3 = $00000062; // Windows Vista or later: Short native name of the third day of the week.\ - {$EXTERNALSYM CAL_SSHORTESTDAYNAME3} - CAL_SSHORTESTDAYNAME4 = $00000063; // Windows Vista or later: Short native name of the fourth day of the week. - {$EXTERNALSYM CAL_SSHORTESTDAYNAME4} - CAL_SSHORTESTDAYNAME5 = $00000064; // Windows Vista or later: Short native name of the fifth day of the week. - {$EXTERNALSYM CAL_SSHORTESTDAYNAME5} - CAL_SSHORTESTDAYNAME6 = $00000065; // Windows Vista or later: Short native name of the sixth day of the week. - {$EXTERNALSYM CAL_SSHORTESTDAYNAME6} - CAL_SSHORTESTDAYNAME7 = $00000066; // Windows Vista or later: Short native name of the seventh day of the week. - {$EXTERNALSYM CAL_SSHORTESTDAYNAME7} - - CAL_RETURN_NUMBER = $20000000; // Windows 98/Me, Windows 2000 and later: Returns the result from GetCalendarInfo as a number instead of a string. This is only valid for CALTYPES beginning with CAL_I. - {$EXTERNALSYM CAL_RETURN_NUMBER} - CAL_ITWODIGITYEARMAX = $00000030; // Windows 98/Me, Windows 2000 and later: An integer value indicating the upper boundary of the two-digit year range. - {$EXTERNALSYM CAL_ITWODIGITYEARMAX} - CAL_SYEARMONTH = $0000002F; // Windows 98/Me, Windows 2000 and later: Enumerates the year/month formats for the specified calendars. - {$EXTERNALSYM CAL_SYEARMONTH} - -type -{$IFNDEF DELPHI7} - TFormatSettings = record - CurrencyFormat: Byte; - NegCurrFormat: Byte; - ThousandSeparator: Char; - DecimalSeparator: Char; - CurrencyDecimals: Byte; - DateSeparator: Char; - TimeSeparator: Char; - ListSeparator: Char; - CurrencyString: string; - ShortDateFormat: string; - LongDateFormat: string; - TimeAMString: string; - TimePMString: string; - ShortTimeFormat: string; - LongTimeFormat: string; - ShortMonthNames: array[1..12] of string; - LongMonthNames: array[1..12] of string; - ShortDayNames: array[1..7] of string; - LongDayNames: array[1..7] of string; - TwoDigitYearCenturyWindow: Word; - end; -{$ENDIF} - - {$EXTERNALSYM TcxCALID} - TcxCALID = DWORD; { Calendar ID. } - - TcxCalendarAlgorithmType = (catUnknown, catSolarCalendar, catLunarCalendar, - catLunarSolarCalendar); - - TcxDateTime = record - Era: Integer; - Year: Cardinal; - Month: Cardinal; - Day: Cardinal; - Hours: Byte; - Minutes: Byte; - Seconds: Byte; - Milliseconds: Word; - end; - - TcxDate = record - Era: Integer; - Year: Cardinal; - Month: Cardinal; - Day: Cardinal; - end; - - TcxTime = record - Hours: Cardinal; - Minutes: Cardinal; - Seconds: Cardinal; - Miliseconds: Cardinal; - end; - - TcxEra = class(TPersistent) - private - FEra: Integer; - FMaxEraYear: Integer; - FMinEraYear: Integer; - FStartDate: TDateTime; - FYearOffset: Integer; - public - constructor Create(AEra: Integer; AStartDate: TDateTime; - AYearOffset, AMinEraYear, AMaxEraYear: Integer); - procedure Assign(Source: TPersistent); override; - - property Era: Integer read FEra write FEra; - property MaxEraYear: Integer read FMaxEraYear write FMaxEraYear; - property MinEraYear: Integer read FMinEraYear write FMinEraYear; - property StartDate: TDateTime read FStartDate write FStartDate; - property YearOffset: Integer read FYearOffset write FYearOffset; - end; - - TcxEras = class(TcxObjectList) - private - function GetItem(AIndex: Integer): TcxEra; - procedure SetItem(AIndex: Integer; AValue: TcxEra); - public - property Items[Index: Integer]: TcxEra read GetItem write SetItem; default; - end; - - { TcxCustomCalendarTable } - - TcxCustomCalendarTable = class - protected - FEras: TcxEras; - procedure AdjustYear(var AYear, AEra: Integer); overload; virtual; - procedure AdjustYear(var AYear, AEra: Integer; AMonth, ADay: Integer); overload; virtual; - function GetCalendarAlgorithmType: TcxCalendarAlgorithmType; virtual; abstract; - function GetCalendarID: TcxCALID; virtual; abstract; - function GetDefaultEra: TcxEra; virtual; abstract; - function GetMaxSupportedDate: TDateTime; virtual; abstract; - function GetMinSupportedDate: TDateTime; virtual; abstract; - procedure CheckDateTime(var ADateTime: TDateTime); virtual; - function GetMaxSupportedYear: Integer; virtual; abstract; - function GetMinSupportedYear: Integer; virtual; abstract; - function IsNotValid(ADate: TcxDateTime; out AResult: TDateTime): Boolean; - procedure YearToGregorianYear(var AYear: Cardinal; AEra: Integer); - public - constructor Create; virtual; - destructor Destroy; override; - - function AddDays(ADate: TcxDateTime; ACountDays: Integer): TDateTime; overload; virtual; - - function AddMonths(ADate: TDateTime; ACountMonths: Integer): TDateTime; overload; virtual; - function AddMonths(ADate: TcxDateTime; ACountMonths: Integer): TDateTime; overload; virtual; - - function AddYears(ADate: TDateTime; ACountYears: Integer): TDateTime; overload; virtual; - function AddYears(ADate: TcxDateTime; ACountYears: Integer): TDateTime; overload; virtual; - - function AddWeeks(ADate: TDateTime; ACountWeeks: Integer): TDateTime; overload; virtual; - function AddWeeks(ADate: TcxDateTime; ACountWeeks: Integer): TDateTime; overload; virtual; - - function FromDateTime(ADate: TDateTime): TcxDateTime; overload; virtual; abstract; - function FromDateTime(AYear, AMonth, ADay: Cardinal): TcxDateTime; overload; virtual; - function FromDateTime(AYear, AMonth, ADay: Cardinal; AHours, AMinutes, ASeconds: Byte; - AMilliseconds: Word): TcxDateTime; overload; virtual; - function GetDayOfYear(ADate: TDateTime): Cardinal; overload; virtual; - function GetDayOfYear(ADate: TcxDateTime): Cardinal; overload; virtual; - function GetDaysInMonth(AYear, AMonth: Cardinal): Cardinal; overload; virtual; - function GetDaysInMonth(AEra: Integer; AYear, AMonth: Cardinal): Cardinal; overload; virtual; abstract; - function GetDaysInYear(AYear: Cardinal): Cardinal; overload; virtual; - function GetDaysInYear(AEra: Integer; AYear: Cardinal): Cardinal; overload; virtual; abstract; - function GetEra(AYear: Integer): Integer; overload; virtual; - function GetEra(AYear, AMonth, ADay: Integer): Integer; overload; virtual; - function GetFirstDayOfWeek(ADate: TDateTime): TDateTime; overload; virtual; - function GetFirstDayOfWeek(ADate: TDateTime; AStartDayOfWeek: TDay): TDateTime; overload; virtual; - function GetFirstDayOfWeek(ADate: TcxDateTime): TcxDateTime; overload; virtual; - function GetFirstDayOfWeek(ADate: TcxDateTime; AStartDayOfWeek: TDay): TcxDateTime; overload; virtual; - function GetFirstWeekDay: Byte; virtual; abstract; - function GetFullWeeksInYear(AYear: Cardinal): Cardinal; virtual; abstract; - function GetMonthsInYear(AYear: Cardinal): Cardinal; overload; virtual; - function GetMonthsInYear(AEra: Integer; AYear: Cardinal): Cardinal; overload; virtual; abstract; - function GetYear(ADate: TDateTime): Cardinal; overload; virtual; - function GetYear(ADate: TcxDate): Cardinal; overload; virtual; - function GetYear(ADate: TcxDateTime): Cardinal; overload; virtual; - function GetWeekDay(ADate: TDateTime): Byte; overload; virtual; - function GetWeekDay(ADate: TcxDateTime): Byte; overload; virtual; - function GetWeekNumber(ADate: TDateTime; AStartOfWeek: TDay; - AFirstWeekOfYear: TcxFirstWeekOfYear): Cardinal; overload; virtual; - function GetWeekNumber(ADate: TcxDateTime; AStartOfWeek: TDay; - AFirstWeekOfYear: TcxFirstWeekOfYear): Cardinal; overload; virtual; abstract; - function IsLeapDay(AYear, AMonth, ADay: Cardinal): Boolean; overload; virtual; - function IsLeapDay(AEra: Integer; AYear, AMonth, ADay: Cardinal): Boolean; overload; virtual; abstract; - function IsLeapMonth(AYear, AMonth: Cardinal): Boolean; overload; virtual; - function IsLeapMonth(AEra: Integer; AYear, AMonth: Cardinal): Boolean; overload; virtual; abstract; - function IsLeapYear(AYear: Cardinal): Boolean; overload; virtual; - function IsLeapYear(AEra: Integer; Year: Cardinal): Boolean; overload; virtual; abstract; - - function IsValidYear(AYear: Cardinal): Boolean; overload; virtual; - function IsValidYear(AEra: Integer; AYear: Cardinal): Boolean; overload; virtual; - function IsValidMonth(AYear, AMonth: Cardinal): Boolean; overload; virtual; - function IsValidMonth(AEra: Integer; AYear, AMonth: Cardinal): Boolean; overload; virtual; - function IsValidDay(AYear, AMonth, ADay: Cardinal): Boolean; overload; virtual; - function IsValidDay(AEra: Integer; AYear, AMonth, ADay: Cardinal): Boolean; overload; virtual; - function IsValidDate(ADate: TDateTime): Boolean; virtual; - - function ToDateTime(ADate: TcxDate): TDateTime; overload; virtual; - function ToDateTime(AYear, AMonth, ADay: Cardinal): TDateTime; overload; virtual; - function ToDateTime(AYear, AMonth, ADay: Cardinal; AHours, AMinutes, ASeconds: Byte; - AMilliseconds: Word): TDateTime; overload; virtual; - function ToDateTime(ADateTime: TcxDateTime): TDateTime; overload; virtual; abstract; - - function GetDayNumber(const S: string): Integer; virtual; - function GetMonthNumber(AYear: Integer; const S: string): Integer; virtual; - function GetYearNumber(const S: string): Integer; virtual; - - property AlgorithmType: TcxCalendarAlgorithmType read GetCalendarAlgorithmType; - property CalendarID: TcxCALID read GetCalendarID; - property DefaultEra: TcxEra read GetDefaultEra; - property Eras: TcxEras read FEras; - property MaxSupportedDate: TDateTime read GetMaxSupportedDate; - property MinSupportedDate: TDateTime read GetMinSupportedDate; - end; - - { TcxGregorianCalendarTable } - - TcxGregorianCalendarTableType = (gctLocalized = 1, gctUSEnglish = 2, gctMiddleEastFrench = 9, - gctArabic = 10, gctTransliteratedEnglish = 11, gctTransliteratedFrench = 12); - - TcxGregorianCalendarTable = class(TcxCustomCalendarTable) - private - FDefaultEra: TcxEra; - FGregorianCalendarType: TcxGregorianCalendarTableType; - protected - function GetCalendarAlgorithmType: TcxCalendarAlgorithmType; override; - function GetCalendarID: TcxCALID; override; - function GetDefaultEra: TcxEra; override; - function GetMaxSupportedDate: TDateTime; override; - function GetMinSupportedDate: TDateTime; override; - function GetMaxSupportedYear: Integer; override; - function GetMinSupportedYear: Integer; override; - public - constructor Create; override; - destructor Destroy; override; - - function FromDateTime(ADate: TDateTime): TcxDateTime; overload; override; - function GetFirstWeekDay: Byte; override; - function GetWeekNumber(ADate: TcxDateTime; AStartOfWeek: TDay; - AFirstWeekOfYear: TcxFirstWeekOfYear): Cardinal; overload; override; - function GetDaysInMonth(AEra: Integer; AYear, AMonth: Cardinal): Cardinal; override; - function GetDaysInYear(AEra: Integer; AYear: Cardinal): Cardinal; override; - function GetFullWeeksInYear(AYear: Cardinal): Cardinal; override; - function GetMonthsInYear(AEra: Integer; AYear: Cardinal): Cardinal; override; - function IsLeapDay(AEra: Integer; AYear, AMonth, ADay: Cardinal): Boolean; override; - function IsLeapMonth(AEra: Integer; AYear, AMonth: Cardinal): Boolean; override; - function IsLeapYear(AEra: Integer; AYear: Cardinal): Boolean; override; - function ToDateTime(ADateTime: TcxDateTime): TDateTime; overload; override; - - property GregorianCalendarType: TcxGregorianCalendarTableType read - FGregorianCalendarType write FGregorianCalendarType; - end; - - { TcxJapaneseCalendarTable } - - TcxJapaneseCalendarTable = class(TcxGregorianCalendarTable) - protected - function GetCalendarAlgorithmType: TcxCalendarAlgorithmType; override; - function GetCalendarID: TcxCALID; override; - function GetDefaultEra: TcxEra; override; - function GetMaxSupportedDate: TDateTime; override; - function GetMinSupportedDate: TDateTime; override; - function GetMaxSupportedYear: Integer; override; - function GetMinSupportedYear: Integer; override; - public - constructor Create; override; - - function FromDateTime(ADate: TDateTime): TcxDateTime; overload; override; - function GetFirstWeekDay: Byte; override; - function ToDateTime(ADateTime: TcxDateTime): TDateTime; overload; override; - end; - - { TcxTaiwanCalendarTable } - - TcxTaiwanCalendarTable = class(TcxJapaneseCalendarTable) - protected - function GetCalendarAlgorithmType: TcxCalendarAlgorithmType; override; - function GetCalendarID: TcxCALID; override; - function GetDefaultEra: TcxEra; override; - function GetMinSupportedDate: TDateTime; override; - function GetMaxSupportedYear: Integer; override; - function GetMinSupportedYear: Integer; override; - public - constructor Create; override; - end; - - { TcxKoreanCalendarTable } - - TcxKoreanCalendarTable = class(TcxJapaneseCalendarTable) - protected - function GetCalendarAlgorithmType: TcxCalendarAlgorithmType; override; - function GetCalendarID: TcxCALID; override; - function GetDefaultEra: TcxEra; override; - function GetMinSupportedDate: TDateTime; override; - function GetMaxSupportedYear: Integer; override; - function GetMinSupportedYear: Integer; override; - public - constructor Create; override; - end; - - { TcxHijriCalendarTable } - - TcxHijriCalendarTable = class(TcxCustomCalendarTable) - private - FDefaultEra: TcxEra; - protected - function GetCalendarAlgorithmType: TcxCalendarAlgorithmType; override; - function GetCalendarID: TcxCALID; override; - function GetDefaultEra: TcxEra; override; - function GetMaxSupportedDate: TDateTime; override; - function GetMinSupportedDate: TDateTime; override; - function GetMaxSupportedYear: Integer; override; - function GetMinSupportedYear: Integer; override; - public - constructor Create; override; - destructor Destroy; override; - - function FromDateTime(ADate: TDateTime): TcxDateTime; overload; override; - function GetFirstWeekDay: Byte; override; - function GetWeekNumber(ADate: TcxDateTime; AStartOfWeek: TDay; - AFirstWeekOfYear: TcxFirstWeekOfYear): Cardinal; overload; override; - function GetDaysInMonth(AEra: Integer; AYear, AMonth: Cardinal): Cardinal; override; - function GetDaysInYear(AEra: Integer; AYear: Cardinal): Cardinal; override; - function GetFullWeeksInYear(AYear: Cardinal): Cardinal; override; - function GetMonthsInYear(AEra: Integer; AYear: Cardinal): Cardinal; override; - function IsLeapDay(AEra: Integer; AYear, AMonth, ADay: Cardinal): Boolean; override; - function IsLeapMonth(AEra: Integer; AYear, AMonth: Cardinal): Boolean; override; - function IsLeapYear(AEra: Integer; AYear: Cardinal): Boolean; override; - function ToDateTime(ADateTime: TcxDateTime): TDateTime; overload; override; - - function GetMonthNumber(AYear: Integer; const S: string): Integer; override; - end; - - { TcxThaiCalendarTable } - - TcxThaiCalendarTable = class(TcxJapaneseCalendarTable) - protected - function GetCalendarAlgorithmType: TcxCalendarAlgorithmType; override; - function GetCalendarID: TcxCALID; override; - function GetDefaultEra: TcxEra; override; - function GetMinSupportedDate: TDateTime; override; - function GetMaxSupportedYear: Integer; override; - function GetMinSupportedYear: Integer; override; - public - constructor Create; override; - end; - - { TcxHebrewCalendar } - - TcxHebrewCalendarTableTypeYear = (hctyDeficient = 1, hctyNormal = 2, hctyPerfect = 3); - - TcxHebrewCalendarTable = class(TcxCustomCalendarTable) - private - FDefaultEra: TcxEra; - function GetDayDifference(ALunarYearType, AMonth, ADay, - ALunarMonth, ALunarDay: Integer): Integer; - function HebrewNumber(const S: string): Integer; - procedure GetLunarMonthDay(AYear: Integer; var ADate: TcxDate); - protected - function GetCalendarAlgorithmType: TcxCalendarAlgorithmType; override; - function GetCalendarID: TcxCALID; override; - function GetDefaultEra: TcxEra; override; - function GetMaxSupportedDate: TDateTime; override; - function GetMinSupportedDate: TDateTime; override; - function GetMaxSupportedYear: Integer; override; - function GetMinSupportedYear: Integer; override; - public - constructor Create; override; - destructor Destroy; override; - - function FromDateTime(ADate: TDateTime): TcxDateTime; overload; override; - function GetFirstWeekDay: Byte; override; - function GetYearType(AYear: Cardinal): TcxHebrewCalendarTableTypeYear; - function GetWeekNumber(ADate: TcxDateTime; AStartOfWeek: TDay; - AFirstWeekOfYear: TcxFirstWeekOfYear): Cardinal; overload; override; - function GetDaysInMonth(AEra: Integer; AYear, AMonth: Cardinal): Cardinal; override; - function GetDaysInYear(AEra: Integer; AYear: Cardinal): Cardinal; override; - function GetFullWeeksInYear(AYear: Cardinal): Cardinal; override; - function GetMonthsInYear(AEra: Integer; AYear: Cardinal): Cardinal; override; - function IsLeapDay(AEra: Integer; AYear, AMonth, ADay: Cardinal): Boolean; override; - function IsLeapMonth(AEra: Integer; AYear, AMonth: Cardinal): Boolean; override; - function IsLeapYear(AEra: Integer; AYear: Cardinal): Boolean; override; - function ToDateTime(ADateTime: TcxDateTime): TDateTime; overload; override; - - function GetDayNumber(const S: string): Integer; override; - function GetMonthNumber(AYear: Integer; const S: string): Integer; override; - function GetYearNumber(const S: string): Integer; override; - end; - - TcxGetCalendarInfo = function (Locale: LCID; Calendar: CALID; - CalendType: CALTYPE; lpCalData : PChar; - cchData: Integer; lpValue: lpDWord): Integer; stdcall; - -function cxGetCalendarInfo(Locale: LCID; Calendar: CALID; - CalendType: CALTYPE; lpCalData: PChar; cchData: Integer; - lpValue: PDWORD): Integer; - -function cxDateToLocalFormatStr(ADate: TDateTime): string; -function cxDateToStr(ADate: TDateTime): string; overload; -function cxDateToStr(ADate: TDateTime; AFormat: TFormatSettings): string; overload; -function cxDayNumberToLocalFormatStr(ADate: TDateTime): string; overload; -function cxDayNumberToLocalFormatStr(ADay: Integer; ACalendar: TcxCustomCalendarTable = nil): string; overload; -function cxGetCalendar(ACalendType: CALTYPE): TcxCustomCalendarTable; -function cxGetLocalCalendarID: TcxCALID; -function cxGetLocalCalendar: TcxCustomCalendarTable; -function cxGetDateSeparator: Char; -function cxGetLocalFormatSettings: TFormatSettings; -function cxGetLocalLongDateFormat: string; -function cxGetLocalLongTimeFormat: string; -function cxGetLocalMonthName(ADate: TDateTime; ACalendar: TcxCustomCalendarTable): string; overload; -function cxGetLocalMonthName(AYear, AMonth: Integer; ACalendar: TcxCustomCalendarTable): string; overload; -function cxGetLocalMonthYear(ADate: TDateTime; ACalendar: TcxCustomCalendarTable = nil): string; -function cxGetLocalShortDateFormat: string; -function cxGetLocalTimeAMString: string; -function cxGetLocalTimePMString: string; -function cxGetLocalTimeSeparator: Char; -function cxGetLocalYear(ADate: TDateTime; ACalendar: TcxCustomCalendarTable = nil): string; -function cxGetDayOfWeekName(I: Integer; AFontCharset: TFontCharset): string; -function cxIsGregorianCalendar(ACalendar: TcxCustomCalendarTable = nil): Boolean; -function cxLocalFormatStrToDate(const ADateStr: string): TDateTime; -function cxStrToDate(const ADateStr: string; - ACalendar: TcxCustomCalendarTable = nil): TcxDateTime; overload; -function cxStrToDate(const ADateStr: string; - AFormat: TFormatSettings; - ACalendar: TcxCustomCalendarTable = nil): TcxDateTime; overload; -function cxStrToDate(const ADateString: string; const AFormat: TFormatSettings; - ACALTYPE: CALTYPE): TDate; overload; -function cxTimeToStr(ATime: TDateTime): string; overload; -function cxTimeToStr(ATime: TDateTime; ATimeFormat: string): string; overload; -function cxTimeToStr(ATime: TDateTime; AFormatSettings: TFormatSettings): string; overload; - - -var - MinYear: Integer = 100; - MaxYear: Integer = 9999; - cxMaxDateTime: Double = 2958465.99999; // 12/31/9999 11:59:59.999 PM - cxUseSingleCharWeekNames: Boolean = True; - -procedure AddDateRegExprMaskSmartInput(var AMask: string; ACanEnterTime: Boolean); -procedure DecMonth(var AYear, AMonth: Word); -procedure IncMonth(var AYear, AMonth: Word); overload; -procedure ChangeMonth(var AYear, AMonth: Word; Delta: Integer); -function GetMonthNumber(const ADate: TDateTime): Integer; -function GetDateElement(ADate: TDateTime; AElement: TcxDateElement; - ACalendar: TcxCustomCalendarTable = nil): Integer; -function IsLeapYear(AYear: Integer): Boolean; -function DaysPerMonth(AYear, AMonth: Integer): Integer; -function CheckDay(AYear, AMonth, ADay: Integer): Integer; -function TimeOf(const AValue: TDateTime): TDateTime; -function DateOf(const AValue: TDateTime): TDateTime; -function DayOfWeekOffset(const AValue: TDateTime): TDayOfWeek; - -function GetStartDateOfMonth(const ADate: TDateTime): TDateTime; -function GetStartOfWeek: Integer; -function GetEndDateOfMonth(const ADate: TDateTime; AIgnoreTime: Boolean): TDateTime; -function GetStartDateOfYear(const ADate: TDateTime): TDateTime; -function GetEndDateOfYear(const ADate: TDateTime; AIgnoreTime: Boolean): TDateTime; - -function cxGetDateFormat(ADate: TDateTime; out AFormatDate: string; AFlags: Integer; AFormat: string = ''): Boolean; -function DateToLongDateStr(ADate: TDateTime): string; -function GetWeekNumber(ADate: TDateTime; AStartOfWeek: TDay; - AFirstWeekOfYear: TcxFirstWeekOfYear): Integer; - -{$IFNDEF DELPHI6} -function HourOf(ADateTime: TDateTime): Word; -function IsPM(const AValue: TDateTime): Boolean; -function EncodeDateWeek(const AYear, AWeekOfYear: Word; - const ADayOfWeek: Word): TDateTime; -procedure DecodeDateWeek(const AValue: TDateTime; out AYear, AWeekOfYear, - ADayOfWeek: Word); -function DaysInAMonth(const AYear, AMonth: Word): Word; -function DaysInMonth(const AValue: TDateTime): Word; -function DayOf(const AValue: TDateTime): Word; -function DayOfTheMonth(const AValue: TDateTime): Word; -function DayOfTheWeek(const AValue: TDateTime): Word; -procedure DecodeDateTime(const AValue: TDateTime; out AYear, AMonth, ADay, - AHour, AMinute, ASecond, AMilliSecond: Word); -function EncodeDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, - AMilliSecond: Word): TDateTime; -procedure IncAMonth(var Year, Month, Day: Word; NumberOfMonths: Integer = 1); -function MinuteOf(const AValue: TDateTime): Word; -function MonthOf(const AValue: TDateTime): Word; -function StartOfTheYear(const AValue: TDateTime): TDateTime; -function StartOfTheMonth(const AValue: TDateTime): TDateTime; -function YearOf(const AValue: TDateTime): Word; -function YearsBetween(const ANow, AThen: TDateTime): Integer; -function MonthsBetween(const ANow, AThen: TDateTime): Integer; -function WeeksBetween(const ANow, AThen: TDateTime): Integer; -function DaysBetween(const ANow, AThen: TDateTime): Integer; -function IncYear(const AValue: TDateTime; - const ANumberOfYears: Integer = 1): TDateTime; -function IncMonth(const DateTime: TDateTime; NumberOfMonths: Integer): TDateTime; overload; -function IncWeek(const AValue: TDateTime; - const ANumberOfWeeks: Integer = 1): TDateTime; -function IncDay(const AValue: TDateTime; - const ANumberOfDays: Integer = 1): TDateTime; -function IncHour(const AValue: TDateTime; const ANumberOfHours: Int64 = 1): TDateTime; -function IncMinute(const AValue: TDateTime; const ANumberOfMinutes: Int64 = 1): TDateTime; -function WeekOfTheMonth(const AValue: TDateTime): Word; -function WeekOf(AValue: TDateTime): Word; -function WeekOfTheYear(const AValue: TDateTime): Word; -function DayOfTheYear(AValue: TDateTime): Word; -function EndOfTheYear(AValue: TDateTime): TDateTime; -{$ENDIF} - -function cxDateTimeToText(ADate: TDateTime; AFourDigitYearNeeded: Boolean = False; AUseDelphiDateTimeFormats: Boolean = False): string; -function cxTextToDateTime(const AText: string; AUseDelphiDateTimeFormats: Boolean = False): TDateTime; -function DateTimeToText(ADate: TDateTime; AFourDigitYearNeeded: Boolean = False): string; -function DateTimeToTextEx(const ADate: TDateTime; AIsMasked: Boolean; - AIsDateTimeEdit: Boolean = False; AFourDigitYearNeeded: Boolean = False): string; -function TextToDateEx(const AText: string; var ADate: TDateTime): Boolean; -function StrToDateDef(const ADateStr: string; ADefDate: TDateTime): TDateTime; -function SmartTextToDate(const AText: string; var ADate: TDateTime): Boolean; -function cxMinDateTime: Double; -function cxStrToDateTime(S: string; AUseOleDateFormat: Boolean; - out ADate: TDateTime): Boolean; - -function cxIsDateValid(ADate: Double): Boolean; - -implementation - -uses - DateUtils, cxFormats, cxLibraryStrs, cxControls, cxGraphics, dxCore; - -type - TcxDateEditSmartInput = (deiToday, deiYesterday, deiTomorrow, - deiSunday, deiMonday, deiTuesday, deiWednesday, deiThursday, deiFriday, deiSaturday, - deiFirst, deiSecond, deiThird, deiFourth, deiFifth, deiSixth, deiSeventh, - deiBOM, deiEOM, deiNow); - -var - scxDateEditSmartInput: array [TcxDateEditSmartInput] of string; - -const - cxHebrewTable: array [0..1315] of Integer = - (7,3,17,3, // 1583-1584 (Hebrew year: 5343 - 5344) - 0,4,11,2,21,6,1,3,13,2, // 1585-1589 - 25,4,5,3,16,2,27,6,9,1, // 1590-1594 - 20,2,0,6,11,3,23,4,4,2, // 1595-1599 - 14,3,27,4,8,2,18,3,28,6, // 1600 - 11,1,22,5,2,3,12,3,25,4, // 1605 - 6,2,16,3,26,6,8,2,20,1, // 1610 - 0,6,11,2,24,4,4,3,15,2, // 1615 - 25,6,8,1,19,2,29,6,9,3, // 1620 - 22,4,3,2,13,3,25,4,6,3, // 1625 - 17,2,27,6,7,3,19,2,31,4, // 1630 - 11,3,23,4,5,2,15,3,25,6, // 1635 - 6,2,19,1,29,6,10,2,22,4, // 1640 - 3,3,14,2,24,6,6,1,17,3, // 1645 - 28,5,8,3,20,1,32,5,12,3, // 1650 - 22,6,4,1,16,2,26,6,6,3, // 1655 - 17,2,0,4,10,3,22,4,3,2, // 1660 - 14,3,24,6,5,2,17,1,28,6, // 1665 - 9,2,19,3,31,4,13,2,23,6, // 1670 - 3,3,15,1,27,5,7,3,17,3, // 1675 - 29,4,11,2,21,6,3,1,14,2, // 1680 - 25,6,5,3,16,2,28,4,9,3, // 1685 - 20,2,0,6,12,1,23,6,4,2, // 1690 - 14,3,26,4,8,2,18,3,0,4, // 1695 - 10,3,21,5,1,3,13,1,24,5, // 1700 - 5,3,15,3,27,4,8,2,19,3, // 1705 - 29,6,10,2,22,4,3,3,14,2, // 1710 - 26,4,6,3,18,2,28,6,10,1, // 1715 - 20,6,2,2,12,3,24,4,5,2, // 1720 - 16,3,28,4,8,3,19,2,0,6, // 1725 - 12,1,23,5,3,3,14,3,26,4, // 1730 - 7,2,17,3,28,6,9,2,21,4, // 1735 - 1,3,13,2,25,4,5,3,16,2, // 1740 - 27,6,9,1,19,3,0,5,11,3, // 1745 - 23,4,4,2,14,3,25,6,7,1, // 1750 - 18,2,28,6,9,3,21,4,2,2, // 1755 - 12,3,25,4,6,2,16,3,26,6, // 1760 - 8,2,20,1,0,6,11,2,22,6, // 1765 - 4,1,15,2,25,6,6,3,18,1, // 1770 - 29,5,9,3,22,4,2,3,13,2, // 1775 - 23,6,4,3,15,2,27,4,7,3, // 1780 - 19,2,31,4,11,3,21,6,3,2, // 1785 - 15,1,25,6,6,2,17,3,29,4, // 1790 - 10,2,20,6,3,1,13,3,24,5, // 1795 - 4,3,16,1,27,5,7,3,17,3, // 1800 - 0,4,11,2,21,6,1,3,13,2, // 1805 - 25,4,5,3,16,2,29,4,9,3, // 1810 - 19,6,30,2,13,1,23,6,4,2, // 1815 - 14,3,27,4,8,2,18,3,0,4, // 1820 - 11,3,22,5,2,3,14,1,26,5, // 1825 - 6,3,16,3,28,4,10,2,20,6, // 1830 - 30,3,11,2,24,4,4,3,15,2, // 1835 - 25,6,8,1,19,2,29,6,9,3, // 1840 - 22,4,3,2,13,3,25,4,7,2, // 1845 - 17,3,27,6,9,1,21,5,1,3, // 1850 - 11,3,23,4,5,2,15,3,25,6, // 1855 - 6,2,19,1,29,6,10,2,22,4, // 1860 - 3,3,14,2,24,6,6,1,18,2, // 1865 - 28,6,8,3,20,4,2,2,12,3, // 1870 - 24,4,4,3,16,2,26,6,6,3, // 1875 - 17,2,0,4,10,3,22,4,3,2, // 1880 - 14,3,24,6,5,2,17,1,28,6, // 1885 - 9,2,21,4,1,3,13,2,23,6, // 1890 - 5,1,15,3,27,5,7,3,19,1, // 1895 - 0,5,10,3,22,4,2,3,13,2, // 1900 - 24,6,4,3,15,2,27,4,8,3, // 1905 - 20,4,1,2,11,3,22,6,3,2, // 1910 - 15,1,25,6,7,2,17,3,29,4, // 1915 - 10,2,21,6,1,3,13,1,24,5, // 1920 - 5,3,15,3,27,4,8,2,19,6, // 1925 - 1,1,12,2,22,6,3,3,14,2, // 1930 - 26,4,6,3,18,2,28,6,10,1, // 1935 - 20,6,2,2,12,3,24,4,5,2, // 1940 - 16,3,28,4,9,2,19,6,30,3, // 1945 - 12,1,23,5,3,3,14,3,26,4, // 1950 - 7,2,17,3,28,6,9,2,21,4, // 1955 - 1,3,13,2,25,4,5,3,16,2, // 1960 - 27,6,9,1,19,6,30,2,11,3, // 1965 - 23,4,4,2,14,3,27,4,7,3, // 1970 - 18,2,28,6,11,1,22,5,2,3, // 1975 - 12,3,25,4,6,2,16,3,26,6, // 1980 - 8,2,20,4,30,3,11,2,24,4, // 1985 - 4,3,15,2,25,6,8,1,18,3, // 1990 - 29,5,9,3,22,4,3,2,13,3, // 1995 - 23,6,6,1,17,2,27,6,7,3, // 2000 - 2004 - 20,4,1,2,11,3,23,4,5,2, // 2005 - 2009 - 15,3,25,6,6,2,19,1,29,6, // 2010 - 10,2,20,6,3,1,14,2,24,6, // 2015 - 4,3,17,1,28,5,8,3,20,4, // 2020 - 1,3,12,2,22,6,2,3,14,2, // 2025 - 26,4,6,3,17,2,0,4,10,3, // 2030 - 20,6,1,2,14,1,24,6,5,2, // 2035 - 15,3,28,4,9,2,19,6,1,1, // 2040 - 12,3,23,5,3,3,15,1,27,5, // 2045 - 7,3,17,3,29,4,11,2,21,6, // 2050 - 1,3,12,2,25,4,5,3,16,2, // 2055 - 28,4,9,3,19,6,30,2,12,1, // 2060 - 23,6,4,2,14,3,26,4,8,2, // 2065 - 18,3,0,4,10,3,22,5,2,3, // 2070 - 14,1,25,5,6,3,16,3,28,4, // 2075 - 9,2,20,6,30,3,11,2,23,4, // 2080 - 4,3,15,2,27,4,7,3,19,2, // 2085 - 29,6,11,1,21,6,3,2,13,3, // 2090 - 25,4,6,2,17,3,27,6,9,1, // 2095 - 20,5,30,3,10,3,22,4,3,2, // 2100 - 14,3,24,6,5,2,17,1,28,6, // 2105 - 9,2,21,4,1,3,13,2,23,6, // 2110 - 5,1,16,2,27,6,7,3,19,4, // 2115 - 30,2,11,3,23,4,3,3,14,2, // 2120 - 25,6,5,3,16,2,28,4,9,3, // 2125 - 21,4,2,2,12,3,23,6,4,2, // 2130 - 16,1,26,6,8,2,20,4,30,3, // 2135 - 11,2,22,6,4,1,14,3,25,5, // 2140 - 6,3,18,1,29,5,9,3,22,4, // 2145 - 2,3,13,2,23,6,4,3,15,2, // 2150 - 27,4,7,3,20,4,1,2,11,3, // 2155 - 21,6,3,2,15,1,25,6,6,2, // 2160 - 17,3,29,4,10,2,20,6,3,1, // 2165 - 13,3,24,5,4,3,17,1,28,5, // 2170 - 8,3,18,6,1,1,12,2,22,6, // 2175 - 2,3,14,2,26,4,6,3,17,2, // 2180 - 28,6,10,1,20,6,1,2,12,3, // 2185 - 24,4,5,2,15,3,28,4,9,2, // 2190 - 19,6,33,3,12,1,23,5,3,3, // 2195 - 13,3,25,4,6,2,16,3,26,6, // 2200 - 8,2,20,4,30,3,11,2,24,4, // 2205 - 4,3,15,2,25,6,8,1,18,6, // 2210 - 33,2,9,3,22,4,3,2,13,3, // 2215 - 25,4,6,3,17,2,27,6,9,1, // 2220 - 21,5,1,3,11,3,23,4,5,2, // 2225 - 15,3,25,6,6,2,19,4,33,3, // 2230 - 10,2,22,4,3,3,14,2,24,6, // 2235 - 6,1); // 2240 (Hebrew year: 6000) - - cxHebrewLunarMonthLen: array [0..6,0..13] of Integer = ( - (0,00,00,00,00,00,00,00,00,00,00,00,00,0), - (0,30,29,29,29,30,29,30,29,30,29,30,29,0), // 3 common year variations - (0,30,29,30,29,30,29,30,29,30,29,30,29,0), - (0,30,30,30,29,30,29,30,29,30,29,30,29,0), - (0,30,29,29,29,30,30,29,30,29,30,29,30,29), // 3 leap year variations - (0,30,29,30,29,30,30,29,30,29,30,29,30,29), - (0,30,30,30,29,30,30,29,30,29,30,29,30,29)); - - cxHebrewYearOf1AD = 3760; - cxHebrewFirstGregorianTableYear = 1583; - cxHebrewLastGregorianTableYear = 2239; - cxHebrewTableYear = cxHebrewLastGregorianTableYear - cxHebrewFirstGregorianTableYear; - -type - TcxDateOrder = (doMDY, doDMY, doYMD); - TcxMonthView = (mvName, mvDigital, mvNone); - TcxYearView = (yvFourDigitals, yvTwoDigitals, yvNone); - -function GetDateOrder(const ADateFormat: string): TcxDateOrder; -var - I: Integer; -begin - Result := doMDY; - I := 1; - while I <= Length(ADateFormat) do - begin - case Chr(Ord(ADateFormat[I]) and $DF) of - 'E': Result := doYMD; - 'Y': Result := doYMD; - 'M': Result := doMDY; - 'D': Result := doDMY; - else - Inc(I); - Continue; - end; - Exit; - end; - Result := doMDY; -end; - -function cxDateToStrByFormat(const ADate: TDateTime; const ADateFormat: string; const ADateSeparator: Char): string; - - function AddZeros(const S: string; ALength: Integer): string; - begin - Result := S; - if ALength <= Length(S) then - Exit; - Result := StringOfChar('0', ALength - Length(Result)) + Result; - end; - - function GetCountChar(const S: string; Ch: Char; var APos: Integer): Integer; - begin - Result := APos; - while (APos <= Length(S)) and (S[APos] = Ch)do - Inc(APos); - Result := APos - Result; - end; - - function GetMonthView(const ADateFormat: string; var APos: Integer): TcxMonthView; - var - ACount: Integer; - begin - ACount := GetCountChar(AnsiLowerCase(ADateFormat), 'm', APos); - if ACount = 4 then - Result := mvName - else - if ACount = 0 then - Result := mvNone - else - Result := mvDigital; - end; - - function GetYearView(const ADateFormat: string; var APos: Integer): TcxYearView; - var - ACount: Integer; - begin - ACount := GetCountChar(AnsiLowerCase(ADateFormat), 'y', APos); - if ACount = 4 then - Result := yvFourDigitals - else - if ACount = 0 then - Result := yvNone - else - Result := yvTwoDigitals; - end; - - function MonthToStr(AMonth: Integer; AView: TcxMonthView): string; - begin - case AView of - mvName: - Result := LongMonthNames[AMonth]; - mvDigital: - Result := AddZeros(IntToStr(AMonth), 2); - else - Result := ''; - end; - end; - - function YearToStr(AYear: Integer; AView: TcxYearView): string; - begin - if AView = yvNone then - begin - Result := ''; - Exit; - end; - Result := IntToStr(AYear); - if Length(Result) > 4 then - Result := Copy(Result, Length(Result) - 3, 4); - Result := AddZeros(Result, 4); - if AView = yvTwoDigitals then - Result := Copy(Result, Length(Result) - 1, 2); - end; - - function FindNextAllowChar(const S: string; var APos: Integer): Boolean; - begin - while (APos <= Length(S)) and not dxCharInSet(AnsiLowerCase(S[APos])[1], ['d', 'm', 'y']) do - Inc(APos); - Result := (APos <= Length(S)) and dxCharInSet(AnsiLowerCase(S[APos])[1], ['d', 'm', 'y']); - end; - - procedure AddToDateParth(var ADateString: string; const AParth: string; const ASeparator: string); - begin - if Length(ADateString) > 0 then - if ADateSeparator <> '' then - ADateString := ADateString + ADateSeparator - else - ADateString := ADateString + ASeparator; - ADateString := ADateString + AParth; - end; - -var - ASystemDate: TSystemTime; - APos: Integer; - ACurrentSeparator: string; - ACountChar: Integer; - ADayOfWeek: Integer; -begin - Result := ''; - DateTimeToSystemTime(ADate, ASystemDate); - ADayOfWeek := ASystemDate.wDayOfWeek; - Inc(ADayOfWeek); - if ADayOfWeek > 7 then - Dec(ADayOfWeek, 7); - APos := 1; - ACurrentSeparator := ''; - FindNextAllowChar(ADateFormat, APos); - while APos <= Length(ADateFormat) do - begin - case AnsiLowerCase(ADateFormat[APos])[1] of - 'd': - begin - ACountChar := GetCountChar(ADateFormat, 'd', APos); - if ACountChar = 3 then - AddToDateParth(Result, ShortDayNames[ADayOfWeek], ACurrentSeparator) - else - if ACountChar = 4 then - AddToDateParth(Result, LongDayNames[ADayOfWeek], ACurrentSeparator) - else - if ACountChar = 2 then - AddToDateParth(Result, AddZeros(IntToStr(ASystemDate.wDay), 2), ACurrentSeparator) - else - AddToDateParth(Result, IntToStr(ASystemDate.wDay), ACurrentSeparator); - ACurrentSeparator := ''; - end; - 'y': - begin - AddToDateParth(Result, YearToStr(ASystemDate.wYear, GetYearView(ADateFormat, APos)), ACurrentSeparator); - ACurrentSeparator := ''; - end; - 'm': - begin - AddToDateParth(Result, MonthToStr(ASystemDate.wMonth, GetMonthView(ADateFormat, APos)), ACurrentSeparator); - ACurrentSeparator := ''; - end; - 'e': - begin - FindNextAllowChar(ADateFormat, APos); - ACurrentSeparator := ''; - end; - else - begin - ACurrentSeparator := ACurrentSeparator + ADateFormat[APos]; - Inc(APos); - end; - end; - end; -end; - -procedure ScanBlanks(const S: string; var APos: Integer); -var - I: Integer; -begin - I := APos; - while (I <= Length(S)) and (S[I] = ' ') do Inc(I); - APos := I; -end; - -function cxDateToLocalFormatStr(ADate: TDateTime): string; -var - ATime: TTime; -begin - cxGetDateFormat(ADate, Result, 0, cxGetLocalShortDateFormat); - ATime := TimeOf(ADate); - if ATime > 0 then - Result := Result + ' ' + TimeToStr(ATime); -end; - -function cxDateToStr(ADate: TDateTime): string; -begin - Result := cxDateToStrByFormat(ADate, ShortDateFormat, DateSeparator); -end; - -function cxDateToStr(ADate: TDateTime; AFormat: TFormatSettings): string; -begin - Result := cxDateToStrByFormat(ADate, AFormat.ShortDateFormat, AFormat.DateSeparator); -end; - -function cxDayNumberToLocalFormatStr(ADate: TDateTime): string; -var - AOldFormatShortDate: string; -begin - if not cxGetDateFormat(ADate, Result, 0, 'd') then - begin - AOldFormatShortDate := ShortDateFormat; - ShortDateFormat := 'd'; - try - Result := DateToStr(ADate); - finally - ShortDateFormat := AOldFormatShortDate; - end; - end; -end; - -function cxDayNumberToLocalFormatStr(ADay: Integer; ACalendar: TcxCustomCalendarTable = nil): string; -var - ADate: TcxDate; - ANeedFreeAndNilCalendar: Boolean; -begin - if ACalendar = nil then - begin - ACalendar := cxGetLocalCalendar; - ANeedFreeAndNilCalendar := True; - end - else - ANeedFreeAndNilCalendar := False; - try - with ADate do - begin - Year := ACalendar.GetMinSupportedYear; - Month := 1; - Day := ADay; - end; - Result := cxDayNumberToLocalFormatStr(ACalendar.ToDateTime(ADate)); - finally - if ANeedFreeAndNilCalendar then - FreeAndNil(ACalendar); - end; -end; - -function cxGetCalendar(ACalendType: CALTYPE): TcxCustomCalendarTable; -begin - case ACalendType of - CAL_GREGORIAN, CAL_GREGORIAN_US, CAL_GREGORIAN_ME_FRENCH, CAL_GREGORIAN_ARABIC, - CAL_GREGORIAN_XLIT_ENGLISH, CAL_GREGORIAN_XLIT_FRENCH: - begin - Result := TcxGregorianCalendarTable.Create; - TcxGregorianCalendarTable(Result).GregorianCalendarType := TcxGregorianCalendarTableType(ACalendType); - end; - CAL_JAPAN: - Result := TcxJapaneseCalendarTable.Create; - CAL_TAIWAN: - Result := TcxTaiwanCalendarTable.Create; - CAL_KOREA: - Result := TcxKoreanCalendarTable.Create; - CAL_HIJRI: - Result := TcxHijriCalendarTable.Create; - CAL_THAI: - Result := TcxThaiCalendarTable.Create; - CAL_HEBREW: - Result := TcxHebrewCalendarTable.Create; - else - begin - Result := TcxGregorianCalendarTable.Create; - end; - end; -end; - -function InternalGetLocaleInfo(Locale: LCID; LCType: LCTYPE): string; -var - ABuf: array [0..255] of Char; -begin - GetLocaleInfo(Locale, LCType, ABuf, Length(ABuf)); - Result := ABuf; -end; - -function cxGetLocalCalendarID: TcxCALID; -begin - GetLocaleInfo(GetThreadLocale, LOCALE_ICALENDARTYPE or CAL_RETURN_NUMBER, - @Result, SizeOf(Result)); -end; - -function cxGetLocalCalendar: TcxCustomCalendarTable; -begin - Result := cxGetCalendar(cxGetLocalCalendarID); -end; - -function cxGetDateSeparator: Char; -begin - Result := InternalGetLocaleInfo(GetThreadLocale, LOCALE_SDATE)[1]; -end; - -function cxGetLocalFormatSettings: TFormatSettings; -begin - Result.DateSeparator := cxGetDateSeparator; - Result.ShortDateFormat := cxGetLocalShortDateFormat; - Result.LongDateFormat := cxGetLocalLongDateFormat; - - Result.TimeSeparator := cxGetLocalTimeSeparator; - Result.LongTimeFormat := cxGetLocalLongTimeFormat; - Result.TimeAMString := cxGetLocalTimeAMString; - Result.TimePMString := cxGetLocalTimePMString; - - Result.ListSeparator := ListSeparator; -end; - -function cxGetLocalLongDateFormat: string; -begin - Result := InternalGetLocaleInfo(GetThreadLocale, LOCALE_SLONGDATE); -end; - -function cxGetLocalLongTimeFormat: string; -begin - Result := InternalGetLocaleInfo(GetThreadLocale, LOCALE_STIMEFORMAT); -end; - -function cxGetLocalMonthName(ADate: TDateTime; ACalendar: TcxCustomCalendarTable): string; -var - AFormat: string; - AConvertDate: TcxDateTime; -begin - AConvertDate := ACalendar.FromDateTime(ADate); - AConvertDate.Day := 1; - AFormat := 'MMMM'; - if (cxIsGregorianCalendar(ACalendar) and cxFormatController.UseDelphiDateTimeFormats) or - not cxGetDateFormat(ACalendar.ToDateTime(AConvertDate), Result, - 0, AFormat) then - Result := LongMonthNames[AConvertDate.Month]; -end; - -function cxGetLocalMonthName(AYear, AMonth: Integer; ACalendar: TcxCustomCalendarTable): string; -var - ADate: TcxDate; -begin - if cxIsGregorianCalendar(ACalendar) and cxFormatController.UseDelphiDateTimeFormats then - begin - Result := LongMonthNames[AMonth]; - end - else - begin - ADate.Year := AYear; - ADate.Month := AMonth; - ADate.Day := 1; - if ACalendar.IsValidMonth(ADate.Year, ADate.Month) then - Result := cxGetLocalMonthName(ACalendar.ToDateTime(ADate), ACalendar) - else - Result := ''; - end; -end; - -function cxGetLocalMonthYear(ADate: TDateTime; ACalendar: TcxCustomCalendarTable = nil): string; -var - AFormat: string; - AConvertDate: TcxDateTime; - ABuf: array [0..255] of Char; - ANeedFreeAndNilCalendar: Boolean; -begin - if cxIsGregorianCalendar(ACalendar) and cxFormatController.UseDelphiDateTimeFormats then - begin - Result := cxDateToStrByFormat(ADate, 'mmmm yyyy', ' '); - Exit; - end; - if ACalendar = nil then - begin - ACalendar := cxGetLocalCalendar; - ANeedFreeAndNilCalendar := True; - end - else - ANeedFreeAndNilCalendar := False; - try - AConvertDate := ACalendar.FromDateTime(ADate); - AConvertDate.Day := 1; - cxGetCalendarInfo(GetThreadLocale, ACalendar.GetCalendarID, CAL_SYEARMONTH, ABuf, Length(ABuf), nil); - AFormat := ABuf; - if not cxGetDateFormat(ACalendar.ToDateTime(AConvertDate), Result, 0, AFormat) then - Result := cxGetLocalMonthName(AConvertDate.Year, AConvertDate.Month, ACalendar) + ' ' + - cxGetLocalYear(ADate, ACalendar); - finally - if ANeedFreeAndNilCalendar then - FreeAndNil(ACalendar); - end; -end; - -function cxGetLocalShortDateFormat: string; -begin - Result := InternalGetLocaleInfo(GetThreadLocale, LOCALE_SSHORTDATE); -end; - -function cxGetLocalTimeAMString: string; -begin - Result := InternalGetLocaleInfo(GetThreadLocale, LOCALE_S1159); -end; - -function cxGetLocalTimePMString: string; -begin - Result := InternalGetLocaleInfo(GetThreadLocale, LOCALE_S2359); -end; - -function cxGetLocalTimeSeparator: Char; -begin - Result := InternalGetLocaleInfo(GetThreadLocale, LOCALE_STIME)[1]; -end; - -function cxGetLocalYear(ADate: TDateTime; ACalendar: TcxCustomCalendarTable = nil): string; -var - AFormat: string; - AConvertDate: TcxDateTime; - ANeedFreeAndNilCalendar: Boolean; -begin - if ACalendar = nil then - begin - ACalendar := cxGetLocalCalendar; - ANeedFreeAndNilCalendar := True; - end - else - ANeedFreeAndNilCalendar := False; - try - AConvertDate := ACalendar.FromDateTime(ADate); - AConvertDate.Day := 1; - AFormat := 'yyyy'; - if not cxGetDateFormat(ACalendar.ToDateTime(AConvertDate), Result, - 0, AFormat) then - Result := IntToStr(AConvertDate.Year); - finally - if ANeedFreeAndNilCalendar then - FreeAndNil(ACalendar); - end; -end; - -function cxGetDayOfWeekName(I: Integer; AFontCharset: TFontCharset): string; -const - cxDayNameLCType: array [Boolean, 1..7] of Cardinal = - ((LOCALE_SABBREVDAYNAME1, LOCALE_SABBREVDAYNAME2, LOCALE_SABBREVDAYNAME3, - LOCALE_SABBREVDAYNAME4, LOCALE_SABBREVDAYNAME5, LOCALE_SABBREVDAYNAME6, - LOCALE_SABBREVDAYNAME7), - (CAL_SSHORTESTDAYNAME1, CAL_SSHORTESTDAYNAME2, CAL_SSHORTESTDAYNAME3, - CAL_SSHORTESTDAYNAME4, CAL_SSHORTESTDAYNAME5, CAL_SSHORTESTDAYNAME6, - CAL_SSHORTESTDAYNAME7)); -begin - if (I < 1) or (I > 7) then - begin - Result := ''; - Exit; - end; - if cxIsGregorianCalendar and cxFormatController.UseDelphiDateTimeFormats then - begin - Inc(I); - if I > 7 then - Dec(I, 7); - Result := ShortDayNames[I]; - end - else - Result := InternalGetLocaleInfo(GetThreadLocale, cxDayNameLCType[IsWinVista, I]); - if cxUseSingleCharWeekNames then - if cxGetWritingDirection(AFontCharset, Result) = coRightToLeft then - Result := AnsiLastChar(Result) - else - begin - Result := WideString(Result)[1]; - end; -end; - -function cxIsGregorianCalendar(ACalendar: TcxCustomCalendarTable = nil): Boolean; -var - ANeedFreeAndNilCalendar: Boolean; -begin - if ACalendar = nil then - begin - ACalendar := cxGetLocalCalendar; - ANeedFreeAndNilCalendar := True; - end - else - ANeedFreeAndNilCalendar := False; - try - Result := ACalendar.GetCalendarID in [CAL_GREGORIAN, CAL_GREGORIAN_US, CAL_GREGORIAN_ME_FRENCH, - CAL_GREGORIAN_ARABIC, CAL_GREGORIAN_XLIT_ENGLISH, CAL_GREGORIAN_XLIT_FRENCH]; - finally - if ANeedFreeAndNilCalendar then - FreeAndNil(ACalendar); - end; -end; - -function cxLocalFormatStrToDate(const ADateStr: string): TDateTime; -var - D: TcxDateTime; - ACalendar: TcxCustomCalendarTable; -begin - case cxGetLocalCalendarID of - CAL_JAPAN, CAL_TAIWAN, CAL_KOREA, CAL_HIJRI, CAL_THAI, CAL_HEBREW: - begin - ACalendar := cxGetLocalCalendar; - try - D := cxStrToDate(ADateStr, ACalendar); - Result := ACalendar.ToDateTime(D); - finally - FreeAndNil(ACalendar); - end; - end; - else - TextToDateEx(ADateStr, Result); - end; -end; - -function cxStrToDate(const ADateStr: string; - ACalendar: TcxCustomCalendarTable = nil): TcxDateTime; -begin - Result := cxStrToDate(ADateStr, cxGetLocalFormatSettings, ACalendar); -end; - -function cxStrToDate(const ADateStr: string; - AFormat: TFormatSettings; - ACalendar: TcxCustomCalendarTable = nil): TcxDateTime; overload; -var - APart1, APart2, APart3: string; - H, M, S, MS: Word; - ATime: TTime; - APos: Integer; - ANeedFreeAndNilCalendar: Boolean; - AEraName : string; - AEraYearOffset: Integer; - - function GetEraYearOffset(const Name: string): Integer; - var - I: Integer; - begin - Result := 0; - for I := Low(EraNames) to High(EraNames) do - begin - if EraNames[I] = '' then Break; - if AnsiStrPos(PChar(EraNames[I]), PChar(Name)) <> nil then - begin - Result := EraYearOffsets[I]; - Exit; - end; - end; - end; - - procedure ScanToNumber(const S: string; var Pos: Integer); - begin - while (Pos <= Length(S)) and not dxCharInSet(S[Pos], ['0'..'9']) do - begin - if dxCharInSet(S[Pos], LeadBytes) then - Pos := NextCharIndex(S, Pos) - else - Inc(Pos); - end; - end; - - function ScanPart(AEndScan: Char): string; - begin - Result := ''; - Inc(APos); - while (APos <= Length(ADateStr)) and (ADateStr[APos] <> AEndScan) do - begin - Result := Result + ADateStr[APos]; - Inc(APos); - end; - end; - - function NeedMoreScanMonthStr: Boolean; - begin - ScanBlanks(ADateStr, APos); - Result := (AFormat.DateSeparator = ' ') and - ((APos < Length(ADateStr)) and not dxCharInSet(ADateStr[APos], ['0'..'9'])); - end; - -begin - APos := 0; - AEraYearOffset := 0; - if (AFormat.ShortDateFormat <> '') and (AFormat.ShortDateFormat[1] = 'g') then // skip over prefix text - begin - ScanToNumber(ADateStr, APos); - AEraName := Trim(Copy(ADateStr, 1, APos-1)); - AEraYearOffset := GetEraYearOffset(AEraName); - Dec(APos); - end - else - if AnsiPos('e', AFormat.ShortDateFormat) > 0 then - AEraYearOffset := EraYearOffsets[1]; - APart1 := ScanPart(AFormat.DateSeparator); - APart2 := ScanPart(AFormat.DateSeparator); - APart3 := ScanPart(' '); - Result.Era := -1; - if ACalendar = nil then - begin - ACalendar := cxGetLocalCalendar; - ANeedFreeAndNilCalendar := True; - end - else - ANeedFreeAndNilCalendar := False; - try - case GetDateOrder(AFormat.ShortDateFormat) of - doMDY: - begin - if NeedMoreScanMonthStr then - begin - APart1 := APart1 + ' ' + APart2; - APart2 := APart3; - Dec(APos); - APart3 := ScanPart(' '); - end; - Result.Year := ACalendar.GetYearNumber(APart3); - Result.Month := ACalendar.GetMonthNumber(Result.Year, APart1); - Result.Day := ACalendar.GetDayNumber(APart2); - end; - doDMY: - begin - if NeedMoreScanMonthStr then - begin - APart2 := APart2 + ' ' + APart3; - Dec(APos); - APart3 := ScanPart(' '); - end; - Result.Year := ACalendar.GetYearNumber(APart3); - Result.Month := ACalendar.GetMonthNumber(Result.Year, APart2); - Result.Day := ACalendar.GetDayNumber(APart1); - end; - doYMD: - begin - if NeedMoreScanMonthStr then - begin - APart2 := APart2 + ' ' + APart3; - Dec(APos); - APart3 := ScanPart(' '); - end; - Result.Year := ACalendar.GetYearNumber(APart1); - Result.Month := ACalendar.GetMonthNumber(Result.Year, APart2); - Result.Day := ACalendar.GetDayNumber(APart3); - end; - end; - Result.Era := ACalendar.GetEra(AEraYearOffset + 1); - finally - if ANeedFreeAndNilCalendar then - FreeAndNil(ACalendar); - end; - H := 0; - M := 0; - S := 0; - MS := 0; - if APos < Length(ADateStr) then - begin - ATime := StrToTime(Copy(ADateStr, APos, Length(ADateStr) - APos + 1)); - DecodeTime(ATime, H, M, S, MS); - end; - with Result do - begin - Hours := H; - Minutes := M; - Seconds := S; - Milliseconds := MS; - end; -end; - -function cxStrToDate(const ADateString: string; const AFormat: TFormatSettings; - ACALTYPE: CALTYPE): TDate; -var - ACalendar: TcxCustomCalendarTable; - ADate: TcxDateTime; -begin - ACalendar := cxGetCalendar(ACALTYPE); - try - ADate := cxStrToDate(ADateString, AFormat, ACalendar); - Result := ACalendar.ToDateTime(ADate); - finally - FreeAndNil(ACalendar); - end; -end; - -function cxTimeToStr(ATime: TDateTime): string; -begin - Result := cxTimeToStr(ATime, cxGetLocalFormatSettings); -end; - -function cxTimeToStr(ATime: TDateTime; ATimeFormat: string): string; -var - AFormatSettings: TFormatSettings; -begin - AFormatSettings := cxGetLocalFormatSettings; - with AFormatSettings do - begin - LongTimeFormat := ATimeFormat; - TimeSeparator := SysUtils.TimeSeparator; - end; - Result := cxTimeToStr(ATime, AFormatSettings); -end; - -function cxTimeToStr(ATime: TDateTime; AFormatSettings: TFormatSettings): string; -begin - DateTimeToString(Result, AFormatSettings.LongTimeFormat, TimeOf(ATime)); -end; - -function cxGetCalendarInfo(Locale: LCID; Calendar: CALID; - CalendType: CALTYPE; lpCalData: PChar; cchData: Integer; - lpValue: PDWORD): Integer; -var - AKernelDLL : Integer; - AGetCalendarInfo: TcxGetCalendarInfo; -begin - Result:= 0; - AKernelDLL:= LoadLibrary('Kernel32'); - if AKernelDLL <> 0 then - try - {$IFDEF DELPHI12} - AGetCalendarInfo := GetProcAddress(AKernelDll, 'GetCalendarInfoW'); - {$ELSE} - AGetCalendarInfo := GetProcAddress(AKernelDll, 'GetCalendarInfoA'); - {$ENDIF} - if Assigned(AGetCalendarInfo) then - Result:= AGetCalendarInfo(Locale, Calendar, CalendType, - lpCalData, cchData, lpValue); - finally - FreeLibrary(AKernelDLL); - end; -end; - -function cxGetLocaleChar(ALocaleType: Integer; const ADefaultValue: Char): string; -begin - Result := cxGetLocaleInfo(GetThreadLocale, ALocaleType, ADefaultValue)[1]; -end; - -function cxGetLocaleStr(ALocaleType: Integer; const ADefaultValue: string = ''): string; -begin - Result := cxGetLocaleInfo(GetThreadLocale, ALocaleType, ADefaultValue); -end; - -procedure CorrectTextForDateTimeConversion(var AText: string; - AOleConversion: Boolean); - - procedure InternalStringReplace(var S: WideString; ASubStr: WideString); - begin - S := StringReplace(S, ASubStr, GetCharString(' ', Length(ASubStr)), - [rfIgnoreCase, rfReplaceAll]); - end; - - procedure GetSpecialStrings(AList: TStringList); - var - I: Integer; - begin - if AOleConversion then - begin - AList.Add(cxGetLocaleStr(LOCALE_SDATE)[1]); - AList.Add(cxGetLocaleStr(LOCALE_STIME)[1]); - AList.Add(cxGetLocaleStr(LOCALE_S1159, 'am')); - AList.Add(cxGetLocaleStr(LOCALE_S2359, 'pm')); - end - else - begin - AList.Add(DateSeparator); - AList.Add(TimeSeparator); - AList.Add(TimeAMString); - AList.Add(TimePMString); - end; - for I := 0 to AList.Count - 1 do - AList[I] := AnsiUpperCase(Trim(AList[I])); - end; - - procedure RemoveStringsThatInFormatInfo(var S: WideString; - const ADateTimeFormatInfo: TcxDateTimeFormatInfo); - var - ASpecialStrings: TStringList; - ASubStr: string; - I: Integer; - begin - ASpecialStrings := TStringList.Create; - try - GetSpecialStrings(ASpecialStrings); - for I := 0 to High(ADateTimeFormatInfo.Items) do - if ADateTimeFormatInfo.Items[I].Kind = dtikString then - begin - ASubStr := AnsiUpperCase(Trim(ADateTimeFormatInfo.Items[I].Data)); - if (ASubStr <> '') and (ASpecialStrings.IndexOf(ASubStr) = -1) then - InternalStringReplace(S, ASubStr); - end; - finally - ASpecialStrings.Free; - end; - end; - - procedure RemoveUnnecessarySpaces(var S: WideString); - var - I: Integer; - begin - S := Trim(S); - I := 2; - while I < Length(S) - 1 do - if (S[I] <= ' ') and (S[I + 1] <= ' ') then - Delete(S, I, 1) - else - Inc(I); - end; - -var - S: WideString; -begin - S := AText; - RemoveStringsThatInFormatInfo(S, cxFormatController.DateFormatInfo); - RemoveStringsThatInFormatInfo(S, cxFormatController.TimeFormatInfo); - RemoveUnnecessarySpaces(S); - if AOleConversion then - InternalStringReplace(S, cxGetLocaleStr(LOCALE_SDATE)[1]); - AText := S; -end; - -procedure InitSmartInputConsts; -begin - scxDateEditSmartInput[deiToday] := cxGetResourceString(@cxSDateToday); - scxDateEditSmartInput[deiYesterday] := cxGetResourceString(@cxSDateYesterday); - scxDateEditSmartInput[deiTomorrow] := cxGetResourceString(@cxSDateTomorrow); - scxDateEditSmartInput[deiSunday] := cxGetResourceString(@cxSDateSunday); - scxDateEditSmartInput[deiMonday] := cxGetResourceString(@cxSDateMonday); - scxDateEditSmartInput[deiTuesday] := cxGetResourceString(@cxSDateTuesday); - scxDateEditSmartInput[deiWednesday] := cxGetResourceString(@cxSDateWednesday); - scxDateEditSmartInput[deiThursday] := cxGetResourceString(@cxSDateThursday); - scxDateEditSmartInput[deiFriday] := cxGetResourceString(@cxSDateFriday); - scxDateEditSmartInput[deiSaturday] := cxGetResourceString(@cxSDateSaturday); - scxDateEditSmartInput[deiFirst] := cxGetResourceString(@cxSDateFirst); - scxDateEditSmartInput[deiSecond] := cxGetResourceString(@cxSDateSecond); - scxDateEditSmartInput[deiThird] := cxGetResourceString(@cxSDateThird); - scxDateEditSmartInput[deiFourth] := cxGetResourceString(@cxSDateFourth); - scxDateEditSmartInput[deiFifth] := cxGetResourceString(@cxSDateFifth); - scxDateEditSmartInput[deiSixth] := cxGetResourceString(@cxSDateSixth); - scxDateEditSmartInput[deiSeventh] := cxGetResourceString(@cxSDateSeventh); - scxDateEditSmartInput[deiBOM] := cxGetResourceString(@cxSDateBOM); - scxDateEditSmartInput[deiEOM] := cxGetResourceString(@cxSDateEOM); - scxDateEditSmartInput[deiNow] := cxGetResourceString(@cxSDateNow); -end; - -procedure AddDateRegExprMaskSmartInput(var AMask: string; ACanEnterTime: Boolean); - - procedure AddString(var AMask: string; const S: string); - var - I: Integer; - begin - I := 1; - while I <= Length(S) do - if S[I] = '''' then - begin - AMask := AMask + '\'''; - Inc(I); - end - else - begin - AMask := AMask + ''''; - repeat - AMask := AMask + S[I]; - Inc(I); - until (I > Length(S)) or (S[I] = ''''); - AMask := AMask + ''''; - end; - end; - -var - I: TcxDateEditSmartInput; -begin - InitSmartInputConsts; - AMask := '(' + AMask + ')|('; - I := Low(TcxDateEditSmartInput); - if not ACanEnterTime and (I = deiNow) then - Inc(I); - AddString(AMask, scxDateEditSmartInput[I]); - while I < High(TcxDateEditSmartInput) do - begin - Inc(I); - if not(not ACanEnterTime and (I = deiNow)) then - begin - AMask := AMask + '|'; - AddString(AMask, scxDateEditSmartInput[I]); - end; - end; - AMask := AMask + ')((\+|-)\d(\d(\d\d?)?)?)?'; -end; - -procedure DecMonth(var AYear, AMonth: Word); -begin - if AMonth = 1 then - begin - Dec(AYear); - AMonth := 12; - end - else Dec(AMonth); -end; - -procedure IncMonth(var AYear, AMonth: Word); -begin - if AMonth = 12 then - begin - Inc(AYear); - AMonth := 1; - end - else Inc(AMonth); -end; - -procedure ChangeMonth(var AYear, AMonth: Word; Delta: Integer); -var - Month: Integer; -begin - Inc(AYear, Delta div 12); - Month := AMonth; - Inc(Month, Delta mod 12); - if Month < 1 then - begin - Dec(AYear); - Month := 12 + Month; - end; - if Month > 12 then - begin - Inc(AYear); - Month := Month - 12; - end; - AMonth := Month; -end; - -function GetMonthNumber(const ADate: TDateTime): Integer; -var - AYear, AMonth, ADay: Word; -begin - DecodeDate(ADate, AYear, AMonth, ADay); - Result := (AYear - 1) * 12 + AMonth; -end; - -function GetDateElement(ADate: TDateTime; AElement: TcxDateElement; - ACalendar: TcxCustomCalendarTable = nil): Integer; -var - ACalendarDate: TcxDateTime; - AYear, AMonth, ADay: Word; -begin - if ACalendar = nil then - DecodeDate(ADate, AYear, AMonth, ADay) - else - begin - ACalendarDate := ACalendar.FromDateTime(ADate); - with ACalendarDate do - begin - AYear := Year; - AMonth := Month; - ADay := Day; - end; - end; - case AElement of - deYear: - Result := AYear; - deMonth: - Result := AMonth; - else - Result := ADay; - end; -end; - -function IsLeapYear(AYear: Integer): Boolean; -begin - Result := (AYear mod 4 = 0) and ((AYear mod 100 <> 0) or (AYear mod 400 = 0)); -end; - -function DaysPerMonth(AYear, AMonth: Integer): Integer; -const - ADaysInMonth: array[1..12] of Integer = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); -begin - Result := ADaysInMonth[AMonth]; - if (AMonth = 2) and IsLeapYear(AYear) then Inc(Result); -end; - -function CheckDay(AYear, AMonth, ADay: Integer): Integer; -begin - if ADay < 1 then - Result := 1 - else - if ADay > DaysPerMonth(AYear, AMonth) then - Result := DaysPerMonth(AYear, AMonth) - else - Result := ADay; -end; - -function TimeOf(const AValue: TDateTime): TDateTime; -begin - Result := DateTimeToTimeStamp(AValue).Time / MSecsPerDay; -end; - -function DateOf(const AValue: TDateTime): TDateTime; -begin - Result := DateTimeToTimeStamp(AValue).Date - DateDelta; -end; - -function DayOfWeekOffset(const AValue: TDateTime): TDayOfWeek; -var - AOffset: Integer; -begin - AOffset := DayOfWeek(AValue) - 1 - cxFormatController.StartOfWeek; - if AOffset < 0 then - Inc(AOffset, 7); - Result := AOffset; -end; - -function GetStartDateOfMonth(const ADate: TDateTime): TDateTime; -var - AYear, AMonth, ADay: Word; -begin - DecodeDate(ADate, AYear, AMonth, ADay); - Result := EncodeDate(AYear, AMonth, 1); -end; - -function GetStartOfWeek: Integer; -begin - Result := StrToInt(cxGetLocaleInfo(GetThreadLocale, LOCALE_IFIRSTDAYOFWEEK, '0')) + 1; - if Result > 6 then - Result := 0; -end; - -function GetEndDateOfMonth(const ADate: TDateTime; AIgnoreTime: Boolean): TDateTime; -var - AYear, AMonth, ADay: Word; -begin - DecodeDate(ADate, AYear, AMonth, ADay); - Result := EncodeDate(AYear, AMonth, MonthDays[IsLeapYear(AYear), AMonth]); - if not AIgnoreTime then - Result := Result + EncodeTime(23, 59, 59, 999); -end; - -function GetStartDateOfYear(const ADate: TDateTime): TDateTime; -begin - Result := EncodeDate(GetDateElement(ADate, deYear), 1, 1); -end; - -function GetEndDateOfYear(const ADate: TDateTime; AIgnoreTime: Boolean): TDateTime; -begin - Result := EncodeDate(GetDateElement(ADate, deYear), 12, 31); - if not AIgnoreTime then - Result := Result + EncodeTime(23, 59, 59, 999); -end; - -{!!! TODO: adapt to .net} -function cxGetDateFormat(ADate: TDateTime; out AFormatDate: string; AFlags: Integer; AFormat: string = ''): Boolean; -var - L: Integer; - P: PChar; - ASystemDate: TSystemTime; - Buffer: array[0..255] of Char; -begin - if cxIsGregorianCalendar and cxFormatController.UseDelphiDateTimeFormats then - begin - Result := True; - if Length(AFormat) = 0 then - AFormatDate := cxDateToStrByFormat(ADate, LongDateFormat, #0) - else - AFormatDate := cxDateToStrByFormat(ADate, AFormat, #0); - end - else - begin - DateTimeToSystemTime(ADate, ASystemDate); - if Length(AFormat) = 0 then P := nil else P := PChar(AFormat); - L := GetDateFormat(GetThreadLocale, AFlags, @ASystemDate, P, Buffer, Length(Buffer)); - Result := L > 0; - if Result then SetString(AFormatDate, Buffer, L - 1) else AFormatDate := ''; - end; -end; - -function DateToLongDateStr(ADate: TDateTime): string; -begin - if not cxGetDateFormat(ADate, Result, DATE_LONGDATE) then - Result := FormatDateTime('dddddd', Date); -end; - -function GetWeekNumber(ADate: TDateTime; AStartOfWeek: TDay; - AFirstWeekOfYear: TcxFirstWeekOfYear): Integer; - - function FindFirstDayOfWeekDate(ADate: TDateTime): TDateTime; - var - ADayOfWeek: TDay; - ADelta: Integer; - begin - ADayOfWeek := TDay(DayOfWeek(ADate) - 1); - ADelta := Ord(ADayOfWeek) - Ord(AStartOfWeek); - if ADelta < 0 then Inc(ADelta, 7); - Result := Trunc(ADate) - ADelta; - end; - -var - AYear, AMonth, ADay: Word; - AStartWeekDate: TDateTime; - AStart: TDateTime; -begin - if AFirstWeekOfYear = fwySystem then - AFirstWeekOfYear := TcxFirstWeekOfYear( - StrToInt(cxGetLocaleChar(LOCALE_IFIRSTWEEKOFYEAR, '0')) + 1); - AStart := FindFirstDayOfWeekDate(StartOfTheYear(ADate)); - DecodeDate(ADate, AYear, AMonth, ADay); - case AFirstWeekOfYear of - fwyFirstFourDays: - if YearOf(AStart + 3) < AYear then AStart := AStart + 7; - fwyFirstFullWeek: - if YearOf(AStart) < AYear then AStart := AStart + 7; - end; - //DELPHI8! check Trunc() - Result := Trunc(Trunc(ADate) - AStart) div 7 + 1; - if AMonth = 12 then - begin - AStartWeekDate := FindFirstDayOfWeekDate(ADate); - case AFirstWeekOfYear of - fwyJan1: - if MonthOf(AStartWeekDate + 6) = 1 then - Result := 1; - fwyFirstFourDays: - if MonthOf(AStartWeekDate + 3) = 1 then - Result := 1; - end; - end; -end; - -{$IFNDEF DELPHI6} -function HourOf(ADateTime: TDateTime): Word; -var - AMin, ASec, AMilliSec: Word; -begin - DecodeTime(ADateTime, Result, AMin, ASec, AMilliSec); -end; - -function IsPM(const AValue: TDateTime): Boolean; -begin - Result := HourOf(AValue) >= 12; -end; - -function DaysInAMonth(const AYear, AMonth: Word): Word; -begin - Result := MonthDays[(AMonth = 2) and IsLeapYear(AYear), AMonth]; -end; - -function DaysInMonth(const AValue: TDateTime): Word; -begin - Result := DaysInAMonth(YearOf(AValue), MonthOf(AValue)); -end; - -function DayOf(const AValue: TDateTime): Word; -var - AYear, AMonth: Word; -begin - DecodeDate(AValue, AYear, AMonth, Result); -end; - -function DayOfTheMonth(const AValue: TDateTime): Word; -begin - Result := DayOf(AValue); -end; - -function DayOfTheWeek(const AValue: TDateTime): Word; -begin - Result := (DateTimeToTimeStamp(AValue).Date - 1) mod 7 + 1; -end; - -procedure DecodeDateTime(const AValue: TDateTime; out AYear, AMonth, ADay, - AHour, AMinute, ASecond, AMilliSecond: Word); -begin - DecodeDate(AValue, AYear, AMonth, ADay); - DecodeTime(AValue, AHour, AMinute, ASecond, AMilliSecond); -end; - -function EncodeDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, - AMilliSecond: Word): TDateTime; -begin - Result := EncodeDate(AYear, AMonth, ADay) + - EncodeTime(AHour, AMinute, ASecond, AMilliSecond); -end; - -procedure IncAMonth(var Year, Month, Day: Word; NumberOfMonths: Integer = 1); -var - DayTable: PDayTable; - Sign: Integer; -begin - if NumberOfMonths >= 0 then Sign := 1 else Sign := -1; - Year := Year + (NumberOfMonths div 12); - NumberOfMonths := NumberOfMonths mod 12; - Inc(Month, NumberOfMonths); - if Word(Month-1) > 11 then // if Month <= 0, word(Month-1) > 11) - begin - Inc(Year, Sign); - Inc(Month, -12 * Sign); - end; - DayTable := @MonthDays[IsLeapYear(Year)]; - if Day > DayTable^[Month] then Day := DayTable^[Month]; -end; - -function MinuteOf(const AValue: TDateTime): Word; -var - AHour, ASecond, AMilliSecond: Word; -begin - DecodeTime(AValue, AHour, Result, ASecond, AMilliSecond); -end; - -function MonthOf(const AValue: TDateTime): Word; -var - AYear, ADay: Word; -begin - DecodeDate(AValue, AYear, Result, ADay); -end; - -function StartOfTheYear(const AValue: TDateTime): TDateTime; -begin - Result := EncodeDate(YearOf(AValue), 1, 1); -end; - -function StartOfTheMonth(const AValue: TDateTime): TDateTime; -begin - Result := EncodeDate(YearOf(AValue), MonthOf(AValue), 1); -end; - -function YearOf(const AValue: TDateTime): Word; -var - AMonth, ADay: Word; -begin - DecodeDate(AValue, Result, AMonth, ADay); -end; - -const - DayMap: array [1..7] of Word = (7, 1, 2, 3, 4, 5, 6); - -procedure DivMod(Dividend: Integer; Divisor: Word; - var Result, Remainder: Word); -asm - PUSH EBX - MOV EBX,EDX - MOV EDX,EAX - SHR EDX,16 - DIV BX - MOV EBX,Remainder - MOV [ECX],AX - MOV [EBX],DX - POP EBX -end; - -function DecodeDateFully(const DateTime: TDateTime; var Year, Month, Day, DOW: Word): Boolean; -const - D1 = 365; - D4 = D1 * 4 + 1; - D100 = D4 * 25 - 1; - D400 = D100 * 4 + 1; -var - Y, M, D, I: Word; - T: Integer; - DayTable: PDayTable; -begin - T := DateTimeToTimeStamp(DateTime).Date; - if T <= 0 then - begin - Year := 0; - Month := 0; - Day := 0; - DOW := 0; - Result := False; - end else - begin - DOW := T mod 7 + 1; - Dec(T); - Y := 1; - while T >= D400 do - begin - Dec(T, D400); - Inc(Y, 400); - end; - DivMod(T, D100, I, D); - if I = 4 then - begin - Dec(I); - Inc(D, D100); - end; - Inc(Y, I * 100); - DivMod(D, D4, I, D); - Inc(Y, I * 4); - DivMod(D, D1, I, D); - if I = 4 then - begin - Dec(I); - Inc(D, D1); - end; - Inc(Y, I); - Result := IsLeapYear(Y); - DayTable := @MonthDays[Result]; - M := 1; - while True do - begin - I := DayTable^[M]; - if D < I then Break; - Dec(D, I); - Inc(M); - end; - Year := Y; - Month := M; - Day := D + 1; - end; -end; - -procedure DecodeDateWeek(const AValue: TDateTime; out AYear, AWeekOfYear, - ADayOfWeek: Word); -var - ADayOfYear: Integer; - AMonth, ADay: Word; - AStart: TDateTime; - AStartDayOfWeek, AEndDayOfWeek: Word; - ALeap: Boolean; -begin - ALeap := DecodeDateFully(AValue, AYear, AMonth, ADay, ADayOfWeek); - ADayOfWeek := DayMap[ADayOfWeek]; - AStart := EncodeDate(AYear, 1, 1); - ADayOfYear := Trunc(AValue - AStart + 1); - AStartDayOfWeek := DayOfTheWeek(AStart); - if AStartDayOfWeek in [DayFriday, DaySaturday, DaySunday] then - Dec(ADayOfYear, 8 - AStartDayOfWeek) - else - Inc(ADayOfYear, AStartDayOfWeek - 1); - if ADayOfYear <= 0 then - DecodeDateWeek(AStart - 1, AYear, AWeekOfYear, ADay) - else - begin - AWeekOfYear := ADayOfYear div 7; - if ADayOfYear mod 7 <> 0 then - Inc(AWeekOfYear); - if AWeekOfYear > 52 then - begin - AEndDayOfWeek := AStartDayOfWeek; - if ALeap then - begin - if AEndDayOfWeek = DaySunday then - AEndDayOfWeek := DayMonday - else - Inc(AEndDayOfWeek); - end; - if AEndDayOfWeek in [DayMonday, DayTuesday, DayWednesday] then - begin - Inc(AYear); - AWeekOfYear := 1; - end; - end; - end; -end; - -function EncodeDateWeek(const AYear, AWeekOfYear: Word; - const ADayOfWeek: Word): TDateTime; -var - ADayOfYear: Integer; - AStartDayOfWeek: Word; -begin - Result := EncodeDate(AYear, 1, 1); - AStartDayOfWeek := DayOfTheWeek(Result); - ADayOfYear := (AWeekOfYear - 1) * 7 + ADayOfWeek - 1; - if AStartDayOfWeek in [DayFriday, DaySaturday, DaySunday] then - Inc(ADayOfYear, 8 - AStartDayOfWeek) - else - Dec(ADayOfYear, AStartDayOfWeek - 1); - Result := Result + ADayOfYear; -end; - -function SpanOfNowAndThen(const ANow, AThen: TDateTime): TDateTime; -begin - if ANow < AThen then - Result := AThen - ANow - else - Result := ANow - AThen; -end; - -function DaySpan(const ANow, AThen: TDateTime): Double; -begin - Result := SpanOfNowAndThen(ANow, AThen); -end; - -function YearSpan(const ANow, AThen: TDateTime): Double; -begin - Result := DaySpan(ANow, AThen) / ApproxDaysPerYear; -end; - -function MonthSpan(const ANow, AThen: TDateTime): Double; -begin - Result := DaySpan(ANow, AThen) / ApproxDaysPerMonth; -end; - -function WeekSpan(const ANow, AThen: TDateTime): Double; -begin - Result := DaySpan(ANow, AThen) / DaysPerWeek; -end; - -function YearsBetween(const ANow, AThen: TDateTime): Integer; -begin - Result := Trunc(YearSpan(ANow, AThen)); -end; - -function MonthsBetween(const ANow, AThen: TDateTime): Integer; -begin - Result := Trunc(MonthSpan(ANow, AThen)); -end; - -function WeeksBetween(const ANow, AThen: TDateTime): Integer; -begin - Result := Trunc(WeekSpan(ANow, AThen)); -end; - -function DaysBetween(const ANow, AThen: TDateTime): Integer; -begin - Result := Trunc(DaySpan(ANow, AThen)); -end; - -function IncMonth(const DateTime: TDateTime; NumberOfMonths: Integer): TDateTime; -var - Year, Month, Day: Word; -begin - DecodeDate(DateTime, Year, Month, Day); - IncAMonth(Year, Month, Day, NumberOfMonths); - Result := EncodeDate(Year, Month, Day); - ReplaceTime(Result, DateTime); -end; - -function IncYear(const AValue: TDateTime; - const ANumberOfYears: Integer): TDateTime; -begin - Result := IncMonth(AValue, ANumberOfYears * MonthsPerYear); -end; - -function IncWeek(const AValue: TDateTime; - const ANumberOfWeeks: Integer): TDateTime; -begin - Result := AValue + ANumberOfWeeks * DaysPerWeek; -end; - -function IncDay(const AValue: TDateTime; - const ANumberOfDays: Integer): TDateTime; -begin - Result := AValue + ANumberOfDays; -end; - -function IncHour(const AValue: TDateTime; const ANumberOfHours: Int64): TDateTime; -begin - Result := ((AValue * HoursPerDay) + ANumberOfHours) / HoursPerDay; -end; - -function IncMinute(const AValue: TDateTime; const ANumberOfMinutes: Int64): TDateTime; -begin - Result := ((AValue * MinsPerDay) + ANumberOfMinutes) / MinsPerDay; -end; - -procedure DecodeDateMonthWeek(const AValue: TDateTime; - out AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word); -var - LDay, LDaysInMonth: Word; - LDayOfMonth: Integer; - LStart: TDateTime; - LStartDayOfWeek, LEndOfMonthDayOfWeek: Word; -begin - DecodeDateFully(AValue, AYear, AMonth, LDay, ADayOfWeek); - ADayOfWeek := DayMap[ADayOfWeek]; - LStart := EncodeDate(AYear, AMonth, 1); - LStartDayOfWeek := DayOfTheWeek(LStart); - LDayOfMonth := LDay; - if LStartDayOfWeek in [DayFriday, DaySaturday, DaySunday] then - Dec(LDayOfMonth, 8 - LStartDayOfWeek) - else - Inc(LDayOfMonth, LStartDayOfWeek - 1); - if LDayOfMonth <= 0 then - DecodeDateMonthWeek(LStart - 1, AYear, AMonth, AWeekOfMonth, LDay) - else - begin - AWeekOfMonth := LDayOfMonth div 7; - if LDayOfMonth mod 7 <> 0 then - Inc(AWeekOfMonth); - LDaysInMonth := DaysInAMonth(AYear, AMonth); - LEndOfMonthDayOfWeek := DayOfTheWeek(EncodeDate(AYear, AMonth, LDaysInMonth)); - if (LEndOfMonthDayOfWeek in [DayMonday, DayTuesday, DayWednesday]) and - (LDaysInMonth - LDay < LEndOfMonthDayOfWeek) then - begin - Inc(AMonth); - if AMonth = 13 then - begin - AMonth := 1; - Inc(AYear); - end; - AWeekOfMonth := 1; - end; - end; -end; - -function WeekOfTheMonth(const AValue: TDateTime): Word; -var - LYear, LMonth, LDayOfWeek: Word; -begin - DecodeDateMonthWeek(AValue, LYear, LMonth, Result, LDayOfWeek); -end; - -function WeekOf(AValue: TDateTime): Word; -var - AYear, ADay: Word; -begin - DecodeDateWeek(AValue, AYear, Result, ADay); -end; - -function WeekOfTheYear(const AValue: TDateTime): Word; -var - AYear, ADayOfWeek: Word; -begin - DecodeDateWeek(AValue, AYear, Result, ADayOfWeek); -end; - -function DayOfTheYear(AValue: TDateTime): Word; -begin - Result := Trunc(AValue - StartOfTheYear(AValue)) + 1; -end; - -function EndOfTheYear(AValue: TDateTime): TDateTime; -begin - Result := EncodeDateTime(YearOf(AValue), 12, 31, 23, 59, 59, 999) -end; -{$ENDIF} - -function StrToDateDef(const ADateStr: string; ADefDate: TDateTime): TDateTime; -begin - try - Result := StrToDate(ADateStr) - except - Result := ADefDate - end; -end; - -function SICompare(List: TStringList; Index1, Index2: Integer): Integer; -var - S1, S2: string; -begin - S1 := List[Index1]; - S2 := List[Index2]; - if Length(S1) > Length(S2) then - Result := -1 - else - if Length(S1) < Length(S2) then - Result := 1 - else - Result := -AnsiCompareText(S1, S2); -end; - -function SmartTextToDate(const AText: string; var ADate: TDateTime): Boolean; - - function GetSmartInputKind(const AText: string; - var Kind: TcxDateEditSmartInput): Boolean; - var - I: TcxDateEditSmartInput; - J: Integer; - S: string; - begin - Result := False; - with TStringList.Create do - try - for I := Low(TcxDateEditSmartInput) to High(TcxDateEditSmartInput) do - AddObject(scxDateEditSmartInput[I], TObject(I)); - CustomSort(SICompare); - for J := 0 to Count - 1 do - begin - S := Strings[J]; - if AnsiCompareText(S, Copy(AText, 1, Length(S))) = 0 then - begin - Kind := TcxDateEditSmartInput(Objects[J]); - Result := True; - Break; - end; - end; - finally - Free; - end; - end; - -var - I: TcxDateEditSmartInput; - L, Delta: Integer; - S: string; - Y, M, D: Word; - -begin - InitSmartInputConsts; - Result := False; - S := Trim(AText); - if GetSmartInputKind(S, I) then - begin - case I of - deiToday: - ADate := Date; - deiYesterday: - ADate := Date - 1; - deiTomorrow: - ADate := Date + 1; - deiSunday, deiMonday, deiTuesday, deiWednesday, deiThursday, deiFriday, deiSaturday: - begin - ADate := Date; - Delta := Integer(I) - Integer(deiSunday) + 1 - DayOfWeek(ADate); - if Delta >= 0 then - ADate := ADate + Delta - else - ADate := ADate + 7 + Delta; - end; - deiFirst..deiSeventh: - begin - ADate := Date; - Delta := DayOfWeekOffset(ADate) - (Integer(I) - Integer(deiFirst)); - ADate := ADate - Delta; - end; - deiBOM: - begin - DecodeDate(Date, Y, M, D); - ADate := EncodeDate(Y, M, 1); - end; - deiEOM: - begin - DecodeDate(Date, Y, M, D); - ADate := EncodeDate(Y, M, MonthDays[IsLeapYear(Y), M]); - end; - deiNow: - ADate := Now; - end; - L := Length(scxDateEditSmartInput[I]); - S := Trim(Copy(AText, L + 1, Length(AText))); - if (Length(S) >= 2) and ((S[1] = '+') or (S[1] = '-')) then - begin - if S[1] = '+' then L := 1 - else L := -1; - S := Trim(Copy(S, 2, Length(S))); - try - ADate := ADate + L * StrToInt(S); - except - on EConvertError do; - end; - end; - Result := True; - end; - if not Result and Assigned(SmartTextToDateFunc) then - Result := SmartTextToDateFunc(AText, ADate); -end; - -function TextToDateEx(const AText: string; var ADate: TDateTime): Boolean; -begin - ADate := cxTextToDateTime(AText, cxFormatController.UseDelphiDateTimeFormats); - Result := ADate <> NullDate; -end; - -function cxDateTimeToText(ADate: TDateTime; AFourDigitYearNeeded: Boolean = False; AUseDelphiDateTimeFormats: Boolean = False): string; - - function GetDateTimeFormat: string; - var - I: Integer; - S: string; - begin - if AUseDelphiDateTimeFormats then - begin - Result := ShortDateFormat; - if TimeOf(ADate) <> 0 then - Result := Result + ' ' + LongTimeFormat; - end - else - Result := cxGetLocaleStr(LOCALE_SSHORTDATE); - if AFourDigitYearNeeded then - begin - S := LowerCase(Result); - if (Pos('yyy', S) = 0) and (Pos('yy', S) > 0) then - begin - I := Pos('yy', S); - Insert(Result[I], Result, I + 2); - Insert(Result[I], Result, I + 3); - end; - end; - end; - -var - SystemTime: TSystemTime; - PS: array[0..100] of Char; -begin - if ADate = NullDate then - Result := '' - else - if AUseDelphiDateTimeFormats then - DateTimeToString(Result, GetDateTimeFormat, ADate) - else - begin - DateTimeToSystemTime(ADate, SystemTime); - if GetDateFormat(GetThreadLocale, 0, @SystemTime, - PChar(GetDateTimeFormat), PS, 100) <> 0 then - begin - Result := PS; - if TimeOf(ADate) <> 0 then - begin - GetTimeFormat(GetThreadLocale, 0, @SystemTime, nil, PS, 100); - Result := Result + ' ' + PS; - end; - end - else - try - Result := VarFromDateTime(ADate); - except - on EVariantError do - Result := ''; - end; - end; -end; - -function cxTextToDateTime(const AText: string; AUseDelphiDateTimeFormats: Boolean = False): TDateTime; -var - ADay, AMonth, AYear: Word; - S: string; -begin - try - S := Trim(AText); - if S = '' then - Result := NullDate - else - begin - if cxIsGregorianCalendar then - begin - // Smart Date - if not SmartTextToDate(S, Result) then - begin - CorrectTextForDateTimeConversion(S, not AUseDelphiDateTimeFormats); - if AUseDelphiDateTimeFormats then - Result := StrToDateTime(S) - else - Result := VarToDateTime(S); - end; - DecodeDate(Result, AYear, AMonth, ADay); - if (Result >= MaxInt) or (Result <= -MaxInt - 1) or (ADay <= 0) or (AYear > MaxYear) then - Result := NullDate; - end - else - Result := cxLocalFormatStrToDate(S); - end; - except - Result := NullDate; - end; -end; - -function DateTimeToText(ADate: TDateTime; AFourDigitYearNeeded: Boolean = False): string; -begin - Result := cxDateTimeToText(ADate, AFourDigitYearNeeded, cxFormatController.UseDelphiDateTimeFormats); -end; - -function DateTimeToTextEx(const ADate: TDateTime; AIsMasked: Boolean; - AIsDateTimeEdit: Boolean = False; AFourDigitYearNeeded: Boolean = False): string; -begin - if ADate = NullDate then - Result := '' - else - begin - if cxIsGregorianCalendar then - begin - if AIsMasked then - begin - if AIsDateTimeEdit then - Result := FormatDateTime(cxFormatController.MaskedDateTimeEditFormat, ADate) - else - Result := FormatDateTime(cxFormatController.MaskedDateEditFormat, DateOf(ADate)); - end - else - Result := DateTimeToText(ADate, AFourDigitYearNeeded); - end - else - Result := cxDateToLocalFormatStr(ADate); - end; -end; - -function cxMinDateTime: Double; -begin - Result := EncodeDate(MinYear, 1, 1); -end; - -function cxStrToDateTime(S: string; AUseOleDateFormat: Boolean; - out ADate: TDateTime): Boolean; -begin - Result := False; - ADate := NullDate; - try - if cxIsGregorianCalendar then - begin - CorrectTextForDateTimeConversion(S, AUseOleDateFormat); - if AUseOleDateFormat then - ADate := VarToDateTime(S) - else - ADate := StrToDateTime(S); - end - else - ADate := cxLocalFormatStrToDate(S); - Result := True; - except - on Exception(*EConvertError*) do - ADate := NullDate; - end; -end; - -{ TcxEra } - -constructor TcxEra.Create(AEra: Integer; AStartDate: TDateTime; - AYearOffset, AMinEraYear, AMaxEraYear: Integer); -begin - Era := AEra; - StartDate := AStartDate; - YearOffset := AYearOffset; - MinEraYear := AMinEraYear; - MaxEraYear := AMaxEraYear; -end; - -procedure TcxEra.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxEra then - with Source as TcxEra do - begin - Self.Era := Era; - Self.FMaxEraYear := MaxEraYear; - Self.FMinEraYear := MinEraYear; - Self.FStartDate := StartDate; - Self.FYearOffset := YearOffset; - end; -end; - -{ TcxEras } - -function TcxEras.GetItem(AIndex: Integer): TcxEra; -begin - Result := TcxEra(inherited Items[AIndex]); -end; - -procedure TcxEras.SetItem(AIndex: Integer; AValue: TcxEra); -begin - TcxEra(inherited Items[AIndex]).Assign(AValue); -end; - -{ TcxCustomCalendarTable } - -constructor TcxCustomCalendarTable.Create; -begin - FEras := TcxEras.Create; -end; - -destructor TcxCustomCalendarTable.Destroy; -begin - FEras.Clear; - FreeAndNil(FEras); - inherited Destroy; -end; - -procedure TcxCustomCalendarTable.AdjustYear(var AYear, AEra: Integer); -begin - AdjustYear(AYear, AEra, 1, 1); -end; - -procedure TcxCustomCalendarTable.AdjustYear(var AYear, AEra: Integer; AMonth, ADay: Integer); -var - ACurrentYear: Cardinal; -begin - ACurrentYear := AYear; - YearToGregorianYear(ACurrentYear, AEra); - AEra := GetEra(ACurrentYear, AMonth, ADay); - if AEra > 0 then - AYear := Integer(ACurrentYear) - Eras[AEra].YearOffset; -end; - -procedure TcxCustomCalendarTable.CheckDateTime(var ADateTime: TDateTime); -begin - if ADateTime < MinSupportedDate then - ADateTime := MinSupportedDate; - if ADateTime > MaxSupportedDate then - ADateTime := MaxSupportedDate; -end; - -function TcxCustomCalendarTable.IsNotValid(ADate: TcxDateTime; out AResult: TDateTime): Boolean; -begin - with ADate do - Result := not IsValidDay(Era, Year, Month, Day); - if Result then - AResult := MinSupportedDate; -end; - -procedure TcxCustomCalendarTable.YearToGregorianYear(var AYear: Cardinal; - AEra: Integer); -begin - if AEra = -1 then - AYear := Integer(AYear) + DefaultEra.YearOffset - else - if (AEra >= 0) and (AEra < Eras.Count) then - AYear := Integer(AYear) + Eras[AEra].YearOffset; -end; - -function TcxCustomCalendarTable.AddDays(ADate: TcxDateTime; - ACountDays: Integer): TDateTime; -begin - Result := ToDateTime(ADate) + ACountDays; - CheckDateTime(Result); -end; - -function TcxCustomCalendarTable.AddMonths(ADate: TDateTime; - ACountMonths: Integer): TDateTime; -begin - Result := AddMonths(FromDateTime(ADate), ACountMonths); -end; - -function TcxCustomCalendarTable.AddMonths(ADate: TcxDateTime; - ACountMonths: Integer): TDateTime; -var - ASwap: Integer; - ACurrentMonth: Integer; - ACurrentYear: Integer; - ACurrentEra: Integer; -begin - if IsNotValid(ADate, Result) then - Exit; - ACurrentEra := ADate.Era; - ACurrentMonth := ADate.Month; - ACurrentYear := ADate.Year; - Inc(ACurrentMonth, ACountMonths); - if ACurrentMonth > Integer(GetMonthsInYear(ACurrentEra, ACurrentYear)) then - ASwap := -1 - else - ASwap := 1; - while (ACurrentMonth > Integer(GetMonthsInYear(ACurrentEra, ACurrentYear))) or (ACurrentMonth <= 0) do - begin - if ASwap > 0 then - Inc(ACurrentMonth, ASwap * Integer(GetMonthsInYear(ACurrentEra, ACurrentYear - 1))) - else - Inc(ACurrentMonth, ASwap * Integer(GetMonthsInYear(ACurrentEra, ACurrentYear))); - Inc(ACurrentYear, -ASwap); - end; - if not IsValidDay(ACurrentEra, ACurrentYear, ACurrentMonth, ADate.Day) then - ADate.Day := GetDaysInMonth(ACurrentEra, ACurrentYear, ACurrentMonth); - AdjustYear(ACurrentYear, ACurrentEra, ACurrentMonth, ADate.Day); - ADate.Era := ACurrentEra; - ADate.Year := ACurrentYear; - ADate.Month := ACurrentMonth; - if IsNotValid(ADate, Result) then - Exit; - Result := ToDateTime(ADate); - CheckDateTime(Result); -end; - -function TcxCustomCalendarTable.AddWeeks(ADate: TDateTime; - ACountWeeks: Integer): TDateTime; -begin - Result := AddWeeks(FromDateTime(ADate), ACountWeeks); -end; - -function TcxCustomCalendarTable.AddWeeks(ADate: TcxDateTime; - ACountWeeks: Integer): TDateTime; -begin - Result := AddDays(ADate, ACountWeeks * 7); - CheckDateTime(Result); -end; - -function TcxCustomCalendarTable.AddYears(ADate: TDateTime; - ACountYears: Integer): TDateTime; -begin - Result := AddYears(FromDateTime(ADate), ACountYears); -end; - -function TcxCustomCalendarTable.AddYears(ADate: TcxDateTime; - ACountYears: Integer): TDateTime; -var - ACurrentYaer: Integer; - ACurrentEra: Integer; -begin - if IsNotValid(ADate, Result) then - Exit; - ACurrentYaer := Integer(ADate.Year) + ACountYears; - ACurrentEra := ADate.Era; - AdjustYear(ACurrentYaer, ACurrentEra); - if not IsValidYear(ACurrentEra, ACurrentYaer) then - begin - Result := MinSupportedDate; - Exit; - end; - if not IsValidMonth(ACurrentEra, ACurrentYaer, ADate.Month) then - ADate.Month := GetMonthsInYear(ACurrentEra, ACurrentYaer); - if not IsValidDay(ACurrentEra, ACurrentYaer, ADate.Month, ADate.Day) then - ADate.Day := GetDaysInMonth(ACurrentEra, ACurrentYaer, ADate.Month); - AdjustYear(ACurrentYaer, ACurrentEra, ADate.Month, ADate.Day); - ADate.Year := ACurrentYaer; - ADate.Era := ACurrentEra; - Result := ToDateTime(ADate); - CheckDateTime(Result); -end; - -function TcxCustomCalendarTable.FromDateTime(AYear, AMonth, - ADay: Cardinal): TcxDateTime; -begin - Result := FromDateTime(AYear, AMonth, ADay, 0, 0, 0, 0); -end; - -function TcxCustomCalendarTable.FromDateTime(AYear, AMonth, - ADay: Cardinal; AHours, AMinutes, ASeconds: Byte; - AMilliseconds: Word): TcxDateTime; -begin - Result := FromDateTime(EncodeDateTime(AYear, AMonth, ADay, AHours, AMinutes, ASeconds, AMilliseconds)); -end; - -function TcxCustomCalendarTable.GetDayOfYear(ADate: TDateTime): Cardinal; -begin - Result := GetDayOfYear(FromDateTime(ADate)); -end; - -function TcxCustomCalendarTable.GetDayOfYear(ADate: TcxDateTime): Cardinal; -var - I: Integer; -begin - Result := 0; - for I := 1 to ADate.Month - 1 do - Result := Result + GetDaysInMonth(ADate.Year, I); - Inc(Result, ADate.Day); -end; - -function TcxCustomCalendarTable.GetDaysInMonth(AYear, AMonth: Cardinal): Cardinal; -begin - Result := GetDaysInMonth(-1, AYear, AMonth); -end; - -function TcxCustomCalendarTable.GetDaysInYear(AYear: Cardinal): Cardinal; -begin - Result := GetDaysInYear(-1, AYear); -end; - -function TcxCustomCalendarTable.GetEra(AYear: Integer): Integer; -begin - Result := GetEra(AYear, 1, 1); -end; - -function TcxCustomCalendarTable.GetEra(AYear, AMonth, ADay: Integer): Integer; -var - I: Integer; - ADate: TDateTime; -begin - Result := -1; - if Eras.Count = 0 then - Exit; - ADate := EncodeDate(AYear, AMonth, ADay); - for I := 0 to Eras.Count - 1 do - with Eras[I] do - if (ADate >= StartDate) then - Result := I; -end; - -function TcxCustomCalendarTable.GetFirstDayOfWeek(ADate: TDateTime): TDateTime; -begin - Result := ToDateTime(GetFirstDayOfWeek(FromDateTime(ADate))); -end; - -function TcxCustomCalendarTable.GetFirstDayOfWeek(ADate: TDateTime; AStartDayOfWeek: TDay): TDateTime; -var - ADays: Integer; -begin - ADays := Byte(AStartDayOfWeek) - GetWeekDay(ADate); - if ADays > 0 then - Dec(ADays, 7); - Result := ADate + ADays; -end; - -function TcxCustomCalendarTable.GetFirstDayOfWeek( - ADate: TcxDateTime): TcxDateTime; -var - I: Integer; -begin - I := GetFirstWeekDay - GetWeekDay(ADate); - if I > 0 then - Dec(I, 7); - Result := FromDateTime(AddDays(ADate, I)); -end; - -function TcxCustomCalendarTable.GetFirstDayOfWeek(ADate: TcxDateTime; AStartDayOfWeek: TDay): TcxDateTime; -begin - Result := FromDateTime(GetFirstDayOfWeek(ToDateTime(ADate), AStartDayOfWeek)); -end; - -function TcxCustomCalendarTable.GetMonthsInYear(AYear: Cardinal): Cardinal; -begin - Result := GetMonthsInYear(-1, AYear); -end; - -function TcxCustomCalendarTable.GetYear(ADate: TDateTime): Cardinal; -begin - Result := FromDateTime(ADate).Year; -end; - -function TcxCustomCalendarTable.GetYear(ADate: TcxDate): Cardinal; -begin - Result := ADate.Year; -end; - -function TcxCustomCalendarTable.GetYear(ADate: TcxDateTime): Cardinal; -begin - Result := ADate.Year; -end; - -function TcxCustomCalendarTable.GetWeekDay(ADate: TDateTime): Byte; -begin - Result := DayOfWeek(ADate) - 1; -end; - -function TcxCustomCalendarTable.GetWeekDay(ADate: TcxDateTime): Byte; -begin - Result := GetWeekDay(ToDateTime(ADate)); -end; - -function TcxCustomCalendarTable.GetWeekNumber(ADate: TDateTime; AStartOfWeek: TDay; - AFirstWeekOfYear: TcxFirstWeekOfYear): Cardinal; -begin - Result := GetWeekNumber(FromDateTime(ADate), AStartOfWeek, AFirstWeekOfYear); -end; - -function TcxCustomCalendarTable.IsLeapDay(AYear, AMonth, ADay: Cardinal): Boolean; -begin - Result := IsLeapDay(-1, AYear, AMonth, ADay); -end; - -function TcxCustomCalendarTable.IsLeapMonth(AYear, AMonth: Cardinal): Boolean; -begin - Result := IsLeapMonth(-1, AYear, AMonth); -end; - -function TcxCustomCalendarTable.IsLeapYear(AYear: Cardinal): Boolean; -begin - Result := IsLeapYear(-1, AYear); -end; - -function TcxCustomCalendarTable.IsValidDay(AYear, AMonth, - ADay: Cardinal): Boolean; -begin - Result := IsValidDay(-1, AYear, AMonth, ADay); -end; - -function TcxCustomCalendarTable.IsValidDay(AEra: Integer;AYear, AMonth, - ADay: Cardinal): Boolean; -begin - Result := IsValidMonth(AEra, AYear, AMonth) and - (ADay > 0) and (ADay <= GetDaysInMonth(AEra, AYear, AMonth)); -end; - -function TcxCustomCalendarTable.IsValidDate(ADate: TDateTime): Boolean; -var - AConvertDate: TcxDateTime; -begin - AConvertDate := FromDateTime(ADate); - with AConvertDate do - Result := IsValidDay(Year, Month, Day); -end; - -function TcxCustomCalendarTable.IsValidMonth(AYear, - AMonth: Cardinal): Boolean; -begin - Result := IsValidMonth(-1, AYear, AMonth); -end; - -function TcxCustomCalendarTable.IsValidMonth(AEra: Integer; AYear, - AMonth: Cardinal): Boolean; -begin - Result := IsValidYear(AEra, AYear) and - (AMonth > 0) and (AMonth <= GetMonthsInYear(AEra, AYear)); -end; - -function TcxCustomCalendarTable.IsValidYear(AYear: Cardinal): Boolean; -begin - Result := IsValidYear(-1, AYear); -end; - -function TcxCustomCalendarTable.IsValidYear(AEra: Integer; AYear: Cardinal): Boolean; -begin - Result := (Integer(AYear) >= GetMinSupportedYear) and - (Integer(AYear) <= GetMaxSupportedYear); -end; - -function TcxCustomCalendarTable.ToDateTime(ADate: TcxDate): TDateTime; -var - ADateTime: TcxDateTime; -begin - with ADateTime do - begin - Year := ADate.Year; - Month := ADate.Month; - Day := ADate.Day; - Hours := 0; - Minutes := 0; - Seconds := 0; - Milliseconds := 0; - end; - Result := ToDateTime(ADateTime); -end; - -function TcxCustomCalendarTable.ToDateTime(AYear, AMonth, - ADay: Cardinal): TDateTime; -begin - Result := ToDateTime(AYear, AMonth, ADay, 0, 0, 0, 0); -end; - -function TcxCustomCalendarTable.ToDateTime(AYear, AMonth, ADay: Cardinal; - AHours, AMinutes, ASeconds: Byte; AMilliseconds: Word): TDateTime; -var - ADateTime: TcxDateTime; -begin - with ADateTime do - begin - Era := -1; - Year := AYear; - Month := AMonth; - Day := ADay; - Hours := AHours; - Minutes := AMinutes; - Seconds := ASeconds; - Milliseconds := AMilliseconds; - end; - Result := ToDateTime(ADateTime); -end; - -function TcxCustomCalendarTable.GetDayNumber(const S: string): Integer; -begin - Result := StrToInt(S); -end; - -function TcxCustomCalendarTable.GetMonthNumber(AYear: Integer; const S: string): Integer; -var - I: Integer; -begin - for I := 1 to 12 do - begin - if (AnsiCompareText(S, LongMonthNames[I]) = 0) or - (AnsiCompareText(S, ShortMonthNames[I]) = 0) then - begin - Result := I; - Exit; - end; - end; - Result := StrToInt(S); -end; - -function TcxCustomCalendarTable.GetYearNumber(const S: string): Integer; -var - ATwoDigitYearMax: Integer; - ARightDigitYear: Integer; - AAge: Integer; -begin - Result := StrToInt(S); - if Length(S) <= 2 then - begin - cxGetCalendarInfo(GetThreadLocale, GetCalendarID, CAL_ITWODIGITYEARMAX or - CAL_RETURN_NUMBER, nil, 0, @ATwoDigitYearMax); - AAge := ATwoDigitYearMax div 100; - ARightDigitYear := ATwoDigitYearMax - AAge * 100; - if Result <= ARightDigitYear then - Result := Result + AAge * 100 - else - Result := Result + (AAge - 1) * 100 - end; -end; - -{ TcxGregorianCalendarTable } - -constructor TcxGregorianCalendarTable.Create; -begin - inherited Create; - FDefaultEra := TcxEra.Create(-1, NullDate, 0, 1, 9999); - FGregorianCalendarType := gctLocalized; -end; - -destructor TcxGregorianCalendarTable.Destroy; -begin - FreeAndNil(FDefaultEra); - inherited Destroy; -end; - -function TcxGregorianCalendarTable.GetCalendarAlgorithmType: TcxCalendarAlgorithmType; -begin - Result := catSolarCalendar; -end; - -function TcxGregorianCalendarTable.GetCalendarID: TcxCALID; -begin - Result := TcxCALID(FGregorianCalendarType); -end; - -function TcxGregorianCalendarTable.GetDefaultEra: TcxEra; -begin - Result := FDefaultEra; -end; - -function TcxGregorianCalendarTable.GetMaxSupportedDate: TDateTime; -begin - Result := MaxDateTime; -end; - -function TcxGregorianCalendarTable.GetMinSupportedDate: TDateTime; -begin - Result := MinDateTime; -end; - -function TcxGregorianCalendarTable.GetMaxSupportedYear: Integer; -begin - Result := MaxYear; -end; - -function TcxGregorianCalendarTable.GetMinSupportedYear: Integer; -begin - Result := MinYear; -end; - -function TcxGregorianCalendarTable.FromDateTime(ADate: TDateTime): TcxDateTime; -var - Y, M, D: Word; - H, MN, S, MS: Word; -begin - DecodeDateTime(ADate, Y, M, D, H, MN, S, MS); - with Result do - begin - Year := Y; - Month := M; - Day := D; - Hours := H; - Minutes := MN; - Seconds := S; - Milliseconds := MS; - end; -end; - -function TcxGregorianCalendarTable.GetFirstWeekDay: Byte; -var - ADay: TDay; -begin - case FGregorianCalendarType of - gctArabic: - ADay := dSaturday; - gctMiddleEastFrench, gctTransliteratedEnglish, - gctTransliteratedFrench: - ADay := dMonday; - else - ADay := dSunday; - end; - Result := Byte(ADay); -end; - -function TcxGregorianCalendarTable.GetWeekNumber(ADate: TcxDateTime; AStartOfWeek: TDay; - AFirstWeekOfYear: TcxFirstWeekOfYear): Cardinal; -begin - Result := cxDateUtils.GetWeekNumber(ToDateTime(ADate), AStartOfWeek, AFirstWeekOfYear); -end; - -function TcxGregorianCalendarTable.GetDaysInMonth(AEra: Integer; AYear, - AMonth: Cardinal): Cardinal; -begin - case AMonth of - 2: - begin - if IsLeapYear(AEra, AYear) then - Result := 29 - else - Result := 28; - end; - 4, 6, 9, 11: - Result := 30; - else - Result := 31; - end; -end; - -function TcxGregorianCalendarTable.GetDaysInYear(AEra: Integer; AYear: Cardinal): Cardinal; -begin - if IsLeapYear(AEra, AYear) then - Result := 366 - else - Result := 365; -end; - -function TcxGregorianCalendarTable.GetFullWeeksInYear(AYear: Cardinal): Cardinal; -var - ADate: TcxDateTime; - ADay: Integer; -begin - Result := 52; - ADate.Year := AYear; - ADate.Month := 1; - ADate.Day := 1; - ADate.Hours := 0; - ADate.Minutes := 0; - ADate.Seconds := 0; - ADate.Milliseconds := 0; - ADay := GetWeekDay(ADate) - GetFirstWeekDay; - if ADay < 0 then - Inc(ADay, 7); - if (IsLeapYear(AYear) and (ADay >= 5)) or (ADay >= 6) then - Result := 53; -end; - -function TcxGregorianCalendarTable.GetMonthsInYear(AEra: Integer; AYear: Cardinal): Cardinal; -begin - Result := 12; -end; - -function TcxGregorianCalendarTable.IsLeapDay(AEra: Integer; AYear, AMonth, - ADay: Cardinal): Boolean; -begin - Result := IsLeapMonth(AEra, AYear, ADay) and (ADay = 29); -end; - -function TcxGregorianCalendarTable.IsLeapMonth(AEra: Integer; AYear, AMonth: Cardinal): Boolean; -begin - Result := IsLeapYear(AEra, AYear) and (AMonth = 2); -end; - -function TcxGregorianCalendarTable.IsLeapYear(AEra: Integer; AYear: Cardinal): Boolean; -begin - YearToGregorianYear(AYear, AEra); - Result := (AYear mod 4 = 0) and ((AYear mod 100 <> 0) or (AYear mod 400 = 0)); -end; - -function TcxGregorianCalendarTable.ToDateTime(ADateTime: TcxDateTime): TDateTime; -begin - with ADateTime do - Result := EncodeDateTime(Year, Month, Day, Hours, Minutes, Seconds, Milliseconds); -end; - -{ TcxJapaneseCalendarTable } - -constructor TcxJapaneseCalendarTable.Create; -begin - FEras := TcxEras.Create; - FEras.Add(TcxEra.Create(1, EncodeDate(1868, 9, 8), 1867, 1, 1912 - 1867)); // Meiji - FEras.Add(TcxEra.Create(2, EncodeDate(1912, 7, 30), 1911, 1, 1926 - 1911)); // Taisho - FEras.Add(TcxEra.Create(3, EncodeDate(1926, 12, 25), 1925, 1, 1989 - 1925)); // Showa - FEras.Add(TcxEra.Create(4, EncodeDate(1989, 1, 8), 1988, 1, 9999 - 1988)); // Heisei. Most recent -end; - -function TcxJapaneseCalendarTable.GetCalendarAlgorithmType: TcxCalendarAlgorithmType; -begin - Result := catSolarCalendar; -end; - -function TcxJapaneseCalendarTable.GetCalendarID: TcxCALID; -begin - Result := CAL_JAPAN; -end; - -function TcxJapaneseCalendarTable.GetDefaultEra: TcxEra; -begin - Result := Eras[3]; -end; - -function TcxJapaneseCalendarTable.GetMaxSupportedDate: TDateTime; -begin - Result := EncodeDate(9999, 12, 31); -end; - -function TcxJapaneseCalendarTable.GetMinSupportedDate: TDateTime; -begin - Result := EncodeDate(1868, 09, 08); -end; - -function TcxJapaneseCalendarTable.GetMaxSupportedYear: Integer; -begin - Result := 8011; // Heisei 8011/12/31 -end; - -function TcxJapaneseCalendarTable.GetMinSupportedYear: Integer; -begin - Result := 1; -end; - -function TcxJapaneseCalendarTable.FromDateTime(ADate: TDateTime): TcxDateTime; -var - Y, M, D, H, Mn, S, MS: Word; -begin - DecodeDate(ADate, Y, M, D); - DecodeTime(ADate, H, Mn, S, MS); - with Result do - begin - Era := GetEra(Y, M, D); - if Era = -1 then - Year := Y - DefaultEra.YearOffset - else - Year := Y - Eras[Era].YearOffset; - Month := M; - Day := D; - Hours := H; - Minutes := Mn; - Seconds := S; - Milliseconds := MS; - end; -end; - -function TcxJapaneseCalendarTable.GetFirstWeekDay: Byte; -begin - Result := 0; -end; - -function TcxJapaneseCalendarTable.ToDateTime(ADateTime: TcxDateTime): TDateTime; -var - AYear: Cardinal; -begin - with ADateTime do - begin - if IsNotValid(ADateTime, Result) then - Exit; - AYear := Year; - YearToGregorianYear(AYear, Era); - Result := EncodeDate(AYear, Month, Day) + - EncodeTime(Hours, Minutes, Seconds, Milliseconds); - end; -end; - -{ TcxTaiwanCalendarTable } - -constructor TcxTaiwanCalendarTable.Create; -begin - FEras := TcxEras.Create; - FEras.Add(TcxEra.Create(1, EncodeDate(1912, 1, 1), 1911, 1, 9999 - 1911)); // -end; - -function TcxTaiwanCalendarTable.GetCalendarAlgorithmType: TcxCalendarAlgorithmType; -begin - Result := catSolarCalendar; -end; - -function TcxTaiwanCalendarTable.GetCalendarID: TcxCALID; -begin - Result := CAL_TAIWAN; -end; - -function TcxTaiwanCalendarTable.GetDefaultEra: TcxEra; -begin - Result := FEras[0]; -end; - -function TcxTaiwanCalendarTable.GetMinSupportedDate: TDateTime; -begin - Result := DefaultEra.StartDate; -end; - -function TcxTaiwanCalendarTable.GetMaxSupportedYear: Integer; -begin - Result := DefaultEra.MaxEraYear; -end; - -function TcxTaiwanCalendarTable.GetMinSupportedYear: Integer; -begin - Result := DefaultEra.MinEraYear; -end; - -{ TcxKoreanCalendarTable } - -constructor TcxKoreanCalendarTable.Create; -begin - FEras := TcxEras.Create; - FEras.Add(TcxEra.Create(0, EncodeDate(1, 1, 1), -2333, 2334, 9999 + 2333)); -end; - -function TcxKoreanCalendarTable.GetCalendarAlgorithmType: TcxCalendarAlgorithmType; -begin - Result := catSolarCalendar; -end; - -function TcxKoreanCalendarTable.GetCalendarID: TcxCALID; -begin - Result := CAL_KOREA; -end; - -function TcxKoreanCalendarTable.GetDefaultEra: TcxEra; -begin - Result := Eras[0]; -end; - -function TcxKoreanCalendarTable.GetMinSupportedDate: TDateTime; -begin - Result := DefaultEra.StartDate; -end; - -function TcxKoreanCalendarTable.GetMaxSupportedYear: Integer; -begin - Result := DefaultEra.MaxEraYear; -end; - -function TcxKoreanCalendarTable.GetMinSupportedYear: Integer; -begin - Result := DefaultEra.MinEraYear; -end; - -{ TcxHijriCalendarTable } - -constructor TcxHijriCalendarTable.Create; -begin - inherited Create; - FDefaultEra := TcxEra.Create(-1, NullDate, 0, 1, 9999); -end; - -destructor TcxHijriCalendarTable.Destroy; -begin - FreeAndNil(FDefaultEra); - inherited Destroy; -end; - -function TcxHijriCalendarTable.FromDateTime( - ADate: TDateTime): TcxDateTime; -var - I: Integer; - H, M, S, MS: Word; - ACountDays: Integer; - ACurrentYear: Integer; -begin - with Result do - begin - DecodeTime(ADate, H, M, S, MS); - Hours := H; - Minutes := M; - Seconds := S; - Milliseconds := MS; - ACountDays := Trunc(ADate - EncodeDate(1, 1, 1) + 1) - 227013; - Year := ((ACountDays * 30) div 10631) + 1; - ACurrentYear := Year; - ACountDays := ACountDays - (ACurrentYear - 1) * 354; - ACountDays := ACountDays - ((ACurrentYear - 1) div 30) * 11; - for I := 1 to (ACurrentYear - 1) mod 30 do - if IsLeapYear(I) then - ACountDays := ACountDays - 1; - Year := ACurrentYear; - Month := 1; - while ACountDays > Integer(GetDaysInMonth(Year, Month)) do - begin - ACountDays := ACountDays - Integer(GetDaysInMonth(Year, Month)); - Month := Month + 1; - if Month > GetMonthsInYear(Year) then - begin - Month := 1; - Year := Year + 1; - end; - end; - if ACountDays = 0 then - begin - Year := Year - 1; - Month := GetMonthsInYear(Year); - Day := GetDaysInMonth(Year, Month); - end - else - Day := ACountDays; - end; -end; - -function TcxHijriCalendarTable.GetCalendarAlgorithmType: TcxCalendarAlgorithmType; -begin - Result := catLunarCalendar; -end; - -function TcxHijriCalendarTable.GetCalendarID: TcxCALID; -begin - Result := CAL_HIJRI; -end; - -function TcxHijriCalendarTable.GetDefaultEra: TcxEra; -begin - Result := FDefaultEra; -end; - -function TcxHijriCalendarTable.GetFirstWeekDay: Byte; -begin - Result := 6; -end; - -function TcxHijriCalendarTable.GetDaysInMonth(AEra: Integer; AYear, - AMonth: Cardinal): Cardinal; -begin - if IsLeapMonth(AYear, AMonth) then - Result := 30 - else - if AMonth in [2, 4, 6, 8, 10, 12] then - Result := 29 - else - Result := 30; -end; - -function TcxHijriCalendarTable.GetDaysInYear(AEra: Integer; AYear: Cardinal): Cardinal; -begin - if IsLeapYear(AYear) then - Result := 355 - else - Result := 354; -end; - -function TcxHijriCalendarTable.GetFullWeeksInYear( - AYear: Cardinal): Cardinal; -begin - Result := 50; -end; - -function TcxHijriCalendarTable.GetMaxSupportedDate: TDateTime; -begin - Result := EncodeDate(9666, 4, 3); -end; - -function TcxHijriCalendarTable.GetMinSupportedDate: TDateTime; -begin - Result := EncodeDate(0622, 7, 16); -end; - -function TcxHijriCalendarTable.GetMaxSupportedYear: Integer; -begin - Result := 9666; -end; - -function TcxHijriCalendarTable.GetMinSupportedYear: Integer; -begin - Result := 1; -end; - -function TcxHijriCalendarTable.GetMonthsInYear(AEra: Integer; AYear: Cardinal): Cardinal; -begin - Result := 12; -end; - -function TcxHijriCalendarTable.GetWeekNumber(ADate: TcxDateTime; AStartOfWeek: TDay; - AFirstWeekOfYear: TcxFirstWeekOfYear): Cardinal; -var - AStartWeekDate: TDateTime; - AStart: TDateTime; - ATmpDate: TcxDateTime; -begin - if AFirstWeekOfYear = fwySystem then - AFirstWeekOfYear := TcxFirstWeekOfYear( - StrToInt(cxGetLocaleInfo(GetThreadLocale, LOCALE_IFIRSTWEEKOFYEAR, '0')) + 1); - with ATmpDate do - begin - Year := ADate.Year; - Month := 1; - Day := 1; - Hours := 0; - Minutes := 0; - Seconds := 0; - Milliseconds := 0; - end; - AStart := GetFirstDayOfWeek(ToDateTime(ATmpDate)); - case AFirstWeekOfYear of - fwyFirstFourDays: - if FromDateTime(AStart + 3).Year < ADate.Year then AStart := AStart + 7; - fwyFirstFullWeek: - if FromDateTime(AStart).Year < ADate.Year then AStart := AStart + 7; - end; - Result := Trunc(Trunc(ToDateTime(ADate)) - AStart) div 7 + 1; - if ADate.Month = GetMonthsInYear(ADate.Year) then - begin - AStartWeekDate := ToDateTime(GetFirstDayOfWeek(ADate)); - case AFirstWeekOfYear of - fwyJan1: - if FromDateTime(AStartWeekDate + 6).Month = 1 then - Result := 1; - fwyFirstFourDays: - if FromDateTime(AStartWeekDate + 3).Month = 1 then - Result := 1; - end; - end; -end; - -function TcxHijriCalendarTable.IsLeapDay(AEra: Integer; AYear, AMonth, - ADay: Cardinal): Boolean; -begin - Result := IsLeapMonth(AYear, AMonth) and (ADay = 30); -end; - -function TcxHijriCalendarTable.IsLeapMonth(AEra: Integer; AYear, - AMonth: Cardinal): Boolean; -begin - Result := IsLeapYear(AYear) and (AMonth = 12); -end; - -function TcxHijriCalendarTable.IsLeapYear(AEra: Integer; AYear: Cardinal): Boolean; -begin - Result := (AYear mod 30) in [2, 5, 7, 10, 13, 15, 18, 21, 24, 26, 29]; -end; - -function TcxHijriCalendarTable.ToDateTime( - ADateTime: TcxDateTime): TDateTime; -var - I: Integer; -begin - Result := 227013; - Result := Result + (ADateTime.Year - 1) * 354; - Result := Result + ((ADateTime.Year - 1) div 30) * 11; - for I := 1 to (ADateTime.Year - 1) mod 30 do - if IsLeapYear(I) then - Result := Result + 1; - Result := Result + GetDayOfYear(ADateTime); - Result := Result + EncodeDate(1, 1, 1) - 1; - Result := Result + EncodeTime(ADateTime.Hours, ADateTime.Minutes, ADateTime.Seconds, ADateTime.Milliseconds); -end; - -function TcxHijriCalendarTable.GetMonthNumber(AYear: Integer; const S: string): Integer; -var - I: Integer; -begin - for I := 1 to 12 do - begin - if AnsiCompareText(S, cxGetLocalMonthName(AYear, I, Self)) = 0 then - begin - Result := I; - Exit; - end; - end; - Result := inherited GetMonthNumber(AYear, S); -end; - -{ TcxThaiCalendarTable } - -constructor TcxThaiCalendarTable.Create; -begin - FEras := TcxEras.Create; - FEras.Add(TcxEra.Create(0, EncodeDate(1, 1, 1), -543, 544, 9999 + 543)); -end; - -function TcxThaiCalendarTable.GetCalendarAlgorithmType: TcxCalendarAlgorithmType; -begin - Result := catSolarCalendar; -end; - -function TcxThaiCalendarTable.GetCalendarID: TcxCALID; -begin - Result := CAL_THAI; -end; - -function TcxThaiCalendarTable.GetDefaultEra: TcxEra; -begin - Result := Eras[0]; -end; - -function TcxThaiCalendarTable.GetMinSupportedDate: TDateTime; -begin - Result := DefaultEra.StartDate; -end; - -function TcxThaiCalendarTable.GetMaxSupportedYear: Integer; -begin - Result := DefaultEra.MaxEraYear; -end; - -function TcxThaiCalendarTable.GetMinSupportedYear: Integer; -begin - Result := DefaultEra.MinEraYear; -end; - -{ TcxHebrewCalendarTable } - -constructor TcxHebrewCalendarTable.Create; -begin - inherited Create; - FDefaultEra := TcxEra.Create(-1, NullDate, 0, 1, 9999); -end; - -destructor TcxHebrewCalendarTable.Destroy; -begin - FreeAndNil(FDefaultEra); - inherited Destroy; -end; - -function TcxHebrewCalendarTable.FromDateTime(ADate: TDateTime): TcxDateTime; -var - AYear, AMonth, ADay: Word; - H, M, S, MS: Word; - ADays: Integer; -begin - if ADate > MaxSupportedDate then - begin - Result := FromDateTime(MaxSupportedDate); - Exit; - end; - if ADate < MinSupportedDate then - begin - Result := FromDateTime(MinSupportedDate); - Exit; - end; - DecodeDateTime(ADate, AYear, AMonth, ADay, H, M, S, MS); - AYear := AYear + 3760; - AMonth := 1; - ADays := Trunc(ADate - ToDateTime(AYear, AMonth, 1)) + 1; - with Result do - begin - Year := AYear; - Month := AMonth; - Day := 1; - Hours := H; - Minutes := M; - Seconds := S; - Milliseconds := MS; - end; - if ADays = 0 then - Exit; - while (ADays < 0) or (ADays > Integer(GetDaysInMonth(AYear, AMonth))) do - begin - if ADays < 0 then - begin - Dec(AMonth); - if AMonth <= 0 then - begin - Dec(AYear); - AMonth := GetMonthsInYear(AYear); - end; - end - else - begin - Inc(AMonth); - if AMonth > GetMonthsInYear(AYear) then - begin - AMonth := 1; - Inc(AYear); - end; - end; - ADays := Trunc(ADate - ToDateTime(AYear, AMonth, 1)) + 1; - end; - with Result do - begin - Year := AYear; - Month := AMonth; - Day := ADays; - end; -end; - -function TcxHebrewCalendarTable.GetCalendarAlgorithmType: TcxCalendarAlgorithmType; -begin - Result := catLunarSolarCalendar; -end; - -function TcxHebrewCalendarTable.GetCalendarID: TcxCALID; -begin - Result := CAL_HEBREW; -end; - -function TcxHebrewCalendarTable.GetDefaultEra: TcxEra; -begin - Result := FDefaultEra; -end; - -function TcxHebrewCalendarTable.GetDaysInMonth(AEra: Integer; AYear, - AMonth: Cardinal): Cardinal; -var - AYearIndex: Integer; -begin - if not IsValidMonth(AYear, AMonth) then - begin - Result := 0; - Exit; - end; - AYearIndex := Integer(GetYearType(AYear)); - if IsLeapYear(AYear) then - Inc(AYearIndex, 3); - Result := cxHebrewLunarMonthLen[AYearIndex, AMonth]; -end; - -function TcxHebrewCalendarTable.GetDaysInYear(AEra: Integer; AYear: Cardinal): Cardinal; -begin - if not IsValidYear(AYear) then - begin - Result := 0; - Exit; - end; - Result := 353; - case GetYearType(AYear) of - hctyNormal: - Result := 354; - hctyPerfect: - Result := 355; - end; - if IsLeapYear(AYear) then - Inc(Result, 30); -end; - -function TcxHebrewCalendarTable.GetFirstWeekDay: Byte; -begin - Result := 0; -end; - -function TcxHebrewCalendarTable.GetYearType( - AYear: Cardinal): TcxHebrewCalendarTableTypeYear; -var - AIndex: Integer; - ATypeYear: Integer; -begin - AIndex := AYear - cxHebrewFirstGregorianTableYear - cxHebrewYearOf1AD; - if (AIndex < 0) or (AIndex > cxHebrewTableYear) then - begin - Result := TcxHebrewCalendarTableTypeYear(0); - Exit; - end; - AIndex := AIndex * 2 + 1; - ATypeYear := cxHebrewTable[AIndex]; - if IsLeapYear(AYear) then - Dec(ATypeYear, 3); - Result := TcxHebrewCalendarTableTypeYear(ATypeYear); -end; - -function TcxHebrewCalendarTable.GetFullWeeksInYear(AYear: Cardinal): Cardinal; -begin - Result := GetDaysInYear(AYear) div 7; -end; - -function TcxHebrewCalendarTable.GetMaxSupportedDate: TDateTime; -begin - Result := EncodeDateTime(2239, 9, 29, 23, 59, 59, 999); -end; - -function TcxHebrewCalendarTable.GetMinSupportedDate: TDateTime; -begin - Result := EncodeDate(1583, 1, 1); -end; - -function TcxHebrewCalendarTable.GetMaxSupportedYear: Integer; -begin - Result := 5999; -end; - -function TcxHebrewCalendarTable.GetMinSupportedYear: Integer; -begin - Result := 5343; -end; - -function TcxHebrewCalendarTable.GetMonthsInYear(AEra: Integer; AYear: Cardinal): Cardinal; -begin - if IsLeapYear(AYear) then - Result := 13 - else - Result := 12; -end; - -function TcxHebrewCalendarTable.GetWeekNumber(ADate: TcxDateTime; - AStartOfWeek: TDay; AFirstWeekOfYear: TcxFirstWeekOfYear): Cardinal; -var - AStartWeekDate: TDateTime; - AStart: TDateTime; - ATmpDate: TcxDateTime; -begin - if AFirstWeekOfYear = fwySystem then - AFirstWeekOfYear := TcxFirstWeekOfYear( - StrToInt(cxGetLocaleInfo(GetThreadLocale, LOCALE_IFIRSTWEEKOFYEAR, '0')) + 1); - with ATmpDate do - begin - Year := ADate.Year; - Month := 1; - Day := 1; - Hours := 0; - Minutes := 0; - Seconds := 0; - Milliseconds := 0; - end; - AStart := GetFirstDayOfWeek(ToDateTime(ATmpDate)); - case AFirstWeekOfYear of - fwyFirstFourDays: - if FromDateTime(AStart + 3).Year < ADate.Year then AStart := AStart + 7; - fwyFirstFullWeek: - if FromDateTime(AStart).Year < ADate.Year then AStart := AStart + 7; - end; - Result := Trunc(Trunc(ToDateTime(ADate)) - AStart) div 7 + 1; - if ADate.Month = GetMonthsInYear(ADate.Year) then - begin - AStartWeekDate := ToDateTime(GetFirstDayOfWeek(ADate)); - case AFirstWeekOfYear of - fwyJan1: - if FromDateTime(AStartWeekDate + 6).Month = 1 then - Result := 1; - fwyFirstFourDays: - if FromDateTime(AStartWeekDate + 3).Month = 1 then - Result := 1; - end; - end; -end; - -function TcxHebrewCalendarTable.IsLeapDay(AEra: Integer; AYear, AMonth, - ADay: Cardinal): Boolean; -begin - Result := IsValidDay(AYear, AMonth, ADay) and IsLeapMonth(AYear, AMonth); -end; - -function TcxHebrewCalendarTable.IsLeapMonth(AEra: Integer; AYear, AMonth: Cardinal): Boolean; -begin - Result := IsValidMonth(AYear, AMonth) and IsLeapYear(AYear) and (AMonth = 7); -end; - -function TcxHebrewCalendarTable.IsLeapYear(AEra: Integer; AYear: Cardinal): Boolean; -var - AIndex: Integer; -begin - AIndex := AYear - cxHebrewFirstGregorianTableYear - cxHebrewYearOf1AD; - if (AIndex < 0) or (AIndex > cxHebrewTableYear) then - begin - Result := False; - Exit; - end; - AIndex := AIndex * 2 + 1; - Result := cxHebrewTable[AIndex] >= 4; -end; - -function TcxHebrewCalendarTable.ToDateTime(ADateTime: TcxDateTime): TDateTime; -var - AYear, ADays: Integer; - ALunarDate: TcxDate; - ALunarYearType: Integer; -begin - if IsNotValid(ADateTime, Result) then - Exit; - ALunarYearType := Integer(GetYearType(ADateTime.Year)); - if IsLeapYear(ADateTime.Year) then - Inc(ALunarYearType, 3); - AYear := ADateTime.Year - cxHebrewYearOf1AD; - GetLunarMonthDay(AYear, ALunarDate); - Result := EncodeDateTime(AYear, 1, 1, ADateTime.Hours, ADateTime.Minutes, - ADateTime.Seconds, ADateTime.Milliseconds); - if (ADateTime.Month = ALunarDate.Month) and (ADateTime.Day = ALunarDate.Day) then - Exit; - ADays := GetDayDifference(ALunarYearType, ADateTime.Month, ADateTime.Day, - ALunarDate.Month, ALunarDate.Day); - Result := Result + ADays; -end; - -function TcxHebrewCalendarTable.GetDayNumber(const S: string): Integer; -begin - Result := HebrewNumber(S); - if Result = 0 then - Result := inherited GetYearNumber(S); -end; - -function TcxHebrewCalendarTable.GetMonthNumber(AYear: Integer; const S: string): Integer; -var - I: Integer; -begin - Result := HebrewNumber(S); - if IsValidMonth(AYear, Result) then - Exit; - for I := 1 to 13 do - begin - if (AnsiCompareText(S, cxGetLocalMonthName(AYear, I, Self)) = 0) or - (AnsiCompareText(S, cxDayNumberToLocalFormatStr(I, Self)) = 0) then - begin - Result := I; - Exit; - end; - end; - Result := inherited GetMonthNumber(AYear, S); -end; - -function TcxHebrewCalendarTable.GetYearNumber(const S: string): Integer; -begin - Result := HebrewNumber(S); - if Result = 0 then - Result := inherited GetYearNumber(S) - else - Result := Result + 5000; -end; - -function TcxHebrewCalendarTable.GetDayDifference(ALunarYearType, AMonth, ADay, - ALunarMonth, ALunarDay: Integer): Integer; -var - ASwap: Boolean; - ATmpDay, ATmpMonth: Integer; -begin - if AMonth = ALunarMonth then - begin - Result := ADay - ALunarDay; - Exit; - end; - ASwap := AMonth > ALunarMonth; - if ASwap then - begin - ATmpMonth := AMonth; - AMonth := ALunarMonth; - ALunarMonth := ATmpMonth; - ATmpDay := ADay; - ADay := ALunarDay; - ALunarDay := ATmpDay; - end; - Result := cxHebrewLunarMonthLen[ALunarYearType, AMonth] - ADay; - Inc(AMonth); - while AMonth < ALunarMonth do - begin - Result := Result + cxHebrewLunarMonthLen[ALunarYearType, AMonth]; - Inc(AMonth); - end; - Result := Result + ALunarDay; - if not ASwap then - Result := - Result; -end; - -function TcxHebrewCalendarTable.HebrewNumber(const S: string): Integer; -var - I, AOrd: Integer; - ACh: Char; -begin - Result := 0; - for I := 1 to Length(S) do - begin - ACh := S[I]; - AOrd := Ord(ACh); - AOrd := AOrd - 223; - if AOrd <= 0 then - AOrd := 0; - case AOrd of - 12: - AOrd := 20; - 13: - AOrd := 30; - 14, 15: - AOrd := 40; - 16, 17: - AOrd := 50; - 18: - AOrd := 60; - 19: - AOrd := 70; - 21, 22: - AOrd := 80; - 23: - AOrd := 90; - 24: - AOrd := 100; - 25: - AOrd := 200; - 26: - AOrd := 300; - 27: - AOrd := 400; - else - if AOrd > 10 then - AOrd := 0; - end; - Result := Result + AOrd; - end; -end; - -procedure TcxHebrewCalendarTable.GetLunarMonthDay(AYear: Integer; var ADate: TcxDate); -var - AIndex: Integer; -begin - AIndex := AYear - cxHebrewFirstGregorianTableYear; - AIndex := AIndex * 2; - ADate.Day := cxHebrewTable[AIndex]; - case (ADate.Day) of - 0: - begin - ADate.Day := 1; - ADate.Month := 5; - end; - 30: - ADate.Month := 3; - 31: - begin - ADate.Day := 2; - ADate.Month := 5; - end; - 32: - begin - ADate.Day := 3; - ADate.Month := 5; - end; - 33: - begin - ADate.Day := 29; - ADate.Month := 3; - end; - else - ADate.Month := 4; - end; -end; - -function cxIsDateValid(ADate: Double): Boolean; -begin - Result := (ADate = NullDate) or - ((ADate >= cxMinDateTime) and (ADate <= cxMaxDateTime)); -end; - -end. - diff --git a/internal/x.46/ExpressLibrary/Sources/cxDesignWindow.dfm b/internal/x.46/ExpressLibrary/Sources/cxDesignWindow.dfm deleted file mode 100644 index e3cb823d..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxDesignWindow.dfm +++ /dev/null @@ -1,10 +0,0 @@ -object cxDesignWindow: TcxDesignWindow - Left = 612 - Top = 120 - Width = 320 - Height = 240 - Color = clBtnFace - OldCreateOrder = True - PixelsPerInch = 96 - TextHeight = 13 -end diff --git a/internal/x.46/ExpressLibrary/Sources/cxDesignWindows.dfm b/internal/x.46/ExpressLibrary/Sources/cxDesignWindows.dfm deleted file mode 100644 index 0028f632..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxDesignWindows.dfm +++ /dev/null @@ -1,13 +0,0 @@ -object cxDesignFormEditor: TcxDesignFormEditor - Left = 612 - Top = 120 - Width = 320 - Height = 240 - Color = clBtnFace - OldCreateOrder = True - OnClose = FormClose - OnCreate = FormCreate - OnDestroy = FormDestroy - PixelsPerInch = 96 - TextHeight = 13 -end diff --git a/internal/x.46/ExpressLibrary/Sources/cxDesignWindows.pas b/internal/x.46/ExpressLibrary/Sources/cxDesignWindows.pas deleted file mode 100644 index 543c75e6..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxDesignWindows.pas +++ /dev/null @@ -1,1475 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCommonLibrary } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCOMMONLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDesignWindows; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, - DesignIntf, DesignWindows, ComponentDesigner, DesignConst, -{$ELSE} - DsgnWnds, DsgnIntf, LibIntf, DesignConst, -{$ENDIF} - Windows, Math, TypInfo, Classes, SysUtils, Controls, Graphics, Menus, Forms, StdCtrls, ExtCtrls, - cxClasses, dxCore; - -type -{$IFNDEF DELPHI6} - IDesigner = IFormDesigner; -{$ENDIF} - -{$IFDEF DELPHI6} - TDesignerSelectionList = IDesignerSelections; -{$ENDIF} - - TcxDesignWindow = class; - - { TcxDesignHelper } - - TcxDesignHelper = class(TObject, IUnknown, IcxDesignHelper) - private - FComponent: TComponent; - FDesigner: IDesigner; - FList: TList; - FRefCount: Integer; - FWindow: TcxDesignWindow; - function GetDesigner: IDesigner; - protected - // IUnknown - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - procedure NotifyListeners(AList: TList); - procedure SelectionsChanged(Sender: TObject; const ASelection: TDesignerSelectionList); - public - constructor Create(AComponent: TComponent); virtual; - destructor Destroy; override; - procedure ChangeSelection(AObject: TPersistent); overload; - procedure GetSelection(AList: TList); - function IsObjectSelected(AObject: TPersistent): Boolean; overload; - procedure SelectObject(AObject: TPersistent; AClearSelection: Boolean = True; - AActivateOwner: Boolean = True); overload; - procedure SetSelection(AList: TList); - procedure UnselectObject(AObject: TPersistent); overload; - // IcxDesignHelper - procedure AddSelectionChangedListener(AListener: TPersistent); - function CanAddComponent(AOwner: TComponent): Boolean; - function CanDeleteComponent(AOwner: TComponent; AComponent: TComponent): Boolean; - procedure ChangeSelection(AOwner: TComponent; AObject: TPersistent); overload; - function IsObjectSelected(AOwner: TComponent; AObject: TPersistent): Boolean; overload; - procedure Modified; virtual; - procedure RemoveSelectionChangedListener(AListener: TPersistent); - procedure SelectObject(AOwner: TComponent; AObject: TPersistent; AClearSelection: Boolean = True; - AActivateOwner: Boolean = True); overload; - procedure ShowComponentDefaultEventHandler(AComponent: TComponent); - function UniqueName(const ABaseName: string): string; - procedure UnselectObject(AOwner: TComponent; AObject: TPersistent); overload; - - property Component: TComponent read FComponent write FComponent; - property Designer: IDesigner read GetDesigner; - end; - - { TcxDesignWindow } - - TcxSelectionsChanged = procedure(Sender: TObject; const ASelection: TDesignerSelectionList) of object; - - TcxDesignWindow = class(TDesignWindow) - private - FLockCount: Integer; - FOnSelectionsChanged: TcxSelectionsChanged; - protected - procedure Activated; override; - function UniqueName(Component: TComponent): string; override; - public - constructor Create(AOwner: TComponent); override; - procedure BeginUpdate; - procedure CancelUpdate; - procedure EndUpdate(AForceUpdate: Boolean = True); - class function GetBaseRegKey{$IFDEF DELPHI6}(ADesigner: IComponentDesigner = nil){$ENDIF}: string; - procedure GetSelectionList(AList: TList); - procedure SelectionChanged({$IFDEF DELPHI6}const ADesigner: IDesigner;{$ENDIF} - {$IFDEF DELPHI6}const{$ENDIF}ASelection: TDesignerSelectionList); override; - procedure SelectionsChanged(const ASelection: TDesignerSelectionList); virtual; - procedure SetSelectionList(AList: TList); - procedure UpdateSelection; - property LockCount: Integer read FLockCount; - property OnSelectionsChanged: TcxSelectionsChanged - read FOnSelectionsChanged write FOnSelectionsChanged; - end; - - { TcxGlobalDesignWindow } - - TcxGlobalDesignWindow = class(TcxDesignWindow) - public - procedure SelectionChanged(const ADesigner: IDesigner; const ASelection: TDesignerSelectionList); override; - end; - - { TcxDesignFormEditor } - - TcxDesignFormEditor = class(TcxDesignWindow) - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure FormDestroy(Sender: TObject); - procedure FormCreate(Sender: TObject); - private - FClosing: Boolean; - FComponent: TComponent; - FComponentClassName: string; - protected - ComponentProperty: TPersistent; - ComponentPropertyName: string; - {$IFDEF DELPHI9} - procedure CreateParams(var Params: TCreateParams); override; - {$ENDIF} - procedure CloseEditor; virtual; - procedure InitFormEditor; virtual; - procedure SetComponent(AValue: TComponent); virtual; - procedure SetComponentClassName(const AValue: string); virtual; - procedure UpdateCaption; virtual; - procedure UpdateContent; virtual; - public - - function CanAddComponent: Boolean; - function CanDeleteComponent(AComponent: TComponent): Boolean; - {$IFDEF DELPHI6} - procedure DesignerClosed(const ADesigner: IDesigner; AGoingDormant: Boolean); override; - {$ELSE} - procedure FormClosed(AForm: TCustomForm); override; - procedure ComponentDeleted(Component: IPersistent); override; - procedure FormModified; override; - {$ENDIF} - procedure DoItemDeleted(AItem: TPersistent); virtual; - procedure DoItemsModified; virtual; - procedure ItemDeleted(const ADesigner: IDesigner; AItem: TPersistent); {$IFNDEF DELPHI6}virtual;{$ELSE}override;{$ENDIF} - procedure ItemsModified(const Designer: IDesigner); {$IFNDEF DELPHI6}virtual;{$ELSE}override;{$ENDIF} - procedure SelectComponent(AComponent: TPersistent); - procedure SelectComponents(AList: TList; ADefaultComponent: TPersistent); virtual; - - procedure ListBoxApplySelection(AListBox: TListBox; ADefaultComponent: TPersistent); - procedure ListBoxSynchronizeSelection(AListBox: TListBox); - - property Closing: Boolean read FClosing; - property Component: TComponent read FComponent write SetComponent; - property ComponentClassName: string read FComponentClassName write SetComponentClassName; - end; - - TcxDesignFormEditorClass = class of TcxDesignFormEditor; - -function ShowFormEditorClass(ADesigner: IDesigner; AComponent: TComponent; - AFormEditorClass: TcxDesignFormEditorClass): TcxDesignFormEditor; overload; -function ShowFormEditorClass(ADesigner: IDesigner; AComponent: TComponent; - AProperty: TPersistent; const APropertyName: string; - AFormEditorClass: TcxDesignFormEditorClass): TcxDesignFormEditor; overload; -procedure UpdateDesignFormEditors(AComponent: TComponent); - -function CanAddComponent(AOwner: TComponent; const ADesigner: IDesigner = nil): Boolean; -function CanDeleteComponent(AOwner, AComponent: TComponent; const ADesigner: IDesigner = nil): Boolean; -function CanChangeComponentList(AOwner: TComponent; ADesigner: IDesigner = nil): Boolean; -function GetObjectDesigner(AObject: TPersistent): IDesigner; - -function CreateDesignerSelectionList: TDesignerSelectionList; -procedure DeleteDesignerSelectionList(var ASelection: TDesignerSelectionList); -procedure GetSelections(ADesigner: IDesigner; AList: TList); - -procedure ConvertSelectionToList(const ASelectionList: TDesignerSelectionList; AList: TList); - -// ListBox routines - -type - TcxListBoxReindexProc = procedure(AList: TList; ANewIndex: Integer) of object; - -function LockListBox(AListBox: TListBox): TNotifyEvent; -procedure UnlockListBox(AListBox: TListBox; APrevOnClick: TNotifyEvent); - -procedure ListBoxSetItemIndex(AListBox: TListBox; AItemIndex: Integer); -procedure ListBoxSetSelected(AListBox: TListBox; AItemIndex: Integer; - ASelected: Boolean); - -procedure ListBoxRestoreSelection(AListBox: TListBox; var ASelection: TStringList; - AItemIndex, ATopIndex: Integer); -procedure ListBoxSaveSelection(AListBox: TListBox; var ASelection: TStringList; - var AItemIndex, ATopIndex: Integer); - -procedure ListBoxRestorePos(AListBox: TListBox; AItemIndex, ATopIndex: Integer); -procedure ListBoxSavePos(AListBox: TListBox; var AItemIndex, ATopIndex: Integer); - -function ListBoxGetFirstSelectedIndex(AListBox: TListBox): Integer; -function ListBoxGetLastSelectedIndex(AListBox: TListBox): Integer; - -procedure ListBoxDeleteSelection(AListBox: TListBox; ASetFocus: Boolean); -procedure ListBoxGetSelection(AListBox: TListBox; AList: TList); -procedure ListBoxLoadCollection(AListBox: TListBox; ACollection: TCollection); -procedure ListBoxSelectByObject(AListBox: TListBox; AObject: TObject); -procedure ListBoxSyncSelection(AListBox: TListBox; AList: TList); -procedure ListBoxClearSelection(AListBox: TListBox); -procedure ListBoxSelectAll(AListBox: TListBox); - -procedure ListBoxMoveItems(AListBox: TListBox; AIndex: Integer; - var APrevDragIndex: Integer; AReindexProc: TcxListBoxReindexProc); -procedure ListBoxMoveUpItems(AListBox: TListBox; var APrevDragIndex: Integer; - AReindexProc: TcxListBoxReindexProc); -procedure ListBoxMoveDownItems(AListBox: TListBox; var APrevDragIndex: Integer; - AReindexProc: TcxListBoxReindexProc); - -procedure ListBoxDragOver(AListBox: TListBox; Sender, Source: TObject; - X, Y: Integer; State: TDragState; var Accept: Boolean; var APrevDragIndex: Integer); -procedure ListBoxDragDrop(AListBox: TListBox; Sender, Source: TObject; - X, Y: Integer; var APrevDragIndex: Integer; AReindexProc: TcxListBoxReindexProc); -procedure ListBoxEndDrag(AListBox: TListBox; Sender, Target: TObject; - X, Y: Integer; var APrevDragIndex: Integer); - -// component rename routines - -function CreateUniqueName(AOwnerForm, AOwnerComponent, AChildComponent: TComponent; - const ATruncateClassName, AFieldName: string): string; - -// menu routines - -function CreateMenuItem(AOwner: TComponent; const ACaption: string; - AOnClick: TNotifyEvent = nil; AEnabled: Boolean = True; ATag: Integer = -1; - AChecked: Boolean = False): TMenuItem; - -// themed IDE routines - -{$IFDEF DELPHI10} // should be DELPHI105 -procedure MakeColoredControlsOpaque(ARoot: TControl); -{$ENDIF} - -implementation - -{$R cxDesignWindow.dfm} -{$R *.dfm} - -var - Editors: TList; - -function ShowFormEditorClass(ADesigner: IDesigner; AComponent: TComponent; - AProperty: TPersistent; const APropertyName: string; - AFormEditorClass: TcxDesignFormEditorClass): TcxDesignFormEditor; -var - I: Integer; -begin - if Editors = nil then - Editors := TList.Create; - for I := 0 to Editors.Count - 1 do - begin - Result := TcxDesignFormEditor(Editors[I]); - with Result do - if (Designer = ADesigner) and (Component = AComponent) and - (AProperty = ComponentProperty) and - (CompareText(APropertyName, ComponentPropertyName) = 0) then - begin - Show; - BringToFront; - Exit; - end; - end; - Result := AFormEditorClass.Create(Application); - with Result do - try - Designer := ADesigner; - Component := AComponent; - ComponentClassName := AComponent.ClassName; - ComponentProperty := AProperty; - ComponentPropertyName := APropertyName; - InitFormEditor; - Show; - except - Free; - end; -end; - -function ShowFormEditorClass(ADesigner: IDesigner; AComponent: TComponent; - AFormEditorClass: TcxDesignFormEditorClass): TcxDesignFormEditor; -begin - Result := ShowFormEditorClass(ADesigner, AComponent, nil, '', AFormEditorClass); -end; - -procedure UpdateDesignFormEditors(AComponent: TComponent); -var - I: Integer; - ADesignFormEditor: TcxDesignFormEditor; -begin - if Editors = nil then - Editors := TList.Create; - for I := 0 to Editors.Count - 1 do - begin - ADesignFormEditor := TcxDesignFormEditor(Editors[I]); - if ADesignFormEditor.Component = AComponent then - ADesignFormEditor.UpdateContent; - end; -end; - -function CanAddComponent(AOwner: TComponent; const ADesigner: IDesigner = nil): Boolean; -begin - Result := CanChangeComponentList(AOwner, ADesigner); -end; - -function CanDeleteComponent(AOwner, AComponent: TComponent; const ADesigner: IDesigner = nil): Boolean; -begin - Result := CanChangeComponentList(AOwner, ADesigner) and - ((AComponent = nil) or not (csAncestor in AComponent.ComponentState)); -end; - -function CanChangeComponentList(AOwner: TComponent; ADesigner: IDesigner = nil): Boolean; -begin - if ADesigner = nil then - ADesigner := GetObjectDesigner(AOwner); - Result := not ADesigner.IsSourceReadOnly and not (csInline in AOwner.ComponentState); -end; - -function GetObjectDesigner(AObject: TPersistent): IDesigner; -begin - Result := FindRootDesigner(AObject) as IDesigner; -end; - -function CreateDesignerSelectionList: TDesignerSelectionList; -begin -{$IFDEF DELPHI6} - Result := CreateSelectionList; -{$ELSE} - Result := TDesignerSelectionList.Create; -{$ENDIF} -end; - -procedure DeleteDesignerSelectionList(var ASelection: TDesignerSelectionList); -begin -{$IFNDEF DELPHI6} - FreeAndNil(ASelection); -{$ELSE} - ASelection := nil; -{$ENDIF} -end; - -procedure GetSelections(ADesigner: IDesigner; AList: TList); -var - ASelectionList: TDesignerSelectionList; - I: Integer; -begin - if ADesigner = nil then Exit; - ASelectionList := CreateDesignerSelectionList; - try - ADesigner.GetSelections(ASelectionList); - AList.Capacity := ASelectionList.Count; - for I := 0 to ASelectionList.Count - 1 do - AList.Add(ASelectionList[I]); - finally - DeleteDesignerSelectionList(ASelectionList); - end; -end; - -procedure ConvertSelectionToList(const ASelectionList: TDesignerSelectionList; AList: TList); -var - I: Integer; -begin - AList.Clear; - if ASelectionList <> nil then - begin - AList.Capacity := ASelectionList.Count; - for I := 0 to ASelectionList.Count - 1 do - AList.Add(ASelectionList[I]); - end; -end; - -// ListBox Routines - -function LockListBox(AListBox: TListBox): TNotifyEvent; -begin - Result := AListBox.OnClick; - AListBox.OnClick := nil; -end; - -procedure UnlockListBox(AListBox: TListBox; APrevOnClick: TNotifyEvent); -begin - AListBox.OnClick := APrevOnClick; -end; - -procedure ListBoxSetItemIndex(AListBox: TListBox; AItemIndex: Integer); -var - APrevOnClick: TNotifyEvent; -begin - APrevOnClick := LockListBox(AListBox); - try - AListBox.ItemIndex := AItemIndex; - finally - UnlockListBox(AListBox, APrevOnClick); - end; -end; - -procedure ListBoxSetSelected(AListBox: TListBox; AItemIndex: Integer; - ASelected: Boolean); -var - APrevOnClick: TNotifyEvent; -begin - APrevOnClick := LockListBox(AListBox); - try - if AListBox.Selected[AItemIndex] <> ASelected then - AListBox.Selected[AItemIndex] := ASelected; - finally - UnlockListBox(AListBox, APrevOnClick); - end; -end; - -procedure ListBoxRestoreSelection(AListBox: TListBox; var ASelection: TStringList; - AItemIndex, ATopIndex: Integer); -var - I: Integer; - APrevOnClick: TNotifyEvent; -begin - try - APrevOnClick := LockListBox(AListBox); - try - with AListBox do - for I := 0 to Items.Count - 1 do - Selected[I] := ASelection.IndexOfObject(Items.Objects[I]) <> -1; - if ATopIndex <> -1 then AListBox.TopIndex := ATopIndex; - if AItemIndex <> -1 then AListBox.ItemIndex := AItemIndex; - finally - UnlockListBox(AListBox, APrevOnClick); - end; - finally - AListBox.Items.EndUpdate; - FreeAndNil(ASelection); - end; -end; - -procedure ListBoxSaveSelection(AListBox: TListBox; var ASelection: TStringList; - var AItemIndex, ATopIndex: Integer); -var - I: Integer; -begin - ASelection := TStringList.Create; - try - AItemIndex := AListBox.ItemIndex; - ATopIndex := AListBox.TopIndex; - with AListBox do - for I := 0 to Items.Count - 1 do - if Selected[I] then ASelection.AddObject(Items[I], Items.Objects[I]); - AListBox.Items.BeginUpdate; - except - ASelection.Free; - ASelection := nil; - end; -end; - -procedure ListBoxRestorePos(AListBox: TListBox; AItemIndex, ATopIndex: Integer); -var - APrevOnClick: TNotifyEvent; -begin - APrevOnClick := LockListBox(AListBox); - try - if ATopIndex <> -1 then AListBox.TopIndex := ATopIndex; - if AItemIndex <> -1 then AListBox.ItemIndex := AItemIndex; - finally - UnlockListBox(AListBox, APrevOnClick); - end; -// AListBox.Items.EndUpdate; -end; - -procedure ListBoxSavePos(AListBox: TListBox; var AItemIndex, ATopIndex: Integer); -begin - AItemIndex := AListBox.ItemIndex; - ATopIndex := AListBox.TopIndex; -// AListBox.Items.BeginUpdate; -end; - -function ListBoxGetFirstSelectedIndex(AListBox: TListBox): Integer; -begin - for Result := 0 to AListBox.Items.Count - 1 do - if AListBox.Selected[Result] then Exit; - Result := -1; -end; - -function ListBoxGetLastSelectedIndex(AListBox: TListBox): Integer; -begin - for Result := AListBox.Items.Count - 1 downto 0 do - if AListBox.Selected[Result] then Exit; - Result := -1; -end; - -procedure ListBoxDeleteSelection(AListBox: TListBox; ASetFocus: Boolean); -var - I, AIndex: Integer; - AObject: TObject; - - function CanDeleteObject(AObject: TObject): Boolean; - begin - if AObject is TComponent then - Result := not (csAncestor in TComponent(AObject).ComponentState) - else - Result := True; - end; - -begin - AIndex := -1; - for I := AListBox.Items.Count - 1 downto 0 do - if AListBox.Selected[I] then - begin - with AListBox.Items do - begin - AObject := Objects[I]; - if not CanDeleteObject(AObject) then Continue; - Delete(I); - end; - AObject.Free; - AIndex := I; - end; - {for I := 0 to AListBox.Items.Count - 1 do - if AListBox.Selected[I] then - begin - if AIndex = -1 then AIndex := I; - AListBox.Items.Objects[I].Free; - end;} - // Show Last Item - if AIndex >= AListBox.Items.Count then - AIndex := AListBox.Items.Count - 1; - if AIndex >= 0 then - begin - ListBoxSetItemIndex(AListBox, AIndex); - if ASetFocus and AListBox.CanFocus then - AListBox.SetFocus; - end; -end; - -procedure ListBoxGetSelection(AListBox: TListBox; AList: TList); -var - I: Integer; -begin - for I := 0 to AListBox.Items.Count - 1 do - if AListBox.Selected[I] then - AList.Add(AListBox.Items.Objects[I]); -end; - -procedure ListBoxLoadCollection(AListBox: TListBox; ACollection: TCollection); -var - I, AItemIndex, ATopIndex: Integer; - ASelection: TStringList; - S: string; -begin - ListBoxSaveSelection(AListBox, ASelection, AItemIndex, ATopIndex); - try - AListBox.Items.Clear; - for I := 0 to ACollection.Count - 1 do - begin - S := Format('%d - %s',[I, ACollection.Items[I].DisplayName]); - AListBox.Items.AddObject(S, ACollection.Items[I]); - end; - finally - ListBoxRestoreSelection(AListBox, ASelection, AItemIndex, ATopIndex); - end; -end; - -procedure ListBoxSelectByObject(AListBox: TListBox; AObject: TObject); -var - AIndex: Integer; -begin - AIndex := AListBox.Items.IndexOfObject(AObject); - if AIndex <> -1 then - ListBoxSetSelected(AListBox, AIndex, True); -end; - -procedure ListBoxSyncSelection(AListBox: TListBox; AList: TList); -var - I, AItemIndex, ATopIndex: Integer; - ASelected: Boolean; - APrevOnClick: TNotifyEvent; -begin - ListBoxSavePos(AListBox, AItemIndex, ATopIndex); - try - APrevOnClick := LockListBox(AListBox); - try - for I := 0 to AListBox.Items.Count - 1 do - begin - ASelected := AList.IndexOf(AListBox.Items.Objects[I]) <> -1; - if AListBox.Selected[I] <> ASelected then - AListBox.Selected[I] := ASelected; - end; - finally - UnlockListBox(AListBox, APrevOnClick); - end; - if AListBox.SelCount = 1 then - for I := 0 to AListBox.Items.Count - 1 do - if AListBox.Selected[I] then - begin - AItemIndex := I; - Break; - end; - finally - ListBoxRestorePos(AListBox, AItemIndex, ATopIndex); - end; -end; - -procedure ListBoxClearSelection(AListBox: TListBox); -var - APrevOnClick: TNotifyEvent; -{$IFNDEF DELPHI6} - I: Integer; -begin - APrevOnClick := LockListBox(AListBox); - try - if AListBox.MultiSelect then - for I := 0 to AListBox.Items.Count - 1 do - AListBox.Selected[I] := False - else - AListBox.ItemIndex := -1; - finally - UnlockListBox(AListBox, APrevOnClick); - end; -end; -{$ELSE} -begin - APrevOnClick := LockListBox(AListBox); - try - AListBox.ClearSelection; - finally - UnlockListBox(AListBox, APrevOnClick); - end; -end; -{$ENDIF} - -procedure ListBoxSelectAll(AListBox: TListBox); -var - I: Integer; - APrevOnClick: TNotifyEvent; -begin - APrevOnClick := LockListBox(AListBox); - try - with AListBox do - for I := 0 to Items.Count - 1 do - Selected[I] := True; - finally - UnlockListBox(AListBox, APrevOnClick); - end; -end; - -procedure ListBoxMoveItems(AListBox: TListBox; AIndex: Integer; - var APrevDragIndex: Integer; AReindexProc: TcxListBoxReindexProc); -var - I: Integer; - APrevOnClick: TNotifyEvent; - AList: TList; -begin - APrevOnClick := LockListBox(AListBox); - try - with AListBox do - begin - if (0 <= APrevDragIndex) and (APrevDragIndex < Items.Count) then - begin - Selected[APrevDragIndex] := False; - APrevDragIndex := -1; - end; - if AIndex <> -1 then - begin - AList := TList.Create; - try - for I := 0 to Items.Count - 1 do - if Selected[I] then - AList.Add(Items.Objects[I]); - AReindexProc(AList, AIndex); - finally - AList.Free; - end; - end; - AIndex := Max(ListBoxGetFirstSelectedIndex(AListBox), AIndex); - AIndex := Min(ListBoxGetLastSelectedIndex(AListBox), AIndex); - ItemIndex := AIndex; - end; - finally - UnlockListBox(AListBox, APrevOnClick); - end; -end; - -procedure ListBoxMoveUpItems(AListBox: TListBox; var APrevDragIndex: Integer; - AReindexProc: TcxListBoxReindexProc); -begin - ListBoxMoveItems(AListBox, Max(0, ListBoxGetFirstSelectedIndex(AListBox) - 1), - APrevDragIndex, AReindexProc); -end; - -procedure ListBoxMoveDownItems(AListBox: TListBox; var APrevDragIndex: Integer; - AReindexProc: TcxListBoxReindexProc); -begin - ListBoxMoveItems(AListBox, Min(AListBox.Items.Count - 1, ListBoxGetLastSelectedIndex(AListBox) + 1), - APrevDragIndex, AReindexProc); -end; - -procedure ListBoxDragOver(AListBox: TListBox; Sender, Source: TObject; - X, Y: Integer; State: TDragState; var Accept: Boolean; var APrevDragIndex: Integer); -var - AIndex: Integer; - APrevOnClick: TNotifyEvent; -begin - if Source <> AListBox then - Accept := False - else - begin - APrevOnClick := LockListBox(AListBox); - try - with AListBox do - begin - Accept := True; - AIndex := ItemAtPos(Point(X, Y), True); - if APrevDragIndex <> AIndex then - begin - if (0 <= APrevDragIndex) and (APrevDragIndex < Items.Count) then - Selected[APrevDragIndex] := False; - if AIndex <> -1 then - if not Selected[AIndex] then - begin - Selected[AIndex] := True; - APrevDragIndex := AIndex; - end - else - APrevDragIndex := -1; - end; - ItemIndex := AIndex; - end; - finally - UnlockListBox(AListBox, APrevOnClick); - end; - end; -end; - -procedure ListBoxDragDrop(AListBox: TListBox; Sender, Source: TObject; - X, Y: Integer; var APrevDragIndex: Integer; AReindexProc: TcxListBoxReindexProc); -var - AIndex: Integer; -begin - AIndex := AListBox.ItemAtPos(Point(X, Y), True); - if (AIndex = -1) and PtInRect(AListBox.ClientRect, Point(X, Y)) then - AIndex := AListBox.Items.Count; - if AIndex <> -1 then - ListBoxMoveItems(AListBox, AIndex, APrevDragIndex, AReindexProc); -end; - -procedure ListBoxEndDrag(AListBox: TListBox; Sender, Target: TObject; - X, Y: Integer; var APrevDragIndex: Integer); -begin - if (0 <= APrevDragIndex) and (APrevDragIndex < AListBox.Items.Count) then - begin - ListBoxSetSelected(AListBox, APrevDragIndex, False); - APrevDragIndex := -1; - end; -end; - -// component rename routines - -procedure CrunchFieldName(var AFieldName: string); -var - I: Integer; -begin - I := 1; - while I <= Length(AFieldName) do - begin - if dxCharInSet(AFieldName[I], ['A'..'Z','a'..'z','_','0'..'9']) then - Inc(I) - else - if dxCharInSet(AFieldName[I], LeadBytes) then - Delete(AFieldName, I, 2) - else - Delete(AFieldName, I, 1); - end; -end; - -function GenerateName(AOwnerComponent: TComponent; - const AClassName, ATruncateClassName, AFieldName: string; ANumber: Integer): string; -var - S: string; -begin - S := AFieldName; - CrunchFieldName(S); - if (S = '') or dxCharInSet(S[1], ['0'..'9']) then - begin - if AClassName <> '' then - begin - if (ATruncateClassName <> '') and - (CompareText(ATruncateClassName, Copy(AClassName, 1, Length(ATruncateClassName))) = 0) then - begin - S := Copy(AClassName, Length(ATruncateClassName) + 1, Length(AClassName)) + S; - end - else - begin - S := AClassName + S; - if S[1] = 'T' then Delete(S, 1, 1); - end; - end; - end; - if AOwnerComponent <> nil then - Result := AOwnerComponent.Name + S - else - Result := S; - if ANumber > 0 then - Result := Result + IntToStr(ANumber); -end; - -function CreateUniqueName(AOwnerForm, AOwnerComponent, AChildComponent: TComponent; - const ATruncateClassName, AFieldName: string): string; - - function IsUnique(const AName: string): Boolean; - var - I: Integer; - begin - Result := True; - with AOwnerForm do - for I := 0 to ComponentCount - 1 do - if (Components[I] <> AChildComponent) and - (CompareText(Components[I].Name, AName) = 0) then - begin - Result := False; - Break; - end; - end; - -var - I, J: Integer; -begin - if GetObjectDesigner(AOwnerForm) <> nil then - begin - Result := GenerateName(AOwnerComponent, AChildComponent.ClassName, - ATruncateClassName, AFieldName, 0); - Result := GetObjectDesigner(AOwnerForm).UniqueName(Result); - end - else - begin - if AFieldName <> '' then - J := 0 - else - J := 1; - for I := J to MaxInt do - begin - Result := GenerateName(AOwnerComponent, AChildComponent.ClassName, - ATruncateClassName, AFieldName, I); - if IsUnique(Result) then - Break; - end; - end; -end; - -function CreateMenuItem(AOwner: TComponent; const ACaption: string; - AOnClick: TNotifyEvent = nil; AEnabled: Boolean = True; ATag: Integer = -1; - AChecked: Boolean = False): TMenuItem; -begin - Result := TMenuItem.Create(AOwner); - Result.Caption := ACaption; - Result.Checked := AChecked; - Result.Enabled := AEnabled; - Result.Tag := ATag; - Result.OnClick := AOnClick; -end; - -{$IFDEF DELPHI10} // should be DELPHI105 - -procedure MakeColoredControlsOpaque(ARoot: TControl); -var - I: Integer; -begin - if (ARoot is TPanel) and (TPanel(ARoot).Color <> clBtnFace) then - TPanel(ARoot).ParentBackground := False; - if ARoot is TWinControl then - for I := 0 to TWinControl(ARoot).ControlCount - 1 do - MakeColoredControlsOpaque(TWinControl(ARoot).Controls[I]); -end; - -{$ENDIF} - -{ TcxDesignHelper } - -constructor TcxDesignHelper.Create(AComponent: TComponent); -begin - inherited Create; - FComponent := AComponent; - FList := TList.Create; -end; - -destructor TcxDesignHelper.Destroy; -begin - FWindow.Free; - FList.Free; - inherited Destroy; -end; - -procedure TcxDesignHelper.ChangeSelection(AObject: TPersistent); -begin - if IsObjectSelected(AObject) then - UnselectObject(AObject) - else - SelectObject(AObject, False); -end; - -procedure TcxDesignHelper.GetSelection(AList: TList); -begin - GetSelections(Designer, AList); -end; - -function TcxDesignHelper.IsObjectSelected(AObject: TPersistent): Boolean; -var - AList: TList; -begin - AList := TList.Create; - try - GetSelection(AList); - Result := AList.IndexOf(AObject) <> -1; - finally - AList.Free; - end; -end; - -procedure TcxDesignHelper.SelectObject(AObject: TPersistent; AClearSelection: Boolean = True; - AActivateOwner: Boolean = True); -var - AList: TList; -begin - if AClearSelection and AActivateOwner then - Designer.SelectComponent(AObject) - else - begin - AList := TList.Create; - try - if not AClearSelection then GetSelection(AList); - if AList.IndexOf(AObject) = -1 then - begin - AList.Add(AObject); - SetSelection(AList); - end; - finally - AList.Free; - end; - end; -end; - -procedure TcxDesignHelper.SetSelection(AList: TList); -var - ASelectionList: TDesignerSelectionList; - I: Integer; -begin - if Designer = nil then Exit; - ASelectionList := CreateDesignerSelectionList; - try - for I := 0 to AList.Count - 1 do - ASelectionList.Add(TPersistent(AList[I])); - Designer.SetSelections(ASelectionList); - finally - DeleteDesignerSelectionList(ASelectionList); - end; -end; - -procedure TcxDesignHelper.UnselectObject(AObject: TPersistent); -var - AList: TList; -begin - if not IsObjectSelected(AObject) then Exit; - AList := TList.Create; - try - GetSelection(AList); - AList.Remove(AObject); - SetSelection(AList); - finally - AList.Free; - end; -end; - -procedure TcxDesignHelper.AddSelectionChangedListener(AListener: TPersistent); -begin - if (AListener <> nil) and Supports(AListener, IcxDesignSelectionChanged) and - (FList.IndexOf(AListener) < 0) then - begin - if FWindow = nil then - begin - FWindow := TcxDesignWindow.Create(nil); - FWindow.OnSelectionsChanged := SelectionsChanged; - end; - FList.Add(AListener); - end; -end; - -procedure TcxDesignHelper.RemoveSelectionChangedListener(AListener: TPersistent); -begin - FList.Remove(AListener); - if FList.Count = 0 then - FreeAndNil(FWindow); -end; - -function TcxDesignHelper.CanAddComponent(AOwner: TComponent): Boolean; -begin - Result := cxDesignWindows.CanAddComponent(AOwner.Owner); -end; - -function TcxDesignHelper.CanDeleteComponent(AOwner, - AComponent: TComponent): Boolean; -begin - Result := cxDesignWindows.CanDeleteComponent(AOwner.Owner, AComponent); -end; - -procedure TcxDesignHelper.ChangeSelection(AOwner: TComponent; AObject: TPersistent); -begin - Component := AOwner; - ChangeSelection(AObject); -end; - -function TcxDesignHelper.IsObjectSelected(AOwner: TComponent; AObject: TPersistent): Boolean; -begin - Component := AOwner; - Result := IsObjectSelected(AObject); -end; - -procedure TcxDesignHelper.Modified; -begin - Designer.Modified; -end; - -procedure TcxDesignHelper.SelectObject(AOwner: TComponent; - AObject: TPersistent; AClearSelection: Boolean = True; - AActivateOwner: Boolean = True); -begin - Component := AOwner; - SelectObject(AObject, AClearSelection, AActivateOwner); -end; - -procedure TcxDesignHelper.ShowComponentDefaultEventHandler(AComponent: TComponent); -var - APropInfo: PPropInfo; - AMethod: TMethod; - AMethodName: string; -begin - Component := AComponent; - APropInfo := GetPropInfo(Component.ClassInfo, 'OnChange'); - if APropInfo = nil then - begin - APropInfo := GetPropInfo(Component.ClassInfo, 'OnClick'); - if APropInfo = nil then - Exit - else - AMethodName := 'Click'; - end - else - AMethodName := 'Change'; - AMethod := GetMethodProp(Component, APropInfo); - if AMethod.Code <> nil then - AMethodName := Designer.GetMethodName(AMethod) - else - begin - AMethodName := AComponent.Name + AMethodName; - AMethod := GetObjectDesigner(Component).CreateMethod(AMethodName, GetTypeData(APropInfo.PropType^)); - SetMethodProp(Component, APropInfo, AMethod); - Designer.Modified; - end; - Designer.ShowMethod(AMethodName); -end; - -function TcxDesignHelper.UniqueName(const ABaseName: string): string; -begin - Result := Designer.UniqueName(ABaseName); -end; - -procedure TcxDesignHelper.UnselectObject(AOwner: TComponent; AObject: TPersistent); -begin - Component := AOwner; - UnselectObject(AObject); -end; - -function TcxDesignHelper.QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TcxDesignHelper._AddRef: Integer; stdcall; -begin - Result := InterlockedIncrement(FRefCount); -end; - -function TcxDesignHelper._Release: Integer; stdcall; -begin - Result := InterlockedDecrement(FRefCount); - if FRefCount = 0 then - Destroy; -end; - -procedure TcxDesignHelper.NotifyListeners(AList: TList); -var - I: Integer; - AIntf: IcxDesignSelectionChanged; -begin - for I := 0 to FList.Count - 1 do - begin - if Supports(TObject(FList[I]), IcxDesignSelectionChanged, AIntf) then - begin - AIntf.DesignSelectionChanged(AList); - AIntf := nil; - end; - end; -end; - -procedure TcxDesignHelper.SelectionsChanged(Sender: TObject; - const ASelection: TDesignerSelectionList); -var - L: TList; -begin - L := TList.Create; - try - ConvertSelectionToList(ASelection, L); - NotifyListeners(L); - finally - L.Free; - end; -end; - -function TcxDesignHelper.GetDesigner: IDesigner; -begin - if FDesigner = nil then - FDesigner := GetObjectDesigner(FComponent); - Result := FDesigner; -end; - -{ TcxDesignWindow } - -constructor TcxDesignWindow.Create(AOwner: TComponent); -begin - inherited; - Font.Name := dxShortStringToString(DefFontData.Name); -end; - -procedure TcxDesignWindow.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TcxDesignWindow.CancelUpdate; -begin - Dec(FLockCount); -end; - -procedure TcxDesignWindow.EndUpdate(AForceUpdate: Boolean = True); -begin - Dec(FLockCount); - if (FLockCount = 0) and AForceUpdate then - UpdateSelection; -end; - -class function TcxDesignWindow.GetBaseRegKey{$IFDEF DELPHI6}(ADesigner: IComponentDesigner = nil){$ENDIF}: string; -begin -{$IFDEF DELPHI6} - if ADesigner = nil then - ADesigner := ActiveDesigner; - if ADesigner = nil then - Result := '' - else - Result := ADesigner.Environment.GetBaseRegKey + '\' + SIniEditorsName; -{$ELSE} - Result := DelphiIDE.GetBaseRegKey + '\' + SIniEditorsName; -{$ENDIF} -end; - -procedure TcxDesignWindow.GetSelectionList(AList: TList); -var - ASelectionList: TDesignerSelectionList; -begin - ASelectionList := CreateDesignerSelectionList; - try - Designer.GetSelections(ASelectionList); - ConvertSelectionToList(ASelectionList, AList); - finally - DeleteDesignerSelectionList(ASelectionList); - end; -end; - -procedure TcxDesignWindow.SelectionChanged({$IFDEF DELPHI6}const ADesigner: IDesigner;{$ENDIF} - {$IFDEF DELPHI6}const{$ENDIF}ASelection: TDesignerSelectionList); -begin - if LockCount <> 0 then Exit; - if Assigned(FOnSelectionsChanged) then - FOnSelectionsChanged(Self, ASelection); - {$IFDEF DELPHI6} - if ADesigner = Designer then - {$ENDIF} - SelectionsChanged(ASelection); -end; - -procedure TcxDesignWindow.SelectionsChanged(const ASelection: TDesignerSelectionList); -begin -end; - -procedure TcxDesignWindow.SetSelectionList(AList: TList); -var - ASelectionList: TDesignerSelectionList; - I: Integer; -begin - ASelectionList := CreateDesignerSelectionList; - try - for I := 0 to AList.Count - 1 do - ASelectionList.Add(TPersistent(AList[I])); - Designer.SetSelections(ASelectionList); - finally - DeleteDesignerSelectionList(ASelectionList); - end; -end; - -procedure TcxDesignWindow.UpdateSelection; -var - ASelectionList: TDesignerSelectionList; -begin - ASelectionList := CreateDesignerSelectionList; - try - Designer.GetSelections(ASelectionList); - SelectionChanged({$IFDEF DELPHI6}Designer, {$ENDIF}ASelectionList); - finally - DeleteDesignerSelectionList(ASelectionList); - end; -end; - -procedure TcxDesignWindow.Activated; -begin -{$IFDEF DELPHI6} - Designer.Activate; -{$ENDIF} -// UpdateSelection; // TODO: -end; - -function TcxDesignWindow.UniqueName(Component: TComponent): string; -begin - Result := ''; //inherited UniqueName(Component); -end; - -{ TcxGlobalDesignWindow } - -procedure TcxGlobalDesignWindow.SelectionChanged(const ADesigner: IDesigner; const ASelection: TDesignerSelectionList); -begin - if LockCount <> 0 then Exit; - if Assigned(FOnSelectionsChanged) then - FOnSelectionsChanged(Self, ASelection); - SelectionsChanged(ASelection); -end; - -{ TcxDesignFormEditor } - -{$IFDEF DELPHI6} -procedure TcxDesignFormEditor.DesignerClosed(const ADesigner: IDesigner; AGoingDormant: Boolean); -begin - if Designer = ADesigner then - CloseEditor; - inherited; -end; -{$ELSE} - -procedure TcxDesignFormEditor.FormClosed(AForm: TCustomForm); -begin - if Designer.Form = AForm then - CloseEditor; - inherited; -end; - -procedure TcxDesignFormEditor.ComponentDeleted(Component: IPersistent); -var - AItem: TPersistent; -begin - AItem := TryExtractPersistent(Component); - if AItem <> nil then - ItemDeleted(Designer, AItem); -end; - -procedure TcxDesignFormEditor.FormModified; -begin - ItemsModified(Designer); -end; - -{$ENDIF} - -procedure TcxDesignFormEditor.DoItemDeleted(AItem: TPersistent); -begin -end; - -procedure TcxDesignFormEditor.DoItemsModified; -begin -end; - -procedure TcxDesignFormEditor.ItemDeleted(const ADesigner: IDesigner; AItem: TPersistent); -begin - if (AItem <> nil) and not Closing then - if (Component = nil) or (csDestroying in Component.ComponentState) or - (AItem = Component) then - CloseEditor - else - DoItemDeleted(AItem); -end; - -procedure TcxDesignFormEditor.ItemsModified(const Designer: IDesigner); -begin - if Closing or (Component = nil) or (csDestroying in Component.ComponentState) then - Exit; - UpdateCaption; - DoItemsModified; -end; - -procedure TcxDesignFormEditor.SelectComponent(AComponent: TPersistent); -begin - Designer.SelectComponent(AComponent); -end; - -procedure TcxDesignFormEditor.SelectComponents(AList: TList; ADefaultComponent: TPersistent); -begin - if not Active then Exit; - if AList.Count > 0 then - SetSelectionList(AList) - else - if Component <> nil then - begin - if ADefaultComponent <> nil then - SelectComponent(ADefaultComponent) - else - SelectComponent(Component); - end; -end; - -procedure TcxDesignFormEditor.ListBoxApplySelection(AListBox: TListBox; - ADefaultComponent: TPersistent); -var - AList: TList; -begin - BeginUpdate; - try - AList := TList.Create; - try - ListBoxGetSelection(AListBox, AList); - SelectComponents(AList, ADefaultComponent); - finally - AList.Free; - end; - finally - EndUpdate; - end; -end; - -procedure TcxDesignFormEditor.ListBoxSynchronizeSelection(AListBox: TListBox); -var - AList: TList; -begin - AList := TList.Create; - try - GetSelectionList(AList); - ListBoxSyncSelection(AListBox, AList); - finally - AList.Free; - end; -end; - -{$IFDEF DELPHI9} -procedure TcxDesignFormEditor.CreateParams(var Params: TCreateParams); -begin - inherited; - Params.WndParent := Application.MainForm.Handle; -end; -{$ENDIF} - -procedure TcxDesignFormEditor.CloseEditor; -begin - FClosing := True; - Component := nil; - ComponentProperty := nil; - ComponentPropertyName := ''; - Close; -end; - -procedure TcxDesignFormEditor.UpdateCaption; -var - S: string; -begin - if (Component <> nil) and (Component.Name <> '') then - begin - S := Component.Name; - if Component.Owner <> nil then - S := Component.Owner.Name + '.' + S; - Caption := S; - end; -end; - -procedure TcxDesignFormEditor.InitFormEditor; -begin - UpdateCaption; -end; - -procedure TcxDesignFormEditor.SetComponent(AValue: TComponent); -begin - FComponent := AValue; -end; - -procedure TcxDesignFormEditor.SetComponentClassName(const AValue: string); -begin - FComponentClassName := AValue; -end; - -procedure TcxDesignFormEditor.UpdateContent; -begin -end; - -function TcxDesignFormEditor.CanAddComponent: Boolean; -begin - Result := cxDesignWindows.CanAddComponent(Component.Owner, Designer); -end; - -function TcxDesignFormEditor.CanDeleteComponent(AComponent: TComponent): Boolean; -begin - Result := cxDesignWindows.CanDeleteComponent(Component.Owner, AComponent, Designer); -end; - -procedure TcxDesignFormEditor.FormCreate(Sender: TObject); -begin - if Editors <> nil then - Editors.Add(Self); -end; - -procedure TcxDesignFormEditor.FormClose(Sender: TObject; - var Action: TCloseAction); -begin - // TODO: save pos - Action := caFree; -end; - -procedure TcxDesignFormEditor.FormDestroy(Sender: TObject); -begin - if Editors <> nil then - Editors.Remove(Self); -end; - -initialization - -finalization - FreeAndNil(Editors); - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxDrawTextUtils.pas b/internal/x.46/ExpressLibrary/Sources/cxDrawTextUtils.pas deleted file mode 100644 index 91454bf2..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxDrawTextUtils.pas +++ /dev/null @@ -1,1947 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDrawTextUtils; - -{$I cxVer.inc} - -interface - -uses - Windows, Controls, -{$IFDEF DELPHI6} - Types, -{$ELSE} - Classes, -{$ENDIF} - SysUtils, Graphics; - -const - CXTO_LEFT = $00000000; - CXTO_CENTER_HORIZONTALLY = $00000001; - CXTO_RIGHT = $00000002; - CXTO_JUSTIFY_HORIZONTALLY = $00000003; - CXTO_DISTRIBUTE_HORIZONTALLY = $00000004; - - CXTO_TOP = $00000000; - CXTO_CENTER_VERTICALLY = $00000010; - CXTO_BOTTOM = $00000020; - CXTO_DISTRIBUTE_VERTICALLY = $00000030; - - CXTO_WORDBREAK = $00000100; - CXTO_SINGLELINE = $00000200; - CXTO_EXPANDTABS = $00000400; - CXTO_END_ELLIPSIS = $00000800; - - CXTO_PATTERNEDTEXT = $00001000; - CXTO_EXTERNALLEADING = $00002000; - CXTO_EDITCONTROL = $00004000; - CXTO_NOCLIP = $00008000; - - CXTO_AUTOINDENTS = $00010000; - CXTO_CHARBREAK = $00020000; - CXTO_PREVENT_LEFT_EXCEED = $00040000; - CXTO_PREVENT_TOP_EXCEED = $00080000; - - CXTO_CALCRECT = $00100000; - CXTO_CALCROWCOUNT = $00200000; - - CXTO_NOPREFIX = $00000000; - CXTO_HIDEPREFIX = $01000000; - CXTO_EXCELSTYLE = $02000000; - - CXTO_DEFAULT_FORMAT = CXTO_LEFT or CXTO_TOP or CXTO_SINGLELINE; - - cxTextSpace = 2; - TcxCacheStaticRowsCount = 32; - cxMinVisuallyVisibleTextHeight = 6; - -type - TCaptionChar = Char; - TcxCaptionChar = TCaptionChar; - PcxCaptionChar = PChar; - TcxTextOutFormat = DWORD; - TcxTextAlignX = (taLeft, taCenterX, taRight, taJustifyX, taDistributeX); - TcxTextAlignY = (taTop, taCenterY, taBottom, taDistributeY); - TcxVerticalTextOutDirection = (vtdTopToBottom, vtdBottomToTop); - - PcxTextParams = ^TcxTextParams; - TcxTextParams = packed record - RowHeight: Integer; - tmExternalLeading: Integer; - FullRowHeight: Integer; - EndEllipsisWidth: Integer; - Bold: Boolean; - BreakChar: WideChar; - TextAlignX: TcxTextAlignX; - TextAlignY: TcxTextAlignY; - WordBreak: Boolean; - SingleLine: Boolean; - ExpandTabs: Boolean; - EndEllipsis: Boolean; - ExternalLeading: Boolean; - EditControl: Boolean; - ExcelStyle: Boolean; - NoClip: Boolean; - AutoIndents: Boolean; - PatternedText: Boolean; - PreventLeftExceed: Boolean; - PreventTopExceed: Boolean; - CharBreak: Boolean; - CalcRowCount: Boolean; - CalcRect: Boolean; - MaxCharWidth: Integer; - CharSet: Byte; - OnePixel: Integer; - HidePrefix: Boolean; - end; - - TcxTextRow = record - Text: PWideChar; - TextLength: Integer; - TextExtents: TSize; - BreakCount: Integer; - TextOriginX: Integer; - TextOriginY: Integer; - StartOffset: Integer; - end; - PcxTextRow = ^TcxTextRow; - - TCanvasHandle = HDC; - - TcxDynamicTextRows = array of TcxTextRow; - - TcxCalcTextExtentsProc = function (AHandle: TCanvasHandle; AText: PWideChar; - ATextLength: Integer; AExpandTabs: Boolean; AData: Pointer): TSize; - - TcxTextRows = record - Count: Integer; - Text: WideString; - StaticRows: array[0..TcxCacheStaticRowsCount - 1] of TcxTextRow; - DynamicRows: TcxDynamicTextRows; - end; - -function cxCalcTextParams(AHandle: TCanvasHandle; AFormat: DWORD; - const ALineSpacingFactor: Double = 1.0): TcxTextParams; overload; - -function cxCalcTextParams(ACanvas: TCanvas; AFormat: DWORD; - const ALineSpacingFactor: Double = 1.0): TcxTextParams; overload; - -function cxCalcTextExtents(AHandle: TCanvasHandle; AText: PWideChar; - ATextLength: Integer; AExpandTabs: Boolean): TSize; overload; - -function cxCalcTextExtents(AHandle: TCanvasHandle; AText: PAnsiChar; - ATextLength: Integer; AExpandTabs: Boolean): TSize; overload; - -function cxCalcTextExtentsEx(AHandle: TCanvasHandle; AText: PWideChar; - ATextLength: Integer; AExpandTabs: Boolean; AData: Pointer): TSize; overload; - -procedure cxCalcTextRowExtents(AHandle: TCanvasHandle; ATextRow: PcxTextRow; - const ATextParams: TcxTextParams); overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -procedure cxCalcTextRowExtents(AHandle: TCanvasHandle; ATextRow: PcxTextRow; - const ATextParams: TcxTextParams; AUserData: Pointer; - ACalcTextExtentsProc: TcxCalcTextExtentsProc); overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxGetLongestTextRowWidth(const ATextRows: TcxTextRows; ARowCount: Integer): Integer; - -procedure cxPlaceTextRows(AHandle: TCanvasHandle; const R: TRect; - var ATextParams: TcxTextParams; const ATextRows: TcxTextRows; ARowCount: Integer); - -procedure cxResetTextRows(var ATextRows: TcxTextRows); {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxGetTextRow(const ATextRows: TcxTextRows; AIndex: Integer): PcxTextRow; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxGetTextRowCount(const ATextRows: TcxTextRows): Integer; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxMakeFormat(ATextAlignX: TcxTextAlignX; ATextAlignY: TcxTextAlignY): DWORD; - -function cxPrepareRect(const R: TRect; const ATextParams: TcxTextParams; - ALeftIndent, ARightIndent: Integer): TRect; - -function cxGetIsWordDelimeter(ACodePage: DWORD; AChar: WideChar): Boolean; -function cxGetNextWordBreak(ACodePage: DWORD; AStart, AEnd: PWideChar): PWideChar; - -procedure cxTextRowsOutHighlight(AHandle: TCanvasHandle; const R: TRect; - const ATextParams: TcxTextParams; const ATextRows: TcxTextRows; ARowCount, - ASelStart, ASelLength: Integer; ASelBkgColor, ASelTextColor: TColor; AForceEndEllipsis: Boolean); - -//***************************** ANSI VERSION *********************************** -function cxMakeTextRows(AHandle: TCanvasHandle; - AText: PAnsiChar; ATextLength: Integer; - const R: TRect; const ATextParams: TcxTextParams; var ATextRows: TcxTextRows; - out ACount: Integer; AMaxLineCount: Integer; AUserData: Pointer; - ACalcTextExtentsProc: TcxCalcTextExtentsProc): Boolean; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxMakeTextRows(AHandle: TCanvasHandle; - AText: PAnsiChar; ATextLength: Integer; - const R: TRect; const ATextParams: TcxTextParams; var ATextRows: TcxTextRows; - out ACount: Integer; AMaxLineCount: Integer = 0): Boolean; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxMakeTextRows(ACanvas: TCanvas; - AText: PAnsiChar; ATextLength: Integer; - const R: TRect; const ATextParams: TcxTextParams; var ATextRows: TcxTextRows; - out ACount: Integer; AMaxLineCount: Integer = 0): Boolean; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxTextOut(AHandle: TCanvasHandle; const AText: AnsiString; var R: TRect; - AFormat: TcxTextOutFormat; ASelStart, ASelLength: Integer; AFont: TFont; - ASelBkgColor, ASelTextColor: TColor; AMaxLineCount: Integer = 0; - ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxTextOut(AHandle: TCanvasHandle; const AText: AnsiString; var R: TRect; - AFormat: TcxTextOutFormat = CXTO_DEFAULT_FORMAT; AFont: TFont = nil; - AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxTextOut(ACanvas: TCanvas; const AText: AnsiString; var R: TRect; - AFormat: TcxTextOutFormat; ASelStart, ASelLength: Integer; AFont: TFont; - ASelBkgColor, ASelTextColor: TColor; AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; - ARightIndent: Integer = 0; ATextColor: TColor = clDefault; - const ALineSpacingFactor: Double = 1.0): Integer; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxTextOut(ACanvas: TCanvas; const AText: AnsiString; var R: TRect; - AFormat: TcxTextOutFormat = CXTO_DEFAULT_FORMAT; AFont: TFont = nil; - AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -procedure cxRotatedTextOut(AHandle: TCanvasHandle; const ABounds: TRect; const AText: AnsiString; AFont: TFont; - AAlignHorz: TcxTextAlignX = taCenterX; AAlignVert: TcxTextAlignY = taCenterY; AWordBreak: Boolean = True; - ALeftExceed: Boolean = True; ARightExceed: Boolean = True; ADirection: TcxVerticalTextOutDirection = vtdBottomToTop; - AFontSize: Integer = 0); overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -//**************************** UNICODE VERSION ********************************* -function cxMakeTextRows(AHandle: TCanvasHandle; - AText: PWideChar; ATextLength: Integer; - const R: TRect; const ATextParams: TcxTextParams; var ATextRows: TcxTextRows; - out ACount: Integer; AMaxLineCount: Integer; AUserData: Pointer; - ACalcTextExtentsProc: TcxCalcTextExtentsProc): Boolean; overload; - -function cxMakeTextRows(AHandle: TCanvasHandle; - AText: PWideChar; ATextLength: Integer; - const R: TRect; const ATextParams: TcxTextParams; var ATextRows: TcxTextRows; - out ACount: Integer; AMaxLineCount: Integer = 0): Boolean; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxMakeTextRows(ACanvas: TCanvas; - AText: PWideChar; ATextLength: Integer; - const R: TRect; const ATextParams: TcxTextParams; var ATextRows: TcxTextRows; - out ACount: Integer; AMaxLineCount: Integer = 0): Boolean; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxTextOut(AHandle: TCanvasHandle; const AText: WideString; var R: TRect; - AFormat: TcxTextOutFormat; ASelStart, ASelLength: Integer; AFont: TFont; - ASelBkgColor, ASelTextColor: TColor; AMaxLineCount: Integer = 0; - ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; overload; - -function cxTextOut(AHandle: TCanvasHandle; const AText: WideString; var R: TRect; - AFormat: TcxTextOutFormat = CXTO_DEFAULT_FORMAT; AFont: TFont = nil; - AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxTextOut(ACanvas: TCanvas; const AText: WideString; var R: TRect; - AFormat: TcxTextOutFormat; ASelStart, ASelLength: Integer; AFont: TFont; - ASelBkgColor, ASelTextColor: TColor; AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; - ARightIndent: Integer = 0; ATextColor: TColor = clDefault; - const ALineSpacingFactor: Double = 1.0): Integer; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -function cxTextOut(ACanvas: TCanvas; const AText: WideString; var R: TRect; - AFormat: TcxTextOutFormat = CXTO_DEFAULT_FORMAT; AFont: TFont = nil; - AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; overload; {$IFDEF DELPHI9} inline; {$ENDIF} - -procedure cxRotatedTextOut(AHandle: TCanvasHandle; const ABounds: TRect; const AText: WideString; AFont: TFont; - AAlignHorz: TcxTextAlignX = taCenterX; AAlignVert: TcxTextAlignY = taCenterY; AWordBreak: Boolean = True; - ALeftExceed: Boolean = True; ARightExceed: Boolean = True; ADirection: TcxVerticalTextOutDirection = vtdBottomToTop; - AFontSize: Integer = 0); overload; - -implementation - -uses - Math, Classes, cxGeometry, dxCore, cxClasses, cxGraphics, cxControls; - -type - TCanvasAccess = class(TControlCanvas); - - TFullWidthUnicode = record - Start, Finish: WideChar; - end; - -const - CXTO_VERT_ALIGN_OFFSET = 4; - CXTO_HORZ_ALIGN_MASK = CXTO_CENTER_HORIZONTALLY or CXTO_RIGHT or CXTO_JUSTIFY_HORIZONTALLY or CXTO_DISTRIBUTE_HORIZONTALLY; - CXTO_VERT_ALIGN_MASK = CXTO_CENTER_VERTICALLY or CXTO_BOTTOM or CXTO_DISTRIBUTE_VERTICALLY; - - Tab = #9; - LF = #10; - CR = #13; - Space = #32; - - cxEndEllipsisChars: PWideChar = '...'; - cxEndEllipsisCharsLength = 3; - -type - TcxTextRowFormat = record - Align: TcxTextAlignX; - BreakByWords: Boolean; - BreakByChars: Boolean; - CalcRect: Boolean; - EditControl: Boolean; - EndEllipsis: Boolean; - ExpandTabs: Boolean; - ExcelStyle: Boolean; - SingleLine: Boolean; - Special: Boolean; - end; - -var - FillPatterns: array[Boolean] of HBRUSH; - -//work with cache -procedure cxResetTextRows(var ATextRows: TcxTextRows); -begin - ATextRows.Count := 0; - SetLength(ATextRows.DynamicRows, 0); - ATextRows.DynamicRows := nil; - //don't clear ATextRows.Text here -end; - -procedure ValidateTextRows(var ATextRows: TcxTextRows; ACount: Integer); -var - AIndex: Integer; -begin - AIndex := ACount - 1; - ATextRows.Count := ACount; - Dec(ACount, TcxCacheStaticRowsCount); - if ACount > Length(ATextRows.DynamicRows) then - SetLength(ATextRows.DynamicRows, ACount + 4); - if AIndex >= 0 then - FillChar(cxGetTextRow(ATextRows, AIndex)^, SizeOf(TcxTextRow), 0); -end; - -function cxGetTextRow(const ATextRows: TcxTextRows; AIndex: Integer): PcxTextRow; -begin - if AIndex < TcxCacheStaticRowsCount then - Result := @ATextRows.StaticRows[AIndex] - else - begin - Dec(AIndex, TcxCacheStaticRowsCount); - Result := @ATextRows.DynamicRows[AIndex]; - end; -end; - -function cxGetTextRowCount(const ATextRows: TcxTextRows): Integer; -begin - Result := ATextRows.Count; -end; - -function cxMakeFormat(ATextAlignX: TcxTextAlignX; ATextAlignY: TcxTextAlignY): DWORD; -begin - Result := Byte(ATextAlignX) or (Byte(ATextAlignY) shl CXTO_VERT_ALIGN_OFFSET); -end; - -//support Win9x & WinMe - -function cxWideCharLenToAnsiString(AText: PWideChar; ATextLength: Integer): AnsiString; -var - AAnsiTextLength: Integer; -begin - AAnsiTextLength := WideCharToMultiByte(CP_ACP, 0, AText, ATextLength, nil, 0, nil, nil); - SetLength(Result, AAnsiTextLength); - WideCharToMultiByte(CP_ACP, 0, AText, ATextLength, PAnsiChar(Result), AAnsiTextLength, nil, nil); -end; - -function cxGetTabbedTextExtentW(hDC: HDC; lpString: PWideChar; - nCount, nTabPositions: Integer; var lpnTabStopPositions): DWORD; -var - S: AnsiString; -begin - if IsWinNT then - Result := GetTabbedTextExtentW(hDC, lpString, nCount, nTabPositions, lpnTabStopPositions) - else - begin - S := cxWideCharLenToAnsiString(lpString, nCount); - Result := GetTabbedTextExtentA(hDC, PAnsiChar(S), Length(S), nTabPositions, lpnTabStopPositions); - end; -end; - -function cxGetTextExtentPoint32W(DC: HDC; Str: PWideChar; Count: Integer; var Size: TSize): BOOL; -var - S: AnsiString; -begin - if IsWinNT then - Result := GetTextExtentPoint32W(DC, Str, Count, Size) - else - begin - S := cxWideCharLenToAnsiString(Str, Count); - Result := GetTextExtentPoint32A(DC, PAnsiChar(S), Length(S), Size); - end; -end; - -function cxGetTextExtentExPoint(AHandle: TCanvasHandle; AText: PWideChar; - ATextLength, AWidth: Integer; ACharNumber, ADX: PInteger): Boolean; -var - S: AnsiString; - ASize: TSize; -begin - if IsWinNT then - Result := GetTextExtentExPointW(AHandle, AText, ATextLength, AWidth, ACharNumber, ADX, ASize) - else - begin - S := cxWideCharLenToAnsiString(AText, ATextLength); - Result := GetTextExtentExPointA(AHandle, PAnsiChar(S), Length(S), AWidth, ACharNumber, ADX, ASize); - end; -end; - -function cxDrawTextW(hDC: HDC; lpString: PWideChar; nCount: Integer; - var lpRect: TRect; uFormat: UINT): Integer; -var - S: AnsiString; -begin - if IsWinNT then - Result := DrawTextW(hDC, lpString, nCount, lpRect, uFormat) - else - begin - S := cxWideCharLenToAnsiString(lpString, nCount); - Result := DrawTextA(hDC, PAnsiChar(S), Length(S), lpRect, uFormat); - end; -end; - -function cxTabbedTextOutW(hDC: HDC; X, Y: Integer; lpString: PWideChar; - nCount, nTabPositions: Integer; var lpnTabStopPositions; nTabOrigin: Integer): Longint; -var - S: AnsiString; -begin - if IsWinNT then - Result := TabbedTextOutW(hDC, X, Y, lpString, nCount, nTabPositions, lpnTabStopPositions, nTabOrigin) - else - begin - S := cxWideCharLenToAnsiString(lpString, nCount); - Result := TabbedTextOutA(hDC, X, Y, PAnsiChar(S), Length(S), nTabPositions, lpnTabStopPositions, nTabOrigin); - end; -end; - -function cxTextOutW(DC: HDC; X, Y: Integer; Str: PWideChar; Count: Integer): BOOL; -var - S: AnsiString; -begin - if IsWinNT then - Result := TextOutW(DC, X, Y, Str, Count) - else - begin - S := cxWideCharLenToAnsiString(Str, Count); - Result := TextOutA(DC, X, Y, PAnsiChar(S), Length(S)); - end; -end; - -function cxExtTextOutW(DC: HDC; X, Y: Integer; Options: Longint; - Rect: PRect; Str: PWideChar; Count: Longint; Dx: PInteger): BOOL; -var - S: AnsiString; -begin - if IsWinNT then - Result := ExtTextOutW(DC, X, Y, Options, Rect, Str, Count, Dx) - else - begin - S := cxWideCharLenToAnsiString(Str, Count); - Result := ExtTextOutA(DC, X, Y, Options, Rect, PAnsiChar(S), Length(S), Dx); - end; -end; - -function cxCalcTextExtents(AHandle: TCanvasHandle; AText: PWideChar; - ATextLength: Integer; AExpandTabs: Boolean): TSize; -var - ATextExtent: DWORD; - R: TRect; -begin - if AExpandTabs then - begin - if ATextLength < 4096 then - begin - ATextExtent := cxGetTabbedTextExtentW(AHandle, AText, ATextLength, 0, Result); - Result.cx := LoWord(ATextExtent); - Result.cy := HiWord(ATextExtent); - end - else - begin - R := cxEmptyRect; - Result.cy := cxDrawTextW(AHandle, AText, ATextLength, R, - DT_SINGLELINE or DT_NOPREFIX or DT_CALCRECT or DT_EXPANDTABS); - Result.cx := R.Right - R.Left; - end; - end - else - cxGetTextExtentPoint32W(AHandle, AText, ATextLength, Result); -end; - -function cxCalcTextExtents(AHandle: TCanvasHandle; AText: PAnsiChar; - ATextLength: Integer; AExpandTabs: Boolean): TSize; -var - ATextExtent: DWORD; - R: TRect; -begin - if AExpandTabs then - begin - if ATextLength <= 4096 then - begin - ATextExtent := GetTabbedTextExtentA(AHandle, AText, ATextLength, 0, Result); - Result.cx := LoWord(ATextExtent); - Result.cy := HiWord(ATextExtent); - end - else - begin - R := cxEmptyRect; - Result.cy := DrawTextA(AHandle, AText, ATextLength, R, - DT_SINGLELINE or DT_NOPREFIX or DT_CALCRECT or DT_EXPANDTABS); - Result.cx := R.Right - R.Left; - end; - end - else - GetTextExtentPoint32A(AHandle, AText, ATextLength, Result); -end; - -function IntersectClipRect(AHandle: TCanvasHandle; const R: TRect): HRGN; -begin - Result := CreateRectRgn(0, 0, 0, 0); - if GetClipRgn(AHandle, Result) <> 1 then - begin - DeleteObject(Result); - Result := 0; - end; - with R do - Windows.IntersectClipRect(AHandle, Left, Top, Right, Bottom); -end; - -procedure RestoreClipRgn(AHandle: TCanvasHandle; var ARgn: HRGN); -begin - SelectClipRgn(AHandle, ARgn); - if ARgn <> 0 then - begin - DeleteObject(ARgn); - ARgn := 0 - end; -end; - -function cxCalcTextExtentsEx(AHandle: TCanvasHandle; AText: PWideChar; - ATextLength: Integer; AExpandTabs: Boolean; AData: Pointer): TSize; -begin - Result := cxCalcTextExtents(AHandle, AText, ATextLength, AExpandTabs); -end; - -procedure cxCalcTextRowExtents(AHandle: TCanvasHandle; ATextRow: PcxTextRow; - const ATextParams: TcxTextParams); -begin - cxCalcTextRowExtents(AHandle, ATextRow, ATextParams, nil, @cxCalcTextExtentsEx); -end; - -procedure cxCalcTextRowExtents(AHandle: TCanvasHandle; ATextRow: PcxTextRow; - const ATextParams: TcxTextParams; AUserData: Pointer; - ACalcTextExtentsProc: TcxCalcTextExtentsProc); overload; {$IFDEF DELPHI9} inline; {$ENDIF} -begin - with ATextRow^ do - TextExtents := ACalcTextExtentsProc(AHandle, Text, TextLength, - ATextParams.ExpandTabs, AUserData); -end; - -function cxCalcTextParams(AHandle: TCanvasHandle; AFormat: TcxTextOutFormat; - const ALineSpacingFactor: Double = 1.0): TcxTextParams; -var - ATextMetricW: TTextMetricW; - ATextMetricA: TTextMetricA; - R: TRect; -begin - FillChar(Result, SizeOf(Result), 0); - with Result do - begin - if GetTextMetricsW(AHandle, ATextMetricW) then - begin - Bold := ATextMetricW.tmWeight >= FW_BOLD; - BreakChar := ATextMetricW.tmBreakChar; - MaxCharWidth := ATextMetricW.tmMaxCharWidth; - RowHeight := ATextMetricW.tmHeight; - CharSet := ATextMetricW.tmCharSet; - if ExternalLeading then - tmExternalLeading := ATextMetricW.tmExternalLeading; - end - else - begin - GetTextMetricsA(AHandle, ATextMetricA); - Bold := ATextMetricA.tmWeight >= FW_BOLD; - BreakChar := WideChar(ATextMetricA.tmBreakChar); - MaxCharWidth := ATextMetricA.tmMaxCharWidth; - RowHeight := ATextMetricA.tmHeight; - CharSet := ATextMetricA.tmCharSet; - if ExternalLeading then - tmExternalLeading := ATextMetricA.tmExternalLeading; - end; - TextAlignX := TcxTextAlignX(AFormat and CXTO_HORZ_ALIGN_MASK); - TextAlignY := TcxTextAlignY(AFormat and CXTO_VERT_ALIGN_MASK shr CXTO_VERT_ALIGN_OFFSET); - AutoIndents := AFormat and CXTO_AUTOINDENTS <> 0; - CalcRect := AFormat and CXTO_CALCRECT <> 0; - CalcRowCount := AFormat and CXTO_CALCROWCOUNT <> 0; - CharBreak := (AFormat and CXTO_CHARBREAK <> 0) or SysLocale.FarEast; //SysLocale.FarEast ?? - EditControl := AFormat and CXTO_EDITCONTROL <> 0; - EndEllipsis := AFormat and CXTO_END_ELLIPSIS <> 0; - ExcelStyle := AFormat and CXTO_EXCELSTYLE <> 0; - ExpandTabs := AFormat and CXTO_EXPANDTABS <> 0; - ExternalLeading := AFormat and CXTO_EXTERNALLEADING <> 0; - NoClip := AFormat and CXTO_NOCLIP <> 0; - PatternedText := AFormat and CXTO_PATTERNEDTEXT <> 0; - PreventLeftExceed := AFormat and CXTO_PREVENT_LEFT_EXCEED <> 0; - PreventTopExceed := AFormat and CXTO_PREVENT_TOP_EXCEED <> 0; - SingleLine := AFormat and CXTO_SINGLELINE <> 0; - WordBreak := AFormat and CXTO_WORDBREAK <> 0; - HidePrefix := AFormat and CXTO_HIDEPREFIX <> 0; - R := Rect(0, 0, 1, 1); - DPtoLP(AHandle, R, 2); - OnePixel := R.Right - R.Left; - FullRowHeight := Round((RowHeight + tmExternalLeading) * ALineSpacingFactor); - - if PatternedText then - begin - R := Rect(0, 0, cxMinVisuallyVisibleTextHeight, cxMinVisuallyVisibleTextHeight); - DPtoLP(AHandle, R, 2); - PatternedText := RowHeight < R.Bottom - R.Top; - end; - - if EndEllipsis then - EndEllipsisWidth := cxCalcTextExtents(AHandle, cxEndEllipsisChars, cxEndEllipsisCharsLength, False).cX - else - EndEllipsisWidth := 0; - end; -end; - -function cxCalcTextParams(ACanvas: TCanvas; AFormat: DWORD; - const ALineSpacingFactor: Double = 1.0): TcxTextParams; -begin - TCanvasAccess(ACanvas).RequiredState([csHandleValid, csFontValid]); - Result := cxCalcTextParams(ACanvas.Handle, AFormat, ALineSpacingFactor); -end; - -function IsFarEastLineBreak(C: WideChar): Boolean; -const - ASCIILatin1EndBreak: array[0..150] of Byte = ( - 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 1); - GeneralPunctuationEndBreak: array[0..32] of Byte = ( - 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, - 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 1); - CJKSymbolEndBreak: array[0..29] of Byte = ( - 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1); - CNS11643SmallVariantsEndBreak: array[0..46] of Byte = ( - 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1); - FullWidthHalfWidthVariantsEndBreak: array[0..158] of Byte = ( - 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, - 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1); - -begin - case Ord(C) shr 8 of - $0000: - Result := (C >= #$0021) and (C <= #$00B7) and Boolean(ASCIILatin1EndBreak[Ord(C) - $0021]); - $0002: - Result := (C = #$02C7) or (C = #$02C9); - $0020: - Result := (C >= #$2013) and (C <= #$2033) and Boolean(GeneralPunctuationEndBreak[Ord(C) - $2013]); - $0021: - Result := C = #$2103; - $0022: - Result := C = #$2236; - $0025: - Result := C = #$2574; - $0030: - begin - if (C >= #$3001) and (C <= #$301E) then - Result := Boolean(CJKSymbolEndBreak[Ord(C) - $3001]) - else - Result := (C = #$309B) or (C = #$309C); - end; - $00FE: - Result := (C >= #$FE30) and (C <= #$FE5E) and Boolean(CNS11643SmallVariantsEndBreak[Ord(C) - $FE30]); - $00FF: - begin - if (C >= #$FF01) and (C <= #$FF9F) then - Result := Boolean(FullWidthHalfWidthVariantsEndBreak[Ord(C) - $FF01]) - else - Result := C >= #$FFE0; - end - else - Result := False; - end; -end; - -function IsFarEastFullWidthCharacter(ACodePage: DWORD; AChar: WideChar): Boolean; -const - NUM_FULLWIDTH_UNICODES = 4; - FullWidthUnicodes: array[0..NUM_FULLWIDTH_UNICODES - 1] of TFullWidthUnicode = ( - (Start: #$4E00; Finish: #$9FFF), // CJK_UNIFIED_IDOGRAPHS - (Start: #$3040; Finish: #$309F), // HIRAGANA - (Start: #$30A0; Finish: #$30FF), // KATAKANA - (Start: #$AC00; Finish: #$D7A3) // HANGUL - ); - -var - I: Integer; -begin - if AChar < #$0080 then - begin - Result := False; - Exit; - end; - for I := 0 to NUM_FULLWIDTH_UNICODES - 1 do - if (AChar >= FullWidthUnicodes[I].Start) and (AChar <= FullWidthUnicodes[I].Finish) then - begin - Result := True; - Exit; - end; - Result := WideCharToMultiByte(ACodePage, 0, @AChar, 1, nil, 0, nil, nil) > 1; -end; - -function cxGetIsWordDelimeter(ACodePage: DWORD; AChar: WideChar): Boolean; -begin - Result := (AChar = CR) or (AChar = LF) or (AChar = Tab) or (AChar = Space) or - IsFarEastFullWidthCharacter(ACodePage, AChar) or IsFarEastLineBreak(AChar); -end; - -function cxGetNextWordBreak(ACodePage: DWORD; AStart, AEnd: PWideChar): PWideChar; -var - ANonWhite: Integer; -begin - ANonWhite := 1; - while AStart < AEnd do - case AStart^ of - CR, LF: - Break; - Tab, Space: - begin - Result := AStart + ANonWhite; - Exit; - end; - else - begin - if IsFarEastFullWidthCharacter(ACodePage, AStart^) then - begin - if ANonWhite = 0 then - Result := AStart - else - if (AStart + 1 <> AEnd) and IsFarEastLineBreak((AStart + 1)^) then - Result := AStart + 1 + 1 - else - Result := AStart + 1; - Exit; - end; - Inc(AStart); - ANonWhite := 0; - end; - end; - Result := AStart; -end; - -function BreakAWord(AHandle: TCanvasHandle; AText: PWideChar; - ATextLength, AWidth: Integer; AExpandTabs: Boolean): PWideChar; -var - ALow, AHigh, ANew: Integer; -begin - ALow := 0; - AHigh := ATextLength; - while (AHigh - ALow) > 1 do - begin - ANew := ALow + (AHigh - ALow) div 2; - if cxCalcTextExtents(AHandle, AText, ANew, AExpandTabs).cx > AWidth then - AHigh := ANew - else - ALow := ANew; - end; - if (ALow = 0) and (ATextLength > 0) then - ALow := 1; - Result := AText + ALow; -end; - -function AdjustWhiteSpaces(ANextLine: PWideChar; var ACount: Integer; AAlign: TcxTextAlignX): PWideChar; -begin - case AAlign of - taLeft: - if (ANextLine^ = Space) or (ANextLine^ = Tab) then - Inc(ANextLine); - taRight: - if ((ANextLine - 1)^ = Space) or ((ANextLine - 1)^ = Tab) then - Dec(ACount); - taCenterX: - begin - if ((ANextLine - 1)^ = Space) or ((ANextLine - 1)^ = Tab) then - Dec(ACount); - if (ANextLine^ = Space) or (ANextLine^ = Tab) then - Inc(ANextLine); - end; - end; - Result := ANextLine; -end; - -function FastFindLineEnd(AText, AEnd: PWideChar): PWideChar; -begin - while AText < AEnd do - if (AText^ = CR) or (AText^ = LF) then - Break - else - Inc(AText); - Result := AText; -end; - -function GetLineBreak(AHandle: TCanvasHandle; ALineStart: PWideChar; - ACount, AMaxWidth: Integer; const ATextRowFormat: TcxTextRowFormat; - var ATextRow: PcxTextRow; ACalcTextExtentsProc: TcxCalcTextExtentsProc; - AUserData: Pointer): PWideChar; -var - AExtent, ANewExtent: Integer; - AText, AEnd, P, ALineEnd: PWideChar; - AAdjustWhiteSpaces: Boolean; -begin - AExtent := 0; - AAdjustWhiteSpaces := False; - AText := ALineStart; - AEnd := ALineStart + ACount; - P := AText; - ATextRow.Text := AText; - ALineEnd := AEnd; - while AText < AEnd do - begin - if not ATextRowFormat.CalcRect and ATextRowFormat.BreakByWords then - P := cxGetNextWordBreak(CP_ACP, AText, AEnd) - else - P := FastFindLineEnd(AText, AEnd); - ALineEnd := P; - ANewExtent := ACalcTextExtentsProc(AHandle, ALineStart, P - ALineStart, - ATextRowFormat.ExpandTabs, AUserData).cx; - if ATextRowFormat.BreakByWords and (ANewExtent > AMaxWidth) then - begin - // Are there more than one word in this line and not a special case? - if (AText <> ALineStart) and not ATextRowFormat.Special then - begin - ALineEnd := AText; - P := AText; - AAdjustWhiteSpaces := True; - end - else - begin - //One word is longer than the maximum width permissible. - //See if we are allowed to break that single word. - if ATextRowFormat.BreakByChars then - begin - P := BreakAWord(AHandle, AText, P - AText, AMaxWidth - AExtent, ATextRowFormat.ExpandTabs); - ALineEnd := P; - //Note: Since we broke in the middle of a word, no need to adjust for white spaces. - end - else - begin - AAdjustWhiteSpaces := True; - // Check if we need to end this line with ellipsis - if ATextRowFormat.EndEllipsis then - // If there are CR/LF at the end, skip them. - if P < AEnd then - begin - if P^ = CR then - begin - Inc(P); - if (P < AEnd) and (P^ = LF) then - Inc(P); - AAdjustWhiteSpaces := False; - end; - if P^ = LF then - begin - Inc(P); - if (P < AEnd) and (P^ = CR) then - Inc(P); - AAdjustWhiteSpaces := False; - end; - end; - end; - end; - Break; - end - else - // Don't do this if already at the end of the string. - if P < AEnd then - begin - if P^ = CR then - begin - Inc(P); - if (P < AEnd) and (P^ = LF) then - Inc(P); - AAdjustWhiteSpaces := False; - Break; - end; - if P^ = LF then - begin - Inc(P); - if (P < AEnd) and (P^ = CR) then - Inc(P); - AAdjustWhiteSpaces := False; - Break; - end; - end; - // Point at the beginning of the next word. - AText := P; - AExtent := ANewExtent; - end; - // Calculate the length of current line. - ATextRow.TextLength := ALineEnd - ALineStart; - // Adjust the line length and P to take care of spaces. - if AAdjustWhiteSpaces and (P < AEnd) then - begin - P := AdjustWhiteSpaces(P, ATextRow.TextLength, ATextRowFormat.Align); - if ATextRowFormat.ExcelStyle then - while (P < AEnd) and (P^ = Space) do - Inc(P); - end; - - if (ATextRowFormat.Align = taDistributeX) or - (AAdjustWhiteSpaces and (ATextRowFormat.Align = taJustifyX)) then - begin - AEnd := P - 1; - while (ATextRow.TextLength > 0) and ((AEnd^ = Space) or (AEnd^ = Tab)) do - begin - Dec(AEnd); - Dec(ATextRow.TextLength); - end; - - AText := ATextRow.Text; - while AText < AEnd do - begin - if (AText^ = Space) or (AText^ = Tab) then - Inc(ATextRow.BreakCount); - Inc(AText); - end; - end; - // return the begining of next line; - Result := P; -end; - -procedure MakeTextRowFormat(const ATextParams: TcxTextParams; out ATextRowFormat: TcxTextRowFormat); -begin - with ATextRowFormat do - begin - BreakByWords := not ATextParams.SingleLine and - (ATextParams.WordBreak or (ATextParams.TextAlignX in [taJustifyX, taDistributeX])); - CalcRect := ATextParams.CalcRect; - EditControl := ATextParams.EditControl; - EndEllipsis := ATextParams.EndEllipsis; - ExcelStyle := ATextParams.ExcelStyle; - ExpandTabs := ATextParams.ExpandTabs; - Align := ATextParams.TextAlignX; - SingleLine := ATextParams.SingleLine; - BreakByChars := BreakByWords and (ATextParams.CharBreak or EditControl); - end; -end; - -function cxMakeTextRows(AHandle: TCanvasHandle; AText: PWideChar; - ATextLength: Integer; const R: TRect; const ATextParams: TcxTextParams; - var ATextRows: TcxTextRows; out ACount: Integer; AMaxLineCount: Integer = 0): Boolean; overload; -begin - Result := cxMakeTextRows(AHandle, AText, ATextLength, R, ATextParams, - ATextRows, ACount, AMaxLineCount, nil, @cxCalcTextExtentsEx); -end; - -function cxMakeTextRows(AHandle: TCanvasHandle; AText: PWideChar; ATextLength: Integer; - const R: TRect; const ATextParams: TcxTextParams; var ATextRows: TcxTextRows; - out ACount: Integer; AMaxLineCount: Integer; AUserData: Pointer; - ACalcTextExtentsProc: TcxCalcTextExtentsProc): Boolean; overload; - - function CheckIsLastRow(ATotalHeight, H: Integer): Boolean; - begin - with ATextParams do - if SingleLine then - Result := True - else - if (TextAlignY = taTop) and not (CalcRect or CalcRowCount) then - begin - if EditControl and not NoClip then - Result := ATotalHeight + FullRowHeight > H - else - Result := ATotalHeight > H - end - else - Result := (AMaxLineCount > 0) and (ACount = AMaxLineCount); - end; - -var - P, ATextEnd, ANextLine: PWideChar; - ATextRow: PcxTextRow; - AIsLastRow, ARectIsSmall, APreSpecial, ACalculate: Boolean; - ATotalHeight, H, W, AOffset: Integer; - ATextRowFormat: TcxTextRowFormat; -begin - cxResetTextRows(ATextRows); - ARectIsSmall := False; - ACount := 0; - if ATextLength > 0 then - begin - if ATextParams.CalcRect and ATextParams.SingleLine then - begin - ACount := 1; - ValidateTextRows(ATextRows, ACount); - ATextRow := cxGetTextRow(ATextRows, 0); - ATextRow.Text := AText; - ATextRow.TextLength := ATextLength; - cxCalcTextRowExtents(AHandle, ATextRow, ATextParams, AUserData, ACalcTextExtentsProc); - end - else - begin - P := AText; - AOffset := 0; - ATotalHeight := 0; - W := R.Right - R.Left; - ACalculate := ATextParams.CalcRect or ATextParams.CalcRowCount; - H := R.Bottom - R.Top; - ATextEnd := AText + ATextLength; - AIsLastRow := False; - MakeTextRowFormat(ATextParams, ATextRowFormat); - APreSpecial := not ATextParams.NoClip and ATextParams.EndEllipsis and - not ACalculate and not (ATextParams.TextAlignX in [taJustifyX, taDistributeX]); - while (P < ATextEnd) and not AIsLastRow do - begin - Inc(ACount); - ValidateTextRows(ATextRows, ACount); - Inc(ATotalHeight, ATextParams.FullRowHeight); - AIsLastRow := CheckIsLastRow(ATotalHeight, H); - ATextRow := cxGetTextRow(ATextRows, ACount - 1); - ATextRowFormat.Special := AIsLastRow and APreSpecial; - ANextLine := GetLineBreak(AHandle, P, ATextLength, W, ATextRowFormat, - ATextRow, ACalcTextExtentsProc, AUserData); - Dec(ATextLength, ANextLine - P); - P := ANextLine; - ATextRow.StartOffset := AOffset; - cxCalcTextRowExtents(AHandle, ATextRow, ATextParams, AUserData, ACalcTextExtentsProc); - AOffset := P - AText; - if not AIsLastRow then - AIsLastRow := ATextLength = 0; - if (AMaxLineCount > 0) and (ACount = AMaxLineCount) then - Break; - end; - if not ACalculate and (ACount > 0) then - begin - if ATextRowFormat.SingleLine then - ARectIsSmall := ATextRow.TextExtents.cx > W - else - ARectIsSmall := ATextLength > 0; - end; - end; - end; - Result := not ARectIsSmall; -end; - -function cxMakeTextRows(ACanvas: TCanvas; - AText: PWideChar; ATextLength: Integer; - const R: TRect; const ATextParams: TcxTextParams; var ATextRows: TcxTextRows; - out ACount: Integer; AMaxLineCount: Integer = 0): Boolean; overload; -begin - Result := cxMakeTextRows(ACanvas.Handle, AText, ATextLength, R, ATextParams, - ATextRows, ACount, AMaxLineCount); -end; - -// ANSI to WideString convertors - -function AnsiStringToWideString(const S: AnsiString; - ACharSet: Byte): WideString; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -begin - Result := dxAnsiStringToWideString(S, dxGetCodePageFromCharset(ACharSet)); -end; - -function AnsiStringToWideString(const S: AnsiString; DC: TCanvasHandle; - AFont: TFont): WideString; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -var - ACharSet: Byte; -begin - if AFont <> nil then - ACharSet := AFont.Charset - else - ACharSet := GetTextCharset(DC); - Result := AnsiStringToWideString(S, ACharSet); -end; - -function cxMakeTextRows(AHandle: TCanvasHandle; AText: PAnsiChar; ATextLength: Integer; - const R: TRect; const ATextParams: TcxTextParams; var ATextRows: TcxTextRows; - out ACount: Integer; AMaxLineCount: Integer; AUserData: Pointer; - ACalcTextExtentsProc: TcxCalcTextExtentsProc): Boolean; overload; -begin - ATextRows.Text := AnsiStringToWideString(AText, ATextParams.CharSet); - Result := cxMakeTextRows(AHandle, PWideChar(ATextRows.Text), - Length(ATextRows.Text), R, ATextParams, ATextRows, ACount, - AMaxLineCount, AUserData, ACalcTextExtentsProc); -end; - -function cxMakeTextRows(ACanvas: TCanvas; AText: PAnsiChar; ATextLength: Integer; - const R: TRect; const ATextParams: TcxTextParams; var ATextRows: TcxTextRows; - out ACount: Integer; AMaxLineCount: Integer = 0): Boolean; overload; -begin - ATextRows.Text := AnsiStringToWideString(AText, ATextParams.CharSet); - Result := cxMakeTextRows(ACanvas.Handle, PWideChar(ATextRows.Text), - Length(ATextRows.Text), R, ATextParams, ATextRows, ACount, AMaxLineCount); -end; - -function cxMakeTextRows(AHandle: TCanvasHandle; AText: PAnsiChar; ATextLength: Integer; - const R: TRect; const ATextParams: TcxTextParams; var ATextRows: TcxTextRows; - out ACount: Integer; AMaxLineCount: Integer = 0): Boolean; overload; -begin - ATextRows.Text := AnsiStringToWideString(AText, ATextParams.CharSet); - Result := cxMakeTextRows(AHandle, PWideChar(ATextRows.Text), - Length(ATextRows.Text), R, ATextParams, ATextRows, ACount, AMaxLineCount); -end; - -procedure cxPlaceTextRows(AHandle: TCanvasHandle; const R: TRect; var ATextParams: TcxTextParams; - const ATextRows: TcxTextRows; ARowCount: Integer); - - procedure CalcExtraAndTopRowOffset(out AExtra, ATopRowOffset: Integer); - var - H: Integer; - begin - AExtra := 0; - with ATextParams do - begin - if (ARowCount > 1) and (TextAlignY = taDistributeY) then - begin - H := R.Bottom - R.Top; - Dec(H, RowHeight); - if H / (ARowCount - 1) > RowHeight then - begin - FullRowHeight := H div (ARowCount - 1); - AExtra := H mod (ARowCount - 1); - end; - end; - - case TextAlignY of - taCenterY: - ATopRowOffset := R.Top + (R.Bottom - R.Top - ARowCount * FullRowHeight) div 2; - taBottom: - ATopRowOffset := R.Bottom - ARowCount * FullRowHeight + tmExternalLeading; - else - ATopRowOffset := R.Top; - end; - - if PreventTopExceed and (ATopRowOffset < R.Top) then - ATopRowOffset := R.Top; - end; - end; - - procedure PlaceRows(AExtra, ATopRowOffset: Integer); - var - I: Integer; - begin - for I := 0 to ARowCount - 1 do - with cxGetTextRow(ATextRows, I)^ do - begin - // Horizontally - case ATextParams.TextAlignX of - taCenterX: - TextOriginX := R.Left + (R.Right - R.Left - TextExtents.cx) div 2; - taRight: - TextOriginX := R.Right - TextExtents.cx; - else - TextOriginX := R.Left; - end; - if ATextParams.PreventLeftExceed and (TextOriginX < R.Left) then - TextOriginX := R.Left; - - // Vertically - TextOriginY := ATopRowOffset; - Inc(ATopRowOffset, ATextParams.FullRowHeight); - if AExtra > 0 then - begin - Inc(ATopRowOffset); - Dec(AExtra); - end; - end; - end; - -var - Extra, TopRowOffset: Integer; -begin - CalcExtraAndTopRowOffset(Extra, TopRowOffset); - PlaceRows(Extra, TopRowOffset); -end; - -function cxPrepareRect(const R: TRect; const ATextParams: TcxTextParams; - ALeftIndent, ARightIndent: Integer): TRect; -begin - Result := R; - with Result, ATextParams do - begin - if AutoIndents then - InflateRect(Result, -cxTextSpace * OnePixel, -cxTextSpace * OnePixel); - Inc(Left, ALeftIndent * OnePixel); - Dec(Right, ARightIndent * OnePixel); - end; -end; - -function cxUnprepareRect(const R: TRect; const ATextParams: TcxTextParams; - ALeftIndent: Integer = 0; ARightIndent: Integer = 0): TRect; -begin - Result := R; - with Result, ATextParams do - begin - Dec(Left, ALeftIndent * OnePixel); - Inc(Right, ARightIndent * OnePixel); - if AutoIndents then - InflateRect(Result, cxTextSpace * OnePixel, cxTextSpace * OnePixel); - end; -end; - -function IsMetaFile(AHandle: TCanvasHandle): Boolean; -begin - Result := GetObjectType(AHandle) in [OBJ_METAFILE, OBJ_METADC, OBJ_ENHMETAFILE, OBJ_ENHMETADC]; -end; - -{$WARNINGS OFF} -procedure cxTextRowsOutHighlight(AHandle: TCanvasHandle; const R: TRect; - const ATextParams: TcxTextParams; const ATextRows: TcxTextRows; ARowCount, - ASelStart, ASelLength: Integer; ASelBkgColor, ASelTextColor: TColor; AForceEndEllipsis: Boolean); - - procedure OutTextRowAsPattern(ATextRow: PcxTextRow; R: TRect); - var - ABkColor: COLORREF; - begin - InflateRect(R, 0, -ATextParams.OnePixel); - with R do - begin - if Bottom <= Top then - Bottom := Top + ATextParams.OnePixel; - Left := ATextRow.TextOriginX; - if Right > Left + ATextRow.TextExtents.cX then - Right := Left + ATextRow.TextExtents.cX; - end; - - ABkColor := SetBkColor(AHandle, ColorToRGB(clWindow)); - FillRect(AHandle, R, FillPatterns[ATextParams.Bold]); - SetBkColor(AHandle, ABkColor); - end; - - procedure OutTextRow(ATextRow: PcxTextRow); - var - Stub: Integer; - begin - with ATextRow^ do - if ATextParams.ExpandTabs then - begin - Stub := 0; - cxTabbedTextOutW(AHandle, TextOriginX, TextOriginY, Text, TextLength, 0, Stub, TextOriginX); - end - else - cxTextOutW(AHandle, TextOriginX, TextOriginY, Text, TextLength); - end; - - procedure PrepareEndEllipsis(ATextRow: PcxTextRow; var AWidth: Integer); - var - ACharNumber: Integer; - begin - Dec(AWidth, ATextParams.EndEllipsisWidth); - if AWidth < 0 then AWidth := 0; - with ATextRow^ do - begin - if not cxGetTextExtentExPoint(AHandle, Text, TextLength, AWidth, @ACharNumber, nil) then - ACharNumber := 0; - if (ACharNumber = 0) and (ATextParams.TextAlignX = taLeft) then - ACharNumber := 1; - TextLength := ACharNumber; - end; - cxCalcTextRowExtents(AHandle, ATextRow, ATextParams); - end; - - procedure OutEndEllipsis( ATextRow: PcxTextRow; var ARowRect: TRect); - const - ClipTexts: array[Boolean] of UINT = (0, ETO_CLIPPED); - var - fuOptions: UINT; - begin - Inc(ARowRect.Left, ATextRow.TextExtents.cx); - if ARowRect.Left < ARowRect.Right then - begin - fuOptions := ClipTexts[not ATextParams.NoClip and (ARowRect.Left + ATextParams.EndEllipsisWidth > ARowRect.Right)]; - cxExtTextOutW(AHandle, ARowRect.Left, ATextRow.TextOriginY, fuOptions, - @ARowRect, cxEndEllipsisChars, cxEndEllipsisCharsLength, nil); - end; - end; - - function GetSubstringWidth(AText: PWideChar; ATextLength, ASubstringLength: Integer): Integer; - var - ACharExtents: array of Integer; - begin - if ASubstringLength = 0 then - Result := 0 - else - begin - SetLength(ACharExtents, ATextLength); - cxGetTextExtentExPoint(AHandle, AText, ATextLength, 0, nil, @ACharExtents[0]); - Result := ACharExtents[ASubstringLength - 1]; - end; - end; - -var - ARowRect, AHighlightRect: TRect; - W, I, F, L: Integer; - ABreakExtra: Integer; - APrevBkMode: Integer; - ASaveTextColor: TColor; - ANeedClip, ANeedEndEllipsis, AIsMetafile, AHasSelTextColor: Boolean; - ATextRow: PcxTextRow; - AHighlightStart, AHighlightEnd: Integer; - ARgn, ASaveClipRgn: HRGN; - ABrush: HBRUSH; -begin - ASelBkgColor := ColorToRGB(ASelBkgColor); - AHasSelTextColor := (ASelTextColor <> clNone) and (ASelTextColor <> clDefault); - if AHasSelTextColor then - ASelTextColor := ColorToRGB(ASelTextColor); - W := R.Right - R.Left; - APrevBkMode := SetBkMode(AHandle, Windows.TRANSPARENT); - if (ASelLength > 0) and (ASelBkgColor <> clNone) and (ASelBkgColor <> clDefault) then - ABrush := CreateSolidBrush(ASelBkgColor) - else - ABrush := 0; - AIsMetafile := IsMetaFile(AHandle); - - ARowRect := R; - for I := 0 to ARowCount - 1 do - begin - ATextRow := cxGetTextRow(ATextRows, I); - with ATextRow^ do - begin - if TextLength <> 0 then - begin - ARowRect.Top := TextOriginY; - ARowRect.Bottom := ARowRect.Top + ATextParams.FullRowHeight; - if AIsMetafile or RectVisible(AHandle, ARowRect) then - begin - if ATextParams.PatternedText then - OutTextRowAsPattern(ATextRow, ARowRect) - else - begin - ANeedEndEllipsis := ATextParams.EndEllipsis and (I = ARowCount - 1) and - ((TextExtents.cx > W) or AForceEndEllipsis); - ABreakExtra := 0; - if (ATextParams.TextAlignX in [taJustifyX, taDistributeX]) and not ANeedEndEllipsis then - begin - ABreakExtra := W - TextExtents.cX; - if (BreakCount <> 0) and (ABreakExtra > 0) then - SetTextJustification(AHandle, ABreakExtra, BreakCount); - end; - - ANeedClip := not ATextParams.NoClip and ((TextExtents.cX > W) or - (ARowRect.Top < R.Top) or (ARowRect.Bottom > R.Bottom)); - if ANeedClip then - begin - if ARowRect.Top < R.Top then ARowRect.Top := R.Top; - if ARowRect.Bottom > R.Bottom then ARowRect.Bottom := R.Bottom; - ARgn := IntersectClipRect(AHandle, ARowRect); - end; - - if ANeedEndEllipsis then - PrepareEndEllipsis(ATextRow, W); - - if (ASelLength > 0) and not AIsMetafile then - begin - if not ((ASelStart >= StartOffset + TextLength) or - (ASelStart + ASelLength <= StartOffset)) then - begin - F := Max(ASelStart, StartOffset); - L := Min(ASelStart + ASelLength, StartOffset + TextLength); - Dec(F, StartOffset); - Dec(L, StartOffset); - if L > F then - begin - AHighlightStart := GetSubstringWidth(Text, TextLength, F); - AHighlightEnd := GetSubstringWidth(Text, TextLength, L); - if cxGetWritingDirection(ATextParams.CharSet, Text) = coRightToLeft then - begin - AHighlightRect.Left := TextOriginX + TextExtents.cx - AHighlightEnd; - AHighlightRect.Right := TextOriginX + TextExtents.cx - AHighlightStart; - end - else - begin - AHighlightRect.Left := TextOriginX + AHighlightStart; - AHighlightRect.Right := TextOriginX + AHighlightEnd; - end; - AHighlightRect.Top := ARowRect.Top; - AHighlightRect.Bottom := ARowRect.Bottom; - if not IsRectEmpty(AHighlightRect) then - begin - ASaveClipRgn := IntersectClipRect(AHandle, AHighlightRect); - if ABrush <> 0 then - FillRect(AHandle, AHighlightRect, ABrush); - if AHasSelTextColor then - ASaveTextColor := SetTextColor(AHandle, ASelTextColor); - OutTextRow(ATextRow); - if AHasSelTextColor then - SetTextColor(AHandle, ASaveTextColor); - RestoreClipRgn(AHandle, ASaveClipRgn); - with AHighlightRect do - ExcludeClipRect(AHandle, Left, Top, Right, Bottom); - if ANeedEndEllipsis and (ASelStart + ASelLength >= StartOffset + TextLength) then - begin - ANeedEndEllipsis := False; - ASaveTextColor := SetTextColor(AHandle, ASelTextColor); - OutEndEllipsis(ATextRow, ARowRect); - SetTextColor(AHandle, ASaveTextColor); - end; - end; - end; - end - end; - OutTextRow(ATextRow); - - if ANeedEndEllipsis then - OutEndEllipsis(ATextRow, ARowRect); - - if ANeedClip then - RestoreClipRgn(AHandle, ARgn); - if ABreakExtra > 0 then - SetTextJustification(AHandle, 0, 0); - end; - end; - end - else - if AForceEndEllipsis and ATextParams.EndEllipsis and (I = ARowCount - 1) then - begin - ARowRect.Top := TextOriginY; - ARowRect.Bottom := ARowRect.Top + ATextParams.FullRowHeight; - PrepareEndEllipsis(ATextRow, W); - OutEndEllipsis(ATextRow, ARowRect); - end; - end; - end; - - if ABrush <> 0 then - DeleteObject(ABrush); - SetBkMode(AHandle, APrevBkMode); -end; -{$WARNINGS ON} - -function cxGetLongestTextRowWidth(const ATextRows: TcxTextRows; ARowCount: Integer): Integer; -var - I, W: Integer; -begin - if ARowCount > cxGetTextRowCount(ATextRows) then - ARowCount := cxGetTextRowCount(ATextRows); - Result := 0; - for I := 0 to ARowCount - 1 do - begin - W := cxGetTextRow(ATextRows, I).TextExtents.cx; - if W > Result then Result := W; - end; -end; - -function CanProcessText(const ATextParams: TcxTextParams; const ATextRect: TRect): Boolean; -begin - if ATextParams.CalcRect then - Result := (ATextRect.Right - ATextRect.Left) > 0 - else - Result := ((ATextRect.Right - ATextRect.Left) > 0) and ((ATextRect.Bottom - ATextRect.Top) > 0); -end; - -function cxTextOut(AHandle: TCanvasHandle; const AText: WideString; var R: TRect; - AFormat: TcxTextOutFormat; ASelStart, ASelLength: Integer; AFont: TFont; - ASelBkgColor, ASelTextColor: TColor; AMaxLineCount: Integer = 0; - ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; -var - APrevFont: HFONT; - APrevFontColor: COLORREF; - ATextHeight, ARowCount, ATextLength: Integer; - ATextParams: TcxTextParams; - ATextRect: TRect; - ATextRows: TcxTextRows; - AForceEndEllipsis: Boolean; - ATextPtr: PWideChar; - AHidePrefixStr: WideString; -begin - Result := 0; - ATextLength := Length(AText); - if ATextLength = 0 then Exit; - APrevFont := GetCurrentObject(AHandle, OBJ_FONT); - APrevFontColor := GetTextColor(AHandle); - if AFont <> nil then - begin - APrevFont := SelectObject(AHandle, AFont.Handle); - SetTextColor(AHandle, ColorToRGB(AFont.Color)); - end; - if ATextColor <> clDefault then - SetTextColor(AHandle, ColorToRGB(ATextColor)); - - ATextParams := cxCalcTextParams(AHandle, AFormat, ALineSpacingFactor); - ATextRect := cxPrepareRect(R, ATextParams, ALeftIndent, ARightIndent); - ATextHeight := 0; - - if CanProcessText(ATextParams, ATextRect) then - begin - if ATextParams.HidePrefix then - begin - AHidePrefixStr := RemoveAccelChars(AText, False); - ATextLength := Length(AHidePrefixStr); - if ATextLength = 0 then Exit; - ATextPtr := PWideChar(AHidePrefixStr); - end - else - ATextPtr := PWideChar(AText); - - AForceEndEllipsis := not cxMakeTextRows(AHandle, ATextPtr, ATextLength, - ATextRect, ATextParams, ATextRows, ARowCount, AMaxLineCount); - if ARowCount <> 0 then - try - if ATextParams.CalcRect then - begin - if (AMaxLineCount > 0) and (AMaxLineCount < ARowCount) then - ARowCount := AMaxLineCount; - ATextRect.Right := ATextRect.Left + cxGetLongestTextRowWidth(ATextRows, ARowCount); - if not ATextParams.SingleLine then - begin - cxResetTextRows(ATextRows); - cxMakeTextRows(AHandle, ATextPtr, ATextLength, ATextRect, ATextParams, - ATextRows, ARowCount, AMaxLineCount); - end; - cxPlaceTextRows(AHandle, ATextRect, ATextParams, ATextRows, ARowCount); - ATextRect.Bottom := cxGetTextRow(ATextRows, ARowCount - 1).TextOriginY + ATextParams.RowHeight; - R := cxUnprepareRect(ATextRect, ATextParams, ALeftIndent, ARightIndent); - end - else - begin - cxPlaceTextRows(AHandle, ATextRect, ATextParams, ATextRows, ARowCount); - if (ASelStart < 0) or (ASelStart >= ATextLength) then - ASelLength := 0 - else - if (ASelLength + ASelStart) > ATextLength then - ASelLength := ATextLength - ASelStart; - cxTextRowsOutHighlight(AHandle, ATextRect, ATextParams, ATextRows, - ARowCount, ASelStart, ASelLength, ASelBkgColor, ASelTextColor, AForceEndEllipsis); - end; - ATextHeight := cxGetTextRow(ATextRows, ARowCount - 1).TextOriginY + ATextParams.RowHeight - ATextRect.Top; - finally - cxResetTextRows(ATextRows); - end; - end; - if ATextParams.CalcRowCount or (ATextHeight = 0) then - Result := ARowCount - else - Result := ATextHeight; - - SelectObject(AHandle, APrevFont); - SetTextColor(AHandle, APrevFontColor); -end; - -function cxTextOut(AHandle: TCanvasHandle; const AText: WideString; var R: TRect; - AFormat: TcxTextOutFormat = CXTO_DEFAULT_FORMAT; AFont: TFont = nil; - AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; -begin - Result := cxTextOut(AHandle, AText, R, AFormat, 0, 0, AFont, clDefault, clDefault, - AMaxLineCount, ALeftIndent, ARightIndent, ATextColor, ALineSpacingFactor); -end; - -function cxTextOut(ACanvas: TCanvas; const AText: WideString; var R: TRect; - AFormat: TcxTextOutFormat; ASelStart, ASelLength: Integer; AFont: TFont; - ASelBkgColor, ASelTextColor: TColor; AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; - ARightIndent: Integer = 0; ATextColor: TColor = clDefault; - const ALineSpacingFactor: Double = 1.0): Integer; -begin - Result := cxTextOut(ACanvas.Handle, AText, R, AFormat, ASelStart, ASelLength, - AFont, ASelBkgColor, ASelTextColor, AMaxLineCount, ALeftIndent, ARightIndent, - ATextColor, ALineSpacingFactor); -end; - -function cxTextOut(ACanvas: TCanvas; const AText: WideString; var R: TRect; - AFormat: TcxTextOutFormat = CXTO_DEFAULT_FORMAT; AFont: TFont = nil; - AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; -begin - Result := cxTextOut(ACanvas, AText, R, AFormat, 0, 0, AFont, clDefault, - clDefault, AMaxLineCount, ALeftIndent, ARightIndent, ATextColor, ALineSpacingFactor); -end; - -//Support for AnsiStrings - -function cxTextOut(AHandle: TCanvasHandle; const AText: AnsiString; var R: TRect; - AFormat: TcxTextOutFormat; ASelStart, ASelLength: Integer; AFont: TFont; - ASelBkgColor, ASelTextColor: TColor; AMaxLineCount: Integer = 0; - ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; -begin - Result := cxTextOut(AHandle, - AnsiStringToWideString(AText, AHandle, AFont), - R, AFormat, ASelStart, ASelLength, AFont, ASelBkgColor, ASelTextColor, - AMaxLineCount, ALeftIndent, ARightIndent, ATextColor, ALineSpacingFactor); -end; - -function cxTextOut(AHandle: TCanvasHandle; const AText: AnsiString; var R: TRect; - AFormat: TcxTextOutFormat = CXTO_DEFAULT_FORMAT; AFont: TFont = nil; - AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; overload; -begin - Result := cxTextOut(AHandle, - AnsiStringToWideString(AText, AHandle, AFont), - R, AFormat, 0, 0, AFont, clDefault, clDefault, AMaxLineCount, ALeftIndent, - ARightIndent, ATextColor, ALineSpacingFactor); -end; - -function cxTextOut(ACanvas: TCanvas; const AText: AnsiString; var R: TRect; - AFormat: TcxTextOutFormat; ASelStart, ASelLength: Integer; AFont: TFont; - ASelBkgColor, ASelTextColor: TColor; AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; - ARightIndent: Integer = 0; ATextColor: TColor = clDefault; - const ALineSpacingFactor: Double = 1.0): Integer; overload; -begin - Result := cxTextOut(ACanvas.Handle, - AnsiStringToWideString(AText, ACanvas.Handle, AFont), - R, AFormat, ASelStart, ASelLength, AFont, ASelBkgColor, ASelTextColor, - AMaxLineCount, ALeftIndent, ARightIndent, ATextColor, ALineSpacingFactor); -end; - -function cxTextOut(ACanvas: TCanvas; const AText: AnsiString; var R: TRect; - AFormat: TcxTextOutFormat = CXTO_DEFAULT_FORMAT; AFont: TFont = nil; - AMaxLineCount: Integer = 0; ALeftIndent: Integer = 0; ARightIndent: Integer = 0; - ATextColor: TColor = clDefault; const ALineSpacingFactor: Double = 1.0): Integer; overload; -begin - Result := cxTextOut(ACanvas.Handle, - AnsiStringToWideString(AText, ACanvas.Handle, AFont), - R, AFormat, 0, 0, AFont, clDefault, clDefault, AMaxLineCount, ALeftIndent, - ARightIndent, ATextColor, ALineSpacingFactor); -end; - -procedure cxRotatedTextOut(AHandle: TCanvasHandle; const ABounds: TRect; const AText: WideString; AFont: TFont; - AAlignHorz: TcxTextAlignX = taCenterX; AAlignVert: TcxTextAlignY = taCenterY; AWordBreak: Boolean = True; - ALeftExceed: Boolean = True; ARightExceed: Boolean = True; ADirection: TcxVerticalTextOutDirection = vtdBottomToTop; - AFontSize: Integer = 0); - -const - Angles: array[TcxVerticalTextOutDirection] of Integer = (-900, 900); - Flags: array[TcxVerticalTextOutDirection] of Integer = - (TA_LEFT or TA_BOTTOM or TA_NOUPDATECP, TA_LEFT or TA_TOP or TA_NOUPDATECP); - - procedure AddRow(AList: TList; AFirstChar: PWideChar; ACount, AWidth: Integer); - begin - AList.Add(AFirstChar); - AList.Add(Pointer(ACount)); - AList.Add(Pointer(AWidth)); - end; - - function CreateRotatedFont: HFONT; - var - ALogFontW: TLogFontW; - ALogFontA: TLogFontA; - begin - if IsWinNT then - begin - FillChar(ALogFontW, SizeOf(ALogFontW), 0); - GetObject(AFont.Handle, SizeOf(TLogFontW), @ALogFontW); - if AFontSize <> 0 then - ALogFontW.lfHeight := -MulDiv(AFontSize, GetDeviceCaps(AHandle, LOGPIXELSY), 72); - ALogFontW.lfEscapement := Angles[ADirection]; - ALogFontW.lfOutPrecision := OUT_TT_ONLY_PRECIS; - Result := CreateFontIndirectW(ALogFontW); - end - else - begin - FillChar(ALogFontA, SizeOf(ALogFontA), 0); - GetObject(AFont.Handle, SizeOf(TLogFontA), @ALogFontA); - if AFontSize <> 0 then - ALogFontA.lfHeight := -MulDiv(AFontSize, GetDeviceCaps(AHandle, LOGPIXELSY), 72); - ALogFontA.lfEscapement := Angles[ADirection]; - ALogFontA.lfOutPrecision := OUT_TT_ONLY_PRECIS; - Result := CreateFontIndirectA(ALogFontA); - end; - end; - - function TextSize(ACurrentChar: PWideChar; ACharCount: Integer): TSize; - begin - cxGetTextExtentPoint32W(AHandle, ACurrentChar, ACharCount, Result); - end; - - function TextWidth(const AFirstChar: PWideChar; ACharCount: Integer): Integer; - var - ASize: TSize; - begin - cxGetTextExtentPoint32W(AHandle, AFirstChar, ACharCount, ASize); - Result := ASize.cx; - end; - - function MakeRow(var AFirstChar: PWideChar; ALastChar: PWideChar; - ACharCount, ARowCharCount: Integer; ATextRows: TList): Integer; - begin - // make break and move first point to current point - AddRow(ATextRows, AFirstChar, ARowCharCount, TextWidth(AFirstChar, ARowCharCount)); - if ALastChar^ = ' ' then - begin - Dec(ACharCount); - Inc(ALastChar); - end; - AFirstChar := ALastChar; - Result := ACharCount - ARowCharCount; - end; - - procedure CalculateWordWrappedTextRows(AFirstChar: PWideChar; - ACharCount, ATextWidth: Integer; ATextRows: TList); - var - ACurrentChar, APrevBreakChar: PWideChar; - AIsBreakChar, AHasPrevBreak: Boolean; - APos, APrevBreakPos, AWidth: Integer; - begin - while ACharCount > 0 do - begin - ACurrentChar := AFirstChar; - APos := 0; - AHasPrevBreak := False; - AWidth := 0; - APrevBreakPos := 0; - APrevBreakChar := ' '; - while APos < ACharCount do - begin - Inc(ACurrentChar); - Inc(APos); - AIsBreakChar := (ACurrentChar^ = Space) or (ACurrentChar^ = CR) or (ACurrentChar^ = LF); - if AIsBreakChar or (APos = ACharCount) then - begin - AWidth := TextWidth(AFirstChar, APos); - if AWidth < ATextWidth then - begin - AHasPrevBreak := AIsBreakChar; - APrevBreakPos := APos; - APrevBreakChar := ACurrentChar; - end; - end; - if (AIsBreakChar and ((AWidth > ATextWidth) or (ACurrentChar^ = CR) or (ACurrentChar^ = LF))) or (APos = ACharCount) then - begin - if AHasPrevBreak and (AWidth > ATextWidth) then - begin - APos := APrevBreakPos; - ACurrentChar := APrevBreakChar; - end; - ACharCount := MakeRow(AFirstChar, ACurrentChar, ACharCount, APos, ATextRows); - Break; - end; - end; - end; - end; - - function ProcessHorizontalAlignemnt(const ATextBounds: TRect; - AWidth: Integer): Integer; - var - ARightPos, ALeftPos: Integer; - begin - if ADirection = vtdBottomToTop then - begin - ARightPos := ATextBounds.Top + AWidth; - ALeftPos := ATextBounds.Bottom; - end - else - begin - ALeftPos := ATextBounds.Top; - ARightPos := ATextBounds.Bottom - AWidth; - end; - if AAlignHorz = taLeft then - Result := ALeftPos - else - if AAlignHorz = taRight then - Result := ARightPos - else - begin - if ADirection = vtdBottomToTop then - Result := (ATextBounds.Top + ATextBounds.Bottom + AWidth) div 2 - else - Result := (ATextBounds.Top + ATextBounds.Bottom - AWidth) div 2 - end; - if AWidth > (ATextBounds.Bottom - ATextBounds.Top) then - begin - if ARightExceed then - Result := ARightPos - else - if ALeftExceed then - Result := ALeftPos; - end; - end; - - function ProcessVerticalAlignemnt(const ATextBounds: TRect; - ARowHeight, ARowCount: Integer): Integer; - begin - if ADirection = vtdBottomToTop then - begin - // align by horizontally - if AAlignVert = taBottom then - begin - Result := ATextBounds.Right - ARowHeight * ARowCount; - if Result < ATextBounds.Left then - Result := ATextBounds.Left; - end - else - if AAlignVert = taCenterY then - Result := (ATextBounds.Left + ATextBounds.Right - ARowHeight * ARowCount) div 2 - else - Result := ATextBounds.Left; - if Result < ATextBounds.Left then - Result := ATextBounds.Left; - end - else - begin - if AAlignVert = taTop then - Result := ATextBounds.Right - ARowHeight - else - if AAlignVert = taCenterY then - Result := (ATextBounds.Left - ARowHeight + ATextBounds.Right + ARowHeight * (ARowCount - 1)) div 2 - else - Result := ATextBounds.Left + ARowHeight * (ARowCount - 1); - if Result > (ATextBounds.Right - ARowHeight) then - Result := ATextBounds.Right - ARowHeight; - end; - end; - - procedure PlaceTextRows(ATextRows: TList; ATextBounds: TRect); - var - ASize: TSize; - I, ALeft, ATop, ARowCount, AWidth: Integer; - begin - cxGetTextExtentPoint32W(AHandle, 'Wg', 2, ASize); - ARowCount := ATextRows.Count div 3; - ALeft := ProcessVerticalAlignemnt(ATextBounds, ASize.cy, ARowCount); - for I := 0 to ARowCount - 1 do - begin - // align by vertically - AWidth := Integer(ATextRows.List^[I * 3 + 2]); - ATop := ProcessHorizontalAlignemnt(ATextBounds, AWidth); - // out text row - cxExtTextOutW(AHandle, ALeft, ATop, 0{ETO_CLIPPED}, @ATextBounds, - PWideChar(ATextRows.List^[I * 3]), Integer(ATextRows.List^[I * 3 + 1]), nil); - // offset place and check visibility - if ADirection = vtdBottomToTop then - Inc(ALeft, ASize.cy) - else - Dec(ALeft, ASize.cy); - if (ALeft < ATextBounds.Left) or (ALeft > ATextBounds.Right) then - Break; - end; - end; - -var - ATextRows: TList; - AFontHandle: HFONT; - ATextBounds: TRect; - ACharCount, AMode, AWidth: Integer; -begin - ACharCount := Length(AText); - if ACharCount = 0 then Exit; - ATextBounds := ABounds; - InflateRect(ATextBounds, -2, -2); - AWidth := ATextBounds.Bottom - ATextBounds.Top; - AFontHandle := SelectObject(AHandle, CreateRotatedFont); - AMode := SetBkMode(AHandle, Windows.TRANSPARENT); - ATextRows := TList.Create; - try - ATextRows.Capacity := Length(AText) * 3; - SetTextAlign(AHandle, Flags[ADirection]); - if not AWordBreak then - AddRow(ATextRows, @AText[1], ACharCount, TextWidth(@AText[1], ACharCount)) - else - CalculateWordWrappedTextRows(@AText[1], ACharCount, AWidth, ATextRows); - PlaceTextRows(ATextRows, ATextBounds); - finally - SetBkMode(AHandle, AMode); - AFontHandle := SelectObject(AHandle, AFontHandle); - DeleteObject(AFontHandle); - ATextRows.Free; - end; -end; - -procedure cxRotatedTextOut(AHandle: TCanvasHandle; const ABounds: TRect; const AText: AnsiString; AFont: TFont; - AAlignHorz: TcxTextAlignX = taCenterX; AAlignVert: TcxTextAlignY = taCenterY; AWordBreak: Boolean = True; - ALeftExceed: Boolean = True; ARightExceed: Boolean = True; ADirection: TcxVerticalTextOutDirection = vtdBottomToTop; - AFontSize: Integer = 0); -begin - cxRotatedTextOut(AHandle, ABounds, - AnsiStringToWideString(AText, AHandle, AFont), - AFont, AAlignHorz, AAlignVert, AWordBreak, ALeftExceed, ARightExceed, - ADirection, AFontSize); -end; - -procedure CreateFillPatterns; -const - BoldPatternBits: array[0..7] of Word = ($0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000); - StandardPatternBits: array[0..7] of Word = ($5555, $AAAA, $5555, $AAAA, $5555, $AAAA, $5555, $AAAA); - - function CreateFillPattern(AIsBold: Boolean): HBRUSH; - var - ABits: Pointer ; - ABitmap: HBITMAP; - begin - if AIsBold then - ABits := @BoldPatternBits - else - ABits := @StandardPatternBits; - ABitmap := CreateBitmap(8, 8, 1, 1, ABits); - try - Result := CreatePatternBrush(ABitmap); - finally - DeleteObject(ABitmap); - end; - end; - -begin - FillPatterns[False] := CreateFillPattern(False); - FillPatterns[True] := CreateFillPattern(True); -end; - -procedure DestroyFillPatterns; -begin - if FillPatterns[False] <> 0 then DeleteObject(FillPatterns[False]); - if FillPatterns[True] <> 0 then DeleteObject(FillPatterns[True]); -end; - -initialization - CreateFillPatterns; - -finalization - DestroyFillPatterns; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxFormats.pas b/internal/x.46/ExpressLibrary/Sources/cxFormats.pas deleted file mode 100644 index c21e9cfc..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxFormats.pas +++ /dev/null @@ -1,1261 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxFormats; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, - Classes, cxDateUtils, cxClasses, dxCore; - -type - IcxFormatControllerListener = interface - ['{A7F2F6D3-1A7D-4295-A6E6-9297BD83D0DE}'] - procedure FormatChanged; - end; - - IcxFormatControllerListener2 = interface - ['{5E33A2A7-0C77-415F-A359-112103E54937}'] - procedure TimeChanged; - end; - - TcxDateTimeEditMaskKind = (dtmkDate, dtmkTime, dtmkDateTime); - - TcxDateTimeFormatItemKind = ( - dtikString, - dtikYear, // YY YYYY - dtikMonth, // M MM MMM MMMM - dtikDay, // D DD DDD DDDD - dtikHour, // 12H 12HH 24H 24HH - dtikMin, // N NN - dtikSec, // S SS - dtikMSec, // Z ZZ ZZZ - dtikTimeSuffix, // A/P AM/PM AMPM (lower, upper, or mixed case) - dtikDateSeparator, - dtikTimeSeparator - ); - - TcxTimeSuffixKind = (tskAP, tskAMPM, tskAMPMString); - - TcxDateTimeFormatItem = record - Kind: TcxDateTimeFormatItemKind; - Data: string; - end; - - TcxDateTimeFormatInfo = record - DefinedItems: array[TcxDateTimeFormatItemKind] of Boolean; - Items: array of TcxDateTimeFormatItem; - end; - - TcxDateTimeFormatItemInfo = record - Kind: TcxDateTimeFormatItemKind; - ItemZoneStart, ItemZoneLength: Integer; - TimeSuffixKind: TcxTimeSuffixKind; - end; - - { TcxFormatController } - - TcxFormatController = class(TcxIUnknownObject, IdxLocalizerListener) - private - FAssignedCurrencyFormat: Boolean; - FAssignedRegExprDateEditMask: Boolean; - FAssignedRegExprDateTimeEditMask: Boolean; - FAssignedStandardDateEditMask: Boolean; - FAssignedStandardDateTimeEditMask: Boolean; - FAssignedStartOfWeek: Boolean; - FCurrencyFormat: string; - FDateEditFormat: string; - FDateEditMask: string; - FDateFormatInfo: TcxDateTimeFormatInfo; - FDateTimeFormatInfo: TcxDateTimeFormatInfo; - FFirstWeekOfYear: TcxFirstWeekOfYear; - FList: TList; - FLockCount: Integer; - FMaskedDateEditFormat: string; - FMaskedDateTimeEditFormat: string; - FRegExprDateEditMask: string; - FRegExprDateTimeEditMask: string; - FStandardDateEditMask: string; - FStandardDateTimeEditMask: string; - FStartOfWeek: TDayOfWeek; - FTimeFormatInfo: TcxDateTimeFormatInfo; - FUseDelphiDateTimeFormats: Boolean; - procedure CalculateDateEditMasks(AUseSmartInputWhenRegExpr: Boolean); - function GetCurrencyFormat: string; - function GetDateEditFormat(AIsMasked: Boolean): string; - function GetDateTimeDisplayFormat(AMaskKind: TcxDateTimeEditMaskKind): string; - class function GetDateTimeFormatItemStandardMaskZoneLength( - const AItem: TcxDateTimeFormatItem): Integer; - function GetStartOfWeek: TDayOfWeek; - function InternalGetDateTimeEditRegExprMask( - AFormatInfo: TcxDateTimeFormatInfo; - AMaskKind: TcxDateTimeEditMaskKind): string; - function InternalGetDateTimeEditStandardMask( - AFormatInfo: TcxDateTimeFormatInfo; - AMaskKind: TcxDateTimeEditMaskKind): string; - function InternalGetMaskedDateEditFormat( - AFormatInfo: TcxDateTimeFormatInfo): string; - procedure SetAssignedCurrencyFormat(Value: Boolean); - procedure SetAssignedRegExprDateEditMask(Value: Boolean); - procedure SetAssignedRegExprDateTimeEditMask(Value: Boolean); - procedure SetAssignedStandardDateEditMask(Value: Boolean); - procedure SetAssignedStandardDateTimeEditMask(Value: Boolean); - procedure SetAssignedStartOfWeek(Value: Boolean); - procedure SetCurrencyFormat(const Value: string); - procedure SetFirstWeekOfYear(Value: TcxFirstWeekOfYear); - procedure SetRegExprDateEditMask(const Value: string); - procedure SetRegExprDateTimeEditMask(const Value: string); - procedure SetStandardDateEditMask(const Value: string); - procedure SetStandardDateTimeEditMask(const Value: string); - procedure SetStartOfWeek(Value: TDayOfWeek); - procedure SetUseDelphiDateTimeFormats(Value: Boolean); - protected - FWindow: HWND; - procedure MainWndProc(var Message: TMessage); - procedure WndProc(var Message: TMessage); virtual; - procedure FormatChanged; - procedure TimeChanged; - public - constructor Create; - destructor Destroy; override; - procedure AddListener(AListener: IcxFormatControllerListener); virtual; - procedure BeginUpdate; - procedure EndUpdate; - procedure GetFormats; - class function GetDateTimeFormatItemStandardMaskInfo( - const AFormatInfo: TcxDateTimeFormatInfo; APos: Integer; - out AItemInfo: TcxDateTimeFormatItemInfo): Boolean; - function GetDateTimeStandardMaskStringLength( - const AFormatInfo: TcxDateTimeFormatInfo): Integer; - procedure NotifyListeners; - procedure RemoveListener(AListener: IcxFormatControllerListener); virtual; - - // IdxLocalizerListener - procedure TranslationChanged; - - property AssignedCurrencyFormat: Boolean read FAssignedCurrencyFormat write SetAssignedCurrencyFormat; - property AssignedRegExprDateEditMask: Boolean read FAssignedRegExprDateEditMask write SetAssignedRegExprDateEditMask; - property AssignedRegExprDateTimeEditMask: Boolean read FAssignedRegExprDateTimeEditMask write SetAssignedRegExprDateTimeEditMask; - property AssignedStandardDateEditMask: Boolean read FAssignedStandardDateEditMask write SetAssignedStandardDateEditMask; - property AssignedStandardDateTimeEditMask: Boolean read FAssignedStandardDateTimeEditMask write SetAssignedStandardDateTimeEditMask; - property AssignedStartOfWeek: Boolean read FAssignedStartOfWeek write SetAssignedStartOfWeek; - property CurrencyFormat: string read FCurrencyFormat write SetCurrencyFormat; - property DateEditFormat: string read FDateEditFormat; - property DateEditMask: string read FDateEditMask; - property DateFormatInfo: TcxDateTimeFormatInfo read FDateFormatInfo; - property DateTimeFormatInfo: TcxDateTimeFormatInfo read FDateTimeFormatInfo; - property FirstWeekOfYear: TcxFirstWeekOfYear read FFirstWeekOfYear write SetFirstWeekOfYear; - property MaskedDateEditFormat: string read FMaskedDateEditFormat; - property MaskedDateTimeEditFormat: string read FMaskedDateTimeEditFormat; - property RegExprDateEditMask: string read FRegExprDateEditMask write SetRegExprDateEditMask; - property RegExprDateTimeEditMask: string read FRegExprDateTimeEditMask write SetRegExprDateTimeEditMask; - property StandardDateEditMask: string read FStandardDateEditMask write SetStandardDateEditMask; - property StandardDateTimeEditMask: string read FStandardDateTimeEditMask write SetStandardDateTimeEditMask; - property StartOfWeek: TDayOfWeek read FStartOfWeek write SetStartOfWeek; - property TimeFormatInfo: TcxDateTimeFormatInfo read FTimeFormatInfo; - property UseDelphiDateTimeFormats: Boolean read FUseDelphiDateTimeFormats write SetUseDelphiDateTimeFormats; - end; - -function cxFormatController: TcxFormatController; -function GetCharString(C: Char; ACount: Integer): string; - -implementation - -uses - SysUtils, Forms; - -var - FcxFormatController: TcxFormatController; - -function GetCharString(C: Char; ACount: Integer): string; -var - I: Integer; -begin - Result := ''; - for I := 1 to ACount do - Result := Result + C; -end; - -function CharLength(const S: string; Index: Integer): Integer; -begin - Result := 1; - assert((Index > 0) and (Index <= Length(S))); - if SysLocale.FarEast and dxCharInSet(S[Index], LeadBytes) then - Result := cxStrCharLength(S, Index); -end; - -procedure GetDateTimeFormatInfo(const AFormat: string; - var AFormatInfo: TcxDateTimeFormatInfo); -var - A12HourFormat: Boolean; - - procedure AddFormatItem(AItemKind: TcxDateTimeFormatItemKind; - const AItemData: string); - begin - if not(AItemKind in [dtikString, dtikDateSeparator, dtikTimeSeparator]) and - AFormatInfo.DefinedItems[AItemKind] then - Exit; - AFormatInfo.DefinedItems[AItemKind] := True; - SetLength(AFormatInfo.Items, Length(AFormatInfo.Items) + 1); - with AFormatInfo.Items[Length(AFormatInfo.Items) - 1] do - begin - Kind := AItemKind; - Data := AItemData; - end; - end; - - procedure AppendChars(const S: string; AStartIndex, ACount: Integer); - begin - if (Length(AFormatInfo.Items) = 0) or - (AFormatInfo.Items[Length(AFormatInfo.Items) - 1].Kind <> dtikString) then - AddFormatItem(dtikString, ''); - with AFormatInfo.Items[Length(AFormatInfo.Items) - 1] do - Data := Data + Copy(S, AStartIndex, ACount); - end; - - function GetCount(const AFormat: string; var AStartIndex: Integer; - AStartSymbol: Char): Integer; - begin - Result := 1; - while (AStartIndex <= Length(AFormat)) and (AFormat[AStartIndex] = AStartSymbol) do - begin - Inc(AStartIndex); - Inc(Result); - end; - end; - - function ParseFormat(const AFormat: string; ARecursionDepth: Integer): Boolean; - var - ACount, APrevI, I: Integer; - AFormatItemData: string; - ALastToken, AStartSymbol, AToken: Char; - AThereIsHourItem, AThereIsTimeSuffixItem: Boolean; - begin - Result := True; - if (AFormat = '') or (ARecursionDepth = 2) then - Exit; - Inc(ARecursionDepth); - ALastToken := ' '; - AThereIsHourItem := False; - AThereIsTimeSuffixItem := False; - I := 1; - while I <= Length(AFormat) do - begin - AStartSymbol := AFormat[I]; - if dxCharInSet(AStartSymbol, LeadBytes) then - begin - AppendChars(AFormat, I, CharLength(AFormat, I)); - Inc(I, CharLength(AFormat, I)); - ALastToken := ' '; - Continue; - end; - Inc(I, CharLength(AFormat, I)); - AToken := AStartSymbol; - if dxCharInSet(AToken, ['a'..'z']) then - Dec(AToken, 32); - if dxCharInSet(AToken, ['A'..'Z']) then - begin - if (AToken = 'M') and (ALastToken = 'H') then - AToken := 'N'; - ALastToken := AToken; - end; - case AToken of - 'E', 'Y': - begin - ACount := GetCount(AFormat, I, AStartSymbol); - if ACount <= 2 then - AFormatItemData := 'YY' - else - AFormatItemData := 'YYYY'; - AddFormatItem(dtikYear, AFormatItemData); - end; - 'G': - begin - Result := False; - Break; - end; - 'M': - begin - ACount := GetCount(AFormat, I, AStartSymbol); - if ACount > 4 then - ACount := 4; - AddFormatItem(dtikMonth, GetCharString('M', ACount)); - end; - 'D': - begin - ACount := GetCount(AFormat, I, AStartSymbol); - case ACount of - 1..4: - AddFormatItem(dtikDay, GetCharString('D', ACount)); - 5: - Result := ParseFormat(ShortDateFormat, ARecursionDepth); - else - Result := ParseFormat(LongDateFormat, ARecursionDepth); - end; - if not Result then - Break; - end; - 'H': - begin - ACount := GetCount(AFormat, I, AStartSymbol); - if ACount > 2 then - ACount := 2; - AddFormatItem(dtikHour, GetCharString('H', ACount)); - AThereIsHourItem := True; - end; - 'N': - begin - ACount := GetCount(AFormat, I, AStartSymbol); - if ACount > 2 then - ACount := 2; - AddFormatItem(dtikMin, GetCharString('N', ACount)); - end; - 'S': - begin - ACount := GetCount(AFormat, I, AStartSymbol); - if ACount > 2 then - ACount := 2; - AddFormatItem(dtikSec, GetCharString('S', ACount)); - end; - 'T': - begin - ACount := GetCount(AFormat, I, AStartSymbol); - if ACount = 1 then - Result := ParseFormat(ShortTimeFormat, ARecursionDepth) - else - Result := ParseFormat(LongTimeFormat, ARecursionDepth); - if not Result then - Break; - end; - 'Z': - begin - ACount := GetCount(AFormat, I, AStartSymbol); - if ACount > 3 then - ACount := 3; - AddFormatItem(dtikMSec, GetCharString('Z', ACount)); - end; - 'A': - begin - if SameText(Copy(AFormat, I - 1, 5), 'AM/PM') then - begin - AddFormatItem(dtikTimeSuffix, Copy(AFormat, I - 1, 5)); - Inc(I, 4); - AThereIsTimeSuffixItem := True; - end - else if SameText(Copy(AFormat, I - 1, 3), 'A/P') then - begin - AddFormatItem(dtikTimeSuffix, Copy(AFormat, I - 1, 3)); - Inc(I, 2); - AThereIsTimeSuffixItem := True; - end - else if SameText(Copy(AFormat, I - 1, 4), 'AMPM') then - begin - AddFormatItem(dtikTimeSuffix, 'AMPM'); - Inc(I, 3); - AThereIsTimeSuffixItem := True; - end - else if SameText(Copy(AFormat, I - 1, 3), 'AAA') then - begin - if SameText(Copy(AFormat, I - 1, 4), 'AAAA') then - ACount := 4 - else - ACount := 3; - AddFormatItem(dtikDay, GetCharString('D', ACount)); - Inc(I, ACount - 1); - end - else - AppendChars(AStartSymbol, 1, 1); - end; - 'C': - begin - GetCount(AFormat, I, AStartSymbol); - Result := ParseFormat(ShortDateFormat, ARecursionDepth); - if not Result then - Break; - AppendChars(' ', 1, 1); - Result := ParseFormat(LongTimeFormat, ARecursionDepth); - if not Result then - Break; - end; - '/': - AddFormatItem(dtikDateSeparator, ''); - ':': - AddFormatItem(dtikTimeSeparator, ''); - '''', '"': - begin - APrevI := I; - while (I <= Length(AFormat)) and (AFormat[I] <> AStartSymbol) do - if dxCharInSet(AFormat[I], LeadBytes) then - Inc(I, CharLength(AFormat, I)) - else - Inc(I); - AppendChars(AFormat, APrevI, I - APrevI); - if I <= Length(AFormat) then - Inc(I); - end; - else - AppendChars(AStartSymbol, 1, 1); - end; - end; - if AThereIsHourItem then - A12HourFormat := AThereIsTimeSuffixItem; - end; - - procedure ClearFormatInfo; - var - AFormatItemKind: TcxDateTimeFormatItemKind; - begin - SetLength(AFormatInfo.Items, 0); - for AFormatItemKind := Low(TcxDateTimeFormatItemKind) to High(TcxDateTimeFormatItemKind) do - AFormatInfo.DefinedItems[AFormatItemKind] := False; - end; - - procedure ProcessHourItem; - var - I: Integer; - begin - if AFormatInfo.DefinedItems[dtikHour] then - begin - for I := 0 to Length(AFormatInfo.Items) - 1 do - if AFormatInfo.Items[I].Kind = dtikHour then - with AFormatInfo.Items[I] do - begin - if A12HourFormat then - Data := '12' + Data - else - Data := '24' + Data; - Break; - end; - end - else - if AFormatInfo.DefinedItems[dtikTimeSuffix] then - for I := 0 to Length(AFormatInfo.Items) - 1 do - if AFormatInfo.Items[I].Kind = dtikTimeSuffix then - begin - AFormatInfo.DefinedItems[dtikTimeSuffix] := False; - if I < Length(AFormatInfo.Items) - 1 then - Move(AFormatInfo.Items[I + 1], AFormatInfo.Items[I], - SizeOf(TcxDateTimeFormatItem) * Length(AFormatInfo.Items) - 1 - I); - Break; - end; - end; - -var - ARes: Boolean; -begin - ClearFormatInfo; - if AFormat <> '' then - ARes := ParseFormat(AFormat, 0) - else - ARes := ParseFormat('C', 0); - if not ARes then - ClearFormatInfo - else - ProcessHourItem; -end; - -{ TcxFormatController } - -constructor TcxFormatController.Create; -begin - inherited Create; - FList := TList.Create; - FFirstWeekOfYear := fwySystem; - FUseDelphiDateTimeFormats := False; - GetFormats; - dxResourceStringsRepository.AddListener(Self); -end; - -destructor TcxFormatController.Destroy; -begin - dxResourceStringsRepository.RemoveListener(Self); - FList.Free; - if FWindow <> 0 then - {$IFDEF DELPHI6} - Classes.DeallocateHWnd(FWindow); - {$ELSE} - Forms.DeallocateHWnd(FWindow); - {$ENDIF} - inherited Destroy; -end; - -procedure TcxFormatController.CalculateDateEditMasks( - AUseSmartInputWhenRegExpr: Boolean); -begin - GetDateTimeFormatInfo(GetDateTimeDisplayFormat(dtmkDate), FDateFormatInfo); - GetDateTimeFormatInfo(GetDateTimeDisplayFormat(dtmkTime), FTimeFormatInfo); - GetDateTimeFormatInfo(GetDateTimeDisplayFormat(dtmkDateTime), - FDateTimeFormatInfo); - - FDateEditMask := InternalGetDateTimeEditStandardMask(FDateFormatInfo, - dtmkDate); - if not FAssignedStandardDateEditMask then - FStandardDateEditMask := FDateEditMask; - - if not FAssignedRegExprDateEditMask then - begin - FRegExprDateEditMask := InternalGetDateTimeEditRegExprMask(FDateFormatInfo, dtmkDate); - if AUseSmartInputWhenRegExpr then - AddDateRegExprMaskSmartInput(FRegExprDateEditMask, False); - end; - - if not FAssignedRegExprDateTimeEditMask then - begin - FRegExprDateTimeEditMask := InternalGetDateTimeEditRegExprMask( - FDateFormatInfo, dtmkDate); - FRegExprDateTimeEditMask := FRegExprDateTimeEditMask + ' '' ''(' + - InternalGetDateTimeEditRegExprMask(FTimeFormatInfo, dtmkTime) + ')?'; - if AUseSmartInputWhenRegExpr then - AddDateRegExprMaskSmartInput(FRegExprDateTimeEditMask, True); - end; - - if not FAssignedStandardDateTimeEditMask then - FStandardDateTimeEditMask := InternalGetDateTimeEditStandardMask( - FDateTimeFormatInfo, dtmkDateTime); - - FMaskedDateEditFormat := InternalGetMaskedDateEditFormat(FDateFormatInfo); - FMaskedDateTimeEditFormat := InternalGetMaskedDateEditFormat(FDateTimeFormatInfo); -end; - -function TcxFormatController.GetCurrencyFormat: string; - - function GetPositiveCurrencyFormat(const AFormat, ACurrStr: string): string; - begin - case Sysutils.CurrencyFormat of - 0: Result := ACurrStr + AFormat; { '$1' } - 1: Result := AFormat + ACurrStr; { '1$' } - 2: Result := ACurrStr + ' ' + AFormat; { '$ 1' } - 3: Result := AFormat + ' ' + ACurrStr; { '1 $' } - end; - end; - - function GetNegativeCurrencyFormat(const AFormat, ACurrStr: string): string; - begin - case Sysutils.NegCurrFormat of - 0: Result := '(' + ACurrStr + AFormat + ')'; - 1: Result := '-' + ACurrStr + AFormat; - 2: Result := ACurrStr + '-' + AFormat; - 3: Result := ACurrStr + AFormat + '-'; - 4: Result := '(' + AFormat + ACurrStr + ')'; - 5: Result := '-' + AFormat + ACurrStr; - 6: Result := AFormat + '-' + ACurrStr; - 7: Result := AFormat + ACurrStr + '-'; - 8: Result := '-' + AFormat + ' ' + ACurrStr; - 9: Result := '-' + ACurrStr + ' ' + AFormat; - 10: Result := AFormat + ' ' + ACurrStr + '-'; - 11: Result := ACurrStr + ' ' + AFormat + '-'; - 12: Result := ACurrStr + ' ' + '-' + AFormat; - 13: Result := AFormat + '-' + ' ' + ACurrStr; - 14: Result := '(' + ACurrStr + ' ' + AFormat + ')'; - 15: Result := '(' + AFormat + ' ' + ACurrStr + ')'; - end; - end; - -var - ACurrStr: string; - I: Integer; - C: Char; -begin - if CurrencyDecimals > 0 then - Result := GetCharString('0', CurrencyDecimals) - else - Result := ''; - Result := ',0.' + Result; - ACurrStr := ''; - for I := 1 to Length(CurrencyString) do - begin - C := CurrencyString[I]; - if (C = ',') or (C = '.') then - ACurrStr := ACurrStr + '''' + C + '''' - else - ACurrStr := ACurrStr + C; - end; - Result := GetPositiveCurrencyFormat(Result, ACurrStr) + ';' + - GetNegativeCurrencyFormat(Result, ACurrStr); -end; - -function TcxFormatController.GetDateEditFormat(AIsMasked: Boolean): string; - - procedure CorrectForMaskEdit(var S: string); - var - APos, AStartPos: Integer; - begin - APos := Pos('M', S); - if APos <> 0 then - begin - AStartPos := APos; - while APos <= Length(S) do - if S[APos] = 'M' then - Inc(APos) - else - Break; - if APos - AStartPos > 3 then - Delete(S, AStartPos + 3, APos - AStartPos - 3); - end; - end; - -var - Format: string; - I: Integer; - ExistFirst: Boolean; -begin - Format := ShortDateFormat; - Result := ''; - for I := 1 to Length(Format) do - begin - if (Format[I] = 'd') then - begin - ExistFirst := True; - if (1 < I) and (Format[I - 1] = 'd') then ExistFirst := False; - if (I < Length(Format)) and (Format[I + 1] = 'd') then ExistFirst := False; - if ExistFirst then Result := Result + 'd'; - end; - if (Format[I] = 'M') then - begin - ExistFirst := True; - if (1 < I) and (Format[I - 1] = 'M') then ExistFirst := False; - if (I < Length(Format)) and (Format[I + 1] = 'M') then ExistFirst := False; - if ExistFirst then Result := Result + 'M'; - end; - Result := Result + Format[I]; - end; - if AIsMasked then CorrectForMaskEdit(Result); -end; - -function TcxFormatController.GetDateTimeDisplayFormat( - AMaskKind: TcxDateTimeEditMaskKind): string; -begin - case AMaskKind of - dtmkDate: - Result := ShortDateFormat; - dtmkTime: - Result := LongTimeFormat; - dtmkDateTime: - Result := ShortDateFormat + ' ' + LongTimeFormat; - end; -end; - -class function TcxFormatController.GetDateTimeFormatItemStandardMaskZoneLength( - const AItem: TcxDateTimeFormatItem): Integer; -begin - case AItem.Kind of - dtikString: - Result := Length(AItem.Data); - dtikYear: - if Length(AItem.Data) = 2 then - Result := 2 - else - Result := 4; - dtikMonth, dtikDay: - if Length(AItem.Data) < 3 then - Result := 2 - else - Result := 3; - dtikHour, dtikMin, dtikSec: - Result := 2; -// dtikMSec: - dtikTimeSuffix: - begin - if UpperCase(AItem.Data) = 'A/P' then - Result := 1 - else if UpperCase(AItem.Data) = 'AM/PM' then - Result := 2 - else - begin - Result := Length(TimeAMString); - if Length(TimePMString) > Result then - Result := Length(TimePMString); - end; - end; - dtikDateSeparator, dtikTimeSeparator: - Result := 1; - else - Result := 0; - end; -end; - -function TcxFormatController.GetStartOfWeek: TDayOfWeek; -begin - Result := cxDateUtils.GetStartOfWeek; -end; - -function TcxFormatController.InternalGetDateTimeEditRegExprMask( - AFormatInfo: TcxDateTimeFormatInfo; - AMaskKind: TcxDateTimeEditMaskKind): string; - - procedure AddChar(var S: string; C: Char); - begin - if C = ' ' then - S := S + ''' ''' - else - S := S + '\' + C; - end; - - procedure AddString(var ADst: string; const ASrc: string); - begin - ADst := ADst + '''' + ASrc + ''''; - end; - - procedure ProcessDateItem(var S: string; - const AFormatItem: TcxDateTimeFormatItem); - const - reTwoDigitYearMask = '\d\d'; - reFourDigitYearMask = '\d\d\d\d'; - reMonthMask = '(0?[1-9]|1[012])'; - reDayMask = '([012]?[1-9]|[123]0|31)'; - var - AUseLongMonthNames: Boolean; - I: Integer; - begin - with AFormatItem do - case Kind of - dtikString: - AddString(S, Data); - dtikYear: - if Length(Data) = 2 then - Result := S + reTwoDigitYearMask - else - Result := S + reFourDigitYearMask; - dtikMonth: - begin - S := S + '(' + reMonthMask + '|('; - AUseLongMonthNames := Length(Data) = 4; - if AUseLongMonthNames then - AddString(S, LongMonthNames[1]) - else - AddString(S, ShortMonthNames[1]); - for I := 2 to 12 do - begin - S := S + '|'; - if AUseLongMonthNames then - AddString(S, LongMonthNames[I]) - else - AddString(S, ShortMonthNames[I]); - end; - S := S + '))'; - end; - dtikDay: - S := S + reDayMask; - dtikDateSeparator: - if DateSeparator <> #0 then - AddChar(S, DateSeparator); - end; - end; - - procedure ProcessTimeItem(var S: string; - const AFormatItem: TcxDateTimeFormatItem); - begin - with AFormatItem do - case Kind of - dtikString: - AddString(S, Data); - dtikHour: - begin - if Copy(Data, 1, 2) = '12' then - S := S + '(0?[1-9]|1[012])' - else - S := S + '([01]?\d|2[0-3])'; - end; - dtikMin: - S := S + '[0-5]?\d'; - dtikSec: - S := S + '[0-5]?\d'; -// dtikMSec: - dtikTimeSuffix: - begin - if UpperCase(Data) = 'A/P' then - S := S + '(A|P)?' - else if UpperCase(Data) = 'AM/PM' then - S := S + '(AM|PM)?' - else - if (TimeAMString <> '') or (TimePMString <> '') then - begin - S := S + '('''; - if (TimeAMString <> '') and (TimePMString <> '') then - S := S + TimeAMString + '''|''' + TimePMString - else - if TimeAMString <> '' then - S := S + TimeAMString - else - S := S + TimePMString; - S := S + ''')?'; - end; - end; - dtikTimeSeparator: - if TimeSeparator <> #0 then - AddChar(S, TimeSeparator); - end; - end; - -var - I: Integer; -begin - Result := ''; - if (AMaskKind = dtmkDateTime) or (Length(AFormatInfo.Items) = 0) then - Exit; - for I := 0 to Length(AFormatInfo.Items) - 1 do - if AMaskKind = dtmkDate then - ProcessDateItem(Result, AFormatInfo.Items[I]) - else - ProcessTimeItem(Result, AFormatInfo.Items[I]); -end; - -function TcxFormatController.InternalGetDateTimeEditStandardMask( - AFormatInfo: TcxDateTimeFormatInfo; - AMaskKind: TcxDateTimeEditMaskKind): string; - - procedure AddChar(var S: string; C: Char); - begin - S := S + '\' + C; - end; - -var - I, J: Integer; -begin - Result := ''; - if Length(AFormatInfo.Items) = 0 then - Exit; - if AMaskKind <> dtmkTime then - Result := '!'; - for I := 0 to Length(AFormatInfo.Items) - 1 do - with AFormatInfo.Items[I] do - case Kind of - dtikString: - for J := 1 to Length(Data) do - AddChar(Result, Data[J]); - dtikYear: - if Length(Data) = 2 then - Result := Result + '99' - else - Result := Result + '9999'; - dtikMonth: - if Length(Data) < 3 then - Result := Result + '99' - else - Result := Result + 'lll'; - dtikDay: - if Length(Data) < 3 then - Result := Result + '99' - else - Result := Result + 'lll'; - dtikHour, dtikMin, dtikSec: - if AMaskKind = dtmkTime then - Result := Result + '00' - else - Result := Result + '99'; -// dtikMSec: - dtikTimeSuffix: - begin - if UpperCase(Data) = 'A/P' then - Result := Result + 'c' - else if UpperCase(Data) = 'AM/PM' then - Result := Result + 'cc' - else - begin - J := Length(TimeAMString); - if Length(TimePMString) > J then - J := Length(TimePMString); - Result := Result + GetCharString('c', J); - end; - end; - dtikDateSeparator: - Result := Result + '/'; - dtikTimeSeparator: - Result := Result + ':'; - end; - if AMaskKind = dtmkTime then - Result := Result + ';1;0' - else - Result := Result + ';1; '; -end; - -function TcxFormatController.InternalGetMaskedDateEditFormat( - AFormatInfo: TcxDateTimeFormatInfo): string; -var - I: Integer; -begin - Result := ''; - for I := 0 to Length(AFormatInfo.Items) - 1 do - with AFormatInfo.Items[I] do - case Kind of - dtikString: - Result := Result + '''' + Data + ''''; - dtikYear: - Result := Result + LowerCase(Data); - dtikMonth: - if Length(Data) < 3 then - Result := Result + 'mm' - else - Result := Result + 'mmm'; - dtikDay: - if Length(Data) < 3 then - Result := Result + 'dd' - else - Result := Result + 'ddd'; - dtikHour: - Result := Result + 'hh'; - dtikMin: - Result := Result + 'nn'; - dtikSec: - Result := Result + 'ss'; -// dtikMSec: - dtikTimeSuffix: - Result := Result + LowerCase(Data); - dtikDateSeparator: - Result := Result + '/'; - dtikTimeSeparator: - Result := Result + ':'; - end; -end; - -procedure TcxFormatController.AddListener( - AListener: IcxFormatControllerListener); -begin - with FList do - if IndexOf(Pointer(AListener)) = -1 then - begin - if Count = 0 then - {$IFDEF DELPHI6} - FWindow := Classes.AllocateHWnd(MainWndProc); - {$ELSE} - FWindow := Forms.AllocateHWnd(MainWndProc); - {$ENDIF} - Add(Pointer(AListener)); - end; -end; - -procedure TcxFormatController.RemoveListener( - AListener: IcxFormatControllerListener); -begin - FList.Remove(Pointer(AListener)); - if FList.Count = 0 then - begin - {$IFDEF DELPHI6} - Classes.DeallocateHWnd(FWindow); - {$ELSE} - Forms.DeallocateHWnd(FWindow); - {$ENDIF} - FWindow := 0; - end; -end; - -procedure TcxFormatController.TranslationChanged; -begin - FormatChanged; -end; - -procedure TcxFormatController.GetFormats; -begin - if FcxFormatController = nil then // to avoid stack overflow - FcxFormatController := Self; - if not FAssignedCurrencyFormat then - FCurrencyFormat := GetCurrencyFormat; - if not FAssignedStartOfWeek then - FStartOfWeek := GetStartOfWeek; - - FDateEditFormat := GetDateEditFormat(False); - CalculateDateEditMasks(True); -end; - -class function TcxFormatController.GetDateTimeFormatItemStandardMaskInfo( - const AFormatInfo: TcxDateTimeFormatInfo; APos: Integer; - out AItemInfo: TcxDateTimeFormatItemInfo): Boolean; - - function GetTimeSuffixKind(const AFormatItemData: string): TcxTimeSuffixKind; - begin - if UpperCase(AFormatItemData) = 'A/P' then - Result := tskAP - else if UpperCase(AFormatItemData) = 'AM/PM' then - Result := tskAMPM - else - Result := tskAMPMString; - end; - -var - AItemZoneStart, I: Integer; - AItemZoneStarts: array of Integer; -begin - Result := False; - if (APos < 1) or (Length(AFormatInfo.Items) = 0) then - Exit; - SetLength(AItemZoneStarts, Length(AFormatInfo.Items)); - AItemZoneStart := 1; - for I := 0 to Length(AFormatInfo.Items) - 1 do - begin - AItemZoneStarts[I] := AItemZoneStart; - Inc(AItemZoneStart, GetDateTimeFormatItemStandardMaskZoneLength(AFormatInfo.Items[I])); - if APos < AItemZoneStart then - begin - AItemInfo.Kind := AFormatInfo.Items[I].Kind; - AItemInfo.ItemZoneStart := AItemZoneStarts[I]; - AItemInfo.ItemZoneLength := AItemZoneStart - AItemZoneStarts[I]; - if AItemInfo.Kind = dtikTimeSuffix then - AItemInfo.TimeSuffixKind := GetTimeSuffixKind(AFormatInfo.Items[I].Data); - Result := True; - Break; - end; - end; -end; - -function TcxFormatController.GetDateTimeStandardMaskStringLength( - const AFormatInfo: TcxDateTimeFormatInfo): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Length(AFormatInfo.Items) - 1 do - Inc(Result, GetDateTimeFormatItemStandardMaskZoneLength(AFormatInfo.Items[I])); -end; - -procedure TcxFormatController.NotifyListeners; -var - I: Integer; -begin - for I := 0 to FList.Count - 1 do - IcxFormatControllerListener(FList[I]).FormatChanged; -end; - -procedure TcxFormatController.MainWndProc(var Message: TMessage); -begin - try - WndProc(Message); - except - Application.HandleException(Self); - end; -end; - -procedure TcxFormatController.WndProc(var Message: TMessage); -begin - if (Message.Msg = WM_SETTINGCHANGE) and ((Message.WParam = 0) and - (PChar(Message.LParam) = 'intl')) and - Application.UpdateFormatSettings then - begin - SysUtils.GetFormatSettings; - GetFormats; - NotifyListeners; - Message.Result := 0; - Exit; - end; - if Message.Msg = WM_TIMECHANGE then - begin - TimeChanged; - Message.Result := 0; - Exit; - end; - with Message do Result := DefWindowProc(FWindow, Msg, wParam, lParam); -end; - -procedure TcxFormatController.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TcxFormatController.EndUpdate; -begin - Dec(FLockCount); - if FLockCount = 0 then - NotifyListeners; -end; - -procedure TcxFormatController.FormatChanged; -begin - if FLockCount = 0 then - begin - GetFormats; - NotifyListeners; - end; -end; - -procedure TcxFormatController.TimeChanged; -var - I: Integer; - AIntf: IcxFormatControllerListener2; -begin - for I := 0 to FList.Count - 1 do - if Supports(IcxFormatControllerListener(FList[I]), - IcxFormatControllerListener2, AIntf) then - AIntf.TimeChanged; -end; - -function cxFormatController: TcxFormatController; -begin - if FcxFormatController = nil then - FcxFormatController := TcxFormatController.Create; - Result := FcxFormatController; -end; - -procedure TcxFormatController.SetAssignedCurrencyFormat(Value: Boolean); -begin - if FAssignedCurrencyFormat <> Value then - begin - FAssignedCurrencyFormat := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetAssignedRegExprDateEditMask(Value: Boolean); -begin - if FAssignedRegExprDateEditMask <> Value then - begin - FAssignedRegExprDateEditMask := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetAssignedRegExprDateTimeEditMask(Value: Boolean); -begin - if FAssignedRegExprDateTimeEditMask <> Value then - begin - FAssignedRegExprDateTimeEditMask := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetAssignedStandardDateEditMask(Value: Boolean); -begin - if FAssignedStandardDateEditMask <> Value then - begin - FAssignedStandardDateEditMask := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetAssignedStandardDateTimeEditMask(Value: Boolean); -begin - if FAssignedStandardDateTimeEditMask <> Value then - begin - FAssignedStandardDateTimeEditMask := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetAssignedStartOfWeek(Value: Boolean); -begin - if FAssignedStartOfWeek <> Value then - begin - FAssignedStartOfWeek := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetCurrencyFormat(const Value: string); -begin - FAssignedCurrencyFormat := True; - if FCurrencyFormat <> Value then - begin - FCurrencyFormat := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetFirstWeekOfYear(Value: TcxFirstWeekOfYear); -begin - if Value <> FFirstWeekOfYear then - begin - FFirstWeekOfYear := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetRegExprDateEditMask(const Value: string); -begin - FAssignedRegExprDateEditMask := True; - if FRegExprDateEditMask <> Value then - begin - FRegExprDateEditMask := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetRegExprDateTimeEditMask(const Value: string); -begin - FAssignedRegExprDateTimeEditMask := True; - if FRegExprDateTimeEditMask <> Value then - begin - FRegExprDateTimeEditMask := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetStandardDateEditMask(const Value: string); -begin - FAssignedStandardDateEditMask := True; - if FStandardDateEditMask <> Value then - begin - FStandardDateEditMask := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetStandardDateTimeEditMask(const Value: string); -begin - FAssignedStandardDateTimeEditMask := True; - if FStandardDateTimeEditMask <> Value then - begin - FStandardDateTimeEditMask := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetStartOfWeek(Value: TDayOfWeek); -begin - FAssignedStartOfWeek := True; - if FStartOfWeek <> Value then - begin - FStartOfWeek := Value; - FormatChanged; - end; -end; - -procedure TcxFormatController.SetUseDelphiDateTimeFormats(Value: Boolean); -begin - if FUseDelphiDateTimeFormats <> Value then - begin - FUseDelphiDateTimeFormats := Value; - FormatChanged; - end; -end; - -initialization - -finalization - FcxFormatController.Free; - FcxFormatController := nil; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxGeometry.pas b/internal/x.46/ExpressLibrary/Sources/cxGeometry.pas deleted file mode 100644 index 38924440..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxGeometry.pas +++ /dev/null @@ -1,1085 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Common Editing Library } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE COMMONEDITINGLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGeometry; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes; - -type - TcxPtInRectType = (ptrtNone, ptrtArea, ptrtLeft, ptrtTop, ptrtRight, ptrtBottom); - - { TcxRect } - - TcxRect = class(TPersistent) - private - FOwner: TPersistent; - FRect: TRect; - FOnChange: TNotifyEvent; - function GetData: Pointer; - function GetHeight: Integer; - function GetVertex(AIndex: Integer): TPoint; - function GetWidth: Integer; - procedure SetHeight(AValue: Integer); - procedure SetRect(AValue: TRect); - procedure SetVertex(AIndex: Integer; const AValue: TPoint); - procedure SetWidth(AValue: Integer); - protected - procedure DoChange; - function GetOwner: TPersistent; override; - procedure ValidateRect(var R: TRect); virtual; - public - constructor Create(AOwner: TPersistent); virtual; - procedure Assign(Source: TPersistent); override; - - function GetValue(AIndex: Integer): Integer; - procedure SetValue(AIndex, AValue: Integer); - - function IsEmpty: Boolean; - function IsEqual(const ARect: TRect): Boolean; overload; - function IsEqual(ARect: TcxRect): Boolean; overload; - - property BottomLeft: TPoint index 2 read GetVertex write SetVertex; - property BottomRight: TPoint index 3 read GetVertex write SetVertex; - property Data: Pointer read GetData; - property Height: Integer read GetHeight write SetHeight; - property Rect: TRect read FRect write SetRect; - property TopLeft: TPoint index 0 read GetVertex write SetVertex; - property TopRight: TPoint index 1 read GetVertex write SetVertex; - property Width: Integer read GetWidth write SetWidth; - published - property Left: Integer index 0 read GetValue write SetValue default 0; - property Top: Integer index 1 read GetValue write SetValue default 0; - property Right: Integer index 2 read GetValue write SetValue default 0; - property Bottom: Integer index 3 read GetValue write SetValue default 0; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - end; - - { TcxSize } - - TcxSize = class(TPersistent) - private - FOwner: TPersistent; - FSize: TSize; - FOnChange: TNotifyEvent; - function GetData: Pointer; - function GetSize: TSize; - procedure SetValue(Index, Value: Integer); - protected - procedure DoChange; virtual; - function GetOwner: TPersistent; override; - function GetValue(Index: Integer): Integer; virtual; - function IsSizeStored(Index: Integer): Boolean; virtual; - procedure SetSize(const Value: TSize); virtual; - public - constructor Create(AOwner: TPersistent); - procedure Assign(Source: TPersistent); override; - - function IsEmpty: Boolean; - function IsEqual(const ASize: TSize): Boolean; overload; - function IsEqual(ASize: TcxSize): Boolean; overload; - - property Data: Pointer read GetData; - property Size: TSize read GetSize write SetSize; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - published - property Height: Integer index 0 read GetValue write SetValue stored IsSizeStored; - property Width: Integer index 1 read GetValue write SetValue stored IsSizeStored; - end; - -// rect helper routines -function cxRectCompare(const R1, R2: TRect): Boolean; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectCenter(const R: TRect): TPoint; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectCenter(const Bounds: TRect; const ASize: TSize): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectCenter(const Bounds: TRect; Width, Height: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectContain(const ABounds, AInner: TRect): Boolean; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectContent(const R, Margins: TRect): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectHeight(const R: TRect): Integer; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectIntersect(const R1, R2: TRect): Boolean; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectIntersect(out R: TRect; const R1, R2: TRect): Boolean; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectInflate(const R: TRect; DX, DY: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectInflate(const R: TRect; DX1, DY1, DX2, DY2: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectInflate(const R, AMargins: TRect): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectInvert(const R: TRect): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectIsEmpty(const R: TRect): Boolean; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectIsEqual(const R, R1: TRect): Boolean; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectIsInvalid(const R: TRect): Boolean; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectIsNull(const R: TRect): Boolean; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectGetItem(const ARect: TRect; AIndex: Integer): Integer; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectGetSize(const ARect: TRect; AIndex: Integer): Integer; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectLeftBottom(const R: TRect): TPoint; {$IFDEF DELPHI9} inline; {$ENDIF} -procedure cxRectMinMaxHeight(const R: TRect; var AMax, AMin: Integer); {$IFDEF DELPHI9} inline; {$ENDIF} -procedure cxRectMinMaxInit(var AMin, AMax: Integer); {$IFDEF DELPHI9} inline; {$ENDIF} -procedure cxRectMinMaxWidth(const R: TRect; var AMax, AMin: Integer); {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectOffset(const R: TRect; const P: TPoint; APositiveFactor: Boolean = True): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectOffset(const R: TRect; const Ps: array of TPoint; APositiveFactor: Boolean = True): TRect; overload; -function cxRectOffset(const R: TRect; DX, DY: Integer; APositiveFactor: Boolean = True): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectOffsetHorz(const R: TRect; DX: Integer): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectOffsetVert(const R: TRect; DY: Integer): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -procedure cxRectOverlapped(const Src, Dst: TRect; out SrcH, SrcV, DstH, DstV: TRect); -function cxRectPtIn(const R: TRect; const P: TPoint): Boolean; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectPtIn(const R: TRect; const X, Y: Integer): Boolean; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectPtInEx(const R: TRect; X, Y, Delta: Integer): TcxPtInRectType; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectPtInEx(const R: TRect; X, Y, DeltaX, DeltaY: Integer): TcxPtInRectType; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectPtInEx(const R: TRect; const X, Y: Integer; DL, DT, DR, DB: Integer): TcxPtInRectType; overload; -function cxRectRotate(const R: TRect): TRect; -function cxRect(const Left, Top, Right, Bottom: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRect(const TopLeft, BottomRight: TPoint): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectAdjust(const R: TRect): TRect; //#DG - too complex {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectBounds(Left, Top, Width, Height: Integer): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectRightTop(const R: TRect): TPoint; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectScaleHeight(const R: TRect; Y1, Y2, H1, H2: Integer): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectScaleWidth(const R: TRect; X1, X2, W1, W2: Integer): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetBottom(const R: TRect; Y: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetBottom(const R: TRect; Y, H: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetHeight(const R: TRect; H: Integer): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetLeft(const R: TRect; X: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetLeft(const R: TRect; X, W: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetTop(const R: TRect; Y: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetTop(const R: TRect; Y, H: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetRight(const R: TRect; X: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetRight(const R: TRect; X, W: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetSize(const R: TRect; W, H: Integer): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetWidth(const R: TRect; W: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetWidth(const R: TRect; X, W: Integer): TRect; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetXPos(const R: TRect; X1, X2: Integer): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSetYPos(const R: TRect; Y1, Y2: Integer): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectSize(const R: TRect): TSize; {$IFDEF DELPHI9} inline; {$ENDIF} -procedure cxRectSplitHorz(const ABounds: TRect; var ARect1, ARect2: TRect); {$IFDEF DELPHI9} inline; {$ENDIF} -procedure cxRectSplitVert(const ABounds: TRect; var ARect1, ARect2: TRect); {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectUnion(const R1, R2: TRect): TRect; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxRectWidth(const R: TRect): Integer; {$IFDEF DELPHI9} inline; {$ENDIF} - -// point helper routines -function cxPointInvert(const P: TPoint): TPoint; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxPointIsEqual(const P1, P2: TPoint): Boolean; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxPointIsNull(const P: TPoint): Boolean; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxPointGetItem(const P: TPoint; AIndex: Integer): Integer; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxPoint(X, Y: Integer): TPoint; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxPoint(const ASize: TSize): TPoint; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxPointOffset(const P, DP: TPoint; APositiveFactor: Boolean = True): TPoint; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxPointOffset(const P: TPoint; const Ps: array of TPoint; APositiveFactor: Boolean = True): TPoint; overload; -function cxPointOffset(const P: TPoint; X, Y: Integer; APositiveFactor: Boolean = True): TPoint; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxPointReplaceItem(const P: TPoint; const AIndex, AValue: Integer): TPoint; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxPointSum(const Ps: array of TPoint): TPoint; - -function cxSize(DX, DY: Integer): TSize; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxSize(const P: TPoint): TSize; overload; {$IFDEF DELPHI9} inline; {$ENDIF} -function cxSizeIsEqual(const S1, S2: TSize): Boolean; {$IFDEF DELPHI9} inline; {$ENDIF} - -const - cxInvalidRect: TRect = (Left: -1; Top: -1; Right: -1; Bottom: -1); - cxSimpleRect: TRect = (Left: 1; Top: 1; Right: 1; Bottom: 1); - cxInvalidPoint: TPoint = (X: -1; Y: -1); - -var - cxNullRect: TRect; - cxNullSize: TSize; - cxNullPoint: TPoint; - -implementation - -uses - Math; - -{ TcxRect } - -constructor TcxRect.Create(AOwner: TPersistent); -begin - inherited Create; - FOwner := AOwner; -end; - -procedure TcxRect.Assign(Source: TPersistent); -begin - if Source is TcxRect then - Rect := TcxRect(Source).Rect; -end; - -procedure TcxRect.DoChange; -begin - if Assigned(FOnChange) then - FOnChange(Self); -end; - -function TcxRect.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -function TcxRect.IsEmpty: Boolean; -begin - Result := cxRectIsEmpty(FRect); -end; - -function TcxRect.IsEqual(const ARect: TRect): Boolean; -begin - Result := cxRectIsEqual(ARect, FRect); -end; - -function TcxRect.IsEqual(ARect: TcxRect): Boolean; -begin - Result := IsEqual(ARect.Rect); -end; - -procedure TcxRect.ValidateRect(var R: TRect); -begin -end; - -function TcxRect.GetData: Pointer; -begin - Result := @FRect; -end; - -function TcxRect.GetHeight: Integer; -begin - Result := FRect.Bottom - FRect.Top; -end; - -function TcxRect.GetValue(AIndex: Integer): Integer; -begin - case AIndex of - 0: - Result := FRect.Left; - 1: - Result := FRect.Top; - 2: - Result := FRect.Right; - else - Result := FRect.Bottom; - end; -end; - -function TcxRect.GetVertex(AIndex: Integer): TPoint; -begin - case AIndex of - 0: - Result := FRect.TopLeft; - 1: - Result := Point(FRect.Right, FRect.Top); - 2: - Result := Point(FRect.Left, FRect.Bottom); - else - Result := FRect.BottomRight; - end; -end; - -function TcxRect.GetWidth: Integer; -begin - Result := FRect.Right - FRect.Left; -end; - -procedure TcxRect.SetHeight(AValue: Integer); -begin - Bottom := Top + AValue; -end; - -procedure TcxRect.SetRect(AValue: TRect); -begin - ValidateRect(AValue); - if not IsEqual(AValue) then - begin - FRect := AValue; - DoChange; - end; -end; - -procedure TcxRect.SetValue(AIndex, AValue: Integer); -var - ARect: TRect; -begin - ARect := Rect; - case AIndex of - 0: - ARect.Left := AValue; - 1: - ARect.Top := AValue; - 2: - ARect.Right := AValue; - 3: - ARect.Bottom := AValue; - end; - Rect := ARect; -end; - -procedure TcxRect.SetVertex(AIndex: Integer; const AValue: TPoint); -var - ARect: TRect; -begin - ARect := Rect; - case AIndex of - 0: - ARect.TopLeft := AValue; - 1: - begin - ARect.Right := AValue.X; - ARect.Top := AValue.Y; - end; - 2: - begin - ARect.Left := AValue.X; - ARect.Bottom := AValue.Y; - end; - 3: - ARect.BottomRight := AValue; - end; - Rect := ARect; -end; - -procedure TcxRect.SetWidth(AValue: Integer); -begin - Right := Left + AValue; -end; - -{ TcxSize } - -constructor TcxSize.Create(AOwner: TPersistent); -begin - inherited Create; - FOwner := AOwner; -end; - -procedure TcxSize.Assign(Source: TPersistent); -begin - if Source is TcxSize then - Size := TcxSize(Source).Size - else - inherited Assign(Source); -end; - -function TcxSize.GetValue(Index: Integer): Integer; -begin - if Index = 0 then - Result := FSize.cy - else - Result := FSize.cx; -end; - -function TcxSize.GetSize: TSize; -begin - Result.cx := Width; - Result.cy := Height; -end; - -procedure TcxSize.SetValue(Index, Value: Integer); -var - ASize: TSize; -begin - ASize := Size; - if Index = 0 then - ASize.cy := Value - else - ASize.cx := Value; - Size := ASize; -end; - -function TcxSize.IsEmpty: Boolean; -begin - Result := (FSize.cx = 0) and (FSize.cy = 0); -end; - -function TcxSize.IsEqual(const ASize: TSize): Boolean; -begin - Result := cxSizeIsEqual(ASize, FSize); -end; - -function TcxSize.IsEqual(ASize: TcxSize): Boolean; -begin - Result := IsEqual(ASize.Size); -end; - -procedure TcxSize.DoChange; -begin - if Assigned(FOnChange) then - FOnChange(Self); -end; - -function TcxSize.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -function TcxSize.GetData: Pointer; -begin - Result := @FSize; -end; - -function TcxSize.IsSizeStored(Index: Integer): Boolean; -begin - if Index = 0 then - Result := FSize.cy <> 0 - else - Result := FSize.cx <> 0; -end; - -procedure TcxSize.SetSize(const Value: TSize); -var - ASize: TSize; -begin - ASize.cx := Max(0, Value.cx); - ASize.cy := Max(0, Value.cy); - if not IsEqual(ASize) then - begin - FSize := ASize; - DoChange; - end; -end; - -function cxRectHeight(const R: TRect): Integer; -begin - Result := R.Bottom - R.Top; -end; - -function cxRectIntersect(const R1, R2: TRect): Boolean; -var - R: TRect; -begin - Result := cxRectIntersect(R, R1, R2); -end; - -function cxRectIntersect(out R: TRect; const R1, - R2: TRect): Boolean; -begin - R := R1; - with R do - begin - if R2.Left > R1.Left then Left := R2.Left; - if R2.Top > R1.Top then Top := R2.Top; - if R2.Right < R1.Right then Right := R2.Right; - if R2.Bottom < R1.Bottom then Bottom := R2.Bottom; - Result := not ((Right <= Left) or (Bottom <= Top)); - end; - if not Result then R := cxNullRect; -end; - -function cxRectInflate(const R: TRect; DX, DY: Integer): TRect; -begin - Result := cxRectInflate(R, DX, DY, DX, DY); -end; - -function cxRectInflate(const R: TRect; DX1, DY1, DX2, DY2: Integer): TRect; -begin - Result := R; - with Result do - begin - Dec(Left, DX1); - Dec(Top, DY1); - Inc(Right, DX2); - Inc(Bottom, DY2); - end; -end; - -function cxRectInflate(const R, AMargins: TRect): TRect; -begin - with AMargins do - Result := cxRectInflate(R, Left, Top, Right, Bottom); -end; - -function cxRectInvert(const R: TRect): TRect; -begin - Result.TopLeft := cxPointInvert(R.TopLeft); - Result.BottomRight := cxPointInvert(R.BottomRight); -end; - -function cxRectIsEmpty(const R: TRect): Boolean; -begin - with R do - Result := (Right <= Left) or (Bottom <= Top); -end; - -function cxRectIsEqual(const R, R1: TRect): Boolean; -begin - Result := (R.Left = R1.Left) and (R.Top = R1.Top) and - (R.Right = R1.Right) and (R.Bottom = R1.Bottom); -end; - -function cxRectIsInvalid(const R: TRect): Boolean; -begin - Result := cxRectIsEqual(R, cxInvalidRect); -end; - -function cxRectIsNull(const R: TRect): Boolean; -begin - Result := (R.Left = 0) and (R.Top = 0) and (R.Right = 0) and (R.Bottom = 0); -end; - -function cxRectGetItem(const ARect: TRect; AIndex: Integer): Integer; -begin - case AIndex of - 0: - Result := ARect.Left; - 1: - Result := ARect.Top; - 2: - Result := ARect.Right; - 3: - Result := ARect.Bottom; - else - Result := 0 - end; -end; - -function cxRectGetSize(const ARect: TRect; AIndex: Integer): Integer; -begin - if AIndex = 0 then - Result := ARect.Right - ARect.Left - else - Result := ARect.Bottom - ARect.Top; -end; - -function cxRectLeftBottom(const R: TRect): TPoint; -begin - Result := cxPoint(R.Left, R.Bottom); -end; - -procedure cxRectMinMaxHeight(const R: TRect; var AMax, AMin: Integer); -begin - with R do - begin - if AMax < Bottom then AMax := Bottom; - if AMin > Top then AMin := Top; - end; -end; - -procedure cxRectMinMaxInit(var AMin, AMax: Integer); -begin - AMin := MaxInt; - AMax := -1; -end; - -procedure cxRectMinMaxWidth(const R: TRect; var AMax, AMin: Integer); -begin - with R do - begin - if AMax < Right then AMax := Right; - if AMin > Left then AMin := Left; - end; -end; - -function cxRectOffset(const R: TRect; const P: TPoint; APositiveFactor: Boolean = True): TRect; -begin - Result := cxRectOffset(R, P.X, P.Y, APositiveFactor); -end; - -function cxRectOffset(const R: TRect; DX, DY: Integer; APositiveFactor: Boolean = True): TRect; -begin - Result := cxRect(cxPointOffset(R.TopLeft, DX, DY, APositiveFactor), cxPointOffset(R.BottomRight, DX, DY, APositiveFactor)); -end; - -function cxRectOffset(const R: TRect; const Ps: array of TPoint; APositiveFactor: Boolean = True): TRect; -begin - with cxPointSum(Ps) do - Result := cxRectOffset(R, X, Y, APositiveFactor); -end; - -function cxRectOffsetHorz(const R: TRect; DX: Integer): TRect; -begin - Result := R; - Inc(Result.Left, DX); - Inc(Result.Right, DX); -end; - -function cxRectOffsetVert(const R: TRect; DY: Integer): TRect; -begin - Result := R; - Inc(Result.Top, DY); - Inc(Result.Bottom, DY); -end; - -function GetRectCoordinate(const R: TRect; ABottomRight, AVertCoordinate: Boolean): Integer; -begin - if ABottomRight then - if AVertCoordinate then - Result := R.Bottom - else - Result := R.Right - else - if AVertCoordinate then - Result := R.Top - else - Result := R.Left; -end; - -procedure SetRectCoordinate(var R: TRect; ABottomRight, AVertCoordinate: Boolean; AValue: Integer); -begin - if ABottomRight then - if AVertCoordinate then - R.Bottom := AValue - else - R.Right := AValue - else - if AVertCoordinate then - R.Top := AValue - else - R.Left := AValue; -end; - -procedure cxRectOverlapped(const Src, Dst: TRect; out SrcH, SrcV, DstH, DstV: TRect); -var - H, W: Integer; - - procedure IncV(const ARect: TRect; AVertCoordinate, ABottomRight: Boolean; - Value: Integer; out AResult: TRect); - begin - if Value <> 0 then - begin - AResult := ARect; - SetRectCoordinate(AResult, ABottomRight, AVertCoordinate, - GetRectCoordinate(AResult, not ABottomRight, AVertCoordinate) + Value); - end - else - AResult := cxNullRect; - end; - -begin - H := Src.Bottom - Dst.Bottom; - W := Src.Right - Dst.Right; - IncV(Src, True, H < 0, -H, SrcH); - IncV(Dst, True, H > 0, H, DstH); - IncV(Src, False, W < 0, -W, SrcV); - IncV(Dst, False, W > 0, W, DstV); -end; - -function cxRectPtIn(const R: TRect; const P: TPoint): Boolean; -begin - Result := cxRectPtIn(R, P.X, P.Y); -end; - -function cxRectPtIn(const R: TRect; const X, Y: Integer): Boolean; -begin - with R do - Result := (X >= Left) and (X < Right) and (Y >= Top) and (Y < Bottom); -end; - -function cxRectPtInEx(const R: TRect; - const X, Y: Integer; DL, DT, DR, DB: Integer): TcxPtInRectType; - - function InRange(V, V1, V2: Integer): Boolean; - begin - V := V - V1; - Result := (V >= -V2) and (V < V2); - end; - -begin - if cxRectPtIn(R, X, Y) then - Result := ptrtArea - else - if cxRectPtIn(cxRectInflate(R, DL, DT, DR, DB), X, Y) then - begin - with R do - begin - if InRange(X, Right, DR) then - Result := ptrtRight - else - if InRange(Y, Bottom, DB) then - Result := ptrtBottom - else - if InRange(X, Left, DL) then - Result := ptrtLeft - else - Result := ptrtTop; - end; - end - else - Result := ptrtNone; -end; - -function cxRectRotate(const R: TRect): TRect; -begin - Result := Rect(R.Top, R.Left, R.Bottom, R.Right); -end; - -function cxRectPtInEx(const R: TRect; X, Y, Delta: Integer): TcxPtInRectType; -begin - Result := cxRectPtInEx(R, X, Y, Delta, Delta, Delta, Delta); -end; - -function cxRectPtInEx(const R: TRect; - X, Y, DeltaX, DeltaY: Integer): TcxPtInRectType; -begin - Result := cxRectPtInEx(R, X, Y, DeltaX, DeltaY, DeltaX, DeltaY); -end; - -function cxRect(const Left, Top, Right, Bottom: Integer): TRect; -begin - Result.Left := Left; - Result.Top := Top; - Result.Right := Right; - Result.Bottom := Bottom; -end; - -function cxRect(const TopLeft, BottomRight: TPoint): TRect; -begin - Result.TopLeft := TopLeft; - Result.BottomRight := BottomRight; -end; - -function cxRectAdjust(const R: TRect): TRect; -begin - with R do - Result := Rect(Min(Left, Right), Min(Top, Bottom), Max(Left, Right), Max(Top, Bottom)); -end; - -function cxRectBounds(Left, Top, Width, Height: Integer): TRect; -begin - Result.Left := Left; - Result.Top := Top; - Result.Right := Left + Width; - Result.Bottom := Top + Height; -end; - -function cxRectRightTop(const R: TRect): TPoint; -begin - Result := cxPoint(R.Right, R.Top); -end; - -function cxRectScaleHeight(const R: TRect; Y1, Y2, H1, H2: Integer): TRect; -var - H: Integer; -begin - Result := R; - with Result do - begin - H := MulDiv(Bottom - Top, H2, H1); - Top := MulDiv(Y1 - Top, H2, H1) + Y2; - Bottom := Top + H; - end; -end; - -function cxRectScaleWidth(const R: TRect; X1, X2, W1, - W2: Integer): TRect; -var - L: Integer; -begin - Result := R; - with Result do - begin - L := MulDiv(Right - Left, W2, W1); - Left := MulDiv(X1 - Left, W2, W1) + X2; - Right := Left + L; - end; -end; - -function cxRectSetBottom(const R: TRect; Y: Integer): TRect; -begin - Result := cxRectSetBottom(R, Y, R.Bottom - R.Top); -end; - -function cxRectSetBottom(const R: TRect; Y, H: Integer): TRect; -begin - Result := R; - Result.Bottom := Y; - Result.Top := Y - H; -end; - -function cxRectSetHeight(const R: TRect; H: Integer): TRect; -begin - Result := R; - Result.Bottom := Result.Top + H; -end; - -function cxRectSetLeft(const R: TRect; X: Integer): TRect; -begin - Result := cxRectSetLeft(R, X, R.Right - R.Left); -end; - -function cxRectSetLeft(const R: TRect; X, W: Integer): TRect; -begin - Result := R; - Result.Left := X; - Result.Right := X + W; -end; - -function cxRectSetTop(const R: TRect; Y: Integer): TRect; -begin - Result := cxRectSetTop(R, Y, R.Bottom - R.Top); -end; - -function cxRectSetTop(const R: TRect; Y, H: Integer): TRect; -begin - Result := R; - Result.Top := Y; - Result.Bottom := Y + H; -end; - -function cxRectSetRight(const R: TRect; X: Integer): TRect; -begin - Result := cxRectSetRight(R, X, R.Right - R.Left); -end; - -function cxRectSetRight(const R: TRect; X, W: Integer): TRect; -begin - Result := R; - Result.Right := X; - Result.Left := X - W; -end; - -function cxRectSetSize(const R: TRect; W, H: Integer): TRect; -begin - Result := R; - with R do - begin - Result.Right := Left + W; - Result.Bottom := Top + H; - end; -end; - -function cxRectSetWidth(const R: TRect; W: Integer): TRect; -begin - Result := R; - Result.Right := R.Left + W; -end; - -function cxRectSetWidth(const R: TRect; X, W: Integer): TRect; -begin - Result := R; - Result.Left := X; - Result.Right := X + W; -end; - -function cxRectSetXPos(const R: TRect; X1, X2: Integer): TRect; -begin - with R do - Result := cxRect(X1, Top, X2, Bottom); -end; - -function cxRectSetYPos(const R: TRect; Y1, Y2: Integer): TRect; -begin - with R do - Result := cxRect(Left, Y1, Right, Y2); -end; - -function cxRectSize(const R: TRect): TSize; -begin - with R do - begin - Result.cx := Right - Left; - Result.cy := Bottom - Top; - end; -end; - -procedure cxRectSplitHorz(const ABounds: TRect; var ARect1, ARect2: TRect); -begin - ARect1 := ABounds; - ARect2 := ABounds; - ARect1.Right := (ABounds.Right + ABounds.Left) div 2; - ARect2.Left := ARect1.Right; -end; - -procedure cxRectSplitVert(const ABounds: TRect; var ARect1, ARect2: TRect); -begin - ARect1 := ABounds; - ARect2 := ABounds; - ARect1.Bottom := (ABounds.Bottom + ABounds.Top) div 2; - ARect2.Top := ARect1.Bottom; -end; - -function cxRectUnion(const R1, R2: TRect): TRect; -begin - Result := R1; - if (R2.Right - R2.Left <= 0) or (R2.Bottom - R2.Top <= 0) then Exit; - if R2.Left < R1.Left then - Result.Left := R2.Left; - if R2.Top < R1.Top then - Result.Top := R2.Top; - if R2.Right > R1.Right then - Result.Right := R2.Right; - if R2.Bottom > R1.Bottom then - Result.Bottom := R2.Bottom; -end; - -function cxRectWidth(const R: TRect): Integer; -begin - Result := R.Right - R.Left; -end; - -function cxRectCompare(const R1, R2: TRect): Boolean; -begin - Result := cxRectIsEqual(R1, R2); -end; - -function cxRectCenter(const R: TRect): TPoint; -begin - with R do - Result := cxPoint((Right + Left) div 2, (Bottom + Top) div 2); -end; - -function cxRectCenter(const Bounds: TRect; const ASize: TSize): TRect; -begin - Result := cxRectCenter(Bounds, ASize.cx, ASize.cy) -end; - -function cxRectCenter(const Bounds: TRect; Width, Height: Integer): TRect; -begin - with Bounds do - begin - Result.Left := (Left + Right - Width) div 2; - Result.Top := (Top + Bottom - Height) div 2; - Result.Right := Result.Left + Width; - Result.Bottom := Result.Top + Height; - end; -end; - -function cxRectContain(const ABounds, AInner: TRect): Boolean; -begin - with ABounds do - Result := (Left <= AInner.Left) and (Right >= AInner.Right) and - (Top <= AInner.Top) and (Bottom >= AInner.Bottom); -end; - -function cxRectContent(const R, Margins: TRect): TRect; -begin - with Result do - begin - Left := R.Left + Margins.Left; - Top := R.Top + Margins.Top; - Right := R.Right - Margins.Right; - Bottom := R.Bottom - Margins.Bottom; - end; -end; - -function cxPointInvert(const P: TPoint): TPoint; -begin - Result.X := -P.X; - Result.Y := -P.Y; -end; - -function cxPointIsEqual(const P1, P2: TPoint): Boolean; -begin - Result := (P1.X = P2.X) and (P1.Y = P2.Y); -end; - -function cxPointIsNull(const P: TPoint): Boolean; -begin - Result := (P.X = cxNullPoint.X) and (P.Y = cxNullPoint.Y); -end; - -function cxPointGetItem(const P: TPoint; AIndex: Integer): Integer; -begin - if AIndex = 0 then - Result := P.X - else - Result := P.Y; -end; - -function cxPointOffset(const P: TPoint; const Ps: array of TPoint; APositiveFactor: Boolean = True): TPoint; -begin - with cxPointSum(Ps) do - Result := cxPointOffset(P, X, Y, APositiveFactor); -end; - -function cxPointOffset(const P: TPoint; X, Y: Integer; APositiveFactor: Boolean = True): TPoint; -begin - if APositiveFactor then - Result := cxPoint(P.X + X, P.Y + Y) - else - Result := cxPoint(P.X - X, P.Y - Y); -end; - -function cxPointOffset(const P, DP: TPoint; APositiveFactor: Boolean = True): TPoint; -begin - Result := cxPointOffset(P, DP.X, DP.Y, APositiveFactor); -end; - -function cxPointReplaceItem(const P: TPoint; const AIndex, AValue: Integer): TPoint; -begin - if AIndex = 0 then - Result.X := AValue - else - Result.Y := AValue; -end; - -function cxPoint(X, Y: Integer): TPoint; -begin - Result.X := X; - Result.Y := Y; -end; - -function cxPoint(const ASize: TSize): TPoint; -begin - with Result do - begin - X := ASize.cx; - Y := ASize.cy; - end; -end; - -function cxPointSum(const Ps: array of TPoint): TPoint; -var - I: Integer; -begin - if Length(Ps) >= 1 then - begin - Result := Ps[Low(Ps)]; - for I := Low(Ps) + 1 to High(Ps) do - with Ps[I] do - begin - Inc(Result.X, X); - Inc(Result.Y, Y); - end; - end - else - Result := cxNullPoint; -end; - -function cxSize(DX, DY: Integer): TSize; -begin - Result.cx := DX; - Result.cy := DY; -end; - -function cxSize(const P: TPoint): TSize; -begin - Result.cx := P.X; - Result.cy := P.Y; -end; - -function cxSizeIsEqual(const S1, S2: TSize): Boolean; -begin - Result := (S1.cx = S2.cx) and (S1.cy = S2.cy); -end; - -initialization - RegisterClasses([TcxRect]); - -finalization - UnregisterClasses([TcxRect]); - -end. - diff --git a/internal/x.46/ExpressLibrary/Sources/cxGraphics.pas b/internal/x.46/ExpressLibrary/Sources/cxGraphics.pas deleted file mode 100644 index 10e11bde..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxGraphics.pas +++ /dev/null @@ -1,6436 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library graphics classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGraphics; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, -{$ENDIF} - Windows, Classes, SysUtils, Controls, Graphics, CommCtrl, ComCtrls, ImgList, - dxCore, cxClasses; - -const - cxAlignLeft = 1; - cxAlignRight = 2; - cxAlignHCenter = 4; - cxAlignTop = 8; - cxAlignBottom = 16; - cxAlignVCenter = 32; - cxAlignCenter = 36; - cxSingleLine = 64; - cxDontClip = 128; - cxExpandTabs = 256; - cxShowPrefix = 512; - cxWordBreak = 1024; - cxShowEndEllipsis = 2048; - cxCalcRect = 4096; - cxShowPathEllipsis = 8192; - cxDontBreakChars = 16384; - cxNoFullWidthCharBreak = 32768; - cxDontPrint = cxCalcRect; - - SystemAlignmentsHorz: array[TAlignment] of Integer = (DT_LEFT, DT_RIGHT, DT_CENTER); - SystemAlignmentsVert: array[TcxAlignmentVert] of Integer = (DT_TOP, DT_BOTTOM, DT_VCENTER); - cxAlignmentsHorz: array[TAlignment] of Integer = (cxAlignLeft, cxAlignRight, cxAlignHCenter); - cxAlignmentsVert: array[TcxAlignmentVert] of Integer = (cxAlignTop, cxAlignBottom, cxAlignVCenter); - -{$IFNDEF DELPHI6} - clMoneyGreen = TColor($C0DCC0); - clSkyBlue = TColor($F0CAA6); - clCream = TColor($F0FBFF); - clMedGray = TColor($A4A0A0); -{$ENDIF} - clcxLightGray = $CFCFCF; - - cxEmptyRect: TRect = (Left: 0; Top: 0; Right: 0; Bottom: 0); - - cxDesignSelectionWidth = 2; - - cxDefaultAlphaValue = 200; - - cxHalfToneBrush: TBrush = nil; - - cxDoubleBufferedBitmapPixelFormat: TPixelFormat = pfDevice; - -type - IcxFontListener = interface - ['{B144DD7E-0B27-439A-B908-FC3ACFE6A2D3}'] - procedure Changed(Sender: TObject; AFont: TFont); - end; - - TcxBorder = (bLeft, bTop, bRight, bBottom); - TcxBorders = set of TcxBorder; - -const - cxBordersAll = [bLeft, bTop, bRight, bBottom]; - -type - TBrushHandle = HBRUSH; - - TPointArray = array of TPoint; - TRectArray = array of TRect; - - TcxColorPart = -100..100; - - TcxGridLines = (glBoth, glNone, glVertical, glHorizontal); - - PcxViewParams = ^TcxViewParams; - TcxViewParams = record - Bitmap: TBitmap; - Color: TColor; - Font: TFont; - TextColor: TColor; - end; - - IcxPaintControlsHelper = interface - ['{7EFAF634-E8D2-489D-9603-FCFC03ACA460}'] - function AllowDrawEdgesAndBorders: Boolean; - end; - - { TcxRegion } - - TcxRegionHandle = HRGN; - TcxRegionOperation = (roSet, roAdd, roSubtract, roIntersect); - - TcxRegion = class {6} - private - FHandle: TcxRegionHandle; - function GetBoundsRect: TRect; - function GetIsEmpty: Boolean; - protected - procedure DestroyHandle; - public - constructor Create(AHandle: TcxRegionHandle); overload; - constructor Create(const ABounds: TRect); overload; - constructor Create; overload; - constructor Create(ALeft, ATop, ARight, ABottom: Integer); overload; - constructor CreateRoundCorners(const ABounds: TRect; AWidthEllepse, AHeightEllepse: Integer); overload; - constructor CreateRoundCorners(ALeft, ATop, ARight, ABottom, AWidthEllepse, AHeightEllepse: Integer); overload; - destructor Destroy; override; - - procedure Combine(ARegion: TcxRegion; AOperation: TcxRegionOperation; - ADestroyRegion: Boolean = True); - function IsEqual(ARegion: TcxRegion): Boolean; overload; - function IsEqual(ARegionHandle: TcxRegionHandle): Boolean; overload; - procedure Offset(const P: TPoint); overload; - procedure Offset(DX, DY: Integer); overload; - function PtInRegion(const Pt: TPoint): Boolean; overload; - function PtInRegion(X, Y: Integer): Boolean; overload; - function RectInRegion(const R: TRect): Boolean; overload; - function RectInRegion(ALeft, ATop, ARight, ABottom: Integer): Boolean; overload; - - property BoundsRect: TRect read GetBoundsRect; - property Handle: TcxRegionHandle read FHandle write FHandle; - property IsEmpty: Boolean read GetIsEmpty; - end; - - { TcxCanvas } - - TcxRotationAngle = (ra0, raPlus90, raMinus90, ra180); - TcxCanvasState = record - Font: TFont; - Brush: TBrush; - Pen: TPen; - end; - TcxCanvasStates = array of TcxCanvasState; - - TcxDCState = record - Handle: THandle; - State: Integer; - end; - TcxDCStates = array of TcxDCState; - - TcxCanvas = class - private - FCanvas: TCanvas; - FSavedDCs: TcxDCStates; - FSavedRegions: TList; - FSavedStates: TcxCanvasStates; - - function GetBrush: TBrush; - function GetCopyMode: TCopyMode; - function GetDCOrigin: TPoint; - function GetFont: TFont; - function GetHandle: HDC; - function GetPen: TPen; - function GetViewportOrg: TPoint; - function GetWindowOrg: TPoint; - procedure SetBrush(Value: TBrush); - procedure SetCopyMode(Value: TCopyMode); - procedure SetFont(Value: TFont); - procedure SetPen(Value: TPen); - procedure SetPixel(X, Y: Integer; Value: TColor); - procedure SetViewportOrg(const P: TPoint); - procedure SetWindowOrg(const P: TPoint); - protected - procedure SynchronizeObjects(ADC: THandle); - public - constructor Create(ACanvas: TCanvas); virtual; - destructor Destroy; override; - - procedure AlignMultiLineTextRectVertically(var R: TRect; const AText: string; - AAlignmentVert: TcxAlignmentVert; AWordBreak, AShowPrefix: Boolean; - AEnabled: Boolean = True; ADontBreakChars: Boolean = False; AEndEllipsis: Boolean = False); - procedure CopyRect(const Dest: TRect; ACanvas: TCanvas; const Source: TRect); - procedure Draw(X, Y: Integer; Graphic: TGraphic); - procedure DrawComplexFrame(const R: TRect; ALeftTopColor, ARightBottomColor: TColor; - ABorders: TcxBorders = [bLeft, bTop, bRight, bBottom]; ABorderWidth: Integer = 1); - procedure DrawEdge(const R: TRect; ASunken, AOuter: Boolean; - ABorders: TcxBorders = [bLeft, bTop, bRight, bBottom]); - procedure DrawFocusRect(const R: TRect); - procedure DrawGlyph(X, Y: Integer; AGlyph: TBitmap; AEnabled: Boolean = True; - ABackgroundColor: TColor = clNone{; ATempCanvas: TCanvas = nil}); - procedure DrawImage(Images: TCustomImageList; X, Y, Index: Integer; - Enabled: Boolean = True); - procedure DrawTexT(const Text: string; R: TRect; Flags: Integer; - Enabled: Boolean = True); overload; - procedure DrawTexT(const Text: string; R: TRect; AAlignmentHorz: TAlignment; - AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean); overload; - procedure FillRect(const R: TRect; AColor: TColor); overload; - procedure FillRect(const R: TRect; ABitmap: TBitmap = nil; - AExcludeRect: Boolean = False); overload; - procedure FillRect(R: TRect; const AParams: TcxViewParams; - ABorders: TcxBorders = []; ABorderColor: TColor = clDefault; - ALineWidth: Integer = 1; AExcludeRect: Boolean = False); overload; - procedure DrawDesignSelection(ARect: TRect; AWidth: Integer = cxDesignSelectionWidth); - procedure DrawRegion(ARegion: TcxRegion; AContentColor: TColor = clDefault; - ABorderColor: TColor = clDefault; ABorderWidth: Integer = 1; ABorderHeight: Integer = 1); overload; - procedure DrawRegion(ARegion: TcxRegionHandle; AContentColor: TColor = clDefault; - ABorderColor: TColor = clDefault; ABorderWidth: Integer = 1; ABorderHeight: Integer = 1); overload; - procedure FillRegion(ARegion: TcxRegion; AColor: TColor = clDefault); overload; - procedure FillRegion(ARegion: TcxRegionHandle; AColor: TColor = clDefault); overload; - procedure FlipHorizontally(ABitmap: TBitmap); - procedure FrameRegion(ARegion: TcxRegion; AColor: TColor = clDefault; - ABorderWidth: Integer = 1; ABorderHeight: Integer = 1); overload; - procedure FrameRegion(ARegion: TcxRegionHandle; AColor: TColor = clDefault; - ABorderWidth: Integer = 1; ABorderHeight: Integer = 1); overload; - procedure Pie(const R: TRect; const ARadial1, ARadial2: TPoint); overload; - procedure Pie(const R: TRect; AStartAngle, ASweepAngle: Integer); overload; - function FontHeight(AFont: TFont): Integer; - procedure FrameRect(const R: TRect; Color: TColor = clDefault; - ALineWidth: Integer = 1; ABorders: TcxBorders = cxBordersAll; - AExcludeFrame: Boolean = False); - procedure InvertFrame(const R: TRect; ABorderSize: Integer); - procedure InvertRect(const R: TRect); - procedure LineTo(X, Y: Integer); - procedure MoveTo(X, Y: Integer); - procedure Polygon(const Points: array of TPoint); - procedure Polyline(const Points: array of TPoint); - procedure RotateBitmap(ABitmap: TBitmap; ARotationAngle: TcxRotationAngle; - AFlipVertically: Boolean = False); - function TextExtent(const Text: string): TSize; overload; - procedure TextExtent(const Text: string; var R: TRect; Flags: Integer); overload; - function TextHeight(const Text: string): Integer; - function TextWidth(const Text: string): Integer; - procedure TransparentDraw(X, Y: Integer; ABitmap: TBitmap; AAlpha: Byte; - ABackground: TBitmap = nil); - - procedure RestoreDC; - procedure SaveDC; - procedure RestoreClipRegion; - procedure SaveClipRegion; - procedure RestoreState; - procedure SaveState; - - procedure GetParams(var AParams: TcxViewParams); - procedure SetParams(AParams: TcxViewParams); - procedure SetBrushColor(Value: TColor); - procedure SetFontAngle(Value: Integer); - - procedure GetTextStringsBounds(Text: string; R: TRect; Flags: Integer; - Enabled: Boolean; var ABounds: TRectArray); - - procedure BeginPath; - procedure EndPath; - function PathToRegion: TcxRegion; - procedure WidenPath; - - // clipping - procedure ExcludeClipRect(const R: TRect); - procedure IntersectClipRect(const R: TRect); - function GetClipRegion(AConsiderOrigin: Boolean = True): TcxRegion; - procedure SetClipRegion(ARegion: TcxRegion; AOperation: TcxRegionOperation; - ADestroyRegion: Boolean = True; AConsiderOrigin: Boolean = True); - function RectFullyVisible(const R: TRect): Boolean; - function RectVisible(const R: TRect): Boolean; - - property Brush: TBrush read GetBrush write SetBrush; - property Canvas: TCanvas read FCanvas write FCanvas; - property CopyMode: TCopyMode read GetCopyMode write SetCopyMode; - property DCOrigin: TPoint read GetDCOrigin; - property Font: TFont read GetFont write SetFont; - property Handle: HDC read GetHandle; - property Pen: TPen read GetPen write SetPen; - property Pixels[X, Y: Integer]: TColor write SetPixel; - property ViewportOrg: TPoint read GetViewportOrg write SetViewportOrg; - property WindowOrg: TPoint read GetWindowOrg write SetWindowOrg; - end; - - { TcxScreenCanvas } - - TcxScreenCanvas = class(TcxCanvas) - public - constructor Create; reintroduce; virtual; - destructor Destroy; override; - procedure Dormant; - end; - - { TcxPaintCanvas } - - TcxPaintCanvasState = record - PrevCanvas: TCanvas; - PrevDC: THandle; - NewDC: THandle; - NewDCIndex: Integer; - end; - TcxPaintCanvasStates = array of TcxPaintCanvasState; - - TcxPaintCanvas = class(TcxCanvas) - private - FCounter: Integer; - FSavedDCs: TcxPaintCanvasStates; - function HandleValid: Boolean; - public - constructor Create; reintroduce; - destructor Destroy; override; - procedure BeginPaint(ADC: THandle); overload; - procedure BeginPaint(ACanvas: TCanvas); overload; - procedure EndPaint; - end; - - { TcxBitmap } - - TcxBitmap = class(TBitmap) - private - FCompressData: Boolean; - FcxCanvas: TcxCanvas; - FLockCount: Integer; - FModified: Boolean; - - function GetClientRect: TRect; - - procedure CompressByBlock(ASourceStream, ADestStream: TStream; ASize, ABlockSize: Integer); - procedure DecompressByBlock(ASourceStream, ADestStream: TStream; ASize, ABlockSize: Integer); - - procedure Compress(ASourceStream, ADestStream: TStream; ASize: Integer); - procedure Decompress1(ASourceStream, ADestStream: TStream; ASize: Integer); - procedure Decompress2(ASourceStream, ADestStream: TStream; ASize: Integer); - protected - procedure Changed(Sender: TObject); override; - function ChangeLocked: Boolean; - procedure Initialize(AWidth, AHeight: Integer; APixelFormat: TPixelFormat); virtual; - procedure Update; virtual; - - procedure ReadData(Stream: TStream); override; - procedure WriteData(Stream: TStream); override; - public - constructor Create; overload; override; - constructor CreateSize(const ARect: TRect); overload; - constructor CreateSize(AWidth, AHeight: Integer); overload; virtual; - constructor CreateSize(const ARect: TRect; APixelFormat: TPixelFormat); overload; - constructor CreateSize(AWidth, AHeight: Integer; APixelFormat: TPixelFormat); overload; - destructor Destroy; override; - - procedure BeginUpdate; - procedure CancelUpdate; - procedure EndUpdate(AForceUpdate: Boolean = True); - - procedure CopyBitmap(ABitmap: TBitmap; ACopyMode: DWORD = SRCCOPY); overload; - procedure CopyBitmap(ABitmap: TBitmap; const ADestRect: TRect; const ASrcTopLeft: TPoint; ACopyMode: DWORD = SRCCOPY); overload; - procedure Rotate(ARotationAngle: TcxRotationAngle; AFlipVertically: Boolean = False); - procedure SetSize(AWidth, AHeight: Integer); overload; {$IFDEF DELPHI10}override;{$ELSE}virtual;{$ENDIF} - procedure SetSize(const ARect: TRect); {$IFDEF DELPHI10}reintroduce;{$ENDIF} overload; - - property CompressData: Boolean read FCompressData write FCompressData; - property ClientRect: TRect read GetClientRect; - property cxCanvas: TcxCanvas read FcxCanvas; - end; - - { TcxBitmap } - - TRGBColors = array of TRGBQuad; - TcxImageDrawMode = (idmNormal, idmDisabled, idmFaded, idmGrayScale, idmDingy, idmShadowed); - TcxBitmapTransformationMode = (btmDingy, btmDirty, btmGrayScale, btmSetOpaque, btmMakeMask, btmFade, btmDisable, btmCorrectBlend, btmHatch, btmClear, btmResetAlpha); - TcxBitmapTransformationProc = procedure(var AColor: TRGBQuad) of object; - TcxDrawImageProc = function (ACanvas: TCanvas; AImages: TCustomImageList; AImageIndex: Integer; AGlyph: TBitmap; ARect: TRect; ADrawMode: TcxImageDrawMode): Boolean; - - TcxColorTransitionMap = record - RedScale: Single; - GreenScale: Single; - BlueScale: Single; - SrcAlpha: Byte; - SrcConstantAlpha: Byte; - end; - - TcxHatchData = record - Color1: TRGBQuad; - Alpha1: Byte; - Color2: TRGBQuad; - Alpha2: Byte; - Step: Byte; - end; - - TcxBitmap32 = class(TcxBitmap) - private - function GetIsAlphaUsed: Boolean; - protected - procedure Update; override; - public - constructor CreateSize(AWidth, AHeight: Integer; AClear: Boolean); overload; - constructor CreateSize(const ARect: TRect; AClear: Boolean); overload; - constructor CreateSize(AWidth, AHeight: Integer); overload; override; - - procedure GetBitmapColors(out AColors: TRGBColors); - procedure SetBitmapColors(const AColors: TRGBColors); - - procedure AlphaBlend(ABitmap: TcxBitmap32; const ARect: TRect; ASmoothImage: Boolean; AConstantAlpha: Byte = $FF); - procedure Clear; virtual; - procedure Filter(AMaskBitmap: TcxBitmap32); - procedure Invert; - procedure LoadFromStream(Stream: TStream); override; - procedure MakeOpaque; - procedure RecoverTransparency(ATransparentColor: TColor); - procedure SetAlphaChannel(Alpha: Byte); - - property IsAlphaUsed: Boolean read GetIsAlphaUsed; - end; - - TcxColorList = class(TList) - public - function Add(AColor: TColor): Integer; - end; - - TcxAlphaBitmap = class(TcxBitmap32) - private - FTransparentBkColor: TRGBQuad; - FTransparentPixels: TcxColorList; - - FCurrentColorIndex: TPoint; - FHatchData: TcxHatchData; - - procedure CorrectBlend(var AColor: TRGBQuad); - procedure ClearColor(var AColor: TRGBQuad); - procedure Dingy(var AColor: TRGBQuad); - procedure Dirty(var AColor: TRGBQuad); - procedure Disable(var AColor: TRGBQuad); - procedure Fade(var AColor: TRGBQuad); - procedure GrayScale(var AColor: TRGBQuad); - procedure Hatch(var AColor: TRGBQuad); - procedure MakeMask(var AColor: TRGBQuad); - procedure SetOpaque(var AColor: TRGBQuad); - procedure ResetAlpha(var AColor: TRGBQuad); - - procedure Scale(var AColor: TRGBQuad; const AColorMap: TcxColorTransitionMap); - - function IsColorTransparent(const AColor: TRGBQuad): Boolean; - protected - procedure Initialize(AWidth, AHeight: Integer; APixelFormat: TPixelFormat); override; - - property HatchData: TcxHatchData read FHatchData write FHatchData; - property TransparentBkColor: TRGBQuad read FTransparentBkColor write FTransparentBkColor; - property TransparentPixels: TcxColorList read FTransparentPixels; - public - constructor CreateSize(AWidth, AHeight: Integer); overload; override; - constructor CreateSize(AWidth, AHeight: Integer; ATransparentBkColor: TRGBQuad); overload; - destructor Destroy; override; - - procedure Clear; override; - procedure DrawHatch(const AHatchData: TcxHatchData); overload; - procedure DrawHatch(AColor1, AColor2: TColor; AStep: Byte; AAlpha1: Byte = $FF; AAlpha2: Byte = $FF); overload; - procedure DrawShadow(AMaskBitmap: TcxAlphaBitmap; AShadowSize: Integer; AShadowColor: TColor; AInflateSize: Boolean = False); - procedure RecoverAlphaChannel(ATransparentColor: TColor); - procedure Shade(AMaskBitmap: TcxAlphaBitmap); - procedure TransformBitmap(AMode: TcxBitmapTransformationMode); - - procedure RefreshImage(AWidth, AHeight: Integer); overload; - procedure RefreshImage(const ARect: TRect); overload; - end; - - TcxImageInfo = class(TPersistent) - private - FImage: TBitmap; - FMask: TBitmap; - FMaskColor: TColor; - - procedure AssignBitmap(ASourceBitmap, ADestBitmap: TBitmap); - protected - procedure SetImage(Value: TBitmap); virtual; - procedure SetMask(Value: TBitmap); virtual; - public - constructor Create; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - property Image: TBitmap read FImage write SetImage; - property Mask: TBitmap read FMask write SetMask; - property MaskColor: TColor read FMaskColor write FMaskColor; - end; - - TcxImageList = class(TDragImageList) - private - FAlphaBlending: Boolean; - FFormatVersion: Integer; - FImages: TCollection; - FLockCount: Integer; - FSynchronization: Boolean; - - function GetCompressData: Boolean; - procedure SetCompressData(Value: Boolean); - - function GetHandle: HImageList; - procedure SetHandle(Value: HImageList); - - procedure ReadFormatVersion(AReader: TReader); - procedure WriteFormatVersion(AWriter: TWriter); - procedure ReadImageInfo(AReader: TReader); - procedure WriteImageInfo(AWriter: TWriter); - procedure ReadDesignInfo(AReader: TReader); - procedure WriteDesignInfo(AWriter: TWriter); - function NeedSynchronizeImageInfo: Boolean; - procedure SynchronizeImageInfo; - procedure SynchronizeHanle; - - procedure AddToInternalCollection(AImage, AMask: TBitmap; AMaskColor: TColor = clNone); - procedure DormantImage(AIndex: Integer); - function GetImageHandle(AImage: TBitmap): Integer; - protected - function ChangeLocked: Boolean; - procedure Change; override; - procedure DoDraw(Index: Integer; Canvas: TCanvas; X, Y: Integer; - Style: Cardinal; Enabled: Boolean = True); override; - procedure DoDrawEx(AIndex: Integer; ACanvas: TCanvas; - const ARect: TRect; AStyle: Cardinal; AStretch, ASmoothResize, AEnabled: Boolean); - - procedure Initialize; override; - procedure Finalize; - procedure DefineProperties(Filer: TFiler); override; - procedure Dormant; - - // for cxImageListEditor - procedure AddImageInfo(AImageInfo: TcxImageInfo); - procedure InternalCopyImageInfos(AImageList: TcxImageList; AStartIndex, AEndIndex: Integer); - procedure InternalCopyImages(AImageList: TCustomImageList; AStartIndex, AEndIndex: Integer); - procedure GetImageInfo(AIndex: Integer; AImageInfo: TcxImageInfo); overload; - public - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - // BaseFunctions - function Add(AImage, AMask: TBitmap): Integer; - function AddIcon(AIcon: TIcon): Integer; - function AddMasked(AImage: TBitmap; AMaskColor: TColor): Integer; - procedure Move(ACurIndex, ANewIndex: Integer); - procedure Delete(AIndex: Integer); - - // SubsidiaryFunctions - function AddImage(AValue: TCustomImageList; AIndex: Integer): Integer; - procedure AddImages(AImageList: TCustomImageList); - procedure CopyImages(AImageList: TCustomImageList; AStartIndex: Integer = 0; AEndIndex: Integer = -1); - procedure Clear; - procedure Insert(AIndex: Integer; AImage, AMask: TBitmap); - procedure InsertIcon(AIndex: Integer; AIcon: TIcon); - procedure InsertMasked(AIndex: Integer; AImage: TBitmap; AMaskColor: TColor); - procedure Replace(AIndex: Integer; AImage, AMask: TBitmap); - procedure ReplaceIcon(AIndex: Integer; AIcon: TIcon); - procedure ReplaceMasked(AIndex: Integer; AImage: TBitmap; AMaskColor: TColor); - - function LoadImage(AInstance: THandle; const AResourceName: string; - AMaskColor: TColor = clDefault; AWidth: Integer = 0; AFlags: TLoadResources = []): Boolean; - function GetResource(AResType: TResType; const AName: string; - AWidth: Integer; ALoadFlags: TLoadResources; AMaskColor: TColor): Boolean; - function GetInstRes(AInstance: THandle; AResType: TResType; const AName: string; - AWidth: Integer; ALoadFlags: TLoadResources; AMaskColor: TColor): Boolean; overload; - function GetInstRes(AInstance: THandle; AResType: TResType; AResID: DWORD; - AWidth: Integer; ALoadFlags: TLoadResources; AMaskColor: TColor): Boolean; overload; - function ResourceLoad(AResType: TResType; const AName: string; - AMaskColor: TColor): Boolean; - function ResInstLoad(AInstance: THandle; AResType: TResType; - const AName: string; AMaskColor: TColor): Boolean; - - procedure BeginUpdate; - procedure EndUpdate(AForceUpdate: Boolean = True); - - {$IFNDEF DELPHI6} - procedure Draw(ACanvas: TCanvas; X, Y, AIndex: Integer; - ADrawingStyle: TDrawingStyle; AImageType: TImageType; - AEnabled: Boolean = True); overload; - {$ENDIF} - procedure Draw(ACanvas: TCanvas; const ARect: TRect; AIndex: Integer; - AStretch: Boolean = True; ASmoothResize: Boolean = False; AEnabled: Boolean = True); overload; - - procedure GetImageInfo(AIndex: Integer; AImage, AMask: TBitmap); overload; - procedure GetImage(AIndex: Integer; AImage: TBitmap); - procedure GetMask(AIndex: Integer; AMask: TBitmap); - - class procedure GetImageInfo(AHandle: HIMAGELIST; AIndex: Integer; AImage, AMask: TBitmap); overload; - class function GetPixelFormat(AHandle: HIMAGELIST): Integer; - - property AlphaBlending: Boolean read FAlphaBlending write FAlphaBlending; - property Handle: HImageList read GetHandle write SetHandle; - published - property BlendColor; - property BkColor; - property CompressData: Boolean read GetCompressData write SetCompressData default False; - property DrawingStyle; - property Height; - property ImageType; - property ShareImages; - property Width; - property OnChange; - end; - - { TcxBrushCache } - - TcxBrushData = record - Brush: TBrush; - Color: TColor; - RefCount: Integer; - end; - - TcxBrushesData = array of TcxBrushData; - - EBrushCache = class(EdxException); - - TcxBrushCache = class - private - FCapacity: Integer; - FCount: Integer; - FData: TcxBrushesData; - FDeletedCount: Integer; - FLockRef: Integer; - protected - function Add(AColor: TColor): TBrush; - function AddItemAt(AIndex: Integer; AColor: TColor): TBrush; - procedure CacheCheck(Value: Boolean; const AMessage: string); - procedure Delete(AIndex: Integer); - function IndexOf(AColor: TColor; out AIndex: Integer): Boolean; - procedure InitItem(var AItem: TcxBrushData; AColor: TColor); - function IsSystemBrush(ABrush: TBrush): Boolean; - function FindNearestItem(AColor: TColor): Integer; - procedure Move(ASrc, ADst, ACount: Integer); - procedure Pack; - procedure Recreate; - procedure Release(AIndex: Integer); - public - destructor Destroy; override; - procedure BeginUpdate; - procedure EndUpdate; - procedure ReleaseBrush(var ABrush: TBrush); - procedure SetBrushColor(var ABrush: TBrush; AColor: TColor); - end; - -const - DisableMap: TcxColorTransitionMap = (RedScale: 0.0729; GreenScale: 0.7146; BlueScale: 0.2125; SrcAlpha: 105; SrcConstantAlpha: 151); - FadeMap: TcxColorTransitionMap = (RedScale: 0.299; GreenScale: 0.587; BlueScale: 0.114; SrcAlpha: 192; SrcConstantAlpha: 64); - GrayMap: TcxColorTransitionMap = (RedScale: 0.299; GreenScale: 0.587; BlueScale: 0.114; SrcAlpha: $FF; SrcConstantAlpha: $FF); - -type - TcxColorInfo = record - Name: string; - Color: TColor; - end; - -const - cxColorsByName: array[0..168] of TcxColorInfo = ( - (Name: 'aliceblue'; Color: $00FFF8F0), - (Name: 'antiquewhite'; Color: $00D7EBFA), - (Name: 'aqua'; Color: clAqua), - (Name: 'aquamarine'; Color: $007FD4FF), - (Name: 'azure'; Color: $00FFFFF0), - (Name: 'beige'; Color: $00DCF5F5), - (Name: 'bisque'; Color: $00C4E4FF), - (Name: 'black'; Color: clBlack), - (Name: 'blanchedalmond'; Color: $00CDFFFF), - (Name: 'blue'; Color: clBlue), - (Name: 'blueviolet'; Color: $00E22B8A), - (Name: 'brown'; Color: $002A2AA5), - (Name: 'burlywood'; Color: $0087B8DE), - (Name: 'cadetblue'; Color: $00A09E5F), - (Name: 'chartreuse'; Color: $0000FF7F), - (Name: 'chocolate'; Color: $001E69D2), - (Name: 'coral'; Color: $00507FFF), - (Name: 'cornflowerblue'; Color: $00ED9564), - (Name: 'cornsilk'; Color: $00DCF8FF), - (Name: 'crimson'; Color: $003C14DC), - (Name: 'cyan'; Color: $00FFFF00), - (Name: 'darkblue'; Color: $008B0000), - (Name: 'darkcyan'; Color: $008B8B00), - (Name: 'darkgoldenrod'; Color: $000B86B8), - (Name: 'darkgray'; Color: $00A9A9A9), - (Name: 'darkgreen'; Color: $00006400), - (Name: 'darkkhaki'; Color: $006BB7BD), - (Name: 'darkmagenta'; Color: $008B008B), - (Name: 'darkolivegreen'; Color: $002F6B55), - (Name: 'darkorange'; Color: $00008CFF), - (Name: 'darkorchid'; Color: $00CC3299), - (Name: 'darkred'; Color: $0000008B), - (Name: 'darksalmon'; Color: $007A96E9), - (Name: 'darkseagreen'; Color: $008FBC8F), - (Name: 'darkslateblue'; Color: $008B3D48), - (Name: 'darkslategray'; Color: $004F4F2F), - (Name: 'darkturquoise'; Color: $00D1CE00), - (Name: 'darkviolet'; Color: $00D30094), - (Name: 'deeppink'; Color: $009314FF), - (Name: 'deepskyblue'; Color: $00FFBF00), - (Name: 'dimgray'; Color: $00696969), - (Name: 'dodgerblue'; Color: $00FF901E), - (Name: 'firebrick'; Color: $002222B2), - (Name: 'floralwhite'; Color: $00F0FAFF), - (Name: 'forestgreen'; Color: $00228B22), - (Name: 'fuchsia'; Color: $00FF00FF), - (Name: 'gainsboro'; Color: $00DCDCDC), - (Name: 'ghostwhite'; Color: $00FFF8F8), - (Name: 'gold'; Color: $0000D7FF), - (Name: 'goldenrod'; Color: $0020A5DA), - (Name: 'gray'; Color: clGray), - (Name: 'green'; Color: clGreen), - (Name: 'greenyellow'; Color: $002FFFAD), - (Name: 'honeydew'; Color: $00F0FFF0), - (Name: 'hotpink'; Color: $00B469FF), - (Name: 'indianred'; Color: $005C5CCD), - (Name: 'indigo'; Color: $0082004B), - (Name: 'ivory'; Color: $00F0F0FF), - (Name: 'khaki'; Color: $008CE6F0), - (Name: 'lavender'; Color: $00FAE6E6), - (Name: 'lavenderblush'; Color: $00F5F0FF), - (Name: 'lawngreen'; Color: $0000FC7C), - (Name: 'lemonchiffon'; Color: $00CDFAFF), - (Name: 'lightblue'; Color: $00E6D8AD), - (Name: 'lightcoral'; Color: $008080F0), - (Name: 'lightcyan'; Color: $00FFFFE0), - (Name: 'lightgoldenrodyellow'; Color: $00D2FAFA), - (Name: 'lightgreen'; Color: $0090EE90), - (Name: 'lightgrey'; Color: $00D3D3D3), - (Name: 'lightpink'; Color: $00C1B6FF), - (Name: 'lightsalmon'; Color: $007AA0FF), - (Name: 'lightseagreen'; Color: $00AAB220), - (Name: 'lightskyblue'; Color: $00FACE87), - (Name: 'lightslategray'; Color: $00998877), - (Name: 'lightsteelblue'; Color: $00DEC4B0), - (Name: 'lightyellow'; Color: $00E0FFFF), - (Name: 'lime'; Color: clLime), - (Name: 'limegreen'; Color: $0032CD32), - (Name: 'linen'; Color: $00E6F0FA), - (Name: 'magenta'; Color: $00FF00FF), - (Name: 'maroon'; Color: clMaroon), - (Name: 'mediumaquamarine'; Color: $00AACD66), - (Name: 'mediumblue'; Color: $00CD0000), - (Name: 'mediumorchid'; Color: $00D355BA), - (Name: 'mediumpurple'; Color: $00DB7093), - (Name: 'mediumseagreen'; Color: $0071B33C), - (Name: 'mediumpurple'; Color: $00DB7093), - (Name: 'mediumslateblue'; Color: $00EE687B), - (Name: 'mediumspringgreen'; Color: $009AFA00), - (Name: 'mediumturquoise'; Color: $00CCD148), - (Name: 'mediumvioletred'; Color: $008515C7), - (Name: 'midnightblue'; Color: $00701919), - (Name: 'mintcream'; Color: $00FAFFF5), - (Name: 'mistyrose'; Color: $00E1E4FF), - (Name: 'moccasin'; Color: $00B5E4FF), - (Name: 'navajowhite'; Color: $00ADDEFF), - (Name: 'navy'; Color: clNavy), - (Name: 'oldlace'; Color: $00E6F5FD), - (Name: 'olive'; Color: $00008080), - (Name: 'olivedrab'; Color: $00238E6B), - (Name: 'orange'; Color: $0000A5FF), - (Name: 'orangered'; Color: $000045FF), - (Name: 'orchid'; Color: $00D670DA), - (Name: 'palegoldenrod'; Color: $00AAE8EE), - (Name: 'palegreen'; Color: $0098FB98), - (Name: 'paleturquoise'; Color: $00EEEEAF), - (Name: 'palevioletred'; Color: $009370DB), - (Name: 'papayawhip'; Color: $00D5EFFF), - (Name: 'peachpuff'; Color: $00BDDBFF), - (Name: 'peru'; Color: $003F85CD), - (Name: 'pink'; Color: $00CBC0FF), - (Name: 'plum'; Color: $00DDA0DD), - (Name: 'powderblue'; Color: $00E6E0B0), - (Name: 'purple'; Color: $00800080), - (Name: 'red'; Color: clRed), - (Name: 'rosybrown'; Color: $008F8FBC), - (Name: 'royalblue'; Color: $00E16941), - (Name: 'saddlebrown'; Color: $0013458B), - (Name: 'salmon'; Color: $007280FA), - (Name: 'sandybrown'; Color: $0060A4F4), - (Name: 'seagreen'; Color: $00578B2E), - (Name: 'seashell'; Color: $00EEF5FF), - (Name: 'sienna'; Color: $002D52A0), - (Name: 'silver'; Color: $00C0C0C0), - (Name: 'skyblue'; Color: $00EBCE87), - (Name: 'slateblue'; Color: $00CD5A6A), - (Name: 'slategray'; Color: $00908070), - (Name: 'snow'; Color: $00FAFAFF), - (Name: 'springgreen'; Color: $007FFF00), - (Name: 'steelblue'; Color: $00B48246), - (Name: 'tan'; Color: $008CB4D2), - (Name: 'teal'; Color: clTeal), - (Name: 'thistle'; Color: $00D8BFD8), - (Name: 'tomato'; Color: $004763FD), - (Name: 'turquoise'; Color: $00D0E040), - (Name: 'violet'; Color: $00EE82EE), - (Name: 'wheat'; Color: $00B3DEF5), - (Name: 'white'; Color: clWhite), - (Name: 'whitesmoke'; Color: $00F5F5F5), - (Name: 'yellow'; Color: clYellow), - (Name: 'yellowgreen'; Color: $0032CD9A), - - (Name: 'activeborder'; Color: clActiveBorder), - (Name: 'activecaption'; Color: clActiveCaption), - (Name: 'appworkspace'; Color: clAppWorkSpace), - (Name: 'background'; Color: clBackground), - (Name: 'buttonface'; Color: clBtnFace), - (Name: 'buttonhighlight'; Color: clBtnHighlight), - (Name: 'buttonshadow'; Color: clBtnShadow), - (Name: 'buttontext'; Color: clBtnText), - (Name: 'captiontext'; Color: clCaptionText), - (Name: 'graytext'; Color: clGrayText), - (Name: 'highlight'; Color: clHighlight), - (Name: 'highlighttext'; Color: clHighlightText), - (Name: 'inactiveborder'; Color: clInactiveBorder), - (Name: 'inactivecaption'; Color: clInactiveCaption), - (Name: 'inactivecaptiontext'; Color: clInactiveCaptionText), - (Name: 'infobackground'; Color: clInfoBk), - (Name: 'infotext'; Color: clInfoText), - (Name: 'menu'; Color: clMenu), - (Name: 'menutext'; Color: clMenuText), - (Name: 'scrollbar'; Color: clScrollBar), - (Name: 'threeddarkshadow'; Color: cl3DDkShadow), - (Name: 'threedface'; Color: clBtnFace), - (Name: 'threedhighlight'; Color: clHighlightText), - (Name: 'threedlightshadow'; Color: cl3DLight), - (Name: 'threedshadow'; Color: clBtnShadow), - (Name: 'window'; Color: clWindow), - (Name: 'windowframe'; Color: clWindowFrame), - (Name: 'windowtext'; Color: clWindowText) - ); - -var - CustomDrawImageProc: TcxDrawImageProc = nil; - -function cxFlagsToDTFlags(Flags: Integer): Integer; - -procedure cxSetImageList(const AValue: TCustomImageList; var AFieldValue: TCustomImageList; const AChangeLink: TChangeLink; ANotifyComponent: TComponent); -procedure ExtendRect(var Rect: TRect; const AExtension: TRect); -function IsGlyphAssigned(AGlyph: TBitmap): Boolean; -function IsImageAssigned(AImageList: TCustomImageList; AImageIndex: Integer): Boolean; - -function IsXPManifestEnabled: Boolean; - -function GetRealColor(AColor: TColor): TColor; - -// light colors -function GetLightColor(ABtnFaceColorPart, AHighlightColorPart, AWindowColorPart: TcxColorPart): TColor; -function GetLightBtnFaceColor: TColor; -function GetLightDownedColor: TColor; -function GetLightDownedSelColor: TColor; -function GetLightSelColor: TColor; - -function GetBitmapBits(ABitmap: TBitmap; ATopDownDIB: Boolean): TRGBColors; -procedure SetBitmapBits(ABitmap: TBitmap; var AColors: TRGBColors; ATopDownDIB: Boolean); -function SystemAlphaBlend(ADestDC, ASrcDC: HDC; const ADestRect, ASrcRect: TRect; AConstantAlpha: Byte = $FF): Boolean; - -function cxColorByName(const AText: string; var AColor: TColor): Boolean; -function cxNameByColor(AColor: TColor; var AText: string): Boolean; -function cxColorIsEqual(const AColor1, AColor2: TRGBQuad): Boolean; - -procedure cxAlphaBlend(ADestBitmap, ASrcBitmap: TBitmap; const ADestRect, ASrcRect: TRect; ASmoothImage: Boolean = False; AConstantAlpha: Byte = $FF); overload; -procedure cxAlphaBlend(ADestDC: HDC; ASrcBitmap: TBitmap; const ADestRect, ASrcRect: TRect; ASmoothImage: Boolean = False; AConstantAlpha: Byte = $FF); overload; -procedure cxAlphaBlend(ADestDC, ASrcDC: HDC; const ADestRect, ASrcRect: TRect; ASmoothImage: Boolean = False; AConstantAlpha: Byte = $FF); overload; -procedure cxBitBlt(ADestDC, ASrcDC: HDC; const ADestRect: TRect; const ASrcTopLeft: TPoint; ROP: DWORD); -//procedure cxBitmapToTrueColorBitmap(ABitmap: TBitmap); -> cxMakeTrueColorBitmap -procedure cxBlendFunction(const ASource: TRGBQuad; var ADest: TRGBQuad; ASourceConstantAlpha: Byte); -function cxCreateBitmap(const ASize: TSize; AFormat: TPixelFormat = pf24bit): TBitmap; overload; -function cxCreateBitmap(const ARect: TRect; AFormat: TPixelFormat = pf24bit): TBitmap; overload; -function cxCreateBitmap(AWidth, AHeight: Integer; AFormat: TPixelFormat = pf24bit): TBitmap; overload; -function cxCreateTrueColorBitmap(const ASize: TSize): TBitmap; overload; -function cxCreateTrueColorBitmap(AWidth, AHeight: Integer): TBitmap; overload; -function cxCreateTrueColorBitmapHandle(AWidth, AHeight: Integer; ABPP: Integer = 32): HBitmap; -function cxCreateRegionFromBitmap(ABitmap: TBitmap; ATransparentColor: TColor): HRGN; -procedure cxDrawDesignRect(ACanvas: TcxCanvas; const ARect: TRect; ASelected: Boolean); -procedure cxDrawBitmap(ADestDC: THandle; ASrcBitmap: TBitmap; - const ADestRect: TRect; const ASrcPoint: TPoint; AMode: Integer = SRCCOPY); -procedure cxDrawImage(ADC: THandle; AGlyphRect, ABackgroundRect: TRect; AGlyph: TBitmap; - AImages: TCustomImageList; AImageIndex: Integer; ADrawMode: TcxImageDrawMode; - ASmoothImage: Boolean = False; ABrush: THandle = 0; - ATransparentColor: TColor = clNone; AUseLeftBottomPixelAsTransparent: Boolean = True); -procedure cxDrawImageList(AImageListHandle: HIMAGELIST; AImageIndex: Integer; - ADC: HDC; APoint: TPoint; ADrawingStyle: TDrawingStyle; AImageType: TImageType); -procedure cxDrawHatch(ADC: HDC; const ARect: TRect; AColor1, AColor2: TColor; AStep: Byte; AAlpha1: Byte = $FF; AAlpha2: Byte = $FF); -procedure cxSmoothResizeBitmap(ASource, ADestination: TBitmap; AForceUseLanczos3Filter: Boolean = False); - -procedure cxMakeTrueColorBitmap(ASourceBitmap, ATrueColorBitmap: TBitmap); -procedure cxMakeMaskBitmap(ASourceBitmap, AMaskBitmap: TBitmap); - -{!!! TODO: adapt to .net} -// mouse cursor size -function cxGetCursorSize: TSize; - -// image helper routines -procedure cxAlphaBlend(ASource: TBitmap; ARect: TRect; const ASelColor: TColor; Alpha: Byte = 170); overload; -procedure cxAlphaBlend(ADest, ABkSource, ASource: TBitmap; Alpha: Byte = cxDefaultAlphaValue); overload; -procedure cxApplyViewParams(ACanvas: TcxCanvas; const AViewParams: TcxViewParams); -procedure cxCopyImage(ASource, ADest: TBitmap; const ASrcOffset, ADstOffset: TPoint; const ARect: TRect); overload; -procedure cxCopyImage(ASource, ADest: TCanvas; const ASrcOffset, ADstOffset: TPoint; const ARect: TRect); overload; -procedure cxDrawArrows(ACanvas: TCanvas; const ARect: TRect; - ASide: TcxBorder; AColor: TColor; APenColor: TColor = clDefault); -procedure cxFillHalfToneRect(Canvas: TCanvas; const ARect: TRect; ABkColor, AColor: TColor); -procedure cxSetCanvasOrg(ACanvas: TCanvas; var AOrg: TRect); - -function cxGetTextExtentPoint32(ADC: THandle; const AText: string; out ASize: TSize; ACharCount: Integer = -1): Boolean; -procedure cxGetTextLines(const AText: string; ACanvas: TcxCanvas; const ARect: TRect; ALines: TStrings); -function cxDrawText(ADC: THandle; const AText: string; var ARect: TRect; - AFormat: UINT; ACharCount: Integer = - 1): Integer; -function cxExtTextOut(ADC: THandle; const AText: string; const APoint: TPoint; - const ARect: TRect; AOptions: UINT; ACharCount: Integer = -1): Boolean; overload; -function cxExtTextOut(ADC: THandle; const AText: string; const APoint: TPoint; - AOptions: UINT; ACharCount: Integer = -1): Boolean; overload; -procedure cxInvalidateRect(AHandle: THandle; const ARect: TRect; AEraseBackground: Boolean = True); overload; -procedure cxInvalidateRect(AHandle: THandle; AEraseBackground: Boolean = True); overload; - -type - TcxModifyStringType = (mstEndEllipsis, mstPathEllipsis); - -function cxTextHeight(AFont: TFont; const S: string = 'Wg'; AFontSize: Integer = 0): Integer; -function cxTextWidth(AFont: TFont; const S: string; AFontSize: Integer = 0): Integer; -function cxTextExtent(AFont: TFont; const S: string; AFontSize: Integer = 0): TSize; -function cxTextSize(ADC: THandle; const AText: string): TSize; -function cxGetTextRect(ADC: THandle; const AText: string; ARowCount: Integer; - AReturnMaxRectHeight: Boolean = False): TRect; overload; -function cxGetTextRect(AFont: TFont; const AText: string; ARowCount: Integer): TRect; overload; -function cxGetScreenPixelsPerInch(AHorizontal: Boolean = False): Integer; -function cxGetStringAdjustedToWidth(ADC: HDC; AFontHandle: HFONT; const S: string; AWidth: Integer; AModifyStringType: TcxModifyStringType = mstEndEllipsis): string; overload; -function cxGetStringAdjustedToWidth(AFont: TFont; const S: string; AWidth: Integer; AModifyStringType: TcxModifyStringType = mstEndEllipsis): string; overload; - -function cxCompareBitmaps(ABitmap1, ABitmap2: TBitmap): Boolean; -function cxGetBitmapData(ABitmapHandle: HBITMAP; out ABitmapData: Windows.TBitmap): Boolean; -function cxGetBitmapPixelFormat(ABitmap: TBitmap): Integer; -function cxGetBrushData(ABrushHandle: HBRUSH; out ALogBrush: TLogBrush): Boolean; overload; -function cxGetBrushData(ABrushHandle: HBRUSH): TLogBrush; overload; -function cxGetFontData(AFontHandle: HFONT; out ALogFont: TLogFont): Boolean; -function cxGetPenData(APenHandle: HPEN; out ALogPen: TLogPen): Boolean; -procedure cxResetFont(const AFont: TFont); - -function cxGetWritingDirection(AFontCharset: TFontCharset; const AText: string): TCanvasOrientation; -procedure cxDrawThemeParentBackground(AControl: TWinControl; ACanvas: TcxCanvas; const ARect: TRect); overload; -procedure cxDrawThemeParentBackground(AControl: TWinControl; ACanvas: TCanvas; const ARect: TRect); overload; -procedure cxDrawTransparentControlBackground(AControl: TWinControl; - ACanvas: TcxCanvas; ARect: TRect; APaintParentWithChildren: Boolean = True); overload; -procedure cxDrawTransparentControlBackground(AControl: TWinControl; - ACanvas: TCanvas; const ARect: TRect; APaintParentWithChildren: Boolean = True); overload; -function cxScreenCanvas: TcxScreenCanvas; -function cxPaintCanvas: TcxPaintCanvas; - -procedure cxPaintTo(ADrawControl: TWinControl; ACanvas: TcxCanvas; const AOffset: TPoint; const ADrawRect: TRect; AConsiderWindowRegion: Boolean = True); - -procedure cxTransformImages(AImageList: TcxImageList; ABkColor: TColor; AEnabled: Boolean = True); overload; -procedure cxTransformImages(ASourceImageList, ADestinationImageList: TcxImageList; ABkColor: TColor; AEnabled: Boolean = True); overload; - -implementation - -uses - Messages, Math, Menus, cxControls, cxGeometry, dxUxTheme, dxOffice11, - cxDrawTextUtils; - -type - TCanvasAccess = class(TCanvas); - TBitmapAccess = class(TBitmap); - - TContributor = record - Pixel: Integer; - Weight: Integer; - end; - TContributorArray = array of TContributor; - - TContributors = record - Count: Integer; - Contributors: TContributorArray; - end; - TContributorList = array of TContributors; - -const -{!!! TODO: adapt to .net} - BaseRgns: array[0..3, 0..6, 0..1] of Integer = - (((0, -1), (-5, -6),(-2, -6), (-2, -9), (2, -9), (2, -6), (5, -6)), - ((0, 0), (5, 5), (2, 5), (2, 8), (-2, 8), (-2, 5), (-5, 5)), - ((-1, 0), (-6, -5), (-6, -2), (-9, -2), (-9, 2), (-6, 2), (-6, 5)), - ((0, 0), (5, 5), (5, 2), (8, 2), (8, -2), (5, -2), (5, -5))); - DefaultBlendFunction: TBlendFunction = - (BlendOp: AC_SRC_OVER; - BlendFlags: 0; - SourceConstantAlpha: cxDefaultAlphaValue; - AlphaFormat: $0); - -var - FUnitIsFinalized: Boolean; - VCLAlphaBlend: function(DC: LongWord; p2, p3, p4, p5: Integer; DC6: LongWord; - p7, p8, p9, p10: Integer; p11: TBlendFunction): BOOL; stdcall; - ScreenCanvas: TcxScreenCanvas = nil; - PaintCanvas: TcxPaintCanvas; - DrawBitmap, ImageBitmap, MaskBitmap: TcxAlphaBitmap; - -procedure cxBitmapInit(var ABitmap: TcxAlphaBitmap; AWidth, AHeight: Integer); -begin - if ABitmap = nil then - ABitmap := TcxAlphaBitmap.CreateSize(AWidth, AHeight, True) - else - ABitmap.RefreshImage(AWidth, AHeight); -end; - -function GetDrawBitmap(AWidth, AHeight: Integer): TcxAlphaBitmap; -begin - cxBitmapInit(DrawBitmap, AWidth, AHeight); - Result := DrawBitmap; -end; - -function GetImageBitmap(AWidth, AHeight: Integer): TcxAlphaBitmap; -begin - cxBitmapInit(ImageBitmap, AWidth, AHeight); - Result := ImageBitmap; -end; - -function GetMaskBitmap(AWidth, AHeight: Integer): TcxAlphaBitmap; -begin - cxBitmapInit(MaskBitmap, AWidth, AHeight); - Result := MaskBitmap; -end; - -function cxFlagsToDTFlags(Flags: Integer): Integer; -const - DT_NOFULLWIDTHCHARBREAK = $80000; -begin - Result := DT_NOPREFIX; - if cxAlignLeft and Flags <> 0 then - Result := Result or DT_LEFT; - if cxAlignRight and Flags <> 0 then - Result := Result or DT_RIGHT; - if cxAlignHCenter and Flags <> 0 then - Result := Result or DT_CENTER; - if cxAlignTop and Flags <> 0 then - Result := Result or DT_TOP; - if cxAlignBottom and Flags <> 0 then - Result := Result or DT_BOTTOM; - if cxAlignVCenter and Flags <> 0 then - Result := Result or DT_VCENTER; - if cxSingleLine and Flags <> 0 then - Result := Result or DT_SINGLELINE; - if cxDontClip and Flags <> 0 then - Result := Result or DT_NOCLIP; - if cxExpandTabs and Flags <> 0 then - Result := Result or DT_EXPANDTABS; - if cxShowPrefix and Flags <> 0 then - Result := Result and not DT_NOPREFIX; - if cxWordBreak and Flags <> 0 then - begin - Result := Result or DT_WORDBREAK; - if cxDontBreakChars and Flags = 0 then - Result := Result or DT_EDITCONTROL - else - if cxNoFullWidthCharBreak and Flags <> 0 then - Result := Result or DT_NOFULLWIDTHCHARBREAK; - end; - if cxShowEndEllipsis and Flags <> 0 then - Result := Result or DT_END_ELLIPSIS; - if cxDontPrint and Flags <> 0 then - Result := Result or DT_CALCRECT; - if cxShowPathEllipsis and Flags <> 0 then - Result := Result or DT_PATH_ELLIPSIS; -end; - -procedure cxSetImageList(const AValue: TCustomImageList; var AFieldValue: TCustomImageList; const AChangeLink: TChangeLink; ANotifyComponent: TComponent); -begin - if AValue <> AFieldValue then - begin - if AFieldValue <> nil then - begin - AFieldValue.RemoveFreeNotification(ANotifyComponent); - if AChangeLink <> nil then - AFieldValue.UnRegisterChanges(AChangeLink); - end; - AFieldValue := AValue; - if AValue <> nil then - begin - if AChangeLink <> nil then - AValue.RegisterChanges(AChangeLink); - AValue.FreeNotification(ANotifyComponent); - end; - if AChangeLink <> nil then - AChangeLink.Change; - end; -end; - -procedure ExtendRect(var Rect: TRect; const AExtension: TRect); -begin - with AExtension do - begin - Inc(Rect.Left, Left); - Inc(Rect.Top, Top); - Dec(Rect.Right, Right); - Dec(Rect.Bottom, Bottom); - end; -end; - -function IsGlyphAssigned(AGlyph: TBitmap): Boolean; -begin - Result := (AGlyph <> nil) and not AGlyph.Empty; -end; - -function IsImageAssigned(AImageList: TCustomImageList; AImageIndex: Integer): Boolean; -begin - Result := (AImageList <> nil) and (0 <= AImageIndex) and (AImageIndex < AImageList.Count); -end; - -function IsXPManifestEnabled: Boolean; -{$IFNDEF DELPHI7} -const - ComCtlVersionIE6 = $00060000; -{$ENDIF} -begin - Result := GetComCtlVersion >= ComCtlVersionIE6 -end; - -function GetRealColor(AColor: TColor): TColor; -var - DC: HDC; -begin - DC := GetDC(0); - Result := GetNearestColor(DC, AColor); - ReleaseDC(0, DC); -end; - -function GetChannelValue(AValue: Integer): Byte; -begin - if AValue < 0 then - Result := 0 - else - if AValue > 255 then - Result := 255 - else - Result := AValue; -end; - -function GetLightColor(ABtnFaceColorPart, AHighlightColorPart, AWindowColorPart: TcxColorPart): TColor; -var - ABtnFaceColor, AHighlightColor, AWindowColor: TColor; - - function GetLightIndex(ABtnFaceValue, AHighlightValue, AWindowValue: Byte): Integer; - begin - Result := GetChannelValue( - MulDiv(ABtnFaceValue, ABtnFaceColorPart, 100) + - MulDiv(AHighlightValue, AHighlightColorPart, 100) + - MulDiv(AWindowValue, AWindowColorPart, 100)); - end; - -begin - ABtnFaceColor := ColorToRGB(clBtnFace); - AHighlightColor := ColorToRGB(clHighlight); - AWindowColor := ColorToRGB(clWindow); - if (ABtnFaceColor = 0) or (ABtnFaceColor = $FFFFFF) then - Result := AHighlightColor - else - Result := RGB( - GetLightIndex(GetRValue(ABtnFaceColor), GetRValue(AHighlightColor), GetRValue(AWindowColor)), - GetLightIndex(GetGValue(ABtnFaceColor), GetGValue(AHighlightColor), GetGValue(AWindowColor)), - GetLightIndex(GetBValue(ABtnFaceColor), GetBValue(AHighlightColor), GetBValue(AWindowColor))); -end; - -function GetLightBtnFaceColor: TColor; - - function GetLightValue(Value: Byte): Byte; - begin - Result := GetChannelValue(Value + MulDiv(255 - Value, 16, 100)); - end; - -begin - Result := ColorToRGB(clBtnFace); - Result := RGB( - GetLightValue(GetRValue(Result)), - GetLightValue(GetGValue(Result)), - GetLightValue(GetBValue(Result))); - Result := GetRealColor(Result); -end; - -function GetLightDownedColor: TColor; -begin - Result := GetRealColor(GetLightColor(11, 9, 73)); -end; - -function GetLightDownedSelColor: TColor; -begin - Result := GetRealColor(GetLightColor(14, 44, 40)); -end; - -function GetLightSelColor: TColor; -begin - Result := GetRealColor(GetLightColor(-2, 30, 72)); -end; - -procedure FillBitmapInfoHeader(out AHeader: TBitmapInfoHeader; AWidth, AHeight: Integer; ATopDownDIB: WordBool); overload; -begin - cxZeroMemory(@AHeader, SizeOf(AHeader)); - AHeader.biSize := SizeOf(TBitmapInfoHeader); - AHeader.biWidth := AWidth; - if ATopDownDIB then - AHeader.biHeight := -AHeight - else - AHeader.biHeight := AHeight; - AHeader.biPlanes := 1; - AHeader.biBitCount := 32; - AHeader.biCompression := BI_RGB; -end; - -procedure FillBitmapInfoHeader(out AHeader: TBitmapInfoHeader; ABitmap: TBitmap; ATopDownDIB: WordBool); overload; -begin - FillBitmapInfoHeader(AHeader, ABitmap.Width, ABitmap.Height, ATopDownDIB); -end; - -function InternalGetDIB(ABitmap: TBitmap; const AColors: TRGBColors; ATopDownDIB: WordBool): Boolean; -var - ADC: HDC; - ABitmapInfo: TBitmapInfo; -begin - if (ABitmap.Width <> 0) and (ABitmap.Height <> 0) then - begin - FillBitmapInfoHeader(ABitmapInfo.bmiHeader, ABitmap, ATopDownDIB); - ADC := CreateCompatibleDC(0); - try - Result := GetDIBits(ADC, ABitmap.Handle, 0, ABitmap.Height, AColors, ABitmapInfo, DIB_RGB_COLORS) <> 0; - finally - DeleteDC(ADC); - end; - end - else - Result := False; -end; - -function InternalSetDIB(ABitmap: TBitmap; const AColors: TRGBColors; ATopDownDIB: WordBool): Boolean; -var - ADC: HDC; - ABitmapInfo: TBitmapInfo; -begin - if (ABitmap.Width <> 0) and (ABitmap.Height <> 0) then - begin - FillBitmapInfoHeader(ABitmapInfo.bmiHeader, ABitmap, ATopDownDIB); - ADC := CreateCompatibleDC(0); - try - Result := SetDIBits(ADC, ABitmap.Handle, 0, ABitmap.Height, AColors, ABitmapInfo, DIB_RGB_COLORS) <> 0; - finally - DeleteDC(ADC); - end; - end - else - Result := False; -end; - -function GetBitmapBits(ABitmap: TBitmap; ATopDownDIB: Boolean): TRGBColors; -begin - SetLength(Result, ABitmap.Width * ABitmap.Height); - InternalGetDIB(ABitmap, Result, ATopDownDIB); -end; - -procedure SetBitmapBits(ABitmap: TBitmap; var AColors: TRGBColors; ATopDownDIB: Boolean); -begin - InternalSetDIB(ABitmap, AColors, ATopDownDIB); - AColors := nil; -end; - -function SystemAlphaBlend(ADestDC, ASrcDC: HDC; const ADestRect, ASrcRect: TRect; AConstantAlpha: Byte = $FF): Boolean; -{$IFNDEF DELPHI6} -const - AC_SRC_ALPHA = 1; -{$ENDIF} -var - ABlendFunction: TBlendFunction; -begin - ABlendFunction.BlendOp := AC_SRC_OVER; - ABlendFunction.BlendFlags := 0; - ABlendFunction.SourceConstantAlpha := AConstantAlpha; - ABlendFunction.AlphaFormat := AC_SRC_ALPHA; - Result := Assigned(VCLAlphaBlend) and VCLAlphaBlend( - ADestDC, ADestRect.Left, ADestRect.Top, cxRectWidth(ADestRect), cxRectHeight(ADestRect), - ASrcDC, ASrcRect.Left, ASrcRect.Top, cxRectWidth(ASrcRect), cxRectHeight(ASrcRect), ABlendFunction); -end; - -function cxColorByName(const AText: string; var AColor: TColor): Boolean; -var - I: Integer; -begin - Result := False; - for I := Low(cxColorsByName) to High(cxColorsByName) do - if SameText(AText, cxColorsByName[I].Name) then - begin - AColor := cxColorsByName[I].Color; - Result := True; - Break; - end; -end; - -function cxNameByColor(AColor: TColor; var AText: string): Boolean; -var - I: Integer; -begin - Result := False; - for I := Low(cxColorsByName) to High(cxColorsByName) do - if AColor = cxColorsByName[I].Color then - begin - AText := cxColorsByName[I].Name; - Result := True; - Break; - end; -end; - -procedure CommonAlphaBlend(ADestDC, ASrcDC: HDC; const ADestRect, ASrcRect: TRect; ASmoothImage: Boolean; AConstantAlpha: Byte = $FF); - - function CreateDirectBitmap(ASrcDC: HDC; const ASrcRect: TRect): TBitmap; - var - ARect: TRect; - begin - ARect := Rect(0, 0, cxRectWidth(ASrcRect), cxRectHeight(ASrcRect)); - Result := cxCreateBitmap(ARect, pf32bit); - Result.Canvas.Brush.Color := 0; - Result.Canvas.FillRect(ARect); - cxBitBlt(Result.Canvas.Handle, ASrcDC, ARect, ASrcRect.TopLeft, SRCCOPY); - end; - - function cxRectIdentical(const ARect1, ARect2: TRect): Boolean; - begin - Result := (cxRectWidth(ARect1) = cxRectWidth(ARect2)) and (cxRectHeight(ARect1) = cxRectHeight(ARect2)); - end; - - procedure ResizeBitmap(ADestBitmap, ASrcBitmap: TBitmap); - begin - StretchBlt(ADestBitmap.Canvas.Handle, 0, 0, ADestBitmap.Width, ADestBitmap.Height, - ASrcBitmap.Canvas.Handle, 0, 0, ASrcBitmap.Width, ASrcBitmap.Height, SRCCOPY); - end; - - procedure InternalAlphaBlend(ADestBitmap, ASrcBitmap: TBitmap); - - procedure SoftwareAlphaBlend(AWidth, AHeight: Integer); - var - ASourceColors, ADestColors: TRGBColors; - I: Integer; - begin - ASourceColors := GetBitmapBits(ASrcBitmap, False); - ADestColors := GetBitmapBits(ADestBitmap, False); - for I := 0 to AWidth * AHeight - 1 do - cxBlendFunction(ASourceColors[I], ADestColors[I], AConstantAlpha); - SetBitmapBits(ADestBitmap, ADestColors, False); - end; - - var - AClientRect: TRect; - begin - AClientRect := Rect(0, 0, ADestBitmap.Width, ADestBitmap.Height); - if not SystemAlphaBlend(ADestBitmap.Canvas.Handle, ASrcBitmap.Canvas.Handle, AClientRect, AClientRect, AConstantAlpha) then - SoftwareAlphaBlend(AClientRect.Right, AClientRect.Bottom); - end; - - procedure ComplexAlphaBlend; - var - ADirectDestBitmap, ADirectSrcBitmap, AStretchedSrcBitmap: TBitmap; - begin - ADirectSrcBitmap := CreateDirectBitmap(ASrcDC, ASrcRect); - ADirectDestBitmap := CreateDirectBitmap(ADestDC, ADestRect); - AStretchedSrcBitmap := cxCreateBitmap(ADestRect, pf32bit); - try - if ASmoothImage then - cxSmoothResizeBitmap(ADirectSrcBitmap, AStretchedSrcBitmap, True) - else - ResizeBitmap(AStretchedSrcBitmap, ADirectSrcBitmap); - InternalAlphaBlend(ADirectDestBitmap, AStretchedSrcBitmap); - cxBitBlt(ADestDC, ADirectDestBitmap.Canvas.Handle, ADestRect, cxNullPoint, SRCCOPY); - finally - AStretchedSrcBitmap.Free; - ADirectDestBitmap.Free; - ADirectSrcBitmap.Free; - end; - end; - -begin - ASmoothImage := ASmoothImage and not cxRectIdentical(ADestRect, ASrcRect); - if IsWin9X or not Assigned(VCLAlphaBlend) or ASmoothImage then - ComplexAlphaBlend - else - SystemAlphaBlend(ADestDC, ASrcDC, ADestRect, ASrcRect, AConstantAlpha); -end; - -procedure cxAlphaBlend(ADestBitmap, ASrcBitmap: TBitmap; const ADestRect, ASrcRect: TRect; ASmoothImage: Boolean = False; AConstantAlpha: Byte = $FF); overload; -begin - CommonAlphaBlend(ADestBitmap.Canvas.Handle, ASrcBitmap.Canvas.Handle, ADestRect, ASrcRect, ASmoothImage, AConstantAlpha); -end; - -procedure cxAlphaBlend(ADestDC: HDC; ASrcBitmap: TBitmap; const ADestRect, ASrcRect: TRect; ASmoothImage: Boolean = False; AConstantAlpha: Byte = $FF); overload; -begin - CommonAlphaBlend(ADestDC, ASrcBitmap.Canvas.Handle, ADestRect, ASrcRect, ASmoothImage, AConstantAlpha); -end; - -procedure cxAlphaBlend(ADestDC, ASrcDC: HDC; const ADestRect, ASrcRect: TRect; ASmoothImage: Boolean = False; AConstantAlpha: Byte = $FF); overload; -begin - CommonAlphaBlend(ADestDC, ASrcDC, ADestRect, ASrcRect, ASmoothImage, AConstantAlpha); -end; - -procedure cxBitBlt(ADestDC, ASrcDC: HDC; const ADestRect: TRect; const ASrcTopLeft: TPoint; ROP: DWORD); -begin - BitBlt(ADestDC, ADestRect.Left, ADestRect.Top, cxRectWidth(ADestRect), cxRectHeight(ADestRect), - ASrcDC, ASrcTopLeft.X, ASrcTopLeft.Y, ROP); -end; - -procedure cxBlendFunction(const ASource: TRGBQuad; var ADest: TRGBQuad; ASourceConstantAlpha: Byte); - - function GetValue(AValue: Single): Byte; - begin - Result := GetChannelValue(Round(AValue)); - end; - -var - ASCA, ASrcAlpha: Single; -begin - ASCA := ASourceConstantAlpha / 255; - ASrcAlpha := 1 - ASource.rgbReserved * ASCA / 255; - - ADest.rgbRed := GetValue(ASource.rgbRed * ASCA + ASrcAlpha * ADest.rgbRed); - ADest.rgbGreen := GetValue(ASource.rgbGreen * ASCA + ASrcAlpha * ADest.rgbGreen); - ADest.rgbBlue := GetValue(ASource.rgbBlue * ASCA + ASrcAlpha * ADest.rgbBlue); - ADest.rgbReserved := GetValue(ASource.rgbReserved * ASCA + ASrcAlpha * ADest.rgbReserved); -end; - -const - ClrNone: TRGBQuad = (rgbBlue: $FF; rgbGreen: $FF; rgbRed: $FF; rgbReserved: $FF); - ClrTransparent: TRGBQuad = (rgbBlue: 0; rgbGreen: 0; rgbRed: 0; rgbReserved: 0); - -function cxColorIsEqual(const AColor1, AColor2: TRGBQuad): Boolean; -begin - Result := DWORD(AColor1) = DWORD(AColor2); -end; - -function cxColorEssence(const AColor: TRGBQuad): DWORD; {$IFDEF DELPHI9} inline; {$ENDIF} -begin - Result := DWORD(AColor) and $00FFFFFF; -end; - -function cxCreateRegionFromBitmap(ABitmap: TBitmap; ATransparentColor: TColor): HRGN; - - procedure CombineRegion(X, Y: Integer; var ACount: Integer; var ACombined: HRGN); - var - ARgn: HRGN; - begin - if ACount > 0 then - begin - ARgn := CreateRectRgn(X - ACount, Y, X, Y + 1); - if ACombined = 0 then - ACombined := ARgn - else - begin - CombineRgn(ACombined, ACombined, ARGN, RGN_OR); - DeleteObject(ARgn); - end; - ACount := 0; - end; - end; - -var - AColors: TRGBColors; - ACount, AIndex: Integer; - ATransparent: TRGBQuad; - X, Y: Integer; -begin - Result := 0; - AIndex := 0; - ATransparent := dxColorToRGBQuad(ATransparentColor); - AColors := GetBitmapBits(ABitmap, True); - for Y := 0 to ABitmap.Height - 1 do - begin - ACount := 0; - for X := 0 to ABitmap.Width - 1 do - begin - if cxColorEssence(AColors[AIndex]) = cxColorEssence(ATransparent) then - CombineRegion(X, Y, ACount, Result) - else - Inc(ACount); - Inc(AIndex); - end; - CombineRegion(ABitmap.Width, Y, ACount, Result); - end; -end; - -procedure cxSetBitmapParams(ABitmap: TBitmap; AWidth, AHeight: Integer; AFormat: TPixelFormat); -begin -{$IFDEF DELPHI6} - ABitmap.PixelFormat := AFormat; -{$ENDIF} - ABitmap.Width := AWidth; - ABitmap.Height := AHeight; -{$IFNDEF DELPHI6} - ABitmap.PixelFormat := AFormat; -{$ENDIF} -end; - -function cxCreateBitmap(const ASize: TSize; AFormat: TPixelFormat = pf24bit): TBitmap; -begin - Result := cxCreateBitmap(ASize.cx, ASize.cy, AFormat); -end; - -function cxCreateBitmap(const ARect: TRect; AFormat: TPixelFormat = pf24bit): TBitmap; -begin - Result := cxCreateBitmap(cxRectWidth(ARect), cxRectHeight(ARect), AFormat); -end; - -function cxCreateBitmap(AWidth, AHeight: Integer; AFormat: TPixelFormat = pf24bit): TBitmap; -begin - Result := TBitmap.Create; - cxSetBitmapParams(Result, AWidth, AHeight, AFormat); -end; - -function cxCreateTrueColorBitmap(const ASize: TSize): TBitmap; -begin - Result := cxCreateTrueColorBitmap(ASize.cx, ASize.cy); -end; - -function cxCreateTrueColorBitmap(AWidth, AHeight: Integer): TBitmap; -begin - Result := TBitmap.Create; - Result.Handle := cxCreateTrueColorBitmapHandle(AWidth, AHeight); -end; - -function cxCreateTrueColorBitmapHandle(AWidth, AHeight: Integer; ABPP: Integer = 32): HBitmap; -begin - Result := CreateBitmap(AWidth, AHeight, 1, ABPP, nil); -end; - -procedure cxDrawDesignRect(ACanvas: TcxCanvas; const ARect: TRect; ASelected: Boolean); -const - Colors: array[Boolean] of TColor = ($A0FFA0, $9090FF); -var - AColor: TColor; - I: Integer; - AShadowRect: TRect; -begin - if not IsRectEmpty(ARect) then - begin - ACanvas.SaveDC; - try - ACanvas.SetClipRegion(TcxRegion.Create(ARect), roSet); - AColor := Colors[ASelected]; - ACanvas.FillRect(ARect, AColor); - ACanvas.Pen.Color := Dark(AColor, 75); - for I := 1 to MulDiv(ARect.Right, 3, 2) do - ACanvas.Polyline([Point(ARect.Right - I * 3, ARect.Top), Point(ARect.Right, ARect.Top + I * 3)]); - ACanvas.FrameRect(ARect, Dark(AColor, 50)); - finally - ACanvas.RestoreDC; - end; - ACanvas.ExcludeClipRect(ARect); - AShadowRect := cxRectOffset(ARect, 1, 1); - ACanvas.FillRect(AShadowRect, clBtnShadow); - ACanvas.ExcludeClipRect(AShadowRect); - end; -end; - -function cxGetBitmapPixelFormat(ABitmap: TBitmap): Integer; -const - ABitCounts: array [pf1Bit..pf32Bit] of Byte = (1,4,8,16,16,24,32); -begin - case ABitmap.PixelFormat of - pf1bit..pf32Bit: Result := ABitCounts[ABitmap.PixelFormat] - else - Result := GetDeviceCaps(ABitmap.Canvas.Handle, BITSPIXEL); - end; -end; - -procedure cxDrawBitmap(ADestDC: THandle; ASrcBitmap: TBitmap; - const ADestRect: TRect; const ASrcPoint: TPoint; AMode: Integer = SRCCOPY); overload; - - procedure InternalDrawBitmap; - - procedure SoftwareBitBlt; - var - ABitmap: TcxAlphaBitmap; - begin - ABitmap := TcxAlphaBitmap.CreateSize(ADestRect); - try - cxBitBlt(ABitmap.Canvas.Handle, ASrcBitmap.Canvas.Handle, ABitmap.ClientRect, ASrcPoint, SRCCOPY); - ABitmap.TransformBitmap(btmResetAlpha); - cxBitBlt(ADestDC, ABitmap.Canvas.Handle, ADestRect, cxNullPoint, AMode); - finally - ABitmap.Free; - end; - end; - - begin - if IsWin9X and (GetDeviceCaps(ADestDC, BITSPIXEL) = 32) and (cxGetBitmapPixelFormat(ASrcBitmap) < 32) then - SoftwareBitBlt - else - cxBitBlt(ADestDC, ASrcBitmap.Canvas.Handle, ADestRect, ASrcPoint, AMode); - end; - -var - APrevPalette: HPALETTE; -begin - if (ASrcBitmap.Palette <> 0) and (GetDeviceCaps(ADestDC, BITSPIXEL) <= 8) then - begin - APrevPalette := SelectPalette(ADestDC, ASrcBitmap.Palette, True); - RealizePalette(ADestDC); - InternalDrawBitmap; - SelectPalette(ADestDC, APrevPalette, True); - end - else - InternalDrawBitmap; -end; - -procedure cxDrawImage(ADC: THandle; AGlyphRect, ABackgroundRect: TRect; AGlyph: TBitmap; - AImages: TCustomImageList; AImageIndex: Integer; ADrawMode: TcxImageDrawMode; - ASmoothImage: Boolean = False; ABrush: THandle = 0; - ATransparentColor: TColor = clNone; AUseLeftBottomPixelAsTransparent: Boolean = True); - - procedure DrawBackGround(ABitmap: TcxAlphaBitmap); - begin - if ABrush = 0 then - cxBitBlt(ABitmap.Canvas.Handle, ADC, ABitmap.ClientRect, ABackgroundRect.TopLeft, SRCCOPY) - else - FillRect(ABitmap.Canvas.Handle, ABitmap.ClientRect, ABrush); - end; - - procedure DrawImage(ABitmap: TcxAlphaBitmap; ADrawMode: TcxImageDrawMode); - - procedure MakeImage(AImageBitmap: TcxAlphaBitmap; out AIsAlphaUsed: Boolean); - begin - if not IsGlyphAssigned(AGlyph) then - begin - if AImages is TcxImageList then - TcxImageList(AImages).GetImageInfo(AImageIndex, AImageBitmap, nil) - else - TcxImageList.GetImageInfo(AImages.Handle, AImageIndex, AImageBitmap, nil); - -// cxDrawImageList(AImages.Handle, AImageIndex, AImageBitmap.Canvas.Handle, -// cxNullPoint, AImages.DrawingStyle, AImages.ImageType) -//#DG can break destination AImages.Draw(AImageBitmap.Canvas, 0, 0, AImageIndex) - AIsAlphaUsed := TcxImageList.GetPixelFormat(AImages.Handle) >= 32; - end - else - begin - AImageBitmap.CopyBitmap(AGlyph); - AIsAlphaUsed := cxGetBitmapPixelFormat(AGlyph) >= 32; - end; - AIsAlphaUsed := AIsAlphaUsed and AImageBitmap.IsAlphaUsed; - if not AIsAlphaUsed then - AImageBitmap.TransformBitmap(btmSetOpaque); - end; - - procedure MakeMask(AImageBitmap, AMaskBitmap: TcxAlphaBitmap; AIsAlphaUsed: Boolean); - var - AImageListMask: TcxAlphaBitmap; - begin - AMaskBitmap.CopyBitmap(AImageBitmap); - if not AIsAlphaUsed then - begin - if not IsGlyphAssigned(AGlyph) then - begin - AImageListMask := TcxAlphaBitmap.CreateSize(AMaskBitmap.ClientRect); - try - TcxImageList.GetImageInfo(AImages.Handle, AImageIndex, nil, AImageListMask); - AImageListMask.TransformBitmap(btmCorrectBlend); - AMaskBitmap.Filter(AImageListMask); - finally - AImageListMask.Free; - end; - end; - if ATransparentColor <> clNone then - AMaskBitmap.TransparentPixels.Add(ATransparentColor); - if AUseLeftBottomPixelAsTransparent and IsGlyphAssigned(AGlyph) then - AMaskBitmap.TransparentPixels.Add(AMaskBitmap.TransparentColor); - end; - AMaskBitmap.TransformBitmap(btmMakeMask); - end; - - const - AImageShadowSize = 2; - var - BW, BH: Integer; - AImageBitmap, AMaskBitmap: TcxAlphaBitmap; - AConstantAlpha: Byte; - AIsAlphaUsed: Boolean; - begin - OffsetRect(AGlyphRect, -ABackgroundRect.Left, -ABackgroundRect.Top); - if not Assigned(CustomDrawImageProc) or not CustomDrawImageProc(ABitmap.Canvas, AImages, AImageIndex, AGlyph, AGlyphRect, ADrawMode) then - begin - if not IsGlyphAssigned(AGlyph) then - begin - BW := AImages.Width; - BH := AImages.Height; - end - else - begin - BW := AGlyph.Width; - BH := AGlyph.Height; - end; - - AImageBitmap := GetImageBitmap(BW, BH); - MakeImage(AImageBitmap, AIsAlphaUsed); - - AMaskBitmap := GetMaskBitmap(BW, BH); - MakeMask(AImageBitmap, AMaskBitmap, AIsAlphaUsed); - AImageBitmap.Filter(AMaskBitmap); - AConstantAlpha := $FF; - case ADrawMode of - idmFaded: - begin - AImageBitmap.TransformBitmap(btmFade); - AConstantAlpha := FadeMap.SrcConstantAlpha; - end; - idmGrayScale: - AImageBitmap.TransformBitmap(btmGrayScale); - idmDingy: - AImageBitmap.TransformBitmap(btmDingy); - idmShadowed: - begin - AImageBitmap.DrawShadow(AMaskBitmap, AImageShadowSize, clBtnShadow, True); - AGlyphRect := cxRectInflate(AGlyphRect, 0, 0, AImageShadowSize, AImageShadowSize); - OffsetRect(AGlyphRect, -AImageShadowSize div 2, -AImageShadowSize div 2); - end; - idmDisabled: - begin - if AIsAlphaUsed then - begin - AImageBitmap.TransformBitmap(btmDisable); - AConstantAlpha := DisableMap.SrcConstantAlpha; - end - else - begin - AImageBitmap.TransformBitmap(btmDirty); - AImageBitmap.DrawShadow(AMaskBitmap, 1, clBtnHighlight); - end; - end; - end; - AImageBitmap.AlphaBlend(ABitmap, AGlyphRect, ASmoothImage, AConstantAlpha); - end; - end; - -var - ADrawBitmap: TcxAlphaBitmap; -begin - if not (IsGlyphAssigned(AGlyph) or IsImageAssigned(AImages, AImageIndex)) then - Exit; - - ADrawBitmap := GetDrawBitmap(cxRectWidth(ABackgroundRect), cxRectHeight(ABackgroundRect)); - DrawBackGround(ADrawBitmap); - DrawImage(ADrawBitmap, ADrawMode); - cxDrawBitmap(ADC, ADrawBitmap, ABackgroundRect, cxNullPoint); -end; - -function GetImageListStyle(ADrawingStyle: TDrawingStyle; AImageType: TImageType): DWORD; -const - ADrawingStyles: array[TDrawingStyle] of DWORD = (ILD_FOCUS, ILD_SELECTED, ILD_NORMAL, ILD_TRANSPARENT); - AImageTypes: array[TImageType] of DWORD = (0, ILD_MASK); -begin - Result := ADrawingStyles[ADrawingStyle] or AImageTypes[AImageType]; -end; - -procedure cxDrawImageList(AImageListHandle: HIMAGELIST; AImageIndex: Integer; - ADC: HDC; APoint: TPoint; ADrawingStyle: TDrawingStyle; AImageType: TImageType); -begin - ImageList_Draw(AImageListHandle, AImageIndex, ADC, APoint.X, APoint.Y, GetImageListStyle(ADrawingStyle, AImageType)); -end; - -procedure cxDrawHatch(ADC: HDC; const ARect: TRect; AColor1, AColor2: TColor; AStep: Byte; AAlpha1: Byte = $FF; AAlpha2: Byte = $FF); -var - ADrawBitmap: TcxAlphaBitmap; -begin - ADrawBitmap := TcxAlphaBitmap.CreateSize(ARect); - try - cxBitBlt(ADrawBitmap.Canvas.Handle, ADC, ADrawBitmap.ClientRect, ARect.TopLeft, SRCCOPY); - ADrawBitmap.DrawHatch(AColor1, AColor2, AStep, AAlpha1, AAlpha2); - cxBitBlt(ADC, ADrawBitmap.Canvas.Handle, ARect, cxNullPoint, SRCCOPY); - finally - ADrawBitmap.Free; - end; -end; - -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; - -procedure BuildFilter(out AContributorList: TContributorList; AScale: Single; ASrcSize, ADestSize: Integer); -var - I, J, APixel, AMaxContributors, AWeight: Integer; - ACenter, ARadius, AScaleFactor: Single; -begin - SetLength(AContributorList, ADestSize); - if AScale < 1.0 then AScaleFactor := 1.0 / AScale else AScaleFactor := 1.0; - ARadius := 3 * AScaleFactor; - AMaxContributors := Trunc(ARadius * 2.0 + 1); - for I := 0 to ADestSize - 1 do - with AContributorList[I] do - begin - SetLength(Contributors, AMaxContributors); - Count := 0; - ACenter := I / AScale; - for J := Floor(ACenter - ARadius) to Ceil(ACenter + ARadius) do - begin - AWeight := Round(Lanczos3Filter((ACenter - J) / AScaleFactor) / AScaleFactor * 256); - if AWeight = 0 then continue; - if J < 0 then - APixel := -J - else - if (J >= ASrcSize) then - APixel := ASrcSize - J + ASrcSize - 1 - else - APixel := J; - Contributors[Count].Pixel := APixel; - Contributors[Count].Weight := AWeight; - Inc(Count); - end; - end; -end; - -procedure ApplyFilter(var AContributorList: TContributorList; - var ASource: TRGBColors; ASrcSize, ASrcLineLength: Integer; - var ADest: TRGBColors; ADestSize, ADestLineLength: Integer; - AHorizontal: Boolean); - - function GetColorPart(Value: Integer): Integer; - begin - if Value < 0 then - Result := 0 - else - begin - Value := Value shr 8; - Result := Min(255, Value); - end; - end; - -var - AWeight: Integer; - AColor: TRGBQuad; - R, G, B, A: Integer; - K, I, J: Integer; -begin - for I := 0 to ASrcSize - 1 do - for J := 0 to ADestSize - 1 do - with AContributorList[J] do - begin - R := 0; G := 0; B := 0; A := 0; - for K := 0 to Count - 1 do - begin - if AHorizontal then - AColor := ASource[Contributors[K].Pixel + (I * ASrcLineLength)] - else - AColor := ASource[I + (Contributors[K].Pixel * ASrcLineLength)]; - AWeight := Contributors[K].Weight; - if AWeight = 0 then continue; - Inc(R, AColor.rgbRed * AWeight); - Inc(G, AColor.rgbGreen * AWeight); - Inc(B, AColor.rgbBlue * AWeight); - Inc(A, AColor.rgbReserved * AWeight); - end; - AColor.rgbRed := GetColorPart(R); - AColor.rgbGreen := GetColorPart(G); - AColor.rgbBlue := GetColorPart(B); - AColor.rgbReserved := GetColorPart(A); - if AHorizontal then - ADest[J + (I * ADestLineLength)] := AColor - else - ADest[I + (J * ADestLineLength)] := AColor; - end; - //dispose contributors and source buffer - for I := 0 to HIGH(AContributorList) do - AContributorList[I].Contributors := nil; - AContributorList := nil; - ASource := nil; -end; - -procedure cxSmoothResizeBitmap(ASource, ADestination: TBitmap; AForceUseLanczos3Filter: Boolean = False); -var - AContributorList: TContributorList; - ASrcWidth, ASrcHeight, ADestWidth, ADestHeight: Integer; - ABuffer1, ABuffer2: TRGBColors; - AOldMode: Cardinal; - AScale: Single; -begin - ADestWidth := ADestination.Width; - ADestHeight := ADestination.Height; - ASrcWidth := ASource.Width; - ASrcHeight := ASource.Height; - if (ADestWidth = 0) or (ADestHeight = 0) or (ASrcWidth = 0) or (ASrcHeight = 0) then Exit; - ASource.Canvas.Lock; - ADestination.Canvas.Lock; - try - if IsWinNT and not AForceUseLanczos3Filter then - begin - AOldMode := SetStretchBltMode(ADestination.Canvas.Handle, HALFTONE); - StretchBlt(ADestination.Canvas.Handle, 0, 0, ADestWidth, ADestHeight, - ASource.Canvas.Handle, 0, 0, ASrcWidth, ASrcHeight, srcCopy); - SetStretchBltMode(ADestination.Canvas.Handle, AOldMode); - end - else - begin - ABuffer1 := GetBitmapBits(ASource, False); - SetLength(ABuffer2, ADestWidth * ASrcHeight); - if ASrcWidth = 1 then - AScale := ADestWidth / ASrcWidth - else - AScale := (ADestWidth - 1) / (ASrcWidth - 1); - BuildFilter(AContributorList, AScale, ASrcWidth, ADestWidth); - ApplyFilter(AContributorList, ABuffer1, ASrcHeight, ASrcWidth, ABuffer2, ADestWidth, ADestWidth, True); - ABuffer1 := GetBitmapBits(ADestination, False); - if (ASrcHeight = 1) or (ADestHeight = 1) then - AScale := ADestHeight / ASrcHeight - else - AScale := (ADestHeight - 1) / (ASrcHeight - 1); - BuildFilter(AContributorList, AScale, ASrcHeight, ADestHeight); - ApplyFilter(AContributorList, ABuffer2, ADestWidth, ADestWidth, ABuffer1, ADestHeight, ADestWidth, False); - SetBitmapBits(ADestination, ABuffer1, False); - end; - finally - ASource.Canvas.Unlock; - ADestination.Canvas.Unlock; - end; -end; - -function cxCreateBitmapCopy(ASourceBitmap: TBitmap): TcxAlphaBitmap; -begin - Result := TcxAlphaBitmap.CreateSize(ASourceBitmap.Width, ASourceBitmap.Height); - Result.CopyBitmap(ASourceBitmap); -end; - -procedure cxMakeTrueColorBitmap(ASourceBitmap, ATrueColorBitmap: TBitmap); -var - AcxBitmap, AcxMask: TcxAlphaBitmap; -begin - AcxBitmap := cxCreateBitmapCopy(ASourceBitmap); - try - AcxBitmap.TransformBitmap(btmSetOpaque); - AcxMask := cxCreateBitmapCopy(ASourceBitmap); - try - AcxMask.TransparentPixels.Add(ASourceBitmap.TransparentColor); - AcxMask.TransformBitmap(btmMakeMask); - AcxBitmap.Filter(AcxMask); - ATrueColorBitmap.Assign(AcxBitmap); - finally - AcxMask.Free; - end; - finally - AcxBitmap.Free; - end; -end; - -procedure cxMakeMaskBitmap(ASourceBitmap, AMaskBitmap: TBitmap); -var - ABitmap: TcxAlphaBitmap; -begin - ABitmap := cxCreateBitmapCopy(ASourceBitmap); - try - if not ABitmap.IsAlphaUsed then - ABitmap.RecoverAlphaChannel(ASourceBitmap.TransparentColor); - ABitmap.TransformBitmap(btmMakeMask); - cxBitBlt(AMaskBitmap.Canvas.Handle, ABitmap.Canvas.Handle, ABitmap.ClientRect, cxNullPoint, SRCCOPY); - finally - ABitmap.Free; - end; -end; - -{!!! TODO: adapt to .net} - -function cxGetCursorSize: TSize; -var - IconInfo: TIconInfo; - BitmapInfoSize, BitmapBitsSize, ImageSize: DWORD; - Bitmap: PBitmapInfoHeader; - Bits: Pointer; - BytesPerScanline: Integer; - - function FindScanline(Source: Pointer; MaxLen: Cardinal; - Value: Cardinal): Cardinal; assembler; - asm - PUSH ECX - MOV ECX,EDX - MOV EDX,EDI - MOV EDI,EAX - POP EAX - REPE SCASB - MOV EAX,ECX - MOV EDI,EDX - end; - -begin - { Default value is entire icon height } - Result.cy := GetSystemMetrics(SM_CYCURSOR); - Result.cx := GetSystemMetrics(SM_CXCURSOR); - - if GetIconInfo(GetCursor, IconInfo) then - try - GetDIBSizes(IconInfo.hbmMask, BitmapInfoSize, BitmapBitsSize); - Bitmap := AllocMem(DWORD(BitmapInfoSize) + BitmapBitsSize); - try - Bits := Pointer(DWORD(Bitmap) + BitmapInfoSize); - if GetDIB(IconInfo.hbmMask, 0, Bitmap^, Bits^) and - (Bitmap^.biBitCount = 1) then - begin - { Point Bits to the end of this bottom-up bitmap } - with Bitmap^ do - begin - Result.cx := biWidth; - BytesPerScanline := ((biWidth * biBitCount + 31) and not 31) div 8; - ImageSize := biWidth * BytesPerScanline; - Bits := Pointer(DWORD(Bits) + BitmapBitsSize - ImageSize); - { Use the width to determine the height since another mask bitmap - may immediately follow } - Result.cy := FindScanline(Bits, ImageSize, $FF); - { In case the and mask is blank, look for an empty scanline in the - xor mask. } - if (Result.cy = 0) and (biHeight >= 2 * biWidth) then - Result.cy := FindScanline(Pointer(DWORD(Bits) - ImageSize), - ImageSize, $00); - Result.cy := Result.cy div BytesPerScanline; - end; - Dec(Result.cy, IconInfo.yHotSpot); - end; - finally - FreeMem(Bitmap); - end; - finally - if IconInfo.hbmColor <> 0 then DeleteObject(IconInfo.hbmColor); - if IconInfo.hbmMask <> 0 then DeleteObject(IconInfo.hbmMask); - end; -end; - -procedure cxAlphaBlend(ASource: TBitmap; ARect: TRect; - const ASelColor: TColor; Alpha: Byte = 170); -var - ARow, ACol: Integer; - SrcLine: Pointer; - C1, C2: Double; - AColorValues: array[0..3] of Byte; - P: TPoint; -begin - C1 := Alpha / 255; - C2 := 1.0 - C1; - AColorValues[0] := Round(GetBValue(ASelColor) * C1); - AColorValues[1] := Round(GetGValue(ASelColor) * C1); - AColorValues[2] := Round(GetRValue(ASelColor) * C1); - AColorValues[3] := 0; - GetWindowOrgEx(ASource.Canvas.Handle, P); - OffsetRect(ARect, -P.X, -P.Y); - for ARow := Max(ARect.Top, 0) to Min(ARect.Bottom, ASource.Height - 1) do - begin - SrcLine := ASource.ScanLine[ARow]; - ACol := Max(0, ARect.Left * 4); - while ACol < Min(ARect.Right * 4, ASource.Width * 4 - 1) do - begin - WriteByte(SrcLine, AColorValues[ACol mod 4] + Round(ReadByte(SrcLine, ACol) * C2), ACol); - Inc(ACol); - end; - end; -end; - -procedure cxAlphaBlend( - ADest, ABkSource, ASource: TBitmap; Alpha: Byte = cxDefaultAlphaValue); - - function SystemAlphaPaint: Boolean; - var - ABlendFunction: TBlendFunction; - begin - if not Assigned(VCLAlphaBlend) then - begin - Result := False; - Exit; - end; - ABlendFunction := DefaultBlendFunction; - ABlendFunction.SourceConstantAlpha := Alpha; - with ADest do - begin - Canvas.Draw(0, 0, ABkSource); // Assign(ABkSource); todo: graphics bug image not copying but _AddRef called - Result := VCLAlphaBlend(Canvas.Handle, - 0, 0, Width, Height, ASource.Canvas.Handle, 0, 0, Width, Height, ABlendFunction); - end; - end; - - procedure AlphaPaint; - var - ACount, K: Integer; - DstLine, BkSrcLine, SrcLine: Pointer; - C1, C2: Double; - begin - C1 := Alpha / 255; - C2 := 1.0 - C1; - with ASource do - begin - K := Height; - ACount := ((Width * 24 + 31) and not 31) shr 3 * K; - end; - BkSrcLine := ABkSource.ScanLine[K - 1]; - SrcLine := ASource.ScanLine[K - 1]; - DstLine := ADest.ScanLine[K - 1]; - for K := 0 to ACount - 1 do - WriteByte(DstLine, - Round(ReadByte(SrcLine, K) * C1) + Round(ReadByte(BkSrcLine, K) * C2), K); - end; - - procedure DoAlphaPaint; - begin - if GetDeviceCaps(cxScreenCanvas.Handle, BITSPIXEL) in [16, 24, 32] then - AlphaPaint - else - ADest.Canvas.Draw(0, 0, ASource); // .Assign(ASource); - cxScreenCanvas.Dormant; - end; - -begin - if not SystemAlphaPaint then DoAlphaPaint; -end; - -procedure cxApplyViewParams(ACanvas: TcxCanvas; - const AViewParams: TcxViewParams); -begin - with ACanvas do - begin - Font := AViewParams.Font; - Font.Color := AViewParams.TextColor; - Brush.Color := AViewParams.Color; - end; -end; - -procedure cxCopyImage(ASource, ADest: TBitmap; - const ASrcOffset, ADstOffset: TPoint; const ARect: TRect); -var - ADstRect, ASrcRect: TRect; -begin - ADstRect := ARect; - ASrcRect := ARect; - OffsetRect(ASrcRect, ASrcOffset.X, ASrcOffset.Y); - OffsetRect(ADstRect, ADstOffset.X, ADstOffset.Y); - ADest.Canvas.CopyRect(ASrcRect, ASource.Canvas, ADstRect); -end; - -procedure cxCopyImage(ASource, ADest: TCanvas; - const ASrcOffset, ADstOffset: TPoint; const ARect: TRect); -var - ADstRect, ASrcRect: TRect; -begin - ADstRect := ARect; - ASrcRect := ARect; - OffsetRect(ASrcRect, ASrcOffset.X, ASrcOffset.Y); - OffsetRect(ADstRect, ADstOffset.X, ADstOffset.Y); - ADest.CopyRect(ADstRect, ASource, ASrcRect); -end; - -procedure cxDrawArrows(ACanvas: TCanvas; const ARect: TRect; - ASide: TcxBorder; AColor: TColor; APenColor: TColor = clDefault); -type - TArrowPolygon = array[0..6] of TPoint; -var - ArrowRgns: array[0..1, 0..6, 0..1] of Integer; - BaseLine: array[0..1, 0..1] of Integer; - I, J, K: Integer; -begin - with ARect do - begin - BaseLine[0, 0] := Left; - BaseLine[0, 1] := Top; - BaseLine[1, 0] := Right; - BaseLine[1, 1] := Bottom; - end; - if ASide in [bLeft, bBottom] then - begin - BaseLine[Byte(ASide = bLeft), 0] := ARect.Left; - BaseLine[Byte(ASide = bLeft), 1] := ARect.Bottom; - end - else - begin - BaseLine[Byte(ASide = bTop), 0] := ARect.Right; - BaseLine[Byte(ASide = bTop), 1] := ARect.Top; - end; - Move(BaseRgns[Byte(ASide in [bTop, bBottom]) shl 1], ArrowRgns, SizeOf(ArrowRgns)); - for I := 0 to 1 do - for J := 0 to 6 do - for K := 0 to 1 do - Inc(ArrowRgns[I, J, K], BaseLine[I, K]); - ACanvas.Brush.Color := AColor; - if APenColor = clDefault then - ACanvas.Pen.Color := $FFFFFF xor ColorToRgb(AColor) - else - ACanvas.Pen.Color := APenColor; - for I := 0 to 1 do - ACanvas.Polygon(TArrowPolygon(ArrowRgns[I])); -end; - -procedure cxFillHalfToneRect( - Canvas: TCanvas; const ARect: TRect; ABkColor, AColor: TColor); -begin - with Canvas do - begin - ABkColor := SetBkColor(Handle, ColorToRgb(ABkColor)); - AColor := SetTextColor(Handle, ColorToRgb(AColor)); - Windows.FillRect(Handle, ARect, cxHalfToneBrush.Handle); - SetBkColor(Handle, ABkColor); - SetTextColor(Handle, AColor); - end; -end; - -procedure cxSetCanvasOrg(ACanvas: TCanvas; var AOrg: TRect); -begin - with AOrg do - SetWindowOrgEx(ACanvas.Handle, Left, Top, @TopLeft); -end; - -function cxGetTextExtentPoint32(ADC: THandle; const AText: string; out ASize: TSize; ACharCount: Integer = -1): Boolean; -begin - if ACharCount = -1 then - ACharCount := Length(AText); - Result := GetTextExtentPoint32(ADC, PChar(AText), ACharCount, ASize); -end; - -{TODO: -procedure cxGetTextLines(const AText: string; ACanvas: TcxCanvas; - const ARect: TRect; ALines: TStrings); -var - ATextRows: TcxTextRows; - ATextParams: TcxTextParams; - I, ACount, ALen: Integer; - S: WideString; -begin - ATextParams := cxCalcTextParams(ACanvas.Handle, CXTO_WORDBREAK or CXTO_CALCROWCOUNT); - cxMakeTextRows(ACanvas.Handle, PChar(AText), Length(AText), ARect, ATextParams, ATextRows, ACount); - for I := 0 to ACount - 1 do - begin - ALen := cxGetTextRow(ATextRows, I).TextLength; - SetString(S, cxGetTextRow(ATextRows, I).Text, ALen); - if (ALen > 0) and ((S[ALen] = ' ') or (S[ALen] = #9)) then - SetLength(S, ALen - 1); - ALines.Add(dxWideStringToString(S)); - end; - cxResetTextRows(ATextRows); -end; -} - -type - TcxPosition = record - Start: Integer; - Finish: Integer; - end; - -procedure cxGetTextLines(const AText: string; ACanvas: TcxCanvas; const ARect: TRect; ALines: TStrings); - - function IsNewLineSymbol(const AWideText: WideString; AIndex: Integer): Boolean; - begin - Result := (AWideText[AIndex] = #13) or (AWideText[AIndex] = #10); - end; - - procedure GetNextWordPos(const AWideText: WideString; ALength: Integer; const ACurrentWord: TcxPosition; var ANextWord: TcxPosition); - - function IsDelimiter(AIndex: Integer): Boolean; - begin - Result := (AWideText[AIndex] = ' ') or (AWideText[AIndex] = #9) or - IsNewLineSymbol(AWideText, AIndex); - end; - - function IsDoubleDelimiter(AIndex: Integer): Boolean; - begin - Result := (AIndex > 1) and IsDelimiter(AIndex) and IsDelimiter(AIndex - 1); - end; - - function IsWordStart(AIndex: Integer): Boolean; - begin - Result := not IsDelimiter(AIndex); - end; - - function IsWordEnd(AIndex: Integer): Boolean; - begin - Result := IsDelimiter(AIndex); - end; - - var - ACharPos: Integer; - begin - ANextWord.Start := ACurrentWord.Finish + 1; - - while (ANextWord.Start < ALength) and not IsWordStart(ANextWord.Start) and not IsDoubleDelimiter(ANextWord.Start) do - Inc(ANextWord.Start); - ACharPos := ANextWord.Start; - while (ACharPos + 1 <= ALength) and not IsWordEnd(ACharPos + 1) and not IsDoubleDelimiter(ACharPos) do - Inc(ACharPos); - ANextWord.Finish := ACharPos; - end; - - procedure FindNextWordStart(const AWideText: WideString; var ALineStart: Integer; var ANextWord: TcxPosition); - begin - while IsNewLineSymbol(AWideText, ALineStart) do - Inc(ALineStart); - ANextWord.Start := ALineStart; - end; - - function CheckNewLineSymbol(const AWideText: WideString; var ANextWord: TcxPosition; var ALineStart: Integer): Boolean; - var - I: Integer; - begin - Result := False; - for I := ALineStart to ANextWord.Finish do - if IsNewLineSymbol(AWideText, I) then - begin - ALines.Add(dxWideStringToString(Copy(AWideText, ALineStart, I - ALineStart))); - ALineStart := I + 1; - FindNextWordStart(AWideText, ALineStart, ANextWord); - Result := True; - Break; - end; - end; - -var - AWideText: WideString; - ADrawText: string; - ACurrentWord, ANextWord: TcxPosition; - ALineStart, ALength, ARectWidth: Integer; -begin - ARectWidth := cxRectWidth(ARect); - ACurrentWord.Finish := 0; - ALineStart := 1; - AWideText := dxStringToWideString(AText); - ALength := Length(AWideText); - repeat - GetNextWordPos(AWideText, ALength, ACurrentWord, ANextWord); - - ADrawText := Copy(AWideText, ALineStart, ANextWord.Finish - ALineStart + 1); - if not CheckNewLineSymbol(AWideText, ANextWord, ALineStart) then - if cxTextSize(ACanvas.Handle, ADrawText).cx > ARectWidth then - begin - ALines.Add(dxWideStringToString(Copy(AWideText, ALineStart, ACurrentWord.Finish - ALineStart + 1))); - ALineStart := ANextWord.Start; - FindNextWordStart(AWideText, ALineStart, ANextWord); - end; - ACurrentWord := ANextWord; - until ACurrentWord.Finish >= ALength; - ALines.Add(dxWideStringToString(Copy(AWideText, ALineStart, ALength))); -end; - -function cxDrawText(ADC: THandle; const AText: string; var ARect: TRect; AFormat: UINT; ACharCount: Integer = - 1): Integer; -begin - Result := Windows.DrawText(ADC, PChar(AText), ACharCount, ARect, AFormat); -end; - -function cxExtTextOut(ADC: THandle; const AText: string; const APoint: TPoint; - const ARect: TRect; AOptions: UINT; ACharCount: Integer = -1): Boolean; -begin - if ACharCount = -1 then - ACharCount := Length(AText); - Result := ExtTextOut(ADC, APoint.X, APoint.Y, AOptions, - @ARect, PChar(AText), ACharCount, nil); -end; - -function cxExtTextOut(ADC: THandle; const AText: string; const APoint: TPoint; - AOptions: UINT; ACharCount: Integer = -1): Boolean; overload; -begin - if ACharCount = -1 then - ACharCount := Length(AText); - Result := ExtTextOut(ADC, APoint.X, APoint.Y, AOptions, - nil, PChar(AText), ACharCount, nil); -end; - -procedure cxInvalidateRect(AHandle: THandle; const ARect: TRect; AEraseBackground: Boolean = True); -begin - InvalidateRect(AHandle, @ARect, AEraseBackground); -end; - -procedure cxInvalidateRect(AHandle: THandle; AEraseBackground: Boolean = True); -begin - InvalidateRect(AHandle, nil, AEraseBackground); -end; - -function cxTextHeight(AFont: TFont; const S: string = 'Wg'; AFontSize: Integer = 0): Integer; -begin - Result := cxTextExtent(AFont, S, AFontSize).cy; -end; - -function cxTextWidth(AFont: TFont; const S: string; AFontSize: Integer = 0): Integer; -begin - Result := cxTextExtent(AFont, S, AFontSize).cx; -end; - -function cxTextExtent(AFont: TFont; const S: string; AFontSize: Integer = 0): TSize; -begin - with cxScreenCanvas do - begin - Font.Assign(AFont); - if AFontSize <> 0 then Font.Size := AFontSize; - Result := TextExtent(S); - Dormant; - end; -end; - -function cxTextSize(ADC: THandle; const AText: string): TSize; // differs from cxTextExtent -var - ARect: TRect; -begin - ARect := cxGetTextRect(ADC, AText, 1); - Result := Size(ARect.Right, ARect.Bottom); -end; - -function cxGetTextRect(ADC: THandle; const AText: string; ARowCount: Integer; AReturnMaxRectHeight: Boolean = False): TRect; -const - DT_NOFULLWIDTHCHARBREAK = $80000; - SingleLineTextFlag = DT_SINGLELINE or DT_CALCRECT; - MultiLineTextFlag = DT_WORDBREAK or DT_NOFULLWIDTHCHARBREAK or DT_CALCRECT; - - function GetMaxWidth: Integer; - var - R: TRect; - begin - R := cxEmptyRect; - cxDrawText(ADC, AText, R, SingleLineTextFlag); - Result := R.Right; - end; - - function GetMinWidth: Integer; - var - R: TRect; - begin - R := Rect(0, 0, 1, 1); - cxDrawText(ADC, AText, R, MultiLineTextFlag); - Result := R.Right; - end; - - function GetTextSize(AWidth: Integer): TRect; - begin - Result := Rect(0, 0, AWidth, 1); - cxDrawText(ADC, AText, Result, MultiLineTextFlag); - end; - -var - AMaxTextHeight, AMaxWidth, AMinWidth, AWidth: Integer; -begin - Result := cxEmptyRect; - if ARowCount = 1 then - cxDrawText(ADC, AText, Result, SingleLineTextFlag) - else - begin - if ARowCount <= 0 then - AMaxTextHeight := 32000 - else - AMaxTextHeight := cxTextSize(ADC, 'Wg').cy * ARowCount; - AMinWidth := GetMinWidth; - AMaxWidth := GetMaxWidth; - AWidth := (AMinWidth + AMaxWidth) div 2; - while AMaxWidth - AMinWidth > 1 do - begin - if GetTextSize(AWidth).Bottom > AMaxTextHeight then - AMinWidth := AWidth - else - AMaxWidth := AWidth; - AWidth := (AMinWidth + AMaxWidth) div 2; - end; - Result := GetTextSize(AMinWidth); - if Result.Bottom > AMaxTextHeight then - Result := GetTextSize(AMaxWidth); - if AReturnMaxRectHeight then - Result.Bottom := AMaxTextHeight; - end; -end; - -function cxGetTextRect(AFont: TFont; const AText: string; ARowCount: Integer): TRect; -begin - cxScreenCanvas.Font := AFont; - Result := cxGetTextRect(cxScreenCanvas.Handle, AText, ARowCount); - cxScreenCanvas.Dormant; -end; - -function cxGetScreenPixelsPerInch(AHorizontal: Boolean): Integer; -const - ADirectionMap: array [Boolean] of DWORD = (LOGPIXELSY, LOGPIXELSX); -begin - Result := GetDeviceCaps(cxScreenCanvas.Handle, ADirectionMap[AHorizontal]); - cxScreenCanvas.Dormant; -end; - -function cxGetStringAdjustedToWidth(ADC: HDC; AFontHandle: HFONT; const S: string; AWidth: Integer; AModifyStringType: TcxModifyStringType): string; overload; -const - AModifyStringMap: array [TcxModifyStringType] of DWORD = (DT_END_ELLIPSIS, DT_PATH_ELLIPSIS); -var - ABuffer: packed array[0..4095] of Char; - R: TRect; - ACalcDC: HDC; -begin - if (Length(S) = 0) or (AWidth < 1) then - begin - Result := ''; - Exit; - end; - FillChar(ABuffer, SizeOf(ABuffer), 0); - StrPLCopy(ABuffer, S, Length(S)); - R := Rect(0, 0, AWidth, 32); - if ADC = 0 then ACalcDC := GetDC(0) else ACalcDC := ADC; - if AFontHandle <> 0 then - SelectObject(ACalcDC, AFontHandle); - DrawText(ACalcDC, @ABuffer[0], -1, // D12 DrawText(ACalcDC, ABuffer, -1, - R, DT_SINGLELINE or DT_CALCRECT or DT_MODIFYSTRING or AModifyStringMap[AModifyStringType]); - Result := ABuffer; - if ADC = 0 then ReleaseDC(0, ACalcDC); -end; - -function cxGetStringAdjustedToWidth(AFont: TFont; const S: string; AWidth: Integer; AModifyStringType: TcxModifyStringType): string; overload; -begin - Result := cxGetStringAdjustedToWidth(0, AFont.Handle, S, AWidth, AModifyStringType); -end; - -function cxCompareBitmaps(ABitmap1, ABitmap2: TBitmap): Boolean; -var - AHeight: Integer; -begin - Result := (ABitmap1 <> nil) and (ABitmap2 <> nil) and - (ABitmap1.Width = ABitmap2.Width) and (ABitmap1.Height = ABitmap2.Height) and - (cxGetBitmapPixelFormat(ABitmap1) = cxGetBitmapPixelFormat(ABitmap2)); - if Result then - begin - AHeight := ABitmap2.Height; - Result := CompareMem(ABitmap1.ScanLine[AHeight - 1], ABitmap2.ScanLine[AHeight - 1], - ABitmap2.Height * ABitmap2.Width * cxGetBitmapPixelFormat(ABitmap2) div 8); - end; -end; - -function cxGetBitmapData(ABitmapHandle: HBITMAP; out ABitmapData: Windows.TBitmap): Boolean; -begin - Result := GetObject(ABitmapHandle, SizeOf(Windows.TBitmap), @ABitmapData) <> 0; -end; - -function cxGetBrushData(ABrushHandle: HBRUSH; out ALogBrush: TLogBrush): Boolean; -begin - Result := GetObject(ABrushHandle, SizeOf(TLogBrush), @ALogBrush) <> 0; -end; - -function cxGetBrushData(ABrushHandle: HBRUSH): TLogBrush; -begin - cxGetBrushData(ABrushHandle, Result); -end; - -function cxGetFontData(AFontHandle: HFONT; out ALogFont: TLogFont): Boolean; -begin - Result := GetObject(AFontHandle, SizeOf(TLogFont), @ALogFont) <> 0; -end; - -function cxGetPenData(APenHandle: HPEN; out ALogPen: TLogPen): Boolean; -begin - Result := GetObject(APenHandle, SizeOf(TLogPen), @ALogPen) <> 0; -end; - -function cxGetWritingDirection(AFontCharset: TFontCharset; const AText: string): TCanvasOrientation; - - function IsStandardASCIIChar: Boolean; - begin - Result := (Length(AText) > 0) and (Ord(AText[1]) < 128) {$IFNDEF DELPHI12} and (cxStrCharLength(AText) = 1) {$ENDIF}; - end; - -begin - if AFontCharset = DEFAULT_CHARSET then - AFontCharset := GetDefFontCharset; - if not IsStandardASCIIChar and (AFontCharset in [ARABIC_CHARSET, CHINESEBIG5_CHARSET, GB2312_CHARSET]) then - Result := coRightToLeft - else - Result := coLeftToRight; -end; - -procedure cxDrawThemeParentBackground(AControl: TWinControl; ACanvas: TcxCanvas; const ARect: TRect); -begin - if AControl.Parent.DoubleBuffered or not IsThemeLibraryLoaded then - cxDrawTransparentControlBackground(AControl, ACanvas, ARect, False) - else - DrawThemeParentBackground(AControl.Handle, ACanvas.Handle, ARect); -end; - -procedure cxDrawThemeParentBackground(AControl: TWinControl; ACanvas: TCanvas; const ARect: TRect); -var - AcxCanvas: TcxCanvas; -begin - AcxCanvas := TcxCanvas.Create(ACanvas); - try - cxDrawThemeParentBackground(AControl, AcxCanvas, ARect); - finally - AcxCanvas.Free; - end; -end; - -procedure cxPaintControlTo(ADrawControl: TWinControl; ACanvas: TcxCanvas; - const ACanvasOffset, AWindowOffset: TPoint; ADrawRect: TRect; ADrawEdgesAndBorders: Boolean; AConsiderWindowRegion: Boolean; ASkipControls: TList); - - procedure DrawEdgesAndBorders; - var - AEdgeFlags, ABorderFlags: Integer; - ABorderRect: TRect; - P: TPoint; - begin - ABorderFlags := 0; - AEdgeFlags := 0; - if GetWindowLong(ADrawControl.Handle, GWL_EXSTYLE) and WS_EX_CLIENTEDGE <> 0 then - begin - AEdgeFlags := EDGE_SUNKEN; - ABorderFlags := BF_RECT or BF_ADJUST - end - else - if GetWindowLong(ADrawControl.Handle, GWL_STYLE) and WS_BORDER <> 0 then - begin - AEdgeFlags := BDR_OUTER; - ABorderFlags := BF_RECT or BF_ADJUST or BF_MONO; - end; - if ABorderFlags <> 0 then - begin - ABorderRect := Rect(0, 0, ADrawControl.Width, ADrawControl.Height); - P := cxPointOffset(ADrawControl.BoundsRect.TopLeft, ACanvasOffset, False); - ABorderRect := cxRectOffset(ABorderRect, P); - DrawEdge(ACanvas.Handle, ABorderRect, AEdgeFlags, ABorderFlags); - ACanvas.SetClipRegion(TcxRegion.Create(ABorderRect), roIntersect); - MoveWindowOrg(ACanvas.Handle, ABorderRect.Left, ABorderRect.Top); - end; - end; - - procedure ExcludeWindowRegion(ACanvas: TcxCanvas); - var - AWindowRegion: TcxRegion; - AWindowRect: TRect; - AClientOffset: TPoint; - begin - if ADrawControl.HandleAllocated then - begin - AWindowRegion := TcxRegion.Create; - try - if GetWindowRgn(ADrawControl.Handle, AWindowRegion.Handle) in [SIMPLEREGION, COMPLEXREGION] then - begin - AWindowRect := cxGetWindowRect(ADrawControl); - AClientOffset := cxPointOffset(ADrawControl.ClientToScreen(cxNullPoint), AWindowRect.TopLeft, False); - AWindowRegion.Offset(cxPointOffset(cxPointOffset(AWindowOffset, AClientOffset, False), ACanvasOffset, False)); - ACanvas.SetClipRegion(AWindowRegion, roIntersect, False); - end; - finally - AWindowRegion.Free; - end; - end; - end; - - procedure PaintChildTo(AChildControl: TControl); - var - P: TPoint; - ABoundsRect, ADrawRect: TRect; - begin - P := ADrawControl.ScreenToClient(AChildControl.ClientToScreen(cxNullPoint)); - ABoundsRect := AChildControl.BoundsRect; - ADrawRect := cxRectOffset(ABoundsRect, P, False); - if (AChildControl is TWinControl) and (AChildControl as TWinControl).Visible then - cxPaintControlTo((AChildControl as TWinControl), ACanvas, P, ABoundsRect.TopLeft, ADrawRect, True, AConsiderWindowRegion, ASkipControls); - end; - -var - I: Integer; - AChildControl: TControl; - AIntf: IcxPaintControlsHelper; -begin - if csDestroying in ADrawControl.ComponentState then Exit; - - ACanvas.SaveState; - try - with ACanvasOffset do - MoveWindowOrg(ACanvas.Handle, X, Y); - if not RectVisible(ACanvas.Handle, ADrawRect) then Exit; - ADrawControl.ControlState := ADrawControl.ControlState + [csPaintCopy]; - try - if ADrawEdgesAndBorders and (not Supports(ADrawControl, IcxPaintControlsHelper, AIntf) or AIntf.AllowDrawEdgesAndBorders) then - DrawEdgesAndBorders; - ACanvas.Canvas.Lock; - try - if AConsiderWindowRegion then - ExcludeWindowRegion(ACanvas); - ACanvas.SetClipRegion(TcxRegion.Create(ADrawRect), roIntersect); - - ACanvas.SaveState; - ADrawControl.Perform(WM_ERASEBKGND, ACanvas.Handle, ACanvas.Handle); - ADrawControl.Perform(WM_PAINT, ACanvas.Handle, 0); - ACanvas.RestoreState; - - for I := 0 to ADrawControl.ControlCount - 1 do - begin - AChildControl := ADrawControl.Controls[I]; - if (ASkipControls <> nil) and (ASkipControls.IndexOf(AChildControl) <> -1) then - Break; - PaintChildTo(AChildControl); - end; - finally - ACanvas.Canvas.Unlock; - end; - finally - ADrawControl.ControlState := ADrawControl.ControlState - [csPaintCopy]; - end; - finally - ACanvas.RestoreState; - end; -end; - -procedure cxDrawTransparentControlBackground(AControl: TWinControl; - ACanvas: TcxCanvas; ARect: TRect; APaintParentWithChildren: Boolean = True); -var - AList: TList; -begin - if AControl.Parent <> nil then - begin - ARect := cxRectOffset(ARect, AControl.BoundsRect.TopLeft); - AList := TList.Create; - try - AList.Add(AControl); - cxPaintControlTo(AControl.Parent, ACanvas, cxPointInvert(ARect.TopLeft), cxPointInvert(AControl.BoundsRect.TopLeft), ARect, False, True, AList); - finally - AList.Free; - end; - end; -end; - -procedure cxDrawTransparentControlBackground(AControl: TWinControl; - ACanvas: TCanvas; const ARect: TRect; APaintParentWithChildren: Boolean = True); -var - AcxCanvas: TcxCanvas; -begin - AcxCanvas := TcxCanvas.Create(ACanvas); - try - cxDrawTransparentControlBackground(AControl, AcxCanvas, ARect, APaintParentWithChildren); - finally - AcxCanvas.Free; - end; -end; - -procedure cxPaintTo(ADrawControl: TWinControl; ACanvas: TcxCanvas; const AOffset: TPoint; const ADrawRect: TRect; AConsiderWindowRegion: Boolean); -begin - MoveWindowOrg(ACanvas.Handle, -ADrawRect.Left, -ADrawRect.Top); - cxPaintControlTo(ADrawControl, ACanvas, AOffset, cxNullPoint, ADrawRect, True, AConsiderWindowRegion, nil); -end; - -procedure cxResetFont(const AFont: TFont); -begin - AFont.Charset := DefFontData.Charset; - AFont.Name := dxShortStringToString(DefFontData.Name); - AFont.Height := DefFontData.Height; - AFont.Pitch := DefFontData.Pitch; - AFont.Style := DefFontData.Style; -end; - -{ TcxRegion } - -constructor TcxRegion.Create(AHandle: TcxRegionHandle); -begin - inherited Create; - FHandle := AHandle; -end; - -constructor TcxRegion.Create(const ABounds: TRect); -var - AHandle: TcxRegionHandle; -begin - AHandle := CreateRectRgnIndirect(ABounds); - Create(AHandle); -end; - -constructor TcxRegion.Create; -begin - Create(0, 0, 0, 0); -end; - -constructor TcxRegion.Create(ALeft, ATop, ARight, ABottom: Integer); -begin - Create(Rect(ALeft, ATop, ARight, ABottom)); -end; - -constructor TcxRegion.CreateRoundCorners(const ABounds: TRect; AWidthEllepse, AHeightEllepse: Integer); -begin - CreateRoundCorners(ABounds.Left, ABounds.Top, ABounds.Right, ABounds.Bottom, AWidthEllepse, AHeightEllepse); -end; - -constructor TcxRegion.CreateRoundCorners(ALeft, ATop, ARight, ABottom, AWidthEllepse, AHeightEllepse: Integer); -var - AHandle: TcxRegionHandle; -begin - AHandle := CreateRoundRectRgn(ALeft + 1, ATop + 1, ARight, ABottom, AWidthEllepse, AHeightEllepse); - Create(AHandle); -end; - -destructor TcxRegion.Destroy; -begin - DestroyHandle; - inherited; -end; - -function TcxRegion.GetBoundsRect: TRect; -begin - if GetRgnBox(FHandle, Result) = NULLREGION then - Result := cxNullRect; -end; - -function TcxRegion.GetIsEmpty: Boolean; -var - R: TRect; -begin - Result := GetRgnBox(FHandle, R) = NULLREGION; -end; - -procedure TcxRegion.DestroyHandle; -begin - if FHandle <> 0 then - begin - DeleteObject(FHandle); - FHandle := 0; - end; -end; - -procedure TcxRegion.Combine(ARegion: TcxRegion; AOperation: TcxRegionOperation; - ADestroyRegion: Boolean = True); -const - Modes: array[TcxRegionOperation] of Integer = (RGN_COPY, RGN_OR, RGN_DIFF, RGN_AND); -begin - if AOperation = roSet then - CombineRgn(FHandle, ARegion.Handle, 0, Modes[AOperation]) - else - CombineRgn(FHandle, FHandle, ARegion.Handle, Modes[AOperation]); - if ADestroyRegion then ARegion.Free; -end; - -function TcxRegion.IsEqual(ARegion: TcxRegion): Boolean; -begin - Result := (ARegion <> nil) and ((IsEmpty and ARegion.IsEmpty) or IsEqual(ARegion.Handle)); -end; - -function TcxRegion.IsEqual(ARegionHandle: TcxRegionHandle): Boolean; -begin - Result := EqualRgn(Handle, ARegionHandle); -end; - -procedure TcxRegion.Offset(const P: TPoint); -begin - Offset(P.X, P.Y); -end; - -procedure TcxRegion.Offset(DX, DY: Integer); -begin - OffsetRgn(FHandle, DX, DY); -end; - -function TcxRegion.PtInRegion(const Pt: TPoint): Boolean; -begin - Result := Windows.PtInRegion(Handle, Pt.X, Pt.Y); -end; - -function TcxRegion.PtInRegion(X, Y: Integer): Boolean; -begin - Result := PtInRegion(Point(X, Y)); -end; - -function TcxRegion.RectInRegion(const R: TRect): Boolean; -begin - Result := Windows.RectInRegion(Handle, R); -end; - -function TcxRegion.RectInRegion(ALeft, ATop, ARight, ABottom: Integer): Boolean; -begin - Result := RectInRegion(Rect(ALeft, ATop, ARight, ABottom)); -end; - -{ TcxCanvas } - -constructor TcxCanvas.Create(ACanvas: TCanvas); -begin - inherited Create; - FCanvas := ACanvas; - FSavedRegions := TList.Create; -end; - -destructor TcxCanvas.Destroy; -begin - FCanvas := nil; - FreeAndNil(FSavedRegions); - inherited; -end; - -function TcxCanvas.GetBrush: TBrush; -begin - Result := Canvas.Brush; -end; - -function TcxCanvas.GetCopyMode: TCopyMode; -begin - Result := Canvas.CopyMode; -end; - -function TcxCanvas.GetDCOrigin: TPoint; -var - AWindowOrg, AViewportOrg: TPoint; -begin - AWindowOrg := WindowOrg; - AViewportOrg := ViewportOrg; - Result := Point(AViewportOrg.X - AWindowOrg.X, AViewportOrg.Y - AWindowOrg.Y); -end; - -function TcxCanvas.GetFont: TFont; -begin - Result := Canvas.Font; -end; - -function TcxCanvas.GetHandle: HDC; -begin - Result := Canvas.Handle; -end; - -function TcxCanvas.GetPen: TPen; -begin - Result := Canvas.Pen; -end; - -function TcxCanvas.GetViewportOrg: TPoint; -begin - GetViewportOrgEx(Handle, Result); -end; - -function TcxCanvas.GetWindowOrg: TPoint; -begin - GetWindowOrgEx(Handle, Result); -end; - -procedure TcxCanvas.SetBrush(Value: TBrush); -begin - Canvas.Brush := Value; -end; - -procedure TcxCanvas.SetCopyMode(Value: TCopyMode); -begin - Canvas.CopyMode := Value; -end; - -procedure TcxCanvas.SetFont(Value: TFont); -begin - Canvas.Font := Value; -end; - -procedure TcxCanvas.SetPen(Value: TPen); -begin - Canvas.Pen := Value; -end; - -procedure TcxCanvas.SetPixel(X, Y: Integer; Value: TColor); -begin - Canvas.Pixels[X, Y] := Value; -end; - -procedure TcxCanvas.SetViewportOrg(const P: TPoint); -begin - SetViewportOrgEx(Handle, P.X, P.Y, nil); -end; - -procedure TcxCanvas.SetWindowOrg(const P: TPoint); -begin - SetWindowOrgEx(Handle, P.X, P.Y, nil); -end; - -procedure TcxCanvas.SynchronizeObjects(ADC: THandle); - - procedure AssignFont; - var - ALogFont: TLogFont; - begin - cxGetFontData(GetCurrentObject(ADC, OBJ_FONT), ALogFont); - Font.Handle := CreateFontIndirect(ALogFont); - Font.Color := GetTextColor(ADC); - end; - - procedure AssignBrush; - - function GetBrushStyle(const ALogBrush: TLogBrush): TBrushStyle; - begin - Result := bsSolid; - case ALogBrush.lbStyle of // TODO lbStyle = BS_PATTERN - BS_HATCHED: - case ALogBrush.lbHatch of - HS_BDIAGONAL: Result := bsBDiagonal; - HS_CROSS: Result := bsCross; - HS_DIAGCROSS: Result := bsDiagCross; - HS_FDIAGONAL: Result := bsFDiagonal; - HS_HORIZONTAL: Result := bsHorizontal; - HS_VERTICAL: Result := bsVertical; - end; - BS_HOLLOW: - Result := bsClear; - end; - end; - - var - ALogBrush: TLogBrush; - begin - cxGetBrushData(GetCurrentObject(ADC, OBJ_BRUSH), ALogBrush); - Brush.Handle := CreateBrushIndirect(ALogBrush); - Brush.Color := ALogBrush.lbColor; // required: set Color before Style - Brush.Style := GetBrushStyle(ALogBrush) - end; - - procedure AssignPen; - - function GetPenStyle(const ALogPen: TLogPen): TPenStyle; - begin - Result := TPenStyle(ALogPen.lopnStyle); - end; - - function GetPenMode: TPenMode; - const - PenModes: array[TPenMode] of Integer = - (R2_BLACK, R2_WHITE, R2_NOP, R2_NOT, R2_COPYPEN, R2_NOTCOPYPEN, R2_MERGEPENNOT, - R2_MASKPENNOT, R2_MERGENOTPEN, R2_MASKNOTPEN, R2_MERGEPEN, R2_NOTMERGEPEN, - R2_MASKPEN, R2_NOTMASKPEN, R2_XORPEN, R2_NOTXORPEN); - var - I: TPenMode; - ADrawMode: Integer; - begin - Result := pmCopy; - ADrawMode := GetROP2(ADC); - for I := Low(TPenMode) to High(TPenMode) do - if PenModes[I] = ADrawMode then - Result := I; - end; - - var - ALogPen: TLogPen; - begin - cxGetPenData(GetCurrentObject(ADC, OBJ_PEN), ALogPen); - Pen.Handle := CreatePenIndirect(ALogPen); - Pen.Color := ALogPen.lopnColor; - Pen.Style := GetPenStyle(ALogPen); - Pen.Mode := GetPenMode; - Pen.Width := ALogPen.lopnWidth.X; - end; - -begin - AssignFont; - AssignBrush; - AssignPen; -end; - -procedure TcxCanvas.AlignMultiLineTextRectVertically(var R: TRect; - const AText: string; AAlignmentVert: TcxAlignmentVert; - AWordBreak, AShowPrefix: Boolean; AEnabled: Boolean = True; - ADontBreakChars: Boolean = False; AEndEllipsis: Boolean = False); -var - ASizeR: TRect; - AFlags, ARowHeight: Integer; -begin - if AAlignmentVert = vaTop then Exit; - ASizeR := Rect(0, 0, R.Right - R.Left - Ord(not AEnabled), 0); - AFlags := cxAlignLeft or cxAlignTop; - if AWordBreak then - AFlags := AFlags or cxWordBreak; - if AShowPrefix then - AFlags := AFlags or cxShowPrefix; - if ADontBreakChars then - AFlags := AFlags or cxDontBreakChars; - if AEndEllipsis and AWordBreak then - begin - ARowHeight := TextHeight('Wg'); - ASizeR.Bottom := Max(ARowHeight, ((R.Bottom - R.Top - Ord(not AEnabled)) div ARowHeight) * ARowHeight); - end - else - TextExtent(AText, ASizeR, AFlags); - case AAlignmentVert of - vaCenter: - R.Top := (R.Top + R.Bottom - (ASizeR.Bottom - ASizeR.Top)) div 2; - vaBottom: - R.Top := R.Bottom - (ASizeR.Bottom - ASizeR.Top + Ord(not AEnabled)); - end; -end; - -procedure TcxCanvas.CopyRect(const Dest: TRect; ACanvas: TCanvas; - const Source: TRect); -begin - Canvas.CopyRect(Dest, ACanvas, Source); -end; - -procedure TcxCanvas.Draw(X, Y: Integer; Graphic: TGraphic); -begin - Canvas.Draw(X, Y, Graphic); -end; - -procedure TcxCanvas.DrawComplexFrame(const R: TRect; - ALeftTopColor, ARightBottomColor: TColor; ABorders: TcxBorders; - ABorderWidth: Integer); -var - ABorder: TcxBorder; - - function GetBorderColor: TColor; - begin - if ABorder in [bLeft, bTop] then - Result := ALeftTopColor - else - Result := ARightBottomColor; - end; - - function GetBorderBounds: TRect; - begin - Result := R; - with Result do - case ABorder of - bLeft: - Right := Left + ABorderWidth; - bTop: - Bottom := Top + ABorderWidth; - bRight: - Left := Right - ABorderWidth; - bBottom: - Top := Bottom - ABorderWidth; - end; - end; - -begin - for ABorder := Low(ABorder) to High(ABorder) do - if ABorder in ABorders then - begin - SetBrushColor(GetBorderColor); - FillRect(GetBorderBounds); - end; -end; - -procedure TcxCanvas.DrawEdge(const R: TRect; ASunken, AOuter: Boolean; - ABorders: TcxBorders); -begin - if ASunken then - if AOuter then - DrawComplexFrame(R, clBtnShadow, clBtnHighlight, ABorders) - else - DrawComplexFrame(R, cl3DDkShadow{clBtnText}, cl3DLight{clBtnFace}, ABorders) - else - if AOuter then - DrawComplexFrame(R, cl3DLight{clBtnFace}, cl3DDkShadow{clBtnText}, ABorders) - else - DrawComplexFrame(R, clBtnHighlight, clBtnShadow, ABorders); -end; - -procedure TcxCanvas.DrawFocusRect(const R: TRect); -begin - SetBrushColor(clWhite); - Canvas.Font.Color := clBlack; - TCanvasAccess(Canvas).RequiredState([csFontValid]); - Canvas.DrawFocusRect(R); -end; - -procedure TcxCanvas.DrawGlyph(X, Y: Integer; AGlyph: TBitmap; AEnabled: Boolean = True; - ABackgroundColor: TColor = clNone{; ATempCanvas: TCanvas = nil}); -var - APrevBrushStyle: TBrushStyle; - AImageList: TImageList; - ABitmap: TBitmap; -begin - if AEnabled {and (ATempCanvas = nil)} then - begin - APrevBrushStyle := Brush.Style; - if ABackgroundColor = clNone then - Brush.Style := bsClear - else - Brush.Color := ABackgroundColor; - Canvas.BrushCopy(Bounds(X, Y, AGlyph.Width, AGlyph.Height), AGlyph, - Rect(0, 0, AGlyph.Width, AGlyph.Height), AGlyph.TransparentColor); - Brush.Style := APrevBrushStyle; - Exit; - end; - - AImageList := nil; - ABitmap := nil; - try - AImageList := TImageList.Create(nil); - AImageList.Width := AGlyph.Width; - AImageList.Height := AGlyph.Height; - if ABackgroundColor <> clNone then - //if ATempCanvas = nil then - begin - ABitmap := TBitmap.Create; - ABitmap.Width := AImageList.Width; - ABitmap.Height := AImageList.Height; - with ABitmap.Canvas do - begin - Brush.Color := ABackgroundColor; - FillRect(Rect(0, 0, ABitmap.Width, ABitmap.Height)); - end; - end - {else - with ATempCanvas do - begin - Brush.Color := ABackgroundColor; - FillRect(Bounds(X, Y, AGlyph.Width, AGlyph.Height)); - end}; - - if AGlyph.TransparentMode = tmFixed then - AImageList.AddMasked(AGlyph, AGlyph.TransparentColor) - else - AImageList.AddMasked(AGlyph, clDefault); - - if ABitmap <> nil then - begin - AImageList.Draw(ABitmap.Canvas, 0, 0, 0, AEnabled); // ??? itMask TODO - Draw(X, Y, ABitmap); - end - else - (*if ATempCanvas <> nil then - AImageList.Draw(ATempCanvas, X, Y, 0, AEnabled) // ??? itMask TODO - else*) - AImageList.Draw(Canvas, X, Y, 0, AEnabled); // ??? itMask TODO - finally - ABitmap.Free; - AImageList.Free; - end; -end; - -procedure TcxCanvas.DrawImage(Images: TCustomImageList; X, Y, Index: Integer; - Enabled: Boolean = True); -begin - if (0 <= Index) and (Index < Images.Count) then - begin - SaveDC; - Images.Draw(Canvas, X, Y, Index, Enabled); - RestoreDC; - end; -end; - -procedure TcxCanvas.DrawText(const Text: string; R: TRect; Flags: Integer; - Enabled: Boolean); -var - AUseDrawText: Boolean; - PrevBrushStyle: TBrushStyle; - PrevFontColor: TColor; - - procedure ProcessFlags; - var - ASize: TSize; - AAlignmentVert: TcxAlignmentVert; - begin - ASize := TextExtent(Text); - if (ASize.cx <= R.Right - R.Left) and (ASize.cy <= R.Bottom - R.Top) then - Flags := Flags or cxDontClip; - if AUseDrawText then - begin - if (Flags and cxSingleLine = 0) and (Flags and (cxAlignBottom or cxAlignVCenter) <> 0) then - begin - if Flags and cxAlignBottom <> 0 then - AAlignmentVert := vaBottom - else - AAlignmentVert := vaCenter; - AlignMultiLineTextRectVertically(R, Text, AAlignmentVert, - cxWordBreak and Flags <> 0, cxShowPrefix and Flags <> 0, Enabled, - cxDontBreakChars and Flags <> 0, cxShowEndEllipsis and Flags <> 0); - end; - Flags := cxFlagsToDTFlags(Flags); - end - else - begin - if ASize.cx < R.Right - R.Left then - case Flags and (cxAlignLeft or cxAlignRight or cxAlignHCenter) of - cxAlignRight: - R.Left := R.Right - ASize.cx - Ord(not Enabled); - cxAlignHCenter: - R.Left := (R.Left + R.Right - ASize.cx) div 2; - end; - if ASize.cy < R.Bottom - R.Top then - case Flags and (cxAlignTop or cxAlignBottom or cxAlignVCenter) of - cxAlignBottom: - R.Top := R.Bottom - ASize.cy - Ord(not Enabled); - cxAlignVCenter: - R.Top := (R.Top + R.Bottom - ASize.cy) div 2; - end; - if Flags and cxDontClip = 0 then - Flags := ETO_CLIPPED - else - Flags := 0; - end; - end; - - procedure DoDrawText; - begin - if AUseDrawText then - cxDrawText(Canvas.Handle, Text, R, Flags) - else - cxExtTextOut(Canvas.Handle, Text, R.TopLeft, R, Flags); - end; - -begin - if Length(Text) = 0 then Exit; - AUseDrawText := (Flags and cxSingleLine = 0) or - (Flags and (cxShowPrefix or cxShowEndEllipsis or cxShowPathEllipsis) <> 0); - ProcessFlags; - PrevBrushStyle := Brush.Style; - PrevFontColor := Font.Color; - if not Enabled then - begin - with R do - begin - Inc(Left); - Inc(Top); - end; - Brush.Style := bsClear; - Font.Color := clBtnHighlight; - DoDrawText; - OffsetRect(R, -1, -1); - Font.Color := clBtnShadow; - end; - DoDrawText; - if Brush.Style <> PrevBrushStyle then - Brush.Style := PrevBrushStyle; - Font.Color := PrevFontColor; -end; - -procedure TcxCanvas.DrawTexT(const Text: string; R: TRect; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; - AMultiLine, AShowEndEllipsis: Boolean); -const - MultiLines: array[Boolean] of Integer = (cxSingleLine, cxWordBreak); - ShowEndEllipsises: array[Boolean] of Integer = (0, cxShowEndEllipsis); -begin - if Text = '' then Exit; - DrawTexT(Text, R, cxAlignmentsHorz[AAlignmentHorz] or cxAlignmentsVert[AAlignmentVert] or - MultiLines[AMultiLine] or ShowEndEllipsises[AShowEndEllipsis]); -end; - -procedure TcxCanvas.FillRect(const R: TRect; AColor: TColor); -begin - if AColor = clNone then Exit; - if AColor <> clDefault then - SetBrushColor(AColor); - Canvas.FillRect(R); -end; - -procedure TcxCanvas.FillRect(const R: TRect; ABitmap: TBitmap = nil; - AExcludeRect: Boolean = False); -var - ABitmapSize, AOffset: TPoint; - AFirstCol, AFirstRow, ALastCol, ALastRow, I, J: Integer; - ABitmapRect, ACellRect: TRect; -begin - if IsRectEmpty(R) then Exit; - if not IsGlyphAssigned(ABitmap) then - Canvas.FillRect(R) - else - with ABitmapSize do - begin - X := ABitmap.Width; - Y := ABitmap.Height; - AFirstCol := R.Left div X; - AFirstRow := R.Top div Y; - ALastCol := R.Right div X - Ord(R.Right mod X = 0); - ALastRow := R.Bottom div Y - Ord(R.Bottom mod Y = 0); - for J := AFirstRow to ALastRow do - for I := AFirstCol to ALastCol do - begin - AOffset.X := I * X; - AOffset.Y := J * Y; - ACellRect := Bounds(AOffset.X, AOffset.Y, X, Y); - IntersectRect(ACellRect, ACellRect, R); - ABitmapRect := ACellRect; - OffsetRect(ABitmapRect, -AOffset.X, -AOffset.Y); - CopyRect(ACellRect, ABitmap.Canvas, ABitmapRect); - end; - end; - if AExcludeRect then - SetClipRegion(TcxRegion.Create(R), roSubtract); -end; - -procedure TcxCanvas.FillRect(R: TRect; const AParams: TcxViewParams; - ABorders: TcxBorders = []; ABorderColor: TColor = clDefault; - ALineWidth: Integer = 1; AExcludeRect: Boolean = False); -begin - FrameRect(R, ABorderColor, ALineWidth, ABorders, AExcludeRect); - with R do - begin - if bLeft in ABorders then - Inc(Left, ALineWidth); - if bRight in ABorders then - Dec(Right, ALineWidth); - if bTop in ABorders then - Inc(Top, ALineWidth); - if bBottom in ABorders then - Dec(Bottom, ALineWidth); - end; - SetBrushColor(AParams.Color); - FillRect(R, AParams.Bitmap, AExcludeRect); -end; - -procedure TcxCanvas.DrawDesignSelection(ARect: TRect; AWidth: Integer = cxDesignSelectionWidth); -var - I: Integer; -begin - for I := 0 to AWidth - 1 do - begin - DrawFocusRect(ARect); - InflateRect(ARect, -1, -1); - end; -end; - -procedure TcxCanvas.DrawRegion(ARegion: TcxRegion; AContentColor: TColor = clDefault; - ABorderColor: TColor = clDefault; ABorderWidth: Integer = 1; ABorderHeight: Integer = 1); -begin - DrawRegion(ARegion.Handle, AContentColor, ABorderColor, ABorderWidth, ABorderHeight); -end; - -procedure TcxCanvas.DrawRegion(ARegion: TcxRegionHandle; AContentColor: TColor = clDefault; - ABorderColor: TColor = clDefault; ABorderWidth: Integer = 1; ABorderHeight: Integer = 1); -begin - FillRegion(ARegion, AContentColor); - FrameRegion(ARegion, ABorderColor, ABorderWidth, ABorderHeight); -end; - -procedure TcxCanvas.FillRegion(ARegion: TcxRegion; AColor: TColor = clDefault); -begin - FillRegion(ARegion.Handle, AColor); -end; - -procedure TcxCanvas.FillRegion(ARegion: TcxRegionHandle; AColor: TColor = clDefault); -begin - SetBrushColor(AColor); - FillRgn(Handle, ARegion, Brush.Handle); -end; - -procedure TcxCanvas.FlipHorizontally(ABitmap: TBitmap); -var - Bits: TRGBColors; - ARow, ACol, W, H, ARowStart: Integer; - AValue: TRGBQuad; -begin - W := ABitmap.Width; - H := ABitmap.Height; - - Bits := GetBitmapBits(ABitmap, True); - ARowStart := 0; - for ARow := 0 to H - 1 do - begin - for ACol := 0 to (W - 1) div 2 do - begin - AValue := Bits[ARowStart + ACol]; - Bits[ARowStart + ACol] := Bits[ARowStart + W - 1 - ACol]; - Bits[ARowStart + W - 1 - ACol] := AValue; - end; - Inc(ARowStart, W); - end; - SetBitmapBits(ABitmap, Bits, True); -end; - -procedure TcxCanvas.FrameRegion(ARegion: TcxRegion; AColor: TColor = clDefault; - ABorderWidth: Integer = 1; ABorderHeight: Integer = 1); -begin - FrameRegion(ARegion.Handle, AColor, ABorderWidth, ABorderHeight); -end; - -procedure TcxCanvas.FrameRegion(ARegion: TcxRegionHandle; AColor: TColor = clDefault; - ABorderWidth: Integer = 1; ABorderHeight: Integer = 1); -begin - SetBrushColor(AColor); - FrameRgn(Handle, ARegion, Brush.Handle, ABorderWidth, ABorderHeight); -end; - -procedure TcxCanvas.Pie(const R: TRect; const ARadial1, ARadial2: TPoint); -begin - with R do - Canvas.Pie(Left, Top, Right, Bottom, ARadial1.X, ARadial1.Y, ARadial2.X, ARadial2.Y); -end; - -procedure TcxCanvas.Pie(const R: TRect; AStartAngle, ASweepAngle: Integer); - -{ - A * B - V = --------------------------------------------- - Sqrt(A^2 * Sin^2(Alpha) + B^2 * Cos^2(Alpha)) - - Radial.X = V * Cos(Alpha) - Radial.Y = V * Sin(Alpha) - - where: - A - horizontal ellipse semiaxis - B - vertical ellipse semiaxis - Angle - an angle between Radius-Vector and A calculated in counterclockwise direction -} - - function CalculateRadial(A, B: Integer; const ACenter: TPoint; AnAngle: Integer): TPoint; - var - Sin, Cos, V: Extended; - begin - SinCos(DegToRad(AnAngle), Sin, Cos); - if (A <> 0) and (B <> 0) then - V := A * B / Sqrt(A * A * Sin * Sin + B * B * Cos * Cos) - else - V := 0; - Result.X := ACenter.X + Round(V * Cos); - Result.Y := ACenter.Y - Round(V * Sin); - end; - -var - A, B: Integer; - Center, Radial1, Radial2: TPoint; -begin - if IsRectEmpty(R) or (ASweepAngle = 0) then Exit; - with R do - begin - A := (Right - Left) div 2; - B := (Bottom - Top) div 2; - Center.X := Left + A; - Center.Y := Top + B; - end; - Radial1 := CalculateRadial(A, B, Center, AStartAngle); - if ASweepAngle = 360 then - Radial2 := Radial1 - else - Radial2 := CalculateRadial(A, B, Center, AStartAngle + ASweepAngle); - if (Radial1.X <> Radial2.X) or (Radial1.Y <> Radial2.Y) or (ASweepAngle > 180) then - Pie(R, Radial1, Radial2); -end; - -function TcxCanvas.FontHeight(AFont: TFont): Integer; -begin - Font := AFont; - Result := TextHeight('Qq'); -end; - -procedure TcxCanvas.FrameRect(const R: TRect; Color: TColor = clDefault; - ALineWidth: Integer = 1; ABorders: TcxBorders = cxBordersAll; - AExcludeFrame: Boolean = False); -begin - if IsRectEmpty(R) then Exit; - if Color <> clDefault then - begin - SetBrushColor(Color); - end; - with R do - begin - if bLeft in ABorders then - FillRect(Rect(Left, Top, Min(Left + ALineWidth, Right), Bottom), nil, AExcludeFrame); - if bRight in ABorders then - FillRect(Rect(Max(Right - ALineWidth, Left), Top, Right, Bottom), nil, AExcludeFrame); - if bTop in ABorders then - FillRect(Rect(Left, Top, Right, Min(Top + ALineWidth, Bottom)), nil, AExcludeFrame); - if bBottom in ABorders then - FillRect(Rect(Left, Max(Bottom - ALineWidth, Top), Right, Bottom), nil, AExcludeFrame); - end; -end; - -procedure TcxCanvas.InvertFrame(const R: TRect; ABorderSize: Integer); -begin - with R do - begin - InvertRect(Rect(Left, Top, Left + ABorderSize, Bottom)); - InvertRect(Rect(Right - ABorderSize, Top, Right, Bottom)); - InvertRect(Rect(Left + ABorderSize, Top, - Right - ABorderSize, Top + ABorderSize)); - InvertRect(Rect(Left + ABorderSize, Bottom - ABorderSize, - Right - ABorderSize, Bottom)); - end; -end; - -procedure TcxCanvas.InvertRect(const R: TRect); -begin - with Canvas do - begin - CopyMode := cmDstInvert; - CopyRect(R, Canvas, R); - CopyMode := cmSrcCopy; - end; -end; - -procedure TcxCanvas.LineTo(X, Y: Integer); -begin - Canvas.LineTo(X, Y); -end; - -procedure TcxCanvas.MoveTo(X, Y: Integer); -begin - Canvas.MoveTo(X, Y); -end; - -procedure TcxCanvas.Polygon(const Points: array of TPoint); -begin - Canvas.Polygon(Points); -end; - -procedure TcxCanvas.Polyline(const Points: array of TPoint); -begin - Canvas.Polyline(Points); -end; - -procedure TcxCanvas.RotateBitmap(ABitmap: TBitmap; ARotationAngle: TcxRotationAngle; - AFlipVertically: Boolean = False); -var - SourceRGBs, DestRGBs: TRGBColors; - ARow, ACol, H, W, ASourceI, ADestI: Integer; -begin - SourceRGBs := nil; // to remove compiler's warning - if (ARotationAngle = ra0) and not AFlipVertically then exit; - H := ABitmap.Height; - W := ABitmap.Width; - - SourceRGBs := GetBitmapBits(ABitmap, True); - SetLength(DestRGBs, Length(SourceRGBs)); - - for ARow := 0 to H - 1 do - for ACol := 0 to W - 1 do - begin - ASourceI := ARow * W + ACol; - case ARotationAngle of - raPlus90: - if AFlipVertically then - ADestI := ACol * H + ARow - else - ADestI := (W - ACol - 1) * H + ARow; - ra0: - ADestI := (H - 1 - ARow) * W + ACol; - ra180: - if AFlipVertically then - ADestI := ARow * W + W - ACol - 1 - else - ADestI := (H - ARow - 1) * W + W - ACol - 1; - else - if AFlipVertically then - ADestI := (W - ACol - 1) * H + H - ARow - 1 - else - ADestI := H - 1 + ACol * H - ARow; - end; - DestRGBs[ADestI] := SourceRGBs[ASourceI]; - end; - - if ARotationAngle in [raPlus90, raMinus90] then - begin - ABitmap.Height := 0; - ABitmap.Width := H; - ABitmap.Height := W; - end; - SetBitmapBits(ABitmap, DestRGBs, True); -end; - -function TcxCanvas.TextExtent(const Text: string): TSize; -begin - TCanvasAccess(Canvas).RequiredState([csHandleValid, csFontValid]); - Result.cX := 0; - Result.cY := 0; - cxGetTextExtentPoint32(Handle, Text, Result); -end; - -procedure TcxCanvas.TextExtent(const Text: string; var R: TRect; Flags: Integer); -var - RWidth, RHeight, TextWidth, TextHeight: Integer; - - procedure CalcRSizes(var AWidth, AHeight: Integer); - begin - with R do - begin - AWidth := Right - Left; - AHeight := Bottom - Top; - end; - end; - - procedure AlignR; - begin - if Flags and DT_CENTER <> 0 then - OffsetRect(R, (RWidth - TextWidth) div 2, 0) - else - if Flags and DT_RIGHT <> 0 then - OffsetRect(R, RWidth - TextWidth, 0); - if Flags and DT_VCENTER <> 0 then - OffsetRect(R, 0, (RHeight - TextHeight) div 2) - else - if Flags and DT_BOTTOM <> 0 then - OffsetRect(R, 0, RHeight - TextHeight); - end; - -begin - CalcRSizes(RWidth, RHeight); - Flags := cxFlagsToDTFlags(Flags); - if (RWidth <= 0) and (Text <> '') then // A2079 - R.Right := R.Left + 1; - if cxDrawText(Canvas.Handle, Text, R, Flags and not DT_VCENTER or DT_CALCRECT) = 0 then - begin - R.Right := R.Left; - R.Bottom := R.Top; - end; - CalcRSizes(TextWidth, TextHeight); - AlignR; -end; - -function TcxCanvas.TextHeight(const Text: string): Integer; -begin - Result := TextExtent(Text).cy; -end; - -function TcxCanvas.TextWidth(const Text: string): Integer; -begin - Result := TextExtent(Text).cx; -end; - -procedure TcxCanvas.TransparentDraw(X, Y: Integer; ABitmap: TBitmap; AAlpha: Byte; - ABackground: TBitmap = nil); - - function BlendValues(ASource, ADestination: DWORD): DWORD; - begin - Result := MulDiv(ASource, AAlpha, 255) + MulDiv(ADestination, 255 - AAlpha, 255); - end; - - procedure BlendValue(const ASource: TRGBQuad; var ADestination: TRGBQuad); - begin - ADestination.rgbBlue := BlendValues(ASource.rgbBlue, ADestination.rgbBlue); - ADestination.rgbGreen := BlendValues(ASource.rgbGreen, ADestination.rgbGreen); - ADestination.rgbRed := BlendValues(ASource.rgbRed, ADestination.rgbRed); - end; - -var - W, H, ARow, ACol: Integer; - ABackgroundBitmap: TBitmap; - ABlendFunction: TBlendFunction; - ABits, ABackgroundBits: TRGBColors; -begin - ABits := nil; // to remove compiler's warning - W := ABitmap.Width; - H := ABitmap.Height; - - ABackgroundBitmap := TBitmap.Create; - ABackgroundBitmap.Width := W; - ABackgroundBitmap.Height := H; - - if ABackground = nil then - ABackgroundBitmap.Canvas.CopyRect(Rect(0, 0, W, H), Canvas, Bounds(X, Y, W, H)) - else - ABackgroundBitmap.Canvas.Draw(0, 0, ABackground); - - if Assigned(VCLAlphaBlend) then - begin - ABlendFunction := DefaultBlendFunction; - ABlendFunction.SourceConstantAlpha := AAlpha; - VCLAlphaBlend(ABackgroundBitmap.Canvas.Handle, - 0, 0, W, H, ABitmap.Canvas.Handle, 0, 0, W, H, ABlendFunction); - end - else - begin - ABits := GetBitmapBits(ABitmap, True); - ABackgroundBits := GetBitmapBits(ABackgroundBitmap, True); - - for ARow := 0 to H - 1 do - for ACol := 0 to W - 1 do - BlendValue(ABits[ACol * H + ARow], ABackgroundBits[ACol * H + ACol]); - - SetBitmapBits(ABackgroundBitmap, ABackgroundBits, True); - end; - - Draw(X, Y, ABackgroundBitmap); - - ABackgroundBitmap.Free; -end; - -procedure TcxCanvas.RestoreDC; -begin - if Length(FSavedDCs) > 0 then - begin - Canvas.Handle := FSavedDCs[High(FSavedDCs)].Handle; - Windows.RestoreDC(Handle, FSavedDCs[High(FSavedDCs)].State); - SetLength(FSavedDCs, Length(FSavedDCs) - 1); - Canvas.Unlock; - end; -end; - -procedure TcxCanvas.SaveDC; -begin - Canvas.Lock; - SetLength(FSavedDCs, Length(FSavedDCs) + 1); - FSavedDCs[High(FSavedDCs)].Handle := Handle; - FSavedDCs[High(FSavedDCs)].State := Windows.SaveDC(Handle); -end; - -procedure TcxCanvas.RestoreClipRegion; -var - ALastSavedRegionIndex: Integer; -begin - ALastSavedRegionIndex := FSavedRegions.Count - 1; - if ALastSavedRegionIndex >= 0 then - begin - SetClipRegion(TcxRegion(FSavedRegions[ALastSavedRegionIndex]), roSet); - FSavedRegions.Delete(ALastSavedRegionIndex); - end; -end; - -procedure TcxCanvas.SaveClipRegion; -begin - FSavedRegions.Add(GetClipRegion); -end; - -procedure TcxCanvas.RestoreState; - - procedure InternalRestoreState(var ACurrentState: TcxCanvasState); - begin - Font.Assign(ACurrentState.Font); - ACurrentState.Font.Free; - Brush.Assign(ACurrentState.Brush); - ACurrentState.Brush.Free; - Pen.Assign(ACurrentState.Pen); - ACurrentState.Pen.Free; - end; - -begin - if Length(FSavedStates) > 0 then - begin - InternalRestoreState(FSavedStates[High(FSavedStates)]); - SetLength(FSavedStates, Length(FSavedStates) - 1); - RestoreDC; - end; -end; - -procedure TcxCanvas.SaveState; - - procedure InternalSaveState(var ACurrentState: TcxCanvasState); - begin - ACurrentState.Font := TFont.Create; - ACurrentState.Font.Assign(Font); - ACurrentState.Brush := TBrush.Create; - ACurrentState.Brush.Assign(Brush); - ACurrentState.Pen := TPen.Create; - ACurrentState.Pen.Assign(Pen); - end; - -begin - SynchronizeObjects(Handle); - SaveDC; - SetLength(FSavedStates, Length(FSavedStates) + 1); - InternalSaveState(FSavedStates[High(FSavedStates)]); -end; - -procedure TcxCanvas.GetParams(var AParams: TcxViewParams); -begin - AParams.Color := Brush.Color; - AParams.Font := Font; - AParams.TextColor := Font.Color; -end; - -procedure TcxCanvas.SetParams(AParams: TcxViewParams); -begin - SetBrushColor(AParams.Color); - Font := AParams.Font; - Font.Color := AParams.TextColor; -end; - -procedure TcxCanvas.SetBrushColor(Value: TColor); -begin - if Brush.Color <> Value then - Brush.Color := Value; -end; - -procedure TcxCanvas.SetFontAngle(Value: Integer); -var - ALogFont: TLogFont; -begin - cxGetFontData(Font.Handle, ALogFont); - ALogFont.lfEscapement := Value * 10; - if Value <> 0 then - ALogFont.lfOutPrecision := OUT_TT_ONLY_PRECIS; - Font.Handle := CreateFontIndirect(ALogFont); -end; - -procedure TcxCanvas.GetTextStringsBounds(Text: string; R: TRect; Flags: Integer; - Enabled: Boolean; var ABounds: TRectArray); -var - AAlignHorz, AAlignVert, AMaxCharCount: Integer; - ATextR: TRect; - AStringSize: TSize; - - procedure PrepareRects; - begin - if not Enabled then - with R do - begin - Dec(Right); - Dec(Bottom); - end; - ATextR := R; - TextExtent(Text, ATextR, Flags); - case AAlignVert of - cxAlignBottom: - OffsetRect(ATextR, 0, R.Bottom - ATextR.Bottom); - cxAlignVCenter: - OffsetRect(ATextR, 0, (R.Bottom - ATextR.Bottom) div 2); - end; - end; - - procedure CheckMaxCharCount; - - function ProcessSpecialChars: Boolean; - const - SpecialChars = [#10, #13]; - var - I, ACharCount: Integer; - begin - Result := False; - for I := 1 to AMaxCharCount do - if dxCharInSet(Text[I], SpecialChars) then - begin - AMaxCharCount := I - 1; - ACharCount := 1; - if (I < Length(Text)) and - dxCharInSet(Text[I + 1], SpecialChars) and (Text[I] <> Text[I + 1]) then - Inc(ACharCount); - Delete(Text, I, ACharCount); - Result := True; - Break; - end; - end; - - procedure ProcessSpaces; - var - I: Integer; - begin - if AMaxCharCount < Length(Text) then - for I := AMaxCharCount + 1 downto 1 do - if Text[I] = ' ' then - begin - if I < AMaxCharCount then - begin - AMaxCharCount := I; - if AAlignHorz <> cxAlignLeft then - begin - Delete(Text, I, 1); - Dec(AMaxCharCount); - end; - end; - Break; - end; - end; - - begin - if not ProcessSpecialChars then - ProcessSpaces; - end; - - procedure GetStringSize; - begin - if AMaxCharCount = 0 then - AStringSize.cx := 0 - else - cxGetTextExtentPoint32(Handle, Copy(Text, 1, AMaxCharCount), AStringSize, AMaxCharCount); - end; - - function GetBounds: TRect; - begin - Result := ATextR; - with Result, AStringSize do - begin - case AAlignHorz of - cxAlignLeft: - Right := Left + cx; - cxAlignRight: - Left := Right - cx; - cxAlignHCenter: - begin - Left := (Left + Right - cx) div 2; - Right := Left + cx; - end; - end; - Bottom := Top + cy; - end; - ATextR.Top := Result.Bottom; - end; - -begin - if Text = '' then Exit; - if Flags and cxShowPrefix <> 0 then - begin - Text := StripHotKey(Text); - Flags := Flags and not cxShowPrefix; - end; - AAlignHorz := Flags and (cxAlignLeft or cxAlignRight or cxAlignHCenter); - AAlignVert := Flags and (cxAlignTop or cxAlignBottom or cxAlignVCenter); - PrepareRects; - repeat - GetTextExtentExPoint(Handle, PChar(Text), Length(Text), R.Right - R.Left, - @AMaxCharCount, nil, AStringSize); - CheckMaxCharCount; - GetStringSize; - SetLength(ABounds, High(ABounds) + 2); - ABounds[High(ABounds)] := GetBounds; - Delete(Text, 1, AMaxCharCount); - until Text = ''; -end; - -procedure TcxCanvas.BeginPath; -begin - Windows.BeginPath(Handle); -end; - -procedure TcxCanvas.EndPath; -begin - Windows.EndPath(Handle); -end; - -function TcxCanvas.PathToRegion: TcxRegion; -begin - Result := TcxRegion.Create(Windows.PathToRegion(Handle)); -end; - -procedure TcxCanvas.WidenPath; -begin - Windows.WidenPath(Handle); -end; - -procedure TcxCanvas.ExcludeClipRect(const R: TRect); -begin - with R do - Windows.ExcludeClipRect(Handle, Left, Top, Right, Bottom); -end; - -procedure TcxCanvas.IntersectClipRect(const R: TRect); -begin - with R do - Windows.IntersectClipRect(Canvas.Handle, Left, Top, Right, Bottom); -end; - -function TcxCanvas.GetClipRegion(AConsiderOrigin: Boolean = True): TcxRegion; -const - MaxRegionSize = 30000; -begin - Result := TcxRegion.Create; - if GetClipRgn(Handle, Result.Handle) = 0 then - SetRectRgn(Result.Handle, 0, 0, MaxRegionSize, MaxRegionSize); - if AConsiderOrigin then - Result.Offset(-DCOrigin.X, -DCOrigin.Y); -end; - -procedure TcxCanvas.SetClipRegion(ARegion: TcxRegion; AOperation: TcxRegionOperation; - ADestroyRegion: Boolean = True; AConsiderOrigin: Boolean = True); -var - AClipRegion: TcxRegion; - ARegionOrigin: TPoint; -begin - if AOperation = roSet then - begin - if AConsiderOrigin then - begin - ARegionOrigin := DCOrigin; - ARegion.Offset(ARegionOrigin.X, ARegionOrigin.Y); - end; - SelectClipRgn(Handle, ARegion.Handle); - if ADestroyRegion then - ARegion.Free - else - if AConsiderOrigin then - ARegion.Offset(-ARegionOrigin.X, -ARegionOrigin.Y); - end - else - begin - AClipRegion := GetClipRegion(AConsiderOrigin); - AClipRegion.Combine(ARegion, AOperation, ADestroyRegion); - SetClipRegion(AClipRegion, roSet, True, AConsiderOrigin); - end; -end; - -function TcxCanvas.RectFullyVisible(const R: TRect): Boolean; -var - AClipRegion, ARegion: TcxRegion; -begin - AClipRegion := GetClipRegion; - ARegion := TcxRegion.Create(R); - try - CombineRgn(AClipRegion.Handle, AClipRegion.Handle, ARegion.Handle, RGN_AND); - Result := AClipRegion.IsEqual(ARegion); - finally - ARegion.Free; - AClipRegion.Free; - end; -end; - -function TcxCanvas.RectVisible(const R: TRect): Boolean; -begin - Result := Windows.RectVisible(Handle, R); -end; - -{ TcxScreen } - -type - TScreenCanvas = class(TCanvas) - private - FDeviceContext: HDC; - FWindowHandle: HWND; - protected - procedure CreateHandle; override; - procedure FreeHandle; - public - destructor Destroy; override; - end; - -destructor TScreenCanvas.Destroy; -begin - FreeHandle; - inherited; -end; - -procedure TScreenCanvas.CreateHandle; -begin - FWindowHandle := GetDesktopWindow; - FDeviceContext := GetDCEx(FWindowHandle, 0, DCX_CACHE or DCX_LOCKWINDOWUPDATE); //B96653 - Handle := FDeviceContext; -end; - -procedure TScreenCanvas.FreeHandle; -begin - if FDeviceContext <> 0 then - begin - Handle := 0; - ReleaseDC(FWindowHandle, FDeviceContext); - FDeviceContext := 0; - FWindowHandle := 0; - end; -end; - -{ TcxScreenCanvas } - -constructor TcxScreenCanvas.Create; -begin - inherited Create(TScreenCanvas.Create); -end; - -destructor TcxScreenCanvas.Destroy; -begin - FreeAndNil(FCanvas); - inherited; -end; - -procedure TcxScreenCanvas.Dormant; -begin - TScreenCanvas(Canvas).FreeHandle; -end; - -function cxScreenCanvas: TcxScreenCanvas; -begin - if (ScreenCanvas = nil) and not FUnitIsFinalized then - ScreenCanvas := TcxScreenCanvas.Create; - Result := ScreenCanvas; -end; - -{ TcxPaintCanvas } - -constructor TcxPaintCanvas.Create; -begin - inherited Create(TCanvas.Create); -end; - -destructor TcxPaintCanvas.Destroy; -begin - Canvas.Free; - inherited; -end; - -procedure TcxPaintCanvas.BeginPaint(ADC: THandle); -begin - SetLength(FSavedDCs, FCounter + 1); - - if HandleValid then - begin - SaveState; - FSavedDCs[FCounter].PrevDC := Handle; - end - else - FSavedDCs[FCounter].PrevDC := 0; - - FSavedDCs[FCounter].PrevCanvas := nil; - FSavedDCs[FCounter].NewDC := ADC; - FSavedDCs[FCounter].NewDCIndex := Windows.SaveDC(ADC); - SynchronizeObjects(ADC); - Canvas.Handle := ADC; - Inc(FCounter); -end; - -procedure TcxPaintCanvas.BeginPaint(ACanvas: TCanvas); -begin - SetLength(FSavedDCs, FCounter + 1); - FSavedDCs[FCounter].PrevCanvas := Canvas; - Canvas := ACanvas; - SaveState; - Inc(FCounter); -end; - -procedure TcxPaintCanvas.EndPaint; -begin - if FCounter > 0 then - begin - Dec(FCounter); - if FSavedDCs[FCounter].PrevCanvas <> nil then - begin - RestoreState; - Canvas := FSavedDCs[FCounter].PrevCanvas; - end - else - begin - Canvas.Handle := FSavedDCs[FCounter].PrevDC; - Windows.RestoreDC(FSavedDCs[FCounter].NewDC, FSavedDCs[FCounter].NewDCIndex); - if HandleValid then - RestoreState; - end; - SetLength(FSavedDCs, FCounter); - end; -end; - -function TcxPaintCanvas.HandleValid; -begin - Result := Canvas.HandleAllocated; -end; - -function cxPaintCanvas: TcxPaintCanvas; -begin - if (PaintCanvas = nil) and not FUnitIsFinalized then - PaintCanvas := TcxPaintCanvas.Create; - Result := PaintCanvas; -end; - -procedure cxTransformImages(AImageList: TcxImageList; ABkColor: TColor; AEnabled: Boolean = True); -var - ACopy: TcxImageList; -begin - ACopy := TcxImageList.CreateSize(AImageList.Width, AImageList.Height); - try - ACopy.CopyImages(AImageList); - cxTransformImages(ACopy, AImageList, ABkColor, AEnabled); - finally - ACopy.Free; - end; -end; - -procedure cxTransformImages(ASourceImageList, ADestinationImageList: TcxImageList; ABkColor: TColor; AEnabled: Boolean = True); -var - AAlphaBitmap: TcxAlphaBitmap; - ABitmap: TcxBitmap; - I: Integer; -begin - ADestinationImageList.Clear; - AAlphaBitmap := TcxAlphaBitmap.CreateSize(ASourceImageList.Width, ASourceImageList.Height, dxColorToRGBQuad(ABkColor, $FF)); - ABitmap := TcxBitmap.CreateSize(AAlphaBitmap.ClientRect, pf24bit); - try - for I := 0 to ASourceImageList.Count - 1 do - begin - AAlphaBitmap.Clear; - ASourceImageList.Draw(AAlphaBitmap.Canvas, AAlphaBitmap.ClientRect, I, True, False, AEnabled); - ABitmap.CopyBitmap(AAlphaBitmap); - ADestinationImageList.AddMasked(ABitmap, ABkColor); - end; - finally - ABitmap.Free; - AAlphaBitmap.Free; - end; -end; - -{ TcxBitmap } - -constructor TcxBitmap.Create; -begin - CreateSize(0, 0); -end; - -constructor TcxBitmap.CreateSize(const ARect: TRect); -begin - CreateSize(cxRectWidth(ARect), cxRectHeight(ARect)); -end; - -constructor TcxBitmap.CreateSize(AWidth, AHeight: Integer); -begin - CreateSize(AWidth, AHeight, pf24bit); -end; - -constructor TcxBitmap.CreateSize(const ARect: TRect; APixelFormat: TPixelFormat); -begin - CreateSize(cxRectWidth(ARect), cxRectHeight(ARect), APixelFormat); -end; - -constructor TcxBitmap.CreateSize(AWidth, AHeight: Integer; APixelFormat: TPixelFormat); -begin - inherited Create; - - Initialize(AWidth, AHeight, APixelFormat); -end; - -destructor TcxBitmap.Destroy; -begin - FreeAndNil(FcxCanvas); - inherited; -end; - -procedure TcxBitmap.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TcxBitmap.CancelUpdate; -begin - Dec(FLockCount); -end; - -procedure TcxBitmap.EndUpdate(AForceUpdate: Boolean = True); -begin - Dec(FLockCount); - if (FLockCount = 0) and (AForceUpdate or FModified) then - Changed(Self); -end; - -procedure TcxBitmap.CopyBitmap(ABitmap: TBitmap; ACopyMode: DWORD = SRCCOPY); -begin - CopyBitmap(ABitmap, ClientRect, cxNullPoint, ACopyMode); -end; - -procedure TcxBitmap.CopyBitmap(ABitmap: TBitmap; const ADestRect: TRect; const ASrcTopLeft: TPoint; ACopyMode: DWORD); -begin - cxBitBlt(Canvas.Handle, ABitmap.Canvas.Handle, ADestRect, ASrcTopLeft, ACopyMode); -end; - -procedure TcxBitmap.Rotate(ARotationAngle: TcxRotationAngle; AFlipVertically: Boolean); -begin - cxCanvas.RotateBitmap(Self, ARotationAngle, AFlipVertically); -end; - -procedure TcxBitmap.SetSize(AWidth, AHeight: Integer); -begin - AWidth := Max(0, AWidth); - AHeight := Max(0, AHeight); - if (AWidth <> Width) or (AHeight <> Height) then - begin - BeginUpdate; - try - {$IFDEF DELPHI10} - inherited SetSize(AWidth, AHeight); - {$ELSE} - Width := AWidth; - Height := AHeight; - {$ENDIF} - finally - EndUpdate(False); - end; - end; -end; - -procedure TcxBitmap.SetSize(const ARect: TRect); -begin - SetSize(cxRectWidth(ARect), cxRectHeight(ARect)); -end; - -procedure TcxBitmap.Changed(Sender: TObject); -begin - if not ChangeLocked then - begin - inherited; - Update; - FModified := False; - end - else - FModified := True; -end; - -function TcxBitmap.ChangeLocked: Boolean; -begin - Result := FLockCount > 0; -end; - -procedure TcxBitmap.Initialize(AWidth, AHeight: Integer; APixelFormat: TPixelFormat); -begin - FcxCanvas := TcxCanvas.Create(Canvas); - - BeginUpdate; - try - PixelFormat := APixelFormat; - SetSize(AWidth, AHeight); - finally - EndUpdate; - end; -end; - -procedure TcxBitmap.Update; -begin -// do nothing -end; - -const - ADXBMSignature: Integer = $4D424458; //DXBM - ADXBMVersion: Word = 2; - -procedure TcxBitmap.ReadData(Stream: TStream); -var - ASize: Integer; - ASignature: Integer; - AVersion: Word; - AStreamPos: Integer; - AMemoryStream: TMemoryStream; -begin - AStreamPos := Stream.Position; - Stream.Read(ASize, SizeOf(ASize)); - Stream.Read(ASignature, SizeOf(ASignature)); - Stream.Read(AVersion, SizeOf(AVersion)); - if ASignature <> ADXBMSignature then - begin - Stream.Position := AStreamPos; - inherited ReadData(Stream); - end - else - begin - AMemoryStream := TMemoryStream.Create; - try - case AVersion of - 1: Decompress1(Stream, AMemoryStream, ASize); - 2: Decompress2(Stream, AMemoryStream, ASize); - end; - AMemoryStream.Position := 0; - inherited ReadData(AMemoryStream); - finally - AMemoryStream.Free; - end; - end; -end; - -procedure TcxBitmap.WriteData(Stream: TStream); - - procedure WriteSignature(AStream: TStream; ASize, ASignaturePosition: Integer); - var - ACurrentPos: Integer; - begin - ACurrentPos := AStream.Position; - AStream.Position := ASignaturePosition; - AStream.Write(ASize, SizeOf(ASize)); - AStream.Write(ADXBMSignature, SizeOf(ADXBMSignature)); - AStream.Write(ADXBMVersion, SizeOf(ADXBMVersion)); - AStream.Position := ACurrentPos; - end; - -var - AMemoryStream: TMemoryStream; - ASignaturePosition, ADataOffset: Integer; - ASize: Integer; -begin - if CompressData then - begin - AMemoryStream := TMemoryStream.Create; - try - inherited WriteData(AMemoryStream); - AMemoryStream.Position := 0; - ASignaturePosition := Stream.Position; - ADataOffset := SizeOf(ASize) + SizeOf(ADXBMSignature) + SizeOf(ADXBMVersion); - Stream.Position := Stream.Position + ADataOffset; - Compress(AMemoryStream, Stream, AMemoryStream.Size); - finally - AMemoryStream.Free; - end; - ASize := Stream.Position - ADataOffset; - WriteSignature(Stream, ASize, ASignaturePosition); - end - else - inherited; -end; - -type - TSeekMode = (smDup, smUnique); -const - AModeMap: array[Boolean] of TSeekMode = (smDup, smUnique); - AModeMask: array[TSeekMode] of Byte = (0, 128); - -function ReadByte(AStream: TStream; AMaxPos: Integer; var AByte: Byte): Boolean; -begin - Result := AStream.Position < AMaxPos; - if Result then - AStream.Read(AByte, SizeOf(Byte)); -end; - -procedure WriteByte(AStream: TStream; AByte: Byte); -begin - AStream.Write(AByte, SizeOf(Byte)); -end; - -function CompareBlock(ABlock1, ABlock2: TBytes): Boolean; -begin - Result := (Length(ABlock1) = Length(ABlock2)) and CompareMem(ABlock1, ABlock2, Length(ABlock1)); -end; - -function ReadBlock(AStream: TStream; AMaxPos: Integer; var ABlock: TBytes; ABlockSize: Integer): Boolean; -var - I: Integer; -begin - Result := True; - for I := 0 to ABlockSize - 1 do - Result := Result and ReadByte(AStream, AMaxPos, ABlock[I]); -end; - -procedure WriteBlock(AStream: TStream; ABlock: TBytes; ABlockSize: Integer); -var - I: Integer; -begin - for I := 0 to ABlockSize - 1 do - WriteByte(AStream, ABlock[I]); -end; - -procedure TcxBitmap.CompressByBlock(ASourceStream, ADestStream: TStream; ASize, ABlockSize: Integer); - - function GetCounter(ASeekBlock: TBytes; AMode: TSeekMode; AMaxPos: Integer): Integer; - var - ABlock: TBytes; - begin - Result := 1; - SetLength(ABlock, ABlockSize); - while (Result < 125) and ReadBlock(ASourceStream, AMaxPos, ABlock, ABlockSize) do - begin - if (AMode = smDup) and CompareBlock(ABlock, ASeekBlock) or (AMode = smUnique) and not CompareBlock(ABlock, ASeekBlock) then - Inc(Result) - else - begin - if AMode = smUnique then - Dec(Result); - Break; - end; - cxCopyData(ABlock, ASeekBlock, ABlockSize); - end; - end; - -var - AReadBlock1, AReadBlock2: TBytes; - ACounter, AReadedCount: Integer; - AStreamPos, AMaxPos: Integer; - AMode: TSeekMode; -begin - AMaxPos := ASourceStream.Position + ASize; - - SetLength(AReadBlock1, ABlockSize); - SetLength(AReadBlock2, ABlockSize); - - while ReadBlock(ASourceStream, AMaxPos, AReadBlock1, ABlockSize) do - begin - AReadedCount := ABlockSize; - AStreamPos := ASourceStream.Position - ABlockSize; - if ReadBlock(ASourceStream, AMaxPos, AReadBlock2, ABlockSize) then - begin - Inc(AReadedCount, ABlockSize); - AMode := AModeMap[(AReadedCount = ABlockSize) or not CompareBlock(AReadBlock1, AReadBlock2)]; - ASourceStream.Position := ASourceStream.Position - (AReadedCount - ABlockSize); - ACounter := GetCounter(AReadBlock1, AMode, AMaxPos); - end - else - begin - AMode := smUnique; - ACounter := 1; - end; - - WriteByte(ADestStream, ACounter or AModeMask[AMode]); - case AMode of - smUnique: - begin - ASourceStream.Position := AStreamPos; - ADestStream.CopyFrom(ASourceStream, ACounter * ABlockSize); - end; - smDup: - WriteBlock(ADestStream, AReadBlock1, ABlockSize); - end; - ASourceStream.Position := AStreamPos + ACounter * ABlockSize; - end; -end; - -procedure TcxBitmap.DecompressByBlock(ASourceStream, ADestStream: TStream; ASize, ABlockSize: Integer); -var - ACode: Byte; - AReadBlob: TBytes; - AMaxPos: Integer; - I: Integer; - ACounter: Integer; -begin - AMaxPos := ASourceStream.Position + ASize; - - SetLength(AReadBlob, ABlockSize); - - while ReadByte(ASourceStream, AMaxPos, ACode) do - begin - ACounter := ACode and 127; - if (ACode and AModeMask[smUnique]) <> 0 then - ADestStream.CopyFrom(ASourceStream, ACounter * ABlockSize) - else - begin - ReadBlock(ASourceStream, AMaxPos, AReadBlob, ABlockSize); - for I := 0 to ACounter - 1 do - WriteBlock(ADestStream, AReadBlob, ABlockSize); - end; - end; -end; - -procedure TcxBitmap.Compress(ASourceStream, ADestStream: TStream; ASize: Integer); -var - ABlockSize, AShift: Byte; -begin - ABlockSize := Max(cxGetBitmapPixelFormat(Self) div 8, 1); - AShift := ASourceStream.Size mod ABlockSize; - WriteByte(ADestStream, ABlockSize); - WriteByte(ADestStream, AShift); - if AShift > 0 then - ADestStream.CopyFrom(ASourceStream, AShift); - CompressByBlock(ASourceStream, ADestStream, ASize - AShift, ABlockSize); -end; - -procedure TcxBitmap.Decompress1(ASourceStream, ADestStream: TStream; ASize: Integer); -begin - DecompressByBlock(ASourceStream, ADestStream, ASize, 1); -end; - -procedure TcxBitmap.Decompress2(ASourceStream, ADestStream: TStream; ASize: Integer); -var - ABlockSize, AShift: Byte; -begin - ReadByte(ASourceStream, ASize, ABlockSize); - ReadByte(ASourceStream, ASize, AShift); - if AShift > 0 then - ADestStream.CopyFrom(ASourceStream, AShift); - DecompressByBlock(ASourceStream, ADestStream, ASize - (2 + AShift), ABlockSize); -end; - -function TcxBitmap.GetClientRect: TRect; -begin - Result := Rect(0, 0, Width, Height); -end; - -{ TcxAlphaBitmap } - -function TcxColorList.Add(AColor: TColor): Integer; -begin - Result := inherited Add(Pointer(cxColorEssence(dxColorToRGBQuad(AColor)))); -end; - -{ TcxBitmap32 } - -constructor TcxBitmap32.CreateSize(AWidth, AHeight: Integer; AClear: Boolean); -begin - CreateSize(AWidth, AHeight, pf32bit); - if AClear then - Clear; -end; - -constructor TcxBitmap32.CreateSize(const ARect: TRect; AClear: Boolean); -begin - CreateSize(ARect, pf32bit); - if AClear then - Clear; -end; - -constructor TcxBitmap32.CreateSize(AWidth, AHeight: Integer); -begin - CreateSize(AWidth, AHeight, pf32bit); -end; - -procedure TcxBitmap32.GetBitmapColors(out AColors: TRGBColors); -begin - SetLength(AColors, Width * Height); - InternalGetDIB(Self, AColors, False); -end; - -procedure TcxBitmap32.SetBitmapColors(const AColors: TRGBColors); -begin - InternalSetDIB(Self, AColors, False); -end; - -procedure TcxBitmap32.AlphaBlend(ABitmap: TcxBitmap32; const ARect: TRect; ASmoothImage: Boolean; AConstantAlpha: Byte = $FF); -begin - cxAlphaBlend(ABitmap, Self, ARect, ClientRect, ASmoothImage, AConstantAlpha); -end; - -procedure TcxBitmap32.Clear; -begin - FillRect(Canvas.Handle, ClientRect, GetStockObject(BLACK_BRUSH)); -end; - -procedure TcxBitmap32.Filter(AMaskBitmap: TcxBitmap32); -const - DSna = $00220326; -begin - CopyBitmap(AMaskBitmap, DSna); -end; - -procedure TcxBitmap32.Invert; -begin - CopyBitmap(Self, NOTSRCCOPY); -end; - -procedure TcxBitmap32.LoadFromStream(Stream: TStream); -begin - BeginUpdate; - try - inherited LoadFromStream(Stream); - finally - PixelFormat := pf32bit; - EndUpdate; - end; -end; - -procedure TcxBitmap32.MakeOpaque; -begin - SetAlphaChannel($FF); -end; - -procedure TcxBitmap32.RecoverTransparency(ATransparentColor: TColor); -var - AColors: TRGBColors; - AColor: TRGBQuad; - ATransparentBGR: DWORD; - I: Integer; -begin - ATransparentBGR := cxColorEssence(dxColorToRGBQuad(ATransparentColor)); - GetBitmapColors(AColors); - for I := 0 to Length(AColors) - 1 do - begin - AColor := AColors[I]; - if cxColorEssence(AColor) = ATransparentBGR then - Cardinal(AColors[I]) := 0 - else - if AColor.rgbReserved = 0 then - AColors[I].rgbReserved := 255; - end; - SetBitmapColors(AColors); -end; - -procedure TcxBitmap32.SetAlphaChannel(Alpha: Byte); -var - AColors: TRGBColors; - I: Integer; -begin - GetBitmapColors(AColors); - for I := 0 to Length(AColors) - 1 do - AColors[I].rgbReserved := Alpha; - SetBitmapColors(AColors); -end; - -procedure TcxBitmap32.Update; -begin - if PixelFormat <> pf32bit then - raise EdxException.Create('Wrong PixelFormat'); -end; - -function TcxBitmap32.GetIsAlphaUsed: Boolean; -var - AColors: TRGBColors; - I: Integer; -begin - Result := False; - GetBitmapColors(AColors); - for I := Low(AColors) to High(AColors) do - begin - Result := AColors[I].rgbReserved <> 0; - if Result then - Break; - end; -end; - -{ TcxAlphaBitmap } - -constructor TcxAlphaBitmap.CreateSize(AWidth, AHeight: Integer); -begin - inherited; //CBUILDER workaround -end; - -constructor TcxAlphaBitmap.CreateSize(AWidth, AHeight: Integer; ATransparentBkColor: TRGBQuad); -begin - inherited CreateSize(AWidth, AHeight, pf32bit); - - TransparentBkColor := ATransparentBkColor; -end; - -destructor TcxAlphaBitmap.Destroy; -begin - FreeAndNil(FTransparentPixels); - inherited; -end; - -procedure TcxAlphaBitmap.Clear; -begin - if FTransparentBkColor.rgbReserved <> 0 then - TransformBitmap(btmClear) - else - inherited; -end; - -procedure TcxAlphaBitmap.DrawHatch(const AHatchData: TcxHatchData); -begin - HatchData := AHatchData; - TransformBitmap(btmHatch); -end; - -procedure TcxAlphaBitmap.DrawHatch(AColor1, AColor2: TColor; AStep, AAlpha1, AAlpha2: Byte); -var - AHatchData: TcxHatchData; -begin - AHatchData.Color1 := dxColorToRGBQuad(AColor1, $FF); - AHatchData.Alpha1 := AAlpha1; - AHatchData.Color2 := dxColorToRGBQuad(AColor2, $FF); - AHatchData.Alpha2 := AAlpha2; - AHatchData.Step := AStep; - DrawHatch(AHatchData); -end; - -procedure TcxAlphaBitmap.DrawShadow(AMaskBitmap: TcxAlphaBitmap; AShadowSize: Integer; AShadowColor: TColor; AInflateSize: Boolean); -const - DPSnaa = $00200F09; -var - AShadowBitmap, ASelfCopy: TcxAlphaBitmap; -begin - AShadowBitmap := TcxAlphaBitmap.CreateSize(Width + AShadowSize * 2, Height + AShadowSize * 2, ClrNone); - try - AShadowBitmap.Clear; - AShadowBitmap.CopyBitmap(AMaskBitmap, cxRectOffset(ClientRect, AShadowSize, AShadowSize), cxNullPoint); - AShadowBitmap.Canvas.Brush.Color := AShadowColor; - AShadowBitmap.Canvas.CopyMode := DPSnaa; - AShadowBitmap.Canvas.Draw(AShadowSize, AShadowSize, AShadowBitmap); - - AShadowBitmap.TransparentBkColor := ClrTransparent; - AShadowBitmap.TransformBitmap(btmCorrectBlend); - - ASelfCopy := TcxAlphaBitmap.CreateSize(Width + AShadowSize, Height + AShadowSize, True); - try - ASelfCopy.CopyBitmap(Self); - ASelfCopy.CopyBitmap(AShadowBitmap, ASelfCopy.ClientRect, Point(AShadowSize, AShadowSize), SRCPAINT); - if AInflateSize then - SetSize(Width + AShadowSize, Height + AShadowSize); - CopyBitmap(ASelfCopy); - finally - ASelfCopy.Free; - end; - finally - AShadowBitmap.Free; - end; -end; - -procedure TcxAlphaBitmap.RecoverAlphaChannel(ATransparentColor: TColor); -begin - TransparentPixels.Clear; - TransparentPixels.Add(ATransparentColor); - TransparentBkColor := dxColorToRGBQuad(ATransparentColor); - TransformBitmap(btmCorrectBlend); -end; - -procedure TcxAlphaBitmap.Shade(AMaskBitmap: TcxAlphaBitmap); -const - DSPDxax = $00E20746; -begin - AMaskBitmap.Canvas.CopyMode := cmPatInvert; - AMaskBitmap.Canvas.Draw(0, 0, AMaskBitmap); - - Canvas.CopyMode := cmSrcCopy; - Canvas.Draw(1, 1, AMaskBitmap); - - Canvas.CopyMode := DSPDxax; - Canvas.Brush.Color := clBtnShadow; - Canvas.Draw(0, 0, AMaskBitmap); - - TransformBitmap(btmCorrectBlend); -end; - -procedure TcxAlphaBitmap.TransformBitmap(AMode: TcxBitmapTransformationMode); -var - AColors: TRGBColors; - I, J: Integer; - ATransformProc: TcxBitmapTransformationProc; -begin - case AMode of - btmDingy: - ATransformProc := Dingy; - btmDirty: - ATransformProc := Dirty; - btmGrayScale: - ATransformProc := GrayScale; - btmSetOpaque: - ATransformProc := SetOpaque; - btmMakeMask: - ATransformProc := MakeMask; - btmFade: - ATransformProc := Fade; - btmDisable: - ATransformProc := Disable; - btmCorrectBlend: - ATransformProc := CorrectBlend; - btmHatch: - ATransformProc := Hatch; - btmClear: - ATransformProc := ClearColor; - btmResetAlpha: - ATransformProc := ResetAlpha; - else - Exit; - end; - - GetBitmapColors(AColors); - - for I := 0 to Width - 1 do - for J := 0 to Height - 1 do - begin - FCurrentColorIndex.X := I; - FCurrentColorIndex.Y := J; - - ATransformProc(AColors[J * Width + I]); - end; - - SetBitmapColors(AColors); - Changed(Self); -end; - -procedure TcxAlphaBitmap.Initialize(AWidth, AHeight: Integer; APixelFormat: TPixelFormat); -begin - FTransparentPixels := TcxColorList.Create; - inherited; -end; - -procedure TcxAlphaBitmap.RefreshImage(AWidth, AHeight: Integer); -begin - SetSize(AWidth, AHeight); - TransparentPixels.Clear; - Clear; -end; - -procedure TcxAlphaBitmap.RefreshImage(const ARect: TRect); -begin - RefreshImage(cxRectWidth(ARect), cxRectHeight(ARect)); -end; - -procedure TcxAlphaBitmap.CorrectBlend(var AColor: TRGBQuad); -begin - if not IsColorTransparent(AColor) and (AColor.rgbReserved = 0) then - AColor.rgbReserved := $FF; -end; - -procedure TcxAlphaBitmap.ClearColor(var AColor: TRGBQuad); -begin - AColor := TransparentBkColor; -end; - -procedure TcxAlphaBitmap.Dingy(var AColor: TRGBQuad); - - procedure LightColor(var AColor: Byte); - begin - AColor := GetChannelValue(AColor + MulDiv(255 - AColor, 3, 10)); - end; - - procedure BlendColor(var AColor: Byte); - begin - AColor := GetChannelValue(MulDiv(AColor, 200, 255)); - end; - -begin - if not IsColorTransparent(AColor) then - begin - if AColor.rgbReserved = $FF then - begin - LightColor(AColor.rgbRed); - LightColor(AColor.rgbGreen); - LightColor(AColor.rgbBlue); - end - else - begin - BlendColor(AColor.rgbRed); - BlendColor(AColor.rgbGreen); - BlendColor(AColor.rgbBlue); - BlendColor(AColor.rgbReserved); - end; - end; -end; - -procedure TcxAlphaBitmap.Dirty(var AColor: TRGBQuad); -var - ADirtyScreen:TRGBQuad; -begin - if not IsColorTransparent(AColor) then - begin - Scale(AColor, GrayMap); - - ADirtyScreen := dxColorToRGBQuad(clBtnShadow); - ADirtyScreen.rgbReserved := $C0; - - cxBlendFunction(ADirtyScreen, AColor, $EE); - end; -end; - -procedure TcxAlphaBitmap.Disable(var AColor: TRGBQuad); -begin - if not IsColorTransparent(AColor) then - Scale(AColor, DisableMap); -end; - -procedure TcxAlphaBitmap.Fade(var AColor: TRGBQuad); -begin - if not IsColorTransparent(AColor) then - Scale(AColor, FadeMap); -end; - -procedure TcxAlphaBitmap.GrayScale(var AColor: TRGBQuad); -var - AValue: Byte; -begin - if not IsColorTransparent(AColor) then - begin - AValue := (AColor.rgbRed + AColor.rgbGreen + AColor.rgbBlue) div 3; - AColor.rgbRed := AValue; - AColor.rgbGreen := AValue; - AColor.rgbBlue := AValue; - end; -end; - -procedure TcxAlphaBitmap.Hatch(var AColor: TRGBQuad); -begin - if Odd(FCurrentColorIndex.X div FHatchData.Step + FCurrentColorIndex.Y div FHatchData.Step) then - cxBlendFunction(FHatchData.Color2, AColor, FHatchData.Alpha2) - else - cxBlendFunction(FHatchData.Color1, AColor, FHatchData.Alpha1); -end; - -procedure TcxAlphaBitmap.MakeMask(var AColor: TRGBQuad); -begin - if IsColorTransparent(AColor) then - AColor := ClrNone - else - AColor := ClrTransparent; -end; - -procedure TcxAlphaBitmap.SetOpaque(var AColor: TRGBQuad); -begin - AColor.rgbReserved := $FF; -end; - -procedure TcxAlphaBitmap.ResetAlpha(var AColor: TRGBQuad); -begin - AColor.rgbReserved := 0; -end; - -procedure TcxAlphaBitmap.Scale(var AColor: TRGBQuad; const AColorMap: TcxColorTransitionMap); -var - AResultValue: Byte; -begin - AResultValue := Round(AColorMap.RedScale * AColor.rgbRed + AColorMap.GreenScale * AColor.rgbGreen + AColorMap.BlueScale * AColor.rgbBlue); - AColor.rgbBlue := AResultValue; - AColor.rgbGreen := AResultValue; - AColor.rgbRed := AResultValue; -end; - -function TcxAlphaBitmap.IsColorTransparent(const AColor: TRGBQuad): Boolean; - - function IsTransparentPixel(AColor: DWORD): Boolean; - begin - Result := TransparentPixels.IndexOf(Pointer(AColor)) <> -1; - end; - -begin - Result := cxColorIsEqual(AColor, TransparentBkColor) or IsTransparentPixel(cxColorEssence(AColor)); -end; - -{ TcxImageInfo } - -constructor TcxImageInfo.Create; -begin - inherited Create; - FImage := TcxBitmap.Create; - FMask := TcxBitmap.Create; - FMaskColor := clNone; -end; - -destructor TcxImageInfo.Destroy; -begin - FreeAndNil(FMask); - FreeAndNil(FImage); - inherited; -end; - -procedure TcxImageInfo.Assign(Source: TPersistent); -begin - if Source is TcxImageInfo then - begin - Image := TcxImageInfo(Source).Image; - Mask := TcxImageInfo(Source).Mask; - MaskColor := TcxImageInfo(Source).MaskColor; - end - else - inherited; -end; - -procedure TcxImageInfo.SetImage(Value: TBitmap); -begin - AssignBitmap(Value, Image); -end; - -procedure TcxImageInfo.SetMask(Value: TBitmap); -begin - AssignBitmap(Value, Mask); -end; - -procedure TcxImageInfo.AssignBitmap(ASourceBitmap, ADestBitmap: TBitmap); -begin - ADestBitmap.Assign(ASourceBitmap); - ADestBitmap.Handle; // HandleNeeded -end; - -{ TcxImageList } - -type - TcxImageInfoItem = class(TCollectionItem) - private - FImageInfo: TcxImageInfo; - - function GetCompressData: Boolean; - function GetImage: TBitmap; - function GetMask: TBitmap; - function GetMaskColor: TColor; - procedure SetCompressData(Value: Boolean); - procedure SetImage(Value: TBitmap); - procedure SetMask(Value: TBitmap); - procedure SetMaskColor(Value: TColor); - public - constructor Create(ACollection: TCollection); overload; override; - constructor Create(ACollection: TCollection; AImage, AMask: TBitmap; AMaskColor: TColor = clNone); reintroduce; overload; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - property CompressData: Boolean read GetCompressData write SetCompressData; - property ImageInfo: TcxImageInfo read FImageInfo; - published - property Image: TBitmap read GetImage write SetImage; - property Mask: TBitmap read GetMask write SetMask; - property MaskColor: TColor read GetMaskColor write SetMaskColor default clNone; - end; - - TcxImageInfoCollection = class(TCollection) - private - FCompressData: Boolean; - FImageList: TcxImageList; - procedure SetCompressData(Value: Boolean); - protected - function GetOwner: TPersistent; override; - public - constructor Create(AImageList: TcxImageList); - function Add(AImage, AMask: TBitmap; AMaskColor: TColor = clNone): TCollectionItem; - procedure Move(ACurrentIndex, ANewIndex: Integer); - procedure Delete(AIndex: Integer); - - property CompressData: Boolean read FCompressData write SetCompressData; - end; - -constructor TcxImageInfoItem.Create(ACollection: TCollection); -begin - inherited; - FImageInfo := TcxImageInfo.Create; - CompressData := TcxImageInfoCollection(ACollection).CompressData; -end; - -constructor TcxImageInfoItem.Create(ACollection: TCollection; AImage, AMask: TBitmap; AMaskColor: TColor); -begin - Create(ACollection); - Image := AImage; - Mask := AMask; - MaskColor := AMaskColor; -end; - -destructor TcxImageInfoItem.Destroy; -begin - FreeAndNil(FImageInfo); - inherited; -end; - -procedure TcxImageInfoItem.Assign(Source: TPersistent); -begin - if Source is TcxImageInfoItem then - FImageInfo.Assign(TcxImageInfoItem(Source).ImageInfo) - else - inherited; -end; - -function TcxImageInfoItem.GetCompressData: Boolean; -begin - Result := TcxBitmap(Image).CompressData and TcxBitmap(Mask).CompressData; -end; - -function TcxImageInfoItem.GetImage: TBitmap; -begin - Result := FImageInfo.Image; -end; - -function TcxImageInfoItem.GetMask: TBitmap; -begin - Result := FImageInfo.Mask; -end; - -function TcxImageInfoItem.GetMaskColor: TColor; -begin - Result := FImageInfo.MaskColor; -end; - -procedure TcxImageInfoItem.SetCompressData(Value: Boolean); -begin - if CompressData <> Value then - begin - TcxBitmap(Image).CompressData := Value; - TcxBitmap(Mask).CompressData := Value; - end; -end; - -procedure TcxImageInfoItem.SetImage(Value: TBitmap); -begin - FImageInfo.Image := Value; -end; - -procedure TcxImageInfoItem.SetMask(Value: TBitmap); -begin - FImageInfo.Mask := Value; -end; - -procedure TcxImageInfoItem.SetMaskColor(Value: TColor); -begin - FImageInfo.MaskColor := Value; -end; - -constructor TcxImageInfoCollection.Create(AImageList: TcxImageList); -begin - inherited Create(TcxImageInfoItem); - FImageList := AImageList; -end; - -function TcxImageInfoCollection.Add(AImage, AMask: TBitmap; AMaskColor: TColor = clNone): TCollectionItem; -begin - Result := TcxImageInfoItem.Create(Self, AImage, AMask, AMaskColor); -end; - -procedure TcxImageInfoCollection.Move(ACurrentIndex, ANewIndex: Integer); -begin - Items[ACurrentIndex].Index := ANewIndex; -end; - -procedure TcxImageInfoCollection.Delete(AIndex: Integer); -begin - if AIndex = -1 then - Clear - else - inherited Delete(AIndex); -end; - -function TcxImageInfoCollection.GetOwner: TPersistent; -begin - Result := FImageList; -end; - -procedure TcxImageInfoCollection.SetCompressData(Value: Boolean); -var - I: Integer; -begin - if CompressData <> Value then - begin - FCompressData := Value; - for I := 0 to Count - 1 do - TcxImageInfoItem(Items[I]).CompressData := Value; - end; -end; - -procedure cxCopyBitmap(ADestBitmap, ASrcBitmap: TBitmap); overload; -begin - cxDrawBitmap(ADestBitmap.Canvas.Handle, ASrcBitmap, - Rect(0, 0, ADestBitmap.Width, ADestBitmap.Height), cxNullPoint); - TBitmapAccess(ADestBitmap).Changed(ADestBitmap); -end; - -function cxCloneBitmap(ABitmap: TBitmap): TBitmap; -begin - Result := TBitmap.Create; - Result.Assign(ABitmap); -end; - -function cxCopyImage(ASrcHandle: THandle): HBITMAP; overload; - - function SystemCopyImage: HBITMAP; - begin - Result := CopyImage(ASrcHandle, IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); - end; - - function SoftwareCopyImage: HBITMAP; - var - ABitmapData: Windows.TBitmap; - ABitmapInfo: TBitmapInfo; - ADestinationBits: Pointer; - ABits: TBytes; - begin - cxGetBitmapData(ASrcHandle, ABitmapData); - if ABitmapData.bmBitsPixel = 32 then - begin - FillBitmapInfoHeader(ABitmapInfo.bmiHeader, ABitmapData.bmWidth, ABitmapData.bmHeight, False); - if ABitmapData.bmBits = nil then - begin - SetLength(ABits, ABitmapData.bmWidth * ABitmapData.bmHeight * 4); - GetDIBits(cxScreenCanvas.Handle, ASrcHandle, 0, ABitmapData.bmHeight, ABits, ABitmapInfo, 0); - cxScreenCanvas.Dormant; - ABitmapData.bmBits := ABits; - end; - Result := CreateDIBSection(0, ABitmapInfo, DIB_RGB_COLORS, ADestinationBits, 0, 0); - cxCopyData(ABitmapData.bmBits, ADestinationBits, ABitmapData.bmWidth * ABitmapData.bmHeight * 4); - end - else - Result := SystemCopyImage; - end; - -begin - if IsWin9X then - Result := SoftwareCopyImage - else - Result := SystemCopyImage; -end; - -function IsImageListsEqual(AImages1, AImages2: TCustomImageList): Boolean; -var - AStream1, AStream2: TMemoryStream; - AnAdapter1, AnAdapter2: TStreamAdapter; -begin - if AImages1.Count <> AImages2.Count then - Result := False - else - if AImages1.Count = 0 then - Result := True - else - begin - AStream1 := TMemoryStream.Create; - AStream2 := TMemoryStream.Create; - AnAdapter1 := TStreamAdapter.Create(AStream1); - AnAdapter2 := TStreamAdapter.Create(AStream2); - try - ImageList_Write(AImages1.Handle, AnAdapter1); - ImageList_Write(AImages2.Handle, AnAdapter2); - Result := (AStream1.Size = AStream2.Size) and CompareMem(AStream1.Memory, AStream2.Memory, AStream1.Size); - finally - AnAdapter2.Free; - AnAdapter1.Free; - AStream2.Free; - AStream1.Free; - end; - end; -end; - -function GetImageCount(ABitmap: TBitmap; AWidth, AHeight: Integer): Integer; -begin - if (ABitmap.Width mod AWidth) + (ABitmap.Height mod AHeight) = 0 then - Result := (ABitmap.Width div AWidth) * (ABitmap.Height div AHeight) - else - Result := 1; -end; - -destructor TcxImageList.Destroy; -begin - Finalize; - inherited; -end; - -procedure TcxImageList.Assign(Source: TPersistent); -var - AImages: TCustomImageList; -begin - if Source is TCustomImageList then - begin - BeginUpdate; - try - inherited; - Clear; - AImages := TCustomImageList(Source); - if AImages is TcxImageList then - InternalCopyImageInfos(TcxImageList(AImages), 0, AImages.Count - 1) - else - InternalCopyImages(AImages, 0, AImages.Count - 1); - finally - EndUpdate; - end; - end; -end; - -function TcxImageList.Add(AImage, AMask: TBitmap): Integer; -var - AImageHandle, AMaskHandle: HBITMAP; - AMaskBits: TBytes; -begin - AImageHandle := GetImageHandle(AImage); - if AMask = nil then - begin - SetLength(AMaskBits, AImage.Width * AImage.Height); - AMaskHandle := CreateBitmap(Width, Height, 1, 1, AMaskBits); - end - else - AMaskHandle := AMask.Handle; - Result := ImageList_Add(Handle, AImageHandle, AMaskHandle); - if NeedSynchronizeImageInfo and (Result <> -1) then - AddToInternalCollection(AImage, AMask); - if AMask = nil then - DeleteObject(AMaskHandle); - Change; -end; - -function TcxImageList.AddIcon(AIcon: TIcon): Integer; -var - AImage, AMask: TBitmap; -begin - BeginUpdate; - try - Result := inherited AddIcon(AIcon); - if NeedSynchronizeImageInfo and (Result <> -1) then - begin - AImage := cxCreateBitmap(Width, Height, pf32bit); - AMask := cxCreateBitmap(Width, Height, pf1bit); - try - GetImageInfo(Handle, Count - 1, AImage, AMask); - AddToInternalCollection(AImage, AMask); - finally - AMask.Free; - AImage.Free - end; - end; - finally - EndUpdate; - end; -end; - -function TcxImageList.AddMasked(AImage: TBitmap; AMaskColor: TColor): Integer; -var - ACloneImage: TBitmap; -begin - BeginUpdate; - try - if AMaskColor = clNone then - Result := Add(AImage, nil) - else - begin - ACloneImage := cxCloneBitmap(AImage); - try - Result := ImageList_AddMasked(Handle, ACloneImage.Handle, ColorToRGB(AMaskColor)); - finally - ACloneImage.Free; - end; - if NeedSynchronizeImageInfo and (Result <> -1) then - AddToInternalCollection(AImage, nil, AMaskColor); - end; - finally - EndUpdate; - end; -end; - -procedure TcxImageList.Move(ACurIndex, ANewIndex: Integer); -var - AStep, AIndex: Integer; -begin - BeginUpdate; - try - AStep := cxSign(ANewIndex - ACurIndex); - AIndex := ACurIndex; - while AIndex <> ANewIndex do - begin - ImageList_Copy(Handle, AIndex + AStep, Handle, AIndex, ILCF_SWAP); - Inc(AIndex, AStep); - end; - if NeedSynchronizeImageInfo then - TcxImageInfoCollection(FImages).Move(ACurIndex, ANewIndex); - finally - EndUpdate; - end; -end; - -procedure TcxImageList.Delete(AIndex: Integer); -begin - BeginUpdate; - try - inherited; - if NeedSynchronizeImageInfo then - TcxImageInfoCollection(FImages).Delete(AIndex); - finally - EndUpdate; - end; -end; - -function TcxImageList.AddImage(AValue: TCustomImageList; AIndex: Integer): Integer; -begin - if (AValue <> nil) and (AIndex < AValue.Count) then - begin - Result := Count; - CopyImages(AValue, AIndex, AIndex); - end - else - Result := -1; -end; - -procedure TcxImageList.AddImages(AImageList: TCustomImageList); -begin - if AImageList <> nil then - begin - BeginUpdate; - try - CopyImages(AImageList); - finally - EndUpdate; - end; - end; -end; - -procedure TcxImageList.CopyImages(AImageList: TCustomImageList; AStartIndex, AEndIndex: Integer); -var - AcxImageList: TcxImageList; -begin - BeginUpdate; - try - AcxImageList := TcxImageList.Create(nil); - try - AcxImageList.Assign(AImageList); - if AEndIndex < 0 then - AEndIndex := AImageList.Count - 1 - else - AEndIndex := Min(AImageList.Count - 1, AEndIndex); - InternalCopyImageInfos(AcxImageList, AStartIndex, AEndIndex); - finally - AcxImageList.Free; - end; - finally - EndUpdate; - end; -end; - -procedure TcxImageList.Clear; -begin - Delete(-1); -end; - -procedure TcxImageList.Insert(AIndex: Integer; AImage, AMask: TBitmap); -var - I, ACurIndex: Integer; -begin - if (AIndex >= 0) and (AIndex <= Count) then - begin - BeginUpdate; - try - ACurIndex := Add(AImage, AMask); - for I := 0 to GetImageCount(AImage, Width, Height) - 1 do - Move(ACurIndex + I, AIndex + I); - finally - EndUpdate; - end; - end; -end; - -procedure TcxImageList.InsertIcon(AIndex: Integer; AIcon: TIcon); -begin - if (AIndex >= 0) and (AIndex <= Count) then - begin - BeginUpdate; - try - Move(AddIcon(AIcon), AIndex); - finally - EndUpdate; - end; - end; -end; - -procedure TcxImageList.InsertMasked(AIndex: Integer; AImage: TBitmap; AMaskColor: TColor); -var - I, ACurIndex: Integer; -begin - if (AIndex >= 0) and (AIndex <= Count) then - begin - BeginUpdate; - try - ACurIndex := AddMasked(AImage, AMaskColor); - for I := 0 to GetImageCount(AImage, Width, Height) - 1 do - Move(ACurIndex + I, AIndex + I); - finally - EndUpdate; - end; - end; -end; - -procedure TcxImageList.Replace(AIndex: Integer; AImage, AMask: TBitmap); -begin - BeginUpdate; - try - Delete(AIndex); - Insert(AIndex, AImage, AMask); - finally - EndUpdate; - end; -end; - -procedure TcxImageList.ReplaceIcon(AIndex: Integer; AIcon: TIcon); -begin - BeginUpdate; - try - Delete(AIndex); - InsertIcon(AIndex, AIcon); - finally - EndUpdate; - end; -end; - -procedure TcxImageList.ReplaceMasked(AIndex: Integer; AImage: TBitmap; AMaskColor: TColor); -begin - BeginUpdate; - try - Delete(AIndex); - InsertMasked(AIndex, AImage, AMaskColor); - finally - EndUpdate; - end; -end; - -function TcxImageList.LoadImage(AInstance: THandle; const AResourceName: string; - AMaskColor: TColor = clDefault; AWidth: Integer = 0; AFlags: TLoadResources = []): Boolean; -const - AFlagMap: array [TLoadResource] of DWORD = (LR_DEFAULTCOLOR, LR_DEFAULTSIZE, LR_LOADFROMFILE, - LR_LOADMAP3DCOLORS, LR_LOADTRANSPARENT, LR_MONOCHROME); -var - I: TLoadResource; - ALoadFlags: DWORD; - AHandle: HImageList; - ARGBColor: DWORD; - AImageList: TImageList; -begin - if AMaskColor = clNone then - ARGBColor := CLR_NONE - else - if AMaskColor = clDefault then - ARGBColor := CLR_DEFAULT - else - ARGBColor := ColorToRGB(AMaskColor); - ALoadFlags := LR_CREATEDIBSECTION; - for I := Low(TLoadResource) to High(TLoadResource) do - if I in AFlags then - ALoadFlags := ALoadFlags or AFlagMap[I]; - AHandle := ImageList_LoadImage(AInstance, PChar(AResourceName), AWidth, AllocBy, ARGBColor, - IMAGE_BITMAP, ALoadFlags); - Result := AHandle <> 0; - if Result then - begin - AImageList := TImageList.Create(Self); - try - AImageList.Handle := AHandle; - CopyImages(AImageList); - finally - AImageList.Free; - end; - end; -end; - -function TcxImageList.GetResource(AResType: TResType; const AName: string; - AWidth: Integer; ALoadFlags: TLoadResources; AMaskColor: TColor): Boolean; -begin - Result := inherited GetResource(AResType, AName, AWidth, ALoadFlags, AMaskColor); - SynchronizeImageInfo; -end; - -function TcxImageList.GetInstRes(AInstance: THandle; AResType: TResType; const AName: string; - AWidth: Integer; ALoadFlags: TLoadResources; AMaskColor: TColor): Boolean; -begin - Result := inherited GetInstRes(AInstance, AResType, AName, AWidth, ALoadFlags, AMaskColor); - SynchronizeImageInfo; -end; - -function TcxImageList.GetInstRes(AInstance: THandle; AResType: TResType; AResID: DWORD; - AWidth: Integer; ALoadFlags: TLoadResources; AMaskColor: TColor): Boolean; -begin - Result := inherited GetInstRes(AInstance, AResType, AResID, AWidth, ALoadFlags, AMaskColor); - SynchronizeImageInfo; -end; - -function TcxImageList.ResourceLoad(AResType: TResType; const AName: string; AMaskColor: TColor): Boolean; -begin - Result := inherited ResourceLoad(AResType, AName, AMaskColor); - SynchronizeImageInfo; -end; - -function TcxImageList.ResInstLoad(AInstance: THandle; AResType: TResType; - const AName: string; AMaskColor: TColor): Boolean; -begin - Result := inherited ResInstLoad(AInstance, AResType, AName, AMaskColor); - SynchronizeImageInfo; -end; - -procedure TcxImageList.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TcxImageList.EndUpdate(AForceUpdate: Boolean = True); -begin - if FLockCount > 0 then - begin - Dec(FLockCount); - if AForceUpdate then - Change; - end; -end; - -{$IFNDEF DELPHI6} -procedure TcxImageList.Draw(ACanvas: TCanvas; X, Y, AIndex: Integer; - ADrawingStyle: TDrawingStyle; AImageType: TImageType; AEnabled: Boolean); -begin - if HandleAllocated then - DoDraw(AIndex, ACanvas, X, Y, GetImageListStyle(ADrawingStyle, AImageType), AEnabled); -end; -{$ENDIF} - -procedure TcxImageList.Draw(ACanvas: TCanvas; const ARect: TRect; AIndex: Integer; - AStretch: Boolean = True; ASmoothResize: Boolean = False; AEnabled: Boolean = True); -begin - DoDrawEx(AIndex, ACanvas, ARect, GetImageListStyle(DrawingStyle, ImageType), AStretch, ASmoothResize, AEnabled); -end; - -procedure TcxImageList.GetImageInfo(AIndex: Integer; AImage, AMask: TBitmap); - - procedure GetBitmap(ADestBitmap, ASrcBitmap: TBitmap); - begin - ADestBitmap.Width := ASrcBitmap.Width; - ADestBitmap.Height := ASrcBitmap.Height; - cxCopyBitmap(ADestBitmap, ASrcBitmap); - end; - -var - ASourceImage: TBitmap; -begin - if (0 <= AIndex) and (AIndex < Count) then - begin - ASourceImage := TcxImageInfoItem(FImages.Items[AIndex]).ImageInfo.Image; - if (ASourceImage.PixelFormat = pf32bit) or IsWin9X then - begin - if AImage <> nil then - GetBitmap(AImage, ASourceImage); - if AMask <> nil then - GetBitmap(AMask, TcxImageInfoItem(FImages.Items[AIndex]).ImageInfo.Mask); - end - else - GetImageInfo(Handle, AIndex, AImage, AMask); - ASourceImage.Dormant; - end; -end; - -procedure TcxImageList.GetImage(AIndex: Integer; AImage: TBitmap); -begin - GetImageInfo(AIndex, AImage, nil); -end; - -procedure TcxImageList.GetMask(AIndex: Integer; AMask: TBitmap); -begin - GetImageInfo(AIndex, nil, AMask); -end; - -class procedure TcxImageList.GetImageInfo(AHandle: HIMAGELIST; AIndex: Integer; AImage, AMask: TBitmap); - - procedure GetBitmap(ASrcHandle: HBITMAP; ADestBitmap: TBitmap; ACopyAll: Boolean; const ARect: TRect); - - procedure CopyRect; - var - ASrcBitmap: TBitmap; - AWidth, AHeight: Integer; - begin - ASrcBitmap := TBitmap.Create; - try - ASrcBitmap.Handle := cxCopyImage(ASrcHandle); - AWidth := cxRectWidth(ARect); - AHeight := cxRectHeight(ARect); - ADestBitmap.Width := AWidth; - ADestBitmap.Height := AHeight; - cxBitBlt(ADestBitmap.Canvas.Handle, ASrcBitmap.Canvas.Handle, - cxRect(0, 0, AWidth, AHeight), ARect.TopLeft, SRCCOPY); - TBitmapAccess(ADestBitmap).Changed(ADestBitmap); - finally - ASrcBitmap.Free; - end; - end; - - begin - if ACopyAll then - ADestBitmap.Handle := cxCopyImage(ASrcHandle) - else - CopyRect; - end; - -var - AImageInfo: TImageInfo; - ACopyAll: Boolean; -begin - ACopyAll := AIndex = -1; - if ACopyAll then - AIndex := 0; - if ImageList_GetImageInfo(AHandle, AIndex, AImageInfo) then - begin - if AMask <> nil then - GetBitmap(AImageInfo.hbmMask, AMask, ACopyAll, AImageInfo.rcImage); - if AImage <> nil then - GetBitmap(AImageInfo.hbmImage, AImage, ACopyAll, AImageInfo.rcImage); - DeleteObject(AImageInfo.hbmImage); - DeleteObject(AImageInfo.hbmMask); - end; -end; - -class function TcxImageList.GetPixelFormat(AHandle: HIMAGELIST): Integer; -var - AImageInfo: TImageInfo; - ABitmap: Windows.TBitmap; -begin - Result := 0; - if ImageList_GetImageInfo(AHandle, 0, AImageInfo) then - begin - cxGetBitmapData(AImageInfo.hbmImage, ABitmap); - Result := ABitmap.bmBitsPixel; - DeleteObject(AImageInfo.hbmImage); - DeleteObject(AImageInfo.hbmMask); - end; -end; - -function TcxImageList.ChangeLocked: Boolean; -begin - Result := FLockCount > 0; -end; - -procedure TcxImageList.Change; -begin - if not ChangeLocked then - inherited Change; -end; - -procedure TcxImageList.DoDraw(Index: Integer; Canvas: TCanvas; X, Y: Integer; - Style: Cardinal; Enabled: Boolean = True); -begin - DoDrawEx(Index, Canvas, cxRectBounds(X, Y, Width, Height), Style, False, False, Enabled); -end; - -procedure TcxImageList.DoDrawEx(AIndex: Integer; ACanvas: TCanvas; - const ARect: TRect; AStyle: Cardinal; AStretch, ASmoothResize, AEnabled: Boolean); -const - ADrawModes: array [Boolean] of TcxImageDrawMode = (idmDisabled, idmNormal); -var - AGlyphRect: TRect; - ADrawBitmap: TBitmap; -begin - if (cxRectWidth(ARect) = Width) and (cxRectHeight(ARect) = Height) then - AStretch := False; - if AStretch then - AGlyphRect := ARect - else - AGlyphRect := cxRectCenter(ARect, Width, Height); - if AlphaBlending then - cxDrawImage(ACanvas.Handle, AGlyphRect, ARect, nil, Self, AIndex, ADrawModes[AEnabled], ASmoothResize) - else - begin - if AStretch then - begin - ADrawBitmap := cxCreateBitmap(Width, Height, pfDevice); - try - inherited DoDraw(AIndex, ADrawBitmap.Canvas, 0, 0, AStyle, AEnabled); - cxDrawImage(ACanvas.Handle, AGlyphRect, ARect, ADrawBitmap, nil, 0, ADrawModes[AEnabled], ASmoothResize); - finally - ADrawBitmap.Free; - end; - end - else - inherited DoDraw(AIndex, ACanvas, AGlyphRect.Left, AGlyphRect.Top, AStyle, AEnabled); - end; -end; - -procedure TcxImageList.Initialize; -begin - inherited; - FImages := TcxImageInfoCollection.Create(Self); - FAlphaBlending := True; - inherited Handle := ImageList_Create(Width, Height, ILC_COLOR32 or ILC_MASK, AllocBy, AllocBy); -end; - -procedure TcxImageList.Finalize; -begin - FreeAndNil(FImages); -end; - -const - ADXILSignature: Integer = $494C4458; //DXIL - ADXILVersion: Word = 1; - -procedure TcxImageList.DefineProperties(Filer: TFiler); - - function DoWriteImageInfo: Boolean; - begin - if (Filer.Ancestor <> nil) and (Filer.Ancestor is TCustomImageList) then - Result := not IsImageListsEqual(TCustomImageList(Filer.Ancestor), Self) - else - Result := Count > 0; - end; - - function DoWriteDesignInfo: Boolean; - begin - Result := (Filer.Ancestor = nil) or not (Filer.Ancestor is TCustomImageList) or - (TCustomImageList(Filer.Ancestor).DesignInfo <> DesignInfo); - end; - -var - AOldSaveFormat: Boolean; -begin -{$IFDEF cxImageListOldSaveFormat} - AOldSaveFormat := True; -{$ELSE} - AOldSaveFormat := False; -{$ENDIF} - - Filer.DefineProperty('FormatVersion', ReadFormatVersion, WriteFormatVersion, not AOldSaveFormat); - - - if (csReading in ComponentState) or AOldSaveFormat and (csWriting in ComponentState) then - begin - inherited; - if csReading in ComponentState then - SynchronizeImageInfo; - end; - - Filer.DefineProperty('DesignInfo', ReadDesignInfo, WriteDesignInfo, not AOldSaveFormat and DoWriteDesignInfo); - Filer.DefineProperty('ImageInfo', ReadImageInfo, WriteImageInfo, not AOldSaveFormat and DoWriteImageInfo); -end; - -procedure TcxImageList.Dormant; -var - I: Integer; -begin - for I := 0 to FImages.Count - 1 do - DormantImage(I); -end; - -procedure TcxImageList.AddImageInfo(AImageInfo: TcxImageInfo); -begin - if IsGlyphAssigned(AImageInfo.Mask) then - Add(AImageInfo.Image, AImageInfo.Mask) - else - AddMasked(AImageInfo.Image, AImageInfo.MaskColor); -end; - -procedure TcxImageList.InternalCopyImageInfos(AImageList: TcxImageList; AStartIndex, AEndIndex: Integer); -var - I: Integer; - AImageInfo: TcxImageInfo; -begin - AImageInfo := TcxImageInfo.Create; - try - for I := Max(AStartIndex, 0) to AEndIndex do - begin - AImageList.GetImageInfo(I, AImageInfo); - AddImageInfo(AImageInfo); - end; - finally - AImageInfo.Free; - end; -end; - -procedure TcxImageList.InternalCopyImages(AImageList: TCustomImageList; AStartIndex, AEndIndex: Integer); -var - I: Integer; - AImage, AMask: TBitmap; -begin - AImage := cxCreateBitmap(Width, Height, pf32bit); - AMask := cxCreateBitmap(Width, Height, pf1bit); - try - for I := Max(AStartIndex, 0) to AEndIndex do - begin - GetImageInfo(AImageList.Handle, I, AImage, AMask); - Add(AImage, AMask); - end; - finally - AImage.Free; - AMask.Free; - end; -end; - -procedure TcxImageList.GetImageInfo(AIndex: Integer; AImageInfo: TcxImageInfo); -begin - if (0 <= AIndex) and (AIndex < Count) then - AImageInfo.Assign(TcxImageInfoItem(FImages.Items[AIndex]).ImageInfo) - else - begin - AImageInfo.Image := nil; - AImageInfo.Mask := nil; - AImageInfo.MaskColor := clNone; - end; -end; - -function TcxImageList.GetCompressData: Boolean; -begin - Result := TcxImageInfoCollection(FImages).CompressData; -end; - -procedure TcxImageList.SetCompressData(Value: Boolean); -begin - TcxImageInfoCollection(FImages).CompressData := Value; -end; - -function TcxImageList.GetHandle: HImageList; -begin - Result := inherited Handle; -end; - -procedure TcxImageList.SetHandle(Value: HImageList); -var - AImageList: TCustomImageList; -begin - AImageList := TCustomImageList.Create(Self); - try - AImageList.Handle := Value; - Assign(AImageList); - ImageList_Destroy(Value); - finally - AImageList.Free; - end; -end; - -procedure TcxImageList.ReadFormatVersion(AReader: TReader); -begin - FFormatVersion := AReader.ReadInteger; -end; - -procedure TcxImageList.WriteFormatVersion(AWriter: TWriter); -begin - FFormatVersion := ADXILVersion; - AWriter.WriteInteger(FFormatVersion); -end; - -procedure TcxImageList.ReadImageInfo(AReader: TReader); -begin - FImages.Clear; - AReader.ReadValue; - AReader.ReadCollection(FImages); - SynchronizeHanle; -end; - -procedure TcxImageList.WriteImageInfo(AWriter: TWriter); -begin - AWriter.WriteCollection(FImages); -end; - -procedure TcxImageList.ReadDesignInfo(AReader: TReader); -begin - DesignInfo := AReader.ReadInteger; -end; - -procedure TcxImageList.WriteDesignInfo(AWriter: TWriter); -begin - AWriter.WriteInteger(DesignInfo); -end; - -function TcxImageList.NeedSynchronizeImageInfo: Boolean; -begin - Result := not FSynchronization; -end; - -procedure TcxImageList.SynchronizeImageInfo; -var - I: Integer; - AImage, AMask: TBitmap; -begin - FImages.BeginUpdate; - try - FImages.Clear; - AImage := cxCreateBitmap(Width, Height, pf32bit); - AMask := cxCreateBitmap(Width, Height, pf1bit); - try - for I := 0 to Count - 1 do - begin - GetImageInfo(Handle, I, AImage, AMask); - TcxImageInfoCollection(FImages).Add(AImage, AMask); - end; - finally - AMask.Free; - AImage.Free; - end; - finally - FImages.EndUpdate; - end; -end; - -procedure TcxImageList.SynchronizeHanle; -var - I: Integer; - AImageInfoItem: TcxImageInfoItem; -begin - BeginUpdate; - try - FSynchronization := True; - try - Clear; - for I := 0 to FImages.Count - 1 do - begin - AImageInfoItem := TcxImageInfoItem(FImages.Items[I]); - AddImageInfo(AImageInfoItem.ImageInfo); - DormantImage(I); - end; - finally - FSynchronization := False; - end; - finally - EndUpdate; - end; -end; - -procedure TcxImageList.AddToInternalCollection(AImage, AMask: TBitmap; AMaskColor: TColor); - - procedure InternalAddToInternalCollection(AImage, AMask: TBitmap; AMaskColor: TColor); - var - AItem: TCollectionItem; - begin - AItem := TcxImageInfoCollection(FImages).Add(AImage, AMask, AMaskColor); - DormantImage(AItem.Index); - end; - -var - AColCount, ARowCount, AColIndex, ARowIndex: Integer; - ASourceRect: TRect; - ADestBitmap, ADestMask: TcxBitmap; -begin - if (((AImage.Width mod Width) + (AImage.Height mod Height)) = 0) and - ((AImage.Width <> Width) or (AImage.Height <> Height)) then - begin - AColCount := AImage.Width div Width; - ARowCount := AImage.Height div Height; - - ADestBitmap := TcxBitmap.CreateSize(Width, Height, AImage.PixelFormat); - if IsGlyphAssigned(AMask) then - ADestMask := TcxBitmap.CreateSize(Width, Height, AMask.PixelFormat) - else - ADestMask := nil; - try - for ARowIndex := 0 to ARowCount - 1 do - for AColIndex := 0 to AColCount - 1 do - begin - ASourceRect := Rect(AColIndex * Width, ARowIndex * Height, (AColIndex + 1) * Width, (ARowIndex + 1) * Height); - ADestBitmap.Canvas.CopyRect(ADestBitmap.ClientRect, AImage.Canvas, ASourceRect); - if IsGlyphAssigned(AMask) then - ADestMask.Canvas.CopyRect(ADestMask.ClientRect, AMask.Canvas, ASourceRect); - InternalAddToInternalCollection(ADestBitmap, ADestMask, AMaskColor); - end; - finally - ADestMask.Free; - ADestBitmap.Free; - end; - end - else - InternalAddToInternalCollection(AImage, AMask, AMaskColor); -end; - -procedure TcxImageList.DormantImage(AIndex: Integer); -begin - TcxImageInfoItem(FImages.Items[AIndex]).ImageInfo.Image.Dormant; -end; - -function TcxImageList.GetImageHandle(AImage: TBitmap): Integer; -begin - if AImage <> nil then - Result := AImage.Handle - else - Result := 0; -end; - -const - SystemBrushes: TList = nil; - SysColorPrefix = {$IFDEF DELPHI7} clSystemColor {$ELSE} $80000000 {$ENDIF}; - BrushDataSize = SizeOf(TcxBrushData); - scxBrushCacheReleaseUnusedBrush = 'Release unused brush'; - -destructor TcxBrushCache.Destroy; -var - I: Integer; -begin - try - for I := 0 to FCount - 1 do - FData[I].Brush.Free; - finally - inherited Destroy; - end; -end; - -procedure TcxBrushCache.BeginUpdate; -begin - Inc(FLockRef); -end; - -procedure TcxBrushCache.EndUpdate; -begin - Inc(FLockRef); - if (FLockRef = 0) and (FDeletedCount <> 0) then Pack; -end; - -procedure TcxBrushCache.ReleaseBrush(var ABrush: TBrush); -var - AIndex: Integer; -begin - if ABrush <> nil then - begin - if not IsSystemBrush(ABrush) and IndexOf(ABrush.Color, AIndex) then - begin - with FData[AIndex] do - begin - Dec(RefCount); - CacheCheck(RefCount < 0, scxBrushCacheReleaseUnusedBrush); - if RefCount <= 0 then Delete(AIndex); - end; - end; - end; -end; - -procedure TcxBrushCache.SetBrushColor(var ABrush: TBrush; AColor: TColor); -begin - ReleaseBrush(ABrush); - ABrush := Add(AColor); -end; - -function TcxBrushCache.Add(AColor: TColor): TBrush; -begin - if AColor and SysColorPrefix <> 0 then - Result := TBrush(SystemBrushes[AColor and not SysColorPrefix]) - else - Result := AddItemAt(FindNearestItem(AColor), AColor); - Result.Color := AColor; -end; - -function TcxBrushCache.AddItemAt(AIndex: Integer; AColor: TColor): TBrush; -var - Delta: Integer; -begin - if (AIndex >= FCount) or (FData[AIndex].Color <> AColor) then - begin - if FCapacity <= FCount then - begin - Delta := FCapacity shr 2; - if Delta < 8 then Delta := 8; - Inc(FCapacity, Delta); - SetLength(FData, FCapacity); - end; - if AIndex < FCount then Move(AIndex, AIndex + 1, FCount - AIndex); - InitItem(FData[AIndex], AColor); - Inc(FCount); - end - else - if FData[AIndex].RefCount = 0 then Dec(FDeletedCount); - Inc(FData[AIndex].RefCount); - Result := FData[AIndex].Brush; -end; - -procedure TcxBrushCache.CacheCheck(Value: Boolean; const AMessage: string); -begin - if Value then - raise EBrushCache.Create(AMessage); -end; - -procedure TcxBrushCache.Delete(AIndex: Integer); -begin - if FLockRef = 0 then - begin - FData[AIndex].Brush.Free; - Dec(FCount); - if AIndex < FCount then - Move(AIndex + 1, AIndex, FCount - AIndex); - end - else - Inc(FDeletedCount); -end; - -function TcxBrushCache.IndexOf(AColor: TColor; out AIndex: Integer): Boolean; -begin - AIndex := -1; - if (AColor and SysColorPrefix = 0) then - AIndex := FindNearestItem(AColor); - Result := (AIndex >= 0) and (AIndex < FCount) and (FData[AIndex].Color = AColor); -end; - -procedure TcxBrushCache.InitItem(var AItem: TcxBrushData; AColor: TColor); -begin - FillChar(AItem, BrushDataSize, 0); - AItem.Brush := TBrush.Create; - AItem.Brush.Color := AColor; -end; - -function TcxBrushCache.IsSystemBrush(ABrush: TBrush): Boolean; -begin - Result := ABrush = nil; - Result := Result or ((ABrush.Color and SysColorPrefix) <> 0); -end; - -function TcxBrushCache.FindNearestItem(AColor: TColor): Integer; - - function Check(Min, Max: Integer): Integer; - begin - Result := Max; - if AColor <= FData[Min].Color then - Result := Min - else - if AColor > FData[Max].Color then - AColor := Max + 1; - end; - -var - A, B, C: Integer; -begin - if FCount > 0 then - begin - A := 0; - B := FCount - 1; - if (FData[0].Color >= AColor) or (FData[B].Color <= AColor) then - Result := Check(A, B) - else - begin - while A < B do - begin - C := (A + B) shr 1; - with FData[C] do - begin - if Color < AColor then - A := C - else - if Color > AColor then - B := C - else - B := A; - end; - end; - Result := Check(A, B); - end; - end - else - Result := 0; -end; - -procedure TcxBrushCache.Move(ASrc, ADst, ACount: Integer); -begin - System.Move(FData[ASrc], FData[ADst], ACount * BrushDataSize); -end; - -procedure TcxBrushCache.Pack; -var - I, ACount: Integer; -begin - try - ACount := 0; - I := FCount - 1; - while (ACount < FDeletedCount) and (I >= 0) do - begin - if FData[I].RefCount < 0 then - begin - Delete(I); - Inc(ACount); - end; - Dec(I); - end; - finally - FDeletedCount := 0; - end; -end; - -procedure TcxBrushCache.Recreate; -var - I: Integer; -begin - for I := 0 to FCount - 1 do - with FData[I] do Brush.Color := Color; -end; - -procedure TcxBrushCache.Release(AIndex: Integer); -begin - Dec(FData[AIndex].RefCount); - if FData[AIndex].RefCount = 0 then Delete(AIndex); -end; - -procedure InitSystemBrushes; -var - I: Word; - ABrush: TBrush; -begin - SystemBrushes := TList.Create; - for I := COLOR_SCROLLBAR to COLOR_ENDCOLORS do - begin - ABrush := TBrush.Create; - ABrush.Handle := GetSysColorBrush(I); - SystemBrushes.Add(ABrush); - end; -end; - -procedure DestroySystemBrushes; -var - I: Integer; -begin - try - for I := 0 to SystemBrushes.Count - 1 do - TBrush(SystemBrushes[I]).Free; - finally - SystemBrushes.Free; - end; -end; - -procedure InitPredefinedBrushes; -var - ABitmap: HBitmap ; -const - APattern: array[0..7] of Word = - ($00AA, $0055, $00AA, $0055, $00AA, $0055, $00AA, $0055); -begin - cxHalfToneBrush := TBrush.Create; - InitSystemBrushes; - ABitmap := CreateBitmap(8, 8, 1, 1, @APattern); - cxHalfToneBrush.Handle := CreatePatternBrush(ABitmap); - DeleteObject(ABitmap); -end; - -procedure DestroyPredefinedBrushes; -begin - DestroySystemBrushes; -{$IFDEF DELPHI9} -{$IFNDEF DELPHI10} - cxHalfToneBrush.Bitmap.Free; -{$ENDIF} -{$ENDIF} - cxHalfToneBrush.Free; -end; - -var - ALib: Integer; - -initialization - FUnitIsFinalized := False; - InitPredefinedBrushes; - ALib := LoadLibrary('msimg32.dll'); - if ALib <> 0 then - VCLAlphaBlend := GetProcAddress(ALib, 'AlphaBlend') - else - VCLAlphaBlend := nil; - -finalization - FUnitIsFinalized := True; - if ALib <> 0 then FreeLibrary(ALib); - DestroyPredefinedBrushes; - FreeAndNil(ScreenCanvas); - FreeAndNil(PaintCanvas); - FreeAndNil(MaskBitmap); - FreeAndNil(ImageBitmap); - FreeAndNil(DrawBitmap); - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxImageListEditor.pas b/internal/x.46/ExpressLibrary/Sources/cxImageListEditor.pas deleted file mode 100644 index feec968b..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxImageListEditor.pas +++ /dev/null @@ -1,1175 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxImageListEditor; - -{$I cxVer.inc} - -interface - -uses - dxGDIPlusAPI, dxGDIPlusClasses, - Windows, SysUtils, Classes, ImgList, ComCtrls, Controls, Graphics, Forms, Dialogs, - cxClasses, cxGeometry, cxGraphics; - -type - TcxEditorImageInfo = class(TcxImageInfo) - private - FAlphaUsed: Boolean; - protected - procedure SetImage(Value: TBitmap); override; - public - property AlphaUsed: Boolean read FAlphaUsed; - end; - - TcxImageFileFormat = record - Name: string; - Ext: string; - GraphicClass: TGraphicClass; - end; - - TcxImageFileFormatList = array of TcxImageFileFormat; - - TcxImageFileFormats = class - private - FList: TcxImageFileFormatList; - - function Count: Integer; - function GetItem(Index: Integer): TcxImageFileFormat; - - property Items[Index: Integer]: TcxImageFileFormat read GetItem; - public - procedure Register(const AName, AExt: string; AGraphicClass: TGraphicClass); -//TODO: procedure UnRegister(AGraphicClass: TGraphicClass); - function GetGraphicClass(const AFileName: string): TGraphicClass; - function GetFilter: string; - end; - - TcxImageListEditorAddMode = (amAdd, amInsert, amReplace); - TcxImageType = (itBitmap, itIco, itPNG); - - TcxImageListEditor = class - private - FChanged: Boolean; - FImageListModified: Boolean; - - FDataControl: TListView; - FImageList: TcxImageList; - FOriginalImageList: TcxImageList; - - FImportList: TStrings; - FVisibleImportList: TStrings; - - FEditorForm: TForm; - FSplitBitmaps: TModalResult; - FUpdateCount: Integer; - - FOnChange: TNotifyEvent; - - procedure AddDataItems(AImageList: TcxImagelist); - procedure AddImage(AImage, AMask: TBitmap; AMaskColor: TColor; var AInsertedImageIndex: Integer); - procedure Change; - procedure ClearSelection; - procedure DeleteDataItem(Sender: TObject; Item: TListItem); - procedure DeleteImage(AIndex: Integer); - function GetImagesCount: Integer; - function GetDataItems: TListItems; - function GetDefaultTransparentColor(AImage, AMask: TBitmap): TColor; - function GetFocusedImageIndex: Integer; - function GetImageHeight: Integer; - function GetImagesInfo(Index: Integer): TcxEditorImageInfo; - function GetImageWidth: Integer; - procedure ImageListChanged; - procedure SelectDataItem(Sender: TObject; Item: TListItem; Selected: Boolean); - procedure SetFocusedImageIndex(AValue: Integer); - procedure SetImageList(AValue: TcxImageList); - procedure SetImagesInfo(Index: Integer; AValue: TcxEditorImageInfo); - procedure SetImportList(AValue: TStrings); - - procedure UpdateImageList; - procedure UpdateVisibleImportList; - public - constructor Create; - destructor Destroy; override; - - function Edit(AImageList: TcxImagelist): Boolean; - - procedure AddImages(AFiles: TStrings; AAddMode: TcxImageListEditorAddMode); - procedure ClearImages; - procedure DeleteSelectedImages; - procedure ExportImages(const AFileName: string; AFormat: TcxImageType = itBitmap); - function InternalAddImage(AImage, AMask: TBitmap; AFileName: string; - var AInsertedItemIndex: Integer; AMultiSelect: Boolean): Integer; - procedure ImportImages(AImageList: TCustomImageList); - procedure MoveImage(ASourceImageIndex, ADestImageIndex: Integer); - - function IsAnyImageSelected: Boolean; - - procedure BeginUpdate; - procedure EndUpdate; - function IsUpdateLocked: Boolean; - - procedure ApplyChanges; - function IsChanged: Boolean; - procedure UpdateTransparentColor(AColor: TColor); - function ChangeImagesSize(AValue: TSize): Boolean; - procedure SynchronizeData(AStartIndex, ACount: Integer); - - property DataControl: TListView read FDataControl; - property DataItems: TListItems read GetDataItems; - property FocusedImageIndex: Integer read GetFocusedImageIndex write SetFocusedImageIndex; - property ImageHeight: Integer read GetImageHeight; - property ImageList: TcxImageList read FImageList write SetImageList; - property ImageListModified: Boolean read FImageListModified; - property ImagesCount: Integer read GetImagesCount; - property ImagesInfo[Index: Integer]: TcxEditorImageInfo read GetImagesInfo write SetImagesInfo; - property ImageWidth: Integer read GetImageWidth; - property ImportList: TStrings read FImportList write SetImportList; - property OriginalImageList: TcxImageList read FOriginalImageList; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - end; - -function cxImageFileFormats: TcxImageFileFormats; -function cxEditImageList(AImageList: TcxImageList; AImportList: TStrings): Boolean; -procedure PngImageListTocxImageList(APngImages: TComponent; AImages: TcxImageList); - -implementation - -uses - Types, Math, cxImageListEditorView, dxCore; - -var - FImageFileFormats: TcxImageFileFormats; - -type - TcxImageListAccess = class(TcxImageList); - - TcxIcon = class(TIcon) - protected - procedure SetBitmap(ABitmap: TBitmap); - public - procedure GetImageInfo(AImageInfo: TcxImageInfo); - procedure HandleNeeded; - end; - -procedure TcxIcon.GetImageInfo(AImageInfo: TcxImageInfo); -var - AImages: TcxImageListAccess; -begin - HandleNeeded; - AImages := TcxImageListAccess.CreateSize(Width, Height); - try - AImages.AddIcon(Self); - AImages.GetImageInfo(0, AImageInfo); - finally - AImages.Free; - end; -end; - -procedure TcxIcon.HandleNeeded; -begin - Handle; -end; - -procedure TcxIcon.SetBitmap(ABitmap: TBitmap); -var - AImageList: TcxImageList; -begin - AImageList := TcxImageList.CreateSize(ABitmap.Width, ABitmap.Height); - try - AImageList.Add(ABitmap, nil); - AImageList.GetIcon(0, Self, dsTransparent, itImage); - finally - AImageList.Free; - end; -end; - -function cxImageFileFormats: TcxImageFileFormats; -begin - Result := FImageFileFormats; -end; - -function cxEditImageList(AImageList: TcxImageList; AImportList: TStrings): Boolean; -var - AImageListEditor: TcxImageListEditor; -begin - Result := False; - if AImageList = nil then - Exit; - AImageListEditor := TcxImageListEditor.Create; - try - AImageListEditor.ImportList := AImportList; - Result := AImageListEditor.Edit(AImageList); - finally - AImageListEditor.Free; - end; -end; - -function IsIndexValid(AIndex, ACount: Integer): Boolean; -begin - Result := (AIndex >= 0) and (AIndex < ACount); -end; - -function IsBitmapAlphaUsed(AImage: TBitmap): Boolean; - - function InternalIsBitmapAlphaUsed: Boolean; - var - ATempBitmap: TcxAlphaBitmap; - begin - ATempBitmap := TcxAlphaBitmap.Create; - try - ATempBitmap.Assign(AImage); - Result := ATempBitmap.IsAlphaUsed; - finally - ATempBitmap.Free; - end; - end; - -begin - Result := (cxGetBitmapPixelFormat(AImage) = 32) and InternalIsBitmapAlphaUsed; -end; - -procedure AddImageFromBinaryData(WriteData: TStreamProc; AImages: TcxImageList); -var - AStream: TMemoryStream; - ACount: Longint; - B: TBitmap; -begin - AStream := TMemoryStream.Create; - try - WriteData(AStream); - ACount := AStream.Size; - if ACount > 0 then - begin - AStream.Write(AStream.Memory^, ACount); - AStream.Position := 0; - with TdxPNGImage.Create do - try - LoadFromStream(AStream); - B := GetAsBitmap; - try - AImages.Add(B, nil); - finally - B.Free; - end; - finally - Free; - end; - end; - finally - AStream.Free; - end; -end; - -procedure ProcessPngImageList(AInputSteram: TMemoryStream; AImages: TcxImageList); -var - ASaveSeparator: Char; - AParser: TParser; - - function ConvertOrderModifier: Integer; - begin - Result := -1; - if AParser.Token = '[' then - begin - AParser.NextToken; - AParser.CheckToken(toInteger); - Result := AParser.TokenInt; - AParser.NextToken; - AParser.CheckToken(']'); - AParser.NextToken; - end; - end; - - procedure ConvertHeader(AIsInherited, AIsInline: Boolean); - var - AClassName, AObjectName: string; - begin - AParser.CheckToken(toSymbol); - AClassName := AParser.TokenString; - AObjectName := ''; - if AParser.NextToken = ':' then - begin - AParser.NextToken; - AParser.CheckToken(toSymbol); - AObjectName := AClassName; - AClassName := AParser.TokenString; - AParser.NextToken; - end; - ConvertOrderModifier; - end; - - procedure ConvertProperty; forward; - - procedure ConvertValue(const APropName: string); - - procedure SkipString; - begin - while AParser.NextToken = '+' do - begin - AParser.NextToken; - if not dxCharInSet(AParser.Token, [toString, toWString]) then - AParser.CheckToken(toString); - end; - end; - - procedure SkipBinaryData; - var - S: TMemoryStream; - begin - S := TMemoryStream.Create; - try - AParser.HexToBinary(S); - finally - S.Free; - end; - end; - - begin - if dxCharInSet(AParser.Token, [toString, toWString]) then - SkipString - else - begin - case AParser.Token of - toSymbol, toInteger, toFloat:; - '[': - begin - AParser.NextToken; - if AParser.Token <> ']' then - while True do - begin - if AParser.NextToken = ']' then Break; - AParser.CheckToken(','); - AParser.NextToken; - end; - end; - '(': - begin - AParser.NextToken; - while AParser.Token <> ')' do - ConvertValue(''); - end; - '{': - begin - if APropName = 'PngImage.Data' then - AddImageFromBinaryData(AParser.HexToBinary, AImages) - else - SkipBinaryData; - end; - '<': - begin - AParser.NextToken; - while AParser.Token <> '>' do - begin - AParser.CheckTokenSymbol('item'); - AParser.NextToken; - ConvertOrderModifier; - AParser.TokenString; - while not AParser.TokenSymbolIs('end') do ConvertProperty; - AParser.NextToken; - end; - end; - else - raise EdxException.Create('Convert error'); - end; - AParser.NextToken; - end; - end; - - procedure ConvertProperty; - var - APropName: string; - begin - AParser.CheckToken(toSymbol); - APropName := AParser.TokenString; - AParser.NextToken; - while AParser.Token = '.' do - begin - AParser.NextToken; - AParser.CheckToken(toSymbol); - APropName := APropName + '.' + AParser.TokenString; - AParser.NextToken; - end; - AParser.CheckToken('='); - AParser.NextToken; - ConvertValue(APropName); - end; - - procedure ConvertObject; - var - AInheritedObject: Boolean; - AInlineObject: Boolean; - begin - AInheritedObject := False; - AInlineObject := False; - if AParser.TokenSymbolIs('INHERITED') then - AInheritedObject := True - else if AParser.TokenSymbolIs('INLINE') then - AInlineObject := True - else - AParser.CheckTokenSymbol('OBJECT'); - AParser.NextToken; - ConvertHeader(AInheritedObject, AInlineObject); - while not AParser.TokenSymbolIs('END') and - not AParser.TokenSymbolIs('OBJECT') and - not AParser.TokenSymbolIs('INHERITED') and - not AParser.TokenSymbolIs('INLINE') do - ConvertProperty; - while not AParser.TokenSymbolIs('END') do - ConvertObject; - end; - -begin - AParser := TParser.Create(AInputSteram); - ASaveSeparator := DecimalSeparator; - DecimalSeparator := '.'; - try - ConvertObject; - finally - DecimalSeparator := ASaveSeparator; - AParser.Free; - end; -end; - -procedure PngImageListTocxImageList(APngImages: TComponent; AImages: TcxImageList); -var - S, D: TMemoryStream; -begin - S := TMemoryStream.Create; - try - S.WriteComponent(APngImages); - S.Position := 0; - D := TMemoryStream.Create; - try - ObjectBinaryToText(S, D); - S.Position := 0; - D.Position := 0; - ProcessPngImageList(D, AImages); - finally - D.Free; - end; - finally - S.Free; - end; -end; - -{ TcxEditorImageInfo } - -procedure TcxEditorImageInfo.SetImage(Value: TBitmap); -begin - inherited; - FAlphaUsed := IsBitmapAlphaUsed(Image); -end; - -{ TcxImageFileFormats } - -procedure TcxImageFileFormats.Register(const AName, AExt: string; AGraphicClass: TGraphicClass); -begin - SetLength(FList, Count + 1); - FList[Count - 1].Name := AName; - FList[Count - 1].Ext := AExt; - FList[Count - 1].GraphicClass := AGraphicClass; -end; - -function TcxImageFileFormats.GetGraphicClass(const AFileName: string): TGraphicClass; -var - I: Integer; - AExt: string; -begin - Result := nil; - AExt := ExtractFileExt(AFileName); - for I := 0 to Count - 1 do - if SameText(AExt, Items[I].Ext) then - Result := Items[I].GraphicClass; -end; - -function TcxImageFileFormats.GetFilter: string; -var - I: Integer; - AAllExtentions, AAllImages: string; -begin - AAllExtentions := ''; - AAllImages := ''; - for I := 0 to Count - 1 do - begin - if AAllExtentions = '' then - AAllExtentions := '*' + Items[I].Ext - else - AAllExtentions := AAllExtentions + ';*' + Items[I].Ext; - if AAllImages = '' then - AAllImages := Items[I].Name + '|*' + Items[I].Ext - else - AAllImages := AAllImages + '|' + Items[I].Name + '|*' + Items[I].Ext; - end; - Result := 'All supported image types|' + AAllExtentions + '|' + AAllImages; -end; - -function TcxImageFileFormats.Count: Integer; -begin - Result := Length(FList); -end; - -function TcxImageFileFormats.GetItem(Index: Integer): TcxImageFileFormat; -begin - Result := FList[Index]; -end; - -{ TcxImageListEditor } - -constructor TcxImageListEditor.Create; -begin - inherited Create; - FImageList := TcxImageList.Create(nil); - FEditorForm := TcxImageListEditorForm.Create(Self); - FImportList := TStringList.Create; - FVisibleImportList := TStringList.Create; - - FDataControl := TcxImageListEditorForm(FEditorForm).GetVisualDataControl; - FDataControl.SmallImages := ImageList; - FDataControl.LargeImages := ImageList; - FDataControl.OnDeletion := DeleteDataItem; - FDataControl.OnSelectItem := SelectDataItem; -end; - -destructor TcxImageListEditor.Destroy; -begin - ClearImages; - FDataControl.OnSelectItem := nil; - FDataControl.OnDeletion := nil; - FDataControl := nil; - FreeAndNil(FVisibleImportList); - FreeAndNil(FImportList); - FreeAndNil(FEditorForm); - FreeAndNil(FImageList); - inherited; -end; - -function TcxImageListEditor.Edit(AImageList: TcxImagelist): Boolean; -var - ACaption: string; -begin - ImageList := AImageList; - ACaption := AImageList.Name; - if AImageList.Owner <> nil then - ACaption := AImageList.Owner.Name + '.' + ACaption; - FEditorForm.Caption := ACaption; - FEditorForm.ShowModal; - Result := FImageListModified; -end; - -procedure TcxImageListEditor.AddImages(AFiles: TStrings; AAddMode: TcxImageListEditorAddMode); - - function GetImageInfoFromFile(const AFileName: string; AImageInfo: TcxImageInfo): Boolean; - var - AGraphic: TGraphic; - AGraphicClass: TGraphicClass; - begin - AImageInfo.Image := nil; - AImageInfo.Mask := nil; - AImageInfo.MaskColor := clNone; - AGraphicClass := cxImageFileFormats.GetGraphicClass(AFileName); - Result := AGraphicClass <> nil; - if Result then - begin - AGraphic := AGraphicClass.Create; - try - AGraphic.LoadFromFile(AFileName); - if AGraphic is TdxPNGImage then // TODO: - AImageInfo.Image := TdxPNGImage(AGraphic).GetAsBitmap - else - if AGraphic is TcxIcon then - begin - AGraphic.Width := ImageWidth; - AGraphic.Height := ImageHeight; - TcxIcon(AGraphic).GetImageInfo(AImageInfo) - end - else //TBitmap - AImageInfo.Image := TBitmap(AGraphic); - finally - AGraphic.Free; - end; - end; - end; - -var - AImageInfo: TcxImageInfo; - I, AInsertedItemIndex: Integer; -begin - case AAddMode of - amAdd: - AInsertedItemIndex := ImagesCount; - amInsert: - AInsertedItemIndex := Max(0, FocusedImageIndex); - else {amReplace} - AInsertedItemIndex := FocusedImageIndex; - DeleteImage(AInsertedItemIndex); - end; - - FSplitBitmaps := mrNone; - ClearSelection; - Application.ProcessMessages; - AImageInfo := TcxImageInfo.Create; - try - for I := 0 to AFiles.Count - 1 do - if GetImageInfoFromFile(AFiles[I], AImageInfo) then - InternalAddImage(AImageInfo.Image, AImageInfo.Mask, AFiles[I], AInsertedItemIndex, AFiles.Count > 1); - finally - AImageInfo.Free; - end; - FocusedImageIndex := AInsertedItemIndex - 1; -end; - -procedure TcxImageListEditor.ClearImages; -begin - DataItems.Clear; - UpdateImageList; -end; - -procedure TcxImageListEditor.DeleteSelectedImages; -var - ASelectedIndex: Integer; - I: Integer; -begin - if not IsAnyImageSelected then - Exit; - ASelectedIndex := FocusedImageIndex; - for I := ImagesCount - 1 downto 0 do - if DataItems[I].Selected then - DeleteImage(I); - FocusedImageIndex := Min(ASelectedIndex, ImagesCount - 1); -end; - -procedure TcxImageListEditor.ExportImages(const AFileName: string; AFormat: TcxImageType = itBitmap); - - function CanReplace: Boolean; - begin - Result := MessageDlg(Format('File %s is already exists.' + dxEndOfLine + - 'Do you want to replace it?', - [AFileName]), mtWarning, [mbYes, mbNo], 0) = mrYes; - end; - - procedure SelectAllImages; - var - I: Integer; - begin - for I := 0 to ImagesCount - 1 do - DataItems[I].Selected := True; - end; - - function GetSelectionCount: Integer; - var - I: Integer; - begin - Result := 0; - for I := 0 to ImagesCount - 1 do - if DataItems[I].Selected then - Inc(Result); - end; - - procedure ExportBitmap(ABitmap: TBitmap); - var - AIcon: TcxIcon; - APNGImage: TdxPNGImage; - begin - case AFormat of - itBitmap: ABitmap.SaveToFile(AFileName); - itIco: - begin - AIcon := TcxIcon.Create; - try - AIcon.SetBitmap(ABitmap); - AIcon.SaveToFile(AFileName); - finally - AIcon.Free; - end; - end; - itPNG: - begin - APNGImage := TdxPNGImage.Create; - try - APNGImage.SetBitmap(ABitmap); - APNGImage.SaveToFile(AFileName); - finally - APNGImage.Free; - end; - end; - end; - end; - -var - AImageIndex: Integer; - ASelectedItem: TListItem; - AExportImage: TcxBitmap; - ARect: TRect; -begin - if not FileExists(AFileName) or CanReplace then - begin - Application.ProcessMessages; - ASelectedItem := FDataControl.Selected; - if not IsAnyImageSelected then - SelectAllImages; - AExportImage := TcxBitmap.CreateSize(ImageList.Width * GetSelectionCount, ImageList.Height, pf32bit); - try - ARect := cxRect(0, 0, ImageList.Width, ImageList.Height); - for AImageIndex := 0 to ImagesCount - 1 do - if DataItems[AImageIndex].Selected then - begin - AExportImage.CopyBitmap(ImagesInfo[AImageIndex].Image, ARect, cxNullPoint); - ARect := cxRectOffset(ARect, ImageList.Width, 0); - end; - ExportBitmap(AExportImage); - FDataControl.Selected := ASelectedItem; - finally - AExportImage.Free; - end; - end; -end; - -procedure TcxImageListEditor.ImportImages(AImageList: TCustomImageList); -begin - if AImageList.Count <> 0 then - begin - if (AImageList.ClassName = 'TPngImageList') and CheckGdiPlus then - PngImageListTocxImageList(AImageList, ImageList) - else - ImageList.CopyImages(AImageList); - SynchronizeData(ImagesCount, AImageList.Count); - FChanged := True; - FocusedImageIndex := ImagesCount - 1; - end; - Change; -end; - -function TcxImageListEditor.InternalAddImage(AImage, AMask: TBitmap; AFileName: string; - var AInsertedItemIndex: Integer; AMultiSelect: Boolean): Integer; - - function GetUserPermissionForSplit(AFileName: string; AMultiSelect: Boolean): Boolean; - const - scxBitmapSplitQuery = 'The bitmap in the file %s is too large.' + dxEndOfLine + - 'Do you want to split it into smaller bitmaps?'; - var - APossibleAnswers: TMsgDlgButtons; - begin - APossibleAnswers := [mbYes, mbNo]; - if AMultiSelect then - APossibleAnswers := APossibleAnswers + [mbNoToAll, mbYesToAll]; - FSplitBitmaps := MessageDlg(Format(scxBitmapSplitQuery, [AFileName]), mtConfirmation, APossibleAnswers, 0); - Result := FSplitBitmaps in [mrYes, mrYesToAll, mrCancel]; - end; - -var - AColCount, ARowCount, AColIndex, ARowIndex: Integer; - ASourceImageSize: TSize; - ASplitImages: Boolean; - ADestBitmap, ADestMask: TcxBitmap; - ADestRect: TRect; - ASrcPoint: TPoint; -begin - Result := -1; - - ASplitImages := ((AImage.Width mod ImageWidth) + (AImage.Height mod ImageHeight)) = 0; - - if ((AImage.Width = ImageWidth) and (AImage.Height = ImageHeight)) or - ASplitImages and - (FSplitBitmaps <> mrNoToAll) and - ((FSplitBitmaps = mrYesToAll) or GetUserPermissionForSplit(AFileName, AMultiSelect)) then - ASourceImageSize := cxSize(ImageWidth, ImageHeight) - else - ASourceImageSize := cxSize(AImage.Width, AImage.Height); - - AColCount := AImage.Width div ASourceImageSize.cx; - ARowCount := AImage.Height div ASourceImageSize.cy; - - ADestBitmap := TcxBitmap.CreateSize(ImageWidth, ImageHeight, pf32bit); - if IsGlyphAssigned(AMask) then - ADestMask := TcxBitmap.CreateSize(ImageWidth, ImageHeight, pf1bit) - else - ADestMask := nil; - try - for ARowIndex := 0 to ARowCount - 1 do - for AColIndex := 0 to AColCount - 1 do - begin - ASrcPoint := Point(AColIndex * ASourceImageSize.cx, ARowIndex * ASourceImageSize.cy); - - ADestRect := cxRectCenter(ADestBitmap.ClientRect, Min(ImageWidth, ASourceImageSize.cx), Min(ImageHeight, ASourceImageSize.cy)); - ADestBitmap.Canvas.Brush.Color := GetDefaultTransparentColor(AImage, AMask); - ADestBitmap.Canvas.FillRect(ADestBitmap.ClientRect); - - cxDrawBitmap(ADestBitmap.Canvas.Handle, AImage, ADestRect, ASrcPoint); - if IsGlyphAssigned(AMask) then - cxDrawBitmap(ADestMask.Canvas.Handle, AMask, ADestRect, ASrcPoint); - AddImage(ADestBitmap, ADestMask, GetDefaultTransparentColor(ADestBitmap, ADestMask), AInsertedItemIndex); - end; - finally - ADestMask.Free; - ADestBitmap.Free; - end; -end; - -procedure TcxImageListEditor.MoveImage(ASourceImageIndex, ADestImageIndex: Integer); -var - AList: TList; - I: Integer; -begin - if ADestImageIndex <> ASourceImageIndex then - begin - AList := TList.Create; - try - for I := 0 to ImagesCount - 1 do - AList.Add(DataItems[I].Data); - AList.Move(ASourceImageIndex, ADestImageIndex); - for I := 0 to ImagesCount - 1 do - DataItems[I].Data := AList[I]; - finally - AList.Free; - end; - FocusedImageIndex := ADestImageIndex; - end; - UpdateImageList; -end; - -function TcxImageListEditor.IsAnyImageSelected: Boolean; -begin - Result := (FocusedImageIndex <> -1) and (FDataControl.SelCount > 0); -end; - -procedure TcxImageListEditor.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TcxImageListEditor.EndUpdate; -begin - if FUpdateCount > 0 then - Dec(FUpdateCount); -end; - -function TcxImageListEditor.IsUpdateLocked: Boolean; -begin - Result := FUpdateCount > 0; -end; - -procedure TcxImageListEditor.ApplyChanges; -begin - if IsChanged then - begin - FOriginalImageList.Width := ImageWidth; - FOriginalImageList.Height := ImageHeight; - AddDataItems(FOriginalImageList); - //FOriginalImageList.Assign(ImageList); - FImageListModified := True; - FChanged := False; - end; - Change; -end; - -function TcxImageListEditor.IsChanged: Boolean; -begin - Result := FChanged; -end; - -procedure TcxImageListEditor.UpdateTransparentColor(AColor: TColor); -var - I: Integer; -begin - for I := 0 to ImagesCount - 1 do - if DataItems[I].Selected and (ImagesInfo[I].MaskColor <> AColor) then - begin - ImagesInfo[I].MaskColor := AColor; - UpdateImageList; - end; -end; - -function TcxImageListEditor.ChangeImagesSize(AValue: TSize): Boolean; - - function CanChangeImagesSize: Boolean; - begin - Result := MessageDlg('This will change the image dimensions and remove all the existing images from the list. Do you want to proceed?', - mtWarning, [mbYes, mbNo], 0) = mrYes; - end; - -begin - Result := False; - if ((ImageWidth <> AValue.cx) or (ImageHeight <> AValue.cy)) and - ((ImagesCount = 0) or CanChangeImagesSize) then - begin - Result := True; - ImageList.Width := AValue.cx; - ImageList.Height := AValue.cy; - UpdateVisibleImportList; - ClearImages; - end; -end; - -procedure TcxImageListEditor.SynchronizeData(AStartIndex, ACount: Integer); -var - I: Integer; - AImageInfo: TcxEditorImageInfo; -begin - for I := AStartIndex to AStartIndex + ACount - 1 do - begin - AImageInfo := TcxEditorImageInfo.Create; - TcxImageListAccess(ImageList).GetImageInfo(I, AImageInfo); - DataItems.Add.Data := AImageInfo; - end; - UpdateImageList; -end; - -procedure TcxImageListEditor.AddDataItems(AImageList: TcxImagelist); -var - I: Integer; -begin - AImageList.BeginUpdate; - try - AImageList.Clear; - for I := 0 to ImagesCount - 1 do - TcxImageListAccess(AImageList).AddImageInfo(ImagesInfo[I]); - finally - AImageList.EndUpdate; - end; -end; - -procedure TcxImageListEditor.AddImage(AImage, AMask: TBitmap; AMaskColor: TColor; var AInsertedImageIndex: Integer); -var - AImageInfo: TcxEditorImageInfo; -begin - AImageInfo := TcxEditorImageInfo.Create; - AImageInfo.Image := AImage; - AImageInfo.Mask := AMask; - AImageInfo.MaskColor := AMaskColor; - DataItems.Add.Data := AImageInfo; - MoveImage(ImagesCount - 1, AInsertedImageIndex); - Inc(AInsertedImageIndex); -end; - -procedure TcxImageListEditor.Change; -begin - if Assigned(FOnChange) then - FOnChange(Self); -end; - -procedure TcxImageListEditor.ClearSelection; -var - I: Integer; -begin - for I := 0 to ImagesCount - 1 do - DataItems[I].Selected := False; -end; - -procedure TcxImageListEditor.DeleteDataItem(Sender: TObject; Item: TListItem); -begin - TObject(Item.Data).Free; -end; - -procedure TcxImageListEditor.DeleteImage(AIndex: Integer); -begin - if IsIndexValid(AIndex, ImagesCount) then - begin - DataItems.Delete(AIndex); - UpdateImageList; - end; -end; - -function TcxImageListEditor.GetImagesCount: Integer; -begin - Result := DataItems.Count; -end; - -function TcxImageListEditor.GetDefaultTransparentColor(AImage, AMask: TBitmap): TColor; -begin - if IsGlyphAssigned(AMask) or IsBitmapAlphaUsed(AImage) then - Result := clNone - else - Result := AImage.Canvas.Pixels[0, AImage.Height - 1]; -end; - -function TcxImageListEditor.GetFocusedImageIndex: Integer; -begin - Result := -1; - if FDataControl.ItemFocused <> nil then - Result := FDataControl.ItemFocused.Index; -end; - -function TcxImageListEditor.GetImageHeight: Integer; -begin - Result := ImageList.Height; -end; - -function TcxImageListEditor.GetImagesInfo(Index: Integer): TcxEditorImageInfo; -begin - Result := nil; - if IsIndexValid(Index, ImagesCount) then - Result := TcxEditorImageInfo(DataItems[Index].Data); -end; - -procedure TcxImageListEditor.SetImageList(AValue: TcxImageList); -begin - FOriginalImageList := AValue; - ImageList.Assign(AValue); - SynchronizeData(0, ImageList.Count); - FChanged := False; - FocusedImageIndex := 0; - UpdateVisibleImportList; -end; - -function TcxImageListEditor.GetImageWidth: Integer; -begin - Result := ImageList.Width; -end; - -procedure TcxImageListEditor.ImageListChanged; - - procedure InitializeListViewItem(AIndex: Integer); - begin - DataItems[AIndex].Caption := IntToStr(AIndex); - DataItems[AIndex].ImageIndex := AIndex; - end; - -var - I: Integer; -begin - for I := 0 to ImagesCount - 1 do - InitializeListViewItem(I); - FChanged := True; - Change; -end; - -procedure TcxImageListEditor.SelectDataItem(Sender: TObject; - Item: TListItem; Selected: Boolean); -begin - if Selected then - FDataControl.ItemFocused := Item; -end; - -function TcxImageListEditor.GetDataItems: TListItems; -begin - Result := FDataControl.Items; -end; - -procedure TcxImageListEditor.SetFocusedImageIndex(AValue: Integer); -begin - if IsIndexValid(AValue, ImagesCount) then - begin - ClearSelection; - DataItems[AValue].Selected := True; - FDataControl.Selected.MakeVisible(True); - end; -end; - -procedure TcxImageListEditor.SetImagesInfo(Index: Integer; - AValue: TcxEditorImageInfo); -begin - if DataItems[Index].Data <> AValue then - DataItems[Index].Data := AValue; -end; - -procedure TcxImageListEditor.SetImportList(AValue: TStrings); -begin - if AValue <> nil then - FImportList.Assign(AValue) - else - FImportList.Clear; -end; - -procedure TcxImageListEditor.UpdateImageList; - - procedure MakeSystemBackground(ASource, ADestination: TBitmap); - var - R: TRect; - begin - R := Rect(0, 0, ADestination.Width, ADestination.Height); - ADestination.Canvas.Brush.Color := clWindow; - ADestination.Canvas.FillRect(R); - cxAlphaBlend(ADestination, ASource, R, R); - end; - -var - I: Integer; - AImageInfo: TcxImageInfo; - AEditorImageInfo: TcxEditorImageInfo; -begin - ImageList.BeginUpdate; - try - ImageList.Clear; - AImageInfo := TcxImageInfo.Create; - try - for I := 0 to ImagesCount - 1 do - begin - AEditorImageInfo := ImagesInfo[I]; - if AEditorImageInfo.AlphaUsed and not IsXPManifestEnabled then - begin - AImageInfo.Assign(AEditorImageInfo); - MakeSystemBackground(AEditorImageInfo.Image, AImageInfo.Image); - TcxImageListAccess(ImageList).AddImageInfo(AImageInfo); - end - else - TcxImageListAccess(ImageList).AddImageInfo(AEditorImageInfo); - end; - finally - AImageInfo.Free; - end; - finally - ImageList.EndUpdate; - end; - ImageListChanged; -end; - -procedure TcxImageListEditor.UpdateVisibleImportList; -var - I: Integer; - ACustomImageList: TCustomImageList; -begin - FVisibleImportList.Clear; - for I := 0 to FImportList.Count - 1 do - begin - ACustomImageList := TCustomImageList(FImportList.Objects[I]); - if (ACustomImageList.Width = ImageWidth) and (ACustomImageList.Height = ImageHeight) and (ACustomImageList.Count > 0) then - FVisibleImportList.AddObject(FImportList[I], FImportList.Objects[I]); - end; - TcxImageListEditorForm(FEditorForm).SetImportList(FVisibleImportList); - Change; -end; - -initialization - FImageFileFormats := TcxImageFileFormats.Create; - cxImageFileFormats.Register('Bitmaps (*.bmp)', '.bmp', TBitmap); - cxImageFileFormats.Register('Icons (*.ico)', '.ico', TcxIcon); - if GetClass(TdxPNGImage.ClassName) <> nil then - cxImageFileFormats.Register('DevExpress PNG (*.png)', '.png', TdxPNGImage); - -finalization - FreeAndNil(FImageFileFormats); - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxImageListEditorView.dfm b/internal/x.46/ExpressLibrary/Sources/cxImageListEditorView.dfm deleted file mode 100644 index d1971e92..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxImageListEditorView.dfm +++ /dev/null @@ -1,676 +0,0 @@ -object cxImageListEditorForm: TcxImageListEditorForm - Left = 327 - Top = 272 - Anchors = [akLeft, akTop, akRight, akBottom] - AutoScroll = False - BorderIcons = [biSystemMenu] - Caption = 'cxImageListEditorForm' - ClientHeight = 287 - ClientWidth = 550 - Color = clBtnFace - OldCreateOrder = False - OnCreate = FormCreate - OnDestroy = FormDestroy - PixelsPerInch = 96 - TextHeight = 13 - object lblManifestWarning: TLabel - Left = 51 - Top = 249 - Width = 246 - Height = 32 - Anchors = [akLeft, akBottom] - AutoSize = False - Caption = 'Manifest Warning' - Transparent = True - Visible = False - WordWrap = True - end - object imgWarning: TImage - Left = 13 - Top = 249 - Width = 32 - Height = 32 - Anchors = [akLeft, akBottom] - AutoSize = True - Picture.Data = { - 055449636F6E0000010001002020000001002000A81000001600000028000000 - 2000000040000000010020000000000080100000000000000000000000000000 - 00000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 - FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 - FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 - FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 - FFFFFF00414141003B3B3B5D383838B2343434CA313131CA2D2D2DCA292929CA - 262626CA222222CA1F1F1FCA1D1D1DCA191919CA161616CA141414CA101010CA - 0E0E0ECA0B0B0BCA090909CA070707CA050505CA030303CA010101CA000000CA - 000000CA000000CA000000CA000000CA000000CA000000CA000000B20000005D - 00000000434343403F3F3FE83B3B3BFF373737FF343434FF313131FF2D2D2DFF - 292929FF252525FF222222FF1F1F1FFF1B1B1BFF191919FF161616FF121212FF - 101010FF0D0D0DFF0B0B0BFF080808FF060606FF040404FF020202FF000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000E8 - 00000040484848BC434343FF404040FF3C3C3CFF363332FF302927FF2C2523FF - 29221FFF251D1BFF221A18FF1F1714FF1B1310FF18100DFF140C09FF120A06FF - 0F0703FF0C0400FF090000FF070000FF050000FF020000FF000000FF000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF - 000000BC4C4C4CEA484848FF454545FF3F3D3DFF70AABAFF86DBF3FF89E4FFFF - 85E2FFFF81E0FFFF7FDEFFFF7BDDFFFF79DCFFFF76DAFFFF73D9FFFF71D7FFFF - 6FD6FFFF6CD4FFFF6BD4FFFF68D3FFFF68D2FFFF67D1FFFF67D1FFFF67D0FFFF - 66D0FFFF66CFFFFF65CFFFFF63CBFAFF5492A5FF000000FF000000FF000000FF - 000000EA515151CA4C4C4CFF494949FF443F3DFF73B8C9FF63EEFFFF56E5FFFF - 52E3FFFF4CE0FFFF48DCFFFF43DAFFFF3ED8FFFF39D5FFFF34D3FFFF48DDFFFF - 4ED4FFFF4AD3FFFF3ED8FFFF21C9FFFF20C8FFFF20C7FFFF20C7FFFF1FC6FFFF - 1FC5FFFF1EC5FFFF1DC4FFFF25CBFFFF398FB6FF000000FF000000FF000000FF - 000000CA5252526B4F4F4FFF4C4C4CFF444140FF8EB4BDFF96F1FFFF74E2FFFF - 5FDDFFFF4FD8FFFF40D3FFFF3BCFFFFF38CEFFFF31CAFFFF48D4FFFF559DB7FF - 2D3A3FFF2A373CFF4D98B5FF35CBFFFF14BAFFFF16BAFFFF15B9FFFF14B8FFFF - 14B7FFFF13B6FFFF10B5FFFF1EC2FFFF3582A5FF000000FF000000FF000000FF - 0000006B6B6B6B0B696969D5646464FF585756FF7A7E7FFFD4F7FCFFC2F5FFFF - AFEEFFFF98EAFFFF79E1FFFF5AD9FFFF41D2FFFF37D1FFFF55C5ECFF32393CFF - 1F1714FF1B1310FF283135FF44BCEAFF1BC0FFFF17BBFFFF17BAFFFF17B9FFFF - 16B9FFFF15B8FFFF11B7FFFF35C1FCFF1B333EFF000000FF000000FF000000D5 - 0000000B7B7B7B007B7B7B5C757575FF6E6E6EFF656363FFB0C6CCFFC9FCFFFF - BAF2FFFFB3EFFFFFAAECFFFF9BE9FFFF7EE2FFFF5BDDFFFF59C0E3FF303537FF - 24201EFF211C1AFF292D2FFF44B6E3FF1FC3FFFF1ABDFFFF18BBFFFF17BAFFFF - 17BAFFFF14B8FFFF1FC4FFFF3A8AAEFF040302FF030202FF020202FF0000005C - 000000007D7D7D007D7D7D087A7A7AC7747474FF696868FF818688FFCCF4FBFF - BCF4FFFFB3F0FFFFABEDFFFFA1EBFFFF98E9FFFF8BE5FFFF8CE8FDFF5C808DFF - 2C3031FF2A2D2EFF4B7C8DFF48D2FEFF1FC0FFFF1EBFFFFF1ABDFFFF18BBFFFF - 17BBFFFF13BBFFFF39C1FAFF1E343EFF050100FF050606FF040404C702020208 - 0202020080808000808080007F7F7F4C7A7A7AFE737373FF6A6868FFADC2C6FF - C8FCFFFFB7F1FFFFAFF0FFFFA5EDFFFF9BEAFFFF8FE7FFFF89E6FFFF91E8FFFF - 75BCD3FF5DB2CEFF54D5FFFF2EC9FFFF24C3FFFF22C2FFFF1EBFFFFF1ABDFFFF - 16BBFFFF23C7FFFF3C86A5FF0C0705FF0A0909FF090909FE0606064C05050500 - 05050500828282008282820082828200808080B67A7A7AFF6F6F6EFF818687FF - C9F1F9FFBCF5FFFFB3F1FFFFAAEFFFFF9FECFFFF95E9FFFF88E5FFFF8CF0FFFF - 6D929DFF537581FF4FD7FFFF2AC9FFFF2AC7FFFF26C5FFFF21C1FFFF1DBFFFFF - 16BFFFFF3DC1F5FF25363CFF0E0A08FF0E0E0EFF0B0B0BB60909090009090900 - 09090900838383008383830083838300838383397F7F7FFA797979FF6F6D6CFF - ACC0C5FFC7FCFFFFB5F2FFFFAEF0FFFFA4EDFFFF9AEBFFFF8FE8FFFF97F0FFFF - 5A6E73FF4A5558FF71DAFBFF38D0FFFF2EC9FFFF2AC7FFFF26C4FFFF1EC1FFFF - 2ACCFFFF4087A2FF160F0DFF141514FF111111FA0E0E0E390B0B0B000B0B0B00 - 0B0B0B0086868600868686008686860086868600858585A37F7F7FFF757474FF - 838788FFC8F0F6FFBCF5FFFFB2F1FFFFA9EFFFFF9FECFFFF95EDFFFF9AE3F6FF - 515C5FFF434748FF80D3ECFF55DBFFFF36CDFFFF2FCAFFFF2AC8FFFF23C7FFFF - 45C4F1FF2D3A3FFF181412FF181818FF141414A3121212001212120012121200 - 12121200888888008888880088888800888888008888882B858585F17F7F7FFF - 747171FFABBFC3FFC6FBFFFFB5F2FFFFADF1FFFFA4EEFFFF9DF1FFFF9CD8E6FF - 484A4AFF3D3938FF80C1D4FF6BE3FFFF49D4FFFF34CEFFFF2DC9FFFF38D4FFFF - 4A89A0FF201916FF1F1F1FFF1B1B1BF11818182B171717001717170017171700 - 171717008B8B8B008B8B8B008B8B8B008B8B8B008B8B8B008A8A8A94848484FF - 7C7B7AFF86898AFFC7EEF6FFBBF6FFFFB0F1FFFFA8EFFFFFA7F6FFFF93BFC9FF - 43403FFF403C3AFF739EAAFF7AE8FFFF59D9FFFF3ED2FFFF33D0FFFF53CAF1FF - 364145FF242120FF232323FF202020941D1D1D001D1D1D001D1D1D001D1D1D00 - 1D1D1D008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008D8D8D1D898989EB - 848484FF797877FFABBDC0FFC6FCFFFFB5F3FFFFACF1FFFFB1F9FFFF7E979CFF - 474444FF43403FFF64787DFF87EDFFFF64DDFFFF4BD6FFFF4BDDFFFF558D9FFF - 2B2624FF2A2A2AFF272727EB2323231D22222200222222002222220022222200 - 222222008F8F8F008F8F8F008F8F8F008F8F8F008F8F8F008F8F8F008F8F8F7C - 898989FF818080FF8B8E8EFFC6EEF5FFBAF6FFFFB0F2FFFFB8F8FFFF6E787AFF - 4B4948FF494645FF596264FF8DE2F6FF6DE3FFFF57DEFFFF63D1F1FF414C4FFF - 312E2DFF2F2F2FFF2C2C2C7C2929290029292900292929002929290029292900 - 2929290092929200929292009292920092929200929292009292920092929214 - 8E8E8EDE898989FF7F7D7DFFADBFC2FFC6FCFFFFB6F7FFFFB4E8F2FF666B6CFF - 51504FFF4F4D4DFF545656FF8ACEDEFF76E8FFFF71EAFFFF6196A3FF393331FF - 373737FF333333DE303030143030300030303000303030003030300030303000 - 3030300093939300939393009393930093939300939393009393930093939300 - 929292698E8E8EFF868585FF8D8F90FFC6EEF3FFBEFDFFFFB0DDE6FF646667FF - 565555FF545353FF52514FFF88C3D1FF80F2FFFF83DAEEFF4C5457FF3D3A39FF - 3C3C3CFF37373769333333003333330033333300333333003333330033333300 - 3333330095959500959595009595950095959500959595009595950095959500 - 95959509939393D28E8E8EFF848181FFADBEC2FFC8FEFFFFBEEEF5FF6F7475FF - 585656FF565454FF5C5E5FFF96D7E4FF90F6FFFF759DA6FF433E3DFF444444FF - 404040D23C3C3C093B3B3B003B3B3B003B3B3B003B3B3B003B3B3B003B3B3B00 - 3B3B3B0097979700979797009797970097979700979797009797970097979700 - 9797970097979759929292FF8B8A8AFF909292FFC6EBF2FFC9FFFFFFA5BFC3FF - 656565FF5F5E5DFF8DA9B0FFA5F8FFFF98DFEFFF5E6264FF4B4949FF484848FF - 4444445943434300434343004343430043434300434343004343430043434300 - 4343430099999900999999009999990099999900999999009999990099999900 - 9999990099999906979797C2929292FF898786FFADBDC0FFC8FBFFFFC3FAFFFF - B7E7EFFFB0E3EDFFAEF3FFFFA4F7FFFF86A5ABFF585553FF525252FF4C4C4CC2 - 4949490649494900494949004949490049494900494949004949490049494900 - 494949009A9A9A009A9A9A009A9A9A009A9A9A009A9A9A009A9A9A009A9A9A00 - 9A9A9A009A9A9A009A9A9A45969797FC909090FF929393FFC6E9EFFFBEF9FFFF - B6F8FFFFAEF7FFFFA6F6FFFFA8E0EBFF6E7071FF616160FF575757FC50505045 - 4F4F4F004F4F4F004F4F4F004F4F4F004F4F4F004F4F4F004F4F4F004F4F4F00 - 4F4F4F009C9C9C009C9C9C009C9C9C009C9C9C009C9C9C009C9C9C009C9C9C00 - 9C9C9C009C9C9C009C9C9C009B9B9BAF969696FF8E8C8CFFADBABDFFCAFCFFFF - B9F5FFFFB1F4FFFFB6FAFFFF93A9ACFF6A6665FF686869FF5C5C5CAF54545400 - 5555550055555500555555005555550055555500555555005555550055555500 - 555555009E9E9E009E9E9E009E9E9E009E9E9E009E9E9E009E9E9E009E9E9E00 - 9E9E9E009E9E9E009E9E9E009D9D9D359A9A9AF8949494FF959595FFC7E8EDFF - C0F9FFFFB9F9FFFFB7E4EBFF7C7E7DFF717070FF6D6D6DF85F5F5F355A5A5A00 - 5B5B5B005B5B5B005B5B5B005B5B5B005B5B5B005B5B5B005B5B5B005B5B5B00 - 5B5B5B00A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000 - A0A0A000A0A0A000A0A0A000A0A0A0009E9E9EA09A9A9AFF918F8FFFADB9BBFF - D0FFFFFFCAFFFFFF9EAFB2FF797676FF787878FF717171A06666660066666600 - 6767670067676700676767006767670067676700676767006767670067676700 - 67676700A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000 - A0A0A000A0A0A000A0A0A000A0A0A000A0A0A0289D9D9DF0999898FF979797FF - ACB7B8FFA7B3B5FF888989FF818181FF7D7D7DF0747474286B6B6B006C6C6C00 - 6C6C6C006C6C6C006C6C6C006C6C6C006C6C6C006C6C6C006C6C6C006C6C6C00 - 6C6C6C00A2A2A200A2A2A200A2A2A200A2A2A200A2A2A200A2A2A200A2A2A200 - A2A2A200A2A2A200A2A2A200A2A2A200A2A2A200A1A1A18D9E9E9EFF989898FF - 908E8EFF8C8A8AFF8C8B8BFF878787FF8181818D7E7E7E007D7D7D007D7D7D00 - 7D7D7D007D7D7D007D7D7D007D7D7D007D7D7D007D7D7D007D7D7D007D7D7D00 - 7D7D7D00A3A3A300A3A3A300A3A3A300A3A3A300A3A3A300A3A3A300A3A3A300 - A3A3A300A3A3A300A3A3A300A3A3A300A3A3A300A3A3A31AA1A1A1DE9D9D9DFF - 989898FF949494FF909090FF8B8B8BDE8686861A868686008686860086868600 - 8686860086868600868686008686860086868600868686008686860086868600 - 86868600A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400 - A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A3A3A342A1A1A1EA - 9D9D9DFF989898FF959595EA8F8F8F428D8D8D008E8E8E008E8E8E008E8E8E00 - 8E8E8E008E8E8E008E8E8E008E8E8E008E8E8E008E8E8E008E8E8E008E8E8E00 - 8E8E8E00A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400 - A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A2A2A25F - 9F9F9FB59B9B9BB59797975F9292920091919100919191009191910091919100 - 9191910091919100919191009191910091919100919191009191910091919100 - 91919100FFFFFFFF800000010000000000000000000000000000000000000000 - 000000008000000180000001C0000003E0000007E0000007F000000FF000000F - F800001FF800001FFC00003FFC00003FFE00007FFE00007FFF0000FFFF0000FF - FF8001FFFFC003FFFFC003FFFFE007FFFFE007FFFFF00FFFFFF00FFFFFF81FFF - FFFC3FFF} - Visible = False - end - object btnOK: TButton - Left = 303 - Top = 250 - Width = 75 - Height = 25 - Action = actOK - Anchors = [akRight, akBottom] - Default = True - ModalResult = 1 - TabOrder = 0 - end - object btnCancel: TButton - Left = 383 - Top = 250 - Width = 75 - Height = 25 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - object btnApply: TButton - Left = 463 - Top = 250 - Width = 75 - Height = 25 - Action = actApply - Anchors = [akRight, akBottom] - TabOrder = 2 - end - object gbSelectedImage: TGroupBox - Left = 359 - Top = 7 - Width = 180 - Height = 231 - Anchors = [akTop, akRight, akBottom] - Caption = 'Selected Image' - TabOrder = 3 - object pbPreview: TPaintBox - Left = 10 - Top = 15 - Width = 160 - Height = 160 - Anchors = [akLeft, akTop, akRight] - OnMouseDown = pbPreviewMouseDown - OnMouseMove = pbPreviewMouseMove - OnMouseUp = pbPreviewMouseUp - OnPaint = pbPreviewPaint - end - object lbTransparentColor: TLabel - Left = 9 - Top = 186 - Width = 87 - Height = 13 - Anchors = [akLeft, akBottom] - Caption = 'Transparent Color:' - end - object cbTransparentColor: TComboBox - Left = 10 - Top = 201 - Width = 161 - Height = 21 - Anchors = [akLeft, akRight, akBottom] - ItemHeight = 13 - TabOrder = 0 - OnChange = cbTransparentColorChange - OnExit = cbTransparentColorExit - end - end - object gbImages: TGroupBox - Left = 12 - Top = 7 - Width = 340 - Height = 231 - Anchors = [akLeft, akTop, akRight, akBottom] - Caption = 'Images' - TabOrder = 4 - object lvImages: TListView - Left = 10 - Top = 15 - Width = 320 - Height = 178 - Hint = 'Add image' - Anchors = [akLeft, akTop, akRight, akBottom] - Columns = <> - Constraints.MinHeight = 150 - Constraints.MinWidth = 228 - DragMode = dmAutomatic - HideSelection = False - IconOptions.AutoArrange = True - MultiSelect = True - ReadOnly = True - PopupMenu = pmCommands - ShowColumnHeaders = False - TabOrder = 0 - OnEndDrag = lvImagesEndDrag - OnDragOver = lvImagesDragOver - OnKeyDown = lvImagesKeyDown - OnStartDrag = lvImagesStartDrag - end - object pnlToolBarSubstrate: TPanel - Left = 10 - Top = 200 - Width = 183 - Height = 22 - Anchors = [akLeft, akBottom] - BevelOuter = bvNone - TabOrder = 1 - object tbCommands: TToolBar - Left = 0 - Top = 0 - Width = 183 - Height = 22 - Align = alClient - Caption = 'tbCommands' - EdgeBorders = [] - Flat = True - Images = imglSmall - ParentShowHint = False - ShowHint = True - TabOrder = 0 - object tbbAdd: TToolButton - Left = 0 - Top = 0 - Action = actAdd - end - object tbbReplace: TToolButton - Left = 23 - Top = 0 - Action = actReplace - end - object tbbDelete: TToolButton - Left = 46 - Top = 0 - Action = actDelete - end - object tbbClear: TToolButton - Left = 69 - Top = 0 - Action = actClear - end - object tbbExport: TToolButton - Left = 92 - Top = 0 - Action = actExport - DropdownMenu = pmExport - end - object tbbImport: TToolButton - Left = 115 - Top = 0 - Action = actImport - DropdownMenu = pmImageLists - end - end - end - object cbImagesSize: TComboBox - Left = 260 - Top = 200 - Width = 70 - Height = 21 - Style = csDropDownList - Anchors = [akRight, akBottom] - ItemHeight = 13 - TabOrder = 2 - OnChange = cbImagesSizeChange - Items.Strings = ( - '16x16' - '24x24' - '32x32' - '48x48' - '64x64' - '128x128') - end - end - object pmImageLists: TPopupMenu - Images = imglSmall - Left = 64 - Top = 40 - end - object pmCommands: TPopupMenu - Images = imglSmall - Left = 152 - Top = 40 - object miAdd: TMenuItem - Action = actAdd - end - object miReplace: TMenuItem - Action = actReplace - end - object miDelete: TMenuItem - Action = actDelete - end - object miClear: TMenuItem - Action = actClear - end - object miExport: TMenuItem - Action = actExport - object AsBitmap1: TMenuItem - Action = actExportAsBitmap - end - object AsPNG1: TMenuItem - Action = actExportAsPNG - end - end - object miImport: TMenuItem - Action = actImport - end - end - object imglSmall: TcxImageList - CompressData = True - FormatVersion = 1 - DesignInfo = 1572992 - ImageInfo = < - item - Image.Data = { - 860200005844424D0100823604020084424D3604060081360300812803008110 - 03008110030083010020060081045200034E8100034D8100034D8100034B8100 - 034B810003488100034781000347810003458100034381000343810003431100 - 0351A9006BCE7D006BCE7D0069CF7F0068CF800068D0810067D1830067D18400 - 65D2860065D2860064D38800034511000354A90064D388002FC562002EC76500 - 2EC765002DC869002DC869002ECA6D002ECA6D0030CB700064D9950003471100 - 0357A90068D9960041CF7A004CD181005CD68C0072DB9C0085E1A900A1E7BB00 - BDEDCD00E4F1DB00F2F5E600034B11000359A900D1EFD400E4F1DB00F6F1DD00 - F9F2DF00FDF3E100FDF3E100FDF4E200FFF4E600FFF4E600FFF8EE00034D1100 - 035CB000FFF6EA00FFF3E300FFF3E300FFF3E100FFF2DF00FFF1DE00FFF1DE00 - FFF1DD00FFF1DD0003531900034F1800034F180D00035EB000FFF0DA00FFEBCE - 00FFEACC00FFEACC00FFE9CA00FFE9C800FFE8C700FFE7C400FFE7C40002591B - 000FCD69000353190D000361B000FFE8C700FFDFB300FFDEB000FFDEB000FFDD - AE00FFDDAD00FFDCAB00FFDBAA00FFDAA600025E1D000FCD690002561A0D0003 - 64BD00FFDEB000FFDDAE00FFDDAD00FFDDAD00FFDCAB00FFDBAA000375280003 - 7025000269220002641F0027D87C00025E1D0002591B0002561A000353190003 - 66810003668100036481000363810003638100036181000361A400037C2C006F - F0B0006FF0B00053E89C003CE08A0027D87C000FCD69000FCD690002561A1D00 - A30387330003873300037C2C000375280053E89C000269220002641F00025E1D - 0002591B29008B037C2C006FF0B00003702535008B0387330087F6C100037C2C - 35008B04943A00038733000387334D00} - Mask.Data = { - 670000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF810002FF0300810F0300810F - 0300810F0300810F0300810F0300810703008107030081070A0081FE030082FF - C7020082FFC7020082FFC7020002FF0200} - end - item - Image.Data = { - 580300005844424D0100823604020084424D3604060081360300812803008110 - 0300811003008301002006008104460083A559060900037A8100037A81000377 - 8100037781000377810003758100037581000375810003738100037081000370 - 050090A5590600A5590600A5590600CCB59200037DA5008FDA9D008FDA9D008F - DA9D008EDBA0008DDCA1008DDCA1008CDDA4008CDDA4008CDDA400037309008C - A5590600D3CFC200A5590600037DA5008BDEA50062D3890062D3890062D58C00 - 62D58C0061D7900061D7900061D790008CE3AF000375110084A55906000381A5 - 008CE3AF0072DB9C0078DCA00085E1A90095E4B400A1E7BB00BDEDCD00D1EFD4 - 00EDF6E7000377150003819100E4F1DB00EDF6E700F9F5E600F9F5E600034E81 - 00034D8100034D8100034B8100034B8100034881000347810003478100034581 - 00034381000343810003859100FFF8EE00FFF6EA00FFF6EA00FFF6EA000351A5 - 006BCE7D006BCE7D0069CF7F0068CF800068D0810067D1830067D1840065D286 - 0065D286000345810003859100FFF3E300FFF0DA00FFF0DA00FFF0DA000354A5 - 0064D388002FC562002EC765002EC765002DC869002DC869002ECA6D002ECA6D - 0064D995000348810003899100FFEDD300FFE7C600FFE7C400FFE7C4000357A5 - 0068D9960041CF7A004CD181005CD68C0072DB9C0085E1A900A1E7BB00BDEDCD - 00EDF6E700034B8100038A9100FFE6C200FFE6C200FFE6C200FFE6C2000359A5 - 00D1EFD400E4F1DB00F6F1DD00F9F2DF00FDF3E100FDF3E100FDF4E200FFF4E6 - 00FFF8EE00034E8100038D8100038A8100038A8100038A810003898100035CA5 - 00FFF6EA00FFF3E300FFF3E300FFF3E100FFF2DF00FFF1DE00FFF1DE00FFF1DD - 00FFF4E60003511500035EA500FFF0DA00FFEBCE00FFEACC00FFEACC00FFE9CA - 00FFE9C800FFE8C700FFE7C400FFEDD30003548400C6731B11000361A500FFE8 - C700FFDFB300FFDEB000FFDEB000FFDDAE00FFDDAD00FFDCAB00FFDBAA00FFE4 - BB0003578C00C9761D00DAD4C600C6731B09000364A500FFDEB000FFDDAE00FF - DDAD00FFDDAD00FFDCAB00FFDBAA00FFDBAA00FFDAA600FFDAA60003599000D8 - C3A600CB781E00C9761D00C6731B050003668100036681000364810003638100 - 036381000361810003618100035E8100035E8100035E8100035C090083CB781E - 3500} - Mask.Data = { - 550000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF8300FFFB0300811003008118 - 0300811E0300811F1A0081F8030081780300811803008108030082DFFF0200} - end - item - Image.Data = { - AE0200005844424D0100823604020084424D3604060081360300812803008110 - 03008110030083010020060081045200034E8100034D8100034D8100034B8100 - 034B810003488100034781000347810003458100034381000343810003431100 - 0351A9006BCE7D006BCE7D0069CF7F0068CF800068D0810067D1830067D18400 - 65D2860065D2860064D38800034511000354A90064D388002FC562002EC76500 - 2EC765002DC869002DC869002ECA6D002ECA6D0030CB700064D9950003471100 - 0357A90068D9960041CF7A004CD181005CD68C0072DB9C0085E1A900A1E7BB00 - BDEDCD00E4F1DB00F2F5E600034B11000359A900D1EFD400E4F1DB00F6F1DD00 - F9F2DF00FDF3E100FDF3E100FDF4E200FFF4E600FFF4E600FFF8EE00034D0900 - 83969FD30500035CA900FFF6EA00FFF3E300FFF3E300FFF3E100FFF2DF00EFE2 - DC00FFF1DE00FFF1DD00FFF1DD00FFF3E300034E050087969FD300929BD10500 - 035EA900FFF0DA00FFEBCE00FFEACC00FFEACC00FFE9CA00B7A8CA00E7D3C600 - FFE7C400FFE7C400FFEDD30003538800C9D5EB005B60BD09000361A900FFE8C7 - 00FFDFB300FFDEB000FFDEB000FFDDAE00C4ABB6008B78B700FADAAB00FFDAA6 - 00FFE4BB00035388006469CA00969FD309000364A900FFDEB000FFDDAE00FFDD - AD00FFDDAD00FFDBAA00FADAAB008B78B7008B78B700FFDAA600FFDAA600022A - 8594006469CA0D00036681000366810003648100036381000363810003618100 - 036181000259826600022A829400022A829400022A829400022A8194310088AE - B8E5000A0BCC00020585C9007C84D92900A7C9D5EB007D84E4002C2FD7006D73 - DD006D73DD001011CA001F21CD005D62D6008991DA00C9D5EB19008B7D84E400 - 383AD6009BA4E309008CAEB8E5004E52D9001011CA00020585C500474BD31900 - 87C9D5EB00C9D5EB15008BB5C0E7007D84E4008B93E24100} - Mask.Data = { - 6F0000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF810002FF0300810F0300810F - 0300810F0300810F0300810D030081090300810303008103030081070300810F - 020082FF0F020081FC030082FC60020082FCF8020002FF0200} - end - item - Image.Data = { - DB0100005844424D0100823604020084424D3604060081360300812803008110 - 03008110030083010020060081044600835B60BD39008799A2D3005B60BD0900 - 83C9D5EB2D00874B4FB40099A2D30900838991DA2900878A92CF004B4FB40D00 - 877C84D900A4ADE421008BB5C0E7002C2EAF00929BD10D0087AEB8E5005D62D6 - 2100875B60BD005B60BD1500876D73DD005D62D619008B7178CF002C2EAF00AE - B8E51900873F42D200646AD81100847C84D900021585BC008991DA1D008B9BA4 - E3001F21CD00585CD60900847C84D900021585BC007177D4250090858DE10010 - 11CA00383AD600474BD300020B85C500646AD82D0088646AD8000A0BCC000205 - 89C9002E30CE00A4ADE4290090858DE1002C2FD7000A0BCC001A1BCD0002058D - C9001A1BCD005D62D6009BA4E3190088A4ADE4004E52D900020892D5003033D5 - 008B93E200A4ADE4004E52D900020582C900020582C600020591C6002E30CE00 - 5D62D600838ADB00A4ADE40500845D63E200020882D500020889D5005E63DF00 - B5C0E70D0088858DE100383AD600020582C900020582C600020582C500020582 - C500020591C0007C84D9007D84E4005D63E200959EE71D008C858DE100474BD3 - 001011CA00020582C600020585C5001F21C7310090B5C0E700858DE1005D62D6 - 009BA4E300} - Mask.Data = { - 7A0000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF8300FFFB020082FFF3020082 - 7FF30200827FE70200823FC70200823FCF0200829F8F020082CF1F020082C63F - 020082E07F020082F07F020082E01F0200828001020081070300821FC0020082 - FFF00200} - end - item - Image.Data = { - 520300005844424D0100823604020084424D3604060081360300812803008110 - 030081100300830100200600810456008CC5A67B00B26C3400CA8B5800032481 - 0003248100031981000319810003198100030F8100030F8100030F8C00BA7743 - 00A1551A00B78E5D09008CBA774300EFCA9100EBC58800033481000332810003 - 2C8100032C810003248900E2B97A00E2B97A0003198C00E2B97A00DAA65600A1 - 551A09008CC17E4800F2CE9600EFCA91000345810003418100033C8100033781 - 0003348900E5BD7D00E4BA7C0003248C00E2B97A00DAA65600A1551A09008CC6 - 834E00F4D19D00F2CE96000359810003538100034E81000348810003458900E7 - BD8300E5BD7D0003378C00E2B97A00DAA65600A85E2409008CCA8B5800F6D5A5 - 00F4D19D00036B81000366810003618100035C81000357810003538100034D81 - 0003488C00E5BD7D00DAA65600A85E240900B7CA8B5800FADAAB00F6D5A500F4 - D19D00EFCA9100EFCA9100EBC58800EBC58800EBC58800E7BD8300E7BD8300E7 - BD8300E1AE5F00A85E240900B7D1915D00FBDDB100F2CE9600F3C88600F3C886 - 00EDC07A00ECBC7200E9B86D00E6B56900E6B56900E3B16400E3B16400E1AE5F - 00B26C340900B7D99B6800FFE4BB00E3AF7900E3AF7900E3B27500E3B27500E4 - AF6E00E4AF6E00E2AD6800E2AD6800E2AD6800E2AD6800E3B16400B26C340900 - 8CD99B6800FFE4BB00E3AF790003FC810003FC810003FA810003FA810003F881 - 0003F8810003F6810003F68C00E2AD6800E6B56900B26C3409008CDFA47100FF - E6C200DFA4710003FE810003D6810003D6810003D6810003D6810003D2810003 - D2810003F88C00E0A96A00E6B56900BA774309008CDFA47100FFECC900DFA471 - 0003FF810003FF810003FE810003FE810003FC810003FC810003FA810003FA8C - 00E0A96A00E9B86D00BA774309008CE4A77500FFEFCF00D99B680003FF810003 - D9810003D9810003D9810003D9810003D6810003D6810003FC8C00E0A96A00EC - BC7200C17E4809008CE4A77500FFF4D400DFAE850003FF810003FF810003FF81 - 0003FF810003FF810003FF810003FF810003FC8C00E7BD8300EFCA9100C6834E - 09008CE2CFB000E4A77500E4A7750003D9810003D9810003D9810003D9810003 - D9810003D9810003D9810003D98C00D1915D00CA8B5800CCB5924500} - Mask.Data = { - 7A0000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF810002FF0200828001020082 - 8001020082800102008280010200828001020082800102008280010200828001 - 0200828001020082800102008280010200828001020082800102008280010200 - 02FF0200} - end - item - Image.Data = { - E10200005844424D0100823604020084424D3604060081360300812803008110 - 03008110030083010020060081045E000366810003618100035C810003578100 - 03518100034D81000347810003418100033C81000337810003348100032C1100 - 036B810003E3810003FF810003FF810003FF810003FF810003FF810003FF8100 - 03FF810003FF810003FF810003321100036B810003E3810003FF810003FF8100 - 03FF810003FF810003FF810003FF810003FF810003FF810003FF810003341100 - 0370810003E3810003FF810003FF8500BF611B0003FF810003FF810003FF8100 - 03FF810003FF810003FF8100033711000373810003E3810003FF810003FF8900 - C5631B00C5631B0003FF810003FF810003FF810003FF810003FF8100033C0900 - A4E07A2E00DD762A00DA722600D6712600D46C2200D16B1F00CB661C00CB661C - 00C5631B0003FF810003FF810003FF810003FF8100033C0900A8E8833A00E37E - 3400E37E3400E07A2E00DD762A00DA722600D6712600D16B1F00CE691F00CB66 - 1C0003FF810003FF810003FF810003410900A4EE8D4600EE8D4600E8833A00E8 - 833A00E37E3400E37E3400E07A2E00DD762A00D671260003FF810003FF810003 - FF810003FF8100034511000381810003E3810003FF810003FF8900E8833A00E3 - 7E340003FF810003FF810003FF810003FF810003FF8100034811000381810003 - E3810003FF810003FF8500EE8D460003FF810003FF810003FF810003FF810003 - FF810003FF8100034B11000385810003E3810003FF810003FF810003FF810003 - FF810003FF810003FF810003FF810003FF810003FF8100034E11000389810003 - E3810003FF810003FF810003FF810003FF810003FF810003FF810003FF810003 - FF810003FF810003531100038A810003E3810003E3810003E3810003E3810003 - E3810003E3810003E3810003E3810003E3810003E3810003571100038D810003 - 8981000385810003818100037D81000377810003738100037081000366810003 - 648100035E810003594500} - Mask.Data = { - 7A0000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF810002FF020082E001020082 - E001020082E001020082E001020082E001020082800102008280010200828001 - 020082E001020082E001020082E001020082E001020082E001020082E0010200 - 02FF0200} - end> - end - object spdSave: TSavePictureDialog - DefaultExt = '*.bmp' - Filter = 'Bitmaps (*.bmp)|*.bmp' - Left = 201 - Top = 24 - end - object actlCommands: TActionList - Images = imglSmall - Left = 128 - Top = 80 - object actAdd: TAction - Caption = '&Add' - Hint = 'Add image' - ImageIndex = 0 - ShortCut = 45 - OnExecute = actAddExecute - end - object actInsert: TAction - Caption = 'Insert' - ShortCut = 8237 - OnExecute = actInsertExecute - end - object actReplace: TAction - Caption = '&Replace' - Hint = 'Replace image' - ImageIndex = 1 - ShortCut = 16466 - OnExecute = actReplaceExecute - end - object actDelete: TAction - Caption = '&Delete' - Hint = 'Delete image' - ImageIndex = 2 - ShortCut = 46 - OnExecute = actDeleteExecute - end - object actClear: TAction - Caption = '&Clear' - Hint = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnExecute = actClearExecute - end - object actImport: TAction - Caption = '&Import' - Hint = 'Import images' - ImageIndex = 5 - OnExecute = actImportExecute - end - object actApply: TAction - Caption = 'Apply' - OnExecute = actApplyExecute - end - object actOK: TAction - Caption = 'OK' - OnExecute = actOKExecute - end - object actExportAsBitmap: TAction - Caption = 'as &Bitmap...' - Hint = 'Export as bitmap' - ImageIndex = 4 - ShortCut = 16450 - OnExecute = actExportAsBitmapExecute - end - object actExportAsPNG: TAction - Caption = 'as &PNG...' - Hint = 'Export as PNG' - ImageIndex = 4 - ShortCut = 16464 - OnExecute = actExportAsPNGExecute - end - object actExport: TAction - Caption = '&Export' - Hint = 'Export images' - ImageIndex = 4 - OnExecute = actExportExecute - end - end - object opdOpen: TOpenPictureDialog - Filter = - 'All (*.bmp, *.ico)|*.bmp;*.ico|Bitmaps (*.bmp)|*.bmp|Icons (*.ic' + - 'o)|*.ico' - FilterIndex = 0 - Options = [ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing] - Left = 198 - Top = 80 - end - object pmExport: TPopupMenu - Images = imglSmall - Left = 224 - Top = 144 - object AsBitmap2: TMenuItem - Action = actExportAsBitmap - Caption = 'Export as &Bitmap...' - end - object AsPNG2: TMenuItem - Action = actExportAsPNG - Caption = 'Export as &PNG...' - end - end -end diff --git a/internal/x.46/ExpressLibrary/Sources/cxImageListEditorView.pas b/internal/x.46/ExpressLibrary/Sources/cxImageListEditorView.pas deleted file mode 100644 index e91222da..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxImageListEditorView.pas +++ /dev/null @@ -1,562 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxImageListEditorView; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, - StdCtrls, ExtCtrls, ComCtrls, CommCtrl, Menus, ImgList, ToolWin, cxGraphics, - cxClasses, cxImageListEditor, ActnList, Dialogs, ExtDlgs; - -type - TcxImageListEditorFormInternalState = (eisSelectingTransparentColor); - TcxImageListEditorFormInternalStates = set of TcxImageListEditorFormInternalState; - - TcxImageListEditorForm = class(TForm) - btnOK: TButton; - btnCancel: TButton; - btnApply: TButton; - gbSelectedImage: TGroupBox; - pbPreview: TPaintBox; - lbTransparentColor: TLabel; - cbTransparentColor: TComboBox; - gbImages: TGroupBox; - lvImages: TListView; - pnlToolBarSubstrate: TPanel; - tbCommands: TToolBar; - tbbAdd: TToolButton; - tbbDelete: TToolButton; - tbbClear: TToolButton; - tbbExport: TToolButton; - tbbReplace: TToolButton; - tbbImport: TToolButton; - pmImageLists: TPopupMenu; - pmCommands: TPopupMenu; - miAdd: TMenuItem; - miReplace: TMenuItem; - miDelete: TMenuItem; - miClear: TMenuItem; - miExport: TMenuItem; - miImport: TMenuItem; - lblManifestWarning: TLabel; - imgWarning: TImage; - imglSmall: TcxImageList; - spdSave: TSavePictureDialog; - actlCommands: TActionList; - actAdd: TAction; - actInsert: TAction; - actReplace: TAction; - actDelete: TAction; - actClear: TAction; - actImport: TAction; - actApply: TAction; - actOK: TAction; - opdOpen: TOpenPictureDialog; - cbImagesSize: TComboBox; - AsBitmap1: TMenuItem; - AsPNG1: TMenuItem; - actExportAsBitmap: TAction; - actExportAsPNG: TAction; - pmExport: TPopupMenu; - AsBitmap2: TMenuItem; - AsPNG2: TMenuItem; - actExport: TAction; - - procedure FormCreate(Sender: TObject); - procedure FormDestroy(Sender: TObject); - - procedure cbImagesSizeChange(Sender: TObject); - procedure cbTransparentColorChange(Sender: TObject); - procedure cbTransparentColorExit(Sender: TObject); - - procedure lvImagesChange(Sender: TObject; Item: TListItem; - Change: TItemChange); - procedure lvImagesDragOver(Sender, Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); - procedure lvImagesEndDrag(Sender, Target: TObject; X, Y: Integer); - procedure lvImagesStartDrag(Sender: TObject; - var DragObject: TDragObject); - procedure lvImagesKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - - procedure pbPreviewMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure pbPreviewMouseMove(Sender: TObject; Shift: TShiftState; X, - Y: Integer); - procedure pbPreviewMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure pbPreviewPaint(Sender: TObject); - - procedure actAddExecute(Sender: TObject); - procedure actInsertExecute(Sender: TObject); - procedure actReplaceExecute(Sender: TObject); - procedure actDeleteExecute(Sender: TObject); - procedure actClearExecute(Sender: TObject); - procedure actImportExecute(Sender: TObject); - procedure actApplyExecute(Sender: TObject); - procedure actOKExecute(Sender: TObject); - procedure actExportAsBitmapExecute(Sender: TObject); - procedure actExportAsPNGExecute(Sender: TObject); - procedure actExportExecute(Sender: TObject); - private - FImageListEditor: TcxImageListEditor; - FImportList: TStrings; - FDragImageIndex: Integer; - FPreviewImageList: TcxImageList; - FInternalState: TcxImageListEditorFormInternalStates; - - procedure AddColor(const AColor: string); - function ChangeImagesSize: Boolean; - procedure DrawFocusedItem(ACanvas: TCanvas; ARect: TRect); - function GetColorFromCursorPos(X, Y: Integer): TColor; - function GetFocusedImageIndex: Integer; - function IsValidImagesSize(ADisplayImagesSizeValue: string; out ASize: TSize): Boolean; - procedure SetFocusedImageIndex(AValue: Integer); - - procedure AddImages(AAddMode: TcxImageListEditorAddMode); - procedure ImportImageList(Sender: TObject); - procedure PopulateImportItems; - - procedure DataChanged(Sender: TObject); - - procedure UpdateActions; reintroduce; - procedure UpdateControls; - procedure UpdateImagesSizeIndicator; - procedure UpdateTransparentColor(AColor: TColor); overload; - procedure UpdateTransparentColor(X, Y: Integer); overload; - procedure UpdateTransparentColorIndicator(AColor: TColor); - - property FocusedImageIndex: Integer read GetFocusedImageIndex write SetFocusedImageIndex; - public - constructor Create(AImageListEditor: TcxImageListEditor); reintroduce; - destructor Destroy; override; - - function GetVisualDataControl: TListView; - procedure SetImportList(AValue: TStrings); - end; - -implementation - -{$R *.dfm} - -uses - Types, Math, cxGeometry, cxControls, dxOffice11, cxLibraryConsts; - -type - TcxImageListAccess = class(TcxImageList); - -{ TcxImageListEditorForm } - -constructor TcxImageListEditorForm.Create(AImageListEditor: TcxImageListEditor); -begin - inherited Create(nil); - FImageListEditor := AImageListEditor; - FImageListEditor.OnChange := DataChanged; - - FPreviewImageList := TcxImageList.Create(Self); - -{$IFDEF DELPHI9} - PopupMode := pmAuto; -{$ENDIF} - - if IsXPManifestEnabled then - begin - imgWarning.Visible := True; - lblManifestWarning.Caption := 'These images may be distorted if used in standard Windows UI controls with XPManifest enabled.'; - lblManifestWarning.Visible := True; - Width := Width + MulDiv(6{Rows} * 3{Pixel}, Screen.PixelsPerInch, 96); - end; -end; - -destructor TcxImageListEditorForm.Destroy; -begin - FreeAndNil(FPreviewImageList); - inherited; -end; - -function TcxImageListEditorForm.GetVisualDataControl: TListView; -begin - Result := lvImages; -end; - -procedure TcxImageListEditorForm.SetImportList(AValue: TStrings); -begin - FImportList := AValue; - PopulateImportItems; -end; - -procedure TcxImageListEditorForm.FormCreate(Sender: TObject); -begin - lvImages.OnChange := lvImagesChange; - - pbPreview.Cursor := crcxColorPicker; - GetColorValues(AddColor); - FDragImageIndex := -1; - - Constraints.MinWidth := Width; - Constraints.MinHeight := Height; -end; - -procedure TcxImageListEditorForm.FormDestroy(Sender: TObject); -begin - lvImages.OnChange := nil; -end; - -procedure TcxImageListEditorForm.cbImagesSizeChange(Sender: TObject); -begin - if not ChangeImagesSize then - UpdateImagesSizeIndicator; -end; - -procedure TcxImageListEditorForm.cbTransparentColorChange(Sender: TObject); -begin - if cbTransparentColor.Items.IndexOf(cbTransparentColor.Text) <> -1 then - UpdateTransparentColor(StringToColor(cbTransparentColor.Text)); -end; - -procedure TcxImageListEditorForm.cbTransparentColorExit(Sender: TObject); -begin - UpdateTransparentColor(StringToColor(cbTransparentColor.Text)); -end; - -procedure TcxImageListEditorForm.lvImagesChange(Sender: TObject; - Item: TListItem; Change: TItemChange); -begin - UpdateControls; -end; - -procedure TcxImageListEditorForm.lvImagesDragOver(Sender, Source: TObject; X, - Y: Integer; State: TDragState; var Accept: Boolean); -begin - Accept := lvImages.GetItemAt(X, Y) <> nil; -end; - -procedure TcxImageListEditorForm.lvImagesEndDrag(Sender, Target: TObject; X, - Y: Integer); -var - ATargetItem: TListItem; -begin - FImageListEditor.EndUpdate; - ATargetItem := lvImages.GetItemAt(X, Y); - if ATargetItem <> nil then - FImageListEditor.MoveImage(FDragImageIndex, ATargetItem.ImageIndex) - else - FocusedImageIndex := FDragImageIndex; - FDragImageIndex := -1; -end; - -procedure TcxImageListEditorForm.lvImagesStartDrag(Sender: TObject; - var DragObject: TDragObject); -begin - FImageListEditor.BeginUpdate; - FDragImageIndex := FImageListEditor.FocusedImageIndex; -end; - -procedure TcxImageListEditorForm.lvImagesKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if Key = VK_DELETE then - FImageListEditor.DeleteSelectedImages; -end; - -procedure TcxImageListEditorForm.pbPreviewMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - if ssLeft in Shift then - begin - Include(FInternalState, eisSelectingTransparentColor); - UpdateTransparentColor(X, Y); - end; -end; - -procedure TcxImageListEditorForm.pbPreviewMouseMove(Sender: TObject; - Shift: TShiftState; X, Y: Integer); -begin - if eisSelectingTransparentColor in FInternalState then - UpdateTransparentColor(X, Y); -end; - -procedure TcxImageListEditorForm.pbPreviewMouseUp(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - Exclude(FInternalState, eisSelectingTransparentColor); -end; - -procedure TcxImageListEditorForm.pbPreviewPaint(Sender: TObject); -var - ARect: TRect; -begin - ARect := pbPreview.ClientRect; - FrameRectByColor(pbPreview.Canvas.Handle, ARect, clNavy); - InflateRect(ARect, -1, -1); - cxDrawHatch(pbPreview.Canvas.Handle, ARect, $BFBFBF, clWhite, 8); - DrawFocusedItem(pbPreview.Canvas, ARect); -end; - -procedure TcxImageListEditorForm.AddColor(const AColor: string); -begin - cbTransparentColor.Items.Add(AColor); -end; - -function TcxImageListEditorForm.ChangeImagesSize: Boolean; -var - ASize: TSize; -begin - Result := IsValidImagesSize(cbImagesSize.Text, ASize) and FImageListEditor.ChangeImagesSize(ASize); -end; - -procedure TcxImageListEditorForm.DrawFocusedItem(ACanvas: TCanvas; ARect: TRect); -begin - if FImageListEditor.IsAnyImageSelected then - begin - FPreviewImageList.Width := FImageListEditor.ImageWidth; - FPreviewImageList.Height := FImageListEditor.ImageHeight; - TcxImageListAccess(FPreviewImageList).AddImageInfo(FImageListEditor.ImagesInfo[FocusedImageIndex]); - FPreviewImageList.Draw(ACanvas, ARect, 0); - FPreviewImageList.Clear; - end; -end; - -function TcxImageListEditorForm.GetColorFromCursorPos(X, Y: Integer): TColor; -begin - if cxRectPtIn(Rect(0, 0, pbPreview.Width, pbPreview.Height), X, Y) then - begin - X := X * FImageListEditor.ImageWidth div pbPreview.Width; - Y := Y * FImageListEditor.ImageHeight div pbPreview.Height; - Result := FImageListEditor.ImagesInfo[FocusedImageIndex].Image.Canvas.Pixels[X, Y]; - end - else - Result := FImageListEditor.ImagesInfo[FocusedImageIndex].MaskColor; -end; - -function TcxImageListEditorForm.GetFocusedImageIndex: Integer; -begin - Result := FImageListEditor.FocusedImageIndex; -end; - -function TcxImageListEditorForm.IsValidImagesSize(ADisplayImagesSizeValue: string; out ASize: TSize): Boolean; -var - APosition: Integer; -begin - APosition := Pos('x', ADisplayImagesSizeValue); - Result := (APosition <> 0) and - TryStrToInt(Copy(ADisplayImagesSizeValue, 1, APosition - 1), ASize.cx) and - TryStrToInt(Copy(ADisplayImagesSizeValue, APosition + 1, Length(ADisplayImagesSizeValue) - APosition), ASize.cy); -end; - -procedure TcxImageListEditorForm.SetFocusedImageIndex(AValue: Integer); -begin - FImageListEditor.FocusedImageIndex := AValue; -end; - -procedure TcxImageListEditorForm.AddImages(AAddMode: TcxImageListEditorAddMode); -begin - opdOpen.Filter := cxImageFileFormats.GetFilter; - if opdOpen.Execute then - FImageListEditor.AddImages(opdOpen.Files, AAddMode); -end; - -procedure TcxImageListEditorForm.ImportImageList(Sender: TObject); -begin - FImageListEditor.ImportImages(FImportList.Objects[TMenuItem(Sender).Tag] as TCustomImageList); -end; - -procedure TcxImageListEditorForm.PopulateImportItems; - - procedure PopulateItem(AParentItem: TMenuItem; const APrefix: string); - var - AMenuItem: TMenuItem; - I: Integer; - begin - AParentItem.Clear; - for I := 0 to FImportList.Count - 1 do - begin - AMenuItem := TMenuItem.Create(Self); - AMenuItem.OnClick := ImportImageList; - AMenuItem.Caption := APrefix + FImportList[I]; - AMenuItem.Tag := I; - AMenuItem.ImageIndex := 5; - AParentItem.Add(AMenuItem); - end; - end; - -begin - PopulateItem(pmImageLists.Items, 'Import from '); - PopulateItem(miImport, 'from '); -end; - -procedure TcxImageListEditorForm.DataChanged(Sender: TObject); -begin - UpdateControls; -end; - -procedure TcxImageListEditorForm.UpdateActions; -begin - actDelete.Enabled := FImageListEditor.IsAnyImageSelected; - actClear.Enabled := FImageListEditor.ImagesCount > 0; - actExport.Enabled := FImageListEditor.ImagesCount > 0; - actExportAsBitmap.Enabled := actExport.Enabled; - actExportAsPNG.Enabled := actExport.Enabled; - actReplace.Enabled := FImageListEditor.IsAnyImageSelected; - actInsert.Enabled := FImageListEditor.IsAnyImageSelected; - actApply.Enabled := FImageListEditor.IsChanged; - actImport.Enabled := (FImportList <> nil) and (FImportList.Count <> 0); -end; - -procedure TcxImageListEditorForm.UpdateControls; -var - AAllowSelectTransparentColor: Boolean; -begin - if FImageListEditor.IsUpdateLocked then - Exit; - - AAllowSelectTransparentColor := FImageListEditor.IsAnyImageSelected and - not IsGlyphAssigned(FImageListEditor.ImagesInfo[FocusedImageIndex].Mask) and - not FImageListEditor.ImagesInfo[FocusedImageIndex].AlphaUsed; - - //gbSelectedImage - pbPreview.Enabled := AAllowSelectTransparentColor; - cbTransparentColor.Enabled := AAllowSelectTransparentColor; - lbTransparentColor.Enabled := AAllowSelectTransparentColor; - - pbPreview.Invalidate; - - if AAllowSelectTransparentColor then - UpdateTransparentColorIndicator(FImageListEditor.ImagesInfo[FocusedImageIndex].MaskColor) - else - UpdateTransparentColorIndicator(clNone); - - UpdateImagesSizeIndicator; - UpdateActions; -end; - -procedure TcxImageListEditorForm.UpdateImagesSizeIndicator; -var - AImagesSizeDisplayText: string; - ASizeIndex: Integer; -begin - AImagesSizeDisplayText := Format('%dx%d', [FImageListEditor.ImageWidth, FImageListEditor.ImageHeight]); - ASizeIndex := cbImagesSize.Items.IndexOf(AImagesSizeDisplayText); - if ASizeIndex <> -1 then - cbImagesSize.ItemIndex := ASizeIndex - else - cbImagesSize.Items.Add(AImagesSizeDisplayText); -end; - -procedure TcxImageListEditorForm.UpdateTransparentColor(AColor: TColor); -begin - FImageListEditor.UpdateTransparentColor(AColor); -end; - -procedure TcxImageListEditorForm.UpdateTransparentColor(X, Y: Integer); -begin - UpdateTransparentColor(GetColorFromCursorPos(X, Y)); -end; - -procedure TcxImageListEditorForm.UpdateTransparentColorIndicator(AColor: TColor); -begin - cbTransparentColor.Text := ColorToString(AColor); -end; - -procedure TcxImageListEditorForm.actAddExecute(Sender: TObject); -begin - AddImages(amAdd); -end; - -procedure TcxImageListEditorForm.actInsertExecute(Sender: TObject); -begin - AddImages(amInsert); -end; - -procedure TcxImageListEditorForm.actReplaceExecute(Sender: TObject); -begin - AddImages(amReplace); -end; - -procedure TcxImageListEditorForm.actDeleteExecute(Sender: TObject); -begin - FImageListEditor.DeleteSelectedImages; -end; - -procedure TcxImageListEditorForm.actClearExecute(Sender: TObject); -begin - FImageListEditor.ClearImages; -end; - -procedure TcxImageListEditorForm.actImportExecute(Sender: TObject); -begin - // (don't remove this method) -end; - -procedure TcxImageListEditorForm.actApplyExecute(Sender: TObject); -begin - FImageListEditor.ApplyChanges; -end; - -procedure TcxImageListEditorForm.actOKExecute(Sender: TObject); -begin - FImageListEditor.ApplyChanges; -end; - -procedure TcxImageListEditorForm.actExportAsBitmapExecute(Sender: TObject); -begin - spdSave.DefaultExt := '*.bmp'; - spdSave.Filter := 'Bitmaps (*.bmp)|*.bmp'; - if spdSave.Execute then - FImageListEditor.ExportImages(spdSave.FileName, itBitmap); -end; - -procedure TcxImageListEditorForm.actExportAsPNGExecute(Sender: TObject); -begin - spdSave.DefaultExt := '*.png'; - spdSave.Filter := 'PNG (*.png)|*.png'; - if spdSave.Execute then - FImageListEditor.ExportImages(spdSave.FileName, itPNG); -end; - -procedure TcxImageListEditorForm.actExportExecute(Sender: TObject); -begin - // (don't remove this method) -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxImportDialog.dfm b/internal/x.46/ExpressLibrary/Sources/cxImportDialog.dfm deleted file mode 100644 index 9eb24247..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxImportDialog.dfm +++ /dev/null @@ -1,146 +0,0 @@ -object cxImportDialogForm: TcxImportDialogForm - Left = 288 - Top = 203 - BorderIcons = [biSystemMenu] - BorderStyle = bsSingle - Caption = 'Import' - ClientHeight = 367 - ClientWidth = 546 - Color = clBtnFace - OldCreateOrder = False - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Panel1: TPanel - Left = 141 - Top = 0 - Width = 113 - Height = 367 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object Button1: TButton - Left = 12 - Top = 8 - Width = 89 - Height = 25 - Caption = 'Import' - Enabled = False - TabOrder = 0 - OnClick = Button1Click - end - object Button2: TButton - Left = 12 - Top = 40 - Width = 89 - Height = 25 - Cancel = True - Caption = 'Close' - ModalResult = 2 - TabOrder = 1 - end - object Button3: TButton - Left = 12 - Top = 332 - Width = 89 - Height = 25 - Caption = 'Options >>' - TabOrder = 2 - OnClick = Button3Click - end - end - object ListBox1: TListBox - Left = 0 - Top = 0 - Width = 141 - Height = 367 - Align = alLeft - ItemHeight = 13 - TabOrder = 1 - OnClick = ListBox1Click - OnDblClick = ListBox1DblClick - end - object StylesPane: TPanel - Left = 254 - Top = 0 - Width = 292 - Height = 367 - Align = alClient - TabOrder = 2 - object PageControl1: TPageControl - Left = 1 - Top = 1 - Width = 290 - Height = 365 - ActivePage = TabSheet2 - Align = alClient - TabOrder = 0 - TabStop = False - object TabSheet2: TTabSheet - Caption = 'Styles' - ImageIndex = 1 - OnShow = TabSheet2Show - object GroupBox2: TGroupBox - Left = 0 - Top = 36 - Width = 282 - Height = 301 - Align = alBottom - Caption = ' StyleRepository Options ' - TabOrder = 1 - object RadioButton1: TRadioButton - Left = 16 - Top = 28 - Width = 169 - Height = 17 - Caption = 'Create New StyleRepository' - Checked = True - TabOrder = 0 - TabStop = True - OnClick = RadioButton1Click - end - object RadioButton2: TRadioButton - Left = 16 - Top = 100 - Width = 173 - Height = 17 - Caption = 'Use Existing StyleRepository' - TabOrder = 2 - OnClick = RadioButton2Click - end - object Edit1: TEdit - Left = 36 - Top = 52 - Width = 229 - Height = 21 - TabOrder = 1 - end - object ComboBox1: TComboBox - Left = 36 - Top = 124 - Width = 229 - Height = 21 - Style = csDropDownList - Color = clBtnFace - Enabled = False - ItemHeight = 13 - TabOrder = 3 - end - end - object cbImportStyles: TCheckBox - Left = 4 - Top = 8 - Width = 97 - Height = 17 - Caption = 'Import Styles' - Checked = True - State = cbChecked - TabOrder = 0 - OnClick = cbImportStylesClick - end - end - end - end -end diff --git a/internal/x.46/ExpressLibrary/Sources/cxImportDialog.pas b/internal/x.46/ExpressLibrary/Sources/cxImportDialog.pas deleted file mode 100644 index 9e083952..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxImportDialog.pas +++ /dev/null @@ -1,392 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxImportDialog; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - DesignIntf, Variants, -{$ELSE} - DsgnIntf, -{$ENDIF} - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, StdCtrls, ComCtrls, ExtCtrls, cxConverterFactory, TypInfo, cxStyles, - cxDesignWindows; - -type - TcxImportDialogForm = class(TForm) - Panel1: TPanel; - Button1: TButton; - Button2: TButton; - Button3: TButton; - ListBox1: TListBox; - StylesPane: TPanel; - PageControl1: TPageControl; - TabSheet2: TTabSheet; - GroupBox2: TGroupBox; - RadioButton1: TRadioButton; - RadioButton2: TRadioButton; - Edit1: TEdit; - ComboBox1: TComboBox; - cbImportStyles: TCheckBox; - procedure Button3Click(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure ListBox1Click(Sender: TObject); - procedure Button1Click(Sender: TObject); - procedure ListBox1DblClick(Sender: TObject); - procedure cbImportStylesClick(Sender: TObject); - procedure RadioButton1Click(Sender: TObject); - procedure RadioButton2Click(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure TabSheet2Show(Sender: TObject); - private - FDesigner: IDesigner; - FDestination: TObject; - FGroupConverterName: string; - FStyleOptionsFirstShow: Boolean; - FStylePaneWidth: Integer; - procedure DisableStylesOptions; - procedure DoImport; - procedure EnableStylesOptions; - function GetStylePaneWidth: Integer; - function GetConverterIndex(ASource: TObject): Integer; - function IsParent(ASource: TObject; const AParentClassName: string): Boolean; - procedure LoadComponent(const S: string); - procedure LoadStyleRepositories(const S: string); - procedure ShowStyleOptions; - procedure UpdateComboBox; - protected - function GetConverterClass(ASource: TObject): TcxCustomConverterWithStylesClass; - function GetConverterName(ASource: TObject): string; - procedure InitializeConverter(AConverter: TcxCustomConverterWithStyles); virtual; - procedure InitializeOptions; virtual; - public - constructor Create(AOwner: TComponent); override; - property Designer_: IDesigner read FDesigner write FDesigner; - property Destination: TObject read FDestination write FDestination; - property GroupConverterName: string read FGroupConverterName write FGroupConverterName; - end; - - procedure ShowImportDialog(ADesigner: IDesigner; - ADestination: TObject; const AGroupConverterName: string; AShowOptionsButton: Boolean = True); - -implementation - -{$R *.dfm} - -const - scxStyleRepositoryClassName = 'TcxStyleRepository'; - -procedure ShowImportDialog(ADesigner: IDesigner; - ADestination: TObject; const AGroupConverterName: string; AShowOptionsButton: Boolean); -begin - with TcxImportDialogForm.Create(Application) do - try - Button3.Visible := AShowOptionsButton; - Width := Width - GetStylePaneWidth; - Destination := ADestination; - GroupConverterName := AGroupConverterName; - Designer_ := ADesigner; - ShowModal; - ADesigner.Modified; - finally - Free; - end; -end; - -{ TcxImportDialogForm } - -constructor TcxImportDialogForm.Create(AOwner: TComponent); -begin - inherited; - FStylePaneWidth := StylesPane.Width; -end; - -procedure TcxImportDialogForm.Button3Click(Sender: TObject); -begin - InitializeOptions; - Width := Width + GetStylePaneWidth; - Button3.Enabled := False; -end; - -function TcxImportDialogForm.GetConverterClass(ASource: TObject): TcxCustomConverterWithStylesClass; -var - AIndex: Integer; -begin - AIndex := GetConverterIndex(ASource); - if AIndex <> -1 then - Result := ConverterFactory(FGroupConverterName).Items[AIndex].Class_ - else - Result := TcxCustomConverterWithStyles; -end; - -function TcxImportDialogForm.GetConverterName(ASource: TObject): string; -var - AIndex: Integer; -begin - AIndex := GetConverterIndex(ASource); - if AIndex <> -1 then - Result := ConverterFactory(FGroupConverterName).Items[AIndex].Name - else - Result := ''; -end; - -procedure TcxImportDialogForm.InitializeConverter(AConverter: TcxCustomConverterWithStyles); -begin -end; - -procedure TcxImportDialogForm.InitializeOptions; -begin - ShowStyleOptions; -end; - -procedure TcxImportDialogForm.DisableStylesOptions; -begin - RadioButton1.Enabled := False; - RadioButton2.Enabled := False; - Edit1.Enabled := False; - Edit1.Color := clBtnFace; - ComboBox1.Enabled := False; - ComboBox1.Color := clBtnFace; -end; - -procedure TcxImportDialogForm.DoImport; -var - AConverter: TcxCustomConverterWithStyles; -begin - if (ListBox1.ItemIndex <> -1) and (FDestination <> nil) then - begin - AConverter := GetConverterClass(ListBox1.Items.Objects[ListBox1.ItemIndex]).Create(FDestination); - try - AConverter.Designer_ := Designer_; - AConverter.ConvertWithStyles := cbImportStyles.Checked; - if cbImportStyles.Checked then - begin - if RadioButton1.Checked then - AConverter.NameOfNewStyleRepository := Edit1.Text - else - AConverter.StyleRepository := ComboBox1.Items.Objects[ComboBox1.ItemIndex] as TcxStyleRepository; - end; - InitializeConverter(AConverter); - Button1.Enabled := False; - AConverter.ImportFrom(ListBox1.Items.Objects[ListBox1.ItemIndex]); - finally - Button1.Enabled := True; - AConverter.Free; - if RadioButton1.Checked then - UpdateComboBox; - if cbImportStyles.Checked then - EnableStylesOptions; - end; - end; -end; - -procedure TcxImportDialogForm.EnableStylesOptions; -begin - RadioButton1.Enabled := True; - if ComboBox1.Items.Count > 0 then - begin - RadioButton2.Enabled := True; - if RadioButton1.Checked then - begin - Edit1.Enabled := True; - Edit1.Color := clWindow; - ComboBox1.Enabled := False; - ComboBox1.Color := clBtnFace; - end - else - begin - Edit1.Enabled := False; - Edit1.Color := clBtnFace; - ComboBox1.Enabled := True; - ComboBox1.Color := clWindow; - end; - end - else - begin - RadioButton2.Enabled := False; - RadioButton1.Checked := True; - Edit1.Enabled := True; - Edit1.Color := clWindow; - ComboBox1.Enabled := False; - ComboBox1.Color := clBtnFace; - end; -end; - -function TcxImportDialogForm.GetStylePaneWidth: Integer; -begin - Result := FStylePaneWidth; -end; - -function TcxImportDialogForm.GetConverterIndex(ASource: TObject): Integer; -var - I: Integer; - ASourceClassName: string; -begin - Result := -1; - ASourceClassName := ASource.ClassName; - with ConverterFactory(FGroupConverterName) do - begin - for I := 0 to Count - 1 do - begin - if (Items[I].Class_.GetSourceClassName = ASourceClassName) or - IsParent(ASource, Items[I].Class_.GetSourceClassName) then - begin - Result := I; - Break; - end; - end; - end; -end; - -function TcxImportDialogForm.IsParent(ASource: TObject; const AParentClassName: string): Boolean; -var - AParentClass: TClass; -begin - Result := False; - AParentClass := ASource.ClassParent; - while AParentClass <> nil do - begin - if AParentClass.ClassName = AParentClassName then - begin - Result := True; - Exit; - end; - AParentClass := AParentClass.ClassParent; - end; -end; - -procedure TcxImportDialogForm.LoadComponent(const S: string); -var - AComponent: TComponent; -begin - if FDesigner <> nil then - begin - AComponent := FDesigner.GetComponent(S); - if AComponent <> nil then - if GetConverterIndex(AComponent) <> -1 then - ListBox1.Items.AddObject(S, AComponent); - end; -end; - -procedure TcxImportDialogForm.LoadStyleRepositories(const S: string); -var - AComponent: TComponent; -begin - AComponent := FDesigner.GetComponent(S); - if AComponent <> nil then - if AComponent.ClassName = scxStyleRepositoryClassName then - ComboBox1.Items.AddObject(S, AComponent); -end; - -procedure TcxImportDialogForm.ShowStyleOptions; -begin - if FStyleOptionsFirstShow then - begin - UpdateComboBox; - EnableStylesOptions; - FStyleOptionsFirstShow := False; - end; -end; - -procedure TcxImportDialogForm.UpdateComboBox; -var - AIndex: Integer; -begin - AIndex := 0; - if ComboBox1.Items.Count > 0 then - AIndex := ComboBox1.ItemIndex; - ComboBox1.Clear; - FDesigner.GetComponentNames(GetTypeData(PTypeInfo(TComponent.ClassInfo)), LoadStyleRepositories); - if ComboBox1.Items.Count > 0 then - ComboBox1.ItemIndex := AIndex; - Edit1.Text := FDesigner.UniqueName(scxStyleRepositoryClassName); -end; - -procedure TcxImportDialogForm.FormShow(Sender: TObject); -begin - ListBox1.Items.Clear; - Edit1.Text := FDesigner.UniqueName(scxStyleRepositoryClassName); - FDesigner.GetComponentNames(GetTypeData(PTypeInfo(TComponent.ClassInfo)), LoadComponent); -end; - -procedure TcxImportDialogForm.ListBox1Click(Sender: TObject); -begin - if ListBox1.ItemIndex <> -1 then - Button1.Enabled := True; -end; - -procedure TcxImportDialogForm.Button1Click(Sender: TObject); -begin - DoImport; -end; - -procedure TcxImportDialogForm.ListBox1DblClick(Sender: TObject); -begin - DoImport; -end; - -procedure TcxImportDialogForm.cbImportStylesClick(Sender: TObject); -begin - if cbImportStyles.Checked then - EnableStylesOptions - else - DisableStylesOptions; -end; - -procedure TcxImportDialogForm.RadioButton1Click(Sender: TObject); -begin - EnableStylesOptions; -end; - -procedure TcxImportDialogForm.RadioButton2Click(Sender: TObject); -begin - EnableStylesOptions; -end; - -procedure TcxImportDialogForm.FormCreate(Sender: TObject); -begin - FStyleOptionsFirstShow := True; -end; - -procedure TcxImportDialogForm.TabSheet2Show(Sender: TObject); -begin - ShowStyleOptions; -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxLibraryConsts.pas b/internal/x.46/ExpressLibrary/Sources/cxLibraryConsts.pas deleted file mode 100644 index 83bd0444..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxLibraryConsts.pas +++ /dev/null @@ -1,149 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxLibraryConsts; - -{$I cxVer.inc} - -interface - -const - // Cursors - // cxControls - crBase = 2100; - crDragCopy = crBase; - crcxRemove = crBase + 8; - crcxVertSize = crBase + 9; - crcxHorzSize = crBase + 10; - crcxDragMulti = crBase + 11; - crcxNoDrop = crBase + 12; - crcxDrag = crBase + 13; - crcxColorPicker = crBase + 14; - crcxHandPoint = -crBase + 1; - crcxMultiDragCopy = crBase + 15; - - // dxNavBar - dxNavBarDragCursor = -1120; - dxNavBarDragCopyCursor = -1119; - dxNavBarLinksCursor = -1118; - - // dxBars - crdxBarDrag = 1041; - crdxBarDragCopy = 1042; - crdxBarDragNoDrop = 1043; - crdxBarEditSizing = 1044; - - // dxSideBar - dxSideBarDragCursor = -1121; - dxSideBarDragCopyCursor = -1122; - dxSideBarDragDeleteCursor = -1123; - dxSideBarGroupCursor = -1125; - - // dxLayout - dxLayoutControlCursorBase = 3000; - crdxLayoutControlDrag = dxLayoutControlCursorBase + 1; // for ver. 1 - crdxLayoutControlNoDrop = dxLayoutControlCursorBase + 2; // for ver. 2 - crdxLayoutControlRemove = dxLayoutControlCursorBase + 3; // for ver. 2 - - // cxEdit - crcxEditBase = 4101; - crcxEditMouseWheel = crcxEditBase; - - // cxGrid - crcxGridBase = 4000; - crcxGridHorzSize: Integer = crcxGridBase + 1; - crcxGridVertSize: Integer = crcxGridBase + 2; - crcxGridRemove: Integer = crcxGridBase + 3; - crcxGridNoDrop: Integer = crcxGridBase + 4; - crcxGridDrag: Integer = crcxGridBase + 5; - crcxGridMultiDrag: Integer = crcxGridBase + 6; - crcxGridSelectRow: Integer = crcxGridBase + 7; - crcxGridMagnifier = crcxGridBase + 50; -// crcxGridDrag = crcxGridBase + 51; - - // cxScheduler - crSchedulerCopyEvent = 4201; - crSchedulerMoveEvent = 4202; - crSchedulerHorzSplit = 4203; - crSchedulerVertSplit = 4204; - crSchedulerSplitAll = 4205; - crSchedulerVertResize = 4206; - crSchedulerHorzResize = 4207; - crCalendarMirrorArrow = 4208; - crTaskLink = 4209; - - // cxPivotGrid - crcxPivotGridBase = 4300; - crcxPivotGridArrow: Integer = crcxPivotGridBase + 1; - crcxPivotGridHorzSize: Integer = crcxPivotGridBase + 2; - crcxPivotGridNoDrop: Integer = crcxPivotGridBase + 3; - crcxPivotGridRemove: Integer = crcxPivotGridBase + 4; - - // cxSpreadSheet - crSSSelect = 3200; - - // cxVerticalGrid - crcxInspectorInsert = -1228; - crcxInspectorAddChild = -1229; - crcxInspectorAdd = -1230; - crcxInspectorHide = -1241; - crcxInspectorNoDrag = -1242; - - // dxTree - crdxTreeDrag = -1011; - - // dxFlowChart - crFlChartZoomIn = 2001; - crFlChartZoomOut = 2002; - - // dxMasterView - crdxMasterViewMirror = 1501; - crdxMasterViewFullScroll = 1502; - crdxMasterViewHorScroll = 1503; - crdxMasterViewVerScroll = 1504; - crdxMasterViewUpScroll = 1505; - crdxMasterViewRightScroll = 1506; - crdxMasterViewDownScroll = 1507; - crdxMasterViewLeftScroll = 1508; - crdxMasterViewHorSize = 1509; - crdxMasterViewVerSize = 1512; - crdxMasterViewRemove = 1510; - crdxMasterViewNoDrop = 1511; - -implementation - -end. - diff --git a/internal/x.46/ExpressLibrary/Sources/cxLibraryReg.dcr b/internal/x.46/ExpressLibrary/Sources/cxLibraryReg.dcr deleted file mode 100644 index 18072315..00000000 Binary files a/internal/x.46/ExpressLibrary/Sources/cxLibraryReg.dcr and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Sources/cxLibraryReg.pas b/internal/x.46/ExpressLibrary/Sources/cxLibraryReg.pas deleted file mode 100644 index 0f35f0fb..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxLibraryReg.pas +++ /dev/null @@ -1,1285 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxLibraryReg; - -{$I cxVer.inc} - -interface - -uses - SysUtils, Forms, Classes, Controls, Menus, TypInfo, -{$IFDEF DELPHI6} - DesignIntf, DesignEditors, DesignConst, DesignMenus, -{$ELSE} - DsgnIntf, SysConst, -{$ENDIF} - cxPropertiesStore, cxPropertiesStoreEditor, - PicEdit, dxGDIPlusAPI, dxGDIPlusClasses, - cxContainer, cxLookAndFeels, - cxDesignWindows, cxStyleRepositoryEditor, cxImageListEditor, cxStyles, - cxControls, cxLookAndFeelPainters, dxCoreReg; - -const - dxLibraryProductPage = 'Dev Express'; - - sdxBitmapAndPNGFilter = 'All (*.bmp;*.png)|*.bmp;*.png|Bitmaps (*.bmp)|*.bmp|PNG graphics from DevExpress (*.png)|*.png'; - -type -{$IFNDEF DELPHI6} - TGetPropProc = TGetPropEditProc; -{$ENDIF} - - TcxDefaultEditor = class(TDefaultEditor) - private - function GetBaseVerbCount: Integer; - protected - function GetProductMajorVersion: string; virtual; abstract; - function GetProductMinorVersion: string; virtual; - function GetProductName: string; virtual; abstract; - function InternalGetVerb(AIndex: Integer): string; virtual; - function InternalGetVerbCount: Integer; virtual; - public - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - end; - - { TcxControlPopupMenuProperty } - - TcxControlPopupMenuProperty = class(TComponentProperty) - private - FProc: TGetStrProc; - procedure CheckComponent(const Value: string); - public - procedure GetValues(Proc: TGetStrProc); override; - end; - - { TcxBitmapGraphicProperty } - - TcxBitmapGraphicProperty = class(TGraphicProperty) - private - procedure OnShowPicEdit(Sender: TObject); - protected - function BuildFilter: string; virtual; - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure SetValue(const Value: string); override; - end; - - TcxBitmapProperty = class(TcxBitmapGraphicProperty) - protected - function BuildFilter: string; override; - end; - - TcxFilenameProperty = class(TStringProperty) - protected - function GetFilter: string; virtual; - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - - TcxLocalizerFilenameProperty = class(TcxFilenameProperty) - protected - function GetFilter: string; override; - end; - -procedure HideClassProperties(AClass: TClass; APropertyNames: array of string); -procedure Register; - -implementation - -{$R dxSplash.res} - -uses -{$IFDEF DELPHI6} - VCLEditors, - Types, -{$ENDIF} - Windows, Math, Graphics, Dialogs, ImgList, cxGraphics, cxPropEditors, - cxClasses, cxLocalization, dxCore, ToolsApi; - -const - cxLibraryMajorVersion = '6'; - -type - TcxContainerAccess = class(TcxContainer); - - { TcxLibraryComponentEditor } - - TcxLibraryComponentEditor = class(TdxComponentEditor) - protected - function GetProductMajorVersion: string; override; - function GetProductName: string; override; - end; - - { TcxLookAndFeelControllerEditor } - - TcxLookAndFeelControllerEditor = class(TcxLibraryComponentEditor) - private - function GetLookAndFeelController: TcxLookAndFeelController; - protected - function InternalGetVerb(AIndex: Integer): string; override; - function InternalGetVerbCount: Integer; override; - procedure InternalExecuteVerb(AIndex: Integer); override; - public - procedure Edit; override; - end; - - { TcxStyleRepositoryComponentEditor } - - TcxStyleRepositoryComponentEditor = class(TcxLibraryComponentEditor) - private - function GetStyleRepository: TcxStyleRepository; - protected - function InternalGetVerb(AIndex: Integer): string; override; - function InternalGetVerbCount: Integer; override; - procedure InternalExecuteVerb(AIndex: Integer); override; - end; - - { TcxPropertiesStoreComponentEditor } - - TcxPropertiesStoreComponentEditor = class(TcxLibraryComponentEditor) - private - function GetPropertiesStore: TcxPropertiesStore; - property PropertiesStore: TcxPropertiesStore read GetPropertiesStore; - protected - function InternalGetVerb(AIndex: Integer): string; override; - function InternalGetVerbCount: Integer; override; - procedure InternalExecuteVerb(AIndex: Integer); override; - end; - - { TcxImageListComponentEditor } - - TcxImageListComponentEditor = class(TcxLibraryComponentEditor) - private - function GetImageList: TcxImageList; - protected - function IsAssignable: Boolean; override; - procedure DoAssign(AObject: TObject); override; - function GetAssignTypeClass: TClass; override; - - function InternalGetVerb(AIndex: Integer): string; override; - function InternalGetVerbCount: Integer; override; - procedure InternalExecuteVerb(AIndex: Integer); override; - - property ImageList: TcxImageList read GetImageList; - end; - - { TcxLocalizerLocaleProperty } - - TcxLocalizerLocaleProperty = class(TStringProperty) - private - function GetLocalizer: TcxLocalizer; - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - - property Localizer: TcxLocalizer read GetLocalizer; - end; - - { TcxContainerStyleProperty } - - TcxContainerStyleProperty = class(TClassProperty) - private - FProc: TGetPropProc; - procedure GetPropProc({$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); - public - procedure GetProperties(Proc: TGetPropProc); override; - end; - - { TcxContainerStyleAssignedValuesProperty } - - TcxContainerStyleAssignedValuesProperty = class(TSetProperty) - protected - procedure FillVisiblePropertiesList(AList: TStringList); - public - procedure GetProperties(Proc: TGetPropProc); override; - function GetValue: string; override; - end; - - { TcxContainerStyleAssignedValuesElementProperty } - - TcxContainerStyleAssignedValuesElementProperty = class(TSetElementProperty) -{$IFNDEF DELPHI6} - private - FElement: Integer; - protected - constructor Create(Parent: TPropertyEditor; AElement: Integer); - property Element: Integer read FElement; -{$ENDIF} - public - function GetName: string; override; - end; - - { TcxLookAndFeelProperty } - - TcxLookAndFeelProperty = class(TClassProperty) - private - FProc: TGetPropProc; - procedure GetPropProc({$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); - public - procedure GetProperties(Proc: TGetPropProc); override; - end; - - { TcxLookAndFeelAssignedValuesProperty } - - TcxLookAndFeelAssignedValuesProperty = class(TSetProperty) - protected - FProc: TGetPropProc; - procedure GetPropProc({$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); - public - procedure GetProperties(Proc: TGetPropProc); override; - end; - -{ TcxLibraryComponentEditor } - -function TcxLibraryComponentEditor.GetProductMajorVersion: string; -begin - Result := cxLibraryMajorVersion; -end; - -function TcxLibraryComponentEditor.GetProductName: string; -begin - Result := 'ExpressLibrary'; -end; - -{ TcxLookAndFeelControllerEditor } - -procedure TcxLookAndFeelControllerEditor.Edit; -begin -end; - -function TcxLookAndFeelControllerEditor.InternalGetVerb(AIndex: Integer): string; -begin - if AIndex = 0 then - Result := 'Reset'; -end; - -function TcxLookAndFeelControllerEditor.InternalGetVerbCount: Integer; -begin - Result := 1; -end; - -procedure TcxLookAndFeelControllerEditor.InternalExecuteVerb(AIndex: Integer); -begin - case AIndex of - 0: - begin - with GetLookAndFeelController do - begin - Kind := cxDefaultLookAndFeelKind; - NativeStyle := cxDefaultLookAndFeelNativeStyle; - end; - Designer.Modified; - end; - end; -end; - -function TcxLookAndFeelControllerEditor.GetLookAndFeelController: TcxLookAndFeelController; -begin - Result := Component as TcxLookAndFeelController; -end; - -{ TcxStyleRepositoryComponentEditor } - -function TcxStyleRepositoryComponentEditor.InternalGetVerb(AIndex: Integer): string; -begin - if AIndex = 0 then - Result := 'Edit...' -end; - -function TcxStyleRepositoryComponentEditor.InternalGetVerbCount: Integer; -begin - Result := 1; -end; - -procedure TcxStyleRepositoryComponentEditor.InternalExecuteVerb(AIndex: Integer); -begin - if AIndex = 0 then - ShowStyleRepositoryEditor(Designer, GetStyleRepository); -end; - -function TcxStyleRepositoryComponentEditor.GetStyleRepository: TcxStyleRepository; -begin - Result := Component as TcxStyleRepository; -end; - -{ TcxStyleSheetComponentProperty } - -type - TcxStyleSheetComponentProperty = class(TComponentProperty) - private - FStrProc: TGetStrProc; - procedure StrProc(const S: string); - public - procedure GetValues(Proc: TGetStrProc); override; - end; - -procedure TcxStyleSheetComponentProperty.StrProc(const S: string); -begin - if TcxStyles(GetComponent(0)).IsValidStyleSheet(TcxCustomStyleSheet(Designer.GetComponent(S))) then - FStrProc(S); -end; - -procedure TcxStyleSheetComponentProperty.GetValues(Proc: TGetStrProc); -begin - FStrProc := Proc; - Designer.GetComponentNames(GetTypeData(GetPropType), StrProc); -end; - -{ TcxPropertiesStoreComponentEditor } - -function TcxPropertiesStoreComponentEditor.InternalGetVerb(AIndex: Integer): string; -begin - case AIndex of - 0: Result := 'Edit...'; - 1: Result := '-'; - 2: Result := 'Store'; - 3: Result := 'Restore'; - end; -end; - -function TcxPropertiesStoreComponentEditor.InternalGetVerbCount: Integer; -begin - Result := 4; -end; - -procedure TcxPropertiesStoreComponentEditor.InternalExecuteVerb(AIndex: Integer); - - procedure DsgnStoreTo; - var - AActive: Boolean; - begin - AActive := PropertiesStore.Active; - PropertiesStore.Active := True; - PropertiesStore.StoreTo; - PropertiesStore.Active := AActive; - end; - - procedure DsgnRestoreFrom; - var - AActive: Boolean; - begin - AActive := PropertiesStore.Active; - PropertiesStore.Active := True; - PropertiesStore.RestoreFrom; - PropertiesStore.Active := AActive; - end; - -begin - case AIndex of - 0: ShowPropertiesStoreEditor(PropertiesStore, Designer.Root, Designer); - 2: DsgnStoreTo; - 3: DsgnRestoreFrom; - end; -end; - -function TcxPropertiesStoreComponentEditor.GetPropertiesStore: TcxPropertiesStore; -begin - Result := Component as TcxPropertiesStore; -end; - -{ TcxImageListComponentEditor } - -procedure TcxImageListComponentEditor.InternalExecuteVerb(AIndex: Integer); - - procedure Edit; - begin - if cxEditImageList(ImageList, FAssignableObjects) then - Designer.Modified; - end; - -begin - if (AIndex = 0) then - Edit; -end; - -function TcxImageListComponentEditor.InternalGetVerb(AIndex: Integer): string; -begin - if AIndex = 0 then - Result := 'Edit...' -end; - -function TcxImageListComponentEditor.InternalGetVerbCount: Integer; -begin - Result := 1; -end; - -function TcxImageListComponentEditor.IsAssignable: Boolean; -begin - Result := True; -end; - -procedure TcxImageListComponentEditor.DoAssign(AObject: TObject); -var - AImages: TCustomImageList; -begin - AImages := AObject as TCustomImageList; - - ImageList.Assign(AImages); - if (AImages.ClassName = 'TPngImageList') and CheckGdiPlus then - begin - ImageList.Clear; - PngImageListTocxImageList(AImages, ImageList); - end; - Designer.Modified; -end; - -function TcxImageListComponentEditor.GetAssignTypeClass: TClass; -begin - Result := TCustomImageList; -end; - -function TcxImageListComponentEditor.GetImageList: TcxImageList; -begin - Result := Component as TcxImageList; -end; - -{ TcxLocalizerLocaleProperty } - -function TcxLocalizerLocaleProperty.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes - [paReadOnly] + [paValueList]; -end; - -function TcxLocalizerLocaleProperty.GetValue: string; -begin - Result := Localizer.Language; -end; - -procedure TcxLocalizerLocaleProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - with Localizer do - begin - Proc(ANoActiveLanguage); - for I := 0 to Languages.Count - 1 do - Proc(Languages[I].Name); - end; -end; - -procedure TcxLocalizerLocaleProperty.SetValue(const Value: string); -begin - with Localizer do - begin - Language := Value; - SetOrdValue(Locale); - end; -end; - -function TcxLocalizerLocaleProperty.GetLocalizer: TcxLocalizer; -begin - Result := TcxLocalizer(GetComponent(0)); -end; - -{ TcxContainerStyleProperty } - -procedure TcxContainerStyleProperty.GetProperties(Proc: TGetPropProc); -begin - FProc := Proc; - inherited GetProperties(GetPropProc); -end; - -procedure TcxContainerStyleProperty.GetPropProc({$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); -var - I: Integer; -begin - for I := 0 to PropCount - 1 do - if not TcxContainer(GetComponent(I)).IsStylePropertyPublished(Prop.GetName, GetName <> 'Style') then - Exit; - FProc(Prop); -end; - -{ TcxContainerStyleAssignedValuesProperty } - -procedure TcxContainerStyleAssignedValuesProperty.GetProperties(Proc: TGetPropProc); -var - AStyleValueList: TStringList; - I, AValue: Integer; -begin - AStyleValueList := TStringList.Create; - try - FillVisiblePropertiesList(AStyleValueList); - for I := 0 to AStyleValueList.Count - 1 do - begin - AValue := TcxContainerStyleValue(AStyleValueList.Objects[I]); - Proc(TcxContainerStyleAssignedValuesElementProperty.Create(Self, AValue)); - end; - finally - AStyleValueList.Free; - end; -end; - -function TcxContainerStyleAssignedValuesProperty.GetValue: string; -var - AStyleValues: TcxContainerStyleValues; - AStyleValueList: TStringList; - I: Integer; -begin - Integer(AStyleValues) := GetOrdValue; - Result := ''; - AStyleValueList := TStringList.Create; - try - FillVisiblePropertiesList(AStyleValueList); - for I := 0 to AStyleValueList.Count - 1 do - if TcxContainerStyleValue(AStyleValueList.Objects[I]) in AStyleValues then - Result := Result + AStyleValueList[I] + ','; - Delete(Result, Length(Result), 1); - Result := '[' + Result + ']'; - finally - AStyleValueList.Free; - end; -end; - -procedure TcxContainerStyleAssignedValuesProperty.FillVisiblePropertiesList( - AList: TStringList); - - procedure FillStyleValueList(AStyle: TcxContainerStyle; - AStyleValueList: TStringList); - var - APropertyCount, AStyleValueIndex, I: Integer; - APPropList: PPropList; - AStyleValue: TcxContainerStyleValue; - begin - APropertyCount := GetPropList(PTypeInfo(AStyle.ClassInfo), [tkUnknown..tkDynArray], nil); - if APropertyCount = 0 then Exit; - GetMem(APPropList, APropertyCount * SizeOf(Pointer)); - try - GetPropList(PTypeInfo(AStyle.ClassInfo), [tkUnknown..tkDynArray], APPropList); - for I := 0 to APropertyCount - 1 do - begin - if not AStyle.GetStyleValue(dxShortStringToString(APPropList[I].Name), AStyleValue) then - Continue; - if (AStyle.Container = nil) and ((AStyle.State = csNormal) or AStyle.IsExtendedStylePropertyPublished(dxShortStringToString(APPropList[I].Name))) or - (AStyle.Container <> nil) and AStyle.Container.IsStylePropertyPublished(dxShortStringToString(APPropList[I].Name), AStyle.State <> csNormal) then - begin - AStyleValueIndex := AStyleValueList.IndexOf(dxShortStringToString(APPropList[I].Name)); - if AStyleValueIndex = -1 then - AStyleValueList.AddObject(dxShortStringToString(APPropList[I].Name), TObject(1)) - else - AStyleValueList.Objects[AStyleValueIndex] := - TObject(Integer(AStyleValueList.Objects[AStyleValueIndex]) + 1); - end; - end; - finally - FreeMem(APPropList); - end; - end; - -var - AStyleValue: TcxContainerStyleValue; - I: Integer; -begin - for I := 0 to PropCount - 1 do - FillStyleValueList(TcxContainerStyle(GetComponent(I)), AList); - AList.Sort; - - for I := AList.Count - 1 downto 0 do - if Integer(AList.Objects[I]) <> PropCount then - AList.Delete(I) - else - begin - TcxContainerStyle(GetComponent(0)).GetStyleValue(AList[I], AStyleValue); - AList.Objects[I] := TObject(AStyleValue); - end; -end; - -{ TcxContainerStyleAssignedValuesElementProperty } - -function TcxContainerStyleAssignedValuesElementProperty.GetName: string; -begin - TcxContainerStyle(GetComponent(0)).GetStyleValueName(Element, Result); -end; - -{$IFNDEF DELPHI6} -constructor TcxContainerStyleAssignedValuesElementProperty.Create(Parent: TPropertyEditor; - AElement: Integer); -begin - inherited Create(Parent, AElement); - FElement := AElement; -end; -{$ENDIF} - -{ TcxDefaultEditor } - -function TcxDefaultEditor.GetVerb(Index: Integer): string; -begin - if Index < InternalGetVerbCount then - Result := InternalGetVerb(Index) - else - begin - Index := Index - InternalGetVerbCount; - case Index of - 0: Result := '-'; - 1: Result := GetProductName + ' ' + Format('%s.%s', [GetProductMajorVersion, GetProductMinorVersion]); - 2: Result := dxCompanyName; - 3: Result := dxCompanyURL; - end; - end; -end; - -function TcxDefaultEditor.GetVerbCount: Integer; -begin - Result := GetBaseVerbCount + InternalGetVerbCount; -end; - -function TcxDefaultEditor.InternalGetVerb(AIndex: Integer): string; -begin - Result := ''; -end; - -function TcxDefaultEditor.GetProductMinorVersion: string; -begin - Result := IntToStr(dxBuildNumber); -end; - -function TcxDefaultEditor.InternalGetVerbCount: Integer; -begin - Result := 0; -end; - -function TcxDefaultEditor.GetBaseVerbCount: Integer; -begin - Result := 4; -end; - -{ TcxControlPopupMenuProperty } - -procedure TcxControlPopupMenuProperty.GetValues(Proc: TGetStrProc); -begin - FProc := Proc; - inherited GetValues(CheckComponent); -end; - -procedure TcxControlPopupMenuProperty.CheckComponent(const Value: string); -var - AComponent: TComponent; - AIcxPopupMenu: IcxPopupMenu; -begin - AComponent := Designer.GetComponent(Value); - if AComponent <> nil then - begin - if (AComponent is TPopupMenu) or - Supports(AComponent, IcxPopupMenu, AIcxPopupMenu) then - FProc(Value); - end; -end; - -{ TcxLookAndFeelProperty } - -procedure TcxLookAndFeelProperty.GetProperties(Proc: TGetPropProc); -begin - FProc := Proc; - inherited GetProperties(GetPropProc); -end; - -procedure TcxLookAndFeelProperty.GetPropProc( - {$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); -var - I: Integer; -begin - for I := 0 to PropCount - 1 do - if SameText(Prop.GetName, 'SkinName') and - (not ClassSupportsSkinProc(GetComponent(0)) or (GetExtendedStylePainters.Count = 0)) then Exit; - FProc(Prop); -end; - -{ TcxLookAndFeelAssignedValuesProperty } - -procedure TcxLookAndFeelAssignedValuesProperty.GetProperties(Proc: TGetPropProc); -begin - FProc := Proc; - inherited GetProperties(GetPropProc); -end; - -procedure TcxLookAndFeelAssignedValuesProperty.GetPropProc( - {$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); -var - I: Integer; -begin - for I := 0 to PropCount - 1 do - if SameText(Prop.GetName, 'lfvSkinName') and - (not ClassSupportsSkinProc(TcxLookAndFeel(GetComponent(0)).Owner) or - (GetExtendedStylePainters.Count = 0)) then Exit; - FProc(Prop); -end; - -{ TcxStyleProperty } - -const - sCreateNewStyleInRepositoryBegin = ' nil then - Inc(AWidth, StylePreviewAreaWidth + StylePreviewAreaOffset); -end; - -procedure TcxStyleProperty.ListMeasureHeight(const Value: string; ACanvas: TCanvas; - var AHeight: Integer); -var - AComponent: TComponent; - AStyle: TcxStyle; - APrevFont: TFont; - - function GetItemHeight: Integer; - begin - Result := ACanvas.TextHeight('Qq') + - 2 * (StylePreviewOffset + StylePreviewBorderSize + StyleTextOffset); - end; - -begin - AComponent := Designer.GetComponent(Value); - if AComponent = nil then - Inc(AHeight) - else - if AComponent is TcxStyle then - begin - AStyle := TcxStyle(AComponent); - AHeight := GetItemHeight; - if svFont in AStyle.AssignedValues then - begin - APrevFont := TFont.Create; - APrevFont.Assign(ACanvas.Font); - ACanvas.Font := AStyle.Font; - AHeight := Max(AHeight, GetItemHeight); - ACanvas.Font := APrevFont; - APrevFont.Free; - end; - end; -end; - -procedure TcxStyleProperty.ListDrawValue(const Value: string; ACanvas: TCanvas; - const ARect: TRect; ASelected: Boolean); -const - PreviewText = 'Text Text Text Text Text'; -var - AStyle: TcxStyle; - APrevBkColor, APrevTextColor: COLORREF; - APrevFont: TFont; - - procedure SaveCanvasParams; - begin - APrevBkColor := GetBkColor(ACanvas.Handle); - APrevTextColor := GetTextColor(ACanvas.Handle); - APrevFont := TFont.Create; - APrevFont.Assign(ACanvas.Font); - end; - - procedure RestoreCanvasParams; - begin - ACanvas.Font := APrevFont; - APrevFont.Free; - SetBkColor(ACanvas.Handle, APrevBkColor); - SetTextColor(ACanvas.Handle, APrevTextColor); - end; - - function GetStyleNameRect: TRect; - begin - Result := ARect; - Inc(Result.Left, StylePreviewAreaWidth + StylePreviewAreaOffset + StyleTextOffset); - Result.Top := (Result.Top + Result.Bottom - ACanvas.TextHeight(Value)) div 2; - end; - - (*procedure DrawStyleAssignedValuesInfo; - const - StyleValuesText = 'BCFT'; - var - AInfoItemWidth, I, ATextX, ATextY: Integer; - AStyleValue: TcxStyleValue; - begin //!!! - //ACanvas.Font.Style := [fsBold]; - AInfoItemWidth := 0; - for I := 1 to Length(StyleValuesText) do - AInfoItemWidth := Max(AInfoItemWidth, ACanvas.TextWidth(StyleValuesText[I])); - - with GetStyleNameRect do - begin - ATextX := Left - 40; //!!! - ATextY := Top; - end; - - for AStyleValue := Low(TcxStyleValue) to High(TcxStyleValue) do - begin - if AStyleValue in AStyle.AssignedValues then - //ACanvas.Font.Style := [fsBold] - ACanvas.Font.Color := APrevFont.Color - else - ACanvas.Font.Color := clBtnFace; - //ACanvas.Font.Style := []; - ACanvas.TextOut(ATextX, ATextY, StyleValuesText[1 + Ord(AStyleValue)]); - Inc(ATextX, AInfoItemWidth); - end; - - //ACanvas.Font.Style := []; - end;*) - - function GetPreviewBounds: TRect; - begin - Result := ARect; - Result.Right := Result.Left + StylePreviewAreaWidth; - InflateRect(Result, -StylePreviewOffset, -StylePreviewOffset); - end; - - function GetPreviewClientBounds: TRect; - begin - Result := GetPreviewBounds; - InflateRect(Result, -StylePreviewBorderSize, -StylePreviewBorderSize); - end; - - procedure DrawPreviewBorder; - - function GetBorderColor: TColor; - begin - if AStyle.AssignedValues * [svBitmap, svColor] = [] then - if ColorToRGB(ACanvas.Brush.Color) = ColorToRGB(clBtnFace) then - Result := clBtnShadow - else - Result := clBtnFace - else - Result := clWindowText; - end; - - begin - ACanvas.Brush.Color := GetBorderColor; - ACanvas.FrameRect(GetPreviewBounds); - end; - - procedure DrawPreviewBackground; - var - R, ABitmapR: TRect; - AcxCanvas: TcxCanvas; - begin - R := GetPreviewClientBounds; - if svBitmap in AStyle.AssignedValues then - begin - ABitmapR := R; - if svColor in AStyle.AssignedValues then - ABitmapR.Right := (R.Left + R.Right) div 2; - AcxCanvas := TcxCanvas.Create(ACanvas); - AcxCanvas.FillRect(ABitmapR, AStyle.Bitmap); - AcxCanvas.Free; - R.Left := ABitmapR.Right; - end; - if svColor in AStyle.AssignedValues then - begin - ACanvas.Brush.Color := AStyle.Color; - ACanvas.FillRect(R); - end; - end; - - procedure DrawPreviewText; - var - ATextR: TRect; - - function GetTextColor: TColor; - begin - if svTextColor in AStyle.AssignedValues then - Result := AStyle.TextColor - else - {if svColor in AStyle.AssignedValues then - Result := ColorToRGB(AStyle.Color) xor clWhite //!!! - else} - Result := APrevFont.Color; - end; - - function GetTextTopBound: Integer; - begin - Result := (ATextR.Top + ATextR.Bottom - ACanvas.TextHeight(PreviewText)) div 2; - end; - - begin - if AStyle.AssignedValues * [svFont, svTextColor] = [] then Exit; - if svFont in AStyle.AssignedValues then - ACanvas.Font := AStyle.Font; - ACanvas.Font.Color := GetTextColor; - ATextR := GetPreviewClientBounds; - ACanvas.Brush.Style := bsClear; - ACanvas.TextRect(ATextR, ATextR.Left + StyleTextOffset, GetTextTopBound, PreviewText); - ACanvas.Brush.Style := bsSolid; - end; - -begin - AStyle := Designer.GetComponent(Value) as TcxStyle; - if AStyle = nil then - {$IFDEF DELPHI6} - DefaultPropertyListDrawValue(Value, ACanvas, ARect, ASelected) - {$ELSE} - inherited - {$ENDIF} - else - begin - SaveCanvasParams; // for correct focus rect drawing and height measurement - with GetStyleNameRect do - ACanvas.TextRect(ARect, Left, Top, Value); - //DrawStyleAssignedValuesInfo; - DrawPreviewBorder; - DrawPreviewBackground; - DrawPreviewText; - RestoreCanvasParams; - end; -end; - -function TcxStyleProperty.GetStyleRepositories: TList; -begin - Result := TList.Create; - FStyleRepositories := Result; - Designer.GetComponentNames(GetTypeData(TcxStyleRepository.ClassInfo), GetStyleRepositoryNameProc); -end; - -function TcxStyleProperty.AutoFill: Boolean; -begin - Result := False; -end; - -procedure TcxStyleProperty.GetValues(Proc: TGetStrProc); -var - AStyleRepositories: TList; - I: Integer; - S: string; -begin - AStyleRepositories := GetStyleRepositories; - try - for I := 0 to AStyleRepositories.Count - 1 do - begin - S := Designer.GetComponentName(TComponent(AStyleRepositories[I])); - Proc(sCreateNewStyleInRepositoryBegin + S + sCreateNewStyleInRepositoryEnd); - end; - finally - AStyleRepositories.Free; - end; - Proc(sCreateNewStyleInNewRepository); - inherited; -end; - -procedure TcxStyleProperty.SetValue(const Value: string); -var - AName: string; - AStyleRepository: TcxStyleRepository; - - procedure CreateAndAssignNewStyle(AStyleRepository: TcxStyleRepository); - var - AStyle: TcxStyle; - - function GetStyleDesigner: IDesigner; - begin - Result := FindRootDesigner(AStyle) as IDesigner; - //FindRootDesigner(AStyle).QueryInterface(IDesigner, Result); - end; - - begin - AStyle := AStyleRepository.CreateItemEx(TcxStyle, AStyleRepository.Owner) as TcxStyle; - AStyle.Name := CreateUniqueName(AStyle.Owner, nil, AStyle, '', ''); - if GetStyleDesigner <> Designer then - FindRootDesigner(AStyle).Modified; - SetOrdValue(Integer(AStyle)); - end; - -begin - if Value = sCreateNewStyleInNewRepository then - begin - AStyleRepository := TcxStyleRepository.Create(Designer.{$IFDEF DELPHI6}Root{$ELSE}GetRoot{$ENDIF}); - AStyleRepository.Name := Designer.UniqueName( - Copy(TcxStyleRepository.ClassName, 2, Length(TcxStyleRepository.ClassName) - 1)); - CreateAndAssignNewStyle(AStyleRepository); - end - else - if Copy(Value, 1, Length(sCreateNewStyleInRepositoryBegin)) = sCreateNewStyleInRepositoryBegin then - begin - AName := Copy(Value, Length(sCreateNewStyleInRepositoryBegin) + 1, - Length(Value) - (Length(sCreateNewStyleInRepositoryBegin) + Length(sCreateNewStyleInRepositoryEnd))); - CreateAndAssignNewStyle(Designer.GetComponent(AName) as TcxStyleRepository); - end - else - inherited; -end; - -{ TcxBitmapGraphicProperty } - -procedure TcxBitmapGraphicProperty.Edit; -var - PictureEditor: TPictureEditor; - PictureEditorDlg: TWinControl; -begin - PictureEditor := TPictureEditor.Create(nil); - try - PictureEditor.GraphicClass := TGraphicClass(GetTypeData(GetPropType)^.ClassType); - PictureEditor.Picture.Graphic := TGraphic(Pointer(GetOrdValue)); - with PictureEditor do - begin - if BuildFilter <> '' then - begin - PictureEditorDlg := FindControl(FindWindow('TPictureEditorDlg', nil)); - if PictureEditorDlg is TPictureEditorDlg then - TPictureEditorDlg(PictureEditorDlg).OnShow := OnShowPicEdit; - end; - if Execute then - if (Picture.Graphic = nil) or (Picture.Graphic is GraphicClass) then - SetOrdValue(LongInt(Picture.Graphic)) - else - if Picture.Graphic is TdxPNGImage then - SetOrdValue(LongInt(TdxPNGImage(Picture.Graphic).GetAsBitmap)) - else - raise EdxException.CreateRes(@SInvalidFormat) - end; - finally - PictureEditor.Free; - end; -end; - -function TcxBitmapGraphicProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paDialog]; -end; - -function TcxBitmapGraphicProperty.GetValue: string; -var - Graphic: TGraphic; -begin - Graphic := TGraphic(GetOrdValue); - if (Graphic = nil) or Graphic.Empty then - Result := 'None' - else - Result := '(' + Graphic.ClassName + ')'; -end; - -procedure TcxBitmapGraphicProperty.SetValue(const Value: string); -begin - if Value = '' then SetOrdValue(0); -end; - -procedure TcxBitmapGraphicProperty.OnShowPicEdit(Sender: TObject); -begin - if Sender is TPictureEditorDlg then - TPictureEditorDlg(Sender).OpenDialog.Filter := BuildFilter; -end; - -function TcxBitmapGraphicProperty.BuildFilter: string; -begin - Result := ''; -end; - -{ TcxBitmapProperty } - -function TcxBitmapProperty.BuildFilter: string; -begin - if CheckGdiPlus then - Result := sdxBitmapAndPNGFilter - else - Result := ''; -end; - -{ TcxFilenameProperty } - -procedure TcxFilenameProperty.Edit; -var - ADialog: TOpenDialog; -begin - ADialog := TOpenDialog.Create(Application); - ADialog.Filename := GetValue; - ADialog.Filter := GetFilter; - ADialog.Options := ADialog.Options + [ofPathMustExist, ofFileMustExist]; - try - if ADialog.Execute then - SetValue(ADialog.Filename); - finally - ADialog.Free; - end; -end; - -function TcxFilenameProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paDialog, paRevertable]; -end; - -function TcxFilenameProperty.GetFilter: string; -begin - Result := 'All files (*.*)|*.*'; -end; - -{ TcxLocalizerFilenameProperty } - -function TcxLocalizerFilenameProperty.GetFilter: string; -begin - Result := 'INI Files|*.ini|' + inherited GetFilter; -end; - -procedure HideClassProperties(AClass: TClass; APropertyNames: array of string); -var - I: Integer; -begin - for I := Low(APropertyNames) to High(APropertyNames) do - RegisterPropertyEditor(GetPropInfo(AClass, APropertyNames[I]).PropType^, - AClass, APropertyNames[I], nil); -end; - - -{$IFDEF DELPHI9} -procedure RegisterSplashItem; -var - ASplashBitmap: HBITMAP; -begin - ASplashBitmap := LoadBitmap(HInstance, 'DXSPLASH'); - try - SplashScreenServices.AddPluginBitmap(Format('Developer Express VCL Products, Build %d', [dxBuildNumber]), - ASplashBitmap); - finally - DeleteObject(ASplashBitmap); - end; -end; -{$ENDIF} - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); - RegisterSplashItem; -{$ENDIF} - - RegisterComponents(dxLibraryProductPage, [TcxPropertiesStore, TcxImageList]); - RegisterComponents(dxLibraryProductPage, [TcxLookAndFeelController, TcxStyleRepository]); -{$IFDEF DELPHI7} - RegisterComponents(dxLibraryProductPage, [TcxLocalizer]); -{$ENDIF} - RegisterClasses([TcxStyle]); - RegisterNoIcon([TcxStyle]); - - RegisterComponentEditor(TcxLookAndFeelController, TcxLookAndFeelControllerEditor); - RegisterComponentEditor(TcxStyleRepository, TcxStyleRepositoryComponentEditor); - RegisterComponentEditor(TcxImageList, TcxImageListComponentEditor); - RegisterComponentEditor(TcxPropertiesStore, TcxPropertiesStoreComponentEditor); -{$IFDEF DELPHI7} - RegisterComponentEditor(TcxLocalizer, TcxLibraryComponentEditor); -{$ENDIF} - - RegisterPropertyEditor(TypeInfo(TcxCustomStyleSheet), TcxStyles, 'StyleSheet', TcxStyleSheetComponentProperty); - RegisterPropertyEditor(TypeInfo(TBitmap), nil, '', TcxBitmapGraphicProperty); - RegisterPropertyEditor(TypeInfo(TcxStyleController), TcxStyleController, 'FakeStyleController', nil); - RegisterPropertyEditor(TypeInfo(TcxStyleController), TcxContainer, 'FakeStyleController', nil); - RegisterPropertyEditor(TypeInfo(TcxContainerStyle), TcxContainer, '', TcxContainerStyleProperty); - RegisterPropertyEditor(TypeInfo(TcxContainerStyle), TcxStyleController, '', TcxStyleControllerStyleProperty); - RegisterPropertyEditor(TypeInfo(TComponent), TcxControl, 'PopupMenu', TcxControlPopupMenuProperty); - RegisterPropertyEditor(TypeInfo(TcxStyle), nil, '', TcxStyleProperty); - RegisterPropertyEditor(TypeInfo(TcxLookAndFeel), nil, '', TcxLookAndFeelProperty); - RegisterPropertyEditor(TypeInfo(TdxSkinName), nil, 'SkinName', nil); - RegisterPropertyEditor(TypeInfo(TcxContainerStyleValues), TcxContainerStyle, - 'AssignedValues', TcxContainerStyleAssignedValuesProperty); - RegisterPropertyEditor(TypeInfo(TcxLookAndFeelValues), TcxLookAndFeel, - 'AssignedValues', TcxLookAndFeelAssignedValuesProperty); -{$IFDEF DELPHI7} - RegisterPropertyEditor(TypeInfo(Cardinal), TcxLocalizer, 'Locale', TcxLocalizerLocaleProperty); - RegisterPropertyEditor(TypeInfo(TFileName), TcxLocalizer, 'FileName', TcxLocalizerFilenameProperty); -{$ENDIF} -end; - -{$IFDEF DELPHI6} -initialization - StartClassGroup(TControl); - GroupDescendentsWith(TcxCustomPropertiesStore, TControl); -{$ENDIF} - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxLibraryStrs.pas b/internal/x.46/ExpressLibrary/Sources/cxLibraryStrs.pas deleted file mode 100644 index 633210ed..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxLibraryStrs.pas +++ /dev/null @@ -1,122 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit cxLibraryStrs; - -{$I cxVer.inc} - -interface - -resourcestring - scxCantCreateRegistryKey = 'Can''t create the registry key: \%s'; - scxCantOpenRegistryKey = 'Can''t open the registry key: \%s'; - scxErrorStoreObject = 'Error store %s object'; - - {$IFNDEF DELPHI5} - scxInvalidPropertyElement = 'Invalid property element: %s'; - {$ENDIF} - scxConverterCantCreateStyleRepository = 'Can''t create the Style Repository'; - - // date smart input consts - cxSDateToday = 'today'; - cxSDateYesterday = 'yesterday'; - cxSDateTomorrow = 'tomorrow'; - cxSDateSunday = 'Sunday'; - cxSDateMonday = 'Monday'; - cxSDateTuesday = 'Tuesday'; - cxSDateWednesday = 'Wednesday'; - cxSDateThursday = 'Thursday'; - cxSDateFriday = 'Friday'; - cxSDateSaturday = 'Saturday'; - cxSDateFirst = 'first'; - cxSDateSecond = 'second'; - cxSDateThird = 'third'; - cxSDateFourth = 'fourth'; - cxSDateFifth = 'fifth'; - cxSDateSixth = 'sixth'; - cxSDateSeventh = 'seventh'; - cxSDateBOM = 'bom'; - cxSDateEOM = 'eom'; - cxSDateNow = 'now'; - -implementation - -uses - dxCore; - -procedure AddExpressLibraryResourceStringNames(AProduct: TdxProductResourceStrings); - - procedure InternalAdd(const AResourceStringName: string; AAdress: Pointer); - begin - AProduct.Add(AResourceStringName, AAdress); - end; - -begin - InternalAdd('scxCantCreateRegistryKey', @scxCantCreateRegistryKey); - InternalAdd('scxCantOpenRegistryKey', @scxCantOpenRegistryKey); - InternalAdd('scxErrorStoreObject', @scxErrorStoreObject); -{$IFNDEF DELPHI5} - InternalAdd('scxInvalidPropertyElement', @scxInvalidPropertyElement); -{$ENDIF} - InternalAdd('scxConverterCantCreateStyleRepository', @scxConverterCantCreateStyleRepository); - InternalAdd('cxSDateToday', @cxSDateToday); - InternalAdd('cxSDateYesterday', @cxSDateYesterday); - InternalAdd('cxSDateTomorrow', @cxSDateTomorrow); - InternalAdd('cxSDateSunday', @cxSDateSunday); - InternalAdd('cxSDateMonday', @cxSDateMonday); - InternalAdd('cxSDateTuesday', @cxSDateTuesday); - InternalAdd('cxSDateWednesday', @cxSDateWednesday); - InternalAdd('cxSDateThursday', @cxSDateThursday); - InternalAdd('cxSDateFriday', @cxSDateFriday); - InternalAdd('cxSDateSaturday', @cxSDateSaturday); - InternalAdd('cxSDateFirst', @cxSDateFirst); - InternalAdd('cxSDateSecond', @cxSDateSecond); - InternalAdd('cxSDateThird', @cxSDateThird); - InternalAdd('cxSDateFourth', @cxSDateFourth); - InternalAdd('cxSDateFifth', @cxSDateFifth); - InternalAdd('cxSDateSixth', @cxSDateSixth); - InternalAdd('cxSDateSeventh', @cxSDateSeventh); - InternalAdd('cxSDateBOM', @cxSDateBOM); - InternalAdd('cxSDateEOM', @cxSDateEOM); - InternalAdd('cxSDateNow', @cxSDateNow); -end; - -initialization - dxResourceStringsRepository.RegisterProduct('ExpressLibrary', @AddExpressLibraryResourceStringNames); - -finalization - dxResourceStringsRepository.UnRegisterProduct('ExpressLibrary'); - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxLocalization.pas b/internal/x.46/ExpressLibrary/Sources/cxLocalization.pas deleted file mode 100644 index b942003a..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxLocalization.pas +++ /dev/null @@ -1,789 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxLocalization; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, Forms, SysUtils, cxClasses, IniFiles; - -const - ANoActiveLanguage = 'English (Original translation)'; - -type - - TcxLocalizerStorage = class; - TcxLocalizerStorageClass = class of TcxLocalizerStorage; - - TcxLanguage = class(TCollectionItem) - private - FDictionary: TStrings; - FLocaleID: Cardinal; - - function GetName: string; - procedure SetDictionary(AValue: TStrings); - public - constructor Create(Collection: TCollection); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function FindTranslation(const AResStringName: string; out AValue: string): Boolean; - procedure ResetValue(const AResStringName: string); - procedure SetTranslation(const AResStringName, AValue: string); - - property Name: string read GetName; - property Dictionary: TStrings read FDictionary write SetDictionary; - property LocaleID: Cardinal read FLocaleID write FLocaleID; - end; - - TcxLanguages = class(TCollection) - private - FActiveLanguage: Integer; - FCustomResStrings: TStrings; - FOnLanguagesChanged: TNotifyEvent; - FOwner: TPersistent; - - procedure SetActiveLanguage(AValue: Integer); - procedure TranslateResString(const AResStringName: string; AResString: Pointer); - protected - function GetItem(Index: Integer): TcxLanguage; - function GetOwner: TPersistent; override; - function GetLocalizedString(const AResStringName: string; out AValue: string): Boolean; - procedure SetItem(Index: Integer; Value: TcxLanguage); - procedure Translate; - procedure Update(Item: TCollectionItem); override; - - property ActiveLanguage: Integer read FActiveLanguage write SetActiveLanguage; - property OnLanguagesChanged: TNotifyEvent read FOnLanguagesChanged write FOnLanguagesChanged; - public - constructor Create(AOwner: TPersistent); - destructor Destroy; override; - function Add: TcxLanguage; - function GetLanguageByName(AName: string): Integer; - procedure SetCustomResStringOriginalValue(const AResStringName, AValue: string); - - property CustomResStrings: TStrings read FCustomResStrings; - property Items[Index: Integer]: TcxLanguage read GetItem write SetItem; default; - end; - - TcxLocalizerTranslateEvent = procedure(const AResStringName: string; - var AResStringValue: string; out AHandled: Boolean) of object; - - TcxLocalizer = class(TComponent) - private - FActive: Boolean; - FFileName: TFileName; - FLanguages: TcxLanguages; - FLoadedActive: Boolean; - FLoadedLanguage: string; - FStorage: TcxLocalizerStorage; - FOnTranslate: TcxLocalizerTranslateEvent; - function GetLanguage: string; - function GetLanguageIndex: Integer; - function GetLocale: Cardinal; - procedure InternalLoadFromStream(AStream: TStream); - function IsLanguageIndexValid: Boolean; - function IsLocaleStored: Boolean; - procedure RecreateStorage; - procedure SetActive(AValue: Boolean); - procedure SetFileName(AValue: TFileName); - procedure SetLanguage(AValue: string); - procedure SetLanguageIndex(AValue: Integer); - procedure SetLocale(AValue: Cardinal); - protected - procedure Clear; - function DoCustomTranslate(const AResStringName: string; out ALocalizedValue: string): Boolean; - function GetStorageClassType: TcxLocalizerStorageClass; - procedure LanguagesChanged(ASender: TObject); - procedure Loaded; override; - procedure UpdateDependentComponents; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure LoadFromStream(AStream: TStream); - procedure LoadFromFile(const AFileName: TFileName = ''); - procedure SaveToFile(const AFileName: TFileName{$IFDEF DELPHI12}; AIsAnsiSaveFormat: Boolean{$ENDIF}); - procedure SaveToStream(AStream: TStream{$IFDEF DELPHI12}; AIsAnsiSaveFormat: Boolean{$ENDIF}); - - procedure Translate; - - property LanguageIndex: Integer read GetLanguageIndex write SetLanguageIndex; - property Language: string read GetLanguage write SetLanguage; - property Languages: TcxLanguages read FLanguages; - published - property Active: Boolean read FActive write SetActive default False; - property FileName: TFileName read FFileName write SetFileName; - property Locale: Cardinal read GetLocale write SetLocale stored IsLocaleStored; - property OnTranslate: TcxLocalizerTranslateEvent read FOnTranslate write FOnTranslate; - end; - - TcxLocalizerStorage = class(TPersistent) - private -{$IFDEF DELPHI12} - function GetEndcodingFromLocaleID(ALocaleID: Integer): TEncoding; -{$ENDIF} - public - procedure LoadFromStream(AStream: TStream; ALanguages: TcxLanguages); - procedure SaveToStream(AStream: TStream; ALanguages: TcxLanguages{$IFDEF DELPHI12}; AIsAnsiSaveFormat: Boolean{$ENDIF}); - end; - -implementation - -uses - Math, Dialogs, Controls, dxCore; - -const - ACustomResourceStrings = 'Custom Resource Strings'; - -type - TcxLocalizerDictionary = class(TStringList) - private - function GetValue(const Name: string): string; - procedure SetValue(const Name, Value: string); - {$IFNDEF DELPHI7} - function GetNameValueSeparator: Char; - function GetValueFromIndex(Index: Integer): string; - {$ENDIF} - protected - function CompareStrings(const S1, S2: string): Integer; override; - public - {$IFNDEF DELPHI7} - property NameValueSeparator: Char read GetNameValueSeparator; - property ValueFromIndex[Index: Integer]: string read GetValueFromIndex; - {$ENDIF} - property Values[const Name: string]: string read GetValue write SetValue; - end; - -{ TcxLocalizerDictionary } - -function TcxLocalizerDictionary.CompareStrings(const S1, S2: string): Integer; -var - AS1, AS2: string; -begin - AS1 := ExtractName(S1); - if AS1 = '' then - AS1 := S1; - AS2 := ExtractName(S2); - if AS2 = '' then - AS2 := S2; - Result := inherited CompareStrings(AS1, AS2); -end; - -function TcxLocalizerDictionary.GetValue(const Name: string): string; -var - I: Integer; -begin - if Find(Name, I) then - Result := Copy(Get(I), Length(Name) + 2, MaxInt) - else - Result := ''; -end; - -procedure TcxLocalizerDictionary.SetValue(const Name, Value: string); -var - I: Integer; - AObject: TObject; -begin - BeginUpdate; - AObject := nil; - if Find(Name, I) then - begin - AObject := GetObject(I); - Delete(I); - end; - InsertItem(I, Name + NameValueSeparator + Value, AObject); - EndUpdate; -end; - -{$IFNDEF DELPHI7} -function TcxLocalizerDictionary.GetNameValueSeparator: Char; -begin - Result := '='; -end; - -function TcxLocalizerDictionary.GetValueFromIndex(Index: Integer): string; -begin - if Index >= 0 then - Result := Copy(Get(Index), Length(Names[Index]) + 2, MaxInt) else - Result := ''; -end; -{$ENDIF} - -{ TcxLanguage } - -constructor TcxLanguage.Create(Collection: TCollection); -begin - inherited; - FDictionary := TcxLocalizerDictionary.Create; - TStringList(FDictionary).Sorted := True; -end; - -destructor TcxLanguage.Destroy; -begin - FreeAndNil(FDictionary); - inherited; -end; - -procedure TcxLanguage.Assign(Source: TPersistent); -begin - if Source is TcxLanguage then - begin - LocaleID := TcxLanguage(Source).LocaleID; - Dictionary := TcxLanguage(Source).Dictionary; - end - else - inherited; -end; - -function TcxLanguage.FindTranslation(const AResStringName: string; out AValue: string): Boolean; -var - AIndex: Integer; -begin - Result := TStringList(FDictionary).Find(AResStringName, AIndex); - if Result then - AValue := TcxLocalizerDictionary(FDictionary).ValueFromIndex[AIndex] - else - AValue := ''; -end; - -procedure TcxLanguage.ResetValue(const AResStringName: string); -var - I: Integer; -begin - if TStringList(FDictionary).Find(AResStringName, I) then - FDictionary.Delete(I); -end; - -procedure TcxLanguage.SetTranslation(const AResStringName, AValue: string); -begin - if AResStringName <> '' then - TcxLocalizerDictionary(FDictionary).Values[AResStringName] := AValue; -end; - -function TcxLanguage.GetName: string; -begin - Result := Languages.NameFromLocaleID[LocaleID]; -end; - -procedure TcxLanguage.SetDictionary(AValue: TStrings); -begin - FDictionary.Assign(AValue) -end; - -{ TcxLanguages } - -constructor TcxLanguages.Create(AOwner: TPersistent); -begin - inherited Create(TcxLanguage); - FActiveLanguage := -1; - FOwner := AOwner; - FCustomResStrings := TcxLocalizerDictionary.Create; - TStringList(FCustomResStrings).Sorted := True; -end; - -destructor TcxLanguages.Destroy; -begin - FCustomResStrings.Free; - inherited; -end; - -function TcxLanguages.Add: TcxLanguage; -begin - Result := TcxLanguage(inherited Add); -end; - -function TcxLanguages.GetLanguageByName(AName: string): Integer; -var - I: Integer; -begin - Result := -1; - for I := 0 to Count - 1 do - if Items[I].Name = AName then - begin - Result := I; - Break; - end; -end; - -procedure TcxLanguages.SetCustomResStringOriginalValue(const AResStringName, AValue: string); -begin - if AResStringName <> '' then - TcxLocalizerDictionary(FCustomResStrings).Values[AResStringName] := AValue; -end; - -function TcxLanguages.GetItem(Index: Integer): TcxLanguage; -begin - Result := TcxLanguage(inherited GetItem(Index)); -end; - -function TcxLanguages.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -function TcxLanguages.GetLocalizedString(const AResStringName: string; out AValue: string): Boolean; -begin - AValue := ''; - Result := False; - if (0 <= ActiveLanguage) and (ActiveLanguage < Count) then - Result := Items[ActiveLanguage].FindTranslation(AResStringName, AValue); -end; - -procedure TcxLanguages.SetItem(Index: Integer; Value: TcxLanguage); -begin - inherited SetItem(Index, Value); -end; - -procedure TcxLanguages.Translate; -var - APreviousHandler: TdxLocalizationTranslateResStringEvent; -begin - cxClearResourceStrings; - APreviousHandler := dxResourceStringsRepository.OnTranslateResString; - dxResourceStringsRepository.OnTranslateResString := TranslateResString; - dxResourceStringsRepository.Translate; - dxResourceStringsRepository.OnTranslateResString := APreviousHandler; -end; - -procedure TcxLanguages.Update(Item: TCollectionItem); -begin - if Assigned(FOnLanguagesChanged) then - FOnLanguagesChanged(Self); -end; - -procedure TcxLanguages.SetActiveLanguage(AValue: Integer); -begin - if FActiveLanguage <> AValue then - FActiveLanguage := AValue; -end; - -procedure TcxLanguages.TranslateResString(const AResStringName: string; AResString: Pointer); -var - ALocalizedValue: string; -begin - if TcxLocalizer(FOwner).DoCustomTranslate(AResStringName, ALocalizedValue) or - GetLocalizedString(AResStringName, ALocalizedValue) then - cxSetResourceString(AResString, ALocalizedValue); -end; - -{ TcxLocalizer } - -constructor TcxLocalizer.Create(AOwner: TComponent); -begin - inherited; - FLanguages := TcxLanguages.Create(Self); - FLanguages.OnLanguagesChanged := LanguagesChanged; - RecreateStorage; -end; - -destructor TcxLocalizer.Destroy; -begin - FreeAndNil(FLanguages); - FreeAndNil(FStorage); - inherited; -end; - -procedure TcxLocalizer.Assign(Source: TPersistent); -var - ALocalizer: TcxLocalizer; -begin - if Source is TcxLocalizer then - begin - ALocalizer := TcxLocalizer(Source); - FileName := ALocalizer.FileName; - Locale := ALocalizer.Locale; - end - else - inherited; -end; - -procedure TcxLocalizer.LoadFromStream(AStream: TStream); -begin - Active := False; - InternalLoadFromStream(AStream); -end; - -procedure TcxLocalizer.LoadFromFile(const AFileName: TFileName = ''); -var - AFileStream: TFileStream; -begin - Active := False; - if AFileName <> '' then - FFileName := AFileName; - AFileStream := TFileStream.Create(FFileName, fmOpenRead or fmShareDenyNone); - try - InternalLoadFromStream(AFileStream); - finally - AFileStream.Free; - end; -end; - -procedure TcxLocalizer.SaveToFile(const AFileName: TFileName{$IFDEF DELPHI12}; AIsAnsiSaveFormat: Boolean{$ENDIF}); -var - AFileStream: TFileStream; -begin - if AFileName = '' then Exit; - AFileStream := TFileStream.Create(AFileName, fmCreate); - try - SaveToStream(AFileStream{$IFDEF DELPHI12}, AIsAnsiSaveFormat{$ENDIF}); - finally - AFileStream.Free; - end; - if FileExists(AFileName) then - FFileName := AFileName; -end; - -procedure TcxLocalizer.SaveToStream(AStream: TStream{$IFDEF DELPHI12}; AIsAnsiSaveFormat: Boolean{$ENDIF}); -begin - FStorage.SaveToStream(AStream, Languages{$IFDEF DELPHI12}, AIsAnsiSaveFormat{$ENDIF}); -end; - -procedure TcxLocalizer.Translate; -begin - FLanguages.Translate; - UpdateDependentComponents; -end; - -procedure TcxLocalizer.Clear; -begin - Languages.Clear; - Languages.CustomResStrings.Clear; -end; - -function TcxLocalizer.DoCustomTranslate(const AResStringName: string; out ALocalizedValue: string): Boolean; -begin - Result := False; - if Assigned(FOnTranslate) then - begin - ALocalizedValue := dxResourceStringsRepository.GetOriginalValue(AResStringName); - FOnTranslate(AResStringName, ALocalizedValue, Result); - end; -end; - -function TcxLocalizer.GetStorageClassType: TcxLocalizerStorageClass; -begin - Result := TcxLocalizerStorage; -end; - -procedure TcxLocalizer.LanguagesChanged(ASender: TObject); -begin - LanguageIndex := Min(LanguageIndex, Languages.Count - 1); -end; - -procedure TcxLocalizer.Loaded; -begin - inherited; - try - Active := FLoadedActive; - except - if csDesigning in ComponentState then - if Assigned(Classes.ApplicationHandleException) then - Classes.ApplicationHandleException(ExceptObject) - else - ShowException(ExceptObject, ExceptAddr) - else - raise; - end; - Language := FLoadedLanguage; -end; - -procedure TcxLocalizer.UpdateDependentComponents; -begin - dxResourceStringsRepository.NotifyListeners; -end; - -function TcxLocalizer.GetLanguage: string; -begin - if IsLanguageIndexValid then - Result := Languages[LanguageIndex].Name - else - Result := ANoActiveLanguage; -end; - -function TcxLocalizer.GetLanguageIndex: Integer; -begin - Result := FLanguages.ActiveLanguage; -end; - -function TcxLocalizer.GetLocale: Cardinal; -begin - if IsLanguageIndexValid then - Result := Languages[LanguageIndex].LocaleID - else - Result := 0; -end; - -procedure TcxLocalizer.InternalLoadFromStream(AStream: TStream); -begin - FStorage.LoadFromStream(AStream, Languages); - FActive := True; -end; - -function TcxLocalizer.IsLanguageIndexValid: Boolean; -begin - Result := (0 <= LanguageIndex) and (LanguageIndex < Languages.Count); -end; - -function TcxLocalizer.IsLocaleStored: Boolean; -begin - Result := LanguageIndex <> -1; -end; - -procedure TcxLocalizer.RecreateStorage; -begin - FStorage := GetStorageClassType.Create; -end; - -procedure TcxLocalizer.SetActive(AValue: Boolean); -begin - if csLoading in ComponentState then - FLoadedActive := AValue - else - if FActive <> AValue then - begin - FActive := AValue; - if AValue then - LoadFromFile - else - Clear; - end; -end; - -procedure TcxLocalizer.SetFileName(AValue: TFileName); -begin - if FFileName <> AValue then - begin - FFileName := AValue; - if not (csLoading in ComponentState) then - Active := False; - end; -end; - -procedure TcxLocalizer.SetLanguage(AValue: string); -begin - if csLoading in ComponentState then - FLoadedLanguage := AValue - else - LanguageIndex := Languages.GetLanguageByName(AValue); -end; - -procedure TcxLocalizer.SetLanguageIndex(AValue: Integer); -begin - AValue := Min(Max(AValue, -1), Languages.Count - 1); - if FLanguages.ActiveLanguage <> AValue then - begin - FLanguages.ActiveLanguage := AValue; - Translate; - end; -end; - -procedure TcxLocalizer.SetLocale(AValue: Cardinal); -begin - Language := SysUtils.Languages.NameFromLocaleID[AValue]; -end; - -{ TcxLocalizerStorage } - -procedure TcxLocalizerStorage.LoadFromStream(AStream: TStream; ALanguages: TcxLanguages); - -{$IFDEF DELPHI12} - function IsUnicode(AStream: TStream): Boolean; - var - ASize: Integer; - ABuffer: TBytes; - AEncoding: TEncoding; - begin - ASize := AStream.Size - AStream.Position; - SetLength(ABuffer, ASize); - AStream.Read(ABuffer[0], ASize); - AEncoding := nil; - TEncoding.GetBufferEncoding(ABuffer, AEncoding); - Result := AEncoding = TEncoding.Unicode; - end; -{$ENDIF} - - procedure ReadSectionValues(AIniFile: TCustomIniFile; const ASectionName: string; AList: TStrings); - var - I: Integer; - AName, AValue: string; - begin - AIniFile.ReadSectionValues(ASectionName, AList); - AList.BeginUpdate; - try - for I := 0 to AList.Count - 1 do - begin - AValue := TcxLocalizerDictionary(AList).ValueFromIndex[I]; - AValue := StringReplace(AValue, ' \n', #13#10, [rfReplaceAll, rfIgnoreCase]); - AValue := StringReplace(AValue, '\\n', '\n', [rfReplaceAll, rfIgnoreCase]); - Delete(AValue, 1, 1); - Delete(AValue, Length(AValue), 1); - AName := AList.Names[I]; - TcxLocalizerDictionary(AList).Values[AName] := AValue; - end; - finally - AList.EndUpdate; - end; - end; - -var - AList, ASections: TStringList; - AMemIniFile: TMemIniFile; - ASectionName: string; - ALanguage: TcxLanguage; - I: Integer; -{$IFDEF DELPHI12} - AEncoding: TEncoding; - AIsUnicode: Boolean; - AStartPos: Integer; -{$ENDIF} -begin - AMemIniFile := TMemIniFile.Create(''); - AList := TStringList.Create; - ASections := TStringList.Create; -{$IFDEF DELPHI12}AStartPos := AStream.Position;{$ENDIF} - try - AList.LoadFromStream(AStream); - AMemIniFile.SetStrings(AList); - AMemIniFile.ReadSections(ASections); - {$IFDEF DELPHI12} - AStream.Position := AStartPos; - AIsUnicode := IsUnicode(AStream); - {$ENDIF} - for I := 0 to ASections.Count - 1 do - begin - ASectionName := ASections[I]; - if ASectionName <> ACustomResourceStrings then - begin - ALanguage := ALanguages.Add; - ALanguage.LocaleID := StrToInt(ASectionName); - {$IFDEF DELPHI12} - if not AIsUnicode then - begin - AEncoding := GetEndcodingFromLocaleID(StrToInt(ASectionName)); - try - AStream.Position := AStartPos; - AList.LoadFromStream(AStream, AEncoding); - AMemIniFile.SetStrings(AList); - finally - FreeAndNil(AEncoding); - end; - end; - {$ENDIF} - ReadSectionValues(AMemIniFile, ASectionName, ALanguage.Dictionary); - end - else - ReadSectionValues(AMemIniFile, ASectionName, ALanguages.CustomResStrings); - end; - finally - FreeAndNil(AList); - FreeAndNil(ASections); - FreeAndNil(AMemIniFile); - end; -end; - -procedure TcxLocalizerStorage.SaveToStream(AStream: TStream; - ALanguages: TcxLanguages{$IFDEF DELPHI12}; AIsAnsiSaveFormat: Boolean{$ENDIF}); - - procedure WriteSection(AIniFile: TCustomIniFile; const ASectionName: string; AList: TStrings); - var - I: Integer; - AName, AValue: string; - begin - for I := 0 to AList.Count - 1 do - begin - AName := AList.Names[I]; - AValue := AList.Values[AName]; - AValue := StringReplace(AValue, '\n', '\\n', [rfReplaceAll, rfIgnoreCase]); - AValue := StringReplace(AValue, #13#10, ' \n', [rfReplaceAll, rfIgnoreCase]); - AValue := '"' + AValue + '"'; - AIniFile.WriteString(ASectionName, AName, AValue); - end; - end; - -var - AList: TStringList; - AMemIniFile: TMemIniFile; - {$IFDEF DELPHI12}AEncoding: TEncoding;{$ENDIF} - I: Integer; -begin - AMemIniFile := TMemIniFile.Create(''); - AList := TStringList.Create; - try - for I := 0 to ALanguages.Count - 1 do - begin - WriteSection(AMemIniFile, IntToStr(ALanguages[I].LocaleID), ALanguages[I].Dictionary); - {$IFDEF DELPHI12} - if AIsAnsiSaveFormat then - begin - AEncoding := GetEndcodingFromLocaleID(ALanguages[I].LocaleID); - try - AMemIniFile.GetStrings(AList); - AMemIniFile.Clear; - AList.SaveToStream(AStream, AEncoding); - AList.Clear; - finally - FreeAndNil(AEncoding); - end; - end; - {$ENDIF} - end; - WriteSection(AMemIniFile, ACustomResourceStrings, ALanguages.CustomResStrings); - AMemIniFile.GetStrings(AList); - {$IFDEF DELPHI12}if AIsAnsiSaveFormat then AEncoding := nil else AEncoding := TEncoding.Unicode;{$ENDIF} - AList.SaveToStream(AStream{$IFDEF DELPHI12}, AEncoding{$ENDIF}); - finally - FreeAndNil(AList); - FreeAndNil(AMemIniFile); - end; -end; - -{$IFDEF DELPHI12} -function TcxLocalizerStorage.GetEndcodingFromLocaleID(ALocaleID: Integer): TEncoding; -var - ACodePage: Integer; - ABuffer: array [0..6] of Char; -begin - GetLocaleInfo(ALocaleID, LOCALE_IDEFAULTANSICODEPAGE, ABuffer, SizeOf(ABuffer)); - ACodePage := StrToIntDef(ABuffer, GetACP); - Result := TEncoding.GetEncoding(ACodePage); -end; -{$ENDIF} - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxLookAndFeelPainters.pas b/internal/x.46/ExpressLibrary/Sources/cxLookAndFeelPainters.pas deleted file mode 100644 index 8ea277f9..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxLookAndFeelPainters.pas +++ /dev/null @@ -1,7121 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCommonLibrary } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCOMMONLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxLookAndFeelPainters; - -{$I cxVer.inc} - -interface - -uses - Windows, dxUxTheme, dxThemeManager, dxOffice11, -{$IFDEF DELPHI6} - Types, -{$ENDIF} - Classes, Graphics, Controls, ImgList, cxClasses, cxGraphics, cxGeometry; - -const - cxTextOffset = 2; - cxHeaderTextOffset = cxTextOffset; - - cxArrowLeftBasePointIndex = 0; - cxArrowTopPointIndex = 1; - cxArrowRightBasePointIndex = 2; - - cxStdThumbnailMinimalSize = 8; - -type - TcxLookAndFeelStyle = (lfsFlat, lfsStandard, lfsUltraFlat, - lfsNative, lfsOffice11); - - TcxArrowDirection = (adUp, adDown, adLeft, adRight); - TcxArrowPoints = array[0..2] of TPoint; - TcxEditBtnKind = (cxbkCloseBtn, cxbkComboBtn, cxbkEditorBtn, cxbkEllipsisBtn, - cxbkSpinUpBtn, cxbkSpinDownBtn, cxbkSpinLeftBtn, cxbkSpinRightBtn); - TcxEditStateColorKind = (esckNormal, esckDisabled, esckInactive, esckReadOnly); - TcxButtonState = (cxbsDefault, cxbsNormal, cxbsHot, cxbsPressed, cxbsDisabled); - TcxCalcButtonKind = (cbBack, cbCancel, cbClear, cbMC, cbMR, cbMS, cbMP, - cbNum0, cbNum1, cbNum2, cbNum3, cbNum4, cbNum5, cbNum6, cbNum7, cbNum8, - cbNum9, cbSign, cbDecimal, cbDiv, cbMul, cbSub, cbAdd, cbSqrt, cbPercent, - cbRev, cbEqual, cbNone); - TcxCheckBoxState = (cbsUnchecked, cbsChecked, cbsGrayed); - TcxGroupBoxCaptionPosition = (cxgpTop, cxgpBottom, cxgpLeft, cxgpRight, cxgpCenter); - TcxHeaderArrows = (haNone, haLeft, haRight, haBoth); - TcxIndicatorKind = (ikNone, ikArrow, ikEdit, ikInsert, ikMultiDot, ikMultiArrow, ikFilter); - TcxNeighbor = (nLeft, nTop, nRight, nBottom); - TcxNeighbors = set of TcxNeighbor; - TcxScrollBarPart = (sbpNone, sbpLineUp, sbpLineDown, sbpThumbnail, - sbpPageUp, sbpPageDown); - TcxPopupBorderStyle = (pbsNone, pbsUltraFlat, pbsFlat, pbs3D); - TcxTrackBarTicksAlign = (tbtaUp, tbtaDown, tbtaBoth); - - TcxDrawBackgroundEvent = function(ACanvas: TcxCanvas; const ABounds: TRect): Boolean of object; - TcxCustomLookAndFeelPainterClass = class of TcxCustomLookAndFeelPainter; - - IcxLookAndFeelPainterListener = interface - ['{7665B7CA-2C4B-48B9-ABA2-FA530E7EA468}'] - procedure PainterChanged(APainter: TcxCustomLookAndFeelPainterClass); - end; - - TcxCustomLookAndFeelPainter = class - protected - class procedure DrawBackground(ACanvas: TcxCanvas; const ARect: TRect; - ATransparent: Boolean; ABackgroundColor: TColor; const ABackgroundBitmap: TBitmap); virtual; - class procedure DrawButtonArrow(ACanvas: TcxCanvas; const R: TRect; AColor: TColor); virtual; - class procedure DrawContent(ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; AState: Integer; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil; AIsFooter: Boolean = False); virtual; - class procedure DrawExpandButtonCross(ACanvas: TcxCanvas; const R: TRect; - AExpanded: Boolean; AColor: TColor); - class procedure DrawFooterBorderEx(ACanvas: TcxCanvas; const R: TRect; - ABorders: TcxBorders); virtual; - class procedure DrawGroupExpandButtonMark(ACanvas: TcxCanvas; const R: TRect; - AExpanded: Boolean; AState: TcxButtonState); - class procedure DrawMonthHeaderArrows(ACanvas: TcxCanvas; const ABounds: TRect; - AArrows: TcxHeaderArrows; ASideWidth: Integer; AColor: TColor); - class procedure DrawSortingArrow(ACanvas: TcxCanvas; const R: TRect; - AColor1, AColor2: TColor; AAscendingSorting: Boolean); - class procedure DrawSchedulerNavigationButtonContent(ACanvas: TcxCanvas; - const ARect: TRect; const AArrowRect: TRect; AIsNextButton: Boolean; - AState: TcxButtonState); virtual; - class function FooterCellContentBounds(const ABounds: TRect): TRect; virtual; - class function FooterCellTextAreaBounds(const ABounds: TRect): TRect; virtual; - class function GetArrowDirection(AHorizontal: Boolean; APart: TcxScrollBarPart): TcxArrowDirection; - public - class function LookAndFeelStyle: TcxLookAndFeelStyle; virtual; - class function NeedRedrawOnResize: Boolean; virtual; - - // colors - class function DefaultContentColor: TColor; virtual; - class function DefaultContentEvenColor: TColor; virtual; - class function DefaultContentOddColor: TColor; virtual; - class function DefaultContentTextColor: TColor; virtual; - class function DefaultEditorBackgroundColor(AIsDisabled: Boolean): TColor; virtual; - class function DefaultEditorBackgroundColorEx(AKind: TcxEditStateColorKind): TColor; virtual; - class function DefaultEditorTextColor(AIsDisabled: Boolean): TColor; virtual; - class function DefaultEditorTextColorEx(AKind: TcxEditStateColorKind): TColor; virtual; - class function DefaultFilterBoxColor: TColor; virtual; - class function DefaultFilterBoxTextColor: TColor; virtual; - class function DefaultFixedSeparatorColor: TColor; virtual; - class function DefaultFooterColor: TColor; virtual; - class function DefaultFooterTextColor: TColor; virtual; - class function DefaultGridDetailsSiteColor: TColor; virtual; - class function DefaultGridLineColor: TColor; virtual; - class function DefaultGroupByBoxColor: TColor; virtual; - class function DefaultGroupByBoxTextColor: TColor; virtual; - class function DefaultGroupColor: TColor; virtual; - class function DefaultGroupTextColor: TColor; virtual; - class function DefaultHeaderBackgroundColor: TColor; virtual; - class function DefaultHeaderBackgroundTextColor: TColor; virtual; - class function DefaultHeaderColor: TColor; virtual; - class function DefaultHeaderTextColor: TColor; virtual; - class function DefaultHyperlinkTextColor: TColor; virtual; - class function DefaultInactiveColor: TColor; virtual; - class function DefaultInactiveTextColor: TColor; virtual; - class function DefaultPreviewTextColor: TColor; virtual; - class function DefaultRecordSeparatorColor: TColor; virtual; - class function DefaultSizeGripAreaColor: TColor; virtual; - - class function DefaultVGridBandLineColor: TColor; virtual; - class function DefaultVGridCategoryColor: TColor; virtual; - class function DefaultVGridCategoryTextColor: TColor; virtual; - class function DefaultVGridHeaderColor: TColor; virtual; - class function DefaultVGridHeaderTextColor: TColor; virtual; - class function DefaultVGridLineColor: TColor; virtual; - - class function DefaultDateNavigatorContentColor: TColor; virtual; - class function DefaultDateNavigatorHeaderColor: TColor; virtual; - class function DefaultDateNavigatorHeaderTextColor(AIsHighlight: Boolean): TColor; virtual; - class function DefaultDateNavigatorHolydayTextColor: TColor; virtual; - class function DefaultDateNavigatorInactiveTextColor: TColor; virtual; - class function DefaultDateNavigatorSelectionColor: TColor; virtual; - class function DefaultDateNavigatorSelectionTextColor: TColor; virtual; - class function DefaultDateNavigatorSeparator1Color: TColor; virtual; - class function DefaultDateNavigatorSeparator2Color: TColor; virtual; - class function DefaultDateNavigatorTextColor: TColor; virtual; - class function DefaultDateNavigatorTodayFrameColor: TColor; virtual; - class function DefaultDateNavigatorTodayTextColor: TColor; virtual; - - class function DefaultSchedulerBackgroundColor: TColor; virtual; - class function DefaultSchedulerTextColor: TColor; virtual; - class function DefaultSchedulerBorderColor: TColor; virtual; - class function DefaultSchedulerControlColor: TColor; virtual; - class function DefaultSchedulerNavigatorColor: TColor; virtual; - class function DefaultSchedulerTimeRulerColor: TColor; virtual; - class function DefaultSchedulerTimeRulerTextColor: TColor; virtual; - class function DefaultSchedulerViewContentColor: TColor; virtual; - class function DefaultSchedulerViewSelectedTextColor: TColor; virtual; - class function DefaultSchedulerViewTextColor: TColor; virtual; - - class function DefaultSelectionColor: TColor; virtual; - class function DefaultSelectionTextColor: TColor; virtual; - class function DefaultSeparatorColor: TColor; virtual; - class function DefaultTabColor: TColor; virtual; - class function DefaultTabTextColor: TColor; virtual; - class function DefaultTabsBackgroundColor: TColor; virtual; - - class function DefaultTimeGridMajorScaleColor: TColor; virtual; - class function DefaultTimeGridMajorScaleTextColor: TColor; virtual; - class function DefaultTimeGridMinorScaleColor: TColor; virtual; - class function DefaultTimeGridMinorScaleTextColor: TColor; virtual; - class function DefaultTimeGridSelectionBarColor: TColor; virtual; - - class function DefaultChartDiagramValueBorderColor: TColor; virtual; - class function DefaultChartDiagramValueCaptionTextColor: TColor; virtual; - class function DefaultChartHistogramAxisColor: TColor; virtual; - class function DefaultChartHistogramGridLineColor: TColor; virtual; - class function DefaultChartHistogramPlotColor: TColor; virtual; - class function DefaultChartPieDiagramSeriesSiteBorderColor: TColor; virtual; - class function DefaultChartPieDiagramSeriesSiteCaptionColor: TColor; virtual; - class function DefaultChartPieDiagramSeriesSiteCaptionTextColor: TColor; virtual; - class function DefaultChartToolBoxDataLevelInfoBorderColor: TColor; virtual; - class function DefaultChartToolBoxItemSeparatorColor: TColor; virtual; - - // arrow - class procedure CalculateArrowPoints(R: TRect; var P: TcxArrowPoints; AArrowDirection: TcxArrowDirection; AProportional: Boolean; AArrowSize: Integer = 0); - class procedure DrawArrow(ACanvas: TcxCanvas; const R: TRect; AArrowDirection: TcxArrowDirection; AColor: TColor); overload; virtual; - class procedure DrawArrow(ACanvas: TcxCanvas; const R: TRect; AState: TcxButtonState; AArrowDirection: TcxArrowDirection; ADrawBorder: Boolean = True); overload; virtual; - class procedure DrawArrowBorder(ACanvas: TcxCanvas; const R: TRect; AState: TcxButtonState); virtual; - class procedure DrawScrollBarArrow(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState; AArrowDirection: TcxArrowDirection); virtual; - // border - class function BorderSize: Integer; virtual; - class procedure DrawBorder(ACanvas: TcxCanvas; R: TRect); virtual; - // buttons - class function AdjustGroupButtonDisplayRect(const R: TRect; AButtonCount, AButtonIndex: Integer): TRect; virtual; - class function ButtonBorderSize(AState: TcxButtonState = cxbsNormal): Integer; virtual; // abstract; - class function ButtonColor(AState: TcxButtonState): TColor; virtual; - class function ButtonFocusRect(ACanvas: TcxCanvas; R: TRect): TRect; virtual; - class function ButtonGroupBorderSizes(AButtonCount, AButtonIndex: Integer): TRect; virtual; - class function ButtonTextOffset: Integer; virtual; // abstract; - class function ButtonTextShift: Integer; virtual; // abstract; - class function ButtonSymbolColor(AState: TcxButtonState; - ADefaultColor: TColor = clDefault): TColor; virtual; - class function ButtonSymbolState(AState: TcxButtonState): TcxButtonState; virtual; - class procedure DrawButton(ACanvas: TcxCanvas; R: TRect; const ACaption: string; - AState: TcxButtonState; ADrawBorder: Boolean = True; AColor: TColor = clDefault; - ATextColor: TColor = clDefault; AWordWrap: Boolean = False; AIsToolButton: Boolean = False); virtual; - class procedure DrawButtonCross(ACanvas: TcxCanvas; const R: TRect; AColor: TColor; - AState: TcxButtonState); - class procedure DrawButtonInGroup(ACanvas: TcxCanvas; R: TRect; - AState: TcxButtonState; AButtonCount, AButtonIndex: Integer; - ABackgroundColor: TColor); virtual; - class procedure DrawButtonBorder(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); virtual; // abstract; - class procedure DrawButtonGroupBorder(ACanvas: TcxCanvas; R: TRect; AInplace, ASelected: Boolean); virtual; - class procedure DrawExpandButton(ACanvas: TcxCanvas; const R: TRect; AExpanded: Boolean; AColor: TColor = clDefault); virtual; // abstract; - class function DrawExpandButtonFirst: Boolean; virtual; - class procedure DrawGroupExpandButton(ACanvas: TcxCanvas; const R: TRect; AExpanded: Boolean; AState: TcxButtonState); virtual; // abstract - class procedure DrawSmallExpandButton(ACanvas: TcxCanvas; R: TRect; AExpanded: Boolean; - ABorderColor: TColor; AColor: TColor = clDefault); virtual; - class function ExpandButtonSize: Integer; virtual; // abstract; - class function GroupExpandButtonSize: Integer; virtual; // abstract; - class function IsButtonHotTrack: Boolean; virtual; // abstract; - class function IsPointOverGroupExpandButton(const R: TRect; const P: TPoint): Boolean; virtual; - class function SmallExpandButtonSize: Integer; virtual; - // checkbox - class function CheckBorderSize: Integer; virtual; - class function CheckButtonColor(AState: TcxButtonState): TColor; virtual; - class function CheckButtonSize: TSize; virtual; - class procedure DrawCheck(ACanvas: TcxCanvas; const R: TRect; AState: TcxButtonState; - AChecked: Boolean; AColor: TColor); virtual; - class procedure DrawCheckBorder(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); virtual; // abstract; - class procedure DrawCheckButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState; - AChecked: Boolean); overload; virtual; - class procedure DrawCheckButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState; - ACheckState: TcxCheckBoxState); overload; virtual; - // RadioButton - class procedure DrawRadioButton(ACanvas: TcxCanvas; X, Y: Integer; - AButtonState: TcxButtonState; AChecked, AFocused: Boolean; - ABrushColor: TColor; AIsDesigning: Boolean = False); virtual; - class function RadioButtonSize: TSize; virtual; - // label - class procedure DrawLabelLine(ACanvas: TcxCanvas; const R: TRect; - AOuterColor, AInnerColor: TColor; AIsVertical: Boolean); virtual; - class function LabelLineHeight: Integer; virtual; - // header - class procedure DrawHeader(ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil; AIsLast: Boolean = False; - AIsGroup: Boolean = False); virtual; - class procedure DrawHeaderEx(ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); virtual; - class procedure DrawHeaderBorder(ACanvas: TcxCanvas; const R: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders); virtual; - class procedure DrawHeaderPressed(ACanvas: TcxCanvas; const ABounds: TRect); virtual; - class procedure DrawHeaderControlSection(ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, - AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; ATextColor, - ABkColor: TColor); virtual; - class procedure DrawHeaderControlSectionBorder(ACanvas: TcxCanvas; const R: TRect; - ABorders: TcxBorders; AState: TcxButtonState); virtual; - class procedure DrawHeaderControlSectionContent(ACanvas: TcxCanvas; const ABounds, - ATextAreaBounds: TRect; AState: TcxButtonState; AAlignmentHorz: TAlignment; - AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor); virtual; - class procedure DrawHeaderControlSectionText(ACanvas: TcxCanvas; - const ATextAreaBounds: TRect; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, - AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; ATextColor: TColor); virtual; - class procedure DrawHeaderSeparator(ACanvas: TcxCanvas; const ABounds: TRect; - AIndentSize: Integer; AColor: TColor; AViewParams: TcxViewParams); virtual; - class procedure DrawSortingMark(ACanvas: TcxCanvas; const R: TRect; AAscendingSorting: Boolean); virtual; // abstract; - class function HeaderBorders(ANeighbors: TcxNeighbors): TcxBorders; virtual; - class function HeaderBorderSize: Integer; virtual; - class function HeaderBounds(const ABounds: TRect; ANeighbors: TcxNeighbors; - ABorders: TcxBorders = cxBordersAll): TRect; virtual; - class function HeaderContentBounds(const ABounds: TRect; ABorders: TcxBorders): TRect; virtual; - class function HeaderDrawCellsFirst: Boolean; virtual; - class function HeaderHeight(AFontHeight: Integer): Integer; virtual; - class function HeaderControlSectionBorderSize( - AState: TcxButtonState = cxbsNormal): Integer; virtual; - class function HeaderControlSectionTextAreaBounds(ABounds: TRect; - AState: TcxButtonState): TRect; virtual; - class function HeaderControlSectionContentBounds(const ABounds: TRect; - AState: TcxButtonState): TRect; virtual; - class function HeaderWidth(ACanvas: TcxCanvas; ABorders: TcxBorders; - const AText: string; AFont: TFont): Integer; virtual; - class function IsHeaderHotTrack: Boolean; virtual; - class function SortingMarkAreaSize: TPoint; virtual; - class function SortingMarkSize: TPoint; virtual; // abstract; - // grid - class procedure DrawGroupByBox(ACanvas: TcxCanvas; const ARect: TRect; - ATransparent: Boolean; ABackgroundColor: TColor; const ABackgroundBitmap: TBitmap); virtual; - class function GridDrawHeaderCellsFirst: Boolean; virtual; - class function PivotGridHeadersAreaColor: TColor; virtual; - class function PivotGridHeadersAreaTextColor: TColor; virtual; - // footer - class function FooterBorders: TcxBorders; virtual; - class function FooterBorderSize: Integer; virtual; // abstract; - class function FooterCellBorderSize: Integer; virtual; // abstract; - class function FooterCellOffset: Integer; virtual; // abstract; - class function FooterDrawCellsFirst: Boolean; virtual; - class function FooterSeparatorColor: TColor; virtual; - class function FooterSeparatorSize: Integer; virtual; - class procedure DrawFooterPanel(ACanvas: TcxCanvas; const ABounds: TRect; - const AViewParams: TcxViewParams; ABorders: TcxBorders); - class procedure DrawFooterCell(ACanvas: TcxCanvas; const ABounds: TRect; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); virtual; - class procedure DrawFooterCellContent(ACanvas: TcxCanvas; const ABounds: TRect; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); virtual; - class procedure DrawFooterBorder(ACanvas: TcxCanvas; const R: TRect); virtual; // abstract; - class procedure DrawFooterCellBorder(ACanvas: TcxCanvas; const R: TRect); virtual; // abstract; - class procedure DrawFooterContent(ACanvas: TcxCanvas; const ARect: TRect; - const AViewParams: TcxViewParams); virtual; - class procedure DrawFooterSeparator(ACanvas: TcxCanvas; const R: TRect); virtual; - // filter - class procedure DrawFilterActivateButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState; AChecked: Boolean); virtual; - class procedure DrawFilterCloseButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); virtual; - class procedure DrawFilterDropDownButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState; AIsFilterActive: Boolean); virtual; // abstract; - class procedure DrawFilterPanel(ACanvas: TcxCanvas; const ARect: TRect; - ATransparent: Boolean; ABackgroundColor: TColor; const ABackgroundBitmap: TBitmap); virtual; - class function FilterActivateButtonSize: TPoint; virtual; - class function FilterCloseButtonSize: TPoint; virtual; - class function FilterDropDownButtonSize: TPoint; virtual; - // popup - class procedure DrawWindowContent(ACanvas: TcxCanvas; const ARect: TRect); virtual; - class function PopupBorderStyle: TcxPopupBorderStyle; virtual; - // tabs - class procedure DrawTab(ACanvas: TcxCanvas; R: TRect; ABorders: TcxBorders; - const AText: string; AState: TcxButtonState; AVertical: Boolean; AFont: TFont; - ATextColor, ABkColor: TColor; AShowPrefix: Boolean = False); virtual; - class procedure DrawTabBorder(ACanvas: TcxCanvas; R: TRect; ABorder: TcxBorder; ABorders: TcxBorders; AVertical: Boolean); virtual; // abstract; - class procedure DrawTabsRoot(ACanvas: TcxCanvas; const R: TRect; ABorders: TcxBorders; AVertical: Boolean); virtual; // abstract; - class function IsDrawTabImplemented(AVertical: Boolean): Boolean; virtual; - class function IsTabHotTrack(AVertical: Boolean): Boolean; virtual; - class function TabBorderSize(AVertical: Boolean): Integer; virtual; - // indicator - class procedure DrawIndicatorCustomizationMark(ACanvas: TcxCanvas; - const R: TRect; AColor: TColor); virtual; - class procedure DrawIndicatorImage(ACanvas: TcxCanvas; const R: TRect; AKind: TcxIndicatorKind); virtual; - class procedure DrawIndicatorItem(ACanvas: TcxCanvas; const R: TRect; - AKind: TcxIndicatorKind; AColor: TColor; AOnDrawBackground: TcxDrawBackgroundEvent = nil); virtual; - class procedure DrawIndicatorItemEx(ACanvas: TcxCanvas; const R: TRect; - AKind: TcxIndicatorKind; AColor: TColor; AOnDrawBackground: TcxDrawBackgroundEvent = nil); virtual; - class function IndicatorDrawItemsFirst: Boolean; virtual; - // scrollbars - class function ScrollBarMinimalThumbSize(AVertical: Boolean): Integer; virtual; - class procedure DrawScrollBarBackground(ACanvas: TcxCanvas; const R: TRect; - AHorizontal: Boolean); virtual; - class procedure DrawScrollBarPart(ACanvas: TcxCanvas; AHorizontal: Boolean; - R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); virtual; - // size grip - class function SizeGripSize: TSize; virtual; - class procedure DrawSizeGrip(ACanvas: TcxCanvas; const ARect: TRect; ABackgroundColor: TColor = clDefault); virtual; - // ms outlook - class procedure CalculateSchedulerNavigationButtonRects(AIsNextButton: Boolean; - ACollapsed: Boolean; APrevButtonTextSize: TSize; ANextButtonTextSize: TSize; - var ABounds: TRect; out ATextRect: TRect; out AArrowRect: TRect); virtual; - class procedure DrawMonthHeader(ACanvas: TcxCanvas; const ABounds: TRect; - const AText: string; ANeighbors: TcxNeighbors; const AViewParams: TcxViewParams; - AArrows: TcxHeaderArrows; ASideWidth: Integer; AOnDrawBackground: TcxDrawBackgroundEvent = nil); virtual; - class procedure DrawSchedulerBorder(ACanvas: TcxCanvas; R: TRect); virtual; - class procedure DrawSchedulerEventProgress(ACanvas: TcxCanvas; - const ABounds, AProgress: TRect; AViewParams: TcxViewParams; ATransparent: Boolean); virtual; - class procedure DrawSchedulerNavigationButton(ACanvas: TcxCanvas; - const ARect: TRect; AIsNextButton: Boolean; AState: TcxButtonState; - const AText: string; const ATextRect: TRect; const AArrowRect: TRect); virtual; - class procedure DrawSchedulerNavigationButtonArrow(ACanvas: TcxCanvas; - const ARect: TRect; AIsNextButton: Boolean; AColor: TColor); virtual; - class procedure DrawSchedulerNavigatorButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); virtual; - class procedure DrawSchedulerSplitterBorder(ACanvas: TcxCanvas; R: TRect; const AViewParams: TcxViewParams; AIsHorizontal: Boolean); virtual; - class function SchedulerEventProgressOffsets: TRect; virtual; - class function SchedulerNavigationButtonTextColor(AIsNextButton: Boolean; - AState: TcxButtonState; ADefaultColor: TColor = clDefault): TColor; virtual; - class procedure SchedulerNavigationButtonSizes(AIsNextButton: Boolean; - var ABorders: TRect; var AArrowSize: TSize; var AHasTextArea: Boolean); virtual; - // chart view - class function ChartToolBoxDataLevelInfoBorderSize: Integer; virtual; - // editors - class procedure DrawClock(ACanvas: TcxCanvas; const ARect: TRect; - ADateTime: TDateTime; ABackgroundColor: TColor); virtual; - class procedure DrawEditorButton(ACanvas: TcxCanvas; const ARect: TRect; - AButtonKind: TcxEditBtnKind; AState: TcxButtonState); virtual; - class function EditButtonTextOffset: Integer; virtual; - class function EditButtonSize: TSize; virtual; - class function EditButtonTextColor: TColor; virtual; - class function GetContainerBorderColor(AIsHighlightBorder: Boolean): TColor; virtual; - // DateNavigator - class procedure DrawDateNavigatorDateHeader(ACanvas: TcxCanvas; var R: TRect); virtual; - // navigator - class procedure DrawNavigatorGlyph(ACanvas: TcxCanvas; AImageList: TCustomImageList; - AImageIndex: TImageIndex; AButtonIndex: Integer; const AGlyphRect: TRect; - AEnabled: Boolean; AUserGlyphs: Boolean); virtual; - class function NavigatorGlyphSize: TSize; virtual; - // ProgressBar - class procedure DrawProgressBarBorder(ACanvas: TcxCanvas; ARect: TRect; AVertical: Boolean); virtual; - class procedure DrawProgressBarChunk(ACanvas: TcxCanvas; ARect: TRect; AVertical: Boolean); virtual; - class procedure DrawProgressBarText(ACanvas: TcxCanvas; AVertical, ASolid: Boolean; - const AText: string; const ATextRect, AProgressBarRect, AProgressChunkRect: TRect; - ATextColor: TColor = clDefault); virtual; - class function ProgressBarBorderSize(AVertical: Boolean): TRect; virtual; - class function ProgressBarTextColor: TColor; virtual; - class function ProgressBarTextColorEx(AIsFilledArea: Boolean): TColor; virtual; - // GroupBox - class procedure DrawGroupBoxBackground(ACanvas: TcxCanvas; ABounds: TRect; - ARect: TRect); virtual; - class procedure DrawGroupBoxCaption(ACanvas: TcxCanvas; ACaptionRect: TRect; - ACaptionPosition: TcxGroupBoxCaptionPosition); virtual; - class procedure DrawGroupBoxContent(ACanvas: TcxCanvas; ABorderRect: TRect; - ACaptionPosition: TcxGroupBoxCaptionPosition; ABorders: TcxBorders = cxBordersAll); virtual; - class procedure DrawGroupBoxFrame(ACanvas: TcxCanvas; R: TRect; AEnabled: Boolean; - ACaptionPosition: TcxGroupBoxCaptionPosition; ABorders: TcxBorders = cxBordersAll); virtual; - class function GroupBoxBorderSize(ACaption: Boolean; - ACaptionPosition: TcxGroupBoxCaptionPosition): TRect; virtual; - class function GroupBoxTextColor(AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition): TColor; virtual; - class function IsGroupBoxTransparent(AIsCaption: Boolean; - ACaptionPosition: TcxGroupBoxCaptionPosition): Boolean; virtual; - // Panel - class procedure DrawPanelBackground(ACanvas: TcxCanvas; AControl: TWinControl; ABounds: TRect; - AColorFrom: TColor = clDefault; AColorTo: TColor = clDefault); virtual; - class procedure DrawPanelBorders(ACanvas: TcxCanvas; const ABorderRect: TRect); virtual; - class procedure DrawPanelCaption(ACanvas: TcxCanvas; const ACaptionRect: TRect; - ACaptionPosition: TcxGroupBoxCaptionPosition); virtual; - class procedure DrawPanelContent(ACanvas: TcxCanvas; const ABorderRect: TRect; - ABorder: Boolean); virtual; - class function PanelBorderSize: TRect; virtual; - class function PanelTextColor: TColor; virtual; - // TrackBar - class procedure DrawTrackBar(ACanvas: TcxCanvas; const ARect: TRect; - const ASelection: TRect; AShowSelection: Boolean; AEnabled: Boolean; - AHorizontal: Boolean); virtual; - class procedure DrawTrackBarThumb(ACanvas: TcxCanvas; ARect: TRect; AState: TcxButtonState; - AHorizontal: Boolean; ATicks: TcxTrackBarTicksAlign); virtual; - class function TrackBarThumbSize(AHorizontal: Boolean): TSize; virtual; - class function TrackBarTicksColor(AText: Boolean): TColor; virtual; - class function TrackBarTrackSize: Integer; virtual; - // Splitter - class procedure DrawSplitter(ACanvas: TcxCanvas; const ARect: TRect; - AHighlighted: Boolean; AClicked: Boolean; AHorizontal: Boolean); virtual; - class function GetSplitterSize(AHorizontal: Boolean): TSize; virtual; - // LayoutControl - class function LayoutControlEmptyAreaColor: TColor; virtual; - class procedure DrawLayoutControlBackground(ACanvas: TcxCanvas; const R: TRect); virtual; - // Printing System - class function PrintPreviewPageBordersWidth: TRect; virtual; - class procedure DrawPrintPreviewBackground(ACanvas: TcxCanvas; const R: TRect); virtual; - class procedure DrawPrintPreviewPageBackground(ACanvas: TcxCanvas; - const ABorderRect, AContentRect: TRect; ASelected, ADrawContent: Boolean); virtual; - // CalcEdit - class function CalcEditButtonTextColor(AButtonKind: TcxCalcButtonKind): TColor; virtual; - end; - - TcxStandardLookAndFeelPainter = class(TcxCustomLookAndFeelPainter) - public - class function LookAndFeelStyle: TcxLookAndFeelStyle; override; - // border - class function BorderSize: Integer; override; - class procedure DrawBorder(ACanvas: TcxCanvas; R: TRect); override; - // buttons - class function ButtonBorderSize(AState: TcxButtonState = cxbsNormal): Integer; override; - class function ButtonTextOffset: Integer; override; - class function ButtonTextShift: Integer; override; - class procedure DrawButtonBorder(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - class procedure DrawGroupExpandButton(ACanvas: TcxCanvas; const R: TRect; AExpanded: Boolean; AState: TcxButtonState); override; - class function ExpandButtonSize: Integer; override; - class procedure DrawExpandButton(ACanvas: TcxCanvas; const R: TRect; AExpanded: Boolean; AColor: TColor = clDefault); override; - class function IsButtonHotTrack: Boolean; override; - // checkbox - class procedure DrawCheckBorder(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - // header - class procedure DrawHeaderBorder(ACanvas: TcxCanvas; const R: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders); override; - class procedure DrawHeaderControlSectionBorder(ACanvas: TcxCanvas; const R: TRect; - ABorders: TcxBorders; AState: TcxButtonState); override; - class procedure DrawSortingMark(ACanvas: TcxCanvas; const R: TRect; AAscendingSorting: Boolean); override; - class function HeaderBorderSize: Integer; override; - class function HeaderControlSectionBorderSize( - AState: TcxButtonState = cxbsNormal): Integer; override; - class function SortingMarkSize: TPoint; override; - // footer - class function FooterBorderSize: Integer; override; - class function FooterCellBorderSize: Integer; override; - class function FooterCellOffset: Integer; override; - class procedure DrawFooterBorder(ACanvas: TcxCanvas; const R: TRect); override; - class procedure DrawFooterCellBorder(ACanvas: TcxCanvas; const R: TRect); override; - // filter - class procedure DrawFilterDropDownButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState; AIsFilterActive: Boolean); override; - // tabs - class procedure DrawTabBorder(ACanvas: TcxCanvas; R: TRect; ABorder: TcxBorder; ABorders: TcxBorders; AVertical: Boolean); override; - class procedure DrawTabsRoot(ACanvas: TcxCanvas; const R: TRect; ABorders: TcxBorders; AVertical: Boolean); override; - class function TabBorderSize(AVertical: Boolean): Integer; override; - // scrollbars - class procedure DrawScrollBarPart(ACanvas: TcxCanvas; AHorizontal: Boolean; - R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); override; - // ms outlook - class function DefaultSchedulerViewContentColor: TColor; override; - class procedure DrawMonthHeader(ACanvas: TcxCanvas; const ABounds: TRect; - const AText: string; ANeighbors: TcxNeighbors; const AViewParams: TcxViewParams; - AArrows: TcxHeaderArrows; ASideWidth: Integer; AOnDrawBackground: TcxDrawBackgroundEvent = nil); override; - class procedure DrawSchedulerSplitterBorder(ACanvas: TcxCanvas; R: TRect; const AViewParams: TcxViewParams; AIsHorizontal: Boolean); override; - // Group Box - class procedure DrawGroupBoxFrame(ACanvas: TcxCanvas; R: TRect; AEnabled: Boolean; - ACaptionPosition: TcxGroupBoxCaptionPosition; ABorders: TcxBorders = cxBordersAll); override; - end; - - TcxFlatLookAndFeelPainter = class(TcxCustomLookAndFeelPainter) - public - class function LookAndFeelStyle: TcxLookAndFeelStyle; override; - // border - class function BorderSize: Integer; override; - class procedure DrawBorder(ACanvas: TcxCanvas; R: TRect); override; - // buttons - class function ButtonBorderSize(AState: TcxButtonState = cxbsNormal): Integer; override; - class function ButtonTextOffset: Integer; override; - class function ButtonTextShift: Integer; override; - class procedure DrawButtonBorder(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - class procedure DrawExpandButton(ACanvas: TcxCanvas; const R: TRect; AExpanded: Boolean; AColor: TColor = clDefault); override; - class function ExpandButtonSize: Integer; override; - class function IsButtonHotTrack: Boolean; override; - // checkbox - class procedure DrawCheckBorder(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - // header - class procedure DrawHeaderBorder(ACanvas: TcxCanvas; const R: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders); override; - class procedure DrawHeaderControlSectionBorder(ACanvas: TcxCanvas; const R: TRect; - ABorders: TcxBorders; AState: TcxButtonState); override; - class procedure DrawSortingMark(ACanvas: TcxCanvas; const R: TRect; AAscendingSorting: Boolean); override; - class function HeaderBorderSize: Integer; override; - class function SortingMarkSize: TPoint; override; - // footer - class function FooterBorderSize: Integer; override; - class function FooterCellBorderSize: Integer; override; - class function FooterCellOffset: Integer; override; - class procedure DrawFooterBorder(ACanvas: TcxCanvas; const R: TRect); override; - class procedure DrawFooterCellBorder(ACanvas: TcxCanvas; const R: TRect); override; - // filter - class procedure DrawFilterDropDownButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState; AIsFilterActive: Boolean); override; - // tabs - class procedure DrawTabBorder(ACanvas: TcxCanvas; R: TRect; ABorder: TcxBorder; ABorders: TcxBorders; AVertical: Boolean); override; - class procedure DrawTabsRoot(ACanvas: TcxCanvas; const R: TRect; ABorders: TcxBorders; AVertical: Boolean); override; - class function TabBorderSize(AVertical: Boolean): Integer; override; - // scrollbars - class procedure DrawScrollBarPart(ACanvas: TcxCanvas; AHorizontal: Boolean; - R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); override; - // ms outlook - class procedure DrawSchedulerSplitterBorder(ACanvas: TcxCanvas; R: TRect; const AViewParams: TcxViewParams; AIsHorizontal: Boolean); override; - // Group Box - class procedure DrawGroupBoxFrame(ACanvas: TcxCanvas; R: TRect; AEnabled: Boolean; - ACaptionPosition: TcxGroupBoxCaptionPosition; ABorders: TcxBorders = cxBordersAll); override; - // DateNavigator - class procedure DrawDateNavigatorDateHeader(ACanvas: TcxCanvas; var R: TRect); override; - end; - - TcxUltraFlatLookAndFeelPainter = class(TcxCustomLookAndFeelPainter) - protected - // filter - class function FilterDropDownButtonBorderColor(AState: TcxButtonState): TColor; virtual; - // footer - class procedure DrawFooterBorderEx(ACanvas: TcxCanvas; const R: TRect; - ABorders: TcxBorders); override; - // Scheduler - class procedure DrawSchedulerNavigationButtonContent(ACanvas: TcxCanvas; - const ARect: TRect; const AArrowRect: TRect; AIsNextButton: Boolean; - AState: TcxButtonState); override; - // tabs - class function TabBorderHighlightColor: TColor; virtual; - class function TabBorderDarkColor: TColor; virtual; - public - class function LookAndFeelStyle: TcxLookAndFeelStyle; override; - // default - class function DefaultSchedulerBorderColor: TColor; override; - // border - class function BorderHighlightColor: TColor; virtual; - class function BorderSize: Integer; override; - class procedure DrawBorder(ACanvas: TcxCanvas; R: TRect); override; - // buttons - class function ButtonBorderSize(AState: TcxButtonState = cxbsNormal): Integer; override; - class function ButtonColor(AState: TcxButtonState): TColor; override; - class function ButtonFocusRect(ACanvas: TcxCanvas; R: TRect): TRect; override; - class function ButtonGroupBorderSizes(AButtonCount, AButtonIndex: Integer): TRect; override; - class function ButtonSymbolColor(AState: TcxButtonState; - ADefaultColor: TColor = clDefault): TColor; override; - class function ButtonSymbolState(AState: TcxButtonState): TcxButtonState; override; - class function ButtonTextOffset: Integer; override; - class function ButtonTextShift: Integer; override; - class procedure DrawButtonBorder(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - class procedure DrawButtonInGroup(ACanvas: TcxCanvas; R: TRect; - AState: TcxButtonState; AButtonCount, AButtonIndex: Integer; - ABackgroundColor: TColor); override; - class procedure DrawButtonGroupBorder(ACanvas: TcxCanvas; R: TRect; AInplace, ASelected: Boolean); override; - class procedure DrawExpandButton(ACanvas: TcxCanvas; const R: TRect; AExpanded: Boolean; AColor: TColor = clDefault); override; - class procedure DrawHeaderControlSectionBorder(ACanvas: TcxCanvas; const R: TRect; - ABorders: TcxBorders; AState: TcxButtonState); override; - class procedure DrawHeaderControlSectionContent(ACanvas: TcxCanvas; const ABounds, - ATextAreaBounds: TRect; AState: TcxButtonState; AAlignmentHorz: TAlignment; - AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor); override; - class function ExpandButtonSize: Integer; override; - class function IsButtonHotTrack: Boolean; override; - // checkbox - class procedure DrawCheckBorder(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - // header - class procedure DrawHeaderBorder(ACanvas: TcxCanvas; const R: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders); override; - class procedure DrawHeaderEx(ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); override; - class procedure DrawSortingMark(ACanvas: TcxCanvas; const R: TRect; AAscendingSorting: Boolean); override; - class function HeaderBorders(ANeighbors: TcxNeighbors): TcxBorders; override; - class function HeaderBorderSize: Integer; override; - class function SortingMarkSize: TPoint; override; - // footer - class procedure DrawFooterBorder(ACanvas: TcxCanvas; const R: TRect); override; - class procedure DrawFooterCellBorder(ACanvas: TcxCanvas; const R: TRect); override; - class function FooterBorders: TcxBorders; override; - class function FooterBorderSize: Integer; override; - class function FooterCellBorderSize: Integer; override; - class function FooterCellOffset: Integer; override; - // filter - class procedure DrawFilterDropDownButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState; AIsFilterActive: Boolean); override; - class function FilterCloseButtonSize: TPoint; override; - // tabs - class procedure DrawTabBorder(ACanvas: TcxCanvas; R: TRect; ABorder: TcxBorder; ABorders: TcxBorders; AVertical: Boolean); override; - class procedure DrawTabsRoot(ACanvas: TcxCanvas; const R: TRect; ABorders: TcxBorders; AVertical: Boolean); override; - class function TabBorderSize(AVertical: Boolean): Integer; override; - // scrollbars - class procedure DrawScrollBarPart(ACanvas: TcxCanvas; AHorizontal: Boolean; - R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); override; - // ms outlook - class procedure DrawSchedulerNavigatorButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - class procedure DrawSchedulerSplitterBorder(ACanvas: TcxCanvas; R: TRect; const AViewParams: TcxViewParams; AIsHorizontal: Boolean); override; - // Group Box - class procedure DrawGroupBoxFrame(ACanvas: TcxCanvas; R: TRect; AEnabled: Boolean; - ACaptionPosition: TcxGroupBoxCaptionPosition; ABorders: TcxBorders = cxBordersAll); override; - // Printing System - class procedure DrawPrintPreviewBackground(ACanvas: TcxCanvas; const R: TRect); override; - end; - - TcxOffice11LookAndFeelPainter = class(TcxUltraFlatLookAndFeelPainter) - protected - class procedure DrawContent(ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; AState: Integer; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil; AIsFooter: Boolean = False); override; - class function HeaderBottomColor: TColor; virtual; - class function HeaderDarkEdgeColor: TColor; virtual; - class function HeaderHighlightEdgeColor: TColor; virtual; - class function HeaderTopColor: TColor; virtual; - // filter - class function FilterDropDownButtonBorderColor(AState: TcxButtonState): TColor; override; - // tabs - class function TabBorderHighlightColor: TColor; override; - class function TabBorderDarkColor: TColor; override; - // scheduler3 - class procedure DrawSchedulerNavigationButtonContent(ACanvas: TcxCanvas; - const ARect: TRect; const AArrowRect: TRect; AIsNextButton: Boolean; - AState: TcxButtonState); override; - public - class function LookAndFeelStyle: TcxLookAndFeelStyle; override; - class function NeedRedrawOnResize: Boolean; override; - - // colors - class function DefaultDateNavigatorHeaderColor: TColor; override; - class function DefaultDateNavigatorSelectionColor: TColor; override; - class function DefaultDateNavigatorSelectionTextColor: TColor; override; - class function DefaultFilterBoxColor: TColor; override; - class function DefaultFilterBoxTextColor: TColor; override; - class function DefaultFooterColor: TColor; override; - class function DefaultFooterTextColor: TColor; override; - class function DefaultGroupColor: TColor; override; - class function DefaultGroupByBoxColor: TColor; override; - class function DefaultGroupByBoxTextColor: TColor; override; - class function DefaultHeaderColor: TColor; override; - class function DefaultHeaderBackgroundColor: TColor; override; - class function DefaultSchedulerBorderColor: TColor; override; - class function DefaultSchedulerControlColor: TColor; override; - class function DefaultTabColor: TColor; override; - class function DefaultTabsBackgroundColor: TColor; override; - class function DefaultTimeGridMinorScaleColor: TColor; override; - class function DefaultTimeGridSelectionBarColor: TColor; override; - // border - class function BorderHighlightColor: TColor; override; - class procedure DrawBorder(ACanvas: TcxCanvas; R: TRect); override; - // buttons - class function ButtonColor(AState: TcxButtonState): TColor; override; - class function ButtonSymbolColor(AState: TcxButtonState; - ADefaultColor: TColor = clDefault): TColor; override; - class procedure DrawButtonBorder(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - class procedure DrawExpandButton(ACanvas: TcxCanvas; const R: TRect; AExpanded: Boolean; - AColor: TColor = clDefault); override; - class function DrawExpandButtonFirst: Boolean; override; - class procedure DrawSmallExpandButton(ACanvas: TcxCanvas; R: TRect; AExpanded: Boolean; - ABorderColor: TColor; AColor: TColor = clDefault); override; - class function ExpandButtonSize: Integer; override; - class function SmallExpandButtonSize: Integer; override; - // checkbox - class function CheckButtonColor(AState: TcxButtonState): TColor; override; - // filter - class procedure DrawFilterDropDownButton(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState; AIsFilterActive: Boolean); override; - // header - class procedure DrawHeader(ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil; AIsLast: Boolean = False; - AInGroupByBox: Boolean = False); override; - class procedure DrawHeaderBorder(ACanvas: TcxCanvas; const R: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders); override; - class procedure DrawHeaderControlSection(ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, - AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; ATextColor, - ABkColor: TColor); override; - class procedure DrawSortingMark(ACanvas: TcxCanvas; const R: TRect; AAscendingSorting: Boolean); override; - class function HeaderBorders(ANeighbors: TcxNeighbors): TcxBorders; override; - class function HeaderBorderSize: Integer; override; - class function IsHeaderHotTrack: Boolean; override; - // footer - class function FooterSeparatorColor: TColor; override; - // tabs - // scrollbars - class procedure DrawScrollBarPart(ACanvas: TcxCanvas; AHorizontal: Boolean; - R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); override; - // ms outlook - class procedure DrawMonthHeader(ACanvas: TcxCanvas; const ABounds: TRect; - const AText: string; ANeighbors: TcxNeighbors; const AViewParams: TcxViewParams; - AArrows: TcxHeaderArrows; ASideWidth: Integer; AOnDrawBackground: TcxDrawBackgroundEvent = nil); override; - class procedure DrawSchedulerNavigatorButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - class procedure DrawSchedulerBorder(ACanvas: TcxCanvas; R: TRect); override; - // SizeGrip - class procedure DrawSizeGrip(ACanvas: TcxCanvas; const ARect: TRect; ABackgroundColor: TColor = clDefault); override; - // Group Box - class procedure DrawGroupBoxFrame(ACanvas: TcxCanvas; R: TRect; - AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition; - ABorders: TcxBorders = cxBordersAll); override; - class function GroupBoxTextColor(AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition): TColor; override; - // Panel - class procedure DrawPanelBackground(ACanvas: TcxCanvas; AControl: TWinControl; ABounds: TRect; - AColorFrom: TColor = clDefault; AColorTo: TColor = clDefault); override; - // Layout Control - class procedure DrawLayoutControlBackground(ACanvas: TcxCanvas; const R: TRect); override; - // DateNavigator - class procedure DrawDateNavigatorDateHeader(ACanvas: TcxCanvas; var R: TRect); override; - end; - - TcxWinXPLookAndFeelPainter = class(TcxStandardLookAndFeelPainter) - protected - class procedure DrawContent(ACanvas: TcxCanvas; ATheme: TdxTheme; APartId, AStateId: Integer; - const ABounds, ATextAreaBounds: TRect; AAlignmentHorz: TAlignment; - AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis, AShowPrefix: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor); reintroduce; virtual; - class procedure DrawSchedulerNavigationButtonContent(ACanvas: TcxCanvas; - const ARect: TRect; const AArrowRect: TRect; AIsNextButton: Boolean; - AState: TcxButtonState); override; - public - class function LookAndFeelStyle: TcxLookAndFeelStyle; override; - class function NeedRedrawOnResize: Boolean; override; - - // colors - class function DefaultSchedulerBorderColor: TColor; override; - // arrow - class procedure DrawArrow(ACanvas: TcxCanvas; const R: TRect; AArrowDirection: TcxArrowDirection; AColor: TColor); override; - class procedure DrawArrow(ACanvas: TcxCanvas; const R: TRect; AState: TcxButtonState; AArrowDirection: TcxArrowDirection; ADrawBorder: Boolean = True); override; - class procedure DrawArrowBorder(ACanvas: TcxCanvas; const R: TRect; AState: TcxButtonState); override; - // border - class function BorderSize: Integer; override; - class procedure DrawBorder(ACanvas: TcxCanvas; R: TRect); override; - // buttons - class function AdjustGroupButtonDisplayRect(const R: TRect; AButtonCount, AButtonIndex: Integer): TRect; override; - class function ButtonBorderSize(AState: TcxButtonState = cxbsNormal): Integer; override; - class function ButtonColor(AState: TcxButtonState): TColor; override; - class function ButtonFocusRect(ACanvas: TcxCanvas; R: TRect): TRect; override; - class function ButtonGroupBorderSizes(AButtonCount, AButtonIndex: Integer): TRect; override; - class function ButtonSymbolColor(AState: TcxButtonState; - ADefaultColor: TColor = clDefault): TColor; override; - class function ButtonTextOffset: Integer; override; - class function ButtonTextShift: Integer; override; - class procedure DrawButton(ACanvas: TcxCanvas; R: TRect; const ACaption: string; - AState: TcxButtonState; ADrawBorder: Boolean = True; AColor: TColor = clDefault; - ATextColor: TColor = clDefault; AWordWrap: Boolean = False; AIsToolButton: Boolean = False); override; - class procedure DrawExpandButton(ACanvas: TcxCanvas; const R: TRect; AExpanded: Boolean; AColor: TColor = clDefault); override; - class function DrawExpandButtonFirst: Boolean; override; - class procedure DrawGroupExpandButton(ACanvas: TcxCanvas; const R: TRect; AExpanded: Boolean; AState: TcxButtonState); override; - class procedure DrawSmallExpandButton(ACanvas: TcxCanvas; R: TRect; AExpanded: Boolean; - ABorderColor: TColor; AColor: TColor = clDefault); override; - class function ExpandButtonSize: Integer; override; - class function GroupExpandButtonSize: Integer; override; - class function SmallExpandButtonSize: Integer; override; - class function IsButtonHotTrack: Boolean; override; - class function IsPointOverGroupExpandButton(const R: TRect; const P: TPoint): Boolean; override; - // checkbox - class function CheckBorderSize: Integer; override; - class function CheckButtonSize: TSize; override; - class procedure DrawCheck(ACanvas: TcxCanvas; const R: TRect; AState: TcxButtonState; - AChecked: Boolean; AColor: TColor); override; - class procedure DrawCheckBorder(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - // RadioGroup - class procedure DrawRadioButton(ACanvas: TcxCanvas; X, Y: Integer; - AButtonState: TcxButtonState; AChecked: Boolean; AFocused: Boolean; ABrushColor: TColor; AIsDesigning: Boolean = False); override; - class function RadioButtonSize: TSize; override; - // header - class procedure DrawHeader(ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil; AIsLast: Boolean = False; - AInGroupByBox: Boolean = False); override; - class procedure DrawHeaderPressed(ACanvas: TcxCanvas; const ABounds: TRect); override; - class procedure DrawHeaderControlSection(ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, - AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; ATextColor, - ABkColor: TColor); override; - class procedure DrawSortingMark(ACanvas: TcxCanvas; const R: TRect; AAscendingSorting: Boolean); override; - class function HeaderBorderSize: Integer; override; - class function HeaderControlSectionBorderSize( - AState: TcxButtonState = cxbsNormal): Integer; override; - class function HeaderControlSectionContentBounds(const ABounds: TRect; - AState: TcxButtonState): TRect; override; -// class function HeaderDrawCellsFirst: Boolean; override; - class function IsHeaderHotTrack: Boolean; override; - class function SortingMarkSize: TPoint; override; - // footer - class procedure DrawFooterBorder(ACanvas: TcxCanvas; const R: TRect); override; - class procedure DrawFooterCell(ACanvas: TcxCanvas; const ABounds: TRect; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); override; - class function FooterBorderSize: Integer; override; - class function FooterCellBorderSize: Integer; override; - class function FooterCellOffset: Integer; override; - class function FooterDrawCellsFirst: Boolean; override; - // filter - class procedure DrawFilterCloseButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - class procedure DrawFilterDropDownButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState; AIsFilterActive: Boolean); override; - class function FilterActivateButtonSize: TPoint; override; - class function FilterCloseButtonSize: TPoint; override; - // tabs - class procedure DrawTab(ACanvas: TcxCanvas; R: TRect; ABorders: TcxBorders; - const AText: string; AState: TcxButtonState; AVertical: Boolean; AFont: TFont; - ATextColor, ABkColor: TColor; AShowPrefix: Boolean = False); override; - class procedure DrawTabBorder(ACanvas: TcxCanvas; R: TRect; ABorder: TcxBorder; ABorders: TcxBorders; AVertical: Boolean); override; - class procedure DrawTabsRoot(ACanvas: TcxCanvas; const R: TRect; ABorders: TcxBorders; AVertical: Boolean); override; - class function IsDrawTabImplemented(AVertical: Boolean): Boolean; override; - class function IsTabHotTrack(AVertical: Boolean): Boolean; override; - class function TabBorderSize(AVertical: Boolean): Integer; override; - // indicator - class procedure DrawIndicatorItem(ACanvas: TcxCanvas; const R: TRect; - AKind: TcxIndicatorKind; AColor: TColor; AOnDrawBackground: TcxDrawBackgroundEvent = nil); override; - //class function IndicatorDrawItemsFirst: Boolean; override; - // scrollbars - class function ScrollBarMinimalThumbSize(AVertical: Boolean): Integer; override; - class procedure DrawScrollBarPart(ACanvas: TcxCanvas; AHorizontal: Boolean; - R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); override; - // ms outlook - class function DefaultSchedulerViewContentColor: TColor; override; - class procedure DrawMonthHeader(ACanvas: TcxCanvas; const ABounds: TRect; - const AText: string; ANeighbors: TcxNeighbors; const AViewParams: TcxViewParams; - AArrows: TcxHeaderArrows; ASideWidth: Integer; AOnDrawBackground: TcxDrawBackgroundEvent = nil); override; - class procedure DrawSchedulerEventProgress(ACanvas: TcxCanvas; - const ABounds, AProgressChunk: TRect; AViewParams: TcxViewParams; - ATransparent: Boolean); override; - class procedure DrawSchedulerNavigatorButton(ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); override; - class procedure DrawSchedulerSplitterBorder(ACanvas: TcxCanvas; R: TRect; const AViewParams: TcxViewParams; AIsHorizontal: Boolean); override; - class function SchedulerEventProgressOffsets: TRect; override; - // size grip - class procedure DrawSizeGrip(ACanvas: TcxCanvas; const ARect: TRect; ABackgroundColor: TColor = clDefault); override; - // GroupBox - class procedure DrawGroupBoxFrame(ACanvas: TcxCanvas; R: TRect; AEnabled: Boolean; - ACaptionPosition: TcxGroupBoxCaptionPosition; ABorders: TcxBorders = cxBordersAll); override; - class function GroupBoxTextColor(AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition): TColor; override; - // Panel - class procedure DrawPanelBackground(ACanvas: TcxCanvas; AControl: TWinControl; ABounds: TRect; - AColorFrom: TColor = clDefault; AColorTo: TColor = clDefault); override; - // DateNavigator - class procedure DrawDateNavigatorDateHeader(ACanvas: TcxCanvas; var R: TRect); override; - end; - - { TcxExtendedStylePainters } - - TcxExtendedStylePainterInfo = class - public - Data: TObject; - Name: string; - Painter: TcxCustomLookAndFeelPainterClass; - constructor Create(const AName: string; - APainter: TcxCustomLookAndFeelPainterClass; AData: TObject); virtual; - destructor Destroy; override; - end; - - TcxExtendedStylePainters = class(TcxObjectList) - private - FListeners: TInterfaceList; - function GetData(AIndex: Integer): TObject; - function GetItem(AIndex: Integer): TcxExtendedStylePainterInfo; - function GetName(AIndex: Integer): string; - function GetPainter(AIndex: Integer): TcxCustomLookAndFeelPainterClass; - protected - procedure Changed(APainter: TcxCustomLookAndFeelPainterClass); - function FindInfoByName(const AName: string; var AInfo: TcxExtendedStylePainterInfo): Integer; - procedure SortPainters; - public - constructor Create; virtual; - destructor Destroy; override; - procedure AddListener(AListener: IcxLookAndFeelPainterListener); - procedure RemoveListener(AListener: IcxLookAndFeelPainterListener); - - function Register(const AName: string; - APainter: TcxCustomLookAndFeelPainterClass; AData: TObject): Boolean; - function GetNameByPainter(APainter: TcxCustomLookAndFeelPainterClass; - out AName: string): Boolean; - function GetPainterData(APainter: TcxCustomLookAndFeelPainterClass; var Data): Boolean; - function GetPainterByName(const AName: string; - out Painter: TcxCustomLookAndFeelPainterClass): Boolean; - function Unregister(const AName: string): Boolean; - - property Data[Index: Integer]: TObject read GetData; - property Listeners: TInterfaceList read FListeners write FListeners; - property Names[Index: Integer]: string read GetName; - property Items[Index: Integer]: TcxExtendedStylePainterInfo read GetItem; - property Painters[Index: Integer]: TcxCustomLookAndFeelPainterClass read GetPainter; - end; - -function BtnStateToXPBtnState(AState: TcxButtonState): Integer; - -function GetCurrentPainterClass: TcxCustomLookAndFeelPainterClass; -function GetExtendedStylePainters: TcxExtendedStylePainters; -procedure PrepareRadioButtonImageList; -procedure UpdateScrollBarBitmaps; - -function cxTextRect(const R: TRect): TRect; - -var - cxEditStateColorKindMap: array[Boolean] of TcxEditStateColorKind = - (esckDisabled, esckNormal); - cxIndicatorImages: TImageList; - -implementation - -{$R cxLookAndFeelPainters.res} - -uses - Messages, - Forms, SysUtils, dxThemeConsts, cxControls, cxLookAndFeels, Math, cxDrawTextUtils; - -const - FilterDropDownButtonWidth = 15; - - SortingMarkAreaWidth = 16; - FilterActiveButtonWidth = 13; - FilterActiveButtonHeight = 13; - FilterCloseButtonWidth = 16; - FilterCloseButtonHeight = 14; - - ActiveFilterButtonArrowColor = clBlue; - -function LookAndFeelStyleToLookAndFeelKind( - ALookAndFeelStyle: TcxLookAndFeelStyle): TcxLookAndFeelKind; -begin - case ALookAndFeelStyle of - lfsFlat: - Result := lfFlat; - lfsStandard: - Result := lfStandard; - lfsUltraFlat: - Result := lfUltraFlat; - lfsOffice11: - Result := lfOffice11; - else - Result := lfStandard; - end; -end; - -type - { TSystemPaletteChangedNotifier } - - TSystemPaletteChangedNotifier = class(TcxSystemPaletteChangedNotifier) - protected - procedure DoChanged; override; - end; - - { TcxRadioButtonImageList } - - TcxRadioButtonImageList = class - private - FButtonMask: TBitmap; - FList: TImageList; - FRadioButtonCheckRect: TRect; - FRadioButtonPattern: array of array of Integer; - FRadioButtonRect: TRect; - - function GetImageIndex(ALookAndFeelKind: TcxLookAndFeelKind; - AButtonState: TcxButtonState; - AChecked, AFocused, AIsDesigning: Boolean): Integer; - function GetImageListIndexMapIndex(ALookAndFeelKind: TcxLookAndFeelKind; - AButtonState: TcxButtonState; - AChecked, AFocused, AIsDesigning: Boolean): Integer; - - procedure CalculateRadioButtonSize; - procedure PrepareRadioButtonPattern; - public - constructor Create; - destructor Destroy; override; - procedure Draw(ACanvas: TcxCanvas; X, Y: Integer; ABrushColor: TColor; - ALookAndFeelKind: TcxLookAndFeelKind; AButtonState: TcxButtonState; - AChecked, AFocused, AIsDesigning: Boolean); - function GetSize: TSize; - procedure Prepare; - procedure Reset; - end; - -var - FCheckButtonSize: TSize; - FRadioButtonImageList: TcxRadioButtonImageList; - FRadioButtonImageListIndexes: array of Integer; - FRadioButtonSize: TSize; - ExtendedStylePainters: TcxExtendedStylePainters; - FSystemPaletteChangedNotifier: TSystemPaletteChangedNotifier; - StdScrollBitmaps: array[Boolean] of TBitmap; - -function RadioButtonImageList: TcxRadioButtonImageList; -begin - if FRadioButtonImageList = nil then - begin - FRadioButtonImageList := TcxRadioButtonImageList.Create; - FRadioButtonImageList.Prepare; - end; - Result := FRadioButtonImageList; -end; - -const -// FilledRadioButtonListSize = 48; - cxPixelColorMask = $FFFFFF; - -procedure InternalRoundRect(ACanvas: TCanvas; const R: TRect); -begin - ACanvas.RoundRect(R.Left, R.Top, R.Right, R.Bottom, cxRectWidth(R) - 1, cxRectHeight(R) - 1); -end; - -constructor TcxRadioButtonImageList.Create; - - procedure PrepareButtonMask; - var - R: TRect; - begin - FButtonMask := TBitmap.Create; - FButtonMask.Monochrome := True; - FButtonMask.Width := FRadioButtonSize.cx; - FButtonMask.Height := FRadioButtonSize.cy; - - with FButtonMask.Canvas do - begin - Brush.Color := clWhite; - R := Rect(0, 0, FRadioButtonSize.cx, FRadioButtonSize.cy); - FillRect(R); - Brush.Color := clBlack; - Pen.Color := clBlack; - InternalRoundRect(FButtonMask.Canvas, R); - end; - end; - -begin - inherited Create; - CalculateRadioButtonSize; - FList := TImageList.Create(nil); - with FList do - begin - Width := FRadioButtonSize.cx; - Height := FRadioButtonSize.cy; - Masked := True; - ImageType := itImage; - end; - PrepareButtonMask; - PrepareRadioButtonPattern; -end; - -destructor TcxRadioButtonImageList.Destroy; -begin - FreeAndNil(FList); - FreeAndNil(FButtonMask); - inherited Destroy; -end; - -procedure TcxRadioButtonImageList.Draw(ACanvas: TcxCanvas; X, Y: Integer; - ABrushColor: TColor; ALookAndFeelKind: TcxLookAndFeelKind; - AButtonState: TcxButtonState; AChecked, AFocused, AIsDesigning: Boolean); - - procedure DrawGlyph(ACanvas: TcxCanvas; AImageList: TCustomImageList; - AImageIndex: TImageIndex; const AGlyphRect: TRect; ABrushColor: TColor; - AEnabled: Boolean; ABackgroundBitmap: TBitmap = nil); - var - ABitmap: TBitmap; - ABrush: HBRUSH; - begin - ABitmap := nil; - try - if ABackgroundBitmap = nil then - begin - ABitmap := TBitmap.Create; - ABitmap.Width := AImageList.Width; - ABitmap.Height := AImageList.Height; - ABrush := CreateSolidBrush(ColorToRGB(ABrushColor)); - Windows.FillRect(ABitmap.Canvas.Handle, Rect(0, 0, ABitmap.Width, ABitmap.Height), ABrush); - DeleteObject(ABrush); - end; - if ABackgroundBitmap <> nil then - begin - AImageList.Draw(ABackgroundBitmap.Canvas, 0, 0, AImageIndex, AEnabled); // ??? itMask TODO - ACanvas.Draw(AGlyphRect.Left, AGlyphRect.Top, ABackgroundBitmap); - end else - begin - AImageList.Draw(ABitmap.Canvas, 0, 0, AImageIndex, AEnabled); // ??? itMask TODO - ACanvas.Draw(AGlyphRect.Left, AGlyphRect.Top, ABitmap); - end; - finally - if ABitmap <> nil then - ABitmap.Free; - end; - end; - -var - AImageIndex: Integer; -begin - AImageIndex := GetImageIndex(ALookAndFeelKind, AButtonState, AChecked, - AFocused, AIsDesigning); - if ABrushColor = clDefault then - FList.Draw(ACanvas.Canvas, X, Y, AImageIndex) - else - DrawGlyph(ACanvas, FList, AImageIndex, Rect(X, Y, X + FList.Width, - Y + FList.Height), ABrushColor, True); -end; - -function TcxRadioButtonImageList.GetSize: TSize; -begin - Result := Size(FList.Width, FList.Height); -end; - -procedure TcxRadioButtonImageList.Prepare; -var - AColorMap: array[0 .. 6] of TColor; - - function GetRadioButtonBodyColor(ALookAndFeelKind: TcxLookAndFeelKind; AButtonState: TcxButtonState): TColor; - begin - // TODO: to method - if ALookAndFeelKind = lfOffice11 then - begin - if AButtonState = cxbsNormal then - Result := clWindow - else - Result := TcxOffice11LookAndFeelPainter.ButtonColor(AButtonState); - end - else - if AButtonState <> cxbsDisabled then - begin - if ALookAndFeelKind = lfUltraFlat then - begin - Result := clBtnFace; - case AButtonState of - cxbsHot: - Result := GetLightSelColor; - cxbsNormal: - Result := clWindow{clBtnFace}; - cxbsPressed: - Result := GetLightDownedSelColor; - end; - end - else - if AButtonState = cxbsPressed then - Result := clBtnFace - else - Result := clWindow; - end - else - Result := clBtnFace; - end; - - procedure PrepareColorMap(ALookAndFeelKind: TcxLookAndFeelKind; - AButtonState: TcxButtonState; AChecked, AFocused, AIsDesigning: Boolean); - var - I: Integer; - begin - AColorMap[0] := clBlack; - AColorMap[5] := GetRadioButtonBodyColor(ALookAndFeelKind, AButtonState); - case ALookAndFeelKind of - lfStandard: - begin - AColorMap[1] := clBtnShadow; - AColorMap[2] := clBtnHighlight; - AColorMap[3] := cl3DDkShadow; - AColorMap[4] := cl3DLight; - end; - lfFlat: - begin - AColorMap[1] := clBtnShadow; - AColorMap[2] := clBtnHighlight; - AColorMap[3] := cl3DLight; - AColorMap[4] := cl3DLight; - end; - lfUltraFlat: - begin - if AFocused or (AButtonState in [cxbsHot, cxbsPressed]) or (AIsDesigning and - (AButtonState <> cxbsDisabled)) then - AColorMap[1] := clHighlight - else - AColorMap[1] := clBtnShadow; - AColorMap[2] := AColorMap[1]; - AColorMap[3] := AColorMap[5]; - AColorMap[4] := AColorMap[5]; - end; - lfOffice11: // TODO: to method - begin - if AButtonState = cxbsDisabled then - AColorMap[1] := dxOffice11TextDisabledColor - else - if AFocused or (AButtonState in [cxbsHot, cxbsPressed]) or AIsDesigning then - AColorMap[1] := dxOffice11SelectedBorderColor - else - AColorMap[1] := clBtnText;//dxOffice11BarFloatingBorderColor1; //clBtnShadow; - AColorMap[2] := AColorMap[1]; - AColorMap[3] := AColorMap[5]; - AColorMap[4] := AColorMap[5]; - end; - end; - - if not AChecked then - AColorMap[6] := AColorMap[5] - else - if AButtonState <> cxbsDisabled then - AColorMap[6] := clWindowText - else - if ALookAndFeelKind = lfOffice11 then - AColorMap[6] := dxOffice11TextDisabledColor - else - AColorMap[6] := clBtnShadow; - - for I := 0 to 6 do - begin - AColorMap[I] := ColorToRGB(AColorMap[I]); - AColorMap[I] := RGB(GetBValue(AColorMap[I]), GetGValue(AColorMap[I]), GetRValue(AColorMap[I])); - end; - end; - -var - ABitmap: TBitmap; - AButtonState: TcxButtonState; - AChecked, AFocused, AIsDesigning: Boolean; - AImageListIndexMapIndex, I, J: Integer; - ALookAndFeelKind: TcxLookAndFeelKind; - ABitmapInfo: TBitmapInfo; - RGBs: array of Integer; -begin - if FList.Count > 0 then exit; - ABitmap := TBitmap.Create; - try - ABitmap.Width := FRadioButtonSize.cx; - ABitmap.Height := FRadioButtonSize.cy; - ABitmap.PixelFormat := pf32bit; - ABitmap.HandleType := bmDDB; - SetLength(RGBs, ABitmap.Width * ABitmap.Height); - ABitmapInfo.bmiHeader.biSize := SizeOf(ABitmapInfo.bmiHeader); - ABitmapInfo.bmiHeader.biWidth := ABitmap.Width; - ABitmapInfo.bmiHeader.biHeight := -ABitmap.Height; - ABitmapInfo.bmiHeader.biPlanes := 1; - ABitmapInfo.bmiHeader.biBitCount := 32; - ABitmapInfo.bmiHeader.biCompression := BI_RGB; - - for AFocused := False to True do - for AIsDesigning := False to True do - for ALookAndFeelKind := Low(TcxLookAndFeelKind) to High(TcxLookAndFeelKind) do - for AChecked := False to True do - for AButtonState := Succ(Low(TcxButtonState)) to High(TcxButtonState) do - begin - PrepareColorMap(ALookAndFeelKind, AButtonState, AChecked, - AFocused, AIsDesigning); - for I := 0 to FRadioButtonSize.cy - 1 do - for J := 0 to FRadioButtonSize.cx - 1 do - RGBs[I * ABitmap.Width + J] := AColorMap[FRadioButtonPattern[I, J]]; - SetDIBits(ABitmap.Canvas.Handle, ABitmap.Handle, 0, ABitmap.Height, RGBs, ABitmapInfo, DIB_RGB_COLORS); - FList.Add(ABitmap, FButtonMask); - AImageListIndexMapIndex := GetImageListIndexMapIndex( - ALookAndFeelKind, AButtonState, AChecked, AFocused, AIsDesigning); - if AImageListIndexMapIndex + 1 > Length(FRadioButtonImageListIndexes) then - SetLength(FRadioButtonImageListIndexes, AImageListIndexMapIndex + 1); - FRadioButtonImageListIndexes[AImageListIndexMapIndex] := FList.Count - 1; - end; - finally - ABitmap.Free; - end; -end; - -procedure TcxRadioButtonImageList.Reset; -begin - FList.Clear; - Prepare; -end; - -function TcxRadioButtonImageList.GetImageIndex( - ALookAndFeelKind: TcxLookAndFeelKind; AButtonState: TcxButtonState; - AChecked, AFocused, AIsDesigning: Boolean): Integer; -begin - Result := FRadioButtonImageListIndexes[ - GetImageListIndexMapIndex(ALookAndFeelKind, AButtonState, AChecked, - AFocused, AIsDesigning)]; -end; - -function TcxRadioButtonImageList.GetImageListIndexMapIndex( - ALookAndFeelKind: TcxLookAndFeelKind; AButtonState: TcxButtonState; - AChecked, AFocused, AIsDesigning: Boolean): Integer; -var - AButtonStateIndex: Integer; - ALookAndFeelKindCount: Integer; -begin - AButtonStateIndex := Integer(AButtonState) - 1; - ALookAndFeelKindCount := Integer(High(TcxLookAndFeelKind)) - - Integer(Low(TcxLookAndFeelKind)) + 1; - - Result := (Integer(AFocused) * 2 * ALookAndFeelKindCount + Integer(AIsDesigning) * ALookAndFeelKindCount + - Integer(ALookAndFeelKind)) * 8 + Integer(AChecked) * 4 + AButtonStateIndex; -end; - -procedure TcxRadioButtonImageList.CalculateRadioButtonSize; -var - B: Windows.TBitmap; - HB: HBITMAP; - ABitmap: TBitmap; - I, J: Integer; - FRadioButtonMaskSize: TSize; -begin - HB := LoadBitmap(0, PChar(OBM_CHECKBOXES)); - try - cxGetBitmapData(HB, B); - finally - DeleteObject(HB); - end; - FRadioButtonMaskSize.cx := B.bmWidth div 4; - FRadioButtonMaskSize.cy := B.bmHeight div 3; - ABitmap := cxCreateBitmap(FRadioButtonMaskSize); - try - ABitmap.Canvas.Brush.Color := 0; - ABitmap.Canvas.FillRect(Rect(0, 0, FRadioButtonMaskSize.cx, FRadioButtonMaskSize.cy)); - DrawFrameControl(ABitmap.Canvas.Handle, Rect(0, 0, FRadioButtonMaskSize.cx, - FRadioButtonMaskSize.cy), DFC_BUTTON, DFCS_BUTTONRADIOMASK + DFCS_FLAT); - FRadioButtonSize.cX := 0; - FRadioButtonSize.cY := 0; - FRadioButtonRect.Left := -1; - FRadioButtonRect.Top := -1; - for J := 0 to FRadioButtonMaskSize.cx - 1 do - for I := 0 to FRadioButtonMaskSize.cy - 1 do - if ABitmap.Canvas.Pixels[J, I] = 0 then - begin - if FRadioButtonRect.Left = -1 then - FRadioButtonRect.Left := J; - Inc(FRadioButtonSize.cX); - Break; - end; - for I := 0 to FRadioButtonMaskSize.cy - 1 do - for J := 0 to FRadioButtonMaskSize.cx - 1 do - if ABitmap.Canvas.Pixels[J, I] = 0 then - begin - if FRadioButtonRect.Top = -1 then - FRadioButtonRect.Top := I; - Inc(FRadioButtonSize.cY); - Break; - end; - FRadioButtonRect.Right := FRadioButtonRect.Left + FRadioButtonSize.cx; - FRadioButtonRect.Bottom := FRadioButtonRect.Top + FRadioButtonSize.cy; - ABitmap.Canvas.Brush.Color := 0; - ABitmap.Canvas.FillRect(Rect(0, 0, FRadioButtonMaskSize.cx, FRadioButtonMaskSize.cy)); - DrawFrameControl(ABitmap.Canvas.Handle, Rect(0, 0, FRadioButtonMaskSize.cx, - FRadioButtonMaskSize.cy), DFC_BUTTON, DFCS_BUTTONRADIOIMAGE + DFCS_FLAT + DFCS_CHECKED); - I := FRadioButtonRect.Top + (FRadioButtonSize.cy div 2) - 2; - J := FRadioButtonRect.Left + (FRadioButtonSize.cx div 2) - 1; - while ABitmap.Canvas.Pixels[J, I] = ColorToRGB(clWindowText) do - Dec(I); - Inc(I); - FRadioButtonCheckRect.Top := I; - repeat - Inc(I); - until ABitmap.Canvas.Pixels[J, I] <> ColorToRGB(clWindowText); - FRadioButtonCheckRect.Bottom := I; - - I := FRadioButtonRect.Top + (FRadioButtonSize.cy div 2) - 1; - J := FRadioButtonRect.Left + (FRadioButtonSize.cx div 2) - 2; - while ABitmap.Canvas.Pixels[J, I] = ColorToRGB(clWindowText) do - Dec(J); - Inc(J); - FRadioButtonCheckRect.Left := J; - repeat - Inc(J); - until ABitmap.Canvas.Pixels[J, I] <> ColorToRGB(clWindowText); - FRadioButtonCheckRect.Right := J; - finally - ABitmap.Free; - end; -end; - -procedure TcxRadioButtonImageList.PrepareRadioButtonPattern; - - procedure PrepareOuterCircle; - var - ABitmap: TBitmap; - I, J: Integer; - begin - ABitmap := cxCreateBitmap(FRadioButtonSize, pf32bit); - try - ABitmap.Canvas.Brush.Color := clWhite; - ABitmap.Canvas.FillRect(cxRect(cxNullPoint, cxPoint(FRadioButtonSize))); - ABitmap.Canvas.Pen.Color := clBlack; - InternalRoundRect(ABitmap.Canvas, cxRect(cxNullPoint, cxPoint(FRadioButtonSize))); - SetLength(FRadioButtonPattern, FRadioButtonSize.cy, FRadioButtonSize.cx); - for I := 0 to FRadioButtonSize.cy - 1 do - begin - for J := 0 to FRadioButtonSize.cx - 1 do - begin - if ABitmap.Canvas.Pixels[J, I] and cxPixelColorMask <> 0 then - FRadioButtonPattern[I, J] := 0 - else - if (FRadioButtonSize.cy - 1) * (FRadioButtonSize.cx - 1 - J) < I * (FRadioButtonSize.cx - 1) then - FRadioButtonPattern[I, J] := 2 - else - FRadioButtonPattern[I, J] := 1; - end; - end; - finally - ABitmap.Free; - end; - end; - - procedure PrepareInnerCircle; - - procedure FillPoint(I, J: Integer); - var - ASign: Integer; - begin - ASign := (FRadioButtonSize.cy - 1) * (FRadioButtonSize.cx - 1 - J) - I * (FRadioButtonSize.cx - 1); - if ASign = 0 then - if J <= FRadioButtonSize.cx div 2 - 1 then - FRadioButtonPattern[I, J] := 3 - else - FRadioButtonPattern[I, J] := 4 - else - if ASign < 0 then - FRadioButtonPattern[I, J] := 4 - else - FRadioButtonPattern[I, J] := 3; - end; - - var - I, I1, J, J1: Integer; - AFirstColumn, ALastColumn, AFirstRow, ALastRow: Integer; - begin - AFirstRow := 1; - ALastRow := FRadioButtonSize.cy - 2; - J1 := FRadioButtonSize.cx div 2 - 1; - - for I := AFirstRow to ALastRow do - begin - J := J1; - while FRadioButtonPattern[I, J] = 0 do - begin - FRadioButtonPattern[I, J] := 5; - Dec(J); - end; - J := J1 + 1; - while FRadioButtonPattern[I, J] = 0 do - begin - FRadioButtonPattern[I, J] := 5; - Inc(J); - end; - end; - - for I := AFirstRow to ALastRow do - begin - J := J1; - while not(FRadioButtonPattern[I, J] in [1, 2]) do - begin - if (I = AFirstRow) or (I = ALastRow) then - FillPoint(I, J); - Dec(J); - end; - Inc(J); - FillPoint(I, J); - J := J1 + 1; - while not(FRadioButtonPattern[I, J] in [1, 2]) do - begin - if (I = AFirstRow) or (I = ALastRow) then - FillPoint(I, J); - Inc(J); - end; - Dec(J); - FillPoint(I, J); - end; - - AFirstColumn := 1; - ALastColumn := FRadioButtonSize.cx - 2; - I1 := FRadioButtonSize.cy div 2 - 1; - for J := AFirstColumn to ALastColumn do - begin - I := I1; - while not(FRadioButtonPattern[I, J] in [1, 2]) do - begin - if (J = AFirstColumn) or (J = ALastColumn) then - FillPoint(I, J); - Dec(I); - end; - Inc(I); - FillPoint(I, J); - I := I1 + 1; - while not(FRadioButtonPattern[I, J] in [1, 2]) do - begin - if (J = AFirstColumn) or (J = ALastColumn) then - FillPoint(I, J); - Inc(I); - end; - Dec(I); - FillPoint(I, J); - end; - end; - - procedure PrepareCheck; - var - ABitmap: TBitmap; - I, J: Integer; - R: TRect; - begin - ABitmap := cxCreateBitmap(FRadioButtonSize, pf32Bit); - try - ABitmap.Canvas.Brush.Color := clWhite; - ABitmap.Canvas.FillRect(cxRect(cxNullPoint, cxPoint(FRadioButtonSize))); - ABitmap.Canvas.Pen.Color := clBlack; - ABitmap.Canvas.Brush.Color := clBlack; - R := cxRectOffset(FRadioButtonCheckRect, cxPointInvert(FRadioButtonRect.TopLeft)); - InternalRoundRect(ABitmap.Canvas, R); - for I := 0 to FRadioButtonSize.cy - 1 do - begin - for J := 0 to FRadioButtonSize.cx - 1 do - begin - if ABitmap.Canvas.Pixels[J, I] and cxPixelColorMask = 0 then - FRadioButtonPattern[I, J] := 6; - end; - end; - finally - ABitmap.Free; - end; - end; - -begin - PrepareOuterCircle; - PrepareInnerCircle; - PrepareCheck; -end; - -{ TSystemPaletteChangedNotifier } - -procedure TSystemPaletteChangedNotifier.DoChanged; -begin - if FRadioButtonImageList <> nil then - FRadioButtonImageList.Reset; -end; - -{ TcxCustomLookAndFeelPainter } - -class procedure TcxCustomLookAndFeelPainter.DrawBackground(ACanvas: TcxCanvas; - const ARect: TRect; ATransparent: Boolean; ABackgroundColor: TColor; - const ABackgroundBitmap: TBitmap); -begin - if not ATransparent then - begin - ACanvas.Brush.Color := ABackgroundColor; - ACanvas.FillRect(ARect); - end - else - if ABackgroundBitmap <> nil then - ACanvas.FillRect(ARect, ABackgroundBitmap); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawButtonArrow(ACanvas: TcxCanvas; - const R: TRect; AColor: TColor); -var - P: array[0..2] of TPoint; - - procedure CalculatePoints; - var - ASize: TPoint; - - function _GetSize: TPoint; - begin - Result.X := (R.Right - R.Left) div 2; - if not Odd(Result.X) then Inc(Result.X); - Result.Y := Result.X div 2 + 1; - end; - - begin - with R do - begin - ASize := _GetSize; - P[0] := Point((Left + Right - ASize.X) div 2, MulDiv(Top + Bottom - ASize.Y, 1, 2)); - P[1] := Point(P[0].X + ASize.X - 1, P[0].Y); - P[2] := Point(P[0].X + ASize.X div 2, P[0].Y + ASize.Y - 1); - end; - end; - -begin - CalculatePoints; - with ACanvas do - begin - Brush.Color := AColor; - Pen.Color := AColor; - Polygon(P); - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawContent(ACanvas: TcxCanvas; - const ABounds, ATextAreaBounds: TRect; AState: Integer; AAlignmentHorz: TAlignment; - AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil; AIsFooter: Boolean = False); -const - MultiLines: array[Boolean] of Integer = (cxSingleLine, cxWordBreak); - ShowEndEllipsises: array[Boolean] of Integer = (0, cxShowEndEllipsis); -begin - with ACanvas do - begin - if not Assigned(AOnDrawBackground) or not AOnDrawBackground(ACanvas, ABounds) then - begin - SetBrushColor(ABkColor); - FillRect(ABounds); - end; - if AText <> '' then - begin - Brush.Style := bsClear; - Font := AFont; - Font.Color := ATextColor; - DrawText(AText, ATextAreaBounds, cxAlignmentsHorz[AAlignmentHorz] or - cxAlignmentsVert[AAlignmentVert] or MultiLines[AMultiLine] or - ShowEndEllipsises[AShowEndEllipsis]); - Brush.Style := bsSolid; - end; - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawExpandButtonCross(ACanvas: TcxCanvas; - const R: TRect; AExpanded: Boolean; AColor: TColor); -var - ASize, X, Y: Integer; -begin - with R do - begin - ASize := Right - Left - 2 * 2; - X := GetRangeCenter(Left, Right); - Y := GetRangeCenter(Top, Bottom); - end; - ACanvas.Brush.Color := AColor; - ACanvas.FillRect(Rect(X - ASize div 2, Y, X + ASize div 2 + 1, Y + 1)); - if not AExpanded then - ACanvas.FillRect(Rect(X, Y - ASize div 2, X + 1, Y + ASize div 2 + 1)); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFooterBorderEx(ACanvas: TcxCanvas; - const R: TRect; ABorders: TcxBorders); -var - ABounds: TRect; -begin - DrawFooterSeparator(ACanvas, cxRectSetHeight(R, FooterSeparatorSize)); - ABounds := R; - Inc(ABounds.Top, FooterSeparatorSize); - DrawFooterBorder(ACanvas, ABounds); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawGroupExpandButtonMark(ACanvas: TcxCanvas; - const R: TRect; AExpanded: Boolean; AState: TcxButtonState); -var - Size, X, MainY, I: Integer; - - procedure DrawOneMark(Y: Integer); - var - ASign, ADelta: Integer; - begin - if AExpanded then Inc(Y, Size); - ASign := 2 * Ord(AExpanded) - 1; - ADelta := Ord(Odd(I - MainY)); - if not AExpanded then - ADelta := Ord(not Boolean(ADelta)); - ACanvas.MoveTo(X + ADelta, Y - ASign * ADelta); - ACanvas.LineTo(X + Size, Y - ASign * Size); - ACanvas.LineTo(X + 2 * Size + 1 - ADelta, Y + ASign * (1 - ADelta)); - end; - -begin - Size := 3; - ACanvas.Pen.Color := ButtonSymbolColor(AState); - with R do - begin - X := (Left + Right - (2 * Size + 1)) div 2; - MainY := (Top + Bottom - 2 * (Size + 1)) div 2; - for I := MainY to MainY + 4 - 1 do - DrawOneMark(I + Ord(I >= MainY + 2) * (Size - 1)); - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawIndicatorCustomizationMark( - ACanvas: TcxCanvas; const R: TRect; AColor: TColor); -const - LineOffset = 3; - LineCount = 5; -var - X, Y, AWidth, I: Integer; - - procedure DrawLine(X, Y: Integer; AChecked: Boolean); - begin - with ACanvas do - begin - if AChecked then - Pixels[X, Y] := Pen.Color; - MoveTo(X + 2, Y); - LineTo(X + AWidth, Y); - end; - end; - -begin - X := R.Left + LineOffset; - AWidth := R.Right - R.Left - 2 * LineOffset; - Y := (R.Top + R.Bottom - (2 * LineCount - 1)) div 2; - ACanvas.Pen.Color := AColor; - for I := 0 to LineCount - 1 do - begin - DrawLine(X, Y, not Odd(I)); - Inc(Y, 2); - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawIndicatorImage(ACanvas: TcxCanvas; - const R: TRect; AKind: TcxIndicatorKind); -var - X, Y: Integer; -begin - if AKind = ikNone then Exit; - with cxIndicatorImages, R do - begin - X := (Left + Right - Width) div 2; - Y := (Top + Bottom - Height) div 2; - end; - cxIndicatorImages.Draw(ACanvas.Canvas, X, Y, Ord(AKind) - 1); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawMonthHeaderArrows( - ACanvas: TcxCanvas; const ABounds: TRect; AArrows: TcxHeaderArrows; - ASideWidth: Integer; AColor: TColor); -var - R: TRect; - - procedure InternalDrawArrow(LeftArrow: Boolean); - var - X, Sign, ArrowHeight: Integer; - P: array[1..3] of TPoint; - begin - with R do - begin - ArrowHeight := (Bottom - Top) div 2; - if not Odd(ArrowHeight) then Inc(ArrowHeight); - if LeftArrow then X := Left - else X := Right; - Sign := 2 * Byte(LeftArrow) - 1; - P[1] := Point(X + Sign * (ASideWidth - 1), (Top + Bottom - ArrowHeight) div 2 - 1); - P[2] := Point(P[1].X, P[1].Y + ArrowHeight + 1); - P[3] := Point(P[1].X - Sign * (ArrowHeight div 2 + 1), P[1].Y + ArrowHeight div 2 + 1); - ACanvas.SetBrushColor(AColor); - ACanvas.Pen.Color := AColor; - ACanvas.Polygon(P); - end; - end; - -begin - R := ABounds; - Inc(R.Top, BorderSize); - InflateRect(R, 0, -1); - if AArrows in [haLeft, haBoth] then - InternalDrawArrow(True); - if AArrows in [haRight, haBoth] then - InternalDrawArrow(False); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSortingArrow(ACanvas: TcxCanvas; - const R: TRect; AColor1, AColor2: TColor; AAscendingSorting: Boolean); -var - Sign, AWidth, AHeight, X, Y, ALeftSide, ARightSide: Integer; -begin - Sign := 2 * Byte(AAscendingSorting) - 1; - with SortingMarkSize do - begin - AWidth := X; - AHeight := Y; - end; - - X := (R.Left + R.Right) div 2; - if not Odd(AWidth) then Dec(X); - if AAscendingSorting then - Y := (R.Top + R.Bottom - AHeight) div 2 - else - Y := (R.Top + R.Bottom + AHeight) div 2 - 1; - - ALeftSide := AWidth div 2; - if not Odd(AWidth) then Dec(ALeftSide); - ARightSide := AWidth div 2; - - ACanvas.Pen.Color := AColor2; - ACanvas.MoveTo(X + ARightSide, Y + Sign * (AHeight - 2)); - ACanvas.LineTo(X + ARightSide - ALeftSide, - Y); - ACanvas.LineTo(X + ARightSide, - Y + Sign * (AHeight - 1)); - if not AAscendingSorting then - ACanvas.Pen.Color := AColor1; - ACanvas.LineTo(X - ALeftSide, Y + Sign * (AHeight - 1)); - if AAscendingSorting then - ACanvas.Pen.Color := AColor1; - ACanvas.LineTo(X, - Y); - ACanvas.LineTo(X - ALeftSide, Y + Sign * (AHeight - Ord(Odd(AWidth)) - )); -end; - -class function TcxCustomLookAndFeelPainter.FooterCellContentBounds(const ABounds: TRect): TRect; -begin - Result := ABounds; - InflateRect(Result, -FooterCellBorderSize, -FooterCellBorderSize); -end; - -class function TcxCustomLookAndFeelPainter.FooterCellTextAreaBounds(const ABounds: TRect): TRect; -begin - Result := FooterCellContentBounds(ABounds); - InflateRect(Result, -cxTextOffset, -cxTextOffset); -end; - -class function TcxCustomLookAndFeelPainter.GetArrowDirection(AHorizontal: Boolean; - APart: TcxScrollBarPart): TcxArrowDirection; -const - ArrowKind: array[Boolean, Boolean] of TcxArrowDirection = - ((adUp, adDown), (adLeft, adRight)); -begin - Result := ArrowKind[AHorizontal, APart <> sbpLineUp]; -end; - -class function TcxCustomLookAndFeelPainter.LookAndFeelStyle: TcxLookAndFeelStyle; -begin - Result := lfsStandard; -end; - -class function TcxCustomLookAndFeelPainter.NeedRedrawOnResize: Boolean; -begin - Result := False; -end; - -class function TcxCustomLookAndFeelPainter.DefaultContentColor: TColor; -begin - Result := clWindow; -end; - -class function TcxCustomLookAndFeelPainter.DefaultContentOddColor: TColor; -begin - Result := DefaultContentColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultContentEvenColor: TColor; -begin - Result := DefaultContentColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultContentTextColor: TColor; -begin - Result := clWindowText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSchedulerBackgroundColor: TColor; -begin - Result := clWindow; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSchedulerTextColor: TColor; -begin - Result := clWindowText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorTextColor: TColor; -begin - Result := clWindowText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorHolydayTextColor: TColor; -begin - Result := clRed; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorInactiveTextColor: TColor; -begin - Result := clGrayText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorSeparator1Color: TColor; -begin - Result := clBtnShadow; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorSeparator2Color: TColor; -begin - Result := clWindow; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorTodayFrameColor: TColor; -begin - Result := clMaroon; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorTodayTextColor: TColor; -begin - Result := clNavy; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorContentColor: TColor; -begin - Result := DefaultEditorBackgroundColor(False); - if Result = clDefault then - Result := DefaultContentColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorHeaderColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorHeaderTextColor( - AIsHighlight: Boolean): TColor; -begin - if AIsHighlight then - Result := clHighlightText - else - Result := DefaultHeaderTextColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorSelectionColor: TColor; -begin - Result := clHighlight; -end; - -class function TcxCustomLookAndFeelPainter.DefaultDateNavigatorSelectionTextColor: TColor; -begin - Result := clHighlightText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultEditorBackgroundColor( - AIsDisabled: Boolean): TColor; -begin - Result := DefaultEditorBackgroundColorEx(cxEditStateColorKindMap[not AIsDisabled]); -end; - -class function TcxCustomLookAndFeelPainter.DefaultEditorTextColor( - AIsDisabled: Boolean): TColor; -begin - Result := DefaultEditorTextColorEx(cxEditStateColorKindMap[not AIsDisabled]); -end; - -class function TcxCustomLookAndFeelPainter.DefaultEditorBackgroundColorEx( - AKind: TcxEditStateColorKind): TColor; -begin - Result := clDefault; -end; - -class function TcxCustomLookAndFeelPainter.DefaultEditorTextColorEx( - AKind: TcxEditStateColorKind): TColor; -begin - Result := clDefault; -end; - -class function TcxCustomLookAndFeelPainter.DefaultFilterBoxColor: TColor; -begin - Result := clBtnShadow; -end; - -class function TcxCustomLookAndFeelPainter.DefaultFilterBoxTextColor: TColor; -begin - Result := clBtnHighlight; -end; - -class function TcxCustomLookAndFeelPainter.DefaultFixedSeparatorColor: TColor; -begin - Result := clBtnText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultFooterColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultFooterTextColor: TColor; -begin - Result := clBtnText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultGridDetailsSiteColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultGridLineColor: TColor; -begin - Result := clBtnShadow; -end; - -class function TcxCustomLookAndFeelPainter.DefaultGroupColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultGroupTextColor: TColor; -begin - Result := clBtnText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultGroupByBoxColor: TColor; -begin - Result := clBtnShadow; -end; - -class function TcxCustomLookAndFeelPainter.DefaultGroupByBoxTextColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultHeaderColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultHeaderTextColor: TColor; -begin - Result := clBtnText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultHeaderBackgroundColor: TColor; -begin - Result := clBtnShadow; -end; - -class function TcxCustomLookAndFeelPainter.DefaultHeaderBackgroundTextColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultHyperlinkTextColor: TColor; -begin - Result := clBlue; -end; - -class function TcxCustomLookAndFeelPainter.DefaultInactiveColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultInactiveTextColor: TColor; -begin - Result := clBtnText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultPreviewTextColor: TColor; -begin - Result := clBlue; -end; - -class function TcxCustomLookAndFeelPainter.DefaultRecordSeparatorColor: TColor; -begin - Result := DefaultGridLineColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSizeGripAreaColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultVGridCategoryColor: TColor; -begin - Result := DefaultHeaderColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultVGridCategoryTextColor: TColor; -begin - Result := clDefault; -end; - -class function TcxCustomLookAndFeelPainter.DefaultVGridHeaderColor: TColor; -begin - Result := DefaultHeaderColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultVGridHeaderTextColor: TColor; -begin - Result := DefaultHeaderTextColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultVGridLineColor: TColor; -begin - Result := clBlack; //todo -end; - -class function TcxCustomLookAndFeelPainter.DefaultVGridBandLineColor: TColor; -begin - Result := DefaultVGridLineColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSchedulerBorderColor: TColor; -begin - Result := $9D9DA1; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSchedulerControlColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSchedulerTimeRulerColor: TColor; -begin - Result := DefaultHeaderColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSchedulerTimeRulerTextColor: TColor; -begin - Result := DefaultHeaderTextColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSchedulerViewContentColor: TColor; -begin - Result := $D5FFFF; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSchedulerNavigatorColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSchedulerViewSelectedTextColor: TColor; -begin - Result := DefaultSelectionTextColor; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSchedulerViewTextColor: TColor; -begin - Result := clWindowText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSelectionColor: TColor; -begin - Result := clHighlight; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSelectionTextColor: TColor; -begin - Result := clHighlightText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultSeparatorColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultTabColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultTabTextColor: TColor; -begin - Result := clBtnText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultTabsBackgroundColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultTimeGridMajorScaleColor: TColor; -begin - Result := clWhite; -end; - -class function TcxCustomLookAndFeelPainter.DefaultTimeGridMajorScaleTextColor: TColor; -begin - Result := clBlack; -end; - -class function TcxCustomLookAndFeelPainter.DefaultTimeGridMinorScaleColor: TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.DefaultTimeGridMinorScaleTextColor: TColor; -begin - Result := clBtnText; -end; - -class function TcxCustomLookAndFeelPainter.DefaultTimeGridSelectionBarColor: TColor; -begin - Result := clWhite; -end; - -class function TcxCustomLookAndFeelPainter.DefaultChartDiagramValueBorderColor: TColor; -begin - Result := clBlack; -end; - -class function TcxCustomLookAndFeelPainter.DefaultChartDiagramValueCaptionTextColor: TColor; -begin - Result := clBlack; -end; - -class function TcxCustomLookAndFeelPainter.DefaultChartHistogramAxisColor: TColor; -begin - Result := clBlack; -end; - -class function TcxCustomLookAndFeelPainter.DefaultChartHistogramGridLineColor: TColor; -begin - Result := clcxLightGray; -end; - -class function TcxCustomLookAndFeelPainter.DefaultChartHistogramPlotColor: TColor; -begin - Result := clWhite; -end; - -class function TcxCustomLookAndFeelPainter.DefaultChartPieDiagramSeriesSiteBorderColor: TColor; -begin - Result := clBtnShadow; -end; - -class function TcxCustomLookAndFeelPainter.DefaultChartPieDiagramSeriesSiteCaptionColor: TColor; -begin - Result := clSkyBlue; -end; - -class function TcxCustomLookAndFeelPainter.DefaultChartPieDiagramSeriesSiteCaptionTextColor: TColor; -begin - Result := clNavy; -end; - -class function TcxCustomLookAndFeelPainter.DefaultChartToolBoxDataLevelInfoBorderColor: TColor; -begin - Result := clBtnShadow; -end; - -class function TcxCustomLookAndFeelPainter.DefaultChartToolBoxItemSeparatorColor: TColor; -begin - Result := clBtnShadow; -end; - -class procedure TcxCustomLookAndFeelPainter.CalculateArrowPoints(R: TRect; - var P: TcxArrowPoints; AArrowDirection: TcxArrowDirection; AProportional: Boolean; AArrowSize: Integer = 0); - - function _GetSize: TSize; - begin - if AArrowDirection in [adUp, adDown] then - begin - if AArrowSize = 0 then - AArrowSize := (R.Right - R.Left - 1) div 4 + 1; - Result.cy := AArrowSize; - Result.cx := AArrowSize * 2 - 1; - end - else - begin - if AArrowSize = 0 then - AArrowSize := (R.Bottom - R.Top - 1) div 4 + 1; - Result.cx := AArrowSize; - Result.cy := AArrowSize * 2 - 1; - end - end; - -var - ASize: TSize; - ADelta: Integer; -begin - with R do - begin - if AProportional then - begin - ADelta := (Right - Left) - (Bottom - Top); - if ADelta > 0 then - InflateRect(R, -ADelta div 2, 0) - else - InflateRect(R, 0, ADelta div 2); - end; - ASize := _GetSize; - case AArrowDirection of - adUp: - begin - P[cxArrowTopPointIndex] := Point((Left + Right - 1) div 2, MulDiv(Top + Bottom - ASize.cy, 1, 2){ - 1}); - P[cxArrowLeftBasePointIndex] := Point((Left + Right - ASize.cx) div 2, P[cxArrowTopPointIndex].Y + ASize.cy - 1); - P[cxArrowRightBasePointIndex] := Point(P[cxArrowLeftBasePointIndex].X + ASize.cx - 1, P[cxArrowLeftBasePointIndex].Y); - end; - adDown: - begin - P[cxArrowRightBasePointIndex] := Point((Left + Right - ASize.cx) div 2, MulDiv(Top + Bottom - ASize.cy, 1, 2)); - P[cxArrowLeftBasePointIndex] := Point(P[cxArrowRightBasePointIndex].X + ASize.cx - 1, P[cxArrowRightBasePointIndex].Y); - P[cxArrowTopPointIndex] := Point((Left + Right - 1) div 2, P[cxArrowRightBasePointIndex].Y + ASize.cy - 1); - end; - adLeft: - begin - P[cxArrowTopPointIndex] := Point((Left + Right - ASize.cx) div 2, (Top + Bottom (**)) div 2); - P[cxArrowRightBasePointIndex] := Point(P[cxArrowTopPointIndex].X + ASize.cx - 1, MulDiv(Top + Bottom - ASize.cy, 1, 2)); - P[cxArrowLeftBasePointIndex] := Point(P[cxArrowRightBasePointIndex].X, P[cxArrowRightBasePointIndex].Y + ASize.cy - 1); - end; - adRight: - begin - P[cxArrowLeftBasePointIndex] := Point((Left + Right - ASize.cx) div 2, MulDiv(Top + Bottom - ASize.cy, 1, 2)); - P[cxArrowTopPointIndex] := Point(P[cxArrowLeftBasePointIndex].X + ASize.cx - 1, (Top + Bottom (**)) div 2); - P[cxArrowRightBasePointIndex] := Point(P[cxArrowLeftBasePointIndex].X, P[cxArrowLeftBasePointIndex].Y + ASize.cy - 1); - end; - end; - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawArrow(ACanvas: TcxCanvas; const R: TRect; AArrowDirection: TcxArrowDirection; AColor: TColor); -var - P: TcxArrowPoints; -begin - CalculateArrowPoints(R, P, AArrowDirection, True); - with ACanvas do - begin - Brush.Style := bsSolid; - SetBrushColor(AColor); - Pen.Color := AColor; - Polygon(P); - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawArrow(ACanvas: TcxCanvas; const R: TRect; - AState: TcxButtonState; AArrowDirection: TcxArrowDirection; ADrawBorder: Boolean = True); -var - P: TcxArrowPoints; -begin - CalculateArrowPoints(R, P, AArrowDirection, False); - with ACanvas do - begin - Brush.Style := bsSolid; - if ADrawBorder then - DrawArrowBorder(ACanvas, R, AState) - else - begin - SetBrushColor(ButtonColor(AState)); - FillRect(R); - end; - SetBrushColor(ButtonSymbolColor(AState)); - Pen.Color := Brush.Color; - Polygon(P); - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawArrowBorder(ACanvas: TcxCanvas; - const R: TRect; AState: TcxButtonState); -begin - with ACanvas do - begin - Brush.Color := ButtonColor(AState); - Brush.Style := bsSolid; - FillRect(R); - end; - DrawButtonBorder(ACanvas, R, AState); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawScrollBarArrow(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState; AArrowDirection: TcxArrowDirection); -var - P: TcxArrowPoints; - - procedure OffsetPoints(ADelta: Integer); - var - I: Integer; - begin - for I := 0 to 2 do - begin - Inc(P[I].X, ADelta); - Inc(P[I].Y, ADelta); - end; - end; - -begin - if AState = cxbsPressed then - OffsetRect(R, ButtonTextShift, ButtonTextShift); - CalculateArrowPoints(R, P, AArrowDirection, True); - with ACanvas do - begin - Brush.Style := bsSolid; - if AState <> cxbsDisabled then - Brush.Color := ButtonSymbolColor(AState) - else - begin - OffsetPoints(1); - Brush.Color := clBtnHighlight; - Pen.Color := Brush.Color; - Polygon(P); - {$IFDEF KYLIX3} - case AArrowDirection of - adUp: ACanvas.Canvas.Pixels[P[cxArrowRightBasePointIndex].X, P[cxArrowRightBasePointIndex].Y] := Pen.Color; - adLeft: ACanvas.Canvas.Pixels[P[cxArrowLeftBasePointIndex].X, P[cxArrowLeftBasePointIndex].Y] := Pen.Color; - end; - {$ENDIF} - OffsetPoints(-1); - Brush.Color := clBtnShadow; - end; - Pen.Color := Brush.Color; - Polygon(P); - {$IFDEF KYLIX3} - case AArrowDirection of - adUp: ACanvas.Canvas.Pixels[P[cxArrowRightBasePointIndex].X, P[cxArrowRightBasePointIndex].Y] := Pen.Color; - adLeft: ACanvas.Canvas.Pixels[P[cxArrowLeftBasePointIndex].X, P[cxArrowLeftBasePointIndex].Y] := Pen.Color; - end; - {$ENDIF} - end; -end; - -class function TcxCustomLookAndFeelPainter.BorderSize: Integer; -begin - Result := 0; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawBorder(ACanvas: TcxCanvas; R: TRect); -begin -end; - -class function TcxCustomLookAndFeelPainter.AdjustGroupButtonDisplayRect( - const R: TRect; AButtonCount, AButtonIndex: Integer): TRect; -begin - Result := R; -end; - -class function TcxCustomLookAndFeelPainter.ButtonBorderSize(AState: TcxButtonState = cxbsNormal): Integer; -begin - Result := 0; -end; - -class function TcxCustomLookAndFeelPainter.ButtonColor(AState: TcxButtonState): TColor; -begin - Result := clBtnFace; -end; - -class function TcxCustomLookAndFeelPainter.ButtonFocusRect(ACanvas: TcxCanvas; R: TRect): TRect; -begin - Result := R; - InflateRect(Result, -4, -4); - if IsRectEmpty(Result) then - Result := R; -end; - -class function TcxCustomLookAndFeelPainter.ButtonGroupBorderSizes(AButtonCount, - AButtonIndex: Integer): TRect; -var - AButtonBorderWidth: Integer; -begin - AButtonBorderWidth := ButtonBorderSize; - Result := Rect(AButtonBorderWidth, AButtonBorderWidth, AButtonBorderWidth, - AButtonBorderWidth); -end; - -class function TcxCustomLookAndFeelPainter.ButtonTextOffset: Integer; -begin - Result := 0; -end; - -class function TcxCustomLookAndFeelPainter.ButtonTextShift: Integer; -begin - Result := 0; -end; - -class function TcxCustomLookAndFeelPainter.ButtonSymbolColor( - AState: TcxButtonState; ADefaultColor: TColor = clDefault): TColor; -begin - if AState = cxbsDisabled then - Result := clBtnShadow - else - if ADefaultColor = clDefault then - Result := clBtnText - else - Result := ADefaultColor; -end; - -class function TcxCustomLookAndFeelPainter.ButtonSymbolState(AState: TcxButtonState): TcxButtonState; -begin - Result := AState; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawButton(ACanvas: TcxCanvas; - R: TRect; const ACaption: string; AState: TcxButtonState; ADrawBorder: Boolean = True; - AColor: TColor = clDefault; ATextColor: TColor = clDefault; AWordWrap: Boolean = False; - AIsToolButton: Boolean = False); -var - AFlags: Integer; -begin - with ACanvas do - begin - if ADrawBorder then - begin - DrawButtonBorder(ACanvas, R, AState); - InflateRect(R, -ButtonBorderSize(AState), -ButtonBorderSize(AState)); - end; - if AColor = clDefault then - Brush.Color := ButtonColor(AState) - else - Brush.Color := AColor; - FillRect(R); - if ATextColor = clDefault then - Font.Color := ButtonSymbolColor(AState) - else - Font.Color := ATextColor; - Brush.Style := bsClear; - with R do // for compatible with standard buttons - begin - Dec(Bottom, Ord(Odd(Bottom - Top))); - if (Bottom - Top) < 18 then Dec(Top); - end; - if AState = cxbsPressed then - OffsetRect(R, ButtonTextShift, ButtonTextShift); - if Length(ACaption) > 0 then - begin - AFlags := cxAlignVCenter or cxShowPrefix or cxAlignHCenter; - if AWordWrap then - AFlags := AFlags or cxWordBreak - else - AFlags := AFlags or cxSingleLine; - DrawText(ACaption, R, AFlags, AState <> cxbsDisabled); - end; - Brush.Style := bsSolid; - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawButtonCross(ACanvas: TcxCanvas; - const R: TRect; AColor: TColor; AState: TcxButtonState); -var - ASize: TPoint; - - function GetSize: TPoint; - begin - Result.X := FilterCloseButtonSize.X div 2; - if not Odd(Result.X) then Dec(Result.X); - Result.Y := Result.X; - end; - - procedure DrawOneMark(ADelta: Integer); - var - P: TPoint; - AFix: Integer; - begin - with R do - P := Point((Left + Right - ASize.X) div 2 + ADelta, (Top + Bottom - ASize.Y) div 2); - if AState = cxbsPressed then - begin - Inc(P.X); - Inc(P.Y); - end; - AFix := 0; - {$IFDEF WIN32} - {$ENDIF} - with ACanvas, P do - begin - MoveTo(X, Y); - LineTo(X + ASize.X - AFix, Y + ASize.Y - AFix); - MoveTo(X, Y + ASize.Y - 1); - LineTo(X + ASize.X - AFix, Y - 1 + AFix); - end; - end; - -begin - ASize := GetSize; - ACanvas.Pen.Color := AColor; - DrawOneMark(0); - DrawOneMark(1); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawButtonInGroup(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState; AButtonCount, AButtonIndex: Integer; - ABackgroundColor: TColor); -begin - DrawButton(ACanvas, R, '', AState); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawButtonBorder(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawButtonGroupBorder(ACanvas: TcxCanvas; - R: TRect; AInplace, ASelected: Boolean); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawExpandButton(ACanvas: TcxCanvas; - const R: TRect; AExpanded: Boolean; AColor: TColor = clDefault); -begin -end; - -class function TcxCustomLookAndFeelPainter.DrawExpandButtonFirst: Boolean; -begin - Result := True; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawGroupExpandButton(ACanvas: TcxCanvas; - const R: TRect; AExpanded: Boolean; AState: TcxButtonState); -begin - DrawButton(ACanvas, R, '', AState); - DrawGroupExpandButtonMark(ACanvas, R, AExpanded, AState); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSmallExpandButton(ACanvas: TcxCanvas; - R: TRect; AExpanded: Boolean; ABorderColor: TColor; AColor: TColor = clDefault); -begin - ACanvas.Brush.Color := ABorderColor; - ACanvas.FrameRect(R); - if AColor <> clDefault then - begin - InflateRect(R, -1, -1); - ACanvas.Brush.Color := AColor; - ACanvas.FillRect(R); - InflateRect(R, 1, 1); - end; - DrawExpandButtonCross(ACanvas, R, AExpanded, clBtnText); -end; - -class function TcxCustomLookAndFeelPainter.ExpandButtonSize: Integer; -begin - Result := 0; -end; - -class function TcxCustomLookAndFeelPainter.GroupExpandButtonSize: Integer; -begin - Result := 15; -end; - -class function TcxCustomLookAndFeelPainter.IsButtonHotTrack: Boolean; -begin - Result := False; -end; - -class function TcxCustomLookAndFeelPainter.IsPointOverGroupExpandButton(const R: TRect; - const P: TPoint): Boolean; -begin - Result := PtInRect(R, P); -end; - -class function TcxCustomLookAndFeelPainter.SmallExpandButtonSize: Integer; -begin - Result := 9; -end; - -class function TcxCustomLookAndFeelPainter.CheckBorderSize: Integer; -begin - Result := 2; -end; - -class function TcxCustomLookAndFeelPainter.CheckButtonColor(AState: TcxButtonState): TColor; -const - Colors: array[TcxButtonState] of TColor = (clWindow, clWindow, clWindow, clBtnFace, clBtnFace); -begin - Result := Colors[AState]; -end; - -class function TcxCustomLookAndFeelPainter.CheckButtonSize: TSize; -begin - Result := FCheckButtonSize; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawCheck(ACanvas: TcxCanvas; const R: TRect; - AState: TcxButtonState; AChecked: Boolean; AColor: TColor); -var - ASize: TPoint; - - function GetSize: TPoint; - begin - with R do - begin - Result.X := Right - Left - 2; - Result.Y := Bottom - Top - 2 - 2; - end; - end; - - procedure DrawOneCheck(ADelta: Integer); - var - ARoot: TPoint; - AFix: Integer; - begin - with R do - begin - ARoot.X := (Left + Right) div 2 - 1; - ARoot.Y := (Top + Bottom + ASize.Y) div 2 - 2 + ADelta; - end; - AFix := 0; - with ACanvas do - begin - MoveTo(ARoot.X - (ASize.X div 2 - 1), ARoot.Y - ASize.Y div 2); - LineTo(ARoot.X, ARoot.Y); - LineTo(ARoot.X + ASize.X div 2 + 2 - AFix, ARoot.Y - ASize.Y + AFix); - end; - end; - -begin - if ACanvas.Brush.Style = bsSolid then - begin - ACanvas.Brush.Color := CheckButtonColor(AState); - ACanvas.FillRect(R); - end; - if not AChecked then Exit; - ASize := GetSize; - ACanvas.Pen.Color := AColor; - DrawOneCheck(0); - DrawOneCheck(1); - DrawOneCheck(2); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawCheckBorder(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawCheckButton(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState; ACheckState: TcxCheckBoxState); -const - ColorMap: array[Boolean] of TColor = (clBtnText, clGrayText); -begin - DrawCheckBorder(ACanvas, R, AState); - InflateRect(R, -CheckBorderSize, -CheckBorderSize); - DrawCheck(ACanvas, R, AState, ACheckState = cbsChecked, - ColorMap[(AState = cxbsDisabled) or (ACheckState = cbsGrayed)]); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawCheckButton(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState; AChecked: Boolean); -const - CheckStates: array[Boolean] of TcxCheckBoxState = (cbsUnchecked, cbsChecked); -begin - DrawCheckButton(ACanvas, R, AState, CheckStates[AChecked]); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawRadioButton(ACanvas: TcxCanvas; - X, Y: Integer; AButtonState: TcxButtonState; AChecked, AFocused: Boolean; - ABrushColor: TColor; AIsDesigning: Boolean = False); -begin - RadioButtonImageList.Draw(ACanvas, X, Y, ABrushColor, - LookAndFeelStyleToLookAndFeelKind(LookAndFeelStyle), AButtonState, AChecked, - AFocused, AIsDesigning); -end; - -class function TcxCustomLookAndFeelPainter.RadioButtonSize: TSize; -begin - Result := RadioButtonImageList.GetSize; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawLabelLine(ACanvas: TcxCanvas; - const R: TRect; AOuterColor, AInnerColor: TColor; AIsVertical: Boolean); -const - BordersMap: array[Boolean] of TcxBorders = ([bTop, bBottom], [bLeft, bRight]); -begin - if AOuterColor = clDefault then - AOuterColor := clBtnShadow; - if AInnerColor = clDefault then - AInnerColor := clBtnHighlight; - ACanvas.DrawComplexFrame(R, AOuterColor, AInnerColor, BordersMap[AIsVertical]); -end; - -class function TcxCustomLookAndFeelPainter.LabelLineHeight: Integer; -begin - Result := 2; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawHeader(ACanvas: TcxCanvas; - const ABounds, ATextAreaBounds: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders; - AState: TcxButtonState; AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; - AMultiLine, AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; - ATextColor, ABkColor: TColor; AOnDrawBackground: TcxDrawBackgroundEvent = nil; - AIsLast: Boolean = False; AIsGroup: Boolean = False); -begin - DrawHeaderBorder(ACanvas, ABounds, ANeighbors, ABorders); - DrawContent(ACanvas, HeaderContentBounds(ABounds, ABorders), ATextAreaBounds, Integer(AState), - AAlignmentHorz, AAlignmentVert, AMultiLine, AShowEndEllipsis, AText, - AFont, ATextColor, ABkColor, AOnDrawBackground); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawHeaderEx(ACanvas: TcxCanvas; - const ABounds, ATextAreaBounds: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders; - AState: TcxButtonState; AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; - AMultiLine, AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; - ATextColor, ABkColor: TColor; AOnDrawBackground: TcxDrawBackgroundEvent = nil); -begin - DrawHeader(ACanvas, ABounds, ATextAreaBounds, ANeighbors, - ABorders, AState, AAlignmentHorz, AAlignmentVert, AMultiLine, - AShowEndEllipsis, AText, AFont, ATextColor, ABkColor, AOnDrawBackground); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawHeaderBorder(ACanvas: TcxCanvas; - const R: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawHeaderPressed(ACanvas: TcxCanvas; - const ABounds: TRect); -begin - ACanvas.InvertRect(ABounds); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawHeaderControlSection(ACanvas: TcxCanvas; - const ABounds, ATextAreaBounds: TRect; ANeighbors: TcxNeighbors; - ABorders: TcxBorders; AState: TcxButtonState; AAlignmentHorz: TAlignment; - AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor); -begin - DrawHeaderControlSectionBorder(ACanvas, ABounds, ABorders, AState); - DrawHeaderControlSectionContent(ACanvas, - HeaderControlSectionContentBounds(ABounds, AState), ATextAreaBounds, AState, - AAlignmentHorz, AAlignmentVert, AMultiLine, AShowEndEllipsis, AText, - AFont, ATextColor, ABkColor); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawHeaderControlSectionBorder( - ACanvas: TcxCanvas; const R: TRect; ABorders: TcxBorders; AState: TcxButtonState); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawHeaderControlSectionContent( - ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - AState: TcxButtonState; AAlignmentHorz: TAlignment; - AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor); -begin - ACanvas.SetBrushColor(ABkColor); - ACanvas.FillRect(ABounds); - DrawHeaderControlSectionText(ACanvas, - HeaderControlSectionTextAreaBounds(ATextAreaBounds, AState), AState, AAlignmentHorz, - AAlignmentVert, AMultiLine, AShowEndEllipsis, AText, AFont, ATextColor); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawHeaderControlSectionText( - ACanvas: TcxCanvas; const ATextAreaBounds: TRect; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, - AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; ATextColor: TColor); - - procedure DoDrawText(ATextRect: TRect; ATextColor: TColor); - const - MultiLines: array[Boolean] of Integer = (cxSingleLine, cxWordBreak); - ShowEndEllipsises: array[Boolean] of Integer = (0, cxShowEndEllipsis); - begin - with ACanvas do - begin - if AText <> '' then - begin - Font := AFont; - Font.Color := ATextColor; - DrawText(AText, ATextRect, cxAlignmentsHorz[AAlignmentHorz] or - cxAlignmentsVert[AAlignmentVert] or MultiLines[AMultiLine] or - ShowEndEllipsises[AShowEndEllipsis]); - end; - end; - end; -var - R: TRect; - AColor: TColor; -begin - R := ATextAreaBounds; - ACanvas.Brush.Style := bsClear; - AColor := ATextColor; - if AState = cxbsDisabled then - begin - OffsetRect(R, 1, 1); - DoDrawText(R, clBtnHighlight); - OffsetRect(R, -1, -1); - AColor := clBtnShadow; - end; - DoDrawText(R, AColor); - ACanvas.Brush.Style := bsSolid; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawHeaderSeparator(ACanvas: TcxCanvas; - const ABounds: TRect; AIndentSize: Integer; AColor: TColor; - AViewParams: TcxViewParams); -begin - ACanvas.FillRect(cxRectSetWidth(ABounds, AIndentSize), AViewParams); - ACanvas.Brush.Color := AColor; - ACanvas.FillRect(cxRectInflate(ABounds, -AIndentSize, 0)); - ACanvas.FillRect(cxRectSetLeft(ABounds, ABounds.Right - AIndentSize), AViewParams); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSortingMark(ACanvas: TcxCanvas; - const R: TRect; AAscendingSorting: Boolean); -begin -end; - -class function TcxCustomLookAndFeelPainter.HeaderBorders(ANeighbors: TcxNeighbors): TcxBorders; -begin - Result := cxBordersAll; -end; - -class function TcxCustomLookAndFeelPainter.HeaderBorderSize: Integer; -begin - Result := 0; -end; - -class function TcxCustomLookAndFeelPainter.HeaderBounds(const ABounds: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders = cxBordersAll): TRect; -begin - Result := ABounds; - ABorders := ABorders - HeaderBorders(ANeighbors); - if bLeft in ABorders then - Dec(Result.Left, HeaderBorderSize); - if bTop in ABorders then - Dec(Result.Top, HeaderBorderSize); - if bRight in ABorders then - Inc(Result.Right, HeaderBorderSize); - if bBottom in ABorders then - Inc(Result.Bottom, HeaderBorderSize); -end; - -class function TcxCustomLookAndFeelPainter.HeaderContentBounds(const ABounds: TRect; - ABorders: TcxBorders): TRect; -begin - Result := ABounds; - if bLeft in ABorders then - Inc(Result.Left, HeaderBorderSize); - if bTop in ABorders then - Inc(Result.Top, HeaderBorderSize); - if bRight in ABorders then - Dec(Result.Right, HeaderBorderSize); - if bBottom in ABorders then - Dec(Result.Bottom, HeaderBorderSize); -end; - -class function TcxCustomLookAndFeelPainter.HeaderDrawCellsFirst: Boolean; -begin - Result := True; -end; - -class function TcxCustomLookAndFeelPainter.HeaderHeight(AFontHeight: Integer): Integer; -begin - Result := AFontHeight + 2 * (HeaderBorderSize + cxHeaderTextOffset); -end; - -class function TcxCustomLookAndFeelPainter.HeaderControlSectionBorderSize( - AState: TcxButtonState = cxbsNormal): Integer; -begin - Result := 1; -end; - -class function TcxCustomLookAndFeelPainter.HeaderControlSectionTextAreaBounds( - ABounds: TRect; AState: TcxButtonState): TRect; -begin - Result := ABounds; - if AState = cxbsPressed then - OffsetRect(Result, 1, 1); -end; - -class function TcxCustomLookAndFeelPainter.HeaderControlSectionContentBounds( - const ABounds: TRect; AState: TcxButtonState): TRect; -begin - Result := ABounds; - InflateRect(Result, -HeaderControlSectionBorderSize(AState), - -HeaderControlSectionBorderSize(AState)); -end; - -class function TcxCustomLookAndFeelPainter.HeaderWidth(ACanvas: TcxCanvas; - ABorders: TcxBorders; const AText: string; AFont: TFont): Integer; -begin - ACanvas.Font := AFont; - Result := ACanvas.TextWidth(AText) + 2 * cxHeaderTextOffset; - if bLeft in ABorders then - Inc(Result, HeaderBorderSize); - if bRight in ABorders then - Dec(Result, HeaderBorderSize); -end; - -class function TcxCustomLookAndFeelPainter.IsHeaderHotTrack: Boolean; -begin - Result := False; -end; - -class function TcxCustomLookAndFeelPainter.SortingMarkAreaSize: TPoint; -begin - Result := Point(SortingMarkAreaWidth, SortingMarkSize.Y); -end; - -class function TcxCustomLookAndFeelPainter.SortingMarkSize: TPoint; -begin - Result := Point(0, 0); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFooterCell(ACanvas: TcxCanvas; - const ABounds: TRect; AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; - AMultiLine: Boolean; const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); -begin - DrawFooterCellBorder(ACanvas, ABounds); - DrawFooterCellContent(ACanvas, ABounds, AAlignmentHorz, AAlignmentVert, - AMultiLine, AText, AFont, ATextColor, ABkColor, AOnDrawBackground); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFooterCellContent(ACanvas: TcxCanvas; - const ABounds: TRect; AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; - AMultiLine: Boolean; const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); -begin - DrawContent(ACanvas, FooterCellContentBounds(ABounds), FooterCellTextAreaBounds(ABounds), 0, - AAlignmentHorz, AAlignmentVert, AMultiLine, False, AText, AFont, ATextColor, ABkColor, - AOnDrawBackground, True); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawGroupByBox(ACanvas: TcxCanvas; - const ARect: TRect; ATransparent: Boolean; ABackgroundColor: TColor; - const ABackgroundBitmap: TBitmap); -begin - DrawBackground(ACanvas, ARect, ATransparent, ABackgroundColor, ABackgroundBitmap); -end; - -class function TcxCustomLookAndFeelPainter.GridDrawHeaderCellsFirst: Boolean; -begin - Result := HeaderDrawCellsFirst; -end; - -class function TcxCustomLookAndFeelPainter.PivotGridHeadersAreaColor: TColor; -begin - Result := DefaultHeaderBackgroundColor; -end; - -class function TcxCustomLookAndFeelPainter.PivotGridHeadersAreaTextColor: TColor; -begin - Result := DefaultHeaderBackgroundTextColor; -end; - -class function TcxCustomLookAndFeelPainter.FooterBorders: TcxBorders; -begin - Result := cxBordersAll; -end; - -class function TcxCustomLookAndFeelPainter.FooterBorderSize: Integer; -begin - Result := 0; -end; - -class function TcxCustomLookAndFeelPainter.FooterCellBorderSize: Integer; -begin - Result := 0; -end; - -class function TcxCustomLookAndFeelPainter.FooterCellOffset: Integer; -begin - Result := 0; -end; - -class function TcxCustomLookAndFeelPainter.FooterDrawCellsFirst: Boolean; -begin - Result := True; -end; - -class function TcxCustomLookAndFeelPainter.FooterSeparatorColor: TColor; -begin - Result := clBtnShadow; -end; - -class function TcxCustomLookAndFeelPainter.FooterSeparatorSize: Integer; -begin - Result := 1; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFooterPanel(ACanvas: TcxCanvas; - const ABounds: TRect; const AViewParams: TcxViewParams; ABorders: TcxBorders); -begin - ACanvas.SaveClipRegion; - try - ACanvas.IntersectClipRect(ABounds); - DrawFooterContent(ACanvas, ABounds, AViewParams); - DrawFooterBorderEx(ACanvas, ABounds, ABorders); - finally - ACanvas.RestoreClipRegion; - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFooterBorder(ACanvas: TcxCanvas; - const R: TRect); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFooterCellBorder(ACanvas: TcxCanvas; const R: TRect); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFooterContent(ACanvas: TcxCanvas; - const ARect: TRect; const AViewParams: TcxViewParams); -begin - if IsRectEmpty(ARect) then Exit; - ACanvas.FillRect(ARect, AViewParams); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFooterSeparator(ACanvas: TcxCanvas; - const R: TRect); -begin - ACanvas.Brush.Color := FooterSeparatorColor; - ACanvas.FillRect(R); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFilterActivateButton(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState; AChecked: Boolean); -begin - DrawCheckButton(ACanvas, R, AState, AChecked); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFilterCloseButton(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState); -begin - DrawButtonBorder(ACanvas, R, AState); - InflateRect(R, -ButtonBorderSize, -ButtonBorderSize); - ACanvas.Brush.Color := ButtonColor(AState); - ACanvas.FillRect(R); - DrawButtonCross(ACanvas, R, ButtonSymbolColor(AState), ButtonSymbolState(AState)); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFilterDropDownButton(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState; AIsFilterActive: Boolean); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawFilterPanel(ACanvas: TcxCanvas; - const ARect: TRect; ATransparent: Boolean; ABackgroundColor: TColor; - const ABackgroundBitmap: TBitmap); -begin - DrawBackground(ACanvas, ARect, ATransparent, ABackgroundColor, ABackgroundBitmap); -end; - -class function TcxCustomLookAndFeelPainter.FilterActivateButtonSize: TPoint; -begin - Result := Point(FilterActiveButtonWidth, FilterActiveButtonHeight); -end; - -class function TcxCustomLookAndFeelPainter.FilterCloseButtonSize: TPoint; -begin - Result := Point(FilterCloseButtonWidth, FilterCloseButtonHeight); -end; - -class function TcxCustomLookAndFeelPainter.FilterDropDownButtonSize: TPoint; -begin - Result := Point(FilterDropDownButtonWidth, 0); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawWindowContent(ACanvas: TcxCanvas; - const ARect: TRect); -begin - ACanvas.FillRect(ARect, clBtnFace); -end; - -class function TcxCustomLookAndFeelPainter.PopupBorderStyle: TcxPopupBorderStyle; -begin - Result := pbsUltraFlat; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawTab(ACanvas: TcxCanvas; R: TRect; - ABorders: TcxBorders; const AText: string; AState: TcxButtonState; - AVertical: Boolean; AFont: TFont; ATextColor, ABkColor: TColor; AShowPrefix: Boolean = False); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawTabBorder(ACanvas: TcxCanvas; - R: TRect; ABorder: TcxBorder; ABorders: TcxBorders; AVertical: Boolean); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawTabsRoot(ACanvas: TcxCanvas; - const R: TRect; ABorders: TcxBorders; AVertical: Boolean); -begin -end; - -class function TcxCustomLookAndFeelPainter.IsDrawTabImplemented(AVertical: Boolean): Boolean; -begin - Result := False; -end; - -class function TcxCustomLookAndFeelPainter.IsTabHotTrack(AVertical: Boolean): Boolean; -begin - Result := False; -end; - -class function TcxCustomLookAndFeelPainter.TabBorderSize(AVertical: Boolean): Integer; -begin - Result := 0; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawIndicatorItem(ACanvas: TcxCanvas; - const R: TRect; AKind: TcxIndicatorKind; AColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); -begin - DrawHeader(ACanvas, R, R, [], HeaderBorders([nTop, nBottom]), cxbsNormal, - taLeftJustify, vaTop, False, False, '', nil, clNone, AColor, AOnDrawBackground); - DrawIndicatorImage(ACanvas, R, AKind); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawIndicatorItemEx(ACanvas: TcxCanvas; - const R: TRect; AKind: TcxIndicatorKind; AColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); -begin - DrawHeaderEx(ACanvas, R, R, [], cxBordersAll, cxbsNormal, - taLeftJustify, vaTop, False, False, '', nil, clNone, AColor, AOnDrawBackground); - DrawIndicatorImage(ACanvas, R, AKind); -end; - -class function TcxCustomLookAndFeelPainter.IndicatorDrawItemsFirst: Boolean; -begin - Result := True; -end; - -class function TcxCustomLookAndFeelPainter.ScrollBarMinimalThumbSize( - AVertical: Boolean): Integer; -begin - Result := cxStdThumbnailMinimalSize; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawScrollBarBackground( - ACanvas: TcxCanvas; const R: TRect; AHorizontal: Boolean); -begin - DrawScrollBarPart(ACanvas, AHorizontal, R, sbpPageUp, cxbsNormal); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawScrollBarPart(ACanvas: TcxCanvas; - AHorizontal: Boolean; R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); -begin -end; - -class function TcxCustomLookAndFeelPainter.SizeGripSize: TSize; -begin - Result := Size(GetSystemMetrics(SM_CXVSCROLL), - GetSystemMetrics(SM_CYHSCROLL)); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSizeGrip(ACanvas: TcxCanvas; - const ARect: TRect; ABackgroundColor: TColor = clDefault); -begin - ACanvas.FillRect(ARect, ABackgroundColor); - DrawFrameControl(ACanvas.Handle, ARect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawMonthHeader(ACanvas: TcxCanvas; - const ABounds: TRect; const AText: string; ANeighbors: TcxNeighbors; - const AViewParams: TcxViewParams; AArrows: TcxHeaderArrows; - ASideWidth: Integer; AOnDrawBackground: TcxDrawBackgroundEvent = nil); -begin - DrawHeader(ACanvas, ABounds, ABounds, ANeighbors, HeaderBorders(ANeighbors), - cxbsNormal, taCenter, vaCenter, False, False, AText, AViewParams.Font, - AViewParams.TextColor, AViewParams.Color, AOnDrawBackground); - DrawMonthHeaderArrows(ACanvas, ABounds, AArrows, ASideWidth, clWindowText); -end; - -class procedure TcxCustomLookAndFeelPainter.CalculateSchedulerNavigationButtonRects( - AIsNextButton: Boolean; ACollapsed: Boolean; APrevButtonTextSize: TSize; - ANextButtonTextSize: TSize; var ABounds: TRect; out ATextRect: TRect; - out AArrowRect: TRect); -const - cxTextOffset = 5; -var - AArrowSize: TSize; - AArrowZoneHeight: Integer; - ABorders: TRect; - AContent: TRect; - ADelta: Integer; - AHasTextArea: Boolean; -begin - SchedulerNavigationButtonSizes(AIsNextButton, ABorders, AArrowSize, AHasTextArea); - AArrowZoneHeight := 3 * AArrowSize.cy; - if ACollapsed or not AHasTextArea then - begin - ATextRect := cxNullRect; - with ABorders do - begin - ABounds.Top := (ABounds.Top + ABounds.Bottom - Top - Bottom - AArrowZoneHeight) div 2; - ABounds.Bottom := ABounds.Top + AArrowZoneHeight + Bottom + Top; - end; - AArrowRect := cxRectCenter(ABounds, AArrowSize); - end - else - begin - AContent := cxRectContent(ABounds, ABorders); - AArrowRect := cxRectCenter(cxRectSetHeight(AContent, AArrowZoneHeight), AArrowSize); - ATextRect := AContent; - Inc(ATextRect.Top, AArrowZoneHeight + cxTextOffset); - Dec(ATextRect.Bottom, 2 * AArrowSize.cy); - ADelta := Max(ANextButtonTextSize.cx, APrevButtonTextSize.cx) - - (ATextRect.Bottom - ATextRect.Top); - if ADelta > 0 then - begin - OffsetRect(AArrowRect, 0, -ADelta); - InflateRect(ATextRect, 0, ADelta); - InflateRect(ABounds, 0, ADelta); - end; - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSchedulerBorder( - ACanvas: TcxCanvas; R: TRect); -begin - DrawBorder(ACanvas, R); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSchedulerEventProgress( - ACanvas: TcxCanvas; const ABounds, AProgress: TRect; AViewParams: TcxViewParams; - ATransparent: Boolean); -begin - if ATransparent then - ACanvas.FrameRect(ABounds, clGray) - else - ACanvas.FillRect(ABounds, AViewParams, cxBordersAll, clGray); - ACanvas.FillRect(AProgress, clNavy); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSchedulerNavigationButton( - ACanvas: TcxCanvas; const ARect: TRect; AIsNextButton: Boolean; - AState: TcxButtonState; const AText: string; const ATextRect: TRect; - const AArrowRect: TRect); - - function RotateTextRect(const ATextRect: TRect): TRect; - begin - Result.Left := ARect.Bottom - ATextRect.Bottom; - Result.Top := ATextRect.Left - ARect.Left; - Result.Right := Result.Left + ATextRect.Bottom - ATextRect.Top; - Result.Bottom := Result.Top + ATextRect.Right - ATextRect.Left; - end; - -var - ABitmap: TcxBitmap; - R: TRect; -begin - if IsRectEmpty(ATextRect) or (SchedulerNavigationButtonTextColor(AIsNextButton, AState, clDefault) = clNone) then - DrawSchedulerNavigationButtonContent(ACanvas, ARect, AArrowRect, AIsNextButton, AState) - else - begin - ABitmap := TcxBitmap.CreateSize(ARect, pf32bit); - try - cxBitBlt(ABitmap.Canvas.Handle, ACanvas.Handle, ABitmap.ClientRect, ARect.TopLeft, SRCCOPY); - DrawSchedulerNavigationButtonContent(ABitmap.cxCanvas, - cxRectOffset(ARect, -ARect.Left, -ARect.Top), - cxRectOffset(AArrowRect, -ARect.Left, -ARect.Top), AIsNextButton, AState); - ABitmap.Rotate(raMinus90); - with ABitmap.Canvas do - begin - Brush.Style := bsClear; - Font.Assign(ACanvas.Font); - Font.Color := SchedulerNavigationButtonTextColor(AIsNextButton, AState, Font.Color); - R := RotateTextRect(ATextRect); - cxDrawText(Handle, AText, R, DT_CENTER or DT_VCENTER or DT_SINGLELINE); - end; - ABitmap.Rotate(raPlus90); - cxBitBlt(ACanvas.Handle, ABitmap.Canvas.Handle, ARect, cxNullPoint, SRCCOPY); - finally - ABitmap.Free; - end; - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSchedulerNavigationButtonArrow( - ACanvas: TcxCanvas; const ARect: TRect; AIsNextButton: Boolean; AColor: TColor); -const - ASigns: array[Boolean] of Integer = (-1, 1); -var - ACount: Integer; - I: Integer; - R1, R2: TRect; -begin - ACanvas.Brush.Color := AColor; - ACount := (ARect.Bottom - ARect.Top) div 2 + Integer(Odd(ARect.Bottom - ARect.Top)); - with ARect do - if AIsNextButton then - begin - R1 := Rect(Left, Top, Left + 2, Top + 1); - R2 := Rect(Left, Bottom - 1, Left + 2, Bottom); - end - else - begin - R1 := Rect(Right - 2, Top, Right, Top + 1); - R2 := Rect(Right - 2, Bottom - 1, Right, Bottom); - end; - - for I := 0 to ACount - 1 do - begin - ACanvas.FillRect(R1); - OffsetRect(R1, ASigns[AIsNextButton], 1); - ACanvas.FillRect(R2); - OffsetRect(R2, ASigns[AIsNextButton], -1); - end; - - if AIsNextButton then - ACanvas.FillRect(cxRectSetLeft(ARect, ARect.Right - 1, 1)) - else - ACanvas.FillRect(cxRectSetRight(ARect, ARect.Left + 1, 1)); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSchedulerNavigationButtonContent( - ACanvas: TcxCanvas; const ARect: TRect; const AArrowRect: TRect; - AIsNextButton: Boolean; AState: TcxButtonState); -const - Borders: array[Boolean] of TcxBorders = - ([bRight, bTop, bBottom], [bLeft, bTop, bBottom]); - BottomRightColors: array[Boolean] of TColor = - (clBtnFace, clBtnHighlight); - TopLeftColors: array[Boolean] of TColor = - (clBtnHighlight, clBtnShadow); -var - R: TRect; -begin - R := ARect; - ACanvas.FillRect(R, clBtnFace); - ACanvas.DrawComplexFrame(R, clBtnShadow, clBtnShadow, Borders[AIsNextButton]); - InflateRect(R, 0, -1); - if AIsNextButton then - Inc(R.Left) - else - Dec(R.Right); - ACanvas.DrawComplexFrame(R, TopLeftColors[AState = cxbsPressed], - BottomRightColors[AState = cxbsPressed], Borders[AIsNextButton]); - DrawSchedulerNavigationButtonArrow(ACanvas, AArrowRect, AIsNextButton, - ButtonSymbolColor(AState)); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSchedulerNavigatorButton( - ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); -begin - DrawButton(ACanvas, R, '', AState); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSchedulerSplitterBorder( - ACanvas: TcxCanvas; R: TRect; const AViewParams: TcxViewParams; AIsHorizontal: Boolean); -begin -end; - -class function TcxCustomLookAndFeelPainter.SchedulerNavigationButtonTextColor( - AIsNextButton: Boolean; AState: TcxButtonState; ADefaultColor: TColor = clDefault): TColor; -begin - Result := ButtonSymbolColor(AState, ADefaultColor); -end; - -class procedure TcxCustomLookAndFeelPainter.SchedulerNavigationButtonSizes( - AIsNextButton: Boolean; var ABorders: TRect; var AArrowSize: TSize; - var AHasTextArea: Boolean); -const - AButtonBorders: array[Boolean] of TRect = - ((Left: 0; Top: 6; Right: 2; Bottom: 6), - (Left: 2; Top: 6; Right: 0; Bottom: 6)); -begin - ABorders := AButtonBorders[AIsNextButton]; - AHasTextArea := True; - AArrowSize.cx := 7; - AArrowSize.cy := 7; -end; - -class function TcxCustomLookAndFeelPainter.SchedulerEventProgressOffsets: TRect; -begin - Result := Rect(2, 2, 2, 2); -end; - -class function TcxCustomLookAndFeelPainter.ChartToolBoxDataLevelInfoBorderSize: Integer; -begin - Result := 1; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawClock(ACanvas: TcxCanvas; - const ARect: TRect; ADateTime: TDateTime; ABackgroundColor: TColor); - - procedure DrawDot(X, Y: Integer; AHourDot: Boolean); - begin - if AHourDot then - begin - ACanvas.Pixels[X, Y] := clTeal; - ACanvas.Pen.Color := clAqua; - ACanvas.Polyline([Point(X - 1, Y + 1), Point(X - 1, Y - 1), Point(X, Y - 1)]); - ACanvas.Pen.Color := clBtnText; - ACanvas.Polyline([Point(X, Y + 1), Point(X + 1, Y + 1), Point(X + 1, Y - 1)]); - ACanvas.ExcludeClipRect(Rect(X - 1, Y - 1, X + 2, Y + 2)); - end; - end; - - procedure DrawHand(ACenter: TPoint; AAngle, L1X, L1Y, L2X, L2Y, L3: Extended); - begin - with ACanvas.Canvas do - begin - Brush.Color := clTeal; - BeginPath(Handle); - Pixels[Round(ACenter.X + L1X * cos(AAngle)), - Round(ACenter.Y + L1Y * sin(AAngle))] := clTeal; - Pen.Color := clTeal; - MoveTo(Round(ACenter.X + L1X * cos(AAngle)), - Round(ACenter.Y + L1Y * sin(AAngle))); - LineTo(Round(ACenter.X + L3 / 2 * cos(AAngle + Pi / 2)), - Round(ACenter.Y + L3 / 2 * sin(AAngle + Pi / 2))); - LineTo(Round(ACenter.X + L2X * cos(AAngle + Pi)), - Round(ACenter.Y + L2Y * sin(AAngle + Pi))); - LineTo(Round(ACenter.X + L3 / 2 * cos(AAngle + Pi * 3 / 2)), - Round(ACenter.Y + L3 / 2 * sin(AAngle + Pi * 3 / 2))); - LineTo(Round(ACenter.X + L1X * cos(AAngle)), - Round(ACenter.Y + L1Y * sin(AAngle))); - EndPath(Handle); - FillPath(Handle); - end; - end; - - procedure DrawHands; - var - AAngle: Extended; - ACenter: TPoint; - AHandRadiusX, AHandRadiusY: Extended; - AHour, AMin, AMSec, ASec: Word; - begin - DecodeTime(ADateTime, AHour, AMin, ASec, AMSec); - ACenter.X := (ARect.Right + ARect.Left) div 2; - ACenter.Y := (ARect.Bottom + ARect.Top) div 2; - AHandRadiusX := (ARect.Right - ARect.Left) / 2 - 2; - AHandRadiusY := (ARect.Bottom - ARect.Top) / 2 - 2; - with ACanvas.Canvas do - begin - AAngle := Pi * 2 * ((AHour mod 12) * 60 * 60 + AMin * 60 + ASec - 3 * 60 * 60) / 12 / 60 / 60; - DrawHand(ACenter, AAngle, AHandRadiusX * 0.75, AHandRadiusY * 0.75, - AHandRadiusX * 0.15, AHandRadiusY * 0.15, 9); - - AAngle := Pi * 2 * (AMin * 60 + ASec - 15 * 60) / 60 / 60; - DrawHand(ACenter, AAngle, AHandRadiusX * 0.85, AHandRadiusY * 0.85, - AHandRadiusX * 0.2, AHandRadiusY * 0.2, 7); - - Pen.Color := clRed; - MoveTo(ACenter.X, ACenter.Y); - AAngle := Pi * 2 * (ASec - 15) / 60; - LineTo(Round(ACenter.X + AHandRadiusX * 0.9 * cos(AAngle)), - Round(ACenter.Y + AHandRadiusY * 0.9 * sin(AAngle))); - end; - end; - -var - AAngle: Extended; - ACenter: TPoint; - I: Integer; - RX, RY: Extended; -begin - ACenter.X := (ARect.Right + ARect.Left) div 2; - ACenter.Y := (ARect.Bottom + ARect.Top) div 2; - RX := (ARect.Right - ARect.Left) / 2 - 2; - RY := (ARect.Bottom - ARect.Top) / 2 - 2; - for I := 0 to 59 do - begin - AAngle := 2 * Pi * I / 60; - DrawDot(Round(ACenter.X + RX * cos(AAngle)), Round(ACenter.Y + RY * sin(AAngle)), I mod 5 = 0); - end; - with ACanvas do - FillRect(ARect, ABackgroundColor); - DrawHands; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawEditorButton(ACanvas: TcxCanvas; - const ARect: TRect; AButtonKind: TcxEditBtnKind; AState: TcxButtonState); -begin - -end; - -class function TcxCustomLookAndFeelPainter.EditButtonTextOffset: Integer; -begin - Result := 0; -end; - -class function TcxCustomLookAndFeelPainter.EditButtonSize: TSize; -begin - Result := Size(0, 0); -end; - -class function TcxCustomLookAndFeelPainter.EditButtonTextColor: TColor; -begin - Result := clDefault; -end; - -class function TcxCustomLookAndFeelPainter.GetContainerBorderColor( - AIsHighlightBorder: Boolean): TColor; -begin - Result := clDefault; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawDateNavigatorDateHeader( - ACanvas: TcxCanvas; var R: TRect); -begin - ACanvas.FillRect(R, DefaultDateNavigatorHeaderColor); - ACanvas.DrawEdge(R, False, False, cxBordersAll); - InflateRect(R, -1, -1); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawNavigatorGlyph(ACanvas: TcxCanvas; - AImageList: TCustomImageList; AImageIndex: TImageIndex; AButtonIndex: Integer; - const AGlyphRect: TRect; AEnabled: Boolean; AUserGlyphs: Boolean); -begin - if AImageList <> nil then - AImageList.Draw(ACanvas.Canvas, AGlyphRect.Left, AGlyphRect.Top, - AImageIndex, AEnabled); // ??? itMask TODO -end; - -class function TcxCustomLookAndFeelPainter.NavigatorGlyphSize: TSize; -begin - Result := Size(0, 0); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawProgressBarChunk( - ACanvas: TcxCanvas; ARect: TRect; AVertical: Boolean); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawProgressBarText( - ACanvas: TcxCanvas; AVertical, ASolid: Boolean; const AText: string; - const ATextRect, AProgressBarRect, AProgressChunkRect: TRect; - ATextColor: TColor = clDefault); - - procedure InternalDrawText(DC: HDC; const ATextRect: TRect); - begin - if AVertical then - TextOut(DC, ATextRect.Right, ATextRect.Top, PChar(AText), Length(AText)) - else - TextOut(DC, ATextRect.Left, ATextRect.Top, PChar(AText), Length(AText)); - end; - - procedure DrawInvertedText(ACanvas: TcxCanvas; const ATextRect: TRect); - var - ACopyMode: Integer; - ATextBmp: TcxBitmap; - ATextSavedBmp: TcxBitmap; - begin - ATextBmp := TcxBitmap.CreateSize(ATextRect); - ATextSavedBmp := TcxBitmap.CreateSize(ATextRect); - try - ATextBmp.Canvas.Font := ACanvas.Font; - ATextBmp.Canvas.Font.Color := clBlack; - ATextBmp.Canvas.Brush.Color := clWhite; - ATextBmp.Canvas.FillRect(ATextBmp.Canvas.ClipRect); - InternalDrawText(ATextBmp.Canvas.Handle, ATextBmp.ClientRect); - ACopyMode := ACanvas.CopyMode; - try - BitBlt(ATextSavedBmp.Canvas.Handle, 0, 0, ATextBmp.Width, ATextBmp.Height, - ACanvas.Handle, ATextRect.Left, ATextRect.Top, SRCCOPY); - BitBlt(ATextBmp.Canvas.Handle, 0, 0, ATextBmp.Width, ATextBmp.Height, - ACanvas.Handle, ATextRect.Left, ATextRect.Top, DSTINVERT); - InternalDrawText(ACanvas.Handle, ATextRect); - ACanvas.CopyMode := cmSrcCopy; - ACanvas.Draw(ATextRect.Left, ATextRect.Top, ATextSavedBmp); - ACanvas.CopyMode := cmSrcInvert; - ACanvas.Draw(ATextRect.Left, ATextRect.Top, ATextBmp); - finally - ACanvas.CopyMode := ACopyMode; - end; - finally - ATextSavedBmp.Free; - ATextBmp.Free; - end; - end; - -var - ARect: TRect; - ATextBmp: TcxBitmap; -begin - ACanvas.SaveState; - try - if AVertical then - ACanvas.SetFontAngle(270); - if (ATextColor = clDefault) or not ASolid then - ATextColor := ProgressBarTextColor; - ACanvas.Font.Color := ATextColor; - - if ASolid then - InternalDrawText(ACanvas.Handle, ATextRect) - else - if ProgressBarTextColorEx(True) = clDefault then - DrawInvertedText(ACanvas, ATextRect) - else - if cxRectIntersect(ARect, ATextRect, AProgressChunkRect) then - begin - ATextBmp := TcxBitmap.CreateSize(ARect); - try - cxBitBlt(ATextBmp.Canvas.Handle, ACanvas.Handle, ATextBmp.ClientRect, ARect.TopLeft, SRCCOPY); - ACanvas.Font.Color := ProgressBarTextColorEx(False); - InternalDrawText(ACanvas.Handle, ATextRect); - cxBitBlt(ACanvas.Handle, ATextBmp.Canvas.Handle, ARect, cxNullPoint, SRCCOPY); - ACanvas.SetClipRegion(TcxRegion.Create(ARect), roIntersect); - ACanvas.Font.Color := ProgressBarTextColorEx(True); - InternalDrawText(ACanvas.Handle, ATextRect); - finally - ATextBmp.Free; - end; - end - else - InternalDrawText(ACanvas.Handle, ATextRect); - finally - ACanvas.RestoreState; - end; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawProgressBarBorder( - ACanvas: TcxCanvas; ARect: TRect; AVertical: Boolean); -begin -end; - -class function TcxCustomLookAndFeelPainter.ProgressBarBorderSize(AVertical: Boolean): TRect; -begin - Result := cxEmptyRect; -end; - -class function TcxCustomLookAndFeelPainter.ProgressBarTextColor: TColor; -begin - Result := ProgressBarTextColorEx(False); -end; - -class function TcxCustomLookAndFeelPainter.ProgressBarTextColorEx(AIsFilledArea: Boolean): TColor; -begin - if AIsFilledArea then - Result := clDefault - else - Result := clWindowText; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawGroupBoxBackground(ACanvas: TcxCanvas; - ABounds: TRect; ARect: TRect); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawGroupBoxCaption(ACanvas: TcxCanvas; - ACaptionRect: TRect; ACaptionPosition: TcxGroupBoxCaptionPosition); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawGroupBoxContent(ACanvas: TcxCanvas; - ABorderRect: TRect; ACaptionPosition: TcxGroupBoxCaptionPosition; - ABorders: TcxBorders = cxBordersAll); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawGroupBoxFrame(ACanvas: TcxCanvas; - R: TRect; AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition; - ABorders: TcxBorders = cxBordersAll); -begin -end; - -class function TcxCustomLookAndFeelPainter.GroupBoxBorderSize(ACaption: Boolean; - ACaptionPosition: TcxGroupBoxCaptionPosition): TRect; -begin - Result := cxEmptyRect; -end; - -class function TcxCustomLookAndFeelPainter.GroupBoxTextColor( - AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition): TColor; -begin - if AEnabled then - Result := clWindowText - else - Result := clBtnShadow; -end; - -class function TcxCustomLookAndFeelPainter.IsGroupBoxTransparent(AIsCaption: Boolean; - ACaptionPosition: TcxGroupBoxCaptionPosition): Boolean; -begin - Result := False; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawPanelBorders(ACanvas: TcxCanvas; - const ABorderRect: TRect); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawPanelCaption( - ACanvas: TcxCanvas; const ACaptionRect: TRect; - ACaptionPosition: TcxGroupBoxCaptionPosition); -begin - DrawGroupBoxCaption(ACanvas, ACaptionRect, ACaptionPosition); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawPanelBackground( - ACanvas: TcxCanvas; AControl: TWinControl; ABounds: TRect; - AColorFrom: TColor = clDefault; AColorTo: TColor = clDefault); -begin - DrawGroupBoxBackground(ACanvas, ABounds, ABounds); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawPanelContent( - ACanvas: TcxCanvas; const ABorderRect: TRect; ABorder: Boolean); -begin - ACanvas.FillRect(ABorderRect, clBtnFace); -end; - -class function TcxCustomLookAndFeelPainter.PanelBorderSize: TRect; -begin - Result := cxEmptyRect; -end; - -class function TcxCustomLookAndFeelPainter.PanelTextColor: TColor; -begin - Result := clDefault; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawTrackBar(ACanvas: TcxCanvas; - const ARect: TRect; const ASelection: TRect; AShowSelection: Boolean; - AEnabled: Boolean; AHorizontal: Boolean); -begin -end; - -class procedure TcxCustomLookAndFeelPainter.DrawTrackBarThumb(ACanvas: TcxCanvas; - ARect: TRect; AState: TcxButtonState; AHorizontal: Boolean; - ATicks: TcxTrackBarTicksAlign); -begin -end; - -class function TcxCustomLookAndFeelPainter.TrackBarThumbSize(AHorizontal: Boolean): TSize; -begin - Result := Size(0, 0); -end; - -class function TcxCustomLookAndFeelPainter.TrackBarTicksColor(AText: Boolean): TColor; -begin - Result := clDefault; -end; - -class function TcxCustomLookAndFeelPainter.TrackBarTrackSize: Integer; -begin - Result := 0; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawSplitter(ACanvas: TcxCanvas; - const ARect: TRect; AHighlighted: Boolean; AClicked: Boolean; AHorizontal: Boolean); -begin - -end; - -class function TcxCustomLookAndFeelPainter.GetSplitterSize(AHorizontal: Boolean): TSize; -begin - Result := Size(0, 0); -end; - -class function TcxCustomLookAndFeelPainter.LayoutControlEmptyAreaColor: TColor; -begin - Result := clBtnFace; -end; - -class procedure TcxCustomLookAndFeelPainter.DrawLayoutControlBackground( - ACanvas: TcxCanvas; const R: TRect); -begin - ACanvas.FillRect(R, LayoutControlEmptyAreaColor); -end; - -class function TcxCustomLookAndFeelPainter.PrintPreviewPageBordersWidth: TRect; -begin - Result := Rect(2, 2, 4, 4); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawPrintPreviewBackground( - ACanvas: TcxCanvas; const R: TRect); -begin - ACanvas.FillRect(R, clBtnShadow); -end; - -class procedure TcxCustomLookAndFeelPainter.DrawPrintPreviewPageBackground( - ACanvas: TcxCanvas; const ABorderRect, AContentRect: TRect; - ASelected, ADrawContent: Boolean); -const - FrameColorMap: array[Boolean] of TColor = (clWindowText, clHighlight); -var - R: TRect; -begin - ACanvas.SaveClipRegion; - try - R := cxRectInflate(ABorderRect, 0, 0, -2, -2); - if ADrawContent then - ACanvas.FillRect(AContentRect, clWindow); - if not ASelected then - InflateRect(R, -1, -1); - ACanvas.ExcludeClipRect(AContentRect); - ACanvas.FillRect(R, FrameColorMap[ASelected]); - ACanvas.ExcludeClipRect(R); - ACanvas.FillRect(cxRectOffset(R, 2, 2), clWindowText); - finally - ACanvas.RestoreClipRegion; - end; -end; - -class function TcxCustomLookAndFeelPainter.CalcEditButtonTextColor( - AButtonKind: TcxCalcButtonKind): TColor; -const - BtnColors : array [TcxCalcButtonKind] of TColor = ( - clMaroon, clMaroon, clMaroon, clRed, clRed, clRed, clRed, clBlue, clBlue, - clBlue, clBlue, clBlue, clBlue, clBlue, clBlue, clBlue, clBlue, clBlue, - clBlue, clRed, clRed, clRed, clRed, clNavy, clNavy, clNavy, clRed, clBlue); -begin - Result := BtnColors[AButtonKind]; -end; - -{ TcxStandardLookAndFeelPainter } - -class function TcxStandardLookAndFeelPainter.LookAndFeelStyle: TcxLookAndFeelStyle; -begin - Result := lfsStandard; -end; - -class function TcxStandardLookAndFeelPainter.BorderSize: Integer; -begin - Result := 2; -end; - -class procedure TcxStandardLookAndFeelPainter.DrawBorder(ACanvas: TcxCanvas; R: TRect); -begin - ACanvas.DrawComplexFrame(R, clBtnShadow, clBtnHighlight); - InflateRect(R, -1, -1); - ACanvas.DrawComplexFrame(R, cl3DDkShadow, cl3DLight); -end; - -class function TcxStandardLookAndFeelPainter.ButtonBorderSize(AState: TcxButtonState = cxbsNormal): Integer; -begin - if AState = cxbsDefault then Result := 3 else Result := 2; -end; - -class function TcxStandardLookAndFeelPainter.ButtonTextOffset: Integer; -begin - Result := 1; -end; - -class function TcxStandardLookAndFeelPainter.ButtonTextShift: Integer; -begin - Result := 1; -end; - -class procedure TcxStandardLookAndFeelPainter.DrawButtonBorder(ACanvas: TcxCanvas; R: TRect; - AState: TcxButtonState); -begin - if AState <> cxbsPressed then - begin - if AState = cxbsDefault then - begin - ACanvas.FrameRect(R, clBlack); - InflateRect(R, -1, -1); - end; - ACanvas.DrawComplexFrame(R, clBtnHighlight, cl3DDkShadow); - InflateRect(R, -1, -1); - ACanvas.DrawComplexFrame(R, cl3DLight, clBtnShadow); - end - else - begin - ACanvas.FrameRect(R, clBlack); - InflateRect(R, -1, -1); - ACanvas.DrawComplexFrame(R, clBtnShadow, clBtnShadow); - end; -end; - -class procedure TcxStandardLookAndFeelPainter.DrawGroupExpandButton(ACanvas: TcxCanvas; - const R: TRect; AExpanded: Boolean; AState: TcxButtonState); -begin - TcxFlatLookAndFeelPainter.DrawGroupExpandButton(ACanvas, R, AExpanded, AState); -end; - -class function TcxStandardLookAndFeelPainter.ExpandButtonSize: Integer; -begin - Result := 12; -end; - -class procedure TcxStandardLookAndFeelPainter.DrawExpandButton(ACanvas: TcxCanvas; - const R: TRect; AExpanded: Boolean; AColor: TColor = clDefault); -var - ARect: TRect; - - procedure DrawButton; - begin - ACanvas.DrawEdge(ARect, False, False, [bLeft, bTop]); - ACanvas.DrawEdge(ARect, False, True, [bRight, bBottom]); - InflateRect(ARect, -1, -1); - ACanvas.DrawEdge(ARect, False, False, [bRight, bBottom]); - Dec(ARect.Right); - Dec(ARect.Bottom); - if AColor = clDefault then - ACanvas.Brush.Color := clBtnFace - else - ACanvas.Brush.Color := AColor; - ACanvas.FillRect(ARect); - end; - -begin - ARect := R; - DrawButton; - DrawExpandButtonCross(ACanvas, ARect, AExpanded, clBtnText); - ACanvas.ExcludeClipRect(R); -end; - -class function TcxStandardLookAndFeelPainter.IsButtonHotTrack: Boolean; -begin - Result := False; -end; - -class procedure TcxStandardLookAndFeelPainter.DrawCheckBorder(ACanvas: TcxCanvas; R: TRect; - AState: TcxButtonState); -begin - ACanvas.DrawEdge(R, True, False{True}); - InflateRect(R, -1, -1); - ACanvas.DrawEdge(R, True, True{False}); -end; - -class procedure TcxStandardLookAndFeelPainter.DrawHeaderBorder(ACanvas: TcxCanvas; - const R: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders); -var - I: TcxNeighbor; -begin - with ACanvas do - begin - DrawEdge(R, False, False); - for I := Low(I) to High(I) do - if I in ANeighbors then - case I of - nLeft: - begin - Pixels[R.Left, R.Top + 1] := clBtnFace; //!!! - Pixels[R.Left, R.Bottom - 2] := clBtnFace; //!!! - end; - nRight: - begin - Pixels[R.Right - 1, R.Top] := clBtnHighlight; - Pixels[R.Right - 1, R.Top + 1] := clBtnFace; //!!! - Pixels[R.Right - 1, R.Bottom - 2] := clBtnFace; //!!! - end; - nTop:; - nBottom:; - end; - end; -end; - -class procedure TcxStandardLookAndFeelPainter.DrawHeaderControlSectionBorder( - ACanvas: TcxCanvas; const R: TRect; - ABorders: TcxBorders; AState: TcxButtonState); -var - ARect: TRect; -begin - ARect := R; - if AState <> cxbsPressed then - begin - ACanvas.DrawComplexFrame(ARect, clBtnHighlight, - cl3DDkShadow, ABorders); - InflateRect(ARect, -1, -1); - ACanvas.DrawComplexFrame(ARect, cl3DLight, clBtnShadow, ABorders); - end - else - ACanvas.DrawComplexFrame(ARect, clBtnShadow, clBtnShadow, ABorders); -end; - -class procedure TcxStandardLookAndFeelPainter.DrawSortingMark(ACanvas: TcxCanvas; - const R: TRect; AAscendingSorting: Boolean); -begin - DrawSortingArrow(ACanvas, R, clBtnShadow, clBtnHighlight, AAscendingSorting); -end; - -class function TcxStandardLookAndFeelPainter.HeaderBorderSize: Integer; -begin - Result := 1; -end; - -class function TcxStandardLookAndFeelPainter.HeaderControlSectionBorderSize( - AState: TcxButtonState = cxbsNormal): Integer; -begin - if AState = cxbsPressed then - Result := 1 - else - Result := 2; -end; - -class function TcxStandardLookAndFeelPainter.SortingMarkSize: TPoint; -begin - Result := Point(8, 7); -end; - -class function TcxStandardLookAndFeelPainter.FooterBorderSize: Integer; -begin - Result := 1; -end; - -class function TcxStandardLookAndFeelPainter.FooterCellBorderSize: Integer; -begin - Result := 1; -end; - -class function TcxStandardLookAndFeelPainter.FooterCellOffset: Integer; -begin - Result := 1; -end; - -class procedure TcxStandardLookAndFeelPainter.DrawFooterBorder(ACanvas: TcxCanvas; - const R: TRect); -begin - ACanvas.DrawEdge(R, False, False); -end; - -class procedure TcxStandardLookAndFeelPainter.DrawFooterCellBorder(ACanvas: TcxCanvas; const R: TRect); -begin - ACanvas.DrawEdge(R, True, True); -end; - -class procedure TcxStandardLookAndFeelPainter.DrawFilterDropDownButton(ACanvas: TcxCanvas; R: TRect; - AState: TcxButtonState; AIsFilterActive: Boolean); - - class function GetArrowColor: TColor; - begin - if AIsFilterActive then - Result := ActiveFilterButtonArrowColor - else - Result := clBtnText; - end; - -begin - if AState <> cxbsPressed then - ACanvas.DrawEdge(R, False, False) - else - ACanvas.DrawEdge(R, True, True); - InflateRect(R, -1, -1); - ACanvas.Brush.Color := clBtnFace; - ACanvas.FillRect(R); - DrawButtonArrow(ACanvas, R, GetArrowColor); -end; - -class procedure TcxStandardLookAndFeelPainter.DrawTabBorder(ACanvas: TcxCanvas; R: TRect; - ABorder: TcxBorder; ABorders: TcxBorders; AVertical: Boolean); -const - Colors: array[Boolean] of TColor = (clBtnShadow, clBtnHighlight); - - procedure ProcessVerticalTabBorder; - begin - case ABorder of - bLeft: - begin - Inc(R.Top); - if bTop in ABorders then Inc(R.Top); - Dec(R.Bottom); - if bBottom in ABorders then Dec(R.Bottom); - end; - bTop, bBottom: - if bLeft in ABorders then Inc(R.Left); - end; - if ABorder = bLeft then - begin - ACanvas.Pixels[R.Left + 1, R.Top - 1] := Colors[True]; - ACanvas.Pixels[R.Left + 1, R.Bottom] := Colors[True]; - end; - ACanvas.Brush.Color := Colors[ABorder <> bBottom]; - end; - - procedure ProcessHorizontalTabBorder; - begin - case ABorder of - bTop: - begin - Inc(R.Left); - Dec(R.Right); - end; - bLeft, bRight: - begin - if bTop in ABorders then Inc(R.Top, 2); - if bBottom in ABorders then Dec(R.Bottom); - end; - end; - if ABorder = bTop then - begin - ACanvas.Pixels[R.Left - 1, R.Top + 1] := Colors[True]; - ACanvas.Pixels[R.Right, R.Top + 1] := Colors[True]; - end; - ACanvas.Brush.Color := Colors[ABorder <> bRight]; - end; - -begin - if AVertical then - ProcessVerticalTabBorder - else - ProcessHorizontalTabBorder; - ACanvas.FillRect(R); -end; - -class procedure TcxStandardLookAndFeelPainter.DrawTabsRoot(ACanvas: TcxCanvas; const R: TRect; - ABorders: TcxBorders; AVertical: Boolean); -begin - ACanvas.DrawEdge(R, False, False, ABorders); -end; - -class function TcxStandardLookAndFeelPainter.TabBorderSize(AVertical: Boolean): Integer; -begin - Result := 1; -end; - -class procedure TcxStandardLookAndFeelPainter.DrawScrollBarPart(ACanvas: TcxCanvas; - AHorizontal: Boolean; R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); - - function GetArrowState: Integer; - const - States: array[Boolean, Boolean] of Integer = ((DFCS_SCROLLUP, DFCS_SCROLLDOWN), - (DFCS_SCROLLLEFT, DFCS_SCROLLRIGHT)); - begin - Result := States[AHorizontal, APart = sbpLineDown]; - if AState = cxbsDisabled then Result := Result or DFCS_INACTIVE - else if AState = cxbsPressed then Result := Result or DFCS_FLAT; - end; - - procedure DrawScrollBarButtonBorder(R: TRect); - begin - if (AState <> cxbsPressed) or (APart = sbpThumbnail) then - begin - ACanvas.DrawComplexFrame(R, clBtnFace, cl3DDkShadow); - InflateRect(R, -1, -1); - ACanvas.DrawComplexFrame(R, clBtnHighlight, clBtnShadow); - end - else - begin - ACanvas.DrawComplexFrame(R, clBtnShadow, clBtnShadow); - InflateRect(R, -1, -1); - ACanvas.DrawComplexFrame(R, clBtnFace, clBtnFace); - end; - end; - -begin - if IsRectEmpty(R) or ((APart = sbpThumbnail) and (AState = cxbsDisabled)) then Exit; - if AState = cxbsHot then AState := cxbsNormal; - case APart of - sbpThumbnail, sbpLineUp, sbpLineDown: - begin - // for compatibility with standard painting - if APart <> sbpThumbnail then - begin - if AState = cxbsPressed then OffsetRect(R, 1, 1); - DrawFrameControl(ACanvas.Canvas.Handle, R, DFC_SCROLL, GetArrowState); - if AState = cxbsPressed then OffsetRect(R, -1, -1); - DrawScrollBarButtonBorder(R); - end - else - begin - DrawScrollBarButtonBorder(R); - InflateRect(R, -ButtonBorderSize, -ButtonBorderSize); - ACanvas.Brush.Color := clBtnFace; - ACanvas.FillRect(R); - end; - end; - sbpPageUp, sbpPageDown: - begin - ACanvas.Brush.Bitmap := StdScrollBitmaps[AState = cxbsPressed]; - ACanvas.FillRect(R); - ACanvas.Brush.Bitmap := nil; - ACanvas.Brush.Style := bsSolid; - end; - end; -end; - -class procedure TcxStandardLookAndFeelPainter.DrawMonthHeader(ACanvas: TcxCanvas; - const ABounds: TRect; const AText: string; ANeighbors: TcxNeighbors; - const AViewParams: TcxViewParams; AArrows: TcxHeaderArrows; - ASideWidth: Integer; AOnDrawBackground: TcxDrawBackgroundEvent = nil); -const - Borders: array[Boolean, Boolean] of TcxBorders = - ((cxBordersAll, [bTop, bBottom, bLeft]), ([bTop, bBottom, bRight], [bTop, bBottom])); -var - ABorders: TcxBorders; - R: TRect; -begin - ABorders := Borders[nLeft in ANeighbors, nRight in ANeighbors]; - ACanvas.FrameRect(ABounds, clBlack, 1, ABorders); - R := HeaderContentBounds(ABounds, ABorders); - DrawHeader(ACanvas, R, R, ANeighbors, cxBordersAll, cxbsNormal, taCenter, - vaCenter, False, False, AText, AViewParams.Font, AViewParams.TextColor, - AViewParams.Color, AOnDrawBackground); - DrawMonthHeaderArrows(ACanvas, ABounds, AArrows, ASideWidth, clWindowText); -end; - -class function TcxStandardLookAndFeelPainter.DefaultSchedulerViewContentColor: TColor; -begin - Result := clWindow; -end; - -class procedure TcxStandardLookAndFeelPainter.DrawSchedulerSplitterBorder( - ACanvas: TcxCanvas; R: TRect; const AViewParams: TcxViewParams; - AIsHorizontal: Boolean); - - procedure DrawHorzBorders(const R: TRect; ATopColor, ABottomColor: TColor); - begin - ACanvas.SetBrushColor(ATopColor); - ACanvas.FillRect(Rect(R.Left, R.Top, R.Right, R.Top + 1)); - ACanvas.SetBrushColor(ABottomColor); - ACanvas.FillRect(Rect(R.Left, R.Bottom - 1, R.Right, R.Bottom)); - end; - - procedure DrawVertBorders(const R: TRect; ALeftColor, ARightColor: TColor); - begin - ACanvas.SetBrushColor(ALeftColor); - ACanvas.FillRect(Rect(R.Left, R.Top, R.Left + 1, R.Bottom)); - ACanvas.SetBrushColor(ARightColor); - ACanvas.FillRect(Rect(R.Right - 1, R.Top, R.Right, R.Bottom)); - end; - -begin - if AIsHorizontal then - begin - DrawHorzBorders(R, clBtnFace, cl3DDkShadow); - InflateRect(R, 1, -1); - DrawHorzBorders(R, clBtnHighlight, clBtnShadow); - InflateRect(R, 1, -1); - end - else - begin - DrawVertBorders(R, clBtnFace, cl3DDkShadow); - InflateRect(R, -1, 1); - DrawVertBorders(R, clBtnHighlight, clBtnShadow); - InflateRect(R, -1, 1); - end; - ACanvas.FillRect(R, AViewParams); -end; - -class procedure TcxStandardLookAndFeelPainter.DrawGroupBoxFrame(ACanvas: TcxCanvas; - R: TRect; AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition; - ABorders: TcxBorders = cxBordersAll); -begin - Dec(R.Right); - Dec(R.Bottom); - ACanvas.FrameRect(R, clBtnShadow, 1, ABorders, True); - OffsetRect(R, 1, 1); - ACanvas.FrameRect(R, clBtnHighlight, 1, ABorders, True); -end; - -{ TcxFlatLookAndFeelPainter } - -class function TcxFlatLookAndFeelPainter.LookAndFeelStyle: TcxLookAndFeelStyle; -begin - Result := lfsFlat; -end; - -class function TcxFlatLookAndFeelPainter.BorderSize: Integer; -begin - Result := 1; -end; - -class procedure TcxFlatLookAndFeelPainter.DrawBorder(ACanvas: TcxCanvas; R: TRect); -begin - ACanvas.DrawEdge(R, True, True); -end; - -class function TcxFlatLookAndFeelPainter.ButtonBorderSize(AState: TcxButtonState = cxbsNormal): Integer; -begin - if AState = cxbsDefault then Result := 2 else Result := 1; -end; - -class function TcxFlatLookAndFeelPainter.ButtonTextOffset: Integer; -begin - Result := 1; -end; - -class function TcxFlatLookAndFeelPainter.ButtonTextShift: Integer; -begin - Result := 1; -end; - -class procedure TcxFlatLookAndFeelPainter.DrawButtonBorder(ACanvas: TcxCanvas; R: TRect; - AState: TcxButtonState); -begin - if AState <> cxbsPressed then - begin - if AState = cxbsDefault then - begin - ACanvas.FrameRect(R, clBlack); - InflateRect(R, -1, -1); - end; - ACanvas.DrawComplexFrame(R, clBtnHighlight, clBtnShadow) - end - else - ACanvas.DrawComplexFrame(R, clBtnShadow, clBtnHighlight); -end; - -class procedure TcxFlatLookAndFeelPainter.DrawExpandButton(ACanvas: TcxCanvas; - const R: TRect; AExpanded: Boolean; AColor: TColor = clDefault); -var - ARect: TRect; -begin - ARect := R; - DrawButton(ACanvas, ARect, '', cxbsNormal, True, AColor); - InflateRect(ARect, -1, -1); - DrawExpandButtonCross(ACanvas, ARect, AExpanded, clBtnText); - ACanvas.ExcludeClipRect(R); -end; - -class function TcxFlatLookAndFeelPainter.ExpandButtonSize: Integer; -begin - Result := 11; -end; - -class function TcxFlatLookAndFeelPainter.IsButtonHotTrack: Boolean; -begin - Result := False; -end; - -class procedure TcxFlatLookAndFeelPainter.DrawCheckBorder(ACanvas: TcxCanvas; R: TRect; - AState: TcxButtonState); -begin - ACanvas.DrawEdge(R, True, True); - InflateRect(R, -1, -1); - ACanvas.FrameRect(R, CheckButtonColor(AState)); -end; - -class procedure TcxFlatLookAndFeelPainter.DrawHeaderBorder(ACanvas: TcxCanvas; - const R: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders); -var - I: TcxNeighbor; -begin - with ACanvas do - begin - DrawEdge(R, False, False); - for I := Low(I) to High(I) do - if I in ANeighbors then - case I of - nLeft: - begin - Pixels[R.Left, R.Top + 1] := clBtnFace; //!!! - Pixels[R.Left, R.Bottom - 2] := clBtnFace; //!!! - end; - nRight: - begin - Pixels[R.Right - 1, R.Top] := clBtnHighlight; - Pixels[R.Right - 1, R.Top + 1] := clBtnFace; //!!! - Pixels[R.Right - 1, R.Bottom - 2] := clBtnFace; //!!! - end; - nTop:; - nBottom:; - end; - end; -end; - -class procedure TcxFlatLookAndFeelPainter.DrawHeaderControlSectionBorder( - ACanvas: TcxCanvas; const R: TRect; ABorders: TcxBorders; AState: TcxButtonState); -begin - if AState <> cxbsPressed then - ACanvas.DrawComplexFrame(R, clBtnHighlight, clBtnShadow, ABorders) - else - ACanvas.DrawComplexFrame(R, clBtnShadow, clBtnHighlight, ABorders); -end; - -class procedure TcxFlatLookAndFeelPainter.DrawSortingMark(ACanvas: TcxCanvas; - const R: TRect; AAscendingSorting: Boolean); -begin - DrawSortingArrow(ACanvas, R, clBtnShadow, clBtnHighlight, AAscendingSorting); -end; - -class function TcxFlatLookAndFeelPainter.HeaderBorderSize: Integer; -begin - Result := 1; -end; - -class function TcxFlatLookAndFeelPainter.SortingMarkSize: TPoint; -begin - Result := Point(8, 7); -end; - -class function TcxFlatLookAndFeelPainter.FooterBorderSize: Integer; -begin - Result := 1; -end; - -class function TcxFlatLookAndFeelPainter.FooterCellBorderSize: Integer; -begin - Result := 1; -end; - -class function TcxFlatLookAndFeelPainter.FooterCellOffset: Integer; -begin - Result := 1; -end; - -class procedure TcxFlatLookAndFeelPainter.DrawFooterBorder(ACanvas: TcxCanvas; - const R: TRect); -begin - ACanvas.DrawEdge(R, False, False); -end; - -class procedure TcxFlatLookAndFeelPainter.DrawFooterCellBorder(ACanvas: TcxCanvas; const R: TRect); -begin - ACanvas.DrawEdge(R, True, True); -end; - -class procedure TcxFlatLookAndFeelPainter.DrawFilterDropDownButton(ACanvas: TcxCanvas; R: TRect; - AState: TcxButtonState; AIsFilterActive: Boolean); - - class function GetArrowColor: TColor; - begin - if AIsFilterActive then - Result := ActiveFilterButtonArrowColor - else - Result := clBtnText; - end; - -begin - if AState <> cxbsPressed then - ACanvas.DrawEdge(R, False, False) - else - ACanvas.DrawEdge(R, True, True); - InflateRect(R, -1, -1); - ACanvas.Brush.Color := clBtnFace; - ACanvas.FillRect(R); - DrawButtonArrow(ACanvas, R, GetArrowColor); -end; - -class procedure TcxFlatLookAndFeelPainter.DrawTabBorder(ACanvas: TcxCanvas; R: TRect; - ABorder: TcxBorder; ABorders: TcxBorders; AVertical: Boolean); -const - Colors: array[Boolean] of TColor = (clBtnShadow, clBtnHighlight); - - procedure ProcessVerticalTabBorder; - begin - case ABorder of - bLeft: - begin - Inc(R.Top); - if bTop in ABorders then Inc(R.Top); - Dec(R.Bottom); - if bBottom in ABorders then Dec(R.Bottom); - end; - bTop, bBottom: - if bLeft in ABorders then Inc(R.Left); - end; - if ABorder = bLeft then - begin - ACanvas.Pixels[R.Left + 1, R.Top - 1] := Colors[True]; - ACanvas.Pixels[R.Left + 1, R.Bottom] := Colors[True]; - end; - ACanvas.Brush.Color := Colors[ABorder <> bBottom]; - end; - - procedure ProcessHorizontalTabBorder; - begin - case ABorder of - bTop: - begin - Inc(R.Left); - Dec(R.Right); - end; - bLeft, bRight: - begin - if bTop in ABorders then Inc(R.Top, 2); - if bBottom in ABorders then Dec(R.Bottom); - end; - end; - if ABorder = bTop then - begin - ACanvas.Pixels[R.Left - 1, R.Top + 1] := Colors[True]; - ACanvas.Pixels[R.Right, R.Top + 1] := Colors[True]; - end; - ACanvas.Brush.Color := Colors[ABorder <> bRight]; - end; - -begin - if AVertical then - ProcessVerticalTabBorder - else - ProcessHorizontalTabBorder; - ACanvas.FillRect(R); -end; - -class procedure TcxFlatLookAndFeelPainter.DrawTabsRoot(ACanvas: TcxCanvas; const R: TRect; - ABorders: TcxBorders; AVertical: Boolean); -begin - ACanvas.DrawEdge(R, False, False, ABorders); -end; - -class function TcxFlatLookAndFeelPainter.TabBorderSize(AVertical: Boolean): Integer; -begin - Result := 1; -end; - -class procedure TcxFlatLookAndFeelPainter.DrawScrollBarPart(ACanvas: TcxCanvas; AHorizontal: Boolean; - R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); -begin - if IsRectEmpty(R) or ((APart = sbpThumbnail) and (AState = cxbsDisabled)) then Exit; - if AState = cxbsHot then AState := cxbsNormal; - case APart of - sbpThumbnail, sbpLineUp, sbpLineDown: - begin - DrawButton(ACanvas, R, '', AState); - InflateRect(R, -ButtonBorderSize, -ButtonBorderSize); - if APart <> sbpThumbnail then - DrawScrollBarArrow(ACanvas, R, AState, GetArrowDirection(AHorizontal, APart)); - end; - sbpPageUp, sbpPageDown: - begin - ACanvas.Brush.Bitmap := StdScrollBitmaps[AState = cxbsPressed]; - ACanvas.FillRect(R); - ACanvas.Brush.Bitmap := nil; - ACanvas.Brush.Style := bsSolid; - end; - end; -end; - -class procedure TcxFlatLookAndFeelPainter.DrawSchedulerSplitterBorder( - ACanvas: TcxCanvas; R: TRect; const AViewParams: TcxViewParams; - AIsHorizontal: Boolean); -begin - if AIsHorizontal then - begin - ACanvas.SetBrushColor(clBtnHighlight); - ACanvas.FillRect(Rect(R.Left, R.Top, R.Right, R.Top + 1)); - ACanvas.SetBrushColor(clBtnShadow); - ACanvas.FillRect(Rect(R.Left, R.Bottom - 1, R.Right, R.Bottom)); - InflateRect(R, 1, -1); - end - else - begin - ACanvas.SetBrushColor(clBtnHighlight); - ACanvas.FillRect(Rect(R.Left, R.Top, R.Left + 1, R.Bottom)); - ACanvas.SetBrushColor(clBtnShadow); - ACanvas.FillRect(Rect(R.Right - 1, R.Top, R.Right, R.Bottom)); - InflateRect(R, -1, 1); - end; - ACanvas.FillRect(R, AViewParams); -end; - -class procedure TcxFlatLookAndFeelPainter.DrawGroupBoxFrame(ACanvas: TcxCanvas; - R: TRect; AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition; - ABorders: TcxBorders = cxBordersAll); -begin - ACanvas.FrameRect(R, clBtnShadow, 1, ABorders, True); - InflateRect(R, -1, -1); - ACanvas.FrameRect(R, clBtnHighlight, 1, ABorders, True); -end; - -class procedure TcxFlatLookAndFeelPainter.DrawDateNavigatorDateHeader( - ACanvas: TcxCanvas; var R: TRect); -begin - ACanvas.FillRect(R, DefaultDateNavigatorHeaderColor); - ACanvas.FrameRect(R, clBtnFace, 1, [bBottom]); - Dec(R.Bottom); -end; - -{ TcxUltraFlatLookAndFeelPainter } - -class function TcxUltraFlatLookAndFeelPainter.LookAndFeelStyle: TcxLookAndFeelStyle; -begin - Result := lfsUltraFlat; -end; - -class function TcxUltraFlatLookAndFeelPainter.DefaultSchedulerBorderColor: TColor; -begin - Result := clBtnShadow; -end; - -class function TcxUltraFlatLookAndFeelPainter.BorderHighlightColor: TColor; -begin - Result := clHighlight; -end; - -class function TcxUltraFlatLookAndFeelPainter.BorderSize: Integer; -begin - Result := 1; -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawBorder(ACanvas: TcxCanvas; R: TRect); -begin - ACanvas.FrameRect(R, clBtnShadow); -end; - -class function TcxUltraFlatLookAndFeelPainter.ButtonBorderSize(AState: TcxButtonState = cxbsNormal): Integer; -begin - if AState = cxbsDefault then Result := 2 else Result := 1; -end; - -class function TcxUltraFlatLookAndFeelPainter.ButtonColor(AState: TcxButtonState): TColor; -begin - case AState of - cxbsHot: - Result := GetLightSelColor; - cxbsPressed: - Result := GetLightDownedSelColor; - else - Result := inherited ButtonColor(AState); - end; -end; - -class function TcxUltraFlatLookAndFeelPainter.ButtonFocusRect(ACanvas: TcxCanvas; R: TRect): TRect; -begin - Result := R; - InflateRect(Result, -3, -3); - if IsRectEmpty(Result) then - Result := R; -end; - -class function TcxUltraFlatLookAndFeelPainter.ButtonGroupBorderSizes(AButtonCount, - AButtonIndex: Integer): TRect; -begin - Result := Rect(1, 2, 1, 2); - if AButtonIndex = 0 then - Inc(Result.Left) - else - if AButtonIndex = AButtonCount - 1 then - Inc(Result.Right); -end; - -class function TcxUltraFlatLookAndFeelPainter.ButtonSymbolColor( - AState: TcxButtonState; ADefaultColor: TColor = clDefault): TColor; -begin - if AState = cxbsPressed then - Result := clHighlightText - else - Result := inherited ButtonSymbolColor(AState, ADefaultColor); -end; - -class function TcxUltraFlatLookAndFeelPainter.ButtonSymbolState(AState: TcxButtonState): TcxButtonState; -begin - Result := cxbsNormal; -end; - -class function TcxUltraFlatLookAndFeelPainter.ButtonTextOffset: Integer; -begin - Result := 2; -end; - -class function TcxUltraFlatLookAndFeelPainter.ButtonTextShift: Integer; -begin - Result := 0; -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawButtonBorder(ACanvas: TcxCanvas; R: TRect; - AState: TcxButtonState); - - function GetBorderColor: TColor; - begin - case AState of -// cxbsDefault: -// Result := clNavy; - cxbsDisabled: - Result := clBtnShadow; - cxbsNormal: - Result := clBtnText; - else - Result := clHighlight; - end; - end; - -begin - if AState = cxbsDefault then - begin - ACanvas.FrameRect(R, clWindowFrame); - InflateRect(R, -1, -1); - ACanvas.FrameRect(R, clWindowFrame); - end - else - ACanvas.FrameRect(R, GetBorderColor); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawButtonInGroup(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState; AButtonCount, AButtonIndex: Integer; - ABackgroundColor: TColor); -begin - Inc(R.Top); - Dec(R.Bottom); - if AButtonIndex = 0 then - Inc(R.Left); - if AButtonIndex = AButtonCount - 1 then - Dec(R.Right); - with ACanvas do - begin - if AState in [cxbsDisabled, cxbsNormal] then - begin - FrameRect(R, ABackgroundColor); - InflateRect(R, -1, -1); - end else - begin - Brush.Color := BorderHighlightColor; - if AButtonIndex > 0 then - begin - FillRect(Rect(R.Left, R.Top, R.Left + 1, R.Bottom)); - Inc(R.Left); - end; - if AButtonIndex < AButtonCount - 1 then - begin - FillRect(Rect(R.Right - 1, R.Top, R.Right, R.Bottom)); - Dec(R.Right); - end; - end; - Brush.Color := ButtonColor(AState); - FillRect(R); - end; -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawButtonGroupBorder(ACanvas: TcxCanvas; - R: TRect; AInplace, ASelected: Boolean); -var - AColor: TColor; -begin - if AInplace then - AColor := clBtnText - else - if ASelected then - AColor := BorderHighlightColor - else - AColor := clBtnShadow; - ACanvas.FrameRect(R, AColor); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawExpandButton(ACanvas: TcxCanvas; - const R: TRect; AExpanded: Boolean; AColor: TColor = clDefault); -var - ARect: TRect; -begin - ARect := R; - ACanvas.FrameRect(ARect, clBtnShadow); - InflateRect(ARect, -1, -1); - if AColor = clDefault then - ACanvas.Brush.Color := clBtnFace - else - ACanvas.Brush.Color := AColor; - ACanvas.FillRect(ARect); - DrawExpandButtonCross(ACanvas, ARect, AExpanded, clBtnText); - ACanvas.ExcludeClipRect(R); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawHeaderControlSectionBorder( - ACanvas: TcxCanvas; const R: TRect; ABorders: TcxBorders; AState: TcxButtonState); -begin - if AState <> cxbsDisabled then - ACanvas.DrawComplexFrame(R, clBlack, clBlack, ABorders) - else - ACanvas.DrawComplexFrame(R, clBtnShadow, clBtnShadow, ABorders); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawHeaderControlSectionContent( - ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - AState: TcxButtonState; AAlignmentHorz: TAlignment; - AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor); -begin - if AState in [cxbsDefault, cxbsNormal] then - ACanvas.SetBrushColor(ABkColor) - else - ACanvas.SetBrushColor(ButtonColor(AState)); - ACanvas.FillRect(ABounds); - ACanvas.Font.Color := ATextColor; - DrawHeaderControlSectionText(ACanvas, ATextAreaBounds, AState, AAlignmentHorz, - AAlignmentVert, AMultiLine, AShowEndEllipsis, AText, AFont, ATextColor); -end; - -class function TcxUltraFlatLookAndFeelPainter.ExpandButtonSize: Integer; -begin - Result := 11; -end; - -class function TcxUltraFlatLookAndFeelPainter.IsButtonHotTrack: Boolean; -begin - Result := True; -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawCheckBorder(ACanvas: TcxCanvas; R: TRect; - AState: TcxButtonState); -begin - ACanvas.FrameRect(R, clBtnText); - InflateRect(R, -1, -1); - ACanvas.FrameRect(R, CheckButtonColor(AState)); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawHeaderBorder(ACanvas: TcxCanvas; - const R: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders); -begin - ACanvas.Brush.Color := clBtnText; - with R do - begin - if bLeft in ABorders then - ACanvas.FillRect(Rect(Left, Top, Left + 1, Bottom)); - if bTop in ABorders then - ACanvas.FillRect(Rect(Left, Top, Right, Top + 1)); - ACanvas.FillRect(Rect(Right - 1, Top, Right, Bottom)); - ACanvas.FillRect(Rect(Left, Bottom - 1, Right, Bottom)); - end; -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawHeaderEx(ACanvas: TcxCanvas; - const ABounds, ATextAreaBounds: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders; - AState: TcxButtonState; AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; - AMultiLine, AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; - ATextColor, ABkColor: TColor; AOnDrawBackground: TcxDrawBackgroundEvent = nil); -var - R: TRect; -begin - R := ATextAreaBounds; - InflateRect(R, -1, -1); - DrawContent(ACanvas, ABounds, R, Integer(AState), - AAlignmentHorz, AAlignmentVert, AMultiLine, AShowEndEllipsis, AText, - AFont, ATextColor, ABkColor, AOnDrawBackground); - R := ABounds; - InflateRect(R, -1, -1); - DrawHeaderBorder(ACanvas, R, ANeighbors, ABorders); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawSortingMark(ACanvas: TcxCanvas; - const R: TRect; AAscendingSorting: Boolean); -begin - DrawSortingArrow(ACanvas, R, clBtnShadow, clBtnShadow, AAscendingSorting); -end; - -class function TcxUltraFlatLookAndFeelPainter.HeaderBorders(ANeighbors: TcxNeighbors): TcxBorders; -begin - Result := inherited HeaderBorders(ANeighbors); - if nLeft in ANeighbors then Exclude(Result, bLeft); - if nTop in ANeighbors then Exclude(Result, bTop); -end; - -class function TcxUltraFlatLookAndFeelPainter.HeaderBorderSize: Integer; -begin - Result := 1; -end; - -class function TcxUltraFlatLookAndFeelPainter.SortingMarkSize: TPoint; -begin - Result := Point(7, 8); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawFooterBorder(ACanvas: TcxCanvas; - const R: TRect); -begin - DrawFooterBorderEx(ACanvas, R, [bRight, bBottom]); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawFooterCellBorder(ACanvas: TcxCanvas; - const R: TRect); -begin - ACanvas.FrameRect(R, FooterSeparatorColor); -end; - -class function TcxUltraFlatLookAndFeelPainter.FooterBorders: TcxBorders; -begin - Result := [bRight, bBottom]; -end; - -class function TcxUltraFlatLookAndFeelPainter.FooterBorderSize: Integer; -begin - Result := 1; -end; - -class function TcxUltraFlatLookAndFeelPainter.FooterCellBorderSize: Integer; -begin - Result := 1; -end; - -class function TcxUltraFlatLookAndFeelPainter.FooterCellOffset: Integer; -begin - Result := 2; -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawFilterDropDownButton(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState; AIsFilterActive: Boolean); - - function GetArrowColor: TColor; - begin - if AIsFilterActive then - Result := ActiveFilterButtonArrowColor - else - Result := ButtonSymbolColor(AState); - end; - -begin - ACanvas.FrameRect(R, FilterDropDownButtonBorderColor(AState)); - InflateRect(R, -1, -1); - ACanvas.Brush.Color := ButtonColor(AState); - ACanvas.FillRect(R); - DrawButtonArrow(ACanvas, R, GetArrowColor); -end; - -class function TcxUltraFlatLookAndFeelPainter.FilterCloseButtonSize: TPoint; -begin - Result := inherited FilterCloseButtonSize; - Inc(Result.Y); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawTabBorder(ACanvas: TcxCanvas; R: TRect; - ABorder: TcxBorder; ABorders: TcxBorders; AVertical: Boolean); -begin - if AVertical and (ABorder = bBottom) or not AVertical and (ABorder = bRight) then - begin - if not AVertical then - Dec(R.Bottom, TabBorderSize(AVertical)); - ACanvas.Brush.Color := TabBorderDarkColor; - end - else - ACanvas.Brush.Color := TabBorderHighlightColor; - ACanvas.FillRect(R); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawTabsRoot(ACanvas: TcxCanvas; - const R: TRect; ABorders: TcxBorders; AVertical: Boolean); -begin - ACanvas.DrawComplexFrame(R, TabBorderHighlightColor, TabBorderHighlightColor, ABorders, TabBorderSize(AVertical)); -end; - -class function TcxUltraFlatLookAndFeelPainter.TabBorderSize(AVertical: Boolean): Integer; -begin - Result := 1; -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawScrollBarPart(ACanvas: TcxCanvas; - AHorizontal: Boolean; R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); -begin - if IsRectEmpty(R) or ((APart = sbpThumbnail) and (AState = cxbsDisabled)) then Exit; - case APart of - sbpThumbnail, sbpLineUp, sbpLineDown: - begin - DrawButton(ACanvas, R, '', AState); - if APart <> sbpThumbnail then - DrawScrollBarArrow(ACanvas, R, AState, GetArrowDirection(AHorizontal, APart)); - end; - sbpPageUp, sbpPageDown: - begin - ACanvas.Brush.Bitmap := StdScrollBitmaps[AState = cxbsPressed]; - ACanvas.FillRect(R); - ACanvas.Brush.Bitmap := nil; - ACanvas.Brush.Style := bsSolid; - end; - end; -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawSchedulerNavigationButtonContent( - ACanvas: TcxCanvas; const ARect: TRect; const AArrowRect: TRect; AIsNextButton: Boolean; - AState: TcxButtonState); -const - Borders: array[Boolean] of TcxBorders = - ([bRight, bTop, bBottom], [bLeft, bTop, bBottom]); -var - AColor: TColor; - R: TRect; -begin - R := ARect; - ACanvas.FillRect(R, clBtnFace); - if AState = cxbsHot then - AColor := TabBorderHighlightColor - else - AColor := TabBorderDarkColor; - ACanvas.DrawComplexFrame(R, AColor, AColor, Borders[AIsNextButton]); - DrawSchedulerNavigationButtonArrow(ACanvas, AArrowRect, AIsNextButton, - ButtonSymbolColor(AState)); -end; - -class function TcxUltraFlatLookAndFeelPainter.FilterDropDownButtonBorderColor(AState: TcxButtonState): TColor; -begin - if AState = cxbsNormal then - Result := clBtnShadow - else - Result := clHighlight; -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawFooterBorderEx(ACanvas: TcxCanvas; - const R: TRect; ABorders: TcxBorders); -begin - ACanvas.FrameRect(R, FooterSeparatorColor, FooterSeparatorSize, ABorders); -end; - -class function TcxUltraFlatLookAndFeelPainter.TabBorderHighlightColor: TColor; -begin - Result := clBtnShadow; -end; - -class function TcxUltraFlatLookAndFeelPainter.TabBorderDarkColor: TColor; -begin - Result := clBtnText; -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawSchedulerNavigatorButton( - ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); -begin - DrawButton(ACanvas, R, '', AState, AState in [cxbsHot, cxbsPressed]); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawSchedulerSplitterBorder( - ACanvas: TcxCanvas; R: TRect; const AViewParams: TcxViewParams; - AIsHorizontal: Boolean); -begin - ACanvas.SetBrushColor(DefaultSchedulerBorderColor); - if AIsHorizontal then - begin - ACanvas.FillRect(Rect(R.Left, R.Top, R.Right, R.Top + 1)); - ACanvas.FillRect(Rect(R.Left, R.Bottom - 1, R.Right, R.Bottom)); - InflateRect(R, 1, -1); - end - else - begin - ACanvas.FillRect(Rect(R.Left, R.Top, R.Left + 1, R.Bottom)); - ACanvas.FillRect(Rect(R.Right - 1, R.Top, R.Right, R.Bottom)); - InflateRect(R, -1, 1); - end; - ACanvas.FillRect(R, AViewParams); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawGroupBoxFrame(ACanvas: TcxCanvas; - R: TRect; AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition; - ABorders: TcxBorders = cxBordersAll); -const - FrameColorMap: array[Boolean] of TColor = (clBtnShadow, clHighlight); -begin - ACanvas.FrameRect(R, FrameColorMap[AEnabled], 1, ABorders, True); -end; - -class procedure TcxUltraFlatLookAndFeelPainter.DrawPrintPreviewBackground( - ACanvas: TcxCanvas; const R: TRect); - - function GetUltraFlatValue(Value: Byte): Byte; - begin - Result := Value + (255 - Value) div 3; - end; - -var - AColor: TColor; -begin - AColor := ColorToRGB(clBtnShadow); - AColor := RGB( - GetUltraFlatValue(GetRValue(AColor)), - GetUltraFlatValue(GetGValue(AColor)), - GetUltraFlatValue(GetBValue(AColor))); - ACanvas.FillRect(R, AColor); -end; - -{ TcxOffice11LookAndFeelPainter } - -class function TcxOffice11LookAndFeelPainter.LookAndFeelStyle: TcxLookAndFeelStyle; -begin - Result := lfsOffice11; -end; - -class function TcxOffice11LookAndFeelPainter.NeedRedrawOnResize: Boolean; -begin - Result := True; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultDateNavigatorHeaderColor: TColor; -begin - Result := dxOffice11DockColor1; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultDateNavigatorSelectionColor: TColor; -begin - Result := dxOffice11DayNavigatorSelectedColor; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultDateNavigatorSelectionTextColor: TColor; -begin - Result := clWindowText; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultFilterBoxColor: TColor; -begin - Result := dxOffice11BarFloatingBorderColor1; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultFilterBoxTextColor: TColor; -begin - Result := dxOffice11BarFloatingCaptionTextColor1; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultFooterColor: TColor; -begin - Result := dxOffice11DockColor1; //DefaultHeaderColor; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultFooterTextColor: TColor; -begin - Result := DefaultHeaderTextColor; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultGroupColor: TColor; -begin - Result := dxOffice11GroupColor; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultGroupByBoxColor: TColor; -begin - Result := dxOffice11InPlaceSubItemColor{dxOffice11DockColor2}; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultGroupByBoxTextColor: TColor; -begin - Result := dxOffice11ToolbarsColor1{dxOffice11TextEnabledColor}; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultHeaderColor: TColor; -begin - Result := HeaderTopColor; //dxOffice11DockColor1; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultHeaderBackgroundColor: TColor; -begin - Result := DefaultGroupByBoxColor; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultSchedulerBorderColor: TColor; -begin - Result := dxOffice11OutlookBorderColor; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultSchedulerControlColor: TColor; -begin - Result := dxOffice11OutlookControlColor; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultTabColor: TColor; -begin - Result := dxOffice11DockColor2; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultTabsBackgroundColor: TColor; -begin - Result := DefaultTabColor; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultTimeGridMinorScaleColor: TColor; -begin - Result := dxOffice11DockColor1; -end; - -class function TcxOffice11LookAndFeelPainter.DefaultTimeGridSelectionBarColor: TColor; -begin - Result := DefaultSchedulerControlColor; -end; - -class function TcxOffice11LookAndFeelPainter.BorderHighlightColor: TColor; -begin - Result := dxOffice11SelectedBorderColor; -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawBorder(ACanvas: TcxCanvas; R: TRect); -begin - ACanvas.FrameRect(R, dxOffice11ControlBorderColor); -end; - -class function TcxOffice11LookAndFeelPainter.ButtonColor(AState: TcxButtonState): TColor; -begin - case AState of - cxbsHot: - Result := dxOffice11SelectedColor1; - cxbsPressed: - Result := dxOffice11SelectedDownColor1; - cxbsDisabled: - Result := {dxOffice11ToolbarsColor2}clBtnFace; - else - Result := dxOffice11DockColor1{inherited ButtonColor(AState)}; - end; -end; - -class function TcxOffice11LookAndFeelPainter.ButtonSymbolColor( - AState: TcxButtonState; ADefaultColor: TColor = clDefault): TColor; -begin - if (AState = cxbsPressed) and not IsXPStandardScheme then - Result := clHighlightText - else - if AState = cxbsDisabled then - Result := dxOffice11TextDisabledColor - else - Result := dxOffice11TextEnabledColor; -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawButtonBorder(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState); - - function GetBorderColor: TColor; - begin - case AState of - cxbsNormal: - Result := clBtnText; - cxbsDisabled: - Result := dxOffice11TextDisabledColor; - else - Result := dxOffice11SelectedBorderColor; - end; - end; - -begin - if AState = cxbsDefault then - inherited - else - ACanvas.FrameRect(R, GetBorderColor); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawExpandButton(ACanvas: TcxCanvas; - const R: TRect; AExpanded: Boolean; AColor: TColor = clDefault); -var - AColor2: TColor; - ABitmap: TBitmap; -begin - if AExpanded then - ABitmap := dxOffice11ExpandButtonBitmap1 - else - ABitmap := dxOffice11ExpandButtonBitmap2; - AColor2 := GetMiddleRGB(dxOffice11ExpandButtonColor1, ACanvas.Canvas.Pixels[R.Left, R.Top], 25); - ABitmap.Canvas.Pixels[0, 0] := AColor2; - AColor2 := GetMiddleRGB(dxOffice11ExpandButtonColor2, ACanvas.Canvas.Pixels[R.Right - 1, R.Bottom - 1], 25); - ABitmap.Canvas.Pixels[10, 10] := AColor2; - ABitmap.Canvas.Pixels[0, 10] := AColor2; - ABitmap.Canvas.Pixels[10, 0] := AColor2; - ACanvas.Draw(R.Left, R.Top, ABitmap); -// ACanvas.ExcludeClipRect(R); -end; - -class function TcxOffice11LookAndFeelPainter.DrawExpandButtonFirst: Boolean; -begin - Result := False; -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawSmallExpandButton(ACanvas: TcxCanvas; - R: TRect; AExpanded: Boolean; ABorderColor: TColor; AColor: TColor = clDefault); -begin - DrawExpandButton(ACanvas, R, AExpanded, AColor); -end; - -class function TcxOffice11LookAndFeelPainter.ExpandButtonSize: Integer; -begin - Result := 11; -end; - -class function TcxOffice11LookAndFeelPainter.SmallExpandButtonSize: Integer; -begin - Result := ExpandButtonSize; -end; - -class function TcxOffice11LookAndFeelPainter.CheckButtonColor(AState: TcxButtonState): TColor; -begin - case AState of - cxbsHot, cxbsPressed, cxbsDisabled: - Result := ButtonColor(AState); - else - Result := inherited CheckButtonColor(AState); - end; -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawFilterDropDownButton(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState; AIsFilterActive: Boolean); - - function GetArrowColor: TColor; - begin - if AIsFilterActive then - Result := ActiveFilterButtonArrowColor - else - Result := ButtonSymbolColor(AState); - end; - -begin -// inherited; - ACanvas.FrameRect(R, FilterDropDownButtonBorderColor(AState)); - InflateRect(R, -1, -1); - ACanvas.Brush.Color := ButtonColor(AState); - ACanvas.FillRect(R); - DrawButtonArrow(ACanvas, R, GetArrowColor); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawHeader(ACanvas: TcxCanvas; - const ABounds, ATextAreaBounds: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders; - AState: TcxButtonState; AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; - AMultiLine, AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; ATextColor, - ABkColor: TColor; AOnDrawBackground: TcxDrawBackgroundEvent = nil; AIsLast: Boolean = False; - AInGroupByBox: Boolean = False); -begin - inherited DrawHeader(ACanvas, ABounds, ATextAreaBounds, ANeighbors, ABorders, - AState, AAlignmentHorz, AAlignmentVert, AMultiLine, AShowEndEllipsis, AText, - AFont, ATextColor, ABkColor, nil, AIsLast); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawHeaderBorder(ACanvas: TcxCanvas; - const R: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders); -var - AColor1, AColor2: TColor; - Y1, Y2: Integer; -begin - AColor1 := HeaderTopColor; - AColor2 := HeaderBottomColor; - if bTop in ABorders then - begin - ACanvas.Brush.Color := AColor1; - ACanvas.FillRect(Rect(R.Left, R.Top, R.Right, R.Top + 1)); - end; - if bBottom in ABorders then - begin - ACanvas.Brush.Color := HeaderDarkEdgeColor; - ACanvas.FillRect(Rect(R.Left, R.Bottom - 1, R.Right, R.Bottom)); - end; - if bLeft in ABorders then - begin - ACanvas.Pixels[R.Left, R.Top + 1] := AColor1; - if nLeft in ANeighbors then - begin - Y1 := R.Top + 2; - Y2 := R.Bottom - 3; - ACanvas.Pixels[R.Left, Y1] := AColor1; - ACanvas.Pixels[R.Left, Y2] := GetMiddleRGB(AColor1, AColor2, 25); - ACanvas.Pixels[R.Left, R.Bottom - 2] := AColor2; - end - else - begin - Y1 := R.Top + 1; - Y2 := R.Bottom - 2; - ACanvas.Pixels[R.Left, R.Bottom - 2] := AColor2; - end; - ACanvas.Brush.Color := HeaderHighlightEdgeColor; - ACanvas.FillRect(Rect(R.Left, Y1, R.Left + 1, Y2)); - end; - if bRight in ABorders then - begin - if nRight in ANeighbors then - begin - Y1 := R.Top + 2; - Y2 := R.Bottom - 3; - ACanvas.Pixels[R.Right - 1, R.Top + 1] := AColor1; - ACanvas.Pixels[R.Right - 1, Y1] := AColor1; - ACanvas.Pixels[R.Right - 1, Y2] := GetMiddleRGB(AColor1, AColor2, 25); - ACanvas.Pixels[R.Right - 1, R.Bottom - 2] := AColor2; - end - else - begin - Y1 := R.Top + 1; - ACanvas.Pixels[R.Right - 1, R.Top] := GetMiddleRGB(AColor1, HeaderDarkEdgeColor, 50); - Y2 := R.Bottom - 2; - ACanvas.Pixels[R.Right - 1, R.Bottom - 2] := GetMiddleRGB(AColor2, HeaderDarkEdgeColor, 50); - end; - ACanvas.Brush.Color := HeaderDarkEdgeColor; - ACanvas.FillRect(Rect(R.Right - 1, Y1, R.Right, Y2)); - end; -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawHeaderControlSection( - ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, - AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; ATextColor, - ABkColor: TColor); -begin - DrawHeader(ACanvas, ABounds, ATextAreaBounds, ANeighbors, ABorders, - AState, AAlignmentHorz, AAlignmentVert, AMultiLine, AShowEndEllipsis, AText, - AFont, ATextColor, ABkColor); - if AState = cxbsPressed then - DrawHeaderPressed(ACanvas, ABounds); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawSortingMark(ACanvas: TcxCanvas; - const R: TRect; AAscendingSorting: Boolean); -begin - DrawSortingArrow(ACanvas, R, HeaderDarkEdgeColor, HeaderHighlightEdgeColor, AAscendingSorting); -end; - -class function TcxOffice11LookAndFeelPainter.HeaderBorders(ANeighbors: TcxNeighbors): TcxBorders; -begin - Result := cxBordersAll; -end; - -class function TcxOffice11LookAndFeelPainter.HeaderBorderSize: Integer; -begin - Result := 1; -end; - -class function TcxOffice11LookAndFeelPainter.IsHeaderHotTrack: Boolean; -begin - Result := True; -end; - -class function TcxOffice11LookAndFeelPainter.FooterSeparatorColor: TColor; -begin - Result := HeaderDarkEdgeColor; -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawScrollBarPart(ACanvas: TcxCanvas; - AHorizontal: Boolean; R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); -begin - if AreVisualStylesAvailable([totScrollBar]) then - TcxWinXPLookAndFeelPainter.DrawScrollBarPart(ACanvas, AHorizontal, R, APart, AState) - else - TcxStandardLookAndFeelPainter.DrawScrollBarPart(ACanvas, AHorizontal, R, APart, AState); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawSizeGrip(ACanvas: TcxCanvas; - const ARect: TRect; ABackgroundColor: TColor); -begin - ACanvas.FillRect(ARect, ABackgroundColor); - Office11DrawSizeGrip(ACanvas.Handle, ARect); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawMonthHeader( - ACanvas: TcxCanvas; const ABounds: TRect; const AText: string; - ANeighbors: TcxNeighbors; const AViewParams: TcxViewParams; - AArrows: TcxHeaderArrows; ASideWidth: Integer; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); -var - R: TRect; -begin - R := ABounds; - InflateRect(R, -1, -1); - with ACanvas do - begin - if not Assigned(AOnDrawBackground) or not AOnDrawBackground(ACanvas, R) then - FillRect(R, AViewParams); - if AText <> '' then - begin - Brush.Style := bsClear; - Font := AViewParams.Font; - Font.Color := AViewParams.TextColor; - DrawText(AText, R, cxAlignCenter or cxSingleLine); - Brush.Style := bsSolid; - end; - end; - DrawMonthHeaderArrows(ACanvas, ABounds, AArrows, ASideWidth, clWindowText); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawSchedulerNavigationButtonContent( - ACanvas: TcxCanvas; const ARect: TRect; const AArrowRect: TRect; - AIsNextButton: Boolean; AState: TcxButtonState); -const - Borders: array[Boolean] of TcxBorders = - ([bRight, bTop, bBottom], [bLeft, bTop, bBottom]); -var - ABackgroundColor: TColor; -begin - case AState of - cxbsPressed: - ABackgroundColor := dxOffice11SelectedDownColor1; - cxbsHot: - ABackgroundColor := dxOffice11SelectedColor1; - else - ABackgroundColor := dxOffice11DockColor1; - end; - ACanvas.FillRect(ARect, ABackgroundColor); - ACanvas.DrawComplexFrame(ARect, dxOffice11OutlookBorderColor, - dxOffice11OutlookBorderColor, Borders[AIsNextButton]); - DrawSchedulerNavigationButtonArrow(ACanvas, AArrowRect, AIsNextButton, - ButtonSymbolColor(AState)); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawSchedulerNavigatorButton( - ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); -begin - TcxWinXPLookAndFeelPainter.DrawSchedulerNavigatorButton(ACanvas, R, AState); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawSchedulerBorder( - ACanvas: TcxCanvas; R: TRect); -begin - ACanvas.FrameRect(R, DefaultSchedulerBorderColor); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawContent(ACanvas: TcxCanvas; - const ABounds, ATextAreaBounds: TRect; AState: Integer; AAlignmentHorz: TAlignment; - AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil; AIsFooter: Boolean = False); -const - MultiLines: array[Boolean] of Integer = (cxSingleLine, cxWordBreak); - ShowEndEllipsises: array[Boolean] of Integer = (0, cxShowEndEllipsis); -var - R: TRect; - AColor1, AColor2: TColor; -begin - with ACanvas do - begin - R := ABounds; - if not Assigned(AOnDrawBackground) or not AOnDrawBackground(ACanvas, ABounds) then - begin - if AState = Integer(cxbsHot) then - begin - AColor1 := dxOffice11ToolbarsColor1; - AColor2 := dxOffice11ToolbarsColor1; - end - else - begin - AColor1 := HeaderTopColor; - AColor2 := HeaderBottomColor; - end; - with ABounds do - begin - if AIsFooter then - FillRectByColor(ACanvas.Handle, Rect(Left, Top, Right, Bottom), AColor1) - else - begin - FillRectByColor(ACanvas.Handle, Rect(Left, Top, Right, Bottom - 3), AColor1); - FillGradientRect(ACanvas.Handle, Rect(Left, Bottom - 4, Right, Bottom), AColor1, AColor2, False); - end; - end; - end; - if AText <> '' then - begin - Brush.Style := bsClear; - Font := AFont; - Font.Color := ATextColor; - DrawText(AText, ATextAreaBounds, cxAlignmentsHorz[AAlignmentHorz] or - cxAlignmentsVert[AAlignmentVert] or MultiLines[AMultiLine] or - ShowEndEllipsises[AShowEndEllipsis]); - Brush.Style := bsSolid; - end; - if AState = Integer(cxbsHot) then - with ABounds do - FillGradientRect(ACanvas.Handle, Rect(Left - 1, Bottom - 2, Right, Bottom + 1), - dxOffice11SelectedColor1, dxOffice11SelectedColor2, False); - end; -end; - -class function TcxOffice11LookAndFeelPainter.HeaderBottomColor: TColor; -begin - Result := dxOffice11ToolbarsColor2; -end; - -class function TcxOffice11LookAndFeelPainter.HeaderDarkEdgeColor: TColor; -begin - Result := dxOffice11BarSeparatorColor1; -end; - -class function TcxOffice11LookAndFeelPainter.HeaderHighlightEdgeColor: TColor; -begin - Result := dxOffice11BarSeparatorColor2; -end; - -class function TcxOffice11LookAndFeelPainter.HeaderTopColor: TColor; -begin - Result := GetMiddleRGB(dxOffice11ToolbarsColor1, dxOffice11ToolbarsColor2, 50); -end; - -class function TcxOffice11LookAndFeelPainter.FilterDropDownButtonBorderColor(AState: TcxButtonState): TColor; -begin - if AState = cxbsNormal then - Result := HeaderDarkEdgeColor - else - Result := dxOffice11SelectedBorderColor; -end; - -class function TcxOffice11LookAndFeelPainter.TabBorderHighlightColor: TColor; -begin - Result := HeaderDarkEdgeColor; -end; - -class function TcxOffice11LookAndFeelPainter.TabBorderDarkColor: TColor; -begin - Result := inherited TabBorderDarkColor; -end; - -function BtnStateToXPBtnState(AState: TcxButtonState): Integer; -const - ButtonStates: array[TcxButtonState] of Integer =(PBS_DEFAULTED, PBS_NORMAL, - PBS_HOT, PBS_PRESSED, PBS_DISABLED); -begin - Result := ButtonStates[AState]; -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawGroupBoxFrame(ACanvas: TcxCanvas; - R: TRect; AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition; - ABorders: TcxBorders = cxBordersAll); -begin - if AreVisualStylesAvailable([totButton]) then - TcxWinXPLookAndFeelPainter.DrawGroupBoxFrame(ACanvas, R, AEnabled, ACaptionPosition, ABorders) - else - inherited DrawGroupBoxFrame(ACanvas, R, AEnabled, ACaptionPosition, ABorders); -end; - -class function TcxOffice11LookAndFeelPainter.GroupBoxTextColor( - AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition): TColor; -begin - if AreVisualStylesAvailable([totButton]) then - Result := TcxWinXPLookAndFeelPainter.GroupBoxTextColor(AEnabled, ACaptionPosition) - else - Result := inherited GroupBoxTextColor(AEnabled, ACaptionPosition); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawPanelBackground( - ACanvas: TcxCanvas; AControl: TWinControl; ABounds: TRect; AColorFrom, - AColorTo: TColor); -begin - if AColorFrom = clDefault then - cxDrawTransparentControlBackground(AControl, ACanvas, ABounds) - else - if AColorTo = clDefault then - ACanvas.FillRect(ABounds, AColorFrom) - else - with ABounds do - FillGradientRect(ACanvas.Handle, ABounds, AColorFrom, AColorTo, False); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawLayoutControlBackground( - ACanvas: TcxCanvas; const R: TRect); -begin - FillGradientRect(ACanvas.Handle, R, - dxOffice11ToolbarsColor1, dxOffice11ToolbarsColor2, False); -end; - -class procedure TcxOffice11LookAndFeelPainter.DrawDateNavigatorDateHeader( - ACanvas: TcxCanvas; var R: TRect); -begin - ACanvas.FillRect(R, DefaultDateNavigatorHeaderColor); -end; - -{ TcxWinXPLookAndFeelPainter } - -class procedure TcxWinXPLookAndFeelPainter.DrawContent(ACanvas: TcxCanvas; - ATheme: TdxTheme; APartId, AStateId: Integer; const ABounds, ATextAreaBounds: TRect; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; - AMultiLine, AShowEndEllipsis, AShowPrefix: Boolean; - const AText: string; AFont: TFont; ATextColor, ABkColor: TColor); -const - MultiLines: array[Boolean] of Integer = (DT_SINGLELINE, DT_WORDBREAK); - ShowEndEllipsises: array[Boolean] of Integer = (0, DT_END_ELLIPSIS); - ShowPrefixes: array[Boolean] of Integer = (DT_NOPREFIX, 0); -var - R: TRect; -begin - if AText = '' then Exit; - R := ATextAreaBounds; - ACanvas.Font := AFont; - ACanvas.Font.Color := ATextColor; - if AMultiLine then - ACanvas.AlignMultiLineTextRectVertically(R, AText, AAlignmentVert, True, - AShowPrefix, True, False, AShowEndEllipsis); - DrawThemeText(ATheme, ACanvas.Handle, APartId, AStateId, AText, - -1, DT_EDITCONTROL or SystemAlignmentsHorz[AAlignmentHorz] or SystemAlignmentsVert[AAlignmentVert] or - ShowEndEllipsises[AShowEndEllipsis] or ShowPrefixes[AShowPrefix] or - MultiLines[AMultiLine], 0, R); -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawSchedulerNavigationButtonContent( - ACanvas: TcxCanvas; const ARect: TRect; const AArrowRect: TRect; - AIsNextButton: Boolean; AState: TcxButtonState); -const - ARotationAngle: array[Boolean] of TcxRotationAngle = (raMinus90, raPlus90); - AStates: array[TcxButtonState] of Integer = - (TIS_NORMAL, TIS_NORMAL, TIS_HOT, TIS_SELECTED, TIS_DISABLED); -var - ABitmap: TcxBitmap; - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totTab); - if ATheme = 0 then - inherited DrawSchedulerNavigationButtonContent(ACanvas, ARect, AArrowRect, - AIsNextButton, AState) - else - begin - ABitmap := TcxBitmap.CreateSize(ARect, pf32bit); - try - cxBitBlt(ABitmap.Canvas.Handle, ACanvas.Handle, ABitmap.ClientRect, ARect.TopLeft, SRCCOPY); - ABitmap.Rotate(ARotationAngle[not AIsNextButton]); - DrawThemeBackground(ATheme, ABitmap.Canvas.Handle, TABP_TABITEM, AStates[AState], - Rect(0, 0, ABitmap.Width, ABitmap.Height)); - ABitmap.Rotate(ARotationAngle[AIsNextButton]); - cxBitBlt(ACanvas.Handle, ABitmap.Canvas.Handle, ARect, cxNullPoint, SRCCOPY); - DrawSchedulerNavigationButtonArrow(ACanvas, AArrowRect, AIsNextButton, - ButtonSymbolColor(AState)); - finally - ABitmap.Free; - end; - end; -end; - -class function TcxWinXPLookAndFeelPainter.LookAndFeelStyle: TcxLookAndFeelStyle; -begin - Result := lfsNative; -end; - -class function TcxWinXPLookAndFeelPainter.NeedRedrawOnResize: Boolean; -begin - Result := AreVisualStylesAvailable; -end; - -class function TcxWinXPLookAndFeelPainter.DefaultSchedulerBorderColor: TColor; -var - AColor: TColorRef; -begin - GetThemeColor(OpenTheme(totComboBox), CP_DROPDOWNBUTTON, CBXS_NORMAL, TMT_BORDERCOLOR, AColor); - Result := AColor; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawArrow(ACanvas: TcxCanvas; - const R: TRect; AArrowDirection: TcxArrowDirection; AColor: TColor); -begin - inherited; // for BCB6 conversion -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawArrow(ACanvas: TcxCanvas; - const R: TRect; AState: TcxButtonState; AArrowDirection: TcxArrowDirection; - ADrawBorder: Boolean = True); -var - ATheme: TdxTheme; -const - States: array[TcxArrowDirection, TcxButtonState] of Integer = - ((ABS_UPNORMAL, ABS_UPNORMAL, ABS_UPHOT, ABS_UPPRESSED, ABS_UPDISABLED), - (ABS_DOWNNORMAL, ABS_DOWNNORMAL, ABS_DOWNHOT, ABS_DOWNPRESSED, ABS_DOWNDISABLED), - (ABS_LEFTNORMAL, ABS_LEFTNORMAL, ABS_LEFTHOT, ABS_LEFTPRESSED, ABS_LEFTDISABLED), - (ABS_RIGHTNORMAL, ABS_RIGHTNORMAL, ABS_RIGHTHOT, ABS_RIGHTPRESSED, ABS_RIGHTDISABLED)); - -begin - ATheme := OpenTheme(totScrollBar); - if ATheme <> 0 then - DrawThemeBackground(ATheme, ACanvas.Handle, SBP_ARROWBTN, States[AArrowDirection, AState], @R) - else - inherited -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawArrowBorder(ACanvas: TcxCanvas; - const R: TRect; AState: TcxButtonState); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totButton); - if ATheme <> 0 then - DrawThemeBackground(ATheme, ACanvas.Handle, BP_PUSHBUTTON, BtnStateToXPBtnState(AState), @R) - else - inherited; -end; - -class function TcxWinXPLookAndFeelPainter.BorderSize: Integer; -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totListView); - if ATheme <> 0 then - Result := 1 //!!! lcm corrected - else - Result := inherited BorderSize; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawBorder(ACanvas: TcxCanvas; R: TRect); -var - ATheme: TdxTheme; - ASavedDC: HDC; -begin - ATheme := OpenTheme(totListView); - if ATheme <> 0 then - begin - //DrawThemeEdge(ATheme, ACanvas.Handle, 0, 0, @R, EDGE_SUNKEN, BF_RECT, nil) - ASavedDC := SaveDC(ACanvas.Handle); - InflateRect(R, -1, -1); - ACanvas.ExcludeClipRect(R); - InflateRect(R, 1, 1); - DrawThemeBackground(ATheme, ACanvas.Handle, LVP_EMPTYTEXT, 0, @R); - RestoreDC(ACanvas.Handle, ASavedDC); - end - else - inherited; -end; - -class function TcxWinXPLookAndFeelPainter.AdjustGroupButtonDisplayRect( - const R: TRect; AButtonCount, AButtonIndex: Integer): TRect; -begin - Result := inherited AdjustGroupButtonDisplayRect(R, AButtonCount, AButtonIndex); - if IsThemeBackgroundPartiallyTransparent(OpenTheme(totButton), BP_PUSHBUTTON, PBS_NORMAL) then - InflateRect(Result, 1, 1); -end; - -class function TcxWinXPLookAndFeelPainter.ButtonBorderSize(AState: TcxButtonState = cxbsNormal): Integer; -var - ATheme: TdxTheme; - R: TRect; -begin - ATheme := OpenTheme(totButton); - if ATheme <> 0 then - begin - R := Rect(0, 0, 100, 100); - GetThemeBackgroundContentRect(ATheme, 0, BP_PUSHBUTTON, BtnStateToXPBtnState(AState), R, R); - Result := R.Left; - end - else - Result := inherited ButtonBorderSize; -end; - -class function TcxWinXPLookAndFeelPainter.ButtonColor(AState: TcxButtonState): TColor; -var - ATheme: TdxTheme; - AColorRef: TColorRef; -begin - ATheme := OpenTheme(totButton); - if ATheme <> 0 then - begin - GetThemeColor(ATheme, BP_PUSHBUTTON, BtnStateToXPBtnState(AState), - TMT_COLOR, AColorRef); - Result := AColorRef; - end - else - Result := inherited ButtonColor(AState); -end; - -class function TcxWinXPLookAndFeelPainter.ButtonFocusRect(ACanvas: TcxCanvas; R: TRect): TRect; -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totButton); - if (ATheme <> 0) and (GetThemeBackgroundContentRect(ATheme, ACanvas.Canvas.Handle, BP_PUSHBUTTON, PBS_NORMAL, R, R) = S_OK) then - Result := R - else - Result := inherited ButtonFocusRect(ACanvas, R); -end; - -class function TcxWinXPLookAndFeelPainter.ButtonGroupBorderSizes(AButtonCount, - AButtonIndex: Integer): TRect; -var - ATheme: TdxTheme; - CR, R: TRect; -begin - ATheme := OpenTheme(totButton); - R := Rect(0, 0, 100, 100); - GetThemeBackgroundContentRect(ATheme, 0, BP_PUSHBUTTON, PBS_NORMAL, R, CR); - Result := Rect(CR.Left, CR.Top, R.Right - CR.Right, R.Bottom - CR.Bottom); - if IsThemeBackgroundPartiallyTransparent(ATheme, BP_PUSHBUTTON, PBS_NORMAL) then - OffsetRect(Result, -1, -1); -end; - -class function TcxWinXPLookAndFeelPainter.ButtonSymbolColor( - AState: TcxButtonState; ADefaultColor: TColor = clDefault): TColor; -var - ATheme: TdxTheme; - AColorRef: TColorRef; -begin - ATheme := OpenTheme(totButton); - if ATheme <> 0 then - begin - GetThemeColor(ATheme, BP_PUSHBUTTON, BtnStateToXPBtnState(AState), - TMT_TEXTCOLOR, AColorRef); - Result := AColorRef; - end - else - Result := inherited ButtonSymbolColor(AState, ADefaultColor); -end; - -class function TcxWinXPLookAndFeelPainter.ButtonTextOffset: Integer; -begin - Result := cxTextOffset; -end; - -class function TcxWinXPLookAndFeelPainter.ButtonTextShift: Integer; -begin - Result := 0; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawButton(ACanvas: TcxCanvas; R: TRect; - const ACaption: string; AState: TcxButtonState; ADrawBorder: Boolean = True; - AColor: TColor = clDefault; ATextColor: TColor = clDefault; - AWordWrap: Boolean = False; AIsToolButton: Boolean = False); -const - ButtonObjectType: array[Boolean] of TdxThemedObjectType = (totButton, totToolBar); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(ButtonObjectType[AIsToolButton]); - if ATheme <> 0 then - begin - //DrawThemeParentBackground(0, ACanvas.Handle, @R); - DrawThemeBackground(ATheme, ACanvas.Handle, BP_PUSHBUTTON, - BtnStateToXPBtnState(AState), R); - DrawThemeText(ATheme, ACanvas.Handle, BP_PUSHBUTTON, BtnStateToXPBtnState(AState), - ACaption, -1, DT_CENTER or DT_VCENTER or DT_SINGLELINE, 0, R); - end - else - inherited; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawExpandButton(ACanvas: TcxCanvas; - const R: TRect; AExpanded: Boolean; AColor: TColor = clDefault); -const - States: array[Boolean] of Integer = (GLPS_CLOSED, GLPS_OPENED); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totTreeview); - if ATheme <> 0 then - begin - DrawThemeBackground(ATheme, ACanvas.Handle, TVP_GLYPH, States[AExpanded], @R); - ACanvas.ExcludeClipRect(R); - end - else - inherited; -end; - -class function TcxWinXPLookAndFeelPainter.DrawExpandButtonFirst: Boolean; -begin - Result := False; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawGroupExpandButton(ACanvas: TcxCanvas; - const R: TRect; AExpanded: Boolean; AState: TcxButtonState); -const - Buttons: array[Boolean] of Integer = (EBP_NORMALGROUPEXPAND, EBP_NORMALGROUPCOLLAPSE); - States: array[cxbsNormal..cxbsPressed] of Integer = (EBNGE_NORMAL, EBNGE_HOT, EBNGE_PRESSED); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totExplorerBar); - if ATheme <> 0 then - DrawThemeBackground(ATheme, ACanvas.Handle, Buttons[AExpanded], States[AState], @R) - else - inherited; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawSmallExpandButton(ACanvas: TcxCanvas; R: TRect; - AExpanded: Boolean; ABorderColor: TColor; AColor: TColor = clDefault); -begin - if OpenTheme(totTreeview) <> 0 then - DrawExpandButton(ACanvas, R, AExpanded) - else - inherited DrawSmallExpandButton(ACanvas, R, AExpanded, AColor); -end; - -class function TcxWinXPLookAndFeelPainter.ExpandButtonSize: Integer; -var - ATheme: TdxTheme; - ASize: TSize; -begin - ATheme := OpenTheme(totTreeview); - if ATheme <> 0 then - begin - GetThemePartSize(ATheme, 0, TVP_GLYPH, GLPS_OPENED, nil, TS_TRUE, @ASize); - Result := ASize.cx; - end - else - Result := inherited ExpandButtonSize; -end; - -class function TcxWinXPLookAndFeelPainter.GroupExpandButtonSize: Integer; -var - ATheme: TdxTheme; - ASize: TSize; -begin - ATheme := OpenTheme(totExplorerBar); - if ATheme <> 0 then - begin - GetThemePartSize(ATheme, 0, EBP_NORMALGROUPEXPAND, EBNGE_NORMAL, nil, TS_TRUE, @ASize); - Result := ASize.cx; - end - else - Result := inherited GroupExpandButtonSize; -end; - -class function TcxWinXPLookAndFeelPainter.SmallExpandButtonSize: Integer; -begin - if OpenTheme(totTreeview) <> 0 then - Result := ExpandButtonSize - else - Result := inherited SmallExpandButtonSize; -end; - -class function TcxWinXPLookAndFeelPainter.IsButtonHotTrack: Boolean; -begin - Result := True; -end; - -class function TcxWinXPLookAndFeelPainter.IsPointOverGroupExpandButton(const R: TRect; - const P: TPoint): Boolean; -var - ATheme: TdxTheme; - ARegion: HRGN; -begin - ATheme := OpenTheme(totExplorerBar); - if ATheme <> 0 then - begin - GetThemeBackgroundRegion(ATheme, 0, EBP_NORMALGROUPEXPAND, EBNGE_NORMAL, @R, ARegion); - Result := PtInRegion(ARegion, P.X, P.Y); - DeleteObject(ARegion); - end - else - Result := inherited IsPointOverGroupExpandButton(R, P); -end; - -class function TcxWinXPLookAndFeelPainter.CheckBorderSize: Integer; -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totButton); - if ATheme <> 0 then - Result := 0 - else - Result := inherited CheckBorderSize; -end; - -class function TcxWinXPLookAndFeelPainter.CheckButtonSize: TSize; -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totButton); - if ATheme <> 0 then - GetThemePartSize(ATheme, 0, BP_CHECKBOX, CBS_CHECKEDNORMAL, TS_TRUE, Result) - else - Result := inherited CheckButtonSize; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawCheck(ACanvas: TcxCanvas; const R: TRect; - AState: TcxButtonState; AChecked: Boolean; AColor: TColor); -const - States: array[Boolean, TcxButtonState] of Integer = - ((CBS_UNCHECKEDNORMAL, CBS_UNCHECKEDNORMAL, CBS_UNCHECKEDHOT, CBS_UNCHECKEDPRESSED, CBS_UNCHECKEDDISABLED), - (CBS_CHECKEDNORMAL, CBS_CHECKEDNORMAL, CBS_CHECKEDHOT, CBS_CHECKEDPRESSED, CBS_CHECKEDDISABLED)); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totButton); - if ATheme <> 0 then - begin - //DrawThemeParentBackground(0, ACanvas.Handle, @R); - DrawThemeBackground(ATheme, ACanvas.Handle, BP_CHECKBOX, States[AChecked, AState], @R); - end - else - inherited; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawCheckBorder(ACanvas: TcxCanvas; R: TRect; - AState: TcxButtonState); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totButton); - if ATheme = 0 then inherited; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawRadioButton(ACanvas: TcxCanvas; X, Y: Integer; - AButtonState: TcxButtonState; AChecked: Boolean; AFocused: Boolean; ABrushColor: TColor; AIsDesigning: Boolean = False); - - function GetNativeState: Integer; - const - ANativeStateMap: array [Boolean, TcxButtonState] of Integer = ( - (RBS_UNCHECKEDNORMAL, RBS_UNCHECKEDNORMAL, RBS_UNCHECKEDHOT, - RBS_UNCHECKEDPRESSED, RBS_UNCHECKEDDISABLED), - (RBS_CHECKEDNORMAL,RBS_CHECKEDNORMAL, RBS_CHECKEDHOT, - RBS_CHECKEDPRESSED, RBS_CHECKEDDISABLED) - ); - begin - Result := ANativeStateMap[AChecked, AButtonState]; - end; - -var - ARadioButtonSize: TSize; -begin - ARadioButtonSize := RadioButtonSize; - DrawThemeBackground(OpenTheme(totButton), ACanvas.Handle, BP_RADIOBUTTON, - GetNativeState, Rect(X, Y, X + ARadioButtonSize.cx, Y + ARadioButtonSize.cy)); -end; - -class function TcxWinXPLookAndFeelPainter.RadioButtonSize: TSize; -begin - GetThemePartSize(OpenTheme(totButton), 0, BP_RADIOBUTTON, RBS_UNCHECKEDNORMAL, - TS_TRUE, Result); -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawHeader(ACanvas: TcxCanvas; - const ABounds, ATextAreaBounds: TRect; ANeighbors: TcxNeighbors; ABorders: TcxBorders; - AState: TcxButtonState; AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; - AMultiLine, AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; - ATextColor, ABkColor: TColor; AOnDrawBackground: TcxDrawBackgroundEvent = nil; - AIsLast: Boolean = False; AInGroupByBox: Boolean = False); -const - States: array[TcxButtonState] of Integer = (HIS_NORMAL, HIS_NORMAL, HIS_HOT, HIS_PRESSED, HIS_NORMAL); - - function GetHeaderItem: Integer; - begin - if AIsLast and (States[AState] = HIS_NORMAL) and - (GetOffice11Scheme in [schNormalColor, schHomestead]) then - Result := HP_HEADERITEMRIGHT - else - Result := HP_HEADERITEM; - end; - -var - ATheme: TdxTheme; - R: TRect; - AItem: Integer; -begin - ATheme := OpenTheme(totHeader); - if ATheme <> 0 then - begin - AItem := GetHeaderItem; - // DrawThemeParentBackground(0, ACanvas.Handle, @ABounds); - DrawThemeBackground(ATheme, ACanvas.Handle, AItem, States[AState], @ABounds); - R := ATextAreaBounds; - if AState = cxbsPressed then OffsetRect(R, 1, 1); - DrawContent(ACanvas, ATheme, AItem, States[AState], ABounds, R, - AAlignmentHorz, AAlignmentVert, AMultiLine, AShowEndEllipsis, False, AText, - AFont, ATextColor, ABkColor); - end - else - inherited; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawHeaderPressed(ACanvas: TcxCanvas; - const ABounds: TRect); -begin -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawHeaderControlSection( - ACanvas: TcxCanvas; const ABounds, ATextAreaBounds: TRect; - ANeighbors: TcxNeighbors; ABorders: TcxBorders; AState: TcxButtonState; - AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, - AShowEndEllipsis: Boolean; const AText: string; AFont: TFont; ATextColor, - ABkColor: TColor); -begin - ACanvas.Brush.Color := clBtnFace; - ACanvas.FillRect(ABounds); - DrawHeader(ACanvas, ABounds, ATextAreaBounds, ANeighbors, ABorders, - AState, AAlignmentHorz, AAlignmentVert, AMultiLine, AShowEndEllipsis, AText, - AFont, ATextColor, ABkColor); -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawSortingMark(ACanvas: TcxCanvas; - const R: TRect; AAscendingSorting: Boolean); -begin - TcxUltraFlatLookAndFeelPainter.DrawSortingMark(ACanvas, R, AAscendingSorting); -end; - -class function TcxWinXPLookAndFeelPainter.HeaderBorderSize: Integer; -var - ATheme: TdxTheme; - R: TRect; -begin - ATheme := OpenTheme(totHeader); - if ATheme <> 0 then - begin - R := Rect(0, 0, 100, 100); - GetThemeBackgroundContentRect(ATheme, 0, HP_HEADERITEM, HIS_NORMAL, R, R); - Result := Max((R.Left + R.Top) div 2, 1); - end - else - Result := inherited HeaderBorderSize; -end; - -class function TcxWinXPLookAndFeelPainter.HeaderControlSectionBorderSize( - AState: TcxButtonState = cxbsNormal): Integer; -begin - Result := HeaderBorderSize; -end; - -class function TcxWinXPLookAndFeelPainter.HeaderControlSectionContentBounds( - const ABounds: TRect; AState: TcxButtonState): TRect; -var - ABorderWidth: Integer; - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totHeader); - if ATheme <> 0 then - begin - ABorderWidth := HeaderBorderSize; - Result := ABounds; - InflateRect(Result, -ABorderWidth, -ABorderWidth); - end - else - Result := inherited HeaderControlSectionContentBounds(ABounds, AState); -end; - -{class function TcxWinXPLookAndFeelPainter.HeaderDrawCellsFirst: Boolean; -begin - Result := False; -end;} - -class function TcxWinXPLookAndFeelPainter.IsHeaderHotTrack: Boolean; -begin - Result := True; -end; - -class function TcxWinXPLookAndFeelPainter.SortingMarkSize: TPoint; -begin - Result := TcxUltraFlatLookAndFeelPainter.SortingMarkSize; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawFooterBorder(ACanvas: TcxCanvas; - const R: TRect); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totEdit); - if ATheme <> 0 then - DrawThemeEdge(ATheme, ACanvas.Handle, 0, 0, @R, BDR_RAISEDINNER, BF_RECT, nil) - else - inherited; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawFooterCell(ACanvas: TcxCanvas; - const ABounds: TRect; AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; - AMultiLine: Boolean; const AText: string; AFont: TFont; ATextColor, ABkColor: TColor; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totTrackBar); - if ATheme <> 0 then - begin - //DrawThemeParentBackground(0, ACanvas.Handle, @ABounds); - DrawThemeBackground(ATheme, ACanvas.Handle, TKP_TRACK, TRS_NORMAL, @ABounds); - DrawContent(ACanvas, ATheme, TKP_TRACK, TRS_NORMAL, ABounds, FooterCellTextAreaBounds(ABounds), - AAlignmentHorz, AAlignmentVert, AMultiLine, False, False, AText, AFont, - ATextColor, ABkColor); - end - else - inherited; -end; - -class function TcxWinXPLookAndFeelPainter.FooterBorderSize: Integer; -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totEdit); - if ATheme <> 0 then - Result := 1 //!!! - else - Result := inherited FooterBorderSize; -end; - -class function TcxWinXPLookAndFeelPainter.FooterCellBorderSize: Integer; -var - ATheme: TdxTheme; - R: TRect; -begin - ATheme := OpenTheme(totTrackBar); - if ATheme <> 0 then - begin - R := Rect(0, 0, 100, 100); - GetThemeBackgroundContentRect(ATheme, 0, TKP_TRACK, TRS_NORMAL, R, R); - Result := R.Left; - end - else - Result := inherited FooterCellBorderSize; -end; - -class function TcxWinXPLookAndFeelPainter.FooterCellOffset: Integer; -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totTrackBar); - if ATheme <> 0 then - Result := 1 - else - Result := inherited FooterCellOffset; -end; - -class function TcxWinXPLookAndFeelPainter.FooterDrawCellsFirst: Boolean; -begin - Result := False; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawFilterCloseButton(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState); -const - States: array[TcxButtonState] of Integer = (CBS_NORMAL, CBS_NORMAL, CBS_HOT, - CBS_PUSHED, CBS_DISABLED); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totWindow); - if ATheme <> 0 then - begin - //DrawThemeParentBackground(0, ACanvas.Handle, @R); - DrawThemeBackground(ATheme, ACanvas.Handle, WP_SMALLCLOSEBUTTON, States[AState], @R); - end - else - inherited; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawFilterDropDownButton(ACanvas: TcxCanvas; - R: TRect; AState: TcxButtonState; AIsFilterActive: Boolean); -const - States: array[TcxButtonState] of Integer =(CBXS_NORMAL, CBXS_NORMAL, CBXS_HOT, - CBXS_PRESSED, CBXS_DISABLED); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totComboBox); - if ATheme <> 0 then - begin - //DrawThemeParentBackground(0, ACanvas.Handle, @R); - DrawThemeBackground(ATheme, ACanvas.Handle, CP_DROPDOWNBUTTON, States[AState], @R); - end - else - inherited; -end; - -class function TcxWinXPLookAndFeelPainter.FilterActivateButtonSize: TPoint; -var - ATheme: TdxTheme; - ASize: TSize; -begin - ATheme := OpenTheme(totButton); - if ATheme <> 0 then - begin - GetThemePartSize(ATheme, 0, BP_CHECKBOX, CBS_CHECKEDNORMAL, nil, TS_TRUE, @ASize); - Result.X := ASize.cx; Result.Y := ASize.cy; - end - else - Result := inherited FilterActivateButtonSize; -end; - -class function TcxWinXPLookAndFeelPainter.FilterCloseButtonSize: TPoint; -var - ATheme: TdxTheme; - ASize: TSize; -begin - ATheme := OpenTheme(totWindow); - if ATheme <> 0 then - begin - GetThemePartSize(ATheme, 0, WP_SMALLCLOSEBUTTON, CBXS_NORMAL, nil, TS_TRUE, @ASize); - Result := Point(ASize.cx + 4, ASize.cy + 4); - end - else - Result := inherited FilterCloseButtonSize -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawTab(ACanvas: TcxCanvas; R: TRect; - ABorders: TcxBorders; const AText: string; AState: TcxButtonState; AVertical: Boolean; - AFont: TFont; ATextColor, ABkColor: TColor; AShowPrefix: Boolean = False); -const - States: array[TcxButtonState] of Integer = - (TIS_NORMAL, TIS_NORMAL, TIS_HOT, TIS_SELECTED, TIS_DISABLED); -var - ATheme: TdxTheme; - AOriginalR, ADrawR: TRect; - B: TBitmap; - DC: HDC; - - procedure RotateRect(var R: TRect); - var - I: Integer; - begin - with R do - begin - I := Right; - Right := Bottom; - Bottom := I; - end; - end; - - procedure PrepareRects; - begin - ADrawR := R; - if AVertical then - begin - if not (bTop in ABorders) then Dec(ADrawR.Left, 2); - if not (bBottom in ABorders) then Inc(ADrawR.Right, 2); - end - else - begin - if not (bLeft in ABorders) then Dec(ADrawR.Left, 2); - if not (bRight in ABorders) then Inc(ADrawR.Right, 2); - end; - if AState = cxbsPressed then - Inc(ADrawR.Bottom) - else - Dec(R.Bottom); - end; - -begin - ATheme := OpenTheme(totTab); - if ATheme <> 0 then - begin - if AVertical then - begin - AOriginalR := R; - OffsetRect(R, -R.Left, -R.Top); - RotateRect(R); - B := TBitmap.Create; - B.PixelFormat := pf32bit; - B.HandleType := bmDDB; - B.Width := R.Right; - B.Height := R.Bottom; - DC := B.Canvas.Handle; - end - else - begin - B := nil; - DC := ACanvas.Handle; - end; - - PrepareRects; - DrawThemeBackground(ATheme, DC, TABP_TABITEM, States[AState], @ADrawR, @R); - - if AVertical then - begin - ACanvas.RotateBitmap(B, raPlus90, True); - RotateRect(R); - RotateRect(ADrawR); - ACanvas.CopyRect(Bounds(AOriginalR.Left, AOriginalR.Top, R.Right, R.Bottom), - B.Canvas, R); - B.Free; - OffsetRect(R, AOriginalR.Left, AOriginalR.Top); - OffsetRect(ADrawR, AOriginalR.Left, AOriginalR.Top); - end; - - if AState = cxbsPressed then - if AVertical then - Dec(ADrawR.Right, 2) - else - Dec(ADrawR.Bottom, 2); - DrawContent(ACanvas, ATheme, TABP_TABITEM, States[AState], R, ADrawR, - taCenter, vaCenter, False, False, AShowPrefix, AText, AFont, ATextColor, ABkColor); - end - else - inherited; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawTabBorder(ACanvas: TcxCanvas; R: TRect; - ABorder: TcxBorder; ABorders: TcxBorders; AVertical: Boolean); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totTab); - if ATheme <> 0 then - begin - // - end - else - inherited; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawTabsRoot(ACanvas: TcxCanvas; - const R: TRect; ABorders: TcxBorders; AVertical: Boolean); -var - ATheme: TdxTheme; - AContentR, AFullR: TRect; -begin - ATheme := OpenTheme(totTab); - if ATheme <> 0 then - begin - //DrawThemeParentBackground(0, ACanvas.Handle, @R); - GetThemeBackgroundContentRect(ATheme, 0, TABP_PANE, 0, R, AContentR); - AFullR := R; - if AVertical then - begin - Inc(AFullR.Bottom, (R.Bottom - AContentR.Bottom) - (AContentR.Top - R.Top)); - Inc(AFullR.Right, 10); - end - else - begin - Inc(AFullR.Right, (R.Right - AContentR.Right) - (AContentR.Left - R.Left)); - Inc(AFullR.Bottom, 10); - end; - DrawThemeBackground(ATheme, ACanvas.Handle, TABP_PANE, 0, @AFullR, @R); - end - else - inherited; -end; - -class function TcxWinXPLookAndFeelPainter.IsDrawTabImplemented(AVertical: Boolean): Boolean; -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totTab); - if ATheme <> 0 then - Result := True - else - Result := inherited IsDrawTabImplemented(AVertical); -end; - -class function TcxWinXPLookAndFeelPainter.IsTabHotTrack(AVertical: Boolean): Boolean; -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totTab); - if ATheme <> 0 then - Result := True - else - Result := inherited IsTabHotTrack(AVertical); -end; - -class function TcxWinXPLookAndFeelPainter.TabBorderSize(AVertical: Boolean): Integer; -var - ATheme: TdxTheme; - //R: TRect; -begin - ATheme := OpenTheme(totTab); - if ATheme <> 0 then - begin - {R := Rect(0, 0, 100, 100); - GetThemeBackgroundContentRect(ATheme, 0, TABP_TABITEM, TIS_NORMAL, @R, R);} - Result := 1;//R.Left; - end - else - Result := inherited TabBorderSize(AVertical); -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawIndicatorItem(ACanvas: TcxCanvas; - const R: TRect; AKind: TcxIndicatorKind; AColor: TColor; AOnDrawBackground: TcxDrawBackgroundEvent = nil); -begin - TcxFlatLookAndFeelPainter.DrawIndicatorItem(ACanvas, R, AKind, AColor, AOnDrawBackground); -end; - -{class function TcxWinXPLookAndFeelPainter.IndicatorDrawItemsFirst: Boolean; -begin - Result := False; -end;} - -class function TcxWinXPLookAndFeelPainter.ScrollBarMinimalThumbSize( - AVertical: Boolean): Integer; -const - ThumbnailGripKind: array[Boolean] of Integer = (SBP_GRIPPERVERT, SBP_GRIPPERHORZ); - ThumbnailKind: array[Boolean] of Integer = (SBP_THUMBBTNVERT, SBP_THUMBBTNHORZ); -var - ATheme: TdxTheme; - AThumbSize, AGripSize: TSize; -begin - ATheme := OpenTheme(totScrollBar); - if (ATheme <> 0) and (GetThemePartSize(ATheme, 0, ThumbnailGripKind[AVertical], - SCRBS_NORMAL, TS_MIN, AGripSize) = S_OK) then - begin - if (GetThemePartSize(ATheme, 0, ThumbnailGripKind[AVertical], - SCRBS_NORMAL, TS_TRUE, AThumbSize) = S_OK) then - begin - if AVertical then - Result := Max(AGripSize.cy, AThumbSize.cy + 4) - else - Result := Max(AGripSize.cx, AThumbSize.cx + 4); - end else - if AVertical then - Result := AGripSize.cy - else - Result := AGripSize.cx; - Result := Max(Result, cxStdThumbnailMinimalSize); - end else - Result := cxStdThumbnailMinimalSize; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawScrollBarPart(ACanvas: TcxCanvas; AHorizontal: Boolean; - R: TRect; APart: TcxScrollBarPart; AState: TcxButtonState); -const - ThumbnailKind: array[Boolean] of Integer = (SBP_THUMBBTNVERT, SBP_THUMBBTNHORZ); - ThumbnailGripperKind: array[Boolean] of Integer = (SBP_GRIPPERVERT, SBP_GRIPPERHORZ); - ThumbnailPage: array[Boolean, Boolean] of Integer = - ((SBP_UPPERTRACKVERT, SBP_LOWERTRACKVERT), (SBP_UPPERTRACKHORZ, SBP_LOWERTRACKHORZ)); - - function GetThumbnailState: Integer; - begin - case AState of - cxbsHot: Result := SCRBS_HOT; - cxbsPressed: Result := SCRBS_PRESSED; - cxbsDisabled: Result := SCRBS_DISABLED; - else - Result := SCRBS_NORMAL; - end; - end; - -var - ATheme: TdxTheme; -begin - if IsRectEmpty(R) then Exit; - case APart of - sbpLineUp, sbpLineDown: - begin - ATheme := OpenTheme(totScrollBar); - if ATheme <> 0 then - DrawArrow(ACanvas, R, AState, GetArrowDirection(AHorizontal, APart)) - else - inherited; - end; - sbpThumbnail: - begin - ATheme := OpenTheme(totScrollBar); - if ATheme <> 0 then - begin - DrawThemeBackground(ATheme, ACanvas.Handle, ThumbnailKind[AHorizontal], - GetThumbnailState, @R); - DrawThemeBackground(ATheme, ACanvas.Handle, ThumbnailGripperKind[AHorizontal], 0, @R); - end - else - inherited; - end; - sbpPageUp, sbpPageDown: - begin - ATheme := OpenTheme(totScrollBar); - if ATheme <> 0 then - DrawThemeBackground(ATheme, ACanvas.Handle, - ThumbnailPage[AHorizontal, APart = sbpPageUp], GetThumbnailState, @R) - else - inherited; - end; - end; -end; - -class function TcxWinXPLookAndFeelPainter.DefaultSchedulerViewContentColor: TColor; -begin - Result := $D5FFFF; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawMonthHeader( - ACanvas: TcxCanvas; const ABounds: TRect; const AText: string; - ANeighbors: TcxNeighbors; const AViewParams: TcxViewParams; - AArrows: TcxHeaderArrows; ASideWidth: Integer; - AOnDrawBackground: TcxDrawBackgroundEvent = nil); -begin - DrawHeader(ACanvas, ABounds, ABounds, ANeighbors, cxBordersAll, cxbsNormal, taCenter, - vaCenter, False, False, AText, AViewParams.Font, AViewParams.TextColor, - AViewParams.Color, AOnDrawBackground, not (nRight in ANeighbors)); - DrawMonthHeaderArrows(ACanvas, ABounds, AArrows, ASideWidth, clWindowText); -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawSchedulerEventProgress( - ACanvas: TcxCanvas; const ABounds, AProgressChunk: TRect; - AViewParams: TcxViewParams; ATransparent: Boolean); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totProgress); - if ATheme = 0 then - inherited DrawSchedulerEventProgress(ACanvas, ABounds, AProgressChunk, - AViewParams, ATransparent) - else - begin - DrawThemeBackground(ATheme, ACanvas.Handle, PP_BAR, 0, ABounds); - DrawThemeBackground(ATheme, ACanvas.Handle, PP_CHUNK, 0, AProgressChunk); - end; -end; - -class function TcxWinXPLookAndFeelPainter.SchedulerEventProgressOffsets: TRect; -begin - Result := Rect(3, 3, 3, 3); -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawSchedulerNavigatorButton( - ACanvas: TcxCanvas; R: TRect; AState: TcxButtonState); -const - ButtonStates: array[TcxButtonState] of Integer = - (TS_HOT, TS_HOT, TS_CHECKED, TS_PRESSED, TS_DISABLED); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totToolBar); - if ATheme <> 0 then - DrawThemeBackground(ATheme, ACanvas.Handle, TP_BUTTON, - ButtonStates[AState], @R) - else - inherited; -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawSchedulerSplitterBorder( - ACanvas: TcxCanvas; R: TRect; const AViewParams: TcxViewParams; - AIsHorizontal: Boolean); -var - ATheme: TdxTheme; - AColor: TColorRef; -begin - ATheme := OpenTheme(totComboBox); - if (OpenTheme(totListView) <> 0) and (ATheme <> 0) then - begin - GetThemeColor(ATheme, CP_DROPDOWNBUTTON, CBXS_NORMAL, TMT_BORDERCOLOR, AColor); - ACanvas.SetBrushColor(AColor); - if AIsHorizontal then - begin - ACanvas.FillRect(Rect(R.Left, R.Top, R.Right, R.Top + 1)); - ACanvas.FillRect(Rect(R.Left, R.Bottom - 1, R.Right, R.Bottom)); - InflateRect(R, 1, -1); - end - else - begin - ACanvas.FillRect(Rect(R.Left, R.Top, R.Left + 1, R.Bottom)); - ACanvas.FillRect(Rect(R.Right - 1, R.Top, R.Right, R.Bottom)); - InflateRect(R, -1, 1); - end; - ACanvas.FillRect(R, AViewParams); - end - else - TcxStandardLookAndFeelPainter.DrawSchedulerSplitterBorder(ACanvas, R, - AViewParams, AIsHorizontal); -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawSizeGrip(ACanvas: TcxCanvas; - const ARect: TRect; ABackgroundColor: TColor = clDefault); -var - ATheme: Cardinal; -begin - ACanvas.FillRect(ARect, ABackgroundColor); - ATheme := OpenTheme(totScrollBar); - if ATheme <> 0 then - DrawThemeBackground(ATheme, ACanvas.Handle, SBP_SIZEBOX, SZB_RIGHTALIGN, ARect) - else - inherited DrawSizeGrip(ACanvas, ARect); -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawGroupBoxFrame(ACanvas: TcxCanvas; - R: TRect; AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition; - ABorders: TcxBorders = cxBordersAll); -const - StateMap: array[Boolean] of Integer = (GBS_DISABLED, GBS_NORMAL); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totButton); - if ATheme <> 0 then - DrawThemeBackground(ATheme, ACanvas.Handle, BP_GROUPBOX, StateMap[AEnabled], R) - else - inherited DrawGroupBoxFrame(ACanvas, R, AEnabled, ACaptionPosition, ABorders); -end; - -class function TcxWinXPLookAndFeelPainter.GroupBoxTextColor(AEnabled: Boolean; ACaptionPosition: TcxGroupBoxCaptionPosition): TColor; -const - GroupBoxStateMap: array[Boolean] of Integer = (GBS_DISABLED, GBS_NORMAL); -var - ATheme: TdxTheme; -begin - ATheme := OpenTheme(totButton); - if ATheme <> 0 then - GetThemeColor(ATheme, BP_GROUPBOX, GroupBoxStateMap[AEnabled], TMT_TEXTCOLOR, DWORD(Result)) - else - Result := inherited GroupBoxTextColor(AEnabled, ACaptionPosition); -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawPanelBackground(ACanvas: TcxCanvas; - AControl: TWinControl; ABounds: TRect; AColorFrom, AColorTo: TColor); -begin - if AColorFrom = clDefault then - cxDrawTransparentControlBackground(AControl, ACanvas, ABounds) - else - ACanvas.FillRect(ABounds, AColorFrom); -end; - -class procedure TcxWinXPLookAndFeelPainter.DrawDateNavigatorDateHeader( - ACanvas: TcxCanvas; var R: TRect); -begin - DrawThemeBackground(OpenTheme(totHeader), ACanvas.Handle, - HP_HEADERITEMLEFT, HIS_NORMAL, R); - -end; - -{ TcxExtendedStylePainterInfo } - -constructor TcxExtendedStylePainterInfo.Create(const AName: string; - APainter: TcxCustomLookAndFeelPainterClass; AData: TObject); -begin - inherited Create; - Data := AData; - Name := AName; - Painter := APainter; -end; - -destructor TcxExtendedStylePainterInfo.Destroy; -begin - FreeAndNil(Data); - inherited Destroy; -end; - -{ TcxExtendedStylePainters } - -constructor TcxExtendedStylePainters.Create; -begin - inherited Create; - FListeners := TInterfaceList.Create; -end; - -destructor TcxExtendedStylePainters.Destroy; -begin - FListeners.Free; - inherited Destroy; -end; - -procedure TcxExtendedStylePainters.AddListener( - AListener: IcxLookAndFeelPainterListener); -begin - if Listeners.IndexOf(AListener) < 0 then - Listeners.Add(AListener); -end; - -procedure TcxExtendedStylePainters.RemoveListener( - AListener: IcxLookAndFeelPainterListener); -begin - Listeners.Remove(AListener); -end; - -function TcxExtendedStylePainters.Register(const AName: string; - APainter: TcxCustomLookAndFeelPainterClass; AData: TObject): Boolean; -begin - Result := not GetPainterByName(AName, APainter); - if Result then - begin - Add(TcxExtendedStylePainterInfo.Create(AName, APainter, AData)); - SortPainters; - Changed(APainter); - end; -end; - -function cxExtendedStylePaintersSortProc(Item1: TcxExtendedStylePainterInfo; - Item2: TcxExtendedStylePainterInfo): Integer; -begin - Result := AnsiCompareStr(Item1.Name, Item2.Name); -end; - -procedure TcxExtendedStylePainters.SortPainters; -begin - Sort(TListSortCompare(@cxExtendedStylePaintersSortProc)); -end; - -function TcxExtendedStylePainters.GetNameByPainter( - APainter: TcxCustomLookAndFeelPainterClass; out AName: string): Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to Count - 1 do - begin - Result := Painters[I] = APainter; - if Result then - begin - AName := Names[I]; - Break; - end; - end; -end; - -function TcxExtendedStylePainters.GetPainterData( - APainter: TcxCustomLookAndFeelPainterClass; var Data): Boolean; - - procedure AssignData(AValue: TObject); - begin - TObject(Data) := AValue; - end; - -var - I: Integer; - AInfo: TcxExtendedStylePainterInfo; -begin - Result := False; - AssignData(nil); - for I := 0 to Count - 1 do - begin - AInfo := Items[I]; - Result := APainter = AInfo.Painter; - if Result then - begin - AssignData(AInfo.Data); - Break; - end; - end; -end; - - -function TcxExtendedStylePainters.GetPainterByName(const AName: string; - out Painter: TcxCustomLookAndFeelPainterClass): Boolean; -var - AInfo: TcxExtendedStylePainterInfo; -begin - Result := FindInfoByName(AName, AInfo) >= 0; - if Result then - Painter := AInfo.Painter; -end; - -function TcxExtendedStylePainters.Unregister(const AName: string): Boolean; -var - AIndex: Integer; - AInfo: TcxExtendedStylePainterInfo; -begin - AIndex := FindInfoByName(AName, AInfo); - Result := AIndex >= 0; - if Result then - begin - Delete(AIndex); - Changed(AInfo.Painter); - AInfo.Free; - end; -end; - -procedure TcxExtendedStylePainters.Changed(APainter: TcxCustomLookAndFeelPainterClass); -var - I: Integer; -begin - for I := Listeners.Count - 1 downto 0 do - IcxLookAndFeelPainterListener(Listeners[I]).PainterChanged(APainter); -end; - -function TcxExtendedStylePainters.FindInfoByName( - const AName: string; var AInfo: TcxExtendedStylePainterInfo): Integer; -begin - for Result := 0 to Count - 1 do - begin - AInfo := Items[Result]; - if SameText(AName, AInfo.Name) then Exit; - end; - Result := -1; -end; - -function TcxExtendedStylePainters.GetData(AIndex: Integer): TObject; -begin - Result := Items[AIndex].Data; -end; - -function TcxExtendedStylePainters.GetItem(AIndex: Integer): TcxExtendedStylePainterInfo; -begin - Result := TcxExtendedStylePainterInfo(inherited Items[AIndex]); -end; - -function TcxExtendedStylePainters.GetName(AIndex: Integer): string; -begin - Result := Items[AIndex].Name; -end; - -function TcxExtendedStylePainters.GetPainter(AIndex: Integer): TcxCustomLookAndFeelPainterClass; -begin - Result := Items[AIndex].Painter; -end; - -function GetCurrentPainterClass: TcxCustomLookAndFeelPainterClass; -begin - Result := TcxUltraFlatLookAndFeelPainter; -end; - -function GetExtendedStylePainters: TcxExtendedStylePainters; -begin - Result := ExtendedStylePainters; -end; - -procedure PrepareRadioButtonImageList; -begin - RadioButtonImageList; -end; - -procedure CalculateCheckButtonSize; -var - AButtonsBitmap: HBITMAP; - B: Windows.TBitmap; -begin - AButtonsBitmap := LoadBitmap(0, PChar(OBM_CHECKBOXES)); - try - cxGetBitmapData(AButtonsBitmap, B); - FCheckButtonSize := Size(B.bmWidth div 4, B.bmHeight div 3); - finally - DeleteObject(AButtonsBitmap); - end; -end; - -procedure CreateIndicatorImages; -var - B: TBitmap; - - procedure AddImage(const AResourceName: string); - begin - B.LoadFromResourceName(HInstance, AResourceName); - if cxIndicatorImages = nil then - cxIndicatorImages := TImageList.CreateSize(B.Width, B.Height); - cxIndicatorImages.AddMasked(B, clWhite); - end; - -begin - B := TBitmap.Create; - try - AddImage('CX_ARROWBITMAP'); - AddImage('CX_EDITBITMAP'); - AddImage('CX_INSERTBITMAP'); - AddImage('CX_MULTIDOTBITMAP'); - AddImage('CX_MULTIARROWBITMAP'); - AddImage('CX_FILTERBITMAP'); - finally - B.Free; - end; -end; - -procedure DestroyIndicatorImages; -begin - FreeAndNil(cxIndicatorImages); -end; - -procedure CreateStdScrollBarBitmaps; -begin - StdScrollBitmaps[False] := TBitmap.Create; - with StdScrollBitmaps[False] do - begin - Width := 8; - Height := 8; - end; - StdScrollBitmaps[True] := TBitmap.Create; - with StdScrollBitmaps[True] do - begin - Width := 8; - Height := 8; - end; - UpdateScrollBarBitmaps; -end; - -procedure UpdateScrollBarBitmaps; -var - X, Y: Integer; -begin - if StdScrollBitmaps[False] = nil then - CreateStdScrollBarBitmaps; - for X := 0 to 7 do - for Y := 0 to 7 do - if (Y mod 2) = (X mod 2) then - begin - StdScrollBitmaps[False].Canvas.Pixels[X, Y] := clBtnFace; - StdScrollBitmaps[True].Canvas.Pixels[X, Y] := clBlack; - end - else - begin - StdScrollBitmaps[False].Canvas.Pixels[X, Y] := clBtnHighlight; - StdScrollBitmaps[True].Canvas.Pixels[X, Y] := cl3DDkShadow; - end; -end; - -function cxTextRect(const R: TRect): TRect; -begin - Result := R; - InflateRect(Result, -cxTextOffset, -cxTextOffset); -end; - -procedure DestroyStdScrollBarBitmaps; -begin - FreeAndNil(StdScrollBitmaps[False]); - FreeAndNil(StdScrollBitmaps[True]); -end; - -initialization - ExtendedStylePainters := TcxExtendedStylePainters.Create; - CreateIndicatorImages; - CreateStdScrollBarBitmaps; - FSystemPaletteChangedNotifier := TSystemPaletteChangedNotifier.Create(True); - CalculateCheckButtonSize; - -finalization - FreeAndNil(FSystemPaletteChangedNotifier); - DestroyStdScrollBarBitmaps; - DestroyIndicatorImages; - FreeAndNil(FRadioButtonImageList); - FreeAndNil(ExtendedStylePainters); - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxLookAndFeelPainters.res b/internal/x.46/ExpressLibrary/Sources/cxLookAndFeelPainters.res deleted file mode 100644 index f380b79f..00000000 Binary files a/internal/x.46/ExpressLibrary/Sources/cxLookAndFeelPainters.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/Sources/cxLookAndFeels.pas b/internal/x.46/ExpressLibrary/Sources/cxLookAndFeels.pas deleted file mode 100644 index 06057f8d..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxLookAndFeels.pas +++ /dev/null @@ -1,1029 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCommonLibrary } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCOMMONLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxLookAndFeels; - -{$I cxVer.inc} - -interface - -uses - dxThemeManager, Messages, dxOffice11, - SysUtils, Controls, Forms, Classes, cxClasses, cxLookAndFeelPainters; - -type - { TcxLookAndFeel } - - TcxLookAndFeelKind = (lfFlat, lfStandard, lfUltraFlat, lfOffice11); - TcxLookAndFeelValue = (lfvKind, lfvNativeStyle, lfvSkinName); - TcxLookAndFeelValues = set of TcxLookAndFeelValue; - -const - cxDefaultLookAndFeelKind = lfUltraFlat; - cxDefaultLookAndFeelNativeStyle = False; - cxDefaultLookAndFeelSkinName = ''; - cxUseSkins: Boolean = True; - -type - TcxLookAndFeel = class; - TcxSystemPaletteChangedNotifier = class; - - IcxLookAndFeelNotificationListener = interface - ['{205538BF-F19E-4285-B11F-B182D9635881}'] - function GetObject: TObject; - procedure MasterLookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); - procedure MasterLookAndFeelDestroying(Sender: TcxLookAndFeel); - end; - - IdxSkinSupport = interface - ['{EF3FF483-9B69-46DF-95A4-D3A3810F63A5}'] - end; - - { IcxLookAndFeelContainer } - - IcxLookAndFeelContainer = interface - ['{6065B58B-C557-4464-A67D-64183FD13F25}'] - function GetLookAndFeel: TcxLookAndFeel; - end; - - { TcxLookAndFeel } - - TcxLookAndFeelChangedEvent = procedure(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues) of object; - - TcxLookAndFeelData = record - Kind: TcxLookAndFeelKind; - NativeStyle: Boolean; - SkinName: string; - Painter: TcxCustomLookAndFeelPainterClass; - UseSkins: Boolean; - end; - - TcxLookAndFeel = class(TcxInterfacedPersistent, IcxLookAndFeelNotificationListener, IcxLookAndFeelPainterListener) - private - FAssignedValues: TcxLookAndFeelValues; - FChangeListenerList: TcxObjectList; - FCurrentState: TcxLookAndFeelData; - FData: TcxLookAndFeelData; - FIsDestruction: Boolean; - FIsRootLookAndFeel: Boolean; - FMasterLookAndFeel: TcxLookAndFeel; - FPainter: TcxCustomLookAndFeelPainterClass; - FSkinPainter: TcxCustomLookAndFeelPainterClass; - FPrevState: TcxLookAndFeelData; - FSystemPaletteChangedNotifier: TcxSystemPaletteChangedNotifier; - FOnChanged: TcxLookAndFeelChangedEvent; - function GetActiveStyle: TcxLookAndFeelStyle; - function GetKind: TcxLookAndFeelKind; - function GetMasterLookAndFeel: TcxLookAndFeel; - function GetNativeStyle: Boolean; - function GetPainter: TcxCustomLookAndFeelPainterClass; - function GetSkinName: TdxSkinName; - procedure SetAssignedValues(Value: TcxLookAndFeelValues); - procedure SetKind(Value: TcxLookAndFeelKind); - procedure SetMasterLookAndFeel(Value: TcxLookAndFeel); - procedure SetNativeStyle(Value: Boolean); - procedure SetPainter(Value: TcxCustomLookAndFeelPainterClass); - procedure SetSkinName(const Value: TdxSkinName); - - procedure CheckStateChanges; - function GetDefaultKind: TcxLookAndFeelKind; - function GetDefaultNativeStyle: Boolean; - function GetDefaultSkinName: string; - function GetDefaultSkinPainter: TcxCustomLookAndFeelPainterClass; - function IsKindStored: Boolean; - function IsNativeStyleStored: Boolean; - function IsSkinNameStored: Boolean; - procedure ReadSkinName(Reader: TReader); - procedure SaveState; - procedure WriteSkinName(Writer: TWriter); - - { IcxLookAndFeelNotificationListener } - function GetObject: TObject; - procedure MasterLookAndFeelDestroying(Sender: TcxLookAndFeel); - { IcxLookAndFeelPainterListener } - procedure PainterChanged(APainter: TcxCustomLookAndFeelPainterClass); - protected - procedure Changed(AChangedValues: TcxLookAndFeelValues); - procedure DefineProperties(Filer: TFiler); override; - procedure InitializeCurrentState; virtual; - function InternalGetKind: TcxLookAndFeelKind; virtual; - function InternalGetNativeStyle: Boolean; virtual; - function InternalGetSkinName: string; virtual; - function InternalGetSkinPainter: TcxCustomLookAndFeelPainterClass; virtual; - function IsVisualSkinAvailable(const ASkinName: string; - out Painter: TcxCustomLookAndFeelPainterClass): Boolean; virtual; - procedure MasterLookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); - procedure NotifyChanged; - procedure SystemPaletteChanged; virtual; - - property ChangeListenerList: TcxObjectList read FChangeListenerList; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure AddChangeListener(AListener: TObject); - function GetAvailablePainter(ANeededThemedObjectType: - TdxThemedObjectType): TcxCustomLookAndFeelPainterClass; overload; - function GetAvailablePainter(ANeededThemedObjectTypes: - TdxThemedObjectTypes = []): TcxCustomLookAndFeelPainterClass; overload; - procedure Refresh; - procedure RemoveChangeListener(AListener: TObject); - procedure Reset; - procedure SetStyle(Value: TcxLookAndFeelStyle); - property ActiveStyle: TcxLookAndFeelStyle read GetActiveStyle; - property MasterLookAndFeel: TcxLookAndFeel read GetMasterLookAndFeel write SetMasterLookAndFeel; - property Painter: TcxCustomLookAndFeelPainterClass read GetPainter write SetPainter; - property SkinPainter: TcxCustomLookAndFeelPainterClass read FSkinPainter write FSkinPainter; - property OnChanged: TcxLookAndFeelChangedEvent read FOnChanged write FOnChanged; - published - property AssignedValues: TcxLookAndFeelValues read FAssignedValues write SetAssignedValues stored False; - property Kind: TcxLookAndFeelKind read GetKind write SetKind stored IsKindStored; - property NativeStyle: Boolean read GetNativeStyle write SetNativeStyle stored IsNativeStyleStored; - property SkinName: TdxSkinName read GetSkinName write SetSkinName stored IsSkinNameStored; - end; - - { TcxLookAndFeelController } - - TcxLookAndFeelController = class(TComponent, IcxLookAndFeelNotificationListener) - private - function GetKind: TcxLookAndFeelKind; - function GetNativeStyle: Boolean; - function GetSkinName: TdxSkinName; - function IsSkinNameStored: Boolean; - procedure SetKind(Value: TcxLookAndFeelKind); - procedure SetNativeStyle(Value: Boolean); - procedure SetSkinName(const Value: TdxSkinName); - procedure Modified; - { IcxLookAndFeelNotificationListener } - function GetObject: TObject; - protected - procedure MasterLookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); virtual; - procedure MasterLookAndFeelDestroying(Sender: TcxLookAndFeel); virtual; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - published - property Kind: TcxLookAndFeelKind read GetKind write SetKind default cxDefaultLookAndFeelKind; - property NativeStyle: Boolean read GetNativeStyle write SetNativeStyle default cxDefaultLookAndFeelNativeStyle; - property SkinName: TdxSkinName read GetSkinName write SetSkinName stored IsSkinNameStored; - end; - - { TcxSystemPaletteChangedNotifier } - - TcxSystemPaletteChangedEvent = procedure of object; - - TcxSystemPaletteChangedNotifier = class - private - FIsPrimary: Boolean; - FOnSystemPaletteChanged: TcxSystemPaletteChangedEvent; - protected - procedure DoChanged; virtual; - public - constructor Create(AIsPrimary: Boolean = False); virtual; - destructor Destroy; override; - property OnSystemPaletteChanged: TcxSystemPaletteChangedEvent - read FOnSystemPaletteChanged write FOnSystemPaletteChanged; - end; - - TdxClassSupportsSkinProc = function(AClass: TPersistent): Boolean; - -function RootLookAndFeel: TcxLookAndFeel; -procedure SetControlLookAndFeel(AControl: TWinControl; AMasterLookAndFeel: TcxLookAndFeel); overload; -procedure SetControlLookAndFeel(AControl: TWinControl; AKind: TcxLookAndFeelKind; - ANativeStyle: Boolean); overload; - -var - ClassSupportsSkinProc: TdxClassSupportsSkinProc; - -implementation - -uses -{$IFDEF WIN32} - Windows, -{$ENDIF} - cxControls; - -const - LookAndFeelValueAll = [lfvKind, lfvNativeStyle, lfvSkinName]; - LookAndFeelPainterMap: array[TcxLookAndFeelKind] of TcxCustomLookAndFeelPainterClass = ( - TcxFlatLookAndFeelPainter, - TcxStandardLookAndFeelPainter, - TcxUltraFlatLookAndFeelPainter, - TcxOffice11LookAndFeelPainter - ); - LookAndFeelStyleMap: array[TcxLookAndFeelKind] of TcxLookAndFeelStyle = - (lfsFlat, lfsStandard, lfsUltraFlat, lfsOffice11); - LookAndFeelKindMap: array[TcxLookAndFeelStyle] of TcxLookAndFeelKind = - (lfFlat, lfStandard, lfUltraFlat, lfStandard, lfOffice11); - -type - { TcxSystemPaletteChangedListener } - - TcxSystemPaletteChangedListener = class - private - FNotifierList: TList; - FPrimaryNotifierList: TList; - FWindowHandle: TcxHandle; - procedure DoChange; - procedure WndProc(var Msg: TMessage); - public - constructor Create; - destructor Destroy; override; - procedure AddNotifier(ANotifier: TcxSystemPaletteChangedNotifier; - AIsPrimary: Boolean); - procedure RemoveNotifier(ANotifier: TcxSystemPaletteChangedNotifier; - AIsPrimary: Boolean); - end; - -var - FLookAndFeelControllerCount: Integer; - FRootLookAndFeel: TcxLookAndFeel; - FSystemPaletteChangedListener: TcxSystemPaletteChangedListener; - FSystemPaletteChangedListenerRefCount: Integer; - -procedure SetControlLookAndFeel(AControl: TWinControl; AMasterLookAndFeel: TcxLookAndFeel); -var - AIntf: IcxLookAndFeelContainer; - I: Integer; -begin - if Supports(AControl, IcxLookAndFeelContainer, AIntf) then - AIntf.GetLookAndFeel.MasterLookAndFeel := AMasterLookAndFeel; - for I := 0 to AControl.ControlCount - 1 do - if AControl.Controls[I] is TWinControl then - SetControlLookAndFeel(TWinControl(AControl.Controls[I]), AMasterLookAndFeel); -end; - -procedure SetControlLookAndFeel(AControl: TWinControl; AKind: TcxLookAndFeelKind; - ANativeStyle: Boolean); -var - AIntf: IcxLookAndFeelContainer; - I: Integer; -begin - if Supports(AControl, IcxLookAndFeelContainer, AIntf) then - with AIntf.GetLookAndFeel do - begin - Kind := AKind; - NativeStyle := ANativeStyle; - end; - for I := 0 to AControl.ControlCount - 1 do - if AControl.Controls[I] is TWinControl then - SetControlLookAndFeel(TWinControl(AControl.Controls[I]), AKind, ANativeStyle); -end; - -procedure AddRefSystemPaletteChangedListener; -begin - if FSystemPaletteChangedListenerRefCount = 0 then - FSystemPaletteChangedListener := TcxSystemPaletteChangedListener.Create; - Inc(FSystemPaletteChangedListenerRefCount); -end; - -procedure ReleaseRefSystemPaletteChangedListener; -begin - Dec(FSystemPaletteChangedListenerRefCount); - if FSystemPaletteChangedListenerRefCount = 0 then - FreeAndNil(FSystemPaletteChangedListener); -end; - -function RootLookAndFeel: TcxLookAndFeel; -begin - Result := FRootLookAndFeel; -end; - -{ TcxSystemPaletteChangedListener } - -constructor TcxSystemPaletteChangedListener.Create; -begin - inherited Create; - CreateOffice11Colors; - FWindowHandle := AllocateHWnd(WndProc); - FNotifierList := TList.Create; - FPrimaryNotifierList := TList.Create; -end; - -destructor TcxSystemPaletteChangedListener.Destroy; -begin - FreeAndNil(FPrimaryNotifierList); - FreeAndNil(FNotifierList); - DeallocateHWnd(FWindowHandle); - ReleaseOffice11Colors; - inherited Destroy; -end; - -procedure TcxSystemPaletteChangedListener.AddNotifier( - ANotifier: TcxSystemPaletteChangedNotifier; AIsPrimary: Boolean); -begin - if AIsPrimary then - begin - if FPrimaryNotifierList <> nil then - FPrimaryNotifierList.Add(ANotifier); - end - else - if FNotifierList <> nil then - FNotifierList.Add(ANotifier); -end; - -procedure TcxSystemPaletteChangedListener.RemoveNotifier( - ANotifier: TcxSystemPaletteChangedNotifier; AIsPrimary: Boolean); -begin - if AIsPrimary then - begin - if FPrimaryNotifierList <> nil then - FPrimaryNotifierList.Remove(ANotifier); - end - else - if FNotifierList <> nil then - FNotifierList.Remove(ANotifier); -end; - -procedure TcxSystemPaletteChangedListener.DoChange; -var - I: Integer; -begin - RefreshOffice11Colors; - for I := FPrimaryNotifierList.Count - 1 downto 0 do - //for I := 0 to FPrimaryNotifierList.Count - 1 do - TcxSystemPaletteChangedNotifier(FPrimaryNotifierList[I]).DoChanged; - for I := FNotifierList.Count - 1 downto 0 do - //for I := 0 to FNotifierList.Count - 1 do - TcxSystemPaletteChangedNotifier(FNotifierList[I]).DoChanged; -end; - -procedure TcxSystemPaletteChangedListener.WndProc(var Msg: TMessage); -begin - with Msg do - try - if Msg = WM_SYSCOLORCHANGE then - DoChange; - finally - Result := DefWindowProc(FWindowHandle, Msg, wParam, lParam); - end; -end; - -{ TcxLookAndFeel } - -constructor TcxLookAndFeel.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FChangeListenerList := TcxObjectList.Create(False); - FData.Kind := cxDefaultLookAndFeelKind; - FData.NativeStyle := cxDefaultLookAndFeelNativeStyle; - FCurrentState := FData; - FSystemPaletteChangedNotifier := TcxSystemPaletteChangedNotifier.Create; - FSystemPaletteChangedNotifier.OnSystemPaletteChanged := SystemPaletteChanged; - if FRootLookAndFeel <> nil then - begin - FRootLookAndFeel.AddChangeListener(Self); - InitializeCurrentState; - end; - FCurrentState.Painter := GetAvailablePainter(); -end; - -destructor TcxLookAndFeel.Destroy; -var - I: Integer; - AIntf: IcxLookAndFeelNotificationListener; -begin - if GetExtendedStylePainters <> nil then - GetExtendedStylePainters.RemoveListener(Self); - FreeAndNil(FSystemPaletteChangedNotifier); - FIsDestruction := True; - for I := 0 to ChangeListenerList.Count - 1 do - begin - ChangeListenerList[I].GetInterface(IcxLookAndFeelNotificationListener, AIntf); - AIntf.MasterLookAndFeelDestroying(Self); - AIntf := nil; - end; - FIsDestruction := False; - FreeAndNil(FChangeListenerList); - - if MasterLookAndFeel <> nil then - MasterLookAndFeel.RemoveChangeListener(Self); - - if FIsRootLookAndFeel then - begin - FRootLookAndFeel := nil; - FIsRootLookAndFeel := False; - end; - inherited Destroy; -end; - -procedure TcxLookAndFeel.AddChangeListener(AListener: TObject); -var - AIsLookAndFeelController: Boolean; - AIntf: IcxLookAndFeelNotificationListener; -begin - if (AListener = nil) or not Supports(AListener, IcxLookAndFeelNotificationListener, AIntf) then - Exit; - AIsLookAndFeelController := AIntf.GetObject is TcxLookAndFeelController; - if not FIsRootLookAndFeel and AIsLookAndFeelController then - Exit; - if ChangeListenerList.IndexOf(AListener) >= 0 then - Exit; - - if FIsRootLookAndFeel and AIsLookAndFeelController then - Inc(FLookAndFeelControllerCount); - ChangeListenerList.Add(AListener); -end; - -function TcxLookAndFeel.GetAvailablePainter(ANeededThemedObjectType: - TdxThemedObjectType): TcxCustomLookAndFeelPainterClass; -begin - if NativeStyle and AreVisualStylesAvailable(ANeededThemedObjectType) then - Result := TcxWinXPLookAndFeelPainter - else - if FSkinPainter <> nil then - Result := FSkinPainter - else - Result := LookAndFeelPainterMap[Kind]; -end; - -function TcxLookAndFeel.GetAvailablePainter(ANeededThemedObjectTypes: - TdxThemedObjectTypes = []): TcxCustomLookAndFeelPainterClass; -begin - if NativeStyle and AreVisualStylesAvailable(ANeededThemedObjectTypes) then - Result := TcxWinXPLookAndFeelPainter - else - if FSkinPainter <> nil then - Result := FSkinPainter - else - Result := LookAndFeelPainterMap[Kind]; -end; - -procedure TcxLookAndFeel.Assign(Source: TPersistent); -begin - if Source is TcxLookAndFeel then - with Source as TcxLookAndFeel do - begin - Self.SaveState; - Self.FData := FData; - Self.FAssignedValues := FAssignedValues; - Self.MasterLookAndFeel := MasterLookAndFeel; - Self.CheckStateChanges; - end - else - inherited Assign(Source); -end; - -procedure TcxLookAndFeel.Refresh; -begin - Changed(LookAndFeelValueAll); -end; - -procedure TcxLookAndFeel.RemoveChangeListener(AListener: TObject); -var - AIsLookAndFeelController: Boolean; - AIntf: IcxLookAndFeelNotificationListener; -begin - if (AListener = nil) or not Supports(AListener, IcxLookAndFeelNotificationListener, AIntf) then - Exit; - - AIsLookAndFeelController := AIntf.GetObject is TcxLookAndFeelController; - if ChangeListenerList.IndexOf(AListener) < 0 then - Exit; - - if not FIsDestruction then - ChangeListenerList.Remove(AListener); - - if FIsRootLookAndFeel and AIsLookAndFeelController then - begin - Dec(FLookAndFeelControllerCount); - if FLookAndFeelControllerCount = 0 then - Reset; - end; -end; - -procedure TcxLookAndFeel.Reset; -begin - AssignedValues := []; -end; - -procedure TcxLookAndFeel.SetStyle(Value: TcxLookAndFeelStyle); -begin - NativeStyle := Value = lfsNative; - if not NativeStyle then - Kind := LookAndFeelKindMap[Value]; -end; - -procedure TcxLookAndFeel.Changed(AChangedValues: TcxLookAndFeelValues); -var - I, APrevCount: Integer; - AIntf: IcxLookAndFeelNotificationListener; -begin - if (AChangedValues = []) and (FCurrentState.UseSkins = cxUseSkins) or FIsDestruction then - Exit; - - InitializeCurrentState; - FCurrentState.Painter := GetAvailablePainter; - - if GetExtendedStylePainters <> nil then - begin - if FSkinPainter <> nil then - GetExtendedStylePainters.AddListener(Self) - else - GetExtendedStylePainters.RemoveListener(Self); - end; - I := 0; - while I < ChangeListenerList.Count do - begin - APrevCount := ChangeListenerList.Count; - ChangeListenerList[I].GetInterface(IcxLookAndFeelNotificationListener, AIntf); - AIntf.MasterLookAndFeelChanged(Self, AChangedValues); - AIntf := nil; - if APrevCount = ChangeListenerList.Count then - Inc(I); - end; - if Assigned(FOnChanged) then - FOnChanged(Self, AChangedValues); -end; - -procedure TcxLookAndFeel.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('SkinName', ReadSkinName, WriteSkinName, - IsSkinNameStored and (SkinName = '')); -end; - -procedure TcxLookAndFeel.ReadSkinName(Reader: TReader); -begin - SkinName := Reader.ReadString; -end; - -procedure TcxLookAndFeel.WriteSkinName(Writer: TWriter); -begin - Writer.WriteString(SkinName); -end; - -procedure TcxLookAndFeel.InitializeCurrentState; -begin - FCurrentState.Kind := InternalGetKind; - FCurrentState.NativeStyle := InternalGetNativeStyle; - FCurrentState.SkinName := InternalGetSkinName; - FCurrentState.UseSkins := cxUseSkins; - if FCurrentState.NativeStyle then - FSkinPainter := nil - else - FSkinPainter := InternalGetSkinPainter; -end; - -function TcxLookAndFeel.InternalGetKind: TcxLookAndFeelKind; -begin - if lfvKind in FAssignedValues then - Result := FData.Kind - else - Result := GetDefaultKind; -end; - -function TcxLookAndFeel.InternalGetNativeStyle: Boolean; -begin - if lfvNativeStyle in FAssignedValues then - Result := FData.NativeStyle - else - Result := GetDefaultNativeStyle; -end; - -function TcxLookAndFeel.InternalGetSkinName: string; -begin - if lfvSkinName in FAssignedValues then - Result := FData.SkinName - else - Result := GetDefaultSkinName; -end; - -function TcxLookAndFeel.InternalGetSkinPainter: TcxCustomLookAndFeelPainterClass; -begin - if lfvSkinName in FAssignedValues then - IsVisualSkinAvailable(FData.SkinName, Result) - else - Result := GetDefaultSkinPainter; -end; - -function TcxLookAndFeel.IsVisualSkinAvailable(const ASkinName: string; - out Painter: TcxCustomLookAndFeelPainterClass): Boolean; -begin - Result := (ASkinName <> '') and - GetExtendedStylePainters.GetPainterByName(ASkinName, Painter); - if not Result or not cxUseSkins then - Painter := nil; -end; - -procedure TcxLookAndFeel.MasterLookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); -var - AOwnChangedValues: TcxLookAndFeelValues; -begin - AOwnChangedValues := (LookAndFeelValueAll - FAssignedValues) * AChangedValues; - Changed(AOwnChangedValues); -end; - -procedure TcxLookAndFeel.NotifyChanged; -var - AListener: TObject; - APrevCount, I: Integer; - AIntf: IcxLookAndFeelNotificationListener; -begin - if FIsDestruction then - Exit; - I := 0; - while I < ChangeListenerList.Count do - begin - APrevCount := ChangeListenerList.Count; - ChangeListenerList[I].GetInterface(IcxLookAndFeelNotificationListener, AIntf); - AListener := AIntf.GetObject; - AIntf := nil; - if AListener is TcxLookAndFeel then - TcxLookAndFeel(AListener).NotifyChanged; - if APrevCount = ChangeListenerList.Count then - Inc(I); - end; - if Assigned(FOnChanged) then - FOnChanged(Self, []); -end; - -procedure TcxLookAndFeel.SystemPaletteChanged; -begin - Changed([lfvNativeStyle]); -end; - -function TcxLookAndFeel.GetActiveStyle: TcxLookAndFeelStyle; -begin - if NativeStyle and AreVisualStylesAvailable then - Result := lfsNative - else - Result := LookAndFeelStyleMap[Kind]; -end; - -function TcxLookAndFeel.GetKind: TcxLookAndFeelKind; -begin - Result := FCurrentState.Kind; -end; - -function TcxLookAndFeel.GetMasterLookAndFeel: TcxLookAndFeel; -begin - if FIsRootLookAndFeel then - Result := nil - else - if FMasterLookAndFeel = nil then - Result := FRootLookAndFeel - else - Result := FMasterLookAndFeel; -end; - -function TcxLookAndFeel.GetNativeStyle: Boolean; -begin - Result := FCurrentState.NativeStyle; -end; - -function TcxLookAndFeel.GetPainter: TcxCustomLookAndFeelPainterClass; -begin - if FPainter = nil then - Result := FCurrentState.Painter - else - Result := FPainter; -end; - -function TcxLookAndFeel.GetSkinName: TdxSkinName; -begin - Result := FCurrentState.SkinName; -end; - -procedure TcxLookAndFeel.SetAssignedValues(Value: TcxLookAndFeelValues); -begin - if Value <> FAssignedValues then - begin - SaveState; - FAssignedValues := Value; - CheckStateChanges; - end; -end; - -procedure TcxLookAndFeel.SetKind(Value: TcxLookAndFeelKind); -var - AOldKind: TcxLookAndFeelKind; -begin - AOldKind := Kind; - Include(FAssignedValues, lfvKind); - FData.Kind := Value; - if AOldKind <> InternalGetKind then - Changed([lfvKind]); -end; - -procedure TcxLookAndFeel.SetMasterLookAndFeel(Value: TcxLookAndFeel); -begin - if FIsRootLookAndFeel or (Value = Self) then Exit; - if Value <> MasterLookAndFeel then - begin - SaveState; - if MasterLookAndFeel <> nil then - MasterLookAndFeel.RemoveChangeListener(Self); - FMasterLookAndFeel := Value; - if MasterLookAndFeel <> nil then - MasterLookAndFeel.AddChangeListener(Self); - CheckStateChanges; - end; -end; - -procedure TcxLookAndFeel.SetNativeStyle(Value: Boolean); -var - AOldNativeStyle: Boolean; -begin - AOldNativeStyle := NativeStyle; - Include(FAssignedValues, lfvNativeStyle); - FData.NativeStyle := Value; - if AOldNativeStyle <> InternalGetNativeStyle then - Changed([lfvNativeStyle]); -end; - -procedure TcxLookAndFeel.SetPainter(Value: TcxCustomLookAndFeelPainterClass); -begin - if Painter <> Value then - begin - FPainter := Value; - Changed([lfvKind, lfvNativeStyle]); - end; -end; - -procedure TcxLookAndFeel.SetSkinName(const Value: TdxSkinName); -var - AOldSkinName: string; -begin - AOldSkinName := SkinName; - Include(FAssignedValues, lfvSkinName); - FData.SkinName := Value; - if AOldSkinName <> InternalGetSkinName then - Changed([lfvSkinName]); -end; - -procedure TcxLookAndFeel.CheckStateChanges; -var - AChangedValues: TcxLookAndFeelValues; -begin - AChangedValues := []; - if FPrevState.Kind <> InternalGetKind then - Include(AChangedValues, lfvKind); - if FPrevState.NativeStyle <> InternalGetNativeStyle then - Include(AChangedValues, lfvNativeStyle); - if FPrevState.SkinName <> InternalGetSkinName then - Include(AChangedValues, lfvSkinName); - Changed(AChangedValues); -end; - -function TcxLookAndFeel.GetDefaultKind: TcxLookAndFeelKind; -begin - if FIsRootLookAndFeel then - Result := cxDefaultLookAndFeelKind - else - if FMasterLookAndFeel = nil then - if FRootLookAndFeel = nil then - Result := cxDefaultLookAndFeelKind - else - Result := FRootLookAndFeel.Kind - else - Result := FMasterLookAndFeel.Kind; -end; - -function TcxLookAndFeel.GetDefaultNativeStyle: Boolean; -begin - if FIsRootLookAndFeel then - Result := cxDefaultLookAndFeelNativeStyle - else - if FMasterLookAndFeel = nil then - if FRootLookAndFeel = nil then - Result := cxDefaultLookAndFeelNativeStyle - else - Result := FRootLookAndFeel.NativeStyle - else - Result := FMasterLookAndFeel.NativeStyle; -end; - -function TcxLookAndFeel.GetDefaultSkinName: string; -begin - if FIsRootLookAndFeel then - Result := cxDefaultLookAndFeelSkinName - else - if FMasterLookAndFeel = nil then - if FRootLookAndFeel = nil then - Result := cxDefaultLookAndFeelSkinName - else - Result := FRootLookAndFeel.SkinName - else - Result := FMasterLookAndFeel.SkinName; -end; - -function TcxLookAndFeel.GetDefaultSkinPainter: TcxCustomLookAndFeelPainterClass; -begin - if FIsRootLookAndFeel then - Result := nil - else - if FMasterLookAndFeel = nil then - if FRootLookAndFeel = nil then - Result := nil - else - FRootLookAndFeel.IsVisualSkinAvailable(FRootLookAndFeel.SkinName, Result) - else - FMasterLookAndFeel.IsVisualSkinAvailable(FMasterLookAndFeel.SkinName, Result); -end; - -function TcxLookAndFeel.IsKindStored: Boolean; -begin - Result := lfvKind in FAssignedValues; -end; - -function TcxLookAndFeel.IsNativeStyleStored: Boolean; -begin - Result := lfvNativeStyle in FAssignedValues; -end; - -function TcxLookAndFeel.IsSkinNameStored: Boolean; -begin - Result := lfvSkinName in FAssignedValues; -end; - -procedure TcxLookAndFeel.SaveState; -begin - FPrevState.Kind := Kind; - FPrevState.NativeStyle := NativeStyle; - FPrevState.SkinName := SkinName; -end; - -function TcxLookAndFeel.GetObject: TObject; -begin - Result := Self; -end; - -procedure TcxLookAndFeel.MasterLookAndFeelDestroying(Sender: TcxLookAndFeel); -begin - MasterLookAndFeel := nil; -end; - -procedure TcxLookAndFeel.PainterChanged(APainter: TcxCustomLookAndFeelPainterClass); -begin - Changed(LookAndFeelValueAll); -end; - -{ TcxLookAndFeelController } - -constructor TcxLookAndFeelController.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - if RootLookAndFeel <> nil then - RootLookAndFeel.AddChangeListener(Self); -end; - -destructor TcxLookAndFeelController.Destroy; -begin - if RootLookAndFeel <> nil then - RootLookAndFeel.RemoveChangeListener(Self); - inherited Destroy; -end; - -function TcxLookAndFeelController.GetKind: TcxLookAndFeelKind; -begin - if RootLookAndFeel = nil then - Result := cxDefaultLookAndFeelKind - else - Result := RootLookAndFeel.Kind; -end; - -function TcxLookAndFeelController.GetNativeStyle: Boolean; -begin - if RootLookAndFeel = nil then - Result := cxDefaultLookAndFeelNativeStyle - else - Result := RootLookAndFeel.NativeStyle; -end; - -function TcxLookAndFeelController.GetSkinName: TdxSkinName; -begin - if RootLookAndFeel = nil then - Result := cxDefaultLookAndFeelSkinName - else - Result := RootLookAndFeel.SkinName; -end; - -function TcxLookAndFeelController.IsSkinNameStored: Boolean; -begin - Result := SkinName <> ''; -end; - -procedure TcxLookAndFeelController.SetKind(Value: TcxLookAndFeelKind); -begin - if RootLookAndFeel <> nil then - RootLookAndFeel.Kind := Value; -end; - -procedure TcxLookAndFeelController.SetNativeStyle(Value: Boolean); -begin - if RootLookAndFeel <> nil then - RootLookAndFeel.NativeStyle := Value; -end; - -procedure TcxLookAndFeelController.SetSkinName(const Value: TdxSkinName); -begin - if RootLookAndFeel <> nil then - RootLookAndFeel.SkinName := Value; -end; - -procedure TcxLookAndFeelController.Modified; -begin -end; - -function TcxLookAndFeelController.GetObject: TObject; -begin - Result := Self; -end; - -procedure TcxLookAndFeelController.MasterLookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); -begin - if csDesigning in ComponentState then - Modified; -end; - -procedure TcxLookAndFeelController.MasterLookAndFeelDestroying(Sender: TcxLookAndFeel); -var - AOwnerForm: TCustomForm; -begin - AOwnerForm := nil; -{$IFDEF DELPHI6} - if (Owner is TFrame) and (TFrame(Owner).Owner is TForm) then - AOwnerForm := TForm(TFrame(Owner).Owner) - else -{$ENDIF} - if Owner is TForm then - AOwnerForm := TForm(Owner); - if AOwnerForm = nil then - Exit; - if AOwnerForm.Designer <> nil then - AOwnerForm.Designer.Modified; -end; - -{ TcxSystemPaletteChangedNotifier } - -constructor TcxSystemPaletteChangedNotifier.Create(AIsPrimary: Boolean = False); -begin - inherited Create; - FIsPrimary := AIsPrimary; - AddRefSystemPaletteChangedListener; - FSystemPaletteChangedListener.AddNotifier(Self, AIsPrimary); -end; - -destructor TcxSystemPaletteChangedNotifier.Destroy; -begin - FSystemPaletteChangedListener.RemoveNotifier(Self, FIsPrimary); - ReleaseRefSystemPaletteChangedListener; -end; - -procedure TcxSystemPaletteChangedNotifier.DoChanged; -begin - if Assigned(FOnSystemPaletteChanged) then - FOnSystemPaletteChanged; -end; - -function ClassSupportsSkinHandler(AClass: TPersistent): Boolean; -begin - Result := Supports(AClass, IdxSkinSupport); -end; - -initialization -{$IFDEF DELPHI6} - GroupDescendentsWith(TcxLookAndFeelController, TForm); -{$ENDIF} - FRootLookAndFeel := TcxLookAndFeel.Create(nil); - FRootLookAndFeel.FIsRootLookAndFeel := True; - ClassSupportsSkinProc := ClassSupportsSkinHandler; - -finalization - FreeAndNil(FRootLookAndFeel); - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxPropEditors.pas b/internal/x.46/ExpressLibrary/Sources/cxPropEditors.pas deleted file mode 100644 index 07b15c6c..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxPropEditors.pas +++ /dev/null @@ -1,563 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxPropEditors; - -interface - -{$I cxVer.inc} - -uses -{$IFDEF DELPHI6} - DesignIntf, DesignEditors, VCLEditors, - Types, -{$ELSE} - DsgnIntf, -{$ENDIF} - Windows, Messages, SysUtils, Classes, Graphics, Controls, TypInfo, cxContainer, - ImgList; - -type - TcxNestedEventProperty = class(TMethodProperty) - protected - function GetInstance: TPersistent; virtual; abstract; - public - function GetAttributes: TPropertyAttributes; override; - function GetName: string; override; - procedure GetProperties(Proc: {$IFDEF DELPHI6}TGetPropProc{$ELSE}TGetPropEditProc{$ENDIF}); override; - function GetValue: string; override; - - property Instance: TPersistent read GetInstance; - end; - - TcxNestedParentElementEventProperty = class(TNestedProperty) - private - FOwner: TPersistent; - FPropInfo: PPropInfo; - FParent: TPropertyEditor; - - function GetInstance: TPersistent; - protected - constructor Create(Parent: TPropertyEditor; AOwner: TPersistent; APropInfo: PPropInfo); reintroduce; - public - function GetAttributes: TPropertyAttributes; override; - procedure GetProperties(Proc: {$IFDEF DELPHI6}TGetPropProc{$ELSE}TGetPropEditProc{$ENDIF}); override; - function GetValue: string; override; - function GetName: string; override; - - property Instance: TPersistent read GetInstance; - end; - - TcxNestedElementEventProperty = class(TNestedProperty) - private - FParent: TPropertyEditor; - FPropInfo: PPropInfo; - - function GetTrimmedEventName: string; - function GetPersistentClassNames: string; - function GetInstance: TPersistent; - protected - constructor Create(Parent: TPropertyEditor; APropInfo: PPropInfo); reintroduce; - - function GetFormMethodName: string; virtual; - property Instance: TPersistent read GetInstance; - public - function AllEqual: Boolean; override; - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - function GetEditLimit: Integer; override; - function GetName: string; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const AValue: string); override; - end; - - { TImageIndexProperty } - - TImageIndexProperty = class(TIntegerProperty{$IFDEF DELPHI6}, ICustomPropertyListDrawing{$ENDIF}) - public - function GetImages: TCustomImageList; virtual; abstract; - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - procedure ListMeasureHeight(const Value: string; ACanvas: TCanvas; - var AHeight: Integer); {$IFDEF DELPHI6}virtual{$ELSE}override{$ENDIF}; - procedure ListMeasureWidth(const Value: string; ACanvas: TCanvas; - var AWidth: Integer); {$IFDEF DELPHI6}virtual{$ELSE}override{$ENDIF}; - procedure ListDrawValue(const Value: string; ACanvas: TCanvas; - const ARect: TRect; ASelected: Boolean); {$IFDEF DELPHI6}virtual{$ELSE}override{$ENDIF}; - end; - - { TcxStyleControllerStyleProperty } - - TcxStyleControllerStyleProperty = class(TClassProperty) - private - FProc: {$IFNDEF DELPHI6}TGetPropEditProc{$ELSE}TGetPropProc{$ENDIF}; - procedure GetPropProc({$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); - protected - function GetStyle: TcxContainerStyle; virtual; - function IsPropertyVisible(const APropertyName: string): Boolean; virtual; - public - procedure GetProperties(Proc: {$IFNDEF DELPHI6}TGetPropEditProc{$ELSE}TGetPropProc{$ENDIF}); override; - end; - -procedure ObjectInspectorCollapseProperty; - -implementation - -uses -{$IFDEF DELPHI6} - DesignConst, -{$ELSE} - Consts, -{$ENDIF} - cxClasses, dxCore; - -function EnumChildProc(WND: HWND; LParam: Integer): BOOL; stdcall -var - AName: array[0..255] of Char; -const - S: string = 'TPropSelection'; -begin - Result := True; - if (GetClassName(WND, @AName[0], 255) <> 0) and (AName = S) then - begin - SendMessage(WND, WM_CHAR, $2D, $4A0001); - InvalidateRect(WND, nil, True); - SendMessage(GetParent(WND), WM_SIZE, 0, 0); - end; -end; - -function EnumWnd(WND: HWND; LParam: Integer): BOOL; stdcall; -begin - Result := True; - EnumChildWindows(WND, @EnumChildProc, 0); -end; - -procedure ObjectInspectorCollapseProperty; -begin - EnumWindows(@EnumWnd, 0); -end; - -function cxNestedEventProperty_GetAttributes: TPropertyAttributes; -begin - Result := [paMultiSelect, paSubProperties, paReadOnly, paRevertable]; -end; - -procedure cxNestedEventProperty_GetProperties(APropertyEditor: TPropertyEditor; - AInstance: TPersistent; Proc: {$IFDEF DELPHI6}TGetPropProc{$ELSE}TGetPropEditProc{$ENDIF}); -var - APropList: TPropList; - I, ACount : Integer; - AClassType: TClass; -begin - if AInstance = nil then Exit; - ACount := GetPropList(AInstance.ClassInfo, [tkMethod], @APropList); - for I := 0 to ACount - 1 do - Proc(TcxNestedElementEventProperty.Create(APropertyEditor, APropList[I])); - ACount := GetPropList(AInstance.ClassInfo, [tkClass], @APropList); - for I := 0 to ACount - 1 do - begin - AClassType := GetTypeData(APropList[I].PropType^).ClassType; - if not AClassType.InheritsFrom(TComponent) and AClassType.InheritsFrom(TPersistent) and - (GetPropList(AClassType.ClassInfo, [tkMethod], nil) <> 0) then - Proc(TcxNestedParentElementEventProperty.Create(APropertyEditor, AInstance, APropList[I])); - end; -end; - -function cxNestedEventProperty_GetValue(AInstance: TPersistent): string; -begin - if AInstance = nil then - Result := '(None)' - else - Result := '(' + AInstance.ClassName + ')'; -end; - -{ TcxNestedEventProperty } - -function TcxNestedEventProperty.GetAttributes: TPropertyAttributes; -begin - Result := cxNestedEventProperty_GetAttributes; -end; - -function TcxNestedEventProperty.GetName: string; -begin - Result := inherited GetName; - Result := Copy(Result, 1, Pos('Events', Result) - 1); -end; - -procedure TcxNestedEventProperty.GetProperties(Proc: {$IFDEF DELPHI6}TGetPropProc{$ELSE}TGetPropEditProc{$ENDIF}); -begin - cxNestedEventProperty_GetProperties(Self, Instance, Proc); -end; - -function TcxNestedEventProperty.GetValue: string; -begin - Result := cxNestedEventProperty_GetValue(Instance); -end; - -{ TcxNestedParentElementEventProperty } - -constructor TcxNestedParentElementEventProperty.Create(Parent: TPropertyEditor; - AOwner: TPersistent; APropInfo: PPropInfo); -begin - inherited Create(Parent); - FParent := Parent; - FOwner := AOwner; - FPropInfo := APropInfo; -end; - -function TcxNestedParentElementEventProperty.GetInstance: TPersistent; -begin - {$IFNDEF DELPHI5} - Result := TPersistent(GetOrdProp(FOwner, FPropInfo)) - {$ELSE} - Result := TPersistent(GetObjectProp(FOwner, FPropInfo)); - {$ENDIF} -end; - -function TcxNestedParentElementEventProperty.GetAttributes: TPropertyAttributes; -begin - Result := cxNestedEventProperty_GetAttributes; -end; - -procedure TcxNestedParentElementEventProperty.GetProperties(Proc: {$IFDEF DELPHI6}TGetPropProc{$ELSE}TGetPropEditProc{$ENDIF}); -begin - cxNestedEventProperty_GetProperties(Self, Instance, Proc); -end; - -function TcxNestedParentElementEventProperty.GetValue: string; -begin - Result := cxNestedEventProperty_GetValue(Instance); -end; - -function TcxNestedParentElementEventProperty.GetName: string; -begin - Result := dxShortStringToString(FPropInfo.Name); -end; - -{ TNestedElementEventProperty } -constructor TcxNestedElementEventProperty.Create(Parent: TPropertyEditor; APropInfo: PPropInfo); -begin - inherited Create(Parent); - FPropInfo := APropInfo; - FParent := Parent; -end; - -function TcxNestedElementEventProperty.AllEqual: Boolean; -var - I: Integer; - V, T: TMethod; -begin - Result := False; - if PropCount > 1 then - begin - V := GetMethodValue; - for I := 1 to PropCount - 1 do - begin - T := GetMethodValueAt(I); - if (T.Code <> V.Code) or (T.Data <> V.Data) then Exit; - end; - end; - Result := True; -end; - -procedure TcxNestedElementEventProperty.Edit; -var - FormMethodName: string; -begin - FormMethodName := GetValue; - if (FormMethodName = '') or - Designer.MethodFromAncestor(GetMethodValue) then - begin - if FormMethodName = '' then - FormMethodName := GetFormMethodName; - if FormMethodName = '' then - raise EPropertyError.Create(SCannotCreateName); - SetValue(FormMethodName); - end; - Designer.ShowMethod(FormMethodName); -end; - -function TcxNestedElementEventProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paMultiSelect, paValueList, paSortList, paRevertable]; -end; - -function TcxNestedElementEventProperty.GetEditLimit: Integer; -begin - Result := MaxIdentLength; -end; - -function TcxNestedElementEventProperty.GetName: string; -begin - Result := dxShortStringToString(FPropInfo.Name); -end; - -function TcxNestedElementEventProperty.GetValue: string; -begin - Result := Designer.GetMethodName(GetMethodProp(Instance, FPropInfo)); -end; - -procedure TcxNestedElementEventProperty.GetValues(Proc: TGetStrProc); -begin - Designer.GetMethods(GetTypeData(FPropInfo.PropType^), Proc); -end; - -procedure TcxNestedElementEventProperty.SetValue(const AValue: string); - - {$IFDEF DELPHI5} - procedure CheckChainCall(const MethodName: string; Method: TMethod); - var - Persistent: TPersistent; - Component: TComponent; - InstanceMethod: string; - Instance: TComponent; - begin - Persistent := GetComponent(0); - if Persistent is TComponent then - begin - Component := TComponent(Persistent); - if (Component.Name <> '') and (Method.Data <> Designer.GetRoot) and - (TObject(Method.Data) is TComponent) then - begin - Instance := TComponent(Method.Data); - InstanceMethod := Instance.MethodName(Method.Code); - if InstanceMethod <> '' then - Designer.ChainCall(MethodName, Instance.Name, InstanceMethod, - GetTypeData(GetPropType)); - end; - end; - end; - {$ENDIF} -var - NewMethod: Boolean; - CurValue: string; - OldMethod: TMethod; -begin - CurValue:= GetValue; - if (CurValue <> '') and (AValue <> '') and ((CompareText(CurValue, AValue) = 0) or - not Designer.MethodExists(AValue)) and not Designer.MethodFromAncestor(GetMethodValue) then - Designer.RenameMethod(CurValue, AValue) - else - begin - NewMethod := (AValue <> '') and not Designer.MethodExists(AValue); - OldMethod := GetMethodValue; - SetMethodProp(Instance, FPropInfo, - Designer.CreateMethod(AValue, GetTypeData(FPropInfo.PropType^))); - if NewMethod then - begin - {$IFDEF DELPHI5} - if (PropCount = 1) and (OldMethod.Data <> nil) and (OldMethod.Code <> nil) then - CheckChainCall(AValue, OldMethod); - {$ENDIF} - Designer.ShowMethod(AValue); - end; - Designer.Modified; - end; -end; - -function TcxNestedElementEventProperty.GetFormMethodName: string; -var - I: Integer; -begin - if GetComponent(0) = Designer.GetRoot then - begin - {$IFNDEF DELPHI5} - if Designer.GetRoot <> nil then - Result := Designer.GetRoot.ClassName - else Result := ''; - {$ELSE} - Result := Designer.GetRootClassName; - {$ENDIF} - if (Result <> '') and (Result[1] = 'T') then - Delete(Result, 1, 1); - end - else - begin - Result := Designer.GetObjectName(GetComponent(0)); - for I := Length(Result) downto 1 do - if dxCharInSet(Result[I], ['.','[',']','-','>']) then - Delete(Result, I, 1); - end; - if Result = '' then - raise EPropertyError.Create(SCannotCreateName); - Result := Result + GetPersistentClassNames + GetTrimmedEventName; -end; - -function TcxNestedElementEventProperty.GetTrimmedEventName: string; -begin - Result := GetName; - if (Length(Result) >= 2) and dxCharInSet(Result[1], ['O', 'o']) and - dxCharInSet(Result[2], ['N', 'n']) then - Delete(Result, 1, 2); -end; - -function TcxNestedElementEventProperty.GetPersistentClassNames: string; -var - APropertyEditor: TPropertyEditor; -begin - Result := ''; - APropertyEditor := self; - while APropertyEditor <> nil do - begin - if APropertyEditor is TcxNestedParentElementEventProperty then - APropertyEditor := TcxNestedParentElementEventProperty(APropertyEditor).FParent - else - if APropertyEditor is TcxNestedElementEventProperty then - APropertyEditor := TcxNestedElementEventProperty(APropertyEditor).FParent - else APropertyEditor := nil; - if APropertyEditor <> nil then - Result := APropertyEditor.GetName + Result; - end; -end; - -function TcxNestedElementEventProperty.GetInstance: TPersistent; -begin - Result := nil; - if FParent is TcxNestedEventProperty then - Result := TcxNestedEventProperty(FParent).Instance; - if FParent is TcxNestedParentElementEventProperty then - Result := TcxNestedParentElementEventProperty(FParent).Instance; -end; - -{ TImageIndexProperty } - -function TImageIndexProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paValueList, paRevertable]; -end; - -function TImageIndexProperty.GetValue: string; -begin - Result := IntToStr(GetOrdValue); -end; - -procedure TImageIndexProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - Proc('-1'); - if GetImages <> nil then - for I := 0 to GetImages.Count - 1 do Proc(IntToStr(I)); -end; - -procedure TImageIndexProperty.ListDrawValue(const Value: string; - ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean); -var - AImageWidth: Integer; -begin - with ACanvas do - begin - if GetImages <> nil then - begin - FillRect(ARect); - if ASelected then DrawFocusRect(ARect); - AImageWidth := GetImages.Width + 2 * 2; - GetImages.Draw(ACanvas, ARect.Left + 2, - (ARect.Top + ARect.Bottom - GetImages.Height) div 2, StrToInt(Value)); - end - else - AImageWidth := 0; - TextOut(ARect.Left + AImageWidth + 2, - (ARect.Top + ARect.Bottom - TextHeight(Value)) div 2, Value); - end; -end; - -procedure TImageIndexProperty.ListMeasureHeight(const Value: string; - ACanvas: TCanvas; var AHeight: Integer); -var - AImageHeight, AStringHeight: Integer; -begin - if GetImages <> nil then - AImageHeight := GetImages.Height + 2 * 2 - else - AImageHeight := 0; - AStringHeight := ACanvas.TextHeight(Value); - if AStringHeight > AImageHeight then - AHeight := AStringHeight - else - AHeight := AImageHeight; -end; - -procedure TImageIndexProperty.ListMeasureWidth(const Value: string; - ACanvas: TCanvas; var AWidth: Integer); -var - AImageWidth, AStringWidth: Integer; -begin - if GetImages <> nil then - AImageWidth := GetImages.Width + 2 * 2 - else - AImageWidth := 0; - AStringWidth := ACanvas.TextWidth(Value) + 2 * 2; - AWidth := AImageWidth + AStringWidth; -end; - -procedure TImageIndexProperty.SetValue(const Value: string); -begin - SetOrdValue(StrToInt(Value)); -end; - -{ TcxStyleControllerStyleProperty } - -procedure TcxStyleControllerStyleProperty.GetProperties( - Proc: {$IFNDEF DELPHI6}TGetPropEditProc{$ELSE}TGetPropProc{$ENDIF}); -begin - FProc := Proc; - inherited GetProperties(GetPropProc); -end; - -function TcxStyleControllerStyleProperty.GetStyle: TcxContainerStyle; -begin - Result := TcxStyleController(GetComponent(0)).Styles[csNormal]; -end; - -function TcxStyleControllerStyleProperty.IsPropertyVisible( - const APropertyName: string): Boolean; -begin - Result := not((GetName <> 'Style') and - not GetStyle.IsExtendedStylePropertyPublished(APropertyName)); -end; - -procedure TcxStyleControllerStyleProperty.GetPropProc( - {$IFNDEF DELPHI6}Prop: TPropertyEditor{$ELSE}const Prop: IProperty{$ENDIF}); -begin - if IsPropertyVisible(Prop.GetName) then - FProc(Prop); -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxPropertiesStore.pas b/internal/x.46/ExpressLibrary/Sources/cxPropertiesStore.pas deleted file mode 100644 index 1b5c66a2..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxPropertiesStore.pas +++ /dev/null @@ -1,937 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxPropertiesStore; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils, TypInfo, Controls, Forms, -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - cxClasses, cxStorage; - -type - TcxCustomPropertiesStore = class; - - { TcxPropertiesStoreComponent } - TcxPropertiesStoreComponent = class(TcxInterfacedCollectionItem, IcxStoredObject, IcxStoredParent) - private - FComponent: TComponent; - FProperties: TStrings; - FPropertiesEx: TStrings; - - procedure ExtractProperties; - function ExtractPersistentAndPropertyName(AStartPersistent: TPersistent; - const AStartName: string; var AResultName: string): TPersistent; - function GetCollectionItemByName(ACollection: TCollection; - const AName: string): TCollectionItem; - function GetPersistentAndPropertyName(const AStartName: string; - var AResultName: string): TPersistent; - function GetStorageModes: TcxStorageModes; - function GetComponentByName(const AName: string): TComponent; - function GetUseInterfaceOnly: Boolean; - procedure InternalGetPropertyValue(const AName: string; var AValue: Variant); - procedure InternalSetPropertyValue(const AName: string; const AValue: Variant); - procedure SetComponent(const Value: TComponent); - procedure SetProperties(const Value: TStrings); - function TestClassProperty(const AName: string; AObject: TObject): Boolean; - procedure AssignStorageProperties(AStorage: TcxStorage); - protected - // IcxStoredParent - function CreateChild(const AObjectName, AClassName: string): TObject; - procedure DeleteChild(const AObjectName: string; AObject: TObject); - procedure GetChildren(AChildren: TStringList); - // IcxStoredObject - function GetObjectName: string; - function GetProperties(AProperties: TStrings): Boolean; - procedure GetPropertyValue(const AName: string; var AValue: Variant); - procedure SetPropertyValue(const AName: string; const AValue: Variant); - - function GetPropertiesStore: TcxCustomPropertiesStore; - public - constructor Create(Collection: TCollection); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure RestoreFrom(AStorage: TcxStorage; AReader: TcxCustomReader); - procedure RestoreFromIniFile(const AStorageName: string); - procedure RestoreFromRegistry(const AStorageName: string); - procedure RestoreFromStream(const AStream: TStream); - procedure StoreTo(AStorage: TcxStorage; AWriter: TcxCustomWriter); - procedure StoreToIniFile(const AStorageName: string; const AReCreate: Boolean); - procedure StoreToRegistry(const AStorageName: string; const AReCreate: Boolean); - procedure StoreToStream(const AStream: TStream; const AReCreate: Boolean); - published - property Component: TComponent read FComponent write SetComponent; - property Properties: TStrings read FProperties write SetProperties; - end; - - { TcxPropertiesStoreComponents } - TcxPropertiesStoreComponents = class(TOwnedCollection) - private - function GetComponentItem(Index: Integer): TcxPropertiesStoreComponent; - procedure SetComponentItem(Index: Integer; - const Value: TcxPropertiesStoreComponent); - protected - function GetPropertiesStore: TcxCustomPropertiesStore; - procedure RemoveComponent(const AComponent: TComponent); - public - property ComponentItems[Index: Integer]: TcxPropertiesStoreComponent read - GetComponentItem write SetComponentItem; default; - end; - - { TcxCustomPropertiesStore } - TcxCustomPropertiesStore = class(TComponent) - private - FActive: Boolean; - FComponents: TcxPropertiesStoreComponents; - FStorageName: string; - FStorageStream: TStream; - FStorageType: TcxStorageType; - FOnCreateHandler: TNotifyEvent; - FOnDestroyHandler: TNotifyEvent; - - function GetStorageName: string; - procedure SetComponents(const Value: TcxPropertiesStoreComponents); - protected - procedure Loaded; override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure OwnerCreate(Sender: TObject); - procedure OwnerDestroy(Sender: TObject); - function CreateReader: TcxCustomReader; - function CreateWriter(AReCreate: Boolean = True): TcxCustomWriter; - function CreateStorage: TcxStorage; - - property Active: Boolean read FActive write FActive default True; - property Components: TcxPropertiesStoreComponents read FComponents write SetComponents; - property StorageName: string read GetStorageName write FStorageName; - property StorageType: TcxStorageType read FStorageType write FStorageType default stIniFile; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - procedure RestoreFrom; - procedure StoreTo(const AReCreate: Boolean = True); - - property StorageStream: TStream read FStorageStream write FStorageStream; - end; - - { TcxPropertiesStore } - TcxPropertiesStore = class(TcxCustomPropertiesStore) - published - property Active; - property Components; - property StorageName; - property StorageType; - end; - -implementation - -{ TcxPropertiesStoreComponent } - -constructor TcxPropertiesStoreComponent.Create(Collection: TCollection); -begin - inherited Create(Collection); - FProperties := TStringList.Create; - FPropertiesEx := TStringList.Create; -end; - -destructor TcxPropertiesStoreComponent.Destroy; -begin - FPropertiesEx.Free; - FProperties.Free; - inherited Destroy; -end; - -procedure TcxPropertiesStoreComponent.Assign(Source: TPersistent); -begin - if Source is TcxPropertiesStoreComponent then - with TcxPropertiesStoreComponent(Source) do - begin - Self.Component := Component; - Self.Properties := Properties; - end - else - inherited; -end; - -procedure TcxPropertiesStoreComponent.RestoreFrom(AStorage: TcxStorage; AReader: TcxCustomReader); -begin - ExtractProperties; - with AStorage do - begin - AssignStorageProperties(AStorage); - RestoreWithExistingReader(Self, AReader); - end; -end; - -procedure TcxPropertiesStoreComponent.RestoreFromIniFile(const AStorageName: string); -var - AStorage: TcxStorage; -begin - ExtractProperties; - AStorage := TcxStorage.Create(AStorageName); - try - AssignStorageProperties(AStorage); - AStorage.RestoreFromIni(Self); - finally - AStorage.Free; - end; -end; - -procedure TcxPropertiesStoreComponent.RestoreFromRegistry(const AStorageName: string); -var - AStorage: TcxStorage; -begin - ExtractProperties; - AStorage := TcxStorage.Create(AStorageName); - try - AssignStorageProperties(AStorage); - AStorage.RestoreFromRegistry(Self); - finally - AStorage.Free; - end; -end; - -procedure TcxPropertiesStoreComponent.RestoreFromStream(const AStream: TStream); -var - AStorage: TcxStorage; -begin - ExtractProperties; - AStorage := TcxStorage.Create(AStream); - try - AssignStorageProperties(AStorage); - AStorage.RestoreFromStream(Self); - finally - AStorage.Free; - end; -end; - -procedure TcxPropertiesStoreComponent.StoreTo(AStorage: TcxStorage; AWriter: TcxCustomWriter); -begin - ExtractProperties; - with AStorage do - begin - AssignStorageProperties(AStorage); - ReCreate := AWriter.ReCreate; - StoreWithExistingWriter(Self, AWriter); - end; -end; - -procedure TcxPropertiesStoreComponent.StoreToIniFile(const AStorageName: string; const AReCreate: Boolean); -var - AStorage: TcxStorage; -begin - ExtractProperties; - AStorage := TcxStorage.Create(AStorageName); - try - AssignStorageProperties(AStorage); - AStorage.ReCreate := AReCreate; - AStorage.StoreToIni(Self); - finally - AStorage.Free; - end; -end; - -procedure TcxPropertiesStoreComponent.StoreToRegistry(const AStorageName: string; const AReCreate: Boolean); -var - AStorage: TcxStorage; -begin - ExtractProperties; - AStorage := TcxStorage.Create(AStorageName); - try - AssignStorageProperties(AStorage); - AStorage.ReCreate := AReCreate; - AStorage.StoreToRegistry(Self); - finally - AStorage.Free; - end; -end; - -procedure TcxPropertiesStoreComponent.StoreToStream(const AStream: TStream; const AReCreate: Boolean); -var - AStorage: TcxStorage; -begin - ExtractProperties; - AStorage := TcxStorage.Create(AStream); - try - AssignStorageProperties(AStorage); - AStorage.ReCreate := AReCreate; - AStorage.StoreToStream(Self); - finally - AStorage.Free; - end; -end; - -function TcxPropertiesStoreComponent.CreateChild(const AObjectName, - AClassName: string): TObject; -begin - Result := nil; -end; - -procedure TcxPropertiesStoreComponent.DeleteChild(const AObjectName: string; AObject: TObject); -begin - if AObject is TCollectionItem then - AObject.Free; -end; - -procedure TcxPropertiesStoreComponent.GetChildren(AChildren: TStringList); -var - ATypeInfo: PTypeInfo; - APropInfo: PPropInfo; - I: Integer; - APersistent: TPersistent; - APropName: string; - AChild: TObject; -begin - AChildren.Clear; - for I := 0 to FProperties.Count - 1 do - begin - APersistent := GetPersistentAndPropertyName(FProperties[I], APropName); - if (APersistent <> nil) and (APropName <> '') then - begin - ATypeInfo := APersistent.ClassInfo; - APropInfo := GetPropInfo(ATypeInfo, APropName); - if APropInfo <> nil then - begin - if APropInfo^.PropType^.Kind = tkClass then - begin - AChild := GetObjectProp(APersistent, APropInfo); - if (AChild is TPersistent) and not (AChild is TComponent) then - AChildren.AddObject(FProperties[I]{APropName}, AChild); - end; - end - else - begin - if APersistent is TCollection then - begin - AChild := GetCollectionItemByName(APersistent as TCollection, APropName); - if AChild <> nil then - AChildren.AddObject(FProperties[I]{APropName}, AChild); - end; - end; - end; - end; -end; - -function TcxPropertiesStoreComponent.GetObjectName: string; -begin - if FComponent <> nil then - Result := FComponent.Name - else - Result := ''; - if Result = '' then - Result := 'Component' + IntToStr(Index); -end; - -function TcxPropertiesStoreComponent.GetProperties( - AProperties: TStrings): Boolean; -var - I: Integer; -begin - for I := 0 to FProperties.Count - 1 do - AProperties.Add(FProperties[I]); - Result := True; -end; - -procedure TcxPropertiesStoreComponent.GetPropertyValue(const AName: string; - var AValue: Variant); -begin - if FComponent <> nil then - InternalGetPropertyValue(AName, AValue) - else - AValue := Null; -end; - -procedure TcxPropertiesStoreComponent.SetPropertyValue(const AName: string; - const AValue: Variant); -begin - if FComponent <> nil then - InternalSetPropertyValue(AName, AValue); -end; - -function TcxPropertiesStoreComponent.GetPropertiesStore: TcxCustomPropertiesStore; -begin - Result := TcxPropertiesStoreComponents(Collection).GetPropertiesStore; -end; - -procedure TcxPropertiesStoreComponent.ExtractProperties; -var - I: Integer; - APersistent: TPersistent; - AName: string; -begin - FPropertiesEx.Clear; - for I := 0 to FProperties.Count - 1 do - begin - APersistent := ExtractPersistentAndPropertyName(FComponent, FProperties[I], AName); - FPropertiesEx.AddObject(AName, APersistent); - end; -end; - -function TcxPropertiesStoreComponent.ExtractPersistentAndPropertyName( - AStartPersistent: TPersistent; const AStartName: string; - var AResultName: string): TPersistent; - - function ExtractName(var AFName: string): string; - var - AIndex: Integer; - begin - Result := ''; - AIndex := Pos('.', AFName); - if AIndex > 0 then - begin - if AIndex > 1 then - Result := Copy(AFName, 1, AIndex - 1); - Delete(AFName, 1, AIndex); - end - else - begin - Result := AFName; - AFName := ''; - end; - end; - - function GetPersistentByName(const AName: string): TPersistent; - var - ATypeInfo: PTypeInfo; - APropInfo: PPropInfo; - AObject: TObject; - begin - Result := nil; - ATypeInfo := AStartPersistent.ClassInfo; - APropInfo := GetPropInfo(ATypeInfo, AName); - if APropInfo <> nil then - begin - if APropInfo^.PropType^.Kind = tkClass then - begin - AObject := GetObjectProp(AStartPersistent, APropInfo); - if (AObject is TPersistent) and not (AObject is TComponent)then - Result := AObject as TPersistent; - end; - end - else - if AStartPersistent is TCollection then - Result := GetCollectionItemByName(AStartPersistent as TCollection, AName); - end; -var - AFullName: string; - APersistent: TPersistent; -begin - Result := nil; - AFullName := AStartName; - AResultName := ExtractName(AFullName); - if AResultName <> '' then - begin - if AFullName = '' then - Result := AStartPersistent - else - begin - APersistent := GetPersistentByName(AResultName); - if APersistent <> nil then - Result := ExtractPersistentAndPropertyName(APersistent, AFullName, AResultName); - end; - end; -end; - -function TcxPropertiesStoreComponent.GetCollectionItemByName(ACollection: TCollection; - const AName: string): TCollectionItem; -var - AInteger: Integer; - ACode: Integer; -begin - Result := nil; - Val(AName, AInteger, ACode); - if ACode = 0 then - if (AInteger >= 0) and (AInteger < ACollection.Count) then - Result := ACollection.Items[AInteger]; -end; - -function TcxPropertiesStoreComponent.GetPersistentAndPropertyName( - const AStartName: string; var AResultName: string): TPersistent; - - function GetPropIndex: Integer; - var - I: Integer; - begin - Result := -1; - for I := 0 to FProperties.Count - 1 do - if FProperties[I] = AStartName then - begin - Result := I; - Break; - end; - end; -var - AIndex: Integer; -begin - Result := nil; - AResultName := ''; - AIndex := GetPropIndex; - if (AIndex >= 0) and (AIndex < FProperties.Count) then - if FPropertiesEx.Objects[AIndex] <> nil then - begin - Result := FPropertiesEx.Objects[AIndex] as TPersistent; - AResultName := FPropertiesEx[AIndex]; - end; -end; - -function TcxPropertiesStoreComponent.GetStorageModes: TcxStorageModes; -begin - Result := [smChildrenCreating, smChildrenDeleting]; -end; - -function TcxPropertiesStoreComponent.GetComponentByName(const AName: string): TComponent; -var - AComponent: TComponent; -begin - Result := nil; - AComponent := GetPropertiesStore.GetParentComponent; - if AComponent <> nil then - Result := AComponent.FindComponent(AName); - if Result = nil then - begin - AComponent := GetPropertiesStore.Owner; - if AComponent <> nil then - Result := AComponent.FindComponent(AName); - end; -end; - -function TcxPropertiesStoreComponent.GetUseInterfaceOnly: Boolean; -begin - Result := True; -end; - -procedure TcxPropertiesStoreComponent.InternalGetPropertyValue(const AName: string; - var AValue: Variant); -var - APersistent: TPersistent; - ATypeInfo: PTypeInfo; - APropInfo: PPropInfo; - APropName: string; - AObject: TObject; -begin - AValue := Null; - APersistent := GetPersistentAndPropertyName(AName, APropName); - if (APersistent <> nil) and (APropName <> '') then - begin - ATypeInfo := APersistent.ClassInfo; - if ATypeInfo <> nil then - begin - APropInfo := GetPropInfo(ATypeInfo, APropName); - if APropInfo <> nil then - begin - case APropInfo^.PropType^.Kind of - tkInteger, tkChar, tkWChar: - AValue := GetOrdProp(APersistent, APropInfo); - tkEnumeration: - AValue := GetEnumProp(APersistent, APropInfo); - tkFloat: - AValue := GetFloatProp(APersistent, APropInfo); - tkString, tkLString: - AValue := GetStrProp(APersistent, APropInfo); - {$IFDEF DELPHI6} - tkWString: - AValue := GetWideStrProp(APersistent, APropInfo); - {$IFDEF DELPHI12} - tkUString: - AValue := GetUnicodeStrProp(APersistent, APropInfo); - {$ENDIF} - tkInt64: - AValue := GetInt64Prop(APersistent, APropInfo); - {$ENDIF} - tkSet: - AValue := GetSetProp(APersistent, APropInfo, True); - tkVariant: - AValue := GetVariantProp(APersistent, APropInfo); - tkClass: - begin - AObject := GetObjectProp(APersistent, APropInfo); - if AObject = nil then - AValue := '' - else if AObject is TComponent then - AValue := TComponent(AObject).Name; - end; - end; - end; - end; - end; -end; - -procedure TcxPropertiesStoreComponent.InternalSetPropertyValue(const AName: string; - const AValue: Variant); -var - ATypeInfo: PTypeInfo; - APropInfo: PPropInfo; - {$IFDEF DELPHI6} - AInt64: Int64; - {$ENDIF} - APersistent: TPersistent; - APropName: string; - AComponent: TComponent; - AParentComponent: TComponent; - AOwner: TComponent; - AComponentName: string; -begin - if not VarIsNull(AValue) then - begin - APersistent := GetPersistentAndPropertyName(AName, APropName); - if (APersistent <> nil) and (APropName <> '') then - begin - ATypeInfo := APersistent.ClassInfo; - if ATypeInfo <> nil then - begin - APropInfo := GetPropInfo(ATypeInfo, APropName); - if APropInfo <> nil then - begin - case APropInfo^.PropType^.Kind of - tkInteger, tkChar, tkWChar: - SetOrdProp(APersistent, APropInfo, AValue); - tkEnumeration: - {$IFDEF DELPHI6} - SetEnumProp(APersistent, APropInfo, AValue); - {$ELSE} - SetEnumProp(APersistent, APropName, VarToStr(AValue)); - {$ENDIF} - tkFloat: - SetFloatProp(APersistent, APropInfo, AValue); - tkString, tkLString: - SetStrProp(APersistent, APropName, VarToStr(AValue)); - {$IFDEF DELPHI6} - tkWString: - SetWideStrProp(APersistent, APropInfo, AValue); - {$IFDEF DELPHI12} - tkUString: - SetUnicodeStrProp(APersistent, APropInfo, AValue); - {$ENDIF} - tkInt64: - begin - AInt64 := AValue; - SetInt64Prop(APersistent, APropInfo, AInt64); - end; - {$ENDIF} - tkSet: - {$IFDEF DELPHI6} - SetSetProp(APersistent, APropInfo, AValue); - {$ELSE} - SetSetProp(APersistent, APropName, VarToStr(AValue)); - {$ENDIF} - tkVariant: - SetVariantProp(APersistent, APropInfo, AValue); - tkClass: - begin - AComponentName := AValue; - if AComponentName = '' then - SetObjectProp(APersistent, APropInfo, nil) - else - begin - AComponent := nil; - if FComponent is TControl then - AComponent := GetParentForm(FComponent as TControl).FindComponent(AComponentName); - if AComponent = nil then - begin - AParentComponent := FComponent.GetParentComponent; - if AParentComponent <> nil then - AComponent := AParentComponent.FindComponent(AComponentName); - if AComponent = nil then - begin - AOwner := FComponent.Owner; - if AOwner <> nil then - AComponent := AOwner.FindComponent(AComponentName); - end; - end; - if AComponent <> nil then - SetObjectProp(APersistent, APropInfo, AComponent); - end; - end; - end; - end; - end; - end; - end; -end; - -procedure TcxPropertiesStoreComponent.SetComponent(const Value: TComponent); -begin - if Component <> Value then - begin - {$IFDEF DELPHI5} - if (Component <> nil) and not (csDestroying in Component.ComponentState) then - Component.RemoveFreeNotification(GetPropertiesStore); - {$ENDIF} - FComponent := Value; - if (Component <> nil) then - Component.FreeNotification(GetPropertiesStore); - end; -end; - -procedure TcxPropertiesStoreComponent.SetProperties(const Value: TStrings); -begin - FProperties.Assign(Value); -end; - -function TcxPropertiesStoreComponent.TestClassProperty(const AName: string; - AObject: TObject): Boolean; -begin - Result := (AObject is TPersistent) and not (AObject is TComponent); -end; - -procedure TcxPropertiesStoreComponent.AssignStorageProperties(AStorage: TcxStorage); -begin - with AStorage do - begin - Modes := [smSavePublishedClassProperties, smChildrenCreating, smChildrenDeleting]; - OnGetStorageModes := GetStorageModes; - OnTestClassProperty := TestClassProperty; - OnGetComponentByName := GetComponentByName; - OnGetUseInterfaceOnly := GetUseInterfaceOnly; - SaveComponentPropertiesByName := True; - end; -end; - -{ TcxPropertiesStoreComponents } - -function TcxPropertiesStoreComponents.GetPropertiesStore: TcxCustomPropertiesStore; -begin - Result := TcxPropertiesStore({$IFDEF DELPHI6}Owner{$ELSE}GetOwner{$ENDIF}); -end; - -procedure TcxPropertiesStoreComponents.RemoveComponent( - const AComponent: TComponent); -var - AList: TList; - I: Integer; -begin - AList := TList.Create; - try - for I := 0 to Count - 1 do - if ComponentItems[I].Component = AComponent then - AList.Add(ComponentItems[I]); - for I := 0 to AList.Count - 1 do - TcxPropertiesStoreComponent(AList[I]).Free; - finally - AList.Free; - end; -end; - -function TcxPropertiesStoreComponents.GetComponentItem( - Index: Integer): TcxPropertiesStoreComponent; -begin - Result := Items[Index] as TcxPropertiesStoreComponent; -end; - -procedure TcxPropertiesStoreComponents.SetComponentItem(Index: Integer; - const Value: TcxPropertiesStoreComponent); -begin - ComponentItems[Index].Assign(Value); -end; - -{ TcxCustomPropertiesStore } - -constructor TcxCustomPropertiesStore.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FComponents := TcxPropertiesStoreComponents.Create(self, TcxPropertiesStoreComponent); - FStorageName := ''; - FStorageType := stIniFile; - FStorageStream := nil; - FActive := True; -end; - -destructor TcxCustomPropertiesStore.Destroy; -begin - FComponents.Free; - inherited Destroy; -end; - -procedure TcxCustomPropertiesStore.RestoreFrom; -var - I: Integer; - AReader: TcxCustomReader; - AStorage: TcxStorage; -begin - AReader := CreateReader; - AStorage := CreateStorage; - try - for I := 0 to Components.Count - 1 do - Components[I].RestoreFrom(AStorage, AReader); - finally - AStorage.Free; - AReader.Free; - end; -end; - -procedure TcxCustomPropertiesStore.StoreTo(const AReCreate: Boolean); -var - I: Integer; - AWriter: TcxCustomWriter; - AStorage: TcxStorage; -begin - AStorage := CreateStorage; - try - if Components.Count > 0 then - begin - AWriter := CreateWriter(AReCreate); - try - Components[0].StoreTo(AStorage, AWriter); - AWriter.ReCreate := False; - for I := 1 to Components.Count - 1 do - Components[I].StoreTo(AStorage, AWriter); - finally - AWriter.Free; - end; - end; - finally - AStorage.Free; - end; -end; - -procedure TcxCustomPropertiesStore.Loaded; -var - AMyOwnerCreate: TNotifyEvent; -begin - inherited Loaded; - if not (csDesigning in ComponentState) then - begin - if Owner <> nil then - begin - AMyOwnerCreate := OwnerCreate; - if Owner is TForm then - begin - FOnCreateHandler := TForm(Owner).OnCreate; - FOnDestroyHandler := TForm(Owner).OnDestroy; - TForm(Owner).OnCreate := OwnerCreate; - TForm(Owner).OnDestroy := OwnerDestroy; - end - else if Owner is TDataModule then - begin - FOnCreateHandler := TDataModule(Owner).OnCreate; - FOnDestroyHandler := TDataModule(Owner).OnDestroy; - TDataModule(Owner).OnCreate := OwnerCreate; - TDataModule(Owner).OnDestroy := OwnerDestroy; - end; - end; - end; -end; - -procedure TcxCustomPropertiesStore.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if Operation = opRemove then - if (AComponent <> Self) and (AComponent <> Owner) then - Components.RemoveComponent(AComponent); -end; - -procedure TcxCustomPropertiesStore.OwnerCreate(Sender: TObject); -begin - if FActive then - RestoreFrom; - if Assigned(FOnCreateHandler) then - FOnCreateHandler(Sender); -end; - -procedure TcxCustomPropertiesStore.OwnerDestroy(Sender: TObject); -begin - if Assigned(FOnDestroyHandler) then - FOnDestroyHandler(Sender); - if FActive then - begin - if StorageType <> stStream then - StoreTo; - end; -end; - -function TcxCustomPropertiesStore.CreateReader: TcxCustomReader; -begin - Result := nil; - case FStorageType of - stIniFile: - Result := TcxIniFileReader.Create(StorageName); - stRegistry: - Result := TcxRegistryReader.Create(StorageName); - stStream: - begin - Result := TcxStreamReader.Create(StorageName); - (Result as TcxStreamReader).SetStream(FStorageStream); - end; - end; -end; - -function TcxCustomPropertiesStore.CreateWriter(AReCreate: Boolean): TcxCustomWriter; -begin - Result := nil; - case FStorageType of - stIniFile: - Result := TcxIniFileWriter.Create(StorageName, AReCreate); - stRegistry: - Result := TcxRegistryWriter.Create(StorageName, AReCreate); - stStream: - begin - Result := TcxStreamWriter.Create(StorageName, AReCreate); - (Result as TcxStreamWriter).SetStream(FStorageStream); - end; - end; -end; - -function TcxCustomPropertiesStore.CreateStorage: TcxStorage; -begin - Result := nil; - case FStorageType of - stIniFile, stRegistry: - Result := TcxStorage.Create(StorageName); - stStream: - Result := TcxStorage.Create(FStorageStream); - end; -end; - -function TcxCustomPropertiesStore.GetStorageName: string; -begin - if FStorageName <> '' then - Result := FStorageName - else - Result := Name; -end; - -procedure TcxCustomPropertiesStore.SetComponents( - const Value: TcxPropertiesStoreComponents); -begin - Components.Assign(Value); -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxPropertiesStoreEditor.dfm b/internal/x.46/ExpressLibrary/Sources/cxPropertiesStoreEditor.dfm deleted file mode 100644 index 2b463aa8..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxPropertiesStoreEditor.dfm +++ /dev/null @@ -1,1113 +0,0 @@ -object frmPropertiesStoreEditor: TfrmPropertiesStoreEditor - Left = 412 - Top = 178 - Width = 393 - Height = 553 - Caption = 'PropertiesStore Editor' - Color = clBtnFace - Constraints.MinHeight = 553 - Constraints.MinWidth = 393 - OldCreateOrder = False - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlClient: TPanel - Left = 0 - Top = 33 - Width = 385 - Height = 486 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object pnlLeftTree: TPanel - Left = 0 - Top = 0 - Width = 272 - Height = 486 - Align = alClient - BevelOuter = bvNone - BorderWidth = 4 - TabOrder = 0 - object pnlLeftTreeTop: TPanel - Left = 4 - Top = 4 - Width = 264 - Height = 29 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblFindComponent: TLabel - Left = 7 - Top = 6 - Width = 80 - Height = 13 - Caption = 'Find Component:' - end - object edFindComponent: TEdit - Left = 96 - Top = 4 - Width = 165 - Height = 21 - TabOrder = 0 - OnKeyDown = edFindComponentKeyDown - end - end - object Tree: TTreeView - Left = 4 - Top = 33 - Width = 264 - Height = 449 - Align = alClient - Indent = 19 - ReadOnly = True - RightClickSelect = True - TabOrder = 0 - OnContextPopup = TreeContextPopup - OnCustomDrawItem = TreeCustomDrawItem - OnDeletion = TreeDeletion - OnKeyDown = TreeKeyDown - end - end - object pnlButtons: TPanel - Left = 272 - Top = 0 - Width = 113 - Height = 486 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object Panel1: TPanel - Left = 0 - Top = 348 - Width = 113 - Height = 138 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - end - object Panel2: TPanel - Left = 0 - Top = 0 - Width = 113 - Height = 348 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object btnOK: TButton - Left = 4 - Top = 32 - Width = 105 - Height = 25 - Caption = 'OK' - TabOrder = 0 - OnClick = btnOKClick - end - object btnCancel: TButton - Left = 4 - Top = 64 - Width = 105 - Height = 25 - Caption = 'Cancel' - TabOrder = 1 - OnClick = btnCancelClick - end - end - end - end - object ToolBar: TToolBar - Left = 0 - Top = 0 - Width = 385 - Height = 33 - ButtonHeight = 30 - ButtonWidth = 31 - Caption = 'ToolBar' - Flat = True - Images = ImageList1 - TabOrder = 1 - object btnGroupByComponents: TToolButton - Left = 0 - Top = 0 - Hint = 'Group by components' - Action = actGroupByComponents - ImageIndex = 0 - ParentShowHint = False - ShowHint = True - end - object btnGroupByProperties: TToolButton - Left = 31 - Top = 0 - Hint = 'Group by properties' - Action = actGroupByProperties - ImageIndex = 1 - ParentShowHint = False - ShowHint = True - end - object ToolButton3: TToolButton - Left = 62 - Top = 0 - Width = 8 - Caption = 'ToolButton3' - ImageIndex = 2 - Style = tbsSeparator - end - object btnReset: TToolButton - Left = 70 - Top = 0 - Hint = 'Reset' - Caption = 'btnReset' - ImageIndex = 2 - ParentShowHint = False - ShowHint = True - OnClick = btnResetClick - end - object btnCheckAll: TToolButton - Left = 101 - Top = 0 - Hint = 'Check all' - Caption = 'btnCheckAll' - ImageIndex = 3 - ParentShowHint = False - ShowHint = True - OnClick = btnCheckAllClick - end - object btnUncheckAll: TToolButton - Left = 132 - Top = 0 - Hint = 'Uncheck all' - Caption = 'btnUncheckAll' - ImageIndex = 4 - ParentShowHint = False - ShowHint = True - OnClick = btnUncheckAllClick - end - object btnInvertChecking: TToolButton - Left = 163 - Top = 0 - Hint = 'Invert checking' - Caption = 'btnInvertChecking' - ImageIndex = 5 - ParentShowHint = False - ShowHint = True - OnClick = btnInvertCheckingClick - end - end - object ActionList1: TActionList - Left = 356 - Top = 4 - object actGroupByComponents: TAction - Caption = 'GroupByComponents' - OnExecute = actGroupByComponentsExecute - end - object actGroupByProperties: TAction - Caption = 'GroupByProperties' - OnExecute = actGroupByPropertiesExecute - end - end - object ImageList1: TImageList - Height = 24 - Width = 24 - Left = 324 - Top = 4 - Bitmap = { - 494C010106000900040018001800FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 000000000000360000002800000060000000480000000100200000000000006C - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF0000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 00008000000080000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000008080800000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 00008000000080000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF0000000000000080808000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FFFFFF00FF0000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FFFFFF00FF000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF0000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000808080000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 00000080000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000008000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000080 - 00000080000000800000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000080 - 0000008000000080000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000000000000000000000000000008000000080 - 00000080000000800000008000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000000000000000000000000000008000000080 - 0000008000000080000000800000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FFFFFF00FF00000000000000000000000000000000000000000000000000 - 00000080000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FFFFFF00FF00000000000000000000000000000000000000000000000000 - 0000008000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000008000000000000000000000000000000080 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000008000000000000000000000000000000080 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800000000000000000000080000000800000008000000000 - 0000000000000000000000000000000000008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800000000000000000000080000000800000008000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FF0000000000000000000000000000000000 - 00000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000FF0000000000000000000000000000000000 - 0000FFFFFF0000000000FFFFFF000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FF000000FF00000000000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 000080000000800000008000000080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000FF000000FF00000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C0C0 - C00000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000FF000000FF000000FF000000FF000000FF000000FF000000000000000000 - 0000FFFFFF0000000000FFFFFF000000000000000000FFFFFF0000000000C0C0 - C00000000000000000000000000000000000000000000000000000000000FF00 - 0000000000000000000000000000FF000000FF00000000000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000FF0000000000000000000000FF000000FF00000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C0C0 - C00000000000808080000000000000000000000000000000000000000000FF00 - 0000000000000000000000000000FF0000000000000000000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000FF0000000000000000000000FF0000000000000000000000000000000000 - 0000FFFFFF00FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000C0C0 - C00000000000808080000000000000000000000000000000000000000000FF00 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000C0C0C000C0C0 - C000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 00008000000080000000FFFFFF00000000000000000000000000000000000000 - 0000FF0000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000FFFFFF0000000000FFFFFF000000000000000000C0C0 - C00080000000808080000000000000000000000000000000000000000000FF00 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000800000C0C0C000C0C0C00000800000008000000080 - 00000080000000800000C0C0C000C0C0C0000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080000000FFFFFF00000000000000000000000000000000000000 - 0000FF0000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF0000000000FFFFFF00FFFFFF000000 - 0000800000008000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C0C0C000C0C0C000C0C0C000C0C0C0000000 - 0000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000800000008000000080000000800000008000000000 - 0000000000000000000000800000C0C0C000C0C0C00000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 00008000000080000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000C0C0C00000000000FFFFFF00FFFFFF00FFFFFF000000 - 0000800000008000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000800000008000000080000000800000000000000000 - 0000000000000000000000000000008000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000800000008000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000800000008000000080000000800000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF008000 - 000080000000800000008000000080000000800000008000000080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 00000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000008080800080808000808080008080 - 8000808080008080800000000000000000000000000000000000FFFFFF000000 - 000000000000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000800000008000000080000000800000008000000000 - 00000000000000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C0000000000000000000000000000000000080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000000000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080000000800000008000000080000000800000C0C0C000C0C0 - C0000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF0000000000000000000000000000000000000000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 000000000000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000800000008000000080000000800000C0C0C000C0C0 - C0000000000000000000000000000000000080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FFFFFF00FF00000000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000080000000000000000000000000 - 0000000000000000000000800000008000000080000000800000C0C0C0000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF00000000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000800000000000000000 - 0000000000000080000000800000008000000080000000800000C0C0C0000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 800080808000808080008080800000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF0000000000FFFFFF0000000000FFFFFF0000000000FFFFFF00000000000000 - 0000000000008000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008000000080 - 0000008000000080000000800000C0C0C0000000000000800000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 000000800000000000000000000000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFF - FF00000000008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000080 - 00000080000000800000000000000000000000000000000000000000000000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000000000000000000000000000008000000080 - 00000080000000800000008000000000000000000000000000000000000000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FFFFFF00FF00000000000000000000000000000000000000000000000000 - 0000008000000000000000000000000000000000000000000000000000000000 - 00000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000008000000000000000000000000000000080 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800000000000000000000080000000800000008000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000060000000480000000100010000000000600300000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFF000000000000FF8000FF - 8000000000000000FF8000FF8000000000000000FF8000FF8000000000000000 - FF8000FF8000000000000000FF8000FF8000000000000000FF8000FF80000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000001F700 - 01F70000000000000001E30001E30000000000000001C10001C1000000000000 - 0001F70001F70000000000000000EF0000EF00000000000000011F00011F0000 - 00000000FFFFFFFFFFFF000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFE01FFF - F87FFFFFFFFF8000FFE01FFEF03FFFFFFFFF8000FEE007FE601FFFFFFFFF8000 - FE6007E0200FFFFFFFFF8000F02001EE6007FFFFFFFF8000F66001EEE003FFFF - FFFF8000F6E001EFF001FFC1FF000000F7E001EFF801FC00FF000000F7E001FF - FC01FC1C7F000000FFF801800E01FC3EFF000000F87801800F03FC3FFF000000 - E01E01800F87FC1C0F000000C00E01800FFFFFF80F000000C00FFF800FFFFFFC - 0F0000008007FF800FFFFF7C1F0000008007FF800FFFFFB81F0000008007FF80 - 0BFFFFC0BF0001F78007FF8001FFFFFFFF0001E3C00FFF8001FFFFFFFF0001C1 - C00FFFFE01FFFFFFFF0001F7E01FFFFF09FFFFFFFF0000EFF87FFFFFFFFFFFFF - FF00011FFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressLibrary/Sources/cxPropertiesStoreEditor.pas b/internal/x.46/ExpressLibrary/Sources/cxPropertiesStoreEditor.pas deleted file mode 100644 index fbeb2aa9..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxPropertiesStoreEditor.pas +++ /dev/null @@ -1,1001 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxPropertiesStoreEditor; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - ComCtrls, ToolWin, ExtCtrls, StdCtrls, cxPropertiesStore, cxStorage, ActnList, -{$IFDEF DELPHI6} - DesignIntf, -{$ELSE} - DsgnIntf, -{$ENDIF} - cxControls, ImgList, cxDesignWindows; - -type - TfrmPropertiesStoreFilter = (psfNone, psfStored, psfUnStored); - TfrmPropertiesStoreGrouping = (psgComponents, psgProperties); - - PfrmPropertiesStoreRecord = ^TfrmPropertiesStoreRecord; - TfrmPropertiesStoreRecord = record - Persistent: TPersistent; - PropertyName: string; - Stored: Boolean; - end; - - TfrmPropertiesStoreEditor = class(TForm) - pnlClient: TPanel; - ToolBar: TToolBar; - pnlLeftTree: TPanel; - pnlLeftTreeTop: TPanel; - Tree: TTreeView; - pnlButtons: TPanel; - lblFindComponent: TLabel; - edFindComponent: TEdit; - btnGroupByComponents: TToolButton; - btnGroupByProperties: TToolButton; - ToolButton3: TToolButton; - btnReset: TToolButton; - btnCheckAll: TToolButton; - btnUncheckAll: TToolButton; - ActionList1: TActionList; - actGroupByComponents: TAction; - actGroupByProperties: TAction; - Panel1: TPanel; - Panel2: TPanel; - btnOK: TButton; - btnCancel: TButton; - btnInvertChecking: TToolButton; - ImageList1: TImageList; - procedure TreeDeletion(Sender: TObject; Node: TTreeNode); - procedure TreeCustomDrawItem(Sender: TCustomTreeView; Node: TTreeNode; - State: TCustomDrawState; var DefaultDraw: Boolean); - procedure FormCreate(Sender: TObject); - procedure actGroupByComponentsExecute(Sender: TObject); - procedure actGroupByPropertiesExecute(Sender: TObject); - procedure btnOKClick(Sender: TObject); - procedure btnCancelClick(Sender: TObject); - procedure TreeKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure btnCheckAllClick(Sender: TObject); - procedure btnUncheckAllClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure btnResetClick(Sender: TObject); - procedure btnInvertCheckingClick(Sender: TObject); - procedure edFindComponentKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure TreeContextPopup(Sender: TObject; MousePos: TPoint; - var Handled: Boolean); - private - FFilter: TfrmPropertiesStoreFilter; - FGrouping: TfrmPropertiesStoreGrouping; - FPropertiesStore: TcxPropertiesStore; - FOwnerComponent: TComponent; - FDesigner: IDesigner; - procedure SetOwnerComponent(const Value: TComponent); - procedure SetFilter(const Value: TfrmPropertiesStoreFilter); - procedure SetGrouping(const Value: TfrmPropertiesStoreGrouping); - procedure SetFindText; - procedure ChangeCheckState(ANode: TTreeNode); - procedure CheckNode(ANode: TTreeNode; AWithChildren: Boolean = True; AWithParents: Boolean = True); - procedure UncheckNode(ANode: TTreeNode; AWithChildren: Boolean = True; AWithParents: Boolean = True); - procedure InvertCheck; - procedure LoadFromPropertiesStore(APropertiesStore: TcxPropertiesStore); - procedure SaveToPropertiesStore(APropertiesStore: TcxPropertiesStore); - function IsNodeChecked(ANode: TTreeNode): Boolean; - function IsNodeFullChecked(ANode: TTreeNode): Boolean; - procedure BeginUpdate; - procedure EndUpdate; - function FindNode(const AText: string): TTreeNode; - procedure Reset; - procedure CheckAll; - procedure UncheckAll; - procedure InvertChecking; - protected - procedure RefreshTree; - public - property Filter: TfrmPropertiesStoreFilter read FFilter write SetFilter; - property Grouping: TfrmPropertiesStoreGrouping read FGrouping write SetGrouping; - property OwnerComponent: TComponent read FOwnerComponent write SetOwnerComponent; - property PropertiesStore: TcxPropertiesStore read FPropertiesStore write FPropertiesStore; - Property Designer: IDesigner read FDesigner write FDesigner; - end; - -const - scxFindComponent = 'Find Component:'; - scxFindProperty = 'Find Property:'; - -procedure ShowPropertiesStoreEditor(APropertiesStore: TcxPropertiesStore; - AOwnerComponent: TComponent; ADesigner: IDesigner); - -implementation - -{$R *.dfm} - -uses - TypInfo, cxClasses, dxCore; - -procedure ShowPropertiesStoreEditor(APropertiesStore: TcxPropertiesStore; - AOwnerComponent: TComponent; ADesigner: IDesigner); -var - AForm: TfrmPropertiesStoreEditor; -begin - AForm := TfrmPropertiesStoreEditor.Create(nil); - {$IFDEF DELPHI9} - AForm.PopupMode := pmAuto; - {$ENDIF} - AForm.OwnerComponent := AOwnerComponent; - AForm.PropertiesStore := APropertiesStore; - AForm.Designer := ADesigner; - try - AForm.ShowModal; - finally - AForm.Free; - end; -end; - -{ TfrmPropertiesStoreEditor } - -procedure TfrmPropertiesStoreEditor.RefreshTree; -var - ANullLevelNodeList: TList; - - function AddPropertyNode(const APropertyName: string; AParentNode: TTreeNode = nil): TTreeNode; - var - I: Integer; - ANode: TTreeNode; - AUpperCasePropertyName: string; - AData: PfrmPropertiesStoreRecord; - begin - Result := nil; - AUpperCasePropertyName := UpperCase(APropertyName); - for I := 0 to ANullLevelNodeList.Count - 1 do - begin - ANode := TTreeNode(ANullLevelNodeList[I]); - if UpperCase(ANode.Text) = AUpperCasePropertyName then - begin - Result := ANode; - Break; - end; - end; - if Result = nil then - begin - Result := Tree.Items.AddChild(nil, APropertyName); - New(AData); - Result.Data := AData; - AData.Stored := False; - ANullLevelNodeList.Add(Result); - end; - end; - - procedure AddPersistent(APersistent: TPersistent; const AName: string; - AParentNode: TTreeNode = nil; APersistentObject: TPersistent = nil); - var - APersistentNode, ANode: TTreeNode; - APropList: PPropList; - APropCount, I: Integer; - AData: PfrmPropertiesStoreRecord; - AObject: TObject; - begin - {$IFDEF DELPHI6} - APropCount := GetPropList(APersistent, APropList); - {$ELSE} - APropCount := GetTypeData(PTypeInfo(APersistent.ClassInfo))^.PropCount; - GetMem(APropList, APropCount * SizeOf(Pointer)); - GetPropInfos(PTypeInfo(APersistent.ClassInfo), APropList); - {$ENDIF} - try - if Grouping = psgComponents then - begin - APersistentNode := Tree.Items.AddChild(AParentNode, AName); - New(AData); - APersistentNode.Data := AData; - if APersistentObject = nil then - AData.Persistent := APersistent - else - AData.Persistent := APersistentObject; - AData.PropertyName := ''; - AData.Stored := False; -// if APersistent is TCollection then -// with TCollection(APersistent) do -// for I := 0 to Count - 1 do -// AddPersistent(Items[I], IntToStr(I), APersistentNode); - for I := 0 to APropCount - 1 do - if APropList[I].PropType^.Kind <> tkMethod then - begin - if APropList[I].PropType^.Kind = tkClass then - begin - AObject := GetObjectProp(APersistent, APropList[I]); - if (AObject is TPersistent) and not (AObject is TComponent) then - begin - AddPersistent(AObject as TPersistent, dxShortStringToString(APropList[I].Name), - APersistentNode); - Continue; - end; - end; - ANode := Tree.Items.AddChild(APersistentNode, dxShortStringToString(APropList[I].Name)); - New(AData); - ANode.Data := AData; - AData.Persistent := APersistent; - AData.PropertyName := dxShortStringToString(APropList[I].Name); - AData.Stored := False; - end - end - else if Grouping = psgProperties then - begin - for I := 0 to APropCount - 1 do - if APropList[I].PropType^.Kind <> tkMethod then - begin - ANode := AddPropertyNode(dxShortStringToString(APropList[I].Name)); - if APropList[I].PropType^.Kind = tkClass then - begin - AObject := GetObjectProp(APersistent, APropList[I]); - if (AObject is TPersistent) and not (AObject is TComponent) then - begin - FGrouping := psgComponents; - try - AddPersistent(AObject as TPersistent, AName, ANode, APersistent); - finally - FGrouping := psgProperties; - end; - Continue; - end; - end; - APersistentNode := Tree.Items.AddChild(ANode, AName); - New(AData); - APersistentNode.Data := AData; - AData.Persistent := APersistent; - AData.PropertyName := dxShortStringToString(APropList[I].Name); - AData.Stored := False; - end; - end; - finally - if APropCount > 0 then - {$IFNDEF DELPHI5} - FreeMem(APropList, APropCount * SizeOf(Pointer)); - {$ELSE} - FreeMem(APropList); - {$ENDIF} - end; - end; - -var - I: Integer; -begin - Tree.Items.Clear; - ANullLevelNodeList := TList.Create; - try - Tree.SortType := stNone; - if FOwnerComponent <> nil then - begin - AddPersistent(FOwnerComponent, FOwnerComponent.Name); - for I := 0 to FOwnerComponent.ComponentCount - 1 do - AddPersistent(FOwnerComponent.Components[I], FOwnerComponent.Components[I].Name); - end; - Tree.SortType := stText; - finally - ANullLevelNodeList.Free; - end; -end; - -procedure TfrmPropertiesStoreEditor.SetFilter( - const Value: TfrmPropertiesStoreFilter); -begin - if Filter <> Value then - begin - FFilter := Value; - RefreshTree; - end; -end; - -procedure TfrmPropertiesStoreEditor.SetGrouping( - const Value: TfrmPropertiesStoreGrouping); -var - APropertiesStore: TcxPropertiesStore; - ALastValue: TfrmPropertiesStoreGrouping; -begin - if Grouping <> Value then - begin - APropertiesStore := TcxPropertiesStore.Create(nil); - try - SaveToPropertiesStore(APropertiesStore); - ALastValue := FGrouping; - FGrouping := Value; - try - RefreshTree; - LoadFromPropertiesStore(APropertiesStore); - SetFindText; - except - FGrouping := ALastValue; - raise; - end; - finally - APropertiesStore.Free; - end; - end; -end; - -procedure TfrmPropertiesStoreEditor.ChangeCheckState(ANode: TTreeNode); -begin - if ANode.Data <> nil then - begin - if PfrmPropertiesStoreRecord(ANode.Data)^.Stored then - UnCheckNode(ANode) - else - CheckNode(ANode); - end; -end; - -procedure TfrmPropertiesStoreEditor.CheckNode(ANode: TTreeNode; - AWithChildren: Boolean; AWithParents: Boolean); -var - I: Integer; - AParentNode: TTreeNode; -begin - PfrmPropertiesStoreRecord(ANode.Data)^.Stored := True; - if AWithChildren then - for I := 0 to ANode.Count - 1 do - CheckNode(ANode[I], True, False); - if AWithParents then - begin - AParentNode := ANode.Parent; - if AParentNode <> nil then - CheckNode(AParentNode, False, True); - end; -end; - -procedure TfrmPropertiesStoreEditor.UncheckNode(ANode: TTreeNode; - AWithChildren: Boolean; AWithParents: Boolean); -var - I: Integer; - AParentNode: TTreeNode; - ANeedUncheckParent: Boolean; -begin - PfrmPropertiesStoreRecord(ANode.Data)^.Stored := False; - if AWithChildren then - for I := 0 to ANode.Count - 1 do - UncheckNode(ANode[I], True, False); - if AWithParents then - begin - AParentNode := ANode.Parent; - if AParentNode <> nil then - begin - ANeedUncheckParent := True; - for I := 0 to AParentNode.Count - 1 do - if AParentNode[I].Data <> nil then - if PfrmPropertiesStoreRecord(AParentNode[I].Data)^.Stored then - begin - ANeedUncheckParent := False; - Break; - end; - if ANeedUncheckParent then - UncheckNode(AParentNode, False, True); - end; - end; -end; - -procedure TfrmPropertiesStoreEditor.SetOwnerComponent( - const Value: TComponent); -begin - if FOwnerComponent <> Value then - begin - FOwnerComponent := Value; - try - BeginUpdate; - RefreshTree; - finally - EndUpdate; - end; - end; -end; - -procedure TfrmPropertiesStoreEditor.TreeDeletion(Sender: TObject; - Node: TTreeNode); -begin - if (Node.Data <> nil) then - Dispose(PfrmPropertiesStoreRecord(Node.Data)); -end; - -procedure TfrmPropertiesStoreEditor.TreeCustomDrawItem( - Sender: TCustomTreeView; Node: TTreeNode; State: TCustomDrawState; - var DefaultDraw: Boolean); -begin - with Tree.Canvas do - begin - if Node.Data <> nil then - begin - if PfrmPropertiesStoreRecord(Node.Data)^.Stored then - begin - if Node.Selected and Tree.Focused then - Font.Color := RGB(255, 255, 255) - else - Font.Color := RGB(0, 0, 255); - Font.Style := [fsBold]; - end; - end; - end; -end; - -procedure TfrmPropertiesStoreEditor.FormCreate(Sender: TObject); -begin - FGrouping := psgComponents; -end; - -procedure TfrmPropertiesStoreEditor.actGroupByComponentsExecute( - Sender: TObject); -begin - BeginUpdate; - try - Grouping := psgComponents; - finally - EndUpdate; - end; -end; - -procedure TfrmPropertiesStoreEditor.actGroupByPropertiesExecute( - Sender: TObject); -begin - BeginUpdate; - try - Grouping := psgProperties; - finally - EndUpdate; - end; -end; - -procedure TfrmPropertiesStoreEditor.btnOKClick(Sender: TObject); -begin - SaveToPropertiesStore(nil); - Designer.Modified; - Close; -end; - -procedure TfrmPropertiesStoreEditor.btnCancelClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmPropertiesStoreEditor.TreeKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if TranslateKey(Key) = VK_RETURN then - if Tree.Selected <> nil then - begin - BeginUpdate(); - try - ChangeCheckState(Tree.Selected); - finally - EndUpdate(); - end; - end; -end; - -procedure TfrmPropertiesStoreEditor.btnCheckAllClick(Sender: TObject); -begin - CheckAll; -end; - -procedure TfrmPropertiesStoreEditor.btnUncheckAllClick(Sender: TObject); -begin - UncheckAll; -end; - -procedure TfrmPropertiesStoreEditor.LoadFromPropertiesStore( - APropertiesStore: TcxPropertiesStore); - - function ExtractName(var AName: string): string; - var - AIndex: Integer; - begin - Result := ''; - AIndex := Pos('.', AName); - if AIndex > 0 then - begin - if AIndex > 1 then - Result := Copy(AName, 1, AIndex - 1); - Delete(AName, 1, AIndex); - end - else - begin - Result := AName; - AName := ''; - end; - end; - - function GetPropertyNode(APersistentNode: TTreeNode; const APropertyName: string): TTreeNode; - var - AName: string; - AUpperCaseCurrentName: string; - ACurrentName: string; - I: Integer; - begin - Result := nil; - AName := APropertyName; - ACurrentName := ExtractName(AName); - if ACurrentName <> '' then - begin - AUpperCaseCurrentName := UpperCase(ACurrentName); - for I := 0 to APersistentNode.Count - 1 do - if UpperCase(APersistentNode[I].Text) = AUpperCaseCurrentName then - begin - Result := APersistentNode[I]; - Break; - end; - if Result <> nil then - begin - if AName <> '' then - Result := GetPropertyNode(Result, AName); - end; - end; - end; - - function GetPersistentNode(APersistent: TPersistent): TTreeNode; - var - ANode: TTreeNode; - begin - Result := nil; - ANode := Tree.Items.GetFirstNode; - while ANode <> nil do - begin - if ANode.Data <> nil then - with PfrmPropertiesStoreRecord(ANode.Data)^ do - if (Persistent = APersistent) and (PropertyName = '') then - begin - Result := ANode; - Break; - end; - ANode := ANode.getNextSibling; - end; - end; - - function GetPersistentNodeByProperty(var APropertyName: string; APersistent: TPersistent): TTreeNode; - var - APropertyNode: TTreeNode; - AName: string; - AUpperCaseName: string; - I: Integer; - begin - Result := nil; - if (APropertyName = '') or (APersistent = nil) then - Exit; - AName := ExtractName(APropertyName); - if AName <> '' then - begin - AUpperCaseName := UpperCase(AName); - APropertyNode := Tree.Items.GetFirstNode; - while APropertyNode <> nil do - begin - if AUpperCaseName = UpperCase(APropertyNode.Text) then - for I := 0 to APropertyNode.Count - 1 do - if APropertyNode[I].Data <> nil then - if PfrmPropertiesStoreRecord(APropertyNode[I].Data)^.Persistent = APersistent then - begin - Result := APropertyNode[I]; - Exit; - end; - APropertyNode := APropertyNode.getNextSibling; - end; - end; - end; - -var - APS: TcxPropertiesStore; - I, J: Integer; - APersistentNode: TTreeNode; - APropertyNode: TTreeNode; - APropertyName: string; -begin - if APropertiesStore = nil then - APS := PropertiesStore - else - APS := APropertiesStore; - if APS <> nil then - begin - for I := 0 to APS.Components.Count - 1 do - with APS.Components[I] do - begin - if Grouping = psgComponents then - begin - APersistentNode := GetPersistentNode(Component); - if APersistentNode <> nil then - begin - for J := 0 to Properties.Count - 1 do - begin - APropertyNode := GetPropertyNode(APersistentNode, Properties[J]); - if APropertyNode <> nil then - if APropertyNode.Data <> nil then - CheckNode(APropertyNode); - end; - end; - end - else if Grouping = psgProperties then - begin - for J := 0 to Properties.Count - 1 do - begin - APropertyName := Properties[J]; - APersistentNode := GetPersistentNodeByProperty(APropertyName, Component); - if APersistentNode <> nil then - begin - if APropertyName <> '' then - begin - APropertyNode := GetPropertyNode(APersistentNode, APropertyName); - if APropertyNode <> nil then - CheckNode(APropertyNode); - end - else - CheckNode(APersistentNode); - end; - end; - end; - end; - end; -end; - -procedure TfrmPropertiesStoreEditor.FormShow(Sender: TObject); -begin - LoadFromPropertiesStore(nil); -end; - -procedure TfrmPropertiesStoreEditor.btnResetClick(Sender: TObject); -begin - Reset; -end; - -procedure TfrmPropertiesStoreEditor.SaveToPropertiesStore( - APropertiesStore: TcxPropertiesStore); -var - APS: TcxPropertiesStore; - - procedure SaveComponentProperties(APSC: TcxPropertiesStoreComponent; - ANode: TTreeNode; const AName: string); - var - I: Integer; - begin - for I := 0 to ANode.Count - 1 do - begin - if IsNodeFullChecked(ANode[I]) then - APSC.Properties.Add(AName + '.' + ANode[I].Text) - else - begin - if IsNodeChecked(ANode[I]) then - SaveComponentProperties(APSC, ANode[I], AName + '.' + ANode[I].Text); - end; - end; - end; - - procedure SaveComponent(APersistentNode: TTreeNode); - var - APSC: TcxPropertiesStoreComponent; - APersistent: TPersistent; - I: Integer; - begin - APersistent := PfrmPropertiesStoreRecord(APersistentNode.Data)^.Persistent; - if APersistent is TComponent then - begin - APSC := APS.Components.Add as TcxPropertiesStoreComponent; - APSC.Component := APersistent as TComponent; - for I := 0 to APersistentNode.Count - 1 do - begin - if IsNodeFullChecked(APersistentNode[I]) then - APSC.Properties.Add(APersistentNode[I].Text) - else - begin - if IsNodeChecked(APersistentNode[I]) then - SaveComponentProperties(APSC, APersistentNode[I], APersistentNode[I].Text); - end; - end; - end; - end; - - function GetPropertiesStoreComponent(AComponent: TComponent): TcxPropertiesStoreComponent; - var - I: Integer; - begin - Result := nil; - for I := 0 to APS.Components.Count - 1 do - if APS.Components[I].Component = AComponent then - begin - Result := APS.Components[I]; - Break; - end; - if Result = nil then - begin - Result := APS.Components.Add as TcxPropertiesStoreComponent; - Result.Component := AComponent; - end; - end; - - procedure SaveComponentByProperty(APropertyNode: TTreeNode); - var - APropertyName: string; - I: Integer; - APSC: TcxPropertiesStoreComponent; - APersistent: TPersistent; - begin - APropertyName := APropertyNode.Text; - for I := 0 to APropertyNode.Count - 1 do - begin - if IsNodeChecked(APropertyNode[I]) then - begin - APersistent := PfrmPropertiesStoreRecord(APropertyNode[I].Data)^.Persistent; - if APersistent is TComponent then - begin - APSC := GetPropertiesStoreComponent(APersistent as TComponent); - if IsNodeFullChecked(APropertyNode[I]) then - APSC.Properties.Add(APropertyName) - else - SaveComponentProperties(APSC, APropertyNode[I], APropertyName); - end; - end; - end; - end; - -var - ANode: TTreeNode; -begin - if APropertiesStore = nil then - APS := PropertiesStore - else - APS := APropertiesStore; - if APS <> nil then - begin - APS.Components.Clear; - ANode := Tree.Items.GetFirstNode; - while ANode <> nil do - begin - if IsNodeChecked(ANode) then - begin - if ANode.Data <> nil then - begin - if Grouping = psgComponents then - SaveComponent(ANode) - else if Grouping = psgProperties then - SaveComponentByProperty(ANode); - end; - end; - ANode := ANode.getNextSibling; - end; - end; -end; - -function TfrmPropertiesStoreEditor.IsNodeFullChecked( - ANode: TTreeNode): Boolean; -var - I: Integer; -begin - Result := PfrmPropertiesStoreRecord(ANode.Data)^.Stored; - if Result then - begin - for I := 0 to ANode.Count - 1 do - Result := Result and IsNodeFullChecked(ANode[I]); - end; -end; - -function TfrmPropertiesStoreEditor.IsNodeChecked( - ANode: TTreeNode): Boolean; -begin - Result := PfrmPropertiesStoreRecord(ANode.Data)^.Stored; -end; - -procedure TfrmPropertiesStoreEditor.BeginUpdate; -begin - Tree.Items.BeginUpdate; -end; - -procedure TfrmPropertiesStoreEditor.EndUpdate; -begin - Tree.Items.EndUpdate; -end; - -procedure TfrmPropertiesStoreEditor.InvertCheck; - - procedure InvertCheckNode(ANode: TTreeNode); - var - I: Integer; - begin - for I := 0 to ANode.Count - 1 do - begin - if IsNodeChecked(ANode[I]) then - begin - if IsNodeFullChecked(ANode[I]) then - UncheckNode(ANode[I]) - else - InvertCheckNode(ANode[I]); - end - else - CheckNode(ANode[I]); - end; - end; - -var - ANode: TTreeNode; -begin - ANode := Tree.Items.GetFirstNode; - while ANode <> nil do - begin - if IsNodeChecked(ANode) then - begin - if IsNodeFullChecked(ANode) then - UncheckNode(ANode) - else - InvertCheckNode(ANode); - end - else - CheckNode(ANode); - ANode := ANode.getNextSibling; - end; -end; - -procedure TfrmPropertiesStoreEditor.btnInvertCheckingClick(Sender: TObject); -begin - InvertChecking; -end; - -procedure TfrmPropertiesStoreEditor.SetFindText; -begin - if Grouping = psgComponents then - lblFindComponent.Caption := scxFindComponent - else if Grouping = psgProperties then - lblFindComponent.Caption := scxFindProperty; - edFindComponent.Left := lblFindComponent.Left + lblFindComponent.Width + 9; - edFindComponent.Width := Tree.Left + Tree.Width - edFindComponent.Left - 7; -end; - -procedure TfrmPropertiesStoreEditor.edFindComponentKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -var - ANode: TTreeNode; -begin - if TranslateKey(Key) = VK_RETURN then - begin - ANode := FindNode(edFindComponent.Text); - if ANode <> nil then - begin - Tree.Selected := ANode; - Tree.SetFocus; - end; - end; -end; - -function TfrmPropertiesStoreEditor.FindNode(const AText: string): TTreeNode; -var - I: Integer; - ANode: TTreeNode; - ANodeText: string; - AFindText: string; - ACount, ACount1: Integer; -begin - AFindText := UpperCase(AText); - ANode := Tree.Items.GetFirstNode; - ACount1 := -1; - Result := nil; - while ANode <> nil do - begin - ACount := 0; - ANodeText := UpperCase(ANode.Text); - for I := 1 to Length(AFindText) do - begin - if I > Length(ANodeText) then - Break; - if AFindText[I] = ANodeText[I] then - Inc(ACount) - else - Break; - end; - if ACount > ACount1 then - begin - ACount1 := ACount; - Result := ANode; - end; - ANode := ANode.getNextSibling; - end; -end; - -procedure TfrmPropertiesStoreEditor.CheckAll; -var - ANode: TTreeNode; -begin - BeginUpdate; - try - ANode := Tree.Items.GetFirstNode; - while ANode <> nil do - begin - CheckNode(ANode, True, False); - ANode := ANode.getNextSibling; - end; - finally - EndUpdate; - end; -end; - -procedure TfrmPropertiesStoreEditor.InvertChecking; -begin - BeginUpdate; - try - InvertCheck; - finally - EndUpdate; - end; -end; - -procedure TfrmPropertiesStoreEditor.Reset; -begin - BeginUpdate; - try - RefreshTree; - LoadFromPropertiesStore(nil); - finally - EndUpdate; - end; -end; - -procedure TfrmPropertiesStoreEditor.UncheckAll; -var - ANode: TTreeNode; -begin - BeginUpdate; - try - ANode := Tree.Items.GetFirstNode; - while ANode <> nil do - begin - if PfrmPropertiesStoreRecord(ANode.Data)^.Stored then - UncheckNode(ANode, True, False); - ANode := ANode.getNextSibling; - end; - finally - EndUpdate; - end; - -end; - -procedure TfrmPropertiesStoreEditor.TreeContextPopup(Sender: TObject; - MousePos: TPoint; var Handled: Boolean); -begin - if Tree.Selected <> nil then - begin - BeginUpdate; - try - ChangeCheckState(Tree.Selected); - finally - EndUpdate; - end; - end; -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxScrollBar.pas b/internal/x.46/ExpressLibrary/Sources/cxScrollBar.pas deleted file mode 100644 index c2d9d806..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxScrollBar.pas +++ /dev/null @@ -1,1042 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressCommonLibrary } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCOMMONLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxScrollBar; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, dxThemeManager, -{$IFDEF DELPHI6} - Types, -{$ENDIF} -{$IFNDEF DELPHI5} - cxClasses, -{$ENDIF} - SysUtils, Classes, Controls, StdCtrls, - Graphics, cxGraphics, Forms, cxLookAndFeels, cxLookAndFeelPainters; - -type - TcxScrollBar = class; - - TcxScrollBarState = record - PressedPart: TcxScrollBarPart; - HotPart: TcxScrollBarPart; - end; - - { TcxScrollBarViewInfo } - - TcxScrollBarViewInfo = class - protected - FBottomRightArrowRect: TRect; - FPageDownRect: TRect; - FPageUpRect: TRect; - FScrollBar: TcxScrollBar; - FThumbnailRect: TRect; - FThumbnailSize: Integer; - FTopLeftArrowRect: TRect; - procedure CalculateRects; virtual; - property ScrollBar: TcxScrollBar read FScrollBar; - public - constructor Create(AScrollBar: TcxScrollBar); virtual; - procedure AdjustPageRects; - procedure Calculate; virtual; - procedure CalculateMinThumnailSize; - procedure CalculateThumbnailRect; - procedure SetThumbnailPos(APos: Integer); - property BottomRightArrowRect: TRect read FBottomRightArrowRect; - property PageDownRect: TRect read FPageDownRect; - property PageUpRect: TRect read FPageUpRect; - property ThumbnailRect: TRect read FThumbnailRect; - property ThumbnailSize: Integer read FThumbnailSize; - property TopLeftArrowRect: TRect read FTopLeftArrowRect; - end; - - TcxScrollBarViewInfoClass = class of TcxScrollBarViewInfo; - - TcxScrollBar = class(TCustomControl, {$IFNDEF DELPHI6}IUnknown,{$ENDIF} IdxSkinSupport) - private - FBitmap: TBitmap; - FCanvas: TcxCanvas; - FDownMousePos: TPoint; - FKind: TScrollBarKind; - FLargeChange: TScrollBarInc; - FLookAndFeel: TcxLookAndFeel; - FMax: Integer; - FMin: Integer; - FPageSize: Integer; - FPosition: Integer; - FRealCtl3D: Boolean; - FSavePosition: Integer; - FSaveThumbnailPos: TPoint; - FSmallChange: TScrollBarInc; - FThemeChangedNotificator: TdxThemeChangedNotificator; - FTimer: TComponent; - FUnlimitedTracking: Boolean; - FOnChange: TNotifyEvent; - FOnScroll: TScrollEvent; - procedure CancelScroll; - procedure DoScroll(APart: TcxScrollBarPart); - function GetCtr3D: Boolean; - function GetInternalCtl3D: Boolean; - function GetPartState(APart: TcxScrollBarPart): TcxButtonState; - function GetPositionFromThumbnail: Integer; - function GetScrollBarPart(P: TPoint): TcxScrollBarPart; - procedure InternalScroll(AScrollCode: TScrollCode); - function IsCtl3DStored: Boolean; - procedure OnTimer(Sender: TObject); - procedure SetCtl3D(Value: Boolean); - procedure SetInternalCtl3D(Value: Boolean); - procedure SetKind(Value: TScrollBarKind); - procedure SetLookAndFeel(Value: TcxLookAndFeel); - procedure SetMax(Value: Integer); - procedure SetMin(Value: Integer); - procedure SetPageSize(Value: Integer); - procedure SetPosition(Value: Integer); - procedure ThemeChanged; - procedure CMCtl3DChanged(var Message: TMessage); message CM_CTL3DCHANGED; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE; - procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED; - procedure CNHScroll(var Message: TWMHScroll); message CN_HSCROLL; - procedure CNVScroll(var Message: TWMVScroll); message CN_VSCROLL; - procedure CNCtlColorScrollBar(var Message: TMessage); message CN_CTLCOLORSCROLLBAR; - procedure WMCancelMode(var Message: TWMCancelMode); message WM_CANCELMODE; - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - protected - FState: TcxScrollBarState; - FViewInfo: TcxScrollBarViewInfo; - procedure Change; virtual; - function GetPainter: TcxCustomLookAndFeelPainterClass; - function GetViewInfoClass: TcxScrollBarViewInfoClass; virtual; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseEnter(AControl: TControl); dynamic; - procedure MouseLeave(AControl: TControl); dynamic; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - - procedure DoPaint(ACanvas: TcxCanvas); virtual; - procedure DrawScrollBarBackground(ACanvas: TcxCanvas; const R: TRect); virtual; - procedure DrawScrollBarPart(ACanvas: TcxCanvas; const R: TRect; - APart: TcxScrollBarPart; AState: TcxButtonState); overload; virtual; - procedure DrawScrollBarPart(ACanvas: TcxCanvas; const R: TRect; - APart: TcxScrollBarPart); overload; virtual; - function IsButtonHotTrack: Boolean; virtual; - procedure Paint; override; - procedure Scroll(ScrollCode: TScrollCode; var ScrollPos: Integer); virtual; - function ScrollBarMinimalThumbSize: Integer; virtual; - - property InternalCtl3D: Boolean read GetInternalCtl3D write SetInternalCtl3D; - property Painter: TcxCustomLookAndFeelPainterClass read GetPainter; - property PartState[Part: TcxScrollBarPart]: TcxButtonState read GetPartState; - property ViewInfo: TcxScrollBarViewInfo read FViewInfo; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; - procedure SetScrollParams(AMin, AMax, APosition, APageSize: Integer; ARedraw: Boolean = True); - procedure SetParams(APosition, AMin, AMax: Integer); - published - property Align; - property Anchors; - property Constraints; - property Ctl3D read GetCtr3D write SetCtl3D stored IsCtl3DStored; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property Kind: TScrollBarKind read FKind write SetKind default sbHorizontal; - property LargeChange: TScrollBarInc read FLargeChange write FLargeChange default 1; - property LookAndFeel: TcxLookAndFeel read FLookAndFeel write SetLookAndFeel; - property Max: Integer read FMax write SetMax default 100; - property Min: Integer read FMin write SetMin default 0; - property PageSize: Integer read FPageSize write SetPageSize; - property ParentCtl3D; - property ParentShowHint; - property PopupMenu; - property Position: Integer read FPosition write SetPosition default 0; - property ShowHint; - property SmallChange: TScrollBarInc read FSmallChange write FSmallChange default 1; - property UnlimitedTracking: Boolean read FUnlimitedTracking write FUnlimitedTracking default False; - property Visible; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - property OnChange: TNotifyEvent read FOnChange write FOnChange; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnScroll: TScrollEvent read FOnScroll write FOnScroll; - property OnStartDock; - property OnStartDrag; - end; - TcxScrollBarClass = class of TcxScrollBar; - -function GetScrollBarSize: TSize; - -implementation - -uses - dxuxTheme, - dxThemeConsts, - Consts, cxControls; - -const - EmptyRect: TRect = (Left: 0; Top: 0; Right: 0; Bottom: 0); - cxScrollInitialInterval = 400; - cxScrollInterval = 60; - cxScrollMinDistance: Integer = 34; - cxScrollMaxDistance: Integer = 136; - cxMinStdThumbnailSize = 8; - cxTimerParts = [sbpLineUp, sbpLineDown, sbpPageUp, sbpPageDown]; - -function GetScrollBarSize: TSize; -begin - Result.cx := GetSystemMetrics(SM_CXVSCROLL); - Result.cy := GetSystemMetrics(SM_CYHSCROLL); -end; - -function MaxInt(A, B: Integer): Integer; -begin - if A > B then Result := A else Result := B; -end; - -function MinInt(A, B: Integer): Integer; -begin - if A < B then Result := A else Result := B; -end; - -{$IFNDEF DELPHI6} - -function Bounds(ALeft, ATop, AWidth, AHeight: Integer): TRect; -begin - with Result do - begin - Left := ALeft; - Top := ATop; - Right := ALeft + AWidth; - Bottom := ATop + AHeight; - end; -end; - -{$ENDIF} - -{ TcxScrollBarViewInfo } - -constructor TcxScrollBarViewInfo.Create(AScrollBar: TcxScrollBar); -begin - inherited Create; - FScrollBar := AScrollBar; -end; - -procedure TcxScrollBarViewInfo.AdjustPageRects; -begin - if not IsRectEmpty(FThumbnailRect) then - begin - if ScrollBar.Kind = sbHorizontal then - begin - FPageUpRect := Rect(FTopLeftArrowRect.Right, 0, FThumbnailRect.Left, ScrollBar.Height); - FPageDownRect := Rect(FThumbnailRect.Right, 0, FBottomRightArrowRect.Left, ScrollBar.Height); - end - else - begin - FPageUpRect := Rect(0, FTopLeftArrowRect.Bottom, ScrollBar.Width, FThumbnailRect.Top); - FPageDownRect := Rect(0, FThumbnailRect.Bottom, ScrollBar.Width, FBottomRightArrowRect.Top); - end - end - else - begin - FPageUpRect := EmptyRect; - FPageDownRect := EmptyRect; - end; -end; - -procedure TcxScrollBarViewInfo.Calculate; -begin - CalculateRects; -end; - -procedure TcxScrollBarViewInfo.CalculateMinThumnailSize; -begin - FThumbnailSize := ScrollBar.ScrollBarMinimalThumbSize; -end; - -procedure TcxScrollBarViewInfo.CalculateThumbnailRect; -var - ADelta, ASize: Integer; -begin - FThumbnailRect := EmptyRect; - AdjustPageRects; - if not ScrollBar.Enabled then - Exit; - if ScrollBar.Kind = sbHorizontal then - begin - ADelta := FBottomRightArrowRect.Left - FTopLeftArrowRect.Right; - if ScrollBar.PageSize = 0 then - begin - ASize := GetSystemMetrics(SM_CXHTHUMB); - if ASize > ADelta then - Exit; - Dec(ADelta, ASize); - if (ADelta <= 0) or (ScrollBar.Max = ScrollBar.Min) then - FThumbnailRect := Bounds(FTopLeftArrowRect.Right, 0, ASize, ScrollBar.Height) - else - FThumbnailRect := Bounds(FTopLeftArrowRect.Right + - MulDiv(ADelta, ScrollBar.Position - ScrollBar.Min, ScrollBar.Max - ScrollBar.Min), 0, ASize, ScrollBar.Height); - end - else - begin - ASize := MinInt(ADelta, MulDiv(ScrollBar.PageSize, ADelta, ScrollBar.Max - ScrollBar.Min + 1)); - if (ADelta < FThumbnailSize) or (ScrollBar.Max = ScrollBar.Min) then - Exit; - if ASize < FThumbnailSize then - ASize := FThumbnailSize; - Dec(ADelta, ASize); - FThumbnailRect := Bounds(FTopLeftArrowRect.Right, 0, ASize, ScrollBar.Height); - ASize := (ScrollBar.Max - ScrollBar.Min) - (ScrollBar.PageSize - 1); - OffsetRect(FThumbnailRect, MulDiv(ADelta, MinInt(ScrollBar.Position - ScrollBar.Min, ASize), ASize), 0); - end; - end - else - begin - ADelta := FBottomRightArrowRect.Top - FTopLeftArrowRect.Bottom; - if ScrollBar.PageSize = 0 then - begin - ASize := GetSystemMetrics(SM_CYVTHUMB); - if ASize > ADelta then - Exit; - Dec(ADelta, ASize); - if (ADelta <= 0) or (ScrollBar.Max = ScrollBar.Min) then - FThumbnailRect := Bounds(0, FTopLeftArrowRect.Bottom, ScrollBar.Width, ASize) - else - FThumbnailRect := Bounds(0, FTopLeftArrowRect.Bottom + - MulDiv(ADelta, ScrollBar.Position - ScrollBar.Min, ScrollBar.Max - ScrollBar.Min), ScrollBar.Width, ASize); - end - else - begin - ASize := MinInt(ADelta, MulDiv(ScrollBar.PageSize, ADelta, ScrollBar.Max - ScrollBar.Min + 1)); - if (ADelta < FThumbnailSize) or (ScrollBar.Max = ScrollBar.Min) then - Exit; - if ASize < FThumbnailSize then - ASize := FThumbnailSize; - Dec(ADelta, ASize); - FThumbnailRect := Bounds(0, FTopLeftArrowRect.Bottom, ScrollBar.Width, ASize); - ASize := (ScrollBar.Max - ScrollBar.Min) - (ScrollBar.PageSize - 1); - OffsetRect(FThumbnailRect, 0, MulDiv(ADelta, MinInt(ScrollBar.Position - ScrollBar.Min, ASize), ASize)); - end; - end; - AdjustPageRects; -end; - -procedure TcxScrollBarViewInfo.SetThumbnailPos(APos: Integer); -begin - if ScrollBar.Kind = sbHorizontal then - OffsetRect(FThumbnailRect, -FThumbnailRect.Left + APos, 0) - else - OffsetRect(FThumbnailRect, 0, -FThumbnailRect.Top + APos); -end; - -procedure TcxScrollBarViewInfo.CalculateRects; -var - ASize, H, W: Integer; -begin - if ScrollBar.Kind = sbHorizontal then - begin - ASize := GetScrollBarSize.cy; - if ScrollBar.Width div 2 < ASize then - W := ScrollBar.Width div 2 - else - W := ASize; - FTopLeftArrowRect := Bounds(0, 0, W, ScrollBar.Height); - FBottomRightArrowRect := Bounds(ScrollBar.Width - W, 0, W, ScrollBar.Height); - end - else - begin - ASize := GetScrollBarSize.cx; - if ScrollBar.Height div 2 < ASize then - H := ScrollBar.Height div 2 - else - H := ASize; - FTopLeftArrowRect := Bounds(0, 0, ScrollBar.Width, H); - FBottomRightArrowRect := Bounds(0, ScrollBar.Height - H, ScrollBar.Width, H); - end; - CalculateThumbnailRect; -end; - -{ TcxScrollBar } - -constructor TcxScrollBar.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FBitmap := TBitmap.Create; - FBitmap.PixelFormat := pfDevice; - FCanvas := TcxCanvas.Create(FBitmap.Canvas); - FLookAndFeel := TcxLookAndFeel.Create(Self); - FLookAndFeel.OnChanged := LookAndFeelChanged; - FViewInfo := GetViewInfoClass.Create(Self); - Width := 121; - ControlStyle := [csFramed, csOpaque, csCaptureMouse]; - FKind := sbHorizontal; - Height := GetScrollBarSize.cy; - FThemeChangedNotificator := TdxThemeChangedNotificator.Create; - FThemeChangedNotificator.OnThemeChanged := ThemeChanged; - FPosition := 0; - FMin := 0; - FMax := 100; - FSmallChange := 1; - FLargeChange := 1; - - FTimer := TcxTimer.Create(nil); - TcxTimer(FTimer).Enabled := False; - TcxTimer(FTimer).Interval:= cxScrollInitialInterval; - TcxTimer(FTimer).OnTimer := OnTimer; - ViewInfo.CalculateMinThumnailSize; - ViewInfo.Calculate; -end; - -destructor TcxScrollBar.Destroy; -begin - FreeAndNil(FTimer); - FreeAndNil(FThemeChangedNotificator); - FreeAndNil(FViewInfo); - FreeAndNil(FLookAndFeel); - FreeAndNil(FCanvas); - FreeAndNil(FBitmap); - inherited Destroy; -end; - -procedure TcxScrollBar.SetCtl3D(Value: Boolean); -begin - FRealCtl3D := Value; - InternalCtl3D := Value; -end; - -procedure TcxScrollBar.SetInternalCtl3D(Value: Boolean); -begin - if InternalCtl3D <> Value then - inherited Ctl3D := Value; -end; - -function TcxScrollBar.IsCtl3DStored: Boolean; -begin - Result := not ParentCtl3D; -end; - -procedure TcxScrollBar.OnTimer(Sender: TObject); - - function CheckHotPart: Boolean; - var - P: TPoint; - begin - GetCursorPos(P); - Result := GetScrollBarPart(ScreenToClient(P)) = FState.PressedPart; - end; - -begin - if (GetCaptureControl = Self) and (FState.PressedPart in cxTimerParts) then - begin - if TcxTimer(FTimer).Interval = cxScrollInitialInterval then - TcxTimer(FTimer).Interval := cxScrollInterval; - DoScroll(FState.PressedPart); - TcxTimer(FTimer).Enabled := CheckHotPart; - end - else - CancelScroll; -end; - -procedure TcxScrollBar.SetKind(Value: TScrollBarKind); -begin - if FKind <> Value then - begin - FKind := Value; - if not (csLoading in ComponentState) then - SetBounds(Left, Top, Height, Width) - else - ViewInfo.Calculate; - Invalidate; - end; -end; - -procedure TcxScrollBar.SetLookAndFeel(Value: TcxLookAndFeel); -begin - FLookAndFeel.Assign(Value); -end; - -procedure TcxScrollBar.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); -var - ABoundsChanged: Boolean; -begin - ABoundsChanged := (ALeft <> Left) or (ATop <> Top) or - (AWidth <> Width) or (AHeight <> Height); - inherited SetBounds(ALeft, ATop, AWidth, AHeight); - if ABoundsChanged and (AWidth > 0) and (AHeight > 0) then - begin - FBitmap.Width := AWidth; - FBitmap.Height := AHeight; - ViewInfo.Calculate; - end; -end; - -procedure TcxScrollBar.SetScrollParams(AMin, AMax, APosition, - APageSize: Integer; ARedraw: Boolean = True); -begin - if (AMax < AMin) or (AMax < APageSize) then - raise EInvalidOperation.Create(SScrollBarRange); - ARedraw := ARedraw and HandleAllocated; - - if APosition < AMin then APosition := AMin; - if APosition > AMax then APosition := AMax; - - if (Min <> AMin) or (Max <> AMax) or (FPageSize <> APageSize) or - (Position <> APosition) then - begin - FMin := AMin; - FMax := AMax; - FPageSize := APageSize; - end - else - ARedraw := False; - if Position <> APosition then - begin - Enabled := True; - FPosition := APosition; - ViewInfo.CalculateThumbnailRect; - if ARedraw then Repaint; - Change; - end - else - begin - ViewInfo.CalculateThumbnailRect; - if ARedraw then Repaint; - end; -end; - -procedure TcxScrollBar.SetParams(APosition, AMin, AMax: Integer); -begin - SetScrollParams(AMin, AMax, APosition, FPageSize); -end; - -procedure TcxScrollBar.SetMax(Value: Integer); -begin - SetScrollParams(FMin, Value, FPosition, FPageSize); -end; - -procedure TcxScrollBar.SetMin(Value: Integer); -begin - SetScrollParams(Value, FMax, FPosition, FPageSize); -end; - -procedure TcxScrollBar.SetPageSize(Value: Integer); -begin - SetScrollParams(FMin, FMax, FPosition, Value); -end; - -procedure TcxScrollBar.SetPosition(Value: Integer); -begin - SetScrollParams(FMin, FMax, Value, FPageSize); -end; - -procedure TcxScrollBar.Change; -begin - inherited Changed; - if Assigned(FOnChange) then FOnChange(Self); -end; - -function TcxScrollBar.GetPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := LookAndFeel.GetAvailablePainter(totScrollBar); -end; - -function TcxScrollBar.GetViewInfoClass: TcxScrollBarViewInfoClass; -begin - Result := TcxScrollBarViewInfo; -end; - -procedure TcxScrollBar.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -var - ASaveValue: Boolean; -begin - if (LookAndFeel.SkinPainter <> nil) and Ctl3D then - begin - ASaveValue := Ctl3D; - InternalCtl3D := False; - FRealCtl3D := ASaveValue; - end - else - InternalCtl3D := FRealCtl3D; - ViewInfo.CalculateMinThumnailSize; - ViewInfo.Calculate; - Invalidate; -end; - -procedure TcxScrollBar.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - APart: TcxScrollBarPart; -begin - inherited MouseDown(Button, Shift, X, Y); - if (Button <> mbLeft) then Exit; - APart := GetScrollBarPart(Point(X, Y)); - if APart <> sbpNone then - begin - if APart = sbpThumbnail then - begin - FDownMousePos := Point(X, Y); - FSavePosition := FPosition; - FSaveThumbnailPos := ViewInfo.ThumbnailRect.TopLeft; - InternalScroll(scTrack); - end; - FState.PressedPart := APart; - FState.HotPart := APart; - if APart in cxTimerParts then - begin - DoScroll(APart); - TcxTimer(FTimer).Interval := cxScrollInitialInterval; - TcxTimer(FTimer).Enabled := True; - end; - Repaint; - end; -end; - -procedure TcxScrollBar.MouseEnter(AControl: TControl); -begin - if IsButtonHotTrack or (FState.PressedPart in cxTimerParts) then - Repaint; -end; - -procedure TcxScrollBar.MouseLeave(AControl: TControl); -begin - if FState.PressedPart <> sbpThumbnail then - FState.HotPart := sbpNone; - if IsButtonHotTrack or (FState.PressedPart in cxTimerParts) then - Invalidate; -end; - -procedure TcxScrollBar.MouseMove(Shift: TShiftState; X, Y: Integer); -var - APart: TcxScrollBarPart; - R: TRect; - ADelta, ANewPos, ASize: Integer; - - procedure UpdateThumbnail(ADeltaX, ADeltaY: Integer); - begin - if FKind = sbHorizontal then - ViewInfo.SetThumbnailPos(FSaveThumbnailPos.X + ADeltaX) - else - ViewInfo.SetThumbnailPos(FSaveThumbnailPos.Y + ADeltaY); - ViewInfo.AdjustPageRects; - Repaint; - end; - -begin - inherited MouseMove(Shift, X, Y); - APart := GetScrollBarPart(Point(X, Y)); - if FState.PressedPart = sbpThumbnail then - begin - if FKind = sbHorizontal then - begin - ASize := ViewInfo.ThumbnailRect.Right - ViewInfo.ThumbnailRect.Left; - R := Rect(-cxScrollMinDistance, -cxScrollMaxDistance, - Width + cxScrollMinDistance, Height + cxScrollMaxDistance); - end - else - begin - ASize := ViewInfo.ThumbnailRect.Bottom - ViewInfo.ThumbnailRect.Top; - R := Rect(-cxScrollMaxDistance, -cxScrollMinDistance, - Width + cxScrollMaxDistance, Height + cxScrollMinDistance); - end; - if not (FUnlimitedTracking or PtInRect(R, Point(X, Y))) then - begin - if Position <> FSavePosition then - begin - Position := FSavePosition; - DoScroll(sbpThumbnail); - end; - end - else - begin - if FKind = sbHorizontal then - begin - ADelta := X - FDownMousePos.X; - if ADelta = 0 then Exit; - if (ADelta < 0) and (FSaveThumbnailPos.X + ADelta < ViewInfo.TopLeftArrowRect.Right) then - ADelta := ViewInfo.TopLeftArrowRect.Right - FSaveThumbnailPos.X - else - if (ADelta > 0) and (FSaveThumbnailPos.X + ASize + ADelta > ViewInfo.BottomRightArrowRect.Left) then - ADelta := ViewInfo.BottomRightArrowRect.Left - (FSaveThumbnailPos.X + ASize); - UpdateThumbnail(ADelta, 0); - end - else - begin - ADelta := Y - FDownMousePos.Y; - if ADelta = 0 then Exit; - if (ADelta < 0) and (FSaveThumbnailPos.Y + ADelta < ViewInfo.TopLeftArrowRect.Bottom) then - ADelta := ViewInfo.TopLeftArrowRect.Bottom - FSaveThumbnailPos.Y - else - if (ADelta > 0) and (FSaveThumbnailPos.Y + ASize + ADelta > ViewInfo.BottomRightArrowRect.Top) then - ADelta := ViewInfo.BottomRightArrowRect.Top - (FSaveThumbnailPos.Y + ASize); - UpdateThumbnail(0, ADelta); - end; - ANewPos := GetPositionFromThumbnail; - if ANewPos <> FPosition then - begin - FPosition := ANewPos; - DoScroll(sbpThumbnail); - end; - end; - end - else - begin - if FState.PressedPart <> sbpNone then - TcxTimer(FTimer).Enabled := FState.PressedPart = APart; - if (FState.HotPart <> APart) and IsButtonHotTrack then - begin - FState.HotPart := APart; - Repaint; - end - else - FState.HotPart := APart; - end; -end; - -procedure TcxScrollBar.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited MouseUp(Button, Shift, X, Y); - CancelScroll; - FState.HotPart := GetScrollBarPart(Point(X, Y)); -end; - -procedure TcxScrollBar.DoPaint(ACanvas: TcxCanvas); -begin - DrawScrollBarBackground(ACanvas, Bounds(0, 0, Width, Height)); - DrawScrollBarPart(ACanvas, ViewInfo.TopLeftArrowRect, sbpLineUp); - DrawScrollBarPart(ACanvas, ViewInfo.BottomRightArrowRect, sbpLineDown); - if not IsRectEmpty(ViewInfo.ThumbnailRect) then - DrawScrollBarPart(ACanvas, ViewInfo.ThumbnailRect, sbpThumbnail); - if not IsRectEmpty(ViewInfo.PageUpRect) then - DrawScrollBarPart(ACanvas, ViewInfo.PageUpRect, sbpPageUp); - if not IsRectEmpty(ViewInfo.PageDownRect) then - DrawScrollBarPart(ACanvas, ViewInfo.PageDownRect, sbpPageDown); -end; - -procedure TcxScrollBar.DrawScrollBarBackground(ACanvas: TcxCanvas; const R: TRect); -begin - Painter.DrawScrollBarBackground(ACanvas, R, Kind = sbHorizontal); -end; - -procedure TcxScrollBar.DrawScrollBarPart(ACanvas: TcxCanvas; const R: TRect; - APart: TcxScrollBarPart; AState: TcxButtonState); -begin - Painter.DrawScrollBarPart(ACanvas, Kind = sbHorizontal, R, APart, AState); -end; - -procedure TcxScrollBar.DrawScrollBarPart(ACanvas: TcxCanvas; const R: TRect; - APart: TcxScrollBarPart); -begin - DrawScrollBarPart(ACanvas, R, APart, PartState[APart]); -end; - -function TcxScrollBar.GetPartState(APart: TcxScrollBarPart): TcxButtonState; -const - PartHotStateMap: array[Boolean] of TcxButtonState = (cxbsHot, cxbsNormal); - PartPressedStateMap: array[Boolean] of TcxButtonState = (cxbsNormal, cxbsPressed); -begin - if not Enabled then - Result := cxbsDisabled - else - begin - Result := cxbsNormal; - if (APart <> sbpThumbnail) or ((APart = sbpThumbnail) and IsButtonHotTrack) then - begin - if APart = FState.HotPart then - begin - if FState.PressedPart = sbpNone then - Result := PartHotStateMap[csDesigning in ComponentState] - else - Result := PartPressedStateMap[APart = FState.PressedPart]; - end; - end; - end; -end; - -function TcxScrollBar.IsButtonHotTrack: Boolean; -begin - Result := Painter.IsButtonHotTrack; -end; - -procedure TcxScrollBar.Paint; -begin - DoPaint(FCanvas); - BitBlt(Canvas.Handle, 0, 0, FBitmap.Width, FBitmap.Height, - FCanvas.Handle, 0, 0, SRCCOPY); -end; - -procedure TcxScrollBar.Scroll(ScrollCode: TScrollCode; var ScrollPos: Integer); -begin - if Assigned(FOnScroll) then FOnScroll(Self, ScrollCode, ScrollPos); -end; - -function TcxScrollBar.ScrollBarMinimalThumbSize: Integer; -begin - Result := Painter.ScrollBarMinimalThumbSize(Kind = sbVertical); -end; - -procedure TcxScrollBar.CancelScroll; -begin - if FState.PressedPart <> sbpNone then - begin - if FState.PressedPart = sbpThumbnail then - begin - FPosition := GetPositionFromThumbnail; - InternalScroll(scPosition); - end; - TcxTimer(FTimer).Enabled := False; - FState.PressedPart := sbpNone; - FState.HotPart := sbpNone; - InternalScroll(scEndScroll); - ViewInfo.CalculateThumbnailRect; - Invalidate; - end; -end; - -procedure TcxScrollBar.DoScroll(APart: TcxScrollBarPart); -begin - case APart of - sbpLineUp: InternalScroll(scLineUp); - sbpLineDown: InternalScroll(scLineDown); - sbpPageUp: InternalScroll(scPageUp); - sbpPageDown: InternalScroll(scPageDown); - sbpThumbnail: InternalScroll(scTrack); - end; -end; - -function TcxScrollBar.GetCtr3D: Boolean; -begin - Result := InternalCtl3D or FRealCtl3D; -end; - -function TcxScrollBar.GetInternalCtl3D: Boolean; -begin - Result := inherited Ctl3D; -end; - -function TcxScrollBar.GetPositionFromThumbnail: Integer; -var - ATotal, AThumbnailSize, ADistance: Integer; -begin - ATotal := FMax - FMin; - if FPageSize > 0 then Dec(ATotal, FPageSize - 1); - if FKind = sbHorizontal then - begin - AThumbnailSize := ViewInfo.ThumbnailRect.Right - ViewInfo.ThumbnailRect.Left; - ADistance := ViewInfo.BottomRightArrowRect.Left - ViewInfo.TopLeftArrowRect.Right - AThumbnailSize; - Result := FMin + MulDiv(ATotal, ViewInfo.ThumbnailRect.Left - ViewInfo.TopLeftArrowRect.Right, - ADistance); - end - else - begin - AThumbnailSize := ViewInfo.ThumbnailRect.Bottom - ViewInfo.ThumbnailRect.Top; - ADistance := ViewInfo.BottomRightArrowRect.Top - ViewInfo.TopLeftArrowRect.Bottom - AThumbnailSize; - Result := FMin + MulDiv(ATotal, ViewInfo.ThumbnailRect.Top - ViewInfo.TopLeftArrowRect.Bottom, - ADistance); - end; -end; - -function TcxScrollBar.GetScrollBarPart(P: TPoint): TcxScrollBarPart; -begin - Result := sbpNone; - if not PtInRect(ClientRect, P) then - Exit; - if PtInRect(ViewInfo.TopLeftArrowRect, P) then - Result := sbpLineUp - else if PtInRect(ViewInfo.BottomRightArrowRect, P) then - Result := sbpLineDown - else if IsRectEmpty(ViewInfo.ThumbnailRect) then - Exit - else if PtInRect(ViewInfo.ThumbnailRect, P) then - Result := sbpThumbnail - else if PtInRect(ViewInfo.PageUpRect, P) then - Result := sbpPageUp - else if PtInRect(ViewInfo.PageDownRect, P) then - Result := sbpPageDown -end; - -procedure TcxScrollBar.InternalScroll(AScrollCode: TScrollCode); -var - ScrollPos: Integer; - NewPos: Longint; - - procedure CorrectPos(var APos: Integer); - begin - if APos < Min then APos := Min; - if APos > Max then APos := Max; - end; - -begin - NewPos := Position; - case AScrollCode of - scLineUp: - Dec(NewPos, SmallChange); - scLineDown: - Inc(NewPos, SmallChange); - scPageUp: - Dec(NewPos, LargeChange); - scPageDown: - Inc(NewPos, LargeChange); - scTop: - NewPos := FMin; - scBottom: - NewPos := FMax; - end; - CorrectPos(NewPos); - ScrollPos := NewPos; - Scroll(AScrollCode, ScrollPos); - begin - CorrectPos(ScrollPos); - if ScrollPos <> FPosition then - begin - if AScrollCode <> scTrack then - SetPosition(ScrollPos) - else - begin - FPosition := ScrollPos; - Repaint; - end; - end; - end; -end; - -procedure TcxScrollBar.ThemeChanged; -begin - ViewInfo.CalculateMinThumnailSize; - ViewInfo.Calculate; - UpdateScrollBarBitmaps; - Invalidate; - if Parent <> nil then - Parent.Realign; -end; - -procedure TcxScrollBar.CMCtl3DChanged( - var Message: TMessage); -begin - inherited; - FRealCtl3D := InternalCtl3D; - LookAndFeelChanged(LookAndFeel, []); -end; - -procedure TcxScrollBar.CMEnabledChanged(var Message: TMessage); -begin - inherited; - ViewInfo.Calculate; - if not Enabled then - CancelScroll; - Invalidate; -end; - -procedure TcxScrollBar.CNHScroll(var Message: TWMHScroll); -begin - InternalScroll(TScrollCode(Message.ScrollCode)); -end; - -procedure TcxScrollBar.CMMouseEnter(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseEnter(Self) - else - MouseEnter(TControl(Message.lParam)); -end; - -procedure TcxScrollBar.CMMouseLeave(var Message: TMessage); -begin - inherited; - if Message.lParam = 0 then - MouseLeave(Self) - else - MouseLeave(TControl(Message.lParam)); -end; - -procedure TcxScrollBar.CMSysColorChange(var Message: TMessage); -begin - UpdateScrollBarBitmaps; - inherited; -end; - -procedure TcxScrollBar.CMVisibleChanged(var Message: TMessage); -begin - if not Visible then CancelScroll; - inherited; -end; - -procedure TcxScrollBar.CNVScroll(var Message: TWMVScroll); -begin - InternalScroll(TScrollCode(Message.ScrollCode)); -end; - -procedure TcxScrollBar.CNCtlColorScrollBar(var Message: TMessage); -begin - UpdateScrollBarBitmaps; - with Message do - CallWindowProc(DefWndProc, Handle, Msg, WParam, LParam); -end; - -procedure TcxScrollBar.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - Message.Result := 1; -end; - -procedure TcxScrollBar.WMCancelMode(var Message: TWMCancelMode); -begin - CancelScroll; - inherited; -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxStorage.pas b/internal/x.46/ExpressLibrary/Sources/cxStorage.pas deleted file mode 100644 index ca65c8b7..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxStorage.pas +++ /dev/null @@ -1,2305 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxStorage; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Registry, SysUtils, Classes, TypInfo, IniFiles, dxCore, cxClasses, cxLibraryStrs; - -type - { IcxStoredObject } - IcxStoredObject = interface - ['{79A05009-CAC3-47E8-B454-F6F3D91F495D}'] - function GetObjectName: string; - function GetProperties(AProperties: TStrings): Boolean; - procedure GetPropertyValue(const AName: string; var AValue: Variant); - procedure SetPropertyValue(const AName: string; const AValue: Variant); - end; - - { IcxStoredParent } - IcxStoredParent = interface - ['{6AF48CD0-3A0B-4BEC-AC88-5D323432A686}'] - function CreateChild(const AObjectName, AClassName: string): TObject; - procedure DeleteChild(const AObjectName: string; AObject: TObject); - procedure GetChildren(AChildren: TStringList); - end; - - EcxStorage = class(EdxException); - EcxHexStringConvertError = class(EdxException); - TcxStorageMode = (smChildrenCreating, smChildrenDeleting, smSavePublishedClassProperties); - TcxStorageModes = set of TcxStorageMode; - TcxCustomReader = class; - TcxCustomWriter = class; - TcxCustomReaderClass = class of TcxCustomReader; - TcxCustomWriterClass = class of TcxCustomWriter; - TcxGetStorageModesEvent = function: TcxStorageModes of object; - TcxTestClassPropertyEvent = function(const AName: string; AObject: TObject): Boolean of object; - TcxGetComponentByNameEvent = function(const AName: string): TComponent of object; - TcxGetUseInterfaceOnlyEvent = function: Boolean of object; - - TcxGetStoredPropertiesEvent = procedure(Sender: TObject; AProperties: TStrings) of object; - TcxGetStoredPropertyValueEvent = procedure(Sender: TObject; const AName: string; var AValue: Variant) of object; - TcxInitStoredObjectEvent = procedure(Sender: TObject; AObject: TObject) of object; - TcxSetStoredPropertyValueEvent = procedure(Sender: TObject; const AName: string; const AValue: Variant) of object; - - { TcxStorageType } - TcxStorageType = (stIniFile, stRegistry, stStream); - - { TcxStorage } - TcxStorage = class - private - FNamePrefix: string; - FModes: TcxStorageModes; - FObjectNamePrefix: string; - FReCreate: Boolean; - FStorageName: string; - FStream: TStream; - FStoredObject: TObject; - FSaveComponentPropertiesByName: Boolean; - FUseInterfaceOnly: Boolean; - FOnGetStorageModes: TcxGetStorageModesEvent; - FOnGetComponentByName: TcxGetComponentByNameEvent; - FOnTestClassProperty: TcxTestClassPropertyEvent; - FOnGetUseInterfaceOnly: TcxGetUseInterfaceOnlyEvent; - function CreateChild(const AObjectName, AClassName: string): TObject; - procedure CreateChildrenNames(AChildren: TStringList); - procedure DeleteChild(const AObjectName: string; AObject: TObject); - procedure GetAllPublishedClassProperties(AProperties: TStrings); - procedure GetAllPublishedProperties(AProperties: TStrings); - procedure GetChildren(AChildren: TStringList); - function GetClassProperty(const AName: string): TObject; - function GetComponentByName(const AName: string): TComponent; - function GetObjectName(AObject: TObject): string; - procedure GetProperties(AProperties: TStrings); - function GetPropertyValue(AName: string): Variant; - function GetStorageModes: TcxStorageModes; - function GetUseInterfaceOnly: Boolean; - procedure SetPropertyValue(AName: string; AValue: Variant); - function TestClassProperty(const AName: string; AObject: TObject): Boolean; - protected - procedure InternalRestoreFrom(AReader: TcxCustomReader; const ADefaultObjectName: string = ''); virtual; - procedure InternalStoreTo(AWriter: TcxCustomWriter; const ADefaultObjectName: string = ''); virtual; - procedure SetStoredObject(AObject: TObject); - public - constructor Create(const AStorageName: string; AStorageStream: TStream); overload; - constructor Create(const AStorageName: string); overload; - constructor Create(AStream: TStream); overload; - procedure RestoreFrom(AObject: TObject; AReaderClass: TcxCustomReaderClass); virtual; - procedure RestoreWithExistingReader(AObject: TObject; AReader: TcxCustomReader); virtual; - procedure RestoreFromIni(AObject: TObject); - procedure RestoreFromRegistry(AObject: TObject); - procedure RestoreFromStream(AObject: TObject); - procedure StoreTo(AObject: TObject; AWriterClass: TcxCustomWriterClass); virtual; - procedure StoreWithExistingWriter(AObject: TObject; AWriter: TcxCustomWriter); virtual; - procedure StoreToIni(AObject: TObject); - procedure StoreToRegistry(AObject: TObject); - procedure StoreToStream(AObject: TObject); - property NamePrefix: string read FNamePrefix write FNamePrefix; - property Modes: TcxStorageModes read FModes write FModes; - property ReCreate: Boolean read FReCreate write FReCreate; - property SaveComponentPropertiesByName: Boolean read FSaveComponentPropertiesByName write FSaveComponentPropertiesByName; - property StoredObject: TObject read FStoredObject; - property StorageName: string read FStorageName write FStorageName; - property UseInterfaceOnly: Boolean read FUseInterfaceOnly write FUseInterfaceOnly; - property OnGetComponentByName: TcxGetComponentByNameEvent read FOnGetComponentByName write FOnGetComponentByName; - property OnGetStorageModes: TcxGetStorageModesEvent read FOnGetStorageModes write FOnGetStorageModes; - property OnGetUseInterfaceOnly: TcxGetUseInterfaceOnlyEvent read FOnGetUseInterfaceOnly write FOnGetUseInterfaceOnly; - property OnTestClassProperty: TcxTestClassPropertyEvent read FOnTestClassProperty write FOnTestClassProperty; - end; - - { TcxCustomReader } - TcxCustomReader = class - private - FStorageVersion: Integer; - FStorageName: string; - FStorageStream: TStream; - protected - function CanRead: Boolean; virtual; - procedure DoSetStream(AStream: TStream); virtual; - procedure BeginRead; virtual; - procedure EndRead; virtual; - public - constructor Create(const AStorageName: string); overload; virtual; - constructor Create(const AStorageName: string; AStorageStream: TStream); overload; virtual; - procedure ReadProperties(const AObjectName, AClassName: string; AProperties: TStrings); virtual; - function ReadProperty(const AObjectName, AClassName, AName: string): Variant; virtual; - procedure ReadChildren(const AObjectName, AClassName: string; AChildrenNames, - AChildrenClassNames: TStrings); virtual; - procedure SetStream(AStream: TStream); - - property StorageName: string read FStorageName; - property StorageStream: TStream read FStorageStream; - end; - - { TcxCustomWriter } - TcxCustomWriter = class - protected - FReCreate: Boolean; - FStorageName: string; - FStorageStream: TStream; - - function CanWrite: Boolean; virtual; - procedure DoSetStream(AStream: TStream); virtual; - procedure BeginWrite; virtual; - procedure EndWrite; virtual; - public - constructor Create(const AStorageName: string; AReCreate: Boolean = True); overload; virtual; - constructor Create(const AStorageName: string; AStorageStream: TStream; AReCreate: Boolean = True); overload; virtual; - procedure BeginWriteObject(const AObjectName, AClassName: string); virtual; - procedure EndWriteObject(const AObjectName, AClassName: string); virtual; - procedure SetStream(AStream: TStream); - procedure WriteProperty(const AObjectName, AClassName, AName: string; AValue: Variant); virtual; - - property ReCreate: Boolean read FReCreate write FReCreate; - property StorageName: string read FStorageName; - property StorageStream: TStream read FStorageStream; - end; - - { TcxRegistryReader } - TcxRegistryReader = class(TcxCustomReader) - private - FRegistry: TRegistry; - function CorrectStringValue(const S: string): string; - public - constructor Create(const AStorageName: string; AStorageStream: TStream); override; - destructor Destroy; override; - procedure ReadProperties(const AObjectName, AClassName: string; AProperties: TStrings); override; - function ReadProperty(const AObjectName, AClassName, AName: string): Variant; override; - procedure ReadChildren(const AObjectName, AClassName: string; AChildrenNames, - AChildrenClassNames: TStrings); override; - end; - - { TcxRegistryWriter } - TcxRegistryWriter = class(TcxCustomWriter) - private - FRegistry: TRegistry; - FRootKeyCreated: Boolean; - FRootKeyOpened: Boolean; - function CorrectStringValue(const S: string): string; - procedure CreateRootKey; - public - constructor Create(const AStorageName: string; AStream: TStream; AReCreate: Boolean = True); overload; override; - destructor Destroy; override; - procedure BeginWriteObject(const AObjectName, AClassName: string); override; - procedure EndWriteObject(const AObjectName, AClassName: string); override; - procedure WriteProperty(const AObjectName, AClassName, AName: string; AValue: Variant); override; - end; - - { TcxIniFileReader } - TcxIniFileReader = class(TcxCustomReader) - private - FIniFile: TMemIniFile; - FPathList: TStringList; - FObjectNameList: TStringList; - FClassNameList: TStringList; - function CorrectStringValue(const S: string): string; - procedure CreateLists; - procedure GetSectionDetail(const ASection: string; var APath, AObjectName, AClassName: string); - protected - procedure BeginRead; override; - function CanRead: Boolean; override; - public - constructor Create(const AStorageName: string; AStorageStream: TStream); override; - destructor Destroy; override; - procedure ReadProperties(const AObjectName, AClassName: string; AProperties: TStrings); override; - function ReadProperty(const AObjectName, AClassName, AName: string): Variant; override; - procedure ReadChildren(const AObjectName, AClassName: string; AChildrenNames, - AChildrenClassNames: TStrings); override; - end; - - { TcxIniFileWriter } - TcxIniFileWriter = class(TcxCustomWriter) - private - FIniFile: TMemIniFile; - function CorrectStringValue(const S: string): string; - protected - procedure BeginWrite; override; - procedure EndWrite; override; - public - constructor Create(const AStorageName: string; AStream: TStream; AReCreate: Boolean = True); overload; override; - destructor Destroy; override; - procedure BeginWriteObject(const AObjectName, AClassName: string); override; - procedure WriteProperty(const AObjectName, AClassName, AName: string; AValue: Variant); override; - end; - -type - TcxStreamObjectData = class; - TcxStreamPropertyData = class; - - { TcxStreamReader } - TcxStreamReader = class(TcxCustomReader) - private - FCurrentObject: TcxStreamObjectData; - FCurrentObjectFullName: string; - FRootObject: TcxStreamObjectData; - FReader: TReader; - function GetObject(const AObjectFullName: string): TcxStreamObjectData; - function GetProperty(AObject: TcxStreamObjectData; const AName: string): TcxStreamPropertyData; - function InternalGetObject(const AObjectName: string; AParents: TStrings): TcxStreamObjectData; - protected - function CanRead: Boolean; override; - procedure DoSetStream(AStream: TStream); override; - procedure BeginRead; override; - public - destructor Destroy; override; - procedure Read; - procedure ReadProperties(const AObjectName, AClassName: string; AProperties: TStrings); override; - function ReadProperty(const AObjectName, AClassName, AName: string): Variant; override; - procedure ReadChildren(const AObjectName, AClassName: string; AChildrenNames, - AChildrenClassNames: TStrings); override; - end; - - { TcxStreamWriter } - TcxStreamWriter = class(TcxCustomWriter) - private - FCurrentObject: TcxStreamObjectData; - FRootObject: TcxStreamObjectData; - FWriter: TWriter; - procedure CreateObject(const AObjectName, AClassName: string; AParents: TStrings); - protected - function CanWrite: Boolean; override; - procedure DoSetStream(AStream: TStream); override; - procedure EndWrite; override; - public - destructor Destroy; override; - procedure BeginWriteObject(const AObjectName, AClassName: string); override; - procedure Write; - procedure WriteProperty(const AObjectName, AClassName, AName: string; AValue: Variant); override; - end; - - { TcxStreamPropertyData } - TcxStreamPropertyData = class - private - FName: string; - FValue: Variant; - procedure ReadValue(AReader: TReader); - procedure WriteValue(AWriter: TWriter); - public - constructor Create(AName: string; AValue: Variant); - procedure Read(AReader: TReader); - procedure Write(AWriter: TWriter); - property Name: string read FName; - property Value: Variant read FValue; - end; - - { TcxStreamObjectData } - TcxStreamObjectData = class - private - FClassName: string; - FChildren: TList; - FName: string; - FProperties: TList; - procedure Clear; - function GetChildCount: Integer; - function GetChildren(AIndex: Integer): TcxStreamObjectData; - function GetProperties(AIndex: Integer): TcxStreamPropertyData; - function GetPropertyCount: Integer; - public - constructor Create(const AName, AClassName: string); - destructor Destroy; override; - procedure AddChild(AChild: TcxStreamObjectData); - procedure AddProperty(AProperty: TcxStreamPropertyData); - procedure Read(AReader: TReader); - procedure Write(AWriter: TWriter); - property ChildCount: Integer read GetChildCount; - property Children[AIndex: Integer]: TcxStreamObjectData read GetChildren; - property Name: string read FName; - property ClassName_: string read FClassName; - property Properties[AIndex: Integer]: TcxStreamPropertyData read GetProperties; - property PropertyCount: Integer read GetPropertyCount; - end; - - function StreamToString(AStream: TStream): AnsiString; - procedure StringToStream(AValue: AnsiString; AStream: TStream); - function StringToHexString(const ABuffer: AnsiString): AnsiString; - function HexStringToString(const AHexString: AnsiString): AnsiString; - function StringToBoolean(const AString: string): Boolean; - function EnumerationToString(const AValue: Integer; AEnumNames: array of string): string; - function StringToEnumeration(const AValue: string; AEnumNames: array of string): Integer; - function SetToString(const ASet; ASize: Integer; AEnumNames: array of string): string; - procedure StringToSet(AString: string; var ASet; ASize: Integer; AEnumNames: array of string); - {$IFNDEF DELPHI5} - function SetSetProp(APropInfo: PPropInfo; const AValue: string): Integer; - function GetObjectProp(AObject: TObject; APropInfo: PPropInfo): TObject; - procedure SetObjectProp(AObject: TObject; APropInfo: PPropInfo; AValue: TObject); - function GetObjectPropClass(AObject: TObject; APropInfo: PPropInfo): TClass; - {$ENDIF} - -const - cxBufferSize: Integer = 500000; - - cxStreamBoolean = 1; - cxStreamChar = 2; - cxStreamCurrency = 3; - cxStreamDate = 4; - cxStreamFloat = 5; - cxStreamInteger = 6; - cxStreamSingle = 7; - cxStreamString = 8; - cxStreamWideString = 9; - -implementation - -function StreamToString(AStream: TStream): AnsiString; -begin - if (AStream = nil) or (AStream.Size = 0) then - begin - Result := ''; - Exit; - end; - AStream.Position := 0; - ReadStringFromStream(AStream, Result); - Result := 'Hex:' + StringToHexString(Result); -end; - -procedure StringToStream(AValue: AnsiString; AStream: TStream); -begin - if (AStream = nil) or (Length(AValue) < 6) then Exit; - Delete(AValue, 1, 4); - if Length(AValue) > 0 then - begin - AValue := HexStringToString(AValue); - WriteStringToStream(AStream, AValue); - end; -end; - -function StringToHexString(const ABuffer: AnsiString): AnsiString; -begin - Result := dxBinToHex(ABuffer); -end; - -function HexStringToString(const AHexString: AnsiString): AnsiString; -begin - Result := dxHexToBin(AHexString); -end; - -function StringToBoolean(const AString: string): Boolean; -begin - if UpperCase(AString) = 'TRUE' then - Result := True - else if UpperCase(AString) = 'FALSE' then - Result := False - else - raise EPropertyConvertError.Create(''); -end; - -function EnumerationToString(const AValue: Integer; AEnumNames: array of string): string; -begin - if (AValue >= 0) and (AValue <= High(AEnumNames)) then - Result := AEnumNames[AValue] - else - raise EPropertyConvertError.Create(''); -end; - -function StringToEnumeration(const AValue: string; AEnumNames: array of string): Integer; -var - I: Integer; - AUpperCaseValue: string; -begin - AUpperCaseValue := UpperCase(AValue); - for I := 0 to High(AEnumNames) do - if AUpperCaseValue = UpperCase(AEnumNames[I]) then - begin - Result := I; - Exit; - end; - raise EPropertyConvertError.Create(''); -end; - -function SetToString(const ASet; ASize: Integer; AEnumNames: array of string): string; -var - AInt: Integer; - I: Integer; -begin - AInt := Integer(ASet); - if ASize < SizeOf(Integer) then - AInt := AInt and (1 shl (ASize * 8) - 1); - Result := ''; - for I := 0 to SizeOf(Integer) * 8 - 1 do - begin - if AInt and 1 <> 0 then - begin - if I > High(AEnumNames) then - raise EPropertyConvertError.Create(''); - if Result <> '' then - Result := Result + ','; - Result := Result + AEnumNames[I]; - end; - AInt := AInt shr 1; - end; - Result := '[' + Result + ']'; -end; - -procedure StringToSet(AString: string; var ASet; ASize: Integer; AEnumNames: array of string); - - function FindEnum(const AStr: string): Integer; - var - I: Integer; - AUpperCaseStr: string; - begin - Result := -1; - AUpperCaseStr := UpperCase(AStr); - for I := 0 to High(AEnumNames) do - if AUpperCaseStr = UpperCase(AEnumNames[I]) then - begin - Result := I; - Break; - end; - end; - -var - AInt: Integer; - - procedure AddBit(const AStr: string); - var - AIndex: Integer; - begin - AIndex := FindEnum(AStr); - if AIndex <> -1 then - begin - AIndex := 1 shl AIndex; - AInt := AInt or AIndex; - end; - end; - -var - I: Integer; - AEnumString: string; -begin - if (AString <> '') and (AString[1] = '[') and (AString[Length(AString)] = ']') then - begin - AInt := 0; - AEnumString := ''; - Delete(AString, 1, 1); - Delete(AString, Length(AString), 1); - for I := 1 to Length(AString) do - begin - if AString[I] = ',' then - begin - AddBit(AEnumString); - AEnumString := ''; - end - else - AEnumString := AEnumString + AString[I]; - end; - if AEnumString <> '' then - AddBit(AEnumString); - Move(AInt, ASet, ASize); - end - else - raise EPropertyConvertError.Create(''); -end; - -{$IFNDEF DELPHI5} -function SetSetProp(APropInfo: PPropInfo; const AValue: string): Integer; -type - TIntegerSet = set of 0..SizeOf(Integer) * 8 - 1; -var - P: PChar; - AEnumName: string; - AEnumValue: Longint; - AEnumInfo: PTypeInfo; - - function NextWord(var P: PChar): string; - var - I: Integer; - begin - I := 0; - while not (P[I] in [',', ' ', #0, ']']) do - Inc(I); - SetString(Result, P, I); - while P[I] in [',', ' ', ']'] do - Inc(I); - Inc(P, I); - end; - -begin - Result := 0; - if AValue = '' then - Exit; - P := PChar(AValue); - while P^ in ['[', ' '] do - Inc(P); - AEnumInfo := GetTypeData(APropInfo^.PropType^)^.CompType^; - AEnumName := NextWord(P); - while AEnumName <> '' do - begin - if AEnumInfo^.Kind = tkInteger then - AEnumValue := StrToInt(AEnumName) - else - AEnumValue := GetEnumValue(AEnumInfo, AEnumName); - if AEnumValue < 0 then - raise EPropertyConvertError.CreateFmt(cxGetResourceString(@scxInvalidPropertyElement), [AEnumName]); - Include(TIntegerSet(Result), AEnumValue); - AEnumName := NextWord(P); - end; -end; - -function GetObjectProp(AObject: TObject; APropInfo: PPropInfo): TObject; -begin - Result := TObject(GetOrdProp(AObject, APropInfo)); -end; - -procedure SetObjectProp(AObject: TObject; APropInfo: PPropInfo; AValue: TObject); -begin - if AValue is GetObjectPropClass(AObject, APropInfo) then - SetOrdProp(AObject, APropInfo, Integer(AValue)); -end; - -function GetObjectPropClass(AObject: TObject; APropInfo: PPropInfo): TClass; -var - ATypeData: PTypeData; -begin - ATypeData := GetTypeData(APropInfo^.PropType^); - if ATypeData = nil then - raise EPropertyError.Create(''); - Result := ATypeData^.ClassType; -end; -{$ENDIF} - -function GenRegistryPath(const ARoot: string): string; -begin - Result := ARoot; - if Length(Result) > 0 then - if Result[1] <> '\' then - Result := '\' + Result; -end; - -function DateTimeOrStr(AValue: string): Variant; -var - ADateTimeValue: TDateTime; -begin - {$IFDEF DELPHI6} - if TryStrToDateTime(AValue, ADateTimeValue) then - Result := ADateTimeValue - else - Result := AValue; - {$ELSE} - try - ADateTimeValue := StrToDateTime(AValue); - Result := ADateTimeValue; - except - on EConvertError do - Result := AValue; - end; - {$ENDIF} -end; - -procedure ExtractObjectFullName(const AObjectFullName: string; AParents: TStrings; var AObjectName: string); -var - I: Integer; - AName: string; -begin - if AParents <> nil then - begin - AObjectName := ''; - AName := ''; - for I := 1 to Length(AObjectFullName) do - begin - if AObjectFullName[I] = '/' then - begin - AParents.Add(AName); - AName := ''; - end - else - AName := AName + AObjectFullName[I]; - end; - AObjectName := AName; - end; -end; - -function IsStringValue(var AValue: string): Boolean; -begin - Result := (Length(AValue) >= 2) and (AValue[1] = '"') and (AValue[Length(AValue)] = '"'); -end; - -{ TcxStorage } - -constructor TcxStorage.Create(const AStorageName: string; AStorageStream: TStream); -begin - inherited Create; - FStorageName := AStorageName; - FStream := AStorageStream; - FReCreate := True; -end; - -constructor TcxStorage.Create(const AStorageName: string); -begin - Create(AStorageName, nil); -end; - -constructor TcxStorage.Create(AStream: TStream); -begin - Create('', AStream); -end; - -procedure TcxStorage.RestoreFrom(AObject: TObject; AReaderClass: TcxCustomReaderClass); -var - AReader: TcxCustomReader; -begin - AReader := AReaderClass.Create(FStorageName, FStream); - try - RestoreWithExistingReader(AObject, AReader); - finally - AReader.Free; - end; -end; - -procedure TcxStorage.RestoreWithExistingReader(AObject: TObject; AReader: TcxCustomReader); -begin - if (AReader <> nil) and AReader.CanRead then - begin - SetStoredObject(AObject); - AReader.BeginRead; - try - InternalRestoreFrom(AReader); - finally - AReader.EndRead; - end; - end; -end; - -procedure TcxStorage.RestoreFromIni(AObject: TObject); -begin - RestoreFrom(AObject, TcxIniFileReader); -end; - -procedure TcxStorage.RestoreFromRegistry(AObject: TObject); -begin - RestoreFrom(AObject, TcxRegistryReader); -end; - -procedure TcxStorage.RestoreFromStream(AObject: TObject); -begin - RestoreFrom(AObject, TcxStreamReader); -end; - -procedure TcxStorage.StoreTo(AObject: TObject; AWriterClass: TcxCustomWriterClass); -var - AWriter: TcxCustomWriter; -begin - AWriter := AWriterClass.Create(FStorageName, FStream, ReCreate); - try - StoreWithExistingWriter(AObject, AWriter); - finally - AWriter.Free; - end; -end; - -procedure TcxStorage.StoreWithExistingWriter(AObject: TObject; AWriter: TcxCustomWriter); -begin - if (AWriter <> nil) and AWriter.CanWrite then - begin - SetStoredObject(AObject); - AWriter.BeginWrite; - try - InternalStoreTo(AWriter); - finally - AWriter.EndWrite; - end; - end; -end; - -procedure TcxStorage.StoreToIni(AObject: TObject); -begin - StoreTo(AObject, TcxIniFileWriter); -end; - -procedure TcxStorage.StoreToRegistry(AObject: TObject); -begin - StoreTo(AObject, TcxRegistryWriter); -end; - -procedure TcxStorage.StoreToStream(AObject: TObject); -begin - StoreTo(AObject, TcxStreamWriter); -end; - -function TcxStorage.CreateChild(const AObjectName, AClassName: string): TObject; -var - AInterface: IcxStoredParent; -begin - Result := nil; - if Supports(FStoredObject, IcxStoredParent, AInterface) then - Result := AInterface.CreateChild(AObjectName, AClassName); - if Result = nil then - begin - if FStoredObject is TCollection then - Result := (FStoredObject as TCollection).Add - end; -end; - -procedure TcxStorage.CreateChildrenNames(AChildren: TStringList); -var - I: Integer; -begin - for I := 0 to AChildren.Count - 1 do - if AChildren[I] = '' then - AChildren[I] := GetObjectName(AChildren.Objects[I]); -end; - -procedure TcxStorage.DeleteChild(const AObjectName: string; AObject: TObject); -var - AInterface: IcxStoredParent; -begin - if Supports(FStoredObject, IcxStoredParent, AInterface) then - AInterface.DeleteChild(AObjectName, AObject) - else - if FStoredObject is TCollection then - AObject.Free; -end; - -procedure TcxStorage.GetAllPublishedClassProperties(AProperties: TStrings); -var - APropList: PPropList; - ATypeInfo: PTypeInfo; - ATypeData: PTypeData; - I: Integer; -begin - ATypeInfo := FStoredObject.ClassInfo; - if ATypeInfo = nil then - Exit; - ATypeData := GetTypeData(ATypeInfo); - - if ATypeData.PropCount > 0 then - begin - GetMem(APropList, SizeOf(PPropInfo) * ATypeData.PropCount); - try - GetPropInfos(ATypeInfo, APropList); - for I := 0 to ATypeData.PropCount - 1 do - if APropList[I].PropType^.Kind = tkClass then - AProperties.Add(dxShortStringToString(APropList[I].Name)); - finally - FreeMem(APropList, SizeOf(PPropInfo) * ATypeData.PropCount); - end; - end; -end; - -procedure TcxStorage.GetAllPublishedProperties(AProperties: TStrings); -var - APropList: PPropList; - ATypeInfo: PTypeInfo; - ATypeData: PTypeData; - I: Integer; -begin - ATypeInfo := FStoredObject.ClassInfo; - if ATypeInfo = nil then - Exit; - ATypeData := GetTypeData(ATypeInfo); - - if ATypeData.PropCount > 0 then - begin - GetMem(APropList, SizeOf(PPropInfo) * ATypeData.PropCount); - try - GetPropInfos(ATypeInfo, APropList); - for I := 0 to ATypeData.PropCount - 1 do - if APropList[I].PropType^.Kind <> tkMethod then - AProperties.Add(dxShortStringToString(APropList[I].Name)); - finally - FreeMem(APropList, SizeOf(PPropInfo) * ATypeData.PropCount); - end; - end; -end; - -procedure TcxStorage.GetChildren(AChildren: TStringList); -var - AInterface: IcxStoredParent; - I: Integer; - AClassProperties: TStringList; - AClassProperty: TObject; -begin - if Supports(FStoredObject, IcxStoredParent, AInterface) then - AInterface.GetChildren(AChildren); - if smSavePublishedClassProperties in GetStorageModes then - begin - AClassProperties := TStringList.Create; - try - if (FStoredObject is TCollection) and - not Supports(FStoredObject, IcxStoredParent) then - with TCollection(FStoredObject) do - for I := 0 to Count - 1 do - AChildren.AddObject(IntToStr(I), Items[I]); - GetAllPublishedClassProperties(AClassProperties); - for I := 0 to AClassProperties.Count - 1 do - begin - AClassProperty := GetClassProperty(AClassProperties[I]); - if AClassProperty <> nil then - if TestClassProperty(AClassProperties[I], AClassProperty) then - AChildren.AddObject(AClassProperties[I], AClassProperty); - end; - finally - AClassProperties.Free; - end; - end; -end; - -function TcxStorage.GetClassProperty(const AName: string): TObject; -var - ATypeInfo: PTypeInfo; - APropInfo: PPropInfo; -begin - Result := nil; - ATypeInfo := FStoredObject.ClassInfo; - if ATypeInfo = nil then - Exit; - APropInfo := GetPropInfo(ATypeInfo, AName); - if APropInfo <> nil then - if APropInfo^.PropType^.Kind = tkClass then - Result := GetObjectProp(FStoredObject, APropInfo); -end; - -function TcxStorage.GetComponentByName(const AName: string): TComponent; -begin - if Assigned(FOnGetComponentByName) then - Result := FOnGetComponentByName(AName) - else - Result := nil; -end; - -function TcxStorage.GetObjectName(AObject: TObject): string; -var - AInterface: IcxStoredObject; - AObj: TObject; -begin - if AObject <> nil then - AObj := AObject - else - AObj := FStoredObject; - - if Supports(AObj, IcxStoredObject, AInterface) then - Result := AInterface.GetObjectName - else - if AObj is TComponent then - Result := (AObj as TComponent).Name - else - Result := 'Object'; -end; - -procedure TcxStorage.GetProperties(AProperties: TStrings); -var - AInterface: IcxStoredObject; -begin - if Supports(FStoredObject, IcxStoredObject, AInterface) then - begin - if not AInterface.GetProperties(AProperties) then - GetAllPublishedProperties(AProperties); - end - else - GetAllPublishedProperties(AProperties); -end; - -function TcxStorage.GetPropertyValue(AName: string): Variant; - - procedure GetPropertyValueByInterface; - var - AInterface: IcxStoredObject; - begin - if Supports(FStoredObject, IcxStoredObject, AInterface) then - AInterface.GetPropertyValue(AName, Result); - end; - - procedure BooleanVariantToStringVariant(var AValue: Variant); - begin - if VarType(AValue) = varBoolean then - begin - if AValue then - AValue := 'True' - else - AValue := 'False'; - end; - end; - -var - ATypeInfo: PTypeInfo; - APropInfo: PPropInfo; - AObject: TObject; -begin - Result := Null; - if not GetUseInterfaceOnly then - begin - ATypeInfo := FStoredObject.ClassInfo; - if ATypeInfo <> nil then - begin - APropInfo := GetPropInfo(ATypeInfo, AName); - if APropInfo <> nil then - begin - case APropInfo^.PropType^.Kind of - tkInteger, tkChar, tkWChar: - Result := GetOrdProp(FStoredObject, APropInfo); - tkEnumeration: - Result := GetEnumProp(FStoredObject, APropInfo); - tkFloat: - Result := GetFloatProp(FStoredObject, APropInfo); - tkSet: - Result := GetSetProp(FStoredObject, APropInfo, True); - tkVariant: - Result := GetVariantProp(FStoredObject, APropInfo); - tkString, tkLString: - Result := GetStrProp(FStoredObject, APropInfo); - {$IFDEF DELPHI6} - tkWString: - Result := GetWideStrProp(FStoredObject, APropInfo); - {$IFDEF DELPHI12} - tkUString: - Result := GetUnicodeStrProp(FStoredObject, APropInfo); - {$ENDIF} - tkInt64: - Result := GetInt64Prop(FStoredObject, APropInfo); - {$ENDIF} - tkClass: - begin - if FSaveComponentPropertiesByName then - begin - AObject := GetObjectProp(FStoredObject, APropInfo); - if AObject is TComponent then - Result := (AObject as TComponent).Name; - end - else - GetPropertyValueByInterface; - end; - else - GetPropertyValueByInterface; - end; - end - else - GetPropertyValueByInterface; - end - else - GetPropertyValueByInterface; - end - else - GetPropertyValueByInterface; - BooleanVariantToStringVariant(Result); -end; - -function TcxStorage.GetStorageModes: TcxStorageModes; -begin - if Assigned(FOnGetStorageModes) then - Result := FOnGetStorageModes - else - Result := FModes; -end; - -function TcxStorage.GetUseInterfaceOnly: Boolean; -begin - if Assigned(FOnGetUseInterfaceOnly) then - Result := FOnGetUseInterfaceOnly - else - Result := FUseInterfaceOnly; -end; - -procedure TcxStorage.InternalRestoreFrom(AReader: TcxCustomReader; - const ADefaultObjectName: string); -var - AProperties: TStringList; - AChildrenNames: TStringList; - AChildrenClassNames: TStringList; - AObjectFullName: string; - AValue: Variant; - AIndex: Integer; - AStorage: TcxStorage; - AChildObject: TObject; - AChildObjectName: string; - AObjectName: string; - I: Integer; - AChildren: TStringList; -begin - AProperties := TStringList.Create; - AChildrenNames := TStringList.Create; - AChildrenClassNames := TStringList.Create; - try - if ADefaultObjectName <> '' then - AObjectName := ADefaultObjectName - else - AObjectName := GetObjectName(nil); - if FNamePrefix <> '' then - AObjectName := FNamePrefix + '.' + AObjectName; - - AObjectFullName := FObjectNamePrefix + AObjectName; - AReader.ReadProperties(AObjectFullName, FStoredObject.ClassName, AProperties); - for I := 0 to AProperties.Count - 1 do - begin - if AProperties[I] = '' then - Continue; - AValue := AReader.ReadProperty(AObjectFullName, FStoredObject.ClassName, AProperties[I]); - if not VarIsNull(AValue) then - SetPropertyValue(AProperties[I], AValue); - end; - - AReader.ReadChildren(AObjectFullName, FStoredObject.ClassName, AChildrenNames, AChildrenClassNames); - - AChildren := TStringList.Create; - try - GetChildren(AChildren); - CreateChildrenNames(AChildren); - for I := 0 to AChildrenNames.Count - 1 do - begin - AIndex := AChildren.IndexOf(AChildrenNames[I]); - if AIndex >= 0 then - begin - AChildObject := AChildren.Objects[AIndex]; - AChildObjectName := AChildren[AIndex]; - AChildren.Delete(AIndex); - end - else - begin - if smChildrenCreating in GetStorageModes then - begin - AChildObject := CreateChild(AChildrenNames[I], AChildrenClassNames[I]); - AChildObjectName := AChildrenNames[I]; - end - else - AChildObject := nil; - end; - - if AChildObject <> nil then - begin - AStorage := TcxStorage.Create(''); - AStorage.FObjectNamePrefix := AObjectFullName + '/'; - AStorage.FNamePrefix := ''; - AStorage.FStoredObject := AChildObject; - AStorage.OnTestClassProperty := FOnTestClassProperty; - AStorage.OnGetComponentByName := FOnGetComponentByName; - AStorage.FModes := Modes; - AStorage.SaveComponentPropertiesByName := FSaveComponentPropertiesByName; - try - AStorage.InternalRestoreFrom(AReader, AChildObjectName); - finally - AStorage.Free; - end; - end; - end; - - if smChildrenDeleting in GetStorageModes then - begin - if AChildren.Count > 0 then - begin - for I := 0 to AChildren.Count - 1 do - DeleteChild(AChildren[I], AChildren.Objects[I]); - end; - end; - finally - AChildren.Free; - end; - finally - AProperties.Free; - AChildrenNames.Free; - AChildrenClassNames.Free; - end; -end; - -procedure TcxStorage.InternalStoreTo(AWriter: TcxCustomWriter; const ADefaultObjectName: string); -var - AProperties: TStringList; - AStorage: TcxStorage; - I: Integer; - AObjectFullName: string; - AObjectName: string; - APropertyValue: Variant; - AChildren: TStringList; -begin - AProperties := TStringList.Create; - try - if ADefaultObjectName <> '' then - AObjectName := ADefaultObjectName - else - AObjectName := GetObjectName(nil); - if FNamePrefix <> '' then - AObjectName := FNamePrefix + '.' + AObjectName; - - AObjectFullName := FObjectNamePrefix + AObjectName; - AWriter.BeginWriteObject(AObjectFullName, FStoredObject.ClassName); - - GetProperties(AProperties); - for I := 0 to AProperties.Count - 1 do - begin - APropertyValue := GetPropertyValue(AProperties[I]); - if not (VarIsEmpty(APropertyValue) or VarIsNull(APropertyValue)) then - AWriter.WriteProperty(AObjectFullName, FStoredObject.ClassName, AProperties[I], APropertyValue); - end; - - AChildren := TStringList.Create; - try - GetChildren(AChildren); - for I := 0 to AChildren.Count - 1 do - begin - AStorage := TcxStorage.Create(''); - AStorage.FObjectNamePrefix := AObjectFullName + '/'; - AStorage.FNamePrefix := ''; - AStorage.FStoredObject := AChildren.Objects[I]; - AStorage.OnTestClassProperty := FOnTestClassProperty; - AStorage.OnGetComponentByName := FOnGetComponentByName; - AStorage.Modes := Modes; - AStorage.SaveComponentPropertiesByName := FSaveComponentPropertiesByName; - try - AStorage.InternalStoreTo(AWriter, AChildren[I]); - finally - AStorage.Free; - end; - end; - finally - AChildren.Free; - end; - AWriter.EndWriteObject(AObjectFullName, FStoredObject.ClassName); - finally - AProperties.Free; - end; -end; - -procedure TcxStorage.SetPropertyValue(AName: string; AValue: Variant); - - procedure SetPropertyValueByInterface; - var - AInterface: IcxStoredObject; - begin - if Supports(FStoredObject, IcxStoredObject, AInterface) then - AInterface.SetPropertyValue(AName, AValue); - end; - -var - ATypeInfo: PTypeInfo; - APropInfo: PPropInfo; -{$IFDEF DELPHI6} - AInt64: Int64; -{$ENDIF} - AClass: TClass; - AComponent: TComponent; -begin - if not VarIsNull(AValue) then - begin - if not GetUseInterfaceOnly then - begin - ATypeInfo := FStoredObject.ClassInfo; - if ATypeInfo <> nil then - begin - APropInfo := GetPropInfo(ATypeInfo, AName); - if APropInfo <> nil then - begin - case APropInfo^.PropType^.Kind of - tkInteger, tkChar, tkWChar: - SetOrdProp(FStoredObject, APropInfo, AValue); - tkEnumeration: - {$IFDEF DELPHI6} - SetEnumProp(FStoredObject, APropInfo, AValue); - {$ELSE} - SetEnumProp(FStoredObject, AName, VarToStr(AValue)); - {$ENDIF} - tkFloat: - SetFloatProp(FStoredObject, APropInfo, AValue); - tkString, tkLString: - SetStrProp(FStoredObject, AName, VarToStr(AValue)); - {$IFDEF DELPHI6} - tkWString: - SetWideStrProp(FStoredObject, APropInfo, AValue); - {$IFDEF DELPHI12} - tkUString: - SetUnicodeStrProp(FStoredObject, APropInfo, AValue); - {$ENDIF} - tkInt64: - begin - AInt64 := AValue; - SetInt64Prop(FStoredObject, APropInfo, AInt64); - end; - {$ENDIF} - tkSet: - {$IFDEF DELPHI6} - SetSetProp(FStoredObject, APropInfo, AValue); - {$ELSE} - SetSetProp(FStoredObject, AName, VarToStr(AValue)); - {$ENDIF} - tkVariant: - SetVariantProp(FStoredObject, APropInfo, AValue); - tkClass: - begin - if FSaveComponentPropertiesByName then - begin - if VarIsStr(AValue) then - begin - AClass := GetObjectPropClass(FStoredObject, APropInfo); - if (AClass = TComponent) or (AClass.InheritsFrom(TComponent)) then - begin - AComponent := GetComponentByName(VarToStr(AValue)); - if AComponent <> nil then - SetObjectProp(FStoredObject, APropInfo, AComponent); - end - else - SetPropertyValueByInterface; - end - else - SetPropertyValueByInterface; - end - else - SetPropertyValueByInterface; - end; - else - SetPropertyValueByInterface; - end; - end - else - SetPropertyValueByInterface; - end - else - SetPropertyValueByInterface; - end - else - SetPropertyValueByInterface; - end; -end; - -procedure TcxStorage.SetStoredObject(AObject: TObject); -begin - FStoredObject := AObject; -end; - -function TcxStorage.TestClassProperty(const AName: string; - AObject: TObject): Boolean; -begin - if Assigned(FOnTestClassProperty) then - Result := FOnTestClassProperty(AName, AObject) - else - Result := True; -end; - -{ TcxCustomReader } - -constructor TcxCustomReader.Create(const AStorageName: string); -begin - Create(AStorageName, nil); -end; - -constructor TcxCustomReader.Create(const AStorageName: string; AStorageStream: TStream); -begin - inherited Create; - FStorageName := AStorageName; - SetStream(AStorageStream); -end; - -procedure TcxCustomReader.ReadChildren(const AObjectName, AClassName: string; - AChildrenNames, AChildrenClassNames: TStrings); -begin -end; - -procedure TcxCustomReader.ReadProperties(const AObjectName, AClassName: string; AProperties: TStrings); -begin -end; - -function TcxCustomReader.ReadProperty(const AObjectName, AClassName, AName: string): Variant; -begin - Result := Null; -end; - -procedure TcxCustomReader.SetStream(AStream: TStream); -begin - if FStorageStream <> AStream then - DoSetStream(AStream); -end; - -function TcxCustomReader.CanRead: Boolean; -begin - Result := True; -end; - -procedure TcxCustomReader.DoSetStream(AStream: TStream); -begin - FStorageStream := AStream; -end; - -procedure TcxCustomReader.BeginRead; -begin - -end; - -procedure TcxCustomReader.EndRead; -begin - -end; - -{ TcxCustomWriter } - -constructor TcxCustomWriter.Create(const AStorageName: string; AReCreate: Boolean); -begin - Create(AStorageName, nil, AReCreate); -end; - -constructor TcxCustomWriter.Create(const AStorageName: string; AStorageStream: TStream; AReCreate: Boolean = True); -begin - inherited Create; - FStorageName := AStorageName; - FReCreate := AReCreate; - SetStream(AStorageStream); -end; - -procedure TcxCustomWriter.BeginWriteObject(const AObjectName, AClassName: string); -begin -end; - -procedure TcxCustomWriter.EndWriteObject(const AObjectName, AClassName: string); -begin -end; - -procedure TcxCustomWriter.SetStream(AStream: TStream); -begin - if FStorageStream <> AStream then - DoSetStream(AStream); -end; - -procedure TcxCustomWriter.WriteProperty(const AObjectName, AClassName, AName: string; AValue: Variant); -begin -end; - -function TcxCustomWriter.CanWrite: Boolean; -begin - Result := True; -end; - -procedure TcxCustomWriter.DoSetStream(AStream: TStream); -begin - FStorageStream := AStream; -end; - -procedure TcxCustomWriter.BeginWrite; -begin - -end; - -procedure TcxCustomWriter.EndWrite; -begin - -end; - -{ TcxStreamReader } - -destructor TcxStreamReader.Destroy; -begin - FreeAndNil(FReader); - FreeAndNil(FRootObject); - - inherited Destroy; -end; - -procedure TcxStreamReader.Read; -begin - FRootObject.Free; - FRootObject := TcxStreamObjectData.Create('', ''); - - if (FStorageStream <> nil) and (FReader.Position < FStorageStream.Size) then - FRootObject.Read(FReader); -end; - -procedure TcxStreamReader.ReadChildren(const AObjectName, AClassName: string; - AChildrenNames, AChildrenClassNames: TStrings); -var - I: Integer; - AObject: TcxStreamObjectData; -begin - AObject := GetObject(AObjectName); - if AObject <> nil then - begin - for I := 0 to AObject.ChildCount - 1 do - begin - AChildrenNames.Add(AObject.Children[I].Name); - AChildrenClassNames.Add(AObject.Children[I].ClassName_); - end; - end; -end; - -procedure TcxStreamReader.ReadProperties(const AObjectName, AClassName: string; AProperties: TStrings); -var - AObject: TcxStreamObjectData; - I: Integer; -begin - AObject := GetObject(AObjectName); - if AObject <> nil then - begin - for I := 0 to AObject.PropertyCount - 1 do - AProperties.Add(AObject.Properties[I].Name); - end; -end; - -function TcxStreamReader.ReadProperty(const AObjectName, AClassName, AName: string): Variant; -var - AProperty: TcxStreamPropertyData; -begin - AProperty := GetProperty(GetObject(AObjectName), AName); - if AProperty <> nil then - Result := AProperty.Value - else - Result := Null; -end; - -function TcxStreamReader.CanRead: Boolean; -begin - Result := (FStorageStream <> nil) and (FStorageStream.Size > 0); -end; - -procedure TcxStreamReader.DoSetStream(AStream: TStream); -begin - inherited; - FReader.Free; - FReader := TReader.Create(AStream, cxBufferSize); -end; - -procedure TcxStreamReader.BeginRead; -begin - Read; -end; - -function TcxStreamReader.GetObject(const AObjectFullName: string): TcxStreamObjectData; -var - AObjectName: string; - AParents: TStringList; -begin - if AObjectFullName = FCurrentObjectFullName then - Result := FCurrentObject - else - begin - AParents := TStringList.Create; - try - ExtractObjectFullName(AObjectFullName, AParents, AObjectName); - Result := InternalGetObject(AObjectName, AParents); - if Result <> nil then - begin - FCurrentObjectFullName := AObjectFullName; - FCurrentObject := Result; - end; - finally - AParents.Free; - end; - end; -end; - -function TcxStreamReader.GetProperty(AObject: TcxStreamObjectData; const AName: string): TcxStreamPropertyData; -var - I: Integer; -begin - Result := nil; - - for I := 0 to AObject.PropertyCount - 1 do - if AObject.Properties[I].Name = AName then - begin - Result := AObject.Properties[I]; - Break; - end; -end; - -function TcxStreamReader.InternalGetObject(const AObjectName: string; AParents: TStrings): TcxStreamObjectData; -var - I, J: Integer; - AObject: TcxStreamObjectData; -begin - AParents.Add(AObjectName); - AObject := FRootObject; - for I := 1 to AParents.Count - 1 do - begin - for J := 0 to AObject.ChildCount - 1 do - begin - if AParents[I] = AObject.Children[J].Name then - begin - AObject := AObject.Children[J]; - Break; - end; - end; - end; - - if AObject.Name = AObjectName then - Result := AObject - else - Result := nil; -end; - -{ TcxStreamWriter } - -destructor TcxStreamWriter.Destroy; -begin - FreeAndNil(FWriter); - FreeAndNil(FRootObject); - inherited Destroy; -end; - -procedure TcxStreamWriter.BeginWriteObject(const AObjectName, AClassName: string); -var - AName: string; - AParents: TStringList; -begin - AParents := TStringList.Create; - try - ExtractObjectFullName(AObjectName, AParents, AName); - CreateObject(AName, AClassName, AParents); - finally - AParents.Free; - end; -end; - -procedure TcxStreamWriter.Write; -begin - if FRootObject <> nil then - FRootObject.Write(FWriter); - FRootObject.Free; - FRootObject := nil; - FCurrentObject := nil; -end; - -procedure TcxStreamWriter.WriteProperty(const AObjectName, AClassName, AName: string; AValue: Variant); -begin - if FCurrentObject <> nil then - FCurrentObject.AddProperty(TcxStreamPropertyData.Create(AName, AValue)); -end; - -function TcxStreamWriter.CanWrite: Boolean; -begin - Result := FStorageStream <> nil; -end; - -procedure TcxStreamWriter.DoSetStream(AStream: TStream); -begin - inherited; - FWriter.Free; - FWriter := TWriter.Create(FStorageStream, cxBufferSize); -end; - -procedure TcxStreamWriter.EndWrite; -begin - Write; -end; - -procedure TcxStreamWriter.CreateObject(const AObjectName, AClassName: string; AParents: TStrings); -var - I, J: Integer; - AObject: TcxStreamObjectData; - ANewObject: TcxStreamObjectData; -begin - if (FRootObject = nil) and (FCurrentObject = nil) then - begin - if AParents.Count = 0 then - begin - FRootObject := TcxStreamObjectData.Create(AObjectName, AClassName); - FCurrentObject := FRootObject; - end; - end - else - begin - AObject := FRootObject; - for I := 1 to AParents.Count - 1 do - begin - for J := 0 to AObject.ChildCount - 1 do - begin - if AParents[I] = AObject.Children[J].Name then - begin - AObject := AObject.Children[J]; - Break; - end; - end; - end; - ANewObject := TcxStreamObjectData.Create(AObjectName, AClassName); - FCurrentObject := ANewObject; - AObject.AddChild(ANewObject); - end; -end; - -{ TcxRegistryReader } - -constructor TcxRegistryReader.Create(const AStorageName: string; AStorageStream: TStream); -begin - inherited Create(AStorageName, AStorageStream); - - FRegistry := TRegistry.Create(KEY_READ); - if not FRegistry.OpenKey(GenRegistryPath(AStorageName), False) then - // raise ERegistryException.CreateFmt(cxGetResourceString(@scxCantOpenRegistryKey), [AStorageName]); -end; - -destructor TcxRegistryReader.Destroy; -begin - FreeAndNil(FRegistry); - - inherited Destroy; -end; - -procedure TcxRegistryReader.ReadChildren(const AObjectName, AClassName: string; - AChildrenNames, AChildrenClassNames: TStrings); -var - I: Integer; - APath: string; -begin - FRegistry.GetKeyNames(AChildrenNames); - for I := 0 to AChildrenNames.Count - 1 do - if AChildrenNames[I] = '[ClassName]' then - begin - AChildrenNames.Delete(I); - Break; - end; - - APath := FRegistry.CurrentPath; - for I := 0 to AChildrenNames.Count - 1 do - begin - FRegistry.OpenKey(AChildrenNames[I] + '\[ClassName]', False); - AChildrenClassNames.Add(FRegistry.ReadString('ClassName')); - FRegistry.CloseKey; - FRegistry.OpenKey(APath, False); - end; -end; - -procedure TcxRegistryReader.ReadProperties(const AObjectName, AClassName: string; AProperties: TStrings); -var - AName: string; - AParents: TStringList; - ANewPath: string; - I: Integer; -begin - AParents := TStringList.Create; - try - ExtractObjectFullName(AObjectName, AParents, AName); - ANewPath := GenRegistryPath(StorageName); - for I := 0 to AParents.Count - 1 do - ANewPath := ANewPath + '\' + AParents[I]; - if FRegistry.OpenKey(ANewPath + '\' + AName, False) then - FRegistry.GetValueNames(AProperties); - finally - AParents.Free; - end; -end; - -function TcxRegistryReader.ReadProperty(const AObjectName, AClassName, AName: string): Variant; -var - AValue: string; - ARealValue: Double; - ACode: Integer; -begin - case FRegistry.GetDataType(AName) of - rdString, rdExpandString: - begin - AValue := FRegistry.ReadString(AName); - - if IsStringValue(AValue) then - Result := CorrectStringValue(AValue) - else - begin - Val(AValue, ARealValue, ACode); - if ACode = 0 then - Result := ARealValue - else - Result := DateTimeOrStr(AValue); - end; - end; - rdInteger: - Result := FRegistry.ReadInteger(AName); - rdBinary: - Result := FRegistry.ReadFloat(AName); - else - Result := Null; - end; -end; - -function TcxRegistryReader.CorrectStringValue(const S: string): string; -begin - Result := S; - Delete(Result, 1, 1); - Delete(Result, Length(Result), 1); -end; - -{ TcxRegistryWriter } - -constructor TcxRegistryWriter.Create(const AStorageName: string; AStream: TStream; AReCreate: Boolean = True); -begin - inherited Create(AStorageName, AStream, AReCreate); - - FRegistry := TRegistry.Create; - - if FReCreate then - begin - if AStorageName <> '' then - FRegistry.DeleteKey(GenRegistryPath(AStorageName)); - FRootKeyCreated := False; - end; - - FRootKeyCreated := FRegistry.KeyExists(GenRegistryPath(AStorageName)); - FRootKeyOpened := False; -end; - -destructor TcxRegistryWriter.Destroy; -begin - FreeAndNil(FRegistry); - - inherited Destroy; -end; - -procedure TcxRegistryWriter.BeginWriteObject(const AObjectName, AClassName: string); -var - AParents: TStringList; - AName, APath: string; - AResult: Boolean; -begin - CreateRootKey; - AParents := TStringList.Create; - try - ExtractObjectFullName(AObjectName, AParents, AName); - AResult := FRegistry.CreateKey(AName) and FRegistry.OpenKey(AName, False); - APath := FRegistry.CurrentPath; - if AResult then - begin - AResult := FRegistry.CreateKey('[ClassName]') and FRegistry.OpenKey('[ClassName]', False); - if AResult then - begin - FRegistry.WriteString('ClassName', AClassName); - FRegistry.CloseKey; - end; - end; - AResult := AResult and FRegistry.OpenKey(APath, False); - if not AResult then - raise ERegistryException.CreateFmt(scxErrorStoreObject, [AObjectName]); - finally - AParents.Free; - end; -end; - -procedure TcxRegistryWriter.EndWriteObject(const AObjectName, AClassName: string); -var - AName: string; - AParents: TStringList; - ANewKey: string; - I: Integer; -begin - FRegistry.CloseKey; - - AParents := TStringList.Create; - try - ExtractObjectFullName(AObjectName, AParents, AName); - ANewKey := GenRegistryPath(FStorageName); - for I := 0 to AParents.Count - 1 do - ANewKey := ANewKey + '\' + AParents[I]; - FRegistry.OpenKey(ANewKey, False); - finally - AParents.Free; - end; -end; - -procedure TcxRegistryWriter.WriteProperty(const AObjectName, AClassName, AName: string; AValue: Variant); -begin - case VarType(AValue) of - // CLR: varDecimal TODO - {$IFDEF DELPHI6} - varInt64, varLongWord, varWord, varShortInt, - {$ENDIF} - varInteger, varSmallInt, varByte: - FRegistry.WriteInteger(AName, AValue); - varSingle, varDouble: - FRegistry.WriteFloat(AName, AValue); - varCurrency: - FRegistry.WriteCurrency(AName, AValue); - {$IFDEF DELPHI12} - varUString, - {$ENDIF} - varString, varOleStr: - FRegistry.WriteString(AName, CorrectStringValue(AValue)); - varDate: - FRegistry.WriteDateTime(AName, AValue); - varBoolean: - FRegistry.WriteBool(AName, AValue); - end; -end; - -function TcxRegistryWriter.CorrectStringValue(const S: string): string; -begin - Result := '"' + S + '"'; -end; - -procedure TcxRegistryWriter.CreateRootKey; -begin - if not FRootKeyCreated then - begin - if not FRegistry.CreateKey(GenRegistryPath(FStorageName)) then - raise ERegistryException.CreateFmt(cxGetResourceString(@scxCantCreateRegistryKey), [FStorageName]); - FRootKeyCreated := True; - end; - - if not FRootKeyOpened then - begin - if not FRegistry.OpenKey(GenRegistryPath(FStorageName), False) then - raise ERegistryException.CreateFmt(cxGetResourceString(@scxCantOpenRegistryKey), [FStorageName]); - - FRootKeyOpened := True; - end; -end; - -{ TcxIniFileReader } - -constructor TcxIniFileReader.Create(const AStorageName: string; AStorageStream: TStream); -begin - inherited Create(AStorageName, AStorageStream); - - FIniFile := TMemIniFile.Create(AStorageName); -end; - -destructor TcxIniFileReader.Destroy; -begin - FreeAndNil(FIniFile); - FreeAndNil(FPathList); - FreeAndNil(FObjectNameList); - FreeAndNil(FClassNameList); - - inherited Destroy; -end; - -procedure TcxIniFileReader.ReadChildren(const AObjectName, AClassName: string; - AChildrenNames, AChildrenClassNames: TStrings); -var - I: Integer; - AParentPath: string; -begin - CreateLists; - - if AObjectName <> '' then - AParentPath := UpperCase(AObjectName) + '/' - else - AParentPath := UpperCase(AObjectName); - - for I := 0 to FPathList.Count - 1 do - begin - if FPathList[I] = AParentPath then - begin - AChildrenNames.Add(FObjectNameList[I]); - AChildrenClassNames.Add(FClassNameList[I]); - end; - end; -end; - -procedure TcxIniFileReader.ReadProperties(const AObjectName, AClassName: string; AProperties: TStrings); -var - ASectionName: string; -begin - ASectionName := AObjectName + ': ' + AClassName; - FIniFile.ReadSection(ASectionName, AProperties); -end; - -function TcxIniFileReader.ReadProperty(const AObjectName, AClassName, AName: string): Variant; -var - ASectionName: string; - AValue: string; - AIntegerValue: Integer; - ARealValue: Double; - ACode: Integer; -begin - ASectionName := AObjectName + ': ' + AClassName; - AValue := FIniFile.ReadString(ASectionName, AName, ''); - - if IsStringValue(AValue) then - Result := CorrectStringValue(AValue) - else - begin - Val(AValue, AIntegerValue, ACode); - if ACode = 0 then - Result := AIntegerValue - else - begin - Val(AValue, ARealValue, ACode); - if ACode = 0 then - Result := ARealValue - else - Result := DateTimeOrStr(AValue); - end; - end; -end; - -procedure TcxIniFileReader.BeginRead; -begin - FStorageVersion := FIniFile.ReadInteger('Main', 'Version', 0); -end; - -function TcxIniFileReader.CanRead: Boolean; -begin - Result := FileExists(StorageName); -end; - -function TcxIniFileReader.CorrectStringValue(const S: string): string; -begin - Result := S; - Delete(Result, 1, 1); - Delete(Result, Length(Result), 1); - if FStorageVersion = 1 then - begin - Result := StringReplace(Result, ' \n', #13#10, [rfReplaceAll, rfIgnoreCase]); - Result := StringReplace(Result, '\\n', '\n', [rfReplaceAll, rfIgnoreCase]); - end; -end; - -procedure TcxIniFileReader.CreateLists; -var - ASectionList: TStringList; - I: Integer; - APath: string; - AObjectName: string; - AClassName: string; -begin - if (FPathList = nil) or (FObjectNameList = nil) or (FClassNameList = nil) then - begin - FPathList := TStringList.Create; - FObjectNameList := TStringList.Create; - FClassNameList := TStringList.Create; - ASectionList := TStringList.Create; - try - FIniFile.ReadSections(ASectionList); - for I := 0 to ASectionList.Count - 1 do - begin - GetSectionDetail(ASectionList[I], APath, AObjectName, AClassName); - FPathList.Add(UpperCase(APath)); - FObjectNameList.Add(AObjectName); - FClassNameList.Add(AClassName); - end; - finally - ASectionList.Free; - end; - end; -end; - -procedure TcxIniFileReader.GetSectionDetail(const ASection: string; var APath, AObjectName, AClassName: string); -var - I: Integer; - AName: string; -begin - AName := ''; - APath := ''; - AObjectName := ''; - AClassName := ''; - - for I := 1 to Length(ASection) do - if ASection[I] = '/' then - begin - APath := APath + AName + '/'; - AName := ''; - end - else - if ASection[I] = ':' then - begin - AObjectName := AName; - AName := ''; - end - else - AName := AName + ASection[I]; - AClassName := Trim(AName); -end; - -{ TcxIniFileWriter } - -constructor TcxIniFileWriter.Create(const AStorageName: string; AStream: TStream; AReCreate: Boolean = True); -//var -// AFileName: string; -begin - inherited Create(AStorageName, AStream, AReCreate); - -// AFileName := ChangeFileExt(AStorageName, '.ini'); - FIniFile := TMemIniFile.Create(AStorageName{$IFDEF DELPHI12}, TEncoding.Unicode{$ENDIF}); - - if FReCreate then - FIniFile.Clear; - -{$IFDEF DELPHI6} - FIniFile.CaseSensitive := False; -{$ENDIF} -end; - -destructor TcxIniFileWriter.Destroy; -begin - FreeAndNil(FIniFile); - inherited Destroy; -end; - -procedure TcxIniFileWriter.BeginWriteObject(const AObjectName, AClassName: string); -begin - FIniFile.WriteString(AObjectName + ': ' + AClassName, '', ''); -end; - -procedure TcxIniFileWriter.WriteProperty(const AObjectName, AClassName, AName: string; - AValue: Variant); -var - ASectionName: string; -begin - ASectionName := AObjectName + ': ' + AClassName; - case VarType(AValue) of - // CLR: varDecimal TODO - {$IFDEF DELPHI6} - varShortInt, varWord, varLongWord, varInt64, - {$ENDIF} - varSmallInt, varInteger, varByte: - FIniFile.WriteInteger(ASectionName, AName, AValue); - varSingle, varDouble, varCurrency: - FIniFile.WriteFloat(ASectionName, AName, AValue); - {$IFDEF DELPHI12} - varUString, - {$ENDIF} - varString, varOleStr: - FIniFile.WriteString(ASectionName, AName, CorrectStringValue(AValue)); - varDate: - FIniFile.WriteDateTime(ASectionName, AName, AValue); - end; -end; - -const - cxIniFileStorageVersion = 1; - -procedure TcxIniFileWriter.BeginWrite; -begin - FIniFile.WriteInteger('Main', 'Version', cxIniFileStorageVersion); -end; - -procedure TcxIniFileWriter.EndWrite; -begin - FIniFile.UpdateFile; -end; - -function TcxIniFileWriter.CorrectStringValue(const S: string): string; -begin - Result := StringReplace(S, '\n', '\\n', [rfReplaceAll, rfIgnoreCase]); - Result := StringReplace(Result, #13#10, ' \n', [rfReplaceAll, rfIgnoreCase]); - Result := '"' + Result + '"'; -end; - -{ TcxStreamPropertyData } - -constructor TcxStreamPropertyData.Create(AName: string; AValue: Variant); -begin - inherited Create; - FName := AName; - FValue := AValue; -end; - -procedure TcxStreamPropertyData.Read(AReader: TReader); -begin - with AReader do - FName := ReadString; - ReadValue(AReader); -end; - -procedure TcxStreamPropertyData.Write(AWriter: TWriter); -begin - with AWriter do - WriteString(FName); - WriteValue(AWriter); -end; - -procedure TcxStreamPropertyData.ReadValue(AReader: TReader); -var - AStreamType: Integer; -begin - AStreamType := AReader.ReadInteger; - case AStreamType of - cxStreamBoolean: - FValue := AReader.ReadBoolean; - cxStreamChar: - FValue := Byte(AReader.ReadChar); - cxStreamCurrency: - FValue := AReader.ReadCurrency; - cxStreamDate: - FValue := AReader.ReadDate; - cxStreamFloat: - FValue := AReader.ReadFloat; - cxStreamInteger: - FValue := AReader.ReadInteger; - cxStreamSingle: - FValue := AReader.ReadSingle; - cxStreamString: - FValue := AReader.ReadString; - cxStreamWideString: - FValue := AReader.ReadWideString; - end; -end; - -procedure TcxStreamPropertyData.WriteValue(AWriter: TWriter); -begin - // CLR: varChar, varDateTime, varDecimal TODO - case VarType(FValue) of - {$IFDEF DELPHI6} - varShortInt, varWord, varLongWord, varInt64, - {$ENDIF} - varSmallInt, varInteger: - begin - AWriter.WriteInteger(cxStreamInteger); - AWriter.WriteInteger(FValue); - end; - varSingle: - begin - AWriter.WriteInteger(cxStreamSingle); - AWriter.WriteSingle(FValue); - end; - varDouble: - begin - AWriter.WriteInteger(cxStreamFloat); - AWriter.WriteFloat(FValue); - end; - varCurrency: - begin - AWriter.WriteInteger(cxStreamCurrency); - AWriter.WriteCurrency(FValue); - end; - varDate: - begin - AWriter.WriteInteger(cxStreamDate); - AWriter.WriteDate(FValue); - end; - {$IFDEF DELPHI12} - varUString, - {$ENDIF} - varOleStr: - begin - AWriter.WriteInteger(cxStreamWideString); - AWriter.WriteWideString(FValue); - end; - varBoolean: - begin - AWriter.WriteInteger(cxStreamBoolean); - AWriter.WriteBoolean(FValue); - end; - varByte: - begin - AWriter.WriteInteger(cxStreamChar); - AWriter.WriteChar(Char(Byte(FValue))); - end; - varString: - begin - AWriter.WriteInteger(cxStreamString); - AWriter.WriteString(FValue); - end; - end; -end; - -{ TcxStreamObjectData } - -constructor TcxStreamObjectData.Create(const AName, AClassName: string); -begin - inherited Create; - FName := AName; - FClassName := AClassName; - FChildren := TList.Create; - FProperties := TList.Create; -end; - -destructor TcxStreamObjectData.Destroy; -begin - Clear; - FChildren.Free; - FProperties.Free; - - inherited Destroy; -end; - -procedure TcxStreamObjectData.Clear; -var - I: Integer; -begin - for I := 0 to FProperties.Count - 1 do - TcxStreamPropertyData(FProperties[I]).Free; - FProperties.Clear; - - for I := 0 to FChildren.Count - 1 do - TcxStreamObjectData(FChildren[I]).Free; - FChildren.Clear; -end; - -procedure TcxStreamObjectData.AddChild(AChild: TcxStreamObjectData); -begin - FChildren.Add(AChild); -end; - -procedure TcxStreamObjectData.AddProperty(AProperty: TcxStreamPropertyData); -begin - FProperties.Add(AProperty); -end; - -procedure TcxStreamObjectData.Read(AReader: TReader); -var - ACount: Integer; - I: Integer; -begin - with AReader do - begin - FName := ReadString; - FClassName := ReadString; - ACount := ReadInteger; - for I := 0 to ACount - 1 do - begin - AddProperty(TcxStreamPropertyData.Create('', Null)); - TcxStreamPropertyData(FProperties.Last).Read(AReader); - end; - ACount := ReadInteger; - for I := 0 to ACount - 1 do - begin - AddChild(TcxStreamObjectData.Create('', '')); - TcxStreamObjectData(FChildren.Last).Read(AReader); - end; - end; -end; - -procedure TcxStreamObjectData.Write(AWriter: TWriter); -var - I: Integer; -begin - with AWriter do - begin - WriteString(FName); - WriteString(FClassName); - WriteInteger(PropertyCount); - for I := 0 to PropertyCount - 1 do - Properties[I].Write(AWriter); - WriteInteger(ChildCount); - for I := 0 to ChildCount - 1 do - Children[I].Write(AWriter); - end; -end; - -function TcxStreamObjectData.GetChildCount: Integer; -begin - Result := FChildren.Count; -end; - -function TcxStreamObjectData.GetChildren(AIndex: Integer): TcxStreamObjectData; -begin - Result := TcxStreamObjectData(FChildren[AIndex]); -end; - -function TcxStreamObjectData.GetProperties(AIndex: Integer): TcxStreamPropertyData; -begin - Result := TcxStreamPropertyData(FProperties[AIndex]); -end; - -function TcxStreamObjectData.GetPropertyCount: Integer; -begin - Result := FProperties.Count; -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxStyleRepositoryEditor.dfm b/internal/x.46/ExpressLibrary/Sources/cxStyleRepositoryEditor.dfm deleted file mode 100644 index 93e31b5c..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxStyleRepositoryEditor.dfm +++ /dev/null @@ -1,233 +0,0 @@ -inherited cxStyleRepositoryEditor: TcxStyleRepositoryEditor - Left = 333 - Top = 185 - Width = 317 - Height = 412 - Caption = 'StyleRepository editor' - Constraints.MinHeight = 350 - Constraints.MinWidth = 300 - Position = poDefaultPosOnly - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 0 - Top = 0 - Width = 309 - Height = 378 - ActivePage = tsStyles - Align = alClient - TabOrder = 0 - object tsStyles: TTabSheet - Caption = 'Styles' - object lbStyles: TListBox - Left = 0 - Top = 0 - Width = 210 - Height = 350 - Align = alClient - ItemHeight = 13 - MultiSelect = True - PopupMenu = pmStyles - TabOrder = 0 - OnClick = lbStylesClick - end - object pnlStyles: TPanel - Left = 210 - Top = 0 - Width = 91 - Height = 350 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btStyleAdd: TButton - Left = 9 - Top = 8 - Width = 75 - Height = 25 - Caption = '&Add' - TabOrder = 0 - OnClick = btStyleAddClick - end - object btStyleDelete: TButton - Left = 9 - Top = 40 - Width = 75 - Height = 25 - Caption = '&Delete' - TabOrder = 1 - OnClick = btStyleDeleteClick - end - object btClose: TButton - Left = 9 - Top = 316 - Width = 75 - Height = 26 - Anchors = [akLeft, akBottom] - Caption = '&Close' - TabOrder = 2 - OnClick = btCloseClick - end - end - end - object tsStyleSheets: TTabSheet - Caption = 'Style Sheets' - ImageIndex = 1 - object lbStyleSheets: TListBox - Left = 0 - Top = 0 - Width = 201 - Height = 350 - Align = alClient - ItemHeight = 13 - MultiSelect = True - PopupMenu = pmStyleSheets - TabOrder = 0 - OnClick = lbStyleSheetsClick - end - object pnlStyleSheets: TPanel - Left = 201 - Top = 0 - Width = 100 - Height = 350 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btStyleSheetAdd: TButton - Left = 9 - Top = 8 - Width = 85 - Height = 25 - Caption = '&Add...' - TabOrder = 0 - OnClick = btStyleSheetAddClick - end - object btStyleSheetDelete: TButton - Left = 9 - Top = 38 - Width = 85 - Height = 25 - Caption = '&Delete' - TabOrder = 1 - OnClick = btStyleSheetDeleteClick - end - object Button3: TButton - Left = 9 - Top = 316 - Width = 85 - Height = 26 - Anchors = [akLeft, akBottom] - Caption = '&Close' - TabOrder = 2 - OnClick = btCloseClick - end - object btnStyleSheetEdit: TButton - Left = 9 - Top = 68 - Width = 85 - Height = 25 - Caption = '&Edit...' - TabOrder = 3 - OnClick = btnStyleSheetEditClick - end - object btnStyleSheetsSave: TButton - Left = 9 - Top = 104 - Width = 85 - Height = 25 - Caption = '&Save to ini...' - TabOrder = 4 - OnClick = btnStyleSheetsSaveClick - end - object btnStyleSheetsLoad: TButton - Left = 9 - Top = 133 - Width = 85 - Height = 25 - Caption = '&Load from ini...' - TabOrder = 5 - OnClick = btnStyleSheetsLoadClick - end - object btnStyleSheetsPredefine: TButton - Left = 9 - Top = 163 - Width = 85 - Height = 25 - Caption = '&Predefined...' - TabOrder = 6 - OnClick = btnStyleSheetsPredefineClick - end - end - end - end - object pmStyles: TPopupMenu - Left = 40 - Top = 88 - object miStyleAdd: TMenuItem - Caption = 'Add' - ShortCut = 45 - OnClick = btStyleAddClick - end - object miStyleDelete: TMenuItem - Caption = 'Delete' - Enabled = False - ShortCut = 46 - OnClick = btStyleDeleteClick - end - object N1: TMenuItem - Caption = '-' - end - object miStyleSelectAll: TMenuItem - Caption = 'Select all' - Enabled = False - ShortCut = 16449 - OnClick = miStyleSelectAllClick - end - end - object pmStyleSheets: TPopupMenu - Left = 72 - Top = 168 - object miStyleSheetAdd: TMenuItem - Caption = 'Add...' - ShortCut = 45 - OnClick = btStyleSheetAddClick - end - object miStyleSheetDelete: TMenuItem - Caption = 'Delete' - Enabled = False - ShortCut = 46 - OnClick = btStyleSheetDeleteClick - end - object imStyleSheetEdit: TMenuItem - Caption = 'Edit...' - OnClick = btnStyleSheetEditClick - end - object MenuItem3: TMenuItem - Caption = '-' - end - object miStyleSheetSelectAll: TMenuItem - Caption = 'Select all' - Enabled = False - ShortCut = 16449 - OnClick = miStyleSheetSelectAllClick - end - end - object pmAddStyleSheet: TPopupMenu - Left = 128 - Top = 48 - end - object SaveDialog: TSaveDialog - DefaultExt = 'ini' - FileName = 'cxstyles.ini' - Filter = 'Ini files|*.ini' - Left = 160 - Top = 120 - end - object OpenDialog: TOpenDialog - DefaultExt = 'ini' - FileName = 'cxstyles.ini' - Filter = 'Ini files|*.ini' - Left = 160 - Top = 176 - end -end diff --git a/internal/x.46/ExpressLibrary/Sources/cxStyleRepositoryEditor.pas b/internal/x.46/ExpressLibrary/Sources/cxStyleRepositoryEditor.pas deleted file mode 100644 index 7211a346..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxStyleRepositoryEditor.pas +++ /dev/null @@ -1,470 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxStyleRepositoryEditor; - -{$I cxVer.inc} - -interface - -uses - Windows, -{$IFDEF DELPHI6} - DesignIntf, - Variants, -{$ELSE} - DsgnIntf, -{$ENDIF} - SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, cxDesignWindows, StdCtrls, cxStyles, ExtCtrls, Menus, ComCtrls; - -type - TcxStyleRepositoryEditor = class(TcxDesignFormEditor) - lbStyles: TListBox; - btStyleAdd: TButton; - btStyleDelete: TButton; - btClose: TButton; - pnlStyles: TPanel; - pmStyles: TPopupMenu; - miStyleAdd: TMenuItem; - miStyleDelete: TMenuItem; - N1: TMenuItem; - miStyleSelectAll: TMenuItem; - PageControl1: TPageControl; - tsStyles: TTabSheet; - tsStyleSheets: TTabSheet; - lbStyleSheets: TListBox; - pnlStyleSheets: TPanel; - btStyleSheetAdd: TButton; - btStyleSheetDelete: TButton; - Button3: TButton; - pmStyleSheets: TPopupMenu; - miStyleSheetAdd: TMenuItem; - miStyleSheetDelete: TMenuItem; - MenuItem3: TMenuItem; - miStyleSheetSelectAll: TMenuItem; - btnStyleSheetEdit: TButton; - imStyleSheetEdit: TMenuItem; - pmAddStyleSheet: TPopupMenu; - btnStyleSheetsSave: TButton; - SaveDialog: TSaveDialog; - btnStyleSheetsLoad: TButton; - OpenDialog: TOpenDialog; - btnStyleSheetsPredefine: TButton; - procedure lbStylesClick(Sender: TObject); - procedure btStyleDeleteClick(Sender: TObject); - procedure btCloseClick(Sender: TObject); - procedure btStyleAddClick(Sender: TObject); - procedure miStyleSelectAllClick(Sender: TObject); - procedure btStyleSheetAddClick(Sender: TObject); - procedure btStyleSheetDeleteClick(Sender: TObject); - procedure miStyleSheetSelectAllClick(Sender: TObject); - procedure lbStyleSheetsClick(Sender: TObject); - procedure btnStyleSheetEditClick(Sender: TObject); - procedure btnStyleSheetsSaveClick(Sender: TObject); - procedure btnStyleSheetsLoadClick(Sender: TObject); - procedure btnStyleSheetsPredefineClick(Sender: TObject); - private - procedure AddStyleSheets(AList: TList); - function DoStyleGetName(AStyle: TcxStyle): string; - procedure DoAddStyleSheetMenuItemClick(Sender: TObject); - procedure InitAddStyleSheetMenu; - procedure ListBoxSelectComponents(AListBox: TListBox); - function GetStyleRepository: TcxStyleRepository; - procedure UpdateButtons; - procedure UpdateDesigner(Sender: TObject); - procedure UpdateItems; - procedure SelectItem(AListBox: TListBox; AItem: TPersistent); - function FindItemToSelect(AListBox: TListBox): TObject; - procedure DeleteSelectedComponents(AListBox: TListBox); - protected - procedure InitFormEditor; override; - public - procedure DoItemsModified; override; - procedure SelectionsChanged(const ASelection: TDesignerSelectionList); override; - property StyleRepository: TcxStyleRepository read GetStyleRepository; - end; - -procedure ShowStyleRepositoryEditor(ADesigner: IDesigner; - AStyleRepository: TcxStyleRepository); - -implementation - -{$R *.dfm} - -uses - cxStyleSheetEditor, cxStyleSheetsLoad; - -procedure ShowStyleRepositoryEditor(ADesigner: IDesigner; - AStyleRepository: TcxStyleRepository); -begin - ShowFormEditorClass(ADesigner, AStyleRepository, TcxStyleRepositoryEditor); -end; - -function TcxStyleRepositoryEditor.GetStyleRepository: TcxStyleRepository; -begin - Result := Component as TcxStyleRepository; -end; - -procedure TcxStyleRepositoryEditor.UpdateDesigner(Sender: TObject); -begin - Designer.Modified; -end; - -procedure TcxStyleRepositoryEditor.InitFormEditor; -begin - inherited InitFormEditor; - UpdateItems; - UpdateSelection; - UpdateButtons; - InitAddStyleSheetMenu; -end; - -procedure TcxStyleRepositoryEditor.DoItemsModified; -begin - UpdateItems; -end; - -procedure TcxStyleRepositoryEditor.AddStyleSheets(AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - begin - if TcxCustomStyleSheet(AList[I]).Name = '' then - TcxCustomStyleSheet(AList[I]).Name := - CreateUniqueName(Component.Owner, nil, TcxCustomStyleSheet(AList[I]), '', ''); - lbStyleSheets.Items.AddObject(TcxCustomStyleSheet(AList[I]).Name, - TcxCustomStyleSheet(AList[I])); - end; -end; - -function TcxStyleRepositoryEditor.DoStyleGetName(AStyle: TcxStyle): string; -begin - if AStyle.Name = '' then - Result := CreateUniqueName(Component.Owner, nil, AStyle, '', '') - else Result := AStyle.Name; - lbStyles.Items.AddObject(Result, AStyle); -end; - -procedure TcxStyleRepositoryEditor.DoAddStyleSheetMenuItemClick(Sender: TObject); -var - AItem: TcxCustomStyleSheet; - AList: TList; -begin - AList := TList.Create; - try - GetRegisteredStyleSheetClasses(AList); - AItem := StyleRepository.CreateStyleSheetEx( - TcxCustomStyleSheetClass(AList[TMenuItem(Sender).Tag]), StyleRepository.Owner); - finally - AList.Free; - end; - AItem.Name := CreateUniqueName(Component.Owner, nil, AItem, '', ''); - UpdateItems; - SelectItem(lbStyleSheets, AItem); - UpdateButtons; - UpdateDesigner(nil); -end; - -procedure TcxStyleRepositoryEditor.InitAddStyleSheetMenu; -var - AList: TList; - AMenuItem: TMenuItem; - I: Integer; -begin - AList := TList.Create; - try - GetRegisteredStyleSheetClasses(AList); - for I := 0 to AList.Count - 1 do - begin - AMenuItem := TMenuItem.Create(self); - pmAddStyleSheet.Items.Add(AMenuItem); - AMenuItem.Caption := TcxCustomStyleSheetClass(AList[I]).ClassName; - AMenuItem.Tag := I; - AMenuItem.OnClick := DoAddStyleSheetMenuItemClick; - end; - finally - AList.Free; - end; -end; - -procedure TcxStyleRepositoryEditor.ListBoxSelectComponents(AListBox: TListBox); -var - AList: TList; - I: Integer; -begin - AList := TList.Create; - try - for I := 0 to AListBox.Items.Count - 1 do - if AListBox.Selected[I] then - AList.Add(AListBox.Items.Objects[I]); - SelectComponents(AList, StyleRepository); - finally - AList.Free; - end; - UpdateButtons; -end; - -procedure TcxStyleRepositoryEditor.SelectItem(AListBox: TListBox; AItem: TPersistent); -begin - with AListBox do - ItemIndex := Items.IndexOfObject(AItem); - ListBoxClearSelection(AListBox); - if Component <> nil then - if AItem <> nil then - Designer.SelectComponent(AItem) - else - Designer.SelectComponent(Component); -end; - -procedure TcxStyleRepositoryEditor.UpdateButtons; -begin - btStyleDelete.Enabled := lbStyles.SelCount <> 0; - miStyleDelete.Enabled := btStyleDelete.Enabled; - miStyleSelectAll.Enabled := btStyleDelete.Enabled; - btStyleSheetDelete.Enabled := lbStyleSheets.SelCount <> 0; - miStyleSheetDelete.Enabled := btStyleSheetDelete.Enabled; - miStyleSheetSelectAll.Enabled := btStyleSheetDelete.Enabled; - btnStyleSheetsSave.Enabled := btStyleSheetDelete.Enabled; - btnStyleSheetEdit.Enabled := lbStyleSheets.SelCount = 1; - imStyleSheetEdit.Enabled := btnStyleSheetEdit.Enabled; -end; - -function TcxStyleRepositoryEditor.FindItemToSelect(AListBox: TListBox): TObject; -var - I: Integer; -begin - Result := nil; - with AListBox do - begin - if ItemIndex = -1 then Exit; - if not Selected[ItemIndex] then - Result := Items.Objects[ItemIndex] - else - begin - for I := ItemIndex + 1 to Items.Count - 1 do - if not Selected[I] then - begin - Result := Items.Objects[I]; - Exit - end; - for I := ItemIndex - 1 downto 0 do - if not Selected[I] then - begin - Result := Items.Objects[I]; - Exit - end; - end; - end; -end; - -procedure TcxStyleRepositoryEditor.UpdateItems; -var - I, AItemIndex, ATopIndex: Integer; - ASelection: TStringList; -begin - ListBoxSaveSelection(lbStyles, ASelection, AItemIndex, ATopIndex); - try - lbStyles.Items.Clear; - for I := 0 to StyleRepository.Count - 1 do - lbStyles.Items.AddObject(StyleRepository.Items[I].Name, StyleRepository.Items[I]); - finally - ListBoxRestoreSelection(lbStyles, ASelection, AItemIndex, ATopIndex); - end; - ListBoxSaveSelection(lbStyleSheets, ASelection, AItemIndex, ATopIndex); - try - lbStyleSheets.Items.Clear; - for I := 0 to StyleRepository. StyleSheetCount - 1 do - lbStyleSheets.Items.AddObject(StyleRepository.StyleSheets[I].Name, StyleRepository.StyleSheets[I]); - finally - ListBoxRestoreSelection(lbStyleSheets, ASelection, AItemIndex, ATopIndex); - end; -end; - -procedure TcxStyleRepositoryEditor.DeleteSelectedComponents(AListBox: TListBox); -var - I: Integer; - AItem: TPersistent; -begin - if AListBox.SelCount > 0 then - begin - AItem := FindItemToSelect(AListBox) as TPersistent; - for I := 0 to AListBox.Items.Count - 1 do - if AListBox.Selected[I] then - AListBox.Items.Objects[I].Free; - UpdateItems; - SelectItem(AListBox, AItem); - UpdateButtons; - UpdateDesigner(nil); - end; -end; - -procedure TcxStyleRepositoryEditor.lbStylesClick(Sender: TObject); -begin - ListBoxSelectComponents(lbStyles); -end; - -procedure TcxStyleRepositoryEditor.lbStyleSheetsClick(Sender: TObject); -begin - ListBoxSelectComponents(lbStyleSheets); -end; - -procedure TcxStyleRepositoryEditor.btStyleDeleteClick(Sender: TObject); -begin - DeleteSelectedComponents(lbStyles); -end; - -procedure TcxStyleRepositoryEditor.btStyleSheetDeleteClick( - Sender: TObject); -begin - DeleteSelectedComponents(lbStyleSheets); -end; - -procedure TcxStyleRepositoryEditor.SelectionsChanged(const ASelection: TDesignerSelectionList); -var - AList: TList; -begin - AList := TList.Create; - try - GetSelectionList(AList); - ListBoxSyncSelection(lbStyles, AList); - ListBoxSyncSelection(lbStyleSheets, AList); - finally - AList.Free; - end; - UpdateButtons; -end; - -procedure TcxStyleRepositoryEditor.btCloseClick(Sender: TObject); -begin - Close; -end; - -procedure TcxStyleRepositoryEditor.btStyleAddClick(Sender: TObject); -var - AItem: TcxCustomStyle; -begin - AItem := StyleRepository.CreateItemEx(TcxStyle, StyleRepository.Owner); - AItem.Name := CreateUniqueName(Component.Owner, nil, AItem, '', ''); - UpdateItems; - SelectItem(lbStyles, AItem); - UpdateButtons; - UpdateDesigner(nil); -end; - -procedure TcxStyleRepositoryEditor.btStyleSheetAddClick(Sender: TObject); -var - pt: TPoint; -begin - pt.X := btStyleAdd.Left; - pt.Y := btStyleAdd.Top + btStyleAdd.Height; - pt := btStyleAdd.Parent.ClientToScreen(pt); - pmAddStyleSheet.Popup(pt.X, pt.Y); -end; - -procedure TcxStyleRepositoryEditor.miStyleSelectAllClick(Sender: TObject); -begin - ListBoxSelectAll(lbStyles); - lbStylesClick(nil); -end; - -procedure TcxStyleRepositoryEditor.miStyleSheetSelectAllClick(Sender: TObject); -begin - ListBoxSelectAll(lbStyleSheets); - lbStyleSheetsClick(nil); -end; - -procedure TcxStyleRepositoryEditor.btnStyleSheetEditClick(Sender: TObject); -begin - if ShowcxStyleSheetEditor(TcxCustomStyleSheet( - lbStyleSheets.Items.Objects[lbStyleSheets.ItemIndex]), DoStyleGetName) then - Designer.Modified; -end; - -procedure TcxStyleRepositoryEditor.btnStyleSheetsSaveClick( - Sender: TObject); -var - I: Integer; - AList: TList; -begin - if SaveDialog.Execute then - begin - AList := TList.Create; - try - for I := 0 to lbStyleSheets.Items.Count - 1 do - if lbStyleSheets.Selected[I] then - AList.Add(TcxCustomStyleSheet(lbStyleSheets.Items.Objects[I])); - SaveStyleSheetsToIniFile(SaveDialog.FileName, AList); - finally - AList.Free; - end; - end; - -end; - -procedure TcxStyleRepositoryEditor.btnStyleSheetsLoadClick( - Sender: TObject); -var - AStyleSheetList: TList; -begin - if not OpenDialog.Execute then exit; - AStyleSheetList := TList.Create; - try - ShowLoadStyleSheetsFromIniFile(OpenDialog.FileName, StyleRepository, - Component.Owner, AStyleSheetList, DoStyleGetName); - AddStyleSheets(AStyleSheetList); - finally - AStyleSheetList.Free; - end; -end; - -procedure TcxStyleRepositoryEditor.btnStyleSheetsPredefineClick( - Sender: TObject); -var - AStyleSheetList: TList; -begin - AStyleSheetList := TList.Create; - try - ShowLoadStyleSheetsFromPreDefineStyles(StyleRepository, Component.Owner, - AStyleSheetList, DoStyleGetName); - AddStyleSheets(AStyleSheetList); - finally - AStyleSheetList.Free; - end; -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxStyleSheetEditor.dfm b/internal/x.46/ExpressLibrary/Sources/cxStyleSheetEditor.dfm deleted file mode 100644 index 7e8310cf..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxStyleSheetEditor.dfm +++ /dev/null @@ -1,218 +0,0 @@ -object frmcxStyleSheetEditor: TfrmcxStyleSheetEditor - Left = 377 - Top = 147 - AutoScroll = False - BorderIcons = [biSystemMenu] - Caption = 'StyleSheet Editor' - ClientHeight = 338 - ClientWidth = 319 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - object pnlBottom: TPanel - Left = 0 - Top = 303 - Width = 319 - Height = 35 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - object Bevel: TBevel - Left = 0 - Top = 0 - Width = 319 - Height = 2 - Align = alTop - end - object pnlButtons: TPanel - Left = 150 - Top = 2 - Width = 169 - Height = 33 - Align = alRight - BevelOuter = bvNone - TabOrder = 0 - object btnOK: TButton - Left = 7 - Top = 4 - Width = 75 - Height = 25 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 0 - end - object bntCancel: TButton - Left = 88 - Top = 4 - Width = 75 - Height = 25 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - end - end - object pnlClient: TPanel - Left = 0 - Top = 0 - Width = 319 - Height = 303 - Align = alClient - BevelOuter = bvNone - BorderWidth = 4 - TabOrder = 1 - object pnlStyles: TPanel - Left = 4 - Top = 4 - Width = 163 - Height = 295 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object pnlStylesCaption: TPanel - Left = 0 - Top = 0 - Width = 163 - Height = 21 - Align = alTop - Alignment = taLeftJustify - BevelOuter = bvNone - Caption = 'Styles' - TabOrder = 0 - end - object pnlStylesClient: TPanel - Left = 0 - Top = 21 - Width = 163 - Height = 274 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object lbStyles: TListBox - Left = 0 - Top = 0 - Width = 163 - Height = 186 - Style = lbOwnerDrawVariable - Align = alClient - ItemHeight = 16 - MultiSelect = True - TabOrder = 0 - OnClick = lbStylesClick - OnDrawItem = lbStylesDrawItem - OnMeasureItem = lbStylesMeasureItem - end - object pnlStylesButtons: TPanel - Left = 0 - Top = 186 - Width = 163 - Height = 88 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object cbColor: TCheckBox - Left = 35 - Top = 33 - Width = 119 - Height = 25 - Caption = '&Color' - TabOrder = 0 - OnClick = cbClick - end - object btnBitmap: TButton - Left = 2 - Top = 4 - Width = 25 - Height = 25 - Caption = '...' - TabOrder = 1 - OnClick = btnBitmapClick - end - object btnColor1: TButton - Left = 2 - Top = 33 - Width = 25 - Height = 25 - Caption = '...' - TabOrder = 2 - OnClick = btnColor1Click - end - object btnFont1: TButton - Left = 2 - Top = 62 - Width = 25 - Height = 25 - Caption = '...' - TabOrder = 3 - OnClick = btnFont1Click - end - object cbFont: TCheckBox - Left = 35 - Top = 62 - Width = 119 - Height = 25 - Caption = '&Font' - TabOrder = 4 - OnClick = cbClick - end - object cbBitmap: TCheckBox - Left = 35 - Top = 4 - Width = 117 - Height = 25 - Caption = '&Bitmap' - TabOrder = 5 - OnClick = cbClick - end - end - end - end - object pnlPreview: TPanel - Left = 171 - Top = 4 - Width = 144 - Height = 295 - Align = alRight - Anchors = [akLeft, akTop, akRight, akBottom] - BevelOuter = bvNone - TabOrder = 1 - object pnlPreviewCaption: TPanel - Left = 0 - Top = 0 - Width = 144 - Height = 21 - Align = alTop - Alignment = taLeftJustify - BevelOuter = bvNone - Caption = 'Preview' - TabOrder = 0 - end - object pnlPreviewClient: TPanel - Left = 0 - Top = 21 - Width = 144 - Height = 274 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - end - end - end - object FontDialog: TFontDialog - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'MS Sans Serif' - Font.Style = [] - Left = 76 - Top = 28 - end - object ColorDialog: TColorDialog - Left = 44 - Top = 28 - end -end diff --git a/internal/x.46/ExpressLibrary/Sources/cxStyleSheetEditor.pas b/internal/x.46/ExpressLibrary/Sources/cxStyleSheetEditor.pas deleted file mode 100644 index 1bc2dd34..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxStyleSheetEditor.pas +++ /dev/null @@ -1,533 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxStyleSheetEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Messages, ExtDlgs, - SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, - cxClasses, cxGraphics, cxStyles; - -type - TcxStyleSheetEditorPreview = class - public - constructor Create(AOwner: TComponent); virtual; - function Control: TWinControl; virtual; abstract; - function GetSize: TPoint; virtual; - class function GetStyleSheetClass: TcxCustomStyleSheetClass; virtual; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); virtual; abstract; - end; - - TcxStyleSheetEditorPreviewClass = class of TcxStyleSheetEditorPreview; - - TfrmcxStyleSheetEditor = class(TForm) - pnlBottom: TPanel; - pnlButtons: TPanel; - btnOK: TButton; - bntCancel: TButton; - FontDialog: TFontDialog; - ColorDialog: TColorDialog; - pnlClient: TPanel; - Bevel: TBevel; - pnlStyles: TPanel; - pnlStylesCaption: TPanel; - pnlStylesButtons: TPanel; - pnlStylesClient: TPanel; - lbStyles: TListBox; - pnlPreview: TPanel; - pnlPreviewCaption: TPanel; - pnlPreviewClient: TPanel; - cbColor: TCheckBox; - btnBitmap: TButton; - btnColor1: TButton; - btnFont1: TButton; - cbFont: TCheckBox; - cbBitmap: TCheckBox; - procedure lbStylesClick(Sender: TObject); - procedure lbStylesMeasureItem(Control: TWinControl; Index: Integer; - var Height: Integer); - procedure lbStylesDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); - procedure cbClick(Sender: TObject); - procedure btnColor1Click(Sender: TObject); - procedure btnFont1Click(Sender: TObject); - procedure btnBitmapClick(Sender: TObject); - private - FCanvas: TcxCanvas; - FPreview: TcxStyleSheetEditorPreview; - FStateUpdating: Boolean; - FStyleList: TList; - FStyleSheet: TcxCustomStyleSheet; - function GetCheckBoxStyleValue(ACheckBox: TCheckBox): TcxStyleValue; - function GetFirstSelectedStyle: TcxStyle; - procedure RecreateListBox(AListBox: TListBox); - procedure SetSelectedStylesAssignValue(ACheckBox: TCheckBox); - procedure SetStyles(AStyleSheet: TcxCustomStyleSheet); - procedure UpdateStyles(AStyleSheet: TcxCustomStyleSheet; AGetStyleName: TcxStyleGetName); - procedure UpdateState; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - end; - -function ShowcxStyleSheetEditor(AStyleSheet: TcxCustomStyleSheet; AGetStyleName: TcxStyleGetName): Boolean; - -procedure RegisterStyleSheetEditorPreview(APreviewClass: TcxStyleSheetEditorPreviewClass); -procedure UnregisterStyleSheetEditorPreview(APreviewClass: TcxStyleSheetEditorPreviewClass); -function GetPreviewByStyleSheetClass(AStyleSheetClass: TcxCustomStyleSheetClass): TcxStyleSheetEditorPreviewClass; - -implementation - -{$R *.dfm} - -uses - TypInfo, cxControls, dxCore; - -function VerifyBitmap(ABitmap: TBitmap): Boolean; -begin - Result := (ABitmap.Width > 0) and (ABitmap.Height > 0); -end; - -{ TcxStyleSheetEditorPreview } - -constructor TcxStyleSheetEditorPreview.Create(AOwner: TComponent); -begin - inherited Create; -end; - -function TcxStyleSheetEditorPreview.GetSize: TPoint; -begin - Result.X := 350; - Result.Y := 250; -end; - -class function TcxStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := nil; -end; - -function ShowcxStyleSheetEditor(AStyleSheet: TcxCustomStyleSheet; - AGetStyleName: TcxStyleGetName): Boolean; -var - AForm: TfrmcxStyleSheetEditor; -begin - AForm := TfrmcxStyleSheetEditor.Create(nil); - try - AForm.SetStyles(AStyleSheet); - AForm.UpdateState; - AForm.ShowModal; - Result := AForm.ModalResult = mrOK; - if Result then - AForm.UpdateStyles(AStyleSheet, AGetStyleName); - finally - AForm.Free; - end; -end; - -{ TfrmcxStyleSheetEditor } - -constructor TfrmcxStyleSheetEditor.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FStyleList := TList.Create; - FCanvas := TcxCanvas.Create(nil); -end; - -destructor TfrmcxStyleSheetEditor.Destroy; -begin - FreeAndNil(FCanvas); - FStyleList.Free; - FStyleSheet.Free; - FPreview.Free; - inherited Destroy; -end; - -function TfrmcxStyleSheetEditor.GetCheckBoxStyleValue(ACheckBox: TCheckBox): TcxStyleValue; -begin - if ACheckBox = cbBitmap then - Result := svBitmap - else - if ACheckBox = cbColor then - Result := svColor - else - Result := svFont; -end; - -function TfrmcxStyleSheetEditor.GetFirstSelectedStyle: TcxStyle; -var - I: Integer; -begin - Result := nil; - for I := 0 to lbStyles.Items.Count - 1 do - if lbStyles.Selected[I] then - begin - Result := TcxStyle(FStyleList[I]); - Break; - end; -end; - -procedure TfrmcxStyleSheetEditor.RecreateListBox(AListBox: TListBox); -var - I: Integer; - ASelected: TList; -begin - ASelected := TList.Create; - try - for I := 0 to AListBox.Items.Count - 1 do - if AListBox.Selected[I] then - ASelected.Add(Pointer(I)); - RecreateControlWnd(AListBox); - for I := 0 to ASelected.Count - 1 do - AListBox.Selected[Integer((ASelected[I]))] := True; - finally - ASelected.Free; - end; -end; - -procedure TfrmcxStyleSheetEditor.SetSelectedStylesAssignValue(ACheckBox: TCheckBox); - - function cxStyleValueTocxStyleValues(AStyleValue: TcxStyleValue): TcxStyleValues; - begin - case AStyleValue of - svBitmap: - Result := [svBitmap]; - svColor: - Result := [svColor]; - svFont: - Result := [svFont, svTextColor]; - else - Result := []; - end; - end; - -var - AStyleValues: TcxStyleValues; - I: Integer; -begin - AStyleValues := cxStyleValueTocxStyleValues(GetCheckBoxStyleValue(ACheckBox)); - for I := 0 to lbStyles.Items.Count - 1 do - if lbStyles.Selected[I] then - with TcxStyle(FStyleList[I]) do - if ACheckBox.Checked then - begin - if (ACheckBox = cbBitmap) and not VerifyBitmap(Bitmap) then - Continue; - AssignedValues := AssignedValues + AStyleValues - end - else - AssignedValues := AssignedValues - AStyleValues; -end; - -procedure TfrmcxStyleSheetEditor.SetStyles(AStyleSheet: TcxCustomStyleSheet); -var - I, ACount: Integer; - APropList: TPropList; - AStyle, ACacheStyle: TcxStyle; -begin - FStyleSheet := TcxCustomStyleSheetClass(AStyleSheet.ClassType).Create(nil); - ACount := GetPropList(FStyleSheet.GetStyles.ClassInfo, [tkClass], @APropList); - try - lbStyles.Items.BeginUpdate; - for I := 0 to ACount - 1 do - if GetTypeData(APropList[I].PropType^).ClassType = TcxStyle then - begin - AStyle := TcxStyle(GetObjectProp(AStyleSheet.GetStyles, dxShortStringToString(APropList[I].Name))); - ACacheStyle := TcxStyle.Create(Self); - if AStyle <> nil then - ACacheStyle.Assign(AStyle); - SetObjectProp(FStyleSheet.GetStyles, APropList[I], ACacheStyle); - FStyleList.Add(ACacheStyle); - lbStyles.Items.Add(dxShortStringToString(APropList[I].Name)); - end; - finally - lbStyles.Items.EndUpdate; - end; - if GetPreviewByStyleSheetClass(TcxCustomStyleSheetClass(FStyleSheet.ClassType)) <> nil then - begin - FPreview := GetPreviewByStyleSheetClass(TcxCustomStyleSheetClass(FStyleSheet.ClassType)).Create(self); - FPreview.Control.Parent := pnlPreviewClient; - FPreview.Control.Align := alClient; - FPreview.SetStyleSheet(FStyleSheet); - Width := pnlStyles.Width + lbStyles.Left * 2 + FPreview.GetSize.X; - if pnlPreviewClient.Height < FPreview.GetSize.Y then - Height := Height + FPreview.GetSize.Y - pnlPreviewClient.Height; - end else - begin - pnlPreview.Visible := False; - Width := pnlStyles.Width + lbStyles.Left * 2; - FPreview := nil; - end; -end; - -procedure TfrmcxStyleSheetEditor.UpdateStyles(AStyleSheet: TcxCustomStyleSheet; - AGetStyleName: TcxStyleGetName); -begin - CreateStyleSheetStyles(AStyleSheet, FStyleSheet, AGetStyleName) -end; - -procedure TfrmcxStyleSheetEditor.UpdateState; - - procedure UpdateCheckBox(ACheckBox: TCheckBox; AStyleValue: TcxStyleValue); - - function SelectedStylesHaveSameAssignedValue: Boolean; - var - AIsStyleValueAssigned: Boolean; - I: Integer; - begin - AIsStyleValueAssigned := AStyleValue in GetFirstSelectedStyle.AssignedValues; - Result := True; - for I := 0 to lbStyles.Items.Count - 1 do - if lbStyles.Selected[I] and ((AStyleValue in TcxStyle(FStyleList[I]).AssignedValues) <> AIsStyleValueAssigned) then - begin - Result := False; - Break; - end; - end; - - function GetCheckBoxState: TCheckBoxState; - const - ACheckBoxStateMap: array [Boolean] of TCheckBoxState = (cbUnchecked, cbChecked); - begin - Result := cbUnchecked; - if ACheckBox.Enabled then - if SelectedStylesHaveSameAssignedValue then - Result := ACheckBoxStateMap[AStyleValue in GetFirstSelectedStyle.AssignedValues] - else - Result := cbGrayed - end; - - begin - ACheckBox.Enabled := lbStyles.SelCount > 0; - ACheckBox.State := GetCheckBoxState; - end; - -begin - FStateUpdating := True; - try - btnBitmap.Enabled := lbStyles.SelCount > 0; - btnColor1.Enabled := btnBitmap.Enabled; - btnFont1.Enabled := btnBitmap.Enabled; - - UpdateCheckBox(cbBitmap, svBitmap); - UpdateCheckBox(cbColor, svColor); - UpdateCheckBox(cbFont, svFont); - finally - FStateUpdating := False; - end; -end; - -procedure TfrmcxStyleSheetEditor.lbStylesClick(Sender: TObject); -begin - UpdateState; -end; - -procedure TfrmcxStyleSheetEditor.lbStylesMeasureItem(Control: TWinControl; - Index: Integer; var Height: Integer); -var - AcxCanvas: TcxCanvas; -begin - if Index >= FStyleList.Count then exit; - if (svFont in TcxStyle(FStyleList[Index]).AssignedValues) then - begin - AcxCanvas := TcxCanvas.Create(lbStyles.Canvas); - try - AcxCanvas.Font.Assign(TcxStyle(FStyleList[Index]).Font); - Height := AcxCanvas.TextHeight(lbStyles.Items[Index]) + 2; - finally - AcxCanvas.Free; - end; - end; -end; - -procedure TfrmcxStyleSheetEditor.lbStylesDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -var - AFlags: Longint; - ASelected: Boolean; - AStyle: TcxStyle; - AText: string; - APrevTextColor: TColor; -begin - ASelected := odSelected in State; - AStyle := TcxStyle(FStyleList[Index]); - - if not ASelected and (svColor in AStyle.AssignedValues) then - lbStyles.Canvas.Brush.Color := AStyle.Color; - if not ASelected and (svBitmap in AStyle.AssignedValues) then - begin - FCanvas.Canvas := lbStyles.Canvas; - FCanvas.FillRect(Rect, AStyle.Bitmap); - end - else - lbStyles.Canvas.FillRect(Rect); - - AFlags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX); - Inc(Rect.Left, 2); - AText := lbStyles.Items[Index]; - if (svFont in AStyle.AssignedValues) then - begin - APrevTextColor := lbStyles.Canvas.Font.Color; - lbStyles.Canvas.Font.Assign(AStyle.Font); - lbStyles.Canvas.Font.Color := APrevTextColor; - end; - if (svTextColor in AStyle.AssignedValues) and not ASelected then - lbStyles.Canvas.Font.Color := AStyle.TextColor; - lbStyles.Canvas.Brush.Style := bsClear; - DrawText(lbStyles.Canvas.Handle, PChar(AText), Length(AText), Rect, AFlags); - lbStyles.Canvas.Brush.Style := bsSolid; -end; - -var - FStyleSheetPreviews: TList = nil; - -procedure RegisterStyleSheetEditorPreview(APreviewClass: TcxStyleSheetEditorPreviewClass); -begin - if FStyleSheetPreviews = nil then - FStyleSheetPreviews := TList.Create; - if FStyleSheetPreviews.IndexOf(TObject(APreviewClass)) < 0 then - FStyleSheetPreviews.Add(TObject(APreviewClass)); -end; - -procedure UnregisterStyleSheetEditorPreview(APreviewClass: TcxStyleSheetEditorPreviewClass); -begin - if FStyleSheetPreviews <> nil then - FStyleSheetPreviews.Remove(TObject(APreviewClass)); -end; - -function GetPreviewByStyleSheetClass(AStyleSheetClass: TcxCustomStyleSheetClass): TcxStyleSheetEditorPreviewClass; -var - I: Integer; -begin - Result := nil; - if FStyleSheetPreviews <> nil then - for I := 0 to FStyleSheetPreviews.Count - 1 do - if (TcxStyleSheetEditorPreviewClass(FStyleSheetPreviews[I]).GetStyleSheetClass = AStyleSheetClass) then - begin - Result := TcxStyleSheetEditorPreviewClass(FStyleSheetPreviews[I]); - Break; - end; -end; - -procedure TfrmcxStyleSheetEditor.cbClick(Sender: TObject); -begin - if not FStateUpdating then - try - SetSelectedStylesAssignValue(TCheckBox(Sender)); - finally - if Sender = cbFont then - RecreateListBox(lbStyles) - else - lbStyles.Invalidate; - UpdateState; - end; -end; - -procedure TfrmcxStyleSheetEditor.btnColor1Click(Sender: TObject); -var - I: Integer; -begin - ColorDialog.Color := TcxStyle(FStyleList[lbStyles.ItemIndex]).Color; - if ColorDialog.Execute then - try - for I := 0 to lbStyles.Items.Count - 1 do - if lbStyles.Selected[I] then - TcxStyle(FStyleList[I]).Color := ColorDialog.Color; - finally - lbStyles.Invalidate; - UpdateState; - end; -end; - -procedure TfrmcxStyleSheetEditor.btnFont1Click(Sender: TObject); -var - I: Integer; -begin - FontDialog.Font.Assign(TcxStyle(FStyleList[lbStyles.ItemIndex]).Font); - FontDialog.Font.Color := TcxStyle(FStyleList[lbStyles.ItemIndex]).TextColor; - if FontDialog.Execute then - try - for I := 0 to lbStyles.Items.Count - 1 do - if lbStyles.Selected[I] then - begin - TcxStyle(FStyleList[I]).Font.Assign(FontDialog.Font); - TcxStyle(FStyleList[I]).TextColor := FontDialog.Font.Color; - end; - finally - RecreateListBox(lbStyles); - UpdateState; - end; -end; - -procedure TfrmcxStyleSheetEditor.btnBitmapClick(Sender: TObject); -var - I: Integer; - AOpenPictureDialog: TOpenPictureDialog; -begin - AOpenPictureDialog := TOpenPictureDialog.Create(nil); - try - with AOpenPictureDialog do - begin - Filter := 'Bitmaps (*.bmp)|*.bmp'; - Options := [{$IFDEF DELPHI7}ofHideReadOnly, {$ENDIF}ofFileMustExist, ofEnableSizing]; - FileName := ''; - end; - if AOpenPictureDialog.Execute then - try - for I := 0 to lbStyles.Items.Count - 1 do - if lbStyles.Selected[I] then - TcxStyle(FStyleList[I]).Bitmap.LoadFromFile(AOpenPictureDialog.FileName); - finally - lbStyles.Invalidate; - UpdateState; - end; - finally - AOpenPictureDialog.Free; - end; -end; - -initialization - -finalization - FStyleSheetPreviews.Free; - FStyleSheetPreviews := nil; -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxStyleSheetsLoad.dfm b/internal/x.46/ExpressLibrary/Sources/cxStyleSheetsLoad.dfm deleted file mode 100644 index 8cce4060..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxStyleSheetsLoad.dfm +++ /dev/null @@ -1,167 +0,0 @@ -object frmcxStyleSheetsLoad: TfrmcxStyleSheetsLoad - Left = 303 - Top = 129 - AutoScroll = False - BorderIcons = [biSystemMenu] - Caption = 'Predefined StyleSheets' - ClientHeight = 329 - ClientWidth = 659 - Color = clBtnFace - Constraints.MinHeight = 296 - Constraints.MinWidth = 315 - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlBottom: TPanel - Left = 0 - Top = 294 - Width = 659 - Height = 35 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - object Bevel: TBevel - Left = 0 - Top = 0 - Width = 659 - Height = 2 - Align = alTop - end - object btnLoad: TButton - Left = 497 - Top = 8 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'Load' - Default = True - ModalResult = 1 - TabOrder = 0 - end - object btnClose: TButton - Left = 580 - Top = 8 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Close' - ModalResult = 2 - TabOrder = 1 - end - end - object pnlClient: TPanel - Left = 0 - Top = 0 - Width = 659 - Height = 294 - Align = alClient - BevelOuter = bvNone - BorderWidth = 5 - TabOrder = 1 - object pnlStyles: TPanel - Left = 5 - Top = 5 - Width = 297 - Height = 284 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object pnlStyleSheetClasses: TPanel - Left = 0 - Top = 0 - Width = 297 - Height = 25 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lbStyleSheetClass: TLabel - Left = 3 - Top = 1 - Width = 94 - Height = 18 - AutoSize = False - Caption = 'Style Sheet Class:' - Layout = tlCenter - end - object cbStyleSheetClasses: TComboBox - Left = 96 - Top = 0 - Width = 201 - Height = 21 - Style = csDropDownList - Anchors = [akTop, akRight] - DropDownCount = 10 - ItemHeight = 13 - TabOrder = 0 - end - end - object lbStyleSheets: TListBox - Left = 0 - Top = 25 - Width = 297 - Height = 259 - Align = alClient - ItemHeight = 13 - MultiSelect = True - TabOrder = 1 - end - end - object pnlPreview: TPanel - Left = 302 - Top = 5 - Width = 352 - Height = 284 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object Panel2: TPanel - Left = 0 - Top = 0 - Width = 5 - Height = 284 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - end - object Panel1: TPanel - Left = 5 - Top = 0 - Width = 347 - Height = 284 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object Panel3: TPanel - Left = 0 - Top = 0 - Width = 347 - Height = 25 - Align = alTop - Alignment = taLeftJustify - BevelOuter = bvNone - TabOrder = 0 - object lbPreview: TLabel - Left = 0 - Top = 0 - Width = 61 - Height = 21 - AutoSize = False - Caption = 'Preview' - Layout = tlCenter - end - end - object pnlPreviewClient: TPanel - Left = 0 - Top = 25 - Width = 347 - Height = 259 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - end - end - end - end -end diff --git a/internal/x.46/ExpressLibrary/Sources/cxStyleSheetsLoad.pas b/internal/x.46/ExpressLibrary/Sources/cxStyleSheetsLoad.pas deleted file mode 100644 index c7f148cf..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxStyleSheetsLoad.pas +++ /dev/null @@ -1,470 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxStyleSheetsLoad; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, - cxClasses, cxStyles, ExtCtrls, cxStyleSheetEditor; - -type - TcxPredefinedStyleSheetsClass = class of TcxPredefinedStyleSheets; - - TcxPredefinedStyleSheets = class - private - FList: TList; - protected - procedure AddStyleSheet(AStyleSheet: TcxCustomStyleSheet); - procedure AddStyleSheets; virtual; abstract; - public - constructor Create; virtual; - destructor Destroy; override; - procedure GetStyleSheetsByClass(AStyleSheetClass: TcxCustomStyleSheetClass; const AList: TList); - end; - - TcxPredefinedStyleSheetsList = class - private - FList: TList; - FStyleSheetClassComboBox: TComboBox; - FStyleSheetsListBox: TListBox; - FLoadButton: TButton; - FPreview: TcxStyleSheetEditorPreview; - procedure StyleSheetClassComboBoxClick(Sender: TObject); - procedure StyleSheetsListBoxClick(Sender: TObject); - protected - procedure FreeAndNilItems; - procedure UpdateButton; - public - constructor Create(AStyleSheetClassComboBox: TComboBox; AStyleSheetsListBox: TListBox; - ALoadButton: TButton); - destructor Destroy; override; - function CurrentStyleSheet: TcxCustomStyleSheet; - function CurrentStyleSheetClass: TcxCustomStyleSheetClass; - procedure FillListBox; - end; - - TfrmcxStyleSheetsLoad = class(TForm) - pnlBottom: TPanel; - Bevel: TBevel; - pnlStyles: TPanel; - pnlStyleSheetClasses: TPanel; - lbStyleSheetClass: TLabel; - cbStyleSheetClasses: TComboBox; - lbStyleSheets: TListBox; - pnlPreview: TPanel; - pnlClient: TPanel; - btnLoad: TButton; - btnClose: TButton; - Panel2: TPanel; - Panel1: TPanel; - Panel3: TPanel; - lbPreview: TLabel; - pnlPreviewClient: TPanel; - procedure FormCreate(Sender: TObject); - public - constructor Create(AOwner: TComponent); override; - function CurrentStyleSheetClass: TcxCustomStyleSheetClass; - procedure SetShowPreview(Value: Boolean); - end; - -procedure RegisterPredefinedStyleSheets(APredefinedStyleSheetsClass: TcxPredefinedStyleSheetsClass); -procedure UnregisterPredefinedStyleSheets(APredefinedStyleSheetsClass: TcxPredefinedStyleSheetsClass); -procedure GetPredefinedStyleSheetClasses(AList: TList); - -procedure ShowLoadStyleSheetsFromIniFile(const AIniFileName: string; - AStyleRepository: TcxStyleRepository; AOwner: TComponent; const AStyleSheetList: TList; - AStyleGetName: TcxStyleGetName); - -procedure ShowLoadStyleSheetsFromPreDefineStyles(AStyleRepository: TcxStyleRepository; - AOwner: TComponent; const AStyleSheetList: TList; AStyleGetName: TcxStyleGetName); - -implementation - -{$R *.dfm} - -uses - IniFiles; - -var - FPredefinedStyleSheetsList: TList = nil; - -procedure RegisterPredefinedStyleSheets(APredefinedStyleSheetsClass: TcxPredefinedStyleSheetsClass); -begin - if FPredefinedStyleSheetsList = nil then - FPredefinedStyleSheetsList := TList.Create; - if FPredefinedStyleSheetsList.IndexOf(TObject(APredefinedStyleSheetsClass)) = -1 then - FPredefinedStyleSheetsList.Add(TObject(APredefinedStyleSheetsClass)); -end; - -procedure UnregisterPredefinedStyleSheets(APredefinedStyleSheetsClass: TcxPredefinedStyleSheetsClass); -begin - if FPredefinedStyleSheetsList <> nil then - begin - FPredefinedStyleSheetsList.Remove(TObject(APredefinedStyleSheetsClass)); - if FPredefinedStyleSheetsList.Count = 0 then - FreeAndNil(FPredefinedStyleSheetsList); - end; -end; - -procedure GetPredefinedStyleSheetClasses(AList: TList); -begin - CopyList(FPredefinedStyleSheetsList, AList); -end; - -{ TcxPredefinedStyleSheets } - -constructor TcxPredefinedStyleSheets.Create; -begin - inherited; - FList := TList.Create; -end; - -destructor TcxPredefinedStyleSheets.Destroy; -begin - FList.Free; - inherited; -end; - -procedure TcxPredefinedStyleSheets.GetStyleSheetsByClass(AStyleSheetClass: TcxCustomStyleSheetClass; - const AList: TList); -var - I: Integer; -begin - for I := 0 to FList.Count - 1 do - if TcxCustomStyleSheetClass(TcxCustomStyleSheet(FList[I]).ClassType) = AStyleSheetClass then - AList.Add(FList[I]); -end; - -procedure TcxPredefinedStyleSheets.AddStyleSheet(AStyleSheet: TcxCustomStyleSheet); -begin - if FList.IndexOf(AStyleSheet) = -1 then - FList.Add(AStyleSheet); -end; - -{ TcxPredefinedStyleSheetsList } - -constructor TcxPredefinedStyleSheetsList.Create(AStyleSheetClassComboBox: TComboBox; - AStyleSheetsListBox: TListBox; ALoadButton: TButton); -var - I: Integer; -begin - inherited Create; - FList := TList.Create; - FStyleSheetClassComboBox := AStyleSheetClassComboBox; - FStyleSheetsListBox := AStyleSheetsListBox; - FLoadButton := ALoadButton; - FStyleSheetClassComboBox.OnClick := StyleSheetClassComboBoxClick; - FStyleSheetsListBox.OnClick := StyleSheetsListBoxClick; - if FPredefinedStyleSheetsList <> nil then - for I := 0 to FPredefinedStyleSheetsList.Count - 1 do - FList.Add(TcxPredefinedStyleSheetsClass(FPredefinedStyleSheetsList[I]).Create); -end; - -destructor TcxPredefinedStyleSheetsList.Destroy; -begin - FreeAndNil(FPreview); - FreeAndNilItems; - inherited; -end; - -function TcxPredefinedStyleSheetsList.CurrentStyleSheet: TcxCustomStyleSheet; -begin - with FStyleSheetsListBox do - if ItemIndex > -1 then - Result := TcxCustomStyleSheet(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -function TcxPredefinedStyleSheetsList.CurrentStyleSheetClass: TcxCustomStyleSheetClass; -begin - with FStyleSheetClassComboBox do - if ItemIndex > - 1 then - Result := TcxCustomStyleSheetClass(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -procedure TcxPredefinedStyleSheetsList.FillListBox; -var - AForm: TfrmcxStyleSheetsLoad; - AList: TList; - I: Integer; - StyleSheet: TcxCustomStyleSheet; - PreviewClass: TcxStyleSheetEditorPreviewClass; -begin - AForm := TfrmcxStyleSheetsLoad(GetParentForm(FStyleSheetsListBox)); - if CurrentStyleSheetClass = nil then - begin - FStyleSheetsListBox.Items.Clear; - //AForm.Width := AForm.pnlStyles.Width; - end - else - begin - AList := TList.Create; - try - for I := 0 to FList.Count - 1 do - TcxPredefinedStyleSheets(FList[I]).GetStyleSheetsByClass(CurrentStyleSheetClass, AList); - - with FStyleSheetsListBox.Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to AList.Count - 1 do - begin - StyleSheet := TcxCustomStyleSheet(AList[I]); - AddObject(StyleSheet.Caption, StyleSheet); - end; - finally - EndUpdate; - end; - end; - finally - AList.Free; - end; - end; - - FreeAndNil(FPreview); - - PreviewClass := nil; - if CurrentStyleSheetClass <> nil then - PreviewClass := GetPreviewByStyleSheetClass(CurrentStyleSheetClass); - if PreviewClass <> nil then - begin - FPreview := PreviewClass.Create(AForm); - AForm.SetShowPreview(True); - FPreview.Control.Parent := AForm.pnlPreviewClient; - FPreview.Control.Align := alClient; - FPreview.SetStyleSheet(nil); - - if AForm.pnlPreviewClient.Width < FPreview.GetSize.X then - AForm.Width := AForm.Width + FPreview.GetSize.X - AForm.pnlPreviewClient.Width; - if AForm.pnlPreviewClient.Height < FPreview.GetSize.Y then - AForm.Height := AForm.Height + FPreview.GetSize.Y - AForm.pnlPreviewClient.Height; - end - else - AForm.SetShowPreview(False); - - UpdateButton; -end; - -procedure TcxPredefinedStyleSheetsList.FreeAndNilItems; -var - I: Integer; -begin - for I := 0 to FList.Count - 1 do - TObject(FList[I]).Free; - FList.Free; -end; - -procedure TcxPredefinedStyleSheetsList.UpdateButton; -begin - FLoadButton.Enabled := FStyleSheetsListBox.SelCount > 0; -end; - -procedure TcxPredefinedStyleSheetsList.StyleSheetClassComboBoxClick(Sender: TObject); -begin - FillListBox; -end; - -procedure TcxPredefinedStyleSheetsList.StyleSheetsListBoxClick(Sender: TObject); -begin - UpdateButton; - if FPreview <> nil then - FPreview.SetStyleSheet(CurrentStyleSheet); -end; - -procedure ShowLoadStyleSheetsFromIniFile(const AIniFileName: string; - AStyleRepository: TcxStyleRepository; - AOwner: TComponent; const AStyleSheetList: TList; - AStyleGetName: TcxStyleGetName); - - procedure SelectAllItems(AForm: TfrmcxStyleSheetsLoad); -//{$IFNDEF DELPHI6} - var - I: Integer; -//{$ENDIF} - begin -// {$IFDEF DELPHI6} -// AForm.lbStyleSheets.SelectAll; -// {$ELSE} - for I := 0 to AForm.lbStyleSheets.Items.Count - 1 do - AForm.lbStyleSheets.Selected[I] := True; -// {$ENDIF} - end; - -var - AForm: TfrmcxStyleSheetsLoad; - I: Integer; - AIniFile: TMemIniFile; - AStrings: TStringList; -begin - AIniFile := TMemIniFile.Create(AIniFileName); - AForm := TfrmcxStyleSheetsLoad.Create(nil); - AForm.SetShowPreview(False); - AStrings := TStringList.Create; - try - AIniFile.ReadSections(AForm.lbStyleSheets.Items); - SelectAllItems(AForm); - AForm.btnLoad.Enabled := (AForm.CurrentStyleSheetClass <> nil) and - (AForm.lbStyleSheets.Items.Count > 0); - AForm.ShowModal; - if AForm.ModalResult = mrOk then - begin - for I := 0 to AForm.lbStyleSheets.Items.Count - 1 do - if AForm.lbStyleSheets.Selected[I] then - AStrings.Add(AForm.lbStyleSheets.Items[I]); - LoadStyleSheetsFromIniFile(AIniFileName, AStyleRepository, - AForm.CurrentStyleSheetClass, - AStrings, AOwner, AStyleSheetList, AStyleGetName); - end; - finally - AStrings.Free; - AForm.Free; - AIniFile.Free; - end; -end; - -procedure CreateStyleSheetByPredefine(AStyleRepository: TcxStyleRepository; - AOwner: TComponent; const AStyleSheetList: TList; - AStyleGetName: TcxStyleGetName; ASource: TcxCustomStyleSheet); -var - AStyleSheet: TcxCustomStyleSheet; -begin - AStyleSheet := AStyleRepository.CreateStyleSheetEx(TcxCustomStyleSheetClass(ASource.ClassType), - AOwner); - if AStyleSheetList <> nil then - AStyleSheetList.Add(AStyleSheet); - if AOwner.FindComponent(ASource.Name) = nil then - AStyleSheet.Name := ASource.Name; - AStyleSheet.Caption := ASource.Caption; - CreateStyleSheetStyles(AStyleSheet, ASource, AStyleGetName); -end; - -procedure ShowLoadStyleSheetsFromPreDefineStyles(AStyleRepository: TcxStyleRepository; - AOwner: TComponent; const AStyleSheetList: TList; - AStyleGetName: TcxStyleGetName); -var - AForm: TfrmcxStyleSheetsLoad; - APredefinedList: TcxPredefinedStyleSheetsList; - I: Integer; -begin - AForm := TfrmcxStyleSheetsLoad.Create(nil); - APredefinedList := TcxPredefinedStyleSheetsList.Create( - AForm.cbStyleSheetClasses, AForm.lbStyleSheets, AForm.btnLoad); - try - APredefinedList.FillListBox; - AForm.ShowModal; - if AForm.ModalResult = mrOk then - begin - for I := 0 to AForm.lbStyleSheets.Items.Count - 1 do - if AForm.lbStyleSheets.Selected[I] then - CreateStyleSheetByPredefine(AStyleRepository, - AOwner, AStyleSheetList, AStyleGetName, - TcxCustomStyleSheet(AForm.lbStyleSheets.Items.Objects[I])); - end; - finally - APredefinedList.Free; - AForm.Free; - end; -end; - -{ TfrmcxStyleSheetsLoad } - -constructor TfrmcxStyleSheetsLoad.Create(AOwner: TComponent); -var - I: Integer; - AList: TList; - StyleSheetClass: TcxCustomStyleSheetClass; -begin - inherited Create(AOwner); - AList := TList.Create; - try - GetRegisteredStyleSheetClasses(AList); - for I := 0 to AList.Count - 1 do - begin - StyleSheetClass := TcxCustomStyleSheetClass(AList[I]); - cbStyleSheetClasses.Items.AddObject(StyleSheetClass.ClassName, TObject(StyleSheetClass)); - end; - - with cbStyleSheetClasses do - if Items.Count > 0 then ItemIndex := 0; - finally - AList.Free; - end; -end; - -function TfrmcxStyleSheetsLoad.CurrentStyleSheetClass: TcxCustomStyleSheetClass; -begin - with cbStyleSheetClasses do - if ItemIndex > - 1 then - Result := TcxCustomStyleSheetClass(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -procedure TfrmcxStyleSheetsLoad.SetShowPreview(Value: Boolean); -begin - if pnlPreview.Visible <> Value then - if Value then - begin - Constraints.MaxWidth := 0; - ClientWidth := ClientWidth + pnlPreview.Width; - pnlPreview.Visible := Value; - end - else - begin - pnlPreview.Visible := Value; - ClientWidth := ClientWidth - pnlPreview.Width; - Constraints.MaxWidth := Width; - end; -end; - -procedure TfrmcxStyleSheetsLoad.FormCreate(Sender: TObject); -begin - lbStyleSheetClass.Height := cbStyleSheetClasses.Height; - lbPreview.Height := cbStyleSheetClasses.Height; -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxStyles.pas b/internal/x.46/ExpressLibrary/Sources/cxStyles.pas deleted file mode 100644 index 5eda7c67..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxStyles.pas +++ /dev/null @@ -1,1677 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxStyles; - -{$I cxVer.inc} - -interface - -uses - Windows, - SysUtils, Classes, Graphics, cxClasses, cxGraphics; - -type - TcxCustomStyle = class; - TcxStyleRepository = class; - TcxCustomStyles = class; - TcxCustomStylesClass = class of TcxCustomStyles; - - { IcxStyleChangeListener } - - IcxStyleChangeListener = interface - ['{E25A5395-C1E8-4311-A281-9575F79DE862}'] - procedure StyleChanged(AStyle: TcxCustomStyle); - procedure StyleRemoved(AStyle: TcxCustomStyle); - end; - - { TcxCustomStyle } - - TcxCustomStyle = class(TComponent) - private - FListeners: TList; - FStyleRepository: TcxStyleRepository; - function GetIndex: Integer; - procedure SetStyleRepository(Value: TcxStyleRepository); - protected - procedure Changed; virtual; - procedure ReadState(Reader: TReader); override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure BeforeDestruction; override; - procedure AddListener(AListener: IcxStyleChangeListener); virtual; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - procedure RemoveListener(AListener: IcxStyleChangeListener); virtual; - procedure RestoreDefaults; virtual; - procedure SetParentComponent(AParent: TComponent); override; - property Index: Integer read GetIndex; - property StyleRepository: TcxStyleRepository read FStyleRepository write SetStyleRepository; - end; - - TcxCustomStyleSheet = class(TcxComponent) - private - FBuiltIn: Boolean; - FCaption: string; - FStyles: TcxCustomStyles; - FStylesList: TList; - FStyleRepository: TcxStyleRepository; - function GetCaptionStored: Boolean; - function GetCaption: string; - function GetIndex: Integer; - procedure SetCaption(const Value: String); - procedure SetStyleRepository(Value: TcxStyleRepository); - - procedure ReadBuiltIn(AReader: TReader); - procedure WriteBuiltIn(AWriter: TWriter); - protected - procedure DefineProperties(AFiler: TFiler); override; - procedure DoStyleChanged(AIndex: Integer); - procedure GetFakeComponentLinks(AList: TList); override; - procedure ReadState(Reader: TReader); override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure AddStyles(AStyles: TcxCustomStyles); - procedure Assign(Source: TPersistent); override; - procedure CopyFrom(AStyleSheet: TcxCustomStyleSheet); - class function GetStylesClass: TcxCustomStylesClass; virtual; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - function GetStyles: TcxCustomStyles; - procedure RemoveStyles(AStyles: TcxCustomStyles); - procedure SetStyles(const Value: TcxCustomStyles); - procedure SetParentComponent(AParent: TComponent); override; - property BuiltIn: Boolean read FBuiltIn; - property Index: Integer read GetIndex; - property StyleRepository: TcxStyleRepository read FStyleRepository write SetStyleRepository; - published - property Caption: string read GetCaption write SetCaption stored GetCaptionStored; - end; - - TcxCustomStyleClass = class of TcxCustomStyle; - TcxCustomStyleSheetClass = class of TcxCustomStyleSheet; - - { TcxStyleRepository } - - TcxStyleRepository = class(TComponent) - private - FItems: TList; - FPixelsPerInch: Integer; - FScalable: Boolean; - FStyleSheets: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxCustomStyle; - function GetStyleSheetCount: Integer; - function GetStyleSheet(Index: Integer): TcxCustomStyleSheet; - procedure ReadPixelsPerInch(Reader: TReader); - procedure WritePixelsPerInch(Writer: TWriter); - protected - procedure AddItem(AItem: TcxCustomStyle); - procedure AddStyleSheet(AStyleSheet: TcxCustomStyleSheet); - procedure DefineProperties(Filer: TFiler); override; - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - function GetScaledValue(AValue: Integer): Integer; - procedure RemoveItem(AItem: TcxCustomStyle); - procedure RemoveStyleSheet(AStyleSheet: TcxCustomStyleSheet); - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Clear; - procedure ClearStyleSheets; - function CreateItem(AStyleClass: TcxCustomStyleClass): TcxCustomStyle; virtual; - function CreateItemEx(AStyleClass: TcxCustomStyleClass; AOwner: TComponent): TcxCustomStyle; virtual; - function CreateStyleSheet(AStyleSheetClass: TcxCustomStyleSheetClass): TcxCustomStyleSheet; virtual; - function CreateStyleSheetEx(AStyleSheetClass: TcxCustomStyleSheetClass; AOwner: TComponent): TcxCustomStyleSheet; virtual; - function StyleIndexOf(AStyle: TcxCustomStyle): Integer; - function StyleSheetIndexOf(AStyleSheet: TcxCustomStyleSheet): Integer; - property Count: Integer read GetCount; - property StyleSheetCount: Integer read GetStyleSheetCount; - property Items[Index: Integer]: TcxCustomStyle read GetItem; default; - property StyleSheets[Index: Integer]: TcxCustomStyleSheet read GetStyleSheet; - published - property Scalable: Boolean read FScalable write FScalable default False; - end; - - { TcxCustomStyles } - - TcxCustomStylesItem = class - Index: Integer; - Item: TcxCustomStyle; - constructor Create(AIndex: Integer; AItem: TcxCustomStyle); - end; - - TcxCustomStyles = class(TcxInterfacedPersistent, IcxStyleChangeListener) - private - FDestroying: Boolean; - FItems: TList; - FStyleSheet: TcxCustomStyleSheet; - FOwnerStyleSheet: TcxCustomStyleSheet; // style sheet to which styles object is aggregated - function GetCount: Integer; - function GetItem(Index: Integer): TcxCustomStylesItem; - procedure SetStyleSheet(const Value: TcxCustomStyleSheet); - protected - // IcxStyleChangeListener - procedure StyleChanged(Sender: TcxCustomStyle); - procedure StyleRemoved(Sender: TcxCustomStyle); - - procedure Changed(AIndex: Integer); virtual; - procedure Clear; - procedure Delete(AItemIndex: Integer); - procedure DoChanged(AIndex: Integer); virtual; - function Find(AIndex: Integer; var AItemIndex: Integer): Boolean; - function GetValue(Index: Integer): TcxCustomStyle; - procedure SetValue(Index: Integer; Value: TcxCustomStyle); - - property Count: Integer read GetCount; - property Destroying: Boolean read FDestroying; - property Items[Index: Integer]: TcxCustomStylesItem read GetItem; - property OwnerStyleSheet: TcxCustomStyleSheet read FOwnerStyleSheet; - property StyleSheet: TcxCustomStyleSheet read FStyleSheet write SetStyleSheet; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function IsValidStyleSheet(AStyleSheet: TcxCustomStyleSheet): Boolean; - procedure ResetStyles; - property Values[Index: Integer]: TcxCustomStyle read GetValue write SetValue; - end; - - { TcxStyle } - - TcxStyleValue = (svBitmap, svColor, svFont, svTextColor); - TcxStyleValues = set of TcxStyleValue; - - TcxStyle = class(TcxCustomStyle) - private - FAssignedValues: TcxStyleValues; - FBitmap: TBitmap; - FColor: TColor; - FFont: TFont; - FTextColor: TColor; - procedure SetAssignedValues(Value: TcxStyleValues); - procedure SetBitmap(Value: TBitmap); - procedure SetColor(Value: TColor); - procedure SetFont(Value: TFont); - procedure SetTextColor(Value: TColor); - procedure BitmapChanged(Sender: TObject); - procedure FontChanged(Sender: TObject); - function IsBitmapStored: Boolean; - function IsColorStored: Boolean; - function IsFontStored: Boolean; - function IsTextColorStored: Boolean; - protected - procedure ReadState(Reader: TReader); override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property AssignedValues: TcxStyleValues read FAssignedValues write SetAssignedValues default []; - property Color: TColor read FColor write SetColor stored IsColorStored; - property Bitmap: TBitmap read FBitmap write SetBitmap stored IsBitmapStored; - property Font: TFont read FFont write SetFont stored IsFontStored; - property TextColor: TColor read FTextColor write SetTextColor stored IsTextColorStored; - end; - - TcxStyleGetName = function(AStyle: TcxStyle): string of object; - - { TcxStyles } - - TcxStyles = class(TcxCustomStyles, IcxFontListener) - private - FMaxDefaultViewParamsIndex: Integer; - protected - BitmapInViewParams: Boolean; - { IcxFontListener } - procedure IcxFontListener.Changed = DefaultFontChanged; - procedure DefaultFontChanged(Sender: TObject; AFont: TFont); - - function GetValue(Index: Integer): TcxStyle; - procedure SetValue(Index: Integer; Value: TcxStyle); - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); virtual; - procedure InternalGetViewParams(Index: Integer; AData: TObject; AStyle: TcxStyle; out AParams: TcxViewParams); - function IsDefaultFont(Index: Integer): Boolean; virtual; - property MaxDefaultViewParamsIndex: Integer read FMaxDefaultViewParamsIndex; - public - function GetBitmap(Index: Integer): TBitmap; - procedure GetViewParams(Index: Integer; AData: TObject; AStyle: TcxStyle; out AParams: TcxViewParams); - - property Count; - property StyleSheet; - property Values[Index: Integer]: TcxStyle read GetValue write SetValue; - end; - -//function GetDefaultStyleRepository: TcxStyleRepository; -function CombineParamsWithStyle(AStyle: TcxStyle; - AHasValues: TcxStyleValues; var AParams: TcxViewParams): TcxStyleValues; -function UseStyle(AStyle: TcxStyle; AStyleValue: TcxStyleValue): Boolean; -procedure CreateStyleSheetStyles(ADestStyleSheet, ASourceStyleSheet: TcxCustomStyleSheet; - AStyleGetName: TcxStyleGetName = nil); - -procedure RegisterStyleSheetClass(AStyleSheetClass: TcxCustomStyleSheetClass); -procedure UnregisterStyleSheetClass(AStyleSheetClass: TcxCustomStyleSheetClass); -procedure GetRegisteredStyleSheetClasses(AList: TList); - -procedure SaveStyleSheetsToIniFile(const AIniFileName: string; const AList: TList); -procedure LoadStyleSheetsFromIniFile(const AIniFileName: string; - AStyleRepository: TcxStyleRepository; AStyleSheetClass: TcxCustomStyleSheetClass; - const AStyleSheetNames: TStrings = nil; AOwner: TComponent = nil; - const AStyleSheetList: TList = nil; AStyleGetName: TcxStyleGetName = nil); - -implementation - -uses - Controls, TypInfo, IniFiles, dxCore; - -const - BitmapCaption = 'Bitmap'; - DefaultValue = 'default'; - -function BinaryStreamToString(AStream: TMemoryStream): string; -begin - SetLength(Result, AStream.Size * 2); - BinToHex(AStream.Memory, PChar(Result), AStream.Size); -end; - -procedure StringToBinaryStream(const S: string; AStream: TMemoryStream); -begin - AStream.Position := 0; - AStream.Size := Length(S) div 2; - HexToBin(PChar(S), AStream.Memory, AStream.Size); -end; - -function UseStyle(AStyle: TcxStyle; AStyleValue: TcxStyleValue): Boolean; -begin - Result := (AStyle <> nil) and (AStyleValue in AStyle.AssignedValues); -end; - -function VerifyBitmap(ABitmap: TBitmap): Boolean; -begin - Result := (ABitmap.Width > 0) and (ABitmap.Height > 0); -end; - -function CombineParamsWithStyle(AStyle: TcxStyle; - AHasValues: TcxStyleValues; var AParams: TcxViewParams): TcxStyleValues; - - function CanSetStyleValue(AValue: TcxStyleValue; - var ASetValues: TcxStyleValues): Boolean; - begin - Result := not (AValue in AHasValues) and (AValue in AStyle.AssignedValues); - if Result then - Include(ASetValues, AValue); - end; - -begin - Result := AHasValues; - if (AStyle = nil) or ([svBitmap..svTextColor] = AHasValues) or - (csDestroying in AStyle.ComponentState) then Exit; - if CanSetStyleValue(svColor, Result) then - AParams.Color := AStyle.Color; - if (AStyle.Font <> nil) and CanSetStyleValue(svFont, Result) then - AParams.Font := AStyle.Font; - if CanSetStyleValue(svTextColor, Result) then - AParams.TextColor := AStyle.TextColor; - if CanSetStyleValue(svBitmap, Result) then - AParams.Bitmap := AStyle.Bitmap; -end; - -{ TcxCustomStyle } - -constructor TcxCustomStyle.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FListeners := TList.Create; -end; - -destructor TcxCustomStyle.Destroy; -begin - StyleRepository := nil; - FreeAndNil(FListeners); - inherited Destroy; -end; - -procedure TcxCustomStyle.BeforeDestruction; - - procedure RemoveNotification; - begin - while FListeners.Count <> 0 do - IcxStyleChangeListener(FListeners.Last).StyleRemoved(Self); - end; - -begin - inherited BeforeDestruction; - RemoveNotification; -end; - -procedure TcxCustomStyle.AddListener(AListener: IcxStyleChangeListener); -begin - if FListeners.IndexOf(Pointer(AListener)) = -1 then - FListeners.Add(Pointer(AListener)); -end; - -function TcxCustomStyle.GetParentComponent: TComponent; -begin - Result := StyleRepository; -end; - -function TcxCustomStyle.HasParent: Boolean; -begin - Result := StyleRepository <> nil; -end; - -procedure TcxCustomStyle.RemoveListener(AListener: IcxStyleChangeListener); -begin - if FListeners <> nil then - FListeners.Remove(Pointer(AListener)); -end; - -procedure TcxCustomStyle.RestoreDefaults; -begin -end; - -procedure TcxCustomStyle.SetParentComponent(AParent: TComponent); -begin - if not (csLoading in ComponentState) then - StyleRepository := AParent as TcxStyleRepository; -end; - -procedure TcxCustomStyle.Changed; -var - I: Integer; -begin - for I := FListeners.Count - 1 downto 0 do - IcxStyleChangeListener(FListeners[I]).StyleChanged(Self); -end; - -procedure TcxCustomStyle.ReadState(Reader: TReader); -begin - inherited ReadState(Reader); - StyleRepository := TcxStyleRepository(Reader.Parent); -end; - -function TcxCustomStyle.GetIndex: Integer; -begin - if StyleRepository <> nil then - Result := StyleRepository.StyleIndexOf(self) - else Result := -1; -end; - -procedure TcxCustomStyle.SetStyleRepository(Value: TcxStyleRepository); -begin - if FStyleRepository <> Value then - begin - if FStyleRepository <> nil then - FStyleRepository.RemoveItem(Self); - FStyleRepository := Value; - if Value <> nil then - Value.AddItem(Self); - end; -end; - -{ TcxCustomStyleSheet } - -constructor TcxCustomStyleSheet.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FBuiltIn := csDesigning in ComponentState; - FStyles := GetStylesClass.Create(self); - FStyles.FOwnerStyleSheet := self; - FStylesList := TList.Create; -end; - -destructor TcxCustomStyleSheet.Destroy; -begin - Destroying; - while FStylesList.Count > 0 do - TcxCustomStyles(FStylesList[FStylesList.Count - 1]).StyleSheet := nil; - StyleRepository := nil; - FStyles.Free; - FStylesList.Free; - inherited Destroy; -end; - -procedure TcxCustomStyleSheet.AddStyles(AStyles: TcxCustomStyles); -begin - if FStylesList.IndexOf(AStyles) < 0 then - FStylesList.Add(AStyles); -end; - -procedure TcxCustomStyleSheet.Assign(Source: TPersistent); -begin - if Source is TcxCustomStyleSheet then - with TcxCustomStyleSheet(Source) do - begin - Self.Caption := Caption; - Self.SetStyles(GetStyles); - end - else - inherited; -end; - -procedure TcxCustomStyleSheet.CopyFrom(AStyleSheet: TcxCustomStyleSheet); -var - I: Integer; - AStyle: TcxCustomStyle; -begin - if (AStyleSheet <> nil) and (GetStylesClass = AStyleSheet.GetStylesClass) then - begin - for I := 0 to AStyleSheet.GetStyles.Count - 1 do - begin - if StyleRepository <> nil then - AStyle := StyleRepository.CreateItemEx( - TcxCustomStyleClass(AStyleSheet.GetStyles.Items[I].Item.ClassType), - StyleRepository.Owner) - else - AStyle := TcxCustomStyleClass(AStyleSheet.GetStyles.Items[I].Item.ClassType).Create(Owner); - AStyle.Assign(AStyleSheet.GetStyles.Items[I].Item); - GetStyles.Values[AStyleSheet.GetStyles.Items[I].Index] := AStyle; - end; - end; -end; - -class function TcxCustomStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxCustomStyles; -end; - -function TcxCustomStyleSheet.GetParentComponent: TComponent; -begin - Result := StyleRepository; -end; - -function TcxCustomStyleSheet.HasParent: Boolean; -begin - Result := StyleRepository <> nil; -end; - -function TcxCustomStyleSheet.GetStyles: TcxCustomStyles; -begin - Result := FStyles; -end; - -procedure TcxCustomStyleSheet.RemoveStyles(AStyles: TcxCustomStyles); -begin - FStylesList.Remove(AStyles); -end; - -procedure TcxCustomStyleSheet.SetStyles(const Value: TcxCustomStyles); -begin - FStyles.Assign(Value); -end; - -procedure TcxCustomStyleSheet.SetParentComponent(AParent: TComponent); -begin - if not (csLoading in ComponentState) then - StyleRepository := AParent as TcxStyleRepository; -end; - -procedure TcxCustomStyleSheet.DefineProperties(AFiler: TFiler); -begin - inherited; - AFiler.DefineProperty('BuiltIn', ReadBuiltIn, WriteBuiltIn, True); -end; - -procedure TcxCustomStyleSheet.DoStyleChanged(AIndex: Integer); -var - I: Integer; -begin - for I := 0 to FStylesList.Count - 1 do - TcxCustomStyles(FStylesList[I]).DoChanged(AIndex); - UpdateFakeLinks; -end; - -procedure TcxCustomStyleSheet.GetFakeComponentLinks(AList: TList); -var - I: Integer; -begin - for I := 0 to FStyles.Count - 1 do - if (FStyles.Items[I].Item.Owner <> Owner) and (Owner <> nil) and - (AList.IndexOf(FStyles.Items[I].Item.Owner) < 0) then - AList.Add(FStyles.Items[I].Item.Owner); -end; - -procedure TcxCustomStyleSheet.ReadState(Reader: TReader); -begin - inherited ReadState(Reader); - StyleRepository := TcxStyleRepository(Reader.Parent); -end; - -function TcxCustomStyleSheet.GetCaptionStored: Boolean; -begin - Result := FCaption <> ''; -end; - -function TcxCustomStyleSheet.GetCaption: string; -begin - if FCaption <> '' then - Result := FCaption - else Result := Name; -end; - -function TcxCustomStyleSheet.GetIndex: Integer; -begin - if StyleRepository <> nil then - Result := StyleRepository.StyleSheetIndexOf(self) - else Result := -1; -end; - -procedure TcxCustomStyleSheet.SetCaption(const Value: String); -begin - if FCaption <> Value then - begin - if CompareText(Name, Value) <> 0 then - FCaption := Value - else FCaption := ''; - end; -end; - -procedure TcxCustomStyleSheet.SetStyleRepository(Value: TcxStyleRepository); -begin - if FStyleRepository <> Value then - begin - if FStyleRepository <> nil then - FStyleRepository.RemoveStyleSheet(Self); - FStyleRepository := Value; - if Value <> nil then - Value.AddStyleSheet(Self); - end; -end; - -procedure TcxCustomStyleSheet.ReadBuiltIn(AReader: TReader); -begin - FBuiltIn := AReader.ReadBoolean; -end; - -procedure TcxCustomStyleSheet.WriteBuiltIn(AWriter: TWriter); -begin - AWriter.WriteBoolean(FBuiltIn); -end; - -{ TcxStyleRepository } - -constructor TcxStyleRepository.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FItems := TList.Create; - FStyleSheets := TList.Create; -end; - -destructor TcxStyleRepository.Destroy; -begin - Clear; - ClearStyleSheets; - FItems.Free; - FItems := nil; - FStyleSheets.Free; - FStyleSheets := nil; - inherited Destroy; -end; - -procedure TcxStyleRepository.Clear; -begin - while Count > 0 do - Items[Count - 1].Free; -end; - -procedure TcxStyleRepository.ClearStyleSheets; -begin - while StyleSheetCount > 0 do - StyleSheets[StyleSheetCount - 1].Free; -end; - -function TcxStyleRepository.CreateItem(AStyleClass: TcxCustomStyleClass): TcxCustomStyle; -begin - Result := CreateItemEx(AStyleClass, Self); -end; - -function TcxStyleRepository.CreateItemEx(AStyleClass: TcxCustomStyleClass; - AOwner: TComponent): TcxCustomStyle; -begin - Result := AStyleClass.Create(AOwner); - Result.StyleRepository := Self; -end; - -function TcxStyleRepository.CreateStyleSheet(AStyleSheetClass: TcxCustomStyleSheetClass): TcxCustomStyleSheet; -begin - Result := CreateStyleSheetEx(AStyleSheetClass, Self); -end; - -function TcxStyleRepository.CreateStyleSheetEx(AStyleSheetClass: TcxCustomStyleSheetClass; - AOwner: TComponent): TcxCustomStyleSheet; -begin - Result := AStyleSheetClass.Create(AOwner); - Result.StyleRepository := Self; -end; - -function TcxStyleRepository.StyleIndexOf(AStyle: TcxCustomStyle): Integer; -begin - Result := FItems.IndexOf(AStyle); -end; - -function TcxStyleRepository.StyleSheetIndexOf(AStyleSheet: TcxCustomStyleSheet): Integer; -begin - Result := FStyleSheets.IndexOf(AStyleSheet); -end; - -procedure TcxStyleRepository.AddItem(AItem: TcxCustomStyle); -var - AIndex: Integer; -begin - AIndex := FItems.IndexOf(AItem); - if AIndex = -1 then - FItems.Add(AItem); -end; - -procedure TcxStyleRepository.AddStyleSheet(AStyleSheet: TcxCustomStyleSheet); -var - AIndex: Integer; -begin - AIndex := FStyleSheets.IndexOf(AStyleSheet); - if AIndex = -1 then - FStyleSheets.Add(AStyleSheet); -end; - -procedure TcxStyleRepository.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('PixelsPerInch', ReadPixelsPerInch, WritePixelsPerInch, Filer.Ancestor = nil); -end; - -procedure TcxStyleRepository.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - AItem: TcxCustomStyle; - AStyleSheet: TcxCustomStyleSheet; - I: Integer; -begin - for I := 0 to Count - 1 do - begin - AItem := Items[I]; - if AItem.Owner = Root then - Proc(AItem); - end; - for I := 0 to StyleSheetCount - 1 do - begin - AStyleSheet := StyleSheets[I]; - if AStyleSheet.Owner = Root then - Proc(AStyleSheet); - end; -end; - -function TcxStyleRepository.GetScaledValue(AValue: Integer): Integer; -begin - Result := AValue; - if Scalable and (FPixelsPerInch <> 0) and (FPixelsPerInch <> cxGetScreenPixelsPerInch) then - Result := MulDiv(Result, cxGetScreenPixelsPerInch, FPixelsPerInch); -end; - -procedure TcxStyleRepository.RemoveItem(AItem: TcxCustomStyle); -begin - FItems.Remove(AItem); -end; - -procedure TcxStyleRepository.RemoveStyleSheet(AStyleSheet: TcxCustomStyleSheet); -begin - FStyleSheets.Remove(AStyleSheet); -end; - -function TcxStyleRepository.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxStyleRepository.GetStyleSheetCount: Integer; -begin - Result := FStyleSheets.Count; -end; - -function TcxStyleRepository.GetItem(Index: Integer): TcxCustomStyle; -begin - Result := TcxCustomStyle(FItems[Index]); -end; - -function TcxStyleRepository.GetStyleSheet(Index: Integer): TcxCustomStyleSheet; -begin - Result := TcxCustomStyleSheet(FStyleSheets[Index]); -end; - -procedure TcxStyleRepository.ReadPixelsPerInch(Reader: TReader); -begin - FPixelsPerInch := Reader.ReadInteger; -end; - -procedure TcxStyleRepository.WritePixelsPerInch(Writer: TWriter); -begin - Writer.WriteInteger(cxGetScreenPixelsPerInch); -end; - -{ TcxCustomStylesItem } - -constructor TcxCustomStylesItem.Create(AIndex: Integer; AItem: TcxCustomStyle); -begin - inherited Create; - Index := AIndex; - Item := AItem; -end; - -{ TcxCustomStyles } - -constructor TcxCustomStyles.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FItems := TList.Create; -end; - -destructor TcxCustomStyles.Destroy; -begin - FDestroying := True; - Clear; - FItems.Free; - StyleSheet := nil; - inherited Destroy; -end; - -procedure TcxCustomStyles.Assign(Source: TPersistent); -begin - if Source is TcxCustomStyles then - StyleSheet := TcxCustomStyles(Source).StyleSheet; -end; - -function TcxCustomStyles.IsValidStyleSheet(AStyleSheet: TcxCustomStyleSheet): Boolean; -var - AStyles: TcxCustomStyles; -begin - Result := (AStyleSheet = nil) or - ((AStyleSheet <> OwnerStyleSheet) and (AStyleSheet.GetStylesClass = TcxCustomStylesClass(ClassType))); - if Result and (AStyleSheet <> nil) and (OwnerStyleSheet <> nil) then //check for a cycle - begin - AStyles := AStyleSheet.GetStyles; - while AStyles.StyleSheet <> nil do - begin - if AStyles.StyleSheet = OwnerStyleSheet then - begin - Result := False; - break; - end; - AStyles := AStyles.StyleSheet.GetStyles; - end; - end; -end; - -procedure TcxCustomStyles.StyleChanged(Sender: TcxCustomStyle); -var - I: Integer; -begin - for I := 0 to Count - 1 do - if Items[I].Item = Sender then - DoChanged(Items[I].Index); -end; - -procedure TcxCustomStyles.StyleRemoved(Sender: TcxCustomStyle); -var - I: Integer; -begin - for I := Count - 1 downto 0 do - if Items[I].Item = Sender then - Delete(I); -end; - -procedure TcxCustomStyles.Clear; -begin - while Count > 0 do - Delete(Count - 1); -end; - -procedure TcxCustomStyles.Delete(AItemIndex: Integer); -var - AItem: TcxCustomStylesItem; - AIndex: Integer; -begin - AItem := Items[AItemIndex]; - AIndex := AItem.Index; - AItem.Item.RemoveListener(Self); - AItem.Free; - FItems.Delete(AItemIndex); - DoChanged(AIndex); -end; - -procedure TcxCustomStyles.DoChanged(AIndex: Integer); -begin - if Destroying then Exit; - Changed(AIndex); - if OwnerStyleSheet <> nil then - OwnerStyleSheet.DoStyleChanged(AIndex); -end; - -function TcxCustomStyles.Find(AIndex: Integer; var AItemIndex: Integer): Boolean; -var - L, H, I, C: Integer; -begin - AItemIndex := 0; - Result := False; - L := 0; - H := Count - 1; - if L <= H then - repeat - I := (L + H) div 2; - C := Items[I].Index - AIndex; - if C = 0 then - begin - AItemIndex := I; - Result := True; - Break; - end - else - if C < 0 then - L := I + 1 - else - H := I - 1; - if L > H then - begin - AItemIndex := L; - Break; - end; - until False; -end; - -function TcxCustomStyles.GetValue(Index: Integer): TcxCustomStyle; -var - AItemIndex: Integer; -begin - if Find(Index, AItemIndex) then - Result := Items[AItemIndex].Item - else - Result := nil; - if (Result = nil) and (StyleSheet <> nil) and - ((GetOwner = nil) or not (GetOwner is TComponent) or // don't persist a stylesheet's style - not (csWriting in TComponent(GetOwner).ComponentState)) then - Result := StyleSheet.GetStyles.GetValue(Index); -end; - -procedure TcxCustomStyles.ResetStyles; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Values[I] := nil; -end; - -procedure TcxCustomStyles.SetValue(Index: Integer; Value: TcxCustomStyle); -var -{$IFDEF DELPHI6} - AStylesRootOwner, AValueOwner: TPersistent; -{$ENDIF} - AItem: TcxCustomStylesItem; - AItemIndex: Integer; -begin -{$IFDEF DELPHI6} - if (Value <> nil) and (Value.Name <> '') then - begin - AStylesRootOwner := Owner; - while GetUltimateOwner(AStylesRootOwner) <> nil do - AStylesRootOwner := GetUltimateOwner(AStylesRootOwner); - AValueOwner := Value.Owner; - if (AStylesRootOwner <> AValueOwner) and - (AStylesRootOwner is TComponent) and (AValueOwner is TComponent) and - AStylesRootOwner.InheritsFrom(AValueOwner.ClassType) then - Value := TComponent(AStylesRootOwner).FindComponent(Value.Name) as TcxCustomStyle; - end; -{$ENDIF} - if GetValue(Index) <> Value then - if Find(Index, AItemIndex) then - begin - AItem := Items[AItemIndex]; - AItem.Item.RemoveListener(Self); - if Value <> nil then - begin - AItem.Item := Value; - Value.AddListener(Self); - end - else - begin - AItem.Free; - FItems.Delete(AItemIndex); - end; - DoChanged(Index); - end - else - if Value <> nil then - begin - AItem := TcxCustomStylesItem.Create(Index, Value); - FItems.Insert(AItemIndex, AItem); - Value.AddListener(Self); - DoChanged(Index); - end; -end; - -procedure TcxCustomStyles.Changed(AIndex: Integer); -begin -end; - -function TcxCustomStyles.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxCustomStyles.GetItem(Index: Integer): TcxCustomStylesItem; -begin - Result := TcxCustomStylesItem(FItems[Index]); -end; - -procedure TcxCustomStyles.SetStyleSheet(const Value: TcxCustomStyleSheet); -var - AChangedStyles: TList; - - procedure AddChangedStyles(AStyleSheet: TcxCustomStyleSheet); - var - I: Integer; - AIndex: Pointer; - begin - if AStyleSheet = nil then exit; - if AChangedStyles = nil then - AChangedStyles := TList.Create; - for I := 0 to AStyleSheet.GetStyles.Count - 1 do - begin - AIndex := Pointer(AStyleSheet.GetStyles.Items[I].Index); - if AChangedStyles.IndexOf(AIndex) < 0 then - AChangedStyles.Add(AIndex); - end; - if AStyleSheet.GetStyles.StyleSheet <> nil then - AddChangedStyles(AStyleSheet.GetStyles.StyleSheet); - end; - -var - I: Integer; -begin - if (StyleSheet <> Value) and IsValidStyleSheet(Value) then - begin - AChangedStyles := nil; - if (StyleSheet <> nil) then - begin - StyleSheet.RemoveStyles(self); - if not Destroying then - AddChangedStyles(StyleSheet); - end; - FStyleSheet := Value; - if StyleSheet <> nil then - begin - StyleSheet.AddStyles(self); - AddChangedStyles(StyleSheet); - end; - if AChangedStyles <> nil then - begin - for I := 0 to AChangedStyles.Count - 1 do - DoChanged(Integer(AChangedStyles[I])); - AChangedStyles.Free; - end; - end; -end; - -{ TcxStyle } - -constructor TcxStyle.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FColor := clDefault; - FBitmap := TBitmap.Create; - FBitmap.OnChange := BitmapChanged; - FFont := TFont.Create; - FFont.OnChange := FontChanged; - FTextColor := clDefault; -end; - -destructor TcxStyle.Destroy; -begin - FreeAndNil(FFont); - FreeAndNil(FBitmap); - inherited Destroy; -end; - -procedure TcxStyle.SetAssignedValues(Value: TcxStyleValues); -begin - if FAssignedValues <> Value then - begin - FAssignedValues := Value; - Changed; - end; -end; - -procedure TcxStyle.SetBitmap(Value: TBitmap); -begin - FBitmap.Assign(Value); -end; - -procedure TcxStyle.SetColor(Value: TColor); -begin - if FColor <> Value then - begin - FColor := Value; - if FColor = clDefault then // It's correct? - Exclude(FAssignedValues, svColor) - else - Include(FAssignedValues, svColor); - Changed; - end; -end; - -procedure TcxStyle.SetFont(Value: TFont); -begin - FFont.Assign(Value); -end; - -procedure TcxStyle.SetTextColor(Value: TColor); -begin - if FTextColor <> Value then - begin - FTextColor := Value; - if FTextColor = clDefault then // It's correct? - Exclude(FAssignedValues, svTextColor) - else - Include(FAssignedValues, svTextColor); - Changed; - end; -end; - -procedure TcxStyle.BitmapChanged(Sender: TObject); -begin - if FBitmap.Empty then - Exclude(FAssignedValues, svBitmap) - else - Include(FAssignedValues, svBitmap); - Changed; -end; - -procedure TcxStyle.FontChanged(Sender: TObject); -begin - Include(FAssignedValues, svFont); - Changed; -end; - -function TcxStyle.IsBitmapStored: Boolean; -begin - Result := svBitmap in FAssignedValues; -end; - -function TcxStyle.IsColorStored: Boolean; -begin - Result := svColor in FAssignedValues; -end; - -function TcxStyle.IsFontStored: Boolean; -begin - Result := svFont in FAssignedValues; -end; - -function TcxStyle.IsTextColorStored: Boolean; -begin - Result := svTextColor in FAssignedValues; -end; - -procedure TcxStyle.ReadState(Reader: TReader); -begin - inherited ReadState(Reader); - if StyleRepository <> nil then - Font.Height := StyleRepository.GetScaledValue(Font.Height); -end; - -procedure TcxStyle.Assign(Source: TPersistent); -begin - if Source is TcxStyle then - with TcxStyle(Source) do - begin - Self.Bitmap := Bitmap; - Self.Color := Color; - Self.Font := Font; - Self.TextColor := TextColor; - Self.AssignedValues := AssignedValues; - end - else - inherited Assign(Source); -end; - -procedure TcxStyle.RestoreDefaults; -begin - FAssignedValues := []; - FBitmap.Assign(nil); - FColor := clDefault; - FTextColor := clDefault; - Changed; -end; - -{ TcxStyles } - -procedure TcxStyles.DefaultFontChanged(Sender: TObject; AFont: TFont); -var - I: Integer; - AParams: TcxViewParams; -begin - for I := 0 to FMaxDefaultViewParamsIndex do - if IsDefaultFont(I) then - begin - GetDefaultViewParams(I, nil, AParams); - if AParams.Font = AFont then DoChanged(I); - end; -end; - -function TcxStyles.GetValue(Index: Integer): TcxStyle; -begin - Result := TcxStyle(inherited GetValue(Index)); -end; - -procedure TcxStyles.SetValue(Index: Integer; Value: TcxStyle); -begin - inherited SetValue(Index, Value); -end; - -procedure TcxStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - AParams.Bitmap := nil; - if Index > FMaxDefaultViewParamsIndex then - FMaxDefaultViewParamsIndex := Index; -end; - -procedure TcxStyles.InternalGetViewParams(Index: Integer; AData: TObject; - AStyle: TcxStyle; out AParams: TcxViewParams); - - function GetBitmap(AAssignedStyle: TcxStyle): TBitmap; - begin - Result := nil; - if BitmapInViewParams then - begin - if UseStyle(AStyle, svBitmap) then - Result := AStyle.Bitmap - else - if UseStyle(AAssignedStyle, svBitmap) then - Result := AAssignedStyle.Bitmap; - end; - end; - - function GetColor(AAssignedStyle: TcxStyle): TColor; - begin - if UseStyle(AStyle, svColor) then - Result := AStyle.Color - else - if UseStyle(AAssignedStyle, svColor) then - Result := AAssignedStyle.Color - else - Result := clDefault; - end; - - function GetFont(AAssignedStyle: TcxStyle): TFont; - begin - if UseStyle(AStyle, svFont) then - Result := AStyle.Font - else - if UseStyle(AAssignedStyle, svFont) then - Result := AAssignedStyle.Font - else - Result := nil; - end; - - function GetTextColor(AAssignedStyle: TcxStyle): TColor; - begin - if UseStyle(AStyle, svTextColor) then - Result := AStyle.TextColor - else - if UseStyle(AAssignedStyle, svTextColor) then - Result := AAssignedStyle.TextColor - else - Result := clDefault; - end; - -var - AAssignedStyle: TcxStyle; -begin - AAssignedStyle := Values[Index]; - AParams.Bitmap := GetBitmap(AAssignedStyle); - AParams.Color := GetColor(AAssignedStyle); - AParams.Font := GetFont(AAssignedStyle); - AParams.TextColor := GetTextColor(AAssignedStyle); -end; - -function TcxStyles.IsDefaultFont(Index: Integer): Boolean; -begin - Result := not UseStyle(Values[Index], svFont); -end; - -function TcxStyles.GetBitmap(Index: Integer): TBitmap; -var - AAssignedStyle: TcxStyle; -begin - AAssignedStyle := Values[Index]; - if UseStyle(AAssignedStyle, svBitmap) and not AAssignedStyle.Bitmap.Empty then - Result := AAssignedStyle.Bitmap - else - Result := nil; -end; - -procedure TcxStyles.GetViewParams(Index: Integer; AData: TObject; - AStyle: TcxStyle; out AParams: TcxViewParams); - - function NeedGetDefaultViewParams(const AParams: TcxViewParams): Boolean; - begin - with AParams do - Result := BitmapInViewParams and (Bitmap = nil) or (Color = clDefault) or - (Font = nil) or (TextColor = clDefault) - end; - -var - ADefaultParams: TcxViewParams; -begin - InternalGetViewParams(Index, AData, AStyle, AParams); - if NeedGetDefaultViewParams(AParams) then - begin - GetDefaultViewParams(Index, AData, ADefaultParams); - if AParams.Bitmap = nil then - AParams.Bitmap := ADefaultParams.Bitmap; - if AParams.Color = clDefault then - AParams.Color := ADefaultParams.Color; - if AParams.Font = nil then - AParams.Font := ADefaultParams.Font; - if AParams.TextColor = clDefault then - AParams.TextColor := ADefaultParams.TextColor; - end; -end; - -procedure CreateStyleSheetStyles(ADestStyleSheet, ASourceStyleSheet: TcxCustomStyleSheet; - AStyleGetName: TcxStyleGetName = nil); -var - APropList: TPropList; - I, ACount: Integer; - ADestStyle, ASourceStyle: TcxStyle; -begin - if ADestStyleSheet.GetStylesClass <> ASourceStyleSheet.GetStylesClass then Exit; - ACount := GetPropList(ADestStyleSheet.GetStyles.ClassInfo, [tkClass], @APropList); - for I := 0 to ACount - 1 do - if GetTypeData(APropList[I].PropType^).ClassType = TcxStyle then - begin - ADestStyle := TcxStyle(GetObjectProp(ADestStyleSheet.GetStyles, dxShortStringToString(APropList[I].Name))); - ASourceStyle := TcxStyle(GetObjectProp(ASourceStyleSheet.GetStyles, dxShortStringToString(APropList[I].Name))); - if ASourceStyle <> nil then - begin - if ADestStyle <> nil then - ADestStyle.Assign(ASourceStyle) - else - if (ADestStyleSheet.StyleRepository <> nil) and - (ASourceStyle.AssignedValues <> []) then - begin - ADestStyle := TcxStyle(ADestStyleSheet.StyleRepository.CreateItemEx(TcxStyle, ADestStyleSheet.Owner)); - if Assigned(AStyleGetName) then - ADestStyle.Name := AStyleGetName(ADestStyle); - ADestStyle.Assign(ASourceStyle); - SetObjectProp(ADestStyleSheet.GetStyles, APropList[I], ADestStyle); - end; - end - else - SetObjectProp(ADestStyleSheet.GetStyles, APropList[I], nil); - end; -end; - -var - FStyleSheetClasses: TList = nil; - -procedure RegisterStyleSheetClass(AStyleSheetClass: TcxCustomStyleSheetClass); -begin - if FStyleSheetClasses = nil then - FStyleSheetClasses := TList.Create; - if FStyleSheetClasses.IndexOf(TObject(AStyleSheetClass)) = -1 then - FStyleSheetClasses.Add(TObject(AStyleSheetClass)); -end; - -procedure UnregisterStyleSheetClass(AStyleSheetClass: TcxCustomStyleSheetClass); -begin - if FStyleSheetClasses <> nil then - FStyleSheetClasses.Remove(TObject(AStyleSheetClass)); -end; - -procedure GetRegisteredStyleSheetClasses(AList: TList); -var - I: Integer; -begin - AList.Clear; - if FStyleSheetClasses <> nil then - for I := 0 to FStyleSheetClasses.Count - 1 do - AList.Add(FStyleSheetClasses[I]); -end; - -function ColorToText(AColor: TColor): string; -begin - Result := IntToStr(AColor); -end; - -function TextToColor(const ASt: string): TColor; -begin - if CompareText(ASt, DefaultValue) <> 0 then - Result := TColor(StrToInt(ASt)) - else Result := clDefault; -end; - -function FontToText(AFont: TFont): string; -begin - Result := AFont.Name + ',' + IntToStr(AFont.Size) + ',['; - if fsBold in AFont.Style then - Result := Result + 'B'; - if fsItalic in AFont.Style then - Result := Result + 'I'; - if fsUnderline in AFont.Style then - Result := Result + 'U'; - if fsStrikeOut in AFont.Style then - Result := Result + 'S'; - Result := Result + ']'; -end; - -procedure TextToFont(const AFont: TFont; const ASt: string); - procedure SetFontSize(AText: string); - begin - try - AFont.Size := StrToInt(AText); - except - end; - end; - -var - St: string; -begin - st := ASt; - if Pos(',', st) = 0 then - AFont.Name := st - else - begin - AFont.Name := Copy(st, 1, Pos(',', st) - 1); - st := Copy(st, Pos(',', st) + 1, Length(st)); - if Pos(',', st) = 0 then - SetFontSize(st) - else - begin - SetFontSize(Copy(st, 1, Pos(',', st) - 1)); - st := Copy(st, Pos(',', st) + 1, Length(st)); - if Pos('B', st) > 0 then - AFont.Style := AFont.Style + [fsBold]; - if Pos('I', st) > 0 then - AFont.Style := AFont.Style + [fsItalic]; - if Pos('U', st) > 0 then - AFont.Style := AFont.Style + [fsUnderline]; - if Pos('S', st) > 0 then - AFont.Style := AFont.Style + [fsStrikeout]; - end; - end; -end; - -procedure SaveBitmapToIniFile(AIniFile: TCustomIniFile; ABitmap: TBitmap; - const ASectionName, ABitmapName: string); -const - AStringValueMaxLength = 2047; -var - AStream: TMemoryStream; - I: Integer; - S: string; -begin - AStream := TMemoryStream.Create; - try - ABitmap.SaveToStream(AStream); - S := BinaryStreamToString(AStream); - finally - AStream.Free; - end; - for I := 0 to (Length(S) + AStringValueMaxLength - 1) div AStringValueMaxLength - 1 do - AIniFile.WriteString(ASectionName, ABitmapName + IntToStr(I), - Copy(S, 1 + I * AStringValueMaxLength, AStringValueMaxLength)); -end; - -procedure SaveStyleSheetsToIniFile(const AIniFileName: string; const AList: TList); -var - AIsFileEmpty: Boolean; - - procedure SaveStyleToIni(AIniFile: TCustomIniFile; const AStyleSheetCaption, AStyleName: string; - AStyle: TcxStyle); - var - Value: string; - begin - if svColor in AStyle.AssignedValues then - Value := ColorToText(AStyle.Color) - else - Value := DefaultValue; - if Value <> '' then - Value := Value + ','; - - if svTextColor in AStyle.AssignedValues then - Value := Value + ColorToText(AStyle.TextColor) - else - Value := Value + DefaultValue; - - if svFont in AStyle.AssignedValues then - begin - if Value <> '' then - Value := Value + ','; - Value := Value + FontToText(AStyle.Font); - end; - - if Value <> '' then - begin - AIniFile.WriteString(AStyleSheetCaption, AStyleName, Value); - AIsFileEmpty := False; - end; - - if (svBitmap in AStyle.AssignedValues) and VerifyBitmap(AStyle.Bitmap) then - SaveBitmapToIniFile(AIniFile, AStyle.Bitmap, AStyleSheetCaption, AStyleName + BitmapCaption); - end; - - procedure SaveStyleSheetToIni(AStyleSheet: TcxCustomStyleSheet; AIniFile: TCustomIniFile); - var - I, ACount: Integer; - APropList: TPropList; - AStyle: TcxStyle; - begin - ACount := GetPropList(AStyleSheet.GetStyles.ClassInfo, [tkClass], @APropList); - for I := 0 to ACount - 1 do - if GetTypeData(APropList[I].PropType^).ClassType = TcxStyle then - begin - AStyle := TcxStyle(GetObjectProp(AStyleSheet.GetStyles, APropList[I])); - if AStyle <> nil then - SaveStyleToIni(AIniFile, AStyleSheet.Caption, dxShortStringToString(APropList[I].Name), AStyle); - end; - end; - -var - AIniFile: TMemIniFile; - F: TextFile; - I: Integer; -begin - AIsFileEmpty := True; - try - AIniFile := TMemIniFile.Create(AIniFileName); - try - for I := 0 to AList.Count - 1 do - SaveStyleSheetToIni(TcxCustomStyleSheet(AList[I]), AIniFile); - if not AIsFileEmpty then AIniFile.UpdateFile; - finally - AIniFile.Free; - end; - finally - if AIsFileEmpty then - begin - AssignFile(F, AIniFileName); - Rewrite(F); - CloseFile(F); - end; - end; -end; - -procedure LoadStyleSheetsFromIniFile(const AIniFileName: string; - AStyleRepository: TcxStyleRepository; AStyleSheetClass: TcxCustomStyleSheetClass; - const AStyleSheetNames: TStrings = nil; AOwner: TComponent = nil; - const AStyleSheetList: TList = nil; AStyleGetName: TcxStyleGetName = nil); - - procedure LoadStyleFromIni(AIniFile: TCustomIniFile; AStyleSheet: TcxCustomStyleSheet; - AStyleName: string; var AStyleNameIndex: Integer); - var - AIsBitmapValue: Boolean; - AKey, S: string; - APos: Integer; - APropInfo: PPropInfo; - AStream: TMemoryStream; - AStyle: TcxStyle; - I: Integer; - begin - if AStyleName = '' then - begin - Inc(AStyleNameIndex); - Exit; - end; - APos := Pos(BitmapCaption, AStyleName); - if APos > 0 then - begin - AIsBitmapValue := True; - AStyleName := Copy(AStyleName, 1, APos - 1); - end - else - AIsBitmapValue := False; - - APropInfo := GetPropInfo(PTypeInfo(AStyleSheet.GetStyles.ClassInfo), AStyleName); - if (APropInfo <> nil) and (GetTypeData(APropInfo.PropType^).ClassType = TcxStyle) then - begin - if AIsBitmapValue then - begin - AStyle := TcxStyle(GetObjectProp(AStyleSheet.GetStyles, APropInfo)); - S := ''; - I := 0; - repeat - AKey := AStyleName + BitmapCaption + IntToStr(I); - if not AIniFile.ValueExists(AStyleSheet.Caption, AKey) then - Break; - S := S + AIniFile.ReadString(AStyleSheet.Caption, AKey, ''); - Inc(AStyleNameIndex); - Inc(I); - until False; - AStream := TMemoryStream.Create; - try - StringToBinaryStream(S, AStream); - AStyle.Bitmap.LoadFromStream(AStream); - finally - AStream.Free; - end; - end - else - begin - if AOwner <> nil then - AStyle := TcxStyle(AStyleRepository.CreateItemEx(TcxStyle, AOwner)) - else AStyle := TcxStyle(AStyleRepository.CreateItem(TcxStyle)); - if Assigned(AStyleGetName) then - AStyle.Name := AStyleGetName(AStyle); - - S := AIniFile.ReadString(AStyleSheet.Caption, AStyleName, ''); - if Pos(',', S) = 0 then - AStyle.Color := TextToColor(S) - else - begin - AStyle.Color := TextToColor(Copy(S, 1, Pos(',', S) - 1)); - S := Copy(S, Pos(',', S) + 1, Length(S)); - if Pos(',', S) = 0 then - AStyle.TextColor := TextToColor(S) - else - begin - AStyle.TextColor := TextToColor(Copy(S, 1, Pos(',', S) - 1)); - TextToFont(AStyle.Font, Copy(S, Pos(',', S) + 1, Length(S))); - end; - end; - SetObjectProp(AStyleSheet.GetStyles, APropInfo, AStyle); - Inc(AStyleNameIndex); - end; - end else Inc(AStyleNameIndex); - end; - - procedure LoadStyleSheetFromIni(const AStyleSheetName: string; AIniFile: TCustomIniFile); - var - ANames: TStringList; - AStyleSheet: TcxCustomStyleSheet; - I: Integer; - begin - ANames := TStringList.Create; - try - AIniFile.ReadSection(AStyleSheetName, ANames); - if ANames.Count > 0 then - begin - if AOwner <> nil then - AStyleSheet := AStyleRepository.CreateStyleSheetEx(AStyleSheetClass, AOwner) - else AStyleSheet := AStyleRepository.CreateStyleSheet(AStyleSheetClass); - if AStyleSheetList <> nil then - AStyleSheetList.Add(AStyleSheet); - AStyleSheet.Caption := AStyleSheetName; - I := 0; - while I < ANames.Count do - LoadStyleFromIni(AIniFile, AStyleSheet, ANames[I], I); - end; - finally - ANames.Free; - end; - end; - -var - AIniFile: TMemIniFile; - I: Integer; - AStrings: TStringList; -begin - AIniFile := TMemIniFile.Create(AIniFileName); - AStrings := TStringList.Create; - try - if (AStyleSheetNames = nil) or (AStyleSheetNames.Count = 0) then - AIniFile.ReadSections(AStrings) - else - AStrings.AddStrings(AStyleSheetNames); - for I := 0 to AStrings.Count - 1 do - LoadStyleSheetFromIni(AStrings[I], AIniFile); - finally - AStrings.Free; - AIniFile.Free; - end; -end; - -initialization -{$IFDEF DELPHI6} - StartClassGroup(TControl); - GroupDescendentsWith(TcxCustomStyle, TControl); - GroupDescendentsWith(TcxCustomStyleSheet, TControl); - GroupDescendentsWith(TcxStyleRepository, TControl); -{$ENDIF} - RegisterClasses([TcxStyle]); - -finalization - FreeAndNil(FStyleSheetClasses); - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/cxVer.inc b/internal/x.46/ExpressLibrary/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/ExpressLibrary/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/ExpressLibrary/Sources/dxFading.pas b/internal/x.46/ExpressLibrary/Sources/dxFading.pas deleted file mode 100644 index df3b449f..00000000 --- a/internal/x.46/ExpressLibrary/Sources/dxFading.pas +++ /dev/null @@ -1,642 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSBARS AND ALL ACCOMPANYING VCL } -{ CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxFading; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, -{$ENDIF} - Windows, Classes, SysUtils, Graphics, cxGraphics, ExtCtrls, dxGDIPlusClasses, - dxGDIPlusApi, cxControls, cxClasses; - -const - dxFadeInDefaultAnimationFrameCount: Integer = 4; - dxFadeInDefaultAnimationFrameDelay: Integer = 15; - dxFadeOutDefaultAnimationFrameCount: Integer = 12; - dxFadeOutDefaultAnimationFrameDelay: Integer = 20; - -type - TdxFader = class; - TdxFadingList = class; - - IdxFadingElementData = interface - ['{982B842D-FF38-4E6E-B7CE-BB608FE193F7}'] - function DrawImage(DC: HDC; const R: TRect): Boolean; - function GetFadeWorkImage(out AImage: TdxGPImage): Boolean; - end; - - TdxFadingObjectState = (fosNone, fosGetParams, fosFading); - - IdxFadingObject = interface - ['{73AB2A92-CDD9-4F13-965A-DC799DE837F9}'] - function CanFade: Boolean; - procedure DrawFadeImage; - procedure FadingBegin(AData: IdxFadingElementData); - procedure FadingEnd; - procedure GetFadingParams( - out AFadeOutImage, AFadeInImage: TcxBitmap; - var AFadeInAnimationFrameCount, AFadeInAnimationFrameDelay: Integer; - var AFadeOutAnimationFrameCount, AFadeOutAnimationFrameDelay: Integer); - end; - - { TdxFadingElement } - - TdxFadingState = (fsFadeIn, fsFadeOut); - - TdxFadingElement = class(TcxIUnknownObject, IdxFadingElementData) - private - FElement: TObject; - FFadeInAnimationFrameCount: Integer; - FFadeInAnimationFrameDelay: Integer; - FFadeInImage: TdxGPImage; - FFadeOutAnimationFrameCount: Integer; - FFadeOutAnimationFrameDelay: Integer; - FFadeOutImage: TdxGPImage; - FFadingDelayCount: Integer; - FFadingDelayIndex: Integer; - FFadingObject: IdxFadingObject; - FFadingWorkImage: TdxGPImage; - FOwner: TdxFader; - FStage: Integer; - FState: TdxFadingState; - function GetAnimationFrameCount: Integer; - procedure SetFadingWorkImage(AImage: TdxGPImage); - procedure SetState(const Value: TdxFadingState); - procedure ValidateStageParams; - protected - procedure CalculateIntervals; - procedure CheckBitmapColors(var AColors: TdxRGBColors); - function CreateGPImage(const ABitmap: TcxBitmap): TdxGPImage; - procedure DoFade; - function GetFinalImageState: TdxGPImage; - function GetInvertedStage: Integer; - function GetStageAlpha: Byte; - // IdxFadingElementData - function DrawImage(DC: HDC; const R: TRect): Boolean; - function GetFadeWorkImage(out AImage: TdxGPImage): Boolean; - // Properties - property AnimationFrameCount: Integer read GetAnimationFrameCount; - property FadeInAnimationFrameCount: Integer read FFadeInAnimationFrameCount; - property FadeInAnimationFrameDelay: Integer read FFadeInAnimationFrameDelay; - property FadeOutAnimationFrameCount: Integer read FFadeOutAnimationFrameCount; - property FadeOutAnimationFrameDelay: Integer read FFadeOutAnimationFrameDelay; - property FadingDelayCount: Integer read FFadingDelayCount; - property Owner: TdxFader read FOwner; - property Stage: Integer read FStage; - public - constructor Create(AOwner: TdxFader; AElement: TObject; - AState: TdxFadingState; const AFadeOutImage, AFadeInImage: TcxBitmap; - AFadeInAnimationFrameCount, AFadeInAnimationFrameDelay: Integer; - AFadeOutAnimationFrameCount, AFadeOutAnimationFrameDelay: Integer); - destructor Destroy; override; - procedure Initialize; - procedure Finalize; - // Properties - property Element: TObject read FElement; - property FadingWorkImage: TdxGPImage read FFadingWorkImage write SetFadingWorkImage; - property State: TdxFadingState read FState write SetState; - end; - - { TdxFadingObjectHelper } - - TdxFadingObjectHelper = class(TcxIUnknownObject, IdxFadingObject) - private - FFadingElementData: IdxFadingElementData; - function GetIsEmpty: Boolean; - protected - // IdxFadingObject - function CanFade: Boolean; virtual; - procedure DrawFadeImage; virtual; - procedure FadingBegin(AData: IdxFadingElementData); - procedure FadingEnd; - procedure GetFadingParams(out AFadeOutImage, AFadeInImage: TcxBitmap; - var AFadeInAnimationFrameCount, AFadeInAnimationFrameDelay: Integer; - var AFadeOutAnimationFrameCount, AFadeOutAnimationFrameDelay: Integer); virtual; - public - procedure DrawImage(DC: HDC; const R: TRect); - // Properties - property IsEmpty: Boolean read GetIsEmpty; - end; - - { TdxFadingList } - - TdxFadingList = class(TList) - private - function GetItems(Index: Integer): TdxFadingElement; - public - procedure Clear; override; - property Items[Index: Integer]: TdxFadingElement read GetItems; default; - end; - - { TdxFader } - - TdxFaderAnimationState = (fasDefault, fasEnabled, fasDisabled); - - TdxFader = class(TObject) - private - FList: TdxFadingList; - FMaxAnimationCount: Integer; - FState: TdxFaderAnimationState; - FTimer: TTimer; - function GetActive: Boolean; - function GetIsReady: Boolean; - function GetSystemAnimationState: Boolean; - procedure SetMaxAnimationCount(Value: Integer); - procedure ValidateQueue; - protected - procedure AddFadingElement(AObject: TObject; AState: TdxFadingState); - procedure DoFade(AObject: TObject; AState: TdxFadingState); - procedure DoTimer(Sender: TObject); - procedure RemoveFadingElement(AElement: TdxFadingElement); - property Active: Boolean read GetActive; - public - constructor Create; - destructor Destroy; override; - procedure Clear; - function Contains(AObject: TObject): Boolean; - procedure FadeIn(AObject: TObject); - procedure FadeOut(AObject: TObject); - function Find(AObject: TObject; out AFadingElement: TdxFadingElement): Boolean; - procedure Remove(AObject: TObject; ADestroying: Boolean = True); - property IsReady: Boolean read GetIsReady; - property MaxAnimationCount: Integer read FMaxAnimationCount write SetMaxAnimationCount; - property State: TdxFaderAnimationState read FState write FState; - end; - -function dxFader: TdxFader; - -implementation - -uses - Math; - -const - dxMaxAnimationFrameCount = 32; - dxMaxAnimationFrameDelay = 300; - dxMaxAnimationCount = 20; - dxMinFadingInterval = 10; - -var - Fader: TdxFader; - -function dxFader: TdxFader; -begin - Result := Fader; -end; - -{ TdxFadingElement } - -constructor TdxFadingElement.Create(AOwner: TdxFader; AElement: TObject; - AState: TdxFadingState; const AFadeOutImage, AFadeInImage: TcxBitmap; - AFadeInAnimationFrameCount, AFadeInAnimationFrameDelay: Integer; - AFadeOutAnimationFrameCount, AFadeOutAnimationFrameDelay: Integer); -begin - inherited Create; - FOwner := AOwner; - FElement := AElement; - FState := AState; - FFadeInAnimationFrameCount := AFadeInAnimationFrameCount; - FFadeInAnimationFrameDelay := AFadeInAnimationFrameDelay; - FFadeOutAnimationFrameCount := AFadeOutAnimationFrameCount; - FFadeOutAnimationFrameDelay := AFadeOutAnimationFrameDelay; - Supports(AElement, IdxFadingObject, FFadingObject); - FFadeInImage := CreateGPImage(AFadeInImage); - FFadeOutImage := CreateGPImage(AFadeOutImage); - ValidateStageParams; - Initialize; -end; - -destructor TdxFadingElement.Destroy; -begin - FadingWorkImage := GetFinalImageState; - Owner.RemoveFadingElement(Self); - FFadingObject.FadingEnd; - FreeAndNil(FFadeOutImage); - FreeAndNil(FFadeInImage); - FadingWorkImage := nil; - FFadingObject := nil; - inherited Destroy; -end; - -function TdxFadingElement.CreateGPImage(const ABitmap: TcxBitmap): TdxGPImage; -var - AColors: TdxRGBColors; -begin - AColors := dxGPImageClass.GetBitmapBits(ABitmap); - CheckBitmapColors(AColors); - Result := dxGPImageClass.CreateFromPattern(ABitmap.Width, ABitmap.Height, - AColors, ABitmap.PixelFormat = pf32bit); -end; - -procedure TdxFadingElement.CheckBitmapColors(var AColors: TdxRGBColors); -var - I: Integer; -begin - for I := Low(AColors) to High(AColors) do - with AColors[I] do - begin - if (rgbBlue + rgbGreen + rgbRed > 0) and (rgbReserved = 0) then - rgbReserved := $FF; - end; -end; - - -procedure TdxFadingElement.Initialize; -begin - FFadingObject.FadingBegin(Self); - if State = fsFadeIn then - FadingWorkImage := FFadeOutImage.Clone - else - FadingWorkImage := FFadeInImage.Clone; -end; - -procedure TdxFadingElement.Finalize; -begin - Free; -end; - -function TdxFadingElement.GetFinalImageState: TdxGPImage; -begin - if State = fsFadeIn then - Result := FFadeInImage.Clone - else - Result := FFadeOutImage.Clone; -end; - -function TdxFadingElement.GetInvertedStage: Integer; -begin - if State = fsFadeIn then - Result := Round((1 - Stage / (FadeInAnimationFrameCount + 1)) * FadeOutAnimationFrameCount) - else - Result := Round((1 - Stage / (FadeOutAnimationFrameCount + 1)) * FadeInAnimationFrameCount); -end; - -function TdxFadingElement.GetStageAlpha: Byte; -begin - if State = fsFadeIn then - Result := Min(255, Stage * (256 div FadeInAnimationFrameCount)) - else - Result := Max(0, 255 - Stage * (256 div FadeOutAnimationFrameCount)); -end; - -procedure TdxFadingElement.CalculateIntervals; -var - AInterval: Integer; -begin - if State = fsFadeIn then - AInterval := FadeInAnimationFrameDelay - else - AInterval := FadeOutAnimationFrameDelay; - FFadingDelayCount := Max(AInterval div dxMinFadingInterval, 1); - FFadingDelayIndex := 0; -end; - -procedure TdxFadingElement.DoFade; -begin - FFadingDelayIndex := (FFadingDelayIndex + 1) mod FadingDelayCount; - if FFadingDelayIndex = 0 then - begin - if Stage >= AnimationFrameCount then - Finalize - else - begin - Inc(FStage); - FadingWorkImage := FFadeOutImage.MakeComposition(FFadeInImage, GetStageAlpha); - end; - end; -end; - -procedure TdxFadingElement.ValidateStageParams; -begin - if FFadeInAnimationFrameCount <= 0 then - FFadeInAnimationFrameCount := dxFadeInDefaultAnimationFrameCount - else - FFadeInAnimationFrameCount := Min(FFadeInAnimationFrameCount, dxMaxAnimationFrameCount); - - if FFadeOutAnimationFrameCount <= 0 then - FFadeOutAnimationFrameCount := dxFadeOutDefaultAnimationFrameCount - else - FFadeOutAnimationFrameCount := Min(FFadeOutAnimationFrameCount, dxMaxAnimationFrameCount); - - if FFadeInAnimationFrameDelay < dxMinFadingInterval then - FFadeInAnimationFrameDelay := dxFadeInDefaultAnimationFrameDelay - else - FFadeInAnimationFrameDelay := Min(FFadeInAnimationFrameDelay, dxMaxAnimationFrameDelay); - - if FFadeOutAnimationFrameDelay < dxMinFadingInterval then - FFadeOutAnimationFrameDelay := dxFadeOutDefaultAnimationFrameDelay - else - FFadeOutAnimationFrameDelay := Min(dxMaxAnimationFrameDelay, FFadeOutAnimationFrameDelay); - - CalculateIntervals; -end; - -function TdxFadingElement.GetAnimationFrameCount: Integer; -begin - if State = fsFadeIn then - Result := FadeInAnimationFrameCount - else - Result := FadeOutAnimationFrameCount; -end; - -procedure TdxFadingElement.SetFadingWorkImage(AImage: TdxGPImage); -var - ATemp: TdxGPImage; -begin - ATemp := FFadingWorkImage; - try - FFadingWorkImage := AImage; - if AImage <> nil then - FFadingObject.DrawFadeImage; - finally - ATemp.Free; - end; -end; - -procedure TdxFadingElement.SetState(const Value: TdxFadingState); -begin - if FState <> Value then - begin - FStage := GetInvertedStage; - FState := Value; - CalculateIntervals; - end; -end; - -function TdxFadingElement.DrawImage(DC: HDC; const R: TRect): Boolean; -begin - Result := Assigned(FadingWorkImage); - if Result then - FadingWorkImage.Draw(DC, R); -end; - -function TdxFadingElement.GetFadeWorkImage(out AImage: TdxGPImage): Boolean; -begin - AImage := FadingWorkImage; - Result := AImage <> nil; -end; - -{ TdxFadingList } - -procedure TdxFadingList.Clear; -begin - while Count > 0 do - Items[0].Free; - inherited Clear; -end; - -function TdxFadingList.GetItems(Index: Integer): TdxFadingElement; -begin - Result := TdxFadingElement(inherited Items[Index]); -end; - -{ TdxFader } - -constructor TdxFader.Create; -begin - inherited Create; - FState := fasDefault; - FList := TdxFadingList.Create; - FTimer := TTimer.Create(nil); - FTimer.Enabled := False; - FTimer.Interval := dxMinFadingInterval; - FTimer.OnTimer := DoTimer; - FMaxAnimationCount := 10; -end; - -destructor TdxFader.Destroy; -begin - Clear; - FreeAndNil(FTimer); - FreeAndNil(FList); - inherited Destroy; -end; - -procedure TdxFader.Clear; -begin - FList.Clear; -end; - -function TdxFader.Contains(AObject: TObject): Boolean; -var - AFadingElement: TdxFadingElement; -begin - Result := Find(AObject, AFadingElement); -end; - -procedure TdxFader.FadeIn(AObject: TObject); -begin - DoFade(AObject, fsFadeIn); -end; - -procedure TdxFader.FadeOut(AObject: TObject); -begin - DoFade(AObject, fsFadeOut); -end; - -procedure TdxFader.AddFadingElement(AObject: TObject; AState: TdxFadingState); -var - AFadeInAnimationFrameCount: Integer; - AFadeInAnimationFrameDelay: Integer; - AFadeOutAnimationFrameCount: Integer; - AFadeOutAnimationFrameDelay: Integer; - AFadingObject: IdxFadingObject; - ATemp1, ATemp2: TcxBitmap; -begin - ATemp1 := nil; - ATemp2 := nil; - Supports(AObject, IdxFadingObject, AFadingObject); - AFadeInAnimationFrameCount := dxFadeInDefaultAnimationFrameCount; - AFadeInAnimationFrameDelay := dxFadeInDefaultAnimationFrameDelay; - AFadeOutAnimationFrameCount := dxFadeOutDefaultAnimationFrameCount; - AFadeOutAnimationFrameDelay := dxFadeOutDefaultAnimationFrameDelay; - AFadingObject.GetFadingParams(ATemp1, ATemp2, AFadeInAnimationFrameCount, - AFadeInAnimationFrameDelay, AFadeOutAnimationFrameCount, AFadeOutAnimationFrameDelay); - try - if (ATemp1 <> nil) and (ATemp2 <> nil) and not (ATemp1.Empty or ATemp2.Empty) then - begin - FList.Add(TdxFadingElement.Create(Self, AObject, AState, ATemp1, ATemp2, - AFadeInAnimationFrameCount, AFadeInAnimationFrameDelay, AFadeOutAnimationFrameCount, - AFadeOutAnimationFrameDelay)); - ValidateQueue; - end; - finally - ATemp1.Free; - ATemp2.Free; - end; -end; - -procedure TdxFader.DoFade(AObject: TObject; AState: TdxFadingState); -var - AElement: TdxFadingElement; - AIntf: IdxFadingObject; -begin - if IsReady and Supports(AObject, IdxFadingObject, AIntf) and AIntf.CanFade then - begin - if Find(AObject, AElement) then - AElement.State := AState - else - AddFadingElement(AObject, AState); - end; -end; - -procedure TdxFader.DoTimer(Sender: TObject); -var - I: Integer; -begin - for I := FList.Count - 1 downto 0 do - FList.Items[I].DoFade; -end; - -function TdxFader.GetSystemAnimationState: Boolean; -begin - SystemParametersInfo(SPI_GETMENUANIMATION, 0, @Result, 0); -end; - -procedure TdxFader.RemoveFadingElement(AElement: TdxFadingElement); -begin - FList.Remove(AElement); - ValidateQueue; -end; - -function TdxFader.Find(AObject: TObject; out AFadingElement: TdxFadingElement): Boolean; -var - I: Integer; -begin - AFadingElement := nil; - for I := 0 to FList.Count - 1 do - if FList[I].Element = AObject then - begin - AFadingElement := FList[I]; - Break; - end; - Result := AFadingElement <> nil; -end; - -procedure TdxFader.Remove(AObject: TObject; ADestroying: Boolean = True); -var - AElement: TdxFadingElement; -begin - if Find(AObject, AElement) then - begin - if ADestroying then - AElement.Free - else - AElement.Finalize; - end; -end; - -function TdxFader.GetActive: Boolean; -begin - if State = fasDefault then - Result := GetSystemAnimationState - else - Result := State = fasEnabled; -end; - -function TdxFader.GetIsReady: Boolean; -begin - Result := Active and CheckGdiPlus and - (GetDeviceCaps(cxScreenCanvas.Handle, BITSPIXEL) > 16); -end; - -procedure TdxFader.SetMaxAnimationCount(Value: Integer); -begin - Value := Min(Max(0, Value), dxMaxAnimationCount); - if FMaxAnimationCount <> Value then - begin - FMaxAnimationCount := Value; - ValidateQueue; - end; -end; - -procedure TdxFader.ValidateQueue; -begin - while FList.Count > MaxAnimationCount do - FList[0].Finalize; - FTimer.Enabled := FList.Count > 0; -end; - -{ TdxFadingObjectHelper } - -function TdxFadingObjectHelper.GetIsEmpty: Boolean; -begin - Result := FFadingElementData = nil; -end; - -function TdxFadingObjectHelper.CanFade: Boolean; -begin - Result := False; -end; - -procedure TdxFadingObjectHelper.DrawFadeImage; -begin -end; - -procedure TdxFadingObjectHelper.FadingBegin(AData: IdxFadingElementData); -begin - FFadingElementData := AData; -end; - -procedure TdxFadingObjectHelper.FadingEnd; -begin - FFadingElementData := nil; -end; - -procedure TdxFadingObjectHelper.GetFadingParams( - out AFadeOutImage, AFadeInImage: TcxBitmap; - var AFadeInAnimationFrameCount, AFadeInAnimationFrameDelay: Integer; - var AFadeOutAnimationFrameCount, AFadeOutAnimationFrameDelay: Integer); -begin -end; - -procedure TdxFadingObjectHelper.DrawImage(DC: HDC; const R: TRect); -begin - if FFadingElementData <> nil then - FFadingElementData.DrawImage(DC, R); -end; - -initialization - Fader := TdxFader.Create; - -finalization - FreeAndNil(Fader); - -end. - diff --git a/internal/x.46/ExpressLibrary/Sources/dxSkinInfo.pas b/internal/x.46/ExpressLibrary/Sources/dxSkinInfo.pas deleted file mode 100644 index e5dd5548..00000000 --- a/internal/x.46/ExpressLibrary/Sources/dxSkinInfo.pas +++ /dev/null @@ -1,1235 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxSkinInfo; - -interface - -uses - Windows, Classes, Graphics, SysUtils, cxClasses, cxGraphics, cxLookAndFeels, - cxGeometry, cxLookAndFeelPainters, dxSkinsCore, dxSkinsStrs; - -type - - { TdxSkinScrollInfo } - - TdxSkinScrollInfo = class(TObject) - private - FElement: TdxSkinElement; - FImageIndex: Integer; - public - constructor Create(AElement: TdxSkinElement; AImageIndex: Integer; - APart: TcxScrollBarPart); - function Draw(DC: HDC; const R: TRect; AImageIndex: Integer; - AState: TdxSkinElementState): Boolean; overload; - function Draw(DC: HDC; const R: TRect; AState: TdxSkinElementState): Boolean; overload; - - property Element: TdxSkinElement read FElement; - property ImageIndex: Integer read FImageIndex; - end; - - TdxSkinFormIcon = (sfiMenu, sfiHelp, sfiMinimize, sfiMaximize, sfiRestore, sfiClose); - TdxSkinFormIcons = set of TdxSkinFormIcon; - - { TdxSkinInfo } - - TdxSkinInfo = class(TcxIUnknownObject, IdxSkinChangeListener, IdxSkinInfo) - private - FSkin: TdxSkin; - procedure SetSkin(ASkin: TdxSkin); - protected - Group_Bars: TdxSkinControlGroup; - Group_Common: TdxSkinControlGroup; - Group_Docking: TdxSkinControlGroup; - Group_Editors: TdxSkinControlGroup; - Group_Form: TdxSkinControlGroup; - Group_Grid: TdxSkinControlGroup; - Group_NavBar: TdxSkinControlGroup; - Group_NavPane: TdxSkinControlGroup; - Group_PrintingSystem: TdxSkinControlGroup; - Group_Ribbon: TdxSkinControlGroup; - Group_Scheduler: TdxSkinControlGroup; - Group_Tabs: TdxSkinControlGroup; - Group_VGrid: TdxSkinControlGroup; - // - CardViewSeparator: TdxSkinElement; - ClockElements: array[Boolean] of TdxSkinElement; - CheckboxElement: TdxSkinElement; - EditButtonElements: array [Boolean] of TdxSkinElement; - EditButtonGlyphs: array [TcxEditBtnKind] of TdxSkinElement; - GridGroupByBox: TdxSkinElement; - GridGroupRow: TdxSkinElement; - GridLine: TdxSkinElement; - GridFixedLine: TdxSkinElement; - IndicatorImages: TdxSkinElement; - NavigatorGlyphs: TdxSkinElement; - NavigatorGlyphsVert: TdxSkinElement; - RadioGroupButton: TdxSkinElement; - Splitter: array[Boolean] of TdxSkinElement; - TrackBarThumb: array[Boolean, TcxTrackBarTicksAlign] of TdxSkinElement; - TrackBarTrack: array[Boolean] of TdxSkinElement; - VGridCategory: TdxSkinElement; - VGridLine: array[Boolean] of TdxSkinElement; - VGridRowHeader: TdxSkinElement; - // Colors - CalcEditButtonTextColors: array[TcxCalcButtonKind] of TdxSkinColor; - ContentEvenColor: TdxSkinColor; - ContentOddColor: TdxSkinColor; - ContentTextColor: TdxSkinColor; - HeaderBackgroundColor: TdxSkinColor; - HeaderBackgroundTextColor: TdxSkinColor; - SelectionColor: TdxSkinColor; - SelectionTextColor: TdxSkinColor; - // ExpandButton - ExpandButton: TdxSkinElement; - // Footer - FooterCell, FooterPanel: TdxSkinElement; - // header - Header, HeaderSpecial: TdxSkinElement; - // filter - FilterButtons: array[Boolean] of TdxSkinElement; - FilterPanel: TdxSkinElement; - // Scheduler3 - SchedulerNavigationButtons: array[Boolean] of TdxSkinElement; - SchedulerNavigationButtonsArrow: array[Boolean] of TdxSkinElement; - // - procedure CheckItem(AItem: TObject; const AMessage: string; var ACheckedItem); - function CreateBlankElement(AGroup: TdxSkinControlGroup; const AName: string): TdxSkinElement; - function CreateBlankGroup(const AName: string): TdxSkinControlGroup; - function GetColorByName(AGroup: TdxSkinPersistent; const AName: string): TdxSkinColor; - function GetIntPropertyByName(AGroup: TdxSkinPersistent; const AName: string): TdxSkinIntegerProperty; - function GetElementColorProperty(AElement: TdxSkinPersistent; const APropName: string): TColor; - function GetElementIntProperty(AElement: TdxSkinPersistent; const APropName: string; - ADefValue: Integer = 0): Integer; - function GetGroupByName(const AName: string): TdxSkinControlGroup; - function GetElementByName(AGroup: TdxSkinControlGroup; const AName: string; - ACreateIfEmpty: Boolean = True): TdxSkinElement; - procedure InitializeBarElements; - procedure InitializeButtonElements; - procedure InitializeCalcEditColors; - procedure InitializeCalendarElements; - procedure InitializeCheckboxElements; - procedure InitializeClockElements; - procedure InitializeColors; - procedure InitializeGroups; - procedure InitializeDockControlElements; - procedure InitializeEditButtonElements; - procedure InitializeFilterElements; - procedure InitializeFooterElements; - procedure InitializeFormElements; - procedure InitializeGridElements; - procedure InitializeGroupBoxElements; - procedure InitializeHeaderElements; - procedure InitializeIndicatorImages; - procedure InitializeNavBarElements; - procedure InitializeNavigatorElements; - procedure InitializePageControlElements; - procedure InitializeProgressBarElements; - procedure InitializeRadioGroupElements; - procedure InitializeRibbonColors; - procedure InitializeRibbonElements; - procedure InitializeRibbonProperties; - procedure InitializeSchedulerElements; - procedure InitializeScrollBarElements; - procedure InitializeSizeGripElements; - procedure InitializeSplitterElements; - procedure InitializeToolTipElements; - procedure InitializePrintingSystemElements; - procedure InitializeTrackBarElements; - procedure InitializeSkinInfo; virtual; - - procedure FinalizeScrollBarElements; - procedure FinalizeSkinInfo; virtual; - { IdxSkinInfo } - function GetSkin: TdxSkin; - { IdxSkinChangeListener } - procedure SkinChanged(Sender: TdxSkin); virtual; - public - // Button - ButtonDisabled: TdxSkinColor; - ButtonElements: TdxSkinElement; - // Colors - ContainerBorderColor: TdxSkinColor; - ContainerHighlightBorderColor: TdxSkinColor; - ContentColor: TdxSkinColor; - EditorBackgroundColors: array[TcxEditStateColorKind] of TdxSkinColor; - EditorTextColors: array[TcxEditStateColorKind] of TdxSkinColor; - HyperLinkTextColor: TdxSkinColor; - // ProgressBar - ProgressBarElements: array[Boolean, Boolean] of TdxSkinElement; - ProgressBarTextColors: array[Boolean] of TdxSkinColor; - // ScrollBars - ScrollBar_Elements: array[Boolean, TcxScrollBarPart] of TdxSkinScrollInfo; - // Label - LabelLine: array[Boolean] of TdxSkinElement; - // GroupBox - GroupBoxCaptionElements: array[TcxGroupBoxCaptionPosition] of TdxSkinElement; - GroupBoxClient: TdxSkinElement; - GroupBoxElements: array[TcxGroupBoxCaptionPosition] of TdxSkinElement; - // DockControl - DockControlBorder: TdxSkinElement; - DockControlCaption: TdxSkinElement; - DockControlCaptionNonFocusedTextColor: TColor; - DockControlHideBar: TdxSkinElement; - DockControlHideBarLeft: TdxSkinElement; - DockControlHideBarRight: TdxSkinElement; - DockControlHideBarBottom: TdxSkinElement; - DockControlHideBarButtons: TdxSkinElement; - DockControlHideBarTextColor: array[Boolean] of TdxSkinColor; - DockControlIndents: array[0..2] of Integer; - DockControlTabHeader: TdxSkinElement; - DockControlTabHeaderBackground: TdxSkinElement; - DockControlTabHeaderLine: TdxSkinElement; - DockControlTabTextColor: array[Boolean] of TdxSkinColor; - DockControlWindowButton: TdxSkinElement; - DockControlWindowButtonGlyphs: TdxSkinElement; - // PageControl - LayoutControlColor: TdxSkinColor; - PageControlButtonHorz: TdxSkinElement; - PageControlButtonVert: TdxSkinElement; - PageControlHeader: TdxSkinElement; - PageControlIndents: array[0..5] of Integer; - PageControlPane: TdxSkinElement; - TabTextColor: TdxSkinColor; - TabTextColorActive: TdxSkinColor; - TabTextColorDisabled: TdxSkinColor; - TabTextColorHot: TdxSkinColor; - // NavBar - NavBarBackgroundColor: TdxSkinElement; - NavBarGroupButtons: array [Boolean] of TdxSkinElement; - NavBarGroupClient: TdxSkinElement; - NavBarGroupHeader: TdxSkinElement; - NavBarItem: TdxSkinElement; - NavPaneCaptionFontSize: TdxSkinIntegerProperty; - NavPaneCaptionHeight: TdxSkinIntegerProperty; - NavPaneCollapseButton: TdxSkinElement; - NavPaneCollapsedGroupClient: TdxSkinElement; - NavPaneExpandButton: TdxSkinElement; - NavPaneFormBorder: TdxSkinElement; - NavPaneFormSizeGrip: TdxSkinElement; - NavPaneGroupButton: array[Boolean] of TdxSkinElement; - NavPaneGroupCaption: TdxSkinElement; - NavPaneGroupClient: TdxSkinElement; - NavPaneItem: TdxSkinElement; - NavPaneOffsetGroupBorders: TdxSkinBooleanProperty; - NavPaneOverflowPanel: TdxSkinElement; - NavPaneOverflowPanelExpandedItem: TdxSkinElement; - NavPaneOverflowPanelItem: TdxSkinElement; - NavPaneScrollButtons: array[Boolean] of TdxSkinElement; - NavPaneSelectedItem: TdxSkinElement; - NavPaneSplitter: TdxSkinElement; - // Form - FormBorderWidths: array[Boolean] of TRect; - FormCaptionDelta: Integer; - FormContent: TdxSkinElement; - FormFrames: array[Boolean, TcxBorder] of TdxSkinElement; - FormIcons: array[Boolean, TdxSkinFormIcon] of TdxSkinElement; - FormInactiveColor: TdxSkinColor; - FormStatusBar: TdxSkinElement; - FormTextShadowColor: TdxSkinColor; - SizeGrip: TdxSkinElement; - // Scheduler - SchedulerAllDayArea: array[Boolean] of TdxSkinElement; - SchedulerAppointment: array[Boolean] of TdxSkinElement; - SchedulerAppointmentBorder: TdxSkinColor; - SchedulerAppointmentBorderSize: TdxSkinIntegerProperty; - SchedulerAppointmentMask: TdxSkinElement; - SchedulerAppointmentShadow: array[Boolean] of TdxSkinElement; - SchedulerCurrentTimeIndicator: TdxSkinElement; - SchedulerMoreButton: TdxSkinElement; - SchedulerNavigatorColor: TdxSkinColor; - SchedulerTimeGridCurrentTimeIndicator: TdxSkinElement; - SchedulerTimeGridHeader: array[Boolean] of TdxSkinElement; - SchedulerTimeLine: TdxSkinElement; - SchedulerTimeRuler: TdxSkinElement; - // Bars - Bar: TdxSkinElement; - BarCustomize: TdxSkinElement; - BarCustomizeVertical: TdxSkinElement; - BarDisabledTextColor: TdxSkinColor; - BarDrag: TdxSkinElement; - BarDragVertical: TdxSkinElement; - BarSeparator: TdxSkinElement; - BarVertical: TdxSkinElement; - BarVerticalSeparator: TdxSkinElement; - Dock: TdxSkinElement; - FloatingBar: TdxSkinElement; - LinkBorderPainter: TdxSkinElement; - LinkSelected: TdxSkinElement; - MainMenu: TdxSkinElement; - MainMenuCustomize: TdxSkinElement; - MainMenuDrag: TdxSkinElement; - MainMenuLinkSelected: TdxSkinElement; - MainMenuVertical: TdxSkinElement; - PopupMenu: TdxSkinElement; - PopupMenuCheck: TdxSkinElement; - PopupMenuExpandButton: TdxSkinElement; - PopupMenuLinkSelected: TdxSkinElement; - PopupMenuSeparator: TdxSkinElement; - PopupMenuSideStrip: TdxSkinElement; - PopupMenuSideStripNonRecent: TdxSkinElement; - PopupMenuSplitButton: TdxSkinElement; - PopupMenuSplitButton2: TdxSkinElement; - ScreenTipItem: TdxSkinColor; - ScreenTipSeparator: TdxSkinElement; - ScreenTipTitleItem: TdxSkinColor; - ScreenTipWindow: TdxSkinElement; - // - RibbonApplicationButton: TdxSkinElement; - RibbonApplicationMenuBorders: array[Boolean] of TdxSkinElement; - RibbonButtonArrow: TdxSkinElement; - RibbonButtonGroup: TdxSkinElement; - RibbonButtonGroupButton: TdxSkinElement; - RibbonButtonGroupSeparator: TdxSkinElement; - RibbonButtonText: array[Boolean] of TColor; - RibbonCaptionFontDelta: TdxSkinIntegerProperty; - RibbonCaptionText: array[Boolean] of TColor; - RibbonCollapsedToolBarBackground: TdxSkinElement; - RibbonCollapsedToolBarGlyphBackground: TdxSkinElement; - RibbonContextualTabHeader: TdxSkinElement; - RibbonContextualTabHeaderText: array[Boolean] of TColor; - RibbonContextualTabHeaderTextHot: TColor; - RibbonContextualTabLabel: TdxSkinElement; - RibbonContextualTabLabelOnGlass: TdxSkinElement; - RibbonContextualTabPanel: TdxSkinElement; - RibbonContextualTabSeparator: TdxSkinElement; - RibbonDocumentNameTextColor: array[Boolean] of TColor; - RibbonExtraPaneColor: TdxSkinColor; - RibbonExtraPaneHeaderSeparator: TdxSkinColor; - RibbonFormBottom: array[Boolean] of TdxSkinElement; - RibbonFormCaption: TdxSkinElement; - RibbonFormLeft: array[Boolean] of TdxSkinElement; - RibbonFormRight: array[Boolean] of TdxSkinElement; - RibbonGalleryBackground: TdxSkinElement; - RibbonGalleryButtonDown: TdxSkinElement; - RibbonGalleryButtonDropDown: TdxSkinElement; - RibbonGalleryButtonUp: TdxSkinElement; - RibbonGalleryGroupCaption: TdxSkinElement; - RibbonGalleryPane: TdxSkinElement; - RibbonGallerySizeGrips: TdxSkinElement; - RibbonGallerySizingPanel: TdxSkinElement; - RibbonGroupScroll: array[Boolean] of TdxSkinElement; - RibbonHeaderBackground: TdxSkinElement; - RibbonIndents: array[0..3] of Integer; - RibbonLargeButton: TdxSkinElement; - RibbonLargeSplitButtonBottom: TdxSkinElement; - RibbonLargeSplitButtonTop: TdxSkinElement; - RibbonQATCustomizeButtonOutsizeQAT: array[Boolean] of TdxSkinBooleanProperty; - RibbonQATIndentBeforeCustomizeButton: array[Boolean] of TdxSkinIntegerProperty; - RibbonQuickToolbar: array[Boolean] of TdxSkinElement; - RibbonQuickToolbarBelow: TdxSkinElement; - RibbonQuickToolbarButtonGlyph: TdxSkinElement; - RibbonQuickToolbarDropDown: TdxSkinElement; - RibbonQuickToolbarGlyph: TdxSkinElement; - RibbonSmallButton: TdxSkinElement; - RibbonSplitButtonLeft: TdxSkinElement; - RibbonSplitButtonRight: TdxSkinElement; - RibbonStatusBarBackground: TdxSkinElement; - RibbonStatusBarButton: TdxSkinElement; - RibbonStatusBarSeparator: TdxSkinElement; - RibbonTab: TdxSkinElement; - RibbonTabGroup: TdxSkinElement; - RibbonTabGroupHeader: TdxSkinElement; - RibbonTabGroupItemsSeparator: TdxSkinElement; - RibbonTabPanel: TdxSkinElement; - RibbonTabPanelGroupButton: TdxSkinElement; - RibbonTabSeparatorLine: TdxSkinElement; - RibbonTabText: array[Boolean] of TColor; - RibbonTabTextHot: TColor; - // Status bar text colors - RibbonStatusBarText: TColor; - RibbonStatusBarTextHot: TColor; - RibbonStatusBarTextDisabled: TColor; - // Calendar - CalendarDayTextColor: TdxSkinColor; - CalendarHolidayTextColor: TdxSkinColor; - CalendarInactiveDayTextColor: TdxSkinColor; - CalendarSelectedDayColor: TdxSkinColor; - CalendarSelectedDayTextColor: TdxSkinColor; - CalendarSeparatorColor: TdxSkinColor; - CalendarTodayFrameColor: TdxSkinColor; - CalendarTodayTextColor: TdxSkinColor; - // Printing System - PrintingPageBorder: TdxSkinElement; - PrintingPreviewBackground: TdxSkinElement; - // - constructor Create(ASkin: TdxSkin); virtual; - destructor Destroy; override; - - property Skin: TdxSkin read FSkin write SetSkin; - end; - - TdxSkinInfoClass = class of TdxSkinInfo; - -implementation - -uses - Math; - -{ TdxSkinInfo } - -constructor TdxSkinInfo.Create(ASkin: TdxSkin); -begin - Skin := ASkin; -end; - -destructor TdxSkinInfo.Destroy; -var - ASkin: TdxSkin; -begin - ASkin := Skin; - Skin := nil; - FreeAndNil(ASkin); - inherited Destroy; -end; - -procedure TdxSkinInfo.CheckItem( - AItem: TObject; const AMessage: string; var ACheckedItem); -begin - Assert(AItem <> nil, AMessage); - TObject(ACheckedItem) := AItem; -end; - -function TdxSkinInfo.CreateBlankElement( - AGroup: TdxSkinControlGroup; const AName: string): TdxSkinElement; -var - ABitmap: TBitmap; -begin - Result := AGroup.AddElement(AName); - if Result <> nil then - begin - Result.Image.States := [esNormal]; - Result.Image.Stretch := smStretch; - Result.Tag := 2; - ABitmap := TBitmap.Create; - try - ABitmap.Width := 32; - ABitmap.Height := 32; - with ABitmap.Canvas do - begin - Pen.Color := clRed; - Pen.Width := 2; - MoveTo(0, 0); - LineTo(ABitmap.Width, ABitmap.Height); - MoveTo(0, ABitmap.Height); - LineTo(ABitmap.Width, 0); - end; - Result.Image.Texture.SetBitmap(ABitmap); - finally - ABitmap.Free; - end; - end; -end; - -function TdxSkinInfo.CreateBlankGroup(const AName: string): TdxSkinControlGroup; -begin - Result := FSkin.AddGroup(AName); - if Result <> nil then - Result.Tag := 2; -end; - -function TdxSkinInfo.GetColorByName( - AGroup: TdxSkinPersistent; const AName: string): TdxSkinColor; -begin - Result := nil; - if AGroup <> nil then - begin - Result := AGroup.GetPropertyByName(AName) as TdxSkinColor; - if Result <> nil then - Result.Tag := 1; - end; -end; - -function TdxSkinInfo.GetIntPropertyByName( - AGroup: TdxSkinPersistent; const AName: string): TdxSkinIntegerProperty; -begin - Result := nil; - if AGroup <> nil then - begin - Result := AGroup.GetPropertyByName(AName) as TdxSkinIntegerProperty; - if Result <> nil then - Result.Tag := 1; - end; -end; - -function TdxSkinInfo.GetElementColorProperty( - AElement: TdxSkinPersistent; const APropName: string): TColor; -var - AProperty: TdxSkinColor; -begin - Result := clDefault; - if AElement <> nil then - begin - AProperty := AElement.GetPropertyByName(APropName) as TdxSkinColor; - if AProperty <> nil then - Result := AProperty.Value; - end; -end; - -function TdxSkinInfo.GetElementIntProperty(AElement: TdxSkinPersistent; - const APropName: string; ADefValue: Integer = 0): Integer; -var - AProperty: TdxSkinIntegerProperty; -begin - Result := ADefValue; - if AElement <> nil then - begin - AProperty := AElement.GetPropertyByName(APropName) as TdxSkinIntegerProperty; - if AProperty <> nil then - Result := AProperty.Value; - end; -end; - -function TdxSkinInfo.GetGroupByName(const AName: string): TdxSkinControlGroup; -begin - if Skin = nil then - Result := nil - else - begin - Result := Skin.GetGroupByName(AName); - if Result = nil then - Result := CreateBlankGroup(AName) - else - Result.Tag := 1; - end; -end; - -function TdxSkinInfo.GetElementByName(AGroup: TdxSkinControlGroup; - const AName: string; ACreateIfEmpty: Boolean = True): TdxSkinElement; -begin - if AGroup = nil then - Result := nil - else - begin - Result := AGroup.GetElementByName(AName); - if Result = nil then - begin - if ACreateIfEmpty then - Result := CreateBlankElement(AGroup, AName); - end - else - Result.Tag := 1; - end; -end; - -procedure TdxSkinInfo.InitializeGroups; -begin - Group_Bars := GetGroupByName(sdxSkinGroupBars); - Group_Common := GetGroupByName(sdxSkinGroupCommon); - Group_Docking := GetGroupByName(sdxSkinGroupDocking); - Group_Editors := GetGroupByName(sdxSkinGroupEditors); - Group_Ribbon := GetGroupByName(sdxSkinGroupRibbon); - Group_Form := GetGroupByName(sdxSkinGroupForm); - Group_Grid := GetGroupByName(sdxSkinGroupGrid); - Group_Tabs := GetGroupByName(sdxSkinGroupTabs); - Group_Scheduler := GetGroupByName(sdxSkinGroupScheduler); - Group_VGrid := GetGroupByName(sdxSkinGroupVGrid); - Group_NavBar := GetGroupByName(sdxSkinGroupNavBar); - Group_NavPane := GetGroupByName(sdxSkinGroupNavPane); - Group_PrintingSystem := GetGroupByName(sdxSkinGroupPrintingSystem); -end; - -procedure TdxSkinInfo.InitializeBarElements; -begin - Bar := GetElementByName(Group_Bars, sdxBarsBar); - BarCustomize := GetElementByName(Group_Bars, sdxBarsBarCustomize); - BarCustomizeVertical := GetElementByName(Group_Bars, sdxBarsBarCustomizeVertical); - BarDrag := GetElementByName(Group_Bars, sdxBarsBarFinger); - BarDragVertical := GetElementByName(Group_Bars, sdxBarsBarFingerVertical); - BarSeparator := GetElementByName(Group_Bars, sdxBarsBarSeparator); - BarVertical := GetElementByName(Group_Bars, sdxBarsBarVertical); - BarVerticalSeparator := GetElementByName(Group_Bars, sdxBarsBarVerticalSeparator); - Dock := GetElementByName(Group_Bars, sdxBarsDock); - FloatingBar := GetElementByName(Group_Bars, sdxBarsFloatBar); - LinkBorderPainter := GetElementByName(Group_Bars, sdxBarsLinkStatic); - LinkSelected := GetElementByName(Group_Bars, sdxBarsLinkSelected); - MainMenu := GetElementByName(Group_Bars, sdxBarsMainMenu); - MainMenuCustomize := GetElementByName(Group_Bars, sdxBarsMainMenuCustomize, False); - MainMenuDrag := GetElementByName(Group_Bars, sdxBarsMainMenuDrag, False); - MainMenuLinkSelected := GetElementByName(Group_Bars, sdxBarsMainMenuLinkSelected); - MainMenuVertical := GetElementByName(Group_Bars, sdxBarsMainMenuVertical); - PopupMenu := GetElementByName(Group_Bars, sdxBarsPopupMenu); - PopupMenuCheck := GetElementByName(Group_Bars, sdxBarsPopupMenuCheck); - PopupMenuExpandButton := GetElementByName(Group_Bars, sdxBarsPopupMenuExpandButton); - PopupMenuLinkSelected := GetElementByName(Group_Bars, sdxBarsPopupMenuLinkSelected); - PopupMenuSeparator := GetElementByName(Group_Bars, sdxBarsPopupMenuSeparator); - PopupMenuSideStrip := GetElementByName(Group_Bars, sdxBarsPopupMenuSideStrip); - PopupMenuSideStripNonRecent := GetElementByName(Group_Bars, sdxBarsPopupMenuSideStripNonRecent); - PopupMenuSplitButton := GetElementByName(Group_Bars, sdxBarsPopupMenuDropDownButtonLabel); - PopupMenuSplitButton2 := GetElementByName(Group_Bars, sdxBarsPopupMenuDropDownButtonArrow); -end; - -procedure TdxSkinInfo.InitializeButtonElements; -begin - ButtonElements := GetElementByName(Group_Common, sdxButton); - ExpandButton := GetElementByName(Group_Grid, sdxPlusMinus); - if ButtonElements <> nil then - ButtonDisabled := GetColorByName(ButtonElements, sdxSkinsButtonDisabledTextColor); -end; - -procedure TdxSkinInfo.InitializeCalcEditColors; -var - AType: TcxCalcButtonKind; -begin - for AType := Low(TcxCalcButtonKind) to High(TcxCalcButtonKind) do - CalcEditButtonTextColors[AType] := GetColorByName(Group_Editors, CalcEditTextColorsMap[AType]); -end; - -procedure TdxSkinInfo.InitializeCalendarElements; -begin - CalendarDayTextColor := GetColorByName(Group_Editors, sdxSkinsCalendarDayTextColor); - CalendarHolidayTextColor := GetColorByName(Group_Editors, sdxSkinsCalendarHolidayTextColor); - CalendarInactiveDayTextColor := GetColorByName(Group_Editors, sdxSkinsCalendarInactiveDayTextColor); - CalendarSelectedDayTextColor := GetColorByName(Group_Editors, sdxSkinsCalendarSelectedDayTextColor); - CalendarSelectedDayColor := GetColorByName(Group_Editors, sdxSkinsCalendarSelectedDayColor); - CalendarSeparatorColor := GetColorByName(Group_Editors, sdxSkinsCalendarSeparatorColor); - CalendarTodayFrameColor := GetColorByName(Group_Editors, sdxSkinsCalendarTodayFrameColor); - CalendarTodayTextColor := GetColorByName(Group_Editors, sdxSkinsCalendarTodayTextColor); -end; - -procedure TdxSkinInfo.InitializeCheckboxElements; -begin - CheckboxElement := GetElementByName(Group_Editors, sdxCheckbox); -end; - -procedure TdxSkinInfo.InitializeClockElements; -begin - ClockElements[False] := GetElementByName(Group_Editors, sdxClock); - ClockElements[True] := GetElementByName(Group_Editors, sdxClockGlass); -end; - -procedure TdxSkinInfo.InitializeColors; -var - AKind: TcxEditStateColorKind; -begin - BarDisabledTextColor := GetColorByName(Group_Bars, sdxSkinsBarDisabledTextColor); - DockControlTabTextColor[False] := GetColorByName(Group_Docking, sdxSkinsTabTextColor); - DockControlTabTextColor[True] := GetColorByName(Group_Docking, sdxSkinsTabTextColorActive); - SchedulerNavigatorColor := GetColorByName(Group_Scheduler, sdxSkinsSchedulerNavigatorColor); - - TabTextColor := GetColorByName(PageControlHeader, sdxTextColorNormal); - TabTextColorActive := GetColorByName(PageControlHeader, sdxTextColorSelected); - TabTextColorDisabled := GetColorByName(PageControlHeader, sdxTextColorDisabled); - TabTextColorHot := GetColorByName(PageControlHeader, sdxTextColorHot); - - HyperLinkTextColor := GetColorByName(Group_Editors, sdxSkinsEditorHyperLinkTextColor); - for AKind := Low(TcxEditStateColorKind) to High(TcxEditStateColorKind) do - begin - EditorTextColors[AKind] := GetColorByName(Group_Editors, EditTextColorsMap[AKind]); - EditorBackgroundColors[AKind] := GetColorByName(Group_Editors, EditBackgroundColorsMap[AKind]); - end; - - if Skin <> nil then - begin - ContainerBorderColor := Skin.GetColorByName(sdxSkinsContainerBorderColor); - ContainerHighlightBorderColor := Skin.GetColorByName(sdxSkinsContainerHighlightBorderColor); - ContentColor := Skin.GetColorByName(sdxSkinsContentColor); - ContentEvenColor := Skin.GetColorByName(sdxSkinsContentEvenColor); - ContentOddColor := Skin.GetColorByName(sdxSkinsContentOddColor); - ContentTextColor := Skin.GetColorByName(sdxSkinsContentTextColor); - DockControlHideBarTextColor[False] := Skin.GetColorByName(sdxSkinsDCHiddenBarTextColor); - DockControlHideBarTextColor[True] := Skin.GetColorByName(sdxSkinsDCHiddenBarTextHotColor); - HeaderBackgroundColor := Skin.GetColorByName(sdxSkinsHeaderBackgroundColor); - HeaderBackgroundTextColor := Skin.GetColorByName(sdxSkinsHeaderBackgroundTextColor); - LayoutControlColor := Skin.GetColorByName(sdxSkinsLayoutControlColor); - SelectionColor := Skin.GetColorByName(sdxSkinsSelectionColor); - SelectionTextColor := Skin.GetColorByName(sdxSkinsSelectionTextColor); - end; -end; - -procedure TdxSkinInfo.InitializeDockControlElements; -begin - DockControlTabHeaderBackground := GetElementByName(Group_Docking, sdxDockCtrlTabHeaderBackground); - DockControlTabHeaderLine := GetElementByName(Group_Docking, sdxDockCtrlTabHeaderLine); - DockControlHideBarButtons := GetElementByName(Group_Docking, sdxDockCtrlTabHeaderAutoHideBar); - DockControlWindowButton := GetElementByName(Group_Docking, sdxDockCtrlWindowButton); - DockControlWindowButtonGlyphs := GetElementByName(Group_Docking, sdxDockCtrlWindowGlyphs); - DockControlTabHeader := GetElementByName(Group_Docking, sdxDockCtrlTabHeader); - DockControlHideBar := GetElementByName(Group_Docking, sdxDockCtrlAutoHideBar); - DockControlHideBarLeft := GetElementByName(Group_Docking, sdxDockCtrlAutoHideBarLeft); - DockControlHideBarRight := GetElementByName(Group_Docking, sdxDockCtrlAutoHideBarRight); - DockControlHideBarBottom := GetElementByName(Group_Docking, sdxDockCtrlAutoHideBarBottom); - - DockControlCaption := GetElementByName(Group_Docking, sdxDockCtrlCaption); - DockControlBorder := GetElementByName(Group_Docking, sdxDockCtrlBorder); - DockControlCaptionNonFocusedTextColor := GetElementColorProperty( - DockControlCaption, sdxDockCtrlInactiveCaptionTextColor); - - FillChar(DockControlIndents, SizeOf(DockControlIndents), 0); - if Group_Docking <> nil then - begin - DockControlIndents[0] := GetElementIntProperty(Group_Docking, sdxDCActiveTabHeaderDownGrow); - DockControlIndents[1] := GetElementIntProperty(Group_Docking, sdxDCActiveTabHeaderHGrow); - DockControlIndents[2] := GetElementIntProperty(Group_Docking, sdxDCActiveTabHeaderUpGrow); - end; -end; - -procedure TdxSkinInfo.InitializeEditButtonElements; -var - AKind: TcxEditBtnKind; -begin - LabelLine[False] := GetElementByName(Group_Editors, sdxLabelLine); - LabelLine[True] := GetElementByName(Group_Editors, sdxLabelLineVert); - - EditButtonElements[False] := GetElementByName(Group_Editors, sdxEditorButton); - EditButtonElements[True] := GetElementByName(Group_Editors, sdxCloseButton); - for AKind := Low(TcxEditBtnKind) to High(TcxEditBtnKind) do - EditButtonGlyphs[AKind] := GetElementByName(Group_Editors, EditButtonsMap[AKind]); -end; - -procedure TdxSkinInfo.InitializeFilterElements; -begin - FilterButtons[False] := GetElementByName(Group_Grid, sdxFilterButton); - FilterButtons[True] := GetElementByName(Group_Grid, sdxFilterButtonActive); - FilterPanel := GetElementByName(Group_Grid, sdxFilterPanel); -end; - -procedure TdxSkinInfo.InitializeFooterElements; -begin - FooterCell := GetElementByName(Group_Grid, sdxFooterCell); - FooterPanel := GetElementByName(Group_Grid, sdxFooterPanel); -end; - -procedure TdxSkinInfo.InitializeFormElements; - - procedure InitializeFormIcons; - begin - FillChar(FormIcons, SizeOf(FormIcons), 0); - FormIcons[False, sfiClose] := GetElementByName(Group_Form, sdxSmallFormButtonClose); - FormIcons[True, sfiClose] := GetElementByName(Group_Form, sdxFormButtonClose); - FormIcons[True, sfiMinimize] := GetElementByName(Group_Form, sdxFormButtonMinimize); - FormIcons[True, sfiMaximize] := GetElementByName(Group_Form, sdxFormButtonMaximize); - FormIcons[True, sfiRestore] := GetElementByName(Group_Form, sdxFormButtonRestore); - FormIcons[True, sfiHelp] := GetElementByName(Group_Form, sdxFormButtonHelp); - end; - - procedure GetFormBorderSize(var R: TRect; AElement: TdxSkinElement; ASide: TcxBorder); - begin - if AElement = nil then Exit; - case ASide of - bLeft: - R.Left := AElement.Size.cx; - bRight: - R.Right := AElement.Size.cx; - bBottom: - R.Bottom := AElement.Size.cy; - end; - end; - - procedure InitializeFormFrames; - var - ASide: TcxBorder; - AStandard: Boolean; - R: TRect; - begin - for AStandard := False to True do - begin - R := cxNullRect; - for ASide := Low(TcxBorder) to High(TcxBorder) do - begin - FormFrames[AStandard, ASide] := - GetElementByName(Group_Form, FormFrameMap[AStandard, ASide]); - GetFormBorderSize(R, FormFrames[AStandard, ASide], ASide); - end; - FormBorderWidths[AStandard] := R; - end; - end; - -begin - InitializeFormIcons; - InitializeFormFrames; - FormStatusBar := GetElementByName(Group_Bars, sdxStatusBar); - FormContent := GetElementByName(Group_Form, sdxFormContent); - FormInactiveColor := GetColorByName(Group_Form, sdxTextInactiveColor); - FormTextShadowColor := GetColorByName(Group_Form, sdxTextShadowColor); - FormCaptionDelta := Max(1, GetElementIntProperty(FormFrames[True, bTop], sdxCaptionFontDelta)); -end; - -procedure TdxSkinInfo.InitializeGroupBoxElements; -begin - GroupBoxClient := GetElementByName(Group_Common, sdxGroupPanelNoBorder); - GroupBoxElements[cxgpTop] := GetElementByName(Group_Common, sdxGroupPanelTop); - GroupBoxElements[cxgpBottom] := GetElementByName(Group_Common, sdxGroupPanelBottom); - GroupBoxElements[cxgpLeft] := GetElementByName(Group_Common, sdxGroupPanelLeft); - GroupBoxElements[cxgpRight] := GetElementByName(Group_Common, sdxGroupPanelRight); - GroupBoxElements[cxgpCenter] := GetElementByName(Group_Common, sdxGroupPanel); - - GroupBoxCaptionElements[cxgpTop] := GetElementByName(Group_Common, sdxGroupPanelCaptionTop); - GroupBoxCaptionElements[cxgpBottom] := GetElementByName(Group_Common, sdxGroupPanelCaptionBottom); - GroupBoxCaptionElements[cxgpLeft] := GetElementByName(Group_Common, sdxGroupPanelCaptionLeft); - GroupBoxCaptionElements[cxgpRight] := GetElementByName(Group_Common, sdxGroupPanelCaptionRight); -end; - -procedure TdxSkinInfo.InitializeGridElements; -begin - GridFixedLine := GetElementByName(Group_Grid, sdxGridFixedLine); - CardViewSeparator := GetElementByName(Group_Grid, sdxCardSeparator); - GridGroupByBox := GetElementByName(Group_Grid, sdxGroupByBox); - if (GridGroupByBox <> nil) and not GridGroupByBox.Image.Empty then - GridGroupByBox.Color := clNone; - GridGroupRow := GetElementByName(Group_Grid, sdxGroupRow); - GridLine := GetElementByName(Group_Grid, sdxGridLine); - VGridCategory := GetElementByName(Group_VGrid, sdxVGridCategory); - VGridLine[False] := GetElementByName(Group_VGrid, sdxVGridLine); - VGridLine[True] := GetElementByName(Group_VGrid, sdxVGridBandLine); - VGridRowHeader := GetElementByName(Group_VGrid, sdxVGridRowHeader); -end; - -procedure TdxSkinInfo.InitializeHeaderElements; -begin - Header := GetElementByName(Group_Common, sdxHeader); - HeaderSpecial := GetElementByName(Group_Common, sdxHeaderSpecial); -end; - -procedure TdxSkinInfo.InitializeIndicatorImages; -begin - IndicatorImages := GetElementByName(Group_Grid, sdxIndicatorImages); -end; - -procedure TdxSkinInfo.InitializeNavBarElements; -begin - NavBarBackgroundColor := GetElementByName(Group_NavBar, sdxNavBarBackground); - NavBarGroupClient := GetElementByName(Group_NavBar, sdxNavBarGroupClient); - NavBarItem := GetElementByName(Group_NavBar, sdxNavBarItem); - NavBarGroupHeader := GetElementByName(Group_NavBar, sdxNavBarGroupHeader); - NavBarGroupButtons[True] := GetElementByName(Group_NavBar, sdxNavBarGroupCloseButton); - NavBarGroupButtons[False] := GetElementByName(Group_NavBar, sdxNavBarGroupOpenButton); - NavPaneCollapseButton := GetElementByName(Group_NavPane, sdxNavPaneCollapseButton); - NavPaneCollapsedGroupClient := GetElementByName(Group_NavPane, sdxNavPaneCollapsedGroupClient); - NavPaneExpandButton := GetElementByName(Group_NavPane, sdxNavPaneExpandButton); - NavPaneFormBorder := GetElementByName(Group_NavPane, sdxNavPaneFormBorder); - NavPaneFormSizeGrip := GetElementByName(Group_NavPane, sdxNavPaneFormSizeGrip); - NavPaneGroupButton[False] := GetElementByName(Group_NavPane, sdxNavPaneGroupButton); - NavPaneGroupButton[True] := GetElementByName(Group_NavPane, sdxNavPaneGroupButtonSelected); - NavPaneGroupCaption := GetElementByName(Group_NavPane, sdxNavPaneGroupCaption); - NavPaneSplitter := GetElementByName(Group_NavPane, sdxNavPaneSplitter); - NavPaneScrollButtons[False] := GetElementByName(Group_NavPane, sdxNavPaneScrollUpBtn); - NavPaneScrollButtons[True] := GetElementByName(Group_NavPane, sdxNavPaneScrollDownBtn); - NavPaneOverflowPanel := GetElementByName(Group_NavPane, sdxNavPaneOverflowPanel); - NavPaneOverflowPanelItem := GetElementByName(Group_NavPane, sdxNavPaneOverflowPanelItem); - NavPaneOverflowPanelExpandedItem := GetElementByName(Group_NavPane, sdxNavPaneOverflowPanelExpandItem); - NavPaneGroupClient := GetElementByName(Group_NavPane, sdxNavPaneGroupClient); - NavPaneItem := GetElementByName(Group_NavPane, sdxNavPaneItem); - NavPaneSelectedItem := GetElementByName(Group_NavPane, sdxNavPaneItemSelected); - NavPaneCaptionHeight := GetIntPropertyByName(NavPaneGroupCaption, sdxNavPaneCaptionHeight); - NavPaneCaptionFontSize := GetIntPropertyByName(NavPaneGroupCaption, sdxNavPaneCaptionFontSize); - if Assigned(Group_NavPane) then - NavPaneOffsetGroupBorders := Group_NavPane.GetPropertyByName( - sdxNavPaneOffsetGroupBorders) as TdxSkinBooleanProperty - else - NavPaneOffsetGroupBorders := nil; -end; - -procedure TdxSkinInfo.InitializeNavigatorElements; -begin - NavigatorGlyphs := GetElementByName(Group_Editors, sdxNavigatorGlyphs); - NavigatorGlyphsVert := GetElementByName(Group_Editors, sdxNavigatorGlyphsVert); -end; - -procedure TdxSkinInfo.InitializePageControlElements; -begin - PageControlHeader := GetElementByName(Group_Tabs, sdxPageControlHeaderTop); - PageControlButtonHorz := GetElementByName(Group_Tabs, sdxPageControlHorz); - PageControlButtonVert := GetElementByName(Group_Tabs, sdxPageControlVert); - if FormContent <> nil then - begin - if PageControlButtonHorz <> nil then - PageControlButtonHorz.Color := FormContent.Color; - if PageControlButtonVert <> nil then - PageControlButtonVert.Color := FormContent.Color; - end; - PageControlPane := GetElementByName(Group_Tabs, sdxPageControlPane); - FillChar(PageControlIndents, SizeOf(PageControlIndents), 0); - if Group_Tabs <> nil then - begin - PageControlIndents[0] := GetElementIntProperty(Group_Tabs, sdxRowIndentFar); - PageControlIndents[1] := GetElementIntProperty(Group_Tabs, sdxRowIndentNear); - PageControlIndents[2] := GetElementIntProperty(Group_Tabs, sdxSelectedHeaderDownGrow); - PageControlIndents[3] := GetElementIntProperty(Group_Tabs, sdxSelectedHeaderHGrow); - PageControlIndents[4] := GetElementIntProperty(Group_Tabs, sdxSelectedHeaderUpGrow); - PageControlIndents[5] := GetElementIntProperty(Group_Tabs, sdxHeaderDownGrow); - end; -end; - -procedure TdxSkinInfo.InitializeProgressBarElements; -begin - ProgressBarElements[False, False] := GetElementByName(Group_Editors, sdxProgressBorder); - ProgressBarElements[False, True] := GetElementByName(Group_Editors, sdxProgressBorderVert); - ProgressBarElements[True, False] := GetElementByName(Group_Editors, sdxProgressChunk); - ProgressBarElements[True, True] := GetElementByName(Group_Editors, sdxProgressChunkVert); - - ProgressBarTextColors[False] := GetColorByName(Group_Editors, sdxSkinsProgressBarEmptyTextColor); - ProgressBarTextColors[True] := GetColorByName(Group_Editors, sdxSkinsProgressBarFilledTextColor); -end; - -procedure TdxSkinInfo.InitializeRadioGroupElements; -begin - RadioGroupButton := GetElementByName(Group_Editors, sdxRadioGroup); -end; - -procedure TdxSkinInfo.InitializeRibbonColors; - - function GetElementTextColor(AElement: TdxSkinElement): TColor; - begin - if AElement = nil then - Result := clDefault - else - Result := AElement.TextColor; - end; - -begin - RibbonExtraPaneColor := GetColorByName(Group_Ribbon, sdxRibbonExtraPaneColor); - RibbonExtraPaneHeaderSeparator := GetColorByName(Group_Ribbon, sdxRibbonExtraPaneHeaderSeparator); - - RibbonCaptionText[False] := GetElementColorProperty(RibbonFormCaption, sdxTextInactiveColor); - RibbonCaptionText[True] := GetElementTextColor(RibbonFormCaption); - RibbonTabTextHot := GetElementColorProperty(RibbonTab, sdxTextColorHot); - RibbonTabText[True] := GetElementColorProperty(RibbonTab, sdxTextColorSelected); - RibbonTabText[False] := GetElementTextColor(RibbonTab); - RibbonContextualTabHeaderText[True] := - GetElementColorProperty(RibbonContextualTabHeader, sdxTextColorSelected); - RibbonContextualTabHeaderText[False] := - GetElementTextColor(RibbonContextualTabHeader); - RibbonContextualTabHeaderTextHot := - GetElementColorProperty(RibbonContextualTabHeader, sdxTextColorHot); - RibbonDocumentNameTextColor[True] := GetElementColorProperty(RibbonFormCaption, - sdxRibbonDocumentNameTextColor); - RibbonDocumentNameTextColor[False] := RibbonCaptionText[False]; - - RibbonStatusBarText := GetElementColorProperty(RibbonStatusBarButton, sdxTextColorNormal); - RibbonStatusBarTextHot := GetElementColorProperty(RibbonStatusBarButton, sdxTextColorHot); - RibbonStatusBarTextDisabled := GetElementColorProperty(RibbonStatusBarButton, sdxTextColorDisabled); - - RibbonButtonText[False] := GetElementTextColor(RibbonSmallButton); - RibbonButtonText[True] := GetElementColorProperty(Group_Ribbon, sdxRibbonButtonDisabledText); -end; - -procedure TdxSkinInfo.InitializeRibbonElements; -begin - RibbonApplicationButton := GetElementByName(Group_Ribbon, sdxRibbonApplicationButton); - RibbonApplicationMenuBorders[False] := GetElementByName(Group_Ribbon, sdxRibbonAppMenuHeaderBackground); - RibbonApplicationMenuBorders[True] := GetElementByName(Group_Ribbon, sdxRibbonAppMenuFooterBackground); - RibbonCollapsedToolBarBackground := GetElementByName(Group_Ribbon, sdxRibbonCollapsedToolBarBackground); - RibbonCollapsedToolBarGlyphBackground := GetElementByName(Group_Ribbon, sdxRibbonCollapsedToolBarGlyphBackground); - RibbonFormCaption := GetElementByName(Group_Ribbon, sdxRibbonFormCaption); - RibbonFormBottom[False] := GetElementByName(Group_Ribbon, sdxRibbonFormBottom); - RibbonFormBottom[True] := GetElementByName(Group_Ribbon, sdxRibbonDialogFrameBottom); - RibbonFormLeft[False] := GetElementByName(Group_Ribbon, sdxRibbonFormFrameLeft); - RibbonFormLeft[True] := GetElementByName(Group_Ribbon, sdxRibbonDialogFrameLeft); - RibbonFormRight[False] := GetElementByName(Group_Ribbon, sdxRibbonFormFrameRight); - RibbonFormRight[True] := GetElementByName(Group_Ribbon, sdxRibbonDialogFrameRight); - RibbonTab := GetElementByName(Group_Ribbon, sdxRibbonTabHeaderPage); - RibbonTabPanel := GetElementByName(Group_Ribbon, sdxRibbonTabPanel); - RibbonTabPanelGroupButton := GetElementByName(Group_Ribbon, sdxRibbonTabPanelGroupButton); - RibbonTabSeparatorLine := GetElementByName(Group_Ribbon, sdxRibbonTabSeparatorLine); - RibbonTabGroup := GetElementByName(Group_Ribbon, sdxRibbonTabGroup); - RibbonTabGroupHeader := GetElementByName(Group_Ribbon, sdxRibbonTabGroupHeader); - RibbonTabGroupItemsSeparator := GetElementByName(Group_Ribbon, sdxRibbonTabGroupItemsSeparator); - RibbonGalleryBackground := GetElementByName(Group_Ribbon, sdxRibbonGalleryBackground); - RibbonGalleryButtonDown := GetElementByName(Group_Ribbon, sdxRibbonGalleryButtonDown); - RibbonGalleryButtonDropDown := GetElementByName(Group_Ribbon, sdxRibbonGalleryButtonDropDown); - RibbonGalleryButtonUp := GetElementByName(Group_Ribbon, sdxRibbonGalleryButtonUp); - RibbonGalleryGroupCaption := GetElementByName(Group_Ribbon, sdxRibbonGalleryGroupCaption); - RibbonGalleryPane := GetElementByName(Group_Ribbon, sdxRibbonGalleryPane); - RibbonGallerySizingPanel := GetElementByName(Group_Ribbon, sdxRibbonGallerySizingPanel); - RibbonGallerySizeGrips := GetElementByName(Group_Ribbon, sdxRibbonGallerySizeGrips); - RibbonHeaderBackground := GetElementByName(Group_Ribbon, sdxRibbonHeaderBackground); - RibbonSmallButton := GetElementByName(Group_Ribbon, sdxRibbonSmallButton); - RibbonSplitButtonLeft := GetElementByName(Group_Ribbon, sdxRibbonSplitButtonLeft); - RibbonSplitButtonRight := GetElementByName(Group_Ribbon, sdxRibbonSplitButtonRight); - RibbonLargeButton := GetElementByName(Group_Ribbon, sdxRibbonLargeButton); - RibbonLargeSplitButtonTop := GetElementByName(Group_Ribbon, sdxRibbonLargeSplitButtonTop); - RibbonLargeSplitButtonBottom := GetElementByName(Group_Ribbon, sdxRibbonLargeSplitButtonBottom); - RibbonButtonArrow := GetElementByName(Group_Ribbon, sdxRibbonButtonArrow); - RibbonButtonGroup := GetElementByName(Group_Ribbon, sdxRibbonButtonGroup); - RibbonStatusBarBackground := GetElementByName(Group_Ribbon, sdxRibbonStatusBarBackground); - RibbonStatusBarButton := GetElementByName(Group_Ribbon, sdxRibbonStatusBarButton); - RibbonStatusBarSeparator := GetElementByName(Group_Ribbon, sdxRibbonStatusBarSeparator); - RibbonQuickToolbar[True] := GetElementByName(Group_Ribbon, sdxRibbonQuickToolbarInCaption); - RibbonQuickToolbar[False] := GetElementByName(Group_Ribbon, sdxRibbonQuickToolbarAbove); - RibbonQuickToolbarBelow := GetElementByName(Group_Ribbon, sdxRibbonQuickToolbarBelow); - RibbonQuickToolbarButtonGlyph := GetElementByName(Group_Ribbon, sdxRibbonQuickToolbarButtonGlyph); - RibbonQuickToolbarDropDown := GetElementByName(Group_Ribbon, sdxRibbonQuickToolbarDropDown); - RibbonQuickToolbarGlyph := GetElementByName(Group_Ribbon, sdxRibbonQuickToolbarGlyph); - RibbonButtonGroupButton := GetElementByName(Group_Ribbon, sdxRibbonButtonGroupButton); - RibbonButtonGroupSeparator := GetElementByName(Group_Ribbon, sdxRibbonButtonGroupSeparator); - RibbonGroupScroll[True] := GetElementByName(Group_Ribbon, sdxRibbonTabGroupLeftScroll); - RibbonGroupScroll[False] := GetElementByName(Group_Ribbon, sdxRibbonTabGroupRightScroll); - RibbonContextualTabLabel := GetElementByName(Group_Ribbon, sdxRibbonContextualTabLabel); - RibbonContextualTabLabelOnGlass := GetElementByName(Group_Ribbon, sdxRibbonContextualTabLabelOnGlass); - RibbonContextualTabSeparator := GetElementByName(Group_Ribbon, sdxRibbonContextualTabSeparator); - RibbonContextualTabHeader := GetElementByName(Group_Ribbon, sdxRibbonContextualTabHeader); - RibbonContextualTabPanel := GetElementByName(Group_Ribbon, sdxRibbonContextualTabPanel); - InitializeRibbonProperties; - InitializeRibbonColors; -end; - -procedure TdxSkinInfo.InitializeRibbonProperties; -var - AIndex: Boolean; -begin - for AIndex := False to True do - if RibbonQuickToolbar[AIndex] <> nil then - with RibbonQuickToolbar[AIndex] do - begin - RibbonQATCustomizeButtonOutsizeQAT[AIndex] := - GetPropertyByName(sdxRibbonQATCustomizeButtonOutsideQAT) as TdxSkinBooleanProperty; - RibbonQATIndentBeforeCustomizeButton[AIndex] := - GetPropertyByName(sdxRibbonQATIndentBeforeCustomizeItem) as TdxSkinIntegerProperty; - end; - - FillChar(RibbonIndents, SizeOf(RibbonIndents), 0); - RibbonCaptionFontDelta := GetIntPropertyByName(RibbonFormCaption, sdxCaptionFontDelta); - if Assigned(Group_Ribbon) then - begin - RibbonIndents[0] := GetElementIntProperty(RibbonApplicationButton, sdxRibbonAppButtonRightIndent); - RibbonIndents[1] := GetElementIntProperty(RibbonQuickToolbar[True], sdxRibbonQuickAccessToolbarOffset); - RibbonIndents[2] := GetElementIntProperty(Group_Ribbon, sdxRibbonTabHeaderDownGrowIndent, 1); - RibbonIndents[3] := GetElementIntProperty(Group_Ribbon, sdxRibbonSpaceBetweenTabGroups, 1); - end; -end; - -procedure TdxSkinInfo.InitializeScrollBarElements; - - procedure SetInfo(AHorz: Boolean; APart: TcxScrollBarPart; - AElement: TdxSkinElement; AImageIndex: Integer = 0); - begin - FreeAndNil(ScrollBar_Elements[AHorz, APart]); - if Skin <> nil then - ScrollBar_Elements[AHorz, APart] := - TdxSkinScrollInfo.Create(AElement, AImageIndex, APart); - end; - -var - AElement: TdxSkinElement; -begin - // buttons - AElement := GetElementByName(Group_Common, sdxScrollButton); - if FormContent <> nil then - AElement.Color := FormContent.Color; //todo: transparent elements bug - SetInfo(False, sbpLineUp, AElement); - SetInfo(False, sbpLineDown, AElement, 1); - SetInfo(True, sbpLineUp, AElement, 2); - SetInfo(True, sbpLineDown, AElement, 3); - // Thumbnail - SetInfo(False, sbpThumbnail, - GetElementByName(Group_Common, sdxScrollThumbButtonVert)); - SetInfo(True, sbpThumbnail, - GetElementByName(Group_Common, sdxScrollThumbButtonHorz)); - // Page - AElement := GetElementByName(Group_Common, sdxScrollContentVert); - SetInfo(False, sbpPageUp, AElement); - SetInfo(False, sbpPageDown, AElement); - AElement := GetElementByName(Group_Common, sdxScrollContentHorz); - SetInfo(True, sbpPageUp, AElement); - SetInfo(True, sbpPageDown, AElement); -end; - -procedure TdxSkinInfo.InitializeSchedulerElements; - - procedure HideElementUsage(AElement: TdxSkinElement); - begin - if AElement <> nil then - AElement.Tag := 0; - end; - -begin - SchedulerTimeGridHeader[False] := GetElementByName(Group_Scheduler, sdxSchedulerTimeGridHeader); - SchedulerTimeGridHeader[True] := GetElementByName(Group_Scheduler, sdxSchedulerTimeGridHeaderSelected); - SchedulerTimeLine := GetElementByName(Group_Scheduler, sdxSchedulerTimeLine); - SchedulerTimeRuler := GetElementByName(Group_Scheduler, sdxSchedulerTimeRuler); - SchedulerMoreButton := GetElementByName(Group_Scheduler, sdxSchedulerMoreButton); - SchedulerAppointment[False] := GetElementByName(Group_Scheduler, sdxSchedulerAppointmentRight); - SchedulerAppointment[True] := GetElementByName(Group_Scheduler, sdxSchedulerAppointment); - SchedulerAllDayArea[False] := GetElementByName(Group_Scheduler, sdxSchedulerAllDayArea); - SchedulerAllDayArea[True] := GetElementByName(Group_Scheduler, sdxSchedulerAllDayAreaSelected); - SchedulerCurrentTimeIndicator := GetElementByName(Group_Scheduler, sdxSchedulerCurrentTimeIndicator); - SchedulerAppointmentShadow[False] := GetElementByName(Group_Scheduler, sdxSchedulerAppointmentBottomShadow); - SchedulerAppointmentShadow[True] := GetElementByName(Group_Scheduler, sdxSchedulerAppointmentRightShadow); - SchedulerAppointmentBorderSize := GetIntPropertyByName(SchedulerAppointment[True], sdxSchedulerAppointmentBorderSize); - SchedulerAppointmentMask := GetElementByName(Group_Scheduler, sdxSchedulerAppointmentMask); - SchedulerAppointmentBorder := GetColorByName(SchedulerAppointment[True], sdxSchedulerSeparatorColor); - SchedulerNavigationButtons[False] := GetElementByName(Group_Scheduler, sdxSchedulerNavButtonPrev); - SchedulerNavigationButtons[True] := GetElementByName(Group_Scheduler, sdxSchedulerNavButtonNext); - SchedulerNavigationButtonsArrow[False] := GetElementByName(Group_Scheduler, sdxSchedulerNavButtonPrevArrow); - SchedulerNavigationButtonsArrow[True] := GetElementByName(Group_Scheduler, sdxSchedulerNavButtonNextArrow); - - // TODO: Its a scheduler3 element - ACreateIfEmpty = False - SchedulerTimeGridCurrentTimeIndicator := GetElementByName(Group_Scheduler, - sdxSchedulerTimeGridCurrentTimeIndicator, False); -end; - -procedure TdxSkinInfo.InitializeSizeGripElements; -begin - SizeGrip := GetElementByName(Group_Common, sdxSizeGrip); -end; - -procedure TdxSkinInfo.InitializeSplitterElements; -begin - Splitter[False] := GetElementByName(Group_Common, sdxSplitterVert); - Splitter[True] := GetElementByName(Group_Common, sdxSplitterHorz); -end; - -procedure TdxSkinInfo.InitializeToolTipElements; -begin - ScreenTipWindow := GetElementByName(Group_Bars, sdxScreenTipWindow); - ScreenTipItem := GetColorByName(ScreenTipWindow, sdxScreenTipItem); - ScreenTipSeparator := GetElementByName(Group_Bars, sdxScreenTipSeparator); - ScreenTipTitleItem := GetColorByName(ScreenTipWindow, sdxScreenTipTitleItem); -end; - -procedure TdxSkinInfo.InitializePrintingSystemElements; -begin - PrintingPageBorder := GetElementByName( - Group_PrintingSystem, sdxPrintingSystemPageBorder); - PrintingPreviewBackground := GetElementByName( - Group_PrintingSystem, sdxPrintingSystemPreviewBackground); -end; - -procedure TdxSkinInfo.InitializeTrackBarElements; -begin - TrackBarTrack[True] := GetElementByName(Group_Editors, sdxTrackBarTrack); - TrackBarTrack[False] := GetElementByName(Group_Editors, sdxTrackBarTrackVert); - - TrackBarThumb[True, tbtaDown] := GetElementByName(Group_Editors, sdxTrackBarThumb); - TrackBarThumb[True, tbtaUp] := GetElementByName(Group_Editors, sdxTrackBarThumbUp); - TrackBarThumb[True, tbtaBoth] := GetElementByName(Group_Editors, sdxTrackBarThumbBoth); - - TrackBarThumb[False, tbtaDown] := GetElementByName(Group_Editors, sdxTrackBarThumbVert); - TrackBarThumb[False, tbtaUp] := GetElementByName(Group_Editors, sdxTrackBarThumbVertUp); - TrackBarThumb[False, tbtaBoth] := GetElementByName(Group_Editors, sdxTrackBarThumbVertBoth); -end; - -procedure TdxSkinInfo.InitializeSkinInfo; -begin - InitializeGroups; - InitializeBarElements; - InitializeFormElements; - InitializeDockControlElements; - InitializeButtonElements; - InitializeFooterElements; - InitializeCalcEditColors; - InitializeCalendarElements; - InitializeCheckboxElements; - InitializeClockElements; - InitializeEditButtonElements; - InitializeGroupBoxElements; - InitializeGridElements; - InitializeIndicatorImages; - InitializeNavBarElements; - InitializeNavigatorElements; - InitializeSchedulerElements; - InitializeHeaderElements; - InitializeFilterElements; - InitializePageControlElements; - InitializeProgressBarElements; - InitializeRadioGroupElements; - InitializeScrollBarElements; - InitializeRibbonElements; - InitializeSizeGripElements; - InitializeSplitterElements; - InitializeTrackBarElements; - InitializeToolTipElements; - InitializePrintingSystemElements; - InitializeColors; -end; - -procedure TdxSkinInfo.FinalizeScrollBarElements; -var - AHorz: Boolean; - APart: TcxScrollBarPart; -begin - for AHorz := False to True do - for APart := Low(TcxScrollBarPart) to High(TcxScrollBarPart) do - FreeAndNil(ScrollBar_Elements[AHorz, APart]); -end; - -procedure TdxSkinInfo.FinalizeSkinInfo; -begin - FinalizeScrollBarElements; -end; - -function TdxSkinInfo.GetSkin: TdxSkin; -begin - Result := Skin; -end; - -procedure TdxSkinInfo.SkinChanged(Sender: TdxSkin); -begin - FinalizeSkinInfo; - InitializeSkinInfo; -end; - -procedure TdxSkinInfo.SetSkin(ASkin: TdxSkin); -begin - if ASkin <> Skin then - begin - if Skin <> nil then - begin - FinalizeSkinInfo; - Skin.RemoveListener(Self); - end; - FSkin := ASkin; - if Skin <> nil then - Skin.AddListener(Self); - InitializeSkinInfo; - end; -end; - -{ TdxSkinScrollInfo } - -constructor TdxSkinScrollInfo.Create(AElement: TdxSkinElement; - AImageIndex: Integer; APart: TcxScrollBarPart); -begin - FElement := AElement; - FImageIndex := AImageIndex; -end; - -function TdxSkinScrollInfo.Draw(DC: HDC; const R: TRect; AImageIndex: Integer; - AState: TdxSkinElementState): Boolean; -begin - Result := Element <> nil; - if Result then - Element.Draw(DC, R, AImageIndex, AState); -end; - -function TdxSkinScrollInfo.Draw(DC: HDC; const R: TRect; - AState: TdxSkinElementState): Boolean; -begin - Result := Draw(DC, R, ImageIndex, AState); -end; - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/dxSkinsCore.pas b/internal/x.46/ExpressLibrary/Sources/dxSkinsCore.pas deleted file mode 100644 index 4460ef1f..00000000 --- a/internal/x.46/ExpressLibrary/Sources/dxSkinsCore.pas +++ /dev/null @@ -1,3192 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxSkinsCore; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, -{$ENDIF} - Windows, SysUtils, Classes, Graphics, Math, cxGraphics, cxGeometry, cxClasses, - cxLookAndFeels, dxGDIPlusApi, dxGDIPlusClasses, dxSkinsStrs, ActiveX, Forms, - dxOffice11, dxCore, cxLookAndFeelPainters; - -type - TdxSkinVersion = Double; - TdxSkinSignature = array[0..5] of AnsiChar; - -const - dxSkinSignature: TdxSkinSignature = 'dxSkin'; - dxSkinStreamVersion: TdxSkinVersion = 1.02; - ImageNameSuffix = '_Image.png'; - GlyphNameSuffix = '_Glyph.png'; - BitmapNameSuffixes: array[Boolean] of string = (GlyphNameSuffix, ImageNameSuffix); -{$IFNDEF DELPHI6} - PathDelim = '\'; -{$ENDIF} - -type - TdxSkin = class; - TdxSkinClass = class of TdxSkin; - TdxSkinCustomPersistentObject = class; - TdxSkinCustomPersistentObjectClass = class of TdxSkinCustomPersistentObject; - TdxSkinPersistentClass = class of TdxSkinPersistent; - TdxSkinControlGroupClass = class of TdxSkinControlGroup; - TdxSkinElementClass = class of TdxSkinElement; - TdxSkinColor = class; - TdxSkinProperty = class; - TdxSkinPropertyClass = class of TdxSkinProperty; - TdxSkinControlGroup = class; - TdxSkinImage = class; - TdxSkinElement = class; - - EdxSkin = class(EdxException); - - IdxSkinChangeListener = interface - ['{28681774-0475-43AE-8704-1C904D294742}'] - procedure SkinChanged(Sender: TdxSkin); - end; - - IdxSkinInfo = interface - ['{97D85495-E631-413C-8DBC-BE7B784A9EA0}'] - function GetSkin: TdxSkin; - end; - - { TdxSkinCustomPersistentObject } - - TdxSkinCustomPersistentObject = class(TPersistent) - private - FName: string; - FOwner: TPersistent; - FTag: Integer; - FOnChange: TNotifyEvent; - protected - procedure DoChange; virtual; - function GetOwner: TPersistent; override; - public - constructor Create(AOwner: TPersistent; const AName: string); virtual; - function Clone: TdxSkinCustomPersistentObject; virtual; - - property Tag: Integer read FTag write FTag; - published - property Name: string read FName write FName; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - end; - - { TdxSkinPersistent } - - TdxSkinPersistent = class(TdxSkinCustomPersistentObject) - private - FLockCount: Integer; - FModified: Boolean; - FProperties: TcxObjectList; - FSorted: Boolean; - function GetPropertyCount: Integer; - function GetProperty(Index: Integer): TdxSkinProperty; - procedure SetSorted(AValue: Boolean); - protected - procedure AddSubItem(AInstance: TdxSkinCustomPersistentObject; AList: TcxObjectList); - procedure Changed; virtual; - procedure DoSort; virtual; - procedure SubItemHandler(Sender: TObject); virtual; - procedure ReadProperties(AStream: TStream); - procedure WriteProperties(AStream: TStream); - - property LockCount: Integer read FLockCount write FLockCount; - property Sorted: Boolean read FSorted write SetSorted; - public - constructor Create(AOwner: TPersistent; const AName: string); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function AddProperty(const AName: string; - APropertyClass: TdxSkinPropertyClass): TdxSkinProperty; - procedure BeginUpdate; - procedure CancelUpdate; - procedure DeleteProperty(const AProperty: TdxSkinProperty); virtual; - procedure EndUpdate; - function GetPropertyByName(const AName: string): TdxSkinProperty; - procedure Sort; - - property Modified: Boolean read FModified write FModified; - property PropertyCount: Integer read GetPropertyCount; - property Properties[Index: Integer]: TdxSkinProperty read GetProperty; - end; - - { TdxSkin } - - TdxSkin = class(TdxSkinPersistent) - private - FColors: TcxObjectList; - FGroups: TcxObjectList; - FListeners: TInterfaceList; - FName: string; - FOnChange: TNotifyEvent; - FVersion: TdxSkinVersion; - function GetColor(Index: Integer): TdxSkinColor; - function GetColorCount: Integer; - function GetGroup(Index: Integer): TdxSkinControlGroup; - function GetGroupCount: Integer; - procedure SetName(const Value: string); - protected - procedure DoChange; override; - procedure DoSort; override; - procedure LoadFromResource(hInst: THandle); virtual; - procedure NotifyListeners; - - property Listeners: TInterfaceList read FListeners; - public - constructor Create(const AName: string; ALoadOnCreate: Boolean; hInst: THandle); reintroduce; virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function AddColor(const AName: string; const AColor: TColor): TdxSkinColor; - function AddGroup(const AName: string = ''): TdxSkinControlGroup; - procedure AddListener(AListener: IdxSkinChangeListener); - procedure Clear; - procedure ClearModified; - function Clone(const AName: string): TdxSkin; reintroduce; virtual; - procedure DeleteProperty(const AProperty: TdxSkinProperty); override; - function GetColorByName(const AName: string): TdxSkinColor; - function GetGroupByName(const AName: string): TdxSkinControlGroup; - procedure LoadFromStream(AStream: TStream); virtual; - procedure LoadFromFile(const AFileName: string); - procedure RemoveListener(AListener: IdxSkinChangeListener); - procedure SaveToFile(const AFileName: string); - procedure SaveToStream(AStream: TStream); virtual; - - property ColorCount: Integer read GetColorCount; - property Colors[Index: Integer]: TdxSkinColor read GetColor; - property GroupCount: Integer read GetGroupCount; - property Groups[Index: Integer]: TdxSkinControlGroup read GetGroup; - published - property Name: string read FName write SetName; - property Version: TdxSkinVersion read FVersion; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - end; - - { TdxSkinProperty } - - TdxSkinProperty = class(TdxSkinCustomPersistentObject) - protected - procedure ReadData(Stream: TStream); virtual; - procedure ReadFromStream(Stream: TStream); virtual; - procedure WriteData(Stream: TStream); virtual; - procedure WriteToStream(Stream: TStream); virtual; - public - class procedure Register; - class procedure Unregister; - class function Description: string; virtual; - function Compare(AProperty: TdxSkinProperty): Boolean; virtual; - end; - - TdxSkinGradientMode = (gmHorizontal, gmVertical, gmForwardDiagonal, - gmBackwardDiagonal); - - { TdxSkinCanvas } - - TdxSkinCanvas = class(TObject) - private - FBuffer: TcxBitmap; - FGraphics: GpGraphics; - FRect: TRect; - FSourceDC: HDC; - function GetInterpolationMode: Integer; - procedure SetInterpolationMode(AValue: Integer); - public - function IsDoubleBufferNeeded(DC: HDC): Boolean; - function IsRectVisible(DC: HDC; const R: TRect): Boolean; - procedure BeginPaint(DC: HDC; const R: TRect); - procedure BeginPaintEx(Graphics: GpGraphics; const R: TRect); - procedure DrawImage(AImage: TdxPNGImage; const ADest, ASource: TRect); - procedure EndPaint; overload; - procedure FillRectByColor(const R: TRect; AColor: TColor); - procedure FillRectByGradient(const R: TRect; AColor1, AColor2: TColor; - AMode: TdxSkinGradientMode); - procedure StretchDrawImage(AImage: TdxPNGImage; const ADest, ASource: TRect); - procedure TileImage(AImage: TdxPNGImage; const ADest, ASource: TRect); - // Properties - property Graphics: GpGraphics read FGraphics; - property InterpolationMode: Integer read GetInterpolationMode write SetInterpolationMode; - end; - - { TdxSkinIntegerProperty } - - TdxSkinIntegerProperty = class(TdxSkinProperty) - private - FValue: Integer; - procedure SetValue(AValue: Integer); - protected - procedure ReadData(Stream: TStream); override; - procedure WriteData(Stream: TStream); override; - public - procedure Assign(Source: TPersistent); override; - function Compare(AProperty: TdxSkinProperty): Boolean; override; - published - property Value: Integer read FValue write SetValue default 0; - end; - - { TdxSkinBooleanProperty } - - TdxSkinBooleanProperty = class(TdxSkinProperty) - private - FValue: Boolean; - procedure SetValue(AValue: Boolean); - protected - procedure ReadData(Stream: TStream); override; - procedure WriteData(Stream: TStream); override; - public - procedure Assign(Source: TPersistent); override; - function Compare(AProperty: TdxSkinProperty): Boolean; override; - published - property Value: Boolean read FValue write SetValue default False; - end; - - { TdxSkinColor } - - TdxSkinColor = class(TdxSkinProperty) - private - FValue: TColor; - procedure SetValue(AValue: TColor); - protected - procedure ReadData(Stream: TStream); override; - procedure WriteData(Stream: TStream); override; - public - constructor Create(AOwner: TPersistent; const AName: string); override; - procedure Assign(Source: TPersistent); override; - function Compare(AProperty: TdxSkinProperty): Boolean; override; - published - property Value: TColor read FValue write SetValue default clDefault; - end; - - { TdxSkinRectProperty } - - TdxSkinRectProperty = class(TdxSkinProperty) - private - FValue: TcxRect; - function GetValueByIndex(Index: Integer): Integer; - procedure SetValue(Value: TcxRect); - procedure SetValueByIndex(Index, Value: Integer); - procedure InternalHandler(Sender: TObject); - protected - procedure ReadData(Stream: TStream); override; - procedure WriteData(Stream: TStream); override; - public - constructor Create(AOwner: TPersistent; const AName: string); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function Compare(AProperty: TdxSkinProperty): Boolean; override; - - property Value: TcxRect read FValue write SetValue; - published - property Left: Integer index 0 read GetValueByIndex write SetValueByIndex default 0; - property Top: Integer index 1 read GetValueByIndex write SetValueByIndex default 0; - property Right: Integer index 2 read GetValueByIndex write SetValueByIndex default 0; - property Bottom: Integer index 3 read GetValueByIndex write SetValueByIndex default 0; - end; - - { TdxSkinSizeProperty } - - TdxSkinSizeProperty = class(TdxSkinProperty) - private - FValue: TSize; - procedure SetValue(const Value: TSize); - protected - procedure ReadData(Stream: TStream); override; - procedure WriteData(Stream: TStream); override; - public - procedure Assign(Source: TPersistent); override; - function Compare(AProperty: TdxSkinProperty): Boolean; override; - function GetValueByIndex(Index: Integer): Integer; - procedure SetValueByIndex(Index, Value: Integer); - - property Value: TSize read FValue write SetValue; - published - property cx: Integer index 0 read GetValueByIndex write SetValueByIndex default 0; - property cy: Integer index 1 read GetValueByIndex write SetValueByIndex default 0; - end; - - { TdxSkinBorder } - - TdxSkinBorder = class(TdxSkinProperty) - private - FColor: TColor; - FKind: TcxBorder; - FThin: Integer; - procedure SetColor(AValue: TColor); - procedure SetThin(AValue: Integer); - protected - procedure ReadData(Stream: TStream); override; - procedure WriteData(Stream: TStream); override; - public - constructor Create(AOwner: TPersistent; const AName: string); override; - procedure Assign(Source: TPersistent); override; - function Compare(AProperty: TdxSkinProperty): Boolean; override; - procedure Draw(DC: HDC; const ABounds: TRect); virtual; - procedure DrawEx(ACanvas: TdxSkinCanvas; const ABounds: TRect); virtual; - - property Kind: TcxBorder read FKind; - published - property Color: TColor read FColor write SetColor default clNone; - property Thin: Integer read FThin write SetThin default 1; - end; - - { TdxSkinBorders } - - TdxSkinBorders = class(TdxSkinProperty) - private - FBorders: array[TcxBorder] of TdxSkinBorder; - function GetBorder(ABorder: TcxBorder): TdxSkinBorder; - function GetBorderByIndex(Index: Integer): TdxSkinBorder; - procedure SetBorderByIndex(Index: Integer; AValue: TdxSkinBorder); - protected - procedure CreateBorders; - procedure DeleteBorders; - procedure SubItemHandler(Sender: TObject); virtual; - public - constructor Create(AOwner: TPersistent; const AName: string); override; - destructor Destroy; override; - procedure Assign(ASource: TPersistent); override; - function Compare(AProperty: TdxSkinProperty): Boolean; override; - procedure Draw(ACanvas: TdxSkinCanvas; const ABounds: TRect); virtual; - - property Items[AKind: TcxBorder]: TdxSkinBorder read GetBorder; default; - published - property Left: TdxSkinBorder index 0 read GetBorderByIndex write SetBorderByIndex; - property Top: TdxSkinBorder index 1 read GetBorderByIndex write SetBorderByIndex; - property Right: TdxSkinBorder index 2 read GetBorderByIndex write SetBorderByIndex; - property Bottom: TdxSkinBorder index 3 read GetBorderByIndex write SetBorderByIndex; - end; - - { TdxSkinStringProperty } - - TdxSkinStringProperty = class(TdxSkinProperty) - private - FValue: string; - procedure SetValue(const AValue: string); - protected - procedure ReadData(Stream: TStream); override; - procedure WriteData(Stream: TStream); override; - public - procedure Assign(Source: TPersistent); override; - function Compare(AProperty: TdxSkinProperty): Boolean; override; - published - property Value: string read FValue write SetValue; - end; - - { TdxSkinControlGroup } - - TdxSkinControlGroup = class(TdxSkinPersistent) - private - FElements: TcxObjectList; - function GetCount: Integer; - function GetElement(AIndex: Integer): TdxSkinElement; - function GetSkin: TdxSkin; - procedure SetElement(AIndex: Integer; AElement: TdxSkinElement); - protected - procedure DoSort; override; - procedure ReadData(AStream: TStream; const AVersion: TdxSkinVersion); virtual; - procedure WriteData(AStream: TStream); virtual; - public - constructor Create(AOwner: TPersistent; const AName: string); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function AddElement(const AName: string): TdxSkinElement; - function AddElementEx(const AName: string; AElementClass: TdxSkinElementClass): TdxSkinElement; - procedure Clear; - procedure ClearModified; - procedure Delete(AIndex: Integer); - procedure RemoveElement(AElement: TdxSkinElement); - function GetElementByName(const AName: string): TdxSkinElement; - - property Count: Integer read GetCount; - property Elements[Index: Integer]: TdxSkinElement read GetElement write SetElement; - property Skin: TdxSkin read GetSkin; - end; - - { TdxSkinImage } - - TdxSkinElementState = (esNormal, esHot, esPressed, esDisabled, esActive, - esFocused, esDroppedDown, esChecked, esHotCheck, esActiveDisabled, - esCheckPressed); - - TdxSkinElementStates = set of TdxSkinElementState; - - TdxSkinImageLayout = (ilHorizontal, ilVertical); - TdxSkinStretchMode = (smStretch, smTile, smNoResize); - TdxSkinElementPartBounds = array[0..2, 0..2] of TRect; - TdxSkinElementPartVisibility = array[0..2, 0..2] of Boolean; - - TdxSkinImage = class(TPersistent) - private - FGradient: TdxSkinGradientMode; - FGradientBeginColor: TColor; - FGradientEndColor: TColor; - FImageLayout: TdxSkinImageLayout; - FIsDirty: Boolean; - FMargins: TcxRect; - FOnChange: TNotifyEvent; - FOwner: TdxSkinElement; - FPartSizing: TdxSkinElementPartVisibility; - FPartsVisibility: TdxSkinElementPartVisibility; - FSize: TSize; - FSourceName: string; - FStateBounds: array[TdxSkinElementState] of TRect; - FStateCount: Integer; - FStates: TdxSkinElementStates; - FStretch: TdxSkinStretchMode; - FTexture: TdxPNGImage; - FTransparentColor: TColor; - function GetEmpty: Boolean; - function GetImageCount: Integer; - function GetIsGradientParamsAssigned: Boolean; - function GetName: string; - function GetPartSizing(Col, Row: Integer): Boolean; - function GetPartVisible(Col, Row: Integer): Boolean; - function GetSize: TSize; - function GetSourceName: string; - function GetStateBounds(AImageIndex: Integer; AState: TdxSkinElementState): TRect; - function GetStateCount: Integer; - procedure SetGradientBeginColor(AValue: TColor); - procedure SetGradientEndColor(AValue: TColor); - procedure SetGradientMode(AValue: TdxSkinGradientMode); - procedure SetImageLayout(AValue: TdxSkinImageLayout); - procedure SetMargins(AValue: TcxRect); - procedure SetName(const AValue: string); - procedure SetStates(AValue: TdxSkinElementStates); - procedure SetStretch(AValue: TdxSkinStretchMode); - procedure SetTransparentColor(AValue: TColor); - procedure SubItemHandler(Sender: TObject); - protected - procedure CheckInfo; - procedure CheckState(var AState: TdxSkinElementState); - procedure DoChange; virtual; - procedure DoInitializeInfo; virtual; - procedure DrawPart(ACanvas: TdxSkinCanvas; const ADest, ASource: TRect; - APartSizing, AIsCenterPart: Boolean); virtual; - procedure DrawPartByGradient(ACanvas: TdxSkinCanvas; const R: TRect); - function GetOwner: TPersistent; override; - procedure InitializePartsInfo(const ABounds: TRect; var AParts; - var AVisibility; ACheckMargins: Boolean); - procedure ReadData(AStream: TStream); - procedure WriteData(AStream: TStream); - - property TransparentColor: TColor read FTransparentColor write SetTransparentColor; - property IsDirty: Boolean read FIsDirty write FIsDirty; - - property IsGradientParamsAssigned: Boolean read GetIsGradientParamsAssigned; - property PartSizing[Col, Row: Integer]: Boolean read GetPartSizing; - property PartVisible[Col, Row: Integer]: Boolean read GetPartVisible; - public - constructor Create(AOwner: TdxSkinElement); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure Clear; - function Compare(AImage: TdxSkinImage): Boolean; virtual; - procedure Draw(DC: HDC; const ARect: TRect; AImageIndex: Integer = 0; - AState: TdxSkinElementState = esNormal); virtual; - procedure DrawEx(ACanvas: TdxSkinCanvas; const ARect: TRect; - AImageIndex: Integer = 0; AState: TdxSkinElementState = esNormal); virtual; - procedure GetBitmap(AImageIndex: Integer; AState: TdxSkinElementState; - ABitmap: TBitmap; ABkColor: TColor = clNone); - procedure LoadFromFile(const AFileName: string); - procedure SaveToFile(const AFileName: string); - procedure SetStateMapping(AStateOrder: array of TdxSkinElementState); - - property Empty: Boolean read GetEmpty; - property ImageCount: Integer read GetImageCount; - property Name: string read GetName write SetName; - property Owner: TdxSkinElement read FOwner; - property Size: TSize read GetSize; - property SourceName: string read GetSourceName; - property StateBounds[ImageIndex: Integer; State: TdxSkinElementState]: TRect read GetStateBounds; - property StateCount: Integer read GetStateCount; - property Texture: TdxPNGImage read FTexture; - published - property Gradient: TdxSkinGradientMode read FGradient write SetGradientMode default gmHorizontal; - property GradientBeginColor: TColor read FGradientBeginColor write SetGradientBeginColor default clNone; - property GradientEndColor: TColor read FGradientEndColor write SetGradientEndColor default clNone; - property ImageLayout: TdxSkinImageLayout read FImageLayout write SetImageLayout default ilHorizontal; - property Margins: TcxRect read FMargins write SetMargins; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - property States: TdxSkinElementStates read FStates write SetStates; - property Stretch: TdxSkinStretchMode read FStretch write SetStretch default smStretch; - end; - - { TdxSkinElement } - - TdxSkinElement = class(TdxSkinPersistent) - private - FAlpha: Byte; - FBorders: TdxSkinBorders; - FBrush: GpBrush; - FCanvas: TdxSkinCanvas; - FColor: TColor; - FContentOffset: TcxRect; - FGlyph: TdxSkinImage; - FImage: TdxSkinImage; - FImageCount: Integer; - FIsColorAssigned: Boolean; - FMinSize: TcxSize; - FTextColor: TColor; - function GetGroup: TdxSkinControlGroup; - function GetIsAlphaUsed: Boolean; - function GetPath: string; - function GetSize: TSize; - procedure SetAlpha(AValue: Byte); - procedure SetBorders(AValue: TdxSkinBorders); - procedure SetColor(AValue: TColor); - procedure SetContentOffset(AValue: TcxRect); - procedure SetGlyph(AValue: TdxSkinImage); - procedure SetImage(AValue: TdxSkinImage); - procedure SetImageCount(AValue: Integer); - procedure SetMinSize(AValue: TcxSize); - procedure SetTextColor(AValue: TColor); - protected - function CompareProperties(AElement: TdxSkinElement): Boolean; virtual; - function ExpandName(ABitmap: TdxSkinImage): string; virtual; - procedure FillBackgroundByColor(ACanvas: TdxSkinCanvas; const ARect: TRect); - procedure InternalDraw(ACanvas: TdxSkinCanvas; const ARect: TRect; - AImageIndex: Integer = 0; AState: TdxSkinElementState = esNormal); - procedure ReadData(AStream: TStream; AVersion: TdxSkinVersion); virtual; - procedure WriteData(AStream: TStream; AVersion: TdxSkinVersion); virtual; - property Brush: GpBrush read FBrush; - property Canvas: TdxSkinCanvas read FCanvas; - property IsColorAssigned: Boolean read FIsColorAssigned; - public - constructor Create(AOwner: TPersistent; const AName: string); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function Compare(AElement: TdxSkinElement): Boolean; virtual; - function GetTextColor(AState: TcxButtonState): TColor; virtual; - procedure Draw(DC: HDC; const ARect: TRect; AImageIndex: Integer = 0; - AState: TdxSkinElementState = esNormal); virtual; - procedure SetStateMapping(AStateOrder: array of TdxSkinElementState); - - property Group: TdxSkinControlGroup read GetGroup; - property IsAlphaUsed: Boolean read GetIsAlphaUsed; - property Path: string read GetPath; - property Size: TSize read GetSize; - published - property Color: TColor read FColor write SetColor default clDefault; - property Alpha: Byte read FAlpha write SetAlpha default 255; - property Borders: TdxSkinBorders read FBorders write SetBorders; - property ContentOffset: TcxRect read FContentOffset write SetContentOffset; - property Glyph: TdxSkinImage read FGlyph write SetGlyph; - property MinSize: TcxSize read FMinSize write SetMinSize; - property TextColor: TColor read FTextColor write SetTextColor default clDefault; - property Image: TdxSkinImage read FImage write SetImage; - property ImageCount: Integer read FImageCount write SetImageCount default 1; - end; - - { TdxSkinEmptyElement } - - TdxSkinEmptyElement = class(TdxSkinElement) - public - procedure Draw(DC: HDC; const ARect: TRect; AImageIndex: Integer = 0; - AState: TdxSkinElementState = esNormal); override; - end; - - { TdxSkinPartStream } - - TdxSkinPartStream = class(TStream) - private - FPosEnd: Longint; - FPosStart: Longint; - FSource: TStream; - protected - {$IFDEF DELPHI7} - function GetSize: Int64; override; - {$ENDIF} - public - constructor Create(ASource: TStream); virtual; - procedure Initialize(const APosStart, APosEnd: Longint); - procedure InitializeEx(ASource: TStream; const APosStart, APosEnd: Longint); - function Read(var Buffer; Count: Longint): Longint; override; - function Seek(Offset: Longint; Origin: Word): Longint; override; - function Write(const Buffer; Count: Longint): Longint; override; - - property PosEnd: Longint read FPosEnd; - property PosStart: Longint read FPosStart; - property Source: TStream read FSource; - end; - - { TdxSkinElementCache } - - TdxSkinElementCache = class(TObject) - private - FCache: GpBitmap; - FCacheOpaque: TcxBitmap; - FElement: TdxSkinElement; - FImageIndex: Integer; - FIsAlphaBlendUsed: Boolean; - FRect: TRect; - FState: TdxSkinElementState; - protected - procedure FreeCache; - procedure InitCache(R: TRect); - procedure InitOpaqueCache(R: TRect); - // Properties - property Element: TdxSkinElement read FElement; - property ImageIndex: Integer read FImageIndex; - property IsAlphaBlendUsed: Boolean read FIsAlphaBlendUsed; - property State: TdxSkinElementState read FState; - public - destructor Destroy; override; - procedure CheckCacheState(AElement: TdxSkinElement; const R: TRect; - AState: TdxSkinElementState = esNormal; AImageIndex: Integer = 0); - procedure Draw(DC: HDC; const R: TRect); - procedure DrawEx(DC: HDC; AElement: TdxSkinElement; const R: TRect; - AState: TdxSkinElementState = esNormal; AImageIndex: Integer = 0); - procedure Flush; - end; - - { TdxSkinElementCacheList } - - TdxSkinElementCacheList = class(TcxObjectList) - private - FCacheListLimit: Integer; - procedure CheckListLimits; - function FindElementCache(AElement: TdxSkinElement; const R: TRect; - out AElementCache: TdxSkinElementCache): Boolean; - function GetElementCache(AIndex: Integer): TdxSkinElementCache; - public - constructor Create; - procedure DrawElement(DC: HDC; AElement: TdxSkinElement; const R: TRect; - AState: TdxSkinElementState = esNormal; AImageIndex: Integer = 0); - procedure Flush; - // - property CacheListLimit: Integer read FCacheListLimit write FCacheListLimit; - property ElementCache[Index: Integer]: TdxSkinElementCache read GetElementCache; - end; - -function dxSkinRegisteredPropertyTypes: TList; - -procedure dxSkinInvalidOperation(const AMessage: string); -procedure dxSkinCheck(ACondition: Boolean; const AMessage: string); -procedure dxSkinCheckVersion(AVersion: Double); -function dxSkinCheckSignature(AStream: TStream; out AVersion: TdxSkinVersion): Boolean; -function dxSkinCheckSkinElement(AElement: TdxSkinElement): TdxSkinElement; -procedure dxSkinWriteSignature(AStream: TStream); - -implementation - -const - dxSkinElementCacheListLimit = 8; - - PartSizing: array[0..2, 0..2] of Boolean = - ((False, True, False), - (True, True, True), - (False, True, False)); - -var - dxSkinEmptyElement: TdxSkinElement; - PartStream: TdxSkinPartStream; - RegisteredPropertyTypes: TList; - -type - TRect2Int = array[TcxBorder] of Integer; - -function ReadStringFromStream(AStream: TStream): string; -var - L: Integer; - AStr: AnsiString; -begin - AStream.Read(L, SizeOf(L)); - SetLength(AStr, L); - if L > 0 then - AStream.ReadBuffer(AStr[1], L); - Result := dxAnsiStringToString(AStr); -end; - -function ReadInteger(AStream: TStream): Integer; -begin - AStream.Read(Result, SizeOf(Result)); -end; - -procedure WriteStringToStream(AStream: TStream; const AValue: string); -var - AStr: AnsiString; - L: Integer; -begin - AStr := dxStringToAnsiString(AValue); - L := Length(AStr); - AStream.Write(L, SizeOf(L)); - if L > 0 then - AStream.WriteBuffer(AStr[1], L); -end; - -procedure WriteInteger(AStream: TStream; const AValue: Integer); -begin - AStream.Write(AValue, SizeOf(AValue)); -end; - -function dxSkinRegisteredPropertyTypes: TList; -begin - Result := RegisteredPropertyTypes; -end; - -procedure dxSkinInvalidOperation(const AMessage: string); -begin - raise EdxSkin.Create(AMessage); -end; - -procedure dxSkinCheck(ACondition: Boolean; const AMessage: string); -begin - if not ACondition then - dxSkinInvalidOperation(AMessage); -end; - -procedure dxSkinCheckVersion(AVersion: Double); -begin - if AVersion < 1 then - raise EdxSkin.Create(sdxOldFormat); -end; - -function dxSkinCheckSignature(AStream: TStream; out AVersion: TdxSkinVersion): Boolean; -var - ASignature: TdxSkinSignature; -begin - AStream.Position := AStream.Position + SizeOf(Integer); - Result := AStream.Read(ASignature, SizeOf(ASignature)) = SizeOf(ASignature); - Result := Result and (ASignature = dxSkinSignature); - if Result then - AStream.ReadBuffer(AVersion, SizeOf(AVersion)); -end; - -function dxSkinCheckSkinElement(AElement: TdxSkinElement): TdxSkinElement; -begin - Result := AElement; - if Result = nil then - Result := dxSkinEmptyElement; -end; - -procedure dxSkinWriteSignature(AStream: TStream); -var - ALen: Integer; -begin - ALen := SizeOf(dxSkinSignature); - AStream.Write(ALen, SizeOf(ALen)); - AStream.Write(dxSkinSignature[0], SizeOf(dxSkinSignature)); - AStream.Write(dxSkinStreamVersion, SizeOf(dxSkinStreamVersion)); -end; - -function dxCompareByName(AItem1, AItem2: TdxSkinCustomPersistentObject): Integer; -begin - Result := AnsiCompareStr(AItem1.Name, AItem2.Name); -end; - -function FindItemByName(AItemsList: TcxObjectList; const AName: string): TObject; -var - L, H, AIndex, C: Integer; -begin - Result := nil; - L := 0; - H := AItemsList.Count - 1; - while L <= H do - begin - AIndex := (L + H) div 2; - C := AnsiCompareStr(TdxSkinCustomPersistentObject(AItemsList[AIndex]).Name, AName); - if C < 0 then - L := AIndex + 1 - else - begin - H := AIndex - 1; - if C = 0 then - begin - Result := TdxSkinCustomPersistentObject(AItemsList[AIndex]); - Break; - end - end; - end; -end; - -{ TdxSkinPersistent } - -constructor TdxSkinPersistent.Create( - AOwner: TPersistent; const AName: string); -begin - inherited Create(AOwner, AName); - FProperties := TcxObjectList.Create; -end; - -destructor TdxSkinPersistent.Destroy; -begin - FProperties.Free; - inherited Destroy; -end; - -procedure TdxSkinPersistent.Assign(Source: TPersistent); -var - I: Integer; -begin - BeginUpdate; - try - if Source is TdxSkinPersistent then - begin - for I := 0 to TdxSkinPersistent(Source).PropertyCount - 1 do - AddSubItem(TdxSkinPersistent(Source).Properties[I].Clone, FProperties); - end - else - inherited Assign(Source); - finally - EndUpdate; - end; -end; - -function TdxSkinPersistent.AddProperty( - const AName: string; APropertyClass: TdxSkinPropertyClass): TdxSkinProperty; -begin - Result := APropertyClass.Create(Self, AName); - AddSubItem(Result, FProperties); -end; - -procedure TdxSkinPersistent.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TdxSkinPersistent.CancelUpdate; -begin - Dec(FLockCount); -end; - -procedure TdxSkinPersistent.DeleteProperty(const AProperty: TdxSkinProperty); -begin - if FProperties.Remove(AProperty) <> -1 then - begin - AProperty.Free; - Changed; - end; -end; - -procedure TdxSkinPersistent.EndUpdate; -begin - Dec(FLockCount); - if FLockCount = 0 then - Changed; -end; - -procedure TdxSkinPersistent.Sort; -begin - SetSorted(True); -end; - -procedure TdxSkinPersistent.AddSubItem( - AInstance: TdxSkinCustomPersistentObject; AList: TcxObjectList); -begin - AInstance.FOwner := Self; - AInstance.OnChange := SubItemHandler; - AList.Add(AInstance); - Changed; -end; - -procedure TdxSkinPersistent.Changed; -begin - Modified := True; - FSorted := False; - if LockCount = 0 then - DoChange; -end; - -procedure TdxSkinPersistent.DoSort; -begin - FProperties.Sort(TListSortCompare(@dxCompareByName)); -end; - -procedure TdxSkinPersistent.SubItemHandler(Sender: TObject); -begin - Changed; -end; - -procedure TdxSkinPersistent.ReadProperties(AStream: TStream); -var - I: Integer; - APropClass: TdxSkinPropertyClass; -begin - for I := 0 to ReadInteger(AStream) - 1 do - begin - APropClass := TdxSkinPropertyClass(FindClass(ReadStringFromStream(AStream))); - AddProperty(ReadStringFromStream(AStream), APropClass).ReadData(AStream); - end; -end; - -procedure TdxSkinPersistent.WriteProperties(AStream: TStream); -var - I: Integer; -begin - WriteInteger(AStream, PropertyCount); - for I := 0 to PropertyCount -1 do - Properties[I].WriteToStream(AStream); -end; - -function TdxSkinPersistent.GetPropertyByName(const AName: string): TdxSkinProperty; -begin - Sort; - Result := TdxSkinProperty(FindItemByName(FProperties, AName)); -end; - -function TdxSkinPersistent.GetPropertyCount: Integer; -begin - Result := FProperties.Count; -end; - -function TdxSkinPersistent.GetProperty(Index: Integer): TdxSkinProperty; -begin - Result := FProperties[Index] as TdxSkinProperty; -end; - -procedure TdxSkinPersistent.SetSorted(AValue: Boolean); -begin - if AValue <> FSorted then - begin - FSorted := AValue; - if AValue then - DoSort; - end; -end; - -{ TdxSkin } - -constructor TdxSkin.Create(const AName: string; - ALoadOnCreate: Boolean; hInst: THandle); -begin - inherited Create(nil, AName); - FListeners := TInterfaceList.Create; - FColors := TcxObjectList.Create; - FGroups := TcxObjectList.Create; - FVersion := dxSkinStreamVersion; - FName := AName; - if ALoadOnCreate then - LoadFromResource(hInst); -end; - -destructor TdxSkin.Destroy; -begin - FListeners.Free; - FColors.Free; - FGroups.Free; - inherited Destroy; -end; - -procedure TdxSkin.ClearModified; -var - I: Integer; -begin - FModified := False; - for I := 0 to GroupCount - 1 do - Groups[I].ClearModified; -end; - -function TdxSkin.Clone(const AName: string): TdxSkin; -var - AClass: TdxSkinClass; -begin - AClass := TdxSkinClass(ClassType); - Result := AClass.Create(Name, False, 0); - Result.Assign(Self); -end; - -procedure TdxSkin.Assign(Source: TPersistent); -var - I: Integer; -begin - BeginUpdate; - try - if Source is TdxSkin then - begin - // clone colors - for I := 0 to TdxSkin(Source).ColorCount - 1 do - AddSubItem(TdxSkin(Source).Colors[I].Clone, FColors); - for I := 0 to TdxSkin(Source).GroupCount - 1 do - AddSubItem(TdxSkin(Source).Groups[I].Clone, FGroups); - end; - inherited Assign(Source); - finally - EndUpdate; - end; -end; - -function TdxSkin.AddColor( - const AName: string; const AColor: TColor): TdxSkinColor; -begin - Result := TdxSkinColor.Create(Self, AName); - BeginUpdate; - try - AddSubItem(Result, FColors); - Result.Value := AColor; - finally - EndUpdate; - end; -end; - -function TdxSkin.AddGroup(const AName: string): TdxSkinControlGroup; -begin - Result := TdxSkinControlGroup.Create(Self, AName); - AddSubItem(Result, FGroups); -end; - -procedure TdxSkin.AddListener(AListener: IdxSkinChangeListener); -begin - Listeners.Add(AListener); -end; - -procedure TdxSkin.Clear; -begin - FGroups.Clear; - FColors.Clear; - FProperties.Clear; -end; - -function TdxSkin.GetColorByName(const AName: string): TdxSkinColor; -begin - Sort; - Result := TdxSkinColor(FindItemByName(FColors, AName)); -end; - -procedure TdxSkin.DeleteProperty(const AProperty: TdxSkinProperty); -begin - inherited DeleteProperty(AProperty); - if FColors.Remove(AProperty) <> -1 then - begin - AProperty.Free; - Changed; - end; -end; - -function TdxSkin.GetGroupByName(const AName: string): TdxSkinControlGroup; -begin - Sort; - Result := TdxSkinControlGroup(FindItemByName(FGroups, AName)); -end; - -procedure TdxSkin.LoadFromStream(AStream: TStream); -var - I: Integer; -begin - if not CheckGdiPlus then Exit; - if not dxSkinCheckSignature(AStream, FVersion) then - raise EdxSkin.Create(sdxSkinInvalidStreamFormat); - FName := ReadStringFromStream(AStream); - dxSkinCheckVersion(FVersion); - BeginUpdate; - try - Clear; - for I := 0 to ReadInteger(AStream) - 1 do - begin - if FVersion >= 0.92 then - ReadStringFromStream(AStream); - AddColor(ReadStringFromStream(AStream), ReadInteger(AStream)); - end; - ReadProperties(AStream); - for I := 0 to ReadInteger(AStream) - 1 do - AddGroup(ReadStringFromStream(AStream)).ReadData(AStream, Version); - finally - EndUpdate; - end; -end; - -procedure TdxSkin.LoadFromFile(const AFileName: string); -var - AStream: TStream; -begin - AStream := TFileStream.Create(AFileName, fmOpenRead or fmShareDenyNone); - try - LoadFromStream(AStream); - finally - AStream.Free - end; -end; - -procedure TdxSkin.RemoveListener(AListener: IdxSkinChangeListener); -begin - Listeners.Remove(AListener); -end; - -procedure TdxSkin.SaveToFile(const AFileName: string); -var - AStream: TStream; -begin - AStream := TFileStream.Create(AFileName, fmCreate); - try - SaveToStream(AStream); - finally - AStream.Free - end; -end; - -procedure TdxSkin.SaveToStream(AStream: TStream); -var - I: Integer; -begin - dxSkinWriteSignature(AStream); - WriteStringToStream(AStream, Name); - WriteInteger(AStream, ColorCount); - for I := 0 to ColorCount - 1 do - Colors[I].WriteToStream(AStream); - WriteProperties(AStream); - WriteInteger(AStream, GroupCount); - for I := 0 to GroupCount - 1 do - Groups[I].WriteData(AStream); -end; - - -procedure TdxSkin.DoChange; -begin - NotifyListeners; - if Assigned(FOnChange) then - FOnChange(Self); -end; - -procedure TdxSkin.DoSort; -begin - inherited DoSort; - FGroups.Sort(TListSortCompare(@dxCompareByName)); - FColors.Sort(TListSortCompare(@dxCompareByName)); -end; - -procedure TdxSkin.NotifyListeners; -var - I: Integer; - AIntf: IdxSkinChangeListener; -begin - Inc(FLockCount); - try - for I := 0 to Listeners.Count - 1 do - begin - AIntf := Listeners[I] as IdxSkinChangeListener; - AIntf.SkinChanged(Self); - AIntf := nil; - end; - finally - Dec(FLockCount); - end; -end; -procedure TdxSkin.LoadFromResource(hInst: THandle); -var - AStream: TStream; -begin - AStream := TResourceStream.Create(hInst, Name, PChar(sdxResourceType)); - try - LoadFromStream(AStream); - finally - AStream.Free; - end; -end; - -function TdxSkin.GetColor(Index: Integer): TdxSkinColor; -begin - Result := FColors[Index] as TdxSkinColor; -end; - -function TdxSkin.GetColorCount: Integer; -begin - Result := FColors.Count; -end; - -function TdxSkin.GetGroup(Index: Integer): TdxSkinControlGroup; -begin - Result := FGroups[Index] as TdxSkinControlGroup; -end; - -function TdxSkin.GetGroupCount: Integer; -begin - Result := FGroups.Count; -end; - -procedure TdxSkin.SetName(const Value: string); -begin - FName := Value; -end; - -{ TdxSkinImage } - -constructor TdxSkinImage.Create(AOwner: TdxSkinElement); -begin - FOwner := AOwner; - FTexture := TdxPNGImage.Create(); - FMargins := TcxRect.Create(Self); - FMargins.OnChange := SubItemHandler; - FGradientBeginColor := clNone; - FGradientEndColor := clNone; - FGradient := gmHorizontal; - FTransparentColor := clNone; -end; - -destructor TdxSkinImage.Destroy; -begin - FMargins.Free; - FTexture.Free; - inherited Destroy; -end; - -procedure TdxSkinImage.Assign(Source: TPersistent); -begin - if not (Source is TdxSkinImage) then Exit; - if TdxSkinImage(Source).Empty then - Clear - else - begin - Texture.Assign(TdxSkinImage(Source).Texture); - FSourceName := TdxSkinImage(Source).SourceName; - FIsDirty := True; - end; - GradientBeginColor := TdxSkinImage(Source).GradientBeginColor; - GradientEndColor := TdxSkinImage(Source).GradientEndColor; - Gradient := TdxSkinImage(Source).Gradient; - ImageLayout := TdxSkinImage(Source).ImageLayout; - Margins.Assign(TdxSkinImage(Source).Margins); - States := TdxSkinImage(Source).States; - Stretch := TdxSkinImage(Source).Stretch; -end; - -procedure TdxSkinImage.Clear; -begin - Texture.Handle := nil; - FSourceName := ''; - DoChange; -end; - -procedure TdxSkinImage.GetBitmap(AImageIndex: Integer; - AState: TdxSkinElementState; ABitmap: TBitmap; ABkColor: TColor = clNone); -begin - ABitmap.FreeImage; - ABitmap.Width := Size.cx; - ABitmap.Height := Size.cy; - if ABkColor <> clNone then - begin - if ABkColor <> clDefault then - ABitmap.Canvas.Brush.Color := ABkColor; - ABitmap.Canvas.FillRect(Rect(0, 0, Size.cx, Size.cy)); - end; - Draw(ABitmap.Canvas.Handle, Rect(0, 0, Size.cx, Size.cy), AImageIndex, AState); -end; - -procedure TdxSkinImage.LoadFromFile(const AFileName: string); -var - AFile : TFileStream; -begin - FSourceName := AFileName; - AFile := TFileStream.Create(AFileName, fmOpenRead or fmShareDenyNone); - try - Texture.LoadFromStream(AFile); - finally - AFile.Free; - end; - DoChange; -end; - -procedure TdxSkinImage.SaveToFile(const AFileName: string); -begin - if Empty then Exit; - Texture.SaveToFile(ChangeFileExt(AFileName, '.png')); - DoChange; -end; - -procedure TdxSkinImage.SetStateMapping(AStateOrder: array of TdxSkinElementState); -var - ASrc: TRect; - ASize: TSize; - ABitmap: TBitmap; - AIndex, AImageIndex: Integer; -begin - if Texture.Empty then Exit; - - ABitmap := TcxBitmap32.CreateSize(Texture.Width, Texture.Height, True); - try - ASize := Size; - ASrc := Rect(0, 0, ASize.cx, ASize.cy); - if ImageLayout = ilHorizontal then - ASize.cy := 0 - else - ASize.cx := 0; - - for AImageIndex := 0 to ImageCount - 1 do - for AIndex := Low(AStateOrder) to High(AStateOrder) do - begin - if not (AStateOrder[AIndex] in States) then Continue; - Texture.StretchDraw(ABitmap.Canvas.Handle, - StateBounds[AImageIndex, AStateOrder[AIndex]], ASrc); - OffsetRect(ASrc, ASize.cx, ASize.cy); - end; - Texture.SetBitmap(ABitmap); - finally - ABitmap.Free; - end; -end; - -procedure TdxSkinImage.CheckInfo; -begin - if not IsDirty then Exit; - IsDirty := False; - DoInitializeInfo; -end; - -procedure TdxSkinImage.CheckState(var AState: TdxSkinElementState); -var - AFirstState: TdxSkinElementState; -begin - if not (AState in FStates) then - for AFirstState := Low(TdxSKinElementState) to High(TdxSKinElementState) do - if AFirstState in FStates then - begin - AState := AFirstState; - Break; - end; -end; - -function TdxSkinImage.Compare(AImage: TdxSkinImage): Boolean; -begin - Result := (AImage.ImageLayout = ImageLayout) and (AImage.Empty = Empty) and - (AImage.States = States) and (AImage.Gradient = Gradient) and - (AImage.GradientBeginColor = GradientBeginColor) and - (AImage.GradientEndColor = GradientEndColor) and (AImage.Stretch = Stretch) and - (AImage.Size.cx = Size.cx) and (AImage.Size.cy = Size.cy) and - AImage.Margins.IsEqual(Margins.Rect) and Texture.Compare(AImage.Texture); -end; - -procedure TdxSkinImage.Draw(DC: HDC; const ARect: TRect; - AImageIndex: Integer = 0; AState: TdxSkinElementState = esNormal); -var - ACanvas: TdxSkinCanvas; -begin - CheckInfo; - if (FSize.cx <= 0) or (FSize.cy <= 0) or IsRectEmpty(ARect) or not RectVisible(DC, ARect) then Exit; - ACanvas := TdxSkinCanvas.Create; - try - ACanvas.BeginPaint(DC, ARect); - DrawEx(ACanvas, ARect, AImageIndex, AState); - ACanvas.EndPaint; - finally - ACanvas.Free; - end; -end; - -procedure TdxSkinImage.DrawEx(ACanvas: TdxSkinCanvas; const ARect: TRect; - AImageIndex: Integer = 0; AState: TdxSkinElementState = esNormal); -var - ACol, ARow: Integer; - AVisibility: TdxSkinElementPartVisibility; - DestParts, SourceParts: TdxSkinElementPartBounds; -begin - if Empty then - begin - if IsGradientParamsAssigned then - begin - InitializePartsInfo(ARect, DestParts, AVisibility, True); - DrawPartByGradient(ACanvas, DestParts[1, 1]); - end; - Exit; - end; - - CheckInfo; - CheckState(AState); - if Stretch = smNoResize then - ACanvas.DrawImage(Texture, cxRectCenter(ARect, Size), StateBounds[AImageIndex, AState]) - else - begin - FillChar(AVisibility, SizeOf(AVisibility), 1); - InitializePartsInfo(StateBounds[AImageIndex, AState], SourceParts, AVisibility, False); - InitializePartsInfo(ARect, DestParts, AVisibility, True); - for ARow := 0 to 2 do - for ACol := 0 to 2 do - if AVisibility[ACol, ARow] then - begin - DrawPart(ACanvas, DestParts[ACol, ARow], SourceParts[ACol, ARow], - PartSizing[ACol, ARow], (ACol = 1) and (ARow = 1)); - end; - end; -end; - -procedure TdxSkinImage.DrawPart(ACanvas: TdxSkinCanvas; const ADest: TRect; - const ASource: TRect; APartSizing, AIsCenterPart: Boolean); -begin - if IsGradientParamsAssigned and AIsCenterPart then - DrawPartByGradient(ACanvas, ADest) - else - if not APartSizing then - ACanvas.DrawImage(Texture, ADest, ASource) - else - if Stretch = smTile then - ACanvas.TileImage(Texture, ADest, ASource) - else - ACanvas.StretchDrawImage(Texture, ADest, ASource); -end; - -procedure TdxSkinImage.DrawPartByGradient(ACanvas: TdxSkinCanvas; const R: TRect); -begin - ACanvas.FillRectByGradient(R, GradientBeginColor, GradientEndColor, Gradient); -end; - -procedure TdxSkinImage.DoChange; -begin - IsDirty := True; - if Assigned(FOnChange) then - FOnChange(Self); -end; - -procedure TdxSkinImage.DoInitializeInfo; -var - AState: TdxSkinElementState; - AParts: TdxSkinElementPartBounds; - AStateIndices: array[TdxSkinElementState] of Byte; -begin - FStateCount := 0; - FillChar(AStateIndices, SizeOf(AStateIndices), 0); - for AState := Low(TdxSkinElementState) to High(TdxSkinElementState) do - if AState in States then - begin - AStateIndices[AState] := FStateCount; - Inc(FStateCount); - end; - FSize := cxSize(Texture.Width, Texture.Height); - if StateCount > 0 then - begin - if ImageLayout = ilHorizontal then - FSize.cx := FSize.cx div ImageCount div StateCount - else - FSize.cy := FSize.cy div ImageCount div StateCount; - end; - for AState := Low(TdxSkinElementState) to High(TdxSkinElementState) do - begin - if ImageLayout = ilHorizontal then - FStateBounds[AState] := Rect(AStateIndices[AState] * FSize.cx, - 0, (AStateIndices[AState] + 1) * FSize.cx, FSize.cy) - else - FStateBounds[AState] := Rect(0, AStateIndices[AState] * FSize.cy, - FSize.cx, (AStateIndices[AState] + 1) * FSize.cy) - end; - InitializePartsInfo(Rect(0, 0, FSize.cx, FSize.cy), AParts, FPartsVisibility, False); -end; - -function TdxSkinImage.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -procedure TdxSkinImage.InitializePartsInfo(const ABounds: TRect; - var AParts; var AVisibility; ACheckMargins: Boolean); - - procedure MakePart(const ALeft, ATop, ARight, ABottom: Integer; - var ARect: TRect; var AVisible: Boolean); - begin - if not AVisible then Exit; - ARect.Left := ALeft; - ARect.Top := ATop; - ARect.Right := ARight; - ARect.Bottom := ABottom; - AVisible := (ALeft < ARight) and (ATop < ABottom); - end; - - procedure DoCheckMargins(var AMargins: TRect); - var - ASize, ADelta, I: Integer; - begin - if ACheckMargins then - begin - ASize := AMargins.Left + AMargins.Right; - ADelta := ASize - cxRectWidth(ABounds); - if ADelta > 0 then - begin - for I := 0 to 2 do - begin - FPartSizing[0, I] := True; - FPartSizing[2, I] := True; - end; - Dec(AMargins.Left, MulDiv(AMargins.Left, ADelta, ASize)); - Dec(AMargins.Right, MulDiv(AMargins.Right, ADelta, ASize)); - end; - ASize := AMargins.Top + AMargins.Bottom; - ADelta := ASize - cxRectHeight(ABounds); - if ADelta > 0 then - begin - Dec(AMargins.Top, MulDiv(AMargins.Top, ADelta, ASize)); - Dec(AMargins.Bottom, MulDiv(AMargins.Bottom, ADelta, ASize)); - for I := 0 to 2 do - begin - FPartSizing[I, 0] := True; - FPartSizing[I, 2] := True; - end; - end; - end; - end; - -var - AMargins, R: TRect; -begin - AMargins := Margins.Rect; - // stretch margins - Move(dxSkinsCore.PartSizing, FPartSizing, SizeOf(FPartSizing)); - DoCheckMargins(AMargins); - // - with AMargins do - begin - R := cxRect(ABounds.Left + Left, ABounds.Top + Top, - ABounds.Right - Right, ABounds.Bottom - Bottom); - // check horizontal bounds - if R.Left > ABounds.Right then - R.Left := ABounds.Right; - if R.Left > R.Right then - R.Right := R.Left; - if R.Right > ABounds.Right then - R.Right := ABounds.Right; - // check vertical bounds - if R.Top > ABounds.Bottom then - R.Top := ABounds.Bottom; - if R.Top > R.Bottom then - R.Bottom := R.Top; - if R.Bottom > ABounds.Bottom then - R.Bottom := ABounds.Bottom; - end; - // top line - MakePart(ABounds.Left, ABounds.Top, R.Left, R.Top, - TdxSkinElementPartBounds(AParts)[0, 0], - TdxSkinElementPartVisibility(AVisibility)[0, 0]); - MakePart(R.Left, ABounds.Top, R.Right, R.Top, - TdxSkinElementPartBounds(AParts)[1, 0], - TdxSkinElementPartVisibility(AVisibility)[1, 0]); - MakePart(R.Right, ABounds.Top, ABounds.Right, R. - Top, TdxSkinElementPartBounds(AParts)[2, 0], - TdxSkinElementPartVisibility(AVisibility)[2, 0]); - // middle line - MakePart(ABounds.Left, R.Top, R.Left, R.Bottom, - TdxSkinElementPartBounds(AParts)[0, 1], - TdxSkinElementPartVisibility(AVisibility)[0, 1]); - MakePart(R.Left, R.Top, R.Right, R.Bottom, - TdxSkinElementPartBounds(AParts)[1, 1], - TdxSkinElementPartVisibility(AVisibility)[1, 1]); - MakePart(R.Right, R.Top, ABounds.Right, R.Bottom, - TdxSkinElementPartBounds(AParts)[2, 1], - TdxSkinElementPartVisibility(AVisibility)[2, 1]); - // bottom line - MakePart(ABounds.Left, R.Bottom, R.Left, ABounds.Bottom, - TdxSkinElementPartBounds(AParts)[0, 2], - TdxSkinElementPartVisibility(AVisibility)[0, 2]); - MakePart(R.Left, R.Bottom, R.Right, ABounds.Bottom, - TdxSkinElementPartBounds(AParts)[1, 2], - TdxSkinElementPartVisibility(AVisibility)[1, 2]); - MakePart(R.Right, R.Bottom, ABounds.Right, ABounds.Bottom, - TdxSkinElementPartBounds(AParts)[2, 2], - TdxSkinElementPartVisibility(AVisibility)[2, 2]); -end; - -function TdxSkinImage.GetEmpty: Boolean; -begin - Result := (FSourceName = '') and Texture.Empty; -end; - -function TdxSkinImage.GetImageCount: Integer; -begin - Result := Owner.ImageCount; -end; - -function TdxSkinImage.GetIsGradientParamsAssigned: Boolean; -begin - Result := GradientBeginColor <> clNone; -end; - -function TdxSkinImage.GetName: string; -begin - if Empty then - Result := '' - else - Result := Owner.ExpandName(Self); -end; - -function TdxSkinImage.GetPartSizing(Col, Row: Integer): Boolean; -begin - Result := FPartSizing[Col, Row]; -end; - -function TdxSkinImage.GetPartVisible(Col, Row: Integer): Boolean; -begin - Result := FPartsVisibility[Col, Row]; -end; - -function TdxSkinImage.GetSize: TSize; -begin - CheckInfo; - Result := FSize; -end; - -function TdxSkinImage.GetSourceName: string; -begin - Result := FSourceName; - if (Result = '') and not Empty then - Result := Owner.Path + Name; -end; - -function TdxSkinImage.GetStateBounds( - AImageIndex: Integer; AState: TdxSkinElementState): TRect; -begin - CheckInfo; - Result := FStateBounds[AState]; - if AImageIndex > 0 then - begin - if ImageLayout = ilHorizontal then - OffsetRect(Result, StateCount * AImageIndex * Size.cx, 0) - else - OffsetRect(Result, 0, StateCount * AImageIndex * Size.cy) - end; -end; - -function TdxSkinImage.GetStateCount: Integer; -begin - CheckInfo; - Result := FStateCount; -end; - -procedure TdxSkinImage.ReadData(AStream: TStream); -var - APos, ASize: Integer; -begin - AStream.Read(FMargins.Data^, SizeOf(TRect)); - AStream.Read(FImageLayout, SizeOf(TdxSkinImageLayout)); - AStream.Read(FStates, SizeOf(TdxSkinElementStates)); - AStream.Read(FStretch, SizeOf(FStretch)); - if Owner.Group.Skin.Version >= 1.02 then - begin - AStream.Read(FGradientBeginColor, SizeOf(FGradientBeginColor)); - AStream.Read(FGradientEndColor, SizeOf(FGradientEndColor)); - AStream.Read(FGradient, SizeOf(FGradient)); - end; - AStream.Read(ASize, SizeOf(Integer)); - APos := AStream.Position; - if ASize > 0 then - begin - PartStream.InitializeEx(AStream, AStream.Position, AStream.Position + ASize); - Texture.LoadFromStream(PartStream); - end; - AStream.Position := APos + ASize; - IsDirty := True; -end; - -procedure TdxSkinImage.WriteData(AStream: TStream); -var - ASize: Integer; - APNGStream: TMemoryStream; -begin - AStream.Write(Margins.Data^, SizeOf(TRect)); - AStream.Write(FImageLayout, SizeOf(TdxSkinImageLayout)); - AStream.Write(FStates, SizeOf(TdxSkinElementStates)); - AStream.Write(FStretch, SizeOf(FStretch)); - AStream.Write(FGradientBeginColor, SizeOf(FGradientBeginColor)); - AStream.Write(FGradientEndColor, SizeOf(FGradientEndColor)); - AStream.Write(FGradient, SizeOf(FGradient)); - APNGStream := TMemoryStream.Create; - try - if not Empty then - Texture.SaveToStream(APNGStream); - ASize := APNGStream.Size; - AStream.Write(ASize, SizeOf(Integer)); - if ASize > 0 then - begin - APNGStream.Position := 0; - AStream.Write(APNGStream.Memory^, APNGStream.Size); - end; - finally - APNGStream.Free; - end; -end; - -procedure TdxSkinImage.SetGradientBeginColor(AValue: TColor); -begin - if AValue <> FGradientBeginColor then - begin - FGradientBeginColor := AValue; - DoChange; - end; -end; - -procedure TdxSkinImage.SetGradientEndColor(AValue: TColor); -begin - if AValue <> GradientEndColor then - begin - FGradientEndColor := AValue; - DoChange; - end; -end; - -procedure TdxSkinImage.SetGradientMode(AValue: TdxSkinGradientMode); -begin - if AValue <> FGradient then - begin - FGradient := AValue; - DoChange; - end; -end; - -procedure TdxSkinImage.SetImageLayout(AValue: TdxSkinImageLayout); -begin - if ImageLayout <> AValue then - begin - FImageLayout := AValue; - DoChange; - end; -end; - -procedure TdxSkinImage.SetMargins(AValue: TcxRect); -begin - FMargins.Assign(AValue); -end; - -procedure TdxSkinImage.SetStates(AValue: TdxSkinElementStates); -begin - if FStates <> AValue then - begin - FStates := AValue; - DoChange; - end; -end; - -procedure TdxSkinImage.SetStretch(AValue: TdxSkinStretchMode); -begin - if Stretch <> AValue then - begin - FStretch := AValue; - DoChange; - end; -end; - -procedure TdxSkinImage.SetTransparentColor(AValue: TColor); -begin - if AValue <> TransparentColor then - begin - FTransparentColor := AValue; - DoChange; - end; -end; - -procedure TdxSkinImage.SetName(const AValue: string); -begin - LoadFromFile(AValue); -end; - -procedure TdxSkinImage.SubItemHandler(Sender: TObject); -begin - DoChange; -end; - -{ TdxSkinCustomPersistentObject } - -constructor TdxSkinCustomPersistentObject.Create( - AOwner: TPersistent; const AName: string); -begin - FName := AName; - FOwner := AOwner; -end; - -function TdxSkinCustomPersistentObject.Clone: TdxSkinCustomPersistentObject; -var - AClass: TdxSkinCustomPersistentObjectClass; -begin - AClass := TdxSkinCustomPersistentObjectClass(ClassType); - Result := AClass.Create(nil, Name); - Result.Assign(Self); -end; - -procedure TdxSkinCustomPersistentObject.DoChange; -begin - if Assigned(FOnChange) then - FOnChange(Self); -end; - -function TdxSkinCustomPersistentObject.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -{ TdxSkinProperty } - -class procedure TdxSkinProperty.Register; -begin - RegisteredPropertyTypes.Add(Self); - RegisterClass(Self); -end; - -class procedure TdxSkinProperty.Unregister; -begin - UnRegisterClass(Self); - RegisteredPropertyTypes.Remove(Self); -end; - -class function TdxSkinProperty.Description: string; -begin - Result := StringReplace(ClassName, - 'TdxSkin', '', [rfReplaceAll, rfIgnoreCase]); - Result := StringReplace(Result, 'Property', '', [rfReplaceAll, rfIgnoreCase]); -end; - -function TdxSkinProperty.Compare(AProperty: TdxSkinProperty): Boolean; -begin - Result := False; -end; - -procedure TdxSkinProperty.ReadData(Stream: TStream); -begin -end; - -procedure TdxSkinProperty.ReadFromStream(Stream: TStream); -begin - Name := ReadStringFromStream(Stream); - ReadData(Stream); -end; - -procedure TdxSkinProperty.WriteData(Stream: TStream); -begin -end; - -procedure TdxSkinProperty.WriteToStream(Stream: TStream); -begin - WriteStringToStream(Stream, ClassName); - WriteStringToStream(Stream, Name); - WriteData(Stream); -end; - -{ TdxSkinIntegerProperty } - -procedure TdxSkinIntegerProperty.Assign(Source: TPersistent); -begin - if Source is TdxSkinIntegerProperty then - Value := TdxSkinIntegerProperty(Source).Value - else - inherited Assign(Source); -end; - -function TdxSkinIntegerProperty.Compare(AProperty: TdxSkinProperty): Boolean; -begin - Result := (AProperty.Name = Name) and (AProperty is TdxSkinIntegerProperty) and - (TdxSkinIntegerProperty(AProperty).Value = Value); -end; - -procedure TdxSkinIntegerProperty.ReadData(Stream: TStream); -begin - Stream.ReadBuffer(FValue, SizeOf(FValue)); -end; - -procedure TdxSkinIntegerProperty.WriteData(Stream: TStream); -begin - Stream.WriteBuffer(FValue, SizeOf(FValue)); -end; - -procedure TdxSkinIntegerProperty.SetValue(AValue: Integer); -begin - if AValue <> FValue then - begin - FValue := AValue; - DoChange; - end; -end; - -{ TdxSkinBooleanProperty } - -procedure TdxSkinBooleanProperty.Assign(Source: TPersistent); -begin - if Source is TdxSkinBooleanProperty then - Value := TdxSkinBooleanProperty(Source).Value - else - inherited Assign(Source); -end; - -function TdxSkinBooleanProperty.Compare(AProperty: TdxSkinProperty): Boolean; -begin - Result := (AProperty.Name = Name) and (AProperty is TdxSkinBooleanProperty) and - (TdxSkinBooleanProperty(AProperty).Value = Value) -end; - -procedure TdxSkinBooleanProperty.ReadData(Stream: TStream); -begin - Stream.ReadBuffer(FValue, SizeOf(FValue)); -end; - -procedure TdxSkinBooleanProperty.WriteData(Stream: TStream); -begin - Stream.WriteBuffer(FValue, SizeOf(FValue)); -end; - -procedure TdxSkinBooleanProperty.SetValue(AValue: Boolean); -begin - if AValue <> FValue then - begin - FValue := AValue; - DoChange; - end; -end; - -{ TdxSkinColor } - -constructor TdxSkinColor.Create(AOwner: TPersistent; const AName: string); -begin - inherited Create(AOwner, AName); - FValue := clDefault; -end; - -procedure TdxSkinColor.Assign(Source: TPersistent); -begin - if Source is TdxSkinColor then - Value := TdxSkinColor(Source).Value - else - inherited Assign(Source); -end; - -function TdxSkinColor.Compare(AProperty: TdxSkinProperty): Boolean; -begin - Result := (AProperty.Name = Name) and (AProperty is TdxSkinColor) and - (TdxSkinColor(AProperty).Value = Value); -end; - -procedure TdxSkinColor.ReadData(Stream: TStream); -begin - Stream.ReadBuffer(FValue, SizeOf(FValue)); -end; - -procedure TdxSkinColor.WriteData(Stream: TStream); -begin - Stream.WriteBuffer(FValue, SizeOf(FValue)); -end; - -procedure TdxSkinColor.SetValue(AValue: TColor); -begin - if AValue <> FValue then - begin - FValue := AValue; - DoChange; - end; -end; - -{ TdxSkinRectProperty } - -constructor TdxSkinRectProperty.Create(AOwner: TPersistent; const AName: string); -begin - inherited Create(AOwner, AName); - FValue := TcxRect.Create(Self); - FValue.OnChange := InternalHandler; -end; - -destructor TdxSkinRectProperty.Destroy; -begin - FValue.Free; - inherited Destroy; -end; - -procedure TdxSkinRectProperty.Assign(Source: TPersistent); -begin - if Source is TdxSkinRectProperty then - Value := TdxSkinRectProperty(Source).Value - else - inherited Assign(Source); -end; - -function TdxSkinRectProperty.Compare(AProperty: TdxSkinProperty): Boolean; -begin - Result := (AProperty.Name = Name) and (AProperty is TdxSkinRectProperty) and - TdxSkinRectProperty(AProperty).Value.IsEqual(Value); -end; - -procedure TdxSkinRectProperty.ReadData(Stream: TStream); -var - ARect: TRect; -begin - Stream.ReadBuffer(ARect, SizeOf(TRect)); - FValue.Rect := ARect; -end; - -procedure TdxSkinRectProperty.WriteData(Stream: TStream); -begin - Stream.WriteBuffer(FValue.Rect, SizeOf(TRect)); -end; - -function TdxSkinRectProperty.GetValueByIndex(Index: Integer): Integer; -begin - Result := FValue.GetValue(Index); -end; - -procedure TdxSkinRectProperty.SetValue(Value: TcxRect); -begin - FValue.Assign(Value); -end; - -procedure TdxSkinRectProperty.SetValueByIndex(Index, Value: Integer); -begin - FValue.SetValue(Index, Value); -end; - -procedure TdxSkinRectProperty.InternalHandler(Sender: TObject); -begin - DoChange; -end; - -{ TdxSkinSizeProperty } - -procedure TdxSkinSizeProperty.Assign(Source: TPersistent); -begin - if Source is TdxSkinSizeProperty then - Value := TdxSkinSizeProperty(Source).Value - else - inherited Assign(Source); -end; - -function TdxSkinSizeProperty.Compare(AProperty: TdxSkinProperty): Boolean; -begin - Result := (AProperty.Name = Name) and (AProperty is TdxSkinSizeProperty); - if Result then - with TdxSkinSizeProperty(AProperty) do - Result := ((Self.Value.cx) = Value.cx) and ((Self.Value.cy) = Value.cy); -end; - -function TdxSkinSizeProperty.GetValueByIndex(Index: Integer): Integer; -begin - if Index = 0 then - Result := FValue.cx - else - Result := FValue.cy -end; - -procedure TdxSkinSizeProperty.SetValueByIndex(Index, Value: Integer); -var - AValue: TSize; -begin - AValue := FValue; - if Index = 0 then - AValue.cx := Value - else - AValue.cy := Value; - SetValue(AValue); -end; - -procedure TdxSkinSizeProperty.ReadData(Stream: TStream); -begin - Stream.ReadBuffer(FValue, SizeOf(FValue)); -end; - -procedure TdxSkinSizeProperty.WriteData(Stream: TStream); -begin - Stream.WriteBuffer(FValue, SizeOf(FValue)); -end; - -procedure TdxSkinSizeProperty.SetValue(const Value: TSize); -begin - if (Value.cx <> FValue.cx) or (Value.cy <> FValue.cy) then - begin - FValue := Value; - DoChange; - end; -end; - -{ TdxSkinBorder } - -constructor TdxSkinBorder.Create(AOwner: TPersistent; const AName: string); -begin - inherited Create(AOwner, AName); - FColor := clNone; - FThin := 1; -end; - -procedure TdxSkinBorder.Assign(Source: TPersistent); -var - ASource: TdxSkinBorder; -begin - if not (Source is TdxSkinBorder) then Exit; - ASource := TdxSkinBorder(Source); - Color := ASource.Color; - FKind := ASource.Kind; - Thin := ASource.Thin; -end; - -function TdxSkinBorder.Compare(AProperty: TdxSkinProperty): Boolean; -begin - Result := (AProperty is TdxSkinBorder); - if Result then - with TdxSkinBorder(AProperty) do - begin - Result := (Color = Self.Color) and (Thin = Self.Thin) and - (Kind = Self.Kind); - end; -end; - -procedure TdxSkinBorder.Draw(DC: HDC; const ABounds: TRect); -var - ACanvas: TdxSkinCanvas; -begin - if Color = clNone then Exit; - ACanvas := TdxSkinCanvas.Create; - try - ACanvas.BeginPaint(DC, ABounds); - DrawEx(ACanvas, ABounds); - ACanvas.EndPaint; - finally - ACanvas.Free; - end; -end; - -procedure TdxSkinBorder.DrawEx(ACanvas: TdxSkinCanvas; const ABounds: TRect); -begin - if Color = clNone then Exit; - with ABounds do - case Kind of - bLeft: - ACanvas.FillRectByColor(Rect(Left, Top, Left + Thin, Bottom), Color); - bTop: - ACanvas.FillRectByColor(Rect(Left, Top, Right, Top + Thin), Color); - bRight: - ACanvas.FillRectByColor(Rect(Right - Thin, Top, Right, Bottom), Color); - bBottom: - ACanvas.FillRectByColor(Rect(Left, Bottom - Thin, Right, Bottom), Color); - end; -end; - -procedure TdxSkinBorder.ReadData(Stream: TStream); -var - AColor: TColor; -begin - Stream.Read(AColor, SizeOf(FColor)); - Stream.Read(FThin, SizeOf(FThin)); - Color := AColor; -end; - -procedure TdxSkinBorder.WriteData(Stream: TStream); -begin - Stream.Write(FColor, SizeOf(FColor)); - Stream.Write(FThin, SizeOf(FThin)); -end; - -procedure TdxSkinBorder.SetColor(AValue: TColor); -begin - if AValue <> FColor then - begin - FColor := AValue; - DoChange; - end; -end; - -procedure TdxSkinBorder.SetThin(AValue: Integer); -begin - if AValue <> FThin then - begin - FThin := AValue; - DoChange; - end; -end; - -{ TdxSkinBorders } - -constructor TdxSkinBorders.Create(AOwner: TPersistent; const AName: string); -begin - inherited Create(AOwner, AName); - CreateBorders; -end; - -destructor TdxSkinBorders.Destroy; -begin - DeleteBorders; - inherited Destroy; -end; - -procedure TdxSkinBorders.Assign(ASource: TPersistent); -var - ABorder: TcxBorder; -begin - if ASource is TdxSkinBorders then - begin - for ABorder := Low(TcxBorder) to High(TcxBorder) do - FBorders[ABorder].Assign(TdxSkinBorders(ASource).FBorders[ABorder]) - end - else - inherited Assign(ASource); -end; - -function TdxSkinBorders.Compare(AProperty: TdxSkinProperty): Boolean; -var - ASide: TcxBorder; -begin - Result := (AProperty is TdxSkinBorders); - if Result then - begin - for ASide := Low(TcxBorder) to High(TcxBorder) do - Result := Items[ASide].Compare(TdxSkinBorders(AProperty).Items[ASide]); - end; -end; - -procedure TdxSkinBorders.Draw(ACanvas: TdxSkinCanvas; const ABounds: TRect); -var - ASide: TcxBorder; -begin - for ASide := Low(TcxBorder) to High(TcxBorder) do - Items[ASide].DrawEx(ACanvas, ABounds); -end; - -procedure TdxSkinBorders.CreateBorders; -var - ASide: TcxBorder; -const - BorderNames: array[TcxBorder] of string = - (sdxLeft, sdxTop, sdxRight, sdxBottom); -begin - for ASide := bLeft to bBottom do - begin - FBorders[ASide] := TdxSkinBorder.Create(Self, BorderNames[ASide]); - FBorders[ASide].FKind := ASide; - FBorders[ASide].OnChange := SubItemHandler; - end; -end; - -procedure TdxSkinBorders.DeleteBorders; -var - ASide: TcxBorder; -begin - for ASide := bLeft to bBottom do - FBorders[ASide].Free; -end; - -procedure TdxSkinBorders.SubItemHandler(Sender: TObject); -begin - DoChange; -end; - -function TdxSkinBorders.GetBorder(ABorder: TcxBorder): TdxSkinBorder; -begin - Result := FBorders[ABorder]; -end; - -function TdxSkinBorders.GetBorderByIndex(Index: Integer): TdxSkinBorder; -begin - Result := FBorders[TcxBorder(Index)]; -end; - -procedure TdxSkinBorders.SetBorderByIndex(Index: Integer; AValue: TdxSkinBorder); -begin - FBorders[TcxBorder(Index)].Assign(AValue); -end; - -{ TdxSkinStringProperty } - -procedure TdxSkinStringProperty.Assign(Source: TPersistent); -begin - if Source is TdxSkinStringProperty then - Value := TdxSkinStringProperty(Source).Value - else - inherited Assign(Source); -end; - -function TdxSkinStringProperty.Compare(AProperty: TdxSkinProperty): Boolean; -begin - Result := (AProperty.Name = Name) and (AProperty is TdxSkinStringProperty) and - (AnsiCompareStr(TdxSkinStringProperty(AProperty).Value, Value) = 0); -end; - -procedure TdxSkinStringProperty.ReadData(Stream: TStream); -begin - Value := ReadStringFromStream(Stream); -end; - -procedure TdxSkinStringProperty.WriteData(Stream: TStream); -begin - WriteStringToStream(Stream, Value); -end; - -procedure TdxSkinStringProperty.SetValue(const AValue: string); -begin - if AValue <> FValue then - begin - FValue := AValue; - DoChange; - end; -end; - -{ TdxSkinControlGroup } - -constructor TdxSkinControlGroup.Create( - AOwner: TPersistent; const AName: string); -begin - inherited Create(AOwner, AName); - FElements := TcxObjectList.Create; -end; - -destructor TdxSkinControlGroup.Destroy; -begin - FElements.Free; - inherited Destroy; -end; - -procedure TdxSkinControlGroup.Assign(Source: TPersistent); -var - I: Integer; - ASource: TdxSkinControlGroup; -begin - BeginUpdate; - try - if Source is TdxSkinControlGroup then - begin - ASource := TdxSkinControlGroup(Source); - for I := 0 to ASource.Count - 1 do - AddSubItem(ASource.Elements[I].Clone, FElements); - end; - inherited Assign(Source); - finally - EndUpdate; - end; -end; - -function TdxSkinControlGroup.AddElement(const AName: string): TdxSkinElement; -begin - Result := AddElementEx(AName, TdxSkinElement); -end; - -function TdxSkinControlGroup.AddElementEx( - const AName: string; AElementClass: TdxSkinElementClass): TdxSkinElement; -begin - Result := AElementClass.Create(Self, AName); - AddSubItem(Result, FElements); -end; - -procedure TdxSkinControlGroup.Clear; -begin - FElements.Clear; - FProperties.Clear; -end; - -procedure TdxSkinControlGroup.ClearModified; -var - I: Integer; -begin - FModified := False; - for I := 0 to Count - 1 do - Elements[I].Modified := False; -end; - -procedure TdxSkinControlGroup.Delete(AIndex: Integer); -begin - FElements[AIndex].Free; - FElements.Delete(AIndex); - Changed; -end; - -procedure TdxSkinControlGroup.RemoveElement(AElement: TdxSkinElement); -var - I: Integer; -begin - for I := 0 to Count - 1 do - if AElement = Elements[I] then - begin - Delete(I); - Break; - end; -end; - -function TdxSkinControlGroup.GetElementByName( - const AName: string): TdxSkinElement; -begin - Sort; - Result := TdxSkinElement(FindItemByName(FElements, AName)); -end; - -procedure TdxSkinControlGroup.DoSort; -begin - inherited DoSort; - FElements.Sort(TListSortCompare(@dxCompareByName)); -end; - -procedure TdxSkinControlGroup.ReadData( - AStream: TStream; const AVersion: TdxSkinVersion); -var - AIndex: Integer; -begin - for AIndex := 0 to ReadInteger(AStream) - 1 do - AddElement(ReadStringFromStream(AStream)).ReadData(AStream, AVersion); - if AVersion < 0.91 then Exit; - ReadProperties(AStream); - Changed; -end; - -procedure TdxSkinControlGroup.WriteData(AStream: TStream); -var - AIndex: Integer; - AElement: TdxSkinElement; -begin - WriteStringToStream(AStream, Name); - WriteInteger(AStream, Count); - for AIndex := 0 to Count - 1 do - begin - AElement := Elements[AIndex]; - WriteStringToStream(AStream, AElement.Name); - AElement.WriteData(AStream, dxSkinStreamVersion); - end; - WriteProperties(AStream); -end; - -function TdxSkinControlGroup.GetCount: Integer; -begin - Result := FElements.Count; -end; - -function TdxSkinControlGroup.GetElement(AIndex: Integer): TdxSkinElement; -begin - Result := FElements[AIndex] as TdxSkinElement; -end; - -function TdxSkinControlGroup.GetSkin: TdxSkin; -begin - Result := GetOwner as TdxSkin; -end; - -procedure TdxSkinControlGroup.SetElement(AIndex: Integer; AElement: TdxSkinElement); -begin - Elements[AIndex].Assign(AElement); -end; - -{ TdxSkinElement } - -constructor TdxSkinElement.Create( - AOwner: TPersistent; const AName: string); -begin - inherited Create(AOwner, AName); - FCanvas := TdxSkinCanvas.Create; - FColor := clDefault; - FImageCount := 1; - FImage := TdxSkinImage.Create(Self); - FImage.OnChange := SubItemHandler; - FContentOffset := TcxRect.Create(Self); - FContentOffset.OnChange := SubItemHandler; - FGlyph := TdxSkinImage.Create(Self); - FGlyph.OnChange := SubItemHandler; - FAlpha := 255; - FBorders := TdxSkinBorders.Create(Self, sdxBorders); - FBorders.OnChange := SubItemHandler; - FTextColor := clDefault; - FMinSize := TcxSize.Create(Self); - FMinSize.OnChange := SubItemHandler; -end; - -destructor TdxSkinElement.Destroy; -begin - FCanvas.Free; - FMinSize.Free; - FContentOffset.Free; - FImage.Free; - FGlyph.Free; - FBorders.Free; - if FBrush <> nil then - GdipDeleteBrush(FBrush); - inherited Destroy; -end; - -procedure TdxSkinElement.Assign(Source: TPersistent); -var - ASource: TdxSkinElement; -begin - if Source is TdxSkinElement then - begin - ASource := TdxSkinElement(Source); - Image.Assign(ASource.Image); - Glyph.Assign(ASource.Glyph); - Color := ASource.Color; - Alpha := ASource.Alpha; - ContentOffset.Assign(ASource.ContentOffset); - ImageCount := ASource.ImageCount; - Borders := ASource.Borders; - MinSize.Assign(ASource.MinSize); - TextColor := ASource.TextColor; - end; - inherited Assign(Source); -end; - -function TdxSkinElement.Compare(AElement: TdxSkinElement): Boolean; -begin - Result := (AElement.Name = Name) and (Color = AElement.Color) and - (ImageCount = AElement.ImageCount) and (Alpha = AElement.Alpha) and - (TextColor = AElement.TextColor) and MinSize.IsEqual(AElement.MinSize) and - (ContentOffset.IsEqual(AElement.ContentOffset.Rect)) and - Borders.Compare(AElement.Borders) and CompareProperties(AElement) and - Image.Compare(AElement.Image) and Glyph.Compare(AElement.Glyph); -end; - -function TdxSkinElement.GetTextColor(AState: TcxButtonState): TColor; -const - SubPropertyName: array[TcxButtonState] of string = - ('', '', sdxTextColorHot, sdxTextColorPressed, sdxTextColorDisabled); -var - AColorProperty: TdxSkinColor; -begin - Result := clDefault; - if SubPropertyName[AState] <> '' then - begin - AColorProperty := TdxSkinColor(GetPropertyByName(SubPropertyName[AState])); - if Assigned(AColorProperty) then - Result := AColorProperty.Value; - end; - if Result = clDefault then - Result := TextColor; -end; - -procedure TdxSkinElement.Draw(DC: HDC; const ARect: TRect; - AImageIndex: Integer = 0; AState: TdxSkinElementState = esNormal); -begin - if Canvas.IsRectVisible(DC, ARect) then - begin - Canvas.BeginPaint(DC, ARect); - try - InternalDraw(Canvas, ARect, AImageIndex, AState); - finally - Canvas.EndPaint; - end; - end; -end; - -procedure TdxSkinElement.SetStateMapping(AStateOrder: array of TdxSkinElementState); -begin - FImage.SetStateMapping(AStateOrder); - FGlyph.SetStateMapping(AStateOrder); -end; - -function TdxSkinElement.CompareProperties(AElement: TdxSkinElement): Boolean; -var - I: Integer; -begin - Result := AElement.PropertyCount = PropertyCount; - if Result then - for I := 0 to PropertyCount - 1 do - begin - Result := AElement.Properties[I].Compare(Properties[I]); - if not Result then - Break; - end; -end; - -function TdxSkinElement.ExpandName(ABitmap: TdxSkinImage): string; -begin - Result := Name + BitmapNameSuffixes[ABitmap = Image] -end; - -procedure TdxSkinElement.FillBackgroundByColor(ACanvas: TdxSkinCanvas; - const ARect: TRect); -begin - if IsColorAssigned and (Image.Empty or (Image.Stretch = smNoResize) or IsAlphaUsed) then - begin - if Alpha = 255 then - ACanvas.FillRectByColor(ARect, Color) - else - GdipFillRectangleI(ACanvas.Graphics, Brush, ARect.Left, ARect.Top, - ARect.Right - ARect.Left, ARect.Bottom - ARect.Top); - end; -end; - -procedure TdxSkinElement.InternalDraw(ACanvas: TdxSkinCanvas; - const ARect: TRect; AImageIndex: Integer = 0; - AState: TdxSkinElementState = esNormal); -begin - FillBackgroundByColor(ACanvas, ARect); - Image.DrawEx(ACanvas, ARect, AImageIndex, AState); - Borders.Draw(ACanvas, ARect); - Glyph.DrawEx(ACanvas, cxRectContent(ARect, ContentOffset.Rect), AImageIndex, AState); -end; - -procedure TdxSkinElement.ReadData(AStream: TStream; AVersion: TdxSkinVersion); -var - ASide: TcxBorder; -begin - AStream.Read(FColor, SizeOf(TColor)); - AStream.Read(FAlpha, SizeOf(FAlpha)); - AStream.Read(FImageCount, SizeOf(Integer)); - AStream.Read(ContentOffset.Data^, SizeOf(TRect)); - Glyph.ReadData(AStream); - Image.ReadData(AStream); - for ASide := Low(TcxBorder) to High(TcxBorder) do - begin - if Group.Skin.Version >= 0.92 then - ReadStringFromStream(AStream); - Borders[ASide].ReadFromStream(AStream); - end; - Color := FColor; - if Group.Skin.Version >= 0.93 then - AStream.Read(FTextColor, SizeOf(TColor)); - if Group.Skin.Version >= 0.94 then - AStream.Read(FMinSize.Data^, SizeOf(TSize)); - if Group.Skin.Version >= 0.95 then - ReadProperties(AStream); -end; - -procedure TdxSkinElement.WriteData(AStream: TStream; AVersion: TdxSkinVersion); -var - ASide: TcxBorder; -begin - AStream.Write(FColor, SizeOf(TColor)); - AStream.Write(FAlpha, SizeOf(Alpha)); - AStream.Write(FImageCount, SizeOf(Integer)); - AStream.Write(ContentOffset.Data^, SizeOf(TRect)); - Glyph.WriteData(AStream); - Image.WriteData(AStream); - for ASide := bLeft to bBottom do - Borders[ASide].WriteToStream(AStream); - AStream.Write(FTextColor, SizeOf(TColor)); - AStream.Write(FMinSize.Data^, SizeOf(TSize)); - WriteProperties(AStream); -end; - -function TdxSkinElement.GetGroup: TdxSkinControlGroup; -begin - Result := GetOwner as TdxSkinControlGroup; -end; - -function TdxSkinElement.GetIsAlphaUsed: Boolean; -begin - if Image.Empty then - Result := (Alpha < 255) or (Color = clNone) - else - Result := Image.Texture.IsAlphaUsed; -end; - -function TdxSkinElement.GetPath: string; -begin - Result := Group.Name + PathDelim; -end; - -function TdxSkinElement.GetSize: TSize; -begin - Result := Image.Size; -end; - -procedure TdxSkinElement.SetAlpha(AValue: Byte); -begin - if Alpha <> AValue then - begin - FAlpha := AValue; - Color := Color; - end; -end; - -procedure TdxSkinElement.SetBorders(AValue: TdxSkinBorders); -begin - FBorders.Assign(AValue); -end; - -procedure TdxSkinElement.SetColor(AValue: TColor); -begin - FColor := AValue; - FIsColorAssigned := (Color <> clDefault) and (Color <> clNone); - if IsColorAssigned then - begin - if FBrush <> nil then - GdipSetSolidFillColor(FBrush, dxGpColorToARGB(AValue, Alpha)) - else - GdipCreateSolidFill(dxGpColorToARGB(AValue, Alpha), FBrush); - end; - DoChange; -end; - -procedure TdxSkinElement.SetContentOffset(AValue: TcxRect); -begin - ContentOffset.Assign(AValue); -end; - -procedure TdxSkinElement.SetGlyph(AValue: TdxSkinImage); -begin - Glyph.Assign(AValue); -end; - -procedure TdxSkinElement.SetImage(AValue: TdxSkinImage); -begin - Image.Assign(AValue); -end; - -procedure TdxSkinElement.SetImageCount(AValue: Integer); -begin - if AValue < 1 then - AValue := 1; - if AValue <> FImageCount then - begin - FImageCount := AValue; - Image.IsDirty := True; - Glyph.IsDirty := True; - DoChange; - end; -end; - -procedure TdxSkinElement.SetMinSize(AValue: TcxSize); -begin - FMinSize.Assign(AValue); -end; - -procedure TdxSkinElement.SetTextColor(AValue: TColor); -begin - FTextColor := AValue; - DoChange; -end; - -{ TdxSkinEmptyElement } - -procedure TdxSkinEmptyElement.Draw(DC: HDC; const ARect: TRect; - AImageIndex: Integer = 0; AState: TdxSkinElementState = esNormal); -var - RedBrush: HBRUSH; -begin - FillRect(DC, ARect, GetStockObject(WHITE_BRUSH)); - RedBrush := CreateSolidBrush(255); - FrameRect(DC, ARect, RedBrush); - DeleteObject(RedBrush); -end; - -{ TdxSkinPartStream } - -constructor TdxSkinPartStream.Create(ASource: TStream); -begin - FSource := ASource; -end; - -{$IFDEF DELPHI7} - -function TdxSkinPartStream.GetSize: Int64; -begin - Result := FPosEnd - FPosStart; -end; - -{$ENDIF} - -procedure TdxSkinPartStream.Initialize(const APosStart, APosEnd: Longint); -begin - FPosStart := APosStart; - FPosEnd := APosEnd; -end; - -procedure TdxSkinPartStream.InitializeEx( - ASource: TStream; const APosStart, APosEnd: Longint); -begin - FSource := ASource; - Initialize(APosStart, APosEnd); -end; - -function TdxSkinPartStream.Read(var Buffer; Count: Longint): Longint; -begin - Result := Source.Read(Buffer, Count); -end; - -function TdxSkinPartStream.Seek(Offset: Longint; Origin: Word): Longint; -var - ANewPos: Longint; -begin - ANewPos := Source.Position + Offset; - case Origin of - soFromBeginning: - ANewPos := PosStart + Offset; - soFromEnd: - ANewPos := PosEnd + Offset; - end; - Source.Position := Min(Max(PosStart, ANewPos), PosEnd); - Result := Source.Position - PosStart; -end; - -function TdxSkinPartStream.Write(const Buffer; Count: Longint): Longint; -begin - Result := Source.Write(Buffer, Count); - FPosEnd := Source.Position; -end; - -{ TdxSkinCanvas } - -function TdxSkinCanvas.GetInterpolationMode: Integer; -begin - GdipCheck(GdipGetInterpolationMode(Graphics, Result)); -end; - -procedure TdxSkinCanvas.SetInterpolationMode(AValue: Integer); -begin - GdipCheck(GdipSetInterpolationMode(Graphics, AValue)); -end; - -function TdxSkinCanvas.IsDoubleBufferNeeded(DC: HDC): Boolean; -begin - Result := (GetDeviceCaps(DC, BITSPIXEL) <= 8) or (GetDeviceCaps(DC, NUMCOLORS) > 1); -end; - -function TdxSkinCanvas.IsRectVisible(DC: HDC; const R: TRect): Boolean; -begin - Result := not cxRectIsEmpty(R) and RectVisible(DC, R); -end; - -procedure TdxSkinCanvas.BeginPaint(DC: HDC; const R: TRect); -var - ATempDC: HDC; -begin - FRect := R; - ATempDC := DC; - FSourceDC := DC; - if IsDoubleBufferNeeded(DC) then - begin - FBuffer := TcxBitmap.CreateSize(R, pf32bit); - ATempDC := FBuffer.Canvas.Handle; - cxBitBlt(ATempDC, DC, FBuffer.ClientRect, R.TopLeft, SRCCOPY); - SetWindowOrgEx(ATempDC, R.Left, R.Top, nil); - end; - GdipCheck(GdipCreateFromHDC(ATempDC, FGraphics)); -end; - -procedure TdxSkinCanvas.BeginPaintEx(Graphics: GpGraphics; const R: TRect); -begin - FRect := R; - FSourceDC := 0; - FGraphics := Graphics; -end; - -procedure TdxSkinCanvas.EndPaint; -var - ACanvas: TCanvas; - ASaveIndex: Integer; -begin - GdipCheck(GdipDeleteGraphics(FGraphics)); - if FBuffer <> nil then - begin - FBuffer.cxCanvas.WindowOrg := cxNullPoint; - // todo: using TCanvas for valid bitmap drawing to 256 colors DC - ACanvas := TCanvas.Create; - try - ASaveIndex := SaveDC(FSourceDC); - ACanvas.Handle := FSourceDC; - ACanvas.Draw(FRect.Left, FRect.Top, FBuffer); - ACanvas.Handle := 0; - RestoreDC(FSourceDC, ASaveIndex); - finally - ACanvas.Free; - end; - FreeAndNil(FBuffer); - end; -end; - -procedure TdxSkinCanvas.FillRectByColor(const R: TRect; AColor: TColor); -var - ABrush: HBRUSH; - DC: HDC; -begin - ABrush := CreateSolidBrush(ColorToRGB(AColor)); - GdipCheck(GdipGetDC(Graphics, DC)); - FillRect(DC, R, ABrush); - GdipCheck(GdipReleaseDC(Graphics, DC)); - DeleteObject(ABrush); -end; - -procedure TdxSkinCanvas.FillRectByGradient(const R: TRect; AColor1: TColor; - AColor2: TColor; AMode: TdxSkinGradientMode); -const - GradientModeFlags: array[Boolean] of TdxGPLinearGradientMode = ( - LinearGradientModeBackwardDiagonal, LinearGradientModeForwardDiagonal - ); -var - DC: HDC; -begin - if (AColor1 = AColor2) or (AColor2 = clNone) or (AColor2 = clDefault) then - FillRectByColor(R, AColor1) - else - if AMode in [gmVertical, gmHorizontal] then - begin - GdipCheck(GdipGetDC(Graphics, DC)); - FillGradientRect(DC, R, AColor1, AColor2, AMode = gmHorizontal); - GdipCheck(GdipReleaseDC(Graphics, DC)); - end - else - dxGpFillRectByGradient(Graphics, R, - dxGpColorToARGB(AColor1), dxGpColorToARGB(AColor2), - GradientModeFlags[AMode = gmForwardDiagonal]); -end; - -procedure TdxSkinCanvas.DrawImage(AImage: TdxPNGImage; const ADest, ASource: TRect); -var - AOldIntpMode: Integer; -begin - AOldIntpMode := InterpolationMode; - try - InterpolationMode := InterpolationModeNearestNeighbor; - StretchDrawImage(AImage, ADest, ASource); - finally - InterpolationMode := AOldIntpMode; - end; -end; - -procedure TdxSkinCanvas.StretchDrawImage(AImage: TdxPNGImage; const ADest, ASource: TRect); -begin - AImage.StretchDrawEx(Graphics, ADest, ASource) -end; - -procedure TdxSkinCanvas.TileImage(AImage: TdxPNGImage; const ADest, ASource: TRect); -var - ALastCol, ALastRow, ACol, ARow: Integer; - AOldIntpMode: Integer; - ASize, ADestSize: TSize; - RDest, RSrc: TRect; -begin - if dxGpIsRectVisible(Graphics, ADest) then - begin - AOldIntpMode := InterpolationMode; - try - InterpolationMode := InterpolationModeNearestNeighbor; - ASize := cxSize(cxRectWidth(ASource), cxRectHeight(ASource)); - ADestSize := cxSize(cxRectWidth(ADest), cxRectHeight(ADest)); - ALastCol := ADestSize.cx div ASize.cx - Ord(ADestSize.cx mod ASize.cx = 0); - ALastRow := ADestSize.cy div ASize.cy - Ord(ADestSize.cy mod ASize.cy = 0); - for ARow := 0 to ALastRow do - begin - RSrc.Top := ASource.Top; - RSrc.Bottom := ASource.Bottom; - RDest.Top := ADest.Top + ASize.cy * ARow; - RDest.Bottom := RDest.Top + ASize.cy; - if RDest.Bottom > ADest.Bottom then - begin - Dec(RSrc.Bottom, RDest.Bottom - ADest.Bottom); - RDest.Bottom := ADest.Bottom; - end; - for ACol := 0 to ALastCol do - begin - RSrc.Left := ASource.Left; - RSrc.Right := ASource.Right; - RDest.Left := ADest.Left + ASize.cx * ACol; - RDest.Right := RDest.Left + ASize.cx; - if RDest.Right > ADest.Right then - begin - Dec(RSrc.Right, RDest.Right - ADest.Right); - RDest.Right := ADest.Right; - end; - AImage.DrawEx(Graphics, RDest, RSrc); - end; - end; - finally - InterpolationMode := AOldIntpMode; - end; - end; -end; - -{ TdxSkinElementCache } - -destructor TdxSkinElementCache.Destroy; -begin - FreeCache; - inherited Destroy; -end; - -procedure TdxSkinElementCache.FreeCache; -begin - if Assigned(FCache) then - begin - GdipCheck(GdipDisposeImage(FCache)); - FCache := nil; - end; - FreeAndNil(FCacheOpaque); -end; - -procedure TdxSkinElementCache.CheckCacheState(AElement: TdxSkinElement; - const R: TRect; AState: TdxSkinElementState = esNormal; - AImageIndex: Integer = 0); -begin - if (AElement <> Element) or (AState <> FState) or - (FImageIndex <> AImageIndex) or (cxRectWidth(R) <> cxRectWidth(FRect)) or - (cxRectHeight(R) <> cxRectHeight(FRect)) - then - begin - FElement := AElement; - FImageIndex := AImageIndex; - FRect := R; - FState := AState; - FIsAlphaBlendUsed := AElement.IsAlphaUsed; - FreeCache; - if not IsRectEmpty(R) then - begin - if IsAlphaBlendUsed then - InitCache(R) - else - InitOpaqueCache(R); - end; - end; -end; - -procedure TdxSkinElementCache.InitCache(R: TRect); -var - ACanvas: TdxSkinCanvas; - AGraphics: GpGraphics; -begin - ACanvas := TdxSkinCanvas.Create; - try - OffsetRect(R, -R.Left, -R.Top); - GdipCheck(GdipCreateBitmapFromScan0(R.Right, R.Bottom, 0, - PixelFormat32bppPARGB, nil, FCache)); - GdipCheck(GdipGetImageGraphicsContext(FCache, AGraphics)); - ACanvas.BeginPaintEx(AGraphics, R); - try - Element.InternalDraw(ACanvas, R, ImageIndex, State); - finally - ACanvas.EndPaint; - end; - finally - ACanvas.Free; - end; -end; - -procedure TdxSkinElementCache.InitOpaqueCache(R: TRect); -var - ACanvas: TdxSkinCanvas; -begin - ACanvas := TdxSkinCanvas.Create; - try - OffsetRect(R, -R.Left, -R.Top); - FCacheOpaque := TcxBitmap.CreateSize(R, pf32bit); - ACanvas.BeginPaint(FCacheOpaque.Canvas.Handle, R); - try - Element.InternalDraw(ACanvas, R, ImageIndex, State); - finally - ACanvas.EndPaint; - end; - finally - ACanvas.Free; - end; -end; - -procedure TdxSkinElementCache.Draw(DC: HDC; const R: TRect); -var - AGraphics: GpGraphics; -begin - if FCacheOpaque <> nil then - cxBitBlt(DC, FCacheOpaque.Canvas.Handle, R, cxNullPoint, SRCCOPY) - else - if FCache <> nil then - begin - GdipCheck(GdipCreateFromHDC(DC, AGraphics)); - GdipCheck(GdipDrawImageRectI(AGraphics, FCache, R.Left, R.Top, - R.Right - R.Left, R.Bottom - R.Top)); - GdipCheck(GdipDeleteGraphics(AGraphics)); - end; -end; - -procedure TdxSkinElementCache.DrawEx(DC: HDC; AElement: TdxSkinElement; - const R: TRect; AState: TdxSkinElementState = esNormal; AImageIndex: Integer = 0); -begin - CheckCacheState(AElement, R, AState, AImageIndex); - Draw(DC, R); -end; - -procedure TdxSkinElementCache.Flush; -begin - FElement := nil; - FRect := cxNullRect; - FreeCache; -end; - -{ TdxSkinElementCacheList } - -constructor TdxSkinElementCacheList.Create; -begin - inherited Create; - CacheListLimit := dxSkinElementCacheListLimit; -end; - -procedure TdxSkinElementCacheList.DrawElement(DC: HDC; AElement: TdxSkinElement; - const R: TRect; AState: TdxSkinElementState = esNormal; AImageIndex: Integer = 0); -var - AElementCache: TdxSkinElementCache; -begin - if not FindElementCache(AElement, R, AElementCache) then - begin - AElementCache := TdxSkinElementCache.Create; - Add(AElementCache); - CheckListLimits; - end; - AElementCache.DrawEx(DC, AElement, R, AState, AImageIndex); -end; - -procedure TdxSkinElementCacheList.CheckListLimits; -begin - if Count > CacheListLimit then - begin - ElementCache[0].Free; - Delete(0); - end; -end; - -procedure TdxSkinElementCacheList.Flush; -begin - Clear; -end; - -function TdxSkinElementCacheList.FindElementCache(AElement: TdxSkinElement; - const R: TRect; out AElementCache: TdxSkinElementCache): Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to Count - 1 do - begin - AElementCache := ElementCache[I]; - Result := (AElementCache.Element = AElement) and cxRectIsEqual(R, AElementCache.FRect); - if Result then - Break; - end; -end; - -function TdxSkinElementCacheList.GetElementCache(AIndex: Integer): TdxSkinElementCache; -begin - Result := TdxSkinElementCache(Items[AIndex]); -end; - -procedure RegisterAssistants; -begin - dxSkinEmptyElement := TdxSkinEmptyElement.Create(nil, ''); - RegisteredPropertyTypes := TList.Create; - PartStream := TdxSkinPartStream.Create(nil); - RegisterClasses([TdxSkinControlGroup, TdxSkinElement, TdxSkinImage]); - // register properties - TdxSkinIntegerProperty.Register; - TdxSkinColor.Register; - TdxSkinRectProperty.Register; - TdxSkinSizeProperty.Register; - TdxSkinBooleanProperty.Register; - TdxSkinStringProperty.Register; - // - CheckGdiPlus; - CheckPngCodec; -end; - -procedure UnregisterAssistants; -begin - RegisteredPropertyTypes.Free; - UnRegisterClasses([TdxSkinControlGroup, TdxSkinElement, TdxSkinImage]); - UnRegisterClasses([TdxSkinIntegerProperty, TdxSkinColor, TdxSkinRectProperty, - TdxSkinSizeProperty, TdxSkinBooleanProperty]); - PartStream.Free; - FreeAndNil(dxSkinEmptyElement); -end; - -initialization - dxUnitsLoader.AddUnit(@RegisterAssistants, @UnregisterAssistants); -finalization - dxUnitsLoader.RemoveUnit(@UnregisterAssistants); - -end. diff --git a/internal/x.46/ExpressLibrary/Sources/dxSkinsStrs.pas b/internal/x.46/ExpressLibrary/Sources/dxSkinsStrs.pas deleted file mode 100644 index faf1f661..00000000 --- a/internal/x.46/ExpressLibrary/Sources/dxSkinsStrs.pas +++ /dev/null @@ -1,592 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Express Cross Platform Library classes } -{ } -{ Copyright (c) 2000-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSCROSSPLATFORMLIBRARY AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM } -{ ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxSkinsStrs; - -interface - -uses - cxGraphics, cxLookAndFeelPainters; - -resourcestring - sdxSkinInvalidStreamFormat = 'Invalid stream format'; - sdxOldFormat = 'The skin data version is older than the current ExpressSkins Library version.' + #13#10 + - 'Skins cannot be loaded due to a version mismatch.'; - sdxSkinElementNotFound = 'Element "%s" not found'; - sdxSkinGroupNotFound = 'Group "%s" not found'; - sdxSkinParentNotFound = 'Parent skin "%s" not found'; - sdxSkinsRootFolder = 'My DX_VCL Skins'; - -const - // skins core - sdxResourceType = 'DXSKINS'; - sdxNavBarResourceType = 'DXNAVBARSKINS'; - - sdxAdditionProperties ='AdditionalProperties'; - sdxColors = 'Colors'; - sdxInteger = 'Int'; - sdxMinSize = 'MinSize'; - sdxProperties = 'Properties'; - sdxValue = 'Value'; - sdxOffset = 'Offset'; - - //colors - sdxSchedulerSeparatorColor = 'SeparatorColor'; - sdxSkinsBarDisabledTextColor = 'DisabledTextColor'; - sdxSkinsButtonDisabledTextColor = 'DisabledText'; - sdxSkinsContainerBorderColor = 'ContainerBorderColor'; - sdxSkinsContainerHighlightBorderColor = 'ContainerHighlightBorderColor'; - sdxSkinsContentColor = 'ContentColor'; - sdxSkinsContentEvenColor = 'ContentEvenColor'; - sdxSkinsContentOddColor = 'ContentOddColor'; - sdxSkinsContentTextColor = 'ContentTextColor'; - sdxSkinsHeaderBackgroundColor = 'HeaderBackgroundColor'; - sdxSkinsHeaderBackgroundTextColor = 'HeaderBackgroundTextColor'; - sdxSkinsLayoutControlColor = 'LayoutControlColor'; - sdxSkinsSchedulerNavigatorColor = 'NavigatorColor'; - sdxSkinsSelectionColor = 'SelectionColor'; - sdxSkinsSelectionTextColor = 'SelectionTextColor'; - sdxSkinsTabTextColor = 'TabHeaderTextColor'; - sdxSkinsTabTextColorActive = 'TabHeaderTextColorActive'; - sdxSkinsTabTextColorDisabled = 'TabHeaderTextColorDisabled'; - sdxSkinsTabTextColorHot = 'TabHeaderTextColorHot'; - - // Edit Colors - sdxSkinsEditorBackgroundColor = 'BackgroundColor'; - sdxSkinsEditorBackgroundDisabledColor = 'BackgroundDisabledColor'; - sdxSkinsEditorBackgroundInactiveColor = 'BackgroundInactiveColor'; - sdxSkinsEditorBackgroundReadOnlyColor = 'BackgroundReadOnlyColor'; - sdxSkinsEditorTextColor = 'TextColor'; - sdxSkinsEditorTextDisabledColor = 'TextDisabledColor'; - sdxSkinsEditorTextInactiveColor = 'TextInactiveColor'; - sdxSkinsEditorTextReadOnlyColor = 'TextReadOnlyColor'; - sdxSkinsEditorHyperLinkTextColor = 'HyperLinkTextColor'; - - // ProgressBar - sdxSkinsProgressBarFilledTextColor = 'ProgressBarFilledTextColor'; - sdxSkinsProgressBarEmptyTextColor = 'ProgressBarEmptyTextColor'; - - // calendar - sdxSkinsCalendarDayTextColor = 'CalendarDayTextColor'; - sdxSkinsCalendarHolidayTextColor = 'CalendarHolidayTextColor'; - sdxSkinsCalendarInactiveDayTextColor = 'CalendarInactiveDayTextColor'; - sdxSkinsCalendarSelectedDayColor = 'CalendarSelectedDayColor'; - sdxSkinsCalendarSelectedDayTextColor = 'CalendarSelectedDayTextColor'; - sdxSkinsCalendarSeparatorColor = 'CalendarSeparatorColor'; - sdxSkinsCalendarTodayFrameColor = 'CalendarTodayFrameColor'; - sdxSkinsCalendarTodayTextColor = 'CalendarTodayTextColor'; - - // CalcEdit - sdxSkinsCalcEditDigitTextColor = 'CalcEditDigitTextColor'; - sdxSkinsCalcEditArithmeticOperationTextColor = 'CalcEditArithmeticOperationTextColor'; - sdxSkinsCalcEditEditingOperationTextColor = 'CalcEditEditingOperationTextColor'; - sdxSkinsCalcEditMemoryOperationTextColor = 'CalcEditMemoryOperationTextColor'; - sdxSkinsCalcEditScientificOperationTextColor = 'CalcEditScientificOperationTextColor'; - - // common - sdxCaptionFontDelta = 'FontDelta'; - - // dock control colors - sdxSkinsDCCaptionActiveTextColor = 'DockControlCaptionActiveTextColor'; - sdxSkinsDCCaptionTextColor = 'DockControlCaptionTextColor'; - sdxSkinsDCHiddenBarTextColor = 'DockControlHiddenBarTextColor'; - sdxSkinsDCHiddenBarTextHotColor = 'DockControlHiddenBarTextHotColor'; - - // groups - sdxSkinGroupBars = 'Bars'; - sdxSkinGroupCommon = 'Common'; - sdxSkinGroupDocking = 'Docking'; - sdxSkinGroupEditors = 'Editors'; - sdxSkinGroupForm = 'Form'; - sdxSkinGroupGrid = 'Grid'; - sdxSkinGroupLayoutControl = 'LayoutControl'; - sdxSkinGroupNavBar = 'NavBar'; - sdxSkinGroupNavPane = 'NavPane'; - sdxSkinGroupPrintingSystem = 'PrintingSystem'; - sdxSkinGroupRibbon = 'Ribbon'; - sdxSkinGroupScheduler = 'Scheduler'; - sdxSkinGroupTabs = 'PageControl'; - sdxSkinGroupVGrid = 'VerticalGrid'; - - // skin group elements - - sdxComboButtonGlyph = 'ComboButtonGlyph'; - sdxSpinUpGlyph = 'SpinUpGlyph'; - sdxSpinDownGlyph = 'SpinDownGlyph'; - sdxSpinLeftGlyph = 'SpinLeftGlyph'; - sdxSpinRightGlyph = 'SpinRightGlyph'; - sdxEditorButton = 'EditorButton'; - sdxCloseButton = 'CloseButton'; - - // bars elements - sdxBarsBar = 'Bar'; - sdxBarsBarCustomize = 'BarCustomize'; - sdxBarsBarCustomizeVertical = 'BarCustomizeVertical'; - sdxBarsBarFinger = 'BarDragGrip'; - sdxBarsBarFingerVertical = 'BarDragGripVertical'; - sdxBarsBarSeparator = 'BarSeparator'; - sdxBarsBarVertical = 'BarVertical'; - sdxBarsBarVerticalSeparator = 'BarSeparatorVertical'; - sdxBarsDock = 'Dock'; - sdxBarsFloatBar = 'FloatBar'; - sdxBarsLinkStatic = 'LinkStatic'; - sdxBarsLinkSelected = 'LinkSelected'; - sdxBarsMainMenu = 'MainMenu'; - sdxBarsMainMenuCustomize = 'MainMenuCustomize'; - sdxBarsMainMenuDrag = 'MainMenuDrag'; - sdxBarsMainMenuLinkSelected = 'MainMenuLinkSelected'; - sdxBarsMainMenuVertical = 'MainMenuVertical'; - sdxBarsPopupMenu = 'PopupMenu'; - sdxBarsPopupMenuCheck = 'PopupMenuCheck'; - sdxBarsPopupMenuExpandButton = 'PopupMenuExpandButton'; - sdxBarsPopupMenuLinkSelected = 'PopupMenuLinkSelected'; - sdxBarsPopupMenuSeparator = 'PopupMenuSeparator'; - sdxBarsPopupMenuSideStrip = 'PopupMenuSideStrip'; - sdxBarsPopupMenuSideStripNonRecent = 'PopupMenuSideStripNonRecent'; - sdxBarsPopupMenuDropDownButtonLabel = 'PopupMenuDropDownButtonLabel'; - sdxBarsPopupMenuDropDownButtonArrow = 'PopupMenuDropDownButtonArrow'; - - // Label - sdxLabelLine = 'LabelLine'; - sdxLabelLineVert = 'LabelLineVert'; - - // Colors - sdxTextColorNormal = 'TextColor'; - sdxTextColorDisabled = 'TextColorDisabled'; - sdxTextColorHot = 'TextColorHot'; - sdxTextColorPressed = 'TextColorPressed'; - sdxTextColorSelected = 'TextColorSelected'; - sdxTextInactiveColor = 'TextColorInactive'; - - // ribbon elements - sdxRibbonAppButtonRightIndent = 'RightIndent'; - sdxRibbonApplicationButton = 'FormAppButton'; - sdxRibbonAppMenuFooterBackground = 'AppMenuBackgroundBottom'; - sdxRibbonAppMenuHeaderBackground = 'AppMenuBackground'; - sdxRibbonButtonArrow = 'ButtonArrow'; - sdxRibbonButtonDisabledText = 'ButtonDisabled'; - sdxRibbonButtonGroup = 'ButtonGroup'; - sdxRibbonButtonGroupButton = 'ButtonGroupButton'; - sdxRibbonButtonGroupSeparator = 'ButtonGroupSeparator'; - sdxRibbonCaptionFontDelta = 'FontDelta'; - sdxRibbonCollapsedToolBarBackground = 'TabGroupCollapsed'; - sdxRibbonCollapsedToolBarGlyphBackground = 'TabGroupCollapsedBox'; - sdxRibbonContextualTabLabel = 'ContextualTabLabel'; - sdxRibbonContextualTabLabelOnGlass = 'ContextualTabLabelOnGlass'; - sdxRibbonContextualTabSeparator = 'ContextualTabSeparator'; - sdxRibbonContextualTabHeader = 'ContextualTabHeader'; - sdxRibbonContextualTabPanel = 'ContextualTabPanel'; - sdxRibbonDialogFrameBottom = 'DialogFrameBottom'; - sdxRibbonDialogFrameLeft = 'DialogFrameLeft'; - sdxRibbonDialogFrameRight = 'DialogFrameRight'; - sdxRibbonDocumentNameTextColor = 'DocumentNameTextColor'; - sdxRibbonExtraPaneColor = 'AppMenuExtraPaneColor'; - sdxRibbonExtraPaneHeaderSeparator = 'AppMenuExtraPaneHeaderSeparator'; - sdxRibbonFormBottom = 'FormFrameBottom'; - sdxRibbonFormCaption = 'FormCaption'; - sdxRibbonFormFrameLeft = 'FormFrameLeft'; - sdxRibbonFormFrameRight = 'FormFrameRight'; - sdxRibbonGalleryBackground = 'DropDownGalleryBackground'; - sdxRibbonGalleryButtonDown = 'InRibbonGalleryButtonDown'; - sdxRibbonGalleryButtonDropDown = 'InRibbonGalleryButtonDropDown'; - sdxRibbonGalleryButtonUp = 'InRibbonGalleryButtonUp'; - sdxRibbonGalleryGroupCaption = 'DropDownGalleryGroupHeader'; - sdxRibbonGalleryPane = 'InRibbonGalleryPane'; - sdxRibbonGallerySizeGrips = 'DropDownGallerySizeGrip'; - sdxRibbonGallerySizingPanel = 'DropDownGallerySizePanel'; - sdxRibbonHeaderBackground = 'TabBackground'; - sdxRibbonLargeButton = 'LargeButton'; - sdxRibbonLargeSplitButtonBottom = 'LargeSplitButtonBottom'; - sdxRibbonLargeSplitButtonTop = 'LargeSplitButtonTop'; - sdxRibbonQATCustomizeButtonOutsideQAT = 'DisplayCustomizeButtonOutsideQAT'; - sdxRibbonQATIndentBeforeCustomizeItem = 'IndentBeforeCustomizeButton'; - sdxRibbonQuickAccessToolbarOffset = 'Offset'; - sdxRibbonQuickToolbarAbove = 'QATAboveBackground'; - sdxRibbonQuickToolbarBelow = 'QATBelowBackground'; - sdxRibbonQuickToolbarButtonGlyph = 'QATButtonGlyph'; - sdxRibbonQuickToolbarDropDown = 'QATOverflow'; - sdxRibbonQuickToolbarGlyph = 'QATCustomizeButton'; - sdxRibbonQuickToolbarInCaption = 'QATInRibbonBackground'; - sdxRibbonSmallButton = 'Button'; - sdxRibbonSpaceBetweenTabGroups = 'SpaceBetweenTabGroups'; - sdxRibbonSplitButtonLeft = 'SplitButtonLeft'; - sdxRibbonSplitButtonRight = 'SplitButtonRight'; - sdxRibbonStatusBarBackground = 'StatusBarBackground'; - sdxRibbonStatusBarButton = 'StatusBarButton'; - sdxRibbonStatusBarSeparator = 'StatusBarSeparator'; - sdxRibbonTabGroup = 'TabGroup'; - sdxRibbonTabGroupHeader = 'TabGroupCaption'; - sdxRibbonTabGroupItemsSeparator = 'TabGroupItemsSeparator'; - sdxRibbonTabGroupLeftScroll = 'TabGroupLeftScrollButton'; - sdxRibbonTabGroupRightScroll = 'TabGroupRightScrollButton'; - sdxRibbonTabHeaderDownGrowIndent = 'TabHeaderDownGrow'; - sdxRibbonTabHeaderPage = 'Tab'; - sdxRibbonTabPanel = 'TabPanel'; - sdxRibbonTabPanelGroupButton = 'TabGroupButton'; - sdxRibbonTabSeparatorLine = 'TabSeparatorLine'; - - // navbar elemets - sdxNavBarBackground = 'Background'; - sdxNavBarGroupClient = 'GroupClient'; - sdxNavBarGroupCloseButton = 'GroupCloseButton'; - sdxNavBarGroupFooter = 'GroupFooter'; - sdxNavBarGroupHeader = 'GroupHeader'; - sdxNavBarGroupOpenButton = 'GroupOpenButton'; - sdxNavBarItem = 'Item'; - - sdxNavPaneCaptionFontSize = 'FontSize'; - sdxNavPaneCaptionHeight = 'Height'; - sdxNavPaneCollapseButton = 'CollapseButton'; - sdxNavPaneCollapsedGroupClient = 'CollapsedGroupClient'; - sdxNavPaneExpandButton = 'ExpandButton'; - sdxNavPaneFormBorder = 'PopupBorder'; - sdxNavPaneFormSizeGrip = 'PopupSizeGrip'; - sdxNavPaneGroupButton = 'GroupButton'; - sdxNavPaneGroupButtonSelected = 'GroupButtonSelected'; - sdxNavPaneGroupCaption = 'Caption'; - sdxNavPaneGroupClient = 'GroupClient'; - sdxNavPaneItem = 'Item'; - sdxNavPaneItemSelected = 'ItemSelected'; - sdxNavPaneOffsetGroupBorders = 'OverlapGroupBorders'; - sdxNavPaneOverflowPanel = 'OverflowPanel'; - sdxNavPaneOverflowPanelExpandItem = 'OverflowPanelExpandItem'; - sdxNavPaneOverflowPanelItem = 'OverflowPanelItem'; - sdxNavPaneScrollDownBtn = 'ScrollDownButton'; - sdxNavPaneScrollUpBtn = 'ScrollUpButton'; - sdxNavPaneSplitter = 'Splitter'; - - // scheduler - sdxSchedulerAllDayArea = 'AllDayArea'; - sdxSchedulerAllDayAreaSelected = 'AllDayAreaSelected'; - sdxSchedulerAppointment = 'Appointment'; - sdxSchedulerAppointmentBorder = 'AppointmentBorder'; - sdxSchedulerAppointmentBorderSize = 'BorderSize'; - sdxSchedulerAppointmentBottomShadow = 'AppointmentBottomShadow'; - sdxSchedulerAppointmentMask = 'AppointmentMask'; - sdxSchedulerAppointmentRight = 'AppointmentRightBorder'; - sdxSchedulerAppointmentRightShadow = 'AppointmentRightShadow'; - sdxSchedulerCurrentTimeIndicator = 'CurrentTimeIndicator'; - sdxSchedulerMoreButton = 'MoreButton'; - sdxSchedulerNavButtonNext = 'NavButtonNext'; - sdxSchedulerNavButtonNextArrow = 'NavButtonNextArrow'; - sdxSchedulerNavButtonPrev = 'NavButtonPrev'; - sdxSchedulerNavButtonPrevArrow = 'NavButtonPrevArrow'; - sdxSchedulerTimeGridCurrentTimeIndicator = 'TimeGridCurrentTimeIndicator'; - sdxSchedulerTimeGridHeader = 'TimeGridHeader'; - sdxSchedulerTimeGridHeaderSelected = 'TimeGridHeaderSelected'; - sdxSchedulerTimeLine = 'DefaultTimeLine'; - sdxSchedulerTimeRuler = 'Ruler'; - - // dock control elements - sdxDCActiveTabHeaderDownGrow = 'ActiveTabHeaderDownGrow'; - sdxDCActiveTabHeaderHGrow = 'ActiveTabHeaderHGrow'; - sdxDCActiveTabHeaderUpGrow = 'ActiveTabHeaderUpGrow'; - sdxDockCtrlAutoHideBar = 'AutoHideBar'; - sdxDockCtrlAutoHideBarBottom = 'AutoHideBarBottom'; - sdxDockCtrlAutoHideBarLeft = 'AutoHideBarLeft'; - sdxDockCtrlAutoHideBarRight = 'AutoHideBarRight'; - sdxDockCtrlBorder = 'DockWindowBorder'; - sdxDockCtrlCaption = 'DockWindowCaption'; - sdxDockCtrlInactiveCaptionTextColor = 'InactiveCaptionTextColor'; - sdxDockCtrlTabHeader = 'TabHeader'; - sdxDockCtrlTabHeaderAutoHideBar = 'TabHeaderAutoHideBar'; - sdxDockCtrlTabHeaderBackground = 'TabHeaderBackground'; - sdxDockCtrlTabHeaderLine = 'TabHeaderLine'; - sdxDockCtrlWindowButton = 'DockWindowButton'; - sdxDockCtrlWindowGlyphs = 'DockWindowButtonGlyphs'; - - // skin group panel - sdxGroupPanel = 'GroupPanel'; - sdxGroupPanelBottom = 'GroupPanelBottom'; - sdxGroupPanelCaptionBottom = 'GroupPanelCaptionBottom'; - sdxGroupPanelCaptionLeft = 'GroupPanelCaptionLeft'; - sdxGroupPanelCaptionRight = 'GroupPanelCaptionRight'; - sdxGroupPanelCaptionTop = 'GroupPanelCaptionTop'; - sdxGroupPanelLeft = 'GroupPanelLeft'; - sdxGroupPanelNoBorder = 'GroupPanelNoBorder'; - sdxGroupPanelRight = 'GroupPanelRight'; - sdxGroupPanelTop = 'GroupPanelTop'; - - sdxButton = 'Button'; - sdxCheckbox = 'Checkbox'; - sdxClock = 'ClockFace'; - sdxClockGlass = 'ClockGlass'; - sdxNavigatorGlyphs = 'Navigator'; - sdxNavigatorGlyphsVert = 'NavigatorVert'; - sdxProgressBorder = 'ProgressBorder'; - sdxProgressBorderVert = 'ProgressBorderVert'; - sdxProgressChunk = 'ProgressChunk'; - sdxProgressChunkVert = 'ProgressChunkVert'; - sdxRadioGroup = 'RadioButton'; - sdxScrollButton = 'ScrollButton'; - sdxScrollContentHorz = 'ScrollContentHorz'; - sdxScrollContentVert = 'ScrollContentVert'; - sdxScrollThumbButtonHorz = 'ScrollThumbHorz'; - sdxScrollThumbButtonVert = 'ScrollThumbVert'; - sdxSizeGrip = 'SizeGrip'; - sdxSplitterHorz = 'SplitterHorz'; - sdxSplitterVert = 'Splitter'; - sdxScreenTipItem = 'ScreenTipItem'; - sdxScreenTipSeparator = 'ScreenTipSeparator'; - sdxScreenTipTitleItem = 'ScreenTipTitleItem'; - sdxScreenTipWindow = 'ScreenTipWindow'; - - // trackbar - sdxTrackBarThumb = 'TrackBarThumb'; - sdxTrackBarThumbBoth = 'TrackBarThumbBoth'; - sdxTrackBarThumbUp = 'TrackBarThumbUp'; - sdxTrackBarThumbVert = 'TrackBarThumbVert'; - sdxTrackBarThumbVertBoth = 'TrackBarThumbVertBoth'; - sdxTrackBarThumbVertUp = 'TrackBarThumbVertUp'; - sdxTrackBarTrack = 'TrackBarTrack'; - sdxTrackBarTrackVert = 'TrackBarTrackVert'; - - // pagecontrol - sdxPageControlHeaderBottom = 'TabHeaderBottom'; - sdxPageControlHeaderLeft = 'TabHeaderLeft'; - sdxPageControlHeaderRight = 'TabHeaderRight'; - sdxPageControlHeaderTop = 'TabHeader'; - sdxPageControlHorz = 'TabButtonHorz'; - sdxPageControlPane = 'TabPane'; - sdxPageControlVert = 'TabButtonVert'; - - sdxHeaderDownGrow = 'HeaderDownGrow'; - sdxRowIndentFar = 'RowIndentFar'; - sdxRowIndentNear = 'RowIndentNear'; - sdxSelectedHeaderDownGrow = 'SelectedHeaderDownGrow'; - sdxSelectedHeaderHGrow = 'SelectedHeaderHGrow'; - sdxSelectedHeaderUpGrow = 'SelectedHeaderUpGrow'; - - // grid - sdxCardSeparator = 'CardSeparator'; - sdxFilterButton = 'FilterButton'; - sdxFilterButtonActive = 'FilterButtonActive'; - sdxFilterPanel = 'GridFilterPanel'; - sdxFooterCell = 'FooterCell'; - sdxFooterPanel = 'FooterPanel'; - sdxGridLine = 'GridLine'; - sdxGroupByBox = 'GridGroupPanel'; - sdxGroupRow = 'GroupRow'; - sdxHeader = 'Header'; - sdxHeaderLeft = 'HeaderLeft'; - sdxHeaderRight = 'HeaderRight'; - sdxHeaderSpecial = 'HeaderSpecial'; - sdxIndicatorImages = 'IndicatorImages'; - sdxGridFixedLine = 'GridFixedLine'; - - sdxPlusMinus = 'PlusMinus'; - sdxPlusMinusEx = 'PlusMinusEx'; - - sdxVGridBandLine = 'BandBorder'; - sdxVGridLine = 'GridLine'; - sdxVGridRowHeader = 'RowHeader'; - sdxVGridCategory = 'Category'; - - // form - sdxTextShadowColor = 'TextShadowColor'; - - sdxFormFrameLeft = 'FormFrameLeft'; - sdxFormCaption = 'FormCaption'; - sdxFormContent = 'FormContent'; - sdxFormFrameRight = 'FormFrameRight'; - sdxFormFrameBottom = 'FormFrameBottom'; - - sdxSmallFormFrameLeft = 'SmallFormFrameLeft'; - sdxSmallFormCaption = 'SmallFormCaption'; - sdxSmallFormFrameRight = 'SmallFormFrameRight'; - sdxSmallFormFrameBottom = 'SmallFormFrameBottom'; - - sdxFormButtonClose = 'FormButtonClose'; - sdxFormButtonHelp = 'FormButtonHelp'; - sdxFormButtonMaximize = 'FormButtonMaximize'; - sdxFormButtonMinimize = 'FormButtonMinimize'; - sdxFormButtonRestore = 'FormButtonRestore'; - sdxSmallFormButtonClose = 'SmallFormButtonClose'; - sdxStatusBar = 'StatusBar'; - - // Printing System - sdxPrintingSystemPageBorder = 'PageBorder'; - sdxPrintingSystemPreviewBackground = 'PreviewBackground'; - - // xml storage - sdxItem = 'Item'; - sdxItems = 'Items'; - - sdxControlParts = 'ControlParts'; - sdxGlyph = 'Glyph'; - sdxImage = 'Image'; - sdxName = 'Name'; - sdxParentName = 'Parent'; - sdxPart = 'Part'; - sdxVersion = 'Version'; - - // layout orientation - sdxLayoutHorz = 'Horizontal'; - sdxLayoutVert = 'Vertical'; - - // properties - sdxBoolean = 'Boolean'; - sdxColor = 'Color'; - sdxContent = 'Content'; - sdxImageCount = 'ImageCount'; - sdxRect = 'Rect'; - sdxSize = 'Size'; - sdxString = 'String'; - sdxTextColor = 'TextColor'; - - // stretch mode - sdxStretch = 'Stretch'; - sdxTile = 'Tile'; - sdxNoResize = 'NoResize'; - - // bitmap - sdxFile = 'File'; - sdxLayout = 'Layout'; - sdxStates = 'States'; - sdxMargins = 'Margins'; - - // rect - sdxBorders = 'Borders'; - sdxThin = 'Thin'; - - sdxLeft = 'Left'; - sdxTop = 'Top'; - sdxRight = 'Right'; - sdxBottom = 'Bottom'; - - // size - sdxWidth = 'Width'; - sdxHeight = 'Height'; - - // Gradient - sdxGradientBeginColor = 'GradientBeginColor'; - sdxGradientEndColor = 'GradientEndColor'; - sdxGradientMode = 'GradientMode'; - sdxGradientModeBackwardDiagonal = 'BackwardDiagonal'; - sdxGradientModeForwardDiagonal = 'ForwardDiagonal'; - sdxGradientModeHorizontal = 'Horizontal'; - sdxGradientModeVertical = 'Vertical'; - -const - - CalcEditTextColorsMap: array[TcxCalcButtonKind] of string = ( - sdxSkinsCalcEditEditingOperationTextColor, - sdxSkinsCalcEditEditingOperationTextColor, - sdxSkinsCalcEditEditingOperationTextColor, - - sdxSkinsCalcEditMemoryOperationTextColor, - sdxSkinsCalcEditMemoryOperationTextColor, - sdxSkinsCalcEditMemoryOperationTextColor, - sdxSkinsCalcEditMemoryOperationTextColor, - - sdxSkinsCalcEditDigitTextColor, sdxSkinsCalcEditDigitTextColor, - sdxSkinsCalcEditDigitTextColor, sdxSkinsCalcEditDigitTextColor, - sdxSkinsCalcEditDigitTextColor, sdxSkinsCalcEditDigitTextColor, - sdxSkinsCalcEditDigitTextColor, sdxSkinsCalcEditDigitTextColor, - sdxSkinsCalcEditDigitTextColor, sdxSkinsCalcEditDigitTextColor, - sdxSkinsCalcEditDigitTextColor, sdxSkinsCalcEditDigitTextColor, - - sdxSkinsCalcEditArithmeticOperationTextColor, - sdxSkinsCalcEditArithmeticOperationTextColor, - sdxSkinsCalcEditArithmeticOperationTextColor, - sdxSkinsCalcEditArithmeticOperationTextColor, - - sdxSkinsCalcEditScientificOperationTextColor, - sdxSkinsCalcEditScientificOperationTextColor, - sdxSkinsCalcEditScientificOperationTextColor, - sdxSkinsCalcEditScientificOperationTextColor, - sdxSkinsCalcEditScientificOperationTextColor - ); - - CommonGroup: array[0..18] of string = - (sdxSkinGroupCommon, - sdxButton, sdxGroupPanel, sdxGroupPanelBottom, sdxGroupPanelCaptionBottom, - sdxGroupPanelCaptionLeft, sdxGroupPanelCaptionRight, sdxGroupPanelCaptionTop, - sdxGroupPanelLeft, sdxGroupPanelRight, sdxGroupPanelTop, sdxScrollButton, - sdxScrollContentHorz, sdxScrollContentVert, sdxScrollThumbButtonHorz, - sdxScrollThumbButtonVert, sdxSizeGrip, sdxSplitterHorz, sdxSplitterVert); - - EditorsGroup: array[0..22] of string = - (sdxSkinGroupEditors, - sdxCheckbox, sdxCloseButton, sdxComboButtonGlyph, sdxEditorButton, sdxNavigatorGlyphs, - sdxProgressBorder, sdxProgressBorderVert, sdxProgressChunk, sdxProgressChunkVert, - sdxRadioGroup, sdxSpinDownGlyph, sdxSpinLeftGlyph, sdxSpinRightGlyph, sdxSpinUpGlyph, - sdxTrackBarThumb, sdxTrackBarThumbBoth, sdxTrackBarThumbUp, sdxTrackBarThumbVert, - sdxTrackBarThumbVertBoth, sdxTrackBarThumbVertUp, sdxTrackBarTrack, sdxTrackBarTrackVert); - - GridGroup: array[0..14] of string = - (sdxSkinGroupGrid, - sdxFilterButton, sdxFilterButtonActive, sdxFilterPanel, sdxFooterCell, sdxFooterPanel, - sdxGroupByBox, sdxGroupRow, sdxHeader, sdxHeaderLeft, sdxHeaderRight, sdxHeaderSpecial, - sdxIndicatorImages, sdxPlusMinus, sdxPlusMinusEx); - - TabGroup: array[0..5] of string = - (sdxSkinGroupTabs, - sdxPageControlHeaderBottom, sdxPageControlHeaderLeft, - sdxPageControlHeaderRight, sdxPageControlHeaderTop, sdxPageControlPane); - - VGridGroup: array[0..4] of string = - (sdxSkinGroupVGrid, - sdxVGridBandLine, sdxVGridLine, sdxVGridRowHeader, sdxVGridCategory); - - FormGroup: array[0..13] of string = - (sdxFormFrameLeft, sdxFormCaption, sdxFormFrameRight, sdxFormFrameBottom, - sdxSmallFormFrameLeft, sdxSmallFormCaption, sdxSmallFormFrameRight, - sdxSmallFormFrameBottom, sdxSmallFormButtonClose, sdxFormButtonClose, - sdxFormButtonMinimize, sdxFormButtonMaximize, sdxFormButtonRestore, sdxFormButtonHelp); - - EditButtonsMap: array[TcxEditBtnKind] of string = (sdxCloseButton, sdxComboButtonGlyph, - sdxEditorButton, sdxEditorButton, sdxSpinUpGlyph, sdxSpinDownGlyph, - sdxSpinLeftGlyph, sdxSpinRightGlyph); - - FormFrameMap: array[Boolean, TcxBorder] of string = - ((sdxFormFrameLeft, sdxSmallFormCaption, sdxFormFrameRight, sdxFormFrameBottom), - (sdxFormFrameLeft, sdxFormCaption, sdxFormFrameRight, sdxFormFrameBottom)); - - EditBackgroundColorsMap: array[TcxEditStateColorKind] of string = ( - sdxSkinsEditorBackgroundColor, sdxSkinsEditorBackgroundDisabledColor, - sdxSkinsEditorBackgroundInactiveColor, sdxSkinsEditorBackgroundReadOnlyColor - ); - - EditTextColorsMap: array[TcxEditStateColorKind] of string = ( - sdxSkinsEditorTextColor, sdxSkinsEditorTextDisabledColor, - sdxSkinsEditorTextInactiveColor, sdxSkinsEditorTextReadOnlyColor - ); - -implementation - -end. - diff --git a/internal/x.46/ExpressLibrary/Sources/dxSplash.res b/internal/x.46/ExpressLibrary/Sources/dxSplash.res deleted file mode 100644 index dd6d193b..00000000 Binary files a/internal/x.46/ExpressLibrary/Sources/dxSplash.res and /dev/null differ diff --git a/internal/x.46/ExpressLibrary/cxLocalizerEditor.exe b/internal/x.46/ExpressLibrary/cxLocalizerEditor.exe deleted file mode 100644 index 51d9afa0..00000000 Binary files a/internal/x.46/ExpressLibrary/cxLocalizerEditor.exe and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC10.bpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC10.bpk deleted file mode 100644 index aeb99a79..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC10.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = cxPageControlC10.bpl -OBJFILES = cxPageControlC10.obj cxPC.obj cxPCConsts.obj cxPCGoDialog.obj cxPCPainters.obj cxPCPaintersFactory.obj -RESFILES = cxPageControlC10.res -MAINSOURCE = cxPageControlC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC10.bpi dxThemeC10.bpi rtl.bpi vcl.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform PageControl by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC10.cpp b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC10.cpp deleted file mode 100644 index a02c4a2f..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC10.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxPageControlC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEUNIT("cxPC.pas"); -USEUNIT("cxPCConsts.pas"); -USEUNIT("cxPCGoDialog.pas"); -USEUNIT("cxPCPainters.pas"); -USEUNIT("cxPCPaintersFactory.pas"); - -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC10.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC10.res deleted file mode 100644 index 67dc041a..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC11.bpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC11.bpk deleted file mode 100644 index bea6380b..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC11.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = cxPageControlC11.bpl -OBJFILES = cxPageControlC11.obj cxPC.obj cxPCConsts.obj cxPCGoDialog.obj cxPCPainters.obj cxPCPaintersFactory.obj -RESFILES = cxPageControlC11.res -MAINSOURCE = cxPageControlC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC11.bpi dxThemeC11.bpi rtl.bpi vcl.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform PageControl by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC11.cpp b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC11.cpp deleted file mode 100644 index 54602dc7..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC11.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxPageControlC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEUNIT("cxPC.pas"); -USEUNIT("cxPCConsts.pas"); -USEUNIT("cxPCGoDialog.pas"); -USEUNIT("cxPCPainters.pas"); -USEUNIT("cxPCPaintersFactory.pas"); - -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC11.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC11.res deleted file mode 100644 index 73afe5ed..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC12.bpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC12.bpk deleted file mode 100644 index caa1b9c3..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC12.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = cxPageControlC12.bpl -OBJFILES = cxPageControlC12.obj cxPC.obj cxPCConsts.obj cxPCGoDialog.obj cxPCPainters.obj cxPCPaintersFactory.obj -RESFILES = cxPageControlC12.res -MAINSOURCE = cxPageControlC12.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC12.bpi dxThemeC12.bpi rtl.bpi vcl.bpi dxCoreC12.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform PageControl by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC12.cpp b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC12.cpp deleted file mode 100644 index fdd34299..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC12.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxPageControlC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEUNIT("cxPC.pas"); -USEUNIT("cxPCConsts.pas"); -USEUNIT("cxPCGoDialog.pas"); -USEUNIT("cxPCPainters.pas"); -USEUNIT("cxPCPaintersFactory.pas"); - -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC12.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC12.res deleted file mode 100644 index d40741f7..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC14.bpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC14.bpk deleted file mode 100644 index b310dd6c..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC14.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = cxPageControlC14.bpl -OBJFILES = cxPageControlC14.obj cxPC.obj cxPCConsts.obj cxPCGoDialog.obj cxPCPainters.obj cxPCPaintersFactory.obj -RESFILES = cxPageControlC14.res -MAINSOURCE = cxPageControlC14.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryC14.bpi dxThemeC14.bpi rtl.bpi vcl.bpi dxCoreC14.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform PageControl by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC14.cpp b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC14.cpp deleted file mode 100644 index 1f53b9b6..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC14.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxPageControlC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEUNIT("cxPC.pas"); -USEUNIT("cxPCConsts.pas"); -USEUNIT("cxPCGoDialog.pas"); -USEUNIT("cxPCPainters.pas"); -USEUNIT("cxPCPaintersFactory.pas"); - -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC14.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC14.res deleted file mode 100644 index 2b68682a..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD10.dpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD10.dpk deleted file mode 100644 index 9931b4ea..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD10.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package cxPageControlD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxLibraryD10; - -contains - cxPC, - cxPCConsts, - cxPCGoDialog, - cxPCPainters, - cxPCPaintersFactory; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD10.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD10.res deleted file mode 100644 index d60f8800..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD11.dpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD11.dpk deleted file mode 100644 index 2806520c..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD11.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package cxPageControlD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxLibraryD11; - -contains - cxPC, - cxPCConsts, - cxPCGoDialog, - cxPCPainters, - cxPCPaintersFactory; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD11.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD11.res deleted file mode 100644 index 2c39f1ed..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD12.dpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD12.dpk deleted file mode 100644 index b1c5c409..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD12.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package cxPageControlD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxLibraryD12; - -contains - cxPC, - cxPCConsts, - cxPCGoDialog, - cxPCPainters, - cxPCPaintersFactory; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD12.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD12.res deleted file mode 100644 index 38b7d838..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD14.dpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD14.dpk deleted file mode 100644 index d190d33a..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD14.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package cxPageControlD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxLibraryD14; - -contains - cxPC, - cxPCConsts, - cxPCGoDialog, - cxPCPainters, - cxPCPaintersFactory; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD14.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD14.res deleted file mode 100644 index cb7768f3..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD9.dpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD9.dpk deleted file mode 100644 index 1925e1cd..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD9.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package cxPageControlD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxLibraryD9; - -contains - cxPC, - cxPCConsts, - cxPCGoDialog, - cxPCPainters, - cxPCPaintersFactory; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD9.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD9.res deleted file mode 100644 index cf532410..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLC6.bpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLC6.bpk deleted file mode 100644 index 2d3b29d7..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLC6.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = cxPageControlVCLC6.bpl -OBJFILES = cxPageControlVCLC6.obj cxPC.obj cxPCConsts.obj cxPCGoDialog.obj cxPCPainters.obj cxPCPaintersFactory.obj -RESFILES = cxPageControlVCLC6.res -MAINSOURCE = cxPageControlVCLC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxLibraryVCLC6.bpi dxThemeC6.bpi rtl.bpi vcl.bpi dxCoreC6.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform PageControl (VCL Edition) by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLC6.cpp b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLC6.cpp deleted file mode 100644 index 4e0fac70..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLC6.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxPageControlVCLC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEUNIT("cxPC.pas"); -USEUNIT("cxPCConsts.pas"); -USEUNIT("cxPCGoDialog.pas"); -USEUNIT("cxPCPainters.pas"); -USEUNIT("cxPCPaintersFactory.pas"); - -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLC6.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLC6.res deleted file mode 100644 index 74729c72..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD6.dpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD6.dpk deleted file mode 100644 index 02e4f207..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD6.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package cxPageControlVCLD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl (VCL Edition) by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxLibraryVCLD6; - -contains - cxPC, - cxPCConsts, - cxPCGoDialog, - cxPCPainters, - cxPCPaintersFactory; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD6.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD6.res deleted file mode 100644 index 67a86e2a..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD7.dpk b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD7.dpk deleted file mode 100644 index f98a27e1..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD7.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package cxPageControlVCLD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl (VCL Edition) by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxLibraryVCLD7; - -contains - cxPC, - cxPCConsts, - cxPCGoDialog, - cxPCPainters, - cxPCPaintersFactory; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD7.res b/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD7.res deleted file mode 100644 index d74952ff..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/cxPageControlVCLD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC10.bpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC10.bpk deleted file mode 100644 index 19f904e9..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC10.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxPageControlC10.bpl -OBJFILES = dclcxPageControlC10.obj cxPCReg.obj -RESFILES = dclcxPageControlC10.res cxPCReg.dcr -MAINSOURCE = dclcxPageControlC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dclcxLibraryC10.bpi cxLibraryC10.bpi dxThemeC10.bpi cxPageControlC10.bpi designide.bpi rtl.bpi vcl.bpi dxCoreC10.bpi dcldxCoreC10.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform PageControl by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC10.cpp b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC10.cpp deleted file mode 100644 index a193613e..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC10.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxPageControlC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("cxPageControlC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC10.bpi"); -USEUNIT("cxPCReg.pas"); -USERES("cxPCReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC10.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC10.res deleted file mode 100644 index 34d6c6bc..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC11.bpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC11.bpk deleted file mode 100644 index 7219ed53..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC11.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxPageControlC11.bpl -OBJFILES = dclcxPageControlC11.obj cxPCReg.obj -RESFILES = dclcxPageControlC11.res cxPCReg.dcr -MAINSOURCE = dclcxPageControlC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dclcxLibraryC11.bpi cxLibraryC11.bpi dxThemeC11.bpi cxPageControlC11.bpi designide.bpi rtl.bpi vcl.bpi dxCoreC11.bpi dcldxCoreC11.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform PageControl by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC11.cpp b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC11.cpp deleted file mode 100644 index e6ee4198..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC11.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxPageControlC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("cxPageControlC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEUNIT("cxPCReg.pas"); -USERES("cxPCReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC11.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC11.res deleted file mode 100644 index 71ac218c..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC12.bpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC12.bpk deleted file mode 100644 index e8914719..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC12.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxPageControlC12.bpl -OBJFILES = dclcxPageControlC12.obj cxPCReg.obj -RESFILES = dclcxPageControlC12.res cxPCReg.dcr -MAINSOURCE = dclcxPageControlC12.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dclcxLibraryC12.bpi cxLibraryC12.bpi dxThemeC12.bpi cxPageControlC12.bpi designide.bpi rtl.bpi vcl.bpi dxCoreC12.bpi dcldxCoreC12.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform PageControl by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC12.cpp b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC12.cpp deleted file mode 100644 index c08f13a6..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC12.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxPageControlC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("cxPageControlC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC12.bpi"); -USEUNIT("cxPCReg.pas"); -USERES("cxPCReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC12.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC12.res deleted file mode 100644 index 21ff021c..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC14.bpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC14.bpk deleted file mode 100644 index 916dc25d..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC14.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxPageControlC14.bpl -OBJFILES = dclcxPageControlC14.obj cxPCReg.obj -RESFILES = dclcxPageControlC14.res cxPCReg.dcr -MAINSOURCE = dclcxPageControlC14.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dclcxLibraryC14.bpi cxLibraryC14.bpi dxThemeC14.bpi cxPageControlC14.bpi designide.bpi rtl.bpi vcl.bpi dxCoreC14.bpi dcldxCoreC14.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform PageControl by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC14.cpp b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC14.cpp deleted file mode 100644 index 31e6884e..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC14.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxPageControlC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("cxPageControlC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryC14.bpi"); -USEUNIT("cxPCReg.pas"); -USERES("cxPCReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC14.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC14.res deleted file mode 100644 index ea4e5082..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD10.dpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD10.dpk deleted file mode 100644 index 75d21a85..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD10.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dclcxPageControlD10; - -{$R *.res} -{$R cxPCReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxPageControlD10, - dclcxLibraryD10; - -contains - cxPCReg; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD10.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD10.res deleted file mode 100644 index 2efb7b69..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD11.dpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD11.dpk deleted file mode 100644 index 69b4c7be..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD11.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dclcxPageControlD11; - -{$R *.res} -{$R cxPCReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxPageControlD11, - dclcxLibraryD11; - -contains - cxPCReg; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD11.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD11.res deleted file mode 100644 index 1f6b3fd1..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD12.dpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD12.dpk deleted file mode 100644 index d36f8978..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD12.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dclcxPageControlD12; - -{$R *.res} -{$R cxPCReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxPageControlD12, - dclcxLibraryD12; - -contains - cxPCReg; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD12.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD12.res deleted file mode 100644 index 3bc0e5ef..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD14.dpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD14.dpk deleted file mode 100644 index a82e5563..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD14.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dclcxPageControlD14; - -{$R *.res} -{$R cxPCReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxPageControlD14, - dclcxLibraryD14; - -contains - cxPCReg; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD14.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD14.res deleted file mode 100644 index aed0990b..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD9.dpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD9.dpk deleted file mode 100644 index 0a179a74..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD9.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dclcxPageControlD9; - -{$R *.res} -{$R cxPCReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxPageControlD9, - dclcxLibraryD9; - -contains - cxPCReg; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD9.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD9.res deleted file mode 100644 index 8f4fae54..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLC6.bpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLC6.bpk deleted file mode 100644 index 717b49c3..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLC6.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxPageControlVCLC6.bpl -OBJFILES = dclcxPageControlVCLC6.obj cxPCReg.obj -RESFILES = dclcxPageControlVCLC6.res cxPCReg.dcr -MAINSOURCE = dclcxPageControlVCLC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dclcxLibraryVCLC6.bpi cxLibraryVCLC6.bpi dxThemeC6.bpi cxPageControlVCLC6.bpi designide.bpi rtl.bpi vcl.bpi dxCoreC6.bpi dcldxCoreC6.bpi -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) \ - -I"$(SEARCHPATH)";$(LIBDIR) -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express Cross Platform PageControl (VCL Edition) by Developer Express Inc." -aa \ - -Tpp -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLC6.cpp b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLC6.cpp deleted file mode 100644 index b74a01d3..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLC6.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxPageControlVCLC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("cxPageControlVCLC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEUNIT("cxPCReg.pas"); -USERES("cxPCReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLC6.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLC6.res deleted file mode 100644 index a898ef65..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD6.dpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD6.dpk deleted file mode 100644 index 5b19ce23..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD6.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dclcxPageControlVCLD6; - -{$R *.RES} -{$R cxPCReg.dcr} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express Cross Platform PageControl (VCL Edition) by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxPageControlVCLD6, - dclcxLibraryVCLD6; - -contains - cxPCReg; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD6.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD6.res deleted file mode 100644 index 57068f53..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD7.dpk b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD7.dpk deleted file mode 100644 index c4429160..00000000 --- a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD7.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dclcxPageControlVCLD7; - -{$R *.res} -{$R cxPCReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express Cross Platform PageControl (VCL Edition) by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxPageControlVCLD7, - dclcxLibraryVCLD7; - -contains - cxPCReg; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD7.res b/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD7.res deleted file mode 100644 index ef50bcd1..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Packages/dclcxPageControlVCLD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Sources/cxPC.pas b/internal/x.46/ExpressPageControl 2/Sources/cxPC.pas deleted file mode 100644 index d295f68c..00000000 --- a/internal/x.46/ExpressPageControl 2/Sources/cxPC.pas +++ /dev/null @@ -1,7168 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPageControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPAGECONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxPC; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, Classes, Controls, Forms, Graphics, ImgList, SysUtils, - dxCore, cxClasses, cxControls, cxContainer, cxGraphics, cxLookAndFeels, cxPCGoDialog; - -type - TcxPCRectCorrection = record - dLeft, dTop, dRight, dBottom: Integer; - end; - - TcxPCOption = (pcoAlwaysShowGoDialogButton, pcoCloseButton, - pcoFixedTabWidthWhenRotated, pcoGoDialog, pcoGradient, - pcoGradientClientArea, pcoNoArrows, pcoRedrawOnResize, pcoSort, - pcoTopToBottomText, pcoUsePageColorForTab); - TcxPCOptions = set of TcxPCOption; - -const - cxPCEmptyRectCorrection: TcxPCRectCorrection = - (dLeft: 0; dTop: 0; dRight: 0; dBottom: 0); - - TabsContainerOffset = 2; - TabsContainerBaseWidth = 3; - - cxPCNoStyle = -1; - cxPCDefaultStyle = 0; - cxPCDefaultStyleName = 'Default'; - - cxPCDefaultOptions = [pcoAlwaysShowGoDialogButton, pcoGradient, - pcoGradientClientArea, pcoRedrawOnResize]; - -type - TcxPCStyleID = -1 .. High(Integer); - TcxPCStandardStyle = (tsTabs, tsButtons, tsFlatButtons); - - TcxTabPosition = (tpTop, tpBottom, tpLeft, tpRight); - - TcxTabSlantKind = (skCutCorner, skSlant); - TcxTabSlantPosition = (spLeft, spRight); - TcxTabSlantPositions = set of TcxTabSlantPosition; - - TcxCustomTabControl = class; - TcxTab = class; - TcxTabSheet = class; - - TcxDrawTabEvent = procedure(AControl: TcxCustomTabControl; ATab: TcxTab; - var DefaultDraw: Boolean) of object; - TcxDrawTabExEvent = procedure(AControl: TcxCustomTabControl; ATab: TcxTab; - Font: TFont) of object; - TcxGetTabImageEvent = procedure(Sender: TObject; TabIndex: Integer; - var ImageIndex: Integer) of object; - TcxPageChangingEvent = procedure(Sender: TObject; NewPage: TcxTabSheet; var AllowChange: Boolean) of object; - TcxPCCanCloseEvent = procedure(Sender: TObject; var ACanClose: Boolean) of object; - TcxTabChangedEvent = procedure(Sender: TObject; TabID: Integer) of object; - TcxTabChangingEvent = procedure(Sender: TObject; var AllowChange: Boolean) of object; - - TcxPCNavigatorButton = (nbTopLeft, nbBottomRight, nbGoDialog, nbClose); - TcxPCNavigatorButtons = set of TcxPCNavigatorButton; - TcxPCNavigatorButtonIndex = TcxPCNavigatorButtons; - TcxPCNavigatorButtonState = (nbsNormal, nbsPressed, nbsHotTrack, nbsDisabled); - TcxPCNavigatorPosition = (npLeftTop, npLeftBottom, npRightTop, npRightBottom); - - TcxPCTabsPosition = record - ExtendedTabsRect: TRect; - ExtendedTopOrLeftTabsRectBottomOrRightBorderOffset: Integer; - ExtendedBottomOrRightTabsRectTopOrLeftBorderOffset: Integer; - MinDistanceBetweenTopOrLeftAndBottomOrRightExtendedTabsRects: Integer; - NormalRowWidth: Integer; - NormalTabsRect: TRect; - end; - - TcxPCWOffset = record - Left, Right: Integer; - end; - - TcxPCDistance = record - dw, dh: Integer; - end; - - TcxPCTabPosition = record - TabNormalPosition: TPoint; - TabNormalWidth: Integer; // Height is in TcxTabs - TabRectCorrection: TcxPCRectCorrection; - end; - - TcxPCIndexInterval = record - Left, Right: Integer; - end; - TcxPCLineIndexBoundsArray = array of TcxPCIndexInterval; - - TcxPCTabIndex = Integer; - - TcxPCTabPropertyChanged = (tpcNotSpecified, tpcColor, tpcEnabled, tpcFocused, - tpcHighlighted, tpcHotTrack, tpcIsMainTab, tpcLayout, tpcPressed, - tpcSelected, tpcTracking); - - TcxPCTabNotification = (tnDeleting); - - TcxPCOutTabImageAndTextData = record - TabImageRect: TRect; - TabTextRect: TRect; - TabVisibleIndex: Integer; - end; - - TcxPCImageListRotatedImagesElement = record - BackgroundColor: TColor; - Bitmap: TBitmap; - IsBackgroundColorSpecified: Boolean; - end; - TcxPCImageListRotatedImagesElementArray = - array of TcxPCImageListRotatedImagesElement; - - TcxTabs = class; - TcxTabSlants = class; - - TcxTab = class(TPersistent) - private - FCaption: string; // type of TStrings' item - FColor: TColor; - FEnabled: Boolean; - FHighlighted: Boolean; - FImageIndex: TImageIndex; - FIndex: Integer; - FObject: TObject; - FPaintBitmap: TBitmap; - FRow: Integer; - FSelected: Boolean; - FTabPosition: TcxPCTabPosition; - FTabs: TcxTabs; - FVerticalTextBitmap: TBitmap; - FVisible: Boolean; - FVisibleRow: Integer; - function GetFullRect: TRect; - function GetHotTrack: Boolean; - function GetImageIndex: TImageIndex; - function GetIsMainTab: Boolean; - function GetNormalLongitudinalSize: Integer; - function GetNormalRect: TRect; - function GetPaintingPosition: TcxTabPosition; - function GetPaintingPositionIndex: Integer; - function GetParentControl: TcxCustomTabControl; - function GetPressed: Boolean; - function GetRealEnabled: Boolean; - function GetRealVisible: Boolean; - function GetTracking: Boolean; - function GetVisibleIndex: Integer; - function GetVisibleRect: TRect; - procedure InternalSetCaption(const Value: string); - function IsImageIndexStored: Boolean; - procedure SetCaption(const Value: string); - procedure SetColor(Value: TColor); - procedure SetEnabled(const Value: Boolean); - procedure SetHighlighted(const Value: Boolean); - procedure SetImageIndex(Value: TImageIndex); - procedure SetSelected(const Value: Boolean); - procedure SetVisible(const Value: Boolean); - protected - procedure AssignTo(Dest: TPersistent); override; - procedure Changed(ATabPropertyChanged: TcxPCTabPropertyChanged); - procedure ValidateImageIndex; - property NormalLongitudinalSize: Integer read GetNormalLongitudinalSize; - property ParentControl: TcxCustomTabControl read GetParentControl; - property Tabs: TcxTabs read FTabs; - property VerticalTextBitmap: TBitmap read FVerticalTextBitmap; - public - constructor Create(ATabs: TcxTabs; AIndex: Integer); - destructor Destroy; override; - procedure InitializePaintBitmap; - procedure ResetPaintBitmap; - procedure ResetVerticalTextBitmap; - property FullRect: TRect read GetFullRect; - property HotTrack: Boolean read GetHotTrack; - property Index: Integer read FIndex; - property IsMainTab: Boolean read GetIsMainTab; - property NormalRect: TRect read GetNormalRect; - property PaintBitmap: TBitmap read FPaintBitmap; - property PaintingPosition: TcxTabPosition read GetPaintingPosition; - property PaintingPositionIndex: Integer read GetPaintingPositionIndex; - property Pressed: Boolean read GetPressed; - property RealEnabled: Boolean read GetRealEnabled; - property RealVisible: Boolean read GetRealVisible; - property Tracking: Boolean read GetTracking; - property VisibleIndex: Integer read GetVisibleIndex; - property VisibleRect: TRect read GetVisibleRect; - property VisibleRow: Integer read FVisibleRow; - published - property Caption: string read FCaption write SetCaption; - property Color: TColor read FColor write SetColor default clDefault; - property Enabled: Boolean read FEnabled write SetEnabled default True; - property Highlighted: Boolean read FHighlighted write SetHighlighted; - property ImageIndex: TImageIndex - read GetImageIndex write SetImageIndex stored IsImageIndexStored; - property Selected: Boolean read FSelected write SetSelected; - property Visible: Boolean read FVisible write SetVisible default True; - end; - - TcxTabs = class(TStrings) - private - FNotification: Boolean; - FParent: TcxCustomTabControl; - FTabNormalHeight: Integer; - FTabsItemA: array of TcxTab; - FUpdating: Boolean; - function GetTab(TabIndex: Integer): TcxTab; - function GetVisibleTab(TabVisibleIndex: Integer): TcxTab; - procedure SetTab(Index: Integer; const Value: TcxTab); - function GetVisibleTabsCount: Integer; - protected - function Get(Index: Integer): string; override; - function GetCount: Integer; override; - function GetObject(Index: Integer): TObject; override; - procedure Put(Index: Integer; const S: string); override; - procedure PutObject(Index: Integer; AObject: TObject); override; - procedure Changed(VisibleIndex: Integer = -1; TabPropertyChanged: TcxPCTabPropertyChanged = tpcLayout); - procedure Notify(Index: Integer; Action: TcxPCTabNotification); virtual; - class procedure OutError(SourceMethodName: TCaption; Index: Integer); virtual; - procedure SetHotTrack(VisibleIndex: Integer); - procedure SetMainTab; - procedure SetTracking(NewTracking: Integer); - procedure UpdateTabIndexes(FirstIndex, LastIndex: Integer); - procedure ValidateImageIndexes; - property Parent: TcxCustomTabControl read FParent; - public - constructor Create(AParent: TcxCustomTabControl); - destructor Destroy; override; - procedure Clear; override; - procedure Delete(Index: Integer); override; - procedure Insert(Index: Integer; const S: string); override; - procedure Move(CurIndex, NewIndex: Integer); override; - procedure ResetTabVerticalTextBitmaps; - - property TabNormalHeight: Integer read FTabNormalHeight; - property Tabs[TabIndex: Integer]: TcxTab read GetTab write SetTab; default; - property VisibleTabsCount: Integer read GetVisibleTabsCount; - property VisibleTabs[TabVisibleIndex: Integer]: TcxTab read GetVisibleTab; - end; - - TcxVisibleTabList = class - private - FParent: TcxCustomTabControl; - TabIndexA: array of TcxPCTabIndex; - function GetCount: Integer; - function GetTab(TabVisibleIndex: Integer): TcxTab; - procedure OutError(SourceMethodName: TCaption; Msg: string); - public - constructor Create(AParent: TcxCustomTabControl); - destructor Destroy; override; - - function FindVisibleTab(TabIndex: TcxPCTabIndex; var TabVisibleIndex: Integer): Boolean; - procedure HideTab(TabIndex: TcxPCTabIndex); - procedure ShowTab(TabIndex: TcxPCTabIndex); - procedure Update; - function TabVisibleIndexOf(TabIndex: TcxPCTabIndex): Integer; - - property Count: Integer read GetCount; - property Tabs[TabVisibleIndex: Integer]: TcxTab read GetTab; default; - end; - - TcxPCPainterParentInfo = class - private - FParent: TcxCustomTabControl; - function GetActivePage: TcxTabSheet; - function GetCanvas: TcxCanvas; - function GetFont: TFont; - function GetIsTabsContainer: Boolean; - function GetTabPosition: TcxTabPosition; - function GetNavigatorPositione: TcxPCNavigatorPosition; - function GetMultiLine: Boolean; - function GetNavigatorButtonState( - Index: TcxPCNavigatorButton): TcxPCNavigatorButtonState; - function GetVisibleTab(TabVisibleIndex: Integer): TcxTab; - function GetTabHeight: Smallint; - function GetTabsOnBothSides: Boolean; - function GetTabWidth: Smallint; - function GetMainTabVisibleIndex: Integer; - function GetOptions: TcxPCOptions; - function GetPageColor(ATabVisibleIndex: Integer): TColor; - function GetPage(ATabVisibleIndex: Integer): TcxTabSheet; - function GetRaggedRight: Boolean; - function GetTabColor(ATabVisibleIndex: Integer): TColor; - function GetTabSlants: TcxTabSlants; - function GetNavigatorButtons: TcxPCNavigatorButtons; - function GetHeight: Integer; - function GetWidth: Integer; - function GetExtendedBottomOrRightTabsRect: TRect; - function GetExtendedTopOrLeftTabsRect: TRect; - function GetRowCount: Integer; - function GetScrollOpposite: Boolean; - function GetTopOrLeftPartRowCount: Integer; - function GetColor: TColor; - function GetHideTabs: Boolean; - function GetShowFrame: Boolean; - function GetRotate: Boolean; - function GetImageBorder: Integer; - protected - property Pages[ATabVisibleIndex: Integer]: TcxTabSheet read GetPage; - public - constructor Create(AParent: TcxCustomTabControl); - property ActivePage: TcxTabSheet read GetActivePage; - property Canvas: TcxCanvas read GetCanvas; - property Color: TColor read GetColor; - property ExtendedBottomOrRightTabsRect: TRect read GetExtendedBottomOrRightTabsRect; - property ExtendedTopOrLeftTabsRect: TRect read GetExtendedTopOrLeftTabsRect; - property Font: TFont read GetFont; - property Height: Integer read GetHeight; - property HideTabs: Boolean read GetHideTabs; - property ImageBorder: Integer read GetImageBorder; - property IsTabsContainer: Boolean read GetIsTabsContainer; - property MainTabVisibleIndex: Integer read GetMainTabVisibleIndex; - property MultiLine: Boolean read GetMultiLine; - property NavigatorButtonsState[Index: TcxPCNavigatorButton]: TcxPCNavigatorButtonState read GetNavigatorButtonState; - property NavigatorButtons: TcxPCNavigatorButtons read GetNavigatorButtons; - property NavigatorPosition: TcxPCNavigatorPosition read GetNavigatorPositione; - property Options: TcxPCOptions read GetOptions; - property PageColors[ATabVisibleIndex: Integer]: TColor read GetPageColor; - property RaggedRight: Boolean read GetRaggedRight; - property Rotate: Boolean read GetRotate; - property RowCount: Integer read GetRowCount; - property ScrollOpposite: Boolean read GetScrollOpposite; - property ShowFrame: Boolean read GetShowFrame; - property TabColors[ATabVisibleIndex: Integer]: TColor read GetTabColor; - property TabHeight: Smallint read GetTabHeight; - property TabPosition: TcxTabPosition read GetTabPosition; - property TabSlants: TcxTabSlants read GetTabSlants; - property TabsOnBothSides: Boolean read GetTabsOnBothSides; - property TabWidth: Smallint read GetTabWidth; - property TopOrLeftPartRowCount: Integer read GetTopOrLeftPartRowCount; - property VisibleTabs[TabVisibleIndex: Integer]: TcxTab read GetVisibleTab; - property Width: Integer read GetWidth; - end; - - TcxPCCustomPainter = class - private - FParentInfo: TcxPCPainterParentInfo; - FParentControl: TcxCustomTabControl; - function GetDisabledTextFaceColor: TColor; - function GetDisabledTextShadowColor: TColor; - function GetHighlightedTabBodyColor: TColor; - procedure PrepareTabControlImagesBitmapBackground(ABitmap: TBitmap); - protected - FOutTabImageAndTextData: TcxPCOutTabImageAndTextData; - class function AllowRotate: Boolean; virtual; - function CalculateTabNormalWidth(Tab: TcxTab): Integer; virtual; abstract; - procedure CorrectTabRect(TabVisibleIndex: Integer; var TabRectCorrection: TcxPCRectCorrection); virtual; - function CreateNewTabVerticalTextBitmap(TabVisibleIndex: Integer): TBitmap; - procedure DirectionalPolyline(const R: TRect; APoints: array of TPoint; - ATabPosition: TcxTabPosition; AColor: TColor); - function DoCustomDraw(TabVisibleIndex: Integer): Boolean; - procedure DrawNativeTabBackground(DC: HDC; ATab: TcxTabSheet); virtual; - procedure DrawTabImageAndText(ATab: TcxTab; ATabVisibleIndex: Integer); virtual; - procedure ExcludeTabContentClipRegion(ATabVisibleIndex: Integer); - procedure FillDisplayRect; virtual; - procedure FillTabPaneContent; virtual; - function GetButtonsDistance(AButton1, AButton2: TcxPCNavigatorButton): Integer; virtual; - function GetButtonsRegionFromTabsOffset: Integer; virtual; - function GetButtonsRegionHOffset: Integer; virtual; - function GetButtonsRegionWOffset: Integer; virtual; - function GetClientColor: TColor; virtual; - function GetClientRect: TRect; - function GetClientRectOffset: TRect; virtual; - function GetDefaultClientColor: TColor; virtual; - function GetDisplayRect: TRect; - function GetDisplayRectOffset: TRect; virtual; - function GetDrawImageOffset(TabVisibleIndex: Integer): TRect; virtual; abstract; - function GetDrawImageWithoutTextWOffset(TabVisibleIndex: Integer): TcxPCWOffset; virtual; abstract; - function GetDrawTextHOffset(TabVisibleIndex: Integer): TRect; virtual; abstract; - - function GetExtendedRect(const ARect, AExtension: TRect; ATabPosition: TcxTabPosition): TRect; - function GetFrameWidth: Integer; virtual; - - procedure AfterPaintTab(ATabVisibleIndex: Integer); virtual; - function AlwaysColoredTabs: Boolean; virtual; - function GetGoDialogPosition(GoDialogSize: TSize): TPoint; virtual; abstract; - function GetHighlightedTextColor(ATabVisibleIndex: Integer; - ATextColor: TColor): TColor; - function GetHotTrackColor: TColor; - function GetImageTextDistance(ATabVisibleIndex: Integer): Integer; virtual; abstract; - function GetMaxTabCaptionHeight: Integer; - function GetMinTabNormalWidth(ATabVisibleIndex: Integer): Integer; virtual; abstract; - function GetMinTabSelectionDistance: TcxPCDistance; virtual; abstract; - function GetNativeContentOffset: TRect; virtual; - function GetTabBaseImageSize: TSize; - function GetTabBodyColor(TabVisibleIndex: Integer): TColor; virtual; abstract; - function GetTabColor(ATabVisibleIndex: Integer): TColor; virtual; - function GetTabClipRgn(ATabVisibleIndex: Integer): TcxRegion; virtual; - function GetTabClipRgnOperation(ATabVisibleIndex: Integer): TcxRegionOperation; virtual; - function GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; virtual; abstract; - procedure GetTabNativePartAndState(ATabVisibleIndex: Integer; - out PartId, StateId: Integer); virtual; - function GetTabNativeState(ATabVisibleIndex: Integer): Integer; - function GetTabRotatedImageSize: TSize; - function GetTabsContainerOffsets: TRect; virtual; - function GetTabsNormalDistance: TcxPCDistance; virtual; - function GetTabsPosition(NavigatorButtons: TcxPCNavigatorButtons): TcxPCTabsPosition; virtual; abstract; - function GetTabVerticalTextBitmap(TabVisibleIndex: Integer): TBitmap; - function GetTextColor(ATabVisibleIndex: Integer): TColor; virtual; - function GetTooNarrowTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; virtual; abstract; - procedure Init; virtual; - procedure InternalDrawText(ACanvas: TCanvas; const ACaption: string; - ARect: TRect; ATabVisibleIndex: Integer); virtual; - procedure InternalInvalidateRect(Rect: TRect); - procedure InternalPaint; virtual; - procedure InternalPolyLine(const APoints: array of TPoint; AColor: TColor; - ACanvas: TCanvas = nil); - procedure InternalPrepareOutTabImageAndTextData(ATabVisibleIndex: Integer; - var AImageRect, ATextRect: TRect); virtual; abstract; - procedure InternalResetClipRegion; - function InternalSetClipRect(ClipR: TRect; IntersectWithCurrentClipRegion: Boolean = True): Boolean; - procedure InvalidateTabExtendedTabsRect(TabVisibleIndex: Integer); - procedure InvalidateTabRect(ATabVisibleIndex: Integer); virtual; - function IsAssignedImages: Boolean; - function IsCustomDraw: Boolean; - function IsEnableHotTrack: Boolean; virtual; - function IsNativePainting: Boolean; virtual; - function IsOverButton(X, Y: Integer; var Button: TcxPCNavigatorButton): Boolean; virtual; abstract; - function IsOverTab(TabVisibleIndex: Integer; X, Y: Integer): Boolean; virtual; - function IsTabHasImage(ATabVisibleIndex: Integer): Boolean; - function IsTabBorderThick(ATabVisibleIndex: Integer): Boolean; virtual; abstract; - function IsTabTransparent(ATabVisibleIndex: Integer): Boolean; virtual; - function NeedDisabledTextShadow: Boolean; virtual; - function NeedDoubleBuffer: Boolean; virtual; - function NeedRedrawOnResize: Boolean; virtual; - function NeedShowFrame: Boolean; virtual; - procedure Paint; virtual; - procedure PaintButtonsRegion; virtual; abstract; - procedure PaintClientArea; virtual; - procedure PaintFrame; virtual; abstract; - procedure PaintTabsRegion; virtual; abstract; - procedure PrepareTabCanvasFont(ATab: TcxTab; ACanvas: TcxCanvas); - procedure PrepareDrawTabContentBitmapBackground(ABitmap: TBitmap; - const ABitmapPos: TPoint; ATabVisibleIndex: Integer); virtual; - procedure RepaintButton(Button: TcxPCNavigatorButton; OldButtonState: TcxPCNavigatorButtonState); virtual; - procedure RepaintButtonsRegion; virtual; - procedure RepaintTab(TabVisibleIndex: Integer; TabPropertyChanged: TcxPCTabPropertyChanged); virtual; - procedure RotatePoint(const R: TRect; var P: TPoint; - ATabPosition: TcxTabPosition); - procedure RotatePolyline(const R: TRect; var APoints: array of TPoint; - ATabPosition: TcxTabPosition); - procedure StandardPainterPrepareOutTabImageAndTextData(TabVisibleIndex: Integer); - - procedure SaveClipRgn; - procedure RestoreClipRgn; - - property DisabledTextFaceColor: TColor read GetDisabledTextFaceColor; - property DisabledTextShadowColor: TColor read GetDisabledTextShadowColor; - property HighlightedTabBodyColor: TColor read GetHighlightedTabBodyColor; - - property ParentControl: TcxCustomTabControl read FParentControl; - property ParentInfo: TcxPCPainterParentInfo read FParentInfo; - public - constructor Create(AParent: TcxCustomTabControl); virtual; - destructor Destroy; override; - - function CalculateTabNormalHeight: Integer; virtual; abstract; - function GetGoDialogButtonBounds: TRect; virtual; abstract; - class function GetStandardStyle: TcxPCStandardStyle; virtual; - class function GetStyleID: TcxPCStyleID; virtual; - class function GetStyleName: TCaption; virtual; - class function HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; virtual; - class function IsDefault(ALookAndFeel: TcxLookAndFeel): Boolean; virtual; - class function IsMainTabBoundWithClient: Boolean; virtual; - class function IsMultiSelectionAccepted: Boolean; virtual; - class function IsStandardStyle: Boolean; virtual; - class function IsTabPressable: Boolean; virtual; - end; - - TcxPCPainterClass = class of TcxPCCustomPainter; - - TcxPCImageListPrepareBitmapBackgroundEvent = procedure(ABitmap: TBitmap) of object; - - TcxPCImageList = class - private - FBaseImageChangeLink: TChangeLink; - FBaseImages: TCustomImageList; - FFreeNotificator: TcxFreeNotificator; - FImageRotationAngle: TcxRotationAngle; - FParent: TcxCustomTabControl; - FRotatedImages: TcxPCImageListRotatedImagesElementArray; - FOnChange: TNotifyEvent; - FOnPrepareBitmapBackground: TcxPCImageListPrepareBitmapBackgroundEvent; - procedure BaseImageListChange(Sender: TObject); - procedure Change; - procedure ClearRotatedImages; - procedure DoPrepareBitmapBackground(ABitmap: TBitmap); - procedure FreeNotification(AComponent: TComponent); - class procedure OutError(SourceMethodName, Msg: TCaption); - procedure RotateImage(Index: Integer; BackgroundColor: TColor; Enabled: Boolean); - procedure RotateImages; - procedure SetImageRotationAngle(const Value: TcxRotationAngle); - procedure SetBaseImages(const Value: TCustomImageList); - function GetBaseImageSize: TSize; - function GetRotatedImageSize: TSize; - public - constructor Create(AParent: TcxCustomTabControl); - destructor Destroy; override; - procedure Draw(Canvas: TCanvas; X, Y, Index: Integer; BackgroundColor: TColor; - Enabled: Boolean = True); - - property BaseImages: TCustomImageList read FBaseImages write SetBaseImages; - property BaseImageSize: TSize read GetBaseImageSize; - property ImageRotationAngle: TcxRotationAngle read FImageRotationAngle write SetImageRotationAngle default ra0; - property RotatedImageSize: TSize read GetRotatedImageSize; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - property OnPrepareBitmapBackground: TcxPCImageListPrepareBitmapBackgroundEvent - read FOnPrepareBitmapBackground write FOnPrepareBitmapBackground; - end; - - { TcxTabSlants } - - TcxTabSlants = class(TPersistent) - private - FKind: TcxTabSlantKind; - FOwner: TPersistent; - FPositions: TcxTabSlantPositions; - FOnChange: TNotifyEvent; - procedure Changed; - procedure SetKind(Value: TcxTabSlantKind); - procedure SetPositions(Value: TcxTabSlantPositions); - protected - function GetOwner: TPersistent; override; - public - constructor Create(AOwner: TPersistent); - procedure Assign(Source: TPersistent); override; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - published - property Kind: TcxTabSlantKind read FKind write SetKind default skSlant; - property Positions: TcxTabSlantPositions read FPositions write SetPositions - default [spLeft]; - end; - - { TcxCustomTabControl } - - TcxCustomTabControl = class(TcxControl, IdxSkinSupport) - private - FChangeEventLockCount: Integer; - FClientRect: TRect; - FExtendedBottomOrRightTabsRect: TRect; - FExtendedTopOrLeftTabsRect: TRect; - FFirstVisibleTab, FLastVisibleTab: Integer; - FFocusable: Boolean; - FHideTabs: Boolean; - FHotTrack: Boolean; - FHotTrackNavigatorButton: TcxPCNavigatorButtonIndex; - FHotTrackTabVisibleIndex: Integer; - FImageBorder: Integer; - FImages: TcxPCImageList; - FIsClientRectLoaded: Boolean; - FIsLastTabFullyVisible: Boolean; - FIsTabsContainer: Boolean; - FMainTabVisibleIndex: Integer; - FMaxRotatedTabWidth: Integer; - FMaxTabCaptionWidth: Integer; - FMultiLine: Boolean; - FMultiSelect: Boolean; - FNavigatorButtons: TcxPCNavigatorButtons; - FNavigatorButtonStates: array[TcxPCNavigatorButton] of TcxPCNavigatorButtonState; - FNavigatorPosition: TcxPCNavigatorPosition; - FOptions: TcxPCOptions; - FOwnerDraw: Boolean; - FPainter: TcxPCCustomPainter; - FPressedNavigatorButton: TcxPCNavigatorButtonIndex; - FPressedTabVisibleIndex: Integer; - FRaggedRight: Boolean; - FRotate: Boolean; - FRowCount: Integer; - FRowHeight: Integer; - FScrollOpposite: Boolean; - FShowFrame: Boolean; - FStyle: TcxPCStyleID; - FTabCaptionAlignment: TAlignment; - FTabIndex: Integer; - FTabPosition: TcxTabPosition; - FTabs: TcxTabs; - FTabSize: TSmallPoint; - FTabSlants: TcxTabSlants; - FTabsPosition: TcxPCTabsPosition; - FTimer: TcxTimer; - FTopOrLeftPartRowCount: Integer; - FTracking: Integer; - FUpdating: Boolean; - FVisibleTabList: TcxVisibleTabList; - - FGoDialog: TcxPCGoDialog; - FIsGoDialogShowing: Boolean; - FGoDialogJustClosed: Boolean; - - FOnCanClose: TcxPCCanCloseEvent; - FOnChange: TNotifyEvent; - FOnChanging: TcxTabChangingEvent; - FOnDrawTab: TcxDrawTabEvent; - FOnDrawTabEx: TcxDrawTabExEvent; - FOnGetImageIndex: TcxGetTabImageEvent; - - procedure ArrowButtonClick(NavigatorButton: TcxPCNavigatorButton); - procedure Calculate; - procedure CalculateLongitudinalTabPositions; - procedure CalculateRowHeight; - procedure CalculateRowPositions; - procedure CalculateTabNormalSize(Tab: TcxTab); - procedure CalculateTabNormalSizes; - function CanMouseWheel(const AMouseScreenPos: TPoint): Boolean; - function CanPressButton(AButton: TcxPCNavigatorButton): Boolean; - procedure CloseButtonClick; - procedure CorrectMaxRotatedTabWidth; - procedure CorrectTabRect(TabVisibleIndex: Integer); - procedure CreateGoDialog; - procedure CreateTimer; - procedure DoDrawTabEx(ATabVisibleIndex: Integer; AFont: TFont); - function GetDisplayRect: TRect; - function GetImages: TCustomImageList; - function GetLineWidth(const ALineIndexBoundsA: TcxPCLineIndexBoundsArray; - ALineNumber, ATabsDistance: Integer): Integer; - function GetMainTabIndex: Integer; - function GetMaxRotatedTabWidth: Integer; - function GetNavigatorButton(NavigatorButtonIndex: TcxPCNavigatorButtonIndex): TcxPCNavigatorButton; - function GetNavigatorButtons(OnlyObligatoryButtons: Boolean): TcxPCNavigatorButtons; - function GetOptions: TcxPCOptions; - function GetStyle: TcxPCStyleID; - function GetTabExtendedTabsRect(TabVisibleIndex: Integer): TRect; - function GetTabsTab(TabIndex: Integer): TcxTab; - procedure InitializeLineBoundsA(var ALineIndexBoundsA: TcxPCLineIndexBoundsArray; AFirstIndex, ALastIndex: Integer); - function InternalGetClientRect: TRect; - function InternalGetShiftState: TShiftState; - procedure InternalInvalidateRect(Rect: TRect); - function IsTooSmallControlSize: Boolean; - function PassDesignMouseEvent(X, Y: Integer): Boolean; - procedure PlaceVisibleTabsOnRows(ATabsWidth, ATabsDistance: Integer); - procedure PrepareImagesBitmapBackground(ABitmap: TBitmap); - procedure RearrangeRows; - procedure ReadClientRectBottom(Reader: TReader); - procedure ReadClientRectLeft(Reader: TReader); - procedure ReadClientRectRight(Reader: TReader); - procedure ReadClientRectTop(Reader: TReader); - procedure RepaintTab(TabVisibleIndex: Integer; TabPropertyChanged: TcxPCTabPropertyChanged); - procedure SelectTab(ATabVisibleIndex: Integer; AAddToSelected: Boolean); - procedure SetHideTabs(const Value: Boolean); - procedure SetHotTrack(Value: Boolean); - procedure SetImageBorder(const Value: Integer); - procedure SetImages(const Value: TCustomImageList); - procedure SetIsTabsContainer(Value: Boolean); - procedure SetMaxRotatedTabWidth(Value: Integer); - procedure SetMultiLine(const Value: Boolean); - procedure SetMultiSelect(const Value: Boolean); - procedure SetNavigatorPosition(const Value: TcxPCNavigatorPosition); - procedure SetOptions(Value: TcxPCOptions); - procedure SetOwnerDraw(const Value: Boolean); - procedure SetRaggedRight(const Value: Boolean); - procedure SetRotate(const Value: Boolean); - procedure SetScrollOpposite(const Value: Boolean); - procedure SetShowFrame(const Value: Boolean); - procedure SetStyle(const Value: TcxPCStyleID); - procedure SetTabCaptionAlignment(Value: TAlignment); - procedure SetTabHeight(const Value: Smallint); - procedure SetTabIndex(Value: Integer); - procedure SetTabPosition(const Value: TcxTabPosition); - procedure SetTabs(const Value: TcxTabs); - procedure SetTabSlants(Value: TcxTabSlants); - procedure SetTabsTab(TabIndex: Integer; const Value: TcxTab); - procedure SetTabWidth(const Value: Smallint); - procedure SynchronizeHotTrackStates(Shift: TShiftState); - procedure SynchronizeNavigatorButtons; - procedure SynchronizeTabImagesRotationAngle; - procedure TabSlantsChanged(Sender: TObject); - procedure TimerEventHandler(Sender: TObject); - procedure UpdateButtonsState; - procedure UpdateTabPosition(ANavigatorButtons: TcxPCNavigatorButtons); - procedure WriteClientRectBottom(Writer: TWriter); - procedure WriteClientRectLeft(Writer: TWriter); - procedure WriteClientRectRight(Writer: TWriter); - procedure WriteClientRectTop(Writer: TWriter); - procedure CMDesignHitTest(var Message: TCMDesignHitTest); message CM_DESIGNHITTEST; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - procedure CMDialogKey(var Message: TCMDialogKey); message CM_DIALOGKEY; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CMParentColorChanged(var Message: TMessage); message CM_PARENTCOLORCHANGED; - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; - procedure WMPrintClient(var Message: TWMPrintClient); message WM_PRINTCLIENT; - protected - procedure AdjustClientRect(var Rect: TRect); override; - procedure ChangeScale(M, D: Integer); override; - procedure CreateHandle; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure DefineProperties(Filer: TFiler); override; - function DoMouseWheelDown(Shift: TShiftState; MousePos: - TPoint): Boolean; override; - function DoMouseWheelUp(Shift: TShiftState; MousePos: - TPoint): Boolean; override; - procedure EraseBackground(DC: HDC); virtual; - procedure FocusChanged; override; - procedure FontChanged; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure Loaded; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - procedure MouseLeave(AControl: TControl); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); override; - function NeedsScrollBars: Boolean; override; - function NeedRedrawOnResize: Boolean; override; - procedure Paint; override; - procedure Resize; override; - - procedure AfterPaintTab(ACanvas: TcxCanvas; ATab: TcxTab; - AImageAndTextData: TcxPCOutTabImageAndTextData); virtual; - function DoCanClose: Boolean; virtual; - procedure DoClose; virtual; - function HandleDialogChar(Key: Integer): Boolean; virtual; - function HasBackground: Boolean; override; - function CanChange(NewTabIndex: Integer): Boolean; dynamic; - function CanShowTab(TabIndex: Integer): Boolean; virtual; - procedure Change; dynamic; - procedure CorrectFirstVisibleTab(TabVisibleIndex: Integer); - procedure DoShowGoDialog; virtual; - procedure DrawTab(TabIndex: Integer; const Rect: TRect; Active: Boolean); virtual; - function GetActivePage: TcxTabSheet; virtual; - function GetImageIndex(ATabIndex: Integer): Integer; virtual; - function GetPage(ATabIndex: Integer): TcxTabSheet; virtual; - procedure GoDialogClickEventHandler(ATabControlItemIndex: Integer); virtual; - procedure HideGoDialog(ATabControlItemIndex: Integer); - procedure ImageListChange(Sender: TObject); virtual; - function InternalKeyDown(var Key: Word; Shift: TShiftState): Boolean; virtual; - function IsChangeEventLocked: Boolean; - procedure LockChangeEvent(ALock: Boolean); - class procedure OutError(SourceMethodName: TCaption; Msg: TCaption); - procedure PrepareTabCanvasFont(ATab: TcxTab; ACanvas: TcxCanvas); virtual; - procedure RequestLayout; dynamic; - procedure SetDefaultStyle; - procedure SetModified; - procedure ShowGoDialog; - function TabIndexTabMustBeVisible: Boolean; virtual; - procedure UpdateTabImages; - - property DisplayRect: TRect read GetDisplayRect; - property FirstVisibleTab: Integer read FFirstVisibleTab write FFirstVisibleTab; - property Focusable: Boolean read FFocusable write FFocusable default True; - property HideTabs: Boolean read FHideTabs write SetHideTabs default False; - property HotTrack: Boolean read FHotTrack write SetHotTrack default False; - property ImageBorder: Integer read FImageBorder write SetImageBorder default 0; - property Images: TCustomImageList read GetImages write SetImages; - property IsTabsContainer: Boolean read FIsTabsContainer - write SetIsTabsContainer default False; - property MainTabIndex: Integer read GetMainTabIndex; - property MaxRotatedTabWidth: Integer read GetMaxRotatedTabWidth - write SetMaxRotatedTabWidth default 0; - property MultiLine: Boolean read FMultiLine write SetMultiLine default False; - property MultiSelect: Boolean read FMultiSelect write SetMultiSelect default False; - property NavigatorPosition: TcxPCNavigatorPosition read FNavigatorPosition - write SetNavigatorPosition default npRightTop; - property Options: TcxPCOptions read GetOptions write SetOptions - default cxPCDefaultOptions; - property OwnerDraw: Boolean read FOwnerDraw write SetOwnerDraw default False; - property RaggedRight: Boolean read FRaggedRight write SetRaggedRight default False; - property Rotate: Boolean read FRotate write SetRotate default False; - property ScrollOpposite: Boolean read FScrollOpposite - write SetScrollOpposite default False; - property ShowFrame: Boolean read FShowFrame write SetShowFrame default False; - property Style: TcxPCStyleID read GetStyle write SetStyle default cxPCDefaultStyle; - property TabCaptionAlignment: TAlignment read FTabCaptionAlignment - write SetTabCaptionAlignment default taCenter; - property TabHeight: Smallint read FTabSize.Y write SetTabHeight default 0; - property TabIndex: Integer read FTabIndex write SetTabIndex default -1; - property TabPosition: TcxTabPosition read FTabPosition write SetTabPosition - default tpTop; - property TabSlants: TcxTabSlants read FTabSlants write SetTabSlants; - property TabsTabs[TabIndex: Integer]: TcxTab read GetTabsTab write SetTabsTab; - property TabWidth: Smallint read FTabSize.X write SetTabWidth default 0; - property VisibleTabList: TcxVisibleTabList read FVisibleTabList; - property OnCanClose: TcxPCCanCloseEvent read FOnCanClose write FOnCanClose; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - property OnChanging: TcxTabChangingEvent read FOnChanging write FOnChanging; - property OnDrawTab: TcxDrawTabEvent read FOnDrawTab write FOnDrawTab; - property OnDrawTabEx: TcxDrawTabExEvent read FOnDrawTabEx write FOnDrawTabEx; - property OnGetImageIndex: TcxGetTabImageEvent read FOnGetImageIndex write FOnGetImageIndex; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function CanFocus: Boolean; override; - function GetOptimalSize: Integer; - procedure GetTabOrderList(List: TList); override; - function IndexOfTabAt(X, Y: Integer): Integer; - procedure ScrollTabs(Delta: Integer); - procedure SetStandardStyle(StandardStyle: TcxPCStandardStyle); - procedure SetStyleByStyleName(StyleName: TCaption); - property LookAndFeel; - property Painter: TcxPCCustomPainter read FPainter; - property ParentBackground; - property RowCount: Integer read FRowCount; - property Tabs: TcxTabs read FTabs write SetTabs; - property TabStop default True; - property TopOrLeftPartRowCount: Integer read FTopOrLeftPartRowCount; - end; - - { TcxPageControl } - - TcxPageControl = class(TcxCustomTabControl) - private - FActivePage: TcxTabSheet; - FActivePageSetting: Boolean; - FNewDockSheet: TcxTabSheet; - FPageInserting: Boolean; - FPages: TList; - FUndockingPage: TcxTabSheet; - FOnPageChanging: TcxPageChangingEvent; - procedure ChangeActivePage(APage: TcxTabSheet); - function GetActivePageIndex: Integer; - function GetDockClientFromPoint(P: TPoint): TControl; - function GetPageCount: Integer; - function GetTabCount: Integer; - procedure InsertPage(APage: TcxTabSheet); - procedure RemovePage(APage: TcxTabSheet); - procedure SetActivePage(APage: TcxTabSheet); - procedure SetActivePageIndex(Value: Integer); - procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; - procedure WMLButtonDblClk(var Message: TWMLButtonDblClk); message WM_LBUTTONDBLCLK; - procedure CMDockNotification(var Message: TCMDockNotification); message CM_DOCKNOTIFICATION; - procedure CMControlChange(var Message: TCMControlChange); message CM_CONTROLCHANGE; - procedure CMUnDockClient(var Message: TCMUnDockClient); message CM_UNDOCKCLIENT; - protected - procedure AlignControls(AControl: TControl; var Rect: TRect); override; - function CanChange(NewTabIndex: Integer): Boolean; override; - function CanFocusOnClick: Boolean; override; - procedure Change; override; - procedure DoAddDockClient(Client: TControl; const ARect: TRect); override; - function DockClient(DockSource: TDragDockObject; - MousePos: TPoint): Integer; virtual; - procedure DoClose; override; - procedure DockOver(Source: TDragDockObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); override; - procedure DoRemoveDockClient(Client: TControl); override; - function GetActivePage: TcxTabSheet; override; - function GetPage(ATabIndex: Integer): TcxTabSheet; override; - procedure GetSiteInfo(Client: TControl; var InfluenceRect: TRect; - MousePos: TPoint; var CanDock: Boolean); override; - procedure ImageListChange(Sender: TObject); override; - procedure Loaded; override; - procedure RequestLayout; override; - procedure SetChildOrder(Child: TComponent; Order: Integer); override; - procedure ShowControl(AControl: TControl); override; - function TabIndexTabMustBeVisible: Boolean; override; - function UndockClient(NewTarget, Client: TControl): Boolean; - virtual; - function DoUnDock(NewTarget: TWinControl; Client: TControl): Boolean; override; - {$IFNDEF DELPHI12} - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - {$ENDIF} - function CanChangeActivePage(NewPage: TcxTabSheet): Boolean; dynamic; - procedure ControlChange(Inserting: Boolean; Child: TControl); virtual; - function GetPageFromDockClient(Client: TControl): TcxTabSheet; - procedure PageChange; dynamic; - procedure PageChanging(NewPage: TcxTabSheet; var AllowChange: Boolean); - procedure UpdateActivePage; virtual; - procedure UpdateTab(APage: TcxTabSheet); - procedure UpdateTabs; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function FindNextPage(ACurrentPage: TcxTabSheet; - AGoForward, ACheckTabAccessibility: Boolean): TcxTabSheet; - function FindNextPageEx(ACurrentPage: TcxTabSheet; - AGoForward, ACheckTabAccessibility, ACircular: Boolean): TcxTabSheet; - {$IFDEF DELPHI12} - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - {$ENDIF} - procedure DockDrop(Source: TDragDockObject; X, Y: Integer); override; - procedure SelectNextPage(GoForward: Boolean; CheckTabVisible: Boolean = True); - property ActivePageIndex: Integer read GetActivePageIndex - write SetActivePageIndex; - property PageCount: Integer read GetPageCount; - property Pages[Index: Integer]: TcxTabSheet read GetPage; - property TabCount: Integer read GetTabCount; - published - property ActivePage: TcxTabSheet read FActivePage write SetActivePage; - property Align; - property Anchors; - property BiDiMode; - property Color; - property Constraints; - property DockSite; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property Focusable; - property Font; - property HideTabs; - property HotTrack; - property ImageBorder; - property Images; - property LookAndFeel; - property MaxRotatedTabWidth; - property MultiLine; - property NavigatorPosition; - property Options; - property OwnerDraw; - property ParentBackground; - property ParentBiDiMode; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property RaggedRight; - property Rotate; - property ScrollOpposite; - property ShowFrame; - property ShowHint; - property Style; - property TabHeight; - property TabOrder; - property TabPosition; - property TabSlants; - property TabStop; - property TabWidth; - property Visible; - property OnCanClose; - property OnChange; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDockDrop; - property OnDockOver; - property OnDragDrop; - property OnDragOver; - property OnDrawTab; - property OnDrawTabEx; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnGetImageIndex; - property OnGetSiteInfo; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnPageChanging: TcxPageChangingEvent read FOnPageChanging - write FOnPageChanging; - property OnResize; - property OnStartDock; - property OnStartDrag; - property OnUnDock; - end; - - TcxTabSheet = class(TCustomControl) - private - FHighlighted: Boolean; - FImageIndex: TImageIndex; - FPageControl: TcxPageControl; - FTab: TcxTab; - FTabVisible: Boolean; - FOnHide: TNotifyEvent; - FOnShow: TNotifyEvent; - function GetPageIndex: Integer; - function GetPainter: TcxPCCustomPainter; - function GetTabIndex: Integer; - procedure InternalColorChanged; - procedure SetHighlighted(const Value: Boolean); - procedure SetImageIndex(const Value: TImageIndex); - procedure SetPageControl(const Value: TcxPageControl); - procedure SetPageIndex(const Value: Integer); - procedure SetTabVisible(const Value: Boolean); - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure CMInvalidate(var Message: TMessage); message CM_INVALIDATE; - procedure CMParentColorChanged(var Message: TMessage); message CM_PARENTCOLORCHANGED; - procedure CMShowingChanged(var Message: TMessage); message CM_SHOWINGCHANGED; - procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure DoHide; dynamic; - procedure DoShow; dynamic; - procedure EnabledChanged; dynamic; - procedure PagePropertyChanged; - procedure SetParent(AParent: TWinControl); override; - procedure SetParentPageControl(AParentPageControl: TcxPageControl); virtual; - procedure ShowingChanged; dynamic; - procedure TextChanged; dynamic; - // - property Painter: TcxPCCustomPainter read GetPainter; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property PageControl: TcxPageControl read FPageControl write SetPageControl; - property TabIndex: Integer read GetTabIndex; - published - property BorderWidth; - property Caption; - property Color; - property Constraints; - property DragMode; - property Enabled; - property Font; - property Height stored False; - property Highlighted: Boolean read FHighlighted write SetHighlighted default False; - property ImageIndex: TImageIndex read FImageIndex write SetImageIndex default -1; - property Left stored False; - property PageIndex: Integer read GetPageIndex write SetPageIndex stored False; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ShowHint; - property TabVisible: Boolean read FTabVisible write SetTabVisible default True; - property Top stored False; - property Visible stored False; - property Width stored False; - property OnClick; -{$IFDEF DELPHI5} - property OnContextPopup; -{$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnHide: TNotifyEvent read FOnHide write FOnHide; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnResize; - property OnShow: TNotifyEvent read FOnShow write FOnShow; - property OnStartDrag; - end; - - { TcxTabControl } - - TcxTabControl = class(TcxCustomTabControl) - public - property DisplayRect; - published - property Align; - property Anchors; - property BiDiMode; - property Color; - property Constraints; - property DockSite; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property Focusable; - property Font; - property HideTabs; - property HotTrack; - property ImageBorder; - property Images; - property LookAndFeel; - property MaxRotatedTabWidth; - property MultiLine; - property MultiSelect; - property NavigatorPosition; - property Options; - property OwnerDraw; - property ParentBackground; - property ParentBiDiMode; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property RaggedRight; - property Rotate; - property ScrollOpposite; - property ShowFrame; - property ShowHint; - property Style; - property TabHeight; - property TabIndex; - property TabOrder; - property TabPosition; - property Tabs; - property TabSlants; - property TabStop; - property TabWidth; - property Visible; - property OnCanClose; - property OnChange; - property OnChanging; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnDockDrop; - property OnDockOver; - property OnDragDrop; - property OnDragOver; - property OnDrawTab; - property OnDrawTabEx; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnGetImageIndex; - property OnGetSiteInfo; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnResize; - property OnStartDock; - property OnStartDrag; - property OnUnDock; - end; - -procedure CorrectRect(var Rect: TRect; RectCorrection: TcxPCRectCorrection); -function DistanceGetter(const Distance: TcxPCDistance; const LongitudinalDistance: Boolean): Integer; -function GetButtonCount(NavigatorButtons: TcxPCNavigatorButtons): Integer; -function GetTextRotationAngle(TabControl: TcxCustomTabControl): TcxRotationAngle; -procedure InitializeLineBoundsArray(TabControl: TcxCustomTabControl; - var LineIndexBoundsA: TcxPCLineIndexBoundsArray); -procedure InitializeVisibleTabRange(TabControl: TcxCustomTabControl; - var FirstIndex, LastIndex: Integer); -function InternalGetTextRotationAngle(TabControl: TcxCustomTabControl): TcxRotationAngle; -function InternalIsVerticalText(TabControl: TcxCustomTabControl): Boolean; -function IsBottomToTopAlignment(TabControl: TcxCustomTabControl): Boolean; -function IsOneOfButtons(AButton1, AButton2, AButton: TcxPCNavigatorButton): Boolean; -function IsRightToLeftAlignment(TabControl: TcxCustomTabControl): Boolean; -function IsVerticalText(TabControl: TcxCustomTabControl): Boolean; -function PointGetter(const APoint: TPoint; AIsY: Boolean): Longint; -procedure PointSetter(var APoint: TPoint; AIsY: Boolean; AValue: Longint); -procedure RectSetter(var ARect: TRect; AIsLeftTop, AIsY: Boolean; - AValue: Longint); -function RotateRect(const ARect: TRect; ATabPosition: TcxTabPosition): TRect; -function RotateRectBack(const ARect: TRect; ATabPosition: TcxTabPosition): TRect; -function TextSize(ATab: TcxTab; const AText: string; AFont: TFont = nil): TSize; -procedure ValidateRect(var R: TRect); - -function GetPCStyleName(AStyleID: TcxPCStyleID): string; -function PageControlDependsControls: TList; - -var - TabScrollingDelay: Integer = 150; - TabScrollingStartDelay: Integer = 300; - -implementation - -uses - Math, cxPCConsts, cxPCPainters, cxPCPaintersFactory, dxThemeConsts, dxThemeManager, dxUxTheme; - -var - FBackgroundBitmap: TBitmap = nil; - FDependsControls: TList; - -procedure CorrectRect(var Rect: TRect; RectCorrection: TcxPCRectCorrection); -begin - Inc(Rect.Top, RectCorrection.dTop); - Inc(Rect.Bottom, RectCorrection.dBottom); - Inc(Rect.Left, RectCorrection.dLeft); - Inc(Rect.Right, RectCorrection.dRight); -end; - -function DistanceGetter(const Distance: TcxPCDistance; const LongitudinalDistance: Boolean): Integer; -begin - if LongitudinalDistance then - Result := Distance.dw - else - Result := Distance.dh; -end; - -function GetButtonCount(NavigatorButtons: TcxPCNavigatorButtons): Integer; -var - NavigatorButton: TcxPCNavigatorButton; -begin - Result := 0; - for NavigatorButton := Low(TcxPCNavigatorButton) to High(TcxPCNavigatorButton) do - if NavigatorButton in NavigatorButtons then - Inc(Result); -end; - -function GetControlRect(AControl: TControl): TRect; -begin - Result := Rect(0, 0, AControl.Width, AControl.Height); -end; - -function GetTextRotationAngle(TabControl: TcxCustomTabControl): TcxRotationAngle; -begin - if IsVerticalText(TabControl) then - if pcoTopToBottomText in TabControl.Options then - Result := raMinus90 - else - Result := raPlus90 - else - Result := ra0; -end; - -procedure InitializeLineBoundsArray(TabControl: TcxCustomTabControl; var LineIndexBoundsA: TcxPCLineIndexBoundsArray); -var - LineCount, I: Integer; - FirstIndex, LastIndex: Integer; -begin - SetLength(LineIndexBoundsA, TabControl.RowCount); - if TabControl.RowCount = 0 then - Exit; - for LineCount := 0 to TabControl.RowCount - 1 do - LineIndexBoundsA[LineCount].Left := -1; - InitializeVisibleTabRange(TabControl, FirstIndex, LastIndex); - for I := FirstIndex to LastIndex do - with LineIndexBoundsA[TabControl.FVisibleTabList[I].VisibleRow] do - if Left = -1 then - begin - Left := I; - Right := I; - end - else - begin - if I < Left then - Left := I; - if I > Right - then Right := I; - end; -end; - -procedure InitializeVisibleTabRange(TabControl: TcxCustomTabControl; var FirstIndex, - LastIndex: Integer); -begin - if TabControl.MultiLine then - begin - FirstIndex := 0; - LastIndex := TabControl.FVisibleTabList.Count - 1; - end - else - begin - FirstIndex := TabControl.FFirstVisibleTab; - if TabControl.FFirstVisibleTab = -1 then - LastIndex := -2 - else - LastIndex := TabControl.FLastVisibleTab; - end; -end; - -function InternalGetTextRotationAngle(TabControl: TcxCustomTabControl): TcxRotationAngle; -begin - if TabControl.Painter.IsNativePainting then - Result := ra0 - else - Result := GetTextRotationAngle(TabControl); -end; - -function InternalIsVerticalText(TabControl: TcxCustomTabControl): Boolean; -begin - Result := not TabControl.Painter.IsNativePainting and - IsVerticalText(TabControl); -end; - -function InternalGetCursorPos: TPoint; -begin - GetCursorPos(Result); -end; - -function IsBottomToTopAlignment(TabControl: TcxCustomTabControl): Boolean; -begin - with TabControl do - begin - Result := (TabPosition in [tpLeft, tpRight]) and (not Rotate) and - not(pcoTopToBottomText in Options); - end; -end; - -function IsOneOfButtons(AButton1, AButton2, AButton: TcxPCNavigatorButton): Boolean; -begin - Result := (AButton = AButton1) or (AButton = AButton2); -end; - -function IsRightToLeftAlignment(TabControl: TcxCustomTabControl): Boolean; -begin - with TabControl do - begin - Result := (TabPosition in [tpTop, tpBottom]) and Rotate and - (pcoTopToBottomText in Options); - end; -end; - -function IsVerticalText(TabControl: TcxCustomTabControl): Boolean; -begin - with TabControl do - begin - Result := (TabPosition in [tpLeft, tpRight]) and (not Rotate); - Result := Result or (TabPosition in [tpTop, tpBottom]) and Rotate; - end; -end; - -function PointGetter(const APoint: TPoint; AIsY: Boolean): Longint; -begin - if AIsY then - Result := APoint.Y - else - Result := APoint.X; -end; - -procedure PointSetter(var APoint: TPoint; AIsY: Boolean; AValue: Longint); -begin - if AIsY then - APoint.Y := AValue - else - APoint.X := AValue; -end; - -procedure PrepareBitmap(ABitmap: TBitmap; AParametersSource: TcxCanvas; - ASize: TSize; ABackgroundColor: TColor); -begin - ABitmap.Width := ASize.cx; - ABitmap.Height := ASize.cy; - with ABitmap.Canvas do - begin - Font.Assign(AParametersSource.Font); - Pen := AParametersSource.Pen; - - Brush := AParametersSource.Brush; - Brush.Color := ABackgroundColor; - Brush.Style := bsSolid; - FillRect(Rect(0, 0, ABitmap.Width, ABitmap.Height)); - Brush := AParametersSource.Brush; - end; -end; - -procedure RectSetter(var ARect: TRect; AIsLeftTop, AIsY: Boolean; - AValue: Longint); -begin - if AIsLeftTop then - begin - if AIsY then - ARect.Top := AValue - else - ARect.Left := AValue; - end - else - begin - if AIsY then - ARect.Bottom := AValue - else - ARect.Right := AValue; - end; -end; - -function RotateRect(const ARect: TRect; ATabPosition: TcxTabPosition): TRect; -begin - case ATabPosition of - tpLeft: Result := Rect(ARect.Top, ARect.Right, ARect.Bottom, ARect.Left); - tpTop: Result := ARect; - tpRight: Result := Rect(ARect.Bottom, ARect.Left, ARect.Top, ARect.Right); - tpBottom: Result := Rect(ARect.Right, ARect.Bottom, ARect.Left, ARect.Top); - end; -end; - -function RotateRectBack(const ARect: TRect; ATabPosition: TcxTabPosition): TRect; -begin - case ATabPosition of - tpLeft: Result := RotateRect(ARect, tpRight); - tpTop: Result := ARect; - tpRight: Result := RotateRect(ARect, tpLeft); - tpBottom: Result := RotateRect(ARect, tpBottom); - end; -end; - -function TextSize(ATab: TcxTab; const AText: string; AFont: TFont = nil): TSize; -begin - if AFont = nil then - ATab.ParentControl.PrepareTabCanvasFont(ATab, cxScreenCanvas) - else - cxScreenCanvas.Font := AFont; - Result := cxTextSize(cxScreenCanvas.Handle, AText); - cxScreenCanvas.Dormant; -end; - -procedure ValidateRect(var R: TRect); -begin - with R do - begin - if Right < Left then - Right := Left; - if Bottom < Top then - Bottom := Top; - end; -end; - -function VerifyImageList(Images: TCustomImageList): Boolean; -begin - Result := (Images <> nil) and (Images.Count > 0); -end; - -function GetPCStyleName(AStyleID: TcxPCStyleID): string; -var - APainterClass: TcxPCPainterClass; -begin - if AStyleID = cxPCDefaultStyle then - Result := cxPCDefaultStyleName - else - begin - APainterClass := PaintersFactory.GetPainterClass(AStyleID); - if APainterClass = nil then - Result := '' - else - Result := APainterClass.GetStyleName; - end; -end; - -function PageControlDependsControls: TList; -begin - Result := FDependsControls; -end; - -{ TcxTabSlants } - -constructor TcxTabSlants.Create(AOwner: TPersistent); -begin - inherited Create; - FOwner := AOwner; - FKind := skSlant; - FPositions := [spLeft]; -end; - -procedure TcxTabSlants.Assign(Source: TPersistent); -begin - if Source is TcxTabSlants then - begin - Kind := TcxTabSlants(Source).Kind; - Positions := TcxTabSlants(Source).Positions; - end - else - inherited Assign(Source); -end; - -function TcxTabSlants.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -procedure TcxTabSlants.Changed; -begin - if Assigned(FOnChange) then - FOnChange(Self); -end; - -procedure TcxTabSlants.SetKind(Value: TcxTabSlantKind); -begin - if Value <> FKind then - begin - FKind := Value; - Changed; - end; -end; - -procedure TcxTabSlants.SetPositions(Value: TcxTabSlantPositions); -begin - if Value <> FPositions then - begin - FPositions := Value; - Changed; - end; -end; - -{ TcxCustomTabControl } - -procedure TcxCustomTabControl.ArrowButtonClick( - NavigatorButton: TcxPCNavigatorButton); -var - SpecialAlignment: Boolean; - Direction: Integer; -begin - if FNavigatorButtonStates[NavigatorButton] = nbsDisabled then Exit; - SpecialAlignment := IsRightToLeftAlignment(Self) or IsBottomToTopAlignment(Self); - if (SpecialAlignment and (NavigatorButton = nbTopLeft)) or - ((not SpecialAlignment) and (NavigatorButton = nbBottomRight)) then - Direction := 1 - else - Direction := -1; - Inc(FFirstVisibleTab, Direction); - RequestLayout; -end; - -procedure TcxCustomTabControl.Calculate; - -var - cTabsDistance: Integer; // c - longitudinal coordinate - - function InitializeVariables: Boolean; - begin - FNavigatorButtons := []; - SynchronizeNavigatorButtons; - FTabsPosition := FPainter.GetTabsPosition([]); - Result := FTabsPosition.NormalRowWidth > 0; - if not Result then Exit; - cTabsDistance := DistanceGetter(FPainter.GetTabsNormalDistance, not Rotate{along "c" axis}); - end; - - procedure MultiLineCalculate; - begin - if not InitializeVariables then Exit; - - PlaceVisibleTabsOnRows(FTabsPosition.NormalRowWidth, cTabsDistance); - CalculateLongitudinalTabPositions; - CalculateRowHeight; - RearrangeRows; - end; - - procedure NotMultiLineCalculate; - - procedure SetTabRows; - var - FirstIndex, LastIndex, I: Integer; - begin - InitializeVisibleTabRange(Self, FirstIndex, LastIndex); - for I := FirstIndex to LastIndex do - with FVisibleTabList[I] do - begin - FRow := 0; - FVisibleRow := 0; - end; - end; - - begin - FRowCount := 1; - FTopOrLeftPartRowCount := IfThen(TabPosition in [tpTop, tpLeft], 1, 0); - CalculateLongitudinalTabPositions; - if IsTooSmallControlSize then Exit; - SetTabRows; - CalculateRowHeight; - CalculateRowPositions; - end; - - procedure ResetControlInternalVariables; - var - VisibleTabCount: Integer; - - procedure ValidateTabVisibleIndex(var TabVisibleIndex: Integer); - begin - if TabVisibleIndex >= VisibleTabCount then - TabVisibleIndex := -1; - end; - - begin - VisibleTabCount := FVisibleTabList.Count; - - FExtendedBottomOrRightTabsRect := cxEmptyRect; - FExtendedTopOrLeftTabsRect := cxEmptyRect; - - if (FFirstVisibleTab = -1) and (VisibleTabCount > 0) then - FFirstVisibleTab := 0; - if FFirstVisibleTab >= VisibleTabCount then - FFirstVisibleTab := VisibleTabCount - 1; - FLastVisibleTab := FFirstVisibleTab; - - ValidateTabVisibleIndex(FHotTrackTabVisibleIndex); - ValidateTabVisibleIndex(FMainTabVisibleIndex); - ValidateTabVisibleIndex(FPressedTabVisibleIndex); - - FRowCount := 0; - - if FTabIndex >= Tabs.Count then - FTabIndex := Tabs.Count - 1; - - FTopOrLeftPartRowCount := 0; - end; - -begin - ResetControlInternalVariables; - if FVisibleTabList.Count = 0 then - begin - InitializeVariables; - Exit; - end; - CalculateTabNormalSizes; - if MultiLine then - MultiLineCalculate - else - NotMultiLineCalculate; -end; - -procedure TcxCustomTabControl.CalculateLongitudinalTabPositions; - - procedure InternalCalculateLongitudinalTabPositions( - AFirstIndex, ALastIndex: Integer; ACalculateAll: Boolean = False; Row: Integer = 0); - var - I: Integer; - ALineStartPosition, ALineFinishPosition: Integer; - ATabStartPosition, ATabFinishPosition, ATabWidth: Integer; - ADistanceBetweenTabs: Integer; - AIsY: Boolean; - ASign: Integer; - begin - AIsY := TabPosition in [tpLeft, tpRight]; - ALineStartPosition := PointGetter(FTabsPosition.NormalTabsRect.TopLeft, AIsY); - ASign := 1; - if IsRightToLeftAlignment(Self) or IsBottomToTopAlignment(Self) then - begin - ALineFinishPosition := -ALineStartPosition; - Inc(ALineStartPosition, FTabsPosition.NormalRowWidth - 1); - ASign := -1; - end - else - ALineFinishPosition := ALineStartPosition + FTabsPosition.NormalRowWidth - 1; - ADistanceBetweenTabs := DistanceGetter(FPainter.GetTabsNormalDistance, not Rotate); - - ATabStartPosition := ALineStartPosition; - ATabFinishPosition := ATabStartPosition; - for I := AFirstIndex to ALastIndex do - begin - FLastVisibleTab := I; - ATabWidth := FVisibleTabList[I].NormalLongitudinalSize; - ATabFinishPosition := ATabStartPosition + (ATabWidth - 1) * ASign; - with FVisibleTabList[I] do - if ASign > 0 then - PointSetter(FTabPosition.TabNormalPosition, AIsY, ATabStartPosition) - else - PointSetter(FTabPosition.TabNormalPosition, AIsY, ATabFinishPosition); - - ATabStartPosition := ATabFinishPosition + (1 + ADistanceBetweenTabs) * ASign; - if (ATabStartPosition * ASign > ALineFinishPosition) and (not ACalculateAll) then - Break; - end; - FIsLastTabFullyVisible := (ATabFinishPosition * ASign <= ALineFinishPosition) - and (FLastVisibleTab = ALastIndex); - end; - - procedure NotMultiLineCalculateLongitudinalTabPositions; - var - APrevFirstVisibleTab: Integer; - begin - APrevFirstVisibleTab := FFirstVisibleTab; - FFirstVisibleTab := 0; - - UpdateTabPosition(GetNavigatorButtons(True)); - if IsTooSmallControlSize then Exit; - InternalCalculateLongitudinalTabPositions(FFirstVisibleTab, FVisibleTabList.Count - 1, True); - - if not FIsLastTabFullyVisible then - begin - FFirstVisibleTab := APrevFirstVisibleTab; - - UpdateTabPosition(GetNavigatorButtons(False)); - if IsTooSmallControlSize then Exit; - - InternalCalculateLongitudinalTabPositions(FFirstVisibleTab, FVisibleTabList.Count - 1); - - if FIsLastTabFullyVisible then - while FFirstVisibleTab > 0 do - begin - Dec(FFirstVisibleTab); - InternalCalculateLongitudinalTabPositions(FFirstVisibleTab, FVisibleTabList.Count - 1); - if not FIsLastTabFullyVisible then - begin - Inc(FFirstVisibleTab); - InternalCalculateLongitudinalTabPositions(FFirstVisibleTab, FVisibleTabList.Count - 1); - Break; - end; - end; - end; - SynchronizeNavigatorButtons; - UpdateButtonsState; - end; - - procedure MultiLineCalculateLongitudinalTabPositions; - var - LineFreeSpaceWidth, LineFreeSpaceWidthRest, TotalTabsNormalWidth: Integer; - LineIndexBoundsA: TcxPCLineIndexBoundsArray; - - procedure StretchTabWidths(Row: Integer); - var - I: Integer; - dTabNormalWidth: Integer; - begin - LineFreeSpaceWidthRest := LineFreeSpaceWidth; - for I := LineIndexBoundsA[Row].Left to LineIndexBoundsA[Row].Right do - begin - with FVisibleTabList[I].FTabPosition do - begin - if I = LineIndexBoundsA[Row].Right then - dTabNormalWidth := LineFreeSpaceWidthRest - else - dTabNormalWidth := TabNormalWidth * LineFreeSpaceWidth div TotalTabsNormalWidth; - Dec(LineFreeSpaceWidthRest, dTabNormalWidth); - end; - with FVisibleTabList[I] do - Inc(FTabPosition.TabNormalWidth, dTabNormalWidth); - end; - end; - - var - Row: Integer; - ToStretchTabs: Boolean; - ADistanceBetweenTabs: Integer; - begin - UpdateTabPosition([]); - if IsTooSmallControlSize then Exit; - InitializeLineBoundsA(LineIndexBoundsA, 0, FVisibleTabList.Count - 1); - ToStretchTabs := not(Rotate or RaggedRight); - ADistanceBetweenTabs := DistanceGetter(FPainter.GetTabsNormalDistance, not Rotate); - for Row := 0 to RowCount - 1 do - begin - if ToStretchTabs then - begin - TotalTabsNormalWidth := GetLineWidth(LineIndexBoundsA, Row, 0); - LineFreeSpaceWidth := FTabsPosition.NormalRowWidth - GetLineWidth(LineIndexBoundsA, Row, ADistanceBetweenTabs); - if LineFreeSpaceWidth > 0 then StretchTabWidths(Row); - end; - InternalCalculateLongitudinalTabPositions(LineIndexBoundsA[Row].Left, LineIndexBoundsA[Row].Right, False, Row); - end; - end; - - procedure SetLongitudinalExtendedTabsRectsBounds; - begin - if TabPosition in [tpTop, tpBottom] then - begin - with FTabsPosition do - begin - FExtendedBottomOrRightTabsRect.Left := ExtendedTabsRect.Left; - FExtendedBottomOrRightTabsRect.Right := ExtendedTabsRect.Right; - FExtendedTopOrLeftTabsRect.Left := ExtendedTabsRect.Left; - FExtendedTopOrLeftTabsRect.Right := ExtendedTabsRect.Right; - end; - end else - begin - with FTabsPosition do - begin - FExtendedBottomOrRightTabsRect.Top := ExtendedTabsRect.Top; - FExtendedBottomOrRightTabsRect.Bottom := ExtendedTabsRect.Bottom; - FExtendedTopOrLeftTabsRect.Top := ExtendedTabsRect.Top; - FExtendedTopOrLeftTabsRect.Bottom := ExtendedTabsRect.Bottom; - end; - end; - end; - -begin - if FVisibleTabList.Count = 0 then - Exit; - if FRowCount > 1(*MultiLine*) then - MultiLineCalculateLongitudinalTabPositions - else - NotMultiLineCalculateLongitudinalTabPositions; - if not IsTooSmallControlSize then - SetLongitudinalExtendedTabsRectsBounds; -end; - -procedure TcxCustomTabControl.CalculateRowHeight; - - function GetMaxWidthTabVisibleIndex: Integer; - var - AFirstIndex, ALastIndex, AMaxTabWidth, I: Integer; - begin - Result := -1; - AMaxTabWidth := 0; - if pcoFixedTabWidthWhenRotated in Options then - begin - AFirstIndex := 0; - ALastIndex := FVisibleTabList.Count - 1; - end - else - InitializeVisibleTabRange(Self, AFirstIndex, ALastIndex); - for I := AFirstIndex to ALastIndex do - with FVisibleTabList[I].FTabPosition do - if TabNormalWidth > AMaxTabWidth then - begin - AMaxTabWidth := TabNormalWidth; - Result := I; - end; - end; - -var - AMaxWidthTabVisibleIndex: Integer; - ATab: TcxTab; -begin - if Rotate then - begin - AMaxWidthTabVisibleIndex := GetMaxWidthTabVisibleIndex; - if AMaxWidthTabVisibleIndex <> -1 then - begin - ATab := FVisibleTabList[AMaxWidthTabVisibleIndex]; - FMaxTabCaptionWidth := TextSize(ATab, ATab.Caption).cx; - FRowHeight := ATab.FTabPosition.TabNormalWidth; - end - else - begin - FMaxTabCaptionWidth := 0; - FRowHeight := 0; - end; - if (MaxRotatedTabWidth > 0) and - (MaxRotatedTabWidth >= FPainter.GetMinTabNormalWidth(-1)) and - (FRowHeight > MaxRotatedTabWidth) then - FRowHeight := MaxRotatedTabWidth; - end - else - FRowHeight := Tabs.FTabNormalHeight; -end; - -procedure TcxCustomTabControl.CalculateRowPositions; -var - // c - diametrical coordinate - cNormalTopBorder, cNormalBottomBorder: Integer; - cExtendedTopBorder, cExtendedBottomBorder: Integer; - cTabsDistance: Integer; - cIsY: Boolean; - - procedure InitializeVariables; - begin - cTabsDistance := DistanceGetter(FPainter.GetTabsNormalDistance, Rotate); - cIsY := TabPosition in [tpTop, tpBottom]; - with FTabsPosition.NormalTabsRect do - begin - cNormalTopBorder := PointGetter(TopLeft, cIsY); - cNormalBottomBorder := PointGetter(BottomRight, cIsY); - end; - with FTabsPosition.ExtendedTabsRect do - begin - cExtendedTopBorder := PointGetter(TopLeft, cIsY); - cExtendedBottomBorder := PointGetter(BottomRight, cIsY); - end; - end; - - procedure SetDiametricalExtendedTabsRectsBorders; - - procedure SetInternalBorders; - var - Border: Integer; - BottomOrRightPartRowCount: Integer; - begin - with FTabsPosition do - begin -// ExtendedTopOrLeftTabsRectBottomOrRightBorder - Border := cNormalTopBorder + FTopOrLeftPartRowCount * (FRowHeight + cTabsDistance); - Dec(Border, cTabsDistance); - Inc(Border, ExtendedTopOrLeftTabsRectBottomOrRightBorderOffset); - - if Border > cExtendedBottomBorder then Border := cExtendedBottomBorder; - RectSetter(FExtendedTopOrLeftTabsRect, False, cIsY, Border); - -// ExtendedBottomOrRightTabsRectTopOrLeftBorder - BottomOrRightPartRowCount := RowCount - FTopOrLeftPartRowCount; - Border := cNormalBottomBorder - BottomOrRightPartRowCount * (FRowHeight + cTabsDistance); - Inc(Border, cTabsDistance); - Inc(Border, ExtendedBottomOrRightTabsRectTopOrLeftBorderOffset); - - if Border < cExtendedTopBorder then Border := cExtendedTopBorder; - RectSetter(FExtendedBottomOrRightTabsRect, True, cIsY, Border); - end; - end; - - procedure CorrectSecondaryBorder; - var - SecondaryBorderBound: Integer; - begin - if TabPosition in [tpTop, tpLeft] then - begin - SecondaryBorderBound := PointGetter(FExtendedTopOrLeftTabsRect.BottomRight, cIsY) + FTabsPosition.MinDistanceBetweenTopOrLeftAndBottomOrRightExtendedTabsRects; - SecondaryBorderBound := Min(SecondaryBorderBound, cExtendedBottomBorder); - if PointGetter(FExtendedBottomOrRightTabsRect.TopLeft, cIsY) < SecondaryBorderBound then - RectSetter(FExtendedBottomOrRightTabsRect, True, cIsY, SecondaryBorderBound); - end - else - begin - SecondaryBorderBound := PointGetter(FExtendedBottomOrRightTabsRect.TopLeft, cIsY) - FTabsPosition.MinDistanceBetweenTopOrLeftAndBottomOrRightExtendedTabsRects; - SecondaryBorderBound := Max(SecondaryBorderBound, cExtendedTopBorder); - if PointGetter(FExtendedTopOrLeftTabsRect.BottomRight, cIsY) > SecondaryBorderBound then - RectSetter(FExtendedTopOrLeftTabsRect, False, cIsY, SecondaryBorderBound); - end; - end; - - begin - RectSetter(FExtendedTopOrLeftTabsRect, True, cIsY, cExtendedTopBorder); - RectSetter(FExtendedBottomOrRightTabsRect, False, cIsY, cExtendedBottomBorder); - SetInternalBorders; - if (FTopOrLeftPartRowCount <> 0) and (FTopOrLeftPartRowCount <> FRowCount) then - CorrectSecondaryBorder; - end; - -var - I: Integer; - c: Integer; -begin - InitializeVariables; - for I := 0 to FVisibleTabList.Count - 1 do - with FVisibleTabList[I] do - begin - if FVisibleRow < FTopOrLeftPartRowCount then - c := cNormalTopBorder + FVisibleRow * (FRowHeight + cTabsDistance) - else - begin - c := cNormalBottomBorder - (RowCount - FVisibleRow) * FRowHeight; - Dec(c, (RowCount - 1 - FVisibleRow) * cTabsDistance); - end; - PointSetter(FTabPosition.TabNormalPosition, cIsY, c); - end; - SetDiametricalExtendedTabsRectsBorders; -end; - -procedure TcxCustomTabControl.CalculateTabNormalSize(Tab: TcxTab); -begin - Tab.FTabPosition.TabNormalWidth := FPainter.CalculateTabNormalWidth(Tab); -end; - -procedure TcxCustomTabControl.CalculateTabNormalSizes; -var - I: Integer; - Tab: TcxTab; -begin - if Tabs.Count = 0 then - OutError('CalculateTabNormalSizes', scxPCTabCountEqualsZero); - Tabs.FTabNormalHeight := FPainter.CalculateTabNormalHeight; - for I := 0 to Tabs.Count - 1 do - begin - Tab := TabsTabs[I]; - if Tab.Visible then - Tab.FTabPosition.TabNormalWidth := FPainter.CalculateTabNormalWidth(Tab) - else - Tab.FTabPosition.TabNormalWidth := 0; - end; -end; - -function TcxCustomTabControl.CanMouseWheel(const AMouseScreenPos: TPoint): Boolean; -var - R: TRect; -begin - Result := False; - if not MultiLine and (FFirstVisibleTab >= 0) then - begin - R := FVisibleTabList[FFirstVisibleTab].FullRect; - with ScreenToClient(AMouseScreenPos) do - if (TabPosition in [tpTop, tpBottom]) and (Y >= R.Top) and (Y < R.Bottom) or - (TabPosition in [tpLeft, tpRight]) and (X >= R.Left) and (X < R.Right) then - Result := True; - end; -end; - -function TcxCustomTabControl.CanPressButton(AButton: TcxPCNavigatorButton): Boolean; -var - SpecialAlignment: Boolean; -begin - Result := True; - case AButton of - nbTopLeft, nbBottomRight: - begin - SpecialAlignment := IsRightToLeftAlignment(Self) or IsBottomToTopAlignment(Self); - if (SpecialAlignment and (AButton = nbTopLeft)) or - ((not SpecialAlignment) and (AButton = nbBottomRight)) then - Result := (FLastVisibleTab < FVisibleTabList.Count - 1) or - not FIsLastTabFullyVisible and (FLastVisibleTab <> FFirstVisibleTab) - else - Result := FFirstVisibleTab > 0; - end; - nbClose: - Result := FMainTabVisibleIndex >= 0; - end; -end; - -procedure TcxCustomTabControl.CloseButtonClick; -begin - if DoCanClose then - DoClose; -end; - -procedure TcxCustomTabControl.CorrectMaxRotatedTabWidth; -var - AMinTabNormalWidth: Integer; -begin - if FMaxRotatedTabWidth > 0 then - begin - AMinTabNormalWidth := FPainter.GetMinTabNormalWidth(-1); - if FMaxRotatedTabWidth < AMinTabNormalWidth then - FMaxRotatedTabWidth := AMinTabNormalWidth; - end; -end; - -procedure TcxCustomTabControl.CorrectTabRect(TabVisibleIndex: Integer); -begin - with FVisibleTabList[TabVisibleIndex] do - FPainter.CorrectTabRect(TabVisibleIndex, FTabPosition.TabRectCorrection); -end; - -procedure TcxCustomTabControl.CreateGoDialog; -begin - if not IsDesigning then - begin - FGoDialog := TcxPCGoDialog.Create(Self); - FGoDialog.OnClick := GoDialogClickEventHandler; - end; -end; - -procedure TcxCustomTabControl.CreateTimer; -begin - if FTimer = nil then - begin - FTimer := TcxTimer.Create(Self); - FTimer.OnTimer := TimerEventHandler; - end; - FTimer.Interval := TabScrollingStartDelay; - FTimer.Enabled := True; -end; - -function TcxCustomTabControl.GetDisplayRect: TRect; -begin - Result := FPainter.GetClientRect; -end; - -function TcxCustomTabControl.GetImages: TCustomImageList; -begin - Result := FImages.BaseImages; -end; - -function TcxCustomTabControl.GetLineWidth( - const ALineIndexBoundsA: TcxPCLineIndexBoundsArray; - ALineNumber, ATabsDistance: Integer): Integer; -var - I: Integer; -begin - Result := 0; - with ALineIndexBoundsA[ALineNumber] do - begin - for I := Left to Right do - Inc(Result, FVisibleTabList[I].NormalLongitudinalSize); - Inc(Result, (Right - Left) * ATabsDistance); - end; -end; - -function TcxCustomTabControl.GetMainTabIndex: Integer; -begin - Result := -1; - if FMainTabVisibleIndex <> -1 then - Result := FVisibleTabList[FMainTabVisibleIndex].Index; -end; - -function TcxCustomTabControl.GetMaxRotatedTabWidth: Integer; -begin - CorrectMaxRotatedTabWidth; - Result := FMaxRotatedTabWidth; -end; - -function TcxCustomTabControl.GetNavigatorButton( - NavigatorButtonIndex: TcxPCNavigatorButtonIndex): TcxPCNavigatorButton; -var - FirstNavigatorButton, LastNavigatorButton, NavigatorButton: TcxPCNavigatorButton; -begin - Result := Low(TcxPCNavigatorButton); - FirstNavigatorButton := Low(TcxPCNavigatorButton); - LastNavigatorButton := High(NavigatorButton); - for NavigatorButton := FirstNavigatorButton to LastNavigatorButton do - if NavigatorButton in NavigatorButtonIndex then - begin - Result := NavigatorButton; - Break; - end; -end; - -function TcxCustomTabControl.GetNavigatorButtons(OnlyObligatoryButtons: Boolean): TcxPCNavigatorButtons; -begin - Result := []; - if (pcoCloseButton in Options) and not MultiLine then - Include(Result, nbClose); - if not OnlyObligatoryButtons and not (pcoNoArrows in Options) then - Result := Result + [nbTopLeft, nbBottomRight]; - if (pcoGoDialog in Options) and - (not OnlyObligatoryButtons or (pcoAlwaysShowGoDialogButton in Options)) then - Include(Result, nbGoDialog); -end; - -function TcxCustomTabControl.GetOptions: TcxPCOptions; -begin - Result := FOptions; -end; - -function TcxCustomTabControl.GetStyle: TcxPCStyleID; -begin - Result := FStyle; -end; - -function TcxCustomTabControl.GetTabExtendedTabsRect(TabVisibleIndex: Integer): TRect; -begin - if FVisibleTabList[TabVisibleIndex].VisibleRow < TopOrLeftPartRowCount then - Result := FExtendedTopOrLeftTabsRect - else - Result := FExtendedBottomOrRightTabsRect -end; - -function TcxCustomTabControl.GetTabsTab(TabIndex: Integer): TcxTab; -begin - Result := Tabs.Tabs[TabIndex]; -end; - -procedure TcxCustomTabControl.InitializeLineBoundsA(var ALineIndexBoundsA: TcxPCLineIndexBoundsArray; AFirstIndex, ALastIndex: Integer); -var - I, ALineIndex: Integer; - AFirstRow, ARowCount: Integer; -begin - AFirstRow := FVisibleTabList[AFirstIndex].FRow; - ARowCount := FVisibleTabList[ALastIndex].FRow - AFirstRow + 1; - SetLength(ALineIndexBoundsA, ARowCount); - ALineIndex := 0; - ALineIndexBoundsA[0].Left := AFirstIndex; - for I := AFirstIndex to ALastIndex do - if FVisibleTabList[I].FRow - AFirstRow > ALineIndex then - begin - ALineIndexBoundsA[ALineIndex].Right := I - 1; - Inc(ALineIndex); - ALineIndexBoundsA[ALineIndex].Left := I; - end; - ALineIndexBoundsA[ALineIndex].Right := ALastIndex; -end; - -function TcxCustomTabControl.InternalGetClientRect: TRect; -begin - if IsLoading then - if FIsClientRectLoaded then - Result := FClientRect - else - Result := GetControlRect(Self) - else - begin - Result := DisplayRect; - ValidateRect(Result); - end; -end; - -function TcxCustomTabControl.InternalGetShiftState: TShiftState; -var - AKeyState: TKeyBoardState; -begin - GetKeyboardState(AKeyState); - Result := KeyboardStateToShiftState(AKeyState); -end; - -procedure TcxCustomTabControl.InternalInvalidateRect(Rect: TRect); -begin - InvalidateRect(Rect, False); -end; - -function TcxCustomTabControl.IsTooSmallControlSize: Boolean; -begin - Result := FTabsPosition.NormalRowWidth <= 0; -end; - -function TcxCustomTabControl.PassDesignMouseEvent(X, Y: Integer): Boolean; -var - NavigatorButton: TcxPCNavigatorButton; - PressedTabVisibleIndex: Integer; -begin - Result := FPainter.IsOverButton(X, Y, NavigatorButton) and not (NavigatorButton in [nbGoDialog, nbClose]); - if not Result then - begin - PressedTabVisibleIndex := IndexOfTabAt(X, Y); - Result := (PressedTabVisibleIndex <> -1) and (PressedTabVisibleIndex <> FMainTabVisibleIndex); - end; -end; - -procedure TcxCustomTabControl.PlaceVisibleTabsOnRows(ATabsWidth, ATabsDistance: Integer); - - procedure InternalImproveTabsLayout(var ALineBoundsA: TcxPCLineIndexBoundsArray); - - function Deviation(const ALineBoundsA: TcxPCLineIndexBoundsArray; ALineIndex: Integer): Double; - begin - Result := Power(ATabsWidth - GetLineWidth(ALineBoundsA, ALineIndex, ATabsDistance), 2); - end; - - function TotalDeviation(const ALineBoundsA: TcxPCLineIndexBoundsArray): Double; - var - I: Integer; - begin - Result := 0; - for I := 0 to Length(ALineBoundsA) - 1 do - Result := Result + Deviation(ALineBoundsA, I); - end; - - procedure CopyBounds(var ASource, ADestination: TcxPCLineIndexBoundsArray); - var - I: Integer; - begin - if Length(ASource) <> Length(ADestination) then - SetLength(ADestination, Length(ASource)); - for I := 0 to Length(ASource) - 1 do - ADestination[I] := ASource[I]; - end; - - function DoBest(var ALineBoundsA: TcxPCLineIndexBoundsArray; ALineIndex: Integer; ADirection: Integer): Boolean; - - procedure DoChange(var ALineBoundsA: TcxPCLineIndexBoundsArray; ALineIndex: Integer); - begin - case ADirection of - -1: - if ALineIndex > 0 then - begin - Dec(ALineBoundsA[ALineIndex].Left); - Dec(ALineBoundsA[ALineIndex - 1].Right); - end; - 1: - if ALineIndex < Length(ALineBoundsA) - 1 then - begin - Inc(ALineBoundsA[ALineIndex].Right); - Inc(ALineBoundsA[ALineIndex + 1].Left); - end; - end; - end; - - var - APrevError, ANewError: Double; - ATempLineBoundsA: TcxPCLineIndexBoundsArray; - begin - CopyBounds(ALineBoundsA, ATempLineBoundsA); - APrevError := Deviation(ATempLineBoundsA, ALineIndex); - - DoChange(ATempLineBoundsA, ALineIndex); - - ANewError := Deviation(ATempLineBoundsA, ALineIndex); - Result := (ANewError < APrevError) and (GetLineWidth(ATempLineBoundsA, ALineIndex, ATabsDistance) <= ATabsWidth); - if Result then - CopyBounds(ATempLineBoundsA, ALineBoundsA); - end; - - function DoComplexBest(ACurrentError: Double; var ALineBoundsA: TcxPCLineIndexBoundsArray): Boolean; - var - I: Integer; - ATempLineBoundsA: TcxPCLineIndexBoundsArray; - APrevDeviation: Double; - begin - Result := False; - CopyBounds(ALineBoundsA, ATempLineBoundsA); - for I := Length(ATempLineBoundsA) - 1 downto 0 do - begin - repeat - APrevDeviation := TotalDeviation(ATempLineBoundsA); - until not DoBest(ATempLineBoundsA, I, -1) or (APrevDeviation < TotalDeviation(ATempLineBoundsA)); - - if TotalDeviation(ATempLineBoundsA) < ACurrentError then - begin - Result := True; - CopyBounds(ATempLineBoundsA, ALineBoundsA); - Break; - end; - end; - end; - - function DoSimpleBest(var ALineBoundsA: TcxPCLineIndexBoundsArray; ADirection: Integer): Boolean; - var - I: Integer; - ATempLineBoundsA: TcxPCLineIndexBoundsArray; - ACurrentError: Double; - begin - Result := False; - ACurrentError := TotalDeviation(ALineBoundsA); - for I := 0 to Length(ALineBoundsA) - 1 do - begin - CopyBounds(ALineBoundsA, ATempLineBoundsA); - DoBest(ATempLineBoundsA, I, ADirection); - if TotalDeviation(ATempLineBoundsA) < ACurrentError then - begin - Result := True; - CopyBounds(ATempLineBoundsA, ALineBoundsA); - Break; - end; - end; - end; - - function DoTotalBest(var ALineBoundsA: TcxPCLineIndexBoundsArray): Boolean; - var - ACurrentError: Double; - begin - ACurrentError := TotalDeviation(ALineBoundsA); - Result := DoComplexBest(ACurrentError, ALineBoundsA) or - DoSimpleBest(ALineBoundsA, 1) or - DoSimpleBest(ALineBoundsA, -1); - end; - - begin - while DoTotalBest(ALineBoundsA) do {loop}; - end; - - procedure AcceptImprovements(const ALineBoundsA: TcxPCLineIndexBoundsArray); - var - I, ARow, ACurrentRow: Integer; - begin - ACurrentRow := FVisibleTabList[ALineBoundsA[0].Left].FRow; - for ARow := 0 to Length(ALineBoundsA) - 1 do - begin - for I := ALineBoundsA[ARow].Left to ALineBoundsA[ARow].Right do - FVisibleTabList[I].FRow := ACurrentRow; - Inc(ACurrentRow); - end; - end; - - procedure ImproveTabsLayout(AFirstIndex, ALastIndex: Integer); - var - ALineIndexBoundsA: TcxPCLineIndexBoundsArray; - begin - if Rotate and RaggedRight then Exit; - InitializeLineBoundsA(ALineIndexBoundsA, AFirstIndex, ALastIndex); - InternalImproveTabsLayout(ALineIndexBoundsA); - AcceptImprovements(ALineIndexBoundsA); - end; - -var - FirstIndex: Integer; - c: Integer; - Count, I: Integer; -begin - Count := FVisibleTabList.Count; - FRowCount := 1; - FirstIndex := 0; - c := 0; - for I := 0 to Count - 1 do - begin - if FVisibleTabList[I].NormalLongitudinalSize >= ATabsWidth then - begin - if c <> 0 then - begin - Inc(FRowCount); - c := 0; - end; - if (I > FirstIndex{guarantees that FVisibleTabList[FirstIndex].FRow had been set}) and - ((FRowCount - 1) - FVisibleTabList[FirstIndex].FRow > 1) then - ImproveTabsLayout(FirstIndex, I - 1); - FirstIndex := I + 1; - if (not Rotate) and (ATabsWidth > FPainter.GetMinTabNormalWidth(I)) then - with FVisibleTabList[I] do - FTabPosition.TabNormalWidth := ATabsWidth; - FVisibleTabList[I].FRow := FRowCount - 1; - if I <> Count - 1 then Inc(FRowCount); - end else - if c + FVisibleTabList[I].NormalLongitudinalSize > ATabsWidth then - begin - Inc(FRowCount); - FVisibleTabList[I].FRow := FRowCount - 1; - c := FVisibleTabList[I].NormalLongitudinalSize + ATabsDistance; - end else - begin - FVisibleTabList[I].FRow := FRowCount - 1; - Inc(c, FVisibleTabList[I].NormalLongitudinalSize + ATabsDistance); - end; - end; - if (Count - 1 > FirstIndex) and ((FRowCount - 1) - FVisibleTabList[FirstIndex].FRow > 0) then - ImproveTabsLayout(FirstIndex, Count - 1); -end; - -procedure TcxCustomTabControl.PrepareImagesBitmapBackground(ABitmap: TBitmap); -begin - Painter.PrepareTabControlImagesBitmapBackground(ABitmap); -end; - -procedure TcxCustomTabControl.RearrangeRows; - - function IsRowNumbersCorrectionNeeded: Boolean; - begin - if TabPosition in [tpBottom, tpTop] then - begin - Result := Rotate and not(pcoTopToBottomText in Options); - if TabPosition = tpBottom then Result := not Result; - end else - begin - Result := (not Rotate) and (pcoTopToBottomText in Options); - if TabPosition = tpRight then Result := not Result; - end; - end; - - // tpTop: top to bottom - // tpLeft: left to right - // tpRight: right to left - // tpBottom: bottom to top - procedure ConvertRowNumbersToNumbersRelativeToTabPosition; - var - I: Integer; - begin - if IsRowNumbersCorrectionNeeded then - for I := 0 to FVisibleTabList.Count - 1 do - with FVisibleTabList[I] do - FVisibleRow := RowCount - 1 - FRow - else - for I := 0 to FVisibleTabList.Count - 1 do - with FVisibleTabList[I] do - FVisibleRow := FRow; - end; - - procedure ConvertRelativeNumbersToConvenientNumbers; - var - I: Integer; - begin - if TabPosition in [tpRight, tpBottom] then - begin - for I := 0 to FVisibleTabList.Count - 1 do - with FVisibleTabList[I] do - FVisibleRow := RowCount - 1 - FVisibleRow; - FTopOrLeftPartRowCount := FRowCount - FTopOrLeftPartRowCount; - end - end; - -var - I: Integer; - dRow: Integer; - ARelativeTopPartRowCount: Integer; -begin - ConvertRowNumbersToNumbersRelativeToTabPosition; - ARelativeTopPartRowCount := RowCount; - - if FMainTabVisibleIndex <> -1 then - if ScrollOpposite then - ARelativeTopPartRowCount := FVisibleTabList[FMainTabVisibleIndex].FVisibleRow + 1 - else - if FPainter.IsMainTabBoundWithClient then - begin - dRow := RowCount - 1 - FVisibleTabList[FMainTabVisibleIndex].FVisibleRow; - for I := 0 to FVisibleTabList.Count - 1 do - with FVisibleTabList[I] do - if RowCount = 0 then - FVisibleRow := 0 - else - FVisibleRow := (FVisibleRow + dRow) mod RowCount; - end; - - FTopOrLeftPartRowCount := ARelativeTopPartRowCount; - ConvertRelativeNumbersToConvenientNumbers; - CalculateRowPositions; -end; - -procedure TcxCustomTabControl.ReadClientRectBottom(Reader: TReader); -begin - FClientRect.Bottom := Reader.ReadInteger; -end; - -procedure TcxCustomTabControl.ReadClientRectLeft(Reader: TReader); -begin - FClientRect.Left := Reader.ReadInteger; -end; - -procedure TcxCustomTabControl.ReadClientRectRight(Reader: TReader); -begin - FClientRect.Right := Reader.ReadInteger; -end; - -procedure TcxCustomTabControl.ReadClientRectTop(Reader: TReader); -begin - FClientRect.Top := Reader.ReadInteger; - FIsClientRectLoaded := True; -end; - -procedure TcxCustomTabControl.RepaintTab(TabVisibleIndex: Integer; TabPropertyChanged: TcxPCTabPropertyChanged); -begin - FPainter.RepaintTab(TabVisibleIndex, TabPropertyChanged); -end; - -procedure TcxCustomTabControl.SelectTab(ATabVisibleIndex: Integer; AAddToSelected: Boolean); -var - ALink: TcxObjectLink; -begin - ALink := cxAddObjectLink(Self); - try - if MultiSelect and FPainter.IsMultiSelectionAccepted and AAddToSelected then - begin - if ATabVisibleIndex = FMainTabVisibleIndex then - TabIndex := -1 - else - FVisibleTabList[ATabVisibleIndex].Selected := not FVisibleTabList[ATabVisibleIndex].Selected; - end - else - begin - TabIndex := FVisibleTabList[ATabVisibleIndex].Index; - if ALink.Ref <> nil then - SetModified; - end; - finally - cxRemoveObjectLink(ALink); - end; -end; - -procedure TcxCustomTabControl.SetHideTabs(const Value: Boolean); -begin - if Value <> FHideTabs then - begin - FHideTabs := Value; - Invalidate; - Realign; - end; -end; - -procedure TcxCustomTabControl.SetHotTrack(Value: Boolean); -begin - if Value <> FHotTrack then - begin - FHotTrack := Value; - SynchronizeHotTrackStates(InternalGetShiftState); - end; -end; - -procedure TcxCustomTabControl.SetImageBorder(const Value: Integer); -begin - if (Value >= 0) and (Value <> FImageBorder) then - begin - FImageBorder := Value; - if FVisibleTabList.Count > 0 then RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SetImages(const Value: TCustomImageList); -begin - FImages.BaseImages := Value; -end; - -procedure TcxCustomTabControl.SetIsTabsContainer(Value: Boolean); -begin - if Value <> FIsTabsContainer then - begin - FIsTabsContainer := Value; - RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SetMaxRotatedTabWidth(Value: Integer); -begin - if Value < 0 then - Value := 0; - if (Value > 0) and (Value < FPainter.GetMinTabNormalWidth(-1)) then - Value := FPainter.GetMinTabNormalWidth(-1); - if Value <> FMaxRotatedTabWidth then - begin - FMaxRotatedTabWidth := Value; - if Rotate and (FVisibleTabList.Count > 0) then RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SetMultiLine(const Value: Boolean); -begin - if Value <> FMultiLine then - begin - FMultiLine := Value; - RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SetMultiSelect(const Value: Boolean); -begin - FMultiSelect := Value; -end; - -procedure TcxCustomTabControl.SetNavigatorPosition( - const Value: TcxPCNavigatorPosition); -begin - if Value <> FNavigatorPosition then - begin - FNavigatorPosition := Value; - RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SetOptions(Value: TcxPCOptions); -const - GraphicOptions: TcxPCOptions = [pcoGradient, pcoGradientClientArea, - pcoUsePageColorForTab]; - LayoutOptions: TcxPCOptions = [ - pcoAlwaysShowGoDialogButton, pcoCloseButton, pcoFixedTabWidthWhenRotated, - pcoGoDialog, pcoGradient, pcoGradientClientArea, pcoNoArrows, - pcoTopToBottomText - ]; -var - AAddOptions, AChangedOptions, ASubOptions: TcxPCOptions; -begin - AAddOptions := Value - FOptions; - ASubOptions := FOptions - Value; - AChangedOptions := AAddOptions + ASubOptions; - if AChangedOptions <> [] then - begin - FOptions := Value; - if AChangedOptions * LayoutOptions <> [] then - RequestLayout - else - if AChangedOptions * GraphicOptions <> [] then - Invalidate; - end; -end; - -procedure TcxCustomTabControl.SetOwnerDraw(const Value: Boolean); -begin - if Value <> FOwnerDraw then - begin - FOwnerDraw := Value; - Invalidate; - end; -end; - -procedure TcxCustomTabControl.SetRaggedRight(const Value: Boolean); -begin - if Value <> FRaggedRight then - begin - FRaggedRight := Value; - if MultiLine then - RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SetRotate(const Value: Boolean); -begin - if not FPainter.AllowRotate and Value then - raise EdxException.Create(Format(scxPCAllowRotateError, [FPainter.GetStyleName])); - if Value <> FRotate then - begin - FRotate := Value; - RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SetScrollOpposite(const Value: Boolean); -begin - if Value <> FScrollOpposite then - begin - FScrollOpposite := Value; - if MultiLine then - if FMainTabVisibleIndex <> -1 then - begin - RearrangeRows; - Realign; - Invalidate; - end - else - Realign; - end; -end; - -procedure TcxCustomTabControl.SetShowFrame(const Value: Boolean); -begin - if Value <> FShowFrame then - begin - FShowFrame := Value; - RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SetStyle(const Value: TcxPCStyleID); -var - NewPainterClass: TcxPCPainterClass; -begin - if Value = cxPCDefaultStyle then - begin - FStyle := cxPCDefaultStyle; - SetDefaultStyle; - end - else - begin - if Style = Value then - Exit; - NewPainterClass := PaintersFactory.GetPainterClass(Value); - if NewPainterClass = nil then - Exit; - FStyle := Value; - if (FPainter = nil) or (NewPainterClass <> FPainter.ClassType) then - begin - PaintersFactory.FreePainterInstance(FPainter); - FPainter := PaintersFactory.GetPainterInstance(NewPainterClass, Self); - if Rotate and not FPainter.AllowRotate then - Rotate := False; - DoubleBuffered := FPainter.NeedDoubleBuffer; - Tabs.ResetTabVerticalTextBitmaps; - RequestLayout; - InvalidateWithChildren; - end; - end; -end; - -procedure TcxCustomTabControl.SetTabCaptionAlignment(Value: TAlignment); -begin - if Value <> FTabCaptionAlignment then - begin - FTabCaptionAlignment := Value; - RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SetTabHeight(const Value: Smallint); -begin - if Value <> FTabSize.Y then - begin - FTabSize.Y := Value; - RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SetTabIndex(Value: Integer); - - procedure UnselectTabs; - var - I: Integer; - begin - FTabIndex := -1; - Tabs.SetMainTab; - for I := 0 to Tabs.Count - 1 do - TabsTabs[I].Selected := False; - end; - -begin - if IsLoading then - begin - FTabIndex := Value; - Exit; - end; - if (Value <> -1) and (Value < 0) or (Value >= Tabs.Count) then Exit; - if (Value <> -1) and TabIndexTabMustBeVisible and (not TabsTabs[Value].Visible) then Value := -1; - if Value = FTabIndex then Exit; - if not CanChange(Value) then Exit; - - UnselectTabs; - Tabs.SetTracking(-1); - FTabIndex := Value; - Tabs.SetMainTab; - - if (FMainTabVisibleIndex <> -1) and not MultiLine then - CorrectFirstVisibleTab(FMainTabVisibleIndex); - - if MultiLine then - begin - RearrangeRows; - Realign; - Invalidate; - end - else -// if Value <> -1 then - RequestLayout; - UpdateButtonsState; - SynchronizeHotTrackStates(InternalGetShiftState); - - Change; -end; - -procedure TcxCustomTabControl.SetTabPosition(const Value: TcxTabPosition); -begin - if Value <> FTabPosition then - begin - FTabPosition := Value; - RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SetTabs(const Value: TcxTabs); -begin - FTabs.Assign(Value); -end; - -procedure TcxCustomTabControl.SetTabSlants(Value: TcxTabSlants); -begin - FTabSlants.Assign(Value); -end; - -procedure TcxCustomTabControl.SetTabsTab(TabIndex: Integer; - const Value: TcxTab); -begin - Tabs.Tabs[TabIndex] := Value; -end; - -procedure TcxCustomTabControl.SetTabWidth(const Value: Smallint); -begin - if Value <> FTabSize.X then - begin - FTabSize.X := Value; - RequestLayout; - end; -end; - -procedure TcxCustomTabControl.SynchronizeHotTrackStates(Shift: TShiftState); - - procedure ChangeHotTrackNavigatorButton(NewHotTrackNavigatorButton: TcxPCNavigatorButtonIndex); - var - OldHotTrackNavigatorButton: TcxPCNavigatorButtonIndex; - NavigatorButton: TcxPCNavigatorButton; - begin - OldHotTrackNavigatorButton := FHotTrackNavigatorButton; - FHotTrackNavigatorButton := NewHotTrackNavigatorButton; - if OldHotTrackNavigatorButton <> [] then - begin - NavigatorButton := GetNavigatorButton(OldHotTrackNavigatorButton); - FNavigatorButtonStates[NavigatorButton] := nbsNormal; - FPainter.RepaintButton(NavigatorButton, nbsHotTrack); - end; - if NewHotTrackNavigatorButton <> [] then - begin - NavigatorButton := GetNavigatorButton(NewHotTrackNavigatorButton); - FNavigatorButtonStates[NavigatorButton] := nbsHotTrack; - FPainter.RepaintButton(NavigatorButton, nbsNormal); - end; - end; - -var - MousePos: TPoint; - NewHotTrackTabVisibleIndex: Integer; - NewHotTrackNavigatorButton: TcxPCNavigatorButtonIndex; - NavigatorButton: TcxPCNavigatorButton; -begin - if [csDesigning, csLoading, csDestroying] * ComponentState <> [] then Exit; - if not HandleAllocated then Exit; - if FIsGoDialogShowing then Exit; - MousePos := ScreenToClient(InternalGetCursorPos); - - NewHotTrackTabVisibleIndex := -1; - NewHotTrackNavigatorButton := []; - if (HotTrack or Painter.IsEnableHotTrack) and Enabled then - if not (ssLeft in Shift) and FPainter.IsOverButton(MousePos.X, MousePos.Y, NavigatorButton) and - (not (FNavigatorButtonStates[NavigatorButton] in [nbsDisabled, nbsPressed])) then - NewHotTrackNavigatorButton := [NavigatorButton] - else - if not (ssLeft in Shift) or not Painter.IsTabPressable then - begin - NewHotTrackTabVisibleIndex := IndexOfTabAt(MousePos.X, MousePos.Y); - if (NewHotTrackTabVisibleIndex <> -1) and (not FVisibleTabList[NewHotTrackTabVisibleIndex].Enabled) then - NewHotTrackTabVisibleIndex := -1; - end; - if NewHotTrackNavigatorButton <> FHotTrackNavigatorButton then - ChangeHotTrackNavigatorButton(NewHotTrackNavigatorButton); - Tabs.SetHotTrack(NewHotTrackTabVisibleIndex); -end; - -procedure TcxCustomTabControl.SynchronizeNavigatorButtons; -begin - if (FHotTrackNavigatorButton <> []) and - (FHotTrackNavigatorButton * FNavigatorButtons = []) then - begin - FNavigatorButtonStates[GetNavigatorButton(FHotTrackNavigatorButton)] := nbsNormal; - FHotTrackNavigatorButton := []; - end; - - if (FPressedNavigatorButton <> []) and - (FPressedNavigatorButton * FNavigatorButtons = []) then - begin - FNavigatorButtonStates[GetNavigatorButton(FPressedNavigatorButton)] := nbsNormal; - FPressedNavigatorButton := []; - end; -end; - -procedure TcxCustomTabControl.SynchronizeTabImagesRotationAngle; -var - ATextRotationAngle: TcxRotationAngle; -begin - ATextRotationAngle := InternalGetTextRotationAngle(Self); - if VerifyImageList(Images) then - FImages.ImageRotationAngle := ATextRotationAngle; -end; - -procedure TcxCustomTabControl.TabSlantsChanged(Sender: TObject); -begin - RequestLayout; -end; - -procedure TcxCustomTabControl.TimerEventHandler(Sender: TObject); -begin - FTimer.Interval := TabScrollingDelay; - if FPressedNavigatorButton <> [] then - begin - ArrowButtonClick(GetNavigatorButton(FPressedNavigatorButton)); - if FPressedNavigatorButton <> [] then Exit; - end; - FTimer.Enabled := False; -end; - -procedure TcxCustomTabControl.UpdateButtonsState; - - procedure InternalUpdateButtonState(AButton: TcxPCNavigatorButton); - var - ANewButtonState, APrevButtonState: TcxPCNavigatorButtonState; - begin - if not (AButton in FNavigatorButtons) then - Exit; - APrevButtonState := FNavigatorButtonStates[AButton]; - ANewButtonState := APrevButtonState; - if CanPressButton(AButton) then - begin - if APrevButtonState = nbsDisabled then - ANewButtonState := nbsNormal; - end - else - ANewButtonState := nbsDisabled; - if ANewButtonState <> APrevButtonState then - begin - if ANewButtonState = nbsDisabled then - begin - FHotTrackNavigatorButton := []; - FPressedNavigatorButton := []; - end; - FNavigatorButtonStates[AButton] := ANewButtonState; - FPainter.RepaintButton(AButton, APrevButtonState); - SynchronizeHotTrackStates(InternalGetShiftState); - end; - end; - -var - AButton: TcxPCNavigatorButton; -begin - for AButton := Low(TcxPCNavigatorButton) to High(TcxPCNavigatorButton) do - if AButton <> nbGoDialog then - InternalUpdateButtonState(AButton); -end; - -procedure TcxCustomTabControl.UpdateTabPosition(ANavigatorButtons: TcxPCNavigatorButtons); -begin - FNavigatorButtons := ANavigatorButtons; - FTabsPosition := FPainter.GetTabsPosition(ANavigatorButtons); -end; - -procedure TcxCustomTabControl.WriteClientRectBottom(Writer: TWriter); -begin - Writer.WriteInteger(InternalGetClientRect.Bottom); -end; - -procedure TcxCustomTabControl.WriteClientRectLeft(Writer: TWriter); -begin - Writer.WriteInteger(InternalGetClientRect.Left); -end; - -procedure TcxCustomTabControl.WriteClientRectRight(Writer: TWriter); -begin - Writer.WriteInteger(InternalGetClientRect.Right); -end; - -procedure TcxCustomTabControl.WriteClientRectTop(Writer: TWriter); -begin - Writer.WriteInteger(InternalGetClientRect.Top); -end; - -procedure TcxCustomTabControl.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - if TMessage(Message).wParam = TMessage(Message).lParam then - EraseBackground(Message.DC) - else - inherited; -end; - -procedure TcxCustomTabControl.WMGetDlgCode(var Message: TWMGetDlgCode); -begin - inherited; - Message.Result := Message.Result or DLGC_WANTARROWS; -end; - -procedure TcxCustomTabControl.WMPrintClient(var Message: TWMPrintClient); -begin -{$IFDEF DELPHI7} - inherited -{$ELSE} - if (Message.Result <> 1) and - ((Message.Flags and PRF_CHECKVISIBLE = 0) or Visible) then - PaintHandler(TWMPaint(Message)) - else - inherited -{$ENDIF} -end; - -procedure TcxCustomTabControl.CMDesignHitTest( - var Message: TCMDesignHitTest); -begin - inherited; - with Message do - if PassDesignMouseEvent(XPos, YPos) then Result := 1; -end; - -procedure TcxCustomTabControl.CMDialogChar(var Message: TCMDialogChar); -begin - if HandleDialogChar(Message.CharCode) then - Message.Result := 1 - else - inherited; -end; - -procedure TcxCustomTabControl.CMDialogKey(var Message: TCMDialogKey); -var - ACharCode: Word; - AIsKeyHandled: Boolean; - AKeyState: TKeyBoardState; -begin - if Focused or HandleAllocated and Windows.IsChild(Handle, Windows.GetFocus) then - begin - ACharCode := Message.CharCode; - GetKeyboardState(AKeyState); - AIsKeyHandled := InternalKeyDown(ACharCode, KeyboardStateToShiftState(AKeyState)); - Message.CharCode := ACharCode; - if AIsKeyHandled then - begin - Message.Result := 1; - Exit; - end; - end; - inherited; -end; - -procedure TcxCustomTabControl.CMEnabledChanged(var Message: TMessage); -begin - inherited; - Invalidate; -end; - -procedure TcxCustomTabControl.CMMouseLeave(var Message: TMessage); -begin - inherited; - SynchronizeHotTrackStates(InternalGetShiftState); -end; - -procedure TcxCustomTabControl.CMParentColorChanged(var Message: TMessage); -begin - inherited; - Invalidate; -end; - -constructor TcxCustomTabControl.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents, - csDoubleClicks, csOpaque{$IFDEF DELPHI7}, csParentBackground{$ENDIF}]; - FVisibleTabList := TcxVisibleTabList.Create(Self); - Width := 289; - - Height := 193; - - FFirstVisibleTab := -1; - FLastVisibleTab := -1; - - FFocusable := True; - FHotTrackNavigatorButton := []; - FHotTrackTabVisibleIndex := -1; - FImageBorder := 0; - FIsGoDialogShowing := False; - - FNavigatorPosition := npRightTop; - FPressedNavigatorButton := []; - FPressedTabVisibleIndex := -1; - FMainTabVisibleIndex := -1; - FOptions := cxPCDefaultOptions; - FTabCaptionAlignment := taCenter; - FTabIndex := -1; - FTabSlants := TcxTabSlants.Create(Self); - FTabSlants.OnChange := TabSlantsChanged; - FTimer := nil; - FTracking := -1; - FUpdating := False; - TabStop := True; - - FImages := TcxPCImageList.Create(Self); - FImages.OnChange := ImageListChange; - FImages.OnPrepareBitmapBackground := PrepareImagesBitmapBackground; - FTabs := TcxTabs.Create(Self); - Style := cxPCDefaultStyle; - - CreateGoDialog; -end; - -destructor TcxCustomTabControl.Destroy; -begin - FreeAndNil(FTabSlants); - FreeAndNil(FTimer); - FreeAndNil(FGoDialog); - FImages.Free; - FTabs.Free; - PaintersFactory.FreePainterInstance(FPainter); - FVisibleTabList.Free; - inherited Destroy; -end; - -function TcxCustomTabControl.CanFocus: Boolean; -begin - Result := inherited CanFocus and FFocusable; -end; - -function TcxCustomTabControl.GetOptimalSize: Integer; -var - ADistanceBetweenTabs, ATabFinishPosition, ATabStartPosition, ATabWidth, I: Integer; - AIsY: Boolean; - ALineFinishPosition, ALineStartPosition: Integer; -begin - Result := 0; - if VisibleTabList.Count = 0 then - Exit; - CalculateTabNormalSizes; - UpdateTabPosition(GetNavigatorButtons(True)); - - AIsY := TabPosition in [tpLeft, tpRight]; - ALineStartPosition := PointGetter(FTabsPosition.NormalTabsRect.TopLeft, AIsY); - ALineFinishPosition := ALineStartPosition + FTabsPosition.NormalRowWidth - 1; - ADistanceBetweenTabs := DistanceGetter(FPainter.GetTabsNormalDistance, not Rotate); - - ATabStartPosition := ALineStartPosition; - ATabFinishPosition := ATabStartPosition; - for I := 0 to VisibleTabList.Count - 1 do - begin - ATabWidth := FVisibleTabList[I].NormalLongitudinalSize; - ATabFinishPosition := ATabStartPosition + ATabWidth - 1; - ATabStartPosition := ATabFinishPosition + 1 + ADistanceBetweenTabs; - end; - FIsLastTabFullyVisible := (ATabFinishPosition <= ALineFinishPosition); - - if TabPosition in [tpTop, tpBottom] then - Result := ATabFinishPosition + 1 + (Width - 1 - ALineFinishPosition) - else - Result := ATabFinishPosition + 1 + (Height - 1 - ALineFinishPosition); -end; - -procedure TcxCustomTabControl.GetTabOrderList(List: TList); -begin - inherited GetTabOrderList(List); - if not FFocusable then - List.Remove(Self); -end; - -function TcxCustomTabControl.IndexOfTabAt(X, Y: Integer): Integer; -var - FirstIndex, LastIndex, I: Integer; -begin - Result := -1; - InitializeVisibleTabRange(Self, FirstIndex, LastIndex); - for I := FirstIndex to LastIndex do - with FVisibleTabList[I] do - if PtInRect(VisibleRect, Point(X, Y)) and FPainter.IsOverTab(I, X, Y) then - begin - Result := I; - Break; - end; -end; - -procedure TcxCustomTabControl.ScrollTabs(Delta: Integer); -var - I: Integer; -begin - if not FMultiLine then - begin - for I := 0 to Abs(Delta) - 1 do - if Delta < 0 then - ArrowButtonClick(nbTopLeft) - else - ArrowButtonClick(nbBottomRight); - end; -end; - -procedure TcxCustomTabControl.SetStandardStyle(StandardStyle: TcxPCStandardStyle); -const - StandardStyleNameMap: array[TcxPCStandardStyle] of string = ( - 'tsTabs', 'tsButtons', 'tsFlatButtons'); -var - NewPainterClass: TcxPCPainterClass; -begin - NewPainterClass := PaintersFactory.GetPainterClass(StandardStyle); - if NewPainterClass = nil then - OutError('SetStandardStyle', Format(scxPCStandardStyleError, [StandardStyleNameMap[StandardStyle]])) - else - Style := NewPainterClass.GetStyleID; -end; - -procedure TcxCustomTabControl.SetStyleByStyleName(StyleName: TCaption); -var - NewPainterClass: TcxPCPainterClass; -begin - if StyleName = cxPCDefaultStyleName then - begin - FStyle := cxPCDefaultStyle; - SetDefaultStyle; - end - else - begin - NewPainterClass := PaintersFactory.GetPainterClass(StyleName); - if NewPainterClass = nil then - OutError('SetStyleByName', Format(scxPCStyleNameError, [StyleName])) - else - Style := NewPainterClass.GetStyleID; - end; -end; - -procedure TcxCustomTabControl.AdjustClientRect(var Rect: TRect); -begin - Rect := InternalGetClientRect; -end; - -procedure TcxCustomTabControl.ChangeScale(M, D: Integer); -begin - FClientRect.Left := MulDiv(FClientRect.Left, M, D); - FClientRect.Top := MulDiv(FClientRect.Top, M, D); - FClientRect.Right := MulDiv(FClientRect.Right, M, D); - FClientRect.Bottom := MulDiv(FClientRect.Bottom, M, D); - inherited; -end; - -procedure TcxCustomTabControl.AfterPaintTab(ACanvas: TcxCanvas; ATab: TcxTab; - AImageAndTextData: TcxPCOutTabImageAndTextData); -begin -end; - -procedure TcxCustomTabControl.DefineProperties(Filer: TFiler); - - function IsClientRectBottomStored: Boolean; - begin - if Assigned(Filer.Ancestor) then - Result := InternalGetClientRect.Bottom <> - TcxCustomTabControl(Filer.Ancestor).InternalGetClientRect.Bottom - else - Result := InternalGetClientRect.Bottom <> 0; - end; - - function IsClientRectLeftStored: Boolean; - begin - if Assigned(Filer.Ancestor) then - Result := InternalGetClientRect.Left <> - TcxCustomTabControl(Filer.Ancestor).InternalGetClientRect.Left - else - Result := InternalGetClientRect.Left <> 0; - end; - - function IsClientRectRightStored: Boolean; - begin - if Assigned(Filer.Ancestor) then - Result := InternalGetClientRect.Right <> - TcxCustomTabControl(Filer.Ancestor).InternalGetClientRect.Right - else - Result := True; - end; - - function IsClientRectTopStored: Boolean; - begin - if Assigned(Filer.Ancestor) then - Result := InternalGetClientRect.Top <> - TcxCustomTabControl(Filer.Ancestor).InternalGetClientRect.Top - else - Result := True; - end; - -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('ClientRectBottom', ReadClientRectBottom, - WriteClientRectBottom, IsClientRectBottomStored); - Filer.DefineProperty('ClientRectLeft', ReadClientRectLeft, - WriteClientRectLeft, IsClientRectLeftStored); - Filer.DefineProperty('ClientRectRight', ReadClientRectRight, - WriteClientRectRight, IsClientRectRightStored); - Filer.DefineProperty('ClientRectTop', ReadClientRectTop, - WriteClientRectTop, IsClientRectTopStored); -end; - -function TcxCustomTabControl.DoCanClose: Boolean; -begin - Result := True; - if Assigned(FOnCanClose) then - FOnCanClose(Self, Result); -end; - -procedure TcxCustomTabControl.DoClose; -begin - Tabs.Delete(TabIndex); - Change; -end; - -procedure TcxCustomTabControl.DoDrawTabEx(ATabVisibleIndex: Integer; - AFont: TFont); -begin - if Assigned(FOnDrawTabEx) then - FOnDrawTabEx(Self, VisibleTabList[ATabVisibleIndex], AFont); -end; - -function TcxCustomTabControl.DoMouseWheelDown(Shift: TShiftState; - MousePos: TPoint): Boolean; -begin - Result := CanMouseWheel(MousePos); - if Result then - ScrollTabs(1); -end; - -function TcxCustomTabControl.DoMouseWheelUp(Shift: TShiftState; - MousePos: TPoint): Boolean; -begin - Result := CanMouseWheel(MousePos); - if Result then - ScrollTabs(-1); -end; - -procedure TcxCustomTabControl.EraseBackground(DC: HDC); -begin - Canvas.Canvas.Lock; - try - Canvas.Canvas.Handle := DC; - try - Painter.FillTabPaneContent; - finally - Canvas.Canvas.Handle := 0; - end; - finally - Canvas.Canvas.Unlock; - end; -end; - -procedure TcxCustomTabControl.FocusChanged; -begin - inherited FocusChanged; - if not IsDestroying and (FMainTabVisibleIndex <> -1) and - FVisibleTabList[FMainTabVisibleIndex].RealVisible then - FPainter.RepaintTab(FMainTabVisibleIndex, tpcFocused); -end; - -procedure TcxCustomTabControl.FontChanged; -begin - inherited FontChanged; - RequestLayout; -end; - -function TcxCustomTabControl.HandleDialogChar(Key: Integer): Boolean; -var - I: Integer; - Tab: TcxTab; -begin - Result := False; - for I := 0 to Tabs.Count - 1 do - begin - Tab := TabsTabs[I]; - if IsAccel(Key, Tab.Caption) and CanShowTab(I) and inherited CanFocus then - begin - Result := True; - TabIndex := Tab.Index; - Break; - end; - end; -end; - -function TcxCustomTabControl.HasBackground: Boolean; -begin - Result := False; -end; - -procedure TcxCustomTabControl.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited KeyDown(Key, Shift); - InternalKeyDown(Key, Shift); -end; - -procedure TcxCustomTabControl.Loaded; -var - OldTabIndex: Integer; -begin - inherited Loaded; - RequestLayout; - if TabIndex <> -1 then - begin - OldTabIndex := FTabIndex; - FTabIndex := -1; - LockChangeEvent(True); - try - TabIndex := OldTabIndex; - finally - LockChangeEvent(False); - end; - end; -end; - -procedure TcxCustomTabControl.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited LookAndFeelChanged(Sender, AChangedValues); - SetDefaultStyle; - RequestLayout; - if lfvNativeStyle in AChangedValues then - InvalidateWithChildren; -end; - -procedure TcxCustomTabControl.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - - procedure NavigatorButtonDown(ANavigatorButton: TcxPCNavigatorButton); - var - APrevButtonState: TcxPCNavigatorButtonState; - begin - APrevButtonState := FNavigatorButtonStates[ANavigatorButton]; - if APrevButtonState in [nbsPressed, nbsDisabled] then Exit; - - FNavigatorButtonStates[ANavigatorButton] := nbsPressed; - FPressedNavigatorButton := [ANavigatorButton]; - FPainter.RepaintButton(ANavigatorButton, APrevButtonState); - - if ANavigatorButton in [nbTopLeft, nbBottomRight] then - begin - ArrowButtonClick(ANavigatorButton); - if FPressedNavigatorButton = [ANavigatorButton] then - CreateTimer; - end; - end; - - procedure TabDown(ATabVisibleIndex: Integer); - begin - if ATabVisibleIndex <> -1 then - with FVisibleTabList[ATabVisibleIndex] do - begin - if not RealEnabled and not IsDesigning then Exit; - if FPainter.IsTabPressable and not IsDesigning then - begin - FPressedTabVisibleIndex := ATabVisibleIndex; - FPainter.RepaintTab(ATabVisibleIndex, tpcPressed); - end - else - SelectTab(ATabVisibleIndex, ssCtrl in Shift); - end; - end; - -var - ANavigatorButton: TcxPCNavigatorButton; - AGoDialogJustClosed: Boolean; -begin - AGoDialogJustClosed := FGoDialogJustClosed; - FGoDialogJustClosed := False; - inherited MouseDown(Button, Shift, X, Y); - if not IsDesigning and (HideTabs or (Button <> mbLeft)) then - Exit; - - SynchronizeHotTrackStates(Shift); - - if FPainter.IsOverButton(X, Y, ANavigatorButton) then - begin - if not AGoDialogJustClosed or (ANavigatorButton <> nbGoDialog) then - NavigatorButtonDown(ANavigatorButton) - end - else - TabDown(IndexOfTabAt(X, Y)); -end; - -procedure TcxCustomTabControl.MouseLeave(AControl: TControl); -begin - inherited MouseLeave(AControl); - if not FIsGoDialogShowing then - SynchronizeHotTrackStates([]); -end; - -procedure TcxCustomTabControl.MouseMove(Shift: TShiftState; X, Y: Integer); - - procedure ReleaseNavigatorButton; - var - NavigatorButton, NavigatorButton1: TcxPCNavigatorButton; - begin - if FTimer <> nil then - begin - FTimer.Enabled := False; - for NavigatorButton := nbTopLeft to nbBottomRight do - if FNavigatorButtonStates[NavigatorButton] = nbsPressed then - begin - if FPainter.IsOverButton(X, Y, NavigatorButton1) and - (NavigatorButton = NavigatorButton1) and (HotTrack or Painter.IsEnableHotTrack) then - FNavigatorButtonStates[NavigatorButton] := nbsHotTrack - else - FNavigatorButtonStates[NavigatorButton] := nbsNormal; - UpdateButtonsState; - FPainter.RepaintButtonsRegion; - end; - end; - end; - -var - NavigatorButton: TcxPCNavigatorButton; - TabVisibleIndex: Integer; - OldPressedTabVisibleIndex: Integer; - IsOverNavigatorButton: Boolean; - PressedNavigatorButton: TcxPCNavigatorButton; -begin - inherited MouseMove(Shift, X, Y); - if HideTabs then Exit; - if FIsGoDialogShowing then Exit; - - IsOverNavigatorButton := FPainter.IsOverButton(X, Y, NavigatorButton); - if (IsOverNavigatorButton and (FPressedNavigatorButton <> [NavigatorButton])) or - (not IsOverNavigatorButton) then - if FPressedNavigatorButton <> [] then - begin - if FTimer <> nil then - FTimer.Enabled := False; - PressedNavigatorButton := GetNavigatorButton(FPressedNavigatorButton); - FNavigatorButtonStates[PressedNavigatorButton] := nbsNormal; - FPressedNavigatorButton := []; - FPainter.RepaintButton(PressedNavigatorButton, nbsPressed); - end; - - TabVisibleIndex := IndexOfTabAt(X, Y); - if (TabVisibleIndex <> FPressedTabVisibleIndex) and - (FPressedTabVisibleIndex <> -1) then - begin - OldPressedTabVisibleIndex := FPressedTabVisibleIndex; - FPressedTabVisibleIndex := -1; - FPainter.RepaintTab(OldPressedTabVisibleIndex, tpcPressed); - end; - - SynchronizeHotTrackStates(Shift); -end; - -procedure TcxCustomTabControl.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - - procedure NavigatorButtonUp(NavigatorButton: TcxPCNavigatorButton); - var - ACloseButtonClicked: Boolean; - AOldButtonState: TcxPCNavigatorButtonState; - begin - if FTimer <> nil then FTimer.Enabled := False; - AOldButtonState := FNavigatorButtonStates[NavigatorButton]; - if AOldButtonState = nbsDisabled then Exit; - if (not IsDesigning) and (NavigatorButton = nbGoDialog) and - (FPressedNavigatorButton = [nbGoDialog]) then - ShowGoDialog - else - begin - ACloseButtonClicked := (not IsDesigning) and (NavigatorButton = nbClose) and - (FPressedNavigatorButton = [nbClose]); - - if AOldButtonState = nbsPressed then FPressedNavigatorButton := []; - FNavigatorButtonStates[NavigatorButton] := nbsNormal; - FPainter.RepaintButton(NavigatorButton, AOldButtonState); - SynchronizeHotTrackStates(Shift); - - if ACloseButtonClicked then - CloseButtonClick; - end; - end; - - procedure TabUp(TabVisibleIndex: Integer); - begin - with FVisibleTabList[TabVisibleIndex] do - begin - if not RealEnabled and not IsDesigning then Exit; - if FPainter.IsTabPressable and not IsDesigning and - (TabVisibleIndex = FPressedTabVisibleIndex) then - begin - if FPressedTabVisibleIndex <> -1 then - begin - FPressedTabVisibleIndex := -1; - FPainter.RepaintTab(TabVisibleIndex, tpcPressed); - end; - - SelectTab(TabVisibleIndex, ssCtrl in Shift); - end; - - SynchronizeHotTrackStates(Shift); - end; - end; - -var - NavigatorButton: TcxPCNavigatorButton; - PressedTabVisibleIndex: Integer; -begin - inherited MouseUp(Button, Shift, X, Y); - if HideTabs then Exit; - if Button <> mbLeft then Exit; - if FIsGoDialogShowing then Exit; - if FPainter.IsOverButton(X, Y, NavigatorButton) then - NavigatorButtonUp(NavigatorButton) - else - begin - PressedTabVisibleIndex := IndexOfTabAt(X, Y); - if PressedTabVisibleIndex <> -1 then - TabUp(PressedTabVisibleIndex); - end; -end; - -function TcxCustomTabControl.NeedsScrollBars: Boolean; -begin - Result := False; -end; - -function TcxCustomTabControl.NeedRedrawOnResize: Boolean; -begin - Result := (pcoRedrawOnResize in Options) and Painter.NeedRedrawOnResize; -end; - -procedure TcxCustomTabControl.Paint; -begin - if IsDestroying then - Exit; - FPainter.SaveClipRgn; - try - FPainter.Paint; - finally - FPainter.RestoreClipRgn; - end; -end; - -procedure TcxCustomTabControl.Resize; -begin - RequestLayout; - Realign; - inherited Resize; -end; - -function TcxCustomTabControl.CanChange(NewTabIndex: Integer): Boolean; -begin - Result := True; - if Assigned(FOnChanging) and not IsChangeEventLocked then - FOnChanging(Self, Result); -end; - -function TcxCustomTabControl.CanShowTab(TabIndex: Integer): Boolean; -begin - Result := TabsTabs[TabIndex].Visible and TabsTabs[TabIndex].RealEnabled; -end; - -procedure TcxCustomTabControl.Change; -begin - if Assigned(FOnChange) and not IsChangeEventLocked then - FOnChange(Self); -end; - -procedure TcxCustomTabControl.CorrectFirstVisibleTab( - TabVisibleIndex: Integer); - -var - c: Integer; - ADistanceBetweenTabs: Integer; -begin - if TabVisibleIndex < FFirstVisibleTab then - FFirstVisibleTab := TabVisibleIndex - else if (TabVisibleIndex = FLastVisibleTab) and FIsLastTabFullyVisible then - Exit - else if TabVisibleIndex >= FLastVisibleTab then - begin - UpdateTabPosition(FNavigatorButtons); - ADistanceBetweenTabs := DistanceGetter(FPainter.GetTabsNormalDistance, not Rotate); - if IsTooSmallControlSize then - FFirstVisibleTab := TabVisibleIndex - else - begin - c := FVisibleTabList[TabVisibleIndex].NormalLongitudinalSize; - FFirstVisibleTab := TabVisibleIndex; - while (c + ADistanceBetweenTabs < FTabsPosition.NormalRowWidth) and (FFirstVisibleTab > 0) do - begin - Dec(FFirstVisibleTab); - Inc(c, ADistanceBetweenTabs); - Inc(c, FVisibleTabList[FFirstVisibleTab].NormalLongitudinalSize); - if c > FTabsPosition.NormalRowWidth then Inc(FFirstVisibleTab); - end; - end; - end; -end; - -procedure TcxCustomTabControl.DoShowGoDialog; -begin - FGoDialog.Popup(pcoSort in Options); - HideGoDialog(-1); -end; - -procedure TcxCustomTabControl.DrawTab(TabIndex: Integer; const Rect: TRect; - Active: Boolean); -begin -end; - -function TcxCustomTabControl.GetActivePage: TcxTabSheet; -begin - Result := nil; -end; - -function TcxCustomTabControl.GetImageIndex(ATabIndex: Integer): Integer; -begin - Result := TabsTabs[ATabIndex].FImageIndex; - if Assigned(OnGetImageIndex) then - OnGetImageIndex(Self, ATabIndex, Result); - if Result < 0 then - Result := -1; - if (Images = nil) or (Images.Width <= 0) or (Images.Height <= 0) or - (Result >= Images.Count) then - Result := -1; -end; - -function TcxCustomTabControl.GetPage(ATabIndex: Integer): TcxTabSheet; -begin - Result := nil; -end; - -procedure TcxCustomTabControl.GoDialogClickEventHandler(ATabControlItemIndex: Integer); -begin - HideGoDialog(ATabControlItemIndex); -end; - -procedure TcxCustomTabControl.HideGoDialog(ATabControlItemIndex: Integer); -begin - if IsMessageInQueue(Handle, WM_LBUTTONDOWN) or IsMessageInQueue(Handle, WM_LBUTTONDBLCLK) then - FGoDialogJustClosed := True; - - FIsGoDialogShowing := False; - - FNavigatorButtonStates[nbGoDialog] := nbsNormal; - FPressedNavigatorButton := []; - FPainter.RepaintButton(nbGoDialog, nbsPressed); - - if ATabControlItemIndex <> -1 then - TabIndex := ATabControlItemIndex; - - SynchronizeHotTrackStates(InternalGetShiftState); -end; - -procedure TcxCustomTabControl.ImageListChange(Sender: TObject); -begin - RequestLayout; -end; - -function TcxCustomTabControl.InternalKeyDown(var Key: Word; - Shift: TShiftState): Boolean; - - function GetCorrectedDelta(Delta: Integer): Integer; - var - SpecialAlignment: Boolean; - begin - SpecialAlignment := IsRightToLeftAlignment(Self) or IsBottomToTopAlignment(Self); - if (SpecialAlignment and (Delta = -1)) or - ((not SpecialAlignment) and (Delta = 1)) then - Result := 1 - else - Result := -1; - end; - - procedure ChangeTabIndex(TabVisibleIndex: Integer); - begin - if TabVisibleIndex <> FMainTabVisibleIndex then - TabIndex := FVisibleTabList[TabVisibleIndex].Index; - end; - - function GetNearestEnabledVisibleTabVisibleIndex(CurrentTabVisibleIndex, - Delta: Integer; Cycle: Boolean): Integer; - var - I: Integer; - VisibleTabCount: Integer; - begin - Result := -1; - VisibleTabCount := FVisibleTabList.Count; - I := CurrentTabVisibleIndex; - repeat - if FVisibleTabList[I].RealEnabled then Break - else - begin - Inc(I, Delta); - if ((I < 0) or (I >= VisibleTabCount)) then - if not Cycle then - Exit - else - if I < 0 then I := VisibleTabCount - 1 - else I := 0; - end; - until I = CurrentTabVisibleIndex; - if FVisibleTabList[I].RealEnabled then - Result := I; - end; - -var - Delta: Integer; - Cycle: Boolean; - TabVisibleIndex: Integer; - VisibleTabCount: Integer; -begin - Result := False; - VisibleTabCount := FVisibleTabList.Count; - if HideTabs or (VisibleTabCount = 0) then Exit; - if (Shift = [ssAlt]) or (Shift = [ssAlt, ssShift]) then Exit; - - Cycle := False; - Delta := 0; - TabVisibleIndex := -1; - case Key of - VK_TAB: - if ssCtrl in Shift then - begin - Cycle := True; - if ssShift in Shift then - Delta := -1 - else - Delta := 1; - end; - VK_RIGHT, VK_DOWN: - Delta := 1; - VK_LEFT, VK_UP: - Delta := -1; - VK_HOME, VK_END: - begin - if Key = VK_HOME then Delta := -1 - else Delta := 1; - Delta := GetCorrectedDelta(Delta); - if Delta = 1 then - TabVisibleIndex := VisibleTabCount - 1 - else - TabVisibleIndex := 0; - Delta := -Delta; - end; - VK_RETURN, VK_SPACE: - if FTracking <> -1 then - begin - TabIndex := FVisibleTabList[FTracking].Index; - Result := True; - end; - end; - - if Delta = 0 then - Exit; - Result := True; - - if TabVisibleIndex = -1 then - begin - Delta := GetCorrectedDelta(Delta); - if FTracking <> -1 then - TabVisibleIndex := FTracking + Delta - else if FMainTabVisibleIndex <> -1 then - TabVisibleIndex := FMainTabVisibleIndex + Delta - else - if Delta = 1 then TabVisibleIndex := 0 - else TabVisibleIndex := VisibleTabCount - 1; - - if TabVisibleIndex < 0 then - if Cycle then TabVisibleIndex := VisibleTabCount - 1 - else Exit; - if TabVisibleIndex >= VisibleTabCount then - if Cycle then TabVisibleIndex := 0 - else Exit; - end; - - TabVisibleIndex := GetNearestEnabledVisibleTabVisibleIndex(TabVisibleIndex, Delta, Cycle); - - if TabVisibleIndex <> -1 then - if (not FPainter.IsTabPressable) or (Key = VK_TAB) then - ChangeTabIndex(TabVisibleIndex) - else - Tabs.SetTracking(TabVisibleIndex); -end; - -function TcxCustomTabControl.IsChangeEventLocked: Boolean; -begin - Result := (FChangeEventLockCount > 0) or IsLoading; -end; - -procedure TcxCustomTabControl.LockChangeEvent(ALock: Boolean); -begin - if ALock then - Inc(FChangeEventLockCount) - else - if FChangeEventLockCount > 0 then - Dec(FChangeEventLockCount); -end; - -class procedure TcxCustomTabControl.OutError(SourceMethodName: TCaption; Msg: TCaption); -begin - raise EdxException.Create('TcxCustomTabControl.' + SourceMethodName + ': ' + Msg); -end; - -procedure TcxCustomTabControl.PrepareTabCanvasFont(ATab: TcxTab; ACanvas: TcxCanvas); -begin - ACanvas.Font := Font; - ACanvas.Font.Color := Painter.GetTextColor(ATab.VisibleIndex); - DoDrawTabEx(ATab.VisibleIndex, ACanvas.Font); -end; - -procedure TcxCustomTabControl.RequestLayout; -var - APrevMainTabVisibleIndex: Integer; -begin - if IsLoading or FUpdating then Exit; - FUpdating := True; - try - APrevMainTabVisibleIndex := FMainTabVisibleIndex; - if FMainTabVisibleIndex >= VisibleTabList.Count then - FMainTabVisibleIndex := -1; - - Painter.Init; - CorrectMaxRotatedTabWidth; - - Tabs.ResetTabVerticalTextBitmaps; - Calculate; - Tabs.ValidateImageIndexes; - SynchronizeTabImagesRotationAngle; - Realign; - Invalidate; - - FMainTabVisibleIndex := APrevMainTabVisibleIndex; - Tabs.SetMainTab; - - SynchronizeHotTrackStates(InternalGetShiftState); - finally - FUpdating := False; - end; -end; - -procedure TcxCustomTabControl.SetDefaultStyle; -var - AStyleID: TcxPCStyleID; -begin - if Style <> cxPCDefaultStyle then Exit; - AStyleID := PaintersFactory.GetStyleID(LookAndFeel); - if AStyleID = cxPCNoStyle then - Style := PaintersFactory.GetDefaultStyleID(LookAndFeel) - else - Style := AStyleID; - FStyle := cxPCDefaultStyle; -end; - -procedure TcxCustomTabControl.SetModified; -begin - if not IsLoading then - Modified; -end; - -procedure TcxCustomTabControl.ShowGoDialog; -begin - FIsGoDialogShowing := True; - DoShowGoDialog; -end; - -function TcxCustomTabControl.TabIndexTabMustBeVisible: Boolean; -begin - Result := False; -end; - -procedure TcxCustomTabControl.UpdateTabImages; -var - I: Integer; -begin - for I := 0 to FTabs.Count - 1 do - TabsTabs[I].ImageIndex := GetImageIndex(I); - Invalidate; -end; - -procedure TcxCustomTabControl.CreateHandle; -begin - inherited CreateHandle; - RequestLayout; - Realign; -end; - -procedure TcxCustomTabControl.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params.WindowClass do - style := style and not(CS_HREDRAW or CS_VREDRAW); -end; - -{ TcxPCImageList } - -constructor TcxPCImageList.Create(AParent: TcxCustomTabControl); -begin - inherited Create; - FParent := AParent; - - FBaseImageChangeLink := TChangeLink.Create; - FBaseImageChangeLink.OnChange := BaseImageListChange; - FImageRotationAngle := ra0; - - FFreeNotificator := TcxFreeNotificator.Create(nil); - FFreeNotificator.OnFreeNotification := FreeNotification; -end; - -destructor TcxPCImageList.Destroy; -begin - FFreeNotificator.Free; - FBaseImageChangeLink.Free; - ClearRotatedImages; - inherited Destroy; -end; - -procedure TcxPCImageList.Draw(Canvas: TCanvas; X, Y, - Index: Integer; BackgroundColor: TColor; Enabled: Boolean = True); -var - Bitmap: TBitmap; -begin - if not VerifyImageList(BaseImages) then - OutError('Draw', scxPCNoBaseImages); - if (Index < 0) or (Index >= BaseImages.Count) then - OutError('Draw', Format(scxPCImageListIndexError, [Index, BaseImages.Count - 1])); - - if ImageRotationAngle = ra0 then - begin - if FParent.Painter.IsNativePainting then - BaseImages.Draw(Canvas, X, Y, Index, Enabled) - else - begin - Bitmap := TBitmap.Create; - try - PrepareBitmap(Bitmap, FParent.Canvas, BaseImageSize, BackgroundColor); - DoPrepareBitmapBackground(Bitmap); - BaseImages.Draw(Bitmap.Canvas, 0, 0, Index, Enabled); - Canvas.Draw(X, Y, Bitmap); - finally - Bitmap.Free; - end - end; - end else - begin - RotateImage(Index, BackgroundColor, Enabled); - Canvas.Draw(X, Y, FRotatedImages[Index].Bitmap); - end; -end; - -procedure TcxPCImageList.BaseImageListChange(Sender: TObject); -begin - RotateImages; - Change; -end; - -procedure TcxPCImageList.Change; -begin - if Assigned(OnChange) then - OnChange(Self); -end; - -procedure TcxPCImageList.ClearRotatedImages; -var - I: Integer; -begin - for I := 0 to Length(FRotatedImages) - 1 do - FRotatedImages[I].Bitmap.Free; - FRotatedImages := nil; -end; - -procedure TcxPCImageList.DoPrepareBitmapBackground(ABitmap: TBitmap); -begin - if Assigned(FOnPrepareBitmapBackground) then - FOnPrepareBitmapBackground(ABitmap); -end; - -function TcxPCImageList.GetBaseImageSize: TSize; -begin - if (BaseImages = nil) or (BaseImages.Width <= 0) or (BaseImages.Height <= 0) then - Result := Size(0, 0) - else - Result := Size(BaseImages.Width, BaseImages.Height); -end; - -function TcxPCImageList.GetRotatedImageSize: TSize; -begin - Result := GetBaseImageSize; - if ImageRotationAngle <> ra0 then - Result := Size(Result.cy, Result.cx); -end; - -procedure TcxPCImageList.FreeNotification(AComponent: TComponent); -begin - if AComponent = BaseImages then - BaseImages := nil; -end; - -class procedure TcxPCImageList.OutError(SourceMethodName, Msg: TCaption); -begin - raise EdxException.Create('TcxPCImageList.' + SourceMethodName + ': ' + Msg); -end; - -procedure TcxPCImageList.RotateImage(Index: Integer; - BackgroundColor: TColor; Enabled: Boolean); -var - E: TcxPCImageListRotatedImagesElement; -begin - E := FRotatedImages[Index]; - if (E.IsBackgroundColorSpecified) and (E.BackgroundColor = BackgroundColor) then Exit; - E.BackgroundColor := BackgroundColor; - E.IsBackgroundColorSpecified := True; - - with E.Bitmap, E.Bitmap.Canvas do - begin - Width := BaseImages.Width; - Height := BaseImages.Height; - Brush.Style := bsSolid; - Brush.Color := BackgroundColor; - FillRect(Rect(0, 0, Width, Height)); - if FParent.Painter.IsNativePainting then - Transparent := True; - DoPrepareBitmapBackground(E.Bitmap); - BaseImages.Draw(Canvas, 0, 0, Index, Enabled); - FParent.Canvas.RotateBitmap(E.Bitmap, ImageRotationAngle); - end; -end; - -procedure TcxPCImageList.RotateImages; -var - I: Integer; -begin - if FImageRotationAngle = ra0 then Exit; - if not VerifyImageList(FBaseImages) then Exit; - - ClearRotatedImages; - SetLength(FRotatedImages, BaseImages.Count); - for I := 0 to BaseImages.Count - 1 do - begin - FRotatedImages[I].IsBackgroundColorSpecified := False; - FRotatedImages[I].Bitmap := TBitmap.Create; - FRotatedImages[I].Bitmap.PixelFormat := pf32bit; - FRotatedImages[I].Bitmap.HandleType := bmDDB; - end; -end; - -procedure TcxPCImageList.SetBaseImages( - const Value: TCustomImageList); -begin - cxSetImageList(Value, FBaseImages, FBaseImageChangeLink, FFreeNotificator); -end; - -procedure TcxPCImageList.SetImageRotationAngle( - const Value: TcxRotationAngle); -begin - begin - FImageRotationAngle := Value; - BaseImageListChange(BaseImages); - end; -end; - -{ TcxPageControl } - -constructor TcxPageControl.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FPages := TList.Create; -end; - -destructor TcxPageControl.Destroy; -var - I: Integer; -begin - for I := 0 to PageCount - 1 do - with Pages[I] do - begin - FPageControl := nil; - FTab := nil; - end; - FPages.Free; - inherited Destroy; -end; - -function TcxPageControl.FindNextPage(ACurrentPage: TcxTabSheet; AGoForward, - ACheckTabAccessibility: Boolean): TcxTabSheet; -begin - Result := FindNextPageEx(ACurrentPage, AGoForward, ACheckTabAccessibility, True); -end; - -function TcxPageControl.FindNextPageEx(ACurrentPage: TcxTabSheet; - AGoForward, ACheckTabAccessibility, ACircular: Boolean): TcxTabSheet; - - function GetDefaultStartPageIndex: Integer; - begin - if AGoForward then - Result := 0 - else - Result := PageCount - 1; - end; - - function IncrementIndex(var APageIndex: Integer): Boolean; - const - AStep: array [Boolean] of Integer = (-1, 1); - begin - Result := True; - Inc(APageIndex, AStep[AGoForward]); - if (APageIndex < 0) or (PageCount - 1 < APageIndex) then - if ACircular then - APageIndex := GetDefaultStartPageIndex - else - Result := False; - end; - - function InternalGetNextPage(APagesCount: Integer; APageIndex: Integer): TcxTabSheet; - var - I: Integer; - begin - Result := nil; - for I := 0 to APagesCount - 1 do - begin - if not ACheckTabAccessibility or Pages[APageIndex].TabVisible and Pages[APageIndex].Enabled then - begin - Result := Pages[APageIndex]; - Break; - end - else - if not IncrementIndex(APageIndex) then - Break; - end; - end; - -var - APageIndex: Integer; -begin - Result := nil; - if PageCount <> 0 then - begin - APageIndex := FPages.IndexOf(ACurrentPage); - if APageIndex = -1 then - Result := InternalGetNextPage(PageCount, GetDefaultStartPageIndex) - else - if IncrementIndex(APageIndex) then - Result := InternalGetNextPage(PageCount - 1, APageIndex); - end; -end; - -procedure TcxPageControl.DockDrop(Source: TDragDockObject; X, Y: Integer); -begin - if (DockClient(Source, Point(X, Y)) >= 0) and Assigned(OnDockDrop) then - OnDockDrop(Self, Source, X, Y); -end; - -procedure TcxPageControl.SelectNextPage(GoForward: Boolean; CheckTabVisible: Boolean = True); -var - Page: TcxTabSheet; -begin - Page := FindNextPage(ActivePage, GoForward, CheckTabVisible); - if (Page <> nil) and (Page <> ActivePage) then - ActivePage := Page; -end; - -procedure TcxPageControl.AlignControls(AControl: TControl; var Rect: TRect); -var - ARgn: TcxRegion; -begin - inherited AlignControls(AControl, Rect); - if (ActivePage <> nil) and ActivePage.HandleAllocated and - (ActivePage.BorderWidth > 0) and Painter.IsNativePainting then - begin - ARgn := TcxRegion.Create(GetControlRect(ActivePage)); - try - SendMessage(ActivePage.Handle, WM_NCPAINT, ARgn.Handle, 0); - finally - ARgn.Free; - end; - end; -end; - -function TcxPageControl.CanChange(NewTabIndex: Integer): Boolean; -begin - Result := inherited CanChange(NewTabIndex); - if Result and (NewTabIndex <> -1) then - Result := CanChangeActivePage(Pages[NewTabIndex]); -end; - -function TcxPageControl.CanFocusOnClick: Boolean; -var - ATabIndex: Integer; -begin - Result := inherited CanFocusOnClick; - if Result then - begin - with ScreenToClient(GetMouseCursorPos) do - ATabIndex := IndexOfTabAt(X, Y); - Result := (ATabIndex <> -1) and (ActivePageIndex = ATabIndex); - end; -end; - -procedure TcxPageControl.Change; -begin - LockChangeEvent(True); - try - UpdateActivePage; - finally - LockChangeEvent(False); - end; - inherited Change; -end; - -procedure TcxPageControl.DoAddDockClient(Client: TControl; - const ARect: TRect); -begin - if FNewDockSheet <> nil then Client.Parent := FNewDockSheet; -end; - -function TcxPageControl.DockClient(DockSource: TDragDockObject; - MousePos: TPoint): Integer; - - function CheckDockingControl: Boolean; - var - I: Integer; - begin - Result := True; - for I := 0 to PageCount - 1 do - if DockSource.Control.Parent = Pages[I] then - begin - Pages[I].PageIndex := PageCount - 1; - Result := False; - Break; - end; - end; - -var - ADockingControl: TControl; -begin - Result := 0; - if not CheckDockingControl then - Exit; - FNewDockSheet := TcxTabSheet.Create(Self); - try - try - ADockingControl := DockSource.Control; - if ADockingControl is TCustomForm then - FNewDockSheet.Caption := TCustomForm(ADockingControl).Caption; - FNewDockSheet.PageControl := Self; - ADockingControl.Dock(Self, DockSource.DockRect); - except - FNewDockSheet.Free; - raise; - end; - FNewDockSheet.TabVisible := ADockingControl.Visible; - if ADockingControl.Visible then - ActivePage := FNewDockSheet; - ADockingControl.Align := alClient; - finally - FNewDockSheet := nil; - end; -end; - -procedure TcxPageControl.DoClose; -begin - ActivePage.Free; -end; - -procedure TcxPageControl.DockOver(Source: TDragDockObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -var - R: TRect; -begin - R := cxGetWindowRect(Self); - Source.DockRect := R; - DoDockOver(Source, X, Y, State, Accept); -end; - -procedure TcxPageControl.DoRemoveDockClient(Client: TControl); -begin - if (FUndockingPage <> nil) and not (csDestroying in ComponentState) then - begin - SelectNextPage(True); - FUndockingPage.Free; - FUndockingPage := nil; - end; -end; - -function TcxPageControl.GetActivePage: TcxTabSheet; -begin - Result := ActivePage; -end; - -function TcxPageControl.GetPage(ATabIndex: Integer): TcxTabSheet; -begin - Result := TcxTabSheet(FPages[ATabIndex]); -end; - -procedure TcxPageControl.GetSiteInfo(Client: TControl; - var InfluenceRect: TRect; MousePos: TPoint; var CanDock: Boolean); -begin - CanDock := GetPageFromDockClient(Client) = nil; - inherited GetSiteInfo(Client, InfluenceRect, MousePos, CanDock); -end; - -procedure TcxPageControl.ImageListChange(Sender: TObject); -var - I: Integer; -begin - if FPageInserting then - Exit; - - for I := 0 to PageCount - 1 do - Pages[I].FTab.ImageIndex := Pages[I].ImageIndex; - inherited ImageListChange(Sender); -end; - -procedure TcxPageControl.Loaded; -begin - inherited Loaded; - UpdateTabs; - if (not IsDesigning) and (ActivePage <> nil) and (not ActivePage.Enabled) then - ActivePage := nil; -end; - -procedure TcxPageControl.RequestLayout; -begin - inherited RequestLayout; - if ActivePage <> nil then - ActivePage.Invalidate; -end; - -procedure TcxPageControl.SetChildOrder(Child: TComponent; Order: Integer); -begin - TcxTabSheet(Child).PageIndex := Order; -end; - -procedure TcxPageControl.ShowControl(AControl: TControl); -var - Page: TcxTabSheet; -begin - if (AControl is TcxTabSheet) then - begin - Page := TcxTabSheet(AControl); - if Page.PageControl = Self then - ActivePage := Page; - end; - inherited ShowControl(AControl); -end; - -function TcxPageControl.TabIndexTabMustBeVisible: Boolean; -begin - Result := True; -end; - -function TcxPageControl.UndockClient(NewTarget, Client: TControl): Boolean; -var - APage: TcxTabSheet; -begin - Result := True; - APage := GetPageFromDockClient(Client); - if APage <> nil then - begin - FUndockingPage := APage; - Client.Align := alNone; - end; -end; - -function TcxPageControl.DoUnDock(NewTarget: TWinControl; - Client: TControl): Boolean; -begin - Result := True; - if Assigned(OnUnDock) then - OnUnDock(Self, Client, NewTarget, Result); - Result := Result and UndockClient(NewTarget, Client); -end; - -procedure TcxPageControl.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - I: Integer; -begin - for I := 0 to PageCount - 1 do - Proc(Pages[I]); -end; - -function TcxPageControl.CanChangeActivePage(NewPage: TcxTabSheet): Boolean; -begin - Result := True; - PageChanging(NewPage, Result); -end; - -procedure TcxPageControl.ControlChange(Inserting: Boolean; Child: TControl); -begin - if IsDesigning and Inserting and not (Child is TcxTabSheet) then - begin - Child.SetBounds(Child.Left + Left, Child.Top + Top, Child.Width, Child.Height); - Child.Parent := Parent; - end; -end; - -function TcxPageControl.GetPageFromDockClient(Client: TControl): TcxTabSheet; -var - I: Integer; -begin - Result := nil; - for I := 0 to PageCount - 1 do - begin - if (Client.Parent = Pages[I]) and (Client.HostDockSite = Self) then - begin - Result := Pages[I]; - Exit; - end; - end; -end; - -procedure TcxPageControl.PageChange; -begin - inherited Change; -end; - -procedure TcxPageControl.PageChanging(NewPage: TcxTabSheet; - var AllowChange: Boolean); -begin - if Assigned(FOnPageChanging) and not IsChangeEventLocked then - FOnPageChanging(Self, NewPage, AllowChange); -end; - -procedure TcxPageControl.UpdateActivePage; -begin - if TabIndex = -1 then - ActivePage := nil - else - ActivePage := Pages[TabIndex]; -end; - -procedure TcxPageControl.UpdateTab(APage: TcxTabSheet); -begin - if csLoading in ComponentState then Exit; - with APage.FTab do - begin - Caption := APage.Caption; - Enabled := APage.Enabled; - ImageIndex := APage.ImageIndex; - Highlighted := APage.Highlighted; - Visible := APage.TabVisible; - end; - if FActivePage = APage then - if APage.TabVisible then - TabIndex := APage.FTab.Index - else - TabIndex := -1; -end; - -procedure TcxPageControl.UpdateTabs; -var - I: Integer; -begin - for I := 0 to PageCount - 1 do - UpdateTab(Pages[I]); -end; - -procedure TcxPageControl.ChangeActivePage(APage: TcxTabSheet); -var - ANewActiveControl: TWinControl; - AParentForm: TCustomForm; -begin - if FActivePage <> APage then - begin - if not CanChangeActivePage(APage) then - Exit; - - AParentForm := GetParentForm(Self); - if (AParentForm <> nil) and (FActivePage <> nil) and - FActivePage.ContainsControl(AParentForm.ActiveControl) then - begin - AParentForm.ActiveControl := FActivePage; - if AParentForm.ActiveControl <> FActivePage then - begin - TabIndex := FActivePage.FTab.Index; - Exit; - end; - end; - - ANewActiveControl := nil; - if (APage <> nil) and (AParentForm <> nil) and (FActivePage <> nil) and - (AParentForm.ActiveControl = FActivePage) then - begin - if APage.Enabled and Visible and Enabled and Parent.CanFocus then - ANewActiveControl := APage - else - ANewActiveControl := Self; - end; - if FActivePage <> nil then - FActivePage.Visible := False; - if APage <> nil then - begin - APage.BringToFront; - APage.Visible := True; - APage.Invalidate; - end; - if ANewActiveControl <> nil then - AParentForm.ActiveControl := ANewActiveControl; - FActivePage := APage; - PageChange; - if (AParentForm <> nil) and (FActivePage <> nil) and - (AParentForm.ActiveControl = FActivePage) then - FActivePage.SelectFirst; - - SetModified; - end; -end; - -function TcxPageControl.GetActivePageIndex: Integer; -begin - if ActivePage = nil then - Result := -1 - else - Result := ActivePage.PageIndex; -end; - -function TcxPageControl.GetDockClientFromPoint(P: TPoint): TControl; -var - APage: TcxTabSheet; - AVisibleTabIndex, I: Integer; -begin - Result := nil; - if DockSite then - begin - AVisibleTabIndex := IndexOfTabAt(P.X, P.Y); - if AVisibleTabIndex >= 0 then - begin - APage := nil; - for I := 0 to PageCount - 1 do - if Pages[I].TabIndex = AVisibleTabIndex then - begin - APage := Pages[I]; - Break; - end; - if (APage <> nil) and (APage.ControlCount > 0) then - begin - Result := APage.Controls[0]; - if Result.HostDockSite <> Self then - Result := nil; - end; - end; - end; -end; - -function TcxPageControl.GetPageCount: Integer; -begin - Result := FPages.Count; -end; - -function TcxPageControl.GetTabCount: Integer; -begin - Result := FVisibleTabList.Count; -end; - -procedure TcxPageControl.InsertPage(APage: TcxTabSheet); -var - PageIndex: Integer; -begin - if CanAllocateHandle(Self) then - HandleNeeded; - FPageInserting := True; - try - PageIndex := FPages.Add(APage); - APage.SetParentPageControl(Self); - Tabs.Add(APage.Caption); - finally - FPageInserting := False; - end; - APage.FTab := Tabs.Tabs[PageIndex]; - UpdateTab(APage); -end; - -procedure TcxPageControl.RemovePage(APage: TcxTabSheet); - - function InternalFindNextPage(ACurrentPage: TcxTabSheet; AGoForward, - ACheckTabAccessibility: Boolean): TcxTabSheet; - begin - Result := FindNextPageEx(ACurrentPage, AGoForward, ACheckTabAccessibility, False); - if Result = nil then - Result := FindNextPageEx(ACurrentPage, not AGoForward, ACheckTabAccessibility, False); - end; - -var - ANextPage: TcxTabSheet; -begin - ANextPage := InternalFindNextPage(APage, True, not IsDesigning); - if ANextPage = APage then - ANextPage := nil; - - Tabs.Delete(FPages.Remove(APage)); - APage.FTab := nil; - FTabIndex := -1; - FMainTabVisibleIndex := -1; - ActivePage := ANextPage; - APage.SetParentPageControl(nil); -end; - -procedure TcxPageControl.SetActivePage(APage: TcxTabSheet); -begin - if FActivePageSetting or (APage <> nil) and (APage.PageControl <> Self) then - Exit; - ChangeActivePage(APage); - if ActivePage = APage then - begin - LockChangeEvent(True); - FActivePageSetting := True; - try - if (APage <> nil) and APage.TabVisible then - TabIndex := APage.FTab.Index - else - TabIndex := -1; - finally - FActivePageSetting := False; - LockChangeEvent(False); - end; - end; -end; - -procedure TcxPageControl.SetActivePageIndex(Value: Integer); -begin - if (Value >= 0) and (Value < PageCount) then - ActivePage := Pages[Value] - else - ActivePage := nil; -end; - -procedure TcxPageControl.WMLButtonDown(var Message: TWMLButtonDown); -var - ADockClient: TControl; -begin - inherited; - ADockClient := GetDockClientFromPoint(SmallPointToPoint(Message.Pos)); - if ADockClient <> nil then - ADockClient.BeginDrag(False); -end; - -procedure TcxPageControl.WMLButtonDblClk(var Message: TWMLButtonDblClk); -var - ADockClient: TControl; -begin - inherited; - ADockClient := GetDockClientFromPoint(SmallPointToPoint(Message.Pos)); - if ADockClient <> nil then - ADockClient.ManualDock(nil, nil, alNone); -end; - -procedure TcxPageControl.CMDockNotification(var Message: TCMDockNotification); -var - APage: TcxTabSheet; - I: Integer; - S: string; -begin - APage := GetPageFromDockClient(Message.Client); - if APage <> nil then - case Message.NotifyRec.ClientMsg of - WM_SETTEXT: - begin - S := PChar(Message.NotifyRec.MsgLParam); - for I := 1 to Length(S) do - if (S[I] = #10) or (S[I] = #13) then - begin - SetLength(S, I - 1); - Break; - end; - APage.Caption := S; - end; - CM_VISIBLECHANGED: - APage.TabVisible := Boolean(Message.NotifyRec.MsgWParam); - end; - inherited; -end; - -procedure TcxPageControl.CMControlChange(var Message: TCMControlChange); -begin - inherited; - ControlChange(Message.Inserting, Message.Control); -end; - -procedure TcxPageControl.CMUnDockClient(var Message: TCMUnDockClient); -begin - UndockClient(Message.NewTarget, Message.Client); -end; - -{ TcxPCCustomPainter } - -constructor TcxPCCustomPainter.Create( - AParent: TcxCustomTabControl); -begin - inherited Create; - FParentControl := AParent; - FParentInfo := TcxPCPainterParentInfo.Create(AParent); -end; - -destructor TcxPCCustomPainter.Destroy; -begin - FreeAndNil(FParentInfo); - inherited; -end; - -class function TcxPCCustomPainter.GetStandardStyle: TcxPCStandardStyle; -begin - Result := tsTabs; -end; - -class function TcxPCCustomPainter.GetStyleID: TcxPCStyleID; -begin - Result := cxPCNoStyle; -end; - -class function TcxPCCustomPainter.GetStyleName: TCaption; -begin - Result := ''; -end; - -class function TcxPCCustomPainter.HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := False; -end; - -class function TcxPCCustomPainter.IsDefault(ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := False; -end; - -class function TcxPCCustomPainter.IsMainTabBoundWithClient: Boolean; -begin - Result := True; -end; - -class function TcxPCCustomPainter.IsMultiSelectionAccepted: Boolean; -begin - Result := False; -end; - -class function TcxPCCustomPainter.IsStandardStyle: Boolean; -begin - Result := False; -end; - -class function TcxPCCustomPainter.IsTabPressable: Boolean; -begin - Result := False; -end; - -class function TcxPCCustomPainter.AllowRotate: Boolean; -begin - Result := True; -end; - -procedure TcxPCCustomPainter.CorrectTabRect(TabVisibleIndex: Integer; - var TabRectCorrection: TcxPCRectCorrection); -begin - TabRectCorrection := cxPCEmptyRectCorrection; -end; - -function TcxPCCustomPainter.CreateNewTabVerticalTextBitmap( - TabVisibleIndex: Integer): TBitmap; -begin - with ParentControl.FVisibleTabList[TabVisibleIndex] do - begin - FVerticalTextBitmap := TBitmap.Create; - Result := FVerticalTextBitmap; - end; -end; - -procedure TcxPCCustomPainter.DirectionalPolyline(const R: TRect; - APoints: array of TPoint; ATabPosition: TcxTabPosition; AColor: TColor); -begin - RotatePolyline(R, APoints, ATabPosition); - InternalPolyLine(APoints, AColor); -end; - -function TcxPCCustomPainter.DoCustomDraw(TabVisibleIndex: Integer): Boolean; -begin - Result := True; - ParentControl.OnDrawTab(ParentControl, ParentInfo.VisibleTabs[TabVisibleIndex], - Result); - Result := not Result; -end; - -procedure TcxPCCustomPainter.DrawNativeTabBackground(DC: HDC; ATab: TcxTabSheet); -begin -end; - -procedure TcxPCCustomPainter.DrawTabImageAndText(ATab: TcxTab; ATabVisibleIndex: Integer); - - procedure InitializeBitmap(ABitmap: TBitmap; S: TCaption; R: TRect; - AEnabled: Boolean; ABackgroundColor: TColor); - var - ATextRect: TRect; - begin - if IsNativePainting then - ABitmap.Canvas.Font := ParentInfo.Canvas.Font - else - PrepareBitmap(ABitmap, ParentInfo.Canvas, Size(R.Right - R.Left, - R.Bottom - R.Top), ABackgroundColor); - PrepareDrawTabContentBitmapBackground(ABitmap, FOutTabImageAndTextData.TabTextRect.TopLeft, - ATabVisibleIndex); - ATextRect := R; - if not IsNativePainting then - OffsetRect(ATextRect, -ATextRect.Left, -ATextRect.Top); - - with ABitmap.Canvas do - begin - Brush.Style := bsClear; - if not AEnabled then - begin - Font.Color := DisabledTextFaceColor; - if NeedDisabledTextShadow then - begin - OffsetRect(ATextRect, 1, 1); - InternalDrawText(ABitmap.Canvas, S, ATextRect, ATabVisibleIndex); - OffsetRect(ATextRect, -1, -1); - Font.Color := DisabledTextShadowColor; - end; - end; - InternalDrawText(ABitmap.Canvas, S, ATextRect, ATabVisibleIndex); - end; - end; - - procedure OutVerticalText(ACaption: TCaption; const R: TRect; - AEnabled: Boolean; ABackgroundColor: TColor); - var - ABitmap: TBitmap; - begin - ABitmap := GetTabVerticalTextBitmap(ATabVisibleIndex); - if ABitmap = nil then - begin - ABitmap := CreateNewTabVerticalTextBitmap(ATabVisibleIndex); - ABitmap.PixelFormat := pf32bit; - ABitmap.HandleType := bmDDB; - InitializeBitmap(ABitmap, ACaption, Rect(R.Top, R.Left, R.Bottom, R.Right), - AEnabled, ABackgroundColor); // Rotated rectangle - ParentInfo.Canvas.RotateBitmap(ABitmap, GetTextRotationAngle(ParentControl)); - end; - if IsNativePainting then - ATab.PaintBitmap.Canvas.Draw(R.Left, R.Top, ABitmap) - else - ParentInfo.Canvas.Draw(R.Left, R.Top, ABitmap); - end; - - procedure OutHorizontalText(ACaption: TCaption; const R: TRect; - AEnabled: Boolean; ABackgroundColor: TColor); - var - ABitmap: TBitmap; - begin - if IsNativePainting then - InitializeBitmap(ATab.PaintBitmap, ACaption, R, AEnabled, ABackgroundColor) - else - begin - ABitmap := TBitmap.Create; - try - ABitmap.PixelFormat := pf32bit; - ABitmap.HandleType := bmDDB; - InitializeBitmap(ABitmap, ACaption, R, AEnabled, ABackgroundColor); - ParentInfo.Canvas.Draw(R.Left, R.Top, ABitmap); - finally - ABitmap.Free; - end; - end; - end; - -var - IsTabEnabled: Boolean; - TabImageIndex: TImageIndex; - ABackgroundColor: TColor; -begin - FOutTabImageAndTextData.TabVisibleIndex := ATabVisibleIndex; - PrepareTabCanvasFont(ATab, ParentInfo.Canvas); - StandardPainterPrepareOutTabImageAndTextData(ATabVisibleIndex); - ABackgroundColor := GetTabBodyColor(ATabVisibleIndex); - - with FOutTabImageAndTextData do - begin - IsTabEnabled := ATab.RealEnabled; - TabImageIndex := ParentControl.GetImageIndex(ATab.Index); - if TabImageIndex <> -1 then - if IsNativePainting then - ParentControl.FImages.Draw(ATab.PaintBitmap.Canvas, TabImageRect.Left, - TabImageRect.Top, TabImageIndex, ABackgroundColor, IsTabEnabled) - else - begin - ParentControl.FImages.Draw(ParentInfo.Canvas.Canvas, TabImageRect.Left, - TabImageRect.Top, TabImageIndex, ABackgroundColor, IsTabEnabled); - end; - - if ATab.Caption <> '' then - begin - if InternalIsVerticalText(ParentControl) then - OutVerticalText(ATab.Caption, TabTextRect, IsTabEnabled, ABackgroundColor) - else - OutHorizontalText(ATab.Caption, TabTextRect, IsTabEnabled, ABackgroundColor); - end; - end; - ExcludeTabContentClipRegion(ATabVisibleIndex); -end; - -procedure TcxPCCustomPainter.ExcludeTabContentClipRegion(ATabVisibleIndex: Integer); -var - AContentRgn: TcxRegion; -begin - if IsNativePainting then - Exit; - - AContentRgn := TcxRegion.Create(FOutTabImageAndTextData.TabTextRect); - AContentRgn.Combine(TcxRegion.Create(FOutTabImageAndTextData.TabImageRect), roAdd); - AContentRgn.Combine(GetTabClipRgn(ATabVisibleIndex), roIntersect); - ParentInfo.Canvas.SetClipRegion(AContentRgn, roSubtract); -end; - -procedure TcxPCCustomPainter.FillDisplayRect; -begin - ParentInfo.Canvas.Brush.Style := bsSolid; - ParentInfo.Canvas.Brush.Color := GetClientColor; - ParentInfo.Canvas.FillRect(GetClientRect); -end; - -procedure TcxPCCustomPainter.FillTabPaneContent; -begin - FillDisplayRect; -end; - -function TcxPCCustomPainter.GetButtonsDistance( - AButton1, AButton2: TcxPCNavigatorButton): Integer; -begin - Result := 0; -end; - -function TcxPCCustomPainter.GetButtonsRegionFromTabsOffset: Integer; -begin - Result := 0; -end; - -function TcxPCCustomPainter.GetButtonsRegionHOffset: Integer; -begin - Result := 0; -end; - -function TcxPCCustomPainter.GetButtonsRegionWOffset: Integer; -begin - Result := 0; -end; - -function TcxPCCustomPainter.GetClientColor: TColor; -begin - if (ParentInfo.ActivePage <> nil) and not ParentInfo.ActivePage.ParentColor then - Result := ParentInfo.ActivePage.Color - else - Result := GetDefaultClientColor; -end; - -function TcxPCCustomPainter.GetClientRect: TRect; -begin - Result := GetExtendedRect(GetControlRect(ParentControl), - GetClientRectOffset, ParentInfo.TabPosition); - ValidateRect(Result); -end; - -function TcxPCCustomPainter.GetClientRectOffset: TRect; -begin - Result := GetDisplayRectOffset; - if NeedShowFrame then - OffsetRect(Result, GetFrameWidth, GetFrameWidth); -end; - -function TcxPCCustomPainter.GetDefaultClientColor: TColor; -begin - Result := ParentInfo.Color; -end; - -function TcxPCCustomPainter.GetDisplayRect: TRect; -begin - Result := GetExtendedRect(GetControlRect(ParentControl), - GetDisplayRectOffset, ParentInfo.TabPosition); - ValidateRect(Result); -end; - -function TcxPCCustomPainter.GetDisplayRectOffset: TRect; -begin - Result := cxEmptyRect; - if ParentInfo.HideTabs or (ParentInfo.RowCount = 0) then - Exit; - case ParentInfo.TabPosition of - tpTop: - begin - Result.Top := ParentInfo.ExtendedTopOrLeftTabsRect.Bottom; - if ParentInfo.TopOrLeftPartRowCount <> ParentInfo.RowCount then - Result.Bottom := ParentInfo.Height - ParentInfo.ExtendedBottomOrRightTabsRect.Top; - end; - tpLeft: - begin - Result.Top := ParentInfo.ExtendedTopOrLeftTabsRect.Right; - if ParentInfo.TopOrLeftPartRowCount <> ParentInfo.RowCount then - Result.Bottom := ParentInfo.Width - ParentInfo.ExtendedBottomOrRightTabsRect.Left; - end; - tpBottom: - begin - if ParentControl.IsTooSmallControlSize then - Result.Top := ParentInfo.ExtendedTopOrLeftTabsRect.Top - else - Result.Top := ParentInfo.Height - ParentInfo.ExtendedBottomOrRightTabsRect.Top; - if ParentInfo.TopOrLeftPartRowCount <> 0 then - Result.Bottom := ParentInfo.ExtendedTopOrLeftTabsRect.Bottom; - end; - tpRight: - begin - if ParentControl.IsTooSmallControlSize then - Result.Top := ParentInfo.ExtendedTopOrLeftTabsRect.Left - else - Result.Top := ParentInfo.Width - ParentInfo.ExtendedBottomOrRightTabsRect.Left; - if ParentInfo.TopOrLeftPartRowCount <> 0 then - Result.Bottom := ParentInfo.ExtendedTopOrLeftTabsRect.Right; - end; - end; -end; - -function TcxPCCustomPainter.GetExtendedRect(const ARect, AExtension: TRect; ATabPosition: TcxTabPosition): TRect; -begin - Result := ARect; - cxGraphics.ExtendRect(Result, RotateRect(AExtension, ATabPosition)); -end; - -function TcxPCCustomPainter.GetFrameWidth: Integer; -begin - Result := 0; -end; - -function TcxPCCustomPainter.GetDisabledTextFaceColor: TColor; -begin - Result := clBtnHighlight; -end; - -function TcxPCCustomPainter.GetDisabledTextShadowColor: TColor; -begin - Result := clBtnShadow; -end; - -function TcxPCCustomPainter.GetHighlightedTabBodyColor: TColor; -begin - Result := clHighlight; -end; - -procedure TcxPCCustomPainter.PrepareTabControlImagesBitmapBackground(ABitmap: TBitmap); -begin - with FOutTabImageAndTextData do - PrepareDrawTabContentBitmapBackground(ABitmap, TabImageRect.TopLeft, TabVisibleIndex); -end; - -procedure TcxPCCustomPainter.AfterPaintTab(ATabVisibleIndex: Integer); -begin - ParentControl.AfterPaintTab(ParentInfo.Canvas, ParentInfo.VisibleTabs[ATabVisibleIndex], - FOutTabImageAndTextData); -end; - -function TcxPCCustomPainter.AlwaysColoredTabs: Boolean; -begin - Result := False; -end; - -function TcxPCCustomPainter.GetHighlightedTextColor(ATabVisibleIndex: Integer; - ATextColor: TColor): TColor; -var - AColor: TColorRef; - ATheme: TdxTheme; -begin - if IsNativePainting then - begin - ATheme := OpenTheme(totTab); - if GetThemeColor(ATheme, TABP_TABITEM, GetTabNativeState(ATabVisibleIndex), TMT_TEXTCOLOR, AColor) = S_OK then - Result := AColor - else - Result := ATextColor; - end - else - Result := clHighlightText; -end; - -function TcxPCCustomPainter.GetHotTrackColor: TColor; -begin - Result := GetSysColor(COLOR_HOTLIGHT) -end; - -function TcxPCCustomPainter.GetMaxTabCaptionHeight: Integer; -var - ATextHeight: Integer; - I: Integer; -begin - Result := 0; - for I := 0 to ParentControl.VisibleTabList.Count - 1 do - begin - ATextHeight := TextSize(ParentInfo.VisibleTabs[I], 'Zg').cy; - if ATextHeight > Result then - Result := ATextHeight; - end; -end; - -function TcxPCCustomPainter.GetNativeContentOffset: TRect; -var - R: TRect; -begin - R := Rect(0, 0, 100, 100); - GetThemeBackgroundContentRect(OpenTheme(totTab), 0, TABP_PANE, 0, R, Result); - Result.Right := R.Right - Result.Right; - Result.Bottom := R.Bottom - Result.Bottom; - - if IsStandardTheme then - begin - if ParentInfo.IsTabsContainer then - Result.Left := TabsContainerBaseWidth - else - Result.Left := Max(Result.Left, Result.Top); - Result.Top := Result.Left; - Result.Right := Result.Left * 2;//Max(Result.Right, Result.Bottom); - Result.Bottom := Result.Top * 2;//Result.Right; - end; -end; - -function TcxPCCustomPainter.GetTabBaseImageSize: TSize; -begin - Result := ParentControl.FImages.BaseImageSize; -end; - -function TcxPCCustomPainter.GetTabColor(ATabVisibleIndex: Integer): TColor; -begin - Result := ParentInfo.TabColors[ATabVisibleIndex]; -end; - -function TcxPCCustomPainter.GetTabClipRgn(ATabVisibleIndex: Integer): TcxRegion; -begin - Result := TcxRegion.Create(ParentInfo.VisibleTabs[ATabVisibleIndex].VisibleRect); -end; - -function TcxPCCustomPainter.GetTabClipRgnOperation(ATabVisibleIndex: Integer): TcxRegionOperation; -begin - Result := roIntersect; -end; - -procedure TcxPCCustomPainter.GetTabNativePartAndState(ATabVisibleIndex: Integer; - out PartId, StateId: Integer); -begin - PartId := 0; - StateId := 0; -end; - -function TcxPCCustomPainter.GetTabNativeState(ATabVisibleIndex: Integer): Integer; -var - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if ATab.IsMainTab then - Result := TIS_SELECTED - else - if ATab.HotTrack then - Result := TIS_HOT - else - Result := TIS_NORMAL; -end; - -function TcxPCCustomPainter.GetTabRotatedImageSize: TSize; -begin - Result := ParentControl.FImages.RotatedImageSize; -end; - -function TcxPCCustomPainter.GetTabsContainerOffsets: TRect; -begin - Result := cxEmptyRect; -end; - -function TcxPCCustomPainter.GetTabsNormalDistance: TcxPCDistance; -begin - Result.dw := 0; - Result.dh := 0; -end; - -function TcxPCCustomPainter.GetTabVerticalTextBitmap( - TabVisibleIndex: Integer): TBitmap; -begin - Result := ParentInfo.VisibleTabs[TabVisibleIndex].VerticalTextBitmap; -end; - -function TcxPCCustomPainter.GetTextColor(ATabVisibleIndex: Integer): TColor; -var - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if ATab.Highlighted then - Result := GetHighlightedTextColor(ATabVisibleIndex, ParentInfo.Font.Color) - else - if ATab.HotTrack then - Result := GetHotTrackColor - else - Result := clBtnText; -end; - -procedure TcxPCCustomPainter.Init; -begin -end; - -procedure TcxPCCustomPainter.InternalPaint; - - function IsTabsRectVisible: Boolean; - var - r1, r2, r3, r4: TRect; - AControlRect, ADisplayRect: TRect; - begin - AControlRect := GetControlRect(ParentControl); - ADisplayRect := GetDisplayRect; - r1 := AControlRect; - r1.Right := ADisplayRect.Left; - r2 := AControlRect; - r2.Bottom := ADisplayRect.Top; - r3 := AControlRect; - r3.Left := ADisplayRect.Right; - r4 := AControlRect; - r4.Top := ADisplayRect.Bottom; - Result := RectVisible(ParentInfo.Canvas.Handle, r1) or - RectVisible(ParentInfo.Canvas.Handle, r2) or - RectVisible(ParentInfo.Canvas.Handle, r3) or - RectVisible(ParentInfo.Canvas.Handle, r4); - end; - -begin - if not ParentInfo.HideTabs then - begin - PaintButtonsRegion; - if IsTabsRectVisible then - PaintTabsRegion; - end; - PaintClientArea; -end; - -procedure TcxPCCustomPainter.InternalDrawText(ACanvas: TCanvas; - const ACaption: string; ARect: TRect; ATabVisibleIndex: Integer); -var - APartId, AStateId: Integer; -begin - if IsNativePainting and ParentInfo.VisibleTabs[ATabVisibleIndex].RealEnabled and - AreVisualStylesAvailable then - begin - GetTabNativePartAndState(ATabVisibleIndex, APartId, AStateId); - DrawThemeText(OpenTheme(totTab), ACanvas.Handle, APartId, - AStateId, ACaption, -1, DT_SINGLELINE or DT_END_ELLIPSIS, 0, ARect); - end - else - cxDrawText(ACanvas.Handle, ACaption, ARect, DT_SINGLELINE or DT_END_ELLIPSIS); -end; - -procedure TcxPCCustomPainter.InternalInvalidateRect(Rect: TRect); -begin - ParentControl.InternalInvalidateRect(Rect); -end; - -procedure TcxPCCustomPainter.InternalPolyLine(const APoints: array of TPoint; - AColor: TColor; ACanvas: TCanvas = nil); -var - ALastPoint: TPoint; -begin - if ACanvas = nil then - ACanvas := ParentInfo.Canvas.Canvas; - ACanvas.Pen.Color := AColor; - ACanvas.Polyline(APoints); - ALastPoint := APoints[High(APoints)]; - ACanvas.Polyline([ALastPoint, Point(ALastPoint.X + 1, ALastPoint.Y + 1)]); -end; - -procedure TcxPCCustomPainter.InternalResetClipRegion; -begin - RestoreClipRgn; -end; - -function TcxPCCustomPainter.InternalSetClipRect(ClipR: TRect; - IntersectWithCurrentClipRegion: Boolean = True): Boolean; -begin - Result := False; - if IsRectEmpty(ClipR) then Exit; - with ParentInfo.Canvas do - begin - if IntersectWithCurrentClipRegion and - (not Windows.RectVisible(Handle, ClipR)) then Exit; - SaveClipRgn; - if IntersectWithCurrentClipRegion then - IntersectClipRect(ClipR) - else - SetClipRegion(TcxRegion.Create(ClipR), roSet); - end; - Result := True; -end; - -procedure TcxPCCustomPainter.InvalidateTabExtendedTabsRect(TabVisibleIndex: Integer); -var - TabExtendedRect: TRect; -begin - with ParentControl do - begin - TabExtendedRect := GetTabExtendedTabsRect(TabVisibleIndex); - InternalInvalidateRect(TabExtendedRect); - end; -end; - -procedure TcxPCCustomPainter.InvalidateTabRect(ATabVisibleIndex: Integer); -begin - ParentControl.InternalInvalidateRect(ParentInfo.VisibleTabs[ATabVisibleIndex].VisibleRect); -end; - -function TcxPCCustomPainter.IsAssignedImages: Boolean; -begin - Result := GetTabBaseImageSize.cx > 0; -end; - -function TcxPCCustomPainter.IsCustomDraw: Boolean; -begin - Result := ParentControl.OwnerDraw and Assigned(ParentControl.OnDrawTab); -end; - -function TcxPCCustomPainter.IsEnableHotTrack: Boolean; -begin - Result := IsNativePainting; -end; - -function TcxPCCustomPainter.IsNativePainting: Boolean; -begin - Result := False; -end; - -function TcxPCCustomPainter.IsOverTab(TabVisibleIndex: Integer; X, - Y: Integer): Boolean; -begin - Result := True; -end; - -function TcxPCCustomPainter.IsTabHasImage(ATabVisibleIndex: Integer): Boolean; -begin - Result := IsAssignedImages and (ParentInfo.VisibleTabs[ATabVisibleIndex].ImageIndex >= 0); -end; - -function TcxPCCustomPainter.IsTabTransparent(ATabVisibleIndex: Integer): Boolean; -begin - Result := False; -end; - -function TcxPCCustomPainter.NeedDisabledTextShadow: Boolean; -begin - Result := True; -end; - -function TcxPCCustomPainter.NeedDoubleBuffer: Boolean; -begin - Result := False; -end; - -function TcxPCCustomPainter.NeedRedrawOnResize: Boolean; -begin - Result := IsNativePainting; -end; - -function TcxPCCustomPainter.NeedShowFrame: Boolean; -begin - Result := ParentInfo.ShowFrame; -end; - -procedure TcxPCCustomPainter.Paint; -begin - InternalPaint; -end; - -procedure TcxPCCustomPainter.PaintClientArea; -begin - if NeedShowFrame then - PaintFrame; - FillDisplayRect; - ParentInfo.Canvas.ExcludeClipRect(GetDisplayRect); -end; - -procedure TcxPCCustomPainter.PrepareTabCanvasFont(ATab: TcxTab; ACanvas: TcxCanvas); -begin - ParentControl.PrepareTabCanvasFont(ATab, ACanvas); -end; - -procedure TcxPCCustomPainter.PrepareDrawTabContentBitmapBackground( - ABitmap: TBitmap; const ABitmapPos: TPoint; ATabVisibleIndex: Integer); -begin -end; - -procedure TcxPCCustomPainter.RepaintButton( - Button: TcxPCNavigatorButton; OldButtonState: TcxPCNavigatorButtonState); -begin -end; - -procedure TcxPCCustomPainter.RepaintButtonsRegion; -begin -end; - -procedure TcxPCCustomPainter.RepaintTab(TabVisibleIndex: Integer; - TabPropertyChanged: TcxPCTabPropertyChanged); -begin -end; - -procedure TcxPCCustomPainter.RestoreClipRgn; -begin - ParentInfo.Canvas.RestoreClipRegion; -end; - -procedure TcxPCCustomPainter.RotatePoint(const R: TRect; var P: TPoint; - ATabPosition: TcxTabPosition); -begin - case ATabPosition of - tpBottom: - P.Y := R.Bottom - 1 - (P.Y - R.Top); - tpLeft: - P := Point(R.Right - 1 - (R.Bottom - 1 - P.Y), R.Bottom - 1 - (P.X - R.Left)); - tpRight: - P := Point(R.Bottom - 1 - P.Y + R.Left, R.Bottom - 1 - (P.X - R.Left)); - end; -end; - -procedure TcxPCCustomPainter.RotatePolyline(const R: TRect; var APoints: array of TPoint; - ATabPosition: TcxTabPosition); -var - I: Integer; -begin - for I := 0 to High(APoints) do - RotatePoint(R, APoints[I], ATabPosition); -end; - -procedure TcxPCCustomPainter.SaveClipRgn; -begin - ParentInfo.Canvas.SaveClipRegion; -end; - -procedure TcxPCCustomPainter.StandardPainterPrepareOutTabImageAndTextData( - TabVisibleIndex: Integer); -var - AHasImages, ATabHasImage: Boolean; - ImageRect, TextRect: TRect; - Tab: TcxTab; - - procedure CorrectTabContentHOffset(var ADrawOffset: TRect); - - procedure CorrectNonpressableTabContentHOffset(var ADrawOffset: TRect); - begin - if ParentInfo.Rotate then - begin - ADrawOffset.Top := 0; - ADrawOffset.Bottom := 0; - end; - end; - - procedure CorrectPressableTabContentHOffset(var ADrawOffset: TRect); - begin - if InternalGetTextRotationAngle(ParentControl) = raMinus90 then - begin - if not IsTabBorderThick(TabVisibleIndex) then - begin - Inc(ADrawOffset.Top); - Dec(ADrawOffset.Bottom); - end; - end - else - if IsTabBorderThick(TabVisibleIndex) then - begin - Inc(ADrawOffset.Top); - Dec(ADrawOffset.Bottom); - end; - end; - - begin - if IsTabPressable then - CorrectPressableTabContentHOffset(ADrawOffset) - else - CorrectNonpressableTabContentHOffset(ADrawOffset); - end; - - procedure CalculateImageHPosition; - var - ADrawImageOffset: TRect; - ATempVar: Integer; - TextRotationAngle: TcxRotationAngle; - ImageSize: TSize; - begin - if not ATabHasImage then - Exit; - - ADrawImageOffset := GetDrawImageOffset(TabVisibleIndex); - CorrectTabContentHOffset(ADrawImageOffset); - if IsMainTabBoundWithClient and (Tab.PaintingPositionIndex in [5, 7, 10]) then - begin - ATempVar := ADrawImageOffset.Top; - ADrawImageOffset.Top := ADrawImageOffset.Bottom; - ADrawImageOffset.Bottom := ATempVar; - end; - ImageSize := GetTabRotatedImageSize; - if IsNativePainting then - with Tab.FullRect do - if IsVerticalText(ParentControl) then - ImageRect := Rect(0, 0, Bottom - Top, Right - Left) - else - ImageRect := Rect(0, 0, Right - Left, Bottom - Top) - else - ImageRect := Tab.FullRect; - TextRotationAngle := InternalGetTextRotationAngle(ParentControl); - with ImageRect do - case TextRotationAngle of - ra0: - begin - Inc(Top, ADrawImageOffset.Top); - Dec(Bottom, ADrawImageOffset.Bottom); - Top := Top + (Bottom - Top - ImageSize.cy) div 2; - Bottom := Top + ImageSize.cy; - end; - raPlus90: - begin - Inc(Left, ADrawImageOffset.Top); - Dec(Right, ADrawImageOffset.Bottom); - Left := Left + (Right - Left - ImageSize.cx) div 2; - Right := Left + ImageSize.cx; - end; - raMinus90: - begin - Inc(Left, ADrawImageOffset.Bottom); - Dec(Right, ADrawImageOffset.Top); - Right := Right - (Right - Left - ImageSize.cx) div 2; - Left := Right - ImageSize.cx; - end; - end; - end; - - procedure CalculateTextHPosition; - var - ADrawTextOffset: TRect; - ATempVar: Integer; - ATextHeight: Integer; - begin - if Tab.Caption = '' then - Exit; - if IsNativePainting then - with Tab.FullRect do - if IsVerticalText(ParentControl) then - TextRect := Rect(0, 0, Bottom - Top, Right - Left) - else - TextRect := Rect(0, 0, Right - Left, Bottom - Top) - else - TextRect := Tab.FullRect; - - ADrawTextOffset := GetDrawTextHOffset(TabVisibleIndex); - CorrectTabContentHOffset(ADrawTextOffset); - - if IsMainTabBoundWithClient and (Tab.PaintingPositionIndex in [5, 7, 10]) then - begin - ATempVar := ADrawTextOffset.Top; - ADrawTextOffset.Top := ADrawTextOffset.Bottom; - ADrawTextOffset.Bottom := ATempVar; - end; - if AHasImages then - Inc(ADrawTextOffset.Left, ParentInfo.ImageBorder); - ATextHeight := ParentInfo.Canvas.TextHeight('Zg'); - with TextRect do - case InternalGetTextRotationAngle(ParentControl) of - ra0: - begin - Inc(Top, ADrawTextOffset.Top); - Dec(Bottom, ADrawTextOffset.Bottom); - Top := Top + (Bottom - Top - ATextHeight) div 2; - Bottom := Top + ATextHeight; - end; - raPlus90: - begin - Inc(Left, ADrawTextOffset.Top); - Dec(Right, ADrawTextOffset.Bottom); - Left := Left + (Right - Left - ATextHeight) div 2; - Right := Left + ATextHeight; - end; - raMinus90: - begin - Inc(Left, ADrawTextOffset.Bottom); - Dec(Right, ADrawTextOffset.Top); - Right := Right - (Right - Left - ATextHeight) div 2; - Left := Right - ATextHeight; - end; - end; - end; - - procedure CorrectTabContentWOffset(var AOffset: TcxPCWOffset; AIsCentering: Boolean); - var - ATempVar: Integer; - begin - if IsNativePainting and (Tab.PaintingPositionIndex in [2, 9, 12]) then - begin - ATempVar := AOffset.Left; - AOffset.Left := AOffset.Right; - AOffset.Right := ATempVar; - end; - - if not IsTabPressable then - Exit; - - if InternalGetTextRotationAngle(ParentControl) = raPlus90 then - begin - if AIsCentering then - begin - if IsTabBorderThick(TabVisibleIndex) then - begin - Dec(AOffset.Left); - Inc(AOffset.Right); - end; - end - else - if IsTabBorderThick(TabVisibleIndex) then - begin - Dec(AOffset.Left); - Inc(AOffset.Right); - end; - end - else - if IsTabBorderThick(TabVisibleIndex) then - begin - Inc(AOffset.Left); - Dec(AOffset.Right); - end; - end; - - procedure CalculateImageWPosition; - var - ADrawImageOffset: TcxPCWOffset; - AImageSize: TSize; - AImageRect: TRect; - ATextRotationAngle: TcxRotationAngle; - begin - AImageSize := GetTabBaseImageSize; - if IsNativePainting then - with Tab.FullRect do - if IsVerticalText(ParentControl) then - AImageRect := Rect(0, 0, Bottom - Top, Right - Left) - else - AImageRect := Rect(0, 0, Right - Left, Bottom - Top) - else - AImageRect := Tab.FullRect; - ATextRotationAngle := InternalGetTextRotationAngle(ParentControl); - ADrawImageOffset := GetDrawImageWithoutTextWOffset(TabVisibleIndex); - CorrectTabContentWOffset(ADrawImageOffset, True); - with AImageRect do - case ATextRotationAngle of - ra0: - begin - Inc(AImageRect.Left, ADrawImageOffset.Left); - Dec(AImageRect.Right, ADrawImageOffset.Right); - begin - ImageRect.Left := Left + (Right - Left - AImageSize.cx) div 2; - ImageRect.Right := ImageRect.Left + AImageSize.cx; - end; - end; - raPlus90: - begin - Dec(AImageRect.Bottom, ADrawImageOffset.Left); - Inc(AImageRect.Top, ADrawImageOffset.Right); - if IsTabPressable then - begin - ImageRect.Top := Top + (Bottom - Top - AImageSize.cx) div 2; - ImageRect.Bottom := ImageRect.Top + AImageSize.cx; - end - else - begin - ImageRect.Bottom := Bottom - (Bottom - Top - AImageSize.cx) div 2; - ImageRect.Top := ImageRect.Bottom - AImageSize.cx; - end; - end; - raMinus90: - begin - Inc(AImageRect.Top, ADrawImageOffset.Left); - Dec(AImageRect.Bottom, ADrawImageOffset.Right); - ImageRect.Top := Top + (Bottom - Top - AImageSize.cx) div 2; - ImageRect.Bottom := ImageRect.Top + AImageSize.cx; - end; - end; - end; - - procedure CalculateImageAndTextWPositions; - - function GetContentWOffset(ATabWidth, AContentWidth: Integer): Integer; - var - ACaptionAlignment: TAlignment; - begin - if not ParentInfo.Rotate or (ParentInfo.TabWidth > 0) or (ParentControl.MaxRotatedTabWidth > 0) then - ACaptionAlignment := taCenter - else - ACaptionAlignment := ParentControl.TabCaptionAlignment; - case ACaptionAlignment of - taLeftJustify: - Result := (ATabWidth - ParentControl.FMaxTabCaptionWidth) div 2; - taRightJustify: - Result := (ATabWidth - ParentControl.FMaxTabCaptionWidth) div 2 + - ParentControl.FMaxTabCaptionWidth - AContentWidth; - else - Result := (ATabWidth - AContentWidth) div 2; - end; - end; - - var - AContentWidth, W: Integer; - AImageSize: TSize; - ATabContentWOffset: TcxPCWOffset; - AIsTabTooNarrow: Boolean; - AVisibleTextWidth: Integer; - R: TRect; - - procedure CalculateVisibleTextWidth; - var - ATempRect: TRect; - L: Integer; - S: string; - begin - ATempRect := Rect(0, 0, W - AContentWidth, 0); - S := Tab.Caption; - L := Length(S); - SetLength(S, L + Length('....')); - S[L + 1] := #0; - DrawText(ParentInfo.Canvas.Handle, PChar(S), -1, - ATempRect, DT_SINGLELINE or DT_CALCRECT or DT_END_ELLIPSIS or DT_MODIFYSTRING); - SetLength(S, StrLen(PChar(S))); - AVisibleTextWidth := ATempRect.Right; - if (AVisibleTextWidth > W - AContentWidth) or (S = '&...') then - AVisibleTextWidth := 0; - end; - - procedure InternalCalculateImageAndTextWPositions; - var - AImageTextDistance: Integer; - begin - if AContentWidth <= 0 then - begin - ImageRect := cxEmptyRect; - TextRect := cxEmptyRect; - Exit; - end; - - AImageTextDistance := GetImageTextDistance(TabVisibleIndex); - case InternalGetTextRotationAngle(ParentControl) of - ra0: - begin - Inc(R.Left, ATabContentWOffset.Left); - if not AIsTabTooNarrow and not (AHasImages and ParentInfo.Rotate) then - Inc(R.Left, GetContentWOffset(W, AContentWidth)); - if ATabHasImage then - begin - ImageRect.Left := R.Left + ParentInfo.ImageBorder; - ImageRect.Right := ImageRect.Left + AImageSize.cx; - end; - if AHasImages and ParentInfo.Rotate or ATabHasImage then - Inc(R.Left, ParentInfo.ImageBorder * 2 + AImageSize.cx + AImageTextDistance); - - if not AIsTabTooNarrow and AHasImages and ParentInfo.Rotate then - Inc(R.Left, GetContentWOffset(R.Right - R.Left - ATabContentWOffset.Right, AVisibleTextWidth)); - TextRect.Left := R.Left; - TextRect.Right := TextRect.Left + AVisibleTextWidth; - end; - raPlus90: - begin - Dec(R.Bottom, ATabContentWOffset.Left); - if not AIsTabTooNarrow and not (AHasImages and ParentInfo.Rotate) then - Dec(R.Bottom, GetContentWOffset(W, AContentWidth)); - if ATabHasImage then - begin - ImageRect.Bottom := R.Bottom - ParentInfo.ImageBorder; - ImageRect.Top := ImageRect.Bottom - AImageSize.cx; - end; - if AHasImages and ParentInfo.Rotate or ATabHasImage then - Dec(R.Bottom, ParentInfo.ImageBorder * 2 + AImageSize.cx + AImageTextDistance); - - if not AIsTabTooNarrow and AHasImages and ParentInfo.Rotate then - Dec(R.Bottom, GetContentWOffset(R.Bottom - R.Top - ATabContentWOffset.Right, AVisibleTextWidth)); - TextRect.Bottom := R.Bottom; - TextRect.Top := TextRect.Bottom - AVisibleTextWidth; - end; - raMinus90: - begin - Inc(R.Top, ATabContentWOffset.Left); - if not AIsTabTooNarrow and not (AHasImages and ParentInfo.Rotate) then - Inc(R.Top, GetContentWOffset(W, AContentWidth)); - if ATabHasImage then - begin - ImageRect.Top := R.Top + ParentInfo.ImageBorder; - ImageRect.Bottom := ImageRect.Top + AImageSize.cx; - end; - if AHasImages and ParentInfo.Rotate or ATabHasImage then - Inc(R.Top, ParentInfo.ImageBorder * 2 + AImageSize.cx + AImageTextDistance); - - if not AIsTabTooNarrow and AHasImages and ParentInfo.Rotate then - Inc(R.Top, GetContentWOffset(R.Bottom - R.Top - ATabContentWOffset.Right, AVisibleTextWidth)); - TextRect.Top := R.Top; - TextRect.Bottom := TextRect.Top + AVisibleTextWidth; - end; - end; - end; - - begin - if IsNativePainting then - with Tab.FullRect do - if IsVerticalText(ParentControl) then - R := Rect(0, 0, Bottom - Top, Right - Left) - else - R := Rect(0, 0, Right - Left, Bottom - Top) - else - R := Tab.FullRect; - if InternalIsVerticalText(ParentControl) then - W := R.Bottom - R.Top - else - W := R.Right - R.Left; - ATabContentWOffset := GetTabContentWOffset(TabVisibleIndex); - CorrectTabContentWOffset(ATabContentWOffset, AHasImages); - if IsTabPressable and AHasImages and (GetTextRotationAngle(ParentControl) = raPlus90) then - begin - Inc(ATabContentWOffset.Left); - Dec(ATabContentWOffset.Right); - end; - Dec(W, ATabContentWOffset.Left + ATabContentWOffset.Right); - AContentWidth := 0; - if AHasImages and ParentInfo.Rotate or ATabHasImage then - begin - AImageSize := GetTabBaseImageSize; - AContentWidth := AImageSize.cx + 2 * ParentInfo.ImageBorder + GetImageTextDistance(TabVisibleIndex); - end; - - AIsTabTooNarrow := TextSize(Tab, Tab.Caption, ParentInfo.Canvas.Font).cx > W - AContentWidth; - if AIsTabTooNarrow then - begin - Inc(W, ATabContentWOffset.Left + ATabContentWOffset.Right); - ATabContentWOffset := GetTooNarrowTabContentWOffset(TabVisibleIndex); - CorrectTabContentWOffset(ATabContentWOffset, AHasImages); - if IsTabPressable and AHasImages and (GetTextRotationAngle(ParentControl) = raPlus90) then - begin - Inc(ATabContentWOffset.Left); - Dec(ATabContentWOffset.Right); - end; - Dec(W, ATabContentWOffset.Left + ATabContentWOffset.Right); - end; - - CalculateVisibleTextWidth; - Inc(AContentWidth, AVisibleTextWidth); - - InternalCalculateImageAndTextWPositions; - end; - - procedure CalculateWPositions; - begin - if ATabHasImage and (Tab.Caption = '') then - CalculateImageWPosition; - if Tab.Caption <> '' then - CalculateImageAndTextWPositions; - end; - -begin - Tab := ParentInfo.VisibleTabs[TabVisibleIndex]; - AHasImages := IsAssignedImages; - ATabHasImage := IsTabHasImage(TabVisibleIndex); - if not ATabHasImage then - ImageRect := cxEmptyRect; - if Tab.Caption = '' then - TextRect := cxEmptyRect; - CalculateImageHPosition; - CalculateTextHPosition; - CalculateWPositions; - InternalPrepareOutTabImageAndTextData(TabVisibleIndex, ImageRect, TextRect); -end; - -{ TcxPCPainterParentInfo } - -constructor TcxPCPainterParentInfo.Create( - AParent: TcxCustomTabControl); -begin - inherited Create; - FParent := AParent; -end; - -function TcxPCPainterParentInfo.GetActivePage: TcxTabSheet; -begin - Result := FParent.GetActivePage; -end; - -function TcxPCPainterParentInfo.GetCanvas: TcxCanvas; -begin - Result := FParent.Canvas; -end; - -function TcxPCPainterParentInfo.GetFont: TFont; -begin - Result := FParent.Font; -end; - -function TcxPCPainterParentInfo.GetIsTabsContainer: Boolean; -begin - Result := FParent.IsTabsContainer; -end; - -function TcxPCPainterParentInfo.GetColor: TColor; -begin - Result := FParent.Color; -end; - -function TcxPCPainterParentInfo.GetExtendedBottomOrRightTabsRect: TRect; -begin - Result := FParent.FExtendedBottomOrRightTabsRect; -end; - -function TcxPCPainterParentInfo.GetExtendedTopOrLeftTabsRect: TRect; -begin - Result := FParent.FExtendedTopOrLeftTabsRect; -end; - -function TcxPCPainterParentInfo.GetHeight: Integer; -begin - Result := FParent.Height; -end; - -function TcxPCPainterParentInfo.GetHideTabs: Boolean; -begin - Result := FParent.HideTabs; -end; - -function TcxPCPainterParentInfo.GetImageBorder: Integer; -begin - Result := FParent.ImageBorder; -end; - -function TcxPCPainterParentInfo.GetMainTabVisibleIndex: Integer; -begin - Result := FParent.FMainTabVisibleIndex; -end; - -function TcxPCPainterParentInfo.GetMultiLine: Boolean; -begin - Result := FParent.MultiLine; -end; - -function TcxPCPainterParentInfo.GetNavigatorButtons: TcxPCNavigatorButtons; -begin - Result := FParent.FNavigatorButtons; -end; - -function TcxPCPainterParentInfo.GetNavigatorButtonState( - Index: TcxPCNavigatorButton): TcxPCNavigatorButtonState; -begin - Result := FParent.FNavigatorButtonStates[Index]; -end; - -function TcxPCPainterParentInfo.GetNavigatorPositione: TcxPCNavigatorPosition; -begin - Result := FParent.NavigatorPosition; -end; - -function TcxPCPainterParentInfo.GetOptions: TcxPCOptions; -begin - Result := FParent.Options; -end; - -function TcxPCPainterParentInfo.GetPageColor(ATabVisibleIndex: Integer): TColor; -var - ATabSheet: TcxTabSheet; -begin - ATabSheet := Pages[ATabVisibleIndex]; - if ATabSheet <> nil then - Result := ATabSheet.Color - else - Result := FParent.Color; -end; - -function TcxPCPainterParentInfo.GetPage(ATabVisibleIndex: Integer): TcxTabSheet; -begin - Result := FParent.GetPage(VisibleTabs[ATabVisibleIndex].Index); -end; - -function TcxPCPainterParentInfo.GetRaggedRight: Boolean; -begin - Result := FParent.RaggedRight; -end; - -function TcxPCPainterParentInfo.GetTabColor(ATabVisibleIndex: Integer): TColor; -var - ATabSheet: TcxTabSheet; -begin - ATabSheet := Pages[ATabVisibleIndex]; - Result := VisibleTabs[ATabVisibleIndex].Color; - if (Result = clDefault) and (ATabSheet <> nil) and - ((pcoUsePageColorForTab in Options) or FParent.Painter.AlwaysColoredTabs) and - not ATabSheet.ParentColor then - Result := ATabSheet.Color; -end; - -function TcxPCPainterParentInfo.GetTabSlants: TcxTabSlants; -begin - Result := FParent.TabSlants; -end; - -function TcxPCPainterParentInfo.GetRotate: Boolean; -begin - Result := FParent.Rotate; -end; - -function TcxPCPainterParentInfo.GetRowCount: Integer; -begin - Result := FParent.RowCount; -end; - -function TcxPCPainterParentInfo.GetScrollOpposite: Boolean; -begin - Result := FParent.ScrollOpposite; -end; - -function TcxPCPainterParentInfo.GetShowFrame: Boolean; -begin - Result := FParent.ShowFrame; -end; - -function TcxPCPainterParentInfo.GetTabHeight: Smallint; -begin - Result := FParent.TabHeight; -end; - -function TcxPCPainterParentInfo.GetTabsOnBothSides: Boolean; -begin - Result := (TabPosition in [tpTop, tpLeft]) and (TopOrLeftPartRowCount <> RowCount) or - (TabPosition in [tpBottom, tpRight]) and (TopOrLeftPartRowCount <> 0); -end; - -function TcxPCPainterParentInfo.GetTabPosition: TcxTabPosition; -begin - Result := FParent.TabPosition; -end; - -function TcxPCPainterParentInfo.GetTabWidth: Smallint; -begin - Result := FParent.TabWidth; -end; - -function TcxPCPainterParentInfo.GetTopOrLeftPartRowCount: Integer; -begin - Result := FParent.TopOrLeftPartRowCount; -end; - -function TcxPCPainterParentInfo.GetVisibleTab( - TabVisibleIndex: Integer): TcxTab; -begin - Result := FParent.FVisibleTabList[TabVisibleIndex]; -end; - -function TcxPCPainterParentInfo.GetWidth: Integer; -begin - Result := FParent.Width; -end; - -{ TcxVisibleTabList } - -constructor TcxVisibleTabList.Create(AParent: TcxCustomTabControl); -begin - inherited Create; - FParent := AParent; - TabIndexA := nil; -end; - -destructor TcxVisibleTabList.Destroy; -begin - TabIndexA := nil; - inherited; -end; - -function TcxVisibleTabList.GetCount: Integer; -begin - Result := Length(TabIndexA); -end; - -function TcxVisibleTabList.GetTab(TabVisibleIndex: Integer): TcxTab; -begin - if (TabVisibleIndex < 0) or (TabVisibleIndex >= Count) then - if Count = 0 then - OutError('GetTab', scxPCVisibleTabListEmpty) - else - OutError('GetTab', Format(scxPCTabVisibleIndexOutsOfBounds, [TabVisibleIndex, Count - 1])); - Result := FParent.TabsTabs[TabIndexA[TabVisibleIndex]]; -end; - -function TcxVisibleTabList.FindVisibleTab(TabIndex: TcxPCTabIndex; var TabVisibleIndex: Integer): Boolean; -var - FirstIndex, LastIndex, MiddleIndex: Integer; -begin - Result := False; - TabVisibleIndex := 0; - if (TabIndexA = nil) or (Length(TabIndexA) = 0) then Exit; - - FirstIndex := 0; - Result := True; - if TabIndex = TabIndexA[0] then Exit; - Result := False; - if TabIndex < TabIndexA[0] then Exit; - - LastIndex := Count - 1; - TabVisibleIndex := LastIndex; - Result := True; - if TabIndex = TabIndexA[LastIndex] then Exit; - Inc(TabVisibleIndex); - Result := False; - if TabIndex > TabIndexA[LastIndex] then Exit; - - while LastIndex - FirstIndex > 1 do - begin - MiddleIndex := (FirstIndex + LastIndex) div 2; - if TabIndex = TabIndexA[MiddleIndex] then - begin - TabVisibleIndex := MiddleIndex; - Result := True; - Exit; - end; - if TabIndex < TabIndexA[MiddleIndex] then LastIndex := MiddleIndex - else FirstIndex := MiddleIndex; - end; - TabVisibleIndex := LastIndex; -end; - -procedure TcxVisibleTabList.HideTab(TabIndex: TcxPCTabIndex); -var - TabVisibleIndex: Integer; - OldCount: Integer; -begin - if FindVisibleTab(TabIndex, TabVisibleIndex) then - begin - OldCount := Count; - if TabVisibleIndex <> OldCount - 1 then - Move(TabIndexA[TabVisibleIndex + 1], TabIndexA[TabVisibleIndex], - (OldCount - TabVisibleIndex - 1) * SizeOf(TcxPCTabIndex)); - SetLength(TabIndexA, OldCount - 1); - end; -end; - -procedure TcxVisibleTabList.OutError(SourceMethodName: TCaption; Msg: string); -begin - raise EdxException.Create('TcxVisibleTabList.' + SourceMethodName + ': ' + Msg); -end; - -procedure TcxVisibleTabList.ShowTab(TabIndex: TcxPCTabIndex); -var - TabVisibleIndex: Integer; - OldCount: Integer; -begin - if not FindVisibleTab(TabIndex, TabVisibleIndex) then - begin - OldCount := Count; - SetLength(TabIndexA, OldCount + 1); - if TabVisibleIndex <> OldCount then - Move(TabIndexA[TabVisibleIndex], TabIndexA[TabVisibleIndex + 1], - (OldCount - TabVisibleIndex) * SizeOf(TcxPCTabIndex)); - TabIndexA[TabVisibleIndex] := TabIndex; - end; -end; - -procedure TcxVisibleTabList.Update; -var - VisibleTabCount: Integer; - I, TabCount: TcxPCTabIndex; -begin - with FParent.Tabs do - begin - VisibleTabCount := 0; - TabCount := Count; - for I := 0 to TabCount - 1 do - if Tabs[I].Visible then Inc(VisibleTabCount); - SetLength(TabIndexA, VisibleTabCount); - - VisibleTabCount := 0; - for I := 0 to TabCount - 1 do - if Tabs[I].Visible then - begin - TabIndexA[VisibleTabCount] := I; - Inc(VisibleTabCount); - end; - end; -end; - -function TcxVisibleTabList.TabVisibleIndexOf(TabIndex: TcxPCTabIndex): Integer; -begin - if not FindVisibleTab(TabIndex, Result) then Result := -1; -end; - -{ TcxTab } - -constructor TcxTab.Create(ATabs: TcxTabs; AIndex: Integer); -begin - inherited Create; - FIndex := AIndex; - FTabs := ATabs; - - FColor := clDefault; - FEnabled := True; - FImageIndex := AIndex; - FVisible := True; -end; - -destructor TcxTab.Destroy; -begin - FTabs.Notify(Index, tnDeleting); - FreeAndNil(FVerticalTextBitmap); - FreeAndNil(FPaintBitmap); - with ParentControl do - if (FTracking <> -1) and (FTracking = VisibleIndex) then - FTracking := -1; - inherited; -end; - -procedure TcxTab.InitializePaintBitmap; -begin - if FPaintBitmap = nil then - FPaintBitmap := cxCreateBitmap(0, 0, pf32bit); -end; - -procedure TcxTab.ResetPaintBitmap; -begin - FreeAndNil(FPaintBitmap); -end; - -procedure TcxTab.ResetVerticalTextBitmap; -begin - FreeAndNil(FVerticalTextBitmap); -end; - -procedure TcxTab.AssignTo(Dest: TPersistent); -var - DestTab: TcxTab; -begin - if Dest is TcxTab then - begin - DestTab := TcxTab(Dest); - DestTab.FCaption := Caption; - DestTab.FEnabled := Enabled; - DestTab.FHighlighted := Highlighted; - DestTab.ImageIndex := ImageIndex; - DestTab.FObject := FObject; - DestTab.Visible := Visible; - DestTab.Selected := Selected; - end - else - inherited AssignTo(Dest); -end; - -procedure TcxTab.Changed(ATabPropertyChanged: TcxPCTabPropertyChanged); -begin - Tabs.Changed(VisibleIndex, ATabPropertyChanged); -end; - -procedure TcxTab.ValidateImageIndex; -begin - if FImageIndex = -1 then - Exit; - if RealVisible then - Changed(tpcNotSpecified); -end; - -function TcxTab.GetFullRect: TRect; -begin - Result := NormalRect; - with ParentControl do - CorrectTabRect(FVisibleTabList.TabVisibleIndexOf(Index)); - CorrectRect(Result, FTabPosition.TabRectCorrection); -end; - -function TcxTab.GetHotTrack: Boolean; -var - HotTrackTabVisibleIndex: Integer; -begin - HotTrackTabVisibleIndex := ParentControl.FHotTrackTabVisibleIndex; - Result := (HotTrackTabVisibleIndex <> -1) and (HotTrackTabVisibleIndex = VisibleIndex); -end; - -function TcxTab.GetImageIndex: TImageIndex; -begin - Result := ParentControl.GetImageIndex(Index); -end; - -function TcxTab.GetIsMainTab: Boolean; -begin - Result := Index = ParentControl.MainTabIndex; -end; - -function TcxTab.GetNormalLongitudinalSize: Integer; -begin - if ParentControl.Rotate then Result := Tabs.FTabNormalHeight - else Result := FTabPosition.TabNormalWidth; -end; - -function TcxTab.GetNormalRect: TRect; -begin - Result.Left := FTabPosition.TabNormalPosition.X; - Result.Top := FTabPosition.TabNormalPosition.Y; - if IsVerticalText(ParentControl) then - begin - Result.Right := Result.Left + Tabs.TabNormalHeight; - if ParentControl.Rotate then - Result.Bottom := Result.Top + ParentControl.FRowHeight - else - Result.Bottom := Result.Top + FTabPosition.TabNormalWidth; - end - else - begin - if ParentControl.Rotate then - Result.Right := Result.Left + ParentControl.FRowHeight - else - Result.Right := Result.Left + FTabPosition.TabNormalWidth; - Result.Bottom := Result.Top + Tabs.TabNormalHeight; - end; -end; - -function TcxTab.GetPaintingPosition: TcxTabPosition; -var - IsY: Boolean; -begin - with ParentControl do - begin - IsY := TabPosition in [tpTop, tpBottom]; - if VisibleRow < TopOrLeftPartRowCount then - if IsY then Result := tpTop - else Result := tpLeft - else - if IsY then Result := tpBottom - else Result := tpRight; - end; -end; - -function TcxTab.GetPaintingPositionIndex: Integer; -const - APaintingPositionIndexMap: array [TcxTabPosition, TcxRotationAngle] of Integer = ( - (1, 2, 3, 0), - (10, 11, 12, 0), - (6, 4, 5, 0), - (9, 7, 8, 0) - ); -begin - Result := APaintingPositionIndexMap[PaintingPosition, GetTextRotationAngle(ParentControl)]; -end; - -function TcxTab.GetParentControl: TcxCustomTabControl; -begin - Result := Tabs.Parent; -end; - -function TcxTab.GetPressed: Boolean; -var - PressedTabVisibleIndex: Integer; -begin - PressedTabVisibleIndex := ParentControl.FPressedTabVisibleIndex; - Result := (PressedTabVisibleIndex <> -1) and (PressedTabVisibleIndex = VisibleIndex); -end; - -function TcxTab.GetRealEnabled: Boolean; -begin - Result := ParentControl.Enabled and Enabled; -end; - -function TcxTab.GetRealVisible: Boolean; -begin - Result := not IsRectEmpty(VisibleRect) -end; - -function TcxTab.GetTracking: Boolean; -begin - with ParentControl do - Result := (FTracking <> -1) and (FTracking = VisibleIndex); -end; - -function TcxTab.GetVisibleIndex: Integer; -begin - Result := ParentControl.FVisibleTabList.TabVisibleIndexOf(Index); -end; - -function TcxTab.GetVisibleRect: TRect; -var - ATabVisibleIndex: Integer; -begin - Result := cxEmptyRect; - if not Visible then - Exit; - with ParentControl do - begin - ATabVisibleIndex := VisibleIndex; - if (not MultiLine) and - ((ATabVisibleIndex < FFirstVisibleTab) or - (ATabVisibleIndex > FLastVisibleTab)) then - Exit; - if VisibleRow < TopOrLeftPartRowCount then - IntersectRect(Result, FullRect, FExtendedTopOrLeftTabsRect) - else - IntersectRect(Result, FullRect, FExtendedBottomOrRightTabsRect); - end; -end; - -procedure TcxTab.InternalSetCaption(const Value: string); -begin - FCaption := Value; -end; - -function TcxTab.IsImageIndexStored: Boolean; -begin - Result := FImageIndex <> Index; -end; - -procedure TcxTab.SetCaption(const Value: string); -var - OldTabNormalWidth: Integer; - TabLayoutChanged: Boolean; - OldRealVisible: Boolean; - OldRowHeight: Integer; -begin - if Value <> FCaption then - with FTabPosition do - begin - if not Visible then - begin - InternalSetCaption(Value); - Exit; - end; - - OldRealVisible := RealVisible; - OldTabNormalWidth := TabNormalWidth; - OldRowHeight := ParentControl.FRowHeight; - - InternalSetCaption(Value); - ParentControl.CalculateTabNormalSize(Self); - - if ParentControl.Rotate then - begin - ParentControl.CalculateRowHeight; - TabLayoutChanged := ParentControl.FRowHeight <> OldRowHeight; - end - else - TabLayoutChanged := TabNormalWidth <> OldTabNormalWidth; - - if TabLayoutChanged then - Changed(tpcLayout) - else - if OldRealVisible then Changed(tpcNotSpecified); - end; -end; - -procedure TcxTab.SetColor(Value: TColor); -begin - if Value <> FColor then - begin - FColor := Value; - if RealVisible then - Changed(tpcColor); - end; -end; - -procedure TcxTab.SetEnabled(const Value: Boolean); -var - OldRealVisible: Boolean; -begin - if Value <> FEnabled then - begin - OldRealVisible := RealVisible; - FEnabled := Value; - if OldRealVisible or RealVisible then - Changed(tpcEnabled); - end; -end; - -procedure TcxTab.SetHighlighted(const Value: Boolean); -var - OldRealVisible: Boolean; -begin - if Value <> FHighlighted then - begin - OldRealVisible := RealVisible; - FHighlighted := Value; - if OldRealVisible or RealVisible then - Changed(tpcHighlighted); - end; -end; - -procedure TcxTab.SetImageIndex(Value: TImageIndex); -begin - if Value < 0 then - Value := -1; - if Value <> FImageIndex then - begin - FImageIndex := Value; - if RealVisible then - Changed(tpcLayout); - end; -end; - -procedure TcxTab.SetSelected(const Value: Boolean); - - function GetSelectedTabCount: Integer; - var - I, TabCount: Integer; - begin - Result := 0; - TabCount := Tabs.Count; - for I := 0 to TabCount - 1 do - if Tabs.Tabs[I].Selected then - Inc(Result); - end; - -var - OldRealVisible: Boolean; -begin - if Value <> FSelected then - begin - if csLoading in ParentControl.ComponentState then - begin - FSelected := Value; - Exit; - end; - - with ParentControl do - begin - if not FPainter.IsMultiSelectionAccepted then - begin - if Value and (Index <> TabIndex) then Exit; - end else - if Value and (GetSelectedTabCount > 0) and (not MultiSelect) then - MultiSelect := True; - OldRealVisible := RealVisible; - FSelected := Value; - if OldRealVisible or RealVisible then - Self.Changed(tpcSelected); - end; - end; -end; - -procedure TcxTab.SetVisible(const Value: Boolean); -var - OldRealVisible: Boolean; - IsTabIndexCorrectionNeeded: Boolean; -begin - if Value <> FVisible then - with ParentControl do - if Value then - begin - FVisibleTabList.ShowTab(Index); - FVisible := Value; - Self.Changed(tpcLayout); - end else - begin - IsTabIndexCorrectionNeeded := TabIndexTabMustBeVisible and (Index = TabIndex); - OldRealVisible := RealVisible; - FVisibleTabList.HideTab(Index); - FVisible := Value; - if OldRealVisible or MultiLine then - Self.Changed(tpcLayout) - else - Calculate; - if IsTabIndexCorrectionNeeded then - if FMainTabVisibleIndex <> -1 then - TabIndex := FVisibleTabList[FMainTabVisibleIndex].Index; - end; -end; - -{ TcxTabs } - -constructor TcxTabs.Create(AParent: TcxCustomTabControl); -begin - inherited Create; - FTabsItemA := nil; - FNotification := False; - FParent := AParent; - FUpdating := False; -end; - -procedure TcxTabs.Delete(Index: Integer); -var - NewTabCount: Integer; -begin - if FUpdating then Exit; - FUpdating := True; - if not FNotification then - begin - if (Index < 0) or (Index >= Count) then - OutError('Delete', Index); - FTabsItemA[Index].Free; - end; - NewTabCount := Count - 1; - if Index < NewTabCount then - begin - System.Move(FTabsItemA[Index + 1], FTabsItemA[Index], - (NewTabCount - Index) * SizeOf(TcxTab)); - UpdateTabIndexes(Index, NewTabCount - 1); - end; - SetLength(FTabsItemA, NewTabCount); - - Parent.FVisibleTabList.Update; - Changed; - - FUpdating := False; -end; - -destructor TcxTabs.Destroy; -begin - Clear; - inherited; -end; - -function TcxTabs.Get(Index: Integer): string; -begin - if (Index < 0) or (Index >= Count) then - OutError('Get', Index); - Result := FTabsItemA[Index].FCaption; -end; - -function TcxTabs.GetCount: Integer; -begin - Result := Length(FTabsItemA); -end; - -function TcxTabs.GetObject(Index: Integer): TObject; -begin - Result := Tabs[Index].FObject; -end; - -procedure TcxTabs.Put(Index: Integer; const S: string); -begin - Tabs[Index].Caption := S; -end; - -procedure TcxTabs.PutObject(Index: Integer; AObject: TObject); -begin - Tabs[Index].FObject := AObject; -end; - -function TcxTabs.GetTab(TabIndex: Integer): TcxTab; -begin - if (TabIndex < 0) or (TabIndex >= Count) then - OutError('GetTab', TabIndex); - Result := FTabsItemA[TabIndex]; -end; - -function TcxTabs.GetVisibleTab(TabVisibleIndex: Integer): TcxTab; -var - VisibleTabCount: Integer; -begin - VisibleTabCount := Parent.FVisibleTabList.Count; - if (TabVisibleIndex < 0) or (TabVisibleIndex >= VisibleTabCount) then - raise EdxException.Create('TcxTabs.GetVisibleTab: ' + Format(scxPCTabVisibleIndexOutsOfBounds, - [TabVisibleIndex, VisibleTabCount])); - Result := Parent.FVisibleTabList[TabVisibleIndex]; -end; - -procedure TcxTabs.Insert(Index: Integer; const S: string); -var - OldTabCount: Integer; -begin - if (Index < 0) or (Index > Count) then - OutError('Insert', Index); - OldTabCount := Count; - SetLength(FTabsItemA, OldTabCount + 1); - if Index <> OldTabCount then - System.Move(FTabsItemA[Index], FTabsItemA[Index + 1], - (OldTabCount - Index) * SizeOf(TcxTab)); - FTabsItemA[Index] := TcxTab.Create(Self, Index); - UpdateTabIndexes(Index + 1, OldTabCount); - FTabsItemA[Index].InternalSetCaption(S); - - with Parent do - if not (csLoading in ComponentState) and (FTabIndex = -1) then - if Self.Count = 1 then FTabIndex := 0; - - Parent.FVisibleTabList.Update; - Changed; -end; - -procedure TcxTabs.Move(CurIndex, NewIndex: Integer); - - procedure CopyArray(AFromIndex, AToIndex, ACount: Integer); - begin - System.Move(FTabsItemA[AFromIndex], FTabsItemA[AToIndex], ACount * SizeOf(TcxTab)); - end; - -var - AcxTab: TcxTab; -begin - if CurIndex <> NewIndex then - begin - AcxTab := FTabsItemA[CurIndex]; - if CurIndex > NewIndex then - CopyArray(NewIndex, NewIndex + 1, CurIndex - NewIndex) - else - CopyArray(CurIndex + 1, CurIndex, NewIndex - CurIndex); - FTabsItemA[NewIndex] := AcxTab; - if CurIndex > NewIndex then - UpdateTabIndexes(NewIndex, CurIndex) - else - UpdateTabIndexes(CurIndex, NewIndex); - Parent.FVisibleTabList.Update; - Changed; - end; -end; - -procedure TcxTabs.Notify(Index: Integer; Action: TcxPCTabNotification); -begin - FNotification := True; - if Action = tnDeleting then Delete(Index); - FNotification := False; -end; - -class procedure TcxTabs.OutError(SourceMethodName: TCaption; Index: Integer); -begin - raise EdxException.Create('TcxTabs.' + SourceMethodName + ': ' + Format(scxPCTabIndexError, [Index])); -end; - -procedure TcxTabs.ResetTabVerticalTextBitmaps; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Tabs[I].ResetVerticalTextBitmap; -end; - -procedure TcxTabs.Changed(VisibleIndex: Integer = -1; - TabPropertyChanged: TcxPCTabPropertyChanged = tpcLayout); -begin - with Parent do - begin - if [csLoading, csDestroying] * ComponentState <> [] then Exit; - if (VisibleIndex = -1) or (TabPropertyChanged = tpcLayout) then - RequestLayout - else - RepaintTab(VisibleIndex, TabPropertyChanged); - end; -end; - -procedure TcxTabs.Clear; -var - I, TabCount: Integer; -begin - TabCount := Count; - if TabCount > 0 then - begin - for I := TabCount - 1 downto 0 do - FTabsItemA[I].Free; - FTabsItemA := nil; - Changed; - end; -end; - -procedure TcxTabs.SetHotTrack(VisibleIndex: Integer); -var - OldHotTrackTabVisibleIndex: Integer; -begin - with Parent do - begin - if FHotTrackTabVisibleIndex = VisibleIndex then Exit; - OldHotTrackTabVisibleIndex := FHotTrackTabVisibleIndex; - FHotTrackTabVisibleIndex := VisibleIndex; - if OldHotTrackTabVisibleIndex <> -1 then - Self.Changed(OldHotTrackTabVisibleIndex, tpcHotTrack); - if FHotTrackTabVisibleIndex <> -1 then - Self.Changed(FHotTrackTabVisibleIndex, tpcHotTrack); - end; -end; - -procedure TcxTabs.SetMainTab; -var - OldMainTabVisibleIndex: Integer; -begin - with Parent do - begin - OldMainTabVisibleIndex := FMainTabVisibleIndex; - if OldMainTabVisibleIndex >= FVisibleTabList.Count then - OldMainTabVisibleIndex := -1; - - if FTabIndex = -1 then FMainTabVisibleIndex := -1 - else - with FVisibleTabList do - if not FindVisibleTab(FTabIndex, FMainTabVisibleIndex) and (FMainTabVisibleIndex = Count) then - FMainTabVisibleIndex := Count - 1; - - if FMainTabVisibleIndex = OldMainTabVisibleIndex then Exit; - if OldMainTabVisibleIndex <> -1 then - Self.Changed(OldMainTabVisibleIndex, tpcIsMainTab); - if FMainTabVisibleIndex <> -1 then - Self.Changed(FMainTabVisibleIndex, tpcIsMainTab); - - UpdateButtonsState; - end; -end; - -procedure TcxTabs.SetTab(Index: Integer; const Value: TcxTab); -begin - if (Index < 0) or (Index >= Count) then - OutError('SetTab', Index); - FTabsItemA[Index].Assign(Value); -end; - -function TcxTabs.GetVisibleTabsCount: Integer; -begin - Result := Parent.FVisibleTabList.Count; -end; - -procedure TcxTabs.SetTracking(NewTracking: Integer); -var - OldTracking: Integer; -begin - with Parent do - begin - OldTracking := FTracking; - if OldTracking >= FVisibleTabList.Count then - OldTracking := -1; - - if (NewTracking < 0) or (NewTracking >= FVisibleTabList.Count) then - NewTracking := -1; - FTracking := NewTracking; - - if FTracking = OldTracking then Exit; - if OldTracking <> -1 then - Self.Changed(OldTracking, tpcTracking); - if FTracking <> -1 then - Self.Changed(FTracking, tpcTracking); - - if (FTracking <> -1) and not Multiline then - begin - CorrectFirstVisibleTab(FTracking); - RequestLayout; - SynchronizeHotTrackStates(InternalGetShiftState); - end; - end; -end; - -procedure TcxTabs.UpdateTabIndexes(FirstIndex, LastIndex: Integer); -var - I: Integer; -begin - for I := FirstIndex to LastIndex do - FTabsItemA[I].FIndex := I; -end; - -procedure TcxTabs.ValidateImageIndexes; -var - I: Integer; -begin - for I := 0 to Count - 1 do - FTabsItemA[I].ValidateImageIndex; -end; - -{ TcxTabSheet } - -constructor TcxTabSheet.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - Align := alClient; - ControlStyle := ControlStyle + [csAcceptsControls, csNoDesignVisible]; - Visible := False; - FImageIndex := -1; - FTab := nil; - FTabVisible := True; - TabStop := False; -end; - -destructor TcxTabSheet.Destroy; -begin - if PageControl <> nil then - begin - if FPageControl.FUndockingPage = Self then FPageControl.FUndockingPage := nil; - FPageControl.RemovePage(Self); - end; - inherited Destroy; -end; - -procedure TcxTabSheet.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params.WindowClass do - style := style and not(CS_HREDRAW or CS_VREDRAW); -end; - -procedure TcxTabSheet.DoHide; -begin - if Assigned(FOnHide) then FOnHide(Self); -end; - -procedure TcxTabSheet.DoShow; -begin - if Assigned(FOnShow) then FOnShow(Self); -end; - -procedure TcxTabSheet.EnabledChanged; -begin - PagePropertyChanged; -end; - -procedure TcxTabSheet.PagePropertyChanged; -begin - if PageControl <> nil then - PageControl.UpdateTab(Self); -end; - -procedure TcxTabSheet.SetParent(AParent: TWinControl); -begin - if (AParent is TcxPageControl) or (AParent = nil) then - if AParent <> FPageControl then - PageControl := TcxPageControl(AParent) - else - inherited SetParent(AParent) - else - Abort; -end; - -procedure TcxTabSheet.SetParentPageControl(AParentPageControl: TcxPageControl); -begin - FPageControl := AParentPageControl; - SetParent(AParentPageControl); -end; - -procedure TcxTabSheet.ShowingChanged; -begin - try - if Showing then - DoShow - else - DoHide; - except - Application.HandleException(Self); - end; -end; - -procedure TcxTabSheet.TextChanged; -begin - PagePropertyChanged; -end; - -procedure TcxTabSheet.WMEraseBkgnd(var Message: TWMEraseBkgnd); -var - ASavedDC: Integer; -begin - if PageControl <> nil then - begin - if Painter.IsNativePainting then - Painter.DrawNativeTabBackground(Message.DC, Self) - else - begin - ASavedDC := SaveDC(Message.DC); - try - OffsetWindowOrgEx(Message.DC, Left, Top, nil); - PageControl.EraseBackground(Message.DC); - finally - RestoreDC(Message.DC, ASavedDC); - end; - end; - end; - Message.Result := 1; -end; - -procedure TcxTabSheet.WMNCPaint(var Message: TWMNCPaint); -var - ASavedDC: Integer; - DC: HDC; - R: TRect; -begin - if (PageControl = nil) or not Painter.IsNativePainting then - inherited - else - begin - DC := GetWindowDC(Handle); - try - ASavedDC := SaveDC(DC); - try - R := GetControlRect(Self); - InflateRect(R, -BorderWidth, -BorderWidth); - with R do - ExcludeClipRect(DC, Left, Top, Right, Bottom); - Painter.DrawNativeTabBackground(DC, Self); - finally - RestoreDC(DC, ASavedDC); - end; - finally - ReleaseDC(Handle, DC); - end; - end; -end; - -procedure TcxTabSheet.CMColorChanged(var Message: TMessage); -begin - inherited; - InternalColorChanged; -end; - -procedure TcxTabSheet.CMEnabledChanged(var Message: TMessage); -begin - inherited; - EnabledChanged; -end; - -procedure TcxTabSheet.CMInvalidate(var Message: TMessage); -begin - if (PageControl <> nil) then - PageControl.InvalidateControl(Self, Message.WParam = 0, PageControl.NeedRedrawOnResize); -end; - -procedure TcxTabSheet.CMParentColorChanged(var Message: TMessage); -begin - inherited; - InternalColorChanged; -end; - -procedure TcxTabSheet.CMShowingChanged(var Message: TMessage); -begin - inherited; - ShowingChanged; -end; - -procedure TcxTabSheet.CMTextChanged(var Message: TMessage); -begin - inherited; - TextChanged; -end; - -function TcxTabSheet.GetPageIndex: Integer; -begin - if PageControl = nil then - Result := -1 - else - Result := PageControl.FPages.IndexOf(Self); -end; - -function TcxTabSheet.GetPainter: TcxPCCustomPainter; -begin - Result := PageControl.Painter; -end; - -function TcxTabSheet.GetTabIndex: Integer; -begin - if FTab = nil then - Result := -1 - else - Result := FTab.VisibleIndex; -end; - -procedure TcxTabSheet.InternalColorChanged; -begin - if FTab <> nil then - FTab.Changed(tpcLayout); - if (BorderWidth > 0) and HandleAllocated then - SendMessage(Handle, WM_NCPAINT, 1, 0); - Invalidate; -end; - -procedure TcxTabSheet.SetHighlighted(const Value: Boolean); -begin - if Value <> FHighlighted then - begin - FHighlighted := Value; - PagePropertyChanged; - end; -end; - -procedure TcxTabSheet.SetImageIndex(const Value: TImageIndex); -begin - if Value <> FImageIndex then - begin - FImageIndex := Value; - PagePropertyChanged; - end; -end; - -procedure TcxTabSheet.SetPageControl(const Value: TcxPageControl); -begin - if Value <> FPageControl then - begin - if FPageControl <> nil then FPageControl.RemovePage(Self); - if Value <> nil then - begin - Value.InsertPage(Self); - if not(csLoading in Value.ComponentState) and (Value.ActivePage = nil) and TabVisible then - Value.ActivePage := Self; - end; - end; -end; - -procedure TcxTabSheet.SetPageIndex(const Value: Integer); -var - AOldPageIndex: Integer; -begin - if PageControl <> nil then - begin - if Value > PageControl.PageCount - 1 then - raise EListError.CreateFmt(scxPCPageIndexError, [Value, PageControl.PageCount - 1]); - AOldPageIndex := PageIndex; - PageControl.FPages.Move(AOldPageIndex, Value); - PageControl.Tabs.Move(AOldPageIndex, Value); - FTab := PageControl.Tabs.Tabs[Value]; - PageControl.UpdateTab(Self); - PageControl.LockChangeEvent(True); - try - PageControl.TabIndex := PageControl.ActivePageIndex; - finally - PageControl.LockChangeEvent(False); - end; - end; -end; - -procedure TcxTabSheet.SetTabVisible(const Value: Boolean); -begin - if Value <> FTabVisible then - begin - FTabVisible := Value; - PagePropertyChanged; - if Value and (PageControl <> nil) and (PageControl.PageCount = 1) and (PageControl.ActivePage = nil) then - PageControl.ActivePage := Self; - end; -end; - -initialization - FDependsControls := TList.Create; - -finalization - FreeAndNil(FBackgroundBitmap); - FDependsControls.Free; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Sources/cxPCConsts.pas b/internal/x.46/ExpressPageControl 2/Sources/cxPCConsts.pas deleted file mode 100644 index b1a7d9fb..00000000 --- a/internal/x.46/ExpressPageControl 2/Sources/cxPCConsts.pas +++ /dev/null @@ -1,90 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPageControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPAGECONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxPCConsts; - -{$I cxVer.inc} - -interface - -resourcestring - scxPCImageListIndexError = 'Index (%d) must be between 0 and %d'; - scxPCNoBaseImages = 'BaseImages is not assigned'; - scxPCNoRegisteredStyles = 'There are no styles registered'; - scxPCPageIndexError = '%d is an invalid PageIndex value. PageIndex must be ' + - 'between 0 and %d'; - scxPCPainterClassError = 'PCPainterClass is nil'; - scxPCStandardStyleError = '%s is an unsupported standard style'; - scxPCStyleNameError = '%s is an unregistered style name'; - scxPCTabCountEqualsZero = 'Tabs.Count = 0'; - scxPCTabIndexError = 'Tab''s index (%d) out of bounds'; - scxPCTabVisibleIndexOutsOfBounds = 'TabVisibleIndex (%d) must be between 0 and %d'; - scxPCVisibleTabListEmpty = 'There are no visible tabs'; - scxPCAllowRotateError = '%s style does not support rotation of tabs'; - -implementation - -uses - dxCore; - -procedure AddExpressPageControlResourceStringNames(AProduct: TdxProductResourceStrings); - - procedure InternalAdd(const AResourceStringName: string; AAdress: Pointer); - begin - AProduct.Add(AResourceStringName, AAdress); - end; - -begin - InternalAdd('scxPCImageListIndexError', @scxPCImageListIndexError); - InternalAdd('scxPCNoBaseImages', @scxPCNoBaseImages); - InternalAdd('scxPCNoRegisteredStyles', @scxPCNoRegisteredStyles); - InternalAdd('scxPCPageIndexError', @scxPCPageIndexError); - InternalAdd('scxPCPainterClassError', @scxPCPainterClassError); - InternalAdd('scxPCStandardStyleError', @scxPCStandardStyleError); - InternalAdd('scxPCStyleNameError', @scxPCStyleNameError); - InternalAdd('scxPCTabCountEqualsZero', @scxPCTabCountEqualsZero); - InternalAdd('scxPCTabIndexError', @scxPCTabIndexError); - InternalAdd('scxPCTabVisibleIndexOutsOfBounds', @scxPCTabVisibleIndexOutsOfBounds); - InternalAdd('scxPCVisibleTabListEmpty', @scxPCVisibleTabListEmpty); - InternalAdd('scxPCAllowRotateError', @scxPCAllowRotateError); -end; - -initialization - dxResourceStringsRepository.RegisterProduct('ExpressPageControl', @AddExpressPageControlResourceStringNames); - -finalization - dxResourceStringsRepository.UnRegisterProduct('ExpressPageControl'); - -end. diff --git a/internal/x.46/ExpressPageControl 2/Sources/cxPCGoDialog.pas b/internal/x.46/ExpressPageControl 2/Sources/cxPCGoDialog.pas deleted file mode 100644 index 22cb6291..00000000 --- a/internal/x.46/ExpressPageControl 2/Sources/cxPCGoDialog.pas +++ /dev/null @@ -1,147 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPageControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPAGECONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxPCGoDialog; - -{$I cxVer.inc} - -interface - -uses - Windows, Menus; - -type - TcxPCGoDialogClickEvent = procedure(ATabControlItemIndex: Integer) of object; - - { TcxPCGoDialog } - - TcxPCGoDialog = class(TPopupMenu) - private - FOnClick: TcxPCGoDialogClickEvent; - procedure DoClick(ATabControlItemIndex: Integer); - function GetDialogPosition: TPoint; - procedure InitializeItems(ASortItems: Boolean); - procedure ItemClick(Sender: TObject); - public - procedure Popup(ASortItems: Boolean); reintroduce; - property OnClick: TcxPCGoDialogClickEvent read FOnClick write FOnClick; - end; - -implementation - -uses - Classes, Controls, SysUtils, cxPC, cxControls; - -type - TcxCustomTabControlAccess = class(TcxCustomTabControl); - -{ TcxPCGoDialog } - -procedure TcxPCGoDialog.Popup(ASortItems: Boolean); -var - P: TPoint; -begin - InitializeItems(ASortItems); - P := GetDialogPosition; - inherited Popup(P.X, P.Y); -end; - -procedure TcxPCGoDialog.DoClick(ATabControlItemIndex: Integer); -begin - if Assigned(FOnClick) then - FOnClick(ATabControlItemIndex); -end; - -function TcxPCGoDialog.GetDialogPosition: TPoint; -var - R: TRect; -begin - R := TcxCustomTabControl(Owner).Painter.GetGoDialogButtonBounds; - Result := TcxCustomTabControl(Owner).ClientToScreen(Point(R.Left, R.Bottom)); -end; - -procedure TcxPCGoDialog.InitializeItems(ASortItems: Boolean); - - procedure PrepareItemCaptionList(ATabControl: TcxCustomTabControl; AList: TStringList; ASortItems: Boolean); - var - ATab: TcxTab; - I: Integer; - begin - for I := 0 to ATabControl.Tabs.VisibleTabsCount - 1 do - begin - ATab := ATabControl.Tabs.VisibleTabs[I]; - if ATab.RealEnabled then - AList.AddObject(RemoveAccelChars(ATab.Caption, False), ATab); - end; - AList.Sorted := ASortItems; - end; - -var - AItemCaptionList: TStringList; - AMenuItem: TMenuItem; - I: Integer; - ATabControl: TcxCustomTabControlAccess; - ATab: TcxTab; -begin - AItemCaptionList := TStringList.Create; - try - ATabControl := TcxCustomTabControlAccess(Owner); - PrepareItemCaptionList(ATabControl, AItemCaptionList, ASortItems); - Images := ATabControl.Images; - Items.Clear; - for I := 0 to AItemCaptionList.Count - 1 do - begin - AMenuItem := TMenuItem.Create(Self); - ATab := TcxTab(AItemCaptionList.Objects[I]); - AMenuItem.Caption := ATab.Caption; - AMenuItem.Tag := ATab.Index; - AMenuItem.Checked := ATab.Index = ATabControl.TabIndex; - AMenuItem.Default := ATab.Index = ATabControl.TabIndex; - AMenuItem.ImageIndex := ATab.ImageIndex; - AMenuItem.OnClick := ItemClick; - Items.Add(AMenuItem); - end; - finally - FreeAndNil(AItemCaptionList); - end; -end; - -procedure TcxPCGoDialog.ItemClick(Sender: TObject); -begin - DoClick(TMenuItem(Sender).Tag); -end; - -end. - diff --git a/internal/x.46/ExpressPageControl 2/Sources/cxPCPainters.pas b/internal/x.46/ExpressPageControl 2/Sources/cxPCPainters.pas deleted file mode 100644 index 3b27e574..00000000 --- a/internal/x.46/ExpressPageControl 2/Sources/cxPCPainters.pas +++ /dev/null @@ -1,6087 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPageControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPAGECONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxPCPainters; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, Controls, Graphics, SysUtils, cxGraphics, cxLookAndFeels, - cxPC, dxCore; - -const - cxPCEmptyWOffset: TcxPCWOffset = (Left: 0; Right: 0); - - cxPCTabsStyle = 1; - cxPCButtonsStyle = 2; - cxPCFlatButtonsStyle = 3; - cxPCExtraFlatStyle = 5; - cxPCUltraFlatStyle = 6; - cxPCFlatStyle = 7; - cxPCOffice11Style = 8; - cxPCSlantedStyle = 9; - cxPCOneNoteStyle = 10; - cxPCSkinStyle = 11; - - StandardPainterTabControlFrameBorderWidth = 2; - -type - TcxPCNavigatorButtonPosition = record - Button: TcxPCNavigatorButton; - ButtonRect: TRect; - end; - TcxPCNavigatorButtonPositions = array of TcxPCNavigatorButtonPosition; - - TcxPCTabsDelimiterOffsets = record - Top, Bottom: Integer; - end; - - TcxPCArrow = (aTop, aBottom, aLeft, aRight); - - TcxPCNavigatorButtonContentParameters = record - BrushColor: TColor; - Color: TColor; - Enabled: Boolean; - LiteStyle: Boolean; - end; - - TLinePosition = (lpL, lpLT, lpT, lpRT, lpR, lpRB, lpB, lpLB); - TLinePositions = array of TLinePosition; - - TPoints = array of TPoint; - - { TcxPCStandardPainter } - - TcxPCStandardPainter = class(TcxPCCustomPainter) - private - FButtonsQueue: TcxPCNavigatorButtonPositions; - FButtonsRect: TRect; - function GetButtonsWidth(ANavigatorButtons: TcxPCNavigatorButtons): Integer; - protected - function CalculateTabNormalWidth(Tab: TcxTab): Integer; override; - function GetDrawImageOffset(TabVisibleIndex: Integer): TRect; override; - function GetDrawImageWithoutTextWOffset(TabVisibleIndex: Integer): TcxPCWOffset; override; - function GetDrawTextHOffset(TabVisibleIndex: Integer): TRect; override; - function GetFrameWidth: Integer; override; - function GetGoDialogPosition(GoDialogSize: TSize): TPoint; override; - function GetImageTextDistance(ATabVisibleIndex: Integer): Integer; override; - function GetMinTabNormalWidth(ATabVisibleIndex: Integer): Integer; override; - function GetMinTabSelectionDistance: TcxPCDistance; override; - function GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; override; - function GetTabsNormalDistance: TcxPCDistance; override; - function GetTabsPosition(NavigatorButtons: TcxPCNavigatorButtons): TcxPCTabsPosition; override; - function GetTooNarrowTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; override; - procedure InternalPrepareOutTabImageAndTextData(ATabVisibleIndex: Integer; - var AImageRect, ATextRect: TRect); override; - function IsOverButton(X, Y: Integer; var Button: TcxPCNavigatorButton): Boolean; override; - function IsTabBorderThick(ATabVisibleIndex: Integer): Boolean; override; - procedure Paint; override; - procedure PaintButtonsRegion; override; - procedure PaintTab(TabVisibleIndex: Integer); virtual; - procedure PaintTabsRegion; override; - procedure RepaintButton(Button: TcxPCNavigatorButton; OldButtonState: TcxPCNavigatorButtonState); override; - procedure RepaintButtonsRegion; override; - procedure RepaintTab(TabVisibleIndex: Integer; TabPropertyChanged: TcxPCTabPropertyChanged); override; - - procedure CalculateButtonContentParameters(AButton: TcxPCNavigatorButton; - out AParameters: TcxPCNavigatorButtonContentParameters); virtual; - procedure CalculateButtonsRect(NavigatorButtons: TcxPCNavigatorButtons); virtual; - procedure CalculateButtonsRegion(NavigatorButtons: TcxPCNavigatorButtons); virtual; - function CalculateButtonsRegionWidth(NavigatorButtons: TcxPCNavigatorButtons): Integer; virtual; - procedure CorrectTabHeightForImage(var AHeight: Integer); - procedure DrawButtonContent(AButton: TcxPCNavigatorButton; - const AParameters: TcxPCNavigatorButtonContentParameters; - AContentRectLeftTopCorner: TPoint); - function Get3DButtonContentPosition(AButton: TcxPCNavigatorButton): TPoint; - function GetButtonArrow(AButton: TcxPCNavigatorButton): TcxPCArrow; - function GetButtonCenteredContentPosition(AButton: TcxPCNavigatorButton): TPoint; - function GetButtonColor(AButtonState: TcxPCNavigatorButtonState): TColor; virtual; - function GetButtonContentColor(AButtonState: TcxPCNavigatorButtonState): TColor; virtual; - function GetButtonContentPosition(AButton: TcxPCNavigatorButton): TPoint; virtual; - function GetButtonHeight: Integer; virtual; - function GetButtonWidth(Button: TcxPCNavigatorButton): Integer; virtual; - function GetDefaultTabNormalHeight: Integer; virtual; - function GetDefaultTabNormalHTextOffset: Integer; virtual; - function GetDefaultTabNormalWidth: Integer; virtual; - function GetFrameRect: TRect; - function GetFreeSpaceColor: TColor; virtual; - function GetMinFrameRectSize: Integer; virtual; - function GetTabBorderWidth(Tab: TcxTab): Integer; virtual; - function GetTabNormalWidth(ATabVisibleIndex: Integer): Integer; virtual; - function GetTabsRectOffset: TRect; virtual; - function InternalCalculateTabNormalHeight: Integer; virtual; - procedure InternalDrawEdge(const Rect: TRect; Sunken: Boolean; ThinFrame: Boolean = False); - procedure InternalDrawFocusRect(TabVisibleIndex: Integer; R: TRect); virtual; - procedure PaintButton(Button: TcxPCNavigatorButton; - const ButtonRect: TRect); virtual; - procedure PaintButtonBackground(AButtonRect: TRect; - AButtonState: TcxPCNavigatorButtonState); virtual; - procedure PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); virtual; - procedure PaintFrame; override; - procedure PaintFrameBorder(R: TRect); virtual; - procedure PaintTabShape(ATab: TcxTab; ATabVisibleIndex: Integer); virtual; abstract; - procedure PrepareTabBackground(ATab: TcxTab; ATabVisibleIndex: Integer); virtual; - procedure GetButtonsOrder(ANavigatorButtons: TcxPCNavigatorButtons; - var AButtonPositions: TcxPCNavigatorButtonPositions); virtual; - property ButtonsRect: TRect read FButtonsRect; - public - constructor Create(AParent: TcxCustomTabControl); override; - destructor Destroy; override; - function CalculateTabNormalHeight: Integer; override; - function GetGoDialogButtonBounds: TRect; override; - class function IsMainTabBoundWithClient: boolean; override; - class function IsMultiSelectionAccepted: boolean; override; - class function IsStandardStyle: Boolean; override; - class function IsTabPressable: Boolean; override; - end; - - { TcxPCButtonedPainter } - - TcxPCButtonedPainter = class(TcxPCStandardPainter) - private - MainTabBrushBitmap: TBitmap; - protected - function GetButtonContentPosition(AButton: TcxPCNavigatorButton): TPoint; override; - function GetButtonsRegionHOffset: Integer; override; - function GetButtonsRegionWOffset: Integer; override; - function GetDisplayRectOffset: TRect; override; - function GetTabBodyColor(TabVisibleIndex: Integer): TColor; override; - function GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; override; - function GetTabsContainerOffsets: TRect; override; - function GetTooNarrowTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; override; - function IsTabBorderThick(ATabVisibleIndex: Integer): Boolean; override; - public - constructor Create(AParent: TcxCustomTabControl); override; - destructor Destroy; override; - end; - - { TcxPCTabsPainter } - - TcxPCTabsPainter = class(TcxPCStandardPainter) - private -{ FMDC: HDC; - FPrevMDCBitmap: HBITMAP;} - protected - procedure CorrectTabRect(TabVisibleIndex: Integer; - var TabRectCorrection: TcxPCRectCorrection); override; - procedure DrawNativeTabBackground(DC: HDC; ATab: TcxTabSheet); override; - function GetButtonContentPosition(AButton: TcxPCNavigatorButton): TPoint; override; - function GetButtonHeight: Integer; override; - function GetButtonsRegionHOffset: Integer; override; - function GetButtonsRegionWOffset: Integer; override; - function GetButtonWidth(Button: TcxPCNavigatorButton): Integer; override; - function GetClientRectOffset: TRect; override; - function GetDisplayRectOffset: TRect; override; - function GetDrawImageOffset(TabVisibleIndex: Integer): TRect; override; - function GetDrawImageWithoutTextWOffset(TabVisibleIndex: Integer): TcxPCWOffset; override; - function GetDrawTextHOffset(TabVisibleIndex: Integer): TRect; override; - function GetImageTextDistance(ATabVisibleIndex: Integer): Integer; override; - function GetTabBodyColor(TabVisibleIndex: Integer): TColor; override; - function GetTabClipRgn(ATabVisibleIndex: Integer): TcxRegion; override; - function GetTabClipRgnOperation(ATabVisibleIndex: Integer): TcxRegionOperation; override; - function GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; override; - function GetTabFocusRect(const ATabBounds: TRect): TRect; virtual; - procedure GetTabNativePartAndState(ATabVisibleIndex: Integer; - out PartId, StateId: Integer); override; - function GetTabsContainerOffsets: TRect; override; - function GetTabsPosition(NavigatorButtons: TcxPCNavigatorButtons): TcxPCTabsPosition; override; - function GetTooNarrowTabContentWOffset( - ATabVisibleIndex: Integer): TcxPCWOffset; override; - function InternalCalculateTabNormalHeight: Integer; override; - procedure InternalPrepareOutTabImageAndTextData(ATabVisibleIndex: Integer; - var AImageRect, ATextRect: TRect); override; - procedure InvalidateTabRect(ATabVisibleIndex: Integer); override; - function IsNativePainting: Boolean; override; - function IsOverTab(TabVisibleIndex: Integer; X, Y: Integer): Boolean; override; - function NeedShowFrame: Boolean; override; - procedure Paint; override; - procedure PaintButton(Button: TcxPCNavigatorButton; - const ButtonRect: TRect); override; - procedure PaintClientArea; override; - procedure PaintFrame; override; - procedure PaintTabShape(ATab: TcxTab; ATabVisibleIndex: Integer); override; - procedure PaintTabsRegion; override; - procedure PaintNativeTabBackground(DC: HDC; ATabVisibleIndex: Integer; const ABounds: TRect); virtual; -// procedure PrepareBackgroundBitmap; virtual; - procedure PrepareTabBackground(ATab: TcxTab; ATabVisibleIndex: Integer); override; - procedure PrepareTabBitmapBackground(ABitmap: TBitmap; const ARect: TRect; ATab: TcxTab); virtual; - procedure RepaintTab(TabVisibleIndex: Integer; TabPropertyChanged: TcxPCTabPropertyChanged); override; - function GetMinFrameRectSize: Integer; override; - procedure GetTabCornersColor(ATabVisibleIndex: Integer; - out AColor1, AColor2: TColor); virtual; - procedure PaintTabCorners(ATabVisibleIndex: Integer); virtual; - procedure PaintTabFrame(ATabVisibleIndex: Integer); virtual; - procedure InternalPaintFrame(ACanvas: TCanvas); virtual; - public - class function GetStandardStyle: TcxPCStandardStyle; override; - class function GetStyleID: TcxPCStyleID; override; - class function GetStyleName: TCaption; override; - class function HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; override; - class function IsDefault(ALookAndFeel: TcxLookAndFeel): Boolean; override; - end; - - { TcxPCButtonsPainter } - - TcxPCButtonsPainter = class(TcxPCButtonedPainter) - protected - function IsTabBorderThick(ATabVisibleIndex: Integer): Boolean; override; - procedure PaintTabShape(ATab: TcxTab; ATabVisibleIndex: Integer); override; - public - class function GetStandardStyle: TcxPCStandardStyle; override; - class function GetStyleID: TcxPCStyleID; override; - class function GetStyleName: TCaption; override; - class function HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; override; - end; - - { TcxPCFlatButtonsPainter } - - TcxPCFlatButtonsPainter = class(TcxPCButtonedPainter) - protected - procedure PaintTab(TabVisibleIndex: Integer); override; - procedure PaintTabShape(ATab: TcxTab; ATabVisibleIndex: Integer); override; - public - class function GetStandardStyle: TcxPCStandardStyle; override; - class function GetStyleID: TcxPCStyleID; override; - class function GetStyleName: TCaption; override; - class function HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; override; - end; - - { TcxPCExtraFlatPainter } - - TcxPCExtraFlatPainter = class(TcxPCStandardPainter) - protected - procedure CalculateButtonContentParameters(AButton: TcxPCNavigatorButton; - out AParameters: TcxPCNavigatorButtonContentParameters); override; - function CalculateTabNormalWidth(Tab: TcxTab): Integer; override; - procedure CorrectTabRect(TabVisibleIndex: Integer; var TabRectCorrection: TcxPCRectCorrection); override; - function GetButtonColor(AButtonState: TcxPCNavigatorButtonState): TColor; override; - function GetButtonContentColor(AButtonState: TcxPCNavigatorButtonState): TColor; override; - function GetButtonContentPosition(AButton: TcxPCNavigatorButton): TPoint; override; - function GetButtonHeight: Integer; override; - function GetButtonWidth(Button: TcxPCNavigatorButton): Integer; override; - function GetClientRectOffset: TRect; override; - function GetDefaultClientColor: TColor; override; - function GetDefaultTabNormalHeight: Integer; override; - function GetDefaultTabNormalHTextOffset: Integer; override; - function GetDisplayRectOffset: TRect; override; - function GetDrawImageOffset(TabVisibleIndex: Integer): TRect; override; - function GetDrawTextHOffset(TabVisibleIndex: Integer): TRect; override; - function GetFrameWidth: Integer; override; - function GetFreeSpaceColor: TColor; override; - function GetMinTabNormalWidth(ATabVisibleIndex: Integer): Integer; override; - function GetTabBodyColor(TabVisibleIndex: Integer): TColor; override; - function GetTabBorderWidth(Tab: TcxTab = nil): Integer; override; - function GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; override; - function GetTabNormalWidth(ATabVisibleIndex: Integer): Integer; override; - function GetTabsRowsDelimiterWidth: Integer; virtual; - function GetTabsNormalDistance: TcxPCDistance; override; - function GetTabsPosition(NavigatorButtons: TcxPCNavigatorButtons): TcxPCTabsPosition; override; - function GetTooNarrowTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; override; - function InternalCalculateTabNormalHeight: Integer; override; - procedure InternalPaint; override; - procedure PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); override; - procedure PaintClientArea; override; - procedure PaintFrame; override; - procedure PaintTabShape(ATab: TcxTab; ATabVisibleIndex: Integer); override; - procedure PaintTabsRegion; override; - procedure RepaintTab(TabVisibleIndex: Integer; TabPropertyChanged: TcxPCTabPropertyChanged); override; - function GetButtonsDistance(AButton1, AButton2: TcxPCNavigatorButton): Integer; override; - function GetButtonsRegionHOffset: Integer; override; - function GetButtonsRegionWOffset: Integer; override; - function GetFocusRect: TRect; virtual; - function GetTabsDelimiterOffsets: TcxPCTabsDelimiterOffsets; virtual; - procedure DrawBackground(ACanvas: TCanvas; ARect: TRect; - ATabVisibleIndex: Integer); virtual; - procedure ExcludeUnderLine(var R: TRect); virtual; - function GetMainTabRowUnderlineColor: TColor; virtual; - function GetMainTabRowUnderlineRect: TRect; virtual; - function GetTabBackgroundRect(ATabVisibleIndex: Integer; - AForNormalState: Boolean): TRect; virtual; - function GetTabsDelimiterWidth: Integer; virtual; - function GetTabsRowColor: TColor; virtual; - function GetTabsRowRect(ARowIndex: Integer): TRect; - procedure InternalPaintFrame(ALeftTopColor, ARightBottomColor: TColor); - procedure InternalPaintMainTabFrame(var R: TRect; ALightColor, ADarkColor: TColor); - procedure InternalPaintTabsRowsDelimiter(var ARowRect: TRect; - AColors: array of TColor); - function IsMainTabRow(AVisibleRow: Integer): Boolean; - function NeedShowTabsRegionFrame: Boolean; virtual; - procedure PaintMainTabFrame(var R: TRect); virtual; - procedure PaintMainTabRowUnderline; - procedure PaintTabsDelimiter(const ARect: TRect); virtual; - procedure PaintTabsRowsDelimiter(var ARowRect: TRect; ARowIndex: Integer); virtual; - public - function CalculateTabNormalHeight: Integer; override; - class function GetStyleID: TcxPCStyleID; override; - class function GetStyleName: TCaption; override; - class function HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; override; - class function IsMainTabBoundWithClient: boolean; override; - class function IsMultiSelectionAccepted: boolean; override; - class function IsTabPressable: Boolean; override; - end; - - { TcxPCUltraFlatPainter } - - TcxPCUltraFlatPainter = class(TcxPCExtraFlatPainter) - protected - procedure CalculateButtonContentParameters(AButton: TcxPCNavigatorButton; - out AParameters: TcxPCNavigatorButtonContentParameters); override; - function GetButtonColor(AButtonState: TcxPCNavigatorButtonState): TColor; override; - function GetButtonContentPosition(AButton: TcxPCNavigatorButton): TPoint; override; - function GetButtonHeight: Integer; override; - function GetButtonsDistance(AButton1, AButton2: TcxPCNavigatorButton): Integer; override; - function GetButtonsRegionHOffset: Integer; override; - function GetButtonWidth(Button: TcxPCNavigatorButton): Integer; override; - function GetFocusRect: TRect; override; - procedure PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); override; - procedure PaintFrame; override; - procedure PaintMainTabFrame(var R: TRect); override; - procedure PaintTabsRowsDelimiter(var ARowRect: TRect; ARowIndex: Integer); override; - public - class function GetStyleID: TcxPCStyleID; override; - class function GetStyleName: TCaption; override; - class function HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; override; - end; - - { TcxPCFlatPainter } - - TcxPCFlatPainter = class(TcxPCTabsPainter) - protected - function GetButtonContentPosition(AButton: TcxPCNavigatorButton): TPoint; override; - function GetButtonHeight: Integer; override; - function GetButtonWidth(Button: TcxPCNavigatorButton): Integer; override; - function GetFrameWidth: Integer; override; - function GetTabClipRgn(ATabVisibleIndex: Integer): TcxRegion; override; - function GetTabClipRgnOperation(ATabVisibleIndex: Integer): TcxRegionOperation; override; - function IsNativePainting: Boolean; override; - function NeedShowFrame: Boolean; override; - procedure PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); override; - procedure PaintFrameBorder(R: TRect); override; - procedure PaintTabFrame(ATabVisibleIndex: Integer); override; - public - class function GetStyleID: TcxPCStyleID; override; - class function GetStyleName: TCaption; override; - class function HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; override; - end; - - { TcxPCOffice11Painter } - - TcxPCOffice11Painter = class(TcxPCUltraFlatPainter) - private - function GetSelectedColor1: TColor; - function GetSelectedColor2: TColor; - function IsGradientClienArea: Boolean; - function NeedShowMainTabOppositeRowLine: Boolean; - procedure PaintMainTabOppositeRowLine; - protected - class function GetFrameColor: TColor; virtual; - procedure DrawBackground(ACanvas: TCanvas; ARect: TRect; - ATabVisibleIndex: Integer); override; - procedure ExcludeUnderLine(var R: TRect); override; - procedure FillDisplayRect; override; - function GetButtonContentColor(AButtonState: TcxPCNavigatorButtonState): TColor; override; - function GetClientRectOffset: TRect; override; - function GetFocusRect: TRect; override; - function GetFreeSpaceColor: TColor; override; - function GetMainTabRowUnderlineColor: TColor; override; - function GetMainTabRowUnderlineRect: TRect; override; - function GetTabBodyColor(TabVisibleIndex: Integer): TColor; override; - function GetTabsDelimiterOffsets: TcxPCTabsDelimiterOffsets; override; - function GetTabsDelimiterWidth: Integer; override; - function GetTabsRowsDelimiterWidth: Integer; override; - function IsTabTransparent(ATabVisibleIndex: Integer): Boolean; override; - function NeedRedrawOnResize: Boolean; override; - function NeedShowTabsRegionFrame: Boolean; override; - procedure PaintButtonBackground(AButtonRect: TRect; - AButtonState: TcxPCNavigatorButtonState); override; - procedure PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); override; - procedure PaintClientArea; override; - procedure PaintFrame; override; - procedure PaintMainTabFrame(var R: TRect); override; - procedure PaintTabsDelimiter(const ARect: TRect); override; - procedure PaintTabsRowsDelimiter(var ARowRect: TRect; ARowIndex: Integer); override; - procedure PrepareDrawTabContentBitmapBackground(ABitmap: TBitmap; - const ABitmapPos: TPoint; ATabVisibleIndex: Integer); override; - procedure DrawGradientBackground(ACanvas: TCanvas; ARect: TRect; - ATabVisibleIndex: Integer; AHorizontal, AInverse: Boolean); - public - class function GetStyleID: TcxPCStyleID; override; - class function GetStyleName: TCaption; override; - class function HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; override; - end; - - { TcxPCSlantedPainter } - - TcxPCSlantedPainter = class(TcxPCStandardPainter) - private - FCutValue: Integer; - function GetTabsLineRect(ATabIndexInterval: TcxPCIndexInterval; AFullRect: Boolean): TRect; - function GetTabUnderlineRect(ATab: TcxTab): TRect; - protected - function AlwaysColoredTabs: Boolean; override; - procedure CalculateButtonContentParameters(AButton: TcxPCNavigatorButton; - out AParameters: TcxPCNavigatorButtonContentParameters); override; - function CalculateTabNormalWidth(Tab: TcxTab): Integer; override; - procedure FillDisplayRect; override; - function GetButtonColor(AButtonState: TcxPCNavigatorButtonState): TColor; override; - function GetButtonContentColor(AButtonState: TcxPCNavigatorButtonState): TColor; override; - function GetButtonContentPosition(AButton: TcxPCNavigatorButton): TPoint; override; - function GetButtonHeight: Integer; override; - function GetButtonsDistance(AButton1, AButton2: TcxPCNavigatorButton): Integer; override; - function GetButtonsRegionFromTabsOffset: Integer; override; - function GetButtonsRegionHOffset: Integer; override; - function GetButtonsRegionWOffset: Integer; override; - function GetButtonWidth(Button: TcxPCNavigatorButton): Integer; override; - function GetClientColor: TColor; override; - function GetClientRectOffset: TRect; override; - function GetDefaultTabNormalHeight: Integer; override; - function GetDrawImageOffset(TabVisibleIndex: Integer): TRect; override; - function GetDrawTextHOffset(TabVisibleIndex: Integer): TRect; override; - function GetFrameWidth: Integer; override; - function GetImageTextDistance(ATabVisibleIndex: Integer): Integer; override; - function GetMinTabNormalWidth(ATabVisibleIndex: Integer): Integer; override; - function GetTabBodyColor(TabVisibleIndex: Integer): TColor; override; - function GetTabClipRgn(ATabVisibleIndex: Integer): TcxRegion; override; - function GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; override; - function GetTabNormalWidth(ATabVisibleIndex: Integer): Integer; override; - function GetTabsContainerOffsets: TRect; override; - function GetTabsNormalDistance: TcxPCDistance; override; - function GetTabsRectOffset: TRect; override; - function GetTooNarrowTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; override; - procedure Init; override; - function InternalCalculateTabNormalHeight: Integer; override; - function IsOverTab(TabVisibleIndex: Integer; X, Y: Integer): Boolean; override; - function IsTabBorderThick(ATabVisibleIndex: Integer): Boolean; override; - procedure PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); override; - procedure PaintFrame; override; - procedure PaintTabShape(ATab: TcxTab; ATabVisibleIndex: Integer); override; - procedure PaintTabsRegion; override; - procedure PrepareDrawTabContentBitmapBackground(ABitmap: TBitmap; - const ABitmapPos: TPoint; ATabVisibleIndex: Integer); override; - - function CanLightMainTab: Boolean; virtual; - function DirectionalGetFigureRegion(const R: TRect; APoints: array of TPoint; - ALinePositions: array of TLinePosition; ATabPositon: TcxTabPosition; - AForContent: Boolean): TcxRegion; - procedure DrawBackground(ACanvas: TCanvas; R: TRect; - ATabVisibleIndex: Integer; AHorizontalGradient, AInverseGradient: Boolean); virtual; - procedure DrawTabUnderline(ATabVisibleIndex: Integer); virtual; - procedure GetBackgroundGradientColors(ATabVisibleIndex: Integer; - out AColor1, AColor2: TColor); virtual; - function GetCutValue: Integer; - function GetGeometricalMinTabWidth: Integer; virtual; - function GetFrameColor: TColor; virtual; - function GetSlantedSides: TcxTabSlantPositions; virtual; - procedure GetTabFramePolyline(ATabVisibleIndex: Integer; - out APoints: TPoints; out ALinePositions: TLinePositions); - function GetTabImageSize: TSize; virtual; - function GetVerticalTextIndent: Integer; virtual; - function InternalGetCutValue: Integer; virtual; - function InternalGetTabClipRegion(ATabVisibleIndex: Integer; - AForContent: Boolean): TcxRegion; virtual; - procedure PaintTabFrame(ATabVisibleIndex: Integer; const R: TRect); virtual; - procedure PaintTabStateMark(ATabVisibleIndex: Integer); virtual; - - property SlantedSides: TcxTabSlantPositions read GetSlantedSides; - public - class function GetStyleID: TcxPCStyleID; override; - class function GetStyleName: TCaption; override; - class function HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; override; - end; - - { TcxPCOneNotePainter } - - TcxPCOneNotePainter = class(TcxPCSlantedPainter) - protected - class function AllowRotate: Boolean; override; - function CanLightMainTab: Boolean; override; - procedure DrawTabUnderline(ATabVisibleIndex: Integer); override; - procedure GetBackgroundGradientColors(ATabVisibleIndex: Integer; - out AColor1, AColor2: TColor); override; - function GetButtonsRegionHOffset: Integer; override; - function GetDrawImageOffset(TabVisibleIndex: Integer): TRect; override; - function GetDrawTextHOffset(TabVisibleIndex: Integer): TRect; override; - function GetFrameColor: TColor; override; - function GetGeometricalMinTabWidth: Integer; override; - function GetSlantedSides: TcxTabSlantPositions; override; - function GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; override; - function GetTabsContainerOffsets: TRect; override; - function GetTabsNormalDistance: TcxPCDistance; override; - function GetTabsRectOffset: TRect; override; - function InternalGetCutValue: Integer; override; - function InternalGetTabClipRegion(ATabVisibleIndex: Integer; - AForContent: Boolean): TcxRegion; override; - procedure PaintTabFrame(ATabVisibleIndex: Integer; const R: TRect); override; - procedure PaintTabStateMark(ATabVisibleIndex: Integer); override; - public - class function GetStyleID: TcxPCStyleID; override; - class function GetStyleName: TCaption; override; - class function HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; override; - end; - -procedure DrawBorder(ACanvas: TcxCanvas; var ARect: TRect; ASides: array of TcxBorder; AColors: array of TColor; AExcludeBorder: Boolean = False); -procedure GetRectSize(const R: TRect; AIsHorizontal: Boolean; - out ARWidth, ARHeight: Integer); -procedure RotateTabsDistance(var ADistance: TcxPCDistance); - -var - cxPCLightBrushColor: TColor; - -implementation - -uses - Math, cxLookAndFeelPainters, cxPCPaintersFactory, dxThemeConsts, - dxThemeManager, dxUxTheme, dxOffice11, cxGeometry; - -const - ButtonsPainterTabContentWOffsetA: array[Boolean] of TcxPCWOffset = ( - (Left: 4; Right: 4), - (Left: 3; Right: 4) - ); - - StandardNativePainterButtonHeight = 17; - StandardNativePainterButtonWidth = 17; - StandardPainterButtonHeight = 20; - StandardPainterButtonWidthA: array [Boolean, TcxPCNavigatorButton] of Integer = ( - (20, 20, 12, 20), // TabPosition in [tpLeft, tpRight] - (20, 20, 13, 20) // TabPosition in [tpTop, tpBottom] - ); - StandardPainterTabBorderWidth = 2; - StandardPainterDefaultTabNormalHeightA: array [TcxPCStandardStyle] of Integer = (18, 20, 20); - StandardPainterDefaultTabNormalHTextOffsetA: array [TcxPCStandardStyle] of Integer = (2, 4, 4); - StandardPainterDrawImageOffsetA: array [Boolean, TcxPCStandardStyle] of TRect = ( - ((Left: 6; Top: 1; Right: 0; Bottom: 0), - (Left: 6; Top: -1; Right: 0; Bottom: 1), - (Left: 6; Top: -1; Right: 0; Bottom: 1) - ), - ((Left: 8; Top: 1; Right: 0; Bottom: 3), - (Left: 7; Top: -1; Right: 0; Bottom: 1), - (Left: 7; Top: -1; Right: 0; Bottom: 1) - ) - ); - StandardPainterDrawTextHOffsetA: array [Boolean, TcxPCStandardStyle] of TRect = ( - ((Left: 5; Top: 1; Right: 5; Bottom: -1), - (Left: 6; Top: 0; Right: 4; Bottom: 1), - (Left: 6; Top: 0; Right: 4; Bottom: 1) - ), - ((Left: 5; Top: 1; Right: 5; Bottom: 2), - (Left: 6; Top: 0; Right: 4; Bottom: 1), - (Left: 6; Top: 0; Right: 4; Bottom: 1) - ) - ); - StandardPainterTabContentWOffsetA: array [Boolean, TcxPCStandardStyle] of TcxPCWOffset = ( - ((Left: 2; Right: 2), - (Left: 3; Right: 3), - (Left: 2; Right: 2) - ), - ((Left: 4; Right: 4), - (Left: 3; Right: 3), - (Left: 4; Right: 2) - ) - ); - StandardPainterTabsNormalDistanceA: array [TcxPCStandardStyle] of TcxPCDistance = ( - (dw: 0; dh: 0), - (dw: 3; dh: 3), - (dw: 10; dh: 3) - ); - StandardPainterMaxTabBorderWidth = 2; - StandardPainterWDistanceBetweenImageBorderAndText = 1; - StandardPainterTooNarrowTabContentWOffsetA: array [Boolean, TcxPCStandardStyle] of TcxPCWOffset = ( - ((Left: 2; Right: 2), - (Left: 3; Right: 3), - (Left: 2; Right: 2) - ), - ((Left: 4; Right: 4), - (Left: 3; Right: 3), - (Left: 3; Right: 2) - ) - ); - - TabsPainterContentWOffsetA: array[Boolean, Boolean] of TcxPCWOffset = ( - ((Left: 3; Right: 3), - (Left: 3; Right: 3)), - ((Left: 5; Right: 5), - (Left: 4; Right: 5)) - ); - TabsPainterDrawImageWithoutTextRotatedMainTabWOffset: array[Boolean] of TcxPCWOffset = - ((Left: 1; Right: 2), (Left: 2; Right: 1)); - TabsPainterButtonBorderWidth = 2; - - ExtraFlatPainterButtonSize = 13; - ExtraFlatPainterDefaultTabNormalWidth = 0; - ExtraFlatPainterDrawImageOffsetA: array [Boolean] of TRect = ( - (Left: 2; Top: 0; Right: 0; Bottom: 0), - (Left: 3; Top: 0; Right: 0; Bottom: 0) - ); - ExtraFlatPainterDrawTextHOffsetA: array [Boolean] of TRect = ( - (Left: 5; Top: 2; Right: 3; Bottom: 0), - (Left: 6; Top: 2; Right: 3; Bottom: 0) - ); - ExtraFlatPainterMainTabBorderWidth = 1; - ExtraFlatPainterMainTabRectCorrection: TcxPCRectCorrection = ( - dLeft: -1; dTop: -1; dRight: 1; dBottom: 1 - ); - ExtraFlatPainterTabContentWOffset: array [Boolean] of TcxPCWOffset = ( - (Left: 2; Right: 2), - (Left: 3; Right: 3) - ); - ExtraFlatPainterWDistanceBetweenImageBorderAndText = 0; - ExtraFlatPainterTabsRowFreeSpaceWidth = 3; - - ExtraFlatPainterMainTabRowUnderlineWidth = 2; - - ButtonedPainterDistanceBetweenTabsAndClientRects = 2; - - MinTabSelectionDistance: TcxPCDistance = (dw: 4; dh: 4); - - cxPCDarkEdgeColor = clBtnShadow; - cxPCDarkestEdgeColor = cl3DDkShadow; - cxPCTabBodyColor = clBtnFace; - cxPCLightEdgeColor = {clNavy}cl3DLight; - cxPCLightestEdgeColor = clBtnHighlight; - - cxPCLightBrushColorDelta = 20; - - cxPCArrowConvertionA: array [nbTopLeft .. nbBottomRight, Boolean] of TcxPCArrow = ( - (aLeft, aTop), - (aRight, aBottom) - ); - cxPCArrowSizeA: array [nbTopLeft .. nbGoDialog] of Integer = (5, 5, 4); - - UltraFlatPainterButtonWidthA: array[TcxPCNavigatorButton] of Integer = - (15, 15, 11, 14); - UltraFlatPainterButtonHeight = 15; - - FlatPainterButtonBorderWidth = 1; - - SlantedPainterButtonWidthA: array[TcxPCNavigatorButton] of Integer = - (17, 17, 13, 16); - SlantedPainterButtonHeight = 17; - - CutCornerSize = 6; - SlantedPainterTabStateMarkWidth = 3; - OneNotePainterTabFrameWidth = 2; - - CloseButtonCrossSize = 9; - -type - TWinControlAccess = class(TWinControl); - - { TcxPaletteChangedNotifier } - - TcxPaletteChangedNotifier = class(TcxSystemPaletteChangedNotifier) - protected - procedure DoChanged; override; - end; - -var - FPaletteChangedNotifier: TcxPaletteChangedNotifier; - OneNoteMainTabBorderColor: COLORREF; - OneNoteTabBorderColor: COLORREF; - OneNoteMainTabInnerBorderColor: COLORREF; - OneNoteTabHotBorderColor: COLORREF; - OneNoteTabInnerBorderColor1: COLORREF; - OneNoteTabInnerBorderColor2: COLORREF; - -procedure AddPoints(var APoints: TPoints; const ANewPoints: array of TPoint; - var ALinePositions: TLinePositions; const ANewLinePositions: array of TLinePosition); -var - I, AArrayLength: Integer; -begin - AArrayLength := Length(APoints); - SetLength(APoints, AArrayLength + Length(ANewPoints)); - for I := 0 to Length(ANewPoints) - 1 do - APoints[AArrayLength + I] := ANewPoints[I]; - - AArrayLength := Length(ALinePositions); - SetLength(ALinePositions, AArrayLength + Length(ANewLinePositions)); - for I := 0 to Length(ANewLinePositions) - 1 do - ALinePositions[AArrayLength + I] := ANewLinePositions[I]; -end; - -procedure CalculateLightBrushColor; -var - R, G, B: Integer; - Color: Integer; -begin - Color := ColorToRGB(clBtnFace); - R := GetRValue(Color) + cxPCLightBrushColorDelta; - if R > 255 then R := 255; - G := GetGValue(Color) + cxPCLightBrushColorDelta; - if G > 255 then G := 255; - B := GetBValue(Color) + cxPCLightBrushColorDelta; - if B > 255 then B := 255; - cxPCLightBrushColor := RGB(R, G, B); -end; - -procedure DrawBorder(ACanvas: TcxCanvas; var ARect: TRect; ASides: array of TcxBorder; AColors: array of TColor; AExcludeBorder: Boolean = False); -var - I: Integer; - ARegion: TcxRegion; - AInitialRect: TRect; -begin - AInitialRect := ARect; - for I := 0 to High(ASides) do - begin - ACanvas.Pen.Color := AColors[I]; - case ASides[I] of - bLeft: - begin - ACanvas.Polyline([ARect.TopLeft, Point(ARect.Left, ARect.Bottom)]); - Inc(ARect.Left); - end; - bTop: - begin - ACanvas.Polyline([ARect.TopLeft, Point(ARect.Right, ARect.Top)]); - Inc(ARect.Top); - end; - bRight: - begin - ACanvas.Polyline([Point(ARect.Right - 1, ARect.Top), Point(ARect.Right - 1, ARect.Bottom)]); - Dec(ARect.Right); - end; - bBottom: - begin - ACanvas.Polyline([Point(ARect.Left, ARect.Bottom - 1), Point(ARect.Right, ARect.Bottom - 1)]); - Dec(ARect.Bottom); - end; - end; - end; - if AExcludeBorder then - begin - ARegion := TcxRegion.Create(AInitialRect); - ARegion.Combine(TcxRegion.Create(ARect), roSubtract); - ACanvas.SetClipRegion(ARegion, roSubtract); - end; -end; - -function GetControlRect(Control: TControl): TRect; -begin - Result.Left := 0; - Result.Top := 0; - Result.Right := Control.Width; - Result.Bottom := Control.Height; -end; - -function GetFigureRegion(APoints: array of TPoint; - const ALinePositions: array of TLinePosition; AForContent: Boolean): TcxRegion; - - function ThereIsLine(ALinePosition: TLinePosition): Boolean; - var - I: Integer; - begin - Result := False; - for I := 0 to High(ALinePositions) do - if ALinePositions[I] = ALinePosition then - begin - Result := True; - Break; - end; - end; - -var - I: Integer; - P1, P2: TPoint; -begin - for I := 0 to High(APoints) - 1 do - begin - P1 := APoints[I]; - P2 := APoints[I + 1]; - if AForContent then - begin - case ALinePositions[I] of - lpL: - begin - Inc(P1.X); - Inc(P2.X); - if ThereIsLine(lpLB) then - Inc(P1.Y); - if ThereIsLine(lpLT) then - Dec(P2.Y); - end; - lpLT: - begin - if ThereIsLine(lpL) then - Inc(P1.Y) - else - Inc(P1.X); - if ThereIsLine(lpT) then - Inc(P2.X) - else - Inc(P2.Y); - end; - lpLB: - begin - if ThereIsLine(lpB) then - Inc(P1.X) - else - Dec(P1.Y); - if ThereIsLine(lpL) then - Dec(P2.Y) - else - Inc(P2.X); - end; - lpT: - begin - Inc(P1.Y); - Inc(P2.Y); - if ThereIsLine(lpLT) then - Dec(P1.X); - if ThereIsLine(lpRT) then - Inc(P2.X); - end; - end; - end - else - case ALinePositions[I] of - lpRT: - begin - if ThereIsLine(lpT) then - Inc(P1.X) - else - Dec(P1.Y); - if ThereIsLine(lpR) then - Dec(P2.Y) - else - Inc(P2.X); - end; - lpR: - begin - Inc(P1.X); - Inc(P2.X); - if ThereIsLine(lpRT) then - Inc(P1.Y); - if ThereIsLine(lpRB) then - Dec(P2.Y); - end; - lpRB: - begin - if ThereIsLine(lpR) then - Inc(P1.Y) - else - Inc(P1.X); - if ThereIsLine(lpB) then - Inc(P2.X) - else - Inc(P2.Y); - end; - lpB: - begin - Inc(P1.Y); - Inc(P2.Y); - if ThereIsLine(lpRB) then - Dec(P1.X); - if ThereIsLine(lpLB) then - Inc(P2.X); - end; - end; - APoints[I] := P1; - APoints[I + 1] := P2; - end; - Result := TcxRegion.Create(CreatePolygonRgn(APoints, Length(APoints), WINDING)); -end; - -procedure GetRectSize(const R: TRect; AIsHorizontal: Boolean; - out ARWidth, ARHeight: Integer); -begin - if AIsHorizontal then - begin - ARWidth := R.Right - R.Left; - ARHeight := R.Bottom - R.Top; - end - else - begin - ARWidth := R.Bottom - R.Top; - ARHeight := R.Right - R.Left; - end; -end; - -function HSBToRGB(AHue, ASaturation, ABrightness: Extended): TColor; - - procedure GetRGB(out R, G, B: Integer); - var - AMinColorComponent, AMaxColorComponent: Extended; - begin - if ABrightness = 0 then - begin - R := 0; - G := 0; - B := 0; - Exit; - end; - AMaxColorComponent := ABrightness * 255 / 100; - AMinColorComponent := AMaxColorComponent * (100 - ASaturation) / 100; - if AHue <= 60 then - begin - R := Trunc(AMaxColorComponent); - G := Trunc(AMinColorComponent + (AMaxColorComponent - AMinColorComponent) * AHue / 60); - B := Trunc(AMinColorComponent); - end - else if AHue <= 120 then - begin - R := Trunc(AMaxColorComponent + (AMaxColorComponent - AMinColorComponent) * (60 - AHue) / 60); - G := Trunc(AMaxColorComponent); - B := Trunc(AMinColorComponent); - end - else if AHue <= 180 then - begin - R := Trunc(AMinColorComponent); - G := Trunc(AMaxColorComponent); - B := Trunc(AMinColorComponent + (AMaxColorComponent - AMinColorComponent) * (AHue - 120) / 60); - end - else if AHue <= 240 then - begin - R := Trunc(AMinColorComponent); - G := Trunc(AMaxColorComponent + (AMaxColorComponent - AMinColorComponent) * (180 - AHue) / 60); - B := Trunc(AMaxColorComponent); - end - else if AHue <= 300 then - begin - R := Trunc(AMinColorComponent + (AMaxColorComponent - AMinColorComponent) * (AHue - 240) / 60); - G := Trunc(AMinColorComponent); - B := Trunc(AMaxColorComponent); - end - else - begin - R := Trunc(AMaxColorComponent); - G := Trunc(AMinColorComponent); - B := Trunc(AMaxColorComponent + (AMaxColorComponent - AMinColorComponent) * (300 - AHue) / 60); - end - end; - -var - R, G, B: Integer; -begin - GetRGB(R, G, B); - Result := RGB(R, G, B); -end; - -procedure RGBToHSB(ARGBColor: TColor; out Hue, Saturation, Brightness: Extended); -var - AMinColorComponent: Integer; - R, G, B: Integer; - - procedure PreCalculate; - begin - ARGBColor := ColorToRGB(ARGBColor); - R := GetRValue(ARGBColor); - G := GetGValue(ARGBColor); - B := GetBValue(ARGBColor); - - AMinColorComponent := R; - if G < AMinColorComponent then - AMinColorComponent := G; - if B < AMinColorComponent then - AMinColorComponent := B; - end; - - function GetBrightness: Integer; - begin - Result := R; - if G > Result then - Result := G; - if B > Result then - Result := B; - end; - - function GetSaturation(ABrightness: Extended): Extended; - begin - if ABrightness = 0 then - Result := 0 - else - Result := 100 - AMinColorComponent * 100 / ABrightness; - end; - - function GetHue(ABrightness: Integer; ASaturation: Extended): Extended; - begin - if ASaturation = 0 then - Result := 0 // ??? - else - begin - if R = ABrightness then - Result := (G - B) * 60 / (ABrightness - AMinColorComponent) - else if G = ABrightness then - Result := (B - R) * 60 / (ABrightness - AMinColorComponent) + 120 - else - Result := (R - G) * 60 / (ABrightness - AMinColorComponent) + 240; - if Result < 0 then - Result := Result + 360; - end; - end; - -var - ABrightness: Integer; -begin - PreCalculate; - - ABrightness := GetBrightness; - Brightness := ABrightness * 100 / 255; - Saturation := GetSaturation(ABrightness); - Hue := GetHue(ABrightness, Saturation); -end; - -function Light(AColor: TColor; APercentage: Byte): TColor; -var - AHue, ASaturation, ABrightness: Extended; -begin - RGBToHSB(ColorToRGB(AColor), AHue, ASaturation, ABrightness); - ABrightness := ABrightness * (100 + APercentage) / 100; - if ABrightness > 100 then - ABrightness := 100; - Result := HSBToRGB(AHue, ASaturation, ABrightness); -end; - -procedure PrepareOneNoteStyleColors; -const - AColors: array[TOffice11Scheme, 0..5] of TColor = ( - (clBtnShadow, clBtnShadow, clWhite, $6A240A, clBtnFace, clBtnFace), - ($9C613B, $9A3500, clWhite, $800000, clWhite, $F1A675), - ($588060, $6B7760, clWhite, $385D3F, clWhite, $8CC2B0), - ($947C7C, $927476, clWhite, $6F4B4B, clWhite, $CEB9BA) - ); -var - AColorScheme: TOffice11Scheme; -begin - AColorScheme := GetOffice11Scheme; - OneNoteMainTabBorderColor := AColors[AColorScheme, 0]; - OneNoteTabBorderColor := AColors[AColorScheme, 1]; - OneNoteMainTabInnerBorderColor := AColors[AColorScheme, 2]; - OneNoteTabHotBorderColor := AColors[AColorScheme, 3]; - OneNoteTabInnerBorderColor1 := AColors[AColorScheme, 4]; - OneNoteTabInnerBorderColor2 := AColors[AColorScheme, 5]; -end; - -procedure RotateTabsDistance(var ADistance: TcxPCDistance); -var - A: Integer; -begin - A := ADistance.dw; - ADistance.dw := ADistance.dh; - ADistance.dh := A; -end; - -function Size(cx, cy: Integer): TSize; -begin - Result.cx := cx; - Result.cy := cy; -end; - -procedure TcxPCTabsPainter.CorrectTabRect(TabVisibleIndex: Integer; - var TabRectCorrection: TcxPCRectCorrection); -const - TabRectCorrectionA: array[TcxTabPosition] of TcxPCRectCorrection = ( - (dLeft: -2; dTop: -2; dRight: 2; dBottom: 1), - (dLeft: -2; dTop: -1; dRight: 2; dBottom: 2), - (dLeft: -2; dTop: -2; dRight: 1; dBottom: 2), - (dLeft: -1; dTop: -2; dRight: 2; dBottom: 2) - ); -begin - inherited CorrectTabRect(TabVisibleIndex, TabRectCorrection); - if TabVisibleIndex = ParentInfo.MainTabVisibleIndex then - TabRectCorrection := TabRectCorrectionA[ParentInfo.VisibleTabs[TabVisibleIndex].PaintingPosition]; -end; - -procedure TcxPCTabsPainter.DrawNativeTabBackground(DC: HDC; ATab: TcxTabSheet); -var - ATheme: TdxTheme; - R: TRect; -begin - R := GetDisplayRect; - InflateRect(R, StandardPainterTabControlFrameBorderWidth, - StandardPainterTabControlFrameBorderWidth); - OffsetRect(R, -ATab.Left, -ATab.Top); - ATheme := OpenTheme(totTab); - DrawThemeBackground(ATheme, DC, TABP_PANE, 0, R); -end; - -function TcxPCTabsPainter.GetButtonContentPosition( - AButton: TcxPCNavigatorButton): TPoint; -begin - Result := Get3DButtonContentPosition(AButton); -end; - -function TcxPCTabsPainter.GetButtonHeight: Integer; -begin - if not IsNativePainting then - Result := inherited GetButtonHeight - else - Result := StandardNativePainterButtonHeight; -end; - -function TcxPCTabsPainter.GetButtonsRegionHOffset: Integer; -begin - Result := 0; - if ParentInfo.IsTabsContainer then - Result := TabsContainerOffset; -end; - -function TcxPCTabsPainter.GetButtonsRegionWOffset: Integer; -begin - Result := 0; - if ParentInfo.IsTabsContainer then - Result := TabsContainerOffset; -end; - -function TcxPCTabsPainter.GetButtonWidth(Button: TcxPCNavigatorButton): Integer; -var - ASize: TSize; -begin - if IsNativePainting then - begin - Result := StandardNativePainterButtonWidth; - if Button = nbGoDialog then - begin - if GetThemePartSize(OpenTheme(totSpin), ParentInfo.Canvas.Handle, SPNP_DOWN, - DNS_NORMAL, TS_TRUE, ASize) = S_OK then - Result := ASize.cx; - end - (*else - if Button = nbClose then - begin - if GetThemePartSize(OpenTheme(totWindow), ParentInfo.Canvas.Handle, WP_SMALLCLOSEBUTTON, - CBS_NORMAL, TS_TRUE, ASize) = S_OK then - if ParentInfo.TabPosition in [tpTop, tpBottom] then - Result := ASize.cx - else - Result := ASize.cy; - end;*) - end - else - Result := inherited GetButtonWidth(Button); -end; - -function TcxPCTabsPainter.GetClientRectOffset: TRect; - - function GetNativeFrameSizeCorrection: TRect; - var - R: TRect; - begin - R := GetNativeContentOffset; - case ParentInfo.TabPosition of - tpLeft: - Result := Rect(R.Bottom, R.Left, R.Top, R.Right); - tpTop: - Result := R; - tpRight: - Result := Rect(R.Top, R.Right, R.Bottom, R.Left); - tpBottom: - Result := Rect(R.Right, R.Bottom, R.Left, R.Top); - end; - Result.Right := -Result.Right; - Result.Bottom := -Result.Bottom; - end; - -begin - Result := inherited GetClientRectOffset; - if IsNativePainting then - begin - OffsetRect(Result, -StandardPainterTabControlFrameBorderWidth, - -StandardPainterTabControlFrameBorderWidth); - cxGraphics.ExtendRect(Result, GetNativeFrameSizeCorrection); - end; - if ParentInfo.IsTabsContainer and not IsNativePainting then - Inc(Result.Top, TabsContainerBaseWidth - GetFrameWidth); -end; - -function TcxPCTabsPainter.GetDisplayRectOffset: TRect; -begin - Result := inherited GetDisplayRectOffset; - if not ParentInfo.HideTabs and (ParentInfo.RowCount > 0) then - Dec(Result.Top); -end; - -function TcxPCTabsPainter.GetDrawImageOffset(TabVisibleIndex: Integer): TRect; -begin - Result := inherited GetDrawImageOffset(TabVisibleIndex); - if (ParentInfo.VisibleTabs[TabVisibleIndex].PaintingPositionIndex in [5, 7, 10]) then - Inc(Result.Bottom); -end; - -function TcxPCTabsPainter.GetDrawImageWithoutTextWOffset(TabVisibleIndex: Integer): TcxPCWOffset; -begin - if ParentInfo.Rotate and ParentInfo.VisibleTabs[TabVisibleIndex].IsMainTab then - Result := TabsPainterDrawImageWithoutTextRotatedMainTabWOffset[ParentInfo.VisibleTabs[TabVisibleIndex].PaintingPositionIndex in [3, 6, 11]] - else - Result := inherited GetDrawImageWithoutTextWOffset(TabVisibleIndex); -end; - -function TcxPCTabsPainter.GetDrawTextHOffset(TabVisibleIndex: Integer): TRect; -begin - Result := inherited GetDrawTextHOffset(TabVisibleIndex); - if (ParentInfo.VisibleTabs[TabVisibleIndex].PaintingPositionIndex in [5, 7, 10]) then - Inc(Result.Bottom); - with ParentInfo do - if VisibleTabs[TabVisibleIndex].IsMainTab and (GetTabRotatedImageSize.cx = 0) then - Inc(Result.Left, 2); -end; - -function TcxPCTabsPainter.GetImageTextDistance(ATabVisibleIndex: Integer): Integer; -//var -// ACorrection: Integer; -// ATab: TcxTab; -// ATabContentWOffset: TcxPCWOffset; -begin - Result := inherited GetImageTextDistance(ATabVisibleIndex); -// ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; -// if ParentInfo.Rotate and (ATab.Caption <> '') then -// begin -// ATabContentWOffset := TabsPainterContentWOffsetA[IsTabBorderThick(ATabVisibleIndex), -// ParentInfo.Rotate]; -// if ATab.PaintingPositionIndex in [3, 6, 11] then -// ExchangeValues(ATabContentWOffset.Left, ATabContentWOffset.Right); -// ACorrection := 12; -// if ATab.IsMainTab then -// Inc(ACorrection, 3); -// ACorrection := (ACorrection - ATabContentWOffset.Left - ATabContentWOffset.Right) div 2; -// Inc(Result, ACorrection); -// end; -end; - -{ TcxPCTabsPainter } - -class function TcxPCTabsPainter.GetStandardStyle: TcxPCStandardStyle; -begin - Result := tsTabs; -end; - -class function TcxPCTabsPainter.GetStyleID: TcxPCStyleID; -begin - Result := cxPCTabsStyle; -end; - -class function TcxPCTabsPainter.GetStyleName: TCaption; -begin - Result := 'Tabs'; -end; - -class function TcxPCTabsPainter.HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := ALookAndFeel.GetAvailablePainter([totTab]).LookAndFeelStyle in - [lfsStandard, lfsNative]; -end; - -class function TcxPCTabsPainter.IsDefault(ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := ALookAndFeel.NativeStyle; -end; - -function TcxPCTabsPainter.GetTabBodyColor(TabVisibleIndex: Integer): TColor; -var - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[TabVisibleIndex]; - if ATab.Highlighted then - Result := HighlightedTabBodyColor - else - begin - Result := GetTabColor(TabVisibleIndex); - if Result = clDefault then - Result := cxPCTabBodyColor; - end; -end; - -function TcxPCTabsPainter.GetTabClipRgn(ATabVisibleIndex: Integer): TcxRegion; -var - ATab: TcxTab; - ATabRect: TRect; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - - ATabRect := ATab.VisibleRect; - if ATab.IsMainTab then - ATabRect := GetExtendedRect(ATab.VisibleRect, Rect(0, 0, 0, -1), ATab.PaintingPosition); - - Result := TcxRegion.Create(ATabRect); -end; - -function TcxPCTabsPainter.GetTabClipRgnOperation(ATabVisibleIndex: Integer): TcxRegionOperation; -begin - if not ParentInfo.VisibleTabs[ATabVisibleIndex].IsMainTab then - Result := roIntersect - else - Result := roSet; -end; - -function TcxPCTabsPainter.GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; -var -// ACorrection: Integer; - ATab: TcxTab; -begin - Result := TabsPainterContentWOffsetA[IsTabBorderThick(ATabVisibleIndex), - ParentInfo.Rotate]; - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if ATab.PaintingPositionIndex in [3, 6, 11] then - ExchangeLongWords(Result.Left, Result.Right); -// if ParentInfo.Rotate and (ATab.Caption <> '') then -// begin -// ACorrection := 12; -// if ATab.IsMainTab then -// Inc(ACorrection, 3); -// ACorrection := (ACorrection - Result.Left - Result.Right) div 2; -// if GetTabBaseImageSize.cx = 0 then -// Inc(Result.Left, ACorrection); -// Inc(Result.Right, ACorrection); -// end; -end; - -function TcxPCTabsPainter.GetTabFocusRect(const ATabBounds: TRect): TRect; -begin - Result := ATabBounds; - InflateRect(Result, -StandardPainterTabBorderWidth, -StandardPainterTabBorderWidth); -end; - -procedure TcxPCTabsPainter.GetTabNativePartAndState(ATabVisibleIndex: Integer; - out PartId, StateId: Integer); -type - TcxTabPositionWithinRow = (tprLeftMost, tprMiddle, tprRightMost); -const - ATabNativePartA: array[Boolean, TcxTabPositionWithinRow] of Integer = ( - (TABP_TABITEMLEFTEDGE, TABP_TABITEM, TABP_TABITEMRIGHTEDGE), - (TABP_TOPTABITEMLEFTEDGE, TABP_TOPTABITEM, TABP_TOPTABITEMRIGHTEDGE) - ); -var - ALineIndexBoundsA: TcxPCLineIndexBoundsArray; - ATab: TcxTab; - ATabPositionWithinRow: TcxTabPositionWithinRow; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - InitializeLineBoundsArray(ParentControl, ALineIndexBoundsA); - - if ParentInfo.MultiLine and not ParentInfo.RaggedRight then - begin - if ParentInfo.IsTabsContainer then - ATabPositionWithinRow := tprMiddle - else - if (ALineIndexBoundsA[ATab.VisibleRow].Right = ATab.VisibleIndex) then - ATabPositionWithinRow := tprRightMost - else - if ALineIndexBoundsA[ATab.VisibleRow].Left = ATab.VisibleIndex then - ATabPositionWithinRow := tprLeftMost - else - ATabPositionWithinRow := tprMiddle; - end - else - if ParentInfo.IsTabsContainer then - ATabPositionWithinRow := tprMiddle - else - if ALineIndexBoundsA[ATab.VisibleRow].Left = ATab.VisibleIndex then - ATabPositionWithinRow := tprLeftMost - else - if ATab.VisibleIndex = ParentControl.Tabs.VisibleTabsCount - 1 then - ATabPositionWithinRow := tprRightMost - else - ATabPositionWithinRow := tprMiddle; - - // to work like standard PageControl - if not ParentInfo.MultiLine or ParentInfo.RaggedRight then - if ATab.IsMainTab and (ATabPositionWithinRow = tprRightMost) then - ATabPositionWithinRow := tprMiddle; - - PartId := ATabNativePartA[ATab.IsMainTab, ATabPositionWithinRow]; - StateId := GetTabNativeState(ATabVisibleIndex); -end; - -function TcxPCTabsPainter.GetTabsContainerOffsets: TRect; -begin - Result := Rect(TabsContainerOffset, TabsContainerOffset, TabsContainerOffset, 0); -end; - -function TcxPCTabsPainter.GetTabsPosition( - NavigatorButtons: TcxPCNavigatorButtons): TcxPCTabsPosition; - -var - NormalTabsRectCorrection: TRect; - - procedure DoHardCalculation(var ATabsPosition: TcxPCTabsPosition); - var - AButtonsWidth: Integer; - ATabsContainerOffset: TRect; - begin - AButtonsWidth := CalculateButtonsRegionWidth(NavigatorButtons); - ATabsContainerOffset := cxEmptyRect; - if ParentInfo.IsTabsContainer then - ATabsContainerOffset := GetTabsContainerOffsets; - - NormalTabsRectCorrection := RotateRect(Rect(0, 2 + ATabsContainerOffset.Top, 0, 0), ParentInfo.TabPosition); - ExtendRect(ATabsPosition.ExtendedTabsRect, RotateRect(Rect(0, ATabsContainerOffset.Top, 0, 0), ParentInfo.TabPosition)); - with ParentInfo do - begin - if TabPosition in [tpTop, tpBottom] then - begin - if MultiLine or (NavigatorButtons = []) then - begin - ATabsPosition.ExtendedTabsRect.Left := ATabsContainerOffset.Left; - ATabsPosition.ExtendedTabsRect.Right := Width - ATabsContainerOffset.Left; - NormalTabsRectCorrection.Left := 2 + ATabsContainerOffset.Left; - NormalTabsRectCorrection.Right := 2 + ATabsContainerOffset.Left; - end - else - begin - if NavigatorPosition in [npLeftTop, npLeftBottom] then - begin - ATabsPosition.ExtendedTabsRect.Left := AButtonsWidth; - ATabsPosition.ExtendedTabsRect.Right := Width - ATabsContainerOffset.Left; - end - else - begin - ATabsPosition.ExtendedTabsRect.Left := ATabsContainerOffset.Left; - ATabsPosition.ExtendedTabsRect.Right := Width - AButtonsWidth; - end; - NormalTabsRectCorrection.Left := ATabsPosition.ExtendedTabsRect.Left + 2; - NormalTabsRectCorrection.Right := Width - ATabsPosition.ExtendedTabsRect.Right + 2; - end; - ATabsPosition.NormalRowWidth := Width - NormalTabsRectCorrection.Left - NormalTabsRectCorrection.Right; - end - else - begin - if MultiLine or (NavigatorButtons = []) then - begin - ATabsPosition.ExtendedTabsRect.Top := ATabsContainerOffset.Left; - ATabsPosition.ExtendedTabsRect.Bottom := Height - ATabsContainerOffset.Left; - NormalTabsRectCorrection.Top := 2 + ATabsContainerOffset.Left; - NormalTabsRectCorrection.Bottom := 2 + ATabsContainerOffset.Left; - end - else - begin - if NavigatorPosition in [npLeftTop, npRightTop] then - begin - ATabsPosition.ExtendedTabsRect.Top := AButtonsWidth; - ATabsPosition.ExtendedTabsRect.Bottom := Height - ATabsContainerOffset.Left; - end - else - begin - ATabsPosition.ExtendedTabsRect.Top := ATabsContainerOffset.Left; - ATabsPosition.ExtendedTabsRect.Bottom := Height - AButtonsWidth; - end; - NormalTabsRectCorrection.Top := ATabsPosition.ExtendedTabsRect.Top + 2; - NormalTabsRectCorrection.Bottom := Height - ATabsPosition.ExtendedTabsRect.Bottom + 2; - end; - ATabsPosition.NormalRowWidth := Height - NormalTabsRectCorrection.Top - NormalTabsRectCorrection.Bottom; - end; - end; - end; - -begin - with Result do - begin - ExtendedTabsRect := GetControlRect(ParentControl); - NormalTabsRect := ExtendedTabsRect; - - DoHardCalculation(Result); - - cxGraphics.ExtendRect(NormalTabsRect, NormalTabsRectCorrection); - - ExtendedTopOrLeftTabsRectBottomOrRightBorderOffset := 0; - ExtendedBottomOrRightTabsRectTopOrLeftBorderOffset := 0; - if ParentInfo.TabPosition in [tpTop, tpLeft] then - ExtendedTopOrLeftTabsRectBottomOrRightBorderOffset := 1 - else - ExtendedBottomOrRightTabsRectTopOrLeftBorderOffset := -1; - MinDistanceBetweenTopOrLeftAndBottomOrRightExtendedTabsRects := 0; - end; - - CalculateButtonsRegion(NavigatorButtons); -end; - -function TcxPCTabsPainter.GetTooNarrowTabContentWOffset( - ATabVisibleIndex: Integer): TcxPCWOffset; -begin - Result := GetTabContentWOffset(ATabVisibleIndex); -end; - -function TcxPCTabsPainter.InternalCalculateTabNormalHeight: Integer; -begin - if ParentInfo.Rotate then - Result := inherited InternalCalculateTabNormalHeight - 2 - else - Result := inherited InternalCalculateTabNormalHeight - 3; -end; - -procedure TcxPCTabsPainter.InternalPrepareOutTabImageAndTextData( - ATabVisibleIndex: Integer; var AImageRect, ATextRect: TRect); -var - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if IsNativePainting and ATab.IsMainTab and (ATab.PaintingPositionIndex in [5, 7, 10]) then - begin - OffsetRect(AImageRect, 0, 1); - OffsetRect(ATextRect, 0, 1); - end; - inherited InternalPrepareOutTabImageAndTextData(ATabVisibleIndex, AImageRect, - ATextRect); -end; - -procedure TcxPCTabsPainter.InvalidateTabRect(ATabVisibleIndex: Integer); -var - ATab: TcxTab; - R: TRect; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - R := ATab.VisibleRect; - R := GetExtendedRect(R, Rect(0, 0, 0, -1), ATab.PaintingPosition); - ParentControl.InvalidateRect(R, False); -end; - -function TcxPCTabsPainter.IsNativePainting: Boolean; -begin - if csDestroying in ParentControl.ComponentState then - Result := False - else - Result := ParentControl.LookAndFeel.NativeStyle and - AreVisualStylesAvailable and (OpenTheme(totTab) <> TC_NONE); -end; - -function TcxPCTabsPainter.IsOverTab(TabVisibleIndex: Integer; X, Y: Integer): Boolean; -begin - // TODO - Result := True; -end; - -function TcxPCTabsPainter.NeedShowFrame: Boolean; -begin - Result := True; -end; - -procedure TcxPCTabsPainter.Paint; -begin -{ if IsNativePainting then - begin - FMDC := 0; - FPrevMDCBitmap := 0; - try - FMDC := CreateCompatibleDC(ParentInfo.Canvas.Handle); - FPrevMDCBitmap := SelectObject(FMDC, - CreateCompatibleBitmap(ParentInfo.Canvas.Handle, ParentControl.Width, - ParentControl.Height)); - - PrepareBackgroundBitmap; - inherited Paint; - finally - if FPrevMDCBitmap <> 0 then - DeleteObject(SelectObject(FMDC, FPrevMDCBitmap)); - if FMDC <> 0 then - DeleteDC(FMDC); - end; - end - else} - inherited Paint; -end; - -procedure TcxPCTabsPainter.PaintButton(Button: TcxPCNavigatorButton; - const ButtonRect: TRect); -const - AArrowButtonPartIdMap: array [TcxPCArrow] of Integer = (SPNP_UP, SPNP_DOWN, - SPNP_DOWNHORZ, SPNP_UPHORZ); - AArrowButtonStateIdMap: array [TcxPCArrow, TcxPCNavigatorButtonState] of Integer = ( - (UPS_NORMAL, UPS_PRESSED, UPS_HOT, UPS_DISABLED), - (DNS_NORMAL, DNS_PRESSED, DNS_HOT, DNS_DISABLED), - (DNHZS_NORMAL, DNHZS_PRESSED, DNHZS_HOT, DNHZS_DISABLED), - (UPHZS_NORMAL, UPHZS_PRESSED, UPHZS_HOT, UPHZS_DISABLED) - ); - ACloseButtonStateIdMap: array [TcxPCNavigatorButtonState] of Integer = - (CBS_NORMAL, CBS_PUSHED, CBS_HOT, CBS_DISABLED); -var - AArrow: TcxPCArrow; - APartId, AStateId: Integer; - ATheme: TdxTheme; -begin - if IsNativePainting then - begin - if Button = nbClose then - begin - ATheme := OpenTheme(totWindow); - APartId := WP_SMALLCLOSEBUTTON; - AStateId := ACloseButtonStateIdMap[ParentInfo.NavigatorButtonsState[Button]]; - end - else - begin - ATheme := OpenTheme(totSpin); - AArrow := GetButtonArrow(Button); - APartId := AArrowButtonPartIdMap[AArrow]; - AStateId := AArrowButtonStateIdMap[AArrow, ParentInfo.NavigatorButtonsState[Button]]; - end; - if ParentControl.ParentBackground and IsThemeBackgroundPartiallyTransparent(ATheme, APartId, AStateId) then - cxDrawThemeParentBackground(ParentControl, ParentInfo.Canvas, ButtonRect) - else - begin - ParentInfo.Canvas.Brush.Color := ParentInfo.Color; - ParentInfo.Canvas.FillRect(ButtonRect); - end; - DrawThemeBackground(ATheme, ParentInfo.Canvas.Handle, APartId, AStateId, - ButtonRect); - end - else - inherited PaintButton(Button, ButtonRect); -end; - -procedure TcxPCTabsPainter.PaintClientArea; -begin - if IsNativePainting then - InternalPaintFrame(ParentInfo.Canvas.Canvas) - else - inherited PaintClientArea; -end; - -procedure TcxPCTabsPainter.PaintFrame; -var - AFrameRect: TRect; -begin - inherited PaintFrame; - if ParentInfo.IsTabsContainer then - begin - AFrameRect := GetFrameRect; - InflateRect(AFrameRect, -GetFrameWidth, -GetFrameWidth); - ParentInfo.Canvas.Brush.Color := cxPCTabBodyColor; - ParentInfo.Canvas.FillRect(AFrameRect); - end; -end; - -procedure TcxPCTabsPainter.PaintTabShape(ATab: TcxTab; ATabVisibleIndex: Integer); - - procedure PaintNativeFrame; - var - ABitmap: TBitmap; - ATab: TcxTab; - ATabRect: TRect; - begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - ATabRect := ATab.FullRect; - if ATab.IsMainTab then - ATabRect := GetExtendedRect(ATabRect, Rect(0, 0, 0, -1), ATab.PaintingPosition); - ABitmap := ATab.PaintBitmap; - case ATab.PaintingPositionIndex of - 2, 4, 7, 11: - begin - ParentInfo.Canvas.RotateBitmap(ABitmap, raPlus90); - with FOutTabImageAndTextData.TabTextRect do - FOutTabImageAndTextData.TabTextRect := Rect(Top, ABitmap.Width - Right, Bottom, ABitmap.Width - Left); - end; - 3, 5, 8, 12: - begin - ParentInfo.Canvas.RotateBitmap(ABitmap, raMinus90); - with FOutTabImageAndTextData.TabTextRect do - FOutTabImageAndTextData.TabTextRect := Rect(ABitmap.Height - Bottom, Left, ABitmap.Height - Top, Right); - end; - end; - OffsetRect(FOutTabImageAndTextData.TabTextRect, ATabRect.Left, ATabRect.Top); - ParentInfo.Canvas.CopyRect(ATabRect, ABitmap.Canvas, - Rect(0, 0, ABitmap.Width, ABitmap.Height)); - InternalDrawFocusRect(ATabVisibleIndex, GetTabFocusRect(ATabRect)); - end; - -var - MainTab: Boolean; - AFocusRect, R: TRect; - TabPaintingPosition: TcxTabPosition; -begin - if IsNativePainting then - begin - PaintNativeFrame; - Exit; - end; - - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - MainTab := ATab.IsMainTab; - - TabPaintingPosition := ATab.PaintingPosition; - - R := ATab.FullRect; - InflateRect(R, -StandardPainterTabBorderWidth, -StandardPainterTabBorderWidth); -// if MainTab or ParentInfo.IsTabsContainer then - R := GetExtendedRect(R, Rect(0, 0, 0, -StandardPainterTabBorderWidth), TabPaintingPosition); - - ParentInfo.Canvas.Brush.Style := bsSolid; - ParentInfo.Canvas.Brush.Color := GetTabBodyColor(ATabVisibleIndex); - ParentInfo.Canvas.FillRect(R); - - if MainTab then - begin - AFocusRect := GetExtendedRect(R, Rect(0, 0, 0, 1), TabPaintingPosition); - InternalDrawFocusRect(ATabVisibleIndex, AFocusRect); - end; - - if not MainTab then - begin - SubtractRect(R, GetExtendedRect(R, Rect(0, 0, 0, -StandardPainterTabBorderWidth), TabPaintingPosition), R); - ParentInfo.Canvas.Brush.Color := ParentInfo.Color; - ParentInfo.Canvas.FillRect(R); - end; - - PaintTabFrame(ATabVisibleIndex); -end; - -procedure TcxPCTabsPainter.PaintTabsRegion; -var - I: Integer; - FirstIndex, LastIndex: Integer; - MainTabVisibleIndex: Integer; - SpecialTab: TcxTab; -begin - MainTabVisibleIndex := ParentInfo.MainTabVisibleIndex; - if MainTabVisibleIndex <> -1 then - begin - SpecialTab := ParentInfo.VisibleTabs[MainTabVisibleIndex]; - if SpecialTab.RealVisible then - PaintTab(MainTabVisibleIndex); - end; - - InitializeVisibleTabRange(ParentControl, FirstIndex, LastIndex); - for I := FirstIndex to LastIndex do - if I <> MainTabVisibleIndex then - PaintTab(I); -end; - -procedure TcxPCTabsPainter.PaintNativeTabBackground( - DC: HDC; ATabVisibleIndex: Integer; const ABounds: TRect); -var - ATheme: TdxTheme; - APartId, AStateId: Integer; -begin - GetTabNativePartAndState(ATabVisibleIndex, APartId, AStateId); - ATheme := OpenTheme(totTab); - DrawThemeBackground(ATheme, DC, APartId, AStateId, ABounds); -end; - -{procedure TcxPCTabsPainter.PrepareBackgroundBitmap; -var - ATempCanvas: TCanvas; - R: TRect; -begin - ATempCanvas := TCanvas.Create; - try - ATempCanvas.Handle := FMDC; - R := GetControlRect(ParentControl); - if ParentControl.ParentBackground then - cxDrawThemeParentBackground(ParentControl, ATempCanvas, R) - else - begin - ATempCanvas.Brush.Color := ParentInfo.Color; - ATempCanvas.FillRect(R); - end; - InternalPaintFrame(ATempCanvas); - finally - ATempCanvas.Free; - end; -end; } - -procedure TcxPCTabsPainter.PrepareTabBackground(ATab: TcxTab; ATabVisibleIndex: Integer); -const - RRectNativePaintingCorrectionA: array[TcxTabPosition] of TcxPCRectCorrection = ( - (dLeft: 0; dTop: 0; dRight: 0; dBottom: 1), - (dLeft: 0; dTop: -1; dRight: 0; dBottom: 0), - (dLeft: 0; dTop: 0; dRight: 1; dBottom: 0), - (dLeft: -1; dTop: 0; dRight: 0; dBottom: 0) - ); - - procedure RotateTabBitmap(ABitmap: TBitmap; ARotateBack: Boolean); - const - PlusMinusAngleMap: array[Boolean] of TcxRotationAngle = (raPlus90, raMinus90); - var - ARotationAngle: TcxRotationAngle; - begin - case ATab.PaintingPositionIndex of - 4, 6, 7, 9: - ARotationAngle := PlusMinusAngleMap[ARotateBack]; - else - ARotationAngle := ra0; - end; - ParentInfo.Canvas.RotateBitmap(ABitmap, ARotationAngle, - ATab.PaintingPositionIndex in [4..6, 10..12]) - end; - -var - ABitmap: TBitmap; - ARotationAngle: TcxRotationAngle; - FullRect, R: TRect; - MainTab: Boolean; - R1: TRect; - TabPaintingPosition: TcxTabPosition; -begin - MainTab := ATab.IsMainTab; - FullRect := ATab.FullRect; - TabPaintingPosition := ATab.PaintingPosition; - with ParentInfo.Canvas do - begin - R := FullRect; - if MainTab then - CorrectRect(R, RRectNativePaintingCorrectionA[TabPaintingPosition]); - - ABitmap := ATab.PaintBitmap; - R1 := Rect(0, 0, R.Right - R.Left, R.Bottom - R.Top); - if TabPaintingPosition in [tpLeft, tpRight] then - begin - ABitmap.Width := R1.Bottom; - ABitmap.Height := R1.Right; - end - else - begin - ABitmap.Width := R1.Right; - ABitmap.Height := R1.Bottom; - end; - RotateTabBitmap(ABitmap, True); - PrepareTabBitmapBackground(ABitmap, R, ATab); - RotateTabBitmap(ABitmap, False); - R1 := Rect(0, 0, ABitmap.Width, ABitmap.Height); - PaintNativeTabBackground(ABitmap.Canvas.Handle, ATabVisibleIndex, R1); - case ATab.PaintingPositionIndex of - 2, 9, 12: - ARotationAngle := raMinus90; - 6, 11, 3: - ARotationAngle := raPlus90; - 4, 7: - ARotationAngle := ra180; - else - ARotationAngle := ra0; - end; - RotateBitmap(ABitmap, ARotationAngle, - ATab.PaintingPositionIndex in [4..6, 10..12]); - end; -end; - -procedure TcxPCTabsPainter.PrepareTabBitmapBackground( - ABitmap: TBitmap; const ARect: TRect; ATab: TcxTab); -begin - if IsNativePainting and ParentControl.ParentBackground then - cxDrawTransparentControlBackground(ParentControl, ABitmap.Canvas, ARect) - else - FillRectByColor(ABitmap.Canvas.Handle, - Rect(0, 0, ABitmap.Width, ABitmap.Height), - GetFreeSpaceColor); -end; - -procedure TcxPCTabsPainter.RepaintTab(TabVisibleIndex: Integer; - TabPropertyChanged: TcxPCTabPropertyChanged); -begin - if (TabPropertyChanged = tpcIsMainTab) and - (not ParentInfo.VisibleTabs[TabVisibleIndex].IsMainTab) then - InvalidateTabExtendedTabsRect(TabVisibleIndex) - else - begin - if IsVerticalText(ParentControl) then - ParentInfo.VisibleTabs[TabVisibleIndex].ResetVerticalTextBitmap; - InvalidateTabRect(TabVisibleIndex); - end; -end; - -function TcxPCTabsPainter.GetMinFrameRectSize: Integer; -begin - if ParentInfo.IsTabsContainer then - Result := TabsContainerBaseWidth + GetFrameWidth - else - Result := inherited GetMinFrameRectSize; -end; - -procedure TcxPCTabsPainter.GetTabCornersColor(ATabVisibleIndex: Integer; - out AColor1, AColor2: TColor); -var - ALineIndexBoundsA: TcxPCLineIndexBoundsArray; - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if (ATab.VisibleRow = 0) and (ParentInfo.TopOrLeftPartRowCount > 0) or - (ATab.VisibleRow = ParentInfo.RowCount - 1) and (ParentInfo.TopOrLeftPartRowCount <> ParentInfo.RowCount) then - begin - AColor1 := ParentInfo.Color; - AColor2 := AColor1; - end - else - begin - AColor1 := clBtnFace; - AColor2 := AColor1; - if ATab.IsMainTab and not ParentInfo.Rotate then - begin - InitializeLineBoundsArray(ParentControl, ALineIndexBoundsA); - if ALineIndexBoundsA[ATab.VisibleRow].Left = ATabVisibleIndex then - AColor1 := ParentInfo.Color; - if ALineIndexBoundsA[ATab.VisibleRow].Right = ATabVisibleIndex then - AColor2 := ParentInfo.Color; - end; - end; -end; - -procedure TcxPCTabsPainter.PaintTabCorners(ATabVisibleIndex: Integer); -var - AColor1, AColor2: TColor; - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - - GetTabCornersColor(ATabVisibleIndex, AColor1, AColor2); - if (ATab.PaintingPosition in [tpLeft, tpRight]) and - (GetTextRotationAngle(ParentControl) <> raMinus90) then - ExchangeLongWords(AColor1, AColor2); - - with ATab.FullRect do - case ATab.PaintingPosition of - tpTop: - begin - InternalPolyLine([Point(Left, Top + 1), Point(Left, Top), Point(Left + 1, Top)], AColor1); - InternalPolyLine([Point(Right - 2, Top), Point(Right - 1, Top), Point(Right - 1, Top + 1)], AColor2); - end; - tpBottom: - begin - InternalPolyLine([Point(Left, Bottom - 2), Point(Left, Bottom - 1), Point(Left + 1, Bottom - 1)], AColor1); - InternalPolyLine([Point(Right - 2, Bottom - 1), Point(Right - 1, Bottom - 1), Point(Right - 1, Bottom - 2)], AColor2); - end; - tpLeft: - begin - InternalPolyLine([Point(Left, Top + 1), Point(Left, Top), Point(Left + 1, Top)], AColor1); - InternalPolyLine([Point(Left, Bottom - 2), Point(Left, Bottom - 1), Point(Left + 1, Bottom - 1)], AColor2); - end; - tpRight: - begin - InternalPolyLine([Point(Right - 2, Top), Point(Right - 1, Top), Point(Right - 1, Top + 1)], AColor1); - InternalPolyLine([Point(Right - 2, Bottom - 1), Point(Right - 1, Bottom - 1), Point(Right - 1, Bottom - 2)], AColor2); - end; - end; -end; - -procedure TcxPCTabsPainter.PaintTabFrame(ATabVisibleIndex: Integer); -var - ATabUnderlineColor: TColor; - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if ParentInfo.IsTabsContainer then - ATabUnderlineColor := clBtnFace - else - ATabUnderlineColor := GetTabBodyColor(ATabVisibleIndex); - with ATab.FullRect do - case ATab.PaintingPosition of - tpTop: - begin - InternalPolyLine([Point(Left, Bottom - 1), Point(Left, Top + 2), Point(Left + 2, Top), Point(Right - 3, Top)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Left + 1, Bottom - 1), Point(Left + 1, Top + 2), Point(Left + 2, Top + 1), Point(Right - 3, Top + 1)], cxPCLightEdgeColor); - InternalPolyLine([Point(Right - 1, Bottom - 1), Point(Right - 1, Top + 2), Point(Right - 2, Top + 1)], cxPCDarkestEdgeColor); - InternalPolyLine([Point(Right - 2, Bottom - 1), Point(Right - 2, Top + 2)], cxPCDarkEdgeColor); - - if ATab.IsMainTab then - begin - if Left = 0 then - begin - InternalPolyLine([Point(Left, Bottom), Point(Left, Bottom)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Left + 1, Bottom), Point(Left + 1, Bottom)], cxPCLightEdgeColor); - end - else - InternalPolyLine([Point(Left, Bottom), Point(Left + 1, Bottom)], cxPCLightEdgeColor); - if Right = ParentInfo.Width then - begin - InternalPolyLine([Point(Left + 2, Bottom), Point(Right - 3, Bottom)], ATabUnderlineColor); - InternalPolyLine([Point(Right - 2, Bottom), Point(Right - 2, Bottom)], cxPCDarkEdgeColor); - InternalPolyLine([Point(Right - 1, Bottom), Point(Right - 1, Bottom)], cxPCDarkestEdgeColor); - end - else - InternalPolyLine([Point(Left + 2, Bottom), Point(Right - 1, Bottom)], ATabUnderlineColor); - end; - end; - tpBottom: - begin - InternalPolyLine([Point(Left, Top), Point(Left, Bottom - 3), Point(Left + 1, Bottom - 2)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Left + 1, Top), Point(Left + 1, Bottom - 3)], cxPCLightEdgeColor); - InternalPolyLine([Point(Left + 2, Bottom - 1), Point(Right - 3, Bottom - 1), Point(Right - 1, Bottom - 3), Point(Right - 1, Top)], cxPCDarkestEdgeColor); - InternalPolyLine([Point(Left + 2, Bottom - 2), Point(Right - 3, Bottom - 2), Point(Right - 2, Bottom - 3), Point(Right - 2, Top)], cxPCDarkEdgeColor); - - if ATab.IsMainTab then - begin - if Left = 0 then - begin - InternalPolyLine([Point(Left, Top - 1), Point(Left, Top - 1)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Left + 1, Top - 1), Point(Left + 1, Top - 1)], cxPCLightEdgeColor); - InternalPolyLine([Point(Left + 2, Top - 1), Point(Right - 3, Top - 1)], ATabUnderlineColor); - end - else - InternalPolyLine([Point(Left, Top - 1), Point(Right - 3, Top - 1)], ATabUnderlineColor); - if Right = ParentInfo.Width then - begin - InternalPolyLine([Point(Right - 2, Top - 1), Point(Right - 2, Top - 1)], cxPCDarkEdgeColor); - InternalPolyLine([Point(Right - 1, Top - 1), Point(Right - 1, Top - 1)], cxPCDarkestEdgeColor); - end - else - InternalPolyLine([Point(Right - 2, Top - 1), Point(Right - 1, Top - 1)], cxPCDarkEdgeColor); - end; - end; - tpLeft: - begin - InternalPolyLine([Point(Left, Bottom - 3), Point(Left, Top + 2), Point(Left + 2, Top), Point(Right - 1, Top)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Left + 1, Bottom - 3), Point(Left + 1, Top + 2), Point(Left + 2, Top + 1), Point(Right - 1, Top + 1)], cxPCLightEdgeColor); - InternalPolyLine([Point(Left + 2, Bottom - 2), Point(Left + 3, Bottom - 1), Point(Right - 1, Bottom - 1)], cxPCDarkestEdgeColor); - InternalPolyLine([Point(Left + 1, Bottom - 2), Point(Left + 2, Bottom - 1), Point(Left + 3, Bottom - 2), Point(Right - 1, Bottom - 2)], cxPCDarkEdgeColor); - - if ATab.IsMainTab then - begin - if Top = 0 then - begin - InternalPolyLine([Point(Right, Top), Point(Right, Top)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Right, Top + 1), Point(Right, Top + 1)], cxPCLightEdgeColor); - end - else - InternalPolyLine([Point(Right, Top), Point(Right, Top + 1)], cxPCLightEdgeColor); - if Bottom = ParentInfo.Height then - begin - InternalPolyLine([Point(Right, Top + 2), Point(Right, Bottom - 3)], ATabUnderlineColor); - InternalPolyLine([Point(Right, Bottom - 2), Point(Right, Bottom - 2)], cxPCDarkEdgeColor); - InternalPolyLine([Point(Right, Bottom - 1), Point(Right, Bottom - 1)], cxPCDarkestEdgeColor); - end - else - InternalPolyLine([Point(Right, Top + 2), Point(Right, Bottom - 1)], ATabUnderlineColor); - end; - end; - tpRight: - begin - InternalPolyLine([Point(Left, Top), Point(Right - 3, Top), Point(Right - 2, Top + 1)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Left, Top + 1), Point(Right - 3, Top + 1)], cxPCLightEdgeColor); - InternalPolyLine([Point(Left, Bottom - 1), Point(Right - 3, Bottom - 1), Point(Right - 1, Bottom - 3), Point(Right - 1, Top + 2)], cxPCDarkestEdgeColor); - InternalPolyLine([Point(Left, Bottom - 2), Point(Right - 3, Bottom - 2), Point(Right - 2, Bottom - 3), Point(Right - 2, Top + 2)], cxPCDarkEdgeColor); - - if ATab.IsMainTab then - begin - if Top = 0 then - begin - InternalPolyLine([Point(Left - 1, Top), Point(Left - 1, Top)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Left - 1, Top + 1), Point(Left - 1, Top + 1)], cxPCLightEdgeColor); - InternalPolyLine([Point(Left - 1, Top + 2), Point(Left - 1, Bottom - 3)], ATabUnderlineColor); - end - else - InternalPolyLine([Point(Left - 1, Top), Point(Left - 1, Bottom - 3)], ATabUnderlineColor); - if Bottom = ParentInfo.Height then - begin - InternalPolyLine([Point(Left - 1, Bottom - 2), Point(Left - 1, Bottom - 2)], cxPCDarkEdgeColor); - InternalPolyLine([Point(Left - 1, Bottom - 1), Point(Left - 1, Bottom - 1)], cxPCDarkestEdgeColor); - end - else - InternalPolyLine([Point(Left - 1, Bottom - 2), Point(Left - 1, Bottom - 1)], cxPCDarkEdgeColor); - end; - end; - end; - PaintTabCorners(ATabVisibleIndex); -end; - -procedure TcxPCTabsPainter.InternalPaintFrame(ACanvas: TCanvas); -var - ARect, R: TRect; - ATheme: TdxTheme; -begin - ARect := GetDisplayRect; - if IsRectEmpty(ARect) then - Exit; - ATheme := OpenTheme(totTab); - R := GetNativeContentOffset; - if ARect.Right - ARect.Left < R.Left + R.Right then - ARect.Right := ARect.Left + R.Left + R.Right; - if ARect.Bottom - ARect.Top < R.Top + R.Bottom then - ARect.Bottom := ARect.Top + R.Top + R.Bottom; - with ACanvas do - begin - if (ACanvas.Handle = ParentInfo.Canvas.Handle) and - IsThemeBackgroundPartiallyTransparent(ATheme, TABP_PANE, 0) and ParentControl.ParentBackground then - cxDrawThemeParentBackground(ParentControl, ACanvas, ARect) - else - begin - Brush.Color := ParentInfo.Color; - FillRect(ARect); - end; - DrawThemeBackground(ATheme, Handle, TABP_PANE, 0, ARect); - if ACanvas.Handle = ParentInfo.Canvas.Handle then - with ARect do - Windows.ExcludeClipRect(Handle, Left, Top, Right, Bottom); - end; -end; - -{ TcxPCFlatButtonsPainter } - -class function TcxPCFlatButtonsPainter.GetStandardStyle: TcxPCStandardStyle; -begin - Result := tsFlatButtons; -end; - -class function TcxPCFlatButtonsPainter.GetStyleID: TcxPCStyleID; -begin - Result := cxPCFlatButtonsStyle; -end; - -class function TcxPCFlatButtonsPainter.GetStyleName: TCaption; -begin - Result := 'FlatButtons'; -end; - -class function TcxPCFlatButtonsPainter.HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := False; -end; - -procedure TcxPCFlatButtonsPainter.PaintTab(TabVisibleIndex: Integer); -var - Tab: TcxTab; - - procedure InternalPaintTabsDelimiter; - - function IsDelimiterNeeded: Boolean; - var - FirstIndex, LastIndex, I: Integer; - NextRow: Integer; - IsY: Boolean; - c: Integer; // coordinate - begin - Result := False; - InitializeVisibleTabRange(ParentControl, FirstIndex, LastIndex); - - with ParentInfo do - if Rotate then - begin - if (RowCount = 1) or (Tab.VisibleRow = RowCount - 1) then Exit; - NextRow := Tab.VisibleRow + 1; - IsY := TabPosition in [tpLeft, tpRight]; - c := PointGetter(Tab.FullRect.TopLeft, IsY); - for I := FirstIndex to LastIndex do - with VisibleTabs[I] do - if (VisibleRow = NextRow) and (PointGetter(FullRect.TopLeft, IsY) = c) then - begin - Result := True; - Break; - end; - end else - if (TabVisibleIndex < LastIndex) and - (VisibleTabs[TabVisibleIndex + 1].VisibleRow = Tab.VisibleRow) then - Result := True; - end; - - const - DelimiterWidth = 2; - var - R: TRect; - TabsDistance: Integer; - DelimiterLeftBorder, DelimiterTopBorder: Integer; - DelimiterRect: TRect; - begin - if not IsDelimiterNeeded then Exit; - R := Tab.FullRect; - TabsDistance := StandardPainterTabsNormalDistanceA[GetStandardStyle].dw; - - with R do - if IsVerticalText(ParentControl) then - begin - if IsBottomToTopAlignment(ParentControl) then - begin - Bottom := Top; - Top := Bottom - TabsDistance; - end else - begin - Top := Bottom; - Bottom := Top + TabsDistance; - end; - if not InternalSetClipRect(R) then Exit; - DelimiterTopBorder := Top + (TabsDistance - DelimiterWidth) div 2; - InternalPolyLine([Point(Left + 1, DelimiterTopBorder), Point(Right - 2, DelimiterTopBorder)], cxPCDarkEdgeColor); - InternalPolyLine([Point(Left + 1, DelimiterTopBorder + 1), Point(Right - 2, DelimiterTopBorder + 1)], cxPCLightestEdgeColor); - DelimiterRect := Rect(Left + 1, DelimiterTopBorder, Right - 1, DelimiterTopBorder + 2); - end else - begin - if IsRightToLeftAlignment(ParentControl) then - begin - Right := Left; - Left := Right - TabsDistance; - end else - begin - Left := Right; - Right := Left + TabsDistance; - end; - if not InternalSetClipRect(R) then Exit; - DelimiterLeftBorder := Left + (TabsDistance - DelimiterWidth) div 2; - InternalPolyLine([Point(DelimiterLeftBorder, Top + 1), Point(DelimiterLeftBorder, Bottom - 2)], cxPCDarkEdgeColor); - InternalPolyLine([Point(DelimiterLeftBorder + 1, Top + 1), Point(DelimiterLeftBorder + 1, Bottom - 2)], cxPCLightestEdgeColor); - DelimiterRect := Rect(DelimiterLeftBorder, Top + 1, DelimiterLeftBorder + 2, Bottom - 1); - end; - with ParentInfo.Canvas do - begin - SaveClipRgn; - ExcludeClipRect(DelimiterRect); - Brush.Style := bsSolid; - Brush.Color := ParentInfo.Color; - FillRect(R); - RestoreClipRgn; - end; - - InternalResetClipRegion; - ParentInfo.Canvas.ExcludeClipRect(R); - end; - -begin - inherited PaintTab(TabVisibleIndex); - Tab := ParentInfo.VisibleTabs[TabVisibleIndex]; - InternalPaintTabsDelimiter; -end; - -procedure TcxPCFlatButtonsPainter.PaintTabShape(ATab: TcxTab; ATabVisibleIndex: Integer); -var - FullRect: TRect; - TabBodyColor: TColor; -begin - TabBodyColor := GetTabBodyColor(ATabVisibleIndex); - FullRect := ATab.FullRect; - with ParentInfo.Canvas, FullRect do - begin - if (not ATab.Tracking) and (ATab.Pressed or ATab.Selected or ATab.IsMainTab) then - begin - InternalDrawEdge(FullRect, True); - InflateRect(FullRect, -StandardPainterTabBorderWidth, -StandardPainterTabBorderWidth); - end - else if ATab.HotTrack or ATab.Tracking then - begin - InternalPolyLine([Point(Left, Bottom - 2), Point(Left, Top), Point(Right - 2, Top)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Left, Bottom - 1), Point(Right - 1, Bottom - 1), Point(Right - 1, Top)], cxPCDarkEdgeColor); - InflateRect(FullRect, -1, -1); - end; - - Brush.Color := TabBodyColor; - FillRect(FullRect); - - InflateRect(FullRect, 1, 1); - InternalDrawFocusRect(ATabVisibleIndex, FullRect); - end; -end; - -{ TcxPCStandardPainter } - -procedure TcxPCStandardPainter.CalculateButtonContentParameters( - AButton: TcxPCNavigatorButton; out AParameters: TcxPCNavigatorButtonContentParameters); -var - AButtonState: TcxPCNavigatorButtonState; -begin - AButtonState := ParentInfo.NavigatorButtonsState[AButton]; - AParameters.BrushColor := GetButtonContentColor(AButtonState); - AParameters.Color := AParameters.BrushColor; - AParameters.Enabled := ParentControl.Enabled and (AButtonState <> nbsDisabled); - AParameters.LiteStyle := False; -end; - -procedure TcxPCStandardPainter.CalculateButtonsRect(NavigatorButtons: TcxPCNavigatorButtons); -var - AButtonHeight, AButtonsWidth: Integer; -begin - AButtonHeight := GetButtonHeight; - AButtonsWidth := GetButtonsWidth(NavigatorButtons); - with FButtonsRect do - if ParentInfo.TabPosition in [tpTop, tpBottom] then - begin - if ParentInfo.NavigatorPosition in [npLeftTop, npLeftBottom] then - Left := GetButtonsRegionWOffset - else - Left := ParentInfo.Width - AButtonsWidth - GetButtonsRegionWOffset; - if ParentInfo.TabPosition = tpTop then - Top := GetButtonsRegionHOffset - else - Top := ParentInfo.Height - AButtonHeight - GetButtonsRegionHOffset; - Right := Left + AButtonsWidth; - Bottom := Top + AButtonHeight; - end - else - begin - if ParentInfo.TabPosition = tpLeft then - Left := GetButtonsRegionHOffset - else - Left := ParentInfo.Width - AButtonHeight - GetButtonsRegionHOffset; - if ParentInfo.NavigatorPosition in [npLeftTop, npRightTop] then - Top := GetButtonsRegionWOffset - else - Top := ParentInfo.Height - AButtonsWidth - GetButtonsRegionWOffset; - Right := Left + AButtonHeight; - Bottom := Top + AButtonsWidth; - end; -end; - -procedure TcxPCStandardPainter.CalculateButtonsRegion(NavigatorButtons: TcxPCNavigatorButtons); -var - ButtonLeftTopCorner: TPoint; - IsY: Boolean; - ButtonIndex: Integer; - Button: TcxPCNavigatorButton; -begin - if NavigatorButtons = [] then - begin - SetLength(FButtonsQueue, 0); - Exit; - end; - CalculateButtonsRect(NavigatorButtons); - GetButtonsOrder(NavigatorButtons, FButtonsQueue); - ButtonLeftTopCorner := FButtonsRect.TopLeft; - IsY := ParentInfo.TabPosition in [tpLeft, tpRight]; - for ButtonIndex := 0 to High(FButtonsQueue) do - begin - Button := FButtonsQueue[ButtonIndex].Button; - with ButtonLeftTopCorner, FButtonsQueue[ButtonIndex].ButtonRect do - begin - TopLeft := ButtonLeftTopCorner; - if IsY then - begin - Bottom := Top + GetButtonWidth(Button); - Right := Left + GetButtonHeight; - if ButtonIndex < High(FButtonsQueue) then - Y := Bottom + GetButtonsDistance(Button, FButtonsQueue[ButtonIndex + 1].Button); - end else - begin - Right := Left + GetButtonWidth(Button); - Bottom := Top + GetButtonHeight; - if ButtonIndex < High(FButtonsQueue) then - X := Right + GetButtonsDistance(Button, FButtonsQueue[ButtonIndex + 1].Button); - end; - end; - end; -end; - -function TcxPCStandardPainter.CalculateButtonsRegionWidth( - NavigatorButtons: TcxPCNavigatorButtons): Integer; -begin - Result := GetButtonsWidth(NavigatorButtons); - if Result > 0 then - begin - Inc(Result, GetButtonsRegionWOffset); - Inc(Result, GetButtonsRegionFromTabsOffset); - end; -end; - -procedure TcxPCStandardPainter.CorrectTabHeightForImage(var AHeight: Integer); -var - ATabImageHeight: Integer; -begin - ATabImageHeight := GetTabBaseImageSize.cy; - if ParentInfo.Rotate and (ATabImageHeight > 0) and Odd(AHeight - ATabImageHeight) then - Inc(AHeight); -end; - -function TcxPCStandardPainter.CalculateTabNormalWidth(Tab: TcxTab): Integer; -begin - with ParentInfo do - if TabWidth > 0 then - Result := TabWidth - else - begin - Result := GetTabNormalWidth(Tab.VisibleIndex); - if Tab.Caption <> '' then - Inc(Result, TextSize(Tab, Tab.Caption).cx); - if Result < GetMinTabNormalWidth(Tab.VisibleIndex) then - Result := GetMinTabNormalWidth(Tab.VisibleIndex); - end; -end; - -constructor TcxPCStandardPainter.Create(AParent: TcxCustomTabControl); -begin - inherited Create(AParent); - FButtonsQueue := nil; -end; - -destructor TcxPCStandardPainter.Destroy; -begin - FButtonsQueue := nil; - inherited Destroy; -end; - -function TcxPCStandardPainter.CalculateTabNormalHeight: Integer; -var - DefaultTabNormalHeight: Integer; -begin - with ParentInfo do - begin - Result := InternalCalculateTabNormalHeight; - - DefaultTabNormalHeight := GetDefaultTabNormalHeight; - if Result < DefaultTabNormalHeight then - Result := DefaultTabNormalHeight; - - CorrectTabHeightForImage(Result); - - if TabHeight > Result then - Result := TabHeight; - end; -end; - -function TcxPCStandardPainter.GetGoDialogButtonBounds: TRect; -var - AButtonIndex: Integer; -begin - Result := cxEmptyRect; - for AButtonIndex := 0 to High(FButtonsQueue) do - with FButtonsQueue[AButtonIndex] do - if Button = nbGoDialog then - begin - Result := ButtonRect; - Break; - end; -end; - -function TcxPCStandardPainter.GetDefaultTabNormalHeight: Integer; -begin - Result := StandardPainterDefaultTabNormalHeightA[GetStandardStyle]; -end; - -function TcxPCStandardPainter.GetDefaultTabNormalHTextOffset: Integer; -begin - Result := StandardPainterDefaultTabNormalHTextOffsetA[GetStandardStyle]; -end; - -function TcxPCStandardPainter.GetDefaultTabNormalWidth: Integer; -begin - Result := 42; -end; - -function TcxPCStandardPainter.GetFrameRect: TRect; -var - AMinFrameRectSize: Integer; -begin - AMinFrameRectSize := GetMinFrameRectSize; - Result := GetDisplayRect; - if cxRectWidth(Result) < AMinFrameRectSize then - Result.Right := Result.Left + AMinFrameRectSize; - if cxRectHeight(Result) < AMinFrameRectSize then - Result.Bottom := Result.Top + AMinFrameRectSize; -end; - -function TcxPCStandardPainter.GetFreeSpaceColor: TColor; -begin - Result := ParentInfo.Color; -end; - -function TcxPCStandardPainter.GetMinFrameRectSize: Integer; -begin - Result := GetFrameWidth * 2; -end; - -function TcxPCStandardPainter.GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; -begin - Result := StandardPainterTabContentWOffsetA[IsTabBorderThick(ATabVisibleIndex), - GetStandardStyle]; -end; - -function TcxPCStandardPainter.GetDrawImageOffset(TabVisibleIndex: Integer): TRect; -begin - Result := StandardPainterDrawImageOffsetA[IsTabBorderThick(TabVisibleIndex), - GetStandardStyle]; -end; - -function TcxPCStandardPainter.GetDrawImageWithoutTextWOffset( - TabVisibleIndex: Integer): TcxPCWOffset; -begin - Result := cxPCEmptyWOffset; -end; - -function TcxPCStandardPainter.GetDrawTextHOffset(TabVisibleIndex: Integer): TRect; -begin - Result := StandardPainterDrawTextHOffsetA[IsTabBorderThick(TabVisibleIndex), - GetStandardStyle]; -end; - -function TcxPCStandardPainter.GetFrameWidth: Integer; -begin - Result := StandardPainterTabControlFrameBorderWidth; -end; - -function TcxPCStandardPainter.GetGoDialogPosition(GoDialogSize: TSize): TPoint; -const - GoDialogPositionA: array[TcxTabPosition, TcxPCNavigatorPosition] of TcxPCNavigatorPosition = ( - (npLeftTop, npLeftTop, npRightTop, npRightTop), - (npLeftBottom, npLeftBottom, npRightBottom, npRightBottom), - (npLeftTop, npLeftBottom, npLeftTop, npLeftBottom), - (npRightTop, npRightBottom, npRightTop, npRightBottom) - ); -var - ButtonIndex: Integer; - GoDialogPosition: TcxPCNavigatorPosition; -begin - for ButtonIndex := 0 to High(FButtonsQueue) do - with ParentInfo, FButtonsQueue[ButtonIndex] do - if Button = nbGoDialog then - begin - GoDialogPosition := GoDialogPositionA[TabPosition, NavigatorPosition]; - if GoDialogPosition in [npLeftTop, npLeftBottom] then - Result.X := ButtonRect.Left - else - Result.X := ButtonRect.Right - GoDialogSize.cx; - if GoDialogPosition in [npLeftTop, npRightTop] then - Result.Y := ButtonRect.Bottom - else - Result.Y := ButtonRect.Top - GoDialogSize.cy; - Exit; - end; -end; - -function TcxPCStandardPainter.GetImageTextDistance(ATabVisibleIndex: Integer): Integer; -//var -// ACorrection: Integer; -// ATabContentWOffset: TcxPCWOffset; -begin - Result := 6; -// if ParentInfo.Rotate and (ParentInfo.VisibleTabs[ATabVisibleIndex].Caption <> '') then -// begin -// ATabContentWOffset := ButtonsPainterTabContentWOffsetA[GetTabBaseImageSize.cx > 0]; -// ACorrection := 12 - ATabContentWOffset.Left - ATabContentWOffset.Right; -// Inc(Result, ACorrection - ACorrection div 2); -// end; -end; - -function TcxPCStandardPainter.GetMinTabNormalWidth(ATabVisibleIndex: Integer): Integer; -begin - Result := GetTabNormalWidth(ATabVisibleIndex); - if Result < GetDefaultTabNormalWidth then - Result := GetDefaultTabNormalWidth; -end; - -function TcxPCStandardPainter.GetMinTabSelectionDistance: TcxPCDistance; -begin - Result := MinTabSelectionDistance; -end; - -function TcxPCStandardPainter.GetTabsNormalDistance: TcxPCDistance; -begin - Result := StandardPainterTabsNormalDistanceA[GetStandardStyle]; -end; - -function TcxPCStandardPainter.GetTabBorderWidth(Tab: TcxTab): Integer; -begin - Result := StandardPainterMaxTabBorderWidth; -end; - -function TcxPCStandardPainter.GetTabNormalWidth(ATabVisibleIndex: Integer): Integer; -begin - if IsAssignedImages and ((ATabVisibleIndex = -1) or IsTabHasImage(ATabVisibleIndex) or ParentInfo.Rotate) then - Result := GetTabBaseImageSize.cx + 2 * ParentInfo.ImageBorder + 6 - else - Result := 0; - Inc(Result, 12); -end; - -function TcxPCStandardPainter.GetTabsRectOffset: TRect; -begin - Result := cxEmptyRect; -end; - -function TcxPCStandardPainter.GetTabsPosition( - NavigatorButtons: TcxPCNavigatorButtons): TcxPCTabsPosition; -var - AButtonsWidth: Integer; - ATabsContainerOffset: TRect; -begin - AButtonsWidth := CalculateButtonsRegionWidth(NavigatorButtons); - ATabsContainerOffset := cxEmptyRect; - if ParentInfo.IsTabsContainer then - ATabsContainerOffset := GetTabsContainerOffsets; - - with ParentInfo, Result do - begin - Result.ExtendedTabsRect := GetControlRect(ParentControl); - ExtendRect(ExtendedTabsRect, GetTabsRectOffset); - - if NavigatorButtons <> [] then - begin - ExtendRect(ExtendedTabsRect, RotateRect(Rect(0, ATabsContainerOffset.Top, 0, 0), ParentInfo.TabPosition)); - ATabsContainerOffset := RotateRect(ATabsContainerOffset, ParentInfo.TabPosition); - if TabPosition in [tpTop, tpBottom] then - begin - if NavigatorPosition in [npLeftTop, npLeftBottom] then - begin - Inc(ExtendedTabsRect.Left, AButtonsWidth); - Dec(ExtendedTabsRect.Right, ATabsContainerOffset.Right); - end - else - begin - Dec(ExtendedTabsRect.Right, AButtonsWidth); - Inc(ExtendedTabsRect.Left, ATabsContainerOffset.Left); - end; - end - else - begin - if NavigatorPosition in [npLeftTop, npRightTop] then - begin - Inc(ExtendedTabsRect.Top, AButtonsWidth); - Dec(ExtendedTabsRect.Bottom, ATabsContainerOffset.Bottom); - end - else - begin - Dec(ExtendedTabsRect.Bottom, AButtonsWidth); - Inc(ExtendedTabsRect.Top, ATabsContainerOffset.Top); - end; - end; - end - else - ExtendRect(ExtendedTabsRect, RotateRect(ATabsContainerOffset, ParentInfo.TabPosition)); - if TabPosition in [tpTop, tpBottom] then - NormalRowWidth := (ExtendedTabsRect.Right - ExtendedTabsRect.Left) - else - NormalRowWidth := (ExtendedTabsRect.Bottom - ExtendedTabsRect.Top); - - NormalTabsRect := ExtendedTabsRect; - - ExtendedTopOrLeftTabsRectBottomOrRightBorderOffset := 0; - ExtendedBottomOrRightTabsRectTopOrLeftBorderOffset := 0; - - MinDistanceBetweenTopOrLeftAndBottomOrRightExtendedTabsRects := - GetTabsNormalDistance.dh; - end; - - CalculateButtonsRegion(NavigatorButtons); -end; - -function TcxPCStandardPainter.GetTooNarrowTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; -begin - Result := StandardPainterTooNarrowTabContentWOffsetA[ - IsTabBorderThick(ATabVisibleIndex), GetStandardStyle]; -end; - -procedure TcxPCStandardPainter.InternalPrepareOutTabImageAndTextData( - ATabVisibleIndex: Integer; var AImageRect, ATextRect: TRect); -begin - FOutTabImageAndTextData.TabImageRect := AImageRect; - FOutTabImageAndTextData.TabTextRect := ATextRect; -end; - -function TcxPCStandardPainter.InternalCalculateTabNormalHeight: Integer; -begin - if IsAssignedImages then - Result := GetTabBaseImageSize.cy + 2 * ParentInfo.ImageBorder + 6 - else - Result := 0; - if Result < GetMaxTabCaptionHeight + 8 then - Result := GetMaxTabCaptionHeight + 8; -end; - -procedure TcxPCStandardPainter.InternalDrawEdge(const Rect: TRect; - Sunken: Boolean; ThinFrame: Boolean = False); -const - ThickFrameLineColorA: array [Boolean, 1 .. 4] of TColor = ( - (cxPCLightEdgeColor, cxPCLightestEdgeColor, cxPCDarkestEdgeColor, cxPCDarkEdgeColor), - (cxPCDarkEdgeColor, cxPCDarkestEdgeColor, cxPCLightestEdgeColor, cxPCLightEdgeColor) - ); - ThinFrameLineColorA: array [Boolean, 1 .. 2] of TColor = ( - (cxPCLightEdgeColor, cxPCDarkestEdgeColor), - (cxPCDarkestEdgeColor, cxPCLightEdgeColor) - ); -begin - with Rect do - if ThinFrame then - begin - InternalPolyLine([Point(Left, Bottom - 2), Point(Left, Top), Point(Right - 2, Top)], ThinFrameLineColorA[Sunken, 1]); - InternalPolyLine([Point(Left, Bottom - 1), Point(Right - 1, Bottom - 1), Point(Right - 1, Top)], ThinFrameLineColorA[Sunken, 2]); - end else - begin - InternalPolyLine([Point(Left, Bottom - 2), Point(Left, Top), Point(Right - 2, Top)], ThickFrameLineColorA[Sunken, 1]); - InternalPolyLine([Point(Left + 1, Bottom - 3), Point(Left + 1, Top + 1), Point(Right - 3, Top + 1)], ThickFrameLineColorA[Sunken, 2]); - InternalPolyLine([Point(Left, Bottom - 1), Point(Right - 1, Bottom - 1), Point(Right - 1, Top)], ThickFrameLineColorA[Sunken, 3]); - InternalPolyLine([Point(Left + 1, Bottom - 2), Point(Right - 2, Bottom - 2), Point(Right - 2, Top + 1)], ThickFrameLineColorA[Sunken, 4]); - end; -end; - -procedure TcxPCStandardPainter.InternalDrawFocusRect(TabVisibleIndex: Integer; R: TRect); -var - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[TabVisibleIndex]; - if ATab.RealEnabled and ATab.IsMainTab and ParentControl.Focused then - if InternalSetClipRect(ATab.VisibleRect, False) then - begin - with ParentInfo.Canvas do - begin - InflateRect(R, -1, -1); - Pen.Color := ParentInfo.Font.Color; // DrawTabEx - DrawFocusRect(R); - end; - InternalResetClipRegion; - end; -end; - -procedure TcxPCStandardPainter.PaintButton(Button: TcxPCNavigatorButton; - const ButtonRect: TRect); -var - AButtonState: TcxPCNavigatorButtonState; - AContentLeftTopCorner: TPoint; - AContentParameters: TcxPCNavigatorButtonContentParameters; - R: TRect; -begin - AButtonState := ParentInfo.NavigatorButtonsState[Button]; - R := ButtonRect; - PaintButtonFrame(R, AButtonState); - PaintButtonBackground(R, AButtonState); - - CalculateButtonContentParameters(Button, AContentParameters); - AContentLeftTopCorner := GetButtonContentPosition(Button); - with ButtonRect.TopLeft do - begin - Inc(AContentLeftTopCorner.X, X); - Inc(AContentLeftTopCorner.Y, Y); - end; - - DrawButtonContent(Button, AContentParameters, AContentLeftTopCorner); -end; - -procedure TcxPCStandardPainter.PaintButtonBackground(AButtonRect: TRect; - AButtonState: TcxPCNavigatorButtonState); -begin - ParentInfo.Canvas.Brush.Color := GetButtonColor(AButtonState); - ParentInfo.Canvas.FillRect(AButtonRect); -end; - -procedure TcxPCStandardPainter.PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); -begin - InternalDrawEdge(ARect, AButtonState = nbsPressed); - InflateRect(ARect, -2, -2); -end; - -procedure TcxPCStandardPainter.PaintFrame; -begin - PaintFrameBorder(GetFrameRect); -end; - -procedure TcxPCStandardPainter.PaintFrameBorder(R: TRect); -begin - ParentInfo.Canvas.DrawComplexFrame(R, cxPCLightestEdgeColor, cxPCDarkestEdgeColor); - InflateRect(R, -1, -1); - ParentInfo.Canvas.DrawComplexFrame(R, cxPCLightEdgeColor, cxPCDarkEdgeColor); -end; - -procedure TcxPCStandardPainter.PrepareTabBackground(ATab: TcxTab; ATabVisibleIndex: Integer); -begin -end; - -class function TcxPCStandardPainter.IsMainTabBoundWithClient: boolean; -const - IsMainTabBoundWithClientA: array [TcxPCStandardStyle] of boolean = (True, False, False); -begin - Result := IsMainTabBoundWithClientA[GetStandardStyle]; -end; - -class function TcxPCStandardPainter.IsMultiSelectionAccepted: boolean; -const - IsMultiSelectionAcceptedA: array [TcxPCStandardStyle] of boolean = (False, True, True); -begin - Result := IsMultiSelectionAcceptedA[GetStandardStyle]; -end; - -class function TcxPCStandardPainter.IsStandardStyle: Boolean; -begin - Result := True; -end; - -function TcxPCStandardPainter.IsOverButton(X, Y: Integer; - var Button: TcxPCNavigatorButton): Boolean; -var - ButtonIndex: Integer; -begin - Result := False; - for ButtonIndex := 0 to High(FButtonsQueue) do - begin - Result := PtInRect(FButtonsQueue[ButtonIndex].ButtonRect, Point(X, Y)); - if Result then - begin - Button := FButtonsQueue[ButtonIndex].Button; - Break; - end; - end; -end; - -function TcxPCStandardPainter.IsTabBorderThick(ATabVisibleIndex: Integer): Boolean; -begin - Result := ParentInfo.VisibleTabs[ATabVisibleIndex].IsMainTab; -end; - -class function TcxPCStandardPainter.IsTabPressable: Boolean; -const - IsTabPressableA: array [TcxPCStandardStyle] of boolean = (False, True, - True); -begin - Result := IsTabPressableA[GetStandardStyle]; -end; - -procedure TcxPCStandardPainter.Paint; -var - R: TRect; -begin - inherited Paint; - R := GetControlRect(ParentControl); - if IsNativePainting and ParentControl.ParentBackground then - cxDrawTransparentControlBackground(ParentControl, ParentInfo.Canvas, R, False) - else - with ParentInfo.Canvas do - begin - Brush.Color := GetFreeSpaceColor; - Brush.Style := bsSolid; - FillRect(R); - end; -end; - -procedure TcxPCStandardPainter.PaintButtonsRegion; -var - AButtonIndex: Integer; -begin - if ParentInfo.NavigatorButtons = [] then - Exit; - for AButtonIndex := 0 to High(FButtonsQueue) do - with FButtonsQueue[AButtonIndex] do - if InternalSetClipRect(ButtonRect) then - begin - PaintButton(Button, ButtonRect); - InternalResetClipRegion; - ParentInfo.Canvas.ExcludeClipRect(ButtonRect); - end; -end; - -procedure TcxPCStandardPainter.PaintTabsRegion; -var - I: Integer; - FirstIndex, LastIndex: Integer; -begin - InitializeVisibleTabRange(ParentControl, FirstIndex, LastIndex); - for I := FirstIndex to LastIndex do - PaintTab(I); -end; - -procedure TcxPCStandardPainter.RepaintButton(Button: TcxPCNavigatorButton; - OldButtonState: TcxPCNavigatorButtonState); -var - ButtonIndex: Integer; -begin - for ButtonIndex := 0 to High(FButtonsQueue) do - if FButtonsQueue[ButtonIndex].Button = Button then - InternalInvalidateRect(FButtonsQueue[ButtonIndex].ButtonRect); -end; - -procedure TcxPCStandardPainter.RepaintButtonsRegion; -begin - if ParentInfo.NavigatorButtons = [] then Exit; - InternalInvalidateRect(FButtonsRect); -end; - -procedure TcxPCStandardPainter.RepaintTab(TabVisibleIndex: Integer; - TabPropertyChanged: TcxPCTabPropertyChanged); -begin - if IsVerticalText(ParentControl) then - ParentInfo.VisibleTabs[TabVisibleIndex].ResetVerticalTextBitmap; - InvalidateTabRect(TabVisibleIndex); -end; - -procedure TcxPCStandardPainter.GetButtonsOrder(ANavigatorButtons: TcxPCNavigatorButtons; - var AButtonPositions: TcxPCNavigatorButtonPositions); -type - TcxPCNavigatorButtonA = array of TcxPCNavigatorButton; - - procedure InternalGetButtonsOrder(out AButtonsOrder: TcxPCNavigatorButtonA); - var - AInverseOrder, AIsY: Boolean; - begin - SetLength(AButtonsOrder, Integer(High(TcxPCNavigatorButton)) - - Integer(Low(TcxPCNavigatorButton)) + 1); - AIsY := ParentInfo.TabPosition in [tpLeft, tpRight]; - AInverseOrder := (AIsY and (ParentInfo.NavigatorPosition in [npLeftTop, npRightTop])) or - (not AIsY and (ParentInfo.NavigatorPosition in [npLeftTop, npLeftBottom])); - if not AInverseOrder then - begin - AButtonsOrder[0] := nbGoDialog; - AButtonsOrder[1] := nbTopLeft; - AButtonsOrder[2] := nbBottomRight; - AButtonsOrder[3] := nbClose; - end - else - begin - AButtonsOrder[0] := nbClose; - AButtonsOrder[1] := nbTopLeft; - AButtonsOrder[2] := nbBottomRight; - AButtonsOrder[3] := nbGoDialog; - end; - end; - -var - AButtonPosition, I: Integer; - AButtonsOrder: TcxPCNavigatorButtonA; -begin - SetLength(AButtonPositions, GetButtonCount(ANavigatorButtons)); - InternalGetButtonsOrder(AButtonsOrder); - AButtonPosition := 0; - for I := 0 to High(AButtonsOrder) do - if AButtonsOrder[I] in ANavigatorButtons then - begin - AButtonPositions[AButtonPosition].Button := AButtonsOrder[I]; - Inc(AButtonPosition); - end; -end; - -function TcxPCStandardPainter.GetButtonHeight: Integer; -begin - Result := StandardPainterButtonHeight; -end; - -function TcxPCStandardPainter.GetButtonWidth( - Button: TcxPCNavigatorButton): Integer; -var - IsY: Boolean; -begin - IsY := ParentInfo.TabPosition in [tpLeft, tpRight]; - Result := StandardPainterButtonWidthA[IsY, Button]; -end; - -procedure TcxPCStandardPainter.DrawButtonContent(AButton: TcxPCNavigatorButton; - const AParameters: TcxPCNavigatorButtonContentParameters; - AContentRectLeftTopCorner: TPoint); -type - TArrowPointA = array [0 .. 2] of TPoint; - - procedure InternalDrawArrow(Points: TArrowPointA; LeftTopCorner: TPoint); - var - I: Integer; - begin - for I := 0 to 2 do - with Points[I] do - begin - Inc(X, LeftTopCorner.X); - Inc(Y, LeftTopCorner.Y); - end; - ParentInfo.Canvas.Polygon(Points); - end; - - procedure DrawArrow(const ALeftTopCorner: TPoint); - const - PolygonPointsMultipliersA: array[TcxPCArrow] of TArrowPointA = ( - ((X: 0; Y: 1), (X: 1; Y: 0), (X: 2; Y: 1)), - ((X: 0; Y: 0), (X: 2; Y: 0), (X: 1; Y: 1)), - ((X: 0; Y: 1), (X: 1; Y: 0), (X: 1; Y: 2)), - ((X: 0; Y: 0), (X: 1; Y: 1), (X: 0; Y: 2)) - ); - var - PolygonPoints: TArrowPointA; - ArrowUnit: Integer; - I: Integer; - begin - ArrowUnit := cxPCArrowSizeA[AButton] - 1; - PolygonPoints := PolygonPointsMultipliersA[GetButtonArrow(AButton)]; - for I := 0 to 2 do - with PolygonPoints[I] do - begin - X := X * ArrowUnit; - Y := Y * ArrowUnit; - end; - InternalDrawArrow(PolygonPoints, ALeftTopCorner); - end; - - procedure DrawCross(const ALeftTopCorner: TPoint); - begin - with ALeftTopCorner do - if AParameters.LiteStyle then - if ParentInfo.TabPosition in [tpTop, tpBottom] then - begin - InternalPolyLine([Point(X + 1, Y), Point(X + CloseButtonCrossSize - 2, Y + CloseButtonCrossSize - 3)], ParentInfo.Canvas.Pen.Color); - InternalPolyLine([Point(X, Y), Point(X + CloseButtonCrossSize - 3, Y + CloseButtonCrossSize - 3)], ParentInfo.Canvas.Pen.Color); - - InternalPolyLine([Point(X, Y + CloseButtonCrossSize - 3), Point(X + CloseButtonCrossSize - 3, Y)], ParentInfo.Canvas.Pen.Color); - InternalPolyLine([Point(X + 1, Y + CloseButtonCrossSize - 3), Point(X + CloseButtonCrossSize - 2, Y)], ParentInfo.Canvas.Pen.Color); - end - else - begin - InternalPolyLine([Point(X, Y), Point(X + CloseButtonCrossSize - 3, Y + CloseButtonCrossSize - 3)], ParentInfo.Canvas.Pen.Color); - InternalPolyLine([Point(X, Y + 1), Point(X + CloseButtonCrossSize - 3, Y + CloseButtonCrossSize - 2)], ParentInfo.Canvas.Pen.Color); - - InternalPolyLine([Point(X, Y + CloseButtonCrossSize - 3), Point(X + CloseButtonCrossSize - 3, Y)], ParentInfo.Canvas.Pen.Color); - InternalPolyLine([Point(X, Y + CloseButtonCrossSize - 2), Point(X + CloseButtonCrossSize - 3, Y + 1)], ParentInfo.Canvas.Pen.Color); - end - else - begin - InternalPolyLine([Point(X + 1, Y), Point(X + CloseButtonCrossSize - 1, Y + CloseButtonCrossSize - 2)], ParentInfo.Canvas.Pen.Color); - InternalPolyLine([Point(X, Y), Point(X + CloseButtonCrossSize - 1, Y + CloseButtonCrossSize - 1)], ParentInfo.Canvas.Pen.Color); - InternalPolyLine([Point(X, Y + 1), Point(X + CloseButtonCrossSize - 2, Y + CloseButtonCrossSize - 1)], ParentInfo.Canvas.Pen.Color); - - InternalPolyLine([Point(X, Y + CloseButtonCrossSize - 2), Point(X + CloseButtonCrossSize - 2, Y)], ParentInfo.Canvas.Pen.Color); - InternalPolyLine([Point(X, Y + CloseButtonCrossSize - 1), Point(X + CloseButtonCrossSize - 1, Y)], ParentInfo.Canvas.Pen.Color); - InternalPolyLine([Point(X + 1, Y + CloseButtonCrossSize - 1), Point(X + CloseButtonCrossSize - 1, Y + 1)], ParentInfo.Canvas.Pen.Color); - end; - end; - - procedure InternalDrawContent(const ALeftTopCorner: TPoint); - begin - if AButton = nbClose then - DrawCross(ALeftTopCorner) - else - DrawArrow(ALeftTopCorner); - end; - -begin - with ParentInfo.Canvas do - begin - if not AParameters.Enabled then - begin - Brush.Color := DisabledTextFaceColor; - Pen.Color := DisabledTextFaceColor; - with AContentRectLeftTopCorner do - InternalDrawContent(Point(X + 1, Y + 1)); - Brush.Color := DisabledTextShadowColor; - Pen.Color := DisabledTextShadowColor; - end else - begin - Brush.Color := AParameters.BrushColor; - Pen.Color := AParameters.Color; - end; - InternalDrawContent(AContentRectLeftTopCorner); - end; - ParentInfo.Canvas.Brush.Style := bsSolid; -end; - -function TcxPCStandardPainter.Get3DButtonContentPosition( - AButton: TcxPCNavigatorButton): TPoint; -const - AArrowButtonArrowRectLeftTopCorners: array [TcxPCArrow] of TPoint = ( - (X: 5; Y: 7), (X: 5; Y: 7), (X: 6; Y: 5), (X: 8; Y: 5) - ); - ACloseButtonCrossRectLeftTopCorner: TPoint = (X: 5; Y: 5); - AGoDialogArrowRectLeftTopCorners: array [Boolean] of TPoint = ( - (X: 2; Y: 8), // TabPosition in [tpTop, tpBottom] - (X: 6; Y: 4) - ); -begin - case AButton of - nbGoDialog: - Result := AGoDialogArrowRectLeftTopCorners[ParentInfo.TabPosition in [tpLeft, tpRight]]; - nbClose: - Result := ACloseButtonCrossRectLeftTopCorner; - else - Result := AArrowButtonArrowRectLeftTopCorners[GetButtonArrow(AButton)]; - end; - if ParentInfo.NavigatorButtonsState[AButton] = nbsPressed then - begin - Inc(Result.X); - Inc(Result.Y); - end; -end; - -function TcxPCStandardPainter.GetButtonArrow(AButton: TcxPCNavigatorButton): TcxPCArrow; -var - AIsY: Boolean; -begin - AIsY := ParentInfo.TabPosition in [tpLeft, tpRight]; - if AButton = nbGoDialog then - Result := aBottom - else - Result := cxPCArrowConvertionA[AButton, AIsY]; -end; - -function TcxPCStandardPainter.GetButtonCenteredContentPosition( - AButton: TcxPCNavigatorButton): TPoint; - - procedure RotateSize(var ASize: TSize); - begin - ASize := Size(ASize.cy, ASize.cx); - end; - - function GetContentSize: TSize; - var - AArrowSize: Integer; - begin - if AButton = nbClose then - begin - Result := Size(CloseButtonCrossSize - 1, CloseButtonCrossSize - 2); - if ParentInfo.TabPosition in [tpLeft, tpRight] then - RotateSize(Result); - end - else - begin - AArrowSize := cxPCArrowSizeA[AButton]; - Result := Size(AArrowSize, AArrowSize * 2 - 1); - if (AButton = nbGoDialog) or (AButton in [nbTopLeft, nbBottomRight]) and - (ParentInfo.TabPosition in [tpLeft, tpRight]) then - RotateSize(Result); - end; - end; - -var - AButtonSize, AContentSize: TSize; -begin - AContentSize := GetContentSize; - - AButtonSize := Size(GetButtonWidth(AButton), GetButtonHeight); - if ParentInfo.TabPosition in [tpLeft, tpRight] then - RotateSize(AButtonSize); - - Result.X := (AButtonSize.cx - AContentSize.cx) div 2; - Result.Y := (AButtonSize.cy - AContentSize.cy) div 2; - if AButton = nbGoDialog then - Inc(Result.Y); - if ParentInfo.NavigatorButtonsState[AButton] = nbsPressed then - begin - if AButton <> nbGoDialog then - Inc(Result.X); - Inc(Result.Y); - end; -end; - -function TcxPCStandardPainter.GetButtonColor( - AButtonState: TcxPCNavigatorButtonState): TColor; -begin - Result := cxPCTabBodyColor; -end; - -function TcxPCStandardPainter.GetButtonContentColor( - AButtonState: TcxPCNavigatorButtonState): TColor; -begin - if AButtonState = nbsHotTrack then - Result := GetHotTrackColor - else - Result := clBtnText; -end; - -function TcxPCStandardPainter.GetButtonContentPosition( - AButton: TcxPCNavigatorButton): TPoint; -begin - Result := GetButtonCenteredContentPosition(AButton); -end; - -procedure TcxPCStandardPainter.PaintTab(TabVisibleIndex: Integer); -var - AIsCustomDraw: Boolean; - ARegion: TcxRegion; - ARgnOperation: TcxRegionOperation; - ATab: TcxTab; -begin - ARegion := GetTabClipRgn(TabVisibleIndex); - ARgnOperation := GetTabClipRgnOperation(TabVisibleIndex); - try - SaveClipRgn; - try - ParentInfo.Canvas.SetClipRegion(ARegion, ARgnOperation, False); - AIsCustomDraw := IsCustomDraw and DoCustomDraw(TabVisibleIndex); - if not AIsCustomDraw then - begin - ATab := ParentInfo.VisibleTabs[TabVisibleIndex]; - ATab.InitializePaintBitmap; - try - if IsNativePainting then - PrepareTabBackground(ATab, TabVisibleIndex); - DrawTabImageAndText(ATab, TabVisibleIndex); - PaintTabShape(ATab, TabVisibleIndex); - finally - ATab.ResetPaintBitmap; - end; - end; - finally - RestoreClipRgn; - end; - if not IsTabTransparent(TabVisibleIndex) or AIsCustomDraw then - begin - AfterPaintTab(TabVisibleIndex); - ParentInfo.Canvas.SetClipRegion(ARegion, roSubtract, False); - end - else - ExcludeTabContentClipRegion(TabVisibleIndex); - finally - ARegion.Free; - end; -end; - -function TcxPCStandardPainter.GetButtonsWidth(ANavigatorButtons: TcxPCNavigatorButtons): Integer; -var - AButton: TcxPCNavigatorButton; - AButtonPositions: TcxPCNavigatorButtonPositions; - I: Integer; -begin - GetButtonsOrder(ANavigatorButtons, AButtonPositions); - Result := 0; - for I := 0 to High(AButtonPositions) do - begin - AButton := AButtonPositions[I].Button; - Inc(Result, GetButtonWidth(AButton)); - if I < High(AButtonPositions) then - Inc(Result, GetButtonsDistance(AButton, AButtonPositions[I + 1].Button)); - end; -end; - -{ TcxPCButtonsPainter } - -class function TcxPCButtonsPainter.GetStandardStyle: TcxPCStandardStyle; -begin - Result := tsButtons; -end; - -class function TcxPCButtonsPainter.GetStyleID: TcxPCStyleID; -begin - Result := cxPCButtonsStyle; -end; - -class function TcxPCButtonsPainter.GetStyleName: TCaption; -begin - Result := 'Buttons'; -end; - -class function TcxPCButtonsPainter.HasLookAndFeel( - ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := False; -end; - -function TcxPCButtonsPainter.IsTabBorderThick(ATabVisibleIndex: Integer): Boolean; -begin - with ParentInfo.VisibleTabs[ATabVisibleIndex] do - Result := Tracking or Pressed or Selected or IsMainTab; -end; - -procedure TcxPCButtonsPainter.PaintTabShape(ATab: TcxTab; ATabVisibleIndex: Integer); -const - ATabFrameLineColorA: array [Boolean, 1 .. 4] of TColor = ( - (cxPCLightestEdgeColor, cxPCDarkestEdgeColor, cxPCLightestEdgeColor, cxPCDarkEdgeColor), - (cxPCDarkEdgeColor, cxPCDarkestEdgeColor, cxPCLightestEdgeColor, cxPCLightEdgeColor) - ); -var - R, AFullRect: TRect; - ATabBodyColor: TColor; - AIsSunkenTab: Boolean; -begin - ATabBodyColor := GetTabBodyColor(ATabVisibleIndex); - AFullRect := ATab.FullRect; - R := AFullRect; - with ParentInfo.Canvas do - begin - AIsSunkenTab := ATab.Pressed or ATab.Selected or ATab.IsMainTab or ATab.Tracking; - if AIsSunkenTab then - begin - DrawComplexFrame(R, cxPCDarkestEdgeColor, cxPCLightestEdgeColor); - InflateRect(R, -1, -1); - DrawComplexFrame(R, cxPCDarkEdgeColor, cxPCLightEdgeColor); - end else - begin - DrawComplexFrame(R, cxPCLightestEdgeColor, cxPCDarkestEdgeColor); - InflateRect(R, -1, -1); - DrawComplexFrame(R, cxPCLightEdgeColor, cxPCDarkEdgeColor); - end; - InflateRect(R, -1, -1); - - Brush.Color := ATabBodyColor; - FillRect(R); - - InflateRect(R, 1, 1); - InternalDrawFocusRect(ATabVisibleIndex, R); - end; -end; - -{ TcxPCButtonedPainter } - -constructor TcxPCButtonedPainter.Create(AParent: TcxCustomTabControl); - - procedure InitializeMainTabBrushBitmap; - const - BrushBitmapSize = 8; - var - X, Y, XStart: Integer; - begin - with MainTabBrushBitmap, MainTabBrushBitmap.Canvas do - begin - Width := BrushBitmapSize; - Height := BrushBitmapSize; - - Brush.Style := bsSolid; - Brush.Color := cxPCLightEdgeColor; - FillRect(Rect(0, 0, BrushBitmapSize, BrushBitmapSize)); - - XStart := 0; - X := XStart; - Y := 0; - repeat - Pixels[X, Y] := cxPCLightestEdgeColor; - Inc(X, 2); - if X >= BrushBitmapSize then - begin - XStart := 1 - XStart; - X := XStart; - Inc(Y); - end; - until Y = BrushBitmapSize; - end; - end; - -begin - inherited Create(AParent); - MainTabBrushBitmap := TBitmap.Create; - InitializeMainTabBrushBitmap; -end; - -destructor TcxPCButtonedPainter.Destroy; -begin - MainTabBrushBitmap.Free; - inherited Destroy; -end; - -function TcxPCButtonedPainter.GetButtonContentPosition( - AButton: TcxPCNavigatorButton): TPoint; -begin - Result := Get3DButtonContentPosition(AButton); -end; - -function TcxPCButtonedPainter.GetButtonsRegionHOffset: Integer; -begin - if ParentInfo.IsTabsContainer then - Result := TabsContainerOffset - else - Result := 0; -end; - -function TcxPCButtonedPainter.GetButtonsRegionWOffset: Integer; -begin - if ParentInfo.IsTabsContainer then - Result := TabsContainerOffset - else - Result := 0; -end; - -function TcxPCButtonedPainter.GetDisplayRectOffset: TRect; -begin - Result := inherited GetDisplayRectOffset; - if not ParentInfo.HideTabs and (ParentInfo.RowCount > 0) then - Inc(Result.Top, ButtonedPainterDistanceBetweenTabsAndClientRects); -end; - -function TcxPCButtonedPainter.GetTabBodyColor( - TabVisibleIndex: Integer): TColor; -var - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[TabVisibleIndex]; - if ATab.Highlighted then - Result := HighlightedTabBodyColor - else - begin - Result := GetTabColor(TabVisibleIndex); - if Result = clDefault then - if ATab.IsMainTab then - Result := cxPCLightestEdgeColor - else - Result := clBtnFace; - end; -end; - -function TcxPCButtonedPainter.GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; -//var -// ACorrection: Integer; -begin - Result := ButtonsPainterTabContentWOffsetA[IsAssignedImages]; -// if ParentInfo.Rotate and (ParentInfo.VisibleTabs[ATabVisibleIndex].Caption <> '') then -// begin -// ACorrection := (12 - Result.Left - Result.Right) div 2; -// if GetTabBaseImageSize.cx = 0 then -// Inc(Result.Left, ACorrection); -// Inc(Result.Right, ACorrection); -// end; -end; - -function TcxPCButtonedPainter.GetTabsContainerOffsets: TRect; -begin - Result := Rect(TabsContainerOffset, TabsContainerOffset, TabsContainerOffset, 0); -end; - -function TcxPCButtonedPainter.GetTooNarrowTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; -begin - Result := GetTabContentWOffset(ATabVisibleIndex); -end; - -function TcxPCButtonedPainter.IsTabBorderThick(ATabVisibleIndex: Integer): Boolean; -begin - with ParentInfo.VisibleTabs[ATabVisibleIndex] do - Result := not Tracking and (Pressed or Selected or IsMainTab); -end; - -{ TcxPCExtraFlatPainter } - -procedure TcxPCExtraFlatPainter.CalculateButtonContentParameters( - AButton: TcxPCNavigatorButton; out AParameters: TcxPCNavigatorButtonContentParameters); -begin - inherited CalculateButtonContentParameters(AButton, AParameters); - AParameters.Enabled := True; - AParameters.LiteStyle := (AButton = nbClose) or not ParentControl.Enabled or - (ParentInfo.NavigatorButtonsState[AButton] = nbsDisabled); - if AParameters.LiteStyle then - AParameters.BrushColor := cxPCLightBrushColor; -end; - -function TcxPCExtraFlatPainter.CalculateTabNormalWidth(Tab: TcxTab): Integer; -begin - if ParentInfo.TabWidth > 0 then - Result := ParentInfo.TabWidth - else - begin - Result := GetTabNormalWidth(Tab.VisibleIndex); - Inc(Result, 12); - if Tab.Caption <> '' then - Inc(Result, TextSize(Tab, Tab.Caption).cx - 3); - end; - if Result < GetMinTabNormalWidth(Tab.VisibleIndex) then - Result := GetMinTabNormalWidth(Tab.VisibleIndex); -end; - -procedure TcxPCExtraFlatPainter.CorrectTabRect(TabVisibleIndex: Integer; - var TabRectCorrection: TcxPCRectCorrection); -begin - with ParentInfo do - if VisibleTabs[TabVisibleIndex].IsMainTab then - TabRectCorrection := ExtraFlatPainterMainTabRectCorrection - else - inherited CorrectTabRect(TabVisibleIndex, TabRectCorrection); -end; - -function TcxPCExtraFlatPainter.GetButtonColor( - AButtonState: TcxPCNavigatorButtonState): TColor; -begin - if AButtonState in [nbsHotTrack, nbsPressed] then - Result := clBtnFace - else - Result := GetTabsRowColor; -end; - -function TcxPCExtraFlatPainter.GetButtonContentColor( - AButtonState: TcxPCNavigatorButtonState): TColor; -begin - if not ParentControl.Enabled or (AButtonState = nbsDisabled) then - Result := cxPCDarkEdgeColor - else - if AButtonState = nbsPressed then - Result := cxPCLightestEdgeColor - else - Result := clBtnText; -end; - -function TcxPCExtraFlatPainter.GetButtonContentPosition( - AButton: TcxPCNavigatorButton): TPoint; -const - AArrowButtonArrowRectLeftTopCorners: array [TcxPCArrow] of TPoint = ( - (X: 2; Y: 5), (X: 2; Y: 3), (X: 5; Y: 2), (X: 3; Y: 2) - ); - ACloseButtonCrossRectLeftTopCorners: array[Boolean] of TPoint = ((X: 3; Y: 2), (X: 2; Y: 3)); - AGoDialogArrowRectLeftTopCorner: TPoint = (X: 3; Y: 4); -begin - case AButton of - nbGoDialog: - begin - Result := AGoDialogArrowRectLeftTopCorner; - if ParentInfo.NavigatorButtonsState[AButton] = nbsPressed then - Inc(Result.Y); - end; - nbClose: - Result := ACloseButtonCrossRectLeftTopCorners[ParentInfo.TabPosition in [tpTop, tpBottom]]; - else - Result := AArrowButtonArrowRectLeftTopCorners[GetButtonArrow(AButton)]; - end; -end; - -function TcxPCExtraFlatPainter.GetButtonHeight: Integer; -begin - Result := ExtraFlatPainterButtonSize; -end; - -function TcxPCExtraFlatPainter.GetButtonWidth( - Button: TcxPCNavigatorButton): Integer; -begin - Result := ExtraFlatPainterButtonSize; -end; - -function TcxPCExtraFlatPainter.GetClientRectOffset: TRect; -begin - Result := inherited GetClientRectOffset; - if not ParentInfo.HideTabs and (ParentInfo.RowCount > 0) then - Inc(Result.Top, ExtraFlatPainterMainTabRowUnderlineWidth); - ExcludeUnderLine(Result); -end; - -function TcxPCExtraFlatPainter.GetDefaultClientColor: TColor; -begin - if ParentInfo.ActivePage <> nil then - Result := inherited GetDefaultClientColor - else - Result := GetFreeSpaceColor; -end; - -function TcxPCExtraFlatPainter.GetDefaultTabNormalHeight: Integer; -begin - Result := 17; -end; - -function TcxPCExtraFlatPainter.GetDefaultTabNormalHTextOffset: Integer; -begin - Result := 2; -end; - -function TcxPCExtraFlatPainter.GetDisplayRectOffset: TRect; -begin - Result := inherited GetDisplayRectOffset; - if not ParentInfo.HideTabs and ParentInfo.TabsOnBothSides then - Inc(Result.Bottom, ExtraFlatPainterTabsRowFreeSpaceWidth); -end; - -function TcxPCExtraFlatPainter.GetDrawImageOffset(TabVisibleIndex: Integer): TRect; -begin - Result := ExtraFlatPainterDrawImageOffsetA[ParentInfo.VisibleTabs[TabVisibleIndex].IsMainTab]; -end; - -function TcxPCExtraFlatPainter.GetDrawTextHOffset(TabVisibleIndex: Integer): TRect; -var - AIsMainTab: Boolean; -begin - AIsMainTab := ParentInfo.VisibleTabs[TabVisibleIndex].IsMainTab; - Result := ExtraFlatPainterDrawTextHOffsetA[AIsMainTab]; - if ParentInfo.VisibleTabs[TabVisibleIndex].PaintingPositionIndex in [5, 7, 10] then - begin - Result.Top := 0; - Result.Bottom := 0; - end; - - if GetTabRotatedImageSize.cx > 0 then - if AIsMainTab then - Inc(Result.Left) - else - Inc(Result.Left, 2); -end; - -function TcxPCExtraFlatPainter.GetFrameWidth: Integer; -begin - Result := 1; -end; - -function TcxPCExtraFlatPainter.GetFreeSpaceColor: TColor; -begin - Result := clBtnFace; -end; - -function TcxPCExtraFlatPainter.GetMinTabNormalWidth(ATabVisibleIndex: Integer): Integer; -begin - Result := GetTabNormalWidth(ATabVisibleIndex); -end; - -{ TcxPCExtraFlatPainter } - -function TcxPCExtraFlatPainter.CalculateTabNormalHeight: Integer; -var - DefaultTabNormalHeight: Integer; -begin - with ParentInfo do - begin - Result := InternalCalculateTabNormalHeight; - - DefaultTabNormalHeight := GetDefaultTabNormalHeight; - if Result < DefaultTabNormalHeight then - Result := DefaultTabNormalHeight; - - CorrectTabHeightForImage(Result); - - if (TabHeight - 4 >= DefaultTabNormalHeight) and (TabHeight - 4 > Result) then - Result := TabHeight - 4; - end; -end; - -class function TcxPCExtraFlatPainter.GetStyleID: TcxPCStyleID; -begin - Result := cxPCExtraFlatStyle; -end; - -class function TcxPCExtraFlatPainter.GetStyleName: TCaption; -begin - Result := 'ExtraFlat'; -end; - -class function TcxPCExtraFlatPainter.HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := False; -end; - -function TcxPCExtraFlatPainter.GetTabBodyColor( - TabVisibleIndex: Integer): TColor; -var - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[TabVisibleIndex]; - if ATab.Highlighted then - Result := HighlightedTabBodyColor - else - begin - Result := GetTabColor(TabVisibleIndex); - if Result = clDefault then - if ATab.IsMainTab then - Result := cxPCTabBodyColor - else - if ParentInfo.IsTabsContainer then - Result := ParentInfo.Color - else - Result := cxPCLightBrushColor; - end; -end; - -function TcxPCExtraFlatPainter.GetTabBorderWidth(Tab: TcxTab = nil): Integer; -begin - Result := 0; - if (Tab <> nil) and Tab.IsMainTab then Result := 1; -end; - -function TcxPCExtraFlatPainter.GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; -begin - Result := ExtraFlatPainterTabContentWOffset[ParentInfo.VisibleTabs[ATabVisibleIndex].IsMainTab]; -end; - -function TcxPCExtraFlatPainter.GetTabNormalWidth(ATabVisibleIndex: Integer): Integer; -begin - if IsAssignedImages and ((ATabVisibleIndex = -1) or IsTabHasImage(ATabVisibleIndex) or ParentInfo.Rotate) then - Result := GetTabBaseImageSize.cx + 2 * ParentInfo.ImageBorder + 4 - else - Result := 0; -end; - -function TcxPCExtraFlatPainter.GetTabsRowsDelimiterWidth: Integer; -begin - Result := 3; -end; - -function TcxPCExtraFlatPainter.GetTabsNormalDistance: TcxPCDistance; -begin - Result.dw := GetTabsDelimiterWidth; - Result.dh := GetTabsRowsDelimiterWidth + ExtraFlatPainterTabsRowFreeSpaceWidth; - if ParentInfo.Rotate then - RotateTabsDistance(Result); -end; - -function TcxPCExtraFlatPainter.GetTabsPosition( - NavigatorButtons: TcxPCNavigatorButtons): TcxPCTabsPosition; -const - TabsRegionHOffset = ExtraFlatPainterTabsRowFreeSpaceWidth; - TabsRegionWOffset = 6; - - NormalTabsRectCorrection: TRect = (Left: TabsRegionWOffset; Top: TabsRegionHOffset; Right: TabsRegionWOffset; Bottom: 0); - ExtendedTabsRectCorrection: TRect = (Left: -1; Top: -1; Right: -1; Bottom: 0); - - procedure CalculateNormalParameters(var ATabsPosition: TcxPCTabsPosition); - var - AButtonsWidth: Integer; - ANormalTabsRectCorrection: TRect; - begin - with ATabsPosition do - begin - AButtonsWidth := CalculateButtonsRegionWidth(NavigatorButtons); - ANormalTabsRectCorrection := NormalTabsRectCorrection; - if NeedShowTabsRegionFrame then - OffsetRect(ANormalTabsRectCorrection, 0, GetFrameWidth); - NormalTabsRect := GetExtendedRect(GetControlRect(ParentControl), - ANormalTabsRectCorrection, ParentInfo.TabPosition); - - if ParentInfo.TabPosition in [tpTop, tpBottom] then - begin - NormalRowWidth := ParentInfo.Width - 2 * TabsRegionWOffset - AButtonsWidth; - if ParentInfo.NavigatorPosition in [npLeftTop, npLeftBottom] then - Inc(NormalTabsRect.Left, AButtonsWidth) - else - Dec(NormalTabsRect.Right, AButtonsWidth); - end else - begin - NormalRowWidth := ParentInfo.Height - 2 * TabsRegionWOffset - AButtonsWidth; - if ParentInfo.NavigatorPosition in [npLeftTop, npRightTop] then - Inc(NormalTabsRect.Top, AButtonsWidth) - else - Dec(NormalTabsRect.Bottom, AButtonsWidth); - end; - end; - end; - -begin - CalculateNormalParameters(Result); - - with Result do - begin - ExtendedTabsRect := GetExtendedRect(NormalTabsRect, ExtendedTabsRectCorrection, ParentInfo.TabPosition); - - ExtendedTopOrLeftTabsRectBottomOrRightBorderOffset := 0; - ExtendedBottomOrRightTabsRectTopOrLeftBorderOffset := 0; - if ParentInfo.TabPosition in [tpTop, tpLeft] then - ExtendedTopOrLeftTabsRectBottomOrRightBorderOffset := 1 - else - ExtendedBottomOrRightTabsRectTopOrLeftBorderOffset := -1; - MinDistanceBetweenTopOrLeftAndBottomOrRightExtendedTabsRects := GetTabsNormalDistance.dh - 1; - end; - - CalculateButtonsRegion(NavigatorButtons); -end; - -function TcxPCExtraFlatPainter.GetTooNarrowTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; -begin - Result := GetTabContentWOffset(ATabVisibleIndex); -end; - -function TcxPCExtraFlatPainter.InternalCalculateTabNormalHeight: Integer; -begin - Result := inherited InternalCalculateTabNormalHeight; - Dec(Result, 3); -end; - -procedure TcxPCExtraFlatPainter.InternalPaint; -begin - PaintClientArea; - if not ParentInfo.HideTabs then - begin - PaintButtonsRegion; - PaintTabsRegion; - end; -end; - -procedure TcxPCExtraFlatPainter.PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); -begin - if AButtonState in [nbsHotTrack, nbsPressed] then - begin - InternalDrawEdge(ARect, AButtonState = nbsPressed, True); - InflateRect(ARect, -1, -1); - end; -end; - -class function TcxPCExtraFlatPainter.IsMainTabBoundWithClient: boolean; -begin - Result := True; -end; - -class function TcxPCExtraFlatPainter.IsMultiSelectionAccepted: boolean; -begin - Result := False; -end; - -class function TcxPCExtraFlatPainter.IsTabPressable: Boolean; -begin - Result := False; -end; - -procedure TcxPCExtraFlatPainter.PaintClientArea; -begin - PaintMainTabRowUnderline; - inherited PaintClientArea; -end; - -procedure TcxPCExtraFlatPainter.PaintFrame; -begin - InternalPaintFrame(clBtnHighlight, clBtnShadow); -end; - -procedure TcxPCExtraFlatPainter.PaintTabShape(ATab: TcxTab; ATabVisibleIndex: Integer); -var - R: TRect; -begin - R := ATab.FullRect; - if ATab.IsMainTab then - PaintMainTabFrame(R); - - if not IsTabTransparent(ATabVisibleIndex) then - DrawBackground(ParentInfo.Canvas.Canvas, R, ATabVisibleIndex); - if ATab.IsMainTab then - InternalDrawFocusRect(ATabVisibleIndex, GetFocusRect); -end; - -procedure TcxPCExtraFlatPainter.PaintTabsRegion; - - procedure PaintDelimiter(TabVisibleIndex: Integer); - - function IsDelimiterNeeded: Boolean; - var - FirstIndex, LastIndex: Integer; - Tab, NextTab: TcxTab; - begin - Result := False; - Tab := ParentInfo.VisibleTabs[TabVisibleIndex]; - if Tab.IsMainTab then Exit; - InitializeVisibleTabRange(ParentControl, FirstIndex, LastIndex); - if TabVisibleIndex = LastIndex then Exit; - NextTab := ParentInfo.VisibleTabs[TabVisibleIndex + 1]; - if NextTab.IsMainTab then Exit; - Result := Tab.VisibleRow = NextTab.VisibleRow; - end; - - var - ADelimiterOffsets: TcxPCTabsDelimiterOffsets; - ADelimiterRect, ATabFullRect: TRect; - begin - if not IsDelimiterNeeded then - Exit; - ATabFullRect := ParentInfo.VisibleTabs[TabVisibleIndex].FullRect; - ADelimiterOffsets := GetTabsDelimiterOffsets; - with ATabFullRect do - case ParentInfo.TabPosition of - tpTop, tpBottom: - begin - ADelimiterRect.Top := Top + ADelimiterOffsets.Top; - ADelimiterRect.Bottom := Bottom - ADelimiterOffsets.Bottom; - if IsRightToLeftAlignment(ParentControl) then - ADelimiterRect.Left := Left - GetTabsDelimiterWidth - else - ADelimiterRect.Left := Right; - ADelimiterRect.Right := ADelimiterRect.Left + GetTabsDelimiterWidth; - end; - tpLeft, tpRight: - begin - ADelimiterRect.Left := Left + ADelimiterOffsets.Top; - ADelimiterRect.Right := Right - ADelimiterOffsets.Bottom; - if IsBottomToTopAlignment(ParentControl) then - ADelimiterRect.Top := Top - GetTabsDelimiterWidth - else - ADelimiterRect.Top := Bottom; - ADelimiterRect.Bottom := ADelimiterRect.Top + GetTabsDelimiterWidth; - end; - end; - PaintTabsDelimiter(ADelimiterRect); - end; - -var - AInterval: TcxPCIndexInterval; - ALineIndexBoundsA: TcxPCLineIndexBoundsArray; - AOutTabImageAndTextDatas: array of TcxPCOutTabImageAndTextData; - ARowIndex, I: Integer; - ARowRect, R: TRect; -begin - InitializeLineBoundsArray(ParentControl, ALineIndexBoundsA); - - for ARowIndex := 0 to Length(ALineIndexBoundsA) - 1 do - begin - SaveClipRgn; - - AInterval := ALineIndexBoundsA[ARowIndex]; - SetLength(AOutTabImageAndTextDatas, AInterval.Right - AInterval.Left + 1); - for I := AInterval.Left to AInterval.Right do - begin - PaintTab(I); - PaintDelimiter(I); - AOutTabImageAndTextDatas[I - AInterval.Left] := FOutTabImageAndTextData; - end; - - ARowRect := GetTabsRowRect(ARowIndex); - - R := ARowRect; - PaintTabsRowsDelimiter(R, ARowIndex); - DrawBackground(ParentInfo.Canvas.Canvas, R, -1); - - RestoreClipRgn; - - for I := AInterval.Left to AInterval.Right do - if IsTabTransparent(I) then - begin - FOutTabImageAndTextData := AOutTabImageAndTextDatas[I - AInterval.Left]; - AfterPaintTab(I); - end; - - ParentInfo.Canvas.ExcludeClipRect(ARowRect); - end; -end; - -procedure TcxPCExtraFlatPainter.RepaintTab(TabVisibleIndex: Integer; - TabPropertyChanged: TcxPCTabPropertyChanged); -var - ATab: TcxTab; -begin - if IsVerticalText(ParentControl) then - ParentInfo.VisibleTabs[TabVisibleIndex].ResetVerticalTextBitmap; - ATab := ParentInfo.VisibleTabs[TabVisibleIndex]; - if (TabPropertyChanged = tpcIsMainTab) and not ATab.IsMainTab then - InvalidateTabExtendedTabsRect(TabVisibleIndex) - else - InvalidateTabRect(TabVisibleIndex); - if ATab.IsMainTab then - ParentControl.InvalidateRect(GetMainTabRowUnderlineRect, False); -end; - -function TcxPCExtraFlatPainter.GetButtonsDistance( - AButton1, AButton2: TcxPCNavigatorButton): Integer; -begin - if IsOneOfButtons(AButton1, AButton2, nbGoDialog) then - begin - if IsOneOfButtons(AButton1, AButton2, nbClose) then - Result := 3 - else - Result := 0; - end - else - Result := 3; -end; - -function TcxPCExtraFlatPainter.GetButtonsRegionHOffset: Integer; -begin - Result := 6; -end; - -function TcxPCExtraFlatPainter.GetButtonsRegionWOffset: Integer; -begin - Result := 1; - if NeedShowTabsRegionFrame then - Inc(Result, GetFrameWidth); -end; - -function TcxPCExtraFlatPainter.GetFocusRect: TRect; -const - AFocusRectCorrectionA: array[TcxTabPosition] of TcxPCRectCorrection = ( - (dLeft: 0; dTop: 0; dRight: -1; dBottom: 1), - (dLeft: 1; dTop: -1; dRight: -1; dBottom: -1), - (dLeft: 0; dTop: 0; dRight: 1; dBottom: -1), - (dLeft: -1; dTop: 1; dRight: -1; dBottom: -1) - ); -begin - Result := ParentInfo.VisibleTabs[ParentInfo.MainTabVisibleIndex].FullRect; - CorrectRect(Result, AFocusRectCorrectionA[ParentInfo.TabPosition]); -end; - -function TcxPCExtraFlatPainter.GetTabsDelimiterOffsets: TcxPCTabsDelimiterOffsets; -begin - Result.Top := 2; - Result.Bottom := 2; -end; - -procedure TcxPCExtraFlatPainter.DrawBackground(ACanvas: TCanvas; ARect: TRect; - ATabVisibleIndex: Integer); -begin - if (ATabVisibleIndex <> -1) and (ATabVisibleIndex <> ParentInfo.MainTabVisibleIndex) then - begin - ACanvas.Brush.Color := GetTabsRowColor; - ACanvas.FrameRect(ARect); - InflateRect(ARect, -1, -1); - end; - - if ATabVisibleIndex = -1 then - ACanvas.Brush.Color := GetTabsRowColor - else - ACanvas.Brush.Color := GetTabBodyColor(ATabVisibleIndex); - ACanvas.Brush.Style := bsSolid; - ACanvas.FillRect(ARect); -end; - -procedure TcxPCExtraFlatPainter.ExcludeUnderLine(var R: TRect); -begin - if NeedShowFrame and not ParentInfo.HideTabs and (ParentInfo.RowCount > 0) then - Dec(R.Top); -end; - -function TcxPCExtraFlatPainter.GetMainTabRowUnderlineColor: TColor; -begin - if ParentInfo.MainTabVisibleIndex = -1 then - Result := cxPCTabBodyColor - else - begin - Result := GetTabColor(ParentInfo.MainTabVisibleIndex); - if Result = clDefault then - Result := cxPCTabBodyColor; - end; -end; - -function TcxPCExtraFlatPainter.GetMainTabRowUnderlineRect: TRect; -begin - if ParentInfo.HideTabs or (ParentInfo.RowCount = 0) then - begin - Result := cxEmptyRect; - Exit; - end; - - Result := GetClientRect; - SubtractRect(Result, - GetExtendedRect(Result, Rect(0, - ExtraFlatPainterMainTabRowUnderlineWidth, 0, 0), ParentInfo.TabPosition), - Result); -end; - -function TcxPCExtraFlatPainter.GetTabBackgroundRect(ATabVisibleIndex: Integer; - AForNormalState: Boolean): TRect; -var - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if not AForNormalState and (ATabVisibleIndex = ParentInfo.MainTabVisibleIndex) then - Result := GetExtendedRect(ATab.FullRect, Rect(1, 1, 1, 0), ATab.PaintingPosition) - else - begin - Result := GetExtendedRect(ATab.NormalRect, - Rect(0, -ExtraFlatPainterTabsRowFreeSpaceWidth, 0, -GetTabsRowsDelimiterWidth), - ParentInfo.TabPosition); - end; -end; - -function TcxPCExtraFlatPainter.GetTabsDelimiterWidth: Integer; -begin - Result := 1; -end; - -function TcxPCExtraFlatPainter.GetTabsRowColor: TColor; -begin - if ParentInfo.IsTabsContainer then - Result := ParentInfo.Color - else - Result := cxPCLightBrushColor; -end; - -function TcxPCExtraFlatPainter.GetTabsRowRect(ARowIndex: Integer): TRect; -var - ALineIndexBoundsA: TcxPCLineIndexBoundsArray; -begin - InitializeLineBoundsArray(ParentControl, ALineIndexBoundsA); - Result := GetTabBackgroundRect(ALineIndexBoundsA[ARowIndex].Left, True); - if ParentInfo.TabPosition in [tpLeft, tpRight] then - begin - Result.Top := 0; - Result.Bottom := ParentInfo.Height; - end - else - begin - Result.Left := 0; - Result.Right := ParentInfo.Width; - end; - - if NeedShowTabsRegionFrame then - Result := GetExtendedRect(Result, Rect(1, 0, 1, 0), ParentInfo.TabPosition); -end; - -procedure TcxPCExtraFlatPainter.InternalPaintFrame( - ALeftTopColor, ARightBottomColor: TColor); -var - R: TRect; -begin - R := GetDisplayRect; - if ParentInfo.HideTabs or (ParentInfo.RowCount = 0) then - ParentInfo.Canvas.DrawComplexFrame(R, ALeftTopColor, ARightBottomColor) - else - case ParentInfo.TabPosition of - tpTop: - DrawBorder(ParentInfo.Canvas, R, [bRight, bBottom, bLeft], [ARightBottomColor, ARightBottomColor, ALeftTopColor]); - tpBottom: - DrawBorder(ParentInfo.Canvas, R, [bRight, bTop, bLeft], [ARightBottomColor, ALeftTopColor, ALeftTopColor]); - tpLeft: - DrawBorder(ParentInfo.Canvas, R, [bBottom, bRight, bTop], [ARightBottomColor, ARightBottomColor, ALeftTopColor]); - tpRight: - DrawBorder(ParentInfo.Canvas, R, [bBottom, bLeft, bTop], [ARightBottomColor, ALeftTopColor, ALeftTopColor]); - end; -end; - -procedure TcxPCExtraFlatPainter.InternalPaintMainTabFrame(var R: TRect; - ALightColor, ADarkColor: TColor); -var - AMainTab: TcxTab; -begin - AMainTab := ParentInfo.VisibleTabs[ParentInfo.MainTabVisibleIndex]; - case AMainTab.PaintingPosition of - tpTop: - DrawBorder(ParentInfo.Canvas, R, [bLeft, bTop, bRight], [ALightColor, ALightColor, ADarkColor]); - tpBottom: - begin - DrawBorder(ParentInfo.Canvas, R, [bLeft, bBottom, bRight], [ALightColor, ADarkColor, ADarkColor]); - ParentInfo.Canvas.Pixels[R.Left - 1, R.Top] := ADarkColor; - end; - tpLeft: - DrawBorder(ParentInfo.Canvas, R, [bTop, bLeft, bBottom], [ALightColor, ALightColor, ADarkColor]); - tpRight: - begin - DrawBorder(ParentInfo.Canvas, R, [bTop, bRight, bBottom], [ALightColor, ADarkColor, ADarkColor]); - ParentInfo.Canvas.Pixels[R.Left, R.Top - 1] := ADarkColor; - end; - end; -end; - -procedure TcxPCExtraFlatPainter.InternalPaintTabsRowsDelimiter(var ARowRect: TRect; - AColors: array of TColor); -var - I: Integer; -begin - for I := 0 to GetTabsRowsDelimiterWidth - 1 do - case ParentInfo.TabPosition of - tpTop: - DrawBorder(ParentInfo.Canvas, ARowRect, [bBottom], [AColors[I]]); - tpBottom: - DrawBorder(ParentInfo.Canvas, ARowRect, [bTop], [AColors[I]]); - tpLeft: - DrawBorder(ParentInfo.Canvas, ARowRect, [bRight], [AColors[I]]); - tpRight: - DrawBorder(ParentInfo.Canvas, ARowRect, [bLeft], [AColors[I]]); - end; -end; - -function TcxPCExtraFlatPainter.IsMainTabRow(AVisibleRow: Integer): Boolean; -begin - if ParentInfo.MainTabVisibleIndex <> -1 then - Result := ParentInfo.VisibleTabs[ParentInfo.MainTabVisibleIndex].VisibleRow = AVisibleRow - else - if ParentInfo.TabPosition in [tpTop, tpLeft] then - Result := AVisibleRow = ParentInfo.RowCount - 1 - else - Result := AVisibleRow = 0; -end; - -function TcxPCExtraFlatPainter.NeedShowTabsRegionFrame: Boolean; -begin - Result := False; -end; - -procedure TcxPCExtraFlatPainter.PaintMainTabFrame(var R: TRect); -begin - InternalPaintMainTabFrame(R, clWhite, clBlack); -end; - -procedure TcxPCExtraFlatPainter.PaintMainTabRowUnderline; -begin - if not ParentInfo.HideTabs and (ParentInfo.RowCount > 0) then - begin - ParentInfo.Canvas.Brush.Color := GetMainTabRowUnderlineColor; - ParentInfo.Canvas.FillRect(GetMainTabRowUnderlineRect); - end; -end; - -procedure TcxPCExtraFlatPainter.PaintTabsDelimiter(const ARect: TRect); -begin - ParentInfo.Canvas.Brush.Color := cxPCDarkEdgeColor; - ParentInfo.Canvas.FillRect(ARect); - ParentInfo.Canvas.ExcludeClipRect(ARect); -end; - -procedure TcxPCExtraFlatPainter.PaintTabsRowsDelimiter(var ARowRect: TRect; - ARowIndex: Integer); -begin - if ParentInfo.TabPosition in [tpTop, tpLeft] then - InternalPaintTabsRowsDelimiter(ARowRect, [cxPCTabBodyColor, cxPCTabBodyColor, clWhite]) - else - InternalPaintTabsRowsDelimiter(ARowRect, [cxPCTabBodyColor, cxPCTabBodyColor, clBlack]) -end; - -{ TcxPCUltraFlatPainter } - -class function TcxPCUltraFlatPainter.GetStyleID: TcxPCStyleID; -begin - Result := cxPCUltraFlatStyle; -end; - -class function TcxPCUltraFlatPainter.GetStyleName: TCaption; -begin - Result := 'UltraFlat'; -end; - -class function TcxPCUltraFlatPainter.HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := ALookAndFeel.GetAvailablePainter([totTab]).LookAndFeelStyle = lfsUltraFlat; -end; - -procedure TcxPCUltraFlatPainter.CalculateButtonContentParameters( - AButton: TcxPCNavigatorButton; out AParameters: TcxPCNavigatorButtonContentParameters); -begin - inherited CalculateButtonContentParameters(AButton, AParameters); - AParameters.Enabled := ParentControl.Enabled; - AParameters.LiteStyle := AButton = nbClose; - AParameters.BrushColor := AParameters.Color; -end; - -function TcxPCUltraFlatPainter.GetButtonColor( - AButtonState: TcxPCNavigatorButtonState): TColor; -begin - if AButtonState = nbsHotTrack then - Result := clBtnFace - else - if AButtonState = nbsPressed then - Result := clBtnShadow - else - Result := cxPCLightBrushColor; -end; - -function TcxPCUltraFlatPainter.GetButtonContentPosition( - AButton: TcxPCNavigatorButton): TPoint; -begin - Result := GetButtonCenteredContentPosition(AButton); -end; - -function TcxPCUltraFlatPainter.GetButtonHeight: Integer; -begin - Result := UltraFlatPainterButtonHeight; -end; - -function TcxPCUltraFlatPainter.GetButtonsDistance( - AButton1, AButton2: TcxPCNavigatorButton): Integer; -begin - if IsOneOfButtons(AButton1, AButton2, nbClose) then - Result := 3 - else - Result := 1; -end; - -function TcxPCUltraFlatPainter.GetButtonsRegionHOffset: Integer; -begin - Result := 3; -end; - -function TcxPCUltraFlatPainter.GetButtonWidth(Button: TcxPCNavigatorButton): Integer; -begin - Result := UltraFlatPainterButtonWidthA[Button]; -end; - -function TcxPCUltraFlatPainter.GetFocusRect: TRect; -begin - Result := GetExtendedRect(ParentInfo.VisibleTabs[ParentInfo.MainTabVisibleIndex].FullRect, - Rect(1, 1, 1, 0), ParentInfo.TabPosition); -end; - -procedure TcxPCUltraFlatPainter.PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); - - function GetFrameColor: TColor; - begin - if AButtonState in [nbsNormal, nbsDisabled] then - Result := clBtnShadow - else - Result := clBlack; - end; - -begin - ParentInfo.Canvas.DrawComplexFrame(ARect, GetFrameColor, GetFrameColor); - InflateRect(ARect, -1, -1); -end; - -procedure TcxPCUltraFlatPainter.PaintFrame; -begin - InternalPaintFrame(clBtnShadow, clBtnShadow); -end; - -procedure TcxPCUltraFlatPainter.PaintMainTabFrame(var R: TRect); -begin - InternalPaintMainTabFrame(R, clBlack, clBlack); -end; - -procedure TcxPCUltraFlatPainter.PaintTabsRowsDelimiter(var ARowRect: TRect; - ARowIndex: Integer); -begin - if IsMainTabRow(ARowIndex) then - InternalPaintTabsRowsDelimiter(ARowRect, [cxPCTabBodyColor, cxPCTabBodyColor, clBlack]) - else - InternalPaintTabsRowsDelimiter(ARowRect, [cxPCTabBodyColor, clBlack, cxPCTabBodyColor]) -end; - -{ TcxPCFlatPainter } - -class function TcxPCFlatPainter.GetStyleID: TcxPCStyleID; -begin - Result := cxPCFlatStyle; -end; - -class function TcxPCFlatPainter.GetStyleName: TCaption; -begin - Result := 'Flat'; -end; - -class function TcxPCFlatPainter.HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := ALookAndFeel.GetAvailablePainter([totTab]).LookAndFeelStyle = lfsFlat; -end; - -function TcxPCFlatPainter.GetButtonContentPosition( - AButton: TcxPCNavigatorButton): TPoint; -begin - Result := inherited GetButtonContentPosition(AButton); - Dec(Result.X, TabsPainterButtonBorderWidth - FlatPainterButtonBorderWidth); - Dec(Result.Y, TabsPainterButtonBorderWidth - FlatPainterButtonBorderWidth); -end; - -function TcxPCFlatPainter.GetButtonHeight: Integer; -begin - Result := inherited GetButtonHeight; - Dec(Result, (TabsPainterButtonBorderWidth - FlatPainterButtonBorderWidth) * 2); -end; - -function TcxPCFlatPainter.GetButtonWidth(Button: TcxPCNavigatorButton): Integer; -begin - Result := inherited GetButtonWidth(Button); - Dec(Result, (TabsPainterButtonBorderWidth - FlatPainterButtonBorderWidth) * 2); -end; - -function TcxPCFlatPainter.GetFrameWidth: Integer; -begin - Result := 1; -end; - -function TcxPCFlatPainter.GetTabClipRgn(ATabVisibleIndex: Integer): TcxRegion; -begin - Result := TcxRegion.Create(ParentInfo.VisibleTabs[ATabVisibleIndex].VisibleRect); -end; - -function TcxPCFlatPainter.GetTabClipRgnOperation(ATabVisibleIndex: Integer): TcxRegionOperation; -begin - Result := roIntersect; -end; - -function TcxPCFlatPainter.IsNativePainting: Boolean; -begin - Result := False; -end; - -function TcxPCFlatPainter.NeedShowFrame: Boolean; -begin - Result := True; -end; - -procedure TcxPCFlatPainter.PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); -begin - if AButtonState = nbsPressed then - ParentInfo.Canvas.DrawComplexFrame(ARect, cxPCDarkEdgeColor, cxPCLightestEdgeColor) - else - ParentInfo.Canvas.DrawComplexFrame(ARect, cxPCLightestEdgeColor, cxPCDarkEdgeColor); - InflateRect(ARect, -1, -1); -end; - -procedure TcxPCFlatPainter.PaintFrameBorder(R: TRect); -begin - ParentInfo.Canvas.DrawComplexFrame(R, cxPCLightestEdgeColor, cxPCDarkEdgeColor); -end; - -procedure TcxPCFlatPainter.PaintTabFrame(ATabVisibleIndex: Integer); - - function GetContrastColor: TColor; - begin - Result := Light(GetTabBodyColor(ATabVisibleIndex), 85); - end; - -var - AContrastColor: TColor; - ATab: TcxTab; - R: TRect; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - R := ATab.FullRect; - AContrastColor := GetContrastColor; - with R do - case ATab.PaintingPosition of - tpTop: - begin - InternalPolyLine([Point(Left, Bottom - 1), Point(Left, Top + 2), Point(Left + 2, Top), Point(Right - 3, Top), Point(Right - 2, Top + 1)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Right - 1, Top + 2), Point(Right - 1, Bottom - 1)], cxPCDarkEdgeColor); - InternalPolyLine([Point(Left + 1, Bottom - 1), Point(Left + 1, Top + 2), Point(Left + 2, Top + 1), Point(Right - 3, Top + 1), Point(Right - 2, Top + 2), Point(Right - 2, Bottom - 1)], AContrastColor); - end; - tpBottom: - begin - InternalPolyLine([Point(Left, Top), Point(Left, Bottom - 3), Point(Left + 1, Bottom - 2)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Left + 2, Bottom - 1), Point(Right - 3, Bottom - 1), Point(Right - 1, Bottom - 3), Point(Right - 1, Top)], cxPCDarkEdgeColor); - InternalPolyLine([Point(Left + 1, Top), Point(Left + 1, Bottom - 3)], AContrastColor); - InternalPolyLine([Point(Left + 2, Bottom - 2), Point(Right - 3, Bottom - 2), Point(Right - 2, Bottom - 3), Point(Right - 2, Top)], clBtnFace); - end; - tpLeft: - begin - InternalPolyLine([Point(Right - 1, Bottom - 1), Point(Left + 2, Bottom - 1)], cxPCDarkEdgeColor); - InternalPolyLine([Point(Left + 1, Bottom - 2), Point(Left, Bottom - 3), Point(Left, Top + 2), Point(Left + 2, Top), Point(Right - 1, Top)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Right - 1, Bottom - 2), Point(Left + 2, Bottom - 2), Point(Left + 1, Bottom - 3), Point(Left + 1, Top + 2), Point(Left + 2, Top + 1), Point(Right - 1, Top + 1)], AContrastColor); - end; - tpRight: - begin - InternalPolyLine([Point(Left, Top), Point(Right - 3, Top), Point(Right - 2, Top + 1)], cxPCLightestEdgeColor); - InternalPolyLine([Point(Right - 1, Top + 2), Point(Right - 1, Bottom - 3), Point(Right - 3, Bottom - 1), Point(Left, Bottom - 1)], cxPCDarkEdgeColor); - InternalPolyLine([Point(Left, Top + 1), Point(Right - 3, Top + 1)], AContrastColor); - InternalPolyLine([Point(Right - 2, Top + 2), Point(Right - 2, Bottom - 3), Point(Right - 3, Bottom - 2), Point(Left, Bottom - 2)], clBtnFace); - end; - end; - PaintTabCorners(ATabVisibleIndex); -end; - -{ TcxPCOffice11Painter } - -class function TcxPCOffice11Painter.GetStyleID: TcxPCStyleID; -begin - Result := cxPCOffice11Style; -end; - -class function TcxPCOffice11Painter.GetStyleName: TCaption; -begin - Result := 'Office11'; -end; - -class function TcxPCOffice11Painter.HasLookAndFeel( - ALookAndFeel: TcxLookAndFeel): Boolean; -begin - with ALookAndFeel do - Result := (ALookAndFeel.SkinPainter = nil) and (GetAvailablePainter([totTab]).LookAndFeelStyle = lfsOffice11); -end; - -class function TcxPCOffice11Painter.GetFrameColor: TColor; -begin - Result := dxOffice11SelectedBorderColor; -end; - -procedure TcxPCOffice11Painter.DrawBackground(ACanvas: TCanvas; ARect: TRect; - ATabVisibleIndex: Integer); -begin - DrawGradientBackground(ACanvas, ARect, ATabVisibleIndex, - ParentInfo.TabPosition in [tpLeft, tpRight], False); -end; - -procedure TcxPCOffice11Painter.ExcludeUnderLine(var R: TRect); -begin -// do nothing -end; - -procedure TcxPCOffice11Painter.FillDisplayRect; -begin - if (ParentInfo.ActivePage <> nil) and not ParentInfo.ActivePage.ParentColor then - begin - ParentInfo.Canvas.Brush.Color := ParentInfo.ActivePage.Color; - ParentInfo.Canvas.FillRect(GetClientRect); - end - else - if IsGradientClienArea then - FillGradientRect(ParentInfo.Canvas.Handle, GetClientRect, - dxOffice11ToolbarsColor1, dxOffice11ToolbarsColor2, - ParentInfo.TabPosition in [tpLeft, tpRight]) - else - begin - ParentInfo.Canvas.Brush.Color := GetMiddleRGB(dxOffice11ToolbarsColor1, dxOffice11ToolbarsColor2, 50); - ParentInfo.Canvas.FillRect(GetClientRect); - end; -end; - -function TcxPCOffice11Painter.GetButtonContentColor( - AButtonState: TcxPCNavigatorButtonState): TColor; -begin - if AButtonState = nbsDisabled then - Result := dxOffice11TextDisabledColor - else - Result := dxOffice11TextEnabledColor; -end; - -function TcxPCOffice11Painter.GetClientRectOffset: TRect; -begin - Result := inherited GetClientRectOffset; - if NeedShowMainTabOppositeRowLine then - Inc(Result.Bottom); -end; - -function TcxPCOffice11Painter.GetFocusRect: TRect; -begin - Result := GetExtendedRect(ParentInfo.VisibleTabs[ParentInfo.MainTabVisibleIndex].FullRect, - Rect(1, 1, 1, 0), ParentInfo.TabPosition); -end; - -function TcxPCOffice11Painter.GetFreeSpaceColor: TColor; -begin - Result := GetFrameColor; -end; - -function TcxPCOffice11Painter.GetMainTabRowUnderlineColor: TColor; -begin - if (ParentInfo.MainTabVisibleIndex <> -1) and - (GetTabColor(ParentInfo.MainTabVisibleIndex) <> clDefault) then - Result := GetTabColor(ParentInfo.MainTabVisibleIndex) - else - if not (pcoGradient in ParentInfo.Options) then - Result := GetMiddleRGB(GetSelectedColor1, GetSelectedColor2, 50) - else - if ParentInfo.TabPosition in [tpTop, tpLeft] then - Result := GetSelectedColor2 - else - Result := GetSelectedColor1; -end; - -function TcxPCOffice11Painter.GetMainTabRowUnderlineRect: TRect; -begin - if ParentInfo.HideTabs or (ParentInfo.RowCount = 0) then - begin - Result := cxEmptyRect; - Exit; - end; - - Result := GetDisplayRect; - SubtractRect(Result, Result, - GetExtendedRect(Result, Rect(0, ExtraFlatPainterMainTabRowUnderlineWidth, 0, 0), ParentInfo.TabPosition)); -end; - -function TcxPCOffice11Painter.GetTabBodyColor(TabVisibleIndex: Integer): TColor; -begin - if ParentInfo.VisibleTabs[TabVisibleIndex].Highlighted then - Result := HighlightedTabBodyColor - else - Result := GetTabColor(TabVisibleIndex); -end; - -function TcxPCOffice11Painter.GetTabsDelimiterOffsets: TcxPCTabsDelimiterOffsets; -begin - if ParentInfo.TabPosition in [tpTop, tpLeft] then - begin - Result.Top := 0; - Result.Bottom := 2; - end - else - begin - Result.Top := 3; - Result.Bottom := -1; - end; -end; - -function TcxPCOffice11Painter.GetTabsDelimiterWidth: Integer; -begin - Result := 2; -end; - -function TcxPCOffice11Painter.GetTabsRowsDelimiterWidth: Integer; -begin - Result := 1; -end; - -function TcxPCOffice11Painter.IsTabTransparent(ATabVisibleIndex: Integer): Boolean; -begin - Result := not (ParentInfo.VisibleTabs[ATabVisibleIndex].IsMainTab or - (GetTabBodyColor(ATabVisibleIndex) <> clDefault)); -end; - -function TcxPCOffice11Painter.NeedRedrawOnResize: Boolean; -begin - Result := IsGradientClienArea; -end; - -function TcxPCOffice11Painter.NeedShowTabsRegionFrame: Boolean; -begin - Result := NeedShowFrame; -end; - -procedure TcxPCOffice11Painter.PaintButtonBackground(AButtonRect: TRect; - AButtonState: TcxPCNavigatorButtonState); -var - AColor1, AColor2: TColor; - ATabsRowRect: TRect; -begin - if not InternalSetClipRect(AButtonRect) then - Exit; - ATabsRowRect := GetTabsRowRect(0); - case AButtonState of - nbsNormal, nbsDisabled: - DrawBackground(ParentInfo.Canvas.Canvas, ATabsRowRect, -1); - nbsPressed, nbsHotTrack: - begin - if AButtonState = nbsHotTrack then - begin - AColor1 := GetSelectedColor1; - AColor2 := GetSelectedColor2; - end - else - begin - AColor1 := dxOffice11SelectedDownColor1; - AColor2 := dxOffice11SelectedDownColor2; - end; - if not (pcoGradient in ParentInfo.Options) then - begin - AColor1 := GetMiddleRGB(AColor1, AColor2, 50); - AColor2 := AColor1; - end; - FillGradientRect(ParentInfo.Canvas.Handle, ATabsRowRect, AColor1, AColor2, - ParentInfo.TabPosition in [tpLeft, tpRight]); - end; - end; - RestoreClipRgn; -end; - -procedure TcxPCOffice11Painter.PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); - - function GetFrameColor: TColor; - begin - if not ParentControl.Enabled or (AButtonState = nbsDisabled) then - Result := dxOffice11TextDisabledColor - else - Result := TcxPCOffice11Painter.GetFrameColor; - end; - -begin - ParentInfo.Canvas.FrameRect(ARect, GetFrameColor); - InflateRect(ARect, -1, -1); -end; - -procedure TcxPCOffice11Painter.PaintClientArea; -begin - PaintMainTabOppositeRowLine; - inherited PaintClientArea; -end; - -procedure TcxPCOffice11Painter.PaintFrame; -var - AFrameRect: TRect; -begin - AFrameRect := GetClientRect; - InflateRect(AFrameRect, 1, 1); - ParentInfo.Canvas.FrameRect(AFrameRect, GetFrameColor); -end; - -procedure TcxPCOffice11Painter.PaintMainTabFrame(var R: TRect); -begin - InternalPaintMainTabFrame(R, GetFrameColor, GetFrameColor); -end; - -procedure TcxPCOffice11Painter.PaintTabsDelimiter(const ARect: TRect); - - procedure PaintDelimiterLine(const R: TRect; AColor: TColor); - begin - ParentInfo.Canvas.Brush.Color := AColor; - ParentInfo.Canvas.FillRect(R); - ParentInfo.Canvas.ExcludeClipRect(R); - end; - -var - R: TRect; -begin - R := ARect; - Dec(R.Right); - Dec(R.Bottom); - PaintDelimiterLine(R, dxOffice11BarSeparatorColor1); - OffsetRect(R, 1, 1); - PaintDelimiterLine(R, dxOffice11BarSeparatorColor2); -end; - -procedure TcxPCOffice11Painter.PaintTabsRowsDelimiter(var ARowRect: TRect; - ARowIndex: Integer); -begin - InternalPaintTabsRowsDelimiter(ARowRect, [GetFrameColor]); -end; - -procedure TcxPCOffice11Painter.PrepareDrawTabContentBitmapBackground( - ABitmap: TBitmap; const ABitmapPos: TPoint; ATabVisibleIndex: Integer); -var - P: TPoint; - R: TRect; -begin - R := GetExtendedRect(GetTabBackgroundRect(ATabVisibleIndex, False), - Rect(0, 0, 0, GetTabsRowsDelimiterWidth), ParentInfo.TabPosition); - P := ABitmapPos; - if IsVerticalText(ParentControl) then - begin - R := Rect(R.Top, R.Left, R.Bottom, R.Right); - P := Point(P.Y, P.X); - end; - if ParentInfo.Rotate and (GetTextRotationAngle(ParentControl) = raPlus90) then - OffsetRect(R, -R.Left + P.X + ABitmap.Width - R.Right, -P.Y) - else if not ParentInfo.Rotate and (GetTextRotationAngle(ParentControl) = raMinus90) then - OffsetRect(R, -P.X, -R.Top - (R.Bottom - P.Y - ABitmap.Height)) - else - OffsetRect(R, -P.X, -P.Y); - DrawGradientBackground(ABitmap.Canvas, R, ATabVisibleIndex, ParentInfo.Rotate, - not ParentInfo.Rotate and (GetTextRotationAngle(ParentControl) = raMinus90) or - ParentInfo.Rotate and (GetTextRotationAngle(ParentControl) = raPlus90)); -end; - -procedure TcxPCOffice11Painter.DrawGradientBackground(ACanvas: TCanvas; - ARect: TRect; ATabVisibleIndex: Integer; AHorizontal, AInverse: Boolean); - - procedure GetGradientColors(out AColor1, AColor2: TColor); - begin -// if ParentInfo.IsTabsContainer and ((ATabVisibleIndex = -1) or (ATabVisibleIndex <> ParentInfo.MainTabVisibleIndex)) then -// begin -// AColor1 := ParentInfo.Color; -// AColor2 := AColor1; -// Exit; -// end; - - if (ATabVisibleIndex <> -1) and (ATabVisibleIndex = ParentInfo.MainTabVisibleIndex) then - begin - AColor1 := GetSelectedColor1; - AColor2 := GetSelectedColor2; - end - else - begin - AColor1 := dxOffice11ToolbarsColor1; - AColor2 := dxOffice11ToolbarsColor2; - end; - - if not (pcoGradient in ParentInfo.Options) then - begin - AColor1 := GetMiddleRGB(AColor1, AColor2, 50); - AColor2 := AColor1; - end - else - if AInverse then - ExchangeLongWords(AColor1, AColor2); - end; - - procedure DrawColoredTabBackground; - var - AColor1, AColor2: TColor; - begin - GetGradientColors(AColor1, AColor2); - if ATabVisibleIndex <> ParentInfo.MainTabVisibleIndex then - case ParentInfo.VisibleTabs[ATabVisibleIndex].PaintingPosition of - tpTop: - begin - InternalPolyLine([Point(ARect.Left, ARect.Bottom - 1), Point(ARect.Right - 1, ARect.Bottom - 1)], AColor2, ACanvas); - Dec(ARect.Bottom); - end; - tpBottom: - begin - InternalPolyLine([Point(ARect.Left, ARect.Top), Point(ARect.Right - 1, ARect.Top)], AColor1, ACanvas); - Inc(ARect.Top); - end; - tpLeft: - begin - InternalPolyLine([Point(ARect.Right - 1, ARect.Top), Point(ARect.Right - 1, ARect.Bottom - 1)], AColor2, ACanvas); - Dec(ARect.Right); - end; - tpRight: - begin - InternalPolyLine([Point(ARect.Left, ARect.Top), Point(ARect.Left, ARect.Bottom - 1)], AColor1, ACanvas); - Inc(ARect.Left); - end; - end; - ACanvas.Brush.Color := GetTabBodyColor(ATabVisibleIndex); - ACanvas.FillRect(ARect); - end; - -var - AColor1, AColor2: TColor; -begin - if (ATabVisibleIndex <> -1) and (GetTabBodyColor(ATabVisibleIndex) <> clDefault) then - DrawColoredTabBackground - else - begin - GetGradientColors(AColor1, AColor2); - FillGradientRect(ACanvas.Handle, ARect, AColor1, AColor2, AHorizontal); - end; -end; - -function TcxPCOffice11Painter.GetSelectedColor1: TColor; -begin - Result := dxOffice11SelectedColor1; -end; - -function TcxPCOffice11Painter.GetSelectedColor2: TColor; -begin - Result := dxOffice11SelectedColor2; -end; - -function TcxPCOffice11Painter.IsGradientClienArea: Boolean; -begin - Result := ParentInfo.Options * [pcoGradient, pcoGradientClientArea] = [pcoGradient, pcoGradientClientArea]; -end; - -function TcxPCOffice11Painter.NeedShowMainTabOppositeRowLine: Boolean; -begin - Result := not NeedShowFrame and - ((ParentInfo.TabPosition in [tpTop, tpLeft]) and (ParentInfo.TopOrLeftPartRowCount <> ParentInfo.RowCount) or - (ParentInfo.TabPosition in [tpBottom, tpRight]) and (ParentInfo.TopOrLeftPartRowCount <> 0)); -end; - -procedure TcxPCOffice11Painter.PaintMainTabOppositeRowLine; -var - ARWidth, ARHeight: Integer; - R: TRect; -begin - if NeedShowMainTabOppositeRowLine then - begin - R := GetExtendedRect(GetClientRect, Rect(0, 0, 0, -1), ParentInfo.TabPosition); - GetRectSize(R, ParentInfo.TabPosition in [tpTop, tpBottom], ARWidth, ARHeight); - DirectionalPolyline(R, [Point(R.Left, R.Bottom - 1), Point(R.Left + ARWidth - 1, R.Bottom - 1)], - ParentInfo.TabPosition, GetFrameColor); - end; -end; - -{ TcxPCSlantedPainter } - -class function TcxPCSlantedPainter.GetStyleID: TcxPCStyleID; -begin - Result := cxPCSlantedStyle; -end; - -class function TcxPCSlantedPainter.GetStyleName: TCaption; -begin - Result := 'Slanted'; -end; - -class function TcxPCSlantedPainter.HasLookAndFeel( - ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := False; -end; - -function TcxPCSlantedPainter.AlwaysColoredTabs: Boolean; -begin - Result := True; -end; - -procedure TcxPCSlantedPainter.CalculateButtonContentParameters( - AButton: TcxPCNavigatorButton; out AParameters: TcxPCNavigatorButtonContentParameters); -begin - inherited CalculateButtonContentParameters(AButton, AParameters); - AParameters.Enabled := True; - AParameters.LiteStyle := AButton = nbClose; -end; - -function TcxPCSlantedPainter.CalculateTabNormalWidth(Tab: TcxTab): Integer; -begin - Result := 0; - if not Tab.Visible then - Exit; - if ParentInfo.TabWidth > 0 then - Result := ParentInfo.TabWidth - else - begin - Result := GetTabNormalWidth(Tab.VisibleIndex); - if Tab.Caption <> '' then - begin - Inc(Result, TextSize(Tab, Tab.Caption).cx); - if IsTabHasImage(Tab.VisibleIndex) or IsAssignedImages and ParentInfo.Rotate then - Inc(Result, GetImageTextDistance(Tab.VisibleIndex)); - end; - end; - if Result < GetMinTabNormalWidth(Tab.VisibleIndex)then - Result := GetMinTabNormalWidth(Tab.VisibleIndex); -end; - -procedure TcxPCSlantedPainter.FillDisplayRect; -var - R: TRect; -begin - R := GetClientRect; - if ParentInfo.IsTabsContainer then - ExtendRect(R, RotateRect(Rect(0, -TabsContainerOffset, 0, 0), ParentInfo.TabPosition)); - ParentInfo.Canvas.Brush.Style := bsSolid; - ParentInfo.Canvas.Brush.Color := GetClientColor; - ParentInfo.Canvas.FillRect(R); -end; - -function TcxPCSlantedPainter.GetButtonColor(AButtonState: TcxPCNavigatorButtonState): TColor; -begin - if AButtonState = nbsHotTrack then - Result := GetMiddleRGB(clBtnFace(*ParentInfo.Color*), clWhite, 35) - else - if AButtonState = nbsPressed then - Result := GetMiddleRGB(clBtnFace(*ParentInfo.Color*), clBlack, 90) - else - Result := clBtnFace(*ParentInfo.Color*); -end; - -function TcxPCSlantedPainter.GetButtonContentColor( - AButtonState: TcxPCNavigatorButtonState): TColor; -begin - if (AButtonState = nbsDisabled) or not ParentControl.Enabled then - Result := clBtnShadow - else - if AButtonState = nbsPressed then - Result := GetMiddleRGB(ParentInfo.Color, clWhite, 10) - else - Result := clBtnText; -end; - -function TcxPCSlantedPainter.GetButtonContentPosition( - AButton: TcxPCNavigatorButton): TPoint; -begin - Result := GetButtonCenteredContentPosition(AButton); -end; - -function TcxPCSlantedPainter.GetButtonHeight: Integer; -begin - Result := SlantedPainterButtonHeight; -end; - -function TcxPCSlantedPainter.GetButtonsDistance( - AButton1, AButton2: TcxPCNavigatorButton): Integer; -begin - if IsOneOfButtons(AButton1, AButton2, nbClose) then - Result := 3 - else - Result := 1; -end; - -function TcxPCSlantedPainter.GetButtonsRegionFromTabsOffset: Integer; -begin - Result := 1; -end; - -function TcxPCSlantedPainter.GetButtonsRegionHOffset: Integer; -begin - if ParentInfo.IsTabsContainer then - Result := TabsContainerOffset - else - Result := 1; -end; - -function TcxPCSlantedPainter.GetButtonsRegionWOffset: Integer; -begin - Result := 0; - if ParentInfo.IsTabsContainer then - Result := TabsContainerOffset; -end; - -function TcxPCSlantedPainter.GetButtonWidth(Button: TcxPCNavigatorButton): Integer; -begin - Result := SlantedPainterButtonWidthA[Button]; -end; - -function TcxPCSlantedPainter.GetClientColor: TColor; -begin - if not ParentInfo.IsTabsContainer or (ParentInfo.MainTabVisibleIndex = -1) then - Result := inherited GetClientColor - else - begin - Result := GetTabColor(ParentInfo.MainTabVisibleIndex); - if Result = clDefault then - if ParentInfo.IsTabsContainer then - Result := cxPCTabBodyColor - else - Result := ParentInfo.Color; - end; -end; - -function TcxPCSlantedPainter.GetClientRectOffset: TRect; -begin - Result := inherited GetClientRectOffset; - if not ParentInfo.HideTabs and (ParentInfo.RowCount > 0) and ParentInfo.IsTabsContainer then - Inc(Result.Top, TabsContainerOffset); - if not NeedShowFrame and not ParentInfo.HideTabs and (ParentInfo.RowCount > 0) then - begin - Inc(Result.Top); - if ParentInfo.TabsOnBothSides then - Inc(Result.Bottom); - end; -end; - -function TcxPCSlantedPainter.GetDefaultTabNormalHeight: Integer; -begin - Result := 0; -end; - -function TcxPCSlantedPainter.GetDrawImageOffset(TabVisibleIndex: Integer): TRect; -begin - if ParentInfo.Rotate then - if (ParentInfo.TabSlants.Kind = skSlant) or (ParentInfo.TabSlants.Positions = []) then - begin - Result.Top := GetFrameWidth + 1; - Result.Bottom := GetFrameWidth + 1; - end - else - begin - Result.Top := GetFrameWidth + 2; - Result.Bottom := GetFrameWidth + 2; - end - else - Result := Rect(0, SlantedPainterTabStateMarkWidth + GetFrameWidth, 0, 1); -end; - -function TcxPCSlantedPainter.GetDrawTextHOffset(TabVisibleIndex: Integer): TRect; -begin - if ParentInfo.Rotate then - Result := Rect(0, GetFrameWidth + 3, 0, GetFrameWidth + 1) - else - Result := Rect(0, SlantedPainterTabStateMarkWidth + GetFrameWidth + 1, 0, 1); -end; - -function TcxPCSlantedPainter.GetFrameWidth: Integer; -begin - Result := 1; -end; - -function TcxPCSlantedPainter.GetImageTextDistance(ATabVisibleIndex: Integer): Integer; -begin - Result := 3; -end; - -function TcxPCSlantedPainter.GetMinTabNormalWidth(ATabVisibleIndex: Integer): Integer; -begin - Result := GetTabNormalWidth(ATabVisibleIndex); -end; - -function TcxPCSlantedPainter.GetTabBodyColor( - TabVisibleIndex: Integer): TColor; -var - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[TabVisibleIndex]; - if ATab.Highlighted then - Result := HighlightedTabBodyColor - else - begin - Result := GetTabColor(TabVisibleIndex); - if Result = clDefault then - if ParentInfo.IsTabsContainer then - Result := cxPCTabBodyColor - else - Result := ParentInfo.Color; - end; -end; - -function TcxPCSlantedPainter.GetTabClipRgn(ATabVisibleIndex: Integer): TcxRegion; -var - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - Result := InternalGetTabClipRegion(ATabVisibleIndex, False); - Result.Combine(TcxRegion.Create(ATab.VisibleRect), roIntersect); - if ParentInfo.VisibleTabs[ATabVisibleIndex].IsMainTab then - Result.Combine(TcxRegion.Create(GetTabUnderlineRect(ATab)), roAdd); -end; - -function TcxPCSlantedPainter.GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; - - function GetCutSideOffset: Integer; - begin - if ParentInfo.TabSlants.Kind = skSlant then - Result := GetCutValue - else - Result := CutCornerSize; - end; - -const - AContentOffset = 2; -var - ATab: TcxTab; -begin - if ParentInfo.Rotate then - begin - Result.Left := AContentOffset; - Result.Right := AContentOffset + SlantedPainterTabStateMarkWidth + GetFrameWidth; - if (ParentInfo.TabSlants.Kind = skCutCorner) and (ParentInfo.TabSlants.Positions <> []) then - Inc(Result.Right); - - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if (ATab.PaintingPosition = tpTop) and (GetTextRotationAngle(ParentControl) = raMinus90) or - (ATab.PaintingPosition = tpBottom) and (GetTextRotationAngle(ParentControl) = raPlus90) or - (ATab.PaintingPosition = tpLeft) then - ExchangeLongWords(Result.Left, Result.Right); - end - else - begin - Result.Left := AContentOffset + GetFrameWidth; - Result.Right := AContentOffset + GetFrameWidth; - if spLeft in ParentInfo.TabSlants.Positions then - Result.Left := GetCutSideOffset; - if spRight in ParentInfo.TabSlants.Positions then - Result.Right := GetCutSideOffset; - if GetTextRotationAngle(ParentControl) = raMinus90 then - ExchangeLongWords(Result.Left, Result.Right); - end; -end; - -function TcxPCSlantedPainter.GetTabNormalWidth(ATabVisibleIndex: Integer): Integer; -begin - with GetTabContentWOffset(ATabVisibleIndex) do - Result := Left + Right; - if IsAssignedImages and ((ATabVisibleIndex = -1) or IsTabHasImage(ATabVisibleIndex) or ParentInfo.Rotate) then - Inc(Result, GetTabImageSize.cx); - Result := Max(Result, GetGeometricalMinTabWidth); -end; - -function TcxPCSlantedPainter.GetTabsContainerOffsets: TRect; -begin - Result := cxEmptyRect; - if not ParentInfo.IsTabsContainer then - Exit; - Result := Rect(0, TabsContainerOffset, 0, 0); - case ParentInfo.TabPosition of - tpTop, tpLeft: - begin - Result.Left := TabsContainerOffset - Integer(spLeft in SlantedSides); - Result.Right := TabsContainerOffset - Integer(spRight in SlantedSides); - end; - tpBottom, tpRight: - begin - Result.Left := TabsContainerOffset - Integer(spRight in SlantedSides); - Result.Right := TabsContainerOffset - Integer(spLeft in SlantedSides); - end; - end; -end; - -function TcxPCSlantedPainter.GetTabsNormalDistance: TcxPCDistance; - - function GetSlantCount: Integer; - begin - Result := 0; - if spLeft in SlantedSides then - Inc(Result); - if spRight in SlantedSides then - Inc(Result); - end; - -begin - Result.dh := -3; - if SlantedSides = [] then - Result.dw := 1 - else - Result.dw := -(GetCutValue div 2) * GetSlantCount; - if ParentInfo.Rotate then - RotateTabsDistance(Result); -end; - -function TcxPCSlantedPainter.GetTabsRectOffset: TRect; -begin - Result := cxEmptyRect; - if spLeft in SlantedSides then - begin - if ParentInfo.TabPosition in [tpTop, tpBottom] then - Result.Left := 1 - else - Result.Bottom := 1; - end; - if spRight in SlantedSides then - begin - if ParentInfo.TabPosition in [tpTop, tpBottom] then - Result.Right := 1 - else - Result.Top := 1; - end; -end; - -function TcxPCSlantedPainter.GetTooNarrowTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; -begin - Result := GetTabContentWOffset(ATabVisibleIndex); -end; - -procedure TcxPCSlantedPainter.Init; -begin - inherited Init; - FCutValue := InternalGetCutValue; -end; - -function TcxPCSlantedPainter.InternalCalculateTabNormalHeight: Integer; - - function GetDrawImageTotalHOffset: Integer; - begin - Result := GetDrawImageOffset(-1).Top + GetDrawImageOffset(-1).Bottom; - end; - - function GetDrawTextTotalHOffset: Integer; - begin - Result := GetDrawTextHOffset(-1).Top + GetDrawTextHOffset(-1).Bottom; - end; - -begin - Result := GetMaxTabCaptionHeight + GetDrawTextTotalHOffset; - if Result < GetTabImageSize.cy + GetDrawImageTotalHOffset then - Result := GetTabImageSize.cy + GetDrawImageTotalHOffset; -end; - -function TcxPCSlantedPainter.IsOverTab(TabVisibleIndex: Integer; X, Y: Integer): Boolean; -var - ARegion: TcxRegion; - AFirstIndex, ALastIndex: Integer; -begin - ARegion := GetTabClipRgn(TabVisibleIndex); - Result := ARegion.PtInRegion(X, Y); - ARegion.Free; - - if Result then - begin - InitializeVisibleTabRange(ParentControl, AFirstIndex, ALastIndex); - if (TabVisibleIndex + 1 <= ALastIndex) and - ParentInfo.VisibleTabs[TabVisibleIndex + 1].IsMainTab then - begin - ARegion := GetTabClipRgn(TabVisibleIndex + 1); - Result := not ARegion.PtInRegion(X, Y); - ARegion.Free; - end; - end; -end; - -function TcxPCSlantedPainter.IsTabBorderThick(ATabVisibleIndex: Integer): Boolean; -begin - Result := False; -end; - -procedure TcxPCSlantedPainter.PaintButtonFrame(var ARect: TRect; - AButtonState: TcxPCNavigatorButtonState); - - function GetFrameColor: TColor; - begin - if AButtonState in [nbsNormal, nbsDisabled] then - Result := clBtnShadow - else - Result := clBlack; - end; - -begin - ParentInfo.Canvas.DrawComplexFrame(ARect, GetFrameColor, GetFrameColor); - InflateRect(ARect, -1, -1); -end; - -procedure TcxPCSlantedPainter.PaintFrame; -var - AFrameRect: TRect; -begin - AFrameRect := GetClientRect; - InflateRect(AFrameRect, 1, 1); - if ParentInfo.IsTabsContainer then - ExtendRect(AFrameRect, RotateRect(Rect(0, -TabsContainerOffset, 0, 0), ParentInfo.TabPosition)); - ParentInfo.Canvas.FrameRect(AFrameRect, GetFrameColor); -end; - -procedure TcxPCSlantedPainter.PaintTabShape(ATab: TcxTab; ATabVisibleIndex: Integer); - - procedure DrawFocusRect; - var - R: TRect; - begin - R := FOutTabImageAndTextData.TabTextRect; - if not IsRectEmpty(R) then - begin - case GetTextRotationAngle(ParentControl) of - ra0: - ExtendRect(R, Rect(-3, -2, -3, -2)); - raPlus90: - ExtendRect(R, Rect(-2, -3, -2, -3)); - raMinus90: - ExtendRect(R, Rect(-2, -3, -2, -3)); - end; - - ParentInfo.Canvas.Brush.Color := GetTabBodyColor(ATabVisibleIndex); - InternalDrawFocusRect(ATabVisibleIndex, R); - end; - end; - -var - R: TRect; -begin - SaveClipRgn; - try - R := ATab.FullRect; - PaintTabFrame(ATabVisibleIndex, R); - ParentInfo.Canvas.SetClipRegion(InternalGetTabClipRegion(ATabVisibleIndex, True), roIntersect); - PaintTabStateMark(ATabVisibleIndex); - DrawBackground(ParentInfo.Canvas.Canvas, R, ATabVisibleIndex, ATab.PaintingPosition in [tpLeft, tpRight], False); - finally - RestoreClipRgn; - end; - if ParentInfo.VisibleTabs[ATabVisibleIndex].IsMainTab then - DrawTabUnderline(ATabVisibleIndex); - DrawFocusRect; -end; - -procedure TcxPCSlantedPainter.PaintTabsRegion; - - procedure DrawLineBorder(ATabIndexInterval: TcxPCIndexInterval; AIsUpperLine, AIsLowerLine: Boolean); - var - ALineRect: TRect; - ALeftSide, ARightSide, ABottomSide: TcxBorder; - ATabInLine: TcxTab; - begin - ATabInLine := ParentInfo.VisibleTabs[ATabIndexInterval.Left]; - ALineRect := GetExtendedRect(GetTabsLineRect(ATabIndexInterval, AIsLowerLine), - Rect(0, -GetTabsNormalDistance.dh, 0, -1), ATabInLine.PaintingPosition); - - case ATabInLine.PaintingPosition of - tpTop: - begin - ALeftSide := bLeft; - ARightSide := bRight; - ABottomSide := bBottom; - end; - tpBottom: - begin - ALeftSide := bLeft; - ARightSide := bRight; - ABottomSide := bTop; - end; - tpLeft: - begin - ALeftSide := bBottom; - ARightSide := bTop; - ABottomSide := bRight; - end; - else - begin - ALeftSide := bBottom; - ARightSide := bTop; - ABottomSide := bLeft; - end; - end; - - if (spLeft in SlantedSides) and not AIsUpperLine then - DrawBorder(ParentInfo.Canvas, ALineRect, ALeftSide, [GetFrameColor], True); - if (spRight in SlantedSides) and not AIsUpperLine then - DrawBorder(ParentInfo.Canvas, ALineRect, ARightSide, [GetFrameColor], True); - DrawBorder(ParentInfo.Canvas, ALineRect, ABottomSide, [GetFrameColor], True); - end; - - procedure PaintLine(ATabIndexInterval: TcxPCIndexInterval; AIsUpperLine, AIsLowerLine: Boolean); - var - I: Integer; - begin - for I := ATabIndexInterval.Left to ATabIndexInterval.Right do - if I <> ParentInfo.MainTabVisibleIndex then - PaintTab(I); - DrawLineBorder(ATabIndexInterval, AIsUpperLine, AIsLowerLine); - end; - -var - J: Integer; - ALineIndexBoundsA: TcxPCLineIndexBoundsArray; - AFirstIndex, AlastIndex: Integer; -begin - InitializeVisibleTabRange(ParentControl, AFirstIndex, AlastIndex); - - if (ParentInfo.MainTabVisibleIndex <> -1) and - (AFirstIndex <= ParentInfo.MainTabVisibleIndex) and - (ParentInfo.MainTabVisibleIndex <= AlastIndex) then - PaintTab(ParentInfo.MainTabVisibleIndex); - - InitializeLineBoundsArray(ParentControl, ALineIndexBoundsA); - - for J := ParentInfo.TopOrLeftPartRowCount - 1 downto 0 do - PaintLine(ALineIndexBoundsA[J], J = 0, J = ParentInfo.TopOrLeftPartRowCount - 1); - - for J := ParentInfo.TopOrLeftPartRowCount to ParentInfo.RowCount - 1 do - PaintLine(ALineIndexBoundsA[J], J = ParentInfo.RowCount - 1, J = ParentInfo.TopOrLeftPartRowCount); -end; - -procedure TcxPCSlantedPainter.PrepareDrawTabContentBitmapBackground(ABitmap: TBitmap; - const ABitmapPos: TPoint; ATabVisibleIndex: Integer); -var - P: TPoint; - R: TRect; -begin - R := ParentInfo.VisibleTabs[ATabVisibleIndex].FullRect; - P := ABitmapPos; - if IsVerticalText(ParentControl) then - begin - R := Rect(R.Top, R.Left, R.Bottom, R.Right); - P := Point(P.Y, P.X); - end; - - if ParentInfo.Rotate and (GetTextRotationAngle(ParentControl) = raPlus90) then - OffsetRect(R, -R.Left + P.X + ABitmap.Width - R.Right, -P.Y) - else if not ParentInfo.Rotate and (GetTextRotationAngle(ParentControl) = raMinus90) then - OffsetRect(R, -P.X, -R.Top - (R.Bottom - P.Y - ABitmap.Height)) - else - OffsetRect(R, -P.X, -P.Y); - DrawBackground(ABitmap.Canvas, R, ATabVisibleIndex, ParentInfo.Rotate, - not ParentInfo.Rotate and (GetTextRotationAngle(ParentControl) = raMinus90) or - ParentInfo.Rotate and (GetTextRotationAngle(ParentControl) = raPlus90)); -end; - -function TcxPCSlantedPainter.CanLightMainTab: Boolean; -begin - Result := False; -end; - -function TcxPCSlantedPainter.DirectionalGetFigureRegion(const R: TRect; - APoints: array of TPoint; ALinePositions: array of TLinePosition; - ATabPositon: TcxTabPosition; AForContent: Boolean): TcxRegion; - - procedure CorrectPolylineEnd(AIndex: Integer); - begin - with APoints[AIndex] do - case ALinePositions[High(ALinePositions)] of - lpL: - Dec(Y); - lpLT: - begin - Inc(X); - Dec(Y); - end; - lpT: - Inc(X); - lpRT: - begin - Inc(X); - Inc(Y); - end; - lpR: - Inc(Y); - lpRB: - begin - Dec(X); - Inc(Y); - end; - lpB: - Dec(X); - lpLB: - begin - Dec(X); - Dec(Y); - end; - end; - end; - - procedure CorrectPolylineEnds; - begin - CorrectPolylineEnd(High(APoints)); - if (ATabPositon = tpLeft) and (ALinePositions[0] = lpLB) then - begin - Inc(APoints[0].X); - Inc(APoints[0].Y); - end; - end; - - procedure ReorderPoints; - const - ALinePositionConversionTable: array[TcxTabPosition, TLinePosition] of TLinePosition = ( - (lpL, lpLT, lpT, lpRT, lpR, lpRB, lpB, lpLB), - (lpL, lpLB, lpB, lpRB, lpR, lpRB, lpB, lpLB), - (lpB, lpLB, lpL, lpLT, lpT, lpRB, lpB, lpLB), - (lpB, lpRB, lpR, lpRT, lpT, lpRB, lpB, lpLB) - ); - var - ALinePosition: TLinePosition; - I: Integer; - P: TPoint; - begin - case ATabPositon of - tpBottom, tpRight: - begin - for I := 0 to Length(APoints) div 2 - 1 do - begin - P := APoints[I]; - APoints[I] := APoints[High(APoints) - I]; - APoints[High(APoints) - I] := P; - end; - for I := 0 to Length(ALinePositions) div 2 - 1 do - begin - ALinePosition := ALinePositions[I]; - ALinePositions[I] := ALinePositions[High(ALinePositions) - I]; - ALinePositions[High(ALinePositions) - I] := ALinePosition; - end; - end; - end; - for I := 0 to High(ALinePositions) do - ALinePositions[I] := ALinePositionConversionTable[ATabPositon, ALinePositions[I]]; - end; - -begin - RotatePolyline(R, APoints, ATabPositon); - ReorderPoints; - CorrectPolylineEnds; - Result := GetFigureRegion(APoints, ALinePositions, AForContent); -end; - -procedure TcxPCSlantedPainter.DrawBackground(ACanvas: TCanvas; R: TRect; - ATabVisibleIndex: Integer; AHorizontalGradient, AInverseGradient: Boolean); -var - AColor1, AColor2: TColor; - ATab: TcxTab; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if ATab.IsMainTab and not (CanLightMainTab and ATab.HotTrack) then - begin - ACanvas.Brush.Color := GetTabBodyColor(ATabVisibleIndex); - ACanvas.FillRect(R); - end - else - begin - if pcoGradient in ParentInfo.Options then - GetBackgroundGradientColors(ATabVisibleIndex, AColor1, AColor2) - else - begin - AColor1 := GetTabBodyColor(ATabVisibleIndex); - AColor2 := AColor1; - end; - if CanLightMainTab and ATab.IsMainTab and ATab.HotTrack and - (ATab.PaintingPosition in [tpBottom, tpRight]) then - ExchangeLongWords(AColor1, AColor2); - if AInverseGradient then - ExchangeLongWords(AColor1, AColor2); - FillGradientRect(ACanvas.Handle, R, AColor1, AColor2, AHorizontalGradient); - end; -end; - -procedure TcxPCSlantedPainter.DrawTabUnderline(ATabVisibleIndex: Integer); -var - AFrameColor: TColor; - ARHeight, ARWidth: Integer; - ATab: TcxTab; - P: TPoint; - R: TRect; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - AFrameColor := GetFrameColor; - ParentInfo.Canvas.Brush.Color := GetTabBodyColor(ATabVisibleIndex); - ParentInfo.Canvas.FillRect(GetTabUnderlineRect(ATab)); - - if ATab.IsMainTab then - begin - R := ATab.FullRect; - if not (spLeft in SlantedSides) then - begin - P := Point(R.Left, R.Bottom); - RotatePoint(R, P, ATab.PaintingPosition); - ParentInfo.Canvas.Pixels[P.X, P.Y] := AFrameColor; - end; - if not (spRight in SlantedSides) then - begin - GetRectSize(R, ATab.PaintingPosition in [tpTop, tpBottom], ARWidth, ARHeight); - P := Point(R.Left + ARWidth - 1, R.Bottom); - RotatePoint(R, P, ATab.PaintingPosition); - ParentInfo.Canvas.Pixels[P.X, P.Y] := AFrameColor; - end; - end; -end; - -procedure TcxPCSlantedPainter.GetBackgroundGradientColors(ATabVisibleIndex: Integer; - out AColor1, AColor2: TColor); -var - ATabColor: TColor; -begin - ATabColor := GetTabBodyColor(ATabVisibleIndex); - if ParentInfo.VisibleTabs[ATabVisibleIndex].HotTrack then - begin - AColor1 := Light(ATabColor, 20); - AColor2 := ATabColor; - end - else - begin - AColor1 := Light(ATabColor, 13); - AColor2 := Dark(ATabColor, 90); - end; -end; - -function TcxPCSlantedPainter.GetCutValue: Integer; -begin - Result := FCutValue; -end; - -function TcxPCSlantedPainter.GetGeometricalMinTabWidth: Integer; - - function GetCutSideCount: Integer; - begin - Result := 0; - if spLeft in ParentInfo.TabSlants.Positions then - Inc(Result); - if spRight in ParentInfo.TabSlants.Positions then - Inc(Result); - end; - -const - MinContentWidth = 4; - RoundedCornerSideWidth = 2; -begin - if ParentInfo.Rotate then - begin - Result := 0; - Exit; - end; - - if ParentInfo.TabSlants.Positions = [] then - Result := RoundedCornerSideWidth * 2 - else - begin - Result := 0; - Inc(Result, GetCutValue * GetCutSideCount); - if ParentInfo.TabSlants.Kind = skSlant then - Inc(Result, RoundedCornerSideWidth * (2 - GetCutSideCount)) - else - Inc(Result, GetFrameWidth * (2 - GetCutSideCount)); - end; - Inc(Result, MinContentWidth); -end; - -function TcxPCSlantedPainter.GetFrameColor: TColor; -begin - Result := clBtnShadow; -end; - -function TcxPCSlantedPainter.GetSlantedSides: TcxTabSlantPositions; -begin - if (ParentInfo.TabSlants.Kind = skSlant) and not ParentInfo.Rotate then - Result := ParentInfo.TabSlants.Positions - else - Result := []; -end; - -procedure TcxPCSlantedPainter.GetTabFramePolyline(ATabVisibleIndex: Integer; - out APoints: TPoints; out ALinePositions: TLinePositions); -var - ARHeight, ARWidth: Integer; - ATab: TcxTab; - R: TRect; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - R := ATab.FullRect; - GetRectSize(R, ATab.PaintingPosition in [tpTop, tpBottom], ARWidth, ARHeight); - - SetLength(APoints, 0); - SetLength(ALinePositions, 0); - if (spLeft in ParentInfo.TabSlants.Positions) and (not ParentInfo.Rotate or (ParentInfo.TabSlants.Kind = skCutCorner)) then - begin - if ParentInfo.TabSlants.Kind = skSlant then - AddPoints(APoints, [Point(R.Left, R.Bottom - 1), Point(R.Left + (ARHeight - 1), - R.Bottom - ARHeight)], ALinePositions, [lpLT]) - else - AddPoints(APoints, [Point(R.Left, R.Bottom - 1), Point(R.Left, R.Bottom - ARHeight + CutCornerSize), - Point(R.Left + CutCornerSize, R.Bottom - ARHeight)], ALinePositions, [lpL, lpLT]); - end - else - if (ParentInfo.TabSlants.Kind = skSlant) or (ParentInfo.TabSlants.Positions = []) then - AddPoints(APoints, [Point(R.Left, R.Bottom - 1), Point(R.Left, R.Bottom - ARHeight + 2), - Point(R.Left + 2, R.Bottom - ARHeight)], ALinePositions, [lpL, lpLT]) - else - AddPoints(APoints, [Point(R.Left, R.Bottom - 1), Point(R.Left, R.Bottom - ARHeight)], - ALinePositions, [lpL]); - - if (spRight in ParentInfo.TabSlants.Positions) and (not ParentInfo.Rotate or (ParentInfo.TabSlants.Kind = skCutCorner)) then - begin - if ParentInfo.TabSlants.Kind = skSlant then - AddPoints(APoints, [Point(ARWidth + R.Left - 1 - (ARHeight - 1), R.Bottom - ARHeight), - Point(ARWidth + R.Left - 1, R.Bottom - 1)], ALinePositions, [lpT, lpRT]) - else - AddPoints(APoints, [Point(ARWidth + R.Left - CutCornerSize - 1, R.Bottom - ARHeight), - Point(ARWidth + R.Left - 1, R.Bottom - ARHeight + CutCornerSize), Point(ARWidth + R.Left - 1, R.Bottom - 1)], - ALinePositions, [lpT, lpRT, lpR]); - end - else - if (ParentInfo.TabSlants.Kind = skSlant) or (ParentInfo.TabSlants.Positions = []) then - AddPoints(APoints, [Point(ARWidth + R.Left - 3, R.Bottom - ARHeight), - Point(ARWidth + R.Left - 1, R.Bottom - ARHeight + 2), Point(ARWidth + R.Left - 1, R.Bottom - 1)], - ALinePositions, [lpT, lpRT, lpR]) - else - AddPoints(APoints, [Point(ARWidth + R.Left - 1, R.Bottom - ARHeight), - Point(ARWidth + R.Left - 1, R.Bottom - 1)], ALinePositions, [lpT, lpR]); -end; - -function TcxPCSlantedPainter.GetTabImageSize: TSize; - - function CorrectSize(AValue: Integer): Integer; - begin - Result := AValue; - if Result > 0 then - Inc(Result, 2 * ParentInfo.ImageBorder); - end; - -begin - Result.cx := CorrectSize(GetTabBaseImageSize.cx); - Result.cy := CorrectSize(GetTabBaseImageSize.cy); -end; - -function TcxPCSlantedPainter.GetVerticalTextIndent: Integer; -begin - Result := 0; -end; - -function TcxPCSlantedPainter.InternalGetCutValue: Integer; -begin - if ParentInfo.TabSlants.Kind = skSlant then - Result := CalculateTabNormalHeight - 1 - else - Result := CutCornerSize; -end; - -function TcxPCSlantedPainter.InternalGetTabClipRegion(ATabVisibleIndex: Integer; - AForContent: Boolean): TcxRegion; -var - ALinePositions: TLinePositions; - APoints: TPoints; -begin - GetTabFramePolyline(ATabVisibleIndex, APoints, ALinePositions); - Result := DirectionalGetFigureRegion(ParentInfo.VisibleTabs[ATabVisibleIndex].FullRect, - APoints, ALinePositions, ParentInfo.VisibleTabs[ATabVisibleIndex].PaintingPosition, AForContent); -end; - -procedure TcxPCSlantedPainter.PaintTabFrame(ATabVisibleIndex: Integer; - const R: TRect); -var - ARHeight, ARWidth: Integer; - ATabPaintingPosition: TcxTabPosition; - ALinePositions: TLinePositions; - APoints: TPoints; -begin - ATabPaintingPosition := ParentInfo.VisibleTabs[ATabVisibleIndex].PaintingPosition; - GetRectSize(R, ATabPaintingPosition in [tpTop, tpBottom], ARWidth, ARHeight); - GetTabFramePolyline(ATabVisibleIndex, APoints, ALinePositions); - DirectionalPolyline(R, APoints, ATabPaintingPosition, GetFrameColor); -end; - -procedure TcxPCSlantedPainter.PaintTabStateMark(ATabVisibleIndex: Integer); -var - ATab: TcxTab; - R: TRect; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if ATab.HotTrack or ATab.IsMainTab then - begin - SubtractRect(R, ATab.FullRect, - GetExtendedRect(ATab.FullRect, Rect(0, GetFrameWidth + SlantedPainterTabStateMarkWidth, 0, 0), ATab.PaintingPosition)); - ParentInfo.Canvas.Brush.Color := clHighlight; - ParentInfo.Canvas.FillRect(R); - ParentInfo.Canvas.ExcludeClipRect(R); - end; -end; - -function TcxPCSlantedPainter.GetTabsLineRect(ATabIndexInterval: TcxPCIndexInterval; AFullRect: Boolean): TRect; - - procedure ExchangeTabs(var ALeftTab, ARightTab: TcxTab); - var - AExchangeTab: TcxTab; - begin - AExchangeTab := ALeftTab; - ALeftTab := ARightTab; - ARightTab := AExchangeTab; - end; - -var - ALeftTab, ARightTab: TcxTab; -begin - ALeftTab := ParentInfo.VisibleTabs[ATabIndexInterval.Left]; - ARightTab := ParentInfo.VisibleTabs[ATabIndexInterval.Right]; - Result := ALeftTab.VisibleRect; - case ParentInfo.TabPosition of - tpTop, tpBottom: - begin - if IsRightToLeftAlignment(ParentControl) then - ExchangeTabs(ALeftTab, ARightTab); - - if not AFullRect and not (spLeft in SlantedSides) then - Result.Left := ALeftTab.VisibleRect.Left - else - Result.Left := 0; - if not AFullRect and not (spRight in SlantedSides) then - Result.Right := ARightTab.VisibleRect.Right - else - Result.Right := ParentControl.Width; - end; - tpLeft, tpRight: - begin - if not IsBottomToTopAlignment(ParentControl) then - ExchangeTabs(ALeftTab, ARightTab); - - if not AFullRect and not (spRight in SlantedSides) then - Result.Top := ARightTab.VisibleRect.Top - else - Result.Top := 0; - if not AFullRect and not (spLeft in SlantedSides) then - Result.Bottom := ALeftTab.VisibleRect.Bottom - else - Result.Bottom := ParentControl.Height; - end; - end; -end; - -function TcxPCSlantedPainter.GetTabUnderlineRect(ATab: TcxTab): TRect; -begin - SubtractRect(Result, - GetExtendedRect(ATab.VisibleRect, Rect(0, 0, 0, -1), ATab.PaintingPosition), - ATab.VisibleRect); -end; - -{ TcxPCOneNotePainter } - -class function TcxPCOneNotePainter.GetStyleID: TcxPCStyleID; -begin - Result := cxPCOneNoteStyle; -end; - -class function TcxPCOneNotePainter.GetStyleName: TCaption; -begin - Result := 'OneNote'; -end; - -class function TcxPCOneNotePainter.HasLookAndFeel(ALookAndFeel: TcxLookAndFeel): Boolean; -begin - Result := False; -end; - -class function TcxPCOneNotePainter.AllowRotate: Boolean; -begin - Result := False; -end; - -function TcxPCOneNotePainter.CanLightMainTab: Boolean; -begin - Result := True; -end; - -procedure TcxPCOneNotePainter.DrawTabUnderline(ATabVisibleIndex: Integer); -var - AColor: TColor; - ARWidth, ARHeight: Integer; - ATab: TcxTab; - R: TRect; -begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if ATab.IsMainTab then - AColor := GetTabBodyColor(ATabVisibleIndex)//ParentInfo.PageColors[ATabVisibleIndex] - else - AColor := GetFrameColor; - R := ATab.FullRect; - GetRectSize(R, ATab.PaintingPosition in [tpTop, tpBottom], ARWidth, ARHeight); - DirectionalPolyline(R, [Point(R.Left, R.Bottom), Point(R.Left, R.Bottom)], - ATab.PaintingPosition, GetMiddleRGB(GetFrameColor, AColor, 50)); - DirectionalPolyline(R, [Point(R.Left + 1, R.Bottom), Point(R.Left + ARWidth - 1, R.Bottom)], - ATab.PaintingPosition, AColor); -end; - -procedure TcxPCOneNotePainter.GetBackgroundGradientColors(ATabVisibleIndex: Integer; - out AColor1, AColor2: TColor); -var - ATabColor: TColor; -begin - ATabColor := GetTabBodyColor(ATabVisibleIndex); - if ParentInfo.VisibleTabs[ATabVisibleIndex].HotTrack then - begin - AColor1 := Light(ATabColor, 20); - AColor2 := ATabColor; - end - else - begin - AColor1 := Light(ATabColor, 13); - AColor2 := Dark(ATabColor, 90); - end; -end; - -function TcxPCOneNotePainter.GetButtonsRegionHOffset: Integer; -begin - Result := 0; - if ParentInfo.IsTabsContainer then - Result := TabsContainerOffset; -end; - -function TcxPCOneNotePainter.GetDrawImageOffset(TabVisibleIndex: Integer): TRect; -begin - Result := Rect(0, OneNotePainterTabFrameWidth + 1, 0, 1); -end; - -function TcxPCOneNotePainter.GetDrawTextHOffset(TabVisibleIndex: Integer): TRect; -begin - Result := Rect(0, OneNotePainterTabFrameWidth + 2, 0, 1); -end; - -function TcxPCOneNotePainter.GetFrameColor: TColor; -begin - Result := OneNoteMainTabBorderColor; -end; - -function TcxPCOneNotePainter.GetGeometricalMinTabWidth: Integer; -const - MinContentWidth = 2; -begin - Result := GetCutValue + MinContentWidth + OneNotePainterTabFrameWidth; -end; - -function TcxPCOneNotePainter.GetSlantedSides: TcxTabSlantPositions; -begin - Result := [spLeft]; -end; - -function TcxPCOneNotePainter.GetTabContentWOffset(ATabVisibleIndex: Integer): TcxPCWOffset; -const - AContentOffset = 2; -begin - Result.Left := GetCutValue; - Result.Right := AContentOffset + OneNotePainterTabFrameWidth; - if GetTextRotationAngle(ParentControl) = raMinus90 then - ExchangeLongWords(Result.Left, Result.Right); -end; - -function TcxPCOneNotePainter.GetTabsContainerOffsets: TRect; -begin - Result := cxEmptyRect; - if ParentInfo.IsTabsContainer then - Result.Top := TabsContainerOffset; -end; - -function TcxPCOneNotePainter.GetTabsNormalDistance: TcxPCDistance; -begin - Result.dh := -3; - Result.dw := -GetCutValue + 5; -end; - -function TcxPCOneNotePainter.GetTabsRectOffset: TRect; -begin - Result := RotateRect(Rect(4, 0, 4, 0), ParentInfo.TabPosition); -end; - -function TcxPCOneNotePainter.InternalGetCutValue: Integer; -begin - Result := CalculateTabNormalHeight + 2; -end; - -function TcxPCOneNotePainter.InternalGetTabClipRegion(ATabVisibleIndex: Integer; - AForContent: Boolean): TcxRegion; -var - APaintingPosition: TcxTabPosition; - ARHeight, ARWidth: Integer; - R: TRect; -begin - ParentInfo.Canvas.BeginPath; - R := ParentInfo.VisibleTabs[ATabVisibleIndex].FullRect; - APaintingPosition := ParentInfo.VisibleTabs[ATabVisibleIndex].PaintingPosition; - if AForContent then - case APaintingPosition of - tpTop: - begin - Inc(R.Top); - Inc(R.Bottom); - GetRectSize(R, True, ARWidth, ARHeight); - DirectionalPolyline(R, [Point(R.Left + 2, R.Bottom - 1), Point(R.Left + (R.Bottom - R.Top - 2), R.Top + 3), - Point(R.Left + (R.Bottom - R.Top + 2), R.Top + 1), - Point(R.Right - 2, R.Top + 1), Point(R.Right - 2, R.Bottom - 1)], tpTop, clWhite); - end; - tpBottom: - begin - Inc(R.Left); - DirectionalPolyline(R, [Point(R.Left + 2, R.Bottom - 1), Point(R.Left + (R.Bottom - R.Top - 3), R.Top + 4), - Point(R.Left + (R.Bottom - R.Top + 2), R.Top + 1), - Point(R.Right - 2, R.Top + 1), Point(R.Right - 2, R.Bottom - 1)], tpBottom, clWhite); - end; - tpLeft: - begin - Inc(R.Top); - Inc(R.Left); - Inc(R.Right); - GetRectSize(R, False, ARWidth, ARHeight); - DirectionalPolyline(R, [Point(R.Left + 2, R.Bottom - 1), Point(R.Left + (ARHeight - 2), R.Bottom - ARHeight + 3), - Point(R.Left + (ARHeight + 2), R.Bottom - ARHeight + 1), - Point(ARWidth + R.Left - 2, R.Bottom - ARHeight + 1), Point(ARWidth + R.Left - 2, R.Bottom - 1)], tpLeft, clWhite); - end; - tpRight: - begin - Inc(R.Top); - GetRectSize(R, False, ARWidth, ARHeight); - DirectionalPolyline(R, [Point(R.Left + 2, R.Bottom - 1), Point(R.Left + (ARHeight - 1), R.Bottom - ARHeight + 3), - Point(R.Left + (ARHeight + 3), R.Bottom - ARHeight + 1), - Point(ARWidth + R.Left - 2, R.Bottom - ARHeight + 1), Point(ARWidth + R.Left - 2, R.Bottom - 1)], tpRight, clWhite); - end; - end - else - begin - InflateRect(R, 1, 1); - GetRectSize(R, APaintingPosition in [tpTop, tpBottom], ARWidth, ARHeight); - case APaintingPosition of - tpTop: - DirectionalPolyline(R, [Point(R.Left, R.Bottom - 2), Point(R.Left + 1, R.Bottom - 2), - Point(R.Left + (ARHeight - 3), R.Bottom - ARHeight + 3), Point(R.Left + (ARHeight + 2), R.Bottom - ARHeight), - Point(ARWidth + R.Left - 4, R.Bottom - ARHeight), Point(ARWidth + R.Left - 1, R.Bottom - ARHeight + 3), - Point(ARWidth + R.Left - 1, R.Bottom - 1)], tpTop, $9C613B); - tpBottom: - DirectionalPolyline(R, [Point(R.Left, R.Bottom - 2), Point(R.Left + 1, R.Bottom - 2), - Point(R.Left + (ARHeight - 3), R.Bottom - ARHeight + 3), Point(R.Left + (ARHeight + 2), R.Bottom - ARHeight), - Point(ARWidth + R.Left - 4, R.Bottom - ARHeight), Point(ARWidth + R.Left - 1, R.Bottom - ARHeight + 3), - Point(ARWidth + R.Left - 1, R.Bottom - 1)], tpBottom, $9C613B); - tpLeft: - DirectionalPolyline(R, [Point(R.Left, R.Bottom - 2), Point(R.Left + 1, R.Bottom - 2), - Point(R.Left + (ARHeight - 3), R.Bottom - ARHeight + 3), Point(R.Left + (ARHeight + 2), R.Bottom - ARHeight), - Point(ARWidth + R.Left - 5, R.Bottom - ARHeight), Point(ARWidth + R.Left - 1, R.Bottom - ARHeight + 4), - Point(ARWidth + R.Left - 1, R.Bottom - 1)], tpLeft, $9C613B); - tpRight: - DirectionalPolyline(R, [Point(R.Left - 1, R.Bottom - 1), Point(R.Left - 1, R.Bottom - 3), Point(R.Left + 2, R.Bottom - 3), - Point(R.Left + (ARHeight - 2), R.Bottom - ARHeight + 2), Point(R.Left + (ARHeight + 2), R.Bottom - ARHeight), - Point(ARWidth + R.Left - 4, R.Bottom - ARHeight), Point(ARWidth + R.Left - 1, R.Bottom - ARHeight + 3), - Point(ARWidth + R.Left - 1, R.Bottom - 1)], tpRight, $9C613B); - end; - end; - ParentInfo.Canvas.EndPath; - Result := TcxRegion.Create(PathToRegion(ParentInfo.Canvas.Handle)); -end; - -procedure TcxPCOneNotePainter.PaintTabFrame(ATabVisibleIndex: Integer; - const R: TRect); - - procedure PrepareColors(out ABorderColor, AInnerBorderColor1, AInnerBorderColor2: TColor); - var - ATab: TcxTab; - begin - ATab := ParentInfo.VisibleTabs[ATabVisibleIndex]; - if ATab.HotTrack then - begin - ABorderColor := OneNoteTabHotBorderColor; - AInnerBorderColor1 := OneNoteTabHotBorderColor; - AInnerBorderColor2 := OneNoteTabHotBorderColor; - end - else - if ATab.IsMainTab then - begin - ABorderColor := OneNoteMainTabBorderColor; - AInnerBorderColor1 := GetMiddleRGB(clWhite, GetTabBodyColor(ATabVisibleIndex), 60); - AInnerBorderColor2 := GetMiddleRGB(AInnerBorderColor1, GetTabBodyColor(ATabVisibleIndex), 70); - end - else - begin - ABorderColor := OneNoteTabBorderColor; - AInnerBorderColor1 := GetMiddleRGB(clWhite, OneNoteTabInnerBorderColor2, 50); - AInnerBorderColor1 := GetMiddleRGB(AInnerBorderColor1, GetTabBodyColor(ATabVisibleIndex), 50); - AInnerBorderColor2 := GetMiddleRGB(OneNoteTabInnerBorderColor2, GetTabBodyColor(ATabVisibleIndex), 50); - end; - end; - - function GetColorAt(P: TPoint): TColor; - var - ANeighbourTabVisibleIndex: Integer; - begin - RotatePoint(R, P, ParentInfo.VisibleTabs[ATabVisibleIndex].PaintingPosition); - ANeighbourTabVisibleIndex := ParentControl.IndexOfTabAt(P.X, P.Y); - if ANeighbourTabVisibleIndex = -1 then - Result := ParentInfo.Color - else - Result := GetTabBodyColor(ANeighbourTabVisibleIndex); - end; - -var - ABorderColor, AInnerBorderColor1, AInnerBorderColor2: TColor; - ARHeight, ARWidth: Integer; - ATabPaintingPosition: TcxTabPosition; -begin - ATabPaintingPosition := ParentInfo.VisibleTabs[ATabVisibleIndex].PaintingPosition; - GetRectSize(R, ATabPaintingPosition in [tpTop, tpBottom], ARWidth, ARHeight); - PrepareColors(ABorderColor, AInnerBorderColor1, AInnerBorderColor2); - - DirectionalPolyline(R, [Point(R.Left, R.Bottom - 1), Point(R.Left, R.Bottom - 1)], - ATabPaintingPosition, GetMiddleRGB(ABorderColor, GetColorAt(Point(R.Left - 1, R.Bottom - 1)), 25)); - DirectionalPolyline(R, [Point(R.Left + 1, R.Bottom - 1), Point(R.Left + 1, R.Bottom - 1), - Point(R.Left + (ARHeight - 3), R.Bottom - ARHeight + 3), Point(R.Left + (ARHeight + 2), R.Bottom - ARHeight), - Point(ARWidth + R.Left - 3, R.Bottom - ARHeight), Point(ARWidth + R.Left - 1, R.Bottom - ARHeight + 2), - Point(ARWidth + R.Left - 1, R.Bottom - 1)], ATabPaintingPosition, ABorderColor); - DirectionalPolyline(R, [Point(R.Left + (ARHeight + 2), R.Bottom - ARHeight), - Point(R.Left + (ARHeight + 2), R.Bottom - ARHeight)], ATabPaintingPosition, GetMiddleRGB(ABorderColor, GetColorAt(Point(R.Left + (ARHeight + 1), R.Bottom - ARHeight)), 60)); - DirectionalPolyline(R, [Point(R.Left + 2, R.Bottom - 1), Point(R.Left + (ARHeight - 3), R.Bottom - ARHeight + 4), - Point(R.Left + (ARHeight + 2), R.Bottom - ARHeight + 1), - Point(ARWidth + R.Left - 4, R.Bottom - ARHeight + 1)], ATabPaintingPosition, AInnerBorderColor1); - DirectionalPolyline(R, [Point(ARWidth + R.Left - 3, R.Bottom - ARHeight + 1), Point(ARWidth + R.Left - 2, R.Bottom - ARHeight + 2), - Point(ARWidth + R.Left - 2, R.Bottom - 1)], ATabPaintingPosition, AInnerBorderColor2); -end; - -procedure TcxPCOneNotePainter.PaintTabStateMark(ATabVisibleIndex: Integer); -begin - // do nothing -end; - -{ TcxPaletteChangedNotifier } - -procedure TcxPaletteChangedNotifier.DoChanged; -begin - PrepareOneNoteStyleColors; -end; - -initialization - CalculateLightBrushColor; - PrepareOneNoteStyleColors; - FPaletteChangedNotifier := TcxPaletteChangedNotifier.Create(True); - RegisterPCPainterClass(TcxPCTabsPainter); - RegisterPCPainterClass(TcxPCButtonsPainter); - RegisterPCPainterClass(TcxPCFlatButtonsPainter); - RegisterPCPainterClass(TcxPCExtraFlatPainter); - RegisterPCPainterClass(TcxPCUltraFlatPainter); - RegisterPCPainterClass(TcxPCFlatPainter); - RegisterPCPainterClass(TcxPCOffice11Painter); - RegisterPCPainterClass(TcxPCSlantedPainter); - RegisterPCPainterClass(TcxPCOneNotePainter); - -finalization - UnregisterPCPainterClass(TcxPCTabsPainter); - UnregisterPCPainterClass(TcxPCButtonsPainter); - UnregisterPCPainterClass(TcxPCFlatButtonsPainter); - UnregisterPCPainterClass(TcxPCExtraFlatPainter); - UnregisterPCPainterClass(TcxPCUltraFlatPainter); - UnregisterPCPainterClass(TcxPCFlatPainter); - UnregisterPCPainterClass(TcxPCOffice11Painter); - UnregisterPCPainterClass(TcxPCSlantedPainter); - UnregisterPCPainterClass(TcxPCOneNotePainter); - FreeAndNil(FPaletteChangedNotifier); - -end. - diff --git a/internal/x.46/ExpressPageControl 2/Sources/cxPCPaintersFactory.pas b/internal/x.46/ExpressPageControl 2/Sources/cxPCPaintersFactory.pas deleted file mode 100644 index 132236a1..00000000 --- a/internal/x.46/ExpressPageControl 2/Sources/cxPCPaintersFactory.pas +++ /dev/null @@ -1,237 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPageControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPAGECONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxPCPaintersFactory; - -{$I cxVer.inc} - -interface - -uses - Classes, Controls, SysUtils, dxCore, cxClasses, cxLookAndFeels, cxPC, cxPCConsts; - -type - - TcxPCPaintersFactory = class - private - FPainterClassList: TList; - class procedure OutError(SourceMethodName, Msg: string); - function GetPainterClassCount: Integer; - function InternalGetPainterClass(Index: Integer): TcxPCPainterClass; - public - constructor Create; - destructor Destroy; override; - - procedure FreePainterInstance(Painter: TcxPCCustomPainter); - - function GetDefaultStyleID(ALookAndFeel: TcxLookAndFeel): TcxPCStyleID; - function GetPainterClass(const StandardStyle: TcxPCStandardStyle): TcxPCPainterClass; overload; - function GetPainterClass(const StyleID: TcxPCStyleID): TcxPCPainterClass; overload; - function GetPainterClass(const StyleName: TCaption): TcxPCPainterClass; overload; - function GetPainterInstance(PCPainterClass: TcxPCPainterClass; AParent: TcxCustomTabControl): TcxPCCustomPainter; - - function GetStyleID(ALookAndFeel: TcxLookAndFeel): TcxPCStyleID; - - procedure RegisterPCPainterClass(PCPainterClass: TcxPCPainterClass); - procedure UnregisterPCPainterClass(PCPainterClass: TcxPCPainterClass); - - property PainterClassCount: Integer read GetPainterClassCount; - property PainterClasses[Index: Integer]: TcxPCPainterClass read InternalGetPainterClass; - end; - -function PaintersFactory: TcxPCPaintersFactory; -procedure RegisterPCPainterClass(PCPainterClass: TcxPCPainterClass); -procedure UnregisterPCPainterClass(PCPainterClass: TcxPCPainterClass); - -implementation - -var - FPaintersFactory: TcxPCPaintersFactory = nil; - -function PaintersFactory: TcxPCPaintersFactory; -begin - Result := FPaintersFactory; -end; - -procedure RegisterPCPainterClass(PCPainterClass: TcxPCPainterClass); -begin - if FPaintersFactory = nil then - FPaintersFactory := TcxPCPaintersFactory.Create; - FPaintersFactory.RegisterPCPainterClass(PCPainterClass); -end; - -procedure UnregisterPCPainterClass(PCPainterClass: TcxPCPainterClass); -begin - if FPaintersFactory <> nil then - begin - FPaintersFactory.UnregisterPCPainterClass(PCPainterClass); - if FPaintersFactory.PainterClassCount = 0 then - FreeAndNil(FPaintersFactory); - end; -end; - -{ TcxPCPaintersFactory } - -constructor TcxPCPaintersFactory.Create; -begin - inherited Create; - FPainterClassList := TList.Create; -end; - -destructor TcxPCPaintersFactory.Destroy; -begin - FPainterClassList.Free; - inherited Destroy; -end; - -procedure TcxPCPaintersFactory.FreePainterInstance( - Painter: TcxPCCustomPainter); -begin - if Painter <> nil then Painter.Free; -end; - -function TcxPCPaintersFactory.GetDefaultStyleID(ALookAndFeel: TcxLookAndFeel): TcxPCStyleID; -var - I: Integer; -begin - if PainterClassCount = 0 then - OutError('GetDefaultStyleID', scxPCNoRegisteredStyles); - Result := PainterClasses[0].GetStyleID; - for I := PainterClassCount - 1 downto 0 do - if PainterClasses[I].IsDefault(ALookAndFeel) then - begin - Result := PainterClasses[I].GetStyleID; - Break; - end; -end; - -function TcxPCPaintersFactory.GetPainterClass(const StandardStyle: TcxPCStandardStyle): - TcxPCPainterClass; -var - I: Integer; -begin - for I := 0 to PainterClassCount - 1 do - begin - Result := PainterClasses[I]; - if Result.IsStandardStyle and (Result.GetStandardStyle = StandardStyle) then - Exit; - end; - Result := nil; -end; - -function TcxPCPaintersFactory.GetPainterClass(const StyleID: TcxPCStyleID): TcxPCPainterClass; -var - I: Integer; -begin - for I := 0 to PainterClassCount - 1 do - begin - Result := PainterClasses[I]; - if Result.GetStyleID = StyleID then Exit; - end; - Result := nil; -end; - -function TcxPCPaintersFactory.GetPainterClass(const StyleName: TCaption): TcxPCPainterClass; -var - I: Integer; -begin - for I := 0 to PainterClassCount - 1 do - begin - Result := PainterClasses[I]; - if AnsiUpperCase(Result.GetStyleName) = AnsiUpperCase(StyleName) then - Exit; - end; - Result := nil; -end; - -function TcxPCPaintersFactory.GetPainterClassCount: Integer; -begin - Result := FPainterClassList.Count; -end; - -function TcxPCPaintersFactory.GetPainterInstance(PCPainterClass: TcxPCPainterClass; - AParent: TcxCustomTabControl): TcxPCCustomPainter; -begin - if PCPainterClass = nil then - begin - Result := nil; - OutError('GetPainterInstance', scxPCPainterClassError); - end - else - Result := PCPainterClass.Create(AParent); -end; - -function TcxPCPaintersFactory.GetStyleID(ALookAndFeel: TcxLookAndFeel): TcxPCStyleID; -var - I: Integer; -begin - Result := cxPCNoStyle; - for I := PainterClassCount - 1 downto 0 do - if PainterClasses[I].HasLookAndFeel(ALookAndFeel) then - begin - Result := PainterClasses[I].GetStyleID; - Break; - end; -end; - -function TcxPCPaintersFactory.InternalGetPainterClass(Index: Integer): TcxPCPainterClass; -begin - Result := TcxPCPainterClass(FPainterClassList.Items[Index]); -end; - -class procedure TcxPCPaintersFactory.OutError(SourceMethodName, Msg: string); -begin - raise EdxException.Create('TcxPCPaintersFactory.' + SourceMethodName + ': ' + Msg); -end; - -procedure TcxPCPaintersFactory.RegisterPCPainterClass( - PCPainterClass: TcxPCPainterClass); -begin - if FPainterClassList.IndexOf(TObject(PCPainterClass)) = -1 then - FPainterClassList.Add(TObject(PCPainterClass)); -end; - -procedure TcxPCPaintersFactory.UnregisterPCPainterClass( - PCPainterClass: TcxPCPainterClass); -begin - FPainterClassList.Remove(TObject(PCPainterClass)); -end; - -initialization - -finalization - FreeAndNil(FPaintersFactory); - -end. diff --git a/internal/x.46/ExpressPageControl 2/Sources/cxPCReg.dcr b/internal/x.46/ExpressPageControl 2/Sources/cxPCReg.dcr deleted file mode 100644 index 17054b7a..00000000 Binary files a/internal/x.46/ExpressPageControl 2/Sources/cxPCReg.dcr and /dev/null differ diff --git a/internal/x.46/ExpressPageControl 2/Sources/cxPCReg.pas b/internal/x.46/ExpressPageControl 2/Sources/cxPCReg.pas deleted file mode 100644 index 93014a0d..00000000 --- a/internal/x.46/ExpressPageControl 2/Sources/cxPCReg.pas +++ /dev/null @@ -1,276 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPageControl } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPAGECONTROL AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxPCReg; - -{$I cxVer.inc} - -interface - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI6} - DesignEditors, DesignIntf, DesignMenus, -{$ELSE} - DsgnIntf, Menus, -{$ENDIF} - Classes, Forms, SysUtils, dxCore, cxPC, cxPCConsts, cxPCPaintersFactory, - dxCoreReg, cxLibraryReg; - -const - cxPCMajorVersion = '2'; - cxPCProductName = 'ExpressPageControl Suite'; - cxPageControlComponentEditorVerbA: array[0 .. 3] of string = ( - 'New Page', - 'Next Page', - 'Previous Page', - 'Delete Page' - ); - -type - { TcxPCStyleProperty } - - TcxPCStyleProperty = class(TOrdinalProperty) - private - class procedure OutError(SourceMethodName, Msg: string); - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - { TcxTabControlComponentEditor } - - TcxTabControlComponentEditor = class(TdxComponentEditor) - protected - function GetProductMajorVersion: string; override; - function GetProductName: string; override; - end; - - { TcxPageControlActivePageProperty } - - TcxPageControlActivePageProperty = class(TComponentProperty) - public - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - end; - - { TcxPageControlComponentEditor } - - TcxPageControlComponentEditor = class(TcxTabControlComponentEditor) - private - function GetPageControl: TcxPageControl; - protected - function InternalGetVerb(AIndex: Integer): string; override; - function InternalGetVerbCount: Integer; override; - procedure InternalExecuteVerb(AIndex: Integer); override; - - procedure AddPage; - procedure NextPage(GoForward: Boolean); - property PageControl: TcxPageControl read GetPageControl; - public - procedure Edit; override; - procedure PrepareItem(Index: Integer; const AItem: TDesignMenuItem); override; - end; - -{ TcxPCStyleProperty } - -function TcxPCStyleProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paMultiSelect, paRevertable, paSortList, paValueList]; -end; - -function TcxPCStyleProperty.GetValue: string; -begin - Result := GetPCStyleName(GetOrdValue); -end; - -procedure TcxPCStyleProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - Proc(cxPCDefaultStyleName); - for I := 0 to PaintersFactory.PainterClassCount - 1 do - Proc(PaintersFactory.PainterClasses[I].GetStyleName); -end; - -class procedure TcxPCStyleProperty.OutError(SourceMethodName, Msg: string); -begin - raise EdxException.Create('TcxPCStyleProperty.' + SourceMethodName + ': ' + Msg); -end; - -procedure TcxPCStyleProperty.SetValue(const Value: string); -var - PainterClass: TcxPCPainterClass; -begin - if Value = cxPCDefaultStyleName then - SetOrdValue(cxPCDefaultStyle) - else - begin - PainterClass := PaintersFactory.GetPainterClass(Value); - if PainterClass = nil then - OutError('SetValue', Format(scxPCStyleNameError, [Value])) - else - SetOrdValue(PainterClass.GetStyleID); - end; -end; - -{ TcxTabControlComponentEditor } - -function TcxTabControlComponentEditor.GetProductMajorVersion: string; -begin - Result := cxPCMajorVersion; -end; - -function TcxTabControlComponentEditor.GetProductName: string; -begin - Result := cxPCProductName; -end; - -{ TcxPageControlActivePageProperty } - -function TcxPageControlActivePageProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paValueList]; -end; - -procedure TcxPageControlActivePageProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; - Component: TComponent; -begin - for I := 0 to Designer.GetRoot.ComponentCount - 1 do - begin - Component := Designer.GetRoot.Components[I]; - if (Component.Name <> '') and (Component is TcxTabSheet) and - (TcxTabSheet(Component).PageControl = GetComponent(0)) then - Proc(Component.Name); - end; -end; - -{ TcxPageControlComponentEditor } - -procedure TcxPageControlComponentEditor.Edit; -begin -end; - -procedure TcxPageControlComponentEditor.PrepareItem(Index: Integer; - const AItem: TDesignMenuItem); -begin - inherited PrepareItem(Index, AItem); - if (Index > 0) and (Index < GetVerbCount - 3) then - if Index < 3 then - AItem.Enabled := PageControl.PageCount > 1 - else - AItem.Enabled := Component is TcxTabSheet; -end; - -function TcxPageControlComponentEditor.InternalGetVerb(AIndex: Integer): string; -begin - Result := cxPageControlComponentEditorVerbA[AIndex]; -end; - -function TcxPageControlComponentEditor.InternalGetVerbCount: Integer; -begin - Result := Length(cxPageControlComponentEditorVerbA); -end; - -procedure TcxPageControlComponentEditor.InternalExecuteVerb(AIndex: Integer); -begin - case AIndex of - 0: AddPage; - 1: NextPage(True); - 2: NextPage(False); - 3: if (PageControl.ActivePage <> nil) then - begin - Designer.SelectComponent(PageControl); - PageControl.ActivePage.Free; - end; - end; -end; - -procedure TcxPageControlComponentEditor.AddPage; -var - Page: TcxTabSheet; -begin - Page := TcxTabSheet.Create(Designer.GetRoot); - Page.Name := Designer.UniqueName(TcxTabSheet.ClassName); - Page.PageControl := PageControl; - Page.ImageIndex := Page.TabIndex; - PageControl.ActivePage := Page; - Designer.SelectComponent(Page); -end; - -procedure TcxPageControlComponentEditor.NextPage(GoForward: Boolean); -var - APrevActivePage: TcxTabSheet; -begin - APrevActivePage := PageControl.ActivePage; - PageControl.SelectNextPage(GoForward, False); - if PageControl.ActivePage <> APrevActivePage then - Designer.SelectComponent(PageControl.ActivePage); -end; - -function TcxPageControlComponentEditor.GetPageControl: TcxPageControl; -begin - if Component is TcxPageControl then - Result := TcxPageControl(Component) - else - Result := TcxTabSheet(Component).PageControl; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterComponents('Dev Express', [TcxTabControl, TcxPageControl]); - - RegisterComponentEditor(TcxTabControl, TcxTabControlComponentEditor); - RegisterComponentEditor(TcxPageControl, TcxPageControlComponentEditor); - RegisterComponentEditor(TcxTabSheet, TcxPageControlComponentEditor); - - RegisterPropertyEditor(TypeInfo(TcxPCStyleID), nil, '', TcxPCStyleProperty); - RegisterPropertyEditor(TypeInfo(TcxTabSheet), TcxPageControl, 'ActivePage', TcxPageControlActivePageProperty); - - RegisterClass(TcxTabSheet); -end; - -end. diff --git a/internal/x.46/ExpressPageControl 2/Sources/cxVer.inc b/internal/x.46/ExpressPageControl 2/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/ExpressPageControl 2/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/ExpressPrinting System/EULA.txt b/internal/x.46/ExpressPrinting System/EULA.txt deleted file mode 100644 index 432deb02..00000000 --- a/internal/x.46/ExpressPrinting System/EULA.txt +++ /dev/null @@ -1,119 +0,0 @@ -DEVELOPER EXPRESS INC -ExpressPrinting System(tm) COMPONENT SUITE -Copyright (C) 1999-2009 Developer Express Inc. - -END-USER LICENSE AGREEMENT -FOR ALL SOFTWARE COMPONENT PRODUCT(S) - -IMPORTANT- READ CAREFULLY: This DEVELOPER EXPRESS INC ("DEVEXPRESS") End-User License Agreement ("EULA") is a legal agreement between you, a developer of software applications, ("Developer End User") and DEVEXPRESS for all DEVEXPRESS products, controls, source code, demos, intermediate files, media, printed materials, and "online" or electronic documentation ("SOFTWARE COMPONENT PRODUCT(S)") contained in this installation file. - -DEVEXPRESS grants to you as an individual, a personal, nonexclusive license to install and use the SOFTWARE COMPONENT PRODUCT(S) for the sole purposes of designing, developing, testing, and deploying application programs which you create. By installing, copying, or otherwise using the SOFTWARE COMPONENT PRODUCT(S), you agree to be bound by the terms of this EULA. If you do not agree to any part of the terms of this EULA, DO NOT INSTALL, USE, EVALUATE, OR REPLICATE IN ANY MANNER, ANY PART, FILE OR PORTION OF THE SOFTWARE COMPONENT PRODUCT(S). - -All SOFTWARE COMPONENT PRODUCT(S) is licensed, not sold. If you are an individual, you must acquire an individual license for the SOFTWARE COMPONENT PRODUCT(S) from DEVEXPRESS or its authorized resellers. If you are an entity, you must acquire and assign an individual license for each Developer End User within your organization using and or developing with the SOFTWARE COMPONENT PRODUCT(S) from DEVEXPRESS or its authorized resellers. - -If the SOFTWARE COMPONENT PRODUCT(S) you have obtained is marked as a "TRIAL" or "EVALUATION," you may install one copy of the SOFTWARE COMPONENT PRODUCT(S) for testing purposes for a period of 30 calendar days from the date of installation ("Evaluation Period"). Upon expiration of the Evaluation Period, the SOFTWARE COMPONENT PRODUCT(S) must be uninstalled and all copies destroyed. - -RIGOROUS ENFORCEMENT OF INTELLECTUAL PROPERTY RIGHTS. If the licensed right of use for this SOFTWARE COMPONENT PRODUCT(S) is purchased by you with any intent to reverse engineer, decompile, create derivative works, and the exploitation or unauthorized transfer of, any DEVEXPRESS intellectual property and trade secrets, to include any exposed methods or source code where provided, no licensed right of use shall exist, and any PRODUCT(s) created as a result shall be judged illegal by definition of all applicable law. Any sale or resale of intellectual property or created derivatives so obtained will be prosecuted to the fullest extent of all local, federal and international law. - -1. GRANT OF LICENSE. - -This EULA, if legally executed as defined herein, licenses and so grants the single individual Developer End User the following rights: - -SOFTWARE COMPONENT PRODUCT(S) - Developer End User may install and use the SOFTWARE COMPONENT PRODUCT(S) on a single computer. Developer End User may also install and use the SOFTWARE COMPONENT PRODUCT(S) on a portable computer. - -2. LIMITATIONS ON REVERSE ENGINEERING, DECOMPILATION, AND DISASSEMBLY. - -You may not reverse engineer, decompile, create derivative works, translate, or disassemble the SOFTWARE COMPONENT PRODUCT(S), and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. You agree to take all reasonable, legal and appropriate measures to prohibit the illegal dissemination of the SOFTWARE COMPONENT PRODUCT(S) or any of its constituent parts and redistributables to the fullest extent of all applicable local, US Codes and International Laws and Treaties regarding anti-circumvention, including but not limited to, the Geneva and Berne World Intellectual Property Organization (WIPO) Diplomatic Conferences. - -3. SEPARATION OF COMPONENTS. - -The SOFTWARE COMPONENT PRODUCT(S) is licensed as a single PRODUCT(s). The SOFTWARE COMPONENT PRODUCT(S) and its constituent parts and any provided redistributables may not be reverse engineered, decompiled, disassembled or separated for use on more than one computer, nor placed for distribution, sale, or resale as individual creations by Developer End User. The provision of source code, if included with the SOFTWARE COMPONENT PRODUCT(S), does not constitute transfer of any legal rights to such code, and resale or distribution of all or any portion of all source code and intellectual property will be prosecuted to the fullest extent of all applicable local, federal and international laws. All DEVEXPRESS libraries, source code, redistributables and other files remain DEVEXPRESS's exclusive property. You may not distribute any files, except those that DEVEXPRESS has expressly designated as Redistributable. - -4. RENTAL. - -You may not rent, lease, or lend the SOFTWARE COMPONENT PRODUCT(S). - -5. TRANSFER. - -You may NOT permanently or temporarily transfer ANY of your rights under this EULA to any individual or entity without prior written approval from DEVEXPRESS. Regardless of any modifications which you make and regardless of how you might compile, link, and/or package your programs, under no circumstances may the libraries, Redistributables, and/or other files of the SOFTWARE COMPONENT PRODUCT(S) (including any portions thereof) be used for developing programs by anyone other than you. Only you as the licensed Developer End User have the right to use the libraries, redistributables, or other files of the SOFTWARE COMPONENT PRODUCT(S) (or any portions thereof) for developing programs created with the SOFTWARE COMPONENT PRODUCT(S). In particular, you may not share copies of the Redistributables with other co-developers. You may not reproduce or distribute any DEVEXPRESS documentation without DEVEXPRESS's explicit permission. - -If you are an entity (Company), you must acquire and assign a license to each Developer End User within your organization using and or developing with the SOFTWARE COMPONENT PRODUCT(S). With written notification to DEVEXPRESS, Company may transfer the license obtained for a Developer End User to another Developer End User employed or otherwise engaged by Company if the initial Developer End User is no longer employed or engaged by Company or is reassigned to another function within Company and no longer develops software applications using the SOFTWARE COMPONENT PRODUCT(S). In addition, with written notification to DEVEXPRESS, Company may transfer its license of the SOFTWARE COMPONENT PRODUCT(S) to a successor Company. - -6. ROYALTY FREE REDISTRIBUTION. - -DEVEXPRESS PRODUCT(s) may include certain files ("Redistributable(s)") intended for distribution by you to the users of software applications which you create. Redistributables include, for example, those files identified in printed or on-line documentation as redistributable files, or those files preselected for deployment by an install utility provided with the SOFTWARE COMPONENT PRODUCT(S) (if any). In all circumstances, the Redistributables for the SOFTWARE COMPONENT PRODUCT(S) are only those files specifically designated as such by DEVEXPRESS. - -Subject to all of the terms and conditions in this EULA, you may reproduce and distribute copies of the Redistributables, provided that such copies are made from the original copy of the Redistributables included with the SOFTWARE COMPONENT PRODUCT(S) or modified versions of the Redistributables which are provided to you by DEVEXPRESS or those which you create. Copies of Redistributables may only be distributed with and for the sole purpose of executing application programs permitted under this EULA that you have created using the SOFTWARE COMPONENT PRODUCT(S). - -REDISTRIBUTABLES. To obtain a list of redistributables that apply under this EULA, contact support@devexpress.com - -AT NO TIME MAY DEVELOPER END USER CREATE ANY TOOL, REDISTRIBUTABLE, OR SOFTWARE COMPONENT PRODUCT(S) THAT DIRECTLY OR INDIRECTLY COMPETES WITH DEVEXPRESS SOFTWARE COMPONENT PRODUCT(S) WHICH UTILIZES ALL OR ANY PORTION OF THE SOFTWARE COMPONENT PRODUCT(S) contained within this installation. - -Distribution by the Developer End User of any design-time tools (EXE's OCX's or DLL's), executables, and source code distributed to Developer End User by DEVEXPRESS as part of this SOFTWARE COMPONENT PRODUCT(S) and not explicitly identified as a redistributable file is strictly prohibited. The Developer End User shall not develop software applications that provide an application programming interface to the SOFTWARE COMPONENT PRODUCT(S) or the SOFTWARE COMPONENT PRODUCT(S) as modified. - -The Developer End User may NOT distribute the SOFTWARE COMPONENT PRODUCT(S), in any format, to other users for development or application compilation purposes. Specifically, if Developer End User creates a control using the SOFTWARE COMPONENT PRODUCT(S) as a constituent control, Developer End User may NOT distribute the control created with the SOFTWARE COMPONENT PRODUCT(S) (in any format) to users to be used used at design time and or for ANY development purposes. - -Developer End User MAY NOT REDISTRIBUTE any SOFTWARE COMPONENT PRODUCT(s) files if using an evaluation, trial, Not for Resale, or demo version of the SOFTWARE COMPONENT PRODUCT(s). - -7. UPGRADES. - -If the SOFTWARE COMPONENT PRODUCT(S) is labeled as an upgrade, you must be properly licensed to use the SOFTWARE COMPONENT PRODUCT(S) identified by DEVEXPRESS as being eligible for the upgrade in order to use the SOFTWARE COMPONENT PRODUCT(S). A SOFTWARE COMPONENT PRODUCT(S) labeled as an upgrade replaces and/or supplements the SOFTWARE COMPONENT PRODUCT(S) that formed the basis for your eligibility for the upgrade, and together constitutes a single PRODUCT(S). You may use the resulting upgraded PRODUCT(S) only in accordance with all the terms of this EULA. - -8. COPYRIGHT. - -All title and copyrights in and to the SOFTWARE COMPONENT PRODUCT(S) (including but not limited to any copywritten images, demos, source code, intermediate files, packages, photographs, redistributables, animations, video, audio, music, text, and "applets" incorporated into the SOFTWARE COMPONENT PRODUCT(S) the accompanying printed materials, and any copies of the SOFTWARE COMPONENT PRODUCT(S)) are owned by DEVEXPRESS or its subsidiaries. The SOFTWARE COMPONENT PRODUCT(S) is protected by copyright laws and international treaty provisions and therefore, you must treat the SOFTWARE COMPONENT PRODUCT(S) like any other copyrighted material except that you may install the SOFTWARE COMPONENT PRODUCT(S) as described in this EULA. - -9. DUAL-MEDIA SOFTWARE COMPONENT PRODUCT(S). - -You may receive the SOFTWARE COMPONENT PRODUCT(S) in more than one medium. Regardless of the medium, you may use only one medium that is appropriate for your single computer. You may not loan, sell, rent, lease, or otherwise transfer in any manner the other medium to another user or entity. - -10. U.S. GOVERNMENT RESTRICTED RIGHTS. - -The Licensed Software is Commercial Computer Software provided with RESTRICTED RIGHTS under Federal Acquisition Regulations and agency supplements to them. Use, duplication or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFAR 255.227-7013 et. seq. or 252.211-7015, or subparagraphs (a) through (d) of the Commercial Computer Software Restricted Rights at FAR 52.227-19, as applicable, or similar clauses in the NASA FAR Supplement. Contractor-manufacturer is Developer Express Inc. / 801 N. Brand Blvd Suite 850, Glendale CA 91203. - -11. EXPORT RESTRICTIONS. - -DEVEXPRESS expressly complies with all export restrictions imposed by the government of the United States of America. You, as Developer End User, must agree not to export or re-export the SOFTWARE COMPONENT PRODUCT(S) within any created application to any country, person, entity or end user subject to U.S.A. export restrictions. Restricted countries currently include, but are not necessarily limited to Cuba, Iran, Iraq, Libya, North Korea, Sudan, and Syria. You warrant and represent that neither the U.S.A. Bureau of Export Administration nor any other federal agency has suspended, revoked or denied your export privileges. - -12. NOTE ON JAVA SUPPORT. - -Certain SOFTWARE COMPONENT PRODUCT(S) may contain support for programs written in Java. Java technology is not fault tolerant and is not designed, manufactured, or intended for use or resale as on-line control equipment in hazardous environments requiring fail-safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of Java technology could lead directly to death, personal injury, or severe physical or environmental damage. - -13. DISCLAIMER OF WARRANTY. - -DEVEXPRESS expressly disclaims any warranty for the SOFTWARE COMPONENT PRODUCT(S). THE SOFTWARE COMPONENT PRODUCT(S) AND ANY RELATED DOCUMENTATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. DEVEXPRESS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF THE USE, OF THE SOFTWARE COMPONENT PRODUCT(S) IN TERMS OF CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE COMPONENT PRODUCT(S) REMAINS WITH YOU. No oral or written information or advice given by DEVEXPRESS or its employees shall create a warranty or in any way increase the scope of this warranty. - -14. LIMITATIONS ON LIABILITY. - -To the maximum extent permitted by applicable law, in no event shall DEVEXPRESS be liable for any special, incidental, indirect, or consequential damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use the SOFTWARE COMPONENT PRODUCT(S) or the provision of or failure to provide Support Services, even if DEVEXPRESS has been advised of the possibility of such damages. - -Developer End User understands that the SOFTWARE COMPONENT PRODUCT(S) may produce inaccurate results because of a failure or fault within the SOFTWARE COMPONENT PRODUCT(S) or failure by Developer End User to properly use and or deploy the SOFTWARE COMPONENT PRODUCT(S). Developer End User assumes full and sole responsibility for any use of the SOFTWARE COMPONENT PRODUCT(S), and bears the entire risk for failures or faults within the SOFTWARE COMPONENT PRODUCT(S). You agree that regardless of the cause of failure or fault or the form of any claim, YOUR SOLE REMEDY AND DEVEXPRESS'S SOLE OBLIGATION SHALL BE GOVERNED BY THIS AGREEMENT AND IN NO EVENT SHALL DEVEXPRESS'S LIABILITY EXCEED THE PRICE PAID TO DEVEXPRESS FOR THE SOFTWARE COMPONENT PRODUCT(S). This Limited Warranty is void if failure of the SOFTWARE COMPONENT PRODUCT(S) has resulted from accident, abuse, alteration, unauthorized use or misapplication of the SOFTWARE COMPONENT PRODUCT(S). - -15. INDEMNIFICATION. - -You hereby agree to indemnify DEVEXPRESS and its officers, directors, employees, agents, and representatives from each and every demand, claim, loss, liability, or damage of any kind, including actual attorneys fees, whether in tort or contract, that it or any of them may incur by reason of, or arising out of, any claim which is made by any third party with respect to any breach or violation of this Agreement by you or any claims based on the Applications and the SOFTWARE COMPONENT PRODUCT(S) included herein. - -16. SUPPORT SERVICES. - -DEVEXPRESS may provide you with support services related to the SOFTWARE COMPONENT PRODUCT(S) ("Support Services"). Use of Support Services is governed by DEVEXPRESS policies and programs described in the user manual, in "on line" documentation and/or other DEVEXPRESS provided materials. Any supplemental SOFTWARE COMPONENT PRODUCT(S) provided to you as part of the Support Services shall be considered part of the SOFTWARE COMPONENT PRODUCT(S) and subject to the terms and conditions of this EULA. With respect to technical information you provide to DEVEXPRESS as part of the Support Services, DEVEXPRESS may use such information for its business purposes, including for SOFTWARE COMPONENT PRODUCT(s) support and development. DEVEXPRESS will not utilize such technical information in a form that personally identifies you. - -17. TERMINATION. - -Without prejudice to any other rights or remedies, DEVEXPRESS will terminate this EULA upon your failure to comply with all the terms and conditions of this EULA. In such events, you must destroy all copies of the SOFTWARE COMPONENT PRODUCT(S) and all of its component parts including any related documentation, and must remove ANY and ALL use of such technology immediately from any applications using technology contained in the SOFTWARE COMPONENT PRODUCT(S) developed by you, whether in native, altered or compiled state. - -18. TAX. - -DEVEXPRESS delivers its software electronically and does not collect sales or use tax for residents of US states in which it operates. You should confirm that your local, state, or federal government does not impose any sales or use tax on electronically delivered software. You are entirely liable for any such sales or use tax. - -19. MISCELLANEOUS. - -This EULA shall be construed, interpreted and governed by the laws of the State of Nevada, U.S.A. This EULA gives you specific legal rights; you may have others that vary from state to state and from country to country. - -This EULA may only be modified in writing signed by you and an authorized officer of DEVELOPER EXPRESS INC. If any provision of this EULA is found void or unenforceable, the remainder will remain valid and enforceable according to its terms. If any remedy provided is determined to have failed for its essential purpose, all limitations of liability and exclusions of damages set forth in the Limited Warranty shall remain in effect. - -DEVEXPRESS reserves all rights not specifically granted in this EULA. - -ACKNOWLEDGEMENTS. Developer End User acknowledges that he or she has read this Agreement, understands it, and agrees to be bound by its terms and conditions. - -Should you have any questions concerning this EULA, or if you desire to contact DEVEXPRESS for any reason, please contact us directly in the United States at +1 (818) 844 3383, or write: Developer Express Inc. Legal department / 801 N. Brand Blvd Suite 850, Glendale CA 91203. - diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC10.bpk deleted file mode 100644 index acb62a26..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC10.bpk +++ /dev/null @@ -1,163 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxPSCoreC10.bpl -OBJFILES = dxPSReg.obj dxPSPrVwDsg.obj dxPSfmStlAdd.obj dxPSfmStlDsg.obj dxPSDsgUtils.obj \ - dxPSfmLnkDsg.obj dxPSfmLnkAdde.obj dxPSDsgProxies.obj dxPSDBBasedXplorerReg.obj dcldxPSCoreC10.obj -MAINSOURCE = dcldxPSCoreC10.cpp -RESFILES = dcldxPSCoreC10.res dxPS.dcr -DEFFILE = -RESDEPEN = $(RESFILES) dxPSfmLnkDsg.dfm dxPSfmLnkAdde.dfm \ - dxPSfmStlAdd.dfm dxPSfmStlDsg.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi designide.bpi dxcomnC10.bpi vclx.bpi dxPSCoreC10.bpi \ - cxLibraryC10.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -LUdcldb -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gl \ - -Gi -Gpd -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC10.cpp deleted file mode 100644 index a97852f1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC10.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxPSCoreC10.res"); -USERES("dxPS.dcr"); -USEPACKAGE("dxcomnC10.bpi"); -USEUNIT("dxPSReg.pas"); -USEUNIT("dxPSPrVwDsg.pas"); -USEUNIT("dxPSDsgProxies.pas"); -USEUNIT("dxPSDsgUtils.pas"); -USEUNIT("dxPSDBBasedXplorerReg.pas"); -USEFORMNS("dxPSfmLnkDsg.pas", Dxpsfmlnkdsg, dxfmReportLinkDesignWindow); -USEFORMNS("dxPSfmLnkAdde.pas", Dxpsfmlnkadde, fmAddEmptyReportLink); -USEFORMNS("dxPSfmStlDsg.pas", Dxpsfmstldsg, dxfmPrintStylesDesignWindow); -USEFORMNS("dxPSfmStlAdd.pas", Dxpsfmstladd, dxfmSelectStyleClass); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC10.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC10.res deleted file mode 100644 index 693e7677..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC11.bpk deleted file mode 100644 index 835dfaed..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC11.bpk +++ /dev/null @@ -1,163 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxPSCoreC11.bpl -OBJFILES = dxPSReg.obj dxPSPrVwDsg.obj dxPSfmStlAdd.obj dxPSfmStlDsg.obj dxPSDsgUtils.obj \ - dxPSfmLnkDsg.obj dxPSfmLnkAdde.obj dxPSDsgProxies.obj dxPSDBBasedXplorerReg.obj dcldxPSCoreC11.obj -MAINSOURCE = dcldxPSCoreC11.cpp -RESFILES = dcldxPSCoreC11.res dxPS.dcr -DEFFILE = -RESDEPEN = $(RESFILES) dxPSfmLnkDsg.dfm dxPSfmLnkAdde.dfm \ - dxPSfmStlAdd.dfm dxPSfmStlDsg.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi designide.bpi dxcomnC11.bpi vclx.bpi dxPSCoreC11.bpi \ - cxLibraryC11.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -LUdcldb -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gl \ - -Gi -Gpd -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC11.cpp deleted file mode 100644 index 42ba2089..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC11.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxPSCoreC11.res"); -USERES("dxPS.dcr"); -USEPACKAGE("dxcomnC11.bpi"); -USEUNIT("dxPSReg.pas"); -USEUNIT("dxPSPrVwDsg.pas"); -USEUNIT("dxPSDsgProxies.pas"); -USEUNIT("dxPSDsgUtils.pas"); -USEUNIT("dxPSDBBasedXplorerReg.pas"); -USEFORMNS("dxPSfmLnkDsg.pas", Dxpsfmlnkdsg, dxfmReportLinkDesignWindow); -USEFORMNS("dxPSfmLnkAdde.pas", Dxpsfmlnkadde, fmAddEmptyReportLink); -USEFORMNS("dxPSfmStlDsg.pas", Dxpsfmstldsg, dxfmPrintStylesDesignWindow); -USEFORMNS("dxPSfmStlAdd.pas", Dxpsfmstladd, dxfmSelectStyleClass); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC11.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC11.res deleted file mode 100644 index ccbec1e8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC12.bpk deleted file mode 100644 index c225d60e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC12.bpk +++ /dev/null @@ -1,163 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxPSCoreC12.bpl -OBJFILES = dxPSReg.obj dxPSPrVwDsg.obj dxPSfmStlAdd.obj dxPSfmStlDsg.obj dxPSDsgUtils.obj \ - dxPSfmLnkDsg.obj dxPSfmLnkAdde.obj dxPSDsgProxies.obj dxPSDBBasedXplorerReg.obj dcldxPSCoreC12.obj -MAINSOURCE = dcldxPSCoreC12.cpp -RESFILES = dcldxPSCoreC12.res dxPS.dcr -DEFFILE = -RESDEPEN = $(RESFILES) dxPSfmLnkDsg.dfm dxPSfmLnkAdde.dfm \ - dxPSfmStlAdd.dfm dxPSfmStlDsg.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi designide.bpi dxcomnC12.bpi vclx.bpi dxPSCoreC12.bpi \ - cxLibraryC12.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -LUdcldb -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gl \ - -Gi -Gpd -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC12.cpp deleted file mode 100644 index 0be17d47..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC12.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxPSCoreC12.res"); -USERES("dxPS.dcr"); -USEPACKAGE("dxcomnC12.bpi"); -USEUNIT("dxPSReg.pas"); -USEUNIT("dxPSPrVwDsg.pas"); -USEUNIT("dxPSDsgProxies.pas"); -USEUNIT("dxPSDsgUtils.pas"); -USEUNIT("dxPSDBBasedXplorerReg.pas"); -USEFORMNS("dxPSfmLnkDsg.pas", Dxpsfmlnkdsg, dxfmReportLinkDesignWindow); -USEFORMNS("dxPSfmLnkAdde.pas", Dxpsfmlnkadde, fmAddEmptyReportLink); -USEFORMNS("dxPSfmStlDsg.pas", Dxpsfmstldsg, dxfmPrintStylesDesignWindow); -USEFORMNS("dxPSfmStlAdd.pas", Dxpsfmstladd, dxfmSelectStyleClass); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC12.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC12.res deleted file mode 100644 index 39209258..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC14.bpk deleted file mode 100644 index fe33ed6f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC14.bpk +++ /dev/null @@ -1,163 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxPSCoreC14.bpl -OBJFILES = dxPSReg.obj dxPSPrVwDsg.obj dxPSfmStlAdd.obj dxPSfmStlDsg.obj dxPSDsgUtils.obj \ - dxPSfmLnkDsg.obj dxPSfmLnkAdde.obj dxPSDsgProxies.obj dxPSDBBasedXplorerReg.obj dcldxPSCoreC14.obj -MAINSOURCE = dcldxPSCoreC14.cpp -RESFILES = dcldxPSCoreC14.res dxPS.dcr -DEFFILE = -RESDEPEN = $(RESFILES) dxPSfmLnkDsg.dfm dxPSfmLnkAdde.dfm \ - dxPSfmStlAdd.dfm dxPSfmStlDsg.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi designide.bpi dxcomnC14.bpi vclx.bpi dxPSCoreC14.bpi \ - cxLibraryC14.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -LUdcldb -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gl \ - -Gi -Gpd -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC14.cpp deleted file mode 100644 index c0360691..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC14.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxPSCoreC14.res"); -USERES("dxPS.dcr"); -USEPACKAGE("dxcomnC14.bpi"); -USEUNIT("dxPSReg.pas"); -USEUNIT("dxPSPrVwDsg.pas"); -USEUNIT("dxPSDsgProxies.pas"); -USEUNIT("dxPSDsgUtils.pas"); -USEUNIT("dxPSDBBasedXplorerReg.pas"); -USEFORMNS("dxPSfmLnkDsg.pas", Dxpsfmlnkdsg, dxfmReportLinkDesignWindow); -USEFORMNS("dxPSfmLnkAdde.pas", Dxpsfmlnkadde, fmAddEmptyReportLink); -USEFORMNS("dxPSfmStlDsg.pas", Dxpsfmstldsg, dxfmPrintStylesDesignWindow); -USEFORMNS("dxPSfmStlAdd.pas", Dxpsfmstladd, dxfmSelectStyleClass); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC14.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC14.res deleted file mode 100644 index 4fa0a950..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC5.bpk deleted file mode 100644 index f78abe40..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC5.bpk +++ /dev/null @@ -1,162 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dcldxPSCorec5.bpl -OBJFILES = dxPSReg.obj dxPSPrVwDsg.obj dxPSfmStlAdd.obj dxPSfmStlDsg.obj dxPSDsgUtils.obj \ - dxPSfmLnkDsg.obj dxPSfmLnkAdde.obj dxPSDsgProxies.obj dxPSDBBasedXplorerReg.obj dcldxPSCorec5.obj -RESFILES = dcldxPSCorec5.res dxPS.dcr -DEFFILE = -RESDEPEN = $(RESFILES) dxPSfmLnkDsg.dfm dxPSfmLnkAdde.dfm \ - dxPSfmStlAdd.dfm dxPSfmStlDsg.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = VCL50.lib -PACKAGES = VCL50.bpi vcldb50.bpi dcldb50.bpi dxcomnc5.bpi vclx50.bpi dxPSCoreC5.bpi dsnide50.bpi \ - cxLibraryVCLC5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -LUdcldb50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gl \ - -Gi -Gpd -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC5.cpp deleted file mode 100644 index 4d067679..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC5.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxPSCorec5.res"); -USERES("dxPS.dcr"); -USEPACKAGE("dxcomnc5.bpi"); -USEPACKAGE("vcldb50.bpi"); -USEPACKAGE("dcldb50.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USEUNIT("dxPSReg.pas"); -USEUNIT("dxPSPrVwDsg.pas"); -USEUNIT("dxPSDsgProxies"); -USEUNIT("dxPSDsgUtils"); -USEFORMNS("dxPSfmLnkDsg.pas", Dxpsfmlnkdsg, dxfmReportLinkDesignWindow); -USEFORMNS("dxPSfmLnkAdde.pas", Dxpsfmlnkadde, fmAddEmptyReportLink); -USEFORMNS("dxPSfmStlDsg.pas", Dxpsfmstldsg, dxfmPrintStylesDesignWindow); -USEFORMNS("dxPSfmStlAdd.pas", Dxpsfmstladd, dxfmSelectStyleClass); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vclx50.bpi"); -USEPACKAGE("dsnide50.bpi"); -USEPACKAGE("dxPSCoreC5.bpi"); -USEUNIT("dxPSDBBasedXplorerReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC5.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC5.res deleted file mode 100644 index e99a6995..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC6.bpk deleted file mode 100644 index 10075596..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC6.bpk +++ /dev/null @@ -1,162 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dcldxPSCoreC6.bpl -OBJFILES = dxPSReg.obj dxPSPrVwDsg.obj dxPSfmStlAdd.obj dxPSfmStlDsg.obj dxPSDsgUtils.obj \ - dxPSfmLnkDsg.obj dxPSfmLnkAdde.obj dxPSDsgProxies.obj dxPSDBBasedXplorerReg.obj dcldxPSCoreC6.obj -RESFILES = dcldxPSCoreC6.res dxPS.dcr -DEFFILE = -RESDEPEN = $(RESFILES) dxPSfmLnkDsg.dfm dxPSfmLnkAdde.dfm \ - dxPSfmStlAdd.dfm dxPSfmStlDsg.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi dcldb.bpi designide.bpi dxcomnC6.bpi vclx.bpi dxPSCoreC6.bpi \ - cxLibraryVCLC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -LUdcldb -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gl \ - -Gi -Gpd -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC6.cpp deleted file mode 100644 index 02c27d74..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC6.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dcldxPSCoreC6.res"); -USERES("dxPS.dcr"); -USEPACKAGE("dxcomnC6.bpi"); -USEUNIT("dxPSReg.pas"); -USEUNIT("dxPSPrVwDsg.pas"); -USEUNIT("dxPSDsgProxies.pas"); -USEUNIT("dxPSDsgUtils.pas"); -USEUNIT("dxPSDBBasedXplorerReg.pas"); -USEFORMNS("dxPSfmLnkDsg.pas", Dxpsfmlnkdsg, dxfmReportLinkDesignWindow); -USEFORMNS("dxPSfmLnkAdde.pas", Dxpsfmlnkadde, fmAddEmptyReportLink); -USEFORMNS("dxPSfmStlDsg.pas", Dxpsfmstldsg, dxfmPrintStylesDesignWindow); -USEFORMNS("dxPSfmStlAdd.pas", Dxpsfmstladd, dxfmSelectStyleClass); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("dcldb.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC6.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC6.res deleted file mode 100644 index 8c26e60b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD10.dpk deleted file mode 100644 index 4b3c17d8..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD10.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dcldxPSCoreD10; - -{$R *.res} -{$R dxPS.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - vclx, - vcl, - dxComnD10, - dxPSCoreD10, - dclstd, - dcldb; - -contains - dxPSDsgProxies, - dxPSDsgUtils, - dxPSPrVwDsg, - dxPSfmLnkDsg, - dxPSfmLnkAdde, - dxPSfmStlAdd, - dxPSfmStlDsg, - dxPSReg, - dxPSDBBasedXplorerReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD10.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD10.res deleted file mode 100644 index e9149fcd..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD11.dpk deleted file mode 100644 index 0ec2fae0..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD11.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dcldxPSCoreD11; - -{$R *.res} -{$R dxPS.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - vclx, - vcl, - dxComnD11, - dxPSCoreD11, - dclstd, - dcldb; - -contains - dxPSDsgProxies, - dxPSDsgUtils, - dxPSPrVwDsg, - dxPSfmLnkDsg, - dxPSfmLnkAdde, - dxPSfmStlAdd, - dxPSfmStlDsg, - dxPSReg, - dxPSDBBasedXplorerReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD11.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD11.res deleted file mode 100644 index 8496c978..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD12.dpk deleted file mode 100644 index 90e969b0..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD12.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dcldxPSCoreD12; - -{$R *.res} -{$R dxPS.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - vclx, - vcl, - dxPSCoreD12, - dclstd, - dcldb; - -contains - dxPSDsgProxies, - dxPSDsgUtils, - dxPSPrVwDsg, - dxPSfmLnkDsg, - dxPSfmLnkAdde, - dxPSfmStlAdd, - dxPSfmStlDsg, - dxPSReg, - dxPSDBBasedXplorerReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD12.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD12.res deleted file mode 100644 index 0cd5df93..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD14.dpk deleted file mode 100644 index 87dd5fcf..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD14.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dcldxPSCoreD14; - -{$R *.res} -{$R dxPS.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - vclx, - vcl, - dxPSCoreD14, - dclstd, - dcldb; - -contains - dxPSDsgProxies, - dxPSDsgUtils, - dxPSPrVwDsg, - dxPSfmLnkDsg, - dxPSfmLnkAdde, - dxPSfmStlAdd, - dxPSfmStlDsg, - dxPSReg, - dxPSDBBasedXplorerReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD14.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD14.res deleted file mode 100644 index 2d432f62..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD5.dpk deleted file mode 100644 index 10f142e3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD5.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dcldxPSCoreD5; - -{$R *.res} -{$R dxPS.dcr} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - vclx50, - vcl50, - dxComnD5, - dxPSCoreD5, - dclstd50, - dcldb50; - -contains - dxPSDsgProxies, - dxPSDsgUtils, - dxPSPrVwDsg, - dxPSfmLnkDsg, - dxPSfmLnkAdde, - dxPSfmStlAdd, - dxPSfmStlDsg, - dxPSReg, - dxPSDBBasedXplorerReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD5.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD5.res deleted file mode 100644 index 95d924ad..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD6.dpk deleted file mode 100644 index 05419f12..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD6.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dcldxPSCoreD6; - -{$R *.res} -{$R dxPS.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - vclx, - vcl, - dxComnD6, - dxPSCoreD6, - dclstd, - dcldb; - -contains - dxPSDsgProxies, - dxPSDsgUtils, - dxPSPrVwDsg, - dxPSfmLnkDsg, - dxPSfmLnkAdde, - dxPSfmStlAdd, - dxPSfmStlDsg, - dxPSReg, - dxPSDBBasedXplorerReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD6.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD6.res deleted file mode 100644 index 772f6253..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD7.dpk deleted file mode 100644 index fd4b8709..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD7.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dcldxPSCoreD7; - -{$R *.res} -{$R dxPS.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - vclx, - vcl, - dxComnD7, - dxPSCoreD7, - dclstd, - dcldb; - -contains - dxPSDsgProxies, - dxPSDsgUtils, - dxPSPrVwDsg, - dxPSfmLnkDsg, - dxPSfmLnkAdde, - dxPSfmStlAdd, - dxPSfmStlDsg, - dxPSReg, - dxPSDBBasedXplorerReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD7.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD7.res deleted file mode 100644 index b48724ac..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD9.dpk deleted file mode 100644 index 1eb17c23..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD9.dpk +++ /dev/null @@ -1,49 +0,0 @@ -package dcldxPSCoreD9; - -{$R *.res} -{$R dxPS.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - vclx, - vcl, - dxComnD9, - dxPSCoreD9, - dclstd, - dcldb; - -contains - dxPSDsgProxies, - dxPSDsgUtils, - dxPSPrVwDsg, - dxPSfmLnkDsg, - dxPSfmLnkAdde, - dxPSfmStlAdd, - dxPSfmStlDsg, - dxPSReg, - dxPSDBBasedXplorerReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD9.res b/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD9.res deleted file mode 100644 index 038a4865..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dcldxPSCoreD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC10.bpk deleted file mode 100644 index 684823c6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC10.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSCoreC10.bpl -OBJFILES = dxPSGlbl.obj dxPSCore.obj dxPSPrVwStd.obj dxPSRes.obj dxFEFDlg.obj dxBrhDlg.obj dxBase.obj \ - dxPrnPg.obj dxfmClr.obj dxPcPrVw.obj dxPrnDlg.obj dxPreVw.obj \ - dxPPAttr.obj dxPrnDev.obj dxBkgnd.obj dxWrap.obj dxPSUtl.obj \ - dxFmMnPg.obj dxfmZoom.obj dxPgSDlg.obj dxPSImgs.obj dxPSPrVwOpt.obj dxPSfmLnkAdd.obj \ - dxPSfmttl.obj dxPSPopupMan.obj dxfmpnfmt.obj dxfmDTFmt.obj dxPSfmEditDesc.obj \ - dxfmDfnStl.obj dxPSEvnt.obj dxPSESys.obj dxPSEngn.obj dxPSPrVw.obj dxPSForm.obj \ - dxPSGraphicLnk.obj dxPSCompsProvider.obj dxPSCPDsg.obj dxPSfmCompositionAdd.obj \ - dxPSfmCompositionDsg.obj dxPSPgsMnuBld.obj dxfmChFN.obj dxExtCtrlsStrs.obj \ - dxExtctrls.obj dxPSBaseGridLnk.obj dxPSEdgePatterns.obj \ - dxPSFillPatterns.obj dxPSContainerLnk.obj dxPSDBBasedXplorer.obj dxPSExtDlgs.obj \ - dxPSFileBasedXplorer.obj dxPSfmReportProperties.obj dxPSShapes.obj dxPSTextLnk.obj \ - dxPSStandardFillPatterns.obj dxPSXplorerTreeView.obj dxPSSngltn.obj dxPSHFToolbarBld.obj \ - dxPSFMAutoHFTextFmt.obj dxPSAutoHFTextMNUBld.obj dxPSCoreC10.obj -MAINSOURCE = dxPSCoreC10.cpp -RESFILES = dxPSCoreC10.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwStd.dfm dxFEFDlg.dfm dxfmClr.dfm dxPrnDlg.dfm \ - dxfmZoom.dfm dxPgsDlg.dfm dxBrhDlg.dfm dxfmChFN.dfm dxfmpnfmt.dfm dxfmDTFmt.dfm \ - dxfmDfnStl.dfm dxPSPrVwOpt.dfm dxPSfmttl.dfm dxPSfmEditDesc.dfm dxPSfmLnkAdd.dfm \ - dxPSCPDsg.dfm dxPSfmCompositionAdd.dfm dxPSfmCompositionDsg.dfm dxPSContainerLnk.dfm \ - dxPSTextLnk.dfm dxPSfmReportProperties.dfm dxPSExtDlgs.res -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = rtl.bpi dbrtl.bpi dxcomnC10.bpi cxLibraryC10.bpi vcl.bpi vclx.bpi vcljpg.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC10.cpp deleted file mode 100644 index f71a3d72..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC10.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSCoreC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxcomnC10.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcljpg.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEUNIT("dxPSRes.pas"); -USEUNIT("dxBase.pas"); -USEUNIT("dxPrnPg.pas"); -USEUNIT("dxPSGlbl.pas"); -USEUNIT("dxPcPrVw.pas"); -USEUNIT("dxPreVw.pas"); -USEUNIT("dxPSCore.pas"); -USEUNIT("dxPPAttr.pas"); -USEUNIT("dxPrnDev.pas"); -USEUNIT("dxBkgnd.pas"); -USEUNIT("dxWrap.pas"); -USEUNIT("dxPSUtl.pas"); -USEUNIT("dxFmMnPg.pas"); -USEUNIT("dxPSImgs.pas"); -USEUNIT("dxPSPopupMan.pas"); -USEUNIT("dxPSEvnt.pas"); -USEUNIT("dxPSESys.pas"); -USEUNIT("dxPSEngn.pas"); -USEUNIT("dxPSPrVw.pas"); -USEUNIT("dxPSForm.pas"); -USEUNIT("dxPSPgsMnuBld.pas"); -USEUNIT("dxExtCtrlsStrs.pas"); -USEUNIT("dxExtctrls.pas"); -USEUNIT("dxPSBaseGridLnk.pas"); -USEUNIT("dxPSEdgePatterns.pas"); -USEUNIT("dxPSFillPatterns.pas"); -USEFORMNS("dxPSPrVwStd.pas", Dxpsprvwstd, dxfmStdPreview); -USEFORMNS("dxFEFDlg.pas", Dxfefdlg, dxFEFDialog); -USEFORMNS("dxfmClr.pas", Dxfmclr, dxfmColorPalette); -USEFORMNS("dxPrnDlg.pas", Dxprndlg, fmdxPrintDialog); -USEFORMNS("dxfmZoom.pas", Dxfmzoom, fmZoom); -USEFORMNS("dxPgSDlg.pas", Dxpgsdlg, dxfmPageSetupDialog); -USEFORMNS("dxBrhDlg.pas", Dxbrhdlg, dxBrushDlg); -USEFORMNS("dxfmChFN.pas", Dxfmchfn, fmdxChangeFileName); -USEFORMNS("dxfmpnfmt.pas", Dxfmpnfmt, fmPageNumberFormat); -USEFORMNS("dxfmDTFmt.pas", Dxfmdtfmt, fmDateTimeFormats); -USEFORMNS("dxfmDfnStl.pas", Dxfmdfnstl, fmdxDefinePrintStyles); -USEFORMNS("dxPSPrVwOpt.pas", Dxpsprvwopt, fmOptions); -USEFORMNS("dxPSfmttl.pas", dxPSfmttl, dxfmReportTitleProperties); -USEFORMNS("dxPSfmEditDesc.pas", Dxpsfmeditdesc, dxfmEditDescription); -USEFORMNS("dxPSfmLnkAdd.pas", Dxpsfmlnkadd, dxfmSelectComponent); -USEUNIT("dxPSGraphicLnk.pas"); -USEUNIT("dxPSCompsProvider.pas"); -USEFORMNS("dxPSCPDsg.pas", Dxpscpdsg, dxfmCPDesigner); -USEFORMNS("dxPSfmCompositionAdd.pas", Dxpsfmcompositionadd, dxfmCompositionAddItems); -USEFORMNS("dxPSfmCompositionDsg.pas", Dxpsfmcompositiondsg, dxfmCompositionDesignWindow); -USEUNIT("dxPSContainerLnk.pas"); -USEUNIT("dxPSDBBasedXplorer.pas"); -USEUNIT("dxPSExtDlgs.pas"); -USEUNIT("dxPSFileBasedXplorer.pas"); -USEUNIT("dxPSfmReportProperties.pas"); -USEUNIT("dxPSShapes.pas"); -USEFORMNS("dxPSTextLnk.pas", Dxpstextlnk, dxfmTextReportLinkDesignWindow); -USEUNIT("dxPSStandardFillPatterns.pas"); -USEUNIT("dxPSXplorerTreeView.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC10.res deleted file mode 100644 index c642ef2f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC11.bpk deleted file mode 100644 index edd871fa..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC11.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSCoreC11.bpl -OBJFILES = dxPSGlbl.obj dxPSCore.obj dxPSPrVwStd.obj dxPSRes.obj dxFEFDlg.obj dxBrhDlg.obj dxBase.obj \ - dxPrnPg.obj dxfmClr.obj dxPcPrVw.obj dxPrnDlg.obj dxPreVw.obj \ - dxPPAttr.obj dxPrnDev.obj dxBkgnd.obj dxWrap.obj dxPSUtl.obj \ - dxFmMnPg.obj dxfmZoom.obj dxPgSDlg.obj dxPSImgs.obj dxPSPrVwOpt.obj dxPSfmLnkAdd.obj \ - dxPSfmttl.obj dxPSPopupMan.obj dxfmpnfmt.obj dxfmDTFmt.obj dxPSfmEditDesc.obj \ - dxfmDfnStl.obj dxPSEvnt.obj dxPSESys.obj dxPSEngn.obj dxPSPrVw.obj dxPSForm.obj \ - dxPSGraphicLnk.obj dxPSCompsProvider.obj dxPSCPDsg.obj dxPSfmCompositionAdd.obj \ - dxPSfmCompositionDsg.obj dxPSPgsMnuBld.obj dxfmChFN.obj dxExtCtrlsStrs.obj \ - dxExtctrls.obj dxPSBaseGridLnk.obj dxPSEdgePatterns.obj \ - dxPSFillPatterns.obj dxPSContainerLnk.obj dxPSDBBasedXplorer.obj dxPSExtDlgs.obj \ - dxPSFileBasedXplorer.obj dxPSfmReportProperties.obj dxPSShapes.obj dxPSTextLnk.obj \ - dxPSStandardFillPatterns.obj dxPSXplorerTreeView.obj dxPSSngltn.obj dxPSHFToolbarBld.obj \ - dxPSFMAutoHFTextFmt.obj dxPSAutoHFTextMNUBld.obj dxPSCoreC11.obj -MAINSOURCE = dxPSCoreC11.cpp -RESFILES = dxPSCoreC11.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwStd.dfm dxFEFDlg.dfm dxfmClr.dfm dxPrnDlg.dfm \ - dxfmZoom.dfm dxPgsDlg.dfm dxBrhDlg.dfm dxfmChFN.dfm dxfmpnfmt.dfm dxfmDTFmt.dfm \ - dxfmDfnStl.dfm dxPSPrVwOpt.dfm dxPSfmttl.dfm dxPSfmEditDesc.dfm dxPSfmLnkAdd.dfm \ - dxPSCPDsg.dfm dxPSfmCompositionAdd.dfm dxPSfmCompositionDsg.dfm dxPSContainerLnk.dfm \ - dxPSTextLnk.dfm dxPSfmReportProperties.dfm dxPSExtDlgs.res -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = rtl.bpi dbrtl.bpi dxcomnC11.bpi cxLibraryC11.bpi vcl.bpi vclx.bpi vcljpg.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC11.cpp deleted file mode 100644 index e2d5eba4..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC11.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSCoreC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxcomnC11.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcljpg.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEUNIT("dxPSRes.pas"); -USEUNIT("dxBase.pas"); -USEUNIT("dxPrnPg.pas"); -USEUNIT("dxPSGlbl.pas"); -USEUNIT("dxPcPrVw.pas"); -USEUNIT("dxPreVw.pas"); -USEUNIT("dxPSCore.pas"); -USEUNIT("dxPPAttr.pas"); -USEUNIT("dxPrnDev.pas"); -USEUNIT("dxBkgnd.pas"); -USEUNIT("dxWrap.pas"); -USEUNIT("dxPSUtl.pas"); -USEUNIT("dxFmMnPg.pas"); -USEUNIT("dxPSImgs.pas"); -USEUNIT("dxPSPopupMan.pas"); -USEUNIT("dxPSEvnt.pas"); -USEUNIT("dxPSESys.pas"); -USEUNIT("dxPSEngn.pas"); -USEUNIT("dxPSPrVw.pas"); -USEUNIT("dxPSForm.pas"); -USEUNIT("dxPSPgsMnuBld.pas"); -USEUNIT("dxExtCtrlsStrs.pas"); -USEUNIT("dxExtctrls.pas"); -USEUNIT("dxPSBaseGridLnk.pas"); -USEUNIT("dxPSEdgePatterns.pas"); -USEUNIT("dxPSFillPatterns.pas"); -USEFORMNS("dxPSPrVwStd.pas", Dxpsprvwstd, dxfmStdPreview); -USEFORMNS("dxFEFDlg.pas", Dxfefdlg, dxFEFDialog); -USEFORMNS("dxfmClr.pas", Dxfmclr, dxfmColorPalette); -USEFORMNS("dxPrnDlg.pas", Dxprndlg, fmdxPrintDialog); -USEFORMNS("dxfmZoom.pas", Dxfmzoom, fmZoom); -USEFORMNS("dxPgSDlg.pas", Dxpgsdlg, dxfmPageSetupDialog); -USEFORMNS("dxBrhDlg.pas", Dxbrhdlg, dxBrushDlg); -USEFORMNS("dxfmChFN.pas", Dxfmchfn, fmdxChangeFileName); -USEFORMNS("dxfmpnfmt.pas", Dxfmpnfmt, fmPageNumberFormat); -USEFORMNS("dxfmDTFmt.pas", Dxfmdtfmt, fmDateTimeFormats); -USEFORMNS("dxfmDfnStl.pas", Dxfmdfnstl, fmdxDefinePrintStyles); -USEFORMNS("dxPSPrVwOpt.pas", Dxpsprvwopt, fmOptions); -USEFORMNS("dxPSfmttl.pas", dxPSfmttl, dxfmReportTitleProperties); -USEFORMNS("dxPSfmEditDesc.pas", Dxpsfmeditdesc, dxfmEditDescription); -USEFORMNS("dxPSfmLnkAdd.pas", Dxpsfmlnkadd, dxfmSelectComponent); -USEUNIT("dxPSGraphicLnk.pas"); -USEUNIT("dxPSCompsProvider.pas"); -USEFORMNS("dxPSCPDsg.pas", Dxpscpdsg, dxfmCPDesigner); -USEFORMNS("dxPSfmCompositionAdd.pas", Dxpsfmcompositionadd, dxfmCompositionAddItems); -USEFORMNS("dxPSfmCompositionDsg.pas", Dxpsfmcompositiondsg, dxfmCompositionDesignWindow); -USEUNIT("dxPSContainerLnk.pas"); -USEUNIT("dxPSDBBasedXplorer.pas"); -USEUNIT("dxPSExtDlgs.pas"); -USEUNIT("dxPSFileBasedXplorer.pas"); -USEUNIT("dxPSfmReportProperties.pas"); -USEUNIT("dxPSShapes.pas"); -USEFORMNS("dxPSTextLnk.pas", Dxpstextlnk, dxfmTextReportLinkDesignWindow); -USEUNIT("dxPSStandardFillPatterns.pas"); -USEUNIT("dxPSXplorerTreeView.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC11.res deleted file mode 100644 index 9d5910a7..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC12.bpk deleted file mode 100644 index 71a657d4..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC12.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSCoreC12.bpl -OBJFILES = dxPSGlbl.obj dxPSCore.obj dxPSPrVwStd.obj dxPSRes.obj dxFEFDlg.obj dxBrhDlg.obj dxBase.obj \ - dxPrnPg.obj dxfmClr.obj dxPcPrVw.obj dxPrnDlg.obj dxPreVw.obj \ - dxPPAttr.obj dxPrnDev.obj dxBkgnd.obj dxWrap.obj dxPSUtl.obj \ - dxFmMnPg.obj dxfmZoom.obj dxPgSDlg.obj dxPSImgs.obj dxPSPrVwOpt.obj dxPSfmLnkAdd.obj \ - dxPSfmttl.obj dxPSPopupMan.obj dxfmpnfmt.obj dxfmDTFmt.obj dxPSfmEditDesc.obj \ - dxfmDfnStl.obj dxPSEvnt.obj dxPSESys.obj dxPSEngn.obj dxPSPrVw.obj dxPSForm.obj \ - dxPSGraphicLnk.obj dxPSCompsProvider.obj dxPSCPDsg.obj dxPSfmCompositionAdd.obj \ - dxPSfmCompositionDsg.obj dxPSPgsMnuBld.obj dxfmChFN.obj dxExtCtrlsStrs.obj \ - dxExtctrls.obj dxPSBaseGridLnk.obj dxPSEdgePatterns.obj \ - dxPSFillPatterns.obj dxPSContainerLnk.obj dxPSDBBasedXplorer.obj dxPSExtDlgs.obj \ - dxPSFileBasedXplorer.obj dxPSfmReportProperties.obj dxPSShapes.obj dxPSTextLnk.obj \ - dxPSStandardFillPatterns.obj dxPSXplorerTreeView.obj dxPSSngltn.obj dxPSHFToolbarBld.obj \ - dxPSFMAutoHFTextFmt.obj dxPSAutoHFTextMNUBld.obj dxPSCoreC12.obj -MAINSOURCE = dxPSCoreC12.cpp -RESFILES = dxPSCoreC12.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwStd.dfm dxFEFDlg.dfm dxfmClr.dfm dxPrnDlg.dfm \ - dxfmZoom.dfm dxPgsDlg.dfm dxBrhDlg.dfm dxfmChFN.dfm dxfmpnfmt.dfm dxfmDTFmt.dfm \ - dxfmDfnStl.dfm dxPSPrVwOpt.dfm dxPSfmttl.dfm dxPSfmEditDesc.dfm dxPSfmLnkAdd.dfm \ - dxPSCPDsg.dfm dxPSfmCompositionAdd.dfm dxPSfmCompositionDsg.dfm dxPSContainerLnk.dfm \ - dxPSTextLnk.dfm dxPSfmReportProperties.dfm dxPSExtDlgs.res -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = rtl.bpi dbrtl.bpi dxcomnC12.bpi cxLibraryC12.bpi vcl.bpi vclx.bpi vclimg.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC12.cpp deleted file mode 100644 index c2d2df64..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC12.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSCoreC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxcomnC12.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclimg.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEUNIT("dxPSRes.pas"); -USEUNIT("dxBase.pas"); -USEUNIT("dxPrnPg.pas"); -USEUNIT("dxPSGlbl.pas"); -USEUNIT("dxPcPrVw.pas"); -USEUNIT("dxPreVw.pas"); -USEUNIT("dxPSCore.pas"); -USEUNIT("dxPPAttr.pas"); -USEUNIT("dxPrnDev.pas"); -USEUNIT("dxBkgnd.pas"); -USEUNIT("dxWrap.pas"); -USEUNIT("dxPSUtl.pas"); -USEUNIT("dxFmMnPg.pas"); -USEUNIT("dxPSImgs.pas"); -USEUNIT("dxPSPopupMan.pas"); -USEUNIT("dxPSEvnt.pas"); -USEUNIT("dxPSESys.pas"); -USEUNIT("dxPSEngn.pas"); -USEUNIT("dxPSPrVw.pas"); -USEUNIT("dxPSForm.pas"); -USEUNIT("dxPSPgsMnuBld.pas"); -USEUNIT("dxExtCtrlsStrs.pas"); -USEUNIT("dxExtctrls.pas"); -USEUNIT("dxPSBaseGridLnk.pas"); -USEUNIT("dxPSEdgePatterns.pas"); -USEUNIT("dxPSFillPatterns.pas"); -USEFORMNS("dxPSPrVwStd.pas", Dxpsprvwstd, dxfmStdPreview); -USEFORMNS("dxFEFDlg.pas", Dxfefdlg, dxFEFDialog); -USEFORMNS("dxfmClr.pas", Dxfmclr, dxfmColorPalette); -USEFORMNS("dxPrnDlg.pas", Dxprndlg, fmdxPrintDialog); -USEFORMNS("dxfmZoom.pas", Dxfmzoom, fmZoom); -USEFORMNS("dxPgSDlg.pas", Dxpgsdlg, dxfmPageSetupDialog); -USEFORMNS("dxBrhDlg.pas", Dxbrhdlg, dxBrushDlg); -USEFORMNS("dxfmChFN.pas", Dxfmchfn, fmdxChangeFileName); -USEFORMNS("dxfmpnfmt.pas", Dxfmpnfmt, fmPageNumberFormat); -USEFORMNS("dxfmDTFmt.pas", Dxfmdtfmt, fmDateTimeFormats); -USEFORMNS("dxfmDfnStl.pas", Dxfmdfnstl, fmdxDefinePrintStyles); -USEFORMNS("dxPSPrVwOpt.pas", Dxpsprvwopt, fmOptions); -USEFORMNS("dxPSfmttl.pas", dxPSfmttl, dxfmReportTitleProperties); -USEFORMNS("dxPSfmEditDesc.pas", Dxpsfmeditdesc, dxfmEditDescription); -USEFORMNS("dxPSfmLnkAdd.pas", Dxpsfmlnkadd, dxfmSelectComponent); -USEUNIT("dxPSGraphicLnk.pas"); -USEUNIT("dxPSCompsProvider.pas"); -USEFORMNS("dxPSCPDsg.pas", Dxpscpdsg, dxfmCPDesigner); -USEFORMNS("dxPSfmCompositionAdd.pas", Dxpsfmcompositionadd, dxfmCompositionAddItems); -USEFORMNS("dxPSfmCompositionDsg.pas", Dxpsfmcompositiondsg, dxfmCompositionDesignWindow); -USEUNIT("dxPSContainerLnk.pas"); -USEUNIT("dxPSDBBasedXplorer.pas"); -USEUNIT("dxPSExtDlgs.pas"); -USEUNIT("dxPSFileBasedXplorer.pas"); -USEUNIT("dxPSfmReportProperties.pas"); -USEUNIT("dxPSShapes.pas"); -USEFORMNS("dxPSTextLnk.pas", Dxpstextlnk, dxfmTextReportLinkDesignWindow); -USEUNIT("dxPSStandardFillPatterns.pas"); -USEUNIT("dxPSXplorerTreeView.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC12.res deleted file mode 100644 index dcc173c9..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC14.bpk deleted file mode 100644 index d09d5c5e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC14.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSCoreC14.bpl -OBJFILES = dxPSGlbl.obj dxPSCore.obj dxPSPrVwStd.obj dxPSRes.obj dxFEFDlg.obj dxBrhDlg.obj dxBase.obj \ - dxPrnPg.obj dxfmClr.obj dxPcPrVw.obj dxPrnDlg.obj dxPreVw.obj \ - dxPPAttr.obj dxPrnDev.obj dxBkgnd.obj dxWrap.obj dxPSUtl.obj \ - dxFmMnPg.obj dxfmZoom.obj dxPgSDlg.obj dxPSImgs.obj dxPSPrVwOpt.obj dxPSfmLnkAdd.obj \ - dxPSfmttl.obj dxPSPopupMan.obj dxfmpnfmt.obj dxfmDTFmt.obj dxPSfmEditDesc.obj \ - dxfmDfnStl.obj dxPSEvnt.obj dxPSESys.obj dxPSEngn.obj dxPSPrVw.obj dxPSForm.obj \ - dxPSGraphicLnk.obj dxPSCompsProvider.obj dxPSCPDsg.obj dxPSfmCompositionAdd.obj \ - dxPSfmCompositionDsg.obj dxPSPgsMnuBld.obj dxfmChFN.obj dxExtCtrlsStrs.obj \ - dxExtctrls.obj dxPSBaseGridLnk.obj dxPSEdgePatterns.obj \ - dxPSFillPatterns.obj dxPSContainerLnk.obj dxPSDBBasedXplorer.obj dxPSExtDlgs.obj \ - dxPSFileBasedXplorer.obj dxPSfmReportProperties.obj dxPSShapes.obj dxPSTextLnk.obj \ - dxPSStandardFillPatterns.obj dxPSXplorerTreeView.obj dxPSSngltn.obj dxPSHFToolbarBld.obj \ - dxPSFMAutoHFTextFmt.obj dxPSAutoHFTextMNUBld.obj dxPSCoreC14.obj -MAINSOURCE = dxPSCoreC14.cpp -RESFILES = dxPSCoreC14.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwStd.dfm dxFEFDlg.dfm dxfmClr.dfm dxPrnDlg.dfm \ - dxfmZoom.dfm dxPgsDlg.dfm dxBrhDlg.dfm dxfmChFN.dfm dxfmpnfmt.dfm dxfmDTFmt.dfm \ - dxfmDfnStl.dfm dxPSPrVwOpt.dfm dxPSfmttl.dfm dxPSfmEditDesc.dfm dxPSfmLnkAdd.dfm \ - dxPSCPDsg.dfm dxPSfmCompositionAdd.dfm dxPSfmCompositionDsg.dfm dxPSContainerLnk.dfm \ - dxPSTextLnk.dfm dxPSfmReportProperties.dfm dxPSExtDlgs.res -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = rtl.bpi dbrtl.bpi dxcomnC14.bpi cxLibraryC14.bpi vcl.bpi vclx.bpi vclimg.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC14.cpp deleted file mode 100644 index ca06e26e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC14.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSCoreC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxcomnC14.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclimg.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEUNIT("dxPSRes.pas"); -USEUNIT("dxBase.pas"); -USEUNIT("dxPrnPg.pas"); -USEUNIT("dxPSGlbl.pas"); -USEUNIT("dxPcPrVw.pas"); -USEUNIT("dxPreVw.pas"); -USEUNIT("dxPSCore.pas"); -USEUNIT("dxPPAttr.pas"); -USEUNIT("dxPrnDev.pas"); -USEUNIT("dxBkgnd.pas"); -USEUNIT("dxWrap.pas"); -USEUNIT("dxPSUtl.pas"); -USEUNIT("dxFmMnPg.pas"); -USEUNIT("dxPSImgs.pas"); -USEUNIT("dxPSPopupMan.pas"); -USEUNIT("dxPSEvnt.pas"); -USEUNIT("dxPSESys.pas"); -USEUNIT("dxPSEngn.pas"); -USEUNIT("dxPSPrVw.pas"); -USEUNIT("dxPSForm.pas"); -USEUNIT("dxPSPgsMnuBld.pas"); -USEUNIT("dxExtCtrlsStrs.pas"); -USEUNIT("dxExtctrls.pas"); -USEUNIT("dxPSBaseGridLnk.pas"); -USEUNIT("dxPSEdgePatterns.pas"); -USEUNIT("dxPSFillPatterns.pas"); -USEFORMNS("dxPSPrVwStd.pas", Dxpsprvwstd, dxfmStdPreview); -USEFORMNS("dxFEFDlg.pas", Dxfefdlg, dxFEFDialog); -USEFORMNS("dxfmClr.pas", Dxfmclr, dxfmColorPalette); -USEFORMNS("dxPrnDlg.pas", Dxprndlg, fmdxPrintDialog); -USEFORMNS("dxfmZoom.pas", Dxfmzoom, fmZoom); -USEFORMNS("dxPgSDlg.pas", Dxpgsdlg, dxfmPageSetupDialog); -USEFORMNS("dxBrhDlg.pas", Dxbrhdlg, dxBrushDlg); -USEFORMNS("dxfmChFN.pas", Dxfmchfn, fmdxChangeFileName); -USEFORMNS("dxfmpnfmt.pas", Dxfmpnfmt, fmPageNumberFormat); -USEFORMNS("dxfmDTFmt.pas", Dxfmdtfmt, fmDateTimeFormats); -USEFORMNS("dxfmDfnStl.pas", Dxfmdfnstl, fmdxDefinePrintStyles); -USEFORMNS("dxPSPrVwOpt.pas", Dxpsprvwopt, fmOptions); -USEFORMNS("dxPSfmttl.pas", dxPSfmttl, dxfmReportTitleProperties); -USEFORMNS("dxPSfmEditDesc.pas", Dxpsfmeditdesc, dxfmEditDescription); -USEFORMNS("dxPSfmLnkAdd.pas", Dxpsfmlnkadd, dxfmSelectComponent); -USEUNIT("dxPSGraphicLnk.pas"); -USEUNIT("dxPSCompsProvider.pas"); -USEFORMNS("dxPSCPDsg.pas", Dxpscpdsg, dxfmCPDesigner); -USEFORMNS("dxPSfmCompositionAdd.pas", Dxpsfmcompositionadd, dxfmCompositionAddItems); -USEFORMNS("dxPSfmCompositionDsg.pas", Dxpsfmcompositiondsg, dxfmCompositionDesignWindow); -USEUNIT("dxPSContainerLnk.pas"); -USEUNIT("dxPSDBBasedXplorer.pas"); -USEUNIT("dxPSExtDlgs.pas"); -USEUNIT("dxPSFileBasedXplorer.pas"); -USEUNIT("dxPSfmReportProperties.pas"); -USEUNIT("dxPSShapes.pas"); -USEFORMNS("dxPSTextLnk.pas", Dxpstextlnk, dxfmTextReportLinkDesignWindow); -USEUNIT("dxPSStandardFillPatterns.pas"); -USEUNIT("dxPSXplorerTreeView.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC14.res deleted file mode 100644 index 57907a47..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC5.bpk deleted file mode 100644 index 4ae8b26e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC5.bpk +++ /dev/null @@ -1,170 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSCorec5.bpl -OBJFILES = dxPSPrVwStd.obj dxPSRes.obj dxFEFDlg.obj dxBrhDlg.obj dxBase.obj \ - dxPrnPg.obj dxPSGlbl.obj dxfmClr.obj dxPcPrVw.obj dxPrnDlg.obj dxPreVw.obj \ - dxPSCore.obj dxPPAttr.obj dxPrnDev.obj dxBkgnd.obj dxWrap.obj dxPSUtl.obj \ - dxFmMnPg.obj dxfmZoom.obj dxPgSDlg.obj dxPSImgs.obj dxPSPrVwOpt.obj dxPSfmLnkAdd.obj \ - dxPSfmttl.obj dxPSPopupMan.obj dxfmpnfmt.obj dxfmDTFmt.obj dxPSfmEditDesc.obj \ - dxfmDfnStl.obj dxPSEvnt.obj dxPSESys.obj dxPSEngn.obj dxPSPrVw.obj dxPSForm.obj \ - dxPSGraphicLnk.obj dxPSCompsProvider.obj dxPSCPDsg.obj dxPSfmCompositionAdd.obj \ - dxPSfmCompositionDsg.obj dxPSPgsMnuBld.obj dxfmChFN.obj dxExtCtrlsStrs.obj \ - dxExtctrls.obj dxPSBaseGridLnk.obj dxPSEdgePatterns.obj \ - dxPSFillPatterns.obj dxPSContainerLnk.obj dxPSDBBasedXplorer.obj dxPSExtDlgs.obj \ - dxPSFileBasedXplorer.obj dxPSfmReportProperties.obj dxPSShapes.obj dxPSTextLnk.obj \ - dxPSStandardFillPatterns.obj dxPSXplorerTreeView.obj dxPSSngltn.obj dxPSHFToolbarBld.obj \ - dxPSFMAutoHFTextFmt.obj dxPSAutoHFTextMNUBld.obj dxPSCoreC5.obj -RESFILES = dxPSCoreC5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwStd.dfm dxFEFDlg.dfm dxfmClr.dfm dxPrnDlg.dfm \ - dxfmZoom.dfm dxPgsDlg.dfm dxBrhDlg.dfm dxfmChFN.dfm dxfmpnfmt.dfm dxfmDTFmt.dfm \ - dxfmDfnStl.dfm dxPSPrVwOpt.dfm dxPSfmttl.dfm dxPSfmEditDesc.dfm dxPSfmLnkAdd.dfm \ - dxPSCPDsg.dfm dxPSfmCompositionAdd.dfm dxPSfmCompositionDsg.dfm dxPSContainerLnk.dfm \ - dxPSTextLnk.dfm dxPSfmReportProperties.dfm dxPSExtDlgs.res -LIBFILES = -LIBRARIES = -SPARELIBS = VCL50.lib -PACKAGES = VCL50.bpi vcldb50.bpi dxcomnc5.bpi cxLibraryVCLC5.bpi vclx50.bpi vcljpg50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC5.cpp deleted file mode 100644 index 935cea2b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC5.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSCoreC5.res"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vclx50.bpi"); -USEPACKAGE("dxcomnC5.bpi"); -USEPACKAGE("vcldb50.bpi"); -USEPACKAGE("vcljpg50.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USEUNIT("dxPSRes.pas"); -USEUNIT("dxBase.pas"); -USEUNIT("dxPrnPg.pas"); -USEUNIT("dxPSGlbl.pas"); -USEUNIT("dxPcPrVw.pas"); -USEUNIT("dxPreVw.pas"); -USEUNIT("dxPSCore.pas"); -USEUNIT("dxPPAttr.pas"); -USEUNIT("dxPrnDev.pas"); -USEUNIT("dxBkgnd.pas"); -USEUNIT("dxWrap.pas"); -USEUNIT("dxPSUtl.pas"); -USEUNIT("dxFmMnPg.pas"); -USEUNIT("dxPSImgs.pas"); -USEUNIT("dxPSPopupMan.pas"); -USEUNIT("dxPSEvnt.pas"); -USEUNIT("dxPSESys.pas"); -USEUNIT("dxPSEngn.pas"); -USEUNIT("dxPSPrVw.pas"); -USEUNIT("dxPSForm.pas"); -USEUNIT("dxPSPgsMnuBld.pas"); -USEUNIT("dxExtCtrlsStrs.pas"); -USEUNIT("dxExtctrls.pas"); -USEUNIT("dxPSBaseGridLnk.pas"); -USEUNIT("dxPSEdgePatterns.pas"); -USEUNIT("dxPSFillPatterns.pas"); -USEFORMNS("dxPSPrVwStd.pas", Dxpsprvwstd, dxfmStdPreview); -USEFORMNS("dxFEFDlg.pas", Dxfefdlg, dxFEFDialog); -USEFORMNS("dxfmClr.pas", Dxfmclr, dxfmColorPalette); -USEFORMNS("dxPrnDlg.pas", Dxprndlg, fmdxPrintDialog); -USEFORMNS("dxfmZoom.pas", Dxfmzoom, fmZoom); -USEFORMNS("dxPgSDlg.pas", Dxpgsdlg, dxfmPageSetupDialog); -USEFORMNS("dxBrhDlg.pas", Dxbrhdlg, dxBrushDlg); -USEFORMNS("dxfmChFN.pas", Dxfmchfn, fmdxChangeFileName); -USEFORMNS("dxfmpnfmt.pas", Dxfmpnfmt, fmPageNumberFormat); -USEFORMNS("dxfmDTFmt.pas", Dxfmdtfmt, fmDateTimeFormats); -USEFORMNS("dxfmDfnStl.pas", Dxfmdfnstl, fmdxDefinePrintStyles); -USEFORMNS("dxPSPrVwOpt.pas", Dxpsprvwopt, fmOptions); -USEFORMNS("dxPSfmttl.pas", dxPSfmttl, dxfmReportTitleProperties); -USEFORMNS("dxPSfmEditDesc.pas", Dxpsfmeditdesc, dxfmEditDescription); -USEFORMNS("dxPSfmLnkAdd.pas", Dxpsfmlnkadd, dxfmSelectComponent); -USEUNIT("dxPSGraphicLnk.pas"); -USEUNIT("dxPSCompsProvider.pas"); -USEFORMNS("dxPSCPDsg.pas", Dxpscpdsg, dxfmCPDesigner); -USEFORMNS("dxPSfmCompositionAdd.pas", Dxpsfmcompositionadd, dxfmCompositionAddItems); -USEFORMNS("dxPSfmCompositionDsg.pas", Dxpsfmcompositiondsg, dxfmCompositionDesignWindow); -USEUNIT("dxPSContainerLnk.pas"); -USEUNIT("dxPSDBBasedXplorer.pas"); -USEUNIT("dxPSExtDlgs.pas"); -USEUNIT("dxPSFileBasedXplorer.pas"); -USEUNIT("dxPSfmReportProperties.pas"); -USEUNIT("dxPSShapes.pas"); -USEFORMNS("dxPSTextLnk.pas", Dxpstextlnk, dxfmTextReportLinkDesignWindow); -USEUNIT("dxPSStandardFillPatterns.pas"); -USEUNIT("dxPSXplorerTreeView.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC5.res deleted file mode 100644 index da1f54d0..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC6.bpk deleted file mode 100644 index 018a5adc..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC6.bpk +++ /dev/null @@ -1,170 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSCorec6.bpl -OBJFILES = dxPSGlbl.obj dxPSCore.obj dxPSPrVwStd.obj dxPSRes.obj dxFEFDlg.obj dxBrhDlg.obj dxBase.obj \ - dxPrnPg.obj dxfmClr.obj dxPcPrVw.obj dxPrnDlg.obj dxPreVw.obj \ - dxPPAttr.obj dxPrnDev.obj dxBkgnd.obj dxWrap.obj dxPSUtl.obj \ - dxFmMnPg.obj dxfmZoom.obj dxPgSDlg.obj dxPSImgs.obj dxPSPrVwOpt.obj dxPSfmLnkAdd.obj \ - dxPSfmttl.obj dxPSPopupMan.obj dxfmpnfmt.obj dxfmDTFmt.obj dxPSfmEditDesc.obj \ - dxfmDfnStl.obj dxPSEvnt.obj dxPSESys.obj dxPSEngn.obj dxPSPrVw.obj dxPSForm.obj \ - dxPSGraphicLnk.obj dxPSCompsProvider.obj dxPSCPDsg.obj dxPSfmCompositionAdd.obj \ - dxPSfmCompositionDsg.obj dxPSPgsMnuBld.obj dxfmChFN.obj dxExtCtrlsStrs.obj \ - dxExtctrls.obj dxPSBaseGridLnk.obj dxPSEdgePatterns.obj \ - dxPSFillPatterns.obj dxPSContainerLnk.obj dxPSDBBasedXplorer.obj dxPSExtDlgs.obj \ - dxPSFileBasedXplorer.obj dxPSfmReportProperties.obj dxPSShapes.obj dxPSTextLnk.obj \ - dxPSStandardFillPatterns.obj dxPSXplorerTreeView.obj dxPSSngltn.obj dxPSHFToolbarBld.obj \ - dxPSFMAutoHFTextFmt.obj dxPSAutoHFTextMNUBld.obj dxPSCoreC6.obj -RESFILES = dxPSCoreC6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwStd.dfm dxFEFDlg.dfm dxfmClr.dfm dxPrnDlg.dfm \ - dxfmZoom.dfm dxPgsDlg.dfm dxBrhDlg.dfm dxfmChFN.dfm dxfmpnfmt.dfm dxfmDTFmt.dfm \ - dxfmDfnStl.dfm dxPSPrVwOpt.dfm dxPSfmttl.dfm dxPSfmEditDesc.dfm dxPSfmLnkAdd.dfm \ - dxPSCPDsg.dfm dxPSfmCompositionAdd.dfm dxPSfmCompositionDsg.dfm dxPSContainerLnk.dfm \ - dxPSTextLnk.dfm dxPSfmReportProperties.dfm dxPSExtDlgs.res -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = rtl.bpi dbrtl.bpi dxcomnC6.bpi cxLibraryVCLC6.bpi vcl.bpi vclx.bpi vcljpg.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System by Developer Express Inc." -aa -Tpp -x -Gn -Gpr -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=1033 -CodePage=1252 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC6.cpp deleted file mode 100644 index 7562a133..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC6.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSCoreC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("dxcomnC6.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcljpg.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEUNIT("dxPSRes.pas"); -USEUNIT("dxBase.pas"); -USEUNIT("dxPrnPg.pas"); -USEUNIT("dxPSGlbl.pas"); -USEUNIT("dxPcPrVw.pas"); -USEUNIT("dxPreVw.pas"); -USEUNIT("dxPSCore.pas"); -USEUNIT("dxPPAttr.pas"); -USEUNIT("dxPrnDev.pas"); -USEUNIT("dxBkgnd.pas"); -USEUNIT("dxWrap.pas"); -USEUNIT("dxPSUtl.pas"); -USEUNIT("dxFmMnPg.pas"); -USEUNIT("dxPSImgs.pas"); -USEUNIT("dxPSPopupMan.pas"); -USEUNIT("dxPSEvnt.pas"); -USEUNIT("dxPSESys.pas"); -USEUNIT("dxPSEngn.pas"); -USEUNIT("dxPSPrVw.pas"); -USEUNIT("dxPSForm.pas"); -USEUNIT("dxPSPgsMnuBld.pas"); -USEUNIT("dxExtCtrlsStrs.pas"); -USEUNIT("dxExtctrls.pas"); -USEUNIT("dxPSBaseGridLnk.pas"); -USEUNIT("dxPSEdgePatterns.pas"); -USEUNIT("dxPSFillPatterns.pas"); -USEFORMNS("dxPSPrVwStd.pas", Dxpsprvwstd, dxfmStdPreview); -USEFORMNS("dxFEFDlg.pas", Dxfefdlg, dxFEFDialog); -USEFORMNS("dxfmClr.pas", Dxfmclr, dxfmColorPalette); -USEFORMNS("dxPrnDlg.pas", Dxprndlg, fmdxPrintDialog); -USEFORMNS("dxfmZoom.pas", Dxfmzoom, fmZoom); -USEFORMNS("dxPgSDlg.pas", Dxpgsdlg, dxfmPageSetupDialog); -USEFORMNS("dxBrhDlg.pas", Dxbrhdlg, dxBrushDlg); -USEFORMNS("dxfmChFN.pas", Dxfmchfn, fmdxChangeFileName); -USEFORMNS("dxfmpnfmt.pas", Dxfmpnfmt, fmPageNumberFormat); -USEFORMNS("dxfmDTFmt.pas", Dxfmdtfmt, fmDateTimeFormats); -USEFORMNS("dxfmDfnStl.pas", Dxfmdfnstl, fmdxDefinePrintStyles); -USEFORMNS("dxPSPrVwOpt.pas", Dxpsprvwopt, fmOptions); -USEFORMNS("dxPSfmttl.pas", dxPSfmttl, dxfmReportTitleProperties); -USEFORMNS("dxPSfmEditDesc.pas", Dxpsfmeditdesc, dxfmEditDescription); -USEFORMNS("dxPSfmLnkAdd.pas", Dxpsfmlnkadd, dxfmSelectComponent); -USEUNIT("dxPSGraphicLnk.pas"); -USEUNIT("dxPSCompsProvider.pas"); -USEFORMNS("dxPSCPDsg.pas", Dxpscpdsg, dxfmCPDesigner); -USEFORMNS("dxPSfmCompositionAdd.pas", Dxpsfmcompositionadd, dxfmCompositionAddItems); -USEFORMNS("dxPSfmCompositionDsg.pas", Dxpsfmcompositiondsg, dxfmCompositionDesignWindow); -USEUNIT("dxPSContainerLnk.pas"); -USEUNIT("dxPSDBBasedXplorer.pas"); -USEUNIT("dxPSExtDlgs.pas"); -USEUNIT("dxPSFileBasedXplorer.pas"); -USEUNIT("dxPSfmReportProperties.pas"); -USEUNIT("dxPSShapes.pas"); -USEFORMNS("dxPSTextLnk.pas", Dxpstextlnk, dxfmTextReportLinkDesignWindow); -USEUNIT("dxPSStandardFillPatterns.pas"); -USEUNIT("dxPSXplorerTreeView.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC6.res deleted file mode 100644 index 9b6f80d4..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD10.dpk deleted file mode 100644 index 660cdafe..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD10.dpk +++ /dev/null @@ -1,101 +0,0 @@ -package dxPSCoreD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcljpg, - dxComnD10, - cxLibraryD10; - -contains - dxWrap, - dxBkGnd, - dxBrhDlg, - dxExtCtrls, - dxExtCtrlsStrs, - dxFEFDlg, - dxfmChFN, - dxfmClr, - dxfmDfnStl, - dxfmDTFmt, - dxfmMnPg, - dxfmPNFmt, - dxfmZoom, - dxPcPrVw, - dxPgsDlg, - dxPpAttr, - dxPreVw, - dxPrnDev, - dxPrnDlg, - dxPrnPg, - dxPSAutoHFTextMnuBld, - dxPSCompsProvider, - dxPSCore, - dxPSCPDsg, - dxPSEdgePatterns, - dxPSEngn, - dxPSESys, - dxPSEvnt, - dxPSExcelEdgePatterns, - dxPSExcelFillPatterns, - dxPSFillPatterns, - dxPSfmAutoHFTextFmt, - dxPSfmCompositionAdd, - dxPSfmCompositionDsg, - dxPSfmEditDesc, - dxPSfmLnkAdd, - dxPSfmTtl, - dxPSForm, - dxPSGlbl, - dxPSGraphicLnk, - dxPSHFToolBarBld, - dxPSImgs, - dxPSPgsMnuBld, - dxPSPopupMan, - dxPSPrVw, - dxPSPrVwOpt, - dxPSPrVwStd, - dxPSRes, - dxPSSngltn, - dxPSUtl, - dxBase, - dxPSBaseGridLnk, - dxPSContainerLnk, - dxPSDBBasedXplorer, - dxPSExtDlgs, - dxPSFileBasedXplorer, - dxPSfmReportProperties, - dxPSShapes, - dxPSTextLnk, - dxPSStandardFillPatterns, - dxPSXplorerTreeView; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD10.res deleted file mode 100644 index f30a8ebc..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD11.dpk deleted file mode 100644 index edfc8f08..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD11.dpk +++ /dev/null @@ -1,101 +0,0 @@ -package dxPSCoreD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcljpg, - dxComnD11, - cxLibraryD11; - -contains - dxWrap, - dxBkGnd, - dxBrhDlg, - dxExtCtrls, - dxExtCtrlsStrs, - dxFEFDlg, - dxfmChFN, - dxfmClr, - dxfmDfnStl, - dxfmDTFmt, - dxfmMnPg, - dxfmPNFmt, - dxfmZoom, - dxPcPrVw, - dxPgsDlg, - dxPpAttr, - dxPreVw, - dxPrnDev, - dxPrnDlg, - dxPrnPg, - dxPSAutoHFTextMnuBld, - dxPSCompsProvider, - dxPSCore, - dxPSCPDsg, - dxPSEdgePatterns, - dxPSEngn, - dxPSESys, - dxPSEvnt, - dxPSExcelEdgePatterns, - dxPSExcelFillPatterns, - dxPSFillPatterns, - dxPSfmAutoHFTextFmt, - dxPSfmCompositionAdd, - dxPSfmCompositionDsg, - dxPSfmEditDesc, - dxPSfmLnkAdd, - dxPSfmTtl, - dxPSForm, - dxPSGlbl, - dxPSGraphicLnk, - dxPSHFToolBarBld, - dxPSImgs, - dxPSPgsMnuBld, - dxPSPopupMan, - dxPSPrVw, - dxPSPrVwOpt, - dxPSPrVwStd, - dxPSRes, - dxPSSngltn, - dxPSUtl, - dxBase, - dxPSBaseGridLnk, - dxPSContainerLnk, - dxPSDBBasedXplorer, - dxPSExtDlgs, - dxPSFileBasedXplorer, - dxPSfmReportProperties, - dxPSShapes, - dxPSTextLnk, - dxPSStandardFillPatterns, - dxPSXplorerTreeView; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD11.res deleted file mode 100644 index 65195605..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD12.dpk deleted file mode 100644 index fbfa40cd..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD12.dpk +++ /dev/null @@ -1,101 +0,0 @@ -package dxPSCoreD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vclimg, - dxComnD12, - cxLibraryD12; - -contains - dxWrap, - dxBkGnd, - dxBrhDlg, - dxExtCtrls, - dxExtCtrlsStrs, - dxFEFDlg, - dxfmChFN, - dxfmClr, - dxfmDfnStl, - dxfmDTFmt, - dxfmMnPg, - dxfmPNFmt, - dxfmZoom, - dxPcPrVw, - dxPgsDlg, - dxPpAttr, - dxPreVw, - dxPrnDev, - dxPrnDlg, - dxPrnPg, - dxPSAutoHFTextMnuBld, - dxPSCompsProvider, - dxPSCore, - dxPSCPDsg, - dxPSEdgePatterns, - dxPSEngn, - dxPSESys, - dxPSEvnt, - dxPSExcelEdgePatterns, - dxPSExcelFillPatterns, - dxPSFillPatterns, - dxPSfmAutoHFTextFmt, - dxPSfmCompositionAdd, - dxPSfmCompositionDsg, - dxPSfmEditDesc, - dxPSfmLnkAdd, - dxPSfmTtl, - dxPSForm, - dxPSGlbl, - dxPSGraphicLnk, - dxPSHFToolBarBld, - dxPSImgs, - dxPSPgsMnuBld, - dxPSPopupMan, - dxPSPrVw, - dxPSPrVwOpt, - dxPSPrVwStd, - dxPSRes, - dxPSSngltn, - dxPSUtl, - dxBase, - dxPSBaseGridLnk, - dxPSContainerLnk, - dxPSDBBasedXplorer, - dxPSExtDlgs, - dxPSFileBasedXplorer, - dxPSfmReportProperties, - dxPSShapes, - dxPSTextLnk, - dxPSStandardFillPatterns, - dxPSXplorerTreeView; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD12.res deleted file mode 100644 index 1c1ee96a..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD14.dpk deleted file mode 100644 index 7e0eb008..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD14.dpk +++ /dev/null @@ -1,101 +0,0 @@ -package dxPSCoreD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vclimg, - dxComnD14, - cxLibraryD14; - -contains - dxWrap, - dxBkGnd, - dxBrhDlg, - dxExtCtrls, - dxExtCtrlsStrs, - dxFEFDlg, - dxfmChFN, - dxfmClr, - dxfmDfnStl, - dxfmDTFmt, - dxfmMnPg, - dxfmPNFmt, - dxfmZoom, - dxPcPrVw, - dxPgsDlg, - dxPpAttr, - dxPreVw, - dxPrnDev, - dxPrnDlg, - dxPrnPg, - dxPSAutoHFTextMnuBld, - dxPSCompsProvider, - dxPSCore, - dxPSCPDsg, - dxPSEdgePatterns, - dxPSEngn, - dxPSESys, - dxPSEvnt, - dxPSExcelEdgePatterns, - dxPSExcelFillPatterns, - dxPSFillPatterns, - dxPSfmAutoHFTextFmt, - dxPSfmCompositionAdd, - dxPSfmCompositionDsg, - dxPSfmEditDesc, - dxPSfmLnkAdd, - dxPSfmTtl, - dxPSForm, - dxPSGlbl, - dxPSGraphicLnk, - dxPSHFToolBarBld, - dxPSImgs, - dxPSPgsMnuBld, - dxPSPopupMan, - dxPSPrVw, - dxPSPrVwOpt, - dxPSPrVwStd, - dxPSRes, - dxPSSngltn, - dxPSUtl, - dxBase, - dxPSBaseGridLnk, - dxPSContainerLnk, - dxPSDBBasedXplorer, - dxPSExtDlgs, - dxPSFileBasedXplorer, - dxPSfmReportProperties, - dxPSShapes, - dxPSTextLnk, - dxPSStandardFillPatterns, - dxPSXplorerTreeView; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD14.res deleted file mode 100644 index b098abe3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD5.dpk deleted file mode 100644 index 27752c09..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD5.dpk +++ /dev/null @@ -1,100 +0,0 @@ -package dxPSCoreD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl50, - vclx50, - vcldb50, - vcljpg50, - dxComnD5, - cxLibraryVCLD5; - -contains - dxWrap, - dxBkGnd, - dxBrhDlg, - dxExtCtrls, - dxExtCtrlsStrs, - dxFEFDlg, - dxfmChFN, - dxfmClr, - dxfmDfnStl, - dxfmDTFmt, - dxfmMnPg, - dxfmPNFmt, - dxfmZoom, - dxPcPrVw, - dxPgsDlg, - dxPpAttr, - dxPreVw, - dxPrnDev, - dxPrnDlg, - dxPrnPg, - dxPSAutoHFTextMnuBld, - dxPSCompsProvider, - dxPSCore, - dxPSCPDsg, - dxPSEdgePatterns, - dxPSEngn, - dxPSESys, - dxPSEvnt, - dxPSExcelEdgePatterns, - dxPSExcelFillPatterns, - dxPSFillPatterns, - dxPSfmAutoHFTextFmt, - dxPSfmCompositionAdd, - dxPSfmCompositionDsg, - dxPSfmEditDesc, - dxPSfmLnkAdd, - dxPSfmTtl, - dxPSForm, - dxPSGlbl, - dxPSGraphicLnk, - dxPSHFToolBarBld, - dxPSImgs, - dxPSPgsMnuBld, - dxPSPopupMan, - dxPSPrVw, - dxPSPrVwOpt, - dxPSPrVwStd, - dxPSRes, - dxPSSngltn, - dxPSUtl, - dxBase, - dxPSBaseGridLnk, - dxPSContainerLnk, - dxPSDBBasedXplorer, - dxPSExtDlgs, - dxPSFileBasedXplorer, - dxPSfmReportProperties, - dxPSShapes, - dxPSTextLnk, - dxPSStandardFillPatterns, - dxPSXplorerTreeView; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD5.res deleted file mode 100644 index 40e25d8a..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD6.dpk deleted file mode 100644 index fc18e0aa..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD6.dpk +++ /dev/null @@ -1,101 +0,0 @@ -package dxPSCoreD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcljpg, - dxComnD6, - cxLibraryVCLD6; - -contains - dxWrap, - dxBkGnd, - dxBrhDlg, - dxExtCtrls, - dxExtCtrlsStrs, - dxFEFDlg, - dxfmChFN, - dxfmClr, - dxfmDfnStl, - dxfmDTFmt, - dxfmMnPg, - dxfmPNFmt, - dxfmZoom, - dxPcPrVw, - dxPgsDlg, - dxPpAttr, - dxPreVw, - dxPrnDev, - dxPrnDlg, - dxPrnPg, - dxPSAutoHFTextMnuBld, - dxPSCompsProvider, - dxPSCore, - dxPSCPDsg, - dxPSEdgePatterns, - dxPSEngn, - dxPSESys, - dxPSEvnt, - dxPSExcelEdgePatterns, - dxPSExcelFillPatterns, - dxPSFillPatterns, - dxPSfmAutoHFTextFmt, - dxPSfmCompositionAdd, - dxPSfmCompositionDsg, - dxPSfmEditDesc, - dxPSfmLnkAdd, - dxPSfmTtl, - dxPSForm, - dxPSGlbl, - dxPSGraphicLnk, - dxPSHFToolBarBld, - dxPSImgs, - dxPSPgsMnuBld, - dxPSPopupMan, - dxPSPrVw, - dxPSPrVwOpt, - dxPSPrVwStd, - dxPSRes, - dxPSSngltn, - dxPSUtl, - dxBase, - dxPSBaseGridLnk, - dxPSContainerLnk, - dxPSDBBasedXplorer, - dxPSExtDlgs, - dxPSFileBasedXplorer, - dxPSfmReportProperties, - dxPSShapes, - dxPSTextLnk, - dxPSStandardFillPatterns, - dxPSXplorerTreeView; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD6.res deleted file mode 100644 index 8b0f3f5f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD7.dpk deleted file mode 100644 index 9c8641db..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD7.dpk +++ /dev/null @@ -1,101 +0,0 @@ -package dxPSCoreD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcljpg, - dxComnD7, - cxLibraryVCLD7; - -contains - dxWrap, - dxBkGnd, - dxBrhDlg, - dxExtCtrls, - dxExtCtrlsStrs, - dxFEFDlg, - dxfmChFN, - dxfmClr, - dxfmDfnStl, - dxfmDTFmt, - dxfmMnPg, - dxfmPNFmt, - dxfmZoom, - dxPcPrVw, - dxPgsDlg, - dxPpAttr, - dxPreVw, - dxPrnDev, - dxPrnDlg, - dxPrnPg, - dxPSAutoHFTextMnuBld, - dxPSCompsProvider, - dxPSCore, - dxPSCPDsg, - dxPSEdgePatterns, - dxPSEngn, - dxPSESys, - dxPSEvnt, - dxPSExcelEdgePatterns, - dxPSExcelFillPatterns, - dxPSFillPatterns, - dxPSfmAutoHFTextFmt, - dxPSfmCompositionAdd, - dxPSfmCompositionDsg, - dxPSfmEditDesc, - dxPSfmLnkAdd, - dxPSfmTtl, - dxPSForm, - dxPSGlbl, - dxPSGraphicLnk, - dxPSHFToolBarBld, - dxPSImgs, - dxPSPgsMnuBld, - dxPSPopupMan, - dxPSPrVw, - dxPSPrVwOpt, - dxPSPrVwStd, - dxPSRes, - dxPSSngltn, - dxPSUtl, - dxBase, - dxPSBaseGridLnk, - dxPSContainerLnk, - dxPSDBBasedXplorer, - dxPSExtDlgs, - dxPSFileBasedXplorer, - dxPSfmReportProperties, - dxPSShapes, - dxPSTextLnk, - dxPSStandardFillPatterns, - dxPSXplorerTreeView; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD7.res deleted file mode 100644 index cde2cbca..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD9.dpk deleted file mode 100644 index 3de36140..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD9.dpk +++ /dev/null @@ -1,101 +0,0 @@ -package dxPSCoreD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - vclx, - dbrtl, - vcljpg, - dxComnD9, - cxLibraryD9; - -contains - dxWrap, - dxBkGnd, - dxBrhDlg, - dxExtCtrls, - dxExtCtrlsStrs, - dxFEFDlg, - dxfmChFN, - dxfmClr, - dxfmDfnStl, - dxfmDTFmt, - dxfmMnPg, - dxfmPNFmt, - dxfmZoom, - dxPcPrVw, - dxPgsDlg, - dxPpAttr, - dxPreVw, - dxPrnDev, - dxPrnDlg, - dxPrnPg, - dxPSAutoHFTextMnuBld, - dxPSCompsProvider, - dxPSCore, - dxPSCPDsg, - dxPSEdgePatterns, - dxPSEngn, - dxPSESys, - dxPSEvnt, - dxPSExcelEdgePatterns, - dxPSExcelFillPatterns, - dxPSFillPatterns, - dxPSfmAutoHFTextFmt, - dxPSfmCompositionAdd, - dxPSfmCompositionDsg, - dxPSfmEditDesc, - dxPSfmLnkAdd, - dxPSfmTtl, - dxPSForm, - dxPSGlbl, - dxPSGraphicLnk, - dxPSHFToolBarBld, - dxPSImgs, - dxPSPgsMnuBld, - dxPSPopupMan, - dxPSPrVw, - dxPSPrVwOpt, - dxPSPrVwStd, - dxPSRes, - dxPSSngltn, - dxPSUtl, - dxBase, - dxPSBaseGridLnk, - dxPSContainerLnk, - dxPSDBBasedXplorer, - dxPSExtDlgs, - dxPSFileBasedXplorer, - dxPSfmReportProperties, - dxPSShapes, - dxPSTextLnk, - dxPSStandardFillPatterns, - dxPSXplorerTreeView; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD9.res deleted file mode 100644 index a5e7e10e..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSCoreD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC10.bpk deleted file mode 100644 index f3c5edcf..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC10.bpk +++ /dev/null @@ -1,184 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSDBTeeChartC10.bpl -OBJFILES = dxPSDBTCLnkReg.obj dxPSDBTCLnk.obj dxPSDBTeeChartC10.obj -MAINSOURCE = dxPSDBTeeChartC10.cpp -RESFILES = dxPSDBTeeChartC10.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi designide.bpi dxPSTeeChartC10.bpi dxPSCoreC10.bpi dxCoreC10.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee.bpi teedb.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5C10.bpi teedb5C10.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6C10.bpi teedb6C10.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee710.bpi teedb710.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee810.bpi teedb810.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC10.cpp deleted file mode 100644 index 51acbe9c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC10.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSDBTeeChartC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("dxPSTeeChartC10.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee.bpi"); -USEPACKAGE("teedb.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5C10.bpi"); -USEPACKAGE("teedb5C10.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6C10.bpi"); -USEPACKAGE("teedb6C10.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee710.bpi"); -USEPACKAGE("teedb710.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee810.bpi"); -USEPACKAGE("teedb810.bpi"); -#endif -USEUNIT("dxPSDBTCLnk.pas"); -USEUNIT("dxPSDBTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC10.res deleted file mode 100644 index c35c7c5b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC11.bpk deleted file mode 100644 index 5bca6ee1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC11.bpk +++ /dev/null @@ -1,184 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSDBTeeChartC11.bpl -OBJFILES = dxPSDBTCLnkReg.obj dxPSDBTCLnk.obj dxPSDBTeeChartC11.obj -MAINSOURCE = dxPSDBTeeChartC11.cpp -RESFILES = dxPSDBTeeChartC11.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi designide.bpi dxPSTeeChartC11.bpi dxPSCoreC11.bpi dxCoreC11.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee.bpi teedb.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5C11.bpi teedb5C11.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6C11.bpi teedb6C11.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee711.bpi teedb711.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee811.bpi teedb811.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC11.cpp deleted file mode 100644 index f64b4faa..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC11.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSDBTeeChartC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("dxPSTeeChartC11.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee.bpi"); -USEPACKAGE("teedb.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5C11.bpi"); -USEPACKAGE("teedb5C11.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6C11.bpi"); -USEPACKAGE("teedb6C11.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee711.bpi"); -USEPACKAGE("teedb711.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee811.bpi"); -USEPACKAGE("teedb811.bpi"); -#endif -USEUNIT("dxPSDBTCLnk.pas"); -USEUNIT("dxPSDBTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC11.res deleted file mode 100644 index ca529d5f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC12.bpk deleted file mode 100644 index 07ecfce0..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC12.bpk +++ /dev/null @@ -1,184 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSDBTeeChartC12.bpl -OBJFILES = dxPSDBTCLnkReg.obj dxPSDBTCLnk.obj dxPSDBTeeChartC12.obj -MAINSOURCE = dxPSDBTeeChartC12.cpp -RESFILES = dxPSDBTeeChartC12.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi designide.bpi dxPSTeeChartC12.bpi dxPSCoreC12.bpi dxCoreC12.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee.bpi teedb.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5C12.bpi teedb5C12.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6C12.bpi teedb6C12.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee712.bpi teedb712.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee812.bpi teedb812.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC12.cpp deleted file mode 100644 index 28069763..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC12.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSDBTeeChartC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("dxPSTeeChartC12.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee.bpi"); -USEPACKAGE("teedb.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5C12.bpi"); -USEPACKAGE("teedb5C12.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6C12.bpi"); -USEPACKAGE("teedb6C12.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee712.bpi"); -USEPACKAGE("teedb712.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee812.bpi"); -USEPACKAGE("teedb812.bpi"); -#endif -USEUNIT("dxPSDBTCLnk.pas"); -USEUNIT("dxPSDBTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC12.res deleted file mode 100644 index 5bb75f1d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC14.bpk deleted file mode 100644 index 340c1540..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC14.bpk +++ /dev/null @@ -1,184 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSDBTeeChartC14.bpl -OBJFILES = dxPSDBTCLnkReg.obj dxPSDBTCLnk.obj dxPSDBTeeChartC14.obj -MAINSOURCE = dxPSDBTeeChartC14.cpp -RESFILES = dxPSDBTeeChartC14.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi designide.bpi dxPSTeeChartC14.bpi dxPSCoreC14.bpi dxCoreC14.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee.bpi teedb.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5C14.bpi teedb5C14.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6C14.bpi teedb6C14.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee712.bpi teedb712.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee812.bpi teedb812.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC14.cpp deleted file mode 100644 index 9941b828..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC14.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSDBTeeChartC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("dxPSTeeChartC14.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee.bpi"); -USEPACKAGE("teedb.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5C14.bpi"); -USEPACKAGE("teedb5C14.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6C14.bpi"); -USEPACKAGE("teedb6C14.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee712.bpi"); -USEPACKAGE("teedb712.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee812.bpi"); -USEPACKAGE("teedb812.bpi"); -#endif -USEUNIT("dxPSDBTCLnk.pas"); -USEUNIT("dxPSDBTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC14.res deleted file mode 100644 index e23978cc..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC5.bpk deleted file mode 100644 index 25afcc16..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC5.bpk +++ /dev/null @@ -1,187 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSDBTeeChartc5.bpl -OBJFILES = dxPSDBTCLnkReg.obj dxPSDBTCLnk.obj dxPSDBTeeChartc5.obj -RESFILES = dxPSDBTeeChartc5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = vcl50.bpi vcldb50.bpi dxPSTeeChartc5.bpi dxPSCorec5.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee50.bpi teedb50.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5c5.bpi teedb5c5.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6c5.bpi teedb6c5.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee7c5.bpi teedb7c5.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee8c5.bpi teedb8c5.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC5.cpp deleted file mode 100644 index 582fd581..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC5.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSDBTeeChartc5.res"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vcldb50.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("dxPSTeeChartc5.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee50.bpi"); -USEPACKAGE("teedb50.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5c5.bpi"); -USEPACKAGE("teedb5c5.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6c5.bpi"); -USEPACKAGE("teedb6c5.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee7c5.bpi"); -USEPACKAGE("teedb7c5.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee8c5.bpi"); -USEPACKAGE("teedb8c5.bpi"); -#endif -USEUNIT("dxPSDBTCLnk.pas"); -USEUNIT("dxPSDBTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC5.res deleted file mode 100644 index 6a81bcc7..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC6.bpk deleted file mode 100644 index 1f0ba264..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC6.bpk +++ /dev/null @@ -1,187 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSDBTeeChartC6.bpl -OBJFILES = dxPSDBTCLnkReg.obj dxPSDBTCLnk.obj dxPSDBTeeChartC6.obj -RESFILES = dxPSDBTeeChartC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxPSTeeChartC6.bpi dxPSCoreC6.bpi dxCoreC6.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee.bpi teedb.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5c6.bpi teedb5c6.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6c6.bpi teedb6c6.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee7c6.bpi teedb7c6.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee8c6.bpi teedb8c6.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC6.cpp deleted file mode 100644 index 16ffff21..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC6.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSDBTeeChartC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("dxPSTeeChartC6.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee.bpi"); -USEPACKAGE("teedb.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5c6.bpi"); -USEPACKAGE("teedb5c6.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6c6.bpi"); -USEPACKAGE("teedb6c6.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee7c6.bpi"); -USEPACKAGE("teedb7c6.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee8c6.bpi"); -USEPACKAGE("teedb8c6.bpi"); -#endif -USEUNIT("dxPSDBTCLnk.pas"); -USEUNIT("dxPSDBTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC6.res deleted file mode 100644 index 766ee183..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD10.dpk deleted file mode 100644 index e66f2a99..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD10.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSDBTeeChartD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD10, - dxPSTeeChartD10, -{$IFNDEF TEEPRO} - tee, - teedb; -{$ELSE} -{$IFDEF TEE7} - tee710, - teedb710; -{$ENDIF} -{$IFDEF TEE8} - tee810, - teedb810; -{$ENDIF} -{$ENDIF} - -contains - dxPSDBTCLnkReg, - dxPSDBTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD10.res deleted file mode 100644 index d9799121..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD11.dpk deleted file mode 100644 index 5a8ea064..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD11.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSDBTeeChartD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD11, - dxPSTeeChartD11, -{$IFNDEF TEEPRO} - tee, - teedb; -{$ELSE} -{$IFDEF TEE7} - tee711, - teedb711; -{$ENDIF} -{$IFDEF TEE8} - tee811, - teedb811; -{$ENDIF} -{$ENDIF} - -contains - dxPSDBTCLnkReg, - dxPSDBTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD11.res deleted file mode 100644 index 228bd15b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD12.dpk deleted file mode 100644 index 38476d89..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD12.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSDBTeeChartD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD12, - dxPSTeeChartD12, -{$IFNDEF TEEPRO} - tee, - teedb; -{$ELSE} -{$IFDEF TEE7} - tee712, - teedb712; -{$ENDIF} -{$IFDEF TEE8} - tee812, - teedb812; -{$ENDIF} -{$ENDIF} - -contains - dxPSDBTCLnkReg, - dxPSDBTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD12.res deleted file mode 100644 index a2579182..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD14.dpk deleted file mode 100644 index 63868c63..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD14.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSDBTeeChartD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD14, - dxPSTeeChartD14, -{$IFNDEF TEEPRO} - tee, - teedb; -{$ELSE} -{$IFDEF TEE7} - tee712, - teedb712; -{$ENDIF} -{$IFDEF TEE8} - tee812, - teedb812; -{$ENDIF} -{$ENDIF} - -contains - dxPSDBTCLnkReg, - dxPSDBTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD14.res deleted file mode 100644 index f8c95ea3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD5.dpk deleted file mode 100644 index 40fcbcba..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD5.dpk +++ /dev/null @@ -1,58 +0,0 @@ -package dxPSDBTeeChartD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dxPSTeeChartD5, -{$IFNDEF TEEPRO} - tee50, - teedb50; -{$ELSE} -{$IFDEF TEE5} - tee55, - teedb55; -{$ENDIF} -{$IFDEF TEE6} - tee65, - teedb65; -{$ENDIF} -{$IFDEF TEE7} - tee75, - teedb75; -{$ENDIF} -{$IFDEF TEE8} - tee85, - teedb85; -{$ENDIF} -{$ENDIF} - -contains - dxPSDBTCLnkReg, - dxPSDBTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD5.res deleted file mode 100644 index 0f818ac5..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD6.dpk deleted file mode 100644 index beeb5c37..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD6.dpk +++ /dev/null @@ -1,58 +0,0 @@ -package dxPSDBTeeChartD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD6, - dxPSTeeChartD6, -{$IFNDEF TEEPRO} - tee, - teedb; -{$ELSE} -{$IFDEF TEE5} - tee, - teedb; -{$ENDIF} -{$IFDEF TEE6} - tee66, - teedb66; -{$ENDIF} -{$IFDEF TEE7} - tee76, - teedb76; -{$ENDIF} -{$IFDEF TEE8} - tee86, - teedb86; -{$ENDIF} -{$ENDIF} - -contains - dxPSDBTCLnkReg, - dxPSDBTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD6.res deleted file mode 100644 index 6a525241..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD7.dpk deleted file mode 100644 index 0c9531a8..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD7.dpk +++ /dev/null @@ -1,58 +0,0 @@ -package dxPSDBTeeChartD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD7, - dxPSTeeChartD7, -{$IFNDEF TEEPRO} - tee, - teedb; -{$ELSE} -{$IFDEF TEE5} - tee57, - teedb57; -{$ENDIF} -{$IFDEF TEE6} - tee67, - teedb67; -{$ENDIF} -{$IFDEF TEE7} - tee77, - teedb77; -{$ENDIF} -{$IFDEF TEE8} - tee87, - teedb87; -{$ENDIF} -{$ENDIF} - -contains - dxPSDBTCLnkReg, - dxPSDBTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD7.res deleted file mode 100644 index df5ed003..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD9.dpk deleted file mode 100644 index 0573b29f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD9.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSDBTeeChartD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for DBTeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD9, - dxPSTeeChartD9, -{$IFNDEF TEEPRO} - tee, - teedb; -{$ELSE} -{$IFDEF TEE7} - tee79, - teedb79; -{$ENDIF} -{$IFDEF TEE8} - tee89, - teedb89; -{$ENDIF} -{$ENDIF} - -contains - dxPSDBTCLnkReg, - dxPSDBTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD9.res deleted file mode 100644 index e11a0749..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSDBTeeChartD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC10.bpk deleted file mode 100644 index 486bf554..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC10.bpk +++ /dev/null @@ -1,176 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSLnksC10.bpl -OBJFILES = dxPSChlbxLnk.obj dxPSLbxLnk.obj dxPSLnkReg.obj dxPSGrLnks.obj \ - dxPSStdGrLnk.obj dxPSTVLnk.obj dxPSRELnk.obj dxPSImgLnk.obj dxPSDBCtrlLnkReg.obj \ - dxPSDBCtrlLnks.obj dxPSDBCtrlProducers.obj dxPSLVLnk.obj dxPSLnksC10.obj -MAINSOURCE = dxPSLnksC10.cpp -RESFILES = dxPSLnksC10.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSChlbxLnk.dfm dxPSLbxLnk.dfm dxPSStdGrLnk.dfm \ - dxPSLVLnk.dfm dxPSTVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi cxLibraryC10.bpi designide.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - vcldb.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLinks (Standard) by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC10.cpp deleted file mode 100644 index 39a5a08b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC10.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USERES("dxPSLnksC10.res"); -USEUNIT("dxPSLnkReg.pas"); -USEUNIT("dxPSImgLnk.pas"); -USEFORMNS("dxPSChlbxLnk.pas", Dxpschlbxlnk, dxChlbxReportLinkDesignWindow); -USEFORMNS("dxPSLbxLnk.pas", Dxpslbxlnk, dxLBxReportLinkDesignWindow); -USEFORMNS("dxPSStdGrLnk.pas", Dxpsstdgrlnk, dxGridReportLinkDesignWindow); -USEFORMNS("dxPSTVLnk.pas", Dxpstvlnk, dxTVReportLinkDesignWindow); -USEUNIT("dxPSDBCtrlLnkReg.pas"); -USEUNIT("dxPSDBCtrlLnks.pas"); -USEUNIT("dxPSDBCtrlProducers.pas"); -USEUNIT("dxPSLVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC10.res deleted file mode 100644 index 1bebaa88..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC11.bpk deleted file mode 100644 index 7e8293a3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC11.bpk +++ /dev/null @@ -1,176 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSLnksC11.bpl -OBJFILES = dxPSChlbxLnk.obj dxPSLbxLnk.obj dxPSLnkReg.obj dxPSGrLnks.obj \ - dxPSStdGrLnk.obj dxPSTVLnk.obj dxPSRELnk.obj dxPSImgLnk.obj dxPSDBCtrlLnkReg.obj \ - dxPSDBCtrlLnks.obj dxPSDBCtrlProducers.obj dxPSLVLnk.obj dxPSLnksC11.obj -MAINSOURCE = dxPSLnksC11.cpp -RESFILES = dxPSLnksC11.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSChlbxLnk.dfm dxPSLbxLnk.dfm dxPSStdGrLnk.dfm \ - dxPSLVLnk.dfm dxPSTVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi cxLibraryC11.bpi designide.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - vcldb.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLinks (Standard) by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC11.cpp deleted file mode 100644 index ab8a8653..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC11.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USERES("dxPSLnksC11.res"); -USEUNIT("dxPSLnkReg.pas"); -USEUNIT("dxPSImgLnk.pas"); -USEFORMNS("dxPSChlbxLnk.pas", Dxpschlbxlnk, dxChlbxReportLinkDesignWindow); -USEFORMNS("dxPSLbxLnk.pas", Dxpslbxlnk, dxLBxReportLinkDesignWindow); -USEFORMNS("dxPSStdGrLnk.pas", Dxpsstdgrlnk, dxGridReportLinkDesignWindow); -USEFORMNS("dxPSTVLnk.pas", Dxpstvlnk, dxTVReportLinkDesignWindow); -USEUNIT("dxPSDBCtrlLnkReg.pas"); -USEUNIT("dxPSDBCtrlLnks.pas"); -USEUNIT("dxPSDBCtrlProducers.pas"); -USEUNIT("dxPSLVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC11.res deleted file mode 100644 index 6af764a6..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC12.bpk deleted file mode 100644 index 40127e08..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC12.bpk +++ /dev/null @@ -1,176 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSLnksC12.bpl -OBJFILES = dxPSChlbxLnk.obj dxPSLbxLnk.obj dxPSLnkReg.obj dxPSGrLnks.obj \ - dxPSStdGrLnk.obj dxPSTVLnk.obj dxPSRELnk.obj dxPSImgLnk.obj dxPSDBCtrlLnkReg.obj \ - dxPSDBCtrlLnks.obj dxPSDBCtrlProducers.obj dxPSLVLnk.obj dxPSLnksC12.obj -MAINSOURCE = dxPSLnksC12.cpp -RESFILES = dxPSLnksC12.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSChlbxLnk.dfm dxPSLbxLnk.dfm dxPSStdGrLnk.dfm \ - dxPSLVLnk.dfm dxPSTVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi cxLibraryC12.bpi designide.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - vcldb.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLinks (Standard) by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC12.cpp deleted file mode 100644 index 1ec5fdb1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC12.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USERES("dxPSLnksC12.res"); -USEUNIT("dxPSLnkReg.pas"); -USEUNIT("dxPSImgLnk.pas"); -USEFORMNS("dxPSChlbxLnk.pas", Dxpschlbxlnk, dxChlbxReportLinkDesignWindow); -USEFORMNS("dxPSLbxLnk.pas", Dxpslbxlnk, dxLBxReportLinkDesignWindow); -USEFORMNS("dxPSStdGrLnk.pas", Dxpsstdgrlnk, dxGridReportLinkDesignWindow); -USEFORMNS("dxPSTVLnk.pas", Dxpstvlnk, dxTVReportLinkDesignWindow); -USEUNIT("dxPSDBCtrlLnkReg.pas"); -USEUNIT("dxPSDBCtrlLnks.pas"); -USEUNIT("dxPSDBCtrlProducers.pas"); -USEUNIT("dxPSLVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC12.res deleted file mode 100644 index 8e2f55c3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC14.bpk deleted file mode 100644 index 1d41006e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC14.bpk +++ /dev/null @@ -1,176 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSLnksC14.bpl -OBJFILES = dxPSChlbxLnk.obj dxPSLbxLnk.obj dxPSLnkReg.obj dxPSGrLnks.obj \ - dxPSStdGrLnk.obj dxPSTVLnk.obj dxPSRELnk.obj dxPSImgLnk.obj dxPSDBCtrlLnkReg.obj \ - dxPSDBCtrlLnks.obj dxPSDBCtrlProducers.obj dxPSLVLnk.obj dxPSLnksC14.obj -MAINSOURCE = dxPSLnksC14.cpp -RESFILES = dxPSLnksC14.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSChlbxLnk.dfm dxPSLbxLnk.dfm dxPSStdGrLnk.dfm \ - dxPSLVLnk.dfm dxPSTVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi cxLibraryC14.bpi designide.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - vcldb.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLinks (Standard) by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC14.cpp deleted file mode 100644 index ba5810dd..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC14.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USERES("dxPSLnksC14.res"); -USEUNIT("dxPSLnkReg.pas"); -USEUNIT("dxPSImgLnk.pas"); -USEFORMNS("dxPSChlbxLnk.pas", Dxpschlbxlnk, dxChlbxReportLinkDesignWindow); -USEFORMNS("dxPSLbxLnk.pas", Dxpslbxlnk, dxLBxReportLinkDesignWindow); -USEFORMNS("dxPSStdGrLnk.pas", Dxpsstdgrlnk, dxGridReportLinkDesignWindow); -USEFORMNS("dxPSTVLnk.pas", Dxpstvlnk, dxTVReportLinkDesignWindow); -USEUNIT("dxPSDBCtrlLnkReg.pas"); -USEUNIT("dxPSDBCtrlLnks.pas"); -USEUNIT("dxPSDBCtrlProducers.pas"); -USEUNIT("dxPSLVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC14.res deleted file mode 100644 index 81a7a6cf..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC5.bpk deleted file mode 100644 index e4a1a0ce..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC5.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSLnksc5.bpl -OBJFILES = dxPSChlbxLnk.obj dxPSLbxLnk.obj dxPSLnkReg.obj dxPSGrLnks.obj \ - dxPSStdGrLnk.obj dxPSTVLnk.obj dxPSRELnk.obj dxPSImgLnk.obj dxPSDBCtrlLnkReg.obj \ - dxPSDBCtrlLnks.obj dxPSDBCtrlProducers.obj dxPSLVLnk.obj dxPSLnksC5.obj -RESFILES = dxPSLnksc5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSChlbxLnk.dfm dxPSLbxLnk.dfm dxPSStdGrLnk.dfm \ - dxPSLVLnk.dfm dxPSTVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCorec5.bpi cxLibraryVCLC5.bpi vcldb50.bpi vcl50.bpi vclx50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLinks (Standard) by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC5.cpp deleted file mode 100644 index 186dfe9a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC5.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vclx50.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("vcldb50.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USERES("dxPSLnksc5.res"); -USEUNIT("dxPSLnkReg.pas"); -USEUNIT("dxPSImgLnk.pas"); -USEFORMNS("dxPSChlbxLnk.pas", Dxpschlbxlnk, dxChlbxReportLinkDesignWindow); -USEFORMNS("dxPSLbxLnk.pas", Dxpslbxlnk, dxLBxReportLinkDesignWindow); -USEFORMNS("dxPSStdGrLnk.pas", Dxpsstdgrlnk, dxGridReportLinkDesignWindow); -USEFORMNS("dxPSTVLnk.pas", Dxpstvlnk, dxTVReportLinkDesignWindow); -USEUNIT("dxPSDBCtrlLnkReg.pas"); -USEUNIT("dxPSDBCtrlLnks.pas"); -USEUNIT("dxPSDBCtrlProducers.pas"); -USEUNIT("dxPSLVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC5.res deleted file mode 100644 index 07046a37..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC6.bpk deleted file mode 100644 index 2857b607..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC6.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSLnksC6.bpl -OBJFILES = dxPSChlbxLnk.obj dxPSLbxLnk.obj dxPSLnkReg.obj dxPSGrLnks.obj \ - dxPSStdGrLnk.obj dxPSTVLnk.obj dxPSRELnk.obj dxPSImgLnk.obj dxPSDBCtrlLnkReg.obj \ - dxPSDBCtrlLnks.obj dxPSDBCtrlProducers.obj dxPSLVLnk.obj dxPSLnksC6.obj -RESFILES = dxPSLnksC6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSChlbxLnk.dfm dxPSLbxLnk.dfm dxPSStdGrLnk.dfm \ - dxPSLVLnk.dfm dxPSTVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi cxLibraryVCLC6.bpi designide.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - vcldb.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLinks (Standard) by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC6.cpp deleted file mode 100644 index 2f38cf6f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC6.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USERES("dxPSLnksC6.res"); -USEUNIT("dxPSLnkReg.pas"); -USEUNIT("dxPSImgLnk.pas"); -USEFORMNS("dxPSChlbxLnk.pas", Dxpschlbxlnk, dxChlbxReportLinkDesignWindow); -USEFORMNS("dxPSLbxLnk.pas", Dxpslbxlnk, dxLBxReportLinkDesignWindow); -USEFORMNS("dxPSStdGrLnk.pas", Dxpsstdgrlnk, dxGridReportLinkDesignWindow); -USEFORMNS("dxPSTVLnk.pas", Dxpstvlnk, dxTVReportLinkDesignWindow); -USEUNIT("dxPSDBCtrlLnkReg.pas"); -USEUNIT("dxPSDBCtrlLnks.pas"); -USEUNIT("dxPSDBCtrlProducers.pas"); -USEUNIT("dxPSLVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC6.res deleted file mode 100644 index 202d6adc..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD10.dpk deleted file mode 100644 index b577b996..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD10.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSLnksD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks (Standard) by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcldb, - vclshlctrls, - designide, - dxPSCoreD10; - -contains - dxPSLnkReg, - dxPSGrLnks, - dxPSImgLnk, - dxPSLbxLnk, - dxPSChLbxLnk, - dxPSRELnk, - dxPSStdGrLnk, - dxPSTVLnk, - dxPSDBCtrlLnkReg, - dxPSDBCtrlLnks, - dxPSDBCtrlProducers, - dxPSLVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD10.res deleted file mode 100644 index cc060b29..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD11.dpk deleted file mode 100644 index e8fec4de..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD11.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSLnksD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks (Standard) by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcldb, - vclshlctrls, - designide, - dxPSCoreD11; - -contains - dxPSLnkReg, - dxPSGrLnks, - dxPSImgLnk, - dxPSLbxLnk, - dxPSChLbxLnk, - dxPSRELnk, - dxPSStdGrLnk, - dxPSTVLnk, - dxPSDBCtrlLnkReg, - dxPSDBCtrlLnks, - dxPSDBCtrlProducers, - dxPSLVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD11.res deleted file mode 100644 index be69aa07..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD12.dpk deleted file mode 100644 index 7708b5e5..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD12.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSLnksD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks (Standard) by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcldb, - vclshlctrls, - designide, - dxPSCoreD12; - -contains - dxPSLnkReg, - dxPSGrLnks, - dxPSImgLnk, - dxPSLbxLnk, - dxPSChLbxLnk, - dxPSRELnk, - dxPSStdGrLnk, - dxPSTVLnk, - dxPSDBCtrlLnkReg, - dxPSDBCtrlLnks, - dxPSDBCtrlProducers, - dxPSLVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD12.res deleted file mode 100644 index df64d1f9..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD14.dpk deleted file mode 100644 index 01623ce9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD14.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSLnksD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks (Standard) by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcldb, - vclshlctrls, - designide, - dxPSCoreD14; - -contains - dxPSLnkReg, - dxPSGrLnks, - dxPSImgLnk, - dxPSLbxLnk, - dxPSChLbxLnk, - dxPSRELnk, - dxPSStdGrLnk, - dxPSTVLnk, - dxPSDBCtrlLnkReg, - dxPSDBCtrlLnks, - dxPSDBCtrlProducers, - dxPSLVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD14.res deleted file mode 100644 index a330309e..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD5.dpk deleted file mode 100644 index cc921c06..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD5.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPSLnksD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks (Standard) by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - vcldb50, - dxPSCoreD5; - -contains - dxPSLnkReg, - dxPSGrLnks, - dxPSImgLnk, - dxPSLbxLnk, - dxPSChLbxLnk, - dxPSRELnk, - dxPSStdGrLnk, - dxPSTVLnk, - dxPSDBCtrlLnkReg, - dxPSDBCtrlLnks, - dxPSDBCtrlProducers, - dxPSLVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD5.res deleted file mode 100644 index 4743c3b9..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD6.dpk deleted file mode 100644 index 7619f646..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD6.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSLnksD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks (Standard) by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcldb, - vclshlctrls, - designide, - dxPSCoreD6; - -contains - dxPSLnkReg, - dxPSGrLnks, - dxPSImgLnk, - dxPSLbxLnk, - dxPSChLbxLnk, - dxPSRELnk, - dxPSStdGrLnk, - dxPSTVLnk, - dxPSDBCtrlLnkReg, - dxPSDBCtrlLnks, - dxPSDBCtrlProducers, - dxPSLVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD6.res deleted file mode 100644 index 9c87f464..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD7.dpk deleted file mode 100644 index c427c13f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD7.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSLnksD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks (Standard) by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcldb, - vclshlctrls, - designide, - dxPSCoreD7; - -contains - dxPSLnkReg, - dxPSGrLnks, - dxPSImgLnk, - dxPSLbxLnk, - dxPSChLbxLnk, - dxPSRELnk, - dxPSStdGrLnk, - dxPSTVLnk, - dxPSDBCtrlLnkReg, - dxPSDBCtrlLnks, - dxPSDBCtrlProducers, - dxPSLVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD7.res deleted file mode 100644 index 60a0dad3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD9.dpk deleted file mode 100644 index 2652e9da..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD9.dpk +++ /dev/null @@ -1,50 +0,0 @@ -package dxPSLnksD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks (Standard) by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - vcldb, - vclshlctrls, - designide, - dxPSCoreD9; - -contains - dxPSLnkReg, - dxPSGrLnks, - dxPSImgLnk, - dxPSLbxLnk, - dxPSChLbxLnk, - dxPSRELnk, - dxPSStdGrLnk, - dxPSTVLnk, - dxPSDBCtrlLnkReg, - dxPSDBCtrlLnks, - dxPSDBCtrlProducers, - dxPSLVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD9.res deleted file mode 100644 index 7fc696b8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSLnksD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC10.bpk deleted file mode 100644 index d68afc4a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC10.bpk +++ /dev/null @@ -1,173 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSPrVwAdvC10.bpl -OBJFILES = dxPSPrVwAdv.obj dxPSPrVwAdvC10.obj -MAINSOURCE = dxPSPrVwAdvC10.cpp -RESFILES = dxPSPrVwAdvC10.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwAdv.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi dxBarExtItemsC10.bpi dxBarC10.bpi dxThemeC10.bpi \ - cxLibraryC10.bpi rtl.bpi vcl.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Advanced PreviewWindow by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC10.cpp deleted file mode 100644 index 4680f6ad..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC10.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSPrVwAdvC10.res"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dxcomnC10.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("dxBarExtItemsC10.bpi"); -USEPACKAGE("dxBarC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEFORMNS("dxPSPrVwAdv.pas", Dxpsprvwadv, dxfmPreviewWdxBar); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC10.res deleted file mode 100644 index fc4bb551..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC11.bpk deleted file mode 100644 index e110dfc7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC11.bpk +++ /dev/null @@ -1,173 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSPrVwAdvC11.bpl -OBJFILES = dxPSPrVwAdv.obj dxPSPrVwAdvC11.obj -MAINSOURCE = dxPSPrVwAdvC11.cpp -RESFILES = dxPSPrVwAdvC11.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwAdv.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi dxBarExtItemsC11.bpi dxBarC11.bpi dxThemeC11.bpi \ - cxLibraryC11.bpi rtl.bpi vcl.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Advanced PreviewWindow by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC11.cpp deleted file mode 100644 index 1f370595..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC11.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSPrVwAdvC11.res"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dxcomnC11.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("dxBarExtItemsC11.bpi"); -USEPACKAGE("dxBarC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEFORMNS("dxPSPrVwAdv.pas", Dxpsprvwadv, dxfmPreviewWdxBar); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC11.res deleted file mode 100644 index cc92ca81..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC12.bpk deleted file mode 100644 index 7d637d77..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC12.bpk +++ /dev/null @@ -1,173 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSPrVwAdvC12.bpl -OBJFILES = dxPSPrVwAdv.obj dxPSPrVwAdvC12.obj -MAINSOURCE = dxPSPrVwAdvC12.cpp -RESFILES = dxPSPrVwAdvC12.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwAdv.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi dxBarExtItemsC12.bpi dxBarC12.bpi dxThemeC12.bpi \ - cxLibraryC12.bpi rtl.bpi vcl.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Advanced PreviewWindow by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC12.cpp deleted file mode 100644 index 0ec672d6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC12.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSPrVwAdvC12.res"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dxcomnC12.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("dxBarExtItemsC12.bpi"); -USEPACKAGE("dxBarC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEFORMNS("dxPSPrVwAdv.pas", Dxpsprvwadv, dxfmPreviewWdxBar); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC12.res deleted file mode 100644 index 588e2ed5..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC14.bpk deleted file mode 100644 index bff78fbe..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC14.bpk +++ /dev/null @@ -1,173 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSPrVwAdvC14.bpl -OBJFILES = dxPSPrVwAdv.obj dxPSPrVwAdvC14.obj -MAINSOURCE = dxPSPrVwAdvC14.cpp -RESFILES = dxPSPrVwAdvC14.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwAdv.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi dxBarExtItemsC14.bpi dxBarC14.bpi dxThemeC14.bpi \ - cxLibraryC14.bpi rtl.bpi vcl.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Advanced PreviewWindow by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC14.cpp deleted file mode 100644 index 703e31de..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC14.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSPrVwAdvC14.res"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dxcomnC14.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("dxBarExtItemsC14.bpi"); -USEPACKAGE("dxBarC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEFORMNS("dxPSPrVwAdv.pas", Dxpsprvwadv, dxfmPreviewWdxBar); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC14.res deleted file mode 100644 index 0290ddb1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC5.bpk deleted file mode 100644 index 0fc02250..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC5.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSPrVwAdvc5.bpl -OBJFILES = dxPSPrVwAdv.obj dxPSPrVwAdvc5.obj -RESFILES = dxPSPrVwAdvc5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwAdv.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCorec5.bpi dxBarExtItemsC5.bpi dxBarC5.bpi cxLibraryVCLC5.bpi \ - dxThemeC5.bpi vcl50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Advanced PreviewWindow by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC5.cpp deleted file mode 100644 index c28397ad..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC5.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSPrVwAdvc5.res"); -USEPACKAGE("dxcomnc5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("dxBarExtItemsC5.bpi"); -USEPACKAGE("dxBarC5.bpi"); -USEPACKAGE("dxThemeC5.bpi"); -USEFORMNS("dxPSPrVwAdv.pas", Dxpsprvwadv, dxfmPreviewWdxBar); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC5.res deleted file mode 100644 index 920b3834..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC6.bpk deleted file mode 100644 index 802578e1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC6.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSPrVwAdvC6.bpl -OBJFILES = dxPSPrVwAdv.obj dxPSPrVwAdvC6.obj -RESFILES = dxPSPrVwAdvC6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSPrVwAdv.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi dxBarExtItemsC6.bpi dxBarC6.bpi dxThemeC6.bpi \ - cxLibraryVCLC6.bpi rtl.bpi vcl.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Advanced PreviewWindow by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC6.cpp deleted file mode 100644 index 3e7a5608..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC6.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSPrVwAdvC6.res"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dxcomnC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("dxBarExtItemsC6.bpi"); -USEPACKAGE("dxBarC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEFORMNS("dxPSPrVwAdv.pas", Dxpsprvwadv, dxfmPreviewWdxBar); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC6.res deleted file mode 100644 index 2492ff1a..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD10.dpk deleted file mode 100644 index be14e019..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD10.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPsPrVwAdvD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Advanced Preview Window by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD10, - dxBarD10, - dxBarExtItemsD10; - -contains - dxPSPrVwAdv; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD10.res deleted file mode 100644 index c38aaec2..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD11.dpk deleted file mode 100644 index e0153fca..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD11.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPsPrVwAdvD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Advanced Preview Window by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD11, - dxBarD11, - dxBarExtItemsD11; - -contains - dxPSPrVwAdv; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD11.res deleted file mode 100644 index 0fac5a71..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD12.dpk deleted file mode 100644 index 6bbf9f14..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD12.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPsPrVwAdvD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Advanced Preview Window by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD12, - dxBarD12, - dxBarExtItemsD12; - -contains - dxPSPrVwAdv; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD12.res deleted file mode 100644 index 484559e2..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD14.dpk deleted file mode 100644 index 405c9674..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD14.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPsPrVwAdvD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Advanced Preview Window by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD14, - dxBarD14, - dxBarExtItemsD14; - -contains - dxPSPrVwAdv; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD14.res deleted file mode 100644 index 0af8f54e..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD9.dpk deleted file mode 100644 index 1366ecde..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD9.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPsPrVwAdvD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Advanced Preview Window by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD9, - dxBarD9, - dxBarExtItemsD9; - -contains - dxPSPrVwAdv; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD9.res deleted file mode 100644 index cb24ad0e..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSPrVwAdvD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC5.bpk deleted file mode 100644 index f191a645..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC5.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSTLLnkc5.bpl -OBJFILES = dxPSdxTLLnkReg.obj dxPSdxTLLnk.obj dxPSTLLnkc5.obj -RESFILES = dxPSTLLnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSdxTLLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCorec5.bpi dxEdtrC5.bpi EQTLC5.bpi cxLibraryVCLC5.bpi vcl50.bpi vclx50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -‚ˆ‘ˆ -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumTreeList by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC5.cpp deleted file mode 100644 index 987dbc02..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC5.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxcomnc5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("dxEdtrC5.bpi"); -USEPACKAGE("EQTLC5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USERES("dxPSTLLnkc5.res"); -USEUNIT("dxPSdxTLLnkReg.pas"); -USEFORMNS("dxPSdxTLLnk.pas", Dxpsdxtllnk, dxTLReportLinkDesignWindow); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vclx50.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC5.res deleted file mode 100644 index 4d29f858..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC6.bpk deleted file mode 100644 index 0ddf973e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC6.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSTLLnkC6.bpl -OBJFILES = dxPSdxTLLnkReg.obj dxPSdxTLLnk.obj dxPSTLLnkC6.obj -RESFILES = dxPSTLLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSdxTLLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi designide.bpi dxEdtrC6.bpi cxLibraryVCLC6.bpi EQTLC6.bpi rtl.bpi vcl.bpi vclx.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumTreeList by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC6.cpp deleted file mode 100644 index 4f1ed5a2..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC6.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxcomnC6.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("dxEdtrC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("EQTLC6.bpi"); -USERES("dxPSTLLnkC6.res"); -USEUNIT("dxPSdxTLLnkReg.pas"); -USEFORMNS("dxPSdxTLLnk.pas", Dxpsdxtllnk, dxTLReportLinkDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC6.res deleted file mode 100644 index 888a789a..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD5.dpk deleted file mode 100644 index 8d1ae2d4..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD5.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPSTLLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - eqTLD5; - -contains - dxPSdxTLLnkReg, - dxPSdxTLLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD5.res deleted file mode 100644 index cb5eef87..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD6.dpk deleted file mode 100644 index 0f38bf4e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSTLLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD6, - eqTLD6; - -contains - dxPSdxTLLnkReg, - dxPSdxTLLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD6.res deleted file mode 100644 index 8ed5312e..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD7.dpk deleted file mode 100644 index a9cdc767..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSTLLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD7, - eqTLD7; - -contains - dxPSdxTLLnkReg, - dxPSdxTLLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD7.res deleted file mode 100644 index 0afcfd53..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTLLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC10.bpk deleted file mode 100644 index bd0e5e3c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC10.bpk +++ /dev/null @@ -1,188 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSTeeChartC10.bpl -OBJFILES = dxPSTCLnkReg.obj dxPSTCLnk.obj dxPSTeeChartC10.obj -MAINSOURCE = dxPSTeeChartC10.cpp -RESFILES = dxPSTeeChartC10.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = rtl.bpi vcl.bpi designide.bpi dxPSCoreC10.bpi dxCoreC10.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5C10.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6C10.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee710.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee810.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for TeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC10.cpp deleted file mode 100644 index 82a20880..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC10.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSTeeChartC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5C10.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6C10.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee710.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee810.bpi"); -#endif -USEUNIT("dxPSTCLnk.pas"); -USEUNIT("dxPSTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC10.res deleted file mode 100644 index e3b9fdbb..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC11.bpk deleted file mode 100644 index 51a0a30e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC11.bpk +++ /dev/null @@ -1,188 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSTeeChartC11.bpl -OBJFILES = dxPSTCLnkReg.obj dxPSTCLnk.obj dxPSTeeChartC11.obj -MAINSOURCE = dxPSTeeChartC11.cpp -RESFILES = dxPSTeeChartC11.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = rtl.bpi vcl.bpi designide.bpi dxPSCoreC11.bpi dxCoreC11.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5C11.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6C11.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee711.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee811.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for TeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC11.cpp deleted file mode 100644 index b8718467..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC11.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSTeeChartC11.res"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5C11.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6C11.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee711.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee811.bpi"); -#endif -USEUNIT("dxPSTCLnk.pas"); -USEUNIT("dxPSTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC11.res deleted file mode 100644 index 54a948a2..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC12.bpk deleted file mode 100644 index 4843addc..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC12.bpk +++ /dev/null @@ -1,188 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSTeeChartC12.bpl -OBJFILES = dxPSTCLnkReg.obj dxPSTCLnk.obj dxPSTeeChartC12.obj -MAINSOURCE = dxPSTeeChartC12.cpp -RESFILES = dxPSTeeChartC12.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = rtl.bpi vcl.bpi designide.bpi dxPSCoreC12.bpi dxCoreC12.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5C12.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6C12.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee712.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee812.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for TeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC12.cpp deleted file mode 100644 index e5615fed..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC12.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSTeeChartC12.res"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5C12.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6C12.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee712.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee812.bpi"); -#endif -USEUNIT("dxPSTCLnk.pas"); -USEUNIT("dxPSTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC12.res deleted file mode 100644 index 8ef4bac2..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC14.bpk deleted file mode 100644 index 7f63f925..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC14.bpk +++ /dev/null @@ -1,188 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSTeeChartC14.bpl -OBJFILES = dxPSTCLnkReg.obj dxPSTCLnk.obj dxPSTeeChartC14.obj -MAINSOURCE = dxPSTeeChartC14.cpp -RESFILES = dxPSTeeChartC14.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = rtl.bpi vcl.bpi designide.bpi dxPSCoreC14.bpi dxCoreC14.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5C14.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6C14.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee712.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee812.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for TeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC14.cpp deleted file mode 100644 index 6f193408..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC14.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSTeeChartC14.res"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5C14.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6C14.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee712.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee812.bpi"); -#endif -USEUNIT("dxPSTCLnk.pas"); -USEUNIT("dxPSTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC14.res deleted file mode 100644 index bfd86c39..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC5.bpk deleted file mode 100644 index 160e8087..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC5.bpk +++ /dev/null @@ -1,187 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSTeeChartc5.bpl -OBJFILES = dxPSTCLnkReg.obj dxPSTCLnk.obj dxPSTeeChartc5.obj -RESFILES = dxPSTeeChartc5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = vcl50.bpi dxPSCorec5.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee50.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5c5.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6c5.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee7c5.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee8c5.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for TeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC5.cpp deleted file mode 100644 index dd8643cb..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC5.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSTeeChartc5.res"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee50.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5c5.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6c5.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee7c5.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee8c5.bpi"); -#endif -USEUNIT("dxPSTCLnk.pas"); -USEUNIT("dxPSTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC5.res deleted file mode 100644 index 2ca0b28a..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC6.bpk deleted file mode 100644 index d091626c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC6.bpk +++ /dev/null @@ -1,187 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSTeeChartC6.bpl -OBJFILES = dxPSTCLnkReg.obj dxPSTCLnk.obj dxPSTeeChartC6.obj -RESFILES = dxPSTeeChartC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = rtl.bpi vcl.bpi designide.bpi dxPSCoreC6.bpi dxCoreC6.bpi -!if !$d(TEEPRO) -PACKAGES = $(PACKAGES) tee.bpi -USERDEFINES = -!elif $d(TEE5) -PACKAGES = $(PACKAGES) tee5c6.bpi -USERDEFINES = TEEPRO;TEE5 -!elif $d(TEE6) -PACKAGES = $(PACKAGES) tee6c6.bpi -USERDEFINES = TEEPRO;TEE6 -!elif $d(TEE7) -PACKAGES = $(PACKAGES) tee7c6.bpi -USERDEFINES = TEEPRO;TEE7 -!elif $d(TEE8) -PACKAGES = $(PACKAGES) tee8c6.bpi -USERDEFINES = TEEPRO;TEE8 -!endif - -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for TeeChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC6.cpp deleted file mode 100644 index b41d3f19..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC6.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USERES("dxPSTeeChartC6.res"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -#ifndef TEEPRO -USEPACKAGE("tee.bpi"); -#elif defined(TEE5) -USEPACKAGE("tee5c6.bpi"); -#elif defined(TEE6) -USEPACKAGE("tee6c6.bpi"); -#elif defined(TEE7) -USEPACKAGE("tee7c6.bpi"); -#elif defined(TEE8) -USEPACKAGE("tee8c6.bpi"); -#endif -USEUNIT("dxPSTCLnk.pas"); -USEUNIT("dxPSTCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC6.res deleted file mode 100644 index 0a35c8c9..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD10.dpk deleted file mode 100644 index d0674c84..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD10.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPSTeeChartD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for TeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD10, -{$IFNDEF TEEPRO} - tee; -{$ELSE} -{$IFDEF TEE7} - tee710; -{$ENDIF} -{$IFDEF TEE8} - tee810; -{$ENDIF} -{$ENDIF} - -contains - dxPSTCLnkReg, - dxPSTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD10.res deleted file mode 100644 index 86998cec..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD11.dpk deleted file mode 100644 index 12780f35..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD11.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPSTeeChartD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for TeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD11, -{$IFNDEF TEEPRO} - tee; -{$ELSE} -{$IFDEF TEE7} - tee711; -{$ENDIF} -{$IFDEF TEE8} - tee811; -{$ENDIF} -{$ENDIF} - -contains - dxPSTCLnkReg, - dxPSTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD11.res deleted file mode 100644 index 5a8991fc..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD12.dpk deleted file mode 100644 index 9c5acc2d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD12.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPSTeeChartD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for TeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD12, -{$IFNDEF TEEPRO} - tee; -{$ELSE} -{$IFDEF TEE7} - tee712; -{$ENDIF} -{$IFDEF TEE8} - tee812; -{$ENDIF} -{$ENDIF} - -contains - dxPSTCLnkReg, - dxPSTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD12.res deleted file mode 100644 index 1403de6c..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD14.dpk deleted file mode 100644 index 83d5e6ab..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD14.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPSTeeChartD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for TeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD14, -{$IFNDEF TEEPRO} - tee; -{$ELSE} -{$IFDEF TEE7} - tee712; -{$ENDIF} -{$IFDEF TEE8} - tee812; -{$ENDIF} -{$ENDIF} - -contains - dxPSTCLnkReg, - dxPSTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD14.res deleted file mode 100644 index e1aaa02f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD5.dpk deleted file mode 100644 index 2f5d606b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD5.dpk +++ /dev/null @@ -1,52 +0,0 @@ -package dxPSTeeChartD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for TeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, -{$IFNDEF TEEPRO} - tee50; -{$ELSE} -{$IFDEF TEE5} - tee55; -{$ENDIF} -{$IFDEF TEE6} - tee65; -{$ENDIF} -{$IFDEF TEE7} - tee75; -{$ENDIF} -{$IFDEF TEE8} - tee85; -{$ENDIF} -{$ENDIF} - -contains - dxPSTCLnkReg, - dxPSTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD5.res deleted file mode 100644 index 6f4773e4..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD6.dpk deleted file mode 100644 index ab71091f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD6.dpk +++ /dev/null @@ -1,53 +0,0 @@ -package dxPSTeeChartD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for TeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD6, -{$IFNDEF TEEPRO} - tee; -{$ELSE} -{$IFDEF TEE5} - tee; -{$ENDIF} -{$IFDEF TEE6} - tee66; -{$ENDIF} -{$IFDEF TEE7} - tee76; -{$ENDIF} -{$IFDEF TEE8} - tee86; -{$ENDIF} -{$ENDIF} - -contains - dxPSTCLnkReg, - dxPSTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD6.res deleted file mode 100644 index 99259d2c..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD7.dpk deleted file mode 100644 index 44460c8d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD7.dpk +++ /dev/null @@ -1,53 +0,0 @@ -package dxPSTeeChartD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for TeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD7, -{$IFNDEF TEEPRO} - tee; -{$ELSE} -{$IFDEF TEE5} - tee57; -{$ENDIF} -{$IFDEF TEE6} - tee67; -{$ENDIF} -{$IFDEF TEE7} - tee77; -{$ENDIF} -{$IFDEF TEE8} - tee87; -{$ENDIF} -{$ENDIF} - -contains - dxPSTCLnkReg, - dxPSTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD7.res deleted file mode 100644 index 9a1f2999..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD9.dpk deleted file mode 100644 index 1adf309e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD9.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPSTeeChartD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for TeeChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD9, -{$IFNDEF TEEPRO} - tee; -{$ELSE} -{$IFDEF TEE7} - tee79; -{$ENDIF} -{$IFDEF TEE8} - tee89; -{$ENDIF} -{$ENDIF} - -contains - dxPSTCLnkReg, - dxPSTCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD9.res deleted file mode 100644 index 8d650878..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSTeeChartD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC10.bpk deleted file mode 100644 index af6f62c8..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC10.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxCommonC10.bpl -OBJFILES = dxPScxCommon.obj dxPScxCommonReg.obj dxPScxDBEditorLnkReg.obj \ - dxPScxDBEditorLnks.obj dxPScxEditorLnks.obj dxPScxEditorLnkReg.obj \ - dxPScxEditorProducers.obj dxPScxImgLnk.obj dxPScxListBoxLnk.obj dxPScxCommonC10.obj -MAINSOURCE = dxPScxCommonC10.cpp -RESFILES = dxPScxCommonC10.res -DEFFILE = -RESDEPEN = -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi dxPSLnksC10.bpi cxLibraryC10.bpi cxDataC10.bpi \ - cxEditorsC10.bpi designide.bpi dxThemeC10.bpi rtl.bpi vcl.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC10.cpp deleted file mode 100644 index 08bc5cdf..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC10.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USERES("dxPScxCommonC10.res"); -USEPACKAGE("dxPSLnksC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("designide.bpi"); -USEUNIT("dxPScxCommon.pas"); -USEUNIT("dxPScxCommonReg.pas"); -USEUNIT("dxPScxDBEditorLnkReg.pas"); -USEUNIT("dxPScxDBEditorLnks.pas"); -USEUNIT("dxPScxEditorLnks.pas"); -USEUNIT("dxPScxEditorLnkReg.pas"); -USEUNIT("dxPScxEditorProducers.pas"); -USEUNIT("dxPScxImgLnk.pas"); -USEUNIT("dxPScxListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC10.res deleted file mode 100644 index 278decda..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC11.bpk deleted file mode 100644 index 84709a44..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC11.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxCommonC11.bpl -OBJFILES = dxPScxCommon.obj dxPScxCommonReg.obj dxPScxDBEditorLnkReg.obj \ - dxPScxDBEditorLnks.obj dxPScxEditorLnks.obj dxPScxEditorLnkReg.obj \ - dxPScxEditorProducers.obj dxPScxImgLnk.obj dxPScxListBoxLnk.obj dxPScxCommonC11.obj -MAINSOURCE = dxPScxCommonC11.cpp -RESFILES = dxPScxCommonC11.res -DEFFILE = -RESDEPEN = -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi dxPSLnksC11.bpi cxLibraryC11.bpi cxDataC11.bpi \ - cxEditorsC11.bpi designide.bpi dxThemeC11.bpi rtl.bpi vcl.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC11.cpp deleted file mode 100644 index 4fca9a59..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC11.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USERES("dxPScxCommonC11.res"); -USEPACKAGE("dxPSLnksC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("designide.bpi"); -USEUNIT("dxPScxCommon.pas"); -USEUNIT("dxPScxCommonReg.pas"); -USEUNIT("dxPScxDBEditorLnkReg.pas"); -USEUNIT("dxPScxDBEditorLnks.pas"); -USEUNIT("dxPScxEditorLnks.pas"); -USEUNIT("dxPScxEditorLnkReg.pas"); -USEUNIT("dxPScxEditorProducers.pas"); -USEUNIT("dxPScxImgLnk.pas"); -USEUNIT("dxPScxListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC11.res deleted file mode 100644 index 63613b99..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC12.bpk deleted file mode 100644 index c380d685..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC12.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxCommonC12.bpl -OBJFILES = dxPScxCommon.obj dxPScxCommonReg.obj dxPScxDBEditorLnkReg.obj \ - dxPScxDBEditorLnks.obj dxPScxEditorLnks.obj dxPScxEditorLnkReg.obj \ - dxPScxEditorProducers.obj dxPScxImgLnk.obj dxPScxListBoxLnk.obj dxPScxCommonC12.obj -MAINSOURCE = dxPScxCommonC12.cpp -RESFILES = dxPScxCommonC12.res -DEFFILE = -RESDEPEN = -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi dxPSLnksC12.bpi cxLibraryC12.bpi cxDataC12.bpi \ - cxEditorsC12.bpi designide.bpi dxThemeC12.bpi rtl.bpi vcl.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC12.cpp deleted file mode 100644 index 64e76bc3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC12.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USERES("dxPScxCommonC12.res"); -USEPACKAGE("dxPSLnksC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("designide.bpi"); -USEUNIT("dxPScxCommon.pas"); -USEUNIT("dxPScxCommonReg.pas"); -USEUNIT("dxPScxDBEditorLnkReg.pas"); -USEUNIT("dxPScxDBEditorLnks.pas"); -USEUNIT("dxPScxEditorLnks.pas"); -USEUNIT("dxPScxEditorLnkReg.pas"); -USEUNIT("dxPScxEditorProducers.pas"); -USEUNIT("dxPScxImgLnk.pas"); -USEUNIT("dxPScxListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC12.res deleted file mode 100644 index 415911fb..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC14.bpk deleted file mode 100644 index 8a57290b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC14.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxCommonC14.bpl -OBJFILES = dxPScxCommon.obj dxPScxCommonReg.obj dxPScxDBEditorLnkReg.obj \ - dxPScxDBEditorLnks.obj dxPScxEditorLnks.obj dxPScxEditorLnkReg.obj \ - dxPScxEditorProducers.obj dxPScxImgLnk.obj dxPScxListBoxLnk.obj dxPScxCommonC14.obj -MAINSOURCE = dxPScxCommonC14.cpp -RESFILES = dxPScxCommonC14.res -DEFFILE = -RESDEPEN = -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi dxPSLnksC14.bpi cxLibraryC14.bpi cxDataC14.bpi \ - cxEditorsC14.bpi designide.bpi dxThemeC14.bpi rtl.bpi vcl.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC14.cpp deleted file mode 100644 index f27c5f0f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC14.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USERES("dxPScxCommonC14.res"); -USEPACKAGE("dxPSLnksC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("designide.bpi"); -USEUNIT("dxPScxCommon.pas"); -USEUNIT("dxPScxCommonReg.pas"); -USEUNIT("dxPScxDBEditorLnkReg.pas"); -USEUNIT("dxPScxDBEditorLnks.pas"); -USEUNIT("dxPScxEditorLnks.pas"); -USEUNIT("dxPScxEditorLnkReg.pas"); -USEUNIT("dxPScxEditorProducers.pas"); -USEUNIT("dxPScxImgLnk.pas"); -USEUNIT("dxPScxListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC14.res deleted file mode 100644 index 8c96b900..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC5.bpk deleted file mode 100644 index f57436a0..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC5.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxCommonC5.bpl -OBJFILES = dxPScxCommon.obj dxPScxCommonReg.obj dxPScxDBEditorLnkReg.obj \ - dxPScxDBEditorLnks.obj dxPScxEditorLnks.obj dxPScxEditorLnkReg.obj \ - dxPScxEditorProducers.obj dxPScxImgLnk.obj dxPScxListBoxLnk.obj dxPScxCommonC5.obj -RESFILES = dxPScxCommonC5.res -DEFFILE = -RESDEPEN = -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCoreC5.bpi dxPSLnksC5.bpi cxLibraryVCLC5.bpi cxDataC5.bpi cxEditorsC5.bpi \ - dxThemeC5.bpi vcl50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC5.cpp deleted file mode 100644 index f5947c03..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC5.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("dxPSCoreC5.bpi"); -USERES("dxPScxCommonC5.res"); -USEPACKAGE("dxPSLnksC5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEPACKAGE("cxEditorsC5.bpi"); -USEPACKAGE("dxThemeC5.bpi"); -USEUNIT("dxPScxCommon.pas"); -USEUNIT("dxPScxCommonReg.pas"); -USEUNIT("dxPScxDBEditorLnkReg.pas"); -USEUNIT("dxPScxDBEditorLnks.pas"); -USEUNIT("dxPScxEditorLnks.pas"); -USEUNIT("dxPScxEditorLnkReg.pas"); -USEUNIT("dxPScxEditorProducers.pas"); -USEUNIT("dxPScxImgLnk.pas"); -USEUNIT("dxPScxListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC5.res deleted file mode 100644 index fcc457a5..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC6.bpk deleted file mode 100644 index e2e86978..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC6.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxCommonC6.bpl -OBJFILES = dxPScxCommon.obj dxPScxCommonReg.obj dxPScxDBEditorLnkReg.obj \ - dxPScxDBEditorLnks.obj dxPScxEditorLnks.obj dxPScxEditorLnkReg.obj \ - dxPScxEditorProducers.obj dxPScxImgLnk.obj dxPScxListBoxLnk.obj dxPScxCommonC6.obj -RESFILES = dxPScxCommonC6.res -DEFFILE = -RESDEPEN = -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi dxPSLnksC6.bpi cxLibraryVCLC6.bpi cxDataC6.bpi \ - cxEditorsVCLC6.bpi designide.bpi dxThemeC6.bpi rtl.bpi vcl.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC6.cpp deleted file mode 100644 index 368e1884..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC6.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USERES("dxPScxCommonC6.res"); -USEPACKAGE("dxPSLnksC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("designide.bpi"); -USEUNIT("dxPScxCommon.pas"); -USEUNIT("dxPScxCommonReg.pas"); -USEUNIT("dxPScxDBEditorLnkReg.pas"); -USEUNIT("dxPScxDBEditorLnks.pas"); -USEUNIT("dxPScxEditorLnks.pas"); -USEUNIT("dxPScxEditorLnkReg.pas"); -USEUNIT("dxPScxEditorProducers.pas"); -USEUNIT("dxPScxImgLnk.pas"); -USEUNIT("dxPScxListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC6.res deleted file mode 100644 index e8eadc39..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD10.dpk deleted file mode 100644 index bd63dcc5..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD10.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxCommonD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD10, - dxPSLnksD10, - cxLibraryD10, - cxDataD10, - cxEditorsD10; - -contains - dxPScxCommon, - dxPScxCommonReg, - dxPScxDBEditorLnkReg, - dxPScxDBEditorLnks, - dxPScxEditorLnks, - dxPScxEditorLnkReg, - dxPScxEditorProducers, - dxPScxImgLnk, - dxPScxListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD10.res deleted file mode 100644 index 7f2f378a..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD11.dpk deleted file mode 100644 index 3480fa70..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD11.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxCommonD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD11, - dxPSLnksD11, - cxLibraryD11, - cxDataD11, - cxEditorsD11; - -contains - dxPScxCommon, - dxPScxCommonReg, - dxPScxDBEditorLnkReg, - dxPScxDBEditorLnks, - dxPScxEditorLnks, - dxPScxEditorLnkReg, - dxPScxEditorProducers, - dxPScxImgLnk, - dxPScxListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD11.res deleted file mode 100644 index 0ac639aa..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD12.dpk deleted file mode 100644 index 4bca35f7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD12.dpk +++ /dev/null @@ -1,45 +0,0 @@ -package dxPScxCommonD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD12, - dxPSLnksD12, - cxEditorsD12; - -contains - dxPScxCommon, - dxPScxCommonReg, - dxPScxDBEditorLnkReg, - dxPScxDBEditorLnks, - dxPScxEditorLnks, - dxPScxEditorLnkReg, - dxPScxEditorProducers, - dxPScxImgLnk, - dxPScxListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD12.res deleted file mode 100644 index 42e5c5bd..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD14.dpk deleted file mode 100644 index 39f3692b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD14.dpk +++ /dev/null @@ -1,45 +0,0 @@ -package dxPScxCommonD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD14, - dxPSLnksD14, - cxEditorsD14; - -contains - dxPScxCommon, - dxPScxCommonReg, - dxPScxDBEditorLnkReg, - dxPScxDBEditorLnks, - dxPScxEditorLnks, - dxPScxEditorLnkReg, - dxPScxEditorProducers, - dxPScxImgLnk, - dxPScxListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD14.res deleted file mode 100644 index 24930069..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD5.dpk deleted file mode 100644 index ed840417..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD5.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxCommonD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dxPSLnksD5, - cxLibraryVCLD5, - cxDataD5, - cxEditorsD5; - -contains - dxPScxCommon, - dxPScxCommonReg, - dxPScxDBEditorLnkReg, - dxPScxDBEditorLnks, - dxPScxEditorLnks, - dxPScxEditorLnkReg, - dxPScxEditorProducers, - dxPScxImgLnk, - dxPScxListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD5.res deleted file mode 100644 index 1dadf9a0..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD6.dpk deleted file mode 100644 index ccb642c6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD6.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxCommonD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD6, - dxPSLnksD6, - cxLibraryVCLD6, - cxDataD6, - cxEditorsVCLD6; - -contains - dxPScxCommon, - dxPScxCommonReg, - dxPScxDBEditorLnkReg, - dxPScxDBEditorLnks, - dxPScxEditorLnks, - dxPScxEditorLnkReg, - dxPScxEditorProducers, - dxPScxImgLnk, - dxPScxListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD6.res deleted file mode 100644 index 39639493..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD7.dpk deleted file mode 100644 index bed1798b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD7.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxCommonD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD7, - dxPSLnksD7, - cxLibraryVCLD7, - cxDataD7, - cxEditorsVCLD7; - -contains - dxPScxCommon, - dxPScxCommonReg, - dxPScxDBEditorLnkReg, - dxPScxDBEditorLnks, - dxPScxEditorLnks, - dxPScxEditorLnkReg, - dxPScxEditorProducers, - dxPScxImgLnk, - dxPScxListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD7.res deleted file mode 100644 index 48ffddf2..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD9.dpk deleted file mode 100644 index 6acd0eec..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD9.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxCommonD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD9, - dxPSLnksD9, - cxLibraryD9, - cxDataD9, - cxEditorsD9; - -contains - dxPScxCommon, - dxPScxCommonReg, - dxPScxDBEditorLnkReg, - dxPScxDBEditorLnks, - dxPScxEditorLnks, - dxPScxEditorLnkReg, - dxPScxEditorProducers, - dxPScxImgLnk, - dxPScxListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD9.res deleted file mode 100644 index 92306be5..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxCommonD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC10.bpk deleted file mode 100644 index 91bab2fe..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC10.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxExtCommonC10.bpl -OBJFILES = dxPScxCheckListBoxLnk.obj dxPScxExtComCtrlsLnk.obj dxPScxExtCommon.obj \ - dxPScxExtDBEditorLnkReg.obj dxPScxExtDBEditorLnks.obj dxPScxExtEditorLnkReg.obj \ - dxPScxExtEditorProducers.obj dxPScxMCListBoxLnk.obj dxPScxExtCommonC10.obj -MAINSOURCE = dxPScxExtCommonC10.cpp -RESFILES = dxPScxExtCommonC10.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxCheckListBoxLnk.dfm dxPScxMCListBoxLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi dxPSLnksC10.bpi cxLibraryC10.bpi cxDataC10.bpi \ - cxEditorsC10.bpi cxExtEditorsC10.bpi dxPScxCommonC10.bpi rtl.bpi vcl.bpi designide.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Extended Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC10.cpp deleted file mode 100644 index 760260cf..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC10.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USERES("dxPScxExtCommonC10.res"); -USEPACKAGE("dxPSLnksC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("cxExtEditorsC10.bpi"); -USEUNIT("dxPScxCheckListBoxLnk.pas"); -USEUNIT("dxPScxExtComCtrlsLnk.pas"); -USEUNIT("dxPScxExtCommon.pas"); -USEUNIT("dxPScxExtDBEditorLnkReg.pas"); -USEUNIT("dxPScxExtDBEditorLnks.pas"); -USEUNIT("dxPScxExtEditorLnkReg.pas"); -USEUNIT("dxPScxExtEditorProducers.pas"); -USEUNIT("dxPScxMCListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC10.res deleted file mode 100644 index 9c89e01d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC11.bpk deleted file mode 100644 index 935f318a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC11.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxExtCommonC11.bpl -OBJFILES = dxPScxCheckListBoxLnk.obj dxPScxExtComCtrlsLnk.obj dxPScxExtCommon.obj \ - dxPScxExtDBEditorLnkReg.obj dxPScxExtDBEditorLnks.obj dxPScxExtEditorLnkReg.obj \ - dxPScxExtEditorProducers.obj dxPScxMCListBoxLnk.obj dxPScxExtCommonC11.obj -MAINSOURCE = dxPScxExtCommonC11.cpp -RESFILES = dxPScxExtCommonC11.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxCheckListBoxLnk.dfm dxPScxMCListBoxLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi dxPSLnksC11.bpi cxLibraryC11.bpi cxDataC11.bpi \ - cxEditorsC11.bpi cxExtEditorsC11.bpi dxPScxCommonC11.bpi rtl.bpi vcl.bpi designide.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Extended Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC11.cpp deleted file mode 100644 index c6f213d1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC11.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USERES("dxPScxExtCommonC11.res"); -USEPACKAGE("dxPSLnksC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("cxExtEditorsC11.bpi"); -USEUNIT("dxPScxCheckListBoxLnk.pas"); -USEUNIT("dxPScxExtComCtrlsLnk.pas"); -USEUNIT("dxPScxExtCommon.pas"); -USEUNIT("dxPScxExtDBEditorLnkReg.pas"); -USEUNIT("dxPScxExtDBEditorLnks.pas"); -USEUNIT("dxPScxExtEditorLnkReg.pas"); -USEUNIT("dxPScxExtEditorProducers.pas"); -USEUNIT("dxPScxMCListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC11.res deleted file mode 100644 index 7c15ff87..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC12.bpk deleted file mode 100644 index f2a3c975..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC12.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxExtCommonC12.bpl -OBJFILES = dxPScxCheckListBoxLnk.obj dxPScxExtComCtrlsLnk.obj dxPScxExtCommon.obj \ - dxPScxExtDBEditorLnkReg.obj dxPScxExtDBEditorLnks.obj dxPScxExtEditorLnkReg.obj \ - dxPScxExtEditorProducers.obj dxPScxMCListBoxLnk.obj dxPScxExtCommonC12.obj -MAINSOURCE = dxPScxExtCommonC12.cpp -RESFILES = dxPScxExtCommonC12.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxCheckListBoxLnk.dfm dxPScxMCListBoxLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi dxPSLnksC12.bpi cxLibraryC12.bpi cxDataC12.bpi \ - cxEditorsC12.bpi cxExtEditorsC12.bpi dxPScxCommonC12.bpi rtl.bpi vcl.bpi designide.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Extended Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC12.cpp deleted file mode 100644 index 6cd2e4a9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC12.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USERES("dxPScxExtCommonC12.res"); -USEPACKAGE("dxPSLnksC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("cxExtEditorsC12.bpi"); -USEUNIT("dxPScxCheckListBoxLnk.pas"); -USEUNIT("dxPScxExtComCtrlsLnk.pas"); -USEUNIT("dxPScxExtCommon.pas"); -USEUNIT("dxPScxExtDBEditorLnkReg.pas"); -USEUNIT("dxPScxExtDBEditorLnks.pas"); -USEUNIT("dxPScxExtEditorLnkReg.pas"); -USEUNIT("dxPScxExtEditorProducers.pas"); -USEUNIT("dxPScxMCListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC12.res deleted file mode 100644 index fe30f162..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC14.bpk deleted file mode 100644 index 454cf19d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC14.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxExtCommonC14.bpl -OBJFILES = dxPScxCheckListBoxLnk.obj dxPScxExtComCtrlsLnk.obj dxPScxExtCommon.obj \ - dxPScxExtDBEditorLnkReg.obj dxPScxExtDBEditorLnks.obj dxPScxExtEditorLnkReg.obj \ - dxPScxExtEditorProducers.obj dxPScxMCListBoxLnk.obj dxPScxExtCommonC14.obj -MAINSOURCE = dxPScxExtCommonC14.cpp -RESFILES = dxPScxExtCommonC14.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxCheckListBoxLnk.dfm dxPScxMCListBoxLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi dxPSLnksC14.bpi cxLibraryC14.bpi cxDataC14.bpi \ - cxEditorsC14.bpi cxExtEditorsC14.bpi dxPScxCommonC14.bpi rtl.bpi vcl.bpi designide.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Extended Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC14.cpp deleted file mode 100644 index 23585111..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC14.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USERES("dxPScxExtCommonC14.res"); -USEPACKAGE("dxPSLnksC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("cxExtEditorsC14.bpi"); -USEUNIT("dxPScxCheckListBoxLnk.pas"); -USEUNIT("dxPScxExtComCtrlsLnk.pas"); -USEUNIT("dxPScxExtCommon.pas"); -USEUNIT("dxPScxExtDBEditorLnkReg.pas"); -USEUNIT("dxPScxExtDBEditorLnks.pas"); -USEUNIT("dxPScxExtEditorLnkReg.pas"); -USEUNIT("dxPScxExtEditorProducers.pas"); -USEUNIT("dxPScxMCListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC14.res deleted file mode 100644 index 899cf965..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC5.bpk deleted file mode 100644 index e755df17..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC5.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxExtCommonC5.bpl -OBJFILES = dxPScxCheckListBoxLnk.obj dxPScxExtComCtrlsLnk.obj dxPScxExtCommon.obj \ - dxPScxExtDBEditorLnkReg.obj dxPScxExtDBEditorLnks.obj dxPScxExtEditorLnkReg.obj \ - dxPScxExtEditorProducers.obj dxPScxMCListBoxLnk.obj dxPScxExtCommonC5.obj -RESFILES = dxPScxExtCommonC5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxCheckListBoxLnk.dfm dxPScxMCListBoxLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCoreC5.bpi dxPSLnksC5.bpi cxLibraryVCLC5.bpi cxDataC5.bpi cxEditorsC5.bpi \ - cxExtEditorsC5.bpi dxPScxCommonC5.bpi vcl50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Extended Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC5.cpp deleted file mode 100644 index cfff2389..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC5.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("dxPSCoreC5.bpi"); -USERES("dxPScxExtCommonC5.res"); -USEPACKAGE("dxPSLnksC5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEPACKAGE("cxEditorsC5.bpi"); -USEPACKAGE("cxExtEditorsC5.bpi"); -USEUNIT("dxPScxCheckListBoxLnk.pas"); -USEUNIT("dxPScxExtComCtrlsLnk.pas"); -USEUNIT("dxPScxExtCommon.pas"); -USEUNIT("dxPScxExtDBEditorLnkReg.pas"); -USEUNIT("dxPScxExtDBEditorLnks.pas"); -USEUNIT("dxPScxExtEditorLnkReg.pas"); -USEUNIT("dxPScxExtEditorProducers.pas"); -USEUNIT("dxPScxMCListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC5.res deleted file mode 100644 index 9b050161..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC6.bpk deleted file mode 100644 index 9fbdbd2d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC6.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxExtCommonC6.bpl -OBJFILES = dxPScxCheckListBoxLnk.obj dxPScxExtComCtrlsLnk.obj dxPScxExtCommon.obj \ - dxPScxExtDBEditorLnkReg.obj dxPScxExtDBEditorLnks.obj dxPScxExtEditorLnkReg.obj \ - dxPScxExtEditorProducers.obj dxPScxMCListBoxLnk.obj dxPScxExtCommonC6.obj -RESFILES = dxPScxExtCommonC6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxCheckListBoxLnk.dfm dxPScxMCListBoxLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi dxPSLnksC6.bpi cxLibraryVCLC6.bpi cxDataC6.bpi \ - cxEditorsVCLC6.bpi cxExtEditorsVCLC6.bpi dxPScxCommonC6.bpi rtl.bpi vcl.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System Extended Cross Platform Library by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC6.cpp deleted file mode 100644 index 9ca4d519..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC6.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USERES("dxPScxExtCommonC6.res"); -USEPACKAGE("dxPSLnksC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("cxExtEditorsVCLC6.bpi"); -USEUNIT("dxPScxCheckListBoxLnk.pas"); -USEUNIT("dxPScxExtComCtrlsLnk.pas"); -USEUNIT("dxPScxExtCommon.pas"); -USEUNIT("dxPScxExtDBEditorLnkReg.pas"); -USEUNIT("dxPScxExtDBEditorLnks.pas"); -USEUNIT("dxPScxExtEditorLnkReg.pas"); -USEUNIT("dxPScxExtEditorProducers.pas"); -USEUNIT("dxPScxMCListBoxLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC6.res deleted file mode 100644 index 409fa703..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD10.dpk deleted file mode 100644 index 49752abd..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD10.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxExtCommonD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Extended Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD10, - dxPScxCommonD10, - cxLibraryD10, - cxDataD10, - cxEditorsD10, - cxExtEditorsD10; - -contains - dxPScxCheckListBoxLnk, - dxPScxExtComCtrlsLnk, - dxPScxExtCommon, - dxPScxExtDBEditorLnkReg, - dxPScxExtDBEditorLnks, - dxPScxExtEditorLnkReg, - dxPScxExtEditorProducers, - dxPScxMCListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD10.res deleted file mode 100644 index 552bcdcf..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD11.dpk deleted file mode 100644 index 1847adaa..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD11.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxExtCommonD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Extended Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD11, - dxPScxCommonD11, - cxLibraryD11, - cxDataD11, - cxEditorsD11, - cxExtEditorsD11; - -contains - dxPScxCheckListBoxLnk, - dxPScxExtComCtrlsLnk, - dxPScxExtCommon, - dxPScxExtDBEditorLnkReg, - dxPScxExtDBEditorLnks, - dxPScxExtEditorLnkReg, - dxPScxExtEditorProducers, - dxPScxMCListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD11.res deleted file mode 100644 index 9a824eb1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD12.dpk deleted file mode 100644 index 33fcee21..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD12.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxExtCommonD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Extended Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPScxCommonD12, - cxExtEditorsD12; - -contains - dxPScxCheckListBoxLnk, - dxPScxExtComCtrlsLnk, - dxPScxExtCommon, - dxPScxExtDBEditorLnkReg, - dxPScxExtDBEditorLnks, - dxPScxExtEditorLnkReg, - dxPScxExtEditorProducers, - dxPScxMCListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD12.res deleted file mode 100644 index 709c0727..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD14.dpk deleted file mode 100644 index 88cc80aa..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD14.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxExtCommonD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Extended Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPScxCommonD14, - cxExtEditorsD14; - -contains - dxPScxCheckListBoxLnk, - dxPScxExtComCtrlsLnk, - dxPScxExtCommon, - dxPScxExtDBEditorLnkReg, - dxPScxExtDBEditorLnks, - dxPScxExtEditorLnkReg, - dxPScxExtEditorProducers, - dxPScxMCListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD14.res deleted file mode 100644 index 34e298b0..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD5.dpk deleted file mode 100644 index ca44b848..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD5.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxExtCommonD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Extended Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dxPScxCommonD5, - cxLibraryVCLD5, - cxDataD5, - cxEditorsD5, - cxExtEditorsD5; - -contains - dxPScxCheckListBoxLnk, - dxPScxExtComCtrlsLnk, - dxPScxExtCommon, - dxPScxExtDBEditorLnkReg, - dxPScxExtDBEditorLnks, - dxPScxExtEditorLnkReg, - dxPScxExtEditorProducers, - dxPScxMCListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD5.res deleted file mode 100644 index c2fa40b6..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD6.dpk deleted file mode 100644 index d0939583..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD6.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxExtCommonD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Extended Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD6, - dxPScxCommonD6, - cxLibraryVCLD6, - cxDataD6, - cxEditorsVCLD6, - cxExtEditorsVCLD6; - -contains - dxPScxCheckListBoxLnk, - dxPScxExtComCtrlsLnk, - dxPScxExtCommon, - dxPScxExtDBEditorLnkReg, - dxPScxExtDBEditorLnks, - dxPScxExtEditorLnkReg, - dxPScxExtEditorProducers, - dxPScxMCListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD6.res deleted file mode 100644 index bd971262..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD7.dpk deleted file mode 100644 index ce79473d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD7.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxExtCommonD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Extended Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD7, - dxPScxCommonD7, - cxLibraryVCLD7, - cxDataD7, - cxEditorsVCLD7, - cxExtEditorsVCLD7; - -contains - dxPScxCheckListBoxLnk, - dxPScxExtComCtrlsLnk, - dxPScxExtCommon, - dxPScxExtDBEditorLnkReg, - dxPScxExtDBEditorLnks, - dxPScxExtEditorLnkReg, - dxPScxExtEditorProducers, - dxPScxMCListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD7.res deleted file mode 100644 index a4e19a88..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD9.dpk deleted file mode 100644 index d1df4634..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD9.dpk +++ /dev/null @@ -1,47 +0,0 @@ -package dxPScxExtCommonD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Extended Cross Platform Library by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD9, - dxPScxCommonD9, - cxLibraryD9, - cxDataD9, - cxEditorsD9, - cxExtEditorsD9; - -contains - dxPScxCheckListBoxLnk, - dxPScxExtComCtrlsLnk, - dxPScxExtCommon, - dxPScxExtDBEditorLnkReg, - dxPScxExtDBEditorLnks, - dxPScxExtEditorLnkReg, - dxPScxExtEditorProducers, - dxPScxMCListBoxLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD9.res deleted file mode 100644 index 54fd719b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxExtCommonD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC5.bpk deleted file mode 100644 index 815fae05..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC5.bpk +++ /dev/null @@ -1,169 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGrid4LnkC5.bpl -OBJFILES = dxPScxGrid4LnkReg.obj dxPScxGrid4Lnk.obj dxPScxGrid4LnkPredefinedStyleSheets.obj \ - dxPScxGrid4LnkC5.obj -RESFILES = dxPScxGrid4LnkC5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGridLnk.dfm dxPScxGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib -PACKAGES = dxPSCoreC5.bpi cxLibraryVCLC5.bpi cxGridC5.bpi cxEditorsC5.bpi dxThemeC5.bpi \ - cxDataC5.bpi dclcxLibraryVCLC5.bpi dsnide50.bpi vcl50.bpi vclx50.bpi dxPScxCommonC5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 4 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC5.cpp deleted file mode 100644 index 49b8f974..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC5.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEPACKAGE("cxEditorsC5.bpi"); -USEPACKAGE("dxThemeC5.bpi"); -USEPACKAGE("cxGridC5.bpi"); -USEPACKAGE("dclcxLibraryVCLC5.bpi"); -USEPACKAGE("dxPScxCommonC5.bpi"); -USERES("dxPScxGridLnkC5.res"); -USEUNIT("dxPScxGridLnkReg.pas"); -USEUNIT("dxPScxGridLnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGridLnk.pas", Dxpscxgridlnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vclx50.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC5.res deleted file mode 100644 index 18593a18..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC6.bpk deleted file mode 100644 index c87625c9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC6.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGrid4Lnkc6.bpl -OBJFILES = dxPScxGrid4LnkReg.obj dxPScxGrid4Lnk.obj dxPScxGrid4LnkPredefinedStyleSheets.obj dxPScxGrid4Lnkc6.obj -RESFILES = dxPScxGrid4Lnkc6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGridLnk.dfm dxPScxGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxPSCorec6.bpi cxLibraryVCLC6.bpi cxGridVCLC6.bpi cxEditorsVCLC6.bpi dxThemeC6.bpi \ - cxDataC6.bpi designide.bpi vcl.bpi vclx.bpi rtl.bpi dclcxLibraryVCLC6.bpi dxPScxCommonC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 4 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC6.cpp deleted file mode 100644 index da13427a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC6.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCorec6.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("dxPScxCommonC6.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("cxGridVCLC6.bpi"); -USERES("dxPScxGridLnkc6.res"); -USEUNIT("dxPScxGridLnkReg.pas"); -USEUNIT("dxPScxGridLnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGridLnk.pas", Dxpscxgridlnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC6.res deleted file mode 100644 index a2775559..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD5.dpk deleted file mode 100644 index 42d8b57e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD5.dpk +++ /dev/null @@ -1,46 +0,0 @@ -package dxPScxGrid4LnkD5; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 4 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - vcljpg50, - vcldb50, - cxLibraryVCLD5, - dclcxLibraryVCLD5, - dxThemeD5, - dxPSCoreD5, - dxPScxCommonD5, - cxDataD5, - cxEditorsD5, - cxGridD5; - -contains - dxPScxGrid4LnkReg, - dxPScxGrid4LnkPredefinedStyleSheets, - dxPScxGrid4Lnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD5.res deleted file mode 100644 index dce954ac..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD6.dpk deleted file mode 100644 index 1bc3ac54..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD6.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGrid4LnkD6; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 4 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryVCLD6, - dclcxLibraryVCLD6, - dxThemeD6, - dxPSCoreD6, - dxPScxCommonD6, - cxDataD6, - cxEditorsVCLD6, - cxGridVCLD6; - -contains - dxPScxGrid4LnkReg, - dxPScxGrid4LnkPredefinedStyleSheets, - dxPScxGrid4Lnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD6.res deleted file mode 100644 index 5f072e30..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD7.dpk deleted file mode 100644 index e8df1535..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD7.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGrid4LnkD7; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 4 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryVCLD7, - dclcxLibraryVCLD7, - dxThemeD7, - dxPSCoreD7, - dxPScxCommonD7, - cxDataD7, - cxEditorsVCLD7, - cxGridVCLD7; - -contains - dxPScxGrid4LnkReg, - dxPScxGrid4LnkPredefinedStyleSheets, - dxPScxGrid4Lnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD7.res deleted file mode 100644 index 146d2585..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid4LnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC10.bpk deleted file mode 100644 index 23c3a52d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC10.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGrid6LnkC10.bpl -OBJFILES = dxPScxGrid6LnkReg.obj dxPScxGrid6Lnk.obj dxPScxGrid6LnkPredefinedStyleSheets.obj dxPScxGrid6LnkC10.obj -RESFILES = dxPScxGrid6LnkC10.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGrid6Lnk.dfm dxPScxGrid6LnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi cxLibraryC10.bpi cxGridC10.bpi cxEditorsC10.bpi dxThemeC10.bpi \ - cxDataC10.bpi designide.bpi vcl.bpi vclx.bpi rtl.bpi dclcxLibraryC10.bpi dxPScxCommonC10.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC10.cpp deleted file mode 100644 index de213303..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC10.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("dxPScxCommonC10.bpi"); -USEPACKAGE("dclcxLibraryC10.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("cxGridC10.bpi"); -USERES("dxPScxGrid6LnkC10.res"); -USEUNIT("dxPScxGrid6LnkReg.pas"); -USEUNIT("dxPScxGrid6LnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGrid6Lnk.pas", DxpscxGrid6Lnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC10.res deleted file mode 100644 index c8ef3caf..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC11.bpk deleted file mode 100644 index fa444155..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC11.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGrid6LnkC11.bpl -OBJFILES = dxPScxGrid6LnkReg.obj dxPScxGrid6Lnk.obj dxPScxGrid6LnkPredefinedStyleSheets.obj dxPScxGrid6LnkC11.obj -RESFILES = dxPScxGrid6LnkC11.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGrid6Lnk.dfm dxPScxGrid6LnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi cxLibraryC11.bpi cxGridC11.bpi cxEditorsC11.bpi dxThemeC11.bpi \ - cxDataC11.bpi designide.bpi vcl.bpi vclx.bpi rtl.bpi dclcxLibraryC11.bpi dxPScxCommonC11.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC11.cpp deleted file mode 100644 index 36ff354a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC11.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("dxPScxCommonC11.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("cxGridC11.bpi"); -USERES("dxPScxGrid6LnkC11.res"); -USEUNIT("dxPScxGrid6LnkReg.pas"); -USEUNIT("dxPScxGrid6LnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGrid6Lnk.pas", DxpscxGrid6Lnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC11.res deleted file mode 100644 index cf55f81d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC12.bpk deleted file mode 100644 index b21e49f5..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC12.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGrid6LnkC12.bpl -OBJFILES = dxPScxGrid6LnkReg.obj dxPScxGrid6Lnk.obj dxPScxGrid6LnkPredefinedStyleSheets.obj dxPScxGrid6LnkC12.obj -RESFILES = dxPScxGrid6LnkC12.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGrid6Lnk.dfm dxPScxGrid6LnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi cxLibraryC12.bpi cxGridC12.bpi cxEditorsC12.bpi dxThemeC12.bpi \ - cxDataC12.bpi designide.bpi vcl.bpi vclx.bpi rtl.bpi dclcxLibraryC12.bpi dxPScxCommonC12.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC12.cpp deleted file mode 100644 index 05d98cba..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC12.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("dxPScxCommonC12.bpi"); -USEPACKAGE("dclcxLibraryC12.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("cxGridC12.bpi"); -USERES("dxPScxGrid6LnkC12.res"); -USEUNIT("dxPScxGrid6LnkReg.pas"); -USEUNIT("dxPScxGrid6LnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGrid6Lnk.pas", DxpscxGrid6Lnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC12.res deleted file mode 100644 index 66f1512f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC14.bpk deleted file mode 100644 index 937a3d34..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC14.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGrid6LnkC14.bpl -OBJFILES = dxPScxGrid6LnkReg.obj dxPScxGrid6Lnk.obj dxPScxGrid6LnkPredefinedStyleSheets.obj dxPScxGrid6LnkC14.obj -RESFILES = dxPScxGrid6LnkC14.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGrid6Lnk.dfm dxPScxGrid6LnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi cxLibraryC14.bpi cxGridC14.bpi cxEditorsC14.bpi dxThemeC14.bpi \ - cxDataC14.bpi designide.bpi vcl.bpi vclx.bpi rtl.bpi dclcxLibraryC14.bpi dxPScxCommonC14.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC14.cpp deleted file mode 100644 index 122160dc..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC14.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("dxPScxCommonC14.bpi"); -USEPACKAGE("dclcxLibraryC14.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("cxGridC14.bpi"); -USERES("dxPScxGrid6LnkC14.res"); -USEUNIT("dxPScxGrid6LnkReg.pas"); -USEUNIT("dxPScxGrid6LnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGrid6Lnk.pas", DxpscxGrid6Lnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC14.res deleted file mode 100644 index cd13a6c4..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC5.bpk deleted file mode 100644 index dde63770..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC5.bpk +++ /dev/null @@ -1,169 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGrid6LnkC5.bpl -OBJFILES = dxPScxGrid6LnkReg.obj dxPScxGrid6Lnk.obj dxPScxGrid6LnkPredefinedStyleSheets.obj \ - dxPScxGrid6LnkC5.obj -RESFILES = dxPScxGrid6LnkC5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGrid6Lnk.dfm dxPScxGrid6LnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib -PACKAGES = dxPSCoreC5.bpi cxLibraryVCLC5.bpi cxGridC5.bpi cxEditorsC5.bpi dxThemeC5.bpi \ - cxDataC5.bpi dclcxLibraryVCLC5.bpi dsnide50.bpi vcl50.bpi vclx50.bpi dxPScxCommonC5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC5.cpp deleted file mode 100644 index a69a4669..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC5.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEPACKAGE("cxEditorsC5.bpi"); -USEPACKAGE("dxThemeC5.bpi"); -USEPACKAGE("cxGridC5.bpi"); -USEPACKAGE("dclcxLibraryVCLC5.bpi"); -USEPACKAGE("dxPScxCommonC5.bpi"); -USERES("dxPScxGrid6LnkC5.res"); -USEUNIT("dxPScxGrid6LnkReg.pas"); -USEUNIT("dxPScxGrid6LnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGrid6Lnk.pas", DxpscxGrid6Lnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vclx50.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC5.res deleted file mode 100644 index 3337a2ac..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC6.bpk deleted file mode 100644 index 31f00316..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC6.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGrid6Lnkc6.bpl -OBJFILES = dxPScxGrid6LnkReg.obj dxPScxGrid6Lnk.obj dxPScxGrid6LnkPredefinedStyleSheets.obj dxPScxGrid6Lnkc6.obj -RESFILES = dxPScxGrid6Lnkc6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGrid6Lnk.dfm dxPScxGrid6LnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxPSCorec6.bpi cxLibraryVCLC6.bpi cxGridC6.bpi cxEditorsVCLC6.bpi dxThemeC6.bpi \ - cxDataC6.bpi designide.bpi vcl.bpi vclx.bpi rtl.bpi dclcxLibraryVCLC6.bpi dxPScxCommonC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC6.cpp deleted file mode 100644 index 67fcfadb..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC6.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCorec6.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("dxPScxCommonC6.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("cxGridC6.bpi"); -USERES("dxPScxGrid6Lnkc6.res"); -USEUNIT("dxPScxGrid6LnkReg.pas"); -USEUNIT("dxPScxGrid6LnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGrid6Lnk.pas", DxpscxGrid6Lnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC6.res deleted file mode 100644 index 481b8b20..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD10.dpk deleted file mode 100644 index 95ff75ad..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD10.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGrid6LnkD10; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryD10, - dclcxLibraryD10, - dxThemeD10, - dxPSCoreD10, - dxPScxCommonD10, - cxDataD10, - cxEditorsD10, - cxGridD10; - -contains - dxPScxGrid6LnkReg, - dxPScxGrid6LnkPredefinedStyleSheets, - dxPScxGrid6Lnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD10.res deleted file mode 100644 index 32326803..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD11.dpk deleted file mode 100644 index ed8f9f3f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD11.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGrid6LnkD11; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryD11, - dclcxLibraryD11, - dxThemeD11, - dxPSCoreD11, - dxPScxCommonD11, - cxDataD11, - cxEditorsD11, - cxGridD11; - -contains - dxPScxGrid6LnkReg, - dxPScxGrid6LnkPredefinedStyleSheets, - dxPScxGrid6Lnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD11.res deleted file mode 100644 index d435efcc..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD12.dpk deleted file mode 100644 index 923e01b4..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD12.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxGrid6LnkD12; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dbrtl, - vcldb, - dclcxLibraryD12, - dxPScxCommonD12, - cxGridD12; - -contains - dxPScxGrid6LnkReg, - dxPScxGrid6LnkPredefinedStyleSheets, - dxPScxGrid6Lnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD12.res deleted file mode 100644 index 4743f5c9..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD14.dpk deleted file mode 100644 index 05ac0522..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD14.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxGrid6LnkD14; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dbrtl, - vcldb, - dclcxLibraryD14, - dxPScxCommonD14, - cxGridD14; - -contains - dxPScxGrid6LnkReg, - dxPScxGrid6LnkPredefinedStyleSheets, - dxPScxGrid6Lnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD14.res deleted file mode 100644 index 59efe3f7..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD5.dpk deleted file mode 100644 index d44fd115..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD5.dpk +++ /dev/null @@ -1,46 +0,0 @@ -package dxPScxGrid6LnkD5; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - vcljpg50, - vcldb50, - cxLibraryVCLD5, - dclcxLibraryVCLD5, - dxThemeD5, - dxPSCoreD5, - dxPScxCommonD5, - cxDataD5, - cxEditorsD5, - cxGridD5; - -contains - dxPScxGrid6LnkReg, - dxPScxGrid6LnkPredefinedStyleSheets, - dxPScxGrid6Lnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD5.res deleted file mode 100644 index 7eacce08..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD6.dpk deleted file mode 100644 index 68ffa9bc..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD6.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGrid6LnkD6; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryVCLD6, - dclcxLibraryVCLD6, - dxThemeD6, - dxPSCoreD6, - dxPScxCommonD6, - cxDataD6, - cxEditorsVCLD6, - cxGridD6; - -contains - dxPScxGrid6LnkReg, - dxPScxGrid6LnkPredefinedStyleSheets, - dxPScxGrid6Lnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD6.res deleted file mode 100644 index f121639d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD7.dpk deleted file mode 100644 index 6fc947e1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD7.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGrid6LnkD7; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryVCLD7, - dclcxLibraryVCLD7, - dxThemeD7, - dxPSCoreD7, - dxPScxCommonD7, - cxDataD7, - cxEditorsVCLD7, - cxGridD7; - -contains - dxPScxGrid6LnkReg, - dxPScxGrid6LnkPredefinedStyleSheets, - dxPScxGrid6Lnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD7.res deleted file mode 100644 index 79f11ccd..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD9.dpk deleted file mode 100644 index a1673be7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD9.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGrid6LnkD9; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 6 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryD9, - dclcxLibraryD9, - dxThemeD9, - dxPSCoreD9, - dxPScxCommonD9, - cxDataD9, - cxEditorsD9, - cxGridD9; - -contains - dxPScxGrid6LnkReg, - dxPScxGrid6LnkPredefinedStyleSheets, - dxPScxGrid6Lnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD9.res deleted file mode 100644 index 7632d8ee..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGrid6LnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC10.bpk deleted file mode 100644 index 8ac2c195..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC10.bpk +++ /dev/null @@ -1,169 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGridLnkC10.bpl -OBJFILES = dxPScxGridLnkReg.obj dxPScxGridLnk.obj dxPScxGridLnkPredefinedStyleSheets.obj dxPScxGridLnkC10.obj -MAINSOURCE = dxPScxGridLnkC10.cpp -RESFILES = dxPScxGridLnkC10.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGridLnk.dfm dxPScxGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi cxLibraryC10.bpi cxGridC10.bpi cxEditorsC10.bpi dxThemeC10.bpi \ - cxDataC10.bpi designide.bpi vcl.bpi vclx.bpi rtl.bpi dclcxLibraryC10.bpi dxPScxCommonC10.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 5 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC10.cpp deleted file mode 100644 index 871eb260..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC10.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("dxPScxCommonC10.bpi"); -USEPACKAGE("dclcxLibraryC10.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("cxGridC10.bpi"); -USERES("dxPScxGridLnkC10.res"); -USEUNIT("dxPScxGridLnkReg.pas"); -USEUNIT("dxPScxGridLnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGridLnk.pas", Dxpscxgridlnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC10.res deleted file mode 100644 index 09cb5755..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC11.bpk deleted file mode 100644 index 7f3c4824..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC11.bpk +++ /dev/null @@ -1,169 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGridLnkC11.bpl -OBJFILES = dxPScxGridLnkReg.obj dxPScxGridLnk.obj dxPScxGridLnkPredefinedStyleSheets.obj dxPScxGridLnkC11.obj -MAINSOURCE = dxPScxGridLnkC11.cpp -RESFILES = dxPScxGridLnkC11.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGridLnk.dfm dxPScxGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi cxLibraryC11.bpi cxGridC11.bpi cxEditorsC11.bpi dxThemeC11.bpi \ - cxDataC11.bpi designide.bpi vcl.bpi vclx.bpi rtl.bpi dclcxLibraryC11.bpi dxPScxCommonC11.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 5 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC11.cpp deleted file mode 100644 index ab5d54cc..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC11.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("dxPScxCommonC11.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("cxGridC11.bpi"); -USERES("dxPScxGridLnkC11.res"); -USEUNIT("dxPScxGridLnkReg.pas"); -USEUNIT("dxPScxGridLnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGridLnk.pas", Dxpscxgridlnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC11.res deleted file mode 100644 index 6477986c..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC5.bpk deleted file mode 100644 index 408083af..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC5.bpk +++ /dev/null @@ -1,169 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGridLnkC5.bpl -OBJFILES = dxPScxGridLnkReg.obj dxPScxGridLnk.obj dxPScxGridLnkPredefinedStyleSheets.obj \ - dxPScxGridLnkC5.obj -RESFILES = dxPScxGridLnkC5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGridLnk.dfm dxPScxGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib -PACKAGES = dxPSCoreC5.bpi cxLibraryVCLC5.bpi cxGridC5.bpi cxEditorsC5.bpi dxThemeC5.bpi \ - cxDataC5.bpi dclcxLibraryVCLC5.bpi dsnide50.bpi vcl50.bpi vclx50.bpi dxPScxCommonC5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 5 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC5.cpp deleted file mode 100644 index 49b8f974..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC5.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEPACKAGE("cxEditorsC5.bpi"); -USEPACKAGE("dxThemeC5.bpi"); -USEPACKAGE("cxGridC5.bpi"); -USEPACKAGE("dclcxLibraryVCLC5.bpi"); -USEPACKAGE("dxPScxCommonC5.bpi"); -USERES("dxPScxGridLnkC5.res"); -USEUNIT("dxPScxGridLnkReg.pas"); -USEUNIT("dxPScxGridLnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGridLnk.pas", Dxpscxgridlnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vclx50.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC5.res deleted file mode 100644 index bedf4932..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC6.bpk deleted file mode 100644 index 7ed4dd85..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC6.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxGridLnkc6.bpl -OBJFILES = dxPScxGridLnkReg.obj dxPScxGridLnk.obj dxPScxGridLnkPredefinedStyleSheets.obj dxPScxGridLnkc6.obj -RESFILES = dxPScxGridLnkc6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxGridLnk.dfm dxPScxGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxPSCorec6.bpi cxLibraryVCLC6.bpi cxGridVCLC6.bpi cxEditorsVCLC6.bpi dxThemeC6.bpi \ - cxDataC6.bpi designide.bpi vcl.bpi vclx.bpi rtl.bpi dclcxLibraryVCLC6.bpi dxPScxCommonC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid 5 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC6.cpp deleted file mode 100644 index da13427a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC6.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCorec6.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("dxPScxCommonC6.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("cxGridVCLC6.bpi"); -USERES("dxPScxGridLnkc6.res"); -USEUNIT("dxPScxGridLnkReg.pas"); -USEUNIT("dxPScxGridLnkPredefinedStyleSheets.pas"); -USEFORMNS("dxPScxGridLnk.pas", Dxpscxgridlnk, dxfmGridReportLinkDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC6.res deleted file mode 100644 index dfdaaa26..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD10.dpk deleted file mode 100644 index 3bfe0266..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD10.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGridLnkD10; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryD10, - dclcxLibraryD10, - dxThemeD10, - dxPSCoreD10, - dxPScxCommonD10, - cxDataD10, - cxEditorsD10, - cxGridD10; - -contains - dxPScxGridLnkReg, - dxPScxGridLnkPredefinedStyleSheets, - dxPScxGridLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD10.res deleted file mode 100644 index 515f42f1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD11.dpk deleted file mode 100644 index edb7b81f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD11.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGridLnkD11; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryD11, - dclcxLibraryD11, - dxThemeD11, - dxPSCoreD11, - dxPScxCommonD11, - cxDataD11, - cxEditorsD11, - cxGridD11; - -contains - dxPScxGridLnkReg, - dxPScxGridLnkPredefinedStyleSheets, - dxPScxGridLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD11.res deleted file mode 100644 index 2772de5f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD5.dpk deleted file mode 100644 index 592ac438..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD5.dpk +++ /dev/null @@ -1,46 +0,0 @@ -package dxPScxGridLnkD5; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - vcljpg50, - vcldb50, - cxLibraryVCLD5, - dclcxLibraryVCLD5, - dxThemeD5, - dxPSCoreD5, - dxPScxCommonD5, - cxDataD5, - cxEditorsD5, - cxGridD5; - -contains - dxPScxGridLnkReg, - dxPScxGridLnkPredefinedStyleSheets, - dxPScxGridLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD5.res deleted file mode 100644 index b1581695..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD6.dpk deleted file mode 100644 index 53881678..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD6.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGridLnkD6; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryVCLD6, - dclcxLibraryVCLD6, - dxThemeD6, - dxPSCoreD6, - dxPScxCommonD6, - cxDataD6, - cxEditorsVCLD6, - cxGridVCLD6; - -contains - dxPScxGridLnkReg, - dxPScxGridLnkPredefinedStyleSheets, - dxPScxGridLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD6.res deleted file mode 100644 index ae977de1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD7.dpk deleted file mode 100644 index cac71fbd..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD7.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGridLnkD7; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryVCLD7, - dclcxLibraryVCLD7, - dxThemeD7, - dxPSCoreD7, - dxPScxCommonD7, - cxDataD7, - cxEditorsVCLD7, - cxGridVCLD7; - -contains - dxPScxGridLnkReg, - dxPScxGridLnkPredefinedStyleSheets, - dxPScxGridLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD7.res deleted file mode 100644 index f86d2655..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD9.dpk deleted file mode 100644 index 65157e44..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD9.dpk +++ /dev/null @@ -1,48 +0,0 @@ -package dxPScxGridLnkD9; - -{$R *.RES} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS ON} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - vcljpg, - dbrtl, - vcldb, - cxLibraryD9, - dclcxLibraryD9, - dxThemeD9, - dxPSCoreD9, - dxPScxCommonD9, - cxDataD9, - cxEditorsD9, - cxGridD9; - -contains - dxPScxGridLnkReg, - dxPScxGridLnkPredefinedStyleSheets, - dxPScxGridLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD9.res deleted file mode 100644 index 8632c229..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxGridLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC10.bpk deleted file mode 100644 index 99e4f824..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC10.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPCProdC10.bpl -OBJFILES = dxPScxPageControlProducer.obj dxPScxPCProdC10.obj -MAINSOURCE = dxPScxPCProdC10.cpp -RESFILES = dxPScxPCProdC10.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi cxPageControlC10.bpi rtl.bpi vcl.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC10.cpp deleted file mode 100644 index 111931e1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC10.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USERES("dxPScxPCProdC10.res"); -USEPACKAGE("cxPageControlC10.bpi"); -USEUNIT("dxPScxPageControlProducer.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC10.res deleted file mode 100644 index 37d1af0f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC11.bpk deleted file mode 100644 index 65b27179..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC11.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPCProdC11.bpl -OBJFILES = dxPScxPageControlProducer.obj dxPScxPCProdC11.obj -MAINSOURCE = dxPScxPCProdC11.cpp -RESFILES = dxPScxPCProdC11.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi cxPageControlC11.bpi rtl.bpi vcl.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC11.cpp deleted file mode 100644 index 50633e3a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC11.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USERES("dxPScxPCProdC11.res"); -USEPACKAGE("cxPageControlC11.bpi"); -USEUNIT("dxPScxPageControlProducer.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC11.res deleted file mode 100644 index 6f98b4a4..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC12.bpk deleted file mode 100644 index 1c1f43e7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC12.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPCProdC12.bpl -OBJFILES = dxPScxPageControlProducer.obj dxPScxPCProdC12.obj -MAINSOURCE = dxPScxPCProdC12.cpp -RESFILES = dxPScxPCProdC12.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi cxPageControlC12.bpi rtl.bpi vcl.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC12.cpp deleted file mode 100644 index e66aa50f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC12.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USERES("dxPScxPCProdC12.res"); -USEPACKAGE("cxPageControlC12.bpi"); -USEUNIT("dxPScxPageControlProducer.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC12.res deleted file mode 100644 index b5a196d3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC14.bpk deleted file mode 100644 index 0f34edf4..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC14.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPCProdC14.bpl -OBJFILES = dxPScxPageControlProducer.obj dxPScxPCProdC14.obj -MAINSOURCE = dxPScxPCProdC14.cpp -RESFILES = dxPScxPCProdC14.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi cxPageControlC14.bpi rtl.bpi vcl.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC14.cpp deleted file mode 100644 index 54bdb05e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC14.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USERES("dxPScxPCProdC14.res"); -USEPACKAGE("cxPageControlC14.bpi"); -USEUNIT("dxPScxPageControlProducer.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC14.res deleted file mode 100644 index 54067c9d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC5.bpk deleted file mode 100644 index 89ddf7da..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC5.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPCProdC5.bpl -OBJFILES = dxPScxPageControlProducer.obj dxPScxPCProdC5.obj -RESFILES = dxPScxPCProdC5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCoreC5.bpi cxPageControlC5.bpi vcl50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC5.cpp deleted file mode 100644 index 167a9701..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC5.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("dxPSCoreC5.bpi"); -USERES("dxPScxPCProdC5.res"); -USEPACKAGE("cxPageControlC5.bpi"); -USEUNIT("dxPScxPageControlProducer.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC5.res deleted file mode 100644 index 6bb6e50b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC6.bpk deleted file mode 100644 index 217fbc3b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC6.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPCProdC6.bpl -OBJFILES = dxPScxPageControlProducer.obj dxPScxPCProdC6.obj -RESFILES = dxPScxPCProdC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi cxPageControlVCLC6.bpi rtl.bpi vcl.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC6.cpp deleted file mode 100644 index 665021b6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC6.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USERES("dxPScxPCProdC6.res"); -USEPACKAGE("cxPageControlVCLC6.bpi"); -USEUNIT("dxPScxPageControlProducer.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC6.res deleted file mode 100644 index 5e9d6f09..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD10.dpk deleted file mode 100644 index 171bd4fb..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD10.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxPCProdD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD10, - cxPageControlD10; - -contains - dxPScxPageControlProducer; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD10.res deleted file mode 100644 index 67b97705..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD11.dpk deleted file mode 100644 index 6252dd42..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD11.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxPCProdD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD11, - cxPageControlD11; - -contains - dxPScxPageControlProducer; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD11.res deleted file mode 100644 index 34fd8e86..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD12.dpk deleted file mode 100644 index 03aafd0a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD12.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxPCProdD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD12, - cxPageControlD12; - -contains - dxPScxPageControlProducer; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD12.res deleted file mode 100644 index 97859713..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD14.dpk deleted file mode 100644 index ac2ea0c2..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD14.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxPCProdD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD14, - cxPageControlD14; - -contains - dxPScxPageControlProducer; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD14.res deleted file mode 100644 index 85af5026..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD5.dpk deleted file mode 100644 index a0d66c70..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD5.dpk +++ /dev/null @@ -1,36 +0,0 @@ -package dxPScxPCProdD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - cxPageControlD5; - -contains - dxPScxPageControlProducer; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD5.res deleted file mode 100644 index ff0882ee..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD6.dpk deleted file mode 100644 index 88f493cc..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxPCProdD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD6, - cxPageControlVCLD6; - -contains - dxPScxPageControlProducer; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD6.res deleted file mode 100644 index 45ceca1b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD7.dpk deleted file mode 100644 index e76abad0..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxPCProdD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD7, - cxPageControlVCLD7; - -contains - dxPScxPageControlProducer; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD7.res deleted file mode 100644 index 3d4db1c3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD9.dpk deleted file mode 100644 index 91df11c3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD9.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxPCProdD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ContainerProducer for ExpressPageControl 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD9, - cxPageControlD9; - -contains - dxPScxPageControlProducer; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD9.res deleted file mode 100644 index 0f7f0aa1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPCProdD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC11.bpk deleted file mode 100644 index e2adfb87..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC11.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPivotGrid2LnkC11.bpl -OBJFILES = dxPScxPivotGrid2LnkC11.obj dxPScxPivotGrid2Lnk.obj dxPScxPivotGrid2LnkReg.obj - -RESFILES = dxPScxPivotGrid2LnkC11.res -MAINSOURCE = dxPScxPivotGrid2LnkC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC11.bpi dxPSCoreC11.bpi dcldxPSCoreC11.bpi \ - cxDataC11.bpi dclcxLibraryC11.bpi cxLibraryC11.bpi dclcxEditorsC11.bpi \ - cxEditorsC11.bpi cxPivotGridC11.bpi dxThemeC11.bpi dclcxPivotGridC11.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib CXLIBRARYC11.lib CXEDITORSC11.lib CXPIVOTGRIDC11.lib \ - DXPSCOREC11.lib dxPScxCommonC11.lib dclcxLibraryC11.lib dcldxPSCoreC11.lib dclcxPivotGridC11.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressPivotGrid 2 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC11.cpp deleted file mode 100644 index c7448bab..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC11.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxPivotGrid2LnkC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxPScxPivotGrid2LnkReg.pas"); -USEFORMNS("dxPScxPivotGrid2Lnk.pas", DxpscxPivotGrid2lnk, dxfmPivotGridReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC11.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("cxPivotGridC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("dclcxEditorsC11.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEPACKAGE("CXLIBRARYC11.bpi"); -USEPACKAGE("dxPScxCommonC11.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC11.res deleted file mode 100644 index cb90701d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC12.bpk deleted file mode 100644 index e6fbda7a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC12.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPivotGrid2LnkC12.bpl -OBJFILES = dxPScxPivotGrid2LnkC12.obj dxPScxPivotGrid2Lnk.obj dxPScxPivotGrid2LnkReg.obj - -RESFILES = dxPScxPivotGrid2LnkC12.res -MAINSOURCE = dxPScxPivotGrid2LnkC12.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC12.bpi dxPSCoreC12.bpi dcldxPSCoreC12.bpi \ - cxDataC12.bpi dclcxLibraryC12.bpi cxLibraryC12.bpi dclcxEditorsC12.bpi \ - cxEditorsC12.bpi cxPivotGridC12.bpi dxThemeC12.bpi dclcxPivotGridC12.bpi dxCoreC12.bpi -SPARELIBS = rtl.lib CXLIBRARYC12.lib CXEDITORSC12.lib CXPIVOTGRIDC12.lib \ - DXPSCOREC12.lib dxPScxCommonC12.lib dclcxLibraryC12.lib dcldxPSCoreC12.lib dclcxPivotGridC12.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressPivotGrid 2 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC12.cpp deleted file mode 100644 index de8cc627..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC12.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxPivotGrid2LnkC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxPScxPivotGrid2LnkReg.pas"); -USEFORMNS("dxPScxPivotGrid2Lnk.pas", DxpscxPivotGrid2lnk, dxfmPivotGridReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC12.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("cxPivotGridC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("dclcxEditorsC12.bpi"); -USEPACKAGE("dclcxLibraryC12.bpi"); -USEPACKAGE("CXLIBRARYC12.bpi"); -USEPACKAGE("dxPScxCommonC12.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC12.res deleted file mode 100644 index 53e603ef..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC14.bpk deleted file mode 100644 index dff078cd..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC14.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPivotGrid2LnkC14.bpl -OBJFILES = dxPScxPivotGrid2LnkC14.obj dxPScxPivotGrid2Lnk.obj dxPScxPivotGrid2LnkReg.obj - -RESFILES = dxPScxPivotGrid2LnkC14.res -MAINSOURCE = dxPScxPivotGrid2LnkC14.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC14.bpi dxPSCoreC14.bpi dcldxPSCoreC14.bpi \ - cxDataC14.bpi dclcxLibraryC14.bpi cxLibraryC14.bpi dclcxEditorsC14.bpi \ - cxEditorsC14.bpi cxPivotGridC14.bpi dxThemeC14.bpi dclcxPivotGridC14.bpi dxCoreC14.bpi -SPARELIBS = rtl.lib CXLIBRARYC14.lib CXEDITORSC14.lib CXPIVOTGRIDC14.lib \ - DXPSCOREC14.lib dxPScxCommonC14.lib dclcxLibraryC14.lib dcldxPSCoreC14.lib dclcxPivotGridC14.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressPivotGrid 2 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC14.cpp deleted file mode 100644 index cad8e03a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC14.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxPivotGrid2LnkC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxPScxPivotGrid2LnkReg.pas"); -USEFORMNS("dxPScxPivotGrid2Lnk.pas", DxpscxPivotGrid2lnk, dxfmPivotGridReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC14.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("cxPivotGridC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("dclcxEditorsC14.bpi"); -USEPACKAGE("dclcxLibraryC14.bpi"); -USEPACKAGE("CXLIBRARYC14.bpi"); -USEPACKAGE("dxPScxCommonC14.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC14.res deleted file mode 100644 index 8c1559ac..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD10.dpk deleted file mode 100644 index a855fe30..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD10.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxPivotGrid2LnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD10, - dcldxPSCoreD10, - dxPScxCommonD10, - cxLibraryD10, - dclcxLibraryD10, - cxPivotGridD10, - dclcxPivotGridD10; - -contains - dxPScxPivotGrid2Lnk, - dxPScxPivotGrid2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD10.res deleted file mode 100644 index 7d90a2ee..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD11.dpk deleted file mode 100644 index 8fbef275..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD11.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxPivotGrid2LnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD11, - dcldxPSCoreD11, - dxPScxCommonD11, - cxLibraryD11, - dclcxLibraryD11, - cxPivotGridD11, - dclcxPivotGridD11; - -contains - dxPScxPivotGrid2Lnk, - dxPScxPivotGrid2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD11.res deleted file mode 100644 index c2daf9a1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD12.dpk deleted file mode 100644 index e214da77..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD12.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dxPScxPivotGrid2LnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dcldxPSCoreD12, - dxPScxCommonD12, - dclcxLibraryD12, - dclcxPivotGridD12; - -contains - dxPScxPivotGrid2Lnk, - dxPScxPivotGrid2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD12.res deleted file mode 100644 index cdea7f19..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD14.dpk deleted file mode 100644 index 705ab44b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD14.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dxPScxPivotGrid2LnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dcldxPSCoreD14, - dxPScxCommonD14, - dclcxLibraryD14, - dclcxPivotGridD14; - -contains - dxPScxPivotGrid2Lnk, - dxPScxPivotGrid2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD14.res deleted file mode 100644 index 0ac5357d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD7.dpk deleted file mode 100644 index 1a224ff9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD7.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxPivotGrid2LnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD7, - dcldxPSCoreD7, - dxPScxCommonD7, - cxLibraryVCLD7, - dclcxLibraryVCLD7, - cxPivotGridD7, - dclcxPivotGridD7; - -contains - dxPScxPivotGrid2Lnk, - dxPScxPivotGrid2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD7.res deleted file mode 100644 index 8a7c46b8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD9.dpk deleted file mode 100644 index c5e55bab..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD9.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxPivotGrid2LnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD9, - dcldxPSCoreD9, - dxPScxCommonD9, - cxLibraryD9, - dclcxLibraryD9, - cxPivotGridD9, - dclcxPivotGridD9; - -contains - dxPScxPivotGrid2Lnk, - dxPScxPivotGrid2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD9.res deleted file mode 100644 index 91678bf9..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGrid2LnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC10.bpk deleted file mode 100644 index 08365a06..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC10.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPivotGridLnkC10.bpl -OBJFILES = dxPScxPivotGridLnkC10.obj dxPScxPivotGridLnk.obj dxPScxPivotGridLnkReg.obj - -RESFILES = dxPScxPivotGridLnkC10.res -MAINSOURCE = dxPScxPivotGridLnkC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC10.bpi dxPSCoreC10.bpi dcldxPSCoreC10.bpi \ - cxDataC10.bpi dclcxLibraryC10.bpi cxLibraryC10.bpi dclcxEditorsC10.bpi \ - cxEditorsC10.bpi cxPivotGridC10.bpi dxThemeC10.bpi dclcxPivotGridC10.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib CXLIBRARYC10.lib CXEDITORSC10.lib CXPIVOTGRIDC10.lib \ - DXPSCOREC10.lib dxPScxCommonC10.lib dclcxLibraryC10.lib dcldxPSCoreC10.lib dclcxPivotGridC10.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC10.cpp deleted file mode 100644 index ba8f0988..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC10.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxPivotGridLnkC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEUNIT("dxPScxPivotGridLnkReg.pas"); -USEFORMNS("dxPScxPivotGridLnk.pas", DxpscxPivotGridlnk, dxfmPivotGridReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC10.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("cxPivotGridC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("dclcxEditorsC10.bpi"); -USEPACKAGE("dclcxLibraryC10.bpi"); -USEPACKAGE("CXLIBRARYC10.bpi"); -USEPACKAGE("dxPScxCommonC10.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC10.res deleted file mode 100644 index 0a469a06..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC11.bpk deleted file mode 100644 index 69970bc9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC11.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPivotGridLnkC11.bpl -OBJFILES = dxPScxPivotGridLnkC11.obj dxPScxPivotGridLnk.obj dxPScxPivotGridLnkReg.obj - -RESFILES = dxPScxPivotGridLnkC11.res -MAINSOURCE = dxPScxPivotGridLnkC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC11.bpi dxPSCoreC11.bpi dcldxPSCoreC11.bpi \ - cxDataC11.bpi dclcxLibraryC11.bpi cxLibraryC11.bpi dclcxEditorsC11.bpi \ - cxEditorsC11.bpi cxPivotGridC11.bpi dxThemeC11.bpi dclcxPivotGridC11.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib CXLIBRARYC11.lib CXEDITORSC11.lib CXPIVOTGRIDC11.lib \ - DXPSCOREC11.lib dxPScxCommonC11.lib dclcxLibraryC11.lib dcldxPSCoreC11.lib dclcxPivotGridC11.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC11.cpp deleted file mode 100644 index d02e8443..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC11.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxPivotGridLnkC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEUNIT("dxPScxPivotGridLnkReg.pas"); -USEFORMNS("dxPScxPivotGridLnk.pas", DxpscxPivotGridlnk, dxfmPivotGridReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC11.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("cxPivotGridC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("dclcxEditorsC11.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEPACKAGE("CXLIBRARYC11.bpi"); -USEPACKAGE("dxPScxCommonC11.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC11.res deleted file mode 100644 index 6a88b1c1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC5.bpk deleted file mode 100644 index 143c130f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC5.bpk +++ /dev/null @@ -1,177 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPivotGridLnkC5.bpl -OBJFILES = dxPScxPivotGridLnkReg.obj dxPScxPivotGridLnk.obj dxPScxPivotGridLnkC5.obj -RESFILES = dxPScxPivotGridLnkC5.res -MAINSOURCE = dxPScxPivotGridLnkC5.cpp -RESDEPEN = $(RESFILES) dxPScxPivotGridLnk.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = vcl50.bpi dcldxPSCorec5.bpi dxPSCorec5.bpi cxPivotGridC5.bpi dsnide50.bpi \ - cxDataC5.bpi dxThemeC5.bpi cxEditorsC5.bpi \ - dclcxEditorsC5.bpi dclcxLibraryVCLC5.bpi \ - CXLIBRARYVCLC5.bpi dxPScxCommonC5.bpi dclcxPivotGridC5.bpi -SPARELIBS = Vcl50.lib CXLIBRARYVCLC5.lib CXEDITORSC5.lib CXPivotGridC5.lib \ - DXPSCOREC5.lib dxPScxCommonC5.lib dclcxLibraryVCLC5.lib dcldxPSCorec5.lib dclcxPivotGridC5.lib -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC5.cpp deleted file mode 100644 index ec78c97e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC5.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxPScxPivotGridLnkC5.res"); -USEPACKAGE("vcl50.bpi"); -USEUNIT("dxPScxPivotGridLnkReg.pas"); -USEFORMNS("dxPScxPivotGridLnk.pas", DxpscxPivotGridlnk, dxfmPivotGridReportLinkDesignWindow); -USEPACKAGE("dcldxPSCorec5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("cxPivotGridC5.bpi"); -USEPACKAGE("dsnide50.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEPACKAGE("dxThemeC5.bpi"); -USEPACKAGE("cxEditorsC5.bpi"); -USEPACKAGE("dclcxEditorsC5.bpi"); -USEPACKAGE("dclcxLibraryVCLC5.bpi"); -USEPACKAGE("CXLIBRARYVCLC5.bpi"); -USEPACKAGE("dxPScxCommonC5.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC5.res deleted file mode 100644 index f8222ece..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC6.bpk deleted file mode 100644 index a4f4c37d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC6.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxPivotGridLnkC6.bpl -OBJFILES = dxPScxPivotGridLnkC6.obj dxPScxPivotGridLnk.obj dxPScxPivotGridLnkReg.obj - -RESFILES = dxPScxPivotGridLnkC6.res -MAINSOURCE = dxPScxPivotGridLnkC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC6.bpi dxPSCoreC6.bpi dcldxPSCoreC6.bpi \ - cxDataC6.bpi dclcxLibraryVCLC6.bpi cxLibraryVCLC6.bpi dclcxEditorsVCLC6.bpi \ - cxEditorsVCLC6.bpi cxPivotGridC6.bpi dxThemeC6.bpi dclcxPivotGridC6.bpi dxCoreC6.bpi -SPARELIBS = rtl.lib CXLIBRARYVCLC6.lib CXEDITORSVCLC6.lib CXPivotGridC6.lib \ - DXPSCOREC6.lib dxPScxCommonC6.lib dclcxLibraryVCLC6.lib dcldxPSCorec6.lib dclcxPivotGridC6.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC6.cpp deleted file mode 100644 index 8a6a7a2a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC6.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxPivotGridLnkC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEUNIT("dxPScxPivotGridLnkReg.pas"); -USEFORMNS("dxPScxPivotGridLnk.pas", DxpscxPivotGridlnk, dxfmPivotGridReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("cxPivotGridVCLC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("dclcxEditorsVCLC6.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEPACKAGE("CXLIBRARYVCLC6.bpi"); -USEPACKAGE("dxPScxCommonC6.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - \ No newline at end of file diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC6.res deleted file mode 100644 index 0e00dea6..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD10.dpk deleted file mode 100644 index 263e3c08..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD10.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxPivotGridLnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD10, - dcldxPSCoreD10, - dxPScxCommonD10, - cxLibraryD10, - dclcxLibraryD10, - cxPivotGridD10, - dclcxPivotGridD10; - -contains - dxPScxPivotGridLnk, - dxPScxPivotGridLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD10.res deleted file mode 100644 index 9efffffd..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD11.dpk deleted file mode 100644 index 9409e13c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD11.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxPivotGridLnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD11, - dcldxPSCoreD11, - dxPScxCommonD11, - cxLibraryD11, - dclcxLibraryD11, - cxPivotGridD11, - dclcxPivotGridD11; - -contains - dxPScxPivotGridLnk, - dxPScxPivotGridLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD11.res deleted file mode 100644 index dd1f1b47..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD5.dpk deleted file mode 100644 index c8416d5f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD5.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxPivotGridLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dcldxPSCoreD5, - dxPScxCommonD5, - cxLibraryVCLD5, - dclcxLibraryVCLD5, - cxPivotGridD5, - dclcxPivotGridD5; - -contains - dxPScxPivotGridLnk, - dxPScxPivotGridLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD5.res deleted file mode 100644 index e9c213b0..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD6.dpk deleted file mode 100644 index 0c4db18c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD6.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxPivotGridLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD6, - dcldxPSCoreD6, - dxPScxCommonD6, - cxLibraryVCLD6, - dclcxLibraryVCLD6, - cxPivotGridD6, - dclcxPivotGridD6; - -contains - dxPScxPivotGridLnk, - dxPScxPivotGridLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD6.res deleted file mode 100644 index 86ca5843..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD7.dpk deleted file mode 100644 index b72b65ab..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD7.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxPivotGridLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD7, - dcldxPSCoreD7, - dxPScxCommonD7, - cxLibraryVCLD7, - dclcxLibraryVCLD7, - cxPivotGridD7, - dclcxPivotGridD7; - -contains - dxPScxPivotGridLnk, - dxPScxPivotGridLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD7.res deleted file mode 100644 index 206b4ad4..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD9.dpk deleted file mode 100644 index 691ce3f6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD9.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxPivotGridLnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD9, - dcldxPSCoreD9, - dxPScxCommonD9, - cxLibraryD9, - dclcxLibraryD9, - cxPivotGridD9, - dclcxPivotGridD9; - -contains - dxPScxPivotGridLnk, - dxPScxPivotGridLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD9.res deleted file mode 100644 index 2c867709..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxPivotGridLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC10.bpk deleted file mode 100644 index 48cb406b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC10.bpk +++ /dev/null @@ -1,170 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxSSLnkC10.bpl -OBJFILES = dxPScxSSLnkReg.obj dxPScxSSLnk.obj dxPSExcelEdgePatterns.obj \ - dxPSExcelFillPatterns.obj dxPScxSSLnkC10.obj -MAINSOURCE = dxPScxSSLnkC10.cpp -RESFILES = dxPScxSSLnkC10.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxSSLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi cxLibraryC10.bpi cxSpreadSheetC10.bpi designide.bpi \ - vcl.bpi vclx.bpi rtl.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC10.cpp deleted file mode 100644 index afe41640..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC10.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("cxSpreadSheetC10.bpi"); -USERES("dxPScxSSLnkC10.res"); -USEUNIT("dxPScxSSLnkReg.pas"); -USEUNIT("dxPSExcelEdgePatterns.pas"); -USEUNIT("dxPSExcelFillPatterns.pas"); -USEFORMNS("dxPScxSSLnk.pas", Dxpscxsslnk, fmdxSpreadSheetDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC10.res deleted file mode 100644 index 593a103b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC11.bpk deleted file mode 100644 index 98e93d7e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC11.bpk +++ /dev/null @@ -1,170 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxSSLnkC11.bpl -OBJFILES = dxPScxSSLnkReg.obj dxPScxSSLnk.obj dxPSExcelEdgePatterns.obj \ - dxPSExcelFillPatterns.obj dxPScxSSLnkC11.obj -MAINSOURCE = dxPScxSSLnkC11.cpp -RESFILES = dxPScxSSLnkC11.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxSSLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi cxLibraryC11.bpi cxSpreadSheetC11.bpi designide.bpi \ - vcl.bpi vclx.bpi rtl.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC11.cpp deleted file mode 100644 index 6b13aac1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("cxSpreadSheetC11.bpi"); -USERES("dxPScxSSLnkC11.res"); -USEUNIT("dxPScxSSLnkReg.pas"); -USEUNIT("dxPSExcelEdgePatterns.pas"); -USEUNIT("dxPSExcelFillPatterns.pas"); -USEFORMNS("dxPScxSSLnk.pas", Dxpscxsslnk, fmdxSpreadSheetDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC11.res deleted file mode 100644 index 4f382821..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC12.bpk deleted file mode 100644 index 9a895448..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC12.bpk +++ /dev/null @@ -1,170 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxSSLnkC12.bpl -OBJFILES = dxPScxSSLnkReg.obj dxPScxSSLnk.obj dxPSExcelEdgePatterns.obj \ - dxPSExcelFillPatterns.obj dxPScxSSLnkC12.obj -MAINSOURCE = dxPScxSSLnkC12.cpp -RESFILES = dxPScxSSLnkC12.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxSSLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi cxLibraryC12.bpi cxSpreadSheetC12.bpi designide.bpi \ - vcl.bpi vclx.bpi rtl.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC12.cpp deleted file mode 100644 index 954e438a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC12.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("cxSpreadSheetC12.bpi"); -USERES("dxPScxSSLnkC12.res"); -USEUNIT("dxPScxSSLnkReg.pas"); -USEUNIT("dxPSExcelEdgePatterns.pas"); -USEUNIT("dxPSExcelFillPatterns.pas"); -USEFORMNS("dxPScxSSLnk.pas", Dxpscxsslnk, fmdxSpreadSheetDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC12.res deleted file mode 100644 index 9a2a7cc1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC14.bpk deleted file mode 100644 index 802e8ef3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC14.bpk +++ /dev/null @@ -1,170 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxSSLnkC14.bpl -OBJFILES = dxPScxSSLnkReg.obj dxPScxSSLnk.obj dxPSExcelEdgePatterns.obj \ - dxPSExcelFillPatterns.obj dxPScxSSLnkC14.obj -MAINSOURCE = dxPScxSSLnkC14.cpp -RESFILES = dxPScxSSLnkC14.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxSSLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi cxLibraryC14.bpi cxSpreadSheetC14.bpi designide.bpi \ - vcl.bpi vclx.bpi rtl.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC14.cpp deleted file mode 100644 index 2e24b424..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC14.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("cxSpreadSheetC14.bpi"); -USERES("dxPScxSSLnkC14.res"); -USEUNIT("dxPScxSSLnkReg.pas"); -USEUNIT("dxPSExcelEdgePatterns.pas"); -USEUNIT("dxPSExcelFillPatterns.pas"); -USEFORMNS("dxPScxSSLnk.pas", Dxpscxsslnk, fmdxSpreadSheetDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC14.res deleted file mode 100644 index 39747736..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC5.bpk deleted file mode 100644 index a33baa38..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC5.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxSSLnkc5.bpl -OBJFILES = dxPScxSSLnkReg.obj dxPSExcelEdgePatterns.obj \ - dxPSExcelFillPatterns.obj dxPScxSSLnk.obj dxPScxSSLnkc5.obj -RESFILES = dxPScxSSLnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxSSLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCorec5.bpi cxLibraryVCLC5.bpi cxSpreadSheetVCLC5.bpi vcl50.bpi vclx50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC5.cpp deleted file mode 100644 index f8f9620b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC5.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("cxSpreadSheetVCLC5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USERES("dxPScxSSLnkc5.res"); -USEUNIT("dxPScxSSLnkReg.pas"); -USEUNIT("dxPSExcelEdgePatterns.pas"); -USEUNIT("dxPSExcelFillPatterns.pas"); -USEFORMNS("dxPScxSSLnk.pas", Dxpscxsslnk, fmdxSpreadSheetDesignWindow); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vclx50.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC5.res deleted file mode 100644 index 66740063..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC6.bpk deleted file mode 100644 index b1bf6430..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC6.bpk +++ /dev/null @@ -1,169 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxSSLnkc6.bpl -OBJFILES = dxPScxSSLnkReg.obj dxPScxSSLnk.obj dxPSExcelEdgePatterns.obj \ - dxPSExcelFillPatterns.obj dxPScxSSLnkc6.obj -RESFILES = dxPScxSSLnkc6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxSSLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxPSCorec6.bpi cxLibraryVCLC6.bpi cxSpreadSheetVCLC6.bpi designide.bpi \ - vcl.bpi vclx.bpi rtl.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC6.cpp deleted file mode 100644 index d7b03ea6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC6.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxPSCorec6.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("cxSpreadSheetVCLC6.bpi"); -USERES("dxPScxSSLnkc6.res"); -USEUNIT("dxPScxSSLnkReg.pas"); -USEUNIT("dxPSExcelEdgePatterns.pas"); -USEUNIT("dxPSExcelFillPatterns.pas"); -USEFORMNS("dxPScxSSLnk.pas", Dxpscxsslnk, fmdxSpreadSheetDesignWindow); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC6.res deleted file mode 100644 index d90b316c..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD10.dpk deleted file mode 100644 index 2d3d8196..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD10.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxSSLnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxSpreadSheetD10, - dxPSCoreD10; - -contains - dxPScxSSLnkReg, - dxPScxSSLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD10.res deleted file mode 100644 index feff5616..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD11.dpk deleted file mode 100644 index 17890164..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD11.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxSSLnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxSpreadSheetD11, - dxPSCoreD11; - -contains - dxPScxSSLnkReg, - dxPScxSSLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD11.res deleted file mode 100644 index d4043f91..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD12.dpk deleted file mode 100644 index 4fdda120..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD12.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxSSLnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxSpreadSheetD12, - dxPSCoreD12; - -contains - dxPScxSSLnkReg, - dxPScxSSLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD12.res deleted file mode 100644 index 55404363..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD14.dpk deleted file mode 100644 index 45879d7b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD14.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxSSLnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxSpreadSheetD14, - dxPSCoreD14; - -contains - dxPScxSSLnkReg, - dxPScxSSLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD14.res deleted file mode 100644 index e0d61537..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD5.dpk deleted file mode 100644 index a4b8137a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD5.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPScxSSLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - cxSpreadSheetVCLD5, - dxPSCoreD5; - -contains - dxPScxSSLnkReg, - dxPScxSSLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD5.res deleted file mode 100644 index 64cdef68..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD6.dpk deleted file mode 100644 index 4ce72573..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxSSLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxSpreadSheetVCLD6, - dxPSCoreD6; - -contains - dxPScxSSLnkReg, - dxPScxSSLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD6.res deleted file mode 100644 index 1c53f6b7..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD7.dpk deleted file mode 100644 index 244a4c04..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxSSLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxSpreadSheetVCLD7, - dxPSCoreD7; - -contains - dxPScxSSLnkReg, - dxPScxSSLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD7.res deleted file mode 100644 index 7b2e0751..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD9.dpk deleted file mode 100644 index 03229620..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD9.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPScxSSLnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxSpreadSheetD9, - dxPSCoreD9; - -contains - dxPScxSSLnkReg, - dxPScxSSLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD9.res deleted file mode 100644 index a6f35474..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSSLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC10.bpk deleted file mode 100644 index 27ffc188..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC10.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxScheduler2LnkC10.bpl -OBJFILES = dxPScxScheduler2LnkC10.obj dxPScxScheduler2Lnk.obj dxPScxScheduler2LnkReg.obj -RESFILES = dxPScxScheduler2LnkC10.res -MAINSOURCE = dxPScxScheduler2LnkC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC10.bpi dxPSCoreC10.bpi dcldxPSCoreC10.bpi \ - cxDataC10.bpi dclcxLibraryC10.bpi cxLibraryC10.bpi dclcxEditorsC10.bpi \ - cxEditorsC10.bpi cxSchedulerC10.bpi dxThemeC10.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib CXLIBRARYC10.lib CXEDITORSC10.lib CXSCHEDULERC10.lib \ - DXPSCOREC10.lib dxPScxCommonC10.lib dclcxLibraryC10.lib dcldxPSCoreC10.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressScheduler 2 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC10.cpp deleted file mode 100644 index 2ecf4535..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC10.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxScheduler2LnkC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEUNIT("dxPScxScheduler2LnkReg.pas"); -USEFORMNS("dxPScxScheduler2Lnk.pas", Dxpscxscheduler2lnk, dxfmSchedulerReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC10.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("cxSchedulerC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("dclcxEditorsC10.bpi"); -USEPACKAGE("dclcxLibraryC10.bpi"); -USEPACKAGE("CXLIBRARYC10.bpi"); -USEPACKAGE("dxPScxCommonC10.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC10.res deleted file mode 100644 index 26ef6b08..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC11.bpk deleted file mode 100644 index 1e5d3d9b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC11.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxScheduler2LnkC11.bpl -OBJFILES = dxPScxScheduler2LnkC11.obj dxPScxScheduler2Lnk.obj dxPScxScheduler2LnkReg.obj -RESFILES = dxPScxScheduler2LnkC11.res -MAINSOURCE = dxPScxScheduler2LnkC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC11.bpi dxPSCoreC11.bpi dcldxPSCoreC11.bpi \ - cxDataC11.bpi dclcxLibraryC11.bpi cxLibraryC11.bpi dclcxEditorsC11.bpi \ - cxEditorsC11.bpi cxSchedulerC11.bpi dxThemeC11.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib CXLIBRARYC11.lib CXEDITORSC11.lib CXSCHEDULERC11.lib \ - DXPSCOREC11.lib dxPScxCommonC11.lib dclcxLibraryC11.lib dcldxPSCoreC11.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressScheduler 2 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC11.cpp deleted file mode 100644 index a23bdf97..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC11.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxScheduler2LnkC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEUNIT("dxPScxScheduler2LnkReg.pas"); -USEFORMNS("dxPScxScheduler2Lnk.pas", Dxpscxscheduler2lnk, dxfmSchedulerReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC11.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("cxSchedulerC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("dclcxEditorsC11.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEPACKAGE("CXLIBRARYC11.bpi"); -USEPACKAGE("dxPScxCommonC11.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC11.res deleted file mode 100644 index c7e50813..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC5.bpk deleted file mode 100644 index b9b86b38..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC5.bpk +++ /dev/null @@ -1,177 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxScheduler2LnkC5.bpl -OBJFILES = dxPScxScheduler2LnkReg.obj dxPScxScheduler2Lnk.obj dxPScxScheduler2LnkC5.obj -RESFILES = dxPScxScheduler2LnkC5.res -MAINSOURCE = dxPScxScheduler2LnkC5.cpp -RESDEPEN = $(RESFILES) dxPScxScheduler2Lnk.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = vcl50.bpi dcldxPSCorec5.bpi dxPSCorec5.bpi cxSchedulerC5.bpi dsnide50.bpi \ - cxDataC5.bpi dxThemeC5.bpi cxEditorsC5.bpi \ - dclcxEditorsC5.bpi dclcxLibraryVCLC5.bpi \ - CXLIBRARYVCLC5.bpi dxPScxCommonC5.bpi -SPARELIBS = Vcl50.lib CXLIBRARYVCLC5.lib CXEDITORSC5.lib CXSCHEDULERC5.lib \ - DXPSCOREC5.lib dxPScxCommonC5.lib dclcxLibraryVCLC5.lib dcldxPSCorec5.lib -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressScheduler 2 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC5.cpp deleted file mode 100644 index 2e6d512c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC5.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxPScxScheduler2LnkC5.res"); -USEPACKAGE("vcl50.bpi"); -USEUNIT("dxPScxScheduler2LnkReg.pas"); -USEFORMNS("dxPScxScheduler2Lnk.pas", Dxpscxscheduler2lnk, dxfmSchedulerReportLinkDesignWindow); -USEPACKAGE("dcldxPSCorec5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("cxSchedulerC5.bpi"); -USEPACKAGE("dsnide50.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEPACKAGE("dxThemeC5.bpi"); -USEPACKAGE("cxEditorsC5.bpi"); -USEPACKAGE("dclcxEditorsC5.bpi"); -USEPACKAGE("dclcxLibraryVCLC5.bpi"); -USEPACKAGE("CXLIBRARYVCLC5.bpi"); -USEPACKAGE("dxPScxCommonC5.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC5.res deleted file mode 100644 index 220aa8c3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC6.bpk deleted file mode 100644 index 0addbf0d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC6.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxScheduler2LnkC6.bpl -OBJFILES = dxPScxScheduler2LnkC6.obj dxPScxScheduler2Lnk.obj dxPScxScheduler2LnkReg.obj - -RESFILES = dxPScxScheduler2LnkC6.res -MAINSOURCE = dxPScxScheduler2LnkC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC6.bpi dxPSCoreC6.bpi dcldxPSCoreC6.bpi \ - cxDataC6.bpi dclcxLibraryVCLC6.bpi cxLibraryVCLC6.bpi dclcxEditorsVCLC6.bpi \ - cxEditorsVCLC6.bpi cxSchedulerVCLC6.bpi dxThemeC6.bpi dxCoreC6.bpi -SPARELIBS = rtl.lib CXLIBRARYVCLC6.lib CXEDITORSVCLC6.lib CXSCHEDULERVCLC6.lib \ - DXPSCOREC6.lib dxPScxCommonC6.lib dclcxLibraryVCLC6.lib dcldxPSCorec6.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressScheduler 2 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC6.cpp deleted file mode 100644 index a80415a1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC6.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxScheduler2LnkC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEUNIT("dxPScxScheduler2LnkReg.pas"); -USEFORMNS("dxPScxScheduler2Lnk.pas", Dxpscxscheduler2lnk, dxfmSchedulerReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("cxSchedulerVCLC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("dclcxEditorsVCLC6.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEPACKAGE("CXLIBRARYVCLC6.bpi"); -USEPACKAGE("dxPScxCommonC6.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - \ No newline at end of file diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC6.res deleted file mode 100644 index 5824ac0a..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD10.dpk deleted file mode 100644 index b6388298..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD10.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxScheduler2LnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD10, - dcldxPSCoreD10, - dxPScxCommonD10, - cxLibraryD10, - dclcxLibraryD10, - cxSchedulerD10; - -contains - dxPScxScheduler2Lnk, - dxPScxScheduler2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD10.res deleted file mode 100644 index 271a0fa6..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD11.dpk deleted file mode 100644 index 85024d53..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD11.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxScheduler2LnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD11, - dcldxPSCoreD11, - dxPScxCommonD11, - cxLibraryD11, - dclcxLibraryD11, - cxSchedulerD11; - -contains - dxPScxScheduler2Lnk, - dxPScxScheduler2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD11.res deleted file mode 100644 index 901f6edb..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD5.dpk deleted file mode 100644 index dad710a1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD5.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package dxPScxScheduler2LnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dcldxPSCoreD5, - dxPScxCommonD5, - cxLibraryVCLD5, - dclcxLibraryVCLD5, - cxSchedulerD5; - -contains - dxPScxScheduler2Lnk, - dxPScxScheduler2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD5.res deleted file mode 100644 index f6c8a32b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD6.dpk deleted file mode 100644 index cc2d5c8d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD6.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxScheduler2LnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD6, - dcldxPSCoreD6, - dxPScxCommonD6, - cxLibraryVCLD6, - dclcxLibraryVCLD6, - cxSchedulerVCLD6; - -contains - dxPScxScheduler2Lnk, - dxPScxScheduler2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD6.res deleted file mode 100644 index 6453cb73..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD7.dpk deleted file mode 100644 index 40da5cd3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD7.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxScheduler2LnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD7, - dcldxPSCoreD7, - dxPScxCommonD7, - cxLibraryVCLD7, - dclcxLibraryVCLD7, - cxSchedulerVCLD7; - -contains - dxPScxScheduler2Lnk, - dxPScxScheduler2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD7.res deleted file mode 100644 index ca68a2ff..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD9.dpk deleted file mode 100644 index 26b2bb16..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD9.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxScheduler2LnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 2 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD9, - dcldxPSCoreD9, - dxPScxCommonD9, - cxLibraryD9, - dclcxLibraryD9, - cxSchedulerD9; - -contains - dxPScxScheduler2Lnk, - dxPScxScheduler2LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD9.res deleted file mode 100644 index 348023c9..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler2LnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC10.bpk deleted file mode 100644 index 62b135c4..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC10.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxScheduler3LnkC10.bpl -OBJFILES = dxPScxScheduler3LnkC10.obj dxPScxScheduler3Lnk.obj dxPScxScheduler3LnkReg.obj -RESFILES = dxPScxScheduler3LnkC10.res -MAINSOURCE = dxPScxScheduler3LnkC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC10.bpi dxPSCoreC10.bpi dcldxPSCoreC10.bpi \ - cxDataC10.bpi dclcxLibraryC10.bpi cxLibraryC10.bpi dclcxEditorsC10.bpi \ - cxEditorsC10.bpi cxSchedulerC10.bpi dxThemeC10.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib CXLIBRARYC10.lib CXEDITORSC10.lib CXSCHEDULERC10.lib \ - DXPSCOREC10.lib dxPScxCommonC10.lib dclcxLibraryC10.lib dcldxPSCoreC10.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressScheduler 3 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC10.cpp deleted file mode 100644 index 85c76656..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC10.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxScheduler3LnkC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxPScxScheduler3LnkReg.pas"); -USEFORMNS("dxPScxScheduler3Lnk.pas", Dxpscxscheduler3lnk, dxfmSchedulerReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC10.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("cxSchedulerC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("dclcxEditorsC10.bpi"); -USEPACKAGE("dclcxLibraryC10.bpi"); -USEPACKAGE("CXLIBRARYC10.bpi"); -USEPACKAGE("dxPScxCommonC10.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC10.res deleted file mode 100644 index ce42e61b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC11.bpk deleted file mode 100644 index 3d5462f7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC11.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxScheduler3LnkC11.bpl -OBJFILES = dxPScxScheduler3LnkC11.obj dxPScxScheduler3Lnk.obj dxPScxScheduler3LnkReg.obj -RESFILES = dxPScxScheduler3LnkC11.res -MAINSOURCE = dxPScxScheduler3LnkC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC11.bpi dxPSCoreC11.bpi dcldxPSCoreC11.bpi \ - cxDataC11.bpi dclcxLibraryC11.bpi cxLibraryC11.bpi dclcxEditorsC11.bpi \ - cxEditorsC11.bpi cxSchedulerC11.bpi dxThemeC11.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib CXLIBRARYC11.lib CXEDITORSC11.lib CXSCHEDULERC11.lib \ - DXPSCOREC11.lib dxPScxCommonC11.lib dclcxLibraryC11.lib dcldxPSCoreC11.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressScheduler 3 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC11.cpp deleted file mode 100644 index da1ff66a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC11.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxScheduler3LnkC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxPScxScheduler3LnkReg.pas"); -USEFORMNS("dxPScxScheduler3Lnk.pas", Dxpscxscheduler3lnk, dxfmSchedulerReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC11.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("cxSchedulerC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("dclcxEditorsC11.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEPACKAGE("CXLIBRARYC11.bpi"); -USEPACKAGE("dxPScxCommonC11.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC11.res deleted file mode 100644 index ad1f0346..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC12.bpk deleted file mode 100644 index 7f8eac33..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC12.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxScheduler3LnkC12.bpl -OBJFILES = dxPScxScheduler3LnkC12.obj dxPScxScheduler3Lnk.obj dxPScxScheduler3LnkReg.obj -RESFILES = dxPScxScheduler3LnkC12.res -MAINSOURCE = dxPScxScheduler3LnkC12.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC12.bpi dxPSCoreC12.bpi dcldxPSCoreC12.bpi \ - cxDataC12.bpi dclcxLibraryC12.bpi cxLibraryC12.bpi dclcxEditorsC12.bpi \ - cxEditorsC12.bpi cxSchedulerC12.bpi dxThemeC12.bpi dxCoreC12.bpi -SPARELIBS = rtl.lib CXLIBRARYC12.lib CXEDITORSC12.lib CXSCHEDULERC12.lib \ - DXPSCOREC12.lib dxPScxCommonC12.lib dclcxLibraryC12.lib dcldxPSCoreC12.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressScheduler 3 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC12.cpp deleted file mode 100644 index 4de23f08..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC12.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxScheduler3LnkC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxPScxScheduler3LnkReg.pas"); -USEFORMNS("dxPScxScheduler3Lnk.pas", Dxpscxscheduler3lnk, dxfmSchedulerReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC12.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("cxSchedulerC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("dclcxEditorsC12.bpi"); -USEPACKAGE("dclcxLibraryC12.bpi"); -USEPACKAGE("CXLIBRARYC12.bpi"); -USEPACKAGE("dxPScxCommonC12.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC12.res deleted file mode 100644 index bf7586c8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC14.bpk deleted file mode 100644 index 393d6cc6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC14.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxScheduler3LnkC14.bpl -OBJFILES = dxPScxScheduler3LnkC14.obj dxPScxScheduler3Lnk.obj dxPScxScheduler3LnkReg.obj -RESFILES = dxPScxScheduler3LnkC14.res -MAINSOURCE = dxPScxScheduler3LnkC14.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC14.bpi dxPSCoreC14.bpi dcldxPSCoreC14.bpi \ - cxDataC14.bpi dclcxLibraryC14.bpi cxLibraryC14.bpi dclcxEditorsC14.bpi \ - cxEditorsC14.bpi cxSchedulerC14.bpi dxThemeC14.bpi dxCoreC14.bpi -SPARELIBS = rtl.lib CXLIBRARYC14.lib CXEDITORSC14.lib CXSCHEDULERC14.lib \ - DXPSCOREC14.lib dxPScxCommonC14.lib dclcxLibraryC14.lib dcldxPSCoreC14.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressScheduler 3 by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC14.cpp deleted file mode 100644 index 618cfd6b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC14.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxScheduler3LnkC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxPScxScheduler3LnkReg.pas"); -USEFORMNS("dxPScxScheduler3Lnk.pas", Dxpscxscheduler3lnk, dxfmSchedulerReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC14.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("cxSchedulerC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("dclcxEditorsC14.bpi"); -USEPACKAGE("dclcxLibraryC14.bpi"); -USEPACKAGE("CXLIBRARYC14.bpi"); -USEPACKAGE("dxPScxCommonC14.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC14.res deleted file mode 100644 index effe7a3f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD10.dpk deleted file mode 100644 index 64adbe5b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD10.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxScheduler3LnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 3 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD10, - dcldxPSCoreD10, - dxPScxCommonD10, - cxLibraryD10, - dclcxLibraryD10, - cxSchedulerD10; - -contains - dxPScxScheduler3Lnk, - dxPScxScheduler3LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD10.res deleted file mode 100644 index 0a13bb42..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD11.dpk deleted file mode 100644 index 0aa24e67..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD11.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxScheduler3LnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 3 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD11, - dcldxPSCoreD11, - dxPScxCommonD11, - cxLibraryD11, - dclcxLibraryD11, - cxSchedulerD11; - -contains - dxPScxScheduler3Lnk, - dxPScxScheduler3LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD11.res deleted file mode 100644 index 625b5e34..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD12.dpk deleted file mode 100644 index 6b51e9b7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD12.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dxPScxScheduler3LnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 3 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dcldxPSCoreD12, - dxPScxCommonD12, - dclcxLibraryD12, - cxSchedulerD12; - -contains - dxPScxScheduler3Lnk, - dxPScxScheduler3LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD12.res deleted file mode 100644 index 73512e7f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD14.dpk deleted file mode 100644 index 3c06e833..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD14.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dxPScxScheduler3LnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 3 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dcldxPSCoreD14, - dxPScxCommonD14, - dclcxLibraryD14, - cxSchedulerD14; - -contains - dxPScxScheduler3Lnk, - dxPScxScheduler3LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD14.res deleted file mode 100644 index 2f2752f1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD7.dpk deleted file mode 100644 index ce593297..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD7.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxScheduler3LnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 3 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD7, - dcldxPSCoreD7, - dxPScxCommonD7, - cxLibraryVCLD7, - dclcxLibraryVCLD7, - cxSchedulerD7; - -contains - dxPScxScheduler3Lnk, - dxPScxScheduler3LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD7.res deleted file mode 100644 index b3274f32..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD9.dpk deleted file mode 100644 index a0a2b9c6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD9.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxScheduler3LnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler 3 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD9, - dcldxPSCoreD9, - dxPScxCommonD9, - cxLibraryD9, - dclcxLibraryD9, - cxSchedulerD9; - -contains - dxPScxScheduler3Lnk, - dxPScxScheduler3LnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD9.res deleted file mode 100644 index 5c406e1b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxScheduler3LnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC5.bpk deleted file mode 100644 index 9b2c0450..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC5.bpk +++ /dev/null @@ -1,177 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxSchedulerLnkC5.bpl -OBJFILES = dxPScxSchedulerLnkReg.obj dxPScxSchedulerLnk.obj dxPScxSchedulerLnkC5.obj -RESFILES = dxPScxSchedulerLnkC5.res -MAINSOURCE = dxPScxSchedulerLnkC5.cpp -RESDEPEN = $(RESFILES) dxPScxSchedulerLnk.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = vcl50.bpi dcldxPSCorec5.bpi dxPSCorec5.bpi cxSchedulerC5.bpi dsnide50.bpi \ - cxDataC5.bpi dxThemeC5.bpi cxEditorsC5.bpi \ - dclcxEditorsC5.bpi dclcxLibraryVCLC5.bpi \ - CXLIBRARYVCLC5.bpi dxPScxCommonC5.bpi -SPARELIBS = Vcl50.lib CXLIBRARYVCLC5.lib CXEDITORSC5.lib CXSCHEDULERC5.lib \ - DXPSCOREC5.lib dxPScxCommonC5.lib dclcxLibraryVCLC5.lib dcldxPSCorec5.lib -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressScheduler by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC5.cpp deleted file mode 100644 index 03ea6e39..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC5.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxPScxSchedulerLnkC5.res"); -USEPACKAGE("vcl50.bpi"); -USEUNIT("dxPScxSchedulerLnkReg.pas"); -USEFORMNS("dxPScxSchedulerLnk.pas", Dxpscxschedulerlnk, dxfmSchedulerReportLinkDesignWindow); -USEPACKAGE("dcldxPSCorec5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("cxSchedulerC5.bpi"); -USEPACKAGE("dsnide50.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEPACKAGE("dxThemeC5.bpi"); -USEPACKAGE("cxEditorsC5.bpi"); -USEPACKAGE("dclcxEditorsC5.bpi"); -USEPACKAGE("dclcxLibraryVCLC5.bpi"); -USEPACKAGE("CXLIBRARYVCLC5.bpi"); -USEPACKAGE("dxPScxCommonC5.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC5.res deleted file mode 100644 index 3a8c96a3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC6.bpk deleted file mode 100644 index 7b654f02..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC6.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxSchedulerLnkC6.bpl -OBJFILES = dxPScxSchedulerLnkC6.obj dxPScxSchedulerLnk.obj dxPScxSchedulerLnkReg.obj - -RESFILES = dxPScxSchedulerLnkC6.res -MAINSOURCE = dxPScxSchedulerLnkC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi designide.bpi vcl.bpi dxPScxCommonC6.bpi dxPSCoreC6.bpi dcldxPSCoreC6.bpi \ - cxDataC6.bpi dclcxLibraryVCLC6.bpi cxLibraryVCLC6.bpi dclcxEditorsVCLC6.bpi \ - cxEditorsVCLC6.bpi cxSchedulerVCLC6.bpi dxThemeC6.bpi dxCoreC6.bpi -SPARELIBS = rtl.lib CXLIBRARYVCLC6.lib CXEDITORSVCLC6.lib CXSCHEDULERVCLC6.lib \ - DXPSCOREC6.lib dxPScxCommonC6.lib dclcxLibraryVCLC6.lib dcldxPSCorec6.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressScheduler by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC6.cpp deleted file mode 100644 index 92fcd92f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC6.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -#pragma package(smart_init) - -USERES("dxPScxSchedulerLnkC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEUNIT("dxPScxSchedulerLnkReg.pas"); -USEFORMNS("dxPScxSchedulerLnk.pas", Dxpscxschedulerlnk, dxfmSchedulerReportLinkDesignWindow); -USEPACKAGE("dcldxPSCoreC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("cxSchedulerVCLC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("dclcxEditorsVCLC6.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEPACKAGE("CXLIBRARYVCLC6.bpi"); -USEPACKAGE("dxPScxCommonC6.bpi"); - -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- - \ No newline at end of file diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC6.res deleted file mode 100644 index 6651a72f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD5.dpk deleted file mode 100644 index 747fe797..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD5.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package dxPScxSchedulerLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dcldxPSCoreD5, - dxPScxCommonD5, - cxLibraryVCLD5, - dclcxLibraryVCLD5, - cxSchedulerD5; - -contains - dxPScxSchedulerLnk, - dxPScxSchedulerLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD5.res deleted file mode 100644 index 9905bac3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD6.dpk deleted file mode 100644 index 7269f532..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD6.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxSchedulerLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD6, - dcldxPSCoreD6, - dxPScxCommonD6, - cxLibraryVCLD6, - dclcxLibraryVCLD6, - cxSchedulerVCLD6; - -contains - dxPScxSchedulerLnk, - dxPScxSchedulerLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD6.res deleted file mode 100644 index 7e0d4a79..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD7.dpk deleted file mode 100644 index 6ec1cd37..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD7.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxSchedulerLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD7, - dcldxPSCoreD7, - dxPScxCommonD7, - cxLibraryVCLD7, - dclcxLibraryVCLD7, - cxSchedulerVCLD7; - -contains - dxPScxSchedulerLnk, - dxPScxSchedulerLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD7.res deleted file mode 100644 index d6d393cb..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD9.dpk deleted file mode 100644 index 4622b11d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD9.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxSchedulerLnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressScheduler by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD9, - dcldxPSCoreD9, - dxPScxCommonD9, - cxLibraryD9, - dclcxLibraryD9, - cxSchedulerD9; - -contains - dxPScxSchedulerLnk, - dxPScxSchedulerLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD9.res deleted file mode 100644 index f2653fae..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxSchedulerLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC12.bpk deleted file mode 100644 index 16a8b4ee..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC12.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxTL5LnkC12.bpl -OBJFILES = dxPScxTL5Lnk.obj dxPScxTL5LnkPredefinedStyleSheets.obj dxPScxTL5LnkReg.obj dxPScxTL5LnkC12.obj -MAINSOURCE = dxPScxTL5LnkC12.cpp -RESFILES = dxPScxTL5LnkC12.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxTL5Lnk.dfm dxPScxTL5LnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi dxPSLnksC12.bpi cxLibraryC12.bpi cxDataC12.bpi \ - cxEditorsC12.bpi cxTreeListC12.bpi dclcxLibraryC12.bpi \ - rtl.bpi vcl.bpi designide.bpi dxPScxCommonC12.bpi dxThemeC12.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumTreeList 5 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC12.cpp deleted file mode 100644 index 5232632f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC12.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USERES("dxPScxTL5LnkC12.res"); -USEPACKAGE("dxPSLnksC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("cxTreeListC12.bpi"); -USEPACKAGE("dclcxLibraryC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPScxCommonC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEUNIT("dxPScxTL5Lnk.pas"); -USEUNIT("dxPScxTL5LnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxTL5LnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC12.res deleted file mode 100644 index a832668e..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC14.bpk deleted file mode 100644 index 9a45211f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC14.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxTL5LnkC14.bpl -OBJFILES = dxPScxTL5Lnk.obj dxPScxTL5LnkPredefinedStyleSheets.obj dxPScxTL5LnkReg.obj dxPScxTL5LnkC14.obj -MAINSOURCE = dxPScxTL5LnkC14.cpp -RESFILES = dxPScxTL5LnkC14.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxTL5Lnk.dfm dxPScxTL5LnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi dxPSLnksC14.bpi cxLibraryC14.bpi cxDataC14.bpi \ - cxEditorsC14.bpi cxTreeListC14.bpi dclcxLibraryC14.bpi \ - rtl.bpi vcl.bpi designide.bpi dxPScxCommonC14.bpi dxThemeC14.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumTreeList 5 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC14.cpp deleted file mode 100644 index f5270b5d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC14.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USERES("dxPScxTL5LnkC14.res"); -USEPACKAGE("dxPSLnksC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("cxTreeListC14.bpi"); -USEPACKAGE("dclcxLibraryC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPScxCommonC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEUNIT("dxPScxTL5Lnk.pas"); -USEUNIT("dxPScxTL5LnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxTL5LnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC14.res deleted file mode 100644 index f297bc51..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD10.dpk deleted file mode 100644 index a197779b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD10.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxTL5LnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD10, - dxPScxCommonD10, - cxLibraryD10, - dclcxLibraryD10, - cxTreeListD10; - -contains - dxPScxTL5Lnk, - dxPScxTL5LnkReg, - dxPScxTL5LnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD10.res deleted file mode 100644 index 092e39ab..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD11.dpk deleted file mode 100644 index 531d6c16..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD11.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxTL5LnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD11, - dxPScxCommonD11, - cxLibraryD11, - dclcxLibraryD11, - cxTreeListD11; - -contains - dxPScxTL5Lnk, - dxPScxTL5LnkReg, - dxPScxTL5LnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD11.res deleted file mode 100644 index daeddd3d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD12.dpk deleted file mode 100644 index ee0b781a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD12.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxTL5LnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD12, - dxPScxCommonD12, - cxLibraryD12, - dclcxLibraryD12, - cxTreeListD12; - -contains - dxPScxTL5Lnk, - dxPScxTL5LnkReg, - dxPScxTL5LnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD12.res deleted file mode 100644 index 582f97a8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD14.dpk deleted file mode 100644 index 1337af40..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD14.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxTL5LnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD14, - dxPScxCommonD14, - cxLibraryD14, - dclcxLibraryD14, - cxTreeListD14; - -contains - dxPScxTL5Lnk, - dxPScxTL5LnkReg, - dxPScxTL5LnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD14.res deleted file mode 100644 index a7ee0cb0..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD7.dpk deleted file mode 100644 index d60aace9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD7.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxTL5LnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD7, - dxPScxCommonD7, - cxLibraryVCLD7, - dclcxLibraryVCLD7, - cxTreeListD7; - -contains - dxPScxTL5Lnk, - dxPScxTL5LnkReg, - dxPScxTL5LnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD7.res deleted file mode 100644 index b8d420eb..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD9.dpk deleted file mode 100644 index f049d606..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD9.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxTL5LnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 5 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD9, - dxPScxCommonD9, - cxLibraryD9, - dclcxLibraryD9, - cxTreeListD9; - -contains - dxPScxTL5Lnk, - dxPScxTL5LnkReg, - dxPScxTL5LnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD9.res deleted file mode 100644 index 2ad656fe..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTL5LnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC10.bpk deleted file mode 100644 index f7f44fae..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC10.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxTLLnkC10.bpl -OBJFILES = dxPScxTLLnk.obj dxPScxTLLnkPredefinedStyleSheets.obj dxPScxTLLnkReg.obj dxPScxTLLnkC10.obj -MAINSOURCE = dxPScxTLLnkC10.cpp -RESFILES = dxPScxTLLnkC10.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxTLLnk.dfm dxPScxTLLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi dxPSLnksC10.bpi cxLibraryC10.bpi cxDataC10.bpi \ - cxEditorsC10.bpi cxTreeListC10.bpi dclcxLibraryC10.bpi \ - rtl.bpi vcl.bpi designide.bpi dxPScxCommonC10.bpi dxThemeC10.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC10.cpp deleted file mode 100644 index 09cc7e6b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC10.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USERES("dxPScxTLLnkC10.res"); -USEPACKAGE("dxPSLnksC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("cxTreeListC10.bpi"); -USEPACKAGE("dclcxLibraryC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPScxCommonC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEUNIT("dxPScxTLLnk.pas"); -USEUNIT("dxPScxTLLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxTLLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC10.res deleted file mode 100644 index aeb28257..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC11.bpk deleted file mode 100644 index ade2131c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC11.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxTLLnkC11.bpl -OBJFILES = dxPScxTLLnk.obj dxPScxTLLnkPredefinedStyleSheets.obj dxPScxTLLnkReg.obj dxPScxTLLnkC11.obj -MAINSOURCE = dxPScxTLLnkC11.cpp -RESFILES = dxPScxTLLnkC11.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxTLLnk.dfm dxPScxTLLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi dxPSLnksC11.bpi cxLibraryC11.bpi cxDataC11.bpi \ - cxEditorsC11.bpi cxTreeListC11.bpi dclcxLibraryC11.bpi \ - rtl.bpi vcl.bpi designide.bpi dxPScxCommonC11.bpi dxThemeC11.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC11.cpp deleted file mode 100644 index 2c6637e9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC11.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USERES("dxPScxTLLnkC11.res"); -USEPACKAGE("dxPSLnksC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("cxTreeListC11.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPScxCommonC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEUNIT("dxPScxTLLnk.pas"); -USEUNIT("dxPScxTLLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxTLLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC11.res deleted file mode 100644 index a887a8d8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC12.bpk deleted file mode 100644 index 905822c9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC12.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxTLLnkC12.bpl -OBJFILES = dxPScxTLLnk.obj dxPScxTLLnkPredefinedStyleSheets.obj dxPScxTLLnkReg.obj dxPScxTLLnkC12.obj -MAINSOURCE = dxPScxTLLnkC12.cpp -RESFILES = dxPScxTLLnkC12.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxTLLnk.dfm dxPScxTLLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi dxPSLnksC12.bpi cxLibraryC12.bpi cxDataC12.bpi \ - cxEditorsC12.bpi cxTreeListC12.bpi dclcxLibraryC12.bpi \ - rtl.bpi vcl.bpi designide.bpi dxPScxCommonC12.bpi dxThemeC12.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC12.cpp deleted file mode 100644 index a1a898fc..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC12.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USERES("dxPScxTLLnkC12.res"); -USEPACKAGE("dxPSLnksC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("cxTreeListC12.bpi"); -USEPACKAGE("dclcxLibraryC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPScxCommonC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEUNIT("dxPScxTLLnk.pas"); -USEUNIT("dxPScxTLLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxTLLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC12.res deleted file mode 100644 index 30fca65a..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC14.bpk deleted file mode 100644 index fda42a67..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC14.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxTLLnkC14.bpl -OBJFILES = dxPScxTLLnk.obj dxPScxTLLnkPredefinedStyleSheets.obj dxPScxTLLnkReg.obj dxPScxTLLnkC14.obj -MAINSOURCE = dxPScxTLLnkC14.cpp -RESFILES = dxPScxTLLnkC14.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxTLLnk.dfm dxPScxTLLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi dxPSLnksC14.bpi cxLibraryC14.bpi cxDataC14.bpi \ - cxEditorsC14.bpi cxTreeListC14.bpi dclcxLibraryC14.bpi \ - rtl.bpi vcl.bpi designide.bpi dxPScxCommonC14.bpi dxThemeC14.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC14.cpp deleted file mode 100644 index 9a7d0ed7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC14.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USERES("dxPScxTLLnkC14.res"); -USEPACKAGE("dxPSLnksC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("cxTreeListC14.bpi"); -USEPACKAGE("dclcxLibraryC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPScxCommonC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEUNIT("dxPScxTLLnk.pas"); -USEUNIT("dxPScxTLLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxTLLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC14.res deleted file mode 100644 index df61f09b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC5.bpk deleted file mode 100644 index 515922bb..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC5.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxTLLnkC5.bpl -OBJFILES = dxPScxTLLnk.obj dxPScxTLLnkPredefinedStyleSheets.obj dxPScxTLLnkReg.obj dxPScxTLLnkC5.obj -RESFILES = dxPScxTLLnkC5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxTLLnk.dfm dxPScxTLLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCoreC5.bpi dxPSLnksC5.bpi cxLibraryVCLC5.bpi cxDataC5.bpi cxEditorsC5.bpi \ - cxTreeListC5.bpi dclcxLibraryVCLC5.bpi vcl50.bpi dxPScxCommonC5.bpi dxThemeC5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC5.cpp deleted file mode 100644 index 97fa00b0..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC5.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("dxPSCoreC5.bpi"); -USERES("dxPScxTLLnkC5.res"); -USEPACKAGE("dxPSLnksC5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEPACKAGE("cxEditorsC5.bpi"); -USEPACKAGE("cxTreeListC5.bpi"); -USEPACKAGE("dclcxLibraryVCLC5.bpi"); -USEPACKAGE("dxPScxCommonC5.bpi"); -USEPACKAGE("dxThemeC5.bpi"); -USEUNIT("dxPScxTLLnk.pas"); -USEUNIT("dxPScxTLLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxTLLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC5.res deleted file mode 100644 index fb416a12..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC6.bpk deleted file mode 100644 index 97b24d11..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC6.bpk +++ /dev/null @@ -1,173 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxTLLnkC6.bpl -OBJFILES = dxPScxTLLnk.obj dxPScxTLLnkPredefinedStyleSheets.obj dxPScxTLLnkReg.obj dxPScxTLLnkC6.obj -RESFILES = dxPScxTLLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxTLLnk.dfm dxPScxTLLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi dxPSLnksC6.bpi cxLibraryVCLC6.bpi cxDataC6.bpi \ - cxEditorsVCLC6.bpi cxTreeListVCLC6.bpi dclcxLibraryVCLC6.bpi \ - rtl.bpi vcl.bpi designide.bpi dxPScxCommonC6.bpi dxThemeC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC6.cpp deleted file mode 100644 index 1cd88c75..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC6.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USERES("dxPScxTLLnkC6.res"); -USEPACKAGE("dxPSLnksC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("cxTreeListVCLC6.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPScxCommonC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEUNIT("dxPScxTLLnk.pas"); -USEUNIT("dxPScxTLLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxTLLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC6.res deleted file mode 100644 index 9f99d5c0..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD10.dpk deleted file mode 100644 index e4adea99..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD10.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxTLLnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD10, - dxPScxCommonD10, - cxLibraryD10, - dclcxLibraryD10, - cxTreeListD10; - -contains - dxPScxTLLnk, - dxPScxTLLnkReg, - dxPScxTLLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD10.res deleted file mode 100644 index ecd1bad6..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD11.dpk deleted file mode 100644 index 351bdd41..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD11.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxTLLnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD11, - dxPScxCommonD11, - cxLibraryD11, - dclcxLibraryD11, - cxTreeListD11; - -contains - dxPScxTLLnk, - dxPScxTLLnkReg, - dxPScxTLLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD11.res deleted file mode 100644 index e357c3a7..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD12.dpk deleted file mode 100644 index ba279d79..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD12.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dxPScxTLLnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPScxCommonD12, - dclcxLibraryD12, - cxTreeListD12; - -contains - dxPScxTLLnk, - dxPScxTLLnkReg, - dxPScxTLLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD12.res deleted file mode 100644 index aa273099..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD14.dpk deleted file mode 100644 index 14cd063f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD14.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dxPScxTLLnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPScxCommonD14, - dclcxLibraryD14, - cxTreeListD14; - -contains - dxPScxTLLnk, - dxPScxTLLnkReg, - dxPScxTLLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD14.res deleted file mode 100644 index 9b7d75a0..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD9.dpk deleted file mode 100644 index 3c84372b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD9.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxTLLnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD9, - dxPScxCommonD9, - cxLibraryD9, - dclcxLibraryD9, - cxTreeListD9; - -contains - dxPScxTLLnk, - dxPScxTLLnkReg, - dxPScxTLLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD9.res deleted file mode 100644 index 9b318879..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxTLLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC10.bpk deleted file mode 100644 index 5f91b705..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC10.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxVGridLnkC10.bpl -OBJFILES = dxPScxVGridLnk.obj dxPScxVGridLnkPredefinedStyleSheets.obj \ - dxPScxVGridLnkReg.obj dxPScxVGridLnkC10.obj -MAINSOURCE = dxPScxVGridLnkC10.cpp -RESFILES = dxPScxVGridLnkC10.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxVGridLnk.dfm dxPScxVGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi dxPSLnksC10.bpi cxLibraryC10.bpi cxDataC10.bpi \ - dclcxLibraryC10.bpi cxVerticalGridC10.bpi cxEditorsC10.bpi \ - vcl.bpi rtl.bpi designide.bpi dxPScxCommonC10.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC10.cpp deleted file mode 100644 index f99bdbf3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC10.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USERES("dxPScxVGridLnkC10.res"); -USEPACKAGE("dxPSLnksC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("cxVerticalGridC10.bpi"); -USEPACKAGE("dclcxLibraryC10.bpi"); -USEPACKAGE("dxPScxCommonC10.bpi"); -USEUNIT("dxPScxVGridLnk.pas"); -USEUNIT("dxPScxVGridLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxVGridLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC10.res deleted file mode 100644 index 5d4bb226..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC11.bpk deleted file mode 100644 index d9038766..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC11.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxVGridLnkC11.bpl -OBJFILES = dxPScxVGridLnk.obj dxPScxVGridLnkPredefinedStyleSheets.obj \ - dxPScxVGridLnkReg.obj dxPScxVGridLnkC11.obj -MAINSOURCE = dxPScxVGridLnkC11.cpp -RESFILES = dxPScxVGridLnkC11.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxVGridLnk.dfm dxPScxVGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi dxPSLnksC11.bpi cxLibraryC11.bpi cxDataC11.bpi \ - dclcxLibraryC11.bpi cxVerticalGridC11.bpi cxEditorsC11.bpi \ - vcl.bpi rtl.bpi designide.bpi dxPScxCommonC11.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC11.cpp deleted file mode 100644 index 968bcad6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC11.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USERES("dxPScxVGridLnkC11.res"); -USEPACKAGE("dxPSLnksC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("cxVerticalGridC11.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEPACKAGE("dxPScxCommonC11.bpi"); -USEUNIT("dxPScxVGridLnk.pas"); -USEUNIT("dxPScxVGridLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxVGridLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC11.res deleted file mode 100644 index fee24a3e..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC12.bpk deleted file mode 100644 index 0441238e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC12.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxVGridLnkC12.bpl -OBJFILES = dxPScxVGridLnk.obj dxPScxVGridLnkPredefinedStyleSheets.obj \ - dxPScxVGridLnkReg.obj dxPScxVGridLnkC12.obj -MAINSOURCE = dxPScxVGridLnkC12.cpp -RESFILES = dxPScxVGridLnkC12.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxVGridLnk.dfm dxPScxVGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi dxPSLnksC12.bpi cxLibraryC12.bpi cxDataC12.bpi \ - dclcxLibraryC12.bpi cxVerticalGridC12.bpi cxEditorsC12.bpi \ - vcl.bpi rtl.bpi designide.bpi dxPScxCommonC12.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC12.cpp deleted file mode 100644 index a2a06194..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC12.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USERES("dxPScxVGridLnkC12.res"); -USEPACKAGE("dxPSLnksC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("cxVerticalGridC12.bpi"); -USEPACKAGE("dclcxLibraryC12.bpi"); -USEPACKAGE("dxPScxCommonC12.bpi"); -USEUNIT("dxPScxVGridLnk.pas"); -USEUNIT("dxPScxVGridLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxVGridLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC12.res deleted file mode 100644 index 48059d70..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC14.bpk deleted file mode 100644 index d00d966c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC14.bpk +++ /dev/null @@ -1,175 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxVGridLnkC14.bpl -OBJFILES = dxPScxVGridLnk.obj dxPScxVGridLnkPredefinedStyleSheets.obj \ - dxPScxVGridLnkReg.obj dxPScxVGridLnkC14.obj -MAINSOURCE = dxPScxVGridLnkC14.cpp -RESFILES = dxPScxVGridLnkC14.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxVGridLnk.dfm dxPScxVGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi dxPSLnksC14.bpi cxLibraryC14.bpi cxDataC14.bpi \ - dclcxLibraryC14.bpi cxVerticalGridC14.bpi cxEditorsC14.bpi \ - vcl.bpi rtl.bpi designide.bpi dxPScxCommonC14.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC14.cpp deleted file mode 100644 index 7c3ad510..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC14.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USERES("dxPScxVGridLnkC14.res"); -USEPACKAGE("dxPSLnksC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("cxVerticalGridC14.bpi"); -USEPACKAGE("dclcxLibraryC14.bpi"); -USEPACKAGE("dxPScxCommonC14.bpi"); -USEUNIT("dxPScxVGridLnk.pas"); -USEUNIT("dxPScxVGridLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxVGridLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC14.res deleted file mode 100644 index 2502498b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC5.bpk deleted file mode 100644 index dab40a79..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC5.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPScxVGridLnkC5.bpl -OBJFILES = dxPScxVGridLnk.obj dxPScxVGridLnkPredefinedStyleSheets.obj \ - dxPScxVGridLnkReg.obj dxPScxVGridLnkC5.obj -RESFILES = dxPScxVGridLnkC5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxVGridLnk.dfm dxPScxVGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCoreC5.bpi dxPSLnksC5.bpi cxLibraryVCLC5.bpi cxDataC5.bpi \ - dclcxLibraryVCLC5.bpi cxVerticalGridC5.bpi cxEditorsC5.bpi \ - dxPScxCommonC5.bpi vcl50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC5.cpp deleted file mode 100644 index c8ce1bb3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC5.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("dxPSCoreC5.bpi"); -USERES("dxPScxVGridLnkC5.res"); -USEPACKAGE("dxPSLnksC5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEPACKAGE("cxEditorsC5.bpi"); -USEPACKAGE("cxVerticalGridC5.bpi"); -USEPACKAGE("dclcxLibraryVCLC5.bpi"); -USEPACKAGE("dxPScxCommonC5.bpi"); -USEUNIT("dxPScxVGridLnk.pas"); -USEUNIT("dxPScxVGridLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxVGridLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC5.res deleted file mode 100644 index b96d4fb0..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC6.bpk deleted file mode 100644 index 69ef73cd..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC6.bpk +++ /dev/null @@ -1,174 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPScxVGridLnkC6.bpl -OBJFILES = dxPScxVGridLnk.obj dxPScxVGridLnkPredefinedStyleSheets.obj \ - dxPScxVGridLnkReg.obj dxPScxVGridLnkC6.obj -RESFILES = dxPScxVGridLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPScxVGridLnk.dfm dxPScxVGridLnkPredefinedStyleSheets.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi dxPSLnksC6.bpi cxLibraryVCLC6.bpi cxDataC6.bpi \ - dclcxLibraryVCLC6.bpi cxVerticalGridVCLC6.bpi cxEditorsVCLC6.bpi \ - vcl.bpi rtl.bpi designide.bpi dxPScxCommonC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC6.cpp deleted file mode 100644 index b49d333f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC6.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USERES("dxPScxVGridLnkC6.res"); -USEPACKAGE("dxPSLnksC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("cxVerticalGridVCLC6.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEPACKAGE("dxPScxCommonC6.bpi"); -USEUNIT("dxPScxVGridLnk.pas"); -USEUNIT("dxPScxVGridLnkPredefinedStyleSheets.pas"); -USEUNIT("dxPScxVGridLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC6.res deleted file mode 100644 index 91de6dcf..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD10.dpk deleted file mode 100644 index db69646c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD10.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxVGridLnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD10, - dxPScxCommonD10, - cxLibraryD10, - dclcxLibraryD10, - cxVerticalGridD10; - -contains - dxPScxVGridLnk, - dxPScxVGridLnkReg, - dxPScxVGridLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD10.res deleted file mode 100644 index 607a8a1c..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD11.dpk deleted file mode 100644 index e387c42a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD11.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxVGridLnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD11, - dxPScxCommonD11, - cxLibraryD11, - dclcxLibraryD11, - cxVerticalGridD11; - -contains - dxPScxVGridLnk, - dxPScxVGridLnkReg, - dxPScxVGridLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD11.res deleted file mode 100644 index 64dca4dd..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD12.dpk deleted file mode 100644 index 1950e2a3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD12.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package dxPScxVGridLnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPScxCommonD12, - dclcxLibraryD12, - cxVerticalGridD12; - -contains - dxPScxVGridLnk, - dxPScxVGridLnkReg, - dxPScxVGridLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD12.res deleted file mode 100644 index a15ce9cb..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD14.dpk deleted file mode 100644 index a524f9e2..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD14.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package dxPScxVGridLnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPScxCommonD14, - dclcxLibraryD14, - cxVerticalGridD14; - -contains - dxPScxVGridLnk, - dxPScxVGridLnkReg, - dxPScxVGridLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD14.res deleted file mode 100644 index e0a73d65..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD5.dpk deleted file mode 100644 index 1f124fb0..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD5.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package dxPScxVGridLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dxPScxCommonD5, - cxLibraryVCLD5, - dclcxLibraryVCLD5, - cxVerticalGridD5; - -contains - dxPScxVGridLnk, - dxPScxVGridLnkReg, - dxPScxVGridLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD5.res deleted file mode 100644 index aec4e163..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD6.dpk deleted file mode 100644 index 79924a90..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD6.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxVGridLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD6, - dxPScxCommonD6, - cxLibraryVCLD6, - dclcxLibraryVCLD6, - cxVerticalGridVCLD6; - -contains - dxPScxVGridLnk, - dxPScxVGridLnkReg, - dxPScxVGridLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD6.res deleted file mode 100644 index 955b9b7b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD7.dpk deleted file mode 100644 index 160b90ae..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD7.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxVGridLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD7, - dxPScxCommonD7, - cxLibraryVCLD7, - dclcxLibraryVCLD7, - cxVerticalGridVCLD7; - -contains - dxPScxVGridLnk, - dxPScxVGridLnkReg, - dxPScxVGridLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD7.res deleted file mode 100644 index 18bc27b0..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD9.dpk deleted file mode 100644 index cf5ce502..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD9.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxVGridLnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD9, - dxPScxCommonD9, - cxLibraryD9, - dclcxLibraryD9, - cxVerticalGridD9; - -contains - dxPScxVGridLnk, - dxPScxVGridLnkReg, - dxPScxVGridLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD9.res deleted file mode 100644 index bb7f1ccd..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPScxVGridLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC5.bpk deleted file mode 100644 index 7b50c27f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC5.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBCtrlLnkc5.bpl -OBJFILES = dxPSdxDBCtrlLnk.obj dxPSdxDBCtrlLnkc5.obj -RESFILES = dxPSdxDBCtrlLnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCorec5.bpi dxDBEdc5.bpi EQTLc5.bpi dxEdtrc5.bpi \ - vcl50.bpi vcldb50.bpi vclx50.bpi dxPSTLLnkc5.bpi ECQDBCC5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumDBControl by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -Gpr -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC5.cpp deleted file mode 100644 index 017d4fb5..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC5.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxcomnc5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("dxDBEdc5.bpi"); -USEPACKAGE("EQTLc5.bpi"); -USEPACKAGE("dxEdtrc5.bpi"); -USEPACKAGE("ECQDBCC5.bpi"); -USEPACKAGE("dxPSTLLnkc5.bpi"); -USERES("dxPSdxDBCtrlLnkc5.res"); -USEUNIT("dxPSdxDBCtrlLnk.pas"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vcldb50.bpi"); -USEPACKAGE("vclx50.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC5.res deleted file mode 100644 index f0edb346..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC6.bpk deleted file mode 100644 index ff2a64a9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC6.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBCtrlLnkC6.bpl -OBJFILES = dxPSdxDBCtrlLnk.obj dxPSdxDBCtrlLnkC6.obj -RESFILES = dxPSdxDBCtrlLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib cxLibraryVCLC6.lib -PACKAGES = dxPSCoreC6.bpi dxDBEdC6.bpi EQTLC6.bpi dxEdtrC6.bpi \ - rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi vclx.bpi dxPSTLLnkC6.bpi ECQDBCC6.bpi cxLibraryVCLC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumDBControl by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -Gpr -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC6.cpp deleted file mode 100644 index 4f7353c7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC6.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxcomnC6.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("dxDBEdC6.bpi"); -USEPACKAGE("EQTLC6.bpi"); -USEPACKAGE("dxEdtrC6.bpi"); -USEPACKAGE("ECQDBCC6.bpi"); -USEPACKAGE("dxPSTLLnkC6.bpi"); -USERES("dxPSdxDBCtrlLnkC6.res"); -USEUNIT("dxPSdxDBCtrlLnk.pas"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC6.res deleted file mode 100644 index 8000734b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD5.dpk deleted file mode 100644 index 5d786360..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD5.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dxPSdxDBCtrlLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumDBControl by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl50, - vcldb50, - dxPSCoreD5, - dxDBEdD5, - ECQDBCD5, - dxPSTLLnkD5; - -contains - dxPSdxDBCtrlLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD5.res deleted file mode 100644 index e8db2ec8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD6.dpk deleted file mode 100644 index 94f4b3f7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD6.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dxPSdxDBCtrlLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumDBControl by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - dxPSCoreD6, - dxDBEdD6, - ECQDBCD6, - dxPSTLLnkD6; - -contains - dxPSdxDBCtrlLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD6.res deleted file mode 100644 index 377061b6..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD7.dpk deleted file mode 100644 index 1c942b93..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD7.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dxPSdxDBCtrlLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumDBControl by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - dbrtl, - dxPSCoreD7, - dxDBEdD7, - ECQDBCD7, - dxPSTLLnkD7; - -contains - dxPSdxDBCtrlLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD7.res deleted file mode 100644 index 740b0597..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBCtrlLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC5.bpk deleted file mode 100644 index 887691c7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC5.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBGrLnkc5.bpl -OBJFILES = dxPSdxDBGrLnkReg.obj dxPSdxDBGrLnk.obj dxPSdxDBGrLnkc5.obj -RESFILES = dxPSdxDBGrLnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCorec5.bpi dxDBEdc5.bpi EQTLc5.bpi dxEdtrc5.bpi EQGridc5.bpi \ - vcl50.bpi vcldb50.bpi vclx50.bpi dxPSdxDBCtrlLnkc5.bpi cxLibraryVCLC5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC5.cpp deleted file mode 100644 index 455b3744..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC5.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxcomnc5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("dxDBEdc5.bpi"); -USEPACKAGE("EQTLc5.bpi"); -USEPACKAGE("dxEdtrc5.bpi"); -USEPACKAGE("EQGridc5.bpi"); -USEPACKAGE("dxPSdxDBCtrlLnkc5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USERES("dxPSdxDBGrLnkc5.res"); -USEUNIT("dxPSdxDBGrLnkReg.pas"); -USEUNIT("dxPSdxDBGrLnk.pas"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vcldb50.bpi"); -USEPACKAGE("vclx50.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC5.res deleted file mode 100644 index fc03b013..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC6.bpk deleted file mode 100644 index def929ef..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC6.bpk +++ /dev/null @@ -1,173 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBGrLnkC6.bpl -OBJFILES = dxPSdxDBGrLnkReg.obj dxPSdxDBGrLnk.obj dxPSdxDBGrLnkC6.obj -RESFILES = dxPSdxDBGrLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi dxDBEdC6.bpi EQTLC6.bpi dxEdtrC6.bpi EQGridC6.bpi \ - designide.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi vclx.bpi dxPSdxDBCtrlLnkC6.bpi \ - cxLibraryVCLC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumGrid by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC6.cpp deleted file mode 100644 index e1268408..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC6.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxcomnC6.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("dxDBEdC6.bpi"); -USEPACKAGE("EQTLC6.bpi"); -USEPACKAGE("dxEdtrC6.bpi"); -USEPACKAGE("EQGridC6.bpi"); -USEPACKAGE("dxPSdxDBCtrlLnkC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USERES("dxPSdxDBGrLnkC6.res"); -USEUNIT("dxPSdxDBGrLnkReg.pas"); -USEUNIT("dxPSdxDBGrLnk.pas"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("vclx.bpi"); -USEPACKAGE("designide.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC6.res deleted file mode 100644 index b09e8b17..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD5.dpk deleted file mode 100644 index fdce6e08..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD5.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxDBGrLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - EqGridD5, - dxPSCoreD5, - dxPSdxDBCtrlLnkD5; - -contains - dxPSdxDBGrLnkReg, - dxPSdxDBGrLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD5.res deleted file mode 100644 index 885151a3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD6.dpk deleted file mode 100644 index 5e0d481d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxDBGrLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - EqGridD6, - dxPSCoreD6, - dxPSdxDBCtrlLnkD6; - -contains - dxPSdxDBGrLnkReg, - dxPSdxDBGrLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD6.res deleted file mode 100644 index 26f6e6de..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD7.dpk deleted file mode 100644 index 37ee3976..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxDBGrLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumGrid by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - EqGridD7, - dxPSCoreD7, - dxPSdxDBCtrlLnkD7; - -contains - dxPSdxDBGrLnkReg, - dxPSdxDBGrLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD7.res deleted file mode 100644 index d33ac5f2..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBGrLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC10.bpk deleted file mode 100644 index 25af05ef..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC10.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBOCLnkC10.bpl -OBJFILES = dxPSdxDBOCLnk.obj dxPSdxDBOCLnkC10.obj -MAINSOURCE = dxPSdxDBOCLnkC10.cpp -RESFILES = dxPSdxDBOCLnkC10.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = dxorgcC10.bpi dxdborC10.bpi dxPSCoreC10.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxPSdxOCLnkC10.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC10.cpp deleted file mode 100644 index a1226e65..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC10.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcC10.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dxdborC10.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("dxPSdxOCLnkC10.bpi"); -USERES("dxPSdxDBOCLnkC10.res"); -USEUNIT("dxPSdxDBOCLnk.pas"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC10.res deleted file mode 100644 index 4f150123..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC11.bpk deleted file mode 100644 index 76125251..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC11.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBOCLnkC11.bpl -OBJFILES = dxPSdxDBOCLnk.obj dxPSdxDBOCLnkC11.obj -MAINSOURCE = dxPSdxDBOCLnkC11.cpp -RESFILES = dxPSdxDBOCLnkC11.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = dxorgcC11.bpi dxdborC11.bpi dxPSCoreC11.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxPSdxOCLnkC11.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC11.cpp deleted file mode 100644 index 17c462b6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC11.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcC11.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dxdborC11.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("dxPSdxOCLnkC11.bpi"); -USERES("dxPSdxDBOCLnkC11.res"); -USEUNIT("dxPSdxDBOCLnk.pas"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC11.res deleted file mode 100644 index 0cb7d22d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC12.bpk deleted file mode 100644 index 8dc86710..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC12.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBOCLnkC12.bpl -OBJFILES = dxPSdxDBOCLnk.obj dxPSdxDBOCLnkC12.obj -MAINSOURCE = dxPSdxDBOCLnkC12.cpp -RESFILES = dxPSdxDBOCLnkC12.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = dxorgcC12.bpi dxdborC12.bpi dxPSCoreC12.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxPSdxOCLnkC12.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC12.cpp deleted file mode 100644 index d662c5bf..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC12.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcC12.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dxdborC12.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("dxPSdxOCLnkC12.bpi"); -USERES("dxPSdxDBOCLnkC12.res"); -USEUNIT("dxPSdxDBOCLnk.pas"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC12.res deleted file mode 100644 index 964acd15..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC14.bpk deleted file mode 100644 index f4014c47..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC14.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBOCLnkC14.bpl -OBJFILES = dxPSdxDBOCLnk.obj dxPSdxDBOCLnkC14.obj -MAINSOURCE = dxPSdxDBOCLnkC14.cpp -RESFILES = dxPSdxDBOCLnkC14.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = dxorgcC14.bpi dxdborC14.bpi dxPSCoreC14.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxPSdxOCLnkC14.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC14.cpp deleted file mode 100644 index aef45d98..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC14.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcC14.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dxdborC14.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("dxPSdxOCLnkC14.bpi"); -USERES("dxPSdxDBOCLnkC14.res"); -USEUNIT("dxPSdxDBOCLnk.pas"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC14.res deleted file mode 100644 index 2f5c7250..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC5.bpk deleted file mode 100644 index 809d4ad0..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC5.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBOCLnkc5.bpl -OBJFILES = dxPSdxDBOCLnk.obj dxPSdxDBOCLnkc5.obj -RESFILES = dxPSdxDBOCLnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxorgcc5.bpi dxdborc5.bpi dxPSCorec5.bpi vcl50.bpi vcldb50.bpi dxPSdxOCLnkc5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC5.cpp deleted file mode 100644 index 60181c69..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC5.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcc5.bpi"); -USEPACKAGE("dxdborc5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("dxPSdxOCLnkc5.bpi"); -USERES("dxPSdxDBOCLnkc5.res"); -USEUNIT("dxPSdxDBOCLnk.pas"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vcldb50.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC5.res deleted file mode 100644 index d178486e..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC6.bpk deleted file mode 100644 index 84369119..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC6.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBOCLnkC6.bpl -OBJFILES = dxPSdxDBOCLnk.obj dxPSdxDBOCLnkC6.obj -RESFILES = dxPSdxDBOCLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxorgcC6.bpi dxdborC6.bpi dxPSCoreC6.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxPSdxOCLnkC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC6.cpp deleted file mode 100644 index d41a1436..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC6.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcC6.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dxdborC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("dxPSdxOCLnkC6.bpi"); -USERES("dxPSdxDBOCLnkC6.res"); -USEUNIT("dxPSdxDBOCLnk.pas"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC6.res deleted file mode 100644 index 762f20c8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD10.dpk deleted file mode 100644 index 78f3a259..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD10.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBOCLnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD10, - dxPSdxOCLnkD10, - DxorgcD10, - DxdborD10; - -contains - dxPSdxDBOCLnkReg, - dxPSdxDBOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD10.res deleted file mode 100644 index 5257d66d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD11.dpk deleted file mode 100644 index 08bb1dad..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD11.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBOCLnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD11, - dxPSdxOCLnkD11, - DxorgcD11, - DxdborD11; - -contains - dxPSdxDBOCLnkReg, - dxPSdxDBOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD11.res deleted file mode 100644 index 27333a46..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD12.dpk deleted file mode 100644 index 6e0f865d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD12.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBOCLnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD12, - dxPSdxOCLnkD12, - DxorgcD12, - DxdborD12; - -contains - dxPSdxDBOCLnkReg, - dxPSdxDBOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD12.res deleted file mode 100644 index 59a52130..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD14.dpk deleted file mode 100644 index 225b4ed7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD14.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBOCLnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD14, - dxPSdxOCLnkD14, - DxorgcD14, - DxdborD14; - -contains - dxPSdxDBOCLnkReg, - dxPSdxDBOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD14.res deleted file mode 100644 index b32d4a92..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD5.dpk deleted file mode 100644 index 44487930..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD5.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBOCLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dxPSdxOCLnkD5, - DxorgcD5, - DxdborD5; - -contains - dxPSdxDBOCLnkReg, - dxPSdxDBOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD5.res deleted file mode 100644 index 94fed31b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD6.dpk deleted file mode 100644 index 8fcd4490..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD6.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBOCLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD6, - dxPSdxOCLnkD6, - DxorgcD6, - DxdborD6; - -contains - dxPSdxDBOCLnkReg, - dxPSdxDBOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD6.res deleted file mode 100644 index 07a3a557..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD7.dpk deleted file mode 100644 index 6ebef60a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD7.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBOCLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD7, - dxPSdxOCLnkD7, - DxorgcD7, - DxdborD7; - -contains - dxPSdxDBOCLnkReg, - dxPSdxDBOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD7.res deleted file mode 100644 index 328e0dba..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD9.dpk deleted file mode 100644 index 66f9df3a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD9.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBOCLnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD9, - dxPSdxOCLnkD9, - DxorgcD9, - DxdborD9; - -contains - dxPSdxDBOCLnkReg, - dxPSdxDBOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD9.res deleted file mode 100644 index 24ddce0b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBOCLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC5.bpk deleted file mode 100644 index eae874c3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC5.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBTLLnkc5.bpl -OBJFILES = dxPSdxDBTLLnkReg.obj dxPSdxDBTLLnk.obj dxPSdxDBTLLnkc5.obj -RESFILES = dxPSdxDBTLLnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCorec5.bpi dxDBEdc5.bpi EQTLc5.bpi dxEdtrc5.bpi EQDBTLc5.bpi \ - vcl50.bpi vcldb50.bpi vclx50.bpi cxLibraryVCLC5.bpi dxPSdxDBCtrlLnkc5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumDBTreeList by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC5.cpp deleted file mode 100644 index c6602488..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC5.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxcomnc5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("EQTLc5.bpi"); -USEPACKAGE("EQDBTLc5.bpi"); -USEPACKAGE("dxEdtrc5.bpi"); -USEPACKAGE("dxDBEdc5.bpi"); -USEPACKAGE("vcldb50.bpi"); -USEPACKAGE("dxPSdxDBCtrlLnkc5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USERES("dxPSdxDBTLLnkc5.res"); -USEUNIT("dxPSdxDBTLLnkReg.pas"); -USEUNIT("dxPSdxDBTLLnk.pas"); -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("vclx50.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC5.res deleted file mode 100644 index a8b3828e..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC6.bpk deleted file mode 100644 index be37d21d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC6.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBTLLnkC6.bpl -OBJFILES = dxPSdxDBTLLnkReg.obj dxPSdxDBTLLnk.obj dxPSdxDBTLLnkC6.obj -RESFILES = dxPSdxDBTLLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES =dxPSCoreC6.bpi dxDBEdC6.bpi EQTLC6.bpi dxEdtrC6.bpi EQDBTLC6.bpi \ - designide.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi vclx.bpi cxLibraryVCLC6.bpi dxPSdxDBCtrlLnkC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressQuantumDBTreeList by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC6.cpp deleted file mode 100644 index 170ccdea..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC6.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dxcomnC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("EQTLC6.bpi"); -USEPACKAGE("EQDBTLC6.bpi"); -USEPACKAGE("dxEdtrC6.bpi"); -USEPACKAGE("dxDBEdC6.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dxPSdxDBCtrlLnkC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USERES("dxPSdxDBTLLnkC6.res"); -USEUNIT("dxPSdxDBTLLnkReg.pas"); -USEUNIT("dxPSdxDBTLLnk.pas"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("vclx.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC6.res deleted file mode 100644 index e4633447..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD5.dpk deleted file mode 100644 index 535f97d1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD5.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxDBTLLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumDBTreeList by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - EQDBTLD5, - dxPSCoreD5, - dxPSdxDBCtrlLnkD5; - -contains - dxPSdxDBTLLnkReg, - dxPSdxDBTLLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD5.res deleted file mode 100644 index dd8ff44f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD6.dpk deleted file mode 100644 index a2e18426..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxDBTLLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumDBTreeList by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - EQDBTLD6, - dxPSCoreD6, - dxPSdxDBCtrlLnkD6; - -contains - dxPSdxDBTLLnkReg, - dxPSdxDBTLLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD6.res deleted file mode 100644 index 164a3038..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD7.dpk deleted file mode 100644 index f0674d2b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxDBTLLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumDBTreeList by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - EQDBTLD7, - dxPSCoreD7, - dxPSdxDBCtrlLnkD7; - -contains - dxPSdxDBTLLnkReg, - dxPSdxDBTLLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD7.res deleted file mode 100644 index 274307be..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTLLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC10.bpk deleted file mode 100644 index d35d4060..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC10.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBTVLnkC10.bpl -OBJFILES = dxPSdxDBTVLnkReg.obj dxPSdxDBTVLnk.obj dxPSdxDBTVLnkC10.obj -MAINSOURCE = dxPSdxDBTVLnkC10.cpp -RESFILES = dxPSdxDBTVLnkC10.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi dxdbtrC10.bpi dxPSLnksC10.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi designide.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC10.cpp deleted file mode 100644 index 693e8dd1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC10.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("VCLDB.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("dxdbtrC10.bpi"); -USEPACKAGE("dxPSLnksC10.bpi"); -USERES("dxPSdxDBTVLnkC10.res"); -USEUNIT("dxPSdxDBTVLnkReg.pas"); -USEUNIT("dxPSdxDBTVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC10.res deleted file mode 100644 index f4d3852d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC11.bpk deleted file mode 100644 index 6c2637ca..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC11.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBTVLnkC11.bpl -OBJFILES = dxPSdxDBTVLnkReg.obj dxPSdxDBTVLnk.obj dxPSdxDBTVLnkC11.obj -MAINSOURCE = dxPSdxDBTVLnkC11.cpp -RESFILES = dxPSdxDBTVLnkC11.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi dxdbtrC11.bpi dxPSLnksC11.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi designide.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC11.cpp deleted file mode 100644 index 34154fcb..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("VCLDB.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("dxdbtrC11.bpi"); -USEPACKAGE("dxPSLnksC11.bpi"); -USERES("dxPSdxDBTVLnkC11.res"); -USEUNIT("dxPSdxDBTVLnkReg.pas"); -USEUNIT("dxPSdxDBTVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC11.res deleted file mode 100644 index 7e3dc603..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC12.bpk deleted file mode 100644 index a228d18c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC12.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBTVLnkC12.bpl -OBJFILES = dxPSdxDBTVLnkReg.obj dxPSdxDBTVLnk.obj dxPSdxDBTVLnkC12.obj -MAINSOURCE = dxPSdxDBTVLnkC12.cpp -RESFILES = dxPSdxDBTVLnkC12.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi dxdbtrC12.bpi dxPSLnksC12.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi designide.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC12.cpp deleted file mode 100644 index fce58fb0..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC12.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("VCLDB.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("dxdbtrC12.bpi"); -USEPACKAGE("dxPSLnksC12.bpi"); -USERES("dxPSdxDBTVLnkC12.res"); -USEUNIT("dxPSdxDBTVLnkReg.pas"); -USEUNIT("dxPSdxDBTVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC12.res deleted file mode 100644 index 7e7a48e1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC14.bpk deleted file mode 100644 index 39c996cf..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC14.bpk +++ /dev/null @@ -1,168 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBTVLnkC14.bpl -OBJFILES = dxPSdxDBTVLnkReg.obj dxPSdxDBTVLnk.obj dxPSdxDBTVLnkC14.obj -MAINSOURCE = dxPSdxDBTVLnkC14.cpp -RESFILES = dxPSdxDBTVLnkC14.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi dxdbtrC14.bpi dxPSLnksC14.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi designide.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC14.cpp deleted file mode 100644 index b8fb9a2d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC14.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("VCLDB.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("dxdbtrC14.bpi"); -USEPACKAGE("dxPSLnksC14.bpi"); -USERES("dxPSdxDBTVLnkC14.res"); -USEUNIT("dxPSdxDBTVLnkReg.pas"); -USEUNIT("dxPSdxDBTVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC14.res deleted file mode 100644 index 5d272ec4..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC5.bpk deleted file mode 100644 index ebceb820..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC5.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBTVLnkc5.bpl -OBJFILES = dxPSdxDBTVLnkReg.obj dxPSdxDBTVLnk.obj dxPSdxDBTVLnkc5.obj -RESFILES = dxPSdxDBTVLnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib vcldb50.lib -PACKAGES = dxPSCorec5.bpi dxdbtrC5.bpi dxPSLnksC5.bpi vcl50.bpi vcldb50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC5.cpp deleted file mode 100644 index 4197296d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC5.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("VCL50.bpi"); -USEPACKAGE("VCLDB50.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("dxdbtrC5.bpi"); -USEPACKAGE("dxPSLnksC5.bpi"); -USERES("dxPSdxDBTVLnkc5.res"); -USEUNIT("dxPSdxDBTVLnkReg.pas"); -USEUNIT("dxPSdxDBTVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC5.res deleted file mode 100644 index 1b6dfb28..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC6.bpk deleted file mode 100644 index 60089e02..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC6.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxDBTVLnkC6.bpl -OBJFILES = dxPSdxDBTVLnkReg.obj dxPSdxDBTVLnk.obj dxPSdxDBTVLnkC6.obj -RESFILES = dxPSdxDBTVLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dbrtl.lib vcldb.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi dxdbtrC6.bpi dxPSLnksC6.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC6.cpp deleted file mode 100644 index 489162e6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC6.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("VCLDB.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("dxdbtrC6.bpi"); -USEPACKAGE("dxPSLnksC6.bpi"); -USERES("dxPSdxDBTVLnkC6.res"); -USEUNIT("dxPSdxDBTVLnkReg.pas"); -USEUNIT("dxPSdxDBTVLnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC6.res deleted file mode 100644 index 8b1e6c24..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD10.dpk deleted file mode 100644 index 8119b38d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD10.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBTVLnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxDBTrD10, - dxPSLnksD10, - dxPSCoreD10; - -contains - dxPSdxDBTVLnkReg, - dxPSdxDBTVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD10.res deleted file mode 100644 index 7fc34a0a..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD11.dpk deleted file mode 100644 index 55065fb1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD11.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBTVLnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxDBTrD11, - dxPSLnksD11, - dxPSCoreD11; - -contains - dxPSdxDBTVLnkReg, - dxPSdxDBTVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD11.res deleted file mode 100644 index 4f921c56..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD12.dpk deleted file mode 100644 index c21cd9c1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD12.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBTVLnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxDBTrD12, - dxPSLnksD12, - dxPSCoreD12; - -contains - dxPSdxDBTVLnkReg, - dxPSdxDBTVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD12.res deleted file mode 100644 index bf44c9dc..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD14.dpk deleted file mode 100644 index 90929974..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD14.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBTVLnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxDBTrD14, - dxPSLnksD14, - dxPSCoreD14; - -contains - dxPSdxDBTVLnkReg, - dxPSdxDBTVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD14.res deleted file mode 100644 index 03d6cac0..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD5.dpk deleted file mode 100644 index f0356543..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD5.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxDBTVLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxDBTrD5, - dxPSLnksD5, - dxPSCoreD5; - -contains - dxPSdxDBTVLnkReg, - dxPSdxDBTVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD5.res deleted file mode 100644 index 429236c6..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD6.dpk deleted file mode 100644 index 9fa5225c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxDBTVLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxDBTrD6, - dxPSLnksD6, - dxPSCoreD6; - -contains - dxPSdxDBTVLnkReg, - dxPSdxDBTVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD6.res deleted file mode 100644 index d98408ca..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD7.dpk deleted file mode 100644 index d08310a8..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxDBTVLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxDBTrD7, - dxPSLnksD7, - dxPSCoreD7; - -contains - dxPSdxDBTVLnkReg, - dxPSdxDBTVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD7.res deleted file mode 100644 index 5699384e..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD9.dpk deleted file mode 100644 index b79ff4ab..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD9.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxDBTVLnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxDBTrD9, - dxPSLnksD9, - dxPSCoreD9; - -contains - dxPSdxDBTVLnkReg, - dxPSdxDBTVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD9.res deleted file mode 100644 index a5ed6927..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxDBTVLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC10.bpk deleted file mode 100644 index d5f8c656..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC10.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxFCLnkC10.bpl -OBJFILES = dxPSdxFCLnk.obj dxPSdxFCLnkC10.obj -MAINSOURCE = dxPSdxFCLnkC10.cpp -RESFILES = dxPSdxFCLnkC10.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = dxflowchartC10.bpi dxPSCoreC10.bpi rtl.bpi vcl.bpi dxPSLnksC10.bpi cxLibraryC10.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressFlowChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC10.cpp deleted file mode 100644 index 608ad10d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC10.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dxflowchartC10.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("dxPSLnksC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USERES("dxPSdxFCLnkC10.res"); -USEUNIT("dxPSdxFCLnk.pas"); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC10.res deleted file mode 100644 index 54a773d8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC11.bpk deleted file mode 100644 index b1f72055..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC11.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxFCLnkC11.bpl -OBJFILES = dxPSdxFCLnk.obj dxPSdxFCLnkC11.obj -MAINSOURCE = dxPSdxFCLnkC11.cpp -RESFILES = dxPSdxFCLnkC11.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = dxflowchartC11.bpi dxPSCoreC11.bpi rtl.bpi vcl.bpi dxPSLnksC11.bpi cxLibraryC11.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressFlowChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC11.cpp deleted file mode 100644 index f268861d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC11.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dxflowchartC11.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("dxPSLnksC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USERES("dxPSdxFCLnkC11.res"); -USEUNIT("dxPSdxFCLnk.pas"); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC11.res deleted file mode 100644 index 8a099948..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC12.bpk deleted file mode 100644 index 93cf4ef8..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC12.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxFCLnkC12.bpl -OBJFILES = dxPSdxFCLnk.obj dxPSdxFCLnkC12.obj -MAINSOURCE = dxPSdxFCLnkC12.cpp -RESFILES = dxPSdxFCLnkC12.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = dxflowchartC12.bpi dxPSCoreC12.bpi rtl.bpi vcl.bpi dxPSLnksC12.bpi cxLibraryC12.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressFlowChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC12.cpp deleted file mode 100644 index 88f9936d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC12.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dxflowchartC12.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("dxPSLnksC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USERES("dxPSdxFCLnkC12.res"); -USEUNIT("dxPSdxFCLnk.pas"); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC12.res deleted file mode 100644 index 3f23680c..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC14.bpk deleted file mode 100644 index d2347be1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC14.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxFCLnkC14.bpl -OBJFILES = dxPSdxFCLnk.obj dxPSdxFCLnkC14.obj -MAINSOURCE = dxPSdxFCLnkC14.cpp -RESFILES = dxPSdxFCLnkC14.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = dxflowchartC14.bpi dxPSCoreC14.bpi rtl.bpi vcl.bpi dxPSLnksC14.bpi cxLibraryC14.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressFlowChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC14.cpp deleted file mode 100644 index 8b2798db..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC14.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dxflowchartC14.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("dxPSLnksC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USERES("dxPSdxFCLnkC14.res"); -USEUNIT("dxPSdxFCLnk.pas"); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC14.res deleted file mode 100644 index 6642a34d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC5.bpk deleted file mode 100644 index 4b18a445..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC5.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxFCLnkc5.bpl -OBJFILES = dxPSdxFCLnk.obj dxPSdxFCLnkc5.obj -RESFILES = dxPSdxFCLnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxflowchartc5.bpi dxPSCorec5.bpi vcl50.bpi dxPSLnksc5.bpi cxLibraryVCLC5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressFlowChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC5.cpp deleted file mode 100644 index d31a09f9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC5.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxflowchartc5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("dxPSLnksc5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USERES("dxPSdxFCLnkc5.res"); -USEUNIT("dxPSdxFCLnk.pas"); -USEPACKAGE("vcl50.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC5.res deleted file mode 100644 index 043ee928..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC6.bpk deleted file mode 100644 index c86fdd0e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC6.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxFCLnkC6.bpl -OBJFILES = dxPSdxFCLnk.obj dxPSdxFCLnkC6.obj -RESFILES = dxPSdxFCLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxflowchartC6.bpi dxPSCoreC6.bpi rtl.bpi vcl.bpi dxPSLnksC6.bpi cxLibraryVCLC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressFlowChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC6.cpp deleted file mode 100644 index 43317afc..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC6.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dxflowchartC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("dxPSLnksC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USERES("dxPSdxFCLnkC6.res"); -USEUNIT("dxPSdxFCLnk.pas"); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC6.res deleted file mode 100644 index 54bf2313..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD10.dpk deleted file mode 100644 index 57f32979..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD10.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxFCLnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD10, - dxPSLnksD10, - dxFlowChartD10; - -contains - dxPSdxFCLnkReg, - dxPSdxFCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD10.res deleted file mode 100644 index b741fef8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD11.dpk deleted file mode 100644 index 4806ab10..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD11.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxFCLnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD11, - dxPSLnksD11, - dxFlowChartD11; - -contains - dxPSdxFCLnkReg, - dxPSdxFCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD11.res deleted file mode 100644 index 70ab59ae..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD12.dpk deleted file mode 100644 index 96fbe541..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD12.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxFCLnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD12, - dxPSLnksD12, - dxFlowChartD12; - -contains - dxPSdxFCLnkReg, - dxPSdxFCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD12.res deleted file mode 100644 index 2a7210ec..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD14.dpk deleted file mode 100644 index d423cf1b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD14.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxFCLnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD14, - dxPSLnksD14, - dxFlowChartD14; - -contains - dxPSdxFCLnkReg, - dxPSdxFCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD14.res deleted file mode 100644 index 6a63d979..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD5.dpk deleted file mode 100644 index eac413c9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD5.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxFCLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dxPSLnksD5, - dxFlowChartD5; - -contains - dxPSdxFCLnkReg, - dxPSdxFCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD5.res deleted file mode 100644 index 4fd5184d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD6.dpk deleted file mode 100644 index 84bef580..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxFCLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD6, - dxPSLnksD6, - dxFlowChartD6; - -contains - dxPSdxFCLnkReg, - dxPSdxFCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD6.res deleted file mode 100644 index 0a8864b6..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD7.dpk deleted file mode 100644 index 2300106c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxFCLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD7, - dxPSLnksD7, - dxFlowChartD7; - -contains - dxPSdxFCLnkReg, - dxPSdxFCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD7.res deleted file mode 100644 index 3a0bff09..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD9.dpk deleted file mode 100644 index d9e47524..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD9.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxFCLnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD9, - dxPSLnksD9, - dxFlowChartD9; - -contains - dxPSdxFCLnkReg, - dxPSdxFCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD9.res deleted file mode 100644 index 0fad4582..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxFCLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC5.bpk deleted file mode 100644 index 5a55eb8c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC5.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxInsLnkc5.bpl -OBJFILES = dxPSdxInsLnkReg.obj dxPSdxInsLnk.obj dxPSdxDBInsLnk.obj dxPSdxInsLnkc5.obj -RESFILES = dxPSdxInsLnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSdxInsLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCorec5.bpi dxEdtrC5.bpi dxInsC5.bpi vcl50.bpi vclx50.bpi cxLibraryVCLC5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressInspector by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC5.cpp deleted file mode 100644 index 995a72d7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC5.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("VCL50.bpi"); -USEPACKAGE("VCLX50.bpi"); -USEPACKAGE("dxcomnc5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("dxEdtrC5.bpi"); -USEPACKAGE("dxInsC5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USERES("dxPSdxInsLnkc5.res"); -USEUNIT("dxPSdxInsLnkReg.pas"); -USEUNIT("dxPSdxDBInsLnk.pas"); -USEFORMNS("dxPSdxInsLnk.pas", Dxpsdxinslnk, dxInspectorDesignWindow); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC5.res deleted file mode 100644 index 0ab1c69f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC6.bpk deleted file mode 100644 index d499ab22..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC6.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxInsLnkC6.bpl -OBJFILES = dxPSdxInsLnkReg.obj dxPSdxInsLnk.obj dxPSdxDBInsLnk.obj dxPSdxInsLnkC6.obj -RESFILES = dxPSdxInsLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSdxInsLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi dxEdtrC6.bpi dxInsC6.bpi designide.bpi rtl.bpi vcl.bpi \ - cxLibraryVCLC6.bpi vclx.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressInspector by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC6.cpp deleted file mode 100644 index 41b6fba3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC6.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("VCLX.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxcomnC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("dxEdtrC6.bpi"); -USEPACKAGE("dxInsC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USERES("dxPSdxInsLnkC6.res"); -USEUNIT("dxPSdxInsLnkReg.pas"); -USEUNIT("dxPSdxDBInsLnk.pas"); -USEFORMNS("dxPSdxInsLnk.pas", Dxpsdxinslnk, dxInspectorDesignWindow); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC6.res deleted file mode 100644 index 1f9f9cda..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD5.dpk deleted file mode 100644 index 65de5fa9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD5.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxInsLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressInspector by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxInsD5, - dxPSCoreD5; - -contains - dxPSdxInsLnkReg, - dxPSdxInsLnk, - dxPSdxDBInsLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD5.res deleted file mode 100644 index d9b4b3ac..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD6.dpk deleted file mode 100644 index cb4b7521..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD6.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxInsLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressInspector by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxInsD6, - dxPSCoreD6; - -contains - dxPSdxInsLnkReg, - dxPSdxInsLnk, - dxPSdxDBInsLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD6.res deleted file mode 100644 index 5996a624..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD7.dpk deleted file mode 100644 index fe4c229a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD7.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxInsLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressInspector by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxInsD7, - dxPSCoreD7; - -contains - dxPSdxInsLnkReg, - dxPSdxInsLnk, - dxPSdxDBInsLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD7.res deleted file mode 100644 index 9ce6535d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxInsLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC10.bpk deleted file mode 100644 index 040bb72c..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC10.bpk +++ /dev/null @@ -1,169 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxLCLnkC10.bpl -OBJFILES = dxPSdxLCLnk.obj dxPSdxLCLnkReg.obj dxPSdxLCLnkC10.obj -MAINSOURCE = dxPSdxLCLnkC10.cpp -RESFILES = dxPSdxLCLnkC10.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi dxPSLnksC10.bpi cxLibraryC10.bpi cxDataC10.bpi \ - dxLayoutControlC10.bpi cxEditorsC10.bpi rtl.bpi vcl.bpi designide.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC10.cpp deleted file mode 100644 index 883ec104..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC10.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USERES("dxPSdxLCLnkC10.res"); -USEPACKAGE("dxPSLnksC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("dxLayoutControlC10.bpi"); -USEUNIT("dxPSdxLCLnk.pas"); -USEUNIT("dxPSdxLCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC10.res deleted file mode 100644 index 9b0f0167..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC11.bpk deleted file mode 100644 index 779baf39..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC11.bpk +++ /dev/null @@ -1,169 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxLCLnkC11.bpl -OBJFILES = dxPSdxLCLnk.obj dxPSdxLCLnkReg.obj dxPSdxLCLnkC11.obj -MAINSOURCE = dxPSdxLCLnkC11.cpp -RESFILES = dxPSdxLCLnkC11.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi dxPSLnksC11.bpi cxLibraryC11.bpi cxDataC11.bpi \ - dxLayoutControlC11.bpi cxEditorsC11.bpi rtl.bpi vcl.bpi designide.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC11.cpp deleted file mode 100644 index 73d977f6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC11.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USERES("dxPSdxLCLnkC11.res"); -USEPACKAGE("dxPSLnksC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("dxLayoutControlC11.bpi"); -USEUNIT("dxPSdxLCLnk.pas"); -USEUNIT("dxPSdxLCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC11.res deleted file mode 100644 index baf1c76c..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC12.bpk deleted file mode 100644 index 3986f0d2..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC12.bpk +++ /dev/null @@ -1,169 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxLCLnkC12.bpl -OBJFILES = dxPSdxLCLnk.obj dxPSdxLCLnkReg.obj dxPSdxLCLnkC12.obj -MAINSOURCE = dxPSdxLCLnkC12.cpp -RESFILES = dxPSdxLCLnkC12.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi dxPSLnksC12.bpi cxLibraryC12.bpi cxDataC12.bpi \ - dxLayoutControlC12.bpi cxEditorsC12.bpi rtl.bpi vcl.bpi designide.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC12.cpp deleted file mode 100644 index 3cb147ce..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC12.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USERES("dxPSdxLCLnkC12.res"); -USEPACKAGE("dxPSLnksC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("dxLayoutControlC12.bpi"); -USEUNIT("dxPSdxLCLnk.pas"); -USEUNIT("dxPSdxLCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC12.res deleted file mode 100644 index 93903bf9..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC14.bpk deleted file mode 100644 index 259850aa..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC14.bpk +++ /dev/null @@ -1,169 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxLCLnkC14.bpl -OBJFILES = dxPSdxLCLnk.obj dxPSdxLCLnkReg.obj dxPSdxLCLnkC14.obj -MAINSOURCE = dxPSdxLCLnkC14.cpp -RESFILES = dxPSdxLCLnkC14.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi dxPSLnksC14.bpi cxLibraryC14.bpi cxDataC14.bpi \ - dxLayoutControlC14.bpi cxEditorsC14.bpi rtl.bpi vcl.bpi designide.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve -a8 \ - -k- -vi -c -b- -w-par -w-inl -Vx -tWM -D$(SYSDEFINES);$(USERDEFINES) -PFLAGS = -DBCB -U"$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$Y- -$L- -$D- -$C- -v -JPHNE -M -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC14.cpp deleted file mode 100644 index 5e758867..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC14.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USERES("dxPSdxLCLnkC14.res"); -USEPACKAGE("dxPSLnksC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("dxLayoutControlC14.bpi"); -USEUNIT("dxPSdxLCLnk.pas"); -USEUNIT("dxPSdxLCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC14.res deleted file mode 100644 index 763dd024..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC5.bpk deleted file mode 100644 index 0044ca8b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC5.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxLCLnkC5.bpl -OBJFILES = dxPSdxLCLnk.obj dxPSdxLCLnkReg.obj dxPSdxLCLnkC5.obj -RESFILES = dxPSdxLCLnkC5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCoreC5.bpi dxPSLnksC5.bpi cxLibraryVCLC5.bpi cxDataC5.bpi \ - dxLayoutControlC5.bpi cxEditorsC5.bpi vcl50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC5.cpp deleted file mode 100644 index abf10b52..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC5.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl50.bpi"); -USEPACKAGE("dxPSCoreC5.bpi"); -USERES("dxPSdxLCLnkC5.res"); -USEPACKAGE("dxPSLnksC5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USEPACKAGE("cxDataC5.bpi"); -USEPACKAGE("cxEditorsC5.bpi"); -USEPACKAGE("dxLayoutControlC5.bpi"); -USEUNIT("dxPSdxLCLnk.pas"); -USEUNIT("dxPSdxLCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC5.res deleted file mode 100644 index d05ca08a..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC6.bpk deleted file mode 100644 index c46a746e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC6.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxLCLnkC6.bpl -OBJFILES = dxPSdxLCLnk.obj dxPSdxLCLnkReg.obj dxPSdxLCLnkC6.obj -RESFILES = dxPSdxLCLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi dxPSLnksC6.bpi cxLibraryVCLC6.bpi cxDataC6.bpi \ - dxLayoutControlC6.bpi cxEditorsVCLC6.bpi rtl.bpi vcl.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc." -aa \ - -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC6.cpp deleted file mode 100644 index 29db816e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC6.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USERES("dxPSdxLCLnkC6.res"); -USEPACKAGE("dxPSLnksC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("dxLayoutControlC6.bpi"); -USEUNIT("dxPSdxLCLnk.pas"); -USEUNIT("dxPSdxLCLnkReg.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC6.res deleted file mode 100644 index 23995c38..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD10.dpk deleted file mode 100644 index 4a2b6951..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD10.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxLCLnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD10, - dxLayoutControlD10; - -contains - dxPSdxLCLnk, - dxPSdxLCLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD10.res deleted file mode 100644 index f98e9c9c..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD11.dpk deleted file mode 100644 index e73551d7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD11.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxLCLnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD11, - dxLayoutControlD11; - -contains - dxPSdxLCLnk, - dxPSdxLCLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD11.res deleted file mode 100644 index 484d90e1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD12.dpk deleted file mode 100644 index 0b75f4f2..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD12.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxLCLnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD12, - dxLayoutControlD12; - -contains - dxPSdxLCLnk, - dxPSdxLCLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD12.res deleted file mode 100644 index 5df75a61..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD14.dpk deleted file mode 100644 index 5a056b3b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD14.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxLCLnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD14, - dxLayoutControlD14; - -contains - dxPSdxLCLnk, - dxPSdxLCLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD14.res deleted file mode 100644 index 878fbdaf..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD5.dpk deleted file mode 100644 index 29da3897..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD5.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPSdxLCLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dxLayoutControlD5; - -contains - dxPSdxLCLnk, - dxPSdxLCLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD5.res deleted file mode 100644 index 2a9b5282..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD6.dpk deleted file mode 100644 index f847cb58..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD6.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxLCLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD6, - dxLayoutControlD6; - -contains - dxPSdxLCLnk, - dxPSdxLCLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD6.res deleted file mode 100644 index 61921a5d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD7.dpk deleted file mode 100644 index 761a24be..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD7.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxLCLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD7, - dxLayoutControlD7; - -contains - dxPSdxLCLnk, - dxPSdxLCLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD7.res deleted file mode 100644 index ce8aadc5..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD9.dpk deleted file mode 100644 index 90b28a9b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD9.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxLCLnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD9, - dxLayoutControlD9; - -contains - dxPSdxLCLnk, - dxPSdxLCLnkReg; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD9.res deleted file mode 100644 index a99cb569..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxLCLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC10.bpk deleted file mode 100644 index 7e812978..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC10.bpk +++ /dev/null @@ -1,173 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxMVLnkC10.bpl -OBJFILES = dxPSdxMVLnk.obj dxPSMD.obj dxPSdxMVLnkC10.obj -MAINSOURCE = dxPSdxMVLnkC10.cpp -RESFILES = dxPSdxMVLnkC10.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSdxMVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = dxPSCoreC10.bpi dxMasterViewC10.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - cxLibraryC10.bpi vcldb.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC10.cpp deleted file mode 100644 index 34e0058f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC10.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("VCLDB.bpi"); -USEPACKAGE("VCLX.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("dxMasterViewC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USERES("dxPSdxMVLnkC10.res"); -USEUNIT("dxPSMD.pas"); -USEFORMNS("dxPSdxMVLnk.pas", Dxpsdxmvlnk, dxMVReportLinkDesignWindow); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC10.res deleted file mode 100644 index 8f1f0625..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC11.bpk deleted file mode 100644 index e1421c5e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC11.bpk +++ /dev/null @@ -1,173 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxMVLnkC11.bpl -OBJFILES = dxPSdxMVLnk.obj dxPSMD.obj dxPSdxMVLnkC11.obj -MAINSOURCE = dxPSdxMVLnkC11.cpp -RESFILES = dxPSdxMVLnkC11.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSdxMVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = dxPSCoreC11.bpi dxMasterViewC11.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - cxLibraryC11.bpi vcldb.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC11.cpp deleted file mode 100644 index 9e4b40de..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("VCLDB.bpi"); -USEPACKAGE("VCLX.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("dxMasterViewC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USERES("dxPSdxMVLnkC11.res"); -USEUNIT("dxPSMD.pas"); -USEFORMNS("dxPSdxMVLnk.pas", Dxpsdxmvlnk, dxMVReportLinkDesignWindow); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC11.res deleted file mode 100644 index 821d1bb3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC12.bpk deleted file mode 100644 index 90d73f22..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC12.bpk +++ /dev/null @@ -1,173 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxMVLnkC12.bpl -OBJFILES = dxPSdxMVLnk.obj dxPSMD.obj dxPSdxMVLnkC12.obj -MAINSOURCE = dxPSdxMVLnkC12.cpp -RESFILES = dxPSdxMVLnkC12.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSdxMVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = dxPSCoreC12.bpi dxMasterViewC12.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - cxLibraryC12.bpi vcldb.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC12.cpp deleted file mode 100644 index c194bd3a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC12.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("VCLDB.bpi"); -USEPACKAGE("VCLX.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("dxMasterViewC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USERES("dxPSdxMVLnkC12.res"); -USEUNIT("dxPSMD.pas"); -USEFORMNS("dxPSdxMVLnk.pas", Dxpsdxmvlnk, dxMVReportLinkDesignWindow); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC12.res deleted file mode 100644 index febc26e8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC14.bpk deleted file mode 100644 index 44c38ba2..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC14.bpk +++ /dev/null @@ -1,173 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxMVLnkC14.bpl -OBJFILES = dxPSdxMVLnk.obj dxPSMD.obj dxPSdxMVLnkC14.obj -MAINSOURCE = dxPSdxMVLnkC14.cpp -RESFILES = dxPSdxMVLnkC14.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSdxMVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = dxPSCoreC14.bpi dxMasterViewC14.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - cxLibraryC14.bpi vcldb.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC14.cpp deleted file mode 100644 index f6a6a6b4..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC14.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("VCLDB.bpi"); -USEPACKAGE("VCLX.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("dxMasterViewC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USERES("dxPSdxMVLnkC14.res"); -USEUNIT("dxPSMD.pas"); -USEFORMNS("dxPSdxMVLnk.pas", Dxpsdxmvlnk, dxMVReportLinkDesignWindow); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC14.res deleted file mode 100644 index 2d3f3207..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC5.bpk deleted file mode 100644 index fec5e832..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC5.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxMVLnkc5.bpl -OBJFILES = dxPSdxMVLnk.obj dxPSMD.obj dxPSdxMVLnkc5.obj -RESFILES = dxPSdxMVLnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSdxMVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCorec5.bpi dxMasterViewC5.bpi vcl50.bpi vclx50.bpi vcldb50.bpi cxLibraryVCLC5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC5.cpp deleted file mode 100644 index 1f741ae1..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC5.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("VCL50.bpi"); -USEPACKAGE("VCLDB50.bpi"); -USEPACKAGE("VCLX50.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("dxMasterViewC5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USERES("dxPSdxMVLnkc5.res"); -USEUNIT("dxPSMD.pas"); -USEFORMNS("dxPSdxMVLnk.pas", Dxpsdxmvlnk, dxMVReportLinkDesignWindow); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC5.res deleted file mode 100644 index 41ab42fe..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC6.bpk deleted file mode 100644 index c828fdd4..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC6.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxMVLnkC6.bpl -OBJFILES = dxPSdxMVLnk.obj dxPSMD.obj dxPSdxMVLnkC6.obj -RESFILES = dxPSdxMVLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) dxPSdxMVLnk.dfm -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxPSCoreC6.bpi dxMasterViewC6.bpi rtl.bpi vcl.bpi vclx.bpi dbrtl.bpi \ - cxLibraryVCLC6.bpi vcldb.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC6.cpp deleted file mode 100644 index 94569782..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC6.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("VCLDB.bpi"); -USEPACKAGE("VCLX.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("dxMasterViewC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USERES("dxPSdxMVLnkC6.res"); -USEUNIT("dxPSMD.pas"); -USEFORMNS("dxPSdxMVLnk.pas", Dxpsdxmvlnk, dxMVReportLinkDesignWindow); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC6.res deleted file mode 100644 index 8ead905c..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD10.dpk deleted file mode 100644 index 5d254434..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD10.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxMVLnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxMasterViewD10, - dxPSCoreD10, - designide; - -contains - dxPSMD, - dxPSdxMVLnkReg, - dxPSdxMVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD10.res deleted file mode 100644 index 7e3992d5..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD11.dpk deleted file mode 100644 index ef6f0f89..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD11.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxMVLnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxMasterViewD11, - dxPSCoreD11, - designide; - -contains - dxPSMD, - dxPSdxMVLnkReg, - dxPSdxMVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD11.res deleted file mode 100644 index 42d0bb5e..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD12.dpk deleted file mode 100644 index edc13f4f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD12.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxMVLnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxMasterViewD12, - dxPSCoreD12, - designide; - -contains - dxPSMD, - dxPSdxMVLnkReg, - dxPSdxMVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD12.res deleted file mode 100644 index 31afe2a6..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD14.dpk deleted file mode 100644 index 91310249..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD14.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxMVLnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxMasterViewD14, - dxPSCoreD14, - designide; - -contains - dxPSMD, - dxPSdxMVLnkReg, - dxPSdxMVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD14.res deleted file mode 100644 index e78c48de..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD5.dpk deleted file mode 100644 index cbf22691..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD5.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxMVLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxMasterViewD5, - dxPSCoreD5; - -contains - dxPSMD, - dxPSdxMVLnkReg, - dxPSdxMVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD5.res deleted file mode 100644 index 7eaa589c..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD6.dpk deleted file mode 100644 index 75399a35..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD6.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxMVLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxMasterViewD6, - dxPSCoreD6, - designide; - -contains - dxPSMD, - dxPSdxMVLnkReg, - dxPSdxMVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD6.res deleted file mode 100644 index e1295e90..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD7.dpk deleted file mode 100644 index ad4b17c6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD7.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxMVLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxMasterViewD7, - dxPSCoreD7, - designide; - -contains - dxPSMD, - dxPSdxMVLnkReg, - dxPSdxMVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD7.res deleted file mode 100644 index d07d468a..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD9.dpk deleted file mode 100644 index 6684f327..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD9.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxPSdxMVLnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxMasterViewD9, - dxPSCoreD9, - designide; - -contains - dxPSMD, - dxPSdxMVLnkReg, - dxPSdxMVLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD9.res deleted file mode 100644 index dcb08cdd..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxMVLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC10.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC10.bpk deleted file mode 100644 index 792e60aa..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC10.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxOCLnkC10.bpl -OBJFILES = dxPSdxOCLnk.obj dxPSdxOCLnkReg.obj dxPSdxOCLnkC10.obj -MAINSOURCE = dxPSdxOCLnkC10.cpp -RESFILES = dxPSdxOCLnkC10.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC10.lib -PACKAGES = dxorgcC10.bpi dxPSCoreC10.bpi designide.bpi rtl.bpi vcl.bpi cxLibraryC10.bpi dxCoreC10.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC10.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC10.cpp deleted file mode 100644 index 51f2523d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC10.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcC10.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("dxPSCoreC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USERES("dxPSdxOCLnkC10.res"); -USEUNIT("dxPSdxOCLnk.pas"); -USEUNIT("dxPSdxOCLnkReg.pas"); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC10.res deleted file mode 100644 index 6c975823..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC11.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC11.bpk deleted file mode 100644 index 9e606f2a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC11.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxOCLnkC11.bpl -OBJFILES = dxPSdxOCLnk.obj dxPSdxOCLnkReg.obj dxPSdxOCLnkC11.obj -MAINSOURCE = dxPSdxOCLnkC11.cpp -RESFILES = dxPSdxOCLnkC11.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC11.lib -PACKAGES = dxorgcC11.bpi dxPSCoreC11.bpi designide.bpi rtl.bpi vcl.bpi cxLibraryC11.bpi dxCoreC11.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC11.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC11.cpp deleted file mode 100644 index 57b5898d..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC11.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcC11.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("dxPSCoreC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USERES("dxPSdxOCLnkC11.res"); -USEUNIT("dxPSdxOCLnk.pas"); -USEUNIT("dxPSdxOCLnkReg.pas"); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC11.res deleted file mode 100644 index e2f4d10b..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC12.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC12.bpk deleted file mode 100644 index 4fd69178..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC12.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxOCLnkC12.bpl -OBJFILES = dxPSdxOCLnk.obj dxPSdxOCLnkReg.obj dxPSdxOCLnkC12.obj -MAINSOURCE = dxPSdxOCLnkC12.cpp -RESFILES = dxPSdxOCLnkC12.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC12.lib -PACKAGES = dxorgcC12.bpi dxPSCoreC12.bpi designide.bpi rtl.bpi vcl.bpi cxLibraryC12.bpi dxCoreC12.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC12.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC12.cpp deleted file mode 100644 index 0ebc2ad2..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC12.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcC12.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("dxPSCoreC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USERES("dxPSdxOCLnkC12.res"); -USEUNIT("dxPSdxOCLnk.pas"); -USEUNIT("dxPSdxOCLnkReg.pas"); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC12.res deleted file mode 100644 index 762e5275..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC14.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC14.bpk deleted file mode 100644 index e84b1ae4..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC14.bpk +++ /dev/null @@ -1,172 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxOCLnkC14.bpl -OBJFILES = dxPSdxOCLnk.obj dxPSdxOCLnkReg.obj dxPSdxOCLnkC14.obj -MAINSOURCE = dxPSdxOCLnkC14.cpp -RESFILES = dxPSdxOCLnkC14.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC14.lib -PACKAGES = dxorgcC14.bpi dxPSCoreC14.bpi designide.bpi rtl.bpi vcl.bpi cxLibraryC14.bpi dxCoreC14.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl100.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC14.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC14.cpp deleted file mode 100644 index ce66a491..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC14.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcC14.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("dxPSCoreC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USERES("dxPSdxOCLnkC14.res"); -USEUNIT("dxPSdxOCLnk.pas"); -USEUNIT("dxPSdxOCLnkReg.pas"); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC14.res deleted file mode 100644 index fc2c43bb..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC5.bpk deleted file mode 100644 index dc0b2390..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC5.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxOCLnkc5.bpl -OBJFILES = dxPSdxOCLnk.obj dxPSdxOCLnkReg.obj dxPSdxOCLnkc5.obj -RESFILES = dxPSdxOCLnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxorgcc5.bpi dxPSCorec5.bpi vcl50.bpi cxLibraryVCLC5.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC5.cpp deleted file mode 100644 index cc8e05d0..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC5.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcc5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("cxLibraryVCLC5.bpi"); -USERES("dxPSdxOCLnkc5.res"); -USEUNIT("dxPSdxOCLnk.pas"); -USEUNIT("dxPSdxOCLnkReg.pas"); -USEPACKAGE("vcl50.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC5.res deleted file mode 100644 index 28ebe990..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC6.bpk deleted file mode 100644 index 0d43df69..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC6.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxOCLnkC6.bpl -OBJFILES = dxPSdxOCLnk.obj dxPSdxOCLnkReg.obj dxPSdxOCLnkC6.obj -RESFILES = dxPSdxOCLnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib dxCoreC6.lib -PACKAGES = dxorgcC6.bpi dxPSCoreC6.bpi designide.bpi rtl.bpi vcl.bpi cxLibraryVCLC6.bpi dxCoreC6.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressOrgChart by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC6.cpp deleted file mode 100644 index 236952f5..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC6.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("dxorgcC6.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USERES("dxPSdxOCLnkC6.res"); -USEUNIT("dxPSdxOCLnk.pas"); -USEUNIT("dxPSdxOCLnkReg.pas"); -USEPACKAGE("vcl.bpi"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC6.res deleted file mode 100644 index e0a059f5..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD10.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD10.dpk deleted file mode 100644 index 3ccfbbaa..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD10.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxOCLnkD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD10, - DxorgcD10; - -contains - dxPSdxOCLnkReg, - dxPSdxOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD10.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD10.res deleted file mode 100644 index faf46fb7..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD10.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD11.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD11.dpk deleted file mode 100644 index 1fc410e7..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD11.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxOCLnkD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD11, - DxorgcD11; - -contains - dxPSdxOCLnkReg, - dxPSdxOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD11.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD11.res deleted file mode 100644 index df091f6f..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD11.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD12.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD12.dpk deleted file mode 100644 index 4af1b549..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD12.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxOCLnkD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD12, - DxorgcD12; - -contains - dxPSdxOCLnkReg, - dxPSdxOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD12.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD12.res deleted file mode 100644 index d05a4210..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD12.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD14.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD14.dpk deleted file mode 100644 index 26dadc89..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD14.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxOCLnkD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD14, - DxorgcD14; - -contains - dxPSdxOCLnkReg, - dxPSdxOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD14.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD14.res deleted file mode 100644 index 0267a1c4..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD14.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD5.dpk deleted file mode 100644 index 9470debe..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD5.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPSdxOCLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - DxorgcD5; - -contains - dxPSdxOCLnkReg, - dxPSdxOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD5.res deleted file mode 100644 index 7fec2eba..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD6.dpk deleted file mode 100644 index df21b372..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxOCLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD6, - DxorgcD6; - -contains - dxPSdxOCLnkReg, - dxPSdxOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD6.res deleted file mode 100644 index 73a01880..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD7.dpk deleted file mode 100644 index 5c4e044f..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxOCLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD7, - DxorgcD7; - -contains - dxPSdxOCLnkReg, - dxPSdxOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD7.res deleted file mode 100644 index 3a5175f6..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD9.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD9.dpk deleted file mode 100644 index a8f22d38..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD9.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxOCLnkD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLinks for ExpressOrgChart by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD9, - DxorgcD9; - -contains - dxPSdxOCLnkReg, - dxPSdxOCLnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD9.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD9.res deleted file mode 100644 index 5afceec6..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOCLnkD9.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC5.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC5.bpk deleted file mode 100644 index 54787eb9..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC5.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxOILnkc5.bpl -OBJFILES = dxPSdxOILnkReg.obj dxPSdxOILnk.obj dxPSdxOILnkc5.obj -RESFILES = dxPSdxOILnkc5.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = vcl50.lib -PACKAGES = dxPSCorec5.bpi dxObjInsC5.bpi dxPSdxInsLnkC5.bpi vcl50.bpi vclx50.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl50.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd50 -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressRTTIInspector by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC5.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC5.cpp deleted file mode 100644 index e64c7591..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC5.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("VCL50.bpi"); -USEPACKAGE("VCLX50.bpi"); -USEPACKAGE("dxcomnc5.bpi"); -USEPACKAGE("dxEdtrC5.bpi"); -USEPACKAGE("dxPSCorec5.bpi"); -USEPACKAGE("dxObjInsC5.bpi"); -USEPACKAGE("dxPSdxInsLnkC5.bpi"); -USERES("dxPSdxOILnkc5.res"); -USEUNIT("dxPSdxOILnkReg.pas"); -USEUNIT("dxPSdxOILnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC5.res deleted file mode 100644 index 940c43c1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC6.bpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC6.bpk deleted file mode 100644 index 33b07b5e..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC6.bpk +++ /dev/null @@ -1,171 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxPSdxOILnkC6.bpl -OBJFILES = dxPSdxOILnkReg.obj dxPSdxOILnk.obj dxPSdxOILnkC6.obj -RESFILES = dxPSdxOILnkC6.res -DEFFILE = -RESDEPEN = $(RESFILES) -LIBFILES = -LIBRARIES = -SPARELIBS = rtl.lib vcl.lib -PACKAGES = dxPSCoreC6.bpi dxObjInsC6.bpi dxPSdxInsLnkC6.bpi rtl.bpi vcl.bpi vclx.bpi -# --------------------------------------------------------------------------- -PATHCPP = .; -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES -USERDEFINES = -# --------------------------------------------------------------------------- -CFLAG1 = -I$(BCB)\include;$(BCB)\include\vcl -O2 -Hc -H=$(BCB)\lib\vcl60.csm -w -Ve \ - -Tkh30000 -a8 -k- -vi -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx \ - -tWM -CFLAG2 = -CFLAG3 = -PFLAGS = -DBCB -U$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -I$(BCB)\include;$(BCB)\include\vcl -$YD -$L- -$D- -v -M -JPHNE -LUdclstd -RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl -AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn /d_RTLDLL /dUSEPACKAGES -LFLAGS = -L$(LIBDIR);"$(SEARCHPATH)";$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ - -D"ExpressPrinting System ReportLink for ExpressRTTIInspector by Developer Express Inc." \ - -aa -Tpp -x -Gn -Gl -Gi -IFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -InMemoryExe=0 -ShowInfoMsgs=0 - -!endif - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< -# --------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC6.cpp b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC6.cpp deleted file mode 100644 index a65ecac6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC6.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- -#include -#pragma hdrstop -USEPACKAGE("vcl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("VCLX.bpi"); -USEPACKAGE("dxcomnC6.bpi"); -USEPACKAGE("dxEdtrC6.bpi"); -USEPACKAGE("dxPSCoreC6.bpi"); -USEPACKAGE("dxObjInsC6.bpi"); -USEPACKAGE("dxPSdxInsLnkC6.bpi"); -USERES("dxPSdxOILnkC6.res"); -USEUNIT("dxPSdxOILnkReg.pas"); -USEUNIT("dxPSdxOILnk.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- -// Package source. -//--------------------------------------------------------------------------- -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC6.res deleted file mode 100644 index b63f0125..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkC6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD5.dpk deleted file mode 100644 index 83d052a3..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD5.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxOILnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressRTTIInspector by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxObjInsD5, - dxPSCoreD5, - dxPSdxInsLnkD5; - -contains - dxPSdxOILnkReg, - dxPSdxOILnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD5.res deleted file mode 100644 index 0ea5dd2d..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD6.dpk deleted file mode 100644 index 37fc53a4..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD6.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxOILnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressRTTIInspector by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxObjInsD6, - dxPSCoreD6, - dxPSdxInsLnkD6; - -contains - dxPSdxOILnkReg, - dxPSdxOILnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD6.res deleted file mode 100644 index 90ff12dc..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD7.dpk deleted file mode 100644 index dde5cbd0..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD7.dpk +++ /dev/null @@ -1,38 +0,0 @@ -package dxPSdxOILnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressRTTIInspector by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxObjInsD7, - dxPSCoreD7, - dxPSdxInsLnkD7; - -contains - dxPSdxOILnkReg, - dxPSdxOILnk; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD7.res deleted file mode 100644 index 67f812a1..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPSdxOILnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD5.dpk deleted file mode 100644 index 8c65586b..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD5.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPsPrVwAdvD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Advanced Preview Window by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dxBarD5, - dxBarExtItemsD5; - -contains - dxPSPrVwAdv; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD5.res deleted file mode 100644 index 52937988..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD6.dpk deleted file mode 100644 index d068815a..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD6.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPsPrVwAdvD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Advanced Preview Window by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD6, - dxBarD6, - dxBarExtItemsD6; - -contains - dxPSPrVwAdv; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD6.res deleted file mode 100644 index ebed8247..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD7.dpk deleted file mode 100644 index f874eed4..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD7.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxPsPrVwAdvD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System Advanced Preview Window by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - dxPSCoreD7, - dxBarD7, - dxBarExtItemsD7; - -contains - dxPSPrVwAdv; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD7.res deleted file mode 100644 index 6c33e495..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPsPrVwAdvD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD5.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD5.dpk deleted file mode 100644 index ca18cd68..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD5.dpk +++ /dev/null @@ -1,41 +0,0 @@ -package dxPScxTLLnkD5; - -{$R *.res} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - vcl50, - dxPSCoreD5, - dxPScxCommonD5, - cxLibraryVCLD5, - dclcxLibraryVCLD5, - cxTreeListD5; - -contains - dxPScxTLLnk, - dxPScxTLLnkReg, - dxPScxTLLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD5.res b/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD5.res deleted file mode 100644 index 1b1c5bb8..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD5.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD6.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD6.dpk deleted file mode 100644 index 32e035de..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD6.dpk +++ /dev/null @@ -1,42 +0,0 @@ -package dxPScxTLLnkD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dxPSCoreD6, - dxPScxCommonD6, - cxLibraryVCLD6, - dclcxLibraryVCLD6, - cxTreeListVCLD6; - -contains - dxPScxTLLnk, - dxPScxTLLnkReg, - dxPScxTLLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD6.res b/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD6.res deleted file mode 100644 index d64e4809..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD6.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD7.dpk b/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD7.dpk deleted file mode 100644 index e79d51a6..00000000 --- a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD7.dpk +++ /dev/null @@ -1,43 +0,0 @@ -package dxPScxTLLnkD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressPrinting System ReportLink for ExpressQuantumTreeList 4 by Developer Express Inc.'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl, - designide, - dxPSCoreD7, - dxPScxCommonD7, - cxLibraryVCLD7, - dclcxLibraryVCLD7, - cxTreeListVCLD7; - -contains - dxPScxTLLnk, - dxPScxTLLnkReg, - dxPScxTLLnkPredefinedStyleSheets; - -end. diff --git a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD7.res b/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD7.res deleted file mode 100644 index c15a6081..00000000 Binary files a/internal/x.46/ExpressPrinting System/Packages/dxPscxTLLnkD7.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Sources/cxVer.inc b/internal/x.46/ExpressPrinting System/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/ExpressPrinting System/Sources/dxBase.pas b/internal/x.46/ExpressPrinting System/Sources/dxBase.pas deleted file mode 100644 index 7481641f..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxBase.pas +++ /dev/null @@ -1,624 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxBase; - -interface - -{$I cxVer.inc} - -uses - Classes, dxPSSngltn; - -type - TdxBaseObject = class; - - TdxLockState = (lsUnlock, lsLock); - - TdxLockUpdateEvent = procedure(Sender: TdxBaseObject; ALockState: TdxLockState) of object; - - TdxBaseObjectClass = class of TdxBaseObject; - - TdxBaseObject = class(TPersistent) - private - FUpdateCount: Integer; - FOnLockUpdate: TdxLockUpdateEvent; - protected - procedure DoAssign(Source: TdxBaseObject); virtual; - procedure DoRestoreDefaults; virtual; - - function IsLocked: Boolean; - procedure LockUpdate(ALockState: TdxLockState); dynamic; - - property UpdateCount: Integer read FUpdateCount; - property OnLockUpdate: TdxLockUpdateEvent read FOnLockUpdate write FOnLockUpdate; - public - constructor Create; virtual; - procedure Assign(Source: TPersistent); override; - - procedure BeginUpdate; - procedure CancelUpdate; - procedure EndUpdate; - - function Clone: TdxBaseObject; virtual; - function IsEmpty: Boolean; virtual; - function IsEqual(ABaseObject: TdxBaseObject): Boolean; virtual; - procedure RestoreDefaults; - - procedure LoadFromFile(const AFileName: string); dynamic; - procedure LoadFromStream(AStream: TStream); dynamic; - procedure SaveToFile(const AFileName: string); dynamic; - procedure SaveToStream(AStream: TStream); dynamic; - end; - - TdxClassList = class(TList) - private - function GetItem(Index: Integer): TClass; - procedure SetItem(Index: Integer; Value: TClass); - public - function Add(AClass: TClass; ACheckExistence: Boolean = True): Integer; - function Find(AClass: TClass; out AnIndex: Integer): Boolean; overload; - function Find(AClass: TClass): Boolean; overload; - function IndexOf(AClass: TClass): Integer; - procedure Insert(Index: Integer; AClass: TClass; ACheckExistence: Boolean = True); - function Remove(AClass: TClass): Integer; - {$IFDEF DELPHI5} - function Extract(AClass: TClass): TClass; - {$ENDIF} - function First: TClass; - function Last: TClass; - - property Items[Index: Integer]: TClass read GetItem write SetItem; default; - end; - - TdxPersistentClassList = class(TdxClassList) - private - function GetItem(Index: Integer): TPersistentClass; - procedure SetItem(Index: Integer; Value: TPersistentClass); - protected - procedure UnregisterAll; virtual; - public - procedure Clear; {$IFDEF DELPHI5} override; {$ENDIF} - {$IFDEF DELPHI5} - function Extract(AClass: TPersistentClass): TPersistentClass; - {$ENDIF} - function First: TPersistentClass; - function Last: TPersistentClass; - - function Register(AClass: TPersistentClass): Integer; overload; virtual; - procedure Register(AnIndex: Integer; AClass: TPersistentClass); overload; virtual; - procedure Unregister(AClass: TPersistentClass); virtual; - - property Items[Index: Integer]: TPersistentClass read GetItem write SetItem; default; - end; - - TdxCustomCache = class - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TObject; - protected - function Add(AnObject: TObject): Integer; - procedure FreeAndNilItems; - function IndexOfByClass(AClass: TClass): Integer; - - property Count: Integer read GetCount; - property Items[Index: Integer]: TObject read GetItem; - public - constructor Create; - destructor Destroy; override; - procedure Clear; virtual; - end; - - { Class Factories } - - TdxCustomClassFactory = class(TBasedxPSSingleton) - private - FItems: TdxClassList; - function GetCount: Integer; - function GetItem(Index: Integer): TClass; - protected - procedure FinalizeInstance; override; - procedure InitializeInstance; override; - property Items[Index: Integer]: TClass read GetItem; - public - function IndexOf(AClass: TClass): Integer; - procedure Register(AClass: TClass); virtual; - procedure Unregister(AClass: TClass); virtual; - procedure UnregisterAll; virtual; - property Count: Integer read GetCount; - end; - - { Maps } - - TdxCustomClassMapItemClass = class of TdxCustomClassMapItem; - - TdxCustomClassMapItem = class - public - class function PairClass: TClass; virtual; - end; - - TdxCustomClassMaps = class(TdxCustomClassFactory) - private - function GetItem(Index: Integer): TdxCustomClassMapItemClass; - protected - function GetPairClass(AClass: TClass): TdxCustomClassMapItemClass; virtual; - - property Items[Index: Integer]: TdxCustomClassMapItemClass read GetItem; - property PairClasses[AClass: TClass]: TdxCustomClassMapItemClass read GetPairClass; - end; - -procedure dxSavePersistent(AStream: TStream; APersistent: TPersistent); -procedure dxLoadPersistent(AStream: TStream; APersistent: TPersistent); - -implementation - -uses - SysUtils {$IFNDEF DELPHI5}, dxPSUtl {$ENDIF}; - -type - TdxSaver = class(TComponent) - private - FPersistent: TPersistent; - published - property Persistent: TPersistent read FPersistent write FPersistent; - end; - -procedure dxSavePersistent(AStream: TStream; APersistent: TPersistent); -var - Saver: TdxSaver; -begin - Assert(APersistent <> nil); - Saver := TdxSaver.Create(nil); - try - Saver.Persistent := APersistent; - AStream.WriteComponent(Saver); - finally - Saver.Free; - end; -end; - -procedure dxLoadPersistent(AStream: TStream; APersistent: TPersistent); -var - Saver: TdxSaver; -begin - Assert(APersistent <> nil); - Saver := TdxSaver.Create(nil); - try - Saver.Persistent := APersistent; - AStream.ReadComponent(Saver); - finally - Saver.Free; - end; -end; - -{ TdxBaseObject } - -constructor TdxBaseObject.Create; -begin - inherited Create; -end; - -procedure TdxBaseObject.Assign(Source: TPersistent); -begin - if Source is TdxBaseObject then - begin - BeginUpdate; - try - DoAssign(TdxBaseObject(Source)); - finally - EndUpdate; - end; - end - else - inherited; -end; - -procedure TdxBaseObject.BeginUpdate; -begin - if UpdateCount = 0 then LockUpdate(lsLock); - Inc(FUpdateCount); -end; - -procedure TdxBaseObject.CancelUpdate; -begin - if FUpdateCount <> 0 then Dec(FUpdateCount); -end; - -procedure TdxBaseObject.EndUpdate; -begin - if FUpdateCount <> 0 then - begin - Dec(FUpdateCount); - if UpdateCount = 0 then LockUpdate(lsUnlock); - end; -end; - -function TdxBaseObject.Clone: TdxBaseObject; -begin - Result := TdxBaseObjectClass(ClassType).Create; - try - Result.Assign(Self); - except - Result.Free; - raise; - end; -end; - -function TdxBaseObject.IsEmpty: Boolean; -begin - Result := False; -end; - -function TdxBaseObject.IsEqual(ABaseObject: TdxBaseObject): Boolean; -begin - Result := ABaseObject is ClassType; -end; - -procedure TdxBaseObject.RestoreDefaults; -begin - BeginUpdate; - try - DoRestoreDefaults; - finally - EndUpdate; - end; -end; - -procedure TdxBaseObject.SaveToFile(const AFileName: string); -var - AStream: TFileStream; -begin - AStream := TFileStream.Create(AFileName, fmCreate); - try - SaveToStream(AStream); - finally - AStream.Free; - end; -end; - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} -{$ENDIF} - -procedure TdxBaseObject.LoadFromFile(const AFileName: string); -var - AStream: TFileStream; -begin - AStream := TFileStream.Create(AFileName, fmOpenRead or fmShareDenyRead); - try - LoadFromStream(AStream); - finally - AStream.Free; - end; -end; - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM ON} -{$ENDIF} - -procedure TdxBaseObject.SaveToStream(AStream: TStream); -begin - dxSavePersistent(AStream, Self); -end; - -procedure TdxBaseObject.LoadFromStream(AStream: TStream); -begin - dxLoadPersistent(AStream, Self); -end; - -procedure TdxBaseObject.DoAssign(Source: TdxBaseObject); -begin -end; - -procedure TdxBaseObject.DoRestoreDefaults; -begin -end; - -function TdxBaseObject.IsLocked: Boolean; -begin - Result := FUpdateCount <> 0; -end; - -procedure TdxBaseObject.LockUpdate(ALockState: TdxLockState); -begin - if Assigned(FOnLockUpdate) then FOnLockUpdate(Self, ALockState); -end; - -{ TdxClassList } - -function TdxClassList.Add(AClass: TClass; ACheckExistence: Boolean = True): Integer; -begin - if not ACheckExistence or not Find(AClass, Result) then - Result := inherited Add(TObject(AClass)); -end; - -function TdxClassList.Find(AClass: TClass; out AnIndex: Integer): Boolean; -begin - AnIndex := IndexOf(AClass); - Result := AnIndex <> -1; -end; - -function TdxClassList.Find(AClass: TClass): Boolean; -begin - Result := IndexOf(AClass) <> -1; -end; - -function TdxClassList.IndexOf(AClass: TClass): Integer; -begin - Result := inherited IndexOf(TObject(AClass)); -end; - -procedure TdxClassList.Insert(Index: Integer; AClass: TClass; ACheckExistence: Boolean = True); -begin - if not ACheckExistence or not Find(AClass) then - inherited Insert(Index, TObject(AClass)); -end; - -function TdxClassList.Remove(AClass: TClass): Integer; -begin - Result := inherited Remove(TObject(AClass)); -end; - -{$IFDEF DELPHI5} -function TdxClassList.Extract(AClass: TClass): TClass; -begin - Result := TClass(inherited Extract(TObject(AClass))); -end; -{$ENDIF} - -function TdxClassList.First: TClass; -begin - Result := TClass(inherited First); -end; - -function TdxClassList.Last: TClass; -begin - Result := TClass(inherited Last); -end; - -function TdxClassList.GetItem(Index: Integer): TClass; -begin - Result := TClass(inherited Items[Index]); -end; - -procedure TdxClassList.SetItem(Index: Integer; Value: TClass); -begin - inherited Items[Index] := TObject(Value); -end; - -{ TdxPersistentClassList } - -procedure TdxPersistentClassList.Clear; -begin - UnregisterAll; - inherited; -end; - -{$IFDEF DELPHI5} -function TdxPersistentClassList.Extract(AClass: TPersistentClass): TPersistentClass; -begin - Result := TPersistentClass(inherited Extract(AClass)); -end; -{$ENDIF} - -function TdxPersistentClassList.First: TPersistentClass; -begin - Result := TPersistentClass(inherited First); -end; - -function TdxPersistentClassList.Last: TPersistentClass; -begin - Result := TPersistentClass(inherited Last); -end; - -function TdxPersistentClassList.Register(AClass: TPersistentClass): Integer; -begin - if (AClass <> nil) and not Find(AClass) then - begin - Result := Add(AClass); - Classes.RegisterClass(AClass); - end - else - Result := -1; -end; - -procedure TdxPersistentClassList.Register(AnIndex: Integer; AClass: TPersistentClass); -begin - if (AClass <> nil) and not Find(AClass) then - begin - Insert(AnIndex, AClass); - Classes.RegisterClass(AClass); - end; -end; - -procedure TdxPersistentClassList.Unregister(AClass: TPersistentClass); -var - Index: Integer; -begin - if Find(AClass, Index) then - begin - Classes.UnregisterClass(AClass); - Delete(Index); - end; -end; - -procedure TdxPersistentClassList.UnregisterAll; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Classes.UnregisterClass(Items[I]); -end; - -function TdxPersistentClassList.GetItem(Index: Integer): TPersistentClass; -begin - Result := TPersistentClass(inherited Items[Index]); -end; - -procedure TdxPersistentClassList.SetItem(Index: Integer; Value: TPersistentClass); -begin - inherited Items[Index] := Value; -end; - -{ TdxCustomCache } - -constructor TdxCustomCache.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TdxCustomCache.Destroy; -begin - FreeAndNilItems; - inherited; -end; - -procedure TdxCustomCache.Clear; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Free; - FItems.Clear; -end; - -function TdxCustomCache.Add(AnObject: TObject): Integer; -begin - Result := FItems.Add(AnObject); -end; - -procedure TdxCustomCache.FreeAndNilItems; -begin - Clear; - FreeAndNil(FItems); -end; - -function TdxCustomCache.IndexOfByClass(AClass: TClass): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].ClassType = AClass then Exit; - Result := -1; -end; - -function TdxCustomCache.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxCustomCache.GetItem(Index: Integer): TObject; -begin - Result := FItems[Index]; -end; - -{ TdxCustomClassFactory } - -procedure TdxCustomClassFactory.Register(AClass: TClass); -begin - FItems.Insert(0, AClass, True); -end; - -procedure TdxCustomClassFactory.Unregister(AClass: TClass); -begin - FItems.Remove(AClass); -end; - -procedure TdxCustomClassFactory.UnregisterAll; -begin - FItems.Clear; -end; - -procedure TdxCustomClassFactory.FinalizeInstance; -begin - FreeAndNil(FItems); - inherited; -end; - -procedure TdxCustomClassFactory.InitializeInstance; -begin - inherited; - FItems := TdxClassList.Create; -end; - -function TdxCustomClassFactory.IndexOf(AClass: TClass): Integer; -begin - Result := FItems.IndexOf(AClass); -end; - -function TdxCustomClassFactory.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxCustomClassFactory.GetItem(Index: Integer): TClass; -begin - Result := FItems[Index]; -end; - -{ TdxCustomClassMapItem } - -class function TdxCustomClassMapItem.PairClass: TClass; -begin - Result := nil; -end; - -{ TdxCustomClassMaps } - -function TdxCustomClassMaps.GetPairClass(AClass: TClass): TdxCustomClassMapItemClass; -var - Candidate: TdxCustomClassMapItemClass; - I: Integer; -begin - Candidate := nil; - if AClass <> nil then - for I := Count - 1 downto 0 do - begin - Result := Items[I]; - if AClass.InheritsFrom(Result.PairClass) and - ((Candidate = nil) or Result.PairClass.InheritsFrom(Candidate.PairClass)) then - Candidate := Result; - if (Candidate <> nil) and (Candidate.PairClass = AClass) then - Break; - end; - Result := Candidate; -end; - -function TdxCustomClassMaps.GetItem(Index: Integer): TdxCustomClassMapItemClass; -begin - Result := TdxCustomClassMapItemClass(inherited Items[Index]); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxBkgnd.pas b/internal/x.46/ExpressPrinting System/Sources/dxBkgnd.pas deleted file mode 100644 index 2e24d5fc..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxBkgnd.pas +++ /dev/null @@ -1,547 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxBkGnd; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, SysUtils, Controls, Graphics, dxBase, dxPSGlbl, dxPSUtl; - -type - TdxPicturePaintMode = (ppmCenter, ppmStretch, ppmTile, ppmProportional); - TdxBackgroundMode = (bmNone, bmBrush, bmBrushBitmap, bmPicture); - TdxBackgroundParam = (bpBkColor, bpBrush, bpMode, bpPictureMode, bpPicture); - TdxBackgroundParams = set of TdxBackgroundParam; - TdxPaintSequence = (psBefore, psAfter); - - TdxBackgroundChangeEvent = procedure(Sender: TObject; AChangeWhat: TdxBackgroundParams) of object; - - TCustomdxBackgroundPaintEvent = procedure(Sender: TObject; Canvas: TCanvas; - Rect: TRect; ASequence: TdxPaintSequence; var ADone: Boolean) of object; - - TCustomdxBackgroundPaintExEvent = procedure(Sender: TObject; Canvas: TCanvas; - Rect: TRect; ASequence: TdxPaintSequence; PixelsNumerator, - PixelsDenominator: Integer; var ADone: Boolean) of object; - - TdxBackgroundClass = class of TdxBackground; - - TdxBackground = class(TdxBaseObject) - private - FBkColor: TColor; - FBrush: TBrush; - FIsRepaintNeeded: Boolean; - FMode: TdxBackgroundMode; - FPicture: TGraphic; - FPictureMode: TdxPicturePaintMode; - FOnApply: TNotifyEvent; - FOnChange: TdxBackgroundChangeEvent; - FOnPaint: TCustomdxBackgroundPaintEvent; - FOnPaintEx: TCustomdxBackgroundPaintExEvent; - function GetPicture: TGraphic; - procedure SetBkColor(Value: tColor); - procedure SetBrush(Value: TBrush); - procedure SetMode(Value: TdxBackgroundMode); - procedure SetPicture(Value: TGraphic); - procedure SetPictureMode(Value: TdxPicturePaintMode); - - procedure BrushChanged(Sender: TObject); - procedure PictureChanged(Sender: TObject); - protected - procedure DoAssign(Source: TdxBaseObject); override; - procedure DoRestoreDefaults; override; - - procedure DoApply; dynamic; - procedure DoChange(AChangeWhats: TdxBackgroundParams); dynamic; - procedure DoPaint(ACanvas: TCanvas; Rect: TRect; Sequence: TdxPaintSequence; - var ADone: Boolean); virtual; - procedure DoPaintEx(ACanvas: TCanvas; Rect: TRect; Sequence: TdxPaintSequence; - PixelsNumerator, PixelsDenominator: Integer; var ADone: Boolean); virtual; - procedure LockUpdate(ALockState : TdxLockState); override; - function RepaintNeeded(AChangeWhats: TdxBackgroundParams): Boolean; virtual; - - property OnApply: TNotifyEvent read FOnApply write FOnApply; - public - constructor Create; override; - destructor Destroy; override; - - procedure Clear; virtual; - function IsEmpty: Boolean; override; - function IsEqual(ABaseObject: TdxBaseObject): Boolean; override; - - procedure Paint(ACanvas: TCanvas; const R: TRect); virtual; - procedure PaintEx(ACanvas: TCanvas; const R: TRect; - PixelsNumerator, PixelsDenominator: Integer); virtual; - - function SetupEffects: Boolean; - - property IsRepaintNeeded: Boolean read FIsRepaintNeeded; - property OnChange: TdxBackgroundChangeEvent read FOnChange write FOnChange; - property OnPaint: TCustomdxBackgroundPaintEvent read FOnPaint write FOnPaint; - property OnPaintEx: TCustomdxBackgroundPaintExEvent read FOnPaintEx write FOnPaintEx; - published - property BkColor: TColor read FBkColor write SetBkColor default clWhite; - property Brush: TBrush read FBrush write SetBrush; - property Mode: TdxBackgroundMode read FMode write SetMode default bmNone; - property Picture: TGraphic read GetPicture write SetPicture; - property PictureMode: TdxPicturePaintMode read FPictureMode write SetPictureMode default ppmCenter; - end; - -procedure DrawPicture(APicture: TGraphic; ACanvas: TCanvas; const ARect: TRect; - APictureMode: TdxPicturePaintMode; PixelsNumerator, PixelsDenominator: Integer; - AnOffsetX: Integer = 0; AnOffsetY: Integer = 0); - -const - cwAll: TdxBackgroundParams = [bpBkColor..bpPicture]; - -implementation - -uses - dxFEFDlg; - -constructor TdxBackground.Create; -begin - inherited; - FBkColor := clWhite; - FBrush := TBrush.Create; - FBrush.OnChange := BrushChanged; - FMode := bmNone; - FPictureMode := ppmCenter; - FPicture := TBitmap.Create; - FPicture.OnChange := PictureChanged; -end; - -destructor TdxBackground.Destroy; -begin - FreeAndNil(FPicture); - FreeAndNil(FBrush); - inherited; -end; - -procedure TdxBackground.Clear; -begin - Brush.Color := clWhite; - Mode := bmNone; - Picture := nil; -end; - -function TdxBackground.IsEmpty: Boolean; -begin - case Mode of - bmBrush: - Result := Brush.Style = bsClear; - bmBrushBitmap, - bmPicture: - Result := (Picture = nil) or Picture.Empty; - else //bmNone - Result := True; - end; -end; - -function TdxBackground.IsEqual(ABaseObject: TdxBaseObject): Boolean; -begin - Result := inherited IsEqual(ABaseObject); - if Result then - with TdxBackground(ABaseObject) do - Result := - (Self.BkColor = BkColor) and - (Self.Mode = Mode) and - (Self.PictureMode = PictureMode) and - dxAreBrushesEqual(Self.Brush, Brush) and - dxAreGraphicsEqual(Self.Picture, Picture); -end; - -procedure TdxBackground.Paint(ACanvas: TCanvas; const R: TRect); -begin - PaintEx(ACanvas, R, 1, 1); -end; - -procedure TdxBackground.PaintEx(ACanvas: TCanvas; const R: TRect; - PixelsNumerator, PixelsDenominator: Integer); -var - PrevColor: COLORREF; - PrevBkMode: Integer; - PrevBrush: TBrush; - Done: Boolean; - DC: HDC; - Pattern: TBitmap; -begin - Done := False; - DoPaintEx(ACanvas, R, psBefore, PixelsNumerator, PixelsDenominator, Done); - if Done then Exit; - - DC := ACanvas.Handle; - case Mode of - bmNone: ; - bmBrush: - if Brush.Style <> bsClear then - begin - if Brush.Style > bsClear then {hatched brush} - begin - PrevBkMode := SetBkMode(DC, Windows.TRANSPARENT); - PrevColor := Windows.SetBkColor(DC, ColorToRGB(BkColor)); - end - else {bsSolid} - begin - PrevBkMode := GetBkMode(DC); - PrevColor := COLORREF(0); - end; - if (Brush.Style > bsClear) and IsPrinterDC(DC) then {hatched Brush} - begin - Pattern := TBitmap.Create; - with Pattern do - try - Width := 8; - Height := 8; - Canvas.Brush := Self.Brush; - SetBkMode(DC, Windows.TRANSPARENT); - Windows.SetBkColor(DC, ColorToRGB(BkColor)); - Canvas.FillRect(Rect(0, 0, Width, Height)); - DrawPicture(Pattern, ACanvas, R, ppmTile, PixelsNumerator, PixelsDenominator); - finally - Free; - end; - end - else - FillRect(DC, R, Brush.Handle); - if Brush.Style > bsClear then - begin - Windows.SetBkColor(DC, PrevColor); - SetBkMode(DC, PrevBkMode); - end; - end; - - bmBrushBitmap: - if Picture <> nil then - if (Picture.Width <= 8) and (Picture.Height <= 8) and not IsPrinterDC(DC) then - begin - PrevBrush := TBrush.Create; - try - PrevBrush.Assign(ACanvas.Brush); - ACanvas.Brush.Bitmap := TBitmap(Picture); - ACanvas.FillRect(R); - ACanvas.Brush.Bitmap := nil; - ACanvas.Brush := PrevBrush; - finally - PrevBrush.Free; - end; - end - else - DrawPicture(Picture, ACanvas, R, ppmTile, PixelsNumerator, PixelsDenominator); - - bmPicture: - if Picture <> nil then - if (PictureMode = ppmTile) and (Picture.Width <= 8) and (Picture.Height <= 8) and not IsPrinterDC(DC) then - begin - PrevBrush := TBrush.Create; - try - PrevBrush.Assign(ACanvas.Brush); - ACanvas.Brush.Bitmap := TBitmap(Picture); - ACanvas.FillRect(R); - ACanvas.Brush.Bitmap := nil; - ACanvas.Brush := PrevBrush; - finally - PrevBrush.Free; - end; - end - else - DrawPicture(Picture, ACanvas, R, PictureMode, PixelsNumerator, PixelsDenominator); - end; - - DoPaintEx(ACanvas, R, psAfter, PixelsNumerator, PixelsDenominator, Done); -end; - -function TdxBackground.SetupEffects: Boolean; -begin - Result := dxFEFDialog(Self); -end; - -procedure TdxBackground.DoAssign(Source: TdxBaseObject); -begin - inherited; - with Source as TdxBackground do - begin - Self.BkColor := BkColor; - Self.Brush := Brush; - Self.Mode := Mode; - Self.PictureMode := PictureMode; - Self.Picture := Picture; - end; -end; - -procedure TdxBackground.DoRestoreDefaults; -begin - inherited; - FBkColor := clWhite; - FMode := bmNone; - FPictureMode := ppmCenter; -end; - -procedure TdxBackground.DoApply; -begin - if Assigned(FOnApply) then FOnApply(Self); -end; - -procedure TdxBackground.DoChange(AChangeWhats: TdxBackgroundParams); -begin - if not IsLocked then - begin - FIsRepaintNeeded := RepaintNeeded(AChangeWhats); - if Assigned(FOnChange) then FOnChange(Self, AChangeWhats); - end; -end; - -procedure TdxBackground.DoPaint(ACanvas: TCanvas; Rect: TRect; - Sequence: TdxPaintSequence; var ADone: Boolean); -begin - if Assigned(FOnPaint) then FOnPaint(Self, ACanvas, Rect, Sequence, ADone); -end; - -procedure TdxBackground.DoPaintEx(ACanvas: TCanvas; Rect: TRect; - Sequence: TdxPaintSequence; PixelsNumerator, PixelsDenominator: Integer; - var ADone: Boolean); -begin - if Assigned(FOnPaintEx) then - FOnPaintEx(Self, ACanvas, Rect, Sequence, PixelsNumerator, PixelsDenominator, ADone); - if not ADone then - DoPaint(ACanvas, Rect, Sequence, ADone); -end; - -procedure TdxBackground.LockUpdate(ALockState : TdxLockState); -begin - if ALockState = lsUnLock then DoChange(cwAll); - inherited LockUpdate(ALockState); -end; - -function TdxBackground.RepaintNeeded(AChangeWhats: TdxBackgroundParams): Boolean; -begin - if bpMode in AChangeWhats then - Result := True - else - case Mode of - bmBrush: - Result := (bpBrush in AChangeWhats) or ((bpBkColor in AChangeWhats) and (Brush.Style > bsClear)); - bmBrushBitmap: - Result := bpPicture in AChangeWhats; - bmPicture: - Result := [bpPicture, bpPictureMode] * AChangeWhats <> []; - else - Result := False; - end; -end; - -procedure TdxBackground.BrushChanged(Sender: TObject); -begin - DoChange([bpBrush]); -end; - -procedure TdxBackground.PictureChanged(Sender: TObject); -begin - DoChange([bpPicture]); -end; - -procedure TdxBackground.SetBkColor(Value: tColor); -begin - if FBkColor <> Value then - begin - FBkColor := Value; - DoChange([bpBkColor]); - end; -end; - -procedure TdxBackground.SetBrush(Value: TBrush); -begin - FBrush.Assign(Value); -end; - -procedure TdxBackground.SetMode(Value: TdxBackgroundMode); -begin - if FMode <> Value then - begin - FMode := Value; - DoChange([bpMode]); - end; -end; - -function TdxBackground.GetPicture: TGraphic; -begin - if FPicture = nil then FPicture := TBitmap.Create; - Result := FPicture; -end; - -procedure TdxBackground.SetPicture(Value: TGraphic); -begin - if Value <> nil then - begin - Picture.Assign(Value); - TBitmap(Picture).HandleType := bmDIB; - end - else - if FPicture <> nil then - begin - TBitmap(FPicture).FreeImage; - TBitmap(FPicture).ReleaseHandle; - end; -end; - -procedure TdxBackground.SetPictureMode(Value: TdxPicturePaintMode); -begin - if FPictureMode <> Value then - begin - FPictureMode := Value; - DoChange([bpPictureMode]); - end; -end; - -{ utility routines } - -function IsGraphicVisible(DC: HDC; const R: TRect): Boolean; -begin - Result := IsPrinterDC(DC) or IsMetafileDC(DC) or RectVisible(DC, R); -end; - -procedure DrawGraphicCenter(AGraphic: TGraphic; ACanvas: TCanvas; const ARect: TRect; - PixelsNumerator, PixelsDenominator: Integer); -var - DC: HDC; - W, H: Integer; - R: TRect; -begin - DC := ACanvas.Handle; - with ARect, AGraphic do - begin - W := MulDiv(Width, PixelsNumerator, PixelsDenominator); - H := MulDiv(Height, PixelsNumerator, PixelsDenominator); - R := Bounds(Left + (Right - Left - W) div 2, Top + (Bottom - Top - H) div 2, W, H); - if IsGraphicVisible(DC, R) then - if (W <> Width) or (H <> Height) then - ACanvas.StretchDraw(R, AGraphic) - else - ACanvas.Draw(R.Left, R.Top, AGraphic); - end; -end; - -procedure DrawGraphicStretch(AGraphic: TGraphic; ACanvas: TCanvas; const ARect: TRect; - PixelsNumerator, PixelsDenominator: Integer); -begin - if IsGraphicVisible(ACanvas.Handle, ARect) then - ACanvas.StretchDraw(ARect, AGraphic); -end; - -procedure DrawGraphicTile(AGraphic: TGraphic; ACanvas: TCanvas; const ARect: TRect; - PixelsNumerator, PixelsDenominator: Integer; AnOffsetX: Integer = 0; AnOffsetY: Integer = 0); -var - DC: HDC; - I, J, W, H: Integer; - Rgn: HRGN; - R: TRect; -begin - DC := ACanvas.Handle; - - with ARect, AGraphic do - begin - W := MulDiv(Width, PixelsNumerator, PixelsDenominator); - H := MulDiv(Height, PixelsNumerator, PixelsDenominator); - AnOffsetX := AnOffsetX mod W; - AnOffsetY := AnOffsetY mod H; - - Rgn := dxPSUtl.IntersectClipRect(DC, ARect); - - for I := 0 to (Right - Left - AnOffsetX) div W do - for J := 0 to (Bottom - Top - AnOffsetX) div H do - begin - R := Bounds(Left + I * W + AnOffsetX, Top + J * H + AnOffsetY, W, H); - if IsGraphicVisible(DC, R) then - if (W <> Width) or (H <> Height) then - ACanvas.StretchDraw(R, AGraphic) - else - ACanvas.Draw(R.Left, R.Top, AGraphic); - end; - - dxPSUtl.RestoreClipRgn(DC, Rgn); - end; -end; - -procedure DrawGraphicStretchProportional(AGraphic: TGraphic; ACanvas: TCanvas; const ARect: TRect; - PixelsNumerator, PixelsDenominator: Integer); -var - DC: HDC; - W, H, V: Integer; - R: TRect; -begin - DC := ACanvas.Handle; - with ARect, AGraphic do - begin - W := Right - Left; - H := Bottom - Top; - if Width / Height > W / H then - begin - V := MulDiv(Height, W, Width); - R := Bounds(Left, Top + (H - V) div 2, W, V); - end - else - begin - V := MulDiv(Width, H, Height); - R := Bounds(Left + (W - V) div 2, Top, V, H); - end; - if IsGraphicVisible(DC, R) then - ACanvas.StretchDraw(R, AGraphic); - end; -end; - -procedure DrawPicture(APicture: TGraphic; ACanvas: TCanvas; const ARect: TRect; - APictureMode: TdxPicturePaintMode; PixelsNumerator, PixelsDenominator: Integer; - AnOffsetX: Integer = 0; AnOffsetY: Integer = 0); -begin - if APicture.Empty or (APicture.Width = 0) or (APicture.Height = 0) then Exit; - case APictureMode of - ppmCenter: - DrawGraphicCenter(APicture, ACanvas, ARect, PixelsNumerator, PixelsDenominator); - ppmStretch: - DrawGraphicStretch(APicture, ACanvas, ARect, PixelsNumerator, PixelsDenominator); - ppmTile: - DrawGraphicTile(APicture, ACanvas, ARect, PixelsNumerator, PixelsDenominator, AnOffsetX, AnOffsetY); - ppmProportional: - DrawGraphicStretchProportional(APicture, ACanvas, ARect, PixelsNumerator, PixelsDenominator); - end; -end; - -initialization - RegisterClass(TBitmap); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxBrhDlg.dfm b/internal/x.46/ExpressPrinting System/Sources/dxBrhDlg.dfm deleted file mode 100644 index 6e90cb0d..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxBrhDlg.dfm +++ /dev/null @@ -1,71 +0,0 @@ -object dxBrushDlg: TdxBrushDlg - Left = 363 - Top = 214 - BorderStyle = bsDialog - Caption = 'Setup Brush properties' - ClientHeight = 120 - ClientWidth = 229 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object GroupBox1: TGroupBox - Left = 4 - Top = 1 - Width = 222 - Height = 85 - TabOrder = 0 - object lblColor: TLabel - Left = 6 - Top = 21 - Width = 29 - Height = 13 - Caption = '&Color:' - OnClick = lblClick - end - object lblStyle: TLabel - Left = 6 - Top = 53 - Width = 28 - Height = 13 - Caption = '&Style:' - OnClick = lblClick - end - object bvlColorHolder: TBevel - Left = 38 - Top = 16 - Width = 178 - Height = 23 - Visible = False - end - object bvlStyleHolder: TBevel - Left = 38 - Top = 48 - Width = 178 - Height = 22 - Visible = False - end - end - object btnOK: TButton - Left = 70 - Top = 93 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 151 - Top = 93 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxBrhDlg.pas b/internal/x.46/ExpressPrinting System/Sources/dxBrhDlg.pas deleted file mode 100644 index 00df514b..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxBrhDlg.pas +++ /dev/null @@ -1,215 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxBrhDlg; - -interface - -{$I cxVer.inc} - -uses - Classes, Graphics, Controls, ExtCtrls, StdCtrls, Buttons, dxPSForm; - -type - TdxBrushDlg = class(TCustomdxPSForm) - GroupBox1: TGroupBox; - lblColor: TLabel; - btnOK: TButton; - btnCancel: TButton; - lblStyle: TLabel; - bvlColorHolder: TBevel; - bvlStyleHolder: TBevel; - procedure ccbxStyleChange(Sender: TObject); - procedure ccbxColorChange(Sender: TObject); - procedure lblClick(Sender: TObject); - private - FBrush: TBrush; - FcbxColor: TCustomComboBox; - FcbxStyle: TCustomComboBox; - FLockControls: Boolean; - FModified: Boolean; - - procedure BrushChanged(Sender: TObject); - procedure SetBrush(Value: TBrush); - - procedure CreateControls; - procedure CreateBrush; - procedure LoadStrings; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; - - property Brush: TBrush read FBrush write SetBrush; - end; - -function AreEqualBrushes(const ABrushes: array of TBrush): Boolean; -function ChooseBrush(ABrush: TBrush): Boolean; - -implementation - -{$R *.DFM} - -uses - SysUtils, {$IFNDEF DELPHI5} dxPSUtl, {$ENDIF} cxClasses, dxExtCtrls, dxPSRes; - -function AreEqualBrushes(const ABrushes: array of TBrush): Boolean; -var - Brush: TBrush; - I: Integer; -begin - Result := False; - if High(ABrushes) - Low(ABrushes) > 1 then - begin - Brush := ABrushes[Low(ABrushes)]; - for I := Low(ABrushes) + 1 to High(ABrushes) do - if (Brush.Style <> ABrushes[I].Style) or (Brush.Color <> ABrushes[I].Color) then - Exit; - end; - Result := True; -end; - -function ChooseBrush(ABrush: TBrush): Boolean; -begin - Assert(ABrush <> nil); - with TdxBrushDlg.Create(nil) do - try - Brush := ABrush; - Result := Execute; - if Result then ABrush.Assign(Brush); - finally - Free; - end; -end; - -{ TdxBrushDlg } - -constructor TdxBrushDlg.Create(AOwner: TComponent); -begin - inherited; - CreateControls; - CreateBrush; - ActiveControl := FcbxColor; -end; - -destructor TdxBrushDlg.Destroy; -begin - FreeAndNil(FBrush); - inherited; -end; - -function TdxBrushDlg.Execute: Boolean; -begin - LoadStrings; - Result := (ShowModal = mrOk) and FModified; -end; - -procedure TdxBrushDlg.ccbxStyleChange(Sender: TObject); -begin - Brush.Style := TdxPSBrushStyleCombo(Sender).BrushStyle; -end; - -procedure TdxBrushDlg.ccbxColorChange(Sender: TObject); -begin - Brush.Color := TdxPSColorCombo(Sender).ColorValue; -end; - -procedure TdxBrushDlg.lblClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TCustomComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxBrushDlg.CreateControls; -begin - FcbxColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(FcbxColor) do - begin - BoundsRect := bvlColorHolder.BoundsRect; - Parent := GroupBox1; - DropDownCount := 8; - ShowColorName := True; - OnChange := ccbxColorChange; - end; - lblColor.FocusControl := FcbxColor; - - FcbxStyle := TdxPSBrushStyleCombo.Create(Self); - with TdxPSBrushStyleCombo(FcbxStyle) do - begin - BoundsRect := bvlStyleHolder.BoundsRect; - Parent := GroupBox1; - ShowStyleName := True; - OnChange := ccbxStyleChange; - end; - lblStyle.FocusControl := FcbxStyle; -end; - -procedure TdxBrushDlg.CreateBrush; -begin - FBrush := TBrush.Create; - FBrush.Color := clBlack; - FBrush.Style := bsSolid; - FBrush.OnChange := BrushChanged; -end; - -procedure TdxBrushDlg.LoadStrings; -begin - Caption := cxGetResourceString(@sdxBrushDlgCaption); - lblColor.Caption := cxGetResourceString(@sdxColor); - lblStyle.Caption := cxGetResourceString(@sdxStyle); - btnOk.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); -end; - -procedure TdxBrushDlg.BrushChanged(Sender: TObject); -begin - FModified := True; - FLockControls := True; - try - TdxPSColorCombo(FcbxColor).ColorValue := Brush.Color; - TdxPSBrushStyleCombo(FcbxStyle).BrushColor := Brush.Color; - TdxPSBrushStyleCombo(FcbxStyle).BrushStyle := Brush.Style; - finally - FLockControls := False; - end; -end; - -procedure TdxBrushDlg.SetBrush(Value: TBrush); -begin - Brush.Assign(Value); - FModified := False; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxExtCtrls.pas b/internal/x.46/ExpressPrinting System/Sources/dxExtCtrls.pas deleted file mode 100644 index b5fe693e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxExtCtrls.pas +++ /dev/null @@ -1,3134 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxExtCtrls; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, Classes, Graphics, Controls, StdCtrls, ExtCtrls, ComCtrls, - ImgList, Menus, Forms, Dialogs, dxCore; - -type - { TdxPSSpinEdit } - - TdxButtonType = (btLine, btPage); - TdxSpinValueType = (svtInteger, svtFloat); - TdxScrollMouseSensetivity = (msLow, msMedium, msHigh); - - TdxSpinButtonClickEvent = procedure(Sender: TObject; ButtonType: TdxButtonType; - Button: TUDBtnType) of object; - - TdxPSSpinEdit = class(TCustomEdit) - private - FAlignment: TAlignment; - FArrowKeys: Boolean; - FCheckBounds: Boolean; - FDecimal: Byte; - FDefaultValue: Extended; - FEditorEnabled: Boolean; - FFlat: Boolean; - FIncrButtonWidth: Integer; - FIncrement: Extended; - FLastGoodValue: Extended; - FLegendText: string; - FLockChange: Boolean; - FMaxValue: Extended; - FMinValue: Extended; - FMouseInControl: Boolean; - FPageIncrButtonWidth: Integer; - FPageIncrement: Extended; - FPageUpDown: TCustomUpDown; - FSaveValue: Extended; - FScrollMouseSens: TdxScrollMouseSensetivity; - FUpDown: TCustomUpDown; - FUsePageIncr: Boolean; - FValueType: TdxSpinValueType; - FOnButtonClick: TdxSpinButtonClickEvent; - function GetAsInteger: Longint; - function GetButtonWidth: Integer; - function GetLegendText: string; - function GetMinHeight: Integer; - function IsDefaultValueStored: Boolean; - function IsIncrButtonWidthStored: Boolean; - function IsIncrementStored: Boolean; - function IsMaxStored: Boolean; - function IsMinStored: Boolean; - function IsPageIncrButtonWidthStored: Boolean; - function IsPageIncrementStored: Boolean; - function IsValueStored: Boolean; - procedure SetAlignment(Value: TAlignment); - procedure SetAsInteger(NewValue: Longint); - procedure SetCheckBounds(Value: Boolean); - procedure SetDecimal(NewValue: Byte); - procedure SetDefaultValue(NewDefaultValue: Extended); - procedure SetFlat(Value: Boolean); - procedure SetIncrButtonWidth(Value: Integer); - procedure SetLegendText(const Value: string); - procedure SetMaxValue(Value: Extended); - procedure SetMinValue(Value: Extended); - procedure SetPageIncrButtonWidth(Value: Integer); - procedure SetScrollMouseSens(Value: TdxScrollMouseSensetivity); - procedure SetUsePageIncr(Value: Boolean); - procedure SetValueType(NewType: TdxSpinValueType); - procedure GetTextHeight(var SysHeight, Height: Integer); - procedure PageUpDownClick(Sender: TObject; Button: TUDBtnType); - procedure RecreateButton; - procedure ResizeButtons; - procedure SetEditRect; - procedure UpDownClick(Sender: TObject; Button: TUDBtnType); - procedure WMContextMenu(var Message: TWMContextMenu); message WM_CONTEXTMENU; - procedure WMCut(var Message: TWMCut); message WM_CUT; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMMouseWheel(var Message: TWMMouseWheel); message WM_MOUSEWHEEL; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure WMPaste(var Message: TWMPaste); message WM_PASTE; - {$IFNDEF DELPHI5} - procedure WMRButtonUp(var Message: TWMRButtonUp); message WM_RBUTTONUP; - {$ENDIF} - procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; - procedure WMSize(var Message: TWMSize); message WM_SIZE; - procedure CMBiDiModeChanged(var Message: TMessage); message CM_BIDIMODECHANGED; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure CMEnter(var Message: TCMEnter); message CM_ENTER; - procedure CMExit(var Message: TCMExit); message CM_EXIT; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - protected - procedure Change; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - - function CheckValue(NewValue: Extended): Extended; - procedure DoButtonClick(ButtonType: TdxButtonType; Button: TUDBtnType); - function GetValue: Extended; virtual; - function GetValueText: string; virtual; - function IsValidChar(Key: Char): Boolean; virtual; - procedure SetValue(NewValue: Extended); virtual; - procedure SpecialKeyClick(Key: Word; Shift: TShiftState; Sender: TObject); - public - constructor Create(AOwner: TComponent); override; - property AsInteger: Longint read GetAsInteger write SetAsInteger; - property Text; - published - property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify; - property ArrowKeys: Boolean read FArrowKeys write FArrowKeys default True; - property CheckBounds: Boolean read FCheckBounds write SetCheckBounds default True; - property UsePageIncr: Boolean read FUsePageIncr write SetUsePageIncr default False; - property PageIncrement: Extended read FPageIncrement write FPageIncrement stored IsPageIncrementStored; - property IncrButtonWidth: Integer read FIncrButtonWidth write SetIncrButtonWidth stored IsIncrButtonWidthStored; - property PageIncrButtonWidth: Integer read FPageIncrButtonWidth write SetPageIncrButtonWidth stored IsPageIncrButtonWidthStored; - property ScrollMouseSens: TdxScrollMouseSensetivity read FScrollMouseSens write SetScrollMouseSens default msMedium; - property DefaultValue: Extended read FDefaultValue write SetDefaultValue stored IsDefaultValueStored; - property Decimal: Byte read FDecimal write SetDecimal default 2; - property EditorEnabled: Boolean read FEditorEnabled write FEditorEnabled default True; - property Flat: Boolean read FFlat write SetFlat default False; - property Increment: Extended read FIncrement write FIncrement stored IsIncrementStored; - property LegendText: string read GetLegendText write SetLegendText; - property MaxValue: Extended read FMaxValue write SetMaxValue stored IsMaxStored; - property MinValue: Extended read FMinValue write SetMinValue stored IsMinStored; - property ValueType: TdxSpinValueType read FValueType write SetValueType default svtInteger; - property Value: Extended read GetValue write SetValue stored IsValueStored; - - property Anchors; - property AutoSelect; - property AutoSize; - property BiDiMode; - property Color; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property Font; - property ImeMode; - property ImeName; - property MaxLength; - property ParentBiDiMode; - property ParentColor; - property ParentFont; - property ParentShowHint; - property ReadOnly; - property ShowHint; - property TabOrder; - property TabStop; - property Visible; - property OnButtonClick: TdxSpinButtonClickEvent read FOnButtonClick write FOnButtonClick; - property OnChange; - property OnClick; - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnStartDock; - property OnStartDrag; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - end; - - { TdxPSColorCombo } - - TdxColorType = (ctPure, ctSystem); - TdxColorTypes = set of TdxColorType; - - TdxColorKind = (ckNormal, ckAuto, ckCustom); - - TdxSelectColorProc = function(var AColor: TColor): Boolean of object; - - TdxGetSelectColorProcEvent = procedure(Sender: TObject; - var SelectColorProc: TdxSelectColorProc) of object; - - TdxOnGetColorNameEvent = procedure(Sender: TObject; Index: Integer; - AColor: TColor; AKind: TdxColorKind; var AName: string) of object; - - TdxPSColorCombo = class(TCustomComboBox) - private - FAutoColor: TColor; - FAutoColorText: string; - FColorTypes: TdxColorTypes; - FCustomColorText: string; - FDropDownCountAssigned: Boolean; - FEndEllipsis: Boolean; - FIsAutoColorTextAssigned: Boolean; - FIsCustomColorTextAssigned: Boolean; - FSelEndOk: Boolean; - FShowAutoColor: Boolean; - FShowColorName: Boolean; - FShowCustomColor: Boolean; - FOnGetColorName: TdxOnGetColorNameEvent; - FOnGetSelectColorProc: TdxGetSelectColorProcEvent; - function GetActualDropDownCount: Integer; - function GetAutoColorText: string; - function GetColorTypes: TdxColorTypes; - function GetColorValue: TColor; - function GetCustomColorText: string; - function GetIsAutoColorSelected: Boolean; - function IsAutoColorTextStored: Boolean; - function IsCustomColorTextStored: Boolean; - procedure SetAutoColor(Value: TColor); - procedure SetAutoColorText(const Value: string); - procedure SetColorTypes(Value: TdxColorTypes); - procedure SetColorValue(Value: TColor); - procedure SetCustomColorText(const Value: string); - procedure SetEndEllipsis(Value: Boolean); - procedure SetShowAutoColor(Value: Boolean); - procedure SetShowColorName(Value: Boolean); - procedure SetShowCustomColor(Value: Boolean); - - function FindRGB(AColor: TColor): Integer; - procedure ResetItemHeight; - procedure SelectCustomColor; - function StandardSelectColorProc(var AColor: TColor): Boolean; - - procedure ReadIsAutoColorTextAssigned(AReader: TReader); - procedure ReadIsCustomColorTextAssigned(AReader: TReader); - procedure WriteIsAutoColorTextAssigned(AWriter: TWriter); - procedure WriteIsCustomColorTextAssigned(AWriter: TWriter); - procedure CMBiDiModeChanged(var Message: TMessage); message CM_BIDIMODECHANGED; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - procedure CMRecreateWnd(var Message: TMessage); message CM_RECREATEWND; - procedure CNCommand(var Message: TWMCommand); message CN_COMMAND; - protected - procedure Click; override; - procedure CreateWnd; override; - procedure DefineProperties(Filer: TFiler); override; - procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure SetDropDownCount(const Value: Integer);{$IFDEF DELPHI6} override; {$ENDIF} - - function GetColorName(Index: Integer): string; virtual; - procedure RefreshItems; - function SelectColorProc: TdxSelectColorProc; dynamic; - public - constructor Create(AOwner: TComponent); override; - - function DefaultAutoColorText: string; virtual; - function DefaultCustomColorText: string; virtual; - - property ActualDropDownCount: Integer read GetActualDropDownCount; - property ColorNames[Index: Integer]: string read GetColorName; - property DropDownCountAssigned: Boolean read FDropDownCountAssigned write FDropDownCountAssigned; - property IsAutoColorSelected: Boolean read GetIsAutoColorSelected; - published - property Anchors; - property AutoColor: TColor read FAutoColor write SetAutoColor default clWindowText; - property AutoColorText: string read GetAutoColorText write SetAutoColorText stored IsAutoColorTextStored; - property BiDiMode; - property Color; - property ColorTypes: TdxColorTypes read GetColorTypes write SetColorTypes default [ctPure, ctSystem]; - property ColorValue: TColor read GetColorValue write SetColorValue default clBlack; - property Constraints; - property CustomColorText: string read GetCustomColorText write SetCustomColorText stored IsCustomColorTextStored; - property Ctl3D; - property DragKind; - property DragMode; - property DragCursor; - property DropDownCount write SetDropDownCount; - property Enabled; - property EndEllipsis: Boolean read FEndEllipsis write SetEndEllipsis default False; - property Font; - property ImeMode; - property ImeName; - property ParentBiDiMode; - property ParentColor; - property ParentCtl3D; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ShowAutoColor: Boolean read FShowAutoColor write SetShowAutoColor default False; - property ShowColorName: Boolean read FShowColorName write SetShowColorName default True; - property ShowCustomColor: Boolean read FShowCustomColor write SetShowCustomColor default True; - property ShowHint; - property TabOrder; - property TabStop; - property Visible; - property OnChange; - property OnClick; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnDropDown; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnGetColorName: TdxOnGetColorNameEvent read FOnGetColorName write FOnGetColorName; - property OnGetSelectColorProc: TdxGetSelectColorProcEvent read FOnGetSelectColorProc write FOnGetSelectColorProc; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnStartDock; - property OnStartDrag; - end; - - { TdxPSBrushStyleCombo } - - TdxGetBrushStyleNameEvent = procedure(Sender: TObject; Index: Integer; - AStyle: TBrushStyle; var AName: string) of object; - - TdxPSBrushStyleCombo = class(TCustomComboBox) - private - FBrushColor: TColor; - FEndEllipsis: Boolean; - FShowStyleName: Boolean; - FOnGetBrushStyleName: TdxGetBrushStyleNameEvent; - function GetStyle(Index: Integer): TBrushStyle; - function GetStyleIndex(Style: TBrushStyle): Integer; - function GetStyleValue: TBrushStyle; - procedure SetBrushColor(Value: TColor); - procedure SetEndEllipsis(Value: Boolean); - procedure SetShowStyleName(Value: Boolean); - procedure SetStyleValue(Value: TBrushStyle); - procedure RefreshItems; - procedure ResetItemHeight; - procedure CMBiDiModeChanged(var Message: TMessage); message CM_BIDIMODECHANGED; - procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; - procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; - procedure CMRecreateWnd(var Message: TMessage); message CM_RECREATEWND; - protected - procedure CreateWnd; override; - procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; - function GetStyleName(Index: Integer): string; virtual; - property Sorted; - public - constructor Create(AOwner: TComponent); override; - property StyleIndexes[Style: TBrushStyle]: Integer read GetStyleIndex; - property StyleNames[Index: Integer]: string read GetStyleName; - property Styles[Index: Integer]: TBrushStyle read GetStyle; - published - property Anchors; - property BiDiMode; - property BrushColor: TColor read FBrushColor write SetBrushColor default clWindowText; - property BrushStyle: TBrushStyle read GetStyleValue write SetStyleValue default bsSolid; - property Color; - property Constraints; - property Ctl3D; - property DragKind; - property DragMode; - property DragCursor; - property Enabled; - property EndEllipsis: Boolean read FEndEllipsis write SetEndEllipsis default False; - property Font; - property ImeMode; - property ImeName; - property ParentBiDiMode; - property ParentColor; - property ParentCtl3D; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property ShowHint; - property ShowStyleName: Boolean read FShowStyleName write SetShowStyleName default False; - property TabOrder; - property TabStop; - property Visible; - property OnChange; - property OnClick; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnDropDown; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnGetBrushStyleName: TdxGetBrushStyleNameEvent read FOnGetBrushStyleName write FOnGetBrushStyleName; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnStartDock; - property OnStartDrag; - end; - -{ TdxPSPaintPanel } - -{$IFDEF BCB} - {$IFDEF CBUILDER4} - {$DEFINE CANDEFINE_DOUBLEBUFFERED} - {$ENDIF} -{$ELSE} - {$DEFINE CANDEFINE_DOUBLEBUFFERED} -{$ENDIF} - - TdxEdgeBorder = (ebLeft, ebTop, ebRight, ebBottom); - TdxEdgeBorders = set of TdxEdgeBorder; - - TdxEdgeStyle = (esNone, esRaised, esSunken); - - TdxPSPaintPanel = class(TCustomPanel) - private - FEdgeBorders: TdxEdgeBorders; - FEdgeInner: TdxEdgeStyle; - FEdgeOuter: TdxEdgeStyle; - FOnMouseEnter: TNotifyEvent; - FOnMouseLeave: TNotifyEvent; - FOnPaint: TNotifyEvent; - function GetEdgeBorders: TdxEdgeBorders; - procedure SetEdgeBorders(Value: TdxEdgeBorders); - procedure SetEdgeInner(Value: TdxEdgeStyle); - procedure SetEdgeOuter(Value: TdxEdgeStyle); - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure CMCtl3DChanged(var Message: TMessage); message CM_CTL3DCHANGED; - procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; - procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; - procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; - protected - procedure Paint; override; - procedure DoPaint; dynamic; - procedure DoMouseEnter; dynamic; - procedure DoMouseLeave; dynamic; - public - constructor Create(AOwner: TComponent); override; - property Canvas; - published - property Align; - property Anchors; - property Constraints; - property DragKind; - {$IFDEF CANDEFINE_DOUBLEBUFFERED} - property DoubleBuffered default True; - {$ENDIF} - property EdgeBorders: TdxEdgeBorders read GetEdgeBorders write SetEdgeBorders default [ebLeft, ebTop, ebRight, ebBottom]; - property EdgeInner: TdxEdgeStyle read FEdgeInner write SetEdgeInner default esRaised; - property EdgeOuter: TdxEdgeStyle read FEdgeOuter write SetEdgeOuter default esSunken; - property DragCursor; - property DragMode; - property Enabled; - property Ctl3D; - property ParentColor; - property ParentCtl3D; - property ParentShowHint; - property PopupMenu; - property ShowHint; - property TabOrder; - property TabStop; - property Visible; - property OnPaint: TNotifyEvent read FOnPaint write FOnPaint; - property OnCanResize; - property OnConstrainedResize; - property OnClick; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnMouseDown; - property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter; - property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave; - property OnMouseMove; - property OnMouseUp; - property OnResize; - property OnStartDock; - property OnStartDrag; - end; - - { TdxPSBitmapAnimator } - - TdxPSBitmapAnimator = class(TGraphicControl) - private - FAnimationSpeed: Integer; - FAnimationStepCount: Integer; - FBitmap: TBitmap; - FState: Boolean; - procedure SetBitmap(Value: TBitmap); - procedure SetState(Value: Boolean); - protected - procedure Paint; override; - procedure Resize; override; - - procedure Animate; dynamic; - procedure StateChanged; dynamic; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - published - property AnimationSpeed: Integer read FAnimationSpeed write FAnimationSpeed {ms} default 10; - property AnimationStepCount: Integer read FAnimationStepCount write FAnimationStepCount default 10; - property Bitmap: TBitmap read FBitmap write SetBitmap; - property State: Boolean read FState write SetState default False; - end; - - { TdxPSWarningPane } - - TdxPSWarningPane = class(TdxPSBitmapAnimator) - private - FHint: string; - procedure SetHint(const Value: string); - protected - procedure InitializeBitmap; virtual; - procedure InitializeBitmapHint(var R: TRect); virtual; - procedure StateChanged; override; - public - constructor Create(AOwner: TComponent); override; - procedure SetStateAndHint(NewState: Boolean; const AHint: string); - published - property Font; - property Hint: string read FHint write SetHint; - end; - - { TdxPSImageScrollBox } - - TdxPSImageScrollBoxBuiltInMenuItem = (biiPreview, biiCopy, biiSave); - TdxPSImageScrollBoxBuiltInMenuItems = set of TdxPSImageScrollBoxBuiltInMenuItem; - - TdxPSImageScrollBox = class(TScrollBox) - private - FBuiltInImages: TCustomImageList; - FBuiltInMenu: TPopupMenu; - FBuiltInMenuItemsVisibility: TdxPSImageScrollBoxBuiltInMenuItems; - FCanvas: TControlCanvas; - FCenter: Boolean; - FHintText: string; - FIsGraphicInvalid: Boolean; - FPicture: TPicture; - function GetCanvas: TCanvas; - function GetHasGraphic: Boolean; - function GetHasPictureRestRectBottom: Boolean; - function GetHasPictureRestRectLeft: Boolean; - function GetHasPictureRestRectRight: Boolean; - function GetHasPictureRestRectTop: Boolean; - function GetHasScrollBars: Boolean; - function GetHasScrollHorzBar: Boolean; - function GetHasScrollVertBar: Boolean; - function GetHintTextRect: TRect; - function GetIsPictureHeightExceedControlBounds: Boolean; - function GetIsPictureWidthExceedControlBounds: Boolean; - function GetPictureOriginX: Integer; - function GetPictureOriginY: Integer; - function GetPictureHeight: Integer; - function GetPictureRect: TRect; - function GetPictureWidth: Integer; - function GetPictureRestRectBottom: TRect; - function GetPictureRestRectRight: TRect; - function GetPictureRestRectLeft: TRect; - function GetPictureRestRectTop: TRect; - procedure SetCenter(Value: Boolean); - procedure SetHintText(const Value: string); - procedure SetPicture(Value: TPicture); - - procedure BuiltInMenuPopup(Sender: TObject); - procedure CopyClick(Sender: TObject); - procedure SaveClick(Sender: TObject); - procedure PreviewClick(Sender: TObject); - procedure PictureChanged(Sender: TObject); - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMMouseActivate(var Message: TWMMouseActivate); message WM_MOUSEACTIVATE; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure WMPaint(var Message: TWMPaint); message WM_PAINT; - protected - miCopy: TMenuItem; - miLine1: TMenuItem; - miLine2: TMenuItem; - miPreview: TMenuItem; - miSave: TMenuItem; - procedure CreateParams(var Params: TCreateParams); override; - procedure DblClick; override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override; - - procedure CreateBuiltInImages; virtual; - procedure CreateBuiltInMenu; virtual; - procedure DrawHint; virtual; - procedure DrawPicture; virtual; - procedure DrawPictureRestSpace; virtual; - procedure Paint; virtual; - - property HasPictureRestRectBottom: Boolean read GetHasPictureRestRectBottom; - property HasPictureRestRectLeft: Boolean read GetHasPictureRestRectLeft; - property HasPictureRestRectRight: Boolean read GetHasPictureRestRectRight; - property HasPictureRestRectTop: Boolean read GetHasPictureRestRectTop; - property HasScrollBars: Boolean read GetHasScrollBars; - property HasScrollHorzBar: Boolean read GetHasScrollHorzBar; - property HasScrollVertBar: Boolean read GetHasScrollVertBar; - property HintTextRect: TRect read GetHintTextRect; - property IsPictureHeightExceedControlBounds: Boolean read GetIsPictureHeightExceedControlBounds; - property IsPictureWidthExceedControlBounds: Boolean read GetIsPictureWidthExceedControlBounds; - property PictureHeight: Integer read GetPictureHeight; - property PictureOriginX: Integer read GetPictureOriginX; - property PictureOriginY: Integer read GetPictureOriginY; - property PictureRect: TRect read GetPictureRect; - property PictureRestRectBottom: TRect read GetPictureRestRectBottom; - property PictureRestRectLeft: TRect read GetPictureRestRectLeft; - property PictureRestRectRight: TRect read GetPictureRestRectRight; - property PictureRestRectTop: TRect read GetPictureRestRectTop; - property PictureWidth: Integer read GetPictureWidth; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - property BuiltInImages: TCustomImageList read FBuiltInImages; - property BuiltInMenu: TPopupMenu read FBuiltInMenu; - property BuiltInMenuItemsVisibility: TdxPSImageScrollBoxBuiltInMenuItems read FBuiltInMenuItemsVisibility - write FBuiltInMenuItemsVisibility default [biiPreview..biiSave]; - property Canvas: TCanvas read GetCanvas; - property HasGraphic: Boolean read GetHasGraphic; - published - property Center: Boolean read FCenter write SetCenter default True; - property HintText: string read FHintText write SetHintText; - property Picture: TPicture read FPicture write SetPicture; - end; - -function WarningSignBitmap: TBitmap; - -var - UseAllColorValuesInDropDownList: Boolean = True; - -implementation - -uses - {$IFDEF DELPHI7} - Themes, UxTheme, - {$ENDIF} - CommCtrl, SysUtils, Registry, ExtDlgs, ClipBrd, cxClasses, dxPSUtl, dxPSImgs, - dxPSGlbl, dxPSRes, dxPCPrVw, dxPSPopupMan, dxExtCtrlsStrs; - -const - MinButtonWidth = 9; - ScrollMouseSensibility: array[TdxScrollMouseSensetivity] of Integer = (10, 5, 1); - - PureColors: array[0..19] of TColor = - (clBlack, clOlive, clTeal, clGreen, clMoneyGreen, clLime, clNavy, clBlue, - clAqua, clSkyBlue, clGray, clMedGray, clSilver, clMaroon, clPurple, clFuchsia, clRed, - clCream, clYellow, clWhite); - SysColors: array[0..24] of TColor = - (clScrollBar, clBackground, clActiveCaption, clInactiveCaption, clMenu, - clWindow, clWindowFrame, clMenuText, clWindowText, clCaptionText, clActiveBorder, - clInactiveBorder, clAppWorkSpace, clHighlight, clHighlightText, clBtnFace, - clBtnShadow, clGrayText, clBtnText, clInactiveCaptionText, clBtnHighlight, - cl3DDkShadow, cl3DLight, clInfoText, clInfoBk); - -var - FWarningSignBitmap: TBitmap; - -function WarningSignBitmap: TBitmap; -begin - if FWarningSignBitmap = nil then - begin - FWarningSignBitmap := TBitmap.Create; - Bitmap_LoadFromResourceName(FWarningSignBitmap, IDB_DXPSWARNINGSIGN); - FWarningSignBitmap.Transparent := True; - end; - Result := FWarningSignBitmap; -end; - -type - TdxUpDown = class(TCustomUpDown) - private - FLockChange: Boolean; - FMouseSensibility: TdxScrollMouseSensetivity; - FPrevMousePos: TSmallPoint; - procedure CancelScroll; - function MouseInSplitRegion(Pt: TSmallPoint): Boolean; - procedure ScrollMessage(var Message: TWMScroll); - procedure WMCaptureChanged(var Message: TMessage); message WM_CAPTURECHANGED; - procedure WMHScroll(var Message: TWMHScroll); message CN_HSCROLL; - procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; - procedure WMLButtonUp(var Message: TWMLButtonUp); message WM_LBUTTONUP; - procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE; - {$IFNDEF DELPHI5} - procedure WMRButtonUp(var Message: TWMRButtonUp); message WM_RBUTTONUP; - {$ENDIF} - procedure WMVScroll(var Message: TWMVScroll); message CN_VSCROLL; - protected - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - public - constructor Create(AOwner: TComponent); override; - - property MouseSensibility: TdxScrollMouseSensetivity read FMouseSensibility write FMouseSensibility default msMedium; - property PopupMenu; - property OnClick; - end; - -constructor TdxUpDown.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - Orientation := udVertical; - Min := -1; - Max := 1; - Position := 0; - MouseSensibility := msMedium; -end; - -procedure TdxUpDown.KeyDown(var Key: Word; Shift: TShiftState); -begin - if (GetCapture = Handle) and (Key = VK_ESCAPE) then - CancelScroll; - inherited KeyDown(Key, Shift); -end; - -procedure TdxUpDown.CancelScroll; -begin - SetCursor(Screen.Cursors[crDefault]); -end; - -function TdxUpDown.MouseInSplitRegion(Pt: TSmallPoint): Boolean; -const - Delta = 2; -begin - Result := (Pt.Y > (Height div 2) - Delta) and (Pt.Y < (Height div 2) + Delta); -end; - -procedure TdxUpDown.ScrollMessage(var Message: TWMScroll); -const - UDBtnType: array [Boolean] of TUDBtnType = (btNext, btPrev); -begin - if not FLockChange then - begin - FLockChange := True; - try - case message.ScrollCode of - SB_THUMBPOSITION: - Click(UDBtnType[Message.Pos < 0]); - SB_LINEUP: - Click(btNext); - SB_LINEDOWN: - Click(btPrev); - end; - if HandleAllocated then SendMessage(Handle, UDM_SETPOS, 0, 0); - finally - FLockChange := False; - end; - end; -end; - -procedure TdxUpDown.WMCaptureChanged(var Message: TMessage); -begin - CancelScroll; -end; - -procedure TdxUpDown.WMHScroll(var message: TWMHScroll); -begin - ScrollMessage(Message); -end; - -procedure TdxUpDown.WMLButtonDown(var Message: TWMLButtonDown); -begin - if MouseInSplitRegion(Message.Pos) then - begin - FPrevMousePos := Message.Pos; - SetCapture(Handle); - end - else - inherited; -end; - -procedure TdxUpDown.WMLButtonUp(var Message: TWMLButtonUp); -begin - inherited; - if GetCapture = Handle then ReleaseCapture; -end; - -{$IFNDEF DELPHI5} -procedure TdxUpDown.WMRButtonUp(var Message: TWMMouse); -begin - inherited; - if not (csNoStdEvents in ControlStyle) then - with Message do - MouseUp(mbRight, KeysToShiftState(Keys), XPos, YPos); -end; -{$ENDIF} - -procedure TdxUpDown.WMMouseMove(var Message: TWMMouseMove); -const - Cursors: array[Boolean] of TCursor = (crDefault, crVSplit); - UDBtnType: array [Boolean] of TUDBtnType = (btNext, btPrev); -var - Pt: TSmallPoint; -begin - Pt := Message.Pos; - if GetCapture = Handle then - begin - if not FLockChange and (Abs(FPrevMousePos.Y - Pt.Y) >= ScrollMouseSensibility[MouseSensibility]) then - begin - Click(UDBtnType[Pt.Y > FPrevMousePos.Y]); - SendMessage(Handle, UDM_SETPOS, 0, 0); - FPrevMousePos := Pt; - end; - end - else - begin - Cursor := Cursors[MouseInSplitRegion(Pt)]; - inherited; - end; -end; - -procedure TdxUpDown.WMVScroll(var message: TWMVScroll); -begin - ScrollMessage(message); -end; - -procedure DrawBorder(Control: TWinControl); -var - DC: HDC; - R: TRect; - Pt: TPoint; - MouseInControl: Boolean; - DrawSunken: Boolean; - FocusControl: TWinControl; -begin - DC := GetWindowDC(Control.Handle); - try - GetWindowRect(Control.Handle, R); - GetCursorPos(Pt); - MouseInControl := PtInRect(R, Pt); - OffsetRect(R, -R.Left, -R.Top); - if Control.Enabled then - begin - if csDesigning in Control.ComponentState then - DrawSunken := True - else - if Control.Focused then - DrawSunken := True - else - if GetParentForm(Control).Active and MouseInControl then - begin - FocusControl := FindControl(GetFocus); - if FocusControl <> nil then - DrawSunken := not (FocusControl is Control.ClassType) - else - DrawSunken := True; - end - else - DrawSunken := False; - - if DrawSunken then - DrawEdge(DC, R, BDR_SUNKENOUTER, BF_RECT) - else - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - - InflateRect(R, -1, -1); - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - end - else - begin - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - InflateRect(R, -1, -1); - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNHIGHLIGHT)); - end; - finally - ReleaseDC(Control.Handle, DC); - end; -end; - -{ TdxPSSpinEdit } - -constructor TdxPSSpinEdit.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - Text := '0'; - FDefaultValue := 0; - FFlat := False; - Height := 22; - Width := 65; - FIncrement := 1.0; - FPageIncrement := 10.0; - FCheckBounds := True; - FDecimal := 2; - FEditorEnabled := True; - FUsePageIncr := False; - FIncrButtonWidth := GetSystemMetrics(SM_CXVSCROLL); - FPageIncrButtonWidth := FIncrButtonWidth; - FScrollMouseSens := msMedium; - FArrowKeys := True; - FLegendText := ''; - FLastGoodValue := 0.0; - RecreateButton; -end; - -procedure TdxPSSpinEdit.RecreateButton; -begin - FreeAndNil(FUpDown); - FreeAndNil(FPageUpDown); - if FUsePageIncr then - begin - FPageUpDown := TdxUpDown.Create(Self); - with TdxUpDown(FPageUpDown) do - begin - Visible := True; - SetBounds(0, 0, FPageIncrButtonWidth, Self.Height); - if BiDiMode = bdRightToLeft then - Align := alLeft - else - Align := alRight; - Parent := Self; - MouseSensibility := Self.ScrollMouseSens; - OnClick := PageUpDownClick; - PopupMenu := Self.PopupMenu; - end; - end; - - FUpDown := TdxUpDown.Create(Self); - with TdxUpDown(FUpDown) do - begin - Visible := True; - SetBounds(0, 0, FIncrButtonWidth, Self.Height); - if BiDiMode = bdRightToLeft then - Align := alLeft - else - Align := alRight; - Parent := Self; - MouseSensibility := Self.ScrollMouseSens; - OnClick := UpDownClick; - PopupMenu := Self.PopupMenu; - end; -end; - -procedure TdxPSSpinEdit.UpDownClick(Sender: TObject; Button: TUDBtnType); -const - Keys: array[TUDBtnType] of UINT = (VK_UP, VK_DOWN); -begin - if TabStop and CanFocus then SetFocus; - SpecialKeyClick(Keys[Button], [], Sender); -end; - -procedure TdxPSSpinEdit.PageUpDownClick(Sender: TObject; Button: TUDBtnType); -const - Keys: array[TUDBtnType] of UINT = (VK_PRIOR, VK_NEXT); -begin - if TabStop and CanFocus then SetFocus; - SpecialKeyClick(Keys[Button], [], Sender); -end; - -function TdxPSSpinEdit.GetButtonWidth: Integer; -begin - Result := 0; - if FUpDown <> nil then Result := FUpDown.Width; - if FPageUpDown <> nil then Result := Result + FPageUpDown.Width; -end; - -procedure TdxPSSpinEdit.ResizeButtons; -begin - if FUpDown <> nil then - begin - FUpDown.Width := FIncrButtonWidth; - if BiDiMode = bdRightToLeft then - FUpDown.Align := alLeft - else - FUpDown.Align := alRight; - end; - if FPageUpDown <> nil then - begin - FPageUpDown.Width := FPageIncrButtonWidth; - if BiDiMode = bdRightToLeft then - FPageUpDown.Align := alLeft - else - FPageUpDown.Align := alRight; - end; -end; - -procedure TdxPSSpinEdit.KeyDown(var Key: Word; Shift: TShiftState); -var - IsProcessKey: Boolean; -begin - inherited KeyDown(Key, Shift); - IsProcessKey := - Key in [VK_PRIOR, VK_NEXT, VK_UP, VK_DOWN, VK_END, VK_HOME, VK_ESCAPE, VK_DELETE]; - if IsProcessKey then - case Key of - VK_PRIOR, VK_NEXT, VK_UP, VK_DOWN: - if ArrowKeys then - begin - SpecialKeyClick(Key, Shift, Self); - Key := 0; - end; - VK_END: - if ssCtrl in Shift then - begin - Value := MaxValue; - Key := 0; - end; - VK_HOME: - if ssCtrl in Shift then - begin - Value := MinValue; - Key := 0; - end; - VK_DELETE: - if not EditorEnabled then - begin - MessageBeep(0); - Key := 0; - end; - VK_ESCAPE: - begin - end; - end; -end; - -procedure TdxPSSpinEdit.Change; -begin - if not FLockChange then inherited Change; -end; - -procedure TdxPSSpinEdit.KeyPress(var Key: Char); -begin - if not EditorEnabled or not IsValidChar(Key) then - begin - Key := #0; - MessageBeep(0); - end; - - if Key <> #0 then - begin - inherited; - if Key = Char(VK_RETURN) then - begin - if AutoSelect then SelectAll; - Value := Value; - end; - if (Key = Char(VK_RETURN)) or (Key = Char(VK_ESCAPE)) then - begin - GetParentForm(Self).Perform(CM_DIALOGKEY, Byte(Key), 0); - if Key = Char(VK_RETURN) then Key := #0; - end; - end; -end; - -function TdxPSSpinEdit.IsValidChar(Key: Char): Boolean; -begin - Result := dxCharInSet(Key, ['+', '-', '0'..'9']); - Result := Result or (Key < #32) or (Pos(Key, LegendText) > 0); - if not Result and (ValueType = svtFloat) then - Result := Key = DecimalSeparator; - - if Result and not FEditorEnabled and - ((Key >= #32) or (Key = Char(VK_BACK)) or (Key = Char(VK_DELETE))) then - Result := False; -end; - -procedure TdxPSSpinEdit.CreateParams(var Params: TCreateParams); -const - Alignments: array[Boolean, TAlignment] of DWORD = - ((ES_LEFT, ES_RIGHT, ES_CENTER), (ES_RIGHT, ES_LEFT, ES_CENTER)); -begin - inherited; - Params.Style := Params.Style or ES_MULTILINE or WS_CLIPCHILDREN or - Alignments[UseRightToLeftAlignment, FAlignment]; -end; - -procedure TdxPSSpinEdit.CreateWnd; -begin - inherited; - SetEditRect; -end; - -procedure TdxPSSpinEdit.SetEditRect; -var - R: TRect; -begin - if BiDiMode = bdRightToLeft then - R := MakeRect(GetButtonWidth + 1, 0, ClientWidth - 1, ClientHeight + 1) - else - R := MakeRect(0, 0, ClientWidth - GetButtonWidth - 2, ClientHeight + 1); - SendMessage(Handle, EM_SETRECTNP, 0, Longint(@R)); -end; - -procedure TdxPSSpinEdit.SetAlignment(Value: TAlignment); -begin - if FAlignment <> Value then - begin - FAlignment := Value; - RecreateWnd; - end; -end; - -procedure TdxPSSpinEdit.WMSize(var message: TWMSize); -var - MinHeight: Integer; -begin - inherited; - MinHeight := GetMinHeight; - if Height < MinHeight then - Height := MinHeight - else - begin - ResizeButtons; - SetEditRect; - end; -end; - -procedure TdxPSSpinEdit.GetTextHeight(var SysHeight, Height: Integer); -var - DC: hDC; - SaveFont: hFont; - SysMetrics, Metrics: TTextMetric; -begin - DC := GetDC(0); - GetTextMetrics(DC, SysMetrics); - SaveFont := SelectObject(DC, Font.Handle); - GetTextMetrics(DC, Metrics); - SelectObject(DC, SaveFont); - ReleaseDC(0, DC); - SysHeight := SysMetrics.tmHeight; - Height := Metrics.tmHeight; -end; - -function TdxPSSpinEdit.GetMinHeight: Integer; -var - I, H: Integer; -begin - GetTextHeight(I, H); - if I > H then I := H; - Result := H + GetSystemMetrics(SM_CYBORDER) * 4 + 1; -end; - -procedure TdxPSSpinEdit.SpecialKeyClick(Key: Word; Shift: TShiftState; Sender: TObject); -var - OldText: string; -begin - if not ReadOnly then - begin - FLockChange := True; - try - OldText := inherited Text; - case Key of - VK_PRIOR: - begin - Value := Value + FPageIncrement; - DoButtonClick(btPage, btPrev); - end; - - VK_NEXT: - begin - Value := Value - FPageIncrement; - DoButtonClick(btPage, btNext); - end; - - VK_UP: - if ssCtrl in Shift then - begin - Value := Value + FPageIncrement; - DoButtonClick(btPage, btNext); - end - else - begin - Value := Value + FIncrement; - DoButtonClick(btLine, btNext); - end; - - VK_DOWN: - if ssCtrl in Shift then - begin - Value := Value - FPageIncrement; - DoButtonClick(btPage, btPrev); - end - else - begin - Value := Value - FIncrement; - DoButtonClick(btLine, btPrev); - end; - end; - finally - FLockChange := False; - end; - - if CompareText(OldText, inherited Text) <> 0 then - begin - Modified := True; - Change; - end; - end - else - MessageBeep(0); -end; - -function TdxPSSpinEdit.GetValueText: string; -var - P: Integer; -begin - if LegendText <> '' then - begin - P := Pos(LegendText, Text); - if P > 0 then - Result := Copy(Text, 1, P - 1) - else - Result := Text; - end - else - Result := Text; -end; - -function TdxPSSpinEdit.GetValue: Extended; -var - ValueText: string; - Code: Integer; -begin - ValueText := GetValueText; - if ValueType = svtFloat then - begin - {$IFDEF DELPHI6} - Result := StrToFloatDef(ValueText, DefaultValue); - {$ELSE} - if not TextToFloat(PChar(ValueText), Result, fvExtended) then - Result := DefaultValue; - {$ENDIF} - end - else - begin - Val(ValueText, Result, Code); - if Code <> 0 then - Result := Trunc(DefaultValue); - end; - -(*try - if ValueType = svtFloat then - Result := StrToFloat(GetValueText) - else - Result := StrToInt(GetValueText); - { Because -> StrToFloat(',7') = 0,7 } - Result := CheckValue(Result); - except - Result := DefaultValue; - if ValueType = svtInteger then Result := Trunc(Result); - end;*) -end; - -procedure TdxPSSpinEdit.SetLegendText(const Value: string); -var - V: Extended; -begin - if FLegendText <> Value then - begin - V := Self.Value; - FLegendText := Value; - Self.Value := V; - end; -end; - -function TdxPSSpinEdit.GetLegendText: string; -begin - if FLegendText = '' then - Result := '' - else - if FLegendText[1] = ' ' then - Result := FLegendText - else - Result := ' ' + FLegendText; -end; - -procedure TdxPSSpinEdit.SetValue(NewValue: Extended); -begin - if ValueType = svtFloat then - Text := FloatToStrF(CheckValue(NewValue), ffFixed, 15, FDecimal) + LegendText - else - Text := IntToStr(Round(CheckValue(NewValue))) + LegendText; -end; - -function TdxPSSpinEdit.CheckValue(NewValue: Extended): Extended; -begin - Result := NewValue; - if CheckBounds then -// if (FMinValue <> 0) or (FMaxValue <> FMinValue) then - if NewValue < FMinValue then - Result := FMinValue - else - if NewValue > FMaxValue then - Result := FMaxValue; -end; - -procedure TdxPSSpinEdit.SetDefaultValue(NewDefaultValue: Extended); -begin - if FDefaultValue <> NewDefaultValue then - FDefaultValue := CheckValue(NewDefaultValue); -end; - -function TdxPSSpinEdit.GetAsInteger: Longint; -begin - Result := Trunc(GetValue); -end; - -procedure TdxPSSpinEdit.SetAsInteger(NewValue: Longint); -begin - SetValue(NewValue); -end; - -procedure TdxPSSpinEdit.SetValueType(NewType: TdxSpinValueType); -begin - if FValueType <> NewType then - begin - FValueType := NewType; - Value := GetValue; - if FValueType = svtInteger then - begin - FIncrement := Round(FIncrement); - if FIncrement = 0 then FIncrement := 1; - FPageIncrement := Round(FPageIncrement); - if FPageIncrement = 0 then FPageIncrement := 1; - end; - end; -end; - -procedure TdxPSSpinEdit.SetFlat(Value: Boolean); -begin - if FFlat <> Value then - begin - FFlat := Value; - RecreateWnd; - end; -end; - -procedure TdxPSSpinEdit.SetUsePageIncr(Value: Boolean); -begin - if FUsePageIncr <> Value then - begin - FUsePageIncr := Value; - RecreateButton; - ResizeButtons; - SetEditRect; - end; -end; - -procedure TdxPSSpinEdit.SetIncrButtonWidth(Value: Integer); -begin - if Value < MinButtonWidth then - Value := MinButtonWidth; - - if FIncrButtonWidth <> Value then - begin - FIncrButtonWidth := Value; - ResizeButtons; - SetEditRect; - end; -end; - -procedure TdxPSSpinEdit.SetPageIncrButtonWidth(Value: Integer); -begin - if Value < MinButtonWidth then - Value := MinButtonWidth; - - if FPageIncrButtonWidth <> Value then - begin - FPageIncrButtonWidth := Value; - ResizeButtons; - SetEditRect; - end; -end; - -function TdxPSSpinEdit.IsIncrButtonWidthStored: Boolean; -begin - Result := FUpDown.Width <> GetSystemMetrics(SM_CXVSCROLL); -end; - -function TdxPSSpinEdit.IsPageIncrButtonWidthStored: Boolean; -begin - Result := (FPageUpDown <> nil) and (FPageUpDown.Width <> GetSystemMetrics(SM_CXVSCROLL)); -end; - -function TdxPSSpinEdit.IsIncrementStored: Boolean; -begin - Result := Increment <> 1.0; -end; - -function TdxPSSpinEdit.IsPageIncrementStored: Boolean; -begin - Result := PageIncrement <> 10.0; -end; - -function TdxPSSpinEdit.IsMaxStored: Boolean; -begin - Result := MaxValue <> 0.0; -end; - -function TdxPSSpinEdit.IsMinStored: Boolean; -begin - Result := MinValue <> 0.0; -end; - -function TdxPSSpinEdit.IsValueStored: Boolean; -begin - Result := GetValue <> 0.0; -end; - -function TdxPSSpinEdit.IsDefaultValueStored: Boolean; -begin - Result := FDefaultValue <> 0.0; -end; - -procedure TdxPSSpinEdit.SetMaxValue(Value: Extended); -begin - if FMaxValue <> Value then - begin - FMaxValue := Value; - CheckValue(Self.Value); - end; -end; - -procedure TdxPSSpinEdit.SetMinValue(Value: Extended); -begin - if FMinValue <> Value then - begin - FMinValue := Value; - Self.Value := Self.Value; - end; -end; - -procedure TdxPSSpinEdit.SetCheckBounds(Value: Boolean); -begin - if FCheckBounds <> Value then - begin - FCheckBounds := Value; - Self.Value := Self.Value; - end; -end; - -procedure TdxPSSpinEdit.SetDecimal(NewValue: Byte); -begin - if FDecimal <> NewValue then - begin - FDecimal := NewValue; - Self.Value := Self.Value; - end; -end; - -procedure TdxPSSpinEdit.SetScrollMouseSens(Value: TdxScrollMouseSensetivity); -begin - if FScrollMouseSens <> Value then - begin - FScrollMouseSens := Value; - TdxUpDown(FUpDown).MouseSensibility := Value; - - if FPageUpDown <> nil then - TdxUpDown(FPageUpDown).MouseSensibility := Value; - end; -end; - -procedure TdxPSSpinEdit.DoButtonClick(ButtonType: TdxButtonType; Button: TUDBtnType); -begin - if Assigned(FOnButtonClick) then FOnButtonClick(Self, ButtonType, Button); -end; - -procedure TdxPSSpinEdit.WMContextMenu(var Message: TWMContextMenu); -begin - if Message.hWnd = Handle then inherited; -end; - -procedure TdxPSSpinEdit.WMCut(var Message: TWMCut); -begin - if not FEditorEnabled or ReadOnly then Exit; - inherited; -end; - -procedure TdxPSSpinEdit.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - if Flat then DrawBorder(Self); -end; - -procedure TdxPSSpinEdit.WMMouseWheel(var Message: TWMMouseWheel); - - function GetControl: TCustomUpDown; - begin - if GetKeyState(VK_CONTROL) < 0 then - Result := FPageUpDown - else - Result := FUpDown; - end; - -const - ScrollCodes: array[Boolean] of SmallInt = (SB_LINEDOWN, SB_LINEUP); -var - ScrollMsg: TWMScroll; -begin - inherited; - FillChar(ScrollMsg, SizeOf(TMessage), 0); - ScrollMsg.Msg := WM_VSCROLL; - ScrollMsg.ScrollCode := ScrollCodes[Message.WheelDelta > 0]; - if GetControl is TdxUpDown then - TdxUpDown(GetControl).ScrollMessage(ScrollMsg); -end; - -procedure TdxPSSpinEdit.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - inherited; - //if Flat then InflateRect(message.CalcSize_Params.rgrc[0], -1, -1); -end; - -procedure TdxPSSpinEdit.WMNCPaint(var Message: TWMNCPaint); -begin - inherited; - if Flat then DrawBorder(Self); -end; - -procedure TdxPSSpinEdit.WMPaste(var Message: TWMPaste); -begin - if not FEditorEnabled or ReadOnly then Exit; - inherited; -end; - -{$IFNDEF DELPHI5} -procedure TdxPSSpinEdit.WMRButtonUp(var Message: TWMRButtonUp); -var - R: TRect; - Pt: TPoint; -begin - if (PopupMenu <> nil) and PopupMenu.AutoPopup then - begin - R := FUpDown.ClientRect; - if FUsePageIncr then - UnionRect(R, R, FPageUpDown.ClientRect); - Pt := ScreenToClient(SmallPointToPoint(Message.Pos)); - if PtInRect(R, Pt) then Exit; - end; - inherited; -end; -{$ENDIF} - -procedure TdxPSSpinEdit.WMSetFocus(var Message: TWMSetFocus); -begin - inherited; - if Flat then DrawBorder(Self); -end; - -procedure TdxPSSpinEdit.CMBiDiModeChanged(var Message: TMessage); -begin - inherited; - ResizeButtons; - SetEditRect; - Invalidate; -end; - -procedure TdxPSSpinEdit.CMEnabledChanged(var Message: TMessage); -begin - inherited; - if FUpDown <> nil then FUpDown.Enabled := Enabled; - if FPageUpDown <> nil then FPageUpDown.Enabled := Enabled; - if FFlat then DrawBorder(Self); -end; - -procedure TdxPSSpinEdit.CMEnter(var Message: TCMEnter); -begin - if AutoSelect and not (csLButtonDown in ControlState) then - SelectAll; - FSaveValue := Value; - inherited; -end; - -procedure TdxPSSpinEdit.CMExit(var Message: TCMExit); -begin -// if ( CheckValue(Value) <> Value ) then SetValue(Value) -// else - Value := Value; - inherited; -end; - -procedure TdxPSSpinEdit.CMFontChanged(var Message: TMessage); -begin - inherited; - ResizeButtons; - SetEditRect; -end; - -procedure TdxPSSpinEdit.CMMouseEnter(var Message: TMessage); -begin - inherited; - FMouseInControl := True; - if Flat then DrawBorder(Self); -end; - -procedure TdxPSSpinEdit.CMMouseLeave(var Message: TMessage); -begin - inherited; - FMouseInControl := False; - if Flat then DrawBorder(Self); -end; - -{ TdxPSColorCombo } - -constructor TdxPSColorCombo.Create(AOwner: TComponent); -begin - inherited; - Style := csOwnerDrawFixed; - FColorTypes := [ctPure, ctSystem]; - FShowColorName := True; - FShowCustomColor := True; - FAutoColor := clWindowText; -end; - -function TdxPSColorCombo.DefaultAutoColorText: string; -begin - Result := cxGetResourceString(@sdxAutoColorText); -end; - -function TdxPSColorCombo.DefaultCustomColorText: string; -begin - Result := cxGetResourceString(@sdxCustomColorText); -end; - -procedure TdxPSColorCombo.Click; -begin - if ShowCustomColor and (ItemIndex = Items.Count - 1) then SelectCustomColor; - inherited; -end; - -procedure TdxPSColorCombo.CreateWnd; -begin - inherited; - RefreshItems; -end; - -procedure TdxPSColorCombo.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('IsAutoColorTextAssigned', ReadIsAutoColorTextAssigned, WriteIsAutoColorTextAssigned, - FIsAutoColorTextAssigned and (AutoColorText = '')); - Filer.DefineProperty('IsCustomColorTextAssigned', ReadIsCustomColorTextAssigned, WriteIsCustomColorTextAssigned, - FIsCustomColorTextAssigned and (CustomColorText = '')); -end; - -procedure TdxPSColorCombo.DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); -const - ColorWidth = 22; - Format = DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX; - EndEllipsis: array[Boolean] of UINT = (0, DT_END_ELLIPSIS); -var - ColorRect, TxtRect: TRect; - PrevColor: TColor; - PrevMode: Integer; - S: string; -begin - Canvas.FillRect(Rect); - InflateRect(Rect, -2, -2); - ColorRect := Rect; - TxtRect := Rect; - if FShowColorName or ((ShowAutoColor and (Index = 0)) or - (ShowCustomColor and (Index = Items.Count - 1))) then - begin - if BiDiMode = bdRightToLeft then - ColorRect.Left := ColorRect.Right - ColorWidth - else - ColorRect.Right := ColorRect.Left + ColorWidth; - - SubtractRect(TxtRect, Rect, ColorRect); - if BiDiMode = bdRightToLeft then - Dec(TxtRect.Right, 6); - Inc(TxtRect.Left, 6); - end; // else if ( Index = Items.Count - 1 ) then - // SetRectEmpty(AColorRect); - - with Canvas do - begin - Pen.Color := clBtnShadow; - PrevColor := Brush.Color; - if ShowAutoColor and (Index = 0) then - begin - Brush.Color := AutoColor; - Brush.Style := bsSolid; - end - else - if not ShowAutoColor or (TColor(Items.Objects[Index]) <> clNone) then - begin - Brush.Color := TColor(Items.Objects[Index]); - Brush.Style := bsSolid; - end - else - Brush.Style := bsClear; - - if not IsRectEmpty(ColorRect) then - with ColorRect do - Rectangle(Left, Top, Right, Bottom); - Brush.Color := PrevColor; - - PrevMode := SetBkMode(Handle, TRANSPARENT); - if not Enabled then - PrevColor := SetTextColor(Handle, ColorToRGB(clInactiveCaptionText)); - - if FShowColorName or ((ShowAutoColor and (Index = 0)) or - (ShowCustomColor and (Index = Items.Count - 1))) then - begin - S := GetColorName(Index); - DrawText(Canvas.Handle, PChar(S), Length(S), TxtRect, Format or EndEllipsis[Self.EndEllipsis]); - end; - - {$IFNDEF CBUILDER} - {$IFDEF DELPHI5} - if ShowAutoColor and ((Index = 0) or (Index = 1)) and not (odComboBoxEdit in State) then - begin - Pen.Color := clWindowText; - with Rect do - if Index = 0 then - Rectangle(Left, Bottom + 1, Right, Bottom + 2) - else - Rectangle(Left, Top - 2, Right, Top - 1); - end; - {$ENDIF} - {$ENDIF} - - if not Enabled then - SetTextColor(Handle, ColorToRGB(PrevColor)); - SetBkMode(Handle, PrevMode); - end; -end; - -procedure TdxPSColorCombo.KeyDown(var Key: Word; Shift: TShiftState); -begin - if not DroppedDown and ShowCustomColor and (Key = vk_RETURN) and - (ItemIndex = Items.Count - 1) then - Click; - inherited; -end; - -procedure TdxPSColorCombo.SetDropDownCount(const Value: Integer); -begin - {$IFDEF DELPHI6} - inherited; - {$ELSE} - inherited DropDownCount := Value; - {$ENDIF} - FDropDownCountAssigned := True; -end; - -procedure TdxPSColorCombo.RefreshItems; -begin - with Items do - begin - BeginUpdate; - try - Clear; - if ShowAutoColor then - AddObject(AutoColorText, TObject(AutoColor)); - - if ctPure in FColorTypes then - begin - AddObject(cxGetResourceString(@sdxPureColorBlack), TObject(PureColors[0])); - AddObject(cxGetResourceString(@sdxPureColorOlive), TObject(PureColors[1])); - AddObject(cxGetResourceString(@sdxPureColorTeal), TObject(PureColors[2])); - AddObject(cxGetResourceString(@sdxPureColorGreen), TObject(PureColors[3])); - AddObject(cxGetResourceString(@sdxPureColorMoneyGreen), TObject(PureColors[4])); - AddObject(cxGetResourceString(@sdxPureColorLime), TObject(PureColors[5])); - AddObject(cxGetResourceString(@sdxPureColorNavy), TObject(PureColors[6])); - AddObject(cxGetResourceString(@sdxPureColorBlue), TObject(PureColors[7])); - AddObject(cxGetResourceString(@sdxPureColorAqua), TObject(PureColors[8])); - AddObject(cxGetResourceString(@sdxPureColorSkyBlue), TObject(PureColors[9])); - AddObject(cxGetResourceString(@sdxPureColorGray), TObject(PureColors[10])); - AddObject(cxGetResourceString(@sdxPureColorMedGray), TObject(PureColors[11])); - AddObject(cxGetResourceString(@sdxPureColorSilver), TObject(PureColors[12])); - AddObject(cxGetResourceString(@sdxPureColorMaroon), TObject(PureColors[13])); - AddObject(cxGetResourceString(@sdxPureColorPurple), TObject(PureColors[14])); - AddObject(cxGetResourceString(@sdxPureColorFuchsia), TObject(PureColors[15])); - AddObject(cxGetResourceString(@sdxPureColorRed), TObject(PureColors[16])); - AddObject(cxGetResourceString(@sdxPureColorCream), TObject(PureColors[17])); - AddObject(cxGetResourceString(@sdxPureColorYellow), TObject(PureColors[18])); - AddObject(cxGetResourceString(@sdxPureColorWhite), TObject(PureColors[19])); - end; - - if ctSystem in FColorTypes then - begin - AddObject(cxGetResourceString(@sdxSysColorScrollBar), TObject(SysColors[0])); - AddObject(cxGetResourceString(@sdxSysColorBackground), TObject(SysColors[1])); - AddObject(cxGetResourceString(@sdxSysColorActiveCaption), TObject(SysColors[2])); - AddObject(cxGetResourceString(@sdxSysColorInactiveCaption), TObject(SysColors[3])); - AddObject(cxGetResourceString(@sdxSysColorMenu), TObject(SysColors[4])); - AddObject(cxGetResourceString(@sdxSysColorWindow), TObject(SysColors[5])); - AddObject(cxGetResourceString(@sdxSysColorWindowFrame), TObject(SysColors[6])); - AddObject(cxGetResourceString(@sdxSysColorMenuText), TObject(SysColors[7])); - AddObject(cxGetResourceString(@sdxSysColorWindowText), TObject(SysColors[8])); - AddObject(cxGetResourceString(@sdxSysColorCaptionText), TObject(SysColors[9])); - AddObject(cxGetResourceString(@sdxSysColorActiveBorder), TObject(SysColors[10])); - AddObject(cxGetResourceString(@sdxSysColorInactiveBorder), TObject(SysColors[11])); - AddObject(cxGetResourceString(@sdxSysColorAppWorkSpace), TObject(SysColors[12])); - AddObject(cxGetResourceString(@sdxSysColorHighLight), TObject(SysColors[13])); - AddObject(cxGetResourceString(@sdxSysColorHighLighText), TObject(SysColors[14])); - AddObject(cxGetResourceString(@sdxSysColorBtnFace), TObject(SysColors[15])); - AddObject(cxGetResourceString(@sdxSysColorBtnShadow), TObject(SysColors[16])); - AddObject(cxGetResourceString(@sdxSysColorGrayText), TObject(SysColors[17])); - AddObject(cxGetResourceString(@sdxSysColorBtnText), TObject(SysColors[18])); - AddObject(cxGetResourceString(@sdxSysColorInactiveCaptionText), TObject(SysColors[19])); - AddObject(cxGetResourceString(@sdxSysColorBtnHighligh), TObject(SysColors[20])); - AddObject(cxGetResourceString(@sdxSysColor3DDkShadow), TObject(SysColors[21])); - AddObject(cxGetResourceString(@sdxSysColor3DLight), TObject(SysColors[22])); - AddObject(cxGetResourceString(@sdxSysColorInfoText), TObject(SysColors[23])); - AddObject(cxGetResourceString(@sdxSysColorInfoBk), TObject(SysColors[24])); - end; - - if ShowCustomColor then - AddObject(CustomColorText, TObject(clNone)); - - if Items.Count <> 0 then - ItemIndex := 0; - finally - EndUpdate; - end; - end; -end; - -function TdxPSColorCombo.SelectColorProc: TdxSelectColorProc; -begin - Result := nil; - if Assigned(FOnGetSelectColorProc) then - begin - FOnGetSelectColorProc(Self, Result); - if @Result = nil then - Result := StandardSelectColorProc - end - else - Result := StandardSelectColorProc; -end; - -function TdxPSColorCombo.GetColorName(Index: Integer): string; -var - Kind: TdxColorKind; -begin - Result := Items[Index]; - if Assigned(FOnGetColorName) then - begin - if ShowAutoColor and (Index = 0) then - Kind := ckAuto - else - if ShowCustomColor and (Index = Items.Count - 1) then - Kind := ckCustom - else - Kind := ckNormal; - FOnGetColorName(Self, Index, TColor(Items.Objects[Index]), Kind, Result); - end; -end; - -function TdxPSColorCombo.GetActualDropDownCount: Integer; -begin - if UseAllColorValuesInDropDownList and not DropDownCountAssigned then - Result := Items.Count - else - Result := DropDownCount; -end; - -function TdxPSColorCombo.GetAutoColorText: string; -begin - if FIsAutoColorTextAssigned then - Result := FAutoColorText - else - Result := DefaultAutoColorText; -end; - -function TdxPSColorCombo.GetColorTypes: TdxColorTypes; -begin - Result := FColorTypes; -end; - -function TdxPSColorCombo.GetColorValue: TColor; -begin - Result := TColor(Items.Objects[ItemIndex]); -end; - -function TdxPSColorCombo.GetCustomColorText: string; -begin - if FIsCustomColorTextAssigned then - Result := FCustomColorText - else - Result := DefaultCustomColorText -end; - -function TdxPSColorCombo.GetIsAutoColorSelected: Boolean; -begin - Result := ShowAutoColor and (ItemIndex = 0); -end; - -function TdxPSColorCombo.IsAutoColorTextStored: Boolean; -begin - Result := FIsAutoColorTextAssigned and (AutoColorText <> DefaultAutoColorText); -end; - -function TdxPSColorCombo.IsCustomColorTextStored: Boolean; -begin - Result := FIsCustomColorTextAssigned and (CustomColorText <> DefaultCustomColorText); -end; - -procedure TdxPSColorCombo.SetAutoColor(Value: TColor); -begin - if FAutoColor <> Value then - begin - FAutoColor := Value; - if ShowAutoColor and (ItemIndex = 0) then Invalidate; - end; -end; - -procedure TdxPSColorCombo.SetAutoColorText(const Value: string); -begin - if AutoColorText <> Value then - begin - FAutoColorText := Value; - FIsAutoColorTextAssigned := True; - if ShowAutoColor then RecreateWnd;//and (ItemIndex = 0) then Invalidate; - end; -end; - -procedure TdxPSColorCombo.SetColorTypes(Value: TdxColorTypes); -begin - if Value <> FColorTypes then - begin - if Value = [] then Value := [ctPure]; - FColorTypes := Value; - RecreateWnd; - end; -end; - -procedure TdxPSColorCombo.SetColorValue(Value: TColor); -var - Index: Integer; -begin - Index := Items.IndexOfObject(TObject(Value)); - if Index > -1 then - ItemIndex := Index - else - if ShowCustomColor then - begin - Items.Objects[Items.Count - 1] := TObject(Value); - ItemIndex := Items.Count - 1; - Repaint; - end; -end; - -procedure TdxPSColorCombo.SetCustomColorText(const Value: string); -begin - if CustomColorText <> Value then - begin - FCustomColorText := Value; - FIsCustomColorTextAssigned := True; - if ShowCustomColor then RecreateWnd;//and (ItemIndex = 0) then Invalidate; - end; -end; - -procedure TdxPSColorCombo.SetEndEllipsis(Value: Boolean); -begin - if FEndEllipsis <> Value then - begin - FEndEllipsis := Value; - Invalidate; - end; -end; - -procedure TdxPSColorCombo.SetShowAutoColor(Value: Boolean); -begin - if FShowAutoColor <> Value then - begin - FShowAutoColor := Value; - RecreateWnd; - end; -end; - -procedure TdxPSColorCombo.SetShowColorName(Value: Boolean); -begin - if Value <> FShowColorName then - begin - FShowColorName := Value; - Repaint; - end; -end; - -procedure TdxPSColorCombo.SetShowCustomColor(Value: Boolean); -begin - if FShowCustomColor <> Value then - begin - FShowCustomColor := Value; - RecreateWnd; - end; -end; - -function TdxPSColorCombo.FindRGB(AColor: TColor): Integer; - - function IsSysColor(Color: TColor): Boolean; - begin - Result := (Color and $80000000 = $80000000); - end; - -var - C: TColor; -begin - if IsSysColor(AColor) then - AColor := ColorToRGB(GetSysColor(AColor)) - else - AColor := ColorToRGB(AColor); - - for Result := 0 to Items.Count - 1 do - begin - C := TColor(Items.Objects[Result]); - if IsSysColor(C) then - C := GetSysColor(C); - C := ColorToRGB(C); - if AColor = C then Exit; - end; - Result := -1; -end; - -procedure TdxPSColorCombo.ResetItemHeight; -var - H: Integer; -begin - H := -MulDiv(Font.Height, 15, 10); - if H < 10 then H := 10; - ItemHeight := H; -end; - -procedure TdxPSColorCombo.SelectCustomColor; -var - CustomColor: TColor; - Proc: TdxSelectColorProc; - Index: Integer; -begin - CustomColor := TColor(Items.Objects[ItemIndex]); - Proc := SelectColorProc(); - if Assigned(Proc) then - if Proc(CustomColor) then - begin - Index := Items.IndexOfObject(TObject(CustomColor)); - if Index <> ItemIndex then - if Index = -1 then - begin - Items.Objects[ItemIndex] := TObject(CustomColor); - Repaint; - end - else - ItemIndex := Index; - end - else - ColorValue := CustomColor; -end; - -function TdxPSColorCombo.StandardSelectColorProc(var AColor: TColor): Boolean; -begin - dxPSGlbl.ColorDialog.Color := AColor; - Result := dxPSGlbl.ColorDialog.Execute; - if Result then - AColor := dxPSGlbl.ColorDialog.Color; -end; - -procedure TdxPSColorCombo.ReadIsAutoColorTextAssigned(AReader: TReader); -begin - FIsAutoColorTextAssigned := AReader.ReadBoolean; -end; - -procedure TdxPSColorCombo.ReadIsCustomColorTextAssigned(AReader: TReader); -begin - FIsCustomColorTextAssigned := AReader.ReadBoolean; -end; - -procedure TdxPSColorCombo.WriteIsAutoColorTextAssigned(AWriter: TWriter); -begin - AWriter.WriteBoolean(FIsAutoColorTextAssigned); -end; - -procedure TdxPSColorCombo.WriteIsCustomColorTextAssigned(AWriter: TWriter); -begin - AWriter.WriteBoolean(FIsCustomColorTextAssigned); -end; - -procedure TdxPSColorCombo.CMBiDiModeChanged(var Message: TMessage); -begin - inherited; - Invalidate; -end; - -procedure TdxPSColorCombo.CMEnabledChanged(var Message: TMessage); -begin - inherited; - if csDesigning in ComponentState then Invalidate; -end; - -procedure TdxPSColorCombo.CMFontChanged(var Message: TMessage); -begin - inherited; - ResetItemHeight; -end; - -procedure TdxPSColorCombo.CMRecreateWnd(var Message: TMessage); -var - ASaveValue: TColor; - Ind: Integer; -begin - ASaveValue := ColorValue; - inherited; - Ind := FindRGB(ASaveValue); - if Ind > -1 then ItemIndex := Ind; -end; - -procedure TdxPSColorCombo.CNCommand(var Message: TWMCommand); -begin - case message.NotifyCode of - CBN_SELCHANGE: - begin - Text := Items[ItemIndex]; - //if not DroppedDown then Click; - Change; - Exit; - end; - CBN_CLOSEUP: - if FSelEndOk then Click; - CBN_DROPDOWN: - begin - DropDownCount := ActualDropDownCount; - FSelEndOk := True; - end; - CBN_SELENDCANCEL: - FSelEndOk := False; - end; - inherited; -end; - -{ TdxPSBrushStyleCombo } - -constructor TdxPSBrushStyleCombo.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - ItemHeight := 22; - Height := 22; - FEndEllipsis := False; - FShowStyleName := False; - FBrushColor := clWindowText; - Style := csOwnerDrawFixed; -end; - -procedure TdxPSBrushStyleCombo.CreateWnd; -begin - inherited CreateWnd; - RefreshItems; - ItemIndex := 0; -end; - -procedure TdxPSBrushStyleCombo.DrawItem(Index: Integer; Rect: TRect; - State: TOwnerDrawState); -const - EndEllipsisMap: array[Boolean] of UINT = (0, DT_END_ELLIPSIS); - Format = DT_SINGLELINE or DT_LEFT or DT_VCENTER; -var - BrushRect, TextRect: TRect; - S: string; -begin - Canvas.FillRect(Rect); - InflateRect(Rect, -2, -2); - BrushRect := Rect; - TextRect := Rect; - if FShowStyleName then - begin - if BiDiMode = bdRightToLeft then - BrushRect.Left := BrushRect.Right - (Rect.Right - Rect.Left) div 2 - else - BrushRect.Right := BrushRect.Left + (Rect.Right - Rect.Left) div 2; - - SubtractRect(TextRect, Rect, BrushRect); - if BiDiMode = bdRightToLeft then - Dec(TextRect.Right, 6); - Inc(TextRect.Left, 6); - end; - - Canvas.Brush.Style := bsSolid; - Canvas.Brush.Color := clBtnShadow; - Canvas.FrameRect(BrushRect); - InflateRect(BrushRect, -1, -1); - - if Index > StyleIndexes[bsClear] then - Canvas.Brush.Style := Styles[Index] - else - Canvas.Brush.Style := bsSolid; - - if Index = StyleIndexes[bsClear] then - Canvas.Brush.Color := clWindow - else - if ColorToRGB(BrushColor) = ColorToRGB(clWindow) then - if Index > StyleIndexes[bsClear] then - Canvas.Brush.Color := clWindowText - else - Canvas.Brush.Color := BrushColor - else - Canvas.Brush.Color := BrushColor; - - SetBkColor(Canvas.Handle, ColorToRGB(clWindow)); - Canvas.FillRect(BrushRect); - - if FShowStyleName then - begin - Canvas.Brush.Style := bsClear; - if not Enabled then - Canvas.Font.Color := clGrayText; - S := StyleNames[Index]; - DrawText(Canvas.Handle, PChar(S), Length(S), TextRect, Format or EndEllipsisMap[EndEllipsis]); - end; - Canvas.Brush.Style := bsSolid; - Canvas.Font.Color := clWindowText; -end; - -function TdxPSBrushStyleCombo.GetStyleName(Index: Integer): string; -begin - Result := Items[Index]; - if Assigned(FOnGetBrushStyleName) then - FOnGetBrushStyleName(Self, Index, Styles[Index], Result); -end; - -function TdxPSBrushStyleCombo.GetStyle(Index: Integer): TBrushStyle; -begin - Result := TBrushStyle(Items.Objects[Index]); -end; - -function TdxPSBrushStyleCombo.GetStyleIndex(Style: TBrushStyle): Integer; -begin - Result := Items.IndexOfObject(TObject(Style)); -end; - -function TdxPSBrushStyleCombo.GetStyleValue: TBrushStyle; -begin - if ItemIndex <> -1 then - Result := Styles[ItemIndex] - else - Result := bsSolid; -end; - -procedure TdxPSBrushStyleCombo.SetBrushColor(Value: TColor); -begin - if FBrushColor <> Value then - begin - FBrushColor := Value; - Invalidate; - end; -end; - -procedure TdxPSBrushStyleCombo.SetEndEllipsis(Value: Boolean); -begin - if FEndEllipsis <> Value then - begin - FEndEllipsis := Value; - Invalidate; - end; -end; - -procedure TdxPSBrushStyleCombo.SetShowStyleName(Value: Boolean); -begin - if FShowStyleName <> Value then - begin - FShowStyleName := Value; - Invalidate; - end; -end; - -procedure TdxPSBrushStyleCombo.SetStyleValue(Value: TBrushStyle); -begin - ItemIndex := StyleIndexes[Value]; -end; - -procedure TdxPSBrushStyleCombo.RefreshItems; -begin - with Items do - begin - BeginUpdate; - try - Clear; - AddObject(cxGetResourceString(@sdxBrushStyleSolid), TObject(bsSolid)); - AddObject(cxGetResourceString(@sdxBrushStyleClear), TObject(bsClear)); - AddObject(cxGetResourceString(@sdxBrushStyleHorizontal), TObject(bsHorizontal)); - AddObject(cxGetResourceString(@sdxBrushStyleVertical), TObject(bsVertical)); - AddObject(cxGetResourceString(@sdxBrushStyleFDiagonal), TObject(bsFDiagonal)); - AddObject(cxGetResourceString(@sdxBrushStyleBDiagonal), TObject(bsBDiagonal)); - AddObject(cxGetResourceString(@sdxBrushStyleCross), TObject(bsCross)); - AddObject(cxGetResourceString(@sdxBrushStyleDiagCross), TObject(bsDiagCross)); - finally - EndUpdate; - end; - end; -end; - -procedure TdxPSBrushStyleCombo.ResetItemHeight; -var - H: Integer; -begin - H := -MulDiv(Font.Height, 12, 10); - if H < 22 then H := 22; - ItemHeight := H; -end; - -procedure TdxPSBrushStyleCombo.CMBiDiModeChanged(var Message: TMessage); -begin - inherited; - Invalidate; -end; - -procedure TdxPSBrushStyleCombo.CMFontChanged(var Message: TMessage); -begin - inherited; - ResetItemHeight; -end; - -procedure TdxPSBrushStyleCombo.CMRecreateWnd(var Message: TMessage); -var - SaveStyle: TBrushStyle; -begin - SaveStyle := BrushStyle; - inherited; - BrushStyle := SaveStyle; -end; - -procedure TdxPSBrushStyleCombo.CMEnabledChanged(var Message: TMessage); -begin - inherited; - if csDesigning in ComponentState then Invalidate; -end; - -{ TdxPSPaintPanel } - -constructor TdxPSPaintPanel.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FEdgeBorders := [ebLeft, ebTop, ebRight, ebBottom]; - FEdgeInner := esRaised; - FEdgeOuter := esSunken; - FDoubleBuffered := True; -end; - -procedure TdxPSPaintPanel.Paint; -begin - DoPaint; -end; - -procedure TdxPSPaintPanel.DoMouseEnter; -begin - if Assigned(FOnMouseEnter) then FOnMouseEnter(Self) -end; - -procedure TdxPSPaintPanel.DoMouseLeave; -begin - if Assigned(FOnMouseLeave) then FOnMouseLeave(Self) -end; - -procedure TdxPSPaintPanel.DoPaint; -begin - if Assigned(FOnPaint) then FOnPaint(Self) -end; - -function TdxPSPaintPanel.GetEdgeBorders: TdxEdgeBorders; -begin - Result := FEdgeBorders; -end; - -procedure TdxPSPaintPanel.SetEdgeBorders(Value: TdxEdgeBorders); -begin - if FEdgeBorders <> Value then - begin - FEdgeBorders := Value; - if (FEdgeOuter <> esNone) and (FEdgeInner <> esNone) then - RecreateWnd; - end; -end; - -procedure TdxPSPaintPanel.SetEdgeInner(Value: TdxEdgeStyle); -begin - if FEdgeInner <> Value then - begin - FEdgeInner := Value; - RecreateWnd; - end; -end; - -procedure TdxPSPaintPanel.SetEdgeOuter(Value: TdxEdgeStyle); -begin - if FEdgeOuter <> Value then - begin - FEdgeOuter := Value; - RecreateWnd; - end; -end; - -procedure TdxPSPaintPanel.WMNCCalcSize(var Message: TWMNCCalcSize); - - function GetEdgeSize: Integer; - begin - if Ctl3D then - Result := Integer(EdgeInner > esNone) + Integer(EdgeOuter > esNone) - else - Result := 1; - end; - - procedure AdjustEdges(var R: TRect; AEdgeSize: Integer); - begin - if ebLeft in FEdgeBorders then Inc(R.Left, AEdgeSize); - if ebTop in FEdgeBorders then Inc(R.Top, AEdgeSize); - if ebRight in FEdgeBorders then Dec(R.Right, AEdgeSize); - if ebBottom in FEdgeBorders then Dec(R.Bottom, AEdgeSize); - end; - -begin - AdjustEdges(Message.CalcSize_Params^.rgrc[0], GetEdgeSize); - inherited; -end; - -procedure TdxPSPaintPanel.WMNCPaint(var Message: TWMNCPaint); -const - InnerStyles: array[TdxEdgeStyle] of Integer = (0, BDR_RAISEDINNER, BDR_SUNKENINNER); - OuterStyles: array[TdxEdgeStyle] of Integer = (0, BDR_RAISEDOUTER, BDR_SUNKENOUTER); - Ctl3DStyles: array[Boolean] of Integer = (BF_MONO, 0); -var - R: TRect; - DC: HDC; - //Details: TThemedElementDetails; -begin - GetWindowRect(Handle, R); - OffsetRect(R, -R.Left, -R.Top); - DC := GetWindowDC(Handle); - try - //Details := ThemeServices.GetElementDetails(trBandNormal); - //ThemeServices.DrawEdge(DC, Details, R, BDR_RAISEDINNER or BDR_RAISEDOUTER, BF_RECT or BF_FLAT); - DrawEdge(DC, R, InnerStyles[FEdgeInner] or OuterStyles[FEdgeOuter], - Byte(FEdgeBorders) or Ctl3DStyles[Ctl3D]); - finally - ReleaseDC(Handle, DC); - end; -end; - -procedure TdxPSPaintPanel.CMCtl3DChanged(var Message: TMessage); -begin - inherited; - if FEdgeBorders <> [] then RecreateWnd; -end; - -procedure TdxPSPaintPanel.CMTextChanged(var Message: TMessage); -begin -end; - -procedure TdxPSPaintPanel.CMMouseEnter(var Message: TMessage); -begin - inherited; - DoMouseEnter; -end; - -procedure TdxPSPaintPanel.CMMouseLeave(var Message: TMessage); -begin - inherited; - DoMouseLeave; -end; - -{ TdxPSBitmapAnimator } - -constructor TdxPSBitmapAnimator.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FAnimationSpeed := 10; - FAnimationStepCount := 10; - - FBitmap := TBitmap.Create; - FBitmap.Height := Height; - FBitmap.Width := Width; - - FState := False; -end; - -destructor TdxPSBitmapAnimator.Destroy; -begin - FBitmap.Free; - inherited Destroy; -end; - -procedure TdxPSBitmapAnimator.Paint; -begin - if State and not Bitmap.Empty then - Canvas.Draw(0, 0, Bitmap) -end; - -procedure TdxPSBitmapAnimator.Resize; -begin - inherited; - Bitmap.Height := Height; - Bitmap.Width := Width; -end; - -procedure TdxPSBitmapAnimator.Animate; -var - dY, V, I: Integer; - T: DWORD; - R: TRect; -begin - dY := Height div AnimationStepCount + Ord((Height mod AnimationStepCount) <> 0); - - T := GetTickCount; - for I := 1 to AnimationStepCount do - begin - while GetTickCount - T < DWORD(FAnimationSpeed) do ; - T := GetTickCount; - - if State then - begin - V := Height - I * dY; - if V < 0 then V := 0; - Canvas.Draw(0, V, Bitmap); - end - else - begin - V := I * dY; - if V >= Height then V := Height; - R := MakeBounds(Left, Top + V - dY, Width, dY); - InvalidateRect(Parent.Handle, @R, True); - UpdateWindow(Parent.Handle); - Canvas.Draw(0, V, Bitmap); - end; - end; - - if Bitmap.Width < Width then - begin - Canvas.Brush.Color := clBtnFace; - Canvas.FillRect(MakeRect(Bitmap.Width, 0, Width, Height)); - end; -end; - -procedure TdxPSBitmapAnimator.StateChanged; -begin - if not Bitmap.Empty then Animate; -end; - -procedure TdxPSBitmapAnimator.SetBitmap(Value: TBitmap); -begin - Bitmap.Assign(Value); - Bitmap.Height := Height; - Bitmap.Width := Width; -end; - -procedure TdxPSBitmapAnimator.SetState(Value: Boolean); -begin - if FState <> Value then - begin - FState := Value; - StateChanged; - end; -end; - -{ TdxPSWarningPane } - -constructor TdxPSWarningPane.Create(AOwner: TComponent); -begin - inherited; - Font.Name := 'Tahoma'; - Font.Color := clInfoText; -end; - -procedure TdxPSWarningPane.SetStateAndHint(NewState: Boolean; const AHint: string); -begin - if State <> NewState then - if not State then - begin - Hint := AHint; - State := True; - end - else - State := False - else - Hint := AHint; -end; - -procedure TdxPSWarningPane.InitializeBitmap; -var - R: TRect; - X, Y: Integer; -begin - with Bitmap do - begin - R := MakeRect(0, 0, Width, Height); - // frame & Interior - Canvas.Pen.Color := clBtnShadow; - Canvas.Brush.Style := bsSolid; - Canvas.Brush.Color := clInfoBk; - Canvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom); - InflateRect(R, -1, -1); - - // warning sign - with R do - begin - X := Left + 2; - Y := Top + (Bottom - Top - WarningSignBitmap.Height) div 2; - end; - Canvas.Draw(X, Y, WarningSignBitmap); - InflateRect(R, -1, -1); - - // text - Inc(R.Left, 2 + WarningSignBitmap.Width + 4); - Canvas.Brush.Style := bsClear; - Canvas.Font := Font; - InitializeBitmapHint(R); - end; -end; - -procedure TdxPSWarningPane.InitializeBitmapHint(var R: TRect); -const - TextFormats: array[Boolean] of UINT = (DT_SINGLELINE or DT_VCENTER, DT_WORDBREAK); -var - IsWordWrap: Boolean; -begin - IsWordWrap := Bitmap.Canvas.TextWidth(Hint) > (R.Right - R.Left); - DrawText(Bitmap.Canvas.Handle, PChar(Hint), Length(Hint), R, TextFormats[IsWordWrap]); -end; - -procedure TdxPSWarningPane.StateChanged; -begin - inherited; - Beep; -end; - -procedure TdxPSWarningPane.SetHint(const Value: string); -begin - if FHint <> Value then - begin - FHint := Value; - InitializeBitmap; - if State then Invalidate; - end; -end; - -{ TdxPSImageScrollBox } - -constructor TdxPSImageScrollBox.Create(AOwner: TComponent); -begin - inherited; - FBuiltInMenuItemsVisibility := [biiPreview..biiSave]; - Font.Style := Font.Style + [fsBold]; - HorzScrollBar.Tracking := True; - VertScrollBar.Tracking := True; - - FBuiltInImages := TImageList.Create(Self); - FBuiltInMenu := TPopupMenu.Create(Self); - FCanvas := TControlCanvas.Create; - FCanvas.Control := Self; - FPicture := TPicture.Create; - FPicture.OnChange := PictureChanged; - FCenter := True; - ParentFont := False; - - CreateBuiltInImages; - CreateBuiltInMenu; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(Self); -end; - -destructor TdxPSImageScrollBox.Destroy; -begin - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(Self); - FreeAndNil(FPicture); - FreeAndNil(FCanvas); - inherited; -end; - -procedure TdxPSImageScrollBox.CreateParams(var Params: TCreateParams); -begin - inherited; - Params.WindowClass.Style := Params.WindowClass.Style + (CS_HREDRAW or CS_VREDRAW); -end; - -procedure TdxPSImageScrollBox.DblClick; -begin - inherited; - //if (biiPreview in FBuiltInMenuItemsVisibility) and HasGraphic then - // dxPCPrVw.dxShowPicturePreview(Picture.Graphic); -end; - -function TdxPSImageScrollBox.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; -type - TScrollDirection = (sdLeft, sdTop, sdRight, sdBottom); - - function GetScrollDirection: TScrollDirection; - const - ScrollDirectionHorzMap: array[Boolean] of TScrollDirection = (sdRight, sdLeft); - ScrollDirectionVertMap: array[Boolean] of TScrollDirection = (sdBottom, sdTop); - begin - if HasScrollVertBar then - Result := ScrollDirectionVertMap[WheelDelta > 0] - else - if HasScrollHorzBar then - Result := ScrollDirectionHorzMap[WheelDelta > 0] - else - Result := sdTop; - end; - -const - MsgMap: array[TScrollDirection] of Cardinal = (WM_HSCROLL, WM_VSCROLL, WM_HSCROLL, WM_VSCROLL); - ScrollCodeMap: array[TScrollDirection] of Smallint = (SB_LINELEFT, SB_LINEUP, SB_LINERIGHT, SB_LINEDOWN); - ScrollBarMap: array[TScrollDirection] of Integer = (SB_HORZ, SB_VERT, SB_HORZ, SB_VERT); -var - ScrollDirection: TScrollDirection; - Message: TWMScroll; -begin - Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); - if not Result and HasScrollBars then - begin - ScrollDirection := GetScrollDirection; - FillChar(Message, SizeOf(TMessage), 0); - with Message do - begin - Msg := MsgMap[ScrollDirection]; - ScrollCode := ScrollCodeMap[ScrollDirection]; - Pos := GetScrollPos(Handle, ScrollBarMap[ScrollDirection]) + WheelDelta; - end; - Dispatch(Message); - end; -end; - -procedure TdxPSImageScrollBox.CreateBuiltInImages; - - procedure LoadImage(B: TBitmap; const AResName: string); - begin - Bitmap_LoadFromResourceName(B, AResName); - BuiltInImages.AddMasked(B, B.Canvas.Pixels[0, B.Height - 1]); - end; - -var - B: TBitmap; -begin - BuiltInImages.AllocBy := 3; - - B := TBitmap.Create; - try - LoadImage(B, IDB_DXPSPREVIEW); - LoadImage(B, IDB_DXPSCOPY); - LoadImage(B, IDB_DXPSSAVE); - finally - B.Free; - end; -end; - -procedure TdxPSImageScrollBox.CreateBuiltInMenu; - - function CreateMenuItem(const ACaption: string; AnImageIndex: Integer; AShortCut: TShortCut; - AnOnClick: TNotifyEvent): TMenuItem; - begin - Result := TMenuItem.Create(Self); - with Result do - begin - Caption := ACaption; - ImageIndex := AnImageIndex; - ShortCut := AShortCut; - - OnClick := AnOnClick; - end; - BuiltInMenu.Items.Add(Result); - end; - -begin - miPreview := CreateMenuItem(dxPSUtl.AddEndEllipsis(cxGetResourceString(@sdxPreview)), 0, 0, PreviewClick); - miLine1 := CreateMenuItem('-', -1, 0, nil); - miCopy := CreateMenuItem(cxGetResourceString(@sdxCopy), 1, Menus.TextToShortCut('Ctrl+C'), CopyClick); - miLine2 := CreateMenuItem('-', -1, 0, nil); - miSave := CreateMenuItem(cxGetResourceString(@sdxSave), 2, Menus.TextToShortCut('Ctrl+S'), SaveClick); - - BuiltInMenu.Images := BuiltInImages; - BuiltInMenu.OnPopup := BuiltInMenuPopup; - - PopupMenu := BuiltInMenu; -end; - -procedure TdxPSImageScrollBox.DrawHint; -const - TextFormat: UINT = DT_CENTER or DT_VCENTER or DT_WORDBREAK; -var - DC: HDC; - F: HFONT; - R: TRect; -begin - DC := Canvas.Handle; - - FillRect(DC, ClientRect, GetSysColorBrush(COLOR_BTNFACE)); - - F := SelectObject(DC, Font.Handle); - - R := HintTextRect; - SetBkMode(DC, Windows.TRANSPARENT); - DrawText(DC, PChar(HintText), Length(HintText), R, TextFormat); - SetBkMode(DC, Windows.OPAQUE); - - SelectObject(DC, F); -end; - -procedure TdxPSImageScrollBox.DrawPicture; -begin - Canvas.Draw(PictureOriginX, PictureOriginY, Picture.Graphic); -end; - -procedure TdxPSImageScrollBox.DrawPictureRestSpace; - - procedure DrawRestSpaceRect(const R: TRect); - begin - {$IFDEF DELPHI7} - with Themes.ThemeServices do - if ThemesEnabled then - DrawParentBackground(Handle, Canvas.Handle, nil, False) - else - {$ENDIF} - Canvas.FillRect(R); - end; - -begin - Canvas.Brush.Color := Color; - if HasPictureRestRectLeft then DrawRestSpaceRect(PictureRestRectLeft); - if HasPictureRestRectTop then DrawRestSpaceRect(PictureRestRectTop); - if HasPictureRestRectRight then DrawRestSpaceRect(PictureRestRectRight); - if HasPictureRestRectBottom then DrawRestSpaceRect(PictureRestRectBottom); -end; - -procedure TdxPSImageScrollBox.Paint; -begin - FIsGraphicInvalid := False; - try - if HasGraphic then - begin - DrawPictureRestSpace; - DrawPicture; - end - else - DrawHint; - except - FIsGraphicInvalid := True; - DrawHint; - end; -end; - -function TdxPSImageScrollBox.GetCanvas: TCanvas; -begin - Result := FCanvas; -end; - -function TdxPSImageScrollBox.GetHasGraphic: Boolean; -begin - Result := (Picture.Graphic <> nil) and not Picture.Graphic.Empty; -end; - -function TdxPSImageScrollBox.GetHasPictureRestRectBottom: Boolean; -begin - Result := RectVisible(Canvas.Handle, PictureRestRectBottom); -end; - -function TdxPSImageScrollBox.GetHasPictureRestRectLeft: Boolean; -begin - Result := RectVisible(Canvas.Handle, PictureRestRectLeft); -end; - -function TdxPSImageScrollBox.GetHasPictureRestRectRight: Boolean; -begin - Result := RectVisible(Canvas.Handle, PictureRestRectRight); -end; - -function TdxPSImageScrollBox.GetHasPictureRestRectTop: Boolean; -begin - Result := RectVisible(Canvas.Handle, PictureRestRectTop); -end; - -function TdxPSImageScrollBox.GetHasScrollBars: Boolean; -begin - Result := HasScrollHorzBar or HasScrollVertBar; -end; - -function TdxPSImageScrollBox.GetHasScrollHorzBar: Boolean; -begin - Result := HandleAllocated and (GetWindowLong(Handle, GWL_STYLE) and WS_HSCROLL <> 0); -end; - -function TdxPSImageScrollBox.GetHasScrollVertBar: Boolean; -begin - Result := HandleAllocated and (GetWindowLong(Handle, GWL_STYLE) and WS_VSCROLL <> 0); -end; - -function TdxPSImageScrollBox.GetHintTextRect: TRect; -const - TextFormat: UINT = DT_CALCRECT or DT_WORDBREAK; -var - X, Y: Integer; -begin - Result := ClientRect; - DrawText(Canvas.Handle, PChar(HintText), Length(HintText), Result, TextFormat); - - X := (ClientWidth - (Result.Right - Result.Left)) div 2; - Y := (ClientHeight - (Result.Bottom - Result.Top)) div 2; - OffsetRect(Result, X, Y); -end; - -function TdxPSImageScrollBox.GetIsPictureHeightExceedControlBounds: Boolean; -begin - Result := Picture.Graphic.Height > ClientHeight; -end; - -function TdxPSImageScrollBox.GetIsPictureWidthExceedControlBounds: Boolean; -begin - Result := Picture.Graphic.Width > ClientWidth; -end; - -function TdxPSImageScrollBox.GetPictureOriginX: Integer; -begin - if IsPictureWidthExceedControlBounds then - Result := -HorzScrollBar.Position - else - if Center then - Result := (ClientWidth - Picture.Graphic.Width) div 2 - else - Result := 0; -end; - -function TdxPSImageScrollBox.GetPictureOriginY: Integer; -begin - if IsPictureHeightExceedControlBounds then - Result := -VertScrollBar.Position - else - if Center then - Result := (ClientHeight - Picture.Graphic.Height) div 2 - else - Result := 0; -end; - -function TdxPSImageScrollBox.GetPictureHeight: Integer; -begin - with PictureRect do - Result := Bottom - Top; -end; - -function TdxPSImageScrollBox.GetPictureRect: TRect; -begin - if HasGraphic then - Result := MakeBounds(PictureOriginX, PictureOriginY, Picture.Graphic.Width, Picture.Graphic.Height) - else - Result := NullRect; -end; - -function TdxPSImageScrollBox.GetPictureWidth: Integer; -begin - with PictureRect do - Result := Right - Left; -end; - -function TdxPSImageScrollBox.GetPictureRestRectBottom: TRect; -begin - with Result do - begin - Left := PictureRestRectLeft.Right; - Top := PictureRect.Bottom; - Right := Left + PictureWidth; - Bottom := ClientHeight; - end; -end; - -function TdxPSImageScrollBox.GetPictureRestRectLeft: TRect; -begin - Result := MakeBounds(0, 0, PictureOriginX, ClientHeight); -end; - -function TdxPSImageScrollBox.GetPictureRestRectRight: TRect; -begin - Result := MakeRect(PictureOriginX + Picture.Graphic.Width - 1, 0, ClientWidth, ClientHeight); -end; - -function TdxPSImageScrollBox.GetPictureRestRectTop: TRect; -begin - with Result do - begin - Left := PictureRestRectLeft.Right; - Top := 0; - Right := Left + PictureWidth; - Bottom := PictureOriginY; - end; -end; - -procedure TdxPSImageScrollBox.SetCenter(Value: Boolean); -begin - if FCenter <> Value then - begin - FCenter := Value; - if HasGraphic then Invalidate; - end; -end; - -procedure TdxPSImageScrollBox.SetHintText(const Value: string); -begin - if FHintText <> Value then - begin - FHintText := Value; - if not HasGraphic then Invalidate; - end; -end; - -procedure TdxPSImageScrollBox.SetPicture(Value: TPicture); -begin - Picture.Assign(Value); -end; - -procedure TdxPSImageScrollBox.BuiltInMenuPopup(Sender: TObject); -begin - miPreview.Visible := biiPreview in FBuiltInMenuItemsVisibility; - miPreview.Enabled := HasGraphic; - miLine1.Visible := miPreview.Visible; - miCopy.Visible := biiCopy in FBuiltInMenuItemsVisibility; - miCopy.Enabled := HasGraphic; - miLine2.Visible := miCopy.Visible; - miSave.Visible := biiSave in FBuiltInMenuItemsVisibility; - miSave.Enabled := HasGraphic; -end; - -procedure TdxPSImageScrollBox.CopyClick(Sender: TObject); -begin - if HasGraphic then Clipboard.Assign(Picture.Graphic); -end; - -procedure TdxPSImageScrollBox.SaveClick(Sender: TObject); -var - GraphicClass: TGraphicClass; -begin - if HasGraphic then - begin - GraphicClass := TGraphicClass(Picture.Graphic.ClassType); - with TSavePictureDialog.Create(nil) do - try - DefaultExt := GraphicExtension(GraphicClass); - Filter := GraphicFilter(GraphicClass); - Options := Options + [ofOverwritePrompt]; - if Execute then - Picture.SaveToFile(FileName); - finally - Free; - end; - end; -end; - -procedure TdxPSImageScrollBox.PictureChanged(Sender: TObject); -begin - HorzScrollBar.Range := Picture.Width; - VertScrollBar.Range := Picture.Height; - Invalidate; -end; - -procedure TdxPSImageScrollBox.PreviewClick(Sender: TObject); -begin - if HasGraphic then dxPCPrVw.dxShowPicturePreview(Picture.Graphic); -end; - -procedure TdxPSImageScrollBox.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - message.Result := 1; -end; - -procedure TdxPSImageScrollBox.WMMouseActivate(var Message: TWMMouseActivate); -begin - inherited; - if not (csDesigning in ComponentState) and CanFocus then - SetFocus; -end; - -procedure TdxPSImageScrollBox.WMNCPaint(var Message: TWMNCPaint); -begin - inherited; - {$IFDEF DELPHI7} - with Themes.ThemeServices do - if ThemesEnabled then - PaintBorder(Self, True); - {$ENDIF} -end; - -procedure TdxPSImageScrollBox.WMPaint(var Message: TWMPaint); -var - PaintStruct: TPaintStruct; -begin - Canvas.Lock; - try - Canvas.Handle := BeginPaint(Handle, PaintStruct); - try - Paint; - finally - Canvas.Handle := 0; - EndPaint(Handle, PaintStruct); - end; - finally - Canvas.Unlock; - end; -end; - -initialization - -finalization - FreeAndNil(FWarningSignBitmap); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxExtCtrlsStrs.pas b/internal/x.46/ExpressPrinting System/Sources/dxExtCtrlsStrs.pas deleted file mode 100644 index ac778eea..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxExtCtrlsStrs.pas +++ /dev/null @@ -1,106 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxExtCtrlsStrs; - -interface - -{$I cxVer.inc} - -resourcestring - sdxAutoColorText = 'Auto'; - sdxCustomColorText = 'Custom...'; - - sdxSysColorScrollBar = 'ScrollBar'; - sdxSysColorBackground = 'Background'; - sdxSysColorActiveCaption = 'Active Caption'; - sdxSysColorInactiveCaption = 'Inactive Caption'; - sdxSysColorMenu = 'Menu'; - sdxSysColorWindow = 'Window'; - sdxSysColorWindowFrame = 'Window Frame'; - sdxSysColorMenuText = 'Menu Text'; - sdxSysColorWindowText = 'Window Text'; - sdxSysColorCaptionText = 'Caption Text'; - sdxSysColorActiveBorder = 'Active Border'; - sdxSysColorInactiveBorder = 'Inactive Border'; - sdxSysColorAppWorkSpace = 'App Workspace'; - sdxSysColorHighLight = 'Highlight'; - sdxSysColorHighLighText = 'Highlight Text'; - sdxSysColorBtnFace = 'Button Face'; - sdxSysColorBtnShadow = 'Button Shadow'; - sdxSysColorGrayText = 'Gray Text'; - sdxSysColorBtnText = 'Button Text'; - sdxSysColorInactiveCaptionText = 'Inactive Caption Text'; - sdxSysColorBtnHighligh = 'Button Highlight'; - sdxSysColor3DDkShadow = '3DDk Shadow'; - sdxSysColor3DLight = '3DLight'; - sdxSysColorInfoText = 'Info Text'; - sdxSysColorInfoBk = 'InfoBk'; - - sdxPureColorBlack = 'Black'; - sdxPureColorRed = 'Red'; - sdxPureColorLime = 'Lime'; - sdxPureColorYellow = 'Yellow'; - sdxPureColorGreen = 'Green'; - sdxPureColorTeal = 'Teal'; - sdxPureColorAqua = 'Aqua'; - sdxPureColorBlue = 'Blue'; - sdxPureColorWhite = 'White'; - sdxPureColorOlive = 'Olive'; - sdxPureColorMoneyGreen = 'Money Green'; - sdxPureColorNavy = 'Navy'; - sdxPureColorSkyBlue = 'Sky Blue'; - sdxPureColorGray = 'Gray'; - sdxPureColorMedGray = 'Medium Gray'; - sdxPureColorSilver = 'Silver'; - sdxPureColorMaroon = 'Maroon'; - sdxPureColorPurple = 'Purple'; - sdxPureColorFuchsia = 'Fuchsia'; - sdxPureColorCream = 'Cream'; - - sdxBrushStyleSolid = 'Solid'; - sdxBrushStyleClear = 'Clear'; - sdxBrushStyleHorizontal = 'Horizontal'; - sdxBrushStyleVertical = 'Vertical'; - sdxBrushStyleFDiagonal = 'FDiagonal'; - sdxBrushStyleBDiagonal = 'BDiagonal'; - sdxBrushStyleCross = 'Cross'; - sdxBrushStyleDiagCross = 'DiagCross'; - -implementation - -end. - - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxFEFDlg.dfm b/internal/x.46/ExpressPrinting System/Sources/dxFEFDlg.dfm deleted file mode 100644 index c59d4172..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxFEFDlg.dfm +++ /dev/null @@ -1,745 +0,0 @@ -object dxFEFDialog: TdxFEFDialog - Left = 446 - Top = 168 - ActiveControl = dgTexture - BorderStyle = bsDialog - Caption = 'Fill Effects' - ClientHeight = 301 - ClientWidth = 392 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - ShowHint = True - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object lblSample: TLabel - Left = 307 - Top = 214 - Width = 44 - Height = 13 - Caption = 'Sample : ' - end - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 297 - Height = 292 - ActivePage = tshTexture - TabOrder = 0 - OnChange = PageControl1Change - object tshTexture: TTabSheet - Caption = '&Texture' - object dgTexture: TDrawGrid - Left = 4 - Top = 4 - Width = 280 - Height = 198 - BorderStyle = bsNone - ColCount = 4 - Ctl3D = True - DefaultColWidth = 65 - DefaultRowHeight = 65 - DefaultDrawing = False - FixedCols = 0 - RowCount = 6 - FixedRows = 0 - Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goThumbTracking] - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnClick = dgTextureClick - OnDblClick = dgTextureDblClick - OnDrawCell = dgTextureDrawCell - OnMouseMove = dgTextureMouseMove - end - object pnlTextureName: TPanel - Left = 4 - Top = 205 - Width = 280 - Height = 24 - BevelOuter = bvLowered - TabOrder = 1 - end - object btnOtherTexture: TButton - Left = 150 - Top = 237 - Width = 134 - Height = 23 - Caption = '&Other Texture ...' - TabOrder = 2 - OnClick = btnOtherTextureClick - end - end - object tshPattern: TTabSheet - Caption = '&Pattern' - object lblForeground: TLabel - Left = 5 - Top = 191 - Width = 66 - Height = 13 - Caption = '&Foreground : ' - OnClick = lblForegroundClick - end - object lblBackground: TLabel - Left = 160 - Top = 191 - Width = 66 - Height = 13 - Caption = '&Background : ' - OnClick = lblForegroundClick - end - object bvlForeColorHolder: TBevel - Left = 4 - Top = 208 - Width = 124 - Height = 21 - Visible = False - end - object bvlBackColorHolder: TBevel - Left = 160 - Top = 208 - Width = 125 - Height = 21 - Visible = False - end - object dgPattern: TDrawGrid - Left = 4 - Top = 4 - Width = 280 - Height = 156 - BorderStyle = bsNone - ColCount = 8 - DefaultColWidth = 34 - DefaultRowHeight = 25 - DefaultDrawing = False - FixedCols = 0 - RowCount = 6 - FixedRows = 0 - Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine] - ParentShowHint = False - ScrollBars = ssNone - ShowHint = True - TabOrder = 0 - OnClick = dgPatternClick - OnDblClick = dgPatternDblClick - OnDrawCell = dgPatternDrawCell - OnMouseMove = dgPatternMouseMove - end - object pnlPatternName: TPanel - Left = 4 - Top = 163 - Width = 281 - Height = 23 - BevelOuter = bvLowered - TabOrder = 1 - end - object btnInvert: TButton - Left = 4 - Top = 237 - Width = 281 - Height = 23 - Caption = 'I&nvert colors' - TabOrder = 2 - OnClick = btnInvertClick - end - end - object tshPicture: TTabSheet - Caption = 'P&icture' - object lblPaintMode: TLabel - Left = 7 - Top = 210 - Width = 53 - Height = 13 - Caption = 'Paint &mode' - FocusControl = cbxPaintMode - OnClick = lblPaintModeClick - end - object Bevel4: TBevel - Left = 64 - Top = 216 - Width = 217 - Height = 3 - Shape = bsBottomLine - end - object sbxPicture: TScrollBox - Left = 4 - Top = 4 - Width = 279 - Height = 145 - HorzScrollBar.Tracking = True - VertScrollBar.Tracking = True - PopupMenu = pmPicture - TabOrder = 0 - TabStop = True - object pnlPicture: TPanel - Left = 0 - Top = 0 - Width = 273 - Height = 138 - BevelOuter = bvNone - TabOrder = 0 - object pbxPicture: TPaintBox - Left = 0 - Top = 0 - Width = 273 - Height = 138 - Align = alClient - OnPaint = pbxPicturePaint - end - object pnlNoPicture: TPanel - Left = 48 - Top = 58 - Width = 185 - Height = 25 - BevelOuter = bvNone - Caption = 'There is no Picture to display' - TabOrder = 0 - end - end - end - object pnlPictureName: TPanel - Left = 4 - Top = 152 - Width = 279 - Height = 24 - BevelOuter = bvLowered - TabOrder = 1 - end - object btnSelectPicture: TButton - Left = 146 - Top = 181 - Width = 137 - Height = 23 - Caption = 'Se&lect Picture ...' - TabOrder = 3 - OnClick = SelectPictureClick - end - object cbxPaintMode: TComboBox - Left = 6 - Top = 228 - Width = 129 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 4 - OnChange = cbxPaintModeChange - Items.Strings = ( - 'Center' - 'Stretch' - 'Tile' - 'Proportional') - end - object btnPreview: TButton - Left = 4 - Top = 181 - Width = 137 - Height = 23 - Caption = 'Pre&view ...' - TabOrder = 2 - OnClick = PicturePreviewClick - end - end - end - object pnlPreview: TPanel - Left = 316 - Top = 229 - Width = 65 - Height = 65 - BevelOuter = bvNone - BorderStyle = bsSingle - TabOrder = 5 - object pbxPreview: TPaintBox - Left = 0 - Top = 0 - Width = 61 - Height = 61 - Align = alClient - OnPaint = pbxPreviewPaint - end - end - object btnHelp: TButton - Left = 308 - Top = 112 - Width = 80 - Height = 23 - Caption = '&Help' - TabOrder = 4 - end - object btnApply: TButton - Left = 308 - Top = 83 - Width = 80 - Height = 23 - Caption = '&Apply' - TabOrder = 3 - OnClick = btnApplyClick - end - object btnCancel: TButton - Left = 308 - Top = 54 - Width = 80 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnOK: TButton - Left = 308 - Top = 25 - Width = 80 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object pmPicture: TPopupMenu - OnPopup = pmPicturePopup - Left = 340 - Top = 146 - object miPreview: TMenuItem - Caption = 'Pre&view...' - OnClick = PicturePreviewClick - end - object N3: TMenuItem - Caption = '-' - end - object miLoad: TMenuItem - Caption = '&Load...' - ShortCut = 45 - OnClick = SelectPictureClick - end - object miDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = miDeleteClick - end - object N2: TMenuItem - Caption = '-' - end - object miCut: TMenuItem - Caption = 'Cu&t' - ShortCut = 16472 - OnClick = miCutClick - end - object miCopy: TMenuItem - Caption = '&Copy' - ShortCut = 16451 - OnClick = miCopyClick - end - object miPaste: TMenuItem - Caption = '&Paste' - ShortCut = 16470 - OnClick = miPasteClick - end - end - object ilMenu: TImageList - Left = 312 - Top = 146 - Bitmap = { - 494C010106000A00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF008400000084000000840000008400 - 00008400000084000000FFFFFF00840000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00840000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00840000008400000084000000FFFF - FF00840000008400000084000000840000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0084000000FFFFFF0084000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000840000008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840000848400848484000084840084848400008484008484 - 8400008484000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484000000 - 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600000000008484 - 8400008484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 84000000000000FFFF00000000000000000000FFFF0000000000848484000084 - 8400848484000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000FFFF0000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000008400 - 0000000000000000000084000000000000000000000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000008484000084 - 8400008484000084840000848400008484000084840000848400008484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000FF000000FF000000FF000000FF000000FFFF - FF00000000000000000000000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000FFFF00000000000084 - 8400008484000084840000848400008484000084840000848400008484000084 - 8400000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF00840000000000000000000000FFFFFF0000FFFF000000 - 0000008484000084840000848400008484000084840000848400008484000084 - 8400008484000000000000000000000000008484840084848400848484000000 - 000000000000FF000000FF000000FF000000FF000000FF000000FF000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000840000008400000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000084840000848400008484000084840000848400008484000084 - 84000084840000848400000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000084000000840000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF00840000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00840000008400 - 000000000000FF000000FF000000FF000000FF000000FF000000FF000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000FFFFFF008400 - 00008400000084000000840000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF00840000008400 - 00008400000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000FFFFFF008400000000000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000084848400848484008484840084848400848484008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00840000008400 - 000084000000840000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000084000000840000008400000084000000840000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00C6C6C6000000000000000000000000000000 - 0000FFFFFF00FFFFFF0084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00840000008400 - 00008400000084000000FFFFFF00C6C6C600FFFFFF0084000000840000008400 - 0000840000008400000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFF00000000FC00FFFF00000000 - 8000FFF9000000000000E7FF000000000000C3F3000000000000C3E700000000 - 0001E1C7000000000003F08F000000000003F81F000000000003FC3F00000000 - 0003F81F000000000003F09F000000000003C1C700000000800783E300000000 - F87F8FF100000000FFFFFFFF00000000FFFFFFFEFFFFFFFFFFFFFF0CF3FFFFFF - 001FFC00ED9FFC01000FF805ED6FFC010007F805ED6FFC0100030006F16F0001 - 00010006FD1F000100000006FC7F0001001F0006FEFF0001001F0005FC7F0003 - 001F0005FD7F00078FF10001F93F000FFFF90001FBBF00FFFF750001FBBF01FF - FF8F0001FBBF03FFFFFF0001FFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxFEFDlg.pas b/internal/x.46/ExpressPrinting System/Sources/dxFEFDlg.pas deleted file mode 100644 index b8338a85..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxFEFDlg.pas +++ /dev/null @@ -1,1597 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxFEFDlg; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, ExtDlgs, Registry, - StdCtrls, ExtCtrls, ComCtrls, Grids, Forms, Menus, Consts, ImgList, dxPSForm, - dxBkgnd; - -type - TdxFillAs = (faNone, faTexture, faPattern, faPicture); - - TdxFEFDialog = class(TCustomdxPSForm) - PageControl1: TPageControl; - tshTexture: TTabSheet; - tshPattern: TTabSheet; - tshPicture: TTabSheet; - dgTexture: TDrawGrid; - pnlTextureName: TPanel; - lblForeground: TLabel; - lblBackground: TLabel; - dgPattern: TDrawGrid; - pnlPatternName: TPanel; - btnOtherTexture: TButton; - sbxPicture: TScrollBox; - pnlPictureName: TPanel; - btnSelectPicture: TButton; - cbxPaintMode: TComboBox; - lblPaintMode: TLabel; - Bevel4: TBevel; - pnlPicture: TPanel; - pbxPicture: TPaintBox; - btnPreview: TButton; - btnInvert: TButton; - bvlForeColorHolder: TBevel; - bvlBackColorHolder: TBevel; - pnlPreview: TPanel; - pbxPreview: TPaintBox; - lblSample: TLabel; - btnHelp: TButton; - btnApply: TButton; - btnCancel: TButton; - btnOK: TButton; - pmPicture: TPopupMenu; - miCut: TMenuItem; - miCopy: TMenuItem; - miPaste: TMenuItem; - miDelete: TMenuItem; - miPreview: TMenuItem; - miLoad: TMenuItem; - ilMenu: TImageList; - N2: TMenuItem; - N3: TMenuItem; - pnlNoPicture: TPanel; - procedure dgTextureDrawCell(Sender: TObject; Col, Row: Integer; - Rect: TRect; State: TGridDrawState); - procedure dgPatternDrawCell(Sender: TObject; Col, Row: Integer; - Rect: TRect; State: TGridDrawState); - procedure SelectPictureClick(Sender: TObject); - procedure btnOtherTextureClick(Sender: TObject); - procedure dgTextureClick(Sender: TObject); - procedure dgPatternClick(Sender: TObject); - procedure pbxPreviewPaint(Sender: TObject); - procedure pbxPicturePaint(Sender: TObject); - procedure cbxColorChange(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure PicturePreviewClick(Sender: TObject); - procedure cbxPaintModeChange(Sender: TObject); - procedure lblPaintModeClick(Sender: TObject); - procedure lblForegroundClick(Sender: TObject); - procedure btnApplyClick(Sender: TObject); - procedure dgTextureDblClick(Sender: TObject); - procedure dgPatternDblClick(Sender: TObject); - procedure dgTextureMouseMove(Sender: TObject; Shift: TShiftState; X, - Y: Integer); - procedure dgPatternMouseMove(Sender: TObject; Shift: TShiftState; X, - Y: Integer); - procedure btnInvertClick(Sender: TObject); - procedure pmPicturePopup(Sender: TObject); - procedure miCopyClick(Sender: TObject); - procedure miPasteClick(Sender: TObject); - procedure miDeleteClick(Sender: TObject); - procedure miCutClick(Sender: TObject); - private - cbxBackColor: TCustomComboBox; - cbxForeColor: TCustomComboBox; - FActivePage: Integer; - FApplied: Boolean; - FBackground: TdxBackground; - FbmpPattern: TBitmap; - FbmpCurrentPattern: TBitmap; - FbmpTexture: TBitmap; - FControlsUpdating: Boolean; - FFirstApplied: Boolean; - FInitialDir: string; - FModified: Boolean; - FOriginalBackground: TdxBackground; - FOtherPicture: TGraphic; - FOtherPictureName: string; - FOtherTexture: TBitmap; - FOtherTextureName: string; - FPatternNames: TStringList; - FPatternWasSelected: Boolean; - FPicture: TGraphic; - FPictureExists: Boolean; - FPreviewWhat: TdxFillAs; - FTextureWasSelected: Boolean; - FTextureNames: TStringList; - FOnApply: TNotifyEvent; - - function GetBackColor: TColor; - function GetForeColor: TColor; - function GetOtherPicture(AGraphicClass: TGraphicClass): TGraphic; - function GetOtherTexture: TBitmap; - function GetPaintMode: TdxPicturePaintMode; - function GetPicture: TGraphic; - function GetSelectWhat: TdxFillAs; - procedure SetBackColor(Value: TColor); - procedure SetBackground(Value: TdxBackground); - procedure SetForeColor(Value: TColor); - procedure SetOtherTexture(Value: TBitmap); - procedure SetPaintMode(Value: TdxPicturePaintMode); - procedure SetPicture(Value: TGraphic); - procedure SetSelectWhat(Value: TdxFillAs); - - procedure AssignPicture(AImage: TGraphic); - procedure CheckModified; - function CopyPattern(I, J: Integer): TBitmap; - function CopyTexture(I, J: Integer): TBitmap; - procedure CreateControls; - procedure DrawSelectedFrame(ADrawGrid: TDrawGrid; Rect: TRect); - procedure DoApply; - procedure DoInvertColors; - procedure FreeAndNilResources; - function InternalLoadImage(var AImage: TGraphic; const AFileName: string): Boolean; - procedure LoadImage(var AImage: TGraphic; AWhat: Integer); - procedure LoadResources; - procedure MapPatternColors; - procedure PaintPicture; - procedure PaintPreview; - procedure StartSetting; - procedure SetupDialog; - procedure UpdateControlsState; - - procedure CMDialogChar(var Msg: TCMDialogChar); message CM_DIALOGCHAR; - procedure WMCancelMode(var Msg: TWMCancelMode); message WM_CANCELMODE; - - property BackColor: TColor read GetBackColor write SetBackColor; - property ForeColor: TColor read GetForeColor write SetForeColor; - property OtherTexture: TBitmap read GetOtherTexture write SetOtherTexture; - property PaintMode: TdxPicturePaintMode read GetPaintMode write SetPaintMode; - property Picture: TGraphic read GetPicture write SetPicture; - property SelectWhat: TdxFillAs read GetSelectWhat write SetSelectWhat; - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure Loaded; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; - - procedure LoadFromRegistry(const APath: string); override; - procedure SaveToRegistry(const APath: string); override; - - property Background: TdxBackground read FBackground write SetBackground; - property OnApply: TNotifyEvent read FOnApply write FOnApply; - end; - -function dxFEFDialog(ABackground: TdxBackground): Boolean; -function StandardGetGraphicClassProc(const AFileName: string): TGraphicClass; - -type - TdxGetGraphicClassProc = function(const AFileName: string): TGraphicClass; - -var - GetGraphicClassProc: TdxGetGraphicClassProc = StandardGetGraphicClassProc; - -implementation - -{$R *.DFM} - -uses - {$IFDEF USEJPEGIMAGE} - Jpeg, - {$ENDIF} - ClipBrd, cxClasses, cxGraphics, dxPSGlbl, dxExtCtrls, dxPcPrVw, dxPSPopupMan, - dxPSImgs, dxPSRes, dxPSUtl; - -type - TdxBackgroundAccess = class(TdxBackground); - -const - PatternCount: TPoint = (X: 8; Y: 6); - PatternSize: TPoint = (X: 8; Y: 8); - TextureCount: TPoint = (X: 4; Y: 6); - TextureSize: TPoint = (X: 64; Y: 64); - - sdxInitialDir = 'InitialDir'; //Don't Localize - sdxActivePage = 'ActivePage'; //Don't Localize - -function dxCreateMappedBmp(ASource: TBitmap; const OldColors, NewColors: array of TColor): TBitmap; -var - I, J, K: Integer; -begin - Result := TBitmap.Create; - try - Result.Width := ASource.Width; - Result.Height := ASource.Height; - for I := 0 to ASource.Width - 1 do - for J := 0 to ASource.Height - 1 do - for K := Low(OldColors) to High(OldColors) do - if ASource.Canvas.Pixels[I, J] = OldColors[K] then - begin - Result.Canvas.Pixels[I, J] := NewColors[K]; - Break; - end - else - Result.Canvas.Pixels[I, J] := ASource.Canvas.Pixels[I, J]; - except - Result.Free; - raise; - end; -end; - -function dxFEFDialog(ABackground: TdxBackground): Boolean; -var - Dialog: TdxFEFDialog; - B: TBitmap; -begin - Result := False; - if ABackground = nil then Exit; - - Dialog := TdxFEFDialog.Create(nil); - try - Dialog.Background := ABackground; - Dialog.FOriginalBackground := ABackground; - Dialog.OnApply := TdxBackgroundAccess(ABackground).OnApply; - Result := Dialog.Execute or not Dialog.FFirstApplied; {at least one time button "Apply" was pressed} - if Dialog.ModalResult <> mrOK then Exit; - if Result then - begin - ABackground.BkColor := Dialog.BackColor; - ABackground.Brush.Color := Dialog.ForeColor; - ABackground.Picture := Dialog.Picture; - case Dialog.SelectWhat of - faTexture: - ABackground.Mode := bmBrushBitmap; - faPattern: - begin - B := TBitmap(ABackground.Picture); - B.Width := PatternSize.X; - B.Height := PatternSize.Y; - B.Canvas.Draw(-Dialog.dgPattern.Col * PatternSize.X, -Dialog.dgPattern.Row * PatternSize.Y, Dialog.FbmpCurrentPattern); - ABackground.Mode := bmBrushBitmap; - end; - faPicture: - begin - ABackground.Mode := bmPicture; - ABackground.PictureMode := Dialog.PaintMode; - end; - end; - end; - finally - Dialog.Free; - end; -end; - -function StandardGetGraphicClassProc(const AFileName: string): TGraphicClass; -var - Extention: string; -begin - Result := nil; - Extention := ExtractFileExt(AFileName); - if CompareText(Extention, '.' + GraphicExtension(TBitmap)) = 0 then - Result := TBitmap - else - {$IFDEF USEJPEGIMAGE} - if CompareText(Extention, '.' + GraphicExtension(TJpegImage)) = 0 then - Result := TJpegImage - else - {$ENDIF} - if CompareText(Extention, '.' + GraphicExtension(TMetafile)) = 0 then - Result := TMetafile - else - if CompareText(Extention, '.wmf') = 0 then - Result := TMetafile; -end; - -{ TdxFEFDialog } - -constructor TdxFEFDialog.Create(AOwner: TComponent); -begin - inherited; - HelpContext := dxhcFEFDlg; - - FFirstApplied := True; - CreateControls; - LoadResources; - FPreviewWhat := faNone; - FPatternWasSelected := False; - FTextureWasSelected := False; - FPictureExists := False; - - pmPicture.Images := ilMenu; - miLoad.ImageIndex := 0; - miPreview.ImageIndex := 1; - miCut.ImageIndex := 2; - miCopy.ImageIndex := 3; - miPaste.ImageIndex := 4; - miDelete.ImageIndex := 5; - - dxPSPopupMenuController.RegisterControl(sbxPicture); -end; - -destructor TdxFEFDialog.Destroy; -begin - dxPSPopupMenuController.UnregisterControl(sbxPicture); - FreeAndNil(FPatternNames); - FreeAndNil(FTextureNames); - FreeAndNil(FBackground); - FreeAndNil(FPicture); - FreeAndNil(FOtherTexture); - FreeAndNil(FOtherPicture); - FreeAndNilResources; - inherited; -end; - -procedure TdxFEFDialog.CreateControls; - - function CreateColorCombo(AParent: TWinControl; ASite: TControl; ALabel: TLabel; - ATabOrder: Integer): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with Result do - begin - Parent := AParent; - BoundsRect := ASite.BoundsRect; - TabOrder := ATabOrder; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowCustomColor := False; - OnChange := cbxColorChange; - end; - ALabel.FocusControl := Result; - ASite.Visible := False; - end; - -begin - cbxForeColor := CreateColorCombo(tshPattern, bvlForeColorHolder, lblForeground, 1); - cbxBackColor := CreateColorCombo(tshPattern, bvlBackColorHolder, lblBackground, 2); - - FBackground := TdxBackground.Create; - FPicture := TBitmap.Create; - FPatternNames := TStringList.Create; - FTextureNames := TStringList.Create; -end; - -procedure TdxFEFDialog.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - Params.WindowClass.Style := Params.WindowClass.Style or CS_SAVEBITS; -end; - -procedure TdxFEFDialog.Loaded; -begin - inherited Loaded; - if Screen.PixelsPerInch > 96 then - begin - dgTexture.DefaultColWidth := (dgTexture.Width - GetSystemMetrics(SM_CXHSCROLL) - 1) div 4 - 1; - dgTexture.Width := dgTexture.Width - 1; - dgTexture.DefaultRowHeight := dgTexture.DefaultColWidth; - dgTexture.Height := dgTexture.Height - 2; - dgPattern.Width := dgPattern.Width - dgPattern.Width mod dgPattern.ColCount + 7; - dgPattern.DefaultColWidth := (dgPattern.Width - 1) div dgPattern.ColCount; - dgPattern.Height := dgPattern.Height - dgPattern.Height mod dgPattern.RowCount + 11; - dgPattern.DefaultRowHeight := dgPattern.Height div dgPattern.RowCount; - end; - with dgTexture do - pnlTextureName.SetBounds(Left, BoundsRect.Bottom + 3, Width, pnlTextureName.Height); - with dgPattern do - pnlPatternName.SetBounds(Left, BoundsRect.Bottom + 3, Width, pnlPatternName.Height); - btnInvert.SetBounds(dgPattern.Left, btnInvert.Top, dgPattern.Width, btnInvert.Height); -end; - -procedure TdxFEFDialog.CMDialogChar(var Msg: TCMDialogChar); -var - I: Integer; -begin - inherited; - with PageControl1 do - for I := 0 to PageCount - 1 do - if IsAccel(Msg.CharCode, Pages[I].Caption) then - begin - Msg.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TdxFEFDialog.WMCancelMode(var Msg: TWMCancelMode); -begin - inherited; - dgPattern.Invalidate; - dgTexture.Invalidate; -end; - -function TdxFEFDialog.Execute: Boolean; -begin - StartSetting; - Result := (ShowModal = mrOk) and FModified; -end; - -procedure TdxFEFDialog.SetBackground(Value: TdxBackground); -begin - FBackground.Assign(Value); - SetupDialog; - UpdateControlsState; -end; - -procedure TdxFEFDialog.SetupDialog; -var - bmp: TBitmap; - I, J: Integer; -begin - FControlsUpdating := True; - try - cbxPaintMode.ItemIndex := Integer(Background.PictureMode); - ForeColor := FBackground.Brush.Color; - BackColor := FBackground.BkColor; - if (BackColor = ForeColor) and (ForeColor = clWhite) then - ForeColor := clBlack; - MapPatternColors; - if FBackground.Picture <> nil then - begin - case FBackground.Mode of - bmNone: ; - bmBrush: ; - bmBrushBitmap: - begin - PageControl1.ActivePage := tshPattern; - for I := 0 to PatternCount.X - 1 do - for J := 0 to PatternCount.Y - 1 do - begin - bmp := CopyPattern(I, J); - try - if dxAreGraphicsEqual(Bmp, FBackground.Picture) then - begin - FPatternWasSelected := True; - dgPattern.Col := I; - dgPattern.Row := J; - FPicture.Assign(TBitmap(FBackground.Picture)); - FPreviewWhat := faPattern; - dgPatternClick(dgPattern); - end; - finally - bmp.Free; - end; - end; - - PageControl1.ActivePage := tshTexture; - for I := 0 to TextureCount.X - 1 do - for J := 0 to TextureCount.Y - 1 do - begin - bmp := CopyTexture(I, J); - try - if dxAreBitmapsEqual(bmp, TBitmap(FBackground.Picture)) then - begin - FTextureWasSelected := True; - dgTexture.Col := I; - dgTexture.Row := J; - if (dgTexture.Row > 2) then dgTexture.TopRow := dgTexture.Row - 2; - FPicture.Assign(TBitmap(FBackground.Picture)); - FPreviewWhat := faTexture; - dgTextureClick(dgTexture); - end; - finally - bmp.Free; - end; - end; - end; - - bmPicture: - begin - FPicture.Assign(TBitmap(FBackground.Picture)); - GetOtherPicture(TGraphicClass(FBackground.Picture.ClassType)).Assign(FBackground.Picture); - FPictureExists := True; - FPreviewWhat := faPicture; - PageControl1.ActivePage := tshPicture; - PaintPicture; - end; - end; - end; - finally - FControlsUpdating := False; - end; - pbxPreview.Invalidate; -end; - -procedure TdxFEFDialog.UpdateControlsState; -var - b: Boolean; -begin - b := FModified and (FPicture <> nil) and not FPicture.Empty; - - btnApply.Visible := Assigned(OnApply); - btnApply.Enabled := b and not FApplied; - // btnOK.Enabled := b; - btnInvert.Enabled := BackColor <> ForeColor; - pnlNoPicture.Visible := FOtherPicture = nil; - btnPreview.Enabled := (FOtherPicture <> nil) and - ((FOtherPicture.Width > sbxPicture.ClientWidth) or - (FOtherPicture.Height > sbxPicture.ClientHeight)); - cbxPaintMode.Enabled := FOtherPicture <> nil; - lblPaintMode.Enabled := FOtherPicture <> nil; -end; - -procedure TdxFEFDialog.CheckModified; -begin - if not FModified then FModified := True; - FApplied := False; - UpdateControlsState; -end; - -procedure TdxFEFDialog.StartSetting; -begin - FModified := False; - FControlsUpdating := True; - try - with PageControl1 do - ActivePage := Pages[FActivePage]; - btnHelp.Visible := HelpContext <> 0; - finally - UpdateControlsState; - FControlsUpdating := False; - end; -end; - -procedure TdxFEFDialog.LoadResources; -var - Index: Integer; -begin - FbmpPattern := TBitmap.Create; - FbmpPattern.Width := PatternCount.X * PatternSize.X; - FbmpPattern.Height := PatternCount.Y * PatternSize.Y; - Bitmap_LoadFromResourceName(FbmpPattern, IDB_DXPSBKPATTERNS); - - FbmpTexture := TBitmap.Create; - FbmpTexture.Width := TextureCount.X * TextureSize.X; - FbmpTexture.Height := TextureCount.Y * TextureSize.Y; - Bitmap_LoadFromResourceName(FbmpTexture, IDB_DXPSBKTEXTURES); - - miLoad.Caption := cxGetResourceString(@sdxMenuLoad); - miPreview.Caption := cxGetResourceString(@sdxMenuPreview); - miCut.Caption := cxGetResourceString(@sdxMenuEditCut); - miCopy.Caption := cxGetResourceString(@sdxMenuEditCopy); - miPaste.Caption := cxGetResourceString(@sdxMenuEditPaste); - miDelete.Caption := cxGetResourceString(@sdxMenuEditDelete); - - tshTexture.Caption := cxGetResourceString(@sdxTexture); - tshPattern.Caption := cxGetResourceString(@sdxPattern); - tshPicture.Caption := cxGetResourceString(@sdxPicture); - - btnOtherTexture.Caption := cxGetResourceString(@sdxBtnOtherTexture); - lblForeground.Caption := cxGetResourceString(@sdxForeground); - lblBackground.Caption := cxGetResourceString(@sdxBackground); - btnInvert.Caption := cxGetResourceString(@sdxBtnInvertColors); - pnlNoPicture.Caption := cxGetResourceString(@sdxThereIsNoPictureToDisplay); - btnPreview.Caption := cxGetResourceString(@sdxBtnPreview); - btnSelectPicture.Caption := cxGetResourceString(@sdxBtnSelectPicture); - lblPaintMode.Caption := cxGetResourceString(@sdxPaintMode); - lblSample.Caption := cxGetResourceString(@sdxSample); - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnApply.Caption := cxGetResourceString(@sdxBtnApply); - Caption := cxGetResourceString(@sdxFEFCaption); - - Index := cbxPaintMode.ItemIndex; - with cbxPaintMode do - begin - Items.BeginUpdate; - try - Items.Clear; - Items.Add(cxGetResourceString(@sdxPaintModeCenter)); - Items.Add(cxGetResourceString(@sdxPaintModeStretch)); - Items.Add(cxGetResourceString(@sdxPaintModeTile)); - Items.Add(cxGetResourceString(@sdxPaintModeProportional)); - finally - Items.EndUpdate; - end; - end; - cbxPaintMode.ItemIndex := Index; - - with FPatternNames do - begin - BeginUpdate; - try - Clear; - Add(cxGetResourceString(@sdxPatternGray5)); - Add(cxGetResourceString(@sdxPatternGray10)); - Add(cxGetResourceString(@sdxPatternGray20)); - Add(cxGetResourceString(@sdxPatternGray25)); - Add(cxGetResourceString(@sdxPatternGray30)); - Add(cxGetResourceString(@sdxPatternGray40)); - Add(cxGetResourceString(@sdxPatternGray50)); - Add(cxGetResourceString(@sdxPatternGray60)); - Add(cxGetResourceString(@sdxPatternGray70)); - Add(cxGetResourceString(@sdxPatternGray75)); - Add(cxGetResourceString(@sdxPatternGray80)); - Add(cxGetResourceString(@sdxPatternGray90)); - Add(cxGetResourceString(@sdxPatternLightDownwardDiagonal)); - Add(cxGetResourceString(@sdxPatternLightUpwardDiagonal)); - Add(cxGetResourceString(@sdxPatternDarkDownwardDiagonal)); - Add(cxGetResourceString(@sdxPatternDarkUpwardDiagonal)); - Add(cxGetResourceString(@sdxPatternWideDownwardDiagonal)); - Add(cxGetResourceString(@sdxPatternWideUpwardDiagonal)); - Add(cxGetResourceString(@sdxPatternLightVertical)); - Add(cxGetResourceString(@sdxPatternLightHorizontal)); - Add(cxGetResourceString(@sdxPatternNarrowVertical)); - Add(cxGetResourceString(@sdxPatternNarrowHorizontal)); - Add(cxGetResourceString(@sdxPatternDarkVertical)); - Add(cxGetResourceString(@sdxPatternDarkHorizontal)); - Add(cxGetResourceString(@sdxPatternDashedDownward)); - Add(cxGetResourceString(@sdxPatternDashedUpward)); - Add(cxGetResourceString(@sdxPatternDashedHorizontal)); - Add(cxGetResourceString(@sdxPatternDashedVertical)); - Add(cxGetResourceString(@sdxPatternSmallConfetti)); - Add(cxGetResourceString(@sdxPatternLargeConfetti)); - Add(cxGetResourceString(@sdxPatternZigZag)); - Add(cxGetResourceString(@sdxPatternWave)); - Add(cxGetResourceString(@sdxPatternDiagonalBrick)); - Add(cxGetResourceString(@sdxPatternHorizantalBrick)); - Add(cxGetResourceString(@sdxPatternWeave)); - Add(cxGetResourceString(@sdxPatternPlaid)); - Add(cxGetResourceString(@sdxPatternDivot)); - Add(cxGetResourceString(@sdxPatternDottedGrid)); - Add(cxGetResourceString(@sdxPatternDottedDiamond)); - Add(cxGetResourceString(@sdxPatternShingle)); - Add(cxGetResourceString(@sdxPatternTrellis)); - Add(cxGetResourceString(@sdxPatternSphere)); - Add(cxGetResourceString(@sdxPatternSmallGrid)); - Add(cxGetResourceString(@sdxPatternLargeGrid)); - Add(cxGetResourceString(@sdxPatternSmallCheckedBoard)); - Add(cxGetResourceString(@sdxPatternLargeCheckedBoard)); - Add(cxGetResourceString(@sdxPatternOutlinedDiamond)); - Add(cxGetResourceString(@sdxPatternSolidDiamond)); - finally - EndUpdate; - end; - end; - - with FTextureNames do - begin - BeginUpdate; - try - Clear; - Add(cxGetResourceString(@sdxTextureNewSprint)); - Add(cxGetResourceString(@sdxTextureGreenMarble)); - Add(cxGetResourceString(@sdxTextureBlueTissuePaper)); - Add(cxGetResourceString(@sdxTexturePapyrus)); - Add(cxGetResourceString(@sdxTextureWaterDroplets)); - Add(cxGetResourceString(@sdxTextureCork)); - Add(cxGetResourceString(@sdxTextureRecycledPaper)); - Add(cxGetResourceString(@sdxTextureWhiteMarble)); - Add(cxGetResourceString(@sdxTexturePinkMarble)); - Add(cxGetResourceString(@sdxTextureCanvas)); - Add(cxGetResourceString(@sdxTexturePaperBag)); - Add(cxGetResourceString(@sdxTextureWalnut)); - Add(cxGetResourceString(@sdxTextureParchment)); - Add(cxGetResourceString(@sdxTextureBrownMarble)); - Add(cxGetResourceString(@sdxTexturePurpleMesh)); - Add(cxGetResourceString(@sdxTextureDenim)); - Add(cxGetResourceString(@sdxTextureFishFossil)); - Add(cxGetResourceString(@sdxTextureOak)); - Add(cxGetResourceString(@sdxTextureStationary)); - Add(cxGetResourceString(@sdxTextureGranite)); - Add(cxGetResourceString(@sdxTextureBouquet)); - Add(cxGetResourceString(@sdxTextureWonenMat)); - Add(cxGetResourceString(@sdxTextureSand)); - Add(cxGetResourceString(@sdxTextureMediumWood)); - finally - EndUpdate; - end; - end; -end; - -procedure TdxFEFDialog.FreeAndNilResources; -begin - FreeAndNil(FbmpPattern); - FreeAndNil(FbmpCurrentPattern); - FreeAndNil(FbmpTexture); -end; - -procedure TdxFEFDialog.dgTextureDrawCell(Sender: TObject; - Col, Row: Integer; Rect: TRect; State: TGridDrawState); -var - DrawGrid: TDrawGrid; - R: TRect; - DC: HDC; - BPP: Integer; - DoHalftone: Boolean; - Pt: TPoint; - ABitmap: Windows.TBitmap; - BltMode: Integer; -begin - DrawGrid := TDrawGrid(Sender); - DC := DrawGrid.Canvas.Handle; - R := Rect; - if not ((gdSelected in State) and FTextureWasSelected) then - if (FOtherTexture = nil) or ((Row < DrawGrid.RowCount - 1) or (Col = 0)) then - begin - DrawEdge(DC, R, EDGE_SUNKEN, BF_RECT); - InflateRect(R, -2, -2); - end - else - else - InflateRect(R, -2, -2); - - BltMode := GetStretchBltMode(DC); - if (FOtherTexture = nil) or (Row < DrawGrid.RowCount - 1) then - begin - BPP := GetDeviceCaps(DC, BITSPIXEL) * GetDeviceCaps(DC, PLANES); - cxGetBitmapData(FbmpTexture.Handle, ABitmap); - DoHalftone := (BPP <= 8) and (BPP < (ABitmap.bmBitsPixel * ABitmap.bmPlanes)); - if DoHalftone then - begin - GetBrushOrgEx(DC, Pt); - SetStretchBltMode(DC, HALFTONE); - SetBrushOrgEx(DC, Pt.x, Pt.y, @Pt); - end - else - if not FbmpTexture.Monochrome then - SetStretchBltMode(DC, STRETCH_DELETESCANS); - end; - - if FOtherTexture = nil then - Windows.StretchBlt(DC, R.Left, R.Top, R.Right - R.Left, - R.Bottom - R.Top, FbmpTexture.Canvas.Handle, Col * TextureSize.X, - Row * TextureSize.Y, TextureSize.X, TextureSize.Y, SRCCOPY) - else - if Row < DrawGrid.RowCount - 1 then - Windows.StretchBlt(DC, R.Left, R.Top, R.Right - R.Left, - R.Bottom - R.Top, FbmpTexture.Canvas.Handle, Col * TextureSize.X, - Row * TextureSize.Y, TextureSize.X, TextureSize.Y, SRCCOPY) - else - if Col = 0 then - DrawGrid.Canvas.StretchDraw(R, FOtherTexture) - else - Windows.FillRect(DC, Rect, hBrush(COLOR_BTNFACE + 1)); - - SetStretchBltMode(DC, BltMode); - - if gdSelected in State then - if (FTextureWasSelected and (FOtherTexture = nil)) or - ((FOtherTexture <> nil) and ((Row < DrawGrid.RowCount - 1) or (DrawGrid.Col = 0))) then - DrawSelectedFrame(DrawGrid, Rect); -end; - -procedure TdxFEFDialog.dgPatternDrawCell(Sender: TObject; Col, - Row: Integer; Rect: TRect; State: TGridDrawState); -var - APrevBrush: TBrush; - ABrushBitmap: TBitmap; - Pt: TPoint; - DC: hDC; -begin - DC := TDrawGrid(Sender).Canvas.Handle; - if not ((gdSelected in State) and FPatternWasSelected) then - DrawEdge(DC, Rect, EDGE_SUNKEN, BF_RECT); - InflateRect(Rect, -2, -2); - - APrevBrush := TBrush.Create; - try - APrevBrush.Assign(TDrawGrid(Sender).Canvas.Brush); - ABrushBitmap := CopyPattern(Col, Row); - try - SetBrushOrgEx(DC, Rect.Left, Rect.Top, @Pt); - with TDrawGrid(Sender).Canvas do - begin - Brush.Bitmap := ABrushBitmap; - FillRect(Rect); - Brush.Bitmap := nil; - Brush := APrevBrush; - end; - SetBrushOrgEx(DC, Pt.X, Pt.Y, nil); - finally - ABrushBitmap.Free; - end; - finally - APrevBrush.Free; - end; - - if (gdSelected in State) and FPatternWasSelected then - begin - InflateRect(Rect, 2, 2); - DrawSelectedFrame(TDrawGrid(Sender), Rect); - end; -end; - -procedure TdxFEFDialog.DrawSelectedFrame(ADrawGrid: TDrawGrid; Rect: TRect); -var - DC: HDC; - PrevColor: TColor; - PrevMode: Integer; - Points: array of TPoint; -begin - with ADrawGrid do - begin - DC := Canvas.Handle; - if (ActiveControl = ADrawGrid) and Focused then - begin - //InflateRect(Rect, 2, 2); - PrevMode := SetBkMode(DC, TRANSPARENT); - PrevColor := Canvas.Pen.Color; - Canvas.Pen.Color := clWindowText; - Canvas.Pen.Style := psDot; - with Rect do - begin - SetLength(Points, 5); - Points[0] := TopLeft; - Points[1] := MakePoint(Right - 1, Top); - Points[2] := MakePoint(Right - 1, Bottom - 1); - Points[3] := MakePoint(Left, Bottom - 1); - Points[4] := TopLeft; - Canvas.Polyline(Points); - end; - Canvas.Pen.Style := psSolid; - Canvas.Pen.Color := PrevColor; - SetBkMode(DC, PrevMode); - InflateRect(Rect, -1, -1); - end; - DrawEdge(DC, Rect, BDR_SUNKENOUTER, BF_RECT or BF_MONO); - InflateRect(Rect, -1, -1); - FrameRect(DC, Rect, GetSysColorBrush(COLOR_BTNHIGHLIGHT)); - end; -end; - -procedure TdxFEFDialog.LoadFromRegistry(const APath: string); -begin - inherited LoadFromRegistry(APath); - with TRegistry.Create do - try - if OpenKey(APath, False) then - try - if ValueExists(sdxInitialDir) then - FInitialDir := ReadString(sdxInitialDir); - if ValueExists(sdxActivePage) then - FActivePage := ReadInteger(sdxActivePage); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Free; - end; -end; - -procedure TdxFEFDialog.SaveToRegistry(const APath: string); -begin - inherited SaveToRegistry(APath); - with TRegistry.Create do - try - if OpenKey(APath, True) then - try - WriteString(sdxInitialDir, FInitialDir); - WriteInteger(sdxActivePage, PageControl1.ActivePage.PageIndex); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Free; - end; -end; - -procedure TdxFEFDialog.SelectPictureClick(Sender: TObject); -var - Graphic: TGraphic; -begin - Graphic := nil; - try - LoadImage(Graphic, 1); - if Graphic <> nil then AssignPicture(Graphic); - finally - if Graphic <> nil then Graphic.Free; - end; -end; - -procedure TdxFEFDialog.AssignPicture(AImage: TGraphic); -begin - if AImage is TMetafile then - begin - FPicture.Free; - FPicture := TBitmap.Create; - FPicture.Width := AImage.Width; - FPicture.Height := AImage.Height; - TBitmap(FPicture).Palette := AImage.Palette; - TBitmap(FPicture).Canvas.Draw(0, 0, AImage); - end - else - SetPicture(AImage); - - GetOtherPicture(TGraphicClass(FPicture.ClassType)).Assign(FPicture); - PaintPicture; - CheckModified; - FPreviewWhat := faPicture; - pbxPreview.Invalidate; - FPictureExists := True; -end; - -procedure TdxFEFDialog.PaintPicture; -begin - if FPicture <> nil then - begin - pnlPicture.SetBounds(0, 0, FPicture.Width, FPicture.Height); - pbxPicture.Invalidate; - end; -end; - -procedure TdxFEFDialog.pbxPicturePaint(Sender: TObject); -begin - if FOtherPicture <> nil then - TPaintBox(Sender).Canvas.Draw(0, 0, FOtherPicture); -end; - -procedure TdxFEFDialog.btnOtherTextureClick(Sender: TObject); -var - APicture: TGraphic; -begin - APicture := nil; - try - LoadImage(APicture, 0); - if APicture <> nil then - begin - if APicture is TMetafile then - begin - FPicture.Free; - FPicture := TBitmap.Create; - FPicture.Width := TextureSize.X; - FPicture.Height := TextureSize.Y; - TBitmap(FPicture).Palette := APicture.Palette; - TBitmap(FPicture).Canvas.Draw(0, 0, APicture); - end - else - SetPicture(APicture); - - if FOtherTexture = nil then - dgTexture.RowCount := dgTexture.RowCount + 1; - OtherTexture.Assign(FPicture); - dgTexture.Col := 0; - dgTexture.Row := dgTexture.RowCount - 1; - if not FTextureWasSelected then - FTextureWasSelected := True; - dgTexture.Invalidate; - CheckModified; - FPreviewWhat := faTexture; - pbxPreview.Refresh; - end; - finally - if APicture <> nil then APicture.Free; - end; -end; - -procedure TdxFEFDialog.LoadImage(var AImage: TGraphic; AWhat: Integer); -var - Registered: Boolean; - - procedure UnregisterIcon; - begin - Registered := Pos('ico', GraphicFilter(TGraphic)) > 0; - if Registered then TPicture.UnregisterGraphicClass(TIcon); - end; - - procedure RegisterIcon; - begin - if Registered then - TPicture.RegisterFileFormat('ico', SVIcons, TIcon); - end; - -var - Dialog: TOpenPictureDialog; - FileName: string; - B: TBitmap; -begin - UnregisterIcon; - try - Dialog := TOpenPictureDialog.Create(nil); - try - Dialog.InitialDir := FInitialDir; - Dialog.Filter := GraphicFilter(TGraphic); - if Dialog.Execute then - begin - if InternalLoadImage(AImage, Dialog.Filename) then - begin - FInitialDir := ExtractFileDir(Dialog.Filename); - FileName := {Dialog.FileName;//}ChangeFileExt(ExtractFileName(Dialog.Filename), ''); - - case AWhat of - 0: // textures - begin - FOtherTextureName := FileName; - pnlTextureName.Caption := FileName;//ChangeFileExt(ExtractFileName(Filename), ''); - if AImage is TMetafile then - // - else - if AImage is TBitmap then - begin - AImage.Width := TextureSize.X; - AImage.Height := TextureSize.Y; - end - else - begin - B := TBitmap.Create; - try - B.Assign(AImage); - B.Width := TextureSize.X; - B.Height := TextureSize.Y; - AImage.Assign(B); - finally - B.Free; - end; - end; - end; - - 1: // pictures - begin - FOtherPictureName := FileName; - pnlPictureName.Caption := FileName;//ChangeFileExt(ExtractFileName(FileName), ''); - end; - end; - CheckModified; - end; - end; - finally - Dialog.Free; - end; - finally - RegisterIcon; - end; -end; - -function TdxFEFDialog.InternalLoadImage(var AImage: TGraphic; const AFileName: string): Boolean; -var - Picture: TPicture; -begin - AImage := nil; - Picture := TPicture.Create; - try - try - Picture.LoadFromFile(AFileName); - AImage := dxPSUtl.CreateGraphic(TGraphicClass(Picture.Graphic.ClassType)); - AImage.Assign(Picture.Graphic); - Result := True; - except - FreeAndNil(AImage); - Result := False; - end; - finally - Picture.Free; - end; -end; - -function TdxFEFDialog.GetPicture: TGraphic; -begin - Result := FPicture; -end; - -function TdxFEFDialog.GetPaintMode: TdxPicturePaintMode; -begin - if cbxPaintMode.ItemIndex > -1 then - Result := TdxPicturePaintMode(cbxPaintMode.ItemIndex) - else - Result := ppmCenter; -end; - -procedure TdxFEFDialog.SetPicture(Value: TGraphic); -begin - if FPicture = nil then FPicture := TBitmap.Create; - FPicture.Assign(Value); -end; - -procedure TdxFEFDialog.SetPaintMode(Value: TdxPicturePaintMode); -begin - if PaintMode <> Value then - cbxPaintMode.ItemIndex := Integer(Value); -end; - -procedure TdxFEFDialog.PaintPreview; -var - APrevBrush: TBrush; - ABrushBitmap: TBitmap; - R: TRect; - AWidth, AHeight: Integer; - I, J: Integer; -begin - case FPreviewWhat of - faTexture: - if FTextureWasSelected then - begin - AWidth := Picture.Width; - AHeight := Picture.Height; - for i := 0 to pbxPreview.Width div AWidth do - for j := 0 to pbxPreview.Height div AHeight do - pbxPreview.Canvas.Draw(i * AWidth, j * AHeight, Picture); - end; - - faPattern: - if FPatternWasSelected then - begin - APrevBrush := TBrush.Create; - try - APrevBrush.Assign(pbxPreview.Canvas.Brush); - ABrushBitmap := CopyPattern(dgPattern.Col, dgPattern.Row); - try - R := pbxPreview.ClientRect; - InflateRect(R, 2, 2); - pbxPreview.Canvas.Brush.Bitmap := ABrushBitmap; - pbxPreview.Canvas.FillRect(R); - pbxPreview.Canvas.Brush.Bitmap := nil; - pbxPreview.Canvas.Brush := APrevBrush; - finally - ABrushBitmap.Free; - end; - finally - APrevBrush.Free; - end; - end; - - faPicture: - if FOtherPicture <> nil then - begin - R := pbxPreview.ClientRect; - InflateRect(R, 2, 2); - pbxPreview.Canvas.StretchDraw(R, FOtherPicture); - end; - end; -end; - -procedure TdxFEFDialog.dgTextureClick(Sender: TObject); -var - DrawGrid: TDrawGrid; -begin - DrawGrid := TDrawGrid(Sender); - if FPicture <> nil then FPicture.Free; - FPicture := nil; - - if FOtherTexture <> nil then - begin - if (DrawGrid.Row = DrawGrid.RowCount - 1) and (DrawGrid.Col > 0) then - Exit - else - if DrawGrid.Row < DrawGrid.RowCount - 1 then - FPicture := CopyTexture(DrawGrid.Col, DrawGrid.Row) - else - if DrawGrid.Col = 0 then - SetPicture(OtherTexture); - end - else - FPicture := CopyTexture(DrawGrid.Col, DrawGrid.Row); - if not FTextureWasSelected then - begin - FTextureWasSelected := True; - DrawGrid.Invalidate; - end; - FPreviewWhat := faTexture; - pbxPreview.Invalidate; - if (FOtherTexture <> nil) and (DrawGrid.Col = 0) and (DrawGrid.Row = DrawGrid.RowCount - 1) then - pnlTextureName.Caption := FOtherTextureName - else - pnlTextureName.Caption := FTextureNames[DrawGrid.Col * TextureCount.Y + DrawGrid.Row]; - CheckModified; -end; - -procedure TdxFEFDialog.dgPatternClick(Sender: TObject); -var - DrawGrid: TDrawGrid; -begin - DrawGrid := TDrawGrid(Sender); - if not FPatternWasSelected then - begin - FPatternWasSelected := True; - DrawGrid.Invalidate; - end; - FreeAndNil(FPicture); - - FPicture := CopyPattern(DrawGrid.Col, DrawGrid.Row); - FPreviewWhat := faPattern; - pbxPreview.Refresh; - pnlPatternName.Caption := FPatternNames[DrawGrid.Col * TextureCount.Y + DrawGrid.Row]; - CheckModified; -end; - -procedure TdxFEFDialog.pbxPreviewPaint(Sender: TObject); -begin - PaintPreview; -end; - -procedure TdxFEFDialog.MapPatternColors; -begin - FreeAndNil(FbmpCurrentPattern); - FbmpCurrentPattern := dxCreateMappedBmp(FbmpPattern, [clWhite, clBlack], [BackColor, ForeColor]); -end; - -procedure TdxFEFDialog.cbxColorChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - FPreviewWhat := faPattern; - MapPatternColors; - pbxPreview.Invalidate; - dgPattern.Invalidate; - if (dgPattern.Col > -1) and (dgPattern.Row > -1) then - CheckModified; -end; - -function TdxFEFDialog.CopyTexture(I, J: Integer): TBitmap; -begin - Result := TBitmap.Create; - with Result do - try - Width := TextureSize.X; - Height := TextureSize.Y; - Canvas.Draw(-I * TextureSize.X, -J * TextureSize.Y, FbmpTexture); - except - Free; - raise; - end; -end; - -function TdxFEFDialog.CopyPattern(I, J: Integer): TBitmap; -begin - Result := TBitmap.Create; - with Result do - try - Width := PatternSize.X; - Height := PatternSize.Y; - Canvas.Draw(-I * PatternSize.X, -J * PatternSize.Y, FbmpCurrentPattern); - except - Result.Free; - raise; - end; -end; - -procedure TdxFEFDialog.PageControl1Change(Sender: TObject); -begin - FApplied := False; - FPreviewWhat := TdxFillAs(TPageControl(Sender).ActivePage.PageIndex + 1); - FreeAndNil(FPicture); - - case FPreviewWhat of - faTexture: - if FTextureWasSelected then - if FOtherTexture <> nil then - begin - if dgTexture.Row < dgTexture.RowCount - 1 then - FPicture := CopyTexture(dgTexture.Col, dgTexture.Row) - else - if dgTexture.Col = 0 then - SetPicture(OtherTexture); - end - else - FPicture := CopyTexture(dgTexture.Col, dgTexture.Row); - faPattern: - if FPatternWasSelected then - FPicture := CopyPattern(dgPattern.Col, dgPattern.Row); - faPicture: - if FOtherPicture <> nil then SetPicture(FOtherPicture); - end; - pbxPreview.Invalidate; - UpdateControlsState; -end; - -procedure TdxFEFDialog.PicturePreviewClick(Sender: TObject); -begin - dxShowPicturePreview(Picture); -end; - -procedure TdxFEFDialog.cbxPaintModeChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - CheckModified; -end; - -function TdxFEFDialog.GetSelectWhat: TdxFillAs; -begin - Result := faNone; - if FTextureWasSelected and (PageControl1.ActivePage.PageIndex = 0) then - Result := faTexture - else - if FPatternWasSelected and (PageControl1.ActivePage.PageIndex = 1) then - Result := faPattern - else - if FPictureExists and (PageControl1.ActivePage.PageIndex = 2) then - Result := faPicture; -end; - -procedure TdxFEFDialog.SetSelectWhat(Value: TdxFillAs); -begin - case Value of - faNone: ; - faTexture: - begin - FTextureWasSelected := True; - PageControl1.ActivePage := PageControl1.Pages[0]; - end; - faPattern: - begin - FPatternWasSelected := True; - PageControl1.ActivePage := PageControl1.Pages[1]; - end; - faPicture: - begin - FPictureExists := True; - PageControl1.ActivePage := PageControl1.Pages[2]; - end; - end; -end; - -function TdxFEFDialog.GetOtherTexture: TBitmap; -begin - if FOtherTexture = nil then FOtherTexture := TBitmap.Create; - Result := FOtherTexture; -end; - -procedure TdxFEFDialog.SetOtherTexture(Value: TBitmap); -begin - if Value <> nil then - GetOtherTexture.Assign(Value) - else - if FOtherTexture <> nil then - begin - FOtherTexture.Free; - FOtherTexture := nil; - end; -end; - -function TdxFEFDialog.GetOtherPicture(AGraphicClass: TGraphicClass): TGraphic; -begin - FreeAndNil(FOtherPicture); - - if AGraphicClass <> nil then - FOtherPicture := dxPSUtl.CreateGraphic(AGraphicClass); - Result := FOtherPicture; -end; - -function TdxFEFDialog.GetForeColor: TColor; -begin - Result := TColor(cbxForeColor.Items.Objects[cbxForeColor.ItemIndex]); -end; - -procedure TdxFEFDialog.SetForeColor(Value: TColor); -begin - TdxPSColorCombo(cbxForeColor).ColorValue := Value; - cbxColorChange(cbxForeColor); {???} -end; - -function TdxFEFDialog.GetBackColor: TColor; -begin - Result := TColor(cbxBackColor.Items.Objects[cbxBackColor.ItemIndex]); -end; - -procedure TdxFEFDialog.SetBackColor(Value: TColor); -begin - TdxPSColorCombo(cbxBackColor).ColorValue := Value; - cbxColorChange(cbxBackColor); {???} -end; - -procedure TdxFEFDialog.lblPaintModeClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxFEFDialog.lblForegroundClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TdxPSColorCombo(ActiveControl).DroppedDown := True; -end; - -procedure TdxFEFDialog.DoApply; -var - B: TBitmap; -begin - if Assigned(FOnApply) then - begin - Background.BeginUpdate; - try - Background.BkColor := BackColor; - Background.Brush.Color := ForeColor; - Background.Picture := Picture; - case SelectWhat of - faTexture: - begin - Background.Picture := Picture; - Background.Mode := bmBrushBitmap; - end; - - faPattern: - begin - B := TBitmap(Background.Picture); - B.Width := PatternSize.X; - B.Height := PatternSize.Y; - B.Canvas.Draw(-dgPattern.Col * PatternSize.X, -dgPattern.Row * PatternSize.Y, FbmpCurrentPattern); - Background.Mode := bmBrushBitmap; - end; - - faPicture: - begin - Background.Mode := bmPicture; - Background.PictureMode := PaintMode; - end; - end; - if FOriginalBackground <> nil then FOriginalBackground.Assign(Background); - FOnApply(Background); - finally - Background.EndUpdate; - end; - end; -end; - -procedure TdxFEFDialog.btnApplyClick(Sender: TObject); -begin - DoApply; - FApplied := True; - if FFirstApplied then - begin - btnCancel.Caption := cxGetResourceString(@sdxBtnClose); - FFirstApplied := False; - end; - UpdateControlsState; -end; - -procedure TdxFEFDialog.dgTextureDblClick(Sender: TObject); -begin - if FPicture <> nil then btnOK.Click; -end; - -procedure TdxFEFDialog.dgPatternDblClick(Sender: TObject); -begin - if FPicture <> nil then btnOK.Click; -end; - -procedure TdxFEFDialog.dgTextureMouseMove(Sender: TObject; - Shift: TShiftState; X, Y: Integer); -const - ATextureLastCol: Longint = -2; - ATextureLastRow: Longint = -2; -var - Col, Row: Longint; - S: string; -begin - TDrawGrid(Sender).MouseToCell(X, Y, Col, Row); - - if (Col <> ATextureLastCol) or (Row <> ATextureLastRow) then - begin - Application.CancelHint; - S := ''; - if (Col > -1) and (Row > -1) then - if FOtherTexture = nil then - S := FTextureNames[Col * TextureCount.Y + Row] - else - if (FOtherTexture <> nil) and (Col = 0) and (Row = TDrawGrid(Sender).RowCount - 1) then - S := FOtherTextureName - else - if Row < TDrawGrid(Sender).RowCount - 1 then - S := FTextureNames[Col * TextureCount.Y + Row]; - - TDrawGrid(Sender).Hint := S; - end; - - ATextureLastCol := Col; - ATextureLastRow := Row; -end; - -procedure TdxFEFDialog.dgPatternMouseMove(Sender: TObject; - Shift: TShiftState; X, Y: Integer); -const - APatternLastCol: Longint = -2; - APatternLastRow: Longint = -2; -var - Col, Row: Longint; -begin - TDrawGrid(Sender).MouseToCell(X, Y, Col, Row); - if (Col <> APatternLastCol) or (Row <> APatternLastRow) then - begin - Application.CancelHint; - if (Col > -1) and (Row > -1) then - TDrawGrid(Sender).Hint := FPatternNames[Col * PatternCount.Y + Row]; - end; - - APatternLastCol := Col; - APatternLastRow := Row; -end; - -procedure TdxFEFDialog.btnInvertClick(Sender: TObject); -begin - DoInvertColors; - with dgPattern do - if (Col > -1) and (Row > -1) then CheckModified; -end; - -procedure TdxFEFDialog.DoInvertColors; -var - ASaveColor: TColor; -begin - dgPattern.Perform(WM_SETREDRAW, WPARAM(False), 0); - btnInvert.Perform(WM_SETREDRAW, WPARAM(False), 0); - ASaveColor := ForeColor; - ForeColor := BackColor; - BackColor := ASaveColor; - dgPattern.Perform(WM_SETREDRAW, WPARAM(True), 0); - dgPattern.Invalidate; - btnInvert.Perform(WM_SETREDRAW, WPARAM(True), 0); - btnInvert.Invalidate; -end; - -procedure TdxFEFDialog.pmPicturePopup(Sender: TObject); -begin - miPreview.Enabled := btnPreview.Enabled; - miCut.Enabled := FOtherPicture <> nil; - miCopy.Enabled := FOtherPicture <> nil; - miPaste.Enabled := ClipBoard.HasFormat(CF_PICTURE); - miDelete.Enabled := FOtherPicture <> nil; -end; - -procedure TdxFEFDialog.miCopyClick(Sender: TObject); -begin - ClipBoard.Assign(FOtherPicture); -end; - -procedure TdxFEFDialog.miPasteClick(Sender: TObject); -var - P: TPicture; -begin - P := TPicture.Create; - try - P.Assign(Clipboard); - if (P.Graphic <> nil) and not P.Graphic.Empty then - AssignPicture(P.Graphic); - finally - P.Free; - end; -end; - -procedure TdxFEFDialog.miDeleteClick(Sender: TObject); -begin - GetOtherPicture(nil); - pbxPicture.Invalidate; - pbxPreview.Invalidate; -end; - -procedure TdxFEFDialog.miCutClick(Sender: TObject); -begin - miCopy.Click; - miDelete.Click; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPPAttr.pas b/internal/x.46/ExpressPrinting System/Sources/dxPPAttr.pas deleted file mode 100644 index c24d50b9..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPPAttr.pas +++ /dev/null @@ -1,585 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPpAttr; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows; - -type - TFloatSize = record - cx: Extended; - cy: Extended; - end; - - TdxPaper = class(TPersistent) - private - FName: string; - FShortName: string; - FSize: TPoint; - FDMPaper: Integer; - function GetHeight: Integer; - function GetWidth: Integer; - procedure SetHeight(Value: Integer); - procedure SetWidth(Value: Integer); - public - constructor Create(const AName, AShortName: string; - AWidth, AHeight: Integer; ADMPaper: Integer); - procedure Assign(Source: TPersistent); override; - function Clone: TdxPaper; - - property DMPaper: Integer read FDMPaper; - property Height: Integer read GetHeight write SetHeight; - property Name: string read FName; - property ShortName: string read FShortName; - property Size: TPoint read FSize write FSize; - property Width: Integer read GetWidth write SetWidth; - end; - - TdxPapers = class(TPersistent) - private - FPapers: TList; - function GetCount: Integer; - function GetPaper(Index: Integer): TdxPaper; - protected - procedure AddPapers; virtual; - public - constructor Create; virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure Clear; - procedure Delete(AIndex: Integer); - function FindByDMPaper(ADMPaper: Integer): Integer; - function FindByName(const AName: string): Integer; - function FindByShortName(const AShortName: string): Integer; - function FindBySize(AWidth, AHeight: Integer): Integer; - procedure Refresh; - - property Count: Integer read GetCount; - property Papers[Index: Integer]: TdxPaper read GetPaper; default; - end; - - TdxBin = class(TPersistent) - private - FName: string; - FValue: Integer; - public - constructor Create(AValue: Integer; const AName: string); virtual; - procedure Assign(Source: TPersistent); override; - - property Name: string read FName; - property Value: Integer read FValue; - end; - - TdxBins = class(TPersistent) - private - FBins: TList; - function GetBin(Index: Integer): TdxBin; - function GetCount: Integer; - protected - procedure AddBins; virtual; - public - constructor Create; virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure Clear; - procedure Delete(Index: Integer); - function FindByName(const AName: string): Integer; - function FindByValue(AValue: Integer): Integer; - function IndexOf(ABin: TdxBin): Integer; - procedure Refresh; - - property Bins[Index: Integer]: TdxBin read GetBin; default; - property Count: Integer read GetCount; - end; - -function Bins: TdxBins; -function Papers: TdxPapers; -function SetBins(Value: TdxBins): TdxBins; -function SetPapers(Value: TdxPapers): TdxPapers; - -implementation - -uses - SysUtils, dxPSUtl; - -var - FPapers: TdxPapers = nil; - FBins: TdxBins = nil; - -function Bins: TdxBins; -begin - if FBins = nil then FBins := TdxBins.Create; - Result := FBins; -end; - -function Papers: TdxPapers; -begin - if FPapers = nil then FPapers := TdxPapers.Create; - Result := FPapers; -end; - -function SetBins(Value: TdxBins): TdxBins; -begin - Result := FBins; - FBins := Value; -end; - -function SetPapers(Value: TdxPapers): TdxPapers; -begin - Result := FPapers; - FPapers := Value; -end; - -function InchToLoMetric(Value: Extended): Integer; -begin - Result := Round(Value * 254); -end; - -{ TdxPaper } - -constructor TdxPaper.Create(const AName, AShortName: string; - AWidth, AHeight: Integer; ADMPaper: Integer); -begin - inherited Create; - FName := AName; - FShortName := AShortName; - FSize.X := AWidth; - FSize.Y := AHeight; - FDMPaper := ADMPaper; -end; - -procedure TdxPaper.Assign(Source: TPersistent); -begin - if Source is TdxPaper then - with TdxPaper(Source) do - begin - Self.FName := Name; - Self.FShortName := ShortName; - Self.FSize := Size; - Self.FDMPaper := DMPaper; - end - else - inherited; -end; - -function TdxPaper.Clone: TdxPaper; -begin - Result := TdxPaper.Create(Name, ShortName, Width, Height, DMPaper); -end; - -function TdxPaper.GetHeight: Integer; -begin - Result := FSize.Y; -end; - -function TdxPaper.GetWidth: Integer; -begin - Result := FSize.X; -end; - -procedure TdxPaper.SetHeight(Value: Integer); -begin - FSize.Y := Value; -end; - -procedure TdxPaper.SetWidth(Value: Integer); -begin - FSize.X := Value; -end; - -{ TdxPapers } - -constructor TdxPapers.Create; -begin - inherited; - FPapers := TList.Create; - Refresh; -end; - -destructor TdxPapers.Destroy; -begin - Clear; - FreeAndNil(FPapers); - inherited; -end; - -procedure TdxPapers.Assign(Source: TPersistent); -var - I: Integer; -begin - if (Source = nil) or (Source is TdxPapers) then - with TdxPapers(Source) do - begin - Self.Clear; - if Source <> nil then - for I := 0 to Count - 1 do - Self.FPapers.Add(Papers[I].Clone); - end - else - inherited; -end; - -procedure TdxPapers.Clear; -begin - while Count > 0 do Delete(Count - 1); -end; - -procedure TdxPapers.Delete(AIndex: Integer); -begin - TObject(FPapers[AIndex]).Free; - FPapers.Delete(AIndex); -end; - -function TdxPapers.FindByDMPaper(ADMPaper: Integer): Integer; -begin - for Result := 0 to Count - 1 do - if Papers[Result].DMPaper = ADMPaper then Exit; - Result := -1; -end; - -function TdxPapers.FindByName(const AName: string): Integer; -begin - for Result := 0 to Count - 1 do - if dxSameText(Papers[Result].Name, AName) then - Exit; - Result := -1; -end; - -function TdxPapers.FindByShortName(const AShortName: string): Integer; -begin - for Result := 0 to Count - 1 do - if dxSameText(Papers[Result].ShortName, AShortName) then - Exit; - Result := -1; -end; - -function TdxPapers.FindBySize(AWidth, AHeight: Integer): Integer; -begin - for Result := 0 to Count - 1 do - if (Abs(Papers[Result].Width - AWidth) < 2) and (Abs(Papers[Result].Height - AHeight) < 2) then - Exit; - Result := -1; -end; - -procedure TdxPapers.Refresh; -begin - Clear; - AddPapers; -end; - -procedure TdxPapers.AddPapers; - - procedure Add(const AName, AShortName: string; AWidth, AHeight: Integer; DMPaper: Integer); - begin - FPapers.Add(TdxPaper.Create(AName, AShortName, AWidth, AHeight, DMPaper)); - end; - -begin - Add('Letter 8 1/2 x 11 in', 'Letter', InchToLoMetric(8.5), InchToLoMetric(11), DMPAPER_LETTER); - Add('Letter Small 8 1/2 x 11 in ', 'Letter Small', InchToLoMetric(8.5), InchToLoMetric(11), DMPAPER_LETTERSMALL); - Add('Tabloid 11 x 17 in', 'Tabloid', InchToLoMetric(11), InchToLoMetric(17), DMPAPER_TABLOID); - Add('Ledger 17 x 11 in', 'Ledger', InchToLoMetric(17), InchToLoMetric(11), DMPAPER_LEDGER); - Add('Legal 8 1/2 x 14 in', 'Legal', InchToLoMetric(8.5), InchToLoMetric(14), DMPAPER_LEGAL); - Add('Statement 5 1/2 x 8 1/2 in', 'Statement', InchToLoMetric(5.5), InchToLoMetric(8.5), DMPAPER_STATEMENT); - Add('Executive 7 1/4 x 10 1/2 in', 'Executive', InchToLoMetric(7.25), InchToLoMetric(10.5), DMPAPER_EXECUTIVE); - Add('A3 297 x 420 mm', 'A3', 2970, 4200, DMPAPER_A3); - Add('A4 210 x 297 mm', 'A4', 2100, 2970, DMPAPER_A4); - Add('A4 Small 210 x 297 mm', 'A4 Small', 2100, 2970, DMPAPER_A4SMALL); - Add('A5 148 x 210 mm', 'A5', 1480, 2100, DMPAPER_A5); - Add('B4 (JIS) 250 x 354', 'B4 (JIS)', 2500, 3540, DMPAPER_B4); - Add('B5 (JIS) 182 x 257 mm', 'B5 (JIS)', 1820, 2570, DMPAPER_B5); - Add('Folio 8 1/2 x 13 in', 'Folio', InchToLoMetric(8.5), InchToLoMetric(13), DMPAPER_FOLIO); - Add('Quarto 215 x 275 mm', 'Quarto', 2150, 2750, DMPAPER_QUARTO); - Add('10x14 in', '10x14 in', InchToLoMetric(10), InchToLoMetric(14), DMPAPER_10X14); - Add('11x17 in', '11x17 in', InchToLoMetric(11), InchToLoMetric(17), DMPAPER_11X17); - Add('Note 8 1/2 x 11 in', 'Note', InchToLoMetric(8.5), InchToLoMetric(11), DMPAPER_NOTE); - Add('Envelope #9 3 7/8 x 8 7/8', 'Envelope #9', InchToLoMetric(3 + 7 / 8), InchToLoMetric(8 + 7 / 8), DMPAPER_ENV_9); - Add('Envelope #10 4 1/8 x 9 1/2', 'Envelope #10', InchToLoMetric(4 + 1 / 8), InchToLoMetric(9.5), DMPAPER_ENV_10); - Add('Envelope #11 4 1/2 x 10 3/8', 'Envelope #11', InchToLoMetric(4.5), InchToLoMetric(10 + 3 / 8), DMPAPER_ENV_11); - Add('Envelope #12 4 3/4 x 11', 'Envelope #12', InchToLoMetric(4 + 3 / 4), InchToLoMetric(11), DMPAPER_ENV_12); - Add('Envelope #14 5 x 11 1/2', 'Envelope #14', InchToLoMetric(5), InchToLoMetric(11.5), DMPAPER_ENV_14); - Add('C sheet 17 x 22 in', 'C sheet', InchToLoMetric(17), InchToLoMetric(22), DMPAPER_CSHEET); - Add('D sheet 22 x 34 in', 'D sheet', InchToLoMetric(22), InchToLoMetric(34), DMPAPER_DSHEET); - Add('E sheet 34 x 44 in', 'E sheet', InchToLoMetric(34), InchToLoMetric(44), DMPAPER_ESHEET); - Add('Envelope DL 110 x 220mm', 'Envelope DL', 1100, 2200, DMPAPER_ENV_DL); - Add('Envelope C5 162 x 229 mm', 'Envelope C5', 1620, 2290, DMPAPER_ENV_C5); - Add('Envelope C3 324 x 458 mm', 'Envelope C3', 3240, 4580, DMPAPER_ENV_C3); - Add('Envelope C4 229 x 324 mm', 'Envelope C4', 2290, 3240, DMPAPER_ENV_C4); - Add('Envelope C6 114 x 162 mm', 'Envelope C6', 1140, 1620, DMPAPER_ENV_C6); - Add('Envelope C65 114 x 229 mm', 'Envelope 65', 1140, 2290, DMPAPER_ENV_C65); - Add('Envelope B4 250 x 353 mm', 'Envelope B4', 2500, 3530, DMPAPER_ENV_B4); - Add('Envelope B5 176 x 250 mm', 'Envelope B5', 1760, 2500, DMPAPER_ENV_B5); - Add('Envelope B6 176 x 125 mm', 'Envelope B6', 1760, 1250, DMPAPER_ENV_B6); - Add('Envelope 110 x 230 mm', 'Envelope 110', 1100, 2300, DMPAPER_ENV_ITALY); - Add('Envelope Monarch 3 7/8 x 7 1/2 in', 'Envelope Monarch', InchToLoMetric(3 + 7 / 8), InchToLoMetric(7.5), DMPAPER_ENV_MONARCH); - Add('6 3/4 Envelope 3 5/8 x 6 1/2 in', '6 3/4 Envelope', InchToLoMetric(3 + 5 / 8), InchToLoMetric(6.5), DMPAPER_ENV_PERSONAL); - Add('US Std Fanfold 14 7/8 x 11 in', 'US Std Fanfold', InchToLoMetric(14 + 7 / 8), InchToLoMetric(11), DMPAPER_FANFOLD_US); - Add('German Std Fanfold 8 1/2 x 12 in', 'German Std Fanfold', InchToLoMetric(8.5), InchToLoMetric(12), DMPAPER_FANFOLD_STD_GERMAN); - Add('German Legal Fanfold 8 1/2 x 13 in', 'German Legal Fanfold', InchToLoMetric(8.5), InchToLoMetric(13), DMPAPER_FANFOLD_LGL_GERMAN); - Add('B4 (ISO) 250 x 353 mm', 'B4 (ISO)', 2500, 3530, DMPAPER_ISO_B4); - Add('Japanese Postcard 100 x 148 mm', 'Japanese Postcard', 1000, 1480, DMPAPER_JAPANESE_POSTCARD); - Add('9 x 11 in', '9 x 11 in', InchToLoMetric(90), InchToLoMetric(110), DMPAPER_9X11); - Add('10 x 11 in', '10 x 11 in', InchToLoMetric(10), InchToLoMetric(11), DMPAPER_10X11); - Add('15 x 11 in', '15 x 11 in', InchToLoMetric(15), InchToLoMetric(11), DMPAPER_15X11); - Add('Envelope Invite 220 x 220 mm', 'Envelope Invite', 2200, 2200, DMPAPER_ENV_INVITE); -// DMPAPER_RESERVED_48 = 48; { RESERVED--DO NOT USE } -// DMPAPER_RESERVED_49 = 49; { RESERVED--DO NOT USE } - Add('Letter Extra 9 \275 x 12 in', 'Legal Extra', InchToLoMetric(9 + 1 / 275), InchToLoMetric(12), DMPAPER_LETTER_EXTRA); - Add('Legal Extra 9 \275 x 15 in', 'Legal Extra', InchToLoMetric(9 + 1 / 275), InchToLoMetric(15), DMPAPER_LEGAL_EXTRA); - Add('Tabloid Extra 11.69 x 18 in', 'Tabloid Extra', InchToLoMetric(11.69), InchToLoMetric(18), DMPAPER_TABLOID_EXTRA); - Add('A4 Extra 9.27 x 12.69 in', 'A4 Extra', InchToLoMetric(9.27), InchToLoMetric(12.69), DMPAPER_A4_EXTRA); - Add('Letter Transverse 8 \275 x 11 in', 'Letter Transverse', InchToLoMetric(8 + 1 / 275), InchToLoMetric(11), DMPAPER_LETTER_TRANSVERSE); - Add('A4 Transverse 210 x 297 mm', 'A4 Transverse', 2100, 2970, DMPAPER_LETTER_EXTRA_TRANSVERSE); - Add('Letter Extra Transverse 9\275 x 12 in', 'Letter Extra Transverse', InchToLoMetric(9 + 1 / 275), InchToLoMetric(12), DMPAPER_LETTER_EXTRA_TRANSVERSE); - Add('SuperASuperAA4 227 x 356 mm', 'SuperASuperAA4', 2270, 3560, DMPAPER_A_PLUS); - Add('SuperBSuperBA3 305 x 487 mm', 'SuperBSuperBA3', 3050, 4870, DMPAPER_B_PLUS); - Add('Letter Plus 8.5 x 12.69 in', 'Letter Plus', InchToLoMetric(8.5), InchToLoMetric(12.69), DMPAPER_LETTER_PLUS); - Add('A4 Plus 210 x 330 mm', 'A4 Plus', 2100, 3300, DMPAPER_A4_PLUS); - Add('A5 Transverse 148 x 210 mm', 'A5 Transverse', 1480, 2100, DMPAPER_A5_TRANSVERSE); - Add('B5 (JIS) Transverse 182 x 257 mm', 'B5 (JIS) Transverse', 1820, 2570, DMPAPER_B5_TRANSVERSE); - Add('A3 Extra 322 x 445 mm', 'A3 Extra', 3220, 4450, DMPAPER_A3_EXTRA); - Add('A5 Extra 174 x 235 mm', 'A5 Extra', 1740, 2350, DMPAPER_A5_EXTRA); - Add('B5 (ISO) Extra 201 x 276 mm', 'B5 (ISO) Extra', 2010, 2760, DMPAPER_B5_EXTRA); - Add('A2 420 x 594 mm', 'A2', 4200, 5940, DMPAPER_A2); - Add('A3 Transverse 297 x 420 mm', 'A3 Transverse', 2970, 4200, DMPAPER_A3_TRANSVERSE); - Add('A3 Extra Transverse 322 x 445 mm', 'A3 Extra Transverse', 3220, 4450, DMPAPER_A3_EXTRA_TRANSVERSE); - - if Win32MajorVersion >= 5 then - begin - Add('Japanese Double Postcard 200 x 148 mm', 'Japanese Double Postcard', 2000, 148, DMPAPER_DBL_JAPANESE_POSTCARD); - Add('A6 105 x 148 mm', 'A6', 1050, 1480, DMPAPER_A6); - // Add('Japanese Envelope Kaku #2', 'Japanese Envelope Kaku #2', 0, 0, DMPAPER_JENV_KAKU2); - // Add('Japanese Envelope Kaku #3', 'Japanese Envelope Kaku #3', 0, 0, DMPAPER_JENV_KAKU3); - // Add('Japanese Envelope Chou #3', 'Japanese Envelope Kaku #3', 0, 0, DMPAPER_JENV_CHOU3); - // Add('Japanese Envelope Chou #4', 'Japanese Envelope Kaku #4', 0, 0, DMPAPER_JENV_CHOU4); - Add('Letter Rotated 11 x 8 1/2 11 in', 'Letter Rotated', InchToLoMetric(11), InchToLoMetric(8.5), DMPAPER_LETTER_ROTATED); - Add('A3 Rotated 420 x 297 mm', 'A3 Rotated', 4200, 2970, DMPAPER_A3_ROTATED); - Add('A4 Rotated 297 x 210 mm', 'A4 Rotated', 2970, 2100, DMPAPER_A4_ROTATED); - Add('A5 Rotated 210 x 148 mm', 'A5 Rotated', 2100, 1480, DMPAPER_A5_ROTATED); - Add('B4 (JIS) Rotated 364 x 257 mm', 'B4 (JIS) Rotated', 3640, 2570, DMPAPER_B4_JIS_ROTATED); - Add('B5 (JIS) Rotated 257 x 182 mm', 'B5 (JIS) Rotated', 2570, 1820, DMPAPER_B5_JIS_ROTATED); - Add('Japanese Postcard Rotated 148 x 100 mm', 'Japanese Postcard Rotated', 1480, 1000, DMPAPER_JAPANESE_POSTCARD_ROTATED); - Add('A6 Rotated 148 x 105 mm', 'A6 Rotated', 1480, 1050, DMPAPER_A6_ROTATED); - // Add('Japanese Envelope Kaku #2 Rotated', 'Japanese Envelope Kaku #2 Rotated', 0, 0, DMPAPER_JENV_KAKU2_ROTATED); - // Add('Japanese Envelope Kaku #3 Rotated', 'Japanese Envelope Kaku #4 Rotated', 0, 0, DMPAPER_JENV_KAKU3_ROTATED); - // Add('Japanese Envelope Chou #3 Rotated', 'Japanese Envelope Chou #3 Rotated', 0, 0, DMPAPER_JENV_CHOU3_ROTATED); - // Add('Japanese Envelope Chow #4 Rotated', 'Japanese Envelope Chou #4 Rotated', 0, 0, DMPAPER_JENV_CHOU4_ROTATED); - Add('B6 (JIS) 128 x 182 mm', 'B6 (JIS)', 1280, 1820, DMPAPER_B6_JIS); - Add('B6 (JIS) Rotated 182 x 128 mm', 'B6 (JIS) Rotated', 1820, 1280, DMPAPER_B6_JIS_ROTATED); - Add('12X11 12 x 11 in', '12X11', InchToLoMetric(12), InchToLoMetric(11), DMPAPER_12X11); - // Add('Japanese Envelope You #4', 'Japanese Envelope You #4', 0, 0, DMPAPER_JENV_YOU4); - // Add('Japanese Envelope You #4 Rotated', 'Japanese Envelope You #4 Rotated', 0, 0, DMPAPER_JENV_YOU4_ROTATED); - Add('PRC 16K 146 x 215 mm', 'PRC 16K', 1460, 2150, DMPAPER_P16K); - Add('PRC 32K 97 x 151 mm', 'PRC 32K', 970, 1510, DMPAPER_P32K); - Add('PRC 32K(Big) 97 x 151 mm', 'PRC 32K(Big)', 970, 1510, DMPAPER_P32KBIG); - Add('PRC Envelope #1 102 x 165 mm', 'PRC Envelope #1', 1020, 1650, DMPAPER_PENV_1); - Add('PRC Envelope #2 102 x 176 mm', 'PRC Envelope #2', 1020, 1760, DMPAPER_PENV_2); - Add('PRC Envelope #3 125 x 176 mm', 'PRC Envelope #3', 1250, 1760, DMPAPER_PENV_3); - Add('PRC Envelope #4 110 x 208 mm', 'PRC Envelope #4', 1100, 2080, DMPAPER_PENV_4); - Add('PRC Envelope #5 110 x 220 mm', 'PRC Envelope #5', 2190, 2200, DMPAPER_PENV_5); - Add('PRC Envelope #6 120 x 230 mm', 'PRC Envelope #6', 1200, 2300, DMPAPER_PENV_6); - Add('PRC Envelope #7 160 x 230 mm', 'PRC Envelope #7', 1600, 2300, DMPAPER_PENV_7); - Add('PRC Envelope #8 120 x 309 mm', 'PRC Envelope #8', 1200, 3090, DMPAPER_PENV_8); - Add('PRC Envelope #9 229 x 324 mm', 'PRC Envelope #9', 2290, 3240, DMPAPER_PENV_9); - Add('PRC Envelope #10 324 x 458 mm', 'PRC Envelope #10', 3240, 4580, DMPAPER_PENV_10); - Add('PRC 16K Rotated 146 x 215 mm', 'PRC 16K Rotated', 1460, 2150, DMPAPER_P16K_ROTATED); - Add('PRC 32K Rotated 97 x 151 mm', 'PRC 32K Rotated', 970, 1510, DMPAPER_P32K_ROTATED); - Add('PRC 32K(Big) Rotated 97 x 151 mm', 'PRC 32K(Big) Rotated', 970, 1510, DMPAPER_P32KBIG_ROTATED); - Add('PRC Envelope #1 Rotated 165 x 102 mm', 'PRC Envelope #1 Rotated', 1650, 1020, DMPAPER_PENV_1_ROTATED); - Add('PRC Envelope #2 Rotated 176 x 102 mm', 'PRC Envelope #2 Rotated', 1760, 1020, DMPAPER_PENV_2_ROTATED); - Add('PRC Envelope #3 Rotated 176 x 125 mm', 'PRC Envelope #3 Rotated', 1760, 1250, DMPAPER_PENV_3_ROTATED); - Add('PRC Envelope #4 Rotated 208 x 110 mm', 'PRC Envelope #4 Rotated', 2080, 1100, DMPAPER_PENV_4_ROTATED); - Add('PRC Envelope #5 Rotated 220 x 110 mm', 'PRC Envelope #5 Rotated', 2200, 2190, DMPAPER_PENV_5_ROTATED); - Add('PRC Envelope #6 Rotated 230 x 120 mm', 'PRC Envelope #6 Rotated', 2300, 1200, DMPAPER_PENV_6_ROTATED); - Add('PRC Envelope #7 Rotated 230 x 160 mm', 'PRC Envelope #7 Rotated', 2300, 1600, DMPAPER_PENV_7_ROTATED); - Add('PRC Envelope #8 Rotated 309 x 120 mm', 'PRC Envelope #8 Rotated', 3090, 1200, DMPAPER_PENV_8_ROTATED); - Add('PRC Envelope #9 Rotated 324 x 229 mm', 'PRC Envelope #9 Rotated', 3240, 2290, DMPAPER_PENV_9_ROTATED); - Add('PRC Envelope #10 Rotated 458 x 324 mm', 'PRC Envelope #10 Rotated', 4580, 3240, DMPAPER_PENV_10_ROTATED); - end; - Add('Custom', 'Custom', 0, 0, DMPAPER_USER); -end; - -function TdxPapers.GetCount: Integer; -begin - Result := FPapers.Count; -end; - -function TdxPapers.GetPaper(Index: Integer): TdxPaper; -begin - Result := TdxPaper(FPapers[Index]); -end; - -{ TdxBin } - -constructor TdxBin.Create(AValue: Integer; const AName: string); -begin - inherited Create; - FValue := AValue; - FName := AName; -end; - -procedure TdxBin.Assign(Source: TPersistent); -begin - if Source is TdxBin then - with TdxBin(Source) do - begin - Self.FName := Name; - Self.FValue := Value; - end - else - inherited; -end; - -{ TdxBins } - -constructor TdxBins.Create; -begin - inherited Create; - FBins := TList.Create; - Refresh; -end; - -destructor TdxBins.Destroy; -begin - Clear; - FreeAndNil(FBins); - inherited; -end; - -procedure TdxBins.Assign(Source: TPersistent); -var - I: Integer; -begin - if (Source = nil) or (Source is TdxBins) then - with TdxBins(Source) do - begin - Self.Clear; - if Source <> nil then - for I := 0 to Count - 1 do - with Bins[I] do - Self.FBins.Add(TdxBin.Create(Value, Name)); - end - else - inherited; -end; - -procedure TdxBins.Clear; -begin - while Count > 0 do Delete(Count - 1); -end; - -procedure TdxBins.Delete(Index: Integer); -begin - Bins[Index].Free; - FBins.Delete(Index); -end; - -function TdxBins.FindByName(const AName: string): Integer; -begin - for Result := 0 to Count - 1 do - if dxSameText(Bins[Result].Name, AName) then - Exit; - Result := -1; -end; - -function TdxBins.FindByValue(AValue: Integer): Integer; -begin - for Result := 0 to Count - 1 do - if Bins[Result].Value = AValue then - Exit; - Result := -1; -end; - -function TdxBins.IndexOf(ABin: TdxBin): Integer; -begin - Result := FBins.IndexOf(ABin); -end; - -procedure TdxBins.Refresh; -begin - Clear; - AddBins; -end; - -procedure TdxBins.AddBins; - - procedure Add(AValue: Integer; const AName: string); - begin - FBins.Add(TdxBin.Create(AValue, AName)); - end; - -begin - Add(DMBIN_UPPER, 'DMBIN_UPPER'); // 1 -// Add(DMBIN_ONLYONE, 'DMBIN_ONLYONE'); // 1 - Add(DMBIN_LOWER, 'DMBIN_LOWER'); // 2 - Add(DMBIN_MIDDLE, 'DMBIN_MIDDLE'); // 3 - Add(DMBIN_MANUAL, 'DMBIN_MANUAL'); // 4 - Add(DMBIN_ENVELOPE, 'DMBIN_ENVELOPE'); // 5 - Add(DMBIN_ENVMANUAL, 'DMBIN_ENVMANUAL'); // 6 - Add(DMBIN_AUTO, 'DMBIN_AUTO'); // 7 - Add(DMBIN_TRACTOR, 'DMBIN_TRACTOR'); // 8 - Add(DMBIN_SMALLFMT, 'DMBIN_SMALLFMT'); // 9 - Add(DMBIN_LARGEFMT, 'DMBIN_LARGEFMT'); // 10 - Add(DMBIN_LARGECAPACITY, 'DMBIN_LARGECAPACITY'); // 11 - Add(DMBIN_CASSETTE, 'DMBIN_CASSETTE'); // 14 - Add(DMBIN_FORMSOURCE, 'DMBIN_FORMSOURCE'); // 15 - Add(DMBIN_USER, 'DMBIN_USER'); // $100 -end; - -function TdxBins.GetBin(Index: Integer): TdxBin; -begin - Result := TdxBin(FBins[Index]); -end; - -function TdxBins.GetCount: Integer; -begin - Result := FBins.Count; -end; - -initialization - -finalization - FreeAndNil(FBins); - FreeAndNil(FPapers); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPS.dcr b/internal/x.46/ExpressPrinting System/Sources/dxPS.dcr deleted file mode 100644 index f2521142..00000000 Binary files a/internal/x.46/ExpressPrinting System/Sources/dxPS.dcr and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSAutoHFTextMnuBld.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSAutoHFTextMnuBld.pas deleted file mode 100644 index 4baf350c..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSAutoHFTextMnuBld.pas +++ /dev/null @@ -1,219 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire coVisntents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSAutoHFTextMnuBld; - -interface - -{$I cxVer.inc} - -uses - Classes, cxClasses, dxBase, dxPSSngltn, dxPgsDlg; - -type - TAbstractdxPSAutoHFTextMenuBuilder = class - public - constructor Create; virtual; - procedure BuildAutoHFTextEntriesMenu(ARootItem: TObject; AData: Pointer; - AIncludeSetupAutoHFTextEntriesItem: Boolean; AAutoHFTextEntries: TStrings; - AOnHFTextEntriesClick, AOnSetupHFTextEntriesClick: TNotifyEvent); virtual; abstract; - class function ExtractAutoHFTextEntryIndexFromObj(Obj: TObject): Integer; virtual; - end; - - TdxPSAutoHFTextMenuBuilderClass = class of TAbstractdxPSAutoHFTextMenuBuilder; - - TdxStandardPSAutoHFTextMenuBuilder = class(TAbstractdxPSAutoHFTextMenuBuilder) - public - procedure BuildAutoHFTextEntriesMenu(ARootItem: TObject; AData: Pointer; - AIncludeSetupAutoHFTextEntriesItem: Boolean; AAutoHFTextEntries: TStrings; - AOnHFTextEntriesClick, AOnSetupHFTextEntriesClick: TNotifyEvent); override; - class function ExtractAutoHFTextEntryIndexFromObj(Obj: TObject): Integer; override; - end; - - TdxPSAutoHFTextMenuBuilderFactory = class(TBasedxPSSingleton) - private - FBuilders: TdxClassList; - function GetActiveBuilder: TdxPSAutoHFTextMenuBuilderClass; - function GetBuilder(Index: Integer): TdxPSAutoHFTextMenuBuilderClass; - function GetCount: Integer; - protected - procedure FinalizeInstance; override; - procedure InitializeInstance; override; - public - class function Instance: TdxPSAutoHFTextMenuBuilderFactory; reintroduce; overload; - procedure RegisterBuilder(ABuilder: TdxPSAutoHFTextMenuBuilderClass); - procedure UnregisterBuilder(ABuilder: TdxPSAutoHFTextMenuBuilderClass); - - property ActiveBuilder: TdxPSAutoHFTextMenuBuilderClass read GetActiveBuilder; - property Builders[Index: Integer]: TdxPSAutoHFTextMenuBuilderClass read GetBuilder; - property Count: Integer read GetCount; - end; - -function dxPSAutoHFTextMenuBuilderFactory: TdxPSAutoHFTextMenuBuilderFactory; - -implementation - -uses - Menus, SysUtils, dxPSUtl, dxPSRes; - -function dxPSAutoHFTextMenuBuilderFactory: TdxPSAutoHFTextMenuBuilderFactory; -begin - Result := TdxPSAutoHFTextMenuBuilderFactory.Instance; -end; - -{ TdxPSAutoHFTextMenuBuilderFactory } - -class function TdxPSAutoHFTextMenuBuilderFactory.Instance: TdxPSAutoHFTextMenuBuilderFactory; -begin - Result := inherited Instance as TdxPSAutoHFTextMenuBuilderFactory; -end; - -procedure TdxPSAutoHFTextMenuBuilderFactory.RegisterBuilder(ABuilder: TdxPSAutoHFTextMenuBuilderClass); -begin - if ABuilder <> nil then FBuilders.Add(ABuilder); -end; - -procedure TdxPSAutoHFTextMenuBuilderFactory.UnregisterBuilder(ABuilder: TdxPSAutoHFTextMenuBuilderClass); -begin - FBuilders.Remove(ABuilder); -end; - -procedure TdxPSAutoHFTextMenuBuilderFactory.FinalizeInstance; -begin - FreeAndNil(FBuilders); - inherited; -end; - -procedure TdxPSAutoHFTextMenuBuilderFactory.InitializeInstance; -begin - inherited; - FBuilders := TdxClassList.Create; -end; - -function TdxPSAutoHFTextMenuBuilderFactory.GetActiveBuilder: TdxPSAutoHFTextMenuBuilderClass; -begin - if Count <> 0 then - Result := TdxPSAutoHFTextMenuBuilderClass(Builders[Count - 1]) - else - Result := TdxStandardPSAutoHFTextMenuBuilder; -end; - -function TdxPSAutoHFTextMenuBuilderFactory.GetBuilder(Index: Integer): TdxPSAutoHFTextMenuBuilderClass; -begin - Result := TdxPSAutoHFTextMenuBuilderClass(FBuilders[Index]); -end; - -function TdxPSAutoHFTextMenuBuilderFactory.GetCount: Integer; -begin - Result := FBuilders.Count; -end; - -{ TAbstractdxPSAutoHFTextMenuBuilder } - -constructor TAbstractdxPSAutoHFTextMenuBuilder.Create; -begin - inherited Create; -end; - -class function TAbstractdxPSAutoHFTextMenuBuilder.ExtractAutoHFTextEntryIndexFromObj(Obj: TObject): Integer; -begin - Result := 0; -end; - -{ TdxStandardPSAutoHFTextMenuBuilder } - -procedure TdxStandardPSAutoHFTextMenuBuilder.BuildAutoHFTextEntriesMenu(ARootItem: TObject; - AData: Pointer; AIncludeSetupAutoHFTextEntriesItem: Boolean; - AAutoHFTextEntries: TStrings; AOnHFTextEntriesClick, AOnSetupHFTextEntriesClick: TNotifyEvent); - - procedure AddMenuItem(AParent: TMenuItem; AIndex: Integer); - var - MenuItem: TMenuItem; - begin - MenuItem := TMenuItem.Create(AParent); - with MenuItem do - begin - Caption := AAutoHFTextEntries[AIndex]; - Tag := MakeTTag(AIndex); - OnClick := AOnHFTextEntriesClick; - end; - AParent.Add(MenuItem); - end; - - procedure ClearMenuItems(AMenuItem: TMenuItem); - var - CurItem: TMenuItem; - begin - with AMenuItem do - while Count > 0 do - begin - CurItem := Items[Count - 1]; - Remove(CurItem); - CurItem.Free; - end; - end; - -var - MenuItem: TMenuItem; - I: Integer; - MI: TMenuItem; -begin - if not (ARootItem is TMenuItem) then Exit; - MenuItem := TMenuItem(ARootItem); - ClearMenuItems(MenuItem); - - for I := 0 to AAutoHFTextEntries.Count - 1 do - AddMenuItem(MenuItem, I); - - if AIncludeSetupAutoHFTextEntriesItem then - begin - if MenuItem.Count > 0 then MenuItem.Add(NewLine); - - MI := TMenuItem.Create(MenuItem); - MI.Caption := cxGetResourceString(@sdxMenuInsertEditAutoTextEntries); - MI.OnClick := AOnSetupHFTextEntriesClick; - MenuItem.Add(MI); - end; -end; - -class function TdxStandardPSAutoHFTextMenuBuilder.ExtractAutoHFTextEntryIndexFromObj(Obj: TObject): Integer; -begin - Result := TTagToInt(TMenuItem(Obj).Tag); -end; - -initialization - dxPSAutoHFTextMenuBuilderFactory.RegisterBuilder(TdxStandardPSAutoHFTextMenuBuilder); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSAutoRELnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSAutoRELnk.pas deleted file mode 100644 index 3eaa047e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSAutoRELnk.pas +++ /dev/null @@ -1,189 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSAutoRELnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, Graphics, Controls, ARichEd, dxPSCore, dxPSContainerLnk, - dxPSRELnk; - -type - TdxPSdxCustomAutoRichEditProducer = class(TdxPSContainerCustomWinControlProducer) - protected - function CreateImage: TGraphic; virtual; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - function ObjectExpandHeight: Boolean; override; - public - function Control: TCustomAutoRichEdit; reintroduce; overload; - class function ControlClass: TControlClass; override; - - function ProducingObjectFriendlyName: string; override; - end; - - TdxAutoRichEditReportLink = class(TAbstractdxRichEditReportLink) - private - function GetAutoRichEdit: TAutoRichEdit; - protected - function GetRichEditHandle: HWND; override; - public - constructor Create(AOwner: TComponent); override; - property AutoRichEdit: TAutoRichEdit read GetAutoRichEdit; - end; - -implementation - -type - TCustomAutoRichEditAccess = class(TCustomAutoRichEdit); - -{ TdxPSdxCustomAutoRichEditProducer } - -function TdxPSdxCustomAutoRichEditProducer.Control: TCustomAutoRichEdit; -begin - Result := inherited Control as TCustomAutoRichEdit; -end; - -class function TdxPSdxCustomAutoRichEditProducer.ControlClass: TControlClass; -begin - Result := TCustomAutoRichEdit; -end; - -function TdxPSdxCustomAutoRichEditProducer.ProducingObjectFriendlyName: string; -begin - Result := ''; - if not IsDesigning and (TCustomAutoRichEditAccess(Control).Text <> '') then - Result := dxPSContainerLnk.dxPSMakeFriendlyNameFromStrings(TCustomAutoRichEditAccess(Control).Lines); - if Result = '' then - Result := inherited ProducingObjectFriendlyName; -end; - -function TdxPSdxCustomAutoRichEditProducer.CreateImage: TGraphic; - - function GetMargins: TRect; - begin - Result := Rect(dxTextSpace, dxTextSpace, dxTextSpace, dxTextSpace); - end; - - function GetMaxHeight: Integer; - begin - if Definition.OptionsPlace.ExpandHeight then - Result := -1 - else - Result := Control.Height; - end; - -begin - Result := GetRichEditAsGraphic(Control.Handle, TCustomAutoRichEditAccess(Control).Color, - GetMargins, TMetafile, Control.Width, -1, GetMaxHeight, DC); -end; - -procedure TdxPSdxCustomAutoRichEditProducer.InitializeItem(AnItem: TdxReportVisualItem); -var - Graphic: TGraphic; -begin - inherited; - with TdxReportCellGraphic(AnItem) do - begin - BorderClass := TdxPSCellSunkenBorder; - CellSides := BorderStyleMap[TCustomAutoRichEditAccess(Control).BorderStyle]; - Color := TCustomAutoRichEditAccess(Control).Color; - Graphic := Self.CreateImage; - try - Image := Graphic; - finally - Graphic.Free; - end; - Transparent := False; - end; -end; - -function TdxPSdxCustomAutoRichEditProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellGraphic; -end; - -function TdxPSdxCustomAutoRichEditProducer.ObjectExpandHeight: Boolean; -begin - Result := False; -end; - -{ TdxAutoRichEditReportLink } - -constructor TdxAutoRichEditReportLink.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - RichEditVersion := 2; - LinkModified(False); -end; - -function TdxAutoRichEditReportLink.GetAutoRichEdit: TAutoRichEdit; -begin - Result := inherited Component as TAutoRichEdit; -end; - -function TdxAutoRichEditReportLink.GetRichEditHandle: HWND; -begin - if AutoRichEdit <> nil then - Result := AutoRichEdit.Handle - else - Result := 0; -end; - -{ Assistants } - -procedure RegisterProducers; -begin - TdxPSdxCustomAutoRichEditProducer.Register; -end; - -procedure UnregisterProducers; -begin - TdxPSdxCustomAutoRichEditProducer.Unregister; -end; - -initialization - dxPSRegisterReportLink(TdxAutoRichEditReportLink, TAutoRichEdit, nil); - RegisterProducers; - -finalization - UnregisterProducers; - dxPSUnregisterReportLink(TdxAutoRichEditReportLink, TAutoRichEdit, nil); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSBaseGridLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSBaseGridLnk.pas deleted file mode 100644 index f63ab9a7..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSBaseGridLnk.pas +++ /dev/null @@ -1,2320 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSBaseGridLnk; - -interface - -{$I cxVer.inc} - -{$IFDEF CBUILDER5} - (*$HPPEMIT '#define HDC unsigned'*) -{$ELSE} - (*$HPPEMIT '#define HDC int'*) -{$ENDIF} - -uses - Classes, Windows, Graphics, Controls, StdCtrls, ImgList, dxPSCore, dxPSGlbl, - dxPrnPg, dxPSRes, dxBase, dxPSFillPatterns, cxDrawTextUtils; - -type - {$IFDEF BCB} - {$DEFINE DefineArrays} - {$ENDIF} - - {$IFNDEF DELPHI6} - {$DEFINE DefineArrays} - {$ENDIF} - - {$IFDEF DefineArrays} - IntegerArray = array[0..$EFFFFFF] of Integer; - PIntegerArray = ^IntegerArray; - TBoundArray = array of Integer; - {$ENDIF} - - TAbstractdxGridReportLink = class; - TdxPSCustomGridCellDataMapClass = class of TdxPSCustomGridCellDataMap; - TdxPSCustomGridCellDataMap = class; - - { DataMaps } - - TdxPSGridCellDataMaps = class(TdxCustomClassMaps) - private - function GetMapClass(ADataItem: TAbstractdxReportCellData): TdxPSCustomGridCellDataMapClass; - public - class function Instance: TdxPSGridCellDataMaps; reintroduce; overload; - procedure InitializeCellData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData; - AReportLink: TAbstractdxGridReportLink); - property MapClasses[ADataItem: TAbstractdxReportCellData]: TdxPSCustomGridCellDataMapClass read GetMapClass; default; - end; - - TdxPSCustomGridCellDataMap = class(TdxCustomClassMapItem) - protected - class procedure InitializeCellData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData; - AReportLink: TAbstractdxGridReportLink); virtual; - class function DataClass: TdxReportCellDataClass; virtual; - public - class function PairClass: TClass; override; - - class procedure Register; - class procedure Unregister; - end; - - TdxPSTextGridCellDataMap = class(TdxPSCustomGridCellDataMap) - protected - class procedure InitializeCellData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData; - AReportLink: TAbstractdxGridReportLink); override; - class function DataClass: TdxReportCellDataClass; override; - end; - - TdxPSImageGridCellDataMap = class(TdxPSTextGridCellDataMap) - protected - class procedure InitializeCellData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData; - AReportLink: TAbstractdxGridReportLink); override; - class function DataClass: TdxReportCellDataClass; override; - end; - - { ReportLink } - - TdxGridDrawMode = (gdmStrict, gdmOddEven, gdmChess, gdmBorrowSource); - - TdxCustomGridReportLinkEvent = procedure(Sender: TAbstractdxGridReportLink) of object; - - TdxCustomGridReportLinkInitializeItemEvent = procedure (Sender: TAbstractdxGridReportLink; - ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData) of object; - - TAbstractdxGridReportLink = class(TBasedxReportLink) - private - FAutoWidth: Boolean; - FDelimitersHardVert: TList; - FDefaultFixedFont: TFont; - FDrawMode: TdxGridDrawMode; - FEffects3D: Boolean; - FEndEllipsis: Boolean; - FEvenColor: TColor; - FEvenFont: TFont; - FFixedColor: TColor; - FFixedFont: TFont; - FFixedTransparent: Boolean; - FGridLineColor: TColor; - FIncludeFixed: Boolean; - FMultiline: Boolean; - FOnlySelected: Boolean; - FReportRows: TList; - FRowAutoHeight: Boolean; - FRowWidth: Integer; - FScreenDC: HDC; - FSoft3D: Boolean; - FSupportedCustomDraw: Boolean; - FUseCustomPageBreaks: Boolean; - FOnGetCustomPageBreaks: TdxCustomGridReportLinkEvent; - FOnInitializeItem: TdxCustomGridReportLinkInitializeItemEvent; - function GetActualFirstCol: Integer; - function GetActualFirstRow: Integer; - function GetActualLastCol: Integer; - function GetActualLastRow: Integer; - function GetAvailableSiteHeight: Integer; - function GetAvailableSiteWidth: Integer; - function GetColumnWidth(Index: Integer): Integer; - function GetOddColor: TColor; - function GetOddFont: TFont; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowByRow(Row: Integer): TdxReportCell; - function GetReportRowCount: Integer; - function GetRowHeight(ARow: Integer): Integer; - function GetRowWidth: Integer; - procedure SetAutoWidth(Value: Boolean); - procedure SetColumnWidth(Index: Integer; Value: Integer); - procedure SetEffects3D(Value: Boolean); - procedure SetEndEllipsis(Value: Boolean); - procedure SetEvenColor(Value: TColor); - procedure SetEvenFont(Value: TFont); - procedure SetFixedColor(Value: TColor); - procedure SetFixedFont(Value: TFont); - procedure SetFixedTransparent(Value: Boolean); - procedure SetGridLineColor(Value: TColor); - procedure SetIncludeFixed(Value: Boolean); - procedure SetMultiline(Value: Boolean); - procedure SetOddColor(Value: TColor); - procedure SetOddFont(Value: TFont); - procedure SetOnlySelected(Value: Boolean); - procedure SetRowAutoHeight(Value: Boolean); - procedure SetRowHeight(Index: Integer; Value: Integer); - procedure SetSoft3D(Value: Boolean); - procedure SetSupportedCustomDraw(Value: Boolean); - procedure SetUseCustomPageBreaks(Value: Boolean); - protected - FColumnWidths: array of Integer; - FCurrentCol: Integer; - FCurrentRow: Integer; - FEvenFontIndex: Integer; - FFixedFontIndex: Integer; - FRowHeights: array of Integer; - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure ConvertCoords; override; - function GetBreakPagesByHardDelimiters: Boolean; override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - function GetUseHardVertDelimiters: Boolean; override; - procedure InternalRestoreDefaults; override; - function IsSupportedCustomDraw(AItem: TAbstractdxReportCellData): Boolean; override; - procedure MakeDelimiters(AReportCells: TdxReportCells; AHorzDelimiters, AVertDelimiters: TList); override; - procedure MakeHardDelimiters(AReportCells: TdxReportCells; AVertDelimiters: TList); override; - - procedure DoGetCustomPageBreaks; dynamic; - procedure DoInitializeItem(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData); dynamic; - - procedure AssignData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData); virtual; - function CreateDataItem(AParent: TdxReportCell; ACol, ARow: Integer; const ABounds: TRect): TAbstractdxReportCellData; virtual; - function GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; virtual; - - procedure CalculateColumnAutoWidths; virtual; - procedure CalculateColumnWidths; virtual; - procedure CalculateRowHeights(AReportCells: TdxReportCells); virtual; - function CalculateRowWidth: Integer; virtual; - function CanCalculateColumnAutoWidths: Boolean; virtual; - - function GetRowClass(ARow: Integer): TdxReportCellClass; virtual; - function GetRowParent(AReportCells: TdxReportCells; ARow: Integer): TdxReportCell; virtual; - procedure InitializeRow(AReportRow: TdxReportCell; ARow: Integer); virtual; - - function GetColCount: Integer; virtual; - function GetFixedColCount: Integer; virtual; - function GetFixedRowCount: Integer; virtual; - function GetRowCount: Integer; virtual; - - function GetActualColCount: Integer; virtual; - function GetActualColIndex(Col: Integer): Integer; virtual; - function GetActualRowCount: Integer; virtual; - function GetCellColor(ACol, ARow: Integer): TColor; virtual; - procedure GetCellColRow(AItem: TdxReportVisualItem; var ACol, ARow: Integer); - function GetCellContentBkColor(ACol, ARow: Integer): TColor; virtual; - function GetCellContentPattern(ACol, ARow: Integer): TdxPSFillPatternClass; virtual; - function GetCellEdge3DSoft(AItem: TAbstractdxReportCellData; ACol, ARow: Integer): Boolean; virtual; - function GetCellEdge3DStyle(AItem: TAbstractdxReportCellData; ACol, ARow: Integer): TdxCellEdgeStyle; virtual; - function GetCellEdgeMode(AItem: TAbstractdxReportCellData; ACol, ARow: Integer): TdxCellEdgeMode; virtual; - function GetCellFont(ACol, ARow: Integer): TFont; virtual; - function GetCellFontIndex(ACol, ARow: Integer): Integer; virtual; - function GetCellHasImage(ACol, ARow: Integer): Boolean; virtual; - function GetCellImage(ACol, ARow: Integer): TGraphic; virtual; - function GetCellImageIndex(ACol, ARow: Integer): Integer; virtual; - function GetCellImageLayout(ACol, ARow: Integer): TdxImageLayout; virtual; - function GetCellImageList(ACol, ARow: Integer): TCustomImageList; virtual; - function GetCellImageMakeSpaceForEmpty(ACol, ARow: Integer): Boolean; virtual; - function GetCellImageTransparent(ACol, ARow: Integer): Boolean; virtual; - function GetCellMultiline(ACol, ARow: Integer): Boolean; virtual; - function GetCellSides(ACol, ARow: Integer): TdxCellSides; virtual; - function GetCellText(ACol, ARow: Integer): string; virtual; abstract; - function GetCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; virtual; - function GetCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; virtual; - function GetCellTransparent(ACol, ARow: Integer): Boolean; virtual; - function GetColSortOrder(ACol: Integer): TdxCellSortOrder; virtual; - function GetEndEllipsis: Boolean; virtual; - function GetInternalRowHeight(Index: Integer): Integer; - function GetMinRowHeight(DC: HDC; AFont: TFont): Integer; virtual; - function GetMultiline: Boolean; virtual; - - procedure GetSelectedRange(ABeginCol, AEndCol, ABeginRow, AEndRow: PInteger); overload; virtual; - procedure GetSelectedRange(out ABeginCol, AEndCol, ABeginRow, AEndRow: Integer); overload; virtual; - function GetSelectedColCount: Integer; virtual; - function GetSelectedRowCount: Integer; virtual; - function GetSelectionRect: TRect; virtual; - - function GetSourceCellColor(ACol, ARow: Integer): TColor; virtual; - function GetSourceCellContentBkColor(ACol, ARow: Integer): TColor; virtual; - function GetSourceCellContentPattern(ACol, ARow: Integer): TdxPSFillPatternClass; virtual; - function GetSourceCellEdge3DSoft(ACol, ARow: Integer): Boolean; virtual; - function GetSourceCellEdge3DStyle(ACol, ARow: Integer): TdxCellEdgeStyle; virtual; - function GetSourceCellEdgeMode(ACol, ARow: Integer): TdxCellEdgeMode; virtual; - function GetSourceCellFont(ACol, ARow: Integer): TFont; virtual; - function GetSourceCellFontIndex(ACol, ARow: Integer): Integer; virtual; - function GetSourceCellMultiline(ACol, ARow: Integer): Boolean; virtual; - function GetSourceCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; virtual; - function GetSourceCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; virtual; - function GetSourceCellTransparent(ACol, ARow: Integer): Boolean; virtual; - function GetSourceColWidth(ACol: Integer): Integer; virtual; - function GetSourceRowHeight(ARow: Integer): Integer; virtual; - - function HasColumnHeaderImage(ACol: Integer): Boolean; virtual; - function HasSelection: Boolean; virtual; - function HasSelectionInCol(ACol: Integer): Boolean; virtual; - function HasSelectionInRow(ARow: Integer): Boolean; virtual; - function IsDrawBorder: Boolean; virtual; - function IsDrawFixedHorzLines: Boolean; virtual; - function IsDrawFixedVertLines: Boolean; virtual; - function IsDrawHorzLines: Boolean; virtual; - function IsDrawVertLines: Boolean; virtual; - function IsFixedCell(ACol, ARow: Integer): Boolean; virtual; - function IsFixedCol(ACol: Integer): Boolean; virtual; - function IsFixedRow(ARow: Integer): Boolean; virtual; - function IsFooterRow(ARow: Integer): Boolean; virtual; - function IsHeaderRow(ARow: Integer): Boolean; virtual; - function IsProcessedCell(ACol, ARow: Integer): Boolean; virtual; - function IsProcessedCol(ACol: Integer): Boolean; virtual; - function IsProcessedRow(ARow: Integer): Boolean; virtual; - function IsSelectedCell(ACol, ARow: Integer): Boolean; virtual; - function IsSelectedRow(ARow: Integer): Boolean; virtual; - - procedure NextCol; virtual; - procedure NextRow; virtual; - procedure SetDrawMode(Value: TdxGridDrawMode); virtual; - procedure SetupBoundsRect(ACell: TdxReportCell); - - procedure AddReportRow(ARow: TdxReportCell); - procedure AddVerticalHardDelimiter(ADelimiter: TdxReportCell); overload; - procedure AddVerticalHardDelimiter(ADelimiter: Integer); overload; - - procedure AfterConstruct(AReportCells: TdxReportCells); virtual; - procedure BeforeConstruct(AReportCells: TdxReportCells); virtual; - procedure PrepareConstruct(AReportCells: TdxReportCells); virtual; - procedure UnprepareConstruct(AReportCells: TdxReportCells); virtual; - - procedure InitializeDefaultFixedFont(AFont: TFont); virtual; - function IsFixedFontStored: Boolean; - - property ActualColIndexes[Col: Integer]: Integer read GetActualColIndex; - property ActualColCount: Integer read GetActualColCount; - property ActualFirstCol: Integer read GetActualFirstCol; - property ActualFirstRow: Integer read GetActualFirstRow; - property ActualLastCol: Integer read GetActualLastCol; - property ActualLastRow: Integer read GetActualLastRow; - property ActualRowCount: Integer read GetActualRowCount; - property AutoWidth: Boolean read FAutoWidth write SetAutoWidth default False; - property AvailableSiteHeight: Integer read GetAvailableSiteHeight; - property AvailableSiteWidth: Integer read GetAvailableSiteWidth; - property ColCount: Integer read GetColCount; - property ColumnWidths[Index: Integer]: Integer read GetColumnWidth write SetColumnWidth; - property DelimitersHardVert: TList read FDelimitersHardVert; - property DrawMode: TdxGridDrawMode read FDrawMode write SetDrawMode default gdmStrict; - property Effects3D: Boolean read FEffects3D write SetEffects3D default False; - property EndEllipsis: Boolean read GetEndEllipsis write SetEndEllipsis default False; - property EvenColor: TColor read FEvenColor write SetEvenColor default clWhite; - property EvenFont: TFont read FEvenFont write SetEvenFont stored IsFontStored; - property FixedColCount: Integer read GetFixedColCount; - property FixedColor: TColor read FFixedColor write SetFixedColor default clBtnFace; {dxDefaultFixedColor} - property FixedFont: TFont read FFixedFont write SetFixedFont stored IsFixedFontStored; - property FixedRowCount: Integer read GetFixedRowCount; - property FixedTransparent: Boolean read FFixedTransparent write SetFixedTransparent default False; - property GridLineColor: TColor read FGridLineColor write SetGridLineColor default clBlack; - property IncludeFixed: Boolean read FIncludeFixed write SetIncludeFixed default True; - property InternalRowHeights[Index: Integer]: Integer read GetInternalRowHeight; - property Multiline: Boolean read FMultiline write SetMultiline default False; - property OddColor: TColor read GetOddColor write SetOddColor stored IsFontStored default clWhite; - property OddFont: TFont read GetOddFont write SetOddFont stored IsFontStored; - property OnlySelected: Boolean read FOnlySelected write SetOnlySelected default False; - property ReportRowCount: Integer read GetReportRowCount; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property ReportRowsByRow[ARow: Integer]: TdxReportCell read GetReportRowByRow; - property RowAutoHeight: Boolean read FRowAutoHeight write SetRowAutoHeight default False; - property RowCount: Integer read GetRowCount; - property RowHeights[Index: Integer]: Integer read GetRowHeight write SetRowHeight; - property RowWidth: Integer read GetRowWidth; - property ScreenDC: HDC read FScreenDC; - property SelectedColCount: Integer read GetSelectedColCount; - property SelectedRowCount: Integer read GetSelectedRowCount; - property SelectionRect: TRect read GetSelectionRect; - property Soft3D: Boolean read FSoft3D write SetSoft3D default True; - property SupportedCustomDraw: Boolean read FSupportedCustomDraw write SetSupportedCustomDraw default False; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure AddPageBreak(ARow: Integer); overload; - procedure AddPageBreak(const ARows: array of Integer); overload; - procedure AddPageBreak(const ARows: array of Integer; AStartIndex, ACount: Integer); overload; - procedure AddPageBreak(ARows: PIntegerArray; ACount: Integer); overload; - procedure AddPageBreak(ARows: PIntegerArray; AStartIndex, ACount: Integer); overload; - procedure AddPageBreak(const ARows: TBoundArray); overload; - procedure AddPageBreak(const ARows: TBoundArray; AStartIndex, ACount: Integer); overload; - procedure AddPageBreak(ARows: TList); overload; // List of Integers -> Row Indexes - procedure AddPageBreak(ARows: TList; AStartIndex, ACount: Integer); overload; - - function DefaultFixedFont: TFont; virtual; - - property Color; - property Font; - property ScaleFonts; - property Transparent; - property UseCustomPageBreaks: Boolean read FUseCustomPageBreaks write SetUseCustomPageBreaks default False; - - property OnGetCustomPageBreaks: TdxCustomGridReportLinkEvent read FOnGetCustomPageBreaks write FOnGetCustomPageBreaks; - property OnInitializeItem: TdxCustomGridReportLinkInitializeItemEvent read FOnInitializeItem write FOnInitializeItem; - end; - -procedure dxPSDrawComboDrawModeItem(Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -procedure dxPSDrawGridPreview(ACanvas: TCanvas; R: TRect; AReportLink: TAbstractdxGridReportLink; - AShowFixedColumn: Boolean = True; AShowFixedRow: Boolean = True); - -implementation - -uses - Forms, {$IFDEF DELPHI5} SysUtils, {$ENDIF} cxClasses, dxPSUtl, dxPSImgs; - -procedure dxPSDrawComboDrawModeItem(Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -const - ImageIndexMap: array[TdxGridDrawMode] of Integer = (0, 1, 2, 3); -begin - with TComboBox(Control) do - dxPSUtl.dxDrawComboBoxItem(Canvas, Rect, Items[Index], - dxPSUtl.dxPSDrawModeImages, ImageIndexMap[TdxGridDrawMode(Index)], State); -end; - -function GetDesignerString(ACol, ARow: Integer): string; -const - sdxGridStrings: array[0..4, 0..6] of string = - (('7', '12', '27', '11', '11', '16', '84'), - ( '8', '6', '17', '12', '11', '16', '70'), - ('23', '32', '21', '15', '10', '26', '127'), - ('22', '12', '12', '32', '32', '12', '122'), - ('60', '62', '77', '70', '64', '70', '403')); -begin - if (ARow = 0) or (ACol = 0) then - begin - if ARow = 0 then - if ACol = 0 then - Result := '' - else - case ACol of - 1: Result := cxGetResourceString(@sdxEast); - 2: Result := cxGetResourceString(@sdxWest); - 3: Result := cxGetResourceString(@sdxSouth); - 4: Result := cxGetResourceString(@sdxNorth); - else - Result := cxGetResourceString(@sdxTotal); - end - else - case ARow of - 1: Result := cxGetResourceString(@sdxJanuaryShort); - 2: Result := cxGetResourceString(@sdxFebruaryShort); - 3: Result := cxGetResourceString(@sdxMarchShort); - 4: Result := cxGetResourceString(@sdxAprilShort); - 5: Result := cxGetResourceString(@sdxMayShort); - 6: Result := cxGetResourceString(@sdxJuneShort); - else - Result := cxGetResourceString(@sdxTotal); - end; - end - else - Result := sdxGridStrings[ACol - 1, ARow - 1]; -end; - -procedure dxPSDrawGridPreview(ACanvas: TCanvas; R: TRect; AReportLink: TAbstractdxGridReportLink; - AShowFixedColumn: Boolean = True; AShowFixedRow: Boolean = True); -const - PreviewDefaultColCount = 6; - PreviewDefaultRowCount = 8; - - function ColCount: Integer; - begin - Result := PreviewDefaultColCount - Ord(not AShowFixedColumn); - end; - - function RowCount: Integer; - begin - Result := PreviewDefaultRowCount - Ord(not AShowFixedRow); - end; - - function FixedColumnCount: Integer; - begin - Result := 1 - Ord(not AShowFixedColumn); - end; - - function FixedRowCount: Integer; - begin - Result := 1 - Ord(not AShowFixedRow); - end; - - function IsFixedCol(ACol: Integer): Boolean; - begin - Result := AShowFixedColumn and (ACol = 0); - end; - - function IsFixedRow(ARow: Integer): Boolean; - begin - Result := AShowFixedRow and (ARow = 0); - end; - - function IsFixedCell(ACol, ARow: Integer): Boolean; - begin - Result := IsFixedCol(ACol) or IsFixedRow(ARow); - end; - - procedure FrameRect(DC: HDC; var R: TRect; ABrush: HBRUSH; ASides: TdxCellSides); - var - R2: TRect; - begin - if csLeft in ASides then - begin - R2 := MakeRect(R.Left - 1, R.Top - 1, R.Left, R.Bottom); - FillRect(DC, R2, ABrush); - end; - - if csTop in ASides then - begin - R2 := MakeRect(R.Left - 1, R.Top - 1, R.Right, R.Top); - FillRect(DC, R2, ABrush); - end; - - if csRight in ASides then - begin - R2 := MakeRect(R.Right - 1, R.Top - 1, R.Right, R.Bottom); - FillRect(DC, R2, ABrush); - end; - - if csBottom in ASides then - begin - R2 := MakeRect(R.Left - 1, R.Bottom - 1, R.Right, R.Bottom); - FillRect(DC, R2, ABrush); - end; - - if csRight in ASides then Dec(R.Right); - if csBottom in ASides then Dec(R.Bottom); - end; - - function GetCellSides(ACol, ARow: Integer): TdxCellSides; - var - ABeginCol, AEndCol, ABeginRow, AEndRow: Integer; - begin - Result := csAll; - if not AReportLink.IsDrawBorder then - begin - if ACol = 0 then Exclude(Result, csLeft); - if ACol = ColCount - 1 then Exclude(Result, csRight); - if ARow = 0 then Exclude(Result, csTop); - if ARow = RowCount - 1 then Exclude(Result, csBottom); - end; - - if IsFixedCell(ACol, ARow) then - begin - if not AReportLink.IsDrawFixedHorzLines then - begin - if ARow > 0 then - Exclude(Result, csTop); - if IsFixedCol(ACol) then - begin - if ARow < RowCount - 1 then - Exclude(Result, csBottom) - end - else - if ARow < FixedRowCount - Byte(AReportLink.IsDrawHorzLines) then - Exclude(Result, csBottom); - end; - if not AReportLink.IsDrawFixedVertLines then - begin - if ACol > 0 then - Exclude(Result, csLeft); - if IsFixedRow(ARow) then - begin - if ACol < ColCount - 1 then - Exclude(Result, csRight) - end - else - if ACol < FixedColumnCount - Byte(AReportLink.IsDrawVertLines) then - Exclude(Result, csRight); - end; - end - else - begin - if not AReportLink.IsDrawHorzLines then - begin - ABeginRow := 0; - AEndRow := RowCount - 1; - if ARow < AEndRow then - if ARow > ABeginRow then - Result := Result - [csTop, csBottom] - else - Exclude(Result, csBottom) - else - if ARow > ABeginRow then - Exclude(Result, csTop); - end; - if not AReportLink.IsDrawVertLines then - begin - ABeginCol := 0; - AEndCol := ColCount - 1; - if ACol < AEndCol then - if ACol > ABeginCol then - Result := Result - [csLeft, csRight] - else - Exclude(Result, csRight) - else - if ACol > ABeginCol then - Exclude(Result, csLeft) - end; - end; - end; - - function GetCellFont(I, J: Integer): TFont; - begin - if IsFixedCell(I, J) then - Result := AReportLink.FixedFont - else - case AReportLink.DrawMode of - gdmStrict: - Result := AReportLink.Font; - gdmOddEven: - if Odd(J) then - Result := AReportLink.OddFont - else - Result := AReportLink.EvenFont; - else - if not Odd((I - FixedColumnCount) + (J - FixedRowCount)) then - Result := AReportLink.OddFont - else - Result := AReportLink.EvenFont; - end; - end; - - function GetCellColor(I, J: Integer): TColor; - begin - if IsFixedCell(I, J) then - Result := AReportLink.FixedColor - else - case AReportLink.DrawMode of - gdmStrict: - Result := AReportLink.Color; - gdmOddEven: - if Odd(J) then - Result := AReportLink.OddColor - else - Result := AReportLink.EvenColor; - else - if not Odd((I - FixedColumnCount) + (J - FixedRowCount)) then - Result := AReportLink.OddColor - else - Result := AReportLink.EvenColor; - end; - Result := ColorToRGB(Result); - end; - -var - R2: TRect; - DC: HDC; - I, J, W, H, OffsetX, OffsetY: Integer; - Sides: TdxCellSides; - Color: TColor; - Font: TFont; - FixedCell, IsTransparentCell: Boolean; - S: string; - PrevFont: HFONT; - PrevFontColor: COLORREF; - PreviewFont: TFont; - BorderBrush, Brush: HBRUSH; -begin - DC := ACanvas.Handle; - PrevFontColor := GetTextColor(DC); - PrevFont := GetCurrentObject(DC, OBJ_FONT); - PreviewFont := TFont.Create; - try - SetBkMode(DC, Windows.TRANSPARENT); - - InflateRect(R, -5, -5); - W := (R.Right - R.Left) div ColCount; - H := (R.Bottom - R.Top) div RowCount; - OffsetX := R.Left + (R.Right - R.Left - ColCount * W) div 2; - OffsetY := R.Top + (R.Bottom - R.Top - RowCount * H) div 2; - - BorderBrush := CreateSolidBrush(ColorToRGB(AReportLink.GridLineColor)); - - for I := 0 to ColCount - 1 do - for J := 0 to RowCount - 1 do - begin - R2 := MakeBounds(OffsetX + I * W, OffsetY + J * H, W, H); - Sides := GetCellSides(I, J); - Font := GetCellFont(I, J); - Color := GetCellColor(I, J); - FixedCell := IsFixedCell(I, J); - - FrameRect(DC, R2, BorderBrush, Sides); - if FixedCell and AReportLink.Effects3D then - begin - if (I = 0) and not AReportLink.IsDrawBorder then - Exclude(Sides, csTop); - if (J = 0) and not AReportLink.IsDrawBorder then - Exclude(Sides, csLeft); - if AReportLink.Soft3D then - Sides := Sides - [csRight, csBottom]; - Windows.DrawEdge(DC, R2, BDR_RAISEDINNER, Byte(Sides) or BF_ADJUST); - end; - - IsTransparentCell := (FixedCell and AReportLink.FixedTransparent) or - (not FixedCell and AReportLink.Transparent); - - if not IsTransparentCell then - begin - Brush := CreateSolidBrush(Color); - FillRect(DC, R2, Brush); - DeleteObject(Brush); - end; - - PreviewFont.Assign(Font); - PreviewFont.Size := 8; - SetTextColor(DC, ColorToRGB(PreviewFont.Color)); - SelectObject(DC, PreviewFont.Handle); - S := GetDesignerString(I + Ord(not AShowFixedColumn), J + Ord(not AShowFixedRow)); - ExtTextOut(DC, R2.Left + 2, R2.Top + 2, ETO_CLIPPED, @R2, PChar(S), Length(S), nil); - end; - - SetBkMode(DC, Windows.OPAQUE); - DeleteObject(BorderBrush); - finally - PreviewFont.Free; - end; - SelectObject(DC, PrevFont); - SetTextColor(DC, PrevFontColor); -end; - -{ TdxPSGridCellDataMaps } - -function dxPSGridCellDataMaps: TdxPSGridCellDataMaps; -begin - Result := TdxPSGridCellDataMaps.Instance; -end; - -class function TdxPSGridCellDataMaps.Instance: TdxPSGridCellDataMaps; -begin - Result := inherited Instance as TdxPSGridCellDataMaps; -end; - -procedure TdxPSGridCellDataMaps.InitializeCellData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData; - AReportLink: TAbstractdxGridReportLink); -begin - MapClasses[ADataItem].InitializeCellData(ACol, ARow, ADataItem, AReportLink); -end; - -function TdxPSGridCellDataMaps.GetMapClass(ADataItem: TAbstractdxReportCellData): TdxPSCustomGridCellDataMapClass; -begin - Result := TdxPSCustomGridCellDataMapClass(PairClasses[ADataItem.ClassType]); -end; - -{ TdxPSCustomGridCellDataMap } - -class function TdxPSCustomGridCellDataMap.PairClass: TClass; -begin - Result := DataClass; -end; - -class procedure TdxPSCustomGridCellDataMap.Register; -begin - dxPSGridCellDataMaps.Register(Self); -end; - -class procedure TdxPSCustomGridCellDataMap.Unregister; -begin - dxPSGridCellDataMaps.Unregister(Self); -end; - -class function TdxPSCustomGridCellDataMap.DataClass: TdxReportCellDataClass; -begin - Result := TAbstractdxReportCellData; -end; - -class procedure TdxPSCustomGridCellDataMap.InitializeCellData(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData; AReportLink: TAbstractdxGridReportLink); -begin - with ADataItem do - begin - Color := AReportLink.GetCellColor(ACol, ARow); - ContentBkColor := AReportLink.GetCellContentBkColor(ACol, ARow); - ContentPattern := AReportLink.GetCellContentPattern(ACol, ARow); - Transparent := AReportLink.GetCellTransparent(ACol, ARow); - - CellSides := AReportLink.GetCellSides(ACol, ARow); - Data := ACol + ARow * AReportLink.ColCount; - EdgeMode := AReportLink.GetCellEdgeMode(ADataItem, ACol, ARow); - Edge3DStyle := AReportLink.GetCellEdge3DStyle(ADataItem, ACol, ARow); - Edge3DSoft := AReportLink.GetCellEdge3DSoft(ADataItem, ACol, ARow); - FontIndex := AReportLink.GetCellFontIndex(ACol, ARow); - end; -end; - -{ TdxPSTextGridCellDataMap } - -class function TdxPSTextGridCellDataMap.DataClass: TdxReportCellDataClass; -begin - Result := TdxReportCellString; -end; - -class procedure TdxPSTextGridCellDataMap.InitializeCellData(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData; AReportLink: TAbstractdxGridReportLink); -begin - inherited; - with TdxReportCellString(ADataItem) do - begin - EndEllipsis := AReportLink.GetEndEllipsis; - Multiline := AReportLink.GetCellMultiline(ACol, ARow); - SortOrder := AReportLink.GetColSortOrder(ACol); - Text := AReportLink.GetCellText(ACol, ARow); - TextAlignX := AReportLink.GetCellTextAlignX(ACol, ARow); - TextAlignY := AReportLink.GetCellTextAlignY(ACol, ARow); - end; -end; - -{ TdxPSImageGridCellDataMap } - -class function TdxPSImageGridCellDataMap.DataClass: TdxReportCellDataClass; -begin - Result := TdxReportCellImage; -end; - -class procedure TdxPSImageGridCellDataMap.InitializeCellData(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData; AReportLink: TAbstractdxGridReportLink); -begin - inherited; - with TdxReportCellImage(ADataItem) do - begin - if AReportLink.GetCellHasImage(ACol, ARow) then - begin - Image := AReportLink.GetCellImage(ACol, ARow); - ImageTransparent := AReportLink.GetCellImageTransparent(ACol, ARow); - MakeSpaceForEmptyImage := AReportLink.GetCellImageMakeSpaceForEmpty(ACol, ARow); - end; - ImageIndex := AReportLink.GetCellImageIndex(ACol, ARow); - ImageLayout := AReportLink.GetCellImageLayout(ACol, ARow); - ImageList := AReportLink.GetCellImageList(ACol, ARow); - end; -end; - -{ TAbstractdxGridReportLink } - -constructor TAbstractdxGridReportLink.Create(AOwner: TComponent); -begin - inherited; - FDelimitersHardVert := TList.Create; - FFixedFont := TFont.Create; - FEvenFont := TFont.Create; - InternalRestoreDefaults; - FFixedFont.OnChange := FontChanged; - FEvenFont.OnChange := FontChanged; - LinkModified(False); - FCurrentCol := -1; - FCurrentRow := -1; - FReportRows := TList.Create; -end; - -destructor TAbstractdxGridReportLink.Destroy; -begin - FreeAndNil(FDefaultFixedFont); - FreeAndNil(FReportRows); - FreeAndNil(FEvenFont); - FreeAndNil(FFixedFont); - FreeAndNil(FDelimitersHardVert); - inherited; -end; - -procedure TAbstractdxGridReportLink.Assign(Source: TPersistent); -begin - inherited; - if Source is TAbstractdxGridReportLink then - with TAbstractdxGridReportLink(Source) do - begin - Self.DrawMode := DrawMode; - Self.Effects3D := Effects3D; - Self.EndEllipsis := EndEllipsis; - Self.EvenColor := EvenColor; - Self.EvenFont := EvenFont; - Self.FixedColor := FixedColor; - Self.FixedFont := FixedFont; - Self.FixedTransparent := FixedTransparent; - Self.GridLineColor := GridLineColor; - Self.IncludeFixed := IncludeFixed; - Self.OnlySelected := OnlySelected; - Self.Multiline := Multiline; - Self.RowAutoHeight := RowAutoHeight; - Self.Soft3D := Soft3D; - Self.SupportedCustomDraw := SupportedCustomDraw; - Self.UseCustomPageBreaks := UseCustomPageBreaks; - end; -end; - -procedure TAbstractdxGridReportLink.AddPageBreak(ARow: Integer); -var - ReportRow: TdxReportCell; -begin - ReportRow := ReportRowsByRow[ARow]; - if (ReportRow <> nil) and not ReportRow.IsFirstItem then - AddVerticalHardDelimiter(ReportRow); -end; - -procedure TAbstractdxGridReportLink.AddPageBreak(const ARows: array of Integer); -begin - AddPageBreak(ARows, 0, High(ARows) + 1); -end; - -procedure TAbstractdxGridReportLink.AddPageBreak(const ARows: array of Integer; - AStartIndex, ACount: Integer); -var - I: Integer; -begin - for I := AStartIndex to AStartIndex + ACount - 1 do - AddPageBreak(ARows[I]); -end; - -procedure TAbstractdxGridReportLink.AddPageBreak(ARows: PIntegerArray; ACount: Integer); -begin - AddPageBreak(ARows, 0, ACount); -end; - -procedure TAbstractdxGridReportLink.AddPageBreak(ARows: PIntegerArray; AStartIndex, ACount: Integer); -var - I: Integer; -begin - for I := AStartIndex to AStartIndex + ACount - 1 do - AddPageBreak(ARows^[I]); -end; - -procedure TAbstractdxGridReportLink.AddPageBreak(const ARows: TBoundArray); -var - I: Integer; -begin - for I := 0 to Length(ARows) - 1 do - AddPageBreak(ARows[I]); -end; - -procedure TAbstractdxGridReportLink.AddPageBreak(const ARows: TBoundArray; AStartIndex, ACount: Integer); -var - I: Integer; -begin - for I := AStartIndex to AStartIndex + ACount - 1 do - AddPageBreak(ARows[I]); -end; - -procedure TAbstractdxGridReportLink.AddPageBreak(ARows: TList); -begin - AddPageBreak(ARows, 0, ARows.Count); -end; - -procedure TAbstractdxGridReportLink.AddPageBreak(ARows: TList; AStartIndex, ACount: Integer); -var - I: Integer; -begin - for I := AStartIndex to AStartIndex + ACount - 1 do - AddPageBreak(Integer(ARows[I])); -end; - -function TAbstractdxGridReportLink.DefaultFixedFont: TFont; -begin - if FDefaultFixedFont = nil then - begin - FDefaultFixedFont := TFont.Create; - InitializeDefaultFixedFont(FDefaultFixedFont); - end; - Result := FDefaultFixedFont; -end; - -procedure TAbstractdxGridReportLink.ConstructReport(AReportCells: TdxReportCells); -var - Item: TdxReportItem; - ReportRow: TdxReportCell; - EntireRowCount, Row, Col: Integer; - R, R2: TRect; -begin - if not DataProviderPresent then Exit; - inherited; - BeforeConstruct(AReportCells); - try - PrepareConstruct(AReportCells); - try - EntireRowCount := ActualRowCount; - with AReportCells do - begin - BorderColor := GridLineColor; - Cells.FontIndex := 0; - Cells.Color := Self.Color; - if FootersOnEveryPage then - begin - FooterCells.FontIndex := FFixedFontIndex; - FooterCells.Color := FixedColor; - end; - if HeadersOnEveryPage then - begin - HeaderCells.FontIndex := FFixedFontIndex; - HeaderCells.Color := FixedColor; - end; - end; - R := MakeRect(0, 0, RowWidth, 0); - - FCurrentRow := 0; - for Row := 0 to RowCount - 1 do - begin - if IsProcessedRow(Row) then - begin - R.Top := R.Bottom; - R.Bottom := R.Top + GetRowHeight(Row); - - ReportRow := GetRowClass(Row).Create(GetRowParent(AReportCells, Row)); - AddReportRow(ReportRow); - InitializeRow(ReportRow, Row); - ReportRow.BoundsRect := R; - - Item := ReportRow.GetPrevSibling; - ReportRow.Top := 0; - if Item <> nil then - ReportRow.Top := TdxReportVisualItem(Item).BoundsRect.Bottom; - - FCurrentCol := 0; - R2 := MakeRect(0, 0, 0, R.Bottom - R.Top); - for Col := 0 to ColCount - 1 do - begin - if IsProcessedCol(Col) then - begin - R2.Left := R2.Right; - R2.Right := R2.Left + ColumnWidths[Col]; - if IsProcessedCell(Col, Row) then - CreateDataItem(ReportRow, ActualColIndexes[Col], Row, R2); - end; - NextCol; - end; - AReportCells.DoProgress(MulDiv(Row, 100, EntireRowCount)); - if AbortBuilding then Break; - end; - NextRow; - end; - finally - UnprepareConstruct(AReportCells); - end; - - if not AbortBuilding then - begin - SetupBoundsRect(AReportCells.Cells); - if FootersOnEveryPage then SetupBoundsRect(AReportCells.FooterCells); - if HeadersOnEveryPage then SetupBoundsRect(AReportCells.HeaderCells); - end; - finally - AfterConstruct(AReportCells); - end; -end; - -procedure TAbstractdxGridReportLink.ConvertCoords; - - procedure ConvertDelimiters(ADelimiters: TList); - var - I, Value: Integer; - begin - for I := 0 to ADelimiters.Count - 1 do - begin - Value := Integer(ADelimiters[I]); - Value := MulDiv(Value, PixelsNumerator, PixelsDenominator); - ADelimiters[I] := TObject(Value); - end; - end; - -begin - inherited; - ConvertDelimiters(DelimitersHardVert); -end; - -function TAbstractdxGridReportLink.GetBreakPagesByHardDelimiters: Boolean; -begin - Result := UseCustomPageBreaks; -end; - -function TAbstractdxGridReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := AutoWidth and (AUpdateCodes * uaMarginsVert <> []); -end; - -function TAbstractdxGridReportLink.GetUseHardVertDelimiters: Boolean; -begin - Result := UseCustomPageBreaks; -end; - -procedure TAbstractdxGridReportLink.InternalRestoreDefaults; -begin - inherited; - AutoWidth := False; - DrawMode := gdmStrict; - Effects3D := False; - EndEllipsis := False; - EvenColor := dxDefaultColor; - FixedColor := dxDefaultFixedColor; - EvenFont := Font; - FixedFont := Font; - FixedFont.Style := [fsBold]; - FixedTransparent := False; - GridLineColor := dxDefaultGridLineColor; - IncludeFixed := True; - Multiline := False; - OnlySelected := False; - RowAutoHeight := False; - Soft3D := True; - SupportedCustomDraw := False; -end; - -function TAbstractdxGridReportLink.IsSupportedCustomDraw(AItem: TAbstractdxReportCellData): Boolean; -begin - Result := SupportedCustomDraw; -end; - -procedure TAbstractdxGridReportLink.MakeDelimiters(AReportCells: TdxReportCells; - AHorzDelimiters, AVertDelimiters: TList); -var - I, V: Integer; - ReportRow: TdxReportCell; -begin - inherited; - if ReportRowCount <> 0 then - with AReportCells do - begin - if UseHorzDelimiters then - begin - ReportRow := ReportRows[0]; - for I := 1 to ReportRow.DataItemCount - 1 do - begin - V := ReportRow.DataItems[I].AbsoluteOrigin.X; - AHorzDelimiters.Add(TObject(V)); - end; - end; - - if UseVertDelimiters then - for I := 1 to ReportRowCount - 1 do - begin - V := ReportRows[I].AbsoluteOrigin.Y; - AVertDelimiters.Add(TObject(V)); - end; - end; -end; - -procedure TAbstractdxGridReportLink.MakeHardDelimiters(AReportCells: TdxReportCells; - AVertDelimiters: TList); -begin - inherited; - if UseCustomPageBreaks then - try - DoGetCustomPageBreaks; - except - Application.HandleException(Self); - end; - dxPSUtl.dxCopyList(DelimitersHardVert, AVertDelimiters); -end; - -procedure TAbstractdxGridReportLink.DoGetCustomPageBreaks; -begin - if Assigned(FOnGetCustomPageBreaks) then FOnGetCustomPageBreaks(Self); -end; - -procedure TAbstractdxGridReportLink.DoInitializeItem(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeItem) then FOnInitializeItem(Self, ACol, ARow, ADataItem); -end; - -procedure TAbstractdxGridReportLink.AssignData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData); -begin - dxPSGridCellDataMaps[ADataItem].InitializeCellData(ACol, ARow, ADataItem, Self); - Exit; - with ADataItem do - begin - Color := GetCellColor(ACol, ARow); - ContentBkColor := GetCellContentBkColor(ACol, ARow); - ContentPattern := GetCellContentPattern(ACol, ARow); - Transparent := GetCellTransparent(ACol, ARow); - - CellSides := GetCellSides(ACol, ARow); - Data := ACol + ARow * ColCount; - EdgeMode := GetCellEdgeMode(ADataItem, ACol, ARow); - Edge3DStyle := GetCellEdge3DStyle(ADataItem, ACol, ARow); - Edge3DSoft := GetCellEdge3DSoft(ADataItem, ACol, ARow); - FontIndex := GetCellFontIndex(ACol, ARow); - end; - - if ADataItem is TdxReportCellString then - with TdxReportCellString(ADataItem) do - begin - EndEllipsis := GetEndEllipsis; - Multiline := GetCellMultiline(ACol, ARow); - if IsFixedRow(ARow) then - SortOrder := GetColSortOrder(ACol); - Text := GetCellText(ACol, ARow); - TextAlignX := GetCellTextAlignX(ACol, ARow); - TextAlignY := GetCellTextAlignY(ACol, ARow); - end; - - if ADataItem is TdxReportCellImage then - with TdxReportCellImage(ADataItem) do - begin - ImageIndex := GetCellImageIndex(ACol, ARow); - ImageLayout := GetCellImageLayout(ACol, ARow); - ImageList := GetCellImageList(ACol, ARow); - end; -end; - -procedure TAbstractdxGridReportLink.CalculateColumnAutoWidths; -var - AutoWidthObject: TcxAutoWidthObject; - I, Index: Integer; - begin - AutoWidthObject := TcxAutoWidthObject.Create(ActualColCount); - try - for I := 0 to ColCount - 1 do - if IsProcessedCol(I) then - begin - with AutoWidthObject.AddItem do - begin - Width := ColumnWidths[I]; - MinWidth := 1; - Fixed := False; - end; - end; - AutoWidthObject.AvailableWidth := AvailableSiteWidth; - AutoWidthObject.Calculate; - - Index := 0; - for I := 0 to ColCount - 1 do - if IsProcessedCol(I) then - begin - ColumnWidths[I]:= AutoWidthObject[Index].AutoWidth; - Inc(Index); - end; - finally - AutoWidthObject.Free; - end; -end; - -procedure TAbstractdxGridReportLink.CalculateColumnWidths; -var - I: Integer; -begin - SetLength(FColumnWidths, ColCount); - for I := 0 to ColCount - 1 do - ColumnWidths[I] := GetSourceColWidth(ActualColIndexes[I]); - if AutoWidth and CanCalculateColumnAutoWidths then - CalculateColumnAutoWidths; -end; - -procedure TAbstractdxGridReportLink.CalculateRowHeights(AReportCells: TdxReportCells); - - function CalculateRowHeight(ACol, ARow: Integer): Integer; - var - ActualColIndex: Integer; - R: TRect; - begin - ActualColIndex := ActualColIndexes[ACol]; - R := MakeRect(0, 0, ColumnWidths[ACol], 5); - Result := Renderer.CalcTextRect(ScreenDC, GetCellText(ActualColIndex, ARow), R, - GetCellMultiline(ActualColIndex, ARow), GetCellFont(ActualColIndex, ARow)); - end; - -var - PrevFont: HFONT; - MinFixedRowHeight, MinRowHeight, V, H, Col, Row: Integer; -begin - PrevFont := GetCurrentObject(ScreenDC, OBJ_FONT); - - MinRowHeight := GetMinRowHeight(ScreenDC, Font); - MinFixedRowHeight := GetMinRowHeight(ScreenDC, FixedFont); - - SetLength(FRowHeights, RowCount); - for Row := 0 to RowCount - 1 do - begin - if not IsProcessedRow(Row) then - begin - RowHeights[Row] := 0; - Continue; - end; - V := GetSourceRowHeight(Row); - if RowAutoHeight and (V <> 0) then - begin - V := 0; - for Col := 0 to ColCount - 1 do - if IsProcessedCol(Col) then - begin - H := CalculateRowHeight(Col, Row); - if V < H then V := H; - end; - end; - if V <> 0 then - begin - if IsFixedRow(Row) or (FixedColCount > 0) then - begin - if V < MinFixedRowHeight then V := MinFixedRowHeight - end - else - if V < MinRowHeight then V := MinRowHeight; - end; - RowHeights[Row] := V; - end; - SelectObject(ScreenDC, PrevFont); -end; - -function TAbstractdxGridReportLink.CalculateRowWidth: Integer; -var - Col: Integer; -begin - Result := 0; - for Col := 0 to ColCount - 1 do - if IsProcessedCol(Col) then - Inc(Result, ColumnWidths[Col]); -end; - -function TAbstractdxGridReportLink.CanCalculateColumnAutoWidths: Boolean; -begin - Result := not IsAggregated or - {$IFDEF DELPHI6}SysUtils.{$ELSE}cxClasses.{$ENDIF}Supports(Controller, IdxReportLinkController); -end; - -function TAbstractdxGridReportLink.CreateDataItem(AParent: TdxReportCell; - ACol, ARow: Integer; const ABounds: TRect): TAbstractdxReportCellData; -var - DataClass: TdxReportCellDataClass; -begin - DataClass := GetDataItemClass(ACol, ARow); - if DataClass <> nil then - begin - Result := DataClass.Create(AParent); - Result.BoundsRect := ABounds; - AssignData(ACol, ARow, Result); - DoInitializeItem(ACol, ARow, Result); - end - else - Result := nil; -end; - -function TAbstractdxGridReportLink.GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; -begin - Result := TdxReportCellString; -end; - -function TAbstractdxGridReportLink.GetRowClass(ARow: Integer): TdxReportCellClass; -begin - Result := TdxReportCell; -end; - -function TAbstractdxGridReportLink.GetRowParent(AReportCells: TdxReportCells; ARow: Integer): TdxReportCell; -begin - if HeadersOnEveryPage and IsHeaderRow(ARow) then - Result := AReportCells.HeaderCells - else - if FootersOnEveryPage and IsFooterRow(ARow) then - Result := AReportCells.FooterCells - else - Result := AReportCells.Cells; -end; - -procedure TAbstractdxGridReportLink.InitializeRow(AReportRow: TdxReportCell; - ARow: Integer); -begin - AReportRow.Data := ARow; - AReportRow.Transparent := True; - AReportRow.CellSides := []; -end; - -function TAbstractdxGridReportLink.GetColCount: Integer; -begin - Result := 0; -end; - -function TAbstractdxGridReportLink.GetFixedColCount: Integer; -begin - Result := 0; -end; - -function TAbstractdxGridReportLink.GetFixedRowCount: Integer; -begin - Result := 0; -end; - -function TAbstractdxGridReportLink.GetRowCount: Integer; -begin - Result := 0; -end; - -function TAbstractdxGridReportLink.GetActualColCount: Integer; -begin - if HasSelection then - Result := SelectedColCount - else - Result := ColCount; -end; - -function TAbstractdxGridReportLink.GetActualColIndex(Col: Integer): Integer; -begin - Result := Col; -end; - -function TAbstractdxGridReportLink.GetActualRowCount: Integer; -begin - if HasSelection then - Result := SelectedRowCount - else - Result := RowCount; -end; - -function TAbstractdxGridReportLink.GetCellEdge3DSoft(AItem: TAbstractdxReportCellData; - ACol, ARow: Integer): Boolean; -begin - if DrawMode = gdmBorrowSource then - Result := GetSourceCellEdge3DSoft(ACol, ARow) - else - Result := Soft3D; -end; - -function TAbstractdxGridReportLink.GetCellEdge3DStyle(AItem: TAbstractdxReportCellData; - ACol, ARow: Integer): TdxCellEdgeStyle; -begin - if DrawMode = gdmBorrowSource then - Result := GetSourceCellEdge3DStyle(ACol, ARow) - else - Result := cesRaised; -end; - -function TAbstractdxGridReportLink.GetCellEdgeMode(AItem: TAbstractdxReportCellData; - ACol, ARow: Integer): TdxCellEdgeMode; -begin - if DrawMode = gdmBorrowSource then - Result := GetSourceCellEdgeMode(ACol, ARow) - else - if IsFixedCell(ACol, ARow) and Effects3D then - Result := cem3DEffects - else - Result := cemPattern; -end; - -function TAbstractdxGridReportLink.GetEndEllipsis: Boolean; -begin - Result := FEndEllipsis; -end; - -function TAbstractdxGridReportLink.GetInternalRowHeight(Index: Integer): Integer; -begin - Result := FRowHeights[Index]; -end; - -function TAbstractdxGridReportLink.GetMinRowHeight(DC: HDC; AFont: TFont): Integer; -begin - Result := Renderer.CalcTextPatternHeight(DC, AFont); -end; - -function TAbstractdxGridReportLink.GetMultiline: Boolean; -begin - Result := FMultiline; -end; - -procedure TAbstractdxGridReportLink.GetSelectedRange(ABeginCol, AEndCol, - ABeginRow, AEndRow: PInteger); -var - BeginCol, EndCol, BeginRow, EndRow: Integer; -begin - GetSelectedRange(BeginCol, EndCol, BeginRow, EndRow); - if ABeginCol <> nil then - ABeginCol^ := BeginCol; - - if AEndCol <> nil then - AEndCol^ := EndCol; - - if ABeginRow <> nil then - ABeginRow^ := BeginRow; - - if AEndRow <> nil then - AEndRow^ := EndRow; -end; - -procedure TAbstractdxGridReportLink.GetSelectedRange(out ABeginCol, AEndCol, ABeginRow, AEndRow: Integer); -begin - with SelectionRect do - begin - ABeginCol := Left; - AEndCol := Right; - ABeginRow := Top; - AEndRow := Bottom; - end; -end; - -function TAbstractdxGridReportLink.GetSelectedColCount: Integer; -var - BeginCol, EndCol, BeginRow, EndRow: Integer; -begin - GetSelectedRange(BeginCol, EndCol, BeginRow, EndRow); - Result := EndCol - BeginCol + 1; - if IncludeFixed then Inc(Result, FixedColCount); -end; - -function TAbstractdxGridReportLink.GetSelectedRowCount: Integer; -var - BeginCol, EndCol, BeginRow, EndRow: Integer; -begin - GetSelectedRange(BeginCol, EndCol, BeginRow, EndRow); - Result := EndRow - BeginRow + 1; - if IncludeFixed then Inc(Result, FixedRowCount); -end; - -function TAbstractdxGridReportLink.GetSelectionRect: TRect; -begin - Result := dxPSGlbl.NullRect; -end; - -function TAbstractdxGridReportLink.GetSourceCellContentBkColor(ACol, ARow: Integer): TColor; -begin - Result := GetSourceCellColor(ACol, ARow); -end; - -function TAbstractdxGridReportLink.GetSourceCellColor(ACol, ARow: Integer): TColor; -begin - if IsFixedCell(ACol, ARow) then - Result := FixedColor - else - Result := Color; -end; - -function TAbstractdxGridReportLink.GetSourceCellContentPattern(ACol, ARow: Integer): TdxPSFillPatternClass; -begin - Result := TdxPSSolidFillPattern; -end; - -function TAbstractdxGridReportLink.GetSourceCellEdge3DSoft(ACol, ARow: Integer): Boolean; -begin - Result := False; -end; - -function TAbstractdxGridReportLink.GetSourceCellEdge3DStyle(ACol, ARow: Integer): TdxCellEdgeStyle; -begin - if IsFixedCell(ACol, ARow) then - Result := cesRaised - else - Result := cesSunken; -end; - -function TAbstractdxGridReportLink.GetSourceCellEdgeMode(ACol, ARow: Integer): TdxCellEdgeMode; -begin - Result := cemPattern; -end; - -function TAbstractdxGridReportLink.GetSourceCellFont(ACol, ARow: Integer): TFont; -begin - if IsFixedCell(ACol, ARow) then - Result := FixedFont - else - Result := Font; -end; - -function TAbstractdxGridReportLink.GetSourceCellFontIndex(ACol, ARow: Integer): Integer; -begin - if IsFixedCell(ACol, ARow) then - Result := FFixedFontIndex - else - Result := FFontIndex; -end; - -function TAbstractdxGridReportLink.GetSourceCellMultiline(ACol, ARow: Integer): Boolean; -begin - Result := False; -end; - -function TAbstractdxGridReportLink.GetSourceCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; -begin - Result := taLeft; -end; - -function TAbstractdxGridReportLink.GetSourceCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; -begin - Result := taCenterY; -end; - -function TAbstractdxGridReportLink.GetSourceCellTransparent(ACol, ARow: Integer): Boolean; -begin - Result := True; -end; - -function TAbstractdxGridReportLink.GetSourceColWidth(ACol: Integer): Integer; -begin - Result := 0; -end; - -function TAbstractdxGridReportLink.GetSourceRowHeight(ARow: Integer): Integer; -begin - Result := 0; -end; - -function TAbstractdxGridReportLink.HasColumnHeaderImage(ACol: Integer): Boolean; -begin - Result := False; -end; - -function TAbstractdxGridReportLink.HasSelection: Boolean; -var - BeginCol, EndCol, BeginRow, EndRow: Integer; -begin - if OnlySelected then - begin - GetSelectedRange(BeginCol, EndCol, BeginRow, EndRow); - Result := (EndCol >= BeginCol) and (EndRow >= BeginRow); - end - else - Result := False; -end; - -function TAbstractdxGridReportLink.HasSelectionInCol(ACol: Integer): Boolean; -var - BeginCol, EndCol, BeginRow, EndRow: Integer; -begin - GetSelectedRange(BeginCol, EndCol, BeginRow, EndRow); - Result := ((ACol >= BeginCol) and (ACol <= EndCol)) or (IncludeFixed and IsFixedCol(ACol)); -end; - -function TAbstractdxGridReportLink.HasSelectionInRow(ARow: Integer): Boolean; -var - BeginCol, EndCol, BeginRow, EndRow: Integer; -begin - GetSelectedRange(BeginCol, EndCol, BeginRow, EndRow); - Result := ((ARow >= BeginRow) and (ARow <= EndRow)) or (IncludeFixed and IsFixedRow(ARow)); -end; - -function TAbstractdxGridReportLink.IsDrawBorder: Boolean; -begin - Result := True; -end; - -function TAbstractdxGridReportLink.IsDrawHorzLines: Boolean; -begin - Result := True; -end; - -function TAbstractdxGridReportLink.IsDrawVertLines: Boolean; -begin - Result := True; -end; - -function TAbstractdxGridReportLink.IsDrawFixedHorzLines: Boolean; -begin - Result := True; -end; - -function TAbstractdxGridReportLink.IsDrawFixedVertLines: Boolean; -begin - Result := True; -end; - -function TAbstractdxGridReportLink.IsFixedCell(ACol, ARow: Integer): Boolean; -begin - Result := IsFixedCol(ACol) or IsFixedRow(ARow); -end; - -function TAbstractdxGridReportLink.IsFixedCol(ACol: Integer): Boolean; -begin - Result := ACol < FixedColCount; -end; - -function TAbstractdxGridReportLink.IsFixedRow(ARow: Integer): Boolean; -begin - Result := ARow < FixedRowCount; -end; - -function TAbstractdxGridReportLink.IsFooterRow(ARow: Integer): Boolean; -begin - Result := False; -end; - -function TAbstractdxGridReportLink.IsHeaderRow(ARow: Integer): Boolean; -begin - Result := IsFixedRow(ARow); -end; - -function TAbstractdxGridReportLink.IsProcessedCell(ACol, ARow: Integer): Boolean; -begin - Result := True; -end; - -function TAbstractdxGridReportLink.IsProcessedCol(ACol: Integer): Boolean; -begin - Result := not HasSelection or HasSelectionInCol(ACol); -end; - -function TAbstractdxGridReportLink.IsProcessedRow(ARow: Integer): Boolean; -begin - Result := not HasSelection or HasSelectionInRow(ARow); -end; - -function TAbstractdxGridReportLink.IsSelectedCell(ACol, ARow: Integer): Boolean; -var - BeginCol, EndCol, BeginRow, EndRow: Integer; -begin - GetSelectedRange(BeginCol, EndCol, BeginRow, EndRow); - - Result := ((ACol >= BeginCol) and (ACol <= EndCol) and (ARow >= BeginRow) and (ARow <= EndRow)); - if not Result and IncludeFixed then - Result := ((ACol >= BeginCol) and (ACol <= EndCol) and IsFixedCol(ACol)) or - ((ARow >= BeginRow) and (ARow <= EndRow) and IsFixedRow(ARow)); -end; - -function TAbstractdxGridReportLink.IsSelectedRow(ARow: Integer): Boolean; -begin - Result := False; -end; - -procedure TAbstractdxGridReportLink.NextCol; -begin - Inc(FCurrentCol); -end; - -procedure TAbstractdxGridReportLink.NextRow; -begin - Inc(FCurrentRow); -end; - -procedure TAbstractdxGridReportLink.SetDrawMode(Value: TdxGridDrawMode); -begin - if FDrawMode <> Value then - begin - FDrawMode := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetupBoundsRect(ACell: TdxReportCell); -begin - with ACell do - if CellCount > 0 then - BoundsRect := MakeRect(0, 0, LastCell.BoundsRect.Right, LastCell.BoundsRect.Bottom); -end; - -procedure TAbstractdxGridReportLink.AddReportRow(ARow: TdxReportCell); -begin - FReportRows.Add(ARow); -end; - -procedure TAbstractdxGridReportLink.AddVerticalHardDelimiter(ADelimiter: TdxReportCell); -begin - AddVerticalHardDelimiter(ADelimiter.AbsoluteRect.Top); -end; - -procedure TAbstractdxGridReportLink.AddVerticalHardDelimiter(ADelimiter: Integer); -begin - FDelimitersHardVert.Add(TObject(ADelimiter)); -end; - -procedure TAbstractdxGridReportLink.AfterConstruct(AReportCells: TdxReportCells); -begin - ReleaseDC(0, FScreenDC); -end; - -procedure TAbstractdxGridReportLink.BeforeConstruct(AReportCells: TdxReportCells); -begin - FScreenDC := GetDC(0); -end; - -procedure TAbstractdxGridReportLink.PrepareConstruct(AReportCells: TdxReportCells); -begin - FRowWidth := -1; - FDelimitersHardVert.Clear; - SetLength(FColumnWidths, 0); - CalculateColumnWidths; - FReportRows.Clear; - CalculateRowHeights(AReportCells); - FFixedFontIndex := AddFontToPool(FixedFont); - FEvenFontIndex := AddFontToPool(EvenFont); -end; - -procedure TAbstractdxGridReportLink.UnprepareConstruct(AReportCells: TdxReportCells); -begin -end; - -procedure TAbstractdxGridReportLink.InitializeDefaultFixedFont(AFont: TFont); -begin - AFont.Assign(Font); - AFont.Style := AFont.Style + [fsBold]; -end; - -function TAbstractdxGridReportLink.IsFixedFontStored: Boolean; -begin - Result := not dxPSUtl.dxAreFontsEqual(FixedFont, DefaultFixedFont); -end; - -procedure TAbstractdxGridReportLink.GetCellColRow(AItem: TdxReportVisualItem; - var ACol, ARow: Integer); -begin - ARow := AItem.Data div ColCount; - ACol := AItem.Data - ARow * ColCount; -end; - -function TAbstractdxGridReportLink.GetCellColor(ACol, ARow: Integer): TColor; -begin - case DrawMode of - gdmStrict: - if IsFixedCell(ACol, ARow) then - Result := FixedColor - else - Result := Color; - - gdmOddEven: - if IsFixedCell(ACol, ARow) then - Result := FixedColor - else - if Odd(ARow) then - Result := Color - else - Result := EvenColor; - - gdmChess: - if IsFixedCell(ACol, ARow) then - Result := FixedColor - else - if not Odd((ACol - FixedColCount) + (ARow - FixedRowCount)) then - Result := Color - else - Result := EvenColor; - else { gdmBorrowSource } - Result := GetSourceCellColor(ACol, ARow); - end; -end; - -function TAbstractdxGridReportLink.GetCellContentBkColor(ACol, ARow: Integer): TColor; -begin - if DrawMode = gdmBorrowSource then - Result := GetSourceCellContentBkColor(ACol, ARow) - else - Result := GetCellColor(ACol, ARow); -end; - -function TAbstractdxGridReportLink.GetCellContentPattern(ACol, ARow: Integer): TdxPSFillPatternClass; -begin - if DrawMode = gdmBorrowSource then - Result := GetSourceCellContentPattern(ACol, ARow) - else - Result := TdxPSSolidFillPattern; -end; - -function TAbstractdxGridReportLink.GetCellTransparent(ACol, ARow: Integer): Boolean; -begin - if DrawMode = gdmBorrowSource then - Result := GetSourceCellTransparent(ACol, ARow) - else - if IsFixedCell(ACol, ARow) then - Result := FixedTransparent - else - Result := Self.Transparent; -end; - -function TAbstractdxGridReportLink.GetCellFont(ACol, ARow: Integer): TFont; -begin - case DrawMode of - gdmStrict: - if IsFixedCell(ACol, ARow) then - Result := FixedFont - else - Result := Font; - gdmOddEven: - if IsFixedCell(ACol, ARow) then - Result := FixedFont - else - if Odd(ARow) then - Result := Font - else - Result := EvenFont; - gdmChess: - if IsFixedCell(ACol, ARow) then - Result := FixedFont - else - if not Odd((ACol - FixedColCount) + (ARow - FixedRowCount)) then - Result := Font - else - Result := EvenFont; - else {gdmBorrowSource} - Result := GetSourceCellFont(ACol, ARow); - end; -end; - -function TAbstractdxGridReportLink.GetCellFontIndex(ACol, ARow: Integer): Integer; -begin - case DrawMode of - gdmStrict: - if IsFixedCell(ACol, ARow) then - Result := FFixedFontIndex - else - Result := FFontIndex; - gdmOddEven: - if IsFixedCell(ACol, ARow) then - Result := FFixedFontIndex - else - if Odd(ARow) then - Result := FFontIndex - else - Result := FEvenFontIndex; - gdmChess: - if IsFixedCell(ACol, ARow) then - Result := FFixedFontIndex - else - if not Odd((ACol - FixedColCount) + (ARow - FixedRowCount)) then - Result := FFontIndex - else - Result := FEvenFontIndex; - else {gdmBorrowSource} - Result := GetSourceCellFontIndex(ACol, ARow); - end; -end; - -function TAbstractdxGridReportLink.GetCellHasImage(ACol, ARow: Integer): Boolean; -begin - Result := False; -end; - -function TAbstractdxGridReportLink.GetCellImage(ACol, ARow: Integer): TGraphic; -begin - Result := nil; -end; - -function TAbstractdxGridReportLink.GetCellImageIndex(ACol, ARow: Integer): Integer; -begin - Result := -1; -end; - -function TAbstractdxGridReportLink.GetCellImageLayout(ACol, ARow: Integer): TdxImageLayout; -begin - Result := ilImageCenterLeft; -end; - -function TAbstractdxGridReportLink.GetCellImageList(ACol, ARow: Integer): TCustomImageList; -begin - Result := nil; -end; - -function TAbstractdxGridReportLink.GetCellImageMakeSpaceForEmpty(ACol, ARow: Integer): Boolean; -begin - Result := True; -end; - -function TAbstractdxGridReportLink.GetCellImageTransparent(ACol, ARow: Integer): Boolean; -begin - Result := True; -end; - -function TAbstractdxGridReportLink.GetCellMultiline(ACol, ARow: Integer): Boolean; -begin - if DrawMode = gdmBorrowSource then - Result := GetSourceCellMultiline(ACol, ARow) - else - Result := Multiline or RowAutoHeight; -end; - -function TAbstractdxGridReportLink.GetCellSides(ACol, ARow: Integer): TdxCellSides; -var - ABeginCol, AEndCol, ABeginRow, AEndRow: Integer; -begin - Result := csAll; - if not IsDrawBorder then - begin - if ACol = ActualFirstCol then Exclude(Result, csLeft); - if ACol = ActualLastCol then Exclude(Result, csRight); - if ARow = ActualFirstRow then Exclude(Result, csTop); - if ARow = ActualLastRow then Exclude(Result, csBottom); - end; - if IsFixedCell(ACol, ARow) then - begin - if not IsDrawFixedHorzLines then - begin - if ARow > 0 then Exclude(Result, csTop); - if IsFixedCol(ACol) then - begin - if ARow < ActualLastRow then - Exclude(Result, csBottom) - end - else - if ARow < FixedRowCount - Byte(IsDrawHorzLines) then - Exclude(Result, csBottom); - end; - if not IsDrawFixedVertLines then - begin - if ACol > 0 then Exclude(Result, csLeft); - if IsFixedRow(ARow) then - begin - if ACol < ActualLastCol then - Exclude(Result, csRight) - end - else - if ACol < FixedColCount - Byte(IsDrawVertLines) then - Exclude(Result, csRight); - end; - end - else - begin - GetSelectedRange(ABeginCol, AEndCol, ABeginRow, AEndRow); - if not IsDrawHorzLines then - begin - if not HasSelection then - begin - ABeginRow := FixedRowCount - 1; - if ABeginRow = -1 then ABeginRow := 0; - AEndRow := RowCount - 1; - end; - - if ARow < AEndRow then - if (ARow > ABeginRow) or (HasSelection and IncludeFixed and (FixedRowCount > 0)) then - Result := Result - [csTop, csBottom] - else - Exclude(Result, csBottom) - else - if (ARow > ABeginRow) or (HasSelection and IncludeFixed and (FixedRowCount > 0)) then - Exclude(Result, csTop); - end; - if not IsDrawVertLines then - begin - if not HasSelection then - begin - ABeginCol := FixedColCount - 1; - if ABeginCol = -1 then ABeginCol := 0; - AEndCol := ColCount - 1; - end; - - if ACol < AEndCol then - if (ACol > ABeginCol) or (HasSelection and IncludeFixed and (FixedColCount > 0)) then - Result := Result - [csLeft, csRight] - else - Exclude(Result, csRight) - else - if (ACol > ABeginCol) or (HasSelection and IncludeFixed and (FixedColCount > 0)) then - Exclude(Result, csLeft) - end; - end; -end; - -function TAbstractdxGridReportLink.GetCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; -begin - if DrawMode = gdmBorrowSource then - Result := GetSourceCellTextAlignX(ACol, ARow) - else - if IsFixedCell(ACol, ARow) then - Result := taCenterX - else - Result := taLeft; -end; - -function TAbstractdxGridReportLink.GetCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; -begin - if DrawMode = gdmBorrowSource then - Result := GetSourceCellTextAlignY(ACol, ARow) - else - if IsFixedCell(ACol, ARow) then - Result := taBottom //taCenterY - else - Result := taCenterY; -end; - -function TAbstractdxGridReportLink.GetColSortOrder(ACol: Integer): TdxCellSortOrder; -begin - Result := csoNone; -end; - -function TAbstractdxGridReportLink.GetActualFirstCol: Integer; -var - EndCol, BeginRow, EndRow: Integer; -begin - if not HasSelection or IncludeFixed then - Result := 0 - else - GetSelectedRange(Result, EndCol, BeginRow, EndRow); -end; - -function TAbstractdxGridReportLink.GetActualFirstRow: Integer; -var - BeginCol, EndCol, EndRow: Integer; -begin - if not HasSelection or IncludeFixed then - Result := 0 - else - GetSelectedRange(BeginCol, EndCol, Result, EndRow); -end; - -function TAbstractdxGridReportLink.GetActualLastCol: Integer; -var - BeginCol, BeginRow, EndRow: Integer; -begin - if not HasSelection then - Result := ColCount - 1 - else - GetSelectedRange(BeginCol, Result, BeginRow, EndRow); -end; - -function TAbstractdxGridReportLink.GetActualLastRow: Integer; -var - BeginCol, EndCol, BeginRow: Integer; -begin - if not HasSelection then - Result := RowCount - 1 - else - GetSelectedRange(BeginCol, EndCol, BeginRow, Result); -end; - -function TAbstractdxGridReportLink.GetAvailableSiteHeight: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if IsAggregated and SysUtils.Supports(TObject(Controller), IdxReportLinkController, ControllerIntf) then - with ControllerIntf.GetControlSiteBounds(TControl(Component)) do - Result := Bottom - Top - 1 - else - with RealPrinterPage.PaintRectPixels do - Result := Bottom - Top - 1; -end; - -function TAbstractdxGridReportLink.GetAvailableSiteWidth: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if IsAggregated and SysUtils.Supports(TObject(Controller), IdxReportLinkController, ControllerIntf) then - with ControllerIntf.GetControlSiteBounds(TControl(Component)) do - Result := Right - Left - 1 - else - with RealPrinterPage.PaintRectPixels do - Result := Right - Left - 1; -end; - -function TAbstractdxGridReportLink.GetColumnWidth(Index: Integer): Integer; -begin - Result := FColumnWidths[Index]; -end; - -function TAbstractdxGridReportLink.GetOddColor: TColor; -begin - Result := Color; -end; - -function TAbstractdxGridReportLink.GetOddFont: TFont; -begin - Result := inherited Font; -end; - -function TAbstractdxGridReportLink.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := TdxReportCell(FReportRows[Index]); -end; - -function TAbstractdxGridReportLink.GetReportRowByRow(Row: Integer): TdxReportCell; -var - I: Integer; -begin - for I := 0 to ReportRowCount - 1 do - begin - Result := ReportRows[I]; - if Result.Data = Row then Exit; - end; - Result := nil; -end; - -function TAbstractdxGridReportLink.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TAbstractdxGridReportLink.GetRowHeight(ARow: Integer): Integer; -begin - Result := FRowHeights[ARow]; -end; - -function TAbstractdxGridReportLink.GetRowWidth: Integer; -begin - if FRowWidth = -1 then - FRowWidth := CalculateRowWidth; - Result := FRowWidth; -end; - -procedure TAbstractdxGridReportLink.SetAutoWidth(Value: Boolean); -begin - if FAutoWidth <> Value then - begin - FAutoWidth := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetColumnWidth(Index: Integer; Value: Integer); -begin - FColumnWidths[Index] := Value; -end; - -procedure TAbstractdxGridReportLink.SetEffects3D(Value: Boolean); -begin - if FEffects3D <> Value then - begin - FEffects3D := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetEndEllipsis(Value: Boolean); -begin - if FEndEllipsis <> Value then - begin - FEndEllipsis := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetEvenColor(Value: TColor); -begin - if FEvenColor <> Value then - begin - FEvenColor := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetEvenFont(Value: TFont); -begin - FEvenFont.Assign(Value) -end; - -procedure TAbstractdxGridReportLink.SetFixedColor(Value: TColor); -begin - if FFixedColor <> Value then - begin - FFixedColor := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetFixedFont(Value: TFont); -begin - FFixedFont.Assign(Value) -end; - -procedure TAbstractdxGridReportLink.SetFixedTransparent(Value: Boolean); -begin - if FFixedTransparent <> Value then - begin - FFixedTransparent := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetGridLineColor(Value: TColor); -begin - if FGridLineColor <> Value then - begin - FGridLineColor := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetIncludeFixed(Value: Boolean); -begin - if FIncludeFixed <> Value then - begin - FIncludeFixed := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetMultiline(Value: Boolean); -begin - if FMultiline <> Value then - begin - FMultiline := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetOddColor(Value: TColor); -begin - inherited Color := Value; -end; - -procedure TAbstractdxGridReportLink.SetOddFont(Value: TFont); -begin - inherited Font := Value; -end; - -procedure TAbstractdxGridReportLink.SetOnlySelected(Value: Boolean); -begin - if FOnlySelected <> Value then - begin - FOnlySelected := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetRowAutoHeight(Value: Boolean); -begin - if FRowAutoHeight <> Value then - begin - FRowAutoHeight := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetRowHeight(Index: Integer; Value: Integer); -begin - FRowHeights[Index] := Value; -end; - -procedure TAbstractdxGridReportLink.SetSoft3D(Value: Boolean); -begin - if Soft3D <> Value then - begin - FSoft3D := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetSupportedCustomDraw(Value: Boolean); -begin - if FSupportedCustomDraw <> Value then - begin - FSupportedCustomDraw := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxGridReportLink.SetUseCustomPageBreaks(Value: Boolean); -begin - if FUseCustomPageBreaks <> Value then - begin - FUseCustomPageBreaks := Value; - LinkModified(True); - end; -end; - -procedure RegisterAssistants; -begin - TdxPSCustomGridCellDataMap.Register; - TdxPSTextGridCellDataMap.Register; - TdxPSImageGridCellDataMap.Register; -end; - -procedure UnregisterAssistants; -begin - TdxPSImageGridCellDataMap.Unregister; - TdxPSTextGridCellDataMap.Unregister; - TdxPSCustomGridCellDataMap.Unregister; - TdxPSGridCellDataMaps.ReleaseInstance; -end; - -initialization - RegisterAssistants; - -finalization - UnregisterAssistants; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSCPDsg.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSCPDsg.dfm deleted file mode 100644 index ff7d55b8..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSCPDsg.dfm +++ /dev/null @@ -1,627 +0,0 @@ -object dxfmCPDesigner: TdxfmCPDesigner - Left = 519 - Top = 331 - ActiveControl = btnAdd - BorderStyle = bsDialog - Caption = 'Component Printer Designer' - ClientHeight = 289 - ClientWidth = 454 - Color = clBtnFace - Constraints.MinHeight = 316 - Constraints.MinWidth = 462 - KeyPreview = True - OldCreateOrder = False - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - OnKeyDown = FormKeyDown - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnClose: TButton - Left = 271 - Top = 261 - Width = 86 - Height = 23 - Caption = 'Close' - ModalResult = 1 - TabOrder = 0 - end - object btnHelp: TButton - Left = 363 - Top = 261 - Width = 86 - Height = 23 - Caption = '&Help' - TabOrder = 1 - end - object pcItems: TPageControl - Left = 5 - Top = 7 - Width = 444 - Height = 247 - ActivePage = tbsItems - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 2 - object tbsItems: TTabSheet - Caption = 'Items' - OnResize = tbsItemsResize - object lvItems: TListView - Left = 0 - Top = 0 - Width = 307 - Height = 219 - Align = alClient - Columns = <> - ColumnClick = False - MultiSelect = True - RowSelect = True - PopupMenu = pmItems - TabOrder = 0 - ViewStyle = vsReport - OnChange = lvItemsChange - OnDblClick = lvItemsDblClick - OnEdited = lvItemsEdited - OnEditing = lvItemsEditing - end - object pnlButtons: TPanel - Left = 307 - Top = 0 - Width = 129 - Height = 219 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btnDesign: TButton - Left = 6 - Top = 103 - Width = 120 - Height = 23 - Caption = 'Desi&gn...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = DesignClick - end - object btnAdd: TButton - Left = 6 - Top = 3 - Width = 120 - Height = 23 - Caption = '&Add...' - TabOrder = 0 - OnClick = AddClick - end - object btnDelete: TButton - Left = 6 - Top = 63 - Width = 120 - Height = 23 - Caption = '&Delete...' - TabOrder = 2 - OnClick = DeleteClick - end - object btnPageSetup: TButton - Left = 6 - Top = 133 - Width = 120 - Height = 23 - Caption = 'Pa&ge Setup...' - TabOrder = 4 - OnClick = PageSetupClick - end - object btnPrintPreview: TButton - Left = 6 - Top = 163 - Width = 120 - Height = 23 - Caption = 'Pre&view...' - TabOrder = 5 - OnClick = PrintPreviewClick - end - object btnPrint: TButton - Left = 6 - Top = 193 - Width = 120 - Height = 23 - Caption = '&Print...' - TabOrder = 6 - OnClick = PrintClick - end - object btnAddComposition: TButton - Left = 6 - Top = 33 - Width = 120 - Height = 23 - Caption = 'Add Composition' - TabOrder = 1 - OnClick = AddCompositionClick - end - end - object pnlNoItems: TPanel - Left = 12 - Top = 83 - Width = 289 - Height = 22 - BevelOuter = bvNone - Caption = 'There are no Items to display' - Color = clWindow - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnShadow - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - TabOrder = 2 - end - end - end - object pmItems: TPopupMenu - Images = ilItems - OnPopup = pmItemsPopup - Left = 20 - Top = 198 - object miAdd: TMenuItem - Caption = '&Add...' - ImageIndex = 1 - ShortCut = 45 - OnClick = AddClick - end - object miAddComposition: TMenuItem - Caption = 'Add Composition' - ImageIndex = 6 - OnClick = AddCompositionClick - end - object miDelete: TMenuItem - Caption = '&Delete' - ImageIndex = 2 - ShortCut = 46 - OnClick = DeleteClick - end - object miRename: TMenuItem - Caption = '&Rename' - ShortCut = 113 - OnClick = RenameClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miDesign: TMenuItem - Caption = 'Desi&gn...' - Default = True - ImageIndex = 0 - ShortCut = 16397 - OnClick = DesignClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miPageSetup: TMenuItem - Caption = 'Pa&ge Setup...' - ImageIndex = 3 - OnClick = PageSetupClick - end - object miPrintPreview: TMenuItem - Caption = 'Pre&view...' - ImageIndex = 4 - OnClick = PrintPreviewClick - end - object miPrint: TMenuItem - Caption = '&Print...' - ImageIndex = 5 - ShortCut = 16464 - OnClick = PrintClick - end - end - object ilItems: TImageList - Left = 48 - Top = 198 - Bitmap = { - 494C010107000A00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0000000 - 0000C0C0C000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C0C0C0000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000C0C0C000C0C0C0008080 - 80000000000080808000000000000000000000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C00000FFFF0000FFFF0000FFFF00C0C0C000C0C0 - C00000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000080808000C0C0C000C0C0C000FFFF00008080 - 80008080800000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000808080008080800080808000C0C0C000C0C0 - C00000000000C0C0C0000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF0000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000C0C0C000C0C0C000C0C0C000C0C0C0008080 - 8000C0C0C0000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C0C0C000C0C0C00000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF0000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000C0C0C000FFFF0000C0C0C000C0C0C0008080 - 8000C0C0C00000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0000000 - 0000C0C0C00000000000C0C0C00000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000080808000FFFF0000FFFF0000C0C0C0008080 - 8000808080000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C00000000000C0C0C0000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFF - FF0000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000C0C0C000C0C0C0008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C0C0C00000000000C0C0C00000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000000000FFFFFF000000 - 0000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C0C0C000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000008000000080000000800000008000000080000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000000000008080800000000000C0C0C0000000000000000000000000000000 - 000080808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008000000080000000800000008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 000080000000800000008000000000000000000000000000000080808000C0C0 - C000C0C0C0008080800080808000808080008080800080808000808080008080 - 800000000000808080000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000008000000080000000800000008000 - 000080000000800000008080800080000000FFFFFF0080000000800000008000 - 000080000000800000008000000000000000000000000000000000000000C0C0 - C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000FFFFFF00C0C0C0008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000000000008080800080808000C0C0 - C000C0C0C000C0C0C000C0C0C000000000008080800080808000FFFFFF008080 - 800000000000808080008080800000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000808080000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000000000008080800080808000C0C0C0008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080000000800000000000000080808000C0C0C000C0C0C000FFFF - FF00808080000000000000000000000000000000000000000000C0C0C0008080 - 8000C0C0C000808080000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000808080000000000000000000FFFF - FF0080808000C0C0C000FFFFFF0000000000C0C0C000C0C0C000C0C0C0008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000000000000000000000000000C0C0 - C0000000000080808000C0C0C00000000000C0C0C000C0C0C000C0C0C0008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000000000000000000000000000C0C0 - C000FFFFFF00000000008080800080808000C0C0C000C0C0C000C0C0C0008080 - 800000000000808080000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000000000000000000080808000C0C0 - C000C0C0C000C0C0C000FFFFFF00FFFFFF00FFFFFF00C0C0C000808080008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000008000000080000000808080008080 - 80008080800080808000800000000000000080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008000000080000000000000000000000000000000000000008080 - 8000000000000000000000000000C0C0C0000000000080808000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000080000000800000008000 - 0000800000008000000000000000000000000000000080000000800000008000 - 0000800000008000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C0C0C0000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFC01F0000000CC007C01F0000 - 00088003C007000000010001C007000000030001C001000000030001C0010000 - 00030000C001000000030000C001000000038000C00100000007C000C0010000 - 000FE001C0010000000FE007F0010000000FF007F0030000001FF003FC070000 - 003FF803FC0F0000007FFFFFFFFF0000FFFFFFFFFFFFFFFFFE3FFFFFFFFFFFFF - FC3FC007FFF9F83FE027C007E7FF0001C003C007C3F30001E007C007C3E70001 - 8001C007E1C700010001C007F08F00010001C007F81F00010001C007FC3F0001 - E007C007F81F0001E003C007F09F0001C007C00FC1C70101E42FC01F83E38383 - FC3FC03F8FF1FFFFFC3FFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSCPDsg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSCPDsg.pas deleted file mode 100644 index 3074006d..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSCPDsg.pas +++ /dev/null @@ -1,676 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSCPDsg; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, ExtCtrls, ComCtrls, ImgList, Menus, dxPSCore, dxPSForm; - -type - TdxfmCPDesignerOption = (doShowDescription); - TdxfmCPDesignerOptions = set of TdxfmCPDesignerOption; - - TdxfmCPDesigner = class(TCustomdxPSForm) - pmItems: TPopupMenu; - miDesign: TMenuItem; - miLine2: TMenuItem; - miAdd: TMenuItem; - miDelete: TMenuItem; - ilItems: TImageList; - btnClose: TButton; - btnHelp: TButton; - pcItems: TPageControl; - tbsItems: TTabSheet; - lvItems: TListView; - pnlButtons: TPanel; - btnDesign: TButton; - btnAdd: TButton; - btnDelete: TButton; - btnPageSetup: TButton; - btnPrintPreview: TButton; - btnPrint: TButton; - miPageSetup: TMenuItem; - miPrintPreview: TMenuItem; - miPrint: TMenuItem; - miLine1: TMenuItem; - miRename: TMenuItem; - btnAddComposition: TButton; - miAddComposition: TMenuItem; - pnlNoItems: TPanel; - procedure lvItemsChange(Sender: TObject; Item: TListItem; Change: TItemChange); - procedure AddClick(Sender: TObject); - procedure AddCompositionClick(Sender: TObject); - procedure DeleteClick(Sender: TObject); - procedure pmItemsPopup(Sender: TObject); - procedure DesignClick(Sender: TObject); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure lvItemsEdited(Sender: TObject; Item: TListItem; var S: String); - procedure lvItemsEditing(Sender: TObject; Item: TListItem; var AllowEdit: Boolean); - procedure lvItemsDblClick(Sender: TObject); - procedure PageSetupClick(Sender: TObject); - procedure PrintPreviewClick(Sender: TObject); - procedure PrintClick(Sender: TObject); - procedure RenameClick(Sender: TObject); - procedure tbsItemsResize(Sender: TObject); - procedure FormResize(Sender: TObject); - private - FComponentPrinter: TdxComponentPrinter; - FIsRefreshing: Boolean; - FListViewWndProc: TWndMethod; - FOptions: TdxfmCPDesignerOptions; - - function GetCurrentLink: TBasedxReportLink; - function GetItem(Index: Integer): TBasedxReportLink; - function GetItemCount: Integer; - function GetSelected(Index: Integer): Boolean; - function GetSelectedCount: Integer; - procedure SetCurrentLink(Value: TBasedxReportLink); - procedure SetSelected(Index: Integer; Value: Boolean); - - function CanAdd: Boolean; - function CanAddComposition: Boolean; - function CanDelete: Boolean; - function CanDesign: Boolean; - function CanPageSetup: Boolean; - function CanPrint: Boolean; - function CanPrintPreview: Boolean; - function CanRename: Boolean; - - procedure DeleteSelection; - function GetSelectedItemsAsString: string; - function HasOnlyBuiltInsAreInSelection: Boolean; - procedure Initialize; - procedure LoadStrings; - procedure RefreshColumns; - procedure RefreshList; - procedure UpdateControlsState; - - procedure ListViewWndProc(var Message: TMessage); - procedure SubClassListView; - procedure UnsubClassListView; - - procedure CMDialogChar(var Msg: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure BeforeConstruction; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - procedure Execute; - - procedure LoadFromRegistry(const APath: string); override; - procedure SaveToRegistry(const APath: string); override; - - property ComponentPrinter: TdxComponentPrinter read FComponentPrinter write FComponentPrinter; - property CurrentLink: TBasedxReportLink read GetCurrentLink write SetCurrentLink; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TBasedxReportLink read GetItem; - property Selected[Index: Integer]: Boolean read GetSelected write SetSelected; - property SelectedCount: Integer read GetSelectedCount; - end; - - PdxCPDesignerDlgData = ^TdxCPDesignerDlgData; - TdxCPDesignerDlgData = record - ComponentPrinter: TdxComponentPrinter; - Options: TdxfmCPDesignerOptions; - end; - -procedure dxShowCPDesignerDlg(const AData: TdxCPDesignerDlgData); - -implementation - -{$R *.DFM} - -uses - Math, CommCtrl, cxClasses, dxPSGlbl, dxPSUtl, dxPSRes, dxPSPopupMan, - dxPSfmLnkAdd, dxPSCompsProvider; - -procedure dxShowCPDesignerDlg(const AData: TdxCPDesignerDlgData); -var - Dialog: TdxfmCPDesigner; -begin - if AData.ComponentPrinter = nil then Exit; - - Dialog := TdxfmCPDesigner.Create(nil); - try - Dialog.ComponentPrinter := AData.ComponentPrinter; - Dialog.FOptions := AData.Options; - Dialog.Execute; - finally - Dialog.Free; - end; -end; - -{ TdxfmCPDesigner } - -procedure TdxfmCPDesigner.FormResize(Sender: TObject); -const - BtnOffsetY = 6; -var - BtnOffsetX, RightOrigin, TopOrigin: Integer; -begin - BtnOffsetX := pcItems.Left; - RightOrigin := BtnOffsetX + pcItems.Width; - TopOrigin := pcItems.Top + pcItems.Height + BtnOffsetY; - - dxPSUtl.PlaceButtons([btnHelp, btnClose], BtnOffsetX, RightOrigin, TopOrigin); -end; - -procedure TdxfmCPDesigner.tbsItemsResize(Sender: TObject); -var - R: TRect; -begin - R := lvItems.ClientRect; - InflateRect(R, -3, -3); - with R do - begin - Top := (Bottom - Top - pnlNoItems.Height) div 2; - Bottom := Top + pnlNoItems.Height; - end; - pnlNoItems.BoundsRect := R; -end; - -procedure TdxfmCPDesigner.lvItemsChange(Sender: TObject; Item: TListItem; - Change: TItemChange); -begin - if (Change = ctState) and not FIsRefreshing then - UpdateControlsState; -end; - -procedure TdxfmCPDesigner.pmItemsPopup(Sender: TObject); -begin - miAdd.Enabled := CanAdd; - miAddComposition.Enabled := CanAddComposition; - miDelete.Enabled := CanDelete; - miRename.Enabled := CanRename; - miDesign.Enabled := CanDesign; - miPageSetup.Enabled := CanPageSetup; - miPrint.Enabled := CanPrint; - miPrintPreview.Enabled := CanPrintPreview; -end; - -procedure TdxfmCPDesigner.AddClick(Sender: TObject); -var - Data: TdxAddReportLinkDlgData; - I: Integer; - Component: TComponent; - LinkClass: TdxReportLinkClass; - Link: TBasedxReportLink; -begin - FillChar(Data, SizeOf(TdxAddReportLinkDlgData), 0); - Data.Components := TList.Create; - try - Data.ComponentPrinter := FComponentPrinter; - Data.Options := [adoShowDesignButton, adoShowDescriptionColumn, adoAllowMultiSelect, adoShowCaptionEdit]; - Data.ReportLinkCaption := cxGetResourceString(@sdxNewReport); - - if dxShowAddComponentsDlg(Data) then - for I := 0 to Data.Components.Count - 1 do - begin - Component := TComponent(Data.Components[I]); - LinkClass := dxPSLinkClassByCompClass(TComponentClass(Component.ClassType)); - if LinkClass <> nil then - begin - Link := ComponentPrinter.AddLink(Component); - Link.Caption := Data.ReportLinkCaption; - Link.Description := Data.ReportLinkDescription; - if Data.Components.Count = 1 then - Link.Name := Data.ReportLinkName; - RefreshList; - CurrentLink := Link; - if Data.DesignBtnPressed then - ComponentPrinter.DesignReport(Link); - end; - end; - finally - Data.Components.Free; - end; -end; - -procedure TdxfmCPDesigner.AddCompositionClick(Sender: TObject); -var - Link: TBasedxReportLink; -begin - Link := ComponentPrinter.AddEmptyLink(TdxCompositionReportLink); - Link.Caption := cxGetResourceString(@sdxNewCompositionCaption); - RefreshList; - CurrentLink := Link; - RenameClick(nil); -end; - -procedure TdxfmCPDesigner.DeleteClick(Sender: TObject); -begin - if not lvItems.IsEditing and - MessageQuestion(Format(cxGetResourceString(@sdxConfirmDeleteItem), [GetSelectedItemsAsString])) then - DeleteSelection; -end; - -procedure TdxfmCPDesigner.RenameClick(Sender: TObject); -begin - if SelectedCount = 1 then - lvItems.Selected.EditCaption; -end; - -procedure TdxfmCPDesigner.DesignClick(Sender: TObject); -begin - if CurrentLink.DesignReport then - RefreshList - else - UpdateControlsState; -end; - -procedure TdxfmCPDesigner.PageSetupClick(Sender: TObject); -begin - CurrentLink.PageSetup; -end; - -procedure TdxfmCPDesigner.PrintPreviewClick(Sender: TObject); -begin - CurrentLink.Preview(True); -end; - -procedure TdxfmCPDesigner.PrintClick(Sender: TObject); -begin - CurrentLink.Print(True, nil); -end; - -procedure TdxfmCPDesigner.FormCloseQuery(Sender: TObject; var CanClose: Boolean); -begin - CanClose := not lvItems.IsEditing; -end; - -procedure TdxfmCPDesigner.FormKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if (Key = VK_ESCAPE) or (Key = VK_RETURN) then Close; -end; - -procedure TdxfmCPDesigner.lvItemsEditing(Sender: TObject; Item: TListItem; - var AllowEdit: Boolean); -begin - AllowEdit := not Items[Item.Index].BuiltIn; - if AllowEdit then - lvItems.PopupMenu := nil; -end; - -procedure TdxfmCPDesigner.lvItemsEdited(Sender: TObject; Item: TListItem; - var S: string); -begin - Items[Item.Index].Caption := S; -end; - -procedure TdxfmCPDesigner.lvItemsDblClick(Sender: TObject); -begin - if SelectedCount = 1 then btnDesign.Click; -end; - -constructor TdxfmCPDesigner.Create(AOwner: TComponent); -begin - inherited; - HelpContext := dxPSGlbl.dxhcAddComponentsToComponentPrinterDlg; - dxPSPopupMenuController.RegisterControl(lvItems); - SubClassListView; -end; - -destructor TdxfmCPDesigner.Destroy; -begin - UnsubClassListView; - dxPSPopupMenuController.UnregisterControl(lvItems); - inherited; -end; - -procedure TdxfmCPDesigner.Execute; -begin - Initialize; - ShowModal; -end; - -procedure TdxfmCPDesigner.LoadFromRegistry(const APath: string); -begin - inherited; - dxPSUtl.dxLoadListViewColumnsFromRegistry(lvItems, APath); -end; - -procedure TdxfmCPDesigner.SaveToRegistry(const APath: string); -begin - inherited; - dxPSUtl.dxSaveListViewColumnsToRegistry(lvItems, APath); -end; - -procedure TdxfmCPDesigner.BeforeConstruction; -begin - inherited; - Options := Options + [foSizeableDialog]; -end; - -function TdxfmCPDesigner.CanDesign: Boolean; -begin - Result := (SelectedCount = 1) and (CurrentLink <> nil) and CurrentLink.CheckToDesign; -end; - -function TdxfmCPDesigner.CanPageSetup: Boolean; -begin - Result := (SelectedCount = 1) and (CurrentLink <> nil); -end; - -function TdxfmCPDesigner.CanPrint: Boolean; -begin - Result := (SelectedCount = 1) and (CurrentLink <> nil) and CurrentLink.DataProviderPresent; -end; - -function TdxfmCPDesigner.CanPrintPreview: Boolean; -begin - Result := (SelectedCount = 1) and (CurrentLink <> nil) and CurrentLink.DataProviderPresent; -end; - -function TdxfmCPDesigner.CanRename: Boolean; -begin - Result := (SelectedCount = 1) and (CurrentLink <> nil) and not CurrentLink.BuiltIn; -end; - -procedure TdxfmCPDesigner.DeleteSelection; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - if Selected[I] and not Items[I].BuiltIn then - TObject(lvItems.Items[I].Data).Free; - RefreshList; -end; - -function TdxfmCPDesigner.GetCurrentLink: TBasedxReportLink; -begin - if SelectedCount = 1 then - Result := TBasedxReportLink(lvItems.Selected.Data) - else - Result := nil; -end; - -function TdxfmCPDesigner.GetItem(Index: Integer): TBasedxReportLink; -begin - Result := TBasedxReportLink(lvItems.Items[Index].Data); -end; - -function TdxfmCPDesigner.GetItemCount: Integer; -begin - Result := lvItems.Items.Count; -end; - -function TdxfmCPDesigner.GetSelected(Index: Integer): Boolean; -begin - Result := lvItems.Items[Index].Selected; -end; - -function TdxfmCPDesigner.GetSelectedCount: Integer; -begin - Result := lvItems.SelCount; -end; - -procedure TdxfmCPDesigner.SetCurrentLink(Value: TBasedxReportLink); -var - ListItem: TListItem; - I: Integer; -begin - ListItem := lvItems.FindData(0, Value, True, True); - if ListItem <> nil then - begin - lvItems.Items.BeginUpdate; - try - for I := 0 To ItemCount - 1 do - Selected[I] := False; - lvItems.Selected := ListItem; - finally - lvItems.Items.EndUpdate; - end; - end; -end; - -procedure TdxfmCPDesigner.SetSelected(Index: Integer; Value: Boolean); -begin - lvItems.Items[Index].Selected := Value; -end; - -function TdxfmCPDesigner.CanAdd: Boolean; -begin - Result := True; -end; - -function TdxfmCPDesigner.CanAddComposition: Boolean; -begin - Result := True; -end; - -function TdxfmCPDesigner.CanDelete: Boolean; -begin - Result := (SelectedCount <> 0) and not HasOnlyBuiltInsAreInSelection; -end; - -procedure TdxfmCPDesigner.LoadStrings; -begin - Caption := cxGetResourceString(@sdxEditReports); - - tbsItems.Caption := cxGetResourceString(@sdxItems); - pnlNoItems.Caption := cxGetResourceString(@sdxThereAreNowItemsForShow); - - btnAdd.Caption := AddEndEllipsis(cxGetResourceString(@sdxBtnAdd)); - btnAddComposition.Caption := cxGetResourceString(@sdxBtnAddComposition); - btnDelete.Caption := cxGetResourceString(@sdxBtnDelete); - btnDesign.Caption := cxGetResourceString(@sdxBtnDesign); - btnPageSetup.Caption := cxGetResourceString(@sdxBtnPageSetup); - btnPrint.Caption := cxGetResourceString(@sdxBtnPrint); - btnPrintPreview.Caption := cxGetResourceString(@sdxBtnPreview); - - btnClose.Caption := cxGetResourceString(@sdxBtnClose); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - - miAdd.Caption := AddEndEllipsis(cxGetResourceString(@sdxBtnAdd)); - miAddComposition.Caption := cxGetResourceString(@sdxBtnAddComposition); - miDelete.Caption := cxGetResourceString(@sdxBtnDelete); - miRename.Caption := cxGetResourceString(@sdxRename); - miDesign.Caption := cxGetResourceString(@sdxBtnDesign); - miPageSetup.Caption := cxGetResourceString(@sdxBtnPageSetup); - miPrint.Caption := cxGetResourceString(@sdxBtnPrint); - miPrintPreview.Caption := cxGetResourceString(@sdxBtnPreview); -end; - -function TdxfmCPDesigner.GetSelectedItemsAsString: string; -var - I: Integer; -begin - Result := ''; - for I := 0 to ItemCount - 1 do - if Selected[I] and not Items[I].BuiltIn then - begin - if Result <> '' then Result := Result + ', '; - Result := Result + '"' + lvItems.Items[I].Caption + '"'; - end; -end; - -function TdxfmCPDesigner.HasOnlyBuiltInsAreInSelection: Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to ItemCount - 1 do - if Selected[I] and not Items[I].BuiltIn then - Exit; - Result := True; -end; - -procedure TdxfmCPDesigner.Initialize; -begin - if HelpContext <> 0 then - BorderIcons := BorderIcons + [biHelp]; - btnHelp.Visible := HelpContext <> 0; - if not btnHelp.Visible then - btnClose.BoundsRect := btnHelp.BoundsRect; - - LoadStrings; - - RefreshColumns; - RefreshList; - - pnlNoItems.Parent := lvItems; - FormResize(nil); - tbsItemsResize(nil); -end; - -procedure TdxfmCPDesigner.RefreshColumns; -var - ColumnWidths: array of Integer; - I: Integer; -begin - lvItems.Columns.BeginUpdate; - try - SetLength(ColumnWidths, lvItems.Columns.Count); - for I := 0 to lvItems.Columns.Count - 1 do - ColumnWidths[I] := lvItems.Columns[I].Width; - - lvItems.Columns.Clear; - with lvItems.Columns.Add do - begin - Width := 2 * (lvItems.Width - GetSystemMetrics(SM_CXHSCROLL) - 2) div 3; - Caption := cxGetResourceString(@sdxItemName); - end; - - if doShowDescription in FOptions then - with lvItems.Columns.Add do - begin - Width := (lvItems.Width - GetSystemMetrics(SM_CXHSCROLL) - 2) div 3; - Caption := cxGetResourceString(@sdxItemDescription); - end; - - for I := 0 to MinIntValue([lvItems.Columns.Count - 1, Length(ColumnWidths) - 1]) do - lvItems.Columns[I].Width := ColumnWidths[I]; - finally - lvItems.Columns.EndUpdate; - end; -end; - -procedure TdxfmCPDesigner.RefreshList; -const - ViewStyles: array[Boolean] of TViewStyle = (vsReport, vsList); -var - Selection: TList; - I: Integer; - ReportLink: TBasedxReportLink; -begin - lvItems.Items.BeginUpdate; - FIsRefreshing := True; - try - Selection := TList.Create; - try - dxPSUtl.dxSaveListViewSelection(lvItems, Selection); - - lvItems.Items.Clear; - for I := 0 to ComponentPrinter.LinkCount - 1 do - begin - ReportLink := ComponentPrinter[I]; - with lvItems.Items.Add do - begin - Caption := ReportLink.Caption; - Data := ReportLink; - SubItems.Add(ReportLink.Description); - end; - end; - - dxPSUtl.dxRestoreListViewSelection(lvItems, Selection); - finally - Selection.Free; - end; - - lvItems.ViewStyle := ViewStyles[ItemCount = 0]; - lvItems.Enabled := ItemCount <> 0; - lvItems.HideSelection := ItemCount = 0; - if (lvItems.SelCount = 0) and (ItemCount <> 0) then - lvItems.Selected := lvItems.Items[0]; - finally - FIsRefreshing := False; - lvItems.Items.EndUpdate; - end; - UpdateControlsState; - lvItems.Refresh; -end; - -procedure TdxfmCPDesigner.UpdateControlsState; -begin - pnlNoItems.Visible := ItemCount = 0; - btnAdd.Enabled := CanAdd; - btnAddComposition.Enabled := CanAddComposition; - btnDelete.Enabled := CanDelete; - btnDesign.Enabled := CanDesign; - btnPageSetup.Enabled := CanPageSetup; - btnPrint.Enabled := CanPrint; - btnPrintPreview.Enabled := CanPrintPreview; -end; - -procedure TdxfmCPDesigner.ListViewWndProc(var Message: TMessage); -begin - FListViewWndProc(Message); - if Message.Msg = CN_NOTIFY then - if TWMNotify(Message).NMHdr^.code = LVN_ENDLABELEDIT then - lvItems.PopupMenu := pmItems; -end; - -procedure TdxfmCPDesigner.SubClassListView; -begin - lvItems.HandleNeeded; - FListViewWndProc := lvItems.WindowProc; - lvItems.WindowProc := ListViewWndProc; -end; - -procedure TdxfmCPDesigner.UnsubClassListView; -begin - lvItems.WindowProc := FListViewWndProc; -end; - -procedure TdxfmCPDesigner.CMDialogChar(var Msg: TCMDialogChar); -begin - inherited; - if IsAccel(Msg.CharCode, tbsItems.Caption) then - begin - Msg.Result := 1; - if lvItems.Enabled and lvItems.CanFocus then - ActiveControl := lvItems; - end; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSChLbxLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSChLbxLnk.dfm deleted file mode 100644 index 0f66dab5..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSChLbxLnk.dfm +++ /dev/null @@ -1,365 +0,0 @@ -object dxChlbxReportLinkDesignWindow: TdxChlbxReportLinkDesignWindow - Left = 548 - Top = 365 - BorderStyle = bsDialog - Caption = 'dxCLbReportLinkDesigner' - ClientHeight = 243 - ClientWidth = 552 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 3 - Width = 544 - Height = 204 - ActivePage = tshColor - MultiLine = True - TabOrder = 1 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 536 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Bevel11: TBevel - Left = 41 - Top = 18 - Width = 207 - Height = 4 - Shape = bsBottomLine - end - object Bevel4: TBevel - Left = 79 - Top = 90 - Width = 167 - Height = 4 - Shape = bsBottomLine - end - object Image5: TImage - Left = 10 - Top = 109 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F77777777777777777777 - F07DD0F0000FF7F0000000FF000F07DDDDDDDDDDDD0F7FFF77777FF77777FFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F77777777777777777777 - F07DD0777777777777777777777707DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F77777777777777777777 - F07DD0F0000FF7F00000000000FF07DDDDDDDDDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F7F000FFF7F00000F00F7 - F07DD0777777777777777777777707DDCDDDDCDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDCCCCDCCDDD0F7F00000F7F00000000F7 - F07DD0F00000F7F0000000FF000F07DDCCCCCCCCDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDCCCCDCCDDD0F77777777777777777777 - F07DD0777777777777777777777707DDCDDDDCDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F7FFFFFFF7F000000FFF7 - F07DD0F00FFFF7F000000000000F07DDDDDDDDDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F7FFFFFFF7F0000F000F7 - F07DD0F00000F7F00000000F000F07DDDDDDDDDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F7F00000F7F00000000F7 - F07DD0777777777777777777777707DDDDDDDDDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDCDDDDCDDDD0F7F00F00F7F000000FFF7 - F07DD0F00FFFF7F000000FF000FF07DDCCCCDCCDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDCCCCCCCCDD0F7F00000F7F00000000F7 - F07DD0F00000F7F000000000000F07DDCCCCDCCDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDCDDDDCDDDD0F77777777777777777777 - F07DD0000000000000000000000007DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD0888888808888888888888807DDDDDDDDDDDD0F77777777777777777777 - F07DD0880000808800000088888807DDDDDDDDDDDD0F77777777777777777777 - F07DD0888888808888888888888807DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgGrid: TImage - Left = 10 - Top = 34 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblShow: TLabel - Left = 6 - Top = 14 - Width = 26 - Height = 13 - Caption = 'Show' - end - object lblMiscellaneous: TLabel - Left = 6 - Top = 85 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object chbxShowBorders: TCheckBox - Left = 95 - Top = 31 - Width = 148 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxShowBordersClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 95 - Top = 54 - Width = 148 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxShowBordersClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 95 - Top = 107 - Width = 148 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 2 - OnClick = chbxShowBordersClick - end - object chbxRowAutoHeight: TCheckBox - Left = 95 - Top = 153 - Width = 148 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 4 - OnClick = chbxRowAutoHeightClick - end - object lblPreview: TStaticText - Left = 256 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 5 - end - object chbxAutoWidth: TCheckBox - Left = 95 - Top = 130 - Width = 148 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 3 - OnClick = chbxAutoWidthClick - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 536 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 14 - Top = 143 - Width = 79 - Height = 13 - Caption = 'Grid Lines color: ' - OnClick = lblComboClick - end - object bvlLineColorHolder: TBevel - Left = 100 - Top = 137 - Width = 126 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 6 - Top = 13 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - OnClick = lblComboClick - end - object gbxTransparent: TGroupBox - Left = 6 - Top = 45 - Width = 232 - Height = 82 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 9 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblComboClick - end - object bvlColorHolder: TBevel - Left = 94 - Top = 20 - Width = 126 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 9 - Top = 50 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - OnClick = lblComboClick - end - object bvlEvenColorHolder: TBevel - Left = 94 - Top = 46 - Width = 126 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 42 - Width = 15 - Height = 17 - Caption = 'T&ransparent' - TabOrder = 1 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 77 - Top = 8 - Width = 161 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 43 - Width = 69 - Height = 17 - Caption = ' Transparent ' - FocusControl = chbxTransparent - TabOrder = 3 - OnClick = stTransparentClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 536 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 37 - Width = 231 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - Text = 'edFont' - end - object btnEvenFont: TButton - Tag = 1 - Left = 9 - Top = 70 - Width = 110 - Height = 23 - Caption = 'E&ven Font ...' - TabOrder = 2 - OnClick = btnFontClick - end - object edEvenFont: TEdit - Left = 9 - Top = 98 - Width = 231 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - Text = 'edFont' - end - end - end - end - object pnlPreview: TPanel - Left = 265 - Top = 46 - Width = 273 - Height = 150 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 0 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSChLbxLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSChLbxLnk.pas deleted file mode 100644 index 9306bbf6..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSChLbxLnk.pas +++ /dev/null @@ -1,707 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSChLbxLnk; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, ExtCtrls, ComCtrls, CheckLst, dxPSCore, dxPSGrLnks, dxPSGlbl, - dxPSBaseGridLnk; - -type - TdxPSCheckGridCellDataMap = class(TdxPSTextGridCellDataMap) - protected - class procedure InitializeCellData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData; - AReportLink: TAbstractdxGridReportLink); override; - class function DataClass: TdxReportCellDataClass; override; - end; - - TdxCheckListBoxPaintOption = (chlbxpoBorder, chlbxpoHorzLines, chlbxpoFlatCheckMarks); - TdxCheckListBoxPaintOptions = set of TdxCheckListBoxPaintOption; - - TdxCheckListBoxReportLink = class(TdxCustomListBoxReportLink) - private - FOptions: TdxCheckListBoxPaintOptions; - function GetOptions: TdxCheckListBoxPaintOptions; - function GetCheckListBox: TCheckListBox; - procedure SetOptions(Value: TdxCheckListBoxPaintOptions); - function IsFlatCheckMarks: Boolean; - protected - function GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - - function IsDrawBorder: Boolean; override; - function IsDrawHorzLines: Boolean; override; - procedure SetDrawMode(Value: TdxGridDrawMode); override; - public - procedure Assign(Source: TPersistent); override; - property CheckListBox: TCheckListBox read GetCheckListBox; - published - property AutoWidth; - property Color; - property EndEllipsis; - property EvenColor; - property EvenFont; - property Font; - property OddColor; - property OddFont; - property Options: TdxCheckListBoxPaintOptions read GetOptions write SetOptions - default [chlbxpoBorder..chlbxpoFlatCheckMarks]; - property Multiline; - property RowAutoHeight; - property ScaleFonts; - property SupportedCustomDraw; - property Transparent; - property UseCustomPageBreaks; - property UseHorzDelimiters; - property UseVertDelimiters; - property Width; - - property OnCustomDrawItem; - property OnGetCustomPageBreaks; - property OnInitializeItem; - end; - - TdxChlbxReportLinkDesignWindow = class(TStandarddxReportLinkDesignWindow) - pnlPreview: TPanel; - PageControl1: TPageControl; - tshOptions: TTabSheet; - pnlOptions: TPanel; - tshColor: TTabSheet; - pnlColor: TPanel; - lblGridLinesColor: TLabel; - chbxTransparent: TCheckBox; - tshFont: TTabSheet; - pnlFont: TPanel; - btnFont: TButton; - edFont: TEdit; - gbxTransparent: TGroupBox; - lblColor: TLabel; - bvlColorHolder: TBevel; - bvlLineColorHolder: TBevel; - chbxShowBorders: TCheckBox; - chbxShowHorzLines: TCheckBox; - chbxFlatCheckMarks: TCheckBox; - lblShow: TLabel; - Bevel11: TBevel; - lblMiscellaneous: TLabel; - Bevel4: TBevel; - btnEvenFont: TButton; - edEvenFont: TEdit; - lblEvenColor: TLabel; - bvlEvenColorHolder: TBevel; - chbxRowAutoHeight: TCheckBox; - Image5: TImage; - imgGrid: TImage; - lblDrawMode: TLabel; - cbxDrawMode: TComboBox; - lblPreview: TStaticText; - chbxAutoWidth: TCheckBox; - stTransparent: TStaticText; - procedure ccbxColorChange(Sender: TObject); - procedure btnFontClick(Sender: TObject); - procedure pbxPreviewPaint(Sender: TObject); - procedure chbxTransparentClick(Sender: TObject); - procedure lblComboClick(Sender: TObject); - procedure cbxDrawModeClick(Sender: TObject); - procedure chbxShowBordersClick(Sender: TObject); - procedure chbxRowAutoHeightClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure cbxDrawModeDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure chbxAutoWidthClick(Sender: TObject); - procedure stTransparentClick(Sender: TObject); - private - FccbxColor: TCustomComboBox; - FccbxEvenColor: TCustomComboBox; - FccbxGridLineColor: TCustomComboBox; - FItemCount: Integer; - FPaintWidth: Integer; - FPaintHeight: Integer; - FPreviewBox: TCustomPanel; - FPreviewFont: TFont; - FRectWidth: Integer; - FRectHeight: Integer; - procedure CreateControls; - function GetReportLink: TdxCheckListBoxReportLink; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property ReportLink: TdxCheckListBoxReportLink read GetReportLink; - end; - -const - dxDefaultCheckListBoxPaintOptions: TdxCheckListBoxPaintOptions = - [chlbxpoBorder, chlbxpoHorzLines, chlbxpoFlatCheckMarks]; - - DesignerStringCount = 6; - dxCheckListBoxStrings: array[0..DesignerStringCount - 1] of string = - ('Sample Text Row #1', 'Sample Text Row #2', 'Sample Text Row #3', - 'Sample Text Row #4', 'Sample Text Row #5', 'Sample Text Row #6'); - -implementation - -uses - cxClasses, dxExtCtrls, dxPSRes, dxPrnDev, dxPSUtl; - -{$R *.DFM} - -{ TdxPSCheckGridCellDataMap } - -class function TdxPSCheckGridCellDataMap.DataClass: TdxReportCellDataClass; -begin - Result := TdxReportCellCheck; -end; - -class procedure TdxPSCheckGridCellDataMap.InitializeCellData(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData; AReportLink: TAbstractdxGridReportLink); -begin - inherited; - with TdxReportCellCheck(ADataItem) do - begin - CheckPos := ccpLeft; - Checked := TdxCheckListBoxReportLink(AReportLink).CheckListBox.State[ARow] > cbUnchecked; - Enabled := TdxCheckListBoxReportLink(AReportLink).CheckListBox.State[ARow] < cbGrayed; - {$IFDEF DELPHI5} - Enabled := Enabled and TdxCheckListBoxReportLink(AReportLink).CheckListBox.ItemEnabled[ARow]; - {$ENDIF} - FlatBorder := TdxCheckListBoxReportLink(AReportLink).IsFlatCheckMarks; - end; -end; - -{ TdxCheckListBoxReportLink } - -procedure TdxCheckListBoxReportLink.Assign(Source: TPersistent); -begin - if Source is TdxCheckListBoxReportLink then - Options := TdxCheckListBoxReportLink(Source).Options; - inherited; -end; - -procedure TdxCheckListBoxReportLink.InternalRestoreDefaults; -begin - inherited; - Options := dxDefaultCheckListBoxPaintOptions; -end; - -procedure TdxCheckListBoxReportLink.InternalRestoreFromOriginal; -begin - inherited; - if CheckListBox.Flat then - Options := Options + [chlbxpoFlatCheckMarks] - else - Options := Options - [chlbxpoFlatCheckMarks]; -end; - -function TdxCheckListBoxReportLink.IsDrawBorder: Boolean; -begin - Result := chlbxpoBorder in Options; -end; - -function TdxCheckListBoxReportLink.IsDrawHorzLines: Boolean; -begin - Result := chlbxpoHorzLines in Options; -end; - -procedure TdxCheckListBoxReportLink.SetDrawMode(Value: TdxGridDrawMode); -begin - if Value > gdmOddEven then Value := gdmOddEven; - inherited SetDrawMode(Value); -end; - -function TdxCheckListBoxReportLink.GetCheckListBox: TCheckListBox; -begin - Result := TCheckListBox(Component); -end; - -function TdxCheckListBoxReportLink.GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; -begin - Result := TdxReportCellCheck; -end; - -function TdxCheckListBoxReportLink.IsFlatCheckMarks: Boolean; -begin - Result := chlbxpoFlatCheckMarks in Options; -end; - -function TdxCheckListBoxReportLink.GetOptions: TdxCheckListBoxPaintOptions; -begin - Result := FOptions; -end; - -procedure TdxCheckListBoxReportLink.SetOptions(Value: TdxCheckListBoxPaintOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - LinkModified(True); - end; -end; - -{ TdxChlbxReportLinkDesignWindow } - -constructor TdxChlbxReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhcCheckListBoxReportLinkDesigner; - inherited; - CreateControls; - FItemCount := 5; - FRectWidth := FPreviewBox.Width - 15; - FRectHeight := (FPreviewBox.Height - 15) div FItemCount; - FPaintWidth := FRectWidth + 1; - FPaintHeight := FItemCount * (FRectHeight + 1); - PageControl1.ActivePage := PageControl1.Pages[0]; - FPreviewFont := TFont.Create; -end; - -destructor TdxChlbxReportLinkDesignWindow.Destroy; -begin - FreeAndNil(FPreviewFont); - inherited; -end; - -procedure TdxChlbxReportLinkDesignWindow.CreateControls; -var - R: TRect; -begin - FccbxColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(FccbxColor) do - begin - BoundsRect := bvlColorHolder.BoundsRect; - Tag := MakeTTag(0); - Parent := gbxTransparent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := dxDefaultColor; - OnChange := ccbxColorChange; - end; - lblColor.FocusControl := FccbxColor; - - FccbxEvenColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(FccbxEvenColor) do - begin - BoundsRect := bvlEvenColorHolder.BoundsRect; - Tag := MakeTTag(1); - Parent := gbxTransparent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := dxDefaultColor; - OnChange := ccbxColorChange; - end; - lblEvenColor.FocusControl := FccbxEvenColor; - - FccbxGridLineColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(FccbxGridLineColor) do - begin - BoundsRect := bvlLineColorHolder.BoundsRect; - Tag := MakeTTag(2); - Parent := pnlColor; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := dxDefaultGridLineColor; - OnChange := ccbxColorChange; - end; - - lblGridLinesColor.FocusControl := FccbxGridLineColor; - FPreviewBox := TdxPSPaintPanel.Create(Self); - with TdxPSPaintPanel(FPreviewBox) do - begin - Parent := pnlPreview; - R := pnlPreview.BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - InflateRect(R, -1, -1); - BoundsRect := R; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := pbxPreviewPaint; - end; -end; - -function TdxChlbxReportLinkDesignWindow.GetReportLink: TdxCheckListBoxReportLink; -begin - Result := inherited ReportLink as TdxCheckListBoxReportLink; -end; - -procedure TdxChlbxReportLinkDesignWindow.CMDialogChar(var Message: TCMDialogChar); -var - I: Integer; -begin - with PageControl1 do - for I := 0 to PageControl1.PageCount - 1 do - if IsAccel(Message.CharCode, Pages[I].Caption) then - begin - Message.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TdxChlbxReportLinkDesignWindow.LoadStrings; -begin - inherited; - tshOptions.Caption := cxGetResourceString(@sdxOptions); - tshFont.Caption := cxGetResourceString(@sdxFonts); - tshColor.Caption := cxGetResourceString(@sdxColors); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblShow.Caption := cxGetResourceString(@sdxShow); - chbxShowBorders.Caption := cxGetResourceString(@sdxBorderLines); - chbxShowHorzLines.Caption := cxGetResourceString(@sdxHorzLines); - - lblMiscellaneous.Caption := cxGetResourceString(@sdxMiscellaneous); - chbxFlatCheckMarks.Caption := cxGetResourceString(@sdxFlatCheckMarks); - chbxAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - chbxRowAutoHeight.Caption := cxGetResourceString(@sdxRowAutoHeight); - - lblDrawMode.Caption := cxGetResourceString(@sdxDrawMode); - - with cbxDrawMode.Items do - begin - BeginUpdate; - try - Clear; - AddObject(cxGetResourceString(@sdxDrawModeStrict), TObject(gdmStrict)); - AddObject(cxGetResourceString(@sdxDrawModeOddEven), TObject(gdmOddEven)); - finally - EndUpdate; - end; - end; - - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - lblEvenColor.Caption := cxGetResourceString(@sdxEvenColor); - lblGridLinesColor.Caption := cxGetResourceString(@sdxGridLinesColor); - - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - btnEvenFont.Caption := cxGetResourceString(@sdxBtnEvenFont); -end; - -procedure TdxChlbxReportLinkDesignWindow.UpdateControlsState; -begin - inherited UpdateControlsState; - FccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := FccbxColor.Enabled; - FccbxEvenColor.Enabled := not chbxTransparent.Checked and - (ReportLink.DrawMode in [gdmOddEven, gdmChess]); - lblEvenColor.Enabled := FccbxEvenColor.Enabled; - - btnEvenFont.Enabled := ReportLink.DrawMode in [gdmOddEven, gdmChess]; - if ReportLink.DrawMode in [gdmOddEven, gdmChess] then - begin - lblColor.Caption := cxGetResourceString(@sdxOddColor); - btnFont.Caption := cxGetResourceString(@sdxBtnOddFont); - end - else - begin - lblColor.Caption := cxGetResourceString(@sdxColor); - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - end; -end; - -procedure TdxChlbxReportLinkDesignWindow.DoInitialize; -begin - inherited DoInitialize; - - with cbxDrawMode do - ItemIndex := Items.IndexOfObject(TObject(ReportLink.DrawMode)); - chbxShowBorders.Checked := chlbxpoBorder in ReportLink.Options; - chbxShowHorzLines.Checked := chlbxpoHorzLines in ReportLink.Options; - chbxFlatCheckMarks.Checked := chlbxpoFlatCheckMarks in ReportLink.Options; - chbxAutoWidth.Checked := ReportLink.AutoWidth; - chbxRowAutoHeight.Checked := ReportLink.RowAutoHeight; - - chbxTransparent.Checked := ReportLink.Transparent; - TdxPSColorCombo(FccbxColor).ColorValue := ReportLink.Color; - TdxPSColorCombo(FccbxEvenColor).ColorValue := ReportLink.EvenColor; - TdxPSColorCombo(FccbxGridLineColor).ColorValue := ReportLink.GridLineColor; - - FontInfoToText(ReportLink.Font, edFont); - FontInfoToText(ReportLink.EvenFont, edEvenFont); -end; - -{$IFDEF DELPHI7} -function TdxChlbxReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxChlbxReportLinkDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -const - CheckBorderMap: array[Boolean] of UINT = (0, DFCS_FLAT); - ControlStateMap: array[TCheckBoxState] of UINT = - (DFCS_BUTTONCHECK, DFCS_BUTTONCHECK or DFCS_CHECKED, DFCS_BUTTON3STATE or DFCS_CHECKED); - CheckStateMap: array[0..DesignerStringCount - 1] of TCheckBoxState = - (cbUnchecked, cbChecked, cbGrayed, cbUnchecked, cbChecked, cbChecked); -var - DC: HDC; - Brush: HBRUSH; - I, dY: Integer; - R2: TRect; - PrevBkMode: Integer; - PrevFont: HFONT; - PrevFontColor: COLORREF; - uState: UINT; - S: string; -begin - inherited; - DC := ACanvas.Handle; - //FillRect(DC, R, HBRUSH(COLOR_WINDOW + 1)); - InflateRect(R, -4, -4); - R2 := R; - dY := (R.Bottom - R.Top) div DesignerStringCount; - - with ReportLink do - begin - Brush := SelectObject(DC, CreateSolidBrush(ColorToRGB(GridLineColor))); - for I := 0 to DesignerStringCount do - if (((I = 0) or (I = DesignerStringCount)) and IsDrawBorder) or - ((I > 0) and (I < DesignerStringCount) and IsDrawHorzLines) then - begin - R := MakeRect(R2.Left + 1, R2.Top + I * dY, R2.Right - 1, R2.Top + I * dY + 1); - PatBlt(DC, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, PATCOPY); - end; - - if IsDrawBorder then - begin - R := MakeRect(R2.Left, R2.Top, R2.Left + 1, R2.Top + dY * DesignerStringCount + 1); - PatBlt(DC, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, PATCOPY); - R := MakeRect(R2.Right - 1, R2.Top, R2.Right, R2.Top + dY * DesignerStringCount + 1); - PatBlt(DC, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, PATCOPY); - end; - DeleteObject(SelectObject(DC, Brush)); - - PrevBkMode := SetBkMode(DC, Windows.TRANSPARENT); - PrevFont := GetCurrentObject(DC, OBJ_FONT); - PrevFontColor := GetTextColor(DC); - for I := 0 to DesignerStringCount - 1 do - begin - R := MakeRect(R2.Left + 1, R2.Top + I * dY + 1, R2.Right - 1, R2.Top + (I + 1) * dY + - Byte(not IsDrawHorzLines and (I < DesignerStringCount - 1))); - if not Transparent then - begin - Brush := CreateSolidBrush(ColorToRGB(ReportLink.GetCellColor(0, I))); - FillRect(DC, R, Brush); - DeleteObject(Brush); - end; - InflateRect(R, -2, -2); - Inc(R.Left, CheckWidth + 2); - - FPreviewFont.Assign(ReportLink.GetCellFont(0, I)); - FPreviewFont.Size := 8; - SelectObject(DC, FPreviewFont.Handle); - SetTextColor(DC, ColorToRGB(FPreviewFont.Color)); - S := dxCheckListBoxStrings[I]; - Windows.DrawText(DC, PChar(S), Length(S), R, DT_NOPREFIX or DT_SINGLELINE or - dxDrawTextTextAlignX[TextAlignX] or dxDrawTextTextAlignY[TextAlignY]); - - R := MakeBounds(R2.Left + 2, R2.Top + I * dY + 1 + (dY - CheckHeight) div 2, CheckWidth, CheckHeight); - uState := DFCS_TRANSPARENT or ControlStateMap[CheckStateMap[I]] or CheckBorderMap[IsFlatCheckMarks]; - DrawFrameControl(DC, R, DFC_BUTTON, uState); - end; - SetTextColor(DC, PrevFontColor); - SelectObject(DC, PrevFont); - SetBkMode(DC, PrevBkMode); - end; -end; - -procedure TdxChlbxReportLinkDesignWindow.chbxShowBordersClick(Sender: TObject); -var - Option: TdxCheckListBoxPaintOption; -begin - if LockControlsUpdate then Exit; - - Option := TdxCheckListBoxPaintOption(TTagToInt(TCheckBox(Sender).Tag)); - with ReportLink do - if TCheckBox(Sender).Checked then - Options := Options + [Option] - else - Options := Options - [Option]; - - Modified := True; - UpdatePreview; -end; - -procedure TdxChlbxReportLinkDesignWindow.chbxAutoWidthClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoWidth := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxChlbxReportLinkDesignWindow.chbxRowAutoHeightClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.RowAutoHeight := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxChlbxReportLinkDesignWindow.cbxDrawModeClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TComboBox(Sender) do - ReportLink.DrawMode := TdxGridDrawMode(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TdxChlbxReportLinkDesignWindow.cbxDrawModeDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - dxPSBaseGridLnk.dxPSDrawComboDrawModeItem(Control, Index, Rect, State); -end; - -procedure TdxChlbxReportLinkDesignWindow.chbxTransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Transparent := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxChlbxReportLinkDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TdxChlbxReportLinkDesignWindow.UpdatePreview; -begin - FPreviewBox.Invalidate; -end; - -procedure TdxChlbxReportLinkDesignWindow.ccbxColorChange(Sender: TObject); -var - AColor: TColor; -begin - if LockControlsUpdate then Exit; - - AColor := TdxPSColorCombo(Sender).ColorValue; - case TTagToInt(TdxPSColorCombo(Sender).Tag) of - 0: ReportLink.Color := AColor; - 1: ReportLink.EvenColor := AColor; - 2: ReportLink.GridLineColor := AColor; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxChlbxReportLinkDesignWindow.btnFontClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - - with dxPSGlbl.FontDialog do - begin - case TTagToInt(TComponent(Sender).Tag) of - 0: Font := ReportLink.Font; - 1: Font := ReportLink.EvenFont; - end; - if Execute then - begin - case TTagToInt(TComponent(Sender).Tag) of - 0: - begin - ReportLink.Font := Font; - FontInfoToText(ReportLink.Font, edFont); - end; - 1: - begin - ReportLink.EvenFont := Font; - FontInfoToText(ReportLink.EvenFont, edEvenFont); - end; - end; - Modified := True; - UpdatePreview; - end; - end; -end; - -procedure TdxChlbxReportLinkDesignWindow.pbxPreviewPaint(Sender: TObject); -begin - with TdxPSPaintPanel(Sender) do - PaintPreview(Canvas, ClientRect); -end; - -procedure TdxChlbxReportLinkDesignWindow.lblComboClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TCustomComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxChlbxReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreview.Parent := TPageControl(Sender).ActivePage; -end; - -procedure RegisterAssistants; -begin - TdxPSCheckGridCellDataMap.Register; -end; - -procedure UnregisterAssistants; -begin - TdxPSCheckGridCellDataMap.Unregister; -end; - -initialization - RegisterAssistants; - dxPSRegisterReportLink(TdxCheckListBoxReportLink, TCheckListBox, TdxChlbxReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxCheckListBoxReportLink, TCheckListBox, TdxChlbxReportLinkDesignWindow); - UnregisterAssistants; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSCompsProvider.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSCompsProvider.pas deleted file mode 100644 index 2b199891..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSCompsProvider.pas +++ /dev/null @@ -1,214 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSCompsProvider; - -interface - -{$I cxVer.inc} - -uses - Classes, dxPSCore, dxPSSngltn; - -type - TdxComponentItem = class - private - FCaption: string; - FComponent: TComponent; - FDescription: string; - public - constructor Create(AComponent: TComponent; const ACaption, ADescription: string); - property Caption: string read FCaption write FCaption; - property Component: TComponent read FComponent write FComponent; - property Description: string read FDescription write FDescription; - end; - - TdxPSGetComponentOption = (gcoExcludeExisting, gcoExcludeOutOfActiveForm, gcoHideCustomContainers); - TdxPSGetComponentOptions = set of TdxPSGetComponentOption; - - TdxPSComponentsProviderClass = class of TAbstractdxPSComponentsProvider; - - TAbstractdxPSComponentsProvider = class - public - constructor Create; virtual; - procedure GetComponents(AComponentPrinter: TdxComponentPrinter; AReportLink: TBasedxReportLink; - AComponents: TStrings; AnOptions: TdxPSGetComponentOptions); virtual; abstract; - - class procedure Register; - class procedure Unregister; - end; - - TdxPSComponentProvidersFactory = class(TBasedxPSSingleton) - private - FItems: TList; - function GetActiveProvider: TAbstractdxPSComponentsProvider; - function GetCount: Integer; - function GetProvider(Index: Integer): TAbstractdxPSComponentsProvider; - protected - procedure FinalizeInstance; override; - procedure InitializeInstance; override; - public - class function Instance: TdxPSComponentProvidersFactory; reintroduce; overload; - - procedure GetComponents(AComponentPrinter: TdxComponentPrinter; AReportLink: TBasedxReportLink; - AComponents: TStrings; AnOptions: TdxPSGetComponentOptions); - function IndexOf(AProviderClass: TdxPSComponentsProviderClass): Integer; - procedure RegisterProvider(AProviderClass: TdxPSComponentsProviderClass); - procedure UnregisterProvider(AProviderClass: TdxPSComponentsProviderClass); - - property ActiveProvider: TAbstractdxPSComponentsProvider read GetActiveProvider; - property Count: Integer read GetCount; - property Providers[Index: Integer]: TAbstractdxPSComponentsProvider read GetProvider; default; - end; - -function dxPSCreateComponentItem(AComponent: TComponent; const ACaption, ADescription: string): TdxComponentItem; -function dxPSComponentProvidersFactory: TdxPSComponentProvidersFactory; - -implementation - -uses - SysUtils, dxPSUtl; - -function dxPSCreateComponentItem(AComponent: TComponent; const ACaption, ADescription: string): TdxComponentItem; -begin - Result := TdxComponentItem.Create(AComponent, ACaption, ADescription); -end; - -{ TdxComponentItem } - -constructor TdxComponentItem.Create(AComponent: TComponent; const ACaption, ADescription: string); -begin - inherited Create; - FComponent := AComponent; - FCaption := ACaption; - FDescription := ADescription; -end; - -{ TdxPSComponentProvidersFactory } - -function dxPSComponentProvidersFactory: TdxPSComponentProvidersFactory; -begin - Result := TdxPSComponentProvidersFactory.Instance; -end; - -class function TdxPSComponentProvidersFactory.Instance: TdxPSComponentProvidersFactory; -begin - Result := inherited Instance as TdxPSComponentProvidersFactory; -end; - -procedure TdxPSComponentProvidersFactory.GetComponents(AComponentPrinter: TdxComponentPrinter; - AReportLink: TBasedxReportLink; AComponents: TStrings; AnOptions: TdxPSGetComponentOptions); -begin - if ActiveProvider <> nil then - ActiveProvider.GetComponents(AComponentPrinter, AReportLink, AComponents, AnOptions); -end; - -function TdxPSComponentProvidersFactory.IndexOf(AProviderClass: TdxPSComponentsProviderClass): Integer; -begin - for Result := 0 to Count - 1 do - if Providers[Result].ClassType = AProviderClass then - Exit; - Result := -1; -end; - -procedure TdxPSComponentProvidersFactory.RegisterProvider(AProviderClass: TdxPSComponentsProviderClass); -begin - if IndexOf(AProviderClass) = -1 then FItems.Add(AProviderClass.Create); -end; - -procedure TdxPSComponentProvidersFactory.UnregisterProvider(AProviderClass: TdxPSComponentsProviderClass); -var - Index: Integer; -begin - Index := IndexOf(AProviderClass); - if Index <> -1 then - begin - Providers[Index].Free; - FItems.Delete(Index); - end; -end; - -procedure TdxPSComponentProvidersFactory.FinalizeInstance; -var - I: Integer; -begin - for I := 0 to Count - 1 do Providers[I].Free; - FreeAndNil(FItems); - inherited; -end; - -procedure TdxPSComponentProvidersFactory.InitializeInstance; -begin - inherited; - FItems := TList.Create; -end; - -function TdxPSComponentProvidersFactory.GetActiveProvider: TAbstractdxPSComponentsProvider; -begin - if Count <> 0 then - Result := Providers[Count - 1] - else - Result := nil; -end; - -function TdxPSComponentProvidersFactory.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxPSComponentProvidersFactory.GetProvider(Index: Integer): TAbstractdxPSComponentsProvider; -begin - Result := TAbstractdxPSComponentsProvider(FItems[Index]); -end; - -{ TAbstractdxPSComponentsProvider } - -constructor TAbstractdxPSComponentsProvider.Create; -begin - inherited Create; -end; - -class procedure TAbstractdxPSComponentsProvider.Register; -begin - dxPSComponentProvidersFactory.RegisterProvider(Self); -end; - -class procedure TAbstractdxPSComponentsProvider.Unregister; -begin - dxPSComponentProvidersFactory.UnregisterProvider(Self); -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSContainerLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSContainerLnk.dfm deleted file mode 100644 index a98f1a9b..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSContainerLnk.dfm +++ /dev/null @@ -1,880 +0,0 @@ -object dxfmCustomContainerDesignWindow: TdxfmCustomContainerDesignWindow - Left = 456 - Top = 379 - BorderStyle = bsDialog - Caption = 'dxfmCustomContainerDesignWindow' - ClientHeight = 315 - ClientWidth = 582 - Color = clBtnFace - Constraints.MinHeight = 342 - Constraints.MinWidth = 588 - OldCreateOrder = False - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 9 - Width = 574 - Height = 271 - ActivePage = tshReportLinks - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - OnChange = PageControl1Change - OnChanging = PageControl1Changing - object tshOptions: TTabSheet - Caption = 'Options' - object imgExpanding: TImage - Left = 9 - Top = 26 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD7777777777777777777777777DDDDDDDDDDDD0000000000000000000000 - 000DDF888888888888888888888887DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - FF0DDF877777777777777777777787DDDDDDDDDDDD0F00000000000000000000 - 0F0DDF8F8888888888888888888787DDCDDDCDDDDD0F0FFFFFFFFFFFFFFFFFFF - 0F0DDF8F8000000000000000008787DDCCCDCCDDDD0F0F00000000000000000F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDCCCCCCCDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDCCCDCCDDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDCDDDCDDDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDDDDDDDDDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDDDDDDDDDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDDDDDDDDDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F8000000000000000008787DDDDDDDDDDDD0F0F00000000000000000F - 0F0DDF8F8888888888888888888787DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFFF - 0F0DDF8F8000000888888888888787DDDDDDDDDDDD0F0F000000FFFFFFFFFFFF - 0F0DDF8F8888888888888888888787DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFFF - 0F0DDF8F8000000888888888888787DDDDDDDDDDDD0F0F000000FFFFFFFFFFFF - 0F0DDF8F8888888888888888888787DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFFF - 0F0DDF8FFFFFFFFFFFFFFFFFFFF787DDDDDDDDDDDD0F00000000000000000000 - 0F0DDF888888888888888888888887DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - FF0DDF8FFFFFFFFFFFFF8777777787DDDDDDDDDDDD0F0000000000000F000000 - 0F0DDF8788888888888F8F88888787DDDDDDDDDDDD0F0FFFFFFFFFFF0F0FFFFF - 0F0DDF8788888888888F8F88888787DDDDDDDDDDDD0F0FFFFFFFFFFF0F0FFFFF - 0F0DDF8777777777777F8F88888787DDCDDDCDDDDD0F0000000000000F0FFFFF - 0F0DDF888888888888888F88888787DDCCCDCCDDDD0FFFFFFFFFFFFFFF0FFFFF - 0F0DDF8FFFFFFFFFFFFF8F88888787DDCCCCCCCDDD0F0000000000000F0FFFFF - 0F0DDF8788888888888F8F80088787DDCCCDCCDDDD0F0FFFFFFFFFFF0F0F00FF - 0F0DDF8788888888888F8F88888787DDCDDDCDDDDD0F0FFFFFFFFFFF0F0FFFFF - 0F0DDF8777777777777F8FFFFFF787DDDDDDDDDDDD0F0000000000000F000000 - 0F0DDF888888888888888888888887DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - FF0DDFFFFFFFFFFFFFFFFFFFFFFFF7DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlTransparents: TBevel - Left = 76 - Top = 10 - Width = 480 - Height = 4 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object imgPagination: TImage - Left = 9 - Top = 131 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD0000000000000000000000007DDDDDDDDDDDD77777777777777770DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7F7777777777777F0DDDDD - DDDDD0888000000000000000088F07DDDDDDDDDDDD7F78887F88F7FF7F07770D - DDDDD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78887FFFF7FF7F0FFF0D - DDDDD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7F7777777777777F077F0D - DDDDD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78887F88F7FF7F0F7F07 - 770DD098F0000000000000000F8907DDDDDDDDDDDD7F78887FFFF7FF7F0F7F0F - FF0DD099FFFFFFFFFFFFFFFFFF9907DDCDDDDCDDDD7F7777777777777F0F7F07 - 7F0DD0999999999999999999999907DDCCCCDCCDDD7F78887FFFF7FF7F0F7F0F - 7F0DD099F0000000000000000F9907DDCCCCCCCCDD7F78787F88F7FF7F0F7F0F - 7F0DD098F088887FFFF8FFFF0F8907DDCCCCDCCDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887F88F8F88F0F8F07DDCDDDDCDDDD7F7777777777777F0F7F0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78787F88F7FF7F0F7F0F - 7F0DD098F0000000000000000F8907DDCDDDDCDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD099FFFFFFFFFFFFFFFFFF9907DDCCCCDCCDDD7F7777777777777F0F7F0F - 7F0DD0999999999999999999999907DDCCCCCCCCDD7F78887FFFF7FF7F0F7F0F - 7F0DD099F0000000000000000F9907DDCCCCDCCDDD7F78787F88F7FF7F0F7F0F - 7F0DD098F088887FFFF8FFFF0F8907DDCDDDDCDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887F88F8F88F0F8F07DDDDDDDDDDDD7F7777777777777F0F7F0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0F7F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD00000000000000000F7F0F - 7F0DD0F8F0777778888888880F8F07DDDDDDDDDDDDDDDD7F7777777777777F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDDDDDD7FFFFFFFFFFFFFFF0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDDDDDD00000000000000000F - 7F0DD0F8F088887FFFF8FFFF0F8807DDDDDDDDDDDDDDDDDDDD7F777777777777 - 7F0DD0888000000000000000088F07DDDDDDDDDDDDDDDDDDDD7FFFFFFFFFFFFF - FF0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD00000000000000 - 000DD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel1: TBevel - Left = 64 - Top = 115 - Width = 492 - Height = 4 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object bvlSize: TBevel - Left = 31 - Top = 183 - Width = 525 - Height = 4 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object imgSize: TImage - Left = 9 - Top = 199 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088807DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFFFFFFFFFFFF0FFF0F07DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFF0 - F07DD0F0F777777777777F0FFF8F07DDDDDDDDDDDD0F0F7777777777777777F0 - F07DD0F0F7FFFFFFFFFF7F0FFF0F07DDDDDDDDDDDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F777777777777F0FFF8F07DDDDDDDDDDDD0F0F7777777777777777F0 - F07DD0F0FFFFFFFFFFFFFF0FFF0F07DDCDDDDCDDDD0F0FFFFFFFFFFFFFFFFFF0 - F07DD0F0F777777777777F0FFF8F07DDCCCCDCCDDD0F0F7777777777777777F0 - F07DD0F0F7FFFFFFFFFF7F0FFF0F07DDCCCCCCCCDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F777777777777F0FFF8F07DDCCCCDCCDDD0F0F7777777777777777F0 - F07DD0F0FFFFFFFFFFFFFF0FFF0F07DDCDDDDCDDDD0F0FFFFFFFFFFFFFFFFFF0 - F07DD0F0F777777777777F0FFF8F07DDDDDDDDDDDD0F0F7777777777777777F0 - F07DD0F0F7FFFFFFFFFF7F0FFF0F07DDDDDDDDDDDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F7FFFFFFFFFF7F0FFF8F07DDCDDDDCDDDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F7F888888F8F7F0FFF0F07DDCCCCDCCDDD0F0F7F88888F8F8888F7F0 - F07DD0F0F7FFFFFFFFFF7F0FFF8F07DDCCCCCCCCDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F7F88F888F8F7F0FFF0F07DDCCCCDCCDDD0F0F7F88F888F8F888F7F0 - F07DD0F0F7FFFFFFFFFF7F0FFF8F07DDCDDDDCDDDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F777777777777F0FFF0F07DDDDDDDDDDDD0F0F7777777777777777F0 - F07DD0F0FFFFFFFFFFFFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFF0 - F07DD0F0F7777777F7777F0FFF0F07DDDDDDDDDDDD0F0F777777777F777777F0 - F07DD0F0F7FFFFF7F7FF7F0FFF8F07DDDDDDDDDDDD0F0F7FFFFFFF7F7FFFF7F0 - F07DD0F0F7777777F7777F0FFF0F07DDDDDDDDDDDD0F0F777777777F777777F0 - F07DD0F0FFFFFFFFFFFFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblTransparents: TLabel - Left = 5 - Top = 5 - Width = 64 - Height = 13 - Caption = 'Transparents' - end - object lblPagination: TLabel - Left = 5 - Top = 110 - Width = 50 - Height = 13 - Caption = 'Pagination' - end - object lblSize: TLabel - Left = 5 - Top = 178 - Width = 19 - Height = 13 - Caption = 'Size' - end - object chbxTransparentRoot: TCheckBox - Left = 90 - Top = 26 - Width = 166 - Height = 17 - Caption = '&Root' - TabOrder = 0 - OnClick = TransparentClick - end - object chbxTransparentControls: TCheckBox - Tag = 1 - Left = 90 - Top = 47 - Width = 166 - Height = 17 - Caption = 'Controls' - TabOrder = 1 - OnClick = TransparentClick - end - object chbxTransparentContainers: TCheckBox - Tag = 2 - Left = 90 - Top = 67 - Width = 166 - Height = 17 - Caption = 'Containers' - TabOrder = 2 - OnClick = TransparentClick - end - object chbxTransparentGraphics: TCheckBox - Tag = 3 - Left = 90 - Top = 88 - Width = 166 - Height = 17 - Caption = '&Graphics' - TabOrder = 3 - OnClick = TransparentClick - end - object chbxTransparentGroups: TCheckBox - Tag = 4 - Left = 270 - Top = 26 - Width = 166 - Height = 17 - Caption = '&Groups' - TabOrder = 4 - OnClick = TransparentClick - end - object chbxTransparentItems: TCheckBox - Tag = 5 - Left = 270 - Top = 47 - Width = 166 - Height = 17 - Caption = '&Items' - TabOrder = 5 - OnClick = TransparentClick - end - object chbxPaginateByControlDetails: TCheckBox - Left = 90 - Top = 131 - Width = 166 - Height = 17 - Caption = 'Control Details' - TabOrder = 6 - OnClick = PaginationClick - end - object chbxPaginateByControls: TCheckBox - Tag = 1 - Left = 90 - Top = 152 - Width = 166 - Height = 17 - Caption = 'Controls' - TabOrder = 7 - OnClick = PaginationClick - end - object chbxPaginateByGroups: TCheckBox - Tag = 2 - Left = 270 - Top = 131 - Width = 166 - Height = 17 - Caption = '&Groups' - TabOrder = 8 - OnClick = PaginationClick - end - object chbxPaginateByItems: TCheckBox - Tag = 3 - Left = 270 - Top = 152 - Width = 166 - Height = 17 - Caption = '&Items' - TabOrder = 9 - OnClick = PaginationClick - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 199 - Width = 166 - Height = 17 - Caption = 'Auto Width' - TabOrder = 10 - OnClick = SizeClick - end - end - object tshReportLinks: TTabSheet - Caption = 'Aggregated Links' - ImageIndex = 1 - OnResize = tshReportLinksResize - object pnlBtnSite: TPanel - Left = 474 - Top = 0 - Width = 92 - Height = 243 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btnLinksDesign: TButton - Left = 7 - Top = 22 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Design...' - TabOrder = 0 - OnClick = DesignClick - end - object btnLinksRemoveInconsistents: TButton - Left = 7 - Top = 50 - Width = 80 - Height = 37 - Caption = 'Remove Unneeded' - TabOrder = 1 - OnClick = btnLinksRemoveInconsistentsClick - end - end - object pnlLinkListsSite: TPanel - Left = 0 - Top = 0 - Width = 474 - Height = 243 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object pnlAvailableLinksSite: TPanel - Left = 0 - Top = 0 - Width = 216 - Height = 243 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object lblAvailableLinks: TLabel - Left = 1 - Top = 5 - Width = 73 - Height = 13 - Caption = '&Available Links:' - FocusControl = lbxAvailableLinks - end - object lbxAvailableLinks: TListBox - Left = 0 - Top = 22 - Width = 216 - Height = 221 - Style = lbOwnerDrawFixed - Align = alBottom - Anchors = [akLeft, akTop, akRight, akBottom] - DragMode = dmAutomatic - ItemHeight = 15 - MultiSelect = True - TabOrder = 0 - OnClick = lbxAggregatedLinksClick - OnDblClick = lbxAvailableLinksDblClick - OnDragDrop = lbxAvailableLinksDragDrop - OnDragOver = lbxAvailableLinksDragOver - OnDrawItem = lbxAggregatedLinksDrawItem - OnKeyDown = lbxAvailableLinksKeyDown - end - end - object pnlMoveButtonsSite: TPanel - Left = 216 - Top = 0 - Width = 42 - Height = 243 - Align = alLeft - BevelOuter = bvNone - TabOrder = 1 - object sbtnRemove: TSpeedButton - Left = 8 - Top = 133 - Width = 26 - Height = 26 - Glyph.Data = { - F6000000424DF600000000000000760000002800000010000000100000000100 - 0400000000008000000000000000000000001000000000000000000000000000 - 8000008000000080800080000000800080008080000080808000C0C0C0000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00DDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0DD - DDDDDDDDDDDD00DDDDDDDDDDDDD000DDDDDDDDDDDD0000DDDDDDDDDDD00000DD - DDDDDDDDDD0000DDDDDDDDDDDDD000DDDDDDDDDDDDDD00DDDDDDDDDDDDDDD0DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD} - OnClick = sbtnRemoveClick - end - object sbtnAdd: TSpeedButton - Left = 8 - Top = 98 - Width = 26 - Height = 26 - Glyph.Data = { - F6000000424DF600000000000000760000002800000010000000100000000100 - 0400000000008000000000000000000000001000000000000000000000000000 - 8000008000000080800080000000800080008080000080808000C0C0C0000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00DDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0DDDDD - DDDDDDDDDD00DDDDDDDDDDDDDD000DDDDDDDDDDDDD0000DDDDDDDDDDDD00000D - DDDDDDDDDD0000DDDDDDDDDDDD000DDDDDDDDDDDDD00DDDDDDDDDDDDDD0DDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD} - OnClick = sbtnAddClick - end - end - object pnlAggregatedLinksSite: TPanel - Left = 258 - Top = 0 - Width = 216 - Height = 243 - Align = alClient - BevelOuter = bvNone - TabOrder = 2 - object lblAggregatedLinks: TLabel - Left = 1 - Top = 5 - Width = 87 - Height = 13 - Caption = 'A&ggregated Links:' - FocusControl = lbxAggregatedLinks - end - object lbxAggregatedLinks: TListBox - Left = 0 - Top = 22 - Width = 216 - Height = 221 - Style = lbOwnerDrawFixed - Align = alBottom - Anchors = [akLeft, akTop, akRight, akBottom] - DragMode = dmAutomatic - ItemHeight = 15 - MultiSelect = True - TabOrder = 0 - OnClick = lbxAggregatedLinksClick - OnDblClick = lbxAggregatedLinksDblClick - OnDragDrop = lbxAggregatedLinksDragDrop - OnDragOver = lbxAggregatedLinksDragOver - OnDrawItem = lbxAggregatedLinksDrawItem - OnKeyDown = lbxAggregatedLinksKeyDown - end - end - end - end - object tshControls: TTabSheet - Caption = 'Controls' - ImageIndex = 2 - object btnControlsCheckAll: TButton - Left = 481 - Top = 4 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Check All' - TabOrder = 1 - OnClick = TreeViewCheckAllClick - end - object btnControlsExpandAll: TButton - Left = 481 - Top = 32 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = 'E&xpand All' - TabOrder = 2 - OnClick = TreeViewExpandAllClick - end - object tvControls: TTreeView - Left = 0 - Top = 0 - Width = 474 - Height = 243 - Align = alLeft - Anchors = [akLeft, akTop, akRight, akBottom] - HideSelection = False - Indent = 19 - ReadOnly = True - StateImages = ilControls - TabOrder = 0 - OnChange = TreeViewChange - OnClick = TreeViewClick - OnCustomDrawItem = TreeViewCustomDrawItem - OnKeyDown = TreeViewKeyDown - OnKeyPress = TreeViewKeyPress - OnMouseUp = TreeViewMouseUp - end - end - object tshHiddenControls: TTabSheet - Caption = 'Hidden Controls' - ImageIndex = 3 - object tvHiddenControls: TTreeView - Left = 0 - Top = 0 - Width = 474 - Height = 243 - Align = alLeft - Anchors = [akLeft, akTop, akRight, akBottom] - HideSelection = False - Indent = 19 - ReadOnly = True - StateImages = ilControls - TabOrder = 0 - OnChange = TreeViewChange - OnClick = TreeViewClick - OnCustomDrawItem = TreeViewCustomDrawItem - OnKeyDown = TreeViewKeyDown - OnKeyPress = TreeViewKeyPress - OnMouseUp = TreeViewMouseUp - end - object btnHiddenControlsCheckAll: TButton - Left = 481 - Top = 4 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Check All' - TabOrder = 1 - OnClick = TreeViewCheckAllClick - end - object btnHiddenControlsExpandAll: TButton - Left = 481 - Top = 32 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = 'E&xpand All' - TabOrder = 2 - OnClick = TreeViewExpandAllClick - end - end - end - object pmControls: TPopupMenu - Images = ilControlsPopup - OnPopup = pmControlsPopup - Left = 4 - Top = 285 - object miControlsCheckAll: TMenuItem - Caption = 'Check All' - ImageIndex = 0 - OnClick = TreeViewCheckAllClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miControlsCheckStandardControls: TMenuItem - Caption = 'Check Standard Unprintable Controls' - Visible = False - OnClick = UnhideStandardControlsClick - end - object miControlsUncheckStandardControls: TMenuItem - Caption = 'Uncheck Standard Unprintable Controls' - Visible = False - OnClick = HideStandardControlsClick - end - object miLine2: TMenuItem - Caption = '-' - Visible = False - end - object miControlsCheckAllChildren: TMenuItem - Caption = 'Check All Children' - OnClick = TreeViewCheckAllChildrenClick - end - object miControlsUncheckAllChildren: TMenuItem - Caption = 'Uncheck All Children' - OnClick = TreeViewUncheckAllChildrenClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miControlsExpandAll: TMenuItem - Caption = 'Expand All' - ImageIndex = 1 - OnClick = TreeViewExpandAllClick - end - end - object ilControls: TImageList - Left = 32 - Top = 285 - end - object ilControlsPopup: TImageList - Left = 60 - Top = 285 - Bitmap = { - 494C010105000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F00000000007F7F - 7F007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F00000000000000000000000000000000000000000000000000000000000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00000000000000000000BFBFBF00BFBFBF00BFBFBF0000000000000000000000 - 000000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF00BFBFBF00000000007F7F7F00BFBF - BF0000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00BFBFBF007F7F7F0000000000BFBFBF007F7F7F007F7F - 7F007F7F7F007F7F7F007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00BFBFBF0000000000FFFFFF00FFFFFF0000000000BFBFBF000000 - 00000000000000000000000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF000000 - 0000BFBFBF0000000000BFBFBF00BFBFBF00BFBFBF00FFFFFF007F7F7F000000 - 0000BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF00BFBF - BF00FFFFFF00000000007F7F7F0000000000BFBFBF00FFFFFF007F7F7F00BFBF - BF00BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000000000000000 - 0000FFFFFF00000000007F7F7F007F7F7F00BFBFBF0000000000BFBFBF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00FFFFFF00000000000000000000000000BFBFBF00BFBFBF000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00FFFFFF00FFFFFF00BFBFBF00BFBFBF007F7F7F007F7F - 7F007F7F7F00000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF000000000000000000BFBFBF00BFBF - BF00000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00007F7F7F0000000000BFBFBF00BFBFBF00BFBFBF00000000007F7F7F000000 - 00007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F0000000000000000000000000000000000000000007F7F7F00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF0000800000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000808080000000000000000000FFFFFF00FFFFFF00FFFFFF0000800000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000808080000000000000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C000000000000000000000000000000000008080 - 8000000000000000000000000000FFFFFF00FFFFFF0000800000008000000080 - 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF00FFFFFF0000800000008000000080 - 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF0000000000FFFFFF000080000000800000008000000080 - 000000800000FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF000080000000800000008000000080 - 000000800000FFFFFF00FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF0000000000FFFFFF000080000000800000FFFFFF000080 - 00000080000000800000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF000080000000800000FFFFFF000080 - 00000080000000800000FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C000000000008080800000000000000000000000 - 0000FFFFFF00FFFFFF0000000000FFFFFF0000800000FFFFFF00FFFFFF00FFFF - FF000080000000800000FFFFFF00000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000800000FFFFFF00FFFFFF00FFFF - FF000080000000800000FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C0000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF000080000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000800000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000800000FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C0000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF000080000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C0000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF000080000080808000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0080808000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000000000000000000000000 - 000000000000C0C0C00080808000000000000000000000000000000000000000 - 00000000000000000000000000008080800000000000FFFFFF00008000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000800000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C00000000000000000000000000000000000FFFFFF00008000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 00000000000080808000000000000000000000000000FFFFFF00008000008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000800000FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000008080800000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF00FC7F000000000000FC27000000000000 - EC23000000000000C4010000000000008001000000000000C001000000000000 - E000000000000000000000000000000000000000000000000003000000000000 - E003000000000000C0010000000000008003000000000000C407000000000000 - EC3F000000000000FC7F000000000000FC00BBFFBC00BC00FC00BB00BC00BC00 - FC00B800B000B000E000BB0080008000E000BBFFB000B000E000B003B000B000 - 00008003B000B0000000B003B000B0000000BFFFB000B0000000B00380008000 - 00078003B003B0030007B003B003B0030007BFFFBFFFBFFF003F003F00030003 - 003F003F00030003003F003F0003000300000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSContainerLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSContainerLnk.pas deleted file mode 100644 index aa3cc114..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSContainerLnk.pas +++ /dev/null @@ -1,6817 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSContainerLnk; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, Classes, Controls, Graphics, StdCtrls, ExtCtrls, ComCtrls, - TabNotBk, Forms, ImgList, Menus, dxBase, dxPSCore, dxPSSngltn, dxPSShapes, - dxPSForm, dxPSFillPatterns, dxPSStandardFillPatterns, Buttons, cxDrawTextUtils; - -type - TdxCustomContainerReportLink = class; - TdxCustomContainerReportLinkOptionsItemPlaceClass = class of TdxCustomContainerReportLinkOptionsItemPlace; - TdxCustomContainerReportLinkOptionsItemPlace = class; - TdxCustomContainerReportLinkOptionsPaginationClass = class of TdxCustomContainerReportLinkOptionsPagination; - TdxCustomContainerReportLinkOptionsPagination = class; - TdxCustomContainerReportLinkOptionsTransparentClass = class of TdxCustomContainerReportLinkOptionsTransparent; - TdxCustomContainerReportLinkOptionsTransparent = class; - TdxfmCustomContainerDesignWindow = class; - - { Report Items } - - TdxReportWinControlHost = class(TdxReportCell) - private - function GetHasControlItem: Boolean; - protected - procedure BoundsChanged; override; - function GetControlItem: TdxReportVisualItem; virtual; - public - function MeasureHeight(DC: HDC): Integer; override; - function MeasureWidth(DC: HDC): Integer; override; - - property ControlItem: TdxReportVisualItem read GetControlItem; - property HasControlItem: Boolean read GetHasControlItem; - end; - - TdxReportNativePrintableControlHost = class(TdxReportWinControlHost) - protected - function GetControlItem: TdxReportVisualItem; override; - procedure BoundsChanged; override; - end; - - { Definitions } - - TdxPSCustomContainerItemDefinitionClass = class of TdxPSCustomContainerItemDefinition; - - TdxPSCustomContainerItemDefinition = class(TPersistent) - private - FComponent: TComponent; - FOptionsPlace: TdxCustomContainerReportLinkOptionsItemPlace; - FReportItem: TdxReportVisualItem; - FReportLink: TdxCustomContainerReportLink; - function GetRootContainer: TWinControl; - function GetTopLevelRootContainer: TWinControl; - protected - procedure AddDelimitersHorz(AList: TList); virtual; - procedure AddDelimitersVert(AList: TList); virtual; - procedure AddReportItemToDelimitersHorz(AList: TList); - procedure AddReportItemToDelimitersVert(AList: TList); - - function GetSizeChangeReportItem: TdxReportVisualItem; virtual; - function GetSizeMeasureReportItem: TdxReportVisualItem; virtual; - public - constructor Create(AReportLink: TdxCustomContainerReportLink; AComponent: TComponent; AReportItem: TdxReportVisualItem); virtual; - destructor Destroy; override; - - function OptionsPagination: TdxCustomContainerReportLinkOptionsPagination; overload; virtual; - - property Component: TComponent read FComponent write FComponent; - property OptionsPlace: TdxCustomContainerReportLinkOptionsItemPlace read FOptionsPlace; - property ReportItem: TdxReportVisualItem read FReportItem write FReportItem; - property ReportLink: TdxCustomContainerReportLink read FReportLink; - property RootContainer: TWinControl read GetRootContainer; - property TopLevelRootContainer: TWinControl read GetTopLevelRootContainer; - property SizeChangeReportItem: TdxReportVisualItem read GetSizeChangeReportItem; - property SizeMeasureReportItem: TdxReportVisualItem read GetSizeMeasureReportItem; - end; - - TdxPSContainerControlDefinition = class(TdxPSCustomContainerItemDefinition) - private - function GetControl: TControl; - procedure SetControl(Value: TControl); - protected - procedure AddDelimitersHorz(AList: TList); override; - procedure AddDelimitersVert(AList: TList); override; - public - property Control: TControl read GetControl write SetControl; - end; - - TdxPSNativePrintableControlDefinition = class(TdxPSContainerControlDefinition) - private - FDelimitersHorz: TList; - FDelimitersVert: TList; - FReportDimension: TPoint; - function GetDelimitersOffset: TPoint; - protected - procedure AddDelimitersHorz(AList: TList); override; - procedure AddDelimitersVert(AList: TList); override; - procedure GetData(AReportLink: TBasedxReportLink); - procedure ShiftDelimiters; - - function GetSizeChangeReportItem: TdxReportVisualItem; override; - - property DelimitersOffset: Tpoint read GetDelimitersOffset; - property DelimitersHorz: TList read FDelimitersHorz; - property DelimitersVert: TList read FDelimitersVert; - property ReportDimension: TPoint read FReportDimension; - public - constructor Create(AReportLink: TdxCustomContainerReportLink; AComponent: TComponent; AReportItem: TdxReportVisualItem); override; - destructor Destroy; override; - end; - - TdxPSContainerWinControlDefinition = class(TdxPSContainerControlDefinition) - protected - function GetSizeChangeReportItem: TdxReportVisualItem; override; - end; - - TdxPSContainerDefinition = class(TdxPSContainerWinControlDefinition) - protected - function GetSizeMeasureReportItem: TdxReportVisualItem; override; - end; - - { Iterators } - - IdxPSContainerIterator = interface - ['{B18A68C0-5505-42AC-9B8D-B96C79A2725E}'] - function GetControl(Index: Integer): TControl; - function GetControlCount: Integer; - procedure GoBeforeBOF; - procedure GoBeyondEOF; - function IsBOF: Boolean; - function IsEOF: Boolean; - function Next: TControl; - function Prev: TControl; - - property ControlCount: Integer read GetControlCount; - property Controls[Index: Integer]: TControl read GetControl; - end; - - TdxPSWinControlIteratorClass = class of TdxPSWinControlIterator; - - TdxPSWinControlIterator = class(TInterfacedObject, IdxPSContainerIterator) - private - FControl: TWinControl; - FCounter: Integer; - protected - { IdxPSContainerIterator } - function GetControl(Index: Integer): TControl; virtual; - function GetControlCount: Integer; virtual; - procedure GoBeforeBOF; virtual; - procedure GoBeyondEOF; virtual; - function IsBOF: Boolean; virtual; - function IsEOF: Boolean; virtual; - function Next: TControl; virtual; - function Prev: TControl; virtual; - - property ControlCount: Integer read GetControlCount; - property Controls[Index: Integer]: TControl read GetControl; - public - constructor Create(AControl: TWinControl); virtual; - class function ContainerClass: TWinControlClass; virtual; - property Control: TWinControl read FControl; - end; - - { Producers } - - TdxPSCustomProducerClass = class of TdxPSCustomProducer; - - TdxPSCustomProducer = class(TdxCustomClassMapItem) - private - FProducingObject: TComponent; - FReportLink: TdxCustomContainerReportLink; - function GetDC: HDC; - function GetDefinition(Component: TComponent): TdxPSCustomContainerItemDefinition; - function GetIsDesigning: Boolean; - function GetProducer(Component: TComponent): TdxPSCustomProducer; - protected - class function BuddyClass: TdxPSCustomProducerClass; virtual; - class function HelperProducer: TdxPSCustomProducerClass; virtual; - - function CanProcessChild(AChildControl: TControl): Boolean; virtual; - - function GetScrollPosLeft: Integer; virtual; - function GetScrollPosTop: Integer; virtual; - procedure GetImageLists(AProc: TdxPSGetImageListProc); virtual; - procedure InitializeOptionsPlace(AnOptions: TdxCustomContainerReportLinkOptionsItemPlace); virtual; - - procedure DoReposition; virtual; - function MeasureItemHeight(AnItem: TdxReportVisualItem): Integer; virtual; - function MeasureItemWidth(AnItem: TdxReportVisualItem): Integer; virtual; - function ObjectExpandHeight: Boolean; virtual; - function ObjectExpandWidth: Boolean; virtual; - function ObjectShrinkHeight: Boolean; virtual; - function ObjectShrinkWidth: Boolean; virtual; - - function OptionsTransparent: TdxCustomContainerReportLinkOptionsTransparent; overload; virtual; - - property DC: HDC read GetDC; - property Definitions[Component: TComponent]: TdxPSCustomContainerItemDefinition read GetDefinition; - property IsDesigning: Boolean read GetIsDesigning; - property Producers[Component: TComponent]: TdxPSCustomProducer read GetProducer; - property ScrollPosLeft: Integer read GetScrollPosLeft; - property ScrollPosTop: Integer read GetScrollPosTop; - public - constructor Create(AReportLink: TdxCustomContainerReportLink; AnObject: TComponent); virtual; - - class function CanHasAvailableChildren: Boolean; virtual; - class function HasNativeSupportForBorders: Boolean; virtual; - class function Reenterable: Boolean; virtual; - - function Definition: TdxPSCustomContainerItemDefinition; overload; virtual; - class function DefinitionClass: TdxPSCustomContainerItemDefinitionClass; virtual; // must be overriden - - procedure Initialize(AnObject: TComponent); virtual; - - function ProducingObject: TComponent; overload; virtual; - function ProducingObjectFriendlyName: string; virtual; - - function ReportLink: TdxCustomContainerReportLink; overload; virtual; - procedure Reposition; virtual; - function RootContainer: TWinControl; overload; virtual; - function TopLevelRootContainer: TWinControl; overload; virtual; - - class procedure Register; virtual; - class procedure Unregister; virtual; - end; - - TdxPSCustomContainerItemProducerClass = class of TdxPSCustomContainerItemProducer; - - TdxPSCustomContainerItemProducer = class(TdxPSCustomProducer) - private - function GetControlBounds: TRect; - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - function CreateIterator: IdxPSContainerIterator; virtual; - - function GetContentColor: TColor; virtual; - function GetControlBoundsRect: TRect; virtual; - function GetFont: TFont; virtual; - function GetFontColor: TColor; virtual; - function GetFontIndex: Integer; virtual; - function GetFontName: string; virtual; - function GetFontStyle: TFontStyles; virtual; - function IsFontSubstitutable: Boolean; virtual; - - function HostClass: TdxReportCellClass; virtual; - procedure InitializeHost(ACell: TdxReportCell); virtual; - procedure InitializeItem(AnItem: TdxReportVisualItem); virtual; - function ItemClass: TdxReportVisualItemClass; virtual; - public - function Control: TControl; overload; virtual; - class function ControlClass: TControlClass; virtual; - - function Definition: TdxPSContainerControlDefinition; reintroduce; overload; - class function DefinitionClass: TdxPSCustomContainerItemDefinitionClass; override; - - class function PairClass: TClass; override; - - function ProducingObject: TControl; reintroduce; overload; - function ProducingObjectFriendlyName: string; override; - - property ContentColor: TColor read GetContentColor; - property ControlBounds: TRect read GetControlBounds; - property Font: TFont read GetFont; - property FontColor: TColor read GetFontColor; - property FontIndex: Integer read GetFontIndex; - property FontName: string read GetFontName; - property FontStyle: TFontStyles read GetFontStyle; - end; - - TdxPSCustomDelegateProducer = class(TdxPSCustomContainerItemProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - function Producer: TdxPSCustomContainerItemProducer; virtual; abstract; - end; - - TdxPSNativePrintableControlProducerClass = class of TdxPSNativePrintableControlProducer; - - TdxPSNativePrintableControlProducer = class(TdxPSCustomContainerItemProducer) - private - FIsOuterLinkUsed: Boolean; - protected - procedure AdjustItemBounds(AnItem: TdxReportVisualItem); virtual; - - function CreateControlReportLink: TBasedxReportLink; - procedure CreateNativePrintableControlData(AnItem: TdxReportVisualItem); - procedure DeinitializeReportLink(AControlReportLink: TBasedxReportLink); virtual; - class function GetLinkClass(AClass: TClass): TdxReportLinkClass; - class function HasReportLink(AComponent: TComponent): Boolean; - procedure InitializeReportLink(AControlReportLink: TBasedxReportLink); virtual; - - function HostClass: TdxReportCellClass; override; - procedure InitializeHost(ACell: TdxReportCell); override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - procedure InitializeNativePrintableControlHost(AnItem: TdxReportVisualItem); virtual; - function ItemClass: TdxReportVisualItemClass; override; - - function MeasureItemHeight(AnItem: TdxReportVisualItem): Integer; override; - function MeasureItemWidth(AnItem: TdxReportVisualItem): Integer; override; - function ObjectExpandHeight: Boolean; override; - function ObjectExpandWidth: Boolean; override; - - property IsOuterLinkUsed: Boolean read FIsOuterLinkUsed; - public - class function Reenterable: Boolean; override; - function Definition: TdxPSNativePrintableControlDefinition; reintroduce; overload; - class function DefinitionClass: TdxPSCustomContainerItemDefinitionClass; override; - - class function HasNativeSupportForBorders: Boolean; override; - - class procedure Register; override; - class procedure Unregister; override; - end; - - TdxPSContainerControlProducer = class(TdxPSCustomContainerItemProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - end; - - TdxPSControlAsMetafileProducer = class(TdxPSContainerControlProducer) - protected - class function BuddyClass: TdxPSCustomProducerClass; override; - function CreateControlImage(AnItem: TdxReportVisualItem): TGraphic; virtual; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - class function PairClass: TClass; override; - class procedure Register; override; - class procedure Unregister; override; - - procedure Reposition; override; - end; - - TdxPSBevelProducer = class(TdxPSContainerControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TBevel; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSPaintBoxProducer = class(TdxPSContainerControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TPaintBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSShapeProducer = class(TdxPSContainerControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TShape; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSCustomLabelProducer = class(TdxPSContainerControlProducer) - protected - function GetControlBoundsRect: TRect; override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - function ObjectExpandHeight: Boolean; override; - function ObjectExpandWidth: Boolean; override; - public - function Control: TCustomLabel; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSContainerCustomWinControlProducer = class(TdxPSContainerControlProducer) - protected - function CreateIterator: IdxPSContainerIterator; override; - function HostClass: TdxReportCellClass; override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - class function IteratorClass: TdxPSWinControlIteratorClass; virtual; - public - function Control: TWinControl; reintroduce; overload; - class function ControlClass: TControlClass; override; - class function DefinitionClass: TdxPSCustomContainerItemDefinitionClass; override; - end; - - TdxPSWinControlAsMetafileProducer = class(TdxPSContainerCustomWinControlProducer) - protected - class function BuddyClass: TdxPSCustomProducerClass; override; - function CreateControlImage(AnItem: TdxReportVisualItem): TGraphic; virtual; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - class function PairClass: TClass; override; - procedure Reposition; override; - class procedure Register; override; - class procedure Unregister; override; - end; - - TdxPSContainerWinControlProducer = class(TdxPSContainerCustomWinControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - function ObjectExpandHeight: Boolean; override; - end; - - TdxPSDateTimePickerProducer = class(TdxPSContainerWinControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TDateTimePicker; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSCustomHotKeyProducer = class(TdxPSContainerWinControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - public - function Control: TCustomHotKey; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSCustomStaticTextProducer = class(TdxPSContainerWinControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - public - function Control: TCustomStaticText; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSCustomEditProducer = class(TdxPSContainerWinControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - public - function Control: TCustomEdit; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSCustomMemoProducer = class(TdxPSCustomEditProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ObjectExpandHeight: Boolean; override; - public - function Control: TCustomMemo; reintroduce; overload; - class function ControlClass: TControlClass; override; - - function ProducingObjectFriendlyName: string; override; - end; - - TdxPSCustomComboBoxProducer = class(TdxPSContainerWinControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - public - function Control: TCustomComboBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - {$IFDEF DELPHI6} - TdxPSCustomComboBoxExProducer = class(TdxPSContainerWinControlProducer) - protected - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TCustomComboBoxEx; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - {$ENDIF} - - TdxPSCustomCheckBoxProducer = class(TdxPSContainerWinControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TCustomCheckBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSRadioButtonProducer = class(TdxPSContainerWinControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TRadioButton; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSCustomContainerProducerClass = class of TdxPSCustomContainerProducer; - - TdxPSCustomContainerProducer = class(TdxPSContainerCustomWinControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ObjectExpandHeight: Boolean; override; - function ObjectExpandWidth: Boolean; override; - function ObjectShrinkHeight: Boolean; override; - function ObjectShrinkWidth: Boolean; override; - public - class function CanHasAvailableChildren: Boolean; override; - class function DefinitionClass: TdxPSCustomContainerItemDefinitionClass; override; - end; - - TdxPSCustomPanelProducer = class(TdxPSCustomContainerProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - function ObjectExpandHeight: Boolean; override; - function ObjectExpandWidth: Boolean; override; - public - function Control: TCustomPanel; reintroduce; overload; - class function ControlClass: TControlClass; override; - - class function HasNativeSupportForBorders: Boolean; override; - end; - - TdxPSCustomGroupBoxProducer = class(TdxPSCustomContainerProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - procedure InitializeLookAndFeel(AnItem: TdxReportVisualItem; ALookAndFeel: TdxPSReportGroupLookAndFeel); - function ItemClass: TdxReportVisualItemClass; override; - class function LookAndFeelClass: TdxPSReportGroupLookAndFeelClass; virtual; - public - function Control: TCustomGroupBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - - class function HasNativeSupportForBorders: Boolean; override; - end; - - TdxPSCustomRadioGroupProducer = class(TdxPSCustomGroupBoxProducer) - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - procedure CreateItems(AReportRadioGroup: TdxReportRadioGroup); - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - procedure InitializeRadioItem(AnItem: TdxCustomReportCellRadio; AnIndex: Integer); virtual; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TCustomRadioGroup; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSRootContainerProducer = class(TdxPSCustomContainerProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - end; - - TdxPSTabControlProducer = class(TdxPSRootContainerProducer) - public - function Control: TTabControl; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSPageControlIterator = class(TdxPSWinControlIterator) - private - function GetPageControl: TPageControl; - protected - function GetControl(Index: Integer): TControl; override; - function GetControlCount: Integer; override; - public - property PageControl: TPageControl read GetPageControl; - end; - - TdxPSTabSheetProducer = class(TdxPSRootContainerProducer) - public - function Control: TTabSheet; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSPageControlProducer = class(TdxPSRootContainerProducer)//TdxPSCustomDelegateProducer) - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - class function IteratorClass: TdxPSWinControlIteratorClass; override; - public - function Control: TPageControl; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSNotebookIterator = class(TdxPSWinControlIterator) - private - function GetNotebook: TNotebook; - protected - function GetControl(Index: Integer): TControl; override; - function GetControlCount: Integer; override; - public - property Notebook: TNotebook read GetNotebook; - end; - - TdxPSNotebookPageProducer = class(TdxPSRootContainerProducer) - public - function Control: TPage; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSNotebookProducer = class(TdxPSRootContainerProducer) - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - class function IteratorClass: TdxPSWinControlIteratorClass; override; - public - function Control: TNoteBook; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSTabbedNotebookIterator = class(TdxPSWinControlIterator) - private - function GetTabbedNotebook: TTabbedNotebook; - protected - function GetControl(Index: Integer): TControl; override; - function GetControlCount: Integer; override; - public - property TabbedNotebook: TTabbedNotebook read GetTabbedNotebook; - end; - - TdxPSTabbedNotebookPageProducer = class(TdxPSRootContainerProducer) - public - function Control: TTabPage; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSTabbedNotebookProducer = class(TdxPSRootContainerProducer) - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - class function IteratorClass: TdxPSWinControlIteratorClass; override; - public - function Control: TTabbedNotebook; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSScrollingWinControlProducer = class(TdxPSRootContainerProducer) - protected - function GetScrollBarPos(AScrollBar: TControlScrollBar): Integer; virtual; - function GetScrollPosLeft: Integer; override; - function GetScrollPosTop: Integer; override; - - procedure InitializeHost(ACell: TdxReportCell); override; - - function ObjectExpandHeight: Boolean; override; - function ObjectExpandWidth: Boolean; override; - public - function Control: TScrollingWinControl; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - {$IFDEF DELPHI5} - TdxPSCustomFrameProducer = class(TdxPSScrollingWinControlProducer) - public - function Control: TCustomFrame; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - {$ENDIF} - - TdxPSCustomFormProducer = class(TdxPSScrollingWinControlProducer) - public - function Control: TCustomForm; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - { container builder } - - TdxPSContainerBuilderClass = class of TdxPSContainerBuilder; - - TdxPSContainerBuilder = class(TdxCustomClassMapItem) - private - FContainer: TWinControl; - FCurrentControl: TControl; - FHost: TdxReportCell; - FParentBuilder: TdxPSContainerBuilder; - FParentHost: TdxReportCell; - FReportLink: TdxCustomContainerReportLink; - function GetDC: HDC; - function GetIsRoot: Boolean; - function GetProducer(AControl: TControl): TdxPSCustomContainerItemProducer; - protected - procedure BuildNestedControls; - function CreateHost: TdxReportCell; virtual; - function CreateItemDefinition(AComponent: TComponent; AnItem: TdxReportVisualItem): TdxPSCustomContainerItemDefinition; - function CreateNestedControlsIterator: IdxPSContainerIterator; virtual; - function GetParentHost: TdxReportCell; virtual; - function HasAvailableChildren(AControl: TControl): Boolean; virtual; - procedure InitializeHost; virtual; - procedure InitializeItem(AnItem: TdxReportVisualItem); virtual; - - function IsAborted: Boolean; - procedure Progress(const APercentDone: Double); - - property CurrentControl: TControl read FCurrentControl; - property DC: HDC read GetDC; - property Producers[AControl: TControl]: TdxPSCustomContainerItemProducer read GetProducer; - public - constructor Create(AReportLink: TdxCustomContainerReportLink; AContainer: TWinControl; - AParentBuilder: TdxPSContainerBuilder; AParentHost: TdxReportCell = nil); virtual; - destructor Destroy; override; - - function Build: TdxReportCell; virtual; - function BuildControl(AControl: TControl; AParentHost: TdxReportCell = nil): TdxReportVisualItem; - function BuildNestedContainer(AContainer: TWinControl; AParentHost: TdxReportCell = nil): TdxReportCell; - - class function ContainerClass: TWinControlClass; virtual; - class function PairClass: TClass; override; - class procedure Register; - class procedure Unregister; - - property Container: TWinControl read FContainer; - property Host: TdxReportCell read FHost; - property IsRoot: Boolean read GetIsRoot; - property ParentBuilder: TdxPSContainerBuilder read FParentBuilder; - property ParentHost: TdxReportCell read GetParentHost; - property ReportLink: TdxCustomContainerReportLink read FReportLink; - end; - - TdxPSContainerReportLinkCustomCache = class(TdxCustomCache) - private - FReportLink: TdxCustomContainerReportLink; - public - constructor Create(AReportLink: TdxCustomContainerReportLink); virtual; - function ReportLink: TdxCustomContainerReportLink; overload; virtual; - end; - - TdxPSCustomProducerCache = class(TdxPSContainerReportLinkCustomCache) - private - function GetItem(Index: Integer): TdxPSCustomProducer; - function GetProducer(ProducerClass: TdxPSCustomProducerClass; Component: TComponent): TdxPSCustomProducer; - protected - property Items[Index: Integer]: TdxPSCustomProducer read GetItem; - public - property Producers[ProducerClass: TdxPSCustomProducerClass; Component: TComponent]: TdxPSCustomProducer read GetProducer; default; - end; - - { Options } - - TdxCustomContainerReportLinkOptionsClass = class of TdxCustomContainerReportLinkOptions; - - TdxCustomContainerReportLinkOptions = class(TPersistent) - private - FReportLink: TdxCustomContainerReportLink; - protected - procedure Changed; dynamic; - public - constructor Create(AReportLink: TdxCustomContainerReportLink); virtual; - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; virtual; - - property ReportLink: TdxCustomContainerReportLink read FReportLink; - end; - - TdxCustomContainerReportLinkOptionsBehaviorClass = class of TdxCustomContainerReportLinkOptionsBehavior; - - TdxCustomContainerReportLinkOptionsBehavior = class(TdxCustomContainerReportLinkOptions) - private - FConsumeExistingLinks: Boolean; - procedure SetConsumeExistingLinks(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property ConsumeExistingLinks: Boolean read FConsumeExistingLinks write SetConsumeExistingLinks default True; // obsolete - Aggregated Links always consumed - end; - - TdxCustomContainerReportLinkOptionsDesignerTabsClass = class of TdxCustomContainerReportLinkOptionsDesignerTabs; - - TdxCustomContainerReportLinkOptionsDesignerTabs = class(TdxCustomContainerReportLinkOptions) - private - FAutoHideReportLinksIfEmpty: Boolean; - FControls: Boolean; - FReportLinks: Boolean; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property AutoHideReportLinksIfEmpty: Boolean read FAutoHideReportLinksIfEmpty write FAutoHideReportLinksIfEmpty default True; - property Controls: Boolean read FControls write FControls default True; - property ReportLinks: Boolean read FReportLinks write FReportLinks default True; - end; - - TdxCustomContainerReportLinkOptionsItemPlace = class(TdxCustomContainerReportLinkOptions) - private - FExpandHeight: Boolean; - FExpandWidth: Boolean; - FShrinkHeight: Boolean; - FShrinkWidth: Boolean; - protected - function GetData: Integer; virtual; - procedure SetData(Value: Integer); virtual; - - procedure ReadData(AStream: TStream); virtual; - procedure WriteData(AStream: TStream); virtual; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function HasHorzResizing: Boolean; - function HasVertResizing: Boolean; - - procedure SetAll; - procedure UnsetAll; - published - property ExpandHeight: Boolean read FExpandHeight write FExpandHeight default False; - property ExpandWidth: Boolean read FExpandWidth write FExpandWidth default False; - property ShrinkHeight: Boolean read FShrinkHeight write FShrinkHeight default False; - property ShrinkWidth: Boolean read FShrinkWidth write FShrinkWidth default False; - end; - - TdxCustomContainerReportLinkOptionsPagination = class(TdxCustomContainerReportLinkOptions) - private - FControlDetails: Boolean; - FControls: Boolean; - procedure SetControlDetails(Value: Boolean); - procedure SetControls(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property ControlDetails: Boolean read FControlDetails write SetControlDetails default True; - property Controls: Boolean read FControls write SetControls default True; - end; - - TdxCustomContainerReportLinkOptionsRefinementsClass = class of TdxCustomContainerReportLinkOptionsRefinements; - - TdxCustomContainerReportLinkOptionsRefinements = class(TdxCustomContainerReportLinkOptions) - private - FRootBorders: Boolean; - procedure SetRootBorders(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property RootBorders: Boolean read FRootBorders write SetRootBorders default False; - end; - - TdxCustomContainerReportLinkOptionsTransparent = class(TdxCustomContainerReportLinkOptions) - private - FContainers: Boolean; - FControls: Boolean; - FGraphics: Boolean; - FRoot: Boolean; - procedure SetContainters(Value: Boolean); - procedure SetControls(Value: Boolean); - procedure SetGraphics(Value: Boolean); - procedure SetRoot(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property Containers: Boolean read FContainers write SetContainters default True; - property Controls: Boolean read FControls write SetControls default True; - property Graphics: Boolean read FGraphics write SetGraphics default False; - property Root: Boolean read FRoot write SetRoot default True; - end; - - TdxNodeObject = class - public - Caption: string; - Component: TComponent; - State: TCheckBoxState; - end; - - TdxPSReportLinkProcessingStage = (psBefore, psAfter); - - TdxContainerReportLinkCustomDrawItemEvent = procedure(Sender: TdxCustomContainerReportLink; - ACanvas: TCanvas; AnItem: TAbstractdxReportCellData; AComponent: TComponent; var ADone: Boolean) of object; - - TdxContainerReportLinkGetComponentReportLinkEvent = procedure(Sender: TdxCustomContainerReportLink; - AComponent: TComponent; var AReportLink: TBasedxReportLink) of object; - - TdxContainerReportLinkGetComponentCaptionEvent = procedure(Sender: TdxCustomContainerReportLink; - AComponent: TComponent; var ACaption: string) of object; - - TdxContainerReportLinkInitializeItemEvent = procedure(Sender: TdxCustomContainerReportLink; - AnItem: TdxReportVisualItem; AComponent: TComponent) of object; - - TdxContainerReportLinkInitializeItemOptionsPlaceEvent = procedure(Sender: TdxCustomContainerReportLink; - AnItem: TdxReportVisualItem; AComponent: TComponent; AOptionsPlace: TdxCustomContainerReportLinkOptionsItemPlace) of object; - - TdxContainerReportLinkInitializeReportLinkEvent = procedure(Sender: TdxCustomContainerReportLink; - AReportLink: TBasedxReportLink; AStage: TdxPSReportLinkProcessingStage) of object; - - TdxContainerReportLinkIsComponentProcessedEvent = procedure(Sender: TdxCustomContainerReportLink; - AComponent: TComponent; var AIsProcessed: Boolean) of object; - - TdxCustomContainerReportLink = class(TBasedxReportLink) - private - FActiveBuilder: TdxPSContainerBuilder; - FAggregatedReportLinks: TStrings; - FDefinitions: TList; - FDelimitersHorz: TList; - FDelimitersVert: TList; - FExcludedComponents: TStrings; - FHiddenComponents: TStrings; - FOptionsBehavior: TdxCustomContainerReportLinkOptionsBehavior; - FOptionsDesignerTabs: TdxCustomContainerReportLinkOptionsDesignerTabs; - //FOptionsItemPlace: TdxCustomContainerReportLinkOptionsItemPlace; {.2} - FOptionsPagination: TdxCustomContainerReportLinkOptionsPagination; - FOptionsRefinements: TdxCustomContainerReportLinkOptionsRefinements; - FOptionsTransparent: TdxCustomContainerReportLinkOptionsTransparent; - FPreparationFont: TFont; - FProducerCache: TdxPSCustomProducerCache; - FScreenDC: HDC; - FSupportedCustomDraw: Boolean; - FOnCustomDrawItem: TdxContainerReportLinkCustomDrawItemEvent; - FOnGetComponentCaption: TdxContainerReportLinkGetComponentCaptionEvent; - FOnGetComponentReportLink: TdxContainerReportLinkGetComponentReportLinkEvent; - FOnInitializeItem: TdxContainerReportLinkInitializeItemEvent; - FOnInitializeItemOptionsPlace: TdxContainerReportLinkInitializeItemOptionsPlaceEvent; - FOnInitializeReportLink: TdxContainerReportLinkInitializeReportLinkEvent; - FOnIsComponentProcessed: TdxContainerReportLinkIsComponentProcessedEvent; - function GetAggregatedReportLink(Index: Integer): TBasedxReportLink; - function GetAggregatedReportLinkCount: Integer; - function GetContainer: TWinControl; - function GetController: TdxCustomContainerReportLink; - function GetDefinition(Index: Integer): TdxPSCustomContainerItemDefinition; - function GetDefinitionByContainerItem(Component: TComponent): TdxPSCustomContainerItemDefinition; - function GetDefinitionByReportItem(Item: TdxReportVisualItem): TdxPSCustomContainerItemDefinition; - function GetDefinitionCount: Integer; - function GetDelimitersHorzCount: Integer; - function GetDelimitersHorzItem(Index: Integer): Integer; - function GetDelimitersVertCount: Integer; - function GetDelimitersVertItem(Index: Integer): Integer; - function GetDesignWindow: TdxfmCustomContainerDesignWindow; - function GetExcludedComponent(Index: Integer): TComponent; - function GetExcludedComponentCount: Integer; - function GetHiddenComponent(Index: Integer): TComponent; - function GetHiddenComponentCount: Integer; - function GetProducerByClass(ProducerClass: TdxPSCustomProducerClass; Component: TComponent): TdxPSCustomProducer; - function GetRootCell: TdxReportCell; - function GetTopLevelContainer: TWinControl; - procedure SetController(Value: TdxCustomContainerReportLink); - procedure SetOnCustomDrawItem(Value: TdxContainerReportLinkCustomDrawItemEvent); - procedure SetOptionsBehavior(Value: TdxCustomContainerReportLinkOptionsBehavior); - procedure SetOptionsDesignerTabs(Value: TdxCustomContainerReportLinkOptionsDesignerTabs); - //procedure SetOptionsItemPlace(Value: TdxCustomContainerReportLinkOptionsItemPlace); {.2} - procedure SetOptionsPagination(Value: TdxCustomContainerReportLinkOptionsPagination); - procedure SetOptionsRefinements(Value: TdxCustomContainerReportLinkOptionsRefinements); - procedure SetOptionsTransparent(Value: TdxCustomContainerReportLinkOptionsTransparent); - procedure SetSupportedCustomDraw(Value: Boolean); - - procedure LoadAggregatedReportLinks; - procedure ReadAggregatedReportLinks(Stream: TStream); - procedure WriteAggregatedReportLinks(Stream: TStream); - - procedure LoadExcludedComponents; - procedure ReadExcludedComponents(Stream: TStream); - procedure WriteExcludedComponents(Stream: TStream); - - procedure LoadHiddenComponents; - procedure ReadHiddenComponents(Stream: TStream); - procedure WriteHiddenComponents(Stream: TStream); - protected - procedure DefineProperties(Filer: TFiler); override; - procedure Loaded; override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - - procedure AfterDesignReport(ADone: Boolean); override; - procedure BeforeDesignReport; override; - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure ConvertCoords; override; - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - procedure DoApplyInDesigner; override; - procedure DoChangeComponent; override; - function GetDesignerClass: TdxReportLinkDesignWindowClass; override; - function GetEmptyPagesCanExist: Boolean; override; - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InternalRestoreDefaults; override; - - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - procedure MakeDelimiters(AReportCells: TdxReportCells; AHorzDelimiters, AVertDelimiters: TList); override; - - function BuildContainer(AContainer: TWinControl; AParentBuilder: TdxPSContainerBuilder; AParentHost: TdxReportCell = nil): TdxReportCell; - function CreateBuilder(AContainer: TWinControl; AParentBuilder: TdxPSContainerBuilder; AParentHost: TdxReportCell = nil): TdxPSContainerBuilder; - function CreateItemDefinition(AComponent: TComponent; AnItem: TdxReportVisualItem): TdxPSCustomContainerItemDefinition; - - function GetProducer(Component: TComponent): TdxPSCustomProducer; - - procedure DoCustomDrawItem(ACanvas: TCanvas; AnItem: TAbstractdxReportCellData; var ADone: Boolean); dynamic; - procedure DoGetComponentCaption(AComponent: TComponent; var ACaption: string); dynamic; - function DoGetReportLink(AComponent: TComponent): TBasedxReportLink; dynamic; - procedure DoInitializeItem(AnItem: TdxReportVisualItem); dynamic; - procedure DoInitializeItemOptionsPlace(AnItem: TdxReportVisualItem); dynamic; - procedure DoInitializeReportLink(AReportLink: TBasedxReportLink; AStage: TdxPSReportLinkProcessingStage); dynamic; - function DoIsComponentProcessed(AComponent: TComponent): Boolean; dynamic; - - procedure PrepareConstruct; virtual; - procedure UnprepareConstruct; virtual; - - procedure CreateOptions; virtual; - procedure DestroyOptions; virtual; - function GetOptionsBehaviorClass: TdxCustomContainerReportLinkOptionsBehaviorClass; dynamic; - function GetOptionsDesignerTabsClass: TdxCustomContainerReportLinkOptionsDesignerTabsClass; dynamic; - function GetOptionsItemPlaceClass: TdxCustomContainerReportLinkOptionsItemPlaceClass; dynamic; - function GetOptionsPaginationClass: TdxCustomContainerReportLinkOptionsPaginationClass; dynamic; - function GetOptionsRefinementsClass: TdxCustomContainerReportLinkOptionsRefinementsClass; dynamic; - function GetOptionsTransparentClass: TdxCustomContainerReportLinkOptionsTransparentClass; dynamic; - procedure OptionsModified(AnOptions: TdxCustomContainerReportLinkOptions); dynamic; - - procedure AddDefinition(ADefinition: TdxPSCustomContainerItemDefinition); - procedure ClearDefinitions; - procedure DeleteDefinition(Index: Integer); - function FindDefinition(AComponent: TComponent; out AnIndex: Integer): Boolean; overload; - function FindDefinition(AnItem: TdxReportVisualItem; out AnIndex: Integer): Boolean; overload; - procedure FreeAndNilDefinitions; - - procedure AddControl(ATreeView: TTreeView; AParent: TTreeNode; AControl: TControl); - procedure AddHiddenControl(ATreeView: TTreeView; AParent: TTreeNode; AControl: TControl); - function AddNode(ATreeView: TTreeView; AParent: TTreeNode; AComponent: TComponent; AChecked: Boolean): TTreeNode; - function CreateNodeObject(AComponent: TComponent; AChecked: Boolean): TdxNodeObject; virtual; - function IsComponentEditable(AComponent: TComponent): Boolean; virtual; - procedure LoadControlsTree(ATreeView: TTreeView); virtual; - procedure LoadHiddenControlsTree(ATreeView: TTreeView); virtual; - - procedure InstallAggregatedReportLinksController(AnInstall: Boolean); - - function GetComponentByName(const AName: string): TComponent; - function GetPreparedFontIndex(AFont: TFont): Integer; overload; - function GetPreparedFontIndex(AFont: TFont; AnIsFontSubstitutable: Boolean; - const AFontName: string; AFontColor: TColor; AFontStyle: TFontStyles): Integer; overload; - function IsComponentProcessed(AComponent: TComponent): Boolean; - - procedure AddDelimiters; virtual; - procedure CreateRootLookAndFeel; virtual; - procedure HideDesignerTabs(ADesignWindow: TdxfmCustomContainerDesignWindow); virtual; - procedure PullReportItems; virtual; - procedure RepositionControls; virtual; - // - function NeedTwoPassRendering: Boolean; override; - function IsScaleGridLines: Boolean; override; - - property ActiveBuilder: TdxPSContainerBuilder read FActiveBuilder; - property Controller: TdxCustomContainerReportLink read GetController write SetController; - property DefinitionCount: Integer read GetDefinitionCount; - property Definitions[Index: Integer]: TdxPSCustomContainerItemDefinition read GetDefinition; - property DefinitionsByContainerItem[Component: TComponent]: TdxPSCustomContainerItemDefinition read GetDefinitionByContainerItem; - property DefinitionsByReportItem[Item: TdxReportVisualItem]: TdxPSCustomContainerItemDefinition read GetDefinitionByReportItem; - property DelimitersHorz: TList read FDelimitersHorz; - property DelimitersHorzCount: Integer read GetDelimitersHorzCount; - property DelimitersHorzItems[Index: Integer]: Integer read GetDelimitersHorzItem; - property DelimitersVert: TList read FDelimitersVert; - property DelimitersVertCount: Integer read GetDelimitersVertCount; - property DelimitersVertItems[Index: Integer]: Integer read GetDelimitersVertItem; - property PreparationFont: TFont read FPreparationFont; - property ProducerCache: TdxPSCustomProducerCache read FProducerCache; - property Producers[Component: TComponent]: TdxPSCustomProducer read GetProducer; - property RootCell: TdxReportCell read GetRootCell; - property ScreenDC: HDC read FScreenDC; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - class function Aggregable: Boolean; override; - - function CanHideComponent(AComponent: TComponent): Boolean; - function CanHideComponentByName(const AName: string): Boolean; - procedure HideComponent(AComponent: TComponent); - procedure HideComponentByName(const AName: string); - procedure HideComponents(const AComponents: array of TComponent); - procedure HideComponentsByName(const ANames: array of string); - function FindHiddenComponent(AComponent: TComponent; out AnIndex: Integer): Boolean; overload; - function FindHiddenComponent(AComponent: TComponent): Boolean; overload; - function FindHiddenComponentByName(const AName: string; out AnIndex: Integer): Boolean; overload; - function FindHiddenComponentByName(const AName: string): Boolean; overload; - procedure UnhideAllComponents; - procedure UnhideComponent(AComponent: TComponent); - procedure UnhideComponentByName(const AName: string); - procedure UnhideComponents(const AComponents: array of TComponent); - procedure UnhideComponentsByName(const ANames: array of string); - - procedure HideStandardControls; - procedure UnhideStandardControls; - - function CanExcludeComponent(AComponent: TComponent): Boolean; - function CanExcludeComponentByName(const AName: string): Boolean; - procedure ExcludeComponent(AComponent: TComponent); - procedure ExcludeComponentByName(const AName: string); - procedure ExcludeComponents(const AComponents: array of TComponent); - procedure ExcludeComponentsByName(const ANames: array of string); - function FindExcludedComponent(AComponent: TComponent; out AnIndex: Integer): Boolean; overload; - function FindExcludedComponent(AComponent: TComponent): Boolean; overload; - function FindExcludedComponentByName(const AName: string; out AnIndex: Integer): Boolean; overload; - function FindExcludedComponentByName(const AName: string): Boolean; overload; - procedure UnexcludeAllComponents; - procedure UnexcludeComponent(AComponent: TComponent); - procedure UnexcludeComponentByName(const AName: string); - procedure UnexcludeComponents(const AComponents: array of TComponent); - procedure UnexcludeComponentsByName(const ANames: array of string); - - procedure AggregateLink(AReportLink: TBasedxReportLink); - procedure DisaggregateAllLinks; - procedure DisaggregateInconsistentLinks; - procedure DisaggregateLink(AReportLink: TBasedxReportLink); - function FindAggregatedLinkByComponent(AComponent: TComponent): TBasedxReportLink; - function HasInconsistentlyAggregatedLinks: Boolean; - function IsLinkAggregable(AReportLink: TBasedxReportLink): Boolean; - function IsLinkAggregated(AReportLink: TBasedxReportLink): Boolean; - function IsLinkAggregatedConsistently(AReportLink: TBasedxReportLink): Boolean; - - property AggregatedReportLinkCount: Integer read GetAggregatedReportLinkCount; - property AggregatedReportLinks[Index: Integer]: TBasedxReportLink read GetAggregatedReportLink; - property Container: TWinControl read GetContainer; - property DesignWindow: TdxfmCustomContainerDesignWindow read GetDesignWindow; - property ExcludedComponentCount: Integer read GetExcludedComponentCount; - property ExcludedComponents[Index: Integer]: TComponent read GetExcludedComponent; - property HiddenComponentCount: Integer read GetHiddenComponentCount; - property HiddenComponents[Index: Integer]: TComponent read GetHiddenComponent; - property ProducersByClass[ProducerClass: TdxPSCustomProducerClass; Component: TComponent]: TdxPSCustomProducer read GetProducerByClass; - property TopLevelContainer: TWinControl read GetTopLevelContainer; - published - property Color; - property Font; - property OptionsBehavior: TdxCustomContainerReportLinkOptionsBehavior read FOptionsBehavior write SetOptionsBehavior; - property OptionsDesignerTabs: TdxCustomContainerReportLinkOptionsDesignerTabs read FOptionsDesignerTabs write SetOptionsDesignerTabs; - //property OptionsItemPlace: TdxCustomContainerReportLinkOptionsItemPlace read FOptionsItemPlace write SetOptionsItemPlace; {.2} - property OptionsPagination: TdxCustomContainerReportLinkOptionsPagination read FOptionsPagination write SetOptionsPagination; - property OptionsRefinements: TdxCustomContainerReportLinkOptionsRefinements read FOptionsRefinements write SetOptionsRefinements; - property OptionsTransparent: TdxCustomContainerReportLinkOptionsTransparent read FOptionsTransparent write SetOptionsTransparent; - property ScaleFonts; - property SupportedCustomDraw: Boolean read FSupportedCustomDraw write SetSupportedCustomDraw default False; - - property OnCustomDrawItem: TdxContainerReportLinkCustomDrawItemEvent read FOnCustomDrawItem write SetOnCustomDrawItem; - property OnGetComponentCaption: TdxContainerReportLinkGetComponentCaptionEvent read FOnGetComponentCaption write FOnGetComponentCaption; - property OnGetComponentReportLink: TdxContainerReportLinkGetComponentReportLinkEvent read FOnGetComponentReportLink write FOnGetComponentReportLink; - property OnInitializeItem: TdxContainerReportLinkInitializeItemEvent read FOnInitializeItem write FOnInitializeItem; - property OnInitializeItemOptionsPlace: TdxContainerReportLinkInitializeItemOptionsPlaceEvent read FOnInitializeItemOptionsPlace write FOnInitializeItemOptionsPlace; - property OnInitializeReportLink: TdxContainerReportLinkInitializeReportLinkEvent read FOnInitializeReportLink write FOnInitializeReportLink; - property OnIsComponentProcessed: TdxContainerReportLinkIsComponentProcessedEvent read FOnIsComponentProcessed write FOnIsComponentProcessed; - end; - - {$IFDEF DELPHI5} - {$IFNDEF DELPHI6} - {$DEFINE WMCONTEXTMENU} - {$ENDIF} - {$ENDIF} - - TdxfmCustomContainerDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshOptions: TTabSheet; - tshReportLinks: TTabSheet; - tshControls: TTabSheet; - pmControls: TPopupMenu; - miControlsCheckAll: TMenuItem; - miLine1: TMenuItem; - miControlsCheckAllChildren: TMenuItem; - miControlsUncheckAllChildren: TMenuItem; - miLine2: TMenuItem; - miControlsExpandAll: TMenuItem; - lblTransparents: TLabel; - imgExpanding: TImage; - bvlTransparents: TBevel; - chbxTransparentRoot: TCheckBox; - chbxTransparentControls: TCheckBox; - chbxTransparentContainers: TCheckBox; - btnControlsCheckAll: TButton; - btnControlsExpandAll: TButton; - chbxTransparentGraphics: TCheckBox; - chbxTransparentGroups: TCheckBox; - chbxTransparentItems: TCheckBox; - lblPagination: TLabel; - imgPagination: TImage; - Bevel1: TBevel; - chbxPaginateByControlDetails: TCheckBox; - chbxPaginateByControls: TCheckBox; - chbxPaginateByGroups: TCheckBox; - chbxPaginateByItems: TCheckBox; - ilControls: TImageList; - tvControls: TTreeView; - ilControlsPopup: TImageList; - tshHiddenControls: TTabSheet; - tvHiddenControls: TTreeView; - btnHiddenControlsCheckAll: TButton; - btnHiddenControlsExpandAll: TButton; - miControlsUncheckStandardControls: TMenuItem; - miControlsCheckStandardControls: TMenuItem; - miLine3: TMenuItem; - lblSize: TLabel; - bvlSize: TBevel; - imgSize: TImage; - chbxAutoWidth: TCheckBox; - pnlBtnSite: TPanel; - btnLinksDesign: TButton; - pnlLinkListsSite: TPanel; - pnlAvailableLinksSite: TPanel; - lblAvailableLinks: TLabel; - lbxAvailableLinks: TListBox; - pnlMoveButtonsSite: TPanel; - sbtnRemove: TSpeedButton; - sbtnAdd: TSpeedButton; - pnlAggregatedLinksSite: TPanel; - lbxAggregatedLinks: TListBox; - lblAggregatedLinks: TLabel; - btnLinksRemoveInconsistents: TButton; - procedure TreeViewClick(Sender: TObject); - procedure TreeViewKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure TreeViewKeyPress(Sender: TObject; var Key: Char); - procedure TreeViewCheckAllChildrenClick(Sender: TObject); - procedure TreeViewCheckAllClick(Sender: TObject); - procedure TreeViewUncheckAllChildrenClick(Sender: TObject); - procedure TreeViewExpandAllClick(Sender: TObject); - procedure pmControlsPopup(Sender: TObject); - procedure TreeViewCustomDrawItem(Sender: TCustomTreeView; - Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean); - procedure DesignClick(Sender: TObject); - procedure lbxAggregatedLinksClick(Sender: TObject); - procedure TreeViewChange(Sender: TObject; Node: TTreeNode); - procedure TransparentClick(Sender: TObject); - procedure lbxAggregatedLinksDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure PaginationClick(Sender: TObject); - procedure TreeViewMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure PageControl1Change(Sender: TObject); - procedure PageControl1Changing(Sender: TObject; - var AllowChange: Boolean); - procedure HideStandardControlsClick(Sender: TObject); - procedure UnhideStandardControlsClick(Sender: TObject); - procedure SizeClick(Sender: TObject); - procedure sbtnAddClick(Sender: TObject); - procedure sbtnRemoveClick(Sender: TObject); - procedure tshReportLinksResize(Sender: TObject); - procedure lbxAvailableLinksKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure lbxAggregatedLinksKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure lbxAvailableLinksDragOver(Sender, Source: TObject; X, - Y: Integer; State: TDragState; var Accept: Boolean); - procedure lbxAvailableLinksDragDrop(Sender, Source: TObject; X, - Y: Integer); - procedure lbxAggregatedLinksDragOver(Sender, Source: TObject; X, - Y: Integer; State: TDragState; var Accept: Boolean); - procedure lbxAggregatedLinksDragDrop(Sender, Source: TObject; X, - Y: Integer); - procedure lbxAggregatedLinksDblClick(Sender: TObject); - procedure lbxAvailableLinksDblClick(Sender: TObject); - procedure btnLinksRemoveInconsistentsClick(Sender: TObject); - private - FAreHiddenControlsChanged: Boolean; - {$IFDEF WMCONTEXTMENU} - FControlsTreeViewWndProc: TWndMethod; - FHiddenControlsTreeViewWndProc: TWndMethod; - {$ENDIF} - FLastActiveTab: TTabSheet; - function GetAggregatedLink(Index: Integer): TBasedxReportLink; - function GetAggregatedLinkCount: Integer; - function GetAggregatedLinkSelected(Index: Integer): Boolean; - function GetAvailableLink(Index: Integer): TBasedxReportLink; - function GetAvailableLinkCount: Integer; - function GetAvailableLinkSelected(Index: Integer): Boolean; - function GetControlsTab: TTabSheet; - function GetHiddenControlsTab: TTabSheet; - function GetReportLink: TdxCustomContainerReportLink; - function GetReportLinksTab: TTabSheet; - function GetSelectedReportLink: TBasedxReportLink; - - procedure DoCheckAllChildren(ANode: TTreeNode; AChecked: Boolean); - procedure DoToggleNodeState(ANode: TTreeNode); - - function CanAggregate: Boolean; - function CanDesign: Boolean; - function CanDisaggregate: Boolean; - function CanRemoveInconsistents: Boolean; - //function CanSelectAll(AListBox: TListBox): Boolean; - procedure DoAggregateSelectedLinks; - procedure DoDisaggregateSelectedLinks; - procedure DoSelectAll(AListBox: TListBox); - procedure RefreshAggregatedLinks; - procedure RefreshAvailableLinks; - - {$IFDEF WMCONTEXTMENU} - procedure ControlsTreeViewWndProc(var Message: TMessage); - procedure HiddenControlsTreeViewWndProc(var Message: TMessage); - procedure ProcessContextMenu(AMessage: TWMContextMenu; ATreeView: TTreeView); - procedure RestoreTreeViewsWndProc; - procedure SubstituteTreeViewsWndProc; - {$ENDIF} - protected - procedure BeforeConstruction; override; - procedure DoInitialize; override; - procedure LoadStrings; override; - procedure UpdateControlsState; override; - - function GetActiveTreeView: TTreeView; virtual; - procedure InitializeControlsTree; virtual; - procedure InitializeHiddenControlsTree; virtual; - function IsBoldNode(ANode: TTreeNode): Boolean; virtual; - procedure RefreshControlsTree; - procedure RefreshHiddenControlsTree; - procedure RefreshReportLinksList; - - procedure SetOptionsPaginationByIndex(AnIndex: Integer; AValue: Boolean); virtual; - //procedure SetOptionsPlaceByIndex(AnIndex: Integer; AValue: Boolean); virtual; {.2} - procedure SetOptionsSizeByIndex(AnIndex: Integer; AValue: Boolean); virtual; - procedure SetOptionsTransparentByIndex(AnIndex: Integer; AValue: Boolean); virtual; - - {$IFDEF DELPHI5} - procedure TreeView_AdvancedCustomDrawItem(Sender: TCustomTreeView; - Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage; - var PaintImages, DefaultDraw: Boolean); - {$ENDIF} - procedure TreeView_BeginUpdate; - procedure TreeView_CheckAllChildren(ANode: TTreeNode; AChecked: Boolean); - procedure TreeView_EndUpdate; - procedure TreeView_FreeNodeObjects(ATreeView: TTreeView); - function TreeView_HasCheckedChildren(ANode: TTreeNode): Boolean; - function TreeView_HasRoot(ATreeView: TTreeView): Boolean; - function TreeView_HasUncheckedChildren(ANode: TTreeNode): Boolean; - function TreeView_GetNodeObject(ANode: TTreeNode): TdxNodeObject; - function TreeView_getRoot(ATreeView: TTreeView): TTreeNode; // API function TreeView_GetRoot already exists - function TreeView_IsNodeEditable(ANode: TTreeNode): Boolean; - procedure TreeView_NormalizeNode(ANode: TTreeNode); - procedure TreeView_SetNodeState(ANode: TTreeNode; AState: TCheckBoxState); - procedure TreeView_ToggleNodeState(ANode: TTreeNode); - procedure TreeView_UpdateNodeImage(ANode: TTreeNode); - procedure TreeView_UpdateNodesState(ANode: TTreeNode); - - property ActiveTreeView: TTreeView read GetActiveTreeView; - property ControlsTab: TTabSheet read GetControlsTab; - property HiddenControlsTab: TTabSheet read GetHiddenControlsTab; - property ReportLinksTab: TTabSheet read GetReportLinksTab; - property SelectedReportLink: TBasedxReportLink read GetSelectedReportLink; - - property AggregatedLinkCount: Integer read GetAggregatedLinkCount; - property AggregatedLinks[Index: Integer]: TBasedxReportLink read GetAggregatedLink; - property AggregatedLinkSelected[Index: Integer]: Boolean read GetAggregatedLinkSelected; - property AvailableLinkCount: Integer read GetAvailableLinkCount; - property AvailableLinks[Index: Integer]: TBasedxReportLink read GetAvailableLink; - property AvailableLinkSelected[Index: Integer]: Boolean read GetAvailableLinkSelected; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - property ReportLink: TdxCustomContainerReportLink read GetReportLink; - end; - -function dxPSIsComponentContainer(AComponentClass: TClass): Boolean; overload; -function dxPSIsComponentContainer(AComponent: TObject{TComponent}): Boolean; overload; -procedure dxPSRegisterContainer(AContainerClass: TWinControlClass; - ADesignerClass: TdxReportLinkDesignWindowClass = nil{TdxfmCustomContainerDesignWindow}); -procedure dxPSRegisterContainers(const AContainerClasses: array of TWinControlClass; - ADesignerClass: TdxReportLinkDesignWindowClass = nil{TdxfmCustomContainerDesignWindow}); -procedure dxPSUnregisterContainer(AContainerClass: TWinControlClass; - ADesignerClass: TdxReportLinkDesignWindowClass = nil{TdxfmCustomContainerDesignWindow}); -procedure dxPSUnregisterContainers(const AContainerClasses: array of TWinControlClass; - ADesignerClass: TdxReportLinkDesignWindowClass = nil{TdxfmCustomContainerDesignWindow}); - -function dxPSMakeFriendlyNameFromStrings(AStrings: TStrings): string; - -const - BevelShapeMap: array[TBevelShape] of TdxCellSides = - (csAll, csAll, [csTop], [csBottom], [csLeft], [csRight], []); - BevelStyleMap: array[TBevelStyle, TBevelShape] of TdxPSCellBorderClass = - ((TdxPSCellSunkenSoftBorder, TdxPSCellEtchedBorder, TdxPSCellRaisedSoftBorder, - TdxPSCellRaisedSoftBorder, TdxPSCellRaisedSoftBorder, TdxPSCellRaisedSoftBorder, TdxPSCellNullBorder), - (TdxPSCellRaisedSoftBorder, TdxPSCellBumpedBorder, TdxPSCellRaisedBorder, - TdxPSCellRaisedBorder, TdxPSCellRaisedBorder, TdxPSCellRaisedBorder, TdxPSCellNullBorder)); - BorderStyleMap: array[TBorderStyle] of TdxCellSides = ([], csAll); - BrushStyleMap: array[TBrushStyle] of TdxPSFillPatternClass = - (TdxPSSolidFillPattern, nil, TdxPSHorizontalFillPattern, TdxPSVerticalFillPattern, - TdxPSFDiagonalFillPattern, TdxPSBDiagonalFillPattern, TdxPSCrossFillPattern, - TdxPSDiagCrossFillPattern); - CheckAlignmentMap: array[TLeftRight] of TdxCellCheckPos = (ccpRight, ccpLeft); - Ctl3DBorderClassMap: array[Boolean] of TdxPSCellBorderClass = (TdxPSCellUltraFlatBorder, TdxPSCellSunkenBorder); - PanelBevelsMap: array[TPanelBevel, TPanelBevel] of TdxPSCellBorderClass = - ((TdxPSCellNullBorder, TdxPSCellSunkenSoftBorder, TdxPSCellRaisedSoftBorder, TdxPSCellRaisedSoftBorder), - (TdxPSCellSunkenSoftBorder, TdxPSCellSunkenBorder, TdxPSCellBumpedBorder, TdxPSCellBumpedBorder), - (TdxPSCellRaisedSoftBorder, TdxPSCellEtchedBorder, TdxPSCellRaisedBorder, TdxPSCellRaisedBorder), - (TdxPSCellRaisedSoftBorder, TdxPSCellEtchedBorder, TdxPSCellRaisedBorder, TdxPSCellRaisedBorder)); - PanelSingleBorderMap: array[Boolean] of TdxPSCellBorderClass = (TdxPSCellRaisedBorder, TdxPSCellEtchedBorder); - ShapeTypeMap: array[TShapeType] of TdxReportCellShapeClass = - (TdxReportCellRectangle, TdxReportCellSquare, TdxReportCellRoundRect, - TdxReportCellRoundSquare, TdxReportCellEllipse, TdxReportCellCircle); - - MaxCaptionLength: Integer = 64; - - ExpandHeightBit = $00000001; - ExpandHeightOffset = $00000000; - ExpandWidthBit = $00000002; - ExpandWidthOffset = $00000001; - ShrinkHeightBit = $00000004; - ShrinkHeightOffset = $00000002; - ShrinkWidthBit = $00000008; - ShrinkWidthOffset = $00000003; - - StandardHiddenControlCount = 6; - StandardHiddenControls: array[0..StandardHiddenControlCount - 1] of string = - ('TScrollBar', 'TSplitter', 'TControlBar', 'TToolBar', 'TCoolBar', 'TPageScroller'); - -implementation - -{$R *.dfm} - -uses - SysUtils, dxCore, cxClasses, cxControls, dxPSGlbl, dxPSUtl, dxPSRes, dxPSPopupMan; - -const - StandardContainerCount = {$IFDEF DELPHI5} 11 {$ELSE} 10 {$ENDIF}; - StandardContainers: array[0..StandardContainerCount - 1] of TWinControlClass = - (TPanel, TScrollBox, TTabControl, TTabSheet, TPageControl, TTabPage, - TTabbedNotebook, TPage, TNotebook, TCustomForm {$IFDEF DELPHI5}, TCustomFrame{$ENDIF}); - - DefaultControlDisabledContentColor: TColor = clBtnFace; - DefaultControlDisabledTextColor: TColor = clGrayText; - -//{.1} - RootDesigner -//{.2} - ItemOptionsPlace - -type - TBasedxReportLinkAccess = class(TBasedxReportLink); - - - TCustomCheckBoxAccess = class(TCustomCheckBox); - TCustomComboBoxAccess = class(TCustomComboBox); - {$IFDEF DELPHI6} - TCustomComboBoxExAccess = class(TCustomComboBoxEx); - {$ENDIF} - TCustomEditAccess = class(TCustomEdit); - TCustomGroupBoxAccess = class(TCustomGroupBox); - TCustomHotKeyAccess = class(TCustomHotKey); - TCustomLabelAccess = class(TCustomLabel); - TCustomMemoAccess = class(TCustomMemo); - TCustomPanelAccess = class(TCustomPanel); - TCustomRadioGroupAccess = class(TCustomRadioGroup); - TCustomStaticTextAccess = class(TCustomStaticText); - - TdxPSNativePrintableControlProducerFactory = class(TdxCustomClassMaps) - private - function GetProducerClass(Component: TComponent): TdxPSNativePrintableControlProducerClass; - public - class function Instance: TdxPSNativePrintableControlProducerFactory; reintroduce; overload; - class procedure ReleaseInstance; override; - property ProducerClasses[Component: TComponent]: TdxPSNativePrintableControlProducerClass read GetProducerClass; default; - end; - - TdxPSContainerItemProducerFactory = class(TdxCustomClassMaps) - private - function GetProducerClass(Component: TComponent; IsRoot: Boolean): TdxPSCustomProducerClass; - public - class function Instance: TdxPSContainerItemProducerFactory; reintroduce; overload; - class procedure ReleaseInstance; override; - property ProducerClasses[Component: TComponent; IsRoot: Boolean]: TdxPSCustomProducerClass read GetProducerClass; default; - end; - - TdxPSProducerHelperFactory = class(TdxCustomClassMaps) - private - function GetItem(Index: Integer): TdxPSCustomProducerClass; - function GetProducerClass(ProducerClass: TdxPSCustomProducerClass): TdxPSCustomProducerClass; - public - class function Instance: TdxPSProducerHelperFactory; reintroduce; overload; - property Items[Index: Integer]: TdxPSCustomProducerClass read GetItem; - property ProducerClasses[ProducerClass: TdxPSCustomProducerClass]: TdxPSCustomProducerClass read GetProducerClass; default; - end; - - TdxPSContainerBuilderFactory = class(TdxCustomClassMaps) - private - function GetBuilderClass(Control: TWinControl): TdxPSContainerBuilderClass; - protected - function CreateBuilder(AReportLink: TdxCustomContainerReportLink; AContainer: TWinControl; - AParentBuilder: TdxPSContainerBuilder; AParentHost: TdxReportCell = nil): TdxPSContainerBuilder; - public - class function Instance: TdxPSContainerBuilderFactory; reintroduce; overload; - class procedure ReleaseInstance; override; - property BuilderClasses[Control: TWinControl]: TdxPSContainerBuilderClass read GetBuilderClass; default; - end; - -var - FInternalComponentPrinter: TdxComponentPrinter; - FIsNativePrintableControlProducerFactoryReleased: Boolean = False; - FIsContainerItemProducerFactoryReleased: Boolean = False; - FIsContainerBuilderFactoryReleased: Boolean = False; - -function InternalComponentPrinter: TdxComponentPrinter; -begin - if FInternalComponentPrinter = nil then - FInternalComponentPrinter := TdxComponentPrinter.Create(nil); - Result := FInternalComponentPrinter; -end; - -{ utility routines } - -function dxPSMakeFriendlyNameFromStrings(AStrings: TStrings): string; -const - CR = #13; - LF = #10; -var - P: Integer; -begin - Result := AStrings[0]; - if Length(Result) > MaxCaptionLength then - begin - Delete(Result, MaxCaptionLength, Length(Result) - MaxCaptionLength); - Result := Result + '...'; - end; - - repeat - P := Pos(LF, Result); - if P <> 0 then - Delete(Result, P, 1); - - P := Pos(CR, Result); - if P <> 0 then - Delete(Result, P, 1); - - if P <> 0 then - Insert(' ', Result, P); - until P = 0; -end; - -{ Registration routines } - -function dxPSIsComponentContainer(AComponentClass: TClass): Boolean; -begin - Result := TdxCustomContainerReportLink.Supports(AComponentClass); -end; - -function dxPSIsComponentContainer(AComponent: TObject{TComponent}): Boolean; -begin - Result := TdxCustomContainerReportLink.Supports(AComponent); -end; - -procedure dxPSRegisterContainer(AContainerClass: TWinControlClass; - ADesignerClass: TdxReportLinkDesignWindowClass = nil); -begin - if ADesignerClass = nil then - ADesignerClass := TdxfmCustomContainerDesignWindow; - dxPSRegisterReportLink(TdxCustomContainerReportLink, AContainerClass, ADesignerClass); -end; - -procedure dxPSRegisterContainers(const AContainerClasses: array of TWinControlClass; - ADesignerClass: TdxReportLinkDesignWindowClass = nil); -var - I: Integer; -begin - if ADesignerClass = nil then - ADesignerClass := TdxfmCustomContainerDesignWindow; - for I := 0 to High(AContainerClasses) do - dxPSRegisterContainer(AContainerClasses[I], ADesignerClass); -end; - -procedure dxPSUnregisterContainer(AContainerClass: TWinControlClass; - ADesignerClass: TdxReportLinkDesignWindowClass = nil); -begin - if ADesignerClass = nil then - ADesignerClass := TdxfmCustomContainerDesignWindow; - dxPSUnregisterReportLink(TdxCustomContainerReportLink, AContainerClass, ADesignerClass); -end; - -procedure dxPSUnregisterContainers(const AContainerClasses: array of TWinControlClass; - ADesignerClass: TdxReportLinkDesignWindowClass = nil); -var - I: Integer; -begin - if ADesignerClass = nil then - ADesignerClass := TdxfmCustomContainerDesignWindow; - for I := 0 to High(AContainerClasses) do - dxPSUnregisterContainer(AContainerClasses[I], ADesignerClass); -end; - -{ Helpers } - -{ CheckBox Helpers } - -function CheckBox_GetAlignment(AControl: TCustomCheckBox): TAlignment; -begin - Result := TCustomCheckBoxAccess(AControl).Alignment; -end; - -function CheckBox_GetState(AControl: TCustomCheckBox): TCheckBoxState; -begin - Result := TCustomCheckBoxAccess(AControl).State; -end; - -{ ComboBox Helpers } - -function ComboBox_GetStyle(AControl: TCustomComboBox): TComboBoxStyle; -begin - Result := TCustomComboBoxAccess(AControl).Style; -end; - -function ComboBox_GetCurrentText(AControl: TCustomComboBox): string; -begin - if ComboBox_GetStyle(AControl) = csDropDown then - Result := Control_GetText(AControl) - else - if AControl.ItemIndex <> -1 then - Result := AControl.Items[AControl.ItemIndex] - else - Result := '' -end; - -{ Edit Helpers } - -function Edit_GetBorderStyle(AControl: TCustomEdit): TBorderStyle; -begin - Result := TCustomEditAccess(AControl).BorderStyle; -end; - -{ HotKey Helpers } - -function HotKey_GetHotKey(AControl: TCustomHotKey): TShortCut; -begin - Result := TCustomHotKeyAccess(AControl).HotKey; -end; - -{ Label Helpers } - -function Label_GetAlignment(AControl: TCustomLabel): TAlignment; -begin - Result := TCustomLabelAccess(AControl).Alignment; -end; - -function Label_GetAutoSize(AControl: TCustomLabel): Boolean; -begin - Result := TCustomLabelAccess(AControl).AutoSize; -end; - -function Label_GetText(AControl: TCustomLabel): string; -begin - Result := TCustomLabelAccess(AControl).GetLabelText; -end; - -function Label_GetLayout(AControl: TCustomLabel): TTextLayout; -begin - Result := TCustomLabelAccess(AControl).Layout; -end; - -function Label_GetWordWrap(AControl: TCustomLabel): Boolean; -begin - Result := TCustomLabelAccess(AControl).WordWrap; -end; - -{ Memo Helpers } - -function Memo_GetAlignment(AControl: TCustomMemo): TAlignment; -begin - Result := TCustomMemoAccess(AControl).Alignment; -end; - -function Memo_GetLines(AControl: TCustomMemo): TStrings; -begin - Result := TCustomMemoAccess(AControl).Lines; -end; - -{ Panel Helpers } - -function Panel_GetAlignment(AControl: TCustomPanel): TAlignment; -begin - Result := TCustomPanelAccess(AControl).Alignment; -end; - -function Panel_GetBorderStyle(AControl: TCustomPanel): TBorderStyle; -begin - Result := TCustomPanelAccess(AControl).BorderStyle; -end; - -function Panel_GetBevelInner(AControl: TCustomPanel): TPanelBevel; -begin - Result := TCustomPanelAccess(AControl).BevelInner; -end; - -function Panel_GetBevelOuter(AControl: TCustomPanel): TPanelBevel; -begin - Result := TCustomPanelAccess(AControl).BevelOuter; -end; - -{ RadioGroup Helpers } - -function RadioGroup_GetColumns(AControl: TCustomRadioGroup): Integer; -begin - Result := TCustomRadioGroupAccess(AControl).Columns; -end; - -function RadioGroup_GetItemIndex(AControl: TCustomRadioGroup): Integer; -begin - Result := TCustomRadioGroupAccess(AControl).ItemIndex; -end; - -function RadioGroup_GetItems(AControl: TCustomRadioGroup): TStrings; -begin - Result := TCustomRadioGroupAccess(AControl).Items; -end; - -{ StaticText Helpers } - -function StaticText_GetAlignment(AControl: TCustomStaticText): TAlignment; -begin - Result := TCustomStaticTextAccess(AControl).Alignment; -end; - -function StaticText_GetBorderStyle(AControl: TCustomStaticText): TStaticBorderStyle; -begin - Result := TCustomStaticTextAccess(AControl).BorderStyle -end; - -{ TdxPSNativePrintableControlProducerFactory } - -function dxPSNativePrintableControlProducerFactory: TdxPSNativePrintableControlProducerFactory; -begin - Result := TdxPSNativePrintableControlProducerFactory.Instance; -end; - -class function TdxPSNativePrintableControlProducerFactory.Instance: TdxPSNativePrintableControlProducerFactory; -begin - Result := inherited Instance as TdxPSNativePrintableControlProducerFactory; -end; - -class procedure TdxPSNativePrintableControlProducerFactory.ReleaseInstance; -begin - inherited; - FIsNativePrintableControlProducerFactoryReleased := True; -end; - -function TdxPSNativePrintableControlProducerFactory.GetProducerClass( - Component: TComponent): TdxPSNativePrintableControlProducerClass; -begin - Result := TdxPSNativePrintableControlProducerClass(PairClasses[Component.ClassType]); -end; - -{ TdxProducersFactory } - -function dxPSContainerItemProducerFactory: TdxPSContainerItemProducerFactory; -begin - Result := TdxPSContainerItemProducerFactory.Instance; -end; - -class function TdxPSContainerItemProducerFactory.Instance: TdxPSContainerItemProducerFactory; -begin - Result := inherited Instance as TdxPSContainerItemProducerFactory; -end; - -class procedure TdxPSContainerItemProducerFactory.ReleaseInstance; -begin - inherited; - FIsContainerBuilderFactoryReleased := True; -end; - -function TdxPSContainerItemProducerFactory.GetProducerClass(Component: TComponent; - IsRoot: Boolean): TdxPSCustomProducerClass; -begin - if not IsRoot then - Result := dxPSNativePrintableControlProducerFactory.ProducerClasses[Component] - else - Result := nil; - - if (Result = nil) or not TdxPSNativePrintableControlProducerClass(Result).HasReportLink(Component) then - begin - Result := TdxPSCustomProducerClass(PairClasses[Component.ClassType]); - if Result.HelperProducer <> nil then - Result := Result.HelperProducer; - end; -end; - -{ TdxPSProducerHelperFactory } - -function dxPSProducerHelperFactory: TdxPSProducerHelperFactory; -begin - Result := TdxPSProducerHelperFactory.Instance; -end; - -class function TdxPSProducerHelperFactory.Instance: TdxPSProducerHelperFactory; -begin - Result := inherited Instance as TdxPSProducerHelperFactory; -end; - -function TdxPSProducerHelperFactory.GetItem(Index: Integer): TdxPSCustomProducerClass; -begin - Result := TdxPSCustomProducerClass(inherited Items[Index]); -end; - -function TdxPSProducerHelperFactory.GetProducerClass(ProducerClass: TdxPSCustomProducerClass): TdxPSCustomProducerClass; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if ProducerClass = Result.BuddyClass then Exit; - end; - Result := nil; -end; - -{ TdxPSContainerBuilderFactory } - -function dxContainerBuilderFactory: TdxPSContainerBuilderFactory; -begin - Result := TdxPSContainerBuilderFactory.Instance; -end; - -class function TdxPSContainerBuilderFactory.Instance: TdxPSContainerBuilderFactory; -begin - Result := inherited Instance as TdxPSContainerBuilderFactory; -end; - -class procedure TdxPSContainerBuilderFactory.ReleaseInstance; -begin - inherited; - FIsContainerBuilderFactoryReleased := True; -end; - -function TdxPSContainerBuilderFactory.CreateBuilder(AReportLink: TdxCustomContainerReportLink; - AContainer: TWinControl; AParentBuilder: TdxPSContainerBuilder; - AParentHost: TdxReportCell = nil): TdxPSContainerBuilder; -begin - Result := BuilderClasses[AContainer].Create(AReportLink, AContainer, AParentBuilder, AParentHost); -end; - -function TdxPSContainerBuilderFactory.GetBuilderClass(Control: TWinControl): TdxPSContainerBuilderClass; -begin - Result := TdxPSContainerBuilderClass(PairClasses[Control.ClassType]); -end; - -{ TdxReportWinControlHost } - -function TdxReportWinControlHost.MeasureHeight(DC: HDC): Integer; - - procedure MeasureItem(AnItem: TdxReportVisualItem; var AValue: Integer); - var - V: Integer; - begin - if AnItem.Visible then - begin - V := AnItem.Top + AnItem.Height; - if AValue < V then AValue := V; - end; - end; - - function MeasureNestedCells: Integer; - var - I: Integer; - begin - Result := 0; - for I := 0 to CellCount - 1 do - MeasureItem(Cells[I], Result); - end; - - function MeasureNestedDataItems: Integer; - var - I: Integer; - begin - Result := 0; - for I := 0 to DataItemCount - 1 do - MeasureItem(DataItems[I], Result); - end; - -begin - Result := Max(MeasureNestedDataItems, MeasureNestedCells); - if Result <> 0 then Inc(Result, 2); -end; - -function TdxReportWinControlHost.MeasureWidth(DC: HDC): Integer; - - procedure MeasureItem(AnItem: TdxReportVisualItem; var AValue: Integer); - var - V: Integer; - begin - if AnItem.Visible then - begin - V := AnItem.Left + AnItem.Width; - if AValue < V then AValue := V; - end; - end; - - function MeasureNestedCells: Integer; - var - I: Integer; - Item: TdxReportVisualItem; - begin - Result := 0; - for I := 0 to CellCount - 1 do - begin - Item := Cells[I]; - if Item <> ControlItem then MeasureItem(Item, Result); - end; - end; - - function MeasureNestedDataItems: Integer; - var - I: Integer; - Item: TdxReportVisualItem; - begin - Result := 0; - for I := 0 to DataItemCount - 1 do - begin - Item := DataItems[I]; - {if Item <> ControlItem then }MeasureItem(Item, Result); - end; - end; - -begin - Result := Max(MeasureNestedDataItems, MeasureNestedCells); - if Result <> 0 then Inc(Result, 2); -end; - -function TdxReportWinControlHost.GetControlItem: TdxReportVisualItem; -begin - if (DataItemCount <> 0) and (DataItems[0].Data <> 0) then - Result := DataItems[0] - else - if (CellCount <> 0) and (Cells[0].Data <> 0) then - Result := Cells[0] - else - Result := nil; -end; - -procedure TdxReportWinControlHost.BoundsChanged; -begin - if HasControlItem then - begin - ControlItem.Width := Width; - ControlItem.Height := Height; - end; -end; - -function TdxReportWinControlHost.GetHasControlItem: Boolean; -begin - Result := ControlItem <> nil; -end; - -{ TdxReportNativePrintableControlHost } - -function TdxReportNativePrintableControlHost.GetControlItem: TdxReportVisualItem; -begin - if CellCount <> 0 then - Result := Cells[0] - else - Result := nil; -end; - -procedure TdxReportNativePrintableControlHost.BoundsChanged; -begin - inherited; -end; - -{ TdxPSCustomContainerItemDefinition } - -constructor TdxPSCustomContainerItemDefinition.Create(AReportLink: TdxCustomContainerReportLink; - AComponent: TComponent; AReportItem: TdxReportVisualItem); -begin - inherited Create; - FReportLink := AReportLink; - FComponent := AComponent; - FReportItem := AReportItem; - FOptionsPlace := AReportLink.GetOptionsItemPlaceClass.Create(AReportLink); -// FOptionsPlace.Assign(AReportLink.OptionsItemPlace); {.2} -end; - -destructor TdxPSCustomContainerItemDefinition.Destroy; -begin - FreeAndNil(FOptionsPlace); - inherited; -end; - -function TdxPSCustomContainerItemDefinition.OptionsPagination: TdxCustomContainerReportLinkOptionsPagination; -begin - Result := ReportLink.OptionsPagination; -end; - -procedure TdxPSCustomContainerItemDefinition.AddDelimitersHorz(AList: TList); -begin -end; - -procedure TdxPSCustomContainerItemDefinition.AddDelimitersVert(AList: TList); -begin -end; - -procedure TdxPSCustomContainerItemDefinition.AddReportItemToDelimitersHorz(AList: TList); -begin - with ReportItem do - begin - AList.Add(TObject(Integer(AbsoluteOrigin.X))); - AList.Add(TObject(Integer(AbsoluteOrigin.X + Width))); - end; -end; - -procedure TdxPSCustomContainerItemDefinition.AddReportItemToDelimitersVert(AList: TList); -begin - with ReportItem do - begin - AList.Add(TObject(Integer(AbsoluteOrigin.Y))); - AList.Add(TObject(Integer(AbsoluteOrigin.Y + Height))); - end; -end; - -function TdxPSCustomContainerItemDefinition.GetSizeChangeReportItem: TdxReportVisualItem; -begin - Result := ReportItem; -end; - -function TdxPSCustomContainerItemDefinition.GetSizeMeasureReportItem: TdxReportVisualItem; -begin - Result := ReportItem; -end; - -function TdxPSCustomContainerItemDefinition.GetRootContainer: TWinControl; -begin - Result := ReportLink.Container; -end; - -function TdxPSCustomContainerItemDefinition.GetTopLevelRootContainer: TWinControl; -begin - Result := ReportLink.TopLevelContainer; -end; - -{ TdxPSContainerControlDefinition } - -procedure TdxPSContainerControlDefinition.AddDelimitersHorz(AList: TList); -begin - if OptionsPagination.Controls then AddReportItemToDelimitersHorz(AList); -end; - -procedure TdxPSContainerControlDefinition.AddDelimitersVert(AList: TList); -begin - if OptionsPagination.Controls then AddReportItemToDelimitersVert(AList); -end; - -function TdxPSContainerControlDefinition.GetControl: TControl; -begin - Result := TControl(Component); -end; - -procedure TdxPSContainerControlDefinition.SetControl(Value: TControl); -begin - Component := Value; -end; - -{ TdxPSNativePrintableControlDefinition } - -constructor TdxPSNativePrintableControlDefinition.Create(AReportLink: TdxCustomContainerReportLink; - AComponent: TComponent; AReportItem: TdxReportVisualItem); -begin - inherited; - FDelimitersHorz := TList.Create; - FDelimitersVert := TList.Create; -end; - -destructor TdxPSNativePrintableControlDefinition.Destroy; -begin - FreeAndNil(FDelimitersVert); - FreeAndNil(FDelimitersHorz); - inherited; -end; - -procedure TdxPSNativePrintableControlDefinition.AddDelimitersHorz(AList: TList); -begin - with OptionsPagination do - begin - if Controls then - AddReportItemToDelimitersHorz(AList); - if ControlDetails then - dxPSUtl.dxAppendList(DelimitersHorz, AList); - end -end; - -procedure TdxPSNativePrintableControlDefinition.AddDelimitersVert(AList: TList); -begin - with OptionsPagination do - begin - if Controls then - AddReportItemToDelimitersVert(AList); - if ControlDetails then - dxPSUtl.dxAppendList(DelimitersVert, AList); - end -end; - -procedure TdxPSNativePrintableControlDefinition.GetData(AReportLink: TBasedxReportLink); -begin - with TBasedxReportLinkAccess(AReportLink) do - begin - InternalGetDelimiters(DelimitersHorz, DelimitersVert); - FReportDimension := MakePoint(ReportWidth, ReportHeight); - end; - ShiftDelimiters; -end; - -procedure TdxPSNativePrintableControlDefinition.ShiftDelimiters; -var - Offset: TPoint; -begin - Offset := DelimitersOffset; - dxPSUtl.dxShiftIntegerListValues(DelimitersHorz, Offset.X); - dxPSUtl.dxShiftIntegerListValues(DelimitersVert, Offset.Y); -end; - -function TdxPSNativePrintableControlDefinition.GetSizeChangeReportItem: TdxReportVisualItem; -begin - Result := ReportItem.Parent; -end; - -function TdxPSNativePrintableControlDefinition.GetDelimitersOffset: TPoint; -var - Parent: TWinControl; -begin - Result := MakePoint(Control.Left, Control.Top); - Parent := Control.Parent; - while Parent <> TopLevelRootContainer do - begin - Inc(Result.X, Parent.Left); - Inc(Result.Y, Parent.Top); - Parent := Parent.Parent; - end; -end; - -{ TdxPSContainerWinControlDefinition } - -function TdxPSContainerWinControlDefinition.GetSizeChangeReportItem: TdxReportVisualItem; -begin - Result := ReportItem.Parent; -end; - -{ TdxPSContainerDefinition } - -function TdxPSContainerDefinition.GetSizeMeasureReportItem: TdxReportVisualItem; -begin - Result := ReportItem.Parent; -end; - -{ TdxPSWinControlIterator } - -constructor TdxPSWinControlIterator.Create(AControl: TWinControl); -begin - inherited Create; - FControl := AControl; - FCounter := -1; -end; - -class function TdxPSWinControlIterator.ContainerClass: TWinControlClass; -begin - Result := TWinControl; -end; - -function TdxPSWinControlIterator.GetControl(Index: Integer): TControl; -begin - Result := Control.Controls[Index]; -end; - -function TdxPSWinControlIterator.GetControlCount: Integer; -begin - Result := Control.ControlCount; -end; - -procedure TdxPSWinControlIterator.GoBeforeBOF; -begin - FCounter := -1; -end; - -procedure TdxPSWinControlIterator.GoBeyondEOF; -begin - FCounter := ControlCount; -end; - -function TdxPSWinControlIterator.IsBOF: Boolean; -begin - Result := FCounter < 1; -end; - -function TdxPSWinControlIterator.IsEOF: Boolean; -begin - Result := FCounter + 1 = ControlCount; -end; - -function TdxPSWinControlIterator.Next: TControl; -begin - if not IsEOF then - begin - Inc(FCounter); - Result := Controls[FCounter]; - end - else - Result := nil; -end; - -function TdxPSWinControlIterator.Prev: TControl; -begin - if not IsBOF then - begin - Dec(FCounter); - Result := Controls[FCounter]; - end - else - Result := nil; -end; - -{ TdxPSCustomProducer } - -constructor TdxPSCustomProducer.Create(AReportLink: TdxCustomContainerReportLink; - AnObject: TComponent); -begin - inherited Create; - FReportLink := AReportLink; - Initialize(AnObject); -end; - -class function TdxPSCustomProducer.CanHasAvailableChildren: Boolean; -begin - Result := False; -end; - -class function TdxPSCustomProducer.HasNativeSupportForBorders: Boolean; -begin - Result := False; -end; - -class function TdxPSCustomProducer.Reenterable: Boolean; -begin - Result := True; -end; - -function TdxPSCustomProducer.Definition: TdxPSCustomContainerItemDefinition; -begin - Result := ReportLink.DefinitionsByContainerItem[ProducingObject]; -end; - -class function TdxPSCustomProducer.DefinitionClass: TdxPSCustomContainerItemDefinitionClass; -begin - Result := TdxPSCustomContainerItemDefinition; -end; - -procedure TdxPSCustomProducer.Initialize(AnObject: TComponent); -begin - FProducingObject := AnObject; -end; - -function TdxPSCustomProducer.ProducingObject: TComponent; -begin - Result := FProducingObject; -end; - -function TdxPSCustomProducer.ProducingObjectFriendlyName: string; -begin - Result := ProducingObject.Name; -end; - -function TdxPSCustomProducer.ReportLink: TdxCustomContainerReportLink; -begin - Result := FReportLink; -end; - -procedure TdxPSCustomProducer.Reposition; -begin - DoReposition; -end; - -function TdxPSCustomProducer.RootContainer: TWinControl; -begin - Result := ReportLink.Container; -end; - -function TdxPSCustomProducer.TopLevelRootContainer: TWinControl; -begin - Result := ReportLink.TopLevelContainer; -end; - -class procedure TdxPSCustomProducer.Register; -begin - dxPSContainerItemProducerFactory.Register(Self); -end; - -class procedure TdxPSCustomProducer.Unregister; -begin - if not FIsContainerItemProducerFactoryReleased then dxPSContainerItemProducerFactory.Unregister(Self); -end; - -class function TdxPSCustomProducer.HelperProducer: TdxPSCustomProducerClass; -begin - Result := dxPSProducerHelperFactory[Self]; -end; - -class function TdxPSCustomProducer.BuddyClass: TdxPSCustomProducerClass; -begin - Result := nil; -end; - -function TdxPSCustomProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := True; -end; - -function TdxPSCustomProducer.GetScrollPosLeft: Integer; -begin - Result := 0; -end; - -function TdxPSCustomProducer.GetScrollPosTop: Integer; -begin - Result := 0; -end; - -procedure TdxPSCustomProducer.GetImageLists(AProc: TdxPSGetImageListProc); -begin -end; - -procedure TdxPSCustomProducer.InitializeOptionsPlace(AnOptions: TdxCustomContainerReportLinkOptionsItemPlace); -begin - with AnOptions do - begin - ExpandHeight := ObjectExpandHeight; - ExpandWidth := ObjectExpandWidth; - ShrinkHeight := ObjectShrinkHeight; - ShrinkWidth := ObjectShrinkWidth; - end; -end; - -procedure TdxPSCustomProducer.DoReposition; -var - ItemHeight, ItemWidth: Integer; -begin - with Definition do - begin - if OptionsPlace.HasVertResizing then - begin - ItemHeight := MeasureItemHeight(SizeMeasureReportItem); - if OptionsPlace.ExpandHeight and (SizeChangeReportItem.Height < ItemHeight) then - SizeChangeReportItem.Height := ItemHeight; - if OptionsPlace.ShrinkHeight and (SizeChangeReportItem.Height > ItemHeight) and (ItemHeight <> 0) then - SizeChangeReportItem.Height := ItemHeight; - end; - - if OptionsPlace.HasHorzResizing then - begin - ItemWidth := MeasureItemWidth(SizeMeasureReportItem); - if OptionsPlace.ExpandWidth and (SizeChangeReportItem.Width < ItemWidth) then - SizeChangeReportItem.Width := ItemWidth; - if OptionsPlace.ShrinkWidth and (SizeChangeReportItem.Width > ItemWidth) then - SizeChangeReportItem.Width := ItemWidth; - end; - end; -end; - -function TdxPSCustomProducer.MeasureItemHeight(AnItem: TdxReportVisualItem): Integer; -begin - Result := AnItem.MeasureHeight(DC); -end; - -function TdxPSCustomProducer.MeasureItemWidth(AnItem: TdxReportVisualItem): Integer; -begin - Result := AnItem.MeasureWidth(DC); -end; - -function TdxPSCustomProducer.ObjectExpandHeight: Boolean; -begin - Result := False; -end; - -function TdxPSCustomProducer.ObjectExpandWidth: Boolean; -begin - Result := False; -end; - -function TdxPSCustomProducer.ObjectShrinkHeight: Boolean; -begin - Result := False; -end; - -function TdxPSCustomProducer.ObjectShrinkWidth: Boolean; -begin - Result := False; -end; - -function TdxPSCustomProducer.OptionsTransparent: TdxCustomContainerReportLinkOptionsTransparent; -begin - Result := ReportLink.OptionsTransparent; -end; - -function TdxPSCustomProducer.GetDC: HDC; -begin - Result := ReportLink.ScreenDC; -end; - -function TdxPSCustomProducer.GetDefinition(Component: TComponent): TdxPSCustomContainerItemDefinition; -begin - Result := ReportLink.DefinitionsByContainerItem[Component]; -end; - -function TdxPSCustomProducer.GetIsDesigning: Boolean; -begin - Result := csDesigning in ReportLink.ComponentState; -end; - -function TdxPSCustomProducer.GetProducer(Component: TComponent): TdxPSCustomProducer; -begin - Result := ReportLink.Producers[Component]; -end; - -{ TdxPSCustomContainerItemProducer } - -function TdxPSCustomContainerItemProducer.Control: TControl; -begin - Result := ProducingObject; -end; - -class function TdxPSCustomContainerItemProducer.ControlClass: TControlClass; -begin - Result := TControl; -end; - -function TdxPSCustomContainerItemProducer.Definition: TdxPSContainerControlDefinition; -begin - Result := inherited Definition as TdxPSContainerControlDefinition; -end; - -class function TdxPSCustomContainerItemProducer.DefinitionClass: TdxPSCustomContainerItemDefinitionClass; -begin - Result := TdxPSContainerControlDefinition; -end; - -class function TdxPSCustomContainerItemProducer.PairClass: TClass; -begin - Result := ControlClass; -end; - -function TdxPSCustomContainerItemProducer.ProducingObject: TControl; -begin - Result := TControl(inherited ProducingObject); -end; - -function TdxPSCustomContainerItemProducer.ProducingObjectFriendlyName: string; -begin - Result := ''; - if not IsDesigning then - Result := Control_GetText(Control); - if Result = '' then - Result := inherited ProducingObjectFriendlyName; -end; - -function TdxPSCustomContainerItemProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := ((csAcceptsControls in Control_GetControlStyle(Control)) and - ((AChildControl.Owner <> Control)) or - (Control is TCustomForm) {$IFDEF DELPHI5} or (Control is TCustomFrame){$ENDIF}); -end; - -function TdxPSCustomContainerItemProducer.CreateIterator: IdxPSContainerIterator; -begin - Result := nil; -end; - -function TdxPSCustomContainerItemProducer.GetContentColor: TColor; -begin - if Control.Enabled then - Result := Control_GetColor(Control) - else - Result := DefaultControlDisabledContentColor; -end; - -function TdxPSCustomContainerItemProducer.GetControlBoundsRect: TRect; -begin - Result := Control.ClientRect; - OffsetRect(Result, Control.Left, Control.Top); -end; - -function TdxPSCustomContainerItemProducer.GetFont: TFont; -begin - Result := Control_GetFont(Control); -end; - -function TdxPSCustomContainerItemProducer.GetFontColor: TColor; -begin - if Control.Enabled then - Result := Font.Color - else - Result := DefaultControlDisabledTextColor; -end; - -function TdxPSCustomContainerItemProducer.GetFontIndex: Integer; -begin - Result := ReportLink.GetPreparedFontIndex(Font, IsFontSubstitutable, FontName, FontColor, FontStyle); -end; - -function TdxPSCustomContainerItemProducer.GetFontName: string; -begin - Result := Font.Name; -end; - -function TdxPSCustomContainerItemProducer.GetFontStyle: TFontStyles; -begin - Result := Font.Style; -end; - -function TdxPSCustomContainerItemProducer.IsFontSubstitutable: Boolean; -begin - Result := True; -end; - -function TdxPSCustomContainerItemProducer.HostClass: TdxReportCellClass; -begin - Result := TdxReportCell; -end; - -procedure TdxPSCustomContainerItemProducer.InitializeHost(ACell: TdxReportCell); -begin - with ACell do - begin - BoundsRect := ControlBounds; - Color := ContentColor; - CellSides := []; - ExcludeFromClipRgn := True; - Transparent := True; - end; -end; - -procedure TdxPSCustomContainerItemProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - with AnItem do - begin - BoundsRect := GetControlBoundsRect; - Color := ContentColor; - Data := Integer(TObject(Control)); - FontIndex := Self.FontIndex; - Transparent := OptionsTransparent.Controls; - end; -end; - -function TdxPSCustomContainerItemProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TAbstractdxReportCellData; -end; - -function TdxPSCustomContainerItemProducer.GetControlBounds: TRect; -begin - Result := GetControlBoundsRect; - if Control <> RootContainer then {.1} - with Producers[Control.Parent] do - OffsetRect(Result, ScrollPosLeft, ScrollPosTop); -end; - -{ TdxPSCustomDelegateProducer } - -procedure TdxPSCustomDelegateProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - Producer.InitializeItem(AnItem); -end; - -function TdxPSCustomDelegateProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := Producer.ItemClass; -end; - -{ TdxPSNativePrintableControlProducer } - -class function TdxPSNativePrintableControlProducer.Reenterable: Boolean; -begin - Result := False; -end; - -function TdxPSNativePrintableControlProducer.Definition: TdxPSNativePrintableControlDefinition; -begin - Result := inherited Definition as TdxPSNativePrintableControlDefinition; -end; - -class function TdxPSNativePrintableControlProducer.DefinitionClass: TdxPSCustomContainerItemDefinitionClass; -begin - Result := TdxPSNativePrintableControlDefinition; -end; - -class function TdxPSNativePrintableControlProducer.HasNativeSupportForBorders: Boolean; -begin - Result := True; -end; - -class procedure TdxPSNativePrintableControlProducer.Register; -begin - dxPSNativePrintableControlProducerFactory.Register(Self); -end; - -class procedure TdxPSNativePrintableControlProducer.Unregister; -begin - if not FIsNativePrintableControlProducerFactoryReleased then - dxPSNativePrintableControlProducerFactory.Unregister(Self); -end; - -procedure TdxPSNativePrintableControlProducer.AdjustItemBounds(AnItem: TdxReportVisualItem); -var - R: TRect; -begin - with AnItem do - begin - R := BoundsRect; - InflateRect(R, AnItem.BorderClass.Thickness - 1, AnItem.BorderClass.Thickness - 1); - if ShowShadow then - begin - Inc(R.Right, ShadowDepth); - Inc(R.Bottom, ShadowDepth); - end; - - if not (Control is TWinControl) then - begin - OffsetRect(R, Control.Left, Control.Top); - with Producers[Control.Parent] do - OffsetRect(R, ScrollPosLeft, ScrollPosTop); - end; - - BoundsRect := R; - - with Definition.OptionsPlace do - begin - if not ShrinkWidth and not ExpandWidth and (Width < Parent.Width) then - Width := Parent.Width; - if not ShrinkHeight and not ExpandHeight and (Height < Parent.Height) then - Height := Parent.Height; - end; - - if not Parent.ClipChildren then - begin - Parent.Height := Height; - Parent.Width := Width; - end; - end; -end; - -function TdxPSNativePrintableControlProducer.CreateControlReportLink: TBasedxReportLink; -begin - Result := ReportLink.DoGetReportLink(Control); - FIsOuterLinkUsed := Result <> nil; - if not FIsOuterLinkUsed then - Result := GetLinkClass(Control.ClassType).Create(nil); - InitializeReportLink(Result); -end; - -procedure TdxPSNativePrintableControlProducer.CreateNativePrintableControlData(AnItem: TdxReportVisualItem); -var - Link: TBasedxReportLinkAccess; - Pt: TPoint; -begin - Link := TBasedxReportLinkAccess(CreateControlReportLink); - try - if Link.DataProviderPresent then - begin - if not IsOuterLinkUsed then Link.RestoreFromOriginal; - Link.RebuildReport; - AnItem.Assign(Link.ReportCells.Cells); - - Pt := Control.ClientToScreen(NullPoint); - Pt := TopLevelRootContainer.ScreenToClient(Pt); - AnItem.ReportCells.AppendOverlays(Link.ReportCells, Pt.X, Pt.Y); - - Definition.GetData(Link); - end - else - AnItem.CellSides := []; - finally - DeinitializeReportLink(Link); - if not IsOuterLinkUsed then Link.Free; - FIsOuterLinkUsed := False; - end; -end; - -procedure TdxPSNativePrintableControlProducer.DeinitializeReportLink(AControlReportLink: TBasedxReportLink); -begin - with TBasedxReportLinkAccess(AControlReportLink) do - begin - if ComponentPrinter = InternalComponentPrinter then ComponentPrinter := nil; - Controller := nil; - ReportLink.DoInitializeReportLink(AControlReportLink, psAfter); - end; -end; - -class function TdxPSNativePrintableControlProducer.GetLinkClass(AClass: TClass): TdxReportLinkClass; -begin - Result := dxPSLinkClassByCompClass(TComponentClass(AClass)); -end; - -procedure TdxPSNativePrintableControlProducer.InitializeReportLink(AControlReportLink: TBasedxReportLink); -begin - with TBasedxReportLinkAccess(AControlReportLink) do - begin - if ComponentPrinter = nil then ComponentPrinter := InternalComponentPrinter; - Controller := ReportLink; - Component := Control; - ReportLink.DoInitializeReportLink(AControlReportLink, psBefore); - end; -end; - -class function TdxPSNativePrintableControlProducer.HasReportLink(AComponent: TComponent): Boolean; -var - LinkClass: TdxReportLinkClass; -begin - LinkClass := GetLinkClass(AComponent.ClassType); - Result := (LinkClass <> nil) and LinkClass.Aggregable; -end; - -function TdxPSNativePrintableControlProducer.HostClass: TdxReportCellClass; -begin - Result := TdxReportNativePrintableControlHost; -end; - -procedure TdxPSNativePrintableControlProducer.InitializeHost(ACell: TdxReportCell); -begin - inherited; - ACell.ClipChildren := not (ObjectExpandHeight and ObjectExpandWidth); -end; - -procedure TdxPSNativePrintableControlProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - CreateNativePrintableControlData(AnItem); - InitializeNativePrintableControlHost(AnItem); -end; - -procedure TdxPSNativePrintableControlProducer.InitializeNativePrintableControlHost(AnItem: TdxReportVisualItem); -begin - AnItem.Data := Integer(TObject(Control)); // should be copied as well !!! - AnItem.ExcludeFromClipRgn := True; - AnItem.Transparent := True; - AnItem.CellSides := []; //v.3.2 - - AdjustItemBounds(AnItem); -end; - -function TdxPSNativePrintableControlProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCell; -end; - -function TdxPSNativePrintableControlProducer.MeasureItemHeight(AnItem: TdxReportVisualItem): Integer; -begin - Result := Definition.ReportDimension.Y; -end; - -function TdxPSNativePrintableControlProducer.MeasureItemWidth(AnItem: TdxReportVisualItem): Integer; -begin - Result := Definition.ReportDimension.X; -end; - -function TdxPSNativePrintableControlProducer.ObjectExpandHeight: Boolean; -begin - Result := False; -end; - -function TdxPSNativePrintableControlProducer.ObjectExpandWidth: Boolean; -begin - Result := False; -end; - -{ TdxPSContainerControlProducer } - -procedure TdxPSContainerControlProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - AnItem.BoundsRect := GetControlBoundsRect; - AnItem.CellSides := csAll; - //AnItem.ExcludeFromClipRgn := True; -end; - -{ TdxPSControlAsMetafileProducer } - -class function TdxPSControlAsMetafileProducer.PairClass: TClass; -begin - Result := BuddyClass; -end; - -class procedure TdxPSControlAsMetafileProducer.Register; -begin - dxPSProducerHelperFactory.Register(Self); -end; - -class procedure TdxPSControlAsMetafileProducer.Unregister; -begin - dxPSProducerHelperFactory.Unregister(Self); -end; - -procedure TdxPSControlAsMetafileProducer.Reposition; -begin -end; - -class function TdxPSControlAsMetafileProducer.BuddyClass: TdxPSCustomProducerClass; -begin - Result := TdxPSContainerControlProducer; -end; - -function TdxPSControlAsMetafileProducer.CreateControlImage(AnItem: TdxReportVisualItem): TGraphic; -var - Canvas: TMetafileCanvas; -begin - Result := TdxReportCellGraphic(AnItem).CreateImage(TMetafile); - try - Result.Height := AnItem.Height; - Result.Width := AnItem.Width; - Canvas := TMetafileCanvas.Create(TMetafile(Result), DC); - try - Control.Perform(WM_PAINT, Canvas.Handle, 0) - finally - Canvas.Free; - end; - except - Result.Free; - raise; - end; -end; - -procedure TdxPSControlAsMetafileProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportCellGraphic(AnItem).CellSides := []; - TdxReportCellGraphic(AnItem).ImageTransparent := False; - CreateControlImage(AnItem); -end; - -function TdxPSControlAsMetafileProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellGraphic; -end; - -{ TdxPSBevelProducer } - -function TdxPSBevelProducer.Control: TBevel; -begin - Result := inherited Control as TBevel; -end; - -class function TdxPSBevelProducer.ControlClass: TControlClass; -begin - Result := TBevel; -end; - -procedure TdxPSBevelProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - AnItem.CellSides := BevelShapeMap[Control.Shape]; - AnItem.BorderClass := BevelStyleMap[Control.Style, Control.Shape]; - AnItem.Transparent := True; -end; - -function TdxPSBevelProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellBox; -end; - -{ TdxPSPaintBoxProducer } - -function TdxPSPaintBoxProducer.Control: TPaintBox; -begin - Result := inherited Control as TPaintBox; -end; - -class function TdxPSPaintBoxProducer.ControlClass: TControlClass; -begin - Result := TPaintBox; -end; - -procedure TdxPSPaintBoxProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - AnItem.CellSides := []; - AnItem.BorderClass := TdxPSCellNullBorder; - AnItem.Transparent := True; -end; - -function TdxPSPaintBoxProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellBox; -end; - -{ TdxPSShapeProducer } - -function TdxPSShapeProducer.Control: TShape; -begin - Result := inherited Control as TShape; -end; - -class function TdxPSShapeProducer.ControlClass: TControlClass; -begin - Result := TShape; -end; - -procedure TdxPSShapeProducer.InitializeItem(AnItem: TdxReportVisualItem); -var - V: Integer; -begin - inherited; - with TCustomdxReportCellShape(AnItem) do - begin - CellSides := []; - ContentBkColor := Control_GetColor(Control.Parent); - ContentPattern := BrushStyleMap[Control.Brush.Style]; - ShapeBorderColor := Control.Pen.Color; - ShapeBorderThickness := Control.Pen.Width; - if (Control.Pen.Style <> psSolid) and (ShapeBorderThickness > 1) then - ShapeBorderThickness := 1; - ShapeColor := Control.Brush.Color; - if Control.Pen.Style = psClear then - ShapeBorderColor := ShapeColor; - ShapeTransparent := Control.Brush.Style = bsClear; - if Control.Shape in [stRoundRect, stRoundSquare] then - begin - if ShapeHeight > ShapeWidth then - V := ShapeWidth - else - V := ShapeHeight; - TdxReportCellRoundRect(AnItem).EllipseHeight := V div 4; - TdxReportCellRoundRect(AnItem).EllipseWidth := V div 4; - end; - Transparent := True; - end; -end; - -function TdxPSShapeProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := ShapeTypeMap[Control.Shape]; -end; - -{ TdxPSCustomLabelProducer } - -function TdxPSCustomLabelProducer.Control: TCustomLabel; -begin - Result := inherited Control as TCustomLabel; -end; - -class function TdxPSCustomLabelProducer.ControlClass: TControlClass; -begin - Result := TCustomLabel; -end; - -function TdxPSCustomLabelProducer.GetControlBoundsRect: TRect; -begin - Result := inherited GetControlBoundsRect; - OffsetRect(Result, 0, -2); -end; - -procedure TdxPSCustomLabelProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - with TdxReportCellString(AnItem) do - begin - CellSides := []; - Multiline := Label_GetWordWrap(Control); - HidePrefix := True; - Text := Label_GetText(Control); - TextAlignX := dxPSCore.dxTextAlignX[Label_GetAlignment(Control)]; - TextAlignY := dxPSCore.dxTextAlignY[Label_GetLayout(Control)]; - AdjustFont := Label_GetAutoSize(Control); - end; -end; - -function TdxPSCustomLabelProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellString; -end; - -function TdxPSCustomLabelProducer.ObjectExpandHeight: Boolean; -begin - Result := True; -end; - -function TdxPSCustomLabelProducer.ObjectExpandWidth: Boolean; -begin - Result := Label_GetAutoSize(Control); -end; - -{ TdxPSContainerCustomWinControlProducer } - -function TdxPSContainerCustomWinControlProducer.Control: TWinControl; -begin - Result := inherited Control as TWinControl; -end; - -class function TdxPSContainerCustomWinControlProducer.ControlClass: TControlClass; -begin - Result := TWinControl; -end; - -function TdxPSContainerCustomWinControlProducer.CreateIterator: IdxPSContainerIterator; -begin - IteratorClass.Create(Control).GetInterface(IdxPSContainerIterator, Result); -end; - -class function TdxPSContainerCustomWinControlProducer.DefinitionClass: TdxPSCustomContainerItemDefinitionClass; -begin - Result := TdxPSContainerWinControlDefinition; -end; - -function TdxPSContainerCustomWinControlProducer.HostClass: TdxReportCellClass; -begin - Result := TdxReportWinControlHost; -end; - -procedure TdxPSContainerCustomWinControlProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - AnItem.Left := 0; - AnItem.Top := 0; - AnItem.BorderClass := Ctl3DBorderClassMap[Control_GetCtl3D(Control)]; - //AnItem.ExcludeFromClipRgn := True; -end; - -class function TdxPSContainerCustomWinControlProducer.IteratorClass: TdxPSWinControlIteratorClass; -begin - Result := TdxPSWinControlIterator; -end; - -{ TdxPSWinControlAsMetafileProducer } - -class function TdxPSWinControlAsMetafileProducer.PairClass: TClass; -begin - Result := BuddyClass; -end; - -procedure TdxPSWinControlAsMetafileProducer.Reposition; -begin -end; - -class procedure TdxPSWinControlAsMetafileProducer.Register; -begin - dxPSProducerHelperFactory.Register(Self); -end; - -class procedure TdxPSWinControlAsMetafileProducer.Unregister; -begin - dxPSProducerHelperFactory.Unregister(Self); -end; - -class function TdxPSWinControlAsMetafileProducer.BuddyClass: TdxPSCustomProducerClass; -begin - Result := TdxPSContainerWinControlProducer; -end; - -function TdxPSWinControlAsMetafileProducer.CreateControlImage(AnItem: TdxReportVisualItem): TGraphic; -var - Canvas: TMetafileCanvas; -begin - Result := TdxReportCellGraphic(AnItem).CreateImage(TMetafile); - Result.Width := AnItem.Width; - Result.Height := AnItem.Height; - Canvas := TMetafileCanvas.Create(TMetafile(Result), DC); - try - Control.PaintTo(Canvas.Handle, 0, 0); - finally - Canvas.Free; - end; -end; - -procedure TdxPSWinControlAsMetafileProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportCellGraphic(AnItem).CellSides := []; - TdxReportCellGraphic(AnItem).ImageTransparent := False; - CreateControlImage(AnItem); -end; - -function TdxPSWinControlAsMetafileProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellGraphic; -end; - -{ TdxPSContainerWinControlProducer } - -procedure TdxPSContainerWinControlProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportCellString(AnItem).Text := Control_GetText(Control); -end; - -function TdxPSContainerWinControlProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellString; -end; - -function TdxPSContainerWinControlProducer.ObjectExpandHeight: Boolean; -begin - Result := True; -end; - -{ TdxPSDateTimePickerProducer } - -function TdxPSDateTimePickerProducer.Control: TDateTimePicker; -begin - Result := inherited Control as TDateTimePicker; -end; - -class function TdxPSDateTimePickerProducer.ControlClass: TControlClass; -begin - Result := TDateTimePicker; -end; - -procedure TdxPSDateTimePickerProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - with TdxReportCellCheck(AnItem) do - begin - //AnItem.BorderClass := Ctl3DBorderClassMap[ControlGetCtl3D(Control)]; - if Control.ShowCheckbox then - begin - ButtonEdgeStyle := cbes3D; - Checked := Control.Checked; - CheckPos := ccpLeft; - end; - end; -end; - -function TdxPSDateTimePickerProducer.ItemClass: TdxReportVisualItemClass; -const - ItemClasses: array[Boolean] of TdxReportVisualItemClass = (TdxReportCellString, TdxReportCellCheck); -begin - Result := ItemClasses[Control.ShowCheckbox]; -end; - -{ TdxPSCustomHotKeyProducer } - -function TdxPSCustomHotKeyProducer.Control: TCustomHotKey; -begin - Result := inherited Control as TCustomHotKey; -end; - -class function TdxPSCustomHotKeyProducer.ControlClass: TControlClass; -begin - Result := TCustomHotKey; -end; - -procedure TdxPSCustomHotKeyProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportCellString(AnItem).Text := Menus.ShortCutToText(HotKey_GetHotKey(Control)); -end; - -{ TdxPSCustomStaticTextProducer } - -function TdxPSCustomStaticTextProducer.Control: TCustomStaticText; -begin - Result := inherited Control as TCustomStaticText; -end; - -class function TdxPSCustomStaticTextProducer.ControlClass: TControlClass; -begin - Result := TCustomStaticText; -end; - -procedure TdxPSCustomStaticTextProducer.InitializeItem(AnItem: TdxReportVisualItem); -const - BorderClassMap: array[TStaticBorderStyle] of TdxPSCellBorderClass = - (TdxPSCellNullBorder, TdxPSCellUltraFlatBorder, TdxPSCellSunkenSoftBorder); - CellSidesMap: array[TStaticBorderStyle] of TdxCellSides = ([], csAll, csAll); -begin - inherited; - TdxReportCellString(AnItem).BorderClass := BorderClassMap[StaticText_GetBorderStyle(Control)]; - TdxReportCellString(AnItem).CellSides := CellSidesMap[StaticText_GetBorderStyle(Control)]; - TdxReportCellString(AnItem).HidePrefix := True; - TdxReportCellString(AnItem).TextAlignX := dxPSCore.dxTextAlignX[StaticText_GetAlignment(Control)]; -end; - -{ TdxPSCustomEditProducer } - -function TdxPSCustomEditProducer.Control: TCustomEdit; -begin - Result := inherited Control as TCustomEdit; -end; - -class function TdxPSCustomEditProducer.ControlClass: TControlClass; -begin - Result := TCustomEdit; -end; - -procedure TdxPSCustomEditProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportCellString(AnItem).CellSides := BorderStyleMap[Edit_GetBorderStyle(Control)]; - //TdxReportCellString(AnItem).BorderClass := Ctl3DBorderClassMap[ControlGetCtl3D(Control)]; -end; - -{ TdxPSCustomMemoProducer } - -function TdxPSCustomMemoProducer.Control: TCustomMemo; -begin - Result := inherited Control as TCustomMemo; -end; - -class function TdxPSCustomMemoProducer.ControlClass: TControlClass; -begin - Result := TCustomMemo; -end; - -function TdxPSCustomMemoProducer.ProducingObjectFriendlyName: string; -var - Lines: TStrings; -begin - Result := ''; - Lines := Memo_GetLines(Control); - if not IsDesigning and (Lines.Count <> 0) then - Result := dxPSMakeFriendlyNameFromStrings(Lines); - if Result = '' then - Result := inherited ProducingObjectFriendlyName; -end; - -procedure TdxPSCustomMemoProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportCellString(AnItem).TextAlignX := dxPSCore.dxTextAlignX[Memo_GetAlignment(Control)]; - TdxReportCellString(AnItem).TextAlignY := taTop; - TdxReportCellString(AnItem).Multiline := True; -end; - -function TdxPSCustomMemoProducer.ObjectExpandHeight: Boolean; -begin - Result := False; -end; - -{ TdxPSCustomComboBoxProducer } - -function TdxPSCustomComboBoxProducer.Control: TCustomComboBox; -begin - Result := inherited Control as TCustomComboBox; -end; - -class function TdxPSCustomComboBoxProducer.ControlClass: TControlClass; -begin - Result := TCustomComboBox; -end; - -procedure TdxPSCustomComboBoxProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - //TdxReportCellString(AnItem).BorderClass := Ctl3DBorderClassMap[ControlGetCtl3D(Control)]; - TdxReportCellString(AnItem).Text := ComboBox_GetCurrentText(Control); -end; - -{$IFDEF DELPHI6} - -{ TdxPSComboBoxExProducer } - -function TdxPSCustomComboBoxExProducer.Control: TCustomComboBoxEx; -begin - Result := inherited Control as TCustomComboBoxEx; -end; - -class function TdxPSCustomComboBoxExProducer.ControlClass: TControlClass; -begin - Result := TCustomComboBoxEx; -end; - -procedure TdxPSCustomComboBoxExProducer.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(Control.Images); -end; - -procedure TdxPSCustomComboBoxExProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - with TdxReportCellImage(AnItem) do - begin - if Control.ItemIndex <> -1 then - ImageIndex := Control.ItemsEx[Control.ItemIndex].ImageIndex; - ImageList := Control.Images; - MakeSpaceForEmptyImage := True; - if Control.Style in [csExSimple, csExDropDown] then - Text := Control_GetText(Control) - else - if Control.ItemIndex <> -1 then - Text := Control.ItemsEx[Control.ItemIndex].Caption - else - Text := ''; - end; -end; - -function TdxPSCustomComboBoxExProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellImage; -end; - -{$ENDIF} - -function TdxPSCustomCheckBoxProducer.Control: TCustomCheckBox; -begin - Result := inherited Control as TCustomCheckBox; -end; - -class function TdxPSCustomCheckBoxProducer.ControlClass: TControlClass; -begin - Result := TCustomCheckBox; -end; - -procedure TdxPSCustomCheckBoxProducer.InitializeItem(AnItem: TdxReportVisualItem); -var - CheckState: TCheckBoxState; -begin - inherited; - CheckState := CheckBox_GetState(Control); - with TdxReportCellCheck(AnItem) do - begin - ButtonEdgeStyle := cbes3D; - CellSides := []; - Checked := CheckState <> cbUnchecked; - CheckPos := CheckAlignmentMap[CheckBox_GetAlignment(Control)]; - Enabled := CheckState <> cbGrayed; - HidePrefix := True; - TextAlignX := taLeft; - end; -end; - -function TdxPSCustomCheckBoxProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellCheck; -end; - -{ TdxPSRadioButtonProducer } - -function TdxPSRadioButtonProducer.Control: TRadioButton; -begin - Result := inherited Control as TRadioButton; -end; - -class function TdxPSRadioButtonProducer.ControlClass: TControlClass; -begin - Result := TRadioButton; -end; - -procedure TdxPSRadioButtonProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - with TdxReportCellRadio(AnItem) do - begin - ButtonEdgeStyle := cbes3D; - CellSides := []; - Checked := Control.Checked; - CheckPos := CheckAlignmentMap[Control.Alignment]; - Enabled := Control.Enabled; - HidePrefix := True; - TextAlignX := taLeft; - end; -end; - -function TdxPSRadioButtonProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellRadio; -end; - -{ TdxPSCustomContainerProducer } - -class function TdxPSCustomContainerProducer.CanHasAvailableChildren: Boolean; -begin - Result := True; -end; - -class function TdxPSCustomContainerProducer.DefinitionClass: TdxPSCustomContainerItemDefinitionClass; -begin - Result := TdxPSContainerDefinition; -end; - -procedure TdxPSCustomContainerProducer.InitializeItem(AnItem: TdxReportVisualItem); -const - CellsSidesMap: array[Boolean] of TdxCellSides = ([], csAll); -begin - inherited; - //AnItem.ExcludeFromClipRgn := Control <> RootContainer; - if Control = RootContainer then - begin - AnItem.CellSides := CellsSidesMap[ReportLink.OptionsRefinements.RootBorders]; - AnItem.Transparent := OptionsTransparent.Root; - end - else - AnItem.Transparent := OptionsTransparent.Containers; -end; - -function TdxPSCustomContainerProducer.ObjectExpandHeight: Boolean; -begin - if Control = RootContainer then - Result := True - else - Result := inherited ObjectExpandHeight; -end; - -function TdxPSCustomContainerProducer.ObjectExpandWidth: Boolean; -begin - if Control = RootContainer then - Result := True - else - Result := inherited ObjectExpandWidth; -end; - -function TdxPSCustomContainerProducer.ObjectShrinkHeight: Boolean; -begin - if Control = RootContainer then - Result := True - else - Result := inherited ObjectShrinkHeight; -end; - -function TdxPSCustomContainerProducer.ObjectShrinkWidth: Boolean; -begin - if Control = RootContainer then - Result := True - else - Result := inherited ObjectShrinkWidth; -end; - -{ TdxPSCustomPanelProducer } - -function TdxPSCustomPanelProducer.Control: TCustomPanel; -begin - Result := inherited Control as TCustomPanel; -end; - -class function TdxPSCustomPanelProducer.ControlClass: TControlClass; -begin - Result := TCustomPanel; -end; - -class function TdxPSCustomPanelProducer.HasNativeSupportForBorders: Boolean; -begin - Result := True; -end; - -procedure TdxPSCustomPanelProducer.InitializeItem(AnItem: TdxReportVisualItem); -var - BevelInner, BevelOuter: TPanelBevel; -begin - inherited; - if Panel_GetBorderStyle(Control) <> bsSingle then - begin - BevelInner := Panel_GetBevelInner(Control); - BevelOuter := Panel_GetBevelOuter(Control); - if (BevelInner = bvNone) and (BevelOuter = bvNone) then - TdxReportCellString(AnItem).CellSides := [] - else - TdxReportCellString(AnItem).BorderClass := PanelBevelsMap[BevelInner, BevelOuter]; - end - else - TdxReportCellString(AnItem).BorderClass := PanelSingleBorderMap[Control_GetCtl3D(Control)]; - - TdxReportCellString(AnItem).Text := Control_GetText(Control); - TdxReportCellString(AnItem).TextAlignX := dxPSCore.dxTextAlignX[Panel_GetAlignment(Control)]; - TdxReportCellString(AnItem).TextAlignY := taCenterY; -end; - -function TdxPSCustomPanelProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellString; -end; - -function TdxPSCustomPanelProducer.ObjectExpandHeight: Boolean; -begin - if Control <> RootContainer then - Result := True - else - Result := inherited ObjectExpandHeight; -end; - -function TdxPSCustomPanelProducer.ObjectExpandWidth: Boolean; -begin - if Control <> RootContainer then - Result := True - else - Result := inherited ObjectExpandWidth; -end; - -{ TdxPSCustomGroupBoxProducer } - -function TdxPSCustomGroupBoxProducer.Control: TCustomGroupBox; -begin - Result := inherited Control as TCustomGroupBox; -end; - -class function TdxPSCustomGroupBoxProducer.ControlClass: TControlClass; -begin - Result := TCustomGroupBox; -end; - -class function TdxPSCustomGroupBoxProducer.HasNativeSupportForBorders: Boolean; -begin - Result := True; -end; - -procedure TdxPSCustomGroupBoxProducer.InitializeItem(AnItem: TdxReportVisualItem); -const - BorderClasses: array[Boolean] of TdxPSCellBorderClass = (TdxPSCellUltraFlatBorder, TdxPSCellEtchedBorder); -begin - inherited; - with TdxReportGroup(AnItem) do - begin - BorderClass := BorderClasses[Control_GetCtl3D(Control)]; - BorderColor := dxPSCore.dxDefaultGridLineColor; - CaptionAlignment := taLeft; - CaptionText := Control_GetText(Control); - CaptionTransparent := Transparent; - CellSides := csAll; - ShowCaption := True; - UseOwnBorderClass := True; - - LookAndFeel := ReportLink.CreateGroupLookAndFeel(LookAndFeelClass); - InitializeLookAndFeel(AnItem, LookAndFeel); - LookAndFeel.Prepare(DC); - CalculateCaptionTextWidth(DC); - end; -end; - -procedure TdxPSCustomGroupBoxProducer.InitializeLookAndFeel(AnItem: TdxReportVisualItem; - ALookAndFeel: TdxPSReportGroupLookAndFeel); -begin - ALookAndFeel.FontIndex := AnItem.FontIndex; - ALookAndFeel.CaptionFontIndex := AnItem.FontIndex; - ALookAndFeel.Color := ContentColor; -end; - -function TdxPSCustomGroupBoxProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportGroup; -end; - -class function TdxPSCustomGroupBoxProducer.LookAndFeelClass: TdxPSReportGroupLookAndFeelClass; -begin - Result := TdxPSReportGroupStandardLookAndFeel; -end; - -{ TdxPSCustomRadioGroupProducer } - -function TdxPSCustomRadioGroupProducer.Control: TCustomRadioGroup; -begin - Result := inherited Control as TCustomRadioGroup; -end; - -class function TdxPSCustomRadioGroupProducer.ControlClass: TControlClass; -begin - Result := TCustomRadioGroup; -end; - -function TdxPSCustomRadioGroupProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := not AChildControl.ClassNameIs('TGroupButton'); // RadioGroup's buttons are processed inside -end; - -procedure TdxPSCustomRadioGroupProducer.CreateItems(AReportRadioGroup: TdxReportRadioGroup); -var - Items: TStrings; - I: Integer; - Item: TdxCustomReportCellRadio; -begin - Items := RadioGroup_GetItems(Control); - for I := 0 to Items.Count - 1 do - begin - Item := AReportRadioGroup.Add(Items[I]); - InitializeRadioItem(Item, I); - end; -end; - -procedure TdxPSCustomRadioGroupProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - with TdxReportRadioGroup(AnItem) do - begin - ButtonEdgeStyle := cbes3D; - CheckPos := ccpLeft; - ColumnCount := RadioGroup_GetColumns(Control); - CreateItems(TdxReportRadioGroup(AnItem)); - ItemIndex := RadioGroup_GetItemIndex(Control); - - AdjustContent(DC); - end; -end; - -procedure TdxPSCustomRadioGroupProducer.InitializeRadioItem(AnItem: TdxCustomReportCellRadio; AnIndex: Integer); -begin - AnItem.Enabled := Control.Controls[AnIndex].Enabled; -end; - -function TdxPSCustomRadioGroupProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportRadioGroup; -end; - -{ TdxPSRootContainerProducer } - -procedure TdxPSRootContainerProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - AnItem.Left := 0; - AnItem.Top := 0; -end; - -{ TdxPSPageControlIterator } - -function TdxPSPageControlIterator.GetControl(Index: Integer): TControl; -begin - Result := PageControl.ActivePage; -end; - -function TdxPSPageControlIterator.GetControlCount: Integer; -begin - Result := Ord(PageControl.PageCount > 0); -end; - -function TdxPSPageControlIterator.GetPageControl: TPageControl; -begin - Result := TPageControl(Control); -end; - -{ TdxPSPageControlProducer } - -function TdxPSPageControlProducer.Control: TPageControl; -begin - Result := inherited Control as TPageControl; -end; - -class function TdxPSPageControlProducer.ControlClass: TControlClass; -begin - Result := TPageControl; -end; - -function TdxPSPageControlProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := AChildControl = Control.ActivePage; -end; - -class function TdxPSPageControlProducer.IteratorClass: TdxPSWinControlIteratorClass; -begin - Result := TdxPSPageControlIterator; -end; - -{ TdxPSTabSheetProducer } - -function TdxPSTabSheetProducer.Control: TTabSheet; -begin - Result := inherited Control as TTabSheet; -end; - -class function TdxPSTabSheetProducer.ControlClass: TControlClass; -begin - Result := TTabSheet; -end; - -{ TdxPSTabControlProducer } - -function TdxPSTabControlProducer.Control: TTabControl; -begin - Result := inherited Control as TTabControl; -end; - -class function TdxPSTabControlProducer.ControlClass: TControlClass; -begin - Result := TTabControl; -end; - -{ TdxPSNotebookIterator } - -function TdxPSNotebookIterator.GetControl(Index: Integer): TControl; -begin - with Notebook do - Result := TPage(Pages.Objects[PageIndex]); -end; - -function TdxPSNotebookIterator.GetControlCount: Integer; -begin - Result := Ord(Notebook.Pages.Count <> 0); -end; - -function TdxPSNotebookIterator.GetNotebook: TNotebook; -begin - Result := TNotebook(Control); -end; - -{ TdxPSNotebookPageProducer } - -function TdxPSNotebookPageProducer.Control: TPage; -begin - Result := inherited Control as TPage; -end; - -class function TdxPSNotebookPageProducer.ControlClass: TControlClass; -begin - Result := TPage; -end; - -{ TdxPSNotebookProducer } - -function TdxPSNotebookProducer.Control: TNotebook; -begin - Result := inherited Control as TNotebook; -end; - -class function TdxPSNotebookProducer.ControlClass: TControlClass; -begin - Result := TNotebook; -end; - -function TdxPSNotebookProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := AChildControl = Control.Pages.Objects[Control.PageIndex]; -end; - -class function TdxPSNotebookProducer.IteratorClass: TdxPSWinControlIteratorClass; -begin - Result := TdxPSNotebookIterator; -end; - -{ TdxPSTabbedNotebookIterator } - -function TdxPSTabbedNotebookIterator.GetControl(Index: Integer): TControl; -begin - with TabbedNotebook do - Result := TTabPage(Pages.Objects[PageIndex]); -end; - -function TdxPSTabbedNotebookIterator.GetControlCount: Integer; -begin - Result := Ord(TabbedNotebook.Pages.Count <> 0); -end; - -function TdxPSTabbedNotebookIterator.GetTabbedNotebook: TTabbedNotebook; -begin - Result := TTabbedNotebook(Control); -end; - -{ TdxPSTabbedNotebookPageProducer } - -function TdxPSTabbedNotebookPageProducer.Control: TTabPage; -begin - Result := inherited Control as TTabPage; -end; - -class function TdxPSTabbedNotebookPageProducer.ControlClass: TControlClass; -begin - Result := TTabPage; -end; - -{ TdxPSTabbedNotebookProducer } - -function TdxPSTabbedNotebookProducer.Control: TTabbedNotebook; -begin - Result := inherited Control as TTabbedNotebook; -end; - -class function TdxPSTabbedNotebookProducer.ControlClass: TControlClass; -begin - Result := TTabbedNotebook; -end; - -function TdxPSTabbedNotebookProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := AChildControl = Control.Pages.Objects[Control.PageIndex]; -end; - -class function TdxPSTabbedNotebookProducer.IteratorClass: TdxPSWinControlIteratorClass; -begin - Result := TdxPSTabbedNotebookIterator; -end; - -{ TdxPSScrollingWinControlProducer } - -function TdxPSScrollingWinControlProducer.Control: TScrollingWinControl; -begin - Result := inherited Control as TScrollingWinControl; -end; - -class function TdxPSScrollingWinControlProducer.ControlClass: TControlClass; -begin - Result := TScrollingWinControl; -end; - -function TdxPSScrollingWinControlProducer.GetScrollBarPos(AScrollBar: TControlScrollBar): Integer; -begin - with AScrollBar do - if Visible then - Result := Position - else - Result := 0; -end; - -function TdxPSScrollingWinControlProducer.GetScrollPosLeft: Integer; -begin - Result := GetScrollBarPos(Control.HorzScrollBar); -end; - -function TdxPSScrollingWinControlProducer.GetScrollPosTop: Integer; -begin - Result := GetScrollBarPos(Control.VertScrollBar); -end; - -procedure TdxPSScrollingWinControlProducer.InitializeHost(ACell: TdxReportCell); - - function GetScrollValue(AValue, AMinValue: Integer): Integer; - begin - if AValue > AMinValue then - Result := AValue - else - Result := AMinValue; - end; - -begin - inherited; - with Control do - begin - ACell.Height := GetScrollValue(VertScrollBar.Range, Height); - ACell.Width := GetScrollValue(HorzScrollBar.Range, Width); - end -end; - -function TdxPSScrollingWinControlProducer.ObjectExpandHeight: Boolean; -begin - Result := True; -end; - -function TdxPSScrollingWinControlProducer.ObjectExpandWidth: Boolean; -begin - Result := True; -end; - -{$IFDEF DELPHI5} - -{ TdxPSCustomFrameProducer } - -function TdxPSCustomFrameProducer.Control: TCustomFrame; -begin - Result := inherited Control as TCustomFrame; -end; - -class function TdxPSCustomFrameProducer.ControlClass: TControlClass; -begin - Result := TCustomFrame; -end; -{$ENDIF} - -{ TdxPSCustomFormProducer } - -function TdxPSCustomFormProducer.Control: TCustomForm; -begin - Result := inherited Control as TCustomForm; -end; - -class function TdxPSCustomFormProducer.ControlClass: TControlClass; -begin - Result := TCustomForm; -end; - -{ TdxPSContainerBuilder } - -constructor TdxPSContainerBuilder.Create(AReportLink: TdxCustomContainerReportLink; - AContainer: TWinControl; AParentBuilder: TdxPSContainerBuilder; AParentHost: TdxReportCell = nil); -begin - inherited Create; - FReportLink := AReportLink; - FContainer := AContainer; - FParentBuilder := AParentBuilder; - FParentHost := AParentHost; - ReportLink.FActiveBuilder := Self; -end; - -destructor TdxPSContainerBuilder.Destroy; -begin - ReportLink.FActiveBuilder := ParentBuilder; - inherited; -end; - -function TdxPSContainerBuilder.Build: TdxReportCell; -var - Item: TdxReportVisualItem; -begin - Result := CreateHost; - BuildNestedControls; - Item := BuildControl(Container); - Item.Index := 0; // make it as first item -end; - -function TdxPSContainerBuilder.BuildControl(AControl: TControl; AParentHost: TdxReportCell = nil): TdxReportVisualItem; -begin - FCurrentControl := AControl; - try - with Producers[AControl] do - begin - if AParentHost = nil then AParentHost := Host; - Result := ItemClass.Create(AParentHost); - CreateItemDefinition(AControl, Result); - InitializeItem(Result); - end; - InitializeItem(Result); - finally - FCurrentControl := nil; - end; -end; - -function TdxPSContainerBuilder.BuildNestedContainer(AContainer: TWinControl; - AParentHost: TdxReportCell = nil): TdxReportCell; -begin - Result := ReportLink.BuildContainer(AContainer, Self, AParentHost); -end; - -class function TdxPSContainerBuilder.ContainerClass: TWinControlClass; -begin - Result := TWinControl; -end; - -class function TdxPSContainerBuilder.PairClass: TClass; -begin - Result := ContainerClass; -end; - -class procedure TdxPSContainerBuilder.Register; -begin - dxContainerBuilderFactory.Register(Self); -end; - -class procedure TdxPSContainerBuilder.Unregister; -begin - if not FIsContainerBuilderFactoryReleased then dxContainerBuilderFactory.Unregister(Self); -end; - -procedure TdxPSContainerBuilder.BuildNestedControls; -var - Control: TControl; - Count, Index: Integer; -begin - if HasAvailableChildren(Container) then - with CreateNestedControlsIterator do - begin - Count := ControlCount; - Index := 1; - - // Controls - GoBeyondEOF; - while not IsBOF do - begin - Control := Prev; - if not (Control is TWinControl) and ReportLink.DoIsComponentProcessed(Control) then - BuildControl(Control); - if IsRoot then - begin - Progress(100 * Index / Count); - if IsAborted then Break; - end; - Inc(Index); - end; - if IsAborted then Exit; - - // WinControls - GoBeforeBOF; - while not IsEOF do - begin - Control := Next; - if (Control is TWinControl) and ReportLink.DoIsComponentProcessed(Control) then - BuildNestedContainer(TWinControl(Control), Host); - if IsRoot then - begin - Progress(100 * Index / Count); - if IsAborted then Break; - end; - Inc(Index); - end; - - if not IsAborted then Progress(100); - end; -end; - -function TdxPSContainerBuilder.CreateHost: TdxReportCell; -begin - FHost := Producers[Container].HostClass.Create(ParentHost); - InitializeHost; - Result := Host; -end; - -function TdxPSContainerBuilder.CreateItemDefinition(AComponent: TComponent; - AnItem: TdxReportVisualItem): TdxPSCustomContainerItemDefinition; -begin - Result := ReportLink.CreateItemDefinition(AComponent, AnItem); -end; - -function TdxPSContainerBuilder.CreateNestedControlsIterator: IdxPSContainerIterator; -begin - Result := Producers[Container].CreateIterator; -end; - -procedure TdxPSContainerBuilder.InitializeHost; -begin - Producers[Container].InitializeHost(Host); -end; - -procedure TdxPSContainerBuilder.InitializeItem(AnItem: TdxReportVisualItem); -begin - ReportLink.DoInitializeItem(AnItem); - ReportLink.DoInitializeItemOptionsPlace(AnItem); -end; - -function TdxPSContainerBuilder.IsAborted: Boolean; -begin - Result := ReportLink.AbortBuilding; -end; - -procedure TdxPSContainerBuilder.Progress(const APercentDone: Double); -begin - ReportLink.DoProgress(APercentDone); -end; - -function TdxPSContainerBuilder.GetParentHost: TdxReportCell; -begin - Result := FParentHost; - if Result = nil then - if ParentBuilder <> nil then - Result := ParentBuilder.Host - else - Result := ReportLink.RootCell; -end; - -function TdxPSContainerBuilder.HasAvailableChildren(AControl: TControl): Boolean; -var - Producer: TdxPSCustomContainerItemProducer; - I: Integer; - Child: TControl; -begin - Result := False; - if (AControl is TWinControl) and (TWinControl(AControl).ControlCount <> 0) then - begin - Producer := Producers[AControl]; - if Producer.CanHasAvailableChildren then - with TWinControl(AControl) do - for I := 0 to ControlCount - 1 do - begin - Child := Controls[I]; - Result := Producer.CanProcessChild(Child) and ReportLink.DoIsComponentProcessed(Child); - if Result then Exit; - end; - end; -end; - -function TdxPSContainerBuilder.GetDC: HDC; -begin - Result := ReportLink.ScreenDC; -end; - -function TdxPSContainerBuilder.GetIsRoot: Boolean; -begin - Result := ParentBuilder = nil; -end; - -function TdxPSContainerBuilder.GetProducer(AControl: TControl): TdxPSCustomContainerItemProducer; -begin - Result := ReportLink.Producers[AControl] as TdxPSCustomContainerItemProducer; -end; - -{ TdxPSContainerReportLinkCustomCache } - -constructor TdxPSContainerReportLinkCustomCache.Create(AReportLink: TdxCustomContainerReportLink); -begin - inherited Create; - FReportLink := AReportLink; -end; - -function TdxPSContainerReportLinkCustomCache.ReportLink: TdxCustomContainerReportLink; -begin - Result := FReportLink; -end; - -{ TdxPSCustomProducerCache } - -function TdxPSCustomProducerCache.GetItem(Index: Integer): TdxPSCustomProducer; -begin - Result := TdxPSCustomProducer(inherited Items[Index]); -end; - -function TdxPSCustomProducerCache.GetProducer(ProducerClass: TdxPSCustomProducerClass; - Component: TComponent): TdxPSCustomProducer; -var - Index: Integer; -begin - Index := IndexOfByClass(ProducerClass); - if (Index = -1) or (not ProducerClass.Reenterable and (Items[Index].ProducingObject <> Component)) then - Index := Add(ProducerClass.Create(ReportLink, Component)); - Result := Items[Index]; - Result.Initialize(Component); -end; - -{ TdxCustomContainerReportLinkOptions } - -constructor TdxCustomContainerReportLinkOptions.Create(AReportLink: TdxCustomContainerReportLink); -begin - inherited Create; - FReportLink := AReportLink; - RestoreDefaults; -end; - -procedure TdxCustomContainerReportLinkOptions.Assign(Source: TPersistent); -begin - if Source is TdxCustomContainerReportLinkOptions then - else - inherited; -end; - -procedure TdxCustomContainerReportLinkOptions.RestoreDefaults; -begin -end; - -procedure TdxCustomContainerReportLinkOptions.Changed; -begin - if ReportLink <> nil then ReportLink.OptionsModified(Self); -end; - -{ TdxCustomContainerOptionsBehavior } - -procedure TdxCustomContainerReportLinkOptionsBehavior.Assign(Source: TPersistent); -begin - if Source is TdxCustomContainerReportLinkOptionsBehavior then - with TdxCustomContainerReportLinkOptionsBehavior(Source) do - begin - Self.ConsumeExistingLinks := ConsumeExistingLinks; - end; - inherited; -end; - -procedure TdxCustomContainerReportLinkOptionsBehavior.RestoreDefaults; -begin - ConsumeExistingLinks := True; -end; - -procedure TdxCustomContainerReportLinkOptionsBehavior.SetConsumeExistingLinks(Value: Boolean); -begin - if FConsumeExistingLinks <> Value then - begin - FConsumeExistingLinks := Value; - Changed; - end; -end; - -{ TdxCustomContainerReportLinkOptionsDesignerTabs } - -procedure TdxCustomContainerReportLinkOptionsDesignerTabs.Assign(Source: TPersistent); -begin - if Source is TdxCustomContainerReportLinkOptionsDesignerTabs then - with TdxCustomContainerReportLinkOptionsDesignerTabs(Source) do - begin - Self.AutoHideReportLinksIfEmpty := AutoHideReportLinksIfEmpty; - Self.Controls := Controls; - Self.ReportLinks := ReportLinks; - end; - inherited; -end; - -procedure TdxCustomContainerReportLinkOptionsDesignerTabs.RestoreDefaults; -begin - inherited; - AutoHideReportLinksIfEmpty := True; - Controls := True; - ReportLinks := True; -end; - -{ TdxCustomContainerReportLinkOptionsItemPlace } - -procedure TdxCustomContainerReportLinkOptionsItemPlace.Assign(Source: TPersistent); -begin - if Source is TdxCustomContainerReportLinkOptionsItemPlace then - with TdxCustomContainerReportLinkOptionsItemPlace(Source) do - begin - Self.ExpandHeight := ExpandHeight; - Self.ExpandWidth := ExpandWidth; - Self.ShrinkHeight := ShrinkHeight; - Self.ShrinkWidth := ShrinkWidth; - end; - inherited; -end; - -procedure TdxCustomContainerReportLinkOptionsItemPlace.RestoreDefaults; -begin - ExpandHeight := False; - ExpandWidth := False; - ShrinkHeight := False; - ShrinkWidth := False; -end; - -function TdxCustomContainerReportLinkOptionsItemPlace.GetData: Integer; -begin - Result := ((Ord(ExpandHeight) shl ExpandHeightOffset) and ExpandHeightBit) or - ((Ord(ExpandWidth) shl ExpandWidthOffset) and ExpandWidthBit) or - ((Ord(ShrinkHeight) shl ShrinkHeightOffset) and ShrinkHeightBit) or - ((Ord(ShrinkWidth) shr ShrinkWidthOffset) and ShrinkWidthBit); -end; - -procedure TdxCustomContainerReportLinkOptionsItemPlace.SetData(Value: Integer); -begin - ExpandHeight := Boolean((Value and ExpandHeightOffset) shr ExpandHeightBit); - ExpandWidth := Boolean((Value and ExpandWidthOffset) shr ExpandWidthBit); - ShrinkHeight := Boolean((Value and ShrinkHeightOffset) shr ShrinkHeightBit); - ShrinkWidth := Boolean((Value and ShrinkWidthOffset) shr ShrinkWidthBit); -end; - -procedure TdxCustomContainerReportLinkOptionsItemPlace.ReadData(AStream: TStream); -var - Buffer: Integer; -begin - Buffer := GetData; - AStream.WriteBuffer(Buffer , SizeOf(Buffer)); -end; - -procedure TdxCustomContainerReportLinkOptionsItemPlace.WriteData(AStream: TStream); -var - Buffer: Integer; -begin - AStream.ReadBuffer(Buffer , SizeOf(Buffer)); - SetData(Buffer); -end; - -function TdxCustomContainerReportLinkOptionsItemPlace.HasHorzResizing: Boolean; -begin - Result := ExpandWidth or ShrinkWidth; -end; - -function TdxCustomContainerReportLinkOptionsItemPlace.HasVertResizing: Boolean; -begin - Result := ExpandHeight or ShrinkHeight; -end; - -procedure TdxCustomContainerReportLinkOptionsItemPlace.SetAll; -begin - ExpandHeight := True; - ExpandWidth := True; - ShrinkHeight := True; - ShrinkWidth := True; -end; - -procedure TdxCustomContainerReportLinkOptionsItemPlace.UnsetAll; -begin - ExpandHeight := False; - ExpandWidth := False; - ShrinkHeight := False; - ShrinkWidth := False; -end; - -{ TdxCustomContainerReportLinkOptionsPagination } - -procedure TdxCustomContainerReportLinkOptionsPagination.Assign(Source: TPersistent); -begin - if Source is TdxCustomContainerReportLinkOptionsPagination then - with TdxCustomContainerReportLinkOptionsPagination(Source) do - begin - Self.ControlDetails := ControlDetails; - Self.Controls := Controls; - end; - inherited; -end; - -procedure TdxCustomContainerReportLinkOptionsPagination.RestoreDefaults; -begin - inherited; - ControlDetails := True; - Controls := True; -end; - -procedure TdxCustomContainerReportLinkOptionsPagination.SetControlDetails(Value: Boolean); -begin - if FControlDetails <> Value then - begin - FControlDetails := Value; - Changed; - end; -end; - -procedure TdxCustomContainerReportLinkOptionsPagination.SetControls(Value: Boolean); -begin - if FControls <> Value then - begin - FControls := Value; - Changed; - end; -end; - -{ TdxCustomContainerReportLinkOptionsRefinements } - -procedure TdxCustomContainerReportLinkOptionsRefinements.Assign(Source: TPersistent); -begin - if Source is TdxCustomContainerReportLinkOptionsRefinements then - with TdxCustomContainerReportLinkOptionsRefinements(Source) do - begin - Self.RootBorders := RootBorders; - end; - inherited; -end; - -procedure TdxCustomContainerReportLinkOptionsRefinements.RestoreDefaults; -begin - inherited; - RootBorders := False; -end; - -procedure TdxCustomContainerReportLinkOptionsRefinements.SetRootBorders(Value: Boolean); -begin - if FRootBorders <> Value then - begin - FRootBorders := Value; - Changed; - end; -end; - -{ TdxCustomContainerOptionsTransparent } - -procedure TdxCustomContainerReportLinkOptionsTransparent.Assign(Source: TPersistent); -begin - if Source is TdxCustomContainerReportLinkOptionsTransparent then - with TdxCustomContainerReportLinkOptionsTransparent(Source) do - begin - Self.Containers := Containers; - Self.Controls := Controls; - Self.Graphics := Graphics; - Self.Root := Root; - end; - inherited; -end; - -procedure TdxCustomContainerReportLinkOptionsTransparent.RestoreDefaults; -begin - Controls := True; - Containers := True; - Graphics := False; - Root := True; - inherited; -end; - -procedure TdxCustomContainerReportLinkOptionsTransparent.SetContainters(Value: Boolean); -begin - if FContainers <> Value then - begin - FContainers := Value; - Changed; - end; -end; - -procedure TdxCustomContainerReportLinkOptionsTransparent.SetControls(Value: Boolean); -begin - if FControls <> Value then - begin - FControls := Value; - Changed; - end; -end; - -procedure TdxCustomContainerReportLinkOptionsTransparent.SetGraphics(Value: Boolean); -begin - if FGraphics <> Value then - begin - FGraphics := Value; - Changed; - end; -end; - -procedure TdxCustomContainerReportLinkOptionsTransparent.SetRoot(Value: Boolean); -begin - if FRoot <> Value then - begin - FRoot := Value; - Changed; - end; -end; - -{ TdxCustomContainerReportLink } - -constructor TdxCustomContainerReportLink.Create(AOwner: TComponent); -begin - inherited; - FAggregatedReportLinks := TStringList.Create; - FDefinitions := TList.Create; - FDelimitersHorz := TList.Create; - FDelimitersVert := TList.Create; - FExcludedComponents := TStringList.Create; - FHiddenComponents := TStringList.Create; - FPreparationFont := TFont.Create; - FProducerCache := TdxPSCustomProducerCache.Create(Self); - FSupportedCustomDraw := False; - CreateOptions; -end; - -destructor TdxCustomContainerReportLink.Destroy; -begin - {$IFNDEF DELPHI5} - Destroying; - {$ENDIF} - DestroyOptions; - FreeAndNil(FPreparationFont); - FreeAndNil(FProducerCache); - FreeAndNil(FHiddenComponents); - FreeAndNil(FExcludedComponents); - FreeAndNil(FDelimitersVert); - FreeAndNil(FDelimitersHorz); - FreeAndNilDefinitions; - FreeAndNil(FAggregatedReportLinks); - inherited; -end; - -procedure TdxCustomContainerReportLink.Assign(Source: TPersistent); -begin - if Source is TdxCustomContainerReportLink then - with TdxCustomContainerReportLink(Source) do - begin - Self.FAggregatedReportLinks.Assign(FAggregatedReportLinks); - Self.FExcludedComponents.Assign(FExcludedComponents); - Self.FHiddenComponents.Assign(FHiddenComponents); - Self.OptionsBehavior := OptionsBehavior; - Self.OptionsDesignerTabs := OptionsDesignerTabs; - //Self.OptionsItemPlace := OptionsItemPlace; {.2} - Self.OptionsPagination := OptionsPagination; - Self.OptionsTransparent := OptionsTransparent; - Self.SupportedCustomDraw := SupportedCustomDraw; - end; - inherited; -end; - -class function TdxCustomContainerReportLink.Aggregable: Boolean; -begin - Result := False; -end; - -function TdxCustomContainerReportLink.CanHideComponent(AComponent: TComponent): Boolean; -begin - Result := (AComponent <> nil) and (Container <> nil) and (AComponent <> Container); - if Result then - if AComponent is TControl then - Result := Container.ContainsControl(TControl(AComponent)) - else - Result := (Container.Owner <> nil) and (Container.Owner = AComponent.Owner); -end; - -function TdxCustomContainerReportLink.CanHideComponentByName(const AName: string): Boolean; -begin - Result := (AName <> '') and (Container <> nil); - if Result then - begin - Result := Container.FindChildControl(AName) <> nil; - if not Result and (Container.Owner <> nil) then - Result := Container.Owner.FindComponent(AName) <> nil; - end; -end; - -procedure TdxCustomContainerReportLink.HideComponent(AComponent: TComponent); -var - Index: Integer; -begin - if CanHideComponent(AComponent) and not FindHiddenComponent(AComponent, Index) then - FHiddenComponents.AddObject(AComponent.Name, AComponent) -end; - -procedure TdxCustomContainerReportLink.HideComponentByName(const AName: string); -var - Index: Integer; - Component: TComponent; -begin - if CanHideComponentByName(AName) and not FindHiddenComponentByName(AName, Index) then - begin - Component := GetComponentByName(AName); - if Component <> nil then - FHiddenComponents.AddObject(AName, Component); - end; -end; - -procedure TdxCustomContainerReportLink.HideComponents(const AComponents: array of TComponent); -var - I: Integer; -begin - for I := Low(AComponents) to High(AComponents) do - HideComponent(AComponents[I]); -end; - -procedure TdxCustomContainerReportLink.HideComponentsByName(const ANames: array of string); -var - I: Integer; -begin - for I := Low(ANames) to High(ANames) do - HideComponentByName(ANames[I]); -end; - -function TdxCustomContainerReportLink.FindHiddenComponent(AComponent: TComponent; - out AnIndex: Integer): Boolean; -begin - AnIndex := FHiddenComponents.IndexOfObject(AComponent); - Result := AnIndex <> -1; -end; - -function TdxCustomContainerReportLink.FindHiddenComponent(AComponent: TComponent): Boolean; -var - Index: Integer; -begin - Result := FindHiddenComponent(AComponent, Index); -end; - -function TdxCustomContainerReportLink.FindHiddenComponentByName(const AName: string; - out AnIndex: Integer): Boolean; -begin - AnIndex := FHiddenComponents.IndexOf(AName); - Result := AnIndex <> -1; -end; - -function TdxCustomContainerReportLink.FindHiddenComponentByName(const AName: string): Boolean; -var - Index: Integer; -begin - Result := FindHiddenComponentByName(AName, Index); -end; - -procedure TdxCustomContainerReportLink.UnhideAllComponents; -begin - FHiddenComponents.Clear; -end; - -procedure TdxCustomContainerReportLink.UnhideComponent(AComponent: TComponent); -var - Index: Integer; -begin - if FindHiddenComponent(AComponent, Index) then - FHiddenComponents.Delete(Index); -end; - -procedure TdxCustomContainerReportLink.UnhideComponentByName(const AName: string); -var - Index: Integer; -begin - if FindHiddenComponentByName(AName, Index) then - FHiddenComponents.Delete(Index); -end; - -procedure TdxCustomContainerReportLink.UnhideComponents(const AComponents: array of TComponent); -var - I: Integer; -begin - for I := Low(AComponents) to High(AComponents) do - UnhideComponent(AComponents[I]); -end; - -procedure TdxCustomContainerReportLink.UnhideComponentsByName(const ANames: array of string); -var - I: Integer; -begin - for I := Low(ANames) to High(ANames) do - UnhideComponentByName(ANames[I]); -end; - -procedure TdxCustomContainerReportLink.HideStandardControls; -var - I, J: Integer; - ControlClass: TClass; - Control: TControl; -begin - if Container <> nil then - for I := Low(StandardHiddenControls) to High(StandardHiddenControls) do - begin - ControlClass := Classes.GetClass(StandardHiddenControls[I]); - if ControlClass <> nil then - for J := 0 to Container.ControlCount - 1 do - begin - Control := Container.Controls[J]; - if Control is ControlClass then - HideComponent(Control); - end; - end; -end; - -procedure TdxCustomContainerReportLink.UnhideStandardControls; -var - I, J: Integer; - ControlClass: TClass; - Control: TControl; -begin - if Container <> nil then - for I := Low(StandardHiddenControls) to High(StandardHiddenControls) do - begin - ControlClass := Classes.GetClass(StandardHiddenControls[I]); - if ControlClass <> nil then - for J := 0 to Container.ControlCount - 1 do - begin - Control := Container.Controls[J]; - if Control is ControlClass then - UnhideComponent(Control); - end; - end; -end; - -function TdxCustomContainerReportLink.CanExcludeComponent(AComponent: TComponent): Boolean; -begin - Result := (AComponent <> nil) and (Container <> nil) and (AComponent <> Container); - if Result then - if AComponent is TControl then - Result := Container.ContainsControl(TControl(AComponent)) - else - Result := (Container.Owner <> nil) and (Container.Owner = AComponent.Owner); -end; - -function TdxCustomContainerReportLink.CanExcludeComponentByName(const AName: string): Boolean; -begin - Result := (AName <> '') and (Container <> nil); - if Result then - begin - Result := Container.FindChildControl(AName) <> nil; - if not Result and (Container.Owner <> nil) then - Result := Container.Owner.FindComponent(AName) <> nil; - end; -end; - -procedure TdxCustomContainerReportLink.ExcludeComponent(AComponent: TComponent); -var - Index: Integer; -begin - if CanExcludeComponent(AComponent) and not FindExcludedComponent(AComponent, Index) then - FExcludedComponents.AddObject(AComponent.Name, AComponent); -end; - -procedure TdxCustomContainerReportLink.ExcludeComponentByName(const AName: string); -var - Index: Integer; - Component: TComponent; -begin - if CanExcludeComponentByName(AName) and not FindExcludedComponentByName(AName, Index) then - begin - Component := GetComponentByName(AName); - if Component <> nil then - FExcludedComponents.AddObject(AName, Component); - end; -end; - -procedure TdxCustomContainerReportLink.ExcludeComponents(const AComponents: array of TComponent); -var - I: Integer; -begin - for I := Low(AComponents) to High(AComponents) do - ExcludeComponent(AComponents[I]); -end; - -procedure TdxCustomContainerReportLink.ExcludeComponentsByName(const ANames: array of string); -var - I: Integer; -begin - for I := Low(ANames) to High(ANames) do - ExcludeComponentByName(ANames[I]); -end; - -function TdxCustomContainerReportLink.FindExcludedComponent(AComponent: TComponent; - out AnIndex: Integer): Boolean; -begin - AnIndex := FExcludedComponents.IndexOfObject(AComponent); - Result := AnIndex <> -1; -end; - -function TdxCustomContainerReportLink.FindExcludedComponent(AComponent: TComponent): Boolean; -var - Index: Integer; -begin - Result := FindExcludedComponent(AComponent, Index); -end; - -function TdxCustomContainerReportLink.FindExcludedComponentByName(const AName: string; - out AnIndex: Integer): Boolean; -begin - AnIndex := FExcludedComponents.IndexOf(AName); - Result := AnIndex <> -1; -end; - -function TdxCustomContainerReportLink.FindExcludedComponentByName(const AName: string): Boolean; -var - Index: Integer; -begin - Result := FindExcludedComponentByName(AName, Index); -end; - -procedure TdxCustomContainerReportLink.UnexcludeAllComponents; -begin - FExcludedComponents.Clear; -end; - -procedure TdxCustomContainerReportLink.UnexcludeComponent(AComponent: TComponent); -var - Index: Integer; -begin - if FindExcludedComponent(AComponent, Index) then - FExcludedComponents.Delete(Index); -end; - -procedure TdxCustomContainerReportLink.UnexcludeComponentByName(const AName: string); -var - Index: Integer; -begin - if FindExcludedComponentByName(AName, Index) then - FExcludedComponents.Delete(Index); -end; - -procedure TdxCustomContainerReportLink.UnexcludeComponents(const AComponents: array of TComponent); -var - I: Integer; -begin - for I := Low(AComponents) to High(AComponents) do - UnexcludeComponent(AComponents[I]); -end; - -procedure TdxCustomContainerReportLink.UnexcludeComponentsByName(const ANames: array of string); -var - I: Integer; -begin - for I := Low(ANames) to High(ANames) do - UnexcludeComponentByName(ANames[I]); -end; - -procedure TdxCustomContainerReportLink.AggregateLink(AReportLink: TBasedxReportLink); -begin - if IsLinkAggregable(AReportLink) and not IsLinkAggregated(AReportLink) then - FAggregatedReportLinks.AddObject(AReportLink.Name, AReportLink); -end; - -procedure TdxCustomContainerReportLink.DisaggregateAllLinks; -begin - InstallAggregatedReportLinksController(False); - FAggregatedReportLinks.Clear; -end; - -procedure TdxCustomContainerReportLink.DisaggregateInconsistentLinks; -var - I: Integer; - Link: TBasedxReportLink; -begin - for I := AggregatedReportLinkCount - 1 downto 0 do - begin - Link := AggregatedReportLinks[I]; - if not IsLinkAggregatedConsistently(Link) then DisaggregateLink(Link); - end; -end; - -procedure TdxCustomContainerReportLink.DisaggregateLink(AReportLink: TBasedxReportLink); -var - Index: Integer; -begin - Index := FAggregatedReportLinks.IndexOfObject(AReportLink); - if Index <> -1 then - begin - TBasedxReportLinkAccess(AReportLink).Controller := nil; - FAggregatedReportLinks.Delete(Index); - end; -end; - -function TdxCustomContainerReportLink.FindAggregatedLinkByComponent(AComponent: TComponent): TBasedxReportLink; -var - I: Integer; -begin - if AComponent <> nil then - for I := 0 to AggregatedReportLinkCount - 1 do - begin - Result := AggregatedReportLinks[I]; - if (Result <> nil) and (Result.Component = AComponent) then - Exit; - end; - Result := nil; -end; - -function TdxCustomContainerReportLink.HasInconsistentlyAggregatedLinks: Boolean; -var - I: Integer; -begin - Result := True; - for I := 0 to AggregatedReportLinkCount - 1 do - if not IsLinkAggregatedConsistently(AggregatedReportLinks[I]) then - Exit; - Result := False; -end; - -function TdxCustomContainerReportLink.IsLinkAggregable(AReportLink: TBasedxReportLink): Boolean; -begin - Result := (AReportLink <> nil) and (AReportLink <> Self) and AReportLink.Aggregable; -end; - -function TdxCustomContainerReportLink.IsLinkAggregated(AReportLink: TBasedxReportLink): Boolean; -begin - Result := FAggregatedReportLinks.IndexOfObject(AReportLink) <> -1; -end; - -function TdxCustomContainerReportLink.IsLinkAggregatedConsistently(AReportLink: TBasedxReportLink): Boolean; -begin - Result := IsLinkAggregated(AReportLink) and (AReportLink.Component is TControl) and - (Container <> nil) and Container.ContainsControl(TControl(AReportLink.Component)); -end; - -procedure TdxCustomContainerReportLink.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineBinaryProperty('HiddenComponents', ReadHiddenComponents, - WriteHiddenComponents, True); - Filer.DefineBinaryProperty('ExcludedComponents', ReadExcludedComponents, - WriteExcludedComponents, True); - Filer.DefineBinaryProperty('AggregatedReportLinks', ReadAggregatedReportLinks, - WriteAggregatedReportLinks, True); -end; - -procedure TdxCustomContainerReportLink.Loaded; -begin - inherited; - LoadHiddenComponents; - LoadExcludedComponents; - LoadAggregatedReportLinks; -end; - -procedure TdxCustomContainerReportLink.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited; - if (Operation = opRemove) and not IsDestroying then - begin - UnexcludeComponent(AComponent); - UnhideComponent(AComponent); - if AComponent is TBasedxReportLink then - DisaggregateLink(TBasedxReportLink(AComponent)); - end; -end; - -procedure TdxCustomContainerReportLink.AfterDesignReport(ADone: Boolean); -begin - InstallAggregatedReportLinksController(False); - inherited; -end; - -procedure TdxCustomContainerReportLink.BeforeDesignReport; -begin - inherited; - InstallAggregatedReportLinksController(True); - HideDesignerTabs(DesignWindow); -end; - -procedure TdxCustomContainerReportLink.ConstructReport(AReportCells: TdxReportCells); -var - Root: TdxReportCell; -begin - inherited; - if Container = nil then Exit; - - PrepareConstruct; - try - Root := BuildContainer(Container, nil, nil); - if not AbortBuilding then - begin - RepositionControls; - Root.Left := 0; - Root.Top := 0; - AReportCells.Cells.BoundsRect := MakeRect(0, 0, Root.Width, Root.Height); - end; - finally - UnprepareConstruct; - end; -end; - -procedure TdxCustomContainerReportLink.ConvertCoords; - - procedure ConvertDelimiters(ADelimiters: TList); - var - I, Value: Integer; - begin - for I := 0 to ADelimiters.Count - 1 do - begin - Value := Integer(ADelimiters[I]); - Value := MulDiv(Value, PixelsNumerator, PixelsDenominator); - ADelimiters[I] := Pointer(Value); - end; - end; - -begin - inherited; - ConvertDelimiters(DelimitersHorz); - ConvertDelimiters(DelimitersVert); -end; - -procedure TdxCustomContainerReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -begin - if AItem.Data <> 0 then DoCustomDrawItem(ACanvas, AItem, ADone); -end; - -procedure TdxCustomContainerReportLink.DoApplyInDesigner; -begin - inherited; - InstallAggregatedReportLinksController(True); -end; - -procedure TdxCustomContainerReportLink.DoChangeComponent; -begin - inherited; - DisaggregateAllLinks; - UnexcludeAllComponents; - UnhideAllComponents; -end; - -function TdxCustomContainerReportLink.GetDesignerClass: TdxReportLinkDesignWindowClass; -begin - Result := inherited GetDesignerClass; - if (Result = nil) and ((Component is TForm) {$IFDEF DELPHI5} or (Component is TFrame) {$ENDIF}) then - Result := TdxfmCustomContainerDesignWindow; -end; - -function TdxCustomContainerReportLink.GetEmptyPagesCanExist: Boolean; -begin - Result := True; -end; - -procedure TdxCustomContainerReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -var - I: Integer; -begin - inherited; - for I := 0 to DefinitionCount - 1 do - Producers[Definitions[I].Component].GetImageLists(AProc); -end; - -procedure TdxCustomContainerReportLink.InternalRestoreDefaults; -begin - inherited; - - OptionsBehavior.RestoreDefaults; - OptionsDesignerTabs.RestoreDefaults; - //OptionsItemPlace.RestoreDefaults; {.2} - OptionsPagination.RestoreDefaults; - OptionsRefinements.RestoreDefaults; - OptionsTransparent.RestoreDefaults; - - SupportedCustomDraw := False; -end; - -function TdxCustomContainerReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -begin - Result := SupportedCustomDraw and (Item <> nil) and (Item.Data <> 0); -end; - -procedure TdxCustomContainerReportLink.MakeDelimiters(AReportCells: TdxReportCells; - AHorzDelimiters, AVertDelimiters: TList); -begin - inherited; - dxPSUtl.dxAppendList(DelimitersHorz, AHorzDelimiters); - dxPSUtl.dxAppendList(DelimitersVert, AVertDelimiters); -end; - -function TdxCustomContainerReportLink.BuildContainer(AContainer: TWinControl; - AParentBuilder: TdxPSContainerBuilder; AParentHost: TdxReportCell = nil): TdxReportCell; -begin - with CreateBuilder(AContainer, AParentBuilder, AParentHost) do - try - Result := Build; - finally - Free; - end; -end; - -function TdxCustomContainerReportLink.CreateBuilder(AContainer: TWinControl; - AParentBuilder: TdxPSContainerBuilder; AParentHost: TdxReportCell = nil): TdxPSContainerBuilder; -begin - Result := dxContainerBuilderFactory.CreateBuilder(Self, AContainer, AParentBuilder, AParentHost); -end; - -function TdxCustomContainerReportLink.CreateItemDefinition(AComponent: TComponent; - AnItem: TdxReportVisualItem): TdxPSCustomContainerItemDefinition; -begin - with Producers[AComponent] do - begin - Result := DefinitionClass.Create(Self, AComponent, AnItem); - InitializeOptionsPlace(Result.OptionsPlace); - end; - AddDefinition(Result); -end; - -function TdxCustomContainerReportLink.GetProducer(Component: TComponent): TdxPSCustomProducer; -begin - Result := ProducerCache[dxPSContainerItemProducerFactory[Component, Component = Container], Component]; -end; - -procedure TdxCustomContainerReportLink.DoCustomDrawItem(ACanvas: TCanvas; - AnItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawItem) then - FOnCustomDrawItem(Self, ACanvas, AnItem, TComponent(TObject(AnItem.Data)), ADone); -end; - -procedure TdxCustomContainerReportLink.DoGetComponentCaption(AComponent: TComponent; - var ACaption: string); -begin - if Assigned(FOnGetComponentCaption) then - FOnGetComponentCaption(Self, AComponent, ACaption) -end; - -function TdxCustomContainerReportLink.DoGetReportLink(AComponent: TComponent): TBasedxReportLink; -begin - Result := nil; - //if OptionsBehavior.ConsumeExistingLinks then - Result := FindAggregatedLinkByComponent(AComponent); - if Assigned(FOnGetComponentReportLink) then - FOnGetComponentReportLink(Self, AComponent, Result); - if Result <> nil then - Result.Initialize; -end; - -procedure TdxCustomContainerReportLink.DoInitializeItem(AnItem: TdxReportVisualItem); -begin - if Assigned(FOnInitializeItem) then - FOnInitializeItem(Self, AnItem, TComponent(TObject(AnItem.Data))); -end; - -procedure TdxCustomContainerReportLink.DoInitializeItemOptionsPlace(AnItem: TdxReportVisualItem); -begin - if Assigned(FOnInitializeItemOptionsPlace) then - FOnInitializeItemOptionsPlace(Self, AnItem, TComponent(TObject(AnItem.Data)), - DefinitionsByReportItem[AnItem].OptionsPlace); -end; - -procedure TdxCustomContainerReportLink.DoInitializeReportLink(AReportLink: TBasedxReportLink; - AStage: TdxPSReportLinkProcessingStage); -begin - if Assigned(FOnInitializeReportLink) then - FOnInitializeReportLink(Self, AReportLink, AStage); -end; - -function TdxCustomContainerReportLink.DoIsComponentProcessed(AComponent: TComponent): Boolean; -var - Index: Integer; -begin - Result := (not (AComponent is TControl) or - (TControl(AComponent).Visible and not IsRectEmpty(TControl(AComponent).BoundsRect))) and - not FindHiddenComponent(AComponent, Index) and not FindExcludedComponent(AComponent, Index); - if Assigned(FOnIsComponentProcessed) then - FOnIsComponentProcessed(Self, AComponent, Result); -end; - -procedure TdxCustomContainerReportLink.CreateOptions; -begin - FOptionsBehavior := GetOptionsBehaviorClass.Create(Self); - FOptionsDesignerTabs := GetOptionsDesignerTabsClass.Create(Self); - //FOptionsItemPlace := GetOptionsItemPlaceClass.Create(Self); {.2} - FOptionsPagination := GetOptionsPaginationClass.Create(Self); - FOptionsRefinements := GetOptionsRefinementsClass.Create(Self); - FOptionsTransparent := GetOptionsTransparentClass.Create(Self); -end; - -procedure TdxCustomContainerReportLink.DestroyOptions; -begin - FreeAndNil(FOptionsTransparent); - FreeAndNil(FOptionsRefinements); - FreeAndNil(FOptionsPagination); - //FreeAndNil(FOptionsItemPlace); {.2} - FreeAndNil(FOptionsDesignerTabs); - FreeAndNil(FOptionsBehavior); -end; - -function TdxCustomContainerReportLink.GetOptionsBehaviorClass: TdxCustomContainerReportLinkOptionsBehaviorClass; -begin - Result := TdxCustomContainerReportLinkOptionsBehavior; -end; - -function TdxCustomContainerReportLink.GetOptionsDesignerTabsClass: TdxCustomContainerReportLinkOptionsDesignerTabsClass; -begin - Result := TdxCustomContainerReportLinkOptionsDesignerTabs; -end; - -function TdxCustomContainerReportLink.GetOptionsItemPlaceClass: TdxCustomContainerReportLinkOptionsItemPlaceClass; -begin - Result := TdxCustomContainerReportLinkOptionsItemPlace; -end; - -function TdxCustomContainerReportLink.GetOptionsPaginationClass: TdxCustomContainerReportLinkOptionsPaginationClass; -begin - Result := TdxCustomContainerReportLinkOptionsPagination; -end; - -function TdxCustomContainerReportLink.GetOptionsRefinementsClass: TdxCustomContainerReportLinkOptionsRefinementsClass; -begin - Result := TdxCustomContainerReportLinkOptionsRefinements; -end; - -function TdxCustomContainerReportLink.GetOptionsTransparentClass: TdxCustomContainerReportLinkOptionsTransparentClass; -begin - Result := TdxCustomContainerReportLinkOptionsTransparent; -end; - -procedure TdxCustomContainerReportLink.OptionsModified(AnOptions: TdxCustomContainerReportLinkOptions); -begin - LinkModified(True); -end; - -procedure TdxCustomContainerReportLink.PrepareConstruct; -begin - ClearDefinitions; - FScreenDC := GetDC(0); - CreateRootLookAndFeel; -end; - -procedure TdxCustomContainerReportLink.UnprepareConstruct; -begin - if not AbortBuilding then - begin - PullReportItems; - AddDelimiters; - end; - ReleaseDC(0, FScreenDC); -end; - -procedure TdxCustomContainerReportLink.AddDefinition(ADefinition: TdxPSCustomContainerItemDefinition); -begin - FDefinitions.Add(ADefinition); -end; - -procedure TdxCustomContainerReportLink.ClearDefinitions; -var - I: Integer; -begin - for I := 0 to DefinitionCount - 1 do - Definitions[I].Free; - FDefinitions.Clear; -end; - -function TdxCustomContainerReportLink.FindDefinition(AComponent: TComponent; - out AnIndex: Integer): Boolean; -begin - AnIndex := FDefinitions.IndexOf(DefinitionsByContainerItem[AComponent]); - Result := AnIndex <> -1; -end; - -function TdxCustomContainerReportLink.FindDefinition(AnItem: TdxReportVisualItem; - out AnIndex: Integer): Boolean; -begin - AnIndex := FDefinitions.IndexOf(DefinitionsByReportItem[AnItem]); - Result := AnIndex <> -1; -end; - -procedure TdxCustomContainerReportLink.FreeAndNilDefinitions; -begin - ClearDefinitions; - FreeAndNil(FDefinitions); -end; - -procedure TdxCustomContainerReportLink.DeleteDefinition(Index: Integer); -begin - Definitions[Index].Free; - FDefinitions.Delete(Index); -end; - -procedure TdxCustomContainerReportLink.AddControl(ATreeView: TTreeView; - AParent: TTreeNode; AControl: TControl); -var - Index, I: Integer; - Control: TControl; -begin - AParent := AddNode(ATreeView, AParent, AControl, not FindExcludedComponent(AControl, Index)); - if AControl is TWinControl then - for I := 0 to TWinControl(AControl).ControlCount - 1 do - begin - Control := TWinControl(AControl).Controls[I]; - if Producers[AControl].CanProcessChild(Control) and not FindHiddenComponent(Control, Index) then - AddControl(ATreeView, AParent, Control); - end; -end; - -procedure TdxCustomContainerReportLink.AddHiddenControl(ATreeView: TTreeView; - AParent: TTreeNode; AControl: TControl); -var - Index, I: Integer; - Control: TControl; -begin - AParent := AddNode(ATreeView, AParent, AControl, not FindHiddenComponent(AControl, Index)); - if AControl is TWinControl then - for I := 0 to TWinControl(AControl).ControlCount - 1 do - begin - Control := TWinControl(AControl).Controls[I]; - if Producers[AControl].CanProcessChild(Control) then - AddHiddenControl(ATreeView, AParent, Control); - end; -end; - -function TdxCustomContainerReportLink.AddNode(ATreeView: TTreeView; - AParent: TTreeNode; AComponent: TComponent; AChecked: Boolean): TTreeNode; - - function PrepareText(const S: string): string; - - procedure DoTrancateString(var S: string); - begin - if Length(S) > 255 then - begin - Delete(S, 256, Length(S) - 255); - Delete(S, Length(S) - 3, 3); - S := S + '...'; - end; - end; - - begin - Result := S; - DoTrancateString(Result); - Result := RemoveAccelChars(Result, False); - end; - -var - NodeObject: TdxNodeObject; - S: string; -begin - NodeObject := CreateNodeObject(AComponent, AChecked); - S := PrepareText(NodeObject.Caption); - Result := ATreeView.Items.AddChildObject(AParent, S, NodeObject); - Result.StateIndex := dxPSUtl.dxCheckStateImageIndexMap(NodeObject.State); -end; - -function TdxCustomContainerReportLink.CreateNodeObject(AComponent: TComponent; - AChecked: Boolean): TdxNodeObject; -const - StateMap: array[Boolean] of TCheckBoxState = (cbUnchecked, cbChecked); -begin - Result := TdxNodeObject.Create; - with Result do - begin - Caption := Producers[AComponent].ProducingObjectFriendlyName; - Component := AComponent; - DoGetComponentCaption(AComponent, Caption); - State := StateMap[AChecked]; - end; -end; - -function TdxCustomContainerReportLink.IsComponentEditable(AComponent: TComponent): Boolean; -begin - Result := AComponent <> Container; -end; - -procedure TdxCustomContainerReportLink.LoadControlsTree(ATreeView: TTreeView); -begin - ATreeView.Items.Clear; - if Container <> nil then - AddControl(ATreeView, nil, Container); -end; - -procedure TdxCustomContainerReportLink.LoadHiddenControlsTree(ATreeView: TTreeView); -begin - ATreeView.Items.Clear; - if Container <> nil then - AddHiddenControl(ATreeView, nil, Container); -end; - -procedure TdxCustomContainerReportLink.InstallAggregatedReportLinksController(AnInstall: Boolean); -var - I: Integer; -begin - for I := 0 to AggregatedReportLinkCount - 1 do - with TBasedxReportLinkAccess(AggregatedReportLinks[I]) do - if AnInstall then - Controller := Self - else - Controller := nil; -end; - -function TdxCustomContainerReportLink.GetComponentByName(const AName: string): TComponent; -begin - if AName <> '' then - begin - Result := Container.FindChildControl(AName); - if (Result = nil) and (Container <> nil) and (Container.Owner <> nil) then - Result := Container.Owner.FindComponent(AName); - end - else - Result := nil; -end; - -function TdxCustomContainerReportLink.GetPreparedFontIndex(AFont: TFont): Integer; -begin - Result := GetPreparedFontIndex(AFont, True, AFont.Name, AFont.Color, AFont.Style); -end; - -function TdxCustomContainerReportLink.GetPreparedFontIndex(AFont: TFont; AnIsFontSubstitutable: Boolean; - const AFontName: string; AFontColor: TColor; AFontStyle: TFontStyles): Integer; -begin - PreparationFont.Assign(AFont); - if AnIsFontSubstitutable and not dxIsTrueTypeFont(AFont) then - PreparationFont.Name := Font.Name - else - PreparationFont.Name := AFontName; - PreparationFont.Color := AFontColor; - PreparationFont.Style := AFontStyle; - Result := AddFontToPool(PreparationFont); -end; - -function TdxCustomContainerReportLink.IsComponentProcessed(AComponent: TComponent): Boolean; -begin - Result := DefinitionsByContainerItem[AComponent] <> nil; -end; - -procedure TdxCustomContainerReportLink.AddDelimiters; -var - I: Integer; -begin - DelimitersHorz.Clear; - DelimitersVert.Clear; - for I := 0 to DefinitionCount - 1 do - with Definitions[I] do - begin - AddDelimitersHorz(DelimitersHorz); - AddDelimitersVert(DelimitersVert); - end; -end; - -procedure TdxCustomContainerReportLink.CreateRootLookAndFeel; -begin - ReportCells.LookAndFeel := CreateGroupLookAndFeel(TdxPSReportGroupStandardLookAndFeel); - with ReportCells.LookAndFeel do - begin - FontIndex := AddFontToPool(Control_GetFont(Container)); - CaptionFontIndex := ReportCells.LookAndFeel.FontIndex; - Color := Control_GetColor(Container); - end; -end; - -procedure TdxCustomContainerReportLink.HideDesignerTabs(ADesignWindow: TdxfmCustomContainerDesignWindow); -begin - if not IsDesigning then - with OptionsDesignerTabs do - begin - ADesignWindow.ReportLinksTab.TabVisible := - ReportLinks and ((AggregatedReportLinkCount <> 0) or not AutoHideReportLinksIfEmpty); - ADesignWindow.ControlsTab.TabVisible := Controls; - end; -end; - -procedure TdxCustomContainerReportLink.PullReportItems; - - procedure PullNestedItem(AnItem: TdxReportVisualItem); - begin - with AnItem do - begin - Left := Left + Parent.Left; - Top := Top + Parent.Top; - Parent := Parent.Parent; - end; - end; - - function NeedToBeEliminated(AnItem: TdxReportVisualItem): Boolean; - const - MaxHeight = High(Word) div 2; - begin - Result := AnItem.Height > MaxHeight; - end; - - procedure EnumNestedItems(ACell: TdxReportCell; APull: Boolean); - var - I, Index: Integer; - Item: TdxReportVisualItem; - begin - for I := ACell.CellCount - 1 downto 0 do - begin - Item := ACell.Cells[I]; - if APull then PullNestedItem(Item); - - if NeedToBeEliminated(Item) then - begin - EnumNestedItems(TdxReportCell(Item), True); - if FindDefinition(Item, Index) then DeleteDefinition(Index); - Item.Free; - end; - end; - - for I := ACell.DataItemCount - 1 downto 0 do - begin - Item := ACell.DataItems[I]; - if NeedToBeEliminated(Item) then - begin - if FindDefinition(Item, Index) then DeleteDefinition(Index); - Item.Free; - end - else - if APull then PullNestedItem(Item); - end; - end; - -begin - if IsWin9X then EnumNestedItems(RootCell, False); -end; - -procedure TdxCustomContainerReportLink.RepositionControls; - - procedure EnumContainer(AContainer: TWinControl); - var - I: Integer; - Control: TControl; - begin - for I := 0 to AContainer.ControlCount - 1 do - begin - Control := AContainer.Controls[I]; - if IsComponentProcessed(Control) then - begin - if Control is TWinControl then - EnumContainer(TWinControl(Control)); - Producers[Control].Reposition; - end; - end; - end; - -begin - EnumContainer(Container); - Producers[Container].Reposition; -end; - -function TdxCustomContainerReportLink.NeedTwoPassRendering: Boolean; -begin - Result := True; -end; - -function TdxCustomContainerReportLink.IsScaleGridLines: Boolean; -begin - Result := True; -end; - -function TdxCustomContainerReportLink.GetAggregatedReportLink(Index: Integer): TBasedxReportLink; -begin - Result := TBasedxReportLink(FAggregatedReportLinks.Objects[Index]); -end; - -function TdxCustomContainerReportLink.GetAggregatedReportLinkCount: Integer; -begin - Result := FAggregatedReportLinks.Count; -end; - -function TdxCustomContainerReportLink.GetContainer: TWinControl; -begin - Result := TWinControl(Component); -end; - -function TdxCustomContainerReportLink.GetController: TdxCustomContainerReportLink; -begin - Result := inherited Controller as TdxCustomContainerReportLink; -end; - -function TdxCustomContainerReportLink.GetDefinition(Index: Integer): TdxPSCustomContainerItemDefinition; -begin - Result := TdxPSCustomContainerItemDefinition(FDefinitions[Index]); -end; - -function TdxCustomContainerReportLink.GetDefinitionByContainerItem(Component: TComponent): TdxPSCustomContainerItemDefinition; -var - I: Integer; -begin - for I := 0 to DefinitionCount - 1 do - begin - Result := Definitions[I]; - if Result.Component = Component then Exit; - end; - Result := nil; -end; - -function TdxCustomContainerReportLink.GetDefinitionByReportItem(Item: TdxReportVisualItem): TdxPSCustomContainerItemDefinition; -var - I: Integer; -begin - for I := 0 to DefinitionCount - 1 do - begin - Result := Definitions[I]; - if Result.ReportItem = Item then Exit; - end; - Result := nil; -end; - -function TdxCustomContainerReportLink.GetDefinitionCount: Integer; -begin - Result := FDefinitions.Count; -end; - -function TdxCustomContainerReportLink.GetDelimitersHorzCount: Integer; -begin - Result := DelimitersHorz.Count; -end; - -function TdxCustomContainerReportLink.GetDelimitersHorzItem(Index: Integer): Integer; -begin - Result := Integer(DelimitersHorz[Index]); -end; - -function TdxCustomContainerReportLink.GetDelimitersVertCount: Integer; -begin - Result := DelimitersVert.Count; -end; - -function TdxCustomContainerReportLink.GetDelimitersVertItem(Index: Integer): Integer; -begin - Result := Integer(DelimitersVert[Index]); -end; - -function TdxCustomContainerReportLink.GetDesignWindow: TdxfmCustomContainerDesignWindow; -begin - Result := inherited DesignWindow as TdxfmCustomContainerDesignWindow; -end; - -function TdxCustomContainerReportLink.GetExcludedComponent(Index: Integer): TComponent; -begin - Result := TComponent(FExcludedComponents.Objects[Index]); -end; - -function TdxCustomContainerReportLink.GetExcludedComponentCount: Integer; -begin - Result := FExcludedComponents.Count; -end; - -function TdxCustomContainerReportLink.GetHiddenComponent(Index: Integer): TComponent; -begin - Result := TComponent(FHiddenComponents.Objects[Index]); -end; - -function TdxCustomContainerReportLink.GetHiddenComponentCount: Integer; -begin - Result := FHiddenComponents.Count; -end; - -function TdxCustomContainerReportLink.GetProducerByClass(ProducerClass: TdxPSCustomProducerClass; - Component: TComponent): TdxPSCustomProducer; -begin - Result := ProducerCache[ProducerClass, Component]; -end; - -function TdxCustomContainerReportLink.GetRootCell: TdxReportCell; -begin - Result := ReportCells.Cells; -end; - -function TdxCustomContainerReportLink.GetTopLevelContainer: TWinControl; -begin - if IsAggregated then - Result := Controller.TopLevelContainer - else - Result := Container; -end; - -procedure TdxCustomContainerReportLink.SetController(Value: TdxCustomContainerReportLink); -begin - inherited Controller := Value; -end; - -procedure TdxCustomContainerReportLink.SetOnCustomDrawItem(Value: TdxContainerReportLinkCustomDrawItemEvent); -begin - if @FOnCustomDrawItem <> @Value then - begin - FOnCustomDrawItem := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxCustomContainerReportLink.SetOptionsBehavior(Value: TdxCustomContainerReportLinkOptionsBehavior); -begin - OptionsBehavior.Assign(Value); -end; - -procedure TdxCustomContainerReportLink.SetOptionsDesignerTabs(Value: TdxCustomContainerReportLinkOptionsDesignerTabs); -begin - OptionsDesignerTabs.Assign(Value); -end; -{.2} -{procedure TdxCustomContainerReportLink.SetOptionsItemPlace(Value: TdxCustomContainerReportLinkOptionsItemPlace); -begin - OptionsItemPlace.Assign(Value); -end;} - -procedure TdxCustomContainerReportLink.SetOptionsPagination(Value: TdxCustomContainerReportLinkOptionsPagination); -begin - OptionsPagination.Assign(Value); -end; - -procedure TdxCustomContainerReportLink.SetOptionsRefinements(Value: TdxCustomContainerReportLinkOptionsRefinements); -begin - OptionsRefinements.Assign(Value); -end; - -procedure TdxCustomContainerReportLink.SetOptionsTransparent(Value: TdxCustomContainerReportLinkOptionsTransparent); -begin - OptionsTransparent.Assign(Value); -end; - -procedure TdxCustomContainerReportLink.SetSupportedCustomDraw(Value: Boolean); -begin - if FSupportedCustomDraw <> Value then - begin - FSupportedCustomDraw := Value; - LinkModified(True); - end; -end; - -procedure TdxCustomContainerReportLink.LoadAggregatedReportLinks; -var - I: Integer; - Component: TComponent; -begin - if Owner <> nil then - for I := AggregatedReportLinkCount - 1 downto 0 do - begin - Component := Owner.FindComponent(FAggregatedReportLinks[I]); - if Component <> nil then - FAggregatedReportLinks.Objects[I] := Component - else - FAggregatedReportLinks.Delete(I); - end; -end; - -procedure TdxCustomContainerReportLink.ReadAggregatedReportLinks(Stream: TStream); -begin - FAggregatedReportLinks.LoadFromStream(Stream); -end; - -procedure TdxCustomContainerReportLink.WriteAggregatedReportLinks(Stream: TStream); -begin - FAggregatedReportLinks.SaveToStream(Stream); -end; - -procedure TdxCustomContainerReportLink.LoadExcludedComponents; -var - I: Integer; - Component: TComponent; -begin - if Owner <> nil then - for I := ExcludedComponentCount - 1 downto 0 do - begin - Component := Owner.FindComponent(FExcludedComponents[I]); - if Component <> nil then - FExcludedComponents.Objects[I] := Component - else - FExcludedComponents.Delete(I); - end; -end; - -procedure TdxCustomContainerReportLink.ReadExcludedComponents(Stream: TStream); -begin - FExcludedComponents.LoadFromStream(Stream); -end; - -procedure TdxCustomContainerReportLink.WriteExcludedComponents(Stream: TStream); -begin - FExcludedComponents.SaveToStream(Stream); -end; - -procedure TdxCustomContainerReportLink.LoadHiddenComponents; -var - I: Integer; - Component: TComponent; -begin - if Owner <> nil then - for I := HiddenComponentCount - 1 downto 0 do - begin - Component := Owner.FindComponent(FHiddenComponents[I]); - if Component <> nil then - FHiddenComponents.Objects[I] := Component - else - FHiddenComponents.Delete(I); - end; -end; - -procedure TdxCustomContainerReportLink.ReadHiddenComponents(Stream: TStream); -begin - FHiddenComponents.LoadFromStream(Stream); -end; - -procedure TdxCustomContainerReportLink.WriteHiddenComponents(Stream: TStream); -begin - FHiddenComponents.SaveToStream(Stream); -end; - -{ TdxPSContainerDesignWindow } - -constructor TdxfmCustomContainerDesignWindow.Create(AOwner: TComponent); -begin - inherited; - {$IFDEF DELPHI5} - tvControls.OnAdvancedCustomDrawItem := TreeView_AdvancedCustomDrawItem; - tvHiddenControls.OnAdvancedCustomDrawItem := TreeView_AdvancedCustomDrawItem; - {$ENDIF} - PageControl1.ActivePage := tshOptions; - FLastActiveTab := PageControl1.ActivePage; - {$IFDEF WMCONTEXTMENU} - SubstituteTreeViewsWndProc; - {$ENDIF} -end; - -destructor TdxfmCustomContainerDesignWindow.Destroy; -begin - {$IFDEF WMCONTEXTMENU} - RestoreTreeViewsWndProc; - {$ENDIF} - TreeView_FreeNodeObjects(tvControls); - TreeView_FreeNodeObjects(tvHiddenControls); - inherited; -end; - -procedure TdxfmCustomContainerDesignWindow.BeforeConstruction; -begin - inherited; - Options := Options + [foSizeableDialog]; -end; - -procedure TdxfmCustomContainerDesignWindow.DoInitialize; -begin - inherited; - - dxPSUtl.dxCreateCheckMarkImages(ilControls); - RefreshHiddenControlsTree; - RefreshControlsTree; - RefreshReportLinksList; - - with ReportLink.OptionsPagination do - begin - chbxPaginateByControlDetails.Checked := ControlDetails; - chbxPaginateByControls.Checked := Controls; - end; - chbxPaginateByGroups.Visible := False; - chbxPaginateByItems.Visible := False; - - {.2} - {with ReportLink.OptionsItemPlace do - begin - chbxExpandHeight.Checked := ExpandHeight; - chbxExpandWidth.Checked := ExpandWidth; - chbxShrinkHeight.Checked := ShrinkHeight; - chbxShrinkWidth.Checked := ShrinkWidth; - end;} - - with ReportLink.OptionsTransparent do - begin - chbxTransparentContainers.Checked := Containers; - chbxTransparentControls.Checked := Controls; - chbxTransparentRoot.Checked := Root; - chbxTransparentGraphics.Checked := Graphics; - end; - chbxTransparentGroups.Visible := False; - chbxTransparentItems.Visible := False; - - pnlAvailableLinksSite.Visible := ReportLink.IsDesigning; - pnlMoveButtonsSite.Visible := ReportLink.IsDesigning; - lblAggregatedLinks.Visible := ReportLink.IsDesigning; - if not ReportLink.IsDesigning then - begin - lbxAggregatedLinks.Align := alClient; - lbxAggregatedLinks.DragMode := dmManual; - lbxAggregatedLinks.MultiSelect := False; - btnLinksDesign.Top := btnControlsCheckAll.Top; - btnLinksRemoveInconsistents.Visible := False; - end; - - lblSize.Visible := False; - bvlSize.Visible := False; - imgSize.Visible := False; - chbxAutoWidth.Visible := False; -end; - -procedure TdxfmCustomContainerDesignWindow.LoadStrings; -begin - inherited; - tshOptions.Caption := cxGetResourceString(@sdxOptions); - lblTransparents.Caption := cxGetResourceString(@sdxTransparents); - chbxTransparentContainers.Caption := cxGetResourceString(@sdxContainers); - chbxTransparentControls.Caption := cxGetResourceString(@sdxControls); - chbxTransparentRoot.Caption := cxGetResourceString(@sdxRoot); - chbxTransparentGraphics.Caption := cxGetResourceString(@sdxGraphics); - chbxTransparentGroups.Caption := cxGetResourceString(@sdxGroups); - chbxTransparentItems.Caption := cxGetResourceString(@sdxItems); - - (*lblControlsPlace.Caption := cxGetResourceString(@sdxControlsPlace); - chbxExpandHeight.Caption := cxGetResourceString(@sdxExpandHeight); - chbxExpandWidth.Caption := cxGetResourceString(@sdxExpandWidth); - chbxShrinkHeight.Caption := cxGetResourceString(@sdxShrinkHeight); - chbxShrinkWidth.Caption := cxGetResourceString(@sdxShrinkWidth);*) - - lblPagination.Caption := cxGetResourceString(@sdxPagination); - chbxPaginateByControlDetails.Caption := cxGetResourceString(@sdxPaginateByControlDetails); - chbxPaginateByControls.Caption := cxGetResourceString(@sdxPaginateByControls); - chbxPaginateByGroups.Caption := cxGetResourceString(@sdxPaginateByGroups); - chbxPaginateByItems.Caption := cxGetResourceString(@sdxPaginateByItems); - - lblSize.Caption := cxGetResourceString(@sdxSize); - chbxAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - - tshReportLinks.Caption := cxGetResourceString(@sdxReportLinksTab); - lblAvailableLinks.Caption := cxGetResourceString(@sdxAvailableLinks); - lblAggregatedLinks.Caption := cxGetResourceString(@sdxAggregatedLinks); - btnLinksDesign.Caption := cxGetResourceString(@sdxBtnDesign); - btnLinksRemoveInconsistents.Caption := cxGetResourceString(@sdxBtnRemoveInconsistents); - - tshControls.Caption := cxGetResourceString(@sdxControlsTab); - btnControlsCheckAll.Caption := cxGetResourceString(@sdxCheckAll); - btnControlsExpandAll.Caption := cxGetResourceString(@sdxExpandAll); - - tshHiddenControls.Caption := cxGetResourceString(@sdxHiddenControlsTab); - btnHiddenControlsCheckAll.Caption := cxGetResourceString(@sdxCheckAll); - btnHiddenControlsExpandAll.Caption := cxGetResourceString(@sdxExpandAll); - - miControlsCheckAll.Caption := cxGetResourceString(@sdxCheckAll); - miControlsCheckAllChildren.Caption := cxGetResourceString(@sdxCheckAllChildren); - miControlsUncheckAllChildren.Caption := cxGetResourceString(@sdxUncheckAllChildren); - miControlsExpandAll.Caption := cxGetResourceString(@sdxExpandAll); -end; - -procedure TdxfmCustomContainerDesignWindow.UpdateControlsState; -var - Root: TTreeNode; -begin - inherited; - sbtnAdd.Enabled := CanAggregate; - sbtnRemove.Enabled := CanDisaggregate; - btnLinksDesign.Enabled := CanDesign; - btnLinksRemoveInconsistents.Enabled := CanRemoveInconsistents; - - Root := TreeView_GetRoot(tvControls); - tvControls.Enabled := Root <> nil; - btnControlsCheckAll.Enabled := (Root <> nil) and TreeView_HasUncheckedChildren(Root); - btnControlsExpandAll.Enabled := (Root <> nil) and (Root.Count <> 0); - - Root := TreeView_GetRoot(tvHiddenControls); - tvHiddenControls.Enabled := Root <> nil; - btnHiddenControlsCheckAll.Enabled := (Root <> nil) and TreeView_HasUncheckedChildren(Root); - btnHiddenControlsExpandAll.Enabled := (Root <> nil) and (Root.Count <> 0); - - tshHiddenControls.HandleNeeded; - if tshHiddenControls.HandleAllocated then - tshHiddenControls.TabVisible := IsDesigning; -end; - -function TdxfmCustomContainerDesignWindow.GetActiveTreeView: TTreeView; -begin - if PageControl1.ActivePage = tshControls then - Result := tvControls - else - Result := tvHiddenControls; -end; - -procedure TdxfmCustomContainerDesignWindow.InitializeControlsTree; -var - Root: TTreeNode; -begin - ReportLink.LoadControlsTree(tvControls); - - Root := TreeView_GetRoot(tvControls); - if Root <> nil then - begin - TreeView_NormalizeNode(Root); - Root.Expand(False); - end; -end; - -procedure TdxfmCustomContainerDesignWindow.InitializeHiddenControlsTree; -var - Root: TTreeNode; -begin - ReportLink.LoadHiddenControlsTree(tvHiddenControls); - - Root := TreeView_GetRoot(tvHiddenControls); - if Root <> nil then - begin - TreeView_NormalizeNode(Root); - Root.Expand(False); - end; -end; - -function TdxfmCustomContainerDesignWindow.IsBoldNode(ANode: TTreeNode): Boolean; -begin - Result := not TreeView_IsNodeEditable(ANode); -end; - -procedure TdxfmCustomContainerDesignWindow.RefreshControlsTree; -begin - if not (dwsInitialize in State) then tvControls.Items.BeginUpdate; - try - InitializeControlsTree; - finally - if not (dwsInitialize in State) then tvControls.Items.EndUpdate; - end; -end; - -procedure TdxfmCustomContainerDesignWindow.RefreshHiddenControlsTree; -begin - if not (dwsInitialize in State) then tvHiddenControls.Items.BeginUpdate; - try - InitializeHiddenControlsTree; - finally - if not (dwsInitialize in State) then tvHiddenControls.Items.EndUpdate; - end; -end; - -procedure TdxfmCustomContainerDesignWindow.RefreshReportLinksList; -begin - if ReportLink.IsDesigning then RefreshAvailableLinks; - RefreshAggregatedLinks; -end; - -procedure TdxfmCustomContainerDesignWindow.SetOptionsPaginationByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsPagination do - case AnIndex of - 0: ControlDetails := AValue; - 1: Controls := AValue; - end; - Modified := True; -end; - -procedure TdxfmCustomContainerDesignWindow.SetOptionsSizeByIndex(AnIndex: Integer; - AValue: Boolean); -begin -end; - -{.2} -{procedure TdxfmCustomContainerDesignWindow.SetOptionsPlaceByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if LockControlsUpdate then Exit; - - with ContainerReportLink.OptionsItemPlace do - case AnIndex of - 0: ExpandHeight := AValue; - 1: ExpandWidth := AValue; - 2: ShrinkHeight := AValue; - 3: ShrinkWidth := AValue; - end; - Modified := True; -end;} - -procedure TdxfmCustomContainerDesignWindow.SetOptionsTransparentByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsTransparent do - case AnIndex of - 0: Root := AValue; - 1: Controls := AValue; - 2: Containers := AValue; - 3: Graphics := AValue; - end; - Modified := True; -end; - -{$IFDEF DELPHI5} - -procedure TdxfmCustomContainerDesignWindow.TreeView_AdvancedCustomDrawItem( - Sender: TCustomTreeView; Node: TTreeNode; State: TCustomDrawState; - Stage: TCustomDrawStage; var PaintImages, DefaultDraw: Boolean); - - procedure DrawNodeExtraText; - const - HighlightColor = clBlue; - var - S: string; - R: TRect; - TextColor, BkColor: COLORREF; - X, Y: Integer; - begin - with Sender.Canvas do - begin - S := '[' + TreeView_GetNodeObject(Node).Component.ClassName + ']'; - R := Node.DisplayRect(True); - with R do - begin - Left := Right; - Inc(Right, 2 + TextWidth(S) + 2); - X := Left + 1; - Y := Top + (Bottom - Top - TextHeight(S)) div 2; - end; - - TextColor := SetTextColor(Handle, ColorToRGB(HighlightColor)); - BkColor := SetBkColor(Handle, ColorToRGB(clWindow)); - ExtTextOut(Handle, X, Y, ETO_OPAQUE, @R, PChar(S), Length(S), nil); - SetBkColor(Handle, BkColor); - SetTextColor(Handle, TextColor); - end; - end; - -begin - if TBasedxReportLinkAccess(ReportLink).IsDesigning and (Stage = cdPostPaint) and - (TreeView_GetNodeObject(Node) <> nil) then - begin - DrawNodeExtraText; - DefaultDraw := False; - end; -end; - -{$ENDIF} - -procedure TdxfmCustomContainerDesignWindow.TreeView_BeginUpdate; -begin - dxPSCore.dxPSStartWait; - ActiveTreeView.Items.BeginUpdate; -end; - -procedure TdxfmCustomContainerDesignWindow.TreeView_CheckAllChildren(ANode: TTreeNode; - AChecked: Boolean); - - procedure DoCheckAllChildren(ANode: TTreeNode); - const - StateMap: array[Boolean, Boolean] of TCheckBoxState = ((cbGrayed, cbChecked), (cbUnchecked, cbChecked)); - var - I: Integer; - Node: TTreeNode; - begin - for I := 0 to ANode.Count - 1 do - begin - Node := ANode[I]; - TreeView_SetNodeState(Node, StateMap[TreeView_IsNodeEditable(Node), AChecked]); - DoCheckAllChildren(Node); - end; - end; - -begin - DoCheckAllChildren(ANode); -end; - -procedure TdxfmCustomContainerDesignWindow.TreeView_EndUpdate; -begin - ActiveTreeView.Items.EndUpdate; - dxPSCore.dxPSStopWait; -end; - -procedure TdxfmCustomContainerDesignWindow.TreeView_FreeNodeObjects(ATreeView: TTreeView); - - procedure FreeNodeObject(ANode: TTreeNode); - var - I: Integer; - begin - TObject(ANode.Data).Free; - for I := 0 to ANode.Count - 1 do - FreeNodeObject(ANode[I]); - end; - -var - Root: TTreeNode; -begin - Root := TreeView_GetRoot(ATreeView); - if Root <> nil then - FreeNodeObject(Root); -end; - -function TdxfmCustomContainerDesignWindow.TreeView_GetNodeObject(ANode: TTreeNode): TdxNodeObject; -begin - Result := TdxNodeObject(ANode.Data); -end; - -function TdxfmCustomContainerDesignWindow.TreeView_getRoot(ATreeView: TTreeView): TTreeNode; -begin - Result := ATreeView.Items.GetFirstNode; -end; - -function TdxfmCustomContainerDesignWindow.TreeView_HasCheckedChildren(ANode: TTreeNode): Boolean; -var - I: Integer; - Node: TTreeNode; -begin - Result := True; - for I := 0 to ANode.Count - 1 do - begin - Node := ANode[I]; - if TreeView_GetNodeObject(Node).State <> cbUnchecked then - Exit; - if (Node.Count <> 0) and TreeView_HasCheckedChildren(Node) then - Exit; - end; - Result := False; -end; - -function TdxfmCustomContainerDesignWindow.TreeView_HasRoot(ATreeView: TTreeView): Boolean; -begin - Result := TreeView_GetRoot(ATreeView) <> nil; -end; - -function TdxfmCustomContainerDesignWindow.TreeView_HasUncheckedChildren(ANode: TTreeNode): Boolean; -var - I: Integer; - Node: TTreeNode; -begin - Result := True; - for I := 0 to ANode.Count - 1 do - begin - Node := ANode[I]; - if TreeView_GetNodeObject(Node).State <> cbChecked then - Exit; - if (Node.Count <> 0) and TreeView_HasUncheckedChildren(Node) then - Exit; - end; - Result := False; -end; - -function TdxfmCustomContainerDesignWindow.TreeView_IsNodeEditable(ANode: TTreeNode): Boolean; -begin - Result := (ANode <>nil) and ReportLink.IsComponentEditable(TreeView_GetNodeObject(ANode).Component); -end; - -procedure TdxfmCustomContainerDesignWindow.TreeView_NormalizeNode(ANode: TTreeNode); - - procedure DoUpdateNodeState(ANode: TTreeNode); - var - NodeObject: TdxNodeObject; - begin - NodeObject := TreeView_GetNodeObject(ANode); - if (NodeObject.State = cbChecked) and TreeView_HasUncheckedChildren(ANode) then - NodeObject.State := cbGrayed; - TreeView_UpdateNodeImage(ANode); - end; - -var - I: Integer; - Node: TTreeNode; -begin - for I := 0 to ANode.Count - 1 do - begin - Node := ANode[I]; - if Node.Count <> 0 then - TreeView_NormalizeNode(Node); - end; - DoUpdateNodeState(ANode); -end; - -procedure TdxfmCustomContainerDesignWindow.TreeView_SetNodeState(ANode: TTreeNode; - AState: TCheckBoxState); -var - NodeObject: TdxNodeObject; - Component: TComponent; -begin - NodeObject := TreeView_GetNodeObject(ANode); - NodeObject.State := AState; - - Component := NodeObject.Component; - case NodeObject.State of - cbUnchecked: - if ActiveTreeView = tvHiddenControls then - ReportLink.HideComponent(Component) - else - ReportLink.ExcludeComponent(Component); - cbChecked: - if ActiveTreeView = tvHiddenControls then - ReportLink.UnhideComponent(Component) - else - ReportLink.UnexcludeComponent(Component); - end; - TreeView_UpdateNodeImage(ANode); - - Modified := True; -end; - -procedure TdxfmCustomContainerDesignWindow.TreeView_ToggleNodeState(ANode: TTreeNode); -const - StateToggles: array[TCheckBoxState] of TCheckBoxState = (cbChecked, cbUnchecked, cbChecked); -var - NodeObject: TdxNodeObject; -begin - if (ANode <> nil) and TreeView_IsNodeEditable(ANode) then - begin - NodeObject := TreeView_GetNodeObject(ANode); - TreeView_SetNodeState(ANode, StateToggles[NodeObject.State]); - TreeView_CheckAllChildren(ANode, NodeObject.State = cbChecked); - if ANode.Parent <> nil then - TreeView_UpdateNodesState(ANode.Parent); - end; -end; - -procedure TdxfmCustomContainerDesignWindow.TreeView_UpdateNodeImage(ANode: TTreeNode); -begin - ANode.StateIndex := dxPSUtl.dxCheckStateImageIndexMap(TreeView_GetNodeObject(ANode).State); -end; - -procedure TdxfmCustomContainerDesignWindow.TreeView_UpdateNodesState(ANode: TTreeNode); - - procedure DoUpdateNodeState(ANode: TTreeNode); - begin - with TreeView_GetNodeObject(ANode) do - case State of - cbUnchecked, - cbChecked: - if TreeView_HasUncheckedChildren(ANode) then - State := cbGrayed; - cbGrayed: - if not TreeView_HasUncheckedChildren(ANode) then - State := cbChecked; - end; - TreeView_UpdateNodeImage(ANode); - end; - -begin - DoUpdateNodeState(ANode); - if ANode.Parent <> nil then - TreeView_UpdateNodesState(ANode.Parent); -end; - -function TdxfmCustomContainerDesignWindow.GetAggregatedLink(Index: Integer): TBasedxReportLink; -begin - Result := TBasedxReportLink(lbxAggregatedLinks.Items.Objects[Index]); -end; - -function TdxfmCustomContainerDesignWindow.GetAggregatedLinkCount: Integer; -begin - Result := lbxAggregatedLinks.Items.Count; -end; - -function TdxfmCustomContainerDesignWindow.GetAggregatedLinkSelected(Index: Integer): Boolean; -begin - Result := lbxAggregatedLinks.Selected[Index]; -end; - -function TdxfmCustomContainerDesignWindow.GetAvailableLink(Index: Integer): TBasedxReportLink; -begin - Result := TBasedxReportLink(lbxAvailableLinks.Items.Objects[Index]); -end; - -function TdxfmCustomContainerDesignWindow.GetAvailableLinkCount: Integer; -begin - Result := lbxAvailableLinks.Items.Count; -end; - -function TdxfmCustomContainerDesignWindow.GetAvailableLinkSelected(Index: Integer): Boolean; -begin - Result := lbxAvailableLinks.Selected[Index]; -end; - -function TdxfmCustomContainerDesignWindow.GetControlsTab: TTabSheet; -begin - Result := tshControls; -end; - -function TdxfmCustomContainerDesignWindow.GetHiddenControlsTab: TTabSheet; -begin - Result := tshHiddenControls; -end; - -function TdxfmCustomContainerDesignWindow.GetReportLink: TdxCustomContainerReportLink; -begin - Result := inherited ReportLink as TdxCustomContainerReportLink; -end; - -function TdxfmCustomContainerDesignWindow.GetReportLinksTab: TTabSheet; -begin - Result := tshReportLinks; -end; - -function TdxfmCustomContainerDesignWindow.GetSelectedReportLink: TBasedxReportLink; -begin - with lbxAggregatedLinks do - if (not ReportLink.IsDesigning or (SelCount = 1)) and (ItemIndex <> -1) then - Result := TBasedxReportLink(Items.Objects[ItemIndex]) - else - Result := nil -end; - -procedure TdxfmCustomContainerDesignWindow.DoCheckAllChildren(ANode: TTreeNode; - AChecked: Boolean); -begin - if ANode <> nil then - begin - TreeView_BeginUpdate; - try - TreeView_CheckAllChildren(ANode, AChecked); - TreeView_UpdateNodesState(ANode); - finally - TreeView_EndUpdate; - end; - FAreHiddenControlsChanged := True; - Modified := True; - end; -end; - -procedure TdxfmCustomContainerDesignWindow.DoToggleNodeState(ANode: TTreeNode); -begin - if TreeView_IsNodeEditable(ANode) then - begin - TreeView_BeginUpdate; - try - TreeView_ToggleNodeState(ANode); - finally - TreeView_EndUpdate; - end; - FAreHiddenControlsChanged := True; - //UpdateControlsState; - Modified := True; - end; -end; - -function TdxfmCustomContainerDesignWindow.CanAggregate: Boolean; -begin - Result := lbxAvailableLinks.SelCount <> 0; -end; - -function TdxfmCustomContainerDesignWindow.CanDesign: Boolean; -begin - Result := (SelectedReportLink <> nil) and SelectedReportLink.CheckToDesign; -end; - -function TdxfmCustomContainerDesignWindow.CanDisaggregate: Boolean; -begin - Result := ReportLink.IsDesigning and (lbxAggregatedLinks.SelCount <> 0); -end; - -function TdxfmCustomContainerDesignWindow.CanRemoveInconsistents: Boolean; -begin - Result := ReportLink.HasInconsistentlyAggregatedLinks; -end; - -{function TdxfmCustomContainerDesignWindow.CanSelectAll(AListBox: TListBox): Boolean; -begin - with AListBox do - Result := (Items.Count <> 0) and (Items.Count <> SelCount); -end;} - -procedure TdxfmCustomContainerDesignWindow.DoAggregateSelectedLinks; -var - I: Integer; -begin - for I := 0 to AvailableLinkCount - 1 do - if AvailableLinkSelected[I] then - ReportLink.AggregateLink(AvailableLinks[I]); - - RefreshReportLinksList; - UpdateControlsState; - Modified := True; -end; - -procedure TdxfmCustomContainerDesignWindow.DoDisaggregateSelectedLinks; -var - I: Integer; -begin - for I := 0 to AggregatedLinkCount - 1 do - if AggregatedLinkSelected[I] then - ReportLink.DisaggregateLink(AggregatedLinks[I]); - - RefreshReportLinksList; - UpdateControlsState; - Modified := True; -end; - -procedure TdxfmCustomContainerDesignWindow.RefreshAvailableLinks; -var - I: Integer; - Link: TBasedxReportLink; -begin - with lbxAvailableLinks do - begin - Items.BeginUpdate; - try - Items.Clear; - for I := 0 to ReportLink.ComponentPrinter.LinkCount - 1 do - begin - Link := ReportLink.ComponentPrinter[I]; - if ReportLink.IsLinkAggregable(Link) and not ReportLink.IsLinkAggregated(Link) then - Items.AddObject(Link.Name, Link); - end; - ItemIndex := Items.Count - 1; - if ItemIndex <> -1 then - Selected[ItemIndex] := True; - finally - Items.EndUpdate; - end; - end; -end; - -procedure TdxfmCustomContainerDesignWindow.RefreshAggregatedLinks; -var - I: Integer; - Link: TBasedxReportLink; -begin - with lbxAggregatedLinks do - begin - Items.BeginUpdate; - try - Items.Clear; - for I := 0 to ReportLink.AggregatedReportLinkCount - 1 do - begin - Link := ReportLink.AggregatedReportLinks[I]; - Items.AddObject(Link.Name, Link); - end; - ItemIndex := Items.Count - 1; - if ItemIndex <> -1 then - Selected[ItemIndex] := True; - finally - Items.EndUpdate; - end; - end; -end; - -procedure TdxfmCustomContainerDesignWindow.DoSelectAll(AListBox: TListBox); -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - {$IFDEF DELPHI6} - AListBox.SelectAll; - {$ELSE} - for I := 0 to AListBox.Items.Count - 1 do - AListBox.Selected[I] := True; - {$ENDIF} -end; - -{$IFDEF WMCONTEXTMENU} - -procedure TdxfmCustomContainerDesignWindow.ControlsTreeViewWndProc(var Message: TMessage); -begin - FControlsTreeViewWndProc(Message); - if Message.Msg = WM_CONTEXTMENU then - ProcessContextMenu(TWMContextMenu(Message), tvControls); -end; - -procedure TdxfmCustomContainerDesignWindow.HiddenControlsTreeViewWndProc(var Message: TMessage); -begin - FHiddenControlsTreeViewWndProc(Message); - if Message.Msg = WM_CONTEXTMENU then - ProcessContextMenu(TWMContextMenu(Message), tvHiddenControls); -end; - -procedure TdxfmCustomContainerDesignWindow.ProcessContextMenu(AMessage: TWMContextMenu; - ATreeView: TTreeView); -var - KeyState: TKeyboardState; -begin - GetKeyboardState(KeyState); - with AMessage do - TreeViewMouseUp(ATreeView, mbRight, KeyboardStateToShiftState(KeyState), Pos.X, Pos.Y) -end; - -procedure TdxfmCustomContainerDesignWindow.RestoreTreeViewsWndProc; -begin - tvControls.WindowProc := FControlsTreeViewWndProc; - tvHiddenControls.WindowProc := FHiddenControlsTreeViewWndProc; -end; - -procedure TdxfmCustomContainerDesignWindow.SubstituteTreeViewsWndProc; -begin - FControlsTreeViewWndProc := tvControls.WindowProc; - tvControls.WindowProc := ControlsTreeViewWndProc; - - FHiddenControlsTreeViewWndProc := tvHiddenControls.WindowProc; - tvHiddenControls.WindowProc := HiddenControlsTreeViewWndProc; -end; - -{$ENDIF} - -procedure TdxfmCustomContainerDesignWindow.TreeViewClick(Sender: TObject); -var - TreeView: TTreeView; - Pt: TPoint; - HitTest: THitTests; -begin - TreeView := TTreeView(Sender); - Pt := TreeView.ScreenToClient(Mouse.CursorPos); - HitTest := TreeView.GetHitTestInfoAt(Pt.X, Pt.Y); - if htOnStateIcon in HitTest then - DoToggleNodeState(TreeView.GetNodeAt(Pt.X, Pt.Y)); -end; - -procedure TdxfmCustomContainerDesignWindow.TreeViewKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if Key = VK_SPACE then - begin - DoToggleNodeState(TTreeView(Sender).Selected); - Key := 0; - end; -end; - -procedure TdxfmCustomContainerDesignWindow.TreeViewKeyPress(Sender: TObject; - var Key: Char); -begin - if Key = #32 then Key := #0; -end; - -procedure TdxfmCustomContainerDesignWindow.TreeViewMouseUp(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - Pt: TPoint; - Node: TTreeNode; -begin - if Button = mbRight then - begin - Pt := MakePoint(X, Y); - {$IFDEF DELPHI5} - {$IFNDEF DELPHI7} - Pt := TTreeView(Sender).ScreenToClient(Pt); - {$ENDIF} - {$ENDIF} - Node := TTreeView(Sender).GetNodeAt(Pt.X, Pt.Y); - if Node <> nil then - begin - Node.Focused := True; - Node.Selected := True; - end; - dxPSPopupMan.dxPSPopupMenuController.ShowPopupAtMousePos(nil, pmControls); - end; -end; - -procedure TdxfmCustomContainerDesignWindow.TreeViewCheckAllClick(Sender: TObject); -begin - DoCheckAllChildren(TreeView_GetRoot(ActiveTreeView), True); -end; - -procedure TdxfmCustomContainerDesignWindow.TreeViewCheckAllChildrenClick(Sender: TObject); -begin - DoCheckAllChildren(ActiveTreeView.Selected, True); -end; - -procedure TdxfmCustomContainerDesignWindow.TreeViewUncheckAllChildrenClick(Sender: TObject); -begin - DoCheckAllChildren(ActiveTreeView.Selected, False); -end; - -procedure TdxfmCustomContainerDesignWindow.TreeViewExpandAllClick(Sender: TObject); -begin - ActiveTreeView.FullExpand; -end; - -procedure TdxfmCustomContainerDesignWindow.HideStandardControlsClick(Sender: TObject); -begin - ReportLink.HideStandardControls; -end; - -procedure TdxfmCustomContainerDesignWindow.UnhideStandardControlsClick(Sender: TObject); -begin - ReportLink.UnhideStandardControls; -end; - -procedure TdxfmCustomContainerDesignWindow.TreeViewCustomDrawItem( - Sender: TCustomTreeView; Node: TTreeNode; State: TCustomDrawState; - var DefaultDraw: Boolean); -const - FontColors: array[Boolean] of TColor = (clGrayText, clWindowText); - SelectedBkColors: array[Boolean] of TColor = (clBtnFace, clHighlight); - SelectedFontColors: array[Boolean] of TColor = (clGrayText, clHighlightText); -begin - if (Node = nil) or (TreeView_GetNodeObject(Node) = nil) then Exit; - if IsBoldNode(Node) then - begin - if cdsSelected in State then - begin - Sender.Canvas.Brush.Color := SelectedBkColors[Sender.Focused]; - if Sender.Focused then - Sender.Canvas.Font.Color := SelectedFontColors[TreeView_IsNodeEditable(Node)] - else - Sender.Canvas.Font.Color := FontColors[TreeView_IsNodeEditable(Node)]; - end - else - begin - Sender.Canvas.Brush.Color := clWindow; - Sender.Canvas.Font.Color := FontColors[TreeView_IsNodeEditable(Node)]; - end; - Sender.Canvas.Font.Style := Sender.Canvas.Font.Style + [fsBold]; - end; -end; - -procedure TdxfmCustomContainerDesignWindow.DesignClick(Sender: TObject); -begin - Modified := CanDesign and SelectedReportLink.DesignReport; -end; - -procedure TdxfmCustomContainerDesignWindow.pmControlsPopup(Sender: TObject); -var - Node: TTreeNode; -begin - Node := TreeView_GetRoot(ActiveTreeView); - miControlsCheckAll.Enabled := (Node <> nil) and TreeView_HasUncheckedChildren(Node); - miControlsExpandAll.Enabled := (Node <> nil) and (Node.Count <> 0); -// miControlsCheckStandardControls.Visible := ActiveTreeView = tvHiddenControls; -// miControlsCheckStandardControls.Enabled := Node <> nil; -// miControlsUncheckStandardControls.Visible := ActiveTreeView = tvHiddenControls; -// miControlsUncheckStandardControls.Enabled := Node <> nil; - - Node := ActiveTreeView.Selected; - miControlsCheckAllChildren.Enabled := (Node <> nil) and (Node.Count <> 0) and - TreeView_HasUncheckedChildren(Node); - miControlsUncheckAllChildren.Enabled := (Node <> nil) and (Node.Count <> 0) and - TreeView_HasCheckedChildren(Node); -end; - -procedure TdxfmCustomContainerDesignWindow.lbxAggregatedLinksClick(Sender: TObject); -begin - UpdateControlsState; -end; - -procedure TdxfmCustomContainerDesignWindow.TreeViewChange(Sender: TObject; - Node: TTreeNode); -begin - //UpdateControlsState; -end; - -procedure TdxfmCustomContainerDesignWindow.PageControl1Change(Sender: TObject); -begin - UpdateControlsState; - FAreHiddenControlsChanged := False; - FLastActiveTab := PageControl1.ActivePage; -end; - -procedure TdxfmCustomContainerDesignWindow.PageControl1Changing(Sender: TObject; - var AllowChange: Boolean); -begin - if FAreHiddenControlsChanged and (FLastActiveTab = HiddenControlsTab) then - RefreshControlsTree; -end; - -procedure TdxfmCustomContainerDesignWindow.TransparentClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsTransparentByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmCustomContainerDesignWindow.PaginationClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsPaginationByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmCustomContainerDesignWindow.SizeClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSizeByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmCustomContainerDesignWindow.sbtnAddClick(Sender: TObject); -begin - DoAggregateSelectedLinks; -end; - -procedure TdxfmCustomContainerDesignWindow.sbtnRemoveClick(Sender: TObject); -begin - DoDisaggregateSelectedLinks; -end; - -procedure TdxfmCustomContainerDesignWindow.tshReportLinksResize(Sender: TObject); -const - TopMargin = 22; -var - W, H: Integer; -begin - if ReportLink.IsDesigning then - begin - W := (pnlLinkListsSite.ClientWidth - pnlMoveButtonsSite.Width) div 2; - pnlAvailableLinksSite.Width := W; - pnlAggregatedLinksSite.Width := W; - - H := TopMargin + (sbtnAdd.Parent.ClientHeight - TopMargin) div 2; - sbtnAdd.Top := H - sbtnAdd.Height - 3; - sbtnRemove.Top := H + 3; - end; -end; - -procedure TdxfmCustomContainerDesignWindow.lbxAvailableLinksKeyDown( - Sender: TObject; var Key: Word; Shift: TShiftState); -begin - if (Key = Ord('A')) and (ssCtrl in Shift) then - DoSelectAll(TListBox(Sender)); -end; - -procedure TdxfmCustomContainerDesignWindow.lbxAggregatedLinksKeyDown( - Sender: TObject; var Key: Word; Shift: TShiftState); -begin - if (Key = Ord('A')) and (ssCtrl in Shift) then - DoSelectAll(TListBox(Sender)); -end; - -procedure TdxfmCustomContainerDesignWindow.lbxAvailableLinksDragOver( - Sender, Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); -begin - Accept := (Source = lbxAggregatedLinks) and (lbxAggregatedLinks.SelCount <> 0); -end; - -procedure TdxfmCustomContainerDesignWindow.lbxAvailableLinksDragDrop( - Sender, Source: TObject; X, Y: Integer); -begin - DoDisaggregateSelectedLinks; -end; - -procedure TdxfmCustomContainerDesignWindow.lbxAggregatedLinksDragOver( - Sender, Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); -begin - Accept := (Source = lbxAvailableLinks) and (lbxAvailableLinks.SelCount <> 0); -end; - -procedure TdxfmCustomContainerDesignWindow.lbxAggregatedLinksDragDrop( - Sender, Source: TObject; X, Y: Integer); -begin - DoAggregateSelectedLinks; -end; - -procedure TdxfmCustomContainerDesignWindow.lbxAggregatedLinksDblClick(Sender: TObject); -begin - if CanDisaggregate then - DoDisaggregateSelectedLinks - else - if CanDesign then btnLinksDesign.Click; -end; - -procedure TdxfmCustomContainerDesignWindow.lbxAvailableLinksDblClick(Sender: TObject); -begin - if CanAggregate then DoAggregateSelectedLinks; -end; - -procedure TdxfmCustomContainerDesignWindow.btnLinksRemoveInconsistentsClick( - Sender: TObject); -begin - if CanRemoveInconsistents then - begin - ReportLink.DisaggregateInconsistentLinks; - RefreshReportLinksList; - end; -end; - -procedure TdxfmCustomContainerDesignWindow.lbxAggregatedLinksDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -var - R: TRect; - Link: TBasedxReportLink; - S: string; - X, Y: Integer; -begin - R := Rect; - with TCustomListBox(Control) do - begin - Link := TBasedxReportLink(Items.Objects[Index]); - - Canvas.FillRect(R); - - S := Link.ReportDocument.Caption; - with R do - begin - X := Left + 1; - Y := Top + (Bottom - Top - Canvas.TextHeight(S)) div 2; - end; - if (Control = lbxAggregatedLinks) and not ReportLink.IsLinkAggregatedConsistently(Link) and not (odSelected in State) then - Canvas.Font.Color := clGrayText; - Canvas.TextRect(R, X, Y, S); - - if IsDesigning and (Link.Component <> nil) then - begin - Inc(R.Left, 1 + 1 + Canvas.TextWidth(S) + 1); - X := R.Left + 2; - S := '[' + Link.Component.Name + ']'; - if ((Control = lbxAvailableLinks) or ReportLink.IsLinkAggregatedConsistently(Link)) and not (odSelected in State) then - Canvas.Font.Color := clBlue; - Canvas.TextRect(R, X, Y, S); - end; - - //if odFocused in State then Canvas.DrawFocusRect(Rect); - end; -end; - -procedure RegisterAssistants; -begin - TdxPSContainerBuilder.Register; - - TdxPSNativePrintableControlProducer.Register; - - TdxPSControlAsMetafileProducer.Register; - TdxPSWinControlAsMetafileProducer.Register; - - TdxPSCustomContainerItemProducer.Register; - TdxPSContainerControlProducer.Register; - TdxPSBevelProducer.Register; - TdxPSPaintBoxProducer.Register; - TdxPSShapeProducer.Register; - TdxPSCustomLabelProducer.Register; - TdxPSContainerCustomWinControlProducer.Register; - TdxPSContainerWinControlProducer.Register; - TdxPSDateTimePickerProducer.Register; - TdxPSCustomHotKeyProducer.Register; - TdxPSCustomStaticTextProducer.Register; - TdxPSCustomEditProducer.Register; - TdxPSCustomMemoProducer.Register; - TdxPSCustomComboBoxProducer.Register; - TdxPSCustomCheckBoxProducer.Register; - TdxPSRadioButtonProducer.Register; - - //TdxPSCustomContainerProducer.Register; - TdxPSCustomPanelProducer.Register; - TdxPSCustomGroupBoxProducer.Register; - TdxPSCustomRadioGroupProducer.Register; - - TdxPSTabControlProducer.Register; - TdxPSTabSheetProducer.Register; - TdxPSPageControlProducer.Register; - TdxPSNotebookPageProducer.Register; - TdxPSNotebookProducer.Register; - TdxPSTabbedNotebookPageProducer.Register; - TdxPSTabbedNotebookProducer.Register; - TdxPSScrollingWinControlProducer.Register; - TdxPSCustomFormProducer.Register; - {$IFDEF DELPHI5} - TdxPSCustomFrameProducer.Register; - {$ENDIF} - {$IFDEF DELPHI6} - TdxPSCustomComboBoxExProducer.Register; - {$ENDIF} -end; - -procedure RegisterItems; -begin - TdxReportWinControlHost.Register; - TdxReportNativePrintableControlHost.Register; -end; - -procedure UnregisterAssistants; -begin - TdxPSNativePrintableControlProducerFactory.ReleaseInstance; - TdxPSContainerItemProducerFactory.ReleaseInstance; - TdxPSContainerBuilderFactory.ReleaseInstance; -end; - -procedure UnregisterItems; -begin - TdxReportNativePrintableControlHost.Unregister; - TdxReportWinControlHost.Unregister; -end; - -initialization - RegisterAssistants; - RegisterItems; - - dxPSRegisterContainers(StandardContainers); - -finalization - dxPSUnregisterContainers(StandardContainers); - - UnregisterItems; - UnregisterAssistants; - - FreeAndNil(FInternalComponentPrinter); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSCore.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSCore.pas deleted file mode 100644 index 1318e37a..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSCore.pas +++ /dev/null @@ -1,26019 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSCore; - -interface - -{$I cxVer.inc} - -{$IFNDEF DELPHI6} -{$IFNDEF BCB} -{$L+} // to avoid internal error in Delphi5 -{$ENDIF} -{$ENDIF} - -(*$HPPEMIT '#include *) -{$IFDEF CBUILDER5} - (*$HPPEMIT '#define HRGN unsigned'*) -{$ELSE} - (*$HPPEMIT '#define HRGN int'*) -{$ENDIF} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, StdCtrls, ExtCtrls, - ActiveX, Menus, Forms, ImgList, Types, -{$IFDEF DELPHI5} - Contnrs, -{$ENDIF} - dxCore, cxClasses, cxControls, cxGraphics, - dxBase, dxPSGlbl, dxPSSngltn, dxPSEngn, dxPSESys, dxPSForm, dxBkgnd, - dxPrnPg, dxPgsDlg, dxPrnDlg, dxWrap, cxDrawTextUtils, dxPSFillPatterns; - -type - EdxPrintEngine = class(EdxException); - EdxReportLink = class(EdxPrintEngine); - EdxPSExplorer = class(EdxPrintEngine); - EdxComponentPrinter = class(EdxPrintEngine); - - EdxInvalidStorageVersion = class(EdxComponentPrinter) - private - FVersion: UINT; - public - constructor Create(AVersion: UINT); - property Version: UINT read FVersion write FVersion; - end; - - TCustomdxPSExplorerContextCommand = class; - - IdxPSExplorerContextCommandBuilder = interface - ['{EE36E842-FD6A-4A89-A343-A32828AEFE3D}'] - procedure AddExplorerContextCommand(ACommand: TCustomdxPSExplorerContextCommand); - procedure UpdateExplorerContextCommands; - end; - - IdxPSExplorerContextCommands = interface - ['{DC3A582D-7E33-410F-A235-680A846824D3}'] - procedure BuildCommandSet(ABuilder: IdxPSExplorerContextCommandBuilder); - end; - - IdxPSExplorerContextCommands2 = interface - ['{E4D68CF3-AD07-4220-B892-92C8F9B3F966}'] - procedure FinalizeCommand(ACommand: TCustomdxPSExplorerContextCommand); - procedure InitializeCommand(ACommand: TCustomdxPSExplorerContextCommand); - end; - - IdxReportLinkController = interface - ['{120F53E4-1B09-46EF-B42D-04AB8BBCC374}'] - function GetControlSiteBounds(AControl: TControl): TRect; - end; - - TdxPSReportDocument = class; - TdxPSReportRenderer = class; - TdxReportLinkClass = class of TBasedxReportLink; - TBasedxReportLink = class; - TdxCompositionReportLink = class; - TCustomdxComponentPrinter = class; - TCustomdxPSExplorerTreeContainer = class; - TAbstractdxReportLinkDesigner = class; - TAbstractdxPreviewWindowDesigner = class; - TAbstractdxReportLinkDesignWindow = class; - TdxReportLinkDesignWindowClass = class of TAbstractdxReportLinkDesignWindow; - TBasedxPreviewWindow = class; - - TdxReportVisualItemClass = class of TdxReportVisualItem; - TdxReportVisualItem = class; - TdxReportCellDataClass = class of TAbstractdxReportCellData; - TAbstractdxReportCellData = class; - TdxReportCellClass = class of TdxReportCell; - TdxReportCell = class; - TdxReportCellsClass = class of TdxReportCells; - TdxReportCells = class; - - TdxPSCellBorderClass = class of TdxPSCustomCellBorder; - TdxPSCustomCellBorder = class; - TdxPSCellBorderPainterClass = class of TdxPSCellBorderPainter; - TdxPSCellBorderPainter = class; - - TdxPSReportGroupLookAndFeelClass = class of TdxPSReportGroupLookAndFeel; - TdxPSReportGroupLookAndFeel = class; - TdxPSReportGroupLookAndFeelPainterClass = class of TdxPSReportGroupLookAndFeelPainter; - TdxPSReportGroupLookAndFeelPainter = class; - - - { Data Reader\Writer } - - TdxPSDataReaderClass = class of TdxPSDataReader; - - TdxPSDataReader = class(TReader) - protected - class function SupportsStorageVersion(AVersion: Integer): Boolean; virtual; - public - class procedure Register; virtual; - class procedure Unregister; virtual; - - function ReadCellBorderClass: TdxPSCellBorderClass; - function ReadClass: TClass; - function ReadFillPatternClass: TdxPSFillPatternClass; - function ReadFont(AFont: TFont): TFont; - function ReadGraphicClass: TGraphicClass; - procedure ReadImage(AnImage: TGraphic); - procedure ReadImageList(AnImageList: TCustomImageList); - function ReadLinkClass: TdxReportLinkClass; - function ReadLookAndFeelClass: TdxPSReportGroupLookAndFeelClass; - function ReadPoint: TPoint; - function ReadPSVersion: TdxPSVersion; - function ReadRect: TRect; - procedure SkipBytes(Count: {$IFDEF DELPHI6} Int64 {$ELSE} Integer {$ENDIF}); - end; - - TdxPSDataWriterClass = class of TdxPSDataWriter; - - TdxPSDataWriter = class(TWriter) - protected - class function SupportsStorageVersion(AVersion: Integer): Boolean; virtual; - public - class procedure Register; virtual; - class procedure Unregister; virtual; - - procedure WriteClassName(AClass: TClass); overload; - procedure WriteClassName(AnObject: TObject); overload; - procedure WriteFont(AFont: TFont); - procedure WriteImage(AnImage: TGraphic); - procedure WriteImageList(AnImageList: TCustomImageList); - procedure WritePoint(const Pt: TPoint); - procedure WritePSVersion(const AVersion: TdxPSVersion); - procedure WriteRect(const R: TRect); - end; - - { Report Renderers } - - TdxWindowScalePair = record - Numerator: Integer; - Denominator: Integer; - end; - - TdxContinuedIndexPair = class - public - StartIndex: Integer; - EndIndex: Integer; - end; - - TdxPageOverlayIndexes = class(TList) - private - function GetItem(Index: Integer): Integer; - procedure SetItem(Index, Value: Integer); - public - function Add(AValue: Integer): Integer; - property Items[Index: Integer]: Integer read GetItem write SetItem; default; - end; - - TdxPSReportRenderInfo = class; - - TdxPSPageRenderInfoClass = class of TdxPSPageRenderInfo; - - TdxPSPageRenderInfo = class - private - FIndexPairs: TList; - FIsEmptyPage: Boolean; - FIsEmptyPageCalculated: Boolean; - FOverlays: TList; - FPageIndex: Integer; - FRenderInfo: TdxPSReportRenderInfo; - function GetColIndex: Integer; - function GetFooterBounds: TRect; - function GetHeaderBounds: TRect; - function GetIndexPair(Index: Integer): TdxContinuedIndexPair; - function GetIndexPairCount: Integer; - function GetIsBottomPage: Boolean; - function GetIsEmptyPage: Boolean; - function GetIsTopPage: Boolean; - function GetOverlay(Index: Integer): TdxPageOverlayIndexes; - function GetOverlayCount: Integer; - function GetPrinterPage: TdxPrinterPage; - function GetReportCells: TdxReportCells; - function GetReportLink: TBasedxReportLink; - function GetRowIndex: Integer; - function GetTitleBounds: TRect; - function GetTitleHeight: Integer; - procedure SetIndexPair(Index: Integer; Value: TdxContinuedIndexPair); - - procedure FreeAndNilIndexPairs; - procedure FreeAndNilOverlays; - protected - function AreRectsIntersected(const R1, R2: TRect): Boolean; - - procedure CalculateBounds; virtual; - function CalculateIndexPairCount: Integer; virtual; - procedure CalculateIndexPairs; virtual; - function CalculateIsEmptyPage: Boolean; virtual; - procedure CalculateOffsets; - procedure CalculateOverlayIndexes; - - property IsEmptyPageCalculated: Boolean read FIsEmptyPageCalculated write FIsEmptyPageCalculated; - public - ContentBounds: TRect; - DataOffset: TPoint; - DetailBounds: TRect; - TitleOffset: TPoint; - constructor Create(ARenderInfo: TdxPSReportRenderInfo; APageIndex: Integer); virtual; - destructor Destroy; override; - procedure Calculate; virtual; - - function HasDetails: Boolean; virtual; - function HasFooter: Boolean; virtual; - function HasHeader: Boolean; virtual; - function HasTitle: Boolean; virtual; - - property ColIndex: Integer read GetColIndex; - property FooterBounds: TRect read GetFooterBounds; - property HeaderBounds: TRect read GetHeaderBounds; - property IndexPairCount: Integer read GetIndexPairCount; - property IndexPairs[Index: Integer]: TdxContinuedIndexPair read GetIndexPair write SetIndexPair; - property IsBottomPage: Boolean read GetIsBottomPage; - property IsEmptyPage: Boolean read GetIsEmptyPage; - property IsTopPage: Boolean read GetIsTopPage; - property OverlayCount: Integer read GetOverlayCount; - property Overlays[Index: Integer]: TdxPageOverlayIndexes read GetOverlay; - property PageIndex: Integer read FPageIndex; - property PrinterPage: TdxPrinterPage read GetPrinterPage; - property RenderInfo: TdxPSReportRenderInfo read FRenderInfo; - property ReportCells: TdxReportCells read GetReportCells; - property ReportLink: TBasedxReportLink read GetReportLink; - property RowIndex: Integer read GetRowIndex; - property TitleBounds: TRect read GetTitleBounds; - property TitleHeight: Integer read GetTitleHeight; - end; - - TdxPSReportRenderInfoClass = class of TdxPSReportRenderInfo; - - TdxPSReportRenderInfo = class - private - FBaseContentFont: TFont; - FDelimitersX: TList; - FDelimitersY: TList; - FEmptyPageCount: Integer; - FGridLinesColor: TColor; - FHardDelimitersY: TList; - //FIsTitleHeightCalculated: Boolean; - FLockCounter: Integer; - FPageDelimitersX: TList; - FPageDelimitersY: TList; - FPageRenderInfos: TList; - FReportLink: TBasedxReportLink; - //FTitleHeight: Integer; - function GetBreakPagesByHardDelimiters: Boolean; - function GetDelimiterX(Index: Integer): Integer; - function GetDelimiterXCount: Integer; - function GetDelimiterY(Index: Integer): Integer; - function GetDelimiterYCount: Integer; - function GetEmptyPageCount: Integer; - function GetFooterHeight: Integer; - function GetHeaderHeight: Integer; - function GetLocked: Boolean; - function GetPageDelimiterX(Index: Integer): Integer; - function GetPageDelimiterXCount: Integer; - function GetPageDelimiterY(Index: Integer): Integer; - function GetPageDelimiterYCount: Integer; - function GetPageRenderInfo(Index: Integer): TdxPSPageRenderInfo; - function GetPageRenderInfoCount: Integer; - function GetPrinterPage: TdxPrinterPage; - function GetReportCells: TdxReportCells; - function GetReportHeight: Integer; - function GetReportWidth: Integer; - function GetScaleFactor: Integer; - function GetTitleAdjustOnReportScale: Boolean; - function GetTitleFont: TFont; - function GetTitleText: string; - function GetUseHardVertDelimiters: Boolean; - function GetUseHorzDelimiters: Boolean; - function GetUseVertDelimiters: Boolean; - function GetTitleHeight: Integer; - procedure SetBaseContentFont(Value: TFont); - - function IsNonEmptyPage(const ABounds: TRect): Boolean; - protected - function CalculateEmptyPageCount: Integer; virtual; - procedure CalculateHeaderAndFooterBounds; virtual; - function CalculatePageContentHeight(APageIndex: Integer): Integer; virtual; - function CalculatePageContentWidth(APageIndex: Integer): Integer; virtual; - procedure CalculatePageCount; virtual; - procedure CalculatePageDelimiters; virtual; - function CalculatePageDetailBounds(APageCol, APageRow: Integer): TRect; virtual; - procedure CalculatePageHeaderAndFooterBounds; virtual; - procedure CalculatePageRenderInfos; virtual; - procedure CalculatePageRealAndVirtualIndexes(APageIndex: Integer; out AVirtualPageIndex, ARealPageIndex: Integer); virtual; - //function CalculateTitleHeight: Integer; virtual; - procedure CalculateTitleBounds; virtual; - procedure DoCalculate; virtual; - - function GetNonEmptyPageCount: Integer; virtual; - function GetPageColCount: Integer; virtual; - function GetPageRowCount: Integer; virtual; - function GetPageSize: TPoint; virtual; - function GetPaintSize: TPoint; virtual; - function GetUnitsPerInch: Integer; virtual; - function GetWindowScalePair: TdxWindowScalePair; virtual; - procedure SetUnitsPerInch(Value: Integer); virtual; - - procedure ClearPageRenderInfos; - function CreatePageRenderInfo(APageIndex: Integer): TdxPSPageRenderInfo; virtual; - procedure FreeAndNilPageRenderInfos; - function GetPageRenderInfoClass: TdxPSPageRenderInfoClass; virtual; - procedure Refresh; virtual; - - function HasPageTitle(APageIndex: Integer): Boolean; - function IsHardDelimiter(AValue: Integer): Boolean; - - procedure ReadData(AReader: TdxPSDataReader); virtual; - procedure ReadDelimiters(AReader: TdxPSDataReader); - procedure WriteData(AWriter: TdxPSDataWriter); virtual; - procedure WriteDelimiters(AWriter: TdxPSDataWriter); - - procedure AddPageDelimiterX(AValue: Integer); - procedure AddPageDelimiterY(AValue: Integer); - procedure PageDelimiterXClear; - procedure PageDelimiterYClear; - - procedure AddStandardDelimiters; - procedure EliminateDuplicatesAndSortDelimiters(AList: TList); - procedure GetDelimiters; - procedure MakeDelimiters; - procedure MakeHardDelimiters; - procedure TrancateDelimiters(AList: TList; AValue: Integer); - - function LoMetricRectToInternalUnits(const R: TRect): TRect; - function LoMetricValueToInternalUnits(Value: Integer): Integer; virtual; - function RealPageIndexToVirtualPageIndex(APageIndex: Integer; ATakeIntoAccountEmptyPages: Boolean): Integer; virtual; - function VirtualPageIndexToRealPageIndex(APageIndex: Integer): Integer; virtual; - - property DelimiterXList: TList read FDelimitersX; - property DelimiterYList: TList read FDelimitersY; - property HardDelimiterYList: TList read FHardDelimitersY; - public - CanUseHFOnEveryPageMode: Boolean; - FooterBounds: TRect; - HeaderBounds: TRect; - PageFooterBounds: TRect; - PageHeaderBounds: TRect; - TitleBounds: TRect; - VirtualPageCount: Integer; - - constructor Create(AReportLink: TBasedxReportLink); virtual; - destructor Destroy; override; - - procedure Calculate; - function CalculateTitleHeight: Integer; virtual; - function CanRenderPage(AVirtualPageIndex: Integer): Boolean; virtual; - function IsDrawPageFootNoteOnPage(APageIndex: Integer): Boolean; virtual; - function IsDrawPageTitleOnPage(APageIndex: Integer): Boolean; virtual; - - procedure Lock; - procedure Unlock; - - property BaseContentFont: TFont read FBaseContentFont write SetBaseContentFont; - property BreakPagesByHardDelimiters: Boolean read GetBreakPagesByHardDelimiters; - property DelimitersX[Index: Integer]: Integer read GetDelimiterX; - property DelimiterXCount: Integer read GetDelimiterXCount; - property DelimitersY[Index: Integer]: Integer read GetDelimiterY; - property DelimiterYCount: Integer read GetDelimiterYCount; - property EmptyPageCount: Integer read GetEmptyPageCount; - property FooterHeight: Integer read GetFooterHeight; - property GridLinesColor: TColor read FGridLinesColor write FGridLinesColor; - property HeaderHeight: Integer read GetHeaderHeight; - property Locked: Boolean read GetLocked; - property NonEmptyPageCount: Integer read GetNonEmptyPageCount; - property PageColCount: Integer read GetPageColCount; - property PageDelimitersX[Index: Integer]: Integer read GetPageDelimiterX; - property PageDelimiterXCount: Integer read GetPageDelimiterXCount; - property PageDelimitersY[Index: Integer]: Integer read GetPageDelimiterY; - property PageDelimiterYCount: Integer read GetPageDelimiterYCount; - property PageRenderInfoCount: Integer read GetPageRenderInfoCount; - property PageRenderInfos[Index: Integer]: TdxPSPageRenderInfo read GetPageRenderInfo; - property PageRowCount: Integer read GetPageRowCount; - property PageSize: TPoint read GetPageSize; - property PaintSize: TPoint read GetPaintSize; - property PrinterPage: TdxPrinterPage read GetPrinterPage; - property ReportCells: TdxReportCells read GetReportCells; - property ReportHeight: Integer read GetReportHeight; - property ReportLink: TBasedxReportLink read FReportLink; - property ReportWidth: Integer read GetReportWidth; - property ScaleFactor: Integer read GetScaleFactor; - property TitleAdjustOnReportScale: Boolean read GetTitleAdjustOnReportScale; - property TitleFont: TFont read GetTitleFont; - property TitleHeight: Integer read GetTitleHeight; - property TitleText: string read GetTitleText; - property UnitsPerInch: Integer read GetUnitsPerInch write SetUnitsPerInch; - property UseHardVertDelimiters: Boolean read GetUseHardVertDelimiters; - property UseHorzDelimiters: Boolean read GetUseHorzDelimiters; - property UseVertDelimiters: Boolean read GetUseVertDelimiters; - property WindowScalePair: TdxWindowScalePair read GetWindowScalePair; - end; - - TdxCellCheckPos = (ccpLeft, ccpCenter, ccpRight); - TdxCellEdgeKind = (cekInner, cekOuter); - TdxCellEdgeMode = (cemPattern, cem3DEffects); - TdxCellEdgeStyle = (cesRaised, cesSunken); - TdxCellSide = (csLeft, csTop, csRight, csBottom); - TdxCellSides = set of TdxCellSide; - TdxCellSortOrder = (csoNone, csoUp, csoDown); - TdxCellUpDown = csoUp..csoDown; - TdxCheckButtonEdgeStyle = (cbesNone, cbes3D, cbesSoft3D, cbesBoldFlat, cbesUltraFlat, cbesSingle); - TdxGraphicDrawMode = (gdmNone, gdmCenter, gdmStretch, gdmStretchProportional, gdmCenterAndStretchProportional); - TdxImageLayout = (ilImageTopLeft, ilImageTopCenter, ilImageTopRight, ilImageCenterLeft, - ilImageCenterCenter, ilImageCenterRight, ilImageBottomLeft, ilImageBottomCenter, ilImageBottomRight); - - TdxCellImageBuffering = (cibDefault, cibNone, cibAlways); -{$IFDEF BCB} - TdxCellImageActualBuffering = TdxCellImageBuffering; -{$ELSE} - TdxCellImageActualBuffering = cibNone..cibAlways; -{$ENDIF} - - TdxPSCellBorderSalientType = (bstOuter, bstInner); - - TdxPSTreeLineMode = (tlmNone, tlmVertical, tlmCross, tlmTopRightCorner, tlmBottomRightCorner); - TdxPSTreeLinePart = (tlpTop, tlpRight, tlpBottom); - TdxPSTreeLineParts = set of TdxPSTreeLinePart; - TdxPSTreeLineStyle = (tlsSolid, tlsDot); - - TdxPSCellBorderPainter = class - private - FItem: TdxReportVisualItem; - FRenderer: TdxPSReportRenderer; - function GetLineThickness: Integer; - protected - class function GetBorderBounds(const R: TRect; ASide: TdxCellSide; ALineThickness: Integer): TRect; virtual; - class function GetBottomShadowBounds(const R: TRect; AShadowDepth: Integer): TRect; - class function GetBottomShadowRestSpaceBounds(const R: TRect; AShadowDepth: Integer): TRect; - class function GetRightShadowBounds(const R: TRect; AShadowDepth: Integer): TRect; - class function GetRightShadowRestSpaceBounds(const R: TRect; AShadowDepth: Integer): TRect; - class procedure InflateRect(var R: TRect; ASides: TdxCellSides; ALineThickness: Integer); - public - constructor Create(ARenderer: TdxPSReportRenderer); virtual; - - class procedure DrawFrame(DC: HDC; R: TRect; ASides: TdxCellSides; - ATLBrush, ABRBrush: HBRUSH; ALineThickness: Integer; AThickness: Integer = 1); - class procedure DrawShadow(DC: HDC; const R: TRect; AShadowDepth: Integer; - AShadowBrush, ARestSpaceBrush: HBRUSH); - procedure Paint(DC: HDC); virtual; - - function BorderClass: TdxPSCellBorderClass; overload; virtual; - function Item: TdxReportVisualItem; overload; virtual; - function Renderer: TdxPSReportRenderer; overload; virtual; - - property LineThickness: Integer read GetLineThickness; - end; - - TdxPSCustomCellBorder = class(TPersistent) - protected - class function Edge3DSoft: Boolean; virtual; - class function Edge3DStyle: TdxCellEdgeStyle; virtual; - class function EdgeMode: TdxCellEdgeMode; virtual; - - class function GetBorderEdgeSalient(ASide: TdxCellSide; ASalient: TdxPSCellBorderSalientType): Integer; virtual; - class function GetPainterClass: TdxPSCellBorderPainterClass; virtual; - public - class procedure Register; virtual; - class procedure Unregister; virtual; - - class function Solid: Boolean; virtual; - class function Thickness: Integer; virtual; - end; - - TdxPSCellNullBorderPainter = class(TdxPSCellBorderPainter) - public - procedure Paint(DC: HDC); override; - end; - - TdxPSCellNullBorder = class(TdxPSCustomCellBorder) - protected - class function GetPainterClass: TdxPSCellBorderPainterClass; override; - public - class function Thickness: Integer; override; - end; - - TdxPSCellFlatBorder = class(TdxPSCustomCellBorder) - protected - class function GetPainterClass: TdxPSCellBorderPainterClass; override; - end; - - TdxPSCellBoldFlatBorder = class(TdxPSCellFlatBorder) - public - class function Thickness: Integer; override; - end; - - TdxPSCellUltraFlatBorder = class(TdxPSCellFlatBorder) - public - class function Thickness: Integer; override; - end; - - TdxPSCell3DBorderClass = class of TdxPSCustomCell3DBorder; - - TdxPSCell3DBorderPainter = class(TdxPSCellBorderPainter) - public - class procedure Draw3DFrame(DC: HDC; R: TRect; ASides: TdxCellSides; - AOuterTLBrush, AOuterBRBrush, AInnerTLBrush, AInnerBRBrush: HBRUSH; - ALineThickness: Integer); overload; virtual; - class procedure Draw3DFrame(DC: HDC; R: TRect; ASides: TdxCellSides; - ACellBorders: TdxPSCell3DBorderClass; ALineThickness: Integer); overload; virtual; - procedure Paint(DC: HDC); override; - - function BorderClass: TdxPSCell3DBorderClass; reintroduce; overload; - end; - - TdxPSCustomCell3DBorder = class(TdxPSCustomCellBorder) - protected - class function EdgeMode: TdxCellEdgeMode; override; - - class function GetBorderEdgeSalient(ASide: TdxCellSide; ASalient: TdxPSCellBorderSalientType): Integer; override; - class function GetPainterClass: TdxPSCellBorderPainterClass; override; - public - class function Solid: Boolean; override; - class function Thickness: Integer; override; - - class function BottomRightInnerBrush: HBRUSH; virtual; - class function BottomRightInnerColor: TColor; virtual; - class function BottomRightOuterBrush: HBRUSH; virtual; - class function BottomRightOuterColor: TColor; virtual; - class function TopLeftInnerBrush: HBRUSH; virtual; - class function TopLeftInnerColor: TColor; virtual; - class function TopLeftOuterBrush: HBRUSH; virtual; - class function TopLeftOuterColor: TColor; virtual; - end; - - TdxPSCellRaisedBorder = class(TdxPSCustomCell3DBorder) - protected - class function Edge3DSoft: Boolean; override; - class function Edge3DStyle: TdxCellEdgeStyle; override; - public - class function BottomRightInnerBrush: HBRUSH; override; - class function BottomRightInnerColor: TColor; override; - class function BottomRightOuterBrush: HBRUSH; override; - class function BottomRightOuterColor: TColor; override; - class function TopLeftInnerBrush: HBRUSH; override; - class function TopLeftInnerColor: TColor; override; - class function TopLeftOuterBrush: HBRUSH; override; - class function TopLeftOuterColor: TColor; override; - end; - - TdxPSCellRaisedSoftBorder = class(TdxPSCellRaisedBorder) - protected - class function Edge3DSoft: Boolean; override; - public - class function BottomRightInnerBrush: HBRUSH; override; - class function BottomRightInnerColor: TColor; override; - end; - - TdxPSCellSunkenBorder = class(TdxPSCustomCell3DBorder) - protected - class function Edge3DSoft: Boolean; override; - class function Edge3DStyle: TdxCellEdgeStyle; override; - public - class function BottomRightInnerBrush: HBRUSH; override; - class function BottomRightInnerColor: TColor; override; - class function BottomRightOuterBrush: HBRUSH; override; - class function BottomRightOuterColor: TColor; override; - class function TopLeftInnerBrush: HBRUSH; override; - class function TopLeftInnerColor: TColor; override; - class function TopLeftOuterBrush: HBRUSH; override; - class function TopLeftOuterColor: TColor; override; - end; - - TdxPSCellSunkenSoftBorder = class(TdxPSCellSunkenBorder) - protected - class function Edge3DSoft: Boolean; override; - public - class function BottomRightInnerBrush: HBRUSH; override; - class function BottomRightInnerColor: TColor; override; - class function TopLeftInnerBrush: HBRUSH; override; - class function TopLeftInnerColor: TColor; override; - end; - - TdxPSCellTwistedBorderPainter = class(TdxPSCell3DBorderPainter) - public - {$IFDEF BCB} - class procedure Draw3DFrame(DC: HDC; R: TRect; ASides: TdxCellSides; - ACellBorders: TdxPSCell3DBorderClass; ALineThickness: Integer); override; - {$ENDIF} - class procedure Draw3DFrame(DC: HDC; R: TRect; ASides: TdxCellSides; - AOuterTLBrush, AOuterBRBrush, AInnerTLBrush, AInnerBRBrush: HBRUSH; ALineThickness: Integer); override; - end; - - TdxPSCellTwistedBorder = class(TdxPSCustomCell3DBorder) - protected - class function GetPainterClass: TdxPSCellBorderPainterClass; override; - end; - - TdxPSCellEtchedBorder = class(TdxPSCellTwistedBorder) - public - class function BottomRightInnerBrush: HBRUSH; override; - class function BottomRightInnerColor: TColor; override; - class function BottomRightOuterBrush: HBRUSH; override; - class function BottomRightOuterColor: TColor; override; - class function TopLeftInnerBrush: HBRUSH; override; - class function TopLeftInnerColor: TColor; override; - class function TopLeftOuterBrush: HBRUSH; override; - class function TopLeftOuterColor: TColor; override; - end; - - TdxPSCellBumpedBorder = class(TdxPSCellTwistedBorder) - public - class function BottomRightInnerBrush: HBRUSH; override; - class function BottomRightInnerColor: TColor; override; - class function BottomRightOuterBrush: HBRUSH; override; - class function BottomRightOuterColor: TColor; override; - class function TopLeftInnerBrush: HBRUSH; override; - class function TopLeftInnerColor: TColor; override; - class function TopLeftOuterBrush: HBRUSH; override; - class function TopLeftOuterColor: TColor; override; - end; - - TdxPSColorBorderPainter = class(TdxPSCellBorderPainter) - protected - function GetSideColor(ASide: TdxCellSide): TColor; virtual; - public - procedure Paint(DC: HDC); override; - property SideColor[ASide: TdxCellSide]: TColor read GetSideColor; - end; - - TdxPSColorBorder = class(TdxPSCellUltraFlatBorder{TdxPSCustomCellBorder}) - protected - class function GetPainterClass: TdxPSCellBorderPainterClass; override; - end; - - TdxPSBackgroundBitmapPool = class - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TBitmap; - protected - procedure ReadData(AReader: TdxPSDataReader); - procedure WriteData(AWriter: TdxPSDataWriter); - public - constructor Create; - destructor Destroy; override; - procedure Assign(Source: TdxPSBackgroundBitmapPool); - - function Add(ABitmap: TBitmap): Integer; - procedure Clear; - procedure Delete(AnIndex: Integer); - function Find(ABitmap: TBitmap; out AnIndex: Integer): Boolean; - - property Count: Integer read GetCount; - property Items[Index: Integer]: TBitmap read GetItem; default; - end; - - TdxPSBrushPoolItem = class - private - FBrush: HBRUSH; - FColor: TColor; - function GetBrush: HBRUSH; - public - constructor Create(AColor: TColor); - destructor Destroy; override; - - property Brush: HBRUSH read GetBrush; - property Color: TColor read FColor; - end; - - TdxPSReportBrushPool = class - private - FItems: TList; - function GetBrush(AColor: TColor): HBRUSH; - function GetCount: Integer; - function GetItem(Index: Integer): TdxPSBrushPoolItem; - protected - function Add(AColor: TColor): Integer; - public - constructor Create; - destructor Destroy; override; - - procedure Clear; - function IndexOf(AColor: TColor): Integer; - - property Brushes[AColor: TColor]: HBRUSH read GetBrush; default; - property Count: Integer read GetCount; - property Items[Index: Integer]: TdxPSBrushPoolItem read GetItem; - end; - - TdxPSReportRendererClass = class of TdxPSReportRenderer; - - TdxPSFontPoolItem = class - private - FFont: TFont; - FOriginalSize: Integer; - procedure SetFont(Value: TFont); - public - constructor Create(AFont: TFont); - destructor Destroy; override; - - property Font: TFont read FFont write SetFont; - property OriginalSize: Integer read FOriginalSize write FOriginalSize; - end; - - TdxPSReportFontPool = class - private - FItems: TList; - function GetCount: Integer; - function GetFont(Index: Integer): TFont; - function GetItem(Index: Integer): TdxPSFontPoolItem; - protected - FLocked: Boolean; - function CreateFont(AFont: TFont): Integer; - procedure FontChanged(Sender: TObject); - procedure PrepareFonts(UPI: Integer); - - procedure ReadData(AReader: TdxPSDataReader); - procedure WriteData(AWriter: TdxPSDataWriter); - public - constructor Create; - destructor Destroy; override; - - function Add(AFont: TFont): Integer; - procedure Clear; - function IndexOf(AFont: TFont): Integer; - - property Count: Integer read GetCount; - property Fonts[Index: Integer]: TFont read GetFont; default; - property Items[Index: Integer]: TdxPSFontPoolItem read GetItem; - end; - - TdxPSCachedGraphicInfo = class - protected - Renderer: TdxPSReportRenderer; - SourceGraphic, PreparedGraphic: TGraphic; - UnitsPerInch: Integer; - UnitsPerPixel: Integer; - ViewPortRect: TRect; - ZoomFactor: Integer; - procedure SaveModeInfo; - public - constructor Create(ARenderer: TdxPSReportRenderer); virtual; - function Check(ASourceGraphic: TGraphic; ABitmap: TBitmap; var APreparedGraphic: TGraphic): Boolean; - procedure Clear; - end; - - TdxPSRenderStage = (rsFirstPass, rsSecondPass); - TdxPSRenderStages = set of TdxPSRenderStage; - - TdxPSReportRenderer = class - private - FBorderColor: TColor; - FBorderPainters: TList; - FBrushPool: TdxPSReportBrushPool; - FCachedGraphicInfo: TdxPSCachedGraphicInfo; - FCanvas: TCanvas; - FCheckBitmap: TBitmap; - FDC: HDC; - FDrawBitmap: TBitmap; - FDrawMask: TBitmap; - FGroupLookAndFeelPainters: TList; - FHFStrings: TStrings; - FIsRendering: Boolean; - FLineThickness: Integer; - FMarlettFont10: TFont; - FMarlettFont8: TFont; - FPPI: Integer; - FPrevMode: Integer; - FPrevWindowExt: TSize; - FPrevWindowOrg: TPoint; - FPrevViewPortExt: TSize; - FPrevViewPortOrg: TPoint; - FRenderingPageIndex: Integer; // virtual index - FRenderStage: TdxPSRenderStages; - FReportLink: TBasedxReportLink; - FSaveColor: TColor; - FSaveFont: TFont; - FSavePixelsPerInch: Integer; - FSymbolFont: TFont; - FUnitsPerPixel: Integer; - FViewPortRect: TRect; - FZoomFactor: Integer; - function GetBorderPainterItem(Index: Integer): TdxPSCellBorderPainter; - function GetBorderPainterCount: Integer; - function GetGroupLookAndFeelPainter(Index: Integer): TdxPSReportGroupLookAndFeelPainter; - function GetGroupLookAndFeelPainterCount: Integer; - function GetHalfLineThickness: Integer; - function GetIsPrinting: Boolean; - function GetPageRenderInfo: TdxPSPageRenderInfo; - function GetRenderInfo: TdxPSReportRenderInfo; - function GetReportCells: TdxReportCells; - protected - function CustomDrawReportItem(AnItem: TAbstractdxReportCellData): Boolean; - procedure Get3DBorderBrushes(AnItem: TdxReportVisualItem; var AOuterTLBrush, AOuterBRBrush, AInnerTLBrush, AInnerBRBrush: HBRUSH); - procedure Get3DBorderColors(AnItem: TdxReportVisualItem; var AOuterTLColor, AOuterBRColor, AInnerTLColor, AInnerBRColor: TColor); - - function GetUnitsPerInch: Integer; virtual; - - function CreateBorderPainter(AClass: TdxPSCellBorderPainterClass): TdxPSCellBorderPainter; - function FindBorderPainter(AClass: TdxPSCellBorderPainterClass): TdxPSCellBorderPainter; - procedure FreeAndNilBorderPainters; - - function CreateReportGroupLookAndFeelPainter(AClass: TdxPSReportGroupLookAndFeelPainterClass): TdxPSReportGroupLookAndFeelPainter; - function FindReportGroupLookAndFeelPainter(AClass: TdxPSReportGroupLookAndFeelPainterClass): TdxPSReportGroupLookAndFeelPainter; - procedure FreeAndNilReportGroupLookAndFeelPainters; - - procedure PrepareCanvasForCustomDraw(AFont: TFont; AColor: TColor); - procedure PrepareFonts; - procedure PrepareGDIObjects; virtual; - procedure PrepareLogicalCoordinates; virtual; - procedure PrepareLogicalUnits; virtual; - function PreparedPageIndex(APageIndex: Integer): Integer; - procedure PrepareRenderPage; virtual; - procedure PrepareWindow; virtual; - procedure PrepareViewPort; virtual; - procedure RenderCell(ACell: TdxReportCell; const OriginRect: TRect); - procedure RenderDelimiters; - procedure RenderEntirePage(ARealPageIndex: Integer); virtual; - procedure RenderPageContent; virtual; - procedure RenderPageContentPart(ACell: TdxReportCell;StartIndex, EndIndex: Integer; const OriginRect: TRect); - procedure RenderPageOverlay(AnOverlayIndex: Integer; AnOverlay: TdxPageOverlayIndexes; const OriginRect: TRect); virtual; - procedure RenderPageBackground(ARealPageIndex: Integer); virtual; - procedure RenderPageFooter(ARealPageIndex: Integer); virtual; - procedure RenderPageHeader(ARealPageIndex: Integer); virtual; - procedure RenderPageHeaderOrFooter(HF: TCustomdxPageObject; APageIndex: Integer; ARect: TRect); virtual; - procedure RenderPageHeaderOrFooterContent(HF: TCustomdxPageObject; APageIndex: Integer; ARect: TRect; - ATitleParts: TdxPageTitleParts; ADrawBackground: Boolean); virtual; - procedure RenderPageHeaderOrFooterContentPart(ATitlePart: TdxPageTitlePart; AStrings: TStrings; - ATextAlignY: TcxTextAlignY; ALineHeight, ADestWidth, ADestHeight: Integer; const ARect: TRect); - procedure RenderPageTitleContent(const AText: string; ARect: TRect; ATextAlignX: TcxTextAlignX; - ATextAlignY: TcxTextAlignY; AColor: TColor; AFont: TFont; ATransparent: Boolean); virtual; - procedure RenderPageTitle; virtual; - procedure RestoreMapMode; virtual; - procedure SaveMapMode; virtual; - procedure UnprepareCanvasForCustomDraw; - procedure UnprepareGDIObjects; virtual; - procedure UnprepareLogicalUnits; virtual; - procedure UnprepareRenderPage; virtual; - - property BorderPainterCount: Integer read GetBorderPainterCount; - property BorderPainters[Index: Integer]: TdxPSCellBorderPainter read GetBorderPainterItem; - property BrushPool: TdxPSReportBrushPool read FBrushPool; - property CachedGraphicInfo: TdxPSCachedGraphicInfo read FCachedGraphicInfo; - property GroupLookAndFeelPainterCount: Integer read GetGroupLookAndFeelPainterCount; - property GroupLookAndFeelPainters[Index: Integer]: TdxPSReportGroupLookAndFeelPainter read GetGroupLookAndFeelPainter; - public - constructor Create(AReportLink: TBasedxReportLink); virtual; - destructor Destroy; override; - - function CalcTextHeight(DC: HDC; const AText: string; AWordBreak: Boolean; - AFont: TFont = nil; ABaseWidth: Integer = -1): Integer; - function CalcTextLineCount(DC: HDC; const AText: string; AFont: TFont = nil; - ABaseWidth: Integer = -1): Integer; - function CalcTextPatternHeight(DC: HDC; AFont: TFont = nil): Integer; - function CalcTextRect(DC: HDC; const AText: string; var ARect: TRect; - AWordBreak: Boolean; AFont: TFont = nil): Integer; overload; - function CalcTextRect(DC: HDC; const AText: string; var ARect: TRect; - AFormat: DWORD; AFont: TFont = nil): Integer; overload; - function CalcTextWidth(DC: HDC; const AText: string; AFont: TFont = nil): Integer; - - procedure DrawCheckBox(DC: HDC; var R: TRect; AChecked, AEnabled, AIsRadio: Boolean; - AEdgeStyle: TdxCheckButtonEdgeStyle; ABorderColor: TColor = clWindowText); virtual; - procedure DrawEdge(DC: HDC; var R: TRect; AEdgeMode: TdxCellEdgeMode; - AEdge3DEdge: TdxCellEdgeStyle; ASides: TdxCellSides; ASoft: Boolean; - ABorderColor: TColor = -1); virtual; - procedure DrawEllipse(DC: HDC; R: TRect; AForeColor, ABackColor: TColor; - APattern: TdxPSFillPatternClass; ABorderColor: TColor; - ABorderThickness: Integer = 1); virtual; - procedure DrawExpandButton(DC: HDC; var R: TRect; - AExpanded, ADrawBorder, AEdge3D, AEdge3DSoft, AShadow, AFillInterior: Boolean; - ABorderColor, AInteriorColor: TColor); virtual; - procedure DrawGlyph(DC: HDC; const R: TRect; AGlyph: Byte); // Draw indvidual glyph from Font (used to render SortMark, ExpandButton, CheckBox Glyphs and so on) - procedure DrawGraphic(DC: HDC; var R: TRect; const AClipRect: TRect; - AImageList: TCustomImageList; AImageIndex: Integer; AGraphic: TGraphic; - AGraphicTransparent, ATransparent: Boolean; AColor: TColor); virtual; - procedure DrawGraphicEx(DC: HDC; R: TRect; const AClipRect: TRect; - AImageList: TCustomImageList; AImageIndex: Integer; AGraphic: TGraphic; - AGraphicTransparent, ATransparent: Boolean; AColor, ABkColor: TColor; - APattern: TdxPSFillPatternClass; AnActualImageBuffering: TdxCellImageActualBuffering = cibAlways); virtual; - procedure DrawRectangle(DC: HDC; R: TRect; AForeColor, ABackColor: TColor; - AContentPattern: TdxPSFillPatternClass; ABorderColor: TColor; - ABorderThickness: Integer = 1); virtual; - procedure DrawRoundRect(DC: HDC; R: TRect; AnEllipseWidth, AnEllipseHeight: Integer; - AForeColor, ABackColor: TColor; AContentPattern: TdxPSFillPatternClass; - ABorderColor: TColor; ABorderThickness: Integer = 1); virtual; - procedure DrawSortMark(DC: HDC; var R: TRect; ASortOrder: TdxCellSortOrder; AMono: Boolean); virtual; - procedure DrawText(DC: HDC; var R: TRect; AMaxLineCount: Integer; - ALeftIndent, ARightIndent: Integer; const AText: string; AFont: TFont; - ABkColor: TColor; ATextAlignX: TcxTextAlignX; ATextAlignY: TcxTextAlignY; - AFillBackground, AMultiline, AEndEllipsis: Boolean; APreventLeftTextExceed: Boolean = True; - APreventTopTextExceed: Boolean = True; AHidePrefix: Boolean = True); - procedure DrawTextEx(DC: HDC; var R: TRect; AMaxLineCount: Integer; - ALeftIndent, ARightIndent: Integer; const AText: string; AFont: TFont; AFormat: DWORD); - function MakeTextFormat(ATextAlignX: TcxTextAlignX; ATextAlignY: TcxTextAlignY; - AMultiline, AEndEllipsis, APreventLeftTextExceed, APreventTopTextExceed, AHidePrefix: Boolean): DWORD; - procedure FillEllipse(DC: HDC; const R: TRect; AColor: TColor); virtual; - procedure FillEllipseEx(DC: HDC; const R: TRect; AForeColor, ABackColor: TColor; APattern: TdxPSFillPatternClass); virtual; - procedure FillRect(DC: HDC; const R: TRect; AColor: TColor); virtual; - procedure FillRectEx(DC: HDC; const R: TRect; AForeColor, ABackColor: TColor; APattern: TdxPSFillPatternClass); virtual; - procedure FillRoundRect(DC: HDC; const R: TRect; - AnEllipseWidth, AnEllipseHeight: Integer; AColor: TColor); virtual; - procedure FillRoundRectEx(DC: HDC; const R: TRect; AnEllipseWidth, AnEllipseHeight: Integer; - AForeColor, ABackColor: TColor; APattern: TdxPSFillPatternClass); virtual; - procedure FillRgn(DC: HDC; Rgn: HRGN; AColor: TColor); virtual; - procedure FillRgnEx(DC: HDC; Rgn: HRGN; AForeColor, ABackColor: TColor; APattern: TdxPSFillPatternClass); virtual; - procedure FrameEllipse(DC: HDC; R: TRect; AColor: TColor; AThickness: Integer = 1); - procedure FrameRect(DC: HDC; R: TRect; AColor: TColor; ASides: TdxCellSides = [csLeft..csBottom]; - AThickness: Integer = 1); virtual; - procedure FrameRoundRect(DC: HDC; R: TRect; AnEllipseWidth, AnEllipseHeight: Integer; - AColor: TColor; AThickness: Integer = 1); virtual; - - function GetBorderPainter(AClass: TdxPSCellBorderPainterClass): TdxPSCellBorderPainter; - function GetBrushByColor(AColor: TColor): HBRUSH; - function GetPatternBrush(APattern: TdxPSFillPatternClass; AColor: TColor): HBRUSH; - function GetReportGroupLookAndFeelPainter(AClass: TdxPSReportGroupLookAndFeelPainterClass): TdxPSReportGroupLookAndFeelPainter; - - function ExcludeClipRect(const R: TRect): Integer; - function GetClipRgn: HRGN; - function IntersectClipRect(const R: TRect): HRGN; - procedure RestoreClipRgn(var Rgn: HRGN); - - procedure RenderPage(ACanvas: TCanvas; const APageBounds: TRect; - APageIndex, AContinuousPageIndex, AZoomFactor: Integer); virtual; - - property BorderColor: TColor read FBorderColor; - property Canvas: TCanvas read FCanvas write FCanvas; - property DC: HDC read FDC write FDC; - property HalfLineThickness: Integer read GetHalfLineThickness; - property IsPrinting: Boolean read GetIsPrinting; - property IsRendering: Boolean read FIsRendering; - property LineThickness: Integer read FLineThickness write FLineThickness; - property MarlettFont10: TFont read FMarlettFont10; - property MarlettFont8: TFont read FMarlettFont8; - property PageRenderInfo: TdxPSPageRenderInfo read GetPageRenderInfo; - property PPI: Integer read FPPI write FPPI; // PixelsPerInch for current DC - property RenderInfo: TdxPSReportRenderInfo read GetRenderInfo; - property RenderingPageIndex: Integer read FRenderingPageIndex; // virtual - property RenderStage: TdxPSRenderStages read FRenderStage; - property ReportCells: TdxReportCells read GetReportCells; - property ReportLink: TBasedxReportLink read FReportLink; - property SymbolFont: TFont read FSymbolFont; - property UnitsPerInch: Integer read GetUnitsPerInch; - property UnitsPerPixel: Integer read FUnitsPerPixel write FUnitsPerPixel; - property ViewPortRect: TRect read FViewPortRect; - property ZoomFactor: Integer read FZoomFactor; - end; - - { Report Items } - - TdxReportItemClass = class of TdxReportItem; - - TdxReportItem = class(TPersistent) - private - FData: Integer; - FParent: TdxReportCell; - function GetIndex: Integer; - function GetReportCells: TdxReportCells; virtual; - procedure SetIndex(Value: Integer); - procedure SetParent(Value: TdxReportCell); - protected - function AsCell: TdxReportCell; - function GetTopLevelParent: TdxReportCell; - class function IsCell: Boolean; virtual; - - procedure ReadData(AReader: TdxPSDataReader); virtual; - procedure WriteData(AWriter: TdxPSDataWriter); virtual; - class function Serializable: Boolean; virtual; - public - constructor Create(AParent: TdxReportCell); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - class function ReportItemClass: TdxReportItemClass; - - class procedure Register; virtual; - class procedure Unregister; virtual; - - function Clone(AParent: TdxReportCell): TdxReportItem; - function GetNextSibling: TdxReportItem; - function GetPrevSibling: TdxReportItem; - function HasParent: Boolean; - function IsFirstItem: Boolean; - function IsLastItem: Boolean; - - property Data: Integer read FData write FData; - property Index: Integer read GetIndex write SetIndex; - property Parent: TdxReportCell read FParent write SetParent; - property ReportCells: TdxReportCells read GetReportCells; - property TopLevelParent: TdxReportCell read GetTopLevelParent; - end; - - TdxReportVisualItem = class(TdxReportItem) - private - FBackgroundBitmapIndex: Integer; - FBorderClass: TdxPSCellBorderClass; - FBorderColor: TColor; - FBoundsRect: TRect; - FCellSideColors: array[TdxCellSide] of TColor; - FColor: TColor; - FFontIndex: Integer; - FFormat: DWORD; - function GetAbsoluteOrigin: TPoint; - function GetAbsoluteRect: TRect; - function GetBackgroundBitmap: TBitmap; - function GetBackgroundBitmapHeight: Integer; - function GetBackgroundBitmapPool: TdxPSBackgroundBitmapPool; - function GetBackgroundBitmapTileOrigin: TPoint; - function GetBackgroundBitmapTileStartIndexX: Integer; - function GetBackgroundBitmapTileStartIndexY: Integer; - function GetBackgroundBitmapTileStopIndexX: Integer; - function GetBackgroundBitmapTileStopIndexY: Integer; - function GetBackgroundBitmapWidth: Integer; - function GetBorderBrush: HBRUSH; - function GetBorderColor: TColor; - function GetCellSides: TdxCellSides; - function GetCellSideColors(ASide: TdxCellSide): TColor; - function GetContentBrush: HBRUSH; - function GetEdge3DSoft: Boolean; - function GetEdge3DStyle: TdxCellEdgeStyle; - function GetEdgeMode: TdxCellEdgeMode; - function GetExcludeFromClipRgn: Boolean; - function GetFont: TFont; - function GetHeight: Integer; - function GetIsPrinting: Boolean; - function GetLeft: Integer; - function GetLineThickness: Integer; - function GetOrigin: TPoint; - function GetParentBrush: HBRUSH; - function GetParentColor: TColor; - function GetRenderer: TdxPSReportRenderer; - function GetShadowBrush: HBRUSH; - function GetShowShadow: Boolean; - function GetTop: Integer; - function GetTransparent: Boolean; - function GetWidth: Integer; - function GetVisible: Boolean; - procedure SetBackgroundBitmapIndex(Value: Integer); - procedure SetBorderClass(Value: TdxPSCellBorderClass); - procedure SetBoundsRect(const Value: TRect); - procedure SetCellSides(Value: TdxCellSides); - procedure SetCellSideColors(ASide: TdxCellSide; AValue: TColor); - procedure SetColor(Value: TColor); - procedure SetEdge3DSoft(Value: Boolean); - procedure SetEdge3DStyle(Value: TdxCellEdgeStyle); - procedure SetEdgeMode(Value: TdxCellEdgeMode); - procedure SetExcludeFromClipRgn(Value: Boolean); - procedure SetFont(Value: TFont); - procedure SetFormat(Value: DWORD); - procedure SetHeight(Value: Integer); - procedure SetLeft(Value: Integer); - procedure SetOrigin(const Value: TPoint); - procedure SetShowShadow(Value: Boolean); - procedure SetTop(Value: Integer); - procedure SetTransparent(Value: Boolean); - procedure SetWidth(Value: Integer); - procedure SetVisible(Value: Boolean); - protected - procedure BoundsChanged; virtual; - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); virtual; - procedure DoExcludeFromClipRgn(DC: HDC; const R: TRect; var AResult: Integer); - - function GetBackgroundBitmapTileBounds(Col, Row: Integer): TRect; virtual; - function GetBackgroundBounds(DC: HDC): TRect; virtual; - function GetBorderClass: TdxPSCellBorderClass; virtual; - function GetBorderEdgeBounds(ASide: TdxCellSide; const AOuterRect: TRect): TRect; virtual; - function GetBorderEdgeClass(ASide: TdxCellSide): TdxPSCellBorderClass; virtual; - function GetBorderEdgeSalient(ASide: TdxCellSide; ASalient: TdxPSCellBorderSalientType): Integer; virtual; - function GetBorderEdgeThickness(ASide: TdxCellSide): Integer; virtual; - function GetBorderBounds(DC: HDC): TRect; virtual; - - function GetBorderOuterBoundsRelativeTo(DC: HDC; const R: TRect): TRect; - function GetInnerBoundsRelativeTo(DC: HDC; const R: TRect): TRect; - function GetOuterBoundsRelativeTo(DC: HDC; const R: TRect): TRect; - - function GetBorderPainter: TdxPSCellBorderPainter; - function GetBorderPainterClass: TdxPSCellBorderPainterClass; virtual; - procedure InitBorderPainter(ABorderPainter: TdxPSCellBorderPainter); virtual; - function HasBorderColoration: Boolean; virtual; - - function GetFormatBit(ABit: DWORD): Boolean; - procedure SetFormatBit(ABit: DWORD; Value: Boolean); - - function GetContentBkColor: TColor; virtual; - function GetContentPattern: TdxPSFillPatternClass; virtual; - function GetShadowColor: TColor; virtual; - function GetShadowDepth: Integer; virtual; - procedure SetContentBkColor(Value: TColor); virtual; - procedure SetContentPattern(Value: TdxPSFillPatternClass); virtual; - procedure SetFontIndex(Value: Integer); virtual; - procedure SetShadowColor(Value: TColor); virtual; - procedure SetShadowDepth(Value: Integer); virtual; - - function IsBackgroundBitmapDrawn: Boolean; virtual; - function IsBackgroundDrawn: Boolean; virtual; - function IsBordersDrawn: Boolean; virtual; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property BackgroundBitmapHeight: Integer read GetBackgroundBitmapHeight; - property BackgroundBitmapTileBounds[Col, Row: Integer]: TRect read GetBackgroundBitmapTileBounds; - property BackgroundBitmapTileOrigin: TPoint read GetBackgroundBitmapTileOrigin; - property BackgroundBitmapTileStartIndexX: Integer read GetBackgroundBitmapTileStartIndexX; - property BackgroundBitmapTileStartIndexY: Integer read GetBackgroundBitmapTileStartIndexY; - property BackgroundBitmapTileStopIndexX: Integer read GetBackgroundBitmapTileStopIndexX; - property BackgroundBitmapTileStopIndexY: Integer read GetBackgroundBitmapTileStopIndexY; - property BackgroundBitmapWidth: Integer read GetBackgroundBitmapWidth; - - property Format: DWORD read FFormat write SetFormat; - property IsPrinting: Boolean read GetIsPrinting; - property LineThickness: Integer read GetLineThickness; - property Renderer: TdxPSReportRenderer read GetRenderer; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - - procedure AdjustContent(DC: HDC); virtual; - - procedure DrawBackground(DC: HDC); virtual; - procedure DrawBackgroundBitmap(DC: HDC); virtual; - procedure DrawBackgroundBitmapTile(DC: HDC; const Rect: TRect); virtual; - procedure DrawBackgroundRect(DC: HDC; const R: TRect); - procedure DrawBorders(DC: HDC); virtual; - - function GetBorderOuterBounds(DC: HDC): TRect; virtual; - function GetInnerBounds(DC: HDC): TRect; virtual; - function GetOuterBounds(DC: HDC): TRect; virtual; - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); virtual; - - function CalculateLineCount(DC: HDC): Integer; virtual; - - function MeasureBordersHeight(DC: HDC): Integer; virtual; - function MeasureBordersWidth(DC: HDC): Integer; virtual; - function MeasureContentHeight(DC: HDC): Integer; virtual; - function MeasureContentWidth(DC: HDC): Integer; virtual; - function MeasureFontHeight(DC: HDC): Integer; virtual; - function MeasureHeight(DC: HDC): Integer; virtual; - function MeasureWidth(DC: HDC): Integer; virtual; - - // for backward compatibility - class function MapBorderClass(AEdgeMode: TdxCellEdgeMode; AEdgeStyle: TdxCellEdgeStyle; ASoft: Boolean): TdxPSCellBorderClass; - - property AbsoluteOrigin: TPoint read GetAbsoluteOrigin; - property AbsoluteRect: TRect read GetAbsoluteRect; - property BackgroundBitmap: TBitmap read GetBackgroundBitmap; - property BackgroundBitmapIndex: Integer read FBackgroundBitmapIndex write SetBackgroundBitmapIndex; - property BackgroundBitmapPool: TdxPSBackgroundBitmapPool read GetBackgroundBitmapPool; - property BorderBrush: HBRUSH read GetBorderBrush; - property BorderClass: TdxPSCellBorderClass read GetBorderClass write SetBorderClass; - property BorderColor: TColor read GetBorderColor write FBorderColor; // clDefault; - property BorderEdgeClasses[Side: TdxCellSide]: TdxPSCellBorderClass read GetBorderEdgeClass; - property BorderEdgeSalients[Side: TdxCellSide; Salient: TdxPSCellBorderSalientType]: Integer read GetBorderEdgeSalient; - property BorderEdgeThicknesses[Side: TdxCellSide]: Integer read GetBorderEdgeThickness; - property BorderPainter: TdxPSCellBorderPainter read GetBorderPainter; - property BorderPainterClass: TdxPSCellBorderPainterClass read GetBorderPainterClass; - property BoundsRect: TRect read FBoundsRect write SetBoundsRect; - property CellSides: TdxCellSides read GetCellSides write SetCellSides; {csAll} - property CellSideColors[ASide: TdxCellSide]: TColor read GetCellSideColors write SetCellSideColors; - property Color: TColor read FColor write SetColor; - property ContentBkColor: TColor read GetContentBkColor write SetContentBkColor; - property ContentBrush: HBRUSH read GetContentBrush; - property ContentPattern: TdxPSFillPatternClass read GetContentPattern write SetContentPattern; - property Edge3DSoft: Boolean read GetEdge3DSoft write SetEdge3DSoft; // obsolete - use BorderClass instead - property Edge3DStyle: TdxCellEdgeStyle read GetEdge3DStyle write SetEdge3DStyle; // obsolete - use BorderClass instead - property EdgeMode: TdxCellEdgeMode read GetEdgeMode write SetEdgeMode; // obsolete - use BorderClass instead - property ExcludeFromClipRgn: Boolean read GetExcludeFromClipRgn write SetExcludeFromClipRgn; - property Font: TFont read GetFont write SetFont; - property FontIndex: Integer read FFontIndex write SetFontIndex; - property Height: Integer read GetHeight write SetHeight; - property Left: Integer read GetLeft write SetLeft; - property Origin: TPoint read GetOrigin write SetOrigin; - property ParentBrush: HBRUSH read GetParentBrush; - property ParentColor: TColor read GetParentColor; - property ShadowBrush: HBRUSH read GetShadowBrush; - property ShadowColor: TColor read GetShadowColor write SetShadowColor; - property ShadowDepth: Integer read GetShadowDepth write SetShadowDepth; - property ShowShadow: Boolean read GetShowShadow write SetShowShadow; - property Top: Integer read GetTop write SetTop; - property Transparent: Boolean read GetTransparent write SetTransparent; - property Width: Integer read GetWidth write SetWidth; - property Visible: Boolean read GetVisible write SetVisible; - end; - - TdxReportCell = class(TdxReportVisualItem) - private - FCellList: TList; - FDataList: TList; - FReportCells: TdxReportCells; - function GetAbsoluteIndex: Integer; - function GetCellCount: Integer; - function GetCell(Index: Integer): TdxReportCell; - function GetClipChildren: Boolean; - function GetDataItemCount: Integer; - function GetDataItem(Index: Integer): TAbstractdxReportCellData; - function GetIsTopLevel: Boolean; - function GetLevel: Integer; - function GetReportCells: TdxReportCells; override; - procedure CellListNeeded; - procedure CellListRelease; - procedure DataListNeeded; - procedure DataListRelease; - procedure InsertCell(AnItem: TdxReportCell); - procedure InsertDataItem(AnItem: TdxReportItem); - procedure InsertItem(AnItem: TdxReportItem); - procedure MoveCell(ACurIndex, ANewIndex: Integer); - procedure MoveDataItem(ACurIndex, ANewIndex: Integer); - procedure MoveItem(AnItem: TdxReportItem; ACurIndex, ANewIndex: Integer); - procedure RemoveCell(AnItem: TdxReportCell); - procedure RemoveDataItem(AnItem: TdxReportItem); - procedure RemoveItem(AnItem: TdxReportItem); - procedure SetClipChildren(Value: Boolean); - protected - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - function GetBackgroundBitmapTileBounds(Col, Row: Integer): TRect; override; - function GetBackgroundBounds(DC: HDC): TRect; override; - function GetBorderBounds(DC: HDC): TRect; override; - class function IsCell: Boolean; override; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - procedure ReadCells(AReader: TdxPSDataReader); virtual; - procedure ReadDataItems(AReader: TdxPSDataReader); virtual; - procedure ReadProperties(AReader: TdxPSDataReader); virtual; - procedure WriteCells(AWriter: TdxPSDataWriter); virtual; - procedure WriteDataItems(AWriter: TdxPSDataWriter); virtual; - procedure WriteProperties(AWriter: TdxPSDataWriter); virtual; - public - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure DrawContent(DC: HDC; DrawRect: TRect; const OriginRect: TRect; AStage: TdxPSRenderStages); virtual; - procedure DrawItself(DC: HDC; AStage: TdxPSRenderStages); virtual; - procedure DrawNestedCells(DC: HDC; DrawRect: TRect; const OriginRect: TRect; AStage: TdxPSRenderStages); virtual; - procedure DrawNestedDataItems(DC: HDC; const OriginRect: TRect; AStage: TdxPSRenderStages); virtual; - function ExcludeNestedItems(DC: HDC; const OriginRect: TRect): Integer; virtual; - - function GetBorderOuterBounds(DC: HDC): TRect; override; - function GetInnerBounds(DC: HDC): TRect; override; - function GetOuterBounds(DC: HDC): TRect; override; - - function MeasureHeight(DC: HDC): Integer; override; - function MeasureWidth(DC: HDC): Integer; override; - - function AddCell: TdxReportCell; - function AddDataItem(AClass: TdxReportCellDataClass): TAbstractdxReportCellData; - procedure AllocateSpaceForCells(ACapacity: Integer); - procedure AllocateSpaceForDatas(ACapacity: Integer); - procedure ClearAll; - procedure ClearCells; - procedure ClearDataItems; - procedure DeleteCell(Index: Integer); - procedure DeleteDataItem(Index: Integer); - function FirstCell: TdxReportCell; - function HasChildren: Boolean; - function IndexOf(AnItem: TdxReportItem): Integer; - function LastCell: TdxReportCell; - - property AbsoluteIndex: Integer read GetAbsoluteIndex; - property CellCount: Integer read GetCellCount; - property Cells[Index: Integer]: TdxReportCell read GetCell; default; - property ClipChildren: Boolean read GetClipChildren write SetClipChildren; - property DataItemCount: Integer read GetDataItemCount; - property DataItems[Index: Integer]: TAbstractdxReportCellData read GetDataItem; - property IsTopLevel: Boolean read GetIsTopLevel; - property Level: Integer read GetLevel; - end; - - TdxReportGroup = class; - - TdxPSReportGroupLookAndFeelPainter = class - private - FGroup: TdxReportGroup; - FLookAndFeel: TdxPSReportGroupLookAndFeel; - FRenderer: TdxPSReportRenderer; - protected - procedure DrawBorders(DC: HDC); virtual; - procedure DrawCaptionText(DC: HDC); virtual; - procedure Initialize(ALookAndFeel: TdxPSReportGroupLookAndFeel; AGroup: TdxReportGroup); virtual; - - function Group: TdxReportGroup; overload; virtual; - function LookAndFeel: TdxPSReportGroupLookAndFeel; overload; virtual; - public - constructor Create(ARenderer: TdxPSReportRenderer); virtual; - procedure Paint(DC: HDC); virtual; - property Renderer: TdxPSReportRenderer read FRenderer; - end; - - TdxPSReportGroupLookAndFeel = class(TPersistent) - private - FCaptionHeight: Integer; - FCaptionFontIndex: Integer; - FCaptionIndent: Integer; - FColor: TColor; - FData: Pointer; - FFontIndex: Integer; - FReportCells: TdxReportCells; - function GetCaptionFont: TFont; - function GetFont: TFont; - function GetRenderer: TdxPSReportRenderer; - procedure SetCaptionFont(Value: TFont); - procedure SetCaptionFontIndex(Value: Integer); - procedure SetFont(Value: TFont); - procedure SetFontIndex(Value: Integer); - protected - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); virtual; - - procedure ReadData(AReader: TdxPSDataReader); virtual; - procedure WriteData(AWriter: TdxPSDataWriter); virtual; - - function GetBorderEdgeThickness(AGroup: TdxReportGroup; ASide: TdxCellSide): Integer; virtual; - function GetBorderThickness: Integer; virtual; - function GetColor: TColor; virtual; - procedure SetBorderThickness(Value: Integer); virtual; - - function GetCaptionAreaHeight: Integer; virtual; - function GetCaptionBounds(AGroup: TdxReportGroup): TRect; virtual; - function GetCaptionColor: TColor; virtual; - function GetCaptionHeight: Integer; virtual; - function GetCaptionIndent: Integer; virtual; - function GetCaptionLeftRestSpaceBounds(AGroup: TdxReportGroup): TRect; virtual; - function GetCaptionRightRestSpaceBounds(AGroup: TdxReportGroup): TRect; virtual; - function GetCaptionTextBounds(AGroup: TdxReportGroup): TRect; virtual; - - function GetPainter: TdxPSReportGroupLookAndFeelPainter; - class function GetPainterClass: TdxPSReportGroupLookAndFeelPainterClass; virtual; - - property BorderThickness: Integer read GetBorderThickness write SetBorderThickness; - property CaptionAreaHeight: Integer read GetCaptionAreaHeight; - property CaptionColor: TColor read GetCaptionColor; - property CaptionHeight: Integer read GetCaptionHeight; - property CaptionIndent: Integer read GetCaptionIndent; - property Renderer: TdxPSReportRenderer read GetRenderer; - property ReportCells: TdxReportCells read FReportCells; - public - constructor Create(AReportCells: TdxReportCells); virtual; - procedure Assign(Source: TPersistent); override; - - class function BorderClass: TdxPSCellBorderClass; virtual; - class function DefaultBorderSides: TdxCellSides; virtual; - class function Name: string; virtual; - - class procedure Register; virtual; - class procedure Unregister; virtual; - - procedure Paint(DC: HDC; AGroup: TdxReportGroup); - procedure Prepare(DC: HDC); virtual; - - property CaptionFont: TFont read GetCaptionFont write SetCaptionFont; - property CaptionFontIndex: Integer read FCaptionFontIndex write SetCaptionFontIndex; - property Color: TColor read GetColor write FColor; - property Data: Pointer read FData write FData; - property Font: TFont read GetFont write SetFont; - property FontIndex: Integer read FFontIndex write SetFontIndex; - end; - - TdxPSReportGroupNullLookAndFeel = class; - - TdxPSReportGroupNullLookAndFeelPainter = class(TdxPSReportGroupLookAndFeelPainter) - public - procedure Paint(DC: HDC); override; - end; - - TdxPSReportGroupNullLookAndFeel = class(TdxPSReportGroupLookAndFeel) - protected - function GetBorderThickness: Integer; override; - function GetCaptionHeight: Integer; override; - class function GetPainterClass: TdxPSReportGroupLookAndFeelPainterClass; override; - public - class function BorderClass: TdxPSCellBorderClass; override; - class function DefaultBorderSides: TdxCellSides; override; - class function Name: string; override; - end; - - TdxPSReportGroupStandardLookAndFeel = class; - - TdxPSReportGroupStandardLookAndFeelPainter = class(TdxPSReportGroupLookAndFeelPainter) - protected - procedure DrawBorders(DC: HDC); override; - procedure DrawCaptionRestSpace(DC: HDC); virtual; - function LookAndFeel: TdxPSReportGroupStandardLookAndFeel; reintroduce; overload; - public - procedure Paint(DC: HDC); override; - end; - - TdxPSReportGroupStandardLookAndFeel = class(TdxPSReportGroupLookAndFeel) - protected - class function GetPainterClass: TdxPSReportGroupLookAndFeelPainterClass; override; - public - class function BorderClass: TdxPSCellBorderClass; override; - class function Name: string; override; - - property CaptionAreaHeight; - property CaptionFont; - property CaptionFontIndex; - end; - - TdxPSReportGroupOfficeLookAndFeel = class(TdxPSReportGroupStandardLookAndFeel) - protected - function GetCaptionIndent: Integer; override; - public - class function DefaultBorderSides: TdxCellSides; override; - class function Name: string; override; - end; - - TdxPSReportGroupWebLookAndFeel = class; - - TdxPSReportGroupWebLookAndFeelPainter = class(TdxPSReportGroupLookAndFeelPainter) - protected - procedure DrawBorders(DC: HDC); override; - procedure DrawCaptionSeparator(DC: HDC); virtual; - function LookAndFeel: TdxPSReportGroupWebLookAndFeel; reintroduce; overload; - public - procedure Paint(DC: HDC); override; - end; - - TdxPSReportGroupWebLookAndFeel = class(TdxPSReportGroupLookAndFeel) - private - FBorderColor: TColor; - FBorderThickness: Integer; - FCaptionColor: TColor; - FCaptionSeparatorColor: TColor; - FCaptionSeparatorThickness: Integer; - procedure SetCaptionSeparatorThickness(Value: Integer); - protected - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - function GetBorderEdgeThickness(AGroup: TdxReportGroup; ASide: TdxCellSide): Integer; override; - function GetBorderThickness: Integer; override; - procedure SetBorderThickness(Value: Integer); override; - - function GetBorderColor: TColor; virtual; - function GetCaptionColor: TColor; override; - function GetCaptionSeparatorColor: TColor; virtual; - - function GetCaptionAreaHeight: Integer; override; - function GetCaptionBounds(AGroup: TdxReportGroup): TRect; override; - function GetCaptionLeftRestSpaceBounds(AGroup: TdxReportGroup): TRect; override; - function GetCaptionRightRestSpaceBounds(AGroup: TdxReportGroup): TRect; override; - function GetCaptionSeparatorBounds(AGroup: TdxReportGroup): TRect; virtual; - function GetCaptionTextBounds(AGroup: TdxReportGroup): TRect; override; - - class function GetPainterClass: TdxPSReportGroupLookAndFeelPainterClass; override; - public - constructor Create(AReportCells: TdxReportCells); override; - procedure Assign(Source: TPersistent); override; - - class function BorderClass: TdxPSCellBorderClass; override; - class function Name: string; override; - - property BorderColor: TColor read GetBorderColor write FBorderColor; - property BorderThickness; - property CaptionAreaHeight; - property CaptionColor write FCaptionColor; - property CaptionFont; - property CaptionSeparatorColor: TColor read GetCaptionSeparatorColor write FCaptionSeparatorColor; - property CaptionSeparatorThickness: Integer read FCaptionSeparatorThickness write SetCaptionSeparatorThickness; - end; - - TdxReportGroup = class(TdxReportCell) - private - FCaptionText: string; - FCaptionTextWidth: Integer; - FLookAndFeel: TdxPSReportGroupLookAndFeel; - //FStreamedLookAndFeelIndex: Integer; - function GetCaptionAlignment: TcxTextAlignX; - function GetCaptionTextWidth: Integer; - function GetCaptionTransparent: Boolean; - function GetLookAndFeel: TdxPSReportGroupLookAndFeel; - function GetLookAndFeelIndex: Integer; - function GetShowCaption: Boolean; - function GetUseOwnBorderClass: Boolean; - procedure SetCaptionAlignment(Value: TcxTextAlignX); - procedure SetCaptionTransparent(Value: Boolean); - procedure SetLookAndFeel(Value: TdxPSReportGroupLookAndFeel); - procedure SetShowCaption(Value: Boolean); - procedure SetUseOwnBorderClass(Value: Boolean); - protected - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - procedure InternalDrawBorders(DC: HDC); virtual; - - function GetBorderClass: TdxPSCellBorderClass; override; - function GetBorderEdgeSalient(ASide: TdxCellSide; ASalient: TdxPSCellBorderSalientType): Integer; override; - function GetBorderEdgeThickness(ASide: TdxCellSide): Integer; override; - function InternalGetBorderEdgeThickness(ASide: TdxCellSide): Integer; - - function IsBordersDrawn: Boolean; override; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property CaptionTextWidth: Integer read GetCaptionTextWidth; - property LookAndFeelIndex: Integer read GetLookAndFeelIndex; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - - procedure DrawBorders(DC: HDC); override; - - procedure CalculateCaptionTextWidth(DC: HDC); - function GetBorderOuterBounds(DC: HDC): TRect; override; - - property CaptionAlignment: TcxTextAlignX read GetCaptionAlignment write SetCaptionAlignment; - property CaptionText: string read FCaptionText write FCaptionText; - property CaptionTransparent: Boolean read GetCaptionTransparent write SetCaptionTransparent; - property LookAndFeel: TdxPSReportGroupLookAndFeel read GetLookAndFeel write SetLookAndFeel; - property ShowCaption: Boolean read GetShowCaption write SetShowCaption; - property UseOwnBorderClass: Boolean read GetUseOwnBorderClass write SetUseOwnBorderClass; - end; - - TdxReportCells = class(TPersistent) - private - FBorderColor: TColor; - FBorderWidth: Integer; - FCells: TdxReportCell; - FExpandButtonBorderColor: TColor; - FFooterCells: TdxReportCell; - FGroupBorderColor: TColor; - FGroupCaptionColor: TColor; - FGroupCaptionSeparatorColor: TColor; - FGroupColor: TColor; - FHeaderCells: TdxReportCell; - FImageLists: TList; - FLookAndFeel: TdxPSReportGroupLookAndFeel; - FLookAndFeels: TList; - FOverlays: TList; - FOwnImageLists: Boolean; - FShadowColor: TColor; - FShadowDepth: Integer; - FReportLink: TBasedxReportLink; - FTreeLineColor: TColor; - FTreeLineStyle: TdxPSTreeLineStyle; - function GetAreFooterCellsAllocated: Boolean; - function GetAreHeaderCellsAllocated: Boolean; - function GetBoundsRect: TRect; - function GetCount: Integer; - function GetFont: TFont; - function GetFooterBoundsRect: TRect; - function GetFooterCellCount: Integer; - function GetFooterCells: TdxReportCell; - function GetHeaderBoundsRect: TRect; - function GetHeaderCellCount: Integer; - function GetHeaderCells: TdxReportCell; - function GetImageList(Index: Integer): TCustomImageList; - function GetImageListCount: Integer; - function GetLookAndFeel(Index: Integer): TdxPSReportGroupLookAndFeel; - function GetLookAndFeelCount: Integer; - function GetOverlay(Index: Integer): TdxReportCell; - function GetOverlayCount: Integer; - function GetRenderer: TdxPSReportRenderer; - procedure SetBorderColor(Value: TColor); - procedure SetShadowColor(Value: TColor); - procedure SetShadowDepth(Value: Integer); - procedure SetTreeLineColor(Value: TColor); - - procedure CreateFooterCells; - procedure CreateHeaderCells; - protected - procedure AfterReadData(AReader: TdxPSDataReader); virtual; - procedure AfterWriteData(AWriter: TdxPSDataWriter); virtual; - procedure BeforeReadData(AReader: TdxPSDataReader); virtual; - procedure BeforeWriteData(AWriter: TdxPSDataWriter); virtual; - - procedure ReadCells(AReader: TdxPSDataReader); - procedure ReadHeaderCells(AReader: TdxPSDataReader); - procedure ReadFooterCells(AReader: TdxPSDataReader); - procedure ReadImageLists(AReader: TdxPSDataReader); - procedure ReadLookAndFeels(AReader: TdxPSDataReader); - procedure ReadOverlayCells(AReader: TdxPSDataReader); - procedure ReadProperties(AReader: TdxPSDataReader); - - procedure WriteCells(AWriter: TdxPSDataWriter); - procedure WriteFooterCells(AWriter: TdxPSDataWriter); - procedure WriteHeaderCells(AWriter: TdxPSDataWriter); - procedure WriteImageLists(AWriter: TdxPSDataWriter); - procedure WriteLookAndFeels(AWriter: TdxPSDataWriter); - procedure WriteOverlayCells(AWriter: TdxPSDataWriter); - procedure WriteProperties(AWriter: TdxPSDataWriter); - - function CalculateOverlaysHeight: Integer; - function CalculateOverlaysWidth: Integer; - function CalculateTotalHeight: Integer; - function CalculateTotalWidth: Integer; - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); virtual; - function GetCellTopLevelParent(AnItem: TdxReportItem): TdxReportCell; virtual; - - procedure FreeAndNilReportGroupLookAndFeels; - procedure PrepareReportGroupsLookAndFeels(DC: HDC); - - procedure AddImageList(AnImageList: TCustomImageList); - procedure ClearImageLists; - procedure FreeAndNilImageLists; - procedure GetImageLists; - - property ImageListCount: Integer read GetImageListCount; - property OwnImageLists: Boolean read FOwnImageLists write FOwnImageLists; - property Renderer: TdxPSReportRenderer read GetRenderer; - public - constructor Create(AReportLink: TBasedxReportLink); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure ClearItems; - - procedure ClearLookAndFeels; - function CreateGroupLookAndFeel(AClass: TdxPSReportGroupLookAndFeelClass; ACheckExisting: Boolean = True): TdxPSReportGroupLookAndFeel; - function FindGroupLookAndFeelByClass(AClass: TdxPSReportGroupLookAndFeelClass): TdxPSReportGroupLookAndFeel; - function FindGroupLookAndFeelByData(AData: Pointer): TdxPSReportGroupLookAndFeel; - function IndexOfImageList(AnImageList: TCustomImageList): Integer; - function IndexOfReportGroupLookAndFeel(ALookAndFeel: TdxPSReportGroupLookAndFeel): Integer; - - procedure DoProgress(const APercentDone: Double); - - function AddOverlay: TdxReportCell; - procedure AppendOverlays(Source: TdxReportCells; AnOffsetX: Integer = 0; AnOffsetY: Integer = 0); - procedure AssignOverlays(Source: TdxReportCells; AnOffsetX: Integer = 0; AnOffsetY: Integer = 0); - procedure ClearOverlays; - procedure DeleteOverlay(AnOverlay: TdxReportCell); - procedure FreeAndNilOverlays; - function HasOverlays: Boolean; - function IndexOfOverlay(AnOverlay: TdxReportCell): Integer; - - function GetFontByIndex(AnIndex: Integer): TFont; - function GetIndexByFont(AFont: TFont): Integer; - - procedure ReadData(AReader: TdxPSDataReader); virtual; - procedure WriteData(AWriter: TdxPSDataWriter); virtual; - - property AreFooterCellsAllocated: Boolean read GetAreFooterCellsAllocated; - property AreHeaderCellsAllocated: Boolean read GetAreHeaderCellsAllocated; - property BorderColor: TColor read FBorderColor write SetBorderColor; - property BorderWidth: Integer read FBorderWidth write FBorderWidth; - property BoundsRect: TRect read GetBoundsRect; - property Cells: TdxReportCell read FCells; - property Count: Integer read GetCount; - property ExpandButtonBorderColor: TColor read FExpandButtonBorderColor write FExpandButtonBorderColor default clBlack; - property Font: TFont read GetFont; - property FooterBoundsRect: TRect read GetFooterBoundsRect; - property FooterCellCount: Integer read GetFooterCellCount; - property FooterCells: TdxReportCell read GetFooterCells; - property GroupBorderColor: TColor read FGroupBorderColor write FGroupBorderColor; - property GroupCaptionColor: TColor read FGroupCaptionColor write FGroupCaptionColor; - property GroupCaptionSeparatorColor: TColor read FGroupCaptionSeparatorColor write FGroupCaptionSeparatorColor; - property GroupColor: TColor read FGroupColor write FGroupColor; - property HeaderBoundsRect: TRect read GetHeaderBoundsRect; - property HeaderCellCount: Integer read GetHeaderCellCount; - property HeaderCells: TdxReportCell read GetHeaderCells; - property ImageLists[Index: Integer]: TCustomImageList read GetImageList; - property LookAndFeel: TdxPSReportGroupLookAndFeel read FLookAndFeel write FLookAndFeel; - property LookAndFeelCount: Integer read GetLookAndFeelCount; - property LookAndFeels[Index: Integer]: TdxPSReportGroupLookAndFeel read GetLookAndFeel; - property OverlayCount: Integer read GetOverlayCount; - property Overlays[Index: Integer]: TdxReportCell read GetOverlay; - property ReportLink: TBasedxReportLink read FReportLink; - property ShadowColor: TColor read FShadowColor write SetShadowColor; - property ShadowDepth: Integer read FShadowDepth write SetShadowDepth; - property TreeLineColor: TColor read FTreeLineColor write SetTreeLineColor; - property TreeLineStyle: TdxPSTreeLineStyle read FTreeLineStyle write FTreeLineStyle default tlsDot; - end; - - TAbstractdxReportCellData = class(TdxReportVisualItem) - private - function GetBreakByChars: Boolean; - function GetEndEllipsis: Boolean; - function GetHidePrefix: Boolean; - function GetMultiline: Boolean; - function GetPreventLeftTextExceed: Boolean; - function GetPreventTopTextExceed: Boolean; - function GetSortOrder: TdxCellSortOrder; - function GetTextAlignX: TcxTextAlignX; - function GetTextAlignY: TcxTextAlignY; - procedure SetBreakByChars(Value: Boolean); - procedure SetEndEllipsis(Value: Boolean); - procedure SetHidePrefix(Value: Boolean); - procedure SetMultiline(Value: Boolean); - procedure SetPreventLeftTextExceed(Value: Boolean); - procedure SetPreventTopTextExceed(Value: Boolean); - procedure SetSortOrder(Value: TdxCellSortOrder); - procedure SetTextAlignX(Value: TcxTextAlignX); - procedure SetTextAlignY(Value: TcxTextAlignY); - protected - function CustomDraw(DC: HDC): Boolean; virtual; - function GetAbsoluteEffectiveBounds(DC: HDC; AStage: TdxPSRenderStages): TRect; virtual; - function GetDefaultDTFormat: DWORD; virtual; - function GetEffectiveBounds(DC: HDC; AStage: TdxPSRenderStages): TRect; virtual; - function GetDTFormat: DWORD; virtual; - function IsCustomDrawn: Boolean; virtual; - function IsDrawingNeeded(DC: HDC; AStage: TdxPSRenderStages; const ARect: TRect): Boolean; virtual; - function IsDrawn(DC: HDC; AStage: TdxPSRenderStages; const ARect: TRect): Boolean; virtual; - - property BreakByChars: Boolean read GetBreakByChars write SetBreakByChars default True; - property EndEllipsis: Boolean read GetEndEllipsis write SetEndEllipsis default False; - property HidePrefix: Boolean read GetHidePrefix write SetHidePrefix default False; - property Multiline: Boolean read GetMultiline write SetMultiline default False; - property PreventLeftTextExceed: Boolean read GetPreventLeftTextExceed write SetPreventLeftTextExceed; - property PreventTopTextExceed: Boolean read GetPreventTopTextExceed write SetPreventTopTextExceed; - property SortOrder: TdxCellSortOrder read GetSortOrder write SetSortOrder default csoNone; - property TextAlignX: TcxTextAlignX read GetTextAlignX write SetTextAlignX default taLeft; - property TextAlignY: TcxTextAlignY read GetTextAlignY write SetTextAlignY default taCenterY; - public - constructor Create(AParent: TdxReportCell); override; - - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); virtual; - function GetCustomDrawID: Integer; virtual; - - function MeasureContentHeight(DC: HDC): Integer; override; - function MeasureContentWidth(DC: HDC): Integer; override; - - property DefaultDTFormat: DWORD read GetDefaultDTFormat; - property DTFormat: DWORD read GetDTFormat; - end; - - TdxReportCellBoxClass = class of TdxReportCellBox; - - TdxReportCellBox = class(TAbstractdxReportCellData); - - TdxReportCellTextClass = class of TdxReportCellText; - - TdxReportCellText = class(TAbstractdxReportCellData) - private - FIndent: Cardinal; - function GetAdjustFont: Boolean; - function GetIndent: Integer; - procedure SetAdjustFont(Value: Boolean); - procedure SetIndent(Value: Integer); - protected - function GetText: string; virtual; abstract; - procedure SetText(const Value: string); virtual; abstract; - - function GetSortMarkBounds(DC: HDC): TRect; virtual; - function GetTextBounds(DC: HDC): TRect; virtual; - function IsSortMarkDrawn: Boolean; virtual; - function IsTextDrawn: Boolean; virtual; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property AdjustFont: Boolean read GetAdjustFont write SetAdjustFont; - property Indent: Integer read GetIndent write SetIndent; - public - procedure Assign(Source: TPersistent); override; - - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - procedure DrawSortMark(DC: HDC); virtual; - procedure DrawText(DC: HDC); virtual; - - function CalculateLineCount(DC: HDC): Integer; override; - function MeasureContentHeight(DC: HDC): Integer; override; - function MeasureContentWidth(DC: HDC): Integer; override; - function MeasureFontHeight(DC: HDC): Integer; override; - - property EndEllipsis; - property HidePrefix; - property Multiline; - property SortOrder; - property Text: string read GetText write SetText; - end; - - TdxReportCellStringClass = class of TdxReportCellString; - - TdxReportCellString = class(TdxReportCellText) - private - FText: string; - protected - function GetText: string; override; - procedure SetText(const Value: string); override; - public - property AdjustFont; - property Indent; - property PreventLeftTextExceed; - property PreventTopTextExceed; - property TextAlignX; - property TextAlignY; - end; - - TdxReportCellImageContainer = class(TdxReportCellString) - private - function GetImageTransparent: Boolean; - procedure SetImageTransparent(Value: Boolean); - protected - function GetImageAreaBounds(DC: HDC): TRect; virtual; - function GetImageBounds(DC: HDC): TRect; virtual; - procedure GetImageSizes(var AImageWidth, AImageHeight: Integer); virtual; - function HasImage: Boolean; virtual; - function IsImageBackgroundDrawn: Boolean; virtual; - function IsImageDrawn: Boolean; virtual; - function IsTextBackgroundDrawn: Boolean; virtual; - property ImageTransparent: Boolean read GetImageTransparent write SetImageTransparent default True; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - procedure DrawImage(DC: HDC); virtual; - procedure DrawImageBackground(DC: HDC); virtual; - procedure DrawTextBackground(DC: HDC); virtual; - end; - - TdxCustomReportCellCheckClass = class of TdxCustomReportCellCheck; - - TdxCustomReportCellCheck = class(TdxReportCellImageContainer) - private - function GetBoldBorder: Boolean; - function GetButtonEdgeStyle: TdxCheckButtonEdgeStyle; - function GetChecked: Boolean; - function GetCheckPos: TdxCellCheckPos; - function GetEnabled: Boolean; - function GetFlatBorder: Boolean; - function GetState: TCheckBoxState; - procedure SetBoldBorder(Value: Boolean); - procedure SetButtonEdgeStyle(Value: TdxCheckButtonEdgeStyle); - procedure SetCheckPos(Value: TdxCellCheckPos); - procedure SetEnabled(Value: Boolean); - procedure SetFlatBorder(Value: Boolean); - protected - function GetCheckBounds(DC: HDC): TRect; virtual; - function GetImageAreaBounds(DC: HDC): TRect; override; - function GetImageBounds(DC: HDC): TRect; override; - procedure GetImageSizes(var AImageWidth, AImageHeight: Integer); override; - function GetTextBounds(DC: HDC): TRect; override; - function HasImage: Boolean; override; - function IsImageBackgroundDrawn: Boolean; override; - class function IsRadio: Boolean; virtual; - procedure SetChecked(Value: Boolean); virtual; - - property BoldBorder: Boolean read GetBoldBorder write SetBoldBorder; // obsolete - property FlatBorder: Boolean read GetFlatBorder write SetFlatBorder; // obsolete - property State: TCheckBoxState read GetState; - public - constructor Create(AParent: TdxReportCell); override; - - procedure DrawCheck(DC: HDC); virtual; - procedure DrawImage(DC: HDC); override; - - function MeasureContentHeight(DC: HDC): Integer; override; - function MeasureContentWidth(DC: HDC): Integer; override; - - property ButtonEdgeStyle: TdxCheckButtonEdgeStyle read GetButtonEdgeStyle write SetButtonEdgeStyle default cbesUltraFlat; - property Checked: Boolean read GetChecked write SetChecked default False; - property CheckPos: TdxCellCheckPos read GetCheckPos write SetCheckPos default ccpCenter; - property Enabled: Boolean read GetEnabled write SetEnabled default True; - end; - - TdxReportCellCheck = class(TdxCustomReportCellCheck) - public - property BoldBorder; - property FlatBorder; - property State; - end; - - TdxCustomReportCellRadio = class(TdxReportCellCheck) - protected - class function IsRadio: Boolean; override; - end; - - TdxReportCellRadio = class(TdxCustomReportCellRadio) - end; - - TdxCustomReportCellCheckImage = class(TdxReportCellCheck) - private - function GetGlyphPartialBounds: TRect; - protected - procedure GetImageSizes(var AImageWidth, AImageHeight: Integer); override; - - function GetGlyph: TBitmap; virtual; - function GetGlyphCount: Integer; virtual; - function GetGlyphIndex: Integer; virtual; - procedure SetGlyph(Value: TBitmap); virtual; - procedure SetGlyphCount(Value: Integer); virtual; - - function HasGlyph: Boolean; virtual; - procedure ReleaseGlyph; virtual; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property Glyph: TBitmap read GetGlyph write SetGlyph; - property GlyphCount: Integer read GetGlyphCount write SetGlyphCount; - property GlyphIndex: Integer read GetGlyphIndex; - property GlyphPartialBounds: TRect read GetGlyphPartialBounds; - public - constructor Create(AParent: TdxReportCell); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure DrawCheck(DC: HDC); override; - procedure DrawCheckGlyph(DC: HDC); virtual; - end; - - TdxReportCellCheckImage = class(TdxCustomReportCellCheckImage) - private - FGlyph: TBitmap; - protected - function GetGlyphCount: Integer; override; - function GetGlyph: TBitmap; override; - procedure SetGlyph(Value: TBitmap); override; - procedure SetGlyphCount(Value: Integer); override; - - function HasGlyph: Boolean; override; - procedure ReleaseGlyph; override; - public - property Glyph; - property GlyphCount; - property GlyphIndex; - property GlyphPartialBounds; - end; - - TdxCustomReportButtonGroupClass = class of TdxCustomReportButtonGroup; - - TdxCustomReportButtonGroup = class(TdxReportGroup) - private - FColumnCount: Integer; - FInterColumnsMinSpace: Integer; - FInterRowsMinSpace: Integer; - FIndents: TRect; - FItemSize: TSize; - function GetButtonEdgeStyle: TdxCheckButtonEdgeStyle; - function GetCheckPos: TdxCellCheckPos; - function GetItem(Index: Integer): TdxCustomReportCellCheck; - function GetItemColumn(Index: Integer): Integer; - function GetItemCount: Integer; - function GetItemRow(Index: Integer): Integer; - function GetRowCount: Integer; - procedure SetButtonEdgeStyle(Value: TdxCheckButtonEdgeStyle); - procedure SetCheckPos(Value: TdxCellCheckPos); - procedure SetColumnCount(Value: Integer); - procedure SetInterColumnsMinSpace(Value: Integer); - procedure SetInterRowsMinSpace(Value: Integer); - procedure SetIndents(Value: TRect); - protected - FLocked: Boolean; - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - procedure SetFontIndex(Value: Integer); override; - - procedure ReadDataItems(AReader: TdxPSDataReader); override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - class function GetItemClass: TdxCustomReportCellCheckClass; virtual; - procedure InitializeItem(AnItem: TdxCustomReportCellCheck); virtual; - - property ItemSize: TSize read FItemSize; - property Locked: Boolean read FLocked write FLocked; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - - procedure AdjustContent(DC: HDC); override; - - function MeasureContentHeight(DC: HDC): Integer; override; - function MeasureContentWidth(DC: HDC): Integer; override; - - function Add(const AText: string = ''): TdxCustomReportCellCheck; - procedure Clear; - procedure Delete(Index: Integer); - function FindItem(const ACaption: string): Integer; - - property ButtonEdgeStyle: TdxCheckButtonEdgeStyle read GetButtonEdgeStyle write SetButtonEdgeStyle default cbesUltraFlat; - property CheckPos: TdxCellCheckPos read GetCheckPos write SetCheckPos default ccpCenter; - property ColumnCount: Integer read FColumnCount write SetColumnCount; - property Indents: TRect read FIndents write SetIndents; - property InterColumnsMinSpace: Integer read FInterColumnsMinSpace write SetInterColumnsMinSpace; - property InterRowsMinSpace: Integer read FInterRowsMinSpace write SetInterRowsMinSpace; - property ItemColumns[Index: Integer]: Integer read GetItemColumn; - property ItemCount: Integer read GetItemCount; - property ItemRows[Index: Integer]: Integer read GetItemRow; - property Items[Index: Integer]: TdxCustomReportCellCheck read GetItem; - property RowCount: Integer read GetRowCount; - end; - - TdxReportRadioGroup = class(TdxCustomReportButtonGroup) - private - function GetItem(Index: Integer): TdxCustomReportCellRadio; - function GetItemIndex: Integer; - procedure SetItemIndex(Value: Integer); - protected - class function GetItemClass: TdxCustomReportCellCheckClass; override; - public - function Add(const AText: string = ''): TdxCustomReportCellRadio; - property ItemIndex: Integer read GetItemIndex write SetItemIndex; - property Items[Index: Integer]: TdxCustomReportCellRadio read GetItem; - end; - - TdxReportCheckGroup = class(TdxCustomReportButtonGroup) - private - FGlyph: TBitmap; - FGlyphCount: Integer; - function GetGlyph: TBitmap; - function GetItem(Index: Integer): TdxCustomReportCellCheckImage; - function GetItemChecked(Index: Integer): Boolean; - function GetItemEnabled(Index: Integer): Boolean; - function GetItemState(Index: Integer): TCheckBoxState; - procedure SetGlyph(Value: TBitmap); - procedure SetGlyphCount(Value: Integer); - procedure SetItemChecked(Index: Integer; Value: Boolean); - procedure SetItemEnabled(Index: Integer; Value: Boolean); - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - class function GetItemClass: TdxCustomReportCellCheckClass; override; - procedure InitializeItem(AnItem: TdxCustomReportCellCheck); override; - public - constructor Create(AParent: TdxReportCell); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function Add(const AText: string = ''): TdxCustomReportCellCheckImage; - function HasGlyph: Boolean; - procedure ReleaseGlyph; - - property Glyph: TBitmap read GetGlyph write SetGlyph; - property GlyphCount: Integer read FGlyphCount write SetGlyphCount; - property Items[Index: Integer]: TdxCustomReportCellCheckImage read GetItem; - property ItemsChecked[Index: Integer]: Boolean read GetItemChecked write SetItemChecked; - property ItemsEnabled[Index: Integer]: Boolean read GetItemEnabled write SetItemEnabled; - property ItemsState[Index: Integer]: TCheckBoxState read GetItemState; - end; - - TCustomdxReportCellImageContainer = class(TdxReportCellImageContainer) - private - FImage: TGraphic; - FImageIndex: Integer; - FImageList: TCustomImageList; - FOverlayImageIndex: Integer; - procedure SetImage(Value: TGraphic); - protected - function GetActualImageBuffering: TdxCellImageActualBuffering; virtual; - function GetImageBuffering: TdxCellImageBuffering; virtual; - procedure GetImageSizes(var AImageWidth, AImageHeight: Integer); override; - function HasImage: Boolean; override; - procedure PrepareImage; - procedure SetImageBuffering(Value: TdxCellImageBuffering); virtual; - - function GetImageListIndex: Integer; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property ActualImageBuffering: TdxCellImageActualBuffering read GetActualImageBuffering; - property ImageBuffering: TdxCellImageBuffering read GetImageBuffering write SetImageBuffering; - public - constructor Create(AParent: TdxReportCell); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function CreateImage(AGraphicClass: TGraphicClass): TGraphic; virtual; - procedure DrawImage(DC: HDC); override; - - property Image: TGraphic read FImage write SetImage; - property ImageIndex: Integer read FImageIndex write FImageIndex; - property ImageList: TCustomImageList read FImageList write FImageList; - property ImageTransparent; - property OverlayImageIndex: Integer read FOverlayImageIndex write FOverlayImageIndex; - end; - - TdxReportCellImageClass = class of TdxReportCellImage; - - TdxReportCellImage = class(TCustomdxReportCellImageContainer) - private - function GetImageLayout: TdxImageLayout; - function GetIsTextDrawnForCenteredImage: Boolean; - function GetIsTextShiftedForHorizontallyCenteredImage: Boolean; - function GetMakeSpaceForEmptyImage: Boolean; - procedure SetImageLayout(Value: TdxImageLayout); - procedure SetIsTextDrawnForCenteredImage(Value: Boolean); - procedure SetIsTextShiftedForHorizontallyCenteredImage(Value: Boolean); - procedure SetMakeSpaceForEmptyImage(Value: Boolean); - protected - function GetHalfContentWidth(DC: HDC): Integer; - function GetImageAreaBounds(DC: HDC): TRect; override; - function GetImageBounds(DC: HDC): TRect; override; - function GetTextBounds(DC: HDC): TRect; override; - function IsImageBackgroundDrawn: Boolean; override; - function IsTextDrawn: Boolean; override; - function IsTextBackgroundDrawn: Boolean; override; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - - function MeasureContentHeight(DC: HDC): Integer; override; - function MeasureContentWidth(DC: HDC): Integer; override; - - property ImageLayout: TdxImageLayout read GetImageLayout write SetImageLayout default ilImageCenterLeft; - property ImageTransparent; - property IsTextDrawnForCenteredImage: Boolean read GetIsTextDrawnForCenteredImage write SetIsTextDrawnForCenteredImage default False; - property IsTextShiftedForHorizontallyCenteredImage: Boolean read GetIsTextShiftedForHorizontallyCenteredImage write SetIsTextShiftedForHorizontallyCenteredImage default True; - property MakeSpaceForEmptyImage: Boolean read GetMakeSpaceForEmptyImage write SetMakeSpaceForEmptyImage default True; - end; - - TdxReportCellGraphicClass = class of TdxReportCellGraphic; - - TdxReportCellGraphic = class(TCustomdxReportCellImageContainer) - private - FCenter: Boolean; - FProportional: Boolean; - FStretch: Boolean; - procedure CalculateDrawMode; - function GetImage: TGraphic; - function GetDrawMode: TdxGraphicDrawMode; - function GetRealStretch: Boolean; - procedure SetImage(Value: TGraphic); - procedure SetCenter(Value: Boolean); - procedure SetDrawMode(Value: TdxGraphicDrawMode); - procedure SetProportional(Value: Boolean); - procedure SetStretch(Value: Boolean); - protected - function GetImageBounds(DC: HDC): TRect; override; - function GetImageBuffering: TdxCellImageBuffering; override; - function GetTextBounds(DC: HDC): TRect; override; - procedure SetImageBuffering(Value: TdxCellImageBuffering); override; - public - constructor Create(AParent: TdxReportCell); override; - //procedure Assign(Source: TPersistent); override; - - function MeasureFontHeight(DC: HDC): Integer; override; - function MeasureContentHeight(DC: HDC): Integer; override; - function MeasureContentWidth(DC: HDC): Integer; override; - - property Center: Boolean read FCenter write SetCenter; - property DrawMode: TdxGraphicDrawMode read GetDrawMode write SetDrawMode default gdmNone; - property Image: TGraphic read GetImage write SetImage; - property ImageBuffering; - property ImageTransparent; - property Proportional: Boolean read FProportional write SetProportional; - property RealStretch: Boolean read GetRealStretch; - property Stretch: Boolean read FStretch write SetStretch; - end; - - TdxReportCellExpandButtonAlignHorz = (bahLeft, bahCenter, bahRight); - TdxReportCellExpandButtonAlignVert = (bavTop, bavCenter, bavBottom); - - TdxReportCellExpandButtonClass = class of TdxReportCellExpandButton; - - TdxReportCellExpandButton = class(TAbstractdxReportCellData) - private - FButtonInteriorColor: TColor; - FButtonSize: Integer; - function GetActualButtonSize: Integer; - function GetButtonBorder3D: Boolean; - function GetButtonBorder3DSoft: Boolean; - function GetButtonBorderShadow: Boolean; - function GetButtonExpanded: Boolean; - function GetButtonTransparent: Boolean; - function GetKeepOddSize: Boolean; - function GetShowButton: Boolean; - function GetShowButtonBorder: Boolean; - function GetTreeLineMode: TdxPSTreeLineMode; - procedure SetButtonBorder3D(Value: Boolean); - procedure SetButtonBorder3DSoft(Value: Boolean); - procedure SetButtonBorderShadow(Value: Boolean); - procedure SetButtonExpanded(Value: Boolean); - procedure SetButtonTransparent(Value: Boolean); - procedure SetKeepOddSize(Value: Boolean); - procedure SetShowButton(Value: Boolean); - procedure SetShowButtonBorder(Value: Boolean); - procedure SetTreeLineMode(Value: TdxPSTreeLineMode); - protected - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - - function AreTreeLinesDrawn: Boolean; - function CalculateButtonBounds: TRect; virtual; - - function GetButtonAlignHorz: TdxReportCellExpandButtonAlignHorz; virtual; - function GetButtonAlignVert: TdxReportCellExpandButtonAlignVert; virtual; - function GetButtonIndents: TRect; virtual; - procedure SetButtonAlignHorz(Value: TdxReportCellExpandButtonAlignHorz); virtual; - procedure SetButtonAlignVert(Value: TdxReportCellExpandButtonAlignVert); virtual; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - procedure DrawExpandButton(DC: HDC); virtual; - procedure DrawTreeLines(DC: HDC); virtual; - - function GetButtonBounds(DC: HDC): TRect; virtual; - - property ActualButtonSize: Integer read GetActualButtonSize; - property ButtonAlignHorz: TdxReportCellExpandButtonAlignHorz read GetButtonAlignHorz write SetButtonAlignHorz default bahCenter; - property ButtonAlignVert: TdxReportCellExpandButtonAlignVert read GetButtonAlignVert write SetButtonAlignVert default bavCenter; - property ButtonBorder3D: Boolean read GetButtonBorder3D write SetButtonBorder3D default False; - property ButtonBorder3DSoft: Boolean read GetButtonBorder3DSoft write SetButtonBorder3DSoft default False; - property ButtonBorderShadow: Boolean read GetButtonBorderShadow write SetButtonBorderShadow default False; - property ButtonExpanded: Boolean read GetButtonExpanded write SetButtonExpanded default False; - property ButtonIndents: TRect read GetButtonIndents; - property ButtonInteriorColor: TColor read FButtonInteriorColor write FButtonInteriorColor default clNone; - property ButtonSize: Integer read FButtonSize write FButtonSize default 9; - property ButtonTransparent: Boolean read GetButtonTransparent write SetButtonTransparent default True; - property KeepOddSize: Boolean read GetKeepOddSize write SetKeepOddSize default True; - property ShowButton: Boolean read GetShowButton write SetShowButton default False; - property ShowButtonBorder: Boolean read GetShowButtonBorder write SetShowButtonBorder default True; - property TreeLineMode: TdxPSTreeLineMode read GetTreeLineMode write SetTreeLineMode default tlmNone; - end; - - TdxReportCellExpandButtonEx = class(TdxReportCellExpandButton) - private - FFormatEx: DWORD; - protected - function GetButtonAlignHorz: TdxReportCellExpandButtonAlignHorz; override; - function GetButtonAlignVert: TdxReportCellExpandButtonAlignVert; override; - function GetButtonIndents: TRect; override; - procedure SetButtonAlignHorz(Value: TdxReportCellExpandButtonAlignHorz); override; - procedure SetButtonAlignVert(Value: TdxReportCellExpandButtonAlignVert); override; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property FormatEx: DWORD read FFormatEx write FFormatEx; - end; - - { Explorer } - - TdxPSExplorerRefreshStage = (ersBefore, ersAfter); - - TCustomdxPSExplorerItemStateInfo = record - Count: Integer; - UniqueIDSize: Integer; - // UniqueID: TBytes follows by UniqueIDSize with Length UniqueIDSize - end; - - TCustomdxPSExplorer = class; - TCustomdxPSExplorerItem = class; - TdxPSExplorerFolder = class; - TdxPSExplorerItem = class; - - - IdxPSExplorerTreeContainerHost = interface - ['{4E52E062-EDCF-4A58-8212-45EAE673F506}'] - function GetFlat: Boolean; - function GetReportLink: TBasedxReportLink; - function GetTreeContainerParent: TWinControl; - - procedure UpdateState; - - property Flat: Boolean read GetFlat; - property ReportLink: TBasedxReportLink read GetReportLink; - property TreeContainerParent: TWinControl read GetTreeContainerParent; - end; - - - TdxPSExplorerChangeNotifier = class - private - FExplorer: TCustomdxPSExplorer; - procedure SetExplorer(Value: TCustomdxPSExplorer); - protected - procedure ExplorerRefresh(AStage: TdxPSExplorerRefreshStage); virtual; abstract; - procedure FolderPopulated(AFolder: TdxPSExplorerFolder); virtual; abstract; - procedure ItemAdded(AnItem: TCustomdxPSExplorerItem); virtual; abstract; - procedure ItemDataLoaded(AnItem: TdxPSExplorerItem); virtual; abstract; - procedure ItemDataUnloaded(AnItem: TdxPSExplorerItem); virtual; abstract; - procedure ItemDeleted(AnItem: TCustomdxPSExplorerItem); virtual; abstract; - procedure ItemParentChanged(AnItem: TCustomdxPSExplorerItem); virtual; abstract; - procedure ItemPropertiesChanged(AnItem: TCustomdxPSExplorerItem); virtual; abstract; - procedure ItemRenamed(AnItem: TCustomdxPSExplorerItem); virtual; abstract; - public - constructor Create(AnExplorer: TCustomdxPSExplorer); - destructor Destroy; override; - - property Explorer: TCustomdxPSExplorer read FExplorer write SetExplorer; - end; - - TdxPSExplorerChangeNotifierAdapter = class(TdxPSExplorerChangeNotifier) - protected - procedure ExplorerRefresh(AStage: TdxPSExplorerRefreshStage); override; - procedure FolderPopulated(AFolder: TdxPSExplorerFolder); override; - procedure ItemAdded(AnItem: TCustomdxPSExplorerItem); override; - procedure ItemDataLoaded(AnItem: TdxPSExplorerItem); override; - procedure ItemDataUnloaded(AnItem: TdxPSExplorerItem); override; - procedure ItemDeleted(AnItem: TCustomdxPSExplorerItem); override; - procedure ItemParentChanged(AnItem: TCustomdxPSExplorerItem); override; - procedure ItemPropertiesChanged(AnItem: TCustomdxPSExplorerItem); override; - procedure ItemRenamed(AnItem: TCustomdxPSExplorerItem); override; - end; - - TdxPSExplorerTreeChangeNotifier = class(TdxPSExplorerChangeNotifierAdapter) - private - FTreeContainer: TCustomdxPSExplorerTreeContainer; - protected - procedure ExplorerRefresh(AStage: TdxPSExplorerRefreshStage); override; - procedure FolderPopulated(AFolder: TdxPSExplorerFolder); override; - procedure ItemAdded(AnItem: TCustomdxPSExplorerItem); override; - procedure ItemDataLoaded(AnItem: TdxPSExplorerItem); override; - procedure ItemDataUnloaded(AnItem: TdxPSExplorerItem); override; - procedure ItemDeleted(AnItem: TCustomdxPSExplorerItem); override; - procedure ItemParentChanged(AnItem: TCustomdxPSExplorerItem); override; - procedure ItemPropertiesChanged(AnItem: TCustomdxPSExplorerItem); override; - procedure ItemRenamed(AnItem: TCustomdxPSExplorerItem); override; - public - constructor Create(ATreeContainer: TCustomdxPSExplorerTreeContainer; ARegister: Boolean = True); - property TreeContainer: TCustomdxPSExplorerTreeContainer read FTreeContainer; - end; - - TCustomdxPSExplorerTreeContainerClass = class of TCustomdxPSExplorerTreeContainer; - - TCustomdxPSExplorerTreeContainer = class - private - FControl: TWinControl; - FChangeNotifier: TdxPSExplorerTreeChangeNotifier; - FExplorer: TCustomdxPSExplorer; - FHost: IdxPSExplorerTreeContainerHost; - protected - { Next virtual (abstract) methods must be overriden in descendants } - procedure AddItem(AParent: TdxPSExplorerFolder; AnItem: TCustomdxPSExplorerItem); virtual; abstract; - procedure Clear; virtual; abstract; - procedure DeleteItem(AnItem: TCustomdxPSExplorerItem); virtual; - procedure InvalidateItem(AnItem: TCustomdxPSExplorerItem); virtual; - procedure MoveItem(AnItem: TCustomdxPSExplorerItem); virtual; abstract; - procedure RenameItem(AnItem: TCustomdxPSExplorerItem); virtual; abstract; - - function GetCreationParent: TdxPSExplorerFolder; virtual; abstract; - function GetFocusedItem: TCustomdxPSExplorerItem; virtual; abstract; - function GetIsEditing: Boolean; virtual; abstract; - function GetIsFolderSelected: Boolean; virtual; abstract; - function GetIsItemSelected: Boolean; virtual; abstract; - function GetIsRootSelected: Boolean; virtual; abstract; - function GetSelectedFolder: TdxPSExplorerFolder; virtual; abstract; - function GetSelectedItem: TCustomdxPSExplorerItem; virtual; abstract; - function GetSelectedItemText: string; virtual; abstract; - procedure SetFocusedItem(Value: TCustomdxPSExplorerItem); virtual; abstract; - procedure SetSelectedItem(Value: TCustomdxPSExplorerItem); virtual; abstract; - procedure SetSelectedItemText(const Value: string); virtual; abstract; - - procedure RestoreState; virtual; - procedure SaveState; virtual; - - procedure CreateTreeContainer; - procedure InitializeTreeContainer; virtual; - procedure ProcessKeyDown(var Key: Word; Shift: TShiftState); virtual; - procedure ProcessKeyPress(var Key: Char); virtual; - - property ChangeNotifier: TdxPSExplorerTreeChangeNotifier read FChangeNotifier; - property Host: IdxPSExplorerTreeContainerHost read FHost; - public - constructor Create(AnExplorer: TCustomdxPSExplorer; AHost: IdxPSExplorerTreeContainerHost); virtual; - destructor Destroy; override; - - class function ControlClass: TWinControlClass; virtual; - class procedure Register; - class procedure Unregister; - - procedure BeginUpdate; virtual; - procedure EndUpdate; virtual; - - { Follow virtual (abstract) methods must be overriden in descendants } - function BeginEdit(AnImmediate: Boolean = True): Boolean; virtual; abstract; - procedure EndEdit(ACancel: Boolean); virtual; abstract; - - procedure CollapseItem(AnItem: TCustomdxPSExplorerItem; ARecursive: Boolean = False); virtual; abstract; - procedure ExpandItem(AnItem: TCustomdxPSExplorerItem; ARecursive: Boolean = False); virtual; abstract; - procedure MakeItemVisible(AnItem: TCustomdxPSExplorerItem); virtual; abstract; - - function CanCreateFolder: Boolean; virtual; - function CanCreateItem: Boolean; virtual; - function CanDeleteSelection: Boolean; virtual; - function CanLoadSelectedItemData: Boolean; virtual; - function CanRefresh: Boolean; virtual; - function CanRenameSelectedItem: Boolean; virtual; - function CanShowPropertySheetsForSelectedItem: Boolean; virtual; - function CanUnloadItemData: Boolean; virtual; - function CreateItem: TdxPSExplorerItem; virtual; - procedure DeleteSelection(AShowMessage: Boolean = True); virtual; - function IsSelectedItemCurrentlyLoaded: Boolean; - procedure LoadSelectedItemData; virtual; - procedure RenameSelectedItem; virtual; - function ShowSelectedItemPropertySheets: Boolean; - procedure UnloadItemData; virtual; - - { Follow abstract methods must be overriden in descendants } - function GetDropTarget(X, Y: Integer): TdxPSExplorerFolder; virtual; abstract; - function GetItemAt(X, Y: Integer): TCustomdxPSExplorerItem; virtual; abstract; - - function CanFocus: Boolean; virtual; - procedure SetFocus; virtual; - - procedure RefreshSorting(ANode: TObject); overload; virtual; - procedure RefreshSorting(AFolder: TdxPSExplorerFolder); overload; virtual; - - property Control: TWinControl read FControl; - property CreationParent: TdxPSExplorerFolder read GetCreationParent; - property Explorer: TCustomdxPSExplorer read FExplorer; - property FocusedItem: TCustomdxPSExplorerItem read GetFocusedItem write SetFocusedItem; - property IsEditing: Boolean read GetIsEditing; - property IsFolderSelected: Boolean read GetIsFolderSelected; - property IsItemSelected: Boolean read GetIsItemSelected; - property IsRootSelected: Boolean read GetIsRootSelected; - property SelectedFolder: TdxPSExplorerFolder read GetSelectedFolder; - property SelectedItem: TCustomdxPSExplorerItem read GetSelectedItem write SetSelectedItem; - property SelectedItemText: string read GetSelectedItemText write SetSelectedItemText; - end; - - TdxPSExplorerTreeBuilderClass = class of TdxPSExplorerTreeBuilder; - - TdxPSExplorerTreeBuilder = class - protected - class procedure BuildTree(AnExplorer: TCustomdxPSExplorer; - ATreeContainer: TCustomdxPSExplorerTreeContainer); virtual; - class procedure CreateFolderNode(ATreeContainer: TCustomdxPSExplorerTreeContainer; - AParent, AFolder: TdxPSExplorerFolder); virtual; - class procedure CreateItemNode(ATreeContainer: TCustomdxPSExplorerTreeContainer; - AParent: TdxPSExplorerFolder; AnItem: TCustomdxPSExplorerItem); virtual; - class procedure PopulateTreeFolder(ATreeContainer: TCustomdxPSExplorerTreeContainer; - AFolder: TdxPSExplorerFolder); virtual; - public - class procedure Register; - class procedure Unregister; - end; - - TdxPSStreamMode = (smRead, smWrite, smReadWrite); - - TCustomdxPSExplorerItemPropertySheetsClass = class of TCustomdxPSExplorerItemPropertySheets; - - TCustomdxPSExplorerItemPropertySheets = class(TCustomdxPSForm) - private - FExplorerItem: TCustomdxPSExplorerItem; - class function FormClass: TCustomdxPSExplorerItemPropertySheetsClass; - protected - procedure Done; virtual; - procedure Initialize; virtual; - public - constructor CreateEx(AnExplorerItem: TCustomdxPSExplorerItem); virtual; - - class function Execute(AnExplorerItem: TCustomdxPSExplorerItem): Boolean; - function ExplorerItem: TCustomdxPSExplorerItem; overload; virtual; - end; - - TCustomdxPSExplorerItemComparator = class - public - class function CompareItems(AnItem1, AnItem2: Pointer): Integer; - end; - - TCustomdxPSExplorerItemHelper = class - public - class function GetHasChildren(AFolder: TdxPSExplorerFolder): Boolean; virtual; - class function GetImageIndex(AnItem: TCustomdxPSExplorerItem): Integer; virtual; - class function GetSelectedIndex(AnItem: TCustomdxPSExplorerItem): Integer; virtual; - class procedure SetHasChildren(AFolder: TdxPSExplorerFolder; Value: Boolean); virtual; - end; - - TCustomdxPSExplorerItemClass = class of TCustomdxPSExplorerItem; - - TCustomdxPSExplorerItem = class - private - FExplorer: TCustomdxPSExplorer; - FName: string; - FParent: TdxPSExplorerFolder; - FWindowHandle: HWND; - procedure SetParent(Value: TdxPSExplorerFolder); - protected - function CompareTo(AnItem: TCustomdxPSExplorerItem): Integer; virtual; - - function DoDelete: Boolean; virtual; - function DoMove(AParent: TdxPSExplorerFolder): Boolean; virtual; - function DoRename(var ANewName: string): Boolean; virtual; - - function GetDisplayName: string; virtual; - function GetImageIndex: Integer; virtual; - function GetInfoTip: string; virtual; - function GetNewName(AReportLink: TBasedxReportLink): string; virtual; - function GetSelectedIndex: Integer; virtual; - - procedure InternalDelete; virtual; - procedure InternalMove(AParent: TdxPSExplorerFolder); virtual; - procedure InternalRename(const AName: string); virtual; - procedure SetName(const Value: string); virtual; - - function GetItemStateInfo: TCustomdxPSExplorerItemStateInfo; virtual; - procedure WriteState(AStream: TStream); virtual; - - procedure WndProc(var Message: TMessage); virtual; - public - constructor Create(AnExplorer: TCustomdxPSExplorer; AParent: TdxPSExplorerFolder); virtual; - destructor Destroy; override; - - function Explorer: TCustomdxPSExplorer; overload; virtual; - - function CanAccept(AnItem: TCustomdxPSExplorerItem): Boolean; virtual; - function CanDelete: Boolean; virtual; - function CanMove: Boolean; virtual; - function CanMoveTo(AParent: TCustomdxPSExplorerItem): Boolean; overload; virtual; - function CanRename: Boolean; virtual; - function CanRenameTo(const AName: string): Boolean; virtual; - procedure Delete; virtual; - function GetUniqueID(out AnUniqueID: TBytes): Integer; virtual; // returns Length of needed memory - function HasAsParent(AnItem: TCustomdxPSExplorerItem): Boolean; - function IsNameChanged(const ANewName: string): Boolean; virtual; - - class function HasPropertySheets: Boolean; - class function PropertySheetsClass: TCustomdxPSExplorerItemPropertySheetsClass; virtual; - function ShowPropertySheets: Boolean; - - function CannotRenameMessageText(const AOldName, ANewName: string): string; virtual; - function DeleteMessageText: string; virtual; - function OverwriteMessageText(Dest: TCustomdxPSExplorerItem): string; virtual; - - property DisplayName: string read GetDisplayName; - property InfoTip: string read GetInfoTip; - property Name: string read FName write SetName; - property Parent: TdxPSExplorerFolder read FParent write SetParent; - end; - - TdxPSExplorerFolderHelper = class(TCustomdxPSExplorerItemHelper) - public - class function GetHasChildren(AFolder: TdxPSExplorerFolder): Boolean; override; - class procedure SetHasChildren(AFolder: TdxPSExplorerFolder; Value: Boolean); override; - end; - - TdxPSExplorerFolderClass = class of TdxPSExplorerFolder; - - TdxPSExplorerFolder = class(TCustomdxPSExplorerItem) - private - FFolders: TList; - FHasChildren: Boolean; - FItems: TList; - function GetFolder(Index: Integer): TdxPSExplorerFolder; - function GetFolderCount: Integer; - function GetHasChildren: Boolean; - function GetIsRoot: Boolean; - function GetItem(Index: Integer): TdxPSExplorerItem; - function GetItemCount: Integer; - function GetItemList(AnItem: TCustomdxPSExplorerItem): TList; overload; - function GetItemList(AnItemClass: TCustomdxPSExplorerItemClass): TList; overload; - procedure SetHasChildren(Value: Boolean); - protected - function CompareTo(AnItem: TCustomdxPSExplorerItem): Integer; override; - function GetImageIndex: Integer; override; - function GetNewName(AReportLink: TBasedxReportLink): string; override; - function GetSelectedIndex: Integer; override; - - function GetItemStateInfo: TCustomdxPSExplorerItemStateInfo; override; - procedure WriteState(AStream: TStream); override; - - procedure LoadData; virtual; - - procedure Add(AnItem: TCustomdxPSExplorerItem); - procedure Remove(AnItem: TCustomdxPSExplorerItem); - - procedure FreeAndNilFolders; - procedure FreeAndNilItems; - - property HasChildren: Boolean read GetHasChildren write SetHasChildren; - public - constructor Create(AnExplorer: TCustomdxPSExplorer; AParent: TdxPSExplorerFolder); override; - destructor Destroy; override; - - function CanAccept(AnItem: TCustomdxPSExplorerItem): Boolean; override; - function CanRenameTo(const AName: string): Boolean; override; - function CreateFolder: TdxPSExplorerFolder; virtual; - function CreateItem(AReportLink: TBasedxReportLink): TdxPSExplorerItem; virtual; - procedure Populate; - - procedure Delete; override; - procedure DeleteFolders; virtual; - procedure DeleteItems; virtual; - - function HasFolders: Boolean; virtual; - function HasItems: Boolean; virtual; - function HasLoadedItem: Boolean; virtual; - - function FolderByName(const AName: string): TdxPSExplorerFolder; virtual; - function ItemByName(const AName: string): TdxPSExplorerItem; virtual; - - function CannotRenameMessageText(const AOldName, ANewName: string): string; override; - function DeleteMessageText: string; override; - function OverwriteMessageText(Dest: TCustomdxPSExplorerItem): string; override; - - property FolderCount: Integer read GetFolderCount; - property Folders[Index: Integer]: TdxPSExplorerFolder read GetFolder; default; - property IsRoot: Boolean read GetIsRoot; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TdxPSExplorerItem read GetItem; - end; - - TdxPSExplorerItemClass = class of TdxPSExplorerItem; - - TdxPSExplorerItem = class(TCustomdxPSExplorerItem) - private - FHasInvalidData: Boolean; - FReportDocument: TdxPSReportDocument; - function GetIsCurrentlyLoaded: Boolean; - procedure SetHasInvalidData(Value: Boolean); - protected - function CompareTo(AnItem: TCustomdxPSExplorerItem): Integer; override; - function DoDelete: Boolean; override; - function GetFormCaption: string; virtual; - function GetImageIndex: Integer; override; - function GetInfoTip: string; override; - function GetNewName(AReportLink: TBasedxReportLink): string; override; - function GetSelectedIndex: Integer; override; - procedure InternalDelete; override; - - procedure DocumentChanged(Sender: TObject); virtual; - procedure SaveDocument; virtual; - - procedure SetReportData(AReportLink: TBasedxReportLink); virtual; - - property FormCaption: string read GetFormCaption; - public - constructor Create(AnExplorer: TCustomdxPSExplorer; AParent: TdxPSExplorerFolder); override; - destructor Destroy; override; - - function CanLoadData: Boolean; virtual; - function CanRenameTo(const AName: string): Boolean; override; - - function CannotRenameMessageText(const AOldName, ANewName: string): string; override; - function DataLoadErrorText: string; virtual; - function DeleteMessageText: string; override; - function OverwriteMessageText(Dest: TCustomdxPSExplorerItem): string; override; - - function CreateDataStream(AMode: TdxPSStreamMode): TStream; virtual; - procedure RetrieveReportData(AReportLink: TBasedxReportLink); virtual; - - function IsLoading: Boolean; virtual; - procedure Load(AReportLink: TBasedxReportLink); - procedure Unload; - - class function PropertySheetsClass: TCustomdxPSExplorerItemPropertySheetsClass; override; - - property HasInvalidData: Boolean read FHasInvalidData write SetHasInvalidData; - property IsCurrentlyLoaded: Boolean read GetIsCurrentlyLoaded; - property ReportDocument: TdxPSReportDocument read FReportDocument; - end; - - TCustomdxPSExplorerContextCommandClass = class of TCustomdxPSExplorerContextCommand; - - TCustomdxPSExplorerContextCommand = class(TPersistent) - private - FBitmap: TBitmap; - FCaption: string; - FData: Integer; - FExplorer: TCustomdxPSExplorer; - FHint: string; - FShortCut: TShortCut; - procedure SetBitmap(Value: TBitmap); - public - constructor Create(AnExplorer: TCustomdxPSExplorer); virtual; - destructor Destroy; override; - - function Enabled: Boolean; virtual; - procedure Execute; virtual; - - function Explorer: TCustomdxPSExplorer; overload; virtual; - - property Bitmap: TBitmap read FBitmap write SetBitmap; - property Caption: string read FCaption write FCaption; - property Data: Integer read FData Write FData; - property Hint: string read FHint write FHint; - property ShortCut: TShortCut read FShortCut write FShortCut; - end; - - TdxPSExplorerContextCommandSeparator = class(TCustomdxPSExplorerContextCommand) - public - constructor Create(AnExplorer: TCustomdxPSExplorer); override; - function Enabled: Boolean; override; - end; - - TdxPSExplorerRefreshContextCommand = class(TCustomdxPSExplorerContextCommand) - public - constructor Create(AnExplorer: TCustomdxPSExplorer); override; - procedure Execute; override; - end; - - TdxPSExplorerState = (esItemCreating, esFolderCreating, esLoading, esRefreshing); - TdxPSExplorerStates = set of TdxPSExplorerState; - - TdxPSExplorerItemDataLoadErrorEvent = procedure(Sender: TCustomdxPSExplorer; - AnItem: TdxPSExplorerItem; var AShowErrorMessage: Boolean; var AText: string) of object; - - TdxPSExplorerClass = class of TCustomdxPSExplorer; - - TCustomdxPSExplorer = class(TComponent, {$IFNDEF DELPHI6} IUnknown, {$ENDIF} - IdxPSExplorerContextCommands, IdxPSExplorerContextCommands2) - private - FActiveFolder: TdxPSExplorerFolder; - FCommands: TList; - FFilterLinkClass: TComponentClass; - FLoadedItem: TdxPSExplorerItem; - FLoadingCounter: Integer; - FLockCounter: Integer; - FNotifiers: TList; - FRefreshCounter: Integer; - FRoot: TdxPSExplorerFolder; - FState: TdxPSExplorerStates; - FStateStream: TStream; - FOnItemDataLoadError: TdxPSExplorerItemDataLoadErrorEvent; - function GetCommand(Index: Integer): TCustomdxPSExplorerContextCommand; - function GetCommandCount: Integer; - function GetFilterLink: string; - function GetNotifier(Index: Integer): TdxPSExplorerChangeNotifier; - function GetNotifierCount: Integer; - function GetRoot: TdxPSExplorerFolder; - procedure SetFilterLink(const Value: string); - protected - {$IFNDEF DELPHI6} - { IUnknown } - function QueryInterface(const IID: TGUID; out Obj): HRESULT; override; - function _Addref: Integer; stdcall; - function _Release: Integer; stdcall; - {$ENDIF} - - { IdxPSExplorerContextCommands } - procedure BuildCommandSet(ABuilder: IdxPSExplorerContextCommandBuilder); virtual; - { IdxPSExplorerContextCommands2 } - procedure FinalizeCommand(ACommand: TCustomdxPSExplorerContextCommand); virtual; - procedure InitializeCommand(ACommand: TCustomdxPSExplorerContextCommand); virtual; - - function AddCommand(ACommandClass: TCustomdxPSExplorerContextCommandClass): TCustomdxPSExplorerContextCommand; - function AddCommandSeparator: TdxPSExplorerContextCommandSeparator; - procedure ClearCommands; - function CreateCommand(ACommandClass: TCustomdxPSExplorerContextCommandClass): TCustomdxPSExplorerContextCommand; - function CreateCommandSeparator: TdxPSExplorerContextCommandSeparator; - function FindCommand(ACommandClass: TCustomdxPSExplorerContextCommandClass): TCustomdxPSExplorerContextCommand; - procedure FreeAndNilCommands; - - class function AcceptItemNameChar(AnItem: TCustomdxPSExplorerItem; Ch: Char): Boolean; virtual; - function CreateItemDataStream(AnItem: TdxPSExplorerItem; AMode: TdxPSStreamMode): TStream; virtual; abstract; - class function GetFolderClass: TdxPSExplorerFolderClass; virtual; - class function GetItemClass: TdxPSExplorerItemClass; virtual; - class function GetRootFolderClass: TdxPSExplorerFolderClass; virtual; - function GetRootDisplayName: string; virtual; - procedure LoadData(AFolder: TdxPSExplorerFolder); - - function CanDelete(AnItem: TCustomdxPSExplorerItem): Boolean; virtual; - function CanMove(AnItem: TCustomdxPSExplorerItem): Boolean; virtual; - function CanMoveTo(AnItem, AParent: TCustomdxPSExplorerItem): Boolean; virtual; - function CanRename(AnItem: TCustomdxPSExplorerItem): Boolean; virtual; - function CanRenameTo(AnItem: TCustomdxPSExplorerItem; const AName: string): Boolean; virtual; - procedure Delete(AnItem: TCustomdxPSExplorerItem); virtual; - procedure MoveTo(AnItem: TCustomdxPSExplorerItem; AParent: TdxPSExplorerFolder); virtual; - procedure PopulateFolder(AFolder: TdxPSExplorerFolder); virtual; - procedure RenameTo(AnItem: TCustomdxPSExplorerItem; AName: string); virtual; - - procedure AfterRefresh; - procedure BeforeRefresh; - procedure DoRefresh; virtual; - procedure RootNeeded; - - procedure DoItemDataLoadError(AnItem: TdxPSExplorerItem); dynamic; - procedure DoLoadData(AFolder: TdxPSExplorerFolder); virtual; abstract; - procedure InternalSetLoadedItem(Value: TdxPSExplorerItem); - - procedure PopulateTreeFolder(ATreeContainer: TCustomdxPSExplorerTreeContainer; AFolder: TdxPSExplorerFolder); - - procedure LoadState; - procedure SaveState; - - procedure NotifyFolderPopulated(AFolder: TdxPSExplorerFolder); - procedure NotifyItemAdded(AnItem: TCustomdxPSExplorerItem); - procedure NotifyItemDataLoaded(AnItem: TdxPSExplorerItem); - procedure NotifyItemDataUnloaded(AnItem: TdxPSExplorerItem); - procedure NotifyItemDeleted(AnItem: TCustomdxPSExplorerItem); - procedure NotifyItemParentChanged(AnItem: TCustomdxPSExplorerItem); - procedure NotifyItemPropertiesChanged(AnItem: TCustomdxPSExplorerItem); - procedure NotifyItemRenamed(AnItem: TCustomdxPSExplorerItem); - procedure NotifyRefresh(AStage: TdxPSExplorerRefreshStage); - - function AreNotificationsLocked: Boolean; - function IndexOfNotifier(ANotifier: TdxPSExplorerChangeNotifier): Integer; - procedure LockNotifications; - procedure ReleaseAndNilNotifiers; - procedure UnlockNotifications; - - procedure BeginLoading; - procedure EndLoading; - function IsLoading: Boolean; - - property CommandCount: Integer read GetCommandCount; - property Commands[Index: Integer]: TCustomdxPSExplorerContextCommand read GetCommand; - property NotifierCount: Integer read GetNotifierCount; - property Notifiers[Index: Integer]: TdxPSExplorerChangeNotifier read GetNotifier; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - function LoadedItem: TdxPSExplorerItem; overload; virtual; - - function CanCreateFolder: Boolean; virtual; - function CanCreateItem: Boolean; virtual; - function CreateNewFolder(AParent: TdxPSExplorerFolder): TdxPSExplorerFolder; virtual; - function CreateNewItem(AParent: TdxPSExplorerFolder; AReportLink: TBasedxReportLink): TdxPSExplorerItem; virtual; - - procedure BuildTree(ATreeContainer: TCustomdxPSExplorerTreeContainer); - function CreateTree(const AHost: IdxPSExplorerTreeContainerHost): TCustomdxPSExplorerTreeContainer; - - function FindCustomItemByUniqueID(const AnUniqueID: TBytes): TCustomdxPSExplorerItem; virtual; - procedure LoadItemData(AnItem: TdxPSExplorerItem; AReportLink: TBasedxReportLink); overload; - procedure UnloadItemData(AnItem: TdxPSExplorerItem); overload; - procedure Refresh; virtual; - - procedure RegisterNotifier(ANotifier: TdxPSExplorerChangeNotifier); - procedure UnregisterNotifier(ANotifier: TdxPSExplorerChangeNotifier); - - property ActiveFolder: TdxPSExplorerFolder read FActiveFolder Write FActiveFolder; - property FilterLinkClass: TComponentClass read FFilterLinkClass write FFilterLinkClass; - property Root: TdxPSExplorerFolder read GetRoot; - property State: TdxPSExplorerStates read FState; - published - property FilterLink: string read GetFilterLink write SetFilterLink; - property OnItemDataLoadError: TdxPSExplorerItemDataLoadErrorEvent read FOnItemDataLoadError write FOnItemDataLoadError; - end; - - TdxReportFootNoteMode = (fnmNone, fnmOnLastPage, fnmOnEveryBottomPage); - TdxReportTitleMode = (tmNone, tmOnFirstPage, tmOnEveryTopPage); - - TdxReportTitle = class(TPersistent) - private - FAdjustOnReportScale: Boolean; - FColor: TColor; - FDefaultFont: TFont; - FFont: TFont; - FLockCalcViewInfos: Boolean; - FMode: TdxReportTitleMode; - FReportLink: TBasedxReportLink; - FText: string; - FTextAlignX: TcxTextAlignX; - FTextAlignY: TcxTextAlignY; - FTransparent: Boolean; - FUpdateCount: Integer; - function IsFontStored: Boolean; - procedure SetAdjustOnReportScale(Value: Boolean); - procedure SetColor(Value: TColor); - procedure SetFont(Value: TFont); - procedure SetMode(Value: TdxReportTitleMode); - procedure SetText(const Value: string); - procedure SetTextAlignX(Value: TcxTextAlignX); - procedure SetTextAlignY(Value: TcxTextAlignY); - procedure SetTransparent(Value: Boolean); - - procedure CalculateRenderInfos; - procedure FontChanged(Sender: TObject); - protected - procedure DoRestoreDefaults; virtual; - procedure InitializeDefaultFont(AFont: TFont); virtual; - - procedure ReadData(AReader: TdxPSDataReader); virtual; - procedure WriteData(AWriter: TdxPSDataWriter); virtual; - - property LockCalcViewInfos: Boolean read FLockCalcViewInfos; - public - constructor Create(AReportLink: TBasedxReportLink); - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure BeginUpdate; - procedure CancelUpdate; - procedure EndUpdate; - - function DefaultFont: TFont; virtual; - procedure RestoreDefaults; - - property ReportLink: TBasedxReportLink read FReportLink; - published - property AdjustOnReportScale: Boolean read FAdjustOnReportScale write SetAdjustOnReportScale default False; - property Color: TColor read FColor write SetColor default clWhite; - property Font: TFont read FFont write SetFont stored IsFontStored; - property Mode: TdxReportTitleMode read FMode write SetMode default tmOnEveryTopPage; - property Text: string read FText write SetText; - property TextAlignX: TcxTextAlignX read FTextAlignX write SetTextAlignX default taCenterX; - property TextAlignY: TcxTextAlignY read FTextAlignY write SetTextAlignY default taCenterY; - property Transparent: Boolean read FTransparent write SetTransparent default True; - end; - - TdxPSReportDocumentClass = class of TdxPSReportDocument; - - TdxPSReportDocument = class(TPersistent) - private - FCaption: string; - FCreationDate: TDateTime; - FCreator: string; - FDescription: string; - FIsCaptionAssigned: Boolean; - FIsCreatorAssigned: Boolean; - FIsDescriptionAssigned: Boolean; - FPreview: TMetafile; - FReportLink: TBasedxReportLink; - FUpdateCount: Integer; - FOnChanged: TNotifyEvent; - function GetCaption: string; - function GetCreator: string; - function GetDescription: string; - function IsCaptionStored: Boolean; - function IsCreatorStored: Boolean; - function IsDesciptionStored: Boolean; - procedure SetCaption(const Value: string); - procedure SetCreationDate(const Value: TDateTime); - procedure SetCreator(const Value: string); - procedure SetDescription(const Value: string); - - procedure ReadIsCaptionAssigned(Reader: TReader); - procedure ReadIsCreatorAssigned(Reader: TReader); - procedure ReadIsDescriptionAssigned(Reader: TReader); - procedure WriteIsCaptionAssigned(Writer: TWriter); - procedure WriteIsCreatorAssigned(Writer: TWriter); - procedure WriteIsDescriptionAssigned(Writer: TWriter); - protected - procedure DefineProperties(Filer: TFiler); override; - - procedure Changed; virtual; - procedure DoAssign(Source: TdxPSReportDocument); virtual; - procedure DoRestoreDefaults; virtual; - function GetInfoTip: string; virtual; - - procedure ReadData(AReader: TdxPSDataReader); virtual; - procedure WriteData(AWriter: TdxPSDataWriter); virtual; - - property UpdateCount: Integer read FUpdateCount write FUpdateCount; - public - constructor Create(AReportLink: TBasedxReportLink); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure BeginUpdate; - procedure CancelUpdate; - procedure EndUpdate; - function IsUpdateLocked: Boolean; - - function DefaultCaption: string; virtual; - function DefaultCreator: string; virtual; - function DefaultDescription: string; virtual; - - procedure RestoreDefaults; - procedure RetrievePreview; virtual; - - property InfoTip: string read GetInfoTip; - property Preview: TMetafile read FPreview; - property ReportLink: TBasedxReportLink read FReportLink; - - property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; - published - property Caption: string read GetCaption write SetCaption stored IsCaptionStored; - property CreationDate: TDateTime read FCreationDate write SetCreationDate; - property Creator: string read GetCreator write SetCreator stored IsCreatorStored; - property Description: string read GetDescription write SetDescription stored IsDesciptionStored; - end; - - TdxPSDataStorageOffsetTableClass = class of TdxPSDataStorageOffsetTable; - - TdxPSDataStorageOffsetTable = class - protected - procedure DoAssign(Source: TdxPSDataStorageOffsetTable); virtual; - public - Information: Longint; - Document: Longint; - Title: Longint; - Data: Longint; - Reserved1: Longint; - Reserved2: Longint; - Reserved3: Longint; - Reserved4: Longint; - constructor Create(ATemplate: TdxPSDataStorageOffsetTable = nil); virtual; - procedure Assign(Source: TdxPSDataStorageOffsetTable); virtual; - procedure Clear; virtual; - procedure ReadData(AReader: TdxPSDataReader); virtual; - procedure WriteData(AWriter: TdxPSDataWriter); virtual; - end; - PdxPSDataStorageOffsetTable = TdxPSDataStorageOffsetTable; // for backward compatibility - - TdxPSDataStorageInfoClass = class of TdxPSDataStorageInfo; - - TdxPSDataStorageInfo = class - public - StorageVersion: Integer; - PrintingSystemVersion: TdxPSVersion; - LinkClassName: string[255]; - ComponentClassName: string[255]; - LinkClass: TdxReportLinkClass; - ComponentClass: TComponentClass; - constructor Create(AReportLink: TBasedxReportLink); virtual; - procedure ReadData(AReader: TdxPSDataReader); virtual; - procedure WriteData(AWriter: TdxPSDataWriter); virtual; - end; - PdxPSDataStorageInfo = TdxPSDataStorageInfo; // for backward compatibility - - TdxAssignedFormatValue = (fvDate, fvTime, fvPageNumber); - TdxAssignedFormatValues = set of TdxAssignedFormatValue; - - TdxReportLinkState = (rlsDataLoading, rlsDataSaving); - TdxReportLinkStates = set of TdxReportLinkState; - - TdxReportLinkDataSource = (rldsComponent, rldsExternalStorage); - - TdxCustomDrawReportLinkTitleEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ARect: TRect; ANom, ADenom: Integer; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var AColor: TColor; AFont: TFont; var ADone: Boolean) of object; - - TdxCustomDrawReportLinkHFEvent = procedure(Sender: TObject; ACanvas: TCanvas; - APageIndex: Integer; var ARect: TRect; ANom, ADenom: Integer; - var ADefaultDrawText, ADefaultDrawBackground: Boolean) of object; - - TdxFilterStyleEvent = procedure(Sender: TBasedxReportLink; - AStyle: TBasedxPrintStyle; var ASupported: Boolean) of object; - - TdxMeasureReportLinkTitleEvent = procedure(Sender: TBasedxReportLink; - var AHeight: Integer) of object; - - TdxPSGetImageListProc = procedure(AnImageList: TCustomImageList) of object; - - - IdxPSNativeWin32ControlHandleSupport = interface - ['{4B649281-A283-4CAC-98D4-08E779A7F9C8}'] - function GetNativeHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; - procedure SetNativeHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); - property NativeHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF} read GetNativeHandle write SetNativeHandle; - end; - - - TBasedxReportLink = class(TComponent {$IFNDEF DELPHI6}, IUnknown {$ENDIF}) - private - FActive: Boolean; - FAssignedFormatValues: TdxAssignedFormatValues; - FBuiltIn: Boolean; - FComponent: TComponent; - FComponentPrinter: TCustomdxComponentPrinter; - FController: TBasedxReportLink; - FCurrentPage: Integer; - FData: Pointer; - FDateFormat: Integer; - FDataSource: TdxReportLinkDataSource; - FDataStream: TStream; - FDefaultFont: TFont; - FDesignerCaption: string; - FDesignerHelpContext: THelpContext; - FDesignWindow: TAbstractdxReportLinkDesignWindow; - FFont: TFont; - FFootersOnEveryPage: Boolean; - FHeadersOnEveryPage: Boolean; - FInternalStreaming: Boolean; - FIsDesignerCaptionAssigned: Boolean; - FIsInvalidReport: Boolean; - FPageNumberFormat: TdxPageNumberFormat; - FPrinterPage: TdxPrinterPage; - FRebuildNeeded: Boolean; - FRenderer: TdxPSReportRenderer; - FRenderInfo: TdxPSReportRenderInfo; - FReportCells: TdxReportCells; - FReportDocument: TdxPSReportDocument; - FReportTitle: TdxReportTitle; - FSavedReportDocument: TdxPSReportDocument; - FSavedReportTitle: TdxReportTitle; - FScaleFonts: Boolean; - FShowDesigner: Boolean; - FShowEmptyPages: Boolean; - FShowPageFooter: Boolean; - FShowPageHeader: Boolean; - FState: TdxReportLinkStates; - FStartPageIndex: Integer; - FStorageName: string; - FStyleManager: TdxPrintStyleManager; - FSubscriber: TdxEventSubscriber; - FTimeFormat: Integer; - FTransparent: Boolean; - FUseHorzDelimiters: Boolean; - FUseVertDelimiters: Boolean; - - FBackgroundBitmapPool: TdxPSBackgroundBitmapPool; - FFontPool: TdxPSReportFontPool; - FPainting: Boolean; - FPrepared: Boolean; - FStreamedActive: Boolean; - - FOnChangeComponent: TNotifyEvent; - FOnCustomDrawPageFooter: TdxCustomDrawReportLinkHFEvent; - FOnCustomDrawPageHeader: TdxCustomDrawReportLinkHFEvent; - FOnCustomDrawReportLinkTitle: TdxCustomDrawReportLinkTitleEvent; - FOnDataSourceChanged: TNotifyEvent; - FOnDestroy: TNotifyEvent; - FOnFilterStyle: TdxFilterStyleEvent; - FOnMeasureReportLinkTitle: TdxMeasureReportLinkTitleEvent; - - function GetAbortBuilding: Boolean; - function GetCaption: string; - function GetCurrentPrintStyle: TBasedxPrintStyle; - function GetDateFormat: Integer; - function GetDateTime: TDateTime; - function GetDescription: string; - function GetDesignerCaption: string; - function GetFontPool: TdxPSReportFontPool; - function GetHasDesignWindow: Boolean; - function GetHasPreviewWindow: Boolean; - function GetIndex: Integer; - function GetIsAggregated: Boolean; - function GetIsBuilding: Boolean; - function GetIsCurrentLink: Boolean; - function GetPageHeight: Integer; - function GetPageNumberFormat: TdxPageNumberFormat; - function GetPageWidth: Integer; - function GetPreviewWindow: TBasedxPreviewWindow; - function GetRealPrinterPage: TdxPrinterPage; - function GetReportTitleMode: TdxReportTitleMode; - function GetReportTitleText: string; - function GetRenderer: TdxPSReportRenderer; - function GetRenderInfo: TdxPSReportRenderInfo; - function GetRenderStage: TdxPSRenderStages; - function GetShowEmptyPages: Boolean; - function GetShowPageFooter: Boolean; - function GetShowPageHeader: Boolean; - ///function GetShrinkToPageHeight: Boolean; - function GetShrinkToPageWidth: Boolean; - function GetStartPageIndex: Integer; - function GetTimeFormat: Integer; - function GetVirtualPageCount: Integer; - function IsDateFormatStored: Boolean; - function IsDesignerCaptionStored: Boolean; - function IsPageNumberFormatStored: Boolean; - function IsTimeFormatStored: Boolean; - procedure SetAbortBuilding(Value: Boolean); - procedure SetAssignedFormatValues(Value: TdxAssignedFormatValues); - procedure SetCaption(const Value: string); - procedure SetComponentPrinter(Value: TCustomdxComponentPrinter); - procedure SetCurrentPage(Value: Integer); - procedure SetDateFormat(Value: Integer); - procedure SetDataSource(Value: TdxReportLinkDataSource); - procedure SetDateTime(const Value: TDateTime); - procedure SetDesignerCaption(const Value: string); - procedure SetDescription(const Value: string); - procedure SetIndex(Value: Integer); - procedure SetIsCurrentLink(Value: Boolean); - procedure SetPageNumberFormat(Value: TdxPageNumberFormat); - procedure SetPrinterPage(Value: TdxPrinterPage); - procedure SetRealPrinterPage(Value: TdxPrinterPage); - procedure SetReportDocument(Value: TdxPSReportDocument); - procedure SetReportTitle(Value: TdxReportTitle); - procedure SetReportTitleMode(Value: TdxReportTitleMode); - procedure SetReportTitleText(const Value: string); - procedure SetShowEmptyPages(Value: Boolean); - procedure SetShowPageFooter(Value: Boolean); - procedure SetShowPageHeader(Value: Boolean); - //procedure SetShrinkToPageHeight(Value: Boolean); - procedure SetShrinkToPageWidth(Value: Boolean); - procedure SetStartPageIndex(Value: Integer); - procedure SetStorageName(const Value: string); - procedure SetStyleManager(Value: TdxPrintStyleManager); - procedure SetTimeFormat(Value: Integer); - procedure SetUseHorzDelimiters(Value: Boolean); - procedure SetUseVertDelimiters(Value: Boolean); - - procedure AssignFormats(AnItem: TdxAssignedFormatValue; AValue: Boolean); - function CurrentComposition: TdxCompositionReportLink; - procedure PaintPage(ACanvas: TCanvas; const APageBounds: TRect; - APageIndex, AContinuousPageIndex, AZoomFactor: Integer); virtual; - function ValidateMargins: Boolean; - - procedure DefineStylesClick(Sender: TObject); - procedure StyleClick(Sender: TObject); - - procedure ReadBuiltIn(Reader: TReader); - procedure ReadComponentName(AReader: TReader); - procedure ReadIsDesignerCaptionAssigned(Reader: TReader); - procedure ReadStyleManagerName(AReader: TReader); - procedure WriteBuiltIn(Writer: TWriter); - procedure WriteComponentName(AWriter: TWriter); - procedure WriteIsDesignerCaptionAssigned(Writer: TWriter); - procedure WriteStyleManagerName(AWriter: TWriter); - protected - FColor: TColor; - FFontIndex: Integer; - {$IFNDEF DELPHI6} - { IUnknown } - function QueryInterface(const IID: TGUID; out Obj): HRESULT; override; - function _Addref: Integer; stdcall; - function _Release: Integer; stdcall; - {$ENDIF} - procedure AssignTo(Dest: TPersistent); override; - procedure DefineProperties(Filer: TFiler); override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure ReadState(Reader: TReader); override; - procedure SetName(const NewName: TComponentName); override; - procedure SetParentComponent(AParent: TComponent); override; - - { Render Info} - procedure CalculateRenderInfos; - procedure ClearGDIPools; - function CreateRenderInfo: TdxPSReportRenderInfo; virtual; - procedure FreeRenderInfos; - function GetRenderInfoClass: TdxPSReportRenderInfoClass; virtual; - - function CreateRenderer: TdxPSReportRenderer; virtual; - procedure FreeRenderer; - function GetRendererClass: TdxPSReportRendererClass; virtual; - - procedure InitializeDefaultFont(AFont: TFont); virtual; - procedure InternalGetDelimiters(ADelimitersHorz, ADelimitersVert: TList); - - function IsEntirePageCustomDrawn: Boolean; - function IsHeaderOrFooterCustomDrawn(AHFObject: TCustomdxPageObject): Boolean; - function IsTitleCustomDrawn: Boolean; - - function NeedCalcEmptyPages: Boolean; - function PageReady(APageIndex: Integer): Boolean; {obsolete: always returns True} - procedure PrepareFonts(UPI: Integer); - - procedure PrepareLongOperation; - procedure UnprepareLongOperation; - - function CreateReportDocument: TdxPSReportDocument; - procedure DocumentChanged(Sender: TObject); virtual; - class function GetReportDocumentClass: TdxPSReportDocumentClass; virtual; - - function CreateReportCells: TdxReportCells; virtual; - function GetReportCellsClass: TdxReportCellsClass; virtual; - - { Read/Write Data } - class function CreateDataReader(AStream: TStream): TdxPSDataReader; - class function CreateDataWriter(AStream: TStream): TdxPSDataWriter; - class function GetDataReaderClass: TdxPSDataReaderClass; virtual; - class function GetDataWriterClass: TdxPSDataWriterClass; virtual; - procedure InternalLoadDataFromStream(AStream: TStream); - procedure InternalReadData(AReader: TdxPSDataReader); virtual; - procedure InternalWriteData(AWriter: TdxPSDataWriter); virtual; - function IsRebuildNeededAndAllowed(ACheckPreviewMode: Boolean): Boolean; - - function RetrieveStorageInfo: TdxPSDataStorageInfo; virtual; - procedure ReadData(AReader: TdxPSDataReader); virtual; - class function ReadOffsetTable(AReader: TdxPSDataReader): TdxPSDataStorageOffsetTable; virtual; - class procedure ReadReportDocument(AReader: TdxPSDataReader; AReportDocument: TdxPSReportDocument); virtual; - class function ReadStorageInfo(AReader: TdxPSDataReader): TdxPSDataStorageInfo; virtual; - class procedure SkipStorageInfo(AReader: TdxPSDataReader); - procedure ReadTitle(AReader: TdxPSDataReader); virtual; - procedure WriteData(AWriter: TdxPSDataWriter); virtual; - class procedure WriteOffsetTable(AWriter: TdxPSDataWriter; AnOffsetTable: TdxPSDataStorageOffsetTable); virtual; - class procedure WriteReportDocument(AWriter: TdxPSDataWriter; AReportDocument: TdxPSReportDocument); virtual; - class procedure WriteStorageInfo(AWriter: TdxPSDataWriter; AStorageInfo: TdxPSDataStorageInfo); virtual; - procedure WriteTitle(AWriter: TdxPSDataWriter); virtual; - - { Read/Write Link Data} - procedure ReadBackgroundBitmapPool(AReader: TdxPSDataReader); - procedure ReadFontPool(AReader: TdxPSDataReader); - procedure ReadRenderInfo(AReader: TdxPSDataReader); - procedure ReadReportData(AReader: TdxPSDataReader); - procedure WriteBackgroundBitmapPool(AWriter: TdxPSDataWriter); - procedure WriteFontPool(AWriter: TdxPSDataWriter); - procedure WriteRenderInfo(AWriter: TdxPSDataWriter); - procedure WriteReportData(AWriter: TdxPSDataWriter); - - { properties read/write virtual methods } - function GetAllowContinuousPageIndexes: Boolean; virtual; - function GetAlwaysBufferedGraphics: Boolean; virtual; - function GetContinuousPageIndexes: Boolean; virtual; - function GetEmptyPagesCanExist: Boolean; virtual; - function GetRealScaleFactor: Integer; virtual; - function GetReportHeight: Integer; virtual; - function GetReportWidth: Integer; virtual; - function IsFontStored: Boolean; virtual; - procedure SetActive(Value: Boolean); virtual; - procedure SetColor(Value: TColor); virtual; - procedure SetComponent(Value: TComponent); virtual; - procedure SetContinuousPageIndexes(Value: Boolean); virtual; - procedure SetFont(Value: TFont); virtual; - procedure SetFootersOnEveryPage(Value: Boolean); virtual; - procedure SetHeadersOnEveryPage(Value: Boolean); virtual; - procedure SetTransparent(Value: Boolean); virtual; - - procedure FontChanged(Sender: TObject); virtual; - procedure LinkModified(Value: Boolean); virtual; - - procedure AfterDesignReport(ADone: Boolean); virtual; - procedure BeforeDesignReport; virtual; - - procedure AfterPrinting; virtual; - procedure BeforePrinting; virtual; - - function CalculateActualScaleFactor: Integer; virtual; - function CannotActivateReportErrorString: string; virtual; - procedure ConstructReport(AReportCells: TdxReportCells); virtual; - procedure ConvertCoords; virtual; - - procedure CustomDraw(AnItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); virtual; - function GetDesignerClass: TdxReportLinkDesignWindowClass; virtual; - procedure DoApplyInDesigner; virtual; - procedure DoCreateReport; virtual; - procedure DoCreateReportData; - procedure DoDataProviderDontPresent; dynamic; - procedure DoDestroyReport; virtual; - procedure DoPageParamsChanged; virtual; - procedure CopyDataStreamFrom(AStream: TStream); - procedure FinalizeDataStream; virtual; - function GetBreakPagesByHardDelimiters: Boolean; virtual; - function GetCriticalSize(AReportCells: TdxReportCells): Integer; virtual; - procedure GetImageLists(AProc: TdxPSGetImageListProc); virtual; - function GetPageCount: Integer; virtual; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; virtual; - function GetUseHardVertDelimiters: Boolean; virtual; - function GetVisiblePageCount: Integer; virtual; - procedure InternalActivate; virtual; - procedure InternalRestoreDefaults; virtual; - procedure InternalRestoreFromOriginal; virtual; - function IsDrawFootersOnEveryPage: Boolean; virtual; - function IsDrawHeadersOnEveryPage: Boolean; virtual; - function IsScaleGridLines: Boolean; virtual; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; virtual; - procedure MakeDelimiters(AReportCells: TdxReportCells; AHorzDelimiters, AVertDelimiters: TList); virtual; - procedure MakeHardDelimiters(AReportCells: TdxReportCells; AVertDelimiters: TList); virtual; - procedure PageParamsChanged(Sender: TdxPrinterPage; AStyle: TBasedxPrintStyle; - AUpdateCodes: TdxPrinterPageUpdateCodes); virtual; - function PossibleCustomDraw(AnItem: TAbstractdxReportCellData): Boolean; virtual; - procedure PrepareReportGroupsLookAndFeels; - procedure RetrievePageAsImage(APageIndex: Integer; AGraphicClass: TGraphicClass; AGraphic: TGraphic); - procedure RetrievePageAsImageCallBack(AComponentPrinter: TCustomdxComponentPrinter; - AReportLink: TBasedxReportLink; AIndex, APageIndex: Integer; const AGraphic: TGraphic; - AData: Pointer; var AContinue: Boolean); - procedure ShowEmptyPagesChanged; virtual; - procedure ShowPageFooterChanged; virtual; - procedure ShowPageHeaderChanged; virtual; - procedure StdProcessDataSourceDontPresent; virtual; - procedure TunePixelsNumerator(AReportCells: TdxReportCells); virtual; - - procedure ComponentUnsupportedError(AComponent: TComponent); - - procedure DoChangeComponent; dynamic; - procedure DoCustomDrawEntirePage(ACanvas: TCanvas; R: TRect; ARealPageIndex: Integer); virtual; - procedure DoCustomDrawPageHeaderOrFooter(AHFObject: TCustomdxPageObject; - ACanvas: TCanvas; APageIndex: Integer; R: TRect; - var ADefaultDrawText, ADefaultDrawBackground: Boolean); virtual; - procedure DoParentCustomDrawPageHeaderOrFooter( - AHFObject: TCustomdxPageObject; ACanvas: TCanvas; APageIndex: Integer; - R: TRect; var ADefaultDrawText, ADefaultDrawBackground: Boolean; - APixelsNumerator: Integer); virtual; - procedure DoParentCustomDrawReportTitle(ACanvas: TCanvas; R: TRect; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var AColor: TColor; AFont: TFont; var ADone: Boolean; - APixelsNumerator: Integer); virtual; - procedure DoCustomDrawPageTitle(ACanvas: TCanvas; R: TRect; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var AColor: TColor; AFont: TFont; var ADone: Boolean); virtual; - - procedure DoDataSourceChanged; dynamic; - procedure DoDestroy; dynamic; - procedure DoMeasureReportLinkTitle(var AHeight: Integer); virtual; - procedure DoProgress(const APercentDone: Double); dynamic; - function IsComposable(AComposition: TdxCompositionReportLink): Boolean; virtual; - function IsSupportedStyle(APrintStyle: TBasedxPrintStyle): Boolean; virtual; - function NeedTwoPassRendering: Boolean; virtual; - - procedure DesignerModified; - procedure DesignerUpdate(TheAll: Boolean); - function IsDesigning: Boolean; - function IsDestroying: Boolean; - function IsLoading: Boolean; - - property AllowContinuousPageIndexes: Boolean read GetAllowContinuousPageIndexes; - property AlwaysBufferedGraphics: Boolean read GetAlwaysBufferedGraphics; - property BackgroundBitmapPool: TdxPSBackgroundBitmapPool read FBackgroundBitmapPool; - property BreakPagesByHardDelimiters: Boolean read GetBreakPagesByHardDelimiters; - property Color: TColor read FColor write SetColor default clWhite; - property ContinuousPageIndexes: Boolean read GetContinuousPageIndexes write SetContinuousPageIndexes default False; - //property Controller: TBasedxReportLink read FController write FController; - property DataStream: TStream read FDataStream; - property Font: TFont read FFont write SetFont stored IsFontStored; - property FontPool: TdxPSReportFontPool read GetFontPool; - property FootersOnEveryPage: Boolean read FFootersOnEveryPage write SetFootersOnEveryPage default False; - property HeadersOnEveryPage: Boolean read FHeadersOnEveryPage write SetHeadersOnEveryPage default False; - property InternalStreaming: Boolean read FInternalStreaming write FInternalStreaming; - property IsBuilding: Boolean read GetIsBuilding; - property IsInvalidReport: Boolean read FIsInvalidReport; //stored in external storage - property PageHeight: Integer read GetPageHeight; - property PageWidth: Integer read GetPageWidth; - property Renderer: TdxPSReportRenderer read GetRenderer; - property RenderInfo: TdxPSReportRenderInfo read GetRenderInfo; - property ScaleFonts: Boolean read FScaleFonts write FScaleFonts default True; - property State: TdxReportLinkStates read FState; - property Transparent: Boolean read FTransparent write SetTransparent default True; - property UseHardVertDelimiters: Boolean read GetUseHardVertDelimiters; - property UseHorzDelimiters: Boolean read FUseHorzDelimiters write SetUseHorzDelimiters default True; - property UseVertDelimiters: Boolean read FUseVertDelimiters write SetUseVertDelimiters default True; - property VirtualPageCount: Integer read GetVirtualPageCount; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure BeforeDestruction; override; - procedure Assign(Source: TPersistent); override; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - - procedure LoadFromRegistry(const APath: string); - procedure SaveToRegistry(const APath: string); - - class function Aggregable: Boolean; virtual; - class function CanBeUsedAsStub: Boolean; virtual; // when data loaded from external storage - class function Serializable: Boolean; virtual; - - function DefaultDateFormat: Integer; virtual; - function DefaultDesignerCaption: string; virtual; - function DefaultFont: TFont; virtual; - function DefaultPageNumberFormat: TdxPageNumberFormat; virtual; - function DefaultTimeFormat: Integer; virtual; - - procedure RestoreDefaults; virtual; - procedure RestoreFromOriginal; virtual; - - function CheckToDesign: Boolean; - function DataProviderPresent: Boolean; virtual; - function DesignerExists(AComponentClass: TComponentClass): Boolean; virtual; - function DesignReport: Boolean; - procedure DestroyReport; virtual; - procedure GetPageColRowCount(out APageColCount, APageRowCount: Integer); virtual; - procedure Initialize; virtual; - function IsEmptyPage(AVirtualPageIndex: Integer): Boolean; virtual; - function IsEmptyReport: Boolean; virtual; - procedure RebuildReport; virtual; - { Use this routine when you attempt to assign ReportLink to Component that actually is in a DLL } - { Don't use this routine in regular cases, i.e. ReportLink is in the same executable file } - procedure SetComponentUnconditionally(Value: TComponent); - - class procedure GetSupportedComponentList(AList: TdxClassList); - class function IsSupportedCompClass(AComponentClass: TClass): Boolean; virtual; - class function LinkClass: TdxReportLinkClass; - class function Supports(AnObject: TObject{TComponent}): Boolean; overload; - class function Supports(AClass: TClass): Boolean; overload; - - function Print(AShowDialog: Boolean; APPrintDlgData: PdxPrintDlgData): Boolean; - procedure PrintEx(APageNums: TdxPageNumbers; ACopies: Integer; ACollate: Boolean); - procedure PrintPages(const APageIndexes: array of Integer); - procedure PrintPagesEx(const APageIndexes: array of Integer; APageNums: TdxPageNumbers; - ACopyCount: Integer; ACollate: Boolean); - - procedure Preview(Modal: Boolean = True); - function PreviewExists: Boolean; - - procedure BuildPageSetupMenu(ARootItem: TComponent; AData: Pointer; - AIncludeDefineItem: Boolean = True); - procedure DefinePrintStylesDlg; - procedure GetFilteredStyles(AStrings: TStrings); - function PageSetup: Boolean; - function PageSetupEx(AActivePageIndex: Integer; AShowPreviewBtn, AShowPrintBtn: Boolean; - out APreviewBtnClicked, APrintBtnClicked: Boolean): Boolean; overload; - function PageSetupEx(AActivePageIndex: Integer; - APreviewBtnClicked, APrintBtnClicked: PBoolean): Boolean; overload; {$IFDEF DELPHI6} deprecated; {$ENDIF} - - function ShowDateTimeFormatsDlg: Boolean; - function ShowPageNumberFormatsDlg: Boolean; - function ShowTitlePropertiesDlg: Boolean; - - function SupportsScaling: Boolean; virtual; - - function CanChangeTitle: Boolean; - function SupportsTitle: Boolean; virtual; - - function CanLoadData: Boolean; virtual; - function CanSaveData: Boolean; virtual; - function CanUnloadData: Boolean; virtual; - function GetNewReportStorageName: string; virtual; - procedure LoadDataFromFile(const AName: string); virtual; - procedure LoadDataFromStream(AStream: TStream); virtual; - procedure SaveDataToFile(const AName: string); virtual; - procedure SaveDataToStream(AStream: TStream); virtual; - - class function ExtractComponentClass(AStream: TStream; ARaiseException: Boolean = False): TComponentClass; - class function ExtractLinkClass(AStream: TStream; ARaiseException: Boolean = False): TdxReportLinkClass; - class function ExtractOffsetTable(AStream: TStream; ARaiseException: Boolean = False): TdxPSDataStorageOffsetTable; - class function ExtractReportDocument(AStream: TStream; ARaiseException: Boolean = False): TdxPSReportDocument; - class function ExtractStorageInfo(AStream: TStream; ARaiseException: Boolean = False): TdxPSDataStorageInfo; - class function ExtractStorageVersion(AStream: TStream; ARaiseException: Boolean = False): Integer; - class procedure FinalizeStorageInfo(var AStorageInfo: TdxPSDataStorageInfo); - class function PossibleDataStorage(AStream: TStream; ARaiseException: Boolean = False): Boolean; overload; - class function PossibleDataStorage(const AFileName: string; ARaiseException: Boolean = False): Boolean; overload; - - function AddBackgroundBitmapToPool(ABitmap: TBitmap): Integer; - function AddFontToPool(AFont: TFont): Integer; - - function CreateGroupLookAndFeel(AClass: TdxPSReportGroupLookAndFeelClass; ACheckExisting: Boolean = True): TdxPSReportGroupLookAndFeel; - function FindGroupLookAndFeelByClass(AClass: TdxPSReportGroupLookAndFeelClass): TdxPSReportGroupLookAndFeel; - function IndexOfReportGroupLookAndFeel(ALookAndFeel: TdxPSReportGroupLookAndFeel): Integer; - - procedure DrawPageHeader(APageIndex: Integer; ARect: TRect; - ATitleParts: TdxPageTitleParts; ADrawBackground: Boolean); - procedure DrawPageFooter(APageIndex: Integer; ARect: TRect; - ATitleParts: TdxPageTitleParts; ADrawBackground: Boolean); - - procedure DrawCheckBox(Canvas: TCanvas; var R: TRect; Checked, Enabled, FlatBorder: Boolean; - BoldBorder: Boolean = False); overload; virtual; - procedure DrawCheckBox(Canvas: TCanvas; var R: TRect; Checked, Enabled, IsRadio: Boolean; - EdgeStyle: TdxCheckButtonEdgeStyle; BorderColor: TColor = clWindowText); overload; virtual; - procedure drawEdge(Canvas: TCanvas; var R: TRect; EdgeMode: TdxCellEdgeMode; - InnerEdge, OuterEdge: TdxCellEdgeStyle; Sides: TdxCellSides = [csLeft..csBottom]; - Soft: Boolean = True); virtual; - procedure DrawEllipse(Canvas: TCanvas; R: TRect; ForeColor, BkColor: TColor; - Pattern: TdxPSFillPatternClass; BorderColor: TColor; BorderThickness: Integer = 1); virtual; - procedure DrawExpandButton(Canvas: TCanvas; var R: TRect; - Expanded, DrawBorder, Edge3D, Edge3DSoft, Shadow, FillInterior: Boolean; - BorderColor, InteriorColor: TColor); virtual; - procedure DrawGlyph(DC: HDC; const R: TRect; AGlyph: Byte); - procedure DrawGraphic(Canvas: TCanvas; var R: TRect; const ClipRect: TRect; - ImageList: TCustomImageList; ImageIndex: Integer; Graphic: TGraphic; - GraphicTransparent, Transparent: Boolean; BkColor: TColor); virtual; - procedure DrawGraphicEx(Canvas: TCanvas; var R: TRect; const ClipRect: TRect; - ImageList: TCustomImageList; ImageIndex: Integer; Graphic: TGraphic; - GraphicTransparent, Transparent: Boolean; BkColor, ForeColor: TColor; - Pattern: TdxPSFillPatternClass; AnActualImageBuffering: TdxCellImageActualBuffering = cibAlways); virtual; - procedure DrawRectangle(Canvas: TCanvas; R: TRect; ForeColor, BkColor: TColor; - ContentPattern: TdxPSFillPatternClass; BorderColor: TColor; - BorderThickness: Integer = 1); virtual; - procedure DrawRoundRect(Canvas: TCanvas; R: TRect; CornerWidth, CornerHeight: Integer; - ForeColor, BkColor: TColor; ContentPattern: TdxPSFillPatternClass; - BorderColor: TColor; BorderThickness: Integer = 1); virtual; - procedure DrawSortMark(Canvas: TCanvas; var R: TRect; SortOrder: TdxCellSortOrder; Mono: Boolean); virtual; - procedure drawText(Canvas: TCanvas; var R: TRect; AIndent: Integer; - const Text: string; Font: TFont; BkColor: TColor; TextAlignX: TcxTextAlignX; - TextAlignY: TcxTextAlignY; FillBackground, Multiline, EndEllipsis: Boolean); virtual; - procedure drawTextEx(Canvas: TCanvas; var R: TRect; MaxLineCount: Integer; - LeftIndent, RightIndent: Integer; const Text: string; Font: TFont; - BkColor: TColor; TextAlignX: TcxTextAlignX; TextAlignY: TcxTextAlignY; - FillBackground, Multiline, EndEllipsis, PreventLeftTextExceed, PreventTopTextExceed: Boolean); virtual; - procedure FillEllipse(Canvas: TCanvas; const R: TRect; Color: TColor); virtual; - procedure FillEllipseEx(Canvas: TCanvas; const R: TRect; ForeColor, BkColor: TColor; Pattern: TdxPSFillPatternClass); virtual; - procedure FillRectEx(Canvas: TCanvas; const R: TRect; ForeColor, BkColor: TColor; Pattern: TdxPSFillPatternClass); virtual; - procedure FillRoundRect(Canvas: TCanvas; const R: TRect; CornerWidth, CornerHeight: Integer; Color: TColor); virtual; - procedure FillRoundRectEx(Canvas: TCanvas; const R: TRect; CornerWidth, CornerHeight: Integer; - ForeColor, BkColor: TColor; Pattern: TdxPSFillPatternClass); virtual; - procedure FillRgnEx(Canvas: TCanvas; Rgn: HRGN; ForeColor, BkColor: TColor; Pattern: TdxPSFillPatternClass); virtual; - procedure FrameEllipse(Canvas: TCanvas; R: TRect; Color: TColor; Thickness: Integer = 1); - procedure frameRect(Canvas: TCanvas; R: TRect; Color: TColor; Sides: TdxCellSides = [csLeft..csBottom]; - Thickness: Integer = 1); - procedure FrameRoundRect(Canvas: TCanvas; R: TRect; CornerWidth, CornerHeight: Integer; - Color: TColor; Thickness: Integer = 1); virtual; - - { for internal use only } - function RealPageIndexToVirtualPageIndex(APageIndex: Integer; - ATakeIntoAccountEmptyPages: Boolean): Integer; virtual; - function VirtualPageIndexToRealPageIndex(APageIndex: Integer): Integer; virtual; - - property AbortBuilding: Boolean read GetAbortBuilding write SetAbortBuilding; - property BuiltIn: Boolean read FBuiltIn write FBuiltIn; - property ComponentPrinter: TCustomdxComponentPrinter read FComponentPrinter write SetComponentPrinter; - property Controller: TBasedxReportLink read FController write FController; - property CurrentPage: Integer read FCurrentPage write SetCurrentPage; - property CurrentPrintStyle: TBasedxPrintStyle read GetCurrentPrintStyle; - property Data: Pointer read FData write FData; - property DataSource: TdxReportLinkDataSource read FDataSource write SetDataSource; - property DesignWindow: TAbstractdxReportLinkDesignWindow read FDesignWindow; - property EmptyPagesCanExist: Boolean read GetEmptyPagesCanExist; - property HasDesignWindow: Boolean read GetHasDesignWindow; - property HasPreviewWindow: Boolean read GetHasPreviewWindow; - property IsAggregated: Boolean read GetIsAggregated; - property PageCount: Integer read GetPageCount; - property PreviewWindow: TBasedxPreviewWindow read GetPreviewWindow; - property RealPrinterPage: TdxPrinterPage read GetRealPrinterPage write SetRealPrinterPage; - property RealScaleFactor: Integer read GetRealScaleFactor; - property RebuildNeeded: Boolean read FRebuildNeeded; - property RenderStage: TdxPSRenderStages read GetRenderStage; - property ReportCells: TdxReportCells read FReportCells; - property ReportHeight: Integer read GetReportHeight; - property ReportWidth: Integer read GetReportWidth; - property ShowEmptyPages: Boolean read GetShowEmptyPages write SetShowEmptyPages default False; - property VisiblePageCount: Integer read GetVisiblePageCount; - published - property Active: Boolean read FActive write SetActive default False; - property Caption: string read GetCaption write SetCaption stored False; - property Component: TComponent read FComponent write SetComponent; - property Description: string read GetDescription write SetDescription stored False; - property DateFormat: Integer read GetDateFormat write SetDateFormat stored IsDateFormatStored default 0; - property DateTime: TDateTime read GetDateTime write SetDateTime stored False; - property DesignerCaption: string read GetDesignerCaption write SetDesignerCaption stored IsDesignerCaptionStored; - property DesignerHelpContext: THelpContext read FDesignerHelpContext write FDesignerHelpContext default 0; - property Index: Integer read GetIndex write SetIndex stored False; - property IsCurrentLink: Boolean read GetIsCurrentLink write SetIsCurrentLink stored False; - property PageNumberFormat: TdxPageNumberFormat read GetPageNumberFormat write SetPageNumberFormat stored IsPageNumberFormatStored; - property PrinterPage: TdxPrinterPage read FPrinterPage write SetPrinterPage; - property ReportDocument: TdxPSReportDocument read FReportDocument write SetReportDocument; - property ReportTitle: TdxReportTitle read FReportTitle write SetReportTitle; - property ReportTitleMode: TdxReportTitleMode read GetReportTitleMode write SetReportTitleMode stored False default tmOnEveryTopPage; - property ReportTitleText: string read GetReportTitleText write SetReportTitleText stored False; - property ShowDesigner: Boolean read FShowDesigner write FShowDesigner stored False; - property ShowPageFooter: Boolean read GetShowPageFooter write SetShowPageFooter default True; - property ShowPageHeader: Boolean read GetShowPageHeader write SetShowPageHeader default True; - //property ShrinkToPageHeight: Boolean read GetShrinkToPageHeight write SetShrinkToPageHeight default False; - property ShrinkToPageWidth: Boolean read GetShrinkToPageWidth write SetShrinkToPageWidth default False; - property StartPageIndex: Integer read GetStartPageIndex write SetStartPageIndex default 1; - property StorageName: string read FStorageName write SetStorageName; - property StyleManager: TdxPrintStyleManager read FStyleManager write SetStyleManager; - property TimeFormat: Integer read GetTimeFormat write SetTimeFormat stored IsTimeFormatStored default 0; - property AssignedFormatValues: TdxAssignedFormatValues read FAssignedFormatValues write SetAssignedFormatValues default []; //must be last - - property OnChangeComponent: TNotifyEvent read FOnChangeComponent write FOnChangeComponent; - property OnCustomDrawPageFooter: TdxCustomDrawReportLinkHFEvent read FOnCustomDrawPageFooter write FOnCustomDrawPageFooter; - property OnCustomDrawPageHeader: TdxCustomDrawReportLinkHFEvent read FOnCustomDrawPageHeader write FOnCustomDrawPageHeader; - property OnCustomDrawReportLinkTitle: TdxCustomDrawReportLinkTitleEvent read FOnCustomDrawReportLinkTitle write FOnCustomDrawReportLinkTitle; - property OnDataSourceChanged: TNotifyEvent read FOnDataSourceChanged write FOnDataSourceChanged; - property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy; - property OnFilterStyle: TdxFilterStyleEvent read FOnFilterStyle write FOnFilterStyle; - property OnMeasureReportLinkTitle: TdxMeasureReportLinkTitleEvent read FOnMeasureReportLinkTitle write FOnMeasureReportLinkTitle; - end; - - TdxCompositionLinkItem = class(TCollectionItem) - private - FBuiltIn: Boolean; - FReportLink: TBasedxReportLink; - FLoadingReportLinkName: string; - procedure SetReportLink(Value: TBasedxReportLink); - procedure ReadData(Reader: TReader); - procedure ReadLinkName(Reader: TReader); - procedure WriteData(Writer: TWriter); - procedure WriteLinkName(Writer: TWriter); - protected - procedure DefineProperties(Filer: TFiler); override; - procedure SetIndex(Value: Integer); override; - function Composition: TdxCompositionReportLink; - public - constructor Create(Collection: TCollection); override; - procedure Assign(Source: TPersistent); override; - property BuiltIn: Boolean read FBuiltIn write FBuiltIn; - published - property ReportLink: TBasedxReportLink read FReportLink write SetReportLink; - end; - - TdxCompositionLinkItems = class(TCollection) - private - FComposition: TdxCompositionReportLink; - FDontNeedRebuild: Boolean; - function GetItem(Index: Integer): TdxCompositionLinkItem; - procedure SetItem(Index: Integer; Value: TdxCompositionLinkItem); - protected - procedure CorrectLinksAfterLoadings; - function GetOwner: TPersistent; override; - procedure Update(Item: TCollectionItem); override; - public - constructor Create(AComposition: TdxCompositionReportLink); - - function Add: TdxCompositionLinkItem; - function AddLink(AReportLink: TBasedxReportLink): TdxCompositionLinkItem; - procedure DeleteItemsByLink(AReportLink: TBasedxReportLink); - procedure DeleteNonBuiltIns; - procedure GetLinkEntries(AReportLink: TBasedxReportLink; AList: TList); // returns list of Items - function IndexOfLink(AReportLink: TBasedxReportLink): Integer; // returns first entry for AReportLink in Items - function IsLinkComposable(AReportLink: TBasedxReportLink): Boolean; - function LinkExists(AReportLink: TBasedxReportLink): Boolean; - function NextAssignedItem(AnItem: TdxCompositionLinkItem): TdxCompositionLinkItem; - function NonBuiltInsExists: Boolean; - function PrevAssignedItem(AnItem: TdxCompositionLinkItem): TdxCompositionLinkItem; - - property Composition: TdxCompositionReportLink read FComposition; - property Items[Index: Integer]: TdxCompositionLinkItem read GetItem write SetItem; default; - end; - - TdxPSCompositionReportRenderInfo = class(TdxPSReportRenderInfo) - private - FNonEmptyPageCount: Integer; - FPageColCount: Integer; - FPageRowCount: Integer; - FStartIndexes: TList; - function GetReportLink: TdxCompositionReportLink; - function GetStartIndex(Index: Integer): Integer; - function GetStartIndexCount: Integer; - procedure SetStartIndex(Index: Integer; Value: Integer); - protected - function CalculateNonEmptyPageCount: Integer; virtual; - function CalculatePageColCount: Integer; virtual; - function CalculatePageRowCount: Integer; virtual; - - procedure DoCalculate; override; - procedure Refresh; override; - - function GetNonEmptyPageCount: Integer; override; - function GetPageColCount: Integer; override; - function GetPageRowCount: Integer; override; - - function RealPageIndexToVirtualPageIndex(APageIndex: Integer; ATakeIntoAccountEmptyPages: Boolean): Integer; override; - function VirtualPageIndexToRealPageIndex(APageIndex: Integer): Integer; override; - - procedure GetCompositionLinkItemByPageIndexAndFixIndex(APageIndex: Integer; - var APageIndexRelativeToLink: Integer; var AnItem: TdxCompositionLinkItem); - public - constructor Create(AReportLink: TBasedxReportLink); override; - destructor Destroy; override; - - property ReportLink: TdxCompositionReportLink read GetReportLink; - property StartIndexCount: Integer read GetStartIndexCount; - property StartIndexes[Index: Integer]: Integer read GetStartIndex write SetStartIndex; - end; - - TdxPSCompositionReportRenderer = class(TdxPSReportRenderer) - private - function GetRenderInfo: TdxPSCompositionReportRenderInfo; - function GetReportLink: TdxCompositionReportLink; - public - procedure RenderPage(ACanvas: TCanvas; const APageBounds: TRect; - APageIndex, AContinuousPageIndex, AZoomFactor: Integer); override; - - property RenderInfo: TdxPSCompositionReportRenderInfo read GetRenderInfo; - property ReportLink: TdxCompositionReportLink read GetReportLink; - end; - - TdxPSReportCompositionDocument = class(TdxPSReportDocument) - private - function GetReportLink: TdxCompositionReportLink; - public - function DefaultDescription: string; override; - property ReportLink: TdxCompositionReportLink read GetReportLink; - end; - - TdxCompositionReportLinkEvent = procedure(Sender: TdxCompositionReportLink; - AItem: TdxCompositionLinkItem) of object; - - TdxCompositionState = (csRebuildReportLink); - TdxCompositionStates = set of TdxCompositionState; - - TdxCompositionOption = (coCanEdit, coShowDescription); - TdxCompositionOptions = set of TdxCompositionOption; - - TdxCompositionReportLink = class(TBasedxReportLink) - private - FCompositionState: TdxCompositionStates; - FContinuousPageIndexes: Boolean; - FDesignerOptions: TdxCompositionOptions; - FInvalidatedLinks: TList; - FItems: TdxCompositionLinkItems; - FOnAfterBuildReport: TdxCompositionReportLinkEvent; - FOnBeforeBuildReport: TdxCompositionReportLinkEvent; - function GetRenderer: TdxPSCompositionReportRenderer; - function GetRenderInfo: TdxPSCompositionReportRenderInfo; - function GetReportDocument: TdxPSReportCompositionDocument; - procedure SetItems(Value: TdxCompositionLinkItems); - procedure SetReportDocument(Value: TdxPSReportCompositionDocument); - - procedure ActivateLink(AReportLink: TBasedxReportLink); - procedure UpdateComposition(AUpdateCodes: TdxPrinterPageUpdateCodes); - protected - procedure Notification(AComponent: TComponent; AOperation: TOperation); override; - - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure DoCreateReport; override; - function GetRendererClass: TdxPSReportRendererClass; override; - function GetRenderInfoClass: TdxPSReportRenderInfoClass; override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - procedure ShowEmptyPagesChanged; override; - procedure ShowPageFooterChanged; override; - procedure ShowPageHeaderChanged; override; - procedure StdProcessDataSourceDontPresent; override; - - function GetAllowContinuousPageIndexes: Boolean; override; - function GetContinuousPageIndexes: Boolean; override; - function GetEmptyPagesCanExist: Boolean; override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - function GetReportHeight: Integer; override; - function GetReportWidth: Integer; override; - procedure SetContinuousPageIndexes(Value: Boolean); override; - - procedure DoAfterBuildReport(AItem: TdxCompositionLinkItem); dynamic; - procedure DoBeforeBuildReport(AItem: TdxCompositionLinkItem); dynamic; - - class function GetReportDocumentClass: TdxPSReportDocumentClass; override; - - property Renderer: TdxPSCompositionReportRenderer read GetRenderer; - property RenderInfo: TdxPSCompositionReportRenderInfo read GetRenderInfo; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function DefaultDesignerCaption: string; override; - - { for internal use only } - function RealPageIndexToVirtualPageIndex(APageIndex: Integer; - ATakeIntoAccountEmptyPages: Boolean): Integer; override; - function VirtualPageIndexToRealPageIndex(APageIndex: Integer): Integer; override; - - class function CanBeUsedAsStub: Boolean; override; - class function Serializable: Boolean; override; - function DataProviderPresent: Boolean; override; - function IsEmptyPage(AVirtualPageIndex: Integer): Boolean; override; - function SupportsTitle: Boolean; override; - - procedure GetItems(AStrings: TStrings; AExcludeUnassigned: Boolean); - - property CompositionState: TdxCompositionStates read FCompositionState; - property ReportDocument: TdxPSReportCompositionDocument read GetReportDocument write SetReportDocument; - published - property ContinuousPageIndexes default True; - property DesignerOptions: TdxCompositionOptions read FDesignerOptions write FDesignerOptions - default [coCanEdit, coShowDescription]; - property Items: TdxCompositionLinkItems read FItems write SetItems; - - property OnAfterBuildReport: TdxCompositionReportLinkEvent read FOnAfterBuildReport write FOnAfterBuildReport; - property OnBeforeBuildReport: TdxCompositionReportLinkEvent read FOnBeforeBuildReport write FOnBeforeBuildReport; - end; - - { Report PropertySheets } - - TdxReportLinkDesignWindowState = (dwsInitialize); - TdxReportLinkDesignWindowStates = set of TdxReportLinkDesignWindowState; - - TAbstractdxReportLinkDesignWindow = class(TCustomdxPSForm) - private - FApplyed: Boolean; - FModified: Boolean; - FPrevKeyPreview: Boolean; - FReportLink: TBasedxReportLink; - function GetComponent: TComponent; - function GetIsDesigning: Boolean; - function IsCaptionStored: Boolean; - procedure SetModified(Value: Boolean); - procedure WMHelp(var message: TWMHelp); message WM_HELP; - protected - FState: TdxReportLinkDesignWindowStates; - procedure CreateWnd; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - - procedure AfterRebuildReport; virtual; - procedure BeforeRebuildReport; virtual; - - procedure Initialize; virtual; - procedure LoadStrings; virtual; - procedure UpdateControlsState; virtual; - - property Applyed: Boolean read FApplyed write FApplyed; - property Component: TComponent read GetComponent; - public - constructor Create(AOwner: TComponent); override; - function Execute: Boolean; virtual; - - property IsDesigning: Boolean read GetIsDesigning; - property Modified: Boolean read FModified write SetModified; - property ReportLink: TBasedxReportLink read FReportLink write FReportLink; - property State: TdxReportLinkDesignWindowStates read FState; - published - property Caption stored IsCaptionStored; - end; - - TStandarddxReportLinkDesignWindow = class(TAbstractdxReportLinkDesignWindow) - private - FAtLeastOneTimeApplied: Boolean; - FUpdateControlsCount: Integer; - procedure SetAtLeastOneTimeApplied(Value: Boolean); - - procedure CreateStdButtons; - procedure PlaceStdButtons; - procedure RegroupStdButtons; - protected - {$IFDEF DELPHI7} - FPrevPreviewHostWindowProc: TWndMethod; - {$ENDIF} - procedure Resize; override; - - function CanApply: Boolean; virtual; - procedure DoApply; virtual; - procedure Initialize; override; - procedure LoadStrings; override; - procedure UpdateControlsState; override; - - procedure ApplyClick(Sender: TObject); virtual; - procedure RestoreDefaultsClick(Sender: TObject); virtual; - procedure RestoreOriginalClick(Sender: TObject); virtual; - procedure TitlePropertiesClick(Sender: TObject); virtual; - - procedure DoInitialize; virtual; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; virtual; - procedure PreviewHostWindowProc(var Message: TMessage); virtual; - {$ENDIF} - procedure PaintPreview(ACanvas: TCanvas; R: TRect); virtual; - procedure UpdatePreview; virtual; - - property AtLeastOneTimeApplied: Boolean read FAtLeastOneTimeApplied write SetAtLeastOneTimeApplied; - {$IFDEF DELPHI7} - property PreviewHost: TCustomPanel read GetPreviewHost; - {$ENDIF} - property UpdateControlsCount: Integer read FUpdateControlsCount; - public - constructor Create(AOwner: TComponent); override; - {$IFDEF DELPHI7} - destructor Destroy; override; - {$ENDIF} - - procedure BeginUpdateControls; virtual; - procedure EndUpdateControls; virtual; - function LockControlsUpdate: Boolean; - published - btnApply: TButton; - btnCancel: TButton; - btnHelp: TButton; - btnOK: TButton; - btnRestoreDefaults: TButton; - btnRestoreOriginal: TButton; - btnTitleProperties: TButton; - end; - - { Print Styles } - - TdxPSPrintStyle = class(TBasedxPrintStyle) - private - FOnAfterGenerating: TNotifyEvent; - FOnAfterPrinting: TNotifyEvent; - FOnBeforeGenerating: TNotifyEvent; - FOnBeforePrinting: TNotifyEvent; - procedure AfterGenerating; - procedure BeforeGenerating; - protected - procedure AddStdHFFunctions; virtual; - - procedure DoAfterGenerating; virtual; - procedure DoAfterPrinting; override; - procedure DoBeforeGenerating; virtual; - procedure DoBeforePrinting; override; - - procedure InitializeDefaultStyleGlyph(ABitmap: TBitmap); override; - public - constructor Create(AOwner: TComponent); override; - - function DefaultPageFooterText(APart: TdxPageTitlePart): string; override; - function DefaultStyleCaption: string; override; - published - property OnAfterGenerating: TNotifyEvent read FOnAfterGenerating write FOnAfterGenerating; - property OnAfterPrinting: TNotifyEvent read FOnAfterPrinting write FOnAfterPrinting; - property OnBeforeGenerating: TNotifyEvent read FOnBeforeGenerating write FOnBeforeGenerating; - property OnBeforePrinting: TNotifyEvent read FOnBeforePrinting write FOnBeforePrinting; - end; - - { Preview Window} - - TdxPreviewEnableOption = (peoCanChangeMargins, peoHelp, peoPageBackground, peoPageSetup, - peoPreferences, peoPrint, peoReportDesign); - TdxPreviewEnableOptions = set of TdxPreviewEnableOption; - TdxPreviewVisibleOption = (pvoHelp, pvoPageBackground, pvoPageSetup, pvoPreferences, - pvoPrint, pvoReportDesign, pvoPrintStyles, pvoReportFileOperations, pvoPageMargins); - TdxPreviewVisibleOptions = set of TdxPreviewVisibleOption; - TdxPSPreviewState = (prsNone, prsEditHeaders, prsEditFooters); - TdxPSThumbnailsSize = (tsSmall, tsLarge); - - {$IFDEF OLEDRAGANDDROP} - {$ENDIF} - - TdxPreviewWindowClass = class of TBasedxPreviewWindow; - - TBasedxPreviewWindow = class(TCustomdxPSForm, {$IFNDEF DELPHI6} IUnknown, {$ENDIF} - IdxPSExplorerContextCommandBuilder {$IFDEF OLEDRAGANDDROP}, IDropTarget{$ENDIF}) - private - {$IFDEF OLEDRAGANDDROP} - FDraggedFileName: string; - {$ENDIF} - function GetReportLink: TBasedxReportLink; - protected - {$IFNDEF DELPHI6} - { IUnknown } - function QueryInterface(const IID: TGUID; out Obj): HRESULT; override; - function _Addref: Integer; stdcall; - function _Release: Integer; stdcall; - {$ENDIF} - {$IFDEF OLEDRAGANDDROP} - { IDropTarget } - function IDropTarget.DragEnter = IDropTarget_DragEnter; - function IDropTarget.DragOver = IDropTarget_DragOver; - function IDropTarget.DragLeave = IDropTarget_DragLeave; - function IDropTarget.Drop = IDropTarget_Drop; - - function IDropTarget_DragEnter(const DataObj: IDataObject; grfKeyState: Longint; - Pt: TPoint; var dwEffect: Longint): HRESULT; stdcall; - function IDropTarget_DragOver(grfKeyState: Longint; Pt: TPoint; - var dwEffect: Longint): HRESULT; stdcall; - function IDropTarget_DragLeave: HRESULT; stdcall; - function IDropTarget_Drop(const DataObj: IDataObject; grfKeyState: Longint; Pt: TPoint; - var dwEffect: Longint): HRESULT; stdcall; - {$ENDIF} - - procedure AddExplorerContextCommand(ACommand: TCustomdxPSExplorerContextCommand); virtual; - procedure UpdateExplorerContextCommands; virtual; - - function GetActivePageIndex: Integer; virtual; abstract; - function GetBackground: TdxBackground; virtual; abstract; - function GetComponentPrinter: TCustomdxComponentPrinter; virtual; abstract; - function GetExplorerTree: TCustomdxPSExplorerTreeContainer; virtual; - function GetHFEditPart: TdxPageTitlePart; virtual; - function GetPageCount: Integer; virtual; abstract; - function GetPreviewEnableOptions: TdxPreviewEnableOptions; virtual; abstract; - function GetPreviewVisibleOptions: TdxPreviewVisibleOptions; virtual; abstract; - function GetSaveZoomPosition: Boolean; virtual; abstract; - function GetShowExplorer: Boolean; virtual; - function GetShowThumbnails: Boolean; virtual; - function GetState: TdxPSPreviewState; virtual; - function GetThumbnailsSize: TdxPSThumbnailsSize; virtual; abstract; - function GetVisiblePageSize: TPoint; virtual; abstract; - function GetZoomFactor: Integer; virtual; abstract; - procedure SetActivePageIndex(Value: Integer); virtual; abstract; - procedure SetBackground(const Value: TdxBackground); virtual; abstract; - procedure SetComponentPrinter(const Value: TCustomdxComponentPrinter); virtual; abstract; - procedure SetHFEditPart(const Value: TdxPageTitlePart); virtual; abstract; - procedure SetPageCount(Value: Integer); virtual; abstract; - procedure SetPreviewEnableOptions(const Value: TdxPreviewEnableOptions); virtual; abstract; - procedure SetPreviewVisibleOptions(const Value: TdxPreviewVisibleOptions); virtual; abstract; - procedure SetSaveZoomPosition(Value: Boolean); virtual; abstract; - procedure SetShowExplorer(Value: Boolean); virtual; - procedure SetShowThumbnails(Value: Boolean); virtual; - procedure SetState(const Value: TdxPSPreviewState); virtual; abstract; - procedure SetThumbnailsSize(const Value: TdxPSThumbnailsSize); virtual; abstract; - procedure SetZoomFactor(Value: Integer); virtual; abstract; - - procedure BeginUpdate; virtual; - procedure CancelUpdate; virtual; - procedure EndUpdate; virtual; - function Locked: Boolean; virtual; - procedure UpdateCaption; - - procedure CreationComplete; virtual; - procedure PaintPage(Sender: TObject; ACanvas: TCanvas; ARect: TRect; APageIndex: Integer); virtual; - procedure PaintThumbnailPage(Sender: TObject; ACanvas: TCanvas; ARect: TRect; APageIndex: Integer); virtual; - - {$IFDEF OLEDRAGANDDROP} - function CanDrop: Boolean; virtual; - function DoCanAccept: Boolean; virtual; - procedure DoDrop; virtual; - property DraggedFileName: string read FDraggedFileName; - {$ENDIF} - public - destructor Destroy; override; - - procedure GoToFirstPage; virtual; abstract; - procedure GoToLastPage; virtual; abstract; - procedure GoToNextPage; virtual; abstract; - procedure GoToPrevPage; virtual; abstract; - - procedure InitContent; virtual; - procedure InvalidateContent; virtual; - procedure InvalidatePage(APageIndex: Integer); virtual; - procedure InvalidateAllPages; virtual; - procedure InvalidatePagesContent; virtual; - procedure InvalidatePagesHeaderContent; virtual; - procedure InvalidatePagesFooterContent; virtual; - - procedure RebuildReport; virtual; - - procedure UpdateControls; virtual; - - property ActivePageIndex: Integer read GetActivePageIndex write SetActivePageIndex; - property Background: TdxBackground read GetBackground write SetBackground; - property ComponentPrinter: TCustomdxComponentPrinter read GetComponentPrinter write SetComponentPrinter; - property EnableOptions: TdxPreviewEnableOptions read GetPreviewEnableOptions write SetPreviewEnableOptions; - property ExplorerTree: TCustomdxPSExplorerTreeContainer read GetExplorerTree; - property HFEditPart: TdxPageTitlePart read GetHFEditPart write SetHFEditPart; - property PageCount: Integer read GetPageCount write SetPageCount; - property ReportLink: TBasedxReportLink read GetReportLink; - property SaveZoomPosition: Boolean read GetSaveZoomPosition write SetSaveZoomPosition; - property ShowExplorer: Boolean read GetShowExplorer write SetShowExplorer; - property ShowThumbnails: Boolean read GetShowThumbnails write SetShowThumbnails; - property State: TdxPSPreviewState read GetState write SetState; - property ThumbnailsSize: TdxPSThumbnailsSize read GetThumbnailsSize write SetThumbnailsSize; - property VisibleOptions: TdxPreviewVisibleOptions read GetPreviewVisibleOptions write SetPreviewVisibleOptions; - property VisiblePageSize: TPoint read GetVisiblePageSize; - property ZoomFactor: Integer read GetZoomFactor write SetZoomFactor; - end; - - TdxPreviewOptions = class; - - TdxComponentPrinterThumbnailsOptions = class(TPersistent) - private - FDefaultFont: TFont; - FFont: TFont; - FPreviewOptions: TdxPreviewOptions; - FShowPageNumbers: Boolean; - procedure SetFont(Value: TFont); - procedure SetShowPageNumbers(Value: Boolean); - protected - procedure InitializeDefaultFont(AFont: TFont); virtual; - function IsFontStored: Boolean; virtual; - public - constructor Create(APreviewOptions: TdxPreviewOptions); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function DefaultFont: TFont; virtual; - procedure RestoreDefaults; virtual; - - property PreviewOptions: TdxPreviewOptions read FPreviewOptions; - published - property Font: TFont read FFont write SetFont stored IsFontStored; - property ShowPageNumbers: Boolean read FShowPageNumbers write SetShowPageNumbers default True; - end; - - TdxPreviewOptions = class(TdxBaseObject) - private - FCaption: string; - FComponentPrinter: TCustomdxComponentPrinter; - FDefaultIcon: TIcon; - FEnableOptions: TdxPreviewEnableOptions; - FIcon: TIcon; - FHelpContext: THelpContext; - FIsBoundsAssigned: Boolean; - FIsCaptionAssigned: Boolean; - FIsIconAssigned: Boolean; - FRect: TRect; - FSavePosition: Boolean; - FSaveZoomPosition: Boolean; - FShowExplorer: Boolean; - FThumbnailsOptions: TdxComponentPrinterThumbnailsOptions; - FVisibleOptions: TdxPreviewVisibleOptions; - FWindowState: TWindowState; - function GetCaption: string; - function GetHelpFile: string; - function GetIcon: TIcon; - function GetPosition(index: Integer): Integer; - function GetRect: TRect; - function GetRegistryPath: string; - function IsBoundsStored: Boolean; - function IsCaptionStored: Boolean; - function IsIconStored: Boolean; - procedure SetCaption(const Value: string); - procedure SetEnableOptions(Value: TdxPreviewEnableOptions); - procedure SetHelpContext(Value: THelpContext); - procedure SetHelpFile(const Value: string); - procedure SetIcon(Value: TIcon); - procedure SetPosition(Index: Integer; Value: Integer); - procedure SetRect(Value: TRect); - procedure SetRegistryPath(const Value: string); - procedure SetShowExplorer(Value: Boolean); - procedure SetThumbnailsOptions(Value: TdxComponentPrinterThumbnailsOptions); - procedure SetVisibleOptions(Value: TdxPreviewVisibleOptions); - procedure SetWindowState(Value: TWindowState); - - function HasPreviewWindow: Boolean; - function PreviewWindow: TBasedxPreviewWindow; - - procedure ReadBoundsRect(Stream: TStream); - procedure ReadIsCaptionAssigned(Reader: TReader); - procedure ReadIsIconAssigned(Reader: TReader); - procedure WriteBoundsRect(Stream: TStream); - procedure WriteIsCaptionAssigned(Writer: TWriter); - procedure WriteIsIconAssigned(Writer: TWriter); - protected - procedure DefineProperties(Filer: TFiler); override; - - procedure DoAssign(Source: TdxBaseObject); override; - procedure DoRestoreDefaults; override; - - function GetIsIconAssigned: Boolean; - procedure IconChanged(Sender: TObject); virtual; - procedure InitializeDefaultIcon(AnIcon: TIcon); virtual; - procedure RefreshIsIconAssigned; - public - constructor Create; override; - destructor Destroy; override; - - function DefaultCaption: string; virtual; - function DefaultIcon: TIcon; virtual; - function DefaultRect: TRect; virtual; - - procedure RestoreOriginalIcon; - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); - - property ComponentPrinter: TCustomdxComponentPrinter read FComponentPrinter; - property IsIconAssigned: Boolean read FIsIconAssigned; - property Rect: TRect read GetRect write SetRect; - published - property EnableOptions: TdxPreviewEnableOptions read FEnableOptions write SetEnableOptions - default [peoCanChangeMargins, peoPageBackground, peoPageSetup, peoPreferences, peoPrint, peoReportDesign]; - property Caption: string read GetCaption write SetCaption stored IsCaptionStored; - property Height: Integer index 0 read GetPosition write SetPosition stored False; - property HelpFile: string read GetHelpFile write SetHelpFile stored False; - property HelpContext: THelpContext read FHelpContext write SetHelpContext default 0; - property Icon: TIcon read GetIcon write SetIcon stored IsIconStored; - property Left: Integer index 1 read GetPosition write SetPosition stored False; - property RegistryPath: string read GetRegistryPath write SetRegistryPath stored False; - property SavePosition: Boolean read FSavePosition write FSavePosition stored False default True; - property SaveZoomPosition: Boolean read FSaveZoomPosition write FSaveZoomPosition default True; - property ShowExplorer: Boolean read FShowExplorer write SetShowExplorer default False; - property ThumbnailsOptions: TdxComponentPrinterThumbnailsOptions read FThumbnailsOptions write SetThumbnailsOptions; - property Top: Integer index 2 read GetPosition write SetPosition stored False; - property VisibleOptions: TdxPreviewVisibleOptions read FVisibleOptions write SetVisibleOptions - default [pvoPageSetup, pvoPageBackground, pvoPreferences, pvoPrint, pvoReportDesign, pvoPrintStyles, - pvoReportFileOperations, pvoPageMargins]; - property Width: Integer index 3 read GetPosition write SetPosition stored False; - property WindowState: TWindowState read FWindowState write SetWindowState default wsNormal; - end; - - { ComponentPrinter } - - TdxBeforeDesignReportEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink; - ADesignWindow: TAbstractdxReportLinkDesignWindow) of object; - - TdxCustomDrawPageEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink; - ACanvas: TCanvas; APageIndex: Integer; ARect: TRect; ANom, ADenom: Integer) of object; - - TdxCustomDrawReportTitleEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink; - ACanvas: TCanvas; ARect: TRect; ANom, ADenom: Integer; - var TextAlignX: TcxTextAlignX; var TextAlignY: TcxTextAlignY; - var AColor: TColor; AFont: TFont; var ADone: Boolean) of object; - - TdxCustomDrawPageHFEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink; - ACanvas: TCanvas; APageIndex: Integer; var ARect: TRect; ANom, ADenom: Integer; - var ADefaultDrawText, ADefaultDrawBackground: Boolean) of object; - - TdxDesignReportEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink; - var ADone: Boolean) of object; - - TdxGenerateReportProgressEvent = procedure(Sender: TObject; - AReportLink: TBasedxReportLink; APercentDone: Double {'##0.00'}) of object; - - TdxGetPrintTitleEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink; - var ATitle: string) of object; - - TdxPrintDlgDataEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink; - var APrintDlgData: TdxPrintDlgData) of object; - - TdxMeasureReportTitleEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink; - var AHeight: Integer) of object; - - TdxNewPageEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink; - APageIndex: Integer) of object; - - TdxPageSetupEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink; - ADone: Boolean) of object; - - TdxPreviewEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink) of object; - - TdxPrintDeviceProblemEvent = procedure(Sender: TObject; var ADone: Boolean) of object; - - TdxReportLinkNotifyEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink) of object; - - TdxStartPrintEvent = procedure(Sender: TObject; AReportLink: TBasedxReportLink; - APageCount: Integer) of object; - - TdxCPOption = (cpoAutoRebuildBeforePreview, cpoAutoRebuildBeforePrint, - cpoGenerateReportProgressEvent, cpoShowHourGlass, cpoDropStorageModeAfterPreview); - TdxCPOptions = set of TdxCPOption; - - TdxCPState = (cpsBuilding, cpsDesigning, cpsPreviewing, cpsPrinting, cpsPrintDialog, - cpsPageSetupDialog, cpsDefineStylesDialog, cpsCustomizing, cpsLoading, cpsSaving, - cpsExplore); - TdxCPStates = set of TdxCPState; - - TdxPSBuildStage = (bsStart, bsProgress, bsEnd); - TdxPSPrintStage = (psStart, psProgress, psEnd); - - TdxPSComponentPrinterExplorerChangeNotifier = class(TdxPSExplorerChangeNotifierAdapter) - private - FComponentPrinter: TCustomdxComponentPrinter; - protected - procedure ItemDataUnloaded(AnItem: TdxPSExplorerItem); override; - public - constructor Create(AComponentPrinter: TCustomdxComponentPrinter); - property ComponentPrinter: TCustomdxComponentPrinter read FComponentPrinter; - end; - - TCustomdxComponentPrinter = class(TComponent) - private - FAbortBuilding: Boolean; - FAbortPrinting: Boolean; - FAutoUpdateDateTime: Boolean; - FBeepAfterLongOperations: Boolean; - FCurrentLink: TBasedxReportLink; - FDateFormat: Integer; - FExplorer: TCustomdxPSExplorer; - FExplorerChangeNotifier: TdxPSComponentPrinterExplorerChangeNotifier; - FExplorerStubLink: TBasedxReportLink; - FInternalStreaming: Boolean; - FLongOperationTime: Integer; - FOptions: TdxCPOptions; - FPageNumberFormat: TdxPageNumberFormat; - FPreviewOptions: TdxPreviewOptions; - FPreviewWindow: TBasedxPreviewWindow; - FPreviewWindowDesigner: TAbstractdxPreviewWindowDesigner; - FPrintFileList: TStrings; - FPrintTitle: string; - FReportLinkDesigner: TAbstractdxReportLinkDesigner; - FReportLinks: TList; - FState: TdxCPStates; - FTimeFormat: Integer; - FVersion: Integer; - - FOnAddReportLink: TdxReportLinkNotifyEvent; - FOnAfterPreview: TdxPreviewEvent; - FOnBeforeDesignReport: TdxBeforeDesignReportEvent; - FOnBeforePreview: TdxPreviewEvent; - FOnChangeComponent: TdxReportLinkNotifyEvent; - FOnChangeCurrentLink: TNotifyEvent; - FOnCustomDrawPage: TdxCustomDrawPageEvent; - FOnCustomDrawPageFooter: TdxCustomDrawPageHFEvent; - FOnCustomDrawPageHeader: TdxCustomDrawPageHFEvent; - FOnCustomDrawReportTitle: TdxCustomDrawReportTitleEvent; - FOnDeleteReportLink: TdxReportLinkNotifyEvent; - FOnDesignReport: TdxDesignReportEvent; - FOnEndGenerateReport: TdxReportLinkNotifyEvent; - FOnEndPrint: TdxReportLinkNotifyEvent; - FOnFinalizePrintDlgData: TdxPrintDlgDataEvent; - FOnGenerateReportProgress: TdxGenerateReportProgressEvent; - FOnGetPrintTitle: TdxGetPrintTitleEvent; - FOnInitializePrintDlgData: TdxPrintDlgDataEvent; - FOnMeasureReportTitle: TdxMeasureReportTitleEvent; - FOnNewPage: TdxNewPageEvent; - FOnPageSetup: TdxPageSetupEvent; - FOnPrintDeviceBusy: TdxPrintDeviceProblemEvent; - FOnPrintDeviceError: TdxPrintDeviceProblemEvent; - FOnStartGenerateReport: TdxReportLinkNotifyEvent; - FOnStartPrint: TdxStartPrintEvent; - - FEndTime: DWORD; - FHFTextEntryChooseSubscriber: TdxEventSubscriber; - FLongOperationCounter: Integer; - FMemoryStream: TStream; - FModalPreview: Boolean; - FPrintAll: Boolean; - FSaveCollate: Boolean; - FSaveCopies: Integer; - FSavePageIndex: Integer; - FSavePrintToFile: Boolean; - FStartTime: DWORD; - FWindowHandle: HWND; - function GetCurrentLinkIndex: Integer; - function GetExplorerRealStubLink: TBasedxReportLink; - function GetIsExplorerMode: Boolean; - function GetLinkCount: Integer; - function GetPreviewCaption: string; - function GetReportLink(index: Integer): TBasedxReportLink; - procedure SetAbortBuilding(Value: Boolean); - procedure SetAbortPrinting(Value: Boolean); - procedure SetAutoUpdateDateTime(Value: Boolean); - procedure SetCurrentLink(Value: TBasedxReportLink); - procedure SetCurrentLinkIndex(Value: Integer); - procedure SetDateFormat(Value: Integer); - procedure SetExplorer(Value: TCustomdxPSExplorer); - procedure SetExplorerStubLink(Value: TBasedxReportLink); - procedure SetLongOperationTime(Value: Integer); - procedure SetPageNumberFormat(Value: TdxPageNumberFormat); - procedure SetPreviewOptions(Value: TdxPreviewOptions); - procedure SetupPreviewProperties(APreviewWindow: TBasedxPreviewWindow); - procedure SetPrintFileList(Value: TStrings); - procedure SetReportLink(index: Integer; Value: TBasedxReportLink); - procedure SetTimeFormat(Value: Integer); - - function BeginPrintPages(const Source: string; out APageIndexes: TIntegers): Boolean; - procedure EndPrintPages(var APageIndexes: TIntegers); - - function CreatePreviewWindow(AReportLink: TBasedxReportLink): TBasedxPreviewWindow; - procedure DestroyPreviewWindow; - - procedure FinalizeDefaultPrintDlgData(AReportLink: TBasedxReportLink; var APrintDlgData: TdxPrintDlgData); virtual; - procedure InitializeDefaultPrintDlgData(AReportLink: TBasedxReportLink; out APrintDlgData: TdxPrintDlgData); virtual; - - procedure InitDevModeFromPrinterPageSettings(APrinterPage: TdxPrinterPage); - - function PrintDialog(AReportLink: TBasedxReportLink; var APrintDlgData: TdxPrintDlgData): Boolean; - function PrintPagesAsStringEx(const APages: string; APageNums: TdxPageNumbers; - ACopyCount: Integer; ACollate: Boolean; AReportLink: TBasedxReportLink = nil): Boolean; - procedure PrnDlgPageSetup(Sender: TObject; var ADone: Boolean; - APreviewBtnClicked, APrintBtnClicked: PBoolean); - - procedure RaiseBuildingEvent(AReportLink: TBasedxReportLink; - const APercentCompleted: Double; AStage: TdxPSBuildStage); - procedure RaisePrintingEvent(AReportLink: TBasedxReportLink; - APageIndex, APageCount: Integer; AStage: TdxPSPrintStage); - - procedure ActivateLink(AReportLink: TBasedxReportLink); - function CheckLink(Value: TBasedxReportLink): TBasedxReportLink; - function CreateLink(ALinkClass: TdxReportLinkClass; - AComponent: TComponent; AOwner: TComponent): TBasedxReportLink; - procedure DeactivateLink(AReportLink: TBasedxReportLink); - procedure InsertLink(Value: TBasedxReportLink); - procedure MoveLink(ACurIndex, ANewIndex: Integer); - procedure RemoveLink(Value: TBasedxReportLink); - procedure ResyncCurrentLink(AIndex: Integer); - - procedure OnHFTextEntryChosen(Sender: TObject; const AEntry: string); - - { design-time support } - procedure DesignerModified; - procedure DesignerUpdate(AnItem: TBasedxReportLink); - function IsDesigning: Boolean; - function IsDestroying: Boolean; - function IsLoading: Boolean; - - procedure ShowExistingPreviewWindow; - procedure WndProc(var Message: TMessage); - protected - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - procedure Loaded; override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure SetChildOrder(Child: TComponent; Order: Integer); override; - procedure SetName(const NewName: TComponentName); override; - - procedure DoAddReportLink(AReportLink: TBasedxReportLink); dynamic; - procedure DoAfterPreview(AReportLink: TBasedxReportLink); dynamic; - procedure DoBeforeDesignReport(AReportLink: TBasedxReportLink); dynamic; - procedure DoBeforeDestroyReport(AReportLink: TBasedxReportLink); dynamic; - procedure DoBeforePreview(AReportLink: TBasedxReportLink); dynamic; - procedure DoChangeComponent(AReportLink: TBasedxReportLink); dynamic; - procedure DoChangeCurrentLink; dynamic; - procedure DoCustomDrawEntirePage(AReportLink: TBasedxReportLink; ACanvas: TCanvas; - APageIndex: Integer; ARect: TRect; ANom, ADenom: Integer); virtual; - procedure DoCustomDrawPageHeaderOrFooter(AReportLink: TBasedxReportLink; - AHFObject: TCustomdxPageObject; ACanvas: TCanvas; APageIndex: Integer; - R: TRect; var ADefaultDrawText, ADefaultDrawBackground: Boolean; - APixelsNumerator: Integer = 0); virtual; - procedure DoCustomDrawReportTitle(AReportLink: TBasedxReportLink; ACanvas: TCanvas; - ARect: TRect; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var AColor: TColor; AFont: TFont; var ADone: Boolean; - APixelsNumerator: Integer = 0); virtual; - procedure DoDeleteReportLink(AReportLink: TBasedxReportLink); dynamic; - procedure DoDesignReport(AReportLink: TBasedxReportLink; ADone: Boolean); dynamic; - procedure DoEndPrint(AReportLink: TBasedxReportLink); dynamic; - procedure DoFinalizePrintDlgData(AReportLink: TBasedxReportLink; var APrintDlgData: TdxPrintDlgData); dynamic; - procedure DoInitializePrintDlgData(AReportLink: TBasedxReportLink; var APrintDlgData: TdxPrintDlgData); dynamic; - procedure DoMeasureReportTitle(AReportLink: TBasedxReportLink; var AHeight: Integer); virtual; - procedure DoNewPage(AReportLink: TBasedxReportLink; APageIndex: Integer); dynamic; - procedure DoPageParamsChanged(AReportLink: TBasedxReportLink); - procedure DoPageSetup(AReportLink: TBasedxReportLink; ADone: Boolean); dynamic; - procedure DoPrintDeviceBusy; dynamic; - procedure DoPrintDeviceError; dynamic; - procedure DoProgress(AReportLink: TBasedxReportLink; const PercentDone: Double); dynamic; - procedure DoStartPrint(AReportLink: TBasedxReportLink; FullPageCount: Integer); dynamic; - procedure DoStartUpdateReport(AReportLink: TBasedxReportLink); dynamic; - procedure DoEndUpdateReport(AReportLink: TBasedxReportLink); dynamic; - function GetPrintTitle(AReportLink: TBasedxReportLink): string; dynamic; - procedure StdProcessPrintDeviceBusy; virtual; - procedure StdProcessPrintDeviceError; virtual; - - function IsCustomPrintDlgData: Boolean; - - function IsForegroundPreviewWindow: Boolean; - function IsGenerateReportProgressEvent: Boolean; - function IsRebuildBeforeOutput(AForceRebuild: Boolean): Boolean; - function IsRebuildBeforePreview: Boolean; - function IsRebuildBeforePrint: Boolean; - function IsShowHourGlass: Boolean; - - procedure PaintThumbnailPage(ACanvas: TCanvas; APageIndex: Integer; - const APageBounds, AContentBounds: TRect; AReportLink: TBasedxReportLink = nil); - procedure PaintThumbnailPageIndex(ACanvas: TCanvas; const R: TRect; APageIndex: Integer); - - procedure FormatChanged(AReportLink: TBasedxReportLink); - procedure PreparePageSetup; - procedure PrepareBuildReport(AReportLink: TBasedxReportLink); - procedure PrepareLongOperation; - procedure PreparePrintDevice; - procedure PrepareReport(AReportLink: TBasedxReportLink); - procedure PrintPage(AReportLink: TBasedxReportLink; APageIndex: Integer); virtual; - procedure UnprepareBuildReport(AReportLink: TBasedxReportLink); - procedure UnprepareLongOperation; - procedure UnpreparePageSetup; - procedure UnpreparePrintDevice; - procedure UnprepareReport(AReportLink: TBasedxReportLink); - - { Stream loading } - procedure AfterLoadFromStream(AStream: TStream); - procedure BeforeLoadFromStream(AStream: TStream); - procedure ErrorLoadFromStream(AStream: TStream); - procedure LoadItselfFromStream(AStream: TStream); - procedure LoadLinksFromStream(AStream: TStream); - procedure LoadVersionFromStream(AStream: TStream; var AVersion: Integer); - procedure PrepareLoadFromStream(AStream: TStream); - procedure UnprepareLoadFromStream(AStream: TStream); - { Stream saving} - procedure PrepareSaveToStream(AStream: TStream); - procedure SaveItselfToStream(AStream: TStream); - procedure SaveLinksToStream(AStream: TStream); - procedure SaveVersionToStream(AStream: TStream); - procedure UnprepareSaveToStream(AStream: TStream); - - property ExplorerChangeNotifier: TdxPSComponentPrinterExplorerChangeNotifier read FExplorerChangeNotifier; - property PreviewCaption: string read GetPreviewCaption; - property OnAfterPreview: TdxPreviewEvent read FOnAfterPreview write FOnAfterPreview; - property OnBeforeDesignReport: TdxBeforeDesignReportEvent read FOnBeforeDesignReport write FOnBeforeDesignReport; - property OnBeforePreview: TdxPreviewEvent read FOnBeforePreview write FOnBeforePreview; - property OnChangeComponent: TdxReportLinkNotifyEvent read FOnChangeComponent write FOnChangeComponent; - property OnChangeCurrentLink: TNotifyEvent read FOnChangeCurrentLink write FOnChangeCurrentLink; - property OnCustomDrawPageHeader: TdxCustomDrawPageHFEvent read FOnCustomDrawPageHeader write FOnCustomDrawPageHeader; - property OnCustomDrawPageFooter: TdxCustomDrawPageHFEvent read FOnCustomDrawPageFooter write FOnCustomDrawPageFooter; - property OnCustomDrawReportTitle: TdxCustomDrawReportTitleEvent read FOnCustomDrawReportTitle write FOnCustomDrawReportTitle; - property OnDesignReport: TdxDesignReportEvent read FOnDesignReport write FOnDesignReport; - property OnMeasureReportTitle: TdxMeasureReportTitleEvent read FOnMeasureReportTitle write FOnMeasureReportTitle; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - function AddComposition: TdxCompositionReportLink; - function AddEmptyLink(ALinkClass: TdxReportLinkClass): TBasedxReportLink; - function AddEmptyLinkEx(ALinkClass: TdxReportLinkClass; AOwner: TComponent): TBasedxReportLink; - function AddLink(AComponent: TComponent): TBasedxReportLink; - function AddLinkEx(AComponent: TComponent; AOwner: TComponent): TBasedxReportLink; - procedure AssignReportLinks(Source: TCustomdxComponentPrinter); - function CreateLinkFromFile(const AFileName: string): TBasedxReportLink; - function CreateLinkFromStream(AStream: TStream): TBasedxReportLink; - procedure DeleteAllLinks; - procedure DeleteLink(AIndex: Integer); - procedure DestroyReport(AReportLink: TBasedxReportLink = nil); - function FindLinkByComponent(Value: TComponent; ACanCreate: Boolean = False): TBasedxReportLink; - procedure GetLinks(AList: TList); - function IndexOfLink(AReportLink: TBasedxReportLink): Integer; overload; - function IndexOfLink(const AName: string): Integer; overload; - function IndexOfLinkByName(const AName: string): Integer; - function LinkByName(const AName: string): TBasedxReportLink; - procedure RebuildReport(AReportLink: TBasedxReportLink = nil); - - class function GetNewLinkName(AReportLink: TBasedxReportLink): string; - class function IsSupportedCompClass(AComponentClass: TClass): Boolean; overload; - class function IsSupportedCompClass(AComponent: TObject{TComponent}): Boolean; overload; - - { composition support } - function CurrentCompositionByLink(AReportLink: TBasedxReportLink): TdxCompositionReportLink; - procedure GetCompositionsByLink(AReportLink: TBasedxReportLink; ACompositions: TList); - procedure GetItems(AComposition: TdxCompositionReportLink; AStrings: TStrings; AExcludeAssigned: Boolean); - function IsLinkInComposition(AReportLink: TBasedxReportLink; AComposition: TdxCompositionReportLink): Boolean; - function IsLinkInCurrentComposition(AReportLink: TBasedxReportLink): Boolean; - - procedure Explore; - - function DesignerExists(AReportLink: TBasedxReportLink = nil): Boolean; - function DesignerExistsByComponent(AComponent: TComponent): Boolean; - function DesignReport(AReportLink: TBasedxReportLink = nil): Boolean; - - procedure DrawPageFooter(AReportLink: TBasedxReportLink; APageIndex: Integer; - ARect: TRect; ATitleParts: TdxPageTitleParts; ADrawBackground: Boolean); - procedure DrawPageHeader(AReportLink: TBasedxReportLink; APageIndex: Integer; - ARect: TRect; ATitleParts: TdxPageTitleParts; ADrawBackground: Boolean); - - procedure GetPageColRowCount(out ACol, ARow: Integer; AReportLink: TBasedxReportLink = nil); - function GetPageCount(AReportLink: TBasedxReportLink = nil): Integer; - - function PageSetup(AReportLink: TBasedxReportLink = nil): Boolean; - function PageSetupEx(AActivePageIndex: Integer; AShowPreviewBtn, AShowPrintBtn: Boolean; - out APreviewBtnClicked, APrintBtnClicked: Boolean; AReportLink: TBasedxReportLink = nil): Boolean; overload; - function PageSetupEx(AActivePageIndex: Integer; APreviewBtnClicked, APrintBtnClicked: PBoolean; - AReportLink: TBasedxReportLink = nil): Boolean; overload; {$IFDEF DELPHI6} deprecated; {$ENDIF} - - procedure PaintPage(ACanvas: TCanvas; APageIndex: Integer; - const APageBounds, AContentBounds: TRect; AReportLink: TBasedxReportLink = nil); - - procedure Preview(AModal: Boolean = True; AReportLink: TBasedxReportLink = nil); - function PreviewExists: Boolean; - - function Print(AShowDialog: Boolean; APPrintDlgData: PdxPrintDlgData; - AReportLink: TBasedxReportLink = nil): Boolean; - procedure PrintEx(APageNums: TdxPageNumbers; ACopies: Integer; ACollate: Boolean; - AReportLink: TBasedxReportLink = nil); - procedure PrintPages(const APageIndexes: array of Integer; - AReportLink: TBasedxReportLink = nil); - procedure PrintPagesEx(const APageIndexes: array of Integer; - APageNums: TdxPageNumbers; ACopyCount: Integer; ACollate: Boolean; - AReportLink: TBasedxReportLink = nil); - - procedure LoadFromFile(const AName: string); - procedure LoadFromStream(AStream: TStream); - procedure SaveToFile(const AName: string); - procedure SaveToStream(AStream: TStream); - - property AbortBuilding: Boolean read FAbortBuilding write SetAbortBuilding; - property AbortPrinting: Boolean read FAbortPrinting write SetAbortPrinting; - property AutoUpdateDateTime: Boolean read FAutoUpdateDateTime write SetAutoUpdateDateTime default True; - property BeepAfterLongOperations: Boolean read FBeepAfterLongOperations write FBeepAfterLongOperations default True; - property CurrentLink: TBasedxReportLink read FCurrentLink write SetCurrentLink; - property CurrentLinkIndex: Integer read GetCurrentLinkIndex write SetCurrentLinkIndex; - property DateFormat: Integer read FDateFormat write SetDateFormat default 0; - property Explorer: TCustomdxPSExplorer read FExplorer write SetExplorer; - property ExplorerRealStubLink: TBasedxReportLink read GetExplorerRealStubLink; - property ExplorerStubLink: TBasedxReportLink read FExplorerStubLink write SetExplorerStubLink; - property IsExplorerMode: Boolean read GetIsExplorerMode; - property LinkCount: Integer read GetLinkCount; - property LongOperationTime: Integer read FLongOperationTime write SetLongOperationTime default 5000; {ms} - property Options: TdxCPOptions read FOptions write FOptions - default [Low(TdxCPOption)..High(TdxCPOption)]; {dxDefaultCPOptions} - property PageNumberFormat: TdxPageNumberFormat read FPageNumberFormat write SetPageNumberFormat default pnfNumeral; - property PreviewOptions: TdxPreviewOptions read FPreviewOptions write SetPreviewOptions; - property PreviewWindow: TBasedxPreviewWindow read FPreviewWindow; - property PrintFileList: TStrings read FPrintFileList write SetPrintFileList; - property PrintTitle: string read FPrintTitle write FPrintTitle; - property ReportLink[Index: Integer]: TBasedxReportLink read GetReportLink write SetReportLink; default; - property State: TdxCPStates read FState; - property TimeFormat: Integer read FTimeFormat write SetTimeFormat default 0; - property Version: Integer read FVersion write FVersion; - - property PreviewWindowDesigner: TAbstractdxPreviewWindowDesigner read FPreviewWindowDesigner; - property ReportLinkDesigner: TAbstractdxReportLinkDesigner read FReportLinkDesigner; - - property OnAddReportLink: TdxReportLinkNotifyEvent read FOnAddReportLink write FOnAddReportLink; - property OnCustomDrawPage: TdxCustomDrawPageEvent read FOnCustomDrawPage write FOnCustomDrawPage; - property OnDeleteReportLink: TdxReportLinkNotifyEvent read FOnDeleteReportLink write FOnDeleteReportLink; - property OnEndGenerateReport: TdxReportLinkNotifyEvent read FOnEndGenerateReport write FOnEndGenerateReport; - property OnEndPrint: TdxReportLinkNotifyEvent read FOnEndPrint write FOnEndPrint; - property OnFinalizePrintDlgData: TdxPrintDlgDataEvent read FOnFinalizePrintDlgData write FOnFinalizePrintDlgData; - property OnGenerateReportProgress: TdxGenerateReportProgressEvent read FOnGenerateReportProgress write FOnGenerateReportProgress; - property OnGetPrintTitle: TdxGetPrintTitleEvent read FOnGetPrintTitle write FOnGetPrintTitle; - property OnInitializePrintDlgData: TdxPrintDlgDataEvent read FOnInitializePrintDlgData write FOnInitializePrintDlgData; - property OnNewPage: TdxNewPageEvent read FOnNewPage write FOnNewPage; - property OnPageSetup: TdxPageSetupEvent read FOnPageSetup write FOnPageSetup; - property OnPrintDeviceBusy: TdxPrintDeviceProblemEvent read FOnPrintDeviceBusy write FOnPrintDeviceBusy; - property OnPrintDeviceError: TdxPrintDeviceProblemEvent read FOnPrintDeviceError write FOnPrintDeviceError; - property OnStartGenerateReport: TdxReportLinkNotifyEvent read FOnStartGenerateReport write FOnStartGenerateReport; - property OnStartPrint: TdxStartPrintEvent read FOnStartPrint write FOnStartPrint; - end; - - TdxEnumPagesAsImagesProc = procedure(AComponentPrinter: TCustomdxComponentPrinter; - AReportLink: TBasedxReportLink; AIndex, APageIndex: Integer; - const AGraphic: TGraphic; AData: Pointer; - var AContinue: Boolean) of object; - - TdxExportProgressEvent = procedure(Sender: TCustomdxComponentPrinter; - AReportLink: TBasedxReportLink; APageCount, AIndex, APageIndex: Integer; - AData: Pointer) of object; - - TdxExportPrepareGraphicEvent = procedure(Sender: TCustomdxComponentPrinter; - AReportLink: TBasedxReportLink; const AGraphic: TGraphic; - AData: Pointer) of object; - - TdxExportGetPageFileNameEvent = procedure(Sender: TCustomdxComponentPrinter; - AIndex, APageIndex: Integer; var AFileName: string) of object; - - TdxOnFilterComponentEvent = procedure(Sender: TObject; var AComponent: TComponent; - var ACaption, ADescription: string; var Accept: Boolean) of object; - - TdxOnGetSupportedComponentsEvent = procedure(Sender: TObject; AComponents: TStrings) of object; - - TdxCPCustomizeDlgOption = (cdoShowDescription); - TdxCPCustomizeDlgOptions = set of TdxCPCustomizeDlgOption; - - TdxComponentPrinter = class(TCustomdxComponentPrinter) - private - FCustomizeDlgOptions: TdxCPCustomizeDlgOptions; - FOverWriteAll: Boolean; - FOverWriteExistingFiles: Boolean; - FOverWriteFile: Boolean; - FOnExportGetPageFileName: TdxExportGetPageFileNameEvent; - FOnExportPrepareGraphic: TdxExportPrepareGraphicEvent; - FOnExportProgress: TdxExportProgressEvent; - FOnFilterComponent: TdxOnFilterComponentEvent; - FOnGetSupportedComponents: TdxOnGetSupportedComponentsEvent; - procedure WritePageAsImageToDisk(AComponentPrinter: TCustomdxComponentPrinter; - AReportLink: TBasedxReportLink; AIndex, APageIndex: Integer; - const AGraphic: TGraphic; AData: Pointer; - var AContinue: Boolean); - protected - procedure Loaded; override; - function DoFilterComponent(AComponent: TComponent; var ACaption, ADescription: string): Boolean; dynamic; - procedure GetDefaultExportPageFileName(AIndex, APageIndex: Integer; var AFileName: string); dynamic; - procedure GetExportPageFileName(AIndex, APageIndex: Integer; var AFileName: string); dynamic; - function GetSupportedComponents(AComponents: TStrings): Boolean; dynamic; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - procedure ShowCustomizeDlg; - - procedure LoadFromRegistry(const APath: string); - procedure SaveToRegistry(const APath: string); - - procedure EnumPagesAsImages(const APageIndexes: array of Integer; - AGraphicClass: TGraphicClass; ADrawBackground: Boolean; - ACallBackProc: TdxEnumPagesAsImagesProc; ACallBackData, AProgressData, - APrepareData: Pointer; - AReportLink: TBasedxReportLink = nil); - procedure SavePagesAsImagesToDisk(const APageIndexes: array of Integer; - AGraphicClass: TGraphicClass; ADrawBackground: Boolean; const AFileMask: string; - AProgressData, APrepareData: Pointer; - AReportLink: TBasedxReportLink = nil); - published - property AutoUpdateDateTime; - property BeepAfterLongOperations; - property CurrentLink; - property CustomizeDlgOptions: TdxCPCustomizeDlgOptions read FCustomizeDlgOptions write FCustomizeDlgOptions - default [cdoShowDescription]; - property DateFormat; - property Explorer; - property ExplorerStubLink; - property LongOperationTime; - property Options; - property OverWriteExistingFiles: Boolean read FOverWriteExistingFiles write FOverWriteExistingFiles default False; - property PageNumberFormat; - property PreviewOptions; - property PrintTitle; - property TimeFormat; - property Version; - - property OnAddReportLink; - property OnAfterPreview; - property OnBeforeDesignReport; - property OnBeforePreview; - property OnChangeComponent; - property OnChangeCurrentLink; - property OnCustomDrawPage; - property OnCustomDrawPageFooter; - property OnCustomDrawPageHeader; - property OnCustomDrawReportTitle; - property OnDeleteReportLink; - property OnDesignReport; - property OnEndGenerateReport; - property OnEndPrint; - property OnExportGetPageFileName: TdxExportGetPageFileNameEvent read FOnExportGetPageFileName write FOnExportGetPageFileName; - property OnExportPrepareGraphic: TdxExportPrepareGraphicEvent read FOnExportPrepareGraphic write FOnExportPrepareGraphic; - property OnExportProgress: TdxExportProgressEvent read FOnExportProgress write FOnExportProgress; - property OnFilterComponent: TdxOnFilterComponentEvent read FOnFilterComponent write FOnFilterComponent; - property OnFinalizePrintDlgData; - property OnGetPrintTitle; - property OnGenerateReportProgress; - property OnGetSupportedComponents: TdxOnGetSupportedComponentsEvent read FOnGetSupportedComponents write FOnGetSupportedComponents; - property OnInitializePrintDlgData; - property OnMeasureReportTitle; - property OnNewPage; - property OnPageSetup; - property OnPrintDeviceBusy; - property OnPrintDeviceError; - property OnStartGenerateReport; - property OnStartPrint; - end; - - TAbstractdxPreviewWindowDesigner = class - private - FComponentPrinter: TCustomdxComponentPrinter; - protected - procedure Activate; virtual; abstract; - procedure Modified; virtual; abstract; - public - constructor Create(AComponentPrinter: TCustomdxComponentPrinter); - destructor Destroy; override; - - property ComponentPrinter: TCustomdxComponentPrinter read FComponentPrinter; - end; - - TAbstractdxReportLinkDesigner = class - private - FComponentPrinter: TCustomdxComponentPrinter; - protected - procedure Modified; virtual; abstract; - procedure Update(Item: TBasedxReportLink); virtual; abstract; - public - constructor Create(AComponentPrinter: TCustomdxComponentPrinter); - destructor Destroy; override; - - procedure BeginUpdate; virtual; abstract; - procedure CancelUpdate; virtual; abstract; - procedure EndUpdate; virtual; abstract; - - property ComponentPrinter: TCustomdxComponentPrinter read FComponentPrinter; - end; - -{ This si a routine for fast PrintPreview and(or) Printing an individual component. - You MUST add "unit" contained "Link" that supports the "AComponent" into the uses - clause of the your unit } - -function dxPrintComponent(AComponent: TComponent; APrintPreview: Boolean = True; - APrintDialog: Boolean = False; const AReportTitle: string = ''; - const APrintTitle: string = ''): Boolean; - -{ Enum Pages as Images routines } - -procedure dxPSEnumReportPages(AComponentPrinter: TdxComponentPrinter; - AReportLink: TBasedxReportLink; const APageIndexes: array of Integer; - AGraphicClass: TGraphicClass; AnExportBackground: Boolean; - ACallBackProc: TdxEnumPagesAsImagesProc; - ACallBackData: Pointer; - AProgressProc: TdxExportProgressEvent; - AProgressData: Pointer; - APrepareGraphicProc: TdxExportPrepareGraphicEvent; - APrepareData: Pointer); - -{ ReportLinks registration routines } - -procedure dxPSRegisterReportLink(ALinkClass: TdxReportLinkClass; - AComponentClass: TComponentClass; ADesignerClass: TdxReportLinkDesignWindowClass); -procedure dxPSUnregisterReportLink(ALinkClass: TdxReportLinkClass; - AComponentClass: TComponentClass; ADesignerClass: TdxReportLinkDesignWindowClass); -procedure dxPSUnregisterReportLinks(const ALinkClasses: array of TdxReportLinkClass); - -function dxPSDesignerClassByCompClass(AComponentClass: TClass): TdxReportLinkDesignWindowClass; overload; -function dxPSDesignerClassByCompClass(AComponent: TObject{TComponent}): TdxReportLinkDesignWindowClass; overload; - -function dxPSDesignerClassByLinkClass(ALinkClass: TClass): TdxReportLinkDesignWindowClass; overload; -function dxPSDesignerClassByLinkClass(ALink: TObject{TBasedxReportLink}): TdxReportLinkDesignWindowClass; overload; - -function dxPSLinkClassByCompClass(AComponentClass: TClass): TdxReportLinkClass; overload; -function dxPSLinkClassByCompClass(AComponent: TObject{TComponent}): TdxReportLinkClass; overload; - -procedure dxPSGetActiveReportLinksList(AClassList: TdxClassList); -procedure dxPSGetReportLinksList(AClassList: TdxClassList); -procedure dxPSGetLinkSupportedComponentsList(AClassList: TdxClassList; ALinkClass: TClass); overload; -procedure dxPSGetLinkSupportedComponentsList(AClassList: TdxClassList; ALink: TObject{TBasedxReportLink}); overload; -procedure dxPSGetSupportedComponentsList(AClassList: TdxClassList); - -function dxPSIsSupportedCompClass(AComponentClass: TClass): Boolean; overload; -function dxPSIsSupportedCompClass(AComponent: TObject{TComponent}): Boolean; overload; - -{ PreviewWindow registration routines } - -function dxPSGetPreviewWindowClassByClassName(const AClassName: string): TdxPreviewWindowClass; -procedure dxPSGetPreviewWindowList(AStrings: TStrings); -procedure dxPSRegisterPreviewWindow(APreviewWindowClass: TdxPreviewWindowClass); -procedure dxPSUnregisterPreviewWindow(APreviewWindowClass: TdxPreviewWindowClass = nil); - -{ Units convertation routines } - -function OnePixel: Integer; -function PixelsNumerator: Integer; -function PixelsDenominator: Integer; - -{ Helpers } - -procedure FixupRect(DC: HDC; var R: TRect); -procedure Get3DBorderBrushes(AEdgeStyle: TdxCellEdgeStyle; ASoft: Boolean; - var AOuterTLBrush, AOuterBRBrush, AInnerTLBrush, AInnerBRBrush: HBRUSH); -procedure Get3DBorderColors(AEdgeStyle: TdxCellEdgeStyle; ASoft: Boolean; - var AOuterTLColor, AOuterBRColor, AInnerTLColor, AInnerBRColor: TColor); - -function dxPSExplorerImages: TCustomImageList; - -procedure dxPSStartWait; -procedure dxPSStopWait; - -const - CM_FREEEXPLORERITEM = WM_DX + 25; - PSTO_DEFAULT_FORMAT = CXTO_AUTOINDENTS or CXTO_PATTERNEDTEXT; - - cemSingle = cemPattern; // obsolete: declared only for backward compatibility - cesNone = cesRaised; // obsolete: declared only for backward compatibility - - csAll = [csLeft..csBottom]; - csTopLeft = [csLeft, csTop]; - csBottomRight = [csRight, csBottom]; - csLeftRight = [csLeft, csRight]; - csTopBottom = [csTop, csBottom]; - - tlpAll: TdxPSTreeLineParts = [tlpTop, tlpRight, tlpBottom]; - - dxAlignment: array[TcxTextAlignX] of TAlignment = (taLeftJustify, taCenter, taRightJustify, taCenter, taCenter); - dxCalcFormat: array[Boolean] of UINT = - (CXTO_CALCRECT or CXTO_AUTOINDENTS {or CXTO_EXPANDTABS} or CXTO_CHARBREAK or CXTO_SINGLELINE, - CXTO_CALCRECT or CXTO_AUTOINDENTS or CXTO_EXPANDTABS or CXTO_CHARBREAK or CXTO_WORDBREAK); - - dxDrawTextTextAlignX: array[TcxTextAlignX] of UINT = (DT_LEFT, DT_CENTER, DT_RIGHT, DT_CENTER, DT_CENTER); - dxDrawTextTextAlignY: array[TcxTextAlignY] of UINT = (DT_TOP, DT_VCENTER, DT_BOTTOM, DT_TOP); - - dxImageLayout: array[TAlignment] of TdxImageLayout = (ilImageCenterLeft, ilImageCenterRight, ilImageCenterCenter); - dxMultilineTextAlignY: array[Boolean] of TcxTextAlignY = (taCenterY, taTop); - dxTextAlignX: array[TAlignment] of TcxTextAlignX = (taLeft, taRight, taCenterX); - dxTextAlignY: array[TTextLayout] of TcxTextAlignY = (taTop, taCenterY, taBottom); - - //TdxCellEdgeStyle = (cesRaised, cesSunken) - dxCellBorderClassMap: array[TdxCellEdgeStyle, Boolean] of TdxPSCellBorderClass = - ((TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder), - (TdxPSCellSunkenBorder, TdxPSCellSunkenSoftBorder)); - dxDefaultCPOptions = - [cpoAutoRebuildBeforePreview, cpoAutoRebuildBeforePrint, - cpoGenerateReportProgressEvent, cpoShowHourGlass, cpoDropStorageModeAfterPreview]; - dxDefaultPreviewEnableOptions = - [peoCanChangeMargins, peoPageBackground, peoPageSetup, peoPreferences, - peoPrint, peoReportDesign]; - dxDefaultPreviewVisibleOptions = - [pvoPageBackground, pvoPageSetup, pvoPreferences, pvoPrint, pvoReportDesign, - pvoPrintStyles, pvoReportFileOperations, pvoPageMargins]; - - dxThumbnailsZoomFactors: array[TdxPSThumbnailsSize] of Integer = (5, 10); - - dxDefaultBkColor = clWhite; - dxDefaultBreakByChars = True; - dxDefaultCellSides = csAll; - dxDefaultCheckFlatBorder = True; - dxDefaultCheckPos = ccpCenter; - dxDefaultColor = clWhite; - dxDefaultContentColor = dxDefaultColor; - dxDefaultCrossSignCrossSize = 9; // pixels - dxDefaultEdgeMode = cemPattern; - dxDefaultEdge3DSoft = True; - dxDefaultEdge3DStyle = cesRaised; - dxDefaultEndEllipsis = False; - dxDefaultExpandButtonBorderColor = clBlack; - dxDefaultFixedColor = clBtnFace; //clSilver; - dxDefaultFixedTransparent = False; - dxDefaultFont: array[0..LF_FACESIZE - 1] of Char = 'Times New Roman'; - dxDefaultGridLineColor = clBlack; - dxDefaultGroupBorderColor = clBtnFace; - dxDefaultGroupCaptionColor = clBtnFace; - dxDefaultGroupCaptionSeparatorColor = clBtnFace; - dxDefaultGroupColor = clBtnFace; - dxDefaultHidePrefix = False; - dxDefaultMultiline = False; - dxDefaultShadowColor = clBlack; - dxDefaultShadowDepth = 3; - dxDefaultSortOrder = csoNone; - dxDefaultPreventLeftTextExceed = True; - dxDefaultPreventTopTextExceed = True; - dxDefaultReportGroupCaptionIndent = 5; - dxDefaultReportGroupLookAndFeel: TdxPSReportGroupLookAndFeelClass = TdxPSReportGroupStandardLookAndFeel; - dxDefaultTextAlignX = taLeft; - dxDefaultTextAlignY = taCenterY; - dxDefaultTransparent = True; - dxDefaultTreeLineColor = clGray; - - dxPSDefaultFontCharSet = DEFAULT_CHARSET; - dxPSDefaultFontColor = clBlack; - dxPSDefaultFontName = 'Times New Roman'; - dxPSDefaultFontSize = 8; - dxPSDefaultFontStyle = []; - - dxPSDefaultPreviewThumbnailsFontColor = clBlue; - dxPSDefaultPreviewThumbnailsFontName = 'Tahoma'; - dxPSDefaultPreviewThumbnailsFontSize = 48; - dxPSDefaultPreviewThumbnailsFontStyle = []; - - dxPSDefaultReportTitleFontColor = clBlack; - dxPSDefaultReportTitleFontName = dxPSDefaultFontName; - dxPSDefaultReportTitleFontSize = 14; - dxPSDefaultReportTitleFontStyle = [fsBold]; - - dxRadioGroupInterColumnsMinSpace = 1; - dxRadioGroupInterRowsMinSpace = 1; - dxRadioGroupBoundsIndent = 2; - - dxTextSpace = 2; - - dxPSReportFileLongExtension = 'ExpressPrinting System-Report'; //Don't Localize - dxPSReportFileShortExtension = 'rps'; //Don't Localize - - dxSortMarkRgnSize = 16; - dxSortMarkWidth = 8; - dxSortMarkHeight = 7; - - sdxDocumentCaptionSeparator = '-'; - -var - FUnitsPerInch: Integer = 4800; - FDontPrintTransparentImages: Boolean = False; // affects only on Printout -// you need to disable the option below only if printing a file (such as Metafile, PDF, etc.) produces artifacts - FUseIsotropicMode: Boolean = True; - - iiExplorerFolderCollapsed: Integer = -1; - iiExplorerFolderExpanded: Integer = -1; - iiExplorerItem: Integer = -1; - iiExplorerItemHasInvalidData: Integer = -1; - iiDriveTypes: array[TdxDriveType] of Integer = (-1, -1, -1, -1, -1, -1, -1); - -implementation - -uses - {$IFDEF DELPHI7} - Themes, - UxTheme, - {$ENDIF} - {$IFDEF DELPHI6} - Variants, - {$ENDIF} - {$IFNDEF CBUILDER6} - dxPSCPDsg, - {$ENDIF} - {$IFDEF USEJPEGIMAGE} - Jpeg, - {$ENDIF} - TypInfo, Registry, Consts, CommCtrl, Dialogs, ShlObj, ShellAPI, dxPSRes, - dxPSImgs, dxPSUtl, dxPSEvnt, dxPSEdgePatterns, dxfmDTFmt, dxfmPNFmt, dxPSfmTtl, - dxfmChFN, dxPrnDev, dxPSPgsMnuBld, dxPSfmReportProperties, dxPSXplorerTreeView, - dxPSCompsProvider, dxPSfmCompositionDsg, dxPSPrVwStd; - -function OffsetWindowOrgEx(DC: HDC; X, Y: Integer; Pt: PPoint): BOOL; stdcall; external gdi32 name 'OffsetWindowOrgEx'; - -const - FExplorerImages: TCustomImageList = nil; - - // Image Indexes of Drive Types in ExplorerImages - DriveTypeImageIndexMap: array[TdxDriveType] of Integer = (-1, -1, 7, 8, 9, 11, 12); - - // Page "Update Codes" that force us to Rebuild Report or Recalculate ViewInfos - SignificantPrinterPageUpdateCodes: TdxPrinterPageUpdateCodes = [ucMarginLeft, ucMarginTop, ucMarginRight, ucMarginBottom, ucScale]; - - MaxGlyphCount = 6; // Max Glyph count used in TdxCustomReportCellCheckImage - PtPerInch = 72; // Typographic Point per Inch - - // Consts used in TCustomdxReportCellImageContainer to recognize Image kind saved in Stream - imstImageList = 0; - imstShellLargeImageList = 1; - imstShellSmallImageList = 2; - imstImage = 3; - - // New ItemLink Name Template - sdxNewLinkNameTemplate = 'Link%d'; // Don't Localize - - // Const used to store/load various Report Data to/from Windows Registry or Stream(File) - sdxNil = 'nil'; // Don't Localize - sdxFilePort = 'FILE:'; // Don't Localize - - sdxAssignedDateFormat = 'OwnDateFormat'; // Don't Localize - sdxAssignedTimeFormat = 'OwnTimeFormat'; // Don't Localize - sdxAssignedPageNumberFormat = 'OwnPageNumberFormat'; // Don't Localize - sdxAutoUpdateDateTime = 'AutoUpdateDateTime'; // Don't Localize - sdxDateFormat = 'DateFormat'; // Don't Localize - sdxPageNumberFormat = 'PageNumberFormat'; // Don't Localize - sdxPrintDlgFilesRegistryPath = '\PrintDialogFiles'; // Don't Localize - sdxStartPageIndex = 'StartPageIndex'; // Don't Localize - sdxTimeFormat = 'TimeFormat'; // Don't Localize - dxFormatTextAdjustFont = Integer($80000000); - -var - FPixelsDenominator: Integer; - FPixelsNumerator: Integer; - - FSaveCursor: TCursor; - FWaitCounter: Integer = 0; - -type - {$IFDEF DELPHI7} - TCustomPanelAccess = class(TCustomPanel); - {$ENDIF} - - TdxLinkList = class; - - TdxReportLinkRegItem = class - private - FLinkList: TdxLinkList; - protected - property LinkList: TdxLinkList read FLinkList; - public - ComponentClass: TComponentClass; - DesignerClass: TdxReportLinkDesignWindowClass; - LinkClass: TdxReportLinkClass; - constructor Create(ALinkClass: TdxReportLinkClass; AComponentClass: TComponentClass; - ADesignerClass: TdxReportLinkDesignWindowClass); - destructor Destroy; override; - - function IsEqual(ALinkClass: TdxReportLinkClass; AComponentClass: TComponentClass = nil; - ADesignerClass: TdxReportLinkDesignWindowClass = nil): Boolean; - function IsLastLinkClass: Boolean; - end; - - TdxLinkList = class({$IFDEF DELPHI5}TObjectList{$ELSE}TList{$ENDIF}) - private - function GetItem(Index: Integer): TdxReportLinkRegItem; - protected - function GetLinkClassCount(ALinkClass: TdxReportLinkClass): Integer; - public - procedure Add(ALinkClass: TdxReportLinkClass; AComponentClass: TComponentClass; - ADesignerClass: TdxReportLinkDesignWindowClass); - {$IFNDEF DELPHI5} - procedure Clear; override; - procedure Delete(Index: Integer); - {$ENDIF} - - function Find(out AnIndex: Integer; ALinkClass: TdxReportLinkClass; AComponentClass: TComponentClass = nil; - ADesignerClass: TdxReportLinkDesignWindowClass = nil): Boolean; overload; - function Find(ALinkClass: TdxReportLinkClass; AComponentClass: TComponentClass = nil; - ADesignerClass: TdxReportLinkDesignWindowClass = nil): Boolean; overload; - - function FindDesignerByLink(ALinkClass: TClass): TdxReportLinkDesignWindowClass; overload; - function FindDesignerByLink(ALink: TObject{TBasedxReportLink}): TdxReportLinkDesignWindowClass; overload; - - function FindLinkByComponent(AComponentClass: TClass): TdxReportLinkClass; overload; - function FindLinkByComponent(AComponent: TObject{TComponent}): TdxReportLinkClass; overload; - - procedure GetLinks(AClassList: TdxClassList; AnExcludeInactive: Boolean = True); - procedure GetSupportedComponents(AClassList: TdxClassList; ALinkClass: TClass = nil); overload; - procedure GetSupportedComponents(AClassList: TdxClassList; ALink: TObject{TBasedxReportLink}); overload; - - procedure UnregisterLink(ALinkClass: TdxReportLinkClass; AComponentClass: TComponentClass = nil; - ADesignerClass: TdxReportLinkDesignWindowClass = nil); - procedure UnregisterLinks(const ALinkClasses: array of TdxReportLinkClass); - - property Items[Index: Integer]: TdxReportLinkRegItem read GetItem; - end; - -const - FLinkList: TdxLinkList = nil; - FPreviewWindowList: TdxClassList = nil; - -type - TdxPSExplorerTreeContainerFactory = class(TdxCustomClassFactory) - private - function GetActiveTreeContainerClass: TCustomdxPSExplorerTreeContainerClass; - public - class function Instance: TdxPSExplorerTreeContainerFactory; reintroduce; overload; - property ActiveTreeContainerClass: TCustomdxPSExplorerTreeContainerClass read GetActiveTreeContainerClass; - end; - - TdxPSExplorerTreeBuilderFactory = class(TdxCustomClassFactory) - private - // because of CLR :-( - function GetActiveBuilderClass: TdxPSExplorerTreeBuilderClass; - public - class function Instance: TdxPSExplorerTreeBuilderFactory; reintroduce; overload; - property ActiveBuilderClass: TdxPSExplorerTreeBuilderClass read GetActiveBuilderClass; - end; - - TdxPSReaderFactory = class(TdxCustomClassFactory) - private - function GetActualReaderClass: TdxPSDataReaderClass; - function GetReaderClass(Version: Integer): TdxPSDataReaderClass; - public - class function Instance: TdxPSReaderFactory; reintroduce; overload; - - property ActualReaderClass: TdxPSDataReaderClass read GetActualReaderClass; - property ReaderClasses[Version: Integer]: TdxPSDataReaderClass read GetReaderClass; default; - end; - - TdxPSWriterFactory = class(TdxCustomClassFactory) - private - function GetActualWriterClass: TdxPSDataWriterClass; - function GetWriterClass(Version: Integer): TdxPSDataWriterClass; - public - class function Instance: TdxPSWriterFactory; reintroduce; overload; - - property ActualWriterClass: TdxPSDataWriterClass read GetActualWriterClass; - property WriterClasses[Version: Integer]: TdxPSDataWriterClass read GetWriterClass; default; - end; - -{ TdxReportLinkRegItem } - -constructor TdxReportLinkRegItem.Create(ALinkClass: TdxReportLinkClass; - AComponentClass: TComponentClass; ADesignerClass: TdxReportLinkDesignWindowClass); -begin - inherited Create; - LinkClass := ALinkClass; - ComponentClass := AComponentClass; - DesignerClass := ADesignerClass; - if GetClass(LinkClass.ClassName) = nil then - RegisterClass(LinkClass); -end; - -destructor TdxReportLinkRegItem.Destroy; -begin - if IsLastLinkClass and (GetClass(LinkClass.ClassName) <> nil) then - UnregisterClass(LinkClass); - inherited; -end; - -function TdxReportLinkRegItem.IsEqual(ALinkClass: TdxReportLinkClass; - AComponentClass: TComponentClass = nil; ADesignerClass: TdxReportLinkDesignWindowClass = nil): Boolean; -begin - Result := (LinkClass = ALinkClass) and - ((ComponentClass = nil) or (ComponentClass = AComponentClass)) and - ((DesignerClass = nil) or (DesignerClass = ADesignerClass)); -end; - -function TdxReportLinkRegItem.IsLastLinkClass: Boolean; -begin - Result := LinkList.GetLinkClassCount(LinkClass) = 1; -end; - -{ TdxLinkList } - -procedure TdxLinkList.Add(ALinkClass: TdxReportLinkClass; AComponentClass: TComponentClass; - ADesignerClass: TdxReportLinkDesignWindowClass); -var - Item: TdxReportLinkRegItem; -begin - if not Find(ALinkClass, AComponentClass, ADesignerClass) then - begin - Item := TdxReportLinkRegItem.Create(ALinkClass, AComponentClass, ADesignerClass); - Item.FLinkList := Self; - Insert(0, Item); - end; -end; - -{$IFNDEF DELPHI5} -procedure TdxLinkList.Clear; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Free; - inherited; -end; - -procedure TdxLinkList.Delete(Index: Integer); -begin - Items[Index].Free; - inherited; -end; -{$ENDIF} - -function TdxLinkList.Find(out AnIndex: Integer; ALinkClass: TdxReportLinkClass; - AComponentClass: TComponentClass = nil; ADesignerClass: TdxReportLinkDesignWindowClass = nil): Boolean; -var - I: Integer; -begin - AnIndex := -1; - for I := 0 to FLinkList.Count - 1 do - if Items[I].IsEqual(ALinkClass, AComponentClass, ADesignerClass) then - begin - AnIndex := I; - Break; - end; - Result := AnIndex <> -1; -end; - -function TdxLinkList.Find(ALinkClass: TdxReportLinkClass; AComponentClass: TComponentClass = nil; - ADesignerClass: TdxReportLinkDesignWindowClass = nil): Boolean; -var - Index: Integer; -begin - Result := Find(Index, ALinkClass, AComponentClass, ADesignerClass); -end; - -function TdxLinkList.FindDesignerByLink(ALinkClass: TClass): TdxReportLinkDesignWindowClass; -var - I: Integer; - Item: TdxReportLinkRegItem; -begin - if ALinkClass <> nil then - for I := 0 to Count - 1 do - begin - Item := Items[I]; - if Item.LinkClass = ALinkClass then - begin - Result := Item.DesignerClass; - Exit; - end; - end; - Result := nil; -end; - -function TdxLinkList.FindDesignerByLink(ALink: TObject{TBasedxReportLink}): TdxReportLinkDesignWindowClass; -begin - if ALink <> nil then - Result := FindDesignerByLink(ALink.ClassType) - else - Result := nil; -end; - -function TdxLinkList.FindLinkByComponent(AComponentClass: TClass): TdxReportLinkClass; -var - I: Integer; - Item: TdxReportLinkRegItem; -begin - Result := nil; - if AComponentClass <> nil then - for I := 0 to Count - 1 do - begin - Item := Items[I]; - if AComponentClass.InheritsFrom(Item.ComponentClass) then - begin - Result := Item.LinkClass; - if AComponentClass = Item.ComponentClass then Exit; - end; - end; -end; - -function TdxLinkList.FindLinkByComponent(AComponent: TObject{TComponent}): TdxReportLinkClass; -begin - if AComponent <> nil then - Result := FindLinkByComponent(AComponent.ClassType) - else - Result := nil; -end; - -procedure TdxLinkList.GetLinks(AClassList: TdxClassList; AnExcludeInactive: Boolean = True); -var - Buffer: TdxClassList; - I: Integer; - Item: TdxReportLinkRegItem; - ComponentClass: TComponentClass; - LinkClass: TdxReportLinkClass; -begin - Buffer := TdxClassList.Create; - try - for I := 0 to Count - 1 do - begin - Item := Items[I]; - ComponentClass := Item.ComponentClass; - if not AnExcludeInactive or (ComponentClass = nil) or (Buffer.IndexOf(ComponentClass) = -1) then - begin - LinkClass := Item.LinkClass; - if AClassList.IndexOf(LinkClass) = -1 then - AClassList.Add(LinkClass); - if AnExcludeInactive and (ComponentClass <> nil) then - Buffer.Add(ComponentClass); - end; - end; - finally - Buffer.Free; - end; -end; - -procedure TdxLinkList.GetSupportedComponents(AClassList: TdxClassList; ALinkClass: TClass = nil); -var - I: Integer; - Item: TdxReportLinkRegItem; - ComponentClass: TComponentClass; -begin - for I := 0 to Count - 1 do - begin - Item := Items[I]; - if (ALinkClass = nil) or (Item.LinkClass = ALinkClass) then - begin - ComponentClass := Item.ComponentClass; - if AClassList.IndexOf(ComponentClass) = -1 then - AClassList.Add(ComponentClass); - end; - end; -end; - -procedure TdxLinkList.GetSupportedComponents(AClassList: TdxClassList; ALink: TObject{TBasedxReportLink}); -var - LinkClass: TClass; -begin - if ALink <> nil then - LinkClass := ALink.ClassType - else - LinkClass := nil; - GetSupportedComponents(AClassList, LinkClass); -end; - -procedure TdxLinkList.UnregisterLink(ALinkClass: TdxReportLinkClass; - AComponentClass: TComponentClass = nil; ADesignerClass: TdxReportLinkDesignWindowClass = nil); -var - Index: Integer; -begin - if Find(Index, ALinkClass, AComponentClass, ADesignerClass) then - Delete(Index); -end; - -procedure TdxLinkList.UnregisterLinks(const ALinkClasses: array of TdxReportLinkClass); -var - I: Integer; -begin - for I := Low(ALinkClasses) to High(ALinkClasses) do - UnregisterLink(ALinkClasses[I]); -end; - -function TdxLinkList.GetLinkClassCount(ALinkClass: TdxReportLinkClass): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - if Items[I].LinkClass = ALinkClass then Inc(Result); -end; - -function TdxLinkList.GetItem(Index: Integer): TdxReportLinkRegItem; -begin - Result := inherited Items[Index] as TdxReportLinkRegItem; -end; - -{ TdxPSExplorerTreeContainerFactory } - -function dxPSExplorerTreeContainerFactory: TdxPSExplorerTreeContainerFactory; -begin - Result := TdxPSExplorerTreeContainerFactory.Instance; -end; - -class function TdxPSExplorerTreeContainerFactory.Instance: TdxPSExplorerTreeContainerFactory; -begin - Result := inherited Instance as TdxPSExplorerTreeContainerFactory; -end; - -function TdxPSExplorerTreeContainerFactory.GetActiveTreeContainerClass: TCustomdxPSExplorerTreeContainerClass; -begin - Result := TCustomdxPSExplorerTreeContainerClass(Items[0]); -end; - -{ TdxPSExplorerTreeBuilderFactory } - -function dxPSExplorerTreeBuilderFactory: TdxPSExplorerTreeBuilderFactory; -begin - Result := TdxPSExplorerTreeBuilderFactory.Instance; -end; - -function dxPSExplorerTreeBuilderFactory_ActiveBuilderClass: TdxPSExplorerTreeBuilderClass; -begin - Result := dxPSExplorerTreeBuilderFactory.ActiveBuilderClass; -end; - -class function TdxPSExplorerTreeBuilderFactory.Instance: TdxPSExplorerTreeBuilderFactory; -begin - Result := inherited Instance as TdxPSExplorerTreeBuilderFactory; -end; - - // because of CLR :-( -function TdxPSExplorerTreeBuilderFactory.GetActiveBuilderClass: TdxPSExplorerTreeBuilderClass; -begin - Result := TdxPSExplorerTreeBuilderClass(Items[Count - 1]); -end; - -{ TdxPSReaderFactory } - -function dxPSReaderFactory: TdxPSReaderFactory; -begin - Result := TdxPSReaderFactory.Instance; -end; - -class function TdxPSReaderFactory.Instance: TdxPSReaderFactory; -begin - Result := inherited Instance as TdxPSReaderFactory -end; - -function TdxPSReaderFactory.GetActualReaderClass: TdxPSDataReaderClass; -begin - Result := ReaderClasses[dxPSGlbl.dxPSStorageVersion]; -end; - -function TdxPSReaderFactory.GetReaderClass(Version: Integer): TdxPSDataReaderClass; -var - I: Integer; -begin - for I := Count - 1 to 0 do - begin - Result := TdxPSDataReaderClass(Items[I]); - if Result.SupportsStorageVersion(Version) then Exit; - end; - Result := nil; -end; - -{ TdxPSWriterFactory } - -function dxPSWriterFactory: TdxPSWriterFactory; -begin - Result := TdxPSWriterFactory.Instance; -end; - -class function TdxPSWriterFactory.Instance: TdxPSWriterFactory; -begin - Result := inherited Instance as TdxPSWriterFactory; -end; - -function TdxPSWriterFactory.GetActualWriterClass: TdxPSDataWriterClass; -begin - Result := WriterClasses[dxPSGlbl.dxPSStorageVersion]; -end; - -function TdxPSWriterFactory.GetWriterClass(Version: Integer): TdxPSDataWriterClass; -var - I: Integer; -begin - for I := Count - 1 to 0 do - begin - Result := TdxPSDataWriterClass(Items[I]); - if Result.SupportsStorageVersion(Version) then Exit; - end; - Result := nil; -end; - -{ units convertation routines } - -function OnePixel: Integer; -begin - Result := FPixelsNumerator div FPixelsDenominator; - if Result = 0 then Result := 1; -end; - -function PixelsNumerator: Integer; -begin - Result := FPixelsNumerator; -end; - -function PixelsDenominator: Integer; -begin - Result := FPixelsDenominator; -end; - -{ Helpers } - -procedure FixupRect(DC: HDC; var R: TRect); -begin - if DC <> 0 then - begin - LPtoDP(DC, R, 2); - DPtoLP(DC, R, 2); - end; -end; - -const - InnerBorderBRColors: array[TdxCellEdgeStyle, Boolean] of Integer = - ((COLOR_BTNSHADOW, COLOR_BTNFACE), (COLOR_BTNSHADOW, COLOR_BTNFACE)); - InnerBorderTLColors: array[TdxCellEdgeStyle, Boolean] of Integer = - ((COLOR_BTNHIGHLIGHT, COLOR_BTNHIGHLIGHT), (COLOR_BTNSHADOW, COLOR_BTNFACE)); - - OuterBorderBRColors: array[TdxCellEdgeStyle, Boolean] of Integer = - ((COLOR_WINDOWTEXT, COLOR_WINDOWTEXT), (COLOR_BTNHIGHLIGHT, COLOR_BTNHIGHLIGHT)); - OuterBorderTLColors: array[TdxCellEdgeStyle, Boolean] of Integer = - ((COLOR_WINDOWTEXT, COLOR_WINDOWTEXT), (COLOR_WINDOWTEXT, COLOR_WINDOWTEXT)); - -procedure Get3DBorderBrushes(AEdgeStyle: TdxCellEdgeStyle; ASoft: Boolean; - var AOuterTLBrush, AOuterBRBrush, AInnerTLBrush, AInnerBRBrush: HBRUSH); -begin - AOuterTLBrush := GetSysColorBrush(OuterBorderTLColors[AEdgeStyle, ASoft]); - AOuterBRBrush := GetSysColorBrush(OuterBorderBRColors[AEdgeStyle, ASoft]); - AInnerTLBrush := GetSysColorBrush(InnerBorderTLColors[AEdgeStyle, ASoft]); - AInnerBRBrush := GetSysColorBrush(InnerBorderBRColors[AEdgeStyle, ASoft]); -end; - -procedure Get3DBorderColors(AEdgeStyle: TdxCellEdgeStyle; ASoft: Boolean; - var AOuterTLColor, AOuterBRColor, AInnerTLColor, AInnerBRColor: TColor); -begin - AOuterTLColor := GetSysColor(OuterBorderTLColors[AEdgeStyle, ASoft]); - AOuterBRColor := GetSysColor(OuterBorderBRColors[AEdgeStyle, ASoft]); - AInnerTLColor := GetSysColor(InnerBorderTLColors[AEdgeStyle, ASoft]); - AInnerBRColor := GetSysColor(InnerBorderBRColors[AEdgeStyle, ASoft]); -end; - -function dxPSExplorerImages: TCustomImageList; - - function AddShellIconByIndex(AnIndex: Integer): Integer; - var - Icon: TIcon; - begin - if AnIndex <> -1 then - begin - Icon := TIcon.Create; - try - dxPSUtl.ShellSmallImages.GetIcon(AnIndex, Icon); - Result := FExplorerImages.AddIcon(Icon); - finally - Icon.Free; - end - end - else - Result := -1; - end; - - function LoadIcon(AnExtraFlags: UINT): Integer; - const - Flags = SHGFI_USEFILEATTRIBUTES or SHGFI_ICON or SHGFI_SYSICONINDEX; - var - FileInfo: TSHFileInfo; - begin - FillChar(FileInfo, SizeOf(FileInfo), 0); - FileInfo.dwAttributes := SFGAO_FOLDER; - try - SHGetFileInfo('', FILE_ATTRIBUTE_DIRECTORY, FileInfo, SizeOf(FileInfo), Flags or AnExtraFlags); - finally - DestroyIcon(FileInfo.hIcon); - end; - Result := AddShellIconByIndex(FileInfo.iIcon); - end; - - function LoadBitmap(const AResName: string): Integer; - var - Bitmap: TBitmap; - begin - Bitmap := TBitmap.Create; - try - Bitmap_LoadFromResourceName(Bitmap, AResName); - FExplorerImages.AddMasked(Bitmap, clFuchsia); - Result := FExplorerImages.Count - 1; - finally - Bitmap.Free; - end; - end; - -var - I: TdxDriveType; -begin - if FExplorerImages = nil then - begin - FExplorerImages := TImageList.Create(nil); - FExplorerImages.Handle := ImageList_Duplicate(dxPSUtl.ShellSmallImages.Handle); - FExplorerImages.Clear; - - iiExplorerFolderCollapsed := LoadIcon(0); - iiExplorerFolderExpanded := LoadIcon(SHGFI_OPENICON); - iiExplorerItem := LoadBitmap(IDB_DXPSEXPLORERITEM_SMALL); - iiExplorerItemHasInvalidData := LoadBitmap(IDB_DXPSEXPLORERITEM_INVALID); - - for I := Low(TdxDriveType) to High(TdxDriveType) do - //iiDriveTypes[I] := AddShellIconByIndex(DriveTypeImageIndexMap[I]); - end; - Result := FExplorerImages; -end; - -procedure dxPSStartWait; -begin - if FWaitCounter = 0 then - begin - FSaveCursor := Screen.Cursor; - Screen.Cursor := crHourGlass; - end; - Inc(FWaitCounter); -end; - -procedure dxPSStopWait; -begin - if FWaitCounter <> 0 then - begin - Dec(FWaitCounter); - if FWaitCounter = 0 then Screen.Cursor := FSaveCursor; - end; -end; - -{ ReportLinks Registration and Utilities} - -function dxPSIndexOfRegItem(ALinkClass: TdxReportLinkClass; AComponentClass: TComponentClass; - ADesignerClass: TdxReportLinkDesignWindowClass): Integer; -begin - if FLinkList <> nil then - FLinkList.Find(Result, ALinkClass, AComponentClass, ADesignerClass) - else - Result := -1; -end; - -procedure dxPSRegisterReportLink(ALinkClass: TdxReportLinkClass; AComponentClass: TComponentClass; - ADesignerClass: TdxReportLinkDesignWindowClass); -begin - if (ALinkClass = nil) or - ((AComponentClass <> nil) and (dxPSIndexOfRegItem(ALinkClass, AComponentClass, ADesignerClass) <> -1)) then - Exit; - - if FLinkList = nil then - FLinkList := TdxLinkList.Create; - FLinkList.Add(ALinkClass, AComponentClass, ADesignerClass); -end; - -procedure dxPSUnregisterReportLink(ALinkClass: TdxReportLinkClass; - AComponentClass: TComponentClass; ADesignerClass: TdxReportLinkDesignWindowClass); -begin - if FLinkList <> nil then - FLinkList.UnregisterLink(ALinkClass, AComponentClass, ADesignerClass); -end; - -procedure dxPSUnregisterReportLinks(const ALinkClasses: array of TdxReportLinkClass); -begin - if FLinkList <> nil then - FLinkList.UnregisterLinks(ALinkClasses); -end; - -procedure dxPSUnregisterAllReportLinks; -begin - if FLinkList <> nil then - begin - FLinkList.Clear; - FreeAndNil(FLinkList); - end; -end; - -function dxPSDesignerClassByCompClass(AComponentClass: TClass): TdxReportLinkDesignWindowClass; -var - LinkClass: TdxReportLinkClass; -begin - LinkClass := dxPSLinkClassByCompClass(AComponentClass); - Result := dxPSDesignerClassByLinkClass(LinkClass); -end; - -function dxPSDesignerClassByCompClass(AComponent: TObject{TComponent}): TdxReportLinkDesignWindowClass; -begin - if AComponent <> nil then - Result := dxPSDesignerClassByCompClass(AComponent.ClassType) - else - Result := nil; -end; - -function dxPSLinkClassByCompClass(AComponentClass: TClass): TdxReportLinkClass; -begin - if FLinkList <> nil then - Result := FLinkList.FindLinkByComponent(AComponentClass) - else - Result := nil; -end; - -function dxPSLinkClassByCompClass(AComponent: TObject{TComponent}): TdxReportLinkClass; -begin - if FLinkList <> nil then - Result := FLinkList.FindLinkByComponent(AComponent) - else - Result := nil; -end; - -function dxPSDesignerClassByLinkClass(ALinkClass: TClass): TdxReportLinkDesignWindowClass; -begin - if FLinkList <> nil then - Result := FLinkList.FindDesignerByLink(ALinkClass) - else - Result := nil; -end; - -function dxPSDesignerClassByLinkClass(ALink: TObject{TBasedxReportLink}): TdxReportLinkDesignWindowClass; -begin - if ALink <> nil then - Result := FLinkList.FindDesignerByLink(ALink) - else - Result := nil; -end; - -procedure dxPSGetActiveReportLinksList(AClassList: TdxClassList); -begin - if FLinkList <> nil then - FLinkList.GetLinks(AClassList, True); -end; - -procedure dxPSGetReportLinksList(AClassList: TdxClassList); -begin - if FLinkList <> nil then - FLinkList.GetLinks(AClassList, False); -end; - -procedure dxPSGetLinkSupportedComponentsList(AClassList: TdxClassList; ALinkClass: TClass); -begin - if FLinkList <> nil then - FLinkList.GetSupportedComponents(AClassList, ALinkClass); -end; - -procedure dxPSGetLinkSupportedComponentsList(AClassList: TdxClassList; ALink: TObject{TBasedxReportLink}); -begin - if FLinkList <> nil then - FLinkList.GetSupportedComponents(AClassList, ALink); -end; - -procedure dxPSGetSupportedComponentsList(AClassList: TdxClassList); -begin - if FLinkList <> nil then - FLinkList.GetSupportedComponents(AClassList); -end; - -function dxPSIsSupportedCompClass(AComponentClass: TClass): Boolean; -begin - Result := dxPSLinkClassByCompClass(AComponentClass) <> nil; -end; - -function dxPSIsSupportedCompClass(AComponent: TObject{TComponent}): Boolean; -begin - Result := dxPSLinkClassByCompClass(AComponent) <> nil; -end; - -{ PreviewWindows Registration and Utilities} - -function GetPreviewClass: TdxPreviewWindowClass; -begin - Result := nil; - if (FPreviewWindowList <> nil) and (FPreviewWindowList.Count <> 0) then - Result := TdxPreviewWindowClass(FPreviewWindowList.Last); -end; - -function dxPSIndexOfPreviewWindowClass(APreviewWindowClass: TdxPreviewWindowClass): Integer; -begin - if FPreviewWindowList <> nil then - for Result := 0 to FPreviewWindowList.Count - 1 do - if TdxPreviewWindowClass(FPreviewWindowList[Result]) = APreviewWindowClass then - Exit; - Result := -1; -end; - -function dxPSGetPreviewWindowClassByClassName(const AClassName: string): TdxPreviewWindowClass; -var - I: Integer; -begin - if FPreviewWindowList <> nil then - for I := 0 to FPreviewWindowList.Count - 1 do - begin - Result := TdxPreviewWindowClass(FPreviewWindowList[I]); - if (Result <> nil) and Result.ClassNameIs(AClassName) then Exit; - end; - Result := nil; -end; - -procedure dxPSGetPreviewWindowList(AStrings: TStrings); -var - I: Integer; - PreviewWindowClass: TdxPreviewWindowClass; -begin - if FPreviewWindowList <> nil then - begin - AStrings.BeginUpdate; - try - for I := 0 to FPreviewWindowList.Count - 1 do - begin - PreviewWindowClass := TdxPreviewWindowClass(FPreviewWindowList[I]); - if PreviewWindowClass <> nil then - AStrings.AddObject(PreviewWindowClass.ClassName, TObject(PreviewWindowClass)); - end; - finally - AStrings.EndUpdate; - end; - end; -end; - -procedure dxPSRegisterPreviewWindow(APreviewWindowClass: TdxPreviewWindowClass); -begin - if FPreviewWindowList = nil then - FPreviewWindowList := TdxClassList.Create; - FPreviewWindowList.Add(APreviewWindowClass); -end; - -procedure dxPSUnregisterPreviewWindow(APreviewWindowClass: TdxPreviewWindowClass = nil); -var - Index: Integer; -begin - if FPreviewWindowList <> nil then - begin - if APreviewWindowClass = nil then - Index := FPreviewWindowList.Count - 1 - else - Index := dxPSIndexOfPreviewWindowClass(APreviewWindowClass); - - if Index <> -1 then - begin - FPreviewWindowList.Delete(Index); - if FPreviewWindowList.Count = 0 then FreeAndNil(FPreviewWindowList); - end; - end; -end; - -procedure dxPSUnregisterAllPreviewWindows; -begin - while FPreviewWindowList <> nil do dxPSUnregisterPreviewWindow(nil); -end; - -function dxPrintComponent(AComponent: TComponent; - APrintPreview: Boolean = True; APrintDialog: Boolean = False; - const AReportTitle: string = ''; const APrintTitle: string = ''): Boolean; -var - ComponentPrinter: TdxComponentPrinter; - ReportLink: TBasedxReportLink; -begin - try - ComponentPrinter := TdxComponentPrinter.Create(nil); - try - ComponentPrinter.PrintTitle := APrintTitle; - ReportLink := ComponentPrinter.AddLink(AComponent); - Result := ReportLink <> nil; - if Result then - try - ReportLink.ReportTitleText := AReportTitle; - if APrintPreview then - ReportLink.Preview(True) - else - begin - ReportLink.PrinterPage.InitFromPrintDevice; - ReportLink.Print(APrintDialog, nil); - end; - finally - ReportLink.Free; - end - finally - ComponentPrinter.Free; - end; - except - Result := False; - end; -end; - -type - TdxPSRunTimeComponentsProvider = class(TAbstractdxPSComponentsProvider) - public - procedure GetComponents(AComponentPrinter: TdxComponentPrinter; AReportLink: TBasedxReportLink; - AComponents: TStrings; AnOptions: TdxPSGetComponentOptions); override; - end; - -procedure TdxPSRunTimeComponentsProvider.GetComponents(AComponentPrinter: TdxComponentPrinter; - AReportLink: TBasedxReportLink; AComponents: TStrings; AnOptions: TdxPSGetComponentOptions); - - procedure ProcessComponent(AComponent: TComponent); - var - Caption: string; - Description: string; - Item: TdxComponentItem; - begin - Caption := AComponent.Name; - Description := ''; - if (AComponentPrinter.FindLinkByComponent(AComponent) = nil) and - (((AReportLink = nil) and dxPSIsSupportedCompClass(AComponent)) or - ((AReportLink <> nil) and AReportLink.Supports(AComponent))) and - AComponentPrinter.DoFilterComponent(AComponent, Caption, Description) then - begin - Item := dxPSCreateComponentItem(AComponent, Caption, Description); - AComponents.AddObject(Item.Caption, Item); - end; - end; - -var - Owner: TComponent; - I: Integer; -begin - if not AComponentPrinter.GetSupportedComponents(AComponents) then - begin - //Item := dxPSCreateComponentItem(nil, 'Composition', ''); - //AComponents.AddObject(Item.Caption, Item); - - Owner := AComponentPrinter.Owner; - if Owner <> nil then - begin - ProcessComponent(Owner); - for I := 0 to Owner.ComponentCount - 1 do - ProcessComponent(Owner.Components[I]); - end; - end; -end; - -{ EdxInvalidStorageVersion } - -constructor EdxInvalidStorageVersion.Create(AVersion: UINT); -begin - FVersion := AVersion; - inherited CreateFmt(cxGetResourceString(@sdxInvalidStorageVersion), [Version]); -end; - -{ TdxPSDataReader } - -class procedure TdxPSDataReader.Register; -begin - dxPSReaderFactory.Register(Self); -end; - -class procedure TdxPSDataReader.Unregister; -begin - dxPSReaderFactory.Unregister(Self); -end; - -function TdxPSDataReader.ReadClass: TClass; -begin - Result := GetClass(ReadString); -end; - -function TdxPSDataReader.ReadCellBorderClass: TdxPSCellBorderClass; -begin - Result := TdxPSCellBorderClass(ReadClass); - if Result = nil then - Result := TdxPSCellUltraFlatBorder; -end; - -function TdxPSDataReader.ReadFillPatternClass: TdxPSFillPatternClass; -begin - Result := TdxPSFillPatternClass(ReadClass); - if Result = nil then - Result := TdxPSSolidFillPattern; -end; - -function TdxPSDataReader.ReadFont(AFont: TFont): TFont; -begin - Result := AFont; - if Result = nil then Result := TFont.Create; - - with Result do - begin - Charset := TFontCharset(ReadInteger); - Color := ReadInteger; - Name := ReadString; - Pitch := TFontPitch(ReadInteger); - Size := ReadInteger; - Style := TFontStyles(Byte(ReadInteger)); - end; -end; - -function TdxPSDataReader.ReadGraphicClass: TGraphicClass; -begin - Result := TGraphicClass(ReadClass); -end; - -procedure TdxPSDataReader.ReadImage(AnImage: TGraphic); -var - MemoryStream: TMemoryStream; - HasMask: Boolean; - Mask: TBitmap; -begin - MemoryStream := TMemoryStream.Create; - try - MemoryStream.Size := {$IFDEF DELPHI6} Self.ReadInt64 {$ELSE} Self.ReadInteger {$ENDIF}; - if MemoryStream.Size <> 0 then - begin - Self.Read(MemoryStream.Memory^, MemoryStream.Size); - MemoryStream.Position := 0; - AnImage.LoadFromStream(MemoryStream); - - MemoryStream.Read(HasMask , SizeOf(HasMask)); - if HasMask then - begin - Mask := TBitmap.Create; - try - Mask.LoadFromStream(MemoryStream); - TBitmap(AnImage).MaskHandle := Mask.ReleaseHandle; - finally - Mask.Free; - end; - end; - end; - finally - MemoryStream.Free; - end; -end; - -procedure TdxPSDataReader.ReadImageList(AnImageList: TCustomImageList); -var - MemoryStream: TMemoryStream; - Adapter: IStream; -begin - MemoryStream := TMemoryStream.Create; - try - MemoryStream.Size := {$IFDEF DELPHI6} Self.ReadInt64 {$ELSE} Self.ReadInteger {$ENDIF}; - if MemoryStream.Size <> 0 then - begin - Self.Read(MemoryStream.Memory^, MemoryStream.Size); - MemoryStream.Position := 0; - Adapter := TStreamAdapter.Create(MemoryStream); - AnImageList.Handle := CommCtrl.ImageList_Read(Adapter); - end; - finally - MemoryStream.Free; - end; -end; - -function TdxPSDataReader.ReadLinkClass: TdxReportLinkClass; -begin - Result := TdxReportLinkClass(ReadClass); -end; - -function TdxPSDataReader.ReadLookAndFeelClass: TdxPSReportGroupLookAndFeelClass; -begin - Result := TdxPSReportGroupLookAndFeelClass(ReadClass); - if Result = nil then - Result := TdxPSReportGroupNullLookAndFeel; -end; - -function TdxPSDataReader.ReadPoint: TPoint; -begin - Read(Result, SizeOf(Result)); -end; - -function TdxPSDataReader.ReadPSVersion: TdxPSVersion; -begin - Read(Result, SizeOf(Result)); -end; - -function TdxPSDataReader.ReadRect: TRect; -begin - Read(Result, SizeOf(Result)); -end; - -procedure TdxPSDataReader.SkipBytes(Count: {$IFDEF DELPHI6} Int64 {$ELSE} Integer {$ENDIF}); -var - Buffer: TBytes; -begin - SetLength(Buffer, Count); - Read(Buffer, Length(Buffer)); -end; - -class function TdxPSDataReader.SupportsStorageVersion(AVersion: Integer): Boolean; -begin - Result := True; -end; - -{ TdxPSDataWriter } - -class procedure TdxPSDataWriter.Register; -begin - dxPSWriterFactory.Register(Self); -end; - -class procedure TdxPSDataWriter.Unregister; -begin - dxPSWriterFactory.Unregister(Self); -end; - -procedure TdxPSDataWriter.WriteClassName(AClass: TClass); -begin - if AClass <> nil then - WriteString(AClass.ClassName) - else - WriteString(sdxNil); -end; - -procedure TdxPSDataWriter.WriteClassName(AnObject: TObject); -begin - if AnObject <> nil then - WriteClassName(AnObject.ClassType) - else - WriteString(sdxNil); -end; - -procedure TdxPSDataWriter.WriteFont(AFont: TFont); -begin - with AFont do - begin - WriteInteger(Charset); - WriteInteger(Color); - WriteString(Name); - WriteInteger(Integer(Pitch)); - WriteInteger(Size); - WriteInteger(Integer(Byte(Style))); - end; -end; - -procedure TdxPSDataWriter.WriteImage(AnImage: TGraphic); -var - MemoryStream: TMemoryStream; - HasMask: Boolean; - Mask: TBitmap; -begin - MemoryStream:= TMemoryStream.Create; - try - AnImage.SaveToStream(MemoryStream); - - HasMask := (AnImage is TBitmap) and (TBitmap(AnImage).MaskHandle <> 0); - MemoryStream.Write(HasMask, SizeOf(HasMask)); - if HasMask then - begin - Mask := TBitmap.Create; - try - Mask.Monochrome := True; - Mask.Handle := TBitmap(AnImage).MaskHandle; - Mask.SaveToStream(MemoryStream); - finally - Mask.Free; - end; - end; - - Self.WriteInteger(MemoryStream.Size); - Self.Write(MemoryStream.Memory^, MemoryStream.Size); - finally - MemoryStream.Free; - end; -end; - -procedure TdxPSDataWriter.WriteImageList(AnImageList: TCustomImageList); -var - MemoryStream: TMemoryStream; - Adapter: IStream; -begin - MemoryStream := TMemoryStream.Create; - try - Adapter := TStreamAdapter.Create(MemoryStream); - CommCtrl.ImageList_Write(AnImageList.Handle, Adapter); - - Self.WriteInteger(MemoryStream.Size); - Self.Write(MemoryStream.Memory^, MemoryStream.Size); - finally - MemoryStream.Free; - end; -end; - -procedure TdxPSDataWriter.WritePoint(const Pt: TPoint); -begin - Write(Pt, SizeOf(Pt)); -end; - -procedure TdxPSDataWriter.WritePSVersion(const AVersion: TdxPSVersion); -begin - Write(AVersion, SizeOf(AVersion)); -end; - -procedure TdxPSDataWriter.WriteRect(const R: TRect); -begin - Write(R, SizeOf(R)); -end; - -class function TdxPSDataWriter.SupportsStorageVersion(AVersion: Integer): Boolean; -begin - Result := True; -end; - -{ TdxPageOverlayIndexes } - -function TdxPageOverlayIndexes.Add(AValue: Integer): Integer; -begin - Result := inherited Add(TObject(AValue)); -end; - -function TdxPageOverlayIndexes.GetItem(Index: Integer): Integer; -begin - Result := Integer(inherited Items[Index]); -end; - -procedure TdxPageOverlayIndexes.SetItem(Index, Value: Integer); -begin - inherited Items[Index] := TObject(Value); -end; - -{ TdxPSPageRenderInfo } - -constructor TdxPSPageRenderInfo.Create(ARenderInfo: TdxPSReportRenderInfo; - APageIndex: Integer); -begin - inherited Create; - FPageIndex := APageIndex; - FRenderInfo := ARenderInfo; - FIndexPairs := TList.Create; - FOverlays := TList.Create; -end; - -destructor TdxPSPageRenderInfo.Destroy; -begin - FreeAndNilOverlays; - FreeAndNilIndexPairs; - inherited; -end; - -procedure TdxPSPageRenderInfo.Calculate; -begin - CalculateBounds; - CalculateOffsets; - FIndexPairs.Count := CalculateIndexPairCount; - CalculateIndexPairs; - CalculateOverlayIndexes; -end; - -function TdxPSPageRenderInfo.HasDetails: Boolean; -begin - Result := not IsRectEmpty(DetailBounds); -end; - -function TdxPSPageRenderInfo.HasFooter: Boolean; -begin - Result := not IsRectEmpty(FooterBounds) and (RenderInfo.CanUseHFOnEveryPageMode or IsBottomPage); -end; - -function TdxPSPageRenderInfo.HasHeader: Boolean; -begin - Result := not IsRectEmpty(HeaderBounds) and (RenderInfo.CanUseHFOnEveryPageMode or IsTopPage); -end; - -function TdxPSPageRenderInfo.HasTitle: Boolean; -begin - Result := RenderInfo.IsDrawPageTitleOnPage(PageIndex); -end; - -function TdxPSPageRenderInfo.AreRectsIntersected(const R1, R2: TRect): Boolean; -var - R: TRect; -begin - if R1.Top = R1.Bottom then - Result := (R1.Top >= R2.Top) and (R1.Top <= R2.Bottom) // bear in mind that R.Top = R.Bottom - else - Result := Windows.IntersectRect(R, R1, R2); -end; - -procedure TdxPSPageRenderInfo.CalculateBounds; -var - H: Integer; -begin - DetailBounds := RenderInfo.CalculatePageDetailBounds(ColIndex, RowIndex); - - ContentBounds := DetailBounds; - Inc(ContentBounds.Bottom, HeaderBounds.Bottom - HeaderBounds.Top); - Inc(ContentBounds.Bottom, FooterBounds.Bottom - FooterBounds.Top); - - H := MulDiv(RenderInfo.PaintSize.Y, 100, RenderInfo.ScaleFactor); - if HasTitle then - Dec(H, TitleHeight); - - with ContentBounds do - if Bottom - Top > H then - Bottom := Top + H; -end; - -function TdxPSPageRenderInfo.CalculateIndexPairCount: Integer; -var - EndIndex, TopSide, StartIndex: Integer; - R: TRect; -begin - if (RenderInfo.EmptyPageCount > 0) or ReportLink.NeedCalcEmptyPages then - begin - EndIndex := {AStartIndex } -1; - Result := 0; - TopSide := DetailBounds.Top; - while (TopSide < DetailBounds.Bottom) and (EndIndex < ReportCells.Count) do - begin - Inc(Result); - StartIndex := EndIndex + 1; - repeat - R := ReportCells.Cells[StartIndex].AbsoluteRect; - Inc(StartIndex); - until (StartIndex = ReportCells.Count) or AreRectsIntersected(R, DetailBounds); - Dec(StartIndex); - - EndIndex := StartIndex; - repeat - R := ReportCells.Cells[EndIndex].AbsoluteRect; - Inc(EndIndex); - until (EndIndex = ReportCells.Count) or not AreRectsIntersected(R, DetailBounds); - Dec(EndIndex); - if EndIndex <> ReportCells.Count - 1 then - Dec(EndIndex); - if EndIndex < StartIndex then - EndIndex := StartIndex; - - TopSide := R.Bottom; - end; - end - else - Result := 1; -end; - -procedure TdxPSPageRenderInfo.CalculateIndexPairs; -var - EndIndex, I, StartIndex: Integer; - R: TRect; - Intersected: Boolean; -begin - if IndexPairCount <> 0 then - begin - EndIndex := {AStartIndex } -1; - for I := 0 to IndexPairCount - 1 do - begin - StartIndex := EndIndex + 1; - repeat - R := ReportCells.Cells[StartIndex].AbsoluteRect; - Inc(StartIndex); - until (StartIndex = ReportCells.Count) or AreRectsIntersected(R, DetailBounds); - Dec(StartIndex); - EndIndex := StartIndex; - // fix 2.1 - Intersected := True; - while (EndIndex < ReportCells.Count) and Intersected do - begin - R := ReportCells.Cells[EndIndex].AbsoluteRect; - Intersected := AreRectsIntersected(R, DetailBounds); - Inc(EndIndex); - end; - //Dec(EndIndex, 1 + Ord(EndIndex <> ReportCells.Count)); - Dec(EndIndex); - if EndIndex <> ReportCells.Count - 1 then - Dec(EndIndex); - if EndIndex < StartIndex then - EndIndex := StartIndex; - - IndexPairs[I].StartIndex := StartIndex; - IndexPairs[I].EndIndex := EndIndex; - end; - end - else - DetailBounds := NullRect; //TODO: TdxPSPageRenderInfo.CalculateIndexPairs -end; - -function TdxPSPageRenderInfo.CalculateIsEmptyPage: Boolean; -begin - Result := not RenderInfo.IsNonEmptyPage(DetailBounds); -end; - -procedure TdxPSPageRenderInfo.CalculateOffsets; -var - FullRect: TRect; - MarginsOffset: TPoint; - DataSize, PaintSize: Integer; -begin - FullRect := ContentBounds; - OffsetRect(FullRect, -FullRect.Left, -FullRect.Top); - FullRect := ScaleRect(FullRect, RenderInfo.ScaleFactor, 100, RenderInfo.ScaleFactor, 100); - - MarginsOffset := PrinterPage.MarginsLoMetric.TopLeft; - - // horz. - DataOffset.X := RenderInfo.LoMetricValueToInternalUnits(MarginsOffset.X); - if HasTitle then - TitleOffset.X := DataOffset.X; - if RenderInfo.PrinterPage.CenterOnPageH then - begin - DataSize := FullRect.Right - FullRect.Left; - PaintSize := RenderInfo.PaintSize.X; - if DataSize < RenderInfo.PaintSize.X then - Inc(DataOffset.X, MulDiv((PaintSize - DataSize) div 2, 100, RenderInfo.ScaleFactor)); - end; - - // vert. - DataOffset.Y := RenderInfo.LoMetricValueToInternalUnits(MarginsOffset.Y); - if HasTitle then - begin - TitleOffset.Y := DataOffset.Y; - Inc(DataOffset.Y, RenderInfo.TitleHeight); - end; - if RenderInfo.PrinterPage.CenterOnPageV then - begin - DataSize := FullRect.Bottom - FullRect.Top; - PaintSize := RenderInfo.PaintSize.Y; - if HasTitle then - Dec(PaintSize, RenderInfo.TitleBounds.Bottom - RenderInfo.TitleBounds.Top); - if DataSize < PaintSize then - Inc(DataOffset.Y, MulDiv((PaintSize - DataSize) div 2, 100, RenderInfo.ScaleFactor)); - end; -end; - -procedure TdxPSPageRenderInfo.CalculateOverlayIndexes; - - function CreateOverlayIndexes(AnOverlay: TdxReportCell): TdxPageOverlayIndexes; - var - I: Integer; - R: TRect; - begin - Result := TdxPageOverlayIndexes.Create; - - for I := 0 to AnOverlay.CellCount - 1 do - if IntersectRect(R, AnOverlay[I].AbsoluteRect, DetailBounds) then - Result.Add(I); - end; - -var - I: Integer; -begin - if (ReportCells = nil) or not ReportCells.HasOverlays then Exit; - - FOverlays.Count := ReportCells.OverlayCount; - for I := 0 to ReportCells.OverlayCount - 1 do - FOverlays[I] := CreateOverlayIndexes(ReportCells.Overlays[I]); -end; - -function TdxPSPageRenderInfo.GetColIndex: Integer; -begin - Result := PageIndex mod RenderInfo.PageColCount; -end; - -function TdxPSPageRenderInfo.GetFooterBounds: TRect; -begin - Result := RenderInfo.FooterBounds; -end; - -function TdxPSPageRenderInfo.GetHeaderBounds: TRect; -begin - Result := RenderInfo.HeaderBounds; -end; - -function TdxPSPageRenderInfo.GetIndexPair(Index: Integer): TdxContinuedIndexPair; -begin - Result := TdxContinuedIndexPair(FIndexPairs[Index]); - if Result = nil then - begin - Result := TdxContinuedIndexPair.Create; - FIndexPairs[Index] := Result; - end; -end; - -function TdxPSPageRenderInfo.GetIndexPairCount: Integer; -begin - Result := FIndexPairs.Count; -end; - -function TdxPSPageRenderInfo.GetIsBottomPage: Boolean; -begin - Result := PageIndex >= RenderInfo.PageRenderInfoCount - RenderInfo.PageColCount; -end; - -function TdxPSPageRenderInfo.GetIsEmptyPage: Boolean; -begin - if not FIsEmptyPageCalculated then - begin - FIsEmptyPageCalculated := True; - FIsEmptyPage := CalculateIsEmptyPage; - end; - Result := FIsEmptyPage; -end; - -function TdxPSPageRenderInfo.GetIsTopPage: Boolean; -begin - Result := PageIndex < RenderInfo.PageColCount; -end; - -function TdxPSPageRenderInfo.GetOverlay(Index: Integer): TdxPageOverlayIndexes; -begin - Result := TdxPageOverlayIndexes(FOverlays[Index]); -end; - -function TdxPSPageRenderInfo.GetOverlayCount: Integer; -begin - Result := FOverlays.Count; -end; - -function TdxPSPageRenderInfo.GetPrinterPage: TdxPrinterPage; -begin - Result := RenderInfo.PrinterPage; -end; - -function TdxPSPageRenderInfo.GetReportCells: TdxReportCells; -begin - Result := ReportLink.FReportCells; -end; - -function TdxPSPageRenderInfo.GetReportLink: TBasedxReportLink; -begin - Result := RenderInfo.ReportLink; -end; - -function TdxPSPageRenderInfo.GetRowIndex: Integer; -begin - Result := PageIndex div RenderInfo.PageColCount; -end; - -function TdxPSPageRenderInfo.GetTitleBounds: TRect; -begin - Result := RenderInfo.TitleBounds; -end; - -function TdxPSPageRenderInfo.GetTitleHeight: Integer; -begin - with TitleBounds do - Result := Bottom - Top; -end; - -procedure TdxPSPageRenderInfo.SetIndexPair(Index: Integer; Value: TdxContinuedIndexPair); -begin - FIndexPairs[Index] := Value; -end; - -procedure TdxPSPageRenderInfo.FreeAndNilIndexPairs; -var - I: Integer; -begin - for I := 0 to IndexPairCount - 1 do - IndexPairs[I].Free; - FreeAndNil(FIndexPairs); -end; - -procedure TdxPSPageRenderInfo.FreeAndNilOverlays; -var - I: Integer; -begin - for I := 0 to OverlayCount - 1 do - Overlays[I].Free; - FreeAndNil(FOverlays); -end; - -{ TdxPSReportRenderInfo } - -constructor TdxPSReportRenderInfo.Create(AReportLink: TBasedxReportLink); -begin - inherited Create; - FReportLink := AReportLink; - FBaseContentFont := TFont.Create; - FDelimitersX := TList.Create; - FDelimitersY := TList.Create; - FHardDelimitersY := TList.Create; - FPageDelimitersX := TList.Create; - FPageDelimitersY := TList.Create; - FPageRenderInfos := TList.Create; -end; - -destructor TdxPSReportRenderInfo.Destroy; -begin - FreeAndNilPageRenderInfos; - FreeAndNil(FBaseContentFont); - FreeAndNil(FPageDelimitersY); - FreeAndNil(FPageDelimitersX); - FreeAndNil(FHardDelimitersY); - FreeAndNil(FDelimitersY); - FreeAndNil(FDelimitersX); - inherited; -end; - -procedure TdxPSReportRenderInfo.Calculate; -begin - if not Locked then - begin - Lock; - try - Refresh; - DoCalculate; - finally - Unlock; - end; - end; -end; - -function TdxPSReportRenderInfo.CanRenderPage(AVirtualPageIndex: Integer): Boolean; -begin - Result := not (ReportLink.ShowEmptyPages and PageRenderInfos[AVirtualPageIndex].IsEmptyPage); -end; - -function TdxPSReportRenderInfo.IsDrawPageFootNoteOnPage(APageIndex: Integer): Boolean; -begin - Result := False; - {case ReportLink.ReportTitleMode of - fnmNone: - Result := False; - fnmOnLastPage: - Result := APageIndex = PageCount - 1; - else - Result := APageIndex < PageCount - PageColCount; - end;} -end; - -function TdxPSReportRenderInfo.IsDrawPageTitleOnPage(APageIndex: Integer): Boolean; -begin - case ReportLink.ReportTitleMode of - tmNone: - Result := False; - tmOnFirstPage: - Result := APageIndex = 0; - else - Result := APageIndex < PageColCount; - end; -end; - -procedure TdxPSReportRenderInfo.Lock; -begin - Inc(FLockCounter); -end; - -procedure TdxPSReportRenderInfo.Unlock; -begin - if FLockCounter <> 0 then Dec(FLockCounter); -end; - -function TdxPSReportRenderInfo.CalculateEmptyPageCount: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to PageRenderInfoCount - 1 do - if PageRenderInfos[I].IsEmptyPage then Inc(Result); -end; - -procedure TdxPSReportRenderInfo.CalculateHeaderAndFooterBounds; -begin - if ReportCells <> nil then - begin - if ReportLink.IsDrawFootersOnEveryPage or (ReportLink.DataSource = rldsExternalStorage) then - FooterBounds := ReportCells.FooterBoundsRect; - if ReportLink.IsDrawHeadersOnEveryPage or (ReportLink.DataSource = rldsExternalStorage) then - HeaderBounds := ReportCells.HeaderBoundsRect; - end; -end; - -function TdxPSReportRenderInfo.CalculatePageContentHeight(APageIndex: Integer): Integer; -var - HeaderH, FooterH, TitleH: Integer; -begin - Result := PaintSize.Y; - - HeaderH := MulDiv(HeaderHeight, ScaleFactor, 100); - FooterH := MulDiv(FooterHeight, ScaleFactor, 100); - TitleH := 0; - if IsDrawPageTitleOnPage(APageIndex) then - TitleH := MulDiv(TitleHeight, ScaleFactor, 100); - if APageIndex = 0 then - CanUseHFOnEveryPageMode := Result > HeaderH + FooterH + TitleH; - - if Result < HeaderH + FooterH + TitleH then - FooterH := 0; - if (Result < HeaderH + TitleH) and (APageIndex > FPageDelimitersX.Count - 1) then - HeaderH := 0; - - Dec(Result, HeaderH + FooterH + TitleH); -// if Result < 0 then Result := 0; -end; - -function TdxPSReportRenderInfo.CalculatePageContentWidth(APageIndex: Integer): Integer; -begin - Result := PaintSize.X; -end; - -procedure TdxPSReportRenderInfo.CalculatePageCount; -begin - VirtualPageCount := PageColCount * PageRowCount; - FPageRenderInfos.Capacity := VirtualPageCount; -end; - -procedure TdxPSReportRenderInfo.CalculatePageDelimiters; -var - I, PageIndex, Offset, PageContentWidth, PagePaintHeight, CurDelimiter, - Delimiter, HardDelimiterIndex: Integer; -begin - // Horz. - I := 0; - PageIndex := 0; - CurDelimiter := 0; - - AddPageDelimiterX(0); - while I < DelimiterXCount do - begin - PageContentWidth := CalculatePageContentWidth(PageIndex); - Offset := PageDelimitersX[PageIndex]; - while (I < DelimiterXCount) and - (MulDiv(DelimitersX[I] - Offset, ScaleFactor, 100) <= PageContentWidth) do - Inc(I); - if I < DelimiterXCount then - begin - Dec(I); - CurDelimiter := DelimitersX[I]; - if Offset - CurDelimiter >= 0 then - CurDelimiter := Offset + MulDiv(PageContentWidth, 100, ScaleFactor); - AddPageDelimiterX(CurDelimiter); - Inc(PageIndex); - end; - end; - - I := PageDelimitersX[PageDelimiterXCount - 1]; - if I <> ReportWidth then - begin - Inc(I, ReportWidth); - if PageDelimiterXCount > 1 then Dec(I, CurDelimiter); - AddPageDelimiterX(I); - end; - if PageDelimiterXCount = 1 then PageDelimiterXClear; - - // Vert. - I := 0; - PageIndex := 0; - AddPageDelimiterY(0); - while I < DelimiterYCount do - begin - PagePaintHeight := CalculatePageContentHeight(PageIndex); - if PagePaintHeight <= 0 then - begin - AddPageDelimiterY(0); - Inc(PageIndex); - Continue; - end; - Offset := PageDelimitersY[PageIndex]; - HardDelimiterIndex := -1; - while I < DelimiterYCount do - begin - Delimiter := DelimitersY[I]; - if MulDiv(Delimiter - Offset, ScaleFactor, 100) > PagePaintHeight then - Break; - if IsHardDelimiter(Delimiter) then - begin - HardDelimiterIndex := I; - if BreakPagesByHardDelimiters then Break; - end; - Inc(I); - end; - - if I < DelimiterYCount then - begin - if HardDelimiterIndex <> -1 then - I := HardDelimiterIndex - else - Dec(I); - CurDelimiter := DelimitersY[I]; - if HardDelimiterIndex <> -1 then - Inc(I); - if Offset - CurDelimiter >= 0 then - CurDelimiter := Offset + MulDiv(PagePaintHeight, 100, ScaleFactor); - AddPageDelimiterY(CurDelimiter); - Inc(PageIndex); - end; - end; - - I := PageDelimitersY[PageDelimiterYCount - 1]; - if I <> ReportHeight then - begin - Inc(I, ReportHeight); - if PageDelimiterYCount > 1 then Dec(I, CurDelimiter); - AddPageDelimiterY(I); - end; - if PageDelimiterYCount = 1 then PageDelimiterYClear; -end; - -function TdxPSReportRenderInfo.CalculatePageDetailBounds(APageCol, APageRow: Integer): TRect; -begin - Result := MakeRect(PageDelimitersX[APageCol], PageDelimitersY[APageRow], - PageDelimitersX[APageCol + 1], PageDelimitersY[APageRow + 1]); -end; - -procedure TdxPSReportRenderInfo.CalculatePageHeaderAndFooterBounds; -begin - if ReportLink.ShowPageHeader then - PageHeaderBounds := LoMetricRectToInternalUnits(PrinterPage.HeaderRectLoMetric); - if ReportLink.ShowPageFooter then - PageFooterBounds := LoMetricRectToInternalUnits(PrinterPage.FooterRectLoMetric); -end; - -procedure TdxPSReportRenderInfo.CalculatePageRenderInfos; -var - I: Integer; - PageRenderInfo: TdxPSPageRenderInfo; -begin - for I := 0 to VirtualPageCount - 1 do - begin - PageRenderInfo := CreatePageRenderInfo(I); - PageRenderInfo.Calculate; - end; -end; - -procedure TdxPSReportRenderInfo.CalculatePageRealAndVirtualIndexes(APageIndex: Integer; - out AVirtualPageIndex, ARealPageIndex: Integer); -begin - AVirtualPageIndex := RealPageIndexToVirtualPageIndex(APageIndex, False); - ARealPageIndex := VirtualPageIndexToRealPageIndex(APageIndex); -end; - -function TdxPSReportRenderInfo.CalculateTitleHeight: Integer; -const - CalcFormat: UINT = DT_CALCRECT or DT_EDITCONTROL or DT_WORDBREAK; -var - L, PrevFontHeight: Integer; - DC: HDC; - PrevFont: HFONT; - R: TRect; -begin - Result := 0; - PrevFontHeight := TitleFont.Height; - if TitleAdjustOnReportScale then - TitleFont.Height := MulDiv(PrevFontHeight, ScaleFactor, 100); - try - L := Length(TitleText); - if L <> 0 then - begin - DC := GetDC(0); - try - PrevFont := SelectObject(DC, TitleFont.Handle); - R := PrinterPage.PaintRectPixels; - OffsetRect(R, -R.Left, -R.Top); - Result := 4 + Windows.DrawText(DC, PChar(TitleText), L, R, CalcFormat); - SelectObject(DC, PrevFont); - finally - ReleaseDC(0, DC); - end; - end; - ReportLink.DoMeasureReportLinkTitle(Result); - finally - if TitleAdjustOnReportScale then - TitleFont.Height := PrevFontHeight - end; - R := PrinterPage.PaintRectPixels; - L := (R.Bottom - R.Top) div 2; - if Result > L then Result := L; - if Result < 0 then Result := 0; -end; - -procedure TdxPSReportRenderInfo.CalculateTitleBounds; -begin - TitleBounds.Right := MulDiv(PaintSize.X, 100, ScaleFactor); - TitleBounds.Bottom := MulDiv(CalculateTitleHeight, - 100 * PixelsNumerator, ScaleFactor * PixelsDenominator); -end; - -procedure TdxPSReportRenderInfo.DoCalculate; -begin - if ReportCells <> nil then - begin - BaseContentFont := ReportCells.Font; - GridLinesColor := ReportCells.BorderColor; - end; - - CalculateTitleBounds; - CalculateHeaderAndFooterBounds; - CalculatePageDelimiters; - CalculatePageCount; - CalculatePageHeaderAndFooterBounds; - CalculatePageRenderInfos; -end; - -function TdxPSReportRenderInfo.GetNonEmptyPageCount: Integer; -begin - Result := VirtualPageCount - EmptyPageCount; -end; - -function TdxPSReportRenderInfo.GetPageColCount: Integer; -begin - Result := PageDelimiterXCount - 1; - if Result < 0 then Result := 0; - if (Result = 0) and (ReportCells <> nil) and (ReportCells.HeaderCellCount <> 0) and (ReportCells.FooterCellCount <> 0) then - Result := 1; -end; - -function TdxPSReportRenderInfo.GetPageRowCount: Integer; -begin - Result := PageDelimiterYCount - 1; - if Result < 0 then Result := 0; - if (Result = 0) and (ReportCells <> nil) and (ReportCells.HeaderCellCount <> 0) and (ReportCells.FooterCellCount <> 0) then - Result := 1; -end; - -function TdxPSReportRenderInfo.GetPageSize: TPoint; -begin - with PrinterPage.RealPageSizeLoMetric do - begin - Result.X := MulDiv(X, UnitsPerInch, 254); - Result.Y := MulDiv(Y, UnitsPerInch, 254); - end; -end; - -function TdxPSReportRenderInfo.GetPaintSize: TPoint; -begin - with PrinterPage.PaintRectLoMetric do - begin - Result.X := MulDiv(Right - Left, UnitsPerInch, 254); - Result.Y := MulDiv(Bottom - Top, UnitsPerInch, 254); - end; -end; - -function TdxPSReportRenderInfo.GetUnitsPerInch: Integer; -begin - Result := FUnitsPerInch; -end; - -function TdxPSReportRenderInfo.GetWindowScalePair: TdxWindowScalePair; -begin - Result.Numerator := 100; - Result.Denominator := ScaleFactor; -end; - -procedure TdxPSReportRenderInfo.SetUnitsPerInch(Value: Integer); -begin - FUnitsPerInch := Value; -end; - -procedure TdxPSReportRenderInfo.ClearPageRenderInfos; -var - I: Integer; -begin - for I := 0 to PageRenderInfoCount - 1 do - PageRenderInfos[I].Free; - FPageRenderInfos.Clear; -end; - -function TdxPSReportRenderInfo.CreatePageRenderInfo(APageIndex: Integer): TdxPSPageRenderInfo; -begin - Result := GetPageRenderInfoClass.Create(Self, APageIndex); - FPageRenderInfos.Add(Result); -end; - -procedure TdxPSReportRenderInfo.FreeAndNilPageRenderInfos; -begin - ClearPageRenderInfos; - FreeAndNil(FPageRenderInfos); -end; - -function TdxPSReportRenderInfo.GetPageRenderInfoClass: TdxPSPageRenderInfoClass; -begin - Result := TdxPSPageRenderInfo; -end; - -procedure TdxPSReportRenderInfo.Refresh; -begin - ClearPageRenderInfos; - FPageDelimitersX.Clear; - FPageDelimitersY.Clear; - - CanUseHFOnEveryPageMode := True; - - //FIsTitleHeightCalculated := False; - FEmptyPageCount := -1; - VirtualPageCount := 0; - - FooterBounds := NullRect; - HeaderBounds := NullRect; - PageFooterBounds := NullRect; - PageHeaderBounds := NullRect; - TitleBounds := NullRect; - FPixelsNumerator := Self.UnitsPerInch; -end; - -function TdxPSReportRenderInfo.HasPageTitle(APageIndex: Integer): Boolean; -begin - Result := not IsRectEmpty(TitleBounds) and IsDrawPageTitleOnPage(APageIndex); -end; - -function TdxPSReportRenderInfo.IsHardDelimiter(AValue: Integer): Boolean; -begin - Result := FHardDelimitersY.IndexOf(TObject(AValue)) <> -1; -end; - -procedure TdxPSReportRenderInfo.ReadData(AReader: TdxPSDataReader); -begin - ReadDelimiters(AReader); -end; - -procedure TdxPSReportRenderInfo.ReadDelimiters(AReader: TdxPSDataReader); - - procedure ReadList(AList: TList); - begin - AList.Clear; - AList.Count := AReader.ReadInteger; - AReader.Read(AList.List^, AList.Count * SizeOf(Pointer)); - end; - -begin - ReadList(FDelimitersX); - ReadList(FDelimitersY); -end; - -procedure TdxPSReportRenderInfo.WriteData(AWriter: TdxPSDataWriter); -begin - WriteDelimiters(AWriter); -end; - -procedure TdxPSReportRenderInfo.WriteDelimiters(AWriter: TdxPSDataWriter); - - procedure WriteList(AList: TList); - begin - AWriter.WriteInteger(AList.Count); - AWriter.Write(AList.List^, AList.Count * SizeOf(Pointer)); - end; - -begin - WriteList(FDelimitersX); - WriteList(FDelimitersY); -end; - -procedure TdxPSReportRenderInfo.AddPageDelimiterX(AValue: Integer); -begin - FPageDelimitersX.Add(TObject(AValue)); -end; - -procedure TdxPSReportRenderInfo.AddPageDelimiterY(AValue: Integer); -begin - FPageDelimitersY.Add(TObject(AValue)); -end; - -procedure TdxPSReportRenderInfo.PageDelimiterXClear; -begin - FPageDelimitersX.Clear; -end; - -procedure TdxPSReportRenderInfo.PageDelimiterYClear; -begin - FPageDelimitersY.Clear; -end; - -procedure TdxPSReportRenderInfo.AddStandardDelimiters; -begin - DelimiterXList.Add(TObject(Integer(0))); - DelimiterXList.Add(TObject(Integer(ReportWidth))); - DelimiterYList.Add(TObject(Integer(0))); - DelimiterYList.Add(TObject(Integer(ReportHeight))); -end; - -function CompareProc(Item1, Item2: Pointer ): Integer; -begin - Result := Integer(Item1) - Integer(Item2); -end; - -procedure TdxPSReportRenderInfo.EliminateDuplicatesAndSortDelimiters(AList: TList); -var - Duplicates: TList; - I: Integer; - V: Pointer; -begin - Duplicates := TList.Create; - try - for I := 0 to AList.Count - 1 do - begin - V := AList[I]; - if Duplicates.IndexOf(V) = -1 then Duplicates.Add(V); - end; - Duplicates.Sort(CompareProc); - AList.Clear; - AList.Count := Duplicates.Count; - V := AList.List; - Move(Duplicates.List^, V^, Duplicates.Count * SizeOf(Pointer)); - finally - Duplicates.Free; - end; -end; - -procedure TdxPSReportRenderInfo.GetDelimiters; -begin - DelimiterXList.Clear; - DelimiterYList.Clear; - HardDelimiterYList.Clear; - - if UseHorzDelimiters or UseVertDelimiters then - begin - MakeDelimiters; - if UseHardVertDelimiters then - begin - MakeHardDelimiters; - EliminateDuplicatesAndSortDelimiters(HardDelimiterYList); - TrancateDelimiters(HardDelimiterYList, ReportLink.ReportHeight); - end; - end; - - AddStandardDelimiters; - - EliminateDuplicatesAndSortDelimiters(DelimiterXList); - TrancateDelimiters(DelimiterXList, ReportLink.ReportWidth); - EliminateDuplicatesAndSortDelimiters(DelimiterYList); - TrancateDelimiters(DelimiterYList, ReportLink.ReportHeight); -end; - -procedure TdxPSReportRenderInfo.MakeDelimiters; -begin - ReportLink.MakeDelimiters(ReportCells, DelimiterXList, DelimiterYList); -end; - -procedure TdxPSReportRenderInfo.MakeHardDelimiters; -begin - ReportLink.MakeHardDelimiters(ReportCells, HardDelimiterYList); -end; - -procedure TBasedxReportLink.PageParamsChanged(Sender: TdxPrinterPage; - AStyle: TBasedxPrintStyle; AUpdateCodes: TdxPrinterPageUpdateCodes); -begin - if (RealPrinterPage = Sender) and IsCurrentLink and - (SignificantPrinterPageUpdateCodes * AUpdateCodes <> []) then - begin - if Active then - if GetRebuildOnPageParamsChange(AUpdateCodes) then - RebuildReport - else - CalculateRenderInfos; - DoPageParamsChanged; - end; -end; - -function TBasedxReportLink.PossibleCustomDraw(AnItem: TAbstractdxReportCellData): Boolean; -begin - Result := (DataSource = rldsComponent) and IsSupportedCustomDraw(AnItem); -end; - -procedure TBasedxReportLink.PrepareReportGroupsLookAndFeels; -var - DC: HDC; -begin - if ReportCells <> nil then - begin - DC := GetDC(0); - try - ReportCells.PrepareReportGroupsLookAndFeels(DC); - finally - ReleaseDC(0, DC); - end; - end; -end; - -procedure TdxPSReportRenderInfo.TrancateDelimiters(AList: TList; AValue: Integer); -var - I: Integer; -begin - I := AList.Count - 1; - while (I > -1) and (Integer(AList[I]) > AValue) do - begin - AList.Delete(I); - Dec(I); - end; -end; - -function TdxPSReportRenderInfo.LoMetricRectToInternalUnits(const R: TRect): TRect; -begin - with Result do - begin - Left := LoMetricValueToInternalUnits(R.Left); - Top := LoMetricValueToInternalUnits(R.Top); - Right := LoMetricValueToInternalUnits(R.Right); - Bottom := LoMetricValueToInternalUnits(R.Bottom); - end; -end; - -function TdxPSReportRenderInfo.LoMetricValueToInternalUnits(Value: Integer): Integer; -begin - Result := MulDiv(Value, 100 * UnitsPerInch, 254 * ScaleFactor); -end; - -function TdxPSReportRenderInfo.RealPageIndexToVirtualPageIndex(APageIndex: Integer; - ATakeIntoAccountEmptyPages: Boolean): Integer; -var - I: Integer; -begin - Result := APageIndex; - if (EmptyPageCount > 0) and (not ReportLink.ShowEmptyPages or ATakeIntoAccountEmptyPages) then - begin - I := 0; - while (I < VirtualPageCount) and (I <> Result) do - begin - if PageRenderInfos[I].IsEmptyPage then Inc(Result); - Inc(I); - end; - while (Result < VirtualPageCount) and PageRenderInfos[Result].IsEmptyPage do - Inc(Result); - if Result = VirtualPageCount then Dec(Result); - end; -end; - -function TdxPSReportRenderInfo.VirtualPageIndexToRealPageIndex(APageIndex: Integer): Integer; -var - I: Integer; -begin - Result := APageIndex; - if (EmptyPageCount = 0) or not ReportLink.ShowEmptyPages then - Exit; - for I := 0 to APageIndex do - if PageRenderInfos[I].IsEmptyPage then Dec(Result); -end; - -function TdxPSReportRenderInfo.GetPrinterPage: TdxPrinterPage; -begin - Result := ReportLink.RealPrinterPage; -end; - -function TdxPSReportRenderInfo.GetReportCells: TdxReportCells; -begin - Result := ReportLink.FReportCells; -end; - -function TdxPSReportRenderInfo.GetReportHeight: Integer; -begin - Result := ReportLink.ReportHeight; -end; - -function TdxPSReportRenderInfo.GetReportWidth: Integer; -begin - Result := ReportLink.ReportWidth; -end; - -function TdxPSReportRenderInfo.GetScaleFactor: Integer; -begin - Result := ReportLink.RealScaleFactor; -end; - -function TdxPSReportRenderInfo.GetTitleAdjustOnReportScale: Boolean; -begin - Result := ReportLink.ReportTitle.AdjustOnReportScale; -end; - -function TdxPSReportRenderInfo.GetTitleFont: TFont; -begin - Result := ReportLink.ReportTitle.Font; -end; - -function TdxPSReportRenderInfo.GetTitleText: string; -begin - Result := ReportLink.ReportTitleText; -end; - -function TdxPSReportRenderInfo.GetBreakPagesByHardDelimiters: Boolean; -begin - Result := UseHardVertDelimiters and ReportLink.BreakPagesByHardDelimiters; -end; - -function TdxPSReportRenderInfo.GetDelimiterX(Index: Integer): Integer; -begin - Result := Integer(FDelimitersX.List^[Index]); -end; - -function TdxPSReportRenderInfo.GetDelimiterXCount: Integer; -begin - Result := FDelimitersX.Count; -end; - -function TdxPSReportRenderInfo.GetDelimiterY(Index: Integer): Integer; -begin - Result := Integer(FDelimitersY.List^[Index]); -end; - -function TdxPSReportRenderInfo.GetDelimiterYCount: Integer; -begin - Result := FDelimitersY.Count; -end; - -function TdxPSReportRenderInfo.GetEmptyPageCount: Integer; -begin - if FEmptyPageCount = -1 then - if ReportLink.NeedCalcEmptyPages then - FEmptyPageCount := CalculateEmptyPageCount - else - FEmptyPageCount := 0; - Result := FEmptyPageCount; -end; - -function TdxPSReportRenderInfo.GetFooterHeight: Integer; -begin - with FooterBounds do - Result := Bottom - Top; -end; - -function TdxPSReportRenderInfo.GetHeaderHeight: Integer; -begin - with HeaderBounds do - Result := Bottom - Top; -end; - -function TdxPSReportRenderInfo.GetLocked: Boolean; -begin - Result := FLockCounter <> 0; -end; - -function TdxPSReportRenderInfo.GetPageDelimiterX(Index: Integer): Integer; -begin - Result := Integer(FPageDelimitersX.List^[Index]); -end; - -function TdxPSReportRenderInfo.GetPageDelimiterXCount: Integer; -begin - Result := FPageDelimitersX.Count; -end; - -function TdxPSReportRenderInfo.GetPageDelimiterY(Index: Integer): Integer; -begin - Result := Integer(FPageDelimitersY.List^[Index]); -end; - -function TdxPSReportRenderInfo.GetPageDelimiterYCount: Integer; -begin - Result := FPageDelimitersY.Count; -end; - -function TdxPSReportRenderInfo.GetPageRenderInfo(Index: Integer): TdxPSPageRenderInfo; -begin - Result := TdxPSPageRenderInfo(FPageRenderInfos[Index]); -end; - -function TdxPSReportRenderInfo.GetPageRenderInfoCount: Integer; -begin - Result := FPageRenderInfos.Count; -end; - -function TdxPSReportRenderInfo.GetUseHardVertDelimiters: Boolean; -begin - Result := ReportLink.UseHardVertDelimiters; -end; - -function TdxPSReportRenderInfo.GetUseHorzDelimiters: Boolean; -begin - Result := ReportLink.UseHorzDelimiters; -end; - -function TdxPSReportRenderInfo.GetUseVertDelimiters: Boolean; -begin - Result := ReportLink.UseVertDelimiters; -end; - -function TdxPSReportRenderInfo.GetTitleHeight: Integer; -begin - with TitleBounds do - Result := Bottom - Top; -end; - -procedure TdxPSReportRenderInfo.SetBaseContentFont(Value: TFont); -begin - BaseContentFont.Assign(Value); -end; - -function TdxPSReportRenderInfo.IsNonEmptyPage(const ABounds: TRect): Boolean; -var - I: Integer; - R: TRect; -begin - Result := False; - if ReportCells <> nil then - for I := 0 to ReportCells.Count - 1 do - begin - R := ReportCells.Cells[I].AbsoluteRect; - Result := IntersectRect(R, R, ABounds); - if Result then Exit; - end; -end; - -{ TdxPSCellBorderPainter } - -constructor TdxPSCellBorderPainter.Create(ARenderer: TdxPSReportRenderer); -begin - inherited Create; - FRenderer := ARenderer; -end; - -class procedure TdxPSCellBorderPainter.DrawFrame(DC: HDC; R: TRect; ASides: TdxCellSides; - ATLBrush, ABRBrush: HBRUSH; ALineThickness: Integer; AThickness: Integer = 1); -var - I: Integer; - Side: TdxCellSide; - BorderBounds: TRect; -begin - for I := 0 to AThickness - 1 do - begin - for Side := csLeft to csBottom do - if Side in ASides then - begin - BorderBounds := GetBorderBounds(R, Side, ALineThickness); - if RectVisible(DC, BorderBounds) then - if Side in csTopLeft then - Windows.FillRect(DC, BorderBounds, ATLBrush) - else - Windows.FillRect(DC, BorderBounds, ABRBrush); - end; - InflateRect(R, ASides, ALineThickness); - end; -end; - -class procedure TdxPSCellBorderPainter.DrawShadow(DC: HDC; const R: TRect; - AShadowDepth: Integer; AShadowBrush, ARestSpaceBrush: HBRUSH); -begin - Windows.FillRect(DC, GetBottomShadowBounds(R, AShadowDepth), AShadowBrush); - Windows.FillRect(DC, GetBottomShadowRestSpaceBounds(R, AShadowDepth), ARestSpaceBrush); - Windows.FillRect(DC, GetRightShadowBounds(R, AShadowDepth), AShadowBrush); - Windows.FillRect(DC, GetRightShadowRestSpaceBounds(R, AShadowDepth), ARestSpaceBrush); -end; - -procedure TdxPSCellBorderPainter.Paint(DC: HDC); -var - R: TRect; -begin - with Item do - begin - R := GetBorderOuterBounds(DC); - DrawFrame(DC, R, CellSides, BorderBrush, BorderBrush, LineThickness, BorderClass.Thickness); - if ShowShadow and (ShadowDepth <> 0) then - DrawShadow(DC, R, ShadowDepth, ShadowBrush, ParentBrush); - end; -end; - -function TdxPSCellBorderPainter.BorderClass: TdxPSCellBorderClass; -begin - Result := Item.BorderClass; -end; - -function TdxPSCellBorderPainter.Item: TdxReportVisualItem; -begin - Result := FItem; -end; - -function TdxPSCellBorderPainter.Renderer: TdxPSReportRenderer; -begin - Result := FRenderer; -end; - -class function TdxPSCellBorderPainter.GetBorderBounds(const R: TRect; - ASide: TdxCellSide; ALineThickness: Integer): TRect; -begin - Result := R; - with Result do - case ASide of - csLeft: - Right := Left + ALineThickness; - csTop: - Bottom := Top + ALineThickness; - csRight: - Left := Right - ALineThickness; - csBottom: - Top := Bottom - ALineThickness; - end; -end; - -class function TdxPSCellBorderPainter.GetBottomShadowBounds(const R: TRect; - AShadowDepth: Integer): TRect; -begin - with Result do - begin - Left := R.Left + AShadowDepth; - Top := R.Bottom; - Right := R.Right + AShadowDepth; - Bottom := Top + AShadowDepth; - end; -end; - -class function TdxPSCellBorderPainter.GetBottomShadowRestSpaceBounds(const R: TRect; - AShadowDepth: Integer): TRect; -begin - with Result do - begin - Left := R.Left; - Top := R.Bottom; - Right := Left + AShadowDepth; - Bottom := Top + AShadowDepth; - end; -end; - -class function TdxPSCellBorderPainter.GetRightShadowBounds(const R: TRect; - AShadowDepth: Integer): TRect; -begin - with Result do - begin - Left := R.Right; - Top := R.Top + AShadowDepth; - Right := Left + AShadowDepth; - Bottom := Bottom; - end; -end; - -class function TdxPSCellBorderPainter.GetRightShadowRestSpaceBounds(const R: TRect; - AShadowDepth: Integer): TRect; -begin - with Result do - begin - Left := R.Right; - Top := R.Top; - Right := Left + AShadowDepth; - Bottom := Top + AShadowDepth; - end; -end; - -class procedure TdxPSCellBorderPainter.InflateRect(var R: TRect; ASides: TdxCellSides; - ALineThickness: Integer); -begin - if csLeft in ASides then Inc(R.Left, ALineThickness); - if csTop in ASides then Inc(R.Top, ALineThickness); - if csRight in ASides then Dec(R.Right, ALineThickness); - if csBottom in ASides then Dec(R.Bottom, ALineThickness); -end; - -function TdxPSCellBorderPainter.GetLineThickness: Integer; -begin - Result := Renderer.LineThickness; -end; - -{ TdxPSCustomCellBorder } - -class procedure TdxPSCustomCellBorder.Register; -begin - if GetClass(ClassName) = nil then RegisterClass(Self); -end; - -class procedure TdxPSCustomCellBorder.Unregister; -begin -end; - -class function TdxPSCustomCellBorder.Solid: Boolean; -begin - Result := True; -end; - -class function TdxPSCustomCellBorder.Thickness: Integer; -begin - Result := 0; -end; - -class function TdxPSCustomCellBorder.Edge3DSoft: Boolean; -begin - Result := False; -end; - -class function TdxPSCustomCellBorder.Edge3DStyle: TdxCellEdgeStyle; -begin - Result := cesRaised; -end; - -class function TdxPSCustomCellBorder.EdgeMode: TdxCellEdgeMode; -begin - Result := cemPattern; -end; - -class function TdxPSCustomCellBorder.GetBorderEdgeSalient(ASide: TdxCellSide; - ASalient: TdxPSCellBorderSalientType): Integer; -begin - if ASalient = bstOuter then - if ASide in csTopLeft then - Result := 1 + Thickness div 2 - else - Result := (Thickness - 1) div 2 - else - if ASide in csTopLeft then - Result := (Thickness - 1) div 2 - else - Result := 1 + Thickness div 2 -end; - -class function TdxPSCustomCellBorder.GetPainterClass: TdxPSCellBorderPainterClass; -begin - Result := TdxPSCellBorderPainter; -end; - -{ TdxPSCellNullBorderPainter } - -procedure TdxPSCellNullBorderPainter.Paint(DC: HDC); -begin - with Item do - if ShowShadow and (ShadowDepth <> 0) then - DrawShadow(DC, GetBorderOuterBounds(DC), ShadowDepth, ShadowBrush, ParentBrush); -end; - -{ TdxPSNullCellEdge } - -class function TdxPSCellNullBorder.GetPainterClass: TdxPSCellBorderPainterClass; -begin - Result := TdxPSCellNullBorderPainter; -end; - -class function TdxPSCellNullBorder.Thickness: Integer; -begin - Result := 0; -end; - -{ TdxPSCellFlatBorder } - -class function TdxPSCellFlatBorder.GetPainterClass: TdxPSCellBorderPainterClass; -begin - Result := inherited GetPainterClass;//TdxPSCellFlatBorderPainter; //TODO: -end; - -{ TdxPSCellBoldFlatBorder } - -class function TdxPSCellBoldFlatBorder.Thickness: Integer; -begin - Result := 2; -end; - -{ TdxPSCellUltraFlatBorder } - -class function TdxPSCellUltraFlatBorder.Thickness: Integer; -begin - Result := 1; -end; - -{ TdxPSCell3DBorderPainter } - -class procedure TdxPSCell3DBorderPainter.Draw3DFrame(DC: HDC; R: TRect; ASides: TdxCellSides; - AOuterTLBrush, AOuterBRBrush, AInnerTLBrush, AInnerBRBrush: HBRUSH; ALineThickness: Integer); -begin - DrawFrame(DC, R, ASides, AOuterTLBrush, AOuterBRBrush, ALineThickness); - InflateRect(R, ASides, ALineThickness); - DrawFrame(DC, R, ASides, AInnerTLBrush, AInnerBRBrush, ALineThickness); -end; - -class procedure TdxPSCell3DBorderPainter.Draw3DFrame(DC: HDC; R: TRect; ASides: TdxCellSides; - ACellBorders: TdxPSCell3DBorderClass; ALineThickness: Integer); -begin - with ACellBorders do - Draw3DFrame(DC, R, ASides, TopLeftOuterBrush, BottomRightOuterBrush, - TopLeftInnerBrush, BottomRightInnerBrush, ALineThickness); -end; - -procedure TdxPSCell3DBorderPainter.Paint(DC: HDC); -var - R: TRect; -begin - with Item do - begin - R := GetBorderOuterBounds(DC); - Draw3DFrame(DC, R, CellSides, Self.BorderClass, LineThickness); - if ShowShadow and (ShadowDepth <> 0) then - DrawShadow(DC, R, ShadowDepth, ShadowBrush, ParentBrush); - end; -end; - -function TdxPSCell3DBorderPainter.BorderClass: TdxPSCell3DBorderClass; -begin - Result := TdxPSCell3DBorderClass(inherited BorderClass); -end; - -{ TdxPSCustomCell3DBorder } - -class function TdxPSCustomCell3DBorder.Solid: Boolean; -begin - Result := False; -end; - -class function TdxPSCustomCell3DBorder.Thickness: Integer; -begin - Result := 2; -end; - -class function TdxPSCustomCell3DBorder.BottomRightInnerBrush: HBRUSH; -begin - Result := NULL_BRUSH; -end; - -class function TdxPSCustomCell3DBorder.BottomRightInnerColor: TColor; -begin - Result := clNone; -end; - -class function TdxPSCustomCell3DBorder.BottomRightOuterBrush: HBRUSH; -begin - Result := NULL_BRUSH; -end; - -class function TdxPSCustomCell3DBorder.BottomRightOuterColor: TColor; -begin - Result := clNone; -end; - -class function TdxPSCustomCell3DBorder.TopLeftInnerBrush: HBRUSH; -begin - Result := NULL_BRUSH; -end; - -class function TdxPSCustomCell3DBorder.TopLeftInnerColor: TColor; -begin - Result := clNone; -end; - -class function TdxPSCustomCell3DBorder.TopLeftOuterBrush: HBRUSH; -begin - Result := NULL_BRUSH; -end; - -class function TdxPSCustomCell3DBorder.TopLeftOuterColor: TColor; -begin - Result := clNone; -end; - -class function TdxPSCustomCell3DBorder.EdgeMode: TdxCellEdgeMode; -begin - Result := cem3DEffects; -end; - -class function TdxPSCustomCell3DBorder.GetBorderEdgeSalient(ASide: TdxCellSide; - ASalient: TdxPSCellBorderSalientType): Integer; -begin - if ASalient = bstOuter then - if ASide in csTopLeft then - Result := Thickness div 2 - else - Result := (Thickness - 1) div 2 - else - if ASide in csTopLeft then - Result := (Thickness - 1) div 2 - else - Result := Thickness div 2 -end; - -class function TdxPSCustomCell3DBorder.GetPainterClass: TdxPSCellBorderPainterClass; -begin - Result := TdxPSCell3DBorderPainter; -end; - -{ TdxPSCellRaisedBorder } - -class function TdxPSCellRaisedBorder.BottomRightInnerBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNSHADOW); -end; - -class function TdxPSCellRaisedBorder.BottomRightInnerColor: TColor; -begin - Result := clBtnShadow; -end; - -class function TdxPSCellRaisedBorder.BottomRightOuterBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_WINDOWTEXT); -end; - -class function TdxPSCellRaisedBorder.BottomRightOuterColor: TColor; -begin - Result := clWindowText; -end; - -class function TdxPSCellRaisedBorder.TopLeftInnerBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNHIGHLIGHT); -end; - -class function TdxPSCellRaisedBorder.TopLeftInnerColor: TColor; -begin - Result := clBtnHighlight; -end; - -class function TdxPSCellRaisedBorder.TopLeftOuterBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_WINDOWTEXT); -end; - -class function TdxPSCellRaisedBorder.TopLeftOuterColor: TColor; -begin - Result := clWindowText; -end; - -class function TdxPSCellRaisedBorder.Edge3DSoft: Boolean; -begin - Result := False; -end; - -class function TdxPSCellRaisedBorder.Edge3DStyle: TdxCellEdgeStyle; -begin - Result := cesRaised; -end; - -{ TdxPSCellRaisedSoftBorder } - -class function TdxPSCellRaisedSoftBorder.BottomRightInnerBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNFACE); -end; - -class function TdxPSCellRaisedSoftBorder.BottomRightInnerColor: TColor; -begin - Result := clBtnFace; -end; - -class function TdxPSCellRaisedSoftBorder.Edge3DSoft: Boolean; -begin - Result := True; -end; - -{ TdxPSCellSunkenBorder } - -class function TdxPSCellSunkenBorder.BottomRightInnerBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNFACE); -end; - -class function TdxPSCellSunkenBorder.BottomRightInnerColor: TColor; -begin - Result := clBtnFace; -end; - -class function TdxPSCellSunkenBorder.BottomRightOuterBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNHIGHLIGHT); -end; - -class function TdxPSCellSunkenBorder.BottomRightOuterColor: TColor; -begin - Result := clBtnHighlight; -end; - -class function TdxPSCellSunkenBorder.TopLeftInnerBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNSHADOW); -end; - -class function TdxPSCellSunkenBorder.TopLeftInnerColor: TColor; -begin - Result := clBtnShadow; -end; - -class function TdxPSCellSunkenBorder.TopLeftOuterBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_WINDOWTEXT); -end; - -class function TdxPSCellSunkenBorder.TopLeftOuterColor: TColor; -begin - Result := clWindowText; -end; - -class function TdxPSCellSunkenBorder.Edge3DSoft: Boolean; -begin - Result := False; -end; - -class function TdxPSCellSunkenBorder.Edge3DStyle: TdxCellEdgeStyle; -begin - Result := cesSunken; -end; - -{ TdxPSCellSunkenSoftBorder } - -class function TdxPSCellSunkenSoftBorder.BottomRightInnerBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNFACE); -end; - -class function TdxPSCellSunkenSoftBorder.BottomRightInnerColor: TColor; -begin - Result := clBtnFace; -end; - -class function TdxPSCellSunkenSoftBorder.TopLeftInnerBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNFACE); -end; - -class function TdxPSCellSunkenSoftBorder.TopLeftInnerColor: TColor; -begin - Result := clBtnFace; -end; - -class function TdxPSCellSunkenSoftBorder.Edge3DSoft: Boolean; -begin - Result := True; -end; - -{ TdxPSCellEtchedBorderPainter } - -{$IFDEF BCB} -class procedure TdxPSCellTwistedBorderPainter.Draw3DFrame(DC: HDC; R: TRect; - ASides: TdxCellSides; ACellBorders: TdxPSCell3DBorderClass; ALineThickness: Integer); -begin - inherited; -end; -{$ENDIF} - -class procedure TdxPSCellTwistedBorderPainter.Draw3DFrame(DC: HDC; R: TRect; ASides: TdxCellSides; - AOuterTLBrush, AOuterBRBrush, AInnerTLBrush, AInnerBRBrush: HBRUSH; ALineThickness: Integer); -begin - Inc(R.Left, ALineThickness); - Inc(R.Top, ALineThickness); - DrawFrame(DC, R, ASides, AInnerTLBrush, AInnerBRBrush, ALineThickness); - Windows.OffsetRect(R, -ALineThickness, -ALineThickness); - DrawFrame(DC, R, ASides, AOuterTLBrush, AOuterBRBrush, ALineThickness); -end; - -{ TdxPSCellTwistedBorder } - -class function TdxPSCellTwistedBorder.GetPainterClass: TdxPSCellBorderPainterClass; -begin - Result := TdxPSCellTwistedBorderPainter; -end; - -{ TdxPSCellEtchedBorder } - -class function TdxPSCellEtchedBorder.BottomRightInnerBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNHIGHLIGHT); -end; - -class function TdxPSCellEtchedBorder.BottomRightInnerColor: TColor; -begin - Result := clBtnHighLight; -end; - -class function TdxPSCellEtchedBorder.BottomRightOuterBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_WINDOWTEXT); -end; - -class function TdxPSCellEtchedBorder.BottomRightOuterColor: TColor; -begin - Result := clWindowText; -end; - -class function TdxPSCellEtchedBorder.TopLeftInnerBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNHIGHLIGHT); -end; - -class function TdxPSCellEtchedBorder.TopLeftInnerColor: TColor; -begin - Result := clBtnHighLight; -end; - -class function TdxPSCellEtchedBorder.TopLeftOuterBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_WINDOWTEXT); -end; - -class function TdxPSCellEtchedBorder.TopLeftOuterColor: TColor; -begin - Result := clWindowText; -end; - -{ TdxPSCellBumpedBorder } - -class function TdxPSCellBumpedBorder.BottomRightInnerBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_WINDOWTEXT); -end; - -class function TdxPSCellBumpedBorder.BottomRightInnerColor: TColor; -begin - Result := clWindowText; -end; - -class function TdxPSCellBumpedBorder.BottomRightOuterBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNHIGHLIGHT); -end; - -class function TdxPSCellBumpedBorder.BottomRightOuterColor: TColor; -begin - Result := clBtnHighLight; -end; - -class function TdxPSCellBumpedBorder.TopLeftInnerBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_WINDOWTEXT); -end; - -class function TdxPSCellBumpedBorder.TopLeftInnerColor: TColor; -begin - Result := clWindowText; -end; - -class function TdxPSCellBumpedBorder.TopLeftOuterBrush: HBRUSH; -begin - Result := GetSysColorBrush(COLOR_BTNHIGHLIGHT); -end; - -class function TdxPSCellBumpedBorder.TopLeftOuterColor: TColor; -begin - Result := clBtnHighLight; -end; - -{ TdxPSCellBorderPainter } - -procedure TdxPSColorBorderPainter.Paint(DC: HDC); -var - R: TRect; - Side: TdxCellSide; - BorderBounds: TRect; -begin - with Item do - begin - R := GetBorderOuterBounds(DC); -// SelectClipRgn(DC, 0); - if RectVisible(DC, R) then - begin - for Side := csBottom downto csLeft do - if Side in CellSides then - begin - BorderBounds := Self.GetBorderBounds(R, Side, Renderer.LineThickness); - Windows.FillRect(DC, BorderBounds, - Renderer.GetBrushByColor(SideColor[Side])); - end; - end; - end; -end; - -function TdxPSColorBorderPainter.GetSideColor(ASide: TdxCellSide): TColor; -begin - Result := FItem.FCellSideColors[ASide]; -end; - -{ TdxPSColorBorder } - -class function TdxPSColorBorder.GetPainterClass: TdxPSCellBorderPainterClass; -begin - Result := TdxPSColorBorderPainter; -end; - -{ TdxPSBackgroundBitmapPool } - -constructor TdxPSBackgroundBitmapPool.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TdxPSBackgroundBitmapPool.Destroy; -begin - Clear; - FreeAndNil(FItems); - inherited Destroy; -end; - -procedure TdxPSBackgroundBitmapPool.Assign(Source: TdxPSBackgroundBitmapPool); -var - I: Integer; -begin - Clear; - for I := 0 to Source.Count - 1 do - Add(Source.Items[I]); -end; - -function TdxPSBackgroundBitmapPool.Add(ABitmap: TBitmap): Integer; -begin - if not Find(ABitmap, Result) then Result := FItems.Add(ABitmap); -end; - -procedure TdxPSBackgroundBitmapPool.Clear; -begin - FItems.Clear; -end; - -procedure TdxPSBackgroundBitmapPool.Delete(AnIndex: Integer); -begin - FItems.Delete(AnIndex); -end; - -function TdxPSBackgroundBitmapPool.Find(ABitmap: TBitmap; out AnIndex: Integer): Boolean; -var - I: Integer; -begin - AnIndex := -1; - for I := 0 to Count - 1 do - if dxPSUtl.dxAreGraphicsEqual(Items[I], ABitmap) then - begin - AnIndex := I; - Break; - end; - Result := AnIndex <> -1; -end; - -procedure TdxPSBackgroundBitmapPool.ReadData(AReader: TdxPSDataReader); -var - Bitmap: TBitmap; -begin - AReader.ReadListBegin; - try - while not AReader.EndOfList do - begin - Bitmap := TBitmap.Create; - try - AReader.ReadImage(Bitmap); - Add(Bitmap); - except - Bitmap.Free; - raise; - end; - end; - finally - AReader.ReadListEnd; - end; -end; - -procedure TdxPSBackgroundBitmapPool.WriteData(AWriter: TdxPSDataWriter); -var - I: Integer; -begin - AWriter.WriteListBegin; - try - for I := 0 to Count - 1 do - AWriter.WriteImage(Items[I]); - finally - AWriter.WriteListEnd; - end; -end; - -function TdxPSBackgroundBitmapPool.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxPSBackgroundBitmapPool.GetItem(Index: Integer): TBitmap; -begin - if Index <> -1 then - Result := TBitmap(FItems[Index]) - else - Result := nil; -end; - -{ TdxPSBrushPoolItem } - -constructor TdxPSBrushPoolItem.Create(AColor: TColor); -begin - inherited Create; - FBrush := NULL_BRUSH; - FColor := ColorToRGB(AColor); -end; - -destructor TdxPSBrushPoolItem.Destroy; -begin - if FBrush <> NULL_BRUSH then - begin - DeleteObject(FBrush); - FBrush := NULL_BRUSH; - end; - inherited; -end; - -function TdxPSBrushPoolItem.GetBrush: HBRUSH; -begin - if FBrush = NULL_BRUSH then - FBrush := CreateSolidBrush(Color); - Result := FBrush; -end; - -{ TdxPSReportBrushPool } - -constructor TdxPSReportBrushPool.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TdxPSReportBrushPool.Destroy; -begin - Clear; - FreeAndNil(FItems); - inherited; -end; - -procedure TdxPSReportBrushPool.Clear; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Free; - FItems.Clear; -end; - -function TdxPSReportBrushPool.IndexOf(AColor: TColor): Integer; -begin - AColor := ColorToRGB(AColor); - for Result := 0 to Count - 1 do - if Items[Result].Color = AColor then Exit; - Result := -1; -end; - -function TdxPSReportBrushPool.Add(AColor: TColor): Integer; -begin - Result := Count; - FItems.Add(TdxPSBrushPoolItem.Create(AColor)); -end; - -function TdxPSReportBrushPool.GetBrush(AColor: TColor): HBRUSH; -var - Index: Integer; -begin - Index := IndexOf(AColor); - if Index = -1 then - Index := Add(AColor); - Result := Items[Index].Brush; -end; - -function TdxPSReportBrushPool.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxPSReportBrushPool.GetItem(Index: Integer): TdxPSBrushPoolItem; -begin - Result := TdxPSBrushPoolItem(FItems[Index]); -end; - -{ TdxPSFontPoolItem } - -constructor TdxPSFontPoolItem.Create(AFont: TFont); -begin - inherited Create; - FFont := TFont.Create; - Font := AFont; - OriginalSize := Font.Size; -end; - -destructor TdxPSFontPoolItem.Destroy; -begin - FreeAndNil(FFont); - inherited; -end; - -procedure TdxPSFontPoolItem.SetFont(Value: TFont); -begin - Font.Assign(Value); -end; - -{ TdxPSReportFontPool } - -constructor TdxPSReportFontPool.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TdxPSReportFontPool.Destroy; -begin - Clear; - FreeAndNil(FItems); - inherited; -end; - -function TdxPSReportFontPool.Add(AFont: TFont): Integer; -begin - Result := IndexOf(AFont); - if Result = -1 then - Result := CreateFont(AFont); -end; - -procedure TdxPSReportFontPool.Clear; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Free; - FItems.Clear; -end; - -function TdxPSReportFontPool.IndexOf(AFont: TFont): Integer; -begin - for Result := 0 to Count - 1 do - if dxAreFontsEqual(Fonts[Result], AFont) then Exit; - Result := -1; -end; - -function TdxPSReportFontPool.CreateFont(AFont: TFont): Integer; -var - Item: TdxPSFontPoolItem; -begin - Result := Count; - Item := TdxPSFontPoolItem.Create(AFont); - FItems.Add(Item); - Item.Font.OnChange := FontChanged; -end; - -procedure TdxPSReportFontPool.FontChanged(Sender: TObject); -begin - if not FLocked then Add(TFont(Sender)); -end; - -procedure TdxPSReportFontPool.PrepareFonts(UPI: Integer); -var - I: Integer; -begin - FLocked := True; - try - for I := 0 to Count - 1 do - with Items[I] do - Font.Height := -MulDiv(OriginalSize, UPI, PtPerInch); - finally - FLocked := False; - end; -end; - -procedure TdxPSReportFontPool.ReadData(AReader: TdxPSDataReader); -var - Font: TFont; -begin - Clear; - Font := TFont.Create; - try - AReader.ReadListBegin; - try - while not AReader.EndOfList do - begin - AReader.ReadFont(Font); - Font.Size := AReader.ReadInteger; - Add(Font); - end; - finally - AReader.ReadListEnd; - end; - finally - Font.Free; - end; -end; - -procedure TdxPSReportFontPool.WriteData(AWriter: TdxPSDataWriter); -var - I: Integer; - Item: TdxPSFontPoolItem; -begin - AWriter.WriteListBegin; - try - for I := 0 to Count - 1 do - begin - Item := Items[I]; - AWriter.WriteFont(Item.Font); - AWriter.WriteInteger(Item.OriginalSize); - end; - finally - AWriter.WriteListEnd; - end; -end; - -function TdxPSReportFontPool.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxPSReportFontPool.GetFont(Index: Integer): TFont; -begin - Result := Items[Index].Font; -end; - -function TdxPSReportFontPool.GetItem(Index: Integer): TdxPSFontPoolItem; -begin - Result := TdxPSFontPoolItem(FItems[Index]); -end; - -{ TdxPSCachedGraphicInfo } - -constructor TdxPSCachedGraphicInfo.Create(ARenderer: TdxPSReportRenderer); -begin - Renderer := ARenderer; -end; - -function TdxPSCachedGraphicInfo.Check( - ASourceGraphic: TGraphic; ABitmap: TBitmap; var APreparedGraphic: TGraphic): Boolean; -begin - Result := ASourceGraphic <> nil; - if Result then - begin - Result := (ASourceGraphic = SourceGraphic) and (UnitsPerInch = Renderer.UnitsPerInch) and - (UnitsPerPixel = Renderer.UnitsPerPixel) and (ZoomFactor = Renderer.ZoomFactor) and - (ABitmap.Width = ASourceGraphic.Width) and (ABitmap.Height = ASourceGraphic.Height); - if Result then - APreparedGraphic := PreparedGraphic - else - begin - PreparedGraphic := APreparedGraphic; - SourceGraphic := ASourceGraphic; - SaveModeInfo; - end; - APreparedGraphic := ABitmap; - end; -end; - -procedure TdxPSCachedGraphicInfo.Clear; -begin - SourceGraphic := nil; - UnitsPerInch := 0; - UnitsPerPixel := 0; - ZoomFactor := 0; -end; - -procedure TdxPSCachedGraphicInfo.SaveModeInfo; -begin - UnitsPerInch := Renderer.UnitsPerInch; - UnitsPerPixel := Renderer.UnitsPerPixel; - ZoomFactor := Renderer.ZoomFactor; -end; - -{ TdxPSReportRenderer } - -constructor TdxPSReportRenderer.Create(AReportLink: TBasedxReportLink); - - function CreateBitmap: TBitmap; - begin - Result := TBitmap.Create; - with Result do - try - { Delphi4 bug ? - we have to assign image sizes manually at the first time of creating one } - Height := 16; - Width := 16; - HandleType := bmDIB; - except - Result.Free; - raise; - end; - end; - - function CreateFont(const AName: string; ASize: Integer): TFont; - begin - Result := TFont.Create; - Result.Name := AName; - Result.Size := ASize; - Result.Charset := SYMBOL_CHARSET;//DEFAULT_CHARSET; - dxPSUtl.SetFontAsNonAntialiased(Result); - end; - -begin - inherited Create; - FCachedGraphicInfo := TdxPSCachedGraphicInfo.Create(Self); - FBorderPainters := TList.Create; - FBrushPool := TdxPSReportBrushPool.Create; - FReportLink := AReportLink; - FCheckBitmap := CreateBitmap; - FDrawBitmap := CreateBitmap; - FDrawMask := CreateBitmap; - FGroupLookAndFeelPainters := TList.Create; - FHFStrings := TStringList.Create; - FLineThickness := 1; - FMarlettFont10 := CreateFont('Marlett', 10); - FMarlettFont8 := CreateFont('Marlett', 8); - FSymbolFont := CreateFont('Symbol', 7); - FSaveFont := TFont.Create; -end; - -destructor TdxPSReportRenderer.Destroy; -begin - FreeAndNil(FSaveFont); - FreeAndNil(FSymbolFont); - FreeAndNil(FMarlettFont10); - FreeAndNil(FMarlettFont8); - FreeAndNil(FHFStrings); - FreeAndNilReportGroupLookAndFeelPainters; - FreeAndNil(FDrawMask); - FreeAndNil(FDrawBitmap); - FreeAndNil(FCheckBitmap); - FreeAndNil(FBrushPool); - FreeAndNil(FCachedGraphicInfo); - FreeAndNilBorderPainters; - inherited Destroy; -end; - -function TdxPSReportRenderer.CustomDrawReportItem(AnItem: TAbstractdxReportCellData): Boolean; -var - R: TRect; - ARgn: HRGN; -begin - Result := False; - R := AnItem.GetOuterBounds(DC); - ARgn := GetClipRgn; - Windows.IntersectClipRect(DC, R.Left, R.Top, R.Right, R.Bottom); - ReportLink.CustomDraw(AnItem, Canvas, R, AnItem.BoundsRect, Result); - RestoreClipRgn(ARgn); -end; - -procedure TdxPSReportRenderer.Get3DBorderBrushes(AnItem: TdxReportVisualItem; - var AOuterTLBrush, AOuterBRBrush, AInnerTLBrush, AInnerBRBrush: HBRUSH); -begin - dxPSCore.Get3DBorderBrushes(AnItem.Edge3DStyle, AnItem.Edge3DSoft, - AOuterTLBrush, AOuterBRBrush, AInnerTLBrush, AInnerBRBrush); -end; - -procedure TdxPSReportRenderer.Get3DBorderColors(AnItem: TdxReportVisualItem; - var AOuterTLColor, AOuterBRColor, AInnerTLColor, AInnerBRColor: TColor); -begin - dxPSCore.Get3DBorderColors(AnItem.Edge3DStyle, AnItem.Edge3DSoft, - AOuterTLColor, AOuterBRColor, AInnerTLColor, AInnerBRColor); -end; - -procedure TdxPSReportRenderer.RenderPageTitleContent(const AText: string; ARect: TRect; - ATextAlignX: TcxTextAlignX; ATextAlignY: TcxTextAlignY; AColor: TColor; AFont: TFont; - ATransparent: Boolean); -const - cFormat: DWORD = CXTO_AUTOINDENTS or CXTO_EXPANDTABS or CXTO_PATTERNEDTEXT or CXTO_CHARBREAK; -var - PrevFontSize, UPI: Integer; - Rgn: HRGN; - Done: Boolean; - Format: DWORD; -begin - PrevFontSize := AFont.Size; - UPI := UnitsPerInch; - if not ReportLink.ReportTitle.AdjustOnReportScale then - UPI := MulDiv(UPI, 100, ReportLink.RealScaleFactor); - AFont.Size := MulDiv(PrevFontSize, UPI, Screen.PixelsPerInch); //PPI); - - Rgn := IntersectClipRect(ARect); - try - Done := False; - if ReportLink.IsTitleCustomDrawn then - begin - PrepareCanvasForCustomDraw(AFont, AColor); - ReportLink.DoCustomDrawPageTitle(Canvas, ARect, ATextAlignX, ATextAlignY, AColor, AFont, Done); - SetBkMode(DC, Windows.TRANSPARENT); - end; - - if not Done then - begin - if not ATransparent then - FillRect(DC, ARect, AColor); - Format := cFormat or MakeTextFormat(ATextAlignX, ATextAlignY, True, False, True, True, True); - DrawTextEx(DC, ARect, 0, 0, 0, AText, AFont, Format); - end; - - if ReportLink.IsTitleCustomDrawn then UnprepareCanvasForCustomDraw; - finally - RestoreClipRgn(Rgn); - end; - AFont.Size := PrevFontSize; -end; - -function TdxPSReportRenderer.CalcTextHeight(DC: HDC; const AText: string; - AWordBreak: Boolean; AFont: TFont = nil; ABaseWidth: Integer = -1): Integer; -var - R: TRect; -begin - if ABaseWidth = -1 then ABaseWidth := 5; - R := MakeRect(0, 0, ABaseWidth, 5); - Result := CalcTextRect(DC, AText, R, AWordBreak, AFont); -end; - -function TdxPSReportRenderer.CalcTextLineCount(DC: HDC; const AText: string; - AFont: TFont = nil; ABaseWidth: Integer = -1): Integer; -var - R: TRect; -begin - if AText <> '' then - begin - if ABaseWidth = -1 then - ABaseWidth := 2 * dxTextSpace + 1; - R := MakeRect(0, 0, ABaseWidth, 5); - Result := cxTextOut(DC, AText, R, dxCalcFormat[True] or CXTO_CALCROWCOUNT, AFont, 0, 0, 0); - end - else - Result := 0 -end; - -function TdxPSReportRenderer.CalcTextPatternHeight(DC: HDC; AFont: TFont = nil): Integer; -begin - Result := CalcTextHeight(DC, 'Wg', False, AFont, -1); -end; - -function TdxPSReportRenderer.CalcTextRect(DC: HDC; const AText: string; - var ARect: TRect; AWordBreak: Boolean; AFont: TFont = nil): Integer; -const - CalcFormats: array[Boolean] of UINT = - (CXTO_CALCROWCOUNT or CXTO_AUTOINDENTS or CXTO_CHARBREAK or CXTO_SINGLELINE, - CXTO_CALCROWCOUNT or CXTO_AUTOINDENTS or CXTO_EXPANDTABS or CXTO_CHARBREAK or CXTO_WORDBREAK); -begin - Result := CalcTextRect(DC, AText, ARect, CalcFormats[AWordBreak], AFont); -end; - -function TdxPSReportRenderer.CalcTextRect(DC: HDC; const AText: string; - var ARect: TRect; AFormat: DWORD; AFont: TFont = nil): Integer; -var - ATextParams: TcxTextParams; - ATextRows: TcxTextRows; - AFontHandle: HFont; - ALineCount: Integer; -begin - if (AText <> '') and (AText[1] <> #0) then - begin - if AFont <> nil then - AFontHandle := SelectObject(DC, AFont.Handle) - else - AFontHandle := 0; - ARect.Bottom := MaxInt; - InflateRect(ARect, -dxTextSpace * LineThickness, 0); - ATextParams := cxCalcTextParams(DC, AFormat); - cxResetTextRows(ATextRows); - cxMakeTextRows(DC, PChar(AText), Length(AText), ARect, ATextParams, ATextRows, ALineCount); - ARect.Bottom := ARect.Top + ALineCount * ATextParams.FullRowHeight + - 3 * LineThickness * dxTextSpace; - cxResetTextRows(ATextRows); - if AFontHandle <> 0 then - SelectObject(DC, AFontHandle); - Result := ARect.Bottom - ARect.Top; - end - else - Result := 0; -end; - -(* -// todo: old version -function TdxPSReportRenderer.CalcTextRect(DC: HDC; const AText: string; - var ARect: TRect; AFormat: DWORD; AFont: TFont = nil): Integer; -begin - if AText <> '' then - begin - cxTextOut(DC, AText, ARect, AFormat or DXTO_CALCRECT, AFont, 0, 0, 0); - Result := ARect.Bottom - ARect.Top; - end - else - Result := 0; -end; -*) - -function TdxPSReportRenderer.CalcTextWidth(DC: HDC; const AText: string; - AFont: TFont = nil): Integer; -var - R: TRect; -begin - R := MakeRect(0, 0, 5 * LineThickness, 5 * LineThickness); - cxTextOut(DC, AText, R, dxCalcFormat[False], AFont, 0, 0, 0); - Result := R.Right - R.Left; -end; - -procedure TdxPSReportRenderer.DrawCheckBox(DC: HDC; var R: TRect; - AChecked, AEnabled, AIsRadio: Boolean; AEdgeStyle: TdxCheckButtonEdgeStyle; - ABorderColor: TColor = clWindowText); -const - Enabled: array[Boolean] of UINT = (DFCS_BUTTON3STATE or DFCS_INACTIVE, 0); - Checked: array[Boolean] of UINT = (0, DFCS_CHECKED); - //FlatBorder: array[Boolean] of UINT = (0, DFCS_FLAT); - Radio: array[Boolean] of UINT = (0, DFCS_BUTTONRADIO); - InteriorIndexes: array[Boolean] of UINT = (CheckInteriorIndex, RadioInteriorIndex); - MarkIndexes: array[Boolean] of UINT = (CheckMarkIndex, RadioBeanIndex); - TopLeftArcInnerIndexes: array[Boolean] of UINT = (CheckTopLeftArcInnerIndex, RadioTopLeftArcInnerIndex); - BottomRightArcInnerIndexes: array[Boolean] of UINT = (CheckBottomRightArcInnerIndex, RadioBottomRightArcInnerIndex); - TopLeftArcOuterIndexes: array[Boolean] of UINT = (CheckTopLeftArcOuterIndex, RadioTopLeftArcOuterIndex); - BottomRightArcOuterIndexes: array[Boolean] of UINT = (CheckBottomRightArcOuterIndex, RadioBottomRightArcOuterIndex); -var - F: HFONT; - C: TColor; -begin - if AEdgeStyle <> cbes3D then - begin -// todo: commented for AB9777 -// if AIsRadio then OffsetRect(R, 0, LineThickness); - - F := SelectObject(DC, MarlettFont10.Handle); - C := GetTextColor(DC); - - if AEnabled then - SetTextColor(DC, ColorToRGB(clWindow)) - else - SetTextColor(DC, ColorToRGB(clBtnFace)); - dxPSUtl.DrawGlyph(DC, R, InteriorIndexes[AIsRadio]); - //actually it's a mask, that means we should paint by halftone brush over here - - if AChecked then - begin - SetTextColor(DC, ColorToRGB(clWindowText)); - dxPSUtl.DrawGlyph(DC, R, MarkIndexes[AIsRadio]); - end; - - if AEdgeStyle <> cbesNone then - begin - case AEdgeStyle of - cbesSoft3D: - SetTextColor(DC, ColorToRGB(clBtnFace)); - cbesSingle, - cbesBoldFlat: - SetTextColor(DC, ColorToRGB(ABorderColor)); - cbesUltraFlat: - SetTextColor(DC, ColorToRGB(clWindowText)); - end; - - dxPSUtl.DrawGlyph(DC, R, TopLeftArcInnerIndexes[AIsRadio]); - dxPSUtl.DrawGlyph(DC, R, BottomRightArcInnerIndexes[AIsRadio]); - - if AEdgeStyle in [cbesSoft3D, cbesBoldFlat] then - begin - if AEdgeStyle = cbesSoft3D then - SetTextColor(DC, ColorToRGB(clBtnShadow)); - dxPSUtl.DrawGlyph(DC, R, TopLeftArcOuterIndexes[AIsRadio]); - if AEdgeStyle = cbesSoft3D then - SetTextColor(DC, ColorToRGB(clBtnHighlight)); - dxPSUtl.DrawGlyph(DC, R, BottomRightArcOuterIndexes[AIsRadio]); - end; - - SelectObject(DC, F); - SetTextColor(DC, C); - end; - end - else - DrawFrameControl(DC, R, DFC_BUTTON, DFCS_TRANSPARENT or Radio[AIsRadio] or Enabled[AEnabled] or Checked[AChecked]); -end; - -procedure TdxPSReportRenderer.DrawEdge(DC: HDC; var R: TRect; AEdgeMode: TdxCellEdgeMode; - AEdge3DEdge: TdxCellEdgeStyle; ASides: TdxCellSides; ASoft: Boolean; ABorderColor: TColor = -1); -var - Brush: HBRUSH; - CellBorders: TdxPSCell3DBorderClass; -begin - case AEdgeMode of - cemPattern: - begin - if ABorderColor = -1 then ABorderColor := RenderInfo.GridLinesColor; - Brush := GetBrushByColor(ABorderColor); - TdxPSCellBorderPainter.DrawFrame(DC, R, ASides, Brush, Brush, LineThickness); - end; - cem3DEffects: - begin - CellBorders := TdxPSCell3DBorderClass(TdxReportVisualItem.MapBorderClass(AEdgeMode, AEdge3DEdge, ASoft)); - TdxPSCell3DBorderPainter.Draw3DFrame(DC, R, ASides, CellBorders, LineThickness); - end; - end; -end; - -procedure TdxPSReportRenderer.DrawEllipse(DC: HDC; R: TRect; - AForeColor, ABackColor: TColor; APattern: TdxPSFillPatternClass; - ABorderColor: TColor; ABorderThickness: Integer = 1); -begin - FrameEllipse(DC, R, ABorderColor, ABorderThickness); - InflateRect(R, -ABorderThickness * LineThickness, -ABorderThickness * LineThickness); - FillEllipseEx(DC, R, AForeColor, ABackColor, APattern); -end; - -procedure TdxPSReportRenderer.DrawExpandButton(DC: HDC; var R: TRect; - AExpanded, ADrawBorder, AEdge3D, AEdge3DSoft, AShadow, AFillInterior: Boolean; - ABorderColor, AInteriorColor: TColor); - - procedure DrawGlyph(DC: HDC; const R: TRect; AGlyph: Byte); - var - Ch: Char; - Size: TSize; - X, Y: Integer; - begin - Ch := Chr(AGlyph); - GetTextExtentPoint32(DC, @Ch, 1, Size); - with R do - begin - X := Left + (Right - Left - Size.cX) div 2; - Y := Top + (Bottom - Top - Size.cY) div 2; - end; - ExtTextOut(DC, X, Y, 0, @R, @Ch, 1, nil); - end; - -const - InnerBottomRight3DColors: array[Boolean] of TColor = (clBtnShadow, clBtnFace); - OuterFlatColors: array[Boolean] of TColor = (clWindowText, clBtnShadow); - CrossHireIndexes: array[Boolean] of Byte = (dxPSUtl.PlusSignIndex, dxPSUtl.MinusSignIndex); -var - F: HFONT; - C: TColor; -begin - SetBkMode(DC, TRANSPARENT); - F := GetCurrentObject(DC, OBJ_FONT); - C := GetTextColor(DC); - - SelectObject(DC, MarlettFont8.Handle); - if ADrawBorder then - begin - if AEdge3D then - begin - SetTextColor(DC, ColorToRGB(ABorderColor)); - DrawGlyph(DC, R, dxPSUtl.CheckTopLeftArcOuterIndex); - DrawGlyph(DC, R, dxPSUtl.CheckBottomRightArcOuterIndex); - end; - - if AFillInterior then - begin - SetTextColor(DC, ColorToRGB(AInteriorColor)); - DrawGlyph(DC, R, dxPSUtl.CheckInteriorIndex); - end; - - if not AEdge3D then - begin - SetTextColor(DC, ColorToRGB(ABorderColor));//OuterFlatColors[AEdge3DSoft])); - DrawGlyph(DC, R, dxPSUtl.CheckTopLeftArcInnerIndex); - DrawGlyph(DC, R, dxPSUtl.CheckBottomRightArcInnerIndex); - if AShadow then - begin - OffsetRect(R, LineThickness, LineThickness); - SetTextColor(DC, ColorToRGB(clBtnShadow)); - DrawGlyph(DC, R, dxPSUtl.CheckBottomRightArcInnerIndex); - OffsetRect(R, -LineThickness, -LineThickness); - end; - end - else - begin - SetTextColor(DC, ColorToRGB(clBtnHighlight)); - DrawGlyph(DC, R, dxPSUtl.CheckTopLeftArcInnerIndex); - SetTextColor(DC, ColorToRGB(InnerBottomRight3DColors[AEdge3DSoft])); - DrawGlyph(DC, R, dxPSUtl.CheckBottomRightArcInnerIndex); - end; - end; - - // cross-hire - SelectObject(DC, SymbolFont.Handle); - SetTextColor(DC, ColorToRGB(clWindowText)); - OffsetRect(R, 0, -LineThickness); - DrawGlyph(DC, R, CrossHireIndexes[AExpanded]); - - SetTextColor(DC, C); - SelectObject(DC, F); -end; - -procedure TdxPSReportRenderer.DrawGlyph(DC: HDC; const R: TRect; AGlyph: Byte); -begin - dxPSUtl.DrawGlyph(DC, R, AGlyph); -end; - -procedure TdxPSReportRenderer.DrawGraphic(DC: HDC; var R: TRect; const AClipRect: TRect; - AImageList: TCustomImageList; AImageIndex: Integer; AGraphic: TGraphic; - AGraphicTransparent, ATransparent: Boolean; AColor: TColor); -begin - DrawGraphicEx(DC, R, AClipRect, AImageList, AImageIndex, AGraphic, - AGraphicTransparent, ATransparent, AColor, clWindow, TdxPSSolidFillPattern, cibAlways); -end; - -procedure TdxPSReportRenderer.DrawGraphicEx(DC: HDC; R: TRect; const AClipRect: TRect; - AImageList: TCustomImageList; AImageIndex: Integer; AGraphic: TGraphic; - AGraphicTransparent, ATransparent: Boolean; AColor, ABkColor: TColor; - APattern: TdxPSFillPatternClass; AnActualImageBuffering: TdxCellImageActualBuffering = cibAlways); - - procedure GetImage(ABitmap: TBitmap; AImageList: TCustomImageList; - AImageIndex: Integer; AType: TImageType); - - {$IFNDEF DELPHI6} - function GetColor(Value: TColor): DWORD; - begin - Result := ColorToRGB(Value); - case Result of - clNone: Result := CLR_NONE; - clDefault: Result := CLR_DEFAULT; - end; - end; - {$ENDIF} - - {$IFNDEF DELPHI6} - const - DrawingStyles: array[TDrawingStyle] of Longint = - (ILD_FOCUS, ILD_SELECTED, ILD_NORMAL, ILD_TRANSPARENT); - Images: array[TImageType] of Longint = (0, ILD_MASK); - {$ENDIF} - begin - ABitmap.Handle := 0; - ABitmap.Height := AImageList.Height; - ABitmap.Width := AImageList.Width; - ABitmap.Transparent := True; - {$IFNDEF DELPHI6} - with AImageList do - if HandleAllocated then - ImageList_DrawEx(Handle, AImageIndex, ABitmap.Canvas.Handle, 0, 0, 0, 0, - GetColor(BkColor), GetColor(BlendColor), - DrawingStyles[DrawingStyle] or Images[ImageType]); - {$ELSE} - AImageList.Draw(ABitmap.Canvas, 0, 0, AImageIndex, dsNormal, AType); - {$ENDIF} - end; - -var - Tmp: TBitmap; - G: TGraphic; - Rgn, Rgn2, RestRgn: HRGN; - SaveTransparent: Boolean; -begin - Rgn := 0; - if (R.Right - R.Left > AClipRect.Right - AClipRect.Left) or - (R.Bottom - R.Top > AClipRect.Bottom - AClipRect.Top) then - Rgn := IntersectClipRect(AClipRect); - - if not ATransparent then - if not AGraphicTransparent then - begin - RestRgn := CreateRectRgnIndirect(AClipRect); - Rgn2 := CreateRectRgnIndirect(R); - if CombineRgn(RestRgn, RestRgn, Rgn2, RGN_DIFF) > NULLREGION then - FillRgnEx(DC, RestRgn, AColor, ABkColor, APattern); - DeleteObject(Rgn2); - DeleteObject(RestRgn); - end - else - FillRectEx(DC, AClipRect, AColor, ABkColor, APattern); - - if AnActualImageBuffering = cibAlways then {v3.2} - //if ReportLink.AlwaysBufferedGraphics then - begin - if AImageList <> nil then - begin - GetImage(FDrawBitmap, AImageList, AImageIndex, itImage); - {!!!} FDrawBitmap.HandleType := bmDIB; - GetImage(FDrawMask, AImageList, AImageIndex, itMask); - {!!!} FDrawMask.HandleType := bmDIB; - FDrawBitmap.MaskHandle := FDrawMask.Handle; - end - else - begin - if not CachedGraphicInfo.Check(AGraphic, FDrawBitmap, G) then - with FDrawBitmap do - begin - Handle := 0; - Width := AGraphic.Width; - Height := AGraphic.Height; - HandleType := bmDIB; - //if AGraphic is TBitmap then - // MaskHandle := TBitmap(AGraphic).MaskHandle; - Canvas.Draw(0, 0, AGraphic); - end; - end; - G := FDrawBitmap; - end - else - G := AGraphic; - - if (G <> nil) and not G.Empty then - begin - SaveTransparent := G.Transparent; - G.Transparent := (not IsPrinting or not FDontPrintTransparentImages) and - AGraphicTransparent and not (G is TIcon); - - if not IsRectEmpty(R) then - begin - if IsPrinting and (AImageList <> nil) then - begin - Tmp := TBitmap.Create; - try - Tmp.HandleType := bmDIB; // !!! - Tmp.Width := FDrawBitmap.Width; - Tmp.Height := FDrawBitmap.Height; - StretchBlt(Tmp.Canvas.Handle, 0, 0, Tmp.Width, Tmp.Height, FCanvas.Handle, - R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, srcCopy); - AImageList.Draw(Tmp.Canvas, 0, 0, AImageIndex{$IFDEF DELPHI6}, dsTransparent, itImage{$ENDIF}); - FCanvas.StretchDraw(R, Tmp); - finally - Tmp.Free; - end; - end - else - begin - if G is TBitmap then // save mask handle - delphi bug SC - DB19634 - FDrawMask.Handle := TBitmap(G).MaskHandle; - FCanvas.StretchDraw(R, G{FDrawBitmap}); - end; - end; - if AGraphicTransparent and not (G is TIcon) then - G.Transparent := SaveTransparent; - end; - - if Rgn <> 0 then RestoreClipRgn(Rgn); - FDrawMask.Handle := 0; - FDrawBitmap.MaskHandle := 0; -end; - -procedure TdxPSReportRenderer.DrawRectangle(DC: HDC; R: TRect; - AForeColor, ABackColor: TColor; AContentPattern: TdxPSFillPatternClass; - ABorderColor: TColor; ABorderThickness: Integer = 1); -begin - FrameRect(DC, R, ABorderColor, csAll, ABorderThickness); - InflateRect(R, -ABorderThickness * LineThickness, -ABorderThickness * LineThickness); - FillRectEx(DC, R, AForeColor, ABackColor, AContentPattern); -end; - -procedure TdxPSReportRenderer.DrawRoundRect(DC: HDC; R: TRect; - AnEllipseWidth, AnEllipseHeight: Integer; AForeColor, ABackColor: TColor; - AContentPattern: TdxPSFillPatternClass; ABorderColor: TColor; - ABorderThickness: Integer = 1); -begin - FrameRoundRect(DC, R, AnEllipseWidth, AnEllipseHeight, ABorderColor, ABorderThickness); - - AnEllipseHeight := - MulDiv(AnEllipseHeight, R.Bottom - R.Top - 2 * ABorderThickness * LineThickness, R.Bottom - R.Top); - AnEllipseWidth := - MulDiv(AnEllipseWidth, R.Right - R.Left - 2 * ABorderThickness * LineThickness, R.Right - R.Left); - InflateRect(R, -ABorderThickness * LineThickness, -ABorderThickness * LineThickness); - - FillRoundRectEx(DC, R, AnEllipseWidth, AnEllipseHeight, AForeColor, ABackColor, AContentPattern); -end; - -procedure TdxPSReportRenderer.DrawSortMark(DC: HDC; var R: TRect; - ASortOrder: TdxCellSortOrder; AMono: Boolean); -const - GlyphIndexes: array[TdxCellSortOrder] of Byte = (0, SortUpMarkIndex, SortDownMarkIndex); -var - F: HFONT; - C: TColor; - Ch: Char; - Size: TSize; -begin - if ASortOrder <> csoNone then - begin - F := SelectObject(DC, MarlettFont10.Handle); - C := SetTextColor(DC, ColorTORGB(clWindowText)); - Ch := Chr(GlyphIndexes[ASortOrder]); - GetTextExtentPoint32(DC, @Ch, 1, Size); - with R do - R := Bounds(Left + (Right - Left - Size.cX) div 2, Top + (Bottom - Top - Size.cY) div 2, Size.cX, Size.cY); - dxPSUtl.DrawGlyph(DC, R, GlyphIndexes[ASortOrder]); - SelectObject(DC, F); - SetTextColor(DC, C); - end; -end; - -procedure TdxPSReportRenderer.DrawText(DC: HDC; var R: TRect; AMaxLineCount: Integer; - ALeftIndent, ARightIndent: Integer; const AText: string; AFont: TFont; - ABkColor: TColor; ATextAlignX: TcxTextAlignX; ATextAlignY: TcxTextAlignY; - AFillBackground, AMultiline, AEndEllipsis: Boolean; APreventLeftTextExceed: Boolean = True; - APreventTopTextExceed: Boolean = True; AHidePrefix: Boolean = True); -var - Format: DWORD; -begin - if AFillBackground then FillRect(DC, R, ABkColor); - Format := CXTO_AUTOINDENTS or CXTO_EXPANDTABS or CXTO_PATTERNEDTEXT or CXTO_CHARBREAK or - MakeTextFormat(ATextAlignX, ATextAlignY, AMultiline, AEndEllipsis, - APreventLeftTextExceed, APreventTopTextExceed, AHidePrefix); - - DrawTextEx(DC, R, AMaxLineCount, ALeftIndent, ARightIndent, AText, AFont, Format); -end; - -procedure TdxPSReportRenderer.DrawTextEx(DC: HDC; var R: TRect; AMaxLineCount: Integer; - ALeftIndent, ARightIndent: Integer; const AText: string; AFont: TFont; AFormat: DWORD); -begin - cxTextOut(DC, AText, R, AFormat, AFont, AMaxLineCount, - MulDiv(ALeftIndent, PPI, 96), MulDiv(ARightIndent, PPI, 96)); -end; - -function TdxPSReportRenderer.MakeTextFormat(ATextAlignX: TcxTextAlignX; - ATextAlignY: TcxTextAlignY; AMultiline, AEndEllipsis, APreventLeftTextExceed, - APreventTopTextExceed, AHidePrefix: Boolean): DWORD; -const - dxEndEllipsis: array[Boolean] of UINT = (0, CXTO_END_ELLIPSIS); - dxHidePrefix: array[Boolean] of UINT = (0, CXTO_HIDEPREFIX); - dxPreventLeftExceed: array[Boolean] of UINT = (0, CXTO_PREVENT_LEFT_EXCEED); - dxPreventTopExceed: array[Boolean] of UINT = (0, CXTO_PREVENT_TOP_EXCEED); - dxWordBreak: array[Boolean] of UINT = (CXTO_SINGLELINE, CXTO_WORDBREAK); -begin - Result := cxMakeFormat(ATextAlignX, ATextAlignY) or - dxEndEllipsis[AEndEllipsis] or - dxHidePrefix[AHidePrefix] or - dxPreventLeftExceed[APreventLeftTextExceed] or - dxPreventTopExceed[APreventTopTextExceed] or - dxWordBreak[AMultiline]; -end; - -procedure TdxPSReportRenderer.FillEllipse(DC: HDC; const R: TRect; AColor: TColor); -begin - FillEllipseEx(DC, R, AColor, clWhite, TdxPSSolidFillPattern); -end; - -procedure TdxPSReportRenderer.FillEllipseEx(DC: HDC; const R: TRect; - AForeColor, ABackColor: TColor; APattern: TdxPSFillPatternClass); -var - Pen: HPEN; - Rgn: HRGN; -begin - Pen := SelectObject(DC, GetStockObject(NULL_PEN)); - Rgn := CreateEllipticRgnIndirect(R); - FillRgnEx(DC, Rgn, AForeColor, ABackColor, APattern); - DeleteObject(Rgn); - SelectObject(DC, Pen); -end; - -procedure TdxPSReportRenderer.FillRect(DC: HDC; const R: TRect; AColor: TColor); -begin - FillRectEx(DC, R, AColor, clWhite, TdxPSSolidFillPattern); -end; - -procedure TdxPSReportRenderer.FillRectEx(DC: HDC; const R: TRect; AForeColor, ABackColor: TColor; - APattern: TdxPSFillPatternClass); -var - BrushOrg: TPoint; -begin - if APattern = nil then Exit; - - GetBrushOrgEx(DC, BrushOrg); - if APattern.RequiredBrushOrigin then - begin - BrushOrg := R.TopLeft; - Windows.LPToDP(DC, BrushOrg, 1); - SetBrushOrgEx(DC, BrushOrg.X mod APattern.Dimensions.cX, BrushOrg.Y mod APattern.Dimensions.cY, @BrushOrg); - end; - - if not APattern.Solid then - begin - ABackColor := SetBkColor(DC, ColorToRGB(ABackColor)); - AForeColor := SetTextColor(DC, ColorToRGB(AForeColor)); - end; - - Windows.FillRect(DC, R, GetPatternBrush(APattern, ColorToRGB(AForeColor))); - - if not APattern.Solid then - begin - SetBkColor(DC, ABackColor); - SetTextColor(DC, AForeColor); - end; - - if APattern.RequiredBrushOrigin then - SetBrushOrgEx(DC, BrushOrg.X, BrushOrg.Y, nil); -end; - -procedure TdxPSReportRenderer.FillRoundRect(DC: HDC; const R: TRect; - AnEllipseWidth, AnEllipseHeight: Integer; AColor: TColor); -begin - FillRoundRectEx(DC, R, AnEllipseWidth, AnEllipseHeight, AColor, clWhite, TdxPSSolidFillPattern); -end; - -procedure TdxPSReportRenderer.FillRoundRectEx(DC: HDC; const R: TRect; - AnEllipseWidth, AnEllipseHeight: Integer; AForeColor, ABackColor: TColor; - APattern: TdxPSFillPatternClass); -var - Pen: HPEN; - Rgn: HRGN; -begin - Pen := SelectObject(DC, GetStockObject(NULL_PEN)); - with R do - Rgn := CreateRoundRectRgn(Left, Top, Right, Bottom, AnEllipseWidth, AnEllipseHeight); - FillRgnEx(DC, Rgn, AForeColor, ABackColor, APattern); - DeleteObject(Rgn); - SelectObject(DC, Pen); -end; - -procedure TdxPSReportRenderer.FillRgn(DC: HDC; Rgn: HRGN; AColor: TColor); -begin - FillRgnEx(DC, Rgn, AColor, clWhite, TdxPSSolidFillPattern); -end; - -procedure TdxPSReportRenderer.FillRgnEx(DC: HDC; Rgn: HRGN; AForeColor, ABackColor: TColor; - APattern: TdxPSFillPatternClass); -var - BrushOrg: TPoint; - R: TRect; -begin - if APattern = nil then Exit; - - GetBrushOrgEx(DC, BrushOrg); - if APattern.RequiredBrushOrigin and (GetRgnBox(Rgn, R) <> NULLREGION) then - begin - BrushOrg := R.TopLeft; - Windows.LPToDP(DC, BrushOrg, 1); - SetBrushOrgEx(DC, BrushOrg.X mod APattern.Dimensions.cX, BrushOrg.Y mod APattern.Dimensions.cY, @BrushOrg); - end; - - if not APattern.Solid then - begin - AForeColor := SetTextColor(DC, ColorToRGB(AForeColor)); - ABackColor := SetBkColor(DC, ColorToRGB(ABackColor)); - end; - - Windows.FillRgn(DC, Rgn, GetPatternBrush(APattern, AForeColor)); - - if not APattern.Solid then - begin - SetBkColor(DC, ABackColor); - SetTextColor(DC, AForeColor); - end; - - if APattern.RequiredBrushOrigin then - SetBrushOrgEx(DC, BrushOrg.X, BrushOrg.Y, nil); -end; - -procedure TdxPSReportRenderer.FrameEllipse(DC: HDC; R: TRect; AColor: TColor; - AThickness: Integer = 1); -var - OuterRgn, InnerRgn: HRGN; -begin - OuterRgn := CreateEllipticRgnIndirect(R); - InflateRect(R, -AThickness * LineThickness, -AThickness * LineThickness); - InnerRgn := CreateEllipticRgnIndirect(R); - CombineRgn(OuterRgn, OuterRgn, InnerRgn, RGN_DIFF); - FillRgn(DC, OuterRgn, AColor); - DeleteObject(InnerRgn); - DeleteObject(OuterRgn); -end; - -procedure TdxPSReportRenderer.FrameRect(DC: HDC; R: TRect; AColor: TColor; - ASides: TdxCellSides = [csLeft..csBottom]; AThickness: Integer = 1); -var - Brush: HBRUSH; - I: Integer; -begin - Brush := SelectObject(DC, GetPatternBrush(TdxPSSolidFillPattern, AColor)); - AColor := SetTextColor(DC, ColorToRGB(AColor)); - for I := 0 to AThickness - 1 do - begin - with R do - begin - if csLeft in ASides then - PatBlt(DC, Left, Top, LineThickness, Bottom - Top, PATCOPY); - if csTop in ASides then - PatBlt(DC, Left, Top, Right - Left, LineThickness, PATCOPY); - if csRight in ASides then - PatBlt(DC, Right - LineThickness, Top, LineThickness, Bottom - Top, PATCOPY); - if csBottom in ASides then - PatBlt(DC, Left, Bottom - LineThickness, Right - Left, LineThickness, PATCOPY); - - end; - InflateRect(R, -LineThickness, -LineThickness); - end; - SetTextColor(DC, AColor); - SelectObject(DC, Brush); -end; - -procedure TdxPSReportRenderer.FrameRoundRect(DC: HDC; R: TRect; - AnEllipseWidth, AnEllipseHeight: Integer; AColor: TColor; - AThickness: Integer = 1); -var - OuterRgn, InnerRgn: HRGN; -begin - with R do - OuterRgn := CreateRoundRectRgn(Left, Top, Right, Bottom, AnEllipseWidth, AnEllipseHeight); - AnEllipseHeight := MulDiv(AnEllipseHeight, R.Bottom - R.Top - 2 * AThickness * LineThickness, R.Bottom - R.Top); - AnEllipseWidth := MulDiv(AnEllipseWidth, R.Right - R.Left - 2 * AThickness * LineThickness, R.Right - R.Left); - InflateRect(R, -AThickness * LineThickness, -AThickness * LineThickness); - with R do - InnerRgn := CreateRoundRectRgn(Left, Top, Right, Bottom, AnEllipseWidth, AnEllipseHeight); - CombineRgn(OuterRgn, OuterRgn, InnerRgn, RGN_DIFF); - FillRgn(DC, OuterRgn, AColor); - DeleteObject(InnerRgn); - DeleteObject(OuterRgn); -end; - -function TdxPSReportRenderer.GetBorderPainter(AClass: TdxPSCellBorderPainterClass): TdxPSCellBorderPainter; -begin - Result := FindBorderPainter(AClass); - if Result = nil then - Result := CreateBorderPainter(AClass); -end; - -function TdxPSReportRenderer.GetBrushByColor(AColor: TColor): HBRUSH; -begin - {if IsSysColor(AColor) then //TODO: GetSysColorBrush - Result := GetSysColorBrush(AColor) - else} - if (AColor = clNone) or (AColor = clDefault) then - Result := GetStockObject(NULL_BRUSH) - else - Result := BrushPool.Brushes[AColor]; -end; - -function TdxPSReportRenderer.GetPatternBrush(APattern: TdxPSFillPatternClass; AColor: TColor): HBRUSH; -begin - if APattern.Solid then - Result := BrushPool.Brushes[AColor] - else - Result := dxPSFillPatternFactory.Items[APattern, IsPrinting].Brush.Handle; -end; - -function TdxPSReportRenderer.GetReportGroupLookAndFeelPainter(AClass: TdxPSReportGroupLookAndFeelPainterClass): TdxPSReportGroupLookAndFeelPainter; -begin - Result := FindReportGroupLookAndFeelPainter(AClass); - if Result = nil then - Result := CreateReportGroupLookAndFeelPainter(AClass); -end; - -function TdxPSReportRenderer.ExcludeClipRect(const R: TRect): Integer; -begin - with R do - Result := Windows.ExcludeClipRect(DC, Left, Top, Right, Bottom); -end; - -function TdxPSReportRenderer.GetClipRgn: HRGN; -begin - Result := CreateRectRgn(0, 0, 0, 0); - if Windows.GetClipRgn(DC, Result) <> 1 then - begin - DeleteObject(Result); - Result := 0; - end; -end; - -function TdxPSReportRenderer.IntersectClipRect(const R: TRect): HRGN; -begin - Result := dxPSUtl.IntersectClipRect(DC, R); -end; - -procedure TdxPSReportRenderer.RestoreClipRgn(var Rgn: HRGN); -begin - dxPSUtl.RestoreClipRgn(DC, Rgn); -end; - -procedure TdxPSReportRenderer.RenderPage(ACanvas: TCanvas; const APageBounds: TRect; - APageIndex, AContinuousPageIndex, AZoomFactor: Integer); -var - VirtualPageIndex, RealPageIndex: Integer; - Composition: TdxCompositionReportLink; -begin - RenderInfo.CalculatePageRealAndVirtualIndexes(APageIndex, VirtualPageIndex, RealPageIndex); - - if not RenderInfo.CanRenderPage(VirtualPageIndex) then Exit; - - Composition := ReportLink.CurrentComposition; - if (Composition = nil) or not Composition.ContinuousPageIndexes then - AContinuousPageIndex := RealPageIndex - else - if Composition <> nil then - AContinuousPageIndex := Composition.VirtualPageIndexToRealPageIndex(AContinuousPageIndex); - - dxHFFormatObject.CurrentPage := PreparedPageIndex(AContinuousPageIndex) + 1; - - FCanvas := ACanvas; - FDC := FCanvas.Handle; - FPPI := GetDeviceCaps(DC, LOGPIXELSX); - FViewPortRect := APageBounds; - FZoomFactor := AZoomFactor; - FRenderingPageIndex := VirtualPageIndex; - PrepareRenderPage; - try - RenderPageBackground(RealPageIndex); - RenderPageHeader(RealPageIndex); - RenderPageFooter(RealPageIndex); - if RenderInfo.HasPageTitle(RealPageIndex) then RenderPageTitle; - if ReportLink.NeedTwoPassRendering then - begin - FRenderStage := [rsFirstPass]; - RenderPageContent; - FRenderStage := [rsSecondPass]; - RenderPageContent; - end - else - begin - FRenderStage := [rsFirstPass, rsSecondPass]; - RenderPageContent; - end; - finally - FRenderStage := []; - UnprepareRenderPage; - end; - RenderEntirePage(RealPageIndex); -end; - -procedure TdxPSReportRenderer.RenderDelimiters; -var - I, Delimiter: Integer; - R: TRect; -begin - for I := 0 to RenderInfo.DelimiterXCount - 1 do - begin - Delimiter := RenderInfo.DelimitersX[I]; - R := MakeBounds(Delimiter, 0, 2 * LineThickness, 20 * LineThickness); - //OffsetRect(R, 0, -PageRenderInfo.DataOffset.Y); - FillRect(DC, R, GetSysColorBrush(COLOR_HIGHLIGHT)); - end; -end; - -procedure TdxPSReportRenderer.RenderPageBackground(ARealPageIndex: Integer); -var - R: TRect; -begin - if IsPrinting then - with ReportLink.RealPrinterPage.Background do - begin - R := RenderInfo.PageHeaderBounds; - R.Bottom := RenderInfo.PageFooterBounds.Top; - if (Mode = bmNone) or ((Mode = bmPicture) and (PictureMode in [ppmCenter, ppmProportional])) then - Windows.FillRect(DC, R, GetStockObject(WHITE_BRUSH)); - PaintEx(Canvas, R, PixelsNumerator * 100, PixelsDenominator * RenderInfo.ScaleFactor); - end; -end; - -procedure TdxPSReportRenderer.RenderPageFooter(ARealPageIndex: Integer); -var - R: TRect; -begin - R := RenderInfo.PageFooterBounds; - if not IsRectEmpty(R) and (IsPrinting or RectVisible(DC, R)) then - RenderPageHeaderOrFooter(ReportLink.RealPrinterPage.PageFooter, ARealPageIndex, R); -end; - -procedure TdxPSReportRenderer.RenderPageHeader(ARealPageIndex: Integer); -var - R: TRect; -begin - R := RenderInfo.PageHeaderBounds; - if not IsRectEmpty(R) and (IsPrinting or RectVisible(DC, R)) then - RenderPageHeaderOrFooter(ReportLink.RealPrinterPage.PageHeader, ARealPageIndex, R); -end; - -procedure TdxPSReportRenderer.RenderPageHeaderOrFooter(HF: TCustomdxPageObject; - APageIndex: Integer; ARect: TRect); -const - TitleParts: array[Boolean] of TdxPageTitleParts = ([], [tpLeft..tpRight]); -var - PrevFontHeight: Integer; - Rgn: HRGN; - DefaultDrawText, DefaultDrawBackground: Boolean; - PrevFont: HFONT; - PrevFontColor: COLORREF; -begin - PrevFontHeight := HF.Font.Height; - HF.Font.Height := -MulDiv(HF.Font.Size, MulDiv(UnitsPerInch, 100, ReportLink.RealScaleFactor), PtPerInch); - - SetBkMode(DC, TRANSPARENT); - - Rgn := IntersectClipRect(ARect); - try - DefaultDrawText := True; - DefaultDrawBackground := True; - - PrevFont := SelectObject(DC, HF.Font.Handle); - PrevFontColor := SetTextColor(DC, ColorToRGB(HF.Font.Color)); - - if ReportLink.IsHeaderOrFooterCustomDrawn(HF) then - begin - //PrepareCanvasForCustomDraw(@HF.Font, nil); - ReportLink.DoCustomDrawPageHeaderOrFooter(HF, Canvas, APageIndex, ARect, DefaultDrawText, DefaultDrawBackground); - SetBkMode(DC, TRANSPARENT); - end; - - if DefaultDrawText or DefaultDrawBackground then - RenderPageHeaderOrFooterContent(HF, APageIndex, ARect, TitleParts[DefaultDrawText], DefaultDrawBackground); - - //if ReportLink.IsHeaderOrFooterCustomDrawn(HF) then UnprepareCanvasForCustomDraw; - - SetTextColor(DC, PrevFontColor); - SelectObject(DC, PrevFont); - finally - RestoreClipRgn(Rgn); - end; - HF.Font.Height := PrevFontHeight; -end; - -procedure TdxPSReportRenderer.RenderPageHeaderOrFooterContentPart(ATitlePart: TdxPageTitlePart; - AStrings: TStrings; ATextAlignY: TcxTextAlignY; ALineHeight, ADestWidth, ADestHeight: Integer; - const ARect: TRect); -const - uFormat = DT_SINGLELINE or DT_VCENTER or DT_NOCLIP or DT_EDITCONTROL; -var - FullHeight: Integer; - R: TRect; - I: Integer; - S: string; - TextSize: TSize; -begin - if ATextAlignY = taTop then - FullHeight := ARect.Top - else - begin - FullHeight := AStrings.Count * ALineHeight; - if ATextAlignY = taCenterY then - FullHeight := ARect.Top + (ADestHeight - FullHeight) div 2 - else {taBottom} - FullHeight := ARect.Top + ADestHeight - FullHeight; - end; - if FullHeight < ARect.Top then - FullHeight := ARect.Top; - R := MakeRect(ARect.Left, FullHeight, ARect.Right, FullHeight + ALineHeight); - - for I := 0 to AStrings.Count - 1 do - begin - S := AStrings[I]; - if S <> '' then - begin - GetTextExtentPoint32(DC, PChar(S), Length(S), TextSize); - if ADestWidth > TextSize.cX then - case ATitlePart of - tpLeft: - R.Right := R.Left + TextSize.cX; - tpCenter: - begin - R.Left := ARect.Left + (ADestWidth - TextSize.cX) div 2; - R.Right := R.Left + TextSize.cX; - end; - tpRight: - R.Left := R.Right - TextSize.cX; - end; - if RectVisible(DC, R) then - begin - Windows.DrawText(DC, PChar(S), Length(S), R, uFormat or DT_LEFT); - ExcludeClipRect(R); - end; - R.Right := ARect.Right; - end; - OffsetRect(R, 0, ALineHeight); - end; -end; - -procedure TdxPSReportRenderer.RenderPageHeaderOrFooterContent(HF: TCustomdxPageObject; - APageIndex: Integer; ARect: TRect; ATitleParts: TdxPageTitleParts; ADrawBackground: Boolean); -var - TextSize: TSize; - LineHeight, DestWidth, DestHeight: Integer; - TextAlignY: TcxTextAlignY; -begin - if ADrawBackground then - HF.Background.PaintEx(Canvas, ARect, PixelsNumerator * 100, PixelsDenominator * RenderInfo.ScaleFactor); - - if ATitleParts = [] then - Exit; - - GetTextExtentPoint32(DC, 'Hg', 2, TextSize); - LineHeight := TextSize.cY; - DestWidth := ARect.Right - ARect.Left; - DestHeight := ARect.Bottom - ARect.Top; - - if tpLeft in ATitleParts then - begin - if ReportLink.RealPrinterPage.ReverseTitlesOnEvenPages and Odd(APageIndex) then - begin - FHFStrings.Text := dxProcessHFString(HF.RightTitle.Text); - TextAlignY := HF.TextAlignY[tpRight]; - end - else - begin - FHFStrings.Text := dxProcessHFString(HF.LeftTitle.Text); - TextAlignY := HF.TextAlignY[tpLeft]; - end; - RenderPageHeaderOrFooterContentPart(tpLeft, FHFStrings, TextAlignY, - LineHeight, DestWidth, DestHeight, ARect); - end; - - if tpRight in ATitleParts then - begin - if ReportLink.RealPrinterPage.ReverseTitlesOnEvenPages and Odd(APageIndex) then - begin - FHFStrings.Text := dxProcessHFString(HF.LeftTitle.Text); - TextAlignY := HF.TextAlignY[tpLeft]; - end - else - begin - FHFStrings.Text := dxProcessHFString(HF.RightTitle.Text); - TextAlignY := HF.TextAlignY[tpRight]; - end; - RenderPageHeaderOrFooterContentPart(tpRight, FHFStrings, TextAlignY, - LineHeight, DestWidth, DestHeight, ARect); - end; - - if tpCenter in ATitleParts then - begin - FHFStrings.Text := dxProcessHFString(HF.CenterTitle.Text); - TextAlignY := HF.TextAlignY[tpCenter]; - RenderPageHeaderOrFooterContentPart(tpCenter, FHFStrings, TextAlignY, - LineHeight, DestWidth, DestHeight, ARect); - end; -end; - -procedure TdxPSReportRenderer.RenderPageTitle; -var - R: TRect; -begin - R := RenderInfo.TitleBounds; - OffsetWindowOrgEx(DC, -PageRenderInfo.TitleOffset.X, -PageRenderInfo.TitleOffset.Y, nil); - if RectVisible(DC, R) then - with ReportLink.ReportTitle do - RenderPageTitleContent(Text, R, TextAlignX, TextAlignY, Color, Font, Transparent); - OffsetWindowOrgEx(DC, PageRenderInfo.TitleOffset.X, PageRenderInfo.TitleOffset.Y, nil); -end; - -procedure TdxPSReportRenderer.RenderCell(ACell: TdxReportCell; const OriginRect: TRect); -var - R: TRect; -begin - if ACell.Visible then - begin - R := ACell.BoundsRect; - { Transform R into the coordinate space of page } - OffsetRect(R, -OriginRect.Left, -OriginRect.Top); - if (R.Left <> 0) or (R.Top <> 0) then - OffsetWindowOrgEx(DC, -R.Left, -R.Top, nil); - ACell.DrawContent(DC, MakeRect(0, 0, R.Right - R.Left, R.Bottom - R.Top), OriginRect, RenderStage); - if (R.Left <> 0) or (R.Top <> 0) then - OffsetWindowOrgEx(DC, R.Left, R.Top, nil); - end; -end; - -procedure TdxPSReportRenderer.RenderEntirePage(ARealPageIndex: Integer); -var - Rgn: HRGN; -begin - if ReportLink.IsEntirePageCustomDrawn then - begin - Rgn := IntersectClipRect(ViewPortRect); - try - ReportLink.DoCustomDrawEntirePage(Canvas, ViewPortRect, ARealPageIndex); - finally - RestoreClipRgn(Rgn); - end; - end; -end; - -procedure TdxPSReportRenderer.RenderPageContent; -var - R: TRect; - Rgn: HRGN; - PrevFont: HFONT; - PrevFontColor: COLORREF; - I, H, StartIndex, EndIndex: Integer; - PrevWindowOrg: TPoint; -begin - OffsetWindowOrgEx(DC, -PageRenderInfo.DataOffset.X - LineThickness, - -PageRenderInfo.DataOffset.Y - LineThickness, @PrevWindowOrg); - R := PageRenderInfo.ContentBounds; - OffsetRect(R, -R.Left, -R.Top); -// InflateRect(R, LineThickness, LineThickness); // for double - Dec(R.Left, LineThickness); - Dec(R.Top, LineThickness); - - Rgn := dxPSUtl.IntersectClipRect(DC, R, True); - SetBkMode(DC, Windows.TRANSPARENT); - with RenderInfo.BaseContentFont do - begin - PrevFont := SelectObject(DC, Handle); - PrevFontColor := SetTextColor(DC, ColorToRGB(Color)); - end; - - with PageRenderInfo do - begin - if HasHeader then - begin - R := HeaderBounds; - OffsetRect(R, DetailBounds.Left, 0); - with ReportCells do - RenderPageContentPart(HeaderCells, 0, HeaderCells.CellCount - 1, R); - ExcludeClipRect(HeaderBounds); - OffsetWindowOrgEx(DC, 0, -(HeaderBounds.Bottom - HeaderBounds.Top), nil); - end; - - if HasDetails then - begin - EndIndex := 0; - for I := 0 to IndexPairCount - 1 do - begin - StartIndex := IndexPairs[I].StartIndex; - EndIndex := IndexPairs[I].EndIndex; - RenderPageContentPart(ReportCells.Cells, StartIndex, EndIndex, DetailBounds); - end; - for I := 0 to OverlayCount - 1 do - RenderPageOverlay(I, Overlays[I], DetailBounds); - - H := 0; - if not IsBottomPage then - H := DetailBounds.Bottom - else - if ReportCells.Cells.CellCount > EndIndex then - H := ReportCells.Cells[EndIndex].BoundsRect.Bottom; - Dec(H, DetailBounds.Top); - OffsetWindowOrgEx(DC, 0, -H, nil); - end; - - if HasFooter then - begin - R := FooterBounds; - OffsetRect(R, DetailBounds.Left, 0); - with ReportCells do - RenderPageContentPart(FooterCells, 0, FooterCells.CellCount - 1, R); - end; - end; - RestoreClipRgn(Rgn); - SetBkMode(DC, Windows.OPAQUE); - SetTextColor(DC, PrevFontColor); - SelectObject(DC, PrevFont); - SetWindowOrgEx(DC, PrevWindowOrg.X, PrevWindowOrg.Y, nil); -end; - -procedure TdxPSReportRenderer.RenderPageContentPart(ACell: TdxReportCell; - StartIndex, EndIndex: Integer; const OriginRect: TRect); -var - I: Integer; -begin - for I := StartIndex to EndIndex do - RenderCell(ACell[I], OriginRect); -end; - -procedure TdxPSReportRenderer.RenderPageOverlay(AnOverlayIndex: Integer; - AnOverlay: TdxPageOverlayIndexes; const OriginRect: TRect); -var - OverlayCell: TdxReportCell; - I: Integer; -begin - OverlayCell := ReportCells.Overlays[AnOverlayIndex]; - for I := 0 to AnOverlay.Count - 1 do - RenderCell(OverlayCell.Cells[AnOverlay[I]], OriginRect); -end; - -function TdxPSReportRenderer.GetUnitsPerInch: Integer; -begin - Result := RenderInfo.UnitsPerInch; -end; - -function TdxPSReportRenderer.CreateBorderPainter(AClass: TdxPSCellBorderPainterClass): TdxPSCellBorderPainter; -begin - Result := AClass.Create(Self); - FBorderPainters.Add(Result); -end; - -function TdxPSReportRenderer.FindBorderPainter(AClass: TdxPSCellBorderPainterClass): TdxPSCellBorderPainter; -var - I: Integer; -begin - for I := 0 to BorderPainterCount - 1 do - begin - Result := BorderPainters[I]; - if Result.ClassType = AClass then Exit; - end; - Result := nil; -end; - -procedure TdxPSReportRenderer.FreeAndNilBorderPainters; -var - I: Integer; -begin - for I := 0 to BorderPainterCount - 1 do - BorderPainters[I].Free; - FreeAndNil(FBorderPainters); -end; - -function TdxPSReportRenderer.CreateReportGroupLookAndFeelPainter(AClass: TdxPSReportGroupLookAndFeelPainterClass): TdxPSReportGroupLookAndFeelPainter; -begin - Result := AClass.Create(Self); - FGroupLookAndFeelPainters.Add(Result); -end; - -function TdxPSReportRenderer.FindReportGroupLookAndFeelPainter(AClass: TdxPSReportGroupLookAndFeelPainterClass): TdxPSReportGroupLookAndFeelPainter; -var - I: Integer; -begin - for I := 0 to GroupLookAndFeelPainterCount - 1 do - begin - Result := GroupLookAndFeelPainters[I]; - if Result.ClassType = AClass then Exit; - end; - Result := nil; -end; - -procedure TdxPSReportRenderer.FreeAndNilReportGroupLookAndFeelPainters; -var - I: Integer; -begin - for I := 0 to GroupLookAndFeelPainterCount - 1 do - GroupLookAndFeelPainters[I].Free; - FreeAndNil(FGroupLookAndFeelPainters); -end; - -function TdxPSReportRenderer.GetBorderPainterItem(Index: Integer): TdxPSCellBorderPainter; -begin - Result := TdxPSCellBorderPainter(FBorderPainters[Index]); -end; - -function TdxPSReportRenderer.GetBorderPainterCount: Integer; -begin - Result := FBorderPainters.Count; -end; - -function TdxPSReportRenderer.GetGroupLookAndFeelPainter(Index: Integer): TdxPSReportGroupLookAndFeelPainter; -begin - Result := TdxPSReportGroupLookAndFeelPainter(FGroupLookAndFeelPainters[Index]); -end; - -function TdxPSReportRenderer.GetGroupLookAndFeelPainterCount: Integer; -begin - Result := FGroupLookAndFeelPainters.Count; -end; - -function TdxPSReportRenderer.GetHalfLineThickness: Integer; -begin - Result := LineThickness div 2; -end; - -function TdxPSReportRenderer.GetIsPrinting: Boolean; -begin - Result := IsPrinterDC(DC); -end; - -function TdxPSReportRenderer.GetPageRenderInfo: TdxPSPageRenderInfo; -begin - Result := RenderInfo.PageRenderInfos[RenderingPageIndex]; -end; - -function TdxPSReportRenderer.GetRenderInfo: TdxPSReportRenderInfo; -begin - Result := FReportLink.RenderInfo; -end; - -function TdxPSReportRenderer.GetReportCells: TdxReportCells; -begin - Result := ReportLink.FReportCells; -end; - -procedure TdxPSReportRenderer.PrepareCanvasForCustomDraw(AFont: TFont; AColor: TColor); -begin - FSavePixelsPerInch := Canvas.Font.PixelsPerInch; - FSaveFont.Assign(Canvas.Font); - if (AFont <> nil) then - begin - Canvas.Font.PixelsPerInch := AFont.PixelsPerInch; - Canvas.Font := AFont; - end; - FSaveColor := Canvas.Brush.Color; - Canvas.Brush.Color := AColor; -end; - -procedure TdxPSReportRenderer.UnprepareCanvasForCustomDraw; -begin - Canvas.Brush.Color := FSaveColor; - Canvas.Brush.Style := bsClear; - Canvas.Font.PixelsPerInch := FSavePixelsPerInch; - Canvas.Font := FSaveFont; - SetBkMode(DC, Windows.TRANSPARENT); -end; - -procedure TdxPSReportRenderer.PrepareFonts; -var - UPI: Integer; -begin - UPI := RenderInfo.UnitsPerInch; - if not ReportLink.ScaleFonts and (ReportLink.RealScaleFactor <> 100) then - UPI := MulDiv(UPI, 100, ReportLink.RealScaleFactor); - ReportLink.PrepareFonts(UPI); - MarlettFont10.Height := -MulDiv(10, UnitsPerInch, PtPerInch); - dxPSUtl.SetFontAsNonAntialiased(MarlettFont10); - MarlettFont8.Height := -MulDiv(8, UnitsPerInch, PtPerInch); - dxPSUtl.SetFontAsNonAntialiased(MarlettFont8); - SymbolFont.Height := -MulDiv(7, UnitsPerInch, PtPerInch); - dxPSUtl.SetFontAsNonAntialiased(SymbolFont); -end; - -procedure TdxPSReportRenderer.PrepareGDIObjects; -begin - FBorderColor := ColorToRGB(RenderInfo.GridLinesColor); -end; - -procedure TdxPSReportRenderer.PrepareLogicalCoordinates; -begin - if FUseIsotropicMode then - SetMapMode(DC, MM_ISOTROPIC); - PrepareWindow; - PrepareViewPort; -// MoveToEx(DC, 0, 0, nil); -end; - -procedure TdxPSReportRenderer.PrepareLogicalUnits; -var - R: TRect; - UnitsPerPt: Integer; -begin - R := MakeRect(0, 0, 1, 1); - DPToLP(DC, R, 2); - UnitsPerPixel := R.Right - R.Left; - //if Odd(FUnitsPerPixel) then Dec(FUnitsPerPixel); - if UnitsPerPixel = 0 then UnitsPerPixel := 1; - - UnitsPerPt := MulDiv(UnitsPerPixel, PPI, PtPerInch); - - if not IsPrinting then - begin - LineThickness := 1 * UnitsPerPixel; - if (ZoomFactor > 100) and ReportLink.IsScaleGridLines then - LineThickness := LineThickness * (ZoomFactor div 100); - end - else - LineThickness := MulDiv(UnitsPerPt, 1, 2); - - FPixelsNumerator := RenderInfo.UnitsPerInch; -end; - -function TdxPSReportRenderer.PreparedPageIndex(APageIndex: Integer): Integer; -var - RowIndex, ColIndex: Integer; -begin - if RenderInfo.PrinterPage.PageOrder = poDownThenOver then - begin - RowIndex := APageIndex div RenderInfo.PageColCount; - ColIndex := APageIndex mod RenderInfo.PageColCount; - Result := RowIndex + ColIndex * RenderInfo.PageRowCount; - end - else - Result := APageIndex; -end; - -procedure TdxPSReportRenderer.PrepareRenderPage; -begin - RenderInfo.Lock; - SaveMapMode; - PrepareLogicalCoordinates; - PrepareLogicalUnits; - PrepareFonts; - PrepareGDIObjects; - FIsRendering := True; -end; - -procedure TdxPSReportRenderer.PrepareWindow; -begin - with RenderInfo do - begin - SetWindowExtEx(DC, PageSize.X, PageSize.Y, nil); - ScaleWindowExtEx(DC, WindowScalePair.Numerator, WindowScalePair.Denominator, - WindowScalePair.Numerator, WindowScalePair.Denominator, nil); - end; -end; - -procedure TdxPSReportRenderer.PrepareViewPort; -begin - with ViewPortRect do - begin - SetViewPortExtEx(DC, Right - Left, Bottom - Top, nil); - SetViewPortOrgEx(DC, Left, Top, nil); - end; -end; - -procedure TdxPSReportRenderer.RestoreMapMode; -begin - SetMapMode(DC, FPrevMode); - SetWindowExtEx(DC, FPrevWindowExt.cX, FPrevWindowExt.cY, nil); - SetViewPortOrgEx(DC, FPrevViewPortOrg.X, FPrevViewPortOrg.Y, nil); - SetViewPortExtEx(DC, FPrevViewPortExt.cX, FPrevViewPortExt.cY, nil); - SetWindowOrgEx(DC, FPrevWindowOrg.X, FPrevWindowOrg.Y, nil); -end; - -procedure TdxPSReportRenderer.SaveMapMode; -begin - FPrevMode := GetMapMode(DC); - GetWindowExtEx(DC, FPrevWindowExt); - GetWindowOrgEx(DC, FPrevWindowOrg); - GetViewPortExtEx(DC, FPrevViewPortExt); - GetViewPortOrgEx(DC, FPrevViewPortOrg); -end; - -procedure TdxPSReportRenderer.UnprepareLogicalUnits; -begin - LineThickness := 1; -end; - -procedure TdxPSReportRenderer.UnprepareGDIObjects; -begin -end; - -procedure TdxPSReportRenderer.UnprepareRenderPage; -begin - FIsRendering := False; - UnprepareLogicalUnits; - UnprepareGDIObjects; - RestoreMapMode; - RenderInfo.Unlock; -end; - -{ TdxReportItem } - -constructor TdxReportItem.Create(AParent: TdxReportCell); -begin - inherited Create; - Parent := AParent; -end; - -destructor TdxReportItem.Destroy; -begin - SetParent(nil); - inherited Destroy; -end; - -procedure TdxReportItem.Assign(Source: TPersistent); -begin - if Source is TdxReportItem then - Data := TdxReportItem(Source).Data - else - inherited; -end; - -class function TdxReportItem.ReportItemClass: TdxReportItemClass; -begin - Result := TdxReportItemClass(GetTypeData(ClassInfo)^.ClassType); -end; - -class procedure TdxReportItem.Register; -begin - if GetClass(ClassName) = nil then RegisterClass(Self); -end; - -class procedure TdxReportItem.Unregister; -begin - UnregisterClass(Self); -end; - -function TdxReportItem.Clone(AParent: TdxReportCell): TdxReportItem; -begin - Result := ReportItemClass.Create(AParent); - try - Result.Assign(Self); - except - Result.Free; - raise; - end; -end; - -function TdxReportItem.GetNextSibling: TdxReportItem; -var - Index: Integer; -begin - Result := nil; - if not HasParent then Exit; - Index := Parent.IndexOf(Self); - - if IsCell then - begin - if Index < Parent.CellCount - 1 then - Result := TdxReportItem(Parent.FCellList[Index + 1]); - end - else - if Index < Parent.DataItemCount - 1 then - Result := TdxReportItem(Parent.FDataList[Index + 1]); -end; - -function TdxReportItem.GetPrevSibling: TdxReportItem; -var - Index: Integer; -begin - Result := nil; - if not HasParent then Exit; - Index := Parent.IndexOf(Self); - if Index < 1 then Exit; - - if IsCell then - Result := TdxReportItem(Parent.FCellList[Index - 1]) - else - Result := TdxReportItem(Parent.FDataList[Index - 1]); -end; - -function TdxReportItem.HasParent: Boolean; -begin - Result := Parent <> nil; -end; - -function TdxReportItem.IsFirstItem: Boolean; -begin - Result := GetPrevSibling = nil; -end; - -function TdxReportItem.IsLastItem: Boolean; -begin - Result := GetNextSibling = nil; -end; - -function TdxReportItem.AsCell: TdxReportCell; -begin - if IsCell then - Result := TdxReportCell(Self) - else - Result := nil; -end; - -function TdxReportItem.GetTopLevelParent: TdxReportCell; -begin - if ReportCells <> nil then - Result := ReportCells.GetCellTopLevelParent(Self) - else - Result := nil; -end; - -class function TdxReportItem.IsCell: Boolean; -begin - Result := False; -end; - -procedure TdxReportItem.ReadData(AReader: TdxPSDataReader); -begin - Data := AReader.ReadInteger; -end; - -procedure TdxReportItem.WriteData(AWriter: TdxPSDataWriter); -begin - AWriter.WriteInteger(Data); -end; - -class function TdxReportItem.Serializable: Boolean; -begin - Result := True; -end; - -function TdxReportItem.GetIndex: Integer; -begin - if Parent <> nil then - Result := Parent.IndexOf(Self) - else - Result := -1; -end; - -function TdxReportItem.GetReportCells: TdxReportCells; -begin - if Parent <> nil then - Result := Parent.ReportCells - else - Result := nil; -end; - -procedure TdxReportItem.SetIndex(Value: Integer); -var - CurIndex: Integer; -begin - if Parent = nil then Exit; - if Value < 0 then Value := 0; - - if IsCell then - begin - if Value > Parent.CellCount - 1 then - Value := Parent.CellCount - 1 - end - else - if Value > Parent.DataItemCount - 1 then - Value := Parent.DataItemCount - 1; - CurIndex := GetIndex; - if CurIndex <> Value then - Parent.MoveItem(Self, CurIndex, Value); -end; - -procedure TdxReportItem.SetParent(Value: TdxReportCell); -begin - if Parent <> Value then - begin - if Parent <> nil then Parent.RemoveItem(Self); - if Value <> nil then Value.InsertItem(Self); - end; -end; - -{ TdxReportVisualItem } - -constructor TdxReportVisualItem.Create(AParent: TdxReportCell); -begin - inherited; - FBackgroundBitmapIndex := -1; - if HasBorderColoration then - FBorderClass := TdxPSColorBorder - else - FBorderClass := TdxPSCellUltraFlatBorder; - FBorderColor := clDefault; - CellSides := dxDefaultCellSides; // csAll - FColor := dxDefaultContentColor; // clWhite - ShowShadow := False; - Transparent := dxDefaultTransparent; // True - Visible := True; -end; - -procedure TdxReportVisualItem.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxReportVisualItem then - with TdxReportVisualItem(Source) do - begin - Self.BackgroundBitmapIndex := BackgroundBitmapIndex; - Self.BorderClass := BorderClass; - Self.BorderColor := BorderColor; - Self.BoundsRect := BoundsRect; - Self.Color := Color; - Self.ContentBkColor := ContentBkColor; - Self.ContentPattern := ContentPattern; - Self.FontIndex := FontIndex; - Self.Format := Format; - Self.ShadowColor := ShadowColor; - Self.ShadowDepth := ShadowDepth; - Self.FCellSideColors := FCellSideColors; - end; -end; - -procedure TdxReportVisualItem.AdjustContent(DC: HDC); -begin -end; - -procedure TdxReportVisualItem.DrawBackground(DC: HDC); -begin - DrawBackgroundRect(DC, GetBackgroundBounds(DC)); -end; - -procedure TdxReportVisualItem.DrawBackgroundBitmap(DC: HDC); -var - Rgn: HRGN; - I, J: Integer; - R: TRect; -begin - Rgn := Renderer.IntersectClipRect(GetBackgroundBounds(DC)); - try - for I := BackgroundBitmapTileStartIndexX to BackgroundBitmapTileStopIndexX do - for J := BackgroundBitmapTileStartIndexY to BackgroundBitmapTileStopIndexY do - begin - R := BackgroundBitmapTileBounds[I, J]; - if RectVisible(DC, R) then DrawBackgroundBitmapTile(DC, R); - end; - finally - Renderer.RestoreClipRgn(Rgn); - end; -end; - -procedure TdxReportVisualItem.DrawBackgroundBitmapTile(DC: HDC; const Rect: TRect); -begin - Renderer.DrawGraphicEx(DC, Rect, GetBackgroundBounds(DC), nil, -1, BackgroundBitmap, - False, False, clNone, clNone, nil, cibAlways); -end; - -procedure TdxReportVisualItem.DrawBackgroundRect(DC: HDC; const R: TRect); -begin - if not IsRectEmpty(R) then - Renderer.FillRectEx(DC, R, Color, ContentBkColor, ContentPattern); -end; - -procedure TdxReportVisualItem.DrawBorders(DC: HDC); -begin - BorderPainter.Paint(DC); -end; - -function TdxReportVisualItem.GetBorderOuterBounds(DC: HDC): TRect; -begin - Result := GetBorderOuterBoundsRelativeTo(DC, GetOuterBounds(DC)); -end; - -function TdxReportVisualItem.GetInnerBounds(DC: HDC): TRect; -begin - Result := GetInnerBoundsRelativeTo(DC, BoundsRect); -end; - -function TdxReportVisualItem.GetOuterBounds(DC: HDC): TRect; -begin - Result := GetOuterBoundsRelativeTo(DC, BoundsRect); -end; - -procedure TdxReportVisualItem.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); -begin - if (ALeft <> Left) or (ATop <> Top) or (AWidth <> Width) or (AHeight <> Height) then - begin - FBoundsRect.Left := ALeft; - FBoundsRect.Top := ATop; - FBoundsRect.Right := ALeft + AWidth; - FBoundsRect.Bottom := ATop + AHeight; - BoundsChanged; - end; -end; - -function TdxReportVisualItem.CalculateLineCount(DC: HDC): Integer; -begin - Result := 1; -end; - -function TdxReportVisualItem.MeasureBordersHeight(DC: HDC): Integer; -begin - Result := 0; - if csTop in CellSides then - Inc(Result, GetBorderEdgeThickness(csTop) - 1); - if csBottom in CellSides then - Inc(Result, GetBorderEdgeThickness(csBottom) - 1); - if ShowShadow then - Inc(Result, ShadowDepth); -end; - -function TdxReportVisualItem.MeasureBordersWidth(DC: HDC): Integer; -begin - Result := 0; - if csLeft in CellSides then - Inc(Result, GetBorderEdgeThickness(csLeft) - 1); - if csRight in CellSides then - Inc(Result, GetBorderEdgeThickness(csRight) - 1); - if ShowShadow then - Inc(Result, ShadowDepth); -end; - -function TdxReportVisualItem.MeasureContentHeight(DC: HDC): Integer; -begin - Result := 0; -end; - -function TdxReportVisualItem.MeasureContentWidth(DC: HDC): Integer; -begin - Result := 0; -end; - -function TdxReportVisualItem.MeasureFontHeight(DC: HDC): Integer; -begin - Result := Height; -end; - -function TdxReportVisualItem.MeasureHeight(DC: HDC): Integer; -begin - Result := MeasureBordersHeight(DC) + MeasureContentHeight(DC); -end; - -function TdxReportVisualItem.MeasureWidth(DC: HDC): Integer; -begin - Result := MeasureBordersWidth(DC) + MeasureContentWidth(DC); -end; - -class function TdxReportVisualItem.MapBorderClass(AEdgeMode: TdxCellEdgeMode; - AEdgeStyle: TdxCellEdgeStyle; ASoft: Boolean): TdxPSCellBorderClass; -begin - if AEdgeMode = cem3DEffects then - Result := dxCellBorderClassMap[AEdgeStyle, ASoft] - else - Result := TdxPSCellUltraFlatBorder; -end; - -procedure TdxReportVisualItem.BoundsChanged; -begin -end; - -procedure TdxReportVisualItem.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -begin - with FBoundsRect do - begin - Left := MulDiv(Left, APixelsNumerator, APixelsDenominator); - Right := MulDiv(Right, APixelsNumerator, APixelsDenominator); - Top := MulDiv(Top, APixelsNumerator, APixelsDenominator); - Bottom := MulDiv(Bottom, APixelsNumerator, APixelsDenominator); - end; -end; - -procedure TdxReportVisualItem.DoExcludeFromClipRgn(DC: HDC; const R: TRect; - var AResult: Integer); -var - R2: TRect; -begin - if ExcludeFromClipRgn and not Transparent and Visible and IntersectRect(R2, GetAbsoluteRect, R) then - begin - R2 := GetOuterBounds(DC); - if not IsRectEmpty(R2) then - AResult := Renderer.ExcludeClipRect(R2); - end; -end; - -function TdxReportVisualItem.GetBackgroundBitmapTileBounds(Col, Row: Integer): TRect; -begin - Result := MakeBounds(Left + BackgroundBitmapWidth * Col, Top + BackgroundBitmapHeight * Row, - BackgroundBitmapWidth, BackgroundBitmapHeight); - with BackgroundBitmapTileOrigin do - OffsetRect(Result, X, Y); -end; - -function TdxReportVisualItem.GetBackgroundBounds(DC: HDC): TRect; -begin - Result := GetInnerBounds(DC); -end; - -function TdxReportVisualItem.GetBorderClass: TdxPSCellBorderClass; -begin - Result := FBorderClass; -end; - -function TdxReportVisualItem.GetBorderEdgeClass(ASide: TdxCellSide): TdxPSCellBorderClass; -begin - Result := BorderClass; -end; - -function TdxReportVisualItem.GetBorderEdgeBounds(ASide: TdxCellSide; const AOuterRect: TRect): TRect; -begin - Result := AOuterRect; - with Result do - case ASide of - csLeft: - Right := Left + LineThickness * BorderEdgeThicknesses[csLeft]; - csTop: - Bottom := Top + LineThickness * BorderEdgeThicknesses[csTop]; - csRight: - Left := Right - LineThickness * BorderEdgeThicknesses[csRight]; - csBottom: - Top := Bottom - LineThickness * BorderEdgeThicknesses[csBottom]; - end; -end; - -function TdxReportVisualItem.GetBorderEdgeSalient(ASide: TdxCellSide; ASalient: TdxPSCellBorderSalientType): Integer; -begin - Result := BorderEdgeClasses[ASide].GetBorderEdgeSalient(ASide, ASalient); -end; - -function TdxReportVisualItem.GetBorderEdgeThickness(ASide: TdxCellSide): Integer; -begin - Result := BorderEdgeClasses[ASide].Thickness; -end; - -function TdxReportVisualItem.GetBorderBounds(DC: HDC): TRect; -begin - Result := FBoundsRect; -end; - -function TdxReportVisualItem.GetBorderOuterBoundsRelativeTo(DC: HDC; const R: TRect): TRect; -begin - Result := R; - if ShowShadow then - begin - Dec(Result.Right, ShadowDepth); - Dec(Result.Bottom, ShadowDepth); - end; - //FixupRect(DC, Result); -end; - -function TdxReportVisualItem.GetInnerBoundsRelativeTo(DC: HDC; const R: TRect): TRect; -var - LineThickness: Integer; -begin - Result := GetOuterBoundsRelativeTo(DC, R); - LineThickness := Self.LineThickness; - - with Result do - begin - if csLeft in CellSides then - Inc(Left, LineThickness * BorderEdgeThicknesses[csLeft]); - if csTop in CellSides then - Inc(Top, LineThickness * BorderEdgeThicknesses[csTop]); - if csRight in CellSides then - Dec(Right, LineThickness * BorderEdgeThicknesses[csRight]); - if csBottom in CellSides then - Dec(Bottom, LineThickness * BorderEdgeThicknesses[csBottom]); - - if ShowShadow then - begin - Dec(Right, ShadowDepth); - Dec(Bottom, ShadowDepth); - end; - end; - FixupRect(DC, Result); -end; - -function TdxReportVisualItem.GetOuterBoundsRelativeTo(DC: HDC; const R: TRect): TRect; -var - LineThickness: Integer; -begin - Result := R; - LineThickness := Self.LineThickness; - - with Result do - begin - if csLeft in CellSides then - Dec(Left, LineThickness * BorderEdgeSalients[csLeft, bstOuter]); - if csTop in CellSides then - Dec(Top, LineThickness * BorderEdgeSalients[csTop, bstOuter]); - if csRight in CellSides then - Inc(Right, LineThickness * BorderEdgeSalients[csRight, bstOuter]); - if csBottom in CellSides then - Inc(Bottom, LineThickness * BorderEdgeSalients[csBottom, bstOuter]); - end; - FixupRect(DC, Result); -end; - -function TdxReportVisualItem.GetBorderPainter: TdxPSCellBorderPainter; -begin - Result := Renderer.GetBorderPainter(BorderPainterClass); - InitBorderPainter(Result); -end; - -function TdxReportVisualItem.GetBorderPainterClass: TdxPSCellBorderPainterClass; -begin - Result := BorderClass.GetPainterClass; -end; - -procedure TdxReportVisualItem.InitBorderPainter(ABorderPainter: TdxPSCellBorderPainter); -begin - ABorderPainter.FItem := Self; -end; - -function TdxReportVisualItem.HasBorderColoration: Boolean; -begin - Result := False; // todo MSN; -end; - -function TdxReportVisualItem.GetFormatBit(ABit: DWORD): Boolean; -begin - Result := Format and ABit = ABit; -end; - -procedure TdxReportVisualItem.SetFormatBit(ABit: DWORD; Value: Boolean); -begin - Format := Format and not ABit; - if Value then - Format := Format or ABit; -end; - -function TdxReportVisualItem.GetContentBkColor: TColor; -begin - Result := Color; -end; - -function TdxReportVisualItem.GetContentPattern: TdxPSFillPatternClass; -begin - Result := TdxPSSolidFillPattern; -end; - -function TdxReportVisualItem.GetShadowColor: TColor; -begin - if ReportCells <> nil then - Result := ReportCells.ShadowColor - else - Result := dxDefaultShadowColor; -end; - -function TdxReportVisualItem.GetShadowDepth: Integer; -begin - if ReportCells <> nil then - Result := ReportCells.ShadowDepth - else - Result := dxDefaultShadowDepth; -end; - -procedure TdxReportVisualItem.SetContentBkColor(Value: TColor); -begin -end; - -procedure TdxReportVisualItem.SetContentPattern(Value: TdxPSFillPatternClass); -begin -end; - -procedure TdxReportVisualItem.SetFontIndex(Value: Integer); -begin - if Value < -1 then Value := -1; - FFontIndex := Value; -end; - -procedure TdxReportVisualItem.SetShadowColor(Value: TColor); -begin -end; - -procedure TdxReportVisualItem.SetShadowDepth(Value: Integer); -begin -end; - -function TdxReportVisualItem.IsBackgroundBitmapDrawn: Boolean; -begin - Result := (BackgroundBitmapIndex <> -1) and not BackgroundBitmap.Empty; -end; - -function TdxReportVisualItem.IsBackgroundDrawn: Boolean; -begin - Result := not Transparent; -end; - -function TdxReportVisualItem.IsBordersDrawn: Boolean; -begin - Result := (CellSides <> []) or ShowShadow; -end; - -procedure TdxReportVisualItem.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - with AReader do - begin - BackgroundBitmapIndex := ReadInteger; - BoundsRect := ReadRect; - BorderClass := ReadCellBorderClass; - if HasBorderColoration then - TRect(FCellSideColors) := ReadRect; - BorderColor := ReadInteger; - Color := ReadInteger; - ContentBkColor := ReadInteger; - ContentPattern := ReadFillPatternClass; - FontIndex := ReadInteger; - Read(FFormat, SizeOf(Format)); - end; -end; - -procedure TdxReportVisualItem.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - with AWriter do - begin - WriteInteger(BackgroundBitmapIndex); - WriteRect(BoundsRect); - WriteClassName(BorderClass); - if HasBorderColoration then - WriteRect(TRect(FCellSideColors)); - WriteInteger(BorderColor); - WriteInteger(Color); - WriteInteger(ContentBkColor); - WriteClassName(ContentPattern); - WriteInteger(FontIndex); - Write(Format, SizeOf(Format)); - end; -end; - -function TdxReportVisualItem.GetAbsoluteOrigin: TPoint; -var - Item: TdxReportVisualItem; - Origin: TPoint; -begin - Result := NullPoint; - Item := Self; - while Item <> nil do - begin - Origin := Item.GetOrigin; - Inc(Result.X, Origin.X); - Inc(Result.Y, Origin.Y); - Item := Item.Parent; - end; -end; - -function TdxReportVisualItem.GetAbsoluteRect: TRect; -begin - with Result do - begin - TopLeft := AbsoluteOrigin; - Right := Left + Width; - Bottom := Top + Height; - end; -end; - -function TdxReportVisualItem.GetBackgroundBitmap: TBitmap; -begin - Result := BackgroundBitmapPool[BackgroundBitmapIndex]; -end; - -function TdxReportVisualItem.GetBackgroundBitmapHeight: Integer; -begin - Result := BackgroundBitmap.Height * Renderer.UnitsPerPixel; -end; - -function TdxReportVisualItem.GetBackgroundBitmapPool: TdxPSBackgroundBitmapPool; -begin - if (ReportCells <> nil) and (ReportCells.ReportLink <> nil) then - Result := ReportCells.ReportLink.BackgroundBitmapPool - else - Result := nil; -end; - -function TdxReportVisualItem.GetBackgroundBitmapTileOrigin: TPoint; -begin - Result := AbsoluteOrigin; - Result.X := -Result.X; - Result.Y := -Result.Y; -end; - -function TdxReportVisualItem.GetBackgroundBitmapTileStartIndexX: Integer; -begin - Result := Abs(BackgroundBitmapTileOrigin.X) div BackgroundBitmapWidth; -end; - -function TdxReportVisualItem.GetBackgroundBitmapTileStartIndexY: Integer; -begin - Result := Abs(BackgroundBitmapTileOrigin.Y) div BackgroundBitmapHeight; -end; - -function TdxReportVisualItem.GetBackgroundBitmapTileStopIndexX: Integer; -begin - Result := (Width + Abs(BackgroundBitmapTileOrigin.X)) div BackgroundBitmapWidth; -end; - -function TdxReportVisualItem.GetBackgroundBitmapTileStopIndexY: Integer; -begin - Result := (Height + Abs(BackgroundBitmapTileOrigin.Y)) div BackgroundBitmapHeight; -end; - -function TdxReportVisualItem.GetBackgroundBitmapWidth: Integer; -begin - Result := BackgroundBitmap.Width * Renderer.UnitsPerPixel; -end; - -function TdxReportVisualItem.GetBorderBrush: HBRUSH; -begin - Result := Renderer.GetBrushByColor(BorderColor); -end; - -function TdxReportVisualItem.GetBorderColor: TColor; -begin - Result := FBorderColor; - if Result = clDefault then Result := ReportCells.BorderColor; -end; - -function TdxReportVisualItem.GetCellSides: TdxCellSides; -begin - Result := TdxCellSides(Byte(Format and dxPSGlbl.dxFormatRect)); -end; - -function TdxReportVisualItem.GetCellSideColors(ASide: TdxCellSide): TColor; -begin - Result := FCellSideColors[ASide]; -end; - -function TdxReportVisualItem.GetContentBrush: HBRUSH; -begin - Result := dxPSFillPatternFactory.Items[ContentPattern, IsPrinting].Brush.Handle; -end; - -function TdxReportVisualItem.GetEdge3DSoft: Boolean; -begin - Result := BorderClass.Edge3DSoft; -end; - -function TdxReportVisualItem.GetEdge3DStyle: TdxCellEdgeStyle; -begin - Result := BorderClass.Edge3DStyle; -end; - -function TdxReportVisualItem.GetEdgeMode: TdxCellEdgeMode; -begin - Result := BorderClass.EdgeMode; -end; - -function TdxReportVisualItem.GetExcludeFromClipRgn: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatExcludeFromClipRgn); -end; - -function TdxReportVisualItem.GetFont: TFont; -begin - if (FontIndex <> -1) and (ReportCells <> nil) then - Result := ReportCells.GetFontByIndex(FontIndex) - else - Result := nil; -end; - -function TdxReportVisualItem.GetHeight: Integer; -begin - with BoundsRect do - Result := Bottom - Top; -end; - -function TdxReportVisualItem.GetIsPrinting: Boolean; -begin - Result := Renderer.IsPrinting; -end; - -function TdxReportVisualItem.GetLeft: Integer; -begin - Result := BoundsRect.Left; -end; - -function TdxReportVisualItem.GetLineThickness: Integer; -begin - Result := Renderer.LineThickness; -end; - -function TdxReportVisualItem.GetOrigin: TPoint; -begin - Result := BoundsRect.TopLeft; -end; - -function TdxReportVisualItem.GetParentBrush: HBRUSH; -begin - Result := Renderer.GetBrushByColor(ParentColor); -end; - -function TdxReportVisualItem.GetParentColor: TColor; -var - ItemParent: TdxReportCell; -begin - ItemParent := Parent; - while (ItemParent <> nil) and ItemParent.Transparent do - ItemParent := ItemParent.Parent; - - if ItemParent <> nil then - Result := ItemParent.Color - else - Result := clNone; -end; - -function TdxReportVisualItem.GetRenderer: TdxPSReportRenderer; -begin - Result := ReportCells.Renderer; -end; - -function TdxReportVisualItem.GetShadowBrush: HBRUSH; -begin - Result := Renderer.GetBrushByColor(ShadowColor); -end; - -function TdxReportVisualItem.GetShowShadow: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatShowShadow); -end; - -function TdxReportVisualItem.GetTop: Integer; -begin - Result := BoundsRect.Top; -end; - -function TdxReportVisualItem.GetTransparent: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatTransparent); -end; - -function TdxReportVisualItem.GetWidth: Integer; -begin - with BoundsRect do - Result := Right - Left; -end; - -function TdxReportVisualItem.GetVisible: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatVisible); -end; - -procedure TdxReportVisualItem.SetBackgroundBitmapIndex(Value: Integer); -begin - if Value < -1 then Value := -1; - FBackgroundBitmapIndex := Value; -end; - -procedure TdxReportVisualItem.SetBorderClass(Value: TdxPSCellBorderClass); -begin - if Value = nil then Value := TdxPSCellUltraFlatBorder; - FBorderClass := Value; -end; - -procedure TdxReportVisualItem.SetBoundsRect(const Value: TRect); -begin - with Value do - SetBounds(Left, Top, Right - Left, Bottom - Top); -end; - -procedure TdxReportVisualItem.SetCellSides(Value: TdxCellSides); -begin - if CellSides <> Value then - Format := Format and not dxPSGlbl.dxFormatRect or Byte(Value); -end; - -procedure TdxReportVisualItem.SetCellSideColors( - ASide: TdxCellSide; AValue: TColor); -begin - FCellSideColors[ASide] := AValue; -end; - -procedure TdxReportVisualItem.SetColor(Value: TColor); -begin - FColor := ColorToRGB(Value); -end; - -procedure TdxReportVisualItem.SetEdge3DSoft(Value: Boolean); -begin - BorderClass := MapBorderClass(EdgeMode, Edge3DStyle, Value); -end; - -procedure TdxReportVisualItem.SetEdge3DStyle(Value: TdxCellEdgeStyle); -begin - BorderClass := MapBorderClass(EdgeMode, Value, Edge3DSoft); -end; - -procedure TdxReportVisualItem.SetEdgeMode(Value: TdxCellEdgeMode); -begin - BorderClass := MapBorderClass(Value, Edge3DStyle, Edge3DSoft); -end; - -procedure TdxReportVisualItem.SetExcludeFromClipRgn(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatExcludeFromClipRgn, Value); -end; - -procedure TdxReportVisualItem.SetFont(Value: TFont); -begin - if ReportCells <> nil then - FontIndex := ReportCells.GetIndexByFont(Value); -end; - -procedure TdxReportVisualItem.SetFormat(Value: DWORD); -begin - FFormat := Value; -end; - -procedure TdxReportVisualItem.SetHeight(Value: Integer); -begin - SetBounds(Left, Top, Width, Value); -end; - -procedure TdxReportVisualItem.SetLeft(Value: Integer); -begin - SetBounds(Value, Top, Width, Height); -end; - -procedure TdxReportVisualItem.SetOrigin(const Value: TPoint); -begin - SetBounds(Value.X, Value.Y, Width, Height); -end; - -procedure TdxReportVisualItem.SetShowShadow(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatShowShadow, Value); -end; - -procedure TdxReportVisualItem.SetTop(Value: Integer); -begin - SetBounds(Left, Value, Width, Height); -end; - -procedure TdxReportVisualItem.SetTransparent(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatTransparent, Value); -end; - -procedure TdxReportVisualItem.SetWidth(Value: Integer); -begin - SetBounds(Left, Top, Value, Height); -end; - -procedure TdxReportVisualItem.SetVisible(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatVisible, Value); -end; - -{ TdxReportCell } - -destructor TdxReportCell.Destroy; -begin - SetParent(nil); - ClearDataItems; - ClearCells; - inherited Destroy; -end; - -procedure TdxReportCell.Assign(Source: TPersistent); - - procedure DoAssign(ASource, ADest: TdxReportCell); - var - I: Integer; - DestCell: TdxReportCell; - begin - for I := 0 to ASource.CellCount - 1 do - begin - DestCell := TdxReportCell.Create(ADest); - DestCell.Assign(ASource.Cells[I]); - end; - - for I := 0 to ASource.DataItemCount - 1 do - ASource.DataItems[I].Clone(ADest); - end; - -begin - if (Source is TdxReportCell) and (Source <> Self) then - begin - ClearAll; - inherited; - DoAssign(TdxReportCell(Source), Self); - end - else - inherited; -end; - -procedure TdxReportCell.DrawContent(DC: HDC; DrawRect: TRect; const OriginRect: TRect; - AStage: TdxPSRenderStages); -var - R: TRect; - ContentRgn, Rgn: HRGN; -begin - if ClipChildren then - begin - R := DrawRect; - Dec(R.Left, BorderClass.Thickness * LineThickness); // BorderClass.Thickness - v3.2 - Dec(R.Top, BorderClass.Thickness * LineThickness); // BorderClass.Thickness - v3.2 - ContentRgn := Renderer.IntersectClipRect(R); - end - else - ContentRgn := Renderer.GetClipRgn; - - try - Rgn := Renderer.GetClipRgn; - if ExcludeNestedItems(DC, OriginRect) <> NULLREGION then - begin - DrawItself(DC, AStage); - DrawNestedDataItems(DC, OriginRect, AStage); - end; - Renderer.RestoreClipRgn(Rgn); - - DrawNestedCells(DC, DrawRect, OriginRect, AStage); - //DrawNestedDataItems(DC, OriginRect, AStage); - finally - Renderer.RestoreClipRgn(ContentRgn); - end; -end; - -procedure TdxReportCell.DrawItself(DC: HDC; AStage: TdxPSRenderStages); -begin - if rsFirstPass in AStage then - begin - if IsBackgroundBitmapDrawn then - DrawBackgroundBitmap(DC) - else - if IsBackgroundDrawn then - DrawBackground(DC); - - if IsBordersDrawn then DrawBorders(DC); - end; -end; - -procedure TdxReportCell.DrawNestedCells(DC: HDC; DrawRect: TRect; const OriginRect: TRect; - AStage: TdxPSRenderStages); -var - I: Integer; - R: TRect; -begin - for I := 0 to CellCount - 1 do - with Cells[I] do - if Visible then - begin - DrawRect := BoundsRect; - if {RectVisible(DC, DrawRect) and }IntersectRect(R, GetAbsoluteRect, OriginRect) then - with BoundsRect do - begin - if (Left <> 0) or (Top <> 0) then OffsetWindowOrgEx(DC, -Left, -Top, nil); - OffsetRect(DrawRect, -Left, -Top); - DrawContent(DC, DrawRect, OriginRect, AStage); - if (Left <> 0) or (Top <> 0) then OffsetWindowOrgEx(DC, Left, Top, nil); - end; - end; -end; - -procedure TdxReportCell.DrawNestedDataItems(DC: HDC; const OriginRect: TRect; AStage: TdxPSRenderStages); - - function PrepareCustomDraw(AnItem: TAbstractdxReportCellData): TAbstractdxReportCellData; - begin - Result := TAbstractdxReportCellData(AnItem.Clone(nil)); - Renderer.PrepareCanvasForCustomDraw(AnItem.Font, AnItem.Color); - end; - - procedure UnprepareCustomDraw(AnItem: TAbstractdxReportCellData; var ASavedItem: TAbstractdxReportCellData); - begin - if AnItem.FontIndex = -1 then - with ReportCells.GetFontByIndex(ASavedItem.FontIndex) do - begin - SelectObject(DC, Handle); - SetTextColor(DC, ColorToRGB(Color)); - end; - AnItem.Assign(ASavedItem); - FreeAndNil(ASavedItem); - Renderer.UnprepareCanvasForCustomDraw; - end; - -var - I: Integer; - Item, SavedItem: TAbstractdxReportCellData; - IsCustomDrawn: Boolean; -begin - for I := DataItemCount - 1 downto 0 do - begin - Item := DataItems[I]; - if Item.IsDrawingNeeded(DC, AStage, OriginRect) then - begin - SavedItem := nil; - IsCustomDrawn := Item.IsCustomDrawn; - if IsCustomDrawn then SavedItem := PrepareCustomDraw(Item); - try - if not Item.CustomDraw(DC) then Item.DrawContent(DC, AStage); - finally - if IsCustomDrawn then UnprepareCustomDraw(Item, SavedItem); - end; - end; - end; -end; - -function TdxReportCell.ExcludeNestedItems(DC: HDC; const OriginRect: TRect): Integer; - - procedure ExcludeNestedCells(DC: HDC; const OriginRect: TRect; var AResult: Integer); - var - I: Integer; - begin - for I := 0 to CellCount - 1 do - with Cells[I] do - begin - DoExcludeFromClipRgn(DC, OriginRect, AResult); - if AResult = NULLREGION then Break; - end; - end; - - procedure ExcludeNestedDataItems(DC: HDC; const OriginRect: TRect; var AResult: Integer); - var - I: Integer; - begin - for I := 0 to DataItemCount - 1 do - with DataItems[I] do - begin - DoExcludeFromClipRgn(DC, OriginRect, AResult); - if AResult = NULLREGION then Break; - end; - end; - -begin - Result := SIMPLEREGION; - ExcludeNestedCells(DC, OriginRect, Result); - if Result <> NULLREGION then - ExcludeNestedDataItems(DC, OriginRect, Result); -end; - -function TdxReportCell.GetBorderOuterBounds(DC: HDC): TRect; -begin -// Result := GetOuterBounds(DC); - Result := BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - Result := GetBorderOuterBoundsRelativeTo(DC, GetOuterBoundsRelativeTo(DC, Result)); -end; - -function TdxReportCell.GetInnerBounds(DC: HDC): TRect; -begin - Result := BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - Result := GetInnerBoundsRelativeTo(DC, Result); -end; - -function TdxReportCell.GetOuterBounds(DC: HDC): TRect; -begin - Result := BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - Result := GetOuterBoundsRelativeTo(DC, Result); -end; - -function TdxReportCell.MeasureHeight(DC: HDC): Integer; -begin - Result := Height; -end; - -function TdxReportCell.MeasureWidth(DC: HDC): Integer; -begin - Result := Width; -end; - -procedure TdxReportCell.InsertCell(AnItem: TdxReportCell); -begin - CellListNeeded; - FCellList.Add(AnItem); - AnItem.FReportCells := FReportCells; -end; - -procedure TdxReportCell.InsertDataItem(AnItem: TdxReportItem); -begin - DataListNeeded; - FDataList.Add(AnItem); -end; - -procedure TdxReportCell.InsertItem(AnItem: TdxReportItem); -begin - if AnItem.IsCell then - InsertCell(AnItem.AsCell) - else - InsertDataItem(AnItem); - AnItem.FParent := Self; -end; - -procedure TdxReportCell.MoveCell(ACurIndex, ANewIndex: Integer); -begin - FCellList.Move(ACurIndex, ANewIndex); -end; - -procedure TdxReportCell.MoveDataItem(ACurIndex, ANewIndex: Integer); -begin - FDataList.Move(ACurIndex, ANewIndex); -end; - -procedure TdxReportCell.MoveItem(AnItem: TdxReportItem; ACurIndex, ANewIndex: Integer); -begin - if AnItem.IsCell then - MoveCell(ACurIndex, ANewIndex) - else - MoveDataItem(ACurIndex, ANewIndex); -end; - -procedure TdxReportCell.RemoveCell(AnItem: TdxReportCell); -begin - if FCellList <> nil then - begin - FCellList.Remove(AnItem); - CellListRelease; - end -end; - -procedure TdxReportCell.RemoveDataItem(AnItem: TdxReportItem); -begin - if FDataList <> nil then - begin - FDataList.Remove(AnItem); - DataListRelease; - end; -end; - -procedure TdxReportCell.RemoveItem(AnItem: TdxReportItem); -begin - if AnItem.IsCell then - RemoveCell(AnItem.AsCell) - else - RemoveDataItem(AnItem); - AnItem.FParent := nil; -end; - -procedure TdxReportCell.SetClipChildren(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatClipChildren, Value); -end; - -function TdxReportCell.GetAbsoluteIndex: Integer; -var - Cell: TdxReportCell; -begin - Cell := Self; - Result := 0; - while Cell <> nil do - begin - Inc(Result, Cell.Index); - Cell := Cell.Parent; - end; -end; - -function TdxReportCell.GetLevel: Integer; -var - Cell: TdxReportCell; -begin - Result := 0; - Cell := Parent; - while Cell <> nil do - begin - Inc(Result); - Cell := Cell.Parent; - end; -end; - -procedure TdxReportCell.AllocateSpaceForCells(ACapacity: Integer); -begin - CellListNeeded; - if ACapacity > FCellList.Capacity then FCellList.Capacity := ACapacity; -end; - -procedure TdxReportCell.AllocateSpaceForDatas(ACapacity: Integer); -begin - DataListNeeded; - if ACapacity > FDataList.Capacity then FDataList.Capacity := ACapacity; -end; - -function TdxReportCell.GetReportCells: TdxReportCells; -begin - Result := FReportCells; -end; - -procedure TdxReportCell.CellListNeeded; -begin - if FCellList = nil then FCellList := TList.Create; -end; - -procedure TdxReportCell.CellListRelease; -begin - if CellCount = 0 then FreeAndNil(FCellList); -end; - -procedure TdxReportCell.DataListNeeded; -begin - if FDataList = nil then FDataList := TList.Create; -end; - -procedure TdxReportCell.DataListRelease; -begin - if DataItemCount = 0 then FreeAndNil(FDataList); -end; - -procedure TdxReportCell.ClearAll; -begin - ClearCells; - ClearDataItems; -end; - -procedure TdxReportCell.ClearCells; -begin - if FCellList <> nil then - begin - while CellCount > 0 do Cells[CellCount - 1].Free; - CellListRelease; - end; -end; - -procedure TdxReportCell.ClearDataItems; -begin - if FDataList <> nil then - begin - while DataItemCount > 0 do DataItems[DataItemCount - 1].Free; - DataListRelease; - end; -end; - -function TdxReportCell.GetCell(Index: Integer): TdxReportCell; -begin - Result := TdxReportCell(FCellList[Index]); -end; - -function TdxReportCell.GetClipChildren: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatClipChildren); -end; - -function TdxReportCell.GetCellCount: Integer; -begin - if FCellList <> nil then - Result := FCellList.Count - else - Result := 0; -end; - -function TdxReportCell.GetDataItem(Index: Integer): TAbstractdxReportCellData; -begin - Result := TAbstractdxReportCellData(FDataList[Index]); -end; - -function TdxReportCell.GetIsTopLevel: Boolean; -begin - Result := Level = 1; -end; - -function TdxReportCell.GetDataItemCount: Integer; -begin - if FDataList <> nil then - Result := FDataList.Count - else - Result := 0; -end; - -function TdxReportCell.IndexOf(AnItem: TdxReportItem): Integer; -begin - Result := -1; - if AnItem.IsCell then - begin - if FCellList <> nil then - Result := FCellList.IndexOf(AnItem) - end - else - if FDataList <> nil then - Result := FDataList.IndexOf(AnItem); -end; - -class function TdxReportCell.IsCell: Boolean; -begin - Result := True; -end; - -procedure TdxReportCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - ReadProperties(AReader); - ReadCells(AReader); - ReadDataItems(AReader); -end; - -procedure TdxReportCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - WriteProperties(AWriter); - WriteCells(AWriter); - WriteDataItems(AWriter); -end; - -procedure TdxReportCell.ReadCells(AReader: TdxPSDataReader); - - procedure LoadCell; - var - CellClassName: string; - CellClass: TdxReportCellClass; - Cell: TdxReportCell; - begin - CellClassName := AReader.ReadString; - CellClass := TdxReportCellClass(GetClass(CellClassName)); - if CellClass = nil then - Assert(CellClass <> nil); - if CellClass <> nil then - begin - Cell := CellClass.Create(Self); - Cell.ReadData(AReader); - end; - end; - -begin - ClearCells; - AReader.ReadListBegin; - try - while not AReader.EndOfList do LoadCell; - finally - AReader.ReadListEnd; - end; -end; - -procedure TdxReportCell.ReadDataItems(AReader: TdxPSDataReader); - - procedure LoadDataItem; - var - DataItemClassName: string; - DataItemClass: TdxReportCellDataClass; - DataItem: TAbstractdxReportCellData; - begin - try - DataItemClassName := AReader.ReadString; - DataItemClass := TdxReportCellDataClass(GetClass(DataItemClassName)); - Assert(DataItemClass <> nil); - except - ShowMessage(DataItemClassName); - raise; - end; - if DataItemClass <> nil then - begin - DataItem := DataItemClass.Create(Self); - DataItem.ReadData(AReader); - end; - end; - -begin - ClearDataItems; - AReader.ReadListBegin; - try - while not AReader.EndOfList do - LoadDataItem; - finally - AReader.ReadListEnd; - end; -end; - -procedure TdxReportCell.ReadProperties(AReader: TdxPSDataReader); -begin -end; - -procedure TdxReportCell.WriteCells(AWriter: TdxPSDataWriter); -var - I: Integer; -begin - AWriter.WriteListBegin; - try - for I := 0 to CellCount - 1 do - with Cells[I] do - if Serializable then - begin - AWriter.WriteString(ClassName); - WriteData(AWriter); - end; - finally - AWriter.WriteListEnd; - end; -end; - -procedure TdxReportCell.WriteDataItems(AWriter: TdxPSDataWriter); -var - I: Integer; -begin - AWriter.WriteListBegin; - try - for I := 0 to DataItemCount - 1 do - with DataItems[I] do - if Serializable then - begin - AWriter.WriteString(ClassName); - WriteData(AWriter); - end; - finally - AWriter.WriteListEnd; - end; -end; - -procedure TdxReportCell.WriteProperties(AWriter: TdxPSDataWriter); -begin -end; - -function TdxReportCell.AddCell: TdxReportCell; -begin - Result := TdxReportCell.Create(Self); -end; - -function TdxReportCell.AddDataItem(AClass: TdxReportCellDataClass): TAbstractdxReportCellData; -begin - Result := AClass.Create(Self); -end; - -procedure TdxReportCell.DeleteCell(Index: Integer); -var - Cell: TdxReportCell; -begin - Cell := Cells[Index]; - Cell.Parent := nil; -end; - -procedure TdxReportCell.DeleteDataItem(Index: Integer); -var - DataItem: TAbstractdxReportCellData; -begin - DataItem := DataItems[Index]; - DataItem.Parent := nil; -end; - -function TdxReportCell.LastCell: TdxReportCell; -begin - if CellCount > 0 then - Result := TdxReportCell(FCellList.Last) - else - Result := nil; -end; - -function TdxReportCell.FirstCell: TdxReportCell; -begin - if CellCount > 0 then - Result := TdxReportCell(FCellList.First) - else - Result := nil; -end; - -function TdxReportCell.HasChildren: Boolean; -begin - Result := CellCount > 0; -end; - -procedure TdxReportCell.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -var - I: Integer; -begin - for I := 0 to DataItemCount - 1 do - DataItems[I].ConvertCoords(PixelsNumerator, PixelsDenominator); - for I := 0 to CellCount - 1 do - Cells[I].ConvertCoords(PixelsNumerator, PixelsDenominator); - inherited; -end; - -function TdxReportCell.GetBackgroundBitmapTileBounds(Col, Row: Integer): TRect; -begin - Result := inherited GetBackgroundBitmapTileBounds(Col, Row); - OffsetRect(Result, -Left, -Top); -end; - -function TdxReportCell.GetBackgroundBounds(DC: HDC): TRect; -var - R: TRect; -begin - R := BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - Result := GetInnerBoundsRelativeTo(DC, R); -end; - -function TdxReportCell.GetBorderBounds(DC: HDC): TRect; -begin - Result := inherited GetBorderBounds(DC); - OffsetRect(Result, -Result.Left, -Result.Top); -end; - -{ TdxPSReportGroupLookAndFeelPainter } - -constructor TdxPSReportGroupLookAndFeelPainter.Create(ARenderer: TdxPSReportRenderer); -begin - inherited Create; - FRenderer := ARenderer; -end; - -procedure TdxPSReportGroupLookAndFeelPainter.Paint(DC: HDC); -begin -end; - -procedure TdxPSReportGroupLookAndFeelPainter.DrawBorders(DC: HDC); -begin -end; - -procedure TdxPSReportGroupLookAndFeelPainter.DrawCaptionText(DC: HDC); -var - R: TRect; -begin - R := LookAndFeel.GetCaptionTextBounds(Group); - if RectVisible(DC, R) then - Renderer.DrawText(DC, R, 1, 0, 0, Group.CaptionText, LookAndFeel.CaptionFont, - LookAndFeel.GetCaptionColor, Group.CaptionAlignment, taCenterY, not Group.CaptionTransparent, - False, False, False, False, True); -end; - -procedure TdxPSReportGroupLookAndFeelPainter.Initialize(ALookAndFeel: TdxPSReportGroupLookAndFeel; - AGroup: TdxReportGroup); -begin - FGroup := AGroup; - FLookAndFeel := ALookAndFeel; -end; - -function TdxPSReportGroupLookAndFeelPainter.Group: TdxReportGroup; -begin - Result := FGroup; -end; - -function TdxPSReportGroupLookAndFeelPainter.LookAndFeel: TdxPSReportGroupLookAndFeel; -begin - Result := FLookAndFeel; -end; - -{ TdxPSReportGroupLookAndFeel } - -constructor TdxPSReportGroupLookAndFeel.Create(AReportCells: TdxReportCells); -begin - inherited Create; - FReportCells := AReportCells; - FCaptionFontIndex := -1; - FCaptionHeight := 0; - FCaptionIndent := dxDefaultReportGroupCaptionIndent; - FColor := dxDefaultGroupColor; - FFontIndex := -1; -end; - -procedure TdxPSReportGroupLookAndFeel.Assign(Source: TPersistent); -begin - if Source is TdxPSReportGroupLookAndFeel then - with TdxPSReportGroupLookAndFeel(Source) do - begin - Self.CaptionFontIndex := CaptionFontIndex; - Self.FCaptionIndent := CaptionIndent; - Self.Color := Color; - Self.FontIndex := FontIndex; - end - else - inherited; -end; - -class function TdxPSReportGroupLookAndFeel.BorderClass: TdxPSCellBorderClass; -begin - Result := TdxPSCellEtchedBorder; -end; - -class function TdxPSReportGroupLookAndFeel.DefaultBorderSides: TdxCellSides; -begin - Result := csAll; -end; - -class function TdxPSReportGroupLookAndFeel.Name: string; -begin - Result := ''; -end; - -class procedure TdxPSReportGroupLookAndFeel.Register; -begin - if GetClass(ClassName) = nil then RegisterClass(Self); -end; - -class procedure TdxPSReportGroupLookAndFeel.Unregister; -begin -end; - -procedure TdxPSReportGroupLookAndFeel.Paint(DC: HDC; AGroup: TdxReportGroup); -begin - with GetPainter do - begin - Initialize(Self, AGroup); - Paint(DC); - end; -end; - -procedure TdxPSReportGroupLookAndFeel.Prepare(DC: HDC); -begin - FCaptionHeight := 2 * Renderer.CalcTextPatternHeight(DC, CaptionFont) div 2; -end; - -procedure TdxPSReportGroupLookAndFeel.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -begin - FCaptionHeight := MulDiv(FCaptionHeight, APixelsNumerator, APixelsDenominator); - FCaptionIndent := MulDiv(FCaptionIndent, APixelsNumerator, APixelsDenominator); -end; - -procedure TdxPSReportGroupLookAndFeel.ReadData(AReader: TdxPSDataReader); -begin - FCaptionHeight := AReader.ReadInteger; - CaptionFontIndex := AReader.ReadInteger; - FCaptionIndent := AReader.ReadInteger; - Color := AReader.ReadInteger; - Data := Pointer(AReader.ReadInteger); - FontIndex := AReader.ReadInteger; -end; - -procedure TdxPSReportGroupLookAndFeel.WriteData(AWriter: TdxPSDataWriter); -begin - AWriter.WriteInteger(CaptionHeight); - AWriter.WriteInteger(CaptionFontIndex); - AWriter.WriteInteger(CaptionIndent); - AWriter.WriteInteger(Color); - AWriter.WriteInteger(Integer(Data)); - AWriter.WriteInteger(FontIndex); -end; - -function TdxPSReportGroupLookAndFeel.GetBorderEdgeThickness(AGroup: TdxReportGroup; - ASide: TdxCellSide): Integer; -begin - if ASide = csTop then - begin - Result := BorderThickness; - if Renderer.IsRendering and (Renderer.LineThickness <> 0) then - Result := Result * Renderer.LineThickness; - if AGroup.ShowCaption then - Inc(Result, CaptionAreaHeight); - if Renderer.IsRendering and (Renderer.LineThickness <> 0) then - Result := Result div Renderer.LineThickness; - end - else - Result := AGroup.InternalGetBorderEdgeThickness(ASide); -end; - -function TdxPSReportGroupLookAndFeel.GetBorderThickness: Integer; -begin - Result := 0; -end; - -function TdxPSReportGroupLookAndFeel.GetColor: TColor; -begin - Result := FColor; - if Result = clDefault then Result := ReportCells.GroupColor; -end; - -procedure TdxPSReportGroupLookAndFeel.SetBorderThickness(Value: Integer); -begin -end; - -function TdxPSReportGroupLookAndFeel.GetCaptionAreaHeight: Integer; -begin - Result := CaptionHeight; -end; - -function TdxPSReportGroupLookAndFeel.GetCaptionBounds(AGroup: TdxReportGroup): TRect; -begin - Result := AGroup.BoundsRect; - Result.Bottom := Result.Top + CaptionHeight; -end; - -function TdxPSReportGroupLookAndFeel.GetCaptionColor: TColor; -begin - Result := Color; -end; - -function TdxPSReportGroupLookAndFeel.GetCaptionHeight: Integer; -begin - Result := FCaptionHeight; -end; - -function TdxPSReportGroupLookAndFeel.GetCaptionIndent: Integer; -begin - Result := FCaptionIndent; -end; - -function TdxPSReportGroupLookAndFeel.GetCaptionLeftRestSpaceBounds(AGroup: TdxReportGroup): TRect; -begin - if not AGroup.Transparent then - begin - Result := GetCaptionBounds(AGroup); - Result.Right := GetCaptionTextBounds(AGroup).Left; - end - else - Result := dxPSGlbl.NullRect; -end; - -function TdxPSReportGroupLookAndFeel.GetCaptionRightRestSpaceBounds(AGroup: TdxReportGroup): TRect; -begin - if not AGroup.Transparent then - begin - Result := GetCaptionBounds(AGroup); - Result.Left := GetCaptionTextBounds(AGroup).Right; - end - else - Result := dxPSGlbl.NullRect; -end; - -function TdxPSReportGroupLookAndFeel.GetCaptionTextBounds(AGroup: TdxReportGroup): TRect; -var - TextWidth: Integer; -begin - Result := NullRect; - if AGroup.ShowCaption then - begin - TextWidth := AGroup.CaptionTextWidth; - if TextWidth <> 0 then - begin - Result := AGroup.BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - InflateRect(Result, -CaptionIndent, 0); - - if not IsRectEmpty(Result) then - with Result do - begin - case AGroup.CaptionAlignment of - taLeft: - Right := Left + TextWidth; - taCenterX: - begin - Inc(Left, (Right - Left - TextWidth) div 2); - Right := Left + TextWidth; - end; - taRight: - Left := Right - TextWidth; - end; - Bottom := Top + CaptionHeight; - end; - end; - end; -end; - -function TdxPSReportGroupLookAndFeel.GetPainter: TdxPSReportGroupLookAndFeelPainter; -begin - Result := Renderer.GetReportGroupLookAndFeelPainter(GetPainterClass); -end; - -class function TdxPSReportGroupLookAndFeel.GetPainterClass: TdxPSReportGroupLookAndFeelPainterClass; -begin - Result := nil; // Actually method must be declared as "abstract" but "C++" syntax does not allow us to use "static virtual abstract" methods -end; - -function TdxPSReportGroupLookAndFeel.GetCaptionFont: TFont; -begin - if CaptionFontIndex <> -1 then - Result := ReportCells.GetFontByIndex(CaptionFontIndex) - else - Result := nil; -end; - -function TdxPSReportGroupLookAndFeel.GetFont: TFont; -begin - if FontIndex <> -1 then - Result := ReportCells.GetFontByIndex(FontIndex) - else - Result := nil; -end; - -function TdxPSReportGroupLookAndFeel.GetRenderer: TdxPSReportRenderer; -begin - Result := ReportCells.Renderer; -end; - -procedure TdxPSReportGroupLookAndFeel.SetCaptionFont(Value: TFont); -begin - CaptionFontIndex := ReportCells.GetIndexByFont(Value); -end; - -procedure TdxPSReportGroupLookAndFeel.SetCaptionFontIndex(Value: Integer); -begin - if Value < -1 then Value := -1; - FCaptionFontIndex := Value; -end; - -procedure TdxPSReportGroupLookAndFeel.SetFont(Value: TFont); -begin - FontIndex := ReportCells.GetIndexByFont(Value); -end; - -procedure TdxPSReportGroupLookAndFeel.SetFontIndex(Value: Integer); -begin - if Value < -1 then Value := -1; - FFontIndex := Value; -end; - -{ TdxPSReportGroupNullLookAndFeelPainter } - -procedure TdxPSReportGroupNullLookAndFeelPainter.Paint(DC: HDC); -begin -end; - -{ TdxPSReportGroupNullLookAndFeel } - -class function TdxPSReportGroupNullLookAndFeel.BorderClass: TdxPSCellBorderClass; -begin - Result := TdxPSCellUltraFlatBorder; -end; - -class function TdxPSReportGroupNullLookAndFeel.DefaultBorderSides: TdxCellSides; -begin - Result := []; -end; - -class function TdxPSReportGroupNullLookAndFeel.Name: string; -begin - Result := cxGetResourceString(@sdxReportGroupNullLookAndFeel); -end; - -function TdxPSReportGroupNullLookAndFeel.GetBorderThickness: Integer; -begin - Result := 1; -end; - -function TdxPSReportGroupNullLookAndFeel.GetCaptionHeight: Integer; -begin - Result := 0; -end; - -class function TdxPSReportGroupNullLookAndFeel.GetPainterClass: TdxPSReportGroupLookAndFeelPainterClass; -begin - Result := TdxPSReportGroupNullLookAndFeelPainter; -end; - -{ TdxPSReportGroupStandardLookAndFeelPainter } - -procedure TdxPSReportGroupStandardLookAndFeelPainter.Paint(DC: HDC); -var - Rgn: HRGN; -begin - DrawCaptionRestSpace(DC); - DrawCaptionText(DC); - if Group.IsBordersDrawn then - begin - Rgn := Renderer.ExcludeClipRect(LookAndFeel.GetCaptionTextBounds(Group)); - DrawBorders(DC); - Renderer.RestoreClipRgn(Rgn); - end; -end; - -procedure TdxPSReportGroupStandardLookAndFeelPainter.DrawBorders(DC: HDC); -begin - Group.InternalDrawBorders(DC); -end; - -procedure TdxPSReportGroupStandardLookAndFeelPainter.DrawCaptionRestSpace(DC: HDC); - - procedure DrawCaptionPart(const R: TRect); - begin - if RectVisible(DC, R) then - Renderer.FillRect(DC, R, LookAndFeel.Color); - end; - -begin - DrawCaptionPart(LookAndFeel.GetCaptionLeftRestSpaceBounds(Group)); - DrawCaptionPart(LookAndFeel.GetCaptionRightRestSpaceBounds(Group)); -end; - -function TdxPSReportGroupStandardLookAndFeelPainter.LookAndFeel: TdxPSReportGroupStandardLookAndFeel; -begin - Result := inherited LookAndFeel as TdxPSReportGroupStandardLookAndFeel; -end; - -{ TdxPSReportGroupStandardLookAndFeel } - -class function TdxPSReportGroupStandardLookAndFeel.BorderClass: TdxPSCellBorderClass; -begin - Result := TdxPSCellEtchedBorder; -end; - -class function TdxPSReportGroupStandardLookAndFeel.Name: string; -begin - Result := cxGetResourceString(@sdxReportGroupStandardLookAndFeel); -end; - -class function TdxPSReportGroupStandardLookAndFeel.GetPainterClass: TdxPSReportGroupLookAndFeelPainterClass; -begin - Result := TdxPSReportGroupStandardLookAndFeelPainter; -end; - -{ TdxPSReportGroupOfficeLookAndFeel } - -class function TdxPSReportGroupOfficeLookAndFeel.DefaultBorderSides: TdxCellSides; -begin - Result := [csTop]; -end; - -class function TdxPSReportGroupOfficeLookAndFeel.Name: string; -begin - Result := cxGetResourceString(@sdxReportGroupOfficeLookAndFeel); -end; - -function TdxPSReportGroupOfficeLookAndFeel.GetCaptionIndent: Integer; -begin - Result := 0; -end; - -{ TdxPSReportGroupWebLookAndFeelPainter } - -procedure TdxPSReportGroupWebLookAndFeelPainter.Paint(DC: HDC); -begin - DrawBorders(DC); - DrawCaptionText(DC); - DrawCaptionSeparator(DC); -end; - -procedure TdxPSReportGroupWebLookAndFeelPainter.DrawBorders(DC: HDC); -var - R: TRect; -begin - R := Group.BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - Renderer.FrameRect(DC, R, LookAndFeel.BorderColor, Group.CellSides, LookAndFeel.BorderThickness); -end; - -procedure TdxPSReportGroupWebLookAndFeelPainter.DrawCaptionSeparator(DC: HDC); -var - R: TRect; -begin - R := LookAndFeel.GetCaptionSeparatorBounds(Group); - if RectVisible(DC, R) then - Renderer.FillRect(DC, R, LookAndFeel.CaptionSeparatorColor); -end; - -function TdxPSReportGroupWebLookAndFeelPainter.LookAndFeel: TdxPSReportGroupWebLookAndFeel; -begin - Result := inherited LookAndFeel as TdxPSReportGroupWebLookAndFeel; -end; - -{ TdxPSReportGroupWebLookAndFeel } - -constructor TdxPSReportGroupWebLookAndFeel.Create(AReportCells: TdxReportCells); -begin - inherited Create(AReportCells); - BorderColor := clDefault; - BorderThickness := 1; - CaptionColor := clDefault; - CaptionSeparatorColor := clDefault; - CaptionSeparatorThickness := 0; -end; - -procedure TdxPSReportGroupWebLookAndFeel.Assign(Source: TPersistent); -begin - if Source is TdxPSReportGroupWebLookAndFeel then - with TdxPSReportGroupWebLookAndFeel(Source) do - begin - Self.BorderColor := BorderColor; - Self.BorderThickness := BorderThickness; - Self.CaptionColor := CaptionColor; - Self.CaptionSeparatorColor := CaptionSeparatorColor; - Self.CaptionSeparatorThickness := CaptionSeparatorThickness; - end; - inherited; -end; - -class function TdxPSReportGroupWebLookAndFeel.BorderClass: TdxPSCellBorderClass; -begin - Result := TdxPSCellUltraFlatBorder; -end; - -class function TdxPSReportGroupWebLookAndFeel.Name: string; -begin - Result := cxGetResourceString(@sdxReportGroupWebLookAndFeel); -end; - -procedure TdxPSReportGroupWebLookAndFeel.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -begin - inherited; - CaptionSeparatorThickness := MulDiv(CaptionSeparatorThickness, APixelsNumerator, APixelsDenominator); -end; - -procedure TdxPSReportGroupWebLookAndFeel.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - BorderColor := AReader.ReadInteger; - BorderThickness := AReader.ReadInteger; - CaptionColor := AReader.ReadInteger; - CaptionSeparatorColor := AReader.ReadInteger; - CaptionSeparatorThickness := AReader.ReadInteger; -end; - -procedure TdxPSReportGroupWebLookAndFeel.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteInteger(BorderColor); - AWriter.WriteInteger(BorderThickness); - AWriter.WriteInteger(CaptionColor); - AWriter.WriteInteger(CaptionSeparatorColor); - AWriter.WriteInteger(CaptionSeparatorThickness); -end; - -function TdxPSReportGroupWebLookAndFeel.GetBorderEdgeThickness(AGroup: TdxReportGroup; - ASide: TdxCellSide): Integer; -begin - if ASide = csTop then - Result := inherited GetBorderEdgeThickness(AGroup, ASide) - else - Result := BorderThickness; -end; - -function TdxPSReportGroupWebLookAndFeel.GetBorderThickness: Integer; -begin - Result := FBorderThickness; -end; - -procedure TdxPSReportGroupWebLookAndFeel.SetBorderThickness(Value: Integer); -begin - if Value < 0 then Value := 0; - FBorderThickness := Value; -end; - -function TdxPSReportGroupWebLookAndFeel.GetCaptionAreaHeight: Integer; -begin - Result := inherited GetCaptionAreaHeight + CaptionSeparatorThickness; -end; - -function TdxPSReportGroupWebLookAndFeel.GetCaptionBounds(AGroup: TdxReportGroup): TRect; -begin - if AGroup.ShowCaption then - begin - Result := AGroup.BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - InflateRect(Result, -BorderThickness * Renderer.LineThickness, -BorderThickness * Renderer.LineThickness); - Result.Bottom := Result.Top + CaptionHeight; - end - else - Result := NullRect; -end; - -function TdxPSReportGroupWebLookAndFeel.GetCaptionLeftRestSpaceBounds(AGroup: TdxReportGroup): TRect; -begin - Result := NullRect; -end; - -function TdxPSReportGroupWebLookAndFeel.GetCaptionRightRestSpaceBounds(AGroup: TdxReportGroup): TRect; -begin - Result := NullRect; -end; - -function TdxPSReportGroupWebLookAndFeel.GetCaptionSeparatorBounds(AGroup: TdxReportGroup): TRect; -begin - Result := GetCaptionBounds(AGroup); - if AGroup.ShowCaption then - begin - Result.Top := Result.Bottom; - Result.Bottom := Result.Top + CaptionSeparatorThickness; - end; -end; - -function TdxPSReportGroupWebLookAndFeel.GetCaptionTextBounds(AGroup: TdxReportGroup): TRect; -begin - Result := GetCaptionBounds(AGroup); -end; - -class function TdxPSReportGroupWebLookAndFeel.GetPainterClass: TdxPSReportGroupLookAndFeelPainterClass; -begin - Result := TdxPSReportGroupWebLookAndFeelPainter; -end; - -function TdxPSReportGroupWebLookAndFeel.GetBorderColor: TColor; -begin - Result := FBorderColor; - if Result = clDefault then Result := ReportCells.GroupBorderColor; -end; - -function TdxPSReportGroupWebLookAndFeel.GetCaptionColor: TColor; -begin - Result := FCaptionColor; - if Result = clDefault then Result := ReportCells.GroupCaptionColor; -end; - -function TdxPSReportGroupWebLookAndFeel.GetCaptionSeparatorColor: TColor; -begin - Result := FCaptionSeparatorColor; - if Result = clDefault then Result := ReportCells.GroupCaptionSeparatorColor; -end; - -procedure TdxPSReportGroupWebLookAndFeel.SetCaptionSeparatorThickness(Value: Integer); -begin - if Value < 0 then Value := 0; - FCaptionSeparatorThickness := Value; -end; - -{ TdxReportGroup } - -constructor TdxReportGroup.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - CaptionAlignment := taLeft; - ClipChildren := True; - ShowCaption := True; -end; - -procedure TdxReportGroup.Assign(Source: TPersistent); -begin - if Source is TdxReportGroup then - begin - inherited; - with TdxReportGroup(Source) do - begin - Self.CaptionText := CaptionText; - Self.LookAndFeel := LookAndFeel; - end; - end - else - inherited; -end; - -procedure TdxReportGroup.DrawBorders(DC: HDC); -begin - if LookAndFeel <> nil then - LookAndFeel.Paint(DC, Self) - else - inherited DrawBorders(DC); -end; - -procedure TdxReportGroup.CalculateCaptionTextWidth(DC: HDC); -var - F: TFont; -begin - FCaptionTextWidth := 0; - if CaptionText <> '' then - begin - if LookAndFeel <> nil then - F := LookAndFeel.CaptionFont - else - F := Font; - - FCaptionTextWidth := Renderer.CalcTextWidth(DC, CaptionText, F); - if FCaptionTextWidth > 0 then - Inc(FCaptionTextWidth, 2 + 2); - end; -end; - -function TdxReportGroup.GetBorderOuterBounds(DC: HDC): TRect; -begin - Result := inherited GetBorderOuterBounds(DC); - if ShowCaption and (LookAndFeel <> nil) then - Inc(Result.Top, LookAndFeel.CaptionHeight div 2); -end; - -procedure TdxReportGroup.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -begin - inherited; - FCaptionTextWidth := MulDiv(FCaptionTextWidth, APixelsNumerator, APixelsDenominator); -end; - -procedure TdxReportGroup.InternalDrawBorders(DC: HDC); -begin - inherited DrawBorders(DC); -end; - -function TdxReportGroup.GetBorderClass: TdxPSCellBorderClass; -begin - if UseOwnBorderClass or (LookAndFeel = nil) then - Result := inherited GetBorderClass - else - Result := LookAndFeel.BorderClass; -end; - -function TdxReportGroup.GetBorderEdgeSalient(ASide: TdxCellSide; ASalient: TdxPSCellBorderSalientType): Integer; -begin - if LookAndFeel <> nil then - if ASalient = bstOuter then - Result := 0 - else - Result := GetBorderEdgeThickness(ASide) - else - Result := inherited GetBorderEdgeSalient(ASide, ASalient); -end; - -function TdxReportGroup.GetBorderEdgeThickness(ASide: TdxCellSide): Integer; -begin - if LookAndFeel <> nil then - Result := LookAndFeel.GetBorderEdgeThickness(Self, ASide) - else - Result := inherited GetBorderEdgeThickness(ASide); -end; - -function TdxReportGroup.InternalGetBorderEdgeThickness(ASide: TdxCellSide): Integer; -begin - Result := inherited GetBorderEdgeThickness(ASide); -end; - -function TdxReportGroup.IsBordersDrawn: Boolean; -begin - Result := inherited IsBordersDrawn or (CaptionText <> ''); -end; - -procedure TdxReportGroup.ReadData(AReader: TdxPSDataReader); -var - Index: Integer; -begin - inherited ReadData(AReader); - CaptionText := AReader.ReadString; - FCaptionTextWidth := AReader.ReadInteger; - - Index := AReader.ReadInteger; - if Index <> -1 then - LookAndFeel := ReportCells.LookAndFeels[Index]; -end; - -procedure TdxReportGroup.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(CaptionText); - AWriter.WriteInteger(CaptionTextWidth); - AWriter.WriteInteger(LookAndFeelIndex); -end; - -function TdxReportGroup.GetCaptionAlignment: TcxTextAlignX; -begin - Result := TcxTextAlignX((Format and dxPSGlbl.dxFormatTextAlignXMask) shr dxPSGlbl.dxFormatTextAlignXOffset); -end; - -function TdxReportGroup.GetCaptionTextWidth: Integer; -begin - Result := FCaptionTextWidth; -end; - -function TdxReportGroup.GetCaptionTransparent: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatGroupCaptionTransparent); -end; - -function TdxReportGroup.GetLookAndFeel: TdxPSReportGroupLookAndFeel; -begin - Result := FLookAndFeel; - if Result = nil then - if Parent is TdxReportGroup then - Result := TdxReportGroup(Parent).LookAndFeel - else - Result := ReportCells.LookAndFeel; -end; - -function TdxReportGroup.GetLookAndFeelIndex: Integer; -begin - if FLookAndFeel <> nil then - Result := ReportCells.IndexOfReportGroupLookAndFeel(LookAndFeel) - else - Result := -1; -end; - -function TdxReportGroup.GetShowCaption: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatGroupShowCaption); -end; - -function TdxReportGroup.GetUseOwnBorderClass: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatOwnBorderClass); -end; - -procedure TdxReportGroup.SetCaptionAlignment(Value: TcxTextAlignX); -begin - Format := Format and not dxPSGlbl.dxFormatTextAlignXMask or (Byte(Value) shl dxPSGlbl.dxFormatTextAlignXOffset); -end; - -procedure TdxReportGroup.SetCaptionTransparent(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatGroupCaptionTransparent, Value); -end; - -procedure TdxReportGroup.SetLookAndFeel(Value: TdxPSReportGroupLookAndFeel); -begin - FLookAndFeel := Value; -end; - -procedure TdxReportGroup.SetShowCaption(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatGroupShowCaption, Value); -end; - -procedure TdxReportGroup.SetUseOwnBorderClass(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatOwnBorderClass, Value); -end; - -{ TdxReportCells } - -constructor TdxReportCells.Create(AReportLink: TBasedxReportLink); -begin - inherited Create; - FReportLink := AReportLink; - - BorderColor := dxDefaultGridLineColor; - BorderWidth := 1; - ExpandButtonBorderColor := dxDefaultExpandButtonBorderColor; - GroupBorderColor := dxDefaultGroupBorderColor; - GroupCaptionColor := dxDefaultGroupCaptionColor; - GroupCaptionSeparatorColor := dxDefaultGroupCaptionSeparatorColor; - GroupColor := dxDefaultGroupColor; - ShadowColor := dxDefaultShadowColor; - ShadowDepth := dxDefaultShadowDepth; - TreeLineColor := dxDefaultTreeLineColor; - TreeLineStyle := tlsDot; - - FLookAndFeels := TList.Create; - FLookAndFeel := CreateGroupLookAndFeel(dxDefaultReportGroupLookAndFeel); - CreateGroupLookAndFeel(TdxPSReportGroupNullLookAndFeel); - - FImageLists := TList.Create; - - FCells := TdxReportCell.Create(nil); - FCells.FReportCells := Self; - FCells.Color := dxDefaultContentColor; -end; - -destructor TdxReportCells.Destroy; -begin - FreeAndNil(FCells); - FreeAndNilReportGroupLookAndFeels; - FreeAndNil(FFooterCells); - FreeAndNil(FHeaderCells); - FreeAndNilOverlays; - FreeAndNilImageLists; - inherited; -end; - -procedure TdxReportCells.Assign(Source: TPersistent); -begin - if Source is TdxReportCells then - with TdxReportCells(Source) do - begin - Self.BorderColor := BorderColor; - Self.BorderWidth := BorderWidth; - Self.ExpandButtonBorderColor := ExpandButtonBorderColor; - Self.GroupBorderColor := GroupBorderColor; - Self.GroupCaptionColor := GroupCaptionColor; - Self.GroupCaptionSeparatorColor := GroupCaptionSeparatorColor; - Self.GroupColor := GroupColor; - Self.ShadowColor := ShadowColor; - Self.ShadowDepth := ShadowDepth; - Self.TreeLineColor := TreeLineColor; - Self.TreeLineStyle := TreeLineStyle; - - Self.Cells.Assign(Cells); - if AreHeaderCellsAllocated then Self.HeaderCells.Assign(HeaderCells); - if AreFooterCellsAllocated then Self.FooterCells.Assign(FooterCells); - if HasOverlays then Self.AssignOverlays(TdxReportCells(Source)); - end - else - inherited; -end; - -procedure TdxReportCells.ClearItems; -begin - FCells.ClearCells; - FCells.ClearDataItems; -end; - -procedure TdxReportCells.ClearLookAndFeels; -var - I: Integer; -begin - for I := 0 to LookAndFeelCount - 1 do - LookAndFeels[I].Free; - FLookAndFeels.Clear; -end; - -function TdxReportCells.CreateGroupLookAndFeel(AClass: TdxPSReportGroupLookAndFeelClass; - ACheckExisting: Boolean = True): TdxPSReportGroupLookAndFeel; -begin - if ACheckExisting then - Result := FindGroupLookAndFeelByClass(AClass) - else - Result := nil; - - if Result = nil then - begin - Result := AClass.Create(Self); - FLookAndFeels.Add(Result); - end; -end; - -function TdxReportCells.FindGroupLookAndFeelByClass(AClass: TdxPSReportGroupLookAndFeelClass): TdxPSReportGroupLookAndFeel; -var - I: Integer; -begin - for I := 0 to LookAndFeelCount - 1 do - begin - Result := LookAndFeels[I]; - if Result.ClassType = AClass then Exit; - end; - Result := nil; -end; - -function TdxReportCells.FindGroupLookAndFeelByData(AData: Pointer): TdxPSReportGroupLookAndFeel; -var - I: Integer; -begin - for I := 0 to LookAndFeelCount - 1 do - begin - Result := LookAndFeels[I]; - if Result.Data = AData then Exit; - end; - Result := nil; -end; - -function TdxReportCells.IndexOfReportGroupLookAndFeel(ALookAndFeel: TdxPSReportGroupLookAndFeel): Integer; -begin - Result := FLookAndFeels.IndexOf(ALookAndFeel); -end; - -procedure TdxReportCells.DoProgress(const APercentDone: Double); -begin - if ReportLink <> nil then ReportLink.DoProgress(APercentDone); -end; - -function TdxReportCells.AddOverlay: TdxReportCell; -begin - Result := TdxReportCell.Create(nil); - Result.FReportCells := Self; - if FOverlays = nil then FOverlays := TList.Create; - FOverlays.Add(Result); -end; - -procedure TdxReportCells.AppendOverlays(Source: TdxReportCells; - AnOffsetX: Integer = 0; AnOffsetY: Integer = 0); - - procedure OffsetOverlayCells(AnOverlay: TdxReportCell; AnOffsetX, AnOffsetY: Integer); - var - I: Integer; - begin - if (AnOffsetX <> 0) or (AnOffsetY <> 0) then - for I := 0 to AnOverlay.CellCount - 1 do - with AnOverlay.Cells[I] do - begin - Left := Left + AnOffsetX; - Top := Top + AnOffsetY; - end; - end; - - procedure OffsetOverlayDataItems(AnOverlay: TdxReportCell; AnOffsetX, AnOffsetY: Integer); - var - I: Integer; - begin - if (AnOffsetX <> 0) or (AnOffsetY <> 0) then - for I := 0 to AnOverlay.DataItemCount - 1 do - with AnOverlay.DataItems[I] do - begin - Left := Left + AnOffsetX; - Top := Top + AnOffsetY; - end; - end; - -var - I: Integer; - Overlay: TdxReportCell; -begin - for I := 0 to Source.OverlayCount - 1 do - begin - Overlay := AddOverlay; - Overlay.Assign(Source.Overlays[I]); - OffsetOverlayCells(Overlay, AnOffsetX, AnOffsetY); - OffsetOverlayDataItems(Overlay, AnOffsetX, AnOffsetY); - end; -end; - -procedure TdxReportCells.AssignOverlays(Source: TdxReportCells; - AnOffsetX: Integer = 0; AnOffsetY: Integer = 0); -begin - ClearOverlays; - AppendOverlays(Source, AnOffsetX, AnOffsetY); -end; - -procedure TdxReportCells.ClearOverlays; -var - I: Integer; -begin - for I := 0 to OverlayCount - 1 do - Overlays[I].Free; - if FOverlays <> nil then - FOverlays.Clear; -end; - -procedure TdxReportCells.DeleteOverlay(AnOverlay: TdxReportCell); -var - Index: Integer; -begin - Index := IndexOfOverlay(AnOverlay); - if Index <> -1 then - begin - Overlays[Index].Free; - if OverlayCount = 0 then FreeAndNil(FOverlays); - end; -end; - -procedure TdxReportCells.FreeAndNilOverlays; -begin - ClearOverlays; - FreeAndNil(FOverlays); -end; - -function TdxReportCells.HasOverlays: Boolean; -begin - Result := FOverlays <> nil; -end; - -function TdxReportCells.IndexOfOverlay(AnOverlay: TdxReportCell): Integer; -begin - if HasOverlays then - Result := FOverlays.IndexOf(AnOverlay) - else - Result := -1; -end; - -function TdxReportCells.GetFontByIndex(AnIndex: Integer): TFont; -begin - Result := ReportLink.FontPool[AnIndex]; -end; - -function TdxReportCells.GetIndexByFont(AFont: TFont): Integer; -begin - Result := ReportLink.FontPool.Add(AFont); -end; - -procedure TdxReportCells.ReadData(AReader: TdxPSDataReader); -begin - BeforeReadData(AReader); - try - ClearItems; - try - ReadLookAndFeels(AReader); - ReadCells(AReader); - ReadFooterCells(AReader); - ReadHeaderCells(AReader); - ReadOverlayCells(AReader); - ReadProperties(AReader); - except - ClearItems; - raise; - end; - finally - AfterReadData(AReader); - end; -end; - -procedure TdxReportCells.WriteData(AWriter: TdxPSDataWriter); -begin - BeforeWriteData(AWriter); - try - WriteLookAndFeels(AWriter); - WriteCells(AWriter); - WriteFooterCells(AWriter); - WriteHeaderCells(AWriter); - WriteOverlayCells(AWriter); - WriteProperties(AWriter); - finally - AfterWriteData(AWriter); - end; -end; - -procedure TdxReportCells.AfterReadData(AReader: TdxPSDataReader); -begin -end; - -procedure TdxReportCells.AfterWriteData(AWriter: TdxPSDataWriter); -begin - ClearImageLists; -end; - -procedure TdxReportCells.BeforeReadData(AReader: TdxPSDataReader); -begin - ClearImageLists; - OwnImageLists := True; - ReadImageLists(AReader); -end; - -procedure TdxReportCells.BeforeWriteData(AWriter: TdxPSDataWriter); -begin - ClearImageLists; - OwnImageLists := False; - GetImageLists; - WriteImageLists(AWriter); -end; - -procedure TdxReportCells.ReadCells(AReader: TdxPSDataReader); -begin - Cells.ReadData(AReader); -end; - -procedure TdxReportCells.ReadFooterCells(AReader: TdxPSDataReader); -begin - if AReader.ReadBoolean then FooterCells.ReadData(AReader); -end; - -procedure TdxReportCells.ReadHeaderCells(AReader: TdxPSDataReader); -begin - if AReader.ReadBoolean then HeaderCells.ReadData(AReader); -end; - -procedure TdxReportCells.ReadImageLists(AReader: TdxPSDataReader); -var - ImageList: TImageList; -begin - AReader.ReadListBegin; - try - while not AReader.EndOfList do - begin - ImageList := TImageList.Create(nil); - AReader.ReadImageList(ImageList); - FImageLists.Add(Imagelist); - end; - finally - AReader.ReadListEnd; - end; -end; - -procedure TdxReportCells.ReadLookAndFeels(AReader: TdxPSDataReader); -var - LookAndFeelClass: TdxPSReportGroupLookAndFeelClass; - Index: Integer; -begin - ClearLookAndFeels; - - AReader.ReadListBegin; - try - while not AReader.EndOfList do - begin - LookAndFeelClass := AReader.ReadLookAndFeelClass; - CreateGroupLookAndFeel(LookAndFeelClass, False).ReadData(AReader); - end; - finally - AReader.ReadListEnd; - end; - Index := AReader.ReadInteger; - if Index <> -1 then - LookAndFeel := LookAndFeels[Index] - else - LookAndFeel := nil; - - {if LookAndFeelCount = 0 then - begin - FLookAndFeel := CreateGroupLookAndFeel(dxDefaultReportGroupLookAndFeel); - CreateGroupLookAndFeel(TdxPSReportGroupNullLookAndFeel); - end - else - FLookAndFeel := LookAndFeels[0];} -end; - -procedure TdxReportCells.ReadOverlayCells(AReader: TdxPSDataReader); -begin - ClearOverlays; - AReader.ReadListBegin; - try - while not AReader.EndOfList do - AddOverlay.ReadData(AReader); - finally - AReader.ReadListEnd; - end; -end; - -procedure TdxReportCells.ReadProperties(AReader: TdxPSDataReader); -begin - with AReader do - begin - BorderColor := ReadInteger; - BorderWidth := ReadInteger; - ExpandButtonBorderColor := ReadInteger; - GroupBorderColor := ReadInteger; - GroupCaptionColor := ReadInteger; - GroupCaptionSeparatorColor := ReadInteger; - GroupColor := ReadInteger; - ShadowColor := ReadInteger; - ShadowDepth := ReadInteger; - TreeLineColor := ReadInteger; - TreeLineStyle := TdxPSTreeLineStyle(ReadInteger); - end; -end; - -procedure TdxReportCells.WriteCells(AWriter: TdxPSDataWriter); -begin - Cells.WriteData(AWriter); -end; - -procedure TdxReportCells.WriteFooterCells(AWriter: TdxPSDataWriter); -begin - AWriter.WriteBoolean(AreFooterCellsAllocated); - if AreFooterCellsAllocated then FooterCells.WriteData(AWriter); -end; - -procedure TdxReportCells.WriteHeaderCells(AWriter: TdxPSDataWriter); -begin - AWriter.WriteBoolean(AreHeaderCellsAllocated); - if AreHeaderCellsAllocated then HeaderCells.WriteData(AWriter); -end; - -procedure TdxReportCells.WriteImageLists(AWriter: TdxPSDataWriter); -var - I: Integer; -begin - AWriter.WriteListBegin; - try - for I := 0 to FImageLists.Count - 1 do - AWriter.WriteImageList(TCustomImageList(FImageLists[I])); - finally - AWriter.WriteListEnd; - end; -end; - -procedure TdxReportCells.WriteLookAndFeels(AWriter: TdxPSDataWriter); -var - I: Integer; - LookAndFeel: TdxPSReportGroupLookAndFeel; -begin - AWriter.WriteListBegin; - try - for I := 0 to LookAndFeelCount - 1 do - begin - LookAndFeel := LookAndFeels[I]; - AWriter.WriteClassName(LookAndFeel); - LookAndFeel.WriteData(AWriter); - end; - finally - AWriter.WriteListEnd; - end; - - AWriter.WriteInteger(IndexOfReportGroupLookAndFeel(Self.LookAndFeel)); -end; - -procedure TdxReportCells.WriteOverlayCells(AWriter: TdxPSDataWriter); -var - I: Integer; -begin - AWriter.WriteListBegin; - try - for I := 0 to OverlayCount - 1 do - Overlays[I].WriteData(AWriter); - finally - AWriter.WriteListEnd; - end; -end; - -procedure TdxReportCells.WriteProperties(AWriter: TdxPSDataWriter); -begin - with AWriter do - begin - WriteInteger(BorderColor); - WriteInteger(BorderWidth); - WriteInteger(ExpandButtonBorderColor); - WriteInteger(GroupBorderColor); - WriteInteger(GroupCaptionColor); - WriteInteger(GroupCaptionSeparatorColor); - WriteInteger(GroupColor); - WriteInteger(ShadowColor); - WriteInteger(ShadowDepth); - WriteInteger(TreeLineColor); - WriteInteger(Integer(TreeLineStyle)); - end; -end; - -function TdxReportCells.CalculateOverlaysHeight: Integer; -var - I, V: Integer; -begin - Result := 0; - for I := 0 to OverlayCount - 1 do - begin - V := Overlays[I].GetAbsoluteRect.Bottom; - if Result < V then Result := V; - end; -end; - -function TdxReportCells.CalculateOverlaysWidth: Integer; -var - I, V: Integer; -begin - Result := 0; - for I := 0 to OverlayCount - 1 do - begin - V := Overlays[I].GetAbsoluteRect.Right; - if Result < V then Result := V; - end; -end; - -function TdxReportCells.CalculateTotalHeight: Integer; -var - V: Integer; -begin - Result := Cells.Height; - V := CalculateOverlaysHeight; - if Result < V then Result := V; -end; - -function TdxReportCells.CalculateTotalWidth: Integer; -var - V: Integer; -begin - Result := Cells.Width; - V := CalculateOverlaysWidth; - if Result < V then Result := V; -end; - -procedure TdxReportCells.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -var - I: Integer; -begin - Cells.ConvertCoords(APixelsNumerator, APixelsDenominator); - ShadowDepth := MulDiv(ShadowDepth, APixelsNumerator, APixelsDenominator); - - for I := 0 to LookAndFeelCount - 1 do - LookAndFeels[I].ConvertCoords(APixelsNumerator, APixelsDenominator); - - if AreFooterCellsAllocated then - FFooterCells.ConvertCoords(APixelsNumerator, APixelsDenominator); - if AreHeaderCellsAllocated then - HeaderCells.ConvertCoords(APixelsNumerator, APixelsDenominator); - - if HasOverlays then - for I := 0 to OverlayCount - 1 do - Overlays[I].ConvertCoords(APixelsNumerator, APixelsDenominator); -end; - -function TdxReportCells.GetCellTopLevelParent(AnItem: TdxReportItem): TdxReportCell; - - function IsParentInTopLevels(AnItem: TdxReportItem): Boolean; - var - I: Integer; - begin - Result := (AnItem = Cells) or - (AreHeaderCellsAllocated and (AnItem = HeaderCells)) or - (AreFooterCellsAllocated and (AnItem = FooterCells)); - - if not Result then - for I := 0 to OverlayCount - 1 do - begin - Result := AnItem = Overlays[I]; - if Result then Exit; - end; - end; - -begin - Result := AnItem.Parent; - if Result <> nil then - while (Result.Parent <> nil) and not IsParentInTopLevels(Result.Parent) do - Result := Result.Parent; -end; -procedure TdxReportCells.FreeAndNilReportGroupLookAndFeels; -begin - ClearLookAndFeels; - FreeAndNil(FLookAndFeels); -end; - -procedure TdxReportCells.PrepareReportGroupsLookAndFeels(DC: HDC); -var - I: Integer; -begin - for I := 0 to LookAndFeelCount - 1 do - LookAndFeels[I].Prepare(DC); -end; - -procedure TdxReportCells.AddImageList(AnImageList: TCustomImageList); -begin - if (AnImageList <> nil) and (FImageLists.IndexOf(AnImageList) = -1) then - FImageLists.Add(AnImageList); -end; - -procedure TdxReportCells.ClearImageLists; -var - I: Integer; -begin - if OwnImageLists then - for I := 0 to ImageListCount - 1 do - ImageLists[I].Free; - FImageLists.Clear; -end; - -procedure TdxReportCells.FreeAndNilImageLists; -begin - ClearImageLists; - FreeAndNil(FImageLists); -end; - -procedure TdxReportCells.GetImageLists; -begin - ReportLink.GetImageLists(AddImageList); -end; - -function TdxReportCells.IndexOfImageList(AnImageList: TCustomImageList): Integer; -begin - Result := FImageLists.IndexOf(AnImageList); -end; - -function TdxReportCells.GetAreFooterCellsAllocated: Boolean; -begin - Result := FFooterCells <> nil; -end; - -function TdxReportCells.GetAreHeaderCellsAllocated: Boolean; -begin - Result := FHeaderCells <> nil; -end; - -function TdxReportCells.GetBoundsRect: TRect; -begin - Result := Cells.BoundsRect; -end; - -function TdxReportCells.GetCount: Integer; -begin - Result := Cells.CellCount; -end; - -function TdxReportCells.GetFooterCells: TdxReportCell; -begin - if not AreFooterCellsAllocated then CreateFooterCells; - Result := FFooterCells; -end; - -function TdxReportCells.GetHeaderCells: TdxReportCell; -begin - if not AreHeaderCellsAllocated then CreateHeaderCells; - Result := FHeaderCells; -end; - -function TdxReportCells.GetImageList(Index: Integer): TCustomImageList; -begin - if Index = -1 then - Result := nil - else - Result := TCustomImageList(FImageLists[Index]); -end; - -function TdxReportCells.GetImageListCount: Integer; -begin - if FImageLists <> nil then - Result := FImageLists.Count - else - Result := 0; -end; - -function TdxReportCells.GetLookAndFeel(Index: Integer): TdxPSReportGroupLookAndFeel; -begin - Result := TdxPSReportGroupLookAndFeel(FLookAndFeels[Index]); -end; - -function TdxReportCells.GetLookAndFeelCount: Integer; -begin - Result := FLookAndFeels.Count; -end; - -function TdxReportCells.GetOverlay(Index: Integer): TdxReportCell; -begin - if HasOverlays then - Result := TdxReportCell(FOverlays[Index]) - else - Result := nil; -end; - -function TdxReportCells.GetOverlayCount: Integer; -begin - if HasOverlays then - Result := FOverlays.Count - else - Result := 0; -end; - -function TdxReportCells.GetRenderer: TdxPSReportRenderer; -begin - Result := ReportLink.Renderer; -end; - -procedure TdxReportCells.SetBorderColor(Value: TColor); -begin - if Value = clDefault then - FBorderColor := dxDefaultGridLineColor - else - FBorderColor := ColorToRGB(Value); -end; - -procedure TdxReportCells.SetShadowColor(Value: TColor); -begin - if Value = clDefault then - FShadowColor := dxDefaultShadowColor - else - FShadowColor := ColorToRGB(Value); -end; - -procedure TdxReportCells.SetShadowDepth(Value: Integer); -begin - if Value < 0 then Value := 0; - FShadowDepth := Value; -end; - -procedure TdxReportCells.SetTreeLineColor(Value: TColor); -begin - if Value = clDefault then - FTreeLineColor := dxDefaultTreeLineColor - else - FTreeLineColor := ColorToRGB(Value); -end; - -procedure TdxReportCells.CreateFooterCells; -begin - FFooterCells := TdxReportCell.Create(nil); - FFooterCells.FReportCells := Self; - FFooterCells.Color := dxDefaultFixedColor; -end; - -procedure TdxReportCells.CreateHeaderCells; -begin - FHeaderCells := TdxReportCell.Create(nil); - FHeaderCells.FReportCells := Self; - FHeaderCells.Color := dxDefaultFixedColor; -end; - -function TdxReportCells.GetFont: TFont; -begin - Result := Cells.Font; -end; - -function TdxReportCells.GetFooterBoundsRect: TRect; -begin - if AreFooterCellsAllocated then - Result := FFooterCells.BoundsRect - else - Result := NullRect; -end; - -function TdxReportCells.GetHeaderBoundsRect: TRect; -begin - if AreHeaderCellsAllocated then - Result := FHeaderCells.BoundsRect - else - Result := NullRect; -end; - -function TdxReportCells.GetFooterCellCount: Integer; -begin - if AreFooterCellsAllocated then - Result := FFooterCells.CellCount - else - Result := 0; -end; - -function TdxReportCells.GetHeaderCellCount: Integer; -begin - if AreHeaderCellsAllocated then - Result := FHeaderCells.CellCount - else - Result := 0; -end; - -{ TAbstractdxReportCellData } - -constructor TAbstractdxReportCellData.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - BreakByChars := dxDefaultBreakByChars; // True - EndEllipsis := dxDefaultEndEllipsis; // False - HidePrefix := dxDefaultHidePrefix; // False - Multiline := dxDefaultMultiline; // False - PreventLeftTextExceed := dxDefaultPreventLeftTextExceed; // True - PreventTopTextExceed := dxDefaultPreventTopTextExceed; // True - SortOrder := dxDefaultSortOrder; // csoNone - TextAlignX := dxDefaultTextAlignX; // taLeft - TextAlignY := dxDefaultTextAlignY; // taCenterY -end; - -procedure TAbstractdxReportCellData.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - if IsBackgroundBitmapDrawn then - DrawBackgroundBitmap(DC) - else - if IsBackgroundDrawn then - DrawBackground(DC); - - if IsBordersDrawn then DrawBorders(DC); -end; - -function TAbstractdxReportCellData.GetCustomDrawID: Integer; -begin - Result := Data; -end; - -function TAbstractdxReportCellData.MeasureContentHeight(DC: HDC): Integer; -begin - Result := Height; -end; - -function TAbstractdxReportCellData.MeasureContentWidth(DC: HDC): Integer; -begin - Result := Width; -end; - -function TAbstractdxReportCellData.CustomDraw(DC: HDC): Boolean; -begin - Result := IsCustomDrawn and Renderer.CustomDrawReportItem(Self); -end; - -function TAbstractdxReportCellData.GetAbsoluteEffectiveBounds(DC: HDC; AStage: TdxPSRenderStages): TRect; -begin - Result := GetEffectiveBounds(DC, AStage); - if Parent <> nil then - with Parent.AbsoluteOrigin do - OffsetRect(Result, X, Y); -end; - -function TAbstractdxReportCellData.GetDefaultDTFormat: DWORD; -begin - Result := CXTO_AUTOINDENTS or CXTO_EXPANDTABS or CXTO_PATTERNEDTEXT or CXTO_CHARBREAK or CXTO_EDITCONTROL; -end; - -function TAbstractdxReportCellData.GetEffectiveBounds(DC: HDC; AStage: TdxPSRenderStages): TRect; -begin - Result := GetOuterBounds(DC); -end; - -function TAbstractdxReportCellData.GetDTFormat: DWORD; -const - dxEndEllipsis: array[Boolean] of UINT = (0, CXTO_END_ELLIPSIS); - dxHidePrefix: array[Boolean] of UINT = (0, CXTO_HIDEPREFIX); - dxPreventLeftExceed: array[Boolean] of UINT = (0, CXTO_PREVENT_LEFT_EXCEED); - dxPreventTopExceed: array[Boolean] of UINT = (0, CXTO_PREVENT_TOP_EXCEED); - dxWordBreak: array[Boolean] of UINT = (CXTO_SINGLELINE, CXTO_WORDBREAK); -begin - Result := DefaultDTFormat or - cxMakeFormat(TextAlignX, TextAlignY) or - dxEndEllipsis[EndEllipsis] or - dxHidePrefix[HidePrefix] or - dxPreventLeftExceed[PreventLeftTextExceed] or - dxPreventTopExceed[PreventTopTextExceed] or - dxWordBreak[Multiline]; -end; - -function TAbstractdxReportCellData.IsCustomDrawn: Boolean; -begin - with GetReportCells do - Result := (ReportLink <> nil) and ReportLink.PossibleCustomDraw(Self); -end; - -function TAbstractdxReportCellData.IsDrawingNeeded(DC: HDC; AStage: TdxPSRenderStages; - const ARect: TRect): Boolean; -begin - Result := Visible and RectVisible(DC, GetEffectiveBounds(DC, AStage)) and IsDrawn(DC, AStage, ARect); -end; - -function TAbstractdxReportCellData.IsDrawn(DC: HDC; AStage: TdxPSRenderStages; - const ARect: TRect): Boolean; -var - R: TRect; -begin - Result := IntersectRect(R, GetAbsoluteEffectiveBounds(DC, AStage), ARect); -end; - -function TAbstractdxReportCellData.GetSortOrder: TdxCellSortOrder; -begin - Result := TdxCellSortOrder((Format and dxPSGlbl.dxFormatSortOrderMask) shr dxPSGlbl.dxFormatSortOrderOffset); -end; - -function TAbstractdxReportCellData.GetBreakByChars: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatBreakByChars); -end; - -function TAbstractdxReportCellData.GetEndEllipsis: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatEndEllipsis); -end; - -function TAbstractdxReportCellData.GetHidePrefix: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatHidePrefix); -end; - -function TAbstractdxReportCellData.GetMultiline: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatMultiline); -end; - -function TAbstractdxReportCellData.GetPreventLeftTextExceed: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatPreventLeftTextExceed); -end; - -function TAbstractdxReportCellData.GetPreventTopTextExceed: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatPreventTopTextExceed); -end; - -function TAbstractdxReportCellData.GetTextAlignX: TcxTextAlignX; -begin - Result := TcxTextAlignX((Format and dxPSGlbl.dxFormatTextAlignXMask) shr dxPSGlbl.dxFormatTextAlignXOffset); -end; - -function TAbstractdxReportCellData.GetTextAlignY: TcxTextAlignY; -begin - Result := TcxTextAlignY((Format and dxPSGlbl.dxFormatTextAlignYMask) shr dxPSGlbl.dxFormatTextAlignYOffset); -end; - -procedure TAbstractdxReportCellData.SetBreakByChars(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatBreakByChars, Value); -end; - -procedure TAbstractdxReportCellData.SetEndEllipsis(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatEndEllipsis, Value); -end; - -procedure TAbstractdxReportCellData.SetHidePrefix(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatHidePrefix, Value); -end; - -procedure TAbstractdxReportCellData.SetMultiline(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatMultiline, Value); -end; - -procedure TAbstractdxReportCellData.SetPreventLeftTextExceed(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatPreventLeftTextExceed, Value); -end; - -procedure TAbstractdxReportCellData.SetPreventTopTextExceed(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatPreventTopTextExceed, Value); -end; - -procedure TAbstractdxReportCellData.SetSortOrder(Value: TdxCellSortOrder); -begin - Format := Format and not dxPSGlbl.dxFormatSortOrderMask or (Byte(Value) shl dxPSGlbl.dxFormatSortOrderOffset); -end; - -procedure TAbstractdxReportCellData.SetTextAlignX(Value: TcxTextAlignX); -begin - Format := Format and not dxPSGlbl.dxFormatTextAlignXMask or (Byte(Value) shl dxPSGlbl.dxFormatTextAlignXOffset); -end; - -procedure TAbstractdxReportCellData.SetTextAlignY(Value: TcxTextAlignY); -begin - Format := Format and not dxPSGlbl.dxFormatTextAlignYMask or (Byte(Value) shl dxPSGlbl.dxFormatTextAlignYOffset); -end; - -{ TdxReportCellText } - -procedure TdxReportCellText.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TdxReportCellText then - begin - SetText(TdxReportCellText(Source).GetText); - Indent := TdxReportCellText(Source).Indent; - end; -end; - -procedure TdxReportCellText.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - - if IsBackgroundBitmapDrawn then - DrawBackgroundBitmap(DC) - else - if IsBackgroundDrawn then - DrawBackground(DC); - - if IsTextDrawn then DrawText(DC); - if IsSortMarkDrawn then DrawSortMark(DC); - if IsBordersDrawn then DrawBorders(DC); -end; - -procedure TdxReportCellText.DrawSortMark(DC: HDC); -var - R: TRect; -begin - R := GetSortMarkBounds(DC); - if not IsRectEmpty(R) then - Renderer.DrawSortMark(DC, R, SortOrder, EdgeMode = cemPattern); -end; - -procedure TdxReportCellText.DrawText(DC: HDC); -var - R: TRect; - F: TFont; - S: string; - - ASaveFont: HFONT; - ALimit: Integer; - ATextParams: TcxTextParams; - AFont: TFont; - - function ExceedBounds: Boolean; - var - TextBounds: TRect; - begin - TextBounds := R; - SelectObject(DC, F.Handle); - Windows.DrawText(DC, PChar(S), -1, TextBounds, DT_CALCRECT); - Result := (R.Right - R.Left) < (TextBounds.Right - TextBounds.Left); - end; - -begin - R := GetTextBounds(DC); - if not IsRectEmpty(R) then - begin - S := GetText; - AFont := GetFont; - ASaveFont := GetCurrentObject(DC, OBJ_FONT); - if Multiline or not AdjustFont then - Renderer.DrawTextEx(DC, R, 0, Indent, 0, S, AFont, DTFormat) - else - begin - SelectObject(DC, AFont.Handle); - ATextParams := cxCalcTextParams(DC, DTFormat); - if ATextParams.PatternedText then - Renderer.DrawTextEx(DC, R, 0, Indent, 0, S, AFont, DTFormat) - else - begin - F := TFont.Create; - try - F.Assign(AFont); - ALimit := MulDiv(F.Size, 2, 3); - while ExceedBounds and (F.Size > ALimit) do - F.Size := F.Size - 1; - SetTextColor(DC, ColorToRgb(AFont.Color)); - Windows.DrawText(DC, PChar(S), -1, R, 0); - finally - F.Free; - end; - end; - end; - SelectObject(DC, ASaveFont); - end; -end; - -function TdxReportCellText.CalculateLineCount(DC: HDC): Integer; -begin - Result := Renderer.CalcTextLineCount(DC, Text, Font, Width - Indent); -end; - -function TdxReportCellText.MeasureContentHeight(DC: HDC): Integer; -begin - Result := Renderer.CalcTextHeight(DC, Text, Multiline, Font, Width - Indent); - if (SortOrder <> csoNone) and (Result < dxSortMarkRgnSize) then - Result := dxSortMarkRgnSize; -end; - -function TdxReportCellText.MeasureContentWidth(DC: HDC): Integer; -begin - if Multiline then - Result := inherited MeasureContentWidth(DC) - else - Result := Renderer.CalcTextWidth(DC, Text, Font); - if SortOrder <> csoNone then - Inc(Result, dxSortMarkRgnSize); -end; - -function TdxReportCellText.MeasureFontHeight(DC: HDC): Integer; -begin - Result := Renderer.CalcTextPatternHeight(DC, Font); - if (SortOrder <> csoNone) and (Result < dxSortMarkRgnSize) then - Result := dxSortMarkRgnSize; - if Result <> 0 then - Inc(Result, MeasureBordersHeight(DC)); -end; - -function TdxReportCellText.GetSortMarkBounds(DC: HDC): TRect; -begin - Result := GetInnerBounds(DC); - Result.Left := Result.Right - MulDiv(dxSortMarkRgnSize, PixelsNumerator, PixelsDenominator); -end; - -function TdxReportCellText.GetTextBounds(DC: HDC): TRect; -begin - Result := GetInnerBounds(DC); - if IsSortMarkDrawn then - Result.Right := GetSortMarkBounds(DC).Left; -end; - -function TdxReportCellText.IsSortMarkDrawn: Boolean; -begin - Result := SortOrder <> csoNone; -end; - -function TdxReportCellText.IsTextDrawn: Boolean; -begin - Result := GetText <> ''; -end; - -procedure TdxReportCellText.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FIndent := AReader.ReadInteger; - Text := AReader.ReadString; -end; - -procedure TdxReportCellText.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteInteger(Integer(FIndent)); - AWriter.WriteString(Text) -end; - -function TdxReportCellText.GetAdjustFont: Boolean; -begin - Result := FIndent and dxFormatTextAdjustFont <> 0; -end; - -function TdxReportCellText.GetIndent: Integer; -begin - Result := FIndent and not dxFormatTextAdjustFont; -end; - -procedure TdxReportCellText.SetAdjustFont(Value: Boolean); -begin - Integer(FIndent) := Integer(FIndent) and not dxFormatTextAdjustFont; - if Value then - Integer(FIndent) := Integer(FIndent) or dxFormatTextAdjustFont; -end; - -procedure TdxReportCellText.SetIndent(Value: Integer); -begin - FIndent := (FIndent and dxFormatTextAdjustFont) or - (Cardinal(Value) and not dxFormatTextAdjustFont); -end; - -{ TdxReportCellString } - -function TdxReportCellString.GetText: string; -begin - Result := FText; -end; - -procedure TdxReportCellString.SetText(const Value: string); -begin - FText := Value; -end; - -{ TdxReportCellImageContainer } - -constructor TdxReportCellImageContainer.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - ImageTransparent := True; -end; - -procedure TdxReportCellImageContainer.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TdxReportCellImageContainer then - ImageTransparent := TdxReportCellImageContainer(Source).ImageTransparent; -end; - -procedure TdxReportCellImageContainer.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - if IsBackgroundBitmapDrawn then DrawBackgroundBitmap(DC); - if IsTextBackgroundDrawn then DrawTextBackground(DC); - if IsTextDrawn then DrawText(DC); - if IsImageBackgroundDrawn then DrawImageBackground(DC); - if IsImageDrawn then DrawImage(DC); - if IsSortMarkDrawn then DrawSortMark(DC); - if IsBordersDrawn then DrawBorders(DC); -end; - -procedure TdxReportCellImageContainer.DrawImage(DC: HDC); -begin -end; - -procedure TdxReportCellImageContainer.DrawImageBackground(DC: HDC); -begin - DrawBackgroundRect(DC, GetImageAreaBounds(DC)); -end; - -procedure TdxReportCellImageContainer.DrawTextBackground(DC: HDC); -var - R: TRect; -begin - R := GetTextBounds(DC); - if IsSortMarkDrawn then - R.Right := GetSortMarkBounds(DC).Right; - DrawBackgroundRect(DC, R); -end; - -function TdxReportCellImageContainer.GetImageAreaBounds(DC: HDC): TRect; -begin - Result := GetInnerBounds(DC); - if IsSortMarkDrawn then - Result.Right := GetSortMarkBounds(DC).Left; -end; - -function TdxReportCellImageContainer.GetImageBounds(DC: HDC): TRect; -begin - Result := dxPSGlbl.NullRect; -end; - -procedure TdxReportCellImageContainer.GetImageSizes(var AImageWidth, AImageHeight: Integer); -begin - AImageWidth := 0; - AImageHeight := 0; -end; - -function TdxReportCellImageContainer.HasImage: Boolean; -begin - Result := False; -end; - -function TdxReportCellImageContainer.IsImageBackgroundDrawn: Boolean; -begin - Result := inherited IsBackgroundDrawn and not IsImageDrawn and not IsBackgroundBitmapDrawn; -end; - -function TdxReportCellImageContainer.IsImageDrawn: Boolean; -begin - Result := HasImage; -end; - -function TdxReportCellImageContainer.IsTextBackgroundDrawn: Boolean; -begin - Result := not Transparent and not IsBackgroundBitmapDrawn; -end; - -function TdxReportCellImageContainer.GetImageTransparent: Boolean; -begin - Result := (Format and dxPSGlbl.dxFormatImageTransparent) = dxPSGlbl.dxFormatImageTransparent; -end; - -procedure TdxReportCellImageContainer.SetImageTransparent(Value: Boolean); -const - dxImageTransparent: array[Boolean] of DWORD = (0, dxPSGlbl.dxFormatImageTransparent); -begin - Format := Format and not dxPSGlbl.dxFormatImageTransparent or dxImageTransparent[Value]; -end; - -{ TdxReportCellCheck } - -constructor TdxCustomReportCellCheck.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - Checked := False; - //BorderColor := clWindowText; - ButtonEdgeStyle := cbesUltraFlat; - CheckPos := dxDefaultCheckPos; - Enabled := True; -end; - -procedure TdxCustomReportCellCheck.DrawCheck(DC: HDC); -var - R: TRect; -begin - R := GetCheckBounds(DC); - if RectVisible(DC, R) then - Renderer.DrawCheckBox(DC, R, Checked, Enabled, IsRadio, ButtonEdgeStyle, BorderColor); -end; - -procedure TdxCustomReportCellCheck.DrawImage(DC: HDC); -begin - DrawCheck(DC); -end; - -function TdxCustomReportCellCheck.MeasureContentHeight(DC: HDC): Integer; -var - TextHeight: Integer; -begin - Result := 1 + CheckHeight + 1; - TextHeight := inherited MeasureContentHeight(DC); - if Result < TextHeight then Result := TextHeight; -end; - -function TdxCustomReportCellCheck.MeasureContentWidth(DC: HDC): Integer; -begin - Result := 1 + CheckWidth + 1; - if CheckPos <> ccpCenter then - Inc(Result, inherited MeasureContentWidth(DC)); -end; - -function TdxCustomReportCellCheck.GetCheckBounds(DC: HDC): TRect; -var - W, H: Integer; -begin - Result := GetImageAreaBounds(DC); - if not IsRectEmpty(Result) then - begin - GetImageSizes(W, H); - with Result do - begin - Inc(Left, (Right - Left - W) div 2); - Inc(Top, (Bottom - Top - H) div 2); - Right := Left + W; - Bottom := Top + H; - end; - FixupRect(DC, Result); - end; -end; - -function TdxCustomReportCellCheck.GetImageAreaBounds(DC: HDC): TRect; -var - W, H: Integer; -begin - GetImageSizes(W, H); - if (W <> 0) and (H <> 0) then - begin - Result := inherited GetImageAreaBounds(DC); - with Result do - case CheckPos of - ccpLeft: - Right := Left + W + 2 * Renderer.UnitsPerPixel; - ccpRight: - Left := Right - (W + 2 * Renderer.UnitsPerPixel); - end; - end - else - Result := dxPSGlbl.NullRect; -end; - -function TdxCustomReportCellCheck.GetImageBounds(DC: HDC): TRect; -begin - Result := GetCheckBounds(DC); -end; - -procedure TdxCustomReportCellCheck.GetImageSizes(var AImageWidth, AImageHeight: Integer); -begin - AImageWidth := MulDiv(dxPSGlbl.CheckWidth, PixelsNumerator, PixelsDenominator); - AImageHeight := MulDiv(dxPSGlbl.CheckHeight, PixelsNumerator, PixelsDenominator); -end; - -function TdxCustomReportCellCheck.GetTextBounds(DC: HDC): TRect; -begin - if CheckPos <> ccpCenter then - begin - Result := inherited GetTextBounds(DC); - case CheckPos of - ccpLeft: - Result.Left := GetImageAreaBounds(DC).Right; - ccpRight: - Result.Right := GetImageAreaBounds(DC).Left; - end; - end - else - Result := dxPSGlbl.NullRect; -end; - -function TdxCustomReportCellCheck.HasImage: Boolean; -begin - Result := True; -end; - -function TdxCustomReportCellCheck.IsImageBackgroundDrawn: Boolean; -begin - Result := not Transparent and not IsBackgroundBitmapDrawn; -end; - -class function TdxCustomReportCellCheck.IsRadio: Boolean; -begin - Result := False; -end; - -procedure TdxCustomReportCellCheck.SetChecked(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatCheckChecked, Value); -end; - -function TdxCustomReportCellCheck.GetState: TCheckBoxState; -begin - if Enabled then - if Checked then - Result := cbChecked - else - Result := cbUnchecked - else - Result := cbGrayed; -end; - -function TdxCustomReportCellCheck.GetBoldBorder: Boolean; -begin - Result := ButtonEdgeStyle = cbesBoldFlat; -end; - -function TdxCustomReportCellCheck.GetButtonEdgeStyle: TdxCheckButtonEdgeStyle; -begin - Result := TdxCheckButtonEdgeStyle((Format and dxPSGlbl.dxFormatCheckButtonEdgeStyleMask) shr dxPSGlbl.dxFormatCheckButtonEdgeStyleOffset); -end; - -function TdxCustomReportCellCheck.GetChecked: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatCheckChecked); -end; - -function TdxCustomReportCellCheck.GetCheckPos: TdxCellCheckPos; -begin - Result := TdxCellCheckPos((Format and dxPSGlbl.dxFormatCheckPosMask) shr dxPSGlbl.dxFormatCheckPosOffset); -end; - -function TdxCustomReportCellCheck.GetEnabled: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatCheckEnabled); -end; - -function TdxCustomReportCellCheck.GetFlatBorder: Boolean; -begin - Result := ButtonEdgeStyle = cbesUltraFlat; -end; - -procedure TdxCustomReportCellCheck.SetBoldBorder(Value: Boolean); -begin - if Value then - ButtonEdgeStyle := cbesBoldFlat; -end; - -procedure TdxCustomReportCellCheck.SetButtonEdgeStyle(Value: TdxCheckButtonEdgeStyle); -begin - Format := Format and not dxPSGlbl.dxFormatCheckButtonEdgeStyleMask or (Byte(Value) shl dxPSGlbl.dxFormatCheckButtonEdgeStyleOffset); -end; - -procedure TdxCustomReportCellCheck.SetCheckPos(Value: TdxCellCheckPos); -begin - if Value = ccpCenter then - SetText(''); - Format := Format and not dxPSGlbl.dxFormatCheckPosMask or (Byte(Value) shl dxPSGlbl.dxFormatCheckPosOffset); -end; - -procedure TdxCustomReportCellCheck.SetEnabled(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatCheckEnabled, Value); -end; - -procedure TdxCustomReportCellCheck.SetFlatBorder(Value: Boolean); -begin - if Value then - ButtonEdgeStyle := cbesUltraFlat - else - ButtonEdgeStyle := cbes3D; -end; - -{ TdxCustomReportCellRadio } - -class function TdxCustomReportCellRadio.IsRadio: Boolean; -begin - Result := True; -end; - -{ TdxCustomReportCellCheckImage } - -constructor TdxCustomReportCellCheckImage.Create(AParent: TdxReportCell); -begin - inherited; - GlyphCount := 1; -end; - -destructor TdxCustomReportCellCheckImage.Destroy; -begin - ReleaseGlyph; - inherited; -end; - -procedure TdxCustomReportCellCheckImage.Assign(Source: TPersistent); -begin - if Source is TdxCustomReportCellCheckImage then - with TdxCustomReportCellCheckImage(Source) do - begin - Self.GlyphCount := GlyphCount; - if HasGlyph then - Self.SetGlyph(Glyph) - else - Self.ReleaseGlyph; - end; - inherited; -end; - -procedure TdxCustomReportCellCheckImage.DrawCheck(DC: HDC); -begin - if HasGlyph and not Glyph.Empty and (GlyphCount <> 0) then - DrawCheckGlyph(DC) - else - inherited; -end; - -procedure TdxCustomReportCellCheckImage.DrawCheckGlyph(DC: HDC); -var - R: TRect; -begin - if HasGlyph and (GlyphCount <> 0) then - begin - R := GlyphPartialBounds; - OffsetRect(R, -R.Left, -R.Top); - //R := Rect(0, 0, Glyph.Height, Glyph.Height); {3.1} - with Renderer.FCheckBitmap do - begin - Height := R.Bottom - R.Top; - Width := R.Right - R.Left; - Canvas.Brush.Color := clWhite; - Canvas.FillRect(R); - Canvas.CopyRect(R, Glyph.Canvas, GlyphPartialBounds); - end; - Renderer.CachedGraphicInfo.Clear; - Renderer.DrawGraphicEx(DC, GetCheckBounds(DC), GetImageAreaBounds(DC), nil, 0, - Renderer.FCheckBitmap, True, True, Color, ContentBkColor, ContentPattern, cibAlways); - end; -end; - -procedure TdxCustomReportCellCheckImage.GetImageSizes(var AImageWidth, AImageHeight: Integer); -begin - if HasGlyph and not Glyph.Empty and (GlyphCount <> 0) then - begin - AImageWidth := MulDiv(Glyph.Width div GlyphCount, PixelsNumerator, PixelsDenominator); - AImageHeight := MulDiv(Glyph.Height, PixelsNumerator, PixelsDenominator); - end - else - inherited; -end; - -function TdxCustomReportCellCheckImage.GetGlyph: TBitmap; -begin - Result := nil; -end; - -function TdxCustomReportCellCheckImage.GetGlyphCount: Integer; -begin - Result := 1; -end; - -function TdxCustomReportCellCheckImage.GetGlyphIndex: Integer; -//cbUnchecked, cbChecked, cbGrayed -const - GlyphIndexes: array[TCheckBoxState] of Integer = (0, 1, 2); -begin - Result := GlyphIndexes[State]; - if (State = cbGrayed) and (GlyphCount < 3) then - Result := 0; - if Result > GlyphCount - 1 then - Result := GlyphCount - 1; -end; - -procedure TdxCustomReportCellCheckImage.SetGlyph(Value: TBitmap); -begin -end; - -procedure TdxCustomReportCellCheckImage.SetGlyphCount(Value: Integer); -begin -end; - -function TdxCustomReportCellCheckImage.HasGlyph: Boolean; -begin - Result := False; -end; - -procedure TdxCustomReportCellCheckImage.ReleaseGlyph; -begin -end; - -procedure TdxCustomReportCellCheckImage.ReadData(AReader: TdxPSDataReader); -begin - inherited; - if AReader.ReadBoolean then AReader.ReadImage(Glyph); -end; - -procedure TdxCustomReportCellCheckImage.WriteData(AWriter: TdxPSDataWriter); -begin - inherited; - AWriter.WriteBoolean(HasGlyph); - if HasGlyph then AWriter.WriteImage(Glyph); -end; - -function TdxCustomReportCellCheckImage.GetGlyphPartialBounds: TRect; -var - AWidth: Integer; -begin - if HasGlyph and (GlyphCount <> 0) then - if GlyphCount = 1 then - Result := MakeBounds(0, 0, Glyph.Width, Glyph.Height) - else - begin - AWidth := Glyph.Width div GlyphCount; - Result := MakeBounds(AWidth * GlyphIndex, 0, AWidth, Glyph.Height); - end - else - Result := dxPSGlbl.NullRect; -end; - -{ TdxReportCellCheckImage } - -function TdxReportCellCheckImage.GetGlyph: TBitmap; -begin - if FGlyph = nil then - FGlyph := TBitmap.Create; - Result := FGlyph; -end; - -function TdxReportCellCheckImage.GetGlyphCount: Integer; -begin - Result := (Format and dxPSGlbl.dxFormatCheckGlyphCountMask) shr dxPSGlbl.dxFormatCheckGlyphCountOffset; -end; - -procedure TdxReportCellCheckImage.SetGlyph(Value: TBitmap); -begin - if Value = nil then - ReleaseGlyph - else - Glyph.Assign(Value); -end; - -procedure TdxReportCellCheckImage.SetGlyphCount(Value: Integer); -begin -// if Value < 1 then {3.1} -// Value := 1; - if Value < 0 then Value := 0; - if Value > MaxGlyphCount then - Value := MaxGlyphCount; - - Format := Format and not dxPSGlbl.dxFormatCheckGlyphCountMask or (DWORD(Value) shl dxPSGlbl.dxFormatCheckGlyphCountOffset); -end; - -function TdxReportCellCheckImage.HasGlyph: Boolean; -begin - Result := FGlyph <> nil; -end; - -procedure TdxReportCellCheckImage.ReleaseGlyph; -begin - FreeAndNil(FGlyph); -end; - -{ TdxCustomReportButtonGroup } - -constructor TdxCustomReportButtonGroup.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - FColumnCount := 1; - FInterColumnsMinSpace := dxRadioGroupInterColumnsMinSpace; - FInterRowsMinSpace := dxRadioGroupInterRowsMinSpace; - FIndents := MakeRect(dxRadioGroupBoundsIndent, dxRadioGroupBoundsIndent, dxRadioGroupBoundsIndent, dxRadioGroupBoundsIndent); - ShowCaption := False; -end; - -procedure TdxCustomReportButtonGroup.Assign(Source: TPersistent); -begin - if Source is TdxCustomReportButtonGroup then - with TdxCustomReportButtonGroup(Source) do - begin - Self.ColumnCount := ColumnCount; - Self.InterColumnsMinSpace := InterColumnsMinSpace; - Self.InterRowsMinSpace := InterRowsMinSpace; - Self.Indents := Indents; - end; - inherited; -end; - -procedure TdxCustomReportButtonGroup.AdjustContent(DC: HDC); -type - TViewInfo = record - ColumnWidth: Integer; - ItemsArea: TRect; - RowHeight: Integer; - end; - -var - ViewInfo: TViewInfo; - - procedure CalcItemSizes; - var - I, Value: Integer; - begin - FItemSize.cX := 0; - for I := 0 to ItemCount - 1 do - begin - Value := Items[I].MeasureContentWidth(DC); - if FItemSize.cX < Value then FItemSize.cX := Value; - end; - // todo: 4 - difference between PS and cxRadioGroup AB9777 - FItemSize.cY := Items[0].MeasureContentHeight(DC) - 4; - end; - - procedure CalcViewInfo; - begin - FillChar(ViewInfo, SizeOf(TViewInfo), 0); - with ViewInfo do - begin - ItemsArea := BoundsRect; - OffsetRect(ItemsArea, -ItemsArea.Left, -ItemsArea.Top); - if ShowCaption then - ItemsArea := GetInnerBoundsRelativeTo(DC, ItemsArea); - - Inc(ItemsArea.Left, Indents.Left); - if ShowCaption then - Dec(ItemsArea.Top, Indents.Top) - else - Inc(ItemsArea.Top, Indents.Top); - Dec(ItemsArea.Right, Indents.Right); - Dec(ItemsArea.Bottom, Indents.Bottom); - - if not IsRectEmpty(ItemsArea) then - begin - ColumnWidth := (ItemsArea.Right - ItemsArea.Left) div ColumnCount; - if ColumnWidth < ItemSize.cX + InterColumnsMinSpace then - ColumnWidth := ItemSize.cX + InterColumnsMinSpace; - - RowHeight := (ItemsArea.Bottom - ItemsArea.Top) div RowCount; - if RowHeight < ItemSize.cY then - RowHeight := ItemSize.cY; -{ if (RowCount > 1) and (RowHeight < ItemSize.cY + (1 * RowCount) + InterRowsMinSpace) then - RowHeight := ItemSize.cY - (1 * RowCount) + InterRowsMinSpace;} - end; - end; - end; - - function GetColumnRect(AnIndex: Integer): TRect; - begin - with ViewInfo do - begin - Result := ItemsArea; - Result.Right := Result.Left + ColumnWidth; - OffsetRect(Result, AnIndex * ColumnWidth, 0); - end; - end; - - function GetRowRect(AnIndex: Integer): TRect; - begin - with ViewInfo do - begin - Result := ItemsArea; - Result.Bottom := Result.Top + RowHeight; - OffsetRect(Result, 0, AnIndex * RowHeight); - end; - end; - - function GetItemBounds(AnIndex: Integer): TRect; - var - Delta: Integer; - begin - with GetColumnRect(ItemColumns[AnIndex]) do - begin - Result.Left := Left; - Result.Right := Right; - end; - with GetRowRect(ItemRows[AnIndex]) do - begin - Result.Top := Top; - Result.Bottom := Bottom; - end; - - Delta := (Result.Bottom - Result.Top - ItemSize.cY) div 2; - InflateRect(Result, 0, -Delta); - end; - - procedure CheckItemVisibility(AnItem: TdxReportVisualItem); - var - R: TRect; - begin - AnItem.Visible := IntersectRect(R, AnItem.BoundsRect, ViewInfo.ItemsArea); - end; - -var - I, J, Index: Integer; - Item: TdxCustomReportCellCheck; -begin - if ItemCount <> 0 then - begin - CalcItemSizes; - CalcViewInfo; - if not IsRectEmpty(ViewInfo.ItemsArea) then - for I := 0 to ColumnCount - 1 do - for J := 0 to RowCount - 1 do - begin - Index := I * RowCount + J; - if Index > ItemCount - 1 then Break; - - Item := Items[Index]; - Item.BoundsRect := GetItemBounds(Index); - CheckItemVisibility(Item); - end; - end; -end; - -function TdxCustomReportButtonGroup.MeasureContentHeight(DC: HDC): Integer; -begin - Result := RowCount * (ItemSize.cY + InterRowsMinSpace) - InterRowsMinSpace; - Inc(Result, Indents.Top + Indents.Bottom); - if RowCount <> 0 then - Inc(Result, 2 * cxDrawTextUtils.cxTextSpace); -end; - -function TdxCustomReportButtonGroup.MeasureContentWidth(DC: HDC): Integer; -begin - Result := ColumnCount * (ItemSize.cX + InterColumnsMinSpace) - InterColumnsMinSpace; - Inc(Result, Indents.Left + Indents.Right); -end; - -function TdxCustomReportButtonGroup.Add(const AText: string = ''): TdxCustomReportCellCheck; -begin - Result := GetItemClass.Create(Self); - Result.Text := AText; - Result.BoundsRect := MakeRect(0, 0, -1, 0); - InitializeItem(Result); -end; - -procedure TdxCustomReportButtonGroup.Clear; -begin - ClearDataItems; -end; - -procedure TdxCustomReportButtonGroup.Delete(Index: Integer); -begin - DeleteDataItem(Index); -end; - -function TdxCustomReportButtonGroup.FindItem(const ACaption: string): Integer; -begin - for Result := 0 to ItemCount - 1 do - if Items[Result].Text = ACaption then Exit; - Result := -1; -end; - -procedure TdxCustomReportButtonGroup.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -var - R: TRect; -begin - inherited; - R := Indents; - with R do - begin - Left := MulDiv(Left, APixelsNumerator, APixelsDenominator); - Right := MulDiv(Right, APixelsNumerator, APixelsDenominator); - Top := MulDiv(Top, APixelsNumerator, APixelsDenominator); - Bottom := MulDiv(Bottom, APixelsNumerator, APixelsDenominator); - end; - Indents := R; - - InterColumnsMinSpace := MulDiv(InterColumnsMinSpace, APixelsNumerator, APixelsDenominator); - InterRowsMinSpace := MulDiv(InterRowsMinSpace, APixelsNumerator, APixelsDenominator); -end; - -procedure TdxCustomReportButtonGroup.SetFontIndex(Value: Integer); -var - I: Integer; -begin - inherited; - for I := 0 to ItemCount - 1 do - Items[I].FontIndex := Value; -end; - -procedure TdxCustomReportButtonGroup.ReadDataItems(AReader: TdxPSDataReader); -begin - FLocked := True; - try - inherited; - finally - FLocked := False; - end; -end; - -procedure TdxCustomReportButtonGroup.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - ColumnCount := AReader.ReadInteger; - InterColumnsMinSpace := AReader.ReadInteger; - InterRowsMinSpace := AReader.ReadInteger; - Indents := AReader.ReadRect; -end; - -procedure TdxCustomReportButtonGroup.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteInteger(ColumnCount); - AWriter.WriteInteger(InterColumnsMinSpace); - AWriter.WriteInteger(InterRowsMinSpace); - AWriter.WriteRect(Indents); -end; - -class function TdxCustomReportButtonGroup.GetItemClass: TdxCustomReportCellCheckClass; -begin - Result := TdxCustomReportCellCheck; -end; - -procedure TdxCustomReportButtonGroup.InitializeItem(AnItem: TdxCustomReportCellCheck); -begin - AnItem.ButtonEdgeStyle := ButtonEdgeStyle; - AnItem.CellSides := []; - AnItem.CheckPos := CheckPos; - AnItem.Color := Color; - AnItem.FontIndex := FontIndex; - AnItem.TextAlignY := taCenterY; - AnItem.Transparent := True; -end; - -function TdxCustomReportButtonGroup.GetButtonEdgeStyle: TdxCheckButtonEdgeStyle; -begin - Result := TdxCheckButtonEdgeStyle((Format and dxPSGlbl.dxFormatCheckButtonEdgeStyleMask) shr dxPSGlbl.dxFormatCheckButtonEdgeStyleOffset); -end; - -function TdxCustomReportButtonGroup.GetCheckPos: TdxCellCheckPos; -begin - Result := TdxCellCheckPos((Format and dxPSGlbl.dxFormatCheckPosMask) shr dxPSGlbl.dxFormatCheckPosOffset); -end; - -function TdxCustomReportButtonGroup.GetItem(Index: Integer): TdxCustomReportCellCheck; -begin - Result := DataItems[Index] as TdxCustomReportCellCheck; -end; - -function TdxCustomReportButtonGroup.GetItemColumn(Index: Integer): Integer; -begin - Result := Index div RowCount; -end; - -function TdxCustomReportButtonGroup.GetItemCount: Integer; -begin - Result := DataItemCount; -end; - -function TdxCustomReportButtonGroup.GetItemRow(Index: Integer): Integer; -begin - Result := Index mod RowCount; -end; - -function TdxCustomReportButtonGroup.GetRowCount: Integer; -begin - Result := ItemCount div ColumnCount; - if (ItemCount <> 0) and (ItemCount mod ColumnCount <> 0) then - Inc(Result); -end; - -procedure TdxCustomReportButtonGroup.SetButtonEdgeStyle(Value: TdxCheckButtonEdgeStyle); -var - I: Integer; -begin - Format := Format and not dxPSGlbl.dxFormatCheckButtonEdgeStyleMask or (Byte(Value) shl dxPSGlbl.dxFormatCheckButtonEdgeStyleOffset); - - for I := 0 to ItemCount - 1 do - Items[I].ButtonEdgeStyle := Value; -end; - -procedure TdxCustomReportButtonGroup.SetCheckPos(Value: TdxCellCheckPos); -var - I: Integer; -begin - Format := Format and not dxPSGlbl.dxFormatCheckPosMask or (Byte(Value) shl dxPSGlbl.dxFormatCheckPosOffset); - - if Value = ccpCenter then - for I := 0 to ItemCount - 1 do - Items[I].Text := '' -end; - -procedure TdxCustomReportButtonGroup.SetColumnCount(Value: Integer); -begin - if Value < 1 then Value := 1; - FColumnCount := Value; -end; - -procedure TdxCustomReportButtonGroup.SetInterColumnsMinSpace(Value: Integer); -begin - if Value < 0 then Value := 0; - FInterColumnsMinSpace := Value; -end; - -procedure TdxCustomReportButtonGroup.SetInterRowsMinSpace(Value: Integer); -begin - if Value < 0 then Value := 0; - FInterRowsMinSpace := Value; -end; - -procedure TdxCustomReportButtonGroup.SetIndents(Value: TRect); -begin - with Value do - begin - if Left < 0 then Left := 0; - if Top < 0 then Top := 0; - if Right < 0 then Right := 0; - if Bottom < 0 then Bottom := 0; - end; - FIndents := Value; -end; - -{ TdxReportCellRadioGroupButton } - -type - TdxReportCellRadioGroupButton = class(TdxCustomReportCellRadio) - private - function GetParent: TdxReportRadioGroup; - protected - procedure SetChecked(Value: Boolean); override; - public - property Checked write SetChecked; - property Enabled; - property Parent: TdxReportRadioGroup read GetParent; - end; - - // for backward compatibility with saved reports - TdxReportCellGroupButton = class(TdxReportCellRadioGroupButton); - -function TdxReportCellRadioGroupButton.GetParent: TdxReportRadioGroup; -begin - Result := inherited Parent as TdxReportRadioGroup; -end; - -procedure TdxReportCellRadioGroupButton.SetChecked(Value: Boolean); -begin - inherited SetChecked(Value); - if Value then - Parent.ItemIndex := Index - else - Parent.ItemIndex := -1; -end; - -{ TdxReportRadioGroup } - -function TdxReportRadioGroup.Add(const AText: string = ''): TdxCustomReportCellRadio; -begin - Result := inherited Add(AText) as TdxCustomReportCellRadio; -end; - -class function TdxReportRadioGroup.GetItemClass: TdxCustomReportCellCheckClass; -begin - Result := TdxReportCellRadioGroupButton; -end; - -function TdxReportRadioGroup.GetItem(Index: Integer): TdxCustomReportCellRadio; -begin - Result := inherited Items[Index] as TdxCustomReportCellRadio; -end; - -function TdxReportRadioGroup.GetItemIndex: Integer; -begin - for Result := 0 to ItemCount - 1 do - if Items[Result].Checked then Exit; - Result := -1; -end; - -procedure TdxReportRadioGroup.SetItemIndex(Value: Integer); -var - AnItemIndex: Integer; -begin - if Locked then Exit; - - if Value < -1 then - Value := -1; - if Value > ItemCount - 1 then - Value := ItemCount - 1; - - AnItemIndex := ItemIndex; - if AnItemIndex <> Value then - begin - Locked := True; - try - if AnItemIndex <> -1 then - Items[AnItemIndex].Checked := False; - if Value <> -1 then - Items[Value].Checked := True; - finally - Locked := False; - end; - end; -end; - -{ TdxReportCellCheckGroupButton } - -type - TdxReportCellCheckGroupButton = class(TdxCustomReportCellCheckImage) - private - function GetParent: TdxReportCheckGroup; - protected - function GetGlyph: TBitmap; override; - function GetGlyphCount: Integer; override; - function HasGlyph: Boolean; override; - public - property Parent: TdxReportCheckGroup read GetParent; - end; - -{ TdxReportCellCheckGroupButton } - -function TdxReportCellCheckGroupButton.GetGlyph: TBitmap; -begin - if Parent <> nil then - Result := Parent.Glyph - else - Result := inherited GetGlyph; -end; - -function TdxReportCellCheckGroupButton.GetGlyphCount: Integer; -begin - if Parent <> nil then - Result := Parent.GlyphCount - else - Result := inherited GetGlyphCount; -end; - -function TdxReportCellCheckGroupButton.HasGlyph: Boolean; -begin - Result := (Parent <> nil) and Parent.HasGlyph; -end; - -function TdxReportCellCheckGroupButton.GetParent: TdxReportCheckGroup; -begin - Result := inherited Parent as TdxReportCheckGroup; -end; - -{ TdxReportCheckGroup } - -constructor TdxReportCheckGroup.Create(AParent: TdxReportCell); -begin - inherited; - GlyphCount := 1; -end; - -destructor TdxReportCheckGroup.Destroy; -begin - ReleaseGlyph; - inherited; -end; - -procedure TdxReportCheckGroup.Assign(Source: TPersistent); -begin - if Source is TdxReportCheckGroup then - with TdxReportCheckGroup(Source) do - begin - if HasGlyph then - Self.Glyph := Glyph - else - Self.ReleaseGlyph; - Self.GlyphCount := GlyphCount; - end; -end; - -function TdxReportCheckGroup.Add(const AText: string = ''): TdxCustomReportCellCheckImage; -begin - Result := inherited Add(AText) as TdxCustomReportCellCheckImage; -end; - -function TdxReportCheckGroup.HasGlyph: Boolean; -begin - Result := FGlyph <> nil;//) and not FGlyph.Empty; -end; - -procedure TdxReportCheckGroup.ReleaseGlyph; -begin - FreeAndNil(FGlyph); -end; - -procedure TdxReportCheckGroup.ReadData(AReader: TdxPSDataReader); -begin - inherited; - GlyphCount := AReader.ReadInteger; - if AReader.ReadBoolean then AReader.ReadImage(Glyph); -end; - -procedure TdxReportCheckGroup.WriteData(AWriter: TdxPSDataWriter); -begin - inherited; - AWriter.WriteInteger(GlyphCount); - AWriter.WriteBoolean(HasGlyph); - if HasGlyph then AWriter.WriteImage(Glyph); -end; - -class function TdxReportCheckGroup.GetItemClass: TdxCustomReportCellCheckClass; -begin - Result := TdxReportCellCheckGroupButton; -end; - -procedure TdxReportCheckGroup.InitializeItem(AnItem: TdxCustomReportCellCheck); -begin - inherited; -end; - -function TdxReportCheckGroup.GetGlyph: TBitmap; -begin - if FGlyph = nil then - FGlyph := TBitmap.Create; - Result := FGlyph; -end; - -function TdxReportCheckGroup.GetItem(Index: Integer): TdxCustomReportCellCheckImage; -begin - Result := inherited Items[Index] as TdxCustomReportCellCheckImage; -end; - -function TdxReportCheckGroup.GetItemChecked(Index: Integer): Boolean; -begin - Result := Items[Index].Checked; -end; - -function TdxReportCheckGroup.GetItemEnabled(Index: Integer): Boolean; -begin - Result := Items[Index].Enabled; -end; - -function TdxReportCheckGroup.GetItemState(Index: Integer): TCheckBoxState; -begin - Result := Items[Index].State; -end; - -procedure TdxReportCheckGroup.SetGlyph(Value: TBitmap); -begin - Glyph.Assign(Value); -end; - -procedure TdxReportCheckGroup.SetGlyphCount(Value: Integer); -begin - if Value < 0 then Value := 0; {3.1 1 -> 0} - if Value > MaxGlyphCount then Value := MaxGlyphCount; - FGlyphCount := Value; -end; - -procedure TdxReportCheckGroup.SetItemChecked(Index: Integer; Value: Boolean); -begin - Items[Index].Checked := Value; -end; - -procedure TdxReportCheckGroup.SetItemEnabled(Index: Integer; Value: Boolean); -begin - Items[Index].Enabled := Value; -end; - -{ TCustomdxReportCellImageContainer } - -constructor TCustomdxReportCellImageContainer.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - ImageIndex := -1; - ImageTransparent := True; - OverlayImageIndex := -1; -end; - -destructor TCustomdxReportCellImageContainer.Destroy; -begin - FreeAndNil(FImage); - inherited Destroy; -end; - -procedure TCustomdxReportCellImageContainer.Assign(Source: TPersistent); -begin - inherited; - if Source is TCustomdxReportCellImageContainer then - with TCustomdxReportCellImageContainer(Source) do - begin - Self.SetImage(FImage); - Self.ImageTransparent := ImageTransparent; - Self.ImageIndex := ImageIndex; - Self.ImageList := ImageList; - end; -end; - -function TCustomdxReportCellImageContainer.CreateImage(AGraphicClass: TGraphicClass): TGraphic; -begin - if (FImage = nil) or (FImage.ClassType <> AGraphicClass) then - begin - FreeAndNil(FImage); - FImage := dxPSUtl.CreateGraphic(AGraphicClass); - end; - Result := FImage; -end; - -procedure TCustomdxReportCellImageContainer.DrawImage(DC: HDC); -begin - Renderer.CachedGraphicInfo.Clear; - if FImage = nil then - PrepareImage; - Renderer.DrawGraphicEx(DC, GetImageBounds(DC), GetImageAreaBounds(DC), ImageList, - ImageIndex, FImage, ImageTransparent, IsBackgroundBitmapDrawn or Transparent, - Color, ContentBkColor, ContentPattern, ActualImageBuffering); - if (ImageList <> nil) and (OverlayImageIndex <> -1) then - Renderer.DrawGraphicEx(DC, GetImageBounds(DC), GetImageAreaBounds(DC), ImageList, - OverlayImageIndex, nil, True, True, clNone, clNone, ContentPattern, ActualImageBuffering); -end; - -function TCustomdxReportCellImageContainer.GetActualImageBuffering: TdxCellImageActualBuffering; -begin - Result := ImageBuffering; - if Result = cibDefault then - if (ReportCells <> nil) and (ReportCells.ReportLink <> nil) then - if ReportCells.ReportLink.AlwaysBufferedGraphics then - Result := cibAlways - else - Result := cibNone - else - Result := cibAlways; -end; - -function TCustomdxReportCellImageContainer.GetImageBuffering: TdxCellImageBuffering; -begin - Result := cibDefault; -end; - -procedure TCustomdxReportCellImageContainer.GetImageSizes(var AImageWidth, AImageHeight: Integer); -begin - if ImageList <> nil then - begin - AImageWidth := MulDiv(ImageList.Width, PixelsNumerator, PixelsDenominator); - AImageHeight := MulDiv(ImageList.Height, PixelsNumerator, PixelsDenominator); - end - else - if FImage <> nil then - begin - AImageWidth := MulDiv(Image.Width, PixelsNumerator, PixelsDenominator); - AImageHeight := MulDiv(Image.Height, PixelsNumerator, PixelsDenominator); - end - else - inherited; -end; - -function TCustomdxReportCellImageContainer.HasImage: Boolean; -begin - Result := ((FImage <> nil) and not Image.Empty) or - ((ImageList <> nil) and (ImageIndex > -1) and (ImageIndex < ImageList.Count)); -end; - -procedure TCustomdxReportCellImageContainer.PrepareImage; -var - ABitmap: TBitmap; -begin - if (ImageList = nil) or (ImageIndex < 0) or (TcxImageList.GetPixelFormat(ImageList.Handle) < 32) or - not (IsTextBackgroundDrawn or IsImageBackgroundDrawn or FDontPrintTransparentImages) then Exit; - ABitmap := cxCreateBitmap(ImageList.Width, ImageList.Height, pf24Bit); - Renderer.FillRectEx(ABitmap.Canvas.Handle, Rect(0, 0, ABitmap.Width, - ABitmap.Height), Color, ContentBkColor, ContentPattern); - ImageList.Draw(ABitmap.Canvas, 0, 0, ImageIndex); - ImageList.Draw(ABitmap.Canvas, 0, 0, OverlayImageIndex); - FImage := ABitmap; - ImageList := nil; - ImageIndex := -1; -end; - -procedure TCustomdxReportCellImageContainer.SetImageBuffering(Value: TdxCellImageBuffering); -begin -end; - -function TCustomdxReportCellImageContainer.GetImageListIndex: Integer; -begin - Result := ReportCells.IndexOfImageList(ImageList); -end; - -procedure TCustomdxReportCellImageContainer.ReadData(AReader: TdxPSDataReader); -var - SourceType, BytesToSkip: Integer; - GraphicClass: TGraphicClass; -begin - inherited ReadData(AReader); - - if AReader.ReadBoolean then // HasImage - begin - SourceType := AReader.ReadInteger; - case SourceType of - imstImageList: - begin - ImageList := ReportCells.ImageLists[AReader.ReadInteger]; - ImageIndex := AReader.ReadInteger; - end; - - {imstShellLargeImageList: - begin - ImageList := dxPSUtl.ShellLargeImages; - ImageIndex := AReader.ReadInteger; - end; - - imstShellSmallImageList: - begin - ImageList := dxPSUtl.ShellSmallImages; - ImageIndex := AReader.ReadInteger; - end;} - imstShellLargeImageList, - imstShellSmallImageList, - imstImage: - begin - GraphicClass := AReader.ReadGraphicClass; - if GraphicClass = nil then - begin - Image := nil; - BytesToSkip := {$IFDEF DELPHI6} AReader.ReadInt64 {$ELSE} AReader.ReadInteger {$ENDIF}; - AReader.SkipBytes(BytesToSkip); - end - else - AReader.ReadImage(CreateImage(GraphicClass)); - end; - end; - end; -end; - -procedure TCustomdxReportCellImageContainer.WriteData(AWriter: TdxPSDataWriter); - - function RetrieveSourceType: Integer; - begin - if ImageList <> nil then - if (ImageList = dxPSUtl.ShellLargeImages) or - (ImageList.HandleAllocated and (ImageList.Handle = dxPSUtl.ShellLargeImages.Handle)) then - Result := imstShellLargeImageList - else - if (ImageList = dxPSUtl.ShellSmallImages) or - (ImageList.HandleAllocated and (ImageList.Handle = dxPSUtl.ShellSmallImages.Handle)) then - Result := imstShellSmallImageList - else - Result := imstImageList - else - Result := imstImage; - end; - - function RetrieveImage(ASourceType: Integer; AnImageIndex: Integer): TGraphic; - begin - case ASourceType of - imstShellLargeImageList: - begin - Result := TBitmap.Create; - dxPSUtl.ShellLargeImages.GetBitmap(AnImageIndex, TBitmap(Result)); - end; - - imstShellSmallImageList: - begin - Result := TBitmap.Create; - dxPSUtl.ShellSmallImages.GetBitmap(AnImageIndex, TBitmap(Result)); - end; - else - Result := Self.Image; - end; - end; - -var - SourceType: Integer; - Buffer: TGraphic; -begin - inherited WriteData(AWriter); - - AWriter.WriteBoolean(HasImage); - if HasImage then - begin - SourceType := RetrieveSourceType; - AWriter.WriteInteger(SourceType); - case SourceType of - imstImageList: - begin - AWriter.WriteInteger(GetImageListIndex); - AWriter.WriteInteger(ImageIndex); - end; - - else - begin - Buffer := RetrieveImage(SourceType, ImageIndex); - try - AWriter.WriteString(Buffer.ClassName); - AWriter.WriteImage(Buffer); - finally - if Buffer <> Self.Image then Buffer.Free; - end; - end; - { imstShellLargeImageList, - imstShellSmallImageList: - AWriter.WriteInteger(ImageIndex); - imstImage: - begin - AWriter.WriteString(Image.ClassName); - AWriter.WriteImage(Image); - end;} - end; - end; -end; - -procedure TCustomdxReportCellImageContainer.SetImage(Value: TGraphic); -begin - if Value <> nil then - begin - CreateImage(TGraphicClass(Value.ClassType)); - Image.Assign(Value); - - if Width = 0 then Width := Image.Width; - if Height = 0 then Height := Image.Height; - end - else - FreeAndNil(FImage); -end; - -{ TdxReportCellImage } - -constructor TdxReportCellImage.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - ImageLayout := ilImageCenterLeft; - IsTextDrawnForCenteredImage := False; - IsTextShiftedForHorizontallyCenteredImage := True; - MakeSpaceForEmptyImage := True; -end; - -procedure TdxReportCellImage.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TdxReportCellImage then - begin - ImageLayout := TdxReportCellImage(Source).ImageLayout; - MakeSpaceForEmptyImage := TdxReportCellImage(Source).MakeSpaceForEmptyImage; - end; -end; - -function TdxReportCellImage.MeasureContentHeight(DC: HDC): Integer; -var - TextHeight: Integer; -begin - if ImageList <> nil then - Result := ImageList.Height - else - if FImage <> nil then - Result := Image.Height - else - Result := 0; - - if Result <> 0 then Inc(Result, 2); - - if ImageLayout in [ilImageTopLeft, ilImageCenterLeft, ilImageBottomLeft, ilImageTopRight, ilImageCenterRight, ilImageBottomRight] then - begin - TextHeight := inherited MeasureContentHeight(DC); - if Result < TextHeight then Result := TextHeight; - end - else - if ImageLayout in [ilImageTopCenter, ilImageBottomCenter] then - if not IsTextShiftedForHorizontallyCenteredImage then - begin - TextHeight := inherited MeasureContentHeight(DC); - if TextHeight > Result then Result := TextHeight; - end - else - Inc(Result, inherited MeasureContentHeight(DC)) - else - if IsTextDrawnForCenteredImage then - begin - TextHeight := inherited MeasureContentHeight(DC); - if TextHeight > Result then Result := TextHeight; - end; -end; - -function TdxReportCellImage.MeasureContentWidth(DC: HDC): Integer; -var - TextWidth: Integer; -begin - if ImageList <> nil then - Result := ImageList.Width - else - if FImage <> nil then - Result := Image.Width - else - Result := 0; - - if Result <> 0 then Inc(Result, 2); - - if ImageLayout in [ilImageTopLeft, ilImageCenterLeft, ilImageBottomLeft, ilImageTopRight, ilImageCenterRight, ilImageBottomRight] then - Inc(Result, inherited MeasureContentHeight(DC)) - else - if (ImageLayout in [ilImageTopCenter, ilImageBottomCenter]) or ((ImageLayout = ilImageCenterCenter) and IsTextDrawnForCenteredImage) then - begin - TextWidth := inherited MeasureContentWidth(DC); - if Result < TextWidth then Result := TextWidth; - end; -end; - -function TdxReportCellImage.GetHalfContentWidth(DC: HDC): Integer; -var - W, H: Integer; -begin - GetImageSizes(W, H); - if IsTextDrawnForCenteredImage and not IsTextShiftedForHorizontallyCenteredImage and - (ImageLayout in [ilImageTopCenter, ilImageCenterCenter, ilImageBottomCenter]) then - Result := (Renderer.CalcTextWidth(DC, Text, Font) + W) div 2 + Renderer.LineThickness - else - Result := 0; -end; - -function TdxReportCellImage.GetImageAreaBounds(DC: HDC): TRect; -var - W, H: Integer; - R: TRect; -begin - GetImageSizes(W, H); - if (W <> 0) and (H <> 0) then - begin - Result := inherited GetImageAreaBounds(DC); - with Result do - begin - case ImageLayout of - ilImageTopLeft: - Right := Left + W + 2 * Renderer.UnitsPerPixel; - ilImageTopCenter: - begin - if not IsTextShiftedForHorizontallyCenteredImage then - begin - Inc(Left, (Right - Left - W) div 2 + Renderer.UnitsPerPixel); - Right := Left + W + Renderer.UnitsPerPixel; - end; - Bottom := Top + H + 2 * Renderer.UnitsPerPixel; - end; - ilImageTopRight: - Left := Right - W - 2 * Renderer.UnitsPerPixel; - ilImageCenterLeft: - Right := Left + W + 2 * Renderer.UnitsPerPixel; - ilImageCenterCenter: - if not IsTextShiftedForHorizontallyCenteredImage then - begin - Inc(Left, (Right - Left - W) div 2 + Renderer.UnitsPerPixel); - Right := Left + W + Renderer.UnitsPerPixel; - Inc(Top, (Bottom - Top - H) div 2 + Renderer.UnitsPerPixel); - Bottom := Top + H + Renderer.UnitsPerPixel; - end; - ilImageCenterRight: - Left := Right - W - 2 * Renderer.UnitsPerPixel; - ilImageBottomLeft: - Right := Left + W + 2 * Renderer.UnitsPerPixel; - ilImageBottomCenter: - begin - if not IsTextShiftedForHorizontallyCenteredImage then - begin - Inc(Left, (Right - Left - W) div 2 + Renderer.UnitsPerPixel); - Right := Left + W + Renderer.UnitsPerPixel; - end; - Top := Bottom - H - 2 * Renderer.UnitsPerPixel; - end; - ilImageBottomRight: - Left := Right - W - 2 * Renderer.UnitsPerPixel; - end; - R := GetInnerBounds(DC); - OffsetRect(Result, -GetHalfContentWidth(DC), 0); - if Left < R.Left then Left := R.Left; - if Top < R.Top then Top := R.Top; - if Right > R.Right then Right := R.Right; - if Bottom > R.Bottom then Bottom := R.Bottom; - end; - end - else - Result := NullRect; -end; - -function TdxReportCellImage.GetImageBounds(DC: HDC): TRect; -var - W, H: Integer; -begin - Result := GetImageAreaBounds(DC); - if not IsRectEmpty(Result) then - begin - GetImageSizes(W, H); - with Result do - begin - case ImageLayout of - ilImageTopLeft, - ilImageTopCenter, - ilImageTopRight: - Inc(Top, LineThickness); - - ilImageCenterLeft, - ilImageCenterCenter, - ilImageCenterRight: - Inc(Top, (Bottom - Top - H) div 2); - - ilImageBottomLeft, - ilImageBottomCenter, - ilImageBottomRight: - Top := Bottom - H - LineThickness; - end; - Inc(Left, (Right - Left - W) div 2); - Right := Left + W; - Bottom := Top + H; -// CorrectBounds(Result, DC); - end; - end; -end; - -function TdxReportCellImage.GetTextBounds(DC: HDC): TRect; -var - R: TRect; -begin - Result := inherited GetTextBounds(DC); - if IsImageDrawn or MakeSpaceForEmptyImage then - begin - if not ((ImageLayout in [ilImageTopCenter, ilImageCenterCenter, ilImageBottomCenter]) and - not IsTextShiftedForHorizontallyCenteredImage) then - begin - R := GetImageBounds(DC); - if not IsRectEmpty(R) then - with Result do - case ImageLayout of - ilImageTopLeft, ilImageCenterLeft, ilImageBottomLeft: - Left := R.Right; - ilImageTopRight, ilImageCenterRight, ilImageBottomRight: - Right := R.Left; - ilImageTopCenter: - if IsTextShiftedForHorizontallyCenteredImage then - Top := R.Bottom; - ilImageCenterCenter: - if not IsTextDrawn then //TODO: TdxReportCellImage.GetTextBounds( - Result := NullRect; - ilImageBottomCenter: - if IsTextShiftedForHorizontallyCenteredImage then - Bottom := R.Top; - end; - end; - end; -end; - -function TdxReportCellImage.IsImageBackgroundDrawn: Boolean; -begin - Result := inherited IsImageBackgroundDrawn and MakeSpaceForEmptyImage and - not ((ImageLayout in [ilImageTopCenter, ilImageCenterCenter, ilImageBottomCenter]) and - not IsTextShiftedForHorizontallyCenteredImage); -end; - -function TdxReportCellImage.IsTextDrawn: Boolean; -begin - Result := inherited IsTextDrawn and ((ImageLayout <> ilImageCenterCenter) or IsTextDrawnForCenteredImage); -end; - -function TdxReportCellImage.IsTextBackgroundDrawn: Boolean; -begin - Result := inherited IsTextBackgroundDrawn and - (not (ImageLayout in [ilImageTopCenter, ilImageCenterCenter, ilImageBottomCenter]) or - IsTextDrawnForCenteredImage or not HasImage); -end; - -function TdxReportCellImage.GetImageLayout: TdxImageLayout; -begin - Result := TdxImageLayout((Format and dxPSGlbl.dxFormatImageLayoutMask) shr dxPSGlbl.dxFormatImageLayoutOffset); -end; - -function TdxReportCellImage.GetIsTextDrawnForCenteredImage: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatIsTextDrawnForCenteredImage); -end; - -function TdxReportCellImage.GetIsTextShiftedForHorizontallyCenteredImage: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatIsTextShiftedForHorizontallyCenteredImage); -end; - -function TdxReportCellImage.GetMakeSpaceForEmptyImage: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatMakeSpaceForEmptyImage); -end; - -procedure TdxReportCellImage.SetImageLayout(Value: TdxImageLayout); -begin - Format := Format and not dxPSGlbl.dxFormatImageLayoutMask or (Byte(Value) shl dxPSGlbl.dxFormatImageLayoutOffset); -end; - -procedure TdxReportCellImage.SetIsTextDrawnForCenteredImage(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatIsTextDrawnForCenteredImage, Value); -end; - -procedure TdxReportCellImage.SetIsTextShiftedForHorizontallyCenteredImage(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatIsTextShiftedForHorizontallyCenteredImage, Value); -end; - -procedure TdxReportCellImage.SetMakeSpaceForEmptyImage(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatMakeSpaceForEmptyImage, Value); -end; - -{ TdxReportCellGraphic } - -constructor TdxReportCellGraphic.Create(AParent: TdxReportCell); -begin - inherited; - ImageBuffering := cibAlways; - CalculateDrawMode; -end; - -{procedure TdxReportCellGraphic.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxReportCellGraphic then - DrawMode := TdxReportCellGraphic(Source).DrawMode; -end;} - -function TdxReportCellGraphic.MeasureFontHeight(DC: HDC): Integer; -begin - Result := Renderer.CalcTextPatternHeight(DC, Renderer.RenderInfo.BaseContentFont); -end; - -function TdxReportCellGraphic.MeasureContentHeight(DC: HDC): Integer; -begin - if ImageList <> nil then - Result := ImageList.Height - else - if FImage <> nil then - begin - Result := Image.Height; - if RealStretch and (Result > 0) and (Image.Width > 0) then - Result := Round(Result * Width / Image.Width); - end - else - Result := 0; -end; - -function TdxReportCellGraphic.MeasureContentWidth(DC: HDC): Integer; -begin - if ImageList <> nil then - Result := ImageList.Width - else - if FImage <> nil then - Result := Image.Width - else - Result := 0; -end; - -function TdxReportCellGraphic.GetImageBounds(DC: HDC): TRect; -var - W, H, cW, cH: Integer; - R: TRect; -begin - GetImageSizes(W, H); - if (W <> 0) and (H <> 0) then - begin - R := GetImageAreaBounds(DC); - with Result do - begin - case DrawMode of - gdmNone: - begin - Result.TopLeft := R.TopLeft; - Right := Left + W; - Bottom := Top + H; - end; - gdmCenter: - begin - Left := R.Left + (R.Right - R.Left - W) div 2; - Top := R.Top + (R.Bottom - R.Top - H) div 2; - Right := Left + W; - Bottom := Top + H; - end; - gdmStretch: - Result := R; - gdmStretchProportional, - gdmCenterAndStretchProportional: - begin - TopLeft := R.TopLeft; - cW := R.Right - R.Left; - cH := R.Bottom - R.Top; - if W / H > cW / cH then - begin - Right := Left + cW; - Bottom := Top + MulDiv(cW, H, W); - end - else - begin - Bottom := Top + cH; - Right := Left + MulDiv(cH, W, H); - end; - end; - end; - if DrawMode = gdmCenterAndStretchProportional then - begin - W := Right - Left; - H := Bottom - Top; - Left := R.Left + (R.Right - R.Left - W) div 2; - Top := R.Top + (R.Bottom - R.Top - H) div 2; - Right := Left + W; - Bottom := Top + H; - end; - end; - end - else - Result := dxPSGlbl.NullRect; -end; - -function TdxReportCellGraphic.GetImageBuffering: TdxCellImageBuffering; -begin - Result := TdxCellImageBuffering((Format and dxPSGlbl.dxFormatGraphicBufferingMask) shr dxPSGlbl.dxFormatGraphicBufferingOffset); -end; - -function TdxReportCellGraphic.GetTextBounds(DC: HDC): TRect; -begin - Result := dxPSGlbl.NullRect; -end; - -procedure TdxReportCellGraphic.SetImageBuffering(Value: TdxCellImageBuffering); -begin - Format := Format and not dxPSGlbl.dxFormatGraphicBufferingMask or (Byte(Value) shl dxPSGlbl.dxFormatGraphicBufferingOffset); -end; - -procedure TdxReportCellGraphic.CalculateDrawMode; -const - dxDrawMode: array [Boolean, Boolean, Boolean] of TdxGraphicDrawMode = - (((gdmNone, gdmCenter), (gdmCenter, gdmCenter)), - ((gdmStretch, gdmStretch), (gdmStretchProportional, gdmCenterAndStretchProportional))); -begin - DrawMode := dxDrawMode[RealStretch, Proportional, Center]; -end; - -function TdxReportCellGraphic.GetImage: TGraphic; -begin - Result := inherited Image; -end; - -function TdxReportCellGraphic.GetDrawMode: TdxGraphicDrawMode; -begin - Result := TdxGraphicDrawMode((Format and dxPSGlbl.dxFormatGraphicDrawModeMask) shr dxPSGlbl.dxFormatGraphicDrawModeOffset); -end; - -function TdxReportCellGraphic.GetRealStretch: Boolean; -begin - Result := Stretch or (Proportional and (FImage <> nil) and - (Width < Image.Width)); -end; - -procedure TdxReportCellGraphic.SetImage(Value: TGraphic); -begin - inherited Image := Value; - CalculateDrawMode; -end; - -procedure TdxReportCellGraphic.SetCenter(Value: Boolean); -begin - if Value <> FCenter then - begin - FCenter := Value; - CalculateDrawMode; - end; -end; - -procedure TdxReportCellGraphic.SetDrawMode(Value: TdxGraphicDrawMode); -begin - Format := Format and not dxPSGlbl.dxFormatGraphicDrawModeMask or (Byte(Value) shl dxPSGlbl.dxFormatGraphicDrawModeOffset); -end; - -procedure TdxReportCellGraphic.SetProportional(Value: Boolean); -begin - if Value <> FProportional then - begin - FProportional := Value; - CalculateDrawMode; - end; -end; - -procedure TdxReportCellGraphic.SetStretch(Value: Boolean); -begin - if Value <> FStretch then - begin - FStretch := Value; - CalculateDrawMode; - end; -end; - -{ TdxReportCellExpandButton } - -constructor TdxReportCellExpandButton.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - ButtonAlignHorz := bahCenter; - ButtonAlignVert := bavCenter; - ButtonBorder3D := False; - ButtonBorder3DSoft := False; - ButtonBorderShadow := False; - ButtonExpanded := False; - ButtonInteriorColor := clNone; - ButtonSize := dxDefaultCrossSignCrossSize; // 9 - ButtonTransparent := True; - KeepOddSize := True; - ShowButton := False; - ShowButtonBorder := True; - TreeLineMode := tlmNone; -end; - -procedure TdxReportCellExpandButton.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TdxReportCellExpandButton then - begin - ButtonBorder3D := TdxReportCellExpandButton(Source).ButtonBorder3D; - ButtonBorder3DSoft := TdxReportCellExpandButton(Source).ButtonBorder3DSoft; - ButtonBorderShadow := TdxReportCellExpandButton(Source).ButtonBorderShadow; - ButtonExpanded := TdxReportCellExpandButton(Source).ButtonExpanded; - ButtonInteriorColor := TdxReportCellExpandButton(Source).ButtonInteriorColor; - ButtonSize := TdxReportCellExpandButton(Source).ButtonSize; - ButtonTransparent := TdxReportCellExpandButton(Source).ButtonTransparent; - KeepOddSize := TdxReportCellExpandButton(Source).KeepOddSize; - ShowButton := TdxReportCellExpandButton(Source).ShowButton; - ShowButtonBorder := TdxReportCellExpandButton(Source).ShowButtonBorder; - TreeLineMode := TdxReportCellExpandButton(Source).TreeLineMode; - end; -end; - -procedure TdxReportCellExpandButton.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - if IsBackgroundBitmapDrawn then - DrawBackgroundBitmap(DC) - else - if IsBackgroundDrawn then - DrawBackground(DC); - if ShowButton then DrawExpandButton(DC); - if AreTreeLinesDrawn then DrawTreeLines(DC); - if IsBordersDrawn then DrawBorders(DC); -end; - -procedure TdxReportCellExpandButton.DrawExpandButton(DC: HDC); -var - R: TRect; -begin - R := GetButtonBounds(DC); - if RectVisible(DC, R) then - Renderer.DrawExpandButton(DC, R, ButtonExpanded, ShowButtonBorder, - ButtonBorder3D, ButtonBorder3DSoft, ButtonBorderShadow, not ButtonTransparent, - ReportCells.ExpandButtonBorderColor, ButtonInteriorColor); -end; - -procedure TdxReportCellExpandButton.DrawTreeLines(DC: HDC); -type - TdxTreeLinesDrawInfo = record - TopRect: TRect; - RightRect: TRect; - BottomRect: TRect; - end; - - function GetTreeLineParts: TdxPSTreeLineParts; - const - Parts: array[TdxPSTreeLineMode] of TdxPSTreeLineParts = - ([], [tlpTop, tlpBottom], [tlpTop, tlpRight, tlpBottom], - [tlpBottom, tlpRight], [tlpTop, tlpRight]); - begin - Result := Parts[TreeLineMode]; - end; - - procedure DrawTreeLine(const R: TRect; APattern: TdxPSFillPatternClass); - var - BkColor: TColor; - begin - if RectVisible(DC, R) then - begin - if Transparent then - BkColor := clWindow - else - BkColor := Color; - Renderer.FillRectEx(DC, R, ReportCells.TreeLineColor, BkColor, APattern); - end; - end; - - procedure CalculateDrawInfo(const AButtonRect: TRect; var ADrawInfo: TdxTreeLinesDrawInfo); - begin - with ADrawInfo do - begin - TopRect := BoundsRect; - with TopRect do - begin - Inc(Left, (Right - Left) div 2 - Renderer.LineThickness div 2); - Right := Left + Renderer.UnitsPerPixel; - Dec(Bottom, (Bottom - Top) div 2); - end; - if csTop in CellSides then - Dec(TopRect.Top, Renderer.LineThickness); - - RightRect := BoundsRect; - with RightRect do - begin - Inc(Left, (Right - Left) div 2); - Inc(Top, (Bottom - Top) div 2 - Renderer.LineThickness div 2); - Bottom := Top + Renderer.UnitsPerPixel; - end; - if csRight in CellSides then - Dec(RightRect.Right, Renderer.LineThickness); - - BottomRect := BoundsRect; - with BottomRect do - begin - Inc(Left, (Right - Left) div 2 - Renderer.LineThickness div 2); - Right := Left + Renderer.UnitsPerPixel; - Inc(Top, (Bottom - Top) div 2); - end; - if csBottom in CellSides then - Dec(BottomRect.Bottom, Renderer.LineThickness); - - if not IsRectEmpty(AButtonRect) then - begin - TopRect.Bottom := AButtonRect.Top - Renderer.LineThickness; - RightRect.Left := AButtonRect.Right + Renderer.LineThickness; - BottomRect.Top := AButtonRect.Bottom + Renderer.LineThickness; - end; - end; - end; - -const - Patterns: array[TdxPSTreeLineStyle] of TdxPSFillPatternClass = (TdxPSSolidFillPattern, TdxPSGray50FillPattern); -var - Parts: TdxPSTreeLineParts; - Pattern: TdxPSFillPatternClass; - DrawInfo: TdxTreeLinesDrawInfo; -begin - Parts := GetTreeLineParts; - Pattern := Patterns[ReportCells.TreeLineStyle]; - - CalculateDrawInfo(GetButtonBounds(DC), DrawInfo); - with DrawInfo do - begin - if tlpTop in Parts then DrawTreeLine(TopRect, Pattern); - if tlpBottom in Parts then DrawTreeLine(BottomRect, Pattern); - if tlpRight in Parts then DrawTreeLine(RightRect, Pattern); - end; -end; - -function TdxReportCellExpandButton.GetButtonBounds(DC: HDC): TRect; -begin - if ShowButton then - begin - Result := CalculateButtonBounds; - FixupRect(DC, Result); - end - else - Result := dxPSGlbl.NullRect; -end; - -procedure TdxReportCellExpandButton.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -begin - inherited; - ButtonSize := MulDiv(ButtonSize, APixelsNumerator, APixelsDenominator); -end; - -function TdxReportCellExpandButton.AreTreeLinesDrawn: Boolean; -begin - Result := TreeLineMode <> tlmNone; -end; - -function TdxReportCellExpandButton.CalculateButtonBounds: TRect; -var - ButtonSize: Integer; -begin - Result := BoundsRect; - with Result do - begin - ButtonSize := ActualButtonSize; - case ButtonAlignHorz of - bahLeft: - begin - Inc(Left, ButtonIndents.Left); - Right := Left + ButtonSize; - end; - bahCenter: - begin - Inc(Left, (Right - Left - ButtonSize) div 2); - Right := Left + ButtonSize; - end; - bahRight: - begin - Dec(Right, ButtonIndents.Right); - Left := Right - ButtonSize; - end; - end; - - case ButtonAlignVert of - bavTop: - begin - Inc(Top, ButtonIndents.Top); - Bottom := Top + ButtonSize; - end; - bavCenter: - begin - Inc(Top, (Bottom - Top - ButtonSize) div 2); - Bottom := Top + ButtonSize; - end; - bavBottom: - begin - Dec(Bottom, ButtonIndents.Bottom); - Top := Bottom - ButtonSize; - end; - end; - - if Right < Left then Right := Left; - if Bottom < Top then Bottom := Top; - end; -end; - -function TdxReportCellExpandButton.GetButtonAlignHorz: TdxReportCellExpandButtonAlignHorz; -begin - Result := bahCenter; -end; - -function TdxReportCellExpandButton.GetButtonAlignVert: TdxReportCellExpandButtonAlignVert; -begin - Result := bavCenter; -end; - -function TdxReportCellExpandButton.GetButtonIndents: TRect; -begin - if Renderer <> nil then - Result := MakeRect(LineThickness, LineThickness, LineThickness, LineThickness) - else - Result := NullRect; -end; - -procedure TdxReportCellExpandButton.SetButtonAlignHorz(Value: TdxReportCellExpandButtonAlignHorz); -begin -end; - -procedure TdxReportCellExpandButton.SetButtonAlignVert(Value: TdxReportCellExpandButtonAlignVert); -begin -end; - -procedure TdxReportCellExpandButton.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - ButtonInteriorColor := AReader.ReadInteger; - ButtonSize := AReader.ReadInteger; -end; - -procedure TdxReportCellExpandButton.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteInteger(ButtonInteriorColor); - AWriter.WriteInteger(ButtonSize); -end; - -function TdxReportCellExpandButton.GetActualButtonSize: Integer; -var - LineThickness: Integer; -begin - Result := ButtonSize; - - LineThickness := Renderer.LineThickness; - if (Result mod LineThickness) > (LineThickness div 2) then - Inc(Result, LineThickness - (Result mod LineThickness)) - else - Dec(Result, Result mod LineThickness); -end; - -function TdxReportCellExpandButton.GetButtonBorder3D: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatExpandButtonBorder3D); -end; - -function TdxReportCellExpandButton.GetButtonBorder3DSoft: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatExpandButtonBorder3DSoft); -end; - -function TdxReportCellExpandButton.GetButtonBorderShadow: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatExpandButtonBorderShadow); -end; - -function TdxReportCellExpandButton.GetButtonExpanded: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatExpandButtonExpanded); -end; - -function TdxReportCellExpandButton.GetButtonTransparent: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatExpandButtonTransparent); -end; - -function TdxReportCellExpandButton.GetShowButtonBorder: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatExpandButtonShowBorder); -end; - -function TdxReportCellExpandButton.GetKeepOddSize: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatExpandButtonKeepOddSize); -end; - -function TdxReportCellExpandButton.GetShowButton: Boolean; -begin - Result := GetFormatBit(dxPSGlbl.dxFormatExpandButtonVisible); -end; - -function TdxReportCellExpandButton.GetTreeLineMode: TdxPSTreeLineMode; -begin - Result := TdxPSTreeLineMode((Format and dxPSGlbl.dxFormatTreeLineModeMask) shr dxPSGlbl.dxFormatTreeLineModeOffset); -end; - -procedure TdxReportCellExpandButton.SetButtonBorder3D(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatExpandButtonBorder3D, Value); -end; - -procedure TdxReportCellExpandButton.SetButtonBorder3DSoft(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatExpandButtonBorder3DSoft, Value); -end; - -procedure TdxReportCellExpandButton.SetButtonBorderShadow(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatExpandButtonBorderShadow, Value); -end; - -procedure TdxReportCellExpandButton.SetButtonExpanded(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatExpandButtonExpanded, Value); -end; - -procedure TdxReportCellExpandButton.SetButtonTransparent(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatExpandButtonTransparent, Value); -end; - -procedure TdxReportCellExpandButton.SetKeepOddSize(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatExpandButtonKeepOddSize, Value); -end; - -procedure TdxReportCellExpandButton.SetShowButton(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatExpandButtonVisible, Value); -end; - -procedure TdxReportCellExpandButton.SetShowButtonBorder(Value: Boolean); -begin - SetFormatBit(dxPSGlbl.dxFormatExpandButtonShowBorder, Value); -end; - -procedure TdxReportCellExpandButton.SetTreeLineMode(Value: TdxPSTreeLineMode); -begin - Format := Format and not dxPSGlbl.dxFormatTreeLineModeMask or (Byte(Value) shl dxPSGlbl.dxFormatTreeLineModeOffset); -end; - -{ TdxReportCellExpandButtonEx } - -function TdxReportCellExpandButtonEx.GetButtonAlignHorz: TdxReportCellExpandButtonAlignHorz; -begin - Result := TdxReportCellExpandButtonAlignHorz((FormatEx and dxPSGlbl.dxFormatExButtonAlignHorzMask) shr dxPSGlbl.dxFormatExButtonAlignHorzOffset); -end; - -function TdxReportCellExpandButtonEx.GetButtonAlignVert: TdxReportCellExpandButtonAlignVert; -begin - Result := TdxReportCellExpandButtonAlignVert((FormatEx and dxPSGlbl.dxFormatExButtonAlignVertMask) shr dxPSGlbl.dxFormatExButtonAlignVertOffset); -end; - -function TdxReportCellExpandButtonEx.GetButtonIndents: TRect; -begin - Result := inherited GetButtonIndents; - if Renderer <> nil then - with Result do - begin - Inc(Top, 5 * LineThickness); - Inc(Bottom, 5 * LineThickness); - end; -end; - -procedure TdxReportCellExpandButtonEx.SetButtonAlignHorz(Value: TdxReportCellExpandButtonAlignHorz); -begin - FormatEx := FormatEx and not dxPSGlbl.dxFormatExButtonAlignHorzMask or (Byte(Value) shl dxPSGlbl.dxFormatExButtonAlignHorzOffset); -end; - -procedure TdxReportCellExpandButtonEx.SetButtonAlignVert(Value: TdxReportCellExpandButtonAlignVert); -begin - FormatEx := FormatEx and not dxPSGlbl.dxFormatExButtonAlignVertMask or (Byte(Value) shl dxPSGlbl.dxFormatExButtonAlignVertOffset); -end; - -procedure TdxReportCellExpandButtonEx.ReadData(AReader: TdxPSDataReader); -begin - inherited; - FormatEx := AReader.ReadInteger; -end; - -procedure TdxReportCellExpandButtonEx.WriteData(AWriter: TdxPSDataWriter); -begin - inherited; - AWriter.WriteInteger(FormatEx); -end; - -{ TdxPSExplorerChangeNotifier } - -constructor TdxPSExplorerChangeNotifier.Create(AnExplorer: TCustomdxPSExplorer); -begin - inherited Create; - Explorer := AnExplorer; -end; - -destructor TdxPSExplorerChangeNotifier.Destroy; -begin - Explorer := nil; - inherited Destroy; -end; - -procedure TdxPSExplorerChangeNotifier.SetExplorer(Value: TCustomdxPSExplorer); -begin - if FExplorer <> Value then - begin - if FExplorer <> nil then - FExplorer.UnregisterNotifier(Self); - if Value <> nil then - Value.RegisterNotifier(Self); - end; -end; - -{ TdxPSExplorerChangeNotifierAdapter } - -procedure TdxPSExplorerChangeNotifierAdapter.ExplorerRefresh(AStage: TdxPSExplorerRefreshStage); -begin -end; - -procedure TdxPSExplorerChangeNotifierAdapter.FolderPopulated(AFolder: TdxPSExplorerFolder); -begin -end; - -procedure TdxPSExplorerChangeNotifierAdapter.ItemAdded(AnItem: TCustomdxPSExplorerItem); -begin -end; - -procedure TdxPSExplorerChangeNotifierAdapter.ItemDataLoaded(AnItem: TdxPSExplorerItem); -begin -end; - -procedure TdxPSExplorerChangeNotifierAdapter.ItemDataUnloaded(AnItem: TdxPSExplorerItem); -begin -end; - -procedure TdxPSExplorerChangeNotifierAdapter.ItemDeleted(AnItem: TCustomdxPSExplorerItem); -begin -end; - -procedure TdxPSExplorerChangeNotifierAdapter.ItemParentChanged(AnItem: TCustomdxPSExplorerItem); -begin -end; - -procedure TdxPSExplorerChangeNotifierAdapter.ItemPropertiesChanged(AnItem: TCustomdxPSExplorerItem); -begin -end; - -procedure TdxPSExplorerChangeNotifierAdapter.ItemRenamed(AnItem: TCustomdxPSExplorerItem); -begin -end; - -{ TdxPSExplorerTreeChangeNotifier } - -constructor TdxPSExplorerTreeChangeNotifier.Create(ATreeContainer: TCustomdxPSExplorerTreeContainer; - ARegister: Boolean = True); -begin - Assert(ATreeContainer <> nil); - FTreeContainer := ATreeContainer; - inherited Create(TreeContainer.Explorer); -end; - -procedure TdxPSExplorerTreeChangeNotifier.ExplorerRefresh(AStage: TdxPSExplorerRefreshStage); -begin - case AStage of - ersBefore: - begin - TreeContainer.EndEdit(True); - TreeContainer.BeginUpdate; - TreeContainer.SaveState; - end; - ersAfter: - begin - if Explorer <> nil then Explorer.BuildTree(TreeContainer); - TreeContainer.RestoreState; - TreeContainer.RefreshSorting(nil); - TreeContainer.EndUpdate; - end; - end; -end; - -procedure TdxPSExplorerTreeChangeNotifier.FolderPopulated(AFolder: TdxPSExplorerFolder); -begin - if Explorer <> nil then Explorer.PopulateTreeFolder(TreeContainer, AFolder); -end; - -procedure TdxPSExplorerTreeChangeNotifier.ItemAdded(AnItem: TCustomdxPSExplorerItem); -begin - with TreeContainer do - begin - AddItem(CreationParent, AnItem); - SelectedItem := AnItem; - if Control.Focused then BeginEdit(True); - end; -end; - -procedure TdxPSExplorerTreeChangeNotifier.ItemDataLoaded(AnItem: TdxPSExplorerItem); -begin - TreeContainer.MakeItemVisible(AnItem); - TreeContainer.InvalidateItem(AnItem); -end; - -procedure TdxPSExplorerTreeChangeNotifier.ItemDataUnloaded(AnItem: TdxPSExplorerItem); -begin - TreeContainer.InvalidateItem(AnItem); -end; - -procedure TdxPSExplorerTreeChangeNotifier.ItemDeleted(AnItem: TCustomdxPSExplorerItem); -begin - TreeContainer.DeleteItem(AnItem); -end; - -procedure TdxPSExplorerTreeChangeNotifier.ItemParentChanged(AnItem: TCustomdxPSExplorerItem); -begin - TreeContainer.MoveItem(AnItem); -end; - -procedure TdxPSExplorerTreeChangeNotifier.ItemPropertiesChanged(AnItem: TCustomdxPSExplorerItem); -begin - if TreeContainer.SelectedItem = AnItem then - TreeContainer.SelectedItemText := AnItem.DisplayName; -end; - -procedure TdxPSExplorerTreeChangeNotifier.ItemRenamed(AnItem: TCustomdxPSExplorerItem); -begin - TreeContainer.RenameItem(AnItem); -end; - -{ TCustomdxPSExplorerTreeContainer } - -constructor TCustomdxPSExplorerTreeContainer.Create(AnExplorer: TCustomdxPSExplorer; - AHost: IdxPSExplorerTreeContainerHost); -begin - Assert(AnExplorer <> nil); - Assert(AHost <> nil); - - inherited Create; - FExplorer := AnExplorer; - FHost := AHost; - - CreateTreeContainer; - FChangeNotifier := TdxPSExplorerTreeChangeNotifier.Create(Self, True); -end; - -destructor TCustomdxPSExplorerTreeContainer.Destroy; -begin - FreeAndNil(FControl); - FreeAndNil(FChangeNotifier); - inherited Destroy; -end; - -class function TCustomdxPSExplorerTreeContainer.ControlClass: TWinControlClass; -begin - Result := nil; -end; - -class procedure TCustomdxPSExplorerTreeContainer.Register; -begin - dxPSExplorerTreeContainerFactory.Register(Self); -end; - -class procedure TCustomdxPSExplorerTreeContainer.Unregister; -begin - dxPSExplorerTreeContainerFactory.Unregister(Self); -end; - -procedure TCustomdxPSExplorerTreeContainer.BeginUpdate; -begin -end; - -procedure TCustomdxPSExplorerTreeContainer.EndUpdate; -begin -end; - -function TCustomdxPSExplorerTreeContainer.CanCreateFolder: Boolean; -begin - Result := Explorer.CanCreateFolder and not IsEditing and IsFolderSelected; -end; - -function TCustomdxPSExplorerTreeContainer.CanCreateItem: Boolean; -begin - Result := Explorer.CanCreateItem and not IsEditing; -end; - -function TCustomdxPSExplorerTreeContainer.CanDeleteSelection: Boolean; -begin - Result := not IsEditing and Explorer.CanDelete(SelectedItem); -end; - -function TCustomdxPSExplorerTreeContainer.CanLoadSelectedItemData: Boolean; -begin - Result := (Control <> nil) and Control.Focused and not IsEditing and - IsItemSelected and TdxPSExplorerItem(SelectedItem).CanLoadData; -end; - -function TCustomdxPSExplorerTreeContainer.CanRefresh: Boolean; -begin - Result := not IsEditing; -end; - -function TCustomdxPSExplorerTreeContainer.CanRenameSelectedItem: Boolean; -begin - Result := not IsEditing and Explorer.CanRename(SelectedItem); -end; - -function TCustomdxPSExplorerTreeContainer.CanShowPropertySheetsForSelectedItem: Boolean; -begin - Result := not IsEditing and (SelectedItem <> nil) and SelectedItem.HasPropertySheets; -end; - -function TCustomdxPSExplorerTreeContainer.CanUnloadItemData: Boolean; -begin - Result := not IsEditing and (Host.ReportLink <> nil) and - Host.ReportLink.CanUnloadData and (Explorer.LoadedItem <> nil); -end; - -function TCustomdxPSExplorerTreeContainer.CreateItem: TdxPSExplorerItem; -begin - if CanCreateItem then - Result := Explorer.CreateNewItem(CreationParent, Host.ReportLink) - else - Result := nil; -end; - -procedure TCustomdxPSExplorerTreeContainer.DeleteSelection(AShowMessage: Boolean = True); -begin - if CanDeleteSelection and (not AShowMessage or dxPSUtl.MessageQuestion(SelectedItem.DeleteMessageText)) then - SelectedItem.Delete; -end; - -function TCustomdxPSExplorerTreeContainer.IsSelectedItemCurrentlyLoaded: Boolean; -var - Item: TCustomdxPSExplorerItem; -begin - Item := SelectedItem; - Result := (Item is TdxPSExplorerItem) and TdxPSExplorerItem(Item).IsCurrentlyLoaded; -end; - -procedure TCustomdxPSExplorerTreeContainer.LoadSelectedItemData; -begin - if CanLoadSelectedItemData then - Explorer.LoadItemData(TdxPSExplorerItem(SelectedItem), Host.ReportLink); -end; - -procedure TCustomdxPSExplorerTreeContainer.RenameSelectedItem; -begin - if CanRenameSelectedItem then BeginEdit(True); -end; - -function TCustomdxPSExplorerTreeContainer.ShowSelectedItemPropertySheets: Boolean; -begin - Result := CanShowPropertySheetsForSelectedItem and TdxPSExplorerItem(SelectedItem).ShowPropertySheets; -end; - -procedure TCustomdxPSExplorerTreeContainer.UnloadItemData; -begin - if CanUnloadItemData then - Explorer.UnloadItemData(Explorer.LoadedItem); -end; - -function TCustomdxPSExplorerTreeContainer.CanFocus: Boolean; -begin - Result := (Control <> nil) and Control.CanFocus; -end; - -procedure TCustomdxPSExplorerTreeContainer.SetFocus; -begin - if (Control <> nil) and Control.CanFocus and not IsRectEmpty(Control.ClientRect) then - Control.SetFocus; -end; - -procedure TCustomdxPSExplorerTreeContainer.RefreshSorting(ANode: TObject); -begin -end; - -procedure TCustomdxPSExplorerTreeContainer.RefreshSorting(AFolder: TdxPSExplorerFolder); -begin - -end; - -procedure TCustomdxPSExplorerTreeContainer.DeleteItem(AnItem: TCustomdxPSExplorerItem); -begin - EndEdit(False); -end; - -procedure TCustomdxPSExplorerTreeContainer.InvalidateItem(AnItem: TCustomdxPSExplorerItem); -begin -end; - -procedure TCustomdxPSExplorerTreeContainer.RestoreState; -begin -end; - -procedure TCustomdxPSExplorerTreeContainer.SaveState; -begin -end; - -procedure TCustomdxPSExplorerTreeContainer.CreateTreeContainer; -begin - if FControl = nil then - begin - FControl := ControlClass.Create(nil); - FControl.Parent := Host.TreeContainerParent; - InitializeTreeContainer; - end; -end; - -procedure TCustomdxPSExplorerTreeContainer.InitializeTreeContainer; -begin -end; - -procedure TCustomdxPSExplorerTreeContainer.ProcessKeyDown(var Key: Word; Shift: TShiftState); -var - PopupMenu: TPopupMenu; - MenuItem: TMenuItem; -begin - PopupMenu := dxPSUtl.Control_GetPopupMenu(Control); - if PopupMenu <> nil then - begin - MenuItem := PopupMenu.FindItem(Key, fkShortCut); - if (MenuItem <> nil) and MenuItem.Enabled and MenuItem.Visible then - begin - MenuItem.Click; - Key := 0; - Exit; - end - end; - - if not IsEditing then - case Key of - VK_F2: - if Shift = [] then BeginEdit(True); - VK_F5: - if Shift = [] then Explorer.Refresh; - VK_DELETE: - if Shift = [] then DeleteSelection(True); - VK_ESCAPE: - Host.UpdateState; - VK_RETURN: - if ssCtrl in Shift then LoadSelectedItemData; - end; -end; - -procedure TCustomdxPSExplorerTreeContainer.ProcessKeyPress(var Key: Char); -begin - if IsEditing and not Explorer.AcceptItemNameChar(SelectedItem, Key) then - Key := #0; -end; - -{ TdxPSExplorerTreeBuilder } - -class procedure TdxPSExplorerTreeBuilder.Register; -begin - dxPSExplorerTreeBuilderFactory.Register(Self); -end; - -class procedure TdxPSExplorerTreeBuilder.Unregister; -begin - dxPSExplorerTreeBuilderFactory.Unregister(Self); -end; - -class procedure TdxPSExplorerTreeBuilder.BuildTree(AnExplorer: TCustomdxPSExplorer; - ATreeContainer: TCustomdxPSExplorerTreeContainer); -begin - with ATreeContainer do - begin - BeginUpdate; - try - Clear; - CreateFolderNode(ATreeContainer, nil, AnExplorer.Root); - ExpandItem(AnExplorer.Root); - SelectedItem := AnExplorer.Root; - finally - EndUpdate; - end; - end; -end; - -class procedure TdxPSExplorerTreeBuilder.CreateFolderNode(ATreeContainer: TCustomdxPSExplorerTreeContainer; - AParent, AFolder: TdxPSExplorerFolder); -begin - CreateItemNode(ATreeContainer, AParent, AFolder); - PopulateTreeFolder(ATreeContainer, AFolder); -end; - -class procedure TdxPSExplorerTreeBuilder.CreateItemNode(ATreeContainer: TCustomdxPSExplorerTreeContainer; - AParent: TdxPSExplorerFolder; AnItem: TCustomdxPSExplorerItem); -begin - ATreeContainer.AddItem(AParent, AnItem); -end; - -class procedure TdxPSExplorerTreeBuilder.PopulateTreeFolder(ATreeContainer: TCustomdxPSExplorerTreeContainer; - AFolder: TdxPSExplorerFolder); -var - I: Integer; -begin - with ATreeContainer do - begin - BeginUpdate; - try - for I := 0 to AFolder.FolderCount - 1 do - CreateFolderNode(ATreeContainer, AFolder, AFolder.Folders[I]); - for I := 0 to AFolder.ItemCount - 1 do - CreateItemNode(ATreeContainer, AFolder, AFolder.Items[I]); - finally - EndUpdate; - end; - //RefreshSorting(AFolder); {3.1} - end; -end; - -{ TdxPSExplorerItemPropertySheets } - -constructor TCustomdxPSExplorerItemPropertySheets.CreateEx(AnExplorerItem: TCustomdxPSExplorerItem); -begin - Create(nil); - FExplorerItem := AnExplorerItem; -end; - -class function TCustomdxPSExplorerItemPropertySheets.Execute(AnExplorerItem: TCustomdxPSExplorerItem): Boolean; -begin - with FormClass.CreateEx(AnExplorerItem) do - try - Initialize; - try - Result := ShowModal = mrOK; - finally - Done; - end; - finally - Free; - end; -end; - -function TCustomdxPSExplorerItemPropertySheets.ExplorerItem: TCustomdxPSExplorerItem; -begin - Result := FExplorerItem; -end; - -procedure TCustomdxPSExplorerItemPropertySheets.Done; -begin -end; - -procedure TCustomdxPSExplorerItemPropertySheets.Initialize; -begin -end; - -class function TCustomdxPSExplorerItemPropertySheets.FormClass: TCustomdxPSExplorerItemPropertySheetsClass; -begin - Result := TCustomdxPSExplorerItemPropertySheetsClass(Self); -end; - -{ TCustomdxPSExplorerItemComparator } - -class function TCustomdxPSExplorerItemComparator.CompareItems( - AnItem1, AnItem2: Pointer): Integer; -begin - Result := TCustomdxPSExplorerItem(AnItem1).CompareTo(TCustomdxPSExplorerItem(AnItem2)); -end; - -{ TCustomdxPSExplorerItemHelper } - -class function TCustomdxPSExplorerItemHelper.GetHasChildren(AFolder: TdxPSExplorerFolder): Boolean; -begin - Result := False; -end; - -class function TCustomdxPSExplorerItemHelper.GetImageIndex(AnItem: TCustomdxPSExplorerItem): Integer; -begin - Result := AnItem.GetImageIndex; -end; - -class function TCustomdxPSExplorerItemHelper.GetSelectedIndex(AnItem: TCustomdxPSExplorerItem): Integer; -begin - Result := AnItem.GetSelectedIndex; -end; - -class procedure TCustomdxPSExplorerItemHelper.SetHasChildren(AFolder: TdxPSExplorerFolder; Value: Boolean); -begin -end; - -{ TCustomdxPSExplorerItem } - -constructor TCustomdxPSExplorerItem.Create(AnExplorer: TCustomdxPSExplorer; - AParent: TdxPSExplorerFolder); -begin - inherited Create; - Assert(AnExplorer <> nil); - FExplorer := AnExplorer; - Parent := AParent; - FName := GetNewName(nil); - FWindowHandle := dxPSUtl.dxAllocatehWnd(WndProc); -end; - -destructor TCustomdxPSExplorerItem.Destroy; -begin - dxPSUtl.dxDeallocatehWnd(FWindowHandle); - if Parent <> nil then Parent.Remove(Self); - inherited; -end; - -function TCustomdxPSExplorerItem.Explorer: TCustomdxPSExplorer; -begin - Result := FExplorer; -end; - -function TCustomdxPSExplorerItem.CanAccept(AnItem: TCustomdxPSExplorerItem): Boolean; -begin - Result := False; -end; - -function TCustomdxPSExplorerItem.CanDelete: Boolean; -begin - Result := True; -end; - -function TCustomdxPSExplorerItem.CanMove: Boolean; -begin - Result := (Explorer = nil) or Explorer.CanMove(Self); -end; - -function TCustomdxPSExplorerItem.CanMoveTo(AParent: TCustomdxPSExplorerItem): Boolean; -begin - Result := ((Explorer = nil) or Explorer.CanMoveTo(Self, AParent)) and - (AParent <> nil) and AParent.CanAccept(Self); -end; - -function TCustomdxPSExplorerItem.CanRename: Boolean; -begin - Result := (Explorer = nil) or Explorer.CanRename(Self); -end; - -function TCustomdxPSExplorerItem.CanRenameTo(const AName: string): Boolean; -begin - Result := (Explorer = nil) or Explorer.CanRenameTo(Self, AName); -end; - -procedure TCustomdxPSExplorerItem.Delete; -begin - if CanDelete and (Explorer <> nil) then - Explorer.Delete(Self); -end; - -function TCustomdxPSExplorerItem.GetUniqueID(out AnUniqueID: TBytes): Integer; -begin - SetLength(AnUniqueID, 0); - Result := 0; -end; - -function TCustomdxPSExplorerItem.HasAsParent(AnItem: TCustomdxPSExplorerItem): Boolean; -var - ItemParent: TCustomdxPSExplorerItem; -begin - Result := not ((AnItem = nil) or (Parent = Self)); - if Result then - begin - ItemParent := Parent; - while (ItemParent <> nil) and (ItemParent <> AnItem) do - ItemParent := ItemParent.Parent; - Result := ItemParent <> nil; - end; -end; - -function TCustomdxPSExplorerItem.IsNameChanged(const ANewName: string): Boolean; -begin - Result := not dxSameStr(ANewName, Name); -end; - -class function TCustomdxPSExplorerItem.HasPropertySheets: Boolean; -begin - Result := PropertySheetsClass <> nil; -end; - -class function TCustomdxPSExplorerItem.PropertySheetsClass: TCustomdxPSExplorerItemPropertySheetsClass; -begin - Result := nil; -end; - -function TCustomdxPSExplorerItem.ShowPropertySheets: Boolean; -begin - Result := HasPropertySheets and PropertySheetsClass.Execute(Self); -end; - -function TCustomdxPSExplorerItem.CannotRenameMessageText(const AOldName, ANewName: string): string; -begin - Result := ''; -end; - -function TCustomdxPSExplorerItem.DeleteMessageText: string; -begin - Result := ''; -end; - -function TCustomdxPSExplorerItem.OverwriteMessageText(Dest: TCustomdxPSExplorerItem): string; -begin - Result := ''; -end; - -function TCustomdxPSExplorerItem.GetDisplayName: string; -begin - Result := Name; -end; - -function TCustomdxPSExplorerItem.CompareTo(AnItem: TCustomdxPSExplorerItem): Integer; -begin - Result := 0; -end; - -function TCustomdxPSExplorerItem.DoDelete: Boolean; -begin - Result := True; -end; - -function TCustomdxPSExplorerItem.DoMove(AParent: TdxPSExplorerFolder): Boolean; -begin - Result := True; -end; - -function TCustomdxPSExplorerItem.DoRename(var ANewName: string): Boolean; -begin - Result := True; -end; - -function TCustomdxPSExplorerItem.GetImageIndex: Integer; -begin - Result := -1; -end; - -function TCustomdxPSExplorerItem.GetInfoTip: string; -begin - Result := ''; -end; - -function TCustomdxPSExplorerItem.GetNewName(AReportLink: TBasedxReportLink): string; -begin - Result := ''; -end; - -function TCustomdxPSExplorerItem.GetSelectedIndex: Integer; -begin - Result := -1; -end; - -procedure TCustomdxPSExplorerItem.InternalDelete; -begin - if IsWindow(FWindowHandle) then - PostMessage(FWindowHandle, CM_FREEEXPLORERITEM, 0, 0); -end; - -procedure TCustomdxPSExplorerItem.InternalMove(AParent: TdxPSExplorerFolder); -begin - if Parent <> nil then Parent.Remove(Self); - if AParent <> nil then AParent.Add(Self); -end; - -procedure TCustomdxPSExplorerItem.InternalRename(const AName: string); -begin - FName := AName; -end; - -procedure TCustomdxPSExplorerItem.SetName(const Value: string); -begin - if (FName <> Value) and CanRenameTo(Value) then - Explorer.RenameTo(Self, Value); -end; - -function GetItemStateInfoSize: Integer; -begin - Result := SizeOf(TCustomdxPSExplorerItemStateInfo); -end; - -function TCustomdxPSExplorerItem.GetItemStateInfo: TCustomdxPSExplorerItemStateInfo; -var - Bytes: TBytes; -begin - FillChar(Result, GetItemStateInfoSize, 0); - Result.Count := 0; - Result.UniqueIDSize := GetUniqueID(Bytes); -end; - -procedure TCustomdxPSExplorerItem.WriteState(AStream: TStream); -var - ItemInfo: TCustomdxPSExplorerItemStateInfo; - Bytes: TBytes; -begin - ItemInfo := GetItemStateInfo; - AStream.WriteBuffer(ItemInfo, GetItemStateInfoSize); - if ItemInfo.UniqueIDSize <> 0 then - begin - GetUniqueID(Bytes); - AStream.WriteBuffer(Pointer(Bytes)^, ItemInfo.UniqueIDSize); - end; -end; - -procedure TCustomdxPSExplorerItem.WndProc(var Message: TMessage); -begin - with Message do - if Msg = CM_FREEEXPLORERITEM then - Free - else - Result := DefWindowProc(FWindowHandle, Msg, wParam, lParam); -end; - -procedure TCustomdxPSExplorerItem.SetParent(Value: TdxPSExplorerFolder); -begin - if (FParent <> Value) and CanMoveTo(Value) then - Explorer.MoveTo(Self, Value); -end; - -{ TdxPSExplorerFolderHelper } - -class function TdxPSExplorerFolderHelper.GetHasChildren(AFolder: TdxPSExplorerFolder): Boolean; -begin - Result := AFolder.HasChildren; -end; - -class procedure TdxPSExplorerFolderHelper.SetHasChildren(AFolder: TdxPSExplorerFolder; - Value: Boolean); -begin - AFolder.HasChildren := Value; -end; - -{ TdxPSExplorerFolder } - -constructor TdxPSExplorerFolder.Create(AnExplorer: TCustomdxPSExplorer; - AParent: TdxPSExplorerFolder); -begin - inherited Create(AnExplorer, AParent); - FFolders := TList.Create; - FItems := TList.Create; -end; - -destructor TdxPSExplorerFolder.Destroy; -begin - FreeAndNilFolders; - FreeAndNilItems; - inherited Destroy; -end; - -function TdxPSExplorerFolder.CanAccept(AnItem: TCustomdxPSExplorerItem): Boolean; -begin - Result := (AnItem <> Self) and (AnItem.Parent <> Self) and not HasAsParent(AnItem); -end; - -function TdxPSExplorerFolder.CanRenameTo(const AName: string): Boolean; -begin - Result := inherited CanRenameTo(AName) and ((Parent = nil) or (Parent.FolderByName(AName) = nil)); -end; - -function TdxPSExplorerFolder.CreateFolder: TdxPSExplorerFolder; -begin - Result := Explorer.CreateNewFolder(Self); -end; - -function TdxPSExplorerFolder.CreateItem(AReportLink: TBasedxReportLink): TdxPSExplorerItem; -begin - Result := Explorer.CreateNewItem(Self, AReportLink); -end; - -procedure TdxPSExplorerFolder.Populate; -begin - Explorer.PopulateFolder(Self); -end; - -procedure TdxPSExplorerFolder.Delete; -begin - if CanDelete then - begin - DeleteFolders; - DeleteItems; - end; - inherited Delete; -end; - -procedure TdxPSExplorerFolder.DeleteFolders; -var - I: Integer; -begin - for I := FolderCount - 1 downto 0 do - Folders[I].Delete; -end; - -procedure TdxPSExplorerFolder.DeleteItems; -var - I: Integer; -begin - for I := ItemCount - 1 downto 0 do - Items[I].Delete; -end; - -function TdxPSExplorerFolder.HasFolders: Boolean; -begin - Result := FolderCount <> 0; -end; - -function TdxPSExplorerFolder.HasItems: Boolean; -begin - Result := ItemCount <> 0; -end; - -function TdxPSExplorerFolder.HasLoadedItem: Boolean; -var - I: Integer; -begin - if Explorer.LoadedItem <> nil then - begin - Result := True; - for I := 0 to ItemCount - 1 do - if Items[I] = Explorer.LoadedItem then Exit; - for I := 0 to FolderCount - 1 do - if Folders[I].HasLoadedItem then Exit; - Result := False; - end - else - Result := False; -end; - -function TdxPSExplorerFolder.FolderByName(const AName: string): TdxPSExplorerFolder; -var - I: Integer; -begin - Populate; - for I := 0 to FolderCount - 1 do - begin - Result := Folders[I]; - if Result.Name = AName then Exit; - end; - Result := nil; -end; - -function TdxPSExplorerFolder.ItemByName(const AName: string): TdxPSExplorerItem; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - begin - Result := Items[I]; - if Result.Name = AName then Exit; - end; - Result := nil; -end; - -function TdxPSExplorerFolder.CannotRenameMessageText(const AOldName, ANewName: string): string; -begin - Result := Format(cxGetResourceString(@sdxCannotRenameFolderText), [AOldName, ANewName]); -end; - -function TdxPSExplorerFolder.DeleteMessageText: string; -begin - if HasFolders or HasItems then - Result := Format(cxGetResourceString(@sdxDeleteNonEmptyFolderMessageText), [DisplayName]) - else - Result := Format(cxGetResourceString(@sdxDeleteFolderMessageText), [DisplayName]); -end; - -function TdxPSExplorerFolder.OverwriteMessageText(Dest: TCustomdxPSExplorerItem): string; -begin - Result := Format(cxGetResourceString(@sdxOverwriteFolderMessageText), [Dest.DisplayName, DisplayName]); -end; - -function TdxPSExplorerFolder.CompareTo(AnItem: TCustomdxPSExplorerItem): Integer; -begin - if AnItem is TdxPSExplorerFolder then - Result := CompareText(DisplayName, AnItem.DisplayName) - else - Result := -1; -end; - -function TdxPSExplorerFolder.GetItemStateInfo: TCustomdxPSExplorerItemStateInfo; -begin - Result := inherited GetItemStateInfo; - Result.Count := FolderCount + ItemCount; -end; - -procedure TdxPSExplorerFolder.WriteState(AStream: TStream); -var - I: Integer; -begin - inherited; - for I := 0 to FolderCount - 1 do - Folders[I].WriteState(AStream); - for I := 0 to ItemCount - 1 do - Items[I].WriteState(AStream); -end; - -procedure TdxPSExplorerFolder.LoadData; -begin - Explorer.LoadData(Self); -end; - -function TdxPSExplorerFolder.GetImageIndex: Integer; -begin - Result := iiExplorerFolderCollapsed; -end; - -function TdxPSExplorerFolder.GetNewName(AReportLink: TBasedxReportLink): string; -var - Index: Integer; - Template: string; -begin - Result := cxGetResourceString(@sdxNewExplorerFolderItem); - if (Parent <> nil) and (Parent.FolderByName(Result) <> nil) then - begin - Index := 1; - Template := Result; - repeat - Inc(Index); - Result := Template + ' (' + IntToStr(Index) + ')'; - until Parent.FolderByName(Result) = nil; - end; -end; - -function TdxPSExplorerFolder.GetSelectedIndex: Integer; -begin - Result := iiExplorerFolderExpanded; -end; - -procedure TdxPSExplorerFolder.Add(AnItem: TCustomdxPSExplorerItem); -begin - GetItemList(AnItem).Add(AnItem); - AnItem.FParent := Self; - HasChildren := True; -end; - -procedure TdxPSExplorerFolder.Remove(AnItem: TCustomdxPSExplorerItem); -begin - AnItem.FParent := nil; - GetItemList(AnItem).Remove(AnItem); - if FolderCount + ItemCount = 0 then - HasChildren := False; -end; - -procedure TdxPSExplorerFolder.FreeAndNilFolders; -var - I: Integer; -begin - for I := FolderCount - 1 downto 0 do - Folders[I].Free; - FreeAndNil(FFolders); -end; - -procedure TdxPSExplorerFolder.FreeAndNilItems; -var - I: Integer; -begin - for I := ItemCount - 1 downto 0 do - Items[I].Free; - FreeAndNil(FItems); -end; - -function TdxPSExplorerFolder.GetFolder(Index: Integer): TdxPSExplorerFolder; -begin - Result := TdxPSExplorerFolder(FFolders[Index]); -end; - -function TdxPSExplorerFolder.GetFolderCount: Integer; -begin - if FFolders <> nil then - Result := FFolders.Count - else - Result := 0; -end; - -function TdxPSExplorerFolder.GetHasChildren: Boolean; -begin - Result := FHasChildren or (FolderCount + ItemCount <> 0); -end; - -function TdxPSExplorerFolder.GetIsRoot: Boolean; -begin - Result := Self = Explorer.Root; -end; - -function TdxPSExplorerFolder.GetItem(Index: Integer): TdxPSExplorerItem; -begin - Result := TdxPSExplorerItem(FItems[Index]); -end; - -function TdxPSExplorerFolder.GetItemCount: Integer; -begin - if FItems <> nil then - Result := FItems.Count - else - Result := 0; -end; - -function TdxPSExplorerFolder.GetItemList(AnItem: TCustomdxPSExplorerItem): TList; -begin - Result := GetItemList(TCustomdxPSExplorerItemClass(AnItem.ClassType)); -end; - -function TdxPSExplorerFolder.GetItemList(AnItemClass: TCustomdxPSExplorerItemClass): TList; -begin - if AnItemClass.InheritsFrom(TdxPSExplorerItem) then - Result := FItems - else - if AnItemClass.InheritsFrom(TdxPSExplorerFolder) then - Result := FFolders - else - Result := nil; -end; - -procedure TdxPSExplorerFolder.SetHasChildren(Value: Boolean); -begin - FHasChildren := Value or (FolderCount + ItemCount <> 0); -end; - -{ TdxPSExplorerItem } - -constructor TdxPSExplorerItem.Create(AnExplorer: TCustomdxPSExplorer; AParent: TdxPSExplorerFolder); -begin - inherited; - FReportDocument := TdxPSReportDocument.Create(nil); - FReportDocument.OnChanged := DocumentChanged; -end; - -destructor TdxPSExplorerItem.Destroy; -begin - FreeAndNil(FReportDocument); - inherited; -end; - -function TdxPSExplorerItem.CanLoadData: Boolean; -begin - Result := not HasInvalidData and not IsCurrentlyLoaded; -end; - -function TdxPSExplorerItem.CanRenameTo(const AName: string): Boolean; -begin - Result := inherited CanRenameTo(AName) and ((Parent = nil) or (Parent.ItemByName(AName) = nil)); -end; - -function TdxPSExplorerItem.CannotRenameMessageText(const AOldName, ANewName: string): string; -begin - Result := Format(cxGetResourceString(@sdxCannotRenameItemText), [AOldName, ANewName]); -end; - -function TdxPSExplorerItem.DataLoadErrorText: string; -begin - Result := cxGetResourceString(@sdxDataLoadErrorText); -end; - -function TdxPSExplorerItem.DeleteMessageText: string; -begin - Result := Format(cxGetResourceString(@sdxDeleteItemMessageText), [DisplayName]); -end; - -function TdxPSExplorerItem.OverwriteMessageText(Dest: TCustomdxPSExplorerItem): string; -begin - Result := Format(cxGetResourceString(@sdxOverwriteItemMessageText), [Dest.DisplayName, DisplayName]); -end; - -function TdxPSExplorerItem.CreateDataStream(AMode: TdxPSStreamMode): TStream; -begin - Result := Explorer.CreateItemDataStream(Self, AMode); -end; - -procedure TdxPSExplorerItem.RetrieveReportData(AReportLink: TBasedxReportLink); -var - Stream: TStream; -begin - if AReportLink <> nil then - begin - Stream := CreateDataStream(smWrite); - if Stream <> nil then - try - AReportLink.SaveDataToStream(Stream); - finally - Stream.Free; - end; - end; -end; - -function TdxPSExplorerItem.IsLoading: Boolean; -begin - Result := (Explorer <> nil) and Explorer.IsLoading; -end; - -procedure TdxPSExplorerItem.Load(AReportLink: TBasedxReportLink); -begin - if Explorer <> nil then - Explorer.LoadItemData(Self, AReportLink); -end; - -procedure TdxPSExplorerItem.Unload; -begin - Explorer.UnloadItemData(Self); -end; - -class function TdxPSExplorerItem.PropertySheetsClass: TCustomdxPSExplorerItemPropertySheetsClass; -begin - Result := TdxfmPSReportProperties; -end; - -function TdxPSExplorerItem.CompareTo(AnItem: TCustomdxPSExplorerItem): Integer; -begin - if AnItem is TdxPSExplorerItem then - Result := CompareText(DisplayName, AnItem.DisplayName) - else - Result := 1; -end; - -function TdxPSExplorerItem.DoDelete: Boolean; -begin - if IsCurrentlyLoaded then Unload; - Result := inherited DoDelete; -end; - -function TdxPSExplorerItem.GetFormCaption: string; -begin - Result := Name; -end; - -function TdxPSExplorerItem.GetImageIndex: Integer; -begin - if HasInvalidData then - Result := iiExplorerItemHasInvalidData - else - Result := iiExplorerItem; -end; - -function TdxPSExplorerItem.GetInfoTip: string; -begin - Result := ReportDocument.InfoTip; -end; - -function TdxPSExplorerItem.GetNewName(AReportLink: TBasedxReportLink): string; -var - Index: Integer; - Template: string; -begin - Result := cxGetResourceString(@sdxNewReport); - if AReportLink <> nil then - Result := AReportLink.GetNewReportStorageName; - if (Parent <> nil) and (Parent.ItemByName(Result) <> nil) then - begin - Index := 1; - Template := Result; - repeat - Inc(Index); - Result := Template + ' (' + IntToStr(Index) + ')'; - until Parent.ItemByName(Result) = nil; - end; -end; - -function TdxPSExplorerItem.GetSelectedIndex: Integer; -begin - if HasInvalidData then - Result := iiExplorerItemHasInvalidData - else - Result := iiExplorerItem; -end; - -procedure TdxPSExplorerItem.InternalDelete; -begin - SaveDocument; - inherited; -end; - -procedure TdxPSExplorerItem.DocumentChanged(Sender: TObject); -begin - if not IsLoading then - begin - Name := ReportDocument.Caption; - Explorer.NotifyItemPropertiesChanged(Self); - end; -end; - -procedure TdxPSExplorerItem.SaveDocument; -var - Stream: TStream; - OffsetTable: TdxPSDataStorageOffsetTable; - P: Integer; - Writer: TdxPSDataWriter; -begin - Stream := CreateDataStream(smWrite); - if Stream <> nil then - try - OffsetTable := TBasedxReportLink.ExtractOffsetTable(Stream, True); - try - P := Stream.Position; - try - Stream.Position := OffsetTable.Document; - Writer := TBasedxReportLink.CreateDataWriter(Stream); - try - ReportDocument.WriteData(Writer); - finally - Writer.Free; - end; - finally - Stream.Position := P; - end; - finally - OffsetTable.Free; - end; - finally - Stream.Free; - end; -end; - -procedure TdxPSExplorerItem.SetReportData(AReportLink: TBasedxReportLink); -var - Stream: TStream; -begin - if AReportLink <> nil then - begin - Stream := CreateDataStream(smRead); - if Stream <> nil then - try - try - AReportLink.LoadDataFromStream(Stream); - except - AReportLink.FinalizeDataStream; - HasInvalidData := True; - raise; - end; - finally - Stream.Free; - end; - end; -end; - -function TdxPSExplorerItem.GetIsCurrentlyLoaded: Boolean; -begin - Result := Explorer.LoadedItem = Self; -end; - -procedure TdxPSExplorerItem.SetHasInvalidData(Value: Boolean); -begin - if FHasInvalidData <> Value then - begin - FHasInvalidData := Value; - end; -end; - -{ TCustomdxPSExplorerContextCommand } - -constructor TCustomdxPSExplorerContextCommand.Create(AnExplorer: TCustomdxPSExplorer); -begin - inherited Create; - FBitmap := TBitmap.Create; - FExplorer := AnExplorer; -end; - -destructor TCustomdxPSExplorerContextCommand.Destroy; -begin - FBitmap.Free; - inherited; -end; - -function TCustomdxPSExplorerContextCommand.Enabled: Boolean; -begin - Result := True; -end; - -procedure TCustomdxPSExplorerContextCommand.Execute; -begin -end; - -function TCustomdxPSExplorerContextCommand.Explorer: TCustomdxPSExplorer; -begin - Result := FExplorer; -end; - -procedure TCustomdxPSExplorerContextCommand.SetBitmap(Value: TBitmap); -begin - Bitmap.Assign(Value); -end; - -{ TdxPSExplorerContextCommandSeparator } - -constructor TdxPSExplorerContextCommandSeparator.Create(AnExplorer: TCustomdxPSExplorer); -begin - inherited; - Caption := dxPSGlbl.cMenuSeparator; -end; - -function TdxPSExplorerContextCommandSeparator.Enabled: Boolean; -begin - Result := False; -end; - -{ TdxPSExplorerRefreshContextCommand } - -constructor TdxPSExplorerRefreshContextCommand.Create(AnExplorer: TCustomdxPSExplorer); -begin - inherited; - Caption := cxGetResourceString(@sdxMenuExplorerRefresh); - Hint := cxGetResourceString(@sdxHintExplorerRefresh); - ShortCut := Menus.TextToShortCut('F5'); - Bitmap_LoadFromResourceName(Bitmap, IDB_DXPSREFRESH); - Bitmap.Transparent := True; -end; - -procedure TdxPSExplorerRefreshContextCommand.Execute; -begin - Explorer.Refresh; -end; - -{ TCustomdxPSExplorer } - -constructor TCustomdxPSExplorer.Create(AOwner: TComponent); -begin - inherited; - FNotifiers := TList.Create; - FCommands := TList.Create; -end; - -destructor TCustomdxPSExplorer.Destroy; -begin - FreeAndNilCommands; - ReleaseAndNilNotifiers; - FreeAndNil(FRoot); - inherited; -end; - -function TCustomdxPSExplorer.LoadedItem: TdxPSExplorerItem; -begin - Result := FLoadedItem; -end; - -function TCustomdxPSExplorer.CanCreateFolder: Boolean; -begin - Result := True; -end; - -function TCustomdxPSExplorer.CanCreateItem: Boolean; -begin - Result := True; -end; - -function TCustomdxPSExplorer.CreateNewFolder(AParent: TdxPSExplorerFolder): TdxPSExplorerFolder; -begin - Include(FState, esFolderCreating); - try - Result := GetFolderClass.Create(Self, AParent); - //DoCreateNewFolder(Result); - NotifyItemAdded(Result); - finally - Exclude(FState, esFolderCreating); - end; -end; - -function TCustomdxPSExplorer.CreateNewItem(AParent: TdxPSExplorerFolder; - AReportLink: TBasedxReportLink): TdxPSExplorerItem; -begin - Include(FState, esItemCreating); - try - Result := GetItemClass.Create(Self, AParent); - Result.FName := Result.GetNewName(AReportLink); - AReportLink.ReportDocument.RetrievePreview; - with Result.ReportDocument do - begin - BeginUpdate; - try - Assign(AReportLink.ReportDocument); - finally - CancelUpdate; - end; - end; - - //DoCreateNewItem(Result); - NotifyItemAdded(Result); - finally - Exclude(FState, esItemCreating); - end; -end; - -procedure TCustomdxPSExplorer.BuildTree(ATreeContainer: TCustomdxPSExplorerTreeContainer); -begin - dxPSExplorerTreeBuilderFactory_ActiveBuilderClass.BuildTree(Self, ATreeContainer); - //dxPSExplorerTreeBuilderFactory.ActiveBuilderClass.BuildTree(Self, ATreeContainer); - if LoadedItem <> nil then - ATreeContainer.MakeItemVisible(LoadedItem); -end; - -function TCustomdxPSExplorer.CreateTree(const AHost: IdxPSExplorerTreeContainerHost): TCustomdxPSExplorerTreeContainer; -begin - Result := dxPSExplorerTreeContainerFactory.ActiveTreeContainerClass.Create(Self, AHost); -end; - -function TCustomdxPSExplorer.FindCustomItemByUniqueID(const AnUniqueID: TBytes): TCustomdxPSExplorerItem; -begin - Result := nil; -end; - -procedure TCustomdxPSExplorer.LoadItemData(AnItem: TdxPSExplorerItem; - AReportLink: TBasedxReportLink); -begin - if LoadedItem <> nil then - NotifyItemDataUnloaded(LoadedItem); - - try - AnItem.SetReportData(AReportLink); - FLoadedItem := AnItem; - NotifyItemDataLoaded(AnItem); - except - FLoadedItem := nil; - DoItemDataLoadError(AnItem); - end; -end; - -procedure TCustomdxPSExplorer.UnloadItemData(AnItem: TdxPSExplorerItem); -begin - FLoadedItem := nil; - NotifyItemDataUnloaded(AnItem); -end; - -procedure TCustomdxPSExplorer.Refresh; -begin - BeforeRefresh; - try - DoRefresh; - finally - AfterRefresh; - end; -end; - -procedure TCustomdxPSExplorer.RegisterNotifier(ANotifier: TdxPSExplorerChangeNotifier); -begin - if IndexOfNotifier(ANotifier) = -1 then - begin - FNotifiers.Add(ANotifier); - ANotifier.FExplorer := Self; - end; -end; - -procedure TCustomdxPSExplorer.UnregisterNotifier(ANotifier: TdxPSExplorerChangeNotifier); -begin - FNotifiers.Remove(ANotifier); - ANotifier.FExplorer := nil; -end; - -{$IFNDEF DELPHI6} - -{ IUnknown } - -function TCustomdxPSExplorer.QueryInterface(const IID: TGUID; out Obj): HRESULT; -begin - if GetInterface(IID, Obj) then - Result := S_OK - else - Result := E_NOINTERFACE; -end; - -function TCustomdxPSExplorer._Addref: Integer; -begin - Result := -1; -end; - -function TCustomdxPSExplorer._Release: Integer; -begin - Result := -1; -end; - -{$ENDIF} - -{ IdxPSExplorerContextCommands } - -procedure TCustomdxPSExplorer.BuildCommandSet(ABuilder: IdxPSExplorerContextCommandBuilder); -begin - Assert(ABuilder <> nil); - ABuilder.AddExplorerContextCommand(AddCommandSeparator); - ABuilder.AddExplorerContextCommand(AddCommand(TdxPSExplorerRefreshContextCommand)); -end; - -procedure TCustomdxPSExplorer.FinalizeCommand(ACommand: TCustomdxPSExplorerContextCommand); -begin -end; - -procedure TCustomdxPSExplorer.InitializeCommand(ACommand: TCustomdxPSExplorerContextCommand); -begin -end; - -function TCustomdxPSExplorer.AddCommand(ACommandClass: TCustomdxPSExplorerContextCommandClass): TCustomdxPSExplorerContextCommand; -begin - Result := FindCommand(ACommandClass); - if Result = nil then - Result := CreateCommand(ACommandClass); -end; - -function TCustomdxPSExplorer.AddCommandSeparator: TdxPSExplorerContextCommandSeparator; -begin - Result := AddCommand(TdxPSExplorerContextCommandSeparator) as TdxPSExplorerContextCommandSeparator; -end; - -procedure TCustomdxPSExplorer.ClearCommands; -var - I: Integer; -begin - for I := 0 to CommandCount - 1 do - Commands[I].Free; - FCommands.Clear; -end; - -function TCustomdxPSExplorer.CreateCommand(ACommandClass: TCustomdxPSExplorerContextCommandClass): TCustomdxPSExplorerContextCommand; -begin - Result := ACommandClass.Create(Self); - FCommands.Add(Result); -end; - -function TCustomdxPSExplorer.CreateCommandSeparator: TdxPSExplorerContextCommandSeparator; -begin - Result := TdxPSExplorerContextCommandSeparator.Create(Self); -end; - -function TCustomdxPSExplorer.FindCommand(ACommandClass: TCustomdxPSExplorerContextCommandClass): TCustomdxPSExplorerContextCommand; -var - I: Integer; -begin - for I := 0 to CommandCount - 1 do - begin - Result := Commands[I]; - if Result.ClassType = ACommandClass then Exit; - end; - Result := nil; -end; - -procedure TCustomdxPSExplorer.FreeAndNilCommands; -begin - ClearCommands; - FreeAndNil(FCommands); -end; - -class function TCustomdxPSExplorer.AcceptItemNameChar(AnItem: TCustomdxPSExplorerItem; - Ch: Char): Boolean; -begin - Result := True; -end; - -class function TCustomdxPSExplorer.GetFolderClass: TdxPSExplorerFolderClass; -begin - Result := TdxPSExplorerFolder; -end; - -class function TCustomdxPSExplorer.GetItemClass: TdxPSExplorerItemClass; -begin - Result := TdxPSExplorerItem; -end; - -class function TCustomdxPSExplorer.GetRootFolderClass: TdxPSExplorerFolderClass; -begin - Result := TdxPSExplorerFolder; -end; - -function TCustomdxPSExplorer.GetRootDisplayName: string; -begin - Result := cxGetResourceString(@sdxExplorerRootFolderCaption); -end; - -procedure TCustomdxPSExplorer.LoadData(AFolder: TdxPSExplorerFolder); -begin - BeginLoading; - try - LockNotifications; - try - dxPSStartWait; - try - DoLoadData(AFolder); - finally - dxPSStopWait; - end; - finally - UnlockNotifications - end; - finally - EndLoading; - end; -end; - -function TCustomdxPSExplorer.CanDelete(AnItem: TCustomdxPSExplorerItem): Boolean; -begin - Result := (AnItem <> nil) and (AnItem <> Root); -end; - -function TCustomdxPSExplorer.CanMove(AnItem: TCustomdxPSExplorerItem): Boolean; -begin - Result := (AnItem <> nil) and (AnItem <> Root) and (AnItem <> LoadedItem); -end; - -function TCustomdxPSExplorer.CanMoveTo(AnItem: TCustomdxPSExplorerItem; - AParent: TCustomdxPSExplorerItem): Boolean; -begin - Result := CanMove(AnItem); -end; - -function TCustomdxPSExplorer.CanRename(AnItem: TCustomdxPSExplorerItem): Boolean; -begin - Result := (AnItem <> nil) and (AnItem <> Root) and (AnItem <> LoadedItem); -end; - -function TCustomdxPSExplorer.CanRenameTo(AnItem: TCustomdxPSExplorerItem; - const AName: string): Boolean; -begin - Result := CanRename(AnItem); -end; - -procedure TCustomdxPSExplorer.Delete(AnItem: TCustomdxPSExplorerItem); -begin - if not (esLoading in State) then - if AnItem.DoDelete then - begin - NotifyItemDeleted(AnItem); - AnItem.InternalDelete; - end; -end; - -procedure TCustomdxPSExplorer.MoveTo(AnItem: TCustomdxPSExplorerItem; - AParent: TdxPSExplorerFolder); -begin - if AnItem.DoMove(AParent) then - begin - AnItem.InternalMove(AParent); - NotifyItemParentChanged(AnItem); - end; -end; - -procedure TCustomdxPSExplorer.PopulateFolder(AFolder: TdxPSExplorerFolder); -begin - if AFolder.HasChildren and (AFolder.FolderCount + AFolder.ItemCount = 0) then - begin - LoadData(AFolder); - NotifyFolderPopulated(AFolder); - end; -end; - -procedure TCustomdxPSExplorer.RenameTo(AnItem: TCustomdxPSExplorerItem; AName: string); -begin - if AnItem.DoRename(AName) then - begin - AnItem.InternalRename(AName); - NotifyItemRenamed(AnItem); - end; -end; - -procedure TCustomdxPSExplorer.AfterRefresh; -begin - Dec(FRefreshCounter); - if FRefreshCounter = 0 then - begin - UnlockNotifications; - LoadState; - NotifyRefresh(ersAfter); - Exclude(FState, esRefreshing); - end; -end; - -procedure TCustomdxPSExplorer.BeforeRefresh; -begin - if FRefreshCounter = 0 then - begin - Include(FState, esRefreshing); - SaveState; - NotifyRefresh(ersBefore); - LockNotifications; - end; - Inc(FRefreshCounter); -end; - -procedure TCustomdxPSExplorer.DoRefresh; -begin - if LoadedItem <> nil then LoadedItem.Unload; - FreeAndNil(FRoot); -end; - -procedure TCustomdxPSExplorer.RootNeeded; -begin - Root; -end; - -procedure TCustomdxPSExplorer.DoItemDataLoadError(AnItem: TdxPSExplorerItem); -var - S: string; - ShowError: Boolean; -begin - S := AnItem.DataLoadErrorText; - ShowError := True; - if Assigned(FOnItemDataLoadError) then - FOnItemDataLoadError(Self, AnItem, ShowError, S); - if ShowError then - MessageError(S); -end; - -procedure TCustomdxPSExplorer.InternalSetLoadedItem(Value: TdxPSExplorerItem); -begin - if Value <> nil then //? - FLoadedItem := Value; -end; - -procedure TCustomdxPSExplorer.PopulateTreeFolder(ATreeContainer: TCustomdxPSExplorerTreeContainer; - AFolder: TdxPSExplorerFolder); -begin - dxPSExplorerTreeBuilderFactory_ActiveBuilderClass.PopulateTreeFolder(ATreeContainer, AFolder); - //dxPSExplorerTreeBuilderFactory.ActiveBuilderClass.PopulateTreeFolder(ATreeContainer, AFolder); -end; - -procedure TCustomdxPSExplorer.LoadState; - - function ReadItem: TCustomdxPSExplorerItem; - var - ItemInfo: TCustomdxPSExplorerItemStateInfo; - Bytes: TBytes; - I: Integer; - begin - FStateStream.ReadBuffer(ItemInfo, GetItemStateInfoSize); - if ItemInfo.UniqueIDSize <> 0 then - begin - SetLength(Bytes, ItemInfo.UniqueIDSize); - FStateStream.ReadBuffer(Pointer(Bytes)^, ItemInfo.UniqueIDSize); - Result := FindCustomItemByUniqueID(Bytes); - end - else - Result := nil; - for I := 0 to ItemInfo.Count - 1 do - ReadItem; - end; - - procedure ReadLoadedItem; - var - Buffer: Integer; - begin - FStateStream.ReadBuffer(Buffer , SizeOf(Buffer)); - if Buffer <> 0 then - InternalSetLoadedItem(TdxPSExplorerItem(ReadItem)); - end; - -begin - if FStateStream <> nil then - try - FStateStream.Position := 0; - ReadItem; - ReadLoadedItem; - finally - FreeAndNil(FStateStream); - end; -end; - -procedure TCustomdxPSExplorer.SaveState; - - procedure WriteLoadedItem; - var - Flag: Integer; - begin - Flag := Ord(LoadedItem <> nil); - FStateStream.WriteBuffer(Flag, SizeOf(Flag)); - if LoadedItem <> nil then - LoadedItem.WriteState(FStateStream); - end; - -begin - if FRoot <> nil then - begin - FStateStream := TMemoryStream.Create; - try - Root.WriteState(FStateStream); - WriteLoadedItem; - except - FreeAndNil(FStateStream); - raise; - end; - end; -end; - -procedure TCustomdxPSExplorer.NotifyFolderPopulated(AFolder: TdxPSExplorerFolder); -var - I: Integer; -begin - if not AreNotificationsLocked then - for I := 0 to NotifierCount - 1 do - Notifiers[I].FolderPopulated(AFolder); -end; - -procedure TCustomdxPSExplorer.NotifyItemAdded(AnItem: TCustomdxPSExplorerItem); -var - I: Integer; -begin - if not AreNotificationsLocked then - for I := 0 to NotifierCount - 1 do - Notifiers[I].ItemAdded(AnItem); -end; - -procedure TCustomdxPSExplorer.NotifyItemDataLoaded(AnItem: TdxPSExplorerItem); -var - I: Integer; -begin - if not AreNotificationsLocked then - for I := 0 to NotifierCount - 1 do - Notifiers[I].ItemDataLoaded(AnItem); -end; - -procedure TCustomdxPSExplorer.NotifyItemDataUnloaded(AnItem: TdxPSExplorerItem); -var - I: Integer; -begin - if not AreNotificationsLocked then - for I := 0 to NotifierCount - 1 do - Notifiers[I].ItemDataUnloaded(AnItem); -end; - -procedure TCustomdxPSExplorer.NotifyItemDeleted(AnItem: TCustomdxPSExplorerItem); -var - I: Integer; -begin - if not AreNotificationsLocked then - for I := 0 to NotifierCount - 1 do - Notifiers[I].ItemDeleted(AnItem); -end; - -procedure TCustomdxPSExplorer.NotifyItemParentChanged(AnItem: TCustomdxPSExplorerItem); -var - I: Integer; -begin - if not AreNotificationsLocked then - for I := 0 to NotifierCount - 1 do - Notifiers[I].ItemParentChanged(AnItem); -end; - -procedure TCustomdxPSExplorer.NotifyItemPropertiesChanged(AnItem: TCustomdxPSExplorerItem); -var - I: Integer; -begin - if not AreNotificationsLocked then - for I := 0 to NotifierCount - 1 do - Notifiers[I].ItemPropertiesChanged(AnItem); -end; - -procedure TCustomdxPSExplorer.NotifyItemRenamed(AnItem: TCustomdxPSExplorerItem); -var - I: Integer; -begin - if not AreNotificationsLocked then - for I := 0 to NotifierCount - 1 do - Notifiers[I].ItemRenamed(AnItem); -end; - -procedure TCustomdxPSExplorer.NotifyRefresh(AStage: TdxPSExplorerRefreshStage); -var - I: Integer; -begin - if not AreNotificationsLocked then - for I := 0 to NotifierCount - 1 do - Notifiers[I].ExplorerRefresh(AStage); -end; - -function TCustomdxPSExplorer.AreNotificationsLocked: Boolean; -begin - Result := FLockCounter <> 0; -end; - -function TCustomdxPSExplorer.IndexOfNotifier(ANotifier: TdxPSExplorerChangeNotifier): Integer; -begin - Result := FNotifiers.IndexOf(ANotifier); -end; - -procedure TCustomdxPSExplorer.LockNotifications; -begin - Inc(FLockCounter); -end; - -procedure TCustomdxPSExplorer.ReleaseAndNilNotifiers; -var - I: Integer; -begin - for I := 0 to NotifierCount - 1 do - Notifiers[I].Explorer := nil; - FreeAndNil(FNotifiers); -end; - -procedure TCustomdxPSExplorer.UnlockNotifications; -begin - Dec(FLockCounter); -end; - -procedure TCustomdxPSExplorer.BeginLoading; -begin - if FLoadingCounter = 0 then Include(FState, esLoading); - Inc(FLoadingCounter); -end; - -procedure TCustomdxPSExplorer.EndLoading; -begin - Dec(FLoadingCounter); - if FLoadingCounter = 0 then Exclude(FState, esLoading); -end; - -function TCustomdxPSExplorer.IsLoading: Boolean; -begin - Result := FLoadingCounter <> 0; -end; - -function TCustomdxPSExplorer.GetCommand(Index: Integer): TCustomdxPSExplorerContextCommand; -begin - Result := TCustomdxPSExplorerContextCommand(FCommands[Index]); -end; - -function TCustomdxPSExplorer.GetCommandCount: Integer; -begin - Result := FCommands.Count; -end; - -function TCustomdxPSExplorer.GetFilterLink: string; -begin - if FilterLinkClass <> nil then - Result := FilterLinkClass.ClassName - else - Result := ''; -end; - -function TCustomdxPSExplorer.GetNotifier(Index: Integer): TdxPSExplorerChangeNotifier; -begin - Result := TdxPSExplorerChangeNotifier(FNotifiers[Index]); -end; - -function TCustomdxPSExplorer.GetNotifierCount: Integer; -begin - Result := FNotifiers.Count; -end; - -function TCustomdxPSExplorer.GetRoot: TdxPSExplorerFolder; -begin - if FRoot = nil then - begin - BeginLoading; - try - LockNotifications; - try - FRoot := GetRootFolderClass.Create(Self, nil); - FRoot.FName := GetRootDisplayName; - LoadData(FRoot); - finally - UnlockNotifications; - end; - finally - EndLoading; - end; - end; - Result := FRoot; -end; - -procedure TCustomdxPSExplorer.SetFilterLink(const Value: string); -var - ComponentClass: TComponentClass; -begin - if Value <> '' then - begin - ComponentClass := TComponentClass(GetClass(Value)); - if dxPSIsSupportedCompClass(ComponentClass) then - FilterLinkClass := ComponentClass; - end - else - FilterLinkClass := nil; -end; - -{ TdxReportTitle } - -constructor TdxReportTitle.Create(AReportLink: TBasedxReportLink); -begin - inherited Create; - FReportLink := AReportLink; - FFont := TFont.Create; - DoRestoreDefaults; - FFont.OnChange := FontChanged; -end; - -destructor TdxReportTitle.Destroy; -begin - FreeAndNil(FDefaultFont); - FreeAndNil(FFont); - inherited; -end; - -procedure TdxReportTitle.Assign(Source: TPersistent); -begin - if Source is TdxReportTitle then - begin - BeginUpdate; - try - with TdxReportTitle(Source) do - begin - Self.AdjustOnReportScale := AdjustOnReportScale; - Self.Color := Color; - Self.Font := Font; - Self.Mode := Mode; - Self.Text := Text; - Self.TextAlignX := TextAlignX; - Self.TextAlignY := TextAlignY; - Self.Transparent := Transparent; - end; - finally - EndUpdate; - end; - end - else - inherited; -end; - -procedure TdxReportTitle.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TdxReportTitle.CancelUpdate; -begin - if FUpdateCount <> 0 then Dec(FUpdateCount); -end; - -procedure TdxReportTitle.EndUpdate; -begin - if FUpdateCount <> 0 then - begin - Dec(FUpdateCount); - if FUpdateCount = 0 then CalculateRenderInfos; - end; -end; - -function TdxReportTitle.DefaultFont: TFont; -begin - if FDefaultFont = nil then - begin - FDefaultFont := TFont.Create; - InitializeDefaultFont(FDefaultFont); - end; - Result := FDefaultFont; -end; - -procedure TdxReportTitle.RestoreDefaults; -begin - BeginUpdate; - try - DoRestoreDefaults; - finally - EndUpdate; - end; -end; - -procedure TdxReportTitle.DoRestoreDefaults; -begin - FAdjustOnReportScale := False; - FColor := clWhite; - FLockCalcViewInfos := True; - try - Font := DefaultFont; - finally - FLockCalcViewInfos := False; - end; - FMode := tmOnEveryTopPage; - FTextAlignX := taCenterX; - FTextAlignY := taCenterY; - FTransparent := True; -end; - -procedure TdxReportTitle.InitializeDefaultFont(AFont: TFont); -begin - AFont.Color := dxPSDefaultReportTitleFontColor; - AFont.Name := dxPSDefaultReportTitleFontName; - AFont.Size := dxPSDefaultReportTitleFontSize; - AFont.Style := dxPSDefaultReportTitleFontStyle; -end; - -procedure TdxReportTitle.ReadData(AReader: TdxPSDataReader); -begin - BeginUpdate; - try - with AReader do - begin - AdjustOnReportScale := ReadBoolean; - Color := ReadInteger; - ReadFont(Font); - Mode := TdxReportTitleMode(ReadInteger); - Text := ReadString; - TextAlignX := TcxTextAlignX(ReadInteger); - TextAlignY := TcxTextAlignY(ReadInteger); - Transparent := ReadBoolean; - end; - finally - CancelUpdate; - end; -end; - -procedure TdxReportTitle.WriteData(AWriter: TdxPSDataWriter); -begin - with AWriter do - begin - WriteBoolean(AdjustOnReportScale); - WriteInteger(Color); - WriteFont(Font); - WriteInteger(Integer(Mode)); - WriteString(Text); - WriteInteger(Integer(TextAlignX)); - WriteInteger(Integer(TextAlignY)); - WriteBoolean(Transparent); - end; -end; - -function TdxReportTitle.IsFontStored: Boolean; -begin - Result := not dxPSUtl.dxAreFontsEqual(Font, DefaultFont); -end; - -procedure TdxReportTitle.SetAdjustOnReportScale(Value: Boolean); -begin - if FAdjustOnReportScale <> Value then - begin - FAdjustOnReportScale := Value; - CalculateRenderInfos; - end; -end; - -procedure TdxReportTitle.SetColor(Value: TColor); -begin - FColor := Value; -end; - -procedure TdxReportTitle.SetFont(Value: TFont); -begin - Font.Assign(Value); -end; - -procedure TdxReportTitle.SetMode(Value: TdxReportTitleMode); -begin - if FMode <> Value then - begin - FMode := Value; - CalculateRenderInfos; - end; -end; - -procedure TdxReportTitle.SetText(const Value: string); -begin - if FText <> Value then - begin - FText := Value; - CalculateRenderInfos; - end; -end; - -procedure TdxReportTitle.SetTextAlignX(Value: TcxTextAlignX); -begin - if Value in [taLeft, taCenterX, taRight] then // backward compatibility - FTextAlignX := Value; -end; - -procedure TdxReportTitle.SetTextAlignY(Value: TcxTextAlignY); -begin - if Value in [taTop, taCenterY, taBottom] then // backward compatibility - FTextAlignY := Value; -end; - -procedure TdxReportTitle.SetTransparent(Value: Boolean); -begin - FTransparent := Value; -end; - -procedure TdxReportTitle.CalculateRenderInfos; -begin - if (FUpdateCount = 0) and (ReportLink <> nil) then //and (FReportLink.CurrentComposition = nil) then - ReportLink.CalculateRenderInfos; -end; - -procedure TdxReportTitle.FontChanged(Sender: TObject); -begin - if not LockCalcViewInfos then CalculateRenderInfos; -end; - -{ TdxReportLinkPrinterPage } - -type - TdxReportLinkPrinterPage = class(TdxPrinterPage) - private - FReportLink: TBasedxReportLink; - protected - function GetOwner: TPersistent; override; - function GetSupportsScaling: Boolean; override; - procedure PageParamsChanged(AUpdateCodes: TdxPrinterPageUpdateCodes); override; - public - property ReportLink: TBasedxReportLink read FReportLink; - end; - - -function TdxReportLinkPrinterPage.GetOwner: TPersistent; -begin - Result := ReportLink; -end; - -function TdxReportLinkPrinterPage.GetSupportsScaling: Boolean; -begin - Result := ReportLink.SupportsScaling; -end; - -procedure TdxReportLinkPrinterPage.PageParamsChanged(AUpdateCodes: TdxPrinterPageUpdateCodes); -begin - inherited; - if UpdateCount = 0 then - ReportLink.PageParamsChanged(Self, nil, AUpdateCodes); -end; - -{ TdxPSReportDocument } - -constructor TdxPSReportDocument.Create(AReportLink: TBasedxReportLink); -begin - inherited Create; - FReportLink := AReportLink; - FPreview := TMetafile.Create; -end; - -destructor TdxPSReportDocument.Destroy; -begin - FreeAndNil(FPreview); - inherited; -end; - -procedure TdxPSReportDocument.Assign(Source: TPersistent); -begin - if Source is TdxPSReportDocument then - begin - BeginUpdate; - try - DoAssign(TdxPSReportDocument(Source)); - finally - EndUpdate; - end; - end - else - inherited; -end; - -procedure TdxPSReportDocument.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TdxPSReportDocument.CancelUpdate; -begin - if FUpdateCount <> 0 then Dec(FUpdateCount); -end; - -procedure TdxPSReportDocument.EndUpdate; -begin - if FUpdateCount <> 0 then - begin - Dec(FUpdateCount); - if UpdateCount = 0 then Changed; - end; -end; - -function TdxPSReportDocument.IsUpdateLocked: Boolean; -begin - Result := UpdateCount <> 0; -end; - -function TdxPSReportDocument.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxNewReport); -end; - -function TdxPSReportDocument.DefaultCreator: string; -begin - Result := dxPSUtl.GetUserName; -end; - -function TdxPSReportDocument.DefaultDescription: string; -begin - Result := ''; -end; - -procedure TdxPSReportDocument.RestoreDefaults; -begin - BeginUpdate; - try - DoRestoreDefaults; - finally - EndUpdate; - end; -end; - -procedure TdxPSReportDocument.RetrievePreview; -begin - Preview.Clear; - if ReportLink <> nil then - ReportLink.RetrievePageAsImage(0, TMetafile, Preview); -end; - -procedure TdxPSReportDocument.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('IsCaptionAssigned', ReadIsCaptionAssigned, WriteIsCaptionAssigned, - FIsCaptionAssigned and (Caption = '')); - Filer.DefineProperty('IsCreatorAssigned', ReadIsCreatorAssigned, WriteIsCreatorAssigned, - FIsCreatorAssigned and (Creator = '')); - Filer.DefineProperty('IsDescriptionAssigned', ReadIsDescriptionAssigned, WriteIsDescriptionAssigned, - FIsDescriptionAssigned and (Description = '')); -end; - -procedure TdxPSReportDocument.Changed; -begin - if not IsUpdateLocked then - if Assigned(FOnChanged) then FOnChanged(Self); -end; - -procedure TdxPSReportDocument.DoAssign(Source: TdxPSReportDocument); -begin - Caption := Source.Caption; - CreationDate := Source.CreationDate; - Creator := Source.Creator; - Description := Source.Description; - Preview.Assign(Source.Preview); - FIsCaptionAssigned := Source.FIsCaptionAssigned; - FIsCreatorAssigned := Source.FIsCreatorAssigned; - FIsDescriptionAssigned := Source.FIsDescriptionAssigned; -end; - -procedure TdxPSReportDocument.DoRestoreDefaults; -begin - FIsCaptionAssigned := False; - FisCreatorAssigned := False; - FIsDescriptionAssigned := False; -end; - -function TdxPSReportDocument.GetInfoTip: string; -const - CRLF = #13#10; -begin - Result := ''; - - if Caption <> '' then - begin - if Result <> '' then Result := Result + CRLF; - Result := Result + DropAmpersand(cxGetResourceString(@sdxCaption)) + ' ' + Caption; - end; - - if Creator <> '' then - begin - if Result <> '' then Result := Result + CRLF; - Result := Result + DropAmpersand(cxGetResourceString(@sdxCreator)) + ' ' + Creator; - end; - - if Result <> '' then Result := Result + CRLF; - Result := Result + DropAmpersand(cxGetResourceString(@sdxCreationDate)) + ' ' + DateToStr(CreationDate); - - if Description <> '' then - begin - if Result <> '' then Result := Result + CRLF; - Result := Result + DropAmpersand(cxGetResourceString(@sdxDescription)) + ' ' + Description; - end; -end; - -procedure TdxPSReportDocument.ReadData(AReader: TdxPSDataReader); -begin - BeginUpdate; - try - with AReader do - begin - Caption := ReadString; - CreationDate := ReadDate; - Creator := ReadString; - Description := ReadString; - ReadImage(Preview); - end; - finally - EndUpdate; - end; -end; - -procedure TdxPSReportDocument.WriteData(AWriter: TdxPSDataWriter); -begin - RetrievePreview; - with AWriter do - begin - WriteString(Caption); - WriteDate(CreationDate); - WriteString(Creator); - WriteString(Description); - WriteImage(Preview); - end; -end; - -function TdxPSReportDocument.GetCaption: string; -begin - if FIsCaptionAssigned then - Result := FCaption - else - Result := DefaultCaption; -end; - -function TdxPSReportDocument.GetCreator: string; -begin - if FIsCreatorAssigned then - Result := FCreator - else - Result := DefaultCreator; -end; - -function TdxPSReportDocument.GetDescription: string; -begin - if FIsDescriptionAssigned then - Result := FDescription - else - Result := DefaultDescription; -end; - -function TdxPSReportDocument.IsCaptionStored: Boolean; -begin - Result := FIsCaptionAssigned and (FCaption <> DefaultCaption); -end; - -function TdxPSReportDocument.IsCreatorStored: Boolean; -begin - Result := FIsCreatorAssigned and (FCreator <> DefaultCreator); -end; - -function TdxPSReportDocument.IsDesciptionStored: Boolean; -begin - Result := FIsDescriptionAssigned and (FDescription <> DefaultDescription); -end; - -procedure TdxPSReportDocument.SetCaption(const Value: string); -begin - if Caption <> Value then - begin - FCaption := Value; - FIsCaptionAssigned := True; - Changed; - end; -end; - -procedure TdxPSReportDocument.SetCreationDate(const Value: TDateTime); -begin - if FCreationDate <> Value then - begin - FCreationDate := Value; - Changed; - end; -end; - -procedure TdxPSReportDocument.SetCreator(const Value: string); -begin - if FCreator <> Value then - begin - FIsCreatorAssigned := True; - FCreator := Value; - Changed; - end; -end; - -procedure TdxPSReportDocument.SetDescription(const Value: string); -begin - if FDescription <> Value then - begin - FIsDescriptionAssigned := True; - FDescription := Value; - Changed; - end; -end; - -procedure TdxPSReportDocument.ReadIsCaptionAssigned(Reader: TReader); -begin - FIsCaptionAssigned := Reader.ReadBoolean; -end; - -procedure TdxPSReportDocument.ReadIsCreatorAssigned(Reader: TReader); -begin - FIsCreatorAssigned := Reader.ReadBoolean; -end; - -procedure TdxPSReportDocument.ReadIsDescriptionAssigned(Reader: TReader); -begin - FIsDescriptionAssigned := Reader.ReadBoolean; -end; - -procedure TdxPSReportDocument.WriteIsCaptionAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsCaptionAssigned); -end; - -procedure TdxPSReportDocument.WriteIsCreatorAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsCreatorAssigned); -end; - -procedure TdxPSReportDocument.WriteIsDescriptionAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsDescriptionAssigned); -end; - -{ TdxPSDataStorageOffsetTable } - -constructor TdxPSDataStorageOffsetTable.Create(ATemplate: TdxPSDataStorageOffsetTable = nil); -begin - inherited Create; - Assign(ATemplate); -end; - -procedure TdxPSDataStorageOffsetTable.Assign(Source: TdxPSDataStorageOffsetTable); -begin - Clear; - if Source <> nil then DoAssign(Source); -end; - -procedure TdxPSDataStorageOffsetTable.Clear; -begin - Information := 0; - Document := 0; - Title := 0; - Data := 0; - Reserved1 := 0; - Reserved2 := 0; - Reserved3 := 0; - Reserved4 := 0; -end; - -type - TdxPSDataStorageOffsetTableInfo = record - Information: Longint; - Document: Longint; - Title: Longint; - Data: Longint; - Reserved1: Longint; - Reserved2: Longint; - Reserved3: Longint; - Reserved4: Longint; - end; - -procedure TdxPSDataStorageOffsetTable.ReadData(AReader: TdxPSDataReader); -var - MemSize: Integer; - Info: TdxPSDataStorageOffsetTableInfo; -begin - AReader.Read(MemSize, SizeOf(MemSize)); - AReader.Read(Info, MemSize); - - Information := Info.Information; - Document := Info.Document; - Title := Info.Title; - Data := Info.Data; - Reserved1 := Info.Reserved1; - Reserved2 := Info.Reserved2; - Reserved3 := Info.Reserved3; - Reserved4 := Info.Reserved4; -end; - -procedure TdxPSDataStorageOffsetTable.WriteData(AWriter: TdxPSDataWriter); -var - MemSize: Integer; - Info: TdxPSDataStorageOffsetTableInfo; -begin - MemSize := SizeOf(Info); - Info.Information := Information; - Info.Document := Document; - Info.Title := Title; - Info.Data := Data; - Info.Reserved1 := Reserved1; - Info.Reserved2 := Reserved2; - Info.Reserved3 := Reserved3; - Info.Reserved4 := Reserved4; - - AWriter.Write(MemSize, SizeOf(MemSize)); - AWriter.Write(Info, MemSize); -end; - -procedure TdxPSDataStorageOffsetTable.DoAssign(Source: TdxPSDataStorageOffsetTable); -begin - Information := Source.Information; - Document := Source.Document; - Title := Source.Title; - Data := Source.Data; - Reserved1 := Source.Reserved1; - Reserved2 := Source.Reserved2; - Reserved3 := Source.Reserved3; - Reserved4 := Source.Reserved4; -end; - -{ TdxPSDataStorageInfo } - -constructor TdxPSDataStorageInfo.Create(AReportLink: TBasedxReportLink); -begin - inherited Create; - StorageVersion := dxPSGlbl.dxPSStorageVersion; - PrintingSystemVersion := dxPSGlbl.dxPSVersion; - if AReportLink <> nil then - begin - LinkClassName := dxStringToShortString(AReportLink.ClassName); - LinkClass := TdxReportLinkClass(Classes.GetClass(dxShortStringToString(LinkClassName))); - if AReportLink.Component <> nil then - begin - ComponentClassName := dxStringToShortString(AReportLink.Component.ClassName); - ComponentClass := TComponentClass(Classes.GetClass(dxShortStringToString(ComponentClassName))); - end; - end; -end; - -procedure TdxPSDataStorageInfo.ReadData(AReader: TdxPSDataReader); -begin - with AReader do - begin - StorageVersion := ReadInteger; - PrintingSystemVersion := ReadPSVersion; - LinkClassName := dxStringToShortString(ReadString); - ComponentClassName := dxStringToShortString(ReadString); - LinkClass := TdxReportLinkClass(Classes.GetClass(dxShortStringToString(LinkClassName))); - ComponentClass := TComponentClass(Classes.GetClass(dxShortStringToString(ComponentClassName))); - end; -end; - -procedure TdxPSDataStorageInfo.WriteData(AWriter: TdxPSDataWriter); -begin - with AWriter do - begin - WriteInteger(StorageVersion); - WritePSVersion(PrintingSystemVersion); - WriteClassName(LinkClass); - WriteClassName(ComponentClass); - end; -end; - -{ TBasedxReportLink } - -constructor TBasedxReportLink.Create(AOwner: TComponent); -begin - inherited; - FBackgroundBitmapPool := TdxPSBackgroundBitmapPool.Create; - FBuiltIn := IsDesigning; - FColor := dxDefaultContentColor; {clWhite} - FCurrentPage := 1; - FFont := TFont.Create; - FFont.Assign(DefaultFont); - FFont.OnChange := FontChanged; - FDataSource := rldsComponent; - FPageNumberFormat := pnfNumeral; - FPrinterPage := TdxReportLinkPrinterPage.Create; - TdxReportLinkPrinterPage(FPrinterPage).FReportLink := Self; - FReportDocument := CreateReportDocument; - FReportDocument.OnChanged := DocumentChanged; - FReportTitle := TdxReportTitle.Create(Self); - FSavedReportTitle := TdxReportTitle.Create(nil); - FSavedReportDocument := CreateReportDocument; - FScaleFonts := True; - FShowPageFooter := True; - FShowPageHeader := True; - FSubscriber := TdxPageParamsChangedSubscriber.Create([TdxSMPageParamsChangedEvent]); - TdxPageParamsChangedSubscriber(FSubscriber).OnPageParamsChanged := PageParamsChanged; - FStartPageIndex := 1; - FTransparent := True; - FUseHorzDelimiters := True; - FUseVertDelimiters := True; -end; - -destructor TBasedxReportLink.Destroy; -begin - {$IFNDEF DELPHI5} - Destroying; - {$ENDIF} - ComponentPrinter := nil; - Component := nil; - DoDestroyReport; {v2.0} - FreeAndNil(FRenderer); - FreeAndNil(FRenderInfo); - FreeAndNil(FSubscriber); - FreeAndNil(FSavedReportDocument); - FreeAndNil(FSavedReportTitle); - FreeAndNil(FReportTitle); - FreeAndNil(FReportDocument); - FreeAndNil(FPrinterPage); - FreeAndNil(FFontPool); - FreeAndNil(FFont); - FreeAndNil(FDefaultFont); - FinalizeDataStream; - FreeAndNil(FBackgroundBitmapPool); - inherited; -end; - -procedure TBasedxReportLink.BeforeDestruction; -begin - inherited; - DoDestroy; -end; - -procedure TBasedxReportLink.Assign(Source: TPersistent); -begin - if Source is TBasedxReportLink then - with TBasedxReportLink(Source) do - begin - Self.Color := Color; - Self.DesignerCaption := DesignerCaption; - Self.Font := Font; - Self.FootersOnEveryPage := FootersOnEveryPage; - Self.HeadersOnEveryPage := HeadersOnEveryPage; - Self.PageNumberFormat := PageNumberFormat; - Self.RealPrinterPage.BeginUpdate; - try - Self.RealPrinterPage := RealPrinterPage; - finally - Self.RealPrinterPage.CancelUpdate; - end; - Self.ReportDocument := ReportDocument; - Self.ReportTitle := ReportTitle; - Self.ScaleFonts := ScaleFonts; - Self.ShowEmptyPages := ShowEmptyPages; - Self.ShowPageFooter := ShowPageFooter; - Self.ShowPageHeader := ShowPageHeader; - Self.ShrinkToPageWidth := ShrinkToPageWidth; - Self.TimeFormat := TimeFormat; - Self.Transparent := Transparent; - - Self.FIsDesignerCaptionAssigned := FIsDesignerCaptionAssigned; - end - else - if Source is TBasedxPrintStyle then - PrinterPage := TBasedxPrintStyle(Source).PrinterPage - else - inherited; -end; - -function TBasedxReportLink.GetParentComponent: TComponent; -begin - Result := ComponentPrinter; -end; - -function TBasedxReportLink.HasParent: Boolean; -begin - Result := ComponentPrinter <> nil; -end; - -procedure TBasedxReportLink.LoadFromRegistry(const APath: string); -var - AssignedFormat: Boolean; - Registry: TRegistry; -begin - if APath = '' then Exit; - Registry := TRegistry.Create; - with Registry do - try - if OpenKey(APath, False) then - try - AssignedFormat := ValueExists(sdxAssignedDateFormat) and ReadBool(sdxAssignedDateFormat); - if AssignedFormat and ValueExists(sdxDateFormat) then - DateFormat := ReadInteger(sdxDateFormat); - - AssignedFormat := ValueExists(sdxAssignedTimeFormat) and ReadBool(sdxAssignedTimeFormat); - if AssignedFormat and ValueExists(sdxTimeFormat) then - TimeFormat := ReadInteger(sdxTimeFormat); - - AssignedFormat := ValueExists(sdxAssignedPageNumberFormat) and ReadBool(sdxAssignedPageNumberFormat); - if AssignedFormat and ValueExists(sdxPageNumberFormat) then - PageNumberFormat := TdxPageNumberFormat(ReadInteger(sdxPageNumberFormat)); - - if ValueExists(sdxStartPageIndex) then - StartPageIndex := ReadInteger(sdxStartPageIndex); - except - on ERegistryException do - else - raise; - end; - finally - Free; - end; -end; - -procedure TBasedxReportLink.SaveToRegistry(const APath: string); -var - Registry: TRegistry; -begin - if APath = '' then Exit; - Registry := TRegistry.Create; - with Registry do - try - if OpenKey(APath, True) then - try - WriteBool(sdxAssignedDateFormat, fvDate in AssignedFormatValues); - if fvDate in AssignedFormatValues then - WriteInteger(sdxDateFormat, DateFormat); - - WriteBool(sdxAssignedTimeFormat, fvTime in AssignedFormatValues); - if fvTime in AssignedFormatValues then - WriteInteger(sdxTimeFormat, TimeFormat); - - WriteBool(sdxAssignedPageNumberFormat, fvPageNumber in AssignedFormatValues); - if fvPageNumber in AssignedFormatValues then - WriteInteger(sdxPageNumberFormat, Integer(PageNumberFormat)); - - WriteInteger(sdxStartPageIndex, StartPageIndex); - except - on ERegistryException do - else - raise; - end; - finally - Free; - end; -end; - -class function TBasedxReportLink.Aggregable: Boolean; -begin - Result := True; -end; - -class function TBasedxReportLink.CanBeUsedAsStub: Boolean; -begin - Result := True; -end; - -class function TBasedxReportLink.Serializable: Boolean; -begin - Result := True; -end; - -function TBasedxReportLink.DefaultDateFormat: Integer; -begin - if not (fvDate in AssignedFormatValues) and (ComponentPrinter <> nil) then - Result := ComponentPrinter.DateFormat - else - Result := 0; -end; - -function TBasedxReportLink.DefaultDesignerCaption: string; -begin - Result := cxGetResourceString(@sdxReportDesignerCaption); -end; - -function TBasedxReportLink.DefaultFont: TFont; -begin - if FDefaultFont = nil then - begin - FDefaultFont := TFont.Create; - InitializeDefaultFont(FDefaultFont); - end; - Result := FDefaultFont; -end; - -function TBasedxReportLink.DefaultPageNumberFormat: TdxPageNumberFormat; -begin - if not (fvPageNumber in AssignedFormatValues) and (ComponentPrinter <> nil) then - Result := ComponentPrinter.PageNumberFormat - else - Result := pnfNumeral; -end; - -function TBasedxReportLink.DefaultTimeFormat: Integer; -begin - if not (fvTime in AssignedFormatValues) and (ComponentPrinter <> nil) then - Result := ComponentPrinter.TimeFormat - else - Result := 0; -end; - -procedure TBasedxReportLink.RestoreDefaults; -begin - InternalRestoreDefaults; -end; - -procedure TBasedxReportLink.RestoreFromOriginal; -begin - if Component <> nil then InternalRestoreFromOriginal; -end; - -function TBasedxReportLink.CheckToDesign: Boolean; -begin - Result := (DataSource = rldsComponent) and (GetDesignerClass <> nil); -end; - -function TBasedxReportLink.DataProviderPresent: Boolean; -begin - if DataSource = rldsComponent then - Result := Component <> nil - else - Result := PossibleDataStorage(DataStream, False); -end; - -function TBasedxReportLink.DesignerExists(AComponentClass: TComponentClass): Boolean; -begin - Result := GetDesignerClass <> nil; -end; - -function TBasedxReportLink.DesignReport: Boolean; -var - DesignWindowClass: TdxReportLinkDesignWindowClass; - SaveLink: TBasedxReportLink; -begin - Result := False; - DesignWindowClass := GetDesignerClass; - if DesignWindowClass <> nil then - begin - FDesignWindow := DesignWindowClass.Create(nil); - try - DesignWindow.ReportLink := Self; - SaveLink := LinkClass.Create(nil); - try - SaveLink.Assign(Self); - BeforeDesignReport; - try - Result := DesignWindow.Execute; - finally - AfterDesignReport(Result); - end; - if not Result and not DesignWindow.Applyed then - Assign(SaveLink); - finally - SaveLink.Free; - end; - finally - FreeAndNil(FDesignWindow); - end; - end; -end; - -procedure TBasedxReportLink.DestroyReport; -begin - Active := False; -end; - -procedure TBasedxReportLink.GetPageColRowCount(out APageColCount, APageRowCount: Integer); -begin - APageColCount := RenderInfo.PageColCount; - APageRowCount := RenderInfo.PageRowCount; -end; - -procedure TBasedxReportLink.Initialize; -begin -end; - -function TBasedxReportLink.IsEmptyPage(AVirtualPageIndex: Integer): Boolean; -begin - if (AVirtualPageIndex > -1) and (AVirtualPageIndex < RenderInfo.VirtualPageCount) then - Result := RenderInfo.PageRenderInfos[AVirtualPageIndex].IsEmptyPage - else - Result := True; -end; - -function TBasedxReportLink.IsEmptyReport: Boolean; -begin - Result := (FRenderInfo = nil) or (RenderInfo.NonEmptyPageCount = 0); -end; - -procedure TBasedxReportLink.RebuildReport; -begin - if HasDesignWindow then DesignWindow.BeforeRebuildReport; - try - Active := False; - Active := True; - finally - if HasDesignWindow then DesignWindow.AfterRebuildReport; - end; -end; - -procedure TBasedxReportLink.SetComponentUnconditionally(Value: TComponent); -begin - FComponent := Value; - if Active or FStreamedActive then - try - if FStreamedActive then FStreamedActive := False; - RebuildReport; - if not IsLoading and (ComponentPrinter <> nil) and not ComponentPrinter.AutoUpdateDateTime then - begin - DateTime := Now; - DesignerModified; - end; - LinkModified(False); - except - on E: Exception do - begin - FComponent := nil; - if IsDesigning then - ShowException(E, ExceptAddr) - else - raise; - end; - end; - if Value <> nil then - Value.FreeNotification(Self); -end; - -class procedure TBasedxReportLink.GetSupportedComponentList(AList: TdxClassList); -begin - dxPSGetLinkSupportedComponentsList(AList, LinkClass); -end; - -class function TBasedxReportLink.IsSupportedCompClass(AComponentClass: TClass): Boolean; -begin - Result := dxPSIsSupportedCompClass(AComponentClass) and (dxPSLinkClassByCompClass(AComponentClass) = LinkClass); -end; - -class function TBasedxReportLink.LinkClass: TdxReportLinkClass; -begin - Result := TdxReportLinkClass(GetTypeData(ClassInfo)^.ClassType); -end; - -class function TBasedxReportLink.Supports(AnObject: TObject): Boolean; -begin - Result := (AnObject <> nil) and Supports(AnObject.ClassType); -end; - -class function TBasedxReportLink.Supports(AClass: TClass): Boolean; -begin - Result := (AClass <> nil) and AClass.InheritsFrom(TComponent) and IsSupportedCompClass(AClass); -end; - -function TBasedxReportLink.Print(AShowDialog: Boolean; - APPrintDlgData: PdxPrintDlgData): Boolean; -begin - if ComponentPrinter <> nil then - begin - ComponentPrinter.CurrentLink := Self; - Result := ComponentPrinter.Print(AShowDialog, APPrintDlgData, Self); - end - else - Result := False; -end; - -procedure TBasedxReportLink.PrintEx(APageNums: TdxPageNumbers; - ACopies: Integer; ACollate: Boolean); -begin - if ComponentPrinter <> nil then - begin - ComponentPrinter.CurrentLink := Self; - ComponentPrinter.PrintEx(APageNums, ACopies, ACollate, Self); - end; -end; - -procedure TBasedxReportLink.PrintPages(const APageIndexes: array of Integer); -begin - if ComponentPrinter <> nil then - begin - ComponentPrinter.CurrentLink := Self; - ComponentPrinter.PrintPages(APageIndexes, Self); - end; -end; - -procedure TBasedxReportLink.PrintPagesEx(const APageIndexes: array of Integer; - APageNums: TdxPageNumbers; ACopyCount: Integer; ACollate: Boolean); -begin - if ComponentPrinter <> nil then - begin - ComponentPrinter.CurrentLink := Self; - ComponentPrinter.PrintPagesEx(APageIndexes, APageNums, ACopyCount, ACollate, Self); - end; -end; - -procedure TBasedxReportLink.BuildPageSetupMenu(ARootItem: TComponent; - AData: Pointer; AIncludeDefineItem: Boolean = True); -var - MenuBuilder: TAbstractdxPSPageSetupMenuBuilder; - Styles: TStringList; -begin - if StyleManager = nil then Exit; - MenuBuilder := dxPSPageSetupMenuBuilderFactory.ActiveBuilder.Create; - try - try - Styles := TStringList.Create; - try - GetFilteredStyles(Styles); - MenuBuilder.BuildPageSetupMenu(ARootItem, AData, AIncludeDefineItem, - Styles, CurrentPrintStyle, StyleClick, DefineStylesClick); - finally - Styles.Free; - end; - except - Application.HandleException(Self); - end; - finally - MenuBuilder.Free; - end; -end; - -procedure TBasedxReportLink.DefinePrintStylesDlg; -var - PreviewBtnClicked, PrintBtnClicked: Boolean; -begin - if StyleManager <> nil then - begin - if ComponentPrinter <> nil then - Include(ComponentPrinter.FState, cpsDefineStylesDialog); - - try - StyleManager.DefinePrintStylesDlg(PreviewBtnClicked, PrintBtnClicked); - finally - if ComponentPrinter <> nil then - Exclude(ComponentPrinter.FState, cpsDefineStylesDialog); - end; - - if PrintBtnClicked then - Print(True, nil) - else - if PreviewBtnClicked then Preview(True); - end; -end; - -procedure TBasedxReportLink.GetFilteredStyles(AStrings: TStrings); -var - I: Integer; - Style: TBasedxPrintStyle; -begin - if StyleManager <> nil then - for I := 0 to StyleManager.Count - 1 do - begin - Style := StyleManager.Styles[I]; - if IsSupportedStyle(Style) then - AStrings.AddObject(Style.StyleCaption, Style); - end; -end; - -function TBasedxReportLink.PageSetup: Boolean; -var - PreviewBtnClicked, PrintBtnClicked: Boolean; -begin - Result := PageSetupEx(0, True, True, PreviewBtnClicked, PrintBtnClicked); - if PreviewBtnClicked then - Preview(True) - else - if PrintBtnClicked then - Result := Print(True, nil); -end; - -function TBasedxReportLink.PageSetupEx(AActivePageIndex: Integer; - AShowPreviewBtn, AShowPrintBtn: Boolean; - out APreviewBtnClicked, APrintBtnClicked: Boolean): Boolean; -var - PrintStyle: TBasedxPrintStyle; - PrintStyleExists: Boolean; -begin - PrintStyle := CurrentPrintStyle; - PrintStyleExists := PrintStyle <> nil; - if not PrintStyleExists then - PrintStyle := TdxPSPrintStyle.Create(nil); - try - if (ComponentPrinter <> nil) and (dxPrintDevice <> nil) and (dxPrintDevice.DeviceMode <> nil) then - PrinterPage.InitFromPrintDevice; - if not PrintStyleExists then PrintStyle.Assign(Self); - if ComponentPrinter <> nil then ComponentPrinter.PreparePageSetup; - try - if not DataProviderPresent then - begin - AShowPreviewBtn := False; - AShowPrintBtn := False; - end; - Result := PrintStyle.PageSetup(AActivePageIndex, AShowPreviewBtn, AShowPrintBtn, - APreviewBtnClicked, APrintBtnClicked); - finally - if ComponentPrinter <> nil then ComponentPrinter.UnpreparePageSetup; - end; - if Result and not PrintStyleExists then - begin - Self.Assign(PrintStyle); - if ComponentPrinter <> nil then - ComponentPrinter.InitDevModeFromPrinterPageSettings(PrinterPage); - end; - if ComponentPrinter <> nil then ComponentPrinter.DoPageSetup(Self, Result); - finally - if not PrintStyleExists then PrintStyle.Free; - end; -end; - -function TBasedxReportLink.PageSetupEx(AActivePageIndex: Integer; - APreviewBtnClicked, APrintBtnClicked: PBoolean): Boolean; -var - ShowPreviewBtn, ShowPrintBtn, PreviewBtnClicked, PrintBtnClicked: Boolean; -begin - ShowPreviewBtn := APreviewBtnClicked <> nil; - ShowPrintBtn := APrintBtnClicked <> nil; - Result := PageSetupEx(AActivePageIndex, ShowPreviewBtn, ShowPrintBtn, PreviewBtnClicked, PrintBtnClicked); - - if ShowPreviewBtn then - APreviewBtnClicked^ := PreviewBtnClicked; - - if ShowPrintBtn then - APrintBtnClicked^ := PrintBtnClicked; -end; - -procedure TBasedxReportLink.Preview(Modal: Boolean = True); -begin - if ComponentPrinter <> nil then - begin - ComponentPrinter.CurrentLink := Self; - ComponentPrinter.Preview(Modal, Self); - end; -end; - -function TBasedxReportLink.PreviewExists: Boolean; -begin - Result := IsCurrentLink and ComponentPrinter.PreviewExists; -end; - -function TBasedxReportLink.ShowDateTimeFormatsDlg: Boolean; -var - Data: TdxDateTimeFormatDlgData; -begin - FillChar(Data, SizeOf(TdxDateTimeFormatDlgData), 0); - with Data do - begin - DateFormats := dxPgsDlg.DateFormats; - TimeFormats := dxPgsDlg.TimeFormats; - DateFormatIndex := DateFormat; - TimeFormatIndex := TimeFormat; - if ComponentPrinter <> nil then - AutoUpdateDateTime := ComponentPrinter.AutoUpdateDateTime; - ShowAsDefaultButton := True; - end; - Result := dxShowDateTimeFormatDlg(Data); - if Result then - begin - if ComponentPrinter <> nil then - begin - ComponentPrinter.AutoUpdateDateTime := Data.AutoUpdateDateTime; - if Data.SetDateTimeFormatAsDefault then - begin - ComponentPrinter.DateFormat := Data.DateFormatIndex; - ComponentPrinter.TimeFormat := Data.TimeFormatIndex; - end; - end; - DateFormat := Data.DateFormatIndex; - TimeFormat := Data.TimeFormatIndex; - end; -end; - -function TBasedxReportLink.ShowPageNumberFormatsDlg: Boolean; -var - Data: TdxPageNumberFormatDlgData; -begin - FillChar(Data, SizeOf(TdxPageNumberFormatDlgData), 0); - with Data do - begin - PageNumberFormats := dxPgsDlg.PageNumberFormats; - PageNumberFormat := Self.PageNumberFormat; - AllowContinueFromPrevSection := AllowContinuousPageIndexes; - if AllowContinueFromPrevSection then - ContinueFromPrevSection := ContinuousPageIndexes; - StartPageIndex := Self.StartPageIndex; - ShowAsDefaultButton := True; - end; - Result := dxShowPageNumberFormatDlg(Data); - if Result then - begin - if (ComponentPrinter <> nil) and Data.SetPageNumberFormatAsDefault then - ComponentPrinter.PageNumberFormat := Data.PageNumberFormat; - PageNumberFormat := Data.PageNumberFormat; - StartPageIndex := Data.StartPageIndex; - if AllowContinuousPageIndexes then - ContinuousPageIndexes := Data.ContinueFromPrevSection; - end; -end; - -function TBasedxReportLink.ShowTitlePropertiesDlg: Boolean; -begin - Result := False; - if CanChangeTitle then - begin - Result := dxShowReportTitlePropertiesDlg(ReportTitle); - if Result and PreviewExists and DataProviderPresent then - RebuildReport; - end; -end; - -function TBasedxReportLink.SupportsScaling: Boolean; -begin - Result := True; -end; - -function TBasedxReportLink.CanChangeTitle: Boolean; -begin - Result := SupportsTitle and not IsAggregated and (DataSource = rldsComponent) and - ((ComponentPrinter = nil) or not ComponentPrinter.IsExplorerMode); -end; - -function TBasedxReportLink.SupportsTitle: Boolean; -begin - Result := True; -end; - -function TBasedxReportLink.CanLoadData: Boolean; -begin - Result := True; -end; - -function TBasedxReportLink.CanSaveData: Boolean; -begin - Result := Serializable and not IsEmptyReport and (DataSource = rldsComponent); -end; - -function TBasedxReportLink.CanUnloadData: Boolean; -begin - Result := DataSource = rldsExternalStorage; -end; - -function TBasedxReportLink.GetNewReportStorageName: string; -const - CRLF = #13#10; -var - P, I: Integer; -begin - Result := ReportTitle.Text; - if Result = '' then - Result := ReportDocument.Caption; - if Result <> '' then - begin - P := Pos(CRLF, Result); - if P <> 0 then - Result := Copy(Result, 1, P - 1); - end; - if Result = '' then - Result := cxGetResourceString(@sdxNewReport); - - for I := 1 to Length(dxPSUtl.InvalidFileNameChars) do - Result := StringReplace(Result, dxPSUtl.InvalidFileNameChars[I], '_', [rfReplaceAll, rfIgnoreCase]); -end; - -procedure TBasedxReportLink.LoadDataFromFile(const AName: string); -var - Stream: TStream; -begin - Stream := TFileStream.Create(AName, fmOpenRead or fmShareDenyWrite); - try - FStorageName := AName; - LoadDataFromStream(Stream); - finally - Stream.Free; - end; -end; - -procedure TBasedxReportLink.LoadDataFromStream(AStream: TStream); -begin - if PossibleDataStorage(AStream, True) then - begin - CopyDataStreamFrom(AStream); - if DataSource <> rldsExternalStorage then - DataSource := rldsExternalStorage - else - if IsRebuildNeededAndAllowed(True) then - RebuildReport; - end; -end; - -procedure TBasedxReportLink.SaveDataToFile(const AName: string); -var - Stream: TStream; -begin - try - Stream := TFileStream.Create(AName, fmCreate);// or fmOpenWrite); - try - SaveDataToStream(Stream); - finally - Stream.Free; - end; - except - // TODO: File is locked - end; -end; - -procedure TBasedxReportLink.SaveDataToStream(AStream: TStream); -var - Writer: TdxPSDataWriter; -begin - if DataProviderPresent and (FReportCells = nil) then RebuildReport; - - if ReportCells <> nil then //HasData - begin - PrepareLongOperation; - try - Include(FState, rlsDataSaving); - try - Writer := CreateDataWriter(AStream); - try - InternalWriteData(Writer); - finally - Writer.Free; - end; - finally - Exclude(FState, rlsDataSaving); - end; - finally - UnprepareLongOperation; - end; - end; -end; - -class function TBasedxReportLink.ExtractComponentClass(AStream: TStream; - ARaiseException: Boolean = False): TComponentClass; -var - StorageInfo: TdxPSDataStorageInfo; -begin - try - StorageInfo := ExtractStorageInfo(AStream, ARaiseException); - try - Result := StorageInfo.ComponentClass; - finally - FinalizeStorageInfo(StorageInfo); - end; - except - Result := nil; - if ARaiseException then raise; - end; -end; - -class function TBasedxReportLink.ExtractLinkClass(AStream: TStream; - ARaiseException: Boolean = False): TdxReportLinkClass; -var - StorageInfo: TdxPSDataStorageInfo; -begin - try - StorageInfo := ExtractStorageInfo(AStream, ARaiseException); - try - Result := StorageInfo.LinkClass; - finally - FinalizeStorageInfo(StorageInfo); - end; - except - Result := nil; - if ARaiseException then raise; - end; -end; - -class function TBasedxReportLink.ExtractOffsetTable(AStream: TStream; - ARaiseException: Boolean = False): TdxPSDataStorageOffsetTable; -var - P: {$IFDEF DELPHI6} Int64 {$ELSE} Integer {$ENDIF}; - Reader: TdxPSDataReader; -begin - Result := nil; - try - P := AStream.Position; - try - AStream.Position := 0; - Reader := CreateDataReader(AStream); - try - Result := ReadOffsetTable(Reader); - finally - Reader.Free; - end; - finally - AStream.Position := P; - end; - except - FreeAndNil(Result); - if ARaiseException then raise; - end; -end; - -class function TBasedxReportLink.ExtractReportDocument(AStream: TStream; - ARaiseException: Boolean = False): TdxPSReportDocument; -var - OffsetTable: TdxPSDataStorageOffsetTable; - P: {$IFDEF DELPHI6} Int64 {$ELSE} Integer {$ENDIF}; - Reader: TdxPSDataReader; -begin - Result := nil; - try - OffsetTable := ExtractOffsetTable(AStream, ARaiseException); - if OffsetTable <> nil then - try - P := AStream.Position; - AStream.Position := OffsetTable.Document; - try - Reader := CreateDataReader(AStream); - try - Result := GetReportDocumentClass.Create(nil); - ReadReportDocument(Reader, Result); - finally - Reader.Free; - end; - finally - AStream.Position := P; - end; - finally - OffsetTable.Free; - end; - except - FreeAndNil(Result); - if ARaiseException then raise; - end; -end; - -class function TBasedxReportLink.ExtractStorageInfo(AStream: TStream; - ARaiseException: Boolean = False): TdxPSDataStorageInfo; -var - OffsetTable: TdxPSDataStorageOffsetTable; - P: {$IFDEF DELPHI6} Int64 {$ELSE} Integer {$ENDIF}; - Reader: TdxPSDataReader; -begin - try - OffsetTable := ExtractOffsetTable(AStream, ARaiseException); - if OffsetTable <> nil then - try - P := AStream.Position; - AStream.Position := OffsetTable.Information; - try - Reader := CreateDataReader(AStream); - try - Result := ReadStorageInfo(Reader); - finally - Reader.Free; - end; - finally - AStream.Position := P; - end; - finally - OffsetTable.Free; - end; - except - FreeAndNil(Result); - if ARaiseException then raise; - end; -end; - -class function TBasedxReportLink.ExtractStorageVersion(AStream: TStream; - ARaiseException: Boolean = False): Integer; -var - StorageInfo: TdxPSDataStorageInfo; -begin - try - StorageInfo := ExtractStorageInfo(AStream, ARaiseException); - try - Result := StorageInfo.StorageVersion; - finally - FinalizeStorageInfo(StorageInfo); - end; - except - Result := dxPSGlbl.dxPSInvalidStorageVersion; - if ARaiseException then raise; - end; -end; - -class procedure TBasedxReportLink.FinalizeStorageInfo(var AStorageInfo: TdxPSDataStorageInfo); -begin - FreeAndNil(AStorageInfo); -end; - -class function TBasedxReportLink.PossibleDataStorage(AStream: TStream; - ARaiseException: Boolean = False): Boolean; -begin - Result := AStream <> nil; - if Result then - try - Result := ExtractStorageVersion(AStream, ARaiseException) = dxPSGlbl.dxPSStorageVersion; - except - Result := False; - if ARaiseException then raise; - end; -end; - -class function TBasedxReportLink.PossibleDataStorage(const AFileName: string; - ARaiseException: Boolean = False): Boolean; -var - Stream: TFileStream; -begin - Result := FileExists(AFileName); - if Result then - try - Stream := TFileStream.Create(AFileName, fmOpenRead or fmShareDenyWrite); - try - Result := PossibleDataStorage(Stream, ARaiseException); - finally - Stream.Free; - end; - except - Result := False; - if ARaiseException then raise; - end; -end; - -function TBasedxReportLink.AddBackgroundBitmapToPool(ABitmap: TBitmap): Integer; -begin - Result := BackgroundBitmapPool.Add(ABitmap); -end; - -function TBasedxReportLink.AddFontToPool(AFont: TFont): Integer; -begin - Result := FontPool.Add(AFont); -end; - -function TBasedxReportLink.CreateGroupLookAndFeel(AClass: TdxPSReportGroupLookAndFeelClass; - ACheckExisting: Boolean = True): TdxPSReportGroupLookAndFeel; -begin - if ReportCells <> nil then - Result := ReportCells.CreateGroupLookAndFeel(AClass, ACheckExisting) - else - Result := nil; -end; - -function TBasedxReportLink.FindGroupLookAndFeelByClass(AClass: TdxPSReportGroupLookAndFeelClass): TdxPSReportGroupLookAndFeel; -begin - if ReportCells <> nil then - Result := ReportCells.FindGroupLookAndFeelByClass(AClass) - else - Result := nil; -end; - -function TBasedxReportLink.IndexOfReportGroupLookAndFeel(ALookAndFeel: TdxPSReportGroupLookAndFeel): Integer; -begin - if ReportCells <> nil then - Result := ReportCells.IndexOfReportGroupLookAndFeel(ALookAndFeel) - else - Result := -1; -end; - -procedure TBasedxReportLink.DrawPageHeader(APageIndex: Integer; ARect: TRect; - ATitleParts: TdxPageTitleParts; ADrawBackground: Boolean); -begin - if FPainting then - Renderer.RenderPageHeaderOrFooterContent(RealPrinterPage.PageHeader, - APageIndex, ARect, ATitleParts, ADrawBackground); -end; - -procedure TBasedxReportLink.DrawPageFooter(APageIndex: Integer; ARect: TRect; - ATitleParts: TdxPageTitleParts; ADrawBackground: Boolean); -begin - if FPainting then - Renderer.RenderPageHeaderOrFooterContent(RealPrinterPage.PageFooter, - APageIndex, ARect, ATitleParts, ADrawBackground); -end; - -procedure TBasedxReportLink.DrawCheckBox(Canvas: TCanvas; var R: TRect; - Checked, Enabled, FlatBorder: Boolean; BoldBorder: Boolean = False); -var - EdgeStyle: TdxCheckButtonEdgeStyle; -begin - if FPainting then - begin - EdgeStyle := cbes3D; - if FlatBorder then - EdgeStyle := cbesUltraFlat - else - if BoldBorder then - EdgeStyle := cbesBoldFlat; - Renderer.DrawCheckBox(Canvas.Handle, R, Checked, Enabled, False, EdgeStyle); - end; -end; - -procedure TBasedxReportLink.DrawCheckBox(Canvas: TCanvas; var R: TRect; - Checked, Enabled, IsRadio: Boolean; EdgeStyle: TdxCheckButtonEdgeStyle; - BorderColor: TColor = clWindowText); -begin - if FPainting then - Renderer.DrawCheckBox(Canvas.Handle, R, Checked, Enabled, IsRadio, EdgeStyle, BorderColor); -end; - -procedure TBasedxReportLink.DrawEdge(Canvas: TCanvas; var R: TRect; - EdgeMode: TdxCellEdgeMode; InnerEdge, OuterEdge: TdxCellEdgeStyle; - Sides: TdxCellSides = [csLeft..csBottom]; Soft: Boolean = True); -begin - if FPainting then - Renderer.DrawEdge(Canvas.Handle, R, EdgeMode, {InnerEdge, } OuterEdge, Sides, Soft, -1); -end; - -procedure TBasedxReportLink.DrawEllipse(Canvas: TCanvas; R: TRect; ForeColor, BkColor: TColor; - Pattern: TdxPSFillPatternClass; BorderColor: TColor; BorderThickness: Integer = 1); -begin - if FPainting then - Renderer.DrawEllipse(Canvas.Handle, R, ForeColor, BkColor, Pattern, BorderColor, BorderThickness); -end; - -procedure TBasedxReportLink.DrawExpandButton(Canvas: TCanvas; var R: TRect; - Expanded, DrawBorder, Edge3D, Edge3DSoft, Shadow, FillInterior: Boolean; - BorderColor, InteriorColor: TColor); -begin - if FPainting then - Renderer.DrawExpandButton(Canvas.Handle, R, Expanded, DrawBorder, Edge3D, - Edge3DSoft, Shadow, FillInterior, BorderColor, InteriorColor); -end; - -procedure TBasedxReportLink.DrawGlyph(DC: HDC; const R: TRect; AGlyph: Byte); -begin - if FPainting then - Renderer.DrawGlyph(DC, R, AGlyph); -end; - -procedure TBasedxReportLink.DrawGraphic(Canvas: TCanvas; var R: TRect; - const ClipRect: TRect; ImageList: TCustomImageList; ImageIndex: Integer; - Graphic: TGraphic; GraphicTransparent, Transparent: Boolean; BkColor: TColor); -begin - if FPainting then - Renderer.DrawGraphic(Canvas.Handle, R, ClipRect, ImageList, ImageIndex, - Graphic, GraphicTransparent, Transparent, BkColor); -end; - -procedure TBasedxReportLink.DrawGraphicEx(Canvas: TCanvas; var R: TRect; - const ClipRect: TRect; ImageList: TCustomImageList; ImageIndex: Integer; - Graphic: TGraphic; GraphicTransparent, Transparent: Boolean; - BkColor, ForeColor: TColor; Pattern: TdxPSFillPatternClass; - AnActualImageBuffering: TdxCellImageActualBuffering = cibAlways); -begin - if FPainting then - Renderer.DrawGraphicEx(Canvas.Handle, R, ClipRect, ImageList, ImageIndex, - Graphic, GraphicTransparent, Transparent, BkColor, ForeColor, Pattern, - AnActualImageBuffering); -end; - -procedure TBasedxReportLink.DrawRectangle(Canvas: TCanvas; R: TRect; - ForeColor, BkColor: TColor; ContentPattern: TdxPSFillPatternClass; BorderColor: TColor; - BorderThickness: Integer = 1); -begin - if FPainting then - Renderer.DrawRectangle(Canvas.Handle, R, ForeColor, BkColor, ContentPattern, - BorderColor, BorderThickness); -end; - -procedure TBasedxReportLink.DrawRoundRect(Canvas: TCanvas; R: TRect; - CornerWidth, CornerHeight: Integer; ForeColor, BkColor: TColor; - ContentPattern: TdxPSFillPatternClass; BorderColor: TColor; - BorderThickness: Integer = 1); -begin - if FPainting then - Renderer.DrawRoundRect(Canvas.Handle, R, CornerWidth, CornerHeight, - ForeColor, BkColor, ContentPattern, BorderColor, BorderThickness); -end; - -procedure TBasedxReportLink.DrawSortMark(Canvas: TCanvas; var R: TRect; - SortOrder: TdxCellSortOrder; Mono: Boolean); -begin - if FPainting and (SortOrder <> csoNone) then - Renderer.DrawSortMark(Canvas.Handle, R, SortOrder, Mono); -end; - -procedure TBasedxReportLink.DrawText(Canvas: TCanvas; var R: TRect; AIndent: Integer; - const Text: string; Font: TFont; BkColor: TColor; TextAlignX: TcxTextAlignX; - TextAlignY: TcxTextAlignY; FillBackground, Multiline, EndEllipsis: Boolean); -begin - if FPainting then - Renderer.DrawText(Canvas.Handle, R, 0, AIndent, 0, Text, Font, BkColor, - TextAlignX, TextAlignY, FillBackground, Multiline, EndEllipsis, True, True); -end; - -procedure TBasedxReportLink.DrawTextEx(Canvas: TCanvas; var R: TRect; - MaxLineCount: Integer; LeftIndent, RightIndent: Integer; const Text: string; - Font: TFont; BkColor: TColor; TextAlignX: TcxTextAlignX; TextAlignY: TcxTextAlignY; - FillBackground, Multiline, EndEllipsis, PreventLeftTextExceed, - PreventTopTextExceed: Boolean); -begin - if FPainting then - Renderer.DrawText(Canvas.Handle, R, MaxLineCount, LeftIndent, RightIndent, - Text, Font, BkColor, TextAlignX, TextAlignY, FillBackground, Multiline, - EndEllipsis, PreventLeftTextExceed, PreventTopTextExceed); -end; - -procedure TBasedxReportLink.FillEllipse(Canvas: TCanvas; const R: TRect; Color: TColor); -begin - if FPainting then - Renderer.FillEllipse(Canvas.Handle, R, Color); -end; - -procedure TBasedxReportLink.FillEllipseEx(Canvas: TCanvas; const R: TRect; - ForeColor, BkColor: TColor; Pattern: TdxPSFillPatternClass); -begin - if FPainting then - Renderer.FillEllipseEx(Canvas.Handle, R, ForeColor, BkColor, Pattern); -end; - -procedure TBasedxReportLink.FillRectEx(Canvas: TCanvas; const R: TRect; - ForeColor, BkColor: TColor; Pattern: TdxPSFillPatternClass); -begin - if FPainting then - Renderer.FillRectEx(Canvas.Handle, R, ForeColor, BkColor, Pattern); -end; - -procedure TBasedxReportLink.FillRoundRect(Canvas: TCanvas; const R: TRect; - CornerWidth, CornerHeight: Integer; Color: TColor); -begin - if FPainting then - Renderer.FillRoundRect(Canvas.Handle, R, CornerWidth, CornerHeight, Color); -end; - -procedure TBasedxReportLink.FillRoundRectEx(Canvas: TCanvas; const R: TRect; - CornerWidth, CornerHeight: Integer; ForeColor, BkColor: TColor; - Pattern: TdxPSFillPatternClass); -begin - if FPainting then - Renderer.FillRoundRectEx(Canvas.Handle, R, CornerWidth, CornerHeight, - ForeColor, BkColor, Pattern); -end; - -procedure TBasedxReportLink.FillRgnEx(Canvas: TCanvas; Rgn: HRGN; - ForeColor, BkColor: TColor; Pattern: TdxPSFillPatternClass); -begin - if FPainting then - Renderer.FillRgnEx(Canvas.Handle, Rgn, ForeColor, BkColor, Pattern); -end; - -procedure TBasedxReportLink.FrameEllipse(Canvas: TCanvas; R: TRect; Color: TColor; - Thickness: Integer = 1); -begin - if FPainting then - Renderer.FrameEllipse(Canvas.Handle, R, Color, Thickness); -end; - -procedure TBasedxReportLink.FrameRect(Canvas: TCanvas; R: TRect; Color: TColor; - Sides: TdxCellSides = [csLeft..csBottom]; Thickness: Integer = 1); -begin - if FPainting then - Renderer.FrameRect(Canvas.Handle, R, Color, Sides, Thickness); -end; - -procedure TBasedxReportLink.FrameRoundRect(Canvas: TCanvas; R: TRect; - CornerWidth, CornerHeight: Integer; Color: TColor; Thickness: Integer = 1); -begin - if FPainting then - Renderer.FrameRoundRect(Canvas.Handle, R, CornerWidth, CornerHeight, Color, Thickness); -end; - -function TBasedxReportLink.RealPageIndexToVirtualPageIndex(APageIndex: Integer; - ATakeIntoAccountEmptyPages: Boolean): Integer; -begin - Result := RenderInfo.RealPageIndexToVirtualPageIndex(APageIndex, ATakeIntoAccountEmptyPages); -end; - -function TBasedxReportLink.VirtualPageIndexToRealPageIndex(APageIndex: Integer): Integer; -begin - Result := RenderInfo.VirtualPageIndexToRealPageIndex(APageIndex); -end; - -{$IFNDEF DELPHI6} - -{ IUnknown } - -function TBasedxReportLink.QueryInterface(const IID: TGUID; out Obj): HRESULT; -begin - if GetInterface(IID, Obj) then - Result := S_OK - else - Result := E_NOINTERFACE; -end; - -function TBasedxReportLink._Addref: Integer; -begin - Result := -1; -end; - -function TBasedxReportLink._Release: Integer; -begin - Result := -1; -end; - -{$ENDIF} - -procedure TBasedxReportLink.AssignTo(Dest: TPersistent); -begin - if Dest is TBasedxPrintStyle then - TBasedxPrintStyle(Dest).PrinterPage := PrinterPage - else - inherited; -end; - -procedure TBasedxReportLink.DefineProperties(Filer: TFiler); -begin - inherited DefineProperties(Filer); - Filer.DefineProperty('BuiltInReportLink', ReadBuiltIn, WriteBuiltIn, True); - Filer.DefineProperty('IsDesignerCaptionAssigned', ReadIsDesignerCaptionAssigned, WriteIsDesignerCaptionAssigned, - FIsDesignerCaptionAssigned and (DesignerCaption = '')); - Filer.DefineProperty('LinkedComponentName', - ReadComponentName, WriteComponentName, InternalStreaming and (Component <> nil)); - Filer.DefineProperty('StyleManagerName', - ReadStyleManagerName, WriteStyleManagerName, InternalStreaming and (StyleManager <> nil)); -end; - -procedure TBasedxReportLink.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if Operation = opRemove then - begin - if AComponent = Component then Component := nil; - if AComponent = StyleManager then StyleManager := nil; - end; -end; - -procedure TBasedxReportLink.ReadState(Reader: TReader); -begin - inherited ReadState(Reader); - if Reader.Parent is TCustomdxComponentPrinter then - ComponentPrinter := Reader.Parent as TCustomdxComponentPrinter; -end; - -procedure TBasedxReportLink.SetName(const NewName: TComponentName); -begin - inherited SetName(NewName); - if Caption = '' then Caption := NewName; - DesignerUpdate(False); -end; - -procedure TBasedxReportLink.SetParentComponent(AParent: TComponent); -begin - inherited; - if not IsLoading then - ComponentPrinter := AParent as TCustomdxComponentPrinter; -end; - -procedure TBasedxReportLink.FontChanged(Sender: TObject); -begin - LinkModified(True); -end; - -procedure TBasedxReportLink.LinkModified(Value: Boolean); -var - Compositions: TList; - I: Integer; -begin - FRebuildNeeded := Value; - if ComponentPrinter <> nil then - begin - Compositions := TList.Create; - try - ComponentPrinter.GetCompositionsByLink(Self, Compositions); - for I := 0 to Compositions.Count - 1 do - TdxCompositionReportLink(Compositions[I]).LinkModified(Value); - finally - Compositions.Free; - end; - end; -end; - -function TBasedxReportLink.IsFontStored: Boolean; -begin - Result := not dxPSUtl.dxAreFontsEqual(Font, DefaultFont); -end; - -procedure TBasedxReportLink.SetColor(Value: TColor); -begin - if FColor <> Value then - begin - FColor := Value; - LinkModified(True); - end; -end; - -procedure TBasedxReportLink.SetContinuousPageIndexes(Value: Boolean); -begin -end; - -procedure TBasedxReportLink.SetFont(Value: TFont); -begin - Font.Assign(Value); -end; - -procedure TBasedxReportLink.SetTransparent(Value: Boolean); -begin - if FTransparent <> Value then - begin - FTransparent := Value; - LinkModified(True); - end; -end; - -procedure TBasedxReportLink.AfterDesignReport(ADone: Boolean); -begin - if ComponentPrinter <> nil then - ComponentPrinter.DoDesignReport(Self, ADone); -end; - -procedure TBasedxReportLink.BeforeDesignReport; -begin - if ComponentPrinter <> nil then - ComponentPrinter.DoBeforeDesignReport(Self); -end; - -procedure TBasedxReportLink.AfterPrinting; -begin - if CurrentPrintStyle <> nil then CurrentPrintStyle.AfterPrinting; -end; - -procedure TBasedxReportLink.BeforePrinting; -begin - if CurrentPrintStyle <> nil then CurrentPrintStyle.BeforePrinting; -end; - -function TBasedxReportLink.GetBreakPagesByHardDelimiters: Boolean; -begin - Result := False; -end; - -function TBasedxReportLink.CalculateActualScaleFactor: Integer; -begin - with RealPrinterPage do - begin - // Get Result in internal units -> convert from LoMetric to Inches and then from Inches to internal units (units used inside PS) - Result := MulDiv(PaintRectLoMetric.Right - PaintRectLoMetric.Left, FUnitsPerInch, 254); - // Take into account ScaleFactor - Result := MulDiv(Result, 100, ReportWidth) - 1; - end; -end; - -function TBasedxReportLink.CannotActivateReportErrorString: string; -begin - if DataSource = rldsComponent then - Result := cxGetResourceString(@sdxMissingComponent) - else - Result := cxGetResourceString(@sdxInvalidExternalStorage); -end; - -function TBasedxReportLink.CurrentComposition: TdxCompositionReportLink; -begin - if ComponentPrinter <> nil then - Result := ComponentPrinter.CurrentCompositionByLink(Self) - else - Result := nil; -end; - -procedure TBasedxReportLink.SetRealPrinterPage(Value: TdxPrinterPage); -begin - RealPrinterPage.Assign(Value); -end; - -function TBasedxReportLink.GetAllowContinuousPageIndexes: Boolean; -begin - Result := False; -end; - -function TBasedxReportLink.GetAlwaysBufferedGraphics: Boolean; -begin - Result := True; -end; - -function TBasedxReportLink.GetContinuousPageIndexes: Boolean; -begin - Result := False; -end; - -function TBasedxReportLink.GetEmptyPagesCanExist: Boolean; -begin - Result := False; -end; - -procedure TBasedxReportLink.SetFootersOnEveryPage(Value: Boolean); -begin - if not IsAggregated then FFootersOnEveryPage := Value -end; - -procedure TBasedxReportLink.SetHeadersOnEveryPage(Value: Boolean); -begin - if not IsAggregated then FHeadersOnEveryPage := Value -end; - -function TBasedxReportLink.GetRealScaleFactor: Integer; -begin - with RealPrinterPage do - if ScaleMode = smAdjust then - Result := ScaleFactor - else - Result := CalculateActualScaleFactor; -end; - -function TBasedxReportLink.GetReportHeight: Integer; -begin - if ReportCells <> nil then - Result := ReportCells.CalculateTotalHeight - else - Result := 0; -end; - -function TBasedxReportLink.GetReportWidth: Integer; -begin - if ReportCells <> nil then - Result := ReportCells.CalculateTotalWidth - else - Result := 0; -end; - -procedure TBasedxReportLink.DefineStylesClick(Sender: TObject); -begin - DefinePrintStylesDlg; -end; - -procedure TBasedxReportLink.StyleClick(Sender: TObject); -var - PreviewBtnClicked, PrintBtnClicked: Boolean; - PrevCurrentStyle, Style: TBasedxPrintStyle; -begin - if StyleManager = nil then Exit; - - try - Style := dxPSPageSetupMenuBuilderFactory.ActiveBuilder.ExtractPrintStyleFromObj(Sender); - except - Style := nil; - Application.HandleException(Self); - end; - if Style = nil then Exit; - - PrevCurrentStyle := StyleManager.CurrentStyle; - StyleManager.CurrentStyle := Style; - - if (ComponentPrinter <> nil) and not ComponentPrinter.IsForegroundPreviewWindow then - begin - if not PageSetupEx(0, True, True, PreviewBtnClicked, PrintBtnClicked) then - StyleManager.CurrentStyle := PrevCurrentStyle; - - if PrintBtnClicked then - Print(True, nil) - else - if PreviewBtnClicked then Preview(True); - end; -end; - -procedure TBasedxReportLink.SetCurrentPage(Value: Integer); -begin - if Value < 1 then - Value := 1; - if Value > PageCount then - Value := PageCount; - FCurrentPage := Value; -end; - -procedure TBasedxReportLink.DoCustomDrawEntirePage(ACanvas: TCanvas; R: TRect; - ARealPageIndex: Integer); -var - Nom: Integer; -begin - with ComponentPrinter do - begin - Nom := 100; - if PreviewExists then - Nom := PreviewWindow.ZoomFactor; - DoCustomDrawEntirePage(Self, ACanvas, ARealPageIndex, R, Nom, 100); - end; -end; - -procedure TBasedxReportLink.DoCustomDrawPageHeaderOrFooter(AHFObject: TCustomdxPageObject; - ACanvas: TCanvas; APageIndex: Integer; R: TRect; - var ADefaultDrawText, ADefaultDrawBackground: Boolean); -begin - DoParentCustomDrawPageHeaderOrFooter(AHFObject, ACanvas, APageIndex, R, - ADefaultDrawText, ADefaultDrawBackground, PixelsNumerator); - if ADefaultDrawText or ADefaultDrawBackground then - if AHFObject is TdxPageHeader then - begin - if Assigned(FOnCustomDrawPageHeader) then - FOnCustomDrawPageHeader(Self, ACanvas, APageIndex, R, - PixelsNumerator, PixelsDenominator, ADefaultDrawText, ADefaultDrawBackground) - end - else - if Assigned(FOnCustomDrawPageFooter) then - FOnCustomDrawPageFooter(Self, ACanvas, APageIndex, R, - PixelsNumerator, PixelsDenominator, ADefaultDrawText, ADefaultDrawBackground); -end; - -procedure TBasedxReportLink.DoCustomDrawPageTitle(ACanvas: TCanvas; R: TRect; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var AColor: TColor; AFont: TFont; var ADone: Boolean); -begin - DoParentCustomDrawReportTitle(ACanvas, R, ATextAlignX, ATextAlignY, - AColor, AFont, ADone, PixelsNumerator); - if not ADone and Assigned(FOnCustomDrawReportLinkTitle) then - FOnCustomDrawReportLinkTitle(Self, ACanvas, R, PixelsNumerator, - PixelsDenominator, ATextAlignX, ATextAlignY, AColor, AFont, ADone); -end; - -procedure TBasedxReportLink.DoParentCustomDrawPageHeaderOrFooter( - AHFObject: TCustomdxPageObject; ACanvas: TCanvas; APageIndex: Integer; - R: TRect; var ADefaultDrawText, ADefaultDrawBackground: Boolean; - APixelsNumerator: Integer); -begin - ComponentPrinter.DoCustomDrawPageHeaderOrFooter(Self, AHFObject, ACanvas, - APageIndex, R, ADefaultDrawText, ADefaultDrawBackground, APixelsNumerator); -end; - -procedure TBasedxReportLink.DoParentCustomDrawReportTitle(ACanvas: TCanvas; R: TRect; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var AColor: TColor; AFont: TFont; var ADone: Boolean; APixelsNumerator: Integer); -begin - ComponentPrinter.DoCustomDrawReportTitle(Self, ACanvas, R, ATextAlignX, ATextAlignY, - AColor, AFont, ADone, APixelsNumerator); -end; - -procedure TBasedxReportLink.PaintPage(ACanvas: TCanvas; const APageBounds: TRect; - APageIndex, AContinuousPageIndex, AZoomFactor: Integer); //; ARenderer: TdxPSReportRenderer); -begin - FPainting := True; - try - Renderer.RenderPage(ACanvas, APageBounds, APageIndex, AContinuousPageIndex, AZoomFactor); - finally - FPainting := False; - end; -end; - -function TBasedxReportLink.IsEntirePageCustomDrawn: Boolean; -begin - Result := Assigned(ComponentPrinter.FOnCustomDrawPage); -end; - -function TBasedxReportLink.IsHeaderOrFooterCustomDrawn(AHFObject: TCustomdxPageObject): Boolean; -begin - if AHFObject is TdxPageHeader then - Result := Assigned(ComponentPrinter.FOnCustomDrawPageHeader) or Assigned(FOnCustomDrawPageHeader) - else - Result := Assigned(ComponentPrinter.FOnCustomDrawPageFooter) or Assigned(FOnCustomDrawPageFooter); -end; - -function TBasedxReportLink.IsTitleCustomDrawn: Boolean; -begin - Result := - Assigned(ComponentPrinter.FOnCustomDrawReportTitle) or - Assigned(FOnCustomDrawReportLinkTitle); -end; - -function TBasedxReportLink.IsComposable(AComposition: TdxCompositionReportLink): Boolean; -begin - Result := True; -end; - -function TBasedxReportLink.IsSupportedStyle(APrintStyle: TBasedxPrintStyle): Boolean; -begin - Result := True; - if Assigned(FOnFilterStyle) then - begin - FOnFilterStyle(Self, APrintStyle, Result); - if not Result and (APrintStyle = CurrentPrintStyle) then - Result := True; - end; -end; - -function TBasedxReportLink.NeedTwoPassRendering: Boolean; -begin - Result := False; -end; - -procedure TBasedxReportLink.DesignerModified; -begin - if ComponentPrinter <> nil then ComponentPrinter.DesignerModified; -end; - -procedure TBasedxReportLink.DesignerUpdate(TheAll: Boolean); -begin - if ComponentPrinter <> nil then - if TheAll then - ComponentPrinter.DesignerUpdate(nil) - else - ComponentPrinter.DesignerUpdate(Self); -end; - -function TBasedxReportLink.IsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -function TBasedxReportLink.IsDestroying: Boolean; -begin - Result := csDestroying in ComponentState; -end; - -function TBasedxReportLink.IsLoading: Boolean; -begin - Result := csLoading in ComponentState; -end; - -procedure TBasedxReportLink.DoMeasureReportLinkTitle(var AHeight: Integer); -begin - if ComponentPrinter <> nil then - ComponentPrinter.DoMeasureReportTitle(Self, AHeight); - if Assigned(FOnMeasureReportLinkTitle) then - FOnMeasureReportLinkTitle(Self, AHeight); -end; - -function TBasedxReportLink.GetCriticalSize(AReportCells: TdxReportCells): Integer; -begin - with AReportCells.BoundsRect do - Result := Right - Left; -end; - -procedure TBasedxReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin -end; - -function TBasedxReportLink.NeedCalcEmptyPages: Boolean; -begin - Result := EmptyPagesCanExist and not ShrinkToPageWidth; -end; - -function TBasedxReportLink.PageReady(APageIndex: Integer): Boolean; -begin - Result := True; -end; - -procedure TBasedxReportLink.PrepareFonts(UPI: Integer); -begin - if FFontPool <> nil then FontPool.PrepareFonts(UPI); -end; - -procedure TBasedxReportLink.PrepareLongOperation; -begin - if ComponentPrinter <> nil then ComponentPrinter.PrepareLongOperation; -end; - -procedure TBasedxReportLink.UnprepareLongOperation; -begin - if ComponentPrinter <> nil then ComponentPrinter.UnprepareLongOperation; -end; - -function TBasedxReportLink.CreateReportDocument: TdxPSReportDocument; -begin - Result := GetReportDocumentClass.Create(Self); -end; - -procedure TBasedxReportLink.DocumentChanged(Sender: TObject); -begin - if IsCurrentLink then - dxHFFormatObject.DateTime := DateTime; -end; - -class function TBasedxReportLink.GetReportDocumentClass: TdxPSReportDocumentClass; -begin - Result := TdxPSReportDocument; -end; - -function TBasedxReportLink.CreateReportCells: TdxReportCells; -begin - Result := GetReportCellsClass.Create(Self); -end; - -function TBasedxReportLink.GetReportCellsClass: TdxReportCellsClass; -begin - Result := TdxReportCells; -end; - -class function TBasedxReportLink.CreateDataReader(AStream: TStream): TdxPSDataReader; -begin - Result := TdxPSDataReader.Create(AStream, 4096); -end; - -class function TBasedxReportLink.CreateDataWriter(AStream: TStream): TdxPSDataWriter; -begin - Result := TdxPSDataWriter.Create(AStream, 4096); -end; - -class function TBasedxReportLink.GetDataReaderClass: TdxPSDataReaderClass; -begin - Result := dxPSReaderFactory.ActualReaderClass; -end; - -class function TBasedxReportLink.GetDataWriterClass: TdxPSDataWriterClass; -begin - Result := dxPSWriterFactory.ActualWriterClass; -end; - -procedure TBasedxReportLink.InternalLoadDataFromStream(AStream: TStream); -var - Reader: TdxPSDataReader; -begin - Include(FState, rlsDataLoading); - try - Reader := CreateDataReader(AStream); - try - try - InternalReadData(Reader); - except - ClearGDIPools; - AddFontToPool(Font); - ReportTitle.Assign(FSavedReportTitle); - ReportDocument.Assign(FSavedReportDocument); - raise; - end; - finally - Reader.Free; - end; - finally - Exclude(FState, rlsDataLoading); - end; -end; - -procedure TBasedxReportLink.InternalReadData(AReader: TdxPSDataReader); -var - OffsetTable: TdxPSDataStorageOffsetTable; -begin - OffsetTable := ReadOffsetTable(AReader); - try - AReader.Position := OffsetTable.Information; - SkipStorageInfo(AReader); - - AReader.Position := OffsetTable.Document; - ReadReportDocument(AReader, ReportDocument); - - AReader.Position := OffsetTable.Title; - ReadTitle(AReader); - - AReader.Position := OffsetTable.Data; - ReadData(AReader); - finally - OffsetTable.Free; - end; -end; - -procedure TBasedxReportLink.InternalWriteData(AWriter: TdxPSDataWriter); -var - OffsetTable: TdxPSDataStorageOffsetTable; - P: Longint; -begin - WriteOffsetTable(AWriter, nil); - - OffsetTable := TdxPSDataStorageOffsetTable.Create(nil); - try - OffsetTable.Information := AWriter.Position; - WriteStorageInfo(AWriter, RetrieveStorageInfo); - - OffsetTable.Document := AWriter.Position; - WriteReportDocument(AWriter, ReportDocument); - - OffsetTable.Title := AWriter.Position; - WriteTitle(AWriter); - - OffsetTable.Data := AWriter.Position; - WriteData(AWriter); - - P := AWriter.Position; - AWriter.Position := 0; - - WriteOffsetTable(AWriter, OffsetTable); - finally - OffsetTable.Free; - end; - AWriter.Position := P; -end; - -function TBasedxReportLink.IsRebuildNeededAndAllowed(ACheckPreviewMode: Boolean): Boolean; -begin - Result := IsCurrentLink and DataProviderPresent and not IsAggregated and - (not ACheckPreviewMode or PreviewExists); -end; - -function TBasedxReportLink.RetrieveStorageInfo: TdxPSDataStorageInfo; -begin - Result := TdxPSDataStorageInfo.Create(Self); -end; - -procedure TBasedxReportLink.ReadData(AReader: TdxPSDataReader); -begin - ReadReportData(AReader); - ReadRenderInfo(AReader); - ReadBackgroundBitmapPool(AReader); - ReadFontPool(AReader); -end; - -class function TBasedxReportLink.ReadOffsetTable(AReader: TdxPSDataReader): TdxPSDataStorageOffsetTable; -begin - Result := TdxPSDataStorageOffsetTable.Create(nil); - Result.ReadData(AReader); -end; - -class procedure TBasedxReportLink.ReadReportDocument(AReader: TdxPSDataReader; - AReportDocument: TdxPSReportDocument); -begin - AReportDocument.ReadData(AReader); -end; - -class function TBasedxReportLink.ReadStorageInfo(AReader: TdxPSDataReader): TdxPSDataStorageInfo; -begin - Result := TdxPSDataStorageInfo.Create(nil); - Result.ReadData(AReader); -end; - -class procedure TBasedxReportLink.SkipStorageInfo(AReader: TdxPSDataReader); -var - StorageInfo: TdxPSDataStorageInfo; -begin - StorageInfo := nil; - try - StorageInfo := ReadStorageInfo(AReader); - except - FreeAndNil(StorageInfo); - raise; - end; -end; - -procedure TBasedxReportLink.ReadTitle(AReader: TdxPSDataReader); -begin - ReportTitle.ReadData(AReader); -end; - -procedure TBasedxReportLink.WriteData(AWriter: TdxPSDataWriter); -begin - WriteReportData(AWriter); - WriteRenderInfo(AWriter); - WriteBackgroundBitmapPool(AWriter); - WriteFontPool(AWriter); -end; - -class procedure TBasedxReportLink.WriteOffsetTable(AWriter: TdxPSDataWriter; - AnOffsetTable: TdxPSDataStorageOffsetTable); -var - OffsetTable: TdxPSDataStorageOffsetTable; -begin - OffsetTable := TdxPSDataStorageOffsetTable.Create(AnOffsetTable); - try - OffsetTable.WriteData(AWriter); - finally - OffsetTable.Free; - end; -end; - -class procedure TBasedxReportLink.WriteStorageInfo(AWriter: TdxPSDataWriter; - AStorageInfo: TdxPSDataStorageInfo); -begin - AStorageInfo.WriteData(AWriter); -end; - -class procedure TBasedxReportLink.WriteReportDocument(AWriter: TdxPSDataWriter; - AReportDocument: TdxPSReportDocument); -begin - AReportDocument.WriteData(AWriter); -end; - -procedure TBasedxReportLink.WriteTitle(AWriter: TdxPSDataWriter); -begin - ReportTitle.WriteData(AWriter); -end; - -procedure TBasedxReportLink.ReadBackgroundBitmapPool(AReader: TdxPSDataReader); -begin - BackgroundBitmapPool.ReadData(AReader); -end; - -procedure TBasedxReportLink.ReadReportData(AReader: TdxPSDataReader); -begin - if FReportCells = nil then FReportCells := TdxReportCells.Create(Self); - ReportCells.ReadData(AReader); -end; - -procedure TBasedxReportLink.ReadFontPool(AReader: TdxPSDataReader); -begin - FontPool.ReadData(AReader); -end; - -procedure TBasedxReportLink.ReadRenderInfo(AReader: TdxPSDataReader); -begin - RenderInfo.ReadData(AReader); -end; - -procedure TBasedxReportLink.WriteBackgroundBitmapPool(AWriter: TdxPSDataWriter); -begin - BackgroundBitmapPool.WriteData(AWriter); -end; - -procedure TBasedxReportLink.WriteFontPool(AWriter: TdxPSDataWriter); -begin - FontPool.WriteData(AWriter); -end; - -procedure TBasedxReportLink.WriteReportData(AWriter: TdxPSDataWriter); -begin - ReportCells.WriteData(AWriter); -end; - -procedure TBasedxReportLink.WriteRenderInfo(AWriter: TdxPSDataWriter); -begin - RenderInfo.WriteData(AWriter); -end; - -procedure TBasedxReportLink.SetActive(Value: Boolean); -begin - if (csReading in ComponentState) and Value then - FStreamedActive := Value - else - if (FActive <> Value) and (ComponentPrinter <> nil) then - if Value then - ComponentPrinter.ActivateLink(Self) - else - ComponentPrinter.DeactivateLink(Self); -end; - -procedure TBasedxReportLink.SetComponent(Value: TComponent); -begin - if not (csReading in ComponentState) then - begin - if FComponent <> Value then - begin - if PreviewExists then - ComponentPrinter.DestroyPreviewWindow; - - if Value = nil then - begin - Active := False; - FComponent := nil; - end - else - if IsSupportedCompClass(TComponentClass(Value.ClassType)) then - SetComponentUnconditionally(Value) - else - ComponentUnsupportedError(Value); - - if not IsDestroying and not IsLoading then - begin - DoChangeComponent; - if ComponentPrinter <> nil then ComponentPrinter.DoChangeComponent(Self); - DesignerUpdate(False); - end; - end; - end - else - FComponent := Value; -end; - -procedure TBasedxReportLink.SetShowPageFooter(Value: Boolean); -begin - if FShowPageFooter <> Value then - begin - FShowPageFooter := Value; - ShowPageFooterChanged; - end; -end; - -procedure TBasedxReportLink.SetShowPageHeader(Value: Boolean); -begin - if FShowPageHeader <> Value then - begin - FShowPageHeader := Value; - ShowPageHeaderChanged; - end; -end; - -{procedure TBasedxReportLink.SetShrinkToPageHeight(Value: Boolean); -begin - -end;} - -procedure TBasedxReportLink.SetShrinkToPageWidth(Value: Boolean); -const - ScaleModeMap: array[Boolean] of TdxScaleMode = (smAdjust, smFit); -begin - if ShrinkToPageWidth <> Value then - begin - PrepareLongOperation; - try - with RealPrinterPage do - begin - BeginUpdate; - try - if Value then - begin - FitToPagesByTall := 1; - FitToPagesByWide := 1; - end; - ScaleMode := ScaleModeMap[Value]; - finally - EndUpdate; - end; - end; - finally - UnprepareLongOperation; - end; - end; -end; - -procedure TBasedxReportLink.SetShowEmptyPages(Value: Boolean); -begin - if FShowEmptyPages <> Value then - begin - FShowEmptyPages := Value; - ShowEmptyPagesChanged; - end; -end; - -procedure TBasedxReportLink.SetDateTime(const Value: TDateTime); -begin - ReportDocument.CreationDate := Value; -end; - -procedure TBasedxReportLink.SetDesignerCaption(const Value: string); -begin - if DesignerCaption <> Value then - begin - FDesignerCaption := Value; - FIsDesignerCaptionAssigned := True; - end; -end; - -procedure TBasedxReportLink.SetDescription(const Value: string); -begin - ReportDocument.Description := Value; -end; - -function TBasedxReportLink.GetDateFormat: Integer; -begin - if not (fvDate in AssignedFormatValues) and (ComponentPrinter <> nil) then - Result := ComponentPrinter.DateFormat - else - Result := FDateFormat; -end; - -function TBasedxReportLink.GetDateTime: TDateTime; -begin - Result := ReportDocument.CreationDate; -end; - -function TBasedxReportLink.GetDescription: string; -begin - Result := ReportDocument.Description; -end; - -function TBasedxReportLink.GetDesignerCaption: string; -begin - if FIsDesignerCaptionAssigned then - Result := FDesignerCaption - else - Result := DefaultDesignerCaption; -end; - -function TBasedxReportLink.GetIndex: Integer; -begin - if ComponentPrinter <> nil then - Result := ComponentPrinter.IndexOfLink(Self) - else - Result := -1; -end; - -function TBasedxReportLink.GetIsAggregated: Boolean; -begin - Result := Controller <> nil; -end; - -function TBasedxReportLink.GetIsBuilding: Boolean; -begin - Result := (ComponentPrinter <> nil) and (cpsBuilding in ComponentPrinter.State); -end; - -function TBasedxReportLink.GetIsCurrentLink: Boolean; -begin - Result := (ComponentPrinter <> nil) and (ComponentPrinter.CurrentLink = Self); -end; - -function TBasedxReportLink.GetPageHeight: Integer; -begin - with RealPrinterPage.PaintRectPixels do - Result := Bottom - Top - 1; -end; - -function TBasedxReportLink.GetPageNumberFormat: TdxPageNumberFormat; -begin - if not (fvPageNumber in AssignedFormatValues) and (ComponentPrinter <> nil) then - Result := ComponentPrinter.PageNumberFormat - else - Result := FPageNumberFormat; -end; - -function TBasedxReportLink.GetPageWidth: Integer; -begin - with RealPrinterPage.PaintRectPixels do - Result := Right - Left - 1; -end; - -function TBasedxReportLink.GetPreviewWindow: TBasedxPreviewWindow; -begin - if ComponentPrinter <> nil then - Result := ComponentPrinter.PreviewWindow - else - Result := nil; -end; - -function TBasedxReportLink.GetRealPrinterPage: TdxPrinterPage; -var - Style: TBasedxPrintStyle; - Composition: TdxCompositionReportLink; -begin - Result := nil; - if ComponentPrinter <> nil then - begin - Composition := ComponentPrinter.CurrentCompositionByLink(Self); - if Composition <> nil then Result := Composition.RealPrinterPage; - end; - if Result = nil then - begin - Style := CurrentPrintStyle; - if Style <> nil then - Result := Style.PrinterPage - else - Result := FPrinterPage; - end; -end; - -function TBasedxReportLink.GetReportTitleMode: TdxReportTitleMode; -begin - Result := ReportTitle.Mode; -end; - -function TBasedxReportLink.GetReportTitleText: string; -begin - Result := ReportTitle.Text; -end; - -function TBasedxReportLink.GetRenderer: TdxPSReportRenderer; -begin - if FRenderer = nil then FRenderer := CreateRenderer; - Result := FRenderer; -end; - -function TBasedxReportLink.GetRenderInfo: TdxPSReportRenderInfo; -begin - if FRenderInfo = nil then FRenderInfo := CreateRenderInfo; - Result := FRenderInfo; -end; - -function TBasedxReportLink.GetRenderStage: TdxPSRenderStages; -begin - if FPainting and (FRenderer <> nil) then - Result := Renderer.RenderStage - else - Result := []; -end; - -function TBasedxReportLink.GetShowEmptyPages: Boolean; -var - Composition: TdxCompositionReportLink; -begin - Result := FShowEmptyPages; - if ComponentPrinter <> nil then - begin - Composition := ComponentPrinter.CurrentCompositionByLink(Self); - if Composition <> nil then Result := Composition.ShowEmptyPages; - end; -end; - -function TBasedxReportLink.GetShowPageFooter: Boolean; -var - Composition: TdxCompositionReportLink; -begin - Result := FShowPageFooter; - if ComponentPrinter <> nil then - begin - Composition := ComponentPrinter.CurrentCompositionByLink(Self); - if Composition <> nil then Result := Composition.ShowPageFooter; - end; -end; - -function TBasedxReportLink.GetShowPageHeader: Boolean; -var - Composition: TdxCompositionReportLink; -begin - Result := FShowPageHeader; - if ComponentPrinter <> nil then - begin - Composition := ComponentPrinter.CurrentCompositionByLink(Self); - if Composition <> nil then Result := Composition.ShowPageHeader; - end; -end; - -{function TBasedxReportLink.GetShrinkToPageHeight: Boolean; -begin - with RealPrinterPage do - Result := (ScaleMode = smFit) and (FitToPagesByTall = 1); -end;} - -function TBasedxReportLink.GetShrinkToPageWidth: Boolean; -begin - with RealPrinterPage do - Result := (ScaleMode = smFit);// and (FitToPagesByWide = 1); -end; - -function TBasedxReportLink.GetStartPageIndex: Integer; -begin - Result := FStartPageIndex; -end; - -function TBasedxReportLink.GetTimeFormat: Integer; -begin - if not (fvTime in AssignedFormatValues) and (ComponentPrinter <> nil) then - Result := ComponentPrinter.TimeFormat - else - Result := FTimeFormat; -end; - -function TBasedxReportLink.GetVirtualPageCount: Integer; -begin - Result := RenderInfo.VirtualPageCount; -end; - -function TBasedxReportLink.IsDateFormatStored: Boolean; -begin - Result := fvDate in AssignedFormatValues; -end; - -function TBasedxReportLink.IsDesignerCaptionStored: Boolean; -begin - Result := FIsDesignerCaptionAssigned and (DesignerCaption <> DefaultDesignerCaption); -end; - -function TBasedxReportLink.IsTimeFormatStored: Boolean; -begin - Result := fvTime in AssignedFormatValues; -end; - -function TBasedxReportLink.IsPageNumberFormatStored: Boolean; -begin - Result := fvPageNumber in AssignedFormatValues; -end; - -procedure TBasedxReportLink.SetDateFormat(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > dxPgsDlg.DateFormats.Count - 1 then - Value := dxPgsDlg.DateFormats.Count - 1; - //if FDateFormat <> Value then - begin - FDateFormat := Value; - AssignFormats(fvDate, FDateFormat <> DefaultDateFormat); - if IsCurrentLink then - dxHFFormatObject.DateFormat := dxPgsDlg.DateFormats[FDateFormat]; - end; -end; - -procedure TBasedxReportLink.SetTimeFormat(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > dxPgsDlg.TimeFormats.Count - 1 then - Value := dxPgsDlg.TimeFormats.Count - 1; - //if FTimeFormat <> Value then - begin - FTimeFormat := Value; - AssignFormats(fvTime, FTimeFormat <> DefaultTimeFormat); - if IsCurrentLink then - dxHFFormatObject.TimeFormat := dxPgsDlg.TimeFormats[FTimeFormat]; - end; -end; - -procedure TBasedxReportLink.SetPageNumberFormat(Value: TdxPageNumberFormat); -begin - //if FPageNumberFormat <> Value then - begin - FPageNumberFormat := Value; - AssignFormats(fvPageNumber, FPageNumberFormat <> DefaultPageNumberFormat); - if IsCurrentLink then - dxHFFormatObject.PageNumberFormat := FPageNumberFormat; - end; -end; - -procedure TBasedxReportLink.SetAbortBuilding(Value: Boolean); -begin - if ComponentPrinter <> nil then - ComponentPrinter.AbortBuilding := Value; -end; - -procedure TBasedxReportLink.SetAssignedFormatValues(Value: TdxAssignedFormatValues); -begin - if DateFormat = DefaultDateFormat then - Exclude(Value, fvDate); - if TimeFormat = DefaultTimeFormat then - Exclude(Value, fvTime); - if PageNumberFormat = DefaultPageNumberFormat then - Exclude(Value, fvPageNumber); - if FAssignedFormatValues <> Value then - begin - FAssignedFormatValues := Value; - DesignerModified; - end; -end; - -procedure TBasedxReportLink.SetCaption(const Value: string); -begin - ReportDocument.Caption := Value; -end; - -function TBasedxReportLink.GetAbortBuilding: Boolean; -begin - Result := (ComponentPrinter <> nil) and ComponentPrinter.AbortBuilding; -end; - -function TBasedxReportLink.GetCaption: string; -begin - Result := ReportDocument.Caption; -end; - -function TBasedxReportLink.GetCurrentPrintStyle: TBasedxPrintStyle; -begin - if StyleManager <> nil then - Result := StyleManager.CurrentStyle - else - Result := nil; -end; - -function TBasedxReportLink.GetFontPool: TdxPSReportFontPool; -begin - if not IsAggregated then - begin - if FFontPool = nil then FFontPool := TdxPSReportFontPool.Create; - Result := FFontPool; - end - else - Result := Controller.FontPool; -end; - -function TBasedxReportLink.GetHasDesignWindow: Boolean; -begin - Result := DesignWindow <> nil; -end; - -function TBasedxReportLink.GetHasPreviewWindow: Boolean; -begin - Result := (ComponentPrinter <> nil) and (ComponentPrinter.PreviewWindow <> nil); -end; - -procedure TBasedxReportLink.RetrievePageAsImage(APageIndex: Integer; AGraphicClass: TGraphicClass; - AGraphic: TGraphic); -begin - if ComponentPrinter <> nil then - TdxComponentPrinter(ComponentPrinter).EnumPagesAsImages([APageIndex], - AGraphicClass, False, RetrievePageAsImageCallBack, AGraphic, nil, nil, Self); -end; - -procedure TBasedxReportLink.RetrievePageAsImageCallBack(AComponentPrinter: TCustomdxComponentPrinter; - AReportLink: TBasedxReportLink; AIndex, APageIndex: Integer; const AGraphic: TGraphic; - AData: Pointer; var AContinue: Boolean); -begin - TGraphic(AData).Assign(AGraphic); -end; - -procedure TBasedxReportLink.ShowEmptyPagesChanged; -begin - if EmptyPagesCanExist and (CurrentComposition = nil) then - CalculateRenderInfos; -end; - -procedure TBasedxReportLink.ShowPageFooterChanged; -begin - if CurrentComposition = nil then CalculateRenderInfos; -end; - -procedure TBasedxReportLink.ShowPageHeaderChanged; -begin - if CurrentComposition = nil then CalculateRenderInfos; -end; - -procedure TBasedxReportLink.StdProcessDataSourceDontPresent; -begin - raise EdxReportLink.Create(CannotActivateReportErrorString); -end; - -procedure TBasedxReportLink.TunePixelsNumerator(AReportCells: TdxReportCells); -const - MaxReportWidth = $7FFF; - MinFactor = 2; -var - Wo, W: Integer; -begin - Wo := GetCriticalSize(AReportCells); - W := MulDiv(Wo, RenderInfo.UnitsPerInch, PixelsDenominator); - if W > MaxReportWidth then - with RenderInfo do - begin - UnitsPerInch := MulDiv(PixelsDenominator, MaxReportWidth, Wo); - UnitsPerInch := UnitsPerInch - UnitsPerInch mod Screen.PixelsPerInch; - if UnitsPerInch < MinFactor * Screen.PixelsPerInch then - UnitsPerInch := MinFactor * Screen.PixelsPerInch; - end; -end; - -procedure TBasedxReportLink.CalculateRenderInfos; -begin - if DataProviderPresent then - begin - PrepareLongOperation; - try - RenderInfo.Calculate; - finally - UnprepareLongOperation; - end; - end; -end; - -procedure TBasedxReportLink.ClearGDIPools; -begin - BackgroundBitmapPool.Clear; - Renderer.BrushPool.Clear; - if (FFontPool <> nil) and not IsAggregated then - FontPool.Clear; -end; - -function TBasedxReportLink.CreateRenderInfo: TdxPSReportRenderInfo; -begin - Result := GetRenderInfoClass.Create(Self); -end; - -procedure TBasedxReportLink.FreeRenderInfos; -begin - FreeAndNil(FRenderInfo); -end; - -function TBasedxReportLink.GetRenderInfoClass: TdxPSReportRenderInfoClass; -begin - Result := TdxPSReportRenderInfo; -end; - -function TBasedxReportLink.CreateRenderer: TdxPSReportRenderer; -begin - Result := GetRendererClass.Create(Self); -end; - -procedure TBasedxReportLink.FreeRenderer; -begin - FreeAndNil(FRenderer); -end; - -function TBasedxReportLink.GetRendererClass: TdxPSReportRendererClass; -begin - Result := TdxPSReportRenderer; -end; - -procedure TBasedxReportLink.InitializeDefaultFont(AFont: TFont); -begin - AFont.CharSet := dxPSDefaultFontCharSet; - AFont.Color := dxPSDefaultFontColor; - AFont.Name := dxPSDefaultFontName; - AFont.Size := dxPSDefaultFontSize; - AFont.Style := dxPSDefaultFontStyle; -end; - -procedure TBasedxReportLink.InternalGetDelimiters(ADelimitersHorz, ADelimitersVert: TList); -begin - dxPSUtl.dxAppendList(RenderInfo.DelimiterXList, ADelimitersHorz); - dxPSUtl.dxAppendList(RenderInfo.DelimiterYList, ADelimitersVert); -end; - -function TBasedxReportLink.GetPageCount: Integer; -begin - Result := RenderInfo.NonEmptyPageCount; - if IsCurrentLink then - dxHFFormatObject.TotalPages := Result; -end; - -function TBasedxReportLink.GetUseHardVertDelimiters: Boolean; -begin - Result := False; -end; - -function TBasedxReportLink.GetVisiblePageCount: Integer; -begin - if ShowEmptyPages then - Result := VirtualPageCount - else - Result := PageCount; -end; - -function TBasedxReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := False; -end; - -procedure TBasedxReportLink.SetStorageName(const Value: string); -begin - if FStorageName <> Value then - begin - FStorageName := Value; - if FileExists(FStorageName) and (DataSource = rldsExternalStorage) then - LoadDataFromFile(FStorageName); - end; -end; - -procedure TBasedxReportLink.SetStyleManager(Value: TdxPrintStyleManager); -begin - if FStyleManager <> Value then - begin - FStyleManager := Value; - if Value <> nil then - Value.FreeNotification(Self); - if not IsDestroying then - PageParamsChanged(RealPrinterPage, CurrentPrintStyle, ucAll); - end; -end; - -procedure TBasedxReportLink.SetPrinterPage(Value: TdxPrinterPage); -begin - PrinterPage.Assign(Value); -end; - -procedure TBasedxReportLink.SetReportDocument(Value: TdxPSReportDocument); -begin - ReportDocument.Assign(Value); -end; - -procedure TBasedxReportLink.SetReportTitleMode(Value: TdxReportTitleMode); -begin - ReportTitle.Mode := Value; -end; - -procedure TBasedxReportLink.SetReportTitleText(const Value: string); -begin - ReportTitle.Text := Value; -end; - -procedure TBasedxReportLink.SetReportTitle(Value: TdxReportTitle); -begin - ReportTitle.Assign(Value); -end; - -procedure TBasedxReportLink.SetComponentPrinter(Value: TCustomdxComponentPrinter); -begin - if FComponentPrinter <> Value then - begin - if FComponentPrinter <> nil then FComponentPrinter.RemoveLink(Self); - if Value <> nil then Value.InsertLink(Self); - end; -end; - -procedure TBasedxReportLink.SetIsCurrentLink(Value: Boolean); -begin - if Value then - if not (csReading in ComponentState) and (ComponentPrinter <> nil) then - ComponentPrinter.CurrentLink := Self; -end; - -procedure TBasedxReportLink.SetDataSource(Value: TdxReportLinkDataSource); -begin - if FDataSource <> Value then - begin - FDataSource := Value; - DoDataSourceChanged; - end; -end; - -procedure TBasedxReportLink.SetIndex(Value: Integer); -var - CurIndex: Integer; -begin - if ComponentPrinter = nil then Exit; - if Value < 0 then Value := 0; - if Value > ComponentPrinter.LinkCount - 1 then - Value := ComponentPrinter.LinkCount - 1; - CurIndex := GetIndex; - if CurIndex <> Value then - ComponentPrinter.MoveLink(CurIndex, Value); -end; - -procedure TBasedxReportLink.ReadBuiltIn(Reader: TReader); -begin - FBuiltIn := Reader.ReadBoolean; -end; - -function GetComponentByName(const AName: string): TComponent; - - procedure CheckOwner(AOwner: TComponent); - var - I: Integer; - AComponent: TComponent; - begin - if Result <> nil then Exit; - for I := 0 to AOwner.ComponentCount - 1 do - begin - AComponent := AOwner.Components[I]; - if SameText(cxGetFullComponentName(AComponent), AName) then - begin - Result := AComponent; - break; - end - else - CheckOwner(AComponent); - end; - end; - -var - AOwner: TComponent; -begin - Result := nil; - AOwner := Application; - while AOwner.Owner <> nil do - AOwner := AOwner.Owner; - CheckOwner(AOwner); -end; - -procedure TBasedxReportLink.ReadComponentName(AReader: TReader); -begin - Component := GetComponentByName(AReader.ReadString); -end; - -procedure TBasedxReportLink.ReadIsDesignerCaptionAssigned(Reader: TReader); -begin - FIsDesignerCaptionAssigned := Reader.ReadBoolean; -end; - -procedure TBasedxReportLink.ReadStyleManagerName(AReader: TReader); -begin - StyleManager := GetComponentByName(AReader.ReadString) as TdxPrintStyleManager; -end; - -procedure TBasedxReportLink.WriteBuiltIn(Writer: TWriter); -begin - Writer.WriteBoolean(FBuiltIn); -end; - -procedure TBasedxReportLink.WriteComponentName(AWriter: TWriter); -begin - AWriter.WriteString(cxGetFullComponentName(Component)); -end; - -procedure TBasedxReportLink.WriteIsDesignerCaptionAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsDesignerCaptionAssigned); -end; - -procedure TBasedxReportLink.WriteStyleManagerName(AWriter: TWriter); -begin - AWriter.WriteString(cxGetFullComponentName(StyleManager)); -end; - -procedure TBasedxReportLink.InternalActivate; -begin - if DataProviderPresent then - try - AbortBuilding := False; - try - DoCreateReport; - finally - FRebuildNeeded := False; - FActive := True; - if AbortBuilding then - begin - FRebuildNeeded := True; - DoDestroyReport; - end; - end; - except - on E: Exception do - begin - DoDestroyReport; - if IsDesigning then - ShowException(E, ExceptAddr) - else - raise; - end; - end - else - DoDataProviderDontPresent; -end; - -procedure TBasedxReportLink.InternalRestoreDefaults; -begin - Transparent := True; - Color := dxDefaultContentColor; {clWhite} - Font := DefaultFont; - FootersOnEveryPage := False; - HeadersOnEveryPage := False; - - PageNumberFormat := DefaultPageNumberFormat; - DateFormat := DefaultDateFormat; - TimeFormat := DefaultTimeFormat; - - FIsDesignerCaptionAssigned := False; -end; - -procedure TBasedxReportLink.InternalRestoreFromOriginal; -begin - if Component is TControl then - begin - Color := dxPSUtl.Control_GetColor(TControl(Component)); - Font := dxPSUtl.Control_GetFont(TControl(Component)); - end; -end; - -procedure TBasedxReportLink.SetUseHorzDelimiters(Value: Boolean); -begin - if FUseHorzDelimiters <> Value then - begin - FUseHorzDelimiters := Value; - LinkModified(True); - end; -end; - -procedure TBasedxReportLink.SetUseVertDelimiters(Value: Boolean); -begin - if FUseVertDelimiters <> Value then - begin - FUseVertDelimiters := Value; - LinkModified(True); - end; -end; - -procedure TBasedxReportLink.AssignFormats(AnItem: TdxAssignedFormatValue; AValue: Boolean); -begin - if AValue then - Include(FAssignedFormatValues, AnItem) - else - Exclude(FAssignedFormatValues, AnItem); -end; - -function TBasedxReportLink.ValidateMargins: Boolean; -begin - Result := RealPrinterPage.ValidateMargins; - if not Result then - begin - Result := MessageQuestion(cxGetResourceString(@sdxOutsideMarginsMessage)); - if Result then - RealPrinterPage.FixMarginsOutSide; - end; -end; - -procedure TBasedxReportLink.SetStartPageIndex(Value: Integer); -begin - if Value < 1 then Value := 1; - if FStartPageIndex <> Value then - begin - FStartPageIndex := Value; - dxHFFormatObject.StartPageIndex := Value; - end; -end; - -procedure TBasedxReportLink.DoDestroy; -begin - if Assigned(FOnDestroy) then FOnDestroy(Self); -end; - -procedure TBasedxReportLink.ComponentUnsupportedError(AComponent: TComponent); -begin - if not IsDesigning then - raise EdxReportLink.CreateFmt(cxGetResourceString(@sdxComponentNotSupportedByLink), [AComponent.ClassName]); -end; - -procedure TBasedxReportLink.DoChangeComponent; -begin - if Assigned(FOnChangeComponent) then FOnChangeComponent(Self); -end; - -procedure TBasedxReportLink.DoProgress(const APercentDone: Double); -begin - if (ComponentPrinter <> nil) and not IsAggregated then - ComponentPrinter.DoProgress(Self, APercentDone); -end; - -function TBasedxReportLink.GetDesignerClass: TdxReportLinkDesignWindowClass; -begin - if Component <> nil then - Result := dxPSDesignerClassByCompClass(TComponentClass(Component.ClassType)) - else - Result := dxPSDesignerClassByLinkClass(LinkClass); -end; - -procedure TBasedxReportLink.DoApplyInDesigner; -begin - RebuildReport; -end; - -procedure TBasedxReportLink.DoCreateReport; -begin - if FReportCells = nil then - FReportCells := CreateReportCells; - DoCreateReportData; - - if not AbortBuilding and not IsInvalidReport then - if not IsAggregated then - begin - if IsWin9X then - TunePixelsNumerator(FReportCells); - FPixelsNumerator := RenderInfo.UnitsPerInch; - if DataSource = rldsComponent then - begin - PrepareReportGroupsLookAndFeels; - ConvertCoords; - RenderInfo.GetDelimiters; - end; - CalculateRenderInfos; - end - else - if DataSource = rldsComponent then RenderInfo.GetDelimiters; -end; - -procedure TBasedxReportLink.DoCreateReportData; -var - ReraiseException: Boolean; -begin - case DataSource of - rldsComponent: - ConstructReport(FReportCells); - - rldsExternalStorage: - try - InternalLoadDataFromStream(DataStream); - DataStream.Position := 0; - except - ReraiseException := (ComponentPrinter <> nil) and (ComponentPrinter.Explorer <> nil); - if not ReraiseException then - MessageError(Format(cxGetResourceString(@sdxReportFileLoadError), [StorageName])); - - FIsInvalidReport := True; - try - DataSource := rldsComponent; - finally - FIsInvalidReport := False; - end; - if ReraiseException then raise; - end; - end; -end; - -procedure TBasedxReportLink.DoDataProviderDontPresent; -begin - if (ComponentPrinter = nil) or (ComponentPrinter.CurrentCompositionByLink(Self) = nil) then - StdProcessDataSourceDontPresent; -end; - -procedure TBasedxReportLink.DoDestroyReport; -begin - FActive := False; - - PrepareLongOperation; - try - FreeAndNil(FReportCells); - if FRenderInfo <> nil then RenderInfo.Refresh; - if ComponentPrinter <> nil then ComponentPrinter.DoBeforeDestroyReport(Self); - finally - UnprepareLongOperation; - end; -end; - -procedure TBasedxReportLink.DoPageParamsChanged; -begin - if ComponentPrinter <> nil then - ComponentPrinter.DoPageParamsChanged(Self); -end; - -procedure TBasedxReportLink.CopyDataStreamFrom(AStream: TStream); -begin - AStream.Position := 0; - FinalizeDataStream; - FDataStream := TMemoryStream.Create; - FDataStream.CopyFrom(AStream, AStream.Size); - FDataStream.Position := 0; -end; - -procedure TBasedxReportLink.FinalizeDataStream; -begin - FreeAndNil(FDataStream); -end; - -function TBasedxReportLink.IsDrawFootersOnEveryPage: Boolean; -begin - Result := FootersOnEveryPage; -end; - -function TBasedxReportLink.IsDrawHeadersOnEveryPage: Boolean; -begin - Result := HeadersOnEveryPage; -end; - -procedure TBasedxReportLink.ConstructReport(AReportCells: TdxReportCells); -begin - ClearGDIPools; - AddFontToPool(Font); -end; - -procedure TBasedxReportLink.ConvertCoords; -begin - FReportCells.ConvertCoords(PixelsNumerator, PixelsDenominator); -end; - -procedure TBasedxReportLink.MakeDelimiters(AReportCells: TdxReportCells; - AHorzDelimiters, AVertDelimiters: TList); -begin -end; - -procedure TBasedxReportLink.MakeHardDelimiters(AReportCells: TdxReportCells; - AVertDelimiters: TList); -begin -end; - -procedure TBasedxReportLink.DoDataSourceChanged; -begin - if Assigned(FOnDataSourceChanged) then FOnDataSourceChanged(Self); - if IsRebuildNeededAndAllowed(True) then - begin - if DataSource = rldsComponent then - begin - ReportDocument.Assign(FSavedReportDocument); - ReportTitle.BeginUpdate; - try - ReportTitle.Assign(FSavedReportTitle); - finally - ReportTitle.CancelUpdate; - end; - end - else - begin - FSavedReportDocument.Assign(ReportDocument); - FSavedReportTitle.Assign(ReportTitle); - end; - RebuildReport; - end - else - if DataSource = rldsComponent then - DestroyReport; -end; - -procedure TBasedxReportLink.CustomDraw(AnItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); -begin -end; - -function TBasedxReportLink.IsScaleGridLines: Boolean; -begin - Result := True; -end; - -function TBasedxReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -begin - Result := False; -end; - -{ TdxCompositionLinkItem } - -constructor TdxCompositionLinkItem.Create(Collection: TCollection); -begin - inherited Create(Collection); - FBuiltIn := (Composition <> nil) and Composition.IsDesigning; -end; - -procedure TdxCompositionLinkItem.Assign(Source: TPersistent); - - function IsInheritedForm: Boolean; - begin - with Composition do - Result := (csUpdating in ComponentState) or (csUpdating in ComponentPrinter.ComponentState) or - ((ComponentPrinter.Owner <> nil) and (csUpdating in ComponentPrinter.Owner.ComponentState)); - end; - -begin - if Source is TdxCompositionLinkItem then - with TdxCompositionLinkItem(Source) do - if (ReportLink <> nil) and (Self.Composition <> nil) and (Self.Composition.ComponentPrinter <> nil) and IsInheritedForm then - Self.ReportLink := Self.Composition.ComponentPrinter.LinkByName(ReportLink.Name) - else - Self.ReportLink := ReportLink - else - inherited; -end; - -procedure TdxCompositionLinkItem.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('BuiltInCompositionItem', ReadData, WriteData, True); - Filer.DefineProperty('LinkName', ReadLinkName, WriteLinkName, - Composition.InternalStreaming and (ReportLink <> nil)); -end; - -procedure TdxCompositionLinkItem.SetIndex(Value: Integer); -begin - if Collection <> nil then - TdxCompositionLinkItems(Collection).FDontNeedRebuild := True; - inherited; -end; - -function TdxCompositionLinkItem.Composition: TdxCompositionReportLink; -begin - if Collection <> nil then - Result := TdxCompositionLinkItems(Collection).Composition - else - Result := nil; -end; - -procedure TdxCompositionLinkItem.SetReportLink(Value: TBasedxReportLink); -begin - if (FReportLink <> Value) and (Collection <> nil) and - ((Value = nil) or TdxCompositionLinkItems(Collection).IsLinkComposable(Value)) then - begin - if (FReportLink <> nil) and (Composition <> nil) and Composition.IsCurrentLink and - Composition.PreviewExists and not TdxCompositionLinkItems(Collection).LinkExists(Value) then - Composition.ComponentPrinter.DestroyPreviewWindow; - FReportLink := Value; - if Collection <> nil then - TdxCompositionLinkItems(Collection).FDontNeedRebuild := False; - Changed(True); - end; -end; - -procedure TdxCompositionLinkItem.ReadData(Reader: TReader); -begin - FBuiltIn := Reader.ReadBoolean; -end; - -procedure TdxCompositionLinkItem.ReadLinkName(Reader: TReader); -begin - FLoadingReportLinkName := Reader.ReadString; -end; - -procedure TdxCompositionLinkItem.WriteData(Writer: TWriter); -begin - Writer.WriteBoolean(FBuiltIn); -end; - -procedure TdxCompositionLinkItem.WriteLinkName(Writer: TWriter); -begin - Writer.WriteString(cxGetFullComponentName(ReportLink)); -end; - -{ TdxCompositionLinkItems } - -constructor TdxCompositionLinkItems.Create(AComposition: TdxCompositionReportLink); -begin - inherited Create(TdxCompositionLinkItem); - FComposition := AComposition; -end; - -function TdxCompositionLinkItems.Add: TdxCompositionLinkItem; -begin - Result := TdxCompositionLinkItem(inherited Add); -end; - -function TdxCompositionLinkItems.AddLink(AReportLink: TBasedxReportLink): TdxCompositionLinkItem; -begin - if IsLinkComposable(AReportLink) then - begin - Result := Add; - Result.ReportLink := AReportLink; - end - else - Result := nil; -end; - -procedure TdxCompositionLinkItems.DeleteItemsByLink(AReportLink: TBasedxReportLink); -var - List: TList; - I: Integer; -begin - List := TList.Create; - try - GetLinkEntries(AReportLink, List); - if List.Count <> 0 then - begin - BeginUpdate; - try - for I := 0 to List.Count - 1 do - TObject(List[I]).Free; - finally - EndUpdate; - end; - end; - finally - List.Free; - end; -end; - -procedure TdxCompositionLinkItems.DeleteNonBuiltIns; -var - I: Integer; - Item: TdxCompositionLinkItem; -begin - BeginUpdate; - try - for I := Count - 1 downto 0 do - begin - Item := Items[I]; - if not Item.BuiltIn then Item.Free; - end; - finally - EndUpdate; - end; -end; - -procedure TdxCompositionLinkItems.GetLinkEntries(AReportLink: TBasedxReportLink; AList: TList); -var - I: Integer; - Item: TdxCompositionLinkItem; -begin - for I := 0 to Count - 1 do - begin - Item := Items[I]; - if Item.ReportLink = AReportLink then AList.Add(Item); - end; -end; - -function TdxCompositionLinkItems.IndexOfLink(AReportLink: TBasedxReportLink): Integer; -begin - for Result := 0 to Count - 1 do - if AReportLink = Items[Result].ReportLink then - Exit; - Result := -1; -end; - -function TdxCompositionLinkItems.IsLinkComposable(AReportLink: TBasedxReportLink): Boolean; -begin - Result := (AReportLink <> nil) and (Composition <> nil) and AReportLink.IsComposable(Composition) and - (AReportLink.ComponentPrinter = Composition.ComponentPrinter) and - not (AReportLink is TdxCompositionReportLink); -end; - -function TdxCompositionLinkItems.LinkExists(AReportLink: TBasedxReportLink): Boolean; -var - List: TList; -begin - List := TList.Create; - try - GetLinkEntries(AReportLink, List); - Result := List.Count <> 0; - finally - List.Free; - end; -end; - -function TdxCompositionLinkItems.NextAssignedItem(AnItem: TdxCompositionLinkItem): TdxCompositionLinkItem; -var - Index: Integer; -begin - if AnItem <> nil then - Index := AnItem.Index + 1 - else - Index := Count; - while (Index < Count) and (Items[Index].ReportLink = nil) do - Inc(Index); - if Index < Count then - Result := Items[Index] - else - Result := nil; -end; - -function TdxCompositionLinkItems.NonBuiltInsExists: Boolean; -var - I: Integer; -begin - Result := True; - for I := 0 to Count - 1 do - if not Items[I].BuiltIn then Exit; - Result := False; -end; - -function TdxCompositionLinkItems.PrevAssignedItem(AnItem: TdxCompositionLinkItem): TdxCompositionLinkItem; -var - Index: Integer; -begin - if AnItem <> nil then - Index := AnItem.Index - 1 - else - Index := -1; - while (Index > -1) and (Items[Index].ReportLink = nil) do - Dec(Index); - if Index > -1 then - Result := Items[Index] - else - Result := nil; -end; - -procedure TdxCompositionLinkItems.CorrectLinksAfterLoadings; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].FReportLink := GetComponentByName(Items[I].FLoadingReportLinkName) as TBasedxReportLink; -end; - -function TdxCompositionLinkItems.GetOwner: TPersistent; -begin - Result := Composition; -end; - -procedure TdxCompositionLinkItems.Update(Item: TCollectionItem); -begin - if (Composition <> nil) and not Composition.IsDestroying and not Composition.IsLoading then - if FDontNeedRebuild or not Composition.DataProviderPresent then - begin - Composition.UpdateComposition(ucAll); - FDontNeedRebuild := False; - end - else - if Composition.DataProviderPresent then // TODO: Check non PreviewState - Composition.RebuildReport; -end; - -function TdxCompositionLinkItems.GetItem(Index: Integer): TdxCompositionLinkItem; -begin - Result := TdxCompositionLinkItem(inherited Items[Index]); -end; - -procedure TdxCompositionLinkItems.SetItem(Index: Integer; Value: TdxCompositionLinkItem); -begin - inherited SetItem(Index, Value); -end; - -{ TdxPSCompositionReportRenderInfo } - -constructor TdxPSCompositionReportRenderInfo.Create(AReportLink: TBasedxReportLink); -begin - inherited; - FStartIndexes := TList.Create; -end; - -destructor TdxPSCompositionReportRenderInfo.Destroy; -begin - FreeAndNil(FStartIndexes); - inherited; -end; - -function TdxPSCompositionReportRenderInfo.CalculateNonEmptyPageCount: Integer; -var - Items: TStrings; - I: Integer; - RenderInfo: TdxPSReportRenderInfo; -begin - Result := 0; - Items := TStringList.Create; - try - ReportLink.GetItems(Items, True); - for I := 0 to Items.Count - 1 do - begin - RenderInfo := TdxCompositionLinkItem(Items.Objects[I]).ReportLink.RenderInfo; - Inc(Result, RenderInfo.NonEmptyPageCount); - end; - finally - Items.Free; - end; -end; - -function TdxPSCompositionReportRenderInfo.CalculatePageColCount: Integer; -var - Items: TStrings; - I: Integer; - RenderInfo: TdxPSReportRenderInfo; -begin - Result := 0; - Items := TStringList.Create; - try - ReportLink.GetItems(Items, True); - for I := 0 to Items.Count - 1 do - begin - RenderInfo := TdxCompositionLinkItem(Items.Objects[I]).ReportLink.RenderInfo; - if Result < RenderInfo.PageColCount then - Result := RenderInfo.PageColCount; - end; - finally - Items.Free; - end; -end; - -function TdxPSCompositionReportRenderInfo.CalculatePageRowCount: Integer; -var - Items: TStrings; - I: Integer; - RenderInfo: TdxPSReportRenderInfo; -begin - Result := 0; - Items := TStringList.Create; - try - ReportLink.GetItems(Items, True); - for I := 0 to Items.Count - 1 do - begin - RenderInfo := TdxCompositionLinkItem(Items.Objects[I]).ReportLink.RenderInfo; - if Result < RenderInfo.PageRowCount then - Result := RenderInfo.PageRowCount; - end; - finally - Items.Free; - end; -end; - -procedure TdxPSCompositionReportRenderInfo.DoCalculate; -var - Items: TStrings; - PrevPageCount, I: Integer; - Link: TBasedxReportLink; -begin - Items := TStringList.Create; - try - ReportLink.GetItems(Items, True); - FStartIndexes.Count := Items.Count; - - PrevPageCount := 0; - for I := 0 to Items.Count - 1 do - begin - Link := TdxCompositionLinkItem(Items.Objects[I]).ReportLink; - Link.CalculateRenderInfos; - if I = 0 then - StartIndexes[I] := 0 - else - StartIndexes[I] := StartIndexes[I - 1] + PrevPageCount; - - if ReportLink.ShowEmptyPages then - PrevPageCount := Link.RenderInfo.VirtualPageCount - else - PrevPageCount := Link.RenderInfo.NonEmptyPageCount; - - Inc(VirtualPageCount, Link.VirtualPageCount); - end; - finally - Items.Free; - end; -end; - -procedure TdxPSCompositionReportRenderInfo.Refresh; -begin - FNonEmptyPageCount := -1; - FPageColCount := -1; - FPageRowCount := -1; - FStartIndexes.Clear; - inherited; -end; - -function TdxPSCompositionReportRenderInfo.GetNonEmptyPageCount: Integer; -begin - if FNonEmptyPageCount = -1 then - FNonEmptyPageCount := CalculateNonEmptyPageCount; - Result := FNonEmptyPageCount; -end; - -function TdxPSCompositionReportRenderInfo.GetPageColCount: Integer; -begin - if FPageColCount = -1 then - FPageColCount := CalculatePageColCount; - Result := FPageColCount; -end; - -function TdxPSCompositionReportRenderInfo.GetPageRowCount: Integer; -begin - if FPageRowCount = -1 then - FPageRowCount := CalculatePageRowCount; - Result := FPageColCount; -end; - -function TdxPSCompositionReportRenderInfo.RealPageIndexToVirtualPageIndex(APageIndex: Integer; - ATakeIntoAccountEmptyPages: Boolean): Integer; -var - Item: TdxCompositionLinkItem; -begin - GetCompositionLinkItemByPageIndexAndFixIndex(APageIndex, APageIndex, Item); - if Item <> nil then - Result := Item.ReportLink.RealPageIndexToVirtualPageIndex(APageIndex, ATakeIntoAccountEmptyPages) - else - Result := APageIndex; -end; - -function TdxPSCompositionReportRenderInfo.VirtualPageIndexToRealPageIndex(APageIndex: Integer): Integer; -var - Item: TdxCompositionLinkItem; -begin - GetCompositionLinkItemByPageIndexAndFixIndex(APageIndex, APageIndex, Item); - if Item <> nil then - Result := Item.ReportLink.VirtualPageIndexToRealPageIndex(APageIndex) - else - Result := APageIndex; -end; - -procedure TdxPSCompositionReportRenderInfo.GetCompositionLinkItemByPageIndexAndFixIndex( - APageIndex: Integer; var APageIndexRelativeToLink: Integer; var AnItem: TdxCompositionLinkItem); - - function GetPageCount(ARenderInfo: TdxPSReportRenderInfo): Integer; - begin - if ReportLink.ShowEmptyPages then - Result := ARenderInfo.VirtualPageCount - else - Result := ARenderInfo.NonEmptyPageCount; - end; - -var - Items: TStrings; - I: Integer; -begin - APageIndexRelativeToLink := APageIndex; - if (APageIndex = -1) or (FStartIndexes = nil) then - begin - AnItem := nil; - Exit; - end; - - Items := TStringList.Create; - try - ReportLink.GetItems(Items, True); - for I := 0 to Items.Count - 1 do - begin - AnItem := TdxCompositionLinkItem(Items.Objects[I]); - if (StartIndexes[I] <= APageIndex) and (APageIndex < StartIndexes[I] + GetPageCount(AnItem.ReportLink.RenderInfo)) then - begin - Dec(APageIndexRelativeToLink, StartIndexes[I]); - Exit; - end; - end; - AnItem := nil; - finally - Items.Free; - end; -end; - -function TdxPSCompositionReportRenderInfo.GetReportLink: TdxCompositionReportLink; -begin - Result := inherited ReportLink as TdxCompositionReportLink; -end; - -function TdxPSCompositionReportRenderInfo.GetStartIndex(Index: Integer): Integer; -begin - Result := Integer(FStartIndexes[Index]); -end; - -function TdxPSCompositionReportRenderInfo.GetStartIndexCount: Integer; -begin - Result := FStartIndexes.Count; -end; - -procedure TdxPSCompositionReportRenderInfo.SetStartIndex(Index: Integer; Value: Integer); -begin - FStartIndexes[Index] := TObject(Value); -end; - -{ TdxPSCompositionReportRenderer } - -procedure TdxPSCompositionReportRenderer.RenderPage(ACanvas: TCanvas; - const APageBounds: TRect; APageIndex, AContinuousPageIndex, AZoomFactor: Integer); -var - LinkPageIndex: Integer; - Item: TdxCompositionLinkItem; -begin - RenderInfo.GetCompositionLinkItemByPageIndexAndFixIndex(APageIndex, LinkPageIndex, Item); - if (Item <> nil) and (Item.ReportLink <> nil) then - begin - if not ReportLink.ContinuousPageIndexes then - dxHFFormatObject.TotalPages := Item.ReportLink.PageCount; - Item.ReportLink.PaintPage(ACanvas, APageBounds, LinkPageIndex, AContinuousPageIndex, AZoomFactor); - end; -end; - -function TdxPSCompositionReportRenderer.GetRenderInfo: TdxPSCompositionReportRenderInfo; -begin - Result := inherited RenderInfo as TdxPSCompositionReportRenderInfo; -end; - -function TdxPSCompositionReportRenderer.GetReportLink: TdxCompositionReportLink; -begin - Result := inherited ReportLink as TdxCompositionReportLink; -end; - -{ TdxPSReportCompositionDocument } - -function TdxPSReportCompositionDocument.DefaultDescription: string; -begin - Result := cxGetResourceString(@sdxComposition); -end; - -function TdxPSReportCompositionDocument.GetReportLink: TdxCompositionReportLink; -begin - Result := inherited ReportLink as TdxCompositionReportLink; -end; - -{ TdxCompositionReportLink } - -constructor TdxCompositionReportLink.Create(AOwner: TComponent); -begin - inherited; - FContinuousPageIndexes := True; - ReportDocument.Description := cxGetResourceString(@sdxComposition); - FDesignerOptions := [coCanEdit, coShowDescription]; - FItems := TdxCompositionLinkItems.Create(Self); -end; - -destructor TdxCompositionReportLink.Destroy; -begin - FreeAndNil(FItems); - inherited; -end; - -procedure TdxCompositionReportLink.Assign(Source: TPersistent); -begin - if Source is TdxCompositionReportLink then - with TdxCompositionReportLink(Source) do - begin - Self.ContinuousPageIndexes := ContinuousPageIndexes; - Self.DesignerOptions := DesignerOptions; - end; - inherited; -end; - -function TdxCompositionReportLink.DefaultDesignerCaption: string; -begin - Result := cxGetResourceString(@sdxCompositionDesignerCaption); -end; - -function TdxCompositionReportLink.RealPageIndexToVirtualPageIndex(APageIndex: Integer; - ATakeIntoAccountEmptyPages: Boolean): Integer; -var - PageIndexRelativeToLink: Integer; - CurrentItem, Item: TdxCompositionLinkItem; -begin - Result := 0; - RenderInfo.GetCompositionLinkItemByPageIndexAndFixIndex(APageIndex, PageIndexRelativeToLink, CurrentItem); - Item := Items.PrevAssignedItem(CurrentItem); - while Item <> nil do - begin - Inc(Result, Item.ReportLink.VirtualPageCount); - Item := Items.PrevAssignedItem(Item); - end; - if CurrentItem <> nil then - Inc(Result, CurrentItem.ReportLink.RealPageIndexToVirtualPageIndex(PageIndexRelativeToLink, ATakeIntoAccountEmptyPages)); -end; - -function TdxCompositionReportLink.VirtualPageIndexToRealPageIndex(APageIndex: Integer): Integer; -var - PageIndexRelativeToLink: Integer; - CurrentItem, Item: TdxCompositionLinkItem; -begin - Result := 0; - RenderInfo.GetCompositionLinkItemByPageIndexAndFixIndex(APageIndex, PageIndexRelativeToLink, CurrentItem); - Item := Items.PrevAssignedItem(CurrentItem); - while Item <> nil do - begin - Inc(Result, 1 + Item.ReportLink.VirtualPageIndexToRealPageIndex(Item.ReportLink.VirtualPageCount - 1)); - Item := Items.PrevAssignedItem(Item); - end; - if CurrentItem <> nil then - Inc(Result, CurrentItem.ReportLink.VirtualPageIndexToRealPageIndex(PageIndexRelativeToLink)); -end; - -class function TdxCompositionReportLink.CanBeUsedAsStub: Boolean; -begin - Result := False; -end; - -function TdxCompositionReportLink.DataProviderPresent: Boolean; -var - I: Integer; - ReportLink: TBasedxReportLink; -begin - Result := True; - for I := 0 to Items.Count - 1 do - begin - ReportLink := Items[I].ReportLink; - if (ReportLink <> nil) and ReportLink.DataProviderPresent then - Exit; - end; - Result := False; -end; - -function TdxCompositionReportLink.IsEmptyPage(AVirtualPageIndex: Integer): Boolean; -var - PageIndexRelativeToLink: Integer; - CurrentItem: TdxCompositionLinkItem; -begin - RenderInfo.GetCompositionLinkItemByPageIndexAndFixIndex(AVirtualPageIndex, PageIndexRelativeToLink, CurrentItem); - Result := (CurrentItem <> nil) and - CurrentItem.ReportLink.IsEmptyPage(PageIndexRelativeToLink); -end; - -function TdxCompositionReportLink.SupportsTitle: Boolean; -begin - Result := False; -end; - -procedure TdxCompositionReportLink.GetItems(AStrings: TStrings; AExcludeUnassigned: Boolean); -var - I: Integer; - Item: TdxCompositionLinkItem; - S: string; -begin - AStrings.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - begin - Item := Items[I]; - if (Item.ReportLink = nil) and AExcludeUnassigned then - Continue; - if Item.ReportLink = nil then - S := '' - else - S := Item.ReportLink.Caption; - AStrings.AddObject(S, Item); - end; - finally - AStrings.EndUpdate; - end; -end; - -procedure TdxCompositionReportLink.Notification(AComponent: TComponent; AOperation: TOperation); -var - List: TList; - I: Integer; -begin - inherited; - if (AOperation = opRemove) and (AComponent is TBasedxReportLink) and (AComponent <> Self) then - begin - List := TList.Create; - try - Items.GetLinkEntries(TBasedxReportLink(AComponent), List); - for I := 0 to List.Count - 1 do - TdxCompositionLinkItem(List[I]).ReportLink := nil; - finally - List.Free; - end; - end; -end; - -function TdxCompositionReportLink.GetContinuousPageIndexes: Boolean; -begin - Result := FContinuousPageIndexes; -end; - -procedure TdxCompositionReportLink.SetContinuousPageIndexes(Value: Boolean); -begin - if ContinuousPageIndexes <> Value then - begin - FContinuousPageIndexes := Value; - // TODO: Refresh preview - //if PreviewExists then PreviewWindow.InvalidateAllPages; - end; -end; - -function TdxCompositionReportLink.GetAllowContinuousPageIndexes: Boolean; -begin - Result := True; -end; - -function TdxCompositionReportLink.GetEmptyPagesCanExist: Boolean; -var - I: Integer; - ReportLink: TBasedxReportLink; -begin - Result := True; - for I := 0 to Items.Count - 1 do - begin - ReportLink := Items[I].ReportLink; - if (ReportLink <> nil) and ReportLink.GetEmptyPagesCanExist then - Exit; - end; - Result := False; -end; - -function TdxCompositionReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -var - I: Integer; - ReportLink: TBasedxReportLink; -begin - Result := True; - for I := 0 to Items.Count - 1 do - begin - ReportLink := Items[I].ReportLink; - if (ReportLink <> nil) and ReportLink.GetRebuildOnPageParamsChange(AUpdateCodes) then - Exit; - end; - Result := False; -end; - -procedure TdxCompositionReportLink.ConstructReport(AReportCells: TdxReportCells); -begin -end; - -procedure TdxCompositionReportLink.DoCreateReport; -var - I: Integer; - Item: TdxCompositionLinkItem; - ReportLink: TBasedxReportLink; -begin - Include(FCompositionState, csRebuildReportLink); - try - for I := 0 to Items.Count - 1 do - begin - Item := Items[I]; - ReportLink := Item.ReportLink; - if (ReportLink <> nil) and ReportLink.DataProviderPresent and - ((FInvalidatedLinks = nil) or (FInvalidatedLinks.IndexOf(ReportLink) <> -1)) then - begin - DoBeforeBuildReport(Item); - try - ReportLink.RebuildReport; - finally - DoAfterBuildReport(Item); - end; - end; - DoProgress(100 * (I + 1) / Items.Count); - if AbortBuilding then Break; - end; - finally - Exclude(FCompositionState, csRebuildReportLink); - end; - - if not AbortBuilding then CalculateRenderInfos; -end; - -function TdxCompositionReportLink.GetRendererClass: TdxPSReportRendererClass; -begin - Result := TdxPSCompositionReportRenderer; -end; - -function TdxCompositionReportLink.GetRenderInfoClass: TdxPSReportRenderInfoClass; -begin - Result := TdxPSCompositionReportRenderInfo; -end; - -function TdxCompositionReportLink.GetReportHeight: Integer; -var - I: Integer; - ReportLink: TBasedxReportLink; -begin - Result := 0; - for I := 0 to Items.Count - 1 do - begin - ReportLink := Items[I].ReportLink; - if ReportLink <> nil then - Inc(Result, ReportLink.ReportHeight); - end; -end; - -function TdxCompositionReportLink.GetReportWidth: Integer; -var - I, V: Integer; - ReportLink: TBasedxReportLink; -begin - Result := 0; - for I := 0 to Items.Count - 1 do - begin - ReportLink := Items[I].ReportLink; - if ReportLink <> nil then - begin - V := ReportLink.ReportWidth; - if Result < V then Result := V; - end; - end; -end; - -procedure TdxCompositionReportLink.InternalRestoreDefaults; -var - I: Integer; - ReportLink: TBasedxReportLink; -begin - FContinuousPageIndexes := True; - ReportDocument.Description := cxGetResourceString(@sdxComposition); - FDesignerCaption := cxGetResourceString(@sdxCompositionDesignerCaption); - FDesignerOptions := [coCanEdit, coShowDescription]; - for I := 0 to Items.Count - 1 do - begin - ReportLink := Items[I].ReportLink; - if ReportLink <> nil then - ReportLink.RestoreDefaults; - end; -end; - -procedure TdxCompositionReportLink.InternalRestoreFromOriginal; -var - I: Integer; - ReportLink: TBasedxReportLink; -begin - for I := 0 to Items.Count - 1 do - begin - ReportLink := Items[I].ReportLink; - if ReportLink <> nil then - ReportLink.RestoreFromOriginal; - end; -end; - -procedure TdxCompositionReportLink.ShowEmptyPagesChanged; -begin - if EmptyPagesCanExist then CalculateRenderInfos; -end; - -procedure TdxCompositionReportLink.ShowPageFooterChanged; -begin - CalculateRenderInfos; -end; - -procedure TdxCompositionReportLink.ShowPageHeaderChanged; -begin - CalculateRenderInfos; -end; - -procedure TdxCompositionReportLink.StdProcessDataSourceDontPresent; -begin -// raise EdxReportLink.Create(cxGetResourceString(@sdxDataSourceDontPresent)); -end; - -procedure TdxCompositionReportLink.DoAfterBuildReport(AItem: TdxCompositionLinkItem); -begin - if Assigned(FOnAfterBuildReport) then FOnAfterBuildReport(Self, AItem); -end; - -procedure TdxCompositionReportLink.DoBeforeBuildReport(AItem: TdxCompositionLinkItem); -begin - if Assigned(FOnBeforeBuildReport) then FOnBeforeBuildReport(Self, AItem); -end; - -class function TdxCompositionReportLink.GetReportDocumentClass: TdxPSReportDocumentClass; -begin - Result := TdxPSReportCompositionDocument; -end; - -class function TdxCompositionReportLink.Serializable: Boolean; -begin - Result := False; -end; - -function TdxCompositionReportLink.GetRenderer: TdxPSCompositionReportRenderer; -begin - Result := inherited Renderer as TdxPSCompositionReportRenderer; -end; - -function TdxCompositionReportLink.GetRenderInfo: TdxPSCompositionReportRenderInfo; -begin - Result := inherited RenderInfo as TdxPSCompositionReportRenderInfo; -end; - -function TdxCompositionReportLink.GetReportDocument: TdxPSReportCompositionDocument; -begin - Result := inherited ReportDocument as TdxPSReportCompositionDocument; -end; - -procedure TdxCompositionReportLink.SetItems(Value: TdxCompositionLinkItems); -begin - FItems.Assign(Value); -end; - -procedure TdxCompositionReportLink.SetReportDocument(Value: TdxPSReportCompositionDocument); -begin - inherited ReportDocument := Value; -end; - -procedure TdxCompositionReportLink.ActivateLink(AReportLink: TBasedxReportLink); -begin - Include(FCompositionState, csRebuildReportLink); - try - FInvalidatedLinks := TList.Create; - try - FInvalidatedLinks.Add(AReportLink); - RebuildReport; - finally - FreeAndNil(FInvalidatedLinks); - end; - finally - Exclude(FCompositionState, csRebuildReportLink); - end; -end; - -procedure TdxCompositionReportLink.UpdateComposition(AUpdateCodes: TdxPrinterPageUpdateCodes); -begin - PageParamsChanged(RealPrinterPage, CurrentPrintStyle, AUpdateCodes); -end; - -{ TAbstractdxReportLinkDesignWindow } - -constructor TAbstractdxReportLinkDesignWindow.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - Caption := cxGetResourceString(@sdxReportDesignerCaption); -end; - -function TAbstractdxReportLinkDesignWindow.Execute: Boolean; -begin - Include(FState, dwsInitialize); - try - Initialize; - finally - Exclude(FState, dwsInitialize); - end; - Result := (ReportLink <> nil) and (ShowModal = mrOK);// and Modified and not Applyed; -end; - -procedure TAbstractdxReportLinkDesignWindow.CreateWnd; -begin - inherited; - if Icon.Handle = 0 then - Icon_LoadFromResourceName(Icon, IDB_DXPSREPORTDESIGNER); - SendMessage(Handle, WM_SETICON, 1, Icon.Handle); -end; - -procedure TAbstractdxReportLinkDesignWindow.KeyDown(var Key: Word; Shift: TShiftState); -begin - if (ReportLink <> nil) and ReportLink.PreviewExists and ReportLink.IsBuilding and (Key = VK_ESCAPE) then - ReportLink.AbortBuilding := True - else - inherited; -end; - -procedure TAbstractdxReportLinkDesignWindow.AfterRebuildReport; -begin - KeyPreview := FPrevKeyPreview; -end; - -procedure TAbstractdxReportLinkDesignWindow.BeforeRebuildReport; -begin - FPrevKeyPreview := KeyPreview; - KeyPreview := True; -end; - -procedure TAbstractdxReportLinkDesignWindow.Initialize; -begin - LoadStrings; - Caption := ReportLink.DesignerCaption; - if ReportLink.IsDesigning and (Component <> nil) then - Caption := Caption + ' : ' + Component.Name; - if ReportLink.DesignerHelpContext <> 0 then - HelpContext := ReportLink.DesignerHelpContext; -end; - -procedure TAbstractdxReportLinkDesignWindow.LoadStrings; -begin -end; - -procedure TAbstractdxReportLinkDesignWindow.UpdateControlsState; -begin -end; - -function TAbstractdxReportLinkDesignWindow.GetComponent: TComponent; -begin - if ReportLink <> nil then - Result := ReportLink.Component - else - Result := nil; -end; - -function TAbstractdxReportLinkDesignWindow.GetIsDesigning: Boolean; -begin - Result := (ReportLink <> nil) and Reportlink.IsDesigning; -end; - -function TAbstractdxReportLinkDesignWindow.IsCaptionStored: Boolean; -begin //TODO: TAbstractdxReportLinkDesignWindow.IsCaptionStored - Result := Caption <> cxGetResourceString(@sdxReportDesignerCaption); -end; - -procedure TAbstractdxReportLinkDesignWindow.SetModified(Value: Boolean); -begin - FModified := Value; - if Modified and Applyed then Applyed := False; - UpdateControlsState; -end; - -procedure TAbstractdxReportLinkDesignWindow.WMHelp(var Message: TWMHelp); -var - Control: TWinControl; - ContextID: Integer; -begin - if csDesigning in ComponentState then - inherited - else - begin - ContextID := 0; - with Message.HelpInfo^ do - if iContextType = HELPINFO_WINDOW then - begin - Control := FindControl(hItemHandle); - if Control = nil then Exit; - Control := GetParentForm(Control); - if Control = nil then Exit; - ContextID := Control.HelpContext; - end; - if ContextID <> 0 then Application.HelpContext(ContextID); - end; -end; - -{ TStandarddxReportLinkDesignWindow } - -constructor TStandarddxReportLinkDesignWindow.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - CreateStdButtons; - {$IFDEF DELPHI7} - if PreviewHost <> nil then - begin - if ThemeServices.ThemesEnabled then - begin - TCustomPanelAccess(PreviewHost).BevelInner := bvNone; - TCustomPanelAccess(PreviewHost).BevelOuter := bvNone; - end; - FPrevPreviewHostWindowProc := PreviewHost.WindowProc; - PreviewHost.WindowProc := PreviewHostWindowProc; - end; - {$ENDIF} -end; - -{$IFDEF DELPHI7} -destructor TStandarddxReportLinkDesignWindow.Destroy; -begin - if PreviewHost <> nil then - PreviewHost.WindowProc := FPrevPreviewHostWindowProc; - inherited; -end; -{$ENDIF} - -procedure TStandarddxReportLinkDesignWindow.PlaceStdButtons; -const - btnWidth = 75; - btnLargeWidth = 115; - btnHeight = 23; - btnFirstOffsetX: array[Boolean] of Integer = (4, 10); - btnOffsetX = 4; - btnOffsetY = 6; -var - AWidth, ALargeWidth, AHeight, AOffsetX, AFirstOffsetX, AOffsetY: Integer; -begin - AWidth := MulDiv(btnWidth, Screen.PixelsPerInch, 96); - ALargeWidth := MulDiv(btnLargeWidth, Screen.PixelsPerInch, 96); - AHeight := MulDiv(btnHeight, Screen.PixelsPerInch, 96); - AFirstOffsetX := MulDiv(btnFirstOffsetX[foSizeableDialog in Options], Screen.PixelsPerInch, 96); - AOffsetX := MulDiv(btnOffsetX, Screen.PixelsPerInch, 96); - AOffsetY := MulDiv(btnOffsetY, Screen.PixelsPerInch, 96); - - if btnHelp.Visible then - begin - btnHelp.BoundsRect := - MakeBounds(ClientWidth - AFirstOffsetX - AWidth, ClientHeight - AOffsetY - AHeight, AWidth, AHeight); - btnApply.BoundsRect := - MakeBounds(btnHelp.Left - AOffsetX - AWidth, ClientHeight - AOffsetY - AHeight, AWidth, AHeight); - end - else - btnApply.BoundsRect := - MakeBounds(ClientWidth - AFirstOffsetX - AWidth, ClientHeight - AOffsetY - AHeight, AWidth, AHeight); - - btnCancel.BoundsRect := - MakeBounds(btnApply.Left - AOffsetX - AWidth, ClientHeight - AOffsetY - AHeight, AWidth, AHeight); - btnOK.BoundsRect := - MakeBounds(btnCancel.Left - AOffsetX - AWidth, ClientHeight - AOffsetY - AHeight, AWidth, AHeight); - btnRestoreOriginal.BoundsRect := - MakeBounds(AOffsetX, ClientHeight - AOffsetY - AHeight, ALargeWidth, AHeight); - btnRestoreDefaults.BoundsRect := - MakeBounds(btnRestoreOriginal.BoundsRect.Right + AOffsetX, ClientHeight - AOffsetY - AHeight, ALargeWidth, AHeight); - btnTitleProperties.BoundsRect := - MakeBounds(AOffsetX, ClientHeight - AOffsetY - AHeight, ALargeWidth, AHeight); -end; - -procedure TStandarddxReportLinkDesignWindow.CreateStdButtons; -begin - btnHelp := TButton.Create(Self); - try - btnHelp.Name := sdxHelpButtonName; - except - end; - btnHelp.Parent := Self; - - btnApply := TButton.Create(Self); - btnApply.Parent := Self; - btnApply.TabOrder := btnHelp.TabOrder - 1; - btnApply.OnClick := ApplyClick; - - btnCancel := TButton.Create(Self); - btnCancel.Parent := Self; - btnCancel.Cancel := True; - btnCancel.ModalResult := mrCancel; - btnCancel.TabOrder := btnApply.TabOrder - 1; - - btnOK := TButton.Create(Self); - btnOK.Parent := Self; - btnOK.Default := True; - btnOK.ModalResult := mrOK; - btnOK.TabOrder := btnCancel.TabOrder - 1; - - btnRestoreOriginal := TButton.Create(Self); - btnRestoreOriginal.Parent := Self; - btnRestoreOriginal.TabOrder := btnOK.TabOrder - 1; - btnRestoreOriginal.OnClick := RestoreOriginalClick; - - btnRestoreDefaults := TButton.Create(Self); - btnRestoreDefaults.Parent := Self; - btnRestoreDefaults.TabOrder := btnRestoreOriginal.TabOrder - 1; - btnRestoreDefaults.OnClick := RestoreDefaultsClick; - - btnTitleProperties := TButton.Create(Self); - btnTitleProperties.Parent := Self; - btnTitleProperties.OnClick := TitlePropertiesClick; -end; - -procedure TStandarddxReportLinkDesignWindow.RestoreOriginalClick(Sender: TObject); -begin - BeginUpdateControls; - try - if ReportLink <> nil then ReportLink.RestoreFromOriginal; - DoInitialize; - finally - EndUpdateControls; - end; - Modified := True; -end; - -procedure TStandarddxReportLinkDesignWindow.RestoreDefaultsClick(Sender: TObject); -begin - BeginUpdateControls; - try - if ReportLink <> nil then ReportLink.RestoreDefaults; - DoInitialize; - finally - EndUpdateControls; - end; - Modified := True; -end; - -procedure TStandarddxReportLinkDesignWindow.TitlePropertiesClick(Sender: TObject); -begin - if (ReportLink <> nil) and ReportLink.ShowTitlePropertiesDlg then - begin - if not ReportLink.AbortBuilding then - begin - AtLeastOneTimeApplied := True; - Applyed := True; - end; - UpdateControlsState; - end; -end; - -procedure TStandarddxReportLinkDesignWindow.ApplyClick(Sender: TObject); -begin - DoApply; -end; - -procedure TStandarddxReportLinkDesignWindow.RegroupStdButtons; -var - StartTabOrder: Integer; -begin - Resize; - if HelpContext = 0 then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnApply.BoundsRect; - btnApply.BoundsRect := btnHelp.BoundsRect; - btnHelp.Visible := False; - end - else - BorderIcons := BorderIcons + [biHelp]; - - btnRestoreOriginal.Visible := ReportLink.IsDesigning; - btnRestoreDefaults.Visible := ReportLink.IsDesigning; - if btnTitleProperties.Visible then - btnTitleProperties.Visible := ReportLink.CanChangeTitle and not ReportLink.IsDesigning; - if ReportLink.IsDesigning then - begin - btnRestoreOriginal.TabOrder := 0; - btnRestoreDefaults.TabOrder := 1; - end - else - if ReportLink.CanChangeTitle then - btnTitleProperties.TabOrder := 0; - - StartTabOrder := 1 + Byte(ReportLink.IsDesigning); - btnOk.TabOrder := StartTabOrder; - btnCancel.TabOrder := StartTabOrder + 1; - btnApply.TabOrder := StartTabOrder + 2; - btnHelp.TabOrder := StartTabOrder + 3; -end; - -procedure TStandarddxReportLinkDesignWindow.Resize; -begin - PlaceStdButtons; - inherited; -end; - -function TStandarddxReportLinkDesignWindow.CanApply: Boolean; -begin - Result := (ReportLink <> nil) and ReportLink.DataProviderPresent and - ReportLink.PreviewExists and Modified and not Applyed and not ReportLink.IsAggregated; -end; - -procedure TStandarddxReportLinkDesignWindow.DoApply; -begin - try - ReportLink.DoApplyInDesigner; - except - Application.HandleException(Self); - ModalResult := mrCancel; - raise; - end; - if not ReportLink.AbortBuilding then - begin - AtLeastOneTimeApplied := True; - Applyed := True; - end; - UpdateControlsState; -end; - -procedure TStandarddxReportLinkDesignWindow.Initialize; -begin - BeginUpdateControls; - try - inherited; - RegroupStdButtons; - DoInitialize; - finally - UpdateControlsState; - EndUpdateControls; - end; -end; - -procedure TStandarddxReportLinkDesignWindow.LoadStrings; -begin - inherited; - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnApply.Caption := cxGetResourceString(@sdxBtnApply); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - btnRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - btnRestoreOriginal.Caption := cxGetResourceString(@sdxBtnRestoreOriginal); - btnTitleProperties.Caption := cxGetResourceString(@sdxBtnTitleProperties); -end; - -procedure TStandarddxReportLinkDesignWindow.UpdateControlsState; -begin - if btnTitleProperties <> nil then - btnTitleProperties.Enabled := not ReportLink.IsAggregated; - if btnApply <> nil then - btnApply.Enabled := CanApply; - if btnRestoreOriginal <> nil then - btnRestoreOriginal.Enabled := (ReportLink <> nil) and ReportLink.DataProviderPresent; -end; - -procedure TStandarddxReportLinkDesignWindow.DoInitialize; -begin -end; - -{$IFDEF DELPHI7} - -function TStandarddxReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := nil; -end; - -procedure TStandarddxReportLinkDesignWindow.PreviewHostWindowProc(var Message: TMessage); -var - Control: TWinControl; - R: TRect; - Details: TThemedElementDetails; - DC: HDC; - PS: TPaintStruct; -begin - if ThemeServices.ThemesEnabled and (Message.Msg = WM_PAINT) then - begin - Control := PreviewHost; - DC := BeginPaint(Control.Handle, PS); - try - R := Control.ClientRect; - Details := ThemeServices.GetElementDetails(ttBody); - ThemeServices.DrawElement(DC, Details, Control.Parent.ClientRect); - - Details := ThemeServices.GetElementDetails(teEditTextNormal); - ThemeServices.DrawEdge(DC, Details, R, BDR_SUNKENOUTER, BF_RECT or BF_FLAT); - InflateRect(R, -1, -1); - ThemeServices.DrawEdge(DC, Details, R, BDR_RAISEDINNER, BF_RECT or BF_FLAT); - finally - EndPaint(Control.Handle, PS); - end; - end - else - FPrevPreviewHostWindowProc(Message); -end; - -{$ENDIF} - -procedure TStandarddxReportLinkDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -{$IFDEF DELPHI7} -var - Details: TThemedElementDetails; -{$ENDIF} -begin - {$IFDEF DELPHI7} - if (PreviewHost <> nil) and ThemeServices.ThemesEnabled then - begin - Details := ThemeServices.GetElementDetails(ttBody); - ThemeServices.DrawElement(ACanvas.Handle, Details, PreviewHost.Parent.ClientRect); - Exit; - end; - {$ENDIF} - ACanvas.Brush.Color := clWindow; - ACanvas.FillRect(R); -end; - -procedure TStandarddxReportLinkDesignWindow.UpdatePreview; -begin -end; - -procedure TStandarddxReportLinkDesignWindow.BeginUpdateControls; -begin - Inc(FUpdateControlsCount); -end; - -procedure TStandarddxReportLinkDesignWindow.EndUpdateControls; -begin - if FUpdateControlsCount > 0 then - begin - Dec(FUpdateControlsCount); - if FUpdateControlsCount = 0 then UpdatePreview; - end; -end; - -function TStandarddxReportLinkDesignWindow.LockControlsUpdate: Boolean; -begin - Result := FUpdateControlsCount <> 0; -end; - -procedure TStandarddxReportLinkDesignWindow.SetAtLeastOneTimeApplied(Value: Boolean); -begin - if FAtLeastOneTimeApplied <> Value then - begin - FAtLeastOneTimeApplied := Value; - if FAtLeastOneTimeApplied then - btnCancel.Caption := cxGetResourceString(@sdxBtnClose) - else - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - end; -end; - -{ TdxPSPrintStyle } - -constructor TdxPSPrintStyle.Create(AOwner: TComponent); -begin - inherited; - AddStdHFFunctions; -end; - -function TdxPSPrintStyle.DefaultPageFooterText(APart: TdxPageTitlePart): string; -const - CRLF = #13#10; -var - Index: Integer; -begin - Index := -1; - if dxHFFunctionLibrary <> nil then - case APart of - tpCenter: - Index := dxHFFunctionLibrary.IndexOfByClass(TdxHFPageNumberFunction); - tpRight: - Index := dxHFFunctionLibrary.IndexOfByClass(TdxHFDateFunction); - end; - - if Index <> -1 then - Result := dxHFFunctionLibrary[Index].TemplateString + CRLF - else - Result := inherited DefaultPageFooterText(APart); -end; - -function TdxPSPrintStyle.DefaultStyleCaption: string; -begin - Result := cxGetResourceString(@sdxStandardStyle); -end; - -procedure TdxPSPrintStyle.AddStdHFFunctions; -var - Index: Integer; -begin - if dxHFFunctionLibrary = nil then Exit; - with PrinterPage.PageFooter do - begin - Index := dxHFFunctionLibrary.IndexOfByClass(TdxHFPageNumberFunction); - if Index <> -1 then - CenterTitle.Text := dxHFFunctionLibrary[Index].TemplateString; - Index := dxHFFunctionLibrary.IndexOfByClass(TdxHFDateFunction); - if Index <> -1 then - RightTitle.Text := dxHFFunctionLibrary[Index].TemplateString; - end; -end; - -procedure TdxPSPrintStyle.AfterGenerating; -begin - DoAfterGenerating; -end; - -procedure TdxPSPrintStyle.BeforeGenerating; -begin - DoBeforeGenerating; -end; - -procedure TdxPSPrintStyle.DoAfterGenerating; -begin - if Assigned(FOnAfterGenerating) then FOnAfterGenerating(Self); -end; - -procedure TdxPSPrintStyle.DoAfterPrinting; -begin - if Assigned(FOnAfterPrinting) then FOnAfterPrinting(Self); -end; - -procedure TdxPSPrintStyle.DoBeforeGenerating; -begin - if Assigned(FOnBeforeGenerating) then FOnBeforeGenerating(Self); -end; - -procedure TdxPSPrintStyle.DoBeforePrinting; -begin - if Assigned(FOnBeforePrinting) then FOnBeforePrinting(Self); -end; - -procedure TdxPSPrintStyle.InitializeDefaultStyleGlyph(ABitmap: TBitmap); -begin - inherited; - Bitmap_LoadFromResourceName(ABitmap, IDB_DXPSPRINTSTYLE_STANDARD); -end; - -{ TBasedxPreviewWindow } - -destructor TBasedxPreviewWindow.Destroy; -begin - if ComponentPrinter <> nil then - begin - Exclude(ComponentPrinter.FState, cpsPreviewing); - if not ComponentPrinter.FModalPreview then - ComponentPrinter.DoAfterPreview(ReportLink); - ComponentPrinter.FPreviewWindow := nil; - end; - inherited; -end; - -procedure TBasedxPreviewWindow.InitContent; -begin -end; - -procedure TBasedxPreviewWindow.InvalidateContent; -begin -end; - -procedure TBasedxPreviewWindow.InvalidatePage(APageIndex: Integer); -begin -end; - -procedure TBasedxPreviewWindow.InvalidateAllPages; -begin -end; - -procedure TBasedxPreviewWindow.InvalidatePagesContent; -begin -end; - -procedure TBasedxPreviewWindow.InvalidatePagesHeaderContent; -begin -end; - -procedure TBasedxPreviewWindow.InvalidatePagesFooterContent; -begin -end; - -procedure TBasedxPreviewWindow.CreationComplete; -begin -end; - -procedure TBasedxPreviewWindow.RebuildReport; -begin - if ReportLink <> nil then ReportLink.RebuildReport; -end; - -procedure TBasedxPreviewWindow.UpdateCaption; -begin - if ComponentPrinter <> nil then - Caption := ComponentPrinter.PreviewCaption; -end; - -procedure TBasedxPreviewWindow.UpdateControls; -begin - UpdateCaption; - UpdateExplorerContextCommands; - if (ComponentPrinter <> nil) and (ComponentPrinter.PreviewWindowDesigner <> nil) then - ComponentPrinter.PreviewWindowDesigner.Modified; -end; - -{$IFNDEF DELPHI6} - -{ IUnknown } - -function TBasedxPreviewWindow.QueryInterface(const IID: TGUID; out Obj): HRESULT; -begin - if GetInterface(IID, Obj) then - Result := S_OK - else - Result := E_NOINTERFACE; -end; - -function TBasedxPreviewWindow._Addref: Integer; -begin - Result := -1; -end; - -function TBasedxPreviewWindow._Release: Integer; -begin - Result := -1; -end; - -{$ENDIF} - -{$IFDEF OLEDRAGANDDROP} - -const - DropEffects: array[Boolean] of Longint = (DROPEFFECT_NONE, DROPEFFECT_COPY); - -function TBasedxPreviewWindow.IDropTarget_DragEnter(const DataObj: IDataObject; - grfKeyState: Longint; Pt: TPoint; var dwEffect: Longint): HRESULT; -var - Format: TFormatETC; - Medium: TSTGMedium; - BufferSize: DWORD; - Buffer: PChar ; -begin - FillChar(Format, SizeOf(Format), 0); - with Format do - begin - cfFormat := CF_HDROP; - dwAspect := DVASPECT_CONTENT; - lindex := -1; - tymed := TYMED_HGLOBAL; - end; - DataObj._AddRef; - try - FDraggedFileName := ''; - if (DataObj.GetData(Format, Medium) = S_OK) and (DragQueryFile(Medium.hGlobal, $FFFFFFFF, nil, 0) <> 0) then - try - BufferSize := DragQueryFile(Medium.hGlobal, 0, nil, 0); - Buffer := StrAlloc(BufferSize + 1); - try - if BufferSize = DragQueryFile(Medium.hGlobal, 0, Buffer, BufferSize) then - FDraggedFileName := StrPas(Buffer); - finally - StrDispose(Buffer); - end; - finally - if Medium.unkForRelease = nil then ReleaseSTGMedium(Medium); - end; - finally - DataObj._Release; - end; - - dwEffect := DropEffects[CanDrop and DoCanAccept]; - if dwEffect = DROPEFFECT_NONE then FDraggedFileName := ''; - - Result := S_OK; -end; - -function TBasedxPreviewWindow.IDropTarget_DragOver(grfKeyState: Longint; Pt: TPoint; - var dwEffect: Longint): HRESULT; -begin - dwEffect := DropEffects[CanDrop]; - Result := S_OK; -end; - -function TBasedxPreviewWindow.IDropTarget_DragLeave: HRESULT; -begin - Result := S_OK; -end; - -function TBasedxPreviewWindow.IDropTarget_Drop(const DataObj: IDataObject; - grfKeyState: Longint; Pt: TPoint; var dwEffect: Longint): HRESULT; -begin - dwEffect := DropEffects[CanDrop]; - if dwEffect = DROPEFFECT_COPY then DoDrop; - Result := S_OK; -end; - -{$ENDIF} - -procedure TBasedxPreviewWindow.AddExplorerContextCommand(ACommand: TCustomdxPSExplorerContextCommand); -begin -end; - -procedure TBasedxPreviewWindow.UpdateExplorerContextCommands; -begin -end; - -function TBasedxPreviewWindow.GetExplorerTree: TCustomdxPSExplorerTreeContainer; -begin - Result := nil; -end; - -function TBasedxPreviewWindow.GetHFEditPart: TdxPageTitlePart; -begin - Result := tpLeft; -end; - -function TBasedxPreviewWindow.GetShowExplorer: Boolean; -begin - Result := False; -end; - -function TBasedxPreviewWindow.GetShowThumbnails: Boolean; -begin - Result := False; -end; - -function TBasedxPreviewWindow.GetState: TdxPSPreviewState; -begin - Result := prsNone; -end; - -procedure TBasedxPreviewWindow.SetShowExplorer(Value: Boolean); -begin -end; - -procedure TBasedxPreviewWindow.SetShowThumbnails(Value: Boolean); -begin -end; - -procedure TBasedxPreviewWindow.BeginUpdate; -begin -end; - -procedure TBasedxPreviewWindow.CancelUpdate; -begin -end; - -procedure TBasedxPreviewWindow.EndUpdate; -begin -end; - -function TBasedxPreviewWindow.Locked: Boolean; -begin - Result := False; -end; - -procedure TBasedxPreviewWindow.PaintPage(Sender: TObject; ACanvas: TCanvas; - ARect: TRect; APageIndex: Integer); -begin - ComponentPrinter.PaintPage(ACanvas, APageIndex, ARect, ARect, nil); -end; - -procedure TBasedxPreviewWindow.PaintThumbnailPage(Sender: TObject; ACanvas: TCanvas; - ARect: TRect; APageIndex: Integer); -begin - ComponentPrinter.PaintThumbnailPage(ACanvas, APageIndex, ARect, ARect, nil); -end; - -{$IFDEF OLEDRAGANDDROP} - -function TBasedxPreviewWindow.CanDrop: Boolean; -begin - Result := DraggedFileName <> ''; -end; - -function TBasedxPreviewWindow.DoCanAccept: Boolean; -begin - Result := (ReportLink <> nil) and ReportLink.CanLoadData and - ReportLink.PossibleDataStorage(DraggedFileName, False); -end; - -procedure TBasedxPreviewWindow.DoDrop; -begin - if ReportLink <> nil then - begin - ReportLink.DataSource := rldsExternalStorage; - ReportLink.StorageName := DraggedFileName; - RebuildReport; - UpdateControls; - Application.BringToFront; - end; -end; - -{$ENDIF} - -function TBasedxPreviewWindow.GetReportLink: TBasedxReportLink; -begin - if ComponentPrinter <> nil then - Result := ComponentPrinter.CurrentLink - else - Result := nil; -end; - -{ TdxComponentPrinterThumbnailsOptions } - -constructor TdxComponentPrinterThumbnailsOptions.Create(APreviewOptions: TdxPreviewOptions); -begin - inherited Create; - FPreviewOptions := APreviewOptions; - FFont := TFont.Create; - RestoreDefaults; -end; - -destructor TdxComponentPrinterThumbnailsOptions.Destroy; -begin - FreeAndNil(FDefaultFont); - FreeAndNil(FFont); - inherited; -end; - -procedure TdxComponentPrinterThumbnailsOptions.Assign(Source: TPersistent); -begin - if Source is TdxComponentPrinterThumbnailsOptions then - with TdxComponentPrinterThumbnailsOptions(Source) do - begin - Self.Font := Font; - Self.ShowPageNumbers := ShowPageNumbers; - end - else - inherited; -end; - -function TdxComponentPrinterThumbnailsOptions.DefaultFont: TFont; -begin - if FDefaultFont = nil then - begin - FDefaultFont := TFont.Create; - InitializeDefaultFont(FDefaultFont); - end; - Result := FDefaultFont; -end; - -procedure TdxComponentPrinterThumbnailsOptions.RestoreDefaults; -begin - inherited; - Font := DefaultFont; - ShowPageNumbers := True; -end; - -procedure TdxComponentPrinterThumbnailsOptions.InitializeDefaultFont(AFont: TFont); -begin - AFont.Color := dxPSDefaultPreviewThumbnailsFontColor; - AFont.Name := dxPSDefaultPreviewThumbnailsFontName; - AFont.Size := dxPSDefaultPreviewThumbnailsFontSize; - AFont.Style := dxPSDefaultPreviewThumbnailsFontStyle -end; - -function TdxComponentPrinterThumbnailsOptions.IsFontStored: Boolean; -begin - Result := not dxPSUtl.dxAreFontsEqual(Font, DefaultFont); -end; - -procedure TdxComponentPrinterThumbnailsOptions.SetFont(Value: TFont); -begin - Font.Assign(Value); -end; - -procedure TdxComponentPrinterThumbnailsOptions.SetShowPageNumbers(Value: Boolean); -begin - if FShowPageNumbers <> Value then - begin - FShowPageNumbers := Value; - //TODO: TdxComponentPrinterThumbnailsOptions.SetShowPageNumbers - // if HasPreviewThumbnails then invalidate Preview.Thumbnails - end; -end; - -{ TdxPreviewOptions } - -constructor TdxPreviewOptions.Create; -begin - inherited; - FEnableOptions := dxDefaultPreviewEnableOptions; - FIcon := TIcon.Create; - FIcon.OnChange := IconChanged; - FSavePosition := True; - FSaveZoomPosition := True; - FThumbnailsOptions := TdxComponentPrinterThumbnailsOptions.Create(Self); - FWindowState := wsNormal; - FVisibleOptions := dxDefaultPreviewVisibleOptions; -end; - -destructor TdxPreviewOptions.Destroy; -begin - FreeAndNil(FDefaultIcon); - FreeAndNil(FThumbnailsOptions); - FreeAndNil(FIcon); - inherited; -end; - -function TdxPreviewOptions.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintPreview); -end; - -function TdxPreviewOptions.DefaultIcon: TIcon; -begin - if FDefaultIcon = nil then - begin - FDefaultIcon := TIcon.Create; - InitializeDefaultIcon(FDefaultIcon); - end; - Result := FDefaultIcon; -end; - -function TdxPreviewOptions.DefaultRect: TRect; -begin - Result := dxPSUtl.GetDesktopWorkArea; -end; - -procedure TdxPreviewOptions.RestoreOriginalIcon; -begin - //FIcon.Handle := 0; - FIsIconAssigned := False; - if ComponentPrinter <> nil then ComponentPrinter.DesignerModified; -end; - -procedure TdxPreviewOptions.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); -begin - Rect := MakeBounds(ALeft, ATop, AWidth, AHeight); -end; - -procedure TdxPreviewOptions.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineBinaryProperty('PreviewBoundsRect', ReadBoundsRect, WriteBoundsRect, - IsBoundsStored); - Filer.DefineProperty('IsCaptionAssigned', ReadIsCaptionAssigned, WriteIsCaptionAssigned, - FIsCaptionAssigned and (Caption = '')); - Filer.DefineProperty('IsIconAssigned', ReadIsIconAssigned, WriteIsIconAssigned, - FIsIconAssigned and Icon.Empty); -end; - -procedure TdxPreviewOptions.DoAssign(Source: TdxBaseObject); -begin - inherited; - with TdxPreviewOptions(Source) do - begin - Self.Caption := Caption; - Self.EnableOptions := EnableOptions; - Self.HelpContext := HelpContext; - Self.HelpFile := HelpFile; - Self.Icon := Icon; - Self.Rect := Rect; - Self.SavePosition := SavePosition; - Self.SaveZoomPosition := SaveZoomPosition; - Self.ThumbnailsOptions := ThumbnailsOptions; - Self.WindowState := WindowState; - Self.VisibleOptions := VisibleOptions; - - Self.FIsBoundsAssigned := FIsBoundsAssigned; - Self.FIsCaptionAssigned := FIsCaptionAssigned; - Self.FIsIconAssigned := FIsIconAssigned; - end; -end; - -procedure TdxPreviewOptions.DoRestoreDefaults; -begin - inherited; - FEnableOptions := dxDefaultPreviewEnableOptions; - - FSavePosition := True; - FSaveZoomPosition := True; - ThumbnailsOptions.RestoreDefaults; - FWindowState := wsNormal; - FVisibleOptions := dxDefaultPreviewVisibleOptions; - - FIsBoundsAssigned := False; - FIsCaptionAssigned := False; - FIsIconAssigned := False; -end; - -function TdxPreviewOptions.GetIsIconAssigned: Boolean; -begin - Result := not dxPSUtl.dxAreGraphicsEqual(FIcon, DefaultIcon); -end; - -procedure TdxPreviewOptions.IconChanged(Sender: TObject); -begin - FIsIconAssigned := True; -end; - -procedure TdxPreviewOptions.InitializeDefaultIcon(AnIcon: TIcon); -begin - Icon_LoadFromResourcename(AnIcon, IDB_DXPSPREVIEW); -end; - -procedure TdxPreviewOptions.RefreshIsIconAssigned; -begin - // FIsIconAssigned := dxPSUtl.dxAreGraphicsEqual(FIcon, DefaultIcon); -end; - -function TdxPreviewOptions.GetCaption: string; -begin - if FIsCaptionAssigned then - Result := FCaption - else - Result := DefaultCaption; -end; - -function TdxPreviewOptions.GetHelpFile: string; -begin - Result := dxPSEngine.HelpFile; -end; - -function TdxPreviewOptions.GetIcon: TIcon; -begin - if FIsIconAssigned or ((ComponentPrinter <> nil) and (csLoading in ComponentPrinter.ComponentState)) then - Result := FIcon - else - Result := DefaultIcon; -end; - -function TdxPreviewOptions.GetPosition(Index: Integer): Integer; -begin - with Rect do - case Index of - 0: Result := Bottom - Top; - 1: Result := Left; - 2: Result := Top; - else - Result := Right - Left; - end; -end; - -function TdxPreviewOptions.GetRect: TRect; -begin - if FIsBoundsAssigned then - Result := FRect - else - Result := DefaultRect; -end; - -function TdxPreviewOptions.GetRegistryPath: string; -begin - Result := dxPSEngine.RealRegistryPath; -end; - -function TdxPreviewOptions.IsBoundsStored: Boolean; -begin - Result := FIsBoundsAssigned and not EqualRect(FRect, DefaultRect); -end; - -function TdxPreviewOptions.IsCaptionStored: Boolean; -begin - Result := FIsCaptionAssigned and (FCaption <> DefaultCaption); -end; - -function TdxPreviewOptions.IsIconStored: Boolean; -begin - Result := FIsIconAssigned and not dxPSUtl.dxAreGraphicsEqual(FIcon, DefaultIcon); -end; - -procedure TdxPreviewOptions.SetEnableOptions(Value: TdxPreviewEnableOptions); -begin - if FEnableOptions <> Value then - begin - FEnableOptions := Value; - if HasPreviewWindow then - PreviewWindow.SetPreviewEnableOptions(FEnableOptions); - end; -end; - -procedure TdxPreviewOptions.SetCaption(const Value: string); -begin - if Caption <> Value then - begin - FCaption := Value; - FIsCaptionAssigned := True; - if HasPreviewWindow then PreviewWindow.Caption := Caption; - end; -end; - -procedure TdxPreviewOptions.SetHelpContext(Value: THelpContext); -begin - FHelpContext := Value; - if HasPreviewWindow then PreviewWindow.HelpContext := FHelpContext; -end; - -procedure TdxPreviewOptions.SetHelpFile(const Value: string); -begin - dxPSEngine.HelpFile := Value; - if HasPreviewWindow then PreviewWindow.HelpFile := Value; -end; - -procedure TdxPreviewOptions.SetIcon(Value: TIcon); -begin - FIcon.Assign(Value); -end; - -procedure TdxPreviewOptions.SetPosition(Index: Integer; Value: Integer); -var - R: TRect; -begin - R := Self.Rect; - case Index of - 0: R.Bottom := R.Top + Value; - 1: R.Left := Value; - 2: R.Top := Value; - 3: R.Right := R.Left + Value; - end; - Self.Rect := R; -end; - -procedure TdxPreviewOptions.SetRect(Value: TRect); -begin - with Value do - begin - if Right < Left then Right := Left; - if Bottom < Top then Bottom := Top; - end; - - if not EqualRect(FRect, Value) then - begin - FRect := Value; - FIsBoundsAssigned := True; - end; -end; - -procedure TdxPreviewOptions.SetRegistryPath(const Value: string); -begin - dxPSEngine.RegistryPath := Value; -end; - -procedure TdxPreviewOptions.SetShowExplorer(Value: Boolean); -begin - if FShowExplorer <> Value then - begin - FShowExplorer := Value; - if HasPreviewWindow then PreviewWindow.ShowExplorer := ShowExplorer; - end; -end; - -procedure TdxPreviewOptions.SetThumbnailsOptions(Value: TdxComponentPrinterThumbnailsOptions); -begin - ThumbnailsOptions.Assign(Value); -end; - -procedure TdxPreviewOptions.SetWindowState(Value: TWindowState); -begin - FWindowState := Value; - if HasPreviewWindow then PreviewWindow.WindowState := FWindowState; -end; - -procedure TdxPreviewOptions.SetVisibleOptions(Value: TdxPreviewVisibleOptions); -begin - if FVisibleOptions <> Value then - begin - FVisibleOptions := Value; - if HasPreviewWindow then - PreviewWindow.SetPreviewVisibleOptions(FVisibleOptions); - end; -end; - -function TdxPreviewOptions.HasPreviewWindow: Boolean; -begin - Result := (ComponentPrinter <> nil) and not ComponentPrinter.IsDesigning and - ComponentPrinter.PreviewExists; -end; - -function TdxPreviewOptions.PreviewWindow: TBasedxPreviewWindow; -begin - Result := ComponentPrinter.PreviewWindow; -end; - -procedure TdxPreviewOptions.ReadBoundsRect(Stream: TStream); -var - R: TRect; -begin - Stream.ReadBuffer(R, SizeOf(R)); - Rect := R; -end; - -procedure TdxPreviewOptions.ReadIsCaptionAssigned(Reader: TReader); -begin - FIsCaptionAssigned := Reader.ReadBoolean; -end; - -procedure TdxPreviewOptions.ReadIsIconAssigned(Reader: TReader); -begin - FIsIconAssigned := Reader.ReadBoolean; -end; - -procedure TdxPreviewOptions.WriteBoundsRect(Stream: TStream); -begin - Stream.WriteBuffer(FRect, SizeOf(TRect)); -end; - -procedure TdxPreviewOptions.WriteIsCaptionAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsCaptionAssigned); -end; - -procedure TdxPreviewOptions.WriteIsIconAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsIconAssigned); -end; - -{ TdxPSComponentPrinterExplorerChangeNotifier } - -constructor TdxPSComponentPrinterExplorerChangeNotifier.Create(AComponentPrinter: TCustomdxComponentPrinter); -begin - Assert(AComponentPrinter <> nil); - FComponentPrinter := AComponentPrinter; - inherited Create(nil); -end; - -procedure TdxPSComponentPrinterExplorerChangeNotifier.ItemDataUnloaded(AnItem: TdxPSExplorerItem); -begin - if (AnItem.Explorer = Explorer) and (ComponentPrinter.CurrentLink <> nil) and not ComponentPrinter.IsDestroying then - begin - ComponentPrinter.CurrentLink.DataSource := rldsComponent; - ComponentPrinter.CurrentLink.FinalizeDataStream; - end; -end; - -{ TCustomdxComponentPrinter } - -constructor TCustomdxComponentPrinter.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - if AOwner <> nil then AOwner.FreeNotification(Self); - FAutoUpdateDateTime := True; - FBeepAfterLongOperations := True; - FCurrentLink := nil; - FDateFormat := 0; - FExplorerChangeNotifier := TdxPSComponentPrinterExplorerChangeNotifier.Create(Self); - FInternalStreaming := False; - FLongOperationTime := 5000; - FPageNumberFormat := pnfNumeral; - FReportLinkDesigner := nil; - FPreviewWindowDesigner := nil; - FPrintTitle := ''; - FState := []; - FPreviewOptions := TdxPreviewOptions.Create; - FPreviewOptions.FComponentPrinter := Self; - FPrintFileList := TStringList.Create; - FOptions := dxDefaultCPOptions; - FReportLinks := TList.Create; - FSaveCopies := 1; - FSaveCollate := False; - FTimeFormat := 0; - FHFTextEntryChooseSubscriber := TdxHFTextEntryChooseSubscriber.Create([TdxHFTextEntryChooseEvent]); - TdxHFTextEntryChooseSubscriber(FHFTextEntryChooseSubscriber).OnHFTextEntryChoose := OnHFTextEntryChosen; - FWindowHandle := dxPSUtl.dxAllocatehWnd(WndProc); - FVersion := 0; -end; - -destructor TCustomdxComponentPrinter.Destroy; -begin - {$IFNDEF DELPHI5} - Destroying; - {$ENDIF} - dxPSUtl.dxDeallocatehWnd(FWindowHandle); - FreeAndNil(FHFTextEntryChooseSubscriber); - FreeAndNil(FPrintFileList); - FreeAndNil(FPreviewWindowDesigner); - FreeAndNil(FReportLinkDesigner); - if not IsDesigning then DestroyPreviewWindow; - FreeAndNil(FPreviewOptions); - FreeAndNil(FExplorerChangeNotifier); - DeleteAllLinks; - FreeAndNil(FReportLinks); - inherited; -end; - -procedure TCustomdxComponentPrinter.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - I: Integer; - ReportLink: TBasedxReportLink; -begin - if not FInternalStreaming then - for I := 0 to LinkCount - 1 do - begin - ReportLink := Self.ReportLink[I]; - if Root = ReportLink.Owner then Proc(ReportLink); - end; -end; - -procedure TCustomdxComponentPrinter.Loaded; -begin - inherited; - PreviewOptions.RefreshIsIconAssigned; -end; - -procedure TCustomdxComponentPrinter.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited; - if Operation = opRemove then - begin - if AComponent = Explorer then Explorer := nil; - if AComponent = ExplorerStubLink then ExplorerStubLink := nil; - end; -end; - -procedure TCustomdxComponentPrinter.SetChildOrder(Child: TComponent; Order: Integer); -begin - inherited; - if FReportLinks.IndexOf(Child) > -1 then - (Child as TBasedxReportLink).Index := Order; -end; - -procedure TCustomdxComponentPrinter.SetName(const NewName: TComponentName); -var - AName: string; - OldName: string; - P, I: Integer; - Link: TBasedxReportLink; -begin - OldName := Name; - inherited SetName(NewName); - if IsDesigning and (LinkCount > 0) then - try - if ReportLinkDesigner <> nil then - ReportLinkDesigner.BeginUpdate; - try - for I := 0 to LinkCount - 1 do - begin - Link := ReportLink[I]; - P := Pos(OldName, Link.Name); - if P = 0 then - AName := Name + Link.Name - else - AName := Copy(Link.Name, 1, P - 1) + Name + - Copy(Link.Name, P + Length(OldName), Length(Link.Name) - P - Length(OldName) + 1); - Link.Name := AName; - end; - finally - if ReportLinkDesigner <> nil then - ReportLinkDesigner.EndUpdate; - end; - except - on EComponentError do ; {Ignore rename errors } - end; -end; - -procedure TCustomdxComponentPrinter.SetExplorer(Value: TCustomdxPSExplorer); -begin - if FExplorer <> Value then - begin - FExplorer := Value; - if Explorer <> nil then - Explorer.FreeNotification(Self); - ExplorerChangeNotifier.Explorer := Explorer; - end; -end; - -procedure TCustomdxComponentPrinter.SetExplorerStubLink(Value: TBasedxReportLink); -begin - if FExplorerStubLink <> Value then - if (Value = nil) or Value.CanBeUsedAsStub then - begin - FExplorerStubLink := Value; - if Value <> nil then - Value.FreeNotification(Self); - end; -end; - -procedure TCustomdxComponentPrinter.SetLongOperationTime(Value: Integer); -begin - if Value < 0 then Value := 0; - if FLongOperationTime <> Value then - FLongOperationTime := Value; -end; - -procedure TCustomdxComponentPrinter.SetPreviewOptions(Value: TdxPreviewOptions); -begin - PreviewOptions.Assign(Value); -end; - -function TCustomdxComponentPrinter.IsCustomPrintDlgData: Boolean; -begin - Result := Assigned(FOnInitializePrintDlgData); -end; - -function TCustomdxComponentPrinter.IsForegroundPreviewWindow: Boolean; -begin - Result := (cpsPreviewing in State) and (PreviewWindow <> nil) and - (GetForegroundWindow = PreviewWindow.Handle); -end; - -function TCustomdxComponentPrinter.IsGenerateReportProgressEvent: Boolean; -begin - Result := not IsDesigning and not IsLoading and (cpoGenerateReportProgressEvent in Options); -end; - -function TCustomdxComponentPrinter.IsRebuildBeforeOutput(AForceRebuild: Boolean): Boolean; -begin - Result := AForceRebuild or IsDesigning; - if CurrentLink <> nil then - Result := Result or CurrentLink.RebuildNeeded or (CurrentLink.DataSource = rldsExternalStorage); -end; - -function TCustomdxComponentPrinter.IsRebuildBeforePreview: Boolean; -begin - Result := IsRebuildBeforeOutput(cpoAutoRebuildBeforePreview in Options); -end; - -function TCustomdxComponentPrinter.IsRebuildBeforePrint: Boolean; -begin - Result := IsRebuildBeforeOutput(cpoAutoRebuildBeforePrint in Options); -end; - -function TCustomdxComponentPrinter.IsShowHourGlass: Boolean; -begin - Result := cpoShowHourGlass in Options; -end; - -procedure TCustomdxComponentPrinter.PaintThumbnailPage(ACanvas: TCanvas; - APageIndex: Integer; const APageBounds, AContentBounds: TRect; - AReportLink: TBasedxReportLink = nil); -begin - AReportLink := CheckLink(AReportLink); - if AReportLink = nil then Exit; - - AReportLink.PaintPage(ACanvas, APageBounds, APageIndex, APageIndex, - dxThumbnailsZoomFactors[PreviewWindow.ThumbnailsSize]); - - if PreviewOptions.ThumbnailsOptions.ShowPageNumbers then - PaintThumbnailPageIndex(ACanvas, APageBounds, AReportLink.Renderer.PreparedPageIndex(APageIndex)); -end; - -procedure TCustomdxComponentPrinter.PaintThumbnailPageIndex(ACanvas: TCanvas; - const R: TRect; APageIndex: Integer); -var - FontSize: Integer; -begin - with PreviewOptions.ThumbnailsOptions do - begin - FontSize := Font.Size; - if PreviewWindow.ThumbnailsSize = tsSmall then - Font.Size := Font.Size div 2; - dxPSUtl.DrawBlendedText(ACanvas, R, IntToStr(APageIndex + 1), Font); - Font.Size := FontSize; - end; -end; - -function TCustomdxComponentPrinter.GetCurrentLinkIndex: Integer; -begin - if CurrentLink <> nil then - Result := CurrentLink.Index - else - Result := -1; -end; - -function TCustomdxComponentPrinter.GetExplorerRealStubLink: TBasedxReportLink; -begin - Result := FExplorerStubLink; - if Result = nil then - Result := AddEmptyLink(TBasedxReportLink); -end; - -function TCustomdxComponentPrinter.GetIsExplorerMode: Boolean; -begin - Result := cpsExplore in State; -end; - -function TCustomdxComponentPrinter.GetLinkCount: Integer; -begin - Result := FReportLinks.Count; -end; - -function TCustomdxComponentPrinter.GetPreviewCaption: string; -begin - if cpsExplore in State then - Result := cxGetResourceString(@sdxReportExplorer) - else - Result := PreviewOptions.Caption; - - if (Explorer <> nil) and (Explorer.LoadedItem <> nil) then - Result := Result + ' ' + sdxDocumentCaptionSeparator + ' ' + Explorer.LoadedItem.FormCaption - else - if (CurrentLink <> nil) and (CurrentLink.DataSource = rldsExternalStorage) and (CurrentLink.StorageName <> '') then - Result := Result + ' ' + sdxDocumentCaptionSeparator + ' ' + CurrentLink.StorageName; -end; - -function TCustomdxComponentPrinter.GetReportLink(Index: Integer): TBasedxReportLink; -begin - Result := TBasedxReportLink(FReportLinks[Index]); -end; - -procedure TCustomdxComponentPrinter.SetAbortBuilding(Value: Boolean); -begin - FAbortBuilding := Value; -end; - -procedure TCustomdxComponentPrinter.SetAbortPrinting(Value: Boolean); -begin - FAbortPrinting := Value; -end; - -procedure TCustomdxComponentPrinter.SetAutoUpdateDateTime(Value: Boolean); -begin - if FAutoUpdateDateTime <> Value then - FAutoUpdateDateTime := Value; -end; - -procedure TCustomdxComponentPrinter.SetDateFormat(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > dxPgsDlg.DateFormats.Count - 1 then - Value := dxPgsDlg.DateFormats.Count - 1; - if FDateFormat <> Value then - FDateFormat := Value; -end; - -procedure TCustomdxComponentPrinter.SetCurrentLink(Value: TBasedxReportLink); -begin - if (CurrentLink <> Value) and (IndexOfLink(Value) > -1) then - begin - if PreviewExists then DestroyPreviewWindow; - FCurrentLink := Value; - DoChangeCurrentLink; - FormatChanged(FCurrentLink); - if FCurrentLink <> nil then - FCurrentLink.PrinterPage.ApplyToPrintDevice; - DesignerUpdate(Value);//nil); - end; -end; - -procedure TCustomdxComponentPrinter.SetCurrentLinkIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > LinkCount - 1 then - Value := LinkCount - 1; - if Value > -1 then - CurrentLink := ReportLink[Value]; -end; - -procedure TCustomdxComponentPrinter.SetPageNumberFormat(Value: TdxPageNumberFormat); -begin - if FPageNumberFormat <> Value then - FPageNumberFormat := Value; -end; - -procedure TCustomdxComponentPrinter.SetPrintFileList(Value: TStrings); -begin - FPrintFileList.Assign(Value); -end; - -procedure TCustomdxComponentPrinter.SetReportLink(Index: Integer; Value: TBasedxReportLink); -begin - ReportLink[Index].Assign(Value); -end; - -procedure TCustomdxComponentPrinter.SetTimeFormat(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > dxPgsDlg.TimeFormats.Count - 1 then - Value := dxPgsDlg.TimeFormats.Count - 1; - if FTimeFormat <> Value then - FTimeFormat := Value; -end; - -function TCustomdxComponentPrinter.BeginPrintPages(const Source: string; - out APageIndexes: TIntegers): Boolean; -begin - Result := MakePageIndexes(Source, APageIndexes); -end; - -procedure TCustomdxComponentPrinter.EndPrintPages(var APageIndexes: TIntegers); -begin - SetLength(APageIndexes, 0); -end; - -function TCustomdxComponentPrinter.CreatePreviewWindow(AReportLink: TBasedxReportLink): TBasedxPreviewWindow; -var - PreviewClass: TdxPreviewWindowClass; -begin - Result := nil; - PreviewClass := GetPreviewClass; - if PreviewClass <> nil then - try - Result := PreviewClass.Create(nil); - Result.BeginUpdate; - try - Result.SetComponentPrinter(Self); - SetupPreviewProperties(Result); - Result.CreationComplete; - finally - Result.EndUpdate; - end; - except - FreeAndNil(Result); - raise; - end - else - raise EdxComponentPrinter.Create(cxGetResourceString(@sdxPreviewNotRegistered)); -end; - -procedure TCustomdxComponentPrinter.DestroyPreviewWindow; -begin - if cpsPrinting in State then - AbortPrinting := True; - FreeAndNil(FPreviewWindow); -end; - -procedure TCustomdxComponentPrinter.FinalizeDefaultPrintDlgData(AReportLink: TBasedxReportLink; - var APrintDlgData: TdxPrintDlgData); -begin - FreeAndNil(APrintDlgData.DialogData.FileList); - DoFinalizePrintDlgData(AReportLink, APrintDlgData); -end; - -procedure TCustomdxComponentPrinter.InitializeDefaultPrintDlgData(AReportLink: TBasedxReportLink; - out APrintDlgData: TdxPrintDlgData); -const - BtnEnabledOn: TdxPrintDlgButtons = [pdbPreview, pdbPageSetup, pdbHelp]; - BtnVisibleOn: TdxPrintDlgButtons = [pdbPreview, pdbPageSetup, pdbHelp]; - OptEnabledOn: TdxPrintDlgOptions = [pdoCurrentPage]; - OptVisibleOn: TdxPrintDlgOptions = [pdoCurrentPage]; -begin - FillChar(APrintDlgData, SizeOf(TdxPrintDlgData), 0); - with APrintDlgData do - begin - DialogData.Collate := False; - DialogData.Copies := 1; - DialogData.FileList := TStringList.Create; - DialogData.FileList.Assign(PrintFileList); - DialogData.MaxRange := CurrentLink.PageCount; // (v2.2) - if DialogData.MaxRange = 0 then DialogData.MaxRange := -1; - DialogData.MinRange := 1; - if CurrentLink.PageCount = 0 then DialogData.MinRange := 0; - DialogData.PageCount := CurrentLink.PageCount; - DialogData.PageNums := pnAll; - DialogData.PageRanges := prAll; - if DialogData.PageCount > 0 then {v3.2} - DialogData.Pages := '1-' + IntToStr(DialogData.PageCount); - DialogData.PrintToFile := FSavePrintToFile; - if not IsDesigning and (not (cpsPreviewing in State) or (pvoPrintStyles in PreviewOptions.VisibleOptions)) then - DialogData.StyleManager := CurrentLink.StyleManager; - DialogData.PageCount := CurrentLink.PageCount; - - Title := cxGetResourceString(@sdxPrintDialogCaption); - - OptionsEnabled := pdoDefaultOptionsEnabled + OptEnabledOn; - OptionsVisible := pdoDefaultOptionsVisible + OptVisibleOn; - ButtonsEnabled := pdbDefault + BtnEnabledOn; - ButtonsVisible := pdbDefault + BtnVisibleOn; - if cpsPreviewing in State then - ButtonsVisible := ButtonsVisible - [pdbPreview]; - - Events.OnPageSetup := PrnDlgPageSetup; - IsCheckUserInput := True; - end; - DoInitializePrintDlgData(AReportLink, APrintDlgData); -end; - -procedure TCustomdxComponentPrinter.InitDevModeFromPrinterPageSettings( - APrinterPage: TdxPrinterPage); -begin - if (dxPrintDevice = nil) or (dxPrintDevice.DeviceMode = nil) then Exit; - dxPrintDevice.DeviceMode^.dmOrientation := Byte(APrinterPage.Orientation) + 1; - dxPrintDevice.DeviceMode^.dmColor := Byte(not APrinterPage.GrayShading) + 1; -end; - -function TCustomdxComponentPrinter.PrintDialog(AReportLink: TBasedxReportLink; - var APrintDlgData: TdxPrintDlgData): Boolean; -var - PreviewBtnClicked: Boolean; -begin - Include(FState, cpsPrintDialog); - try - Result := dxPrnDlg.dxPrintDialog(APrintDlgData); - PreviewBtnClicked := APrintDlgData.PreviewBtnClicked; - if Result then - begin - FSavePrintToFile := APrintDlgData.DialogData.PrintToFile; - PrintFileList := APrintDlgData.DialogData.FileList; - if AReportLink <> nil then - AReportLink.PrinterPage.InitFromPrintDevice; - if not PreviewBtnClicked then - with APrintDlgData.DialogData do - begin - if PrintToFile then - dxPrintDevice.FileName := FileName - else - dxPrintDevice.FileName := ''; - FPrintAll := PageRanges = prAll; - if PageRanges in [prCurrent, prRange] then - begin - if PageRanges = prCurrent then - Pages := IntToStr(AReportLink.CurrentPage); - Result := PrintPagesAsStringEx(Pages, PageNums, Copies, Collate, AReportLink); - end - else // prAll - PrintEx(PageNums, Copies, Collate, AReportLink); - end; - end; - finally - FPrintAll := False; - Exclude(FState, cpsPrintDialog); - end; - - if PreviewBtnClicked then Preview(True, AReportLink); -end; - -function TCustomdxComponentPrinter.PrintPagesAsStringEx(const APages: string; - APageNums: TdxPageNumbers; ACopyCount: Integer; ACollate: Boolean; - AReportLink: TBasedxReportLink = nil): Boolean; -var - PageIndexes: TIntegers; -begin - if BeginPrintPages(APages, PageIndexes) then - try - PrintPagesEx(PageIndexes, APageNums, ACopyCount, ACollate, AReportLink); - Result := True; - finally - EndPrintPages(PageIndexes); - end - else - Result := False; -end; - -procedure TCustomdxComponentPrinter.PrnDlgPageSetup(Sender: TObject; - var ADone: Boolean; APreviewBtnClicked, APrintBtnClicked: PBoolean); -var - ShowPreviewBtn, ShowPrintBtn, PreviewBtnClicked, PrintBtnClicked: Boolean; -begin - ShowPreviewBtn := APreviewBtnClicked <> nil; - ShowPrintBtn := APrintBtnClicked <> nil; - ADone := (CurrentLink <> nil) and - PageSetupEx(0, ShowPreviewBtn, ShowPrintBtn, PreviewBtnClicked, PrintBtnClicked, CurrentLink); - if (ADone or PreviewBtnClicked) and PreviewExists then - begin - CurrentLink.CalculateRenderInfos; - with PreviewWindow do - begin - InitContent; - InvalidateContent; - UpdateControls; - end; - end; - - if ShowPreviewBtn then - APreviewBtnClicked^ := PreviewBtnClicked; - - if ShowPrintBtn then - APrintBtnClicked^ := PrintBtnClicked; -end; - -procedure TCustomdxComponentPrinter.RaiseBuildingEvent(AReportLink: TBasedxReportLink; - const APercentCompleted: Double; AStage: TdxPSBuildStage); -var - Event: TdxEvent; -begin - if CurrentCompositionByLink(AReportLink) <> nil then Exit; - Event := TdxPSBuildEvent.Create(Self, AReportLink, APercentCompleted, AStage); - dxPSProcessEvent(Event) -end; - -procedure TCustomdxComponentPrinter.RaisePrintingEvent(AReportLink: TBasedxReportLink; - APageIndex, APageCount: Integer; AStage: TdxPSPrintStage); -var - Event: TdxEvent; -begin - Event := TdxPSPrintEvent.Create(Self, AReportLink, APageIndex, APageCount, AStage); - dxPSProcessEvent(Event); -end; - -procedure TCustomdxComponentPrinter.ActivateLink(AReportLink: TBasedxReportLink); - - function IsCompositionActivatation(AComposition: TdxCompositionReportLink): Boolean; - begin - Result := (AComposition <> nil) and not (csRebuildReportLink in AComposition.CompositionState); - end; - -var - Composition: TdxCompositionReportLink; -begin - Composition := CurrentCompositionByLink(AReportLink); - if (AReportLink is TdxCompositionReportLink) or (Composition = nil) or IsCompositionActivatation(Composition) then - begin - PrepareBuildReport(AReportLink); - PrepareLongOperation; - if AReportLink.CurrentPrintStyle is TdxPSPrintStyle then - TdxPSPrintStyle(AReportLink.CurrentPrintStyle).BeforeGenerating; - end; - try - if IsCompositionActivatation(Composition) then - Composition.ActivateLink(AReportLink) - else - AReportLink.InternalActivate; - - if AutoUpdateDateTime then - if IsCompositionActivatation(Composition) and (Composition.DataSource = rldsComponent) then - Composition.DateTime := Now - else - if AReportLink.DataSource = rldsComponent then - AReportLink.DateTime := Now; - finally - if (AReportLink is TdxCompositionReportLink) or (Composition = nil) or IsCompositionActivatation(Composition) then - begin - if AReportLink.CurrentPrintStyle is TdxPSPrintStyle then - TdxPSPrintStyle(AReportLink.CurrentPrintStyle).AfterGenerating; - UnprepareLongOperation; - UnprepareBuildReport(AReportLink); - end; - end; -end; - -function TCustomdxComponentPrinter.CheckLink(Value: TBasedxReportLink): TBasedxReportLink; -begin - if Value <> nil then CurrentLink := Value; - Result := CurrentLink; -end; - -function TCustomdxComponentPrinter.CreateLink(ALinkClass: TdxReportLinkClass; - AComponent: TComponent; AOwner: TComponent): TBasedxReportLink; -var - LinkClass: TdxReportLinkClass; -begin - Result := nil; - LinkClass := ALinkClass; - if AComponent <> nil then - if IsSupportedCompClass(AComponent) then - LinkClass := dxPSLinkClassByCompClass(TComponentClass(AComponent.ClassType)) - else - if IsDesigning then - raise EdxComponentPrinter.Create(cxGetResourceString(@sdxComponentNotSupported)); - if LinkClass = nil then Exit; - Result := LinkClass.Create(AOwner); - if AComponent <> nil then - Result.Component := AComponent; - Result.SetComponentPrinter(Self); - DoAddReportLink(Result); - DesignerModified; -end; - -procedure TCustomdxComponentPrinter.DeactivateLink(AReportLink: TBasedxReportLink); -begin - AReportLink.DoDestroyReport; -end; - -procedure TCustomdxComponentPrinter.InsertLink(Value: TBasedxReportLink); -begin - FReportLinks.Add(Value); - Value.FComponentPrinter := Self; - if LinkCount = 1 then Value.IsCurrentLink := True; -end; - -procedure TCustomdxComponentPrinter.MoveLink(ACurIndex, ANewIndex: Integer); -begin - FReportLinks.Move(ACurIndex, ANewIndex); - DesignerUpdate(nil); -end; - -procedure TCustomdxComponentPrinter.RemoveLink(Value: TBasedxReportLink); -var - Index: Integer; -begin - if not IsDestroying and (FCurrentLink = Value) then - begin - if PreviewExists then DestroyPreviewWindow; - Index := Value.Index; - end - else - Index := -1; - FReportLinks.Remove(Value); - Value.FComponentPrinter := nil; - if Index <> -1 then - ResyncCurrentLink(Index); - DoDeleteReportLink(Value); -end; - -procedure TCustomdxComponentPrinter.ResyncCurrentLink(AIndex: Integer); -begin - if AIndex > LinkCount - 1 then - AIndex := LinkCount - 1; - if AIndex < 0 then - begin - FCurrentLink := nil; - DoChangeCurrentLink; - end - else - CurrentLink := ReportLink[AIndex]; -end; - -procedure TCustomdxComponentPrinter.OnHFTextEntryChosen(Sender: TObject; const AEntry: string); -var - PagePart: TCustomdxPageObject; - Part1, Part2, Part3: string; -begin - if (CurrentLink <> nil) and (TdxPrintStyleManager(Sender) = CurrentLink.StyleManager) then - begin - if PreviewExists then - case PreviewWindow.State of - prsEditHeaders: - PagePart := CurrentLink.RealPrinterPage.PageHeader; - prsEditFooters: - PagePart := CurrentLink.RealPrinterPage.PageFooter; - else //prsNone - Exit; - end - else - PagePart := CurrentLink.RealPrinterPage.PageHeader; - - if PagePart <> nil then - begin - dxPSSplitAutoHFTextEntry(AEntry, Part1, Part2, Part3); - if (Part2 = '') and (Part3 = '') then - PagePart.Titles[PreviewWindow.HFEditPart].Add(Part1) - else - with PagePart do - begin - if Part1 <> '' then LeftTitle.Add(Part1); - if Part2 <> '' then CenterTitle.Add(Part2); - if Part3 <> '' then RightTitle.Add(Part3); - end; - - if PreviewExists then - case PreviewWindow.State of - prsEditHeaders: - PreviewWindow.InvalidatePagesHeaderContent; - prsEditFooters: - PreviewWindow.InvalidatePagesFooterContent; - end; - end; - end; -end; - -procedure TCustomdxComponentPrinter.DesignerModified; -begin - if ReportLinkDesigner <> nil then ReportLinkDesigner.Modified; -end; - -procedure TCustomdxComponentPrinter.DesignerUpdate(AnItem: TBasedxReportLink); -begin - if ReportLinkDesigner <> nil then ReportLinkDesigner.Update(AnItem); -end; - -function TCustomdxComponentPrinter.IsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -function TCustomdxComponentPrinter.IsDestroying: Boolean; -begin - Result := csDestroying in ComponentState; -end; - -function TCustomdxComponentPrinter.IsLoading: Boolean; -begin - Result := csLoading in ComponentState; -end; - -procedure TCustomdxComponentPrinter.ShowExistingPreviewWindow; -const - Flags: array[Boolean] of UINT = (SW_SHOW, SW_RESTORE or SW_SHOWNORMAL); -var - WindowPlacement: TWindowPlacement; - Wnd: THandle; -begin - WindowPlacement.Length := SizeOf(WindowPlacement); - Wnd := PreviewWindow.Handle; - GetWindowPlacement(Wnd, @WindowPlacement); - ShowWindow(Wnd, Flags[WindowPlacement.ShowCmd = SW_SHOWMINIMIZED]); - SetForegroundWindow(Wnd); -end; - -procedure TCustomdxComponentPrinter.WndProc(var Message: TMessage); -var - I: Integer; -begin - with Message do - begin - case Msg of - WM_SETTINGCHANGE: -// if (PChar(message.lParam) = 'devices') then - begin - RereadDefaultPrinterPage; - for I := 0 to LinkCount - 1 do - TdxReportLinkPrinterPage(ReportLink[I].PrinterPage).SynchronizeMeasurementUnits; - DesignerModified; - end; - end; - Result := DefWindowProc(FWindowHandle, Msg, wParam, lParam); - end; -end; - -procedure TCustomdxComponentPrinter.FormatChanged(AReportLink: TBasedxReportLink); -begin - dxHFFormatObject.DateFormat := dxPgsDlg.DateFormats[AReportLink.DateFormat]; - dxHFFormatObject.DateTime := AReportLink.DateTime; - dxHFFormatObject.PageNumberFormat := AReportLink.PageNumberFormat; - dxHFFormatObject.StartPageIndex := AReportLink.StartPageIndex; - dxHFFormatObject.TimeFormat := dxPgsDlg.TimeFormats[AReportLink.TimeFormat]; -end; - -procedure TCustomdxComponentPrinter.AssignReportLinks(Source: TCustomdxComponentPrinter); -var - SaveOwner: TComponent; - I: Integer; - Link: TBasedxReportLink; -begin - if LinkCount > 0 then - SaveOwner := ReportLink[0].Owner - else - SaveOwner := Owner; - DeleteAllLinks; - if Source <> nil then - for I := 0 to Source.LinkCount - 1 do - begin - Link := Source.ReportLink[I]; - with AddEmptyLinkEx(Link.LinkClass, SaveOwner) do - begin - Component := Link.Component; - Assign(Link); - end; - end; -end; - -function TCustomdxComponentPrinter.CreateLinkFromFile(const AFileName: string): TBasedxReportLink; -var - Stream: TFileStream; -begin - try - Stream := TFileStream.Create(AFileName, fmOpenRead or fmShareDenyWrite); - try - Result := CreateLinkFromStream(Stream); - finally - Stream.Free; - end; - except - FreeAndNil(Result); - raise; - end; -end; - -function TCustomdxComponentPrinter.CreateLinkFromStream(AStream: TStream): TBasedxReportLink; -var - StorageInfo: TdxPSDataStorageInfo; -begin - try - StorageInfo := TBasedxReportLink.ExtractStorageInfo(AStream, False); - if StorageInfo.StorageVersion = dxPSStorageVersion then - if StorageInfo.LinkClass <> nil then - begin - Result := StorageInfo.LinkClass.Create(Self.Owner); - Result.InternalLoadDataFromStream(AStream); - end - else - raise EdxReportLink.CreateFmt(cxGetResourceString(@sdxLinkIsNotIncludedInUsesClause), [StorageInfo.LinkClassName]) - else - raise EdxInvalidStorageVersion.Create(StorageInfo.StorageVersion); - except - FreeAndNil(Result); - raise; - end; -end; - -function TCustomdxComponentPrinter.AddComposition: TdxCompositionReportLink; -begin - Result := AddEmptyLinkEx(TdxCompositionReportLink, Self.Owner) as TdxCompositionReportLink; -end; - -function TCustomdxComponentPrinter.AddEmptyLink(ALinkClass: TdxReportLinkClass): TBasedxReportLink; -begin - Result := AddEmptyLinkEx(ALinkClass, Self.Owner); -end; - -function TCustomdxComponentPrinter.AddEmptyLinkEx(ALinkClass: TdxReportLinkClass; - AOwner: TComponent): TBasedxReportLink; -begin - Result := CreateLink(ALinkClass, nil, AOwner); -end; - -function TCustomdxComponentPrinter.AddLink(AComponent: TComponent): TBasedxReportLink; -begin - Result := AddLinkEx(AComponent, Self.Owner); -end; - -function TCustomdxComponentPrinter.AddLinkEx(AComponent: TComponent; - AOwner: TComponent): TBasedxReportLink; -begin - Result := CreateLink(nil, AComponent, AOwner); -end; - -procedure TCustomdxComponentPrinter.DeleteAllLinks; -begin - while LinkCount > 0 do DeleteLink(LinkCount - 1); -end; - -procedure TCustomdxComponentPrinter.DeleteLink(AIndex: Integer); -var - Link: TBasedxReportLink; -begin - if (AIndex > -1) and (AIndex < LinkCount) then - begin - Link := ReportLink[AIndex]; - Link.Free; - end; -end; - -procedure TCustomdxComponentPrinter.DestroyReport(AReportLink: TBasedxReportLink = nil); -begin - AReportLink := CheckLink(AReportLink); - if AReportLink <> nil then AReportLink.DestroyReport; -end; - -function TCustomdxComponentPrinter.FindLinkByComponent(Value: TComponent; - ACanCreate: Boolean = False): TBasedxReportLink; -var - I: Integer; -begin - if Value <> nil then - for I := 0 to LinkCount - 1 do - begin - Result := ReportLink[I]; - if Result.Component = Value then Exit; - end; - - if ACanCreate then - Result := AddLink(Value) - else - Result := nil; -end; - -procedure TCustomdxComponentPrinter.GetLinks(AList: TList); -var - I: Integer; -begin - for I := 0 to LinkCount - 1 do - AList.Add(ReportLink[I]); -end; - -function TCustomdxComponentPrinter.IndexOfLink(AReportLink: TBasedxReportLink): Integer; -begin - Result := FReportLinks.IndexOf(AReportLink); -end; - -function TCustomdxComponentPrinter.IndexOfLink(const AName: string): Integer; -begin - Result := IndexOfLinkByName(AName); -end; - -function TCustomdxComponentPrinter.IndexOfLinkByName(const AName: string): Integer; -begin - Result := IndexOfLink(LinkByName(AName)); -end; - -function TCustomdxComponentPrinter.LinkByName(const AName: string): TBasedxReportLink; -var - I: Integer; -begin - for I := 0 to LinkCount - 1 do - begin - Result := ReportLink[I]; - if Result.Name = AName then Exit; - end; - Result := nil; -end; - -procedure TCustomdxComponentPrinter.RebuildReport(AReportLink: TBasedxReportLink = nil); -begin - if AReportLink = nil then AReportLink := CurrentLink; - if AReportLink <> nil then AReportLink.RebuildReport; -end; - -function TCustomdxComponentPrinter.CurrentCompositionByLink(AReportLink: TBasedxReportLink): TdxCompositionReportLink; -var - I: Integer; - Link: TBasedxReportLink; -begin - for I := 0 to LinkCount - 1 do - begin - Link := ReportLink[I]; - if (Link is TdxCompositionReportLink) and - TdxCompositionReportLink(Link).IsCurrentLink and - TdxCompositionReportLink(Link).Items.LinkExists(AReportLink) then - begin - Result := TdxCompositionReportLink(Link); - Exit; - end; - end; - Result := nil; -end; - -procedure TCustomdxComponentPrinter.GetCompositionsByLink(AReportLink: TBasedxReportLink; - ACompositions: TList); -var - I: Integer; - Link: TBasedxReportLink; -begin - for I := 0 to LinkCount - 1 do - begin - Link := ReportLink[I]; - if (Link is TdxCompositionReportLink) and - TdxCompositionReportLink(Link).Items.LinkExists(AReportLink) then - ACompositions.Add(Link); - end; -end; - -procedure TCustomdxComponentPrinter.GetItems(AComposition: TdxCompositionReportLink; - AStrings: TStrings; AExcludeAssigned: Boolean); -var - I: Integer; - Item: TBasedxReportLink; -begin - if AComposition.ComponentPrinter = Self then - begin - AStrings.BeginUpdate; - try - for I := 0 to LinkCount - 1 do - begin - Item := ReportLink[I]; - if not (Item is TdxCompositionReportLink) and - (not AExcludeAssigned or not IsLinkInComposition(Item, AComposition)) then - AStrings.AddObject(Item.Caption, Item); - end; - finally - AStrings.EndUpdate; - end; - end; -end; - -function TCustomdxComponentPrinter.IsLinkInComposition(AReportLink: TBasedxReportLink; - AComposition: TdxCompositionReportLink): Boolean; -var - List: TList; -begin - List := TList.Create; - try - GetCompositionsByLink(AReportLink, List); - Result := List.IndexOf(AComposition) <> -1; - finally - List.Free; - end; -end; - -function TCustomdxComponentPrinter.IsLinkInCurrentComposition(AReportLink: TBasedxReportLink): Boolean; -begin - Result := (CurrentLink is TdxCompositionReportLink) and - IsLinkInComposition(AReportLink, TdxCompositionReportLink(CurrentLink)); -end; - -class function TCustomdxComponentPrinter.GetNewLinkName(AReportLink: TBasedxReportLink): string; -begin - Result := sdxNewLinkNameTemplate; -end; - -class function TCustomdxComponentPrinter.IsSupportedCompClass(AComponentClass: TClass): Boolean; -begin - Result := dxPSIsSupportedCompClass(AComponentClass); -end; - -class function TCustomdxComponentPrinter.IsSupportedCompClass(AComponent: TObject{TComponent}): Boolean; -begin - Result := dxPSIsSupportedCompClass(AComponent); -end; - -procedure TCustomdxComponentPrinter.PreparePageSetup; -begin - Include(FState, cpsPageSetupDialog); -end; - -procedure TCustomdxComponentPrinter.UnpreparePageSetup; -begin - Exclude(FState, cpsPageSetupDialog); -end; - -procedure TCustomdxComponentPrinter.PrepareBuildReport(AReportLink: TBasedxReportLink); -begin - Include(FState, cpsBuilding); - DoStartUpdateReport(AReportLink); -end; - -procedure TCustomdxComponentPrinter.UnprepareBuildReport(AReportLink: TBasedxReportLink); -begin - Exclude(FState, cpsBuilding); - DoEndUpdateReport(AReportLink); - if PreviewExists then - with PreviewWindow do - if PageCount <> AReportLink.PageCount then - begin - PageCount := AReportLink.PageCount; - ActivePageIndex := FSavePageIndex; - if (PageCount <> 0) and (ActivePageIndex = -1) then - ActivePageIndex := 0; - end - else - InvalidateContent; -end; - -procedure TCustomdxComponentPrinter.PrepareLongOperation; -begin - if IsDestroying then Exit; - if FLongOperationCounter = 0 then - begin - FStartTime := GetTickCount; - if IsShowHourGlass then dxPSStartWait; - end; - Inc(FLongOperationCounter); -end; - -procedure TCustomdxComponentPrinter.UnprepareLongOperation; -begin - if IsDestroying then Exit; - if FLongOperationCounter <> 0 then - begin - Dec(FLongOperationCounter); - if FLongOperationCounter = 0 then - begin - if IsShowHourGlass then - dxPSStopWait; - if BeepAfterLongOperations then - begin - FEndTime := GetTickCount; - if FEndTime - FStartTime > DWORD(LongOperationTime) then Beep; - end; - end; - end; -end; - -procedure TCustomdxComponentPrinter.LoadFromFile(const AName: string); -var - Stream: TFileStream; -begin - if (AName <> '') and FileExists(AName) then - begin - Stream := TFileStream.Create(AName, fmOpenRead or fmShareDenyWrite); - try - LoadFromStream(Stream); - finally - Stream.Free; - end; - end; -end; - -procedure TCustomdxComponentPrinter.LoadFromStream(AStream: TStream); -var - Version: Integer; -begin - LoadVersionFromStream(AStream, Version); - if Version <> Self.Version then Exit; - - PrepareLoadFromStream(AStream); - try - BeforeLoadFromStream(AStream); - try - try - LoadLinksFromStream(AStream); - LoadItselfFromStream(AStream); - except - ErrorLoadFromStream(AStream); - end; - finally - AfterLoadFromStream(AStream); - end; - finally - UnprepareLoadFromStream(AStream); - end; -end; - -procedure TCustomdxComponentPrinter.AfterLoadFromStream(AStream: TStream); -begin - FMemoryStream.Free; -end; - -procedure TCustomdxComponentPrinter.SaveToFile(const AName: string); -var - Stream: TFileStream; -begin - if ValidateFileName(AName) then - begin - Stream := TFileStream.Create(AName, fmCreate); - try - SaveToStream(Stream); - finally - Stream.Free; - end; - end; -end; - -procedure TCustomdxComponentPrinter.SaveToStream(AStream: TStream); -begin - PrepareSaveToStream(AStream); - try - SaveVersionToStream(AStream); - SaveLinksToStream(AStream); - SaveItselfToStream(AStream); - finally - UnprepareSaveToStream(AStream); - end; -end; - -procedure TCustomdxComponentPrinter.DoCustomDrawEntirePage(AReportLink: TBasedxReportLink; - ACanvas: TCanvas; APageIndex: Integer; ARect: TRect; ANom, ADenom: Integer); -begin - if Assigned(FOnCustomDrawPage) then - FOnCustomDrawPage(Self, AReportLink, ACanvas, APageIndex, ARect, ANom, ADenom); -end; - -procedure TCustomdxComponentPrinter.DoNewPage(AReportLink: TBasedxReportLink; - APageIndex: Integer); -begin - AReportLink := CheckLink(AReportLink); - if AReportLink <> nil then - begin - if Assigned(FOnNewPage) then FOnNewPage(Self, AReportLink, APageIndex); - RaisePrintingEvent(AReportLink, APageIndex, 0, psProgress); - end; -end; - -procedure TCustomdxComponentPrinter.DoEndPrint(AReportLink: TBasedxReportLink); -begin - AReportLink := CheckLink(AReportLink); - if AReportLink <> nil then - begin - if Assigned(FOnEndPrint) then FOnEndPrint(Self, AReportLink); - RaisePrintingEvent(AReportLink, 0, 0, psEnd); - end; - AbortPrinting := False; -end; - -procedure TCustomdxComponentPrinter.DoStartPrint(AReportLink: TBasedxReportLink; - FullPageCount: Integer); -begin - AReportLink := CheckLink(AReportLink); - if AReportLink <> nil then - begin - if Assigned(FOnStartPrint) then FOnStartPrint(Self, AReportLink, FullPageCount); - RaisePrintingEvent(AReportLink, 0, FullPageCount, psStart); - end; -end; - -procedure TCustomdxComponentPrinter.DoAddReportLink(AReportLink: TBasedxReportLink); -begin - if not IsLoading and not FInternalStreaming then - if Assigned(FOnAddReportLink) then FOnAddReportLink(Self, AReportLink); -end; - -procedure TCustomdxComponentPrinter.DoAfterPreview(AReportLink: TBasedxReportLink); -begin - if cpoDropStorageModeAfterPreview in Options then - AReportLink.DataSource := rldsComponent; - if Assigned(FOnAfterPreview) then FOnAfterPreview(Self, AReportLink); -end; - -procedure TCustomdxComponentPrinter.DoBeforeDesignReport(AReportLink: TBasedxReportLink); -begin - if Assigned(FOnBeforeDesignReport) then - FOnBeforeDesignReport(Self, AReportLink, AReportLink.DesignWindow); -end; - -procedure TCustomdxComponentPrinter.DoBeforeDestroyReport(AReportLink: TBasedxReportLink); -begin - if PreviewExists then - begin - FSavePageIndex := PreviewWindow.ActivePageIndex; - PreviewWindow.PageCount := 0; - end - else - FSavePageIndex := -1; -end; - -procedure TCustomdxComponentPrinter.DoBeforePreview(AReportLink: TBasedxReportLink); -begin - if (PreviewWindow <> nil) and Assigned(FOnBeforePreview) then - FOnBeforePreview(Self, AReportLink); -end; - -procedure TCustomdxComponentPrinter.DoChangeComponent(AReportLink: TBasedxReportLink); -begin - if not IsLoading and Assigned(FOnChangeComponent) then - FOnChangeComponent(Self, AReportLink); -end; - -procedure TCustomdxComponentPrinter.DoChangeCurrentLink; -begin - if not IsLoading and not IsDestroying and Assigned(FOnChangeCurrentLink) then - FOnChangeCurrentLink(Self); -end; - -procedure TCustomdxComponentPrinter.DoDeleteReportLink(AReportLink: TBasedxReportLink); -begin - if not IsLoading then - if Assigned(FOnDeleteReportLink) then FOnDeleteReportLink(Self, AReportLink); -end; - -procedure TCustomdxComponentPrinter.DoFinalizePrintDlgData(AReportLink: TBasedxReportLink; - var APrintDlgData: TdxPrintDlgData); -begin - if Assigned(FOnFinalizePrintDlgData) then - FOnFinalizePrintDlgData(Self, AReportLink, APrintDlgData); -end; - -procedure TCustomdxComponentPrinter.DoInitializePrintDlgData(AReportLink: TBasedxReportLink; - var APrintDlgData: TdxPrintDlgData); -begin - if Assigned(FOnInitializePrintDlgData) then - FOnInitializePrintDlgData(Self, AReportLink, APrintDlgData); -end; - -procedure TCustomdxComponentPrinter.DoMeasureReportTitle(AReportLink: TBasedxReportLink; - var AHeight: Integer); -begin - if Assigned(FOnMeasureReportTitle) then - FOnMeasureReportTitle(Self, AReportLink, AHeight); -end; - -procedure TCustomdxComponentPrinter.DoDesignReport(AReportLink: TBasedxReportLink; - ADone: Boolean); -begin - if Assigned(FOnDesignReport) then - FOnDesignReport(Self, AReportLink, ADone); - - if ADone then - with AReportLink do - if DesignWindow.Modified and not DesignWindow.Applyed and IsRebuildNeededAndAllowed(False) then - RebuildReport; -end; - -procedure TCustomdxComponentPrinter.DoPrintDeviceBusy; -var - Done: Boolean; -begin - Done := False; - if Assigned(FOnPrintDeviceBusy) then FOnPrintDeviceBusy(Self, Done); - if not Done then StdProcessPrintDeviceBusy; -end; - -procedure TCustomdxComponentPrinter.StdProcessPrintDeviceBusy; -begin - MessageError(cxGetResourceString(@sdxPrintDeviceIsBusy)); -end; - -procedure TCustomdxComponentPrinter.DoPrintDeviceError; -var - Done: Boolean; -begin - Done := False; - if Assigned(FOnPrintDeviceError) then FOnPrintDeviceError(Self, Done); - if not Done then StdProcessPrintDeviceError; -end; - -procedure TCustomdxComponentPrinter.StdProcessPrintDeviceError; -begin - MessageError(cxGetResourceString(@sdxPrintDeviceError)); -end; - -procedure TCustomdxComponentPrinter.DoPageParamsChanged(AReportLink: TBasedxReportLink); -begin - if cpsPreviewing in State then - begin - PreviewWindow.InitContent; - PreviewWindow.UpdateControls; - end; -end; - -procedure TCustomdxComponentPrinter.DoPageSetup(AReportLink: TBasedxReportLink; - ADone: Boolean); -begin - if Assigned(FOnPageSetup) then FOnPageSetup(Self, AReportLink, ADone); -end; - -procedure TCustomdxComponentPrinter.DoProgress(AReportLink: TBasedxReportLink; - const PercentDone: Double); - - procedure ProcessKeyboardMessages; - var - Msg: TMsg; - begin - while PeekMessage(Msg, 0, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE) do - begin - case Integer(GetMessage(Msg, 0, WM_KEYFIRST, WM_KEYLAST)) of - -1: Break; - 0: begin - PostQuitMessage(Msg.wParam); - Break; - end; - end; - DispatchMessage(Msg); - end; - end; - -begin - if IsGenerateReportProgressEvent then - if Assigned(FOnGenerateReportProgress) then FOnGenerateReportProgress(Self, AReportLink, PercentDone); - ProcessKeyboardMessages; - //Delay(20); - RaiseBuildingEvent(AReportLink, PercentDone, bsProgress); -end; - -procedure TCustomdxComponentPrinter.DoStartUpdateReport(AReportLink: TBasedxReportLink); -begin - if IsGenerateReportProgressEvent then - if Assigned(FOnStartGenerateReport) then FOnStartGenerateReport(Self, AReportLink); - RaiseBuildingEvent(AReportLink, 0, bsStart); -end; - -procedure TCustomdxComponentPrinter.DoEndUpdateReport(AReportLink: TBasedxReportLink); -begin - if IsGenerateReportProgressEvent then - if Assigned(FOnEndGenerateReport) then FOnEndGenerateReport(Self, AReportLink); - RaiseBuildingEvent(AReportLink, 0, bsEnd); -end; - -function TCustomdxComponentPrinter.GetPrintTitle(AReportLink: TBasedxReportLink): string; -begin - Result := FPrintTitle; - if Assigned(FOnGetPrintTitle) then - begin - AReportLink := CheckLink(AReportLink); - if AReportLink <> nil then FOnGetPrintTitle(Self, AReportLink, Result); - end; -end; - -function TCustomdxComponentPrinter.PreviewExists: Boolean; -begin - Result := (PreviewWindow <> nil) and (cpsPreviewing in State); -end; - -procedure TCustomdxComponentPrinter.SetupPreviewProperties(APreviewWindow: TBasedxPreviewWindow); - - function GetCaption: string; - begin - if IsExplorerMode then - Result := cxGetResourceString(@sdxReportExplorer) - else - Result := PreviewOptions.Caption; - end; - -begin - if not IsDesigning then - begin - {$IFDEF DELPHI9} - APreviewWindow.PopupMode := pmAuto; - {$ENDIF} - if not APreviewWindow.AreBoundsAssigned then - APreviewWindow.BoundsRect := PreviewOptions.Rect; - APreviewWindow.EnableOptions := PreviewOptions.EnableOptions; - APreviewWindow.HelpContext := PreviewOptions.HelpContext; - APreviewWindow.HelpFile := PreviewOptions.HelpFile; - APreviewWindow.VisibleOptions := PreviewOptions.VisibleOptions; - if not APreviewWindow.AreBoundsAssigned then - APreviewWindow.WindowState := PreviewOptions.WindowState; - end; - APreviewWindow.Caption := GetCaption; - APreviewWindow.Icon := PreviewOptions.Icon; - APreviewWindow.SaveZoomPosition := PreviewOptions.SaveZoomPosition; - APreviewWindow.ShowExplorer := PreviewOptions.ShowExplorer; -end; - -procedure TCustomdxComponentPrinter.Preview(AModal: Boolean = True; - AReportLink: TBasedxReportLink = nil); -begin - AReportLink := CheckLink(AReportLink); - if AReportLink = nil then Exit; - if not PreviewExists then - begin - if AReportLink.DataProviderPresent and (IsDesigning or IsRebuildBeforePreview) then - begin - AReportLink.PrinterPage.InitFromPrintDevice; - try - RebuildReport(AReportLink); - if AbortBuilding then Exit; - except - if Explorer <> nil then - begin - with Explorer do - begin - if LoadedItem <> nil then - DoItemDataLoadError(LoadedItem); - FLoadedItem := nil; //!!! - end; - if not (cpsExplore in State) then Exit; - end; - end; - DesignerModified; - end - else - if AutoUpdateDateTime then AReportLink.DateTime := Now; - - if Explorer <> nil then Explorer.Refresh; - InitDevModeFromPrinterPageSettings(AReportLink.PrinterPage); - FPreviewWindow := CreatePreviewWindow(AReportLink); - if IsExplorerMode and (PreviewWindow <> nil) then - PreviewWindow.ExplorerTree.MakeItemVisible(Explorer.LoadedItem); - Include(FState, cpsPreviewing); - DoBeforePreview(AReportLink); - FModalPreview := AModal; - if AModal then - try - FPreviewWindow.ShowModal; - finally - DoAfterPreview(AReportLink); - FreeAndNil(FPreviewWindow); - end - else - FPreviewWindow.Show; - end - else - ShowExistingPreviewWindow; -end; - -procedure TCustomdxComponentPrinter.PaintPage(ACanvas: TCanvas; - APageIndex: Integer; const APageBounds, AContentBounds: TRect; - AReportLink: TBasedxReportLink = nil); -var - ZoomFactor: Integer; -begin - AReportLink := CheckLink(AReportLink); - if AReportLink = nil then Exit; - - ZoomFactor := 100; - if (PreviewWindow <> nil) and IsDisplayDC(ACanvas.Handle) then - ZoomFactor := PreviewWindow.ZoomFactor; - - AReportLink.PaintPage(ACanvas, APageBounds, APageIndex, APageIndex, ZoomFactor); -end; - -procedure TCustomdxComponentPrinter.DoCustomDrawReportTitle(AReportLink: TBasedxReportLink; - ACanvas: TCanvas; ARect: TRect; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var AColor: TColor; AFont: TFont; - var ADone: Boolean; APixelsNumerator: Integer = 0); -begin - if Assigned(FOnCustomDrawReportTitle) then - begin - if APixelsNumerator = 0 then - APixelsNumerator := PixelsNumerator; - FOnCustomDrawReportTitle(Self, AReportLink, ACanvas, ARect, APixelsNumerator, - PixelsDenominator, ATextAlignX, ATextAlignY, AColor, AFont, ADone); - end; -end; - -procedure TCustomdxComponentPrinter.DoCustomDrawPageHeaderOrFooter( - AReportLink: TBasedxReportLink; AHFObject: TCustomdxPageObject; - ACanvas: TCanvas; APageIndex: Integer; R: TRect; - var ADefaultDrawText, ADefaultDrawBackground: Boolean; - APixelsNumerator: Integer = 0); -begin - if APixelsNumerator = 0 then - APixelsNumerator := PixelsNumerator; - if AHFObject is TdxPageHeader then - begin - if Assigned(FOnCustomDrawPageHeader) then - FOnCustomDrawPageHeader(Self, AReportLink, ACanvas, APageIndex, R, - APixelsNumerator, PixelsDenominator, ADefaultDrawText, ADefaultDrawBackground) - end - else - if Assigned(FOnCustomDrawPageFooter) then - FOnCustomDrawPageFooter(Self, AReportLink, ACanvas, APageIndex, R, - APixelsNumerator, PixelsDenominator, ADefaultDrawText, ADefaultDrawBackground); -end; - -procedure TCustomdxComponentPrinter.PrintPage(AReportLink: TBasedxReportLink; - APageIndex: Integer); -var - R: TRect; -begin - if AbortPrinting then Exit; - AReportLink := CheckLink(AReportLink); - if AReportLink = nil then Exit; - - with dxPrintDevice do - begin - R := MakeBounds(0, 0, PageWidth, PageHeight); - InflateRect(R, PhysOffsetX, PhysOffsetY); - end; - PaintPage(dxPrintDevice.Canvas, APageIndex, R, R, AReportLink); -end; - -procedure TCustomdxComponentPrinter.PrintPages(const APageIndexes: array of Integer; - AReportLink: TBasedxReportLink = nil); -begin - PrintPagesEx(APageIndexes, pnAll, 1, False, AReportLink); -end; - -procedure TCustomdxComponentPrinter.PrintPagesEx(const APageIndexes: array of Integer; - APageNums: TdxPageNumbers; ACopyCount: Integer; ACollate: Boolean; - AReportLink: TBasedxReportLink = nil); - - function GetTotalPageCount: Integer; - begin - Result := ACopyCount * Length(APageIndexes); - if APageNums <> pnAll then - begin - if (APageNums = pnOdd) and Odd(Result) then - Inc(Result); - Result := Result div 2; - end; - end; - - procedure GetActualPageIndexes(out AnActualPageIndexes: TIntegers); - - function AreAllPagesInRange: Boolean; - var - I: Integer; - begin - if FPrintAll then - Result := True - else - begin - Result := Length(APageIndexes) = AReportLink.PageCount; - if Result then - for I := 1 to AReportLink.PageCount do - begin - Result := APageIndexes[I - 1] = I; - if not Result then Exit; - end; - end; - end; - - var - IsRecombineNeeded: Boolean; - ColCount, RowCount, I, J, K: Integer; - begin - SetLength(AnActualPageIndexes, Length(APageIndexes)); - IsRecombineNeeded := AReportLink.RealPrinterPage.PageOrder = poDownThenOver; - if IsRecombineNeeded then - begin - AReportLink.GetPageColRowCount(ColCount, RowCount); - IsRecombineNeeded := (ColCount <> 1) and (RowCount <> 1) and AreAllPagesInRange; - end; - - if IsRecombineNeeded then - begin - K := 0; - for I := 0 to ColCount - 1 do - for J := 0 to RowCount - 1 do - begin - AnActualPageIndexes[K] := APageIndexes[I + J * ColCount]; - Inc(K); - end; - end - else - for I := 0 to Length(APageIndexes) - 1 do - AnActualPageIndexes[I] := APageIndexes[I]; - end; - - function CanPrintPage(AIndex, APageIndex: Integer): Boolean; - begin - Result := not ((APageIndex < 0) or - (APageIndex > AReportLink.PageCount - 1) or - ((APageNums = pnEven) and not Odd(AIndex)) or - ((APageNums = pnOdd) and Odd(AIndex))); - end; - - procedure DoPrintPage(var ACurrentPage: Integer; APageIndex: Integer); - begin - if ACurrentPage > 0 then - begin - DoNewPage(AReportLink, ACurrentPage); - dxPrintDevice.NewPage; - end; - if Application.Terminated then AbortPrinting := True; - if not AbortPrinting then PrintPage(AReportLink, APageIndex); - Inc(ACurrentPage); - end; - -var - CurrentPage, Index, PageIndex, CopyIndex: Integer; - ActualPageIndexes: TIntegers; -begin - AReportLink := CheckLink(AReportLink); - - if (AReportLink = nil) or not AReportLink.DataProviderPresent then Exit; - - PrepareReport(AReportLink); - try - if AbortBuilding or (AReportLink.PageCount = 0) then Exit; - - dxInitPrintDevice(True); - if dxPrintDevice.Printing then - begin - DoPrintDeviceBusy; - Exit; - end; - - if not AReportLink.ValidateMargins then Exit; - - if ACopyCount < 1 then ACopyCount := 1; - GetActualPageIndexes(ActualPageIndexes); - - AReportLink.BeforePrinting; - try - try - Include(FState, cpsPrinting); - try - PreparePrintDevice; - try - dxPrintDevice.Title := GetPrintTitle(AReportLink); - if dxPrintDevice.BeginDoc > 0 then - try - DoStartPrint(AReportLink, GetTotalPageCount); - - CurrentPage := 0; - if not ACollate and (ACopyCount > 1) then - for Index := 0 to Length(ActualPageIndexes) - 1 do - begin - PageIndex := ActualPageIndexes[Index] - 1; - if not CanPrintPage(Index, PageIndex) then Continue; - for CopyIndex := 1 to ACopyCount do - begin - DoPrintPage(CurrentPage, PageIndex); - if AbortPrinting then Break; - end; - if AbortPrinting then Break; - end - else - for CopyIndex := 1 to ACopyCount do - begin - for Index := 0 to Length(ActualPageIndexes) - 1 do - begin - PageIndex := ActualPageIndexes[Index] - 1; - if not CanPrintPage(Index, PageIndex) then Continue; - DoPrintPage(CurrentPage, PageIndex); - if AbortPrinting then Break; - end; - if AbortPrinting then Break; - end; - finally - if dxPrintDevice.Printing then - if AbortPrinting then - dxPrintDevice.Abort - else - dxPrintDevice.EndDoc; - DoEndPrint(AReportLink); - end - else - if (dxPrintDevice.CurrentPort = nil) or - (StrIComp(dxPrintDevice.CurrentPort, sdxFilePort) <> 0) then - DoPrintDeviceError; - finally - UnpreparePrintDevice; - end; - finally - Exclude(FState, cpsPrinting); - end; - except - if dxPrintDevice.Printing then - try - dxPrintDevice.Abort; - except - Application.HandleException(Self); - end; - DoPrintDeviceError; - end; - finally - AReportLink.AfterPrinting; - end; - finally - UnprepareReport(AReportLink); - end; -end; - -function TCustomdxComponentPrinter.Print(AShowDialog: Boolean; - APPrintDlgData: PdxPrintDlgData; - AReportLink: TBasedxReportLink = nil): Boolean; - - function GetPrintDlgData(AReportLink: TBasedxReportLink): TdxPrintDlgData; - begin - if APPrintDlgData <> nil then - Result := APPrintDlgData^ - else - InitializeDefaultPrintDlgData(AReportLink, Result); - end; - - procedure DonePrintDlgData(AReportLink: TBasedxReportLink; var APrintDlgData: TdxPrintDlgData); - begin - if APPrintDlgData = nil then - FinalizeDefaultPrintDlgData(AReportLink, APrintDlgData); - end; - -var - PrintDlgData: TdxPrintDlgData; -begin - Result := False; - AReportLink := CheckLink(AReportLink); - if AReportLink = nil then Exit; - InitDevModeFromPrinterPageSettings(AReportLink.PrinterPage); - try - if not AShowDialog then - begin - PrepareReport(AReportLink); - PrintDlgData := GetPrintDlgData(AReportLink); - try - if not AbortBuilding and (AReportLink.PageCount > 0) then - with PrintDlgData.DialogData do - Result := PrintPagesAsStringEx(Pages, PageNums, Copies, Collate, AReportLink) - else - Result := False; - finally - UnprepareReport(AReportLink); - end; - end - else - begin - PrintDlgData := GetPrintDlgData(AReportLink); - Result := PrintDialog(AReportLink, PrintDlgData); - end; - finally - DonePrintDlgData(AReportLink, PrintDlgData); - end; -end; - -procedure TCustomdxComponentPrinter.PrepareReport(AReportLink: TBasedxReportLink); -begin - if not AReportLink.FPrepared then - if AReportLink.DataProviderPresent then - begin - if not PreviewExists and (IsDesigning or IsRebuildBeforePrint) then - begin - RebuildReport(AReportLink); - DesignerModified; - end - else - if AutoUpdateDateTime then AReportLink.DateTime := Now; - - AReportLink.FPrepared := True; - end - else - AReportLink.FPrepared := False; -end; - -procedure TCustomdxComponentPrinter.UnprepareReport(AReportLink: TBasedxReportLink); -begin - AReportLink.FPrepared := False; -end; - -procedure TCustomdxComponentPrinter.BeforeLoadFromStream(AStream: TStream); -begin - FMemoryStream := TMemoryStream.Create; - SaveToStream(FMemoryStream); - DeleteAllLinks; -end; - -procedure TCustomdxComponentPrinter.ErrorLoadFromStream(AStream: TStream); -begin - DeleteAllLinks; - FMemoryStream.Position := 0; - LoadFromStream(FMemoryStream); - Application.HandleException(Self); -end; - -procedure TCustomdxComponentPrinter.PrepareLoadFromStream(AStream: TStream); -begin - FInternalStreaming := True; - Include(FState, cpsLoading); -end; - -procedure TCustomdxComponentPrinter.UnprepareLoadFromStream(AStream: TStream); -begin - Exclude(FState, cpsLoading); - FInternalStreaming := False; -end; - -procedure TCustomdxComponentPrinter.LoadItselfFromStream(AStream: TStream); -var - I: Integer; -begin - AStream.ReadComponent(Self); - Loaded; - for I := 0 to LinkCount - 1 do - ReportLink[I].Loaded; -end; - -procedure TCustomdxComponentPrinter.LoadLinksFromStream(AStream: TStream); -var - Count, I: Integer; - Links: TList; -begin - AStream.ReadBuffer(Count, SizeOf(Count)); - - Links := TList.Create; - try - Links.Count := Count; - - for I := 0 to Count - 1 do - begin - Links[I] := AStream.ReadComponent(nil); - Owner.InsertComponent(TComponent(Links[I])); - end; - - for I := 0 to Count - 1 do - begin - TBasedxReportLink(Links[I]).ComponentPrinter := Self; - if TObject(Links[I]) is TdxCompositionReportLink then - TdxCompositionReportLink(Links[I]).Items.CorrectLinksAfterLoadings; - end; - finally - Links.Free; - end; -end; - -procedure TCustomdxComponentPrinter.LoadVersionFromStream(AStream: TStream; var AVersion: Integer); -begin - AStream.ReadBuffer(AVersion , SizeOf(AVersion)); -end; - -procedure TCustomdxComponentPrinter.PrepareSaveToStream(AStream: TStream); -begin - FInternalStreaming := True; - Include(FState, cpsSaving); -end; - -procedure TCustomdxComponentPrinter.UnprepareSaveToStream(AStream: TStream); -begin - Exclude(FState, cpsSaving); - FInternalStreaming := False; -end; - -procedure TCustomdxComponentPrinter.SaveItselfToStream(AStream: TStream); -begin - AStream.WriteComponent(Self); -end; - -procedure TCustomdxComponentPrinter.SaveLinksToStream(AStream: TStream); -var - I: Integer; -begin - I := LinkCount; - AStream.WriteBuffer(I , SizeOf(I)); - for I := 0 to LinkCount - 1 do - begin - ReportLink[I].InternalStreaming := True; - AStream.WriteComponent(ReportLink[I]); - end; -end; - -procedure TCustomdxComponentPrinter.SaveVersionToStream(AStream: TStream); -begin - AStream.WriteBuffer(Version , SizeOf(Version)); -end; - -procedure TCustomdxComponentPrinter.PrintEx(APageNums: TdxPageNumbers; - ACopies: Integer; ACollate: Boolean; AReportLink: TBasedxReportLink = nil); -begin - AReportLink := CheckLink(AReportLink); - if AReportLink <> nil then - begin - PrepareReport(AReportLink); - try - if not AbortBuilding and (AReportLink.PageCount > 0) then - begin - FPrintAll := True; - try - PrintPagesAsStringEx('1-' + Trim(IntToStr(AReportLink.PageCount)), APageNums, ACopies, ACollate, AReportLink); - finally - FPrintAll := False; - end; - end; - finally - UnprepareReport(AReportLink); - end; - end; -end; - -procedure TCustomdxComponentPrinter.PreparePrintDevice; -begin - if dxPrintDevice.Copies > 1 then - begin - FSaveCopies := dxPrintDevice.Copies; - dxPrintDevice.Copies := 1; - end; - if dxPrintDevice.Collate then - begin - FSaveCollate := dxPrintDevice.Collate; - dxPrintDevice.Collate := False; - end; - CurrentLink.RealPrinterPage.ApplyToPrintDevice; - - dxPSEdgePatternFactory.ResetPrintItems; - dxPSFillPatternFactory.ResetPrintItems; -end; - -procedure TCustomdxComponentPrinter.UnpreparePrintDevice; -begin - if FSaveCopies > 1 then - dxPrintDevice.Copies := FSaveCopies; - FSaveCopies := 1; - if FSaveCollate then - dxPrintDevice.Collate := FSaveCollate; - FSaveCollate := False; -end; - -procedure TCustomdxComponentPrinter.GetPageColRowCount(out ACol, ARow: Integer; - AReportLink: TBasedxReportLink = nil); -begin - AReportLink := CheckLink(AReportLink); - if AReportLink = nil then - begin - ACol := 0; - ARow := 0; - end - else - AReportLink.GetPageColRowCount(ACol, ARow); -end; - -function TCustomdxComponentPrinter.GetPageCount(AReportLink: TBasedxReportLink = nil): Integer; -begin - AReportLink := CheckLink(AReportLink); - if AReportLink <> nil then - Result := AReportLink.PageCount - else - Result := 0; -end; - -function TCustomdxComponentPrinter.PageSetup(AReportLink: TBasedxReportLink): Boolean; -begin - AReportLink := CheckLink(AReportLink); - Result := (AReportLink <> nil) and AReportLink.PageSetup; -end; - -function TCustomdxComponentPrinter.PageSetupEx(AActivePageIndex: Integer; - AShowPreviewBtn, AShowPrintBtn: Boolean; out APreviewBtnClicked, APrintBtnClicked: Boolean; - AReportLink: TBasedxReportLink = nil): Boolean; -begin - AReportLink := CheckLink(AReportLink); - Result := (AReportLink <> nil) and - AReportLink.PageSetupEx(AActivePageIndex, AShowPreviewBtn, AShowPrintBtn, APreviewBtnClicked, APrintBtnClicked); -end; - -function TCustomdxComponentPrinter.PageSetupEx(AActivePageIndex: Integer; - APreviewBtnClicked, APrintBtnClicked: PBoolean; - AReportLink: TBasedxReportLink = nil): Boolean; -var - ShowPreviewBtn, ShowPrintBtn, PreviewBtnClicked, PrintBtnClicked: Boolean; -begin - AReportLink := CheckLink(AReportLink); - if AReportLink <> nil then - begin - ShowPreviewBtn := APreviewBtnClicked <> nil; - ShowPrintBtn := APrintBtnClicked <> nil; - Result := AReportLink.PageSetupEx(AActivePageIndex, ShowPreviewBtn, ShowPrintBtn, PreviewBtnClicked, PrintBtnClicked); - - if ShowPreviewBtn then - APreviewBtnClicked^ := PreviewBtnClicked; - - if ShowPrintBtn then - APrintBtnClicked^ := PrintBtnClicked; - end - else - Result := False; -end; - -procedure TCustomdxComponentPrinter.Explore; -var - PrevCurrentLink: TBasedxReportLink; -begin - if Explorer <> nil then - begin - Include(FState, cpsExplore); - try - PrevCurrentLink := CurrentLink; - CurrentLink := ExplorerRealStubLink; - try - CurrentLink.DataSource := rldsExternalStorage; - Preview(True); - finally - if ExplorerStubLink = nil then { Link had been created manually before } - CurrentLink.Free; - CurrentLink := PrevCurrentLink; - end; - finally - Exclude(FState, cpsExplore); - end; - end; -end; - -function TCustomdxComponentPrinter.DesignerExists(AReportLink: TBasedxReportLink = nil): Boolean; -begin - AReportLink := CheckLink(AReportLink); - Result := (AReportLink <> nil) and (AReportLink.GetDesignerClass <> nil); -end; - -function TCustomdxComponentPrinter.DesignerExistsByComponent(AComponent: TComponent): Boolean; -begin - Result := (AComponent <> nil) and (dxPSDesignerClassByCompClass(TComponentClass(AComponent.ClassType)) <> nil); -end; - -function TCustomdxComponentPrinter.DesignReport(AReportLink: TBasedxReportLink): Boolean; -begin - AReportLink := CheckLink(AReportLink); - if AReportLink <> nil then - begin - Include(FState, cpsDesigning); - try - Result := AReportLink.DesignReport; - finally - Exclude(FState, cpsDesigning); - end; - end - else - Result := False; -end; - -procedure TCustomdxComponentPrinter.DrawPageHeader(AReportLink: TBasedxReportLink; - APageIndex: Integer; ARect: TRect; - ATitleParts: TdxPageTitleParts; ADrawBackground: Boolean); -begin - AReportLink.DrawPageHeader(APageIndex, ARect, ATitleParts, ADrawBackground); -end; - -procedure TCustomdxComponentPrinter.DrawPageFooter(AReportLink: TBasedxReportLink; - APageIndex: Integer; ARect: TRect; - ATitleParts: TdxPageTitleParts; ADrawBackground: Boolean); -begin - AReportLink.DrawPageFooter(APageIndex, ARect, ATitleParts, ADrawBackground); -end; - -{ TdxComponentPrinter } - -constructor TdxComponentPrinter.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FCustomizeDlgOptions := [cdoShowDescription]; - FOverWriteExistingFiles := False; -end; - -destructor TdxComponentPrinter.Destroy; -begin - if not IsDesigning and (dxPSEngine.RealRegistryPath <> '') then - SaveToRegistry(dxPSEngine.RealRegistryPath); - inherited Destroy; -end; - -procedure TdxComponentPrinter.ShowCustomizeDlg; -{$IFNDEF CBUILDER6} -var - Data: TdxCPDesignerDlgData; -{$ENDIF} -begin -{$IFNDEF CBUILDER6} - FillChar(Data, SizeOf(TdxCPDesignerDlgData), 0); - Data.ComponentPrinter := Self; - if cdoShowDescription in CustomizeDlgOptions then - Include(Data.Options, doShowDescription); - Include(FState, cpsCustomizing); - try - dxShowCPDesignerDlg(Data); - finally - Exclude(FState, cpsCustomizing); - end; -{$ENDIF} -end; - -procedure TdxComponentPrinter.Loaded; -begin - inherited Loaded; - if (LinkCount > 0) and (CurrentLink = nil) then - CurrentLink := ReportLink[0]; - if not IsDesigning then - LoadFromRegistry(dxPSEngine.RealRegistryPath); -end; - -procedure TdxComponentPrinter.SaveToRegistry(const APath: string); - - procedure SaveFormats(const APath: string); - begin - with TRegistry.Create do - try - if OpenKey(APath, True) then - try - try - WriteBool(sdxAutoUpdateDateTime, AutoUpdateDateTime); - WriteInteger(sdxDateFormat, DateFormat); - WriteInteger(sdxTimeFormat, TimeFormat); - WriteInteger(sdxPageNumberFormat, Integer(PageNumberFormat)); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - CloseKey; - end; - finally - Free; - end; - end; - -begin - if APath = '' then Exit; - SaveFormats(APath); - dxSaveStringsToRegistry(APath + sdxPrintDlgFilesRegistryPath + '\' + Name, FPrintFileList); -end; - -procedure TdxComponentPrinter.LoadFromRegistry(const APath: string); - - procedure LoadFormats(const APath: string); - begin - with TRegistry.Create do - try - if OpenKey(APath, False) then - try - try - if ValueExists(sdxAutoUpdateDateTime) then - AutoUpdateDateTime := ReadBool(sdxAutoUpdateDateTime); - if ValueExists(sdxDateFormat) then - DateFormat := ReadInteger(sdxDateFormat); - if ValueExists(sdxTimeFormat) then - TimeFormat := ReadInteger(sdxTimeFormat); - if ValueExists(sdxPageNumberFormat) then - PageNumberFormat := TdxPageNumberFormat(ReadInteger(sdxPageNumberFormat)); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - CloseKey; - end; - finally - Free; - end; - end; - -begin - if APath = '' then Exit; - LoadFormats(APath); - dxLoadStringsFromRegistry(APath + sdxPrintDlgFilesRegistryPath + '\' + Name, FPrintFileList); -end; - -function TdxComponentPrinter.DoFilterComponent(AComponent: TComponent; - var ACaption, ADescription: string): Boolean; -begin - Result := True; - if Assigned(FOnFilterComponent) then - FOnFilterComponent(Self, AComponent, ACaption, ADescription, Result); -end; - -procedure TdxComponentPrinter.GetDefaultExportPageFileName(AIndex, - APageIndex: Integer; var AFileName: string); -begin - AFileName := Format(AFileName, [APageIndex]); -end; - -procedure TdxComponentPrinter.GetExportPageFileName(AIndex, APageIndex: Integer; - var AFileName: string); -begin - if Assigned(FOnExportGetPageFileName) then - FOnExportGetPageFileName(Self, AIndex, APageIndex, AFileName) - else - GetDefaultExportPageFileName(AIndex, APageIndex, AFileName); -end; - -function TdxComponentPrinter.GetSupportedComponents(AComponents: TStrings): Boolean; -begin - Result := Assigned(FOnGetSupportedComponents); - if Result then - FOnGetSupportedComponents(Self, AComponents); -end; - -procedure TdxComponentPrinter.EnumPagesAsImages(const APageIndexes: array of Integer; - AGraphicClass: TGraphicClass; ADrawBackground: Boolean; ACallBackProc: TdxEnumPagesAsImagesProc; - ACallBackData, AProgressData, APrepareData: Pointer; - AReportLink: TBasedxReportLink = nil); -begin - AReportLink := CheckLink(AReportLink); - if AReportLink = nil then Exit; - dxPSEnumReportPages(Self, AReportLink, APageIndexes, AGraphicClass, ADrawBackground, - ACallBackProc, ACallBackData, OnExportProgress, AProgressData, - OnExportPrepareGraphic, APrepareData); -end; - -procedure TdxComponentPrinter.WritePageAsImageToDisk(AComponentPrinter: TCustomdxComponentPrinter; - AReportLink: TBasedxReportLink; AIndex, APageIndex: Integer; const AGraphic: TGraphic; - AData: Pointer; var AContinue: Boolean); -const - Buttons: TMsgDlgButtons = [mbYes, mbYesToAll, mbNo, mbCancel {, mbHelp}]; -var - FileName: string; - MessageResult: Word; - MessageText: string; -begin - if AData = nil then Exit; - FileName := string(AData); - GetExportPageFileName(AIndex, APageIndex, FileName); - if not ValidateFileName(FileName) then Exit; - - FOverWriteFile := True; - if FileExists(FileName) and not OverWriteExistingFiles and not FOverWriteAll then - begin - FOverWriteFile := False; - Beep; - MessageText := Format(cxGetResourceString(@sdxConfirmOverWrite), [FileName]); - MessageResult := MessageDlg(MessageText, mtWarning, Buttons, 0); - case MessageResult of - mrYes: - FOverWriteFile := True; - mrYesToAll: - begin - FOverWriteFile := True; - FOverWriteAll := True; - end; - mrNo: - begin - AContinue := dxShowChooseFileNameDlg(FileName); - if AContinue then FOverWriteFile := True; - end; - mrCancel: - AContinue := False; - end; - end; - if FOverWriteFile then - begin - if AGraphic is TBitmap then - TBitmap(AGraphic).HandleType := bmDIB; - AGraphic.SaveToFile(FileName); - end; -end; - -procedure TdxComponentPrinter.SavePagesAsImagesToDisk(const APageIndexes: array of Integer; - AGraphicClass: TGraphicClass; ADrawBackground: Boolean; const AFileMask: string; - AProgressData, APrepareData: Pointer; - AReportLink: TBasedxReportLink = nil); -var - PFileMask: PChar; -begin - FOverWriteAll := False; - PrepareLongOperation; - try - PFileMask := PChar(AFileMask); - EnumPagesAsImages(APageIndexes, AGraphicClass, ADrawBackground, - WritePageAsImageToDisk, PFileMask, AProgressData, APrepareData, - AReportLink); - finally - FOverWriteAll := False; - UnprepareLongOperation; - end; -end; - -{ TAbstractdxPreviewWindowDesigner } - -constructor TAbstractdxPreviewWindowDesigner.Create(AComponentPrinter: TCustomdxComponentPrinter); -begin - inherited Create; - FComponentPrinter := AComponentPrinter; - if FComponentPrinter <> nil then - FComponentPrinter.FPreviewWindowDesigner := Self; -end; - -destructor TAbstractdxPreviewWindowDesigner.Destroy; -begin - if FComponentPrinter <> nil then - FComponentPrinter.FPreviewWindowDesigner := nil; - inherited Destroy; -end; - -{ TAbstractdxReportLinkDesigner } - -constructor TAbstractdxReportLinkDesigner.Create(AComponentPrinter: TCustomdxComponentPrinter); -begin - inherited Create; - FComponentPrinter := AComponentPrinter; - if FComponentPrinter <> nil then - FComponentPrinter.FReportLinkDesigner := Self; -end; - -destructor TAbstractdxReportLinkDesigner.Destroy; -begin - if FComponentPrinter <> nil then - FComponentPrinter.FReportLinkDesigner := nil; - inherited Destroy; -end; - -{ export } - -procedure dxPSEnumReportPages(AComponentPrinter: TdxComponentPrinter; - AReportLink: TBasedxReportLink; const APageIndexes: array of Integer; - AGraphicClass: TGraphicClass; AnExportBackground: Boolean; - ACallBackProc: TdxEnumPagesAsImagesProc; - ACallBackData: Pointer; - AProgressProc: TdxExportProgressEvent; - AProgressData: Pointer; - APrepareGraphicProc: TdxExportPrepareGraphicEvent; - APrepareData: Pointer); - - procedure GetPPI(out APPI: TPoint); - var - DC: HDC; - begin - DC := GetDC(0); - try - APPI.X := GetDeviceCaps(DC, LOGPIXELSX); - APPI.Y := GetDeviceCaps(DC, LOGPIXELSY); - finally - ReleaseDC(0, DC); - end; - end; - - function AreAllPagesEnumerated: Boolean; - begin - Result := (Low(APageIndexes) = High(APageIndexes)) and (APageIndexes[0] = -1); - end; - - procedure GetPageBounds(out R: TRect); - begin - with AReportLink.RealPrinterPage.PageSizePixels do - R := MakeRect(0, 0, X, Y); - end; - - procedure PreparePageIndexes(out AnActualPageIndexes: TIntegers); - var - I: Integer; - begin - if AreAllPagesEnumerated then - begin - SetLength(AnActualPageIndexes, AReportLink.PageCount); - for I := 0 to AReportLink.PageCount - 1 do - AnActualPageIndexes[I] := I; - end - else - begin - SetLength(AnActualPageIndexes, Length(APageIndexes)); - for I := 0 to Length(APageIndexes) - 1 do - AnActualPageIndexes[I] := APageIndexes[I]; - end; - end; - - function CreatePageAsMetafile(const ABounds: TRect; const APPI: TPoint; APageIndex: Integer): TMetafile; - var - MetaCanvas: TCanvas; - APrevUnitsPerInch: Integer; - begin - Result := TMetafile.Create; - try - APrevUnitsPerInch := FUnitsPerInch; - with ABounds do - begin - Result.Width := Right - Left; - Result.Height := Bottom - Top; - end; - - MetaCanvas := TMetafileCanvas.Create(Result, 0); - try - if not FUseIsotropicMode then - begin - FUnitsPerInch := 96; - AReportLink.RebuildReport; - end; - if AGraphicClass.InheritsFrom(TMetafile) and Assigned(APrepareGraphicProc) then - APrepareGraphicProc(AComponentPrinter, AReportLink, Result, APrepareData); - - if not AnExportBackground or AReportLink.RealPrinterPage.Background.IsEmpty then - begin - MetaCanvas.Brush.Color := clWhite; - MetaCanvas.FillRect(ABounds); - end - else - AReportLink.RealPrinterPage.Background.Paint(MetaCanvas, ABounds); - - if (-1 < APageIndex) and (APageIndex < AReportLink.PageCount) then - AComponentPrinter.PaintPage(MetaCanvas, APageIndex, ABounds, ABounds, AReportLink); - finally - if not FUseIsotropicMode then - begin - FUnitsPerInch := APrevUnitsPerInch; - AReportLink.RebuildReport; - end; - MetaCanvas.Free; - end; - except - Result.Free; - raise; - end; - end; - - function CreatePageAsGraphic(const ABounds: TRect; const APPI: TPoint; APageIndex: Integer): TGraphic; - var - Metafile: TMetafile; - Bitmap: TBitmap; - begin - Metafile := CreatePageAsMetafile(ABounds, APPI, APageIndex); - try - if not AGraphicClass.InheritsFrom(TMetafile) then - begin - Bitmap := TBitmap.Create; - try - Bitmap.Height := Metafile.Height; - Bitmap.Width := Metafile.Width; - if AGraphicClass.InheritsFrom(TBitmap) and Assigned(APrepareGraphicProc) then - APrepareGraphicProc(AComponentPrinter, AReportLink, Bitmap, APrepareData); - Bitmap.Canvas.Draw(0, 0, Metafile); - - if not AGraphicClass.InheritsFrom(TBitmap) then - begin - Result := dxPSUtl.CreateGraphic(AGraphicClass); - try - if Assigned(APrepareGraphicProc) then - APrepareGraphicProc(AComponentPrinter, AReportLink, Result, APrepareData); - Result.Assign(Bitmap); - except - Result.Free; - raise; - end; - end - else - Result := Bitmap; - finally - if not AGraphicClass.InheritsFrom(TBitmap) then Bitmap.Free; - end; - end - else - Result := Metafile; - finally - if not AGraphicClass.InheritsFrom(TMetafile) then Metafile.Free; - end; - end; - -var - PPI: TPoint; - PageCount, I, PageIndex: Integer; - ActualPageIndexes: TIntegers; - ContinueExport: Boolean; - R: TRect; - Graphic: TGraphic; -begin - if (AComponentPrinter = nil) or (AReportLink = nil) or not Assigned(ACallBackProc) then - Exit; - - if AGraphicClass = nil then AGraphicClass := TMetafile; - - GetPPI(PPI); - PreparePageIndexes(ActualPageIndexes); - try - GetPageBounds(R); - ContinueExport := True; - PageCount := Length(ActualPageIndexes); - for I := 0 to PageCount - 1 do - begin - PageIndex := ActualPageIndexes[I]; - Graphic := CreatePageAsGraphic(R, PPI, PageIndex); - try - ACallBackProc(AComponentPrinter, AReportLink, I, PageIndex, Graphic, ACallBackData, ContinueExport); - finally - Graphic.Free; - end; - if not ContinueExport then Break; - if Assigned(AProgressProc) then - AProgressProc(AComponentPrinter, AReportLink, PageCount, I, PageIndex, AProgressData); - end; - finally - SetLength(ActualPageIndexes, 0); - end; -end; - -procedure InitializeUnits; -begin - if IsWin9X then FUnitsPerInch := 960; - FPixelsNumerator := FUnitsPerInch; - FPixelsDenominator := Screen.PixelsPerInch; -end; - -procedure RegisterAssistants; -begin - TdxPSExplorerTreeBuilder.Register; - TdxPSRunTimeComponentsProvider.Register; - - TdxPSDataReader.Register; - TdxPSDataWriter.Register; - - TdxPSCustomCellBorder.Register; - TdxPSCellNullBorder.Register; - TdxPSCellFlatBorder.Register; - TdxPSCellBoldFlatBorder.Register; - TdxPSCellUltraFlatBorder.Register; - TdxPSCustomCell3DBorder.Register; - TdxPSCellRaisedBorder.Register; - TdxPSCellRaisedSoftBorder.Register; - TdxPSCellSunkenBorder.Register; - TdxPSCellSunkenSoftBorder.Register; - TdxPSCellTwistedBorder.Register; - TdxPSCellEtchedBorder.Register; - TdxPSCellBumpedBorder.Register; - TdxPSColorBorder.Register; - - TdxPSReportGroupNullLookAndFeel.Register; - TdxPSReportGroupStandardLookAndFeel.Register; - TdxPSReportGroupOfficeLookAndFeel.Register; - TdxPSReportGroupWebLookAndFeel.Register; -end; - -procedure RegisterGraphicClasses; -const - GraphicClassCount = 3 {$IFDEF USEJPEGIMAGE} + 1 {$ENDIF}; - GraphicClasses: array[0..GraphicClassCount - 1] of TGraphicClass = - (TBitmap, TMetafile, TIcon{$IFDEF USEJPEGIMAGE}, TJPEGImage{$ENDIF}); -var - I: Integer; - GraphicClass: TGraphicClass; -begin - for I := Low(GraphicClasses) to High(GraphicClasses) do - begin - GraphicClass := GraphicClasses[I]; - if GetClass(GraphicClass.ClassName) = nil then - RegisterClass(GraphicClass); - end; -end; - -procedure RegisterItems; -begin - TdxReportCell.Register; - TdxReportGroup.Register; - TdxReportRadioGroup.Register; - TdxReportCheckGroup.Register; - - TdxReportCellBox.Register; - TdxReportCellString.Register; - TdxReportCellCheck.Register; - TdxReportCellRadio.Register; - TdxReportCellCheckImage.Register; - TdxReportCellRadioGroupButton.Register; - TdxReportCellGroupButton.Register; - TdxReportCellCheckGroupButton.Register; - TdxReportCellImage.Register; - TdxReportCellGraphic.Register; - TdxReportCellExpandButton.Register; - TdxReportCellExpandButtonEx.Register; -end; - -procedure UnregisterAssistants; -begin - TdxPSDataWriter.Unregister; - TdxPSDataReader.Unregister; - - TdxPSRunTimeComponentsProvider.Unregister; - TdxPSExplorerTreeBuilder.Unregister; -end; - -procedure UnregisterItems; -begin - TdxReportCellExpandButtonEx.Unregister; - TdxReportCellExpandButton.Unregister; - TdxReportCellGraphic.Unregister; - TdxReportCellImage.Unregister; - TdxReportCellCheckGroupButton.Unregister; - TdxReportCellGroupButton.Unregister; - TdxReportCellRadioGroupButton.Unregister; - TdxReportCellCheckImage.Unregister; - TdxReportCellRadio.Unregister; - TdxReportCellCheck.Unregister; - TdxReportCellString.Unregister; - TdxReportCellBox.Unregister; - - TdxReportCheckGroup.Unregister; - TdxReportRadioGroup.Unregister; - TdxReportGroup.Unregister; - TdxReportCell.Unregister; -end; - -initialization - OleInitialize(nil); - - dxPgsDlg.dxPSRegisterPrintStyle(TdxPSPrintStyle, True); - dxPSRegisterReportLink(TdxCompositionReportLink, nil, TdxfmCompositionDesignWindow); - - InitializeUnits; - - RegisterAssistants; - RegisterGraphicClasses; - RegisterItems; - -finalization - UnregisterItems; - UnregisterAssistants; - - dxPSUnregisterAllReportLinks; - dxPgsDlg.dxPSUnregisterPrintStyle(TdxPSPrintStyle); - dxPSUnregisterAllPreviewWindows; - - FreeAndNil(FExplorerImages); - - OleUninitialize; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSDBBasedXplorer.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSDBBasedXplorer.pas deleted file mode 100644 index 6f74edf8..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSDBBasedXplorer.pas +++ /dev/null @@ -1,1109 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSDBBasedXplorer; - -interface - -{$I cxVer.inc} - -uses - {$IFDEF DELPHI6} - Variants, - {$ENDIF} - SysUtils, Classes, DB, cxClasses, dxPSGlbl, dxPSCore, dxCore; - -const - fnmBase = 0; - fnmID = fnmBase + 0; - fnmName = fnmBase + 1; - fnmParentID = fnmBase + 2; - fnmData = fnmBase + 3; - -type - TdxDBBasedExplorerItemType = (eitFolder, eitItem); - - PdxDBBasedExplorerItemUniqueID = ^TdxDBBasedExplorerItemUniqueID; - TdxDBBasedExplorerItemUniqueID = record - ID: Integer; - ItemType: TdxDBBasedExplorerItemType; - end; - - TdxPSDBBasedExplorerItem = class; - TdxPSDBBasedExplorer = class; - - TdxPSDBBasedExplorerFolder = class(TdxPSExplorerFolder) - private - FID: Integer; - FParentID: Integer; - function GetFolder(Index: Integer): TdxPSDBBasedExplorerFolder; - function GetItem(Index: Integer): TdxPSDBBasedExplorerItem; - procedure SetParentID(Value: Integer); - protected - procedure InternalMove(AParent: TdxPSExplorerFolder); override; - public - constructor Create(AnExplorer: TCustomdxPSExplorer; AParent: TdxPSExplorerFolder); override; - - function CanMoveTo(AParentID: Integer): Boolean; overload; virtual; - function Explorer: TdxPSDBBasedExplorer; reintroduce; overload; - function GetUniqueID(out AnUniqueID: TBytes): Integer; override; - - property Folders[Index: Integer]: TdxPSDBBasedExplorerFolder read GetFolder; default; - property ID: Integer read FID; - property Items[Index: Integer]: TdxPSDBBasedExplorerItem read GetItem; - property ParentID: Integer read FParentID write SetParentID; - end; - - TdxPSDBBasedExplorerItem = class(TdxPSExplorerItem) - private - FID: Integer; - FParentID: Integer; - procedure SetParentID(Value: Integer); - protected - procedure InternalMove(AParent: TdxPSExplorerFolder); override; - procedure SaveDocument; override; - procedure SaveItem; virtual; - public - constructor Create(AnExplorer: TCustomdxPSExplorer; AParent: TdxPSExplorerFolder); override; - - function CanMoveTo(AParentID: Integer): Boolean; overload; virtual; - function DataLoadErrorText: string; override; - function Explorer: TdxPSDBBasedExplorer; reintroduce; overload; - function GetUniqueID(out AnUniqueID: TBytes): Integer; override; - - property ID: Integer read FID; - property ParentID: Integer read FParentID write SetParentID; - end; - - TCustomdxPSDBBasedExplorerFieldNamesMap = class(TPersistent) - private - FExplorer: TdxPSDBBasedExplorer; - FItems: TStringList; - function GetCount: Integer; - protected - function GetItem(Index: Integer): string; - procedure SetItem(Index: Integer; const Value: string); - - procedure Changed; dynamic; - function GetMapCount: Integer; virtual; - procedure InitializeItems; virtual; - - property Count: Integer read GetCount; - property Items[Index: Integer]: string read GetItem write SetItem; default; - property MapCount: Integer read GetMapCount; - public - constructor Create(AnExplorer: TdxPSDBBasedExplorer); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - property Explorer: TdxPSDBBasedExplorer read FExplorer; - end; - - TdxPSDBBasedExplorerFieldNamesMapClass = class of TCustomdxPSDBBasedExplorerFieldNamesMap; - - TdxPSDBBasedExplorerFieldNamesMap = class(TCustomdxPSDBBasedExplorerFieldNamesMap) - protected - function GetMapCount: Integer; override; - published - property ID: string Index fnmID read GetItem write SetItem; - property Name: string Index fnmName read GetItem write SetItem; - property ParentID: string Index fnmParentID read GetItem write SetItem; - end; - - TdxPSDBBasedExplorerFoldersFieldNamesMapClass = class of TdxPSDBBasedExplorerFoldersFieldNamesMap; - - TdxPSDBBasedExplorerFoldersFieldNamesMap = class(TdxPSDBBasedExplorerFieldNamesMap); - - TdxPSDBBasedExplorerItemsFieldNamesMapClass = class of TdxPSDBBasedExplorerItemsFieldNamesMap; - - TdxPSDBBasedExplorerItemsFieldNamesMap = class(TdxPSDBBasedExplorerFieldNamesMap) - protected - function GetMapCount: Integer; override; - published - property Data: string Index fnmData read GetItem write SetItem; - end; - - TdxPSDBBasedExplorerLoadErrorEvent = procedure(Sender: TdxPSDBBasedExplorer; ADataSet: TDataSet) of object; - - TdxPSDBBasedExplorer = class(TCustomdxPSExplorer) - private - FFolderList: TList; - FFolders: TDataSet; - FFoldersFieldNamesMap: TdxPSDBBasedExplorerFoldersFieldNamesMap; - FItemList: TList; - FItems: TDataSet; - FItemsFieldNamesMap: TdxPSDBBasedExplorerItemsFieldNamesMap; - FOnLoadError: TdxPSDBBasedExplorerLoadErrorEvent; - function GetRoot: TdxPSDBBasedExplorerFolder; - procedure SetFolders(Value: TDataSet); - procedure SetFoldersFieldNamesMap(Value: TdxPSDBBasedExplorerFoldersFieldNamesMap); - procedure SetItems(Value: TDataSet); - procedure SetItemsFieldNamesMap(Value: TdxPSDBBasedExplorerItemsFieldNamesMap); - protected - function CreateItemDataStream(AnItem: TdxPSExplorerItem; AMode: TdxPSStreamMode): TStream; override; - class function GetFolderClass: TdxPSExplorerFolderClass; override; - class function GetItemClass: TdxPSExplorerItemClass; override; - class function GetRootFolderClass: TdxPSExplorerFolderClass; override; - procedure DoLoadData(AFolder: TdxPSExplorerFolder); override; - function CanDelete(AnItem: TCustomdxPSExplorerItem): Boolean; override; - function CanMoveTo(AnItem, AParent: TCustomdxPSExplorerItem): Boolean; override; - function CanRenameTo(AnItem: TCustomdxPSExplorerItem; const AName: string): Boolean; override; - procedure Delete(AnItem: TCustomdxPSExplorerItem); override; - procedure MoveTo(AnItem: TCustomdxPSExplorerItem; AParent: TdxPSExplorerFolder); override; - procedure RenameTo(AnItem: TCustomdxPSExplorerItem; AName: string); override; - - procedure DoRefresh; override; - - class function GetFoldersFieldNamesMapClass: TdxPSDBBasedExplorerFoldersFieldNamesMapClass; virtual; - class function GetItemsFieldNamesMapClass: TdxPSDBBasedExplorerItemsFieldNamesMapClass; virtual; - - function AreIDsEqual(AnID1, AnID2: Integer): Boolean; - procedure Changed; dynamic; - function CheckDataSets: Boolean; virtual; - function CheckItemDataSet(AnItem: TCustomdxPSExplorerItem): Boolean; overload; virtual; - function CheckItemDataSet(AnItemClass: TCustomdxPSExplorerItemClass): Boolean; overload; virtual; - function CreateDataStream(AMode: TBlobStreamMode): TStream; virtual; - function GetItemDataSet(AnItem: TCustomdxPSExplorerItem): TDataSet; overload; virtual; - function GetItemDataSet(AnItemClass: TCustomdxPSExplorerItemClass): TDataSet; overload; virtual; - function GetItemFieldNamesMap(AnItem: TCustomdxPSExplorerItem): TdxPSDBBasedExplorerFieldNamesMap; overload; virtual; - function GetItemFieldNamesMap(AnItemClass: TCustomdxPSExplorerItemClass): TdxPSDBBasedExplorerFieldNamesMap; overload; virtual; - function GetUniqueFolderID: Integer; virtual; - function GetUniqueItemID: Integer; virtual; - function IsFolderIDAutoIncField: Boolean; - function IsItemIDAutoIncField: Boolean; - - procedure LoadFolderFromCurrentRecord(AFolder: TdxPSDBBasedExplorerFolder); virtual; - procedure LoadItemFromCurrentRecord(AnItem: TdxPSDBBasedExplorerItem); virtual; - procedure SaveFolderToCurrentRecord(AFolder: TdxPSDBBasedExplorerFolder); virtual; - procedure SaveItemToCurrentRecord(AnItem: TdxPSDBBasedExplorerItem; AReportLink: TBasedxReportLink); virtual; - - procedure DoLoadError(ADataSet: TDataSet); dynamic; - - function GetFieldValue(ADataSet: TDataSet; const AName: string): Variant; - function IsFieldNameValid(ADataSet: TDataSet; const AName: string): Boolean; - procedure SetFieldValue(ADataSet: TDataSet; const AName: string; const Value: Variant); - - function LocateItem(AnItem: TCustomdxPSExplorerItem): Boolean; - procedure PrepareIterate(ADataSet: TDataSet; out ABookmark: TBookmark); - procedure UnprepareIterate(ADataSet: TDataSet; var ABookmark: TBookmark); - - property FolderList: TList read FFolderList; - property ItemList: TList read FItemList; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - function AreFieldNameMapsValid: Boolean; virtual; - - function CanCreateFolder: Boolean; override; - function CanCreateItem: Boolean; override; - function CreateNewFolder(AParent: TdxPSExplorerFolder): TdxPSExplorerFolder; override; - function CreateNewItem(AParent: TdxPSExplorerFolder; AReportLink: TBasedxReportLink): TdxPSExplorerItem; override; - - function FindCustomItemByUniqueID(const AnUniqueID: TBytes): TCustomdxPSExplorerItem; override; - function FindFolderByID(AnID: Integer): TdxPSDBBasedExplorerFolder; virtual; - function FindItemByID(AnID: Integer): TdxPSDBBasedExplorerItem; virtual; - - function LoadedItem: TdxPSDBBasedExplorerItem; reintroduce; overload; - - property Root: TdxPSDBBasedExplorerFolder read GetRoot; - published - property Folders: TDataSet read FFolders write SetFolders; - property FoldersFieldNamesMap: TdxPSDBBasedExplorerFoldersFieldNamesMap read FFoldersFieldNamesMap write SetFoldersFieldNamesMap; - property Items: TDataSet read FItems write SetItems; - property ItemsFieldNamesMap: TdxPSDBBasedExplorerItemsFieldNamesMap read FItemsFieldNamesMap write SetItemsFieldNamesMap; - property OnLoadError: TdxPSDBBasedExplorerLoadErrorEvent read FOnLoadError write FOnLoadError; - end; - -implementation - -uses - {$IFNDEF DELPHI5} dxPSUtl, {$ENDIF} dxPSRes; - -const - RootIDValue: Integer = 0; - -function VarToInt(const V: Variant): Integer; -begin - try - if {$IFDEF DELPHI6}Variants.{$ENDIF}VarIsNull(V) then - Result := 0 - else - Result := V; - except - Result := 0; - end; -end; - -{ TdxPSDBBasedExplorerFolder } - -constructor TdxPSDBBasedExplorerFolder.Create(AnExplorer: TCustomdxPSExplorer; - AParent: TdxPSExplorerFolder); -begin - inherited; - FID := RootIDValue; - if AParent <> nil then - FParentID := TdxPSDBBasedExplorerFolder(AParent).ID; -end; - -function TdxPSDBBasedExplorerFolder.CanMoveTo(AParentID: Integer): Boolean; -var - Parent: TdxPSDBBasedExplorerFolder; -begin - Parent := Explorer.FindFolderByID(AParentID); - Result := (Parent <> nil) and CanMoveTo(Parent); -end; - -function TdxPSDBBasedExplorerFolder.Explorer: TdxPSDBBasedExplorer; -begin - Result := inherited Explorer as TdxPSDBBasedExplorer; -end; - -function TdxPSDBBasedExplorerFolder.GetUniqueID(out AnUniqueID: TBytes): Integer; -var - UniqueID: TdxDBBasedExplorerItemUniqueID; -begin - UniqueID.ID := ID; - UniqueID.ItemType := eitFolder; - SetLength(AnUniqueID, SizeOf(UniqueID)); - Move(UniqueID, Pointer(AnUniqueID)^, SizeOf(UniqueID)); - Result := Length(AnUniqueID); -end; - -procedure TdxPSDBBasedExplorerFolder.InternalMove(AParent: TdxPSExplorerFolder); -begin - FParentID := RootIDValue; - if AParent <> nil then - FParentID := TdxPSDBBasedExplorerFolder(AParent).ID; - inherited; -end; - -function TdxPSDBBasedExplorerFolder.GetFolder(Index: Integer): TdxPSDBBasedExplorerFolder; -begin - Result := inherited Folders[Index] as TdxPSDBBasedExplorerFolder; -end; - -function TdxPSDBBasedExplorerFolder.GetItem(Index: Integer): TdxPSDBBasedExplorerItem; -begin - Result := inherited Items[Index] as TdxPSDBBasedExplorerItem; -end; - -procedure TdxPSDBBasedExplorerFolder.SetParentID(Value: Integer); -begin - if (ParentID <> Value) and CanMoveTo(Value) then - Parent := Explorer.FindFolderByID(Value); -end; - -{ TdxPSDBBasedExplorerItem } - -constructor TdxPSDBBasedExplorerItem.Create(AnExplorer: TCustomdxPSExplorer; - AParent: TdxPSExplorerFolder); -begin - inherited; - FID := RootIDValue; - FParentID := RootIDValue; - if AParent <> nil then - FParentID := TdxPSDBBasedExplorerFolder(AParent).ID; -end; - -function TdxPSDBBasedExplorerItem.CanMoveTo(AParentID: Integer): Boolean; -var - Parent: TdxPSDBBasedExplorerFolder; -begin - Parent := Explorer.FindFolderByID(AParentID); - Result := (Parent <> nil) and CanMoveTo(Parent); -end; - -function TdxPSDBBasedExplorerItem.DataLoadErrorText: string; -begin - Result := cxGetResourceString(@sdxDBBasedExplorerItemDataLoadError); -end; - -function TdxPSDBBasedExplorerItem.Explorer: TdxPSDBBasedExplorer; -begin - Result := inherited Explorer as TdxPSDBBasedExplorer; -end; - -function TdxPSDBBasedExplorerItem.GetUniqueID(out AnUniqueID: TBytes): Integer; -var - UniqueID: TdxDBBasedExplorerItemUniqueID; -begin - UniqueID.ID := ID; - UniqueID.ItemType := eitItem; - SetLength(AnUniqueID, SizeOf(UniqueID)); - Move(UniqueID, Pointer(AnUniqueID)^, SizeOf(UniqueID)); - Result := Length(AnUniqueID); -end; - -procedure TdxPSDBBasedExplorerItem.InternalMove(AParent: TdxPSExplorerFolder); -begin - FParentID := RootIDValue; - if AParent <> nil then - FParentID := TdxPSDBBasedExplorerFolder(AParent).ID; - inherited; -end; - -procedure TdxPSDBBasedExplorerItem.SaveDocument; -begin - if Explorer <> nil then SaveItem; - inherited; -end; - -procedure TdxPSDBBasedExplorerItem.SaveItem; -begin - with Explorer do - if CheckItemDataSet(Self) and LocateItem(Self) then - begin - SetFieldValue(Items, FoldersFieldNamesMap.Name, Name); - end; -end; - -procedure TdxPSDBBasedExplorerItem.SetParentID(Value: Integer); -begin - if (ParentID <> Value) and CanMoveTo(Value) then - Parent := Explorer.FindFolderByID(Value); -end; - -{ TCustomdxPSDBBasedExplorerFieldNamesMap } - -constructor TCustomdxPSDBBasedExplorerFieldNamesMap.Create(AnExplorer: TdxPSDBBasedExplorer); -begin - inherited Create; - FExplorer := AnExplorer; - FItems := TStringList.Create; - InitializeItems; -end; - -destructor TCustomdxPSDBBasedExplorerFieldNamesMap.Destroy; -begin - FreeAndNil(FItems); - inherited; -end; - -procedure TCustomdxPSDBBasedExplorerFieldNamesMap.Assign(Source: TPersistent); -begin - if Source is TCustomdxPSDBBasedExplorerFieldNamesMap then - FItems.Assign(TCustomdxPSDBBasedExplorerFieldNamesMap(Source).FItems) - else - inherited; -end; - -function TCustomdxPSDBBasedExplorerFieldNamesMap.GetItem(Index: Integer): string; -begin - Result := FItems[Index]; -end; - -procedure TCustomdxPSDBBasedExplorerFieldNamesMap.SetItem(Index: Integer; const Value: string); -begin - if FItems[Index] <> Value then - begin - FItems[Index] := Value; - Changed; - end; -end; - -procedure TCustomdxPSDBBasedExplorerFieldNamesMap.Changed; -begin - if Explorer <> nil then Explorer.Changed; -end; - -function TCustomdxPSDBBasedExplorerFieldNamesMap.GetMapCount: Integer; -begin - Result := 0; -end; - -procedure TCustomdxPSDBBasedExplorerFieldNamesMap.InitializeItems; -var - I: Integer; -begin - for I := 0 to MapCount - 1 do - FItems.Add(''); -end; - -function TCustomdxPSDBBasedExplorerFieldNamesMap.GetCount: Integer; -begin - Result := FItems.Count; -end; - -{ TdxPSDBBasedExplorerFieldNamesMap } - -function TdxPSDBBasedExplorerFieldNamesMap.GetMapCount: Integer; -begin - Result := inherited GetMapCount + 3; {6 -> if include Creator, DateTimeCreated} -end; - -{ TdxPSDBBasedExplorerItemsFieldNamesMap } - -function TdxPSDBBasedExplorerItemsFieldNamesMap.GetMapCount: Integer; -begin - Result := inherited GetMapCount + 1; -end; - -{ TdxPSDBBasedExplorer } - -constructor TdxPSDBBasedExplorer.Create(AOwner: TComponent); -begin - inherited; - FFoldersFieldNamesMap := GetFoldersFieldNamesMapClass.Create(Self); - FItemsFieldNamesMap := GetItemsFieldNamesMapClass.Create(Self); -end; - -destructor TdxPSDBBasedExplorer.Destroy; -begin - FreeAndNil(FItemsFieldNamesMap); - FreeAndNil(FFoldersFieldNamesMap); - FreeAndNil(FItemList); - FreeAndNil(FFolderList); - inherited; -end; - -function TdxPSDBBasedExplorer.AreFieldNameMapsValid: Boolean; -begin - Result := IsFieldNameValid(Items, ItemsFieldNamesMap.ID) and - IsFieldNameValid(Items, ItemsFieldNamesMap.Name) and - IsFieldNameValid(Items, ItemsFieldNamesMap.ParentID) and - IsFieldNameValid(Items, ItemsFieldNamesMap.Data) and - IsFieldNameValid(Folders, FoldersFieldNamesMap.ID) and - IsFieldNameValid(Folders, FoldersFieldNamesMap.Name) and - IsFieldNameValid(Folders, FoldersFieldNamesMap.ParentID); -end; - -function TdxPSDBBasedExplorer.CanCreateFolder: Boolean; -begin - Result := CheckDataSets; -end; - -function TdxPSDBBasedExplorer.CanCreateItem: Boolean; -begin - Result := CheckDataSets; -end; - -function TdxPSDBBasedExplorer.CreateNewFolder(AParent: TdxPSExplorerFolder): TdxPSExplorerFolder; -begin - if CanCreateFolder then - begin - BeginLoading; - try - Folders.Append; - Result := inherited CreateNewFolder(AParent); - if not IsFolderIDAutoIncField then - TdxPSDBBasedExplorerFolder(Result).FID := GetUniqueFolderID; - SaveFolderToCurrentRecord(Result as TdxPSDBBasedExplorerFolder); - Folders.Post; - if IsFolderIDAutoIncField then - TdxPSDBBasedExplorerFolder(Result).FID := GetFieldValue(Folders, FoldersFieldNamesMap.ID); - - - if FolderList <> nil then FolderList.Add(Result); - finally - EndLoading; - end; - end - else - Result := nil; -end; - -function TdxPSDBBasedExplorer.CreateNewItem(AParent: TdxPSExplorerFolder; - AReportLink: TBasedxReportLink): TdxPSExplorerItem; -begin - if CanCreateItem then - begin - BeginLoading; - try - Items.Append; - Result := inherited CreateNewItem(AParent, AReportLink); - if not IsItemIDAutoIncField then - TdxPSDBBasedExplorerItem(Result).FID := GetUniqueItemID; - SaveItemToCurrentRecord(Result as TdxPSDBBasedExplorerItem, AReportLink); - Items.Post; - if IsItemIDAutoIncField then - TdxPSDBBasedExplorerItem(Result).FID := GetFieldValue(Items, ItemsFieldNamesMap.ID); - - if ItemList <> nil then ItemList.Add(Result); - finally - EndLoading; - end; - end - else - Result := nil; -end; - -function TdxPSDBBasedExplorer.FindCustomItemByUniqueID(const AnUniqueID: TBytes): TCustomdxPSExplorerItem; -var - UniqueID: TdxDBBasedExplorerItemUniqueID; -begin - Move(Pointer(AnUniqueID)^, UniqueID, SizeOf(UniqueID)); - with UniqueID do - if ItemType = eitFolder then - Result := FindFolderByID(ID) - else - Result := FindItemByID(ID); -end; - -function TdxPSDBBasedExplorer.FindFolderByID(AnID: Integer): TdxPSDBBasedExplorerFolder; -var - I: Integer; -begin - RootNeeded; - if Root.ID <> AnID then - begin - if FolderList <> nil then - for I := 0 to FolderList.Count - 1 do - begin - Result := TdxPSDBBasedExplorerFolder(FolderList[I]); - if AreIDsEqual(Result.ID, AnID) then Exit; - end; - Result := nil; - end - else - Result := Root; -end; - -function TdxPSDBBasedExplorer.FindItemByID(AnID: Integer): TdxPSDBBasedExplorerItem; -var - I: Integer; -begin - RootNeeded; - if ItemList <> nil then - for I := 0 to ItemList.Count - 1 do - begin - Result := TdxPSDBBasedExplorerItem(ItemList[I]); - if AreIDsEqual(Result.ID, AnID) then Exit; - end; - Result := nil; -end; - -function TdxPSDBBasedExplorer.LoadedItem: TdxPSDBBasedExplorerItem; -begin - Result := inherited LoadedItem as TdxPSDBBasedExplorerItem; -end; - -function TdxPSDBBasedExplorer.CreateItemDataStream(AnItem: TdxPSExplorerItem; - AMode: TdxPSStreamMode): TStream; -const - BlobStreamModesMap: array[TdxPSStreamMode] of TBlobStreamMode = (bmRead, bmWrite, bmReadWrite); -begin - if IsFieldNameValid(Items, ItemsFieldNamesMap.Data) and LocateItem(AnItem) then - Result := CreateDataStream(BlobStreamModesMap[AMode]) - else - Result := nil; -end; - -class function TdxPSDBBasedExplorer.GetFolderClass: TdxPSExplorerFolderClass; -begin - Result := TdxPSDBBasedExplorerFolder; -end; - -class function TdxPSDBBasedExplorer.GetItemClass: TdxPSExplorerItemClass; -begin - Result := TdxPSDBBasedExplorerItem; -end; - -class function TdxPSDBBasedExplorer.GetRootFolderClass: TdxPSExplorerFolderClass; -begin - Result := TdxPSDBBasedExplorerFolder; -end; - -procedure TdxPSDBBasedExplorer.DoLoadData(AFolder: TdxPSExplorerFolder); - - procedure LoadFolders; - var - Bookmark: TBookmark; - Folder: TdxPSExplorerFolder; - begin - PrepareIterate(Folders, Bookmark); - try - Folders.First; - while not Folders.EOF do - begin - try - Folder := GetFolderClass.Create(Self, nil) as TdxPSDBBasedExplorerFolder; - LoadFolderFromCurrentRecord(Folder as TdxPSDBBasedExplorerFolder); - FolderList.Add(Folder); - except - DoLoadError(Folders); - end; - Folders.Next; - end; - finally - UnprepareIterate(Folders, Bookmark); - end; - end; - - function DoFilterLinkClass: Boolean; - var - Stream: TStream; - begin - Result := True; - if FilterLinkClass <> nil then - begin - Stream := CreateDataStream(bmRead); - try - Result := FilterLinkClass = TBasedxReportLink.ExtractComponentClass(Stream, False); - finally - Stream.Free; - end; - end; - end; - - procedure LoadItems; - - procedure LoadItemReportDocument(AnItem: TdxPSDBBasedExplorerItem); - var - Stream: TStream; - ReportDocument: TdxPSReportDocument; - begin - Stream := CreateDataStream(bmRead); - try - ReportDocument := TBasedxReportLink.ExtractReportDocument(Stream, True); - try - AnItem.ReportDocument.Assign(ReportDocument); - finally - ReportDocument.Free; - end; - finally - Stream.Free; - end; - end; - - var - Bookmark: TBookmark; - Item: TdxPSDBBasedExplorerItem; - begin - PrepareIterate(Items, Bookmark); - try - Items.First; - while not Items.EOF do - begin - try - if DoFilterLinkClass then - begin - Item := GetItemClass.Create(Self, nil) as TdxPSDBBasedExplorerItem; - LoadItemFromCurrentRecord(Item); - LoadItemReportDocument(Item); - ItemList.Add(Item) - end; - except - DoLoadError(Items); - end; - Items.Next; - end; - finally - UnprepareIterate(Items, Bookmark); - end; - end; - - procedure BuildTree; - - procedure BuildFolders; - var - I: Integer; - Folder, Parent: TdxPSDBBasedExplorerFolder; - begin - for I := 0 to FolderList.Count - 1 do - begin - Folder := TdxPSDBBasedExplorerFolder(FolderList[I]); - if not AreIDsEqual(Folder.ParentID, TdxPSDBBasedExplorerFolder(Root).ID) then - begin - Parent := FindFolderByID(Folder.ParentID); - if Parent <> nil then - if not Parent.HasAsParent(Folder) then - Folder.Parent := Parent - else - raise EdxPSExplorer.CreateFmt(cxGetResourceString(@sdxCyclicIDReferences), [Folder.Name, Parent.Name]); - end - else - Folder.Parent := Root; - end; - end; - - procedure BuildItems; - var - I: Integer; - Parent: TdxPSDBBasedExplorerFolder; - Item: TdxPSDBBasedExplorerItem; - begin - for I := 0 to ItemList.Count - 1 do - begin - Item := TdxPSDBBasedExplorerItem(ItemList[I]); - if not AreIDsEqual(Item.ParentID, TdxPSDBBasedExplorerFolder(Root).ID) then - begin - Parent := FindFolderByID(Item.ParentID); - if Parent <> nil then - if not Parent.HasAsParent(Item) then - Item.Parent := Parent - else - raise EdxPSExplorer.CreateFmt(cxGetResourceString(@sdxCyclicIDReferences), [Item.Name, Parent.Name]); - end - else - Item.Parent := Root; - end; - end; - - begin - BuildFolders; - BuildItems; - end; - -begin - if CheckDataSets and AreFieldNameMapsValid then - begin - FFolderList := TList.Create; - FItemList := TList.Create; - - LoadFolders; - LoadItems; - BuildTree; - end; -end; - -function TdxPSDBBasedExplorer.CanDelete(AnItem: TCustomdxPSExplorerItem): Boolean; -begin - Result := inherited CanDelete(AnItem) and CheckItemDataSet(AnItem); -end; - -function TdxPSDBBasedExplorer.CanMoveTo(AnItem, AParent: TCustomdxPSExplorerItem): Boolean; -begin - Result := inherited CanMoveTo(AnItem, AParent) and ((esLoading in State) or CheckItemDataSet(AnItem)); -end; - -function TdxPSDBBasedExplorer.CanRenameTo(AnItem: TCustomdxPSExplorerItem; - const AName: string): Boolean; -begin - Result := inherited CanRenameTo(AnItem, AName) and ((esLoading in State) or CheckItemDataSet(AnItem)); -end; - -procedure TdxPSDBBasedExplorer.Delete(AnItem: TCustomdxPSExplorerItem); -begin - if not (esLoading in State) and CanDelete(AnItem) and LocateItem(AnItem) then - if AnItem is TdxPSExplorerFolder then - begin - FolderList.Remove(AnItem); - Folders.Delete; - end - else - begin - ItemList.Remove(AnItem); - Items.Delete; - end; - - inherited; -end; - -procedure TdxPSDBBasedExplorer.MoveTo(AnItem: TCustomdxPSExplorerItem; - AParent: TdxPSExplorerFolder); -var - ParentID: Integer; -begin - if not (esLoading in State) and CanMoveTo(AnItem, AParent) and LocateItem(AnItem) then - with GetItemDataSet(AnItem) do - begin - Edit; - ParentID := RootIDValue; - if AParent <> nil then - ParentID := TdxPSDBBasedExplorerFolder(AParent).ID; - FieldValues[GetItemFieldNamesMap(AnItem).ParentID] := ParentID; - Post; - end; - inherited; -end; - -procedure TdxPSDBBasedExplorer.RenameTo(AnItem: TCustomdxPSExplorerItem; AName: string); -begin - if not (esLoading in State) and LocateItem(AnItem) then - with GetItemDataSet(AnItem) do - begin - Edit; - FieldValues[GetItemFieldNamesMap(AnItem).Name] := AName; - Post; - end; - inherited; -end; - -procedure TdxPSDBBasedExplorer.DoRefresh; -begin - inherited; - FreeAndNil(FFolderList); - FreeAndNil(FItemList); -end; - -class function TdxPSDBBasedExplorer.GetFoldersFieldNamesMapClass: TdxPSDBBasedExplorerFoldersFieldNamesMapClass; -begin - Result := TdxPSDBBasedExplorerFoldersFieldNamesMap; -end; - -class function TdxPSDBBasedExplorer.GetItemsFieldNamesMapClass: TdxPSDBBasedExplorerItemsFieldNamesMapClass; -begin - Result := TdxPSDBBasedExplorerItemsFieldNamesMap; -end; - -function TdxPSDBBasedExplorer.AreIDsEqual(AnID1, AnID2: Integer): Boolean; -begin - Result := AnID1 = AnID2; -end; - -procedure TdxPSDBBasedExplorer.Changed; -begin -end; - -function TdxPSDBBasedExplorer.CheckDataSets: Boolean; -begin - Result := CheckItemDataSet(TdxPSDBBasedExplorerFolder) and CheckItemDataSet(TdxPSDBBasedExplorerItem); -end; - -function TdxPSDBBasedExplorer.CheckItemDataSet(AnItem: TCustomdxPSExplorerItem): Boolean; -begin - Result := CheckItemDataSet(TdxPSExplorerItemClass(AnItem.ClassType)); -end; - -function TdxPSDBBasedExplorer.CheckItemDataSet(AnItemClass: TCustomdxPSExplorerItemClass): Boolean; -var - DataSet: TDataSet; -begin - DataSet := GetItemDataSet(AnItemClass); - Result := (DataSet <> nil) and DataSet.Active; -end; - -function TdxPSDBBasedExplorer.CreateDataStream(AMode: TBlobStreamMode): TStream; -begin - Result := Items.CreateBlobStream(Items.FindField(ItemsFieldNamesMap.Data), AMode); -end; - -function TdxPSDBBasedExplorer.GetItemDataSet(AnItem: TCustomdxPSExplorerItem): TDataSet; -begin - Result := GetItemDataSet(TCustomdxPSExplorerItemClass(AnItem.ClassType)); -end; - -function TdxPSDBBasedExplorer.GetItemDataSet(AnItemClass: TCustomdxPSExplorerItemClass): TDataSet; -begin - if AnItemClass.InheritsFrom(TdxPSDBBasedExplorerFolder) then - Result := Folders - else - if AnItemClass.InheritsFrom(TdxPSDBBasedExplorerItem) then - Result := Items - else - Result := nil; -end; - -function TdxPSDBBasedExplorer.GetItemFieldNamesMap(AnItem: TCustomdxPSExplorerItem): TdxPSDBBasedExplorerFieldNamesMap; -begin - Result := GetItemFieldNamesMap(TdxPSExplorerItemClass(AnItem.ClassType)); -end; - -function TdxPSDBBasedExplorer.GetItemFieldNamesMap(AnItemClass: TCustomdxPSExplorerItemClass): TdxPSDBBasedExplorerFieldNamesMap; -begin - if AnItemClass.InheritsFrom(TdxPSDBBasedExplorerFolder) then - Result := FoldersFieldNamesMap - else - if AnItemClass.InheritsFrom(TdxPSDBBasedExplorerItem) then - Result := ItemsFieldNamesMap - else - Result := nil; -end; - -function TdxPSDBBasedExplorer.GetUniqueFolderID: Integer; -var - I, ID: Integer; -begin - if FolderList <> nil then - begin - Result := -1; - for I := 0 to FolderList.Count - 1 do - begin - ID := TdxPSDBBasedExplorerFolder(FolderList.List[I]).ID; - if ID > Result then Result := ID; - end; - Inc(Result); - end - else - Result := 0; -end; - -function TdxPSDBBasedExplorer.GetUniqueItemID: Integer; -var - I, ID: Integer; -begin - if ItemList <> nil then - begin - Result := -1; - for I := 0 to ItemList.Count - 1 do - begin - ID := TdxPSDBBasedExplorerItem(ItemList.List[I]).ID; - if ID > Result then Result := ID; - end; - Inc(Result); - end - else - Result := 0; -end; - -procedure TdxPSDBBasedExplorer.LoadFolderFromCurrentRecord(AFolder: TdxPSDBBasedExplorerFolder); -begin - AFolder.FID := GetFieldValue(Folders, FoldersFieldNamesMap.ID); - AFolder.FParentID := VarToInt(GetFieldValue(Folders, FoldersFieldNamesMap.ParentID)); - AFolder.Name := VarToStr(GetFieldValue(Folders, FoldersFieldNamesMap.Name)); -end; - -procedure TdxPSDBBasedExplorer.LoadItemFromCurrentRecord(AnItem: TdxPSDBBasedExplorerItem); -begin - AnItem.FID := GetFieldValue(Items, ItemsFieldNamesMap.ID); - AnItem.FParentID := VarToInt(GetFieldValue(Items, ItemsFieldNamesMap.ParentID)); - AnItem.Name := VarToStr(GetFieldValue(Items, ItemsFieldNamesMap.Name)); -end; - -procedure TdxPSDBBasedExplorer.SaveFolderToCurrentRecord(AFolder: TdxPSDBBasedExplorerFolder); -begin - if not IsFolderIDAutoIncField then - SetFieldValue(Folders, FoldersFieldNamesMap.ID, AFolder.ID); - SetFieldValue(Folders, FoldersFieldNamesMap.Name, AFolder.Name); - SetFieldValue(Folders, FoldersFieldNamesMap.ParentID, AFolder.ParentID); -end; - -procedure TdxPSDBBasedExplorer.SaveItemToCurrentRecord(AnItem: TdxPSDBBasedExplorerItem; - AReportLink: TBasedxReportLink); -begin - if not IsItemIDAutoIncField then - SetFieldValue(Items, ItemsFieldNamesMap.ID, AnItem.ID); - SetFieldValue(Items, ItemsFieldNamesMap.Name, AnItem.Name); - SetFieldValue(Items, ItemsFieldNamesMap.ParentID, AnItem.ParentID); - AnItem.RetrieveReportData(AReportLink); -end; - -procedure TdxPSDBBasedExplorer.DoLoadError(ADataSet: TDataSet); -begin - if Assigned(FOnLoadError) then FOnLoadError(Self, ADataSet); -end; - -function TdxPSDBBasedExplorer.GetFieldValue(ADataSet: TDataSet; const AName: string): Variant; -begin - if IsFieldNameValid(ADataSet, AName) then - Result := ADataSet[AName] - else - Result := Null; -end; - -function TdxPSDBBasedExplorer.IsFieldNameValid(ADataSet: TDataSet; const AName: string): Boolean; -begin - Result := (AName <> '') and (ADataSet <> nil) and (ADataSet.FindField(AName) <> nil); -end; - -procedure TdxPSDBBasedExplorer.SetFieldValue(ADataSet: TDataSet; const AName: string; - const Value: Variant); -begin - if IsFieldNameValid(ADataSet, AName) then - ADataSet[AName] := Value; -end; - -function TdxPSDBBasedExplorer.LocateItem(AnItem: TCustomdxPSExplorerItem): Boolean; -begin - Result := True; - if esLoading in State then Exit; - - if AnItem is TdxPSDBBasedExplorerItem then - Result := IsFieldNameValid(Items, ItemsFieldNamesMap.ID) and - Items.Locate(ItemsFieldNamesMap.ID, TdxPSDBBasedExplorerItem(AnItem).ID, []) - else - if AnItem is TdxPSDBBasedExplorerFolder then - Result := IsFieldNameValid(Folders, FoldersFieldNamesMap.ID) and - Folders.Locate(FoldersFieldNamesMap.ID, TdxPSDBBasedExplorerFolder(AnItem).ID, []); -end; - -procedure TdxPSDBBasedExplorer.PrepareIterate(ADataSet: TDataSet; out ABookmark: TBookmark); -begin - ADataSet.DisableControls; - ABookmark := nil; - if ADataSet.Active and (ADataSet.RecordCount > 0) then - ABookmark := ADataSet.GetBookmark; -end; - -procedure TdxPSDBBasedExplorer.UnprepareIterate(ADataSet: TDataSet; var ABookmark: TBookmark); -begin - if ABookmark <> nil then - begin - if ADataSet.Active and ADataSet.BookmarkValid(ABookmark) then - ADataSet.GotoBookmark(ABookmark); - ADataSet.FreeBookmark(ABookmark); - ABookmark := nil; - end; - ADataSet.EnableControls; -end; - -function TdxPSDBBasedExplorer.IsFolderIDAutoIncField: Boolean; -begin - Result := Folders.FieldByName(FoldersFieldNamesMap.ID) is TAutoIncField; -end; - -function TdxPSDBBasedExplorer.IsItemIDAutoIncField: Boolean; -begin - Result := Items.FieldByName(ItemsFieldNamesMap.ID) is TAutoIncField; -end; - -function TdxPSDBBasedExplorer.GetRoot: TdxPSDBBasedExplorerFolder; -begin - Result := inherited Root as TdxPSDBBasedExplorerFolder; -end; - -procedure TdxPSDBBasedExplorer.SetFolders(Value: TDataSet); -begin - if FFolders <> Value then - begin - FFolders := Value; - //FDataLink.DataSource := FFolders.DataSource; - //if Value <> nil then Value.FreeNotification(Self); - - Changed; - end; -end; - -procedure TdxPSDBBasedExplorer.SetFoldersFieldNamesMap(Value: TdxPSDBBasedExplorerFoldersFieldNamesMap); -begin - FoldersFieldNamesMap.Assign(Value); -end; - -procedure TdxPSDBBasedExplorer.SetItems(Value: TDataSet); -begin - if FItems <> Value then - begin - FItems := Value; - Changed; - end; -end; - -procedure TdxPSDBBasedExplorer.SetItemsFieldNamesMap(Value: TdxPSDBBasedExplorerItemsFieldNamesMap); -begin - ItemsFieldNamesMap.Assign(Value); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSDBBasedXplorerReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSDBBasedXplorerReg.pas deleted file mode 100644 index 6f5b0cdc..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSDBBasedXplorerReg.pas +++ /dev/null @@ -1,209 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSDBBasedXplorerReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, {$IFDEF CBUILDER10}DesignEditors,{$ENDIF} - {$ELSE} - DsgnIntf, - {$ENDIF} - {$IFDEF DELPHI5} - {$IFNDEF CBUILDER10}DBReg,{$ENDIF} - {$ENDIF} - Classes, DB, dxPSGlbl, dxPSDBBasedXplorer; - -type -{$IFDEF CBUILDER10} - TDBStringProperty = class(TStringProperty) - public - function GetAttributes: TPropertyAttributes; override; - procedure GetValueList(List: TStrings); virtual; - procedure GetValues(Proc: TGetStrProc); override; - end; -{$ENDIF} - - TdxDBFieldNameProperty = class(TDBStringProperty) - protected - function AcceptField(AField: TField): Boolean; virtual; - function GetDataSet: TDataSet; virtual; - procedure GetValueList(List: TStrings); override; - public - property DataSet: TDataSet read GetDataSet; - end; - - TdxDBFolderFieldNameProperty = class(TdxDBFieldNameProperty) - protected - function GetDataSet: TDataSet; override; - end; - - TdxDBFolderIDFieldNameProperty = class(TdxDBFolderFieldNameProperty) - protected - function AcceptField(AField: TField): Boolean; override; - end; - - TdxDBItemFieldNameProperty = class(TdxDBFieldNameProperty) - protected - function GetDataSet: TDataSet; override; - end; - - TdxDBItemDataFieldNameProperty = class(TdxDBItemFieldNameProperty) - protected - function AcceptField(AField: TField): Boolean; override; - end; - - TdxDBItemIDFieldNameProperty = class(TdxDBItemFieldNameProperty) - protected - function AcceptField(AField: TField): Boolean; override; - end; - -{$IFDEF CBUILDER10} - -function TDBStringProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paValueList, paSortList, paMultiSelect]; -end; - -procedure TDBStringProperty.GetValueList(List: TStrings); -begin -end; - -procedure TDBStringProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; - Values: TStringList; -begin - Values := TStringList.Create; - try - GetValueList(Values); - for I := 0 to Values.Count - 1 do Proc(Values[I]); - finally - Values.Free; - end; -end; - -{$ENDIF} - -{ TdxDBFieldNameProperty } - -function TdxDBFieldNameProperty.AcceptField(AField: TField): Boolean; -begin - Result := True; -end; - -function TdxDBFieldNameProperty.GetDataSet: TDataSet; -begin - Result := nil; -end; - -procedure TdxDBFieldNameProperty.GetValueList(List: TStrings); -var - I: Integer; - Field: TField; -begin - if DataSet <> nil then - begin - DataSet.GetFieldNames(List); - - for I := List.Count - 1 downto 0 do - begin - Field := TField(List.Objects[I]); - if not AcceptField(Field) then List.Delete(I); - end; - end; -end; - -{ TdxDBFolderFieldNameProperty } - -function TdxDBFolderFieldNameProperty.GetDataSet: TDataSet; -begin - Result := TdxPSDBBasedExplorerFoldersFieldNamesMap(GetComponent(0)).Explorer.Folders; -end; - -{ TdxDBFolderDBFieldNameProperty } - -function TdxDBFolderIDFieldNameProperty.AcceptField(AField: TField): Boolean; -begin - Result := (AField is TIntegerField) or (AField is TSmallintField) or - (AField is TLargeintField ) or (AField is TWordField) or (AField is TAutoIncField); -end; - -{ TdxDBItemFieldNameProperty } - -function TdxDBItemFieldNameProperty.GetDataSet: TDataSet; -begin - Result := TdxPSDBBasedExplorerItemsFieldNamesMap(GetComponent(0)).Explorer.Items; -end; - -{ TdxDBItemDataFieldNameProperty } - -function TdxDBItemDataFieldNameProperty.AcceptField(AField: TField): Boolean; -begin - Result := AField is TBlobField; -end; - -{ TdxDBItemIDFieldNameProperty } - -function TdxDBItemIDFieldNameProperty.AcceptField(AField: TField): Boolean; -begin - Result := (AField is TIntegerField) or (AField is TSmallintField) or - (AField is TLargeintField ) or (AField is TWordField) or (AField is TAutoIncField); -end; - -procedure Register; -begin - RegisterComponents(sdxPSComponentPage, [TdxPSDBBasedExplorer]); - - RegisterPropertyEditor(TypeInfo(string), TdxPSDBBasedExplorerFoldersFieldNamesMap, 'ID', TdxDBFolderIDFieldNameProperty); - RegisterPropertyEditor(TypeInfo(string), TdxPSDBBasedExplorerFoldersFieldNamesMap, 'Name', TdxDBFolderFieldNameProperty); - RegisterPropertyEditor(TypeInfo(string), TdxPSDBBasedExplorerFoldersFieldNamesMap, 'ParentID', TdxDBFolderIDFieldNameProperty); - - RegisterPropertyEditor(TypeInfo(string), TdxPSDBBasedExplorerItemsFieldNamesMap, 'ID', TdxDBItemIDFieldNameProperty); - RegisterPropertyEditor(TypeInfo(string), TdxPSDBBasedExplorerItemsFieldNamesMap, 'Name', TdxDBItemFieldNameProperty); - RegisterPropertyEditor(TypeInfo(string), TdxPSDBBasedExplorerItemsFieldNamesMap, 'ParentID', TdxDBItemIDFieldNameProperty); - RegisterPropertyEditor(TypeInfo(string), TdxPSDBBasedExplorerItemsFieldNamesMap, 'Data', TdxDBItemDataFieldNameProperty); -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSDBCtrlLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSDBCtrlLnkReg.pas deleted file mode 100644 index 4a6b1f42..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSDBCtrlLnkReg.pas +++ /dev/null @@ -1,55 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSDBCtrlLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - Classes, dxPSDBCtrlLnks; - -procedure Register; -begin - RegisterNoIcon([TdxDBImageReportLink, TdxDBListBoxReportLink, - TdxDBRichEditReportLink, TdxDBMemoReportLink]); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSDBCtrlLnks.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSDBCtrlLnks.pas deleted file mode 100644 index 3aba6577..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSDBCtrlLnks.pas +++ /dev/null @@ -1,206 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSDBCtrlLnks; - -interface - -{$I cxVer.inc} - -uses - Graphics, DBCtrls, dxPSCore, dxPSGraphicLnk, dxPSLbxLnk, dxPSTextLnk, - dxPSRELnk; - -type - TdxDBImageReportLink = class(TCustomdxPictureReportLink) - private - function GetDBImage: TDBImage; - protected - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - - function GetGraphicHeight: Integer; override; - function GetGraphicWidth: Integer; override; - function GetPicture: TPicture; override; - public - function DataProviderPresent: Boolean; override; - property DBImage: TDBImage read GetDBImage; - published - property BorderColor; - property DrawBorder; - property Transparent; - property TransparentColor; - end; - - TdxDBListBoxReportLink = class(TCustomdxListBoxReportLinkControl) - private - function GetDBListBox: TDBListBox; - public - property DBListBox: TDBListBox read GetDBListBox; - published - property Color; - property EndEllipsis; - property EvenColor; - property EvenFont; - property Font; - property OddColor; - property OddFont; - property Options; - property Multiline; - property PaintItemsGraphics; - property RowAutoHeight; - property ScaleFonts; - property SupportedCustomDraw; - property Transparent; - property TransparentGraphics; - property UseHorzDelimiters; - property UseVertDelimiters; - property Width; - - property OnCustomDrawItem; - property OnInitializeItem; - end; - - TdxDBRichEditReportLink = class(TCustomdxRichEditReportLink) - private - function GetDBRichEdit: TDBRichEdit; - public - property DBRichEdit: TDBRichEdit read GetDBRichEdit; - end; - - TdxDBMemoReportLink = class(TdxCustomMemoReportLink) - private - function GetMemo: TDBMemo; - public - property Memo: TDBMemo read GetMemo; - end; - -implementation - -{ TdxDBImageReportLink } - -function TdxDBImageReportLink.DataProviderPresent: Boolean; -begin - if DataSource = rldsComponent then - Result := DBImage <> nil - else - Result := inherited DataProviderPresent; -end; - -procedure TdxDBImageReportLink.InternalRestoreDefaults; -begin - inherited; - Center := True; - Stretch := False; -end; - -procedure TdxDBImageReportLink.InternalRestoreFromOriginal; -begin - inherited; - Center := DBImage.Center; - Stretch := DBImage.Stretch; -end; - -function TdxDBImageReportLink.GetGraphicHeight: Integer; -begin - if DBImage <> nil then - begin - Result := DBImage.Height; - if IsAggregated and (Result < inherited GetGraphicHeight) then - Result := inherited GetGraphicHeight; - end - else - Result := inherited GetGraphicHeight; -end; - -function TdxDBImageReportLink.GetGraphicWidth: Integer; -begin - if DBImage <> nil then - begin - Result := DBImage.Width; - if IsAggregated and (Result < inherited GetGraphicWidth) then - Result := inherited GetGraphicWidth; - end - else - Result := inherited GetGraphicWidth; -end; - -function TdxDBImageReportLink.GetPicture: TPicture; -begin - if DBImage <> nil then - Result := DBImage.Picture - else - Result := inherited GetPicture; -end; - -function TdxDBImageReportLink.GetDBImage: TDBImage; -begin - Result := inherited Component as TDBImage; -end; - -{ TdxDBListBoxReportLink } - -function TdxDBListBoxReportLink.GetDBListBox: TDBListBox; -begin - Result := inherited Component as TDBListBox; -end; - -{ TdxDBRichEditReportLink } - -function TdxDBRichEditReportLink.GetDBRichEdit: TDBRichEdit; -begin - Result := inherited Component as TDBRichEdit; -end; - -{ TdxDBMemoReportLink } - -function TdxDBMemoReportLink.GetMemo: TDBMemo; -begin - Result := inherited Component as TDBMemo; -end; - -initialization - dxPSRegisterReportLink(TdxDBImageReportLink, TDBImage, nil); - dxPSRegisterReportLink(TdxDBListBoxReportLink, TDBListBox, TdxLBxReportLinkDesignWindow); - dxPSRegisterReportLink(TdxDBRichEditReportLink, TDBRichEdit, nil); - dxPSRegisterReportLink(TdxDBMemoReportLink, TDBMemo, TdxfmTextReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxDBMemoReportLink, TDBMemo, TdxfmTextReportLinkDesignWindow); - dxPSUnregisterReportLink(TdxDBRichEditReportLink, TDBRichEdit, nil); - dxPSUnregisterReportLink(TdxDBListBoxReportLink, TDBListBox, TdxLBxReportLinkDesignWindow); - dxPSUnregisterReportLink(TdxDBImageReportLink, TDBImage, nil); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSDBCtrlProducers.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSDBCtrlProducers.pas deleted file mode 100644 index 505a4ecf..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSDBCtrlProducers.pas +++ /dev/null @@ -1,129 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSDBCtrlProducers; - -interface - -{$I cxVer.inc} - -uses - Controls, Graphics, DB, DBCtrls, dxPSCore, dxPSContainerLnk; - -type - TdxPSDBEditProducer = class(TdxPSCustomEditProducer) - private - function Field: TField; - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - public - function Control: TDBEdit; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSDBLookupComboBoxProducer = class(TdxPSContainerWinControlProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - public - function Control: TDBLookupComboBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - -implementation - -uses - dxPSDBCtrlLnks; - -{ TdxPSDBEditProducer } - -function TdxPSDBEditProducer.Control: TDBEdit; -begin - Result := inherited Control as TDBEdit; -end; - -class function TdxPSDBEditProducer.ControlClass: TControlClass; -begin - Result := TDBEdit; -end; - -procedure TdxPSDBEditProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - if Field <> nil then - TdxReportCellString(AnItem).TextAlignX := dxPSCore.dxTextAlignX[Field.Alignment]; -end; - -function TdxPSDBEditProducer.Field: TField; -begin - Result := Control.Field; -end; - -{ TdxPSDBLookupComboBoxProducer } - -function TdxPSDBLookupComboBoxProducer.Control: TDBLookupComboBox; -begin - Result := inherited Control as TDBLookupComboBox; -end; - -class function TdxPSDBLookupComboBoxProducer.ControlClass: TControlClass; -begin - Result := TDBLookupComboBox; -end; - -procedure TdxPSDBLookupComboBoxProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportCellString(AnItem).Text := Control.Text; -end; - -procedure RegisterAssistants; -begin - TdxPSDBEditProducer.Register; - TdxPSDBLookupComboBoxProducer.Register; -end; - -procedure UnregisterAssistants; -begin - TdxPSDBLookupComboBoxProducer.Unregister; - TdxPSDBEditProducer.Unregister; -end; - -initialization - RegisterAssistants; - -finalization - UnregisterAssistants; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSDBTCLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSDBTCLnk.pas deleted file mode 100644 index b56ae9bc..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSDBTCLnk.pas +++ /dev/null @@ -1,74 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSDBTCLnk; - -interface - -{$I cxVer.inc} - -uses - Classes, DBChart, dxPSTCLnk; - -type - TdxDBTeeChartReportLink = class(TCustomdxTeeChartReportLink) - private - function GetDBChart: TDBChart; - public - property DBChart: TDBChart read GetDBChart; - property GraphicClass; - published - property GraphicClassName; - property OnCreateGraphic; - property OnGetGraphicClass; - end; - -implementation - -uses - dxPSCore; - -function TdxDBTeeChartReportLink.GetDBChart: TDBChart; -begin - Result := inherited Chart as TDBChart; -end; - -initialization - dxPSRegisterReportLink(TdxDBTeeChartReportLink, TDBChart, nil); - -finalization - dxPSUnregisterReportLink(TdxDBTeeChartReportLink, TDBChart, nil); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSDBTCLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSDBTCLnkReg.pas deleted file mode 100644 index 056dbb16..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSDBTCLnkReg.pas +++ /dev/null @@ -1,62 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSDBTCLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI9} - DesignIntf, -{$ENDIF} - Classes, dxPSDBTCLnk; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterNoIcon([TdxDBTeeChartReportLink]); -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSDsgImgs.res b/internal/x.46/ExpressPrinting System/Sources/dxPSDsgImgs.res deleted file mode 100644 index 31c9e507..00000000 Binary files a/internal/x.46/ExpressPrinting System/Sources/dxPSDsgImgs.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSDsgProxies.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSDsgProxies.pas deleted file mode 100644 index 1ace7a31..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSDsgProxies.pas +++ /dev/null @@ -1,412 +0,0 @@ -{******************************************************************* -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSDsgProxies; - -interface - -{$I cxVer.inc} - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, ComponentDesigner, - {$ELSE} - DsgnIntf, LibIntf, - {$ENDIF} - Classes, ImgList, Controls, ComCtrls, dxBase, dxPSSngltn; - -const - NodeUncheckedStateIndex = 0; - NodeCheckedStateIndex = 1; - NodeParticallyCheckedStateIndex = 2; - -type - {$IFDEF DELPHI6} - TFormDesigner = IDesigner; - IPersistent = TPersistent; - IComponent = TComponent; - {$ELSE} - TFormDesigner = IFormDesigner; - {$ENDIF} - - {$IFDEF DELPHI6} - TdxDesignSelectionList = IDesignerSelections; - {$ELSE} - {$IFDEF DELPHI5} - TdxDesignSelectionList = TDesignerSelectionList; - {$ELSE} - TdxDesignSelectionList = TComponentList; - {$ENDIF} - {$ENDIF} - - {$IFDEF DELPHI6} - TdxDesignEnvironment = IDesignEnvironment; - {$ElSE} - {$IFDEF DELPHI5} - TdxDesignEnvironment = IDelphiIDE; - {$ELSE} - TdxDesignEnvironment = TIDelphiIDE; - {$ENDIF} - {$ENDIF} - -function IdeEnvironment: TdxDesignEnvironment; - -{ helpers } -function CreateDesignSelectionList: TdxDesignSelectionList; -procedure FreeDesignSelectionList(const ASelections: TdxDesignSelectionList); -procedure RestoreDesignSelection(const ADesigner: TFormDesigner; var AList: TdxDesignSelectionList); -procedure SaveDesignSelection(const ADesigner: TFormDesigner; out AList: TdxDesignSelectionList); -function GetBaseRegistryKey: string; - -{$IFNDEF DELPHI6} -function TryExtractPersistent(Component: IPersistent): TPersistent; -{$ENDIF} - -type - TdxIdeComponentImageItem = class - private - FComponentClass: TComponentClass; - FImageIndex: Integer; - public - constructor Create(AImageIndex: Integer; AComponentClass: TComponentClass); - property ComponentClass: TComponentClass read FComponentClass; - property ImageIndex: Integer read FImageIndex; - end; - - TdxIdeImagesProvider = class(TBasedxPSSingleton) - private - FImages: TCustomImageList; - FItems: TList; - function GetCount: Integer; - function GetImageIndex(ComponentClass: TComponentClass): Integer; - function GetImageIndexByComponentClassName(const ClassName: string): Integer; - function GetImageIndexByObject(AnObject: TPersistent): Integer; - function GetItem(Index: Integer): TdxIdeComponentImageItem; - protected - procedure FinalizeInstance; override; - procedure InitializeInstance; override; - - procedure Add(AImageIndex: Integer; AComponentClass: TComponentClass); - procedure ClearItems; - function ImageIndexByComponentClass(AComponentClass: TComponentClass): Integer; - property Items[Index: Integer]: TdxIdeComponentImageItem read GetItem; - public - class function Instance: TdxIdeImagesProvider; reintroduce; overload; - procedure Refresh; - - property Count: Integer read GetCount; - property ImageIndexes[ComponentClass: TComponentClass]: Integer read GetImageIndex; default; - property ImageIndexesByComponentClassName[const ClassName: string]: Integer read GetImageIndexByComponentClassName; - property ImageIndexesByObject[AnObject: TPersistent]: Integer read GetImageIndexByObject; - property Images: TCustomImageList read FImages; - end; - -function dxIdeImagesProvider: TdxIdeImagesProvider; - -implementation - -uses - ToolsAPI, - {$IFDEF DELPHI9} - PaletteAPI, - {$ENDIF} - Forms, Windows, Graphics, StdCtrls, SysUtils, dxPSCore, dxPSUtl; - -{$IFNDEF DELPHI6} -const - CompIconSize = 28; -{$ENDIF} - -type - IdxIDEPaletteItem = {$IFDEF DELPHI9}IInternalPaletteItem{$ELSE}IPaletteItem{$ENDIF}; - {$IFDEF DELPHI6} - IdxIDEPalletePaint = {$IFDEF DELPHI9}INTAPalettePaintIcon{$ELSE}IPalettePaint{$ENDIF}; - {$ENDIF} - -function IdeEnvironment: TdxDesignEnvironment; -begin - {$IFDEF DELPHI6} - if ActiveDesigner <> nil then - Result := ActiveDesigner.Environment - else - Result := nil; - {$ELSE} - Result := DelphiIDE; - {$ENDIF} -end; - -function CreateDesignSelectionList: TdxDesignSelectionList; -begin - {$IFDEF DELPHI6} - Result := CreateSelectionList; - {$ELSE} - {$IFDEF DELPHI5} - Result := TDesignerSelectionList.Create; - {$ELSE} - Result := TComponentList.Create; - {$ENDIF} - {$ENDIF} -end; - -procedure FreeDesignSelectionList(const ASelections: TdxDesignSelectionList); -begin - {$IFNDEF DELPHI6} - ASelections.Free; - {$ENDIF} -end; - -procedure RestoreDesignSelection(const ADesigner: TFormDesigner; var AList: TdxDesignSelectionList); -begin - ADesigner.SetSelections(AList); - FreeDesignSelectionList(AList); -end; - -procedure SaveDesignSelection(const ADesigner: TFormDesigner; out AList: TdxDesignSelectionList); -begin - AList := CreateDesignSelectionList; - ADesigner.GetSelections(AList); -end; - -function GetBaseRegistryKey: string; -begin - Result := (BorlandIDEServices as IOTAServices).GetBaseRegistryKey; -end; - -{$IFNDEF DELPHI6} -function TryExtractPersistent(Component: IPersistent): TPersistent; -begin - Result := DsgnIntf.TryExtractPersistent(Component); -end; -{$ENDIF} - -{ TdxIdeComponentImageItem } - -constructor TdxIdeComponentImageItem.Create(AImageIndex: Integer; AComponentClass: TComponentClass); -begin - inherited Create; - FComponentClass := AComponentClass; - FImageIndex := AImageIndex; -end; - -{ TdxIdeImagesProvider } - -function dxIdeImagesProvider: TdxIdeImagesProvider; -begin - Result := TdxIdeImagesProvider.Instance; -end; - -class function TdxIdeImagesProvider.Instance: TdxIdeImagesProvider; -begin - Result := inherited Instance as TdxIdeImagesProvider; -end; - -procedure TdxIdeImagesProvider.FinalizeInstance; -begin - FImages.Free; - ClearItems; - FItems.Free; - inherited; -end; - -procedure TdxIdeImagesProvider.InitializeInstance; -begin - inherited; - FImages := TImageList.CreateSize(CompIconSize + 1, CompIconSize + 1); // plus one for frame - FItems := TList.Create; -end; - -procedure TdxIdeImagesProvider.Add(AImageIndex: Integer; AComponentClass: TComponentClass); -begin - FItems.Add(TdxIdeComponentImageItem.Create(AImageIndex, AComponentClass)); -end; - -procedure TdxIdeImagesProvider.ClearItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Free; - FItems.Clear; -end; - -function TdxIdeImagesProvider.ImageIndexByComponentClass(AComponentClass: TComponentClass): Integer; -var - I: Integer; - Item: TdxIdeComponentImageItem; -begin - Result := -1; - if AComponentClass <> nil then - begin - {$IFDEF DELPHI5} - if AComponentClass.InheritsFrom(TFrame) then - AComponentClass := TFrame; - {$ENDIF} - if AComponentClass.InheritsFrom(TForm) then - AComponentClass := TForm; - - for I := 0 to Count - 1 do - begin - Item := Items[I]; - if AComponentClass = Item.ComponentClass then - begin - Result := Item.ImageIndex; - Exit; - end; - end; - end; -end; - -procedure TdxIdeImagesProvider.Refresh; - - { TPaintItemStyle = set of (piDown, piSelected, piFramed, piGosted);} - - function GetComponentImage(APaletteItem: IdxIDEPaletteItem; ABitmap: TBitmap): Boolean; - var - R: TRect; - {$IFDEF DELPHI6} - Painter: IdxIDEPalletePaint; - {$ENDIF} - begin - R := MakeRect(0, 0, ABitmap.Width, ABitmap.Height); - ABitmap.Canvas.Brush.Color := clBtnFace; - ABitmap.Canvas.FillRect(R); - {$IFDEF DELPHI6} - Result := Supports(APaletteItem, IdxIDEPalletePaint, Painter); - {$IFDEF DELPHI9} - if Result then - begin - Painter.Paint(ABitmap.Canvas, 0, 0, pi24x24); - DrawEdge(ABitmap.Canvas.Handle, R, BDR_RAISEDINNER, BF_RECT); - end; - {$ELSE} - if Result then - Painter.Paint(ABitmap.Canvas, 0, 0, [piFramed]); - {$ENDIF} - {$ELSE} - Result := True; - APaletteItem.Paint(ABitmap.Canvas, 0, 0); - DrawEdge(ABitmap.Canvas.Handle, R, BDR_RAISEDINNER, BF_RECT); - {$ENDIF} - end; - - function AddComponentToImages(ABitmap: TBitmap; AComponentClass: TComponentClass): Integer; - var - PaletteItem: IdxIDEPaletteItem; - begin - Result := -1; - if IdeEnvironment = nil then Exit; - - PaletteItem := IdeEnvironment.GetPaletteItem(AComponentClass); - if (PaletteItem <> nil) and GetComponentImage(PaletteItem, ABitmap) then - begin - FImages.Add(ABitmap, nil); - Result := FImages.Count - 1; - end; - end; - -var - List: TdxClassList; - Bitmap: TBitmap; - I, ImageIndex: Integer; - ComponentClass: TComponentClass; -begin - FImages.Clear; - ClearItems; - - List := TdxClassList.Create; - try - Bitmap := TBitmap.Create; - try - Bitmap.Width := FImages.Width; - Bitmap.Height := FImages.Height; - dxPSCore.dxPSGetSupportedComponentsList(List); - for I := 0 to List.Count - 1 do - begin - ComponentClass := TComponentClass(List[I]); - if ComponentClass <> nil then - begin - ImageIndex := AddComponentToImages(Bitmap, ComponentClass); - Add(ImageIndex, ComponentClass); - end; - end; - finally - Bitmap.Free; - end; - finally - List.Free; - end; -end; - -function TdxIdeImagesProvider.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxIdeImagesProvider.GetImageIndex(ComponentClass: TComponentClass): Integer; -begin - Result := ImageIndexByComponentClass(ComponentClass); -end; - -function TdxIdeImagesProvider.GetImageIndexByComponentClassName(const ClassName: string): Integer; -var - AClass: TClass; -begin - AClass := Classes.GetClass(ClassName); - if AClass.InheritsFrom(TComponent) then - Result := ImageIndexes[TComponentClass(AClass)] - else - Result := -1; -end; - -function TdxIdeImagesProvider.GetImageIndexByObject(AnObject: TPersistent): Integer; -begin - if AnObject is TComponent then - Result := ImageIndexes[TComponentClass(AnObject.ClassType)] - else - Result := -1; -end; - -function TdxIdeImagesProvider.GetItem(Index: Integer): TdxIdeComponentImageItem; -begin - Result := TdxIdeComponentImageItem(FItems[Index]); -end; - -initialization - -finalization - TdxIdeImagesProvider.ReleaseInstance; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSDsgUtils.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSDsgUtils.pas deleted file mode 100644 index 2858d863..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSDsgUtils.pas +++ /dev/null @@ -1,68 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSDsgUtils; - -interface - -{$I cxVer.inc} - -uses - Classes, TypInfo; - -procedure HideProperty(PropertyType: PTypeInfo; ComponentClass: TClass; const PropertyName: string); -function TryStartWEBPage(const APage: string): Boolean; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, - {$ELSE} - DsgnIntf, - {$ENDIF} - Windows, ShellAPI; - -procedure HideProperty(PropertyType: PTypeInfo; ComponentClass: TClass; const PropertyName: string); -begin - RegisterPropertyEditor(PropertyType, ComponentClass, PropertyName, nil); -end; - -function TryStartWEBPage(const APage: string): Boolean; -begin - Result := ShellExecute(0, nil, PChar(APage), nil, nil, SW_SHOWNORMAL) >= 32; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSESys.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSESys.pas deleted file mode 100644 index 39dbbb3a..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSESys.pas +++ /dev/null @@ -1,371 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire coVisntents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSESys; - -interface - -{$I cxVer.inc} - -uses - Classes, dxPSSngltn, dxBase; - -type - TdxEventSubscriber = class; - - TdxEventClass = class of TdxEvent; - TdxEvent = class; - - TdxPSEventSystem = class(TBasedxPSSingleton) - private - FEventClasses: TdxClassList; - FSubscribers: TList; - function GetEventClass(Index: Integer): TdxEventClass; - function GetEventCount: Integer; - function GetSubscriber(Index: Integer): TdxEventSubscriber; - function GetSubscriberCount: Integer; - protected - procedure FinalizeInstance; override; - procedure InitializeInstance; override; - - procedure MoveSubscriber(ACurIndex, ANewIndex: Integer); - public - class function Instance: TdxPSEventSystem; reintroduce; overload; - - procedure ProcessEvent(var AEvent: TdxEvent); - - function IndexOfEventClass(AEventClass: TdxEventClass): Integer; - procedure RegisterEventClass(AEventClass: TdxEventClass); - procedure UnregisterEventClass(AEventClass: TdxEventClass); - - function IndexOfSubscriber(ASubscriber: TdxEventSubscriber): Integer; - procedure RegisterSubscriber(ASubscriber: TdxEventSubscriber); - procedure UnregisterSubscriber(ASubscriber: TdxEventSubscriber); - - property EventClasses[Index: Integer]: TdxEventClass read GetEventClass; - property EventCount: Integer read GetEventCount; - property SubscriberCount: Integer read GetSubscriberCount; - property Subscribers[Index: Integer]: TdxEventSubscriber read GetSubscriber; - end; - - TdxEventSubscriber = class - private - FActiveEvent: TdxEvent; - FEnabled: Boolean; - FEventClasses: TdxClassList; - FRegistered: Boolean; - function GetEventClass(Index: Integer): TdxEventClass; - function GetEventCount: Integer; - function GetIndex: Integer; - procedure SetIndex(Value: Integer); - procedure SetRegistered(Value: Boolean); - - procedure ProcessEvent(AEvent: TdxEvent); - protected - procedure DoProcessEvent; virtual; abstract; - public - constructor Create(const AEventClasses: array of TdxEventClass); - destructor Destroy; override; - - procedure Add(AEventClass: TdxEventClass); - procedure Remove(AEventClass: TdxEventClass); - function SupportsEventClass(AEventClass: TdxEventClass): Boolean; - - property ActiveEvent: TdxEvent read FActiveEvent; - property Enabled: Boolean read FEnabled write FEnabled default True; - property EventClasses[Index: Integer]: TdxEventClass read GetEventClass; - property EventCount: Integer read GetEventCount; - property Index: Integer read GetIndex write SetIndex; - property Registered: Boolean read FRegistered write SetRegistered default True; - end; - - TdxEvent = class - private - FBreak: Boolean; - FRegistered: Boolean; - FSender: TObject; - procedure SetRegistered(Value: Boolean); - public - constructor Create(ASender: TObject); - function EventClass: TdxEventClass; - - property Break: Boolean read FBreak write FBreak; - property Registered: Boolean read FRegistered write SetRegistered; - property Sender: TObject read FSender; - end; - -function dxPSEventSystem: TdxPSEventSystem; -procedure dxPSProcessEvent(var AEvent: TdxEvent); - -implementation - -uses - SysUtils, Forms, TypInfo {$IFNDEF DELPHI5}, dxPSUtl{$ENDIF}; - -function dxPSEventSystem: TdxPSEventSystem; -begin - Result := TdxPSEventSystem.Instance; -end; - -procedure dxPSProcessEvent(var AEvent: TdxEvent); -begin - dxPSEventSystem.ProcessEvent(AEvent); -end; - -{ TdxPSEventSystem } - -class function TdxPSEventSystem.Instance: TdxPSEventSystem; -begin - Result := inherited Instance as TdxPSEventSystem; -end; - -procedure TdxPSEventSystem.ProcessEvent(var AEvent: TdxEvent); -var - I: Integer; - Subscriber: TdxEventSubscriber; -begin - if (AEvent <> nil) and AEvent.Registered then - try - for I := 0 to SubscriberCount - 1 do - begin - Subscriber := Subscribers[I]; - if Subscriber.Enabled and Subscriber.SupportsEventClass(AEvent.EventClass) then - begin - try - Subscriber.ProcessEvent(AEvent); - except - Application.HandleException(Self); - end; - if AEvent.Break then Break; - end; - end; - finally - FreeAndNil(AEvent); - end; -end; - -function TdxPSEventSystem.IndexOfEventClass(AEventClass: TdxEventClass): Integer; -begin - Result := FEventClasses.IndexOf(AEventClass); -end; - -procedure TdxPSEventSystem.RegisterEventClass(AEventClass: TdxEventClass); -begin - if AEventClass <> nil then FEventClasses.Add(AEventClass, True); -end; - -procedure TdxPSEventSystem.UnregisterEventClass(AEventClass: TdxEventClass); -begin - FEventClasses.Remove(AEventClass); -end; - -function TdxPSEventSystem.IndexOfSubscriber(ASubscriber: TdxEventSubscriber): Integer; -begin - Result := FSubscribers.IndexOf(ASubscriber); -end; - -procedure TdxPSEventSystem.RegisterSubscriber(ASubscriber: TdxEventSubscriber); -begin - if (ASubscriber <> nil) and (IndexOfSubscriber(ASubscriber) = -1) then - FSubscribers.Add(ASubscriber); -end; - -procedure TdxPSEventSystem.UnregisterSubscriber(ASubscriber: TdxEventSubscriber); -begin - FSubscribers.Remove(ASubscriber); -end; - -procedure TdxPSEventSystem.InitializeInstance; -begin - inherited; - FEventClasses := TdxClassList.Create; - FSubscribers := TList.Create; -end; - -procedure TdxPSEventSystem.FinalizeInstance; -begin - while EventCount > 0 do - UnregisterEventClass(EventClasses[EventCount - 1]); - FreeAndNil(FEventClasses); - - while SubscriberCount > 0 do - UnregisterSubscriber(Subscribers[SubscriberCount - 1]); - FreeAndNil(FSubscribers); - - inherited; -end; - -function TdxPSEventSystem.GetEventClass(Index: Integer): TdxEventClass; -begin - Result := TdxEventClass(FEventClasses[Index]); -end; - -function TdxPSEventSystem.GetEventCount: Integer; -begin - Result := FEventClasses.Count; -end; - -function TdxPSEventSystem.GetSubscriber(Index: Integer): TdxEventSubscriber; -begin - Result := TdxEventSubscriber(FSubscribers[Index]); -end; - -function TdxPSEventSystem.GetSubscriberCount: Integer; -begin - Result := FSubscribers.Count; -end; - -procedure TdxPSEventSystem.MoveSubscriber(ACurIndex, ANewIndex: Integer); -begin - FSubscribers.Move(ACurIndex, ANewIndex); -end; - -{ TdxEventSubscriber } - -constructor TdxEventSubscriber.Create(const AEventClasses: array of TdxEventClass); -var - I: Integer; -begin - inherited Create; - FEnabled := True; - FEventClasses := TdxClassList.Create; - for I := Low(AEventClasses) to High(AEventClasses) do - Add(AEventClasses[I]); - Registered := True; -end; - -destructor TdxEventSubscriber.Destroy; -begin - Registered := False; - while EventCount <> 0 do - Remove(EventClasses[EventCount - 1]); - FreeAndNil(FEventClasses); - inherited; -end; - -procedure TdxEventSubscriber.SetRegistered(Value: Boolean); -begin - if FRegistered <> Value then - begin - FRegistered := Value; - if FRegistered then - dxPSEventSystem.RegisterSubscriber(Self) - else - dxPSEventSystem.UnregisterSubscriber(Self); - end; -end; - -function TdxEventSubscriber.GetEventClass(Index: Integer): TdxEventClass; -begin - Result := TdxEventClass(FEventClasses[Index]); -end; - -function TdxEventSubscriber.GetEventCount: Integer; -begin - Result := FEventClasses.Count; -end; - -function TdxEventSubscriber.GetIndex: Integer; -begin - Result := dxPSEventSystem.IndexOfSubscriber(Self); -end; - -procedure TdxEventSubscriber.SetIndex(Value: Integer); -var - CurIndex: Integer; -begin - if Registered then - begin - if Value < 0 then Value := 0; - if Value > dxPSEventSystem.SubscriberCount - 1 then - Value := dxPSEventSystem.SubscriberCount - 1; - CurIndex := GetIndex; - if CurIndex <> Value then - dxPSEventSystem.MoveSubscriber(CurIndex, Value); - end; -end; - -procedure TdxEventSubscriber.Add(AEventClass: TdxEventClass); -begin - if not SupportsEventClass(AEventClass) then FEventClasses.Add(AEventClass); -end; - -procedure TdxEventSubscriber.Remove(AEventClass: TdxEventClass); -begin - FEventClasses.Remove(AEventClass); -end; - -function TdxEventSubscriber.SupportsEventClass(AEventClass: TdxEventClass): Boolean; -begin - Result := (AEventClass <> nil) and (FEventClasses.IndexOf(AEventClass) <> -1); -end; - -procedure TdxEventSubscriber.ProcessEvent(AEvent: TdxEvent); -begin - FActiveEvent := AEvent; - try - DoProcessEvent; - finally - FActiveEvent := nil; - end; -end; - -{ TdxEvent } - -constructor TdxEvent.Create(ASender: TObject); -begin - inherited Create; - FSender := ASender; - SetRegistered(True); -end; - -function TdxEvent.EventClass: TdxEventClass; -begin - Result := TdxEventClass(ClassType); -end; - -procedure TdxEvent.SetRegistered(Value: Boolean); -begin - if FRegistered <> Value then - begin - FRegistered := Value; - if FRegistered then - dxPSEventSystem.RegisterEventClass(EventClass) - else - dxPSEventSystem.UnregisterEventClass(EventClass); - end; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSEdgePatterns.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSEdgePatterns.pas deleted file mode 100644 index b7645dc4..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSEdgePatterns.pas +++ /dev/null @@ -1,465 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSEdgePatterns; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, Graphics, dxCore, dxPSSngltn, dxBase, dxPSCore; - -type - TdxPSCellEdgePatternOrientation = (cepoHorizontal, cepoVertical); - - TdxPSEdgePattern = class(TdxPSCustomCellBorder) - public - class procedure Register; override; - class procedure Unregister; override; - - class function Bits(Index: Integer): DWORD; virtual; - class function Name: string; virtual; - class function RequiredBrushOrigin: Boolean; virtual; - class function RequiredScaling: Boolean; virtual; - class function SignificantBitCount: Integer; virtual; - class function Solid: Boolean; override; - class function Thickness: Integer; override; - end; - - TdxPSEdgePatternClass = class of TdxPSEdgePattern; - - TdxPSSolidEdgePattern = class(TdxPSEdgePattern) - public - class function Bits(Index: Integer): DWORD; override; - class function Name: string; override; - class function RequiredBrushOrigin: Boolean; override; - class function RequiredScaling: Boolean; override; - class function SignificantBitCount: Integer; override; - class function Solid: Boolean; override; - class function Thickness: Integer; override; - end; - - TdxPSEdgePatternItem = class - private - FBitmaps: array[TdxPSCellEdgePatternOrientation] of TBitmap; - FBrushes: array[TdxPSCellEdgePatternOrientation] of TBrush; - function GetBitmap(Orientation: TdxPSCellEdgePatternOrientation): TBitmap; - function GetBrush(Orientation: TdxPSCellEdgePatternOrientation): TBrush; - protected - procedure Initialize(APattern: TdxPSEdgePatternClass; AIsPrinting: Boolean); virtual; - public - constructor Create(APattern: TdxPSEdgePatternClass; AIsPrinting: Boolean); - destructor Destroy; override; - property Bitmaps[Orientation: TdxPSCellEdgePatternOrientation]: TBitmap read GetBitmap; - property Brushes[Orientation: TdxPSCellEdgePatternOrientation]: TBrush read GetBrush; - end; - - TdxPSEdgePatternFactory = class(TBasedxPSSingleton) - private - FItems: TList; - FPatterns: TdxClassList; - FPrintItems: TList; - function GetCount: Integer; - function GetInternalItem(Index: Integer; IsPrinting: Boolean): TdxPSEdgePatternItem; - function GetItem(Pattern: TdxPSEdgePatternClass; IsPrinting: Boolean): TdxPSEdgePatternItem; - function GetPattern(Index: Integer): TdxPSEdgePatternClass; - procedure SetInternalItem(Index: Integer; IsPrinting: Boolean; Value: TdxPSEdgePatternItem); - - procedure AddPattern(APattern: TdxPSEdgePatternClass); - procedure RemovePattern(APattern: TdxPSEdgePatternClass); - - function HasItem(APattern: TdxPSEdgePatternClass): Boolean; - function HasPrintItem(APattern: TdxPSEdgePatternClass): Boolean; - - procedure RemovePatternItem(APattern: TdxPSEdgePatternClass); - procedure RemovePatternPrintItem(APattern: TdxPSEdgePatternClass); - protected - procedure FinalizeInstance; override; - procedure InitializeInstance; override; - function IndexOf(APattern: TdxPSEdgePatternClass): Integer; - property InternalItems[Index: Integer; IsPrinting: Boolean]: TdxPSEdgePatternItem read GetInternalItem write SetInternalItem; - public - class function Instance: TdxPSEdgePatternFactory; reintroduce; overload; - procedure Register(APattern: TdxPSEdgePatternClass); - procedure Unregister(APattern: TdxPSEdgePatternClass); - - procedure ResetPrintItems; - - property Count: Integer read GetCount; - property Items[Pattern: TdxPSEdgePatternClass; IsPrinting: Boolean]: TdxPSEdgePatternItem read GetItem; default; - property Patterns[Index: Integer]: TdxPSEdgePatternClass read GetPattern; - end; - -function dxPSEdgePatternFactory: TdxPSEdgePatternFactory; - -implementation - -uses - SysUtils, Forms, cxClasses, dxPSRes, dxPrnDev, dxPSUtl; - -function dxPSEdgePatternFactory: TdxPSEdgePatternFactory; -begin - Result := TdxPSEdgePatternFactory.Instance; -end; - -{ TcxPSEdgePattern } - -class procedure TdxPSEdgePattern.Register; -begin - inherited; - dxPSEdgePatternFactory.Register(Self); -end; - -class procedure TdxPSEdgePattern.Unregister; -begin - inherited; - dxPSEdgePatternFactory.Unregister(Self); -end; - -class function TdxPSEdgePattern.Bits(Index: Integer): DWORD; -begin - Result := 0; -end; - -class function TdxPSEdgePattern.Name: string; -begin - Result := ''; -end; - -class function TdxPSEdgePattern.RequiredBrushOrigin: Boolean; -begin - Result := True; -end; - -class function TdxPSEdgePattern.RequiredScaling: Boolean; -begin - Result := True; -end; - -class function TdxPSEdgePattern.SignificantBitCount: Integer; -begin - Result := 0; -end; - -class function TdxPSEdgePattern.Solid: Boolean; -begin - Result := False; -end; - -class function TdxPSEdgePattern.Thickness: Integer; -begin - Result := 0; -end; - -{ TdxPSSolidEdgePattern } - -class function TdxPSSolidEdgePattern.Bits(Index: Integer): DWORD; -begin - Result := $FFFFFFFF; -end; - -class function TdxPSSolidEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxSolidEdgePattern); -end; - -class function TdxPSSolidEdgePattern.RequiredBrushOrigin: Boolean; -begin - Result := False; -end; - -class function TdxPSSolidEdgePattern.RequiredScaling: Boolean; -begin - Result := False; -end; - -class function TdxPSSolidEdgePattern.SignificantBitCount: Integer; -begin - Result := 8; -end; - -class function TdxPSSolidEdgePattern.Solid: Boolean; -begin - Result := True; -end; - -class function TdxPSSolidEdgePattern.Thickness: Integer; -begin - Result := 1; -end; - -{ TdxPSEdgePatternItem } - -constructor TdxPSEdgePatternItem.Create(APattern: TdxPSEdgePatternClass; AIsPrinting: Boolean); -begin - inherited Create; - FBitmaps[cepoHorizontal] := TBitmap.Create; - FBitmaps[cepoVertical] := TBitmap.Create; - FBrushes[cepoHorizontal] := TBrush.Create; - FBrushes[cepoVertical] := TBrush.Create; - Initialize(APattern, AIsPrinting); -end; - -destructor TdxPSEdgePatternItem.Destroy; -begin - FBrushes[cepoVertical].Free; - FBrushes[cepoHorizontal].Free; - FBitmaps[cepoVertical].Free; - FBitmaps[cepoHorizontal].Free; - inherited Destroy; -end; - -procedure TdxPSEdgePatternItem.Initialize(APattern: TdxPSEdgePatternClass; AIsPrinting: Boolean); - - procedure ScaleBitmap(ABitmap: TBitmap); - var - H, W, Numerator, Denominator: Integer; - TempBitmap: TBitmap; - begin - H := ABitmap.Height; - W := ABitmap.Width; - Numerator := GetDeviceCaps(dxPrintDevice.Handle, LOGPIXELSY); - Denominator := Screen.PixelsPerInch; - TempBitmap := TBitmap.Create; - try - TempBitmap.HandleType := bmDIB; - TempBitmap.Assign(ABitmap); - ABitmap.Height := H * Numerator div Denominator; - ABitmap.Height := ABitmap.Height - ABitmap.Height mod H; - ABitmap.Width := W * Numerator div Denominator; - ABitmap.Width := ABitmap.Width - ABitmap.Width mod W; - ABitmap.Canvas.StretchDraw(MakeRect(0, 0, ABitmap.Width, ABitmap.Height), TempBitmap); - finally - TempBitmap.Free; - end; - end; - - procedure InitializeOrientation(AOrientation: TdxPSCellEdgePatternOrientation); - const - Colors: array[Boolean] of TColor = (clWhite, clBlack); - var - Size, I, J: Integer; - Color: TColor; - begin - Size := APattern.SignificantBitCount; - with FBitmaps[AOrientation] do - begin - Width := Size; - Height := Size; - Monochrome := True; - HandleType := bmDIB; - for I := 0 to Size - 1 do - for J := 0 to Size - 1 do - begin - Color := Colors[APattern.Bits(Ord(Odd(J))) and (1 shl I) <> 0]; - if AOrientation = cepoVertical then - Canvas.Pixels[J, I] := Color - else - Canvas.Pixels[I, J] := Color; - end; - end; - - if AIsPrinting and APattern.RequiredScaling then - ScaleBitmap(FBitmaps[AOrientation]); - FBrushes[AOrientation].Bitmap := FBitmaps[AOrientation]; - end; - -begin - InitializeOrientation(cepoHorizontal); - InitializeOrientation(cepoVertical); -end; - -function TdxPSEdgePatternItem.GetBitmap(Orientation: TdxPSCellEdgePatternOrientation): TBitmap; -begin - Result := FBitmaps[Orientation]; -end; - -function TdxPSEdgePatternItem.GetBrush(Orientation: TdxPSCellEdgePatternOrientation): TBrush; -begin - Result := FBrushes[Orientation]; -end; - -{ TdxPSEdgePatternFactory } - -class function TdxPSEdgePatternFactory.Instance: TdxPSEdgePatternFactory; -begin - Result := inherited Instance as TdxPSEdgePatternFactory; -end; - -procedure TdxPSEdgePatternFactory.Register(APattern: TdxPSEdgePatternClass); -begin - if IndexOf(APattern) = -1 then AddPattern(APattern); -end; - -procedure TdxPSEdgePatternFactory.Unregister(APattern: TdxPSEdgePatternClass); -begin - RemovePattern(APattern); -end; - -procedure TdxPSEdgePatternFactory.ResetPrintItems; -var - I: Integer; -begin - for I := 0 to FPrintItems.Count - 1 do - begin - TObject(FPrintItems[I]).Free; - FPrintItems[I] := nil; - end; -end; - -procedure TdxPSEdgePatternFactory.FinalizeInstance; - - procedure FreeObjectList(AList: TList); - var - I: Integer; - begin - for I := 0 to AList.Count - 1 do - TObject(AList[I]).Free; - AList.Free; - end; - -begin - FreeObjectList(FItems); - FreeObjectList(FPrintItems); - FreeAndNil(FPatterns); - inherited; -end; - -procedure TdxPSEdgePatternFactory.InitializeInstance; -begin - inherited; - FItems := TList.Create; - FPatterns := TdxClassList.Create; - FPrintItems := TList.Create; -end; - -function TdxPSEdgePatternFactory.IndexOf(APattern: TdxPSEdgePatternClass): Integer; -begin - Result := FPatterns.IndexOf(APattern); -end; - -function TdxPSEdgePatternFactory.GetCount: Integer; -begin - Result := FPatterns.Count; -end; - -function TdxPSEdgePatternFactory.GetInternalItem(Index: Integer; - IsPrinting: Boolean): TdxPSEdgePatternItem; -begin - if IsPrinting then - Result := TdxPSEdgePatternItem(FPrintItems[Index]) - else - Result := TdxPSEdgePatternItem(FItems[Index]); -end; - -function TdxPSEdgePatternFactory.GetItem(Pattern: TdxPSEdgePatternClass; - IsPrinting: Boolean): TdxPSEdgePatternItem; -var - Index: Integer; -begin - if Pattern <> nil then - begin - Index := IndexOf(Pattern); - if Index = -1 then - raise EdxException.CreateFmt(cxGetResourceString(@sdxPatternIsNotRegistered), [Pattern.ClassName]); - if InternalItems[Index, IsPrinting] = nil then - InternalItems[Index, IsPrinting] := TdxPSEdgePatternItem.Create(Pattern, IsPrinting); - Result := InternalItems[Index, IsPrinting]; - end - else - Result := nil; -end; - -function TdxPSEdgePatternFactory.GetPattern(Index: Integer): TdxPSEdgePatternClass; -begin - Result := TdxPSEdgePatternClass(FPatterns[Index]); -end; - -procedure TdxPSEdgePatternFactory.SetInternalItem(Index: Integer; IsPrinting: Boolean; - Value: TdxPSEdgePatternItem); -begin - if IsPrinting then - FPrintItems[Index] := Value - else - FItems[Index] := Value; -end; - -procedure TdxPSEdgePatternFactory.AddPattern(APattern: TdxPSEdgePatternClass); -begin - FPatterns.Add(APattern); - FItems.Add(nil); - FPrintItems.Add(nil); -end; - -procedure TdxPSEdgePatternFactory.RemovePattern(APattern: TdxPSEdgePatternClass); -begin - if HasItem(APattern) then RemovePatternItem(APattern); - if HasPrintItem(APattern) then RemovePatternPrintItem(APattern); - FPatterns.Remove(APattern) -end; - -function TdxPSEdgePatternFactory.HasItem(APattern: TdxPSEdgePatternClass): Boolean; -begin - Result := InternalItems[IndexOf(APattern), False] <> nil; -end; - -function TdxPSEdgePatternFactory.HasPrintItem(APattern: TdxPSEdgePatternClass): Boolean; -begin - Result := InternalItems[IndexOf(APattern), True] <> nil; -end; - -procedure TdxPSEdgePatternFactory.RemovePatternItem(APattern: TdxPSEdgePatternClass); -var - Item: TdxPSEdgePatternItem; -begin - Item := Items[APattern, False]; - FItems.Remove(Item); - Item.Free; -end; - -procedure TdxPSEdgePatternFactory.RemovePatternPrintItem(APattern: TdxPSEdgePatternClass); -var - Item: TdxPSEdgePatternItem; -begin - Item := Items[APattern, True]; - FPrintItems.Remove(Item); - Item.Free; -end; - -initialization - TdxPSSolidEdgePattern.Register; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSEngn.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSEngn.pas deleted file mode 100644 index f3b20edd..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSEngn.pas +++ /dev/null @@ -1,321 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire coVisntents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSEngn; - -interface - -{$I cxVer.inc} - -uses - dxPSESys, Classes, Graphics, SysUtils, dxPSGlbl, dxPSSngltn; - -type - TdxPSEngine = class(TBasedxPSSingleton) - private - FDesignTimeRegistryPath: string; - FHelpFile: string; - FInitialDir: string; - FLookAndFeel: TdxPSLookAndFeel; - FRegistryPath: string; - FSaveFormsPosition: Boolean; - FUseNativeLookAndFeel: Boolean; - function GetAppName: string; - function GetRealRegistryPath: string; - function GetThemesEnabled: Boolean; - protected - procedure InitializeInstance; override; - public - class function Instance: TdxPSEngine; reintroduce; overload; - property AppName: string read GetAppName; - property DesignTimeRegistryPath: string read FDesignTimeRegistryPath; - property HelpFile: string read FHelpFile write FHelpFile; - property InitialDir: string read FInitialDir write FInitialDir; - property LookAndFeel: TdxPSLookAndFeel read FLookAndFeel write FLookAndFeel; - property RealRegistryPath: string read GetRealRegistryPath; - property RegistryPath: string read FRegistryPath write FRegistryPath; - property SaveFormsPosition: Boolean read FSaveFormsPosition write FSaveFormsPosition; - property ThemesEnabled: Boolean read GetThemesEnabled; - property UseNativeLookAndFeel: Boolean read FUseNativeLookAndFeel write FUseNativeLookAndFeel; - end; - - TdxPSEngineController = class(TComponent) - private - FHelpFile: string; - FLookAndFeel: TdxPSLookAndFeel; - FRegistryPath: string; - FSaveFormsPosition: Boolean; - FUseNativeLookAndFeel: Boolean; - procedure SetHelpFile(const Value: string); - procedure SetLookAndFeel(Value: TdxPSLookAndFeel); - procedure SetRegistryPath(const Value: string); - procedure SetSaveFormsPosition(Value: Boolean); - procedure SetUseNativeLookAndFeel(Value: Boolean); - function IsCurrent: Boolean; - function IsDesigning: Boolean; - protected - procedure Loaded; override; - procedure InitializeEngine; virtual; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Activate; - published - property HelpFile: string read FHelpFile write SetHelpFile; - property LookAndFeel: TdxPSLookAndFeel read FLookAndFeel write SetLookAndFeel default pslfStandard; - property RegistryPath: string read FRegistryPath write SetRegistryPath; - property SaveFormsPosition: Boolean read FSaveFormsPosition write SetSaveFormsPosition default True; - property UseNativeLookAndFeel: Boolean read FUseNativeLookAndFeel write SetUseNativeLookAndFeel default True; - end; - -function dxPSEngine: TdxPSEngine; - -implementation - -uses - Forms, {$IFDEF DELPHI7} Themes, {$ENDIF} dxPSRes, dxPSUtl; - -function dxPSEngine: TdxPSEngine; -begin - Result := TdxPSEngine.Instance; -end; - -{ TdxPSEngine } - -class function TdxPSEngine.Instance: TdxPSEngine; -begin - Result := inherited Instance as TdxPSEngine; -end; - -procedure TdxPSEngine.InitializeInstance; -begin - inherited; - FDesignTimeRegistryPath := dxPSGlbl.sdxPSRegPathDesignTime; - FSaveFormsPosition := True; - if IsDesignTime then - LookAndFeel := pslfFlat; - FUseNativeLookAndFeel := True; -end; - -function TdxPSEngine.GetAppName: string; -begin - Result := ChangeFileExt(ExtractFileName(Application.ExeName), ''); -end; - -function TdxPSEngine.GetRealRegistryPath: string; -begin - if IsDesignTime then - Result := DesignTimeRegistryPath - else - Result := RegistryPath; -end; - -function TdxPSEngine.GetThemesEnabled: Boolean; -begin - {$IFDEF DELPHI7} - Result := ThemeServices.ThemesEnabled; - {$ELSE} - Result := False; - {$ENDIF} -end; - -{ TdxPSEngineControllerList } - -type - TdxPSEngineControllerList = class - private - FItems: TList; - function GetCount: Integer; - function GetActiveController: TdxPSEngineController; - procedure SetActiveController(Value: TdxPSEngineController); - public - destructor Destroy; override; - - procedure Add(Value: TdxPSEngineController); - function IndexOf(Value: TdxPSEngineController): Integer; - procedure Remove(Value: TdxPSEngineController); - - property ActiveController: TdxPSEngineController read GetActiveController write SetActiveController; - property Count: Integer read GetCount; - end; - -const - FEngineControllerList: TdxPSEngineControllerList = nil; - -function dxPSEngineControllerList: TdxPSEngineControllerList; -begin - if FEngineControllerList = nil then - FEngineControllerList := TdxPSEngineControllerList.Create; - Result := FEngineControllerList; -end; - -destructor TdxPSEngineControllerList.Destroy; -begin - FreeAndNil(FItems); - inherited; -end; - -procedure TdxPSEngineControllerList.Add(Value: TdxPSEngineController); -begin - if FItems = nil then FItems := TList.Create; - FItems.Add(Value); -end; - -function TdxPSEngineControllerList.IndexOf(Value: TdxPSEngineController): Integer; -begin - if FItems <> nil then - Result := FItems.IndexOf(Value) - else - Result := -1 -end; - -procedure TdxPSEngineControllerList.Remove(Value: TdxPSEngineController); -begin - if IndexOf(Value) > -1 then - begin - FItems.Remove(Value); - if Count = 0 then FreeAndNil(FItems); - end; -end; - -function TdxPSEngineControllerList.GetActiveController: TdxPSEngineController; -begin - if FItems <> nil then - Result := TdxPSEngineController(FItems[Count - 1]) - else - Result := nil; -end; - -function TdxPSEngineControllerList.GetCount: Integer; -begin - if FItems <> nil then - Result := FItems.Count - else - Result := 0; -end; - -procedure TdxPSEngineControllerList.SetActiveController(Value: TdxPSEngineController); -begin - if (FItems <> nil) and (IndexOf(Value) < Count - 1) then - begin - FItems.Remove(Value); - FItems.Add(Value); - end; -end; - -{ TdxPSEngineController } - -constructor TdxPSEngineController.Create(AOwner: TComponent); -begin - inherited; - FSaveFormsPosition := True; - FUseNativeLookAndFeel := True; - dxPSEngineControllerList.Add(Self); -end; - -destructor TdxPSEngineController.Destroy; -begin - dxPSEngineControllerList.Remove(Self); - inherited; -end; - -procedure TdxPSEngineController.Activate; -begin - dxPSEngineControllerList.ActiveController := Self; -end; - -function TdxPSEngineController.IsCurrent: Boolean; -begin - Result := dxPSEngineControllerList.ActiveController = Self; -end; - -function TdxPSEngineController.IsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -procedure TdxPSEngineController.Loaded; -begin - inherited; - if not IsDesigning and IsCurrent then InitializeEngine; -end; - -procedure TdxPSEngineController.InitializeEngine; -begin - dxPSEngine.HelpFile := HelpFile; - dxPSEngine.RegistryPath := RegistryPath; -end; - -procedure TdxPSEngineController.SetHelpFile(const Value: string); -begin - FHelpFile := Value; - if IsCurrent then - dxPSEngine.HelpFile := HelpFile; -end; - -procedure TdxPSEngineController.SetLookAndFeel(Value: TdxPSLookAndFeel); -begin - FLookAndFeel := Value; - if IsCurrent then - dxPSEngine.LookAndFeel := LookAndFeel; -end; - -procedure TdxPSEngineController.SetRegistryPath(const Value: string); -begin - FRegistryPath := Value; - if IsCurrent then - dxPSEngine.RegistryPath := RegistryPath; -end; - -procedure TdxPSEngineController.SetSaveFormsPosition(Value: Boolean); -begin - FSaveFormsPosition := Value; - if IsCurrent then - dxPSEngine.SaveFormsPosition := SaveFormsPosition; -end; - -procedure TdxPSEngineController.SetUseNativeLookAndFeel(Value: Boolean); -begin - FUseNativeLookAndFeel := Value; - if IsCurrent then - dxPSEngine.UseNativeLookAndFeel := UseNativeLookAndFeel; -end; - -initialization - -finalization - FreeAndNil(FEngineControllerList); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSEvnt.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSEvnt.pas deleted file mode 100644 index 4bd932cf..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSEvnt.pas +++ /dev/null @@ -1,350 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire coVisntents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSEvnt; - -interface - -{$I cxVer.inc} - -uses - Classes, dxPSESys, dxPrnPg, dxPgsDlg, dxPSCore; - -type - TdxSMPageParamsChangedEvent = class(TdxEvent) - private - FPrintStyle: TBasedxPrintStyle; - FUpdateCodes: TdxPrinterPageUpdateCodes; - public - constructor Create(ASender: TObject; APrintStyle: TBasedxPrintStyle; AUpdateCodes: TdxPrinterPageUpdateCodes); - property PrintStyle: TBasedxPrintStyle read FPrintStyle; - property UpdateCodes: TdxPrinterPageUpdateCodes read FUpdateCodes; - end; - - TdxSMStyleListChangedEvent = class(TdxEvent); - - TdxStyleListChangedSubscriber = class(TdxEventSubscriber) - private - FOnStyleListChanged: TNotifyEvent; - protected - procedure DoProcessEvent; override; - public - procedure StyleListChanged(Sender: TObject); dynamic; - property OnStyleListChanged: TNotifyEvent read FOnStyleListChanged write FOnStyleListChanged; - end; - - TdxPageParamsChangedSubscriber = class(TdxEventSubscriber) - private - FOnPageParamsChanged: TdxPageParamsChangedEvent; - protected - procedure DoProcessEvent; override; - public - procedure PageParamsChanged(Sender: TObject; AStyle: TBasedxPrintStyle; AUpdateCodes: TdxPrinterPageUpdateCodes); dynamic; - property OnPageParamsChanged: TdxPageParamsChangedEvent read FOnPageParamsChanged write FOnPageParamsChanged; - end; - - TdxComponentPrinterEvent = class(TdxEvent) - private - function GetComponentPrinter: TdxComponentPrinter; - public - property ComponentPrinter: TdxComponentPrinter read GetComponentPrinter; - end; - - TdxPSPrintEvent = class(TdxComponentPrinterEvent) - private - FPageCount: Integer; - FPageIndex: Integer; - FReportLink: TBasedxReportLink; - FStage: TdxPSPrintStage; - public - constructor Create(Sender: TObject; AReportLink: TBasedxReportLink; - APageIndex, APageCount: Integer; AStage: TdxPSPrintStage); - - property PageCount: Integer read FPageCount; - property PageIndex: Integer read FPageIndex; - property ReportLink: TBasedxReportLink read FReportLink; - property Stage: TdxPSPrintStage read FStage; - end; - - TdxPSBuildEvent = class(TdxComponentPrinterEvent) - private - FPercentCompleted: Double; - FReportLink: TBasedxReportLink; - FStage: TdxPSBuildStage; - public - constructor Create(Sender: TObject; AReportLink: TBasedxReportLink; - const APercentCompleted: Double; AStage: TdxPSBuildStage); - - property PercentCompleted: Double read FPercentCompleted; - property ReportLink: TBasedxReportLink read FReportLink; - property Stage: TdxPSBuildStage read FStage; - end; - - TdxPSPrintReportSubscriber = class(TdxEventSubscriber) - private - FOnEndPrint: TdxReportLinkNotifyEvent; - FOnProgressPrint: TdxNewPageEvent; - FOnStartPrint: TdxStartPrintEvent; - protected - procedure DoProcessEvent; override; - public - procedure EndPrint(Sender: TObject; AReportLink: TBasedxReportLink); dynamic; - procedure ProgressPrint(Sender: TObject; AReportLink: TBasedxReportLink; APageIndex: Integer); dynamic; - procedure StartPrint(Sender: TObject; AReportLink: TBasedxReportLink; APageCount: Integer); dynamic; - - property OnEndPrint: TdxReportLinkNotifyEvent read FOnEndPrint write FOnEndPrint; - property OnProgressPrint: TdxNewPageEvent read FOnProgressPrint write FOnProgressPrint; - property OnStartPrint: TdxStartPrintEvent read FOnStartPrint write FOnStartPrint; - end; - - TdxPSBuildReportSubscriber = class(TdxEventSubscriber) - private - FOnEndGenerateReport: TdxReportLinkNotifyEvent; - FOnGenerateReportProgress: TdxGenerateReportProgressEvent; - FOnStartGenerateReport: TdxReportLinkNotifyEvent; - protected - procedure DoProcessEvent; override; - public - procedure EndBuild(Sender: TObject; AReportLink: TBasedxReportLink); dynamic; - procedure ProgressBuild(Sender: TObject; AReportLink: TBasedxReportLink; APercentCompleted: Double); dynamic; - procedure StartBuild(Sender: TObject; AReportLink: TBasedxReportLink); dynamic; - - property OnEndGenerateReport: TdxReportLinkNotifyEvent read FOnEndGenerateReport write FOnEndGenerateReport; - property OnGenerateReportProgress: TdxGenerateReportProgressEvent read FOnGenerateReportProgress write FOnGenerateReportProgress; - property OnStartGenerateReport: TdxReportLinkNotifyEvent read FOnStartGenerateReport write FOnStartGenerateReport; - end; - - TdxHFTextEntriesChangedEvent = class(TdxEvent); - - TdxNoParamsEvent = procedure of object; - - TdxHFTextEntriesChangedSubscriber = class(TdxEventSubscriber) - private - FOnHFTextEntriesChanged: TdxNoParamsEvent; - protected - procedure DoProcessEvent; override; - public - property OnHFTextEntriesChanged: TdxNoParamsEvent read FOnHFTextEntriesChanged write FOnHFTextEntriesChanged; - end; - - TdxHFTextEntryChooseEvent = class(TdxEvent) - private - FEntry: string; - public - constructor Create(Sender: TObject; const AEntry: string); - property Entry: string read FEntry; - end; - - TdxHFTextEntryEvent = procedure(Sender: TObject; const AEntry: string) of object; - - TdxHFTextEntryChooseSubscriber = class(TdxEventSubscriber) - private - FOnHFTextEntryChoose: TdxHFTextEntryEvent; - protected - procedure DoProcessEvent; override; - public - property OnHFTextEntryChoose: TdxHFTextEntryEvent read FOnHFTextEntryChoose write FOnHFTextEntryChoose; - end; - -implementation - -{ TdxSMPageParamsChangedEvent } - -constructor TdxSMPageParamsChangedEvent.Create(ASender: TObject; - APrintStyle: TBasedxPrintStyle; AUpdateCodes: TdxPrinterPageUpdateCodes); -begin - inherited Create(ASender); - FPrintStyle := APrintStyle; - FUpdateCodes := AUpdateCodes; -end; - -{ TdxStyleListChangedSubscriber } - -procedure TdxStyleListChangedSubscriber.DoProcessEvent; -begin - if ActiveEvent is TdxSMStyleListChangedEvent then - StyleListChanged(ActiveEvent.Sender) -end; - -procedure TdxStyleListChangedSubscriber.StyleListChanged(Sender: TObject); -begin - if Assigned(FOnStyleListChanged) then FOnStyleListChanged(Sender); -end; - -{ TdxPageParamsChangedSubscriber } - -procedure TdxPageParamsChangedSubscriber.DoProcessEvent; -begin - if ActiveEvent is TdxSMPageParamsChangedEvent then - with TdxSMPageParamsChangedEvent(ActiveEvent) do - PageParamsChanged(PrintStyle.PrinterPage, PrintStyle, UpdateCodes); -end; - -procedure TdxPageParamsChangedSubscriber.PageParamsChanged(Sender: TObject; - AStyle: TBasedxPrintStyle; AUpdateCodes: TdxPrinterPageUpdateCodes); -begin - if Assigned(FOnPageParamsChanged) then - FOnPageParamsChanged(TdxPrinterPage(Sender), AStyle, AUpdateCodes); -end; - -{ TdxComponentPrinterEvent } - -function TdxComponentPrinterEvent.GetComponentPrinter: TdxComponentPrinter; -begin - Result := TdxComponentPrinter(Sender); -end; - -{ TdxPSPrintEvent } - -constructor TdxPSPrintEvent.Create(Sender: TObject; AReportLink: TBasedxReportLink; - APageIndex, APageCount: Integer; AStage: TdxPSPrintStage); -begin - inherited Create(Sender); - FReportLink := AReportLink; - FPageIndex := APageIndex; - FPageCount := APageCount; - FStage := AStage; -end; - -{ TdxPSBuildEvent } - -constructor TdxPSBuildEvent.Create(Sender: TObject; AReportLink: TBasedxReportLink; - const APercentCompleted: Double; AStage: TdxPSBuildStage); -begin - inherited Create(Sender); - FReportLink := AReportLink; - FPercentCompleted := APercentCompleted; - FStage := AStage; -end; - -{ TdxPSBuildReportSubscriber } - -procedure TdxPSBuildReportSubscriber.DoProcessEvent; -begin - if ActiveEvent is TdxPSBuildEvent then - with TdxPSBuildEvent(ActiveEvent) do - case Stage of - bsStart: - StartBuild(ComponentPrinter, ReportLink); - bsProgress: - ProgressBuild(ComponentPrinter, ReportLink, PercentCompleted); - bsEnd: - EndBuild(ComponentPrinter, ReportLink); - end; -end; - -procedure TdxPSBuildReportSubscriber.EndBuild(Sender: TObject; - AReportLink: TBasedxReportLink); -begin - if Assigned(FOnEndGenerateReport) then - FOnEndGenerateReport(Sender, AReportLink); -end; - -procedure TdxPSBuildReportSubscriber.ProgressBuild(Sender: TObject; - AReportLink: TBasedxReportLink; APercentCompleted: Double); -begin - if Assigned(FOnGenerateReportProgress) then - FOnGenerateReportProgress(Sender, AReportLink, APercentCompleted); -end; - -procedure TdxPSBuildReportSubscriber.StartBuild(Sender: TObject; - AReportLink: TBasedxReportLink); -begin - if Assigned(FOnStartGenerateReport) then - FOnStartGenerateReport(Sender, AReportLink); -end; - -{ TdxPSPrintReportSubscriber } - -procedure TdxPSPrintReportSubscriber.DoProcessEvent; -begin - if ActiveEvent is TdxPSPrintEvent then - with TdxPSPrintEvent(ActiveEvent) do - case Stage of - psStart: - StartPrint(ComponentPrinter, ReportLink, PageCount); - psProgress: - ProgressPrint(ComponentPrinter, ReportLink, PageIndex); - psEnd: - EndPrint(ComponentPrinter, ReportLink); - end; -end; - -procedure TdxPSPrintReportSubscriber.EndPrint(Sender: TObject; - AReportLink: TBasedxReportLink); -begin - if Assigned(FOnEndPrint) then FOnEndPrint(Sender, AReportLink); -end; - -procedure TdxPSPrintReportSubscriber.ProgressPrint(Sender: TObject; - AReportLink: TBasedxReportLink; APageIndex: Integer); -begin - if Assigned(FOnProgressPrint) then - FOnProgressPrint(Sender, AReportLink, APageIndex); -end; - -procedure TdxPSPrintReportSubscriber.StartPrint(Sender: TObject; - AReportLink: TBasedxReportLink; APageCount: Integer); -begin - if Assigned(FOnStartPrint) then - FOnStartPrint(Sender, AReportLink, APageCount); -end; - -{ TdxHFTextEntriesChangedSubscriber } - -procedure TdxHFTextEntriesChangedSubscriber.DoProcessEvent; -begin - if ActiveEvent is TdxHFTextEntriesChangedEvent then - if Assigned(FOnHFTextEntriesChanged) then FOnHFTextEntriesChanged; -end; - -{ TdxHFTextEntryChooseEvent } - -constructor TdxHFTextEntryChooseEvent.Create(Sender: TObject; const AEntry: string); -begin - inherited Create(Sender); - FEntry := AEntry; -end; - -{ TdxHFTextEntryChooseSubscriber } - -procedure TdxHFTextEntryChooseSubscriber.DoProcessEvent; -begin - if ActiveEvent is TdxHFTextEntryChooseEvent then - if Assigned(FOnHFTextEntryChoose) then - FOnHFTextEntryChoose(ActiveEvent.Sender, TdxHFTextEntryChooseEvent(ActiveEvent).Entry); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSExcelEdgePatterns.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSExcelEdgePatterns.pas deleted file mode 100644 index d255efbb..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSExcelEdgePatterns.pas +++ /dev/null @@ -1,428 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSExcelEdgePatterns; - -interface - -{$I cxVer.inc} - -uses - {$IFDEF DELPHI6} Types,{$ENDIF} Windows, dxPSCore, dxPSEdgePatterns; - -type - TdxPSMediumSolidEdgePattern = class(TdxPSSolidEdgePattern) - public - class function Name: string; override; - class function Thickness: Integer; override; - end; - - TdxPSThickSolidEdgePattern = class(TdxPSSolidEdgePattern) - public - class function Name: string; override; - class function Thickness: Integer; override; - end; - - TdxPSDottedEdgePattern = class(TdxPSEdgePattern) - public - class function Bits(Index: Integer): DWORD; override; - class function Name: string; override; - class function SignificantBitCount: Integer; override; - class function Thickness: Integer; override; - end; - - TdxPSDashedEdgePattern = class(TdxPSEdgePattern) - public - class function Bits(Index: Integer): DWORD; override; - class function Name: string; override; - class function SignificantBitCount: Integer; override; - class function Thickness: Integer; override; - end; - - TdxPSDashDotDotEdgePattern = class(TdxPSEdgePattern) - public - class function Bits(Index: Integer): DWORD; override; - class function Name: string; override; - class function SignificantBitCount: Integer; override; - class function Thickness: Integer; override; - end; - - TdxPSDashDotEdgePattern = class(TdxPSEdgePattern) - public - class function Bits(Index: Integer): DWORD; override; - class function Name: string; override; - class function SignificantBitCount: Integer; override; - class function Thickness: Integer; override; - end; - - TdxPSSlantedDashDotEdgePattern = class(TdxPSEdgePattern) - public - class function Bits(Index: Integer): DWORD; override; - class function Name: string; override; - class function SignificantBitCount: Integer; override; - class function Thickness: Integer; override; - end; - - TdxPSMediumDashDotDotEdgePattern = class(TdxPSEdgePattern) - public - class function Bits(Index: Integer): DWORD; override; - class function Name: string; override; - class function SignificantBitCount: Integer; override; - class function Thickness: Integer; override; - end; - - TdxPSHairEdgePattern = class(TdxPSEdgePattern) - public - class function Bits(Index: Integer): DWORD; override; - class function Name: string; override; - class function SignificantBitCount: Integer; override; - class function Thickness: Integer; override; - end; - - TdxPSMediumDashDotEdgePattern = class(TdxPSEdgePattern) - public - class function Bits(Index: Integer): DWORD; override; - class function Name: string; override; - class function SignificantBitCount: Integer; override; - class function Thickness: Integer; override; - end; - - TdxPSMediumDashedEdgePattern = class(TdxPSEdgePattern) - public - class function Bits(Index: Integer): DWORD; override; - class function Name: string; override; - class function SignificantBitCount: Integer; override; - class function Thickness: Integer; override; - end; - - TdxPSDoubleLineSolidEdgePattern = class(TdxPSEdgePattern) - public - class function Bits(Index: Integer): DWORD; override; - class function Name: string; override; - class function SignificantBitCount: Integer; override; - class function Thickness: Integer; override; - end; - -implementation - -uses - cxClasses, dxPSRes; - -{ TdxPSMediumSolidEdgePattern } - -class function TdxPSMediumSolidEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxMediumSolidEdgePattern); -end; - -class function TdxPSMediumSolidEdgePattern.Thickness: Integer; -begin - Result := 2; -end; - -{ TdxPSThickSolidEdgePattern } - -class function TdxPSThickSolidEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxThickSolidEdgePattern); -end; - -class function TdxPSThickSolidEdgePattern.Thickness: Integer; -begin - Result := 3; -end; - -{ TdxPSDottedEdgePattern } - -class function TdxPSDottedEdgePattern.Bits(Index: Integer): DWORD; -begin - Result := $EEEEEEEE; -end; - -class function TdxPSDottedEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxSlantedDashDotEdgePattern); -end; - -class function TdxPSDottedEdgePattern.SignificantBitCount: Integer; -begin - Result := 8; -end; - -class function TdxPSDottedEdgePattern.Thickness: Integer; -begin - Result := 1; -end; - -{ TdxPSDashedEdgePattern } - -class function TdxPSDashedEdgePattern.Bits(Index: Integer): DWORD; -begin - Result := $33333333; -end; - -class function TdxPSDashedEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxDashedEdgePattern); -end; - -class function TdxPSDashedEdgePattern.SignificantBitCount: Integer; -begin - Result := 8; -end; - -class function TdxPSDashedEdgePattern.Thickness: Integer; -begin - Result := 1; -end; - -{ TdxPSDashDotDotEdgePattern } - -class function TdxPSDashDotDotEdgePattern.Bits(Index: Integer): DWORD; -begin - Result := $FF1C7FC7; -end; - -class function TdxPSDashDotDotEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxDashDotDotEdgePattern); -end; - -class function TdxPSDashDotDotEdgePattern.SignificantBitCount: Integer; -begin - Result := 24; -end; - -class function TdxPSDashDotDotEdgePattern.Thickness: Integer; -begin - Result := 1; -end; - -{ TdxPSDashDotEdgePattern } - -class function TdxPSDashDotEdgePattern.Bits(Index: Integer): DWORD; -begin - Result := $FFFC7FC7; -end; - -class function TdxPSDashDotEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxDashDotEdgePattern); -end; - -class function TdxPSDashDotEdgePattern.SignificantBitCount: Integer; -begin - Result := 18; -end; - -class function TdxPSDashDotEdgePattern.Thickness: Integer; -begin - Result := 1; -end; - -{ TdxPSSlantedDashDotEdgePattern } - -class function TdxPSSlantedDashDotEdgePattern.Bits(Index: Integer): DWORD; -begin - if Index = 0 then - Result := $FFFFEFFE - else - Result := $FFFCF3FF; -end; - -class function TdxPSSlantedDashDotEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxHairEdgePattern); -end; - -class function TdxPSSlantedDashDotEdgePattern.SignificantBitCount: Integer; -begin - Result := 18; -end; - -class function TdxPSSlantedDashDotEdgePattern.Thickness: Integer; -begin - Result := 2; -end; - -{ TdxPSMediumDashDotDotEdgePattern } - -class function TdxPSMediumDashDotDotEdgePattern.Bits(Index: Integer): DWORD; -begin - Result := $FF1C7FC7; -end; - -class function TdxPSMediumDashDotDotEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxMediumDashDotDotEdgePattern); -end; - -class function TdxPSMediumDashDotDotEdgePattern.SignificantBitCount: Integer; -begin - Result := 24; -end; - -class function TdxPSMediumDashDotDotEdgePattern.Thickness: Integer; -begin - Result := 2; -end; - -{ TdxPSHairEdgePattern } - -class function TdxPSHairEdgePattern.Bits(Index: Integer): DWORD; -begin - Result := $55555555; -end; - -class function TdxPSHairEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxDottedEdgePattern); -end; - -class function TdxPSHairEdgePattern.SignificantBitCount: Integer; -begin - Result := 8; -end; - -class function TdxPSHairEdgePattern.Thickness: Integer; -begin - Result := 1; -end; - -{ TdxPSMediumDashDotEdgePattern } - -class function TdxPSMediumDashDotEdgePattern.Bits(Index: Integer): DWORD; -begin - Result := $FFFC71FF; -end; - -class function TdxPSMediumDashDotEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxMediumDashDotEdgePattern); -end; - -class function TdxPSMediumDashDotEdgePattern.SignificantBitCount: Integer; -begin - Result := 18; -end; - -class function TdxPSMediumDashDotEdgePattern.Thickness: Integer; -begin - Result := 2; -end; - -{ TdxPSMediumDashedEdgePattern } - -class function TdxPSMediumDashedEdgePattern.Bits(Index: Integer): DWORD; -begin - Result := $FFFFF1FF; -end; - -class function TdxPSMediumDashedEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxMediumDashedEdgePattern); -end; - -class function TdxPSMediumDashedEdgePattern.SignificantBitCount: Integer; -begin - Result := 12; -end; - -class function TdxPSMediumDashedEdgePattern.Thickness: Integer; -begin - Result := 2; -end; - -{ TdxPSDoubleLineSolidEdgePattern } - -class function TdxPSDoubleLineSolidEdgePattern.Bits(Index: Integer): DWORD; -begin - Result := $FFFFFFFF * DWORD(Ord(not Odd(Index))); -end; - -class function TdxPSDoubleLineSolidEdgePattern.Name: string; -begin - Result := cxGetResourceString(@sdxDoubleLineEdgePattern); -end; - -class function TdxPSDoubleLineSolidEdgePattern.SignificantBitCount: Integer; -begin - Result := 8; -end; - -class function TdxPSDoubleLineSolidEdgePattern.Thickness: Integer; -begin - Result := 3; -end; - -procedure RegisterPatterns; -begin - TdxPSMediumSolidEdgePattern.Register; - TdxPSThickSolidEdgePattern.Register; - TdxPSDottedEdgePattern.Register; - TdxPSDashedEdgePattern.Register; - TdxPSDashDotDotEdgePattern.Register; - TdxPSDashDotEdgePattern.Register; - TdxPSSlantedDashDotEdgePattern.Register; - TdxPSMediumDashDotDotEdgePattern.Register; - TdxPSHairEdgePattern.Register; - TdxPSMediumDashDotEdgePattern.Register; - TdxPSMediumDashedEdgePattern.Register; - TdxPSDoubleLineSolidEdgePattern.Register; -end; - -procedure UnregisterPatterns; -begin - TdxPSDoubleLineSolidEdgePattern.Unregister; - TdxPSMediumDashedEdgePattern.Unregister; - TdxPSMediumDashDotEdgePattern.Unregister; - TdxPSHairEdgePattern.Unregister; - TdxPSMediumDashDotDotEdgePattern.Unregister; - TdxPSSlantedDashDotEdgePattern.Unregister; - TdxPSDashDotEdgePattern.Unregister; - TdxPSDashDotDotEdgePattern.Unregister; - TdxPSDashedEdgePattern.Unregister; - TdxPSDottedEdgePattern.Unregister; - TdxPSThickSolidEdgePattern.Unregister; - TdxPSMediumSolidEdgePattern.Unregister; -end; - -initialization - RegisterPatterns; - -finalization - UnregisterPatterns; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSExcelFillPatterns.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSExcelFillPatterns.pas deleted file mode 100644 index b500e5e3..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSExcelFillPatterns.pas +++ /dev/null @@ -1,423 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSExcelFillPatterns; - -interface - -{$I cxVer.inc} - -uses - dxPSFillPatterns; - -type - { TdxPSSolidFillPattern, TdxPSGray50FillPattern are standard fill patterns. - They are in dxPSFillPatterns.pas } - - TdxPSGray75FillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSGray25FillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSGray125FillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSGray625FillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSHorizontalStripeFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSVerticalStripeFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSReverseDiagonalStripeFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSDiagonalStripeFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSDiagonalCrossHatchFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSThickCrossHatchFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSThinHorizontalStripeFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSThinVerticalStripeFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSThinReverseDiagonalStripeFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSThinDiagonalStripeFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSThinHorizontalCrossHatchFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSThinDiagonalCrossHatchFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - -implementation - -uses - cxClasses, dxPSRes; - -{ TdxPSGray75FillPattern } - -class procedure TdxPSGray75FillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($1111, $4444, $1111, $4444, $1111, $4444, $1111, $4444); -begin - APattern := Bits; -end; - -class function TdxPSGray75FillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxGray75FillPattern); -end; - -{ TdxPSGray25FillPattern } - -class procedure TdxPSGray25FillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($EEEE, $BBBB, $EEEE, $BBBB, $EEEE, $BBBB, $EEEE, $BBBB); -begin - APattern := Bits; -end; - -class function TdxPSGray25FillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxGray25FillPattern); -end; - -{ TdxPSGray125FillPattern } - -class procedure TdxPSGray125FillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($FFFF, $EEEE, $FFFF, $BBBB, $FFFF, $EEEE, $FFFF, $BBBB); -begin - APattern := Bits; -end; - -class function TdxPSGray125FillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxGray125FillPattern); -end; - -{ TdxPSGray625FillPattern } - -class procedure TdxPSGray625FillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($FFFF, $FBFB, $FFFF, $BFBF, $FFFF, $FBFB, $FFFF, $BFBF); -begin - APattern := Bits; -end; - -class function TdxPSGray625FillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxGray625FillPattern); -end; - -{ TdxPSHorizontalStripeFillPattern } - -class procedure TdxPSHorizontalStripeFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($0000, $0000, $FFFF, $FFFF, $0000, $0000, $FFFF, $FFFF); -begin - APattern := Bits; -end; - -class function TdxPSHorizontalStripeFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxHorizontalStripeFillPattern); -end; - -{ TdxPSVerticalStripeFillPattern } - -class procedure TdxPSVerticalStripeFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($9999, $9999, $9999, $9999, $9999, $9999, $9999, $9999); -begin - APattern := Bits; -end; - -class function TdxPSVerticalStripeFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxVerticalStripeFillPattern); -end; - -{ TdxPSReverseDiagonalStripeFillPattern } - -class procedure TdxPSReverseDiagonalStripeFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($CCCC, $6666, $3333, $9999, $CCCC, $6666, $3333, $9999); -begin - APattern := Bits; -end; - -class function TdxPSReverseDiagonalStripeFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxReverseDiagonalStripeFillPattern); -end; - -{ TdxPSDiagonalStripeFillPattern } - -class procedure TdxPSDiagonalStripeFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($CCCC, $9999, $3333, $6666, $CCCC, $9999, $3333, $6666); -begin - APattern := Bits; -end; - -class function TdxPSDiagonalStripeFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxDiagonalStripeFillPattern); -end; - -{ TdxPSDiagonalCrossHatchFillPattern } - -class procedure TdxPSDiagonalCrossHatchFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($CCCC, $CCCC, $3333, $3333, $CCCC, $CCCC, $3333, $3333); -begin - APattern := Bits; -end; - -class function TdxPSDiagonalCrossHatchFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxDiagonalCrossHatchFillPattern); -end; - -{ TdxPSThickCrossHatchFillPattern } - -class procedure TdxPSThickCrossHatchFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($CCCC, $0000, $3333, $0000, $CCCC, $0000, $3333, $0000); -begin - APattern := Bits; -end; - -class function TdxPSThickCrossHatchFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxThickCrossHatchFillPattern); -end; - -{ TdxPSThinHorizontalStripeFillPattern } - -class procedure TdxPSThinHorizontalStripeFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($0000, $FFFF, $FFFF, $FFFF, $0000, $FFFF, $FFFF, $FFFF); -begin - APattern := Bits; -end; - -class function TdxPSThinHorizontalStripeFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxThinHorizontalStripeFillPattern); -end; - -{ TdxPSThinVerticalStripeFillPattern } - -class procedure TdxPSThinVerticalStripeFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($BBBB, $BBBB, $BBBB, $BBBB, $BBBB, $BBBB, $BBBB, $BBBB); -begin - APattern := Bits; -end; - -class function TdxPSThinVerticalStripeFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxThinVerticalStripeFillPattern); -end; - -{ TdxPSThinReverseDiagonalStripeFillPattern } - -class procedure TdxPSThinReverseDiagonalStripeFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($DDDD, $EEEE, $7777, $BBBB, $DDDD, $EEEE, $7777, $BBBB); -begin - APattern := Bits; -end; - -class function TdxPSThinReverseDiagonalStripeFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxThinReverseDiagonalStripeFillPattern); -end; - -{ TdxPSThinDiagonalStripeFillPattern } - -class procedure TdxPSThinDiagonalStripeFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($EEEE, $DDDD, $BBBB, $7777, $EEEE, $DDDD, $BBBB, $7777); -begin - APattern := Bits; -end; - -class function TdxPSThinDiagonalStripeFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxThinDiagonalStripeFillPattern); -end; - -{ TdxPSThinHorizontalCrossHatchFillPattern } - -class procedure TdxPSThinHorizontalCrossHatchFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($0000, $BBBB, $BBBB, $BBBB, $0000, $BBBB, $BBBB, $BBBB); -begin - APattern := Bits; -end; - -class function TdxPSThinHorizontalCrossHatchFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxThinHorizontalCrossHatchFillPattern); -end; - -{ TdxPSThinDiagonalCrossHatchFillPattern } - -class procedure TdxPSThinDiagonalCrossHatchFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($BBBB, $5555, $EEEE, $5555, $BBBB, $5555, $EEEE, $5555); -begin - APattern := Bits; -end; - -class function TdxPSThinDiagonalCrossHatchFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxThinDiagonalCrossHatchFillPattern); -end; - -procedure RegisterPatterns; -begin - TdxPSGray75FillPattern.Register; - TdxPSGray25FillPattern.Register; - TdxPSGray125FillPattern.Register; - TdxPSGray625FillPattern.Register; - TdxPSHorizontalStripeFillPattern.Register; - TdxPSVerticalStripeFillPattern.Register; - TdxPSReverseDiagonalStripeFillPattern.Register; - TdxPSDiagonalStripeFillPattern.Register; - TdxPSDiagonalCrossHatchFillPattern.Register; - TdxPSThickCrossHatchFillPattern.Register; - TdxPSThinHorizontalStripeFillPattern.Register; - TdxPSThinVerticalStripeFillPattern.Register; - TdxPSThinReverseDiagonalStripeFillPattern.Register; - TdxPSThinDiagonalStripeFillPattern.Register; - TdxPSThinHorizontalCrossHatchFillPattern.Register; - TdxPSThinDiagonalCrossHatchFillPattern.Register; -end; - -procedure UnregisterPatterns; -begin - TdxPSThinDiagonalCrossHatchFillPattern.Unregister; - TdxPSThinHorizontalCrossHatchFillPattern.Unregister; - TdxPSThinDiagonalStripeFillPattern.Unregister; - TdxPSThinReverseDiagonalStripeFillPattern.Unregister; - TdxPSThinVerticalStripeFillPattern.Unregister; - TdxPSThinHorizontalStripeFillPattern.Unregister; - TdxPSThickCrossHatchFillPattern.Unregister; - TdxPSDiagonalCrossHatchFillPattern.Unregister; - TdxPSDiagonalStripeFillPattern.Unregister; - TdxPSReverseDiagonalStripeFillPattern.Unregister; - TdxPSVerticalStripeFillPattern.Unregister; - TdxPSHorizontalStripeFillPattern.Unregister; - TdxPSGray625FillPattern.Unregister; - TdxPSGray125FillPattern.Unregister; - TdxPSGray25FillPattern.Unregister; - TdxPSGray75FillPattern.Unregister; -end; - -initialization - RegisterPatterns; - -finalization - UnregisterPatterns; - -end. - - - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSExtDlgs.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSExtDlgs.pas deleted file mode 100644 index c1155164..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSExtDlgs.pas +++ /dev/null @@ -1,377 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSExtDlgs; - -interface - -{$I cxVer.inc} - -uses - Messages, Windows, SysUtils, Classes, Controls, Forms, StdCtrls, Graphics, - ExtCtrls, Buttons, Dialogs, cxClasses, dxPSCore, dxExtCtrls; - -type - TdxPSOpenReportDialog = class(TOpenDialog) - private - FPrevFileName: string; - FPreviewRect: TRect; - FReportDocument: TdxPSReportDocument; - - btnPreview: TSpeedButton; - lblPreview: TLabel; - pnlPicture: TPanel; - pnlToolBar: TPanel; - sbxPreview: TdxPSImageScrollBox; - function GetGraphic: TGraphic; - function GetHasDocument: Boolean; - function GetIsDocumentValid: Boolean; - procedure PreviewClick(Sender: TObject); - protected - procedure DoClose; override; - procedure DoSelectionChange; override; - procedure DoShow; override; - function TaskModalDialog(DialogFunc: Pointer; var DialogData): Bool; override; - procedure CreateControls; virtual; - procedure Initialize; virtual; - function IsSelectedFileValid: Boolean; virtual; - procedure LoadReportDocument; - procedure LoadStrings; virtual; - procedure PlacePreviewPanelInitial; - procedure UpdateControls; virtual; - - property Graphic: TGraphic read GetGraphic; - property HasDocument: Boolean read GetHasDocument; - property IsDocumentValid: Boolean read GetIsDocumentValid; - property PreviewRect: TRect read FPreviewRect; - property ReportDocument: TdxPSReportDocument read FReportDocument; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; override; - end; - - TdxPSSaveReportDialog = class(TdxPSOpenReportDialog) - public - constructor Create(AOwner: TComponent); override; - function Execute: Boolean; override; - end; - -const - sdxPicturePanel = 'pnlPicture'; // Don't localize - sdxPreviewButton = 'btnPreview'; // Don't localize - sdxPreviewLabel = 'lblPreview'; // Don't localize - sdxPreviewScrollBox = 'sbxPreview'; // Don't localize - sdxPreviewToolBar = 'pnlToolBar'; // Don't localize - -implementation - -uses - CommDlg, dxPSRes, dxPSImgs, dxPSUtl, dxPCPrVw; - -{$R dxPSExtDlgs.res} - -{ TdxPSOpenReportDialog } - -constructor TdxPSOpenReportDialog.Create(AOwner: TComponent); -begin - inherited; - CreateControls; - DefaultExt := dxPSCore.dxPSReportFileShortExtension; - Filter := Format('%s (*.%1:s)|*.%1:s', [cxGetResourceString(@sdxPSReportFiles), dxPSCore.dxPSReportFileShortExtension]); - Options := Options + [ofPathMustExist, ofFileMustExist]; - Title := cxGetResourceString(@sdxLoadReportDataToFileTitle); -end; - -destructor TdxPSOpenReportDialog.Destroy; -begin - FreeAndNil(FReportDocument); - inherited; -end; - -function TdxPSOpenReportDialog.Execute: Boolean; -begin - if NewStyleControls and not (ofOldStyleDialog in Options) then - Template := 'DXPSDLGTEMPLATE' - else - Template := nil; - Result := inherited Execute; -end; - -procedure TdxPSOpenReportDialog.DoClose; -begin - inherited; - Application.HideHint; -end; - -procedure TdxPSOpenReportDialog.DoSelectionChange; -begin - if FileName <> FPrevFileName then - begin - FPrevFileName := FileName; - if IsSelectedFileValid then - LoadReportDocument; - UpdateControls; - end; - inherited; -end; - -procedure TdxPSOpenReportDialog.DoShow; -begin - Initialize; - inherited; -end; - -function TdxPSOpenReportDialog.TaskModalDialog(DialogFunc: Pointer; var DialogData): Bool; -var - Wnd: HWND; -begin - Wnd := SetParent(Handle, GetForegroundWindow); - TOpenFileName(DialogData).hInstance := hInstance; - Result := inherited TaskModalDialog(DialogFunc, DialogData); - SetParent(Handle, Wnd); -end; - -procedure TdxPSOpenReportDialog.CreateControls; - - procedure CreatePicturePanel; - begin - pnlPicture := TPanel.Create(Self); - with pnlPicture do - begin - Name := sdxPicturePanel; - Caption := ''; - BevelInner := bvNone; - BevelOuter := bvNone; - TabOrder := 1; - - SetBounds(204, 5, 169, 200); - end; - end; - - procedure CreatePreviewToolBar; - begin - pnlToolBar := TPanel.Create(Self); - with pnlToolBar do - begin - Parent := pnlPicture; - Align := alTop; - BevelInner := bvNone; - BevelOuter := bvNone; - Height := 31; //29 - Name := sdxPreviewToolBar; - Caption := ''; - TabOrder := 0; - end; - end; - - procedure CreatePreviewLabel; - begin - lblPreview := TLabel.Create(Self); - with lblPreview do - begin - Parent := pnlToolBar; - AutoSize := False; - Caption := ''; - Name := sdxPreviewLabel; - - SetBounds(2, 6, 157, 23); - end; - end; - - procedure CreatePreviewButton; - begin - btnPreview := TSpeedButton.Create(Self); - with btnPreview do - begin - Parent := pnlToolBar; - Enabled := False; - Bitmap_LoadFromResourceName(Glyph, IDB_DXPSPREVIEW); - Name := sdxPreviewButton; - ParentShowHint := False; - ShowHint := True; - - SetBounds(77, 1, 23, 22); - - OnClick := PreviewClick; - end; - end; - - procedure CreatePreviewScrollBox; - begin - sbxPreview := TdxPSImageScrollBox.Create(Self); - with sbxPreview do - begin - Parent := pnlPicture; - Align := alClient; - Ctl3D := True; - HorzScrollBar.Tracking := True; - Name := sdxPreviewScrollBox; - TabOrder := 1; - VertScrollBar.Tracking := True; - - OnDblClick := PreviewClick; - end; - end; - - {procedure CreateCreatorPanel; - begin - pnlCreatr := TPanel.Create(Self); - with pnlCreator do - begin - Parent := pnlPicture; - Align := alBottom; - Name := sdxCreatorPanel; - end; - end;} - -begin - CreatePicturePanel; - CreatePreviewToolBar; - CreatePreviewLabel; - CreatePreviewButton; - CreatePreviewScrollBox; -end; - -function TdxPSOpenReportDialog.IsSelectedFileValid: Boolean; -begin - Result := FileExists(FileName) and (GetFileAttributes(PChar(FileName)) <> $FFFFFFFF); -end; - -procedure TdxPSOpenReportDialog.LoadReportDocument; -var - Stream: TFileStream; -begin - FreeAndNil(FReportDocument); - Stream := TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite); - try - try - FReportDocument := TBasedxReportLink.ExtractReportDocument(Stream, True); - except - FReportDocument := nil; - end; - finally - Stream.Free; - end; -end; - -procedure TdxPSOpenReportDialog.Initialize; -begin - LoadStrings; - PlacePreviewPanelInitial; - UpdateControls; -end; - -procedure TdxPSOpenReportDialog.LoadStrings; -begin - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)) + ':'; - btnPreview.Hint := DropAmpersand(cxGetResourceString(@sdxPreview)); -end; - -procedure TdxPSOpenReportDialog.PlacePreviewPanelInitial; -var - R: TRect; -begin - R := GetStaticRect; - - Windows.GetClientRect(Handle, FPreviewRect); - FPreviewRect.Left := R.Left + (R.Right - R.Left); - Inc(FPreviewRect.Top, 4); - - pnlPicture.ParentWindow := Handle; - pnlPicture.Realign; - pnlPicture.BoundsRect := PreviewRect; - - btnPreview.Left := pnlToolBar.BoundsRect.Right - btnPreview.Width - 2; -end; - -procedure TdxPSOpenReportDialog.UpdateControls; -begin - btnPreview.Enabled := IsDocumentValid; - - sbxPreview.Enabled := IsDocumentValid; - sbxPreview.Picture.Assign(Graphic); - if IsDocumentValid then - sbxPreview.HintText := '' - else - if FileExists(FileName) then - sbxPreview.HintText := cxGetResourceString(@sdxReportDocumentIsCorrupted) - else - sbxPreview.HintText := cxGetResourceString(@sdxNone); -end; - -function TdxPSOpenReportDialog.GetGraphic: TGraphic; -begin - if ReportDocument <> nil then - Result := ReportDocument.Preview - else - Result := nil; -end; - -function TdxPSOpenReportDialog.GetHasDocument: Boolean; -begin - Result := ReportDocument <> nil; -end; - -function TdxPSOpenReportDialog.GetIsDocumentValid: Boolean; -begin - Result := Graphic <> nil; -end; - -procedure TdxPSOpenReportDialog.PreviewClick(Sender: TObject); -begin - dxPCPrVw.dxShowPicturePreview(Graphic); -end; - -{ TdxPSSaveReportDialog } - -constructor TdxPSSaveReportDialog.Create(AOwner: TComponent); -begin - inherited; - Options := Options + [ofOverwritePrompt]; - Title := cxGetResourceString(@sdxSaveReportDataToFileTitle); -end; - -function TdxPSSaveReportDialog.Execute: Boolean; -begin - if NewStyleControls and not (ofOldStyleDialog in Options) then - Template := 'DXPSDLGTEMPLATE' - else - Template := nil; - Result := DoExecute(@GetSaveFileName); -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSExtDlgs.res b/internal/x.46/ExpressPrinting System/Sources/dxPSExtDlgs.res deleted file mode 100644 index 3c35386c..00000000 Binary files a/internal/x.46/ExpressPrinting System/Sources/dxPSExtDlgs.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSFileBasedXplorer.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSFileBasedXplorer.pas deleted file mode 100644 index b6ffd876..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSFileBasedXplorer.pas +++ /dev/null @@ -1,1486 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSFileBasedXplorer; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, SysUtils, cxClasses, dxPSGlbl, dxPSCore, dxCore; - -type - TdxPSFileBasedExplorer = class; - TdxPSFileBasedExplorerItem = class; - - TdxPSFileBasedExplorerFolder = class(TdxPSExplorerFolder) - private - function GetFolder(Index: Integer): TdxPSFileBasedExplorerFolder; - function GetFullQualifiedDirName: string; - function GetFullQualifiedDirPath: string; - function GetIsVolume: Boolean; - function GetItem(Index: Integer): TdxPSFileBasedExplorerItem; - protected - function DoDelete: Boolean; override; - function DoMove(AParent: TdxPSExplorerFolder): Boolean; override; - function DoRename(var ANewName: string): Boolean; override; - - function GetDirName: string; virtual; - function GetDisplayName: string; override; - public - function CannotRenameMessageText(const AOldName, ANewName: string): string; override; - function CanMoveTo(AParent: TCustomdxPSExplorerItem): Boolean; override; - function CanRenameTo(const AName: string): Boolean; override; - function Explorer: TdxPSFileBasedExplorer; reintroduce; overload; - function GetUniqueID(out AnUniqueID: TBytes): Integer; override; - function ItemByName(const AName: string): TdxPSExplorerItem; override; - - function FindFolderByFullQualifiedDirName(const AFullQualifiedDirName: string): TdxPSFileBasedExplorerFolder; - function FindItemByFullQualifiedFileName(const AFullQualifiedName: string): TdxPSFileBasedExplorerItem; - - property DirName: string read GetDirName; - property Folders[Index: Integer]: TdxPSFileBasedExplorerFolder read GetFolder; default; - property FullQualifiedDirName: string read GetFullQualifiedDirName; - property FullQualifiedDirPath: string read GetFullQualifiedDirPath; - property IsVolume: Boolean read GetIsVolume; - property Items[Index: Integer]: TdxPSFileBasedExplorerItem read GetItem; - end; - - TdxPSFileBasedExplorerRootFolder = class(TdxPSFileBasedExplorerFolder) - private - function GetDriveType: TdxDriveType; - function GetVolumeLabel: string; - protected - function GetImageIndex: Integer; override; - function GetSelectedIndex: Integer; override; - public - property VolumeLabel: string read GetVolumeLabel; - property DriveType: TdxDriveType read GetDriveType; - end; - - TdxPSFileBasedExplorerItem = class(TdxPSExplorerItem) - private - FIsIOOutwardlyControlled: Boolean; - function GetFullQualifiedFileName: string; - function GetFullQualifiedFilePath: string; - protected - function AcquireExtension(const AName: string): string; - function SuppressExtension(const AName: string): string; - - function DoDelete: Boolean; override; - function DoMove(AParent: TdxPSExplorerFolder): Boolean; override; - function DoRename(var ANewName: string): Boolean; override; - - function GetDisplayName: string; override; - function GetFileName: string; virtual; - function GetFileSize: Int64; virtual; // in bytes - function GetFormCaption: string; override; - function GetInfoTip: string; override; - function GetNewName(AReportLink: TBasedxReportLink): string; override; - procedure SetName(const Value: string); override; - - property IsIOOutwardlyControlled: Boolean read FIsIOOutwardlyControlled write FIsIOOutwardlyControlled; - public - function CannotRenameMessageText(const AOldName, ANewName: string): string; override; - function CanMoveTo(AParent: TCustomdxPSExplorerItem): Boolean; override; - function CanRenameTo(const AName: string): Boolean; override; - function DataLoadErrorText: string; override; - function Explorer: TdxPSFileBasedExplorer; reintroduce; overload; - function GetUniqueID(out AnUniqueID: TBytes): Integer; override; - function IsNameChanged(const ANewName: string): Boolean; override; - - property FileName: string read GetFileName; - property FileSize: Int64 read GetFileSize; - property FullQualifiedFileName: string read GetFullQualifiedFileName; - property FullQualifiedFilePath: string read GetFullQualifiedFilePath; - end; - - TdxPSFileBasedExplorerContextCommandClass = class of TdxPSFileBasedExplorerContextCommand; - - TdxPSFileBasedExplorerContextCommand = class(TCustomdxPSExplorerContextCommand) - public - function Explorer: TdxPSFileBasedExplorer; reintroduce; overload; - end; - - TdxPSFileBasedExplorerSetAsRootContextCommand = class(TdxPSFileBasedExplorerContextCommand) - public - constructor Create(AnExplorer: TCustomdxPSExplorer); override; - function Enabled: Boolean; override; - procedure Execute; override; - end; - - TdxPSFileBasedExplorerChangeRootContextCommand = class(TdxPSFileBasedExplorerContextCommand) - public - constructor Create(AnExplorer: TCustomdxPSExplorer); override; - function Enabled: Boolean; override; - procedure Execute; override; - end; - - TdxPSFileBasedExplorerGoToUpOneLevelContextCommand = class(TdxPSFileBasedExplorerContextCommand) - public - constructor Create(AnExplorer: TCustomdxPSExplorer); override; - function Enabled: Boolean; override; - procedure Execute; override; - end; - - TdxPSFileBasedExplorerLoadErrorEvent = procedure(Sender: TdxPSFileBasedExplorer; - const AName: string) of object; - - TdxPSFileBasedExplorerOption = (eoLoadAll, eoShowIOErrors, eoStoreToRegistry); - TdxPSFileBasedExplorerOptions = set of TdxPSFileBasedExplorerOption; - - TdxPSFileBasedExplorer = class(TCustomdxPSExplorer) - private - FIOLockCounter: Integer; - FIOStatus: Word; - FLastLoadedFileName: string; - FOptions: TdxPSFileBasedExplorerOptions; - FRootPath: string; - FOnLoadError: TdxPSFileBasedExplorerLoadErrorEvent; - function GetActiveFolder: TdxPSFileBasedExplorerFolder; - function GetActiveFolderPath: string; - function GetRealRootPath: string; - function GetRoot: TdxPSFileBasedExplorerRootFolder; - procedure SetActiveFolder(Value: TdxPSFileBasedExplorerFolder); - procedure SetOptions(Value: TdxPSFileBasedExplorerOptions); - procedure SetRootPath(const Value: string); - protected - procedure Loaded; override; - - { IdxPSExplorerBuildContextCommands } - procedure BuildCommandSet(ABuilder: IdxPSExplorerContextCommandBuilder); override; - { IdxPSExplorerContextCommands2 } - procedure FinalizeCommand(ACommand: TCustomdxPSExplorerContextCommand); override; - procedure InitializeCommand(ACommand: TCustomdxPSExplorerContextCommand); override; - - class function AcceptItemNameChar(AnItem: TCustomdxPSExplorerItem; Ch: Char): Boolean; override; - - function AcquireExtension(const AName: string): string; - function SuppressExtension(const AName: string): string; - - procedure CreateAndCloseFile(const AName: string); - function CreateDataStream(const AFileName: string; AMode: TdxPSStreamMode): TStream; - function CreateItemDataStream(AnItem: TdxPSExplorerItem; AMode: TdxPSStreamMode): TStream; override; - - procedure DoLoadData(AFolder: TdxPSExplorerFolder); override; - procedure DoLoadError(const AName: string); dynamic; - procedure RestoreLoadedItem; virtual; - procedure SaveLoadedItem; virtual; - - class function GetFolderClass: TdxPSExplorerFolderClass; override; - class function GetItemClass: TdxPSExplorerItemClass; override; - class function GetRootFolderClass: TdxPSExplorerFolderClass; override; - function GetRegistryPath: string; virtual; - function GetRootDisplayName: string; override; - procedure MoveTo(AnItem: TCustomdxPSExplorerItem; AParent: TdxPSExplorerFolder); override; - - procedure BeginIO; - procedure EndIO; - - procedure CheckIOError(AnIOResult: Boolean); - procedure ProcessIOError(AnUnconditionalRaiseException: Boolean = False); virtual; - - property IOStatus: Word read FIOStatus write FIOStatus; - property RegistryPath: string read GetRegistryPath; - public - constructor Create(AOwner: TComponent); override; - procedure BeforeDestruction; override; - - procedure LoadFromRegistry(const APath: string); virtual; - procedure SaveToRegistry(const APath: string); virtual; - - class function FileExtension: string; virtual; - procedure PopulatePath(APath: string); - - function CreateNewFolder(AParent: TdxPSExplorerFolder): TdxPSExplorerFolder; override; - function CreateNewItem(AParent: TdxPSExplorerFolder; AReportLink: TBasedxReportLink): TdxPSExplorerItem; override; - - function FindCustomItemByUniqueID(const AnUniqueID: TBytes): TCustomdxPSExplorerItem; override; - function FindFolderByFullQualifiedDirName(const AFullQualifiedDirName: string): TdxPSFileBasedExplorerFolder; - function FindItemByFullQualifiedFileName(const AFullQualifiedName: string): TdxPSFileBasedExplorerItem; - - function LoadedItem: TdxPSFileBasedExplorerItem; reintroduce; overload; - procedure LoadItemData(const AFullQualifiedFileName: string; AReportLink: TBasedxReportLink); overload; - procedure UnloadItemData(const AFullQualifiedFileName: string); overload; - - function CanGoToUpOneLevel: Boolean; virtual; - procedure GoToUpOneLevel; - function ShowChangeRootPathDlg: Boolean; - - function CanSetActiveFolderAsRoot: Boolean; virtual; - procedure SetActiveFolderAsRoot; - - property ActiveFolder: TdxPSFileBasedExplorerFolder read GetActiveFolder write SetActiveFolder; - property ActiveFolderPath: string read GetActiveFolderPath; - property RealRootPath: string read GetRealRootPath; - property Root: TdxPSFileBasedExplorerRootFolder read GetRoot; - published - property Options: TdxPSFileBasedExplorerOptions read FOptions write SetOptions default [eoShowIOErrors]; - property RootPath: string read FRootPath write SetRootPath; - property OnLoadError: TdxPSFileBasedExplorerLoadErrorEvent read FOnLoadError write FOnLoadError; - end; - -implementation - -uses - {$IFDEF DELPHI6} RTLConsts, {$ELSE} FileCtrl, Consts, {$ENDIF} Menus, - Dialogs, Controls, Registry, ShellAPI, dxPSUtl, dxPSRes, dxPSImgs, - dxPSEngn; - -const - sdxRegistryRootPath = '\Explorers\'; // Don't localize - sdxRootPath = 'RootPath'; // Don't localize - -{ Helpers } - -function FirstPathDelimiter(const Source: string): Integer; -begin - Result := Pos(dxPSGlbl.PathDelimiter, Source); -end; - -function HasExtension(const AName, AExtension: string): Boolean; -begin - Result := dxSameText(ExtractFileExt(AName), AExtension); -end; - -procedure IOError; -begin - {$IFDEF DELPHI6} - RaiseLastOSError; - {$ELSE} - RaiseLastWin32Error; - {$ENDIF} -end; - -function RemoveTrailingBackSlash(const Source: string): string; -var - I: Integer; -begin - I := Length(Source); - while (I <> 0) and (Source[I] = '\') do - Dec(I); - - if I > 0 then - Result := Copy(Source, 1, I) - else - Result := ''; -end; - -function ShellRemoveFile(const AName: string; AConfirmation: Boolean): Boolean; -const - ConfirmationMap: array[Boolean] of FILEOP_FLAGS = (FOF_NOCONFIRMATION, 0); -var - FOS: TSHFileOpStruct; -begin - FillChar(FOS, SizeOf(FOS), 0); - with FOS do - begin - Wnd := 0; - pFrom := PChar(AName + #0); - wFunc := FO_DELETE; - fFlags := FOF_ALLOWUNDO or FOF_NOERRORUI or FOF_SILENT or ConfirmationMap[AConfirmation]; - end; - Result := (SHFileOperation(FOS) = 0) and not FOS.fAnyOperationsAborted; -end; - -function ShellRemoveFolder(const APath: string): Boolean; -var - FOS: TSHFileOpStruct; -begin - FillChar(FOS, SizeOf(FOS), 0); - with FOS do - begin - Wnd := 0; - pFrom := PChar(APath + #0); - wFunc := FO_DELETE; - fFlags := FOF_ALLOWUNDO or FOF_NOCONFIRMATION or FOF_NOERRORUI or FOF_SILENT; - end; - Result := SHFileOperation(FOS) = 0; -end; - -function ValidateFileName(const AName: string): Boolean; - - function HasAnyChar(const S, AChars: string): Boolean; - var - I: Integer; - begin - Result := False; - for I := 1 to Length(AChars) do - begin - Result := Pos(AChars[I], S) > 0; - if Result then Exit; - end; - end; - -begin - Result := (Trim(AName) <> '') and not HasAnyChar(AName, dxPSUtl.InvalidFileNameChars); -end; - -{ TdxPSFileBasedExplorerFolder } - -function TdxPSFileBasedExplorerFolder.CannotRenameMessageText(const AOldName, ANewName: string): string; -begin - if not ValidateFileName(ANewName) then - Result := cxGetResourceString(@sdxInvalidFolderName) - else - Result := inherited CannotRenameMessageText(AOldName, ANewName); -end; - -function TdxPSFileBasedExplorerFolder.CanMoveTo(AParent: TCustomdxPSExplorerItem): Boolean; -// Name is equal '' in creation phase -begin - Result := inherited CanMoveTo(AParent) and (AParent <> nil) and - ((esLoading in Explorer.State) or (Name = '') or - CanRenameTo(TdxPSFileBasedExplorerFolder(AParent).FullQualifiedDirName + '\' + Name)); -end; - -function TdxPSFileBasedExplorerFolder.CanRenameTo(const AName: string): Boolean; -begin - Result := inherited CanRenameTo(AName) and ValidateFileName(ExtractFileName(AName)); -end; - -function TdxPSFileBasedExplorerFolder.Explorer: TdxPSFileBasedExplorer; -begin - Result := inherited Explorer as TdxPSFileBasedExplorer; -end; - -function TdxPSFileBasedExplorerFolder.GetUniqueID(out AnUniqueID: TBytes): Integer; -begin - Result := Length(FullQualifiedDirName); - SetLength(AnUniqueID, Result); - Move(Pointer(FullQualifiedDirName)^, Pointer(AnUniqueID)^, Result); -end; - -function TdxPSFileBasedExplorerFolder.ItemByName(const AName: string): TdxPSExplorerItem; -begin - Result := inherited ItemByName(Explorer.AcquireExtension(AName)); -end; - -function TdxPSFileBasedExplorerFolder.FindFolderByFullQualifiedDirName(const AFullQualifiedDirName: string): TdxPSFileBasedExplorerFolder; - - function InternalFindFolder(AFolder: TdxPSFileBasedExplorerFolder; ADirName: string): TdxPSFileBasedExplorerFolder; - var - P: Integer; - FolderName: string; - begin - P := FirstPathDelimiter(ADirName); - if P <> 0 then - begin - FolderName := Copy(ADirName, 1, P - 1); - Result := TdxPSFileBasedExplorerFolder(AFolder.FolderByName(FolderName)); - if Result <> nil then - begin - System.Delete(ADirName, 1, P); - Result := InternalFindFolder(Result, ADirName); - end; - end - else - Result := TdxPSFileBasedExplorerFolder(AFolder.FolderByName(ADirName)); - end; - -var - S, DirName: string; -begin - Result := nil; - S := dxPSUtl.GetLongFileName(AFullQualifiedDirName); - if Pos(FullQualifiedDirName, S) = 1 then - begin - DirName := Copy(S, Length(FullQualifiedDirName) + 1 + 1{PathDelimiter}, Length(S)); - if DirName = '' then - Result := Self - else - Result := InternalFindFolder(Self, DirName); - end; -end; - -function TdxPSFileBasedExplorerFolder.FindItemByFullQualifiedFileName(const AFullQualifiedName: string): TdxPSFileBasedExplorerItem; -var - S: string; - Folder: TdxPSFileBasedExplorerFolder; - SuppressedName: string; -begin - S := dxPSUtl.GetLongFileName(AFullQualifiedName); - Folder := FindFolderByFullQualifiedDirName(ExtractFileDir(S)); - if Folder <> nil then - begin - SuppressedName := Explorer.SuppressExtension(ExtractFileName(S)); - Result := TdxPSFileBasedExplorerItem(Folder.ItemByName(SuppressedName)); - end - else - Result := nil; -end; - -function TdxPSFileBasedExplorerFolder.DoDelete: Boolean; -begin - Result := inherited DoDelete; - if Result and DirectoryExists(FullQualifiedDirName) then - begin - ShellRemoveFolder(FullQualifiedDirName); - Result := not DirectoryExists(FullQualifiedDirName); - end; -end; - -function TdxPSFileBasedExplorerFolder.DoMove(AParent: TdxPSExplorerFolder): Boolean; -const - Buttons: TMsgDlgButtons = [mbYes, mbYesToAll, mbNo, mbCancel{, mbHelp}]; - - function MoveFiles(AParent: TdxPSFileBasedExplorerFolder): Boolean; - var - I: Integer; - Item: TdxPSFileBasedExplorerItem; - begin - for I := ItemCount - 1 downto 0 do - begin - Item := Items[I]; - Item.IsIOOutwardlyControlled := True; - try - if Explorer.IOStatus <> mrYesToAll then - if FileExists(AParent.FullQualifiedDirName + '\' + Item.Name) then - begin - Explorer.IOStatus := MessageDlg(Item.OverwriteMessageText(AParent), mtWarning, Buttons, 0); - if Explorer.IOStatus = mrCancel then - Break; - if Explorer.IOStatus = mrNo then - Continue; - end; - Item.Parent := AParent; - finally - Item.IsIOOutwardlyControlled := False; - end; - end; - Result := Explorer.IOStatus <> mrCancel; - end; - - function MoveFolders(AParent: TdxPSFileBasedExplorerFolder): Boolean; - var - I: Integer; - Folder: TdxPSExplorerFolder; - begin - for I := FolderCount - 1 downto 0 do - begin - Folder := Folders[I]; - Folder.Populate; - Folder.Parent := AParent; - if Explorer.IOStatus = mrCancel then Break; - end; - Result := Explorer.IOStatus <> mrCancel; - end; - -var - DestName: string; - NewParent: TdxPSFileBasedExplorerFolder; -begin - Result := inherited DoMove(AParent); - if Result and ([esLoading, esFolderCreating] * Explorer.State = []) then - begin - if Explorer.IOStatus = mrCancel then - begin - Result := False; - Exit; - end; - - if not DirectoryExists(FullQualifiedDirName) then - begin - Result := False; - Delete; - Exit; - end; - - DestName := TdxPSFileBasedExplorerFolder(AParent).FullQualifiedDirName + '\' + DirName; - if DirectoryExists(DestName) then - begin - Populate; - NewParent := TdxPSFileBasedExplorerFolder(AParent).FindFolderByFullQualifiedDirName(DestName); - NewParent.Populate; - - if Explorer.IOStatus <> mrYesToAll then - begin - Explorer.IOStatus := MessageDlg(OverwriteMessageText(AParent), mtWarning, Buttons, 0); - if Explorer.IOStatus in [mrNo, mrCancel] then - begin - Result := False; - Exit; - end; - end; - - Result := MoveFolders(NewParent) and MoveFiles(NewParent); - if Result then - begin - Result := RemoveDir(FullQualifiedDirName); - Explorer.CheckIOError(Result); - if not DirectoryExists(FullQualifiedDirName) then Delete; - end; - end - else - begin - Result := RenameFile(FullQualifiedDirName, DestName); - Explorer.CheckIOError(Result); - end; - end; -end; - -function TdxPSFileBasedExplorerFolder.DoRename(var ANewName: string): Boolean; -begin - Result := inherited DoRename(ANewName); - if Result and not (esLoading in Explorer.State) then - begin - Result := RenameFile(FullQualifiedDirName, FullQualifiedDirPath + ANewName); - Explorer.CheckIOError(Result); - end; -end; - -function TdxPSFileBasedExplorerFolder.GetDirName: string; -begin - Result := Name; -end; - -function TdxPSFileBasedExplorerFolder.GetDisplayName: string; -begin - Result := DirName; -end; - -function TdxPSFileBasedExplorerFolder.GetIsVolume: Boolean; -begin - Result := ExtractFileDir(FullQualifiedDirName) = FullQualifiedDirName; -end; - -function TdxPSFileBasedExplorerFolder.GetFolder(Index: Integer): TdxPSFileBasedExplorerFolder; -begin - Result := inherited Folders[Index] as TdxPSFileBasedExplorerFolder; -end; - -function TdxPSFileBasedExplorerFolder.GetFullQualifiedDirName: string; -begin - Result := FullQualifiedDirPath; - if IsRoot then - Result := RemoveTrailingBackSlash(Result) - else - Result := Result + DirName; -end; - -function TdxPSFileBasedExplorerFolder.GetFullQualifiedDirPath: string; -begin - if IsRoot then - Result := Explorer.RealRootPath - else - Result := TdxPSFileBasedExplorerFolder(Parent).FullQualifiedDirName; - Result := Result + '\'; -end; - -function TdxPSFileBasedExplorerFolder.GetItem(Index: Integer): TdxPSFileBasedExplorerItem; -begin - Result := inherited Items[Index] as TdxPSFileBasedExplorerItem; -end; - -{ TdxPSFileBasedExplorerRootFolder } - -function TdxPSFileBasedExplorerRootFolder.GetImageIndex: Integer; -begin - if IsVolume and not (DriveType in [dxPSGlbl.dtUnknown, dxPSGlbl.dtNoRootDir]) then - Result := dxPSCore.iiDriveTypes[DriveType] - else - Result := inherited GetImageIndex; -end; - -function TdxPSFileBasedExplorerRootFolder.GetSelectedIndex: Integer; -begin - if IsVolume and not (DriveType in [dxPSGlbl.dtUnknown, dxPSGlbl.dtNoRootDir]) then - Result := dxPSCore.iiDriveTypes[DriveType] - else - Result := inherited GetSelectedIndex; -end; - -function TdxPSFileBasedExplorerRootFolder.GetDriveType: TdxDriveType; -begin - Result := TdxDriveType(Windows.GetDriveType(PChar(FullQualifiedDirPath))); -end; - -function TdxPSFileBasedExplorerRootFolder.GetVolumeLabel: string; -begin - if IsVolume then - Result := dxPSUtl.GetVolumeName(FullQualifiedDirPath) - else - Result := ''; -end; - -{ TdxPSFileBasedExplorerItem } - -function TdxPSFileBasedExplorerItem.AcquireExtension(const AName: string): string; -begin - if Explorer <> nil then - Result := Explorer.AcquireExtension(AName) - else - Result := AName; -end; - -function TdxPSFileBasedExplorerItem.SuppressExtension(const AName: string): string; -begin - if Explorer <> nil then - Result := Explorer.SuppressExtension(AName) - else - Result := AName; -end; - -function TdxPSFileBasedExplorerItem.CannotRenameMessageText(const AOldName, ANewName: string): string; -begin - if not ValidateFileName(ANewName) then - Result := cxGetResourceString(@sdxInvalidReportName) - else - Result := inherited CannotRenameMessageText(AOldName, ANewName); -end; - -function TdxPSFileBasedExplorerItem.CanMoveTo(AParent: TCustomdxPSExplorerItem): Boolean; -// Name is equal '' in creation phase -begin - Result := inherited CanMoveTo(AParent) and (AParent <> nil) and - ((esLoading in Explorer.State) or (Name = '') or - CanRenameTo(TdxPSFileBasedExplorerFolder(AParent).FullQualifiedDirName + '\' + Name)); -end; - -function TdxPSFileBasedExplorerItem.CanRenameTo(const AName: string): Boolean; -begin - Result := inherited CanRenameTo(AName) and ValidateFileName(ExtractFileName(AName)); -end; - -function TdxPSFileBasedExplorerItem.DataLoadErrorText: string; -begin - Result := cxGetResourceString(@sdxFileBasedExplorerItemDataLoadError); -end; - -function TdxPSFileBasedExplorerItem.Explorer: TdxPSFileBasedExplorer; -begin - Result := inherited Explorer as TdxPSFileBasedExplorer; -end; - -function TdxPSFileBasedExplorerItem.GetUniqueID(out AnUniqueID: TBytes): Integer; -begin - Result := Length(FullQualifiedFileName); - SetLength(AnUniqueID, Result); - Move(Pointer(FullQualifiedFileName)^, Pointer(AnUniqueID)^, Result); -end; - -function TdxPSFileBasedExplorerItem.IsNameChanged(const ANewName: string): Boolean; -begin - Result := inherited IsNameChanged(AcquireExtension(ANewName)); -end; - -function TdxPSFileBasedExplorerItem.DoDelete: Boolean; -begin - Result := inherited DoDelete; - if Result and FileExists(FullQualifiedFileName) then - Result := ShellRemoveFile(FullQualifiedFileName, False) and not FileExists(FullQualifiedFileName); -end; - -function TdxPSFileBasedExplorerItem.GetDisplayName: string; -begin - Result := SuppressExtension(FileName); -end; - -function TdxPSFileBasedExplorerItem.GetFileName: string; -begin - Result := AcquireExtension(Name); -end; - -function TdxPSFileBasedExplorerItem.GetFileSize: Int64; // in bytes -var - FileName: string; - FileHandle: THandle; - LowPart, HighPart: DWORD; -begin - Result := 0; - FileName := FullQualifiedFileName; - if FileExists(FileName) then - begin - FileHandle := FileOpen(FileName, fmOpenRead or fmShareDenyWrite); - if FileHandle > 0 then - try - LowPart := Windows.GetFileSize(FileHandle, @HighPart); - if LowPart <> INVALID_FILE_SIZE then - begin - TULargeInteger(Result).LowPart := LowPart; - TULargeInteger(Result).HighPart := HighPart; - end - finally - FileClose(FileHandle); - end; - end; -end; - -function TdxPSFileBasedExplorerItem.GetFormCaption: string; -begin - Result := FullQualifiedFileName; -end; - -function TdxPSFileBasedExplorerItem.GetInfoTip: string; -const - CRLF = #13#10; -var - FileSize: Int64; -begin - Result := inherited GetInfoTip; - - FileSize := Self.FileSize; - if FileSize > 0 then - Result := Result + CRLF + dxPSUtl.DropAmpersand(cxGetResourceString(@sdxSize))+ ': ' + dxPSUtl.FormatFileSize(FileSize); -end; - -function TdxPSFileBasedExplorerItem.GetNewName(AReportLink: TBasedxReportLink): string; -begin - Result := Explorer.AcquireExtension(inherited GetNewName(AReportLink)); -end; - -function TdxPSFileBasedExplorerItem.DoMove(AParent: TdxPSExplorerFolder): Boolean; -var - CancelOperation: Boolean; - DestName: string; - Item: TdxPSExplorerItem; -begin - Result := inherited DoMove(AParent); - if Result and ([esLoading, esItemCreating] * Explorer.State = []) then - begin - if not FileExists(FullQualifiedFileName) then - begin - Delete; - Result := False; - Exit; - end; - - CancelOperation := False; - DestName := TdxPSFileBasedExplorerFolder(AParent).FullQualifiedDirName + '\' + Name; - if FileExists(DestName) then - begin - if IsIOOutwardlyControlled then - CancelOperation := not ShellRemoveFile(DestName, False) - else - CancelOperation := not MessageQuestion(OverwriteMessageText(AParent)) or not ShellRemoveFile(DestName, False); - if not CancelOperation then - begin - Item := AParent.ItemByName(Name); - if Item <> nil then Item.Delete; - end; - end; - - Result := not CancelOperation; - if Result then - begin - Result := RenameFile(FullQualifiedFileName, DestName); - Explorer.CheckIOError(Result); - end; - end; -end; - -function TdxPSFileBasedExplorerItem.DoRename(var ANewName: string): Boolean; -var - ExtensionedName: string; -begin - ExtensionedName := AcquireExtension(ANewName); - Result := inherited DoRename(ExtensionedName); - if Result and not (esLoading in Explorer.State) and - not dxSameText(FullQualifiedFileName, FullQualifiedFilePath + ExtensionedName) then - begin - Result := RenameFile(FullQualifiedFileName, FullQualifiedFilePath + ExtensionedName); - Explorer.CheckIOError(Result); - end; -end; - -procedure TdxPSFileBasedExplorerItem.SetName(const Value: string); -begin - inherited SetName(AcquireExtension(Value)); -end; - -function TdxPSFileBasedExplorerItem.GetFullQualifiedFileName: string; -begin - Result := FullQualifiedFilePath + FileName; -end; - -function TdxPSFileBasedExplorerItem.GetFullQualifiedFilePath: string; -begin - if Parent <> nil then - if Parent.IsRoot then - Result := Explorer.RealRootPath - else - Result := TdxPSFileBasedExplorerFolder(Parent).FullQualifiedDirName - else - Result := ''; - - Result := Result + '\'; -end; - -{ TdxPSFileBasedExplorerContextCommand } - -function TdxPSFileBasedExplorerContextCommand.Explorer: TdxPSFileBasedExplorer; -begin - Result := inherited Explorer as TdxPSFileBasedExplorer; -end; - -{ TdxPSFileBasedExplorerSetAsRootContextCommand } - -constructor TdxPSFileBasedExplorerSetAsRootContextCommand.Create(AnExplorer: TCustomdxPSExplorer); -begin - inherited; - Caption := cxGetResourceString(@sdxMenuExplorerSetAsRoot); - Hint := cxGetResourceString(@sdxHintExplorerSetAsRoot); -end; - -function TdxPSFileBasedExplorerSetAsRootContextCommand.Enabled: Boolean; -begin - Result := Explorer.CanSetActiveFolderAsRoot; -end; - -procedure TdxPSFileBasedExplorerSetAsRootContextCommand.Execute; -begin - if Enabled then - Explorer.SetActiveFolderAsRoot; -end; - -{ TdxPSFileBasedExplorerChangeRootContextCommand } - -constructor TdxPSFileBasedExplorerChangeRootContextCommand.Create(AnExplorer: TCustomdxPSExplorer); -begin - inherited; - Caption := cxGetResourceString(@sdxMenuExplorerChangeRootPath); - Hint := cxGetResourceString(@sdxHintExplorerChangeRootPath); -end; - -function TdxPSFileBasedExplorerChangeRootContextCommand.Enabled: Boolean; -begin - Result := True; -end; - -procedure TdxPSFileBasedExplorerChangeRootContextCommand.Execute; -begin - Explorer.ShowChangeRootPathDlg; -end; - -{ TdxPSFileBasedExplorerGoToUpOneLevelContextCommand } - -constructor TdxPSFileBasedExplorerGoToUpOneLevelContextCommand.Create(AnExplorer: TCustomdxPSExplorer); -begin - inherited; - Caption := cxGetResourceString(@sdxMenuExplorerGoToUpOneLevel); - Hint := cxGetResourceString(@sdxHintExplorerGoToUpOneLevel); - ShortCut := Menus.TextToShortCut('Alt+2'); - Bitmap_LoadFromResourceName(Bitmap, IDB_DXPSGOTOUPONELEVEL); - Bitmap.Transparent := True; -end; - -function TdxPSFileBasedExplorerGoToUpOneLevelContextCommand.Enabled: Boolean; -begin - Result := Explorer.CanGoToUpOneLevel; -end; - -procedure TdxPSFileBasedExplorerGoToUpOneLevelContextCommand.Execute; -begin - if Enabled then - Explorer.GoToUpOneLevel; -end; - -{ TdxPSFileBasedExplorer } - -constructor TdxPSFileBasedExplorer.Create(AOwner: TComponent); -begin - inherited; - FOptions := [eoShowIOErrors]; -end; - -procedure TdxPSFileBasedExplorer.BeforeDestruction; -begin - if (eoStoreToRegistry in Options) and (RegistryPath <> '') then - SaveToRegistry(RegistryPath); - inherited; -end; - -procedure TdxPSFileBasedExplorer.LoadFromRegistry(const APath: string); -var - Registry: TRegistry; -begin - Registry := TRegistry.Create; - with Registry do - try - if OpenKey(APath, False) then - begin - if ValueExists(sdxRootPath) then - FRootPath := ReadString(sdxRootPath); - end; - finally - Free; - end; -end; - -procedure TdxPSFileBasedExplorer.SaveToRegistry(const APath: string); -var - Registry: TRegistry; -begin - Registry := TRegistry.Create; - with Registry do - try - if OpenKey(APath, True) then - begin - WriteString(sdxRootPath, RootPath); - end; - finally - Free; - end; -end; - -class function TdxPSFileBasedExplorer.FileExtension: string; -begin - Result := dxPSCore.dxPSReportFileShortExtension; -end; - -procedure TdxPSFileBasedExplorer.PopulatePath(APath: string); - - procedure InternalPopulateFolder(AFolder: TdxPSFileBasedExplorerFolder; ADirName: string); - var - P: Integer; - FolderName: string; - begin - P := FirstPathDelimiter(ADirName); - if P <> 0 then - FolderName := Copy(ADirName, 1, P - 1) - else - FolderName := ADirName; - - AFolder := TdxPSFileBasedExplorerFolder(AFolder.FolderByName(FolderName)); - if AFolder <> nil then - if P <> 0 then - begin - System.Delete(ADirName, 1, P); - InternalPopulateFolder(AFolder, ADirName); - end - else - AFolder.Populate; - end; - -begin - APath := dxPSUtl.GetLongFileName(APath); - APath := RemoveTrailingBackSlash(APath); - if DirectoryExists(APath) then - if Pos(RealRootPath + '\', APath) = 1 then - begin - System.Delete(APath, 1, Length(RealRootPath) + 1); - InternalPopulateFolder(Root, APath); - end; -end; - -function TdxPSFileBasedExplorer.CreateNewFolder(AParent: TdxPSExplorerFolder): TdxPSExplorerFolder; -var - DirectoryName: string; -begin - if CanCreateFolder then - begin - Result := inherited CreateNewFolder(AParent); - try - DirectoryName := TdxPSFileBasedExplorerFolder(Result).FullQualifiedDirName; - {$IFNDEF DELPHI5} - ForceDirectories(DirectoryName); - if not DirectoryExists(DirectoryName) then - {$ELSE} - if not ForceDirectories(DirectoryName) then - {$ENDIF} - ProcessIOError(True); - except - FreeAndNil(Result); - if eoShowIOErrors in Options then raise; - end; - end - else - Result := nil; -end; - -function TdxPSFileBasedExplorer.CreateNewItem(AParent: TdxPSExplorerFolder; - AReportLink: TBasedxReportLink): TdxPSExplorerItem; -var - FileName: string; -begin - if CanCreateItem then - begin - Result := inherited CreateNewItem(AParent, AReportLink); - try - FileName := TdxPSFileBasedExplorerItem(Result).FullQualifiedFileName; - CreateAndCloseFile(FileName); - Result.RetrieveReportData(AReportLink); - except - if FileExists(FileName) then ShellRemoveFile(FileName, False); - FreeAndNil(Result); - if eoShowIOErrors in Options then raise; - end; - end - else - Result := nil; -end; - -function TdxPSFileBasedExplorer.FindCustomItemByUniqueID(const AnUniqueID: TBytes): TCustomdxPSExplorerItem; -var - Name: string; -begin - SetLength(Name, Length(AnUniqueID)); - Move(Pointer(AnUniqueID)^, Pointer(Name)^, Length(Name)); - Result := FindFolderByFullQualifiedDirName(Name); - if Result = nil then - Result := FindItemByFullQualifiedFileName(Name); -end; - -function TdxPSFileBasedExplorer.FindFolderByFullQualifiedDirName(const AFullQualifiedDirName: string): TdxPSFileBasedExplorerFolder; -begin - Result := Root.FindFolderByFullQualifiedDirName(AFullQualifiedDirName); -end; - -function TdxPSFileBasedExplorer.FindItemByFullQualifiedFileName(const AFullQualifiedName: string): TdxPSFileBasedExplorerItem; -begin - Result := Root.FindItemByFullQualifiedFileName(AFullQualifiedName); -end; - -function TdxPSFileBasedExplorer.LoadedItem: TdxPSFileBasedExplorerItem; -begin - Result := inherited LoadedItem as TdxPSFileBasedExplorerItem; -end; - -procedure TdxPSFileBasedExplorer.LoadItemData(const AFullQualifiedFileName: string; - AReportLink: TBasedxReportLink); -var - S: string; - Item: TdxPSFileBasedExplorerItem; -begin - S := dxPSUtl.GetLongFileName(AFullQualifiedFileName); - PopulatePath(ExtractFileDir(S)); - Item := FindItemByFullQualifiedFileName(S); - if Item <> nil then Item.Load(AReportLink); -end; - -procedure TdxPSFileBasedExplorer.UnloadItemData(const AFullQualifiedFileName: string); -var - Item: TdxPSExplorerItem; -begin - Item := FindItemByFullQualifiedFileName(dxPSUtl.GetLongFileName(AFullQualifiedFileName)); - if Item <> nil then Item.Unload; -end; - -function TdxPSFileBasedExplorer.CanGoToUpOneLevel: Boolean; -begin - Result := not Root.IsVolume; -end; - -procedure TdxPSFileBasedExplorer.GoToUpOneLevel; -begin - if CanGotoUpOneLevel then - RootPath := ExtractFileDir(RealRootPath); -end; - -function TdxPSFileBasedExplorer.ShowChangeRootPathDlg: Boolean; -var - S: string; -begin - S := RealRootPath; - Result := dxPSUtl.ShowSystemSelectFolderDlg(S); - if Result then RootPath := S; -end; - -function TdxPSFileBasedExplorer.CanSetActiveFolderAsRoot: Boolean; -begin - Result := (ActiveFolderPath <> '') and //ValidateFileName(ActiveFolderPath) and - not dxSameText(RootPath, ActiveFolderPath); -end; - -procedure TdxPSFileBasedExplorer.SetActiveFolderAsRoot; -begin - if CanSetActiveFolderAsRoot then - RootPath := ActiveFolderPath; -end; - -procedure TdxPSFileBasedExplorer.Loaded; -begin - inherited; - if (eoStoreToRegistry in Options) and (RegistryPath <> '') then - LoadFromRegistry(RegistryPath); -end; - -{ IdxPSExplorerBuildContextCommands } - -procedure TdxPSFileBasedExplorer.BuildCommandSet(ABuilder: IdxPSExplorerContextCommandBuilder); -begin - inherited; - ABuilder.AddExplorerContextCommand(AddCommandSeparator); - ABuilder.AddExplorerContextCommand(AddCommand(TdxPSFileBasedExplorerChangeRootContextCommand)); - ABuilder.AddExplorerContextCommand(AddCommand(TdxPSFileBasedExplorerSetAsRootContextCommand)); - ABuilder.AddExplorerContextCommand(AddCommand(TdxPSFileBasedExplorerGoToUpOneLevelContextCommand)); -end; - -procedure TdxPSFileBasedExplorer.FinalizeCommand(ACommand: TCustomdxPSExplorerContextCommand); -begin - inherited; -end; - -procedure TdxPSFileBasedExplorer.InitializeCommand(ACommand: TCustomdxPSExplorerContextCommand); -begin - inherited; -end; - -class function TdxPSFileBasedExplorer.AcceptItemNameChar(AnItem: TCustomdxPSExplorerItem; - Ch: Char): Boolean; -begin - Result := Pos(Ch, InvalidFileNameChars) = 0; -end; - -function TdxPSFileBasedExplorer.AcquireExtension(const AName: string): string; -begin - Result := ChangeFileExt(SuppressExtension(AName), '.' + FileExtension); -end; - -function TdxPSFileBasedExplorer.SuppressExtension(const AName: string): string; -begin - Result := ChangeFileExt(AName, ''); -end; - -procedure TdxPSFileBasedExplorer.CreateAndCloseFile(const AName: string); -var - DirectoryName: string; -begin - DirectoryName := ExtractFileDir(AName); - if not DirectoryExists(DirectoryName) then - begin - {$IFNDEF DELPHI5} - ForceDirectories(DirectoryName); - if not DirectoryExists(DirectoryName) then - {$ELSE} - if not ForceDirectories(DirectoryName) then - {$ENDIF} - ProcessIOError(True); - end; - - with TFileStream.Create(AName, fmCreate) do - Free; -end; - -function TdxPSFileBasedExplorer.CreateDataStream(const AFileName: string; - AMode: TdxPSStreamMode): TStream; -const - FileModesMap: array[TdxPSStreamMode] of Word = - (fmOpenRead or fmShareDenyWrite, fmCreate or fmOpenWrite or fmShareDenyWrite, fmOpenReadWrite); -begin - if FileExists(AFileName) then - try - Result := TFileStream.Create(AFileName, FileModesMap[AMode]); - except - Result := nil; - end - else - Result := nil; -end; - -function TdxPSFileBasedExplorer.CreateItemDataStream(AnItem: TdxPSExplorerItem; - AMode: TdxPSStreamMode): TStream; -begin - Result := CreateDataStream((AnItem as TdxPSFileBasedExplorerItem).FullQualifiedFileName, AMode); -end; - -procedure TdxPSFileBasedExplorer.DoLoadData(AFolder: TdxPSExplorerFolder); - - function AddChildFolder(AParent: TdxPSExplorerFolder; const ASearchRec: TSearchRec): TdxPSExplorerFolder; - begin - Result := GetFolderClass.Create(Self, AParent); - Result.Name := ASearchRec.Name; - end; - - function AddChildItem(AParent: TdxPSExplorerFolder; const ASearchRec: TSearchRec; - const AFileName: string): TdxPSExplorerItem; - var - Stream: TStream; - ReportDocument: TdxPSReportDocument; - begin - Result := GetItemClass.Create(Self, AParent); - try - Result.Name := ASearchRec.Name; - - Stream := CreateDataStream(AFileName, smRead); - try - ReportDocument := TBasedxReportLink.ExtractReportDocument(Stream, True); - try - Result.ReportDocument.Assign(ReportDocument); - Result.ReportDocument.Caption := SuppressExtension(Result.Name); - finally - ReportDocument.Free; - end; - finally - Stream.Free; - end; - except - Result.Free; - raise; - end; - end; - - function DoFilterLinkClass(const AFileName: string): Boolean; - var - Stream: TStream; - begin - Result := True; - if FilterLinkClass <> nil then - begin - Stream := CreateDataStream(AFileName, smRead); - try - Result := FilterLinkClass = TBasedxReportLink.ExtractComponentClass(Stream, False); - finally - Stream.Free; - end; - end; - end; - - function IsValidReportFile(const AName: string): Boolean; - begin - Result := HasExtension(AName, '.' + FileExtension) and DoFilterLinkClass(AName); - end; - - function IsDirectoryEmpty(APath: string): Boolean; - var - Found: Integer; - SearchRec: TSearchRec; - begin - Result := True; - Found := FindFirst(APath + '\*.*', faAnyFile, SearchRec); - try - while Found = 0 do - begin - if (SearchRec.Name <> '.') and (SearchRec.Name <> '..') then - begin - Result := not ((SearchRec.Attr and faDirectory <> 0) or IsValidReportFile(APath + '\' + SearchRec.Name)); - if not Result then Break; - end; - Found := FindNext(SearchRec); - end - finally - FindClose(SearchRec); - end; - end; - - procedure LoadDirectory(AParent: TdxPSExplorerFolder; const APath: string); - var - Found: Integer; - SearchRec: TSearchRec; - Folder: TdxPSExplorerFolder; - FileName: string; - begin - Found := SysUtils.FindFirst(APath + '\*.*', faDirectory, SearchRec); - try - while Found = 0 do - begin - if (SearchRec.Name <> '.') and (SearchRec.Name <> '..') then - begin - try - FileName := APath + '\' + SearchRec.Name; - if SearchRec.Attr and faDirectory <> 0 then - begin - Folder := AddChildFolder(AParent, SearchRec); - if eoLoadAll in Options then - LoadDirectory(Folder, FileName) - else - TdxPSExplorerFolderHelper.SetHasChildren(Folder, not IsDirectoryEmpty(FileName)); - end - else - if IsValidReportFile(FileName) then - AddChildItem(AParent, SearchRec, FileName); - except - DoLoadError(SearchRec.Name); - end; - end; - Found := SysUtils.FindNext(SearchRec); - end; - finally - SysUtils.FindClose(SearchRec); - end; - end; - -begin - LoadDirectory(AFolder, TdxPSFileBasedExplorerFolder(AFolder).FullQualifiedDirName); -end; - -procedure TdxPSFileBasedExplorer.DoLoadError(const AName: string); -begin - if Assigned(FOnLoadError) then FOnLoadError(Self, AName); -end; - -procedure TdxPSFileBasedExplorer.RestoreLoadedItem; -begin - if FLastLoadedFileName <> '' then - begin - InternalSetLoadedItem(FindItemByFullQualifiedFileName(FLastLoadedFileName)); - FLastLoadedFileName := ''; - end; -end; - -procedure TdxPSFileBasedExplorer.SaveLoadedItem; -begin - if LoadedItem <> nil then - FLastLoadedFileName := LoadedItem.FullQualifiedFileName - else - FLastLoadedFileName := ''; -end; - -class function TdxPSFileBasedExplorer.GetFolderClass: TdxPSExplorerFolderClass; -begin - Result := TdxPSFileBasedExplorerFolder; -end; - -class function TdxPSFileBasedExplorer.GetRootFolderClass: TdxPSExplorerFolderClass; -begin - Result := TdxPSFileBasedExplorerRootFolder; -end; - -class function TdxPSFileBasedExplorer.GetItemClass: TdxPSExplorerItemClass; -begin - Result := TdxPSFileBasedExplorerItem; -end; - -function TdxPSFileBasedExplorer.GetRegistryPath: string; -begin - if dxPSEngine.RealRegistryPath <> '' then - Result := dxPSEngine.RealRegistryPath + sdxRegistryRootPath + Name - else - Result := ''; -end; - -function TdxPSFileBasedExplorer.GetRootDisplayName: string; -begin - if not Root.IsVolume then - begin - if dxSameText(RealRootPath, RemoveTrailingBackSlash(RootPath)) then - Result := RootPath - else - Result := inherited GetRootDisplayName + ' (' + RealRootPath + ')'; - Result := RemoveTrailingBackSlash(Result); - end - else - Result := Root.VolumeLabel + ' (' + RemoveTrailingBackSlash(RootPath) + ')'; -end; - -procedure TdxPSFileBasedExplorer.MoveTo(AnItem: TCustomdxPSExplorerItem; - AParent: TdxPSExplorerFolder); -begin - BeginIO; - try - inherited; - finally - EndIO; - end; -end; - -procedure TdxPSFileBasedExplorer.BeginIO; -begin - if FIOLockCounter = 0 then IOStatus := mrNone; - Inc(FIOLockCounter); -end; - -procedure TdxPSFileBasedExplorer.EndIO; -begin - Dec(FIOLockCounter); -end; - -procedure TdxPSFileBasedExplorer.CheckIOError(AnIOResult: Boolean); -begin - if not AnIOResult then ProcessIOError; -end; - -procedure TdxPSFileBasedExplorer.ProcessIOError(AnUnconditionalRaiseException: Boolean = False); -begin - if AnUnconditionalRaiseException or (eoShowIOErrors in Options) then - IOError; -end; - -function TdxPSFileBasedExplorer.GetActiveFolder: TdxPSFileBasedExplorerFolder; -begin - Result := inherited ActiveFolder as TdxPSFileBasedExplorerFolder; -end; - -function TdxPSFileBasedExplorer.GetActiveFolderPath: string; -begin - if ActiveFolder <> nil then - Result := ActiveFolder.FullQualifiedDirName - else - Result := ''; -end; - -function TdxPSFileBasedExplorer.GetRealRootPath: string; -begin - if RootPath <> '' then - Result := RootPath - else - Result := GetCurrentDir; - Result := RemoveTrailingBackSlash(Result); -end; - -function TdxPSFileBasedExplorer.GetRoot: TdxPSFileBasedExplorerRootFolder; -begin - Result := inherited Root as TdxPSFileBasedExplorerRootFolder; -end; - -procedure TdxPSFileBasedExplorer.SetActiveFolder(Value: TdxPSFileBasedExplorerFolder); -begin - inherited ActiveFolder := Value; -end; - -procedure TdxPSFileBasedExplorer.SetOptions(Value: TdxPSFileBasedExplorerOptions); -var - ChangedBits: TdxPSFileBasedExplorerOptions; -begin - if FOptions <> Value then - begin - ChangedBits := FOptions + Value - FOptions * Value; - FOptions := Value; - if [eoLoadAll] * ChangedBits <> [] then Refresh; - end; -end; - -procedure TdxPSFileBasedExplorer.SetRootPath(const Value: string); -var - S: string; -begin - S := dxPSUtl.GetLongFileName(Value); - if not dxSameText(FRootPath, S) then - if not dxSameText(RealRootPath, Value) then - begin - BeforeRefresh; - try - FRootPath := S; - Refresh; - finally - AfterRefresh; - end; - end - else - FRootPath := S; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSFillPatterns.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSFillPatterns.pas deleted file mode 100644 index c0e249d0..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSFillPatterns.pas +++ /dev/null @@ -1,455 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSFillPatterns; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, {$IFDEF DELPHI6} Types, {$ENDIF} Graphics, dxCore, dxBase, - dxPSSngltn; - -type - TdxPSPatternBitRow = Word; - TdxPSPatternBitRows = array[0..7] of TdxPSPatternBitRow; - - TdxPSFillPatternClass = class of TdxPSFillPattern; - - TdxPSFillPattern = class(TPersistent) - public - class procedure Register; virtual; - class procedure Unregister; virtual; - - class procedure Bits(var APattern: TdxPSPatternBitRows); virtual; - class function Dimensions: TSize; virtual; - class function Name: string; virtual; - class function RequiredBrushOrigin: Boolean; virtual; - class function RequiredScaling: Boolean; virtual; - class function Solid: Boolean; virtual; - end; - - TdxPSSolidFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - class function RequiredBrushOrigin: Boolean; override; - class function RequiredScaling: Boolean; override; - class function Solid: Boolean; override; - end; - - TdxPSGray50FillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSFillPatternItem = class - private - FBitmap: TBitmap; - FBrush: TBrush; - FPattern: TdxPSFillPatternClass; - protected - procedure Initialize(AIsPrinting: Boolean); - public - constructor Create(APattern: TdxPSFillPatternClass; AIsPrinting: Boolean); - destructor Destroy; override; - - property Bitmap: TBitmap read FBitmap; - property Brush: TBrush read FBrush; - property Pattern: TdxPSFillPatternClass read FPattern; - end; - - TdxPSFillPatternFactory = class(TBasedxPSSingleton) - private - FItems: TList; - FPatterns: TdxClassList; - FPrintItems: TList; - - function GetCount: Integer; - function GetInternalItem(Index: Integer; IsPrinting: Boolean): TdxPSFillPatternItem; - function GetItem(Pattern: TdxPSFillPatternClass; IsPrinting: Boolean): TdxPSFillPatternItem; - function GetPattern(Index: Integer): TdxPSFillPatternClass; - procedure SetInternalItem(Index: Integer; IsPrinting: Boolean; Value: TdxPSFillPatternItem); - - procedure AddPattern(APattern: TdxPSFillPatternClass); - procedure RemovePattern(APattern: TdxPSFillPatternClass); - - function HasItem(APattern: TdxPSFillPatternClass): Boolean; - function HasPrintItem(APattern: TdxPSFillPatternClass): Boolean; - - procedure RemovePatternItem(APattern: TdxPSFillPatternClass); - procedure RemovePatternPrintItem(APattern: TdxPSFillPatternClass); - protected - procedure FinalizeInstance; override; - procedure InitializeInstance; override; - function IndexOf(APattern: TdxPSFillPatternClass): Integer; - property InternalItems[Index: Integer; IsPrinting: Boolean]: TdxPSFillPatternItem read GetInternalItem write SetInternalItem; - public - class function Instance: TdxPSFillPatternFactory; reintroduce; overload; - procedure Register(APattern: TdxPSFillPatternClass); - procedure Unregister(APattern: TdxPSFillPatternClass); - - procedure ResetPrintItems; - property Count: Integer read GetCount; - property Items[Pattern: TdxPSFillPatternClass; IsPrinting: Boolean]: TdxPSFillPatternItem read GetItem; default; - property Patterns[Index: Integer]: TdxPSFillPatternClass read GetPattern; - end; - -function dxPSFillPatternFactory: TdxPSFillPatternFactory; - -implementation - -uses - SysUtils, Forms, cxClasses, dxPSRes, dxPrnDev, dxPSUtl; - -function dxPSFillPatternFactory: TdxPSFillPatternFactory; -begin - Result := TdxPSFillPatternFactory.Instance; -end; - -{ TdxPSFillPattern } - -class procedure TdxPSFillPattern.Register; -begin - dxPSFillPatternFactory.Register(Self); -end; - -class procedure TdxPSFillPattern.Unregister; -begin - dxPSFillPatternFactory.Unregister(Self); -end; - -class procedure TdxPSFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000); -begin - APattern := Bits; -end; - -class function TdxPSFillPattern.Dimensions: TSize; -begin - Result.cX := 8; - Result.cY := 8; -end; - -class function TdxPSFillPattern.Name: string; -begin - Result := ''; -end; - -class function TdxPSFillPattern.RequiredBrushOrigin: Boolean; -begin - Result := True; -end; - -class function TdxPSFillPattern.RequiredScaling: Boolean; -begin - Result := True; -end; - -class function TdxPSFillPattern.Solid: Boolean; -begin - Result := False; -end; - -{ TdxPSSolidFillPattern } - -class procedure TdxPSSolidFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000); -begin - APattern := Bits; -end; - -class function TdxPSSolidFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxSolidFillPattern); -end; - -class function TdxPSSolidFillPattern.RequiredBrushOrigin: Boolean; -begin - Result := False; -end; - -class function TdxPSSolidFillPattern.RequiredScaling: Boolean; -begin - Result := False; -end; - -class function TdxPSSolidFillPattern.Solid: Boolean; -begin - Result := True; -end; - -{ TdxPSGray50FillPattern } - -class procedure TdxPSGray50FillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($5555, $AAAA, $5555, $AAAA, $5555, $AAAA, $5555, $AAAA); -begin - APattern := Bits; -end; - -class function TdxPSGray50FillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxGray50FillPattern); -end; - -{ TdxPSFillPatternItem } - -constructor TdxPSFillPatternItem.Create(APattern: TdxPSFillPatternClass; AIsPrinting: Boolean); -begin - inherited Create; - FBitmap := TBitmap.Create; - FBrush := TBrush.Create; - FPattern := APattern; - Initialize(AIsPrinting); -end; - -destructor TdxPSFillPatternItem.Destroy; -begin - FBrush.Free; - FBitmap.Free; - inherited Destroy; -end; - -procedure TdxPSFillPatternItem.Initialize(AIsPrinting: Boolean); - - procedure ScaleBitmap(ABitmap: TBitmap); - var - Numerator, Denominator: Integer; - TempBitmap: TBitmap; - begin - Numerator := GetDeviceCaps(dxPrintDevice.Handle, LOGPIXELSY); - Denominator := Screen.PixelsPerInch; - TempBitmap := TBitmap.Create; - try - TempBitmap.Assign(ABitmap); - ABitmap.Height := ABitmap.Height * Numerator div Denominator; - ABitmap.Width := ABitmap.Width * Numerator div Denominator; - ABitmap.Canvas.StretchDraw(Rect(0, 0, ABitmap.Width, ABitmap.Height), TempBitmap); - finally - TempBitmap.Free; - end; - end; - -const - Colors: array[Boolean] of TColor = (clWhite, clBlack); -var - Size: TSize; - I, J: Integer; - PatternBits: TdxPSPatternBitRows; - PatternRow: TdxPSPatternBitRow; -begin - Size := Pattern.Dimensions; - if Size.cX < 8 then Size.cX := 8; - if Size.cY < 8 then Size.cY := 8; - - with Bitmap, Canvas do - begin - Width := Size.cX; - Height := Size.cY; - Monochrome := True; - Pattern.Bits(PatternBits); - for I := 0 to Size.cY - 1 do - begin - PatternRow := PatternBits[I]; - for J := 0 to Size.cX - 1 do - Pixels[J, I] := Colors[PatternRow and (1 shl J) = 0]; - end; - end; - - if AIsPrinting and Pattern.RequiredScaling then - ScaleBitmap(Bitmap); - Brush.Bitmap := Bitmap; -end; - -{ TdxPSFillPatternFactory } - -class function TdxPSFillPatternFactory.Instance: TdxPSFillPatternFactory; -begin - Result := inherited Instance as TdxPSFillPatternFactory; -end; - -procedure TdxPSFillPatternFactory.Register(APattern: TdxPSFillPatternClass); -begin - if IndexOf(APattern) = -1 then - begin - AddPattern(APattern); - Classes.RegisterClass(APattern); - end; -end; - -procedure TdxPSFillPatternFactory.Unregister(APattern: TdxPSFillPatternClass); -begin - RemovePattern(APattern); - //Classes.UnregisterClass(APattern); -end; - -procedure TdxPSFillPatternFactory.ResetPrintItems; -var - I: Integer; -begin - for I := 0 to FPrintItems.Count - 1 do - begin - TObject(FPrintItems[I]).Free; - FPrintItems[I] := nil; - end; -end; - -procedure TdxPSFillPatternFactory.FinalizeInstance; - - procedure FreeObjectList(AList: TList); - var - I: Integer; - begin - for I := 0 to AList.Count - 1 do - TObject(AList[I]).Free; - AList.Free; - end; - -begin - FreeObjectList(FItems); - FreeObjectList(FPrintItems); - FreeAndNil(FPatterns); - inherited; -end; - -procedure TdxPSFillPatternFactory.InitializeInstance; -begin - inherited; - FItems := TList.Create; - FPatterns := TdxClassList.Create; - FPrintItems := TList.Create; -end; - -function TdxPSFillPatternFactory.IndexOf(APattern: TdxPSFillPatternClass): Integer; -begin - Result := FPatterns.IndexOf(APattern); -end; - -function TdxPSFillPatternFactory.GetCount: Integer; -begin - Result := FPatterns.Count; -end; - -function TdxPSFillPatternFactory.GetInternalItem(Index: Integer; IsPrinting: Boolean): TdxPSFillPatternItem; -begin - if IsPrinting then - Result := TdxPSFillPatternItem(FPrintItems[Index]) - else - Result := TdxPSFillPatternItem(FItems[Index]); -end; - -function TdxPSFillPatternFactory.GetItem(Pattern: TdxPSFillPatternClass; IsPrinting: Boolean): TdxPSFillPatternItem; -var - Index: Integer; -begin - if Pattern <> nil then - begin - Index := IndexOf(Pattern); - if Index = -1 then - raise EdxException.CreateFmt(cxGetResourceString(@sdxPatternIsNotRegistered), [Pattern.ClassName]); - if InternalItems[Index, IsPrinting] = nil then - InternalItems[Index, IsPrinting] := TdxPSFillPatternItem.Create(Pattern, IsPrinting); - Result := InternalItems[Index, IsPrinting]; - end - else - Result := nil; -end; - -function TdxPSFillPatternFactory.GetPattern(Index: Integer): TdxPSFillPatternClass; -begin - Result := TdxPSFillPatternClass(FPatterns[Index]); -end; - -procedure TdxPSFillPatternFactory.SetInternalItem(Index: Integer; IsPrinting: Boolean; - Value: TdxPSFillPatternItem); -begin - if IsPrinting then - FPrintItems[Index] := Value - else - FItems[Index] := Value; -end; - -procedure TdxPSFillPatternFactory.AddPattern(APattern: TdxPSFillPatternClass); -begin - FPatterns.Add(APattern); - FItems.Add(nil); - FPrintItems.Add(nil); -end; - -procedure TdxPSFillPatternFactory.RemovePattern(APattern: TdxPSFillPatternClass); -begin - if HasItem(APattern) then RemovePatternItem(APattern); - if HasPrintItem(APattern) then RemovePatternPrintItem(APattern); - FPatterns.Remove(APattern); -end; - -function TdxPSFillPatternFactory.HasItem(APattern: TdxPSFillPatternClass): Boolean; -begin - Result := InternalItems[IndexOf(APattern), False] <> nil; -end; - -function TdxPSFillPatternFactory.HasPrintItem(APattern: TdxPSFillPatternClass): Boolean; -begin - Result := InternalItems[IndexOf(APattern), True] <> nil; -end; - -procedure TdxPSFillPatternFactory.RemovePatternItem(APattern: TdxPSFillPatternClass); -var - Item: TdxPSFillPatternItem; -begin - Item := Items[APattern, False]; - FItems.Remove(Item); - Item.Free; -end; - -procedure TdxPSFillPatternFactory.RemovePatternPrintItem(APattern: TdxPSFillPatternClass); -var - Item: TdxPSFillPatternItem; -begin - Item := Items[APattern, True]; - FPrintItems.Remove(Item); - Item.Free; -end; - -initialization - TdxPSSolidFillPattern.Register; - TdxPSGray50FillPattern.Register; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSForm.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSForm.pas deleted file mode 100644 index 6cd6c904..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSForm.pas +++ /dev/null @@ -1,372 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSForm; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, Controls, Messages, Forms, Registry; - -type - TdxPSFormOption = (foSizeableDialog); - TdxPSFormOptions = set of TdxPSFormOption; - - TdxPSFormClass = class of TCustomdxPSForm; - - TCustomdxPSForm = class(TForm) - private - FAreBoundsAssigned: Boolean; - FOptions: TdxPSFormOptions; - function GetActualRegistryPath: string; - function GetGripperBounds: TRect; - - procedure DrawSizeGrip; - procedure InternalLoadPosition(const APath: string); - procedure InternalSavePosition(const APath: string); - function PtInGripperBounds(const Pt: TPoint): Boolean; - procedure SetupHelpEventHandler; - procedure WMNCCreate(var message: TWMNCCreate); message WM_NCCREATE; - procedure WMNCDestroy(var message: TWMNCCreate); message WM_NCDESTROY; - procedure WMNCHitTest(var message: TWMNCHitTest); message WM_NCHITTEST; - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure Paint; override; - procedure Resize; override; - procedure BeforeConstruction; virtual; - function CanLoadFromOrSaveToRegistry: Boolean; virtual; - procedure HelpButtonClick(Sender: TObject); virtual; - function IsFormSizeable: Boolean; virtual; - - property GripperBounds: TRect read GetGripperBounds; - public - destructor Destroy; override; - procedure AfterConstruction; override; - procedure BeforeDestruction; override; - procedure LoadFromRegistry(const APath: string); virtual; - procedure SaveToRegistry(const APath: string); virtual; - - property ActualRegistryPath: string read GetActualRegistryPath; - property AreBoundsAssigned: Boolean read FAreBoundsAssigned; - property Options: TdxPSFormOptions read FOptions write FOptions; - end; - -implementation - -uses - Types, SysUtils, StdCtrls, - {$IFDEF DELPHI7} - Themes, - {$ENDIF} - dxPSGlbl, dxPSUtl, dxPSEngn; - -const - sdxFormLayouts = '\FormLayouts'; // Don't localize - sdxWindowState = 'WindowState'; // Don't localize - sdxLeft = 'Left'; // Don't localize - sdxTop = 'Top'; // Don't localize - sdxWidth = 'Width'; // Don't localize - sdxHeight = 'Height'; // Don't localize - sdxScreenWidth = 'ScreenWidth'; // Don't localize - sdxScreenHeight = 'ScreenHeight'; // Don't localize - -destructor TCustomdxPSForm.Destroy; -begin - inherited; -end; - -procedure TCustomdxPSForm.AfterConstruction; -begin - inherited; - if CanLoadFromOrSaveToRegistry then LoadFromRegistry(ActualRegistryPath); - SetupHelpEventHandler; -end; - -procedure TCustomdxPSForm.BeforeDestruction; -begin - if CanLoadFromOrSaveToRegistry then SaveToRegistry(ActualRegistryPath); - inherited; -end; - -procedure TCustomdxPSForm.LoadFromRegistry(const APath: string); -begin - if dxPSEngine.SaveFormsPosition then InternalLoadPosition(APath); -end; - -procedure TCustomdxPSForm.SaveToRegistry(const APath: string); -begin - if dxPSEngine.SaveFormsPosition then InternalSavePosition(APath); -end; - -procedure TCustomdxPSForm.CreateParams(var Params: TCreateParams); -begin - BeforeConstruction; - inherited; - if foSizeableDialog in Options then - Params.Style := Params.Style or WS_THICKFRAME; - if IsLibrary then // v3 -> Integrate PS into Windows Shell - Params.WndParent := GetForegroundWindow; -end; - -procedure TCustomdxPSForm.Paint; -begin - inherited; - if foSizeableDialog in Options then DrawSizeGrip; -end; - -procedure TCustomdxPSForm.Resize; -begin - inherited; - if foSizeableDialog in Options then Invalidate; -end; - -procedure TCustomdxPSForm.BeforeConstruction; -begin - HelpFile := dxPSEngine.HelpFile; -end; - -function TCustomdxPSForm.CanLoadFromOrSaveToRegistry: Boolean; -begin - Result := dxPSEngine.RealRegistryPath <> ''; -end; - -procedure TCustomdxPSForm.HelpButtonClick(Sender: TObject); -begin - if HelpContext <> 0 then Application.HelpContext(HelpContext); -end; - -function TCustomdxPSForm.IsFormSizeable: Boolean; -begin - Result := HandleAllocated and - (GetWindowLong(Handle, GWL_STYLE) and WS_THICKFRAME = WS_THICKFRAME);// and (dwoSizeable in Options); -end; - -function TCustomdxPSForm.GetActualRegistryPath: string; -begin - Result := dxPSEngine.RealRegistryPath + sdxFormLayouts + '\' + DropT(ClassName); -end; - -function TCustomdxPSForm.GetGripperBounds: TRect; -var - GripSize: Integer; -begin - GripSize := GetSystemMetrics(SM_CXVSCROLL) - 4 * Ord(not dxPSEngine.ThemesEnabled); - Result := Bounds(ClientWidth - GripSize, ClientHeight - GripSize, GripSize, GripSize); -end; - -procedure TCustomdxPSForm.DrawSizeGrip; -begin - {$IFDEF DELPHI7} - if dxPSEngine.ThemesEnabled then - with ThemeServices do - DrawElement(Canvas.Handle, GetElementDetails(tsGripper), GripperBounds) - else - {$ENDIF} - DrawFrameControl(Canvas.Handle, GripperBounds, DFC_SCROLL, DFCS_SCROLLSIZEGRIP); -end; - -procedure TCustomdxPSForm.InternalLoadPosition(const APath: string); -var - Registry: TRegistry; - R: TRect; - ScreenWidth, ScreenHeight: Integer; -begin - Registry := TRegistry.Create; - try - with Registry do - if OpenKey(APath, False) then - try - if ValueExists(sdxWindowState) then - WindowState := TWindowState(ReadInteger(sdxWindowState)); - - R := BoundsRect; - - if ValueExists(sdxLeft) then R.Left := ReadInteger(sdxLeft); - if ValueExists(sdxTop) then R.Top := ReadInteger(sdxTop); - - if IsFormSizeable then - begin - if ValueExists(sdxWidth) then - R.Right := R.Left + ReadInteger(sdxWidth) - else - R.Right := R.Left + Width; - - if ValueExists(sdxHeight) then - R.Bottom := R.Top + ReadInteger(sdxHeight) - else - R.Bottom := R.Top + Height; - end - else - begin - R.Right := R.Left + Width; - R.Bottom := R.Top + Height; - end; - - if WindowState <> wsMaximized then - begin - Position := poDesigned; - if ValueExists(sdxScreenWidth) then - ScreenWidth := ReadInteger(sdxScreenWidth) - else - ScreenWidth := Screen.Width; - if ValueExists(sdxScreenHeight) then - ScreenHeight := ReadInteger(sdxScreenHeight) - else - ScreenHeight := Screen.Height; - - if (Screen.Width <> ScreenWidth) or (Screen.Height <> ScreenHeight) then - begin - if R.Right > Screen.Width then - R.Right := Screen.Width; - if R.Bottom > Screen.Height then - R.Bottom := Screen.Height; - end; - BoundsRect := R; - end; - FAreBoundsAssigned := True; - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Registry.Free; - end; -end; - -procedure TCustomdxPSForm.InternalSavePosition(const APath: string); -var - Registry: TRegistry; - WindowPlacement: TWindowPlacement; - R: TRect; -begin - Registry := TRegistry.Create; - try - with Registry do - if OpenKey(APath, True) then - try - WriteInteger(sdxScreenWidth, Screen.Width); - WriteInteger(sdxScreenHeight, Screen.Height); - WriteInteger(sdxWindowState, Integer(WindowState)); - - FillChar(WindowPlacement, SizeOf(TWindowPlacement), 0); - WindowPlacement.Length := SizeOf(TWindowPlacement); - if not GetWindowPlacement(Handle, @WindowPlacement) then - Exit; - R := WindowPlacement.rcNormalPosition; - - WriteInteger(sdxLeft, R.Left); - WriteInteger(sdxTop, R.Top); - if IsFormSizeable then - begin - WriteInteger(sdxWidth, R.Right - R.Left); - WriteInteger(sdxHeight, R.Bottom - R.Top); - end; - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Registry.Free; - end; -end; - -function TCustomdxPSForm.PtInGripperBounds(const Pt: TPoint): Boolean; -begin - Result := PtInRect(GripperBounds, Pt); -end; - -procedure TCustomdxPSForm.SetupHelpEventHandler; -var - Button: TComponent; -begin - Button := FindComponent(sdxHelpButtonName); - if Button is TButton then - TButton(Button).OnClick := HelpButtonClick; -end; - -procedure TCustomdxPSForm.WMNCCreate(var message: TWMNCCreate); -const - TypeDataSize = 32; -var - HasItem: Boolean; - SysMenu: HMENU; - Info: TMenuItemInfo; - P: Pointer; - S: array[0..TypeDataSize - 1] of Char; -begin - HasItem := False; - SysMenu := 0; - if foSizeableDialog in Options then - begin - SysMenu := GetSystemMenu(Handle, False); - Info.cbSize := SizeOf(Info) - SizeOf(HBITMAP); - Info.fMask := MIIM_ID or MIIM_TYPE; - P := @S[0]; - Info.dwTypeData := P; - Info.cch := TypeDataSize; - HasItem := GetMenuItemInfo(SysMenu, SC_SIZE, False, Info); - end; - inherited; - if HasItem then - InsertMenuItem(SysMenu, 0, True, Info); -end; - -procedure TCustomdxPSForm.WMNCDestroy(var message: TWMNCCreate); -begin - if foSizeableDialog in Options then GetSystemMenu(Handle, True); - inherited; -end; - -procedure TCustomdxPSForm.WMNCHitTest(var message: TWMNCHitTest); -var - Pt: TPoint; -begin - inherited; - if foSizeableDialog in Options then - begin - Pt := SmallPointToPoint(message.Pos); - Pt := ScreenToClient(Pt); - if PtInGripperBounds(Pt) then message.Result := HTBOTTOMRIGHT; - end; -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSGlbl.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSGlbl.pas deleted file mode 100644 index 9036c7ae..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSGlbl.pas +++ /dev/null @@ -1,768 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSGlbl; - -interface - -(*$HPPEMIT '#include ' *) - -{$I cxVer.inc} - -uses - Classes, Windows, Messages, SysUtils, Graphics, Menus, Dialogs, ExtDlgs, cxControls; - -type - TDWORDBits = 0..31; - - {$IFNDEF DELPHI6} - PBoolean = ^Boolean; - {$ENDIF} - - - PBooleanArray = ^TBooleanArray; - TBooleanArray = array[0..0] of Boolean; - - PIntArray = ^TIntArray; - TIntArray = array[0..0] of Integer; - - TRects = array of TRect; - TIntegers = array of Integer; - - TdxDriveType = (dtUnknown, dtNoRootDir, dtRemovable, dtFixed, dtRemote, dtCDROM, dtRamDisk); - - TdxPageOrder = (poOverThenDown, poDownThenOver); - - TdxPageNumberFormat = (pnfNumeral, pnfChars, pnfUpperChars, pnfRoman, pnfUpperRoman); - - TdxUpDownGlyph = (udgUp, udgDown); - - TdxPSLookAndFeel = (pslfStandard, pslfFlat, pslfWinXP, pslfOffice11); - - TdxPSVersion = record - Major: Integer; - Minor: Integer; - SubMinor: Integer; - end; - -const - NullPoint: TPoint = (X: 0; Y: 0); - NullRect: TRect = (Left: 0; Top: 0; Right: 0; Bottom: 0); - NullDC = 0; - - {$IFNDEF DELPHI6} - clCream = TColor($A6CAF0); - clMoneyGreen = TColor($C0DCC0); - clSkyBlue = TColor($FFFBF0); - clMedGray = TColor($A4A0A0); - {$ENDIF} - - {$IFDEF DELPHI5} - cMenuSeparator = Menus.cLineCaption; - {$ELSE} - cMenuSeparator = '-'; - {$ENDIF} - cPageRangeSeparator = '-'; - cPageSeparator = ','; - - WM_DX = WM_APP + 100; - WMPS_PRINTSTYLELISTCHANGED = WM_DX + 1; - WMPS_PRINTERLISTCHANGED = WM_DX + 2; - WMPS_INITIALIZEPRINTER = WM_DX + 3; - - GLYPH_UPARROW = 53; - GLYPH_DOWNARROW = 54; - - APPCOMMAND_BROWSER_BACKWARD = 1; - {$EXTERNALSYM APPCOMMAND_BROWSER_BACKWARD} - APPCOMMAND_BROWSER_FORWARD = 2; - {$EXTERNALSYM APPCOMMAND_BROWSER_FORWARD} - APPCOMMAND_BROWSER_HOME = 7; - {$EXTERNALSYM APPCOMMAND_BROWSER_HOME} - APPCOMMAND_HELP = 27; - {$EXTERNALSYM APPCOMMAND_HELP} - APPCOMMAND_FIND = 28; - {$EXTERNALSYM APPCOMMAND_FIND} - APPCOMMAND_NEW = 29; - {$EXTERNALSYM APPCOMMAND_NEW} - APPCOMMAND_OPEN = 30; - {$EXTERNALSYM APPCOMMAND_OPEN} - APPCOMMAND_CLOSE = 31; - {$EXTERNALSYM APPCOMMAND_CLOSE} - APPCOMMAND_SAVE = 32; - {$EXTERNALSYM APPCOMMAND_SAVE} - APPCOMMAND_PRINT = 33; - {$EXTERNALSYM APPCOMMAND_PRINT} - APPCOMMAND_UNDO = 34; - {$EXTERNALSYM APPCOMMAND_UNDO} - APPCOMMAND_REDO = 35; - {$EXTERNALSYM APPCOMMAND_REDO} - APPCOMMAND_COPY = 36; - {$EXTERNALSYM APPCOMMAND_COPY} - APPCOMMAND_CUT = 37; - {$EXTERNALSYM APPCOMMAND_CUT} - APPCOMMAND_PASTE = 38; - {$EXTERNALSYM APPCOMMAND_PASTE} - - FAPPCOMMAND_MOUSE = $00008000; - {$EXTERNALSYM FAPPCOMMAND_MOUSE} - FAPPCOMMAND_KEY = $00000000; - {$EXTERNALSYM FAPPCOMMAND_KEY} - FAPPCOMMAND_OEM = $00001000; - {$EXTERNALSYM FAPPCOMMAND_OEM} - FAPPCOMMAND_MASK = $0000F000; - {$EXTERNALSYM FAPPCOMMAND_MASK} - - {$IFNDEF DELPHI7} - WM_APPCOMMAND = $0319; - {$IFDEF CBUILDER5} - {$EXTERNALSYM WM_APPCOMMAND} - {$ENDIF} - {$ENDIF} - - HDF_SORTDOWN = $0200; - HDF_SORTUP = $0400; - - {$IFDEF CBUILDER6} - {$EXTERNALSYM HDF_SORTDOWN} - {$EXTERNALSYM HDF_SORTUP} - {$ENDIF} - - {$IFNDEF DELPHI7} - CS_DROPSHADOW = $20000; - {$IFDEF CBUILDER6} - {$EXTERNALSYM CS_DROPSHADOW} - {$ENDIF} - - BIF_NEWDIALOGSTYLE = $0040; - {$IFDEF CBUILDER5} - {$EXTERNALSYM BIF_NEWDIALOGSTYLE} - {$ENDIF} - {$ENDIF} - - {$EXTERNALSYM UNLEN} - UNLEN = 256; // Max computer user name (lmcons.h) - - { Cell Sides } - dxFormatLeftSide = $00000001; - dxFormatTopSide = $00000002; - dxFormatRightSide = $00000004; - dxFormatBottomSide = $00000008; - dxFormatRect = $0000000F; - { Horizontal Alignment } - dxFormatTextAlignXOffset = $00000004; - dxFormatTextAlignXLeft = $00000000; - dxFormatTextAlignXCenter = $00000010; - dxFormatTextAlignXRight = $00000020; - dxFormatTextAlignXJustify = $00000030; - dxFormatTextAlignXDistribute = $00000040; - dxFormatTextAlignXMask = - dxFormatTextAlignXLeft or dxFormatTextAlignXCenter or dxFormatTextAlignXRight or - dxFormatTextAlignXJustify or dxFormatTextAlignXDistribute; - { Vertical Alignment } - dxFormatTextAlignYOffset = $00000007; - dxFormatTextAlignYTop = $00000000; - dxFormatTextAlignYCenter = $00000080; - dxFormatTextAlignYBottom = $00000100; - dxFormatTextAlignYDistribute = $00000180; - dxFormatTextAlignYMask = - dxFormatTextAlignYTop or dxFormatTextAlignYCenter or - dxFormatTextAlignYBottom or dxFormatTextAlignYDistribute; - { Text Attributes } - dxFormatEndEllipsis = $00000200; - dxFormatMultiline = $00000400; - dxFormatTransparent = $00000800; - dxFormatBreakByChars = $40000000; - dxFormatHidePrefix = $00080000; - { Checkmark Attributes } - dxFormatCheckChecked = $00001000; - dxFormatCheckEnabled = $00002000; - dxFormatCheckButtonEdgeStyleOffset = $0000000E; - dxFormatCheckEdgeStyleNone = $00000000; - dxFormatCheckEdgeStyle3D = $00004000; - dxFormatCheckEdgeStyleSoft3D = $00008000; - dxFormatCheckEdgeStyleBoldFlat = $0000C000; - dxFormatCheckEdgeStyleUltraFlat = $00010000; - dxFormatCheckEdgeStyleSingle = $00014000; - dxFormatCheckButtonEdgeStyleMask = - dxFormatCheckEdgeStyle3D or dxFormatCheckEdgeStyleSoft3D or - dxFormatCheckEdgeStyleBoldFlat or dxFormatCheckEdgeStyleUltraFlat or - dxFormatCheckEdgeStyleSingle; - dxFormatCheckFlat = $00004000; // obsolete - dxFormatCheckBold = $00008000; // obsolete - { Text Exceeds} - dxFormatPreventLeftTextExceed = $00100000; - dxFormatPreventTopTextExceed = $00200000; - { Sort Order } - dxFormatSortOrderOffset = $00000016; - dxFormatSortNo = $00000000; - dxFormatSortUp = $00400000; - dxFormatSortDown = $00800000; - dxFormatSortOrderMask = dxFormatSortUp or dxFormatSortDown; - { Misc } - dxFormatMakeSpaceForEmptyImage = $01000000; - dxFormatImageTransparent = $02000000; - dxFormatIsTextDrawnForCenteredImage = $10000000; - dxFormatIsTextShiftedForHorizontallyCenteredImage = $20000000; - { Check Mark position } - dxFormatCheckPosOffset = $0000001A; - dxFormatCheckPosLeft = $00000000; - dxFormatCheckPosCenter = $04000000; - dxFormatCheckPosRight = $08000000; - dxFormatCheckPosMask = dxFormatCheckPosCenter or dxFormatCheckPosRight; - dxFormatCheckGlyphCountOffset = $0000001C; - dxFormatCheckGlyphCountMask = $70000000; // we use 3 bits for GlyphCount - { Shadow } - dxFormatShowShadow = $00020000; - { Cliping } - dxFormatExcludeFromClipRgn = $00040000; - dxFormatVisible = $80000000; - { ReportCells } - dxFormatClipChildren = $00080000; - { ReportGroups } - dxFormatOwnBorderClass = $00000200; // dxFormatEndEllipsis - - { Bits Overriding } - { since we don't need some FormatBits for rendering several items we are allowed to safely override them } - - { Image Layout } - { overriden bits ->> dxFormatCheckChecked, dxFormatCheckEnabled, dxFormatCheckEdgeStyleXXX } - dxFormatImageLayoutOffset = $0000000C; - dxFormatImageLayoutTopLeft = $00000000; - dxFormatImageLayoutTopCenter = $00001000; - dxFormatImageLayoutTopRight = $00002000; - dxFormatImageLayoutCenterLeft = $00003000; - dxFormatImageLayoutCenterCenter = $00004000; - dxFormatImageLayoutCenterRight = $00005000; - dxFormatImageLayoutBottomLeft = $00006000; - dxFormatImageLayoutBottomCenter = $00007000; - dxFormatImageLayoutBottomRight = $00008000; - dxFormatImageLayoutMask = - dxFormatImageLayoutTopLeft or dxFormatImageLayoutTopCenter or - dxFormatImageLayoutTopRight or dxFormatImageLayoutCenterLeft or - dxFormatImageLayoutCenterCenter or dxFormatImageLayoutCenterRight or - dxFormatImageLayoutBottomLeft or dxFormatImageLayoutBottomCenter or - dxFormatImageLayoutBottomRight; - { Graphic DrawMode } - { overriden bits ->> Text Horz. Alignment } - dxFormatGraphicDrawModeOffset = $00000004; - dxFormatGraphicDrawModeNone = $00000000; - dxFormatGraphicDrawModeCenter = $00000010; - dxFormatGraphicDrawModeStretch = $00000020; - dxFormatGraphicDrawModeStretchProportional = $00000030; - dxFormatGraphicDrawModeCenterAndStretchProportional = $00000040; - dxFormatGraphicDrawModeMask = - dxFormatGraphicDrawModeCenter or dxFormatGraphicDrawModeStretch or - dxFormatGraphicDrawModeStretchProportional or dxFormatGraphicDrawModeCenterAndStretchProportional; - { Graphic Buffering } - { overriden bits ->> Text Vert. Alignment } - dxFormatGraphicBufferingOffset = $00000007; - dxFormatGraphicBufferingDefault = $00000000; - dxFormatGraphicBufferingNone = $00000080; - dxFormatGraphicBufferingAlways = $00000100; - dxFormatGraphicBufferingMask = - dxFormatGraphicBufferingNone or dxFormatGraphicBufferingAlways; - { Expand Button } - { overriden bits ->> Text Alignment (Horz and Vert), dxFormatEndEllipsis, dxFormatMultiline and dxFormatCheckChecked } - dxFormatExpandButtonBorder3D = $00000010; - dxFormatExpandButtonBorder3DSoft = $00000020; - dxFormatExpandButtonBorderShadow = $00000040; - dxFormatExpandButtonExpanded = $00000080; - dxFormatExpandButtonKeepOddSize = $00000100; - dxFormatExpandButtonTransparent = $00000200; - dxFormatExpandButtonShowBorder = $00000400; - dxFormatExpandButtonVisible = $00001000; - { TreeLines } - { overriden bits ->> dxFormatSortXXX and dxFormatMakeSpaceForEmptyImage } - dxFormatTreeLineModeOffset = $00000016; - dxFormatTreeLineModeNone = $00000000; - dxFormatTreeLineModeVertical = $00400000; - dxFormatTreeLineModeCross = $00800000; - dxFormatTreeLineModeTopRightCorner = $00C00000; - dxFormatTreeLineModeBottomRightCorner = $01000000; - dxFormatTreeLineModeMask = - dxFormatTreeLineModeVertical or dxFormatTreeLineModeCross or - dxFormatTreeLineModeTopRightCorner or dxFormatTreeLineModeBottomRightCorner; - { ExpandButtonEx -> FormatEx codes } - dxFormatExButtonAlignHorzOffset = $00000000; - dxFormatExButtonAlignHorzLeft = $00000000; - dxFormatExButtonAlignHorzCenter = $00000001; - dxFormatExButtonAlignHorzRight = $00000002; - dxFormatExButtonAlignHorzMask = - dxFormatExButtonAlignHorzCenter or dxFormatExButtonAlignHorzRight; - dxFormatExButtonAlignVertOffset = $00000002; - dxFormatExButtonAlignVertTop = $00000000; - dxFormatExButtonAlignVertCenter = $00000004; - dxFormatExButtonAlignVertBottom = $00000008; - dxFormatExButtonAlignVertMask = - dxFormatExButtonAlignVertCenter or dxFormatExButtonAlignVertBottom; - { Shapes } - { overriden bits ->> dxFormatImageLayoutXXX } - dxFormatShapeTransparent = $10000000; - { Report groups } - { overriden bits ->> dxFormatImageLayoutXXX } - dxFormatGroupShowCaption = $10000000; - dxFormatGroupCaptionTransparent = $20000000; - - sdxPSRegPath = 'Software\Developer Express\PrintingSystem'; // Don't localize - sdxPSRegPathCustomColors = '\CustomColors'; // Don't localize - sdxPSRegPathDesignTime = sdxPSRegPath + '\DesignTime'; // Don't localize - sdxPSRegPathRunTime = sdxPSRegPath + '\RunTime'; // Don't localize - sdxPSRegPathRunTimeFormLayouts = '\Developer Express\PrintingSystem\FormLayouts'; // Don't localize - - dxDefaultMinPrintableArea: Integer = 50000; // In thousandths of mm - dxDefaultInitialMargins: TRect = (Left: 12700; Top: 12700; Right: 12700; Bottom: 12700); // In thousandths of mm - dxDefaultPhysicalPaperOffsets: TPoint = (X: 6350; Y: 6350); // In thousandths of mm - dxDefaultInitialHeader: Integer = 6350; // In thousandths of mm - dxDefaultInitialFooter: Integer = 6350; // In thousandths of mm - - dxStyleGlyphSize: TPoint = (X: 32; Y: 32); - - { HelpContext constants } - - { DesignTime } - dxhcAddEmptyLinkDlg: THelpContext = 0; - dxhcAddLinkDlg: THelpContext = 0; - dxhcAddStyleDlg: THelpContext = 0; - dxhcEditDescriptionDlg: THelpContext = 0; - dxhcPrintStylesDesignWindow: THelpContext = 0; - dxhcReportLinkDesignWindow: THelpContext = 0; - - { DesignTime - RunTime } - dxhcCompositionReportLinkDesigner: THelpContext = 0; - dxhcStringGridReportLinkDesigner: THelpContext = 0; - dxhcDrawGridReportLinkDesigner: THelpContext = 0; - dxhcListBoxReportLinkDesigner: THelpContext = 0; - dxhcCheckListBoxReportLinkDesigner: THelpContext = 0; - dxhcListViewReportLinkDesigner: THelpContext = 0; - dxhcTextReportLinkDesigner: THelpContext = 0; - dxhcTreeViewReportLinkDesigner: THelpContext = 0; - dxhcTreeListReportLinkDesigner: THelpContext = 0; - dxhcOrgChartReportLinkDesigner: THelpContext = 0; - dxhcFlowChartReportLinkDesigner: THelpContext = 0; - dxhcInspectorGridReportLinkDesigner: THelpContext = 0; - dxhcMasterViewReportLinkDesigner: THelpContext = 0; - dxhccxMCListBoxReportLinkDesigner: THelpContext = 0; - dxhccxSpreadSheetReportLinkDesigner: THelpContext = 0; - dxhccxGridReportLinkDesigner: THelpContext = 0; - dxhccxTreeListReportLinkDesigner: THelpContext = 0; - dxhccxVerticalGridReportLinkDesigner: THelpContext = 0; - dxhccxSchedulerReportLinkDesigner: THelpContext = 0; - dxhccxPivotGridReportLinkDesigner: THelpContext = 0; - - dxhcPrintDlg: THelpContext = 0; - dxhcPageSetupDlg: THelpContext = 0; - dxhcFEFDlg: THelpContext = 0; - dxhcPreviewPreferencesDlg: THelpContext = 0; - dxhcZoomDlg: THelpContext = 0; - dxhcDefinePrintStyleDlg: THelpContext = 0; - dxhcDateTimeFormatDlg: THelpContext = 0; - dxhcPageNumberFormatDlg: THelpContext = 0; - dxhcTitlePropertiesDlg: THelpContext = 0; - dxhcAutoHFTextEntriesDlg: THelpContext = 0; - dxhcAddItemsToCompositionDlg: THelpContext = 0; - dxhcAddComponentsToComponentPrinterDlg: THelpContext = 0; - dxhcSelectComponentsDlg: THelpContext = 0; - dxhcPrintSetupDlg: THelpContext = 0; - dxhcPSReportPropertiesDlg: THelpContext = 0; - - dxPSGlblVersion = '3.46'; - dxPSVersion: TdxPSVersion = (Major: 0; Minor: 0; SubMinor: 0); - dxPSStorageVersion: Integer = 1; - dxPSInvalidStorageVersion: Integer = -1; - - sdxHelpButtonName = 'btnHelp'; // Don't localize - sdxPSComponentPage = 'ExpressPrinting System'; // Don't localize - -var - AskPrinterForSupportedFonts: Boolean = False; - - IsComCtrlVersion471: Boolean; - IsComCtrlVersion500: Boolean; - IsComCtrlVersion600: Boolean; - - IsDesignTime: Boolean = False; - - CheckHeight: Integer; - CheckWidth: Integer; - - PathDelimiter: Char; - PercentSymbol: Char = '%' ; //TODO: move up - - PSCanShowHintFunc: function: Boolean = nil; - -function CanShowHints: Boolean; -function GetPSRegRoot: string; -function dxPSVer: Integer; -function dxPSVerMajor: Integer; -function dxPSVerMinor: Integer; -function dxPSVerSubMinor: Integer; -function dxPSVersionString: string; - -function ColorDialog: TColorDialog; -function FontDialog: TFontDialog; -function FontDialogDevice: TFontDialogDevice; - -function StringToPSVersion(AVersion: string; const ASeparator: string = '.'): TdxPSVersion; -function ComparePSVersions(V1, V2: TdxPSVersion): Integer; - -function GET_APPCOMMAND_LPARAM(lParam: LPARAM): Integer; -{$EXTERNALSYM GET_APPCOMMAND_LPARAM} -function GET_DEVICE_LPARAM(lParam: LPARAM): Integer; -{$EXTERNALSYM GET_DEVICE_LPARAM} -function GET_MOUSEORKEY_LPARAM(lParam: LPARAM): Integer; -{$EXTERNALSYM GET_MOUSEORKEY_LPARAM} -function GET_FLAGS_LPARAM(lParam: LPARAM): Integer; -{$EXTERNALSYM GET_FLAGS_LPARAM} -function GET_KEYSTATE_LPARAM(lParam: LPARAM): Integer; -{$EXTERNALSYM GET_KEYSTATE_LPARAM} - -implementation - -uses - Registry, ComCtrls, dxPSUtl, dxPSEngn, dxPrnDev; - -{$IFNDEF DELPHI7} -const - {$IFNDEF DELPHI5} - ComCtlVersionIE5 = $00050000; - {$ENDIF} - ComCtlVersionIE6 = $00060000; -{$ENDIF} - -var - FColorDialog: TColorDialog; - FFontDialog: TFontDialog; - -function CanShowHints: Boolean; -begin - Result := not Assigned(PSCanShowHintFunc) or PSCanShowHintFunc; -end; - -function GetPSRegRoot: string; -const - Paths: array[Boolean] of string = (sdxPSRegPathRunTime, sdxPSRegPathDesignTime); -begin - Result := Paths[IsDesignTime]; -end; - -function dxPSVer: Integer; -begin - Result := dxPSVersion.Major; -end; - -function dxPSVerMajor: Integer; -begin - Result := dxPSVersion.Major; -end; - -function dxPSVerMinor: Integer; -begin - Result := dxPSVersion.Minor; -end; - -function dxPSVerSubMinor: Integer; -begin - Result := dxPSVersion.SubMinor; -end; - -function dxPSVersionString: string; -begin - Result := dxPSGlblVersion; -end; - -{ TdxPSColorDialog } - -type - TdxPSColorDialog = class(TColorDialog) - private - function GetRegistryPath: string; - protected - procedure RestoreCustomColors; - procedure SaveCustomColors; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property RegistryPath: string read GetRegistryPath; - end; - -constructor TdxPSColorDialog.Create(AOwner: TComponent); -begin - inherited; - Options := Options + [cdFullOpen]; - if RegistryPath <> '' then RestoreCustomColors; -end; - -destructor TdxPSColorDialog.Destroy; -begin - if RegistryPath <> '' then SaveCustomColors; - inherited; -end; - -procedure TdxPSColorDialog.RestoreCustomColors; -var - Registry: TRegistry; - Path, S: string; - Strings: TStringList; - I: Integer; -begin - Registry := TRegistry.Create; - with Registry do - try - Path := RegistryPath; - if OpenKey(Path, False) then - begin - CustomColors.Clear; - Strings := TStringList.Create; - try - GetValueNames(Strings); - for I := 0 to Strings.Count - 1 do - begin - S := Strings[I]; - if ValueExists(S) then - try - S := S + '=' + ReadString(S); - except - on ERegistryException do - Continue - else - raise; - end; - ColorDialog.CustomColors.Add(S); - end; - finally - Strings.Free; - end; - end; - finally - Free; - end; -end; - -procedure TdxPSColorDialog.SaveCustomColors; -var - Registry: TRegistry; - Path, S: string; - I, P: Integer; -begin - Registry := TRegistry.Create; - with Registry do - try - Path := RegistryPath; - if KeyExists(Path) then - DeleteKey(Path); - - if OpenKey(Path, True) then - for I := 0 to ColorDialog.CustomColors.Count - 1 do - begin - S := CustomColors[I]; - P := Pos('=', S); - if P <> 0 then - begin - S := Copy(S, 1, P - 1); - try - WriteString(S, ColorDialog.CustomColors.Values[S]); - except - on ERegistryException do - else - raise; - end; - end; - end; - finally - Free; - end; -end; - -function TdxPSColorDialog.GetRegistryPath: string; -begin - Result := dxPSEngn.dxPSEngine.RealRegistryPath; - if Result <> '' then - Result := Result + sdxPSRegPathCustomColors; -end; - -function ColorDialog: TColorDialog; -begin - if FColorDialog = nil then - FColorDialog := TdxPSColorDialog.Create(nil); - Result := FColorDialog; -end; - -{ TdxPSFontDialog } - -type - TdxPSFontDialog = class(TFontDialog) - public - constructor Create(AOwner: TComponent); override; - function Execute: Boolean; override; - end; - -constructor TdxPSFontDialog.Create(AOwner: TComponent); -begin - inherited; - Options := [fdEffects, fdScalableOnly, fdTrueTypeOnly]; -end; - -function TdxPSFontDialog.Execute: Boolean; -begin - Device := FontDialogDevice; - Result := inherited Execute; -end; - -function FontDialog: TFontDialog; -begin - if FFontDialog = nil then - FFontDialog := TdxPSFontDialog.Create(nil); - Result := FFontDialog; -end; - -function FontDialogDevice: TFontDialogDevice; -begin - if AskPrinterForSupportedFonts and dxPrnDev.dxInitPrintDevice(False) then - Result := fdPrinter - else - Result := fdScreen; -end; - -function GET_APPCOMMAND_LPARAM(lParam: LPARAM): Integer; -begin - Result := Shortint(HiWord(lParam) and not FAPPCOMMAND_MASK); -end; - -function GET_DEVICE_LPARAM(lParam: LPARAM): Integer; -begin - Result := Word(HiWord(lParam) and FAPPCOMMAND_MASK); -end; - -function GET_MOUSEORKEY_LPARAM(lParam: LPARAM): Integer; -begin - Result := GET_DEVICE_LPARAM(lParam); -end; - -function GET_FLAGS_LPARAM(lParam: LPARAM): Integer; -begin - Result := LoWord(lParam); -end; - -function GET_KEYSTATE_LPARAM(lParam: LPARAM): Integer; -begin - Result := GET_FLAGS_LPARAM(lParam); -end; - -function StringToPSVersion(AVersion: string; const ASeparator: string = '.'): TdxPSVersion; - - function GetVersionFromPos(var AVersion: string): Integer; - var - ACode: Integer; - ANextPos: Integer; - begin - ANextPos := Pos(ASeparator, AVersion); - if (ANextPos = 0) then - ANextPos := Length(AVersion) + 1; - Val(Copy(AVersion, 1, ANextPos - 1), Result, ACode); - AVersion := Copy(AVersion, ANextPos + 1, MaxInt); - end; - -begin - Result.Major := GetVersionFromPos(AVersion); - Result.Minor := GetVersionFromPos(AVersion); - Result.SubMinor := GetVersionFromPos(AVersion); -end; - -function ComparePSVersions(V1, V2: TdxPSVersion): Integer; - - function ComparePart(I1, I2: Integer): Integer; - begin - if I1 > I2 then - Result := 1 - else - if I1 < I2 then - Result := -1 - else - Result := 0; - end; - -begin - Result := ComparePart(V1.Major, V2.Major); - if Result = 0 then - begin - Result := ComparePart(V1.Minor, V2.Minor); - if Result = 0 then - Result := ComparePart(V1.SubMinor, V2.SubMinor); - end; -end; - -procedure InitVersionInfo; -begin - dxPSVersion := StringToPSVersion(dxPSGlblVersion); -end; - -procedure InitComCtlrs; -begin - IsComCtrlVersion471 := ComCtrls.GetComCtlVersion >= ComCtlVersionIE401; - IsComCtrlVersion500 := ComCtrls.GetComCtlVersion >= ComCtlVersionIE5; - IsComCtrlVersion600 := ComCtrls.GetComCtlVersion >= ComCtlVersionIE6; -end; - -procedure InitGlobalConsts; -begin - with TBitmap.Create do - try - Handle := LoadBitmap(0, PChar(OBM_CHECKBOXES)); - - CheckWidth := Width div 4; - CheckHeight := Height div 3; - finally - Free; - end; - - {$IFDEF DELPHI6} - PathDelimiter := SysUtils.PathDelim; - {ELSE} - PathDelimiter := '\'; - {$ENDIF} - -end; - -initialization - InitComCtlrs; - InitGlobalConsts; - InitVersionInfo; - -finalization - FreeAndNil(FColorDialog); - FreeAndNil(FFontDialog); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSGrLnks.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSGrLnks.pas deleted file mode 100644 index 62185067..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSGrLnks.pas +++ /dev/null @@ -1,722 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSGrLnks; - -interface - -{$I cxVer.inc} - -uses - Windows, Forms, Classes, Graphics, StdCtrls, Grids, dxPSCore, dxPSBaseGridLnk, - dxPSGlbl, cxDrawTextUtils; - -type - TdxGridPaintOption = (gpoBorder, gpoHorzLines, gpoVertLines, gpoFixedHorzLines, gpoFixedVertLines); - TdxGridPaintOptions = set of TdxGridPaintOption; - - TCustomdxGridReportLink = class(TAbstractdxGridReportLink) - private - FOptions: TdxGridPaintOptions; - function GetCustomGrid: TCustomGrid; - function GetOptions: TdxGridPaintOptions; - procedure SetOptions(Value: TdxGridPaintOptions); - protected - FSourceFontIndex: Integer; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - - function GetColCount: Integer; override; - function GetFixedColCount: Integer; override; - function GetFixedRowCount: Integer; override; - function GetRowCount: Integer; override; - - function GetSelectionRect: TRect; override; - function GetSourceCellColor(ACol, ARow: Integer): TColor; override; - function GetSourceCellEdgeMode(ACol, ARow: Integer): TdxCellEdgeMode; override; - function GetSourceCellFont(ACol, ARow: Integer): TFont; override; - function GetSourceCellFontIndex(ACol, ARow: Integer): Integer; override; - function GetSourceCellTransparent(ACol, ARow: Integer): Boolean; override; - function GetSourceColWidth(ACol: Integer): Integer; override; - function GetSourceRowHeight(ARow: Integer): Integer; override; - - function IsDrawBorder: Boolean; override; - function IsDrawFixedHorzLines: Boolean; override; - function IsDrawFixedVertLines: Boolean; override; - function IsDrawHorzLines: Boolean; override; - function IsDrawVertLines: Boolean; override; - - procedure PrepareConstruct(AReportCells: TdxReportCells); override; - - property CustomGrid: TCustomGrid read GetCustomGrid; - public - procedure Assign(Source: TPersistent); override; - - property AutoWidth; - property DrawMode; - property Effects3D; - property EvenColor; - property EvenFont; - property FixedColor; - property FixedFont; - property FixedTransparent; - property GridLineColor; - property HeadersOnEveryPage; - property IncludeFixed; - property OddColor; - property OddFont; - property OnlySelected; - property Options: TdxGridPaintOptions read GetOptions write SetOptions - default [gpoBorder, gpoHorzLines, gpoVertLines, gpoFixedHorzLines, gpoFixedVertLines]; - property Soft3D; - property SupportedCustomDraw; - property Transparent; - end; - - TdxCustomDrawItemEvent = procedure(Sender: TBasedxReportLink; - Index: Integer; ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; - var AText: string; AFont: TFont; var AColor: TColor; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean) of object; - - TdxCustomListBoxReportLink = class(TAbstractdxGridReportLink) - private - FCustomDrawFontChanged: Boolean; - FIsWidthAssigned: Boolean; - FSaveFont: TFont; - FTextAlignX: TcxTextAlignX; - FTextAlignY: TcxTextAlignY; - FWidth: Integer; - FOnCustomDrawItem: TdxCustomDrawItemEvent; - function GetWidth: Integer; - function IsWidthStored: Boolean; - procedure SetTextAlignX(Value: TcxTextAlignX); - procedure SetTextAlignY(Value: TcxTextAlignY); - procedure SetWidth(Value: Integer); - procedure CustomDrawFontChanged(Sender: TObject); - protected - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - procedure DoCustomDrawItem(Index: Integer; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var AText: string; AFont: TFont; - var AColor: TColor; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); virtual; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - function IsSupportedCustomDraw(AItem: TAbstractdxReportCellData): Boolean; override; - - function GetColCount: Integer; override; - function GetRowCount: Integer; override; - - function GetCellSides(ACol, ARow: Integer): TdxCellSides; override; - function GetCellText(ACol, ARow: Integer): string; override; - function GetCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; override; - function GetCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; override; - function GetSourceColWidth(ACol: Integer): Integer; override; - function GetSourceRowHeight(ARow: Integer): Integer; override; - function GetSelectedColCount: Integer; override; - function GetSelectedRowCount: Integer; override; - function HasSelection: Boolean; override; - function HasSelectionInRow(ARow: Integer): Boolean; override; - function IsDrawBorder: Boolean; override; - function IsDrawHorzLines: Boolean; override; - function IsSelectedCell(ACol, ARow: Integer): Boolean; override; - function IsSelectedRow(ARow: Integer): Boolean; override; - - function GetCustomListBox: TCustomListBox; virtual; - - property CustomListBox: TCustomListBox read GetCustomListBox; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function DefaultWidth: Integer; virtual; - - property AutoWidth; - property DrawMode; - property EndEllipsis; - property GridLineColor; - property OnlySelected; - property SupportedCustomDraw; - property TextAlignX: TcxTextAlignX read FTextAlignX write SetTextAlignX default taLeft; - property TextAlignY: TcxTextAlignY read FTextAlignY write SetTextAlignY default taCenterY; - property Width: Integer read GetWidth write SetWidth stored IsWidthStored; - property OnCustomDrawItem: TdxCustomDrawItemEvent read FOnCustomDrawItem write FOnCustomDrawItem; - end; - -const - dxDefaultGridPaintOptions: TdxGridPaintOptions = - [gpoBorder, gpoHorzLines, gpoVertLines, gpoFixedHorzLines, gpoFixedVertLines]; - dxDefaultListBoxWidth = 400; - -implementation - -uses - dxPSRes, SysUtils, dxPSUtl; - -type - TCustomGridAccess = class(TCustomGrid); - TCustomListBoxAccess = class(TCustomListBox); - -{ CustomGrid Helpers } - -function GridGetColCount(ACustomGrid: TCustomGrid): Integer; -begin - Result := TCustomGridAccess(ACustomGrid).ColCount; -end; - -function GridGetColor(ACustomGrid: TCustomGrid): TColor; -begin - Result := TCustomGridAccess(ACustomGrid).Color; -end; - -function GridGetColWidth(ACustomGrid: TCustomGrid; AColIndex: Integer): Integer; -begin - Result := TCustomGridAccess(ACustomGrid).ColWidths[AColIndex]; -end; - -function GridGetFixedColor(ACustomGrid: TCustomGrid): TColor; -begin - Result := TCustomGridAccess(ACustomGrid).FixedColor; -end; - -function GridGetFixedCols(ACustomGrid: TCustomGrid): Integer; -begin - Result := TCustomGridAccess(ACustomGrid).FixedCols; -end; - -function GridGetFixedRows(ACustomGrid: TCustomGrid): Integer; -begin - Result := TCustomGridAccess(ACustomGrid).FixedRows; -end; - -function GridGetFont(ACustomGrid: TCustomGrid): TFont; -begin - Result := TCustomGridAccess(ACustomGrid).Font; -end; - -function GridGetOptions(ACustomGrid: TCustomGrid): TGridOptions; -begin - Result := TCustomGridAccess(ACustomGrid).Options; -end; - -function GridGetBorderStyle(ACustomGrid: TCustomGrid): TBorderStyle; -begin - Result := TCustomGridAccess(ACustomGrid).BorderStyle; -end; - -function GridGetRowCount(ACustomGrid: TCustomGrid): Integer; -begin - Result := TCustomGridAccess(ACustomGrid).RowCount; -end; - -function GridGetRowHeight(ACustomGrid: TCustomGrid; ARowIndex: Integer): Integer; -begin - Result := TCustomGridAccess(ACustomGrid).RowHeights[ARowIndex]; -end; - -function GridGetSelection(ACustomGrid: TCustomGrid): TRect; -begin - Result := TRect(TCustomGridAccess(ACustomGrid).Selection); -end; - -{ CustomListBox Helpers } - -function ListBoxGetItemHeight(ACustomListBox: TCustomListBox): Integer; -begin - Result := TCustomListBoxAccess(ACustomListBox).ItemHeight; -end; - -function ListBoxGetItemText(ACustomListBox: TCustomListBox; AnIndex: Integer): string; -begin - Result := TCustomListBoxAccess(ACustomListBox).Items[AnIndex]; -end; - -function ListBoxGetStyle(ACustomListBox: TCustomListBox): TListBoxStyle; -begin - Result := TCustomListBoxAccess(ACustomListBox).Style; -end; - -function ListBoxMeasureItem(ACustomListBox: TCustomListBox; AnIndex: Integer): Integer; -begin - TCustomListBoxAccess(ACustomListBox).MeasureItem(AnIndex, Result); -end; - - -{ TCustomdxGridReportLink } - -procedure TCustomdxGridReportLink.Assign(Source: TPersistent); -begin - inherited; - if Source is TCustomdxGridReportLink then - Options := TCustomdxGridReportLink(Source).Options; -end; - -procedure TCustomdxGridReportLink.InternalRestoreDefaults; -begin - inherited; - Options := dxDefaultGridPaintOptions; {[Low(TdxDrawGridPaintOption)..High(TdxDrawGridPaintOption)]} -end; - -procedure TCustomdxGridReportLink.InternalRestoreFromOriginal; - - procedure XorOption(var AOptions: TdxGridPaintOptions; AElement: TdxGridPaintOption; - Value: Boolean); - begin - if Value then - AOptions := AOptions + [AElement] - else - AOptions := AOptions - [AElement]; - end; - -var - Opt: TdxGridPaintOptions; -begin - inherited; - FixedColor := GridGetFixedColor(CustomGrid); - Opt := Options; - XorOption(Opt, gpoFixedVertLines, goFixedVertLine in GridGetOptions(CustomGrid)); - XorOption(Opt, gpoFixedHorzLines, goFixedHorzLine in GridGetOptions(CustomGrid)); - XorOption(Opt, gpoVertLines, goVertLine in GridGetOptions(CustomGrid)); - XorOption(Opt, gpoHorzLines, goHorzLine in GridGetOptions(CustomGrid)); - XorOption(Opt, gpoBorder, GridGetBorderStyle(CustomGrid) <> bsNone); - Options := Opt; -end; - -function TCustomdxGridReportLink.IsDrawBorder: Boolean; -begin - Result := gpoBorder in Options; -end; - -function TCustomdxGridReportLink.IsDrawHorzLines: Boolean; -begin - Result := gpoHorzLines in Options; -end; - -function TCustomdxGridReportLink.IsDrawVertLines: Boolean; -begin - Result := gpoVertLines in Options; -end; - -function TCustomdxGridReportLink.IsDrawFixedHorzLines: Boolean; -begin - Result := gpoFixedHorzLines in Options; -end; - -function TCustomdxGridReportLink.IsDrawFixedVertLines: Boolean; -begin - Result := gpoFixedVertLines in Options; -end; - -function TCustomdxGridReportLink.GetColCount: Integer; -begin - Result := GridGetColCount(CustomGrid); -end; - -function TCustomdxGridReportLink.GetSourceColWidth(ACol: Integer): Integer; -begin - Result := GridGetColWidth(CustomGrid, ACol); -end; - -function TCustomdxGridReportLink.GetSourceRowHeight(ARow: Integer): Integer; -begin - Result := GridGetRowHeight(CustomGrid, ARow); -end; - -function TCustomdxGridReportLink.GetFixedColCount: Integer; -begin - Result := GridGetFixedCols(CustomGrid); -end; - -function TCustomdxGridReportLink.GetFixedRowCount: Integer; -begin - Result := GridGetFixedRows(CustomGrid); -end; - -function TCustomdxGridReportLink.GetRowCount: Integer; -begin - Result := GridGetRowCount(CustomGrid); -end; - -function TCustomdxGridReportLink.GetSelectionRect: TRect; -begin - Result := GridGetSelection(CustomGrid); -end; - -function TCustomdxGridReportLink.GetSourceCellColor(ACol, ARow: Integer): TColor; -begin - if IsFixedCell(ACol, ARow) then - Result := GridGetFixedColor(CustomGrid) - else - Result := GridGetColor(CustomGrid); -end; - -function TCustomdxGridReportLink.GetSourceCellEdgeMode(ACol, ARow: Integer): TdxCellEdgeMode; -const - EdgeModes: array[Boolean] of TdxCellEdgeMode = (cemPattern, cem3DEffects); -begin - Result := EdgeModes[IsFixedCell(ACol, ARow)]; -end; - -function TCustomdxGridReportLink.GetSourceCellFont(ACol, ARow: Integer): TFont; -begin - Result := GridGetFont(CustomGrid); -end; - -function TCustomdxGridReportLink.GetSourceCellFontIndex(ACol, ARow: Integer): Integer; -begin - Result := FSourceFontIndex; -end; - -function TCustomdxGridReportLink.GetSourceCellTransparent(ACol, ARow: Integer): Boolean; -begin - Result := not IsFixedCell(ACol, ARow); -end; - -procedure TCustomdxGridReportLink.PrepareConstruct(AReportCells: TdxReportCells); -begin - inherited; - FSourceFontIndex := AddFontToPool(GridGetFont(CustomGrid)); -end; - -function TCustomdxGridReportLink.GetCustomGrid: TCustomGrid; -begin - Result := TCustomGrid(Component); -end; - -function TCustomdxGridReportLink.GetOptions: TdxGridPaintOptions; -begin - Result := FOptions; -end; - -procedure TCustomdxGridReportLink.SetOptions(Value: TdxGridPaintOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - LinkModified(True); - end; -end; - -{ TdxCustomListBoxReportLink } - -constructor TdxCustomListBoxReportLink.Create(AOwner: TComponent); -begin - inherited; - FTextAlignX := taLeft; - FTextAlignY := taCenterY; - FSaveFont := TFont.Create; - FSaveFont.OnChange := CustomDrawFontChanged; -end; - -destructor TdxCustomListBoxReportLink.Destroy; -begin - FreeAndNil(FSaveFont); - inherited; -end; - -procedure TdxCustomListBoxReportLink.Assign(Source: TPersistent); -begin - if Source is TdxCustomListBoxReportLink then - with TdxCustomListBoxReportLink(Source) do - begin - Self.FIsWidthAssigned := FIsWidthAssigned; - Self.AutoWidth := AutoWidth; - Self.TextAlignX := TextAlignX; - Self.TextAlignY := TextAlignY; - Self.Width := Width; - end; - inherited; -end; - -function TdxCustomListBoxReportLink.DefaultWidth: Integer; -begin - Result := dxDefaultListBoxWidth; -end; - -function TdxCustomListBoxReportLink.GetCustomListBox: TCustomListBox; -begin - Result := TCustomListBox(Component); -end; - -function TdxCustomListBoxReportLink.IsSelectedCell(ACol, ARow: Integer): Boolean; -begin - Result := IsSelectedRow(ARow); -end; - -function TdxCustomListBoxReportLink.IsSelectedRow(ARow: Integer): Boolean; -begin - Result := HasSelection and CustomListBox.Selected[ARow]; -end; - -procedure TdxCustomListBoxReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - AColor: TColor; - AText: string; - ATextAlignX: TcxTextAlignX; - ATextAlignY: TcxTextAlignY; -begin - with TdxReportCellString(AItem) do - begin - AColor := ColorToRGB(Color); - if Transparent then AColor := clNone; - FSaveFont.Assign(Font); - FCustomDrawFontChanged := False; - AText := Text; - ATextAlignX := TextAlignX; - ATextAlignY := TextAlignY; - DoCustomDrawItem(AItem.Parent.Index, ACanvas, ABoundsRect, AClientRect, AText, - FSaveFont, AColor, ATextAlignX, ATextAlignY, ADone); - if not ADone then - begin - if FCustomDrawFontChanged then - begin - SelectObject(ACanvas.Handle, FSaveFont.Handle); - SetTextColor(ACanvas.Handle, ColorToRGB(FSaveFont.Color)); - FontIndex := -1; - end; - if AColor <> clNone then - begin - Color := AColor; - AItem.Transparent := False; - end; - Text := AText; - TextAlignX := ATextAlignX; - TextAlignY := ATextAlignY; - end; - end; -end; - -procedure TdxCustomListBoxReportLink.DoCustomDrawItem(Index: Integer; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var AText: string; - AFont: TFont; var AColor: TColor; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawItem) then - FOnCustomDrawItem(Self, Index, ACanvas, ABoundsRect, AClientRect, AText, - AFont, AColor, ATextAlignX, ATextAlignY, ADone); -end; - -procedure TdxCustomListBoxReportLink.InternalRestoreDefaults; -begin - inherited; - TextAlignX := dxPSCore.dxDefaultTextAlignX; {taLeft} - TextAlignY := dxPSCore.dxDefaultTextAlignY; {taCenterY} - FIsWidthAssigned := False; -end; - -procedure TdxCustomListBoxReportLink.InternalRestoreFromOriginal; -begin - inherited; - Width := CustomListBox.Width; -end; - -function TdxCustomListBoxReportLink.IsSupportedCustomDraw(AItem: TAbstractdxReportCellData): Boolean; -begin - Result := inherited IsSupportedCustomDraw(AItem) and Assigned(FOnCustomDrawItem); -end; - -function TdxCustomListBoxReportLink.GetColCount: Integer; -begin - Result := 1; -end; - -function TdxCustomListBoxReportLink.GetRowCount: Integer; -begin - Result := CustomListBox.Items.Count; -end; - -function TdxCustomListBoxReportLink.GetCellText(ACol, ARow: Integer): string; -begin - Result := ListBoxGetItemText(CustomListBox, ARow); -end; - -function TdxCustomListBoxReportLink.GetCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; -begin - Result := FTextAlignX; -end; - -function TdxCustomListBoxReportLink.GetCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; -begin - Result := FTextAlignY; -end; - -function TdxCustomListBoxReportLink.GetCellSides(ACol, ARow: Integer): TdxCellSides; - - function IsFirstItem(AItemIndex: Integer): Boolean; - var - I: Integer; - begin - if not OnlySelected or (CustomListBox.SelCount = 0) then - Result := AItemIndex = 0 - else - begin - for I := 0 to CustomListBox.Items.Count - 1 do - if CustomListBox.Selected[I] then - begin - Result := AItemIndex = I; - Exit; - end; - Result := False; - end; - end; - - function IsLastItem(AItemIndex: Integer): Boolean; - var - I: Integer; - begin - if not OnlySelected or (CustomListBox.SelCount = 0) then - Result := AItemIndex = CustomListBox.Items.Count - 1 - else - begin - for I := CustomListBox.Items.Count - 1 downto 0 do - if CustomListBox.Selected[I] then - begin - Result := AItemIndex = I; - Exit; - end; - Result := False; - end; - end; - -begin - Result := csAll; - if not IsDrawBorder then - begin - Result := Result - [csLeft, csRight]; - if IsFirstItem(ARow) then Exclude(Result, csTop); - if IsLastItem(ARow) then Exclude(Result, csBottom); - end; - if not IsDrawHorzLines then - begin - if not IsFirstItem(ARow) then Exclude(Result, csTop); - if not IsLastItem(ARow) then Exclude(Result, csBottom); - end; -end; - -function TdxCustomListBoxReportLink.GetSelectedColCount: Integer; -begin - Result := 1; -end; - -function TdxCustomListBoxReportLink.GetSelectedRowCount: Integer; -begin - Result := CustomListBox.SelCount; -end; - -function TdxCustomListBoxReportLink.GetSourceColWidth(ACol: Integer): Integer; -begin - if IsAggregated then - Result := CustomListBox.Width - else - Result := Width; -end; - -function TdxCustomListBoxReportLink.GetSourceRowHeight(ARow: Integer): Integer; -begin - Result := 4 + ListBoxGetItemHeight(CustomListBox); - if ListBoxGetStyle(CustomListBox) = lbOwnerDrawVariable then - Result := ListBoxMeasureItem(CustomListBox, ARow); - if Result < 2 then Result := 2; -end; - -function TdxCustomListBoxReportLink.HasSelection: Boolean; -begin - Result := inherited HasSelection and (CustomListBox.SelCount > 0); -end; - -function TdxCustomListBoxReportLink.HasSelectionInRow(ARow: Integer): Boolean; -begin - Result := IsSelectedRow(ARow); -end; - -function TdxCustomListBoxReportLink.IsDrawBorder: Boolean; -begin - Result := True; -end; - -function TdxCustomListBoxReportLink.IsDrawHorzLines: Boolean; -begin - Result := True; -end; - -function TdxCustomListBoxReportLink.GetWidth: Integer; -begin - if FIsWidthAssigned then - Result := FWidth - else - Result := DefaultWidth; -end; - -function TdxCustomListBoxReportLink.IsWidthStored: Boolean; -begin - Result := FIsWidthAssigned and (Width <> DefaultWidth); -end; - -procedure TdxCustomListBoxReportLink.SetTextAlignX(Value: TcxTextAlignX); -begin - if FTextAlignX <> Value then - begin - FTextAlignX := Value; - LinkModified(True); - end; -end; - -procedure TdxCustomListBoxReportLink.SetTextAlignY(Value: TcxTextAlignY); -begin - if FTextAlignY <> Value then - begin - FTextAlignY := Value; - LinkModified(True); - end; -end; - -procedure TdxCustomListBoxReportLink.SetWidth(Value: Integer); -begin - if FWidth <> Value then - begin - FIsWidthAssigned := True; - FWidth := Value; - if not AutoWidth then LinkModified(True); - end; -end; - -procedure TdxCustomListBoxReportLink.CustomDrawFontChanged(Sender: TObject); -begin - FCustomDrawFontChanged := True; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSGraphicLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSGraphicLnk.pas deleted file mode 100644 index 871cf82d..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSGraphicLnk.pas +++ /dev/null @@ -1,525 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSGraphicLnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, Graphics, ExtCtrls, dxPSGlbl, dxPSCore, dxBkgnd; - -type - TCustomdxGraphicReportLink = class(TBasedxReportLink) - private - FBorderColor: TColor; - FCenter: Boolean; - FDrawBorder: Boolean; - FProportional: Boolean; - FStretch: Boolean; - FTransparentColor: TColor; - procedure SetBorderColor(Value: TColor); - procedure SetCenter(Value: Boolean); - procedure SetDrawBorder(Value: Boolean); - procedure SetProportional(Value: Boolean); - procedure SetStretch(Value: Boolean); - procedure SetTransparentColor(Value: TColor); - protected - function GetAlwaysBufferedGraphics: Boolean; override; - function GetCriticalSize(AReportCells: TdxReportCells): Integer; override; - function CalculateActualScaleFactor: Integer; override; - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure InternalRestoreDefaults; override; - - function GetGraphic: TGraphic; virtual; - function GetGraphicClass: TGraphicClass; virtual; - function GetGraphicHeight: Integer; virtual; - function GetGraphicWidth: Integer; virtual; - function GetDrawMode: TdxGraphicDrawMode; virtual; - procedure InitializeGraphicItem(AnItem: TdxReportCellGraphic); virtual; - - property BorderColor: TColor read FBorderColor write SetBorderColor default clBlack; - property Center: Boolean read FCenter write SetCenter default False; - property DrawBorder: Boolean read FDrawBorder write SetDrawBorder default False; - property DrawMode: TdxGraphicDrawMode read GetDrawMode; - property GraphicHeight: Integer read GetGraphicHeight; - property GraphicWidth: Integer read GetGraphicWidth; - property Proportional: Boolean read FProportional write SetProportional default False; - property Stretch: Boolean read FStretch write SetStretch default False; - property TransparentColor: TColor read FTransparentColor write SetTransparentColor default clWindow; - public - constructor Create(AOwner: TComponent); override; - procedure Assign(Source: TPersistent); override; - class function Aggregable: Boolean; override; - end; - - TCustomdxPictureReportLink = class(TCustomdxGraphicReportLink) - protected - function GetGraphic: TGraphic; override; - function GetGraphicHeight: Integer; override; - function GetGraphicWidth: Integer; override; - function GetPicture: TPicture; virtual; - - property Picture: TPicture read GetPicture; - public - function DataProviderPresent: Boolean; override; - end; - - TdxPictureReportLink = class(TCustomdxPictureReportLink) - private - FPicture: TPicture; - procedure SetPicture(Value: TPicture); - procedure PictureChanged(Sender: TObject); - protected - function GetPicture: TPicture; override; - procedure SetComponent(Value: TComponent); override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - published - property BorderColor; - property DrawBorder; - property Picture write SetPicture; - property Transparent; - property TransparentColor; - end; - -implementation - -uses - SysUtils, cxClasses, dxPSUtl, dxPSRes; - -const - CellSidesMap: array[Boolean] of TdxCellSides = ([], csAll); - -{ TCustomdxGraphicReportLink } - -constructor TCustomdxGraphicReportLink.Create(AOwner: TComponent); -begin - inherited; - FBorderColor := dxDefaultGridLineColor; - FCenter := False; - FDrawBorder := False; - FProportional := False; - FStretch := False; - FTransparentColor := clWindow; -end; - -procedure TCustomdxGraphicReportLink.Assign(Source: TPersistent); -begin - inherited; - if Source is TCustomdxGraphicReportLink then - with TCustomdxGraphicReportLink(Source) do - begin - Self.BorderColor := BorderColor; - Self.Center := Center; - Self.DrawBorder := DrawBorder; - Self.Proportional := Proportional; - Self.Stretch := Stretch; - Self.TransparentColor := TransparentColor; - end; -end; - -class function TCustomdxGraphicReportLink.Aggregable: Boolean; -begin - Result := True;//}False; -end; - -function TCustomdxGraphicReportLink.GetAlwaysBufferedGraphics: Boolean; -begin - Result := False; -end; - -function TCustomdxGraphicReportLink.GetCriticalSize(AReportCells: TdxReportCells): Integer; -begin - with AReportCells.BoundsRect do - begin - Result := Right - Left; - if Result < Bottom - Top then - Result := Bottom - Top; - end; -end; - -function TCustomdxGraphicReportLink.CalculateActualScaleFactor: Integer; -var - PaintW, PaintH: Integer; -begin - if (ReportWidth <> 0) and (ReportHeight <> 0) then - begin - with RealPrinterPage do - begin - PaintW := PaintRectLoMetric.Right - PaintRectLoMetric.Left; - PaintH := PaintRectLoMetric.Bottom - PaintRectLoMetric.Top; - if ReportTitle.Mode <> tmNone then - Dec(PaintH, MulDiv(Renderer.RenderInfo.TitleHeight, 254, FUnitsPerInch)); - - PaintW := FitToPagesByWide * MulDiv(PaintW, FUnitsPerInch, 254); - PaintH := FitToPagesByTall * MulDiv(PaintH, FUnitsPerInch, 254); - end; - if ReportWidth / ReportHeight > PaintW / PaintH then - Result := MulDiv(PaintW, 100, ReportWidth) - 1 - else - Result := MulDiv(PaintH, 100, ReportHeight) - 1; - end - else - Result := 1; -end; - -procedure TCustomdxGraphicReportLink.ConstructReport(AReportCells: TdxReportCells); -var - Graphic: TGraphic; - Cell: TdxReportCell; - Data: TdxReportCellGraphic; -begin - inherited; - Graphic := GetGraphic; - if Graphic <> nil then - try - AReportCells.Cells.Color := Color; - AReportCells.Cells.CellSides := CellSidesMap[DrawBorder]; - AReportCells.BorderColor := BorderColor; - - Cell := TdxReportCell.Create(AReportCells.Cells); - Cell.CellSides := []; - - Data := TdxReportCellGraphic.Create(Cell); - Data.BoundsRect := MakeRect(0, 0, GraphicWidth, GraphicHeight); - Data.Image := Graphic; - InitializeGraphicItem(Data); - - Cell.BoundsRect := Data.BoundsRect; - AReportCells.Cells.BoundsRect := Cell.BoundsRect; - AReportCells.DoProgress(100); - finally - Graphic.Free; - end; -end; - -procedure TCustomdxGraphicReportLink.InternalRestoreDefaults; -begin - inherited; - BorderColor := dxDefaultGridLineColor; - Center := False; - DrawBorder := False; - Proportional := False; - Stretch := False; - TransparentColor := clWindow; -end; - -function TCustomdxGraphicReportLink.GetGraphic: TGraphic; -begin - Result := nil; -end; - -function TCustomdxGraphicReportLink.GetGraphicClass: TGraphicClass; -begin - Result := nil; -end; - -function TCustomdxGraphicReportLink.GetGraphicHeight: Integer; -var - Graphic: TGraphic; -begin - Graphic := GetGraphic; - if Graphic <> nil then - try - Result := Graphic.Height; - finally - Graphic.Free; - end - else - Result := 0; -end; - -function TCustomdxGraphicReportLink.GetGraphicWidth: Integer; -var - Graphic: TGraphic; -begin - Graphic := GetGraphic; - if Graphic <> nil then - try - Result := Graphic.Width; - finally - Graphic.Free; - end - else - Result := 0; -end; - -function TCustomdxGraphicReportLink.GetDrawMode: TdxGraphicDrawMode; -begin - if Stretch then - if Proportional then - if Center then - Result := gdmCenterAndStretchProportional - else - Result := gdmStretchProportional - else - Result := gdmStretch - else - if Center then - Result := gdmCenter - else - Result := gdmNone; -end; - -procedure TCustomdxGraphicReportLink.InitializeGraphicItem(AnItem: TdxReportCellGraphic); -const - ImageBufferingMap: array[Boolean] of TdxCellImageBuffering = (cibAlways, cibNone); -begin - AnItem.Color := Color; - AnItem.CellSides := CellSidesMap[DrawBorder]; - AnItem.ImageBuffering := ImageBufferingMap[(GetGraphicClass <> nil) and GetGraphicClass.InheritsFrom(TMetafile)]; - AnItem.ImageTransparent := Transparent; - AnItem.Transparent := True; -end; - -procedure TCustomdxGraphicReportLink.SetBorderColor(Value: TColor); -begin - if FBorderColor <> Value then - begin - FBorderColor := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxGraphicReportLink.SetCenter(Value: Boolean); -begin - if FCenter <> Value then - begin - FCenter := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxGraphicReportLink.SetDrawBorder(Value: Boolean); -begin - if FDrawBorder <> Value then - begin - FDrawBorder := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxGraphicReportLink.SetProportional(Value: Boolean); -begin - if FProportional <> Value then - begin - FProportional := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxGraphicReportLink.SetStretch(Value: Boolean); -begin - if FStretch <> Value then - begin - FStretch := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxGraphicReportLink.SetTransparentColor(Value: TColor); -begin - if FTransparentColor <> Value then - begin - FTransparentColor := Value; - LinkModified(True); - end; -end; - -{ TCustomdxPictureReportLink } - -function TCustomdxPictureReportLink.DataProviderPresent: Boolean; -begin - if DataSource = rldsComponent then - Result := (Picture <> nil) and (Picture.Graphic <> nil) and not Picture.Graphic.Empty - else - Result := inherited DataProviderPresent; -end; - -function TCustomdxPictureReportLink.GetGraphic: TGraphic; - - function CalculateGraphicBounds(ADest, AGraphic: TGraphic): TRect; - var - X, Y, V: Integer; - begin - case DrawMode of - gdmNone, - gdmCenter: - begin - Result := MakeBounds(0, 0, AGraphic.Width, AGraphic.Height); - if DrawMode = gdmCenter then - begin - X := Result.Left + (ADest.Width - AGraphic.Width) div 2; - Y := Result.Top + (ADest.Height - AGraphic.Height) div 2; - OffsetRect(Result, X, Y); - end; - end; - - gdmStretchProportional, - gdmCenterAndStretchProportional: - begin - if AGraphic.Width / AGraphic.Height > ADest.Width / ADest.Height then - begin - V := MulDiv(AGraphic.Height, ADest.Width, AGraphic.Width); - Result := MakeBounds(0, 0, ADest.Width, V); - end - else - begin - V := MulDiv(AGraphic.Width, ADest.Height, AGraphic.Height); - Result := MakeBounds(0, 0, V, ADest.Height); - end; - if DrawMode = gdmCenterAndStretchProportional then - if Result.Right - Result.Left = ADest.Width then - OffsetRect(Result, 0, (ADest.Height - (Result.Bottom - Result.Top)) div 2) - else - OffsetRect(Result, (ADest.Width - (Result.Right - Result.Left)) div 2, 0); - end; - else // gdmStretch - Result := MakeBounds(0, 0, ADest.Width, ADest.Height); - end; - end; - -var - R: TRect; -begin - if DataProviderPresent then - begin - Result := TBitmap.Create; - with TBitmap(Result) do - try - Height := GraphicHeight; - Width := GraphicWidth; - if Self.Transparent then - begin - Canvas.Brush.Color := TransparentColor; - Canvas.FillRect(MakeRect(0, 0, Width, Height)); - end; - if Picture.Graphic <> nil then - begin - R := CalculateGraphicBounds(Result, Picture.Graphic); - Canvas.StretchDraw(R, Picture.Graphic); - end; - - Transparent := Self.Transparent; - if Transparent then - TransparentColor := Self.TransparentColor; - HandleType := bmDIB; - except - Free; - raise; - end - end - else - Result := inherited GetGraphic; -end; - -function TCustomdxPictureReportLink.GetGraphicHeight: Integer; -begin - if Picture <> nil then - Result := Picture.Height - else - Result := inherited GetGraphicHeight; -end; - -function TCustomdxPictureReportLink.GetGraphicWidth: Integer; -begin - if Picture <> nil then - Result := Picture.Width - else - Result := inherited GetGraphicWidth; -end; - -function TCustomdxPictureReportLink.GetPicture: TPicture; -begin - Result := nil; -end; - -{ TdxPictureReportLink } - -constructor TdxPictureReportLink.Create(AOwner: TComponent); -begin - inherited; - ReportDocument.Description := cxGetResourceString(@sdxTPicture); - Transparent := False; - FPicture := TPicture.Create; - FPicture.OnChange := PictureChanged; - LinkModified(False); -end; - -destructor TdxPictureReportLink.Destroy; -begin - FreeAndNil(FPicture); - inherited; -end; - -procedure TdxPictureReportLink.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxPictureReportLink then - Picture := TdxPictureReportLink(Source).Picture; -end; - -function TdxPictureReportLink.GetPicture: TPicture; -begin - Result := FPicture; -end; - -procedure TdxPictureReportLink.SetPicture(Value: TPicture); -begin - Picture.Assign(Value); -end; - -procedure TdxPictureReportLink.SetComponent(Value: TComponent); -begin -end; - -procedure TdxPictureReportLink.PictureChanged(Sender: TObject); -begin - LinkModified(True); - DesignerModified; - DesignerUpdate(False); -end; - -initialization - dxPSRegisterReportLink(TdxPictureReportLink, nil, nil); - -finalization - dxPSUnregisterReportLink(TdxPictureReportLink, nil, nil); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSHFToolBarBld.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSHFToolBarBld.pas deleted file mode 100644 index 8789a1d1..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSHFToolBarBld.pas +++ /dev/null @@ -1,175 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire coVisntents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSHFToolBarBld; - -interface - -{$I cxVer.inc} - -uses - Classes, ComCtrls, Controls, ImgList; - -type - TdxPSHFToolBarBuilder = class - public - class procedure Build(AToolBar: TToolBar; - AImageList: TCustomImageList; - AIncludeAutoTextEntries: Boolean; AFunctionList, AAutoHFTextEntries: TStrings; - AOnButtonClick, AOnAutoTextEntriesClick: TNotifyEvent; ACenteringToolbar: Boolean); - class procedure ShowAutoHFTextEntriesPopup(Sender: TObject); - end; - -implementation - -uses - Windows, ExtCtrls, Buttons, Menus, Graphics, SysUtils, cxClasses, dxPSGlBl, - dxPSUtl, dxPgSDlg, dxPSRes, dxPSPopupMan; - -var - FDropDownGlyph: TBitmap; - -class procedure TdxPSHFToolBarBuilder.Build(AToolBar: TToolBar; - AImageList: TCustomImageList; AIncludeAutoTextEntries: Boolean; - AFunctionList, AAutoHFTextEntries: TStrings; AOnButtonClick, - AOnAutoTextEntriesClick: TNotifyEvent; ACenteringToolbar: Boolean); -var - S: string; - DC: HDC; - TextSize: TSize; - MenuButton: TSpeedButton; - AutoHFTextEntriesPopup: TPopupMenu; - MenuItem: TMenuItem; - I, SummaryWidth, MaxButtonCount, MenuButtonWidth: Integer; -begin - while AToolBar.ButtonCount > 0 do - AToolBar.Buttons[0].Free; - - S := cxGetResourceString(@sdxMenuInsertAutoTextEntriesSubItem); - - MenuButtonWidth := 0; - if AIncludeAutoTextEntries then - begin - DC := GetDC(0); - GetTextExtentPoint32(DC, PChar(S), Length(S), TextSize); - ReleaseDC(0, DC); - MenuButtonWidth := 3 * 2 + TextSize.cX + 16; - end; - - if AFunctionList.Count > 0 then - begin - AImageList.AllocBy := AFunctionList.Count; - for I := 0 to AFunctionList.Count - 1 do - with TdxHFCustomFunction(AFunctionList.Objects[I]) do - if (Glyph <> nil) and not Glyph.Empty then - AImageList.AddMasked(Glyph, Glyph.Canvas.Pixels[0, Glyph.Height - 1]); - AToolBar.Images := AImageList; - - SummaryWidth := MenuButtonWidth + AToolBar.ButtonWidth * AFunctionList.Count + 4; - if SummaryWidth > AToolBar.Parent.Width - 4 then - begin - SummaryWidth := AToolBar.Parent.Width - 4; - MaxButtonCount := (SummaryWidth - 4 - MenuButtonWidth) div AToolBar.ButtonWidth; - SummaryWidth := MenuButtonWidth + MaxButtonCount * AToolBar.ButtonWidth + 4; - end - else - MaxButtonCount := AFunctionList.Count; - - AToolBar.Width := SummaryWidth; - if ACenteringToolbar then - AToolBar.Left := (AToolBar.Parent.Width - AToolBar.Width) div 2; - - for I := 0 to MaxButtonCount - 1 do - with TToolButton.Create(AToolBar) do - begin - Parent := AToolBar; - Tag := MakeTTag(I); - ImageIndex := Integer(Tag); - Hint := TdxHFCustomFunction(AFunctionList.Objects[I]).Hint; - OnClick := AOnButtonClick; - end; - end; - - if AIncludeAutoTextEntries then - begin - MenuButton := TSpeedButton.Create(AToolBar); - MenuButton.Parent := AToolBar; - MenuButton.SetBounds(0, 0, MenuButtonWidth, AToolBar.Height); - MenuButton.Caption := S; - MenuButton.Layout := blGlyphRight; - MenuButton.Glyph := FDropDownGlyph; - - AutoHFTextEntriesPopup := TPopupMenu.Create(AToolBar); - {$IFDEF DELPHI5} - AutoHFTextEntriesPopup.AutoHotkeys := maManual; - {$ENDIF} - if AAutoHFTextEntries <> nil then - for I := 0 to AAutoHFTextEntries.Count - 1 do - begin - MenuItem := TMenuItem.Create(AToolBar); - MenuItem.Caption := AAutoHFTextEntries[I]; - MenuItem.Tag := MakeTTag(I); - MenuItem.OnClick := AOnAutoTextEntriesClick; - AutoHFTextEntriesPopup.Items.Add(MenuItem); - end; - - MenuButton.Tag := MakeTTag(AutoHFTextEntriesPopup); - MenuButton.OnClick := ShowAutoHFTextEntriesPopup; - end; - - AToolBar.Visible := AToolBar.ButtonCount > 0; -end; - -class procedure TdxPSHFToolBarBuilder.ShowAutoHFTextEntriesPopup(Sender: TObject); -var - Button: TControl; -begin - Button := TControl(Sender); - if TTagToObj(Button.Tag) is TPopupMenu then - dxPSPopupMenuController.ShowPopup(Button.ClientOrigin.X, Button.ClientOrigin.Y + Button.Height, - nil, TPopupMenu(TTagToObj(Button.Tag))); -end; - -initialization - FDropDownGlyph := CreateArrowBitmap(udgDown, 12); - -finalization - FreeAndNil(FDropDownGlyph); - -end. - - - - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSImgLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSImgLnk.pas deleted file mode 100644 index 36a39833..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSImgLnk.pas +++ /dev/null @@ -1,136 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSImgLnk; - -interface - -{$I cxVer.inc} - -uses - Graphics, ExtCtrls, dxPSGraphicLnk; - -type - TdxImageReportLink = class(TCustomdxPictureReportLink) - private - function GetImage: TImage; - protected - procedure InternalRestoreFromOriginal; override; - - function GetGraphicHeight: Integer; override; - function GetGraphicWidth: Integer; override; - function GetPicture: TPicture; override; - public - function DataProviderPresent: Boolean; override; - property Image: TImage read GetImage; - published - property BorderColor; - property Center; - property DrawBorder; - property Proportional; - property Stretch; - property Transparent; - property TransparentColor; - end; - -implementation - -uses - dxPSCore; - -function TdxImageReportLink.DataProviderPresent: Boolean; -begin - if DataSource = rldsComponent then - Result := Image <> nil - else - Result := inherited DataProviderPresent; -end; - -procedure TdxImageReportLink.InternalRestoreFromOriginal; -begin - inherited; - Center := Image.Center; - {$IFDEF DELPHI6} - Proportional := Image.Proportional; - {$ENDIF} - Stretch := Image.Stretch; -end; - -function TdxImageReportLink.GetGraphicHeight: Integer; -begin - if Image <> nil then - begin - Result := Image.Height; - // 3.2 - //if IsAggregated and (Result < inherited GetGraphicHeight) then - // Result := inherited GetGraphicHeight; - end - else - Result := inherited GetGraphicHeight; -end; - -function TdxImageReportLink.GetGraphicWidth: Integer; -begin - if Image <> nil then - begin - Result := Image.Width; - // 3.2 - //if IsAggregated and (Result < inherited GetGraphicWidth) then - // Result := inherited GetGraphicWidth; - end - else - Result := inherited GetGraphicWidth; -end; - -function TdxImageReportLink.GetPicture: TPicture; -begin - if Image <> nil then - Result := Image.Picture - else - Result := inherited GetPicture; -end; - -function TdxImageReportLink.GetImage: TImage; -begin - Result := TImage(Component); -end; - -initialization - dxPSRegisterReportLink(TdxImageReportLink, TImage, nil); - -finalization - dxPSUnregisterReportLink(TdxImageReportLink, TImage, nil); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSImgs.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSImgs.pas deleted file mode 100644 index 242fb9be..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSImgs.pas +++ /dev/null @@ -1,117 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSImgs; - -interface - -{$I cxVer.inc} - -const - // Bitmaps - IDB_DXPSPRINT = 'IDB_DXPSPRINT'; - IDB_DXPSPREVIEW = 'IDB_DXPSPREVIEW'; - IDB_DXPSPAGESETUP = 'IDB_DXPSPAGESETUP'; - IDB_DXPSWEB = 'IDB_DXPSWEB'; - IDB_DXPSREPORTDESIGNER = 'IDB_DXPSREPORTDESIGNER'; - IDB_DXPSREPORTPROPERTIES = 'IDB_DXPSREPORTPROPERTIES'; - - IDB_DXPSDEFINEPRINTSTYLES = 'IDB_DXPSDEFINEPRINTSTYLES'; - IDB_DXPSPRINTSTYLE_STANDARD = 'IDB_DXPSPRINTSTYLE_STANDARD'; - IDB_DXPSPRINTSTYLE_MEMO = 'IDB_DXPSPRINTSTYLE_MEMO'; - - IDB_DXPSBKTEXTURES = 'IDB_DXPSBKTEXTURES'; - IDB_DXPSBKPATTERNS = 'IDB_DXPSBKPATTERNS'; - - IDB_DXPSSELECTMANYPAGES = 'IDB_DXPSSELECTMANYPAGES'; - IDB_DXPSWARNINGSIGN = 'IDB_DXPSWARNINGSIGN'; - - IDB_DXPSFUNCTION_PAGENUMBER = 'IDB_DXPSFUNCTION_PAGENUMBER'; - IDB_DXPSFUNCTION_TOTALPAGES = 'IDB_DXPSFUNCTION_TOTALPAGES'; - IDB_DXPSFUNCTION_PAGENUMBEROFPAGES = 'IDB_DXPSFUNCTION_PAGENUMBEROFPAGES'; - IDB_DXPSFUNCTION_DATETIME = 'IDB_DXPSFUNCTION_DATETIME'; - IDB_DXPSFUNCTION_DATE = 'IDB_DXPSFUNCTION_DATE'; - IDB_DXPSFUNCTION_TIME = 'IDB_DXPSFUNCTION_TIME'; - IDB_DXPSFUNCTION_USERNAME = 'IDB_DXPSFUNCTION_USERNAME'; - IDB_DXPSFUNCTION_MACHINENAME = 'IDB_DXPSFUNCTION_MACHINENAME'; - - IDB_DXPSPREVIEW_ANCHORSCROLLFULL = 'IDB_DXPSPREVIEW_ANCHORSCROLLFULL'; - IDB_DXPSPREVIEW_ANCHORSCROLLHORZ = 'IDB_DXPSPREVIEW_ANCHORSCROLLHORZ'; - IDB_DXPSPREVIEW_ANCHORSCROLLVERT = 'IDB_DXPSPREVIEW_ANCHORSCROLLVERT'; - - IDB_DXPSEXPLORERITEM_SMALL = 'IDB_DXPSEXPLORERITEM_SMALL'; - IDB_DXPSEXPLORERITEM_LARGE = 'IDB_DXPSEXPLORERITEM_LARGE'; - IDB_DXPSEXPLORERITEM_COMPOSITIONSMALL = 'IDB_DXPSEXPLORERITEM_COMPOSITIONSMALL'; - IDB_DXPSEXPLORERITEM_INVALID = 'IDB_DXPSEXPLORERITEM_INVALID'; - - IDB_DXPSREFRESH = 'IDB_DXPSREFRESH'; - IDB_DXPSGOTOUPONELEVEL = 'IDB_DXPSGOTOUPONELEVEL'; - IDB_DXPSCOPY = 'IDB_DXPSCOPY'; - IDB_DXPSSAVE = 'IDB_DXPSSAVE'; - - IDB_DXPSDRAWMODE_STRICT = 'IDB_DXPSDRAWMODE_STRICT'; - IDB_DXPSDRAWMODE_ODDEVEN = 'IDB_DXPSDRAWMODE_ODDEVEN'; - IDB_DXPSDRAWMODE_CHESS = 'IDB_DXPSDRAWMODE_CHESS'; - IDB_DXPSDRAWMODE_BORROW = 'IDB_DXPSDRAWMODE_BORROW'; - - IDB_DXPSCARBMW760LI = 'IDB_DXPSCARBMW760LI'; - IDB_DXPSCARLOGOS = 'IDB_DXPSCARLOGOS'; - - // Cursors - IDC_DXPSPREVIEW_MARGINSMOVEHORZ = 'IDC_DXPSPREVIEW_MARGINSMOVEHORZ'; - IDC_DXPSPREVIEW_MARGINSMOVEVERT = 'IDC_DXPSPREVIEW_MARGINSMOVEVERT'; - IDC_DXPSPREVIEW_ZOOMIN = 'IDC_DXPSPREVIEW_ZOOMIN'; - IDC_DXPSPREVIEW_ZOOMOUT = 'IDC_DXPSPREVIEW_ZOOMOUT'; - IDC_DXPSPREVIEW_SCROLLFULL = 'IDC_DXPSPREVIEW_SCROLLFULL'; - IDC_DXPSPREVIEW_SCROLLHORZ = 'IDC_DXPSPREVIEW_SCROLLHORZ'; - IDC_DXPSPREVIEW_SCROLLVERT = 'IDC_DXPSPREVIEW_SCROLLVERT'; - IDC_DXPSPREVIEW_WHEELSCROLLUP = 'IDC_DXPSPREVIEW_WHEELSCROLLUP'; - IDC_DXPSPREVIEW_WHEELSCROLLRIGHT = 'IDC_DXPSPREVIEW_WHEELSCROLLRIGHT'; - IDC_DXPSPREVIEW_WHEELSCROLLDOWN = 'IDC_DXPSPREVIEW_WHEELSCROLLDOWN'; - IDC_DXPSPREVIEW_WHEELSCROLLLEFT = 'IDC_DXPSPREVIEW_WHEELSCROLLLEFT'; - IDC_DXPSPREVIEW_WHEELSCROLLTOPRIGHT = 'IDC_DXPSPREVIEW_WHEELSCROLLTOPRIGHT'; - IDC_DXPSPREVIEW_WHEELSCROLLTOPLEFT = 'IDC_DXPSPREVIEW_WHEELSCROLLTOPLEFT'; - IDC_DXPSPREVIEW_WHEELSCROLLBOTTOMRIGHT = 'IDC_DXPSPREVIEW_WHEELSCROLLBOTTOMRIGHT'; - IDC_DXPSPREVIEW_WHEELSCROLLBOTTOMLEFT = 'IDC_DXPSPREVIEW_WHEELSCROLLBOTTOMLEFT'; - -implementation - -{$R dxPSImgs.res} - -(* - {$R dxPSImgs.res} -*) - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSImgs.res b/internal/x.46/ExpressPrinting System/Sources/dxPSImgs.res deleted file mode 100644 index 4084eab3..00000000 Binary files a/internal/x.46/ExpressPrinting System/Sources/dxPSImgs.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSLVLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSLVLnk.dfm deleted file mode 100644 index 7a2ea1ed..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSLVLnk.dfm +++ /dev/null @@ -1,695 +0,0 @@ -object dxfmLVReportLinkDesignWindow: TdxfmLVReportLinkDesignWindow - Left = 489 - Top = 374 - BorderStyle = bsDialog - Caption = 'dxfmLVReportLinkDesignWindow' - ClientHeight = 354 - ClientWidth = 555 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 38 - Width = 547 - Height = 281 - ActivePage = tshColor - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = 'Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 539 - Height = 253 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 5 - Top = 12 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 40 - Top = 17 - Width = 194 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 6 - Top = 37 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel1: TBevel - Left = 89 - Top = 98 - Width = 145 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 147 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object Image1: TImage - Left = 6 - Top = 174 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel10: TBevel - Left = 83 - Top = 152 - Width = 151 - Height = 4 - Shape = bsBottomLine - end - object chbxShowVertLines: TCheckBox - Tag = 2 - Left = 95 - Top = 73 - Width = 143 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 2 - OnClick = chbxShowBordersClick - end - object chbxShowBorders: TCheckBox - Left = 95 - Top = 30 - Width = 143 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxShowBordersClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 95 - Top = 51 - Width = 143 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxShowBordersClick - end - object chbxShowColumnHeaders: TCheckBox - Left = 95 - Top = 114 - Width = 143 - Height = 17 - Caption = '&Column Headers' - TabOrder = 3 - OnClick = chbxShowColumnHeadersClick - end - object chbxHeadersOnEveryPage: TCheckBox - Left = 95 - Top = 168 - Width = 143 - Height = 17 - Caption = 'Headers' - TabOrder = 4 - OnClick = chbxHeadersOnEveryPageClick - end - object lblPreview: TStaticText - Left = 244 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 5 - end - end - end - object tshColor: TTabSheet - Caption = 'Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 539 - Height = 253 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 6 - Top = 217 - Width = 81 - Height = 13 - Caption = '&Grid Lines Color: ' - end - object bvlGridLineColorHost: TBevel - Left = 91 - Top = 213 - Width = 128 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 5 - Top = 16 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - end - object gbxTransparentHeaders: TGroupBox - Left = 5 - Top = 141 - Width = 225 - Height = 58 - Caption = ' ' - TabOrder = 4 - object lblHeadersColor: TLabel - Left = 6 - Top = 24 - Width = 75 - Height = 13 - Caption = 'Headers Color: ' - end - object bvlHeadersColorHost: TBevel - Left = 86 - Top = 22 - Width = 128 - Height = 21 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 50 - Width = 225 - Height = 84 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 6 - Top = 26 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - end - object bvlColorHost: TBevel - Left = 86 - Top = 22 - Width = 128 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 6 - Top = 53 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - end - object bvlEvenColorHost: TBevel - Left = 86 - Top = 49 - Width = 128 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 48 - Width = 15 - Height = 17 - TabOrder = 1 - OnClick = chbxTransparentClick - end - object chbxTransparentHeaders: TCheckBox - Tag = 1 - Left = 18 - Top = 139 - Width = 15 - Height = 17 - Caption = 'T&ransparent Headers' - TabOrder = 3 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 69 - Top = 11 - Width = 162 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 50 - Width = 69 - Height = 17 - Caption = ' Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stTransparentHeaders: TStaticText - Left = 33 - Top = 140 - Width = 112 - Height = 17 - Caption = ' Transaprent Headers ' - FocusControl = chbxTransparentHeaders - TabOrder = 6 - OnClick = stTransparentHeadersClick - end - end - end - object tshFont: TTabSheet - Caption = 'Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 539 - Height = 253 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 23 - Caption = 'Fo&nt...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 38 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnHeadersFont: TButton - Tag = 2 - Left = 8 - Top = 129 - Width = 110 - Height = 23 - Caption = 'Headers Font...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 4 - OnClick = btnFontClick - end - object edFixedFont: TEdit - Left = 8 - Top = 158 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 5 - end - object btnEvenFont: TButton - Tag = 1 - Left = 8 - Top = 69 - Width = 110 - Height = 23 - Caption = 'E&ven Font...' - TabOrder = 2 - OnClick = btnFontClick - end - object edEvenFont: TEdit - Left = 8 - Top = 98 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 539 - Height = 253 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Image3: TImage - Left = 7 - Top = 35 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblSelection: TLabel - Left = 5 - Top = 12 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object Bevel3: TBevel - Left = 53 - Top = 17 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 83 - Width = 67 - Height = 13 - Caption = 'Look And Feel' - end - object Bevel15: TBevel - Left = 85 - Top = 87 - Width = 149 - Height = 4 - Shape = bsBottomLine - end - object Image8: TImage - Left = 7 - Top = 106 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblMiscellaneous: TLabel - Left = 5 - Top = 151 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object Bevel4: TBevel - Left = 78 - Top = 156 - Width = 156 - Height = 4 - Shape = bsBottomLine - end - object Image5: TImage - Left = 7 - Top = 174 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxIncludeFixed: TCheckBox - Left = 95 - Top = 55 - Width = 143 - Height = 17 - Caption = '&Including fixed cells' - TabOrder = 1 - OnClick = chbxIncludeFixedClick - end - object chbxOnlySelected: TCheckBox - Left = 95 - Top = 32 - Width = 143 - Height = 17 - Caption = 'Only &selected cells' - TabOrder = 0 - OnClick = chbxOnlySelectedClick - end - object chbxUse3DEffects: TCheckBox - Tag = 12 - Left = 95 - Top = 104 - Width = 143 - Height = 17 - Caption = '&Use 3D Effects' - TabOrder = 2 - OnClick = chbxUse3DEffectsClick - end - object chbxUseSoft3D: TCheckBox - Tag = 13 - Left = 95 - Top = 127 - Width = 143 - Height = 17 - Caption = 'Soft &3D' - TabOrder = 3 - OnClick = chbxUseSoft3DClick - end - object chbxRowAutoHeight: TCheckBox - Left = 95 - Top = 199 - Width = 136 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 5 - OnClick = chbxRowAutoHeightClick - end - object chbxAutoWidth: TCheckBox - Left = 95 - Top = 176 - Width = 136 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 4 - OnClick = chbxAutoWidthClick - end - end - end - end - object pnlPreview: TPanel - Left = 252 - Top = 81 - Width = 290 - Height = 229 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - end - object pnlHint: TPanel - Left = 4 - Top = 5 - Width = 547 - Height = 27 - Alignment = taLeftJustify - BevelOuter = bvNone - BorderStyle = bsSingle - Color = clInfoBk - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object imgHint: TImage - Left = 7 - Top = 5 - Width = 16 - Height = 16 - Transparent = True - end - object lblHint: TLabel - Left = 30 - Top = 6 - Width = 370 - Height = 13 - Caption = ' Most Options Are Being Taken Into Account Only In Detailed View' - Font.Charset = DEFAULT_CHARSET - Font.Color = clInfoText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - Transparent = True - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSLVLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSLVLnk.pas deleted file mode 100644 index 85441c7e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSLVLnk.pas +++ /dev/null @@ -1,2474 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSLVLnk; - -interface - -{$I cxVer.inc} - -uses - StdCtrls, Classes, Windows, Graphics, Controls, ComCtrls, CommCtrl, ExtCtrls, - ImgList, Dialogs, {$IFDEF REGISTERSHELLCTRLS} ShellCtrls, {$ENDIF} - dxCore, dxPSGlbl, dxPSCore, dxExtCtrls, dxPrnPg, dxPSBaseGridLnk, cxDrawTextUtils; - -const - dxListViewAttributeIDBase = 0; - dxListViewUnderfinedID = dxListViewAttributeIDBase + 0; - dxListViewItemID = dxListViewAttributeIDBase + 1; - dxListViewHeaderID = dxListViewAttributeIDBase + 2; - -type - TdxfmLVReportLinkDesignWindow = class; - - TListViewItemSize = record - Width: Word; - Height: Word; - end; - - TdxListViewPaintOption = (lvpoBorder, lvpoHorzLines, lvpoVertLines); - TdxListViewPaintOptions = set of TdxListViewPaintOption; - - TCustomdxNativeListViewReportLink = class(TAbstractdxGridReportLink, IdxPSNativeWin32ControlHandleSupport) - private - FInternalItems: TList; - FLargeImages: TCustomImageList; - FOptions: TdxListViewPaintOptions; - FSmallImages: TCustomImageList; - FStateImages: TCustomImageList; - function GetHeaderColor: TColor; - function GetHeaderFont: TFont; - function GetHeaderTransparent: Boolean; - function GetIncludeHeaders: Boolean; - function GetImages: TCustomImageList; - function GetInternalItem(Index: Integer): TAbstractdxReportCellData; - function GetInternalItemCount: Integer; - function GetOptions: TdxListViewPaintOptions; - procedure SetHeaderColor(Value: TColor); - procedure SetHeaderFont(Value: TFont); - procedure SetHeaderTransparent(Value: Boolean); - procedure SetIncludeHeaders(Value: Boolean); - procedure SetOptions(Value: TdxListViewPaintOptions); - protected - FColumnCount: Integer; - FColumnIndexes: TList; - FColumnWidth: Integer; - FHeaderHeight: Integer; - FInternalItemsCreating: Boolean; - FItemSpaceHorz: Integer; - FItemSpaceVert: Integer; - FRowCount: Integer; - FRowHeight: Integer; - - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - - procedure AssignData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData); override; - function CanCalculateColumnAutoWidths: Boolean; override; - function CreateDataItem(AParent: TdxReportCell; ACol, ARow: Integer; - const ABounds: TRect): TAbstractdxReportCellData; override; - function GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; override; - - function GetActualColIndex(ACol: Integer): Integer; override; - function GetCellColor(ACol, ARow: Integer): TColor; override; - function GetCellFontIndex(ACol, ARow: Integer): Integer; override; - function GetCellImageIndex(ACol, ARow: Integer): Integer; override; - function GetCellImageLayout(ACol, ARow: Integer): TdxImageLayout; override; - function GetCellImageList(ACol, ARow: Integer): TCustomImageList; override; - function GetCellMultiline(ACol, ARow: Integer): Boolean; override; - function GetCellSides(ACol, ARow: Integer): TdxCellSides; override; - function GetCellText(ACol, ARow: Integer): string; override; - function GetCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; override; - function GetCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; override; - function GetColCount: Integer; override; - function GetColSortOrder(ACol: Integer): TdxCellSortOrder; override; - function GetFixedRowCount: Integer; override; - function GetRowCount: Integer; override; - function GetSelectedColCount: Integer; override; - function GetSelectedRowCount: Integer; override; - function GetSourceColWidth(ACol: Integer): Integer; override; - function GetSourceRowHeight(ARow: Integer): Integer; override; - function HasColumnHeaderImage(ACol: Integer): Boolean; override; - function HasSelection: Boolean; override; - function HasSelectionInRow(ARow: Integer): Boolean; override; - function IsDrawBorder: Boolean; override; - function IsDrawFixedHorzLines: Boolean; override; - function IsDrawFixedVertLines: Boolean; override; - function IsDrawHorzLines: Boolean; override; - function IsDrawVertLines: Boolean; override; - function IsProcessedCol(ACol: Integer): Boolean; override; - function IsSelectedCell(ACol, ARow: Integer): Boolean; override; - function IsSelectedRow(ARow: Integer): Boolean; override; - procedure SetDrawMode(Value: TdxGridDrawMode); override; - - procedure PrepareConstruct(AReportCells: TdxReportCells); override; - procedure UnprepareConstruct(AReportCells: TdxReportCells); override; - - { IdxPSNativeWin32ControlHandleSupport } - function GetNativeHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; - procedure SetNativeHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); - - function LV_AreCheckBoxes: Boolean; - function LV_AreColumnHeadersClickable: Boolean; - function LV_AreGridLines: Boolean; - function LV_GetColumnCount: Integer; - function LV_GetColumnHeaderImageIndex(ACol: Integer): Integer; - function LV_GetColumnHeaderImageLayout(ACol: Integer): TdxImageLayout; - function LV_GetColumnHeaderSortOrder(ACol: Integer): TdxCellSortOrder; - function LV_GetColumnHeaderText(ACol: Integer): string; - function LV_GetColumnHeaderTextAlignX(ACol: Integer): TcxTextAlignX; - function LV_GetColumnWidth(ACol: Integer): Integer; - function LV_GetHeaderHeight: Integer; - function LV_GetHeaderWindow: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; - function LV_GetIconArrangement: TIconArrangement; - function LV_GetIsItemChecked(AIndex: Integer): Boolean; - function LV_GetIsItemSelected(AIndex: Integer): Boolean; - function LV_GetItemCount: Integer; - function LV_GetItemSpacing: TListViewItemSize; - function LV_GetItemImageIndex(ACol, ARow: Integer): Integer; - function LV_GetItemStateIndex(ACol, ARow: Integer): Integer; - function LV_GetItemText(ACol, ARow: Integer): string; - function LV_GetRowHeight: Integer; - function LV_GetSelectedCount: Integer; - function LV_GetSelectedIndex: Integer; - //function LV_GetViewStyle: TViewStyle; - function LV_HasColumnHeaderImage(ACol: Integer): Boolean; - function LV_HasColumnHeaders: Boolean; - function LV_IsOwnerData: Boolean; - - function GetListViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; virtual; abstract; - function GetShowColumnHeaders: Boolean; virtual; - function HasSupportForInvisibledColumnHeaders: Boolean; virtual; - procedure SetListViewHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); virtual; abstract; - procedure SetShowColumnHeaders(Value: Boolean); virtual; - - function CheckImages: Boolean; virtual; - function CheckSmallImages: Boolean; virtual; - function CheckStateImages: Boolean; virtual; - procedure ClearImages; virtual; - procedure CreateImages; virtual; - procedure DeleteImages; virtual; - function GetLargeImages: TCustomImageList; virtual; - function GetSmallImages: TCustomImageList; virtual; - function GetStateImages: TCustomImageList; virtual; - function HasLargeImages: Boolean; virtual; - function HasSmallImages: Boolean; virtual; - function HasStateImages: Boolean; virtual; - - procedure AddExtraImage(AParent: TdxReportCell; ACol, ARow: Integer; R: TRect); - function IsExtraImageRequired(ACol, ARow: Integer): Boolean; virtual; - - procedure CalculateColumnIndexes; - function CalculateHeaderRowHeight: Integer; - function CalculateRowHeight: Integer; - - function CanHasStateImage(ACol, ARow: Integer): Boolean; - function IsItemChecked(ARow: Integer): Boolean; virtual; - procedure LoadAllOwnerData; virtual; - - procedure CalculateInternalItemsViewInfo; - procedure CreateExtraInternalItems(ATemporaryParent: TdxReportCell); - procedure CreateInternalItems(ATemporaryParent: TdxReportCell); - function GetFlatInternalItemIndex(ACol, ARow: Integer): Integer; - procedure InitializeInternalItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - function PlaceInternalItem(AParent: TdxReportCell; ACol, ARow: Integer; R: TRect): TAbstractdxReportCellData; virtual; - procedure SetupInternalItemsCellSides; - - function IsIconStyle: Boolean; virtual; - function IsReportStyle: Boolean; virtual; - - property Images: TCustomImageList read GetImages; - property InternalItemCount: integer read GetInternalItemCount; - property InternalItems[Index: Integer]: TAbstractdxReportCellData read GetInternalItem; - property LargeImages: TCustomImageList read GetLargeImages; - property ListViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF} read GetListViewHandle write SetListViewHandle; - property Options: TdxListViewPaintOptions read GetOptions write SetOptions - default [Low(TdxListViewPaintOption)..High(TdxListViewPaintOption)]; - property SmallImages: TCustomImageList read GetSmallImages; - property ShowColumnHeaders: Boolean read GetShowColumnHeaders write SetShowColumnHeaders default True; - property StateImages: TCustomImageList read GetStateImages; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - class function Aggregable: Boolean; override; - procedure Initialize; override; - - function LV_GetViewStyle: TViewStyle; - - property AutoWidth; - property Color; - property DrawMode write SetDrawMode; - property Effects3D; - property EndEllipsis; - property EvenColor; - property EvenFont; - property Font; - property GridLineColor; - property HeaderColor: TColor read GetHeaderColor write SetHeaderColor default clBtnFace; {dxDefaultFixedColor} - property HeaderFont: TFont read GetHeaderFont write SetHeaderFont stored IsFixedFontStored; - property HeadersOnEveryPage; - property HeaderTransparent: Boolean read GetHeaderTransparent write SetHeaderTransparent default False; - property IncludeHeaders: Boolean read GetIncludeHeaders write SetIncludeHeaders default True; - property OnlySelected; - property RowAutoHeight; - property Soft3D; - property Transparent; - end; - - TdxNativeListViewReportLink = class(TCustomdxNativeListViewReportLink) - private - FListViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; - protected - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - - function GetDesignerClass: TdxReportLinkDesignWindowClass; override; - - function GetListViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; override; - procedure SetListViewHandle(Value: {$IFDEF BCB}Integer {$ELSE} HWND{$ENDIF}); override; - public - function DataProviderPresent: Boolean; override; - property ListViewHandle; - published - property AutoWidth; - property Color; - property DrawMode write SetDrawMode; - property Effects3D; - property EndEllipsis; - property Font; - property GridLineColor; - property HeaderColor; - property HeaderFont; - property HeadersOnEveryPage; - property HeaderTransparent; - property OnlySelected; - property Options; - property RowAutoHeight; - property IncludeHeaders; - property Soft3D; - property Transparent; - end; - - TdxCustomDrawListViewHeaderEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ARect: TRect; AHeaderIndex: Integer; - AnItem: TdxReportCellImage; var ADone: Boolean) of object; - - TdxCustomDrawListViewItemEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ARect: TRect; AListItem: TListItem; ASubItem: Integer; - AnItem: TdxReportCellImage; var ADone: Boolean) of object; - - - TdxListViewReportLinkCustomDrawInfo = record - AttributeID: Integer; - case Integer of - dxListViewItemID: (ListItem: TListItem; SubItem: Integer); - dxListViewHeaderID: (HeaderIndex: Integer); - end; - - - TCustomdxListViewReportLink = class(TCustomdxNativeListViewReportLink) - private - FShowColumnHeaders: Boolean; - FOnCustomDrawHeader: TdxCustomDrawListViewHeaderEvent; - FOnCustomDrawItem: TdxCustomDrawListViewItemEvent; - FOnInitializeHeader: TdxCustomGridReportLinkInitializeItemEvent; - procedure SetOnCustomDrawHeader(Value: TdxCustomDrawListViewHeaderEvent); - procedure SetOnCustomDrawItem(Value: TdxCustomDrawListViewItemEvent); - protected - procedure AssignData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData); override; - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - procedure DoInitializeHeader(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData); dynamic; - procedure DoInitializeItem(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData); override; - procedure InternalRestoreFromOriginal; override; - procedure InternalRestoreDefaults; override; - procedure PrepareConstruct(AReportCells: TdxReportCells); override; - - function GetListViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; override; - function GetShowColumnHeaders: Boolean; override; - function HasSupportForInvisibledColumnHeaders: Boolean; override; - procedure InitializeInternalItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); override; - function IsItemChecked(ARow: Integer): Boolean; override; - procedure LoadAllOwnerData; override; - - procedure SetListViewHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); override; - procedure SetShowColumnHeaders(Value: Boolean); override; - - function GetLargeImages: TCustomImageList; override; - function GetSmallImages: TCustomImageList; override; - function GetStateImages: TCustomImageList; override; - - function GetCustomListView: TCustomListView; virtual; - - procedure DoCustomDrawHeader(ACanvas: TCanvas; ARect: TRect; AHeaderIndex: Integer; - AnItem: TdxReportCellImage; var ADone: Boolean); dynamic; - procedure DoCustomDrawItem(ACanvas: TCanvas; ARect: TRect; AListItem: TListItem; - ASubItem: Integer; AnItem: TdxReportCellImage; var ADone: Boolean); dynamic; - procedure GetCustomDrawInfo(AnItem: TAbstractdxReportCellData; - var ACustomDrawInfo: TdxListViewReportLinkCustomDrawInfo); virtual; - - property CustomListView: TCustomListView read GetCustomListView; - public - procedure Assign(Source: TPersistent); override; - - class function Aggregable: Boolean; override; - - property ShowColumnHeaders; - property SupportedCustomDraw; - property OnCustomDrawHeader: TdxCustomDrawListViewHeaderEvent read FOnCustomDrawHeader write SetOnCustomDrawHeader; - property OnCustomDrawItem: TdxCustomDrawListViewItemEvent read FOnCustomDrawItem write SetOnCustomDrawItem; - property OnInitializeHeader: TdxCustomGridReportLinkInitializeItemEvent read FOnInitializeHeader write FOnInitializeHeader; - end; - - TdxListViewReportLink = class(TCustomdxListViewReportLink) - private - function GetListView: TListView; - public - property ListView: TListView read GetListView; - published - property AutoWidth; - property Color; - property DrawMode write SetDrawMode; - property Effects3D; - property EndEllipsis; - property Font; - property GridLineColor; - property HeaderColor; - property HeaderFont; - property HeadersOnEveryPage; - property HeaderTransparent; - property OnlySelected; - property Options; - property RowAutoHeight; - property IncludeHeaders; - property ShowColumnHeaders; - property Soft3D; - property SupportedCustomDraw; - property Transparent; - - property OnCustomDrawHeader; - property OnCustomDrawItem; - property OnInitializeHeader; - property OnInitializeItem; - end; - - {$IFDEF REGISTERSHELLCTRLS} - TCustomdxShellListViewReportLink = class(TCustomdxListViewReportLink) - private - function GetShellListView: TShellListView; - protected - function HasStateImages: Boolean; override; - procedure CreateImages; override; - procedure DeleteImages; override; - function GetLargeImages: TCustomImageList; override; - function GetSmallImages: TCustomImageList; override; - function GetStateImages: TCustomImageList; override; - - property ShellListView: TShellListView read GetShellListView; - end; - - TdxShellListViewReportLink = class(TCustomdxShellListViewReportLink) - public - property ShellListView; - published - property AutoWidth; - property Color; - property DrawMode write SetDrawMode; - property Effects3D; - property EndEllipsis; - property Font; - property GridLineColor; - property HeaderColor; - property HeaderFont; - property HeadersOnEveryPage; - property HeaderTransparent; - property OnlySelected; - property Options; - property RowAutoHeight; - property IncludeHeaders; - property ShowColumnHeaders; - property Soft3D; - property SupportedCustomDraw; - property Transparent; - - property OnCustomDrawHeader; - property OnCustomDrawItem; - property OnInitializeHeader; - property OnInitializeItem; - end; - - {$ENDIF} - - TdxfmLVReportLinkDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshOptions: TTabSheet; - pnlOptions: TPanel; - lblShow: TLabel; - Bevel11: TBevel; - imgGrid: TImage; - chbxShowVertLines: TCheckBox; - chbxShowBorders: TCheckBox; - chbxShowHorzLines: TCheckBox; - tshColor: TTabSheet; - pnlColor: TPanel; - lblGridLinesColor: TLabel; - bvlGridLineColorHost: TBevel; - gbxTransparentHeaders: TGroupBox; - lblHeadersColor: TLabel; - bvlHeadersColorHost: TBevel; - gbxTransparent: TGroupBox; - lblColor: TLabel; - bvlColorHost: TBevel; - lblEvenColor: TLabel; - bvlEvenColorHost: TBevel; - chbxTransparent: TCheckBox; - chbxTransparentHeaders: TCheckBox; - tshFont: TTabSheet; - pnlFont: TPanel; - btnFont: TButton; - edFont: TEdit; - btnHeadersFont: TButton; - edFixedFont: TEdit; - btnEvenFont: TButton; - edEvenFont: TEdit; - tshBehaviors: TTabSheet; - Panel1: TPanel; - Image3: TImage; - lblSelection: TLabel; - Bevel3: TBevel; - lblLookAndFeel: TLabel; - Bevel15: TBevel; - Image8: TImage; - chbxIncludeFixed: TCheckBox; - chbxOnlySelected: TCheckBox; - chbxUse3DEffects: TCheckBox; - chbxUseSoft3D: TCheckBox; - pnlPreview: TPanel; - pnlHint: TPanel; - imgHint: TImage; - lblHint: TLabel; - chbxShowColumnHeaders: TCheckBox; - Bevel1: TBevel; - lblDrawMode: TLabel; - cbxDrawMode: TComboBox; - lblMiscellaneous: TLabel; - Bevel4: TBevel; - Image5: TImage; - chbxRowAutoHeight: TCheckBox; - lblOnEveryPage: TLabel; - Image1: TImage; - Bevel10: TBevel; - chbxHeadersOnEveryPage: TCheckBox; - lblPreview: TStaticText; - chbxAutoWidth: TCheckBox; - stTransparent: TStaticText; - stTransparentHeaders: TStaticText; - procedure cbxDrawModeClick(Sender: TObject); - procedure chbxShowBordersClick(Sender: TObject); - procedure chbxRowAutoHeightClick(Sender: TObject); - procedure chbxTransparentClick(Sender: TObject); - procedure ccbxColorChange(Sender: TObject); - procedure btnFontClick(Sender: TObject); - procedure chbxHeadersOnEveryPageClick(Sender: TObject); - procedure chbxOnlySelectedClick(Sender: TObject); - procedure chbxIncludeFixedClick(Sender: TObject); - procedure chbxUse3DEffectsClick(Sender: TObject); - procedure chbxUseSoft3DClick(Sender: TObject); - procedure pbxPreviewPaint(Sender: TObject); - procedure chbxShowColumnHeadersClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure cbxDrawModeDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure chbxAutoWidthClick(Sender: TObject); - procedure stTransparentClick(Sender: TObject); - procedure stTransparentHeadersClick(Sender: TObject); - private - FccbxColor: TdxPSColorCombo; - FccbxEvenColor: TdxPSColorCombo; - FccbxFixedColor: TdxPSColorCombo; - FccbxGridLineColor: TdxPSColorCombo; - FPreviewBox: TdxPSPaintPanel; - function GetReportLink: TCustomdxNativeListViewReportLink; - - procedure CreateControls; - procedure CMDialogChar(var message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - public - constructor Create(AOwner: TComponent); override; - property ReportLink: TCustomdxNativeListViewReportLink read GetReportLink; - end; - -const - dxDefaultListViewOptions = [Low(TdxListViewPaintOption)..High(TdxListViewPaintOption)]; - -implementation - -{$R *.DFM} - -// TODO: Tile and Group View (Windows XP) - -uses - Messages, Forms, SysUtils, cxClasses, dxPSRes, dxPSUtl, dxPrnDev; - -const - LVM_GETVIEW = LVM_FIRST + 143; - - LV_VIEW_ICON = $00000000; - LV_VIEW_DETAILS = $00000001; - LV_VIEW_SMALLICON = $00000002; - LV_VIEW_LIST = $00000003; - LV_VIEW_TILE = $00000004; - LV_VIEW_MAX = $00000004; - -type - TCustomListViewAccess = class(TListView); - - -{ ListView Helpers } - -function ListViewGetItems(AControl: TCustomListView): TListItems; -begin - Result := TCustomListViewAccess(AControl).Items; -end; - -function ListViewGetLargeImages(AControl: TCustomListView): TCustomImageList; -begin - Result := TCustomListViewAccess(AControl).LargeImages; -end; - -function ListViewGetSmallImages(AControl: TCustomListView): TCustomImageList; -begin - Result := TCustomListViewAccess(AControl).SmallImages; -end; - -function ListViewGetShowColumnHeaders(AControl: TCustomListView): Boolean; -begin - Result := TCustomListViewAccess(AControl).ShowColumnHeaders; -end; - -function ListViewGetStateImages(AControl: TCustomListView): TCustomImageList; -begin - Result := TCustomListViewAccess(AControl).StateImages; -end; - -procedure ListViewOwnerDataFetch(AControl: TCustomListView; AnIndex: Integer; ARequest: TItemRequest); -begin - with TCustomListViewAccess(AControl) do - OwnerDataFetch(Items[AnIndex], ARequest); -end; - -{ Utilities } -function ListView_GetView(AWnd: HWND): DWORD; -begin - Result := SendMessage(AWnd, LVM_GETVIEW, 0, 0); -end; - -{ TCustomdxNativeListViewReportLink } - -constructor TCustomdxNativeListViewReportLink.Create(AOwner: TComponent); -begin - inherited; - CreateImages; - FColumnIndexes := TList.Create; -end; - -destructor TCustomdxNativeListViewReportLink.Destroy; -begin - DeleteImages; - FreeAndNil(FColumnIndexes); - inherited; -end; - -procedure TCustomdxNativeListViewReportLink.Assign(Source: TPersistent); -begin - if Source is TCustomdxNativeListViewReportLink then - with TCustomdxNativeListViewReportLink(Source) do - begin - Self.Options := Options; - end; - inherited; -end; - -class function TCustomdxNativeListViewReportLink.Aggregable: Boolean; -begin - Result := False; -end; - -procedure TCustomdxNativeListViewReportLink.Initialize; -begin - inherited; - FColumnCount := 0; - FRowCount := 0; - FreeAndNil(FInternalItems); -end; - -procedure TCustomdxNativeListViewReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - if HasLargeImages then AProc(LargeImages); - if HasSmallImages then AProc(SmallImages); - if HasStateImages then AProc(StateImages); -end; - -function TCustomdxNativeListViewReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - case LV_GetViewStyle of - vsIcon, - vsSmallIcon: - if LV_GetIconArrangement = iaTop then - Result := AUpdateCodes * uaMarginsVert <> [] - else - Result := AUpdateCodes * uaMarginsHorz <> []; - vsList: - Result := AUpdateCodes * uaMarginsHorz <> []; - else // vsReport - Result := inherited GetRebuildOnPageParamsChange(AUpdateCodes); - end; -end; - -procedure TCustomdxNativeListViewReportLink.InternalRestoreDefaults; -begin - inherited; - Options := dxDefaultListViewOptions; -end; - -procedure TCustomdxNativeListViewReportLink.InternalRestoreFromOriginal; -begin - inherited; - HeaderFont := Font; - if IsWindow(ListViewHandle) and IsReportStyle then - begin - Options := [lvpoBorder]; - if LV_AreGridLines then - Options := Options + [lvpoHorzLines, lvpoVertLines]; - Effects3D := LV_AreColumnHeadersClickable; - end - else - begin - Effects3D := False; - Options := []; - end; -end; - -procedure TCustomdxNativeListViewReportLink.AssignData(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData); -begin - if IsReportStyle or (GetFlatInternalItemIndex(ACol, ARow) < LV_GetItemCount) then - begin - inherited; - with TdxReportCellImage(ADataItem) do - MakeSpaceForEmptyImage := ACol = 0; // TODO: Check HasImageList - end; -end; - -function TCustomdxNativeListViewReportLink.CanCalculateColumnAutoWidths: Boolean; -begin - Result := IsReportStyle; -end; - -function TCustomdxNativeListViewReportLink.CreateDataItem(AParent: TdxReportCell; - ACol, ARow: Integer; const ABounds: TRect): TAbstractdxReportCellData; -var - ImageWidth: Integer; - R: TRect; -begin - R := ABounds; - if IsReportStyle or FInternalItemsCreating then - begin - ImageWidth := 0; - if IsExtraImageRequired(ACol, ARow) then - begin - ImageWidth := StateImages.Width; - Inc(R.Left, ImageWidth); - end; - Result := inherited CreateDataItem(AParent, ACol, ARow, R); - if IsExtraImageRequired(ACol, ARow) then - AddExtraImage(AParent, ACol, ARow, Rect(0, R.Top, ImageWidth, R.Bottom)); - end - else - Result := PlaceInternalItem(AParent, ACol, ARow, R); -end; - -function TCustomdxNativeListViewReportLink.GetDataItemClass(ACol: Integer; - ARow: Integer = 0): TdxReportCellDataClass; -begin - Result := TdxReportCellImage; -end; - -function TCustomdxNativeListViewReportLink.GetActualColIndex(ACol: Integer): Integer; -begin - if IsReportStyle then - Result := Integer(FColumnIndexes[ACol]) - else - Result := ACol; -end; - -function TCustomdxNativeListViewReportLink.GetCellColor(ACol, ARow: Integer): TColor; -begin - if IsReportStyle then - Result := inherited GetCellColor(ACol, ARow) - else - Result := Color; -end; - -function TCustomdxNativeListViewReportLink.GetCellFontIndex(ACol, ARow: Integer): Integer; -begin - if IsReportStyle then - Result := inherited GetCellFontIndex(ACol, ARow) - else - Result := FFontIndex; -end; - -function TCustomdxNativeListViewReportLink.GetCellImageIndex(ACol, ARow: Integer): Integer; -begin - if IsReportStyle then - if IsFixedRow(ARow) then - if LV_HasColumnHeaderImage(ACol) then - Result := LV_GetColumnHeaderImageIndex(ACol) - else - Result := -1 - else - Result := LV_GetItemImageIndex(ACol, ARow - Ord(ShowColumnHeaders)) - else - Result := LV_GetItemImageIndex(ACol, ARow); -end; - -function TCustomdxNativeListViewReportLink.GetCellImageLayout(ACol, ARow: Integer): TdxImageLayout; -begin - if IsReportStyle then - if IsFixedRow(ARow) then - Result := LV_GetColumnHeaderImageLayout(ACol) - else - Result := ilImageCenterLeft - else - if IsIconStyle then - Result := ilImageTopCenter - else - Result := ilImageCenterLeft; -end; - -function TCustomdxNativeListViewReportLink.GetCellImageList(ACol, ARow: Integer): TCustomImageList; -begin - if IsReportStyle then - if IsFixedRow(ARow) then - if LV_HasColumnHeaderImage(ACol) then - Result := LargeImages - else - Result := nil - else - Result := Images - else - Result := Images; -end; - -function TCustomdxNativeListViewReportLink.GetCellMultiline(ACol, ARow: Integer): Boolean; -begin - Result := IsIconStyle or inherited GetCellMultiline(ACol, ARow) -end; - -function TCustomdxNativeListViewReportLink.GetCellSides(ACol, ARow: Integer): TdxCellSides; - - function IsCellMostLeft(ACol, ARow: Integer): Boolean; - begin - Result := ACol = 0; - end; - - function IsCellMostTop(ACol, ARow: Integer): Boolean; - begin - Result := (IsReportStyle and LV_HasColumnHeaders and (ARow < 2)) or (ARow = 0); - end; - - function IsCellMostRight(ACol, ARow: Integer): Boolean; - begin - Result := ACol = ColCount - 1; - end; - - function IsCellMostBottom(ACol, ARow: Integer): Boolean; - begin - Result := ARow = RowCount - 1; - end; - -begin - Result := csAll; - if not IsFixedCell(ACol, ARow) then - begin - if not IsDrawBorder then - begin - if IsCellMostLeft(ACol, ARow) then Exclude(Result, csLeft); - if IsCellMostTop(ACol, ARow) then Exclude(Result, csTop); - if IsCellMostRight(ACol, ARow) then Exclude(Result, csRight); - if IsCellMostBottom(ACol, ARow) then Exclude(Result, csBottom); - end; - if not IsDrawHorzLines then - begin - if not IsCellMostTop(ACol, ARow) then Exclude(Result, csTop); - if not IsCellMostBottom(ACol, ARow) then Exclude(Result, csBottom); - end; - if not IsDrawVertLines then - begin - if not IsCellMostLeft(ACol, ARow) then Exclude(Result, csLeft); - if not IsCellMostRight(ACol, ARow) then Exclude(Result, csRight); - end; - - if IsExtraImageRequired(ACol, ARow) then Exclude(Result, csLeft); - end; -end; - -function TCustomdxNativeListViewReportLink.GetCellText(ACol, ARow: Integer): string; -begin - if IsReportStyle then - if IsFixedRow(ARow) then - Result := LV_GetColumnHeaderText(ACol) - else - Result := LV_GetItemText(ACol, ARow - Ord(ShowColumnHeaders)) - else - Result := LV_GetItemText(ACol, ARow); -end; - -function TCustomdxNativeListViewReportLink.GetCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; -begin - case LV_GetViewStyle of - vsIcon: - Result := taCenterX; - vsSmallIcon, - vsList: - Result := taLeft; - else // vsReport: - Result := LV_GetColumnHeaderTextAlignX(ACol) - end; -end; - -function TCustomdxNativeListViewReportLink.GetCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; -begin - if IsIconStyle then - Result := taTop - else - Result := inherited GetCellTextAlignY(ACol, ARow); -end; - -function TCustomdxNativeListViewReportLink.GetColCount: Integer; -begin - if IsReportStyle then - Result := LV_GetColumnCount - else - Result := FColumnCount; -end; - -function TCustomdxNativeListViewReportLink.GetColSortOrder(ACol: Integer): TdxCellSortOrder; -begin - if IsReportStyle and ShowColumnHeaders then - Result := LV_GetColumnHeaderSortOrder(ACol) - else - Result := csoNone; -end; - -function TCustomdxNativeListViewReportLink.GetFixedRowCount: Integer; -begin - Result := Ord(IsReportStyle and ShowColumnHeaders and (not HasSelection or IncludeHeaders)); -end; - -function TCustomdxNativeListViewReportLink.GetRowCount: Integer; -begin - if IsReportStyle then - Result := LV_GetItemCount + Ord(ShowColumnHeaders) - else - Result := FRowCount; -end; - -function TCustomdxNativeListViewReportLink.GetSelectedColCount: Integer; -begin - Result := LV_GetColumnCount; -end; - -function TCustomdxNativeListViewReportLink.GetSelectedRowCount: Integer; -begin - Result := LV_GetSelectedCount; -end; - -function TCustomdxNativeListViewReportLink.GetSourceColWidth(ACol: Integer): Integer; -begin - if IsReportStyle then - Result := LV_GetColumnWidth(ACol) - else - Result := FColumnWidth; -end; - -function TCustomdxNativeListViewReportLink.GetSourceRowHeight(ARow: Integer): Integer; -begin - if IsFixedRow(ARow) then - Result := FHeaderHeight - else - Result := FRowHeight; -end; - -function TCustomdxNativeListViewReportLink.HasColumnHeaderImage(ACol: Integer): Boolean; -begin - Result := LV_HasColumnHeaderImage(ACol); -end; - -function TCustomdxNativeListViewReportLink.HasSelection: Boolean; -begin - Result := OnlySelected and IsReportStyle and (LV_GetSelectedCount <> 0) and (LV_GetSelectedIndex <> -1); -end; - -function TCustomdxNativeListViewReportLink.HasSelectionInRow(ARow: Integer): Boolean; -begin - Result := IsSelectedRow(ARow); -end; - -function TCustomdxNativeListViewReportLink.IsDrawBorder: Boolean; -begin - Result := lvpoBorder in Options; -end; - -function TCustomdxNativeListViewReportLink.IsDrawHorzLines: Boolean; -begin - Result := lvpoHorzLines in Options; -end; - -function TCustomdxNativeListViewReportLink.IsDrawVertLines: Boolean; -begin - Result := lvpoVertLines in Options; -end; - -function TCustomdxNativeListViewReportLink.IsDrawFixedHorzLines: Boolean; -begin - Result := lvpoBorder in Options; -end; - -function TCustomdxNativeListViewReportLink.IsDrawFixedVertLines: Boolean; -begin - Result := lvpoBorder in Options; -end; - -function TCustomdxNativeListViewReportLink.IsProcessedCol(ACol: Integer): Boolean; -begin - Result := True; -end; - -function TCustomdxNativeListViewReportLink.IsSelectedCell(ACol, ARow: Integer): Boolean; -begin - Result := IsSelectedRow(ARow); -end; - -function TCustomdxNativeListViewReportLink.IsSelectedRow(ARow: Integer): Boolean; -begin - if IsFixedRow(ARow) then - Result := IncludeHeaders - else - Result := HasSelection and LV_GetIsItemSelected(ARow - Ord(ShowColumnHeaders)); -end; - -procedure TCustomdxNativeListViewReportLink.SetDrawMode(Value: TdxGridDrawMode); -begin - if Value = gdmBorrowSource then Value := gdmStrict; - inherited; -end; - -procedure TCustomdxNativeListViewReportLink.PrepareConstruct(AReportCells: TdxReportCells); -begin - ClearImages; - - EndEllipsis := IsReportStyle or EndEllipsis; - - if LV_IsOwnerData then LoadAllOwnerData; - - FRowHeight := CalculateRowHeight; - FHeaderHeight := CalculateHeaderRowHeight; - - if not IsReportStyle then - begin - FInternalItems := TList.Create; - if LV_GetItemCount <> 0 then - begin - CreateInternalItems(AReportCells.Cells); - if InternalItemCount <> 0 then - begin - CalculateInternalItemsViewInfo; - CreateExtraInternalItems(AReportCells.Cells); - SetupInternalItemsCellSides; - end; - end; - end - else - CalculateColumnIndexes; - - inherited; -end; - -procedure TCustomdxNativeListViewReportLink.UnprepareConstruct(AReportCells: TdxReportCells); -begin - FColumnCount := 0; - FRowCount := 0; - FreeAndNil(FInternalItems); - inherited; -end; - -{ IdxPSNativeWin32ControlHandleSupport } - -function TCustomdxNativeListViewReportLink.GetNativeHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - Result := GetListViewHandle; -end; - -procedure TCustomdxNativeListViewReportLink.SetNativeHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); -begin - SetListViewHandle(Value); -end; - -function TCustomdxNativeListViewReportLink.LV_AreCheckBoxes: Boolean; -begin - Result := ListView_GetExtendedListViewStyle(ListViewHandle) and LVS_EX_CHECKBOXES = LVS_EX_CHECKBOXES; -end; - -function TCustomdxNativeListViewReportLink.LV_AreColumnHeadersClickable: Boolean; -begin - Result := GetWindowLong(ListViewHandle, GWL_STYLE) and LVS_NOSORTHEADER <> LVS_NOSORTHEADER; -end; - -function TCustomdxNativeListViewReportLink.LV_AreGridLines: Boolean; -begin - Result := ListView_GetExtendedListViewStyle(ListViewHandle) and LVS_EX_GRIDLINES = LVS_EX_GRIDLINES; -end; - -function TCustomdxNativeListViewReportLink.LV_GetColumnCount: Integer; -var - Header: HWND; -begin - Header := ListView_GetHeader(ListViewHandle); - if Header <> 0 then - Result := Header_GetItemCount(Header) - else - Result := 0; -end; - -function TCustomdxNativeListViewReportLink.LV_GetColumnHeaderImageIndex(ACol: Integer): Integer; -var - Column: TLVColumn; -begin - FillChar(Column, SizeOf(Column), 0); - Column.Mask := LVCF_FMT or LVCF_IMAGE; - ListView_GetColumn(ListViewHandle, ACol, Column); - if Column.fmt and LVCFMT_COL_HAS_IMAGES = LVCFMT_COL_HAS_IMAGES then - Result := Column.iImage - else - Result := -1; -end; - -function TCustomdxNativeListViewReportLink.LV_GetColumnHeaderImageLayout(ACol: Integer): TdxImageLayout; -const - ImageLayoutsMap: array[Boolean] of TdxImageLayout = (ilImageCenterLeft, ilImageCenterRight); -var - Column: TLVColumn; -begin - FillChar(Column, SizeOf(Column), 0); - Column.Mask := LVCF_FMT; - ListView_GetColumn(ListViewHandle, ACol, Column); - Result := ImageLayoutsMap[Column.fmt and LVCFMT_BITMAP_ON_RIGHT = LVCFMT_BITMAP_ON_RIGHT]; -end; - -function TCustomdxNativeListViewReportLink.LV_GetColumnHeaderSortOrder(ACol: Integer): TdxCellSortOrder; -var - Header: HWND; - Item: THDItem; -begin - Result := csoNone; - if IsWinXP or dxPSGlbl.IsComCtrlVersion600 then - begin - Header := LV_GetHeaderWindow; - if IsWindow(Header) then - begin - FillChar(Item, SizeOf(Item), 0); - Item.Mask := HDI_FORMAT; - Header_GetItem(Header, ACol, Item); - if Item.fmt and HDF_SORTDOWN = HDF_SORTDOWN then - Result := csoDown - else - if Item.fmt and HDF_SORTUP = HDF_SORTUP then - Result := csoUp - end; - end; -end; - -function TCustomdxNativeListViewReportLink.LV_GetColumnHeaderText(ACol: Integer): string; -const - BufferLength = 4096; -var - Column: TLVColumn; - Buffer: array[0..BufferLength - 1] of Char; - PBuffer: Pointer ; -begin - FillChar(Column, SizeOf(Column), 0); - PBuffer := @Buffer; - Column.Mask := LVCF_TEXT; - Column.pszText := PBuffer; - Column.cchTextMax := SizeOf(Buffer); - ListView_GetColumn(ListViewHandle, ACol, Column); - Result := (Column.pszText); -end; - -function TCustomdxNativeListViewReportLink.LV_GetColumnHeaderTextAlignX(ACol: Integer): TcxTextAlignX; -var - Column: TLVColumn; -begin - FillChar(Column, SizeOf(Column), 0); - Column.Mask := LVCF_FMT; - ListView_GetColumn(ListViewHandle, ACol, Column); - Column.fmt := Column.fmt and LVCFMT_JUSTIFYMASK; - - if Column.fmt and LVCFMT_CENTER = LVCFMT_CENTER then - Result := taCenterX - else - if Column.fmt and LVCFMT_RIGHT = LVCFMT_RIGHT then - Result := taRight - else - Result := taLeft; -end; - -function TCustomdxNativeListViewReportLink.LV_GetColumnWidth(ACol: Integer): Integer; -begin - Result := ListView_GetColumnWidth(ListViewHandle, ACol); -end; - -function TCustomdxNativeListViewReportLink.LV_GetHeaderHeight: Integer; -var - Header: HWND; - R: TRect; -begin - Header := LV_GetHeaderWindow; - if IsWindow(Header) then - begin - GetWindowRect(Header, R); - Result := R.Bottom - R.Top; - end - else - Result := 0; -end; - -function TCustomdxNativeListViewReportLink.LV_GetHeaderWindow: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - Result := ListView_GetHeader(ListViewHandle); -end; - -function TCustomdxNativeListViewReportLink.LV_GetIconArrangement: TIconArrangement; -const - IconArrangements: array[Boolean] of TIconArrangement = (iaLeft, iaTop); -begin - Result := IconArrangements[(GetWindowLong(ListViewHandle, GWL_STYLE) and LVS_ALIGNMASK) = 0]; -end; - -function TCustomdxNativeListViewReportLink.LV_GetIsItemChecked(AIndex: Integer): Boolean; -begin - Result := ListView_GetCheckState(ListViewHandle, AIndex) <> 0; -end; - -function TCustomdxNativeListViewReportLink.LV_GetIsItemSelected(AIndex: Integer): Boolean; -begin - Result := ListView_GetItemState(ListViewHandle, AIndex, LVIS_SELECTED) <> 0; -end; - -function TCustomdxNativeListViewReportLink.LV_GetItemCount: Integer; -begin - Result := ListView_GetItemCount(ListViewHandle); -end; - -function TCustomdxNativeListViewReportLink.LV_GetItemImageIndex(ACol, ARow: Integer): Integer; - - procedure InternalGetImageIndex(var AnImageIndex: Integer); - var - Item: TLVItem; - begin - FillChar(Item, SizeOf(Item), 0); - Item.Mask := LVIF_IMAGE; - Item.iImage := AnImageIndex; - Item.iItem := ARow; - Item.iSubItem := ACol; - if ListView_GetItem(ListViewHandle, Item) then - AnImageIndex := Item.iImage - else - AnImageIndex := -1; - end; - -begin - if (ACol = 0) or not LV_AreCheckBoxes then - begin - Result := I_IMAGECALLBACK; - InternalGetImageIndex(Result); - {if Result = -1 then - begin - Result := 0; - InternalGetImageIndex(Result); - end; } - end - else - Result := -1; -end; - -function TCustomdxNativeListViewReportLink.LV_GetItemSpacing: TListViewItemSize; -const - Params: array[TViewStyle] of Integer = (0, 1, 1, 1); -var - Spacing: Longint; -begin - Spacing := ListView_GetItemSpacing(ListViewHandle, Params[LV_GetViewStyle]); - Result.Width := LoWord(Spacing); - Result.Height := HiWord(Spacing); -end; - -function TCustomdxNativeListViewReportLink.LV_GetItemStateIndex(ACol, ARow: Integer): Integer; -var - Item: TLVItem; -begin - if CanHasStateImage(ACol, ARow) then - begin - FillChar(Item, SizeOf(Item), 0); - Item.Mask := LVIF_IMAGE; - Item.StateMask := LVIS_STATEIMAGEMASK; - Item.iItem := ARow - Ord(IsReportStyle and ShowColumnHeaders); - Item.iSubItem := ACol; - ListView_GetItem(ListViewHandle, Item); - Result := (Item.State shr 12) - 1; - end - else - Result := -1; -end; - -function TCustomdxNativeListViewReportLink.LV_GetItemText(ACol, ARow: Integer): string; -const - BufferLength = 4096; -var - Buffer: array[0..BufferLength - 1] of Char; -begin - ListView_GetItemText(ListViewHandle, ARow, ACol, Buffer, BufferLength); - Result := Buffer; -end; - -function TCustomdxNativeListViewReportLink.LV_GetRowHeight: Integer; -begin - Result := HiWord(ListView_GetItemSpacing(ListViewHandle, 1)); -end; - -function TCustomdxNativeListViewReportLink.LV_GetSelectedCount: Integer; -begin - Result := ListView_GetSelectedCount(ListViewHandle); -end; - -function TCustomdxNativeListViewReportLink.LV_GetSelectedIndex: Integer; -begin - Result := ListView_GetNextItem(ListViewHandle, -1, LVNI_ALL or LVNI_SELECTED); -end; - -function TCustomdxNativeListViewReportLink.LV_GetViewStyle: TViewStyle; -const - ViewStylesMap: array[LVS_ICON..LVS_LIST] of TViewStyle = (vsIcon, vsReport, vsSmallIcon, vsList); -var - ViewStyle: DWORD; -begin - if dxPSGlbl.IsComCtrlVersion600 then - ViewStyle := ListView_GetView(ListViewHandle) - else - ViewStyle := GetWindowLong(ListViewHandle, GWL_STYLE); - Result := ViewStylesMap[ViewStyle and LVS_TYPEMASK]; -end; - -function TCustomdxNativeListViewReportLink.LV_HasColumnHeaderImage(ACol: Integer): Boolean; -var - Column: TLVColumn; -begin - FillChar(Column, SizeOf(Column), 0); - Column.Mask := LVCF_FMT; - ListView_GetColumn(ListViewHandle, ACol, Column); - Result := Column.fmt and LVCFMT_COL_HAS_IMAGES = LVCFMT_COL_HAS_IMAGES; -end; - -function TCustomdxNativeListViewReportLink.LV_HasColumnHeaders: Boolean; -begin - Result := GetWindowLong(ListViewHandle, GWL_STYLE) and LVS_NOCOLUMNHEADER <> LVS_NOCOLUMNHEADER; -end; - -function TCustomdxNativeListViewReportLink.LV_IsOwnerData: Boolean; -begin - Result := GetWindowLong(ListViewHandle, GWL_STYLE) and LVS_OWNERDATA = LVS_OWNERDATA; -end; - -function TCustomdxNativeListViewReportLink.GetShowColumnHeaders: Boolean; -begin - Result := LV_HasColumnHeaders; -end; - -function TCustomdxNativeListViewReportLink.HasSupportForInvisibledColumnHeaders: Boolean; -begin - Result := False; -end; - -procedure TCustomdxNativeListViewReportLink.SetShowColumnHeaders(Value: Boolean); -begin -end; - -function TCustomdxNativeListViewReportLink.CheckImages: Boolean; -begin - Result := HasLargeImages and (Images.Width <> 0) and (Images.Height <> 0); -end; - -function TCustomdxNativeListViewReportLink.CheckSmallImages: Boolean; -begin - Result := HasSmallImages and (SmallImages.Width <> 0) and (SmallImages.Height <> 0); -end; - -function TCustomdxNativeListViewReportLink.CheckStateImages: Boolean; -begin - Result := HasStateImages and (StateImages.Width <> 0) and (StateImages.Height <> 0); -end; - -procedure TCustomdxNativeListViewReportLink.ClearImages; -begin - if not IsAggregated then - begin - if FLargeImages <> nil then FLargeImages.Clear; - if FSmallImages <> nil then FSmallImages.Clear; - if FStateImages <> nil then FStateImages.Clear; - end; -end; - -procedure TCustomdxNativeListViewReportLink.CreateImages; -begin - FLargeImages := TImageList.Create(nil); - FSmallImages := TImageList.Create(nil); - FStateImages := TImageList.Create(nil); -end; - -procedure TCustomdxNativeListViewReportLink.DeleteImages; -begin - FreeAndNil(FStateImages); - FreeAndNil(FSmallImages); - FreeAndNil(FLargeImages); -end; - -function TCustomdxNativeListViewReportLink.GetLargeImages: TCustomImageList; -begin - if FLargeImages.Count = 0 then - CopyImages(ListView_GetImageList(ListViewHandle, LVSIL_NORMAL), FLargeImages); - Result := FLargeImages; -end; - -function TCustomdxNativeListViewReportLink.GetSmallImages: TCustomImageList; -begin - if FSmallImages.Count = 0 then - CopyImages(ListView_GetImageList(ListViewHandle, LVSIL_SMALL), FSmallImages); - Result := FSmallImages; -end; - -function TCustomdxNativeListViewReportLink.GetStateImages: TCustomImageList; -begin - if FStateImages.Count = 0 then - CopyImages(ListView_GetImageList(ListViewHandle, LVSIL_STATE), FStateImages); - Result := FStateImages; -end; - -function TCustomdxNativeListViewReportLink.HasLargeImages: Boolean; -begin - Result := ListView_GetImageList(ListViewHandle, LVSIL_NORMAL) <> 0; -end; - -function TCustomdxNativeListViewReportLink.HasSmallImages: Boolean; -begin - Result := ListView_GetImageList(ListViewHandle, LVSIL_SMALL) <> 0; -end; - -function TCustomdxNativeListViewReportLink.HasStateImages: Boolean; -begin - Result := ListView_GetImageList(ListViewHandle, LVSIL_STATE) <> 0; -end; - -procedure TCustomdxNativeListViewReportLink.AddExtraImage(AParent: TdxReportCell; - ACol, ARow: Integer; R: TRect); -const - ItemClasses: array [Boolean] of TdxReportCellDataClass = (TdxReportCellImage, TdxReportCellCheck); -var - Item: TAbstractdxReportCellData; -begin - Item := ItemClasses[LV_AreCheckBoxes].Create(AParent); - with Item do - begin - Item.BoundsRect := R; - AssignData(ACol, ARow, Item); - TdxReportCellText(Item).Text := ''; - if R.Right <> R.Left then - Item.CellSides := GetCellSides(ACol, ARow) - [csRight]; - if IsDrawBorder then - Item.CellSides := Item.CellSides + [csLeft]; - DoInitializeItem(ACol, ARow, Item); - end; - - if LV_AreCheckBoxes then - begin - TdxReportCellCheck(Item).Checked := IsItemChecked(ARow); - TdxReportCellCheck(Item).BoldBorder := True; - end - else - begin - TdxReportCellImage(Item).ImageList := StateImages; - TdxReportCellImage(Item).ImageIndex := LV_GetItemStateIndex(ACol, ARow); - TdxReportCellImage(Item).MakeSpaceForEmptyImage := True; - end; -end; - -function TCustomdxNativeListViewReportLink.IsExtraImageRequired(ACol, ARow: Integer): Boolean; -begin - Result := IsReportStyle and (ACol = 0) and not IsFixedRow(ARow) and CheckStateImages; -end; - -procedure TCustomdxNativeListViewReportLink.CalculateColumnIndexes; -begin - FColumnIndexes.Clear; - FColumnIndexes.Count := ColCount; - ListView_GetColumnOrderArray(ListViewHandle, FColumnIndexes.Count, PInteger(FColumnIndexes.List)); -end; - -function TCustomdxNativeListViewReportLink.CalculateHeaderRowHeight: Integer; -var - MinRowHeight: Integer; -begin - Result := 1 + LV_GetHeaderHeight + 1; - MinRowHeight := Renderer.CalcTextPatternHeight(ScreenDC, HeaderFont); - if Result < MinRowHeight then - Result := MinRowHeight -end; - -function TCustomdxNativeListViewReportLink.CalculateRowHeight: Integer; -var - MinRowHeight: Integer; -begin - Result := 1 + LV_GetRowHeight + 1; - MinRowHeight := Renderer.CalcTextPatternHeight(ScreenDC, Font); - if Result < MinRowHeight then - Result := MinRowHeight -end; - -function TCustomdxNativeListViewReportLink.CanHasStateImage(ACol, ARow: Integer): Boolean; -begin - Result := not LV_AreCheckBoxes and (not IsReportStyle or ((ACol = 0) and not IsFixedRow(ARow))); -end; - -function TCustomdxNativeListViewReportLink.IsItemChecked(ARow: Integer): Boolean; -begin - Result := IsReportStyle and not IsFixedRow(ARow) and LV_GetIsItemChecked(ARow - Ord(ShowColumnHeaders)); -end; - -procedure TCustomdxNativeListViewReportLink.LoadAllOwnerData; -var - Item: TNMLVCacheHint; -begin - with Item, hdr do - begin - hwndFrom := ListViewHandle; - idFrom:= ListViewHandle; - code := LVN_ODCACHEHINT; - iFrom := 0; - iTo := LV_GetItemCount - 1; - end; - SendMessage(ListViewHandle, WM_NOTIFY, ListViewHandle, Integer(@Item)); -end; - -procedure TCustomdxNativeListViewReportLink.CalculateInternalItemsViewInfo; - - procedure CalculateItemSize(var AWidth, AHeight: Integer); - var - I, CurWidth, CurHeight: Integer; - begin - with LV_GetItemSpacing do - begin - AWidth := Width; - AHeight := Height; - end; - - for I := 0 to InternalItemCount - 1 do - with InternalItems[I] do - if IsIconStyle then - begin - CurHeight := MeasureContentHeight(ScreenDC); - if AHeight < CurHeight then AHeight := CurHeight; - end - else - begin - CurWidth := MeasureContentWidth(ScreenDC); - if AWidth < CurWidth then AWidth := CurWidth; - end; - end; - - procedure CalculateColRowCount(AWidth, AHeight: Integer); - begin - if (LV_GetViewStyle = vsList) or (LV_GetIconArrangement = iaLeft) then - begin - FRowCount := (AvailableSiteHeight - FItemSpaceVert) div (FRowHeight + FItemSpaceVert); - if (FRowCount = 0) and (InternalItemCount <> 0) then - FRowCount := 1; - if FRowCount > InternalItemCount then - FRowCount := InternalItemCount; - FColumnCount := InternalItemCount div FRowCount; - if InternalItemCount mod FRowCount <> 0 then - Inc(FColumnCount); - end - else - begin - FColumnCount := (AvailableSiteWidth - FItemSpaceHorz) div (FColumnWidth + FItemSpaceHorz); - if (FColumnCount = 0) and (InternalItemCount <> 0) then - FColumnCount := 1; - if FColumnCount > InternalItemCount then - FColumnCount := InternalItemCount; - - FRowCount := InternalItemCount div FColumnCount; - if InternalItemCount mod FColumnCount <> 0 then - Inc(FRowCount); - end; - end; - -begin - CalculateItemSize(FColumnWidth, FRowHeight); - CalculateColRowCount(FColumnWidth, FRowHeight); -end; - -procedure TCustomdxNativeListViewReportLink.CreateExtraInternalItems(ATemporaryParent: TdxReportCell); -var - I: Integer; - R: TRect; - LVItemCount: Integer; - Item: TAbstractdxReportCellData; -begin - if InternalItemCount <> 0 then - begin - with LV_GetItemSpacing do - R := Rect(0, 0, Width, Height); - - FInternalItemsCreating := True; - try - LVItemCount := LV_GetItemCount; - for I := 0 to ColCount * RowCount - LVItemCount - 1 do - begin - Item := CreateDataItem(ATemporaryParent, 0, LVItemCount + I, R); - FInternalItems.Add(Item); - end; - finally - FInternalItemsCreating := False; - end; - end; -end; - -procedure TCustomdxNativeListViewReportLink.CreateInternalItems(ATemporaryParent: TdxReportCell); -var - R: TRect; - I: Integer; - Item: TAbstractdxReportCellData; -begin - if LV_GetItemCount = 0 then Exit; - - with LV_GetItemSpacing do - R := Rect(0, 0, Width, Height); - FInternalItemsCreating := True; - try - for I := 0 to LV_GetItemCount - 1 do - if not OnlySelected or (LV_GetSelectedCount = 0) or LV_GetIsItemSelected(I) then - begin - Item := CreateDataItem(ATemporaryParent, 0, I, R); - FInternalItems.Add(Item); - end; - finally - FInternalItemsCreating := False; - end; -end; - -function TCustomdxNativeListViewReportLink.GetFlatInternalItemIndex(ACol, ARow: Integer): Integer; -begin - if (LV_GetViewStyle = vsList) or (LV_GetIconArrangement = iaLeft) then - Result := ACol * FRowCount + ARow - else - Result := ARow * FColumnCount + ACol; -end; - -procedure TCustomdxNativeListViewReportLink.InitializeInternalItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin -end; - -function TCustomdxNativeListViewReportLink.PlaceInternalItem(AParent: TdxReportCell; - ACol, ARow: Integer; R: TRect): TAbstractdxReportCellData; -var - Index: Integer; -begin - Index := GetFlatInternalItemIndex(ACol, ARow); - if Index < InternalItemCount then - begin - Result := InternalItems[Index]; - Result.Parent := AParent; - Result.BoundsRect := R; - InitializeInternalItem(Result, Index); - end - else - Result := nil; -end; - -procedure TCustomdxNativeListViewReportLink.SetupInternalItemsCellSides; -var - Col, Row, Index: Integer; -begin - for Col := 0 to ColCount - 1 do - for Row := 0 to RowCount - 1 do - begin - Index := GetFlatInternalItemIndex(Col, Row); - if Index < InternalItemCount then - InternalItems[Index].CellSides := GetCellSides(Col, Row); - end; -end; - -function TCustomdxNativeListViewReportLink.IsIconStyle: Boolean; -begin - Result := LV_GetViewStyle = vsIcon; -end; - -function TCustomdxNativeListViewReportLink.IsReportStyle: Boolean; -begin - Result := LV_GetViewStyle = vsReport; -end; - -function TCustomdxNativeListViewReportLink.GetHeaderColor: TColor; -begin - Result := FixedColor; -end; - -function TCustomdxNativeListViewReportLink.GetHeaderFont: TFont; -begin - Result := FixedFont; -end; - -function TCustomdxNativeListViewReportLink.GetHeaderTransparent: Boolean; -begin - Result := FixedTransparent; -end; - -function TCustomdxNativeListViewReportLink.GetIncludeHeaders: Boolean; -begin - Result := IncludeFixed; -end; - -function TCustomdxNativeListViewReportLink.GetImages: TCustomImageList; -begin - if IsIconStyle then - Result := LargeImages - else - Result := SmallImages; -end; - -function TCustomdxNativeListViewReportLink.GetInternalItem(Index: Integer): TAbstractdxReportCellData; -begin - Result := TAbstractdxReportCellData(FInternalItems[Index]); -end; - -function TCustomdxNativeListViewReportLink.GetInternalItemCount: Integer; -begin - Result := FInternalItems.Count; -end; - -function TCustomdxNativeListViewReportLink.GetOptions: TdxListViewPaintOptions; -begin - Result := FOptions; -end; - -procedure TCustomdxNativeListViewReportLink.SetHeaderColor(Value: TColor); -begin - FixedColor := Value; -end; - -procedure TCustomdxNativeListViewReportLink.SetHeaderFont(Value: TFont); -begin - FixedFont := Value; -end; - -procedure TCustomdxNativeListViewReportLink.SetHeaderTransparent(Value: Boolean); -begin - FixedTransparent := Value; -end; - -procedure TCustomdxNativeListViewReportLink.SetIncludeHeaders(Value: Boolean); -begin - IncludeFixed := Value; -end; - -procedure TCustomdxNativeListViewReportLink.SetOptions(Value: TdxListViewPaintOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - //if lvpoBestColumnWidth in Options then RowAutoHeight := False; - LinkModified(True); - end; -end; - -{ TdxNativeListViewReportLink } - -function TdxNativeListViewReportLink.DataProviderPresent: Boolean; -begin - if DataSource = rldsComponent then - Result := IsWindow(ListViewHandle) - else - Result := inherited DataProviderPresent; -end; - -procedure TdxNativeListViewReportLink.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited; - if (Operation = opRemove) and (AComponent is TWinControl) and TWinControl(Component).HandleAllocated and - (TWinControl(Component).Handle = ListViewHandle) then - ListViewHandle := 0; -end; - -function TdxNativeListViewReportLink.GetDesignerClass: TdxReportLinkDesignWindowClass; -begin - Result := TdxfmLVReportLinkDesignWindow; -end; - -function TdxNativeListViewReportLink.GetListViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - Result := FListViewHandle; -end; - -procedure TdxNativeListViewReportLink.SetListViewHandle( - Value: {$IFDEF BCB}Integer {$ELSE} HWND{$ENDIF}); -begin - // TODO: invalid report data - if (FListViewHandle <> Value) and IsWindow(Value) then - begin - FListViewHandle := Value; - LinkModified(True); - end; -end; - -{ TCustomdxListViewReportLink } - -procedure TCustomdxListViewReportLink.Assign(Source: TPersistent); -begin - if Source is TCustomdxListViewReportLink then - with TCustomdxListViewReportLink(Source) do - begin - Self.ShowColumnHeaders := ShowColumnHeaders; - end; - inherited; -end; - -class function TCustomdxListViewReportLink.Aggregable: Boolean; -begin - Result := True; -end; - -procedure TCustomdxListViewReportLink.AssignData(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData); -begin - inherited; - - if IsReportStyle then - if IsFixedRow(ARow) then - begin - ADataItem.Parent.Data := 0; - ADataItem.Data := ACol; - end - else - begin - ADataItem.Parent.Data := Integer(TObject(ListViewGetItems(CustomListView)[ARow - Ord(ShowColumnHeaders)])); - ADataItem.Data := ACol - 1; - end; -end; - -procedure TCustomdxListViewReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - DrawInfo: TdxListViewReportLinkCustomDrawInfo; -begin - GetCustomDrawInfo(AItem, DrawInfo); - with DrawInfo do - case AttributeID of - dxListViewHeaderID: - DoCustomDrawHeader(ACanvas, ABoundsRect, HeaderIndex, TdxReportCellImage(AItem), ADone); - dxListViewItemID: - DoCustomDrawItem(ACanvas, ABoundsRect, ListItem, SubItem, TdxReportCellImage(AItem), ADone); - end; -end; - -procedure TCustomdxListViewReportLink.DoInitializeHeader(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeHeader) then - FOnInitializeHeader(Self, ARow, ACol, ADataItem); -end; - -procedure TCustomdxListViewReportLink.DoInitializeItem(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData); -begin - if IsFixedRow(ARow) then - DoInitializeHeader(ACol, ARow, ADataItem) - else - inherited; -end; - -procedure TCustomdxListViewReportLink.InternalRestoreFromOriginal; -begin - inherited; - ShowColumnHeaders := ListViewGetShowColumnHeaders(CustomListView); -end; - -procedure TCustomdxListViewReportLink.InternalRestoreDefaults; -begin - inherited; - ShowColumnHeaders := True; -end; - -procedure TCustomdxListViewReportLink.PrepareConstruct(AReportCells: TdxReportCells); -begin - CustomListView.HandleNeeded; - inherited; -end; - -function TCustomdxListViewReportLink.GetListViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - Result := CustomListView.Handle; -end; - -function TCustomdxListViewReportLink.GetShowColumnHeaders: Boolean; -begin - Result := FShowColumnHeaders; -end; - -function TCustomdxListViewReportLink.HasSupportForInvisibledColumnHeaders: Boolean; -begin - Result := True; -end; - -procedure TCustomdxListViewReportLink.InitializeInternalItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - inherited; - if AnIndex < LV_GetItemCount then - begin - AnItem.Data := Integer(TObject(ListViewGetItems(CustomListView)[AnIndex])); - AnItem.Parent.Data := 0; - end; -end; - -function TCustomdxListViewReportLink.IsItemChecked(ARow: Integer): Boolean; -begin - Result := IsReportStyle and not IsFixedRow(ARow) and - ListViewGetItems(CustomListView)[ARow - Ord(ShowColumnHeaders)].Checked; -end; - -procedure TCustomdxListViewReportLink.LoadAllOwnerData; -const - Request: TItemRequest = [irText, irImage, irState]; -var - I: Integer; -begin - inherited; - for I := 0 to LV_GetItemCount - 1 do - ListViewOwnerDataFetch(CustomListView, I, Request); -end; - -procedure TCustomdxListViewReportLink.SetListViewHandle( - Value: {$IFDEF BCB}Integer {$ELSE} HWND{$ENDIF}); -begin -end; - -procedure TCustomdxListViewReportLink.SetShowColumnHeaders(Value: Boolean); -begin - if FShowColumnHeaders <> Value then - begin - FShowColumnHeaders := Value; - LinkModified(True); - end; -end; - -function TCustomdxListViewReportLink.GetLargeImages: TCustomImageList; -begin - if IsAggregated then - Result := ListViewGetLargeImages(CustomListView) - else - Result := inherited GetLargeImages; -end; - -function TCustomdxListViewReportLink.GetSmallImages: TCustomImageList; -begin - if IsAggregated then - Result := ListViewGetSmallImages(CustomListView) - else - Result := inherited GetSmallImages; -end; - -function TCustomdxListViewReportLink.GetStateImages: TCustomImageList; -begin - if IsAggregated then - Result := ListViewGetStateImages(CustomListView) - else - Result := inherited GetStateImages; -end; - -function TCustomdxListViewReportLink.GetCustomListView: TCustomListView; -begin - Result := TCustomListView(Component); -end; - -procedure TCustomdxListViewReportLink.DoCustomDrawHeader(ACanvas: TCanvas; - ARect: TRect; AHeaderIndex: Integer; AnItem: TdxReportCellImage; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeader) then - FOnCustomDrawHeader(Self, ACanvas, ARect, AHeaderIndex, AnItem, ADone); -end; - -procedure TCustomdxListViewReportLink.DoCustomDrawItem(ACanvas: TCanvas; - ARect: TRect; AListItem: TListItem; ASubItem: Integer; AnItem: TdxReportCellImage; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawItem) then - FOnCustomDrawItem(Self, ACanvas, ARect, AListItem, ASubItem, AnItem, ADone); -end; - -procedure TCustomdxListViewReportLink.GetCustomDrawInfo(AnItem: TAbstractdxReportCellData; - var ACustomDrawInfo: TdxListViewReportLinkCustomDrawInfo); -begin - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - with ACustomDrawInfo do - begin - if IsReportStyle and (AnItem.Parent.Data = 0) then - AttributeID := dxListViewHeaderID - else - AttributeID := dxListViewItemID; - - case AttributeID of - dxListViewHeaderID: - HeaderIndex := AnItem.Data; - dxListViewItemID: - if IsReportStyle then - begin - ListItem := TObject(AnItem.Parent.Data) as TListItem; - SubItem := AnItem.Data; - end - else - ListItem := TObject(AnItem.Data) as TListItem; - end; - end; -end; - -procedure TCustomdxListViewReportLink.SetOnCustomDrawHeader(Value: TdxCustomDrawListViewHeaderEvent); -begin - if @OnCustomDrawHeader <> @Value then - begin - OnCustomDrawHeader := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TCustomdxListViewReportLink.SetOnCustomDrawItem(Value: TdxCustomDrawListViewItemEvent); -begin - if @FOnCustomDrawItem <> @Value then - begin - FOnCustomDrawItem:= Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -{ TdxListViewReportLink } - -function TdxListViewReportLink.GetListView: TListView; -begin - Result := TListView(Component); -end; - -{$IFDEF REGISTERSHELLCTRLS} - -{ TCustomdxShellListViewReportLink } - -function TCustomdxShellListViewReportLink.HasStateImages: Boolean; -begin - Result := not IsReportStyle or inherited HasStateImages; -end; - -procedure TCustomdxShellListViewReportLink.CreateImages; -begin -end; - -procedure TCustomdxShellListViewReportLink.DeleteImages; -begin -end; - -function TCustomdxShellListViewReportLink.GetLargeImages: TCustomImageList; -begin - Result := dxPSUtl.ShellLargeImages; -end; - -function TCustomdxShellListViewReportLink.GetSmallImages: TCustomImageList; -begin - Result := dxPSUtl.ShellSmallImages; -end; - -function TCustomdxShellListViewReportLink.GetStateImages: TCustomImageList; -begin - Result := dxPSUtl.ShellSmallImages; -end; - -function TCustomdxShellListViewReportLink.GetShellListView: TShellListView; -begin - Result := TShellListView(Component); -end; - -{$ENDIF} - -{ TdxfmLVReportLinkDesignWindow } - -constructor TdxfmLVReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxPSGlbl.dxhcListViewReportLinkDesigner; - inherited; - CreateControls; - PageControl1.ActivePage := PageControl1.Pages[0]; - imgHint.Picture.Assign(dxExtCtrls.WarningSignBitmap); -end; - -procedure TdxfmLVReportLinkDesignWindow.DoInitialize; -begin - inherited; - - chbxShowBorders.Checked := lvpoBorder in ReportLink.Options; - chbxShowHorzLines.Checked := lvpoHorzLines in ReportLink.Options; - chbxShowVertLines.Checked := lvpoVertLines in ReportLink.Options; - chbxShowColumnHeaders.Visible := ReportLink.HasSupportForInvisibledColumnHeaders; - chbxShowColumnHeaders.Checked := ReportLink.ShowColumnHeaders; - - chbxAutoWidth.Checked := ReportLink.AutoWidth; - chbxRowAutoHeight.Checked := ReportLink.RowAutoHeight; - with cbxDrawMode do - ItemIndex := Items.IndexOfObject(TObject(ReportLink.DrawMode)); - - chbxTransparent.Checked := ReportLink.Transparent; - TdxPSColorCombo(FccbxColor).ColorValue := ColorToRGB(ReportLink.Color); - TdxPSColorCombo(FccbxEvenColor).ColorValue := ColorToRGB(ReportLink.EvenColor); - chbxTransparentHeaders.Checked := ReportLink.HeaderTransparent; - TdxPSColorCombo(FccbxFixedColor).ColorValue := ColorToRGB(ReportLink.HeaderColor); - TdxPSColorCombo(FccbxGridLineColor).ColorValue := ColorToRGB(ReportLink.GridLineColor); - - FontInfoToText(ReportLink.Font, edFont); - FontInfoToText(ReportLink.EvenFont, edEvenFont); - FontInfoToText(ReportLink.HeaderFont, edFixedFont); - - chbxHeadersOnEveryPage.Checked := ReportLink.HeadersOnEveryPage; - chbxOnlySelected.Checked := ReportLink.OnlySelected; - chbxIncludeFixed.Checked := ReportLink.IncludeFixed; - - chbxUse3DEffects.Checked := ReportLink.Effects3D; - chbxUseSoft3D.Checked := ReportLink.Soft3D; -end; - -{$IFDEF DELPHI7} -function TdxfmLVReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxfmLVReportLinkDesignWindow.LoadStrings; -begin - inherited; - - lblHint.Caption := cxGetResourceString(@sdxHintListViewDesignerMessage); - - tshOptions.Caption := cxGetResourceString(@sdxOptions); - tshFont.Caption := cxGetResourceString(@sdxFonts); - tshColor.Caption := cxGetResourceString(@sdxColors); - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviors); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblShow.Caption := cxGetResourceString(@sdxShow); - chbxShowBorders.Caption := cxGetResourceString(@sdxBorderLines); - chbxShowHorzLines.Caption := cxGetResourceString(@sdxHorzLines); - chbxShowVertLines.Caption := cxGetResourceString(@sdxVertLines); - chbxShowColumnHeaders.Caption := cxGetResourceString(@sdxColumnHeaders); - - lblMiscellaneous.Caption := cxGetResourceString(@sdxMiscellaneous); - chbxAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - chbxRowAutoHeight.Caption := cxGetResourceString(@sdxRowAutoHeight); - lblDrawMode.Caption := cxGetResourceString(@sdxDrawMode); - with cbxDrawMode.Items do - begin - BeginUpdate; - try - Clear; - AddObject(cxGetResourceString(@sdxDrawModeStrict), TObject(gdmStrict)); - AddObject(cxGetResourceString(@sdxDrawModeOddEven), TObject(gdmOddEven)); - AddObject(cxGetResourceString(@sdxDrawModeChess), TObject(gdmChess)); - finally - EndUpdate; - end; - end; - - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - lblEvenColor.Caption := cxGetResourceString(@sdxEvenColor); - stTransparentHeaders.Caption := ' ' + cxGetResourceString(@sdxHeadersTransparent) + ' '; - lblHeadersColor.Caption := cxGetResourceString(@sdxHeaderColor); - lblGridLinesColor.Caption := cxGetResourceString(@sdxGridLinesColor); - - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - btnEvenFont.Caption := cxGetResourceString(@sdxBtnEvenFont); - btnHeadersFont.Caption := cxGetResourceString(@sdxBtnHeadersFont); - - lblOnEveryPage.Caption := cxGetResourceString(@sdxOnEveryPage); - chbxHeadersOnEveryPage.Caption := cxGetResourceString(@sdxHeadersOnEveryPage); - - lblSelection.Caption := cxGetResourceString(@sdxSelection); - chbxOnlySelected.Caption := cxGetResourceString(@sdxOnlySelected); - chbxIncludeFixed.Caption := cxGetResourceString(@sdxIncludeFixed); - - lblLookAndFeel.Caption := cxGetResourceString(@sdxLookAndFeel); - chbxUse3DEffects.Caption := cxGetResourceString(@sdxUse3DEffects); - chbxUseSoft3D.Caption := cxGetResourceString(@sdxSoft3D); -end; - -procedure TdxfmLVReportLinkDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -begin - inherited; - dxPSDrawGridPreview(ACanvas, R, ReportLink, False, ReportLink.ShowColumnHeaders); -end; - -procedure TdxfmLVReportLinkDesignWindow.UpdateControlsState; -begin - inherited; - FccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := FccbxColor.Enabled; - FccbxEvenColor.Enabled := not chbxTransparent.Checked and (ReportLink.DrawMode in [gdmOddEven, gdmChess]); - lblEvenColor.Enabled := FccbxEvenColor.Enabled; - FccbxFixedColor.Enabled := not chbxTransparentHeaders.Checked; - lblHeadersColor.Enabled := FccbxFixedColor.Enabled; - - btnEvenFont.Enabled := ReportLink.DrawMode in [gdmOddEven, gdmChess]; - if ReportLink.DrawMode in [gdmOddEven, gdmChess] then - begin - lblColor.Caption := cxGetResourceString(@sdxOddColor); - btnFont.Caption := cxGetResourceString(@sdxBtnOddFont); - end - else - begin - lblColor.Caption := cxGetResourceString(@sdxColor); - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - end; - chbxHeadersOnEveryPage.Enabled := not ReportLink.IsAggregated; - chbxIncludeFixed.Enabled := chbxOnlySelected.Enabled and chbxOnlySelected.Checked; - chbxUseSoft3D.Enabled := chbxUse3DEffects.Checked; -end; - -procedure TdxfmLVReportLinkDesignWindow.UpdatePreview; -begin - FPreviewBox.Invalidate; -end; - -function TdxfmLVReportLinkDesignWindow.GetReportLink: TCustomdxNativeListViewReportLink; -begin - Result := inherited ReportLink as TCustomdxNativeListViewReportLink; -end; - -procedure TdxfmLVReportLinkDesignWindow.CreateControls; - - function CreateColorCombo(AParent: TWinControl; AHost: TControl; - ATag: Integer; AAutoColor: TColor; ALabel: TLabel): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with Result do - begin - BoundsRect := AHost.BoundsRect; - Tag := MakeTTag(ATag); - Parent := AParent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - OnChange := ccbxColorChange; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - - procedure CreatePreviewBox; - var - R: TRect; - begin - FPreviewBox := TdxPSPaintPanel.Create(Self); - with FPreviewBox do - begin - Parent := pnlPreview; - R := pnlPreview.BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - InflateRect(R, -1, -1); - BoundsRect := R; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := pbxPreviewPaint; - end; - end; - -begin - CreatePreviewBox; - - FccbxColor := - CreateColorCombo(gbxTransparent, bvlColorHost, 0, dxDefaultColor, lblColor); - FccbxEvenColor := - CreateColorCombo(gbxTransparent, bvlEvenColorHost, 1, dxDefaultColor, lblEvenColor); - FccbxFixedColor := - CreateColorCombo(gbxTransparentHeaders, bvlHeadersColorHost, 2, dxDefaultFixedColor, lblHeadersColor); - FccbxGridLineColor := - CreateColorCombo(pnlColor, bvlGridLineColorHost, 3, dxDefaultGridLineColor, lblGridLinesColor); -end; - -procedure TdxfmLVReportLinkDesignWindow.CMDialogChar(var message: TCMDialogChar); -var - I: Integer; -begin - inherited; - with PageControl1 do - for I := 0 to PageCount - 1 do - if IsAccel(message.CharCode, Pages[I].Caption) then - begin - message.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TdxfmLVReportLinkDesignWindow.cbxDrawModeClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TComboBox(Sender) do - ReportLink.DrawMode := TdxGridDrawMode(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TdxfmLVReportLinkDesignWindow.cbxDrawModeDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - dxPSBaseGridLnk.dxPSDrawComboDrawModeItem(Control, Index, Rect, State); -end; - -procedure TdxfmLVReportLinkDesignWindow.chbxShowBordersClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TCheckBox(Sender) do - if Checked then - ReportLink.Options := ReportLink.Options + [TdxListViewPaintOption(TTagToInt(Tag))] - else - ReportLink.Options := ReportLink.Options - [TdxListViewPaintOption(TTagToInt(Tag))]; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmLVReportLinkDesignWindow.chbxShowColumnHeadersClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.ShowColumnHeaders := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmLVReportLinkDesignWindow.chbxAutoWidthClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoWidth := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmLVReportLinkDesignWindow.chbxRowAutoHeightClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.RowAutoHeight := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmLVReportLinkDesignWindow.chbxTransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - case TTagToInt(TCheckBox(Sender).Tag) of - 0: ReportLink.Transparent := TCheckBox(Sender).Checked; - 1: ReportLink.HeaderTransparent := TCheckBox(Sender).Checked; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmLVReportLinkDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TdxfmLVReportLinkDesignWindow.stTransparentHeadersClick(Sender: TObject); -begin - if chbxTransparentHeaders.CanFocus then ActiveControl := chbxTransparentHeaders; - chbxTransparentHeaders.Checked := not chbxTransparentHeaders.Checked; -end; - -procedure TdxfmLVReportLinkDesignWindow.ccbxColorChange(Sender: TObject); -var - AColor: TColor; -begin - if LockControlsUpdate then Exit; - AColor := TdxPSColorCombo(Sender).ColorValue; - case TTagToInt(TdxPSColorCombo(Sender).Tag) of - 0: ReportLink.Color := AColor; - 1: ReportLink.EvenColor := AColor; - 2: ReportLink.FixedColor := AColor; - 3: ReportLink.GridLineColor := AColor; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmLVReportLinkDesignWindow.btnFontClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - - with dxPSGlbl.FontDialog do - begin - case TTagToInt(TButton(Sender).Tag) of - 0: Font := ReportLink.Font; - 1: Font := ReportLink.EvenFont; - 2: Font := ReportLink.HeaderFont; - end; - - if Execute then - begin - case TTagToInt(TButton(Sender).Tag) of - 0: - begin - ReportLink.Font := Font; - FontInfoToText(ReportLink.Font, edFont); - end; - 1: - begin - ReportLink.EvenFont := Font; - FontInfoToText(ReportLink.EvenFont, edEvenFont); - end; - 2: - begin - ReportLink.FixedFont := Font; - FontInfoToText(ReportLink.HeaderFont, edFixedFont); - end; - end; - Modified := True; - UpdatePreview; - end; - end; -end; - -procedure TdxfmLVReportLinkDesignWindow.chbxHeadersOnEveryPageClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.HeadersOnEveryPage := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmLVReportLinkDesignWindow.chbxOnlySelectedClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OnlySelected := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmLVReportLinkDesignWindow.chbxIncludeFixedClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.IncludeFixed := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmLVReportLinkDesignWindow.chbxUse3DEffectsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Effects3D := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmLVReportLinkDesignWindow.chbxUseSoft3DClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Soft3D := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmLVReportLinkDesignWindow.pbxPreviewPaint(Sender: TObject); -begin - with FPreviewBox do - PaintPreview(Canvas, ClientRect); -end; - -procedure TdxfmLVReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreview.Parent := TPageControl(Sender).ActivePage; -end; - -initialization - dxPSRegisterReportLink(TdxListViewReportLink, TListView, TdxfmLVReportLinkDesignWindow); - {$IFDEF REGISTERSHELLCTRLS} - dxPSRegisterReportLink(TdxShellListViewReportLink, TShellListView, TdxfmLVReportLinkDesignWindow); - {$ENDIF} - -finalization - {$IFDEF REGISTERSHELLCTRLS} - dxPSUnregisterReportLink(TdxShellListViewReportLink, TShellListView, TdxfmLVReportLinkDesignWindow); - {$ENDIF} - dxPSUnregisterReportLink(TdxListViewReportLink, TListView, TdxfmLVReportLinkDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSLbxLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSLbxLnk.dfm deleted file mode 100644 index 6dae66f6..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSLbxLnk.dfm +++ /dev/null @@ -1,734 +0,0 @@ -object dxLBxReportLinkDesignWindow: TdxLBxReportLinkDesignWindow - Left = 441 - Top = 302 - BorderStyle = bsDialog - Caption = 'dxLbxReportLinkDesigner' - ClientHeight = 253 - ClientWidth = 553 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 545 - Height = 214 - ActivePage = tshColor - MultiLine = True - TabOrder = 1 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 186 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 5 - Top = 13 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 39 - Top = 17 - Width = 209 - Height = 4 - Shape = bsBottomLine - end - object Bevel4: TBevel - Left = 91 - Top = 84 - Width = 156 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 10 - Top = 35 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object chbxPaintItemGraphics: TCheckBox - Left = 90 - Top = 103 - Width = 159 - Height = 17 - Caption = '&Paint item graphics' - TabOrder = 2 - OnClick = chbxPaintItemGraphicsClick - end - object chbxShowBorders: TCheckBox - Left = 90 - Top = 32 - Width = 159 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxShowBordersClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 90 - Top = 54 - Width = 159 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxShowBordersClick - end - object chbxTransparentGraphics: TCheckBox - Tag = 1 - Left = 90 - Top = 127 - Width = 159 - Height = 17 - Caption = '&Transparent Graphics' - TabOrder = 3 - OnClick = chbxTransparentGraphicsClick - end - object lblPreview: TStaticText - Left = 257 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 4 - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 186 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 15 - Top = 150 - Width = 84 - Height = 13 - Caption = '&Grid Lines Color : ' - OnClick = lblComboClick - end - object bvlLineColorHolder: TBevel - Left = 97 - Top = 146 - Width = 135 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 5 - Top = 13 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - OnClick = lblComboClick - end - object gbxTransparent: TGroupBox - Left = 6 - Top = 46 - Width = 237 - Height = 86 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 9 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblComboClick - end - object bvlColorHolder: TBevel - Left = 90 - Top = 20 - Width = 135 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 9 - Top = 48 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - OnClick = lblComboClick - end - object bvlEvenColorHolder: TBevel - Left = 90 - Top = 49 - Width = 135 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 44 - Width = 15 - Height = 17 - Caption = 'T&ransparent' - TabOrder = 1 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 95 - Top = 8 - Width = 148 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 45 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 3 - OnClick = stTransparentClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 186 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 37 - Width = 233 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnEvenFont: TButton - Tag = 1 - Left = 8 - Top = 68 - Width = 110 - Height = 23 - Caption = 'E&ven Font ...' - TabOrder = 2 - OnClick = btnFontClick - end - object edEvenFont: TEdit - Left = 8 - Top = 97 - Width = 233 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 186 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Image3: TImage - Left = 10 - Top = 35 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblSelection: TLabel - Left = 5 - Top = 13 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object Bevel3: TBevel - Left = 54 - Top = 16 - Width = 194 - Height = 5 - Shape = bsBottomLine - end - object lblMiscellaneous: TLabel - Left = 5 - Top = 88 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object imgMiscellaneous: TImage - Left = 10 - Top = 110 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel1: TBevel - Left = 79 - Top = 92 - Width = 169 - Height = 4 - Shape = bsBottomLine - end - object chbxOnlySelected: TCheckBox - Left = 90 - Top = 32 - Width = 148 - Height = 17 - Caption = 'Only &selected cells' - TabOrder = 0 - OnClick = chbxOnlySelectedClick - end - object chbxRowAutoHeight: TCheckBox - Left = 90 - Top = 130 - Width = 148 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 2 - OnClick = chbxRowAutoHeightClick - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 106 - Width = 148 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 1 - OnClick = chbxAutoWidthClick - end - end - end - end - object pnlPreview: TPanel - Left = 265 - Top = 47 - Width = 273 - Height = 160 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 0 - end - object ilPreview: TImageList - Left = 5 - Top = 223 - Bitmap = { - 494C010101000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000084000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000840000008400000084000000FF000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000840000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF0000FF0000FFFFFF0000FF000000FF000000840000008400000084 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF0000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000084 - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF00FFFFFF0000FF000000FF000000FF000000840000008400000084 - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF000000FF000000FF000000FF000000FF000000FF0000008400000084 - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF - 0000008400000084000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000084000000FF000000FF000000FF000000FF000000FF0000008400000084 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000084000000FF000000FF00000084000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000840000008400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFF000000000000FFFF000000000000 - FF3F000000000000F81F000000000000E00F000000000000C007000000000000 - C003000000000000C003000000000000C003000000000000C003000000000000 - C003000000000000E003000000000000F00F000000000000F83F000000000000 - FCFF000000000000FFFF00000000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSLbxLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSLbxLnk.pas deleted file mode 100644 index c4aafc75..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSLbxLnk.pas +++ /dev/null @@ -1,807 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSLbxLnk; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, ComCtrls, ExtCtrls, checklst, ImgList, dxPSGlbl, dxPSCore, - dxPSBaseGridLnk, dxPSGrLnks; - -type - TdxListBoxPaintOption = (lbxpoBorder, lbxpoHorzLines); - TdxListBoxPaintOptions = set of TdxListBoxPaintOption; - - TCustomdxListBoxReportLinkControl = class(TdxCustomListBoxReportLink) - private - FOptions: TdxListBoxPaintOptions; - FPaintItemsGraphics: Boolean; - FTransparentGraphics: Boolean; - function GetOptions: TdxListBoxPaintOptions; - procedure SetOptions(Value: TdxListBoxPaintOptions); - procedure SetPaintItemsGraphics(Value: Boolean); - procedure SetTransparentGraphics(Value: Boolean); - protected - procedure AssignData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData); override; - function GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; override; - procedure InternalRestoreDefaults; override; - function IsDrawBorder: Boolean; override; - function IsDrawHorzLines: Boolean; override; - procedure SetDrawMode(Value: TdxGridDrawMode); override; - - function GetCellHasImage(ACol, ARow: Integer): Boolean; override; - function GetCellImage(ACol, ARow: Integer): TGraphic; override; - function GetCellImageTransparent(ACol, ARow: Integer): Boolean; override; - public - procedure Assign(Source: TPersistent); override; - - property Options: TdxListBoxPaintOptions read GetOptions write SetOptions default [lbxpoBorder..lbxpoHorzLines]; - property PaintItemsGraphics: Boolean read FPaintItemsGraphics write SetPaintItemsGraphics default False; - property TransparentGraphics: Boolean read FTransparentGraphics write SetTransparentGraphics default False; - end; - - TdxListBoxReportLink = class(TCustomdxListBoxReportLinkControl) - private - function GetListBox: TListBox; - public - property ListBox: TListBox read GetListBox; - published - property AutoWidth; - property Color; - property EndEllipsis; - property EvenColor; - property EvenFont; - property Font; - property OddColor; - property OddFont; - property Options; - property Multiline; - property PaintItemsGraphics; - property RowAutoHeight; - property ScaleFonts; - property SupportedCustomDraw; - property Transparent; - property TransparentGraphics; - property UseCustomPageBreaks; - property UseHorzDelimiters; - property UseVertDelimiters; - property Width; - - property OnCustomDrawItem; - property OnGetCustomPageBreaks; - property OnInitializeItem; - end; - - TdxLBxReportLinkDesignWindow = class(TStandarddxReportLinkDesignWindow) - pnlPreview: TPanel; - PageControl1: TPageControl; - tshOptions: TTabSheet; - pnlOptions: TPanel; - tshColor: TTabSheet; - pnlColor: TPanel; - tshFont: TTabSheet; - pnlFont: TPanel; - btnFont: TButton; - edFont: TEdit; - lblGridLinesColor: TLabel; - gbxTransparent: TGroupBox; - lblColor: TLabel; - chbxTransparent: TCheckBox; - ilPreview: TImageList; - bvlColorHolder: TBevel; - bvlLineColorHolder: TBevel; - tshBehaviors: TTabSheet; - Panel1: TPanel; - Image3: TImage; - lblSelection: TLabel; - Bevel3: TBevel; - chbxOnlySelected: TCheckBox; - lblEvenColor: TLabel; - bvlEvenColorHolder: TBevel; - btnEvenFont: TButton; - edEvenFont: TEdit; - chbxPaintItemGraphics: TCheckBox; - lblShow: TLabel; - Bevel11: TBevel; - chbxShowBorders: TCheckBox; - chbxShowHorzLines: TCheckBox; - Bevel4: TBevel; - chbxTransparentGraphics: TCheckBox; - imgGrid: TImage; - lblDrawMode: TLabel; - cbxDrawMode: TComboBox; - lblPreview: TStaticText; - chbxRowAutoHeight: TCheckBox; - lblMiscellaneous: TLabel; - imgMiscellaneous: TImage; - Bevel1: TBevel; - chbxAutoWidth: TCheckBox; - stTransparent: TStaticText; - procedure chbxOnlySelectedClick(Sender: TObject); - procedure ccbxColorChange(Sender: TObject); - procedure btnFontClick(Sender: TObject); - procedure pbxPreviewPaint(Sender: TObject); - procedure chbxPaintItemGraphicsClick(Sender: TObject); - procedure chbxTransparentClick(Sender: TObject); - procedure lblComboClick(Sender: TObject); - procedure chbxShowBordersClick(Sender: TObject); - procedure cbxDrawModeClick(Sender: TObject); - procedure chbxRowAutoHeightClick(Sender: TObject); - procedure chbxTransparentGraphicsClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure cbxDrawModeDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure chbxAutoWidthClick(Sender: TObject); - procedure stTransparentClick(Sender: TObject); - private - FccbxColor: TCustomComboBox; - FccbxEvenColor: TCustomComboBox; - FccbxGridLineColor: TCustomComboBox; - FItemCount: Integer; - FPaintWidth: Integer; - FPaintHeight: Integer; - FPreviewBox: TCustomPanel; - FPreviewFont: TFont; - FRectHeight: Integer; - FRectWidth: Integer; - procedure CreateControls; - function GetReportLink: TCustomdxListBoxReportLinkControl; - procedure CMDialogChar(var message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - property ReportLink: TCustomdxListBoxReportLinkControl read GetReportLink; - end; - -const - dxDefaultListBoxPaintOptions: TdxListBoxPaintOptions = - [Low(TdxListBoxPaintOption)..High(TdxListBoxPaintOption)]; - - dxListBoxStrings: array[0..5] of string = - ('Sample Text Row #1', 'Sample Text Row #2', 'Sample Text Row #3', - 'Sample Text Row #4', 'Sample Text Row #5', 'Sample Text Row #6'); - -implementation - -{$R *.DFM} - -uses - CommCtrl, cxClasses, dxExtCtrls, dxPSRes, dxPrnDev, dxPSUtl; - -{$IFNDEF DELPHI6} -type - TCustomListBoxAccess = class(TCustomListBox); -{$ENDIF} - -{ CustomListBox Helpers } - -function ListBoxGetMultiSelect(ACustomListBox: TCustomListBox): Boolean; -begin - {$IFDEF DELPHI6} - Result := ACustomListBox.MultiSelect; - {$ELSE} - Result := TCustomListBoxAccess(ACustomListBox).MultiSelect; - {$ENDIF} -end; - - { TCustomdxListBoxReportLinkControl } - -procedure TCustomdxListBoxReportLinkControl.Assign(Source: TPersistent); -begin - inherited; - if Source is TCustomdxListBoxReportLinkControl then - begin - Options := TCustomdxListBoxReportLinkControl(Source).Options; - PaintItemsGraphics := TCustomdxListBoxReportLinkControl(Source).PaintItemsGraphics; - end; -end; - -procedure TCustomdxListBoxReportLinkControl.AssignData(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData); -var - Obj: TObject; -begin - inherited; - if ADataItem is TdxReportCellImage then - with TdxReportCellImage(ADataItem) do - begin - ImageTransparent := TransparentGraphics; - MakeSpaceForEmptyImage := True; - Obj := CustomListBox.Items.Objects[ARow]; - if Obj is TGraphic then - Image := TGraphic(Obj); - end; -end; - -function TCustomdxListBoxReportLinkControl.GetDataItemClass(ACol: Integer; - ARow: Integer = 0): TdxReportCellDataClass; -begin - if PaintItemsGraphics then - Result := TdxReportCellImage - else - Result := inherited GetDataItemClass(ACol, ARow); -end; - -procedure TCustomdxListBoxReportLinkControl.InternalRestoreDefaults; -begin - inherited; - Options := dxDefaultListBoxPaintOptions; {[Low(TdxListBoxPaintOptions)..High(TdxListBoxPaintOptions)]} - PaintItemsGraphics := False; - TransparentGraphics := False; -end; - -function TCustomdxListBoxReportLinkControl.IsDrawBorder: Boolean; -begin - Result := lbxpoBorder in Options; -end; - -function TCustomdxListBoxReportLinkControl.IsDrawHorzLines: Boolean; -begin - Result := lbxpoHorzLines in Options; -end; - -procedure TCustomdxListBoxReportLinkControl.SetDrawMode(Value: TdxGridDrawMode); -begin - if Value > gdmOddEven then Value := gdmOddEven; - inherited SetDrawMode(Value); -end; - -function TCustomdxListBoxReportLinkControl.GetCellHasImage(ACol, ARow: Integer): Boolean; -begin - if PaintItemsGraphics then - try - Result := CustomListBox.Items.Objects[ARow] is TGraphic; - except - Result := False; - end - else - Result := False; -end; - -function TCustomdxListBoxReportLinkControl.GetCellImage(ACol, ARow: Integer): TGraphic; -begin - Result := TGraphic(CustomListBox.Items.Objects[ARow]); -end; - -function TCustomdxListBoxReportLinkControl.GetCellImageTransparent(ACol, ARow: Integer): Boolean; -begin - Result := TransparentGraphics;; -end; - -function TCustomdxListBoxReportLinkControl.GetOptions: TdxListBoxPaintOptions; -begin - Result := FOptions; -end; - -procedure TCustomdxListBoxReportLinkControl.SetOptions(Value: TdxListBoxPaintOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxListBoxReportLinkControl.SetPaintItemsGraphics(Value: Boolean); -begin - if FPaintItemsGraphics <> Value then - begin - FPaintItemsGraphics := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxListBoxReportLinkControl.SetTransparentGraphics(Value: Boolean); -begin - if FTransparentGraphics <> Value then - begin - FTransparentGraphics := Value; - LinkModified(True); - end; -end; - -{ TdxListBoxReportLink } - -function TdxListBoxReportLink.GetListBox: TListBox; -begin - Result := inherited Component as TListBox; -end; - -{ TdxLBxReportLinkDesignWindow } - -constructor TdxLBxReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhcListBoxReportLinkDesigner; - inherited; - CreateControls; - FItemCount := 5; - FRectWidth := FPreviewBox.Width - 15; - FRectHeight := (FPreviewBox.Height - 15) div FItemCount; - FPaintWidth := FRectWidth + 1; - FPaintHeight := FItemCount * (FRectHeight + 1); - PageControl1.ActivePage := PageControl1.Pages[0]; - FPreviewFont := TFont.Create; -end; - -destructor TdxLBxReportLinkDesignWindow.Destroy; -begin - FreeAndNil(FPreviewFont); - inherited; -end; - -procedure TdxLBxReportLinkDesignWindow.CreateControls; -var - R: TRect; -begin - FccbxColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(FccbxColor) do - begin - BoundsRect := bvlColorHolder.BoundsRect; - Tag := MakeTTag(0); - Parent := gbxTransparent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := dxDefaultColor; -// DropDownCount := Items.Count; - OnChange := ccbxColorChange; - end; - lblColor.FocusControl := FccbxColor; - - FccbxEvenColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(FccbxEvenColor) do - begin - BoundsRect := bvlEvenColorHolder.BoundsRect; - Tag := MakeTTag(1); - Parent := gbxTransparent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := dxDefaultColor; -// DropDownCount := Items.Count; - OnChange := ccbxColorChange; - end; - lblEvenColor.FocusControl := FccbxEvenColor; - - FccbxGridLineColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(FccbxGridLineColor) do - begin - BoundsRect := bvlLineColorHolder.BoundsRect; - Tag := MakeTTag(2); - Parent := pnlColor; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := dxDefaultGridLineColor; -// DropDownCount := Items.Count; - OnChange := ccbxColorChange; - end; - - lblGridLinesColor.FocusControl := FccbxGridLineColor; - FPreviewBox := TdxPSPaintPanel.Create(Self); - with TdxPSPaintPanel(FPreviewBox) do - begin - Parent := pnlPreview; - R := pnlPreview.BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - InflateRect(R, -1, -1); - BoundsRect := R; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := pbxPreviewPaint; - end; -end; - -{$IFDEF DELPHI7} -function TdxLBxReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxLBxReportLinkDesignWindow.LoadStrings; -begin - inherited; - tshOptions.Caption := cxGetResourceString(@sdxOptions); - tshFont.Caption := cxGetResourceString(@sdxFonts); - tshColor.Caption := cxGetResourceString(@sdxColors); - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviors); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblShow.Caption := cxGetResourceString(@sdxShow); - chbxShowBorders.Caption := cxGetResourceString(@sdxBorderLines); - chbxShowHorzLines.Caption := cxGetResourceString(@sdxHorzLines); - chbxPaintItemGraphics.Caption := cxGetResourceString(@sdxPaintItemsGraphics); - chbxTransparentGraphics.Caption := cxGetResourceString(@sdxTransparentGraphics); - - lblDrawMode.Caption := cxGetResourceString(@sdxDrawMode); - with cbxDrawMode.Items do - begin - BeginUpdate; - try - Clear; - AddObject(cxGetResourceString(@sdxDrawModeStrict), TObject(gdmStrict)); - AddObject(cxGetResourceString(@sdxDrawModeOddEven), TObject(gdmOddEven)); - finally - EndUpdate; - end; - end; - - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - lblEvenColor.Caption := cxGetResourceString(@sdxEvenColor); - lblGridLinesColor.Caption := cxGetResourceString(@sdxGridLinesColor); - - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - btnEvenFont.Caption := cxGetResourceString(@sdxBtnEvenFont); - - lblSelection.Caption := cxGetResourceString(@sdxSelection); - chbxOnlySelected.Caption := cxGetResourceString(@sdxOnlySelected); - lblMiscellaneous.Caption := cxGetResourceString(@sdxMiscellaneous); - chbxAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - chbxRowAutoHeight.Caption := cxGetResourceString(@sdxRowAutoHeight); -end; - -function TdxLBxReportLinkDesignWindow.GetReportLink: TCustomdxListBoxReportLinkControl; -begin - Result := inherited ReportLink as TCustomdxListBoxReportLinkControl; -end; - -procedure TdxLBxReportLinkDesignWindow.CMDialogChar(var message: TCMDialogChar); -var - I: Integer; -begin - inherited; - with PageControl1 do - for I := 0 to PageControl1.PageCount - 1 do - if IsAccel(message.CharCode, Pages[I].Caption) then - begin - message.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TdxLBxReportLinkDesignWindow.UpdateControlsState; - - function IsPaintItemsGraphics: Boolean; - var - I: Integer; - Obj: TObject; - begin - Result := True; - with ReportLink.CustomListBox do - for I := 0 to Items.Count - 1 do - begin - Obj := Items.Objects[I]; - try - if Obj is TGraphic then Exit; - except - end; - end; - Result := False; - end; - -begin - inherited; - - FccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := FccbxColor.Enabled; - FccbxEvenColor.Enabled := not chbxTransparent.Checked and - (ReportLink.DrawMode in [gdmOddEven, gdmChess]); - lblEvenColor.Enabled := FccbxEvenColor.Enabled; - - chbxOnlySelected.Enabled := - (ReportLink.CustomListBox = nil) or ListBoxGetMultiSelect(ReportLink.CustomListBox); - chbxPaintItemGraphics.Enabled := - (ReportLink.CustomListBox = nil) or IsPaintItemsGraphics; - chbxTransparentGraphics.Enabled := chbxPaintItemGraphics.Checked; - if ReportLink.DrawMode in [gdmOddEven, gdmChess] then - begin - lblColor.Caption := cxGetResourceString(@sdxOddColor); - btnFont.Caption := cxGetResourceString(@sdxBtnOddFont); - end - else - begin - lblColor.Caption := cxGetResourceString(@sdxColor); - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - end; - btnEvenFont.Enabled := ReportLink.DrawMode in [gdmOddEven, gdmChess]; -// (ReportLink.ListBox.Style in [lbOwnerDrawVariable, lbOwnerDrawFixed]); -end; - -procedure TdxLBxReportLinkDesignWindow.DoInitialize; -begin - inherited; - with cbxDrawMode do - ItemIndex := Items.IndexOfObject(TObject(ReportLink.DrawMode)); - - chbxShowBorders.Checked := lbxpoBorder in ReportLink.Options; - chbxShowHorzLines.Checked := lbxpoHorzLines in ReportLink.Options; - chbxPaintItemGraphics.Checked := ReportLink.PaintItemsGraphics; - chbxTransparentGraphics.Checked := ReportLink.TransparentGraphics; - - chbxTransparent.Checked := ReportLink.Transparent; - TdxPSColorCombo(FccbxColor).ColorValue := ReportLink.Color; - TdxPSColorCombo(FccbxEvenColor).ColorValue := ReportLink.EvenColor; - TdxPSColorCombo(FccbxGridLineColor).ColorValue := ReportLink.GridLineColor; - - FontInfoToText(ReportLink.Font, edFont); - FontInfoToText(ReportLink.EvenFont, edEvenFont); - - chbxOnlySelected.Checked := ReportLink.OnlySelected; - chbxAutoWidth.Checked := ReportLink.AutoWidth; - chbxRowAutoHeight.Checked := ReportLink.RowAutoHeight; -end; - -procedure TdxLBxReportLinkDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -const - C = 6; -var - DC: hDC; - Brush: HBRUSH; - I, dY, Offset: Integer; - R2: TRect; - PrevBkMode: Integer; - PrevFont: HFONT; - PrevFontColor: COLORREF; - S: string; -begin - inherited; - DC := ACanvas.Handle; - //FillRect(DC, R, HBRUSH(COLOR_WINDOW + 1)); - InflateRect(R, -4, -4); - R2 := R; - dY := (R.Bottom - R.Top) div C; - with ReportLink do - begin - Brush := SelectObject(DC, CreateSolidBrush(ColorToRGB(GridLineColor))); - for I := 0 to C do - if (((I = 0) or (I = C)) and IsDrawBorder) or ((I > 0) and (I < C) and IsDrawHorzLines) then - begin - R := MakeRect(R2.Left + 1, R2.Top + I * dY, R2.Right - 1, R2.Top + I * dY + 1); - PatBlt(DC, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, PATCOPY); - end; - if IsDrawBorder then - begin - R := MakeRect(R2.Left, R2.Top, R2.Left + 1, R2.Top + dY * C + 1); - PatBlt(DC, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, PATCOPY); - R := MakeRect(R2.Right - 1, R2.Top, R2.Right, R2.Top + dY * C + 1); - PatBlt(DC, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, PATCOPY); - end; - DeleteObject(SelectObject(DC, Brush)); - PrevBkMode := SetBkMode(DC, Windows.TRANSPARENT); - PrevFont := GetCurrentObject(DC, OBJ_FONT); - PrevFontColor := GetTextColor(DC); - for I := 0 to C - 1 do - begin - R := MakeRect(R2.Left + 1, R2.Top + I * dY + 1, R2.Right - 1, R2.Top + (I + 1) * dY + - Ord(not IsDrawHorzLines and (I < C - 1))); - if not Transparent then - begin - Brush := CreateSolidBrush(ColorToRGB(ReportLink.GetCellColor(0, I))); - FillRect(DC, R, Brush); - DeleteObject(Brush); - end; - Offset := 1; - if PaintItemsGraphics then - begin - Inc(R.Left); - ImageList_DrawEx(ilPreview.Handle, 0, DC, R.Left, R.Top + (dY - ilPreview.Height) div 2, - 0, 0, CLR_NONE, CLR_NONE, ILD_NORMAL); - Inc(Offset, ilPreview.Width + 1); - end; - Inc(R.Left, Offset); - InflateRect(R, -2, -2); - FPreviewFont.Assign(ReportLink.GetCellFont(0, I)); - FPreviewFont.Size := 8; - SelectObject(DC, FPreviewFont.Handle); - SetTextColor(DC, ColorToRGB(FPreviewFont.Color)); - S := dxListBoxStrings[I]; - Windows.DrawText(DC, PChar(S), Length(S), R, - DT_NOPREFIX or DT_SINGLELINE or dxDrawTextTextAlignX[TextAlignX] or dxDrawTextTextAlignY[TextAlignY]); - end; - SetTextColor(DC, PrevFontColor); - SelectObject(DC, PrevFont); - SetBkMode(DC, PrevBkMode); - end; -end; - -procedure TdxLBxReportLinkDesignWindow.chbxOnlySelectedClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OnlySelected := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxLBxReportLinkDesignWindow.chbxPaintItemGraphicsClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PaintItemsGraphics := TCheckBox(Sender).Checked; - Modified := True; - FPreviewBox.Invalidate; -end; - -procedure TdxLBxReportLinkDesignWindow.chbxTransparentGraphicsClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.TransparentGraphics := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxLBxReportLinkDesignWindow.chbxAutoWidthClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoWidth := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxLBxReportLinkDesignWindow.chbxRowAutoHeightClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.RowAutoHeight := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxLBxReportLinkDesignWindow.cbxDrawModeClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TComboBox(Sender) do - ReportLink.DrawMode := TdxGridDrawMode(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TdxLBxReportLinkDesignWindow.cbxDrawModeDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - dxPSBaseGridLnk.dxPSDrawComboDrawModeItem(Control, Index, Rect, State); -end; - -procedure TdxLBxReportLinkDesignWindow.chbxShowBordersClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TCheckBox(Sender) do - if Checked then - ReportLink.Options := ReportLink.Options + [TdxListBoxPaintOption(TTagToInt(Tag))] - else - ReportLink.Options := ReportLink.Options - [TdxListBoxPaintOption(TTagToInt(Tag))]; - Modified := True; - UpdatePreview; -end; - -procedure TdxLBxReportLinkDesignWindow.chbxTransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Transparent := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxLBxReportLinkDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TdxLBxReportLinkDesignWindow.UpdatePreview; -begin - FPreviewBox.Invalidate; -end; - -procedure TdxLBxReportLinkDesignWindow.ccbxColorChange(Sender: TObject); -var - AColor: TColor; -begin - if LockControlsUpdate then Exit; - AColor := TdxPSColorCombo(Sender).ColorValue; - case TTagToInt(TdxPSColorCombo(Sender).Tag) of - 0: ReportLink.Color := AColor; - 1: ReportLink.EvenColor := AColor; - 2: ReportLink.GridLineColor := AColor; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxLBxReportLinkDesignWindow.btnFontClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - - with dxPSGlbl.FontDialog do - begin - case TTagToInt(TComponent(Sender).Tag) of - 0: Font := ReportLink.Font; - 1: Font := ReportLink.EvenFont; - end; - - if Execute then - begin - case TTagToInt(TComponent(Sender).Tag) of - 0: - begin - ReportLink.Font := Font; - FontInfoToText(ReportLink.Font, edFont); - end; - 1: - begin - ReportLink.EvenFont := Font; - FontInfoToText(ReportLink.EvenFont, edEvenFont); - end; - end; - Modified := True; - UpdatePreview; - end; - end; -end; - -procedure TdxLBxReportLinkDesignWindow.pbxPreviewPaint(Sender: TObject); -begin - with TdxPSPaintPanel(Sender) do - PaintPreview(Canvas, ClientRect); -end; - -procedure TdxLBxReportLinkDesignWindow.lblComboClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TCustomComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxLBxReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreview.Parent := TPageControl(Sender).ActivePage; -end; - -initialization - dxPSRegisterReportLink(TdxListBoxReportLink, TListBox, TdxLBxReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxListBoxReportLink, TListBox, TdxLBxReportLinkDesignWindow); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSLnkReg.pas deleted file mode 100644 index b01a168f..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSLnkReg.pas +++ /dev/null @@ -1,196 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes, dxPSCore, dxPSStdGrLnk, dxPSGrLnks, dxPSLbxLnk, dxPSChLbxLnk, - dxPSTVLnk, dxPSRELnk, dxPSGraphicLnk, dxPSImgLnk, dxPSTextLnk; - -type - TdxGridOptionsPropertyEditor = class(TSetProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - - TdxListBoxOptionsPropertyEditor = class(TSetProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - - TdxCheckListBoxOptionsPropertyEditor = class(TSetProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - - TdxTreeViewOptionsPropertyEditor = class(TSetProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - -{ TdxGridOptionsPropertyEditor } - -function TdxGridOptionsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -procedure TdxGridOptionsPropertyEditor.Edit; -var - I: Integer; - Component: TPersistent; -begin - inherited; - Component := GetComponent(0); - if TCustomdxGridReportLink(Component).DesignReport then - begin - Designer.Modified; - if PropCount > 1 then - for I := 1 to PropCount - 1 do - GetComponent(I).Assign(Component); - end; -end; - -{ TdxListBoxOptionsPropertyEditor } - -function TdxListBoxOptionsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -procedure TdxListBoxOptionsPropertyEditor.Edit; -var - I: Integer; - Component: TPersistent; -begin - inherited; - Component := GetComponent(0); - if TdxListBoxReportLink(Component).DesignReport then - begin - Designer.Modified; - if PropCount > 1 then - for I := 1 to PropCount - 1 do - GetComponent(I).Assign(Component); - end; -end; - -{ TdxCheckListBoxOptionsPropertyEditor } - -function TdxCheckListBoxOptionsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -procedure TdxCheckListBoxOptionsPropertyEditor.Edit; -var - I: Integer; - Component: TPersistent; -begin - inherited; - Component := GetComponent(0); - if TdxCheckListBoxReportLink(Component).DesignReport then - begin - Designer.Modified; - if PropCount > 1 then - for I := 1 to PropCount - 1 do - GetComponent(I).Assign(Component); - end; -end; - -{ TdxTreeViewOptionsPropertyEditor } - -function TdxTreeViewOptionsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -procedure TdxTreeViewOptionsPropertyEditor.Edit; -var - I: Integer; - Component: TPersistent; -begin - inherited; - Component := GetComponent(0); - if TdxTreeViewReportLink(Component).DesignReport then - begin - Designer.Modified; - if PropCount > 1 then - for I := 1 to PropCount - 1 do - GetComponent(I).Assign(Component); - end; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterNoIcon([TdxStringGridReportLink, TdxDrawGridReportLink, - TdxListBoxReportLink, TdxCheckListBoxReportLink, TdxTreeViewReportLink, - TdxRichEditReportLink, TdxImageReportLink, TdxMemoReportLink]); - - RegisterPropertyEditor(TypeInfo(TdxGridPaintOptions), - TdxDrawGridReportLink, 'Options', TdxGridOptionsPropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxListBoxPaintOptions), - TdxListBoxReportLink, 'Options', TdxListBoxOptionsPropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxCheckListBoxPaintOptions), - TdxCheckListBoxReportLink, 'Options', TdxCheckListBoxOptionsPropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxTreeViewPaintOptions), - TdxTreeViewReportLink, 'Options', TdxTreeViewOptionsPropertyEditor); - - RegisterPropertyEditor(TypeInfo(string), TAbstractdxRichEditReportLink, 'DesignerCaption', nil); - RegisterPropertyEditor(TypeInfo(THelpContext), TAbstractdxRichEditReportLink, 'DesignerHelpContext', nil); -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSMD.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSMD.pas deleted file mode 100644 index 0b66e9ef..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSMD.pas +++ /dev/null @@ -1,659 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSMD; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, SysUtils, DB, dxCore; - -type - TdxEasyMemData = class; - - TdxMemoryRecord = class(TPersistent) - private - FData: Pointer; - FDataSet: TdxEasyMemData; - FID: Integer; - function GetIndex: Integer; - procedure SetDataSet(Value: TdxEasyMemData); - procedure SetIndex(Value: Integer); - public - constructor Create(ADataSet: TdxEasyMemData); - destructor Destroy; override; - - property Data: Pointer read FData; - property DataSet: TdxEasyMemData read FDataSet; - property ID: Integer read FID write FID; - property Index: Integer read GetIndex write SetIndex; - end; - - PdxRecInfo = ^TdxRecInfo; - TdxRecInfo = record - Bookmark: Integer; - BookmarkFlag: TBookmarkFlag; - end; - - TdxEasyMemData = class(TDataSet) - private - FActive: Boolean; - FCurrentRecIndex: Integer; - FFieldOffsets: PWordArray; - FLastID: Integer; - FRecBufSize: Integer; - FRecInfoOfs: Integer; - FRecords: TList; - - function GetMemRecord(Index: Integer): TdxMemoryRecord; - - function AddRecord(AIndex: Integer): TdxMemoryRecord; - procedure ClearRecords; - function FindRecordByID(AID: Integer): TdxMemoryRecord; - function IndexOf(ARecord: TdxMemoryRecord): Integer; - procedure InsertRecord(ARecord: TdxMemoryRecord); - procedure RemoveRecord(ARecord: TdxMemoryRecord); - - procedure CheckSupportedFields; - procedure MoveBufferToRecord(ABuffer: PChar; ARecord: TdxMemoryRecord); - procedure MoveData(ACurIndex, ANewIndex: Integer); - procedure MoveRecordToBuffer(ARecord: TdxMemoryRecord; ABuffer: PChar); - - procedure CalcFieldOffsets; - procedure FreeFieldOffsets; - function GetFieldDataPtr(ABuffer: PChar; AField: TField): Pointer; - protected - function AllocRecordBuffer: PChar; override; - procedure FreeRecordBuffer(var Buffer: PChar); override; - procedure GetBookmarkData(Buffer: PChar; Data: Pointer); override; - function GetBookmarkFlag(Buffer: PChar): TBookmarkFlag; override; - function GetRecord(Buffer: PChar; GetMode: TGetMode; DoCheck: Boolean): TGetResult; override; - function GetRecordSize: Word; override; - procedure InternalAddRecord(Buffer: Pointer; Append: Boolean); override; - procedure InternalClose; override; - procedure InternalDelete; override; - procedure InternalFirst; override; - procedure InternalGotoBookmark(Bookmark: Pointer); override; - procedure InternalHandleException; override; - procedure InternalInitFieldDefs; override; - procedure InternalInitRecord(Buffer: PChar); override; - procedure InternalLast; override; - procedure InternalOpen; override; - procedure InternalPost; override; - procedure InternalSetToRecord(Buffer: PChar); override; - function IsCursorOpen: Boolean; override; - procedure SetBookmarkFlag(Buffer: PChar; Value: TBookmarkFlag); override; - procedure SetBookmarkData(Buffer: PChar; Data: Pointer); override; - procedure SetFieldData(Field: TField; Buffer: Pointer); override; - - function GetRecordCount: Integer; override; - function GetRecNo: Integer; override; - procedure SetRecNo(Value: Integer); override; - - property Records[Index: Integer]: TdxMemoryRecord read GetMemRecord; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - function BookmarkValid(Bookmark: TBookmark): Boolean; override; - function CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer; override; - function GetFieldData(Field: TField; Buffer: Pointer): Boolean; override; - function Locate(const KeyFields: string; const KeyValues: Variant; - Options: TLocateOptions): Boolean; override; - end; - -implementation - -uses - DbConsts, Forms; - -{ TdxMemoryRecord } - -constructor TdxMemoryRecord.Create(ADataSet: TdxEasyMemData); -begin - if ADataSet = nil then - raise EdxException.Create('Invalid Owner'); - inherited Create; - SetDataSet(ADataSet); -end; - -destructor TdxMemoryRecord.Destroy; -begin - SetDataSet(nil); - inherited Destroy; -end; - -function TdxMemoryRecord.GetIndex: Integer; -begin - Result := FDataSet.IndexOf(Self); -end; - -procedure TdxMemoryRecord.SetIndex(Value: Integer); -var - Ind: Integer; -begin - Ind := GetIndex; - if Ind <> Value then - FDataSet.MoveData(Ind, Value); -end; - -procedure TdxMemoryRecord.SetDataSet(Value: TdxEasyMemData); -begin - if Value <> DataSet then - begin - if DataSet <> nil then DataSet.RemoveRecord(Self); - if Value <> nil then Value.InsertRecord(Self); - end; -end; - -{ TdxEasyMemData } - -const - dxMemDSSupportedFieldTypes = - [ftString, ftSmallint, ftInteger, ftWord, ftBoolean, ftFloat, ftCurrency, ftDate, ftTime, ftDateTime]; - -constructor TdxEasyMemData.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FCurrentRecIndex := -1; - FLastID := -1; - FRecords := TList.Create; -end; - -destructor TdxEasyMemData.Destroy; -begin - ClearRecords; - FRecords.Free; - FreeFieldOffsets; - inherited Destroy; -end; - -function TdxEasyMemData.GetRecordCount: Integer; -begin - Result:= FRecords.Count; -end; - -function TdxEasyMemData.GetRecNo: Longint; -begin - UpdateCursorPos; - if (FCurrentRecIndex = -1) and (RecordCount > 0) then - Result := 1 - else - Result := FCurrentRecIndex + 1; -end; - -procedure TdxEasyMemData.SetRecNo(Value: Integer); -begin - if (Value > -1) and (Value < RecordCount) then - begin - FCurrentRecIndex := Value - 1; - Resync([]); - end; -end; - -function TdxEasyMemData.GetMemRecord(Index: Integer): TdxMemoryRecord; -begin - Result := TdxMemoryRecord(FRecords[Index]); -end; - -function TdxEasyMemData.IndexOf(ARecord: TdxMemoryRecord): Integer; -begin - Result := FRecords.IndexOf(ARecord); -end; - -function TdxEasyMemData.FindRecordByID(AID: Integer): TdxMemoryRecord; -var - I: Integer; -begin - for I := 0 to RecordCount - 1 do - begin - Result := Records[I]; - if Result.ID = AID then Exit; - end; - Result := nil; -end; - -procedure TdxEasyMemData.MoveBufferToRecord(ABuffer: PChar; ARecord: TdxMemoryRecord); -begin - Move(ABuffer^, ARecord.Data^, FRecInfoOfs); -end; - -procedure TdxEasyMemData.MoveRecordToBuffer(ARecord: TdxMemoryRecord; ABuffer: PChar); -begin - Move(ARecord.Data^, ABuffer^, FRecInfoOfs); - with PdxRecInfo(ABuffer + FRecInfoOfs)^ do - begin - Bookmark := ARecord.ID; - BookmarkFlag := bfCurrent; - end; -end; - -procedure TdxEasyMemData.MoveData(ACurIndex, ANewIndex: Integer); -begin - FRecords.Move(ACurIndex, ANewIndex); -end; - -procedure TdxEasyMemData.ClearRecords; -begin - while RecordCount > 0 do Records[RecordCount - 1].Free; -end; - -function TdxEasyMemData.AddRecord(AIndex: Integer): TdxMemoryRecord; -begin - Result := TdxMemoryRecord.Create(Self); - Result.Index := AIndex; -end; - -procedure TdxEasyMemData.InsertRecord(ARecord: TdxMemoryRecord); -begin - FRecords.Add(ARecord); - Inc(FLastID); - ARecord.FID := FLastID; - ReallocMem(ARecord.FData, FRecInfoOfs); - ARecord.FDataSet := Self; -end; - -procedure TdxEasyMemData.RemoveRecord(ARecord: TdxMemoryRecord); -begin - FRecords.Remove(ARecord); - ReallocMem(ARecord.FData, 0); - ARecord.FDataSet := nil; -end; - -procedure TdxEasyMemData.CalcFieldOffsets; -var - Offset, I: Integer; -begin - ReallocMem(FFieldOffsets, FieldCount * SizeOf(Word)); - Offset := 0; - for I := 0 to FieldCount - 1 do - begin - FFieldOffsets^[I] := Offset; - Inc(Offset, Fields[I].DataSize + 1); - end; -end; - -procedure TdxEasyMemData.FreeFieldOffsets; -begin - ReallocMem(FFieldOffsets, 0); -end; - -function TdxEasyMemData.AllocRecordBuffer: PChar; -begin - Result := StrAlloc(FRecBufSize); -end; - -procedure TdxEasyMemData.FreeRecordBuffer(var Buffer: PChar); -begin - StrDispose(Buffer); - Buffer := nil; -end; - -procedure TdxEasyMemData.InternalInitRecord(Buffer: PChar); -begin - FillChar(Buffer^, FRecBufSize, 0); -end; - -procedure TdxEasyMemData.CheckSupportedFields; -var - I: Integer; -begin - for I := 0 to FieldCount - 1 do - if not (Fields[I].DataType in dxMemDSSupportedFieldTypes) then - DatabaseErrorFmt('Unsupported field type: %s', [Fields[I].FieldName]); -end; - -procedure TdxEasyMemData.InternalOpen; -begin - CheckSupportedFields; - FLastID := FRecords.Count; - FCurrentRecIndex := -1; - - CalcFieldOffsets; - if FFieldOffsets <> nil then - FRecInfoOfs := FFieldOffsets^[FieldCount - 1] + Fields[FieldCount - 1].DataSize + 1 - else - FRecInfoOfs := 0; - FRecBufSize := FRecInfoOfs + SizeOf(TdxRecInfo); - BookmarkSize := SizeOf(Integer); - - InternalInitFieldDefs; - if DefaultFields then CreateFields; - BindFields(True); - FActive := True; -end; - -procedure TdxEasyMemData.InternalClose; -begin - FActive := False; - ClearRecords; - BindFields(False); - if DefaultFields then DestroyFields; - FLastID := 0; - FCurrentRecIndex := -1; -end; - -function TdxEasyMemData.IsCursorOpen: Boolean; -begin - Result := FActive; -end; - -procedure TdxEasyMemData.InternalInitFieldDefs; -var - I: Integer; -begin - FieldDefs.Clear; - for I := 0 to FieldCount - 1 do - with Fields[I] do - FieldDefs.Add(FieldName, DataType, Size, Required); -end; - -procedure TdxEasyMemData.InternalPost; -var - Index: Integer; -begin - if State = dsEdit then - MoveBufferToRecord(ActiveBuffer, Records[FCurrentRecIndex]) - else - if FCurrentRecIndex >= RecordCount then - begin - MoveBufferToRecord(ActiveBuffer, AddRecord(RecordCount - 1)); - FCurrentRecIndex := RecordCount - 1; - end - else - begin - Index := FCurrentRecIndex; - if Index = -1 then Index := 0; - MoveBufferToRecord(ActiveBuffer, Records[Index]); - FCurrentRecIndex := Index; - end; -end; - -procedure TdxEasyMemData.InternalSetToRecord(Buffer: PChar); -begin - InternalGotoBookmark(@PdxRecInfo(Buffer + FRecInfoOfs)^.Bookmark); -end; - -procedure TdxEasyMemData.InternalFirst; -begin - FCurrentRecIndex := -1; -end; - -procedure TdxEasyMemData.InternalLast; -begin - FCurrentRecIndex := FRecords.Count; -end; - -procedure TdxEasyMemData.InternalAddRecord(Buffer: Pointer; Append: Boolean); -var - Rec: TdxMemoryRecord; - Index: Integer; -begin - if Append then - begin - Rec := AddRecord(RecordCount - 1); - FCurrentRecIndex := RecordCount - 1; - end - else - begin - Index := FCurrentRecIndex; - if Index = -1 then Index := 0; - Rec := AddRecord(Index); - FCurrentRecIndex := Index; - end; - MoveBufferToRecord(Buffer, Rec); -end; - -procedure TdxEasyMemData.InternalDelete; -begin - Records[FCurrentRecIndex].Free; - if FCurrentRecIndex >= RecordCount then Dec(FCurrentRecIndex); - if RecordCount = 0 then FLastID := 0; -end; - -procedure TdxEasyMemData.InternalHandleException; -begin - Application.HandleException(Self); -end; - -function TdxEasyMemData.GetRecordSize: Word; -begin - Result := FRecInfoOfs; -end; - -function TdxEasyMemData.GetRecord(Buffer: PChar; GetMode: TGetMode; - DoCheck: Boolean): TGetResult; -begin - Result := grOk; - case GetMode of - gmCurrent: - if (FCurrentRecIndex < 0) or (FCurrentRecIndex >= RecordCount) then - Result := grError; - gmNext: - if FCurrentRecIndex >= RecordCount - 1 then - Result := grEOF - else - Inc(FCurrentRecIndex); - gmPrior: - if FCurrentRecIndex < 1 then - begin - Result := grBOF; - FCurrentRecIndex := -1; - end - else - Dec(FCurrentRecIndex); - end; - - if Result = grOk then - MoveRecordToBuffer(Records[FCurrentRecIndex], Buffer) - else - if (Result = grError) and DoCheck then - DatabaseError('No records'); -end; - -function TdxEasyMemData.GetFieldDataPtr(ABuffer: PChar; AField: TField): Pointer; -var - Index: Integer; -begin - Index := FieldDefs.IndexOf(AField.FieldName); - if (Index > -1) and (ABuffer <> nil) and - (FieldDefs[Index].DataType in dxMemDSSupportedFieldTypes) then - Result := PChar(ABuffer) + FFieldOffsets[Index] - else - Result := nil; -end; - -function TdxEasyMemData.GetFieldData(Field: TField; Buffer: Pointer): Boolean; -var - Data: PChar; -begin - Result := False; - if (State in [dsEdit, dsInsert]) or ((State = dsBrowse) and not IsEmpty) then - Data := GetFieldDataPtr(ActiveBuffer, Field) - else - Exit; - - if Data <> nil then - begin - Result := Boolean(Data[0]); - Inc(Data); - if (Field.DataType = ftString) then - Result := Result and (StrLen(Data) > 0); - if Result then - Move(Data^, Buffer^, Field.DataSize); - end; -end; - -procedure TdxEasyMemData.SetFieldData(Field: TField; Buffer: Pointer); -var - CurrentBuffer, Data: PChar; -begin - if not (State in dsWriteModes) then - DatabaseError(SNotEditing, Self); - - if (State in [dsEdit, dsInsert]) or ((State = dsBrowse) and not IsEmpty) then - CurrentBuffer := ActiveBuffer - else - Exit; - - Field.Validate(Buffer); - Data := GetFieldDataPtr(CurrentBuffer, Field); - if Data <> nil then - begin - Boolean(Data[0]) := LongBool(Buffer); - Inc(Data); - if LongBool(Buffer) then - Move(Buffer^, Data^, Field.DataSize) - else - FillChar(Data^, Field.DataSize, 0); - end; - - if not (State in [dsCalcFields, dsFilter, dsNewValue]) then - DataEvent(deFieldChange, Longint(Field)); -end; - -function TdxEasyMemData.BookmarkValid(Bookmark: TBookmark): Boolean; -begin - Result := FActive and (Integer(Bookmark^) > -1) and (Integer(Bookmark^) <= FLastID); -end; - -function TdxEasyMemData.CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer; -begin - Result := Integer(Bookmark1) - Integer(Bookmark2); -end; - -procedure TdxEasyMemData.GetBookmarkData(Buffer: PChar; Data: Pointer); -begin - Move(PdxRecInfo(Buffer + FRecInfoOfs)^.Bookmark, Data^, SizeOf(Integer)); -end; - -procedure TdxEasyMemData.SetBookmarkData(Buffer: PChar; Data: Pointer); -begin - Move(Data^, PdxRecInfo(Buffer + FRecInfoOfs)^.Bookmark, SizeOf(Integer)); -end; - -function TdxEasyMemData.GetBookmarkFlag(Buffer: PChar): TBookmarkFlag; -begin - Result := PdxRecInfo(Buffer + FRecInfoOfs)^.BookmarkFlag; -end; - -procedure TdxEasyMemData.SetBookmarkFlag(Buffer: PChar; Value: TBookmarkFlag); -begin - PdxRecInfo(Buffer + FRecInfoOfs)^.BookmarkFlag := Value; -end; - -procedure TdxEasyMemData.InternalGotoBookmark(Bookmark: TBookmark); -var - Rec: TdxMemoryRecord; -begin - Rec := FindRecordByID(Integer(Bookmark^)); - if Rec <> nil then - FCurrentRecIndex := Rec.Index; -end; - -function TdxEasyMemData.Locate(const KeyFields: string; const KeyValues: Variant; - Options: TLocateOptions): Boolean; -var - Fields: TList; - Bookmark: TBookmarkStr; - - function CompareRecord: Boolean; - - function CompareOneField(AField: TField; const AValue: Variant): Boolean; - var - AsString: string; - begin - if AField.DataType = ftString then - begin - AsString := AField.AsString; - if loPartialKey in Options then - System.Delete(AsString, Length(AValue) + 1, MaxInt); - if loCaseInsensitive in Options then - Result := AnsiCompareText(AsString, AValue) = 0 - else - Result := AnsiCompareStr(AsString, AValue) = 0; - end - else - Result := AField.Value = AValue; - end; - - var - I: Integer; - begin - if Fields.Count = 1 then - Result := CompareOneField(Fields.First, KeyValues) - else - begin - I := 0; - while (I < Fields.Count) and not CompareOneField(Fields[I], KeyValues[I]) do - Inc(I); - Result := I < Fields.Count; - end; - end; - -begin - Result := False; - CheckBrowseMode; - if (RecordCount = 0) or (KeyFields = '') then Exit; - - Fields := TList.Create; - try - GetFieldList(Fields, KeyFields); - { suddenly the luck } - Result := CompareRecord; - if Result then Exit; - - DisableControls; - try - Bookmark := Self.Bookmark; - try - First; - while not EOF and not CompareRecord do Next; - Result := not EOF; - finally - if not Result and BookmarkValid(PChar(Bookmark)) then - Self.Bookmark := Bookmark; - end; - finally - EnableControls; - end; - finally - Fields.Free; - end; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSPgsMnuBld.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSPgsMnuBld.pas deleted file mode 100644 index 19172243..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSPgsMnuBld.pas +++ /dev/null @@ -1,229 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire coVisntents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSPgsMnuBld; - -interface - -{$I cxVer.inc} - -uses - Classes, cxClasses, dxPgsDlg, dxPSSngltn, dxBase; - -type - TdxPSPageSetupMenuBuilderClass = class of TAbstractdxPSPageSetupMenuBuilder; - - TAbstractdxPSPageSetupMenuBuilder = class - public - constructor Create; virtual; - procedure BuildPageSetupMenu(ARootItem: TObject; AData: Pointer; - AIncludeDefineItem: Boolean; AStyles: TStringList; ACurrentStyle: TBasedxPrintStyle; - AOnStyleClick, AOnDefineStylesClick: TNotifyEvent); virtual; abstract; - class function ExtractPrintStyleFromObj(Obj: TObject): TBasedxPrintStyle; virtual; - end; - - TdxStandardPSPageSetupMenuBuilder = class(TAbstractdxPSPageSetupMenuBuilder) - public - procedure BuildPageSetupMenu(ARootItem: TObject; AData: Pointer; - AIncludeDefineItem: Boolean; AStyles: TStringList; ACurrentStyle: TBasedxPrintStyle; - AOnStyleClick, AOnDefineStylesClick: TNotifyEvent); override; - class function ExtractPrintStyleFromObj(Obj: TObject): TBasedxPrintStyle; override; - end; - - TdxPSPageSetupMenuBuilderFactory = class(TBasedxPSSingleton) - private - FBuilders: TdxClassList; - function GetActiveBuilder: TdxPSPageSetupMenuBuilderClass; - function GetBuilder(Index: Integer): TdxPSPageSetupMenuBuilderClass; - function GetCount: Integer; - protected - procedure FinalizeInstance; override; - procedure InitializeInstance; override; - public - class function Instance: TdxPSPageSetupMenuBuilderFactory; reintroduce; overload; - procedure RegisterBuilder(ABuilder: TdxPSPageSetupMenuBuilderClass); - procedure UnregisterBuilder(ABuilder: TdxPSPageSetupMenuBuilderClass); - - property ActiveBuilder: TdxPSPageSetupMenuBuilderClass read GetActiveBuilder; - property Builders[Index: Integer]: TdxPSPageSetupMenuBuilderClass read GetBuilder; - property Count: Integer read GetCount; - end; - -function dxPSPageSetupMenuBuilderFactory: TdxPSPageSetupMenuBuilderFactory; - -implementation - -uses - Menus, SysUtils, dxPSUtl, dxPSRes; - -function dxPSPageSetupMenuBuilderFactory: TdxPSPageSetupMenuBuilderFactory; -begin - Result := TdxPSPageSetupMenuBuilderFactory.Instance; -end; - -{ TdxPSAutoHFTextMenuBuilderFactory } - -class function TdxPSPageSetupMenuBuilderFactory.Instance: TdxPSPageSetupMenuBuilderFactory; -begin - Result := inherited Instance as TdxPSPageSetupMenuBuilderFactory; -end; - -procedure TdxPSPageSetupMenuBuilderFactory.RegisterBuilder(ABuilder: TdxPSPageSetupMenuBuilderClass); -begin - if ABuilder <> nil then FBuilders.Add(ABuilder); -end; - -procedure TdxPSPageSetupMenuBuilderFactory.UnregisterBuilder(ABuilder: TdxPSPageSetupMenuBuilderClass); -begin - FBuilders.Remove(ABuilder); -end; - -procedure TdxPSPageSetupMenuBuilderFactory.FinalizeInstance; -begin - FreeAndNil(FBuilders); - inherited; -end; - -procedure TdxPSPageSetupMenuBuilderFactory.InitializeInstance; -begin - inherited; - FBuilders := TdxClassList.Create; -end; - -function TdxPSPageSetupMenuBuilderFactory.GetActiveBuilder: TdxPSPageSetupMenuBuilderClass; -begin - if Count <> 0 then - Result := Builders[Count - 1] - else - Result := TdxStandardPSPageSetupMenuBuilder; -end; - -function TdxPSPageSetupMenuBuilderFactory.GetBuilder(Index: Integer): TdxPSPageSetupMenuBuilderClass; -begin - Result := TdxPSPageSetupMenuBuilderClass(FBuilders[Index]); -end; - -function TdxPSPageSetupMenuBuilderFactory.GetCount: Integer; -begin - Result := FBuilders.Count; -end; - -{ TAbstractdxPSPageSetupMenuBuilder } - -constructor TAbstractdxPSPageSetupMenuBuilder.Create; -begin - inherited Create; -end; - -class function TAbstractdxPSPageSetupMenuBuilder.ExtractPrintStyleFromObj(Obj: TObject): TBasedxPrintStyle; -begin - Result := nil; -end; - -{ TStandarddxPageSetupMenuBuilder } - -class function TdxStandardPSPageSetupMenuBuilder.ExtractPrintStyleFromObj(Obj: TObject): TBasedxPrintStyle; -begin - Result := TBasedxPrintStyle(TTagToObj(TMenuItem(Obj).Tag)); -end; - -procedure TdxStandardPSPageSetupMenuBuilder.BuildPageSetupMenu(ARootItem: TObject; - AData: Pointer; AIncludeDefineItem: Boolean; - AStyles: TStringList; ACurrentStyle: TBasedxPrintStyle; - AOnStyleClick, AOnDefineStylesClick: TNotifyEvent); - - procedure AddMenuItem(AParent: TMenuItem; AStyle: TBasedxPrintStyle); - var - MenuItem: TMenuItem; - begin - MenuItem := TMenuItem.Create(AParent); - with MenuItem do - begin - Caption := AStyle.StyleCaption; - GroupIndex := 1; - Hint := AStyle.Description; - RadioItem := True; - Tag := MakeTTag(AStyle); - OnClick := AOnStyleClick; - end; - AParent.Add(MenuItem); - end; - - procedure ClearMenuItems(AMenuItem: TMenuItem); - var - CurItem: TMenuItem; - begin - with AMenuItem do - while Count > 0 do - begin - CurItem := Items[Count - 1]; - Remove(CurItem); - CurItem.Free; - end; - end; - -var - MenuItem: TMenuItem; - I: Integer; - MI: TMenuItem; -begin - if not (ARootItem is TMenuItem) then Exit; - MenuItem := TMenuItem(ARootItem); - ClearMenuItems(MenuItem); - - for I := 0 to AStyles.Count - 1 do - AddMenuItem(MenuItem, TBasedxPrintStyle(AStyles.Objects[I])); - if AStyles.Count > 0 then - MenuItem[ACurrentStyle.Index].Checked := True; - - if AIncludeDefineItem then - begin - if MenuItem.Count > 0 then - MenuItem.Add(NewLine); - - MI := TMenuItem.Create(MenuItem); - MI.Caption := cxGetResourceString(@sdxDefinePrintStylesMenuItem); - MI.Checked := False; - MI.Tag := MakeTTag(-1); - MI.OnClick := AOnDefineStylesClick; - MenuItem.Add(MI); - end; -end; - -initialization - dxPSPageSetupMenuBuilderFactory.RegisterBuilder(TdxStandardPSPageSetupMenuBuilder); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSPopupMan.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSPopupMan.pas deleted file mode 100644 index d1e3b21b..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSPopupMan.pas +++ /dev/null @@ -1,505 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSPopupMan; - -interface - -{$I cxVer.inc} - -uses - Classes, Controls, Windows, Menus, dxBase, dxPSSngltn; - -type - TdxPSPopupMenuBuilderClass = class of TAbstractdxPSPopupMenuBuilder; - - TAbstractdxPSPopupMenuBuilder = class - protected - function BuildPopup(const AControl: TControl; - const APopupMenu: TPopupMenu): TComponent; virtual; abstract; - class function CanShowPopup(const APopupMenu: TPopupMenu): Boolean; virtual; - procedure FreePopup(var APopupMenu: TComponent); virtual; abstract; - procedure InvokePopup(const X, Y: Integer; const AControl: TControl; - const APopupMenu: TComponent); virtual; abstract; - class function RequireProcessDoPopup: Boolean; virtual; - public - constructor Create; virtual; - end; - - TdxStandardPSPopupMenuBuilder = class(TAbstractdxPSPopupMenuBuilder) - protected - function BuildPopup(const AControl: TControl; - const APopupMenu: TPopupMenu): TComponent; override; - procedure FreePopup(var APopupMenu: TComponent); override; - procedure InvokePopup(const X, Y: Integer; const AControl: TControl; - const APopupMenu: TComponent); override; - end; - - TdxPSPopupMenuController = class(TBasedxPSSingleton) - private - FBuilders: TdxClassList; - FControls: TList; - FKbdHook: HHOOK; - FMouseHook: HHOOK; - FNexus: TComponent; - function GetActiveBuilder: TdxPSPopupMenuBuilderClass; - function GetBuilder(Index: Integer): TdxPSPopupMenuBuilderClass; - function GetBuilderCount: Integer; - function GetControl(Index: Integer): TControl; - function GetControlCount: Integer; - - procedure FreeAndNilControls; - protected - procedure FinalizeInstance; override; - procedure InitializeInstance; override; - - function IndexOfControl(AControl: TControl): Integer; - procedure Notification(AComponent: TComponent; AOperation: TOperation); - function TryShowPopup(AControl: TControl; Pt: TPoint): Boolean; - - property Nexus: TComponent read FNexus; - public - class function Instance: TdxPSPopupMenuController; reintroduce; overload; - - procedure ShowPopup(const X, Y: Integer; const AControl: TControl; const APopupMenu: TPopupMenu); - procedure ShowPopupAtMousePos(const AControl: TControl; const APopupMenu: TPopupMenu); - - procedure RegisterBuilder(ABuilder: TdxPSPopupMenuBuilderClass); - procedure UnregisterBuilder(ABuilder: TdxPSPopupMenuBuilderClass); - - procedure RegisterControl(AControl: TControl); - procedure UnregisterControl(AControl: TControl); - - property ActiveBuilder: TdxPSPopupMenuBuilderClass read GetActiveBuilder; - property BuilderCount: Integer read GetBuilderCount; - property Builders[Index: Integer]: TdxPSPopupMenuBuilderClass read GetBuilder; - property ControlCount: Integer read GetControlCount; - property Controls[Index: Integer]: TControl read GetControl; - end; - -function dxPSPopupMenuController: TdxPSPopupMenuController; - -implementation - -uses - SysUtils, Messages, Forms, dxPSGlbl, dxPSUtl; - -type - TdxPSPopupMenuControllerNexus = class(TComponent) - private - FController: TdxPSPopupMenuController; - constructor CreateEx(AController: TdxPSPopupMenuController); - protected - procedure Notification(AComponent: TComponent; AOperation: TOperation); override; - public - property Controller: TdxPSPopupMenuController read FController; - end; - -function dxPSPopupMenuController: TdxPSPopupMenuController; -begin - Result := TdxPSPopupMenuController.Instance; -end; - -{$IFDEF DELPHI5} -procedure EatWMContextMenu(Wnd: HWND); -var - Msg: TMsg; -begin - PeekMessage(Msg, Wnd, WM_CONTEXTMENU, WM_CONTEXTMENU, PM_REMOVE); -end; -{$ENDIF} - -function dxPSPopupManKbdHook(Code: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; - - function IsProcessKey(AKey, AKeyData: Longint; AKeyPressed: Boolean): Boolean; - begin - Result := - ((AKey = VK_F10) and (GetAsyncKeyState(VK_SHIFT) < 0)) or - ((AKey = VK_APPS) and ((AKeyData shr 29) and 1 <> 1)); - end; - - function GetVCLControl(Wnd: HWND): TWinControl; - begin - repeat - Result := FindControl(Wnd); - if Result <> nil then Exit; - Wnd := GetParent(Wnd); - until Wnd = 0; - end; - -const - KbdMessages: array[Boolean] of Cardinal = (WM_KEYUP, WM_KEYDOWN); -var - KeyPressed: Boolean; - Wnd: HWND; - Control: TWinControl; - R: LRESULT; -begin - Result := 0; - KeyPressed := (lParam shr 31) and 1 <> 1; - if (Code >= 0) and IsProcessKey(wParam, lParam, KeyPressed) then - begin - Wnd := GetFocus; - Control := GetVCLControl(Wnd); - if Control <> nil then - begin - if dxPSPopupMenuController.IndexOfControl(Control) > -1 then - begin - {$IFDEF DELPHI5} - EatWMContextMenu(Wnd); - {$ENDIF} - dxPSPopupMenuController.TryShowPopup(Control, Control.ClientToScreen(NullPoint)); - Result := 1; - end; - end; - end; - R := CallNextHookEx(dxPSPopupMenuController.FKbdHook, Code, wParam, lParam); - if Result = 0 then Result := R; -end; - -function dxPSPopupManMouseHook(Code: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; - - function FindControl(Wnd: HWND; const Pt: TPoint): TControl; - - function IsRegisteredControl(AControl: TControl; const Pt: TPoint): Boolean; - begin - Result := PtInRect(AControl.ClientRect, AControl.ScreenToClient(Pt)) and - (dxPSPopupMenuController.IndexOfControl(AControl) > -1); - end; - - function FindInChildren(AControl: TWinControl; const Pt: TPoint): TControl; - var - I: Integer; - begin - for I := 0 to AControl.ControlCount - 1 do - begin - Result := AControl.Controls[I]; - if IsRegisteredControl(Result, Pt) then Exit; - end; - Result := nil; - end; - - function FindInParents(AControl: TWinControl; const Pt: TPoint): TWinControl; - begin - Result := AControl; - while Result <> nil do - begin - if IsRegisteredControl(Result, Pt) then Exit; - Result := Result.Parent; - end; - end; - - var - TargetControl: TWinControl; - begin - Result := nil; - TargetControl := Controls.FindControl(Wnd); - if TargetControl = nil then Exit; - Result := FindInChildren(TargetControl, Pt); - if Result = nil then - begin - Result := TargetControl; - if dxPSPopupMenuController.IndexOfControl(Result) > -1 then Exit; - Result := FindInParents(TargetControl, Pt); - end; - end; - -var - MouseHookStruct: TMouseHookStruct; - Control: TControl; - Rslt: LRESULT; -begin - Result := 0; - if (Code >= 0) and ((wParam = WM_RBUTTONUP) or (wParam = WM_RBUTTONDOWN)) then - begin - MouseHookStruct := PMouseHookStruct(lParam)^; - with MouseHookStruct do - begin - Control := FindControl(HWND, Pt); - if Control <> nil then - begin - if wParam = WM_RBUTTONUP then - begin - (*{$IFDEF DELPHI5} - EatWMContextMenu(HWND); - {$ENDIF}*) - dxPSPopupMenuController.TryShowPopup(Control, Pt); - end; - Result := 1; - end; - end; - end; - Rslt := CallNextHookEx(dxPSPopupMenuController.FMouseHook, Code, wParam, lParam); - if Result = 0 then Result := Rslt; -end; - -{ TdxPSPopupMenuControllerNexus } - -constructor TdxPSPopupMenuControllerNexus.CreateEx(AController: TdxPSPopupMenuController); -begin - inherited Create(nil); - FController := AController; -end; - -procedure TdxPSPopupMenuControllerNexus.Notification(AComponent: TComponent; AOperation: TOperation); -begin - inherited; - Controller.Notification(AComponent, AOperation); -end; - -{ TdxPSPopupMenuController } - -class function TdxPSPopupMenuController.Instance: TdxPSPopupMenuController; -begin - Result := inherited Instance as TdxPSPopupMenuController; -end; - -procedure TdxPSPopupMenuController.ShowPopup(const X, Y: Integer; - const AControl: TControl; const APopupMenu: TPopupMenu); -var - PopupMenuBuilder: TAbstractdxPSPopupMenuBuilder; - PopupMenu: TComponent; -begin - if APopupMenu = nil then Exit; - - if AControl <> nil then - dxPSUtl.Control_SendCancelMode(AControl, nil); - - if ActiveBuilder.RequireProcessDoPopup then - dxPSUtl.PopupMenu_DoPopup(APopupMenu); - - PopupMenuBuilder := ActiveBuilder.Create; - with PopupMenuBuilder do - try - PopupMenu := BuildPopup(AControl, APopupMenu); - if PopupMenu <> nil then - try - try - InvokePopup(X, Y, AControl, PopupMenu); - except - Application.HandleException(Self); - end; - finally - FreePopup(PopupMenu); - end; - finally - Free; - end; -end; - -procedure TdxPSPopupMenuController.ShowPopupAtMousePos(const AControl: TControl; - const APopupMenu: TPopupMenu); -begin - with Mouse.CursorPos do - ShowPopup(X, Y, AControl, APopupMenu); -end; - -procedure TdxPSPopupMenuController.RegisterBuilder(ABuilder: TdxPSPopupMenuBuilderClass); -begin - FBuilders.Add(ABuilder); -end; - -procedure TdxPSPopupMenuController.UnregisterBuilder(ABuilder: TdxPSPopupMenuBuilderClass); -begin - FBuilders.Remove(ABuilder); -end; - -procedure TdxPSPopupMenuController.RegisterControl(AControl: TControl); -begin - if (AControl <> nil) and (IndexOfControl(AControl) = -1) then - begin - FControls.Add(AControl); - AControl.FreeNotification(Nexus); - end; -end; - -procedure TdxPSPopupMenuController.UnregisterControl(AControl: TControl); -begin - FControls.Remove(AControl); - {$IFDEF DELPHI5} - if (AControl <> nil) and (Nexus <> nil) then - AControl.RemoveFreeNotification(Nexus); - {$ENDIF} -end; - -procedure TdxPSPopupMenuController.FinalizeInstance; -begin - if FMouseHook <> 0 then UnhookWindowsHookEx(FMouseHook); - if FKbdHook <> 0 then UnhookWindowsHookEx(FKbdHook); - FreeAndNil(FBuilders); - FreeAndNilControls; - FreeAndNil(FNexus); - inherited; -end; - -procedure TdxPSPopupMenuController.InitializeInstance; -begin - inherited; - FBuilders := TdxClassList.Create; - FControls := TList.Create; - FKbdHook := SetWindowsHookEx(WH_KEYBOARD, dxPSPopupManKbdHook, 0, GetCurrentThreadId); - FMouseHook := SetWindowsHookEx(WH_MOUSE, dxPSPopupManMouseHook, 0, GetCurrentThreadId); - FNexus := TdxPSPopupMenuControllerNexus.CreateEx(Self); -end; - -function TdxPSPopupMenuController.IndexOfControl(AControl: TControl): Integer; -begin - Result := FControls.IndexOf(AControl); -end; - -procedure TdxPSPopupMenuController.Notification(AComponent: TComponent; AOperation: TOperation); -begin - if (AOperation = opRemove) and (AComponent is TControl) then - UnregisterControl(TControl(AComponent)); -end; - -function TdxPSPopupMenuController.TryShowPopup(AControl: TControl; Pt: TPoint): Boolean; - - function GetPopupMenu(var AControl: TControl): TPopupMenu; - begin - if AControl <> nil then - begin - Result := dxPSUtl.Control_GetPopupMenu(AControl); - while (Result = nil) and (AControl.Parent <> nil) do - begin - AControl := AControl.Parent; - Result := dxPSUtl.Control_GetPopupMenu(AControl); - end; - end - else - Result := nil; - end; - - function CheckPopupMenu(AControl: TControl; const Pt: TPoint): TPopupMenu; - begin - Result := GetPopupMenu(AControl); - if (Result <> nil) and not Result.AutoPopup then - Result := nil; - - if (Result <> nil) and (Pt.X >= 0) and - not PtInRect(AControl.ClientRect, AControl.ScreenToClient(Pt)) then - Result := nil; - end; - -var - PopupMenu: TPopupMenu; -begin - PopupMenu := CheckPopupMenu(AControl, Pt); - Result := (PopupMenu <> nil) and ActiveBuilder.CanShowPopup(PopupMenu); - if not Result then Exit; - dxPSUtl.Control_DoContextPopup(AControl, Pt, Result); - if Result then Exit; - - Result := True; - if Pt.X < 0 then - Pt := AControl.ClientToScreen(NullPoint); - ShowPopup(Pt.X, Pt.Y, AControl, PopupMenu); -end; - -function TdxPSPopupMenuController.GetActiveBuilder: TdxPSPopupMenuBuilderClass; -begin - if BuilderCount <> 0 then - Result := Builders[BuilderCount - 1] - else - Result := TdxStandardPSPopupMenuBuilder; -end; - -function TdxPSPopupMenuController.GetBuilder(Index: Integer): TdxPSPopupMenuBuilderClass; -begin - Result := TdxPSPopupMenuBuilderClass(FBuilders[Index]); -end; - -function TdxPSPopupMenuController.GetBuilderCount: Integer; -begin - Result := FBuilders.Count; -end; - -function TdxPSPopupMenuController.GetControl(Index: Integer): TControl; -begin - Result := TControl(FControls[Index]); -end; - -function TdxPSPopupMenuController.GetControlCount: Integer; -begin - Result := FControls.Count; -end; - -procedure TdxPSPopupMenuController.FreeAndNilControls; -begin - while ControlCount > 0 do - UnregisterControl(Controls[ControlCount - 1]); - FreeAndNil(FControls); -end; - -{ TAbstractdxPSPopupMenuBuilder } - -constructor TAbstractdxPSPopupMenuBuilder.Create; -begin - inherited Create; -end; - -class function TAbstractdxPSPopupMenuBuilder.CanShowPopup(const APopupMenu: TPopupMenu): Boolean; -begin - Result := True; -end; - -class function TAbstractdxPSPopupMenuBuilder.RequireProcessDoPopup: Boolean; -begin - Result := False; -end; - -{ TdxStandardPSPopupMenuBuilder } - -function TdxStandardPSPopupMenuBuilder.BuildPopup(const AControl: TControl; - const APopupMenu: TPopupMenu): TComponent; -begin - Result := APopupMenu; - TPopupMenu(Result).PopupComponent := AControl; -end; - -procedure TdxStandardPSPopupMenuBuilder.FreePopup(var APopupMenu: TComponent); -begin -end; - -procedure TdxStandardPSPopupMenuBuilder.InvokePopup(const X, Y: Integer; - const AControl: TControl; const APopupMenu: TComponent); -begin - TPopupMenu(APopupMenu).Popup(X, Y); -end; - -initialization - dxPSPopupMenuController.RegisterBuilder(TdxStandardPSPopupMenuBuilder); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwAdv.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwAdv.dfm deleted file mode 100644 index 27f20c70..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwAdv.dfm +++ /dev/null @@ -1,3482 +0,0 @@ -object dxfmPreviewWdxBar: TdxfmPreviewWdxBar - Left = 352 - Top = 204 - Width = 893 - Height = 461 - Caption = 'Print Preview' - Color = clBtnFace - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000FFFFFFFFFF000000FFFFFFF000070000FFF - FFF0788707000FFFFF0788E770000FFFFF08888780000FFFFF08E88780000FFF - FF07EE8770000FFFFFF0788700000FFFFFFF000000000FFFFFFFFFF000000FFF - FFFF000000000FFFFFFF080000000FFFFFFF000000000000000000000000FFFF - 0000000C00000008000000010000000300000003000000030000000300000003 - 000000070000000F0000000F0000000F0000001F0000003F0000007F0000} - KeyPreview = True - OldCreateOrder = True - Position = poDefault - ShowHint = True - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object dxBarManager: TdxBarManager - AutoHideEmptyBars = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - Bars = < - item - Caption = 'MenuBar' - DockedDockingStyle = dsTop - DockedLeft = 0 - DockedTop = 0 - DockingStyle = dsTop - FloatLeft = 0 - FloatTop = 0 - FloatClientWidth = 0 - FloatClientHeight = 0 - IsMainMenu = True - ItemLinks = < - item - Item = bbFile - Visible = True - end - item - Item = bbExplorer - Visible = True - end - item - Item = bbEdit - Visible = True - end - item - Item = bbView - Visible = True - end - item - Item = bbInsert - Visible = True - end - item - Item = bbFormat - Visible = True - end - item - Item = bbGoToPage - Visible = True - end - item - Item = bbTools - Visible = True - end - item - Item = bbHelp - Visible = True - end> - MultiLine = True - Name = 'Build-In Menus' - OneOnRow = True - Row = 0 - UseOwnFont = False - Visible = True - WholeRow = False - end - item - Caption = 'Standard' - DockedDockingStyle = dsTop - DockedLeft = 0 - DockedTop = 23 - DockingStyle = dsTop - FloatLeft = 332 - FloatTop = 321 - FloatClientWidth = 554 - FloatClientHeight = 22 - ItemLinks = < - item - Item = bbFileDesign - Visible = True - end - item - BeginGroup = True - Item = bbFileLoad - Visible = True - end - item - Item = bbFileClose - Visible = True - end - item - Item = bbFileSave - Visible = True - end - item - BeginGroup = True - Item = bbFilePrint - Visible = True - end - item - Item = bbFilePrintDialog - Visible = True - end - item - Item = bbFilePageSetup - Visible = True - end - item - BeginGroup = True - Item = bbViewExplorer - Visible = True - end - item - Item = bbViewThumbnails - Visible = True - end - item - BeginGroup = True - Item = bbFormatTitle - Visible = True - end - item - BeginGroup = True - Item = bbZoomPercent100 - Visible = True - end - item - Item = bbZoomPageWidth - Visible = True - end - item - Item = bbZoomWholePage - Visible = True - end - item - Item = bbZoomTwoPages - Visible = True - end - item - Item = bbZoomMultiplePages - Visible = True - end - item - Item = cbxPredefinedZoom - Visible = True - end - item - BeginGroup = True - Item = bbFormatPageBackground - Visible = True - end - item - Item = bbFormatShrinkToPageWidth - Visible = True - end - item - BeginGroup = True - Item = bbGoToFirstPage - Visible = True - end - item - Item = bbGoToPrevPage - Visible = True - end - item - Item = seActivePage - UserDefine = [udWidth] - UserWidth = 63 - Visible = True - end - item - Item = bbGoToNextPage - Visible = True - end - item - Item = bbGoToLastPage - Visible = True - end - item - BeginGroup = True - Item = bbFileExit - Visible = True - end> - Name = 'Standard' - OneOnRow = True - Row = 1 - UseOwnFont = False - Visible = True - WholeRow = False - end - item - AllowClose = False - Caption = 'Header and Footer' - DockedDockingStyle = dsTop - DockedLeft = 50 - DockedTop = 0 - DockingStyle = dsNone - FloatLeft = 523 - FloatTop = 228 - FloatClientWidth = 601 - FloatClientHeight = 22 - Hidden = True - ItemLinks = < - item - Item = bsiInsertAutoText - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFPageNumber - UserDefine = [udPaintStyle] - Visible = True - end - item - Item = bbInsertHFTotalPages - UserDefine = [udPaintStyle] - Visible = True - end - item - Item = bbInsertHFPageOfPages - Visible = True - end - item - Item = bbFormatPageNumbering - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFDateTime - Visible = True - end - item - Item = bbInsertHFDate - Visible = True - end - item - Item = bbInsertHFTime - Visible = True - end - item - Item = bbFormatDateTime - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFUserName - Visible = True - end - item - Item = bbInsertHFMachineName - UserDefine = [udPaintStyle] - Visible = True - end - item - BeginGroup = True - Item = bbFormatHFClear - Visible = True - end - item - BeginGroup = True - Item = bbFormatHFBackground - Visible = True - end - item - BeginGroup = True - Item = bbFilePageSetup - Visible = True - end - item - Item = bbViewHFSwitchHeaderFooter - Visible = True - end - item - Item = bbViewSwitchToLeftPart - Visible = True - end - item - Item = bbViewSwitchToCenterPart - Visible = True - end - item - Item = bbViewSwitchToRightPart - Visible = True - end - item - BeginGroup = True - Item = bbViewHFClose - Visible = True - end> - Name = 'Header and Footer' - OneOnRow = True - Row = 0 - UseOwnFont = False - Visible = False - WholeRow = False - end - item - Caption = 'Shortcut Menus' - DockedDockingStyle = dsTop - DockedLeft = 0 - DockedTop = 0 - DockingStyle = dsNone - FloatLeft = 293 - FloatTop = 319 - FloatClientWidth = 188 - FloatClientHeight = 19 - Hidden = True - ItemLinks = < - item - Item = bsiShortcutPreview - Visible = True - end - item - Item = bsiShortCutExplorer - Visible = True - end - item - Item = bsiShortcutThumbnails - Visible = True - end> - Name = 'Shortcut Menus' - NotDocking = [dsLeft, dsTop, dsRight, dsBottom] - OneOnRow = False - Row = 0 - UseOwnFont = False - Visible = False - WholeRow = False - end - item - Caption = 'AutoText' - DockedDockingStyle = dsTop - DockedLeft = 0 - DockedTop = 0 - DockingStyle = dsNone - FloatLeft = 460 - FloatTop = 288 - FloatClientWidth = 124 - FloatClientHeight = 22 - ItemLinks = < - item - Item = bbInsertEditAutoText - Visible = True - end - item - BeginGroup = True - Item = bsiInsertAutoText - Visible = True - end> - Name = 'AutoText' - OneOnRow = False - Row = 0 - UseOwnFont = False - Visible = False - WholeRow = False - end - item - Caption = 'Explorer' - DockedDockingStyle = dsTop - DockedLeft = 0 - DockedTop = 49 - DockingStyle = dsTop - FloatLeft = 461 - FloatTop = 349 - FloatClientWidth = 23 - FloatClientHeight = 22 - ItemLinks = < - item - Item = bbExplorerCreateNewFolder - Visible = True - end - item - Item = bbExplorerDelete - Visible = True - end - item - Item = bbExplorerProperties - Visible = True - end> - Name = 'Explorer' - OneOnRow = True - Row = 2 - UseOwnFont = False - Visible = False - WholeRow = False - end> - Categories.Strings = ( - 'File' - 'Explorer' - 'Edit' - 'Insert' - 'View' - 'Format' - 'Zoom' - 'Tools' - 'Go' - 'Help' - 'Built-in Menus' - 'Shortcut Menus' - 'New Menu') - Categories.ItemsVisibles = ( - 2 - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2) - Categories.Visibles = ( - True - True - True - True - True - True - True - True - True - True - True - False - True) - Images = ilToolBar - LargeImages = ilToolBar - MenusShowRecentItemsFirst = False - PopupMenuLinks = < - item - PopupMenu = pmPreview - end - item - PopupMenu = pmThumbnails - end> - ShowShortCutInHint = True - StoreInRegistry = True - StretchGlyphs = False - Style = bmsFlat - UseSystemFont = True - OnBarVisibleChange = dxBarManagerBarVisibleChange - OnHideCustomizingForm = dxBarManagerHideCustomizingForm - OnShowCustomizingForm = dxBarManagerShowCustomizingForm - Left = 63 - Top = 197 - DockControlHeights = ( - 0 - 0 - 49 - 0) - object bbFile: TdxBarSubItem - Caption = '&File' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbFileDesign - Visible = True - end - item - Item = bbFileRebuild - Visible = True - end - item - BeginGroup = True - Item = bbFileLoad - Visible = True - end - item - Item = bbFileClose - Visible = True - end - item - BeginGroup = True - Item = bbFileSave - Visible = True - end - item - BeginGroup = True - Item = bbFilePrintDialog - Visible = True - end - item - Item = bbFilePageSetup - Visible = True - end - item - BeginGroup = True - Item = bbFileExit - Visible = True - end> - end - object bbFileDesign: TdxBarButton - Caption = '&Design...' - Category = 0 - Hint = 'ReportDesign|' - Visible = ivNever - ImageIndex = 0 - ShortCut = 16452 - OnClick = DesignClick - end - object bbFileRebuild: TdxBarButton - Caption = 'Rebuild' - Category = 0 - Hint = 'Rebuild' - Visible = ivAlways - ShortCut = 16500 - OnClick = bbFileRebuildClick - end - object bbViewMargins: TdxBarButton - Caption = '&Margins' - Category = 4 - Hint = 'Margins' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - ShortCut = 16461 - OnClick = bbViewMarginsClick - end - object bbZoomPercent100: TdxBarButton - Caption = '&Percent 100' - Category = 6 - Hint = 'Zoom 100 %' - Visible = ivAlways - ImageIndex = 5 - ShortCut = 16604 - OnClick = ZoomClick - end - object bbZoomPageWidth: TdxBarButton - Tag = 1 - Caption = '&Fit To Window' - Category = 6 - Hint = 'Zoom Page Width' - Visible = ivAlways - ImageIndex = 6 - ShortCut = 16432 - OnClick = ZoomClick - end - object bbZoomWholePage: TdxBarButton - Tag = 2 - Caption = '&One Page' - Category = 6 - Hint = 'Zoom One Page' - Visible = ivAlways - ImageIndex = 7 - ShortCut = 16433 - OnClick = ZoomClick - end - object bbZoomTwoPages: TdxBarButton - Tag = 3 - Caption = '&Two Page' - Category = 6 - Hint = 'Zoom Two Page' - Visible = ivAlways - ImageIndex = 8 - ShortCut = 16434 - OnClick = ZoomClick - end - object bbExplorer: TdxBarSubItem - Caption = 'E&xplorer' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbExplorerCreateNewFolder - Visible = True - end - item - BeginGroup = True - Item = bbExplorerDelete - Visible = True - end - item - Item = bbExplorerRename - Visible = True - end - item - BeginGroup = True - Item = bbExplorerProperties - Visible = True - end> - end - object bbGoToFirstPage: TdxBarButton - Caption = '&First Page' - Category = 8 - Hint = 'Go to First Page' - Visible = ivAlways - ImageIndex = 13 - ShortCut = 36 - OnClick = GoToPageClick - end - object bbGoToPrevPage: TdxBarButton - Tag = 1 - Caption = '&Previous Page' - Category = 8 - Hint = 'Go to Prev Page' - Visible = ivAlways - ImageIndex = 14 - ShortCut = 33 - OnClick = GoToPageClick - end - object bbGoToNextPage: TdxBarButton - Tag = 2 - Caption = '&Next Page' - Category = 8 - Hint = 'Go to Next Page' - Visible = ivAlways - ImageIndex = 15 - ShortCut = 34 - OnClick = GoToPageClick - end - object bbGoToLastPage: TdxBarButton - Tag = 3 - Caption = '&Last Page' - Category = 8 - Hint = 'Go to Last Page' - Visible = ivAlways - ImageIndex = 16 - ShortCut = 35 - OnClick = GoToPageClick - end - object bbEdit: TdxBarSubItem - Caption = '&Edit' - Category = 10 - Visible = ivNever - ItemLinks = < - item - Item = bbEditFind - Visible = True - end - item - Item = bbEditFindNext - Visible = True - end - item - BeginGroup = True - Item = bbEditReplace - Visible = True - end> - end - object bbZoomFourPages: TdxBarButton - Tag = 4 - Caption = 'Four Page' - Category = 6 - Hint = 'Zoom Four Page' - Visible = ivAlways - ImageIndex = 9 - ShortCut = 16436 - OnClick = ZoomClick - end - object bbZoomMultiplePages: TdxBarButton - Caption = '&Multiple Pages' - Category = 6 - Hint = 'Multiple Pages' - Visible = ivAlways - ImageIndex = 10 - OnClick = bbZoomMultiplePagesClick - end - object bbZoomWidenToSourceWidth: TdxBarButton - Tag = 5 - Caption = 'Widen To Source Width' - Category = 6 - Hint = 'Widen to source width' - Visible = ivAlways - ImageIndex = 11 - OnClick = ZoomClick - end - object seActivePage: TdxBarSpinEdit - Caption = '&Active Page :' - Category = 8 - Hint = 'Active Page :' - Visible = ivAlways - OnChange = seActivePageChange - Width = 100 - OnButtonClick = seActivePageButtonClick - end - object cbxPredefinedZoom: TdxBarImageCombo - Caption = '&Zoom :' - Category = 6 - Hint = 'Zoom :' - Visible = ivAlways - Text = '100%' - OnChange = cbxPredefinedZoomChange - Glyph.Data = { - F6000000424DF600000000000000760000002800000010000000100000000100 - 0400000000008000000000000000000000001000000010000000000000000000 - 8000008000000080800080000000800080008080000080808000C0C0C0000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00888888888888 - 8888008888888888888800088888888888888000888888888888880008700007 - 88888880000888800888888807EE88887088888708E88888807888808E888888 - 88088880888888888808888088888888E808888088888888E80888870888888E - E078888807888EEE708888888008888008888888887000078888} - Width = 100 - OnClick = cbxPredefinedZoomClick - ShowEditor = True - Images = ilToolBar - Items.Strings = ( - '500%' - '200%' - '150%' - '100%' - '75%' - '50%' - '25%' - '10%' - 'Page Width' - 'Whole Page' - 'Two Pages' - 'Four Pages' - 'Widen To Source Width') - ItemIndex = 3 - ImageIndexes = ( - -1 - -1 - -1 - 5 - -1 - -1 - -1 - -1 - 6 - 7 - 8 - 9 - 11) - end - object bbFileLoad: TdxBarButton - Caption = '&Load...' - Category = 0 - Hint = 'Load' - Visible = ivAlways - ImageIndex = 43 - ShortCut = 16463 - OnClick = ExplorerLoadDataClick - end - object bbZoomSetup: TdxBarButton - Caption = '&Setup ...' - Category = 6 - Hint = 'Setup ' - Visible = ivAlways - PaintStyle = psCaption - OnClick = bbZoomSetupClick - end - object bbToolsOptions: TdxBarButton - Caption = '&Options...' - Category = 7 - Hint = 'Options' - Visible = ivAlways - OnClick = bbToolsOptionsClick - end - object bbViewMarginBar: TdxBarButton - Caption = 'MarginBar' - Category = 4 - Hint = 'Margin Bar' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - OnClick = bbViewMarginBarClick - end - object bbFileSave: TdxBarButton - Caption = '&Save...' - Category = 0 - Hint = 'Save' - Visible = ivAlways - ImageIndex = 38 - ShortCut = 16467 - OnClick = FileSaveClick - end - object bbViewStatusBar: TdxBarButton - Caption = 'StatusBar' - Category = 4 - Hint = 'StatusBar' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - OnClick = bbViewStatusBarClick - end - object bbHelpTopics: TdxBarButton - Caption = '&Help Topics...' - Category = 9 - Hint = 'Help' - Visible = ivAlways - ImageIndex = 17 - OnClick = HelpClick - end - object bbViewExplorer: TdxBarButton - Caption = 'E&xplorer' - Category = 4 - Hint = 'Explorer' - Visible = ivAlways - ButtonStyle = bsChecked - ImageIndex = 48 - ShortCut = 16472 - OnClick = bbViewExplorerClick - end - object bsiShortcutPreview: TdxBarSubItem - Caption = 'Preview' - Category = 11 - Visible = ivInCustomizing - ItemLinks = <> - end - object bsiInsertHFAutoText: TdxBarSubItem - Caption = 'AutoText' - Category = 3 - Visible = ivAlways - Detachable = True - DetachingBar = 4 - ItemLinks = < - item - Item = bbInsertEditAutoText - Visible = True - end - item - BeginGroup = True - Item = bliInsertAutoTextEntries - Visible = True - end> - end - object bbInsertEditAutoText: TdxBarButton - Caption = 'AutoTe&xt...' - Category = 3 - Hint = 'AutoText' - Visible = ivAlways - ImageIndex = 33 - end - object bsiInsertAutoText: TdxBarSubItem - Caption = 'Insert AutoText' - Category = 3 - Visible = ivAlways - ItemLinks = < - item - Item = bliInsertAutoTextEntries - Visible = True - end> - end - object bliInsertAutoTextEntries: TdxBarListItem - Caption = 'List of AutoText Entries' - Category = 3 - Visible = ivAlways - ShowNumbers = False - end - object bbInsertHFPageNumber: TdxBarButton - Caption = '&Page Number' - Category = 3 - Hint = 'Insert Page Number' - Visible = ivAlways - ImageIndex = 19 - ShortCut = 41040 - OnClick = InsertHFClick - end - object bbInsertHFTotalPages: TdxBarButton - Tag = 1 - Caption = '&Number of Pages' - Category = 3 - Hint = 'Insert Number of Pages' - Visible = ivAlways - ImageIndex = 21 - OnClick = InsertHFClick - end - object bbInsertHFPageOfPages: TdxBarButton - Tag = 2 - Caption = 'Page Number Of Pages' - Category = 3 - Hint = 'Insert Page Number Of Pages' - Visible = ivAlways - ImageIndex = 20 - OnClick = InsertHFClick - end - object bbInsertHFDateTime: TdxBarButton - Tag = 3 - Caption = 'Date and Time' - Category = 3 - Hint = 'Insert Date and Time' - Visible = ivAlways - ImageIndex = 23 - OnClick = InsertHFClick - end - object bbInsertHFDate: TdxBarButton - Tag = 4 - Caption = '&Date' - Category = 3 - Hint = 'Insert Date' - Visible = ivAlways - ImageIndex = 24 - ShortCut = 41028 - OnClick = InsertHFClick - end - object bbInsertHFTime: TdxBarButton - Tag = 5 - Caption = '&Time' - Category = 3 - Hint = 'Insert Time' - Visible = ivAlways - ImageIndex = 25 - ShortCut = 41044 - OnClick = InsertHFClick - end - object bbInsertHFUserName: TdxBarButton - Tag = 6 - Caption = '&User Name' - Category = 3 - Hint = 'Insert User Name' - Visible = ivAlways - ImageIndex = 27 - OnClick = InsertHFClick - end - object bbInsert: TdxBarSubItem - Caption = '&Insert' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bsiInsertHFAutoText - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFPageNumber - Visible = True - end - item - Item = bbInsertHFTotalPages - Visible = True - end - item - Item = bbInsertHFPageOfPages - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFDateTime - Visible = True - end - item - Item = bbInsertHFDate - Visible = True - end - item - Item = bbInsertHFTime - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFUserName - Visible = True - end - item - Item = bbInsertHFMachineName - Visible = True - end> - end - object bbView: TdxBarSubItem - Caption = '&View' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbViewMargins - Visible = True - end - item - BeginGroup = True - Item = bbViewMarginBar - Visible = True - end - item - Item = bbViewStatusBar - Visible = True - end - item - Item = bbViewExplorer - Visible = True - end - item - Item = bbViewThumbnails - Visible = True - end - item - BeginGroup = True - Item = bbViewToolbars - Visible = True - end - item - BeginGroup = True - Item = bbFormatHeaderAndFooter - Visible = True - end - item - BeginGroup = True - Item = bbViewZoom - Visible = True - end - item - BeginGroup = True - Item = bbViewPageHeaders - Visible = True - end - item - Item = bbViewPageFooters - Visible = True - end> - end - object bbViewZoom: TdxBarSubItem - Caption = 'Zoom' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbZoomPercent100 - Visible = True - end - item - BeginGroup = True - Item = bbZoomPageWidth - Visible = True - end - item - Item = bbZoomWholePage - Visible = True - end - item - Item = bbZoomTwoPages - Visible = True - end - item - Item = bbZoomFourPages - Visible = True - end - item - Item = bbZoomMultiplePages - Visible = True - end - item - BeginGroup = True - Item = bbZoomWidenToSourceWidth - Visible = True - end - item - BeginGroup = True - Item = bbZoomSetup - Visible = True - end> - end - object bbFormatHeaderAndFooter: TdxBarButton - Caption = '&Header and Footer' - Category = 5 - Hint = 'Header and Footer' - Visible = ivAlways - AllowAllUp = True - ButtonStyle = bsChecked - ImageIndex = 36 - OnClick = bbFormatHeaderAndFooterClick - end - object bbFormatDateTime: TdxBarButton - Caption = 'Date and &Time...' - Category = 5 - Hint = 'Date and Time' - Visible = ivAlways - ImageIndex = 26 - OnClick = bbFormatDateTimeClick - end - object bbFormatPageNumbering: TdxBarButton - Caption = 'Page &Numbering...' - Category = 5 - Hint = 'Page Numbering' - Visible = ivAlways - ImageIndex = 22 - OnClick = bbFormatPageNumbersClick - end - object bbEditFind: TdxBarButton - Caption = 'Find...' - Category = 2 - Hint = 'Find' - Visible = ivNever - ShortCut = 16454 - end - object bbFormatPageBackground: TdxBarButton - Caption = 'Page Bac&kground...' - Category = 5 - Hint = 'Background' - Visible = ivAlways - ImageIndex = 4 - ShortCut = 16459 - OnClick = PageBackgroundClick - end - object bbFormatShrinkToPageWidth: TdxBarButton - Caption = '&Shrink To Page' - Category = 5 - Hint = 'Shrink To Page' - Visible = ivAlways - AllowAllUp = True - ButtonStyle = bsChecked - ImageIndex = 12 - OnClick = bbFormatShrinkToPageWidthClick - end - object bbEditFindNext: TdxBarButton - Caption = 'Find &Next' - Category = 2 - Hint = 'Find Next' - Visible = ivNever - ShortCut = 114 - end - object bbEditReplace: TdxBarButton - Caption = '&Replace...' - Category = 2 - Hint = 'Replace' - Visible = ivNever - ShortCut = 16466 - end - object bbFormatShowHideEmptyPages: TdxBarButton - Caption = 'Show/Hide EmptyPages' - Category = 5 - Hint = 'Show/Hide Empty Pages' - Visible = ivAlways - ButtonStyle = bsChecked - OnClick = bbFormatShowHideEmptyPagesClick - end - object bbViewThumbnails: TdxBarButton - Caption = 'Th&umbnails' - Category = 4 - Hint = 'Thumbnails' - Visible = ivAlways - ButtonStyle = bsChecked - ImageIndex = 49 - ShortCut = 16469 - OnClick = bbViewThumbnailsClick - end - object bbFormatHFBackground: TdxBarButton - Caption = 'Header and Footer Background ...' - Category = 5 - Hint = 'Header and Footer Background ' - Visible = ivAlways - ImageIndex = 34 - OnClick = bbFormatHFBackgroundClick - end - object bbThumbnailsSmall: TdxBarButton - Caption = '&Small Thumbnails' - Category = 4 - Hint = 'Small Thumbnails' - Visible = ivAlways - ButtonStyle = bsChecked - OnClick = bbThumbnailsSizeClick - end - object bbToolsCustomize: TdxBarButton - Caption = '&Customize...' - Category = 7 - Hint = 'Customize' - Visible = ivAlways - OnClick = bbToolsCustomizeClick - end - object bbThumbnailsLarge: TdxBarButton - Tag = 1 - Caption = '&Large Thumbnails' - Category = 4 - Hint = 'Large Thumbnails' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - OnClick = bbThumbnailsSizeClick - end - object bbViewPages: TdxBarSubItem - Caption = 'Pages' - Category = 10 - Visible = ivNever - ItemLinks = <> - end - object bbViewToolbars: TdxBarToolbarsListItem - Caption = '&Toolbars' - Category = 4 - Visible = ivAlways - end - object bbHelpAbout: TdxBarButton - Caption = '&About...' - Category = 9 - Hint = 'About' - Visible = ivNever - end - object bbViewPageHeaders: TdxBarButton - Caption = 'Page &Headers' - Category = 4 - Hint = 'Page Headers' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - OnClick = bbViewPageHeadersClick - end - object bbViewPageFooters: TdxBarButton - Caption = 'Page &Footers' - Category = 4 - Hint = 'Page Footers' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - OnClick = bbViewPageFootersClick - end - object bbViewSwitchToLeftPart: TdxBarButton - Caption = 'Switch To Left Part' - Category = 4 - Hint = 'Switch To Left Part' - Visible = ivAlways - ButtonStyle = bsChecked - GroupIndex = 1 - Down = True - ImageIndex = 30 - OnClick = SwitchPartClick - end - object bbFormat: TdxBarSubItem - Caption = '&Format' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbFormatTitle - Visible = True - end - item - BeginGroup = True - Item = bbFormatPageNumbering - Visible = True - end - item - Item = bbFormatDateTime - Visible = True - end - item - BeginGroup = True - Item = bbFormatShrinkToPageWidth - Visible = True - end - item - Item = bbFormatShowHideEmptyPages - Visible = True - end - item - BeginGroup = True - Item = bbFormatPageBackground - Visible = True - end> - end - object bbGoToPage: TdxBarSubItem - Caption = '&Go' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbGoToFirstPage - Visible = True - end - item - Item = bbGoToPrevPage - Visible = True - end - item - BeginGroup = True - Item = seActivePage - Visible = True - end - item - BeginGroup = True - Item = bbGoToNextPage - Visible = True - end - item - Item = bbGoToLastPage - Visible = True - end> - end - object bbFormatHFClear: TdxBarButton - Caption = 'Clea&r Text' - Category = 5 - Hint = 'Clear Text' - Visible = ivAlways - OnClick = bbFormatHFClearClick - end - object bsiNewMenuNewMenu: TdxBarSubItem - Caption = 'New Item' - Category = 12 - Visible = ivAlways - ItemLinks = <> - end - object bbFileClose: TdxBarButton - Caption = '&Unload' - Category = 0 - Hint = 'Unload' - Visible = ivAlways - ImageIndex = 44 - ShortCut = 16499 - OnClick = bbFileCloseClick - end - object bbFilePrint: TdxBarButton - Caption = 'Print' - Category = 0 - Hint = 'Print' - Visible = ivNever - ImageIndex = 1 - OnClick = PrintClick - end - object bbInsertHFMachineName: TdxBarButton - Tag = 7 - Caption = '&Machine Name' - Category = 3 - Hint = 'Insert Machine Name' - Visible = ivAlways - ImageIndex = 28 - OnClick = InsertHFClick - end - object bbFilePrintDialog: TdxBarButton - Tag = 1 - Caption = '&Print...' - Category = 0 - Hint = 'Print Dialog' - Visible = ivNever - ImageIndex = 2 - ShortCut = 16464 - OnClick = PrintClick - end - object bbTools: TdxBarSubItem - Caption = '&Tools' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbToolsCustomize - Visible = True - end - item - Item = bbToolsOptions - Visible = True - end> - end - object bbExplorerCreateNewFolder: TdxBarButton - Caption = 'Create &Folder...' - Category = 1 - Hint = 'Create Folder' - Visible = ivAlways - ImageIndex = 40 - ShortCut = 32821 - OnClick = ExplorerCreateNewFolderClick - end - object bbHelp: TdxBarSubItem - Caption = '&Help' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbHelpTopics - Visible = True - end - item - BeginGroup = True - Item = bbHelpAbout - Visible = True - end> - end - object bbFilePageSetup: TdxBarButton - Tag = 2 - Caption = 'Page set&up...' - Category = 0 - Hint = 'Page Setup ' - Visible = ivNever - ButtonStyle = bsDropDown - DropDownMenu = pmPrintStyles - ImageIndex = 3 - OnClick = PageSetupClick - end - object bbViewSwitchToCenterPart: TdxBarButton - Tag = 1 - Caption = 'Switch To Center Part' - Category = 4 - Hint = 'Switch To Center Part' - Visible = ivAlways - ButtonStyle = bsChecked - GroupIndex = 1 - ImageIndex = 31 - OnClick = SwitchPartClick - end - object bliPrintStyles: TdxBarListItem - Caption = 'Print Styles' - Category = 0 - Visible = ivAlways - ShowCheck = True - ShowNumbers = False - end - object bsiShortCutExplorer: TdxBarSubItem - Caption = 'Explorer' - Category = 11 - Visible = ivAlways - ItemLinks = <> - end - object bbDefinePrintStyles: TdxBarButton - Caption = 'Define Print Styles...' - Category = 0 - Hint = 'Define Print Styles' - Visible = ivAlways - end - object bbExplorerDelete: TdxBarButton - Caption = '&Delete...' - Category = 1 - Hint = 'Delete' - Visible = ivAlways - ImageIndex = 39 - ShortCut = 46 - OnClick = ExplorerDeleteItemClick - end - object bbExplorerRename: TdxBarButton - Caption = '&Rename...' - Category = 1 - Hint = 'Rename' - Visible = ivAlways - ShortCut = 113 - OnClick = ExplorerRenameItemClick - end - object bbFormatTitle: TdxBarButton - Caption = 'Title...' - Category = 5 - Hint = 'Title' - Visible = ivAlways - ImageIndex = 45 - OnClick = bbFormatTitleClick - end - object bbViewSwitchToRightPart: TdxBarButton - Tag = 2 - Caption = 'Switch To Right Part' - Category = 4 - Hint = 'Switch To Right Part' - Visible = ivAlways - ButtonStyle = bsChecked - GroupIndex = 1 - ImageIndex = 32 - OnClick = SwitchPartClick - end - object bbViewHFSwitchHeaderFooter: TdxBarButton - Caption = '&Show Header/Footer' - Category = 4 - Hint = 'Show Header/Footer' - Visible = ivAlways - AllowAllUp = True - ButtonStyle = bsChecked - ImageIndex = 29 - OnClick = bbViewHFSwitchHeaderFooterClick - end - object bbViewHFClose: TdxBarButton - Caption = '&Close' - Category = 4 - Hint = 'Close Header and Footer' - Visible = ivAlways - OnClick = bbViewHFCloseClick - end - object bsiShortcutThumbnails: TdxBarSubItem - Caption = 'Thumbnails' - Category = 11 - Visible = ivAlways - ItemLinks = <> - end - object bbExplorerProperties: TdxBarButton - Caption = '&Properties...' - Category = 1 - Hint = 'P&roperties' - Visible = ivAlways - ImageIndex = 46 - ShortCut = 32781 - OnClick = bbExplorerPropertiesClick - end - object bbFileExit: TdxBarButton - Caption = '&Close' - Category = 0 - Hint = 'Close' - Visible = ivAlways - OnClick = CloseClick - end - end - object ilToolBar: TImageList - AllocBy = 48 - Left = 35 - Top = 197 - Bitmap = { - 494C010132003600040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 000000000000360000002800000040000000E0000000010020000000000000E0 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FFFF000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FFFF00008000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800000808000008080000080 - 8000008080000080800000808000008080000080800000808000FF000000FFFF - 0000800000000080800000808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00FF000000FFFF00008000 - 000000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF00C0C0C000000000000000000000000000C0C0C0008000000000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF00C0C0C00000000000FFFF0000C0C0C000FFFF000000000000C0C0C00000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000FFFF0000C0C0C000FFFF0000C0C0C000FFFF00000000000000FF - FF0000FFFF0000FFFF0000808000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000C0C0C000FFFF0000C0C0C000FFFF0000C0C0C0000000000000FF - FF0000FFFF0000FFFF0000808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000FFFF0000C0C0C000FFFF0000C0C0C000FFFF00000000000000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF00C0C0C00000000000FFFF0000C0C0C000FFFF000000000000C0C0C00000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF00C0C0C000000000000000000000000000C0C0C00000FFFF0000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000808000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000FFFF000000 - 0000FFFFFF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000FFFF - FF00000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF0000000000000000FFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000FFFF - FF00808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF0000FFFF00FFFFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF00FFFFFF00FFFFFF0000000000C0C0C00000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000808080000000000000000000FFFFFF0000000000C0C0 - C00000000000FFFFFF0000000000C0C0C00000000000C0C0C000000000000000 - 000000000000000000008000000080000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000808080000000000000000000000000000000000000000000FFFF - FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000 - FF00FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF000000 - 0000C0C0C00000000000C0C0C00000000000C0C0C00000000000C0C0C000C0C0 - C000C0C0C0000000000080000000800000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 000000000000000000000000000080000000000000000000000000000000FFFF - FF000000FF000000000000000000000000000000000000000000000000000000 - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C00000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C00080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000080000000000000000000000000000000FFFF - FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000 - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 00000000000000000000C0C0C00000000000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000800000008000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000080000000000000008000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C0000000000080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000800000008000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000800000008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00000000000000000000000000000000000000000000000000FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0080000000800000008000000080000000800000008000 - 0000FFFFFF00FFFFFF0000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFFFF00FFFF - FF0080000000FFFFFF00000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 80000080800000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF0080000000FFFFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF008080800000FFFF00FFFFFF0000FFFF008080 - 800000FFFF0000FFFF0000FFFF00808080000000000000FFFF00FFFFFF000000 - 000000000000000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF008080800000FFFF0000FFFF008080 - 800000FFFF00FFFFFF008080800000FFFF0000000000FFFFFF0000FFFF00FFFF - FF00000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF0080000000FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF008080800000FFFF008080 - 8000FFFFFF008080800000FFFF00000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF0080000000FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF0080808000808080008080800080808000FFFF - FF008080800080808000808080008080800000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00800000008000000080000000800000008000000080000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF008080800000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF0000000000000000008080800000FFFF008080 - 800000FFFF008080800000FFFF0000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800000FFFF00000000008080 - 8000FFFFFF00000000008080800000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000008080800000FFFF0000000000000000008080 - 8000808080000000000000000000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000008000 - 8000800080008000800080008000800080008000800080008000800080008000 - 8000800080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF0000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 00000000000000000000000000000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000000000000000 - 0000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000008000 - 800080008000800080008000800080008000800080008000800000000000C0C0 - C000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000FFFF0000FFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840000FFFF00848484008484 - 840000FFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400FFFFFF008484 - 8400FFFFFF00FFFFFF0000FFFF000000000000FFFF0000FFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840000FFFF0000FFFF0000FF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000084848400000000008484 - 840000000000FFFFFF0000FFFF00000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840084848400848484008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000848484008484 - 84008484840000000000FFFFFF00FFFFFF0000FFFF0084848400FFFFFF00FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C6C6C600C6C6C600C6C6 - C600848484008484840000000000FFFFFF00FFFFFF008400000084848400FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00C6C6C600C6C6C600C6C6 - C600C6C6C60084848400848484000000000000FFFF008400000084000000FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00C6C6C600C6C6 - C600C6C6C600C6C6C6008484840084848400840000008400000084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF000000 - 0000FFFFFF0000000000FFFFFF0000000000C6C6C600FFFFFF00FFFFFF00C6C6 - C60000000000C6C6C600C6C6C60084848400840000008400000084000000FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000848400008484000000 - 0000FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF0000000000FFFF - FF0000000000FFFFFF00000000000000000000000000C6C6C600FFFFFF000000 - 00008400000000000000C6C6C60084000000840000008400000084848400FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF00000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF000000000000848400008484000000000000000000FFFFFF000000 - 0000FFFFFF000000000000000000000000000000000000000000C6C6C600FFFF - FF0084000000C6C6C60084848400840000008400000084848400FFFFFF0000FF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000C6C6C600FFFFFF00C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840084848400848484008484 - 84008484840000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000008484000000000000000000000000008400000000000000C6C6 - C60084000000848484000000000084848400FFFFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00C6C6 - C600000000000000000000000000C6C6C600FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840000FFFF0000FFFF0000FF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF000084 - 8400FFFFFF0000848400FFFFFF0000848400FFFFFF0000848400FFFFFF000084 - 8400FFFFFF000084840000000000000000000000000084000000C6C6C6000000 - 0000840000000000000084848400000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00848484008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840000FFFF00848484008484 - 840000FFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000084840000000000000000000000000084000000C6C6C600C6C6 - C600840000008484840000FFFF000000000000FFFF0000FFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000084 - 8400FFFFFF0000848400FFFFFF0000848400FFFFFF0000848400FFFFFF000084 - 8400FFFFFF000000000000000000000000000000000084848400840000008400 - 00008484840084848400848484000000000000FFFF0000FFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000FFFF008484 - 84008484840000FFFF0084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008484840000FFFF00848484008484840000FFFF0084848400FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000848484008484840084848400848484008484840000000000000000000000 - 0000848484008484840084848400848484000000000000000000000000000000 - 0000FFFFFF008484840084848400848484008484840084848400848484008484 - 84008484840000FFFF000000000000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008484840000FFFF0000FFFF0000FFFF0000FFFF0084848400FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00C6C6C600C6C6C600848484000000000000000000FFFF - FF00848484008484840084848400848484000000000084848400848484000000 - 000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000848484008484 - 8400848484008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00848484008484840084848400848484008484840084848400FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF000000000000000000848484008484840000000000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF000000000000000000848484008484840000000000FFFFFF00848484008484 - 840084848400848484008484840084848400FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400840000008400 - 00008400000084000000840000008400000084000000FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00848484008484840000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400840000008400 - 00008400000084000000840000008400000084000000FFFFFF0000000000FFFF - FF000000000000000000848484008484840000000000FFFFFF00848484008484 - 840084848400848484008484840084848400FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400840000008400 - 00008400000084000000840000008400000084000000FFFFFF0000000000FFFF - FF000000000000000000848484008484840000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400840000008400 - 00008400000084000000840000008400000084000000FFFFFF0000000000FFFF - FF008484840084848400848484008484840000000000FFFFFF00848484008484 - 840084848400848484008484840084848400FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400840000008400 - 00008400000084000000840000008400000084000000FFFFFF0000000000FFFF - FF008484840084848400848484008484840000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008484 - 8400848484008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00848484008484840084848400848484008484840084848400FFFF - FF00FFFFFF000000000000000000000000000000000084848400848484008484 - 840084848400848484008484840084848400848484008484840000000000FFFF - FF00848484008484840084848400848484000000000084848400848484008484 - 840084848400848484008484840084848400848484000000000000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008484840000FFFF0000FFFF0000FFFF0000FFFF0084848400FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008484 - 84008484840000FFFF000000000000000000000000000000000000FFFF008484 - 84008484840000FFFF0084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008484840000FFFF00848484008484840000FFFF0084848400FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00C6C6C600FFFFFF00C6C6C600FFFFFF00C6C6 - C600FFFFFF00C6C6C600FFFFFF00000000000000000000000000000000000000 - 000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000C6C6C600000000000000000000000000000000000000 - 00000000000000000000C6C6C6000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000008400000084000000840000008400 - 0000840000008400000000000000FFFFFF0000FFFF00FFFFFF0000000000FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600FFFFFF00C6C6 - C600FFFFFF0000000000FFFFFF00C6C6C600FFFFFF00C6C6C600FFFFFF00C6C6 - C600FFFFFF00C6C6C600FFFFFF0000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF0000000000000000000000000084000000FFFFFF00C6C6C600FFFF - FF00C6C6C600FFFFFF000000000000FFFF00FFFFFF0000FFFF000000000000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600C6C6C60000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 00000000000000000000C6C6C600FFFFFF00C6C6C6000000840000008400FFFF - FF00C6C6C600FFFFFF00C6C6C600000000000000000000000000FFFFFF0000FF - FF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000000000000000000084000000C6C6C600FFFFFF000000 - 8400FFFFFF0000008400000084000000000000FFFF00FFFFFF0000000000FFFF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C6000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600FFFFFF00C6C6 - C600FFFFFF0000000000FFFFFF00C6C6C600FFFFFF000000840000008400C6C6 - C600FFFFFF00C6C6C600FFFFFF000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000084000000FFFFFF00C6C6C6000000 - 8400C6C6C60000008400C6C6C600FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6C6000000 - 00000000000000000000000000000000000000000000FFFFFF00848484000000 - 84000000840000000000C6C6C600FFFFFF00C6C6C600FFFFFF00000084000000 - 8400C6C6C600FFFFFF00C6C6C600000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00000000000000000084000000C6C6C600000084000000 - 8400FFFFFF00C6C6C60000008400C6C6C600C6C6C60000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000C6C6C600C6C6C600C6C6C6000000 - 00000000000000000000000000000000000000000000C6C6C600000084000000 - 8400FFFFFF0000000000FFFFFF00C6C6C600FFFFFF00C6C6C600FFFFFF000000 - 840000008400C6C6C600FFFFFF000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000000000000000 - 000000000000FFFFFF00000000000000000084000000FFFFFF00C6C6C6000000 - 8400C6C6C60084000000FFFFFF0084000000C6C6C600C6C6C600000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6C600C6C6 - C6000000000000000000000000000000000000000000FFFFFF00848484000000 - 84000000840000000000C6C6C600FFFFFF000000840000008400000084000000 - 840000008400FFFFFF00C6C6C600000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00000000000000000084000000C6C6C600FFFFFF00C6C6 - C600FFFFFF00C6C6C600FFFFFF00C6C6C600C6C6C60000000000C6C6C6000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600C6C6C600C6C6C600000000000000 - 00000000000000000000000000000000000000000000C6C6C600000084000000 - 8400FFFFFF0000000000FFFFFF00C6C6C600FFFFFF00C6C6C600FFFFFF00C6C6 - C600FFFFFF00C6C6C600FFFFFF000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000008400000084000000840000008400 - 0000840000000000000000000000C6C6C60000000000C6C6C60000000000C6C6 - C600000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600C6C6C6000000 - 00000000000000000000000000000000000000000000FFFFFF00848484000000 - 8400000084000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000000000000000000084000000FF00000084000000FF00 - 0000FF00000000000000C6C6C60000000000C6C6C60000000000C6C6C6000000 - 0000C6C6C600C6C6C60000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C6000000000000000000000000000000000000000000C6C6C600FFFFFF00C6C6 - C600FFFFFF000000000084000000840000008400000084000000840000008400 - 000084000000840000008400000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000000000000000008400000084000000840000008400 - 0000840000008400000000000000C6C6C60000000000C6C6C60000000000C6C6 - C600C6C6C600C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000C6C6C60000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084000000840000008400 - 0000840000008400000084000000840000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000FFFF00FFFFFF0000000000FFFF - FF0000FFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF008400000084000000840000008400000084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF008400 - 0000FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00840000008400000084000000840000008400 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF0084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00840000008400 - 000084000000840000008400000084000000FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF00000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0084000000FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000008400000084000000840000008400 - 0000840000008400000000000000FFFFFF0000FFFF00FFFFFF0000000000FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF008400 - 00008400000084000000840000008400000084000000FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000084000000FFFFFF00C6C6C600FFFF - FF00C6C6C600FFFFFF000000000000FFFF00FFFFFF0000FFFF000000000000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000FFFFFF0084000000FFFFFF00FFFFFF00000000000000 - 00000000000000000000000000000000000084000000C6C6C600FFFFFF000000 - 8400FFFFFF0000008400000084000000000000FFFF00FFFFFF0000000000FFFF - FF0000FFFF00000000000000000000000000000000000000000000000000FFFF - FF008400000084000000840000008400000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF0084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000000000000000 - 00000000000000000000000000000000000084000000FFFFFF00C6C6C6000000 - 8400C6C6C60000008400C6C6C600FFFFFF000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF008400000084000000840000008400000084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000FFFFFF000000000000000000000000000000 - 00000000000000000000000000008400000084000000C6C6C600000084000000 - 8400FFFFFF00C6C6C60000008400C6C6C6008400000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000008400000084000000FFFFFF00C6C6C6000000 - 8400C6C6C6000000840000008400FFFFFF008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 00000000000000000000000000008400000084000000C6C6C600FFFFFF00C6C6 - C600FFFFFF00C6C6C600FFFFFF00C6C6C6008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000840000008400000084000000840000008400 - 0000840000008400000084000000840000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000008400000084000000FF00000084000000FF00 - 0000FF000000FF00000084000000FF0000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000840000008400000084000000840000008400 - 0000840000008400000084000000840000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 840084848400848484008484840084848400848484000000000000FFFF000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000848484008484840000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 8400848484008484840000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000000000000000000000000000FFFF - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF008400000084000000FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000FFFF00008484840000000000FFFF - 0000FFFF00000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400000000000000000000FFFF0000FFFF0000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000FFFF - 0000FFFF0000FFFF000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF008400000084848400FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF0084000000840000008400000084000000840000008400000084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF008484840084000000C6C6C600FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0084848400000000000000 - 000000000000848484008484840084848400000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000FFFF - 0000FFFF0000FFFF000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF0084848400840000008484840000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000FFFF00008484840000000000FFFF - 0000FFFF00000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008400000084848400FFFFFF00FFFFFF008400000084000000FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0084848400000000000000 - 000000000000848484008484840084848400000000000000000000000000FFFF - FF00FFFFFF008400000084000000840000008400000084000000840000008400 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000000000000000000000000000FFFF - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00840000008400000000FFFF00C6C6C600840000008400000000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 8400848484000000000000FFFF0000FFFF0000FFFF0000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00C6C6C60084000000840000008400000084000000C6C6C600FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 84000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFF0000000000000000000000000000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - 0000FFFF00000000000084848400FFFF0000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000FFFF00000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600FF000000FF000000FF00000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000FFFF0000FFFF - 0000FFFF000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFF0000FFFF0000FFFF - 000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000008484000000000000C6C6 - C600FF000000FF000000FF000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFF0000FFFF - 0000FFFF000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C6000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000FFFF00000000000084848400FFFF0000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000FFFF00000000 - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600FF000000FF000000FF000000C6C6C6000000000000000000000000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000FFFF0000000000000000000000000000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000000000000000 - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C6000000000000000000000000000000 - 0000000000008400000084000000840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000848400008484 - 0000848400008484000000000000000000000000000000000000840000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 0000000000000000000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 84008484000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 00008484840084840000848484000000000000000000FFFFFF00FFFFFF000000 - 000000000000FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF0000000000FFFFFF00FFFFFF0000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000000000000000 - 000000000000FFFFFF0000000000848400008484840000000000000000000000 - 0000FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000008484840000000000000000000000000084840000000000000000 - 00000000000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00000000008484000000000000FFFFFF00000000008484840000000000FFFF - FF000000000084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400000000000000 - 000000000000FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00000000008484840000000000FFFFFF00000000008484000000000000FFFF - FF000000000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000000000000000 - 0000FFFFFF000000000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000084840000000000000000 - 0000000000008484000000000000000000000000000084840000000000000000 - 00000000000084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484840000000000FFFF - FF00000000000000000000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 84008484000084848400848400000000000000000000FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF000000 - 0000FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 0000000000000000000084840000000000000000000084840000000000000000 - 0000000000008484000000000000000000000000000084840000000000000000 - 0000000000008484000084848400000000008484840000000000FF000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FF0000000000000084848400000000008484840000000000FFFF - FF0000000000FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF00000000008484840000000000000000008484840000000000FFFF - FF00000000008484840000000000FFFFFF00000000008484840000000000FFFF - FF000000000084848400848400000000000000000000FF000000FF0000000000 - 0000FFFFFF00FF000000000000000000000000000000FFFFFF00FF000000FFFF - FF0000000000FF000000FF00000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF000000000084848400000000000000000084848400000000000000 - 000000000000FFFFFF0000000000848484008484000000000000000000000000 - 0000FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00000000008484000000000000FFFFFF00000000008484000000000000FFFF - FF00000000008484000084848400000000008484840000000000FF000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FF00000000000000848484000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 000000000000000000008484000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000008484840000000000000000000000000084848400000000000000 - 00000000000084848400848400000000000000000000FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 0000000000000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 00008484840084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 840084840000848484008484000000000000000000000000000084848400FFFF - FF000000000000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000848484008484000084848400000000000000000000000000848484000000 - 00008484840000000000FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484840084840000000000000000000000000000000000008484 - 8400848484008484840000000000FFFFFF00FFFFFF0000FFFF0084848400FFFF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000C6C6C600C6C6 - C600C6C6C600848484008484840000000000FFFFFF00FFFFFF00840000008484 - 8400FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF00840000008400000084000000840000008400000084000000FFFF - FF000000000084848400848400000000000000000000FFFFFF00C6C6C600C6C6 - C600C6C6C600C6C6C60084848400848484000000000000FFFF00840000008400 - 0000FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0000000000848400008484840000000000C6C6C600FFFFFF00FFFFFF00C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084000000840000008400 - 0000FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF0000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF0084000000840000008400000084000000FFFFFF00FFFFFF00FFFF - FF000000000084848400848400000000000000000000C6C6C600FFFFFF00FFFF - FF00C6C6C60000000000C6C6C600C6C6C6008484840084000000840000008400 - 0000FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000000000FF00 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FF00000000000000FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000C6C6C600FFFF - FF00000000008400000000000000C6C6C6008400000084000000840000008484 - 8400FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000FF000000FF00 - 000000000000FFFFFF0000000000FF000000FF00000000000000FFFFFF000000 - 0000FF000000FF00000000000000000000000000000084848400848400000000 - 0000FFFFFF00840000008400000084000000840000008400000084000000FFFF - FF0000000000848484008484000000000000000000000000000000000000C6C6 - C600FFFFFF0084000000C6C6C60084848400840000008400000084848400FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000000000FF00 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FF00000000000000FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000840000000000 - 0000C6C6C60084000000848484000000000084848400FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF0000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000848484008484000000000000000000000000000084000000C6C6 - C60000000000840000000000000084848400FFFFFF0000FFFF00FFFFFF008484 - 8400C6C6C60000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 000084848400848400008484840000000000000000000000000084000000C6C6 - C600C6C6C600840000008484840000FFFF00FFFFFF00FFFFFF00FFFFFF008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008400 - 0000840000008484840084848400848484008484840084848400848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400000000008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000008484840000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484000000 - 00000000000000000000C6C6C600C6C6C600C6C6C60000000000000000000000 - 0000000000000000000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C60000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C60000000000000000000000000000000000000000000000 - 000000000000FFFFFF008484840000000000FFFFFF0000000000000000000000 - 000000000000000000000000000000000000000000008484840000000000C6C6 - C600848484000000000000000000C6C6C600C6C6C6000000000084848400C6C6 - C6000000000000000000848484000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C60000FFFF0000FFFF0000FFFF00C6C6C600C6C6 - C6000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C60000FFFF0000FFFF0000FFFF00C6C6C600C6C6 - C600000000000000000000000000000000000000000084848400FFFFFF00FFFF - FF00FFFFFF00848484008484840000000000FFFFFF00FFFFFF00848484008484 - 840084848400848484000000000000000000000000000000000084848400C6C6 - C60084848400C6C6C600C6C6C6008484840000000000C6C6C600848484008484 - 84008484840084848400000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400C6C6C600C6C6 - C60000000000C6C6C600000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400C6C6C600C6C6 - C60000000000C6C6C60000000000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000000000000000000000000000000000 - 0000C6C6C600C6C6C60000000000FFFFFF00FFFFFF0000000000C6C6C6000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C600C6C6C600000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000C6C6C6000000 - 0000C6C6C60000000000C6C6C600C6C6C600C6C6C600FFFFFF00848484000000 - 0000C6C6C600C6C6C600000000008484840000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C60000000000C6C6C6000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C60000000000C6C6C600000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000C6C6C600C6C6 - C600FFFFFF00000000008484840000000000C6C6C600FFFFFF0084848400C6C6 - C600C6C6C600C6C6C60000000000848484000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C60000000000C6C6C60000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C60000000000C6C6C60000000000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000000000000000 - 0000FFFFFF00000000008484840084848400C6C6C60000000000C6C6C6000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C6C6C60000000000C6C6C60000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C6C6C60000000000C6C6C600848484000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000000000000000000000000000000000 - 0000C6C6C600FFFFFF00000000000000000000000000C6C6C600C6C6C6000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00848484000000000000000000000000000000000084848400C6C6 - C60084848400C6C6C600FFFFFF00FFFFFF00C6C6C600C6C6C600848484008484 - 8400848484000000000084848400000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00848484000000000000000000000000008484840000000000C6C6 - C600848484000000000000000000C6C6C6000000000000000000C6C6C600C6C6 - C600000000008484840000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000FFFF00008484 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000000000000000000000000000000000000000000084848400FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000848484000000 - 00008484840000000000C6C6C600C6C6C600C6C6C60000000000848484000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00848484008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000E00000000100010000000000000700000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFF18000000000008000800000000000 - 0000800000000000000080000000000000008000000000000000800000000000 - 0000800000000000000080000000000000008000000000000000800000000000 - 0000800000000000000080000000000000018000000000008007800000000000 - C007800000000000E007FFFF00000000FFFFE001FFFFFFFFFFFFC001000F8000 - 8003C001000F80008003C001000F80008003C001000F80008003C001000F8000 - 8003C001000F80008003C001000F80008003C001000F80008003C00100048000 - 8003C00100008000C1FEC00100008001E3FEC001F800C07FFFF5C001FC00E0FF - FFF3C003FE04FFFFFFF1FFFFFFFFFFFFFFFFFFFFC001FFFF00010001C001FFFF - 00010001C001001F00010001C001000F00010001C001000700010001C0010003 - 00010001C001000100000001C001000000000001C001001F00010001C001001F - 00000001C001001F00000003C0018FF1808180FFC001FFF9C124C1FFC003FF75 - FE66FFFFC007FF8FFFE7FFFFC00FFFFFC001FFFFFFFFFFFFC001C003C001FFFF - C001C0038031FFF9C001C0038031E7FFC001C0038031C3F3C001C0038001C3E7 - C001C0038001E1C7C001C0038001F08FC001C0038FF1F81FC001C0038FF1FC3F - C001C0038FF1F81FC001C0038FF1F09FC003C0038FF1C1C7C007C0078FF183E3 - C00FC00F80018FF1FFFFC01FFFFFFFFFFFFFFFFFFE0080008003FFFF80000000 - 8003FF81800000008003FF00800000008003FE00800300008003FE0000030000 - 8003FC80000300008003FA000003000080038000000300008003000100030000 - 8003000180030000800300018003000080030001800000008003000180000000 - 8003000580000000FFFF8003FE0000018001FFFFFFFFFFFF8001E00180038003 - DFFBE00180038003F070000180038003E060000180038003802C000180038003 - 000C003F800380030000003F80038003000C003F800380030000003F80038003 - 0000003F80038003000000018003800300000001800380030000000180038003 - FFFFE00180038003FFFFE001FFFFFFFFFFFFFFFFFC01FFFFF800F83FFC01FFFF - F800E00F8001F7DF0000C0070001F63F000080030001F83F000080030003FC1F - 000000010007F80F00000001003FF00F00000001000FF00700000001000FF00F - 000000010003F00F000080030001F007000080030000F8070000C007FE00FC1F - 001FE00FFE00FFFF001FF83FFF80FFFFFFFFFFFFFFFFFFFFC003C003000FFF07 - C003C003000FFE03C003C003140FFC01C003C003000FFC01C003C003000F8001 - C003C003000F0001C003C003000F0001C003C003000F0003C003C003052F0007 - C003C0030052003FC003C00302AC003FC003C003815E003FE003E003C0BE003F - F003F003E07C003FF803F803FF82007FFFFFFFEFFDFFFFFFFFFFFFCFF9FFFFFF - FFFFE007F1FFC003FDDFC003E1FFC003FCCF80030007C003FC478003C03FC003 - 00038003C037C00300018003C027C00300008003C000C00300018003C000C003 - 00038003C000C003FC478003C027C003FCCF8003C037C003FDDF8003C03FE003 - FFFF8003C03FF003FFFFC007FFFFF803FFFFFFFFFFFFFFFFFE03FFFFFFFFFFFF - FE03FFFFFFFFFFFFFE03FBBFFEFFFF7FFE03F33FFCFFFF3FC003E23FF8FFFF1F - C003C000F003C00F00038000E003C00700030000C003C00300038000E003C007 - 007FC000F003C00F007DE23FF8FFFF1F0078F33FFCFFFF3F007DFBBFFEFFFF7F - 01DDFFFFFFFFFFFF01E3FFFFFFFFFFFFFFFF8001FFFFFFFF8001000080018081 - 0000000000000080000000000000008000000000000000800000000000000100 - 0000000000000100000000000000018000000000000000800000000000000000 - 0000000000000100000000000000018000000000000000800000000000000080 - 8001000080018081FFFF8001FFFFFFFFFFFFFFFFFFFFFFFFC001800180018001 - C001000000000000C001000000000000C001000000000000C001000000000000 - 8001000000000000000100000000000000010000000000000001000000000000 - 8001000000000000C001000000000000C001000000000000C003000000000000 - C007800180018001C00FFFFFFFFFFFFFFC7FFFFFFFFFFFFFFC27C007C007FFFF - EC2380038003F83FC4010001000100018001000100010001C003000100010001 - E000000000000001000000000000000100008000800000010003C000C0000001 - E001E001E0000001C001E007800000018003F00780070101C407F00380008383 - EC3FF803F000FFFFFC7FFFFFF800FFFF00000000000000000000000000000000 - 000000000000} - end - object pmPreview: TdxBarPopupMenu - BarManager = dxBarManager - ItemLinks = < - item - Item = bbFileDesign - Visible = True - end - item - BeginGroup = True - Item = bbFilePageSetup - Visible = True - end - item - BeginGroup = True - Item = bbFormatShrinkToPageWidth - Visible = True - end - item - BeginGroup = True - Item = cbxPredefinedZoom - Visible = True - end - item - Item = bbZoomWholePage - Visible = True - end - item - BeginGroup = True - Item = bbGoToFirstPage - Visible = True - end - item - Item = bbGoToPrevPage - Visible = True - end - item - BeginGroup = True - Item = seActivePage - Visible = True - end - item - BeginGroup = True - Item = bbGoToNextPage - Visible = True - end - item - Item = bbGoToLastPage - Visible = True - end> - UseOwnFont = False - Left = 91 - Top = 197 - end - object pmPrintStyles: TdxBarPopupMenu - BarManager = dxBarManager - ItemLinks = < - item - Item = bliPrintStyles - Visible = True - end - item - BeginGroup = True - Item = bbDefinePrintStyles - Visible = True - end> - UseOwnFont = False - Left = 119 - Top = 197 - end - object TimerHint: TTimer - Enabled = False - OnTimer = TimerHintTimer - Left = 8 - Top = 246 - end - object pmExplorer: TdxBarPopupMenu - BarManager = dxBarManager - ItemLinks = < - item - Item = bbFileLoad - Visible = True - end - item - Item = bbFileClose - Visible = True - end - item - BeginGroup = True - Item = bbExplorerCreateNewFolder - Visible = True - end - item - BeginGroup = True - Item = bbExplorerDelete - Visible = True - end - item - Item = bbExplorerRename - Visible = True - end - item - BeginGroup = True - Item = bbExplorerProperties - Visible = True - end> - UseOwnFont = False - OnPopup = pmExplorerPopup - Left = 147 - Top = 197 - end - object pmThumbnails: TdxBarPopupMenu - BarManager = dxBarManager - ItemLinks = < - item - Item = bbThumbnailsSmall - Visible = True - end - item - Item = bbThumbnailsLarge - Visible = True - end> - UseOwnFont = False - Left = 175 - Top = 197 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwAdv.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwAdv.pas deleted file mode 100644 index 14db2418..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwAdv.pas +++ /dev/null @@ -1,1706 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSPrVwAdv; - -interface - -{$I cxVer.inc} - -uses - Windows, SysUtils, Classes, Messages, Graphics, Controls, ComCtrls, StdCtrls, - ExtCtrls, Forms, Menus, ImgList, dxPSCore, dxPSESys, dxPrevw, dxPSPrvw, dxBar, - dxBarPopupMenuEd, dxBarExtItems, cxClasses; - -type - TdxfmPreviewWdxBar = class(TCustomdxPSPreviewWindow) - dxBarManager: TdxBarManager; - bbFile: TdxBarSubItem; - bbToolsOptions: TdxBarButton; - bbFileDesign: TdxBarButton; - bbFilePrint: TdxBarButton; - bbFilePrintDialog: TdxBarButton; - bbView: TdxBarSubItem; - bbZoomPercent100: TdxBarButton; - bbZoomPageWidth: TdxBarButton; - bbZoomWholePage: TdxBarButton; - bbZoomTwoPages: TdxBarButton; - bbGoToPage: TdxBarSubItem; - bbGoToFirstPage: TdxBarButton; - bbGoToPrevPage: TdxBarButton; - bbGoToNextPage: TdxBarButton; - bbGoToLastPage: TdxBarButton; - bbHelp: TdxBarSubItem; - bbHelpTopics: TdxBarButton; - bbZoomFourPages: TdxBarButton; - ilToolBar: TImageList; - bbZoomWidenToSourceWidth: TdxBarButton; - seActivePage: TdxBarSpinEdit; - pmPreview: TdxBarPopupMenu; - bbViewToolbars: TdxBarToolbarsListItem; - bbZoomMultiplePages: TdxBarButton; - cbxPredefinedZoom: TdxBarImageCombo; - bbZoomSetup: TdxBarButton; - bbFileExit: TdxBarButton; - bbFormatShrinkToPageWidth: TdxBarButton; - bbViewMargins: TdxBarButton; - bbViewMarginBar: TdxBarButton; - bbViewStatusBar: TdxBarButton; - bsiShortcutPreview: TdxBarSubItem; - bsiInsertHFAutoText: TdxBarSubItem; - bbInsertHFPageNumber: TdxBarButton; - bbInsertHFTotalPages: TdxBarButton; - bbInsertHFPageOfPages: TdxBarButton; - bbInsertHFDate: TdxBarButton; - bbInsertHFTime: TdxBarButton; - bbInsertHFDateTime: TdxBarButton; - bbViewHFSwitchHeaderFooter: TdxBarButton; - bbInsertHFUserName: TdxBarButton; - bbInsertHFMachineName: TdxBarButton; - bbViewHFClose: TdxBarButton; - bbFormatHeaderAndFooter: TdxBarButton; - bbViewSwitchToLeftPart: TdxBarButton; - bbViewSwitchToCenterPart: TdxBarButton; - bbViewSwitchToRightPart: TdxBarButton; - bbFormatHFClear: TdxBarButton; - bbFormat: TdxBarSubItem; - bbEdit: TdxBarSubItem; - bbFilePageSetup: TdxBarButton; - bliInsertAutoTextEntries: TdxBarListItem; - bbInsertEditAutoText: TdxBarButton; - bbFormatHFBackground: TdxBarButton; - bbFormatDateTime: TdxBarButton; - bbFormatPageNumbering: TdxBarButton; - bbEditFind: TdxBarButton; - bbEditFindNext: TdxBarButton; - bbEditReplace: TdxBarButton; - bbViewPageHeaders: TdxBarButton; - bbViewPageFooters: TdxBarButton; - bbViewPages: TdxBarSubItem; - bbFormatPageBackground: TdxBarButton; - bbViewZoom: TdxBarSubItem; - bbToolsCustomize: TdxBarButton; - bbTools: TdxBarSubItem; - bbHelpAbout: TdxBarButton; - bbInsert: TdxBarSubItem; - bbFormatShowHideEmptyPages: TdxBarButton; - bsiNewMenuNewMenu: TdxBarSubItem; - pmPrintStyles: TdxBarPopupMenu; - bliPrintStyles: TdxBarListItem; - bbDefinePrintStyles: TdxBarButton; - bsiInsertAutoText: TdxBarSubItem; - TimerHint: TTimer; - bbFileLoad: TdxBarButton; - bbExplorerCreateNewFolder: TdxBarButton; - bbExplorerDelete: TdxBarButton; - bbExplorerRename: TdxBarButton; - bbExplorer: TdxBarSubItem; - bbFileSave: TdxBarButton; - bbViewExplorer: TdxBarButton; - pmExplorer: TdxBarPopupMenu; - bsiShortCutExplorer: TdxBarSubItem; - bbFileClose: TdxBarButton; - bbFormatTitle: TdxBarButton; - pmThumbnails: TdxBarPopupMenu; - bbViewThumbnails: TdxBarButton; - bbThumbnailsSmall: TdxBarButton; - bbThumbnailsLarge: TdxBarButton; - bsiShortcutThumbnails: TdxBarSubItem; - bbExplorerProperties: TdxBarButton; - bbFileRebuild: TdxBarButton; - procedure PageSetupClick(Sender: TObject); - procedure ZoomClick(Sender: TObject); - procedure GoToPageClick(Sender: TObject); - procedure CloseClick(Sender: TObject); - procedure DesignClick(Sender: TObject); - procedure PageBackgroundClick(Sender: TObject); - procedure bbViewMarginsClick(Sender: TObject); - procedure HelpClick(Sender: TObject); - procedure bbViewMarginBarClick(Sender: TObject); - procedure bbViewStatusBarClick(Sender: TObject); - procedure seActivePageChange(Sender: TObject); - procedure cbxPredefinedZoomChange(Sender: TObject); - procedure seActivePageButtonClick(Sender: TdxBarSpinEdit; - Button: TdxBarSpinEditButton); - procedure bbZoomMultiplePagesClick(Sender: TObject); - procedure bbZoomSetupClick(Sender: TObject); - procedure cbxPredefinedZoomClick(Sender: TObject); - procedure bbFormatShrinkToPageWidthClick(Sender: TObject); - procedure miCustomizePopupClick(Sender: TObject); - procedure dxBarManagerBarVisibleChange(Sender: TdxBarManager; ABar: TdxBar); - procedure bbViewHFCloseClick(Sender: TObject); - procedure bbFormatHeaderAndFooterClick(Sender: TObject); - procedure InsertHFClick(Sender: TObject); - procedure bbViewHFSwitchHeaderFooterClick(Sender: TObject); - procedure bbFormatDateTimeClick(Sender: TObject); - procedure SwitchPartClick(Sender: TObject); - procedure bbFormatHFClearClick(Sender: TObject); - procedure bbFormatHFBackgroundClick(Sender: TObject); - procedure PrintClick(Sender: TObject); - procedure bbFormatPageNumbersClick(Sender: TObject); - procedure bbViewPageHeadersClick(Sender: TObject); - procedure bbViewPageFootersClick(Sender: TObject); - procedure bbToolsCustomizeClick(Sender: TObject); - procedure dxBarManagerShowCustomizingForm(Sender: TObject); - procedure dxBarManagerHideCustomizingForm(Sender: TObject); - procedure bbFormatShowHideEmptyPagesClick(Sender: TObject); - procedure bbToolsOptionsClick(Sender: TObject); - procedure TimerHintTimer(Sender: TObject); - procedure FileSaveClick(Sender: TObject); - procedure ExplorerLoadDataClick(Sender: TObject); - procedure ExplorerCreateNewFolderClick(Sender: TObject); - procedure ExplorerDeleteItemClick(Sender: TObject); - procedure ExplorerRenameItemClick(Sender: TObject); - procedure bbViewExplorerClick(Sender: TObject); - procedure pmExplorerPopup(Sender: TObject); - procedure bbFileCloseClick(Sender: TObject); - procedure bbFormatTitleClick(Sender: TObject); - procedure bbThumbnailsSizeClick(Sender: TObject); - procedure bbViewThumbnailsClick(Sender: TObject); - procedure bbExplorerPropertiesClick(Sender: TObject); - procedure bbFileRebuildClick(Sender: TObject); - private - FExplorerContextCommands: TList; - function GetExplorerContextCommand(Index: Integer): TCustomdxPSExplorerContextCommand; - function GetExplorerContextCommandCount: Integer; - - function CalcWindowPos(Sender: TObject): TPoint; - procedure DoShowExplorerPopup(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - procedure EnableItemsWhileBuilding(Value: Boolean); - procedure PostCreateFolderMessage; - procedure SetBarItemVisibility(Item: TdxBarItem; Value: Boolean); - - function ShortcutBar: TdxBar; - procedure ShowShortCutBar(Value: Boolean); - - procedure EnabledHFItems(Value: Boolean); - function HFBar: TdxBar; - procedure ShowHFBar(Value: Boolean); - procedure UpdateHFState(Value: Boolean); - - procedure LoadBarManagerFromRegistry(const APath: string); - procedure SaveBarManagerToRegistry(const APath: string); - protected - procedure Activate; override; - procedure WndProc(var Message: TMessage); override; - - procedure AddExplorerContextCommand(ACommand: TCustomdxPSExplorerContextCommand); override; - procedure ExplorerContextCommandClick(Sender: TObject); virtual; - procedure UpdateExplorerContextCommands; override; - - procedure DoAfterPrintReport(AShowDialog: Boolean); override; - procedure DoPreviewDblClick(APreview: TdxPreview); override; - procedure DoPreviewZoomFactorChanged(APreview: TdxPreview); override; - procedure DoPreviewZoomModeChanged(APreview: TdxPreview); override; - procedure DoShowHFToolBar(Value: Boolean); override; - function GetPreviewCanShowMarginHint(APreview: TdxPreview): Boolean; override; - procedure HFTextEntriesChanged; override; - procedure LoadStrings; override; - procedure StyleListChanged(Sender: TObject); override; - - property ExplorerContextCommandCount: Integer read GetExplorerContextCommandCount; - property ExplorerContextCommands[Index: Integer]: TCustomdxPSExplorerContextCommand read GetExplorerContextCommand; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure AfterConstruction; override; - - procedure InitContent; override; - procedure LoadFromRegistry(const APath: string); override; - procedure SaveToRegistry(const APath: string); override; - procedure UpdateControls; override; - end; - -implementation - -{$R *.DFM} - -uses -{$IFDEF EXPRESSBARS5} - cxLookAndFeels, dxThemeManager, -{$ENDIF} - Registry, CommCtrl, Math, dxPSRes, dxPrnPg, dxPSGlbl, dxPSPopupMan, - dxPSUtl, dxPSPgsMnuBld, dxPSEngn, dxPgsDlg, dxPSEvnt, dxPSAutoHFTextMnuBld, - dxPSfmAutoHFTextFmt, dxPrnDev; - -const - WM_CREATEFOLDER = WM_DX + 50; - PageSelectorImageIndex = 35; - - sdxToolBars = '\ToolBars'; // Don't Localize - -type - TWinControlAccess = class(TWinControl); - - TdxBarPSPopupMenuBuilder = class(TAbstractdxPSPopupMenuBuilder) - private - FBarHostForm: TCustomForm; - FBarManager: TdxBarManager; - protected - function BuildPopup(const AControl: TControl; - const APopupMenu: TPopupMenu): TComponent; override; - class function CanShowPopup(const APopupMenu: TPopupMenu): Boolean; override; - procedure FreePopup(var APopupMenu: TComponent); override; - procedure InvokePopup(const X, Y: Integer; const AControl: TControl; - const APopupMenu: TComponent); override; - class function RequireProcessDoPopup: Boolean; override; - public - constructor Create; override; - destructor Destroy; override; - end; - - TdxBarPSPageSetupMenuBuilder = class(TAbstractdxPSPageSetupMenuBuilder) - public - procedure BuildPageSetupMenu(ARootItem: TObject; AData: Pointer; - AIncludeDefineItem: Boolean; AStyles: TStringList; ACurrentStyle: TBasedxPrintStyle; - AOnStyleClick, AOnDefineStylesClick: TNotifyEvent); override; - class function ExtractPrintStyleFromObj(Obj: TObject): TBasedxPrintStyle; override; - end; - - TdxBarPSAutoHFTextMenuBuilder = class(TAbstractdxPSAutoHFTextMenuBuilder) - public - procedure BuildAutoHFTextEntriesMenu(ARootItem: TObject; AData: Pointer; - AIncludeSetupAutoHFTextEntriesItem: Boolean; AAutoHFTextEntries: TStrings; - AOnHFTextEntriesClick, AOnSetupHFTextEntriesClick: TNotifyEvent); override; - class function ExtractAutoHFTextEntryIndexFromObj(Obj: TObject): Integer; override; - end; - -function VisibleToBarItemVisible(AValue: Boolean): TdxBarItemVisible; -{ivNever, ivInCustomizing, ivAlways} -begin - Result := TdxBarItemVisible(2 * Byte(AValue)); -end; - -function dxBar_DoesNotHaveActivePopup: Boolean; -begin - Result := dxBar.ActiveBarControl = nil; -end; - -procedure SetupBarManagerStyle(ABarManager: TdxBarManager); -const -{$IFDEF EXPRESSBARS5} - BarManagerStyleMap: array[dxPSGlbl.TdxPSLookAndFeel] of dxBar.TdxBarManagerStyle = - (dxBar.bmsEnhanced, dxBar.bmsFlat, dxBar.bmsXP, dxBar.bmsOffice11); -{$ELSE} - BarManagerStyleMap: array[dxPSGlbl.TdxPSLookAndFeel] of dxBar.TdxBarManagerStyle = - (dxBar.bmsEnhanced, dxBar.bmsFlat, dxBar.bmsFlat, dxBar.bmsFlat); -{$ENDIF} -begin - with dxPSEngine do - {$IFDEF EXPRESSBARS5} - if UseNativeLookAndFeel and dxThemeManager.AreVisualStylesAvailable then - begin - ABarManager.Style := dxBar.bmsUseLookAndFeel; - ABarManager.LookAndFeel.NativeStyle := True; - end - else - ABarManager.Style := BarManagerStyleMap[LookAndFeel]; - {$ElSE} - ABarManager.Style := BarManagerStyleMap[LookAndFeel]; - {$ENDIF} -end; - -{ TdxBarPSPopupMenuBuilder } - -constructor TdxBarPSPopupMenuBuilder.Create; -begin - inherited; - FBarHostForm := TCustomForm.CreateNew(nil); - FBarManager := TdxBarManager.Create(FBarHostForm); - SetupBarManagerStyle(FBarManager); -end; - -destructor TdxBarPSPopupMenuBuilder.Destroy; -begin - FBarHostForm.Free; - inherited; -end; - -class function TdxBarPSPopupMenuBuilder.CanShowPopup(const APopupMenu: TPopupMenu): Boolean; -begin - Result := inherited CanShowPopup(APopupMenu) and dxBar_DoesNotHaveActivePopup; -end; - -function TdxBarPSPopupMenuBuilder.BuildPopup(const AControl: TControl; - const APopupMenu: TPopupMenu): TComponent; - - function IsSeparator(ABarItem: TdxBarItem): Boolean; - begin - Result := ABarItem.Caption = '-'; - end; - - function CreateItem(AMenuItem: TMenuItem): TdxBarItem; - const - BarItemClasses: array[Boolean] of TdxBarItemClass = (TdxBarButton, TdxBarSubItem); - var - BarItemClass: TdxBarItemClass; - begin - Result := nil; - BarItemClass := BarItemClasses[AMenuItem.Count > 0]; - if BarItemClass = nil then Exit; - - Result := BarItemClass.Create(FBarHostForm); - - Result.Action := AMenuItem.Action; - Result.ImageIndex := AMenuItem.ImageIndex; - Result.Glyph := AMenuItem.Bitmap; - Result.Caption := AMenuItem.Caption; - Result.Enabled := AMenuItem.Enabled; - Result.HelpContext := AMenuItem.HelpContext; - Result.Hint := AMenuItem.Hint; - Result.ShortCut := AMenuItem.ShortCut; - Result.Tag := AMenuItem.Tag; - Result.Visible := VisibleToBarItemVisible(AMenuItem.Visible); - if not (Result is TdxBarSubItem) then - Result.OnClick := AMenuItem.OnClick; - if Result is TdxBarButton then - begin - if AMenuItem.Checked or AMenuItem.RadioItem then - TdxBarButton(Result).ButtonStyle := bsChecked; - if AMenuItem.RadioItem then - TdxBarButton(Result).GroupIndex := AMenuItem.GroupIndex; - TdxBarButton(Result).Down := AMenuItem.Checked; - end; - end; - - procedure FixBeginGroup(AItemLinks: TdxBarItemLinks); - var - I: Integer; - ItemLink: TdxBarItemLink; - begin - for I := AItemLinks.Count - 1 downto 0 do - begin - ItemLink := AItemLinks.Items[I]; - if IsSeparator(ItemLink.Item) then - begin - ItemLink.Free; - if I < AItemLinks.Count then - AItemLinks.Items[I].BeginGroup := True; - end; - end; - end; - - procedure ProcessSubMenu(AItemLinks: TdxBarItemLinks; AMenuItem: TMenuItem); - var - I: Integer; - MI: TMenuItem; - Item: TdxBarItem; - begin - for I := 0 to AMenuItem.Count - 1 do - begin - MI := AMenuItem.Items[I]; - Item := CreateItem(MI); - if Item <> nil then - begin - AItemLinks.Add.Item := Item; - if Item is TdxBarSubItem then - ProcessSubMenu(TdxBarSubItem(Item).ItemLinks, MI); - end; - end; - FixBeginGroup(AItemLinks); - end; - -begin - Result := nil; - if (APopupMenu <> nil) and (APopupMenu.Items.Count > 0) then - begin - Result := TdxBarPopupMenu.Create(FBarHostForm); - try - FBarManager.Images := APopupMenu.Images; - ProcessSubMenu(TdxBarPopupMenu(Result).ItemLinks, APopupMenu.Items); - except - FBarManager.Images := nil; - Result.Free; - raise; - end; - end; -end; - -procedure TdxBarPSPopupMenuBuilder.FreePopup(var APopupMenu: TComponent); -var - I: Integer; -begin - for I := 0 to FBarManager.ItemCount - 1 do - FBarManager.Items[I].Free; - FreeAndNil(APopupMenu); -end; - -procedure TdxBarPSPopupMenuBuilder.InvokePopup(const X, Y: Integer; - const AControl: TControl; const APopupMenu: TComponent); -begin - if APopupMenu is TdxBarPopupMenu then - TdxBarPopupMenu(APopupMenu).Popup(X, Y); -end; - -class function TdxBarPSPopupMenuBuilder.RequireProcessDoPopup: Boolean; -begin - Result := True; -end; - -{ TdxBarPSPageSetupMenuBuilder } - -class function TdxBarPSPageSetupMenuBuilder.ExtractPrintStyleFromObj(Obj: TObject): TBasedxPrintStyle; -begin - with TdxBarListItem(Obj) do - Result := TBasedxPrintStyle(Items.Objects[ItemIndex]); -end; - -procedure TdxBarPSPageSetupMenuBuilder.BuildPageSetupMenu(ARootItem: TObject; - AData: Pointer; AIncludeDefineItem: Boolean; - AStyles: TStringList; ACurrentStyle: TBasedxPrintStyle; - AOnStyleClick, AOnDefineStylesClick: TNotifyEvent); -begin - if not (ARootItem is TdxBarListItem) then Exit; - - with TdxBarListItem(ARootItem) do - begin - Items.Clear; - Items := AStyles; - if Items.Count > 0 then ItemIndex := ACurrentStyle.Index; - OnClick := AOnStyleClick; - end; - - if AIncludeDefineItem and (TObject(AData) is TdxBarButton) then - with TdxBarButton(AData) do - begin - Caption := cxGetResourceString(@sdxDefinePrintStylesMenuItem); - OnClick := AOnDefineStylesClick; - end; -end; - -{ TdxBarPSAutoHFTextMenuBuilder } - -procedure TdxBarPSAutoHFTextMenuBuilder.BuildAutoHFTextEntriesMenu(ARootItem: TObject; - AData: Pointer; AIncludeSetupAutoHFTextEntriesItem: Boolean; - AAutoHFTextEntries: TStrings; AOnHFTextEntriesClick, AOnSetupHFTextEntriesClick: TNotifyEvent); -begin - if not (ARootItem is TdxBarListItem) then Exit; - - with TdxBarListItem(ARootItem) do - begin - Items.Clear; - Items := AAutoHFTextEntries; - OnClick := AOnHFTextEntriesClick; - end; - - if AIncludeSetupAutoHFTextEntriesItem and (TObject(AData) is TdxBarButton) then - with TdxBarButton(AData) do - begin - Caption := cxGetResourceString(@sdxMenuInsertEditAutoTextEntries); - OnClick := AOnSetupHFTextEntriesClick; - end; -end; - -class function TdxBarPSAutoHFTextMenuBuilder.ExtractAutoHFTextEntryIndexFromObj(Obj: TObject): Integer; -begin - Result := TdxBarListItem(Obj).ItemIndex; -end; - -{ utility routines } - -function AddPercentageChar(const S: string): string; -begin - Result := S; - if Result[Length(Result)] <> PercentSymbol then - Result := Result + PercentSymbol; -end; - -procedure ProcessMessages; -begin - //Application.ProcessMessages; -end; - -{ TdxfmPreviewWdxBar } - -constructor TdxfmPreviewWdxBar.Create(AOwner: TComponent); -begin - inherited; - FExplorerContextCommands := TList.Create; - SetupBarManagerStyle(dxBarManager); -end; - -destructor TdxfmPreviewWdxBar.Destroy; -begin - FreeAndNil(FExplorerContextCommands); - inherited; -end; - -procedure TdxfmPreviewWdxBar.AfterConstruction; -var - Bar: TdxBar; -begin - inherited; - cbxPredefinedZoom.DropDownCount := PredefinedZooms.Count; - seActivePage.Value := 1; - - ShowHFBar(False); - Bar := ShortCutBar; - if Bar <> nil then Bar.Hidden := True; - - dxBarManager.PopupMenuLinks[0].Control := Preview; - dxBarManager.PopupMenuLinks[1].Control := ThumbnailsPreview; -end; - -procedure TdxfmPreviewWdxBar.InitContent; - - procedure AddEndEllipsis(AnItem: TdxBarButton); - begin - with AnItem do - if AnsiLastChar(Caption) <> '.' then Caption := dxPSUtl.AddEndEllipsis(Caption); - end; - -begin - inherited; - - if ReportLink <> nil then - seActivePage.MaxValue := ReportLink.PageCount; - cbxPredefinedZoom.Text := IntToStr(ZoomFactor) + PercentSymbol; - - if IsExplorerAvailable then - TWinControlAccess(ExplorerTree.Control).OnMouseUp := DoShowExplorerPopup; - - if not IsExplorerAvailable then - begin - AddEndEllipsis(bbFileSave); - AddEndEllipsis(bbFileLoad); - end; -end; - -procedure TdxfmPreviewWdxBar.LoadFromRegistry(const APath: string); -begin - inherited; - LoadBarManagerFromRegistry(APath); -end; - -procedure TdxfmPreviewWdxBar.SaveToRegistry(const APath: string); -begin - inherited; - SaveBarManagerToRegistry(APath); -end; - -procedure TdxfmPreviewWdxBar.UpdateControls; -const - ButtonStyles: array[Boolean] of TdxBarButtonStyle = (bsDefault, bsDropDown); -var - Bar: TdxBar; - PagesExists, B: Boolean; - PageXCount, PageYCount, Index: Integer; -begin - if Locked or (csDestroying in ComponentState) then Exit; - - inherited; - - PagesExists := FPreview.PageCount > 0; - BeginUpdate; - try - EnableItemsWhileBuilding(True); - - bbFileDesign.Enabled := CanDesign; - bbFileRebuild.Enabled := CanRebuild; - bbFileSave.Enabled := CanSaveReport; - bbFileLoad.Enabled := CanLoadReport; - bbFileClose.Enabled := CanUnloadReport; - bbFilePrint.Enabled := CanPrint; - bbFilePrintDialog.Enabled := CanPrintDialog; - bbFilePageSetup.Enabled := CanPageSetup; - bbFilePageSetup.ButtonStyle := ButtonStyles[CanPrintStyle]; - bbFileExit.Enabled := not IsPrinting; - - bbExplorer.Enabled := IsExplorerAvailable; - bbExplorerCreateNewFolder.Enabled := IsExplorerAvailable and ExplorerTree.CanCreateFolder; - bbExplorerDelete.Enabled := IsExplorerAvailable and ExplorerTree.CanDeleteSelection; - bbExplorerRename.Enabled := IsExplorerAvailable and ExplorerTree.CanRenameSelectedItem; - bbExplorerProperties.Enabled := IsExplorerAvailable and ExplorerTree.CanShowPropertySheetsForSelectedItem; - - bbFormatShowHideEmptyPages.Down := (ReportLink <> nil) and ReportLink.ShowEmptyPages; - bbFormatTitle.Enabled := (ReportLink <> nil) and ReportLink.CanChangeTitle; - bbFormatPageBackground.Enabled := IsEnabled(peoPageBackground) and not IsPrinting; - bbFormatShrinkToPageWidth.Enabled := PagesExists and not IsPrinting; - if ReportLink <> nil then - begin - bbFormatShrinkToPageWidth.Down := ReportLink.ShrinkToPageWidth; - SetBarItemVisibility(bbFormatShowHideEmptyPages, ReportLink.EmptyPagesCanExist); - bbFormatShowHideEmptyPages.Down := ReportLink.ShowEmptyPages; - end; - - bbZoomPageWidth.Enabled := PagesExists; - bbZoomPercent100.Enabled := PagesExists; - bbZoomWholePage.Enabled := PagesExists; - bbZoomTwoPages.Enabled := PagesExists and (FPreview.PageCount > 1); - bbZoomFourPages.Enabled := PagesExists and (FPreview.PageCount > 3); - bbZoomMultiplePages.Enabled := PagesExists; - if ReportLink <> nil then - begin - ReportLink.GetPageColRowCount(PageXCount, PageYCount); - bbZoomWidenToSourceWidth.Enabled := PageXCount > 1; - end; - cbxPredefinedZoom.Enabled := bbZoomPageWidth.Enabled; - bbZoomSetup.Enabled := bbZoomPageWidth.Enabled; - - bbGoToFirstPage.Enabled := PagesExists and (FPreview.SelPageIndex <> 0); - bbGoToPrevPage.Enabled := PagesExists and (Preview.SelPageIndex <> 0); - bbGoToNextPage.Enabled := PagesExists and (Preview.SelPageIndex <> FPreview.PageCount - 1); - bbGoToLastPage.Enabled := PagesExists and (Preview.SelPageIndex <> FPreview.PageCount - 1); - seActivePage.Enabled := Preview.PageCount > 1; - - bbHelp.Enabled := IsEnabled(peoHelp); - bbHelpTopics.Enabled := IsEnabled(peoHelp); - //bbHelpAbout.Enabled := IsEnabled(peoHelp); - - bbViewMargins.Down := ShowPageMargins; - bbViewMarginBar.Down := ShowMarginBar; - bbViewStatusBar.Down := ShowStatusBar; - SetBarItemVisibility(bbViewExplorer, IsExplorerAvailable); - bbViewExplorer.Down := ShowExplorer; - bbViewThumbnails.Down := ShowThumbnails; - bbThumbnailsSmall.Down := ThumbnailsSize = tsSmall; - bbThumbnailsLarge.Down := ThumbnailsSize = tsLarge; - if ReportLink <> nil then - begin - bbViewPageHeaders.Down := ReportLink.ShowPageHeader; - bbViewPageFooters.Down := ReportLink.ShowPageFooter; - end; - - SetBarItemVisibility(bbFileDesign, IsVisible(pvoReportDesign)); - SetBarItemVisibility(bbFileSave, IsCommandSaveReportVisible); - SetBarItemVisibility(bbFileLoad, IsCommandLoadReportVisible); - SetBarItemVisibility(bbFileClose, IsCommandUnloadReportVisible); - SetBarItemVisibility(bbFilePrint, IsVisible(pvoPrint)); - SetBarItemVisibility(bbFilePrintDialog, IsVisible(pvoPrint)); - SetBarItemVisibility(bbFilePageSetup, IsVisible(pvoPageSetup)); - - SetBarItemVisibility(bbExplorer, IsExplorerAvailable); - SetBarItemVisibility(bbExplorerCreateNewFolder, IsExplorerAvailable); - SetBarItemVisibility(bbExplorerDelete, IsExplorerAvailable); - SetBarItemVisibility(bbExplorerRename, IsExplorerAvailable); - SetBarItemVisibility(bbExplorerProperties, IsExplorerAvailable); - SetBarItemVisibility(bsiShortcutExplorer, IsExplorerAvailable); - - B := (ReportLink <> nil) and (ReportLink.StyleManager <> nil); - SetBarItemVisibility(bsiInsertHFAutoText, B); - SetBarItemVisibility(bbInsertEditAutoText, B); - SetBarItemVisibility(bsiInsertAutoText, B); - SetBarItemVisibility(bliInsertAutoTextEntries, B); - SetBarItemVisibility(bbFormatPageBackground, IsVisible(pvoPageBackground)); - SetBarItemVisibility(bbHelp, IsVisible(pvoHelp)); - SetBarItemVisibility(bbHelpTopics, IsVisible(pvoHelp)); - //SetBarItemVisibility(bbHelpAbout, IsVisible(pvoHelp)); - - if seActivePage.Enabled then - begin - seActivePage.MinValue := 1; - if ReportLink <> nil then - begin - seActivePage.MaxValue := ReportLink.PageCount; - seActivePage.Value := ReportLink.VirtualPageIndexToRealPageIndex(FPreview.SelPageIndex) + 1; - end - end - else - seActivePage.Value := -1; - - if IsBuilding or IsPrinting then - EnableItemsWhileBuilding(False); - - if HFBar <> nil then - EnabledHFItems(HFBar.Visible); - - { Categories visibility } - - { Edit } - Index := dxBarManager.Categories.IndexOf(DropAmpersand(cxGetResourceString(@sdxMenuEdit))); - if Index <> -1 then - dxBarManager.CategoryVisible[Index] := False; - - { Help } - Index := dxBarManager.Categories.IndexOf(DropAmpersand(cxGetResourceString(@sdxMenuHelp))); - if Index <> -1 then - dxBarManager.CategoryVisible[Index] := - (bbHelpTopics.Visible = ivAlways) or (bbHelpAbout.Visible = ivAlways); - - { Shortcut Menus } - Index := dxBarManager.Categories.IndexOf(DropAmpersand(cxGetResourceString(@sdxMenuShortCutMenus))); - if Index <> -1 then - dxBarManager.CategoryVisible[Index] := False; - - { Explorer } - Index := dxBarManager.Categories.IndexOf(DropAmpersand(cxGetResourceString(@sdxMenuExplorer))); - if Index <> -1 then - dxBarManager.CategoryVisible[Index] := IsExplorerAvailable; - - { AutoText } - Bar := dxBarManager.BarByCaption(cxGetResourceString(@sdxAutoTextBar)); - if Bar <> nil then - Bar.Hidden := not IsAutoHFTextEntriesAvailable; - - { Explorer } - Bar := dxBarManager.BarByCaption(cxGetResourceString(@sdxExplorerToolBar)); - if Bar <> nil then - Bar.Hidden := not IsExplorerAvailable; - - UpdateExplorerContextCommands; - finally - CancelUpdate; - end; -end; - -procedure TdxfmPreviewWdxBar.bbViewMarginsClick(Sender: TObject); -begin - if Locked then Exit; - ShowPageMargins := TdxBarButton(Sender).Down; -end; - -procedure TdxfmPreviewWdxBar.bbViewMarginBarClick(Sender: TObject); -begin - if Locked then Exit; - ShowMarginBar := TdxBarButton(Sender).Down; -end; - -procedure TdxfmPreviewWdxBar.bbViewStatusBarClick(Sender: TObject); -begin - if Locked then Exit; - ShowStatusBar := TdxBarButton(Sender).Down; -end; - -procedure TdxfmPreviewWdxBar.bbViewExplorerClick(Sender: TObject); -begin - if Locked then Exit; - ShowExplorer := TdxBarButton(Sender).Down; -end; - -procedure TdxfmPreviewWdxBar.pmExplorerPopup(Sender: TObject); -begin - UpdateControls; -end; - -procedure TdxfmPreviewWdxBar.bbThumbnailsSizeClick(Sender: TObject); -begin - ThumbnailsSize := TdxPSThumbnailsSize(TTagToInt(TComponent(Sender).Tag)); -end; - -procedure TdxfmPreviewWdxBar.bbViewThumbnailsClick(Sender: TObject); -begin - if Locked then Exit; - ShowThumbnails := TdxBarButton(Sender).Down; -end; - -procedure TdxfmPreviewWdxBar.DesignClick(Sender: TObject); -begin - DoDesignReport; -end; - -procedure TdxfmPreviewWdxBar.bbFileRebuildClick(Sender: TObject); -begin - if CanRebuild then RebuildReport; -end; - -procedure TdxfmPreviewWdxBar.PrintClick(Sender: TObject); -const - BtnClicked: Boolean = False; -begin - if BtnClicked then Exit; - ProcessMessages; - BtnClicked := True; - try - DoPrintReport(Boolean(TTagToInt(TComponent(Sender).Tag))); - finally - BtnClicked := False; - end; -end; - -procedure TdxfmPreviewWdxBar.PageSetupClick(Sender: TObject); -const - BtnClicked: Boolean = False; -begin - if BtnClicked then Exit; - ProcessMessages; - BtnClicked := True; - try - DoPageSetupReport(0); - finally - BtnClicked := False; - end; -end; - -procedure TdxfmPreviewWdxBar.FileSaveClick(Sender: TObject); -begin - DoExplorerCreateNewItem; -end; - -procedure TdxfmPreviewWdxBar.ExplorerLoadDataClick(Sender: TObject); -begin - ProcessMessages; - DoExplorerLoadItemData; -end; - -procedure TdxfmPreviewWdxBar.bbFileCloseClick(Sender: TObject); -begin - ProcessMessages; - DoExplorerUnloadItemData; -end; - -procedure TdxfmPreviewWdxBar.ExplorerCreateNewFolderClick(Sender: TObject); -begin - ExplorerTree.FocusedItem := ExplorerTree.SelectedItem; - PostCreateFolderMessage; -end; - -procedure TdxfmPreviewWdxBar.PostCreateFolderMessage; -begin - PostMessage(Handle, WM_CREATEFOLDER, 0, 0); -end; - -procedure TdxfmPreviewWdxBar.ExplorerDeleteItemClick(Sender: TObject); -begin - ProcessMessages; - DoExplorerDeleteItem; -end; - -procedure TdxfmPreviewWdxBar.ExplorerRenameItemClick(Sender: TObject); -begin - ProcessMessages; - DoExplorerRenameItem; -end; - -procedure TdxfmPreviewWdxBar.bbExplorerPropertiesClick( - Sender: TObject); -begin - DoExplorerItemShowPropertySheets; -end; - -procedure TdxfmPreviewWdxBar.PageBackgroundClick(Sender: TObject); -begin - ProcessMessages; - DoShowPageBackgroundDlg(CalcWindowPos(Sender)); -end; - -procedure TdxfmPreviewWdxBar.bbFormatShrinkToPageWidthClick(Sender: TObject); -begin - if ReportLink <> nil then - begin - ReportLink.ShrinkToPageWidth := not ReportLink.ShrinkToPageWidth; - DoShrinkToPageWidth(ReportLink.ShrinkToPageWidth); - end; -end; - -procedure TdxfmPreviewWdxBar.bbFormatShowHideEmptyPagesClick(Sender: TObject); -begin - if Locked then Exit; - DoShowEmptyPages(TdxBarButton(Sender).Down); -end; - -procedure TdxfmPreviewWdxBar.bbZoomSetupClick(Sender: TObject); -begin - ProcessMessages; - DoShowZoomDlg; -end; - -procedure TdxfmPreviewWdxBar.cbxPredefinedZoomClick(Sender: TObject); -begin - ProcessMessages; - DoShowZoomDlg; -end; - -procedure TdxfmPreviewWdxBar.bbZoomMultiplePagesClick(Sender: TObject); -var - Link: TdxBarItemLink; - R: TRect; - YShift: Integer; -begin - Link := TdxBarItem(Sender).ClickItemLink; - if (Link <> nil) and (Link.Control <> nil) then - begin - R := Link.ItemRect; - MapWindowPoints(Link.BarControl.Handle, 0, R, 2); - YShift := R.Bottom - R.Top; - end - else - begin - GetWindowRect(Preview.Handle, R); - OffsetRect(R, 3, 0); - YShift := 3; - end; - DoShowMultiplySelectPagesDlg(ilToolBar, PageSelectorImageIndex, R.TopLeft, YShift); -end; - -procedure TdxfmPreviewWdxBar.GoToPageClick(Sender: TObject); -begin - case TTagToInt(TComponent(Sender).Tag) of - 0: GoToFirstPage; - 1: GoToPrevPage; - 2: GoToNextPage; - 3: GoToLastPage; - end; -end; - -procedure TdxfmPreviewWdxBar.CloseClick(Sender: TObject); -begin - Close; -end; - -procedure TdxfmPreviewWdxBar.HelpClick(Sender: TObject); -begin - ProcessMessages; - DoInvokeHelp; -end; - -procedure TdxfmPreviewWdxBar.Activate; -begin - inherited; - TimerHint.Enabled := True; -end; - -procedure TdxfmPreviewWdxBar.WndProc(var Message: TMessage); -begin - if Message.Msg = WM_CREATEFOLDER then - begin - ExplorerTree.SelectedItem := ExplorerTree.FocusedItem; - DoExplorerCreateNewFolder; - end - else - inherited; -end; - -procedure TdxfmPreviewWdxBar.AddExplorerContextCommand(ACommand: TCustomdxPSExplorerContextCommand); - - procedure AddBarControl(AnItemLinks: TdxBarItemLinks; ABarButton: TdxBarButton); - begin - with AnItemLinks.Add do - begin - Item := ABarButton; - Index := 0; - BringToTopInRecentList(True); - end; - end; - - procedure BeginGroup(AnItemLinks: TdxBarItemLinks); - begin - if AnItemLinks.Count <> 0 then - AnItemLinks[0].BeginGroup := True; - end; - -var - BarButton: TdxBarButton; -begin - if ACommand is TdxPSExplorerContextCommandSeparator then - begin - BeginGroup(bbExplorer.ItemLinks); - BeginGroup(dxBarManager.BarByCaption(cxGetResourceString(@sdxExplorerBar)).ItemLinks); - BeginGroup(pmExplorer.ItemLinks); - end - else - begin - BarButton := TdxBarButton.Create(Self); - with BarButton do - begin - Glyph := ACommand.Bitmap; - Caption := ACommand.Caption; - Enabled := ACommand.Enabled; - Hint := ACommand.Hint; - ShortCut := ACommand.ShortCut; - Tag := MakeTTag(ACommand); - - Category := dxBarManager.Categories.IndexOf(DropAmpersand(cxGetResourceString(@sdxMenuExplorer))); - OnClick := ExplorerContextCommandClick; - end; - - AddBarControl(bbExplorer.ItemLinks, BarButton); - AddBarControl(dxBarManager.BarByCaption(cxGetResourceString(@sdxExplorerBar)).ItemLinks, BarButton); - AddBarControl(pmExplorer.ItemLinks, BarButton); - ACommand.Data := Integer(BarButton); - - if FExplorerContextCommands.IndexOf(ACommand) = -1 then - FExplorerContextCommands.Add(ACommand); - end; -end; - -procedure TdxfmPreviewWdxBar.ExplorerContextCommandClick(Sender: TObject); -var - Command: TCustomdxPSExplorerContextCommand; - CommandSet2: IdxPSExplorerContextCommands2; -begin - Command := TCustomdxPSExplorerContextCommand(TTagToObj(TdxBarButton(Sender).Tag)); - if Supports(TObject(Explorer), IdxPSExplorerContextCommands2, CommandSet2) then - begin - CommandSet2.InitializeCommand(Command); - try - if Command.Enabled then Command.Execute; {.1} - finally - CommandSet2.FinalizeCommand(Command); - end; - end; - UpdateControls; -end; - -procedure TdxfmPreviewWdxBar.UpdateExplorerContextCommands; -var - I: Integer; -begin - if not (csDestroying in ComponentState) then - for I := 0 to ExplorerContextCommandCount - 1 do - with ExplorerContextCommands[I] do - TdxBarButton(Data).Enabled := Enabled; -end; - -procedure TdxfmPreviewWdxBar.DoAfterPrintReport(AShowDialog: Boolean); -begin - if AShowDialog then - bbFilePrint.Hint := cxGetResourceString(@sdxHintFilePrint) + GetCurrentPrinterAsHint; -end; - -procedure TdxfmPreviewWdxBar.DoPreviewDblClick(APreview: TdxPreview); -begin - ShowHFBar(False); -end; - -procedure TdxfmPreviewWdxBar.DoPreviewZoomFactorChanged(APreview: TdxPreview); -begin - cbxPredefinedZoom.Text := AddPercentageChar(IntToStr(ZoomFactor)); -end; - -procedure TdxfmPreviewWdxBar.DoPreviewZoomModeChanged(APreview: TdxPreview); -begin - cbxPredefinedZoom.Text := AddPercentageChar(IntToStr(ZoomFactor)); -end; - -function TdxfmPreviewWdxBar.GetPreviewCanShowMarginHint(APreview: TdxPreview): Boolean; -begin - Result := ActiveBarControl = nil; -end; - -procedure TdxfmPreviewWdxBar.HFTextEntriesChanged; -begin - if IsAutoHFTextEntriesAvailable then - ReportLink.StyleManager.BuildAutoHFTextEntriesMenu(bliInsertAutoTextEntries, bbInsertEditAutoText, True); -end; - -procedure TdxfmPreviewWdxBar.LoadStrings; -begin - inherited; - with dxBarManager do - begin - Bars[0].Caption := cxGetResourceString(@sdxMenuBar); - Bars[1].Caption := cxGetResourceString(@sdxStandardBar); - Bars[2].Caption := cxGetResourceString(@sdxHeaderFooterBar); - Bars[3].Caption := cxGetResourceString(@sdxShortCutMenusBar); - Bars[4].Caption := cxGetResourceString(@sdxAutoTextBar); - Bars[5].Caption := cxGetResourceString(@sdxExplorerBar); - - Categories[0] := DropAmpersand(cxGetResourceString(@sdxMenuFile)); - Categories[1] := DropAmpersand(cxGetResourceString(@sdxMenuExplorer)); - Categories[2] := DropAmpersand(cxGetResourceString(@sdxMenuEdit)); - Categories[3] := DropAmpersand(cxGetResourceString(@sdxMenuInsert)); - Categories[4] := DropAmpersand(cxGetResourceString(@sdxMenuView)); - Categories[5] := DropAmpersand(cxGetResourceString(@sdxMenuFormat)); - Categories[6] := DropAmpersand(cxGetResourceString(@sdxMenuZoom)); - Categories[7] := DropAmpersand(cxGetResourceString(@sdxMenuTools)); - Categories[8] := DropAmpersand(cxGetResourceString(@sdxMenuGotoPage)); - Categories[9] := DropAmpersand(cxGetResourceString(@sdxMenuHelp)); - Categories[10] := DropAmpersand(cxGetResourceString(@sdxMenuBuiltInMenus)); - Categories[11] := DropAmpersand(cxGetResourceString(@sdxMenuShortCutMenus)); - Categories[12] := DropAmpersand(cxGetResourceString(@sdxMenuNewMenu)); - end; - - bbFile.Caption := cxGetResourceString(@sdxMenuFile); - bbFileSave.Caption := cxGetResourceString(@sdxMenuFileSave); - bbFileLoad.Caption := cxGetResourceString(@sdxMenuFileLoad); - bbFileClose.Caption := cxGetResourceString(@sdxMenuFileClose); - bbFileDesign.Caption := cxGetResourceString(@sdxMenuFileDesign); - bbFilePrintDialog.Caption := cxGetResourceString(@sdxMenuFilePrint); - bbFilePrint.Caption := DropEndEllipsis(cxGetResourceString(@sdxMenuFilePrint)); - bbFileRebuild.Caption := cxGetResourceString(@sdxMenuFileRebuild); -// bbFilePrintSetup.Caption := cxGetResourceString(@sdxMenuFilePrintSetup); - bliPrintStyles.Caption := cxGetResourceString(@sdxMenuPrintStyles); - bbFilePageSetup.Caption := cxGetResourceString(@sdxMenuFilePageSetup); - bbFileExit.Caption := cxGetResourceString(@sdxMenuFileExit); - - bbExplorer.Caption := cxGetResourceString(@sdxMenuExplorer); - bbExplorerCreateNewFolder.Caption := cxGetResourceString(@sdxMenuExplorerCreateFolder); - bbExplorerDelete.Caption := cxGetResourceString(@sdxMenuExplorerDelete); - bbExplorerRename.Caption := cxGetResourceString(@sdxMenuExplorerRename); - bbExplorerProperties.Caption := cxGetResourceString(@sdxMenuExplorerProperties); - - bbEdit.Caption := cxGetResourceString(@sdxMenuEdit); - bbEditFind.Caption := cxGetResourceString(@sdxMenuEditFind); - bbEditFindNext.Caption := cxGetResourceString(@sdxMenuEditFindNext); - bbEditReplace.Caption := cxGetResourceString(@sdxMenuEditReplace); - - bbInsert.Caption := cxGetResourceString(@sdxMenuInsert); - bsiInsertHFAutoText.Caption := cxGetResourceString(@sdxMenuInsertAutoText); - bbInsertEditAutoText.Caption := cxGetResourceString(@sdxMenuInsertEditAutoTextEntries); - bsiInsertAutoText.Caption := cxGetResourceString(@sdxMenuInsertAutoTextEntriesSubItem); - bliInsertAutoTextEntries.Caption := cxGetResourceString(@sdxMenuInsertAutoTextEntries); - bbInsertHFPageNumber.Caption := cxGetResourceString(@sdxMenuInsertPageNumber); - bbInsertHFTotalPages.Caption := cxGetResourceString(@sdxMenuInsertTotalPages); - bbInsertHFPageOfPages.Caption := cxGetResourceString(@sdxMenuInsertPageOfPages); - bbInsertHFDateTime.Caption := cxGetResourceString(@sdxMenuInsertDateTime); - bbInsertHFDate.Caption := cxGetResourceString(@sdxMenuInsertDate); - bbInsertHFTime.Caption := cxGetResourceString(@sdxMenuInsertTime); - bbInsertHFUserName.Caption := cxGetResourceString(@sdxMenuInsertUserName); - bbInsertHFMachineName.Caption := cxGetResourceString(@sdxMenuInsertMachineName); - - bbView.Caption := cxGetResourceString(@sdxMenuView); - bbViewMargins.Caption := cxGetResourceString(@sdxMenuViewMargins); - bbViewMarginBar.Caption := cxGetResourceString(@sdxMenuViewMarginsStatusBar); - bbViewStatusBar.Caption := cxGetResourceString(@sdxMenuViewPagesStatusBar); - bbViewExplorer.Caption := cxGetResourceString(@sdxMenuViewExplorer); - bbViewThumbnails.Caption := cxGetResourceString(@sdxMenuViewThumbnails); - bbThumbnailsSmall.Caption := cxGetResourceString(@sdxMenuThumbnailsSmall); - bbThumbnailsLarge.Caption := cxGetResourceString(@sdxMenuThumbnailsLarge); - bbViewToolbars.Caption := cxGetResourceString(@sdxMenuViewToolBars); - bbViewZoom.Caption := cxGetResourceString(@sdxMenuZoom); - - bbZoomPercent100.Caption := cxGetResourceString(@sdxMenuZoomPercent100); - bbZoomPageWidth.Caption := cxGetResourceString(@sdxMenuZoomPageWidth); - bbZoomWholePage.Caption := cxGetResourceString(@sdxMenuZoomWholePage); - bbZoomTwoPages.Caption := cxGetResourceString(@sdxMenuZoomTwoPages); - bbZoomFourPages.Caption := cxGetResourceString(@sdxMenuZoomFourPages); - bbZoomMultiplePages.Caption := cxGetResourceString(@sdxMenuZoomMultiplyPages); - bbZoomWidenToSourceWidth.Caption := cxGetResourceString(@sdxMenuZoomWidenToSourceWidth); - bbZoomSetup.Caption := cxGetResourceString(@sdxMenuZoomSetup); - bbViewPages.Caption := cxGetResourceString(@sdxMenuPages); - bbViewPageHeaders.Caption := cxGetResourceString(@sdxMenuViewPagesHeaders); - bbViewPageFooters.Caption := cxGetResourceString(@sdxMenuViewPagesFooters); - bbViewSwitchToLeftPart.Caption := cxGetResourceString(@sdxMenuViewSwitchToLeftPart); - bbViewSwitchToRightPart.Caption := cxGetResourceString(@sdxMenuViewSwitchToRightPart); - bbViewSwitchToCenterPart.Caption := cxGetResourceString(@sdxMenuViewSwitchToCenterPart); - bbViewHFSwitchHeaderFooter.Caption := cxGetResourceString(@sdxMenuViewHFSwitchHeaderFooter); - bbViewHFClose.Caption := cxGetResourceString(@sdxMenuViewHFClose); - - bbFormat.Caption := cxGetResourceString(@sdxMenuFormat); - bbFormatTitle.Caption := cxGetResourceString(@sdxMenuFormatTitle); - bbFormatHeaderAndFooter.Caption := cxGetResourceString(@sdxMenuFormatHeaderAndFooter); - bbFormatDateTime.Caption := cxGetResourceString(@sdxMenuFormatDateTime); - bbFormatPageNumbering.Caption := cxGetResourceString(@sdxMenuFormatPageNumbering); - bbFormatPageBackground.Caption := cxGetResourceString(@sdxMenuFormatPageBackground); - bbFormatShrinkToPageWidth.Caption := cxGetResourceString(@sdxMenuFormatShrinkToPage); - bbFormatShowHideEmptyPages.Caption := cxGetResourceString(@sdxMenuShowEmptyPages); - bbFormatHFBackground.Caption := cxGetResourceString(@sdxMenuFormatHFBackground); - bbFormatHFClear.Caption := cxGetResourceString(@sdxMenuFormatHFClear); - - bbGotoPage.Caption := cxGetResourceString(@sdxMenuGotoPage); - bbGotoFirstPage.Caption := cxGetResourceString(@sdxMenuGotoPageFirst); - bbGotoPrevPage.Caption := cxGetResourceString(@sdxMenuGotoPagePrev); - bbGotoNextPage.Caption := cxGetResourceString(@sdxMenuGotoPageNext); - bbGotoLastPage.Caption := cxGetResourceString(@sdxMenuGotoPageLast); - - bbTools.Caption := cxGetResourceString(@sdxMenuTools); - bbToolsCustomize.Caption := cxGetResourceString(@sdxMenuToolsCustomize); - bbToolsOptions.Caption := cxGetResourceString(@sdxMenuToolsOptions); - - bbHelp.Caption := cxGetResourceString(@sdxMenuHelp); - bbHelpTopics.Caption := cxGetResourceString(@sdxMenuHelpTopics); - bbHelpAbout.Caption := cxGetResourceString(@sdxMenuHelpAbout); - - cbxPredefinedZoom.Caption := cxGetResourceString(@sdxMenuZoom) + ':'; - cbxPredefinedZoom.Items[8] := cxGetResourceString(@sdxPageWidth); - cbxPredefinedZoom.Items[9] := cxGetResourceString(@sdxWholePage); - cbxPredefinedZoom.Items[10] := cxGetResourceString(@sdxTwoPages); - cbxPredefinedZoom.Items[11] := cxGetResourceString(@sdxFourPages); - cbxPredefinedZoom.Items[12] := cxGetResourceString(@sdxWidenToSourceWidth); - seActivePage.Caption := cxGetResourceString(@sdxMenuActivePage); - - bsiShortcutPreview.Caption := cxGetResourceString(@sdxMenuShortcutPreview); - bsiShortcutExplorer.Caption := cxGetResourceString(@sdxMenuShortcutExplorer); - bsiShortcutThumbnails.Caption := cxGetResourceString(@sdxMenuShortcutThumbnails); - - bsiNewMenuNewMenu.Caption := cxGetResourceString(@sdxMenuNewMenu); - - { hints } - bbFileDesign.Hint := cxGetResourceString(@sdxHintFileDesign); - bbFileSave.Hint := cxGetResourceString(@sdxHintFileSave); - bbFileLoad.Hint := cxGetResourceString(@sdxHintFileLoad); - bbFileClose.Hint := cxGetResourceString(@sdxHintFileClose); - bbFilePrint.Hint := cxGetResourceString(@sdxHintFilePrint) + dxPSPrVw.GetCurrentPrinterAsHint; - bbFilePrintDialog.Hint := cxGetResourceString(@sdxHintFilePrintDialog); -// bbFilePrintSetup.Hint := cxGetResourceString(@sdxHintFilePrintSetup); - bbFilePageSetup.Hint := cxGetResourceString(@sdxHintFilePageSetup); - bbFileExit.Hint := cxGetResourceString(@sdxHintFileExit); - - bbExplorerCreateNewFolder.Hint := cxGetResourceString(@sdxHintExplorerCreateFolder); - bbExplorerDelete.Hint := cxGetResourceString(@sdxHintExplorerDelete); - bbExplorerRename.Hint := cxGetResourceString(@sdxHintExplorerRename); - bbExplorerProperties.Hint := cxGetResourceString(@sdxHintExplorerProperties); - - bbEditFind.Hint := cxGetResourceString(@sdxHintEditFind); - bbEditFindNext.Hint := cxGetResourceString(@sdxHintEditFindNext); - bbEditReplace.Hint := cxGetResourceString(@sdxHintEditReplace); - - bbInsertEditAutoText.Hint := cxGetResourceString(@sdxHintInsertEditAutoTextEntries); - bbInsertHFPageNumber.Hint := cxGetResourceString(@sdxHintInsertPageNumber); - bbInsertHFTotalPages.Hint := cxGetResourceString(@sdxHintInsertTotalPages); - bbInsertHFPageOfPages.Hint := cxGetResourceString(@sdxHintInsertPageOfPages); - bbInsertHFDateTime.Hint := cxGetResourceString(@sdxHintInsertDateTime); - bbInsertHFDate.Hint := cxGetResourceString(@sdxHintInsertDate); - bbInsertHFTime.Hint := cxGetResourceString(@sdxHintInsertTime); - bbInsertHFUserName.Hint := cxGetResourceString(@sdxHintInsertUserName); - bbInsertHFMachineName.Hint := cxGetResourceString(@sdxHintInsertMachineName); - - bbViewMargins.Hint := cxGetResourceString(@sdxHintViewMargins); - bbViewMarginBar.Hint := cxGetResourceString(@sdxHintViewMarginsStatusBar); - bbViewStatusBar.Hint := cxGetResourceString(@sdxHintViewPagesStatusBar); - bbViewExplorer.Hint := cxGetResourceString(@sdxHintViewExplorer); - bbViewThumbnails.Hint := cxGetResourceString(@sdxHintViewThumbnails); - bbThumbnailsSmall.Hint := cxGetResourceString(@sdxHintThumbnailsSmall); - bbThumbnailsLarge.Hint := cxGetResourceString(@sdxHintThumbnailsLarge); - cbxPredefinedZoom.Hint := cxGetResourceString(@sdxHintViewZoom); - bbZoomPercent100.Hint := cxGetResourceString(@sdxHintZoomPercent100); - bbZoomPageWidth.Hint := cxGetResourceString(@sdxHintZoomPageWidth); - bbZoomWholePage.Hint := cxGetResourceString(@sdxHintZoomWholePage); - bbZoomTwoPages.Hint := cxGetResourceString(@sdxHintZoomTwoPages); - bbZoomFourPages.Hint := cxGetResourceString(@sdxHintZoomFourPages); - bbZoomMultiplePages.Hint := cxGetResourceString(@sdxHintZoomMultiplyPages); - bbZoomWidenToSourceWidth.Hint := cxGetResourceString(@sdxHintZoomWidenToSourceWidth); - bbZoomSetup.Hint := cxGetResourceString(@sdxHintZoomSetup); - bbViewPageHeaders.Hint := cxGetResourceString(@sdxHintViewPagesHeaders); - bbViewPageFooters.Hint := cxGetResourceString(@sdxHintViewPagesFooters); - bbViewSwitchToLeftPart.Hint := cxGetResourceString(@sdxHintViewSwitchToLeftPart); - bbViewSwitchToRightPart.Hint := cxGetResourceString(@sdxHintViewSwitchToRightPart); - bbViewSwitchToCenterPart.Hint := cxGetResourceString(@sdxHintViewSwitchToCenterPart); - bbViewHFSwitchHeaderFooter.Hint := cxGetResourceString(@sdxHintViewHFSwitchHeaderFooter); - bbViewHFClose.Hint := cxGetResourceString(@sdxHintViewHFClose); - - bbFormatTitle.Hint := cxGetResourceString(@sdxHintFormatTitle); - bbFormatDateTime.Hint := cxGetResourceString(@sdxHintFormatDateTime); - bbFormatPageNumbering.Hint := cxGetResourceString(@sdxHintFormatPageNumbering); - bbFormatPageBackground.Hint := cxGetResourceString(@sdxHintFormatPageBackground); - bbFormatShrinkToPageWidth.Hint := cxGetResourceString(@sdxHintFormatShrinkToPage); - bbFormatHFBackground.Hint := cxGetResourceString(@sdxHintFormatHFBackground); - bbFormatHFClear.Hint := cxGetResourceString(@sdxHintFormatHFClear); - - bbGotoFirstPage.Hint := cxGetResourceString(@sdxHintGotoPageFirst); - bbGotoPrevPage.Hint := cxGetResourceString(@sdxHintGotoPagePrev); - bbGotoNextPage.Hint := cxGetResourceString(@sdxHintGotoPageNext); - bbGotoLastPage.Hint := cxGetResourceString(@sdxHintGotoPageLast); - seActivePage.Hint := cxGetResourceString(@sdxHintActivePage); - - bbToolsCustomize.Hint := cxGetResourceString(@sdxHintToolsCustomize); - bbToolsOptions.Hint := cxGetResourceString(@sdxHintToolsOptions); - - bbHelpTopics.Hint := cxGetResourceString(@sdxHintHelpTopics); - bbHelpAbout.Hint := cxGetResourceString(@sdxHintHelpAbout); -end; - -procedure TdxfmPreviewWdxBar.StyleListChanged(Sender: TObject); -begin - if Sender = ReportLink.StyleManager then - ReportLink.BuildPageSetupMenu(bliPrintStyles, bbDefinePrintStyles, True); -end; - -procedure TdxfmPreviewWdxBar.ZoomClick(Sender: TObject); -var - PageXCount, PageYCount: Integer; - ZoomMode: TdxPreviewZoomMode; -begin - case TTagToInt(TComponent(Sender).Tag) of - 0: ZoomMode := pzmNone; - 1: ZoomMode := pzmPageWidth; - else - ZoomMode := pzmPages; - end; - PageXCount := 1; - PageYCount := 1; - if ZoomMode = pzmPages then - case TTagToInt(TComponent(Sender).Tag) of - 3: PageXCount := 2; - 4: - begin - PageXCount := 2; - PageYCount := 2; - end; - 5: ReportLink.GetPageColRowCount(PageXCount, PageYCount); - end; - DoSetupZoomFactor(100, PageXCount, PageYCount, ZoomMode); -end; - -procedure TdxfmPreviewWdxBar.SetBarItemVisibility(Item: TdxBarItem; Value: Boolean); -begin - Item.Visible := VisibleToBarItemVisible(Value); -end; - -procedure TdxfmPreviewWdxBar.DoShowHFToolBar(Value: Boolean); -begin - ShowHFBar(Value); -end; - -procedure TdxfmPreviewWdxBar.seActivePageChange(Sender: TObject); -var - V: Integer; -begin - if Locked then Exit; - V := seActivePage.IntCurValue; - if V < seActivePage.MinValue then V := Round(seActivePage.MinValue); - if V > seActivePage.MaxValue then V := Round(seActivePage.MaxValue); - DoActivePageChanged(V - 1); -end; - -procedure TdxfmPreviewWdxBar.seActivePageButtonClick( - Sender: TdxBarSpinEdit; Button: TdxBarSpinEditButton); -begin - if Locked then Exit; - case Button of - sbUp: - GoToNextPage; - sbDown: - GoToPrevPage; - end; -end; - -procedure TdxfmPreviewWdxBar.cbxPredefinedZoomChange(Sender: TObject); -begin - SetZoomFactorByText(cbxPredefinedZoom.Text); - if cbxPredefinedZoom.DroppedDown then Windows.SetFocus(Preview.Handle); - UpdateControls; - cbxPredefinedZoom.Text := AddPercentageChar(IntToStr(ZoomFactor)); -end; - -procedure TdxfmPreviewWdxBar.dxBarManagerBarVisibleChange(Sender: TdxBarManager; - ABar: TdxBar); -begin - if ABar = HFBar then UpdateHFState(ABar.Visible); -end; - -procedure TdxfmPreviewWdxBar.miCustomizePopupClick(Sender: TObject); -begin - ShowdxBarSubMenuEditor(pmPreview.ItemLinks); -end; - -procedure TdxfmPreviewWdxBar.bbViewHFCloseClick(Sender: TObject); -begin - DoShowHFToolBar(False); -end; - -procedure TdxfmPreviewWdxBar.bbFormatHeaderAndFooterClick(Sender: TObject); -begin - DoShowHFToolBar(TdxBarButton(Sender).Down); -end; - -procedure TdxfmPreviewWdxBar.InsertHFClick(Sender: TObject); -begin - DoInsertHF(HFFunctionList[TTagToInt(TComponent(Sender).Tag)]); -end; - -procedure TdxfmPreviewWdxBar.bbFormatHFClearClick(Sender: TObject); -begin - DoClearHF; -end; - -procedure TdxfmPreviewWdxBar.bbViewHFSwitchHeaderFooterClick(Sender: TObject); -begin - if TdxBarButton(Sender).Down then - State := prsEditFooters - else - State := prsEditHeaders; -end; - -procedure TdxfmPreviewWdxBar.bbFormatDateTimeClick(Sender: TObject); -begin - ProcessMessages; - DoShowFormatDateTimeDlg; -end; - -procedure TdxfmPreviewWdxBar.bbFormatTitleClick(Sender: TObject); -begin - ProcessMessages; - DoFormatTitle; -end; - -procedure TdxfmPreviewWdxBar.bbFormatPageNumbersClick(Sender: TObject); -begin - ProcessMessages; - DoShowFormatPageNumbersDlg; -end; - -procedure TdxfmPreviewWdxBar.SwitchPartClick(Sender: TObject); -begin - HFEditPart := TdxPageTitlePart(TTagToInt(TdxBarButton(Sender).Tag)); -end; - -procedure TdxfmPreviewWdxBar.bbFormatHFBackgroundClick(Sender: TObject); -begin - ProcessMessages; - DoShowHFBackgroundDlg(CalcWindowPos(Sender)); -end; - -procedure TdxfmPreviewWdxBar.bbViewPageHeadersClick(Sender: TObject); -begin - if Locked then Exit; - DoShowPageHeaders(TdxBarButton(Sender).Down); -end; - -procedure TdxfmPreviewWdxBar.bbViewPageFootersClick(Sender: TObject); -begin - if Locked then Exit; - DoShowPageFooters(TdxBarButton(Sender).Down); -end; - -procedure TdxfmPreviewWdxBar.bbToolsCustomizeClick(Sender: TObject); -begin - dxBarManager.Customizing(True); -end; - -procedure TdxfmPreviewWdxBar.bbToolsOptionsClick(Sender: TObject); -begin - DoShowOptionsDlg; -end; - -procedure TdxfmPreviewWdxBar.dxBarManagerShowCustomizingForm(Sender: TObject); -begin - ShowShortCutBar(True); -end; - -procedure TdxfmPreviewWdxBar.dxBarManagerHideCustomizingForm(Sender: TObject); -begin - ShowShortCutBar(False); -end; - -function TdxfmPreviewWdxBar.GetExplorerContextCommand(Index: Integer): TCustomdxPSExplorerContextCommand; -begin - Result := TCustomdxPSExplorerContextCommand(FExplorerContextCommands.Items[Index]); -end; - -function TdxfmPreviewWdxBar.GetExplorerContextCommandCount: Integer; -begin - Result := FExplorerContextCommands.Count; -end; - -function TdxfmPreviewWdxBar.CalcWindowPos(Sender: TObject): TPoint; -var - Link: TdxBarItemLink; - R: TRect; -begin - Link := TdxBarItem(Sender).ClickItemLink; - if (Link <> nil) and (Link.Control <> nil) then - begin - R := Link.ItemRect; - MapWindowPoints(Link.BarControl.Handle, 0, R, 2); - Result.X := R.Left; - Result.Y := R.Bottom; - end - else - Result := Preview.ClientOrigin; -end; - -procedure TdxfmPreviewWdxBar.EnableItemsWhileBuilding(Value: Boolean); -var - Items: TList; - I, J: Integer; -begin - Items := TList.Create; - try - for I := 0 to dxBarManager.Categories.Count - 1 do - begin - dxBarManager.GetItemsByCategory(I, Items); - for J := 0 to Items.Count - 1 do - TdxBarItem(Items[J]).Enabled := Value; - end; - finally - Items.Free; - end; - bbFileExit.Enabled := True; -end; - -procedure TdxfmPreviewWdxBar.DoShowExplorerPopup(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - if Button = mbRight then - pmExplorer.PopupFromCursorPos; -end; - -function TdxfmPreviewWdxBar.ShortcutBar: TdxBar; -begin - Result := dxBarManager.BarByCaption(DropAmpersand(cxGetResourceString(@sdxShortCutMenusBar))); -end; - -procedure TdxfmPreviewWdxBar.ShowShortCutBar(Value: Boolean); -var - Bar: TdxBar; -begin - Bar := ShortcutBar; - if Bar <> nil then - begin - Bar.Hidden := not Value; - Bar.Visible := False; - if Value then - begin - bsiShortcutPreview.ItemLinks := pmPreview.ItemLinks; - bsiShortcutExplorer.ItemLinks := pmExplorer.ItemLinks; - bsiShortcutThumbnails.ItemLinks := pmThumbnails.ItemLinks; - end - else - begin - pmPreview.ItemLinks := bsiShortcutPreview.ItemLinks; - pmExplorer.ItemLinks := bsiShortcutExplorer.ItemLinks; - pmThumbnails.ItemLinks := bsiShortcutThumbnails.ItemLinks; - end; - end; -end; - -procedure TdxfmPreviewWdxBar.EnabledHFItems(Value: Boolean); -begin - bbInsertHFPageNumber.Enabled := Value; - bbInsertHFTotalPages.Enabled := Value; - bbInsertHFPageOfPages.Enabled := Value; - bbInsertHFDate.Enabled := Value; - bbInsertHFTime.Enabled := Value; - bbInsertHFDateTime.Enabled := Value; - bbViewHFSwitchHeaderFooter.Enabled := Value; - bbInsertHFUserName.Enabled := Value; - bbInsertHFMachineName.Enabled := Value; - bbViewHFClose.Enabled := Value; - bbViewSwitchToLeftPart.Enabled := Value; - bbViewSwitchToCenterPart.Enabled := Value; - bbViewSwitchToRightPart.Enabled := Value; - bbFormatHFClear.Enabled := Value; - - bliInsertAutoTextEntries.Enabled := Value; - bbFormatHFBackground.Enabled := Value; -end; - -function TdxfmPreviewWdxBar.HFBar: TdxBar; -begin - Result := dxBarManager.BarByCaption(DropAmpersand(cxGetResourceString(@sdxHeaderFooterBar))); -end; - -procedure TdxfmPreviewWdxBar.ShowHFBar(Value: Boolean); -var - Bar: TdxBar; -begin - Bar := HFBar; - if Bar <> nil then Bar.Visible := Value; -end; - -procedure TdxfmPreviewWdxBar.UpdateHFState(Value: Boolean); -begin - EnabledHFItems(Value); - if Preview <> nil then - if Value then - Preview.OptionsZoom := Preview.OptionsZoom - [pozZoomOnClick] - else - Preview.OptionsZoom := Preview.OptionsZoom + [pozZoomOnClick]; - bbFormatHeaderAndFooter.Down := Value; - - if Value then - if bbViewHFSwitchHeaderFooter.Down then - State := prsEditFooters - else - State := prsEditHeaders - else - State := prsNone; -end; - -procedure TdxfmPreviewWdxBar.LoadBarManagerFromRegistry(const APath: string); -var - IsSameVersion: Boolean; -begin - with TRegistry.Create do - try - IsSameVersion := OpenKey(APath + '\Version', False); - if IsSameVersion then - try - IsSameVersion := ValueExists('Major') and ValueExists('Minor'); - if IsSameVersion then - IsSameVersion := (ReadInteger('Major') = dxPSVerMajor) and - (ReadInteger('Minor') = dxPSVerMinor); - except - on ERegistryException do - IsSameVersion := False - else - raise; - end; - finally - Free; - end; - - if IsSameVersion then - begin - dxBarManager.LoadFromRegistry(APath + sdxToolBars); - pmPreview.ItemLinks := bsiShortcutPreview.ItemLinks; - pmExplorer.ItemLinks := bsiShortcutExplorer.ItemLinks; - pmThumbnails.ItemLinks := bsiShortcutThumbnails.ItemLinks; - end - else - begin - bsiShortcutPreview.ItemLinks := pmPreview.ItemLinks; - bsiShortcutExplorer.ItemLinks := pmExplorer.ItemLinks; - bsiShortcutThumbnails.ItemLinks := pmThumbnails.ItemLinks; - end; -end; - -procedure TdxfmPreviewWdxBar.SaveBarManagerToRegistry(const APath: string); -begin - with TRegistry.Create do - try - if OpenKey(APath + '\Version', True) then - try - WriteInteger('Major', dxPSVerMajor); - WriteInteger('Minor', dxPSVerMinor); - except - on ERegistryException do - else - raise; - end; - finally - Free; - end; - dxBarManager.SaveToRegistry(APath + sdxToolBars); -end; - -procedure TdxfmPreviewWdxBar.TimerHintTimer(Sender: TObject); -begin - bbFilePrint.Hint := cxGetResourceString(@sdxHintFilePrint) + GetCurrentPrinterAsHint; - TTimer(Sender).Enabled := False; -end; - -initialization - dxPSPopupMenuController.RegisterBuilder(TdxBarPSPopupMenuBuilder); - dxPSAutoHFTextMenuBuilderFactory.RegisterBuilder(TdxBarPSAutoHFTextMenuBuilder); - dxPSPageSetupMenuBuilderFactory.RegisterBuilder(TdxBarPSPageSetupMenuBuilder); - - dxPSRegisterPreviewWindow(TdxfmPreviewWdxBar); - - dxPSGlbl.PSCanShowHintFunc := dxBar_DoesNotHaveActivePopup; - -finalization - dxPSGlbl.PSCanShowHintFunc := nil; - - dxPSUnregisterPreviewWindow(TdxfmPreviewWdxBar); - - dxPSPageSetupMenuBuilderFactory.UnregisterBuilder(TdxBarPSPageSetupMenuBuilder); - dxPSAutoHFTextMenuBuilderFactory.UnregisterBuilder(TdxBarPSAutoHFTextMenuBuilder); - dxPSPopupMenuController.UnregisterBuilder(TdxBarPSPopupMenuBuilder); - -end. - - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwDsg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwDsg.pas deleted file mode 100644 index aff8d735..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwDsg.pas +++ /dev/null @@ -1,102 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSPrVwDsg; - -interface - -{$I cxVer.inc} - -uses - {$IFDEF DELPHI6} - DesignIntf, - {$ELSE} - DsgnIntf, - {$ENDIF} - dxPSDsgProxies, dxPSCore; - -procedure dxShowPreviewWindow(AComponentPrinter: TCustomdxComponentPrinter; - AFormDesigner: TFormDesigner); - -implementation - -type - TdxPreviewWindowDesigner = class(TAbstractdxPreviewWindowDesigner) - private - FFormDesigner: TFormDesigner; - protected - procedure Activate; override; - procedure Modified; override; - public - constructor Create(AComponentPrinter: TCustomdxComponentPrinter; AFormDesigner: TFormDesigner); - destructor Destroy; override; - end; - -procedure dxShowPreviewWindow(AComponentPrinter: TCustomdxComponentPrinter; - AFormDesigner: TFormDesigner); -begin - if AComponentPrinter.PreviewWindowDesigner = nil then - TdxPreviewWindowDesigner.Create(AComponentPrinter, AFormDesigner); - TdxPreviewWindowDesigner(AComponentPrinter.PreviewWindowDesigner).Activate; -end; - -{ TdxPreviewWindowDesigner } - -constructor TdxPreviewWindowDesigner.Create(AComponentPrinter: TCustomdxComponentPrinter; - AFormDesigner: TFormDesigner); -begin - inherited Create(AComponentPrinter); - FFormDesigner := AFormDesigner; -end; - -destructor TdxPreviewWindowDesigner.Destroy; -begin - FFormDesigner := nil; - inherited; -end; - -procedure TdxPreviewWindowDesigner.Activate; -begin - ComponentPrinter.Preview(True, nil); - Modified; -end; - -procedure TdxPreviewWindowDesigner.Modified; -begin - if FFormDesigner <> nil then FFormDesigner.Modified; -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwOpt.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwOpt.dfm deleted file mode 100644 index 1cb0cfaa..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwOpt.dfm +++ /dev/null @@ -1,177 +0,0 @@ -object dxfmOptions: TdxfmOptions - Left = 310 - Top = 187 - ActiveControl = chbxShowMargins - BorderStyle = bsDialog - Caption = 'Preferences' - ClientHeight = 247 - ClientWidth = 536 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 5 - Top = 4 - Width = 526 - Height = 207 - ActivePage = tshGeneral - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - TabStop = False - object tshGeneral: TTabSheet - Caption = 'General' - object gbxShow: TGroupBox - Left = 6 - Top = 4 - Width = 250 - Height = 104 - Caption = ' &Show ' - TabOrder = 0 - object chbxShowMargins: TCheckBox - Left = 10 - Top = 22 - Width = 230 - Height = 17 - Caption = '&Margins' - TabOrder = 0 - OnClick = FormChanged - end - object chbxShowMarginsHints: TCheckBox - Left = 10 - Top = 49 - Width = 230 - Height = 17 - Caption = 'Margins &hints' - TabOrder = 1 - OnClick = FormChanged - end - object chbxShowMarginsHintsWhileDragging: TCheckBox - Left = 10 - Top = 75 - Width = 230 - Height = 17 - Caption = 'Margins hints while &dragging' - TabOrder = 2 - OnClick = FormChanged - end - end - object gbxMeasurementUnits: TGroupBox - Left = 6 - Top = 109 - Width = 250 - Height = 61 - TabOrder = 2 - object lblMeasurementUnits: TLabel - Left = 8 - Top = 12 - Width = 95 - Height = 13 - Caption = '&Measurement units:' - FocusControl = cbxMeasurementUnits - OnClick = lblMeasurementUnitsClick - end - object cbxMeasurementUnits: TComboBox - Left = 8 - Top = 28 - Width = 232 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 0 - OnChange = FormChanged - Items.Strings = ( - 'Default' - 'Inches' - 'Millimeters') - end - end - object gbxMarginsColor: TGroupBox - Left = 261 - Top = 109 - Width = 250 - Height = 61 - TabOrder = 3 - object lblMarginsColor: TLabel - Left = 8 - Top = 12 - Width = 67 - Height = 13 - Caption = '&Margins color:' - OnClick = lblMarginsColorClick - end - object bvlMarginColorHolder: TBevel - Left = 8 - Top = 28 - Width = 231 - Height = 21 - Visible = False - end - end - object gbxZoomOpt: TGroupBox - Left = 261 - Top = 4 - Width = 250 - Height = 104 - TabOrder = 1 - object lblZoomStep: TLabel - Left = 10 - Top = 54 - Width = 58 - Height = 13 - Caption = 'Zoom &Step :' - OnClick = lblZoomStepClick - end - object bvlZoomStepHolder: TBevel - Left = 103 - Top = 50 - Width = 67 - Height = 21 - Visible = False - end - object chbxZoomOnRoll: TCheckBox - Left = 10 - Top = 22 - Width = 230 - Height = 17 - Caption = '&Zoom on roll with IntelliMouse' - TabOrder = 0 - OnClick = FormChanged - end - end - end - end - object btnOk: TButton - Left = 294 - Top = 218 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 375 - Top = 218 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 456 - Top = 218 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Help' - TabOrder = 3 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwOpt.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwOpt.pas deleted file mode 100644 index 93de0dd2..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwOpt.pas +++ /dev/null @@ -1,273 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSPrVwOpt; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, ExtCtrls, ComCtrls, dxPreVw, dxPSForm, dxPrnPg; - -type - PdxPreviewOptionsDlgData = ^TdxPreviewOptionsDlgData; - TdxPreviewOptionsDlgData = record - MarginColor: TColor; - MeasurementUnits: TdxMeasurementUnits; - ShowMarginsHintWhileDragging: Boolean; - ShowMarginHints: Boolean; - ShowMargins: Boolean; - ZoomOnMouseRoll: Boolean; - ZoomStep: Integer; - end; - - TdxfmOptions = class(TCustomdxPSForm) - PageControl1: TPageControl; - tshGeneral: TTabSheet; - gbxShow: TGroupBox; - gbxMeasurementUnits: TGroupBox; - lblMeasurementUnits: TLabel; - cbxMeasurementUnits: TComboBox; - chbxShowMargins: TCheckBox; - chbxShowMarginsHints: TCheckBox; - chbxShowMarginsHintsWhileDragging: TCheckBox; - gbxMarginsColor: TGroupBox; - lblMarginsColor: TLabel; - btnOk: TButton; - btnCancel: TButton; - btnHelp: TButton; - bvlMarginColorHolder: TBevel; - gbxZoomOpt: TGroupBox; - chbxZoomOnRoll: TCheckBox; - lblZoomStep: TLabel; - bvlZoomStepHolder: TBevel; - procedure FormChanged(Sender: TObject); - procedure lblMeasurementUnitsClick(Sender: TObject); - procedure lblMarginsColorClick(Sender: TObject); - procedure lblZoomStepClick(Sender: TObject); - private - FControlsUpdating: Boolean; - FData: TdxPreviewOptionsDlgData; - FModified: Boolean; - FccbxColor: TCustomComboBox; - FseZoomStep: TCustomEdit; - procedure CheckModified; - procedure CreateControls; - procedure LoadStrings; - procedure StartSettings; - procedure UpdateControlsState; - public - constructor Create(AOwner: TComponent); override; - function Execute: Boolean; - end; - -function dxShowPSPreviewOptionsDlg(var AData: TdxPreviewOptionsDlgData): Boolean; - -implementation - -{$R *.DFM} - -uses - cxClasses, dxExtCtrls, dxPSGlbl, dxPSRes, dxPSUtl; - -function dxShowPSPreviewOptionsDlg(var AData: TdxPreviewOptionsDlgData): Boolean; -var - Dialog: TdxfmOptions; -begin - Dialog := TdxfmOptions.Create(nil); - try - Dialog.FData := AData; - Result := Dialog.Execute; - if Result then - AData := Dialog.FData; - finally - Dialog.Free; - end; -end; - -{ TdxfmOptions } - -constructor TdxfmOptions.Create(AOwner: TComponent); -begin - inherited; - HelpContext := dxPSGlbl.dxhcPreviewPreferencesDlg; - CreateControls; - LoadStrings; -end; - -procedure TdxfmOptions.LoadStrings; -begin - Caption := cxGetResourceString(@sdxPreferenceDlgCaption); - gbxShow.Caption := cxGetResourceString(@sdxPreferenceDlgShow); - tshGeneral.Caption := dxPSUtl.DropAmpersand(cxGetResourceString(@sdxPreferenceDlgTab1)); - lblMeasurementUnits.Caption := cxGetResourceString(@sdxPreferenceDlgMeasurementUnits); - with cbxMeasurementUnits.Items do - begin - BeginUpdate; - try - Clear; - Add(cxGetResourceString(@sdxUnitsDefaultName)); - Add(cxGetResourceString(@sdxUnitsInchesName)); - Add(cxGetResourceString(@sdxUnitsMillimetersName)); - finally - EndUpdate; - end; - end; - chbxShowMargins.Caption := cxGetResourceString(@sdxPreferenceDlgMargins); - chbxShowMarginsHints.Caption := cxGetResourceString(@sdxPreferenceDlgMarginsHints); - chbxShowMarginsHintsWhileDragging.Caption := cxGetResourceString(@sdxPreferenceDlgMargingWhileDragging); - lblMarginsColor.Caption := cxGetResourceString(@sdxPreferenceDlgMarginsColor); - - gbxZoomOpt.Caption := cxGetResourceString(@sdxZoomParameters); - chbxZoomOnRoll.Caption := cxGetResourceString(@sdxPreferenceDlgZoomScroll); - lblZoomStep.Caption := cxGetResourceString(@sdxPreferenceDlgZoomStep); - - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); -end; - -procedure TdxfmOptions.CheckModified; -begin - FModified := True; - UpdateControlsState; -end; - -procedure TdxfmOptions.UpdateControlsState; -begin -// btnOk.Enabled := FModified; - chbxZoomOnRoll.Enabled := dxPSUtl.IsIntelliMousePresent; -end; - -procedure TdxfmOptions.StartSettings; -begin - FModified := False; - FControlsUpdating := True; - try - chbxShowMargins.Checked := FData.ShowMargins; - chbxShowMarginsHints.Checked := FData.ShowMarginHints; - chbxShowMarginsHintsWhileDragging.Checked := FData.ShowMarginsHintWhileDragging; - chbxZoomOnRoll.Checked := FData.ZoomOnMouseRoll; - - cbxMeasurementUnits.ItemIndex := Integer(FData.MeasurementUnits); - TdxPSColorCombo(FccbxColor).ColorValue := FData.MarginColor; - TdxPSSpinEdit(FseZoomStep).Value := FData.ZoomStep; - - btnHelp.Visible := HelpContext <> 0; - if HelpContext = 0 then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - end; - finally - FControlsUpdating := False; - end; - UpdateControlsState; -end; - -procedure TdxfmOptions.CreateControls; -begin - FccbxColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(FccbxColor) do - begin - Parent := gbxMarginsColor; - BoundsRect := bvlMarginColorHolder.BoundsRect; - ShowColorName := True; - ColorTypes := [ctPure]; - ShowAutoColor := True; - AutoColor := clWindowText; - ShowCustomColor := False; - OnChange := FormChanged; - end; - lblMarginsColor.FocusControl := FccbxColor; - - FseZoomStep := TdxPSSpinEdit.Create(Self); - with TdxPSSpinEdit(FseZoomStep) do - begin - Parent := gbxZoomOpt; - BoundsRect := bvlZoomStepHolder.BoundsRect; - MaxValue := 20; - MinValue := 1; - DefaultValue := Value; - LegendText := PercentSymbol; - OnChange := FormChanged; - end; - lblZoomStep.FocusControl := FseZoomStep; -end; - -function TdxfmOptions.Execute: Boolean; -begin - StartSettings; - Result := (ShowModal = mrOk) and FModified; - - if Result then - begin - FData.MeasurementUnits := TdxMeasurementUnits(cbxMeasurementUnits.ItemIndex); - FData.MarginColor := TdxPSColorCombo(FccbxColor).ColorValue; - FData.ZoomStep := TdxPSSpinEdit(FseZoomStep).AsInteger; - - FData.ShowMargins := chbxShowMargins.Checked; - FData.ShowMarginHints := chbxShowMarginsHints.Checked; - FData.ShowMarginsHintWhileDragging := chbxShowMarginsHintsWhileDragging.Checked; - FData.ZoomOnMouseRoll := chbxZoomOnRoll.Checked; - end; -end; - -procedure TdxfmOptions.FormChanged(Sender: TObject); -begin - if FControlsUpdating then Exit; - CheckModified; -end; - -procedure TdxfmOptions.lblMeasurementUnitsClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxfmOptions.lblMarginsColorClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TCustomComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxfmOptions.lblZoomStepClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwStd.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwStd.dfm deleted file mode 100644 index 94729782..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwStd.dfm +++ /dev/null @@ -1,2326 +0,0 @@ -object dxfmStdPreview: TdxfmStdPreview - Left = 260 - Top = 90 - Width = 1004 - Height = 492 - Caption = 'Preview' - Color = clBtnFace - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000FFFFFFFFFF000000FFFFFFF000070000FFF - FFF0788707000FFFFF0788E770000FFFFF08888780000FFFFF08E88780000FFF - FF07EE8770000FFFFFF0788700000FFFFFFF000000000FFFFFFFFFF000000FFF - FFFF000000000FFFFFFF080000000FFFFFFF000000000000000000000000FFFF - 0000000C00000008000000010000000300000003000000030000000300000003 - 000000070000000F0000000F0000000F0000001F0000003F0000007F0000} - KeyPreview = True - Menu = MainMenu1 - OldCreateOrder = True - Position = poDefault - PixelsPerInch = 96 - TextHeight = 13 - object ToolBar: TToolBar - Left = 0 - Top = 0 - Width = 996 - Height = 36 - AutoSize = True - BorderWidth = 2 - ButtonHeight = 24 - ButtonWidth = 28 - EdgeBorders = [ebTop, ebBottom] - Flat = True - Images = ilToolBarSmall - Indent = 4 - ParentShowHint = False - PopupMenu = pmToolBar - ShowHint = True - TabOrder = 0 - Wrapable = False - object tbReportDesigner: TToolButton - Left = 4 - Top = 0 - Hint = 'Ctrl+D' - Caption = 'Design' - ImageIndex = 0 - OnClick = DesignClick - end - object tbFileLoad: TToolButton - Left = 32 - Top = 0 - Hint = 'Ctrl+O' - Caption = 'tbFileLoad' - ImageIndex = 23 - OnClick = FileLoadClick - end - object tbFileUnload: TToolButton - Left = 60 - Top = 0 - Caption = 'tbFileUnload' - ImageIndex = 24 - OnClick = FileCloseClick - end - object tbFileSave: TToolButton - Left = 88 - Top = 0 - Hint = 'Ctrl+S' - Caption = 'tbFileSave' - ImageIndex = 19 - OnClick = FileSaveClick - end - object tbSeparator1: TToolButton - Left = 116 - Top = 0 - Width = 8 - Caption = 'tbSeparator1' - ImageIndex = 0 - Style = tbsSeparator - end - object tbPrint: TToolButton - Left = 124 - Top = 0 - Caption = 'Print' - ImageIndex = 1 - OnClick = PrintClick - end - object tbPrintDialog: TToolButton - Tag = 1 - Left = 152 - Top = 0 - Hint = 'Ctrl+P' - Caption = 'PrintDialog' - ImageIndex = 2 - OnClick = PrintClick - end - object tbPageSetup: TToolButton - Tag = 2 - Left = 180 - Top = 0 - Caption = 'PageSetup' - DropdownMenu = pmPrintStyles - ImageIndex = 3 - Style = tbsDropDown - OnClick = PageSetupClick - end - object tbSeparator3: TToolButton - Left = 221 - Top = 0 - Width = 8 - Caption = 'tbSeparator3' - ImageIndex = 0 - Style = tbsSeparator - end - object tbViewExplorer: TToolButton - Left = 229 - Top = 0 - Caption = 'tbViewExplorer' - ImageIndex = 30 - Style = tbsCheck - OnClick = ViewExplorerClick - end - object tbViewThumbnails: TToolButton - Left = 257 - Top = 0 - Caption = 'tbViewThumbnails' - ImageIndex = 31 - Style = tbsCheck - OnClick = ViewThumbnailsClick - end - object tbSeparator2: TToolButton - Left = 285 - Top = 0 - Width = 8 - Caption = 'tbSeparator2' - ImageIndex = 0 - Style = tbsSeparator - end - object tbShrinkToPageWidth: TToolButton - Left = 293 - Top = 0 - AllowAllUp = True - Caption = 'tbShrinkToPageWidth' - Grouped = True - ImageIndex = 12 - OnClick = ShrinkToPageWidthClick - end - object tbPageBackground: TToolButton - Left = 321 - Top = 0 - Hint = 'Ctrl+K' - Caption = 'PageBackground' - ImageIndex = 4 - OnClick = PageBackgroundClick - end - object ToolButton5: TToolButton - Left = 349 - Top = 0 - Width = 8 - Caption = 'ToolButton5' - ImageIndex = 19 - Style = tbsSeparator - end - object tbPercent100: TToolButton - Left = 357 - Top = 0 - Hint = 'Ctrl+\' - Caption = '100 percent' - ImageIndex = 5 - OnClick = ZoomClick - end - object tbPageWidth: TToolButton - Tag = 1 - Left = 385 - Top = 0 - Hint = 'Ctrl+0' - Caption = 'Page Width' - ImageIndex = 6 - OnClick = ZoomClick - end - object tbOnePage: TToolButton - Tag = 2 - Left = 413 - Top = 0 - Hint = 'Ctrl+1' - Caption = 'Whole Page' - ImageIndex = 7 - OnClick = ZoomClick - end - object tbTwoPage: TToolButton - Tag = 3 - Left = 441 - Top = 0 - Hint = 'Ctrl+2' - Caption = 'Two Pages' - ImageIndex = 8 - OnClick = ZoomClick - end - object tbFourPage: TToolButton - Tag = 4 - Left = 469 - Top = 0 - Hint = 'Ctrl+4' - Caption = 'Four Pages' - ImageIndex = 9 - OnClick = ZoomClick - end - object tbMultiplePages: TToolButton - Left = 497 - Top = 0 - Caption = 'tbMultiplePages' - ImageIndex = 10 - OnClick = tbMultiplePagesClick - end - object tbWidenToSourceWidth: TToolButton - Tag = 5 - Left = 525 - Top = 0 - Hint = 'Ctrl+W' - Caption = 'Source Width' - ImageIndex = 11 - OnClick = ZoomClick - end - object tbSeparator4: TToolButton - Left = 553 - Top = 0 - Width = 8 - Caption = 'tbSeparator4' - ImageIndex = 18 - Style = tbsSeparator - end - object pnlZoomCbx: TPanel - Left = 561 - Top = 0 - Width = 138 - Height = 24 - BevelOuter = bvNone - TabOrder = 0 - OnResize = pnlZoomCbxResize - end - object tbSeparator5: TToolButton - Left = 699 - Top = 0 - Width = 8 - Caption = 'tbSeparator5' - ImageIndex = 19 - Style = tbsSeparator - end - object tbGotoFirstPage: TToolButton - Left = 707 - Top = 0 - Caption = 'First Page' - ImageIndex = 13 - OnClick = GoToPageClick - end - object tbGotoPrevPage: TToolButton - Tag = 1 - Left = 735 - Top = 0 - Caption = 'Prev Page' - ImageIndex = 14 - OnClick = GoToPageClick - end - object ToolButton2: TToolButton - Left = 763 - Top = 0 - Width = 8 - Caption = 'ToolButton2' - ImageIndex = 20 - Style = tbsSeparator - end - object pnlCurrentPage: TPanel - Left = 771 - Top = 0 - Width = 59 - Height = 24 - BevelOuter = bvNone - TabOrder = 1 - OnResize = pnlCurrentPageResize - end - object ToolButton1: TToolButton - Left = 830 - Top = 0 - Width = 8 - Caption = 'ToolButton1' - ImageIndex = 19 - Style = tbsSeparator - end - object tbGotoNextPage: TToolButton - Tag = 2 - Left = 838 - Top = 0 - Caption = 'Next Page' - ImageIndex = 15 - OnClick = GoToPageClick - end - object tbGotoLastPage: TToolButton - Tag = 3 - Left = 866 - Top = 0 - Caption = 'Last Page' - ImageIndex = 16 - OnClick = GoToPageClick - end - object tbSeparator8: TToolButton - Left = 894 - Top = 0 - Width = 8 - Caption = 'tbSeparator8' - ImageIndex = 0 - Style = tbsSeparator - end - object tbHelp: TToolButton - Left = 902 - Top = 0 - Hint = 'F1' - Caption = 'Help' - ImageIndex = 17 - OnClick = HelpClick - end - object tbClose: TToolButton - Left = 930 - Top = 0 - Caption = 'Close' - ImageIndex = 18 - OnClick = CloseClick - end - end - object pmToolBar: TPopupMenu - OnPopup = pmToolBarPopup - Left = 47 - Top = 56 - object pmiFlatBtns: TMenuItem - Caption = '&Flat Buttons' - Checked = True - GroupIndex = 2 - OnClick = pmiFlatBtnsClick - end - object pmiLargeBtns: TMenuItem - Caption = '&Large Buttons' - Checked = True - GroupIndex = 2 - OnClick = pmiLargeBtnsClick - end - end - object MainMenu1: TMainMenu - Left = 19 - Top = 56 - object miFile: TMenuItem - Caption = '&File' - object miFileDesign: TMenuItem - Caption = '&Design...' - ShortCut = 16452 - OnClick = DesignClick - end - object miFileRebuild: TMenuItem - Caption = 'Rebuild' - ShortCut = 16500 - OnClick = miFileRebuildClick - end - object miLine32: TMenuItem - Caption = '-' - end - object miFileLoad: TMenuItem - Caption = 'Load...' - ShortCut = 16463 - OnClick = FileLoadClick - end - object miFileClose: TMenuItem - Caption = 'Unload' - ShortCut = 16499 - OnClick = FileCloseClick - end - object miLine30: TMenuItem - Caption = '-' - end - object miFileSave: TMenuItem - Caption = '&Save...' - ShortCut = 16467 - OnClick = FileSaveClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miFilePrint: TMenuItem - Tag = 1 - Caption = '&Print...' - ShortCut = 16464 - OnClick = PrintClick - end - object miFilePageSetup: TMenuItem - Tag = 2 - Caption = 'Page Set&up...' - OnClick = PageSetupClick - end - object miFilePrintStyles: TMenuItem - Caption = 'Print Styles' - end - object miLine3: TMenuItem - Caption = '-' - end - object miFilePreferences: TMenuItem - Caption = 'Pre&ferences...' - OnClick = OptionsClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miFileExit: TMenuItem - Caption = '&Close' - OnClick = CloseClick - end - end - object miExplorer: TMenuItem - Caption = 'E&xplorer' - object miExplorerCreateNewFolder: TMenuItem - Caption = 'New &Folder' - ShortCut = 32821 - OnClick = ExplorerCreateNewFolderClick - end - object miLine31: TMenuItem - Caption = '-' - end - object miExplorerDelete: TMenuItem - Caption = '&Delete...' - ShortCut = 46 - OnClick = ExplorerDeleteClick - end - object miExplorerRename: TMenuItem - Caption = '&Rename' - ShortCut = 113 - OnClick = ExplorerRenameClick - end - object miLine39: TMenuItem - Caption = '-' - end - object miExplorerProperties: TMenuItem - Caption = 'P&roperties...' - ShortCut = 32889 - OnClick = ExplorerPropertiesClick - end - end - object miEdit: TMenuItem - Caption = '&Edit' - Visible = False - object miEditFind: TMenuItem - Caption = '&Find ...' - ShortCut = 16454 - end - object miEditFindNext: TMenuItem - Caption = 'Find Ne&xt' - ShortCut = 114 - end - object N6: TMenuItem - Caption = '-' - end - object miEditReplace: TMenuItem - Caption = '&Replace ...' - ShortCut = 16466 - end - end - object miView: TMenuItem - Caption = '&View' - object miViewMargins: TMenuItem - Caption = '&Margins' - Checked = True - ShortCut = 16461 - OnClick = miViewMarginsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miViewFlatTBtns: TMenuItem - Caption = '&Flat toolbar buttons' - Checked = True - OnClick = pmiFlatBtnsClick - end - object miViewLargeTBtns: TMenuItem - Caption = '&Large toolbar buttons' - Checked = True - OnClick = pmiLargeBtnsClick - end - object miLine5: TMenuItem - Caption = '-' - end - object miViewToolBar: TMenuItem - Caption = '&Toolbar' - Checked = True - Visible = False - end - object miViewMarginBar: TMenuItem - Caption = '&MarginBar' - Checked = True - OnClick = miViewMarginBarClick - end - object miViewStatusBar: TMenuItem - Caption = '&StatusBar' - Checked = True - OnClick = miViewStatusBarClick - end - object miViewExplorer: TMenuItem - Caption = 'E&xplorer' - ShortCut = 16472 - OnClick = ViewExplorerClick - end - object miViewThumbnails: TMenuItem - Caption = 'Th&umbnails' - ShortCut = 16469 - OnClick = ViewThumbnailsClick - end - object N1: TMenuItem - Caption = '-' - end - object miViewZoom: TMenuItem - Caption = '&Zoom' - object miZoomPercent100: TMenuItem - Caption = '&Percent 100' - ShortCut = 16604 - OnClick = ZoomClick - end - object miLine6: TMenuItem - Caption = '-' - end - object miZoomPageWidth: TMenuItem - Tag = 1 - Caption = 'Page &Width' - ShortCut = 16432 - OnClick = ZoomClick - end - object miZoomWholePage: TMenuItem - Tag = 2 - Caption = 'W&hole Page' - ShortCut = 16433 - OnClick = ZoomClick - end - object miZoomTwoPages: TMenuItem - Tag = 3 - Caption = '&Two Pages' - ShortCut = 16434 - OnClick = ZoomClick - end - object miZoomFourPages: TMenuItem - Tag = 4 - Caption = '&Four Pages ' - ShortCut = 16436 - OnClick = ZoomClick - end - object miLine7: TMenuItem - Caption = '-' - end - object miZoomWidenToSourceWidth: TMenuItem - Tag = 5 - Caption = '&Widen to source width' - ShortCut = 16471 - OnClick = ZoomClick - end - object miLine20: TMenuItem - Caption = '-' - end - object miZoomSetup: TMenuItem - Caption = '&Setup ...' - OnClick = miZoomSetupClick - end - end - object N5: TMenuItem - Caption = '-' - end - object miViewPageHeaders: TMenuItem - Caption = 'Page &Headers' - Checked = True - OnClick = miViewPageHeadersClick - end - object miViewPageFooters: TMenuItem - Caption = '&Page Footers' - Checked = True - OnClick = miViewPageFootersClick - end - end - object miFormat: TMenuItem - Caption = '&Format' - object miFormatAutoText: TMenuItem - Caption = '&AutoText...' - OnClick = miFormatAutoTextClick - end - object miLine14: TMenuItem - Caption = '-' - end - object miFormatTitle: TMenuItem - Caption = 'Title...' - OnClick = miFormatTitleClick - end - object N7: TMenuItem - Caption = '-' - Hint = 'miLine38' - end - object miFormatDateTime: TMenuItem - Caption = 'Date And &Time ...' - OnClick = miFormatDateTimeClick - end - object miFormatPageNumbering: TMenuItem - Caption = 'Page &Numbering ...' - OnClick = miFormatPageNumberingClick - end - object N4: TMenuItem - Caption = '-' - end - object miFormatShowHideEmptyPages: TMenuItem - Caption = 'Show/Hide Empty Pages' - Checked = True - OnClick = miFormatShowHideEmptyPagesClick - end - object miFormatShrinkToPageWidth: TMenuItem - Caption = '&Shrink To Page' - Checked = True - OnClick = ShrinkToPageWidthClick - end - object miLine13: TMenuItem - Caption = '-' - end - object miFormatPageBackground: TMenuItem - Caption = 'Page bac&kground ...' - ShortCut = 16459 - OnClick = PageBackgroundClick - end - end - object miGoToPage: TMenuItem - Caption = '&Go' - object miGoToFirstPage: TMenuItem - Caption = '&First Page' - ShortCut = 36 - OnClick = GoToPageClick - end - object miGoToPrevPage: TMenuItem - Tag = 1 - Caption = '&Previous Page' - ShortCut = 33 - OnClick = GoToPageClick - end - object miLine8: TMenuItem - Caption = '-' - end - object miGoToNextPage: TMenuItem - Tag = 2 - Caption = '&Next Page' - ShortCut = 34 - OnClick = GoToPageClick - end - object miGoToLastPage: TMenuItem - Tag = 3 - Caption = '&Last Page' - ShortCut = 35 - OnClick = GoToPageClick - end - end - object miHelp: TMenuItem - Caption = '&Help' - object miHelpTopics: TMenuItem - Caption = '&Help Topics ...' - OnClick = HelpClick - end - object N3: TMenuItem - Caption = '-' - Visible = False - end - object miHelpAbout: TMenuItem - Caption = '&About ..' - Visible = False - end - end - end - object pmPreview: TPopupMenu - OnPopup = pmPreviewPopup - Left = 75 - Top = 56 - object pmiReportDesign: TMenuItem - Caption = '&Design ...' - Default = True - ShortCut = 16452 - OnClick = DesignClick - end - object miLine11: TMenuItem - Caption = '-' - end - object pmiPageSetup: TMenuItem - Caption = 'Page Set&up ...' - OnClick = PageSetupClick - end - object pmiFilePrintStyles: TMenuItem - Caption = 'Print Styles' - end - object pmiReportShrinkToPageWidth: TMenuItem - Caption = '&Shrink To Page' - Checked = True - OnClick = ShrinkToPageWidthClick - end - object miLine10: TMenuItem - Caption = '-' - end - object pmiZoom: TMenuItem - Caption = '&Zoom ' - object pmiZoomPercent100: TMenuItem - Caption = '&Percent 100' - ShortCut = 16604 - OnClick = ZoomClick - end - object miLine12: TMenuItem - Caption = '-' - end - object pmiZoomPageWidth: TMenuItem - Tag = 1 - Caption = 'Page &Width' - ShortCut = 16432 - OnClick = ZoomClick - end - object pmiZoomWholePage: TMenuItem - Tag = 2 - Caption = 'W&hole Page' - ShortCut = 16433 - OnClick = ZoomClick - end - object pmiZoomTwoPages: TMenuItem - Tag = 3 - Caption = '&Two Pages' - ShortCut = 16434 - OnClick = ZoomClick - end - object pmiZoomFourPages: TMenuItem - Tag = 4 - Caption = '&Four Pages' - ShortCut = 16436 - OnClick = ZoomClick - end - object miLine9: TMenuItem - Caption = '-' - end - object pmiZoomWidenToSourceWidth: TMenuItem - Tag = 5 - Caption = 'Widen to &source width' - ShortCut = 16471 - OnClick = ZoomClick - end - end - object N2: TMenuItem - Caption = '-' - end - object pmiGoToFirstPage: TMenuItem - Caption = 'First Page' - ShortCut = 36 - OnClick = GoToPageClick - end - object pmiGoToPrevPage: TMenuItem - Tag = 1 - Caption = 'Previous Page' - ShortCut = 33 - OnClick = GoToPageClick - end - object pmiGoToNextPage: TMenuItem - Tag = 2 - Caption = 'Next Page' - ShortCut = 34 - OnClick = GoToPageClick - end - object pmiGoToLastPage: TMenuItem - Tag = 3 - Caption = 'Last Page' - ShortCut = 35 - OnClick = GoToPageClick - end - end - object ilToolBarSmall: TImageList - AllocBy = 29 - Left = 47 - Top = 107 - Bitmap = { - 494C010120002200040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000009000000001002000000000000090 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FFFF000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FFFF00008000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 00000000000000000000000000000000000000FFFF00FFFFFF0000000000FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000008080800000808000008080000080 - 8000008080000080800000808000008080000080800000808000FF000000FFFF - 0000800000000080800000808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 000000000000000000000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00C0C0 - C000FFFFFF00C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00FF000000FFFF00008000 - 000000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF008000 - 0000FFFFFF0080000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF00C0C0C000000000000000000000000000C0C0C0008000000000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF00800000008000 - 000080000000800000008000000080000000FFFFFF00FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF00C0C0C00000000000FFFF0000C0C0C000FFFF000000000000C0C0C00000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000008000000080000000800000008000 - 0000800000008000000000000000FFFFFF0000FFFF00FFFFFF0000000000FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080000000FFFFFF0080000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000FFFF0000C0C0C000FFFF0000C0C0C000FFFF00000000000000FF - FF0000FFFF0000FFFF0000808000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000808080000000000080000000FFFFFF00C0C0C000FFFF - FF00C0C0C000FFFFFF000000000000FFFF00FFFFFF0000FFFF000000000000FF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF008000 - 00008000000080000000800000008000000080000000FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000C0C0C000FFFF0000C0C0C000FFFF0000C0C0C0000000000000FF - FF0000FFFF0000FFFF0000808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000808080000000 - 00000000000000000000808080000000000080000000C0C0C000FFFFFF000000 - 8000FFFFFF0000008000000080000000000000FFFF00FFFFFF0000000000FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080000000FFFFFF0080000000FFFFFF00FFFFFF00000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000FFFF0000C0C0C000FFFF0000C0C0C000FFFF00000000000000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF0000000000808080000000000080000000FFFFFF00C0C0C0000000 - 8000C0C0C00000008000C0C0C000FFFFFF000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF0000000000C0C0C0000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF00C0C0C00000000000FFFF0000C0C0C000FFFF000000000000C0C0C00000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF0000000000808080000000000080000000C0C0C000000080000000 - 8000FFFFFF00C0C0C00000008000C0C0C0008000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000FFFFFF0000000000C0C0C00000000000C0C0 - C0000000000000000000000000008000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF00C0C0C000000000000000000000000000C0C0C00000FFFF0000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF0000000000808080000000000080000000FFFFFF00C0C0C0000000 - 8000C0C0C0000000800000008000FFFFFF008000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000C0C0C00000000000C0C0C00000000000C0C0C0000000 - 0000C0C0C000C0C0C000000000008000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000808000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000808080000000000080000000C0C0C000FFFFFF00C0C0 - C000FFFFFF00C0C0C000FFFFFF00C0C0C0008000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000FFFFFF00FFFFFF0000000000C0C0C00000000000C0C0C00000000000C0C0 - C000C0C0C000C0C0C000C0C0C000800000008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008000000080000000800000008000 - 0000800000008000000080000000800000008000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF0000000000C0C0C00000000000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C00080000000000000008080800000FFFF000000 - 0000FFFFFF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000FFFF - FF00000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF0000000000000000FFFF000000000080000000FF00000080000000FF00 - 0000FF000000FF00000080000000FF0000008000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C00000000000800000000000000000000000808080000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008000000080000000800000008000 - 0000800000008000000080000000800000008000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000800000000000000000000000000000000000 - 0000FFFFFF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000FFFF - FF00808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0080000000800000008000000080000000800000008000 - 0000FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFFFF00FFFF - FF0080000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF0080000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF0080000000FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF00FFFFFF00FFFFFF0000000000C0C0C00000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF0080000000FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000808080000000000000000000FFFFFF0000000000C0C0 - C00000000000FFFFFF0000000000C0C0C00000000000C0C0C000000000000000 - 0000000000000000000080000000800000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000808080000000000000000000000000000000000000000000FFFF - FF00FFFFFF00800000008000000080000000800000008000000080000000FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000 - FF00FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF000000 - 0000C0C0C00000000000C0C0C00000000000C0C0C00000000000C0C0C000C0C0 - C000C0C0C000000000008000000080000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 000000000000000000000000000080000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF000000FF000000000000000000000000000000000000000000000000000000 - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C00000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C00080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000080000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000 - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 00000000000000000000C0C0C00000000000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C00080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000080000000000000008000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C0000000000080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000080000000800000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000800000008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00000000000000000000000000000000000000000000000000FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 80000080800000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF008080800000FFFF00FFFFFF0000FFFF008080 - 800000FFFF0000FFFF0000FFFF00808080000000000000FFFF00FFFFFF000000 - 000000000000000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF008080800000FFFF0000FFFF008080 - 800000FFFF00FFFFFF008080800000FFFF0000000000FFFFFF0000FFFF00FFFF - FF00000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF008080800000FFFF008080 - 8000FFFFFF008080800000FFFF00000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF0080808000808080008080800080808000FFFF - FF008080800080808000808080008080800000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF008080800000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF0000000000000000008080800000FFFF008080 - 800000FFFF008080800000FFFF0000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800000FFFF00000000008080 - 8000FFFFFF00000000008080800000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000008080800000FFFF0000000000000000008080 - 8000808080000000000000000000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 840084848400848484008484840084848400848484000000000000FFFF000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000848484008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 8400848484008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000000000000000000000000000FFFF - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF008400000084000000FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000FFFF00008484840000000000FFFF - 0000FFFF00000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400000000000000000000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 80000080800000808000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000FFFF - 0000FFFF0000FFFF000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF008400000084848400FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 00000080800000808000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF008484840084000000C6C6C600FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0084848400000000000000 - 0000000000008484840084848400848484000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000808000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000FFFF - 0000FFFF0000FFFF000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF0084848400840000008484840000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000FFFF00008484840000000000FFFF - 0000FFFF00000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008400000084848400FFFFFF00FFFFFF008400000084000000FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0084848400000000000000 - 0000000000008484840084848400848484000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000000000000000000000000000FFFF - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00840000008400000000FFFF00C6C6C600840000008400000000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 8400848484000000000000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00C6C6C60084000000840000008400000084000000C6C6C600FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 84000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C0C0C00000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFF0000000000000000000000000000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - 0000FFFF00000000000084848400FFFF0000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000FFFF00000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600FF000000FF000000FF00000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000FFFF0000FFFF - 0000FFFF000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFF0000FFFF0000FFFF - 000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000008484000000000000C6C6 - C600FF000000FF000000FF000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFF0000FFFF - 0000FFFF000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C6000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000FFFF00000000000084848400FFFF0000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000FFFF00000000 - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600FF000000FF000000FF000000C6C6C6000000000000000000000000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000FFFF0000000000000000000000000000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000000000000000 - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C6000000000000000000000000000000 - 0000000000008400000084000000840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000848400008484 - 0000848400008484000000000000000000000000000000000000840000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 0000000000000000000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 84008484000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 00008484840084840000848484000000000000000000FFFFFF00FFFFFF000000 - 000000000000FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF0000000000FFFFFF00FFFFFF0000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000000000000000 - 000000000000FFFFFF0000000000848400008484840000000000000000000000 - 0000FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000008484840000000000000000000000000084840000000000000000 - 00000000000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00000000008484000000000000FFFFFF00000000008484840000000000FFFF - FF000000000084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400000000000000 - 000000000000FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00000000008484840000000000FFFFFF00000000008484000000000000FFFF - FF000000000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000000000000000 - 0000FFFFFF000000000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000084840000000000000000 - 0000000000008484000000000000000000000000000084840000000000000000 - 00000000000084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484840000000000FFFF - FF00000000000000000000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 84008484000084848400848400000000000000000000FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF000000 - 0000FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 0000000000000000000084840000000000000000000084840000000000000000 - 0000000000008484000000000000000000000000000084840000000000000000 - 0000000000008484000084848400000000008484840000000000FF000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FF0000000000000084848400000000008484840000000000FFFF - FF0000000000FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF00000000008484840000000000000000008484840000000000FFFF - FF00000000008484840000000000FFFFFF00000000008484840000000000FFFF - FF000000000084848400848400000000000000000000FF000000FF0000000000 - 0000FFFFFF00FF000000000000000000000000000000FFFFFF00FF000000FFFF - FF0000000000FF000000FF00000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF000000000084848400000000000000000084848400000000000000 - 000000000000FFFFFF0000000000848484008484000000000000000000000000 - 0000FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00000000008484000000000000FFFFFF00000000008484000000000000FFFF - FF00000000008484000084848400000000008484840000000000FF000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FF00000000000000848484000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 000000000000000000008484000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000008484840000000000000000000000000084848400000000000000 - 00000000000084848400848400000000000000000000FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 0000000000000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 00008484840084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 840084840000848484008484000000000000000000000000000084848400FFFF - FF000000000000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000848484008484000084848400000000000000000000000000848484000000 - 00008484840000000000FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484840084840000000000000000000000000000000000008484 - 8400848484008484840000000000FFFFFF00FFFFFF0000FFFF0084848400FFFF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000C6C6C600C6C6 - C600C6C6C600848484008484840000000000FFFFFF00FFFFFF00840000008484 - 8400FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF00840000008400000084000000840000008400000084000000FFFF - FF000000000084848400848400000000000000000000FFFFFF00C6C6C600C6C6 - C600C6C6C600C6C6C60084848400848484000000000000FFFF00840000008400 - 0000FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0000000000848400008484840000000000C6C6C600FFFFFF00FFFFFF00C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084000000840000008400 - 0000FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF0000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF0084000000840000008400000084000000FFFFFF00FFFFFF00FFFF - FF000000000084848400848400000000000000000000C6C6C600FFFFFF00FFFF - FF00C6C6C60000000000C6C6C600C6C6C6008484840084000000840000008400 - 0000FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000000000FF00 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FF00000000000000FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000C6C6C600FFFF - FF00000000008400000000000000C6C6C6008400000084000000840000008484 - 8400FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000FF000000FF00 - 000000000000FFFFFF0000000000FF000000FF00000000000000FFFFFF000000 - 0000FF000000FF00000000000000000000000000000084848400848400000000 - 0000FFFFFF00840000008400000084000000840000008400000084000000FFFF - FF0000000000848484008484000000000000000000000000000000000000C6C6 - C600FFFFFF0084000000C6C6C60084848400840000008400000084848400FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000000000FF00 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FF00000000000000FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000840000000000 - 0000C6C6C60084000000848484000000000084848400FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF0000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000848484008484000000000000000000000000000084000000C6C6 - C60000000000840000000000000084848400FFFFFF0000FFFF00FFFFFF008484 - 8400C6C6C60000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 000084848400848400008484840000000000000000000000000084000000C6C6 - C600C6C6C600840000008484840000FFFF00FFFFFF00FFFFFF00FFFFFF008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008400 - 0000840000008484840084848400848484008484840084848400848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400000000008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000008484840000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484000000 - 00000000000000000000C6C6C600C6C6C600C6C6C60000000000000000000000 - 0000000000000000000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C60000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C60000000000000000000000000000000000000000000000 - 000000000000FFFFFF008484840000000000FFFFFF0000000000000000000000 - 000000000000000000000000000000000000000000008484840000000000C6C6 - C600848484000000000000000000C6C6C600C6C6C6000000000084848400C6C6 - C6000000000000000000848484000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C60000FFFF0000FFFF0000FFFF00C6C6C600C6C6 - C6000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C60000FFFF0000FFFF0000FFFF00C6C6C600C6C6 - C600000000000000000000000000000000000000000084848400FFFFFF00FFFF - FF00FFFFFF00848484008484840000000000FFFFFF00FFFFFF00848484008484 - 840084848400848484000000000000000000000000000000000084848400C6C6 - C60084848400C6C6C600C6C6C6008484840000000000C6C6C600848484008484 - 84008484840084848400000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400C6C6C600C6C6 - C60000000000C6C6C600000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400C6C6C600C6C6 - C60000000000C6C6C60000000000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000000000000000000000000000000000 - 0000C6C6C600C6C6C60000000000FFFFFF00FFFFFF0000000000C6C6C6000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C600C6C6C600000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000C6C6C6000000 - 0000C6C6C60000000000C6C6C600C6C6C600C6C6C600FFFFFF00848484000000 - 0000C6C6C600C6C6C600000000008484840000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C60000000000C6C6C6000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C60000000000C6C6C600000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000C6C6C600C6C6 - C600FFFFFF00000000008484840000000000C6C6C600FFFFFF0084848400C6C6 - C600C6C6C600C6C6C60000000000848484000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C60000000000C6C6C60000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C60000000000C6C6C60000000000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000000000000000 - 0000FFFFFF00000000008484840084848400C6C6C60000000000C6C6C6000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C6C6C60000000000C6C6C60000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C6C6C60000000000C6C6C600848484000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000000000000000000000000000000000 - 0000C6C6C600FFFFFF00000000000000000000000000C6C6C600C6C6C6000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00848484000000000000000000000000000000000084848400C6C6 - C60084848400C6C6C600FFFFFF00FFFFFF00C6C6C600C6C6C600848484008484 - 8400848484000000000084848400000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00848484000000000000000000000000008484840000000000C6C6 - C600848484000000000000000000C6C6C6000000000000000000C6C6C600C6C6 - C600000000008484840000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000FFFF00008484 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000000000000000000000000000000000000000000084848400FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000848484000000 - 00008484840000000000C6C6C600C6C6C600C6C6C60000000000848484000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00848484008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000900000000100010000000000800400000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFF18000FF07000F80008000 - FE03000F00008000FC01000F00008000FC01000F000080008001000F00008000 - 0001000F000080000001000F000080000003000F000080000007000F00008000 - 003F000200008000003F000000008000003F800000018000003FC00080078000 - 003FE000C0078000007FFF82E007FFFFFFFFC001E001FFFFFFFFC001C001000F - 8003C001C001000F8003C001C001000F8003C001C001000F8003C001C001000F - 8003C001C001000F8003C001C001000F8003C001C001000F8003C001C0010004 - 8003C001C0010000C1FEC001C0010000E3FEC001C001F800FFF5C003C001FC00 - FFF3C007C003FE04FFF1C00FFFFFFFFFFFFFFFFFFFFFFFFF00010001FFFFFFFF - 00010001FFF9001F00010001E7FF000F00010001C3F3000700010001C3E70003 - 00010001E1C7000100000001F08F000000000001F81F001F00010001FC3F001F - 00000001F81F001F00000003F09F8FF1808180FFC1C7FFF9C124C1FF83E3FF75 - FE66FFFF8FF1FF8FFFE7FFFFFFFFFFFFFFFFFFEFFDFFFFFFFFFFFFCFF9FFC001 - FFFFE007F1FF8031FDDFC003E1FF8031FCCF800300078031FC478003C03F8001 - 00038003C037800100018003C027800100008003C0008FF100018003C0008FF1 - 00038003C0008FF1FC478003C0278FF1FCCF8003C0378FF1FDDF8003C03F8FF1 - FFFF8003C03F8001FFFFC007FFFFFFFFFFFFFFFFFFFFFFFFFE03FFFFFFFFFFFF - FE03FFFFFFFFFFFFFE03FBBFFEFFFF7FFE03F33FFCFFFF3FC003E23FF8FFFF1F - C003C000F003C00F00038000E003C00700030000C003C00300038000E003C007 - 007FC000F003C00F007DE23FF8FFFF1F0078F33FFCFFFF3F007DFBBFFEFFFF7F - 01DDFFFFFFFFFFFF01E3FFFFFFFFFFFFFFFF8001FFFFFFFF8001000080018081 - 0000000000000080000000000000008000000000000000800000000000000100 - 0000000000000100000000000000018000000000000000800000000000000000 - 0000000000000100000000000000018000000000000000800000000000000080 - 8001000080018081FFFF8001FFFFFFFFFFFFFFFFFFFFFFFFC001800180018001 - C001000000000000C001000000000000C001000000000000C001000000000000 - 8001000000000000000100000000000000010000000000000001000000000000 - 8001000000000000C001000000000000C001000000000000C003000000000000 - C007800180018001C00FFFFFFFFFFFFFFC7FFFFFFFFFFFFFFC27C007C007FFFF - EC2380038003F83FC4010001000100018001000100010001C003000100010001 - E000000000000001000000000000000100008000800000010003C000C0000001 - E001E001E0000001C001E007800000018003F00780070101C407F00380008383 - EC3FF803F000FFFFFC7FFFFFF800FFFF00000000000000000000000000000000 - 000000000000} - end - object ilStub: TImageList - AllocBy = 2 - Left = 19 - Top = 107 - Bitmap = { - 494C010102000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400000000000000000000000000000000008484 - 84000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000084848400FFFF0000FFFF00000000000000000000000000000000 - 00008484840000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 84000000000000000000FFFF0000000000000000000000000000000000000000 - 00000000000000000000848484000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFF000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF00000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFF000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000C6C6C600FFFFFF00C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFF000000000000000000000000000000000000FFFFFF00FFFFFF00C6C6 - C600000000000000000000000000C6C6C600FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 840000000000000000000000000000000000000000000000000000000000FFFF - 0000FFFF000000000000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00848484008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000084848400000000000000000000000000FFFF0000FFFF0000FFFF - 00008484840000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFF8000000000003FFF000000000000 - 1FFF0000000000008FFF000000000000C40F000000000000E1E7000000000000 - F0F3000000000000E5F9000000000000EBFD000000000000EFFD000000000000 - EFF5000000000000EFF5000000000000E7E1000000000000F383000000000000 - F9E7000000000000FC0F00010000000000000000000000000000000000000000 - 000000000000} - end - object pmPrintStyles: TPopupMenu - OnPopup = pmPrintStylesPopup - Left = 103 - Top = 56 - end - object pmDesigners: TPopupMenu - Left = 131 - Top = 56 - end - object Timer1: TTimer - Enabled = False - OnTimer = Timer1Timer - Left = 19 - Top = 159 - end - object pmExplorer: TPopupMenu - OnPopup = pmExplorerPopup - Left = 159 - Top = 56 - object pmiExplorerLoadData: TMenuItem - Caption = 'Load' - Default = True - ShortCut = 16397 - OnClick = FileLoadClick - end - object pmiExplorerUnloadData: TMenuItem - Caption = 'Unload' - ShortCut = 16499 - OnClick = FileCloseClick - end - object miLine33: TMenuItem - Caption = '-' - end - object pmiExplorerCreateFolder: TMenuItem - Caption = 'New Folder' - ShortCut = 32821 - OnClick = ExplorerCreateNewFolderClick - end - object miLine34: TMenuItem - Caption = '-' - end - object pmiExplorerDelete: TMenuItem - Caption = '&Delete...' - ShortCut = 46 - OnClick = ExplorerDeleteClick - end - object pmiExplorerRename: TMenuItem - Caption = '&Rename' - ShortCut = 113 - OnClick = ExplorerRenameClick - end - object miLine40: TMenuItem - Caption = '-' - end - object pmiExplorerProperties: TMenuItem - Caption = '&Properties...' - ShortCut = 32781 - OnClick = ExplorerPropertiesClick - end - end - object pmThumbnails: TPopupMenu - OnPopup = pmThumbnailsPopup - Left = 187 - Top = 56 - object pmiSmallThumbnails: TMenuItem - Caption = '&Small Thumbnails' - Checked = True - GroupIndex = 1 - RadioItem = True - OnClick = pmiThumbnailsSizeClick - end - object pmiLargeThumbnails: TMenuItem - Tag = 1 - Caption = '&Large Thumbnails' - GroupIndex = 1 - RadioItem = True - OnClick = pmiThumbnailsSizeClick - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwStd.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwStd.pas deleted file mode 100644 index 69cf6f8e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSPrVwStd.pas +++ /dev/null @@ -1,2683 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSPrVwStd; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, ComCtrls, - StdCtrls, ExtCtrls, ToolWin, Menus, ImgList, dxPSCore, dxExtCtrls, dxPrevw, - dxPSPrvw; - -type - TdxfmStdPreview = class(TCustomdxPSPreviewWindow) - pmToolBar: TPopupMenu; - pmiFlatBtns: TMenuItem; - pmiLargeBtns: TMenuItem; - MainMenu1: TMainMenu; - miFilePageSetup: TMenuItem; - miFilePrint: TMenuItem; - miFilePreferences: TMenuItem; - miLine1: TMenuItem; - miFileExit: TMenuItem; - miView: TMenuItem; - miViewMargins: TMenuItem; - miLine4: TMenuItem; - miViewFlatTBtns: TMenuItem; - miViewLargeTBtns: TMenuItem; - miViewZoom: TMenuItem; - miZoomPercent100: TMenuItem; - miLine6: TMenuItem; - miZoomPageWidth: TMenuItem; - miZoomWholePage: TMenuItem; - miZoomTwoPages: TMenuItem; - miZoomFourPages: TMenuItem; - miGoToPage: TMenuItem; - miGoToFirstPage: TMenuItem; - miGoToPrevPage: TMenuItem; - miLine8: TMenuItem; - miGoToNextPage: TMenuItem; - miGoToLastPage: TMenuItem; - miFileDesign: TMenuItem; - miFile: TMenuItem; - miFormatPageBackground: TMenuItem; - miHelp: TMenuItem; - miHelpTopics: TMenuItem; - miLine5: TMenuItem; - miViewToolBar: TMenuItem; - miViewMarginBar: TMenuItem; - miViewStatusBar: TMenuItem; - miLine7: TMenuItem; - miZoomWidenToSourceWidth: TMenuItem; - pmPreview: TPopupMenu; - pmiZoomPercent100: TMenuItem; - miLine10: TMenuItem; - pmiZoomPageWidth: TMenuItem; - pmiZoomWholePage: TMenuItem; - pmiZoomTwoPages: TMenuItem; - pmiZoomFourPages: TMenuItem; - pmiZoomWidenToSourceWidth: TMenuItem; - miLine9: TMenuItem; - miLine11: TMenuItem; - pmiGoToFirstPage: TMenuItem; - pmiGoToPrevPage: TMenuItem; - pmiGoToNextPage: TMenuItem; - pmiGoToLastPage: TMenuItem; - miLine20: TMenuItem; - miZoomSetup: TMenuItem; - pmiReportShrinkToPageWidth: TMenuItem; - miFormatShrinkToPageWidth: TMenuItem; - miLine12: TMenuItem; - pmiReportDesign: TMenuItem; - pmiZoom: TMenuItem; - ilToolBarSmall: TImageList; - ilStub: TImageList; - miLine2: TMenuItem; - miLine3: TMenuItem; - miFormat: TMenuItem; - miLine13: TMenuItem; - miFormatDateTime: TMenuItem; - N4: TMenuItem; - miFormatPageNumbering: TMenuItem; - N5: TMenuItem; - miEdit: TMenuItem; - miEditFind: TMenuItem; - miEditFindNext: TMenuItem; - N6: TMenuItem; - miEditReplace: TMenuItem; - miFormatAutoText: TMenuItem; - miViewPageHeaders: TMenuItem; - miViewPageFooters: TMenuItem; - N1: TMenuItem; - pmiPageSetup: TMenuItem; - N2: TMenuItem; - miHelpAbout: TMenuItem; - N3: TMenuItem; - miFormatShowHideEmptyPages: TMenuItem; - pmPrintStyles: TPopupMenu; - miFilePrintStyles: TMenuItem; - pmiFilePrintStyles: TMenuItem; - miLine14: TMenuItem; - pmDesigners: TPopupMenu; - ToolBar: TToolBar; - tbReportDesigner: TToolButton; - tbSeparator1: TToolButton; - tbPrint: TToolButton; - tbPrintDialog: TToolButton; - tbPageSetup: TToolButton; - tbSeparator2: TToolButton; - tbPageBackground: TToolButton; - tbShrinkToPageWidth: TToolButton; - tbSeparator3: TToolButton; - tbPercent100: TToolButton; - tbPageWidth: TToolButton; - tbOnePage: TToolButton; - tbTwoPage: TToolButton; - tbFourPage: TToolButton; - tbMultiplePages: TToolButton; - tbWidenToSourceWidth: TToolButton; - tbSeparator4: TToolButton; - pnlZoomCbx: TPanel; - tbSeparator5: TToolButton; - tbGotoFirstPage: TToolButton; - tbGotoPrevPage: TToolButton; - ToolButton2: TToolButton; - pnlCurrentPage: TPanel; - ToolButton1: TToolButton; - tbGotoNextPage: TToolButton; - tbGotoLastPage: TToolButton; - tbSeparator8: TToolButton; - tbHelp: TToolButton; - tbClose: TToolButton; - Timer1: TTimer; - miViewExplorer: TMenuItem; - miExplorer: TMenuItem; - miExplorerCreateNewFolder: TMenuItem; - miLine31: TMenuItem; - miExplorerDelete: TMenuItem; - miExplorerRename: TMenuItem; - miFileSave: TMenuItem; - tbFileSave: TToolButton; - miFileLoad: TMenuItem; - miLine32: TMenuItem; - pmExplorer: TPopupMenu; - pmiExplorerLoadData: TMenuItem; - miLine33: TMenuItem; - pmiExplorerCreateFolder: TMenuItem; - miLine34: TMenuItem; - pmiExplorerDelete: TMenuItem; - pmiExplorerRename: TMenuItem; - miFileClose: TMenuItem; - pmiExplorerUnloadData: TMenuItem; - miFormatTitle: TMenuItem; - N7: TMenuItem; - tbFileLoad: TToolButton; - miLine30: TMenuItem; - miViewThumbnails: TMenuItem; - pmThumbnails: TPopupMenu; - pmiSmallThumbnails: TMenuItem; - pmiLargeThumbnails: TMenuItem; - pmiExplorerProperties: TMenuItem; - miExplorerProperties: TMenuItem; - miLine40: TMenuItem; - miLine39: TMenuItem; - tbViewExplorer: TToolButton; - tbViewThumbnails: TToolButton; - ToolButton5: TToolButton; - tbFileUnload: TToolButton; - miFileRebuild: TMenuItem; - procedure pmiFlatBtnsClick(Sender: TObject); - procedure pmiLargeBtnsClick(Sender: TObject); - procedure PageSetupClick(Sender: TObject); - procedure PrintClick(Sender: TObject); - procedure ZoomClick(Sender: TObject); - procedure GoToPageClick(Sender: TObject); - procedure CloseClick(Sender: TObject); - procedure cbxPredefinedZoomClick(Sender: TObject); - procedure cbxPredefinedZoomCloseUp(Sender: TObject; AAccept: Boolean); - procedure cbxPredefinedZoomExit(Sender: TObject); - procedure cbxPredefinedZoomKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure seActivePageExit(Sender: TObject); - procedure seKeyPress(Sender: TObject; var Key: Char); - procedure seActivePageButtonClick(Sender: TObject; - ButtonType: TdxButtonType; Button: TUDBtnType); - procedure DesignClick(Sender: TObject); - procedure PageBackgroundClick(Sender: TObject); - procedure pnlZoomCbxResize(Sender: TObject); - procedure pnlCurrentPageResize(Sender: TObject); - procedure OptionsClick(Sender: TObject); - procedure miViewMarginsClick(Sender: TObject); - procedure HelpClick(Sender: TObject); - procedure miViewMarginBarClick(Sender: TObject); - procedure miViewStatusBarClick(Sender: TObject); - procedure pmToolBarPopup(Sender: TObject); - procedure pmPreviewPopup(Sender: TObject); - procedure tbMultiplePagesClick(Sender: TObject); - procedure miZoomSetupClick(Sender: TObject); - procedure ShrinkToPageWidthClick(Sender: TObject); - procedure miFormatDateTimeClick(Sender: TObject); - procedure miFormatPageNumberingClick(Sender: TObject); - procedure miViewPageHeadersClick(Sender: TObject); - procedure miViewPageFootersClick(Sender: TObject); - procedure miFormatShowHideEmptyPagesClick(Sender: TObject); - procedure pmPrintStylesPopup(Sender: TObject); - procedure miFormatAutoTextClick(Sender: TObject); - procedure Timer1Timer(Sender: TObject); - procedure ViewExplorerClick(Sender: TObject); - procedure ExplorerCreateNewFolderClick(Sender: TObject); - procedure FileSaveClick(Sender: TObject); - procedure ExplorerDeleteClick(Sender: TObject); - procedure ExplorerRenameClick(Sender: TObject); - procedure FileLoadClick(Sender: TObject); - procedure pmExplorerPopup(Sender: TObject); - procedure FileCloseClick(Sender: TObject); - procedure miFormatTitleClick(Sender: TObject); - procedure ViewThumbnailsClick(Sender: TObject); - procedure pmiThumbnailsSizeClick(Sender: TObject); - procedure pmThumbnailsPopup(Sender: TObject); - procedure ExplorerPropertiesClick(Sender: TObject); - procedure miFileRebuildClick(Sender: TObject); - private - FExplorerContextCommandMenuItems: TList; - FExplorerContextCommandPopupMenuItems: TList; - FExplorerContextCommandToolButtons: TList; - FFlatCtrls: Boolean; - FLargeBtns: Boolean; - - FcbxPredefinedZoom: TCustomEdit; - FilToolBarLarge: TImageList; - FseActivePage: TCustomEdit; - - function GetExplorerContextCommandMenuItem(Index: Integer): TMenuItem; - function GetExplorerContextCommandMenuItemCount: Integer; - function GetExplorerContextCommandPopupMenuItem(Index: Integer): TMenuItem; - function GetExplorerContextCommandPopupMenuItemCount: Integer; - function GetExplorerContextCommandToolButton(Index: Integer): TToolButton; - function GetExplorerContextCommandToolButtonCount: Integer; - - procedure SetFlatCtrls(Value: Boolean); - procedure SetLargeBtns(Value: Boolean); - - procedure ArrangeToolBarCtrls; - procedure AssignToolBarImages; - function CalculateWindowPos(Sender: TObject): TPoint; - procedure CheckItem(AParent: TMenuItem); - function CreateLargeImages(ASource: TCustomImageList): TImageList; - procedure DoShowExplorerPopup(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - procedure LoadPropertiesFromRegistry(const APath: string); - procedure SavePropertiesToRegistry(const APath: string); - procedure SetupFlatCtrls; - procedure WMInitMenu(var Message: TWMInitMenu); message WM_INITMENU; - protected - procedure Activate; override; - procedure DoShow; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - - procedure AddExplorerContextCommand(ACommand: TCustomdxPSExplorerContextCommand); override; - procedure UpdateExplorerContextCommands; override; - procedure ExplorerContextCommandClick(Sender: TObject); virtual; - - procedure CreateControls; override; - procedure DoAfterPrintReport(AShowDialog: Boolean); override; - procedure DoPreviewZoomFactorChanged(APreview: TdxPreview); override; - procedure DoPreviewZoomModeChanged(APreview: TdxPreview); override; - procedure LoadStrings; override; - procedure StyleListChanged(Sender: TObject); override; - - property ExplorerContextCommandMenuItemCount: Integer read GetExplorerContextCommandMenuItemCount; - property ExplorerContextCommandMenuItems[Index: Integer]: TMenuItem read GetExplorerContextCommandMenuItem; - property ExplorerContextCommandPopupMenuItemCount: Integer read GetExplorerContextCommandPopupMenuItemCount; - property ExplorerContextCommandPopupMenuItems[Index: Integer]: TMenuItem read GetExplorerContextCommandPopupMenuItem; - property ExplorerContextCommandToolButtonCount: Integer read GetExplorerContextCommandToolButtonCount; - property ExplorerContextCommandToolButtons[Index: Integer]: TToolButton read GetExplorerContextCommandToolButton; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure AfterConstruction; override; - - procedure InitContent; override; - procedure LoadFromRegistry(const APath: string); override; - procedure SaveToRegistry(const APath: string); override; - procedure UpdateControls; override; - - property FlatCtrls: Boolean read FFlatCtrls write SetFlatCtrls; - property LargeBtns: Boolean read FLargeBtns write SetLargeBtns; - end; - -implementation - -{$R *.DFM} - -uses - Registry, CommCtrl, Math, {$IFDEF DELPHI7}Themes, UxTheme, {$ENDIF} cxClasses, - dxPSGlbl, dxPSEngn, dxPgsDlg, dxPSRes, dxPSImgs, dxPrnDev, dxPSPopupMan, dxPSUtl; - -const - ToolBarHeight: array[Boolean] of Integer = (38, 54); - ToolBtnSize: array[Boolean] of TSize = ((cx: 25; cy: 24), (cx: 40; cy: 40)); - -{ '500%, 200%, 150%, 100%, 75%, 50%, 25%, 10%, - "Page Width", "Whole Page", "Two Pages", "Four Pages", "Widen To Source Width' } - - ZoomItemCount = 13; - ZoomItemIndexes: array[0..ZoomItemCount - 1] of Integer = - (-1, -1, -1, 5, -1, -1, -1, -1, 6, 7, 8, 9, 11); - - // strings used when saving(loading) properties to(from) registry - - sdxFlatCtrls = 'FlatCtrls'; - sdxLargeBtns = 'LargeBtns'; - -var - ToolBarImages: array[Boolean] of TImageList; - -type - TControlAccess = class(TControl); - - TdxZoomFactorComboEdit = class; - - TdxPopupBox = class(TListBox) - private - function GetEdit: TdxZoomFactorComboEdit; - function GetTextColor(Index: Integer; State: TOwnerDrawState): TColor; - {$IFDEF DELPHI5} - procedure WMContextMenu(var message: TWMContextMenu); message WM_CONTEXTMENU; - {$ENDIF} - procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure WMRButtonUp(var Message: TWMRButtonUp); message WM_RBUTTONUP; - procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; - procedure CNCommand(var Message: TWMCommand); message CN_COMMAND; - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure WndProc(var message: TMessage); override; - - property Edit: TdxZoomFactorComboEdit read GetEdit; - public - constructor Create(AOwner: TComponent); override; - end; - - TdxPopupBoxItem = class - public - Enabled: Boolean; - ImageIndex: Integer; - constructor Create(AEnabled: Boolean; AnImageIndex: Integer); - end; - - TdxCloseUpEvent = procedure(Sender: TObject; AAccept: Boolean) of object; - - TdxZoomFactorComboEdit = class(TCustomEdit) - private - FBorderWidth: Integer; - FButtonWidth: Integer; - FDropDownCount: Integer; - FDroppedDown: Boolean; - FFlat: Boolean; - FImages: TImageList; - FImagesChangeLink: TChangeLink; - FIsMousePressed: Boolean; - FItemIndex: Integer; - FItemList: TList; - FItems: TStrings; - FLockChanges: Boolean; - FPopupBox: TdxPopupBox; - FSaveText: string; - FOnCloseUp: TdxCloseUpEvent; - FOnDropDown: TNotifyEvent; - function GetButtonRect: TRect; - function GetHotTrackAllowed: Boolean; - function GetImageIndex(Index: Integer): Integer; - function GetItemEnabled(Index: Integer): Boolean; - function GetMouseInButtonBounds: Boolean; - function GetMouseInControlBounds: Boolean; - function GetMousePos: TPoint; - function GetPopupItem(Index: Integer): TdxPopupBoxItem; - procedure SetDropDownCount(Value: Integer); - procedure SetDroppedDown(Value: Boolean); - procedure SetFlat(Value: Boolean); - procedure SetImages(Value: TImageList); - procedure SetImageIndex(Index: Integer; Value: Integer); - procedure SetIsMousePressed(Value: Boolean); - procedure SetItemEnabled(Index: Integer; Value: Boolean); - procedure SetItemIndex(Value: Integer); - procedure SetItems(Value: TStrings); - - procedure CloseUp(Accept: Boolean); - procedure DrawBorder(DC: HDC); - procedure DrawButton(DC: HDC); - procedure DrawNonClientArea; - procedure DropDown; - procedure InvalidateNCArea; - procedure MakeZoomItems; - procedure WMCaptureChanged(var Message: TMessage); message WM_CAPTURECHANGED; - {$IFDEF DELPHI5} - procedure WMContextMenu(var Message: TWMContextMenu); message WM_CONTEXTMENU; - {$ENDIF} - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; - procedure WMNCLButtonDown(var Message: TWMNCLButtonDown); message WM_NCLBUTTONDOWN; - procedure WMNCLButtonUp(var Message: TWMNCLButtonDown); message WM_NCLBUTTONUP; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure WMRButtonUp(var Message: TWMRButtonUp); message WM_RBUTTONUP; - procedure WMSetText(var Message: TWMSetText); message WM_SETTEXT; - procedure CMCancelMode(var Message: TCMCancelMode); message CM_CANCELMODE; - procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; - protected - procedure Change; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure DoEnter; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure WndProc(var message: TMessage); override; - - function AddItem(AnEnabled: Boolean; AnItemIndex: Integer): Integer; - procedure InsertItem(AnIndex: Integer; AnEnabled: Boolean; AnItemIndex: Integer); - procedure RemoveItem(AnIndex: Integer); - - property BorderWidth: Integer read FBorderWidth; - property ButtonRect: TRect read GetButtonRect; - property ButtonWidth: Integer read FButtonWidth; - property HotTrackAllowed: Boolean read GetHotTrackAllowed; - property IsMousePressed: Boolean read FIsMousePressed write SetIsMousePressed; - property MouseInButtonBounds: Boolean read GetMouseInButtonBounds; - property MouseInControlBounds: Boolean read GetMouseInControlBounds; - property MousePos: TPoint read GetMousePos; - property PopupBox: TdxPopupBox read FPopupBox; - property PopupItems[Index: Integer]: TdxPopupBoxItem read GetPopupItem; - public - constructor Create(Owner: TComponent); override; - destructor Destroy; override; - - function FindItemIndexByText(const AText: string): Integer; - procedure SelectNext; - procedure SelectPrev; - - property DroppedDown: Boolean read FDroppedDown write SetDroppedDown; - property ItemEnabled[Index: Integer]: Boolean read GetItemEnabled write SetItemEnabled; - property ImageIndexes[Index: Integer]: Integer read GetImageIndex write SetImageIndex; - published - property DropDownCount: Integer read FDropDownCount write SetDropDownCount default 8; - property Flat: Boolean read FFlat write SetFlat default False; - property Images: TImageList read FImages write SetImages; - property ItemIndex: Integer read FItemIndex write SetItemIndex; - property Items: TStrings read FItems write SetItems; - - property OnClick; - property OnCloseUp: TdxCloseUpEvent read FOnCloseUp write FOnCloseUp; - property OnDropDown: TNotifyEvent read FOnDropDown write FOnDropDown; - end; - -{ Utility Routines } - -function AddPercentSign(const S: string): string; -begin - Result := S; - if S[Length(S)] <> PercentSymbol then - Result := Result + PercentSymbol; -end; - -{ TdxPopupBox } - -constructor TdxPopupBox.Create(AOwner: TComponent); -begin - inherited; - Style := lbOwnerDrawVariable; - ControlStyle := ControlStyle - [csCaptureMouse]; -end; - -procedure TdxPopupBox.CreateParams(var Params: TCreateParams); -begin - inherited; - with Params do - begin - Style := Style or WS_BORDER or LBS_OWNERDRAWFIXED and not LBS_WANTKEYBOARDINPUT; - ExStyle := WS_EX_TOOLWINDOW or WS_EX_TOPMOST; - WindowClass.Style := CS_SAVEBITS; - end; -end; - -procedure TdxPopupBox.CreateWnd; -begin - inherited; - Windows.SetParent(Handle, 0); - CallWindowProc(DefWndProc, Handle, WM_SETFOCUS, 0, 0); - Items := Edit.Items; -end; - -procedure TdxPopupBox.DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); -const - TextColor: array[Boolean] of TColor = (clWindowText, clHighlightText); -var - S: string; -begin - Canvas.FillRect(Rect); - with Edit do - if (Images <> nil) and (ImageIndexes[Index] > -1) then - Images.Draw(Canvas, Rect.Left + 1, Rect.Top + 1, ImageIndexes[Index], ItemEnabled[Index]); - - if Edit.Images <> nil then - Inc(Rect.Left, Edit.Images.Width + 5); - Canvas.Font.Color := GetTextColor(Index, State); - Canvas.Brush.Style := bsClear; - S := Items[Index]; - DrawText(Canvas.Handle, PChar(S), Length(S), Rect, DT_LEFT or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX); -end; - -procedure TdxPopupBox.MouseMove(Shift: TShiftState; X, Y: Integer); -var - Index: Integer; -begin - inherited; - Index := ItemAtPos(MakePoint(X, Y), True); - if (Index > -1) and Edit.ItemEnabled[Index] then - ItemIndex := Index; -end; - -procedure TdxPopupBox.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - Accept: Boolean; - Pt: TPoint; -begin - inherited; - if Button = mbLeft then - begin - Pt := MakePoint(X, Y); - Accept := PtInRect(MakeRect(0, 0, Width, Height), Pt) and Edit.ItemEnabled[ItemAtPos(Pt, True)]; - Edit.CloseUp(Accept); - end; -end; - -procedure TdxPopupBox.WndProc(var Message: TMessage); -begin - if not ((Message.Msg = LB_SETCURSEL) and ((Message.wParam = -1) or not Edit.ItemEnabled[Message.wParam])) then - inherited; -end; - -function TdxPopupBox.GetEdit: TdxZoomFactorComboEdit; -begin - Result := TdxZoomFactorComboEdit(Owner); -end; - -function TdxPopupBox.GetTextColor(Index: Integer; State: TOwnerDrawState): TColor; -begin - if Edit.ItemEnabled[Index] then - if odSelected in State then - Result := clHighlightText - else - Result := clWindowText - else - Result := clGrayText; -end; - -{$IFDEF DELPHI5} - -procedure TdxPopupBox.WMContextMenu(var Message: TWMContextMenu); -begin - //DefaultHandler(message); -end; - -{$ENDIF} - -procedure TdxPopupBox.WMLButtonDown(var Message: TWMLButtonDown); -var - Index: Integer; -begin - Index := ItemAtPos(SmallPointToPoint(Message.Pos), True); - if (Index > -1) and Edit.ItemEnabled[Index] then - inherited; -end; - -procedure TdxPopupBox.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - InflateRect(Message.CalcSize_Params^.rgrc[0], -2, -2); -end; - -procedure TdxPopupBox.WMNCPaint(var Message: TWMNCPaint); -var - R: TRect; - DC: HDC; -begin - GetWindowRect(Handle, R); - OffsetRect(R, -R.Left, -R.Top); - DC := GetWindowDC(Handle); - try - DrawEdge(DC, R, EDGE_RAISED, BF_ADJUST or BF_RECT); - finally - ReleaseDC(Handle, DC); - end; -end; - -procedure TdxPopupBox.WMRButtonUp(var Message: TWMRButtonUp); -begin - DefaultHandler(Message); -end; - -procedure TdxPopupBox.CMHintShow(var Message: TCMHintShow); -begin - Message.Result := 1; -end; - -procedure TdxPopupBox.CNCommand(var Message: TWMCommand); -begin - inherited; - if (Message.NotifyCode = CBN_SELCHANGE) and Edit.ItemEnabled[ItemIndex] then - begin - Edit.FLockChanges := True; - try - Edit.Text := Items[ItemIndex]; - finally - Edit.FLockChanges := False; - end; - end; -end; - -type - TdxComboEditStrings = class(TStringList) - private - FComboEdit: TdxZoomFactorComboEdit; - protected - procedure SetUpdateState(Updating: Boolean); override; - public - constructor Create(AComboEdit: TdxZoomFactorComboEdit); - destructor Destroy; override; - - function Add(const S: string): Integer; override; - procedure Clear; override; - procedure Delete(Index: Integer); override; - procedure Insert(Index: Integer; const S: string); override; - property ComboEdit: TdxZoomFactorComboEdit read FComboEdit; - end; - -constructor TdxComboEditStrings.Create(AComboEdit: TdxZoomFactorComboEdit); -begin - inherited Create; - FComboEdit := AComboEdit; -end; - -destructor TdxComboEditStrings.Destroy; -begin - Clear; - inherited; -end; - -function TdxComboEditStrings.Add(const S: string): Integer; -begin - inherited Add(S); - Result := ComboEdit.AddItem(True, -1); -end; - -procedure TdxComboEditStrings.Insert(Index: Integer; const S: string); -begin - inherited; - ComboEdit.InsertItem(Index, True, -1); -end; - -procedure TdxComboEditStrings.Delete(Index: Integer); -begin - ComboEdit.RemoveItem(Index); - inherited; -end; - -procedure TdxComboEditStrings.Clear; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Delete(I); - inherited; -end; - -procedure TdxComboEditStrings.SetUpdateState(Updating: Boolean); -begin - SendMessage(ComboEdit.Handle, WM_SETREDRAW, Ord(not Updating), 0); - if not Updating then ComboEdit.Refresh; -end; - -{ TdxPopupBoxItem } - -constructor TdxPopupBoxItem.Create(AEnabled: Boolean; AnImageIndex: Integer); -begin - inherited Create; - Enabled := AEnabled; - ImageIndex := AnImageIndex; -end; - -{ TdxZoomFactorComboEdit } - -constructor TdxZoomFactorComboEdit.Create(Owner: TComponent); -begin - inherited; - FBorderWidth := 3; - FDropDownCount := 8; - FItemIndex := -1; - - FImagesChangeLink := TChangeLink.Create; - - FItemList := TList.Create; - FItems := TdxComboEditStrings.Create(Self); - MakeZoomItems; - - FFlat := True; - ControlStyle := ControlStyle - [csSetCaption, csFramed]; - Ctl3D := False; - BorderStyle := Forms.bsNone; - Parent := Owner as TWinControl; - FButtonWidth := GetSystemMetrics(SM_CXVSCROLL); - - FPopupBox := TdxPopupBox.Create(Self); - FPopupBox.Parent := Self; - FPopupBox.Visible := False; - FPopupBox.IntegralHeight := False; -end; - -destructor TdxZoomFactorComboEdit.Destroy; -begin - FItems.Free; - FItemList.Free; - FImagesChangeLink.Free; - FPopupBox.Free; - inherited; -end; - -function TdxZoomFactorComboEdit.FindItemIndexByText(const AText: string): Integer; -begin - Result := FItems.IndexOf(AText); -end; - -procedure TdxZoomFactorComboEdit.SelectNext; -begin - if ItemIndex < Items.Count then - ItemIndex := ItemIndex + 1; -end; - -procedure TdxZoomFactorComboEdit.SelectPrev; -begin - if ItemIndex > 0 then - {begin - V := IntToStr(Drop - end - else} - ItemIndex := ItemIndex - 1; -end; - -procedure TdxZoomFactorComboEdit.Change; -begin - if FLockChanges then Exit; - inherited; -end; - -procedure TdxZoomFactorComboEdit.CreateParams(var Params: TCreateParams); -begin - inherited; - Params.Style := Params.Style or WS_CLIPCHILDREN; -end; - -procedure TdxZoomFactorComboEdit.DoEnter; -begin - FSaveText := Text; - inherited; -end; - -procedure TdxZoomFactorComboEdit.KeyDown(var Key: Word; Shift: TShiftState); -begin - if Shift = [] then - case Key of - VK_UP: SelectPrev; - VK_DOWN: SelectNext; - end; - inherited; -end; - -procedure TdxZoomFactorComboEdit.KeyPress(var Key: Char); -begin - inherited; - if (Key = Char(VK_RETURN)) or (Key = Char(VK_ESCAPE)) then Key := #0; -end; - -procedure TdxZoomFactorComboEdit.WndProc(var Message: TMessage); - - procedure ProcessDropDownKeys(var Key: Word; Shift: TShiftState); - - function IsDropDownKey: Boolean; - begin - if ssAlt in Shift then - Result := (Key = VK_F4) or (Key = VK_DOWN) - else - Result := Key = VK_F4; - end; - - begin - if IsDropDownKey then - begin - if DroppedDown then - CloseUp(False) - else - DropDown; - Key := 0; - end; - - if not (ssAlt in Shift) then - begin - if (Key = VK_RETURN) and DroppedDown then - begin - CloseUp(True); - Key := 0; - end; - - if Key = VK_ESCAPE then - begin - if DroppedDown then - CloseUp(False) - else - Text := FSaveText; - Key := 0; - end; - end; - end; - -var - CharKey: Word; -begin - case Message.Msg of - WM_KEYDOWN, - WM_SYSKEYDOWN, - WM_CHAR: - begin - with TWMKey(Message) do - begin - CharKey := CharCode; - ProcessDropDownKeys(CharKey, KeyDataToShiftState(KeyData)); - CharCode := CharKey; - if CharCode = 0 then Exit; - - if ((CharCode = VK_UP) or (CharCode = VK_DOWN)) and PopupBox.Visible then - begin - with Message do - SendMessage(PopupBox.Handle, Msg, wParam, lParam); - Exit; - end; - end; - end; - - CM_ENABLEDCHANGED, - CM_MOUSEENTER, - CM_MOUSELEAVE, - WM_SETFOCUS, - WM_KILLFOCUS: - InvalidateNCArea; - end; - inherited; -end; - -function TdxZoomFactorComboEdit.AddItem(AnEnabled: Boolean; AnItemIndex: Integer): Integer; -begin - Result := FItemList.Add(TdxPopupBoxItem.Create(AnEnabled, AnItemIndex)); -end; - -procedure TdxZoomFactorComboEdit.InsertItem(AnIndex: Integer; AnEnabled: Boolean; - AnItemIndex: Integer); -begin - FItemList.Insert(AnIndex, TdxPopupBoxItem.Create(AnEnabled, AnItemIndex)); -end; - -procedure TdxZoomFactorComboEdit.RemoveItem(AnIndex: Integer); -begin - PopupItems[AnIndex].Free; - FItemList.Delete(AnIndex); -end; - -function TdxZoomFactorComboEdit.GetButtonRect: TRect; -begin - GetWindowRect(Handle, Result); - InflateRect(Result, -BorderWidth, -BorderWidth); - Result.Left := Result.Right - ButtonWidth; -end; - -function TdxZoomFactorComboEdit.GetHotTrackAllowed: Boolean; -begin - Result := Flat and not (csDesigning in ComponentState) and - (Focused or (MouseInControlBounds and GetParentForm(Self).Active)); -end; - -function TdxZoomFactorComboEdit.GetImageIndex(Index: Integer): Integer; -begin - Result := PopupItems[Index].ImageIndex; -end; - -function TdxZoomFactorComboEdit.GetItemEnabled(Index: Integer): Boolean; -begin - Result := PopupItems[Index].Enabled; -end; - -function TdxZoomFactorComboEdit.GetMouseInButtonBounds: Boolean; -begin - Result := PtInRect(ButtonRect, MousePos); -end; - -function TdxZoomFactorComboEdit.GetMouseInControlBounds: Boolean; -var - R: TRect; -begin - GetWindowRect(Handle, R); - Result := PtInRect(R, MousePos); -end; - -function TdxZoomFactorComboEdit.GetMousePos: TPoint; -begin - GetCursorPos(Result); -end; - -function TdxZoomFactorComboEdit.GetPopupItem(Index: Integer): TdxPopupBoxItem; -begin - Result := TdxPopupBoxItem(FItemList[Index]); -end; - -procedure TdxZoomFactorComboEdit.SetDropDownCount(Value: Integer); -begin - if Value < 1 then - Value := 1; - if FDropDownCount <> Value then - FDropDownCount := Value; -end; - -procedure TdxZoomFactorComboEdit.SetDroppedDown(Value: Boolean); -begin - if FDroppedDown <> Value then - begin - FDroppedDown := Value; - if DroppedDown then - DropDown - else - CloseUp(False); - end; -end; - -procedure TdxZoomFactorComboEdit.SetFlat(Value: Boolean); -const - BorderStyleMap: array[Boolean] of TBorderStyle = (bsSingle, bsNone); -begin - if FFlat <> Value then - begin - FFlat := Value; - Ctl3D := not Flat; - BorderStyle := BorderStyleMap[Flat]; - end; -end; - -procedure TdxZoomFactorComboEdit.SetImageIndex(Index: Integer; Value: Integer); -begin - PopupItems[Index].ImageIndex := Value; -end; - -procedure TdxZoomFactorComboEdit.SetIsMousePressed(Value: Boolean); -begin - if FIsMousePressed <> Value then - begin - FIsMousePressed := Value; - InvalidateNCArea; - end; -end; - -procedure TdxZoomFactorComboEdit.SetImages(Value: TImageList); -begin - if Images <> nil then - Images.UnregisterChanges(FImagesChangeLink); - FImages := Value; - if Images <> nil then - begin - Images.RegisterChanges(FImagesChangeLink); - Images.FreeNotification(Self); - PopupBox.ItemHeight := Images.Height + 2; - end; -end; - -procedure TdxZoomFactorComboEdit.SetItemEnabled(Index: Integer; Value: Boolean); -begin - PopupItems[Index].Enabled := Value; -end; - -procedure TdxZoomFactorComboEdit.SetItemIndex(Value: Integer); -begin - if Value < -1 then - Value := -1; - if Value > Items.Count - 1 then - Value := Items.Count - 1; - if FItemIndex <> Value then - begin - FItemIndex := Value; - if FItemIndex > -1 then - Text := Items[FItemIndex] - else - Text := ''; - end; -end; - -procedure TdxZoomFactorComboEdit.SetItems(Value: TStrings); -begin - Items.Assign(Value); -end; - -procedure TdxZoomFactorComboEdit.CloseUp(Accept: Boolean); -begin - if PopupBox.Visible then - begin - FDroppedDown := False; - if GetCapture <> 0 then - SendMessage(GetCapture, WM_CANCELMODE, 0, 0); - SetWindowPos(FPopupBox.Handle, 0, 0, 0, 0, 0, - SWP_NOZORDER or SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE or SWP_HIDEWINDOW); - if Accept and (PopupBox.ItemIndex <> -1) then - Text := PopupBox.Items.Strings[FPopupBox.ItemIndex]; - PopupBox.Visible := False; - - if Assigned(FOnCloseUp) then FOnCloseUp(Self, Accept); - if Accept then Click; - - Invalidate; - InvalidateNCArea; - end; -end; - -procedure TdxZoomFactorComboEdit.DrawBorder(DC: HDC); -var - R: TRect; - Color: COLORREF; - {$IFDEF DELPHI7} - Details: TThemedElementDetails; - {$ENDIF} -begin - GetWindowRect(Handle, R); - OffsetRect(R, -R.Left, -R.Top); - if not Flat then - begin - {$IFDEF DELPHI7} - with ThemeServices do - if ThemesEnabled then - begin - Details := GetElementDetails(teEditTextNormal); - DrawEdge(DC, Details, R, BDR_RAISEDOUTER, BF_RECT or BF_FLAT); - InflateRect(R, -1, -1); - DrawEdge(DC, Details, R, BDR_RAISEDINNER, BF_RECT or BF_MONO); - InflateRect(R, -1, -1); - DrawEdge(DC, Details, R, BDR_RAISEDINNER, BF_RECT or BF_MONO); - Exit; - end; - {$ENDIF} - DrawEdge(DC, R, EDGE_SUNKEN, BF_RECT); - InflateRect(R, -2, -2); - FrameRect(DC, R, GetSysColorBrush(COLOR_WINDOW)); - end - else - begin - if HotTrackAllowed then - begin - DrawEdge(DC, R, BDR_SUNKENOUTER, BF_RECT); - InflateRect(R, -1, -1); - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - end - else - begin - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - InflateRect(R, -1, -1); - if Enabled then - Color := COLOR_BTNFACE - else - Color := COLOR_WINDOW; - FrameRect(DC, R, GetSysColorBrush(Color)); - end; - InflateRect(R, -1, -1); - FrameRect(DC, R, GetSysColorBrush(COLOR_WINDOW)); - end; -end; - -procedure TdxZoomFactorComboEdit.DrawButton(DC: HDC); - - {$IFDEF DELPHI7} - function GetThemeState(ADowned: Boolean): TThemedComboBox; - begin - if not Enabled then - Result := tcDropDownButtonDisabled - else - if ADowned then - Result := tcDropDownButtonPressed - else - if MouseInButtonBounds then - Result := tcDropDownButtonHot - else - Result := tcDropDownButtonNormal; - end; - {$ENDIF} - - function ButtonRect: TRect; - begin - Result := BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - InflateRect(Result, -BorderWidth, -BorderWidth); - Result.Left := Result.Right - ButtonWidth; - end; - -const - Pusheds: array[Boolean] of UINT = (0, DFCS_PUSHED); - Enableds: array[Boolean] of UINT = (DFCS_INACTIVE, 0); - Downeds: array[Boolean] of UINT = (BDR_RAISEDOUTER, BDR_SUNKENINNER); - InnerEdges: array[Boolean] of UINT = (BDR_RAISEDINNER, 0); - OuterEdges: array[Boolean] of UINT = (0, BDR_SUNKENOUTER); -var - R: TRect; - Downed: Boolean; -begin - R := ButtonRect; - Downed := DroppedDown or (MouseInButtonBounds and IsMousePressed); - {$IFDEF DELPHI7} - with ThemeServices do - if ThemesEnabled then - begin - DrawElement(DC, GetElementDetails(GetThemeState(Downed)), R); - Exit; - end; - {$ENDIF} - - DrawFrameControl(DC, R, DFC_SCROLL, DFCS_FLAT or DFCS_SCROLLCOMBOBOX or Pusheds[Downed] or Enableds[Enabled]); - DrawEdge(DC, R, OuterEdges[Downed] or InnerEdges[Downed] or Downeds[Downed], BF_RECT); - - ExcludeClipRect(DC, R.Left, R.Top, R.Right, R.Bottom); -end; - -procedure TdxZoomFactorComboEdit.DrawNonClientArea; -var - DC: HDC; -begin - DC := GetWindowDC(Handle); - try - DrawBorder(DC); - DrawButton(DC); - finally - ReleaseDC(Handle, DC); - end; -end; - -procedure TdxZoomFactorComboEdit.DropDown; -var - ADesktopBounds: TRect; - - function CalculatePopupPos: TPoint; - begin - Result := Parent.ClientToScreen(MakePoint(Left, Top)); - with Result do - begin - if X + PopupBox.Width > ADesktopBounds.Right then - X := ADesktopBounds.Right - PopupBox.Width; - if X < ADesktopBounds.Left then X := ADesktopBounds.Left; - - Inc(Y, Height); - if Y + PopupBox.Height > Screen.Height then - if Y - (PopupBox.Height + Height) > 0 then - Dec(Y, PopupBox.Height + Height) - else - Y := 0; - end; - end; - -var - Pt: TPoint; -begin - ADesktopBounds := GetDesktopWorkArea(Parent.ClientToScreen(MakePoint(Left, Top))); - if (PopupBox <> nil) and not PopupBox.Visible then - begin - FDroppedDown := True; - SelectAll; - - PopupBox.Width := Width; - PopupBox.Height := DropDownCount * PopupBox.ItemHeight + 4; - PopupBox.Color := Color; - PopupBox.Font := Font; - PopupBox.ItemIndex := PopupBox.Items.IndexOf(Text); - - Pt := CalculatePopupPos; - SetWindowPos(PopupBox.Handle, HWND_TOP, Pt.X, Pt.Y, 0, 0, SWP_NOSIZE or SWP_NOACTIVATE or SWP_SHOWWINDOW); - PopupBox.Visible := True; - Invalidate; - Windows.SetFocus(Handle); - - if Assigned(FOnDropDown) then FOnDropDown(Self); - end; -end; - -procedure TdxZoomFactorComboEdit.InvalidateNCArea; -const - Flags: UINT = SWP_FRAMECHANGED or SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER; -begin - SetWindowPos(Handle, 0, 0, 0, 0, 0, Flags); -end; - -procedure TdxZoomFactorComboEdit.MakeZoomItems; -begin - with Items do - begin - Clear; - Add('500' + PercentSymbol); - Add('200' + PercentSymbol); - Add('150' + PercentSymbol); - Add('100' + PercentSymbol); - Add('75' + PercentSymbol); - Add('50' + PercentSymbol); - Add('25' + PercentSymbol); - Add('10' + PercentSymbol); - Add(cxGetResourceString(@sdxPageWidth)); - Add(cxGetResourceString(@sdxWholePage)); - Add(cxGetResourceString(@sdxTwoPages)); - Add(cxGetResourceString(@sdxFourPages)); - Add(cxGetResourceString(@sdxWidenToSourceWidth)); - end; -end; - -procedure TdxZoomFactorComboEdit.WMCaptureChanged(var Message: TMessage); -begin - inherited; - IsMousePressed := False; -end; - -{$IFDEF DELPHI5} - -procedure TdxZoomFactorComboEdit.WMContextMenu(var Message: TWMContextMenu); -begin - if DroppedDown then - DefaultHandler(Message) - else - inherited; -end; - -{$ENDIF} - -procedure TdxZoomFactorComboEdit.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - IsMousePressed := False; - CloseUp(False); -end; - -procedure TdxZoomFactorComboEdit.WMMouseMove(var Message: TWMMouseMove); -begin - inherited; - if not MouseInButtonBounds then - Perform(WM_NCLBUTTONUP, 0, TMessage(Message).lParam); -end; - -procedure TdxZoomFactorComboEdit.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - with Message.CalcSize_Params^ do - begin - InflateRect(rgrc[0], -FBorderWidth, -FBorderWidth); - Dec(rgrc[0].Right, FButtonWidth); - end; -end; - -procedure TdxZoomFactorComboEdit.WMNCHitTest(var Message: TWMNCHitTest); -begin - inherited; - if MouseInButtonBounds then - message.Result := HTBORDER - else - Perform(WM_NCLBUTTONUP, 0, TMessage(Message).lParam); -end; - -procedure TdxZoomFactorComboEdit.WMNCLButtonDown(var Message: TWMNCLButtonDown); -begin - inherited; - if MouseInButtonBounds then - begin - IsMousePressed := True; - DroppedDown := not FPopupBox.Visible; - end; -end; - -procedure TdxZoomFactorComboEdit.WMNCLButtonUp(var message: TWMNCLButtonDown); -begin - inherited; - IsMousePressed := False; -end; - -procedure TdxZoomFactorComboEdit.WMNCPaint(var Message: TWMNCPaint); -begin - DrawNonClientArea; -end; - -procedure TdxZoomFactorComboEdit.WMRButtonUp(var Message: TWMRButtonUp); -begin - if DroppedDown then - DefaultHandler(Message) - else - inherited; -end; - -procedure TdxZoomFactorComboEdit.WMSetText(var Message: TWMSetText); -var - Index: Integer; -begin - inherited; - Index := FindItemIndexByText(Text); - if Index <> -1 then - ItemIndex := Index; -end; - -procedure TdxZoomFactorComboEdit.CMCancelMode(var Message: TCMCancelMode); -begin - if (Message.Sender <> Self) and (Message.Sender <> FPopupBox) then - CloseUp(False); -end; - -procedure TdxZoomFactorComboEdit.CMHintShow(var Message: TCMHintShow); -begin - Message.Result := Integer(DroppedDown); -end; - -{ TdxfmStdPreview } - -constructor TdxfmStdPreview.Create(AOwner: TComponent); -begin - inherited; - FExplorerContextCommandMenuItems := TList.Create; - FExplorerContextCommandPopupMenuItems := TList.Create; - FExplorerContextCommandToolButtons := TList.Create; -{$IFDEF DELPHI7} - pnlZoomCbx.ParentBackground := False; - pnlCurrentPage.ParentBackground := False; -{$ENDIF} -end; - -destructor TdxfmStdPreview.Destroy; -begin - FreeAndNil(FExplorerContextCommandToolButtons); - FreeAndNil(FExplorerContextCommandPopupMenuItems); - FreeAndNil(FExplorerContextCommandMenuItems); - inherited; -end; - -procedure TdxfmStdPreview.AfterConstruction; -begin - FFlatCtrls := True; - FLargeBtns := False; - inherited; - ToolBar.HandleNeeded; - ToolBar.Realign; -end; - -procedure TdxfmStdPreview.Activate; -begin - inherited; - Timer1.Enabled := True; -end; - -procedure TdxfmStdPreview.DoShow; -begin - inherited; - ToolBar.Realign; -end; - -procedure TdxfmStdPreview.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited; - if (Key = Ord('Z')) and (ssAlt in Shift) and FcbxPredefinedZoom.CanFocus then - ActiveControl := FcbxPredefinedZoom; - if (Key = Ord('A')) and (ssAlt in Shift) and FseActivePage.CanFocus then - ActiveControl := FseActivePage; -end; - -procedure TdxfmStdPreview.AddExplorerContextCommand(ACommand: TCustomdxPSExplorerContextCommand); - - function IsCommandSeparator(ACommand: TCustomdxPSExplorerContextCommand): Boolean; - begin - Result := ACommand is TdxPSExplorerContextCommandSeparator; - end; - - function AddExplorerContextCommandMenuItem(AParent: TMenuItem; ACommand: TCustomdxPSExplorerContextCommand): TMenuItem; - begin - Result := TMenuItem.Create(Self); - with Result do - begin - Bitmap := ACommand.Bitmap; - Caption := ACommand.Caption; - Enabled := ACommand.Enabled; - Hint := ACommand.Hint; - ShortCut := ACommand.ShortCut; - Tag := MakeTTag(ACommand); - - OnClick := ExplorerContextCommandClick; - end; - AParent.Insert(0, Result); - end; - -var - MenuItem: TMenuItem; -begin - MenuItem := AddExplorerContextCommandMenuItem(pmExplorer.Items, ACommand); - if not IsCommandSeparator(ACommand) and (FExplorerContextCommandPopupMenuItems.IndexOf(MenuItem) = -1) then - FExplorerContextCommandPopupMenuItems.Add(MenuItem); - - MenuItem := AddExplorerContextCommandMenuItem(miExplorer, ACommand); - if not IsCommandSeparator(ACommand) and (FExplorerContextCommandMenuItems.IndexOf(MenuItem) = -1) then - FExplorerContextCommandMenuItems.Add(MenuItem); -end; - -procedure TdxfmStdPreview.UpdateExplorerContextCommands; - - procedure UpdateMenuItems; - var - I: Integer; - begin - for I := 0 to ExplorerContextCommandMenuItemCount - 1 do - with ExplorerContextCommandMenuItems[I] do - Enabled := TCustomdxPSExplorerContextCommand(TTagToObj(Tag)).Enabled; - end; - - procedure UpdatePopupMenuItems; - var - I: Integer; - begin - for I := 0 to ExplorerContextCommandPopupMenuItemCount - 1 do - with ExplorerContextCommandPopupMenuItems[I] do - Enabled := TCustomdxPSExplorerContextCommand(TTagToObj(Tag)).Enabled; - end; - - procedure UpdateToolButtons; - var - I: Integer; - begin - for I := 0 to ExplorerContextCommandToolButtonCount - 1 do - with ExplorerContextCommandToolButtons[I] do - Enabled := TCustomdxPSExplorerContextCommand(TTagToObj(Tag)).Enabled; - end; - -begin - if not (csDestroying in ComponentState) then - begin - UpdateMenuItems; - UpdatePopupMenuItems; - UpdateToolButtons; - end; -end; - -procedure TdxfmStdPreview.ExplorerContextCommandClick(Sender: TObject); -var - Command: TCustomdxPSExplorerContextCommand; - CommandSet2: IdxPSExplorerContextCommands2; -begin - Command := TCustomdxPSExplorerContextCommand(TTagToObj(TMenuItem(Sender).Tag)); - if Supports(TObject(Explorer), IdxPSExplorerContextCommands2, CommandSet2) then - begin - CommandSet2.InitializeCommand(Command); - try - if Command.Enabled then Command.Execute; {.1} - finally - CommandSet2.FinalizeCommand(Command); - end; - end; -end; - -procedure TdxfmStdPreview.CreateControls; -begin - inherited; - - FseActivePage := TdxPSSpinEdit.Create(Self); - with TdxPSSpinEdit(FseActivePage) do - begin - Parent := pnlCurrentPage; - Width := pnlCurrentPage.Width - Left; - //MaxValue := Preview.PageCount; - Value := 1; - OnKeyPress := seKeyPress; - OnButtonClick := seActivePageButtonClick; - OnExit := seActivePageExit; - end; - - FcbxPredefinedZoom := TdxZoomFactorComboEdit.Create(pnlZoomCbx); - with TdxZoomFactorComboEdit(FcbxPredefinedZoom) do - begin - Height := FseActivePage.Height; - DropDownCount := PredefinedZooms.Count; - OnClick := cbxPredefinedZoomClick; - OnCloseUp := cbxPredefinedZoomCloseUp; - OnExit := cbxPredefinedZoomExit; - OnKeyDown := cbxPredefinedZoomKeyDown; - end; - - FilToolBarLarge := CreateLargeImages(ilToolBarSmall); - ToolBarImages[False] := ilToolBarSmall; - ToolBarImages[True] := FilToolBarLarge; - ArrangeToolBarCtrls; - AssignToolBarImages; - SetupFlatCtrls; - - Preview.PopupMenu := pmPreview; - - pmToolBar.OwnerDraw := True; - pmToolBar.Images := ilToolBarSmall; - - pmPrintStyles.OwnerDraw := True; - pmPrintStyles.Images := ilToolBarSmall; - - Menu.Images := ilToolBarSmall; - pmPreview.Images := ilToolBarSmall; - - miFileDesign.ImageIndex := 0; - miFileSave.ImageIndex := 19; - miFileLoad.ImageIndex := 23; - miFileClose.ImageIndex := 24; - miFilePrint.ImageIndex := 2; - miFilePageSetup.ImageIndex := 3; - miFormatPageBackground.ImageIndex := 4; - miFormatShrinkToPageWidth.ImageIndex := 12; - - miExplorerCreateNewFolder.ImageIndex := 20; - miExplorerDelete.ImageIndex := 22; - miExplorerProperties.ImageIndex := 29; - - miViewExplorer.ImageIndex := 30; - miViewThumbnails.ImageIndex := 31; - - miZoomPercent100.ImageIndex := 5; - miZoomPageWidth.ImageIndex := 6; - miZoomWholePage.ImageIndex := 7; - miZoomTwoPages.ImageIndex := 8; - miZoomFourPages.ImageIndex := 9; - miZoomWidenToSourceWidth.ImageIndex := 11; - - miFormatTitle.ImageIndex := 26; - miFormatDateTime.ImageIndex := 28; - miFormatPageNumbering.ImageIndex := 29; - - miGoToFirstPage.ImageIndex := 13; - miGoToPrevPage.ImageIndex := 14; - miGoToNextPage.ImageIndex := 15; - miGoToLastPage.ImageIndex := 16; - miHelpTopics.ImageIndex := 17; - - pmDesigners.OwnerDraw := True; - pmDesigners.Images := ilToolBarSmall; - - pmiReportDesign.ImageIndex := 0; - pmiPageSetup.ImageIndex := 3; - pmiReportShrinkToPageWidth.ImageIndex := 12; - - pmiZoomPercent100.ImageIndex := 5; - pmiZoomPageWidth.ImageIndex := 6; - pmiZoomWholePage.ImageIndex := 7; - pmiZoomTwoPages.ImageIndex := 8; - pmiZoomFourPages.ImageIndex := 9; - pmiZoomWidenToSourceWidth.ImageIndex := 11; - - pmiGoToFirstPage.ImageIndex := 13; - pmiGoToPrevPage.ImageIndex := 14; - pmiGoToNextPage.ImageIndex := 15; - pmiGoToLastPage.ImageIndex := 16; - - pmExplorer.OwnerDraw := True; - pmExplorer.Images := ilToolBarSmall; - - pmiExplorerLoadData.ImageIndex := 23; - pmiExplorerUnloadData.ImageIndex := 24; - pmiExplorerCreateFolder.ImageIndex := 20; - pmiExplorerDelete.ImageIndex := 22; - pmiExplorerProperties.ImageIndex := 29; - - pmThumbnails.Images := ilStub; -end; - -procedure TdxfmStdPreview.LoadStrings; - - procedure SetHint(AButton: TControl; const AHint: string; AMenuItem: TMenuItem = nil); - var - S: string; - begin - if AMenuItem <> nil then - S := ShortCutToText(AMenuItem.ShortCut) - else - S := AButton.Hint; - AButton.Hint := AHint; - if Length(S) > 0 then - AButton.Hint := AButton.Hint + ' (' + S + ')'; - end; - -begin - inherited; - - { menus } - miFile.Caption := cxGetResourceString(@sdxMenuFile); - miFileDesign.Caption := cxGetResourceString(@sdxMenuFileDesign); - miFileRebuild.Caption := cxGetResourceString(@sdxMenuFileRebuild); - miFileSave.Caption := cxGetResourceString(@sdxMenuFileSave); - miFileLoad.Caption := cxGetResourceString(@sdxMenuFileLoad); - miFileClose.Caption := cxGetResourceString(@sdxMenuFileClose); - miFilePrint.Caption := cxGetResourceString(@sdxMenuFilePrint); - miFilePageSetup.Caption := cxGetResourceString(@sdxMenuFilePageSetup); - miFilePrintStyles.Caption := cxGetResourceString(@sdxMenuPrintStyles); - pmiFilePrintStyles.Caption := cxGetResourceString(@sdxMenuPrintStyles); - miFilePreferences.Caption := cxGetResourceString(@sdxMenuToolsOptions); - miFileExit.Caption := cxGetResourceString(@sdxMenuFileExit); - - miExplorer.Caption := cxGetResourceString(@sdxMenuExplorer); - miExplorerCreateNewFolder.Caption := cxGetResourceString(@sdxMenuExplorerCreateFolder); - miExplorerDelete.Caption := cxGetResourceString(@sdxMenuExplorerDelete); - miExplorerRename.Caption := cxGetResourceString(@sdxMenuExplorerRename); - miExplorerProperties.Caption := cxGetResourceString(@sdxMenuExplorerProperties); - - miEdit.Caption := cxGetResourceString(@sdxMenuEdit); - miEditFind.Caption := cxGetResourceString(@sdxMenuEditFind); - miEditFindNext.Caption := cxGetResourceString(@sdxMenuEditFindNext); - miEditReplace.Caption := cxGetResourceString(@sdxMenuEditReplace); - - miView.Caption := cxGetResourceString(@sdxMenuView); - miViewMargins.Caption := cxGetResourceString(@sdxMenuViewMargins); - miViewLargeTBtns.Caption := cxGetResourceString(@sdxMenuViewLargeToolBarButtons); - miViewFlatTBtns.Caption := cxGetResourceString(@sdxMenuViewFlatToolBarButtons); - miViewMarginBar.Caption := cxGetResourceString(@sdxMenuViewMarginsStatusBar); - miViewStatusBar.Caption := cxGetResourceString(@sdxMenuViewPagesStatusBar); - miViewExplorer.Caption := cxGetResourceString(@sdxMenuViewExplorer); - miViewThumbnails.Caption := cxGetResourceString(@sdxMenuViewThumbnails); - miViewZoom.Caption := cxGetResourceString(@sdxMenuZoom); - miViewPageHeaders.Caption := cxGetResourceString(@sdxMenuViewPagesHeaders); - miViewPageFooters.Caption := cxGetResourceString(@sdxMenuViewPagesFooters); - - miZoomPercent100.Caption := cxGetResourceString(@sdxMenuZoomPercent100); - miZoomPageWidth.Caption := cxGetResourceString(@sdxMenuZoomPageWidth); - miZoomWholePage.Caption := cxGetResourceString(@sdxMenuZoomWholePage); - miZoomTwoPages.Caption := cxGetResourceString(@sdxMenuZoomTwoPages); - miZoomFourPages.Caption := cxGetResourceString(@sdxMenuZoomFourPages); - miZoomWidenToSourceWidth.Caption := cxGetResourceString(@sdxMenuZoomWidenToSourceWidth); - miZoomSetup.Caption := cxGetResourceString(@sdxMenuZoomSetup); - - miFormat.Caption := cxGetResourceString(@sdxMenuFormat); -// miFormatHeaderAndFooter.Caption := cxGetResourceString(@sdxMenuFormatHeaderAndFooter); - miFormatTitle.Caption := cxGetResourceString(@sdxMenuFormatTitle); - miFormatShowHideEmptyPages.Caption := cxGetResourceString(@sdxMenuShowEmptyPages); - miFormatAutoText.Caption := cxGetResourceString(@sdxMenuInsertEditAutoTextEntries); - miFormatDateTime.Caption := cxGetResourceString(@sdxMenuFormatDateTime); - miFormatPageNumbering.Caption := cxGetResourceString(@sdxMenuFormatPageNumbering); - miFormatPageBackground.Caption := cxGetResourceString(@sdxMenuFormatPageBackground); - miFormatShrinkToPageWidth.Caption := cxGetResourceString(@sdxMenuFormatShrinkToPage); - - miGotoPage.Caption := cxGetResourceString(@sdxMenuGotoPage); - miGotoFirstPage.Caption := cxGetResourceString(@sdxMenuGotoPageFirst); - miGotoPrevPage.Caption := cxGetResourceString(@sdxMenuGotoPagePrev); - miGotoNextPage.Caption := cxGetResourceString(@sdxMenuGotoPageNext); - miGotoLastPage.Caption := cxGetResourceString(@sdxMenuGotoPageLast); - - miHelp.Caption := cxGetResourceString(@sdxMenuHelp); - miHelpTopics.Caption := cxGetResourceString(@sdxMenuHelpTopics); - miHelpAbout.Caption := cxGetResourceString(@sdxMenuHelpAbout); - - { popup menus } - pmiReportDesign.Caption := cxGetResourceString(@sdxMenuFileDesign); - pmiPageSetup.Caption := cxGetResourceString(@sdxMenuFilePageSetup); - pmiReportShrinkToPageWidth.Caption := cxGetResourceString(@sdxMenuFormatShrinkToPage); - pmiZoom.Caption := cxGetResourceString(@sdxMenuZoom); - pmiZoomPercent100.Caption := cxGetResourceString(@sdxMenuZoomPercent100); - pmiZoomPageWidth.Caption := cxGetResourceString(@sdxMenuZoomPageWidth); - pmiZoomWholePage.Caption := cxGetResourceString(@sdxMenuZoomWholePage); - pmiZoomTwoPages.Caption := cxGetResourceString(@sdxMenuZoomTwoPages); - pmiZoomFourPages.Caption := cxGetResourceString(@sdxMenuZoomFourPages); - pmiZoomWidenToSourceWidth.Caption := cxGetResourceString(@sdxMenuZoomWidenToSourceWidth); - - pmiGotoFirstPage.Caption := cxGetResourceString(@sdxMenuGotoPageFirst); - pmiGotoPrevPage.Caption := cxGetResourceString(@sdxMenuGotoPagePrev); - pmiGotoNextPage.Caption := cxGetResourceString(@sdxMenuGotoPageNext); - pmiGotoLastPage.Caption := cxGetResourceString(@sdxMenuGotoPageLast); - - pmiExplorerLoadData.Caption := cxGetResourceString(@sdxMenuFileLoad); - pmiExplorerUnloadData.Caption := cxGetResourceString(@sdxMenuFileClose); - pmiExplorerCreateFolder.Caption := cxGetResourceString(@sdxMenuExplorerCreateFolder); - pmiExplorerDelete.Caption := cxGetResourceString(@sdxMenuExplorerDelete); - pmiExplorerRename.Caption := cxGetResourceString(@sdxMenuExplorerRename); - pmiExplorerProperties.Caption := cxGetResourceString(@sdxMenuExplorerProperties); - - pmiSmallThumbnails.Caption := cxGetResourceString(@sdxMenuThumbnailsSmall); - pmiLargeThumbnails.Caption := cxGetResourceString(@sdxMenuThumbnailsLarge); - - pmiFlatBtns.Caption := cxGetResourceString(@sdxMenuViewFlatToolBarButtons); - pmiLargeBtns.Caption := cxGetResourceString(@sdxMenuViewLargeToolBarButtons); - - { toolbar hints } - SetHint(tbReportDesigner, cxGetResourceString(@sdxHintFileDesign), miFileDesign); - tbPrint.Hint := cxGetResourceString(@sdxHintFilePrint) + dxPSPrVw.GetCurrentPrinterAsHint; - SetHint(tbFileLoad, cxGetResourceString(@sdxHintFileLoad), miFileLoad); - SetHint(tbFileUnload, cxGetResourceString(@sdxHintFileClose), miFileClose); - SetHint(tbFileSave, cxGetResourceString(@sdxHintFileSave), miFileSave); - SetHint(tbPrintDialog, cxGetResourceString(@sdxHintFilePrintDialog)); - SetHint(tbPageSetup, cxGetResourceString(@sdxHintFilePageSetup), miFilePageSetup); - SetHint(tbPageBackground, cxGetResourceString(@sdxHintFormatPageBackground)); - SetHint(tbShrinkToPageWidth, cxGetResourceString(@sdxHintFormatShrinkToPage)); - - SetHint(tbViewExplorer, cxGetResourceString(@sdxHintViewExplorer), miViewExplorer); - SetHint(tbViewThumbnails, cxGetResourceString(@sdxHintViewThumbnails), miViewThumbnails); - - SetHint(FcbxPredefinedZoom, cxGetResourceString(@sdxHintViewZoom)); - SetHint(tbPercent100, cxGetResourceString(@sdxHintZoomPercent100), miZoomPercent100); - SetHint(tbPageWidth, cxGetResourceString(@sdxHintZoomPageWidth), miZoomPageWidth); - SetHint(tbOnePage, cxGetResourceString(@sdxHintZoomWholePage), miZoomWholePage); - SetHint(tbTwoPage, cxGetResourceString(@sdxHintZoomTwoPages), miZoomTwoPages); - SetHint(tbFourPage, cxGetResourceString(@sdxHintZoomFourPages), miZoomFourPages); - SetHint(tbMultiplePages, cxGetResourceString(@sdxHintZoomMultiplyPages)); - SetHint(tbWidenToSourceWidth, cxGetResourceString(@sdxHintZoomWidenToSourceWidth), miZoomWidenToSourceWidth); - - SetHint(tbGotoFirstPage, cxGetResourceString(@sdxHintGotoPageFirst), pmiGotoFirstPage); - SetHint(tbGotoPrevPage, cxGetResourceString(@sdxHintGotoPagePrev), pmiGotoPrevPage); - SetHint(tbGotoNextPage, cxGetResourceString(@sdxHintGotoPageNext), pmiGotoNextPage); - SetHint(tbGotoLastPage, cxGetResourceString(@sdxHintGotoPageLast), pmiGotoLastPage); - SetHint(FseActivePage, cxGetResourceString(@sdxHintActivePage)); - - SetHint(tbHelp, cxGetResourceString(@sdxHintHelpTopics), miHelp); - SetHint(tbClose, cxGetResourceString(@sdxHintFileExit), miFileExit); -end; - -procedure TdxfmStdPreview.StyleListChanged(Sender: TObject); -begin - with ReportLink do - if Sender = StyleManager then - begin - BuildPageSetupMenu(pmPrintStyles.Items, nil, True); - BuildPageSetupMenu(miFilePrintStyles, nil, True); - BuildPageSetupMenu(pmiFilePrintStyles, nil, True); - end; -end; - -procedure TdxfmStdPreview.InitContent; -begin - inherited; - - ThumbnailsPreview.PopupMenu := pmThumbnails; - - if IsExplorerAvailable then - TControlAccess(ExplorerTree.Control).OnMouseUp := DoShowExplorerPopup; - - if ComponentPrinter <> nil then - TdxPSSpinEdit(FseActivePage).MaxValue := ReportLink.PageCount; - FcbxPredefinedZoom.Text := IntToStr(ZoomFactor) + PercentSymbol; - - if not IsExplorerAvailable then - begin - miFileSave.Caption := dxPSUtl.AddEndEllipsis(miFileSave.Caption); - miFileLoad.Caption := dxPSUtl.AddEndEllipsis(miFileLoad.Caption); - end; -end; - -function TdxfmStdPreview.CalculateWindowPos(Sender: TObject): TPoint; -var - R: TRect; -begin - if Sender is TToolButton then - begin - R := TToolButton(Sender).BoundsRect; - MapWindowPoints(ToolBar.Handle, 0, R, 2); - Result.X := R.Left; - Result.Y := R.Bottom; - end - else - Result := Preview.ClientOrigin; -end; - -procedure TdxfmStdPreview.CheckItem(AParent: TMenuItem); -var - Style: TBasedxPrintStyle; - I: Integer; - Item: TMenuItem; -begin - if CanPrintStyle then - begin - Style := ReportLink.StyleManager.CurrentStyle; - for I := 0 to AParent.Count - 1 do - begin - Item := AParent[I]; - if TTagToObj(Item.Tag) = Style then - begin - Item.Checked := True; - Exit; - end; - end; - end; -end; - -function TdxfmStdPreview.CreateLargeImages(ASource: TCustomImageList): TImageList; - - procedure DrawItem(ABitmap: TBitmap; AnImageIndex: Integer; const ASourceBounds, ADestBounds: TRect); - var - B: TBitmap; - begin - B := TBitmap.Create; - try - with ASourceBounds do - begin - B.Width := Right - Left; - B.Height := Bottom - Top; - end; - B.Canvas.Brush.Color := clFuchsia; - B.Canvas.FillRect(ASourceBounds); - ASource.Draw(B.Canvas, 0, 0, AnImageIndex); - ABitmap.Canvas.CopyRect(ADestBounds, B.Canvas, ASourceBounds); - finally - B.Free; - end; - end; - -var - DestBounds, SourceBounds: TRect; - Image: TBitmap; - I: Integer; -begin - Result := TImageList.Create(Self); - - Result.Width := 2 * ASource.Width; - Result.Height := 2 * ASource.Height; - Result.AllocBy := ASource.Count; - - DestBounds := MakeBounds(0, 0, Result.Width, Result.Height); - SourceBounds := MakeBounds(0, 0, ASource.Width, ASource.Height); - - Image := TBitmap.Create; - try - Image.Width := Result.Width; - Image.Height := Result.Height; - for I := 0 to ASource.Count - 1 do - begin - DrawItem(Image, I, SourceBounds, DestBounds); - Result.AddMasked(Image, clDefault); - end; - finally - Image.Free; - end; -end; - -procedure TdxfmStdPreview.DoAfterPrintReport(AShowDialog: Boolean); -begin - if AShowDialog then - tbPrint.Hint := cxGetResourceString(@sdxHintFilePrint) + GetCurrentPrinterAsHint; -end; - -procedure TdxfmStdPreview.DoPreviewZoomFactorChanged(APreview: TdxPreview); -begin - FcbxPredefinedZoom.Text := AddPercentSign(IntToStr(ZoomFactor)); - //FPreview.ZoomMode := pzmNone; -end; - -procedure TdxfmStdPreview.DoPreviewZoomModeChanged(APreview: TdxPreview); -begin - FcbxPredefinedZoom.Text := AddPercentSign(IntToStr(ZoomFactor)); -end; - -function TdxfmStdPreview.GetExplorerContextCommandMenuItem(Index: Integer): TMenuItem; -begin - Result := TMenuItem(FExplorerContextCommandMenuItems.Items[Index]); -end; - -function TdxfmStdPreview.GetExplorerContextCommandMenuItemCount: Integer; -begin - Result := FExplorerContextCommandMenuItems.Count; -end; - -function TdxfmStdPreview.GetExplorerContextCommandPopupMenuItem(Index: Integer): TMenuItem; -begin - Result := TMenuItem(FExplorerContextCommandPopupMenuItems.Items[Index]); -end; - -function TdxfmStdPreview.GetExplorerContextCommandPopupMenuItemCount: Integer; -begin - Result := FExplorerContextCommandPopupMenuItems.Count; -end; - -function TdxfmStdPreview.GetExplorerContextCommandToolButton(Index: Integer): TToolButton; -begin - Result := TToolButton(FExplorerContextCommandToolButtons.Items[Index]); -end; - -function TdxfmStdPreview.GetExplorerContextCommandToolButtonCount: Integer; -begin - Result := FExplorerContextCommandToolButtons.Count; -end; - -procedure TdxfmStdPreview.SetFlatCtrls(Value: Boolean); -begin - if FFlatCtrls <> Value then - begin - FFlatCtrls := Value; - SetupFlatCtrls; - if not Locked then UpdateControls; - end; -end; - -procedure TdxfmStdPreview.SetLargeBtns(Value: Boolean); -begin - if FLargeBtns <> Value then - begin - FLargeBtns := Value; - AssignToolBarImages; - ArrangeToolBarCtrls; - if not Locked then UpdateControls; - end; -end; - -procedure TdxfmStdPreview.AssignToolBarImages; -var - I: Integer; -begin - ToolBar.Images := ToolBarImages[FLargeBtns]; - with TdxZoomFactorComboEdit(FcbxPredefinedZoom) do - begin - Images := ToolBarImages[FLargeBtns]; - for I := 0 to Items.Count - 1 do - ImageIndexes[I] := ZoomItemIndexes[I]; - end; -end; - -procedure TdxfmStdPreview.ArrangeToolBarCtrls; -const - Widths: array[Boolean] of Integer = (140, 160); -begin - with ToolBar do - begin - Height := ToolBarHeight[FLargeBtns]; - ButtonWidth := ToolBtnSize[FLargeBtns].cx; - ButtonHeight := ToolBtnSize[FLargeBtns].cy; - end; - pnlZoomCbx.Width := Widths[LargeBtns]; - TdxZoomFactorComboEdit(FcbxPredefinedZoom).Width := pnlZoomCbx.Width; - TdxZoomFactorComboEdit(FcbxPredefinedZoom).Perform(CM_RECREATEWND, 0, 0); -end; - -procedure TdxfmStdPreview.SetupFlatCtrls; -begin - ToolBar.Flat := FFlatCtrls; - TdxZoomFactorComboEdit(FcbxPredefinedZoom).Flat := FFlatCtrls; - TdxPSSpinEdit(FseActivePage).Flat := FFlatCtrls; -end; - -procedure TdxfmStdPreview.miViewMarginsClick(Sender: TObject); -begin - if Locked then Exit; - ShowPageMargins := not ShowPageMargins; -end; - -procedure TdxfmStdPreview.pmiFlatBtnsClick(Sender: TObject); -begin - if Locked then Exit; - FlatCtrls := not FlatCtrls; -end; - -procedure TdxfmStdPreview.pmiLargeBtnsClick(Sender: TObject); -begin - if Locked then Exit; - LargeBtns := not LargeBtns; - if Assigned(Preview) then Preview.Invalidate; -end; - -procedure TdxfmStdPreview.miViewMarginBarClick(Sender: TObject); -begin - if Locked then Exit; - ShowMarginBar := not ShowMarginBar; -end; - -procedure TdxfmStdPreview.miViewStatusBarClick(Sender: TObject); -begin - if Locked then Exit; - ShowStatusBar := not ShowStatusBar; -end; - -procedure TdxfmStdPreview.DesignClick(Sender: TObject); -begin - tbReportDesigner.Down := True; - try - DoDesignReport; - finally - tbReportDesigner.Down := False; - end; -end; - -procedure TdxfmStdPreview.miFileRebuildClick(Sender: TObject); -begin - RebuildReport; -end; - -procedure TdxfmStdPreview.PageBackgroundClick(Sender: TObject); -begin - tbPageBackground.Down := True; - try - DoShowPageBackgroundDlg(CalculateWindowPos(Sender)); - finally - tbPageBackground.Down := False; - end; -end; - -procedure TdxfmStdPreview.pnlZoomCbxResize(Sender: TObject); -begin - with TPanel(Sender) do - FcbxPredefinedZoom.Top := (Height - FcbxPredefinedZoom.Height) div 2 + 1; -end; - -procedure TdxfmStdPreview.pnlCurrentPageResize(Sender: TObject); -begin - with TPanel(Sender) do - FseActivePage.Top := (Height - FseActivePage.Height) div 2 + 1; -end; - -procedure TdxfmStdPreview.PrintClick(Sender: TObject); -const - BtnClicked: Boolean = False; -begin - if BtnClicked then Exit; - BtnClicked := True; - try - tbPrintDialog.Down := True; - try - DoPrintReport(Boolean(TTagToInt(TComponent(Sender).Tag))); - finally - tbPrintDialog.Down := False; - end; - finally - BtnClicked := False; - end; -end; - -procedure TdxfmStdPreview.PageSetupClick(Sender: TObject); -const - BtnClicked: Boolean = False; -begin - if BtnClicked then Exit; - BtnClicked := True; - try - tbPageSetup.Down := True; - try - DoPageSetupReport(0); - finally - tbPageSetup.Down := False; - end; - finally - BtnClicked := False; - end; -end; - -procedure TdxfmStdPreview.ZoomClick(Sender: TObject); -var - PageXCount, PageYCount: Integer; - ZoomMode: TdxPreviewZoomMode; -begin - case TTagToInt(TComponent(Sender).Tag) of - 0: ZoomMode := pzmNone; - 1: ZoomMode := pzmPageWidth; - else - ZoomMode := pzmPages; - end; - PageXCount := 1; - PageYCount := 1; - if ZoomMode = pzmPages then - case TTagToInt(TComponent(Sender).Tag) of - 3: PageXCount := 2; - 4: begin - PageXCount := 2; - PageYCount := 2; - end; - 5: ReportLink.GetPageColRowCount(PageXCount, PageYCount); - end; - DoSetupZoomFactor(100, PageXCount, PageYCount, ZoomMode); -end; - -procedure TdxfmStdPreview.ShrinkToPageWidthClick(Sender: TObject); -begin - if Locked then Exit; - if ReportLink <> nil then - begin - ReportLink.ShrinkToPageWidth := not ReportLink.ShrinkToPageWidth; - DoShrinkToPageWidth(ReportLink.ShrinkToPageWidth); - end; -end; - -procedure TdxfmStdPreview.miFormatShowHideEmptyPagesClick(Sender: TObject); -begin - if Locked then Exit; - TMenuItem(Sender).Checked := not TMenuItem(Sender).Checked; - DoShowEmptyPages(TMenuItem(Sender).Checked); -end; - -procedure TdxfmStdPreview.miZoomSetupClick(Sender: TObject); -begin - DoShowZoomDlg; -end; - -procedure TdxfmStdPreview.tbMultiplePagesClick(Sender: TObject); -var - Origin: TPoint; - YShift: Integer; -begin - Origin := TToolButton(Sender).ClientOrigin; - YShift := TToolButton(Sender).Height; - - tbMultiplePages.Down := True; - try - DoShowMultiplySelectPagesDlg(ilStub, 1, Origin, YShift); - finally - tbMultiplePages.Down := False; - end; -end; - -procedure TdxfmStdPreview.GoToPageClick(Sender: TObject); -begin - case TTagToInt(TComponent(Sender).Tag) of - 0: GoToFirstPage; - 1: GoToPrevPage; - 2: GoToNextPage; - 3: GoToLastPage; - end; -end; - -procedure TdxfmStdPreview.CloseClick(Sender: TObject); -begin - Close; -end; - -procedure TdxfmStdPreview.HelpClick(Sender: TObject); -begin - DoInvokeHelp; -end; - -procedure TdxfmStdPreview.UpdateControls; -const - ButtonStyles: array[Boolean] of TToolButtonStyle = (tbsButton, tbsDropDown); -var - HasPages: Boolean; - PrevStyle: TToolButtonStyle; -begin - if Locked then Exit; - inherited; - HasPages := FPreview.PageCount > 0; - BeginUpdate; - try - { toolbar enabled } - tbReportDesigner.Enabled := CanDesign; - tbFileLoad.Enabled := CanLoadReport; - tbFileUnload.Enabled := CanUnloadReport; - tbFileSave.Enabled := CanSaveReport; - tbPrint.Enabled := CanPrint; - tbPrintDialog.Enabled := CanPrintDialog; - tbPageSetup.Enabled := CanPageSetup; - PrevStyle := tbPageSetup.Style; - tbPageSetup.Style := ButtonStyles[CanPrintStyle]; - if PrevStyle <> tbPageSetup.Style then - if tbPageSetup.Style = tbsButton then - begin - tbPageSetup.Width := ToolBtnSize[LargeBtns].cx; - SendMessage(ToolBar.Handle, CM_RECREATEWND, 0, 0); - tbPageSetup.DropDownMenu := nil; - end - else - tbPageSetup.DropDownMenu := pmPrintStyles; - - tbClose.Enabled := not IsPrinting; - - tbPageBackground.Enabled := IsEnabled(peoPageBackground) and not IsPrinting; - tbShrinkToPageWidth.Enabled := HasPages and not IsPrinting; - - tbViewExplorer.Visible := IsExplorerAvailable; - tbViewExplorer.Down := ShowExplorer; - tbViewThumbnails.Down := ShowThumbnails; - - tbPercent100.Enabled := HasPages; - tbPageWidth.Enabled := HasPages; - tbOnePage.Enabled := HasPages; - tbTwoPage.Enabled := (Preview.PageCount > 1); - tbFourPage.Enabled := (Preview.PageCount > 3); - tbMultiplePages.Enabled := HasPages; - tbWidenToSourceWidth.Enabled := HasPages and not IsPrinting; - if ReportLink <> nil then - tbShrinkToPageWidth.Down := ReportLink.ShrinkToPageWidth; - - with TdxZoomFactorComboEdit(FcbxPredefinedZoom) do - begin - Enabled := HasPages; - ItemEnabled[Items.Count - 3] := Preview.PageCount > 1; - ItemEnabled[Items.Count - 2] := Preview.PageCount > 3; - end; - - tbGoToFirstPage.Enabled := HasPages and (Preview.SelPageIndex <> 0); - tbGoToPrevPage.Enabled := HasPages and (Preview.SelPageIndex <> 0); - tbGoToNextPage.Enabled := HasPages and (Preview.SelPageIndex <> Preview.PageCount - 1); - tbGoToLastPage.Enabled := HasPages and (Preview.SelPageIndex <> Preview.PageCount - 1); - FseActivePage.Enabled := Preview.PageCount > 1; - - tbHelp.Enabled := IsEnabled(peoHelp); - - { menus enabled} - miFileDesign.Enabled := tbReportDesigner.Enabled; - miFileRebuild.Enabled := CanRebuild; - miFileSave.Enabled := tbFileSave.Enabled; - miFileLoad.Enabled := tbFileLoad.Enabled; - miFileClose.Enabled := tbFileUnload.Enabled; - miFilePrint.Enabled := tbPrint.Enabled; - miFilePageSetup.Enabled := tbPageSetup.Enabled; - miFilePrintStyles.Enabled := tbPageSetup.Enabled; - miFilePreferences.Enabled := IsEnabled(peoPreferences); - miFileExit.Enabled := tbClose.Enabled; - - if miFileDesign.Enabled and (ReportLink <> nil) then - miFileDesign.Enabled := IsEnabled(peoReportDesign) and HasPages and ReportLink.CheckToDesign; - - miExplorer.Enabled := IsExplorerAvailable; - miExplorerCreateNewFolder.Enabled := IsExplorerAvailable and ExplorerTree.CanCreateFolder; - miExplorerDelete.Enabled := IsExplorerAvailable and ExplorerTree.CanDeleteSelection; - if miExplorerDelete.Enabled then - miExplorerDelete.ShortCut := ShortCut(VK_DELETE, []) - else - miExplorerDelete.ShortCut := 0; - miExplorerRename.Enabled := IsExplorerAvailable and ExplorerTree.CanRenameSelectedItem; - miExplorerProperties.Enabled := IsExplorerAvailable and ExplorerTree.CanShowPropertySheetsForSelectedItem; - - miFormatAutoText.Enabled := IsAutoHFTextEntriesAvailable; - miFormatTitle.Enabled := ReportLink.CanChangeTitle; - miFormatPageBackground.Enabled := tbPageBackground.Enabled; - miFormatShowHideEmptyPages.Enabled := HasPages and not IsBuilding and not IsPrinting; - if ReportLink <> nil then - begin - miFormatShowHideEmptyPages.Visible := ReportLink.EmptyPagesCanExist; - miFormatShowHideEmptyPages.Checked := ReportLink.ShowEmptyPages; - end; - miFormatShrinkToPageWidth.Enabled := tbShrinkToPageWidth.Enabled; - miFormatShrinkToPageWidth.Checked := tbShrinkToPageWidth.Down; - - miViewMargins.Checked := ShowPageMargins; - miViewStatusBar.Checked := ShowStatusBar; - miViewMarginBar.Checked := ShowMarginBar; - miViewExplorer.Visible := IsExplorerAvailable; - miViewExplorer.Checked := ShowExplorer; - miViewThumbnails.Checked := ShowThumbnails; - miViewPageHeaders.Enabled := HasPages and not IsBuilding and not IsPrinting; - miViewPageFooters.Enabled := HasPages and not IsBuilding and not IsPrinting; - if ReportLink <> nil then - begin - miViewPageHeaders.Checked := ReportLink.ShowPageHeader; - miViewPageFooters.Checked := ReportLink.ShowPageFooter; - end; - - miViewZoom.Enabled := HasPages; - if miViewZoom.Enabled then - begin - miZoomPageWidth.Enabled := tbPageWidth.Enabled; - miZoomPercent100.Enabled := tbPercent100.Enabled; - miZoomWholePage.Enabled := tbOnePage.Enabled; - miZoomTwoPages.Enabled := tbTwoPage.Enabled; - miZoomFourPages.Enabled := tbFourPage.Enabled; - miZoomWidenToSourceWidth.Enabled := tbWidenToSourceWidth.Enabled; - end; - - miGoToPage.Enabled := HasPages; - miGotoFirstPage.Enabled := tbGotoFirstPage.Enabled; - miGotoPrevPage.Enabled := tbGotoPrevPage.Enabled; - miGotoNextPage.Enabled := tbGotoNextPage.Enabled; - miGotoLastPage.Enabled := tbGotoLastPage.Enabled; - - miHelp.Enabled := tbHelp.Enabled; - - if ToolBar.Visible then - begin - tbReportDesigner.Visible := IsVisible(pvoReportDesign); - tbFileLoad.Visible := IsCommandLoadReportVisible; - tbFileUnload.Visible := IsCommandUnloadReportVisible; - tbFileSave.Visible := IsCommandSaveReportVisible; - - tbSeparator1.Visible := tbReportDesigner.Visible; - - tbPrint.Visible := IsVisible(pvoPrint); - tbPrintDialog.Visible := IsVisible(pvoPrint); - tbPageSetup.Visible := IsVisible(pvoPageSetup); - tbSeparator2.Visible := (IsVisible(pvoPrint) or IsVisible(pvoPageSetup)); - - tbPageBackground.Visible := IsVisible(pvoPageBackground); - tbSeparator3.Visible := IsVisible(pvoPageBackground); - - tbHelp.Visible := IsVisible(pvoHelp); - //tbSeparator8.Visible := tbHelp.Visible; - end; - - { menus visibility } - miFileLoad.Visible := IsCommandLoadReportVisible; - miFileSave.Visible := IsCommandSaveReportVisible; - miFileClose.Visible := IsCommandUnloadReportVisible; - miFilePreferences.Visible := IsVisible(pvoPreferences); - miLine1.Visible := miFilePreferences.Visible; - - miFileDesign.Visible := IsVisible(pvoReportDesign); - miLine2.Visible := miFileDesign.Visible; - miFilePrint.Visible := tbPrint.Visible; - miFilePageSetup.Visible := tbPageSetup.Visible; - miFilePrintStyles.Visible := CanPrintStyle; - miFormatPageBackground.Visible := tbPageBackground.Visible; - miLine3.Visible := (miFilePrint.Visible or miFilePageSetup.Visible or miFilePrintStyles.Visible); - miLine13.Visible := miFormatPageBackground.Visible; - - miFormatAutoText.Visible := (ReportLink <> nil) and (ReportLink.StyleManager <> nil); - miLine14.Visible := miFormatAutoText.Visible; - - miViewMargins.Checked := (povMargins in Preview.OptionsView); - miHelp.Visible := IsVisible(pvoHelp); - - miExplorer.Visible := IsExplorerAvailable; - //miLine30.Visible := IsExplorerAvailable; - - pmiFlatBtns.Checked := FFlatCtrls; {popup} - pmiLargeBtns.Checked := FLargeBtns; {popup} - miViewFlatTBtns.Checked := FFlatCtrls; - miViewLargeTBtns.Checked := FLargeBtns; - - if ToolBar.Visible then - begin - with TdxPSSpinEdit(FseActivePage) do - if Enabled then - begin - MinValue := 1; - if ReportLink <> nil then - begin - MaxValue := ReportLink.PageCount; - Value := ReportLink.VirtualPageIndexToRealPageIndex(FPreview.SelPageIndex) + 1; - end - end - else - AsInteger := -1; - end; - - UpdateExplorerContextCommands; - finally - CancelUpdate; - end; - ToolBar.Update; -end; - -procedure TdxfmStdPreview.cbxPredefinedZoomClick(Sender: TObject); -begin - SetZoomFactorByText(FcbxPredefinedZoom.Text); - UpdateControls; - FcbxPredefinedZoom.Text := AddPercentSign(IntToStr(ZoomFactor)); -end; - -procedure TdxfmStdPreview.cbxPredefinedZoomCloseUp(Sender: TObject; AAccept: Boolean); -begin - Windows.SetFocus(Preview.Handle); -end; - -procedure TdxfmStdPreview.cbxPredefinedZoomExit(Sender: TObject); -begin - cbxPredefinedZoomClick(nil); -end; - -procedure TdxfmStdPreview.cbxPredefinedZoomKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if (Key = VK_RETURN) or (Key = VK_ESCAPE) then - Windows.SetFocus(Preview.Handle); -end; - -procedure TdxfmStdPreview.seActivePageExit(Sender: TObject); -begin - if Locked then Exit; - DoActivePageChanged(TdxPSSpinEdit(FseActivePage).AsInteger - 1); -end; - -procedure TdxfmStdPreview.seKeyPress(Sender: TObject; var Key: Char); -begin - if Key = Char(VK_RETURN) then seActivePageExit(Sender); -end; - -procedure TdxfmStdPreview.seActivePageButtonClick(Sender: TObject; - ButtonType: TdxButtonType; Button: TUDBtnType); -begin - case Button of - btNext: - GoToNextPage; - btPrev: - GoToPrevPage; - end; -end; - -procedure TdxfmStdPreview.OptionsClick(Sender: TObject); -begin - DoShowOptionsDlg; -end; - -procedure TdxfmStdPreview.SaveToRegistry(const APath: string); -begin - inherited; - SavePropertiesToRegistry(APath) -end; - -procedure TdxfmStdPreview.LoadFromRegistry(const APath: string); -begin - inherited; - LoadPropertiesFromRegistry(APath); -end; - -procedure TdxfmStdPreview.SavePropertiesToRegistry(const APath: string); - - procedure DoStore(const ARegistryPath: string); - begin - with TRegistry.Create do - try - if OpenKey(ARegistryPath, True) then - try - WriteBool(sdxFlatCtrls, FlatCtrls); - WriteBool(sdxLargeBtns, LargeBtns); - except - on ERegistryException do - else - raise; - end; - finally - Free; - end; - end; - -begin - DoStore(APath); - if IsDesignTime and (dxPSEngine.RegistryPath <> '') then - DoStore(dxPSEngine.RegistryPath); -end; - -procedure TdxfmStdPreview.DoShowExplorerPopup(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - if Button = mbRight then - pmExplorer.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y); -end; - -procedure TdxfmStdPreview.LoadPropertiesFromRegistry(const APath: string); -var - Registry: TRegistry; -begin - Registry := TRegistry.Create; - with Registry do - try - if OpenKey(APath, False) then - try - if ValueExists(sdxFlatCtrls) then - FlatCtrls := ReadBool(sdxFlatCtrls); - if ValueExists(sdxLargeBtns) then - LargeBtns := ReadBool(sdxLargeBtns); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Free; - end; -end; - -procedure TdxfmStdPreview.pmToolBarPopup(Sender: TObject); -begin - pmiFlatBtns.Checked := FlatCtrls; - pmiLargeBtns.Checked := LargeBtns; -end; - -procedure TdxfmStdPreview.pmPreviewPopup(Sender: TObject); -begin - pmiReportDesign.Enabled := miFileDesign.Enabled; - pmiReportDesign.Visible := miFileDesign.Visible; - pmiPageSetup.Enabled := miFilePageSetup.Enabled; - pmiPageSetup.Visible := miFilePageSetup.Visible; - pmiFilePrintStyles.Visible := CanPrintStyle; - CheckItem(pmiFilePrintStyles); - miLine11.Visible := pmiReportDesign.Visible; - pmiReportShrinkToPageWidth.Checked := miFormatShrinkToPageWidth.Checked; - pmiReportShrinkToPageWidth.Enabled := miFormatShrinkToPageWidth.Enabled; - pmiZoom.Enabled := FPreview.PageCount > 0; - pmiZoomPercent100.Enabled := miZoomPercent100.Enabled; - pmiZoomPageWidth.Enabled := miZoomPageWidth.Enabled; - pmiZoomWholePage.Enabled := miZoomWholePage.Enabled; - pmiZoomTwoPages.Enabled := miZoomTwoPages.Enabled; - pmiZoomFourPages.Enabled := miZoomFourPages.Enabled; - pmiZoomWidenToSourceWidth.Enabled := miZoomWidenToSourceWidth.Enabled; - pmiGotoFirstPage.Enabled := miGotoFirstPage.Enabled; - pmiGotoPrevPage.Enabled := miGotoPrevPage.Enabled; - pmiGotoNextPage.Enabled := miGotoNextPage.Enabled; - pmiGotoLastPage.Enabled := miGotoLastPage.Enabled; -end; - -procedure TdxfmStdPreview.pmPrintStylesPopup(Sender: TObject); -begin - CheckItem(TPopupMenu(Sender).Items); -end; - -procedure TdxfmStdPreview.miFormatAutoTextClick(Sender: TObject); -begin - if IsAutoHFTextEntriesAvailable then - ReportLink.StyleManager.ShowAutoHFTextEntriesDlg; -end; - -procedure TdxfmStdPreview.miFormatDateTimeClick(Sender: TObject); -begin - DoShowFormatDateTimeDlg; -end; - -procedure TdxfmStdPreview.miFormatPageNumberingClick(Sender: TObject); -begin - DoShowFormatPageNumbersDlg; -end; - -procedure TdxfmStdPreview.miViewPageHeadersClick(Sender: TObject); -begin - if Locked then Exit; - with TMenuItem(Sender) do - begin - Checked := not Checked; - DoShowPageHeaders(Checked); - end; -end; - -procedure TdxfmStdPreview.miViewPageFootersClick(Sender: TObject); -begin - if Locked then Exit; - with TMenuItem(Sender) do - begin - Checked := not Checked; - DoShowPageFooters(Checked); - end; -end; - -procedure TdxfmStdPreview.ViewExplorerClick(Sender: TObject); -begin - if not Locked then - ShowExplorer := not ShowExplorer; -end; - -procedure TdxfmStdPreview.ViewThumbnailsClick(Sender: TObject); -begin - if not Locked then - ShowThumbnails := not ShowThumbnails; -end; - -procedure TdxfmStdPreview.Timer1Timer(Sender: TObject); -begin - tbPrint.Hint := cxGetResourceString(@sdxHintFilePrint) + GetCurrentPrinterAsHint; - TTimer(Sender).Enabled := False; -end; - -procedure TdxfmStdPreview.FileSaveClick(Sender: TObject); -const - BtnClicked: Boolean = False; -begin - if BtnClicked then Exit; - BtnClicked := True; - try - if not IsExplorerAvailable then tbFileSave.Down := True; - try - DoExplorerCreateNewItem; - finally - if not IsExplorerAvailable then tbFileSave.Down := False; - end; - finally - BtnClicked := False; - end; -end; - -procedure TdxfmStdPreview.ExplorerCreateNewFolderClick(Sender: TObject); -begin - DoExplorerCreateNewFolder; -end; - -procedure TdxfmStdPreview.ExplorerDeleteClick(Sender: TObject); -begin - DoExplorerDeleteItem; -end; - -procedure TdxfmStdPreview.ExplorerRenameClick(Sender: TObject); -begin - DoExplorerRenameItem; -end; - -procedure TdxfmStdPreview.ExplorerPropertiesClick(Sender: TObject); -begin - DoExplorerItemShowPropertySheets; -end; - -procedure TdxfmStdPreview.FileLoadClick(Sender: TObject); -const - BtnClicked: Boolean = False; -begin - if BtnClicked then Exit; - BtnClicked := True; - try - if not IsExplorerAvailable then tbFileLoad.Down := True; - try - DoExplorerLoadItemData; - finally - if not IsExplorerAvailable then tbFileLoad.Down := False; - end; - finally - BtnClicked := False; - end; -end; - -procedure TdxfmStdPreview.FileCloseClick(Sender: TObject); -begin - DoExplorerUnloadItemData; -end; - -procedure TdxfmStdPreview.pmExplorerPopup(Sender: TObject); -begin - UpdateExplorerContextCommands; - pmiExplorerLoadData.Enabled := CanLoadReport; - pmiExplorerUnloadData.Enabled := CanUnloadReport; - pmiExplorerCreateFolder.Enabled := IsExplorerAvailable and ExplorerTree.CanCreateFolder; - pmiExplorerDelete.Enabled := IsExplorerAvailable and ExplorerTree.CanDeleteSelection; - pmiExplorerRename.Enabled := IsExplorerAvailable and ExplorerTree.CanRenameSelectedItem; - pmiExplorerProperties.Enabled := IsExplorerAvailable and ExplorerTree.CanShowPropertySheetsForSelectedItem; -end; - -procedure TdxfmStdPreview.miFormatTitleClick(Sender: TObject); -begin - DoFormatTitle; -end; - -procedure TdxfmStdPreview.pmiThumbnailsSizeClick(Sender: TObject); -begin - ThumbnailsSize := TdxPSThumbnailsSize(TTagToInt(TComponent(Sender).Tag)); -end; - -procedure TdxfmStdPreview.pmThumbnailsPopup(Sender: TObject); -begin - if ThumbnailsSize = tsSmall then - pmiSmallThumbnails.Checked := True - else - pmiLargeThumbnails.Checked := True; -end; - -procedure TdxfmStdPreview.WMInitMenu(var Message: TWMInitMenu); -begin - inherited; - CheckItem(miFilePrintStyles); -end; - -initialization - dxPSRegisterPreviewWindow(TdxfmStdPreview); - -finalization - dxPSUnregisterPreviewWindow(nil); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSPrvw.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSPrvw.pas deleted file mode 100644 index 8fe4aeae..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSPrvw.pas +++ /dev/null @@ -1,3436 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSPrVw; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, SysUtils, Messages, Controls, ExtCtrls, ComCtrls, Buttons, - ImgList, Dialogs, Forms, dxPSGlbl, dxPSCore, dxPSESys, dxPrevw, dxPSPrVwOpt, - dxPrnPg, dxExtCtrls, dxBkgnd; - -type - TfmPreviewStatusSection = (ssCurrentPage, ssPageCount, ssPaperSize, ssStatus); - TfmPreviewStatusSections = set of TfmPreviewStatusSection; - - TdxPSExplorerVisibiltyState = (evsUndefined, evsHidden, evsShown); - TdxPSThumbnailsVisibiltyState = (tvsUndefined, tvsHidden, tvsShown); - TdxPSPageMarginsVisibilityState = (mvsUndefined, mvsHidden, mvsShown); - - TdxPSPreviewWindowStatusBarMode = (psbmNormal, psbmProgress); - - TCustomdxPSPreviewWindow = class; - - TdxPSPreviewExplorerChangeNotifier = class(TdxPSExplorerChangeNotifierAdapter) - private - FPreview: TCustomdxPSPreviewWindow; - protected - procedure ItemDataLoaded(AnItem: TdxPSExplorerItem); override; - procedure ItemDataUnloaded(AnItem: TdxPSExplorerItem); override; - public - constructor Create(APreview: TCustomdxPSPreviewWindow); - property Preview: TCustomdxPSPreviewWindow read FPreview; - end; - - TCustomdxPSPreviewWindow = class(TBasedxPreviewWindow, IdxPSExplorerTreeContainerHost) - private - FBuildEventsSubscriber: TdxEventSubscriber; - FComponentPrinter: TCustomdxComponentPrinter; - FCurrentProgressValue: Integer; - FEnableOptions: TdxPreviewEnableOptions; - FFullPageCount: Integer; - FHFEditPart: TdxPageTitlePart; - FHFFunctionList: TStringList; - FHFTextEntriesChangedSubscriber: TdxEventSubscriber; - FLastOpCompleted: Integer; - FLastValidZoomFactor: Integer; - FLockPageSelection: Boolean; - FPredefinedZooms: TStringList; - FPrintEventsSubscriber: TdxEventSubscriber; - FProgressBar: TProgressBar; - FSaveExplorerPaneWidth: Integer; - FSaveExplorerVisibility: TdxPSExplorerVisibiltyState; - FSavePageMarginsVisibility: TdxPSPageMarginsVisibilityState; - FSaveThumbnailsPaneWidth: Integer; - FSaveThumbnailsVisibility: TdxPSThumbnailsVisibiltyState; - FSaveZoomPosition: Boolean; - FShowExplorer: Boolean; - FShowMarginBar: Boolean; - FShowStatusBar: Boolean; - FShowThumbnails: Boolean; - FState: TdxPSPreviewState; - FStyleEventsSubscriber: TdxEventSubscriber; - FThumbnailsSize: TdxPSThumbnailsSize; - FUpdateCount: Integer; - FVisibleOptions: TdxPreviewVisibleOptions; - function GetExplorer: TCustomdxPSExplorer; - function GetExplorerPaneWidth: Integer; - function GetFlat: Boolean; - function GetIsExplorerAvailable: Boolean; - function GetIsExplorerMode: Boolean; - function GetPrinterPage: TdxPrinterPage; - function GetProgressStatusPanel: TStatusPanel; - function GetShowMarginBar: Boolean; - function GetShowPageMargins: Boolean; - function GetShowStatusBar: Boolean; - function GetStatusTextPanel: TStatusPanel; - function GetThumbnailsPaneWidth: Integer; - procedure SetExplorerPaneWidth(Value: Integer); - procedure SetShowMarginBar(Value: Boolean); - procedure SetShowPageMargins(Value: Boolean); - procedure SetShowStatusBar(Value: Boolean); - procedure SetThumbnailsPaneWidth(Value: Integer); - - procedure DrawStatusFrame(AStatusBar: TStatusBar; var R: TRect); - procedure DrawStatusText(AStatusBar: TStatusBar; APanel: TStatusPanel; - const R: TRect; AHighlighted, AMarginBar: Boolean); - procedure FillEffectsApply(Sender: TObject); - - procedure ExplorerClose(Sender: TObject); - procedure ExplorerSplitterCanResize(Sender: TObject; var NewSize: Integer; var Accept: Boolean); - procedure ExplorerSplitterMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure ExplorerToolBarResize(Sender: TObject); - procedure MarginBarDblClick(Sender: TObject); - procedure MarginBarDrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect); - procedure PreviewAfterDragMargin(Sender: TObject; AMargin: TdxPreviewPageMargin); - procedure PreviewBeforeDragMargin(Sender: TObject; AMargin: TdxPreviewPageMargin); - procedure PreviewCalcPageCount(Sender: TObject); - procedure PreviewCanShowMarginHint(Sender: TObject; var ACanShowHint: Boolean); - procedure PreviewDblClick(Sender: TObject); - procedure PreviewDragMargin(Sender: TObject; AMargin: TdxPreviewPageMargin); - procedure PreviewMarginsChanged(Sender: TObject; AMargin: TdxPreviewPageMargin); - procedure PreviewSelectedPageChanged(Sender: TObject; APageIndex: Integer); - procedure PreviewSelectingPage(Sender: TObject; APageIndex: Integer; var ACanSelect: Boolean); - procedure PreviewZoomFactorChanged(Sender: TObject); - procedure PreviewZoomModeChanged(Sender: TObject); - procedure StatusBarDblClick(Sender: TObject); - procedure StatusBarDrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect); - procedure StatusBarMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); - procedure ThumbnailsPreviewSelectedPageChanged(Sender: TObject; APageIndex: Integer); - procedure ThumbnailsSplitterCanResize(Sender: TObject; var NewSize: Integer; var Accept: Boolean); - procedure ThumbnailsSplitterMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - - procedure EndGenerateReport(Sender: TObject; AReportLink: TBasedxReportLink); - procedure GenerateReportProgress(Sender: TObject; AReportLink: TBasedxReportLink; APercentDone: Double); - procedure StartGenerateReport(Sender: TObject; AReportLink: TBasedxReportLink); - - procedure EndPrint(Sender: TObject; AReportLink: TBasedxReportLink); - procedure NewPage(Sender: TObject; AReportLink: TBasedxReportLink; APageIndex: Integer); - procedure StartPrint(Sender: TObject; AReportLink: TBasedxReportLink; FullPageCount: Integer); - - procedure LoadZooms; - procedure UpdateMarginBar; - procedure UpdateStatusText; - procedure WMAppCommand(var Message: TMessage); message WM_APPCOMMAND; - procedure WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); message WM_GETMINMAXINFO; - procedure WMSettingChange(var Message: TWMSettingChange); message WM_SETTINGCHANGE; - procedure WMSize(var Message: TWMSize); message WM_SIZE; - protected - FExplorerChangeNotifier: TdxPSPreviewExplorerChangeNotifier; - FExplorerCloseButton: TSpeedButton; - FExplorerPane: TPanel; - FExplorerSplitter: TSplitter; - FExplorerToolBar: TPanel; - FExplorerTree: TCustomdxPSExplorerTreeContainer; - FExplorerTreeHost: TPanel; - FMarginBar: TStatusBar; - FPreview: TdxPreview; - FPreviewPane: TPanel; - FStatusBar: TStatusBar; - FThumbnailsPane: TPanel; - FThumbnailsPreview: TdxPreview; - FThumbnailsSplitter: TSplitter; - - FAreMarginsValid: Boolean; - FReleased: Boolean; - - procedure Activate; override; - procedure DoClose(var AAction: TCloseAction); override; - procedure DoShow; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure WndProc(var message: TMessage); override; - - function GetActivePageIndex: Integer; override; - function GetBackground: TdxBackground; override; - function GetComponentPrinter: TCustomdxComponentPrinter; override; - function GetExplorerTree: TCustomdxPSExplorerTreeContainer; override; - function GetHFEditPart: TdxPageTitlePart; override; - function GetPageCount: Integer; override; - function GetPreviewEnableOptions: TdxPreviewEnableOptions; override; - function GetPreviewVisibleOptions: TdxPreviewVisibleOptions; override; - function GetSaveZoomPosition: Boolean; override; - function GetShowExplorer: Boolean; override; - function GetShowThumbnails: Boolean; override; - function GetState: TdxPSPreviewState; override; - function GetStatusPanelBounds(AStatusBar: TStatusBar; AIndex: Integer): TRect; - function GetThumbnailsSize: TdxPSThumbnailsSize; override; - function GetVisiblePageSize: TPoint; override; - function GetZoomFactor: Integer; override; - procedure SetActivePageIndex(Value: Integer); override; - procedure SetBackground(const Value: TdxBackground); override; - procedure SetComponentPrinter(const Value: TCustomdxComponentPrinter); override; - procedure SetHFEditPart(const Value: TdxPageTitlePart); override; - procedure SetPageCount(Value: Integer); override; - procedure SetPreviewEnableOptions(const Value: TdxPreviewEnableOptions); override; - procedure SetPreviewVisibleOptions(const Value: TdxPreviewVisibleOptions); override; - procedure SetSaveZoomPosition(Value: Boolean); override; - procedure SetShowExplorer(Value: Boolean); override; - procedure SetShowThumbnails(Value: Boolean); override; - procedure SetState(const Value: TdxPSPreviewState); override; - procedure SetThumbnailsSize(const Value: TdxPSThumbnailsSize); override; - procedure SetZoomFactor(Value: Integer); override; - - procedure Resize; override; - - procedure CreationComplete; override; - - procedure BeginUpdate; override; - procedure CancelUpdate; override; - procedure EndUpdate; override; - function Locked: Boolean; override; - - {$IFDEF OLEDRAGANDDROP} - function DoCanAccept: Boolean; override; - {$ENDIF} - - function CanChangeMargins: Boolean; - function CanClosePreviewWindow: Boolean; virtual; - function CanDesign: Boolean; - function CanLoadReport: Boolean; - function CanPageSetup: Boolean; - function CanPrint: Boolean; - function CanPrintDialog: Boolean; - function CanPrintStyle: Boolean; - function CanRebuild: Boolean; - function CanSaveReport: Boolean; - function CanUnloadReport: Boolean; - function IsCommandLoadReportVisible: Boolean; - function IsCommandSaveReportVisible: Boolean; - function IsCommandUnloadReportVisible: Boolean; - - procedure DoActivePageChanged(AValue: Integer); - procedure DoClearHF; - procedure DoDesignReport; - procedure DoExplorerButtonsPosUpdate; - procedure DoExplorerCreateNewFolder; - procedure DoExplorerCreateNewItem; - procedure DoExplorerDeleteItem; - function DoExplorerItemShowPropertySheets: Boolean; - procedure DoExplorerLoadItemData; - procedure DoExplorerShowToggled(Value: Boolean); - procedure DoExplorerRenameItem; - procedure DoExplorerUnloadItemData; - procedure DoFormatTitle; - procedure DoInsertHF(const S: string); - procedure DoInvokeHelp; - procedure DoLoadReportLinkDataFromFile; - procedure DoPageSetupReport(APageIndex: Integer); - procedure DoPrintReport(AShowDialog: Boolean); - procedure DoSaveReportLinkDataToFile; - procedure DoSetupZoomFactor(AZoomFactor, APageXCount, APageYCount: Integer; - AZoomMode: TdxPreviewZoomMode); - procedure DoShowEmptyPages(Value: Boolean); - procedure DoShowFormatDateTimeDlg; - procedure DoShowFormatPageNumbersDlg; - procedure DoShowHFBackgroundDlg(const Pt: TPoint); - procedure DoShowMultiplySelectPagesDlg(AImageList:TCustomImageList; - AImageIndex: Integer; const Pt: TPoint; AYShift: Integer); - procedure DoShowOptionsDlg; - procedure DoShowPageBackgroundDlg(const Pt: TPoint); - procedure DoShowPageFooters(Value: Boolean); - procedure DoShowPageHeaders(Value: Boolean); - procedure DoShowZoomDlg; - procedure DoShrinkToPageWidth(Value: Boolean); - procedure DoThumbnailsToggleShow(Value: Boolean); - procedure DoUnloadReportLinkData; - - procedure FixupPreviewWidth; - procedure PreviewPaneResize(Sender: TObject); - procedure ThumbnailsPreviewResize(Sender: TObject); - procedure UpdateThumbnailsSize; - - function IsAutoHFTextEntriesAvailable: Boolean; - function IsBuilding: Boolean; - function IsEnabled(AnOption: TdxPreviewEnableOption): Boolean; - function IsPrinting: Boolean; - function IsProgressState: Boolean; - function IsSizeGripActuallyShown: Boolean; - function IsStatusTextPanel(APanel: TStatusPanel): Boolean; - function IsVisible(AnOption: TdxPreviewVisibleOption): Boolean; - procedure InvalidateStatusPanel(AStatusBar: TStatusBar; AIndex: Integer); - procedure InvalidatePagesHeadersOrFooters; - function IsMarginValueStatusPanel(APanel: TStatusPanel): Boolean; - function MarginStatusPanel(AMargin: TdxPreviewPageMargin): TStatusPanel; - procedure PrepareProgress; - function ProgressBarGetMaxValue: Integer; - procedure ProgressBarHide; - procedure ProgressBarPlace; - procedure ProgressBarRefresh; - procedure ProgressBarShow; - procedure UnprepareProgress; - procedure RefreshStatusBar(AStatusSections: TfmPreviewStatusSections); - procedure RefreshMarginBar(AMargin: TdxPreviewPageMargin); - function SectionStatusPanel(AStatusSection: TfmPreviewStatusSection): TStatusPanel; - procedure SectionStatusPanelSetText(AStatusSection: TfmPreviewStatusSection; const AText: string); - procedure SetZoomFactorByText(const AText: string); - procedure UpdateStatusBarPanelWidths(AStatusBar: TStatusBar); - - procedure LoadPropertiesFromRegistry(const APath: string); - procedure SavePropertiesToRegistry(const APath: string); - procedure SavePreferences(AData: TdxPreviewOptionsDlgData); - - procedure CreateControls; virtual; - procedure CreateEventSubscribers; virtual; - procedure CreateExplorerPane; virtual; - procedure CreateExplorerSplitter; virtual; - procedure CreateExplorerToolBar; virtual; - procedure CreateExplorerTreeHost; virtual; - procedure CreateMarginBar; virtual; - procedure CreatePreview; virtual; - procedure CreatePreviewPane; virtual; - procedure CreateProgressBar; virtual; - procedure CreateStatusBar; virtual; - procedure CreateThumbnailsPane; virtual; - procedure CreateThumbnailsSplitter; virtual; - procedure CreateThumbnailsPreview; virtual; - procedure RefreshStatusPanels(AStatusBarMode: TdxPSPreviewWindowStatusBarMode); virtual; - - procedure DoAfterPrintReport(AShowDialog: Boolean); virtual; - procedure DoPreviewAfterDragMargin(APreview: TdxPreview; AMargin: TdxPreviewPageMargin); virtual; - procedure DoPreviewBeforeDragMargin(APreview: TdxPreview; AMargin: TdxPreviewPageMargin); virtual; - procedure DoPreviewDblClick(APreview: TdxPreview); virtual; - procedure DoPreviewDragMargin(APreview: TdxPreview; AMargin: TdxPreviewPageMargin); virtual; - procedure DoPreviewMarginChanged(APreview: TdxPreview; AMargin: TdxPreviewPageMargin); virtual; - procedure DoPreviewZoomFactorChanged(APreview: TdxPreview); virtual; - procedure DoPreviewZoomModeChanged(APreview: TdxPreview); virtual; - procedure DoShowHFToolBar(Value: Boolean); virtual; - function GetPreviewCanShowMarginHint(APreview: TdxPreview): Boolean; virtual; - procedure HFTextEntriesChanged; virtual; - procedure LoadStrings; virtual; - procedure StyleListChanged(Sender: TObject); virtual; - function ValidateMargins: Boolean; virtual; - - { IdxPSExplorerTreeContainerHost } - function IdxPSExplorerTreeContainerHost.GetFlat = IdxPSExplorerTreeContainerHost_GetFlat; - function IdxPSExplorerTreeContainerHost.GetReportLink = IdxPSExplorerTreeContainerHost_GetReportLink; - function IdxPSExplorerTreeContainerHost_GetFlat: Boolean; - function IdxPSExplorerTreeContainerHost_GetReportLink: TBasedxReportLink; - function GetTreeContainerParent: TWinControl; - procedure UpdateState; - - property HFFunctionList: TStringList read FHFFunctionList; - property PredefinedZooms: TStringList read FPredefinedZooms; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure AfterConstruction; override; - procedure BeforeDestruction; override; - function CloseQuery: Boolean; override; - - procedure GoToFirstPage; override; - procedure GoToLastPage; override; - procedure GoToNextPage; override; - procedure GoToPrevPage; override; - procedure InitContent; override; - procedure InvalidateContent; override; - procedure InvalidatePage(APageIndex: Integer); override; - procedure InvalidateAllPages; override; - procedure InvalidatePagesContent; override; - procedure InvalidatePagesHeaderContent; override; - procedure InvalidatePagesFooterContent; override; - procedure LoadFromRegistry(const APath: string); override; - procedure SaveToRegistry(const APath: string); override; - procedure UpdateControls; override; - - property Explorer: TCustomdxPSExplorer read GetExplorer; - property IsExplorerAvailable: Boolean read GetIsExplorerAvailable; - property ExplorerCloseButton: TSpeedButton read FExplorerCloseButton; - property ExplorerPane: TPanel read FExplorerPane; - property ExplorerPaneWidth: Integer read GetExplorerPaneWidth write SetExplorerPaneWidth; - property ExplorerSplitter: TSplitter read FExplorerSplitter; - property ExplorerToolBar: TPanel read FExplorerToolBar; - property ExplorerTreeHost: TPanel read FExplorerTreeHost; - property Flat: Boolean read GetFlat; - property IsExplorerMode: Boolean read GetIsExplorerMode; - property MarginBar: TStatusBar read FMarginBar; - property Preview: TdxPreview read FPreview; - property PreviewPane: TPanel read FPreviewPane; - property ProgressBar: TProgressBar read FProgressBar; - property ProgressStatusPanel: TStatusPanel read GetProgressStatusPanel; - property PrinterPage: TdxPrinterPage read GetPrinterPage; - property ShowMarginBar: Boolean read GetShowMarginBar write SetShowMarginBar; - property ShowPageMargins: Boolean read GetShowPageMargins write SetShowPageMargins; - property ShowStatusBar: Boolean read GetShowStatusBar write SetShowStatusBar; - property StatusBar: TStatusBar read FStatusBar; - property StatusTextPanel: TStatusPanel read GetStatusTextPanel; - property ThumbnailsPane: TPanel read FThumbnailsPane; - property ThumbnailsPaneWidth: Integer read GetThumbnailsPaneWidth write SetThumbnailsPaneWidth; - property ThumbnailsPreview: TdxPreview read FThumbnailsPreview; - property ThumbnailsSplitter: TSplitter read FThumbnailsSplitter; - end; - - TdxPSStatusBar = class(TStatusBar) - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure Resize; override; - end; - -function GetCurrentPrinterAsHint: string; - -function AddStatusPanel(AStatusBar: TStatusBar; AAlignment: TAlignment; - AStyle: TStatusPanelStyle; ABevel: TStatusPanelBevel; const AText: string; - AWidth: Integer): TStatusPanel; - -// runtime created component names - -const - sdxExplorerCloseButton = 'ExplorerCloseButton'; // Don't localize - sdxExplorerPane = 'ExplorerPane'; // Don't localize - sdxExplorerSplitter = 'ExplorerSplitter'; // Don't localize - sdxExplorerToolBar = 'ExplorerToolBar'; // Don't localize - sdxExplorerTreeHost = 'ExplorerTreeHost'; // Don't localize - sdxMarginBar = 'MarginBar'; // Don't localize - sdxPreviewControl = 'PreviewControl'; // Don't localize - sdxPreviewPane = 'PreviewPane'; // Don't localize - sdxProgressBar = 'ProgressBar'; // Don't localize - sdxStatusBar = 'StatusBar'; // Don't localize - sdxThumbnailsPane = 'ThumbnailsPane'; // Don't localize - sdxThumbnailsPreviewControl = 'ThumbnailsPreview'; // Don't localize - sdxThumbnailsSplitter = 'ThumbnailsSplitter'; // Don't localize - -implementation - -uses - CommCtrl, Math, Registry, Graphics, ShlObj, ShellApi, -{$IFDEF DELPHI7} - UxTheme, Themes, -{$ENDIF} -{$IFDEF OLEDRAGANDDROP} - ActiveX, -{$ENDIF} - dxCore, cxClasses, dxPSRes, - dxPrnDev, dxPSUtl, dxPgsDlg, dxfmClr, dxfmMnPg, dxfmDTFmt, dxfmPNFmt, dxPSEngn, - dxPSExtDlgs, dxPSPopupMan, dxPSEvnt, dxfmZoom; - -type - TSplitterAccess = class(TSplitter); - -function MinPreviewSize: TPoint; -begin - Result.X := 200; - Result.Y := 200; -end; - -const - CloseGlyphIndex = 114; - DefaultExplorerPaneWidth: Integer = 220; - DefaultThumbnailsPaneWidth: Integer = 400; - PredefinedZoomValueCount: Integer = 8; - //MinPreviewSize: TPoint = (X: 200; Y: 200); - - Bevels: array[Boolean] of TStatusPanelBevel = (pbLowered, pbNone); - LookAndFeels: array[Boolean] of TdxPreviewLookAndFeel = (plfStandard, plfUltraFlat); - pssAll: TfmPreviewStatusSections = [ssCurrentPage, ssPageCount, ssPaperSize, ssStatus]; - - WMPS_UPDATEMARGINS = WM_DX + 25; - WMPS_UPDATESTATUSPROGRESS = WM_DX + 26; - - // used as registry key(value) names when storing properties in registry - - //sdxPreviewControl = 'PreviewControl'; // Don't localize - sdxShowMarginBar = 'MarginBar'; // Don't localize - sdxShowStatusBar = 'StatusBar'; // Don't localize - sdxExplorerVisibilityState = 'ExplorerVisibility'; // Don't localize - sdxExplorerPaneWidth = 'ExplorerPaneWidth'; // Don't localize - sdxThumbnailsVisibilityState = 'ThumbnailsVisibility'; // Don't localize - sdxThumbnailsPaneWidth = 'ThumbnailsPaneWidth'; // Don't localize - -var - ClosePaneGlyph: TBitmap; - -{function IsEscKeyPressed(AWnd: HWND): Boolean; -var - Msg: TMsg; -begin - Result := PeekMessage(Msg, AWnd, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE) and - (LoWord(Msg.wParam) = VK_ESCAPE); -end;} - -{ Color Management - mostly borrowed from dxBar.pas } - -function GetActualColor(AColor: COLORREF): COLORREF; -var - DC: HDC; -begin - DC := GetDC(0); - Result := GetNearestColor(DC, AColor); - ReleaseDC(0, DC); -end; - -function GetLightColor(ABtnFaceColorPart, AHighlightColorPart, AWindowColorPart: Integer): TColor; -var - ABtnFaceColor, AHighlightColor, AWindowColor: TColor; - - function GetLightIndex(ABtnFaceValue, AHighlightValue, AWindowValue: Byte): Integer; - begin - Result := - MulDiv(ABtnFaceValue, ABtnFaceColorPart, 100) + - MulDiv(AHighlightValue, AHighlightColorPart, 100) + - MulDiv(AWindowValue, AWindowColorPart, 100); - if Result < 0 then Result := 0; - if Result > 255 then Result := 255; - end; - -begin - ABtnFaceColor := GetSysColor(COLOR_BTNFACE); - AHighlightColor := GetSysColor(COLOR_HIGHLIGHT); - AWindowColor := GetSysColor(COLOR_WINDOW); - if (ABtnFaceColor = 0) or (ABtnFaceColor = $FFFFFF) then - Result := AHighlightColor - else - Result := RGB( - GetLightIndex(GetRValue(ABtnFaceColor), GetRValue(AHighlightColor), GetRValue(AWindowColor)), - GetLightIndex(GetGValue(ABtnFaceColor), GetGValue(AHighlightColor), GetGValue(AWindowColor)), - GetLightIndex(GetBValue(ABtnFaceColor), GetBValue(AHighlightColor), GetBValue(AWindowColor))); -end; - -function GetUltraFlatButtonBorderColor: TColor; -begin - Result := GetActualColor(GetLightColor(-2, 30, 20)); -end; - -function GetUltraFlatButtonDownedColor: TColor; -begin - Result := GetActualColor(GetLightColor(14, 44, 40)); -end; - -function GetUltraFlatButtonSelColor: TColor; -begin - Result := GetActualColor(GetLightColor(-2, 30, 72)); -end; - -{ flat status bars } - -function GetFlatStatusPanelHighlightColor: TColor; -begin - Result := FindNearestColor(GetLightColor(-22, 30, 72)); -end; - -function GetFlatStatusPanelColor: TColor; -var - Offset: Byte; -begin - Offset := (255 - GetGValue(ColorToRGB(clBtnFace))) div 4; - Result := FindNearestColor(OffsetColor(clBtnFace, Offset, Offset, Offset)); -end; - -function GetStatusColor(AStatusBar: TStatusBar): TColor; -begin - Result := AStatusBar.Color; -end; - -function GetStatusPanelBkColor(AStatusBar: TStatusBar; AFlat, AHighlighted: Boolean): TColor; -begin - if AHighlighted then - if AFlat then - Result := GetFlatStatusPanelHighLightColor - else - Result := clHighLight - else - if AFlat then - Result := GetFlatStatusPanelColor - else - Result := GetStatusColor(AStatusBar); - Result := ColorToRGB(Result); -end; - -function GetStatusPanelTextColor(AStatusBar: TStatusBar; AFlat, AHighlighted: Boolean): TColor; -begin - if AFlat or not AHighlighted then - Result := AStatusBar.Font.Color - else - Result := clHighlightText; - Result := ColorToRGB(Result); -end; - -type - TdxPSExplorerToolBar = class(TPanel) - private - FFlat: Boolean; - procedure SetFlat(Value: Boolean); - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - protected - {$IFDEF DELPHI7} - procedure Paint; override; - {$ENDIF} - public - property Flat: Boolean read FFlat write SetFlat; - end; - - TdxPSExplorerCloseButton = class(TSpeedButton) - private - FUltraFlat: Boolean; - protected - procedure Paint; override; - public - property UltraFlat: Boolean read FUltraFlat write FUltraFlat; - end; - -{ TdxPSExplorerToolBar } - -{$IFDEF DELPHI7} - -procedure TdxPSExplorerToolBar.Paint; -var - Details: TThemedElementDetails; - DC: HDC; - F: HFONT; -begin - with ThemeServices do - if ThemesEnabled then - begin - Details := GetElementDetails(thHeaderItemLeftNormal); - DC := Canvas.Handle; - DrawElement(DC, Details, ClientRect, nil); - F := SelectObject(DC, Font.Handle); - DrawText(DC, Details, Caption, ClientRect, DT_LEFT or DT_VCENTER or DT_SINGLELINE, 0); - SelectObject(DC, F); - end - else - inherited; -end; - -{$ENDIF} - -procedure TdxPSExplorerToolBar.SetFlat(Value: Boolean); -begin - if FFlat <> Value then - begin - FFlat := Value; - RecreateWnd; - end; -end; - -procedure TdxPSExplorerToolBar.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - InflateRect(Message.CalcSize_Params^.rgrc[0], -1, -1); -end; - -procedure TdxPSExplorerToolBar.WMNCPaint(var Message: TWMNCPaint); -var - DC: HDC; - R: TRect; -begin - GetWindowRect(Handle, R); - OffsetRect(R, -R.Left, -R.Top); - DC := GetWindowDC(Handle); - try - if Flat then - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNSHADOW)) - else - DrawEdge(DC, R, BDR_RAISEDINNER, BF_RECT); - finally - ReleaseDC(Handle, DC); - end; -end; - -{ TdxPSExplorerCloseButton } - -procedure TdxPSExplorerCloseButton.Paint; -var - R, GlyphRect: TRect; -begin - if UltraFlat then - begin - R := ClientRect; - if MouseInControl then - Canvas.Brush.Color := GetUltraFlatButtonBorderColor - else - Canvas.Brush.Color := clBtnFace; - Canvas.FrameRect(R); - - InflateRect(R, -1, -1); - if MouseInControl then - if FState in [bsDown] then - Canvas.Brush.Color := GetUltraFlatButtonDownedColor - else - Canvas.Brush.Color := GetUltraFlatButtonSelColor - else - Canvas.Brush.Color := clBtnFace; - - Canvas.FillRect(R); - InflateRect(R, -1, -1); - - with R do - begin - Inc(Left, 1 + (Right - Left - Glyph.Width) div 2); - Inc(Top, 1 + (Bottom - Top - Glyph.Height) div 2); - Right := Left + Glyph.Width; - Bottom := Top + Glyph.Height; - end; - GlyphRect := Rect(0, 0, Glyph.Width, Glyph.Height); - Canvas.BrushCopy(R, Glyph, GlyphRect, clBtnFace); - end - else - inherited; -end; - -{ helpers } - -function GetCurrentPrinterAsHint: string; -begin - Result := dxPrintDevice.CurrentDevice; - if Result <> '' then - Result := ' (' + Result + ')'; -end; - -function AddStatusPanel(AStatusBar: TStatusBar; AAlignment: TAlignment; - AStyle: TStatusPanelStyle; ABevel: TStatusPanelBevel; const AText: string; - AWidth: Integer): TStatusPanel; -begin - Result := AStatusBar.Panels.Add; - with Result do - begin - Alignment := AAlignment; - Bevel := ABevel; - Style := AStyle; - Text := AText; - if (AWidth <> -1) and (AText <> '') then - begin - Width := AStatusBar.Canvas.TextWidth(AText); - if Width > 0 then Width := 3 + Width + 3; - if Width < AWidth then Width := AWidth; - end - else - Width := AWidth; - end; -end; - -function LoMetricToThousandthsOfInch(Value: Integer): Integer; -begin - Result := MulDiv(Value, 1000, 254); -end; - -function LoMetricToThousandthsOfMM(Value: Integer): Integer; -begin - Result := 100 * Value; -end; - -function DropPercentChar(const S: string): string; -var - I: Integer; -begin - I := Length(S); - while (I > 0) and (S[I] = PercentSymbol) do Dec(I); - Result := Copy(S, 1, I); -end; - -{ TdxPSPreviewExplorerChangeNotifier } - -constructor TdxPSPreviewExplorerChangeNotifier.Create(APreview: TCustomdxPSPreviewWindow); -begin - FPreview := APreview; - inherited Create(Preview.Explorer); -end; - -procedure TdxPSPreviewExplorerChangeNotifier.ItemDataLoaded(AnItem: TdxPSExplorerItem); -begin - Preview.UpdateControls; -end; - -procedure TdxPSPreviewExplorerChangeNotifier.ItemDataUnloaded(AnItem: TdxPSExplorerItem); -begin - Preview.UpdateControls; -end; - -{ TCustomdxPSPreviewWindow } - -constructor TCustomdxPSPreviewWindow.Create(AOwner: TComponent); -begin - inherited; - FState := prsNone; - FHFEditPart := tpLeft; - FEnableOptions := [Low(TdxPreviewEnableOption)..High(TdxPreviewEnableOption)] - [peoHelp]; - FLastValidZoomFactor := 100; - FVisibleOptions := [Low(TdxPreviewVisibleOption)..High(TdxPreviewVisibleOption)] - [pvoHelp]; - FSaveExplorerVisibility := evsUndefined; - FSavePageMarginsVisibility := mvsUndefined; - FSaveThumbnailsVisibility := tvsUndefined; - FShowExplorer := False; - FShowThumbnails := False; - FSaveExplorerPaneWidth := DefaultExplorerPaneWidth; - FSaveThumbnailsPaneWidth := DefaultThumbnailsPaneWidth; - FThumbnailsSize := tsLarge; -end; - -destructor TCustomdxPSPreviewWindow.Destroy; -begin - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(ThumbnailsPreview); - DoExplorerUnloadItemData; - FreeAndNil(FExplorerChangeNotifier); - FreeAndNil(FExplorerTree); - FreeAndNil(FHFTextEntriesChangedSubscriber); - FreeAndNil(FBuildEventsSubscriber); - FreeAndNil(FPrintEventsSubscriber); - FreeAndNil(FPredefinedZooms); - FreeAndNil(FStyleEventsSubscriber); - FreeAndNil(FHFFunctionList); - inherited; -end; - -procedure TCustomdxPSPreviewWindow.AfterConstruction; -begin - FSaveZoomPosition := True; - FShowStatusBar := True; - FShowMarginBar := True; - LoadZooms; - FHFFunctionList := TStringList.Create; - dxGetHFFunctionsList(FHFFunctionList); - CreateControls; - LoadStrings; - inherited; -end; - -procedure TCustomdxPSPreviewWindow.BeforeDestruction; -{$IFDEF OLEDRAGANDDROP} -var - DropTarget: IDropTarget; -{$ENDIF} -begin - {$IFDEF OLEDRAGANDDROP} - if Supports(TObject(Self), IDropTarget, DropTarget) then - CoLockObjectExternal(DropTarget, False, True); - RevokeDragDrop(Preview.Handle); - {$ENDIF} - inherited; -end; - -procedure TCustomdxPSPreviewWindow.Activate; -begin - ActiveControl := FPreview; - inherited; -end; - -function TCustomdxPSPreviewWindow.CloseQuery: Boolean; -begin - Result := CanClosePreviewWindow; - if Result then - Result := inherited CloseQuery; -end; - -procedure TCustomdxPSPreviewWindow.DoClose(var AAction: TCloseAction); -begin - inherited; - AAction := caFree; -end; - -procedure TCustomdxPSPreviewWindow.DoShow; -begin - inherited; - //Bug in Win2K and ComCtl32.dll since IE 5.0 ? - PostMessage(Handle, WMPS_UPDATEMARGINS, 0, 0); -end; - -procedure TCustomdxPSPreviewWindow.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited; - if (Key = VK_ESCAPE) and (ComponentPrinter <> nil) then - begin - if IsBuilding then ComponentPrinter.AbortBuilding := True; - if IsPrinting then ComponentPrinter.AbortPrinting := True; - end; -end; - -procedure TCustomdxPSPreviewWindow.WndProc(var Message: TMessage); -begin - if Message.Msg = WM_DRAWITEM then - if PDrawItemStruct(Message.lParam)^.hwndItem = StatusBar.Handle then - begin - StatusBar.Dispatch(Message); - Exit; - end; - inherited; - case message.Msg of - WMPS_UPDATEMARGINS: - UpdateMarginBar; - WMPS_UPDATESTATUSPROGRESS: - UpdateStatusText; - end; -end; - -procedure TCustomdxPSPreviewWindow.CreateControls; -{$IFDEF OLEDRAGANDDROP} -var - DropTarget: IDropTarget; -{$ENDIF} -begin - CreateProgressBar; - CreateStatusBar; - CreateExplorerPane; - CreateExplorerSplitter; - CreatePreviewPane; - CreatePreview; - CreateMarginBar; - CreateThumbnailsPane; - CreateThumbnailsSplitter; - CreateThumbnailsPreview; - - CreateEventSubscribers; - {$IFDEF OLEDRAGANDDROP} - if Supports(TObject(Self), IDropTarget, DropTarget) then - begin - RegisterDragDrop(Preview.Handle, DropTarget); - CoLockObjectExternal(DropTarget, True, False); - end; - {$ENDIF} -end; - -procedure TCustomdxPSPreviewWindow.CreateEventSubscribers; -begin - FPrintEventsSubscriber := TdxPSPrintReportSubscriber.Create([TdxPSPrintEvent]); - TdxPSPrintReportSubscriber(FPrintEventsSubscriber).OnEndPrint := EndPrint; - TdxPSPrintReportSubscriber(FPrintEventsSubscriber).OnProgressPrint := NewPage; - TdxPSPrintReportSubscriber(FPrintEventsSubscriber).OnStartPrint := StartPrint; - - FBuildEventsSubscriber := TdxPSBuildReportSubscriber.Create([TdxPSBuildEvent]); - TdxPSBuildReportSubscriber(FBuildEventsSubscriber).OnEndGenerateReport := EndGenerateReport; - TdxPSBuildReportSubscriber(FBuildEventsSubscriber).OnGenerateReportProgress := GenerateReportProgress; - TdxPSBuildReportSubscriber(FBuildEventsSubscriber).OnStartGenerateReport := StartGenerateReport; - - FStyleEventsSubscriber := TdxStyleListChangedSubscriber.Create([TdxSMStyleListChangedEvent]); - TdxStyleListChangedSubscriber(FStyleEventsSubscriber).OnStyleListChanged := StyleListChanged; - - FHFTextEntriesChangedSubscriber := TdxHFTextEntriesChangedSubscriber.Create([TdxHFTextEntriesChangedEvent]); - TdxHFTextEntriesChangedSubscriber(FHFTextEntriesChangedSubscriber).OnHFTextEntriesChanged := HFTextEntriesChanged; -end; - -procedure TCustomdxPSPreviewWindow.CreateExplorerPane; -const - BevelOuters: array[Boolean] of TBevelCut = (bvLowered, bvNone); -begin - FExplorerPane := TPanel.Create(Self); - with ExplorerPane do - begin - Parent := Self; - Align := alLeft; - BevelOuter := bvNone; - BevelOuter := BevelOuters[Flat]; - BorderStyle := bsNone; - Caption := ''; - Name := sdxExplorerPane; - end; - CreateExplorerToolBar; - CreateExplorerTreeHost; -end; - -procedure TCustomdxPSPreviewWindow.CreateExplorerSplitter; -begin - FExplorerSplitter := TSplitter.Create(Self); - with ExplorerSplitter do - begin - Parent := Self; - Align := alLeft; - Left := ExplorerPane.Left + ExplorerPane.Width + 1; - Name := sdxExplorerSplitter; - ResizeStyle := rsUpdate; - Width := 5; - - OnCanResize := ExplorerSplitterCanResize; - end; - TSplitterAccess(ExplorerSplitter).OnMouseUp := ExplorerSplitterMouseUp; -end; - -procedure TCustomdxPSPreviewWindow.CreateExplorerToolBar; - - function CalculateHeight: Integer; - var - DC: HDC; - F: HFONT; - Size: TSize; - begin - DC := GetDC(0); - try - F := SelectObject(DC, FExplorerToolBar.Font.Handle); - GetTextExtentPoint32(DC, 'Wg', 2, Size); - Result := MulDiv(Size.cY, 3, 2); - SelectObject(DC, F); - finally - ReleaseDC(0, DC); - end; - end; - - procedure DoCreateToolBar; - begin - FExplorerToolBar := TdxPSExplorerToolBar.Create(Self); - with TdxPSExplorerToolBar(FExplorerToolBar) do - begin - Parent := ExplorerPane; - Align := alTop; - Alignment := taLeftJustify; - BevelOuter := bvNone;//bvRaised; - BorderStyle := bsNone; - Caption := ' ' + cxGetResourceString(@sdxExplorerCaption); - Flat := Self.Flat; - Height := CalculateHeight; - Name := sdxExplorerToolBar; - OnResize := ExplorerToolBarResize; - end; - end; - - procedure DoCreateCloseButton; - begin - FExplorerCloseButton := TdxPSExplorerCloseButton.Create(Self); - with TdxPSExplorerCloseButton(FExplorerCloseButton) do - begin - Parent := FExplorerToolBar; - - Height := Parent.ClientHeight - 4; - Width := Height + 2; - Left := Parent.ClientWidth - Width - 1; - Top := 1; - - Flat := True; - Glyph := ClosePaneGlyph; - Hint := cxGetResourceString(@sdxCloseExplorerHint); - {$IFDEF DELPHI7} - if not ThemeServices.ThemesEnabled then - Margin := 3; - {$ELSE} - Margin := 3; - {$ENDIF} - Name := sdxExplorerCloseButton; - ShowHint := True; - Transparent := False; - UltraFlat := Self.Flat; - OnClick := ExplorerClose; - end; - end; - -begin - DoCreateToolBar; - DoCreateCloseButton; -end; - -procedure TCustomdxPSPreviewWindow.CreateExplorerTreeHost; -begin - FExplorerTreeHost := TPanel.Create(Self); - with FExplorerTreeHost do - begin - Parent := ExplorerPane; - Align := alClient; - BevelInner := bvNone; - BevelOuter := bvNone; - BorderStyle := bsNone; - Name := sdxExplorerTreeHost; - end; -end; - -procedure TCustomdxPSPreviewWindow.CreateMarginBar; -begin - FMarginBar := TdxPSStatusBar.Create(Self); - with FMarginBar do - begin - Parent := FPreviewPane; - Align := alTop; - Canvas.Font := Font; - Height := 2 * GetSystemMetrics(SM_CXBORDER) + 2 * (3 + Ord(Flat)) + Canvas.TextHeight('Wq'); - Name := sdxMarginBar; - SizeGrip := False; - - OnDblClick := MarginBarDblClick; - OnDrawPanel := MarginBarDrawPanel; - end; - - AddStatusPanel(FMarginBar, taLeftJustify, psOwnerDraw, pbNone, DropAmpersand(cxGetResourceString(@sdxMargins)), 55); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, pbNone, DropAmpersand(cxGetResourceString(@sdxLeft)), 40); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, Bevels[Flat], '', 70); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, pbNone, DropAmpersand(cxGetResourceString(@sdxTop)), 40); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, Bevels[Flat], '', 70); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, pbNone, DropAmpersand(cxGetResourceString(@sdxRight)), 50); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, Bevels[Flat], '', 70); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, pbNone, DropAmpersand(cxGetResourceString(@sdxBottom)), 60); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, Bevels[Flat], '', 70); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, pbNone, DropAmpersand(cxGetResourceString(@sdxHeader2)), 50); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, Bevels[Flat], '', 70); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, pbNone, DropAmpersand(cxGetResourceString(@sdxFooter2)), 50); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, Bevels[Flat], '', 70); - AddStatusPanel(FMarginBar, taRightJustify, psOwnerDraw, pbNone, '', -1); -end; - -procedure TCustomdxPSPreviewWindow.CreatePreview; -begin - FPreview := TdxPreview.Create(Self); - with FPreview do - begin - Parent := FPreviewPane; - Align := alClient; - LookAndFeel := LookAndFeels[Flat]; - if IsWin9X then - OptionsBehavior := OptionsBehavior - [pobThumbTracking]; - Name := sdxPreviewControl; - OnCanShowMarginHint := PreviewCanShowMarginHint; - OnDblClick := PreviewDblClick; - OnSelectingPage := PreviewSelectingPage; - - TdxPreviewPageBackground(PageBackground).OnApply := FillEffectsApply; - end; -end; - -procedure TCustomdxPSPreviewWindow.CreatePreviewPane; -begin - FPreviewPane := TPanel.Create(Self); - with FPreviewPane do - begin - Parent := Self; - Align := alClient; - BevelInner := bvNone; - BevelOuter := bvNone; - Caption := ''; - Name := sdxPreviewPane; - - OnResize := PreviewPaneResize; - end; -end; - -procedure TCustomdxPSPreviewWindow.CreateProgressBar; -begin - FProgressBar := TProgressBar.Create(Self); - with ProgressBar do - begin - Name := sdxProgressBar; - BorderWidth := 2; - end; -end; - -procedure TCustomdxPSPreviewWindow.CreateStatusBar; -begin - FStatusBar := TdxPSStatusBar.Create(Self); - with FStatusBar do - begin - Parent := Self; - Canvas.Font := Font; - Height := 2 * GetSystemMetrics(SM_CXBORDER) + 2 * (3 + Ord(Flat)) + Canvas.TextHeight('Wq'); - ShowHint := True; - Name := sdxStatusBar; - end; - RefreshStatusPanels(psbmNormal); -end; - -procedure TCustomdxPSPreviewWindow.CreateThumbnailsPane; -begin - FThumbnailsPane := TPanel.Create(Self); - with ThumbnailsPane do - begin - Parent := PreviewPane; - - Align := alRight; - BevelInner := bvNone; - BevelOuter := bvNone; - Caption := ''; - Name := sdxThumbnailsPane; - - OnResize := ThumbnailsPreviewResize; - end; -end; - -procedure TCustomdxPSPreviewWindow.CreateThumbnailsSplitter; -begin - FThumbnailsSplitter := TSplitter.Create(Self); - with ThumbnailsSplitter do - begin - Parent := PreviewPane; - Align := alRight; - Left := FThumbnailsPane.Left - 1; - ResizeStyle := rsUpdate; - Width := 5; - Name := sdxThumbnailsSplitter; - - OnCanResize := ThumbnailsSplitterCanResize; - end; - TSplitterAccess(ThumbnailsSplitter).OnMouseUp := ThumbnailsSplitterMouseUp; -end; - -procedure TCustomdxPSPreviewWindow.CreateThumbnailsPreview; -begin - FThumbnailsPreview := TdxPreview.Create(Self); - with ThumbnailsPreview do - begin - Parent := FThumbnailsPane; - Align := alClient; - LookAndFeel := LookAndFeels[Flat]; - MinZoomFactor := 5; - Name := sdxThumbnailsPreviewControl; - OptionsBehavior := OptionsBehavior + [pobNonCenterizePages]; - if IsWin9X then - OptionsBehavior := OptionsBehavior - [pobThumbTracking]; - OptionsView := OptionsView - [povMargins]; - OptionsZoom := OptionsZoom - [pozZoomOnClick]; - SelectionFrameThickness := 4; - ZoomFactor := dxThumbnailsZoomFactors[ThumbnailsSize]; - - OnSelectedPageChanged := ThumbnailsPreviewSelectedPageChanged; - OnSelectingPage := PreviewSelectingPage; - end; -end; - -procedure TCustomdxPSPreviewWindow.RefreshStatusPanels(AStatusBarMode: TdxPSPreviewWindowStatusBarMode); - - function GetProgressModeCaption: string; - begin - if IsBuilding then - Result := cxGetResourceString(@sdxBuildingReportStatusText) - else - if IsPrinting then - Result := cxGetResourceString(@sdxPrintingReportStatusText) - else - Result := ''; - end; - -begin - StatusBar.Panels.Clear; - StatusBar.Panels.BeginUpdate; - try - case AStatusBarMode of - psbmNormal: - begin - AddStatusPanel(StatusBar, taRightJustify, psOwnerDraw, pbNone, DropAmpersand(cxGetResourceString(@sdxPage)) + ':', 40); - AddStatusPanel(StatusBar, taRightJustify, psOwnerDraw, Bevels[Flat], '', 45); - AddStatusPanel(StatusBar, taCenter, psOwnerDraw, pbNone, cxGetResourceString(@sdxOf), 30); - AddStatusPanel(StatusBar, taRightJustify, psOwnerDraw, Bevels[Flat], '', 45); - AddStatusPanel(StatusBar, taLeftJustify, psOwnerDraw, pbNone, cxGetResourceString(@sdxPages), 50); - AddStatusPanel(StatusBar, taLeftJustify, psOwnerDraw, Bevels[Flat], '', 4); - AddStatusPanel(StatusBar, taRightJustify, psOwnerDraw, pbNone, cxGetResourceString(@sdxPaperSize), 80); - AddStatusPanel(StatusBar, taLeftJustify, psOwnerDraw, Bevels[Flat], '', 150); - AddStatusPanel(StatusBar, taRightJustify, psOwnerDraw, pbNone, cxGetResourceString(@sdxStatus), 60); - AddStatusPanel(StatusBar, taLeftJustify, psOwnerDraw, Bevels[Flat], cxGetResourceString(@sdxStatusReady), -1); - - StatusBar.OnDblClick := StatusBarDblClick; - StatusBar.OnDrawPanel := StatusBarDrawPanel; - StatusBar.OnMouseMove := StatusBarMouseMove; - end; - - psbmProgress: - begin - // !!! Update GetProgressStatusPanel in case of change ProgressBar Site Index - - //AddStatusPanel(StatusBar, taLeftJustify, psText, pbNone, GetProgressModeCaption, 2); - AddStatusPanel(StatusBar, taLeftJustify, psText, pbNone, '', 300); //ProgressBar Site - AddStatusPanel(StatusBar, taLeftJustify, psText, pbNone, GetProgressModeCaption, -1); - //AddStatusPanel(StatusBar, taLeftJustify, psText, pbNone, cxGetResourceString(@sdxPressEscToCancel), -1); - StatusBar.OnDblClick := nil; - StatusBar.OnDrawPanel := nil; - StatusBar.OnMouseMove := nil; - end; - end; - finally - StatusBar.Panels.EndUpdate; - end; - StatusBar.Refresh; -end; - -procedure TCustomdxPSPreviewWindow.BeginUpdate; -begin - Preview.BeginUpdate; - Inc(FUpdateCount); -end; - -procedure TCustomdxPSPreviewWindow.CancelUpdate; -begin - if FUpdateCount <> 0 then - begin - Preview.CancelUpdate; - Dec(FUpdateCount); - end; -end; - -procedure TCustomdxPSPreviewWindow.EndUpdate; -begin - if FUpdateCount <> 0 then - begin - Preview.EndUpdate; - Dec(FUpdateCount); - if FUpdateCount = 0 then UpdateControls; - end; -end; - -function TCustomdxPSPreviewWindow.Locked: Boolean; -begin - Result := (FUpdateCount <> 0) or (ComponentPrinter = nil); -end; - -{$IFDEF OLEDRAGANDDROP} -function TCustomdxPSPreviewWindow.DoCanAccept: Boolean; -begin - Result := inherited DoCanAccept and IsVisible(pvoReportFileOperations); -end; -{$ENDIF} - -procedure TCustomdxPSPreviewWindow.LoadZooms; -begin - FPredefinedZooms := TStringList.Create; - with FPredefinedZooms do - begin - AddObject('500' + PercentSymbol, TObject(Integer(500))); - AddObject('200' + PercentSymbol, TObject(Integer(200))); - AddObject('150' + PercentSymbol, TObject(Integer(150))); - AddObject('100' + PercentSymbol, TObject(Integer(100))); - AddObject( '75' + PercentSymbol, TObject(Integer(75))); - AddObject( '50' + PercentSymbol, TObject(Integer(50))); - AddObject( '25' + PercentSymbol, TObject(Integer(25))); - AddObject( '10' + PercentSymbol, TObject(Integer(10))); - AddObject(cxGetResourceString(@sdxPageWidth), TObject(Integer(-1))); - AddObject(cxGetResourceString(@sdxWholePage), TObject(Integer(-1))); - AddObject(cxGetResourceString(@sdxTwoPages), TObject(Integer(-1))); - AddObject(cxGetResourceString(@sdxFourPages), TObject(Integer(-1))); - AddObject(cxGetResourceString(@sdxWidenToSourceWidth), TObject(Integer(-1))); - end; -end; - -function TCustomdxPSPreviewWindow.CanClosePreviewWindow: Boolean; -begin - Result := True; - if not FReleased and (ComponentPrinter <> nil) then - begin - Result := not (IsBuilding or IsPrinting) or Application.Terminated; - FReleased := not Application.Terminated and - (IsBuilding or (IsPrinting and MessageQuestion(cxGetResourceString(@sdxAbortPrinting)))); - if FReleased then ComponentPrinter.AbortPrinting := True; {1. - Abort} - end; -end; - -function TCustomdxPSPreviewWindow.GetActivePageIndex: Integer; -begin - if Preview <> nil then - Result := Preview.SelPageIndex - else - Result := 0; -end; - -function TCustomdxPSPreviewWindow.GetBackground: TdxBackground; -begin - if Preview <> nil then - Result := Preview.PageBackground - else - Result := nil; -end; - -function TCustomdxPSPreviewWindow.GetComponentPrinter: TCustomdxComponentPrinter; -begin - Result := FComponentPrinter; -end; - -function TCustomdxPSPreviewWindow.GetExplorerTree: TCustomdxPSExplorerTreeContainer; -begin - Result := FExplorerTree; -end; - -function TCustomdxPSPreviewWindow.GetState: TdxPSPreviewState; -begin - Result := FState; -end; - -function TCustomdxPSPreviewWindow.GetStatusPanelBounds(AStatusBar: TStatusBar; - AIndex: Integer): TRect; -begin - AStatusBar.Perform(SB_GETRECT, AIndex, Integer(@Result)); -end; - -function TCustomdxPSPreviewWindow.GetThumbnailsSize: TdxPSThumbnailsSize; -begin - Result := FThumbnailsSize; -end; - -function TCustomdxPSPreviewWindow.GetVisiblePageSize: TPoint; -begin - if Preview <> nil then - Result := Preview.VisiblePageSize - else - Result := Point(0, 0); -end; - -function TCustomdxPSPreviewWindow.GetZoomFactor: Integer; -begin - if Preview <> nil then - Result := Preview.ZoomFactor - else - Result := 100; -end; - -function TCustomdxPSPreviewWindow.GetExplorer: TCustomdxPSExplorer; -begin - if ComponentPrinter <> nil then - Result := ComponentPrinter.Explorer - else - Result := nil; -end; - -function TCustomdxPSPreviewWindow.GetExplorerPaneWidth: Integer; -begin - if ExplorerPane <> nil then - Result := ExplorerPane.Width - else - Result := 0; -end; - -function TCustomdxPSPreviewWindow.GetFlat: Boolean; -begin - Result := (dxPSEngine.LookAndFeel in [pslfFlat, pslfOffice11]) - {$IFDEF DELPHI7} - and (not dxPSEngine.UseNativeLookAndFeel or not ThemeServices.ThemesEnabled) - {$ENDIF}; -end; - -function TCustomdxPSPreviewWindow.GetIsExplorerAvailable: Boolean; -begin - Result := Explorer <> nil; -end; - -function TCustomdxPSPreviewWindow.GetIsExplorerMode: Boolean; -begin - Result := (ComponentPrinter <> nil) and (ComponentPrinter.Explorer <> nil);//Mode = cpmExplorer); -end; - -function TCustomdxPSPreviewWindow.GetPrinterPage: TdxPrinterPage; -begin - if ReportLink <> nil then - Result := ReportLink.RealPrinterPage - else - Result := nil; -end; - -function TCustomdxPSPreviewWindow.GetPreviewEnableOptions: TdxPreviewEnableOptions; -begin - Result := FEnableOptions; -end; - -function TCustomdxPSPreviewWindow.GetPreviewVisibleOptions: TdxPreviewVisibleOptions; -begin - Result := FVisibleOptions; -end; - -function TCustomdxPSPreviewWindow.GetHFEditPart: TdxPageTitlePart; -begin - Result := FHFEditPart; -end; - -function TCustomdxPSPreviewWindow.GetPageCount: Integer; -begin - if Preview <> nil then - Result := Preview.PageCount - else - Result := 0; -end; - -function TCustomdxPSPreviewWindow.GetSaveZoomPosition: Boolean; -begin - Result := FSaveZoomPosition; -end; - -function TCustomdxPSPreviewWindow.GetShowExplorer: Boolean; -begin - Result := FShowExplorer; -end; - -function TCustomdxPSPreviewWindow.GetShowThumbnails: Boolean; -begin - Result := FShowThumbnails; -end; - -function TCustomdxPSPreviewWindow.GetProgressStatusPanel: TStatusPanel; -begin - //with StatusBar do - Result := StatusBar.Panels[0]; -end; - -function TCustomdxPSPreviewWindow.GetShowMarginBar: Boolean; -begin - Result := FShowMarginBar; -end; - -function TCustomdxPSPreviewWindow.GetShowPageMargins: Boolean; -begin - Result := pvoPageMargins in VisibleOptions; -end; - -function TCustomdxPSPreviewWindow.GetShowStatusBar: Boolean; -begin - Result := FShowStatusBar; -end; - -function TCustomdxPSPreviewWindow.GetStatusTextPanel: TStatusPanel; -begin - with StatusBar do - Result := Panels[Panels.Count - 1]; -end; - -function TCustomdxPSPreviewWindow.GetThumbnailsPaneWidth: Integer; -begin - if ThumbnailsPane <> nil then - Result := ThumbnailsPane.Width - else - Result := 0; -end; - -procedure TCustomdxPSPreviewWindow.SetActivePageIndex(Value: Integer); -begin - if Preview <> nil then - Preview.SelPageIndex := Value; -end; - -procedure TCustomdxPSPreviewWindow.SetState(const Value: TdxPSPreviewState); -begin - FState := Value; -end; - -procedure TCustomdxPSPreviewWindow.SetThumbnailsSize(const Value: TdxPSThumbnailsSize); -begin - if FThumbnailsSize <> Value then - begin - FThumbnailsSize := Value; - UpdateThumbnailsSize; - UpdateControls; - end; -end; - -procedure TCustomdxPSPreviewWindow.SetZoomFactor(Value: Integer); -begin - if Preview <> nil then - Preview.ZoomFactor := Value; -end; - -procedure TCustomdxPSPreviewWindow.CreationComplete; -begin - inherited; - if FSavePageMarginsVisibility <> mvsUndefined then - ShowPageMargins := FSavePageMarginsVisibility = mvsShown; -end; - -procedure TCustomdxPSPreviewWindow.Resize; -begin - inherited Resize; - if FStatusBar <> nil then - FStatusBar.Invalidate; -end; - -procedure TCustomdxPSPreviewWindow.SetBackground(const Value: TdxBackground); -begin - if Preview <> nil then - Preview.PageBackground := Value; - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.SetComponentPrinter(const Value: TCustomdxComponentPrinter); -var - ExplorerTreeContainerHost: IdxPSExplorerTreeContainerHost; - ExplorerContextCommands: IdxPSExplorerContextCommands; - ExplorerContextCommandBuilder: IdxPSExplorerContextCommandBuilder; -begin - FComponentPrinter := Value; - if ComponentPrinter = nil then Exit; - - { Preview } - SaveZoomPosition := ComponentPrinter.PreviewOptions.SaveZoomPosition; - with Preview do - begin - OnDrawPageContent := PaintPage; - OnCalcPageCount := PreviewCalcPageCount; - OnSelectedPageChanged := PreviewSelectedPageChanged; - OnAfterDragMargin := PreviewAfterDragMargin; - OnBeforeDragMargin := PreviewBeforeDragMargin; - OnDragMargin := PreviewDragMargin; - OnMarginChanged := PreviewMarginsChanged; - OnZoomFactorChanged := PreviewZoomFactorChanged; - OnZoomModeChanged := PreviewZoomModeChanged; - end; - - { Thumbnails } - with ThumbnailsPreview do - begin - OnDrawPageContent := PaintThumbnailPage; - OnCalcPageCount := PreviewCalcPageCount; - end; - if FSaveThumbnailsPaneWidth <> -1 then - ThumbnailsPaneWidth := FSaveThumbnailsPaneWidth; - ShowThumbnails := FSaveThumbnailsVisibility = tvsShown; - DoThumbnailsToggleShow(ShowThumbnails); - - { Explorer } - ExplorerPane.Visible := IsExplorerAvailable; - if FSaveExplorerPaneWidth <> -1 then - ExplorerPaneWidth := FSaveExplorerPaneWidth; - FExplorerSplitter.Visible := IsExplorerAvailable; - if IsExplorerAvailable and Supports(TObject(Self), IdxPSExplorerTreeContainerHost, ExplorerTreeContainerHost) then - begin - FExplorerTree := Explorer.CreateTree(ExplorerTreeContainerHost); - Explorer.BuildTree(ExplorerTree); - FExplorerChangeNotifier := TdxPSPreviewExplorerChangeNotifier.Create(Self); - end; - if IsExplorerAvailable and - Supports(TObject(Explorer), IdxPSExplorerContextCommands, ExplorerContextCommands) and - Supports(TObject(Self), IdxPSExplorerContextCommandBuilder, ExplorerContextCommandBuilder) then - ExplorerContextCommands.BuildCommandSet(ExplorerContextCommandBuilder); - - ShowExplorer := IsExplorerAvailable and (FSaveExplorerVisibility = evsShown); - DoExplorerShowToggled(ShowExplorer); - - InitContent; - UpdateControls; - FAreMarginsValid := ValidateMargins; - StyleListChanged(ReportLink.StyleManager); -end; - -procedure TCustomdxPSPreviewWindow.SetHFEditPart(const Value: TdxPageTitlePart); -begin - FHFEditPart := Value; -end; - -procedure TCustomdxPSPreviewWindow.SetPageCount(Value: Integer); -begin - if Preview <> nil then - Preview.PageCount := Value; - if ThumbnailsPreview <> nil then - ThumbnailsPreview.PageCount := Value; -end; - -procedure TCustomdxPSPreviewWindow.SetPreviewEnableOptions(const Value: TdxPreviewEnableOptions); -begin - FEnableOptions := Value; - if (ReportLink <> nil) and not ReportLink.CheckToDesign then - FEnableOptions := FEnableOptions - [peoReportDesign]; - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.SetPreviewVisibleOptions(const Value: TdxPreviewVisibleOptions); -begin - FVisibleOptions := Value; - if FPreview <> nil then - begin - with FPreview do - if pvoPageMargins in FVisibleOptions then - OptionsView := OptionsView + [povMargins] - else - OptionsView := OptionsView - [povMargins]; - UpdateControls; - end; -end; - -procedure TCustomdxPSPreviewWindow.SetSaveZoomPosition(Value: Boolean); -begin - FSaveZoomPosition := Value; - if FPreview <> nil then - if SaveZoomPosition then - FPreview.OptionsStore := FPreview.OptionsStore + [posZoom] - else - FPreview.OptionsStore := FPreview.OptionsStore - [posZoom]; -end; - -procedure TCustomdxPSPreviewWindow.SetShowExplorer(Value: Boolean); -begin - if IsExplorerAvailable then - begin - if FShowExplorer <> Value then - begin - FShowExplorer := Value; - DoExplorerShowToggled(FShowExplorer); - end; - end - else - FShowExplorer := False; -end; - -procedure TCustomdxPSPreviewWindow.SetShowThumbnails(Value: Boolean); -begin - if FShowThumbnails <> Value then - begin - FShowThumbnails := Value; - DoThumbnailsToggleShow(FShowThumbnails); - end; -end; - -procedure TCustomdxPSPreviewWindow.SetExplorerPaneWidth(Value: Integer); -begin - if ExplorerPane <> nil then - ExplorerPane.Width := Value; -end; - -procedure TCustomdxPSPreviewWindow.SetShowMarginBar(Value: Boolean); -begin - if FShowMarginBar <> Value then - begin - FShowMarginBar := Value; - if not (csLoading in ComponentState) then UpdateControls; - end; -end; - -procedure TCustomdxPSPreviewWindow.SetShowPageMargins(Value: Boolean); -begin - if (pvoPageMargins in VisibleOptions) <> Value then - if Value then - VisibleOptions := VisibleOptions + [pvoPageMargins] - else - VisibleOptions := VisibleOptions - [pvoPageMargins]; -end; - -procedure TCustomdxPSPreviewWindow.SetShowStatusBar(Value: Boolean); -begin - if FShowStatusBar <> Value then - begin - FShowStatusBar := Value; - UpdateControls; - end; -end; - -procedure TCustomdxPSPreviewWindow.SetThumbnailsPaneWidth(Value: Integer); -begin - if ThumbnailsPane <> nil then - ThumbnailsPane.Width := Value; -end; - -procedure TCustomdxPSPreviewWindow.GoToFirstPage; -begin - if Preview <> nil then - Preview.SelectFirstPage; -end; - -procedure TCustomdxPSPreviewWindow.GoToLastPage; -begin - if Preview <> nil then - Preview.SelectLastPage; -end; - -procedure TCustomdxPSPreviewWindow.GoToNextPage; -begin - if Preview <> nil then - Preview.SelectNextPage; -end; - -procedure TCustomdxPSPreviewWindow.GoToPrevPage; -begin - if Preview <> nil then - Preview.SelectPrevPage; -end; - -procedure TCustomdxPSPreviewWindow.HFTextEntriesChanged; -begin -end; - -procedure TCustomdxPSPreviewWindow.LoadStrings; -begin - with FStatusBar do - begin - Panels[0].Text := DropAmpersand(cxGetResourceString(@sdxPage)) + ':'; - Panels[2].Text := LowerCase(cxGetResourceString(@sdxOf)); - Panels[4].Text := cxGetResourceString(@sdxPages); - Panels[6].Text := cxGetResourceString(@sdxPaperSize); - Panels[8].Text := cxGetResourceString(@sdxStatus); - Panels[9].Text := cxGetResourceString(@sdxStatusReady); - end; -end; - -procedure TCustomdxPSPreviewWindow.StyleListChanged(Sender: TObject); -begin -end; - -function TCustomdxPSPreviewWindow.ValidateMargins: Boolean; -begin - Result := (PrinterPage = nil) or PrinterPage.ValidateMargins; -end; - -{ IdxPSExplorerTreeContainerHost } - -function TCustomdxPSPreviewWindow.IdxPSExplorerTreeContainerHost_GetFlat: Boolean; -begin - Result := Flat; -end; - -function TCustomdxPSPreviewWindow.IdxPSExplorerTreeContainerHost_GetReportLink: TBasedxReportLink; -begin - Result := Self.ReportLink; -end; - -function TCustomdxPSPreviewWindow.GetTreeContainerParent: TWinControl; -begin - Result := FExplorerTreeHost; -end; - -procedure TCustomdxPSPreviewWindow.UpdateState; -var - Item: TCustomdxPSExplorerItem; -begin - if not (csDestroying in ComponentState) then - begin - Item := ExplorerTree.FocusedItem; - if Item is TdxPSExplorerFolder then - ComponentPrinter.Explorer.ActiveFolder := TdxPSExplorerFolder(Item) - else - ComponentPrinter.Explorer.ActiveFolder := nil; - UpdateControls; - end; -end; - -procedure TCustomdxPSPreviewWindow.InitContent; -const - PreviewPaperOrientationMap: array[TdxPrinterOrientation] of TdxPreviewPaperOrientation = (ppoPortrait, ppoLandscape); -var - Link: TBasedxReportLink; - Page: TdxPrinterPage; - R: TRect; -begin - Link := ReportLink; - Page := PrinterPage; - FPreview.OriginalPageSize.Point := Page.PageSizeLoMetric; - if not Page.AutoSwapMargins then - FPreview.OptionsBehavior := FPreview.OptionsBehavior - [pobAutoSwapMargins]; - FPreview.Orientation := TdxPreviewPaperOrientation(Page.Orientation); - FPreview.MinUsefulSize := Point(Page.MinPrintableAreaLoMetric, Page.MinPrintableAreaLoMetric); - FPreview.PageCount := Link.VisiblePageCount; - if FThumbnailsPreview <> nil then - begin - FThumbnailsPreview.PageCount := Link.VisiblePageCount; - FThumbnailsPreview.Orientation := PreviewPaperOrientationMap[Link.RealPrinterPage.Orientation]; - end; - FPreview.MaxZoomFactor := 500; - FPreview.MinZoomFactor := 10; - FPreview.MinHeaderSize := 0; - FPreview.MinFooterSize := 0; - - FPreview.MeasurementUnits := TdxPreviewMeasurementUnits(Page.MeasurementUnits); - R := Page.MinMarginsLoMetric; - FPreview.Margins.Left.MinValue := R.Left; - FPreview.Margins.Top.MinValue := R.Top; - FPreview.Margins.Right.MinValue := R.Right; - FPreview.Margins.Bottom.MinValue := R.Bottom; - - R := Page.MarginsLoMetric; - FPreview.Margins.Header.Value := Page.HeaderLoMetric; - FPreview.Margins.Footer.Value := Page.FooterLoMetric; - FPreview.Margins.Left.Value := R.Left; - FPreview.Margins.Top.Value := R.Top; - FPreview.Margins.Right.Value := R.Right; - FPreview.Margins.Bottom.Value := R.Bottom; - FPreview.MinFooterSize := 0; - FPreview.MinHeaderSize := 0; - FPreview.PageBackground := Page.Background; - - if not SaveZoomPosition then FPreview.ZoomFactor := 100; - HFTextEntriesChanged; - - UpdateStatusText; -end; - -procedure TCustomdxPSPreviewWindow.InvalidateContent; -begin - if Preview <> nil then Preview.Invalidate; - if ThumbnailsPreview <> nil then ThumbnailsPreview.Invalidate; -end; - -procedure TCustomdxPSPreviewWindow.InvalidatePage(APageIndex: Integer); -begin - if Preview <> nil then - Preview.InvalidatePage(APageIndex); - if ThumbnailsPreview <> nil then - ThumbnailsPreview.InvalidatePage(APageIndex); -end; - -procedure TCustomdxPSPreviewWindow.InvalidateAllPages; -begin - if Preview <> nil then - Preview.InvalidatePages; - if ThumbnailsPreview <> nil then - ThumbnailsPreview.InvalidatePages; -end; - -procedure TCustomdxPSPreviewWindow.InvalidatePagesContent; -begin - if Preview <> nil then - Preview.InvalidatePagesContent; - if ThumbnailsPreview <> nil then - ThumbnailsPreview.InvalidatePagesContent; -end; - -procedure TCustomdxPSPreviewWindow.InvalidatePagesHeaderContent; -begin - if Preview <> nil then - Preview.InvalidatePagesHeader; - if ThumbnailsPreview <> nil then - ThumbnailsPreview.InvalidatePagesHeader; -end; - -procedure TCustomdxPSPreviewWindow.InvalidatePagesFooterContent; -begin - if Preview <> nil then - Preview.InvalidatePagesFooter; - if ThumbnailsPreview <> nil then - ThumbnailsPreview.InvalidatePagesFooter; -end; - -procedure TCustomdxPSPreviewWindow.UpdateControls; -begin - if Locked then Exit; - inherited; - BeginUpdate; - try - if CanChangeMargins then - Preview.OptionsBehavior := Preview.OptionsBehavior + [pobAllowDragMargins] - else - Preview.OptionsBehavior := Preview.OptionsBehavior - [pobAllowDragMargins]; - - RefreshStatusBar(pssAll); - RefreshMarginBar(nil); - - FMarginBar.Visible := ShowMarginBar; - FStatusBar.Visible := ShowStatusBar; - FMarginBar.ShowHint := CanChangeMargins; - - //if ComponentPrinter <> nil then - // Preview.Enabled := not (cpsPrinting in ComponentPrinter.State); - finally - CancelUpdate; - end; -end; - -// event handlers - -procedure TCustomdxPSPreviewWindow.ExplorerClose(Sender: TObject); -begin - ShowExplorer := False; -end; - -procedure TCustomdxPSPreviewWindow.ExplorerSplitterCanResize(Sender: TObject; - var NewSize: Integer; var Accept: Boolean); - - function CalculateNewSize: Integer; - begin - Result := ExplorerSplitter.Parent.ClientWidth - MinPreviewSize.X - ExplorerSplitter.Width; - end; - -var - Size: Integer; -begin - Accept := PreviewPane.Width >= MinPreviewSize.X; - Size := CalculateNewSize; - if NewSize > Size then - NewSize := Size; -end; - -procedure TCustomdxPSPreviewWindow.ExplorerSplitterMouseUp(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - if ExplorerPane.Width <> 0 then - FSaveExplorerPaneWidth := ExplorerPane.Width; -end; - -procedure TCustomdxPSPreviewWindow.ExplorerToolBarResize(Sender: TObject); -begin - DoExplorerButtonsPosUpdate; -end; - -procedure TCustomdxPSPreviewWindow.DrawStatusFrame(AStatusBar: TStatusBar; var R: TRect); -begin - with AStatusBar.Canvas do - begin - Brush.Color := GetStatusColor(AStatusBar); - FillRect(Rect(R.Left, R.Bottom - 1, R.Right, R.Bottom)); - - Dec(R.Bottom); - Brush.Color := clBtnShadow; - FrameRect(R); - end; - InflateRect(R, -1, -1); -end; - -procedure TCustomdxPSPreviewWindow.DrawStatusText(AStatusBar: TStatusBar; - APanel: TStatusPanel; const R: TRect; AHighlighted, AMarginBar: Boolean); -const - BrushStyles: array[Boolean] of TBrushStyle = (bsClear, bsSolid); -var - S: string; - W, X, Y: Integer; -begin - with AStatusBar.Canvas do - begin - Font.Color := GetStatusPanelTextColor(AStatusBar, Flat, AHighlighted); - if AMarginBar and IsMarginValueStatusPanel(APanel) then - Brush.Color := GetStatusPanelBkColor(AStatusBar, Flat, AHighlighted) - else - Brush.Color := AStatusBar.Color; - Brush.Style := BrushStyles[AHighlighted or Flat]; - - S := APanel.Text; - W := TextWidth(S); - with R do - begin - if W > Right - Left - 2 then - W := Right - Left - 2; - X := Right - W - 1; - if X < Left + 1 then - X := Left + 1; - Y := Top + 1 + Byte(not Flat); - end; - TextRect(R, X, Y, S); - end; -end; - -procedure TCustomdxPSPreviewWindow.FillEffectsApply(Sender: TObject); -begin - FPreview.PageBackground := TdxBackground(Sender); - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.PreviewMarginsChanged(Sender: TObject; AMargin: TdxPreviewPageMargin); -var - V: Integer; -begin - if Locked then Exit; - - V := AMargin.Value; - case FPreview.ActualMeasurementUnits of - pmuInches: - V := LoMetricToThousandthsOfInch(V); - pmuMillimeters: - V := LoMetricToThousandthsOfMM(V); - end; - - if PrinterPage <> nil then - if AMargin is TdxPreviewPageMarginLeft then - PrinterPage.Margins.Left := V - else if AMargin is TdxPreviewPageMarginTop then - PrinterPage.Margins.Top := V - else if AMargin is TdxPreviewPageMarginRight then - PrinterPage.Margins.Right := V - else if AMargin is TdxPreviewPageMarginBottom then - PrinterPage.Margins.Bottom := V - else if AMargin is TdxPreviewPageMarginFooter then - PrinterPage.Footer := V - else if AMargin is TdxPreviewPageMarginHeader then - PrinterPage.Header := V; - - DoPreviewMarginChanged(TdxPreview(Sender), AMargin); -end; - -procedure TCustomdxPSPreviewWindow.PreviewAfterDragMargin(Sender: TObject; AMargin: TdxPreviewPageMargin); -begin - DoPreviewAfterDragMargin(TdxPreview(Sender), AMargin); - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.PreviewBeforeDragMargin(Sender: TObject; AMargin: TdxPreviewPageMargin); -begin - DoPreviewBeforeDragMargin(TdxPreview(Sender), AMargin); - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.PreviewDragMargin(Sender: TObject; AMargin: TdxPreviewPageMargin); -begin - DoPreviewDragMargin(TdxPreview(Sender), AMargin); -end; - -procedure TCustomdxPSPreviewWindow.PreviewCalcPageCount(Sender: TObject); -begin - if ReportLink <> nil then - begin - Preview.PageCount := ReportLink.VisiblePageCount; - if Preview.DraggingMargin = nil then UpdateControls; - - ThumbnailsPreview.PageCount := Preview.PageCount; - end; -end; - -procedure TCustomdxPSPreviewWindow.PreviewZoomFactorChanged(Sender: TObject); -begin - DoPreviewZoomFactorChanged(TdxPreview(Sender)); -end; - -procedure TCustomdxPSPreviewWindow.PreviewZoomModeChanged(Sender: TObject); -begin - DoPreviewZoomModeChanged(TdxPreview(Sender)); -end; - -procedure TCustomdxPSPreviewWindow.PreviewCanShowMarginHint(Sender: TObject; - var ACanShowHint: Boolean); -begin - ACanShowHint := GetPreviewCanShowMarginHint(TdxPreview(Sender)); -end; - -procedure TCustomdxPSPreviewWindow.PreviewSelectingPage(Sender: TObject; - APageIndex: Integer; var ACanSelect: Boolean); -begin - if (ReportLink <> nil) and ReportLink.ShowEmptyPages and ReportLink.IsEmptyPage(APageIndex) then - ACanSelect := False; -end; - -procedure TCustomdxPSPreviewWindow.PreviewSelectedPageChanged(Sender: TObject; APageIndex: Integer); -begin - if ReportLink <> nil then - ReportLink.CurrentPage := ReportLink.VirtualPageIndexToRealPageIndex(APageIndex) + 1; - - //SectionStatusPanel(ssCurrentPage).Text := IntToStr(ReportLink.CurrentPage); - UpdateControls; - FStatusBar.Update; - if not FLockPageSelection then - begin - if (APageIndex = -1) and (ThumbnailsPreview.PageCount <> 0) then - APageIndex := 0; - ThumbnailsPreview.SelPageIndex := APageIndex; - end; -end; - -procedure TCustomdxPSPreviewWindow.PreviewDblClick(Sender: TObject); -var - HitTests: TdxPreviewHitTests; - Pt: TPoint; -begin - DoPreviewDblClick(TdxPreview(Sender)); - GetCursorPos(Pt); - Pt := FPreview.ScreenToClient(Pt); - HitTests := FPreview.GetHitInfoAt(Pt.X, Pt.Y); - if (phtNoWhere in HitTests) and CanDesign then - DoDesignReport - else - if (HitTests * phtMargins <> []) and CanChangeMargins and CanPageSetup then - DoPageSetupReport(1); -end; - -procedure TCustomdxPSPreviewWindow.StatusBarDblClick(Sender: TObject); -var - R: TRect; - Pt: TPoint; -begin - if CanPageSetup then - begin - R := GetStatusPanelBounds(StatusBar, 7); - MapWindowPoints(StatusBar.Handle, 0, R, 2); - GetCursorPos(Pt); - if PtInRect(R, Pt) then DoPageSetupReport(0); - end; -end; - -procedure TCustomdxPSPreviewWindow.StatusBarDrawPanel(StatusBar: TStatusBar; - Panel: TStatusPanel; const Rect: TRect); - - function GetStatusColor: TColor; - begin - if ValidateMargins then - Result := clBtnFace - else - Result := clInfoBk; - end; - - procedure DrawStatusStateText(const R: TRect); - var - X, Y: Integer; - begin - with StatusBar.Canvas do - begin - Brush.Color := GetStatusColor; - FillRect(R); - Brush.Style := bsClear; - X := R.Left + 2; - Y := R.Top + (R.Bottom - R.Top - TextHeight('Wg')) div 2; - TextRect(R, X, Y, Panel.Text); - Brush.Style := bsSolid; - end; - end; - -const - FramedPanelIndexes: set of Byte = [1, 3, 5, 7, 9]; -var - R: TRect; -begin - R := Rect; - if Flat and (Panel.Index in FramedPanelIndexes) then - begin - if IsSizeGripActuallyShown and (Panel.Index = StatusBar.Panels.Count - 1) then - Dec(R.Right, GetSystemMetrics(SM_CXVSCROLL)); - DrawStatusFrame(StatusBar, R); - end; - if IsStatusTextPanel(Panel) then - DrawStatusStateText(R) - else - DrawStatusText(StatusBar, Panel, R, False, False); -end; - -procedure TCustomdxPSPreviewWindow.StatusBarMouseMove(Sender: TObject; - Shift: TShiftState; X, Y: Integer); -const - PtInRect: Boolean = False; -var - R: TRect; - Pt: TPoint; -begin - if CanPageSetup then - begin - R := GetStatusPanelBounds(StatusBar, 7); - Pt := Point(X, Y); - if Windows.PtInRect(R, Pt) xor PtInRect then - begin - PtInRect := not PtInRect; - Application.CancelHint; - if PtInRect then - StatusBar.Hint := cxGetResourceString(@sdxHintDoubleClickForChangePaperSize) - else - StatusBar.Hint := ''; - end; - end; -end; - -procedure TCustomdxPSPreviewWindow.ThumbnailsPreviewSelectedPageChanged(Sender: TObject; - APageIndex: Integer); -begin - if FLockPageSelection then Exit; - - FLockPageSelection := True; - try - Preview.SelPageIndex := APageIndex; - finally - FLockPageSelection := False; - end; -end; - -procedure TCustomdxPSPreviewWindow.ThumbnailsSplitterCanResize(Sender: TObject; - var NewSize: Integer; var Accept: Boolean); - - function CalculateNewSize: Integer; - begin - Result := ThumbnailsSplitter.Parent.ClientWidth - MinPreviewSize.X - ThumbnailsSplitter.Width; - end; - -var - Size: Integer; -begin - Accept := Preview.Width >= MinPreviewSize.X; - Size := CalculateNewSize; - if NewSize > Size then NewSize := Size; -end; - -procedure TCustomdxPSPreviewWindow.ThumbnailsSplitterMouseUp(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - if ThumbnailsPane.Width <> 0 then - FSaveThumbnailsPaneWidth := ThumbnailsPane.Width; -end; - -procedure TCustomdxPSPreviewWindow.MarginBarDblClick(Sender: TObject); -begin - if CanPageSetup then DoPageSetupReport(1); -end; - -procedure TCustomdxPSPreviewWindow.MarginBarDrawPanel(StatusBar: TStatusBar; - Panel: TStatusPanel; const Rect: TRect); - - function IsHighlighted: Boolean; - begin - Result := (Preview.DraggingMargin <> nil) and (MarginStatusPanel(Preview.DraggingMargin) = Panel); - end; - -var - R: TRect; -begin - R := Rect; - if Flat and IsMarginValueStatusPanel(Panel) then - DrawStatusFrame(StatusBar, R); - DrawStatusText(StatusBar, Panel, R, IsHighlighted, True); -end; - -procedure TCustomdxPSPreviewWindow.DoShowFormatDateTimeDlg; -begin - if ReportLink.ShowDateTimeFormatsDlg then - begin - Preview.InvalidatePagesHeader; - Preview.InvalidatePagesFooter; - end; -end; - -procedure TCustomdxPSPreviewWindow.DoShowFormatPageNumbersDlg; -begin - if ReportLink.ShowPageNumberFormatsDlg then - begin - Preview.InvalidatePagesHeader; - Preview.InvalidatePagesFooter; - end; -end; - -procedure TCustomdxPSPreviewWindow.DoShowHFToolBar(Value: Boolean); -begin -end; - -procedure TCustomdxPSPreviewWindow.DoShowZoomDlg; -begin - dxZoomDlg(Preview); -end; - -procedure TCustomdxPSPreviewWindow.DoShowPageBackgroundDlg(const Pt: TPoint); -begin - if dxChooseBackgroundDlg(Preview.PageBackground, Pt, dxDefaultBackgroundDlgData) then - if PrinterPage <> nil then - PrinterPage.Background := Preview.PageBackground; -end; - -procedure TCustomdxPSPreviewWindow.DoShowMultiplySelectPagesDlg(AImageList: TCustomImageList; - AImageIndex: Integer; const Pt: TPoint; AYShift: Integer); -var - Origin: TPoint; - MaxColCount, MaxRowCount, ColCount, RowCount: Integer; -begin - Origin := Pt; - Inc(Origin.Y, AYShift); - MaxColCount := - Floor((FPreview.ClientWidth - 2 * FPreview.Indent) / - (FPreview.Indent + MulDiv(FPreview.PageSize.X, FPreview.MinZoomFactor, 100))); -// AMaxColCount := (MulDiv(Preview.ClientWidth, 100, Preview.ZoomFactor) - dxPreviewIndent) div -// (MulDiv(Preview.PageSize.X, 10, 100) + dxPreviewIndent); - MaxRowCount := - Floor((FPreview.ClientHeight - 2 * FPreview.Indent) / - (FPreview.Indent + MulDiv(FPreview.PageSize.Y, FPreview.MinZoomFactor, 100))); - - if MaxColCount = 0 then MaxColCount := 1; - if MaxRowCount = 0 then MaxRowCount := 1; - if MaxColCount > 3 then - ColCount := 3 - else - ColCount := MaxColCount; - if MaxRowCount > 2 then - RowCount := 2 - else - RowCount := MaxRowCount; - - if dxChooseMultiplePages(AImageList, AImageIndex, Origin, AYShift, - MaxColCount, MaxRowCount, ColCount, RowCount) then - begin - FPreview.ZoomMode := pzmPages; - FPreview.SetPageXYCount(ColCount, RowCount); - end; -end; - -procedure TCustomdxPSPreviewWindow.DoShowEmptyPages(Value: Boolean); -begin - if ReportLink <> nil then - begin - ReportLink.ShowEmptyPages := Value; - if FPreview.PageCount <> ReportLink.VisiblePageCount then - begin - FPreview.PageCount := ReportLink.VisiblePageCount; - if ThumbnailsPreview <> nil then - ThumbnailsPreview.PageCount := ReportLink.VisiblePageCount; - end - else - FPreview.Invalidate; - end; - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.DoShowOptionsDlg; -var - Data: TdxPreviewOptionsDlgData; -begin - FillChar(Data, SizeOf(TdxPreviewOptionsDlgData), 0); - with Data do - begin - MarginColor := Preview.MarginColor; - MeasurementUnits := TdxMeasurementUnits(Preview.MeasurementUnits); - ShowMarginsHintWhileDragging := pohShowOnDrag in Preview.OptionsHint; - ShowMarginHints := pohShowForMargins in Preview.OptionsHint; - ShowMargins := povMargins in Preview.OptionsView; - ZoomOnMouseRoll := pozZoomOnMouseRoll in Preview.OptionsZoom; - ZoomStep := Preview.ZoomStep; - end; - - if dxShowPSPreviewOptionsDlg(Data) then SavePreferences(Data); - - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.DoShrinkToPageWidth(Value: Boolean); -begin - if ReportLink <> nil then - if FPreview.PageCount <> ReportLink.VisiblePageCount then - begin - FPreview.PageCount := ReportLink.VisiblePageCount; - if ThumbnailsPreview <> nil then - ThumbnailsPreview.PageCount := ReportLink.VisiblePageCount; - end - else - FPreview.Invalidate; - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.DoThumbnailsToggleShow(Value: Boolean); -begin - if Value then - begin - if FSaveThumbnailsPaneWidth <> -1 then - ThumbnailsPane.Width := FSaveThumbnailsPaneWidth - else - ThumbnailsPane.Width := DefaultThumbnailsPaneWidth; - ThumbnailsSplitter.Left := ThumbnailsPane.Left - ThumbnailsSplitter.Width; - - FixupPreviewWidth; - end - else - begin - ThumbnailsPane.Width := 0; - ThumbnailsPane.Left := ThumbnailsPane.Parent.Width; - end; - - if Visible and Enabled then - if not Value then - if Preview.CanFocus then - ActiveControl := Preview - else - ActiveControl := nil - else - ThumbnailsPreview.SetFocus; - - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.DoUnloadReportLinkData; -begin - ReportLink.DataSource := rldsComponent; -end; - -procedure TCustomdxPSPreviewWindow.FixupPreviewWidth; -var - AvailableWidth: Integer; -begin - if Preview.Width < MinPreviewSize.X then - begin - AvailableWidth := PreviewPane.ClientWidth - MinPreviewSize.X - ThumbnailsSplitter.Width; - if AvailableWidth < 0 then - AvailableWidth := 0; - - if ShowThumbnails and (ThumbnailsPane.Width > AvailableWidth) then - ThumbnailsPane.Width := AvailableWidth; - end; -end; - -procedure TCustomdxPSPreviewWindow.PreviewPaneResize(Sender: TObject); -begin - if ShowThumbnails then - if Preview.Width < MinPreviewSize.X then - begin - ThumbnailsPane.Width := PreviewPane.ClientWidth - MinPreviewSize.X - ThumbnailsSplitter.Width; - Preview.Width := MinPreviewSize.X; - end; - ShowExplorer := ExplorerPane.Width <> 0; -end; - -procedure TCustomdxPSPreviewWindow.ThumbnailsPreviewResize(Sender: TObject); -begin - ShowThumbnails := ThumbnailsPane.Width <> 0; -end; - -procedure TCustomdxPSPreviewWindow.UpdateThumbnailsSize; -begin - ThumbnailsPreview.ZoomFactor := dxPSCore.dxThumbnailsZoomFactors[ThumbnailsSize]; -end; - -procedure TCustomdxPSPreviewWindow.DoDesignReport; -begin - if ReportLink <> nil then - begin - ReportLink.DesignReport; - UpdateControls; - end; -end; - -procedure TCustomdxPSPreviewWindow.DoLoadReportLinkDataFromFile; -var - Dialog: TdxPSOpenReportDialog; -begin - if ReportLink <> nil then - begin - Dialog := TdxPSOpenReportDialog.Create(nil); - with Dialog do - try - if Execute then - ReportLink.LoadDataFromFile(FileName); - finally - Free; - end; - end; -end; - -procedure TCustomdxPSPreviewWindow.DoPageSetupReport(APageIndex: Integer); -var - PreviewBtnClicked, PrintBtnClicked: Boolean; -begin - if ComponentPrinter.PageSetupEx(APageIndex, False, CanPrintDialog, PreviewBtnClicked, PrintBtnClicked, nil) then - begin - InitContent; - UpdateControls; - end; - InvalidatePagesContent; - if PrintBtnClicked then - DoPrintReport(True); -end; - -procedure TCustomdxPSPreviewWindow.DoPrintReport(AShowDialog: Boolean); -begin - ComponentPrinter.Print(AShowDialog, nil, nil); - {if AShowDialog then }UpdateControls; - DoAfterPrintReport(AShowDialog); - if FReleased then Release; -end; - -procedure TCustomdxPSPreviewWindow.DoSaveReportLinkDataToFile; -var - fsDialog: TdxPSSaveReportDialog; -begin - if ReportLink <> nil then - begin - fsDialog := TdxPSSaveReportDialog.Create(nil); - with fsDialog do - try - FileName := ReportLink.GetNewReportStorageName; - if Execute then - begin - FileName := ChangeFileExt(FileName, '.' + dxPSCore.dxPSReportFileShortExtension); - ReportLink.SaveDataToFile(FileName); - end; - finally - Free; - end; - end; -end; - -function TCustomdxPSPreviewWindow.CanDesign: Boolean; -begin - Result := IsVisible(pvoReportDesign) and IsEnabled(peoReportDesign) and - (ReportLink <> nil) and ReportLink.CheckToDesign and not IsPrinting and not IsBuilding; -end; - -function TCustomdxPSPreviewWindow.CanPrint: Boolean; -begin - Result := IsVisible(pvoPrint) and IsEnabled(peoPrint) and (ReportLink <> nil) and - (ReportLink.PageCount > 0) and (dxPrnDev.dxGetDefaultPrinter <> '') and not IsPrinting; -end; - -function TCustomdxPSPreviewWindow.CanPrintDialog: Boolean; -begin - Result := CanPrint; -end; - -function TCustomdxPSPreviewWindow.CanPrintStyle: Boolean; -begin - Result := (ReportLink <> nil) and (ReportLink.StyleManager <> nil) and - IsVisible(pvoPrintStyles); -end; - -function TCustomdxPSPreviewWindow.CanRebuild: Boolean; -begin - Result := (ReportLink <> nil) and ReportLink.DataProviderPresent and - (ComponentPrinter.State * [cpsBuilding, cpsPrinting] = []) -end; - -function TCustomdxPSPreviewWindow.CanLoadReport: Boolean; -begin - if IsExplorerAvailable then - Result := (ExplorerTree <> nil) and ExplorerTree.CanLoadSelectedItemData and not IsBuilding - else - Result := IsVisible(pvoReportFileOperations) and (ReportLink <> nil) and - ReportLink.CanLoadData and not IsBuilding; -end; - -function TCustomdxPSPreviewWindow.CanPageSetup: Boolean; -begin - Result := IsVisible(pvoPageSetup) and IsEnabled(peoPageSetup) - and (ComponentPrinter <> nil) and not IsPrinting; -end; - -function TCustomdxPSPreviewWindow.CanChangeMargins: Boolean; -begin - Result := IsEnabled(peoCanChangeMargins) and not IsPrinting and not IsBuilding; -end; - -function TCustomdxPSPreviewWindow.CanSaveReport: Boolean; -begin - if not ComponentPrinter.IsExplorerMode then - begin - if IsExplorerAvailable and (ReportLink = nil) then - Result := (ExplorerTree <> nil) and ExplorerTree.CanCreateItem - else - Result := (ReportLink <> nil) and IsVisible(pvoReportFileOperations) and ReportLink.CanSaveData; - end - else - Result := False; -end; - -function TCustomdxPSPreviewWindow.CanUnloadReport: Boolean; -begin - if IsExplorerAvailable then - Result := (ExplorerTree <> nil) and ExplorerTree.CanUnloadItemData - else - Result := IsVisible(pvoReportFileOperations) and (ReportLink <> nil) and - ReportLink.CanUnloadData; -end; - -function TCustomdxPSPreviewWindow.IsCommandLoadReportVisible: Boolean; -begin - Result := IsExplorerAvailable or IsVisible(pvoReportFileOperations); -end; - -function TCustomdxPSPreviewWindow.IsCommandSaveReportVisible: Boolean; -begin - Result := IsExplorerAvailable or IsVisible(pvoReportFileOperations); -end; - -function TCustomdxPSPreviewWindow.IsCommandUnloadReportVisible: Boolean; -begin - Result := IsExplorerAvailable or IsVisible(pvoReportFileOperations); -end; - -function TCustomdxPSPreviewWindow.IsEnabled(AnOption: TdxPreviewEnableOption): Boolean; -begin - Result := AnOption in FEnableOptions; -end; - -function TCustomdxPSPreviewWindow.IsVisible(AnOption: TdxPreviewVisibleOption): Boolean; -begin - Result := AnOption in FVisibleOptions; -end; - -function TCustomdxPSPreviewWindow.IsAutoHFTextEntriesAvailable: Boolean; -begin - Result := (ReportLink <> nil) and (ReportLink.StyleManager <> nil); -end; - -function TCustomdxPSPreviewWindow.IsBuilding: Boolean; -begin - Result := (ComponentPrinter <> nil) and (cpsBuilding in ComponentPrinter.State); -end; - -function TCustomdxPSPreviewWindow.IsPrinting: Boolean; -begin - Result := ((ComponentPrinter <> nil) and (cpsPrinting in ComponentPrinter.State)) or - dxPrintDevice.Printing; -end; - -function TCustomdxPSPreviewWindow.IsProgressState: Boolean; -begin - Result := (ComponentPrinter <> nil) and - (ComponentPrinter.State * [cpsBuilding, cpsPrinting] <> []); -end; - -function TCustomdxPSPreviewWindow.IsSizeGripActuallyShown: Boolean; -begin - Result := StatusBar.SizeGrip and (WindowState = wsNormal); -end; - -function TCustomdxPSPreviewWindow.IsStatusTextPanel(APanel: TStatusPanel): Boolean; -begin - Result := APanel = StatusTextPanel; -end; - -procedure TCustomdxPSPreviewWindow.InvalidateStatusPanel(AStatusBar: TStatusBar; - AIndex: Integer); -var - R: TRect; -begin - R := GetStatusPanelBounds(AStatusBar, AIndex); - InvalidateRect(AStatusBar.Handle, @R, False); -end; - -procedure TCustomdxPSPreviewWindow.InvalidatePagesHeadersOrFooters; -begin - case State of - prsEditHeaders: - FPreview.InvalidatePagesHeader; - prsEditFooters: - FPreview.InvalidatePagesFooter; - end; -end; - -procedure TCustomdxPSPreviewWindow.RefreshStatusBar(AStatusSections: TfmPreviewStatusSections); -begin - if not IsProgressState then - begin - if ReportLink <> nil then - begin - if ssCurrentPage in AStatusSections then - SectionStatusPanelSetText(ssCurrentPage, IntToStr(ReportLink.CurrentPage)); - if ssPageCount in AStatusSections then - SectionStatusPanelSetText(ssPageCount, IntToStr(ReportLink.PageCount)); - end; - - if ssPaperSize in AStatusSections then - SectionStatusPanelSetText(ssPaperSize, FPreview.PageSizeToString); - - if ssStatus in AStatusSections then - begin - InvalidateStatusPanel(StatusBar, StatusBar.Panels.Count - 1); - StatusBar.Update; - end; - UpdateStatusBarPanelWidths(StatusBar); - end; -end; - -procedure TCustomdxPSPreviewWindow.RefreshMarginBar(AMargin: TdxPreviewPageMargin); -begin - with FPreview do - if AMargin = nil then - begin - MarginStatusPanel(Margins.Left).Text := MarginValueToString(Margins.Left.Value); - MarginStatusPanel(Margins.Top).Text := MarginValueToString(Margins.Top.Value); - MarginStatusPanel(Margins.Right).Text := MarginValueToString(Margins.Right.Value); - MarginStatusPanel(Margins.Bottom).Text := MarginValueToString(Margins.Bottom.Value); - MarginStatusPanel(Margins.Header).Text := MarginValueToString(Margins.Header.Value); - MarginStatusPanel(Margins.Footer).Text := MarginValueToString(Margins.Footer.Value); - end - else - MarginStatusPanel(AMargin).Text := MarginValueToString(AMargin.DraggingValue); -end; - -function TCustomdxPSPreviewWindow.IsMarginValueStatusPanel(APanel: TStatusPanel): Boolean; -const - Indexes: set of Byte = [2, 4, 6, 8, 10, 12]; -begin - Result := APanel.Index in Indexes; -end; - -function TCustomdxPSPreviewWindow.MarginStatusPanel(AMargin: TdxPreviewPageMargin): TStatusPanel; -//pmLeft, pmTop, pmRight, pmBottom, pmHeader, pmFooter -var - Index: Integer; -begin - if AMargin is TdxPreviewPageMarginLeft then - Index := 2 - else if AMargin is TdxPreviewPageMarginTop then - Index := 4 - else if AMargin is TdxPreviewPageMarginRight then - Index := 6 - else if AMargin is TdxPreviewPageMarginBottom then - Index := 8 - else if AMargin is TdxPreviewPageMarginFooter then - Index := 12 - else //if AMargin is TdxPreviewPageMarginHeader then - Index := 10; - Result := FMarginBar.Panels[Index]; -end; - -function TCustomdxPSPreviewWindow.SectionStatusPanel(AStatusSection: TfmPreviewStatusSection): TStatusPanel; -const - Indexes: array [TfmPreviewStatusSection] of Integer = (1, 3, 7, 9); -begin - if Indexes[AStatusSection] < FStatusBar.Panels.Count then - Result := FStatusBar.Panels[Indexes[AStatusSection]] - else - Result := nil; -end; - -procedure TCustomdxPSPreviewWindow.SectionStatusPanelSetText( - AStatusSection: TfmPreviewStatusSection; const AText: string); -begin - if SectionStatusPanel(AStatusSection) <> nil then - SectionStatusPanel(AStatusSection).Text := AText; -end; - -procedure TCustomdxPSPreviewWindow.DoPreviewMarginChanged(APreview: TdxPreview; - AMargin: TdxPreviewPageMargin); -begin - if FPreview.DraggingMargin = nil then RefreshMarginBar(AMargin); -end; - -procedure TCustomdxPSPreviewWindow.DoPreviewAfterDragMargin(APreview: TdxPreview; - AMargin: TdxPreviewPageMargin); -var - MarginsValid: Boolean; -begin - RefreshMarginBar(AMargin); - MarginsValid := ValidateMargins; - if (MarginsValid <> FAreMarginsValid) and not MarginsValid then - SysUtils.Beep; - FAreMarginsValid := MarginsValid; - UpdateStatusText; - RefreshStatusBar([ssStatus]); -end; - -procedure TCustomdxPSPreviewWindow.DoPreviewBeforeDragMargin(APreview: TdxPreview; - AMargin: TdxPreviewPageMargin); -begin - RefreshMarginBar(AMargin); -end; - -procedure TCustomdxPSPreviewWindow.DoPreviewDragMargin(APreview: TdxPreview; - AMargin: TdxPreviewPageMargin); -begin - RefreshMarginBar(AMargin); -end; - -procedure TCustomdxPSPreviewWindow.DoPreviewZoomFactorChanged(APreview: TdxPreview); -begin -end; - -procedure TCustomdxPSPreviewWindow.DoPreviewZoomModeChanged(APreview: TdxPreview); -begin -end; - -function TCustomdxPSPreviewWindow.GetPreviewCanShowMarginHint(APreview: TdxPreview): Boolean; -begin - Result := True; -end; - -procedure TCustomdxPSPreviewWindow.DoPreviewDblClick(APreview: TdxPreview); -begin -end; - -procedure TCustomdxPSPreviewWindow.DoAfterPrintReport(AShowDialog: Boolean); -begin -end; - -procedure TCustomdxPSPreviewWindow.DoSetupZoomFactor(AZoomFactor, APageXCount, - APageYCount: Integer; AZoomMode: TdxPreviewZoomMode); -begin - FPreview.ZoomMode := AZoomMode; - case FPreview.ZoomMode of - pzmNone: - FPreview.ZoomFactor := AZoomFactor; - pzmPages: - FPreview.SetPageXYCount(APageXCount, APageYCount); - end; - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.DoActivePageChanged(AValue: Integer); -begin - if ReportLink <> nil then - if ReportLink.ShowEmptyPages then - ActivePageIndex := ReportLink.RealPageIndexToVirtualPageIndex(AValue, True) - else - ActivePageIndex := AValue; -end; - -procedure TCustomdxPSPreviewWindow.DoExplorerButtonsPosUpdate; -begin - FExplorerCloseButton.Left := FExplorerToolBar.ClientWidth - FExplorerCloseButton.Width - 1; -end; - -procedure TCustomdxPSPreviewWindow.DoExplorerCreateNewFolder; -begin - if (ExplorerTree <> nil) and ExplorerTree.CanCreateFolder then - Explorer.CreateNewFolder(ExplorerTree.CreationParent); -end; - -procedure TCustomdxPSPreviewWindow.DoExplorerCreateNewItem; -begin - if CanSaveReport then - if IsExplorerAvailable then - begin - if ExplorerTree <> nil then - begin - ExplorerTree.CreateItem; - ShowExplorer := True; - end; - end - else - DoSaveReportLinkDataToFile; -end; - -procedure TCustomdxPSPreviewWindow.DoExplorerDeleteItem; -begin - if ExplorerTree <> nil then ExplorerTree.DeleteSelection; -end; - -function TCustomdxPSPreviewWindow.DoExplorerItemShowPropertySheets: Boolean; -begin - Result := (ExplorerTree <> nil) and ExplorerTree.ShowSelectedItemPropertySheets; -end; - -procedure TCustomdxPSPreviewWindow.DoExplorerLoadItemData; -begin - if CanLoadReport then - if IsExplorerAvailable then - ExplorerTree.LoadSelectedItemData - else - DoLoadReportLinkDataFromFile; -end; - -procedure TCustomdxPSPreviewWindow.DoExplorerRenameItem; -begin - ExplorerTree.BeginEdit; -end; - -procedure TCustomdxPSPreviewWindow.DoExplorerShowToggled(Value: Boolean); -begin - if ExplorerPane <> nil then - begin - if Value then - begin - if FSaveExplorerPaneWidth <> -1 then - ExplorerPane.Width := FSaveExplorerPaneWidth - else - ExplorerPane.Width := DefaultExplorerPaneWidth; - ExplorerSplitter.Left := ExplorerPane.Width + 1; - end - else - begin - ExplorerPane.Width := 0; - ExplorerPane.Left := 0; - end; - - if Visible and Enabled then - begin - if not Value then - if Preview.CanFocus then - ActiveControl := Preview - else - ActiveControl := nil - else - if ExplorerTree <> nil then - ExplorerTree.SetFocus; - end; - - UpdateControls; - end; -end; - -procedure TCustomdxPSPreviewWindow.DoExplorerUnloadItemData; -begin - if CanUnloadReport then - if IsExplorerAvailable then - ExplorerTree.UnloadItemData - else - DoUnloadReportLinkData; -end; - -procedure TCustomdxPSPreviewWindow.DoFormatTitle; -begin - ReportLink.ShowTitlePropertiesDlg; -end; - -procedure TCustomdxPSPreviewWindow.DoInsertHF(const S: string); -var - Strings: TStrings; -begin - case State of - prsEditHeaders: - Strings := PrinterPage.PageHeader.Titles[HFEditPart]; - prsEditFooters: - Strings := PrinterPage.PageFooter.Titles[HFEditPart]; - else - Exit; - end; - Strings.Text := Strings.Text + S; - InvalidatePagesHeadersOrFooters; -end; - -procedure TCustomdxPSPreviewWindow.DoInvokeHelp; -begin - if HelpContext <> 0 then Application.HelpContext(HelpContext); -end; - -procedure TCustomdxPSPreviewWindow.DoClearHF; -begin - if PrinterPage = nil then Exit; - case State of - prsEditHeaders: - PrinterPage.PageHeader.Titles[HFEditPart].Text := ''; - prsEditFooters: - PrinterPage.PageFooter.Titles[HFEditPart].Text := ''; - end; - InvalidatePagesHeadersOrFooters; -end; - -procedure TCustomdxPSPreviewWindow.DoShowHFBackgroundDlg(const Pt: TPoint); -var - Background: TdxBackground; -begin - case State of - prsEditHeaders: - Background := PrinterPage.PageHeader.Background; - prsEditFooters: - Background := PrinterPage.PageFooter.Background; - else - Exit; - end; - if dxChooseBackgroundDlg(Background, Pt, dxDefaultBackgroundDlgData) then - InvalidatePagesHeadersOrFooters; -end; - -procedure TCustomdxPSPreviewWindow.DoShowPageHeaders(Value: Boolean); -begin - ReportLink.ShowPageHeader := Value; - FPreview.InvalidatePagesHeader; -end; - -procedure TCustomdxPSPreviewWindow.DoShowPageFooters(Value: Boolean); -begin - ReportLink.ShowPageFooter := Value; - FPreview.InvalidatePagesFooter; -end; - -procedure TCustomdxPSPreviewWindow.PrepareProgress; -begin - RefreshStatusPanels(psbmProgress); - ProgressBarShow; - FLastOpCompleted := 0; - FCurrentProgressValue := 0; -end; - -function TCustomdxPSPreviewWindow.ProgressBarGetMaxValue: Integer; -begin - if cpsPrinting in ComponentPrinter.State then - Result := FFullPageCount - else - Result := 100; -end; - -procedure TCustomdxPSPreviewWindow.ProgressBarHide; -begin - ProgressBar.Parent := nil; -end; - -procedure TCustomdxPSPreviewWindow.ProgressBarPlace; -var - R: TRect; -begin - R := GetStatusPanelBounds(StatusBar, ProgressStatusPanel.Index); - InflateRect(R, -1, -1); - if Flat then Dec(R.Bottom); - ProgressBar.BoundsRect := R; -end; - -procedure TCustomdxPSPreviewWindow.ProgressBarRefresh; -begin - //UpdateStatusText; - ProgressBar.Position := FCurrentProgressValue; -end; - -procedure TCustomdxPSPreviewWindow.ProgressBarShow; -begin - ProgressBar.Position := 0; - ProgressBar.Max := ProgressBarGetMaxValue; - ProgressBar.Parent := StatusBar; - ProgressBarPlace; -end; - -procedure TCustomdxPSPreviewWindow.UnprepareProgress; -begin - ProgressBarHide; - RefreshStatusPanels(psbmNormal); - UpdateControls; - PostMessage(Handle, WMPS_UPDATESTATUSPROGRESS, 0, 0); -end; - -procedure TCustomdxPSPreviewWindow.GenerateReportProgress(Sender: TObject; - AReportLink: TBasedxReportLink; APercentDone: Double {mask : '##0.00'}); -begin - if Sender <> ComponentPrinter then Exit; - FCurrentProgressValue := Trunc(APercentDone); - ProgressBarRefresh; - //if IsEscKeyPressed(Handle) then ComponentPrinter.AbortBuilding := True; -end; - -procedure TCustomdxPSPreviewWindow.EndGenerateReport(Sender: TObject; - AReportLink: TBasedxReportLink); -begin - if Sender <> ComponentPrinter then Exit; - UnprepareProgress; - if Preview.SelPageIndex > ReportLink.PageCount - 1 then - Preview.SelPageIndex := ReportLink.PageCount - 1; -end; - -procedure TCustomdxPSPreviewWindow.StartGenerateReport(Sender: TObject; - AReportLink: TBasedxReportLink); -begin - if Sender <> ComponentPrinter then Exit; - - Preview.PageCount := 0; - Preview.Update; - - ThumbnailsPreview.PageCount := 0; - ThumbnailsPreview.Update; - - PrepareProgress; - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.EndPrint(Sender: TObject; AReportLink: TBasedxReportLink); -begin - if Sender <> ComponentPrinter then Exit; - UnprepareProgress; - UpdateControls; -end; - -procedure TCustomdxPSPreviewWindow.NewPage(Sender: TObject; AReportLink: TBasedxReportLink; - APageIndex: Integer); -begin - if Sender <> ComponentPrinter then Exit; - FCurrentProgressValue := APageIndex; - ProgressBarRefresh; -end; - -procedure TCustomdxPSPreviewWindow.StartPrint(Sender: TObject; AReportLink: TBasedxReportLink; - FullPageCount: Integer); -begin - if Sender <> ComponentPrinter then Exit; - FFullPageCount := FullPageCount; - UpdateControls; - PrepareProgress; -end; - -procedure TCustomdxPSPreviewWindow.UpdateMarginBar; -var - I: Integer; - R: TRect; -begin - with MarginBar do - begin - //dxRecreateWnd(MarginBar); - Perform(CM_RECREATEWND, 0, 0); - Refresh; - Canvas.Font := Font; - for I := 0 to Panels.Count - 1 do - if Panels[I].Style = psOwnerDraw then - begin - R := GetStatusPanelBounds(MarginBar, I); - InflateRect(R, -1, -1); - MarginBarDrawPanel(FMarginBar, Panels[I], R); - end; - end; -end; - -procedure TCustomdxPSPreviewWindow.SetZoomFactorByText(const AText: string); -var - V, I, PageXCount, PageYCount: Integer; -begin - I := FPredefinedZooms.IndexOf(AText); - if I > -1 then - if I < PredefinedZoomValueCount then - begin - FPreview.ZoomMode := pzmNone; - FPreview.ZoomFactor := Integer(FPredefinedZooms.Objects[I]); - end - else - begin - if I = PredefinedZoomValueCount then - FPreview.ZoomMode := pzmPageWidth - else - FPreview.ZoomMode := pzmPages; - - case I - PredefinedZoomValueCount of - 1: FPreview.SetPageXYCount(1, 1); - 2: FPreview.SetPageXYCount(2, 1); - 3: FPreview.SetPageXYCount(2, 2); - 4: begin - ReportLink.GetPageColRowCount(PageXCount, PageYCount); - FPreview.SetPageXYCount(PageXCount, 1); - end; - end; - end - else - begin - try - V := StrToInt(DropPercentChar(AText)); - except - try - V := Round(StrToFloat(DropPercentChar(AText))); - except - V := FLastValidZoomFactor; - end; - end; - FPreview.ZoomFactor := V; - end; - FLastValidZoomFactor := FPreview.ZoomFactor; -end; - -procedure TCustomdxPSPreviewWindow.UpdateStatusBarPanelWidths(AStatusBar: TStatusBar); - - procedure UpdateStatusBarPanelWidth(APanel: TStatusPanel); - var - TextWidth: Integer; - begin - TextWidth := AStatusBar.Canvas.TextWidth(APanel.Text); - if TextWidth = 0 then - APanel.Width := 4 - else - if APanel.Width < 3 + TextWidth + 3 then - APanel.Width := 3 + TextWidth + 3; - end; - -var - I: Integer; -begin - for I := 0 to AStatusBar.Panels.Count - 1 do - UpdateStatusBarPanelWidth(AStatusBar.Panels[I]); -end; - -procedure TCustomdxPSPreviewWindow.SavePreferences(AData: TdxPreviewOptionsDlgData); -begin - with Preview do - begin - if AData.ShowMarginHints then - OptionsHint := OptionsHint + [pohShowForMargins] - else - OptionsHint := OptionsHint - [pohShowForMargins]; - - if AData.ShowMarginsHintWhileDragging then - OptionsHint := OptionsHint + [pohShowOnDrag] - else - OptionsHint := OptionsHint - [pohShowOnDrag]; - - if AData.ZoomOnMouseRoll then - OptionsZoom := OptionsZoom + [pozZoomOnMouseRoll] - else - OptionsZoom := OptionsZoom - [pozZoomOnMouseRoll]; - - ZoomStep := AData.ZoomStep; - MarginColor := AData.MarginColor; - MeasurementUnits := - dxPreVw.TdxPreviewMeasurementUnits(AData.MeasurementUnits); - end; - - ShowPageMargins := AData.ShowMargins; - PrinterPage.MeasurementUnits := AData.MeasurementUnits; -end; - -procedure TCustomdxPSPreviewWindow.SaveToRegistry(const APath: string); -begin - inherited; - SavePropertiesToRegistry(APath); -end; - -procedure TCustomdxPSPreviewWindow.LoadFromRegistry(const APath: string); -begin - inherited; - LoadPropertiesFromRegistry(APath); -end; - -procedure TCustomdxPSPreviewWindow.SavePropertiesToRegistry(const APath: string); - - procedure DoStore(const ARegistryPath: string); - begin - Preview.SaveToRegistry(ARegistryPath + '\' + sdxPreviewControl); - - with TRegistry.Create do - try - if OpenKey(ARegistryPath, True) then - try - WriteBool(sdxShowMarginBar, ShowMarginBar); - WriteBool(sdxShowStatusBar, ShowStatusBar); - - WriteInteger(sdxExplorerVisibilityState, Ord(ShowExplorer) + 1); - if ExplorerPaneWidth <> 0 then - WriteInteger(sdxExplorerPaneWidth, ExplorerPaneWidth); - - WriteInteger(sdxThumbnailsVisibilityState, Ord(ShowThumbnails) + 1); - if ThumbnailsPaneWidth <> 0 then - WriteInteger(sdxThumbnailsPaneWidth, ThumbnailsPaneWidth); - except - on ERegistryException do - else - raise; - end; - finally - Free; - end; - end; - -begin - DoStore(APath); - if IsDesignTime and (dxPSEngine.RegistryPath <> '') then - DoStore(dxPSEngine.RegistryPath); -end; - -procedure TCustomdxPSPreviewWindow.LoadPropertiesFromRegistry(const APath: string); -begin - FPreview.LoadFromRegistry(APath + '\' + sdxPreviewControl); - if povMargins in FPreview.OptionsView then - FSavePageMarginsVisibility := mvsShown - else - FSavePageMarginsVisibility := mvsHidden; - - with TRegistry.Create do - try - if OpenKey(APath, False) then - try - if ValueExists(sdxShowMarginBar) then - FShowMarginBar := ReadBool(sdxShowMarginBar); - - if ValueExists(sdxShowStatusBar) then - FShowStatusBar := ReadBool(sdxShowStatusBar); - - if ValueExists(sdxExplorerVisibilityState) then - FSaveExplorerVisibility := TdxPSExplorerVisibiltyState(ReadInteger(sdxExplorerVisibilityState)) - else - FSaveExplorerVisibility := evsUndefined; - - if ValueExists(sdxExplorerPaneWidth) then - FSaveExplorerPaneWidth := ReadInteger(sdxExplorerPaneWidth); - - if ValueExists(sdxThumbnailsVisibilityState) then - FSaveThumbnailsVisibility := TdxPSThumbnailsVisibiltyState(ReadInteger(sdxThumbnailsVisibilityState)) - else - FSaveThumbnailsVisibility := tvsUndefined; - - if ValueExists(sdxThumbnailsPaneWidth) then - FSaveThumbnailsPaneWidth := ReadInteger(sdxThumbnailsPaneWidth); - except - on ERegistryException do - else - raise; - end; - finally - Free; - end; -end; - -procedure TCustomdxPSPreviewWindow.UpdateStatusText; - - function GetStatusText: string; - begin - if ValidateMargins then - Result := cxGetResourceString(@sdxStatusReady) - else - Result := cxGetResourceString(@sdxOutsideMargins); - end; - -begin - StatusTextPanel.Text := GetStatusText; - StatusBar.Update; -end; - -procedure TCustomdxPSPreviewWindow.WMAppCommand(var Message: TMessage); -begin - with Message do - case dxPSGlbl.GET_APPCOMMAND_LPARAM(lParam) of - APPCOMMAND_BROWSER_BACKWARD: - begin - GotoPrevPage; - Result := 1; - end; - - APPCOMMAND_BROWSER_FORWARD: - begin - GotoNextPage; - Result := 1; - end; - - APPCOMMAND_BROWSER_HOME: - begin - GotoFirstPage; - Result := 1; - end; - - APPCOMMAND_HELP: - begin - DoInvokeHelp; - Result := 1; - end; - - APPCOMMAND_OPEN: - begin - DoExplorerLoadItemData; - Result := 1; - end; - APPCOMMAND_CLOSE: - begin - Close; - Result := 1; - end; - - APPCOMMAND_SAVE: - begin - Result := Ord(CanSaveReport); - if Result = 1 then DoExplorerCreateNewItem; - end; - - APPCOMMAND_PRINT: - begin - DoPrintReport(True); - Result := 1; - end; - end; - inherited; -end; - -procedure TCustomdxPSPreviewWindow.WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); -begin - inherited; - with Message.MinMaxInfo.ptMinTrackSize do - begin - X := 360; - Y := 300; - end; -end; - -procedure TCustomdxPSPreviewWindow.WMSettingChange(var Message: TWMSettingChange); -begin - inherited; - with Message do - if (Flag = 0) and (Section = 'intl') then - begin - RefreshMarginBar(nil); - RefreshStatusBar([ssPaperSize]); - end; -end; - -procedure TCustomdxPSPreviewWindow.WMSize(var Message: TWMSize); -begin - inherited; -{ if (StatusBar <> nil) and (Message.SizeType = SIZE_MAXIMIZED) and Flat then - StatusBar.Invalidate; } -end; - -{ TdxPSStatusBar } - -procedure TdxPSStatusBar.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params do - WindowClass.style := WindowClass.style or CS_HREDRAW or CS_VREDRAW; -end; - -procedure TdxPSStatusBar.Resize; -begin - inherited Resize; - Invalidate; - Update; -end; - -initialization - ClosePaneGlyph := dxPSUtl.CreateGlyphBitmap(CloseGlyphIndex, 0, 0, 7); - -finalization - FreeAndNil(ClosePaneGlyph); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSRELnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSRELnk.pas deleted file mode 100644 index aed91c1b..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSRELnk.pas +++ /dev/null @@ -1,1024 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSRELnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, Graphics, Controls, ComCtrls, RichEdit, dxPSCore, dxPSGlbl, - dxPrnPg, dxPSContainerLnk, cxDrawTextUtils; - -const - dxDefaultRichEditVersion = {$IFDEF DELPHI12} 2 {$ELSE} 1 {$ENDIF}; - -type - TAbstractdxRichEditReportLink = class; - - TdxPSCustomRichEditProducer = class(TdxPSContainerCustomWinControlProducer) - protected - function CreateImage: TGraphic; virtual; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TCustomRichEdit; reintroduce; overload; - class function ControlClass: TControlClass; override; - - function ProducingObjectFriendlyName: string; override; - end; - - TdxPSREPageRenderInfo = class(TdxPSPageRenderInfo) - public - FirstChar: Integer; - LastChar: Integer; - DetailsTwipsRect: TRect; - procedure AdjustTwipsRect; virtual; - procedure Calculate; override; - procedure CalculateBounds; override; - end; - - TdxPSREReportLinkRenderInfo = class(TdxPSReportRenderInfo) - private - FDetailsTwipsRect: TRect; - FFormatRange: TFormatRange; - FPageSize: TPoint; - FPageTwipsRect: TRect; - function GetPageRenderInfo(Index: Integer): TdxPSREPageRenderInfo; - function GetREHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; - function GetReportLink: TAbstractdxRichEditReportLink; - - procedure DoFormatRichEdit; - procedure FormatRichEdit; - procedure PrepareFormatRange; - procedure SetupFormatRangeForNonSelection; - procedure UnprepareFormatRange; - protected - FirstChar: Integer; - LastChar: Integer; - - procedure CalculatePageRenderInfos; override; - procedure DoCalculate; override; - procedure Refresh; override; - - function GetPageRenderInfoClass: TdxPSPageRenderInfoClass; override; - function GetPageColCount: Integer; override; - function GetPageRowCount: Integer; override; - function GetPageSize: TPoint; override; - function GetUnitsPerInch: Integer; override; - function GetWindowScalePair: TdxWindowScalePair; override; - - function LoMetricValueToInternalUnits(Value: Integer): Integer; override; - - property PageRenderInfos[Index: Integer]: TdxPSREPageRenderInfo read GetPageRenderInfo; - property REHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF} read GetREHandle; - property ReportLink: TAbstractdxRichEditReportLink read GetReportLink; - end; - - TdxPSREReportRenderer = class(TdxPSReportRenderer) - private - function GetREHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; - function GetPageRenderInfo: TdxPSREPageRenderInfo; - function GetRenderInfo: TdxPSREReportLinkRenderInfo; - function GetReportLink: TAbstractdxRichEditReportLink; - protected - function GetUnitsPerInch: Integer; override; - procedure PrepareRects; - procedure PrepareRenderPage; override; - procedure RenderPageContent; override; - procedure UnprepareRects; - procedure UnprepareRenderPage; override; - - property REHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF} read GetREHandle; - property PageRenderInfo: TdxPSREPageRenderInfo read GetPageRenderInfo; - property RenderInfo: TdxPSREReportLinkRenderInfo read GetRenderInfo; - property ReportLink: TAbstractdxRichEditReportLink read GetReportLink; - end; - - TdxRichEditVersion = 1..2; - - TAbstractdxRichEditReportLink = class(TBasedxReportLink, IdxPSNativeWin32ControlHandleSupport) - private - FOnlySelected: Boolean; - FRichEditVersion: TdxRichEditVersion; - function GetHasText: Boolean; - procedure SetOnlySelected(Value: Boolean); - procedure SetRichEditVersion(Value: TdxRichEditVersion); - procedure GetCharRange(var ASelStart, ASelLength: Integer); - protected - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure DoCustomDrawPageHeaderOrFooter(AHFObject: TCustomdxPageObject; - ACanvas: TCanvas; APageIndex: Integer; R: TRect; - var ADefaultDrawText, ADefaultDrawBackground: Boolean); override; - procedure DoCustomDrawPageTitle(ACanvas: TCanvas; R: TRect; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var AColor: TColor; AFont: TFont; var ADone: Boolean); override; - function GetRealScaleFactor: Integer; override; - function GetRendererClass: TdxPSReportRendererClass; override; - function GetRenderInfoClass: TdxPSReportRenderInfoClass; override; - procedure InternalRestoreDefaults; override; - - { IdxPSNativeWin32ControlHandleSupport } - function GetNativeHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; - procedure SetNativeHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); - - function GetRichEditHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; virtual; abstract; - function TryLoadRichEditDLL(AVersion: Integer): Boolean; - - property HasText: Boolean read GetHasText; - public - constructor Create(AOwner: TComponent); override; - - class function Aggregable: Boolean; override; - class function CanBeUsedAsStub: Boolean; override; - class function Serializable: Boolean; override; - function SupportsScaling: Boolean; override; - - property REHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF} read GetRichEditHandle; - published - property OnlySelected: Boolean read FOnlySelected write SetOnlySelected default False; - property RichEditVersion: TdxRichEditVersion read FRichEditVersion write SetRichEditVersion default dxDefaultRichEditVersion; - end; - - TCustomdxRichEditReportLink = class(TAbstractdxRichEditReportLink) - protected - function GetCustomRichEdit: TCustomRichEdit; virtual; - function GetRichEditHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; override; - - property CustomRichEdit: TCustomRichEdit read GetCustomRichEdit; - end; - - TdxRichEditReportLink = class(TCustomdxRichEditReportLink) - private - function GetRichEdit: TRichEdit; - public - property RichEdit: TRichEdit read GetRichEdit; - end; - -function GetRichEditAsGraphic(AWnd: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; - ABkColor: TColor; const AMargins: TRect; AGraphicClass: TGraphicClass = nil; {TMetafile} - AWidth: Integer = -1; AHeight: Integer = -1; AMaxHeight: Integer = -1; - ARefDC: HDC = 0; ARichEditVersion: Integer = 1): TGraphic; overload; - -implementation - -uses - Types, SysUtils, Messages, Forms, dxPSUtl, dxCore; - -{ Helpers } - -function GetTextLengthEx(AHandle: HWND; const ATextLengthEx: TGetTextLengthEx): Integer; -begin - Result := SendMessage(AHandle, EM_GETTEXTLENGTHEX, WPARAM(@ATextLengthEx), 0); -end; - -function GetRichEditTextLenght(AHandle: HWND; ARichEditVersion: Integer): Integer; -var - TextLenEx: TGetTextLengthEx; -begin - if ARichEditVersion > 1 then - begin - with TextLenEx do - begin - Flags := GTL_DEFAULT; - CodePage := CP_ACP; - end; - Result := GetTextLengthEx(AHandle, TextLenEx); - end - else - Result := SendMessage(AHandle, WM_GETTEXTLENGTH, 0, 0); -end; - -{ Utilities } - -function GetRichEditAsGraphic(AWnd: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; - ABkColor: TColor; const AMargins: TRect; AGraphicClass: TGraphicClass = nil; {TMetafile} - AWidth: Integer = -1; AHeight: Integer = -1; AMaxHeight: Integer = -1; - ARefDC: HDC = 0; ARichEditVersion: Integer = 1): TGraphic; -const - TwipsPerInch = 1440; - - function CalculateRichEditHeight(DC: HDC; const APPI: TPoint; AWidth: Integer; - out AMaxChars: Integer): Integer; - - function CalculateMaxHeight: Integer; - begin - Result := AMaxHeight; - if Result <> -1 then - Result := MulDiv(Result, TwipsPerInch, APPI.Y); - end; - - var - CharCount, MaxHeight: Integer; - FormatRange: TFormatRange; - begin - CharCount := GetRichEditTextLenght(AWnd, ARichEditVersion); - if CharCount = 0 then - begin - Result := 0; - Exit; - end; - - MaxHeight := CalculateMaxHeight; - - FillChar(FormatRange, SizeOf(FormatRange), 0); - if MaxHeight = -1 then - begin - Result := 0; - repeat - FormatRange.hdc := DC; - FormatRange.hdcTarget := DC; - FormatRange.rc.Right := MulDiv(AWidth - (AMargins.Left + AMargins.Right), TwipsPerInch, APPI.X); - FormatRange.rc.Bottom := TwipsPerInch; - FormatRange.rcPage := FormatRange.rc; - FormatRange.chrg.cpMax := -1; - - FormatRange.chrg.cpMin := SendMessage(AWnd, EM_FORMATRANGE, 0, Longint(@FormatRange)); - Inc(Result, FormatRange.rc.Bottom - FormatRange.rc.Top); - until (FormatRange.chrg.cpMin >= CharCount) or (FormatRange.chrg.cpMin = -1); - AMaxChars := -1; - end - else - begin - FormatRange.hdc := DC; - FormatRange.hdcTarget := DC; - FormatRange.rc.Right := MulDiv(AWidth - 2 * dxTextSpace, TwipsPerInch, APPI.X); - FormatRange.rc.Bottom := MaxHeight; - FormatRange.rcPage := FormatRange.rc; - FormatRange.chrg.cpMax := -1; - AMaxChars := SendMessage(AWnd, EM_FORMATRANGE, 0, Longint(@FormatRange)); - if AMaxChars = 0 then - AMaxChars := -1; - Result := FormatRange.rc.Bottom - FormatRange.rc.Top; - end; - SendMessage(AWnd, EM_FORMATRANGE, 0, 0); - Result := MulDiv(Result, APPI.Y, TwipsPerInch) + AMargins.Top + AMargins.Bottom; - end; - - function PrepareFormatRange(DC: HDC; const APPI: TPoint; - AWidth, AHeight: Integer{In Twips}; AMaxChars: Integer): TFormatRange; - - function CalculateRenderBounds(const R: TRect): TRect; - begin - Result := R; - with Result do - begin - Inc(Left, MulDiv(AMargins.Left, TwipsPerInch, APPI.X)); - Inc(Top, MulDiv(AMargins.Top, TwipsPerInch, APPI.Y)); - Dec(Right, MulDiv(AMargins.Right, TwipsPerInch, APPI.X)); - Dec(Bottom, MulDiv(AMargins.Bottom, TwipsPerInch, APPI.Y)); - end; - end; - - begin - FillChar(Result, SizeOf(Result), 0); - with Result do - begin - Result.hdc := DC; - Result.hdcTarget := DC; - Result.rcPage.Right := AWidth; - Result.rcPage.Bottom := AHeight; - Result.rc := CalculateRenderBounds(rcPage); - Result.chrg.cpMin := 0; - Result.chrg.cpMax := AMaxChars; - end; - end; - - procedure RenderRichEdit(DC: HDC; const AFormatRange: TFormatRange); - begin - SetMapMode(DC, MM_TEXT); - SendMessage(AWnd, EM_FORMATRANGE, 0, 0); - try - SendMessage(AWnd, EM_FORMATRANGE, 1, Longint(@AFormatRange)); - finally - SendMessage(AWnd, EM_FORMATRANGE, 0, 0); - end; - end; - - function GetRichEditAsMetafile(DC: HDC; const APPI: TPoint; AWidth, AHeight: Integer; - AMaxChars: Integer): TMetafile; - const - HundredsMMPerInch = 2540; - var - MetaCanvas: TMetafileCanvas; - FormatRange: TFormatRange; - ACalcMMWidth, ACalcMMHeight: Integer; - begin - Result := TMetafile.Create; - try - ACalcMMWidth := MulDiv(AWidth, HundredsMMPerInch, APPI.X); - ACalcMMHeight := MulDiv(AHeight, HundredsMMPerInch, APPI.Y); - if IsWinVistaOrLater then - begin - Result.Width := AWidth; - Result.Height := AHeight; - end - else - begin - Result.MMWidth := ACalcMMWidth; - Result.MMHeight := ACalcMMHeight; - end; - MetaCanvas := TMetafileCanvas.Create(Result, DC); - try - MetaCanvas.Brush.Color := ABkColor; - MetaCanvas.FillRect(MakeRect(0, 0, AWidth + 1, AHeight + 1)); - AWidth := MulDiv(ACalcMMWidth, TwipsPerInch, HundredsMMPerInch); - AHeight := MulDiv(ACalcMMHeight, TwipsPerInch, HundredsMMPerInch); - FormatRange := PrepareFormatRange(MetaCanvas.Handle, APPI, AWidth, AHeight, AMaxChars); - RenderRichEdit(MetaCanvas.Handle, FormatRange); - finally - MetaCanvas.Free; - end; - except - FreeAndNil(Result); - raise; - end; - end; - - function GetRichEditAsBitmap(DC: HDC; const APPI: TPoint; AWidth, AHeight: Integer; - AMaxChars: Integer): TBitmap; - var - FormatRange: TFormatRange; - begin - Result := TBitmap.Create; - try - Result.Width := AWidth; - Result.Height := AHeight; - - Result.Canvas.Brush.Color := ABkColor; - Result.Canvas.FillRect(MakeRect(0, 0, AWidth, AHeight)); - - AWidth := MulDiv(AWidth, TwipsPerInch, APPI.X); - AHeight := MulDiv(AHeight, TwipsPerInch, APPI.Y); - FormatRange := PrepareFormatRange(Result.Canvas.Handle, APPI, AWidth, AHeight, AMaxChars); - Result.Canvas.Handle := CreateCompatibleDC(DC); - RenderRichEdit(Result.Canvas.Handle, FormatRange); - Result.HandleType := bmDIB; - except - FreeAndNil(Result); - raise; - end; - end; - -var - DC: HDC; - PPI: TPoint; - R: TRect; - W, H, MaxChars: Integer; - Bitmap: TBitmap; -begin - DC := ARefDC; - if DC = 0 then DC := GetDC(0); - try - PPI.X := GetDeviceCaps(DC, LOGPIXELSX); - PPI.Y := GetDeviceCaps(DC, LOGPIXELSY); - - W := AWidth; - H := AHeight; - if (W = -1) or (H = -1) then - begin - GetWindowRect(AWnd, R); - with R do - begin - if W = -1 then W := Right - Left; - if H = -1 then H := CalculateRichEditHeight(DC, PPI, W, MaxChars); - end; - end; - - if (H = 0) or (W = 0) then - begin - Result := nil; - Exit; - end; - - if AGraphicClass = nil then AGraphicClass := TMetafile; - if not AGraphicClass.InheritsFrom(TMetafile) then - begin - Bitmap := GetRichEditAsBitmap(DC, PPI, W, H, MaxChars); - try - if AGraphicClass <> TBitmap then - begin - Result := dxPSUtl.CreateGraphic(AGraphicClass); - try - Result.Assign(Bitmap); - except - FreeAndNil(Bitmap); - FreeAndNil(Result); - raise; - end; - end - else - Result := Bitmap; - finally - if AGraphicClass <> TBitmap then Bitmap.Free; - end; - end - else - Result := GetRichEditAsMetafile(DC, PPI, W, H, MaxChars); - - finally - if ARefDC = 0 then ReleaseDC(0, DC); - end; -end; - -{ TdxPSCustomRichEditProducer } - -function TdxPSCustomRichEditProducer.Control: TCustomRichEdit; -begin - Result := inherited Control as TCustomRichEdit; -end; - -class function TdxPSCustomRichEditProducer.ControlClass: TControlClass; -begin - Result := TCustomRichEdit; -end; - -function TdxPSCustomRichEditProducer.ProducingObjectFriendlyName: string; -begin - Result := ''; - if not IsDesigning and (RichEdit_GetLines(Control).Count <> 0) then - Result := dxPSContainerLnk.dxPSMakeFriendlyNameFromStrings(RichEdit_GetLines(Control)); - if Result = '' then - Result := inherited ProducingObjectFriendlyName; -end; - -function TdxPSCustomRichEditProducer.CreateImage: TGraphic; - - function GetMargins: TRect; - begin - Result := MakeRect(dxTextSpace, dxTextSpace, dxTextSpace, dxTextSpace); - end; - - function GetMaxHeight: Integer; - begin - if Definition.OptionsPlace.ExpandHeight then - Result := -1 - else - Result := Control.ClientHeight; - end; - -begin - Result := GetRichEditAsGraphic(Control.Handle, Control_GetColor(Control), - GetMargins, TMetafile, Control.ClientWidth, -1, GetMaxHeight, DC, - dxDefaultRichEditVersion); -end; - -procedure TdxPSCustomRichEditProducer.InitializeItem(AnItem: TdxReportVisualItem); -var - Graphic: TGraphic; -begin - inherited; - with TdxReportCellGraphic(AnItem) do - begin - CellSides := BorderStyleMap[RichEdit_GetBorderStyle(Control)]; - Color := Control_GetColor(Control); - Graphic := Self.CreateImage; - try - Image := Graphic; - finally - Graphic.Free; - end; - Transparent := False; - end; -end; - -function TdxPSCustomRichEditProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellGraphic; -end; - -{ TdxPSREPageRenderInfo } - -procedure TdxPSREPageRenderInfo.AdjustTwipsRect; -begin - if HasTitle then - Inc(DetailsTwipsRect.Top, MulDiv(TitleHeight, 1440, RenderInfo.UnitsPerInch)); -end; - -procedure TdxPSREPageRenderInfo.Calculate; -begin - CalculateBounds; - CalculateOffsets; -end; - -procedure TdxPSREPageRenderInfo.CalculateBounds; -begin - DetailBounds := PrinterPage.PaintRectPixels; -end; - -{ TdxPSREReportLinkRenderInfo } - -procedure TdxPSREReportLinkRenderInfo.CalculatePageRenderInfos; -var - I: Integer; -begin - FormatRichEdit; - for I := 0 to VirtualPageCount - 1 do - PageRenderInfos[I].Calculate; -end; - -procedure TdxPSREReportLinkRenderInfo.DoCalculate; -begin - FPageSize := inherited GetPageSize; - CalculateTitleBounds; - CalculateHeaderAndFooterBounds; - CalculatePageHeaderAndFooterBounds; - CalculatePageRenderInfos; -end; - -procedure TdxPSREReportLinkRenderInfo.Refresh; -begin - inherited; - FillChar(FFormatRange, SizeOf(TFormatRange), 0); - FirstChar := 0; - LastChar := 0; - FDetailsTwipsRect := dxPSGlbl.NullRect; - FPageTwipsRect := dxPSGlbl.NullRect; -end; - -function TdxPSREReportLinkRenderInfo.GetPageRenderInfoClass: TdxPSPageRenderInfoClass; -begin - Result := TdxPSREPageRenderInfo; -end; - -function TdxPSREReportLinkRenderInfo.GetPageColCount: Integer; -begin - Result := 1; -end; - -function TdxPSREReportLinkRenderInfo.GetPageRowCount: Integer; -begin - Result := VirtualPageCount; -end; - -function TdxPSREReportLinkRenderInfo.GetPageSize: TPoint; -begin - Result := FPageSize; -end; - -function TdxPSREReportLinkRenderInfo.GetUnitsPerInch: Integer; -begin - Result := Screen.PixelsPerInch; -end; - -function TdxPSREReportLinkRenderInfo.GetWindowScalePair: TdxWindowScalePair; -begin - Result.Numerator := 100; - Result.Denominator := 100; -end; - -function TdxPSREReportLinkRenderInfo.LoMetricValueToInternalUnits(Value: Integer): Integer; -begin - // We don't have to take into account the ScaleFactor - Result := MulDiv(Value, UnitsPerInch, 254); -end; - -function TdxPSREReportLinkRenderInfo.GetPageRenderInfo(Index: Integer): TdxPSREPageRenderInfo; -begin - Result := inherited PageRenderInfos[Index] as TdxPSREPageRenderInfo; -end; - -function TdxPSREReportLinkRenderInfo.GetREHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - Result := ReportLink.REHandle; -end; - -function TdxPSREReportLinkRenderInfo.GetReportLink: TAbstractdxRichEditReportLink; -begin - Result := inherited ReportLink as TAbstractdxRichEditReportLink; -end; - -procedure TdxPSREReportLinkRenderInfo.DoFormatRichEdit; -var - PageRenderInfo: TdxPSREPageRenderInfo; -begin - VirtualPageCount := 0; - repeat - PageRenderInfo := CreatePageRenderInfo(VirtualPageCount) as TdxPSREPageRenderInfo; - if VirtualPageCount = 0 then - PageRenderInfo.FirstChar := FirstChar - else - PageRenderInfo.FirstChar := PageRenderInfos[VirtualPageCount - 1].LastChar; - - FFormatRange.chrg.cpMin := PageRenderInfo.FirstChar; - FFormatRange.rcPage := FPageTwipsRect; - - PageRenderInfo.DetailsTwipsRect := FDetailsTwipsRect; - PageRenderInfo.AdjustTwipsRect; - FFormatRange.rc := PageRenderInfo.DetailsTwipsRect; - - PageRenderInfo.LastChar := SendMessage(REHandle, EM_FORMATRANGE, 0, Longint(@FFormatRange)); - if PageRenderInfo.LastChar > LastChar then - PageRenderInfo.LastChar := LastChar; - Inc(VirtualPageCount); - - until (PageRenderInfo.LastChar >= LastChar) or (PageRenderInfo.LastChar = -1); -end; - -procedure TdxPSREReportLinkRenderInfo.FormatRichEdit; -begin - PrepareFormatRange; - try - if LastChar > 0 then - DoFormatRichEdit; - finally - UnprepareFormatRange; - end; -end; - -procedure TdxPSREReportLinkRenderInfo.PrepareFormatRange; -var - SelStart, SelLength: Integer; -begin - FPageTwipsRect.BottomRight := ScalePoint(PrinterPage.RealPageSizeLoMetric, 1440, 254); - FDetailsTwipsRect := ScaleRect(PrinterPage.PaintRectLoMetric, 1440, 254, 1440, 254); - - ReportLink.GetCharRange(SelStart, SelLength); - if SelLength <> 0 then - begin - FirstChar := SelStart; - LastChar := SelStart + SelLength; - end - else - SetupFormatRangeForNonSelection; - - with FFormatRange do - begin - hDC := GetDC(0); - hdcTarget := hDC; - rc := FDetailsTwipsRect; - rcPage := FPageTwipsRect; - if SelLength = 0 then - chrg.cpMax := -1 - else - chrg.cpMax := LastChar; - end; - - SendMessage(REHandle, EM_FORMATRANGE, 0, 0); -end; - -procedure TdxPSREReportLinkRenderInfo.SetupFormatRangeForNonSelection; -begin - FirstChar := 0; - LastChar := GetRichEditTextLenght(REHandle, ReportLink.RichEditVersion); -end; - -procedure TdxPSREReportLinkRenderInfo.UnprepareFormatRange; -begin - SendMessage(REHandle, EM_FORMATRANGE, 0, 0); - ReleaseDC(0, FFormatRange.hDC); -end; - -{ TdxPSREReportLinkRenderInfo } - -function TdxPSREReportRenderer.GetUnitsPerInch: Integer; -begin - if IsPrinterDC(DC) then - Result := PPI - else - Result := inherited GetUnitsPerInch; -end; - -procedure TdxPSREReportRenderer.PrepareRects; -begin - with RenderInfo do - begin - FPageSize.X := MulDiv(FPageSize.X, PPI, UnitsPerInch); - FPageSize.Y := MulDiv(FPageSize.Y, PPI, UnitsPerInch); - PageHeaderBounds := ScaleRect(PageHeaderBounds, PPI, UnitsPerInch, PPI, UnitsPerInch); - PageFooterBounds := ScaleRect(PageFooterBounds, PPI, UnitsPerInch, PPI, UnitsPerInch); - TitleBounds := ScaleRect(TitleBounds, PPI, UnitsPerInch, PPI, UnitsPerInch); - PageRenderInfo.TitleOffset := ScalePoint(PageRenderInfo.TitleOffset, PPI, UnitsPerInch); - end; -end; - -procedure TdxPSREReportRenderer.PrepareRenderPage; -begin - PrepareRects; - inherited; -end; - -procedure TdxPSREReportRenderer.RenderPageContent; -var - FormatRange: TFormatRange; - ClipRect: TRect; - Rgn: HRGN; - LastChar: Integer; -begin - FillChar(FormatRange, SizeOf(TFormatRange), 0); - with FormatRange do - begin - hDC := DC; - hdcTarget := DC;{3.1} - rc := PageRenderInfo.DetailsTwipsRect; - rcPage := RenderInfo.FPageTwipsRect; - chrg.cpMin := PageRenderInfo.FirstChar; - chrg.cpMax := PageRenderInfo.LastChar; - end; - - ClipRect := ScaleRect(PageRenderInfo.DetailBounds, PPI, RenderInfo.UnitsPerInch, PPI, RenderInfo.UnitsPerInch); - - Rgn := IntersectClipRect(ClipRect); - - SendMessage(REHandle, EM_FORMATRANGE, 0, 0); - try - LastChar := SendMessage(REHandle, EM_FORMATRANGE, 1, Longint(@FormatRange)); - - if PageRenderInfo.LastChar <> LastChar then - begin - PageRenderInfo.LastChar := LastChar; - if RenderingPageIndex < RenderInfo.VirtualPageCount - 1 then - RenderInfo.PageRenderInfos[RenderingPageIndex + 1].FirstChar := LastChar; - - // Small trick: because Print output does not equal Preview output, - // we should invalidate Preview window after Print-Out - if IsPrinterDC(DC) and ReportLink.ComponentPrinter.PreviewExists then - ReportLink.ComponentPrinter.PreviewWindow.InvalidatePage(RenderingPageIndex); - end; - finally - SendMessage(REHandle, EM_FORMATRANGE, 0, 0); - end; - - RestoreClipRgn(Rgn); -end; - -procedure TdxPSREReportRenderer.UnprepareRects; -begin - with RenderInfo do - begin - FPageSize.X := MulDiv(FPageSize.X, UnitsPerInch, PPI); - FPageSize.Y := MulDiv(FPageSize.Y, UnitsPerInch, PPI); - PageHeaderBounds := ScaleRect(PageHeaderBounds, UnitsPerInch, PPI, UnitsPerInch, PPI); - PageFooterBounds := ScaleRect(PageFooterBounds, UnitsPerInch, PPI, UnitsPerInch, PPI); - TitleBounds := ScaleRect(TitleBounds, UnitsPerInch, PPI, UnitsPerInch, PPI); - PageRenderInfo.TitleOffset := ScalePoint(PageRenderInfo.TitleOffset, UnitsPerInch, PPI); - end; -end; - -procedure TdxPSREReportRenderer.UnprepareRenderPage; -begin - inherited; - UnprepareRects; -end; - -function TdxPSREReportRenderer.GetREHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - Result := ReportLink.REHandle; -end; - -function TdxPSREReportRenderer.GetPageRenderInfo: TdxPSREPageRenderInfo; -begin - Result := inherited PageRenderInfo as TdxPSREPageRenderInfo; -end; - -function TdxPSREReportRenderer.GetRenderInfo: TdxPSREReportLinkRenderInfo; -begin - Result := inherited RenderInfo as TdxPSREReportLinkRenderInfo; -end; - -function TdxPSREReportRenderer.GetReportLink: TAbstractdxRichEditReportLink; -begin - Result := inherited ReportLink as TAbstractdxRichEditReportLink; -end; - -{ TAbstractdxRichEditReportLink } - -constructor TAbstractdxRichEditReportLink.Create(AOwner: TComponent); -begin - inherited; - FRichEditVersion := dxDefaultRichEditVersion; -end; - -class function TAbstractdxRichEditReportLink.Aggregable: Boolean; -begin - Result := False; -end; - -class function TAbstractdxRichEditReportLink.CanBeUsedAsStub: Boolean; -begin - Result := False; -end; - -class function TAbstractdxRichEditReportLink.Serializable: Boolean; -begin - Result := False; -end; - -function TAbstractdxRichEditReportLink.SupportsScaling: Boolean; -begin - Result := False; -end; - -procedure TAbstractdxRichEditReportLink.ConstructReport(AReportCells: TdxReportCells); -begin -end; - -procedure TAbstractdxRichEditReportLink.DoCustomDrawPageHeaderOrFooter( - AHFObject: TCustomdxPageObject; ACanvas: TCanvas; APageIndex: Integer; - R: TRect; var ADefaultDrawText, ADefaultDrawBackground: Boolean); -var - APixelsNumerator: Integer; -begin - APixelsNumerator := Renderer.PPI; - DoParentCustomDrawPageHeaderOrFooter(AHFObject, ACanvas, APageIndex, R, - ADefaultDrawText, ADefaultDrawBackground, APixelsNumerator); - if ADefaultDrawText or ADefaultDrawBackground then - if AHFObject is TdxPageHeader then - begin - if Assigned(OnCustomDrawPageHeader) then - OnCustomDrawPageHeader(Self, ACanvas, APageIndex, R, - APixelsNumerator, PixelsDenominator, ADefaultDrawText, - ADefaultDrawBackground) - end - else - if Assigned(OnCustomDrawPageFooter) then - OnCustomDrawPageFooter(Self, ACanvas, APageIndex, R, - APixelsNumerator, PixelsDenominator, ADefaultDrawText, - ADefaultDrawBackground); -end; - -procedure TAbstractdxRichEditReportLink.DoCustomDrawPageTitle(ACanvas: TCanvas; - R: TRect; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var AColor: TColor; AFont: TFont; var ADone: Boolean); -var - APixelsNumerator: Integer; -begin - APixelsNumerator := Renderer.PPI; - DoParentCustomDrawReportTitle(ACanvas, R, ATextAlignX, ATextAlignY, - AColor, AFont, ADone, APixelsNumerator); - if not ADone and Assigned(OnCustomDrawReportLinkTitle) then - OnCustomDrawReportLinkTitle(Self, ACanvas, R, APixelsNumerator, - PixelsDenominator, ATextAlignX, ATextAlignY, AColor, AFont, ADone); -end; - -function TAbstractdxRichEditReportLink.GetRealScaleFactor: Integer; -begin - Result := 100; -end; - -function TAbstractdxRichEditReportLink.GetRendererClass: TdxPSReportRendererClass; -begin - Result := TdxPSREReportRenderer; -end; - -function TAbstractdxRichEditReportLink.GetRenderInfoClass: TdxPSReportRenderInfoClass; -begin - Result := TdxPSREReportLinkRenderInfo; -end; - -procedure TAbstractdxRichEditReportLink.InternalRestoreDefaults; -begin - inherited; - OnlySelected := False; -end; - -{ IdxPSNativeWin32ControlHandleSupport } - -function TAbstractdxRichEditReportLink.GetNativeHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - Result := REHandle; -end; - -procedure TAbstractdxRichEditReportLink.SetNativeHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); -begin -end; - -function TAbstractdxRichEditReportLink.TryLoadRichEditDLL(AVersion: Integer): Boolean; -const - REVersions: array[Boolean] of string = ('RICHED32.DLL', 'RICHED20.DLL'); -var - OldError: Longint; - LibHandle: THandle; -begin - OldError := SetErrorMode(SEM_NOOPENFILEERRORBOX); - try - LibHandle := LoadLibrary(PChar(REVersions[AVersion > 1])); - try - if (LibHandle > 0) and (LibHandle < HINSTANCE_ERROR) then - LibHandle := 0; - Result := LibHandle <> 0; - finally - if LibHandle <> 0 then FreeLibrary(LibHandle); - end; - finally - SetErrorMode(OldError); - end; -end; - -function TAbstractdxRichEditReportLink.GetHasText: Boolean; -begin - Result := (REHandle <> 0) and (GetRichEditTextLenght(REHandle, RichEditVersion) > 0); -end; - -procedure TAbstractdxRichEditReportLink.SetOnlySelected(Value: Boolean); -begin - if FOnlySelected <> Value then - begin - FOnlySelected := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxRichEditReportLink.SetRichEditVersion(Value: TdxRichEditVersion); -begin - if FRichEditVersion <> Value then - if TryLoadRichEditDLL(Value) then - begin - FRichEditVersion := Value; - LinkModified(True); - end; -end; - -procedure TAbstractdxRichEditReportLink.GetCharRange(var ASelStart, ASelLength: Integer); -var - CharRange: TCharRange; -begin - ASelStart := 0; - ASelLength := 0; - if (REHandle <> 0) and OnlySelected and HasText then - begin - SendMessage(REHandle, EM_EXGETSEL, 0, Longint(@CharRange)); - ASelStart := CharRange.cpMin; - ASelLength := CharRange.cpMax - CharRange.cpMin; - end; -end; - -{ TCustomdxRichEditReportLink } - -function TCustomdxRichEditReportLink.GetCustomRichEdit: TCustomRichEdit; -begin - Result := TCustomRichEdit(Component); -end; - -function TCustomdxRichEditReportLink.GetRichEditHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - if CustomRichEdit <> nil then - begin - CustomRichEdit.HandleNeeded; - Result := CustomRichEdit.Handle; - end - else - Result := 0; -end; - -{ TdxRichEditReportLink } - -function TdxRichEditReportLink.GetRichEdit: TRichEdit; -begin - Result := inherited Component as TRichEdit; -end; - -{ Assistants } - -procedure RegisterProducers; -begin - TdxPSCustomRichEditProducer.Register; -end; - -procedure UnregisterProducers; -begin - TdxPSCustomRichEditProducer.Unregister; -end; - -initialization - dxPSRegisterReportLink(TdxRichEditReportLink, TRichEdit, nil); - RegisterProducers; - -finalization - UnregisterProducers; - dxPSUnregisterReportLink(TdxRichEditReportLink, TRichEdit, nil); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSRELnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSRELnkReg.pas deleted file mode 100644 index 3e637ab8..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSRELnkReg.pas +++ /dev/null @@ -1,61 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSRELnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes, dxPSRELnk; - -procedure Register; -begin - RegisterNoIcon([TdxRichEditReportLink]); - RegisterPropertyEditor(TypeInfo(string), TdxRichEditReportLink, 'DesignerCaption', nil); - RegisterPropertyEditor(TypeInfo(THelpContext), TdxRichEditReportLink, 'DesignerHelpContext', nil); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSReg.pas deleted file mode 100644 index 19f0010c..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSReg.pas +++ /dev/null @@ -1,2599 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSReg; - -interface - -{$I cxVer.inc} - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - PicEdit, - Classes, dxPSCore; - -type - TdxReportLinkComponentPropertyEditor = class(TComponentProperty) - private - FComponents: TStringList; - function GetReportLink: TBasedxReportLink; - protected - procedure AddComponent(const AName: string); - procedure GetComponents; virtual; - function IsComponentValid(AComponent: TComponent): Boolean; virtual; - public - destructor Destroy; override; - procedure Initialize; override; - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - property ReportLink: TBasedxReportLink read GetReportLink; - end; - -procedure Register; - -implementation - -{$R dxPSDsgImgs.res} - -{$IFNDEF DELPHI6} - {Delphi6 and up versions don't support Bitmaps in MenuItem} - {$IFDEF DELPHI5} - {$DEFINE IDE_MENUBITMAPS} - {$ENDIF} -{$ENDIF} - -{.$DEFINE LIMITED_EDITION} - -uses - {$IFDEF DELPHI6} - DesignConst, DesignMenus, VCLEditors, RTLConsts, - {$ELSE} - Consts, - {$ENDIF} - ToolsAPI, - Windows, SysUtils, ShellAPI, FileCtrl, Graphics, Dialogs, Controls, ExtCtrls, - TabNotBk, ImgList, Forms, TypInfo, - {$IFDEF IDE_MENUBITMAPS} Menus, {$ENDIF} - {$IFNDEF LIMITED_EDITION} dxRegEd, {$ENDIF} - dxPSGlbl, dxPSUtl, dxWrap, dxBase, dxPSEngn, dxPreVw, dxPrnPg, dxBkgnd, - dxPrnDev, dxPgsDlg, dxPrnDlg, dxPPAttr, dxPSfmTtl, dxPSFileBasedXplorer, - dxPSGraphicLnk, dxPSContainerLnk, dxPSTextLnk, dxBrhDlg, dxPSfmEditDesc, - dxPSPrVwDsg, dxPSfmStlAdd, dxPSfmLnkDsg, dxPSfmLnkAdd, dxPSfmLnkAddE, - dxPSDsgProxies, dxPSfmStlDsg, cxDrawTextUtils; - -const - sdxDefault = 'Default'; - sdxRestoreDefaultIcon = 'Type "default" to restore original Icon'; - sdxRestoreDefaultGlyph = 'Type "default" to restore original Glyph'; - sdxCreateNewStyleManager = ''; - - sdxReportLinks = 'ReportLinks...'; - sdxPrintStyles = 'PrintStyles...'; - sdxAddNewStyle = '&Add...'; - sdxAddNewLink = '&Add...'; - sdxAddNewEmtpyLink = 'Add E&mpty...'; - sdxPageBackground = 'Page Bac&kground...'; - sdxClearBackground = 'Clea&r Background'; - sdxRestoreDefaults = 'Rest&ore Defaults'; - sdxRestoreOriginal = 'Restore Or&iginal'; - sdxMakeCurrent = '&Make Current'; - sdxPageSetupDialog = 'PageSetup Dialog...'; - sdxPageSetup = 'Page Set&up...'; - sdxPrintDialog = 'Print Dialog...'; - sdxPrint = '&Print...'; - sdxPrintPreview = 'Print Pre&view...'; - sdxShowReportDesigner = 'Show D&esigner...'; - sdxCreateFolders = 'Create &Folders'; - sdxDesignerNoAvailable = 'Designer not available'; - sdxClickForPageSetup = 'Click for Page Setup...'; - sdxCustomPaperSize = 'CustomSize - DMPAPER_USER #'; - sdxCustomBin = 'CustomBin - DMBIN_USER #'; - sdxInThousandths = '(in thousandths)'; - sdxWEBPage = 'http://www.devexpress.com'; - sdxDevex = 'Developer Express Inc.'; - sdxPrintingSystem: string = 'ExpressPrinting System '; - - IDB_DXPSDESIGN_BIN_AUTOTRAY = 'IDB_DXPSDESIGN_BIN_AUTOTRAY'; - IDB_DXPSDESIGN_BIN_MANUALTRAY = 'IDB_DXPSDESIGN_BIN_MANUALTRAY'; - IDB_DXPSDESIGN_PAPERORIENTATION_LANDSCAPE = 'IDB_DXPSDESIGN_PAPERORIENTATION_LANDSCAPE'; - IDB_DXPSDESIGN_PAPERORIENTATION_PORTRAIT = 'IDB_DXPSDESIGN_PAPERORIENTATION_PORTRAIT'; - IDB_DXPSDESIGN_PAPER_ENVELOPE = 'IDB_DXPSDESIGN_PAPER_ENVELOPE'; - IDB_DXPSDESIGN_PAPER_STANDARD = 'IDB_DXPSDESIGN_PAPER_STANDARD'; - IDB_DXPSDESIGN_PRINTORDER_OVERTHENDOWN = 'IDB_DXPSDESIGN_PRINTORDER_OVERTHENDOWN'; - IDB_DXPSDESIGN_PRINTORDER_DOWNTHENOVER = 'IDB_DXPSDESIGN_PRINTORDER_DOWNTHENOVER'; - - IDB_DXPSDESIGN_DOADD = 'IDB_DXPSDESIGN_DOADD'; - IDB_DXPSDESIGN_DOADDEMPTY = 'IDB_DXPSDESIGN_DOADDEMPTY'; - IDB_DXPSDESIGN_DODESIGNER = 'IDB_DXPSDESIGN_DODESIGNER'; - IDB_DXPSDESIGN_DOPAGEBACKGROUND = 'IDB_DXPSDESIGN_DOPAGEBACKGROUND'; - IDB_DXPSDESIGN_DOPAGESETUP = 'IDB_DXPSDESIGN_DOPAGESETUP'; - IDB_DXPSDESIGN_DOPREVIEW = 'IDB_DXPSDESIGN_DOPREVIEW'; - IDB_DXPSDESIGN_DOPRINT = 'IDB_DXPSDESIGN_DOPRINT'; - IDB_DXPSDESIGN_DOPROPERTIES = 'IDB_DXPSDESIGN_DOPROPERTIES'; - IDB_DXPSDESIGN_DOWEB = 'IDB_DXPSDESIGN_DOWEB'; - -{$IFDEF IDE_MENUBITMAPS} -var - FBmpWEB: TBitmap; - FBmpItems: TBitmap; - FBmpPrint: TBitmap; - FBmpPageSetup: TBitmap; - FBmpPageBackground: TBitmap; - FBmpDesigner: TBitmap; - FBmpPrintPreview: TBitmap; - FBmpNewEmpty: TBitmap; - FBmpNew: TBitmap; -{$ENDIF} - -{$IFDEF DELPHI5} -var - ilPapers: TImageList; - ilBins: TImageList; - ilPrintOrders: TImageList; - ilPaperOrientations: TImageList; -{$ENDIF} - -type - TdxComponentPrinterEditor = class(TComponentEditor) - public - procedure ExecuteVerb(Index: Integer); override; - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - {$IFDEF IDE_MENUBITMAPS} - procedure PrepareItem(Index: Integer; const AItem: TMenuItem); override; - {$ENDIF} - end; - - TdxReportLinkEditor = class(TComponentEditor) - private - function ReportLink: TBasedxReportLink; - public - procedure ExecuteVerb(Index: Integer); override; - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - {$IFDEF DELPHI5} - procedure PrepareItem(Index: Integer; - const AItem: {$IFDEF DELPHI6} IMenuItem {$ELSE} TMenuItem {$ENDIF}); override; - {$ENDIF} - end; - - TdxPrintStyleManagerEditor = class(TComponentEditor) - public - procedure ExecuteVerb(Index: Integer); override; - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - {$IFDEF IDE_MENUBITMAPS} - procedure PrepareItem(Index: Integer; const AItem: TMenuItem); override; - {$ENDIF} - end; - - TdxPrintStyleEditor = class(TComponentEditor) - private - function PrintStyle: TBasedxPrintStyle; - public - procedure ExecuteVerb(Index: Integer); override; - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - {$IFDEF DELPHI5} - procedure PrepareItem(Index: Integer; - const AItem: {$IFDEF DELPHI6} IMenuItem {$ELSE} TMenuItem{$ENDIF}); override; - {$ENDIF} - end; - - TdxPageSetupDialogEditor = class(TComponentEditor) - public - procedure ExecuteVerb(Index: Integer); override; - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - {$IFDEF DELPHI5} - procedure PrepareItem(Index: Integer; - const AItem: {$IFDEF DELPHI6} IMenuItem {$ELSE} TMenuItem{$ENDIF}); override; - {$ENDIF} - end; - - TdxPrintDialogEditor = class(TComponentEditor) - public - procedure ExecuteVerb(Index: Integer); override; - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - {$IFDEF IDE_MENUBITMAPS} - procedure PrepareItem(Index: Integer; const AItem: TMenuItem); override; - {$ENDIF} - end; - - TCustomdxPSExplorerEditor = class(TComponentEditor) - public - procedure ExecuteVerb(Index: Integer); override; - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - {$IFDEF IDE_MENUBITMAPS} - procedure PrepareItem(Index: Integer; const AItem: TMenuItem); override; - {$ENDIF} - end; - - TdxEngineControllerEditor = class(TComponentEditor) - public - procedure ExecuteVerb(Index: Integer); override; - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - {$IFDEF IDE_MENUBITMAPS} - procedure PrepareItem(Index: Integer; const AItem: TMenuItem); override; - {$ENDIF} - end; - - TdxCompositionReportLinkPropertyEditor = class(TComponentProperty) - private - FComponents: TStringList; - function GetItems: TdxCompositionLinkItems; - procedure CheckProc(const S: string); - function IsComponentValid(AComponent: TComponent): Boolean; - protected - public - destructor Destroy; override; - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure Initialize; override; - property Items: TdxCompositionLinkItems read GetItems; - end; - - TdxIndexPropertyEditor = class(TIntegerProperty) - public - function GetAttributes: TPropertyAttributes; override; - end; - - TdxReportLinkDesignerPropertyEditor = class(TPropertyEditor) - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure Edit; override; - end; - - TdxPSExplorerFilterPropertyEditor = class(TStringProperty - {$IFDEF DELPHI6}, ICustomPropertyListDrawing {$ENDIF}) - protected - {$IFDEF DELPHI5} - function GetImageIndex(const Value: string): Integer; - function GetImageList: TCustomImageList; - {$ENDIF} - function IsAcceptableComponentClass(AComponentClass: TClass): Boolean; virtual; - public - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - {$IFDEF DELPHI5} - procedure ListMeasureWidth(const Value: string; ACanvas: TCanvas; - var AWidth: Integer); {$IFNDEF DELPHI6} override; {$ENDIF} - procedure ListMeasureHeight(const Value: string; ACanvas: TCanvas; - var AHeight: Integer); {$IFNDEF DELPHI6} override; {$ENDIF} - procedure ListDrawValue(const Value: string; ACanvas: TCanvas; - const ARect: TRect; ASelected: Boolean); {$IFNDEF DELPHI6} override; {$ENDIF} - - property ImageIndexes[const Value: string]: Integer read GetImageIndex; - property ImageList: TCustomImageList read GetImageList; - {$ENDIF} - end; - -{$IFDEF DELPHI5} - - TdxPrintStyleImageIndexPropertyEditor = class(TIntegerProperty - {$IFDEF DELPHI6} - ,ICustomPropertyDrawing, ICustomPropertyListDrawing - {$ENDIF}) - public - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure ListMeasureHeight(const Value: string; ACanvas: TCanvas; - var AHeight: Integer); {$IFNDEF DELPHI6} override;{$ENDIF} - procedure ListMeasureWidth(const Value: string; - ACanvas: TCanvas; var AWidth: Integer); {$IFNDEF DELPHI6} override;{$ENDIF} - procedure ListDrawValue(const Value: string; ACanvas: TCanvas; - const ARect: TRect; ASelected: Boolean); {$IFNDEF DELPHI6} override;{$ENDIF} - procedure PropDrawValue(ACanvas: TCanvas; const ARect: TRect; - ASelected: Boolean); {$IFNDEF DELPHI6} override;{$ENDIF} - {$IFDEF DELPHI6} - { ICustomPropertyDrawing } - procedure PropDrawName(ACanvas: TCanvas; const ARect: TRect; - ASelected: Boolean); - {$ENDIF} - end; - - TdxCustomDrawListPropertyEditor = class(TEnumProperty - {$IFDEF DELPHI6}, ICustomPropertyListDrawing {$ENDIF}) - protected - function GetImageIndex(const Value: string): Integer; virtual; abstract; - function GetImageList: TImageList; virtual; abstract; - public - procedure ListMeasureWidth(const Value: string; ACanvas: TCanvas; - var AWidth: Integer); {$IFNDEF DELPHI6} override; {$ENDIF} - procedure ListMeasureHeight(const Value: string; ACanvas: TCanvas; - var AHeight: Integer); {$IFNDEF DELPHI6} override; {$ENDIF} - procedure ListDrawValue(const Value: string; ACanvas: TCanvas; - const ARect: TRect; ASelected: Boolean); {$IFNDEF DELPHI6} override; {$ENDIF} - - property ImageIndexes[const Value: string]: Integer read GetImageIndex; - property ImageList: TImageList read GetImageList; - end; - - TdxPaperOrientationPropertyEditor = class(TdxCustomDrawListPropertyEditor) - protected - function GetImageIndex(const Value: string): Integer; override; - function GetImageList: TImageList; override; - end; - - TdxPrintOrderPropertyEditor = class(TdxCustomDrawListPropertyEditor) - protected - function GetImageIndex(const Value: string): Integer; override; - function GetImageList: TImageList; override; - end; - -{$ENDIF} - - TdxPathPropertyEditor = class(TStringProperty) - private - function GetExplorer(Index: Integer): TdxPSFileBasedExplorer; - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - property Explorers[Index: Integer]: TdxPSFileBasedExplorer read GetExplorer; - end; - - TdxRegistryPathPropertyEditor = class(TStringProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - - TdxExplorerStubLinkPropertyEditor = class(TComponentProperty) - public - procedure GetValues(Proc: TGetStrProc); override; - end; - - TdxCustomContainerReportLinkComponentPropertyEditor = class(TdxReportLinkComponentPropertyEditor - {$IFDEF DELPHI6}, ICustomPropertyListDrawing {$ENDIF}) - {$IFDEF DELPHI5} - private - function GetImageIndex(const Value: string): Integer; - function GetImages: TCustomImageList; - {$ENDIF} - protected - procedure GetComponents; override; - function GetProject: IOTAProject; - function IsComponentValid(AComponent: TComponent): Boolean; override; - function IsSupportedModuleType(const AModuleType: TOTAModuleType): Boolean; - {$IFDEF DELPHI5} - public - procedure Initialize; override; - procedure ListMeasureWidth(const Value: string; ACanvas: TCanvas; - var AWidth: Integer); {$IFNDEF DELPHI6} override; {$ENDIF} - procedure ListMeasureHeight(const Value: string; ACanvas: TCanvas; - var AHeight: Integer); {$IFNDEF DELPHI6} override; {$ENDIF} - procedure ListDrawValue(const Value: string; ACanvas: TCanvas; - const ARect: TRect; ASelected: Boolean); {$IFNDEF DELPHI6} override; {$ENDIF} - - property ImageIndexes[const Value: string]: Integer read GetImageIndex; - property Images: TCustomImageList read GetImages; - {$ENDIF} - end; - - TdxMeasurementUnitsPropertyEditor = class(TEnumProperty) - public - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - function GetValue: string; override; - end; - - TdxPrinterPagePropertyEditor = class(TClassProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - - TdxReportTitlePropertyEditor = class(TClassProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - - TdxReportTitleTextAlignXPropertyEditor = class(TEnumProperty) - public - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - TdxReportTitleTextAlignYPropertyEditor = class(TEnumProperty) - public - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - TdxHeaderFooterTextAlignYPropertyEditor = class(TEnumProperty) - public - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - TdxPrinterPagePropertyEditor2 = class(TClassProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - - TdxPointWrapperEditor = class(TClassProperty) - private - function PointWrapper: TdxPointWrapper; - public - function GetValue: string; override; - end; - - TdxRectWrapperEditor = class(TClassProperty) - private - function RectWrapper: TdxRectWrapper; - public - function GetValue: string; override; - end; - - TdxBackgroundPropertyEditor = class(TClassProperty) - private - function GetBackground: TdxBackground; - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - property Background: TdxBackground read GetBackground; - end; - - TdxBrushPropertyEditor = class(TClassProperty) - private - function GetBrush: TBrush; - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - property Brush: TBrush read GetBrush; - end; - - TTTFontPropertyEditor = class(TFontProperty) - public - procedure Edit; override; - end; - - TdxShowPgsDlgPropertyEditor = class(TPropertyEditor) - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure Edit; override; - end; - - TdxStyleGlyphPropertyEditor = class(TGraphicProperty) - private - function GetPrintStyle: TBasedxPrintStyle; - public - function GetValue: string; override; - procedure SetValue(const Value: string); override; - property PrintStyle: TBasedxPrintStyle read GetPrintStyle; - end; - - TdxCustomListDrawingIntegerPropertyEditor = class(TIntegerProperty - {$IFDEF DELPHI6}, ICustomPropertyListDrawing {$ENDIF}) - {$IFDEF DELPHI5} - protected - function GetImageIndex(const Value: string): Integer; virtual; abstract; - function GetImageList: TImageList; virtual; abstract; - public - procedure ListMeasureWidth(const Value: string; ACanvas: TCanvas; - var AWidth: Integer); {$IFNDEF DELPHI6} override; {$ENDIF} - procedure ListMeasureHeight(const Value: string; ACanvas: TCanvas; - var AHeight: Integer); {$IFNDEF DELPHI6} override; {$ENDIF} - procedure ListDrawValue(const Value: string; ACanvas: TCanvas; - const ARect: TRect; ASelected: Boolean); {$IFNDEF DELPHI6} override; {$ENDIF} - - property ImageIndexes[const Value: string]: Integer read GetImageIndex; - property ImageList: TImageList read GetImageList; - {$ENDIF} - end; - - TdxDMPaperPropertyEditor = class(TdxCustomListDrawingIntegerPropertyEditor) - {$IFDEF DELPHI5} - protected - function GetImageIndex(const Value: string): Integer; override; - function GetImageList: TImageList; override; - {$ENDIF} - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - TdxPaperSourcePropertyEditor = class(TdxCustomListDrawingIntegerPropertyEditor) - {$IFDEF DELPHI5} - protected - function GetImageIndex(const Value: string): Integer; override; - function GetImageList: TImageList; override; - {$ENDIF} - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - TdxPageNumberFormatsPropertyEditor = class(TIntegerProperty) - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - TdxReportLinkStyleManagerPropertyEditor = class(TComponentProperty) - private - function GetRoot: TComponent; - function GetUniqueName: string; - protected - function CanCreateStyleManager: Boolean; - function CreateNewStyleManager: TdxPrintStyleManager; - property Root: TComponent read GetRoot; - property UniqueName: string read GetUniqueName; - public - {$IFDEF DELPHI5} - function AutoFill: Boolean; override; - {$ELSE} - procedure Edit; override; - {$ENDIF} - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - TdxReportDocumentDescriptionPropertyEditor = class(TStringProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - - TdxDateFormatsPropertyEditor = class(TIntegerProperty) - private - FStrings: TStrings; - protected - public - destructor Destroy; override; - procedure Initialize; override; - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - TdxTimeFormatsPropertyEditor = class(TIntegerProperty) - private - FStrings: TStrings; - protected - public - destructor Destroy; override; - procedure Initialize; override; - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - - TdxAutoHFTextEntriesPropertyEditor = class(TClassProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - - TdxPreviewIconPropertyEditor = class(TGraphicProperty) - private - function GetPreviewOptions: TdxPreviewOptions; - public - function GetValue: string; override; - procedure SetValue(const Value: string); override; - property PreviewOptions: TdxPreviewOptions read GetPreviewOptions; - end; - - TdxTextReportLinkAlignmentPropertyEditor = class(TEnumProperty) - public - procedure GetValues(Proc: TGetStrProc); override; - end; - -{$IFDEF DELPHI6} - - TdxComponentPrinterSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - - TdxPrintStyleManagerSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - - TdxPageSetupDialogSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - - TdxPrintDialogSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - -{$ENDIF} - -function TryStartWEBPage(const APage: string): Boolean; -begin - Result := ShellExecute(0, nil, PChar(APage), nil, nil, SW_SHOWNORMAL) >= 32; -end; - -{ TdxComponentPrinterEditor } - -procedure TdxComponentPrinterEditor.ExecuteVerb(Index: Integer); -begin - case Index of - 0: dxShowReportLinkDesigner(TCustomdxComponentPrinter(Component), Designer); - 3: TryStartWEBPage(sdxWEBPage); - end; -end; - -function TdxComponentPrinterEditor.GetVerb(Index: Integer): string; -begin - case Index of - 0: Result := sdxReportLinks; - 1: Result := '-'; - 2: Result := sdxPrintingSystem; - 3: Result := sdxWEBPage; - 4: Result := sdxDevex; - end -end; - -function TdxComponentPrinterEditor.GetVerbCount: Integer; -begin - Result := inherited GetVerbCount + 5; -end; - -{$IFDEF IDE_MENUBITMAPS} -procedure TdxComponentPrinterEditor.PrepareItem(Index: Integer; const AItem: TMenuItem); -begin - case Index of - 0: AItem.Bitmap := FBmpItems; - 3: AItem.Bitmap := FBmpWEB; - end -end; -{$ENDIF} - -{ TdxReportLinkEditor } - -function TdxReportLinkEditor.ReportLink: TBasedxReportLink; -begin - Result := TBasedxReportLink(Component); -end; - -procedure TdxReportLinkEditor.ExecuteVerb(Index: Integer); -begin - case Index of - 0: - if ReportLink.ComponentPrinter.DesignReport(ReportLink) then Designer.Modified; - 1: - begin - ReportLink.IsCurrentLink := True; - Designer.Modified; - end; - 3: - begin - ReportLink.RestoreFromOriginal; - Designer.Modified; - end; - 4: - begin - ReportLink.RestoreDefaults; - ReportLink.PrinterPage.RestoreDefaults; - Designer.Modified; - end; - 6: - if ReportLink.PrinterPage.Background.SetupEffects then - Designer.Modified; - 7: - begin - ReportLink.PrinterPage.Background.Mode := bmNone; - ReportLink.PrinterPage.Background.Picture := nil; - Designer.Modified; - end; - 9: - if ReportLink.PageSetup then Designer.Modified; - 10: - dxShowPreviewWindow(ReportLink.ComponentPrinter, Designer); - 11: - if ReportLink.Print(True, nil) then Designer.Modified; - end; -end; - -function TdxReportLinkEditor.GetVerb(Index: Integer): string; -begin - case Index of - 0: Result := sdxShowReportDesigner; - 1: Result := sdxMakeCurrent; - 2: Result := '-'; - 3: Result := sdxRestoreOriginal; - 4: Result := sdxRestoreDefaults; - 5: Result := '-'; - 6: Result := sdxPageBackground; - 7: Result := sdxClearBackground; - 8: Result := '-'; - 9: Result := sdxPageSetup; - 10: Result := sdxPrintPreview; - 11: Result := sdxPrint; - end; -end; - -function TdxReportLinkEditor.GetVerbCount: Integer; -begin - Result := 12; -end; - -{$IFDEF DELPHI5} -procedure TdxReportLinkEditor.PrepareItem(Index: Integer; - const AItem: {$IFDEF DELPHI6} IMenuItem {$ELSE} TMenuItem{$ENDIF}); -begin - case Index of - 0: - begin - AItem.Enabled := TBasedxReportLink(Component).CheckToDesign; - {$IFDEF IDE_MENUBITMAPS} - AItem.Bitmap := FBmpDesigner; - {$ENDIF} - end; - 1: AItem.Enabled := not TBasedxReportLink(Component).IsCurrentLink; - {$IFDEF IDE_MENUBITMAPS} - 6: AItem.Bitmap := FBmpPageBackground; - 9: AItem.Bitmap := FBmpPageSetup; - {$ENDIF} - 10: - begin - AItem.Enabled := TBasedxReportLink(Component).DataProviderPresent; - {$IFDEF IDE_MENUBITMAPS} - AItem.Bitmap := FBmpPrintPreview; - {$ENDIF} - end; - 11: - begin - AItem.Enabled := TBasedxReportLink(Component).DataProviderPresent; - {$IFDEF IDE_MENUBITMAPS} - AItem.Bitmap := FBmpPrint; - {$ENDIF} - end; - end; -end; -{$ENDIF} - -{ TdxReportLinkComponentPropertyEditor } - -destructor TdxReportLinkComponentPropertyEditor.Destroy; -begin - FComponents.Free; - inherited Destroy; -end; - -procedure TdxReportLinkComponentPropertyEditor.Initialize; -begin - inherited Initialize; - FComponents := TStringList.Create; -end; - -function TdxReportLinkComponentPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes - [paMultiSelect]; -end; - -procedure TdxReportLinkComponentPropertyEditor.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - GetComponents; - for I := 0 to FComponents.Count - 1 do - Proc(FComponents[I]); -end; - -function TdxReportLinkComponentPropertyEditor.GetReportLink: TBasedxReportLink; -begin - Result := TBasedxReportLink(GetComponent(0)); -end; - -procedure TdxReportLinkComponentPropertyEditor.AddComponent(const AName: string); -begin - if IsComponentValid(Designer.GetComponent(AName)) then FComponents.Add(AName); -end; - -procedure TdxReportLinkComponentPropertyEditor.GetComponents; -begin - FComponents.Clear; - Designer.GetComponentNames(GetTypeData(PTypeInfo(TComponent.ClassInfo)), AddComponent); -end; - -function TdxReportLinkComponentPropertyEditor.IsComponentValid(AComponent: TComponent): Boolean; -begin - Result := (AComponent <> nil) and not (AComponent is TBasedxReportLink) and - not (AComponent is TCustomdxComponentPrinter) and ReportLink.Supports(AComponent); -end; - -{ TdxCompositionReportLinkPropertyEditor } - -destructor TdxCompositionReportLinkPropertyEditor.Destroy; -begin - FComponents.Free; - inherited Destroy; -end; - -function TdxCompositionReportLinkPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes - [paMultiSelect]; -end; - -procedure TdxCompositionReportLinkPropertyEditor.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - FComponents.Clear; - Designer.GetComponentNames(GetTypeData(PTypeInfo(TComponent.ClassInfo)), CheckProc); - for I := 0 to FComponents.Count - 1 do - Proc(FComponents[I]); -end; - -procedure TdxCompositionReportLinkPropertyEditor.Initialize; -begin - inherited Initialize; - FComponents := TStringList.Create; -end; - -function TdxCompositionReportLinkPropertyEditor.GetItems: TdxCompositionLinkItems; -begin - Result := TdxCompositionLinkItems(TdxCompositionLinkItem(GetComponent(0)).Collection); -end; - -procedure TdxCompositionReportLinkPropertyEditor.CheckProc(const S: string); -begin - if IsComponentValid(Designer.GetComponent(S)) then - FComponents.Add(S); -end; - -function TdxCompositionReportLinkPropertyEditor.IsComponentValid(AComponent: TComponent): Boolean; -begin - Result := (AComponent is TBasedxReportLink) and Items.IsLinkComposable(TBasedxReportLink(AComponent)); -end; - -{ TdxIndexPropertyEditor } - -function TdxIndexPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes - [paMultiSelect]; -end; - -{ TdxReportLinkDesignerPropertyEditor } - -function TdxReportLinkDesignerPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := [paReadOnly]; - if TBasedxReportLink(GetComponent(0)).CheckToDesign then - Result := Result + [paDialog]; -end; - -function TdxReportLinkDesignerPropertyEditor.GetValue: string; -begin - if TBasedxReportLink(GetComponent(0)).CheckToDesign then - Result := DropAmpersand(sdxShowReportDesigner) - else - Result := sdxDesignerNoAvailable; -end; - -procedure TdxReportLinkDesignerPropertyEditor.Edit; -begin - if TBasedxReportLink(GetComponent(0)).DesignReport then - Designer.Modified; -end; - -{ TdxPSExplorerFilterPropertyEditor } - -function TdxPSExplorerFilterPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [{$IFNDEF DELPHI6}paReadOnly, {$ENDIF} paValueList, paSortList]; -end; - -procedure TdxPSExplorerFilterPropertyEditor.GetValues(Proc: TGetStrProc); -var - List: TdxClassList; - I: Integer; - ComponentClass: TClass; -begin - List := TdxClassList.Create; - try - dxIdeImagesProvider.Refresh; - dxPSGetSupportedComponentsList(List); - for I := 0 to List.Count - 1 do - begin - ComponentClass := List[I]; - if IsAcceptableComponentClass(ComponentClass) then Proc(ComponentClass.ClassName); - end; - finally - List.Free; - end; -end; - -{$IFDEF DELPHI5} - -procedure TdxPSExplorerFilterPropertyEditor.ListMeasureWidth(const Value: string; - ACanvas: TCanvas; var AWidth: Integer); -begin - Inc(AWidth, 1 + ImageList.Height + 2); -end; - -procedure TdxPSExplorerFilterPropertyEditor.ListMeasureHeight(const Value: string; - ACanvas: TCanvas; var AHeight: Integer); -begin - AHeight := 1 + ImageList.Height + 1; -end; - -procedure TdxPSExplorerFilterPropertyEditor.ListDrawValue(const Value: string; - ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean); -var - R: TRect; -begin - R := ARect; - ACanvas.FillRect(R); - ImageList.Draw(ACanvas, R.Left + 1, R.Top + 1, ImageIndexes[Value]); - Inc(R.Left, 1 + ImageList.Width + 2); - InflateRect(R, 0, -(R.Bottom - R.Top - ACanvas.TextHeight(Value)) div 2); - - {$IFDEF DELPHI6} - DefaultPropertyListDrawValue(Value, ACanvas, R, ASelected); - {$ELSE} - inherited ListDrawValue(Value, ACanvas, R, ASelected); - {$ENDIF} -end; - -function TdxPSExplorerFilterPropertyEditor.GetImageIndex(const Value: string): Integer; -begin - Result := dxIdeImagesProvider.ImageIndexes[TComponentClass(GetClass(Value))]; -end; - -function TdxPSExplorerFilterPropertyEditor.GetImageList: TCustomImageList; -begin - Result := dxIdeImagesProvider.Images; -end; -{$ENDIF} - -function TdxPSExplorerFilterPropertyEditor.IsAcceptableComponentClass(AComponentClass: TClass): Boolean; -begin - Result := (AComponentClass <> nil) and - not AComponentClass.InheritsFrom(ExtCtrls.TPage) and - not AComponentClass.InheritsFrom(TabNotBk.TTabPage); -end; - -{$IFDEF DELPHI5} - -{ TdxPrintStyleImageIndexPropertyEditor } - -function TdxPrintStyleImageIndexPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := [paMultiSelect, paValueList, paSortList, paRevertable]; -end; - -procedure TdxPrintStyleImageIndexPropertyEditor.GetValues(Proc: TGetStrProc); -var - PrintStyle: TBasedxPrintStyle; - I: Integer; -begin - PrintStyle := TBasedxPrintStyle(GetComponent(0)); - if PrintStyle.StyleManager.Images <> nil then - for I := 0 to PrintStyle.StyleManager.Images.Count - 1 do - Proc(IntToStr(I)); -end; - -procedure TdxPrintStyleImageIndexPropertyEditor.ListMeasureHeight(const Value: string; - ACanvas: TCanvas; var AHeight: Integer); -var - Images: TCustomImageList; -begin - Images := TBasedxPrintStyle(GetComponent(0)).StyleManager.Images; - if Images <> nil then - AHeight := Images.Height + 2 + 2; -end; - -procedure TdxPrintStyleImageIndexPropertyEditor.ListMeasureWidth(const Value: string; - ACanvas: TCanvas; var AWidth: Integer); -var - Images: TCustomImageList; -begin - Images := TBasedxPrintStyle(GetComponent(0)).StyleManager.Images; - if Images <> nil then - AWidth := AWidth + Images.Width + 2 + 2; -end; - -procedure TdxPrintStyleImageIndexPropertyEditor.ListDrawValue(const Value: string; - ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean); -var - R: TRect; - Images: TCustomImageList; - I: Integer; -begin - R := ARect; - ACanvas.FillRect(R); - Images := TBasedxPrintStyle(GetComponent(0)).StyleManager.Images; - if Images <> nil then - try - I := StrToInt(Value); - if (I > -1) and (I < Images.Count) then - begin - Images.Draw(ACanvas, R.Left + 2, R.Top + 2, I); - Inc(R.Left, Images.Width + 2); - end; - except - end; - {$IFDEF DELPHI6} - DefaultPropertyListDrawValue(Value, ACanvas, R, ASelected); - {$ELSE} - inherited ListDrawValue(Value, ACanvas, R, ASelected); - {$ENDIF} -end; - -procedure TdxPrintStyleImageIndexPropertyEditor.PropDrawValue(ACanvas: TCanvas; - const ARect: TRect; ASelected: Boolean); -var - S: string; -begin - S := GetVisualValue; - if (S <> '') and ASelected then - ListDrawValue(S, ACanvas, ARect, ASelected) - else - {$IFDEF DELPHI6} - DefaultPropertyDrawValue(Self, ACanvas, ARect); - {$ELSE} - inherited PropDrawValue(ACanvas, ARect, ASelected); - {$ENDIF} -end; - -{$IFDEF DELPHI6} - -{ ICustomPropertyDrawing } - -procedure TdxPrintStyleImageIndexPropertyEditor.PropDrawName(ACanvas: TCanvas; - const ARect: TRect; ASelected: Boolean); -begin - DefaultPropertyDrawName(Self, ACanvas, ARect); -end; - -{$ENDIF} - -{ TdxCustomDrawListPropertyEditor } - -procedure TdxCustomDrawListPropertyEditor.ListMeasureWidth(const Value: string; - ACanvas: TCanvas; var AWidth: Integer); -var - W: Integer; -begin - W := 1 + ImageList.Width + 1 + 2 + ACanvas.TextWidth(Value) + 2; - if W > AWidth then AWidth := W; -end; - -procedure TdxCustomDrawListPropertyEditor.ListMeasureHeight(const Value: string; - ACanvas: TCanvas; var AHeight: Integer); -begin - AHeight := ImageList.Height + 2; -end; - -procedure TdxCustomDrawListPropertyEditor.ListDrawValue(const Value: string; - ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean); -var - R: TRect; -begin - ACanvas.FillRect(ARect); - ImageList.Draw(ACanvas, ARect.Left + 1, ARect.Top + 1, ImageIndexes[Value]); - R := ARect; - Inc(R.Left, 1 + ImageList.Width + 1); - ACanvas.TextRect(R, R.Left + 1, R.Top + (R.Bottom - R.Top - ACanvas.TextHeight(Value)) div 2, Value); -end; - -{ TdxPaperOrientationPropertyEditor } - -function TdxPaperOrientationPropertyEditor.GetImageIndex(const Value: string): Integer; -begin - Result := GetEnumValue(TypeInfo(TdxPrinterOrientation), Value); -end; - -function TdxPaperOrientationPropertyEditor.GetImageList: TImageList; -begin - Result := ilPaperOrientations; -end; - -{ TdxPrintOrderPropertyEditor } - -function TdxPrintOrderPropertyEditor.GetImageIndex(const Value: string): Integer; -begin - Result := GetEnumValue(TypeInfo(TdxPageOrder), Value); -end; - -function TdxPrintOrderPropertyEditor.GetImageList: TImageList; -begin - Result := ilPrintOrders; -end; - -{$ENDIF} - -{ TdxPathPropertyEditor } - -procedure TdxPathPropertyEditor.Edit; -var - I: Integer; -begin - if Explorers[0].ShowChangeRootPathDlg then - for I := 1 to PropCount - 1 do - Explorers[I].RootPath := Explorers[0].RootPath; -end; - -function TdxPathPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paMultiSelect, paDialog]; -end; - -function TdxPathPropertyEditor.GetExplorer(Index: Integer): TdxPSFileBasedExplorer; -begin - Result := TdxPSFileBasedExplorer(GetComponent(Index)); -end; - -{ TdxRegistryPathPropertyEditor } - -procedure TdxRegistryPathPropertyEditor.Edit; -var - S: string; -begin - S := Value; -{$IFNDEF LIMITED_EDITION} - if dxGetRegistryPath(S) then - begin - Value := S; - Designer.Modified; - end; - {$ENDIF} -end; - -function TdxRegistryPathPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes {$IFNDEF LIMITED_EDITION}+ [paDialog]{$ENDIF}; -end; - -{ TdxExplorerStubLinkPropertyEditor } - -procedure TdxExplorerStubLinkPropertyEditor.GetValues(Proc: TGetStrProc); -var - Links: TList; - I: Integer; - Link: TBasedxReportLink; -begin - Links := TList.Create; - try - TdxComponentPrinter(GetComponent(0)).GetLinks(Links); - for I := 0 to Links.Count - 1 do - begin - Link := TBasedxReportLink(Links[I]); - if Link.CanBeUsedAsStub then Proc(Link.Name); - end; - finally - Links.Free; - end; -end; - -{ TdxCustomContainerReportLinkComponentPropertyEditor } - -{$IFDEF DELPHI5} - -procedure TdxCustomContainerReportLinkComponentPropertyEditor.Initialize; -begin - inherited; - dxPSDsgProxies.dxIdeImagesProvider.Refresh; -end; - -procedure TdxCustomContainerReportLinkComponentPropertyEditor.ListMeasureWidth(const Value: string; - ACanvas: TCanvas; var AWidth: Integer); -var - W: Integer; -begin - W := 1 + Images.Width + 1 + 2 + ACanvas.TextWidth(Value) + 2; - if W > AWidth then AWidth := W; -end; - -procedure TdxCustomContainerReportLinkComponentPropertyEditor.ListMeasureHeight(const Value: string; - ACanvas: TCanvas; var AHeight: Integer); -begin - Aheight := 1 + Images.Height + 1; -end; - -procedure TdxCustomContainerReportLinkComponentPropertyEditor.ListDrawValue(const Value: string; - ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean); -var - X, Y: Integer; -begin - ACanvas.FillRect(ARect); - Images.Draw(ACanvas, ARect.Left + 1, ARect.Top + 1, ImageIndexes[Value]); - with ARect do - begin - X := Left + 1 + Images.Width + 1 + 2; - Y := Top + (Bottom - Top - ACanvas.TextHeight(Value)) div 2; - end; - ACanvas.Brush.Style := bsClear; - ACanvas.TextRect(ARect, X, Y, Value); - ACanvas.Brush.Style := bsSolid; -end; - -{$ENDIF} - -procedure TdxCustomContainerReportLinkComponentPropertyEditor.GetComponents; -var - Project: IOTAProject; - I: Integer; - ModuleInfo: IOTAModuleInfo; -begin - inherited GetComponents; - - Project := GetProject; - if Project <> nil then - for I := 0 to Project.GetModuleCount - 1 do - begin - ModuleInfo := Project.GetModule(I); - if IsSupportedModuleType(ModuleInfo.ModuleType) then - AddComponent(ModuleInfo.FormName); - end; -end; - -function TdxCustomContainerReportLinkComponentPropertyEditor.GetProject: IOTAProject; -var - Module: IOTAModule; - HasMultipleProjects: Boolean; - I: Integer; - ProjectGroup: IOTAProjectGroup; - Project: IOTAProject; -begin - Result := nil; - HasMultipleProjects := False; - with BorlandIDEServices as IOTAModuleServices do - for I := 0 to GetModuleCount - 1 do - begin - Module := GetModule(I); - if Supports(Module, IOTAProjectGroup, ProjectGroup) then - begin - Result := ProjectGroup.ActiveProject; - Exit; - end - else - if Supports(Module, IOTAProject, Project) then - if Result = nil then - Result := Project - else - HasMultipleProjects := True; - end; - if HasMultipleProjects then Result := nil; -end; - -function TdxCustomContainerReportLinkComponentPropertyEditor.IsComponentValid(AComponent: TComponent): Boolean; -begin - Result := inherited IsComponentValid(AComponent) and - ((AComponent = nil) or (AComponent = Designer.GetRoot) or (AComponent.Owner = Designer.GetRoot)); -end; - -function TdxCustomContainerReportLinkComponentPropertyEditor.IsSupportedModuleType( - const AModuleType: TOTAModuleType): Boolean; -{$IFNDEF DELPHI6} -const - omtForm = 0; -{$ENDIF} -begin - Result := AModuleType = omtForm; -end; - -{$IFDEF DELPHI5} - -function TdxCustomContainerReportLinkComponentPropertyEditor.GetImageIndex(const Value: string): Integer; -begin - Result := dxPSDsgProxies.dxIdeImagesProvider.ImageIndexesByObject[Designer.GetObject(Value)]; -end; - -function TdxCustomContainerReportLinkComponentPropertyEditor.GetImages: TCustomImageList; -begin - Result := dxPSDsgProxies.dxIdeImagesProvider.Images; -end; - -{$ENDIF} - -{ TdxMeasurementUnitsPropertyEditor } - -procedure TdxMeasurementUnitsPropertyEditor.GetValues(Proc: TGetStrProc); - - function DropPrefix(const Source: string): string; - const - Prefix: string = 'mu'; - var - P: Integer; - begin - Result := Source; - P := Pos(Result, Prefix); - if P <> 0 then - Delete(Result, P, Length(Prefix)); - end; - -const - Default: string = 'muDefault'; -var - EnumType: PTypeInfo; - I: Integer; - EnumName, S: string; -begin - EnumType := GetPropType; - with GetTypeData(EnumType)^ do - for I := MinValue to MaxValue do - begin - EnumName := GetEnumName(EnumType, I); - if CompareStr(EnumName, Default) = 0 then - begin - S := GetEnumName(TypeInfo(TdxMeasurementUnits), Integer(GetDefaultMeasurementUnits)); - EnumName := EnumName + ' (' + DropPrefix(S) + ')'; - end; - Proc(EnumName); - end; -end; - -function TdxMeasurementUnitsPropertyEditor.GetValue: string; -begin - Result := inherited GetValue + ' ' + sdxInThousandths; -end; - -procedure TdxMeasurementUnitsPropertyEditor.SetValue(const Value: string); - - function IsDefaultMeasurementUnitsValue: Boolean; - var - DefaultEnumName: string; - begin - DefaultEnumName := GetEnumName(TypeInfo(TdxMeasurementUnits), Integer(muDefault)); - Result := Pos(DefaultEnumName, Value) <> 0; - end; - -begin - if IsDefaultMeasurementUnitsValue then - SetOrdValue(Integer(muDefault)) - else - inherited; -end; - -{ TdxPrinterPagePropertyEditor } - -procedure TdxPrinterPagePropertyEditor.Edit; -var - ReportLink: TBasedxReportLink; - I: Integer; -begin - ReportLink := TBasedxReportLink(GetComponent(0)); - if ReportLink.PageSetup then - begin - if PropCount > 1 then - for I := 1 to PropCount - 1 do - TBasedxReportLink(GetComponent(I)).PrinterPage.Assign(ReportLink.PrinterPage); - Designer.Modified; - end; -end; - -function TdxPrinterPagePropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -{ TdxReportTitlePropertyEditor } - -procedure TdxReportTitlePropertyEditor.Edit; -var - ReportLink: TBasedxReportLink; - I: Integer; -begin - ReportLink := TBasedxReportLink(GetComponent(0)); - if ReportLink.ShowTitlePropertiesDlg then - begin - if PropCount > 1 then - for I := 1 to PropCount - 1 do - TBasedxReportLink(GetComponent(I)).ReportTitle.Assign(ReportLink.ReportTitle); - Designer.Modified; - end; -end; - -function TdxReportTitlePropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -{ TdxReportTitleTextAlignXPropertyEditor } - -procedure TdxReportTitleTextAlignXPropertyEditor.GetValues(Proc: TGetStrProc); -var - EnumType: PTypeInfo; - I: Integer; -begin - EnumType := GetPropType; - for I := Integer(taLeft) to Integer(taRight) do - Proc(GetEnumName(EnumType, I)); -end; - -procedure TdxReportTitleTextAlignXPropertyEditor.SetValue(const Value: string); -var - I: Integer; -begin - I := GetEnumValue(GetPropType, Value); - if not (TcxTextAlignX(I) in [taLeft, taCenterX, taRight]) then - {$IFDEF DELPHI5} - raise EPropertyError.CreateRes(@SInvalidPropertyValue); - {$ELSE} - raise EPropertyError.Create(SInvalidPropertyValue); - {$ENDIF} - SetOrdValue(I); -end; - -{ TdxReportTitleTextAlignYPropertyEditor } - -procedure TdxReportTitleTextAlignYPropertyEditor.GetValues(Proc: TGetStrProc); -var - EnumType: PTypeInfo; - I: Integer; -begin - EnumType := GetPropType; - for I := Integer(taTop) to Integer(taBottom) do - Proc(GetEnumName(EnumType, I)); -end; - -procedure TdxReportTitleTextAlignYPropertyEditor.SetValue(const Value: string); -var - I: Integer; -begin - I := GetEnumValue(GetPropType, Value); - if not (TcxTextAlignY(I) in [taTop, taCenterY, taBottom]) then - {$IFDEF DELPHI5} - raise EPropertyError.CreateRes(@SInvalidPropertyValue); - {$ELSE} - raise EPropertyError.Create(SInvalidPropertyValue); - {$ENDIF} - SetOrdValue(I); -end; - -{ TdxHeaderFooterTextAlignYPropertyEditor } - -procedure TdxHeaderFooterTextAlignYPropertyEditor.GetValues(Proc: TGetStrProc); -var - EnumType: PTypeInfo; - I: Integer; -begin - EnumType := GetPropType; - for I := Integer(taTop) to Integer(taBottom) do - Proc(GetEnumName(EnumType, I)); -end; - -procedure TdxHeaderFooterTextAlignYPropertyEditor.SetValue(const Value: string); -var - I: Integer; -begin - I := GetEnumValue(GetPropType, Value); - if not (TcxTextAlignY(I) in [taTop, taCenterY, taBottom]) then - {$IFDEF DELPHI5} - raise EPropertyError.CreateRes(@SInvalidPropertyValue); - {$ELSE} - raise EPropertyError.Create(SInvalidPropertyValue); - {$ENDIF} - SetOrdValue(I); -end; - -{ TdxPrinterPagePropertyEditor2 } - -procedure TdxPrinterPagePropertyEditor2.Edit; -var - I: Integer; - PrintStyle: TBasedxPrintStyle; -begin - PrintStyle := TBasedxPrintStyle(GetComponent(0)); - if PrintStyle.PageSetup then - begin - if PropCount > 1 then - for I := 1 to PropCount - 1 do - TBasedxPrintStyle(GetComponent(I)).PrinterPage.Assign(PrintStyle.PrinterPage); - Designer.Modified; - end; -end; - -function TdxPrinterPagePropertyEditor2.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -{ TdxPointWrapperEditor } - -function TdxPointWrapperEditor.PointWrapper: TdxPointWrapper; -begin - Result := TdxPointWrapper(GetOrdValue); -end; - -function TdxPointWrapperEditor.GetValue: string; -var - Pt: TdxPointWrapper; -begin - Pt := PointWrapper; - if Pt <> nil then - with Pt do - Result := Format('(X: %d; Y: %d)', [X, Y]) - else - Result := inherited GetValue; -end; - -{ TdxRectWrapperEditor } - -function TdxRectWrapperEditor.RectWrapper: TdxRectWrapper; -begin - Result := TdxRectWrapper(GetOrdValue); -end; - -function TdxRectWrapperEditor.GetValue: string; -var - R: TdxRectWrapper; -begin - R := RectWrapper; - if R <> nil then - with R do - Result := Format('(Bottom: %d; Left: %d; Right: %d; Top: %d)', [Bottom, Left, Right, Top]) - else - Result := inherited GetValue; -end; - -{ TdxBackgroundPropertyEditor } - -procedure TdxBackgroundPropertyEditor.Edit; -var - I: Integer; -begin - if Background.SetupEffects then - begin - for I := 1 to PropCount - 1 do - TdxBackground(GetOrdValueAt(I)).Assign(Background); - Designer.Modified; - end; -end; - -function TdxBackgroundPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -function TdxBackgroundPropertyEditor.GetBackground: TdxBackground; -begin - Result := TdxBackground(GetOrdValueAt(0)); -end; - -{ TdxBrushPropertyEditor } - -procedure TdxBrushPropertyEditor.Edit; -var - I: Integer; -begin - if ChooseBrush(Brush) then - begin - for I := 1 to PropCount - 1 do - TBrush(GetOrdValueAt(I)).Assign(Brush); - Designer.Modified; - end; -end; - -function TdxBrushPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -function TdxBrushPropertyEditor.GetBrush: TBrush; -begin - Result := TBrush(GetOrdValue); -end; - -{ TTTFontPropertyEditor } - -procedure TTTFontPropertyEditor.Edit; -const - hcDFontEditor = 25000; -var - FontDialog: TFontDialog; -begin - FontDialog := TFontDialog.Create(Application); - try - FontDialog.Font := TFont(GetOrdValue); - FontDialog.Device := dxPSGlbl.FontDialogDevice; - FontDialog.HelpContext := hcDFontEditor; - FontDialog.Options := [fdEffects, fdScalableOnly, fdTrueTypeOnly]; - if FontDialog.Execute then - SetOrdValue(Longint(FontDialog.Font)); - finally - FontDialog.Free; - end; -end; - -{ TdxPrintStyleManagerEditor } - -procedure TdxPrintStyleManagerEditor.ExecuteVerb(Index: Integer); -begin - case Index of - 0: dxShowPrintStylesDesigner(TdxPrintStyleManager(Component), Designer); - 3: TryStartWEBPage(sdxWEBPage); - end; -end; - -function TdxPrintStyleManagerEditor.GetVerb(Index: Integer): string; -begin - case Index of - 0: Result := sdxPrintStyles; - 1: Result := '-'; - 2: Result := sdxPrintingSystem; - 3: Result := sdxWEBPage; - 4: Result := sdxDevex; - end -end; - -function TdxPrintStyleManagerEditor.GetVerbCount: Integer; -begin - Result := inherited GetVerbCount + 5; -end; - -{$IFDEF IDE_MENUBITMAPS} -procedure TdxPrintStyleManagerEditor.PrepareItem(Index: Integer; const AItem: TMenuItem); -begin - case Index of - 0: AItem.Bitmap := FBmpItems; - 3: AItem.Bitmap := FBmpWEB; - end -end; -{$ENDIF} - -{ TdxPrintStyleEditor } - -function TdxPrintStyleEditor.PrintStyle: TBasedxPrintStyle; -begin - Result := TBasedxPrintStyle(Component); -end; - -procedure TdxPrintStyleEditor.ExecuteVerb(Index: Integer); -begin - case Index of - 0: - if PrintStyle.PageSetup then Designer.Modified; - 1: - begin - PrintStyle.IsCurrentStyle := True; - Designer.Modified; - end; - 3:begin - PrintStyle.RestoreDefaults; - Designer.Modified; - end; - 5: - if PrintStyle.PrinterPage.Background.SetupEffects then - Designer.Modified; - 6: - begin - PrintStyle.PrinterPage.Background.Mode := bmNone; - PrintStyle.PrinterPage.Background.Picture := nil; - Designer.Modified; - end; - end; -end; - -function TdxPrintStyleEditor.GetVerb(Index: Integer): string; -begin - case Index of - 0: Result := sdxPageSetup; - 1: Result := sdxMakeCurrent; - 2: Result := '-'; - 3: Result := sdxRestoreDefaults; - 4: Result := '-'; - 5: Result := sdxPageBackground; - 6: Result := sdxClearBackground; - end; -end; - -function TdxPrintStyleEditor.GetVerbCount: Integer; -begin - Result := 7; -end; - -{$IFDEF DELPHI5} -procedure TdxPrintStyleEditor.PrepareItem(Index: Integer; - const AItem: {$IFDEF DELPHI6} IMenuItem {$ELSE} TMenuItem{$ENDIF}); -begin - case Index of - {$IFDEF IDE_MENUBITMAPS} - 0: AItem.Bitmap := FBmpPageSetup; - {$ENDIF} - 1: AItem.Enabled := not TBasedxPrintStyle(Component).IsCurrentStyle; - {$IFDEF IDE_MENUBITMAPS} - 5: AItem.Bitmap := FBmpPageBackground; - {$ENDIF} - end; -end; -{$ENDIF} - -{ TdxPageSetupDialogEditor } - -procedure TdxPageSetupDialogEditor.ExecuteVerb(Index: Integer); -begin - case Index of - 0: TdxPageSetupDialog(Component).Execute; - 3: TryStartWEBPage(sdxWEBPage); - end; -end; - -function TdxPageSetupDialogEditor.GetVerb(Index: Integer): string; -begin - case Index of - 0: Result := sdxPageSetupDialog; - 1: Result := '-'; - 2: Result := sdxPrintingSystem; - 3: Result := sdxWEBPage; - 4: Result := sdxDevex; - end; -end; - -function TdxPageSetupDialogEditor.GetVerbCount: Integer; -begin - Result := inherited GetVerbCount + 5; -end; - -{$IFDEF DELPHI5} -procedure TdxPageSetupDialogEditor.PrepareItem(Index: Integer; - const AItem: {$IFDEF DELPHI6} IMenuItem {$ELSE} TMenuItem{$ENDIF}); -begin - case Index of - 0: - begin - {$IFDEF IDE_MENUBITMAPS} - AItem.Bitmap := FBmpPageSetup; - {$ENDIF} - AItem.Enabled := TdxPageSetupDialog(Component).PrintStyle <> nil; - end; - 3: - {$IFDEF IDE_MENUBITMAPS} - AItem.Bitmap := FBmpWEB; - {$ENDIF} - end; -end; -{$ENDIF} - -{ TdxPrintDialogEditor } - -procedure TdxPrintDialogEditor.ExecuteVerb(Index: Integer); -begin - case Index of - 0: TdxPrintDialog(Component).Execute; - 3: TryStartWEBPage(sdxWEBPage); - end; -end; - -function TdxPrintDialogEditor.GetVerb(Index: Integer): string; -begin - case Index of - 0: Result := sdxPrintDialog; - 1: Result := '-'; - 2: Result := sdxPrintingSystem; - 3: Result := sdxWEBPage; - 4: Result := sdxDevex; - end; -end; - -function TdxPrintDialogEditor.GetVerbCount: Integer; -begin - Result := inherited GetVerbCount + 5; -end; - -{$IFDEF IDE_MENUBITMAPS} -procedure TdxPrintDialogEditor.PrepareItem(Index: Integer; const AItem: TMenuItem); -begin - case Index of - 0: AItem.Bitmap := FBmpPrint; - 3: AItem.Bitmap := FBmpWEB; - end; -end; -{$ENDIF} - -{ TCustomdxPSExplorerEditor } - -procedure TCustomdxPSExplorerEditor.ExecuteVerb(Index: Integer); -begin - if Index = 1 then TryStartWEBPage(sdxWEBPage); -end; - -function TCustomdxPSExplorerEditor.GetVerb(Index: Integer): string; -begin - case Index of - 0: Result := sdxPrintingSystem; - 1: Result := sdxWEBPage; - 2: Result := sdxDevex; - end; -end; - -function TCustomdxPSExplorerEditor.GetVerbCount: Integer; -begin - Result := inherited GetVerbCount + 3; -end; - -{$IFDEF IDE_MENUBITMAPS} -procedure TCustomdxPSExplorerEditor.PrepareItem(Index: Integer; const AItem: TMenuItem); -begin - if Index = 1 then - AItem.Bitmap := FBmpWEB; -end; -{$ENDIF} - -{ TdxEngineControllerEditor } - -procedure TdxEngineControllerEditor.ExecuteVerb(Index: Integer); -begin - if Index = 1 then TryStartWEBPage(sdxWEBPage); -end; - -function TdxEngineControllerEditor.GetVerb(Index: Integer): string; -begin - case Index of - 0: Result := sdxPrintingSystem; - 1: Result := sdxWEBPage; - 2: Result := sdxDevex; - end; -end; - -function TdxEngineControllerEditor.GetVerbCount: Integer; -begin - Result := inherited GetVerbCount + 3; -end; - -{$IFDEF IDE_MENUBITMAPS} -procedure TdxEngineControllerEditor.PrepareItem(Index: Integer; const AItem: TMenuItem); -begin - if Index = 1 then AItem.Bitmap := FBmpWEB; -end; -{$ENDIF} - -{ TdxShowPgsDlgPropertyEditor } - -procedure TdxShowPgsDlgPropertyEditor.Edit; -begin - if TBasedxPrintStyle(GetComponent(0)).PageSetup then - Designer.Modified; -end; - -function TdxShowPgsDlgPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := [paDialog, paReadOnly]; -end; - -function TdxShowPgsDlgPropertyEditor.GetValue: string; -begin - Result := sdxClickForPageSetup; -end; - -{ TdxStyleGlyphPropertyEditor } - -function TdxStyleGlyphPropertyEditor.GetValue: string; -begin - Result := inherited GetValue; - if PrintStyle.IsStyleGlyphAssigned then - Result := Result + ' - ' + sdxRestoreDefaultGlyph; -end; - -procedure TdxStyleGlyphPropertyEditor.SetValue(const Value: string); -begin - if CompareText(Value, sdxDefault) = 0 then - PrintStyle.RestoreDefaultGlyph - else - inherited; -end; - -function TdxStyleGlyphPropertyEditor.GetPrintStyle: TBasedxPrintStyle; -begin - Result := TBasedxPrintStyle(GetComponent(0)); -end; - -{ TdxCustomListDrawingIntegerPropertyEditor } - -{$IFDEF DELPHI5} - -procedure TdxCustomListDrawingIntegerPropertyEditor.ListMeasureWidth(const Value: string; - ACanvas: TCanvas; var AWidth: Integer); -var - W: Integer; -begin - W := 1 + ImageList.Width + 1 + 2 + ACanvas.TextWidth(Value) + 2; - if W > AWidth then AWidth := W; -end; - -procedure TdxCustomListDrawingIntegerPropertyEditor.ListMeasureHeight(const Value: string; - ACanvas: TCanvas; var AHeight: Integer); -begin - AHeight := ImageList.Height + 2; -end; - -procedure TdxCustomListDrawingIntegerPropertyEditor.ListDrawValue(const Value: string; - ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean); -var - R: TRect; -begin - ACanvas.FillRect(ARect); - ImageList.Draw(ACanvas, ARect.Left + 1, ARect.Top + 1, ImageIndexes[Value]); - R := ARect; - Inc(R.Left, 1 + ImageList.Width + 1); - ACanvas.TextRect(R, R.Left + 1, R.Top + (R.Bottom - R.Top - ACanvas.TextHeight(Value)) div 2, Value); -end; - -{$ENDIF} - -{ TdxDMPaperPropertyEditor } - -function TdxDMPaperPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [{$IFNDEF DELPHI6}paReadOnly,{$ENDIF} paDialog, paValueList]; -end; - -function TdxDMPaperPropertyEditor.GetValue: string; -var - Index: Integer; -begin - Index := dxPPAttr.Papers.FindByDMPaper(GetOrdValue); - if Index <> -1 then - Result := dxPPAttr.Papers[Index].Name - else - Result := sdxCustomPaperSize + IntToStr(GetOrdValue); -end; - -procedure TdxDMPaperPropertyEditor.SetValue(const Value: string); -var - Index: Integer; -begin - Index := dxPPAttr.Papers.FindByName(Value); - if Index <> -1 then - SetOrdValue(dxPPAttr.Papers[Index].DMPaper) - else - inherited SetValue(Value); -end; - -procedure TdxDMPaperPropertyEditor.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to dxPPAttr.Papers.Count - 1 do - Proc(dxPPAttr.Papers[I].Name); -end; - -{$IFDEF DELPHI5} - -function TdxDMPaperPropertyEditor.GetImageIndex(const Value: string): Integer; -begin - Result := Integer(dxIsEnvelopePaper(Value)); -end; - -function TdxDMPaperPropertyEditor.GetImageList: TImageList; -begin - Result := ilPapers; -end; - -{$ENDIF} - -{ TdxPaperSourcePropertyEditor } - -function TdxPaperSourcePropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [{$IFNDEF DELPHI6}paReadOnly,{$ENDIF} paDialog, paValueList]; -end; - -function TdxPaperSourcePropertyEditor.GetValue: string; -var - Index: Integer; -begin - Index := dxPPAttr.Bins.FindByValue(GetOrdValue); - if Index <> -1 then - Result := dxPPAttr.Bins[Index].Name - else - Result := sdxCustomBin + IntToStr(GetOrdValue); -end; - -procedure TdxPaperSourcePropertyEditor.SetValue(const Value: string); -var - Index: Integer; -begin - Index := dxPPAttr.Bins.FindByName(Value); - if Index <> -1 then - SetOrdValue(dxPPAttr.Bins[Index].Value) - else - inherited SetValue(Value); -end; - -procedure TdxPaperSourcePropertyEditor.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to dxPPAttr.Bins.Count - 1 do - Proc(dxPPAttr.Bins[I].Name); -end; - -{$IFDEF DELPHI5} - -function TdxPaperSourcePropertyEditor.GetImageIndex(const Value: string): Integer; -begin - Result := Integer(not dxIsAutoSelectBin(Value)); -end; - -function TdxPaperSourcePropertyEditor.GetImageList: TImageList; -begin - Result := ilBins; -end; - -{$ENDIF} - -{ TdxPageNumberFormatEditor } - -function TdxPageNumberFormatsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [{$IFNDEF DELPHI6}paReadOnly, {$ENDIF} paDialog, paValueList]; -end; - -function TdxPageNumberFormatsPropertyEditor.GetValue: string; -begin - Result := PageNumberFormats[GetOrdValue]; -end; - -procedure TdxPageNumberFormatsPropertyEditor.SetValue(const Value: string); -var - I: Integer; -begin - // case insensitive - PageNumberFormats.IndexOf(Value); - for I := 0 to PageNumberFormats.Count - 1 do - if dxSameStr(PageNumberFormats[I], Value) then - begin - SetOrdValue(I); - Exit; - end; - inherited SetValue(Value); -end; - -procedure TdxPageNumberFormatsPropertyEditor.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to PageNumberFormats.Count - 1 do - Proc(PageNumberFormats[I]); -end; - -{ TdxReportLinkStyleManagerPropertyEditor } - -{$IFDEF DELPHI5} -function TdxReportLinkStyleManagerPropertyEditor.AutoFill: Boolean; -begin - Result := False; -end; -{$ELSE} -procedure TdxReportLinkStyleManagerPropertyEditor.Edit; -begin -end; -{$ENDIF} - -procedure TdxReportLinkStyleManagerPropertyEditor.GetValues(Proc: TGetStrProc); -begin - if CanCreateStyleManager then Proc(sdxCreateNewStyleManager); - inherited; -end; - -procedure TdxReportLinkStyleManagerPropertyEditor.SetValue(const Value: string); -begin - if Value = sdxCreateNewStyleManager then - SetOrdValue(Integer(CreateNewStyleManager)) - else - inherited; -end; - -function TdxReportLinkStyleManagerPropertyEditor.CanCreateStyleManager: Boolean; -begin - {$IFDEF DELPHI5} - Result := (Root <> nil) and not Designer.IsSourceReadOnly and not (csInline in Root.ComponentState); - {$ELSE} - Result := True; - {$ENDIF} -end; - -function TdxReportLinkStyleManagerPropertyEditor.CreateNewStyleManager: TdxPrintStyleManager; -begin - Result := TdxPrintStyleManager.Create(Root); - Result.Name := UniqueName; -end; - -function TdxReportLinkStyleManagerPropertyEditor.GetUniqueName: string; -var - S: string; -begin - S := TdxPrintStyleManager.ClassName; - S := Copy(S, 2, Length(S) - 1); - Result := Designer.UniqueName(S); -end; - -function TdxReportLinkStyleManagerPropertyEditor.GetRoot: TComponent; -begin - Result := Designer.{$IFDEF DELPHI6}Root{$ELSE}GetRoot{$ENDIF}; -end; - -{ TdxReportDocumentDescriptionPropertyEditor } - -procedure TdxReportDocumentDescriptionPropertyEditor.Edit; -var - S: string; -begin - S := Value; - if dxPSfmEditDesc.dxEditDescriptionDlg(S) then - begin - Value := S; - Designer.Modified; - end; -end; - -function TdxReportDocumentDescriptionPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -{ TdxDateFormatEditor } - -procedure TdxDateFormatsPropertyEditor.Initialize; -begin - inherited Initialize; - FStrings := TStringList.Create; - GetFormatedDateStrings(Now, DateFormats, FStrings); -end; - -destructor TdxDateFormatsPropertyEditor.Destroy; -begin - FStrings.Free; - inherited Destroy; -end; - -function TdxDateFormatsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [{$IFNDEF DELPHI6}paReadOnly, {$ENDIF} paDialog, paValueList]; -end; - -function TdxDateFormatsPropertyEditor.GetValue: string; -begin - Result := FStrings[GetOrdValue]; -end; - -procedure TdxDateFormatsPropertyEditor.SetValue(const Value: string); -var - Index: Integer; -begin - Index := FStrings.IndexOf(Value); - if Index <> -1 then - SetOrdValue(Index) - else - inherited SetValue(Value); -end; - -procedure TdxDateFormatsPropertyEditor.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to FStrings.Count - 1 do - Proc(FStrings[I]); -end; - -{ TdxTimeFormatEditor } - -procedure TdxTimeFormatsPropertyEditor.Initialize; -begin - inherited Initialize; - FStrings := TStringList.Create; - GetFormatedTimeStrings(Now, TimeFormats, FStrings); -end; - -destructor TdxTimeFormatsPropertyEditor.Destroy; -begin - FStrings.Free; - inherited Destroy; -end; - -function TdxTimeFormatsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [{$IFNDEF DELPHI6}paReadOnly, {$ENDIF} paDialog, paValueList]; -end; - -function TdxTimeFormatsPropertyEditor.GetValue: string; -begin - Result := FStrings[GetOrdValue]; -end; - -procedure TdxTimeFormatsPropertyEditor.SetValue(const Value: string); -var - Index: Integer; -begin - Index := FStrings.IndexOf(Value); - if Index <> -1 then - SetOrdValue(Index) - else - inherited SetValue(Value); -end; - -procedure TdxTimeFormatsPropertyEditor.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to FStrings.Count - 1 do - Proc(FStrings[I]); -end; - -{ TdxAutoHFTextEntriesPropertyEditor } - -procedure TdxAutoHFTextEntriesPropertyEditor.Edit; -begin - TdxPrintStyleManager(GetComponent(0)).ShowAutoHFTextEntriesDlg; -end; - -function TdxAutoHFTextEntriesPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := [paReadOnly, paDialog]; -end; - -{ TdxPreviewIconPropertyEditor } - -function TdxPreviewIconPropertyEditor.GetValue: string; -begin - Result := inherited GetValue; - if PreviewOptions.IsIconAssigned then - Result := Result + ' - ' + sdxRestoreDefaultIcon; -end; - -procedure TdxPreviewIconPropertyEditor.SetValue(const Value: string); -begin - if CompareText(Value, sdxDefault) = 0 then - PreviewOptions.RestoreOriginalIcon - else - inherited; -end; - -function TdxPreviewIconPropertyEditor.GetPreviewOptions: TdxPreviewOptions; -begin - Result := TdxPreviewOptions(GetComponent(0)); -end; - -{ TdxTextReportLinkAlignmentPropertyEditor } - -procedure TdxTextReportLinkAlignmentPropertyEditor.GetValues(Proc: TGetStrProc); -var - EnumType: PTypeInfo; -begin - EnumType := GetPropType; - Proc(GetEnumName(EnumType, Integer(taLeft))); - Proc(GetEnumName(EnumType, Integer(taCenterX))); - Proc(GetEnumName(EnumType, Integer(taRight))); - Proc(GetEnumName(EnumType, Integer(taDistributeX))); -end; - -{$IFDEF DELPHI6} - -{ TdxComponentPrinterSelectionEditor } - -procedure TdxComponentPrinterSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc('dxPSGlbl'); - Proc('dxPSUtl'); - Proc('dxPSEngn'); - Proc('dxPrnPg'); - Proc('dxBkgnd'); - Proc('dxWrap'); - Proc('dxPrnDev'); - Proc('dxPSCompsProvider'); - Proc('dxPSFillPatterns'); - Proc('dxPSEdgePatterns'); -end; - -{ TdxPrintStyleManagerSelectionEditor } - -procedure TdxPrintStyleManagerSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc('dxPSGlbl'); - Proc('dxPSUtl'); - Proc('dxPrnPg'); - Proc('dxBkgnd'); - Proc('dxWrap'); - Proc('dxPrnDev'); -end; - -{ TdxPageSetupDialogSelectionEditor } - -procedure TdxPageSetupDialogSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc('dxPSGlbl'); - Proc('dxPSUtl'); - Proc('dxPrnPg'); - Proc('dxBkgnd'); - Proc('dxWrap'); -end; - -{ TdxPrintDialogSelectionEditor } - -procedure TdxPrintDialogSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc('dxPrnDev'); -end; - -{$ENDIF} - -procedure HideProperty(PropertyType: PTypeInfo; - ComponentClass: TClass; const PropertyName: string); -begin - RegisterPropertyEditor(PropertyType, ComponentClass, PropertyName, nil); -end; - -procedure Register; -begin - dxPSGlbl.IsDesignTime := True; - - RegisterComponents(sdxPSComponentPage, - [TdxComponentPrinter, TdxPrintStyleManager, - TdxPrintDialog, TdxPageSetupDialog, - TdxPSEngineController, TdxPSFileBasedExplorer]); - - RegisterNoIcon([TBasedxReportLink, TdxCompositionReportLink, TdxCustomContainerReportLink]); - RegisterNoIcon([TdxPictureReportLink, TdxTextReportLink]); - RegisterNoIcon([TBasedxPrintStyle, TdxPSPrintStyle]); - - RegisterComponentEditor(TdxComponentPrinter, TdxComponentPrinterEditor); - RegisterComponentEditor(TdxPrintStyleManager, TdxPrintStyleManagerEditor); - RegisterComponentEditor(TBasedxReportLink, TdxReportLinkEditor); - RegisterComponentEditor(TBasedxPrintStyle, TdxPrintStyleEditor); - RegisterComponentEditor(TdxPageSetupDialog, TdxPageSetupDialogEditor); - RegisterComponentEditor(TdxPrintDialog, TdxPrintDialogEditor); - RegisterComponentEditor(TCustomdxPSExplorer, TCustomdxPSExplorerEditor); - RegisterComponentEditor(TdxPSEngineController, TdxEngineControllerEditor); - - RegisterPropertyEditor(TypeInfo(string), TdxPSFileBasedExplorer, 'RootPath', TdxPathPropertyEditor); - RegisterPropertyEditor(TypeInfo(Integer), TdxComponentPrinter, 'DateFormat', TdxDateFormatsPropertyEditor); - RegisterPropertyEditor(TypeInfo(Integer), TdxComponentPrinter, 'TimeFormat', TdxTimeFormatsPropertyEditor); - RegisterPropertyEditor(TypeInfo(TIcon), TdxPreviewOptions, 'Icon', TdxPreviewIconPropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxPageNumberFormat), TdxComponentPrinter, 'PageNumberFormat', TdxPageNumberFormatsPropertyEditor); - RegisterPropertyEditor(TypeInfo(string), TdxComponentPrinter, 'RegistryPath', TdxRegistryPathPropertyEditor); - RegisterPropertyEditor(TypeInfo(TBasedxReportLink), TdxComponentPrinter, 'ExplorerStubLink', TdxExplorerStubLinkPropertyEditor); - - RegisterPropertyEditor(TypeInfo(TComponent), TBasedxReportLink, 'Component', TdxReportLinkComponentPropertyEditor); - RegisterPropertyEditor(TypeInfo(TComponent), TdxCustomContainerReportLink, 'Component', TdxCustomContainerReportLinkComponentPropertyEditor); - RegisterPropertyEditor(TypeInfo(Integer), TBasedxReportLink, 'Index', TdxIndexPropertyEditor); - RegisterPropertyEditor(TypeInfo(Boolean), TBasedxReportLink, 'ShowDesigner', TdxReportLinkDesignerPropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxPrinterPage), TBasedxReportLink, 'PrinterPage', TdxPrinterPagePropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxReportTitle), TBasedxReportLink, 'ReportTitle', TdxReportTitlePropertyEditor); - RegisterPropertyEditor(TypeInfo(TFont), TBasedxReportLink, '', TTTFontPropertyEditor); - RegisterPropertyEditor(TypeInfo(Integer), TBasedxReportLink, 'DateFormat', TdxDateFormatsPropertyEditor); - RegisterPropertyEditor(TypeInfo(Integer), TBasedxReportLink, 'TimeFormat', TdxTimeFormatsPropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxPageNumberFormat), TBasedxReportLink, 'PageNumberFormat', TdxPageNumberFormatsPropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxPrintStyleManager), TBasedxReportLink, 'StyleManager', TdxReportLinkStyleManagerPropertyEditor); - - RegisterPropertyEditor(TypeInfo(string), TdxPSReportDocument, 'Description', TdxReportDocumentDescriptionPropertyEditor); - - {$IFDEF DELPHI5} - RegisterPropertyEditor(TypeInfo(Integer), TBasedxPrintStyle, 'ImageIndex', TdxPrintStyleImageIndexPropertyEditor); - {$ENDIF} - RegisterPropertyEditor(TypeInfo(string), TCustomdxPSExplorer, 'FilterLink', TdxPSExplorerFilterPropertyEditor); - - {$IFDEF DELPHI5} - RegisterPropertyEditor(TypeInfo(TdxPrinterOrientation), nil, '', TdxPaperOrientationPropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxPageOrder), nil, '', TdxPrintOrderPropertyEditor); - {$ENDIF} - - RegisterPropertyEditor(TypeInfo(TComponent), TdxCompositionLinkItem, 'ReportLink', TdxCompositionReportLinkPropertyEditor); - - RegisterPropertyEditor(TypeInfo(TStrings), TdxPrintStyleManager, 'AutoHFTextEntries', TdxAutoHFTextEntriesPropertyEditor); - - RegisterPropertyEditor(TypeInfo(Boolean), TBasedxPrintStyle, 'ShowPageSetupDlg', TdxShowPgsDlgPropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxPrinterPage), TBasedxPrintStyle, 'PrinterPage', TdxPrinterPagePropertyEditor2); - RegisterPropertyEditor(TypeInfo(Integer), TBasedxPrintStyle, 'Index', TdxIndexPropertyEditor); - RegisterPropertyEditor(TypeInfo(TBitmap), TBasedxPrintStyle, 'StyleGlyph', TdxStyleGlyphPropertyEditor); - - RegisterPropertyEditor(TypeInfo(Integer), TdxPrinterPage, 'DMPaper', TdxDMPaperPropertyEditor); - RegisterPropertyEditor(TypeInfo(Integer), TdxPrinterPage, 'PaperSource', TdxPaperSourcePropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxMeasurementUnits), TdxPrinterPage, 'MeasurementUnits', TdxMeasurementUnitsPropertyEditor); - RegisterPropertyEditor(TypeInfo(TcxTextAlignY), TCustomdxPageObject, '', TdxHeaderFooterTextAlignYPropertyEditor); - - RegisterPropertyEditor(TypeInfo(TcxTextAlignX), TdxReportTitle, 'TextAlignX', TdxReportTitleTextAlignXPropertyEditor); - RegisterPropertyEditor(TypeInfo(TcxTextAlignY), TdxReportTitle, 'TextAlignY', TdxReportTitleTextAlignYPropertyEditor); - - RegisterPropertyEditor(TypeInfo(TdxBackground), nil, '', TdxBackgroundPropertyEditor); - - RegisterPropertyEditor(TypeInfo(TdxPointWrapper), nil, '', TdxPointWrapperEditor); - RegisterPropertyEditor(TypeInfo(TdxRectWrapper), nil, '', TdxRectWrapperEditor); - - RegisterPropertyEditor(TypeInfo(string), TdxPSEngineController, 'RegistryPath', TdxRegistryPathPropertyEditor); - RegisterPropertyEditor(TypeInfo(string), TdxPageSetupDialog, 'RegistryPath', TdxRegistryPathPropertyEditor); - RegisterPropertyEditor(TypeInfo(string), TdxPrintDialog, 'RegistryPath', TdxRegistryPathPropertyEditor); - - RegisterPropertyEditor(TypeInfo(TBrush), nil, '', TdxBrushPropertyEditor); - - RegisterPropertyEditor(TypeInfo(TcxTextAlignX), TdxCustomTextReportLink, 'Alignment', TdxTextReportLinkAlignmentPropertyEditor); - - {$IFDEF DELPHI6} - RegisterSelectionEditor(TCustomdxComponentPrinter, TdxComponentPrinterSelectionEditor); - RegisterSelectionEditor(TdxPrintStyleManager, TdxPrintStyleManagerSelectionEditor); - RegisterSelectionEditor(TdxPageSetupDialog, TdxPageSetupDialogSelectionEditor); - RegisterSelectionEditor(TdxPrintDialog, TdxPrintDialogSelectionEditor); - {$ENDIF} - - // hide unneeded property editors - HideProperty(TypeInfo(string), TdxPreviewOptions, 'HelpFile'); - HideProperty(TypeInfo(string), TdxPreviewOptions, 'RegistryPath'); - HideProperty(TypeInfo(Boolean), TdxPreviewOptions, 'SavePosition'); - HideProperty(TypeInfo(string), TBasedxReportLink, 'ReportTitleText'); - HideProperty(TypeInfo(string), TBasedxReportLink, 'Caption'); - HideProperty(TypeInfo(TDateTime), TBasedxReportLink, 'DateTime'); - HideProperty(TypeInfo(string), TBasedxReportLink, 'Description'); - HideProperty(TypeInfo(TdxReportTitleMode), TBasedxReportLink, 'ReportTitleMode'); - - HideProperty(TypeInfo(TComponent), TdxCompositionReportLink, 'Component'); - HideProperty(TypeInfo(TdxReportTitle), TdxCompositionReportLink, 'ReportTitle'); - HideProperty(TypeInfo(TNotifyEvent), TdxCompositionReportLink, 'OnChangeComponent'); - HideProperty(TypeInfo(TdxCustomDrawReportLinkHFEvent), TdxCompositionReportLink, 'OnCustomDrawPageFooter'); - HideProperty(TypeInfo(TdxCustomDrawReportLinkHFEvent), TdxCompositionReportLink, 'OnCustomDrawPageHeader'); - HideProperty(TypeInfo(TdxCustomDrawReportLinkTitleEvent), TdxCompositionReportLink, 'OnCustomDrawReportLinkTitle'); - HideProperty(TypeInfo(TdxMeasureReportLinkTitleEvent), TdxCompositionReportLink, 'OnMeasureReportLinkTitle'); - -// HideProperty(TypeInfo(TComponent), TdxCustomReportLink, 'Component'); -// HideProperty(TypeInfo(TNotifyEvent), TdxCustomReportLink, 'OnChangeComponent'); - - HideProperty(TypeInfo(TComponent), TdxPictureReportLink, 'Component'); - HideProperty(TypeInfo(TNotifyEvent), TdxPictureReportLink, 'OnChangeComponent'); - - HideProperty(TypeInfo(TComponent), TdxTextReportLink, 'Component'); - HideProperty(TypeInfo(TNotifyEvent), TdxTextReportLink, 'OnChangeComponent'); -end; - -const - ResFileName: string = 'dxPSDsgImgs'; - -{$IFDEF IDE_MENUBITMAPS} - -function LoadBitmap(const AResName: string): TBitmap; -begin - Result := TBitmap.Create; - Result.LoadFromResourceName(HInstance, AResName); - //Bitmap_LoadFromResourceName(Result, AResName, ResFileName); - Result.Transparent := True; -end; - -{$ENDIF} - -{$IFDEF DELPHI5} - -function CreateImageList(AnAllocBy: Integer): TImageList; -begin - Result := TImageList.Create(nil); - Result.AllocBy := AnAllocBy; -end; - -procedure LoadImage(AImageList: TImageList; const AResName: string; AMasked: Boolean); -var - Bitmap: TBitmap; -begin - Bitmap := TBitmap.Create; - try - Bitmap.LoadFromResourceName(FindResourceHInstance(hInstance), AResName); - //Bitmap_LoadFromResourceName(Bitmap, AResName, ResFileName); - AImageList.Height := Bitmap.Height; - AImageList.Width := Bitmap.Width; - if AMasked then - AImageList.AddMasked(Bitmap, clDefault) - else - AImageList.Add(Bitmap, nil); - finally - Bitmap.Free; - end; -end; - -function CreatePaperImages: TImageList; -begin - Result := CreateImageList(2); - LoadImage(Result, 'IDB_DXPSDESIGN_PAPER_STANDARD', True); - LoadImage(Result, 'IDB_DXPSDESIGN_PAPER_ENVELOPE', True); -end; - -function CreateBinImages: TImageList; -begin - Result := CreateImageList(2); - LoadImage(Result, 'IDB_DXPSDESIGN_BIN_AUTOTRAY', True); - LoadImage(Result, 'IDB_DXPSDESIGN_BIN_MANUALTRAY', True); -end; - -function CreatePrintOrderImages: TImageList; -begin - Result := CreateImageList(2); - LoadImage(Result, 'IDB_DXPSDESIGN_PRINTORDER_OVERTHENDOWN', False); - LoadImage(Result, 'IDB_DXPSDESIGN_PRINTORDER_DOWNTHENOVER', False); -end; - -function CreatePaperOrientationImages: TImageList; -begin - Result := CreateImageList(2); - LoadImage(Result, 'IDB_DXPSDESIGN_PAPERORIENTATION_PORTRAIT', True); - LoadImage(Result, 'IDB_DXPSDESIGN_PAPERORIENTATION_LANDSCAPE', True); -end; - -{$ENDIF} - -initialization - sdxPrintingSystem := sdxPrintingSystem + ' ' + dxPSGlbl.dxPSVersionString; - - {$IFDEF DELPHI5} - ilPapers := CreatePaperImages; - ilBins := CreateBinImages; - ilPrintOrders := CreatePrintOrderImages; - ilPaperOrientations := CreatePaperOrientationImages; - {$ENDIF} - - {$IFDEF IDE_MENUBITMAPS} - FBmpDesigner := LoadBitmap('IDB_DXPSDESIGN_DODESIGNER'); - FBmpNewEmpty := LoadBitmap('IDB_DXPSDESIGN_DOADDEMPTY'); - FBmpNew := LoadBitmap('IDB_DXPSDESIGN_DOADD'); - FBmpPrintPreview := LoadBitmap('IDB_DXPSDESIGN_DOPREVIEW'); - FBmpPageBackground := LoadBitmap('IDB_DXPSDESIGN_DOPAGEBACKGROUND'); - FBmpPrint := LoadBitmap('IDB_DXPSDESIGN_DOPRINT'); - FBmpPageSetup := LoadBitmap('IDB_DXPSDESIGN_DOPAGESETUP'); - FBmpItems := LoadBitmap('IDB_DXPSDESIGN_DOPROPERTIES'); - FBmpWEB := LoadBitmap('IDB_DXPSDESIGN_DOWEB'); - {$ENDIF} - -finalization - {$IFDEF DELPHI5} - FreeAndNil(ilPapers); - FreeAndNil(ilBins); - FreeAndNil(ilPrintOrders); - FreeAndNil(ilPaperOrientations); - {$ENDIF} - - {$IFDEF IDE_MENUBITMAPS} - FreeAndNil(FBmpWEB); - FreeAndNil(FBmpItems); - FreeAndNil(FBmpPageSetup); - FreeAndNil(FBmpPrint); - FreeAndNil(FBmpPageBackground); - FreeAndNil(FBmpPrintPreview); - FreeAndNil(FBmpNew); - FreeAndNil(FBmpNewEmpty); - FreeAndNil(FBmpDesigner); - {$ENDIF} - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSRes.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSRes.pas deleted file mode 100644 index 648b51e9..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSRes.pas +++ /dev/null @@ -1,3003 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSRes; - -interface - -{$I cxVer.inc} - -resourcestring - sdxBtnOK = 'OK'; - sdxBtnOKAccelerated = '&OK'; - sdxBtnCancel = 'Cancel'; - sdxBtnClose = 'Close'; - sdxBtnApply = '&Apply'; - sdxBtnHelp = '&Help'; - sdxBtnFix = '&Fix'; - sdxBtnNew = '&New...'; - sdxBtnIgnore = '&Ignore'; - sdxBtnYes = '&Yes'; - sdxBtnNo = '&No'; - sdxBtnEdit = '&Edit...'; - sdxBtnReset = '&Reset'; - sdxBtnAdd = '&Add'; - sdxBtnAddComposition = 'Add &Composition'; - sdxBtnDefault = '&Default...'; - sdxBtnDelete = '&Delete...'; - sdxBtnDescription = '&Description...'; - sdxBtnCopy = '&Copy...'; - sdxBtnYesToAll = 'Yes To &All'; - sdxBtnRestoreDefaults = '&Restore Defaults'; - sdxBtnRestoreOriginal = 'Restore &Original'; - sdxBtnTitleProperties = 'Title Properties...'; - sdxBtnProperties = 'P&roperties...'; - sdxBtnNetwork = 'Net&work...'; - sdxBtnBrowse = '&Browse...'; - sdxBtnPageSetup = 'Pa&ge Setup...'; - sdxBtnPrintPreview = 'Print Pre&view...'; - sdxBtnPreview = 'Pre&view...'; - sdxBtnPrint = 'Print...'; - sdxBtnOptions = '&Options...'; - sdxBtnStyleOptions = 'Style Options...'; - sdxBtnDefinePrintStyles = '&Define Styles...'; - sdxBtnPrintStyles = 'Print Styles'; - sdxBtnBackground = 'Background'; - sdxBtnShowToolBar = 'Show &ToolBar'; - sdxBtnDesign = 'D&esign...'; - sdxBtnMoveUp = 'Move &Up'; - sdxBtnMoveDown = 'Move Dow&n'; - - sdxBtnMoreColors = '&More Colors...'; - sdxBtnFillEffects = '&Fill Effects...'; - sdxBtnNoFill = '&No Fill'; - sdxBtnAutomatic = '&Automatic'; - sdxBtnNone = '&None'; - - sdxBtnOtherTexture = 'Other Te&xture...'; - sdxBtnInvertColors = 'I&nvert Colors'; - sdxBtnSelectPicture = 'Se&lect Picture...'; - - sdxEditReports = 'Edit Reports'; - sdxComposition = 'Composition'; - sdxReportTitleDlgCaption = 'Report Title'; - sdxMode = '&Mode:'; - sdxText = '&Text'; - sdxProperties = '&Properties'; - sdxAdjustOnScale = '&Adjust on Scale'; - sdxTitleModeNone = 'None'; - sdxTitleModeOnEveryTopPage = 'On Every Top Page'; - sdxTitleModeOnFirstPage = 'On First Page'; - - sdxEditDescription = 'Edit Description'; - sdxRename = 'Rena&me'; - sdxSelectAll = '&Select All'; - - sdxAddReport = 'Add Report'; - sdxAddAndDesignReport = 'Add and D&esign Report...'; - sdxNewCompositionCaption = 'New Composition'; - sdxName = '&Name:'; - sdxCaption = '&Caption:'; - sdxAvailableSources = '&Available Source(s)'; - sdxOnlyComponentsInActiveForm = 'Only Components in Active &Form'; - sdxOnlyComponentsWithoutLinks = 'Only Components &without Existing ReportLinks'; - sdxItemName = 'Name'; - sdxItemDescription = 'Description'; - - sdxConfirmDeleteItem = 'Do you want to delete next items: %s ?'; - sdxAddItemsToComposition = 'Add Items to Composition'; - sdxHideAlreadyIncludedItems = 'Hide Already &Included Items'; - sdxAvailableItems = 'A&vailable Items'; - sdxItems = '&Items'; - sdxEnable = '&Enable'; - sdxOptions = 'Options'; - sdxShow = 'Show'; - sdxPaintItemsGraphics = '&Paint Item Graphics'; - sdxDescription = '&Description:'; - - sdxNewReport = 'NewReport'; - - sdxOnlySelected = 'Only &Selected'; - sdxExtendedSelect = '&Extended Select'; - sdxIncludeFixed = '&Include Fixed'; - - sdxFonts = 'Fonts'; - sdxBtnFont = 'Fo&nt...'; - sdxBtnEvenFont = 'E&ven Font...'; - sdxBtnOddFont = 'Odd Fo&nt...'; - sdxBtnFixedFont = 'F&ixed Font...'; - sdxBtnGroupFont = 'Grou&p Font...'; - sdxBtnChangeFont = 'Change Fo&nt...'; - - sdxFont = 'Font'; - sdxOddFont = 'Odd Font'; - sdxEvenFont = 'Even Font'; - sdxPreviewFont = 'Preview Font'; - sdxCaptionNodeFont = 'Level Caption Font'; - sdxGroupNodeFont = 'Group Node Font'; - sdxGroupFooterFont = 'Group Footer Font'; - sdxHeaderFont = 'Header Font'; - sdxFooterFont = 'Footer Font'; - sdxBandFont = 'Band Font'; - - sdxTransparent = '&Transparent'; - sdxFixedTransparent = 'Fi&xed Transparent'; - sdxCaptionTransparent = 'Caption Transparent'; - sdxGroupTransparent = 'Group Transparent'; - - sdxGraphicAsTextValue = '(GRAPHIC)'; - sdxColors = 'Colors'; - sdxColor = 'Co&lor:'; - sdxOddColor = 'Odd Co&lor:'; - sdxEvenColor = 'E&ven Color:'; - sdxPreviewColor = '&Preview Color:'; - sdxBandColor = '&Band Color:'; - sdxLevelCaptionColor = 'Le&vel Caption Color:'; - sdxHeaderColor = 'H&eader Color:'; - sdxGroupNodeColor = 'Group &Node Color:'; - sdxGroupFooterColor = '&Group Footer Color:'; - sdxFooterColor = 'Foo&ter Color:'; - sdxFixedColor = 'F&ixed Color:'; - sdxGroupColor = 'Grou&p Color:'; - sdxCaptionColor = 'Caption Color:'; - sdxGridLinesColor = 'Gri&d Line Color:'; - - sdxBands = '&Bands'; - sdxLevelCaptions = 'Levels &Caption'; - sdxHeaders = 'H&eaders'; - sdxFooters = 'Foote&rs'; - sdxGroupFooters = '&Group Footers'; - sdxPreview = 'Previe&w'; - sdxPreviewLineCount = 'Preview Line Coun&t:'; - sdxAutoCalcPreviewLineCount = 'A&uto Calculate Preview Lines'; - - sdxGrid = 'Grid Lines'; - sdxNodesGrid = 'Node Grid Lines'; - sdxGroupFooterGrid = 'GroupFooter Grid Lines'; - - sdxStateImages = '&State Images'; - sdxImages = '&Images'; - - sdxTextAlign = 'Text&Align'; - sdxTextAlignHorz = 'Hori&zontally'; - sdxTextAlignVert = '&Vertically'; - sdxTextAlignLeft = 'Left'; - sdxTextAlignCenter = 'Center'; - sdxTextAlignRight = 'Right'; - sdxTextAlignTop = 'Top'; - sdxTextAlignVCenter = 'Center'; - sdxTextAlignBottom = 'Bottom'; - sdxBorderLines = '&Border'; - sdxHorzLines = 'Hori&zontal Lines'; - sdxVertLines = '&Vertical Lines'; - sdxFixedHorzLines = 'Fi&xed Horizontal Lines'; - sdxFixedVertLines = 'Fixe&d Vertical Lines'; - sdxFlatCheckMarks = 'F&lat CheckMarks'; - sdxCheckMarksAsText = '&Display CheckMarks as Text'; - - sdxRowAutoHeight = 'Ro&w AutoHeight'; - sdxEndEllipsis = '&EndEllipsis'; - - sdxDrawBorder = '&Draw Border'; - sdxFullExpand = 'Full &Expand'; - sdxBorderColor = '&Border Color:'; - sdxAutoNodesExpand = 'A&uto Nodes Expand'; - sdxExpandLevel = 'Expand &Level:'; - sdxFixedRowOnEveryPage = 'Fixed Rows'; - - sdxDrawMode = 'Draw &Mode:'; - sdxDrawModeStrict = 'Strict'; - sdxDrawModeOddEven = 'Odd/Even Rows Mode'; - sdxDrawModeChess = 'Chess Mode'; - sdxDrawModeBorrow = 'Borrow From Source'; - - sdx3DEffects = '3D Effects'; - sdxUse3DEffects = 'Use &3D Effects'; - sdxSoft3D = 'Sof&t3D'; - - sdxBehaviors = 'Behaviors'; - sdxMiscellaneous = 'Miscellaneous'; - sdxOnEveryPage = 'On Every Page'; - sdxNodeExpanding = 'Node Expanding'; - sdxSelection = 'Selection'; - sdxNodeAutoHeight = '&Node Auto Height'; - sdxTransparentGraphics = '&Transparent Graphics'; - sdxAutoWidth = 'Auto &Width'; - - sdxDisplayGraphicsAsText = 'Display Graphic As &Text'; - sdxTransparentColumnGraphics = 'Transparent &Graphics'; - - sdxBandsOnEveryPage = 'Bands'; - sdxHeadersOnEveryPage = 'Headers'; - sdxFootersOnEveryPage = 'Footers'; - sdxGraphics = '&Graphics'; - - { Common messages } - - sdxOutOfResources = 'Out of Resources'; - sdxFileAlreadyExists = 'File "%s" Already Exists.'; - sdxConfirmOverWrite = 'File "%s" already exists. Overwrite ?'; - sdxInvalidFileName = 'Invalid File Name "%s"'; - sdxRequiredFileName = 'Enter file name.'; - sdxOutsideMarginsMessage = - 'One or more margins are set outside the printable area of the page.' + #13#10 + - 'Do you want to continue ?'; - sdxOutsideMarginsMessage2 = - 'One or more margins are set outside the printable area of the page.' + #13#10 + - 'Choose the Fix button to increase the appropriate margins.'; - sdxInvalidMarginsMessage = - 'One or more margins are set to the invalid values.' + #13#10 + - 'Choose the Fix button to correct this problem.' + #13#10 + - 'Choose the Restore button to restore original values.'; - sdxInvalidMargins = 'One or more margins have invalid values'; - sdxOutsideMargins = 'One or more margins are set outside the printable area of the page'; - sdxThereAreNowItemsForShow = 'There are no items in this view'; - - { Color palette } - - sdxPageBackground = ' Page Background'; - sdxPenColor = 'Pen Color'; - sdxFontColor = 'Font Color'; - sdxBrushColor = 'Brush Color'; - sdxHighLight = 'HighLight'; - - { Color names } - - sdxColorBlack = 'Black'; - sdxColorDarkRed = 'Dark Red'; - sdxColorRed = 'Red'; - sdxColorPink = 'Pink'; - sdxColorRose = 'Rose'; - sdxColorBrown = 'Brown'; - sdxColorOrange = 'Orange'; - sdxColorLightOrange = 'Light Orange'; - sdxColorGold = 'Gold'; - sdxColorTan = 'Tan'; - sdxColorOliveGreen = 'Olive Green'; - sdxColorDrakYellow = 'Dark Yellow'; - sdxColorLime = 'Lime'; - sdxColorYellow = 'Yellow'; - sdxColorLightYellow = 'Light Yellow'; - sdxColorDarkGreen = 'Dark Green'; - sdxColorGreen = 'Green'; - sdxColorSeaGreen = 'Sea Green'; - sdxColorBrighthGreen = 'Bright Green'; - sdxColorLightGreen = 'Light Green'; - sdxColorDarkTeal = 'Dark Teal'; - sdxColorTeal = 'Teal'; - sdxColorAqua = 'Aqua'; - sdxColorTurquoise = 'Turquoise'; - sdxColorLightTurquoise = 'Light Turquoise'; - sdxColorDarkBlue = 'Dark Blue'; - sdxColorBlue = 'Blue'; - sdxColorLightBlue = 'Light Blue'; - sdxColorSkyBlue = 'Sky Blue'; - sdxColorPaleBlue = 'Pale Blue'; - sdxColorIndigo = 'Indigo'; - sdxColorBlueGray = 'Blue Gray'; - sdxColorViolet = 'Violet'; - sdxColorPlum = 'Plum'; - sdxColorLavender = 'Lavender'; - sdxColorGray80 = 'Gray-80%'; - sdxColorGray50 = 'Gray-50%'; - sdxColorGray40 = 'Gray-40%'; - sdxColorGray25 = 'Gray-25%'; - sdxColorWhite = 'White'; - - { FEF Dialog } - - sdxTexture = '&Texture'; - sdxPattern = '&Pattern'; - sdxPicture = 'P&icture'; - sdxForeground = '&Foreground'; - sdxBackground = '&Background'; - sdxSample = 'Sample:'; - - sdxFEFCaption = 'Fill Effects'; - sdxPaintMode = 'Paint &Mode'; - sdxPaintModeCenter = 'Center'; - sdxPaintModeStretch = 'Stretch'; - sdxPaintModeTile = 'Tile'; - sdxPaintModeProportional = 'Proportional'; - - { Pattern names } - - sdxPatternGray5 = '5%'; - sdxPatternGray10 = '10%'; - sdxPatternGray20 = '20%'; - sdxPatternGray25 = '25%'; - sdxPatternGray30 = '30%'; - sdxPatternGray40 = '40%'; - sdxPatternGray50 = '50%'; - sdxPatternGray60 = '60%'; - sdxPatternGray70 = '70%'; - sdxPatternGray75 = '75%'; - sdxPatternGray80 = '80%'; - sdxPatternGray90 = '90%'; - sdxPatternLightDownwardDiagonal = 'Light downward diagonal'; - sdxPatternLightUpwardDiagonal = 'Light upward diagonal'; - sdxPatternDarkDownwardDiagonal = 'Dark downward diagonal'; - sdxPatternDarkUpwardDiagonal = 'Dark upward diagonal'; - sdxPatternWideDownwardDiagonal = 'Wide downward diagonal'; - sdxPatternWideUpwardDiagonal = 'Wide upward diagonal'; - sdxPatternLightVertical = 'Light vertical'; - sdxPatternLightHorizontal = 'Light horizontal'; - sdxPatternNarrowVertical = 'Narrow vertical'; - sdxPatternNarrowHorizontal = 'Narrow horizontal'; - sdxPatternDarkVertical = 'Dark vertical'; - sdxPatternDarkHorizontal = 'Dark horizontal'; - sdxPatternDashedDownward = 'Dashed downward'; - sdxPatternDashedUpward = 'Dashed upward'; - sdxPatternDashedVertical = 'Dashed vertical'; - sdxPatternDashedHorizontal = 'Dashed horizontal'; - sdxPatternSmallConfetti = 'Small confetti'; - sdxPatternLargeConfetti = 'Large confetti'; - sdxPatternZigZag = 'Zig zag'; - sdxPatternWave = 'Wave'; - sdxPatternDiagonalBrick = 'Diagonal brick'; - sdxPatternHorizantalBrick = 'Horizontal brick'; - sdxPatternWeave = 'Weave'; - sdxPatternPlaid = 'Plaid'; - sdxPatternDivot = 'Divot'; - sdxPatternDottedGrid = 'Dottedgrid'; - sdxPatternDottedDiamond = 'Dotted diamond'; - sdxPatternShingle = 'Shingle'; - sdxPatternTrellis = 'Trellis'; - sdxPatternSphere = 'Sphere'; - sdxPatternSmallGrid = 'Small grid'; - sdxPatternLargeGrid = 'Large grid'; - sdxPatternSmallCheckedBoard = 'Small checked board'; - sdxPatternLargeCheckedBoard = 'Large checked board'; - sdxPatternOutlinedDiamond = 'Outlined diamond'; - sdxPatternSolidDiamond = 'Solid diamond'; - - { Texture names } - - sdxTextureNewSprint = 'Newsprint'; - sdxTextureGreenMarble = 'Green marble'; - sdxTextureBlueTissuePaper = 'Blue tissue paper'; - sdxTexturePapyrus = 'Papyrus'; - sdxTextureWaterDroplets = 'Water droplets'; - sdxTextureCork = 'Cork'; - sdxTextureRecycledPaper = 'Recycled paper'; - sdxTextureWhiteMarble = 'White marble'; - sdxTexturePinkMarble = 'Pink marble'; - sdxTextureCanvas = 'Canvas'; - sdxTexturePaperBag = 'Paper bag'; - sdxTextureWalnut = 'Walnut'; - sdxTextureParchment = 'Parchment'; - sdxTextureBrownMarble = 'Brown marble'; - sdxTexturePurpleMesh = 'Purple mesh'; - sdxTextureDenim = 'Denim'; - sdxTextureFishFossil = 'Fish fossil'; - sdxTextureOak = 'Oak'; - sdxTextureStationary = 'Stationary'; - sdxTextureGranite = 'Granite'; - sdxTextureBouquet = 'Bouquet'; - sdxTextureWonenMat = 'Woven mat'; - sdxTextureSand = 'Sand'; - sdxTextureMediumWood = 'Medium wood'; - - sdxFSPCaption = 'Picture Preview'; - sdxWidth = 'Width'; - sdxHeight = 'Height'; - - { Brush Dialog } - - sdxBrushDlgCaption = 'Brush properties'; - sdxStyle = '&Style:'; - - { Enter New File Name dialog } - - sdxENFNCaption = 'Choose New File Name'; - sdxEnterNewFileName = 'Enter New File Name'; - - { Define styles dialog } - - sdxDefinePrintStylesCaption = 'Define Print Styles'; - sdxDefinePrintStylesTitle = 'Print &Styles:'; - sdxDefinePrintStylesWarningDelete = 'Do you want to delete "%s" ?'; - sdxDefinePrintStylesWarningClear = 'Do you want to delete all not built-in styles ?'; - sdxClear = 'C&lear...'; - - { Print device } - - sdxCustomSize = 'Custom Size'; - sdxDefaultTray = 'Default Tray'; - sdxInvalidPrintDevice = 'Printer selected is not valid'; - sdxNotPrinting = 'Printer is not currently printing'; - sdxPrinting = 'Printing in progress'; - sdxDeviceOnPort = '%s on %s'; - sdxPrinterIndexError = 'Printer index out of range'; - sdxNoDefaultPrintDevice = 'There is no default printer selected'; - - { Edit AutoText Entries Dialog } - - sdxAutoTextDialogCaption = 'Edit AutoText Entries'; - sdxEnterAutoTextEntriesHere = ' Enter A&utoText Entries Here: '; - - { Print dialog } - - sdxPrintDialogCaption = 'Print'; - sdxPrintDialogPrinter = ' Printer '; - sdxPrintDialogName = '&Name:'; - sdxPrintDialogStatus = 'Status:'; - sdxPrintDialogType = 'Type:'; - sdxPrintDialogWhere = 'Where:'; - sdxPrintDialogComment = 'Comment:'; - sdxPrintDialogPrintToFile = 'Print to &File'; - sdxPrintDialogPageRange = ' Page range '; - sdxPrintDialogAll = '&All'; - sdxPrintDialogCurrentPage = 'Curr&ent Page'; - sdxPrintDialogSelection = '&Selection'; - sdxPrintDialogPages = '&Pages:'; - sdxPrintDialogRangeLegend = - 'Enter page number and/or page ranges' + #10#13 + - 'separated by commas. For example: 1,3,5-12.'; - sdxPrintDialogCopies = ' Copies '; - sdxPrintDialogNumberOfPages = 'N&umber of Pages:'; - sdxPrintDialogNumberOfCopies = 'Number of &Copies:'; - sdxPrintDialogCollateCopies = 'Colla&te Copies'; - sdxPrintDialogAllPages = 'All'; - sdxPrintDialogEvenPages = 'Even'; - sdxPrintDialogOddPages = 'Odd'; - sdxPrintDialogPrintStyles = ' Print St&yles '; - - { PrintToFile Dialog } - - sdxPrintDialogOpenDlgTitle = 'Choose File Name'; - sdxPrintDialogOpenDlgAllFiles = 'All Files'; - sdxPrintDialogOpenDlgPrinterFiles = 'Printer Files'; - sdxPrintDialogPageNumbersOutOfRange = 'Page numbers out of range (%d - %d)'; - sdxPrintDialogInvalidPageRanges = 'Invalid page ranges'; - sdxPrintDialogRequiredPageNumbers = 'Enter page numbers'; - sdxPrintDialogNoPrinters = - 'No printers are installed. To install a printer, ' + - 'point to Settings on the Windows Start menu, click Printers, and then double-click Add Printer. ' + - 'Follow the instructions in the wizard.'; - sdxPrintDialogInPrintingState = 'Printer is currently printing.' + #10#13 + - 'Please wait.'; - - { Printer State } - - sdxPrintDialogPSPaused = 'Paused'; - sdxPrintDialogPSPendingDeletion = 'Pending Deletion'; - sdxPrintDialogPSBusy = 'Busy'; - sdxPrintDialogPSDoorOpen = 'Door Open'; - sdxPrintDialogPSError = 'Error'; - sdxPrintDialogPSInitializing = 'Initializing'; - sdxPrintDialogPSIOActive = 'IO Active'; - sdxPrintDialogPSManualFeed = 'Manual Feed'; - sdxPrintDialogPSNoToner = 'No Toner'; - sdxPrintDialogPSNotAvailable = 'Not Available'; - sdxPrintDialogPSOFFLine = 'Offline'; - sdxPrintDialogPSOutOfMemory = 'Out of Memory'; - sdxPrintDialogPSOutBinFull = 'Output Bin Full'; - sdxPrintDialogPSPagePunt = 'Page Punt'; - sdxPrintDialogPSPaperJam = 'Paper Jam'; - sdxPrintDialogPSPaperOut = 'Paper Out'; - sdxPrintDialogPSPaperProblem = 'Paper Problem'; - sdxPrintDialogPSPrinting = 'Printing'; - sdxPrintDialogPSProcessing = 'Processing'; - sdxPrintDialogPSTonerLow = 'Toner Low'; - sdxPrintDialogPSUserIntervention = 'User Intervention'; - sdxPrintDialogPSWaiting = 'Waiting'; - sdxPrintDialogPSWarningUp = 'Warming Up'; - sdxPrintDialogPSReady = 'Ready'; - sdxPrintDialogPSPrintingAndWaiting = 'Printing: %d document(s) waiting'; - - sdxLeftMargin = 'Left Margin'; - sdxTopMargin = 'Top Margin'; - sdxRightMargin = 'Right Margin'; - sdxBottomMargin = 'Bottom Margin'; - sdxGutterMargin = 'Gutter'; - sdxHeaderMargin = 'Header'; - sdxFooterMargin = 'Footer'; - - sdxUnitsInches = '"'; - sdxUnitsCentimeters = 'cm'; - sdxUnitsMillimeters = 'mm'; - sdxUnitsPoints = 'pt'; - sdxUnitsPicas = 'pi'; - - sdxUnitsDefaultName = 'Default'; - sdxUnitsInchesName = 'Inches'; - sdxUnitsCentimetersName = 'Centimeters'; - sdxUnitsMillimetersName = 'Millimeters'; - sdxUnitsPointsName = 'Points'; - sdxUnitsPicasName = 'Picas'; - - sdxPrintPreview = 'Print Preview'; - sdxReportDesignerCaption = 'Format Report'; - sdxCompositionDesignerCaption = 'Composition Editor'; - - sdxComponentNotSupportedByLink = 'Component "%s" not supported by TdxComponentPrinter'; - sdxComponentNotSupported = 'Component "%s" not supported by TdxComponentPrinter'; - sdxPrintDeviceNotReady = 'Printer has not been installed or is not ready'; - sdxUnableToGenerateReport = 'Unable to generate report'; - sdxPreviewNotRegistered = 'There is no registered preview form'; - sdxComponentNotAssigned = '%s' + #13#10 + 'Not assigned "Component" property'; - sdxPrintDeviceIsBusy = 'Printer is busy'; - sdxPrintDeviceError = 'Printer has encountered error !'; - sdxMissingComponent = 'Missing "Component" property'; - sdxDataProviderDontPresent = 'There are no Links with Assigned Component in Composition'; - sdxBuildingReport = 'Building report: Completed %d%%'; // obsolete - sdxPrintingReport = 'Printing report: Completed %d page(s). Press Esc to cancel'; // obsolete - sdxDefinePrintStylesMenuItem = 'Define Print &Styles...'; - sdxAbortPrinting = 'Abort printing ?'; - sdxStandardStyle = 'Standard Style'; - - sdxFontStyleBold = 'Bold'; - sdxFontStyleItalic = 'Italic'; - sdxFontStyleUnderline = 'Underline'; - sdxFontStyleStrikeOut = 'StrikeOut'; - sdxPt = 'pt.'; - - sdxNoPages = 'There are no pages to display'; - sdxPageWidth = 'Page Width'; - sdxWholePage = 'Whole Page'; - sdxTwoPages = 'Two Pages'; - sdxFourPages = 'Four Pages'; - sdxWidenToSourceWidth = 'Widen to Source Width'; - - sdxMenuBar = 'MenuBar'; - sdxStandardBar = 'Standard'; - sdxHeaderFooterBar = 'Header and Footer'; - sdxShortcutMenusBar = 'Shortcut Menus'; - sdxAutoTextBar = 'AutoText'; - - sdxMenuFile = '&File'; - sdxMenuFileDesign = '&Design...'; - sdxMenuFilePrint = '&Print...'; - sdxMenuFilePageSetup = 'Page Set&up...'; - sdxMenuPrintStyles = 'Print Styles'; - sdxMenuFileExit = '&Close'; - - sdxMenuEdit = '&Edit'; - sdxMenuEditCut = 'Cu&t'; - sdxMenuEditCopy = '&Copy'; - sdxMenuEditPaste = '&Paste'; - sdxMenuEditDelete = '&Delete'; - sdxMenuEditFind = '&Find...'; - sdxMenuEditFindNext = 'Find Ne&xt'; - sdxMenuEditReplace = '&Replace...'; - - sdxMenuLoad = '&Load...'; - sdxMenuPreview = 'Pre&view...'; - - sdxMenuInsert = '&Insert'; - sdxMenuInsertAutoText = '&AutoText'; - sdxMenuInsertEditAutoTextEntries = 'AutoTe&xt...'; - sdxMenuInsertAutoTextEntries = 'List of AutoText Entries'; - sdxMenuInsertAutoTextEntriesSubItem = 'In&sert AutoText'; - sdxMenuInsertPageNumber = '&Page Number'; - sdxMenuInsertTotalPages = '&Number of Pages'; - sdxMenuInsertPageOfPages = 'Pa&ge Number of Pages'; - sdxMenuInsertDateTime = 'Date and Time'; - sdxMenuInsertDate = '&Date'; - sdxMenuInsertTime = '&Time'; - sdxMenuInsertUserName = '&User Name'; - sdxMenuInsertMachineName = '&Machine Name'; - - sdxMenuView = '&View'; - sdxMenuViewMargins = '&Margins'; - sdxMenuViewFlatToolBarButtons = '&Flat ToolBar Buttons'; - sdxMenuViewLargeToolBarButtons = '&Large ToolBar Buttons'; - sdxMenuViewMarginsStatusBar = 'M&argins Bar'; - sdxMenuViewPagesStatusBar = '&Status Bar'; - sdxMenuViewToolBars = '&Toolbars'; - sdxMenuViewPagesHeaders = 'Page &Headers'; - sdxMenuViewPagesFooters = 'Page Foote&rs'; - sdxMenuViewSwitchToLeftPart = 'Switch to Left Part'; - sdxMenuViewSwitchToRightPart = 'Switch to Right Part'; - sdxMenuViewSwitchToCenterPart = 'Switch to Center Part'; - sdxMenuViewHFSwitchHeaderFooter = '&Show Header/Footer'; - sdxMenuViewHFClose = '&Close'; - - sdxMenuZoom = '&Zoom'; - sdxMenuZoomPercent100 = 'Percent &100'; - sdxMenuZoomPageWidth = 'Page &Width'; - sdxMenuZoomWholePage = 'W&hole Page'; - sdxMenuZoomTwoPages = '&Two Pages'; - sdxMenuZoomFourPages = '&Four Pages'; - sdxMenuZoomMultiplyPages = '&Multiple Pages'; - sdxMenuZoomWidenToSourceWidth = 'Widen To S&ource Width'; - sdxMenuZoomSetup = '&Setup...'; - - sdxMenuPages = '&Pages'; - - sdxMenuGotoPage = '&Go'; - sdxMenuGotoPageFirst = '&First Page'; - sdxMenuGotoPagePrev = '&Previous Page'; - sdxMenuGotoPageNext = '&Next Page'; - sdxMenuGotoPageLast = '&Last Page'; - sdxMenuActivePage = '&Active Page:'; - - sdxMenuFormat = 'F&ormat'; - sdxMenuFormatHeaderAndFooter = '&Header and Footer'; - sdxMenuFormatAutoTextEntries = '&Auto Text Entries...'; - sdxMenuFormatDateTime = 'Date And &Time...'; - sdxMenuFormatPageNumbering = 'Page &Numbering...'; - sdxMenuFormatPageBackground = 'Bac&kground...'; - sdxMenuFormatShrinkToPage = '&Fit to Page'; - sdxMenuShowEmptyPages = 'Show &Empty Pages'; - sdxMenuFormatHFBackground = 'Header/Footer Background...'; - sdxMenuFormatHFClear = 'Clear Text'; - - sdxMenuTools = '&Tools'; - sdxMenuToolsCustomize = '&Customize...'; - sdxMenuToolsOptions = '&Options...'; - - sdxMenuHelp = '&Help'; - sdxMenuHelpTopics = 'Help &Topics...'; - sdxMenuHelpAbout = '&About...'; - - sdxMenuShortcutPreview = 'Preview'; - sdxMenuShortcutAutoText = 'AutoText'; - - sdxMenuBuiltInMenus = 'Built-in Menus'; - sdxMenuShortCutMenus = 'Shortcut Menus'; - sdxMenuNewMenu = 'New Menu'; - - { Hints } - - sdxHintFileDesign = 'Design Report'; - sdxHintFilePrint = 'Print'; - sdxHintFilePrintDialog = 'Print Dialog'; - sdxHintFilePageSetup = 'Page Setup'; - sdxHintFileExit = 'Close Preview'; - - sdxHintEditFind = 'Find'; - sdxHintEditFindNext = 'Find Next'; - sdxHintEditReplace = 'Replace'; - - sdxHintInsertEditAutoTextEntries = 'Edit AutoText Entries'; - sdxHintInsertPageNumber = 'Insert Page Number'; - sdxHintInsertTotalPages = 'Insert Number of Pages'; - sdxHintInsertPageOfPages = 'Insert Page Number of Pages'; - sdxHintInsertDateTime = 'Insert Date and Time'; - sdxHintInsertDate = 'Insert Date'; - sdxHintInsertTime = 'Insert Time'; - sdxHintInsertUserName = 'Insert User Name'; - sdxHintInsertMachineName = 'Insert Machine Name'; - - sdxHintViewMargins = 'View Margins'; - sdxHintViewLargeButtons = 'View Large Buttons'; - sdxHintViewMarginsStatusBar = 'View Margins Status Bar'; - sdxHintViewPagesStatusBar = 'View Page Status Bar'; - sdxHintViewPagesHeaders = 'View Page Header'; - sdxHintViewPagesFooters = 'View Page Footer'; - sdxHintViewSwitchToLeftPart = 'Switch to Left Header/Footer Part'; - sdxHintViewSwitchToRightPart = 'Switch to Right Header/Footer Part'; - sdxHintViewSwitchToCenterPart = 'Switch to Center Header/Footer Part'; - sdxHintViewHFSwitchHeaderFooter = 'Switch Between Header and Footer'; - sdxHintViewHFClose = 'Close'; - - sdxHintViewZoom = 'Zoom'; - sdxHintZoomPercent100 = 'Zoom 100%'; - sdxHintZoomPageWidth = 'Zoom Page Width'; - sdxHintZoomWholePage = 'Whole Page'; - sdxHintZoomTwoPages = 'Two Pages'; - sdxHintZoomFourPages = 'Four Pages'; - sdxHintZoomMultiplyPages = 'Multiple Pages'; - sdxHintZoomWidenToSourceWidth = 'Widen To Source Width'; - sdxHintZoomSetup = 'Setup Zoom Factor'; - - sdxHintFormatDateTime = 'Format Date and Time'; - sdxHintFormatPageNumbering = 'Format Page Number'; - sdxHintFormatPageBackground = 'Background'; - sdxHintFormatShrinkToPage = 'Fit To Page'; - sdxHintFormatHFBackground = 'Header/Footer Background'; - sdxHintFormatHFClear = 'Clear Header/Footer Text'; - - sdxHintGotoPageFirst = 'First Page'; - sdxHintGotoPagePrev = 'Previous Page'; - sdxHintGotoPageNext = 'Next Page'; - sdxHintGotoPageLast = 'Last Page'; - sdxHintActivePage = 'Active Page'; - - sdxHintToolsCustomize = 'Customize Toolbars'; - sdxHintToolsOptions = 'Options'; - - sdxHintHelpTopics = 'Help Topics'; - sdxHintHelpAbout = 'About'; - - sdxPopupMenuLargeButtons = '&Large Buttons'; - sdxPopupMenuFlatButtons = '&Flat Buttons'; - - sdxPaperSize = 'Paper Size:'; - sdxStatus = 'Status:'; - sdxStatusReady = 'Ready'; - sdxStatusPrinting = 'Printing. Completed %d page(s)'; - sdxStatusGenerateReport = 'Generating Report. Completed %d%%'; - - sdxHintDoubleClickForChangePaperSize = 'Double Click for Change Paper Size'; - sdxHintDoubleClickForChangeMargins = 'Double Click for Change Margins'; - - { Date&Time Formats Dialog } - - sdxDTFormatsCaption = 'Date and Time'; - sdxDTFormatsAvailableDateFormats = '&Available Date Formats:'; - sdxDTFormatsAvailableTimeFormats = 'Available &Time Formats:'; - sdxDTFormatsAutoUpdate = '&Update Automatically'; - sdxDTFormatsChangeDefaultFormat = - 'Do you want to change the default date and time formats to match "%s" - "%s" ?'; - - { PageNumber Formats Dialog } - - sdxPNFormatsCaption = 'Page Number Format'; - sdxPageNumbering = 'Page Numbering'; - sdxPNFormatsNumberFormat = 'Number &Format:'; - sdxPNFormatsContinueFromPrevious = '&Continue from Previous Section'; - sdxPNFormatsStartAt = 'Start &At:'; - sdxPNFormatsChangeDefaultFormat = - 'Do you want to change the default Page numbering format to match "%s" ?'; - - { Zoom Dialog } - - sdxZoomDlgCaption = 'Zoom'; - sdxZoomDlgZoomTo = ' Zoom To '; - sdxZoomDlgPageWidth = 'Page &Width'; - sdxZoomDlgWholePage = 'W&hole Page'; - sdxZoomDlgTwoPages = '&Two Pages'; - sdxZoomDlgFourPages = '&Four Pages'; - sdxZoomDlgManyPages = '&Many Pages:'; - sdxZoomDlgPercent = 'P&ercent:'; - sdxZoomDlgPreview = ' Preview '; - sdxZoomDlgFontPreview = ' 12pt Times New Roman '; - sdxZoomDlgFontPreviewString = 'AaBbCcDdEeXxYyZz'; - - { Select page X x Y } - - sdxPages = 'Pages'; - sdxCancel = 'Cancel'; - - { Preferences dialog } - - sdxPreferenceDlgCaption = 'Options'; - sdxPreferenceDlgTab1 = '&General'; - sdxPreferenceDlgTab2 = ''; - sdxPreferenceDlgTab3 = ''; - sdxPreferenceDlgTab4 = ''; - sdxPreferenceDlgTab5 = ''; - sdxPreferenceDlgTab6 = ''; - sdxPreferenceDlgTab7 = ''; - sdxPreferenceDlgTab8 = ''; - sdxPreferenceDlgTab9 = ''; - sdxPreferenceDlgTab10 = ''; - sdxPreferenceDlgShow = ' &Show '; - sdxPreferenceDlgMargins = '&Margins '; - sdxPreferenceDlgMarginsHints = 'Margins &Hints'; - sdxPreferenceDlgMargingWhileDragging = 'Margins Hints While &Dragging'; - sdxPreferenceDlgLargeBtns = '&Large Toolbar Buttons'; - sdxPreferenceDlgFlatBtns = '&Flat Toolbar Buttons'; - sdxPreferenceDlgMarginsColor = 'Margins &Color:'; - sdxPreferenceDlgMeasurementUnits = 'Measurement &Units:'; - sdxPreferenceDlgSaveForRunTimeToo = 'Save for &RunTime too'; - sdxPreferenceDlgZoomScroll = '&Zoom on roll with IntelliMouse'; - sdxPreferenceDlgZoomStep = 'Zoom Ste&p:'; - - { Page Setup } - - sdxCloneStyleCaptionPrefix = 'Copy (%d) of '; - sdxInvalideStyleCaption = 'The style name "%s" already exists. Please supply another name.'; - - sdxPageSetupCaption = 'Page Setup'; - sdxStyleName = 'Style &Name:'; - - sdxPage = '&Page'; - sdxMargins = '&Margins'; - sdxHeaderFooter = '&Header\Footer'; - sdxScaling = '&Scaling'; - - sdxPaper = ' Paper '; - sdxPaperType = 'T&ype'; - sdxPaperDimension = 'Dimension'; - sdxPaperWidth = '&Width:'; - sdxPaperHeight = 'H&eight:'; - sdxPaperSource = 'Paper so&urce'; - - sdxOrientation = ' Orientation '; - sdxPortrait = 'P&ortrait'; - sdxLandscape = '&Landscape'; - sdxPrintOrder = ' Print Order '; - sdxDownThenOver = '&Down, then over'; - sdxOverThenDown = 'O&ver, then down'; - sdxShading = ' Shading '; - sdxPrintUsingGrayShading = 'Print using &gray shading'; - - sdxCenterOnPage = 'Center on page'; - sdxHorizontally = 'Hori&zontally'; - sdxVertically = '&Vertically'; - - sdxHeader = 'Header '; - sdxBtnHeaderFont = '&Font...'; - sdxBtnHeaderBackground = '&Background'; - sdxFooter = 'Footer '; - sdxBtnFooterFont = 'Fo&nt...'; - sdxBtnFooterBackground = 'Back&ground'; - - sdxTop = '&Top:'; - sdxLeft = '&Left:'; - sdxRight = 'Ri&ght:'; - sdxBottom = '&Bottom:'; - sdxHeader2 = 'H&eader:'; - sdxFooter2 = 'Foote&r:'; - - sdxAlignment = 'Alignment'; - sdxVertAlignment = ' Vertical Alignment '; - sdxReverseOnEvenPages = '&Reverse on even pages'; - - sdxAdjustTo = '&Adjust To:'; - sdxFitTo = '&Fit To:'; - sdxPercentOfNormalSize = '% normal size'; - sdxPagesWideBy = 'page(s) &wide by'; - sdxTall = '&tall'; - - sdxOf = 'Of'; - sdxLastPrinted = 'Last Printed '; - sdxFileName = 'Filename '; - sdxFileNameAndPath = 'Filename and path '; - sdxPrintedBy = 'Printed By '; - sdxPrintedOn = 'Printed On '; - sdxCreatedBy = 'Created By '; - sdxCreatedOn = 'Created On '; - sdxConfidential = 'Confidential'; - - { HF function } - - sdxHFFunctionNameUnknown = 'Unknown'; - sdxHFFunctionNamePageNumber = 'Page Number'; - sdxHFFunctionNameTotalPages = 'Total Pages'; - sdxHFFunctionNamePageOfPages = 'Page # of Pages #'; - sdxHFFunctionNameDateTime = 'Date and Time'; - sdxHFFunctionNameDate = 'Date'; - sdxHFFunctionNameTime = 'Time'; - sdxHFFunctionNameUserName = 'User Name'; - sdxHFFunctionNameMachineName = 'Machine Name'; - - sdxHFFunctionHintPageNumber = 'Page Number'; - sdxHFFunctionHintTotalPages = 'Total Pages'; - sdxHFFunctionHintPageOfPages = 'Page # of Pages #'; - sdxHFFunctionHintDateTime = 'Date and Time Printed'; - sdxHFFunctionHintDate = 'Date Printed'; - sdxHFFunctionHintTime = 'Time Printed'; - sdxHFFunctionHintUserName = 'User Name'; - sdxHFFunctionHintMachineName = 'Machine Name'; - - sdxHFFunctionTemplatePageNumber = 'Page #'; - sdxHFFunctionTemplateTotalPages = 'Total Pages'; - sdxHFFunctionTemplatePageOfPages = 'Page # of Pages #'; - sdxHFFunctionTemplateDateTime = 'Date & Time Printed'; - sdxHFFunctionTemplateDate = 'Date Printed'; - sdxHFFunctionTemplateTime = 'Time Printed'; - sdxHFFunctionTemplateUserName = 'User Name'; - sdxHFFunctionTemplateMachineName = 'Machine Name'; - - { Designer strings } - - { Months } - - sdxJanuary = 'January'; - sdxFebruary = 'February'; - sdxMarch = 'March'; - sdxApril = 'April'; - sdxMay = 'May'; - sdxJune = 'June'; - sdxJuly = 'July'; - sdxAugust = 'August'; - sdxSeptember = 'September'; - sdxOctober = 'October'; - sdxNovember = 'November'; - sdxDecember = 'December'; - - sdxEast = 'East'; - sdxWest = 'West'; - sdxSouth = 'South'; - sdxNorth = 'North'; - - sdxTotal = 'Total'; - - { dxFlowChart } - - sdxPlan = 'Plan'; - sdxSwimmingPool = 'Swimming-pool'; - sdxAdministration = 'Administration'; - sdxPark = 'Park'; - sdxCarParking = 'Car-Parking'; - - { dxOrgChart } - - sdxCorporateHeadquarters = 'Corporate' + #13#10 + 'Headquarters'; - sdxSalesAndMarketing = 'Sales and' + #13#10 + 'Marketing'; - sdxEngineering = 'Engineering'; - sdxFieldOfficeCanada = 'Field Office:' + #13#10 + 'Canada'; - - { dxMasterView } - - sdxOrderNoCaption = 'OrderNo'; - sdxNameCaption = 'Name'; - sdxCountCaption = 'Count'; - sdxCompanyCaption = 'Company'; - sdxAddressCaption = 'Address'; - sdxPriceCaption = 'Price'; - sdxCashCaption = 'Cash'; - - sdxName1 = 'Jennie Valentine'; - sdxName2 = 'Sam Hill'; - sdxCompany1 = 'Jennie Inc.'; - sdxCompany2 = 'Daimler-Chrysler AG'; - sdxAddress1 = '123 Home Lane'; - sdxAddress2 = '9333 Holmes Dr.'; - - { dxTreeList } - - sdxCountIs = 'Count is: %d'; - sdxRegular = 'Regular'; - sdxIrregular = 'Irregular'; - - sdxTLBand = 'Item Data'; - sdxTLColumnName = 'Name'; - sdxTLColumnAxisymmetric = 'Axisymmetric'; - sdxTLColumnItemShape = 'Shape'; - - sdxItemShapeAsText = '(Graphic)'; - - sdxItem1Name = 'Cylinder'; - sdxItem2Name = 'Cone'; - sdxItem3Name = 'Pyramid'; - sdxItem4Name = 'Box'; - sdxItem5Name = 'Free Surface'; - - sdxItem1Description = ''; - sdxItem2Description = 'Axisymmetric geometry figure'; - sdxItem3Description = 'Axisymmetric geometry figure'; - sdxItem4Description = 'Acute-angled geometry figure'; - sdxItem5Description = ''; - sdxItem6Description = ''; - sdxItem7Description = 'Simple extrusion surface'; - - { PS 2.3 } - - { Patterns common } - - sdxPatternIsNotRegistered = 'Pattern "%s" is not registered'; - - { Excel edge patterns } - - sdxSolidEdgePattern = 'Solid'; - sdxThinSolidEdgePattern = 'Medium Solid'; - sdxMediumSolidEdgePattern = 'Medium Solid'; - sdxThickSolidEdgePattern = 'Thick Solid'; - sdxDottedEdgePattern = 'Dotted'; - sdxDashedEdgePattern = 'Dashed'; - sdxDashDotDotEdgePattern = 'Dash Dot Dot'; - sdxDashDotEdgePattern = 'Dash Dot'; - sdxSlantedDashDotEdgePattern = 'Slanted Dash Dot'; - sdxMediumDashDotDotEdgePattern = 'Medium Dash Dot Dot'; - sdxHairEdgePattern = 'Hair'; - sdxMediumDashDotEdgePattern = 'Medium Dash Dot'; - sdxMediumDashedEdgePattern = 'Medium Dashed'; - sdxDoubleLineEdgePattern = 'Double Line'; - - { Excel fill patterns names} - - sdxSolidFillPattern = 'Solid'; - sdxGray75FillPattern = '75% Gray'; - sdxGray50FillPattern = '50% Gray'; - sdxGray25FillPattern = '25% Gray'; - sdxGray125FillPattern = '12.5% Gray'; - sdxGray625FillPattern = '6.25% Gray'; - sdxHorizontalStripeFillPattern = 'Horizontal Stripe'; - sdxVerticalStripeFillPattern = 'Vertical Stripe'; - sdxReverseDiagonalStripeFillPattern = 'Reverse Diagonal Stripe'; - sdxDiagonalStripeFillPattern = 'Diagonal Stripe'; - sdxDiagonalCrossHatchFillPattern = 'Diagonal Cross Hatch'; - sdxThickCrossHatchFillPattern = 'Thick Cross Hatch'; - sdxThinHorizontalStripeFillPattern = 'Thin Horizontal Stripe'; - sdxThinVerticalStripeFillPattern = 'Thin Vertical Stripe'; - sdxThinReverseDiagonalStripeFillPattern = 'Thin Reverse Diagonal Stripe'; - sdxThinDiagonalStripeFillPattern = 'Thin Diagonal Stripe'; - sdxThinHorizontalCrossHatchFillPattern = 'Thin Horizontal Cross Hatch'; - sdxThinDiagonalCrossHatchFillPattern = 'Thin Diagonal Cross Hatch'; - - { cxSpreadSheet } - - sdxShowRowAndColumnHeadings = '&Row and Column Headings'; - sdxShowGridLines = 'GridLines'; - sdxSuppressSourceFormats = '&Suppress Source Formats'; - sdxRepeatHeaderRowAtTop = 'Repeat Header Row at Top'; - sdxDataToPrintDoesNotExist = - 'Cannot activate ReportLink because PrintingSystem did not find anything to print.'; - - { Designer strings } - - { Short names of month } - - sdxJanuaryShort = 'Jan'; - sdxFebruaryShort = 'Feb'; - sdxMarchShort = 'March'; - sdxAprilShort = 'April'; - sdxMayShort = 'May'; - sdxJuneShort = 'June'; - sdxJulyShort = 'July'; - sdxAugustShort = 'Aug'; - sdxSeptemberShort = 'Sept'; - sdxOctoberShort = 'Oct'; - sdxNovemberShort = 'Nov'; - sdxDecemberShort = 'Dec'; - - { TreeView } - - sdxTechnicalDepartment = 'Technical Department'; - sdxSoftwareDepartment = 'Software Department'; - sdxSystemProgrammers = 'Core Developers'; - sdxEndUserProgrammers = 'GUI Developers'; - sdxBetaTesters = 'Beta Testers'; - sdxHumanResourceDepartment = 'Human Resource Department'; - - { misc. } - - sdxTreeLines = '&TreeLines'; - sdxTreeLinesColor = 'T&ree Line Color:'; - sdxExpandButtons = 'E&xpand Buttons'; - sdxCheckMarks = 'Check Marks'; - sdxTreeEffects = 'Tree Effects'; - sdxAppearance = 'Appearance'; - - { Designer previews } - - { Localize if you want (they are used inside FormatReport dialog -> ReportPreview) } - - sdxCarLevelCaption = 'Cars'; - - sdxManufacturerBandCaption = 'Manufacturer Data'; - sdxModelBandCaption = 'Car Data'; - - sdxManufacturerNameColumnCaption = 'Name'; - sdxManufacturerLogoColumnCaption = 'Logo'; - sdxManufacturerCountryColumnCaption = 'Country'; - sdxCarModelColumnCaption = 'Model'; - sdxCarIsSUVColumnCaption = 'SUV'; - sdxCarPhotoColumnCaption = 'Photo'; - - sdxCarManufacturerName1 = 'BMW'; - sdxCarManufacturerName2 = 'Ford'; - sdxCarManufacturerName3 = 'Audi'; - sdxCarManufacturerName4 = 'Land Rover'; - - sdxCarManufacturerCountry1 = 'Germany'; - sdxCarManufacturerCountry2 = 'United States'; - sdxCarManufacturerCountry3 = 'Germany'; - sdxCarManufacturerCountry4 = 'United Kingdom'; - - sdxCarModel1 = 'X5 4.8is'; - sdxCarModel2 = 'Excursion'; - sdxCarModel3 = 'S8 Quattro'; - sdxCarModel4 = 'G4 Challenge'; - - sdxTrue = 'True'; - sdxFalse = 'False'; - - { PS 2.4 } - - { dxPrnDev.pas } - - sdxAuto = 'Auto'; - sdxCustom = 'Custom'; - sdxEnv = 'Env'; - - { Grid 4 } - - sdxLookAndFeelFlat = 'Flat'; - sdxLookAndFeelStandard = 'Standard'; - sdxLookAndFeelUltraFlat = 'UltraFlat'; - - sdxViewTab = 'View'; - sdxBehaviorsTab = 'Behaviors'; - sdxPreviewTab = 'Preview'; - sdxCardsTab = 'Cards'; - - sdxFormatting = 'Formatting'; - sdxLookAndFeel = 'Look and Feel'; - sdxLevelCaption = '&Caption'; - sdxFilterBar = '&Filter Bar'; - sdxRefinements = 'Refinements'; - sdxProcessSelection = 'Process &Selection'; - sdxProcessExactSelection = 'Process E&xact Selection'; - sdxExpanding = 'Expanding'; - sdxGroups = '&Groups'; - sdxDetails = '&Details'; - sdxStartFromActiveDetails = 'Start from Active Details'; - sdxOnlyActiveDetails = 'Only Active Details'; - sdxVisible = '&Visible'; - sdxPreviewAutoHeight = 'A&uto Height'; - sdxPreviewMaxLineCount = '&Max Line Count: '; - sdxSizes = 'Sizes'; - sdxKeepSameWidth = '&Keep Same Width'; - sdxKeepSameHeight = 'Keep Same &Height'; - sdxFraming = 'Framing'; - sdxSpacing = 'Spacing'; - sdxShadow = 'Shadow'; - sdxDepth = '&Depth:'; - sdxPosition = '&Position'; - sdxPositioning = 'Positioning'; - sdxHorizontal = 'H&orizontal:'; - sdxVertical = 'V&ertical:'; - - sdxSummaryFormat = 'Count = 0'; - - sdxCannotUseOnEveryPageMode = - 'Cannot Use OnEveryPage Mode'+ #13#10 + - #13#10 + - 'You should or(and)' + #13#10 + - ' - Collapse all Master Records' + #13#10 + - ' - Toggle "Unwrap" Option off on "Behaviors" Tab'; - - sdxIncorrectBandHeadersState = - 'Cannot Use BandHeaders OnEveryPage Mode' + #13#10 + - #13#10 + - 'You should either:' + #13#10 + - ' - Set Caption OnEveryPage Option On' + #13#10 + - ' - Set Caption Visible Option Off'; - sdxIncorrectHeadersState = - 'Cannot Use Headers OnEveryPage Mode' + #13#10 + - #13#10 + - 'You should either:' + #13#10 + - ' - Set Caption and Band OnEveryPage Option On' + #13#10 + - ' - Set Caption and Band Visible Option Off'; - sdxIncorrectFootersState = - 'Cannot Use Footers OnEveryPage Mode' + #13#10 + - #13#10 + - 'You should either:' + #13#10 + - ' - Set FilterBar OnEveryPage Option On' + #13#10 + - ' - Set FilterBar Visible Option Off'; - - sdxCharts = 'Charts'; - - { PS 3 } - - sdxTPicture = 'TPicture'; - sdxCopy = '&Copy'; - sdxSave = '&Save...'; - sdxBaseStyle = 'Base Style'; - - sdxComponentAlreadyExists = 'Component named "%s" already exists'; - sdxInvalidComponentName = '"%s" is not a valid component name'; - - { shapes } - - sdxRectangle = 'Rectangle'; - sdxSquare = 'Square'; - sdxEllipse = 'Ellipse'; - sdxCircle = 'Circle'; - sdxRoundRect = 'RoundRect'; - sdxRoundSquare = 'RoundSquare'; - - { standard pattern names} - - sdxHorizontalFillPattern = 'Horizontal'; - sdxVerticalFillPattern = 'Vertical'; - sdxFDiagonalFillPattern = 'FDiagonal'; - sdxBDiagonalFillPattern = 'BDiagonal'; - sdxCrossFillPattern = 'Cross'; - sdxDiagCrossFillPattern = 'DiagCros'; - - { explorer } - - sdxCyclicIDReferences = 'Cyclic ID references %s and %s'; - sdxLoadReportDataToFileTitle = 'Load Report'; - sdxSaveReportDataToFileTitle = 'Save Report As'; - sdxInvalidExternalStorage = 'Invalid External Storage'; - sdxLinkIsNotIncludedInUsesClause = - 'ReportFile contains ReportLink "%0:s"' + #13#10 + - 'Unit with declaration of "%0:s" must be included in uses clause'; - sdxInvalidStorageVersion = 'Invalid Storage Verison: %d'; - sdxPSReportFiles = 'Report Files'; - sdxReportFileLoadError = - 'Cannot load Report File "%s".' + #13#10 + - 'File is corrupted or is locked by another User or Application.' + #13#10 + - #13#10 + - 'Original Report will be restored.'; - - sdxNone = '(None)'; - sdxReportDocumentIsCorrupted = '(File is not a ReportDocument or Corrupted)'; - - sdxCloseExplorerHint = 'Close Explorer'; - sdxExplorerCaption = 'Explorer'; - sdxExplorerRootFolderCaption = 'Root'; - sdxNewExplorerFolderItem = 'New Folder'; - sdxCopyOfItem = 'Copy of '; - sdxReportExplorer = 'Report Explorer'; - - sdxDataLoadErrorText = 'Cannot load Report Data'; - sdxDBBasedExplorerItemDataLoadError = - 'Cannot load Report Data.' + #13#10 + - 'Data are corrupted or are locked'; - sdxFileBasedExplorerItemDataLoadError = - 'Cannot load Report Data.' + #13#10 + - 'File is corruted or is locked by another User or Application'; - sdxDeleteNonEmptyFolderMessageText = 'Folder "%s" is not Empty. Delete anyway?'; - sdxDeleteFolderMessageText = 'Delete Folder "%s" ?'; - sdxDeleteItemMessageText = 'Delete Item "%s" ?'; - sdxCannotRenameFolderText = 'Cannot rename folder "%s". A folder with name "%s" already exists. Specify a different name.'; - sdxCannotRenameItemText = 'Cannot rename item "%s". An item with name "%s" already exists. Specify a different name.'; - sdxOverwriteFolderMessageText = - 'This folder "%s" already contains folder named "%s".' + #13#10 + - #13#10 + - 'If the items in existing folder have the same name as items in the' + #13#10 + - 'folder you are moving or copying, they will be replaced. Do you still?' + #13#10 + - 'want to move or copy the folder?'; - sdxOverwriteItemMessageText = - 'This Folder "%s" already contains item named "%s".' + #13#10 + - #13#10 + - 'Would you like to overwrite existing item?'; - sdxSelectNewRoot = 'Select new Root Directory where the Reports will be stored'; - sdxInvalidFolderName = 'Invalid Folder Name "%s"'; - sdxInvalidReportName = 'Invalid Report Name "%s"'; - - sdxExplorerBar = 'Explorer'; - - sdxMenuFileSave = '&Save'; - sdxMenuFileSaveAs = 'Save &As...'; - sdxMenuFileLoad = '&Load'; - sdxMenuFileClose = 'U&nload'; - sdxHintFileSave = 'Save Report'; - sdxHintFileSaveAs = 'Save Report As'; - sdxHintFileLoad = 'Load Report'; - sdxHintFileClose = 'Unload Report'; - - sdxMenuExplorer = 'E&xplorer'; - sdxMenuExplorerCreateFolder = 'Create &Folder'; - sdxMenuExplorerDelete = '&Delete...'; - sdxMenuExplorerRename = 'Rena&me'; - sdxMenuExplorerProperties = '&Properties...'; - sdxMenuExplorerRefresh = 'Refresh'; - sdxMenuExplorerChangeRootPath = 'Change Root...'; - sdxMenuExplorerSetAsRoot = 'Set As Root'; - sdxMenuExplorerGoToUpOneLevel = 'Up One Level'; - - sdxHintExplorerCreateFolder = 'Create New Folder'; - sdxHintExplorerDelete = 'Delete'; - sdxHintExplorerRename = 'Rename'; - sdxHintExplorerProperties = 'Properties'; - sdxHintExplorerRefresh = 'Refresh'; - sdxHintExplorerChangeRootPath = 'Change Root'; - sdxHintExplorerSetAsRoot = 'Set Current Folder as Root'; - sdxHintExplorerGoToUpOneLevel = 'Up One Level'; - - sdxMenuViewExplorer = 'E&xplorer'; - sdxHintViewExplorer = 'Show Explorer'; - - sdxSummary = 'Summary'; - sdxCreator = 'Creato&r:'; - sdxCreationDate = 'Create&d:'; - - sdxMenuViewThumbnails = 'Th&umbnails'; - sdxMenuThumbnailsLarge = '&Large Thumbnails'; - sdxMenuThumbnailsSmall = '&Small Thumbnails'; - - sdxHintViewThumbnails = 'Show Thumbnails'; - sdxHintThumbnailsLarge = 'Switch to large thumbnails'; - sdxHintThumbnailsSmall = 'Switch to small thumbnails'; - - sdxMenuFormatTitle = 'T&itle...'; - sdxHintFormatTitle = 'Format Report Title'; - - sdxHalf = 'Half'; - sdxPredefinedFunctions = ' Predefined Functions '; // dxPgsDlg.pas - sdxZoomParameters = ' Zoom &Parameters '; // dxPSPrvwOpt.pas - - sdxWrapData = '&Wrap Data'; - - sdxMenuShortcutExplorer = 'Explorer'; - sdxExplorerToolBar = 'Explorer'; - - sdxMenuShortcutThumbnails = 'Thumbnails'; - - { TreeView New} - - sdxButtons = 'Buttons'; - - { ListView } - - sdxBtnHeadersFont = '&Headers Font...'; - sdxHeadersTransparent = 'Transparent &Headers'; - sdxHintListViewDesignerMessage = ' Most Options Are Being Taken Into Account Only In Detailed View'; - sdxColumnHeaders = '&Column Headers'; - - { Group LookAndFeel Names } - - sdxReportGroupNullLookAndFeel = 'Null'; - sdxReportGroupStandardLookAndFeel = 'Standard'; - sdxReportGroupOfficeLookAndFeel = 'Office'; - sdxReportGroupWebLookAndFeel = 'Web'; - - sdxLayoutGroupDefaultCaption = 'Layout Group'; - sdxLayoutItemDefaultCaption = 'Layout Item'; - - { Designer Previews} - - { Localize if you want (they are used inside FormatReport dialog -> ReportPreview) } - - sdxCarManufacturerName5 = 'DaimlerChrysler AG'; - sdxCarManufacturerCountry5 = 'Germany'; - sdxCarModel5 = 'Maybach 62'; - - sdxLuxurySedans = 'Luxury Sedans'; - sdxCarManufacturer = 'Manufacturer'; - sdxCarModel = 'Model'; - sdxCarEngine = 'Engine'; - sdxCarTransmission = 'Transmission'; - sdxCarTires = 'Tires'; - sdx760V12Manufacturer = 'BMW'; - sdx760V12Model = '760Li V12'; - sdx760V12Engine = '6.0L DOHC V12 438 HP 48V DI Valvetronic 12-cylinder engine with 6.0-liter displacement, dual overhead cam valvetrain'; - sdx760V12Transmission = 'Elec 6-Speed Automatic w/Steptronic'; - sdx760V12Tires = 'P245/45R19 Fr - P275/40R19 Rr Performance. Low Profile tires with 245mm width, 19.0" rim'; - - { Styles } - - sdxBandBackgroundStyle = 'BandBackground'; - sdxBandHeaderStyle = 'BandHeader'; - sdxCaptionStyle = 'Caption'; - sdxCardCaptionRowStyle = 'Card Caption Row'; - sdxCardRowCaptionStyle = 'Card Row Caption'; - sdxCategoryStyle = 'Category'; - sdxContentStyle = 'Content'; - sdxContentEvenStyle = 'Content Even Rows'; - sdxContentOddStyle = 'Content Odd Rows'; - sdxFilterBarStyle = 'Filter Bar'; - sdxFooterStyle = 'Footer'; - sdxFooterRowStyle = 'Footer Row'; - sdxGroupStyle = 'Group'; - sdxHeaderStyle = 'Header'; - sdxIndentStyle = 'Indent'; - sdxPreviewStyle = 'Preview'; - sdxSelectionStyle = 'Selection'; - - sdxStyles = 'Styles'; - sdxStyleSheets = 'Style Sheets'; - sdxBtnTexture = '&Texture...'; - sdxBtnTextureClear = 'Cl&ear'; - sdxBtnColor = 'Co&lor...'; - sdxBtnSaveAs = 'Save &As...'; - sdxBtnRename = '&Rename...'; - - sdxLoadBitmapDlgTitle = 'Load Texture'; - - sdxDeleteStyleSheet = 'Delete StyleSheet Named "%s"?'; - sdxUnnamedStyleSheet = 'Unnamed'; - sdxCreateNewStyleQueryNamePrompt = 'Enter New StyleSheet Name: '; - sdxStyleSheetNameAlreadyExists = 'StyleSheet named "%s" Already Exists'; - - sdxCannotLoadImage = 'Cannot Load Image "%s"'; - sdxUseNativeStyles = '&Use Native Styles'; - sdxSuppressBackgroundBitmaps = '&Suppress Background Textures'; - sdxConsumeSelectionStyle = 'Consume Selection Style'; - - { Grid4 new } - - sdxSize = 'Size'; - sdxLevels = 'Levels'; - sdxUnwrap = '&Unwrap'; - sdxUnwrapTopLevel = 'Un&wrap Top Level'; - sdxRiseActiveToTop = 'Rise Active Level onto Top'; - sdxCannotUseOnEveryPageModeInAggregatedState = - 'Cannot Use OnEveryPage Mode'+ #13#10 + - 'While Performing in Aggregated State'; - - sdxPagination = 'Pagination'; - sdxByBands = 'By Bands'; - sdxByColumns = 'By Columns'; - sdxByRows = 'By &Rows'; - sdxByTopLevelGroups = 'By TopLevel Groups'; - sdxOneGroupPerPage = 'One Group Per Page'; - - sdxSkipEmptyViews = 'Skip Empty Views'; - - {* For those who will translate *} - {* You should also check "sdxCannotUseOnEveryPageMode" resource string - see above *} - {* It was changed to "- Toggle "Unwrap" Option off on "Behaviors" Tab"*} - - { TL 4 } - sdxBorders = 'Borders'; - sdxExplicitlyExpandNodes = 'Explicitly Expand Nodes'; - sdxNodes = '&Nodes'; - sdxSeparators = 'Separators'; - sdxThickness = 'Thickness'; - sdxTLIncorrectHeadersState = - 'Cannot Use Headers OnEveryPage Mode' + #13#10 + - #13#10 + - 'You should either:' + #13#10 + - ' - Set Band OnEveryPage Option On' + #13#10 + - ' - Set Band Visible Option Off'; - - { cxVerticalGrid } - - sdxRows = '&Rows'; - - sdxMultipleRecords = '&Multiple Records'; - sdxBestFit = '&Best Fit'; - sdxKeepSameRecordWidths = '&Keep Same Record Widths'; - sdxWrapRecords = '&Wrap Records'; - - sdxByWrapping = 'By &Wrapping'; - sdxOneWrappingPerPage = '&One Wrapping Per Page'; - - {new in 3.01} - sdxCurrentRecord = 'Current Record'; - sdxLoadedRecords = 'Loaded Records'; - sdxAllRecords = 'All Records'; - - { Container Designer } - - sdxPaginateByControlDetails = 'Control Details'; - sdxPaginateByControls = 'Controls'; - sdxPaginateByGroups = 'Groups'; - sdxPaginateByItems = 'Items'; - - sdxControlsPlace = 'Controls Place'; - sdxExpandHeight = 'Expand Height'; - sdxExpandWidth = 'Expand Width'; - sdxShrinkHeight = 'Shrink Height'; - sdxShrinkWidth = 'Shrink Width'; - - sdxCheckAll = 'Check &All'; - sdxCheckAllChildren = 'Check All &Children'; - sdxControlsTab = 'Controls'; - sdxExpandAll = 'E&xpand All'; - sdxHiddenControlsTab = 'Hidden Controls'; - sdxReportLinksTab = 'Aggregated Designers'; - sdxAvailableLinks = '&Available Links:'; - sdxAggregatedLinks = 'A&ggregated Links:'; - sdxTransparents = 'Transparents'; - sdxUncheckAllChildren = 'Uncheck &All Children'; - - sdxRoot = '&Root'; - sdxRootBorders = 'Root &Borders'; - sdxControls = '&Controls'; - sdxContainers = 'C&ontainers'; - - sdxHideCustomContainers = '&Hide Custom Containers'; - - { General } - - // FileSize abbreviation - - sdxBytes = 'Bytes'; - sdxKiloBytes = 'KB'; - sdxMegaBytes = 'MB'; - sdxGigaBytes = 'GB'; - - // Misc. - - sdxThereIsNoPictureToDisplay = 'There is no picture to display'; - sdxInvalidRootDirectory = 'Directory "%s" does not exists. Continue selection ?'; - sdxPressEscToCancel = 'Press Esc to cancel'; - sdxMenuFileRebuild = '&Rebuild'; - sdxBuildingReportStatusText = 'Building report - Press Esc to cancel'; - sdxPrintingReportStatusText = 'Printing report - Press Esc to cancel'; - - sdxBuiltIn = '[BuiltIn]'; - sdxUserDefined = '[User Defined]'; - sdxNewStyleRepositoryWasCreated = 'New StyleRepository "%s" was created and assigned'; - - { new in PS 3.1} - sdxLineSpacing = '&Line spacing:'; - sdxTextAlignJustified = 'Justified'; - sdxSampleText = 'Sample Text Sample Text'; - - sdxCardsRows = '&Cards'; - sdxTransparentRichEdits = 'Transparent &RichEdit Content'; - - sdxIncorrectFilterBarState = - 'Cannot Use FilterBar OnEveryPage Mode' + #13#10 + - #13#10 + - 'You should either:' + #13#10 + - ' - Set Caption OnEveryPage Option On' + #13#10 + - ' - Set Caption Visible Option Off'; - sdxIncorrectBandHeadersState2 = - 'Cannot Use BandHeaders OnEveryPage Mode' + #13#10 + - #13#10 + - 'You should either:' + #13#10 + - ' - Set Caption and FilterBar OnEveryPage Option On' + #13#10 + - ' - Set Caption and FilterBar Visible Option Off'; - sdxIncorrectHeadersState2 = - 'Cannot Use Headers OnEveryPage Mode' + #13#10 + - #13#10 + - 'You should either:' + #13#10 + - ' - Set Caption, FilterBar and Band OnEveryPage Option On' + #13#10 + - ' - Set Caption, FilterBar and Band Visible Option Off'; - - { new in PS 3.2} - sdxAvailableReportLinks = 'Available ReportLinks'; - sdxBtnRemoveInconsistents = 'Remove Unneeded'; - sdxColumnHeadersOnEveryPage = 'Column &Headers'; - - { Scheduler } - - sdxNotes = 'Notes'; - sdxTaskPad = 'TaskPad'; - sdxPrimaryTimeZone = 'Primary'; - sdxSecondaryTimeZone = 'Secondary'; - - sdxDay = 'Day'; - sdxWeek = 'Week'; - sdxMonth = 'Month'; - - sdxSchedulerSchedulerHeader = 'Scheduler Header'; - sdxSchedulerContent = 'Content'; - sdxSchedulerDateNavigatorContent = 'DateNavigator Content'; - sdxSchedulerDateNavigatorHeader = 'DateNavigator Header'; - sdxSchedulerDayHeader = 'Day Header'; - sdxSchedulerEvent = 'Event'; - sdxSchedulerResourceHeader = 'Resource Header'; - sdxSchedulerNotesAreaBlank = 'Notes Area (Blank)'; - sdxSchedulerNotesAreaLined = 'Notes Area (Lined)'; - sdxSchedulerTaskPad = 'TaskPad'; - sdxSchedulerTimeRuler = 'Time Ruler'; - - sdxPrintStyleNameDaily = 'Daily'; - sdxPrintStyleNameWeekly = 'Weekly'; - sdxPrintStyleNameMonthly = 'Monthly'; - sdxPrintStyleNameDetails = 'Details'; - sdxPrintStyleNameMemo = 'Memo'; - sdxPrintStyleNameTrifold = 'Trifold'; - - sdxPrintStyleCaptionDaily = 'Daily Style'; - sdxPrintStyleCaptionWeekly = 'Weekly Style'; - sdxPrintStyleCaptionMonthly = 'Monthly Style'; - sdxPrintStyleCaptionDetails = 'Calendar Details Style'; - sdxPrintStyleCaptionMemo = 'Memo Style'; - sdxPrintStyleCaptionTimeLine = 'TimeLine Style'; - sdxPrintStyleCaptionTrifold = 'Tri-fold Style'; - sdxPrintStyleCaptionYearly = 'Yearly Style'; - sdxPrintStyleShowEventImages = 'Show Event Images'; - sdxPrintStyleShowResourceImages = 'Show Resource Images'; - - sdxTabPrintStyles = 'Print Styles'; - - sdxPrintStyleDontPrintWeekEnds = '&Don''t Print Weekends'; - sdxPrintStyleWorkTimeOnly = '&Work Time Only'; - - sdxPrintStyleInclude = 'Include:'; - sdxPrintStyleIncludeTaskPad = 'Task&Pad'; - sdxPrintStyleIncludeNotesAreaBlank = 'Notes Area (&Blank)'; - sdxPrintStyleIncludeNotesAreaLined = 'Notes Area (&Lined)'; - sdxPrintStyleLayout = '&Layout:'; - sdxPrintStylePrintFrom = 'Print &From:'; - sdxPrintStylePrintTo = 'Print &To:'; - - sdxPrintStyleDailyLayout1PPD = '1 page/day'; - sdxPrintStyleDailyLayout2PPD = '2 pages/day'; - - sdxPrintStyleWeeklyArrange = '&Arrange:'; - sdxPrintStyleWeeklyArrangeT2B = 'Top to bottom'; - sdxPrintStyleWeeklyArrangeL2R = 'Left to right'; - sdxPrintStyleWeeklyLayout1PPW = '1 page/week'; - sdxPrintStyleWeeklyLayout2PPW = '2 pages/week'; - sdxPrintStyleWeeklyDaysLayout = '&Days layout:'; - sdxPrintStyleWeeklyDaysLayoutTC = 'Two columns'; - sdxPrintStyleWeeklyDaysLayoutOC = 'One column'; - - sdxPrintStyleMemoStartEachItemOnNewPage = 'Start Each Item On New Page'; - sdxPrintStyleMemoPrintOnlySelectedEvents = 'Print Only Selected Events'; - - sdxPrintStyleMonthlyLayout1PPM = '1 page/month'; - sdxPrintStyleMonthlyLayout2PPM = '2 pages/month'; - sdxPrintStyleMonthlyPrintExactly1MPP = 'Print &Exactly One Month Per Page'; - - sdxPrintStyleTrifoldSectionModeDailyCalendar = 'Daily Calendar'; - sdxPrintStyleTrifoldSectionModeWeeklyCalendar = 'Weekly Calendar'; - sdxPrintStyleTrifoldSectionModeMonthlyCalendar = 'Monthly Calendar'; - sdxPrintStyleTrifoldSectionModeTaskPad = 'TaskPad'; - sdxPrintStyleTrifoldSectionModeNotesBlank = 'Notes (Blank)'; - sdxPrintStyleTrifoldSectionModeNotesLined = 'Notes (Lined)'; - sdxPrintStyleTrifoldSectionLeft = '&Left Section:'; - sdxPrintStyleTrifoldSectionMiddle = '&Middle Section:'; - sdxPrintStyleTrifoldSectionRight = '&Right Section:'; - - sdxPrintStyleMonthPerPage = '&Months/Page:'; - sdxPrintStyleYearly1MPP = '1 month/page'; - sdxPrintStyleYearly2MPP = '2 months/page'; - sdxPrintStyleYearly3MPP = '3 months/page'; - sdxPrintStyleYearly4MPP = '4 months/page'; - sdxPrintStyleYearly6MPP = '6 months/page'; - sdxPrintStyleYearly12MPP = '12 months/page'; - - sdxPrintStylePrimaryPageScalesOnly = 'Primary Page Scales Only'; - sdxPrintStylePrimaryPageHeadersOnly = 'Primary Page Headers Only'; - - sdxPrintStyleDetailsStartNewPageEach = 'Start a New Page Each:'; - - sdxSuppressContentColoration = 'Suppress &Content Coloration'; - sdxOneResourcePerPage = 'One &Resource Per Page'; - - sdxPrintRanges = 'Print Ranges'; - sdxPrintRangeStart = '&Start:'; - sdxPrintRangeEnd = '&End:'; - sdxHideDetailsOfPrivateAppointments = '&Hide Details of Private Appointments'; - sdxResourceCountPerPage = '&Resources/Page:'; - - sdxSubjectLabelCaption = 'Subject:'; - sdxLocationLabelCaption = 'Location:'; - sdxStartLabelCaption = 'Start:'; - sdxFinishLabelCaption = 'End:'; - sdxShowTimeAsLabelCaption = 'Show Time As:'; - sdxRecurrenceLabelCaption = 'Recurrence:'; - sdxRecurrencePatternLabelCaption = 'Recurrence Pattern:'; - - //messages - sdxSeeAboveMessage = 'Please See Above'; - sdxAllDayMessage = 'All Day'; - sdxContinuedMessage = 'Continued'; - sdxShowTimeAsFreeMessage = 'Free'; - sdxShowTimeAsTentativeMessage = 'Tentative'; - sdxShowTimeAsOutOfOfficeMessage = 'Out of Office'; - - sdxRecurrenceNoneMessage = '(none)'; - scxRecurrenceDailyMessage = 'Daily'; - scxRecurrenceWeeklyMessage = 'Weekly'; - scxRecurrenceMonthlyMessage = 'Monthly'; - scxRecurrenceYearlyMessage = 'Yearly'; - - //error messages - sdxInconsistentTrifoldStyle = 'The Tri-fold style requires at least one calendar section. ' + - 'Select Daily, Weekly, or Monthly Calendar for one of section under Options.'; - sdxBadTimePrintRange = 'The hours to print are not valid. The start time must precede the end time.'; - sdxBadDatePrintRange = 'The date in the End box cannot be prior to the date in the Start box.'; - sdxCannotPrintNoSelectedItems = 'Cannot print unless an item is selected. Select an item, and then try to print again.'; - sdxCannotPrintNoItemsAvailable = 'No items available within the specified print range.'; - - { PivotGrid } - - sdxColumnFields = '&Column Fields'; - sdxDataFields = '&Data Fields'; - sdxFiterFields = '&Filter Fields'; - sdxPrefilter = '&Prefilter'; - sdxRowFields = '&Row Fields'; - - sdxAutoColumnsExpand = 'A&uto Columns Expand'; - sdxAutoRowsExpand = 'Auto &Rows Expand'; - - // styles - sdxPivotGridColumnHeader = 'Column Header'; - sdxPivotGridContent = 'Content'; - sdxPivotGridFieldHeader = 'Field Header'; - sdxPivotGridHeaderBackground = 'Header Background'; - sdxPivotGridRowHeader = 'Row Header'; - sdxPivotGridPrefilter = 'Prefilter'; - - // PivotPreview fields - sdxUnitPrice = 'Unit Price'; - sdxCarName = 'Car Name'; - sdxQuantity = 'Quantity'; - sdxPaymentAmount = 'Payment Amount'; - sdxPurchaseQuarter = 'Purchase Quarter'; - sdxPurchaseMonth = 'Purchase Month'; - sdxPaymentType = 'Payment Type'; - sdxCompanyName = 'Company Name'; - -implementation - -uses - dxCore; - -procedure AddResourceStringsPart1(AProduct: TdxProductResourceStrings); -begin - AProduct.Add('sdxBtnOK', @sdxBtnOK); - AProduct.Add('sdxBtnOKAccelerated', @sdxBtnOKAccelerated); - AProduct.Add('sdxBtnCancel', @sdxBtnCancel); - AProduct.Add('sdxBtnClose', @sdxBtnClose); - AProduct.Add('sdxBtnApply', @sdxBtnApply); - AProduct.Add('sdxBtnHelp', @sdxBtnHelp); - AProduct.Add('sdxBtnFix', @sdxBtnFix); - AProduct.Add('sdxBtnNew', @sdxBtnNew); - AProduct.Add('sdxBtnIgnore', @sdxBtnIgnore); - AProduct.Add('sdxBtnYes', @sdxBtnYes); - AProduct.Add('sdxBtnNo', @sdxBtnNo); - AProduct.Add('sdxBtnEdit', @sdxBtnEdit); - AProduct.Add('sdxBtnReset', @sdxBtnReset); - AProduct.Add('sdxBtnAdd', @sdxBtnAdd); - AProduct.Add('sdxBtnAddComposition', @sdxBtnAddComposition); - AProduct.Add('sdxBtnDefault', @sdxBtnDefault); - AProduct.Add('sdxBtnDelete', @sdxBtnDelete); - AProduct.Add('sdxBtnDescription', @sdxBtnDescription); - AProduct.Add('sdxBtnCopy', @sdxBtnCopy); - AProduct.Add('sdxBtnYesToAll', @sdxBtnYesToAll); - AProduct.Add('sdxBtnRestoreDefaults', @sdxBtnRestoreDefaults); - AProduct.Add('sdxBtnRestoreOriginal', @sdxBtnRestoreOriginal); - AProduct.Add('sdxBtnTitleProperties', @sdxBtnTitleProperties); - AProduct.Add('sdxBtnProperties', @sdxBtnProperties); - AProduct.Add('sdxBtnNetwork', @sdxBtnNetwork); - AProduct.Add('sdxBtnBrowse', @sdxBtnBrowse); - AProduct.Add('sdxBtnPageSetup', @sdxBtnPageSetup); - AProduct.Add('sdxBtnPrintPreview', @sdxBtnPrintPreview); - AProduct.Add('sdxBtnPreview', @sdxBtnPreview); - AProduct.Add('sdxBtnPrint', @sdxBtnPrint); - AProduct.Add('sdxBtnOptions', @sdxBtnOptions); - AProduct.Add('sdxBtnStyleOptions', @sdxBtnStyleOptions); - AProduct.Add('sdxBtnDefinePrintStyles', @sdxBtnDefinePrintStyles); - AProduct.Add('sdxBtnPrintStyles', @sdxBtnPrintStyles); - AProduct.Add('sdxBtnBackground', @sdxBtnBackground); - AProduct.Add('sdxBtnShowToolBar', @sdxBtnShowToolBar); - AProduct.Add('sdxBtnDesign', @sdxBtnDesign); - AProduct.Add('sdxBtnMoveUp', @sdxBtnMoveUp); - AProduct.Add('sdxBtnMoveDown', @sdxBtnMoveDown); - AProduct.Add('sdxBtnMoreColors', @sdxBtnMoreColors); - AProduct.Add('sdxBtnFillEffects', @sdxBtnFillEffects); - AProduct.Add('sdxBtnNoFill', @sdxBtnNoFill); - AProduct.Add('sdxBtnAutomatic', @sdxBtnAutomatic); - AProduct.Add('sdxBtnNone', @sdxBtnNone); - AProduct.Add('sdxBtnOtherTexture', @sdxBtnOtherTexture); - AProduct.Add('sdxBtnInvertColors', @sdxBtnInvertColors); - AProduct.Add('sdxBtnSelectPicture', @sdxBtnSelectPicture); - AProduct.Add('sdxEditReports', @sdxEditReports); - AProduct.Add('sdxComposition', @sdxComposition); - AProduct.Add('sdxReportTitleDlgCaption', @sdxReportTitleDlgCaption); - AProduct.Add('sdxMode', @sdxMode); - AProduct.Add('sdxText', @sdxText); - AProduct.Add('sdxProperties', @sdxProperties); - AProduct.Add('sdxAdjustOnScale', @sdxAdjustOnScale); - AProduct.Add('sdxTitleModeNone', @sdxTitleModeNone); - AProduct.Add('sdxTitleModeOnEveryTopPage', @sdxTitleModeOnEveryTopPage); - AProduct.Add('sdxTitleModeOnFirstPage', @sdxTitleModeOnFirstPage); - AProduct.Add('sdxEditDescription', @sdxEditDescription); - AProduct.Add('sdxRename', @sdxRename); - AProduct.Add('sdxSelectAll', @sdxSelectAll); - AProduct.Add('sdxAddReport', @sdxAddReport); - AProduct.Add('sdxAddAndDesignReport', @sdxAddAndDesignReport); - AProduct.Add('sdxNewCompositionCaption', @sdxNewCompositionCaption); - AProduct.Add('sdxName', @sdxName); - AProduct.Add('sdxCaption', @sdxCaption); - AProduct.Add('sdxAvailableSources', @sdxAvailableSources); - AProduct.Add('sdxOnlyComponentsInActiveForm', @sdxOnlyComponentsInActiveForm); - AProduct.Add('sdxOnlyComponentsWithoutLinks', @sdxOnlyComponentsWithoutLinks); - AProduct.Add('sdxItemName', @sdxItemName); - AProduct.Add('sdxItemDescription', @sdxItemDescription); - AProduct.Add('sdxConfirmDeleteItem', @sdxConfirmDeleteItem); - AProduct.Add('sdxAddItemsToComposition', @sdxAddItemsToComposition); - AProduct.Add('sdxHideAlreadyIncludedItems', @sdxHideAlreadyIncludedItems); - AProduct.Add('sdxAvailableItems', @sdxAvailableItems); - AProduct.Add('sdxItems', @sdxItems); - AProduct.Add('sdxEnable', @sdxEnable); - AProduct.Add('sdxOptions', @sdxOptions); - AProduct.Add('sdxShow', @sdxShow); - AProduct.Add('sdxPaintItemsGraphics', @sdxPaintItemsGraphics); - AProduct.Add('sdxDescription', @sdxDescription); - AProduct.Add('sdxNewReport', @sdxNewReport); - AProduct.Add('sdxOnlySelected', @sdxOnlySelected); - AProduct.Add('sdxExtendedSelect', @sdxExtendedSelect); - AProduct.Add('sdxIncludeFixed', @sdxIncludeFixed); - AProduct.Add('sdxFonts', @sdxFonts); - AProduct.Add('sdxBtnFont', @sdxBtnFont); - AProduct.Add('sdxBtnEvenFont', @sdxBtnEvenFont); - AProduct.Add('sdxBtnOddFont', @sdxBtnOddFont); - AProduct.Add('sdxBtnFixedFont', @sdxBtnFixedFont); - AProduct.Add('sdxBtnGroupFont', @sdxBtnGroupFont); - AProduct.Add('sdxBtnChangeFont', @sdxBtnChangeFont); - AProduct.Add('sdxFont', @sdxFont); - AProduct.Add('sdxOddFont', @sdxOddFont); - AProduct.Add('sdxEvenFont', @sdxEvenFont); - AProduct.Add('sdxPreviewFont', @sdxPreviewFont); - AProduct.Add('sdxCaptionNodeFont', @sdxCaptionNodeFont); - AProduct.Add('sdxGroupNodeFont', @sdxGroupNodeFont); - AProduct.Add('sdxGroupFooterFont', @sdxGroupFooterFont); - AProduct.Add('sdxHeaderFont', @sdxHeaderFont); - AProduct.Add('sdxFooterFont', @sdxFooterFont); - AProduct.Add('sdxBandFont', @sdxBandFont); - AProduct.Add('sdxTransparent', @sdxTransparent); - AProduct.Add('sdxFixedTransparent', @sdxFixedTransparent); - AProduct.Add('sdxCaptionTransparent', @sdxCaptionTransparent); - AProduct.Add('sdxGroupTransparent', @sdxGroupTransparent); - AProduct.Add('sdxGraphicAsTextValue', @sdxGraphicAsTextValue); - AProduct.Add('sdxColors', @sdxColors); - AProduct.Add('sdxColor', @sdxColor); - AProduct.Add('sdxOddColor', @sdxOddColor); - AProduct.Add('sdxEvenColor', @sdxEvenColor); - AProduct.Add('sdxPreviewColor', @sdxPreviewColor); - AProduct.Add('sdxBandColor', @sdxBandColor); - AProduct.Add('sdxLevelCaptionColor', @sdxLevelCaptionColor); - AProduct.Add('sdxHeaderColor', @sdxHeaderColor); - AProduct.Add('sdxGroupNodeColor', @sdxGroupNodeColor); - AProduct.Add('sdxGroupFooterColor', @sdxGroupFooterColor); - AProduct.Add('sdxFooterColor', @sdxFooterColor); - AProduct.Add('sdxFixedColor', @sdxFixedColor); - AProduct.Add('sdxGroupColor', @sdxGroupColor); - AProduct.Add('sdxCaptionColor', @sdxCaptionColor); - AProduct.Add('sdxGridLinesColor', @sdxGridLinesColor); - AProduct.Add('sdxBands', @sdxBands); - AProduct.Add('sdxLevelCaptions', @sdxLevelCaptions); - AProduct.Add('sdxHeaders', @sdxHeaders); - AProduct.Add('sdxFooters', @sdxFooters); - AProduct.Add('sdxGroupFooters', @sdxGroupFooters); - AProduct.Add('sdxPreview', @sdxPreview); - AProduct.Add('sdxPreviewLineCount', @sdxPreviewLineCount); - AProduct.Add('sdxAutoCalcPreviewLineCount', @sdxAutoCalcPreviewLineCount); - AProduct.Add('sdxGrid', @sdxGrid); - AProduct.Add('sdxNodesGrid', @sdxNodesGrid); - AProduct.Add('sdxGroupFooterGrid', @sdxGroupFooterGrid); - AProduct.Add('sdxStateImages', @sdxStateImages); - AProduct.Add('sdxImages', @sdxImages); - AProduct.Add('sdxTextAlign', @sdxTextAlign); - AProduct.Add('sdxTextAlignHorz', @sdxTextAlignHorz); - AProduct.Add('sdxTextAlignVert', @sdxTextAlignVert); - AProduct.Add('sdxTextAlignLeft', @sdxTextAlignLeft); - AProduct.Add('sdxTextAlignCenter', @sdxTextAlignCenter); - AProduct.Add('sdxTextAlignRight', @sdxTextAlignRight); - AProduct.Add('sdxTextAlignTop', @sdxTextAlignTop); - AProduct.Add('sdxTextAlignVCenter', @sdxTextAlignVCenter); - AProduct.Add('sdxTextAlignBottom', @sdxTextAlignBottom); - AProduct.Add('sdxBorderLines', @sdxBorderLines); - AProduct.Add('sdxHorzLines', @sdxHorzLines); - AProduct.Add('sdxVertLines', @sdxVertLines); - AProduct.Add('sdxFixedHorzLines', @sdxFixedHorzLines); - AProduct.Add('sdxFixedVertLines', @sdxFixedVertLines); - AProduct.Add('sdxFlatCheckMarks', @sdxFlatCheckMarks); - AProduct.Add('sdxCheckMarksAsText', @sdxCheckMarksAsText); - AProduct.Add('sdxRowAutoHeight', @sdxRowAutoHeight); - AProduct.Add('sdxEndEllipsis', @sdxEndEllipsis); - AProduct.Add('sdxDrawBorder', @sdxDrawBorder); - AProduct.Add('sdxFullExpand', @sdxFullExpand); - AProduct.Add('sdxBorderColor', @sdxBorderColor); - AProduct.Add('sdxAutoNodesExpand', @sdxAutoNodesExpand); - AProduct.Add('sdxExpandLevel', @sdxExpandLevel); - AProduct.Add('sdxFixedRowOnEveryPage', @sdxFixedRowOnEveryPage); - AProduct.Add('sdxDrawMode', @sdxDrawMode); - AProduct.Add('sdxDrawModeStrict', @sdxDrawModeStrict); - AProduct.Add('sdxDrawModeOddEven', @sdxDrawModeOddEven); - AProduct.Add('sdxDrawModeChess', @sdxDrawModeChess); - AProduct.Add('sdxDrawModeBorrow', @sdxDrawModeBorrow); - AProduct.Add('sdx3DEffects', @sdx3DEffects); - AProduct.Add('sdxUse3DEffects', @sdxUse3DEffects); - AProduct.Add('sdxSoft3D', @sdxSoft3D); - AProduct.Add('sdxBehaviors', @sdxBehaviors); - AProduct.Add('sdxMiscellaneous', @sdxMiscellaneous); - AProduct.Add('sdxOnEveryPage', @sdxOnEveryPage); - AProduct.Add('sdxNodeExpanding', @sdxNodeExpanding); - AProduct.Add('sdxSelection', @sdxSelection); - AProduct.Add('sdxNodeAutoHeight', @sdxNodeAutoHeight); - AProduct.Add('sdxTransparentGraphics', @sdxTransparentGraphics); - AProduct.Add('sdxAutoWidth', @sdxAutoWidth); - AProduct.Add('sdxDisplayGraphicsAsText', @sdxDisplayGraphicsAsText); - AProduct.Add('sdxTransparentColumnGraphics', @sdxTransparentColumnGraphics); - AProduct.Add('sdxBandsOnEveryPage', @sdxBandsOnEveryPage); - AProduct.Add('sdxHeadersOnEveryPage', @sdxHeadersOnEveryPage); - AProduct.Add('sdxFootersOnEveryPage', @sdxFootersOnEveryPage); - AProduct.Add('sdxGraphics', @sdxGraphics); - AProduct.Add('sdxOutOfResources', @sdxOutOfResources); - AProduct.Add('sdxFileAlreadyExists', @sdxFileAlreadyExists); - AProduct.Add('sdxConfirmOverWrite', @sdxConfirmOverWrite); - AProduct.Add('sdxInvalidFileName', @sdxInvalidFileName); - AProduct.Add('sdxRequiredFileName', @sdxRequiredFileName); - AProduct.Add('sdxOutsideMarginsMessage', @sdxOutsideMarginsMessage); - AProduct.Add('sdxOutsideMarginsMessage2', @sdxOutsideMarginsMessage2); - AProduct.Add('sdxInvalidMarginsMessage', @sdxInvalidMarginsMessage); - AProduct.Add('sdxInvalidMargins', @sdxInvalidMargins); - AProduct.Add('sdxOutsideMargins', @sdxOutsideMargins); - AProduct.Add('sdxThereAreNowItemsForShow', @sdxThereAreNowItemsForShow); - AProduct.Add('sdxPageBackground', @sdxPageBackground); - AProduct.Add('sdxPenColor', @sdxPenColor); - AProduct.Add('sdxFontColor', @sdxFontColor); - AProduct.Add('sdxBrushColor', @sdxBrushColor); - AProduct.Add('sdxHighLight', @sdxHighLight); - AProduct.Add('sdxColorBlack', @sdxColorBlack); - AProduct.Add('sdxColorDarkRed', @sdxColorDarkRed); - AProduct.Add('sdxColorRed', @sdxColorRed); - AProduct.Add('sdxColorPink', @sdxColorPink); - AProduct.Add('sdxColorRose', @sdxColorRose); - AProduct.Add('sdxColorBrown', @sdxColorBrown); - AProduct.Add('sdxColorOrange', @sdxColorOrange); - AProduct.Add('sdxColorLightOrange', @sdxColorLightOrange); - AProduct.Add('sdxColorGold', @sdxColorGold); - AProduct.Add('sdxColorTan', @sdxColorTan); - AProduct.Add('sdxColorOliveGreen', @sdxColorOliveGreen); - AProduct.Add('sdxColorDrakYellow', @sdxColorDrakYellow); - AProduct.Add('sdxColorLime', @sdxColorLime); - AProduct.Add('sdxColorYellow', @sdxColorYellow); - AProduct.Add('sdxColorLightYellow', @sdxColorLightYellow); - AProduct.Add('sdxColorDarkGreen', @sdxColorDarkGreen); - AProduct.Add('sdxColorGreen', @sdxColorGreen); - AProduct.Add('sdxColorSeaGreen', @sdxColorSeaGreen); - AProduct.Add('sdxColorBrighthGreen', @sdxColorBrighthGreen); - AProduct.Add('sdxColorLightGreen', @sdxColorLightGreen); - AProduct.Add('sdxColorDarkTeal', @sdxColorDarkTeal); - AProduct.Add('sdxColorTeal', @sdxColorTeal); - AProduct.Add('sdxColorAqua', @sdxColorAqua); - AProduct.Add('sdxColorTurquoise', @sdxColorTurquoise); - AProduct.Add('sdxColorLightTurquoise', @sdxColorLightTurquoise); - AProduct.Add('sdxColorDarkBlue', @sdxColorDarkBlue); - AProduct.Add('sdxColorBlue', @sdxColorBlue); - AProduct.Add('sdxColorLightBlue', @sdxColorLightBlue); - AProduct.Add('sdxColorSkyBlue', @sdxColorSkyBlue); - AProduct.Add('sdxColorPaleBlue', @sdxColorPaleBlue); - AProduct.Add('sdxColorIndigo', @sdxColorIndigo); - AProduct.Add('sdxColorBlueGray', @sdxColorBlueGray); - AProduct.Add('sdxColorViolet', @sdxColorViolet); - AProduct.Add('sdxColorPlum', @sdxColorPlum); - AProduct.Add('sdxColorLavender', @sdxColorLavender); - AProduct.Add('sdxColorGray80', @sdxColorGray80); - AProduct.Add('sdxColorGray50', @sdxColorGray50); - AProduct.Add('sdxColorGray40', @sdxColorGray40); - AProduct.Add('sdxColorGray25', @sdxColorGray25); - AProduct.Add('sdxColorWhite', @sdxColorWhite); - AProduct.Add('sdxTexture', @sdxTexture); - AProduct.Add('sdxPattern', @sdxPattern); - AProduct.Add('sdxPicture', @sdxPicture); - AProduct.Add('sdxForeground', @sdxForeground); - AProduct.Add('sdxBackground', @sdxBackground); - AProduct.Add('sdxSample', @sdxSample); - AProduct.Add('sdxFEFCaption', @sdxFEFCaption); - AProduct.Add('sdxPaintMode', @sdxPaintMode); - AProduct.Add('sdxPaintModeCenter', @sdxPaintModeCenter); - AProduct.Add('sdxPaintModeStretch', @sdxPaintModeStretch); - AProduct.Add('sdxPaintModeTile', @sdxPaintModeTile); - AProduct.Add('sdxPaintModeProportional', @sdxPaintModeProportional); - AProduct.Add('sdxPatternGray5', @sdxPatternGray5); - AProduct.Add('sdxPatternGray10', @sdxPatternGray10); - AProduct.Add('sdxPatternGray20', @sdxPatternGray20); - AProduct.Add('sdxPatternGray25', @sdxPatternGray25); - AProduct.Add('sdxPatternGray30', @sdxPatternGray30); - AProduct.Add('sdxPatternGray40', @sdxPatternGray40); - AProduct.Add('sdxPatternGray50', @sdxPatternGray50); - AProduct.Add('sdxPatternGray60', @sdxPatternGray60); - AProduct.Add('sdxPatternGray70', @sdxPatternGray70); - AProduct.Add('sdxPatternGray75', @sdxPatternGray75); - AProduct.Add('sdxPatternGray80', @sdxPatternGray80); - AProduct.Add('sdxPatternGray90', @sdxPatternGray90); - AProduct.Add('sdxPatternLightDownwardDiagonal', @sdxPatternLightDownwardDiagonal); - AProduct.Add('sdxPatternLightUpwardDiagonal', @sdxPatternLightUpwardDiagonal); - AProduct.Add('sdxPatternDarkDownwardDiagonal', @sdxPatternDarkDownwardDiagonal); - AProduct.Add('sdxPatternDarkUpwardDiagonal', @sdxPatternDarkUpwardDiagonal); - AProduct.Add('sdxPatternWideDownwardDiagonal', @sdxPatternWideDownwardDiagonal); - AProduct.Add('sdxPatternWideUpwardDiagonal', @sdxPatternWideUpwardDiagonal); - AProduct.Add('sdxPatternLightVertical', @sdxPatternLightVertical); - AProduct.Add('sdxPatternLightHorizontal', @sdxPatternLightHorizontal); - AProduct.Add('sdxPatternNarrowVertical', @sdxPatternNarrowVertical); - AProduct.Add('sdxPatternNarrowHorizontal', @sdxPatternNarrowHorizontal); - AProduct.Add('sdxPatternDarkVertical', @sdxPatternDarkVertical); - AProduct.Add('sdxPatternDarkHorizontal', @sdxPatternDarkHorizontal); - AProduct.Add('sdxPatternDashedDownward', @sdxPatternDashedDownward); - AProduct.Add('sdxPatternDashedUpward', @sdxPatternDashedUpward); - AProduct.Add('sdxPatternDashedVertical', @sdxPatternDashedVertical); - AProduct.Add('sdxPatternDashedHorizontal', @sdxPatternDashedHorizontal); - AProduct.Add('sdxPatternSmallConfetti', @sdxPatternSmallConfetti); - AProduct.Add('sdxPatternLargeConfetti', @sdxPatternLargeConfetti); - AProduct.Add('sdxPatternZigZag', @sdxPatternZigZag); - AProduct.Add('sdxPatternWave', @sdxPatternWave); - AProduct.Add('sdxPatternDiagonalBrick', @sdxPatternDiagonalBrick); - AProduct.Add('sdxPatternHorizantalBrick', @sdxPatternHorizantalBrick); - AProduct.Add('sdxPatternWeave', @sdxPatternWeave); - AProduct.Add('sdxPatternPlaid', @sdxPatternPlaid); - AProduct.Add('sdxPatternDivot', @sdxPatternDivot); - AProduct.Add('sdxPatternDottedGrid', @sdxPatternDottedGrid); - AProduct.Add('sdxPatternDottedDiamond', @sdxPatternDottedDiamond); - AProduct.Add('sdxPatternShingle', @sdxPatternShingle); - AProduct.Add('sdxPatternTrellis', @sdxPatternTrellis); - AProduct.Add('sdxPatternSphere', @sdxPatternSphere); - AProduct.Add('sdxPatternSmallGrid', @sdxPatternSmallGrid); - AProduct.Add('sdxPatternLargeGrid', @sdxPatternLargeGrid); - AProduct.Add('sdxPatternSmallCheckedBoard', @sdxPatternSmallCheckedBoard); - AProduct.Add('sdxPatternLargeCheckedBoard', @sdxPatternLargeCheckedBoard); - AProduct.Add('sdxPatternOutlinedDiamond', @sdxPatternOutlinedDiamond); - AProduct.Add('sdxPatternSolidDiamond', @sdxPatternSolidDiamond); - AProduct.Add('sdxTextureNewSprint', @sdxTextureNewSprint); - AProduct.Add('sdxTextureGreenMarble', @sdxTextureGreenMarble); - AProduct.Add('sdxTextureBlueTissuePaper', @sdxTextureBlueTissuePaper); - AProduct.Add('sdxTexturePapyrus', @sdxTexturePapyrus); - AProduct.Add('sdxTextureWaterDroplets', @sdxTextureWaterDroplets); - AProduct.Add('sdxTextureCork', @sdxTextureCork); - AProduct.Add('sdxTextureRecycledPaper', @sdxTextureRecycledPaper); - AProduct.Add('sdxTextureWhiteMarble', @sdxTextureWhiteMarble); - AProduct.Add('sdxTexturePinkMarble', @sdxTexturePinkMarble); - AProduct.Add('sdxTextureCanvas', @sdxTextureCanvas); - AProduct.Add('sdxTexturePaperBag', @sdxTexturePaperBag); - AProduct.Add('sdxTextureWalnut', @sdxTextureWalnut); - AProduct.Add('sdxTextureParchment', @sdxTextureParchment); - AProduct.Add('sdxTextureBrownMarble', @sdxTextureBrownMarble); - AProduct.Add('sdxTexturePurpleMesh', @sdxTexturePurpleMesh); - AProduct.Add('sdxTextureDenim', @sdxTextureDenim); - AProduct.Add('sdxTextureFishFossil', @sdxTextureFishFossil); - AProduct.Add('sdxTextureOak', @sdxTextureOak); - AProduct.Add('sdxTextureStationary', @sdxTextureStationary); - AProduct.Add('sdxTextureGranite', @sdxTextureGranite); - AProduct.Add('sdxTextureBouquet', @sdxTextureBouquet); - AProduct.Add('sdxTextureWonenMat', @sdxTextureWonenMat); - AProduct.Add('sdxTextureSand', @sdxTextureSand); - AProduct.Add('sdxTextureMediumWood', @sdxTextureMediumWood); - AProduct.Add('sdxFSPCaption', @sdxFSPCaption); - AProduct.Add('sdxWidth', @sdxWidth); - AProduct.Add('sdxHeight', @sdxHeight); - AProduct.Add('sdxBrushDlgCaption', @sdxBrushDlgCaption); - AProduct.Add('sdxStyle', @sdxStyle); - AProduct.Add('sdxENFNCaption', @sdxENFNCaption); - AProduct.Add('sdxEnterNewFileName', @sdxEnterNewFileName); - AProduct.Add('sdxDefinePrintStylesCaption', @sdxDefinePrintStylesCaption); - AProduct.Add('sdxDefinePrintStylesTitle', @sdxDefinePrintStylesTitle); - AProduct.Add('sdxDefinePrintStylesWarningDelete', @sdxDefinePrintStylesWarningDelete); - AProduct.Add('sdxDefinePrintStylesWarningClear', @sdxDefinePrintStylesWarningClear); - AProduct.Add('sdxClear', @sdxClear); - AProduct.Add('sdxCustomSize', @sdxCustomSize); - AProduct.Add('sdxDefaultTray', @sdxDefaultTray); - AProduct.Add('sdxInvalidPrintDevice', @sdxInvalidPrintDevice); - AProduct.Add('sdxNotPrinting', @sdxNotPrinting); - AProduct.Add('sdxPrinting', @sdxPrinting); - AProduct.Add('sdxDeviceOnPort', @sdxDeviceOnPort); - AProduct.Add('sdxPrinterIndexError', @sdxPrinterIndexError); - AProduct.Add('sdxNoDefaultPrintDevice', @sdxNoDefaultPrintDevice); - AProduct.Add('sdxAutoTextDialogCaption', @sdxAutoTextDialogCaption); - AProduct.Add('sdxEnterAutoTextEntriesHere', @sdxEnterAutoTextEntriesHere); - AProduct.Add('sdxPrintDialogCaption', @sdxPrintDialogCaption); - AProduct.Add('sdxPrintDialogPrinter', @sdxPrintDialogPrinter); - AProduct.Add('sdxPrintDialogName', @sdxPrintDialogName); - AProduct.Add('sdxPrintDialogStatus', @sdxPrintDialogStatus); - AProduct.Add('sdxPrintDialogType', @sdxPrintDialogType); - AProduct.Add('sdxPrintDialogWhere', @sdxPrintDialogWhere); - AProduct.Add('sdxPrintDialogComment', @sdxPrintDialogComment); - AProduct.Add('sdxPrintDialogPrintToFile', @sdxPrintDialogPrintToFile); - AProduct.Add('sdxPrintDialogPageRange', @sdxPrintDialogPageRange); - AProduct.Add('sdxPrintDialogAll', @sdxPrintDialogAll); - AProduct.Add('sdxPrintDialogCurrentPage', @sdxPrintDialogCurrentPage); - AProduct.Add('sdxPrintDialogSelection', @sdxPrintDialogSelection); - AProduct.Add('sdxPrintDialogPages', @sdxPrintDialogPages); - AProduct.Add('sdxPrintDialogRangeLegend', @sdxPrintDialogRangeLegend); - AProduct.Add('sdxPrintDialogCopies', @sdxPrintDialogCopies); - AProduct.Add('sdxPrintDialogNumberOfPages', @sdxPrintDialogNumberOfPages); - AProduct.Add('sdxPrintDialogNumberOfCopies', @sdxPrintDialogNumberOfCopies); - AProduct.Add('sdxPrintDialogCollateCopies', @sdxPrintDialogCollateCopies); - AProduct.Add('sdxPrintDialogAllPages', @sdxPrintDialogAllPages); - AProduct.Add('sdxPrintDialogEvenPages', @sdxPrintDialogEvenPages); - AProduct.Add('sdxPrintDialogOddPages', @sdxPrintDialogOddPages); - AProduct.Add('sdxPrintDialogPrintStyles', @sdxPrintDialogPrintStyles); - AProduct.Add('sdxPrintDialogOpenDlgTitle', @sdxPrintDialogOpenDlgTitle); - AProduct.Add('sdxPrintDialogOpenDlgAllFiles', @sdxPrintDialogOpenDlgAllFiles); - AProduct.Add('sdxPrintDialogOpenDlgPrinterFiles', @sdxPrintDialogOpenDlgPrinterFiles); - AProduct.Add('sdxPrintDialogPageNumbersOutOfRange', @sdxPrintDialogPageNumbersOutOfRange); - AProduct.Add('sdxPrintDialogInvalidPageRanges', @sdxPrintDialogInvalidPageRanges); - AProduct.Add('sdxPrintDialogRequiredPageNumbers', @sdxPrintDialogRequiredPageNumbers); - AProduct.Add('sdxPrintDialogNoPrinters', @sdxPrintDialogNoPrinters); - AProduct.Add('sdxPrintDialogInPrintingState', @sdxPrintDialogInPrintingState); - AProduct.Add('sdxPrintDialogPSPaused', @sdxPrintDialogPSPaused); - AProduct.Add('sdxPrintDialogPSPendingDeletion', @sdxPrintDialogPSPendingDeletion); - AProduct.Add('sdxPrintDialogPSBusy', @sdxPrintDialogPSBusy); - AProduct.Add('sdxPrintDialogPSDoorOpen', @sdxPrintDialogPSDoorOpen); - AProduct.Add('sdxPrintDialogPSError', @sdxPrintDialogPSError); - AProduct.Add('sdxPrintDialogPSInitializing', @sdxPrintDialogPSInitializing); - AProduct.Add('sdxPrintDialogPSIOActive', @sdxPrintDialogPSIOActive); - AProduct.Add('sdxPrintDialogPSManualFeed', @sdxPrintDialogPSManualFeed); - AProduct.Add('sdxPrintDialogPSNoToner', @sdxPrintDialogPSNoToner); - AProduct.Add('sdxPrintDialogPSNotAvailable', @sdxPrintDialogPSNotAvailable); - AProduct.Add('sdxPrintDialogPSOFFLine', @sdxPrintDialogPSOFFLine); - AProduct.Add('sdxPrintDialogPSOutOfMemory', @sdxPrintDialogPSOutOfMemory); - AProduct.Add('sdxPrintDialogPSOutBinFull', @sdxPrintDialogPSOutBinFull); - AProduct.Add('sdxPrintDialogPSPagePunt', @sdxPrintDialogPSPagePunt); - AProduct.Add('sdxPrintDialogPSPaperJam', @sdxPrintDialogPSPaperJam); - AProduct.Add('sdxPrintDialogPSPaperOut', @sdxPrintDialogPSPaperOut); - AProduct.Add('sdxPrintDialogPSPaperProblem', @sdxPrintDialogPSPaperProblem); - AProduct.Add('sdxPrintDialogPSPrinting', @sdxPrintDialogPSPrinting); - AProduct.Add('sdxPrintDialogPSProcessing', @sdxPrintDialogPSProcessing); - AProduct.Add('sdxPrintDialogPSTonerLow', @sdxPrintDialogPSTonerLow); - AProduct.Add('sdxPrintDialogPSUserIntervention', @sdxPrintDialogPSUserIntervention); - AProduct.Add('sdxPrintDialogPSWaiting', @sdxPrintDialogPSWaiting); - AProduct.Add('sdxPrintDialogPSWarningUp', @sdxPrintDialogPSWarningUp); - AProduct.Add('sdxPrintDialogPSReady', @sdxPrintDialogPSReady); - AProduct.Add('sdxPrintDialogPSPrintingAndWaiting', @sdxPrintDialogPSPrintingAndWaiting); - AProduct.Add('sdxLeftMargin', @sdxLeftMargin); - AProduct.Add('sdxTopMargin', @sdxTopMargin); - AProduct.Add('sdxRightMargin', @sdxRightMargin); - AProduct.Add('sdxBottomMargin', @sdxBottomMargin); - AProduct.Add('sdxGutterMargin', @sdxGutterMargin); - AProduct.Add('sdxHeaderMargin', @sdxHeaderMargin); - AProduct.Add('sdxFooterMargin', @sdxFooterMargin); - AProduct.Add('sdxUnitsInches', @sdxUnitsInches); - AProduct.Add('sdxUnitsCentimeters', @sdxUnitsCentimeters); - AProduct.Add('sdxUnitsMillimeters', @sdxUnitsMillimeters); - AProduct.Add('sdxUnitsPoints', @sdxUnitsPoints); - AProduct.Add('sdxUnitsPicas', @sdxUnitsPicas); - AProduct.Add('sdxUnitsDefaultName', @sdxUnitsDefaultName); - AProduct.Add('sdxUnitsInchesName', @sdxUnitsInchesName); - AProduct.Add('sdxUnitsCentimetersName', @sdxUnitsCentimetersName); - AProduct.Add('sdxUnitsMillimetersName', @sdxUnitsMillimetersName); - AProduct.Add('sdxUnitsPointsName', @sdxUnitsPointsName); - AProduct.Add('sdxUnitsPicasName', @sdxUnitsPicasName); - AProduct.Add('sdxPrintPreview', @sdxPrintPreview); - AProduct.Add('sdxReportDesignerCaption', @sdxReportDesignerCaption); - AProduct.Add('sdxCompositionDesignerCaption', @sdxCompositionDesignerCaption); - AProduct.Add('sdxComponentNotSupportedByLink', @sdxComponentNotSupportedByLink); -end; - -procedure AddResourceStringsPart2(AProduct: TdxProductResourceStrings); -begin - AProduct.Add('sdxComponentNotSupported', @sdxComponentNotSupported); - AProduct.Add('sdxPrintDeviceNotReady', @sdxPrintDeviceNotReady); - AProduct.Add('sdxUnableToGenerateReport', @sdxUnableToGenerateReport); - AProduct.Add('sdxPreviewNotRegistered', @sdxPreviewNotRegistered); - AProduct.Add('sdxComponentNotAssigned', @sdxComponentNotAssigned); - AProduct.Add('sdxPrintDeviceIsBusy', @sdxPrintDeviceIsBusy); - AProduct.Add('sdxPrintDeviceError', @sdxPrintDeviceError); - AProduct.Add('sdxMissingComponent', @sdxMissingComponent); - AProduct.Add('sdxDataProviderDontPresent', @sdxDataProviderDontPresent); - AProduct.Add('sdxBuildingReport', @sdxBuildingReport); - AProduct.Add('sdxPrintingReport', @sdxPrintingReport); - AProduct.Add('sdxDefinePrintStylesMenuItem', @sdxDefinePrintStylesMenuItem); - AProduct.Add('sdxAbortPrinting', @sdxAbortPrinting); - AProduct.Add('sdxStandardStyle', @sdxStandardStyle); - AProduct.Add('sdxFontStyleBold', @sdxFontStyleBold); - AProduct.Add('sdxFontStyleItalic', @sdxFontStyleItalic); - AProduct.Add('sdxFontStyleUnderline', @sdxFontStyleUnderline); - AProduct.Add('sdxFontStyleStrikeOut', @sdxFontStyleStrikeOut); - AProduct.Add('sdxPt', @sdxPt); - AProduct.Add('sdxNoPages', @sdxNoPages); - AProduct.Add('sdxPageWidth', @sdxPageWidth); - AProduct.Add('sdxWholePage', @sdxWholePage); - AProduct.Add('sdxTwoPages', @sdxTwoPages); - AProduct.Add('sdxFourPages', @sdxFourPages); - AProduct.Add('sdxWidenToSourceWidth', @sdxWidenToSourceWidth); - AProduct.Add('sdxMenuBar', @sdxMenuBar); - AProduct.Add('sdxStandardBar', @sdxStandardBar); - AProduct.Add('sdxHeaderFooterBar', @sdxHeaderFooterBar); - AProduct.Add('sdxShortcutMenusBar', @sdxShortcutMenusBar); - AProduct.Add('sdxAutoTextBar', @sdxAutoTextBar); - AProduct.Add('sdxMenuFile', @sdxMenuFile); - AProduct.Add('sdxMenuFileDesign', @sdxMenuFileDesign); - AProduct.Add('sdxMenuFilePrint', @sdxMenuFilePrint); - AProduct.Add('sdxMenuFilePageSetup', @sdxMenuFilePageSetup); - AProduct.Add('sdxMenuPrintStyles', @sdxMenuPrintStyles); - AProduct.Add('sdxMenuFileExit', @sdxMenuFileExit); - AProduct.Add('sdxMenuEdit', @sdxMenuEdit); - AProduct.Add('sdxMenuEditCut', @sdxMenuEditCut); - AProduct.Add('sdxMenuEditCopy', @sdxMenuEditCopy); - AProduct.Add('sdxMenuEditPaste', @sdxMenuEditPaste); - AProduct.Add('sdxMenuEditDelete', @sdxMenuEditDelete); - AProduct.Add('sdxMenuEditFind', @sdxMenuEditFind); - AProduct.Add('sdxMenuEditFindNext', @sdxMenuEditFindNext); - AProduct.Add('sdxMenuEditReplace', @sdxMenuEditReplace); - AProduct.Add('sdxMenuLoad', @sdxMenuLoad); - AProduct.Add('sdxMenuPreview', @sdxMenuPreview); - AProduct.Add('sdxMenuInsert', @sdxMenuInsert); - AProduct.Add('sdxMenuInsertAutoText', @sdxMenuInsertAutoText); - AProduct.Add('sdxMenuInsertEditAutoTextEntries', @sdxMenuInsertEditAutoTextEntries); - AProduct.Add('sdxMenuInsertAutoTextEntries', @sdxMenuInsertAutoTextEntries); - AProduct.Add('sdxMenuInsertAutoTextEntriesSubItem', @sdxMenuInsertAutoTextEntriesSubItem); - AProduct.Add('sdxMenuInsertPageNumber', @sdxMenuInsertPageNumber); - AProduct.Add('sdxMenuInsertTotalPages', @sdxMenuInsertTotalPages); - AProduct.Add('sdxMenuInsertPageOfPages', @sdxMenuInsertPageOfPages); - AProduct.Add('sdxMenuInsertDateTime', @sdxMenuInsertDateTime); - AProduct.Add('sdxMenuInsertDate', @sdxMenuInsertDate); - AProduct.Add('sdxMenuInsertTime', @sdxMenuInsertTime); - AProduct.Add('sdxMenuInsertUserName', @sdxMenuInsertUserName); - AProduct.Add('sdxMenuInsertMachineName', @sdxMenuInsertMachineName); - AProduct.Add('sdxMenuView', @sdxMenuView); - AProduct.Add('sdxMenuViewMargins', @sdxMenuViewMargins); - AProduct.Add('sdxMenuViewFlatToolBarButtons', @sdxMenuViewFlatToolBarButtons); - AProduct.Add('sdxMenuViewLargeToolBarButtons', @sdxMenuViewLargeToolBarButtons); - AProduct.Add('sdxMenuViewMarginsStatusBar', @sdxMenuViewMarginsStatusBar); - AProduct.Add('sdxMenuViewPagesStatusBar', @sdxMenuViewPagesStatusBar); - AProduct.Add('sdxMenuViewToolBars', @sdxMenuViewToolBars); - AProduct.Add('sdxMenuViewPagesHeaders', @sdxMenuViewPagesHeaders); - AProduct.Add('sdxMenuViewPagesFooters', @sdxMenuViewPagesFooters); - AProduct.Add('sdxMenuViewSwitchToLeftPart', @sdxMenuViewSwitchToLeftPart); - AProduct.Add('sdxMenuViewSwitchToRightPart', @sdxMenuViewSwitchToRightPart); - AProduct.Add('sdxMenuViewSwitchToCenterPart', @sdxMenuViewSwitchToCenterPart); - AProduct.Add('sdxMenuViewHFSwitchHeaderFooter', @sdxMenuViewHFSwitchHeaderFooter); - AProduct.Add('sdxMenuViewHFClose', @sdxMenuViewHFClose); - AProduct.Add('sdxMenuZoom', @sdxMenuZoom); - AProduct.Add('sdxMenuZoomPercent100', @sdxMenuZoomPercent100); - AProduct.Add('sdxMenuZoomPageWidth', @sdxMenuZoomPageWidth); - AProduct.Add('sdxMenuZoomWholePage', @sdxMenuZoomWholePage); - AProduct.Add('sdxMenuZoomTwoPages', @sdxMenuZoomTwoPages); - AProduct.Add('sdxMenuZoomFourPages', @sdxMenuZoomFourPages); - AProduct.Add('sdxMenuZoomMultiplyPages', @sdxMenuZoomMultiplyPages); - AProduct.Add('sdxMenuZoomWidenToSourceWidth', @sdxMenuZoomWidenToSourceWidth); - AProduct.Add('sdxMenuZoomSetup', @sdxMenuZoomSetup); - AProduct.Add('sdxMenuPages', @sdxMenuPages); - AProduct.Add('sdxMenuGotoPage', @sdxMenuGotoPage); - AProduct.Add('sdxMenuGotoPageFirst', @sdxMenuGotoPageFirst); - AProduct.Add('sdxMenuGotoPagePrev', @sdxMenuGotoPagePrev); - AProduct.Add('sdxMenuGotoPageNext', @sdxMenuGotoPageNext); - AProduct.Add('sdxMenuGotoPageLast', @sdxMenuGotoPageLast); - AProduct.Add('sdxMenuActivePage', @sdxMenuActivePage); - AProduct.Add('sdxMenuFormat', @sdxMenuFormat); - AProduct.Add('sdxMenuFormatHeaderAndFooter', @sdxMenuFormatHeaderAndFooter); - AProduct.Add('sdxMenuFormatAutoTextEntries', @sdxMenuFormatAutoTextEntries); - AProduct.Add('sdxMenuFormatDateTime', @sdxMenuFormatDateTime); - AProduct.Add('sdxMenuFormatPageNumbering', @sdxMenuFormatPageNumbering); - AProduct.Add('sdxMenuFormatPageBackground', @sdxMenuFormatPageBackground); - AProduct.Add('sdxMenuFormatShrinkToPage', @sdxMenuFormatShrinkToPage); - AProduct.Add('sdxMenuShowEmptyPages', @sdxMenuShowEmptyPages); - AProduct.Add('sdxMenuFormatHFBackground', @sdxMenuFormatHFBackground); - AProduct.Add('sdxMenuFormatHFClear', @sdxMenuFormatHFClear); - AProduct.Add('sdxMenuTools', @sdxMenuTools); - AProduct.Add('sdxMenuToolsCustomize', @sdxMenuToolsCustomize); - AProduct.Add('sdxMenuToolsOptions', @sdxMenuToolsOptions); - AProduct.Add('sdxMenuHelp', @sdxMenuHelp); - AProduct.Add('sdxMenuHelpTopics', @sdxMenuHelpTopics); - AProduct.Add('sdxMenuHelpAbout', @sdxMenuHelpAbout); - AProduct.Add('sdxMenuShortcutPreview', @sdxMenuShortcutPreview); - AProduct.Add('sdxMenuShortcutAutoText', @sdxMenuShortcutAutoText); - AProduct.Add('sdxMenuBuiltInMenus', @sdxMenuBuiltInMenus); - AProduct.Add('sdxMenuShortCutMenus', @sdxMenuShortCutMenus); - AProduct.Add('sdxMenuNewMenu', @sdxMenuNewMenu); - AProduct.Add('sdxHintFileDesign', @sdxHintFileDesign); - AProduct.Add('sdxHintFilePrint', @sdxHintFilePrint); - AProduct.Add('sdxHintFilePrintDialog', @sdxHintFilePrintDialog); - AProduct.Add('sdxHintFilePageSetup', @sdxHintFilePageSetup); - AProduct.Add('sdxHintFileExit', @sdxHintFileExit); - AProduct.Add('sdxHintEditFind', @sdxHintEditFind); - AProduct.Add('sdxHintEditFindNext', @sdxHintEditFindNext); - AProduct.Add('sdxHintEditReplace', @sdxHintEditReplace); - AProduct.Add('sdxHintInsertEditAutoTextEntries', @sdxHintInsertEditAutoTextEntries); - AProduct.Add('sdxHintInsertPageNumber', @sdxHintInsertPageNumber); - AProduct.Add('sdxHintInsertTotalPages', @sdxHintInsertTotalPages); - AProduct.Add('sdxHintInsertPageOfPages', @sdxHintInsertPageOfPages); - AProduct.Add('sdxHintInsertDateTime', @sdxHintInsertDateTime); - AProduct.Add('sdxHintInsertDate', @sdxHintInsertDate); - AProduct.Add('sdxHintInsertTime', @sdxHintInsertTime); - AProduct.Add('sdxHintInsertUserName', @sdxHintInsertUserName); - AProduct.Add('sdxHintInsertMachineName', @sdxHintInsertMachineName); - AProduct.Add('sdxHintViewMargins', @sdxHintViewMargins); - AProduct.Add('sdxHintViewLargeButtons', @sdxHintViewLargeButtons); - AProduct.Add('sdxHintViewMarginsStatusBar', @sdxHintViewMarginsStatusBar); - AProduct.Add('sdxHintViewPagesStatusBar', @sdxHintViewPagesStatusBar); - AProduct.Add('sdxHintViewPagesHeaders', @sdxHintViewPagesHeaders); - AProduct.Add('sdxHintViewPagesFooters', @sdxHintViewPagesFooters); - AProduct.Add('sdxHintViewSwitchToLeftPart', @sdxHintViewSwitchToLeftPart); - AProduct.Add('sdxHintViewSwitchToRightPart', @sdxHintViewSwitchToRightPart); - AProduct.Add('sdxHintViewSwitchToCenterPart', @sdxHintViewSwitchToCenterPart); - AProduct.Add('sdxHintViewHFSwitchHeaderFooter', @sdxHintViewHFSwitchHeaderFooter); - AProduct.Add('sdxHintViewHFClose', @sdxHintViewHFClose); - AProduct.Add('sdxHintViewZoom', @sdxHintViewZoom); - AProduct.Add('sdxHintZoomPercent100', @sdxHintZoomPercent100); - AProduct.Add('sdxHintZoomPageWidth', @sdxHintZoomPageWidth); - AProduct.Add('sdxHintZoomWholePage', @sdxHintZoomWholePage); - AProduct.Add('sdxHintZoomTwoPages', @sdxHintZoomTwoPages); - AProduct.Add('sdxHintZoomFourPages', @sdxHintZoomFourPages); - AProduct.Add('sdxHintZoomMultiplyPages', @sdxHintZoomMultiplyPages); - AProduct.Add('sdxHintZoomWidenToSourceWidth', @sdxHintZoomWidenToSourceWidth); - AProduct.Add('sdxHintZoomSetup', @sdxHintZoomSetup); - AProduct.Add('sdxHintFormatDateTime', @sdxHintFormatDateTime); - AProduct.Add('sdxHintFormatPageNumbering', @sdxHintFormatPageNumbering); - AProduct.Add('sdxHintFormatPageBackground', @sdxHintFormatPageBackground); - AProduct.Add('sdxHintFormatShrinkToPage', @sdxHintFormatShrinkToPage); - AProduct.Add('sdxHintFormatHFBackground', @sdxHintFormatHFBackground); - AProduct.Add('sdxHintFormatHFClear', @sdxHintFormatHFClear); - AProduct.Add('sdxHintGotoPageFirst', @sdxHintGotoPageFirst); - AProduct.Add('sdxHintGotoPagePrev', @sdxHintGotoPagePrev); - AProduct.Add('sdxHintGotoPageNext', @sdxHintGotoPageNext); - AProduct.Add('sdxHintGotoPageLast', @sdxHintGotoPageLast); - AProduct.Add('sdxHintActivePage', @sdxHintActivePage); - AProduct.Add('sdxHintToolsCustomize', @sdxHintToolsCustomize); - AProduct.Add('sdxHintToolsOptions', @sdxHintToolsOptions); - AProduct.Add('sdxHintHelpTopics', @sdxHintHelpTopics); - AProduct.Add('sdxHintHelpAbout', @sdxHintHelpAbout); - AProduct.Add('sdxPopupMenuLargeButtons', @sdxPopupMenuLargeButtons); - AProduct.Add('sdxPopupMenuFlatButtons', @sdxPopupMenuFlatButtons); - AProduct.Add('sdxPaperSize', @sdxPaperSize); - AProduct.Add('sdxStatus', @sdxStatus); - AProduct.Add('sdxStatusReady', @sdxStatusReady); - AProduct.Add('sdxStatusPrinting', @sdxStatusPrinting); - AProduct.Add('sdxStatusGenerateReport', @sdxStatusGenerateReport); - AProduct.Add('sdxHintDoubleClickForChangePaperSize', @sdxHintDoubleClickForChangePaperSize); - AProduct.Add('sdxHintDoubleClickForChangeMargins', @sdxHintDoubleClickForChangeMargins); - AProduct.Add('sdxDTFormatsCaption', @sdxDTFormatsCaption); - AProduct.Add('sdxDTFormatsAvailableDateFormats', @sdxDTFormatsAvailableDateFormats); - AProduct.Add('sdxDTFormatsAvailableTimeFormats', @sdxDTFormatsAvailableTimeFormats); - AProduct.Add('sdxDTFormatsAutoUpdate', @sdxDTFormatsAutoUpdate); - AProduct.Add('sdxDTFormatsChangeDefaultFormat', @sdxDTFormatsChangeDefaultFormat); - AProduct.Add('sdxPNFormatsCaption', @sdxPNFormatsCaption); - AProduct.Add('sdxPageNumbering', @sdxPageNumbering); - AProduct.Add('sdxPNFormatsNumberFormat', @sdxPNFormatsNumberFormat); - AProduct.Add('sdxPNFormatsContinueFromPrevious', @sdxPNFormatsContinueFromPrevious); - AProduct.Add('sdxPNFormatsStartAt', @sdxPNFormatsStartAt); - AProduct.Add('sdxPNFormatsChangeDefaultFormat', @sdxPNFormatsChangeDefaultFormat); - AProduct.Add('sdxZoomDlgCaption', @sdxZoomDlgCaption); - AProduct.Add('sdxZoomDlgZoomTo', @sdxZoomDlgZoomTo); - AProduct.Add('sdxZoomDlgPageWidth', @sdxZoomDlgPageWidth); - AProduct.Add('sdxZoomDlgWholePage', @sdxZoomDlgWholePage); - AProduct.Add('sdxZoomDlgTwoPages', @sdxZoomDlgTwoPages); - AProduct.Add('sdxZoomDlgFourPages', @sdxZoomDlgFourPages); - AProduct.Add('sdxZoomDlgManyPages', @sdxZoomDlgManyPages); - AProduct.Add('sdxZoomDlgPercent', @sdxZoomDlgPercent); - AProduct.Add('sdxZoomDlgPreview', @sdxZoomDlgPreview); - AProduct.Add('sdxZoomDlgFontPreview', @sdxZoomDlgFontPreview); - AProduct.Add('sdxZoomDlgFontPreviewString', @sdxZoomDlgFontPreviewString); - AProduct.Add('sdxPages', @sdxPages); - AProduct.Add('sdxCancel', @sdxCancel); - AProduct.Add('sdxPreferenceDlgCaption', @sdxPreferenceDlgCaption); - AProduct.Add('sdxPreferenceDlgTab1', @sdxPreferenceDlgTab1); - AProduct.Add('sdxPreferenceDlgTab2', @sdxPreferenceDlgTab2); - AProduct.Add('sdxPreferenceDlgTab3', @sdxPreferenceDlgTab3); - AProduct.Add('sdxPreferenceDlgTab4', @sdxPreferenceDlgTab4); - AProduct.Add('sdxPreferenceDlgTab5', @sdxPreferenceDlgTab5); - AProduct.Add('sdxPreferenceDlgTab6', @sdxPreferenceDlgTab6); - AProduct.Add('sdxPreferenceDlgTab7', @sdxPreferenceDlgTab7); - AProduct.Add('sdxPreferenceDlgTab8', @sdxPreferenceDlgTab8); - AProduct.Add('sdxPreferenceDlgTab9', @sdxPreferenceDlgTab9); - AProduct.Add('sdxPreferenceDlgTab10', @sdxPreferenceDlgTab10); - AProduct.Add('sdxPreferenceDlgShow', @sdxPreferenceDlgShow); - AProduct.Add('sdxPreferenceDlgMargins', @sdxPreferenceDlgMargins); - AProduct.Add('sdxPreferenceDlgMarginsHints', @sdxPreferenceDlgMarginsHints); - AProduct.Add('sdxPreferenceDlgMargingWhileDragging', @sdxPreferenceDlgMargingWhileDragging); - AProduct.Add('sdxPreferenceDlgLargeBtns', @sdxPreferenceDlgLargeBtns); - AProduct.Add('sdxPreferenceDlgFlatBtns', @sdxPreferenceDlgFlatBtns); - AProduct.Add('sdxPreferenceDlgMarginsColor', @sdxPreferenceDlgMarginsColor); - AProduct.Add('sdxPreferenceDlgMeasurementUnits', @sdxPreferenceDlgMeasurementUnits); - AProduct.Add('sdxPreferenceDlgSaveForRunTimeToo', @sdxPreferenceDlgSaveForRunTimeToo); - AProduct.Add('sdxPreferenceDlgZoomScroll', @sdxPreferenceDlgZoomScroll); - AProduct.Add('sdxPreferenceDlgZoomStep', @sdxPreferenceDlgZoomStep); - AProduct.Add('sdxCloneStyleCaptionPrefix', @sdxCloneStyleCaptionPrefix); - AProduct.Add('sdxInvalideStyleCaption', @sdxInvalideStyleCaption); - AProduct.Add('sdxPageSetupCaption', @sdxPageSetupCaption); - AProduct.Add('sdxStyleName', @sdxStyleName); - AProduct.Add('sdxPage', @sdxPage); - AProduct.Add('sdxMargins', @sdxMargins); - AProduct.Add('sdxHeaderFooter', @sdxHeaderFooter); - AProduct.Add('sdxScaling', @sdxScaling); - AProduct.Add('sdxPaper', @sdxPaper); - AProduct.Add('sdxPaperType', @sdxPaperType); - AProduct.Add('sdxPaperDimension', @sdxPaperDimension); - AProduct.Add('sdxPaperWidth', @sdxPaperWidth); - AProduct.Add('sdxPaperHeight', @sdxPaperHeight); - AProduct.Add('sdxPaperSource', @sdxPaperSource); - AProduct.Add('sdxOrientation', @sdxOrientation); - AProduct.Add('sdxPortrait', @sdxPortrait); - AProduct.Add('sdxLandscape', @sdxLandscape); - AProduct.Add('sdxPrintOrder', @sdxPrintOrder); - AProduct.Add('sdxDownThenOver', @sdxDownThenOver); - AProduct.Add('sdxOverThenDown', @sdxOverThenDown); - AProduct.Add('sdxShading', @sdxShading); - AProduct.Add('sdxPrintUsingGrayShading', @sdxPrintUsingGrayShading); - AProduct.Add('sdxCenterOnPage', @sdxCenterOnPage); - AProduct.Add('sdxHorizontally', @sdxHorizontally); - AProduct.Add('sdxVertically', @sdxVertically); - AProduct.Add('sdxHeader', @sdxHeader); - AProduct.Add('sdxBtnHeaderFont', @sdxBtnHeaderFont); - AProduct.Add('sdxBtnHeaderBackground', @sdxBtnHeaderBackground); - AProduct.Add('sdxFooter', @sdxFooter); - AProduct.Add('sdxBtnFooterFont', @sdxBtnFooterFont); - AProduct.Add('sdxBtnFooterBackground', @sdxBtnFooterBackground); - AProduct.Add('sdxTop', @sdxTop); - AProduct.Add('sdxLeft', @sdxLeft); - AProduct.Add('sdxRight', @sdxRight); - AProduct.Add('sdxBottom', @sdxBottom); - AProduct.Add('sdxHeader2', @sdxHeader2); - AProduct.Add('sdxFooter2', @sdxFooter2); - AProduct.Add('sdxAlignment', @sdxAlignment); - AProduct.Add('sdxVertAlignment', @sdxVertAlignment); - AProduct.Add('sdxReverseOnEvenPages', @sdxReverseOnEvenPages); - AProduct.Add('sdxAdjustTo', @sdxAdjustTo); - AProduct.Add('sdxFitTo', @sdxFitTo); - AProduct.Add('sdxPercentOfNormalSize', @sdxPercentOfNormalSize); - AProduct.Add('sdxPagesWideBy', @sdxPagesWideBy); - AProduct.Add('sdxTall', @sdxTall); - AProduct.Add('sdxOf', @sdxOf); - AProduct.Add('sdxLastPrinted', @sdxLastPrinted); - AProduct.Add('sdxFileName', @sdxFileName); - AProduct.Add('sdxFileNameAndPath', @sdxFileNameAndPath); - AProduct.Add('sdxPrintedBy', @sdxPrintedBy); - AProduct.Add('sdxPrintedOn', @sdxPrintedOn); - AProduct.Add('sdxCreatedBy', @sdxCreatedBy); - AProduct.Add('sdxCreatedOn', @sdxCreatedOn); - AProduct.Add('sdxConfidential', @sdxConfidential); - AProduct.Add('sdxHFFunctionNameUnknown', @sdxHFFunctionNameUnknown); - AProduct.Add('sdxHFFunctionNamePageNumber', @sdxHFFunctionNamePageNumber); - AProduct.Add('sdxHFFunctionNameTotalPages', @sdxHFFunctionNameTotalPages); - AProduct.Add('sdxHFFunctionNamePageOfPages', @sdxHFFunctionNamePageOfPages); - AProduct.Add('sdxHFFunctionNameDateTime', @sdxHFFunctionNameDateTime); - AProduct.Add('sdxHFFunctionNameDate', @sdxHFFunctionNameDate); - AProduct.Add('sdxHFFunctionNameTime', @sdxHFFunctionNameTime); - AProduct.Add('sdxHFFunctionNameUserName', @sdxHFFunctionNameUserName); - AProduct.Add('sdxHFFunctionNameMachineName', @sdxHFFunctionNameMachineName); - AProduct.Add('sdxHFFunctionHintPageNumber', @sdxHFFunctionHintPageNumber); - AProduct.Add('sdxHFFunctionHintTotalPages', @sdxHFFunctionHintTotalPages); - AProduct.Add('sdxHFFunctionHintPageOfPages', @sdxHFFunctionHintPageOfPages); - AProduct.Add('sdxHFFunctionHintDateTime', @sdxHFFunctionHintDateTime); - AProduct.Add('sdxHFFunctionHintDate', @sdxHFFunctionHintDate); - AProduct.Add('sdxHFFunctionHintTime', @sdxHFFunctionHintTime); - AProduct.Add('sdxHFFunctionHintUserName', @sdxHFFunctionHintUserName); - AProduct.Add('sdxHFFunctionHintMachineName', @sdxHFFunctionHintMachineName); - AProduct.Add('sdxHFFunctionTemplatePageNumber', @sdxHFFunctionTemplatePageNumber); - AProduct.Add('sdxHFFunctionTemplateTotalPages', @sdxHFFunctionTemplateTotalPages); - AProduct.Add('sdxHFFunctionTemplatePageOfPages', @sdxHFFunctionTemplatePageOfPages); - AProduct.Add('sdxHFFunctionTemplateDateTime', @sdxHFFunctionTemplateDateTime); - AProduct.Add('sdxHFFunctionTemplateDate', @sdxHFFunctionTemplateDate); - AProduct.Add('sdxHFFunctionTemplateTime', @sdxHFFunctionTemplateTime); - AProduct.Add('sdxHFFunctionTemplateUserName', @sdxHFFunctionTemplateUserName); - AProduct.Add('sdxHFFunctionTemplateMachineName', @sdxHFFunctionTemplateMachineName); - AProduct.Add('sdxJanuary', @sdxJanuary); - AProduct.Add('sdxFebruary', @sdxFebruary); - AProduct.Add('sdxMarch', @sdxMarch); - AProduct.Add('sdxApril', @sdxApril); - AProduct.Add('sdxMay', @sdxMay); - AProduct.Add('sdxJune', @sdxJune); - AProduct.Add('sdxJuly', @sdxJuly); - AProduct.Add('sdxAugust', @sdxAugust); - AProduct.Add('sdxSeptember', @sdxSeptember); - AProduct.Add('sdxOctober', @sdxOctober); - AProduct.Add('sdxNovember', @sdxNovember); - AProduct.Add('sdxDecember', @sdxDecember); - AProduct.Add('sdxEast', @sdxEast); - AProduct.Add('sdxWest', @sdxWest); - AProduct.Add('sdxSouth', @sdxSouth); - AProduct.Add('sdxNorth', @sdxNorth); - AProduct.Add('sdxTotal', @sdxTotal); - AProduct.Add('sdxPlan', @sdxPlan); - AProduct.Add('sdxSwimmingPool', @sdxSwimmingPool); - AProduct.Add('sdxAdministration', @sdxAdministration); - AProduct.Add('sdxPark', @sdxPark); - AProduct.Add('sdxCarParking', @sdxCarParking); - AProduct.Add('sdxCorporateHeadquarters', @sdxCorporateHeadquarters); - AProduct.Add('sdxSalesAndMarketing', @sdxSalesAndMarketing); - AProduct.Add('sdxEngineering', @sdxEngineering); - AProduct.Add('sdxFieldOfficeCanada', @sdxFieldOfficeCanada); - AProduct.Add('sdxOrderNoCaption', @sdxOrderNoCaption); - AProduct.Add('sdxNameCaption', @sdxNameCaption); - AProduct.Add('sdxCountCaption', @sdxCountCaption); - AProduct.Add('sdxCompanyCaption', @sdxCompanyCaption); - AProduct.Add('sdxAddressCaption', @sdxAddressCaption); - AProduct.Add('sdxPriceCaption', @sdxPriceCaption); - AProduct.Add('sdxCashCaption', @sdxCashCaption); - AProduct.Add('sdxName1', @sdxName1); - AProduct.Add('sdxName2', @sdxName2); - AProduct.Add('sdxCompany1', @sdxCompany1); - AProduct.Add('sdxCompany2', @sdxCompany2); - AProduct.Add('sdxAddress1', @sdxAddress1); - AProduct.Add('sdxAddress2', @sdxAddress2); - AProduct.Add('sdxCountIs', @sdxCountIs); - AProduct.Add('sdxRegular', @sdxRegular); - AProduct.Add('sdxIrregular', @sdxIrregular); - AProduct.Add('sdxTLBand', @sdxTLBand); - AProduct.Add('sdxTLColumnName', @sdxTLColumnName); - AProduct.Add('sdxTLColumnAxisymmetric', @sdxTLColumnAxisymmetric); - AProduct.Add('sdxTLColumnItemShape', @sdxTLColumnItemShape); - AProduct.Add('sdxItemShapeAsText', @sdxItemShapeAsText); - AProduct.Add('sdxItem1Name', @sdxItem1Name); - AProduct.Add('sdxItem2Name', @sdxItem2Name); - AProduct.Add('sdxItem3Name', @sdxItem3Name); - AProduct.Add('sdxItem4Name', @sdxItem4Name); - AProduct.Add('sdxItem5Name', @sdxItem5Name); - AProduct.Add('sdxItem1Description', @sdxItem1Description); - AProduct.Add('sdxItem2Description', @sdxItem2Description); - AProduct.Add('sdxItem3Description', @sdxItem3Description); - AProduct.Add('sdxItem4Description', @sdxItem4Description); - AProduct.Add('sdxItem5Description', @sdxItem5Description); - AProduct.Add('sdxItem6Description', @sdxItem6Description); - AProduct.Add('sdxItem7Description', @sdxItem7Description); - AProduct.Add('sdxPatternIsNotRegistered', @sdxPatternIsNotRegistered); - AProduct.Add('sdxSolidEdgePattern', @sdxSolidEdgePattern); - AProduct.Add('sdxThinSolidEdgePattern', @sdxThinSolidEdgePattern); - AProduct.Add('sdxMediumSolidEdgePattern', @sdxMediumSolidEdgePattern); - AProduct.Add('sdxThickSolidEdgePattern', @sdxThickSolidEdgePattern); - AProduct.Add('sdxDottedEdgePattern', @sdxDottedEdgePattern); - AProduct.Add('sdxDashedEdgePattern', @sdxDashedEdgePattern); - AProduct.Add('sdxDashDotDotEdgePattern', @sdxDashDotDotEdgePattern); - AProduct.Add('sdxDashDotEdgePattern', @sdxDashDotEdgePattern); - AProduct.Add('sdxSlantedDashDotEdgePattern', @sdxSlantedDashDotEdgePattern); - AProduct.Add('sdxMediumDashDotDotEdgePattern', @sdxMediumDashDotDotEdgePattern); - AProduct.Add('sdxHairEdgePattern', @sdxHairEdgePattern); - AProduct.Add('sdxMediumDashDotEdgePattern', @sdxMediumDashDotEdgePattern); - AProduct.Add('sdxMediumDashedEdgePattern', @sdxMediumDashedEdgePattern); - AProduct.Add('sdxDoubleLineEdgePattern', @sdxDoubleLineEdgePattern); - AProduct.Add('sdxSolidFillPattern', @sdxSolidFillPattern); - AProduct.Add('sdxGray75FillPattern', @sdxGray75FillPattern); - AProduct.Add('sdxGray50FillPattern', @sdxGray50FillPattern); - AProduct.Add('sdxGray25FillPattern', @sdxGray25FillPattern); - AProduct.Add('sdxGray125FillPattern', @sdxGray125FillPattern); - AProduct.Add('sdxGray625FillPattern', @sdxGray625FillPattern); - AProduct.Add('sdxHorizontalStripeFillPattern', @sdxHorizontalStripeFillPattern); - AProduct.Add('sdxVerticalStripeFillPattern', @sdxVerticalStripeFillPattern); - AProduct.Add('sdxReverseDiagonalStripeFillPattern', @sdxReverseDiagonalStripeFillPattern); - AProduct.Add('sdxDiagonalStripeFillPattern', @sdxDiagonalStripeFillPattern); - AProduct.Add('sdxDiagonalCrossHatchFillPattern', @sdxDiagonalCrossHatchFillPattern); - AProduct.Add('sdxThickCrossHatchFillPattern', @sdxThickCrossHatchFillPattern); - AProduct.Add('sdxThinHorizontalStripeFillPattern', @sdxThinHorizontalStripeFillPattern); - AProduct.Add('sdxThinVerticalStripeFillPattern', @sdxThinVerticalStripeFillPattern); - AProduct.Add('sdxThinReverseDiagonalStripeFillPattern', @sdxThinReverseDiagonalStripeFillPattern); - AProduct.Add('sdxThinDiagonalStripeFillPattern', @sdxThinDiagonalStripeFillPattern); - AProduct.Add('sdxThinHorizontalCrossHatchFillPattern', @sdxThinHorizontalCrossHatchFillPattern); - AProduct.Add('sdxThinDiagonalCrossHatchFillPattern', @sdxThinDiagonalCrossHatchFillPattern); - AProduct.Add('sdxShowRowAndColumnHeadings', @sdxShowRowAndColumnHeadings); - AProduct.Add('sdxShowGridLines', @sdxShowGridLines); - AProduct.Add('sdxSuppressSourceFormats', @sdxSuppressSourceFormats); - AProduct.Add('sdxRepeatHeaderRowAtTop', @sdxRepeatHeaderRowAtTop); - AProduct.Add('sdxDataToPrintDoesNotExist', @sdxDataToPrintDoesNotExist); - AProduct.Add('sdxJanuaryShort', @sdxJanuaryShort); - AProduct.Add('sdxFebruaryShort', @sdxFebruaryShort); - AProduct.Add('sdxMarchShort', @sdxMarchShort); - AProduct.Add('sdxAprilShort', @sdxAprilShort); - AProduct.Add('sdxMayShort', @sdxMayShort); - AProduct.Add('sdxJuneShort', @sdxJuneShort); - AProduct.Add('sdxJulyShort', @sdxJulyShort); - AProduct.Add('sdxAugustShort', @sdxAugustShort); - AProduct.Add('sdxSeptemberShort', @sdxSeptemberShort); - AProduct.Add('sdxOctoberShort', @sdxOctoberShort); - AProduct.Add('sdxNovemberShort', @sdxNovemberShort); - AProduct.Add('sdxDecemberShort', @sdxDecemberShort); - AProduct.Add('sdxTechnicalDepartment', @sdxTechnicalDepartment); - AProduct.Add('sdxSoftwareDepartment', @sdxSoftwareDepartment); - AProduct.Add('sdxSystemProgrammers', @sdxSystemProgrammers); - AProduct.Add('sdxEndUserProgrammers', @sdxEndUserProgrammers); - AProduct.Add('sdxBetaTesters', @sdxBetaTesters); - AProduct.Add('sdxHumanResourceDepartment', @sdxHumanResourceDepartment); - AProduct.Add('sdxTreeLines', @sdxTreeLines); - AProduct.Add('sdxTreeLinesColor', @sdxTreeLinesColor); - AProduct.Add('sdxExpandButtons', @sdxExpandButtons); - AProduct.Add('sdxCheckMarks', @sdxCheckMarks); - AProduct.Add('sdxTreeEffects', @sdxTreeEffects); - AProduct.Add('sdxAppearance', @sdxAppearance); - AProduct.Add('sdxCarLevelCaption', @sdxCarLevelCaption); - AProduct.Add('sdxManufacturerBandCaption', @sdxManufacturerBandCaption); - AProduct.Add('sdxModelBandCaption', @sdxModelBandCaption); - AProduct.Add('sdxManufacturerNameColumnCaption', @sdxManufacturerNameColumnCaption); - AProduct.Add('sdxManufacturerLogoColumnCaption', @sdxManufacturerLogoColumnCaption); - AProduct.Add('sdxManufacturerCountryColumnCaption', @sdxManufacturerCountryColumnCaption); - AProduct.Add('sdxCarModelColumnCaption', @sdxCarModelColumnCaption); - AProduct.Add('sdxCarIsSUVColumnCaption', @sdxCarIsSUVColumnCaption); - AProduct.Add('sdxCarPhotoColumnCaption', @sdxCarPhotoColumnCaption); - AProduct.Add('sdxCarManufacturerName1', @sdxCarManufacturerName1); - AProduct.Add('sdxCarManufacturerName2', @sdxCarManufacturerName2); - AProduct.Add('sdxCarManufacturerName3', @sdxCarManufacturerName3); - AProduct.Add('sdxCarManufacturerName4', @sdxCarManufacturerName4); - AProduct.Add('sdxCarManufacturerCountry1', @sdxCarManufacturerCountry1); - AProduct.Add('sdxCarManufacturerCountry2', @sdxCarManufacturerCountry2); - AProduct.Add('sdxCarManufacturerCountry3', @sdxCarManufacturerCountry3); - AProduct.Add('sdxCarManufacturerCountry4', @sdxCarManufacturerCountry4); - AProduct.Add('sdxCarModel1', @sdxCarModel1); - AProduct.Add('sdxCarModel2', @sdxCarModel2); - AProduct.Add('sdxCarModel3', @sdxCarModel3); - AProduct.Add('sdxCarModel4', @sdxCarModel4); - AProduct.Add('sdxTrue', @sdxTrue); - AProduct.Add('sdxFalse', @sdxFalse); - AProduct.Add('sdxAuto', @sdxAuto); - AProduct.Add('sdxCustom', @sdxCustom); - AProduct.Add('sdxEnv', @sdxEnv); - AProduct.Add('sdxLookAndFeelFlat', @sdxLookAndFeelFlat); - AProduct.Add('sdxLookAndFeelStandard', @sdxLookAndFeelStandard); - AProduct.Add('sdxLookAndFeelUltraFlat', @sdxLookAndFeelUltraFlat); - AProduct.Add('sdxViewTab', @sdxViewTab); - AProduct.Add('sdxBehaviorsTab', @sdxBehaviorsTab); - AProduct.Add('sdxPreviewTab', @sdxPreviewTab); - AProduct.Add('sdxCardsTab', @sdxCardsTab); - AProduct.Add('sdxFormatting', @sdxFormatting); - AProduct.Add('sdxLookAndFeel', @sdxLookAndFeel); - AProduct.Add('sdxLevelCaption', @sdxLevelCaption); - AProduct.Add('sdxFilterBar', @sdxFilterBar); - AProduct.Add('sdxRefinements', @sdxRefinements); - AProduct.Add('sdxProcessSelection', @sdxProcessSelection); - AProduct.Add('sdxProcessExactSelection', @sdxProcessExactSelection); - AProduct.Add('sdxExpanding', @sdxExpanding); - AProduct.Add('sdxGroups', @sdxGroups); - AProduct.Add('sdxDetails', @sdxDetails); - AProduct.Add('sdxStartFromActiveDetails', @sdxStartFromActiveDetails); - AProduct.Add('sdxOnlyActiveDetails', @sdxOnlyActiveDetails); - AProduct.Add('sdxVisible', @sdxVisible); - AProduct.Add('sdxPreviewAutoHeight', @sdxPreviewAutoHeight); - AProduct.Add('sdxPreviewMaxLineCount', @sdxPreviewMaxLineCount); - AProduct.Add('sdxSizes', @sdxSizes); - AProduct.Add('sdxKeepSameWidth', @sdxKeepSameWidth); - AProduct.Add('sdxKeepSameHeight', @sdxKeepSameHeight); - AProduct.Add('sdxFraming', @sdxFraming); - AProduct.Add('sdxSpacing', @sdxSpacing); - AProduct.Add('sdxShadow', @sdxShadow); - AProduct.Add('sdxDepth', @sdxDepth); - AProduct.Add('sdxPosition', @sdxPosition); - AProduct.Add('sdxPositioning', @sdxPositioning); - AProduct.Add('sdxHorizontal', @sdxHorizontal); - AProduct.Add('sdxVertical', @sdxVertical); - AProduct.Add('sdxSummaryFormat', @sdxSummaryFormat); - AProduct.Add('sdxCannotUseOnEveryPageMode', @sdxCannotUseOnEveryPageMode); - AProduct.Add('sdxIncorrectBandHeadersState', @sdxIncorrectBandHeadersState); - AProduct.Add('sdxIncorrectHeadersState', @sdxIncorrectHeadersState); - AProduct.Add('sdxIncorrectFootersState', @sdxIncorrectFootersState); - AProduct.Add('sdxCharts', @sdxCharts); - AProduct.Add('sdxTPicture', @sdxTPicture); - AProduct.Add('sdxCopy', @sdxCopy); - AProduct.Add('sdxSave', @sdxSave); - AProduct.Add('sdxBaseStyle', @sdxBaseStyle); -end; - -procedure AddResourceStringsPart3(AProduct: TdxProductResourceStrings); -begin - AProduct.Add('sdxComponentAlreadyExists', @sdxComponentAlreadyExists); - AProduct.Add('sdxInvalidComponentName', @sdxInvalidComponentName); - AProduct.Add('sdxRectangle', @sdxRectangle); - AProduct.Add('sdxSquare', @sdxSquare); - AProduct.Add('sdxEllipse', @sdxEllipse); - AProduct.Add('sdxCircle', @sdxCircle); - AProduct.Add('sdxRoundRect', @sdxRoundRect); - AProduct.Add('sdxRoundSquare', @sdxRoundSquare); - AProduct.Add('sdxHorizontalFillPattern', @sdxHorizontalFillPattern); - AProduct.Add('sdxVerticalFillPattern', @sdxVerticalFillPattern); - AProduct.Add('sdxFDiagonalFillPattern', @sdxFDiagonalFillPattern); - AProduct.Add('sdxBDiagonalFillPattern', @sdxBDiagonalFillPattern); - AProduct.Add('sdxCrossFillPattern', @sdxCrossFillPattern); - AProduct.Add('sdxDiagCrossFillPattern', @sdxDiagCrossFillPattern); - AProduct.Add('sdxCyclicIDReferences', @sdxCyclicIDReferences); - AProduct.Add('sdxLoadReportDataToFileTitle', @sdxLoadReportDataToFileTitle); - AProduct.Add('sdxSaveReportDataToFileTitle', @sdxSaveReportDataToFileTitle); - AProduct.Add('sdxInvalidExternalStorage', @sdxInvalidExternalStorage); - AProduct.Add('sdxLinkIsNotIncludedInUsesClause', @sdxLinkIsNotIncludedInUsesClause); - AProduct.Add('sdxInvalidStorageVersion', @sdxInvalidStorageVersion); - AProduct.Add('sdxPSReportFiles', @sdxPSReportFiles); - AProduct.Add('sdxReportFileLoadError', @sdxReportFileLoadError); - AProduct.Add('sdxNone', @sdxNone); - AProduct.Add('sdxReportDocumentIsCorrupted', @sdxReportDocumentIsCorrupted); - AProduct.Add('sdxCloseExplorerHint', @sdxCloseExplorerHint); - AProduct.Add('sdxExplorerCaption', @sdxExplorerCaption); - AProduct.Add('sdxExplorerRootFolderCaption', @sdxExplorerRootFolderCaption); - AProduct.Add('sdxNewExplorerFolderItem', @sdxNewExplorerFolderItem); - AProduct.Add('sdxCopyOfItem', @sdxCopyOfItem); - AProduct.Add('sdxReportExplorer', @sdxReportExplorer); - AProduct.Add('sdxDataLoadErrorText', @sdxDataLoadErrorText); - AProduct.Add('sdxDBBasedExplorerItemDataLoadError', @sdxDBBasedExplorerItemDataLoadError); - AProduct.Add('sdxFileBasedExplorerItemDataLoadError', @sdxFileBasedExplorerItemDataLoadError); - AProduct.Add('sdxDeleteNonEmptyFolderMessageText', @sdxDeleteNonEmptyFolderMessageText); - AProduct.Add('sdxDeleteFolderMessageText', @sdxDeleteFolderMessageText); - AProduct.Add('sdxDeleteItemMessageText', @sdxDeleteItemMessageText); - AProduct.Add('sdxCannotRenameFolderText', @sdxCannotRenameFolderText); - AProduct.Add('sdxCannotRenameItemText', @sdxCannotRenameItemText); - AProduct.Add('sdxOverwriteFolderMessageText', @sdxOverwriteFolderMessageText); - AProduct.Add('sdxOverwriteItemMessageText', @sdxOverwriteItemMessageText); - AProduct.Add('sdxSelectNewRoot', @sdxSelectNewRoot); - AProduct.Add('sdxInvalidFolderName', @sdxInvalidFolderName); - AProduct.Add('sdxInvalidReportName', @sdxInvalidReportName); - AProduct.Add('sdxExplorerBar', @sdxExplorerBar); - AProduct.Add('sdxMenuFileSave', @sdxMenuFileSave); - AProduct.Add('sdxMenuFileSaveAs', @sdxMenuFileSaveAs); - AProduct.Add('sdxMenuFileLoad', @sdxMenuFileLoad); - AProduct.Add('sdxMenuFileClose', @sdxMenuFileClose); - AProduct.Add('sdxHintFileSave', @sdxHintFileSave); - AProduct.Add('sdxHintFileSaveAs', @sdxHintFileSaveAs); - AProduct.Add('sdxHintFileLoad', @sdxHintFileLoad); - AProduct.Add('sdxHintFileClose', @sdxHintFileClose); - AProduct.Add('sdxMenuExplorer', @sdxMenuExplorer); - AProduct.Add('sdxMenuExplorerCreateFolder', @sdxMenuExplorerCreateFolder); - AProduct.Add('sdxMenuExplorerDelete', @sdxMenuExplorerDelete); - AProduct.Add('sdxMenuExplorerRename', @sdxMenuExplorerRename); - AProduct.Add('sdxMenuExplorerProperties', @sdxMenuExplorerProperties); - AProduct.Add('sdxMenuExplorerRefresh', @sdxMenuExplorerRefresh); - AProduct.Add('sdxMenuExplorerChangeRootPath', @sdxMenuExplorerChangeRootPath); - AProduct.Add('sdxMenuExplorerSetAsRoot', @sdxMenuExplorerSetAsRoot); - AProduct.Add('sdxMenuExplorerGoToUpOneLevel', @sdxMenuExplorerGoToUpOneLevel); - AProduct.Add('sdxHintExplorerCreateFolder', @sdxHintExplorerCreateFolder); - AProduct.Add('sdxHintExplorerDelete', @sdxHintExplorerDelete); - AProduct.Add('sdxHintExplorerRename', @sdxHintExplorerRename); - AProduct.Add('sdxHintExplorerProperties', @sdxHintExplorerProperties); - AProduct.Add('sdxHintExplorerRefresh', @sdxHintExplorerRefresh); - AProduct.Add('sdxHintExplorerChangeRootPath', @sdxHintExplorerChangeRootPath); - AProduct.Add('sdxHintExplorerSetAsRoot', @sdxHintExplorerSetAsRoot); - AProduct.Add('sdxHintExplorerGoToUpOneLevel', @sdxHintExplorerGoToUpOneLevel); - AProduct.Add('sdxMenuViewExplorer', @sdxMenuViewExplorer); - AProduct.Add('sdxHintViewExplorer', @sdxHintViewExplorer); - AProduct.Add('sdxSummary', @sdxSummary); - AProduct.Add('sdxCreator', @sdxCreator); - AProduct.Add('sdxCreationDate', @sdxCreationDate); - AProduct.Add('sdxMenuViewThumbnails', @sdxMenuViewThumbnails); - AProduct.Add('sdxMenuThumbnailsLarge', @sdxMenuThumbnailsLarge); - AProduct.Add('sdxMenuThumbnailsSmall', @sdxMenuThumbnailsSmall); - AProduct.Add('sdxHintViewThumbnails', @sdxHintViewThumbnails); - AProduct.Add('sdxHintThumbnailsLarge', @sdxHintThumbnailsLarge); - AProduct.Add('sdxHintThumbnailsSmall', @sdxHintThumbnailsSmall); - AProduct.Add('sdxMenuFormatTitle', @sdxMenuFormatTitle); - AProduct.Add('sdxHintFormatTitle', @sdxHintFormatTitle); - AProduct.Add('sdxHalf', @sdxHalf); - AProduct.Add('sdxPredefinedFunctions', @sdxPredefinedFunctions); - AProduct.Add('sdxZoomParameters', @sdxZoomParameters); - AProduct.Add('sdxWrapData', @sdxWrapData); - AProduct.Add('sdxMenuShortcutExplorer', @sdxMenuShortcutExplorer); - AProduct.Add('sdxExplorerToolBar', @sdxExplorerToolBar); - AProduct.Add('sdxMenuShortcutThumbnails', @sdxMenuShortcutThumbnails); - AProduct.Add('sdxButtons', @sdxButtons); - AProduct.Add('sdxBtnHeadersFont', @sdxBtnHeadersFont); - AProduct.Add('sdxHeadersTransparent', @sdxHeadersTransparent); - AProduct.Add('sdxHintListViewDesignerMessage', @sdxHintListViewDesignerMessage); - AProduct.Add('sdxColumnHeaders', @sdxColumnHeaders); - AProduct.Add('sdxReportGroupNullLookAndFeel', @sdxReportGroupNullLookAndFeel); - AProduct.Add('sdxReportGroupStandardLookAndFeel', @sdxReportGroupStandardLookAndFeel); - AProduct.Add('sdxReportGroupOfficeLookAndFeel', @sdxReportGroupOfficeLookAndFeel); - AProduct.Add('sdxReportGroupWebLookAndFeel', @sdxReportGroupWebLookAndFeel); - AProduct.Add('sdxLayoutGroupDefaultCaption', @sdxLayoutGroupDefaultCaption); - AProduct.Add('sdxLayoutItemDefaultCaption', @sdxLayoutItemDefaultCaption); - AProduct.Add('sdxCarManufacturerName5', @sdxCarManufacturerName5); - AProduct.Add('sdxCarManufacturerCountry5', @sdxCarManufacturerCountry5); - AProduct.Add('sdxCarModel5', @sdxCarModel5); - AProduct.Add('sdxLuxurySedans', @sdxLuxurySedans); - AProduct.Add('sdxCarManufacturer', @sdxCarManufacturer); - AProduct.Add('sdxCarModel', @sdxCarModel); - AProduct.Add('sdxCarEngine', @sdxCarEngine); - AProduct.Add('sdxCarTransmission', @sdxCarTransmission); - AProduct.Add('sdxCarTires', @sdxCarTires); - AProduct.Add('sdx760V12Manufacturer', @sdx760V12Manufacturer); - AProduct.Add('sdx760V12Model', @sdx760V12Model); - AProduct.Add('sdx760V12Engine', @sdx760V12Engine); - AProduct.Add('sdx760V12Transmission', @sdx760V12Transmission); - AProduct.Add('sdx760V12Tires', @sdx760V12Tires); - AProduct.Add('sdxBandBackgroundStyle', @sdxBandBackgroundStyle); - AProduct.Add('sdxBandHeaderStyle', @sdxBandHeaderStyle); - AProduct.Add('sdxCaptionStyle', @sdxCaptionStyle); - AProduct.Add('sdxCardCaptionRowStyle', @sdxCardCaptionRowStyle); - AProduct.Add('sdxCardRowCaptionStyle', @sdxCardRowCaptionStyle); - AProduct.Add('sdxCategoryStyle', @sdxCategoryStyle); - AProduct.Add('sdxContentStyle', @sdxContentStyle); - AProduct.Add('sdxContentEvenStyle', @sdxContentEvenStyle); - AProduct.Add('sdxContentOddStyle', @sdxContentOddStyle); - AProduct.Add('sdxFilterBarStyle', @sdxFilterBarStyle); - AProduct.Add('sdxFooterStyle', @sdxFooterStyle); - AProduct.Add('sdxFooterRowStyle', @sdxFooterRowStyle); - AProduct.Add('sdxGroupStyle', @sdxGroupStyle); - AProduct.Add('sdxHeaderStyle', @sdxHeaderStyle); - AProduct.Add('sdxIndentStyle', @sdxIndentStyle); - AProduct.Add('sdxPreviewStyle', @sdxPreviewStyle); - AProduct.Add('sdxSelectionStyle', @sdxSelectionStyle); - AProduct.Add('sdxStyles', @sdxStyles); - AProduct.Add('sdxStyleSheets', @sdxStyleSheets); - AProduct.Add('sdxBtnTexture', @sdxBtnTexture); - AProduct.Add('sdxBtnTextureClear', @sdxBtnTextureClear); - AProduct.Add('sdxBtnColor', @sdxBtnColor); - AProduct.Add('sdxBtnSaveAs', @sdxBtnSaveAs); - AProduct.Add('sdxBtnRename', @sdxBtnRename); - AProduct.Add('sdxLoadBitmapDlgTitle', @sdxLoadBitmapDlgTitle); - AProduct.Add('sdxDeleteStyleSheet', @sdxDeleteStyleSheet); - AProduct.Add('sdxUnnamedStyleSheet', @sdxUnnamedStyleSheet); - AProduct.Add('sdxCreateNewStyleQueryNamePrompt', @sdxCreateNewStyleQueryNamePrompt); - AProduct.Add('sdxStyleSheetNameAlreadyExists', @sdxStyleSheetNameAlreadyExists); - AProduct.Add('sdxCannotLoadImage', @sdxCannotLoadImage); - AProduct.Add('sdxUseNativeStyles', @sdxUseNativeStyles); - AProduct.Add('sdxSuppressBackgroundBitmaps', @sdxSuppressBackgroundBitmaps); - AProduct.Add('sdxConsumeSelectionStyle', @sdxConsumeSelectionStyle); - AProduct.Add('sdxSize', @sdxSize); - AProduct.Add('sdxLevels', @sdxLevels); - AProduct.Add('sdxUnwrap', @sdxUnwrap); - AProduct.Add('sdxUnwrapTopLevel', @sdxUnwrapTopLevel); - AProduct.Add('sdxRiseActiveToTop', @sdxRiseActiveToTop); - AProduct.Add('sdxCannotUseOnEveryPageModeInAggregatedState', @sdxCannotUseOnEveryPageModeInAggregatedState); - AProduct.Add('sdxPagination', @sdxPagination); - AProduct.Add('sdxByBands', @sdxByBands); - AProduct.Add('sdxByColumns', @sdxByColumns); - AProduct.Add('sdxByRows', @sdxByRows); - AProduct.Add('sdxByTopLevelGroups', @sdxByTopLevelGroups); - AProduct.Add('sdxOneGroupPerPage', @sdxOneGroupPerPage); - AProduct.Add('sdxSkipEmptyViews', @sdxSkipEmptyViews); - AProduct.Add('sdxBorders', @sdxBorders); - AProduct.Add('sdxExplicitlyExpandNodes', @sdxExplicitlyExpandNodes); - AProduct.Add('sdxNodes', @sdxNodes); - AProduct.Add('sdxSeparators', @sdxSeparators); - AProduct.Add('sdxThickness', @sdxThickness); - AProduct.Add('sdxTLIncorrectHeadersState', @sdxTLIncorrectHeadersState); - AProduct.Add('sdxRows', @sdxRows); - AProduct.Add('sdxMultipleRecords', @sdxMultipleRecords); - AProduct.Add('sdxBestFit', @sdxBestFit); - AProduct.Add('sdxKeepSameRecordWidths', @sdxKeepSameRecordWidths); - AProduct.Add('sdxWrapRecords', @sdxWrapRecords); - AProduct.Add('sdxByWrapping', @sdxByWrapping); - AProduct.Add('sdxOneWrappingPerPage', @sdxOneWrappingPerPage); - AProduct.Add('sdxCurrentRecord', @sdxCurrentRecord); - AProduct.Add('sdxLoadedRecords', @sdxLoadedRecords); - AProduct.Add('sdxAllRecords', @sdxAllRecords); - AProduct.Add('sdxPaginateByControlDetails', @sdxPaginateByControlDetails); - AProduct.Add('sdxPaginateByControls', @sdxPaginateByControls); - AProduct.Add('sdxPaginateByGroups', @sdxPaginateByGroups); - AProduct.Add('sdxPaginateByItems', @sdxPaginateByItems); - AProduct.Add('sdxControlsPlace', @sdxControlsPlace); - AProduct.Add('sdxExpandHeight', @sdxExpandHeight); - AProduct.Add('sdxExpandWidth', @sdxExpandWidth); - AProduct.Add('sdxShrinkHeight', @sdxShrinkHeight); - AProduct.Add('sdxShrinkWidth', @sdxShrinkWidth); - AProduct.Add('sdxCheckAll', @sdxCheckAll); - AProduct.Add('sdxCheckAllChildren', @sdxCheckAllChildren); - AProduct.Add('sdxControlsTab', @sdxControlsTab); - AProduct.Add('sdxExpandAll', @sdxExpandAll); - AProduct.Add('sdxHiddenControlsTab', @sdxHiddenControlsTab); - AProduct.Add('sdxReportLinksTab', @sdxReportLinksTab); - AProduct.Add('sdxAvailableLinks', @sdxAvailableLinks); - AProduct.Add('sdxAggregatedLinks', @sdxAggregatedLinks); - AProduct.Add('sdxTransparents', @sdxTransparents); - AProduct.Add('sdxUncheckAllChildren', @sdxUncheckAllChildren); - AProduct.Add('sdxRoot', @sdxRoot); - AProduct.Add('sdxRootBorders', @sdxRootBorders); - AProduct.Add('sdxControls', @sdxControls); - AProduct.Add('sdxContainers', @sdxContainers); - AProduct.Add('sdxHideCustomContainers', @sdxHideCustomContainers); - AProduct.Add('sdxBytes', @sdxBytes); - AProduct.Add('sdxKiloBytes', @sdxKiloBytes); - AProduct.Add('sdxMegaBytes', @sdxMegaBytes); - AProduct.Add('sdxGigaBytes', @sdxGigaBytes); - AProduct.Add('sdxThereIsNoPictureToDisplay', @sdxThereIsNoPictureToDisplay); - AProduct.Add('sdxInvalidRootDirectory', @sdxInvalidRootDirectory); - AProduct.Add('sdxPressEscToCancel', @sdxPressEscToCancel); - AProduct.Add('sdxMenuFileRebuild', @sdxMenuFileRebuild); - AProduct.Add('sdxBuildingReportStatusText', @sdxBuildingReportStatusText); - AProduct.Add('sdxPrintingReportStatusText', @sdxPrintingReportStatusText); - AProduct.Add('sdxBuiltIn', @sdxBuiltIn); - AProduct.Add('sdxUserDefined', @sdxUserDefined); - AProduct.Add('sdxNewStyleRepositoryWasCreated', @sdxNewStyleRepositoryWasCreated); - AProduct.Add('sdxLineSpacing', @sdxLineSpacing); - AProduct.Add('sdxTextAlignJustified', @sdxTextAlignJustified); - AProduct.Add('sdxSampleText', @sdxSampleText); - AProduct.Add('sdxCardsRows', @sdxCardsRows); - AProduct.Add('sdxTransparentRichEdits', @sdxTransparentRichEdits); - AProduct.Add('sdxIncorrectFilterBarState', @sdxIncorrectFilterBarState); - AProduct.Add('sdxIncorrectBandHeadersState2', @sdxIncorrectBandHeadersState2); - AProduct.Add('sdxIncorrectHeadersState2', @sdxIncorrectHeadersState2); - AProduct.Add('sdxAvailableReportLinks', @sdxAvailableReportLinks); - AProduct.Add('sdxBtnRemoveInconsistents', @sdxBtnRemoveInconsistents); - AProduct.Add('sdxColumnHeadersOnEveryPage', @sdxColumnHeadersOnEveryPage); - AProduct.Add('sdxNotes', @sdxNotes); - AProduct.Add('sdxTaskPad', @sdxTaskPad); - AProduct.Add('sdxPrimaryTimeZone', @sdxPrimaryTimeZone); - AProduct.Add('sdxSecondaryTimeZone', @sdxSecondaryTimeZone); - AProduct.Add('sdxDay', @sdxDay); - AProduct.Add('sdxWeek', @sdxWeek); - AProduct.Add('sdxMonth', @sdxMonth); - AProduct.Add('sdxSchedulerSchedulerHeader', @sdxSchedulerSchedulerHeader); - AProduct.Add('sdxSchedulerContent', @sdxSchedulerContent); - AProduct.Add('sdxSchedulerDateNavigatorContent', @sdxSchedulerDateNavigatorContent); - AProduct.Add('sdxSchedulerDateNavigatorHeader', @sdxSchedulerDateNavigatorHeader); - AProduct.Add('sdxSchedulerDayHeader', @sdxSchedulerDayHeader); - AProduct.Add('sdxSchedulerEvent', @sdxSchedulerEvent); - AProduct.Add('sdxSchedulerResourceHeader', @sdxSchedulerResourceHeader); - AProduct.Add('sdxSchedulerNotesAreaBlank', @sdxSchedulerNotesAreaBlank); - AProduct.Add('sdxSchedulerNotesAreaLined', @sdxSchedulerNotesAreaLined); - AProduct.Add('sdxSchedulerTaskPad', @sdxSchedulerTaskPad); - AProduct.Add('sdxSchedulerTimeRuler', @sdxSchedulerTimeRuler); - AProduct.Add('sdxPrintStyleNameDaily', @sdxPrintStyleNameDaily); - AProduct.Add('sdxPrintStyleNameWeekly', @sdxPrintStyleNameWeekly); - AProduct.Add('sdxPrintStyleNameMonthly', @sdxPrintStyleNameMonthly); - AProduct.Add('sdxPrintStyleNameDetails', @sdxPrintStyleNameDetails); - AProduct.Add('sdxPrintStyleNameMemo', @sdxPrintStyleNameMemo); - AProduct.Add('sdxPrintStyleNameTrifold', @sdxPrintStyleNameTrifold); - AProduct.Add('sdxPrintStyleCaptionDaily', @sdxPrintStyleCaptionDaily); - AProduct.Add('sdxPrintStyleCaptionWeekly', @sdxPrintStyleCaptionWeekly); - AProduct.Add('sdxPrintStyleCaptionMonthly', @sdxPrintStyleCaptionMonthly); - AProduct.Add('sdxPrintStyleCaptionDetails', @sdxPrintStyleCaptionDetails); - AProduct.Add('sdxPrintStyleCaptionMemo', @sdxPrintStyleCaptionMemo); - AProduct.Add('sdxPrintStyleCaptionTimeLine', @sdxPrintStyleCaptionTimeLine); - AProduct.Add('sdxPrintStyleCaptionTrifold', @sdxPrintStyleCaptionTrifold); - AProduct.Add('sdxPrintStyleCaptionYearly', @sdxPrintStyleCaptionYearly); - AProduct.Add('sdxPrintStyleShowEventImages', @sdxPrintStyleShowEventImages); - AProduct.Add('sdxPrintStyleShowResourceImages', @sdxPrintStyleShowResourceImages); - AProduct.Add('sdxTabPrintStyles', @sdxTabPrintStyles); - AProduct.Add('sdxPrintStyleDontPrintWeekEnds', @sdxPrintStyleDontPrintWeekEnds); - AProduct.Add('sdxPrintStyleWorkTimeOnly', @sdxPrintStyleWorkTimeOnly); - AProduct.Add('sdxPrintStyleInclude', @sdxPrintStyleInclude); - AProduct.Add('sdxPrintStyleIncludeTaskPad', @sdxPrintStyleIncludeTaskPad); - AProduct.Add('sdxPrintStyleIncludeNotesAreaBlank', @sdxPrintStyleIncludeNotesAreaBlank); - AProduct.Add('sdxPrintStyleIncludeNotesAreaLined', @sdxPrintStyleIncludeNotesAreaLined); - AProduct.Add('sdxPrintStyleLayout', @sdxPrintStyleLayout); - AProduct.Add('sdxPrintStylePrintFrom', @sdxPrintStylePrintFrom); - AProduct.Add('sdxPrintStylePrintTo', @sdxPrintStylePrintTo); - AProduct.Add('sdxPrintStyleDailyLayout1PPD', @sdxPrintStyleDailyLayout1PPD); - AProduct.Add('sdxPrintStyleDailyLayout2PPD', @sdxPrintStyleDailyLayout2PPD); - AProduct.Add('sdxPrintStyleWeeklyArrange', @sdxPrintStyleWeeklyArrange); - AProduct.Add('sdxPrintStyleWeeklyArrangeT2B', @sdxPrintStyleWeeklyArrangeT2B); - AProduct.Add('sdxPrintStyleWeeklyArrangeL2R', @sdxPrintStyleWeeklyArrangeL2R); - AProduct.Add('sdxPrintStyleWeeklyLayout1PPW', @sdxPrintStyleWeeklyLayout1PPW); - AProduct.Add('sdxPrintStyleWeeklyLayout2PPW', @sdxPrintStyleWeeklyLayout2PPW); - AProduct.Add('sdxPrintStyleWeeklyDaysLayout', @sdxPrintStyleWeeklyDaysLayout); - AProduct.Add('sdxPrintStyleWeeklyDaysLayoutTC', @sdxPrintStyleWeeklyDaysLayoutTC); - AProduct.Add('sdxPrintStyleWeeklyDaysLayoutOC', @sdxPrintStyleWeeklyDaysLayoutOC); - AProduct.Add('sdxPrintStyleMemoStartEachItemOnNewPage', @sdxPrintStyleMemoStartEachItemOnNewPage); - AProduct.Add('sdxPrintStyleMemoPrintOnlySelectedEvents', @sdxPrintStyleMemoPrintOnlySelectedEvents); - AProduct.Add('sdxPrintStyleMonthlyLayout1PPM', @sdxPrintStyleMonthlyLayout1PPM); - AProduct.Add('sdxPrintStyleMonthlyLayout2PPM', @sdxPrintStyleMonthlyLayout2PPM); - AProduct.Add('sdxPrintStyleMonthlyPrintExactly1MPP', @sdxPrintStyleMonthlyPrintExactly1MPP); - AProduct.Add('sdxPrintStyleTrifoldSectionModeDailyCalendar', @sdxPrintStyleTrifoldSectionModeDailyCalendar); - AProduct.Add('sdxPrintStyleTrifoldSectionModeWeeklyCalendar', @sdxPrintStyleTrifoldSectionModeWeeklyCalendar); - AProduct.Add('sdxPrintStyleTrifoldSectionModeMonthlyCalendar', @sdxPrintStyleTrifoldSectionModeMonthlyCalendar); - AProduct.Add('sdxPrintStyleTrifoldSectionModeTaskPad', @sdxPrintStyleTrifoldSectionModeTaskPad); - AProduct.Add('sdxPrintStyleTrifoldSectionModeNotesBlank', @sdxPrintStyleTrifoldSectionModeNotesBlank); - AProduct.Add('sdxPrintStyleTrifoldSectionModeNotesLined', @sdxPrintStyleTrifoldSectionModeNotesLined); - AProduct.Add('sdxPrintStyleTrifoldSectionLeft', @sdxPrintStyleTrifoldSectionLeft); - AProduct.Add('sdxPrintStyleTrifoldSectionMiddle', @sdxPrintStyleTrifoldSectionMiddle); - AProduct.Add('sdxPrintStyleTrifoldSectionRight', @sdxPrintStyleTrifoldSectionRight); - AProduct.Add('sdxPrintStyleMonthPerPage', @sdxPrintStyleMonthPerPage); - AProduct.Add('sdxPrintStyleYearly1MPP', @sdxPrintStyleYearly1MPP); - AProduct.Add('sdxPrintStyleYearly2MPP', @sdxPrintStyleYearly2MPP); - AProduct.Add('sdxPrintStyleYearly3MPP', @sdxPrintStyleYearly3MPP); - AProduct.Add('sdxPrintStyleYearly4MPP', @sdxPrintStyleYearly4MPP); - AProduct.Add('sdxPrintStyleYearly6MPP', @sdxPrintStyleYearly6MPP); - AProduct.Add('sdxPrintStyleYearly12MPP', @sdxPrintStyleYearly12MPP); - AProduct.Add('sdxPrintStylePrimaryPageScalesOnly', @sdxPrintStylePrimaryPageScalesOnly); - AProduct.Add('sdxPrintStylePrimaryPageHeadersOnly', @sdxPrintStylePrimaryPageHeadersOnly); - AProduct.Add('sdxPrintStyleDetailsStartNewPageEach', @sdxPrintStyleDetailsStartNewPageEach); - AProduct.Add('sdxSuppressContentColoration', @sdxSuppressContentColoration); - AProduct.Add('sdxOneResourcePerPage', @sdxOneResourcePerPage); - AProduct.Add('sdxPrintRanges', @sdxPrintRanges); - AProduct.Add('sdxPrintRangeStart', @sdxPrintRangeStart); - AProduct.Add('sdxPrintRangeEnd', @sdxPrintRangeEnd); - AProduct.Add('sdxHideDetailsOfPrivateAppointments', @sdxHideDetailsOfPrivateAppointments); - AProduct.Add('sdxResourceCountPerPage', @sdxResourceCountPerPage); - AProduct.Add('sdxSubjectLabelCaption', @sdxSubjectLabelCaption); - AProduct.Add('sdxLocationLabelCaption', @sdxLocationLabelCaption); - AProduct.Add('sdxStartLabelCaption', @sdxStartLabelCaption); - AProduct.Add('sdxFinishLabelCaption', @sdxFinishLabelCaption); - AProduct.Add('sdxShowTimeAsLabelCaption', @sdxShowTimeAsLabelCaption); - AProduct.Add('sdxRecurrenceLabelCaption', @sdxRecurrenceLabelCaption); - AProduct.Add('sdxRecurrencePatternLabelCaption', @sdxRecurrencePatternLabelCaption); - AProduct.Add('sdxSeeAboveMessage', @sdxSeeAboveMessage); - AProduct.Add('sdxAllDayMessage', @sdxAllDayMessage); - AProduct.Add('sdxContinuedMessage', @sdxContinuedMessage); - AProduct.Add('sdxShowTimeAsFreeMessage', @sdxShowTimeAsFreeMessage); - AProduct.Add('sdxShowTimeAsTentativeMessage', @sdxShowTimeAsTentativeMessage); - AProduct.Add('sdxShowTimeAsOutOfOfficeMessage', @sdxShowTimeAsOutOfOfficeMessage); - AProduct.Add('sdxRecurrenceNoneMessage', @sdxRecurrenceNoneMessage); - AProduct.Add('scxRecurrenceDailyMessage', @scxRecurrenceDailyMessage); - AProduct.Add('scxRecurrenceWeeklyMessage', @scxRecurrenceWeeklyMessage); - AProduct.Add('scxRecurrenceMonthlyMessage', @scxRecurrenceMonthlyMessage); - AProduct.Add('scxRecurrenceYearlyMessage', @scxRecurrenceYearlyMessage); - AProduct.Add('sdxInconsistentTrifoldStyle', @sdxInconsistentTrifoldStyle); - AProduct.Add('sdxBadTimePrintRange', @sdxBadTimePrintRange); - AProduct.Add('sdxBadDatePrintRange', @sdxBadDatePrintRange); - AProduct.Add('sdxCannotPrintNoSelectedItems', @sdxCannotPrintNoSelectedItems); - AProduct.Add('sdxCannotPrintNoItemsAvailable', @sdxCannotPrintNoItemsAvailable); - AProduct.Add('sdxColumnFields', @sdxColumnFields); - AProduct.Add('sdxDataFields', @sdxDataFields); - AProduct.Add('sdxFiterFields', @sdxFiterFields); - AProduct.Add('sdxPrefilter', @sdxPrefilter); - AProduct.Add('sdxRowFields', @sdxRowFields); - AProduct.Add('sdxAutoColumnsExpand', @sdxAutoColumnsExpand); - AProduct.Add('sdxAutoRowsExpand', @sdxAutoRowsExpand); - AProduct.Add('sdxPivotGridColumnHeader', @sdxPivotGridColumnHeader); - AProduct.Add('sdxPivotGridContent', @sdxPivotGridContent); - AProduct.Add('sdxPivotGridFieldHeader', @sdxPivotGridFieldHeader); - AProduct.Add('sdxPivotGridHeaderBackground', @sdxPivotGridHeaderBackground); - AProduct.Add('sdxPivotGridRowHeader', @sdxPivotGridRowHeader); - AProduct.Add('sdxUnitPrice', @sdxUnitPrice); - AProduct.Add('sdxCarName', @sdxCarName); - AProduct.Add('sdxQuantity', @sdxQuantity); - AProduct.Add('sdxPaymentAmount', @sdxPaymentAmount); - AProduct.Add('sdxPurchaseQuarter', @sdxPurchaseQuarter); - AProduct.Add('sdxPurchaseMonth', @sdxPurchaseMonth); - AProduct.Add('sdxPaymentType', @sdxPaymentType); - AProduct.Add('sdxCompanyName', @sdxCompanyName); -end; - -procedure AddExpressPrintingSystemResourceStringNames(AProduct: TdxProductResourceStrings); -begin - // Split into parts because D12 compiler error - AddResourceStringsPart1(AProduct); - AddResourceStringsPart2(AProduct); - AddResourceStringsPart3(AProduct); -end; - -initialization - dxResourceStringsRepository.RegisterProduct('ExpressPrinting System', @AddExpressPrintingSystemResourceStringNames); - -finalization - dxResourceStringsRepository.UnRegisterProduct('ExpressPrinting System'); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSShapes.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSShapes.pas deleted file mode 100644 index de49e1c8..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSShapes.pas +++ /dev/null @@ -1,538 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSShapes; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, Graphics, dxBase, dxPSCore, dxPSFillPatterns; - -type - TdxReportCellShapeClass = class of TCustomdxReportCellShape; - - TdxPSShapeFactory = class(TdxCustomClassFactory) - private - function GetItem(Index: Integer): TdxReportCellShapeClass; - public - class function Instance: TdxPSShapeFactory; reintroduce; overload; - procedure GetList(const AStrings: TStrings); - property Items[Index: Integer]: TdxReportCellShapeClass read GetItem; default; - end; - - TCustomdxReportCellShape = class(TAbstractdxReportCellData) - private - FContentBkColor: TColor; - FContentPattern: TdxPSFillPatternClass; - FShapeBorderColor: TColor; - FShapeBorderThickness: Integer; - FShapeColor: TColor; - function GetShapeTransparent: Boolean; - procedure SetShapeBorderThickness(Value: Integer); - procedure SetShapeTransparent(Value: Boolean); - protected - function GetContentBkColor: TColor; override; - function GetContentPattern: TdxPSFillPatternClass; override; - procedure SetContentBkColor(Value: TColor); override; - procedure SetContentPattern(Value: TdxPSFillPatternClass); override; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - function GetShapeCenter: TPoint; virtual; - function GetShapeHeight: Integer; virtual; - function GetShapeRect: TRect; virtual; - function GetShapeWidth: Integer; virtual; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - - class function Name: string; virtual; - class procedure RegisterShape; virtual; - class procedure UnregisterShape; virtual; - - property ShapeBorderColor: TColor read FShapeBorderColor write FShapeBorderColor; - property ShapeBorderThickness: Integer read FShapeBorderThickness write SetShapeBorderThickness; - property ShapeCenter: TPoint read GetShapeCenter; - property ShapeColor: TColor read FShapeColor write FShapeColor; - property ShapeHeight: Integer read GetShapeHeight; - property ShapeRect: TRect read GetShapeRect; - property ShapeTransparent: Boolean read GetShapeTransparent write SetShapeTransparent; - property ShapeWidth: Integer read GetShapeWidth; - end; - - TCustomdxReportCellEllipseShape = class(TCustomdxReportCellShape) - private - function GetRadiusHorz: Integer; - function GetRadiusVert: Integer; - protected - property RadiusHorz: Integer read GetRadiusHorz; - property RadiusVert: Integer read GetRadiusVert; - public - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - end; - - TdxReportCellEllipse = class(TCustomdxReportCellEllipseShape) - public - class function Name: string; override; - property RadiusHorz; - property RadiusVert; - end; - - TdxReportCellCircle = class(TCustomdxReportCellEllipseShape) - private - function GetRadius: Integer; - protected - function GetShapeHeight: Integer; override; - function GetShapeWidth: Integer; override; - public - class function Name: string; override; - property Radius: Integer read GetRadius; - end; - - TCustomdxReportCellRectangle = class(TCustomdxReportCellShape) - protected - function GetShapeRect: TRect; override; - public - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - end; - - TdxReportCellRectangle = class(TCustomdxReportCellRectangle) - public - class function Name: string; override; - end; - - TdxReportCellSquare = class(TCustomdxReportCellRectangle) - protected - function GetShapeHeight: Integer; override; - function GetShapeWidth: Integer; override; - public - class function Name: string; override; - end; - - TdxReportCellRoundRect = class(TCustomdxReportCellRectangle) - private - FEllipseHeight: Integer; - FEllipseWidth: Integer; - procedure SetEllipseHeight(Value: Integer); - procedure SetEllipseWidth(Value: Integer); - protected - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function Name: string; override; - - property EllipseHeight: Integer read FEllipseHeight write SetEllipseHeight; - property EllipseWidth: Integer read FEllipseWidth write SetEllipseWidth; - end; - - TdxReportCellRoundSquare = class(TdxReportCellRoundRect) - protected - function GetShapeHeight: Integer; override; - function GetShapeWidth: Integer; override; - public - class function Name: string; override; - end; - -implementation - -uses - cxClasses, dxPSGlbl, dxPSRes, dxPSUtl; - -{ TdxPSShapeFactory } - -function dxPSShapeFactory: TdxPSShapeFactory; -begin - Result := TdxPSShapeFactory.Instance; -end; - -class function TdxPSShapeFactory.Instance: TdxPSShapeFactory; -begin - Result := inherited Instance as TdxPSShapeFactory; -end; - -procedure TdxPSShapeFactory.GetList(const AStrings: TStrings); -var - I: Integer; - Shape: TdxReportCellShapeClass; -begin - AStrings.BeginUpdate; - try - for I := 0 to Count - 1 do - begin - Shape := Items[I]; - AStrings.AddObject(Shape.Name, TObject(Shape)); - end; - finally - AStrings.EndUpdate; - end; -end; - -function TdxPSShapeFactory.GetItem(Index: Integer): TdxReportCellShapeClass; -begin - Result := TdxReportCellShapeClass(inherited Items[Index]); -end; - -{ TCustomdxReportCellShape } - -constructor TCustomdxReportCellShape.Create(AParent: TdxReportCell); -begin - inherited; - FShapeBorderColor := clBlack; - FShapeBorderThickness := 1; -end; - -procedure TCustomdxReportCellShape.Assign(Source: TPersistent); -begin - inherited; - if Source is TCustomdxReportCellShape then - with TCustomdxReportCellShape(Source) do - begin - Self.ShapeBorderColor := ShapeBorderColor; - Self.ShapeBorderThickness := ShapeBorderThickness; - Self.ShapeColor := ShapeColor; - end; -end; - -class function TCustomdxReportCellShape.Name: string; -begin - Result := ''; -end; - -class procedure TCustomdxReportCellShape.RegisterShape; -begin - dxPSShapeFactory.Register(Self); -end; - -class procedure TCustomdxReportCellShape.UnregisterShape; -begin - dxPSShapeFactory.Unregister(Self); -end; - -function TCustomdxReportCellShape.GetContentBkColor: TColor; -begin - Result := FContentBkColor; -end; - -function TCustomdxReportCellShape.GetContentPattern: TdxPSFillPatternClass; -begin - Result := FContentPattern; -end; - -procedure TCustomdxReportCellShape.SetContentBkColor(Value: TColor); -begin - FContentBkColor := Value; -end; - -procedure TCustomdxReportCellShape.SetContentPattern(Value: TdxPSFillPatternClass); -begin - FContentPattern := Value; -end; - -procedure TCustomdxReportCellShape.ReadData(AReader: TdxPSDataReader); -begin - inherited; - ShapeBorderColor := AReader.ReadInteger; - ShapeBorderThickness := AReader.ReadInteger; - ShapeColor := AReader.ReadInteger; -end; - -procedure TCustomdxReportCellShape.WriteData(AWriter: TdxPSDataWriter); -begin - inherited; - AWriter.WriteInteger(ShapeBorderColor); - AWriter.WriteInteger(ShapeBorderThickness); - AWriter.WriteInteger(ShapeColor); -end; - -function TCustomdxReportCellShape.GetShapeCenter: TPoint; -begin - Result.X := Left + Width div 2; - Result.Y := Top + Height div 2; -end; - -function TCustomdxReportCellShape.GetShapeHeight: Integer; -begin - Result := Height; -end; - -function TCustomdxReportCellShape.GetShapeRect: TRect; -var - SW, SH: Integer; -begin - SH := ShapeHeight; - SW := ShapeWidth; - with ShapeCenter do - Result := MakeBounds(X - SW div 2, Y - SH div 2, SW, SH); -end; - -function TCustomdxReportCellShape.GetShapeWidth: Integer; -begin - Result := Width; -end; - -function TCustomdxReportCellShape.GetShapeTransparent: Boolean; -begin - Result := GetFormatBit(dxFormatShapeTransparent); -end; - -procedure TCustomdxReportCellShape.SetShapeBorderThickness(Value: Integer); -begin - if Value < 0 then Value := 0; - FShapeBorderThickness := Value; -end; - -procedure TCustomdxReportCellShape.SetShapeTransparent(Value: Boolean); -begin - SetFormatBit(dxFormatShapeTransparent, Value); -end; - -{ TCustomdxReportCellEllipseShape } - -procedure TCustomdxReportCellEllipseShape.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - Renderer.DrawEllipse(DC, ShapeRect, ShapeColor, ContentBkColor, ContentPattern, - ShapeBorderColor, ShapeBorderThickness); -end; - -function TCustomdxReportCellEllipseShape.GetRadiusHorz: Integer; -begin - Result := ShapeWidth div 2; -end; - -function TCustomdxReportCellEllipseShape.GetRadiusVert: Integer; -begin - Result := ShapeHeight div 2; -end; - -{ TdxReportCellEllipse } - -class function TdxReportCellEllipse.Name: string; -begin - Result := cxGetResourcestring(@sdxEllipse); -end; - -{ TdxReportCellCircle } - -class function TdxReportCellCircle.Name: string; -begin - Result := cxGetResourcestring(@sdxCircle); -end; - -function TdxReportCellCircle.GetShapeHeight: Integer; -begin - if Width > Height then - Result := inherited GetShapeHeight - else - Result := ShapeWidth; -end; - -function TdxReportCellCircle.GetShapeWidth: Integer; -begin - if Width > Height then - Result := ShapeHeight - else - Result := inherited GetShapeWidth; -end; - -function TdxReportCellCircle.GetRadius: Integer; -begin - Result := RadiusHorz; -end; - -{ TCustomdxReportCellRectangle } - -procedure TCustomdxReportCellRectangle.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - Renderer.DrawRectangle(DC, ShapeRect, ShapeColor, ContentBkColor, ContentPattern, - ShapeBorderColor, ShapeBorderThickness); -end; - -function TCustomdxReportCellRectangle.GetShapeRect: TRect; -var - SH, SW: Integer; -begin - SH := ShapeHeight; - SW := ShapeWidth; - with ShapeCenter do - Result := MakeBounds(X - SW div 2, Y - SH div 2, SW, SH); -end; - -{ TdxReportCellRectangle } - -class function TdxReportCellRectangle.Name: string; -begin - Result := cxGetResourcestring(@sdxRectangle); -end; - -{ TdxReportCellSquare } - -class function TdxReportCellSquare.Name: string; -begin - Result := cxGetResourcestring(@sdxSquare); -end; - -function TdxReportCellSquare.GetShapeHeight: Integer; -begin - if Width > Height then - Result := inherited GetShapeHeight - else - Result := ShapeWidth; -end; - -function TdxReportCellSquare.GetShapeWidth: Integer; -begin - if Width > Height then - Result := ShapeHeight - else - Result := inherited GetShapeWidth; -end; - -{ TdxReportCellRoundRect } - -constructor TdxReportCellRoundRect.Create(AParent: TdxReportCell); -begin - inherited; - FEllipseHeight := 2; - FEllipseWidth := 2; -end; - -procedure TdxReportCellRoundRect.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxReportCellRoundRect then - with TdxReportCellRoundRect(Source) do - begin - Self.EllipseHeight := EllipseHeight; - Self.EllipseWidth := EllipseWidth; - end; -end; - -procedure TdxReportCellRoundRect.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - Renderer.DrawRoundRect(DC, ShapeRect, EllipseWidth, EllipseHeight, ShapeColor, - ContentBkColor, ContentPattern, ShapeBorderColor, ShapeBorderThickness); -end; - -class function TdxReportCellRoundRect.Name: string; -begin - Result := cxGetResourcestring(@sdxRoundRect); -end; - -procedure TdxReportCellRoundRect.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -begin - inherited; - FEllipseHeight := MulDiv(FEllipseHeight, APixelsNumerator, APixelsDenominator); - FEllipseWidth := MulDiv(FEllipseWidth, APixelsNumerator, APixelsDenominator); -end; - -procedure TdxReportCellRoundRect.SetEllipseHeight(Value: Integer); -begin - if Value < 0 then Value := 0; - FEllipseHeight := Value; -end; - -procedure TdxReportCellRoundRect.SetEllipseWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - FEllipseWidth := Value; -end; - -{ TdxReportCellRoundSquare } - -class function TdxReportCellRoundSquare.Name: string; -begin - Result := cxGetResourcestring(@sdxRoundSquare); -end; - -function TdxReportCellRoundSquare.GetShapeHeight: Integer; -begin - if Width > Height then - Result := inherited GetShapeHeight - else - Result := ShapeWidth; -end; - -function TdxReportCellRoundSquare.GetShapeWidth: Integer; -begin - if Width > Height then - Result := ShapeHeight - else - Result := inherited GetShapeWidth; -end; - -procedure RegisterItems; -begin - TdxReportCellEllipse.Register; - TdxReportCellCircle.Register; - TdxReportCellRectangle.Register; - TdxReportCellSquare.Register; - TdxReportCellRoundRect.Register; - TdxReportCellRoundSquare.Register; -end; - -procedure RegisterShapes; -begin - TdxReportCellEllipse.RegisterShape; - TdxReportCellCircle.RegisterShape; - TdxReportCellRectangle.RegisterShape; - TdxReportCellSquare.RegisterShape; - TdxReportCellRoundRect.RegisterShape; - TdxReportCellRoundSquare.RegisterShape; -end; - -procedure UnregisterItems; -begin - TdxReportCellRoundSquare.Unregister; - TdxReportCellRoundRect.Unregister; - TdxReportCellSquare.Unregister; - TdxReportCellRectangle.Unregister; - TdxReportCellCircle.Unregister; - TdxReportCellEllipse.Unregister; -end; - -initialization - RegisterItems; - RegisterShapes; - -finalization - UnregisterItems; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSSngltn.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSSngltn.pas deleted file mode 100644 index 301a6482..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSSngltn.pas +++ /dev/null @@ -1,289 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSSngltn; - -interface - -{$I cxVer.inc} - -uses - Windows, SysUtils, dxCore; - -type - EdxPSSingleton = class(EdxException); - - TBasedxPSSingletonClass = class of TBasedxPSSingleton; - - TBasedxPSSingleton = class - private - class function GetInstance(AccessCode: Integer): TBasedxPSSingleton; virtual; - class function IndexOf: Integer; - procedure Register; virtual; - procedure Unregister; virtual; - protected - constructor CreateInstance(Dummy: Integer); - procedure FinalizeInstance; virtual; - procedure InitializeInstance; virtual; - public - constructor Create; virtual; - destructor Destroy; override; - class function Instance: TBasedxPSSingleton; overload; virtual; - class procedure ReleaseInstance; virtual; - end; - -implementation - -uses - Classes; - -const - SingletonAccess = 0; - SingletonCreate = 1; - SingletonRelease = 2; - -const - rsdxSingletonAccessOnlyThroughInstance = 'Access class %s through Instance only'; - rsdxSingletonIllegalAccessCode = 'Illegal AccessCode %d in GetInstance'; - -type - TdxPSSingletonFactory = class (TBasedxPSSingleton) - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TBasedxPSSingleton; - function GetItemClass(Index: Integer): TBasedxPSSingletonClass; - - class function GetInstance(AccessCode: Integer): TBasedxPSSingleton; override; - procedure Register; override; - procedure Unregister; override; - protected - procedure FinalizeInstance; override; - procedure RegisterSingleton(ASingleton: TBasedxPSSingleton); - procedure UnregisterSingleton(ASingleton: TBasedxPSSingleton); - public - function IndexOf(ASingletonClass: TBasedxPSSingletonClass): Integer; - class function Instance: TdxPSSingletonFactory; reintroduce; overload; - property Count: Integer read GetCount; - property ItemClasses[Index: Integer]: TBasedxPSSingletonClass read GetItemClass; - property Items[Index: Integer]: TBasedxPSSingleton read GetItem; default; - end; - -function SingletonFactory: TdxPSSingletonFactory; -begin - Result := TdxPSSingletonFactory.Instance; -end; - -function HasSingletonFactory: Boolean; -begin - Result := TdxPSSingletonFactory.GetInstance(SingletonAccess) <> nil; -end; - -procedure SingletonError(const message: string); -begin - raise EdxPSSingleton.Create(message); -end; - -{ TdxPSSingletonFactory } - -function TdxPSSingletonFactory.IndexOf(ASingletonClass: TBasedxPSSingletonClass): Integer; -begin - for Result := 0 to Count - 1 do - if ItemClasses[Result] = ASingletonClass then Exit; - Result := -1; -end; - -class function TdxPSSingletonFactory.Instance: TdxPSSingletonFactory; -begin - Result := inherited Instance as TdxPSSingletonFactory; -end; - -procedure TdxPSSingletonFactory.FinalizeInstance; -begin - while Count <> 0 do Items[Count - 1].ReleaseInstance; - inherited FinalizeInstance; -end; - -procedure TdxPSSingletonFactory.RegisterSingleton(ASingleton: TBasedxPSSingleton); -begin - if FItems = nil then FItems := TList.Create; - FItems.Add(ASingleton); -end; - -procedure TdxPSSingletonFactory.UnregisterSingleton(ASingleton: TBasedxPSSingleton); -begin - FItems.Remove(ASingleton); - if Count = 0 then - begin - FItems.Free; - FItems := nil; - end; -end; - -function TdxPSSingletonFactory.GetCount: Integer; -begin - if FItems <> nil then - Result := FItems.Count - else - Result := 0; -end; - -class function TdxPSSingletonFactory.GetInstance(AccessCode: Integer): TBasedxPSSingleton; -const - FInstance: TdxPSSingletonFactory = nil; -begin - case AccessCode of - SingletonAccess: - ; - SingletonCreate: - if FInstance = nil then FInstance := CreateInstance(0); - SingletonRelease: - FInstance := nil; - else - SingletonError(Format(rsdxSingletonIllegalAccessCode, [AccessCode])); - end; - Result := FInstance; -end; - -function TdxPSSingletonFactory.GetItem(Index: Integer): TBasedxPSSingleton; -begin - Result := TBasedxPSSingleton(FItems[Index]); -end; - -function TdxPSSingletonFactory.GetItemClass(Index: Integer): TBasedxPSSingletonClass; -begin - Result := TBasedxPSSingletonClass(Items[Index].ClassType); -end; - -procedure TdxPSSingletonFactory.Register; -begin -end; - -procedure TdxPSSingletonFactory.Unregister; -begin - if GetInstance(SingletonAccess) = Self then GetInstance(SingletonRelease); -end; - -{ TBasedxPSSingleton } - -constructor TBasedxPSSingleton.Create; -begin - inherited Create; - SingletonError(Format(rsdxSingletonAccessOnlyThroughInstance, [ClassName])); -end; - -destructor TBasedxPSSingleton.Destroy; -begin - FinalizeInstance; - Unregister; - inherited; -end; - -class function TBasedxPSSingleton.Instance: TBasedxPSSingleton; -begin - Result := GetInstance(SingletonCreate); -end; - -class procedure TBasedxPSSingleton.ReleaseInstance; -begin - GetInstance(SingletonAccess).Free; -end; - -constructor TBasedxPSSingleton.CreateInstance(Dummy: Integer); -begin - inherited Create; - Register; - InitializeInstance; -end; - -procedure TBasedxPSSingleton.FinalizeInstance; -begin -end; - -procedure TBasedxPSSingleton.InitializeInstance; -begin -end; - -class function TBasedxPSSingleton.GetInstance(AccessCode: Integer): TBasedxPSSingleton; -var - Index: Integer; -begin - case AccessCode of - SingletonAccess: - ; - SingletonCreate: - if IndexOf = -1 then CreateInstance(0); - else - SingletonError(Format(rsdxSingletonIllegalAccessCode, [AccessCode])); - end; - - {Note: - Just imagine: we have some descendant of TBasedxPSSingleton that had been initialized - and finalized inside another package. This Singleton MUST be finalized manually. - One trick: If this Singleton had never ever been initialized before - (i.e. GetInstance(SingletonCreate) had never been called) and others Singletons - dont exist then SingletonFactory had never been initialized in one's part. - This means we MUST return nil here silently } - - Result := nil; - if HasSingletonFactory then - begin - Index := IndexOf; - if Index <> -1 then - Result := SingletonFactory[Index]; - end; -end; - -class function TBasedxPSSingleton.IndexOf: Integer; -begin - Result := SingletonFactory.IndexOf(Self); -end; - -procedure TBasedxPSSingleton.Register; -begin - SingletonFactory.RegisterSingleton(Self); -end; - -procedure TBasedxPSSingleton.Unregister; -begin - SingletonFactory.UnregisterSingleton(Self); -end; - -initialization - -finalization - TdxPSSingletonFactory.ReleaseInstance; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSStandardFillPatterns.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSStandardFillPatterns.pas deleted file mode 100644 index aa72b61f..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSStandardFillPatterns.pas +++ /dev/null @@ -1,184 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSStandardFillPatterns; - -interface - -{$I cxVer.inc} - -uses - dxPSFillPatterns; - -type - TdxPSHorizontalFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSVerticalFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSFDiagonalFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSBDiagonalFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSCrossFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - - TdxPSDiagCrossFillPattern = class(TdxPSFillPattern) - public - class procedure Bits(var APattern: TdxPSPatternBitRows); override; - class function Name: string; override; - end; - -implementation - -uses - cxClasses, dxPSRes; - -{ TdxPSHorizontalFillPattern } - -class procedure TdxPSHorizontalFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($FFFF, $0000, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF); -begin - APattern := Bits; -end; - -class function TdxPSHorizontalFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxHorizontalFillPattern); -end; - -{ TdxPSVerticalFillPattern } - -class procedure TdxPSVerticalFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($FFBF, $FFBF, $FFBF, $FFBF, $FFBF, $FFBF, $FFBF, $FFBF); -begin - APattern := Bits; -end; - -class function TdxPSVerticalFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxVerticalFillPattern); -end; - -{ TdxPSFDiagonalFillPattern } - -class procedure TdxPSFDiagonalFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($FFFE, $FFFD, $FFFB, $FFF7, $FFEF, $FFDF, $FFBF, $FF7F); -begin - APattern := Bits; -end; - -class function TdxPSFDiagonalFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxFDiagonalFillPattern); -end; - -{ TdxPSBDiagonalFillPattern } - -class procedure TdxPSBDiagonalFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($FF7F, $FFBF, $FFDF, $FFEF, $FFF7, $FFFB, $FFFD, $FFFE); -begin - APattern := Bits; -end; - -class function TdxPSBDiagonalFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxBDiagonalFillPattern); -end; - -{ TdxPSCrossFillPattern } - -class procedure TdxPSCrossFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($FFBF, $0000, $FFBF, $FFBF, $FFBF, $FFBF, $FFBF, $FFBF); -begin - APattern := Bits; -end; - -class function TdxPSCrossFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxCrossFillPattern); -end; - -{ TdxPSDiagCrossFillPattern } - -class procedure TdxPSDiagCrossFillPattern.Bits(var APattern: TdxPSPatternBitRows); -const - Bits: TdxPSPatternBitRows = ($FF7E, $FFBD, $FFDB, $FFE7, $FFE7, $FFDB, $FFBD, $FF7E); -begin - APattern := Bits; -end; - -class function TdxPSDiagCrossFillPattern.Name: string; -begin - Result := cxGetResourceString(@sdxDiagCrossFillPattern); -end; - -procedure RegisterPatterns; -begin - TdxPSHorizontalFillPattern.Register; - TdxPSVerticalFillPattern.Register; - TdxPSFDiagonalFillPattern.Register; - TdxPSBDiagonalFillPattern.Register; - TdxPSCrossFillPattern.Register; - TdxPSDiagCrossFillPattern.Register; -end; - -initialization - RegisterPatterns; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSStdGrLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSStdGrLnk.dfm deleted file mode 100644 index 066eb4f5..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSStdGrLnk.dfm +++ /dev/null @@ -1,672 +0,0 @@ -object dxGridReportLinkDesignWindow: TdxGridReportLinkDesignWindow - Left = 346 - Top = 298 - BorderStyle = bsDialog - Caption = 'dxGridReportLinkDesigner' - ClientHeight = 314 - ClientWidth = 579 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 6 - Width = 571 - Height = 273 - ActivePage = tshColor - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 563 - Height = 245 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 5 - Top = 13 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 40 - Top = 18 - Width = 210 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 6 - Top = 32 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblOnEveryPage: TLabel - Left = 8 - Top = 151 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object Image1: TImage - Left = 10 - Top = 172 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel10: TBevel - Left = 88 - Top = 156 - Width = 162 - Height = 4 - Shape = bsBottomLine - end - object chbxShowVertLines: TCheckBox - Tag = 2 - Left = 90 - Top = 75 - Width = 161 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 2 - OnClick = chbxShowBordersClick - end - object chbxShowFixedHorzLines: TCheckBox - Tag = 3 - Left = 90 - Top = 98 - Width = 161 - Height = 17 - Caption = 'Fixed &Horizontal Lines' - TabOrder = 3 - OnClick = chbxShowBordersClick - end - object chbxShowFixedVertLines: TCheckBox - Tag = 4 - Left = 90 - Top = 121 - Width = 161 - Height = 17 - Caption = 'Fixed &Vertical Lines' - TabOrder = 4 - OnClick = chbxShowBordersClick - end - object chbxShowBorders: TCheckBox - Left = 90 - Top = 30 - Width = 161 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxShowBordersClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 90 - Top = 52 - Width = 161 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxShowBordersClick - end - object chbxFixedRowsOnEveryPage: TCheckBox - Left = 91 - Top = 173 - Width = 161 - Height = 17 - Caption = 'Fi&xed Rows' - TabOrder = 5 - OnClick = chbxFixedRowsOnEveryPageClick - end - object lblPreview: TStaticText - Left = 264 - Top = 2 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 6 - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 563 - Height = 245 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 6 - Top = 218 - Width = 79 - Height = 13 - Caption = '&Grid lines color : ' - OnClick = lblColorClick - end - object bvlLineColorHolder: TBevel - Left = 91 - Top = 214 - Width = 146 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 5 - Top = 21 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - OnClick = lblColorClick - end - object gbxFixedTransparent: TGroupBox - Left = 5 - Top = 144 - Width = 243 - Height = 58 - Caption = ' ' - TabOrder = 4 - object lblFixedColor: TLabel - Left = 6 - Top = 24 - Width = 62 - Height = 13 - Caption = 'F&ixed color : ' - OnClick = lblColorClick - end - object bvlFixedColorHolder: TBevel - Left = 86 - Top = 22 - Width = 146 - Height = 21 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 52 - Width = 243 - Height = 84 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 6 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblColorClick - end - object bvlColorHolder: TBevel - Left = 86 - Top = 20 - Width = 146 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 6 - Top = 51 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - OnClick = lblColorClick - end - object bvlEvenColorHolder: TBevel - Left = 86 - Top = 47 - Width = 146 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 50 - Width = 15 - Height = 17 - Caption = 'T&ransparent' - TabOrder = 1 - OnClick = chbxTransparentClick - end - object chbxFixedTransparent: TCheckBox - Tag = 1 - Left = 18 - Top = 142 - Width = 15 - Height = 17 - Caption = 'Fixed T&ransparent' - TabOrder = 3 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 69 - Top = 16 - Width = 179 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 51 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stFixedTransparent: TStaticText - Left = 33 - Top = 143 - Width = 105 - Height = 17 - Caption = ' Fixed T&ransparent ' - FocusControl = chbxFixedTransparent - TabOrder = 6 - OnClick = stFixedTransparentClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 563 - Height = 245 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 38 - Width = 239 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnFixedFont: TButton - Tag = 2 - Left = 8 - Top = 133 - Width = 110 - Height = 23 - Caption = 'Fi&xed Font ...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 4 - OnClick = btnFontClick - end - object edFixedFont: TEdit - Left = 8 - Top = 162 - Width = 239 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 5 - end - object btnEvenFont: TButton - Tag = 1 - Left = 7 - Top = 71 - Width = 110 - Height = 23 - Caption = 'E&ven Font ...' - TabOrder = 2 - OnClick = btnFontClick - end - object edEvenFont: TEdit - Left = 8 - Top = 100 - Width = 239 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 563 - Height = 245 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Image3: TImage - Left = 7 - Top = 34 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblSelection: TLabel - Left = 5 - Top = 13 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object Bevel3: TBevel - Left = 55 - Top = 18 - Width = 195 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 85 - Width = 67 - Height = 13 - Caption = 'Look And Feel' - end - object Bevel15: TBevel - Left = 84 - Top = 89 - Width = 166 - Height = 4 - Shape = bsBottomLine - end - object Image8: TImage - Left = 7 - Top = 106 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlMiscellaneous: TBevel - Left = 81 - Top = 160 - Width = 169 - Height = 3 - Shape = bsBottomLine - end - object lblMiscellaneous: TLabel - Left = 5 - Top = 154 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object imgMiscellaneous: TImage - Left = 7 - Top = 177 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxIncludeFixed: TCheckBox - Left = 90 - Top = 52 - Width = 161 - Height = 17 - Caption = '&Including fixed cells' - TabOrder = 1 - OnClick = chbxIncludeFixedClick - end - object chbxOnlySelected: TCheckBox - Left = 90 - Top = 30 - Width = 161 - Height = 17 - Caption = 'Only &selected cells' - TabOrder = 0 - OnClick = chbxOnlySelectedClick - end - object chbxUse3DEffects: TCheckBox - Tag = 12 - Left = 91 - Top = 100 - Width = 161 - Height = 17 - Caption = '&Use 3D Effects' - TabOrder = 2 - OnClick = chbxUse3DEffectsClick - end - object chbxUseSoft3D: TCheckBox - Tag = 13 - Left = 91 - Top = 122 - Width = 161 - Height = 17 - Caption = 'Soft &3D' - TabOrder = 3 - OnClick = chbxUseSoft3DClick - end - object chbxRowAutoHeight: TCheckBox - Left = 90 - Top = 200 - Width = 161 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 5 - OnClick = chbxRowAutoHeightClick - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 178 - Width = 161 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 4 - OnClick = chbxAutoWidthClick - end - end - end - end - object pnlPreview: TPanel - Left = 272 - Top = 50 - Width = 294 - Height = 215 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 1 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSStdGrLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSStdGrLnk.pas deleted file mode 100644 index 53eb7b85..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSStdGrLnk.pas +++ /dev/null @@ -1,1014 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSStdGrLnk; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - Grids, StdCtrls, ExtCtrls, ComCtrls, CheckLst, dxPSRes, dxPSCore, dxPSGrLnks, - dxPSGlbl, dxPSBaseGridLnk, cxDrawTextUtils; - -type - TStddxGridReportLink = class(TCustomdxGridReportLink) - private - FSaveFont: TFont; - FCustomDrawFontChanged: Boolean; - procedure CustomDrawFontChanged(Sender: TObject); - protected - class function IsDrawGridLink: Boolean; virtual; - class function IsStringGridLink: Boolean; virtual; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - end; - - TdxCustomDrawTextCellEvent = procedure(Sender: TBasedxReportLink; - ACol, ARow: Integer; ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; - var AText: string; AFont: TFont; var AColor: TColor; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean) of object; - - TdxStringGridReportLink = class(TStddxGridReportLink) - private - FTextAlignX: TcxTextAlignX; - FTextAlignY: TcxTextAlignY; - FOnCustomDrawCell: TdxCustomDrawTextCellEvent; - function GetStringGrid: TStringGrid; - procedure SetTextAlignX(Value: TcxTextAlignX); - procedure SetTextAlignY(Value: TcxTextAlignY); - protected - procedure InternalRestoreDefaults; override; - class function IsStringGridLink: Boolean; override; - - function GetCellText(ACol, ARow: Integer): string; override; - function GetCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; override; - function GetCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; override; - procedure SetDrawMode(Value: TdxGridDrawMode); override; - - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - procedure DoCustomDrawCell(ACol, ARow: Integer; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var AText: string; AFont: TFont; - var AColor: TColor; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean); virtual; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - public - procedure Assign(Source: TPersistent); override; - property StringGrid: TStringGrid read GetStringGrid; - published - property AutoWidth; - property Color; - property DrawMode; - property Effects3D; - property EndEllipsis; - property EvenColor; - property EvenFont; - property FixedColor; - property FixedFont; - property FixedTransparent; - property Font; - property GridLineColor; - property HeadersOnEveryPage; - property IncludeFixed; - property Multiline; - property OddColor; - property OddFont; - property OnlySelected; - property Options; - property RowAutoHeight; - property ScaleFonts; - property Soft3D; - property SupportedCustomDraw; - property TextAlignX: TcxTextAlignX read FTextAlignX write SetTextAlignX default taLeft; - property TextAlignY: TcxTextAlignY read FTextAlignY write SetTextAlignY default taCenterY; - property Transparent; - property UseCustomPageBreaks; - property UseHorzDelimiters; - property UseVertDelimiters; - - property OnCustomDrawCell: TdxCustomDrawTextCellEvent read FOnCustomDrawCell write FOnCustomDrawCell; - property OnGetCustomPageBreaks; - property OnInitializeItem; - end; - - TdxCustomDrawCellEvent = procedure(Sender: TBasedxReportLink; - ACol, ARow: Integer; ACanvas: TCanvas; ABoundsRect, AClientRect: TRect) of object; - - TdxCustomDrawCellExEvent = procedure(Sender: TBasedxReportLink; - ACol, ARow: Integer; ACanvas: TCanvas; AFont: TFont; ABoundsRect, AClientRect: TRect; - var ADone: Boolean) of object; - - TdxDrawGridReportLink = class(TStddxGridReportLink) - private - FDefaultDrawing: Boolean; - FOnCustomDrawCell: TdxCustomDrawCellEvent; - FOnCustomDrawCellEx: TdxCustomDrawCellExEvent; - function GetDrawGrid: TDrawGrid; - procedure SetDefaultDrawing(Value: Boolean); - protected - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - - function GetCellText(ACol, ARow: Integer): string; override; - function GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; override; - procedure SetDrawMode(Value: TdxGridDrawMode); override; - - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - procedure DoCustomDrawCell(ACol, ARow: Integer; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect); virtual; - procedure DoCustomDrawCellEx(ACol, ARow: Integer; ACanvas: TCanvas; - AFont: TFont; ABoundsRect, AClientRect: TRect); virtual; - class function IsDrawGridLink: Boolean; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - public - procedure Assign(Source: TPersistent); override; - class function Serializable: Boolean; override; - - property DrawGrid: TDrawGrid read GetDrawGrid; - published - property AutoWidth; - property Color; - property DefaultDrawing: Boolean read FDefaultDrawing write SetDefaultDrawing default True; - property DrawMode; - property Effects3D; - property EvenColor; - property EvenFont; - property FixedColor; - property FixedFont; - property FixedTransparent; - property Font; - property GridLineColor; - property HeadersOnEveryPage; - property IncludeFixed; - property OddColor; - property OnlySelected; - property Options; - property ScaleFonts; - property Soft3D; - property SupportedCustomDraw default True; - property Transparent; - property UseCustomPageBreaks; - property UseHorzDelimiters; - property UseVertDelimiters; - - property OnCustomDrawCell: TdxCustomDrawCellEvent read FOnCustomDrawCell write FOnCustomDrawCell; - property OnCustomDrawCellEx: TdxCustomDrawCellExEvent read FOnCustomDrawCellEx write FOnCustomDrawCellEx; - property OnGetCustomPageBreaks; - property OnInitializeItem; - end; - - TdxGridReportLinkDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshOptions: TTabSheet; - tshColor: TTabSheet; - tshFont: TTabSheet; - pnlOptions: TPanel; - pnlColor: TPanel; - pnlFont: TPanel; - lblGridLinesColor: TLabel; - btnFont: TButton; - edFont: TEdit; - btnFixedFont: TButton; - edFixedFont: TEdit; - chbxTransparent: TCheckBox; - gbxTransparent: TGroupBox; - lblColor: TLabel; - chbxFixedTransparent: TCheckBox; - gbxFixedTransparent: TGroupBox; - lblFixedColor: TLabel; - bvlFixedColorHolder: TBevel; - bvlLineColorHolder: TBevel; - bvlColorHolder: TBevel; - pnlPreview: TPanel; - lblEvenColor: TLabel; - bvlEvenColorHolder: TBevel; - btnEvenFont: TButton; - edEvenFont: TEdit; - chbxShowVertLines: TCheckBox; - chbxShowFixedHorzLines: TCheckBox; - chbxShowFixedVertLines: TCheckBox; - chbxShowBorders: TCheckBox; - chbxShowHorzLines: TCheckBox; - lblShow: TLabel; - Bevel11: TBevel; - tshBehaviors: TTabSheet; - Panel1: TPanel; - chbxIncludeFixed: TCheckBox; - chbxOnlySelected: TCheckBox; - Image3: TImage; - lblSelection: TLabel; - Bevel3: TBevel; - lblLookAndFeel: TLabel; - Bevel15: TBevel; - Image8: TImage; - chbxUse3DEffects: TCheckBox; - chbxUseSoft3D: TCheckBox; - imgGrid: TImage; - lblDrawMode: TLabel; - cbxDrawMode: TComboBox; - lblOnEveryPage: TLabel; - Image1: TImage; - Bevel10: TBevel; - chbxFixedRowsOnEveryPage: TCheckBox; - chbxRowAutoHeight: TCheckBox; - bvlMiscellaneous: TBevel; - lblMiscellaneous: TLabel; - imgMiscellaneous: TImage; - lblPreview: TStaticText; - chbxAutoWidth: TCheckBox; - stTransparent: TStaticText; - stFixedTransparent: TStaticText; - procedure ccbxColorChange(Sender: TObject); - procedure btnFontClick(Sender: TObject); - procedure pbxPreviewPaint(Sender: TObject); - procedure chbxOnlySelectedClick(Sender: TObject); - procedure chbxIncludeFixedClick(Sender: TObject); - procedure chbxTransparentClick(Sender: TObject); - procedure lblColorClick(Sender: TObject); - procedure chbxRowAutoHeightClick(Sender: TObject); - procedure chbxFixedRowsOnEveryPageClick(Sender: TObject); - procedure chbxShowBordersClick(Sender: TObject); - procedure cbxDrawModeClick(Sender: TObject); - procedure chbxUse3DEffectsClick(Sender: TObject); - procedure chbxUseSoft3DClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure cbxDrawModeDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure chbxAutoWidthClick(Sender: TObject); - procedure stFixedTransparentClick(Sender: TObject); - procedure stTransparentClick(Sender: TObject); - private - FccbxColor: TCustomComboBox; - FccbxEvenColor: TCustomComboBox; - FccbxFixedColor: TCustomComboBox; - FccbxGridLineColor: TCustomComboBox; - FPreviewBox: TCustomControl; - function GetReportLink: TStddxGridReportLink; - procedure CreateControls; - procedure CMDialogChar(var message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - public - constructor Create(AOwner: TComponent); override; - - property ReportLink: TStddxGridReportLink read GetReportLink; - end; - -implementation - -{$R *.DFM} - -uses - cxClasses, dxExtCtrls, dxPrnDev, dxPSUtl; - -{ TStddxGridReportLink } - -constructor TStddxGridReportLink.Create(AOwner: TComponent); -begin - inherited; - FSaveFont := TFont.Create; - FSaveFont.OnChange := CustomDrawFontChanged; -end; - -destructor TStddxGridReportLink.Destroy; -begin - FreeAndNil(FSaveFont); - inherited; -end; - -class function TStddxGridReportLink.IsDrawGridLink: Boolean; -begin - Result := False; -end; - -class function TStddxGridReportLink.IsStringGridLink: Boolean; -begin - Result := False; -end; - -procedure TStddxGridReportLink.CustomDrawFontChanged(Sender: TObject); -begin - FCustomDrawFontChanged := True; -end; - -{ TdxStringGridReportLink } - -procedure TdxStringGridReportLink.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxStringGridReportLink then - begin - TextAlignX := TdxStringGridReportLink(Source).TextAlignX; - TextAlignY := TdxStringGridReportLink(Source).TextAlignY; - end; -end; - -class function TdxStringGridReportLink.IsStringGridLink: Boolean; -begin - Result := True; -end; - -procedure TdxStringGridReportLink.InternalRestoreDefaults; -begin - inherited; - TextAlignX := dxPSCore.dxDefaultTextAlignX; {taLeft} - TextAlignY := dxPSCore.dxDefaultTextAlignY; {taCenterY} -end; - -function TdxStringGridReportLink.GetStringGrid: TStringGrid; -begin - Result := TStringGrid(Component); -end; - -procedure TdxStringGridReportLink.SetTextAlignX(Value: TcxTextAlignX); -begin - if FTextAlignX <> Value then - begin - FTextAlignX := Value; - LinkModified(True); - end; -end; - -function TdxStringGridReportLink.GetCellText(ACol, ARow: Integer): string; -begin - Result := StringGrid.Cells[ACol, ARow]; -end; - -function TdxStringGridReportLink.GetCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; -begin - if DrawMode <> gdmBorrowSource then - Result := FTextAlignX - else - Result := inherited GetCellTextAlignX(ACol, ARow); -end; - -function TdxStringGridReportLink.GetCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; -begin - if DrawMode <> gdmBorrowSource then - Result := FTextAlignY - else - Result := inherited GetCellTextAlignY(ACol, ARow); -end; - -procedure TdxStringGridReportLink.SetTextAlignY(Value: TcxTextAlignY); -begin - if FTextAlignY <> Value then - begin - FTextAlignY := Value; - LinkModified(True); - end; -end; - -procedure TdxStringGridReportLink.SetDrawMode(Value: TdxGridDrawMode); -begin - if Value > gdmChess then Value := gdmChess; - inherited SetDrawMode(Value); -end; - -function TdxStringGridReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -begin - Result := inherited IsSupportedCustomDraw(Item) and Assigned(FOnCustomDrawCell); -end; - -procedure TdxStringGridReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - AColor: TColor; - AText: string; - ACol, ARow: Integer; - ATextAlignX: TcxTextAlignX; - ATextAlignY: TcxTextAlignY; -begin - with TdxReportCellString(AItem) do - begin - GetCellColRow(AItem, ACol, ARow); - AColor := ColorToRGB(Color); - if Transparent then AColor := clNone; - FSaveFont.Assign(Font); - FCustomDrawFontChanged := False; - AText := Text; - ATextAlignX := TextAlignX; - ATextAlignY := TextAlignY; - DoCustomDrawCell(ACol, ARow, ACanvas, ABoundsRect, AClientRect, AText, - FSaveFont, AColor, ATextAlignX, ATextAlignY, ADone); - if not ADone then - begin - if FCustomDrawFontChanged then - begin - SelectObject(ACanvas.Handle, FSaveFont.Handle); - SetTextColor(ACanvas.Handle, ColorToRGB(FSaveFont.Color)); - FontIndex := -1; - end; - if AColor <> clNone then - begin - AItem.Color := AColor; - AItem.Transparent := False; - end; - Text := AText; - TextAlignX := ATextAlignX; - TextAlignY := ATextAlignY; - end; - end; -end; - -procedure TdxStringGridReportLink.DoCustomDrawCell(ACol, ARow: Integer; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var AText: string; AFont: TFont; var AColor: TColor; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCell) then - FOnCustomDrawCell(Self, ACol, ARow, ACanvas, ABoundsRect, AClientRect, AText, - AFont, AColor, ATextAlignX, ATextAlignY, ADone); -end; - -type - TdxReportCustomDrawCellData = class(TAbstractdxReportCellData) - private - FDefaultDrawing: Boolean; - protected - class function Serializable: Boolean; override; - function CustomDraw(DC: HDC): Boolean; override; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - property DefaultDrawing: Boolean read FDefaultDrawing write FDefaultDrawing; - end; - -constructor TdxReportCustomDrawCellData.Create(AParent: TdxReportCell); -begin - inherited; - DefaultDrawing := True; -end; - -procedure TdxReportCustomDrawCellData.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxReportCustomDrawCellData then - DefaultDrawing := TdxReportCustomDrawCellData(Source).DefaultDrawing; -end; - -class function TdxReportCustomDrawCellData.Serializable: Boolean; -begin - Result := False; -end; - -function TdxReportCustomDrawCellData.CustomDraw(DC: HDC): Boolean; -begin - if DefaultDrawing then - begin - if IsBackgroundDrawn then DrawBackground(DC); - if IsBordersDrawn then DrawBorders(DC); - end; - inherited CustomDraw(DC); - Result := True; -end; - -{ TdxDrawGridReportLink } - -procedure TdxDrawGridReportLink.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxDrawGridReportLink then - DefaultDrawing := TdxDrawGridReportLink(Source).DefaultDrawing; -end; - -class function TdxDrawGridReportLink.Serializable: Boolean; -begin - Result := False; -end; - -class function TdxDrawGridReportLink.IsDrawGridLink: Boolean; -begin - Result := True; -end; - -procedure TdxDrawGridReportLink.InternalRestoreDefaults; -begin - inherited; - DefaultDrawing := True; - SupportedCustomDraw := True; -end; - -function TdxDrawGridReportLink.GetCellText(ACol, ARow: Integer): string; -begin - Result := ''; -end; - -procedure TdxDrawGridReportLink.InternalRestoreFromOriginal; -begin - inherited; - if DrawGrid <> nil then - DefaultDrawing := DrawGrid.DefaultDrawing; -end; - -function TdxDrawGridReportLink.GetDrawGrid: TDrawGrid; -begin - Result := TDrawGrid(Component); -end; - -procedure TdxDrawGridReportLink.SetDefaultDrawing(Value: Boolean); -begin - if DefaultDrawing <> Value then - begin - FDefaultDrawing := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxDrawGridReportLink.SetDrawMode(Value: TdxGridDrawMode); -begin - if Value > gdmChess then Value := gdmChess; - inherited SetDrawMode(Value); -end; - -function TdxDrawGridReportLink.GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; -begin - Result := TdxReportCustomDrawCellData; -end; - -procedure TdxDrawGridReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - ACol, ARow: Integer; -begin - with TdxReportCustomDrawCellData(AItem) do - begin - GetCellColRow(AItem, ACol, ARow); - FSaveFont.Assign(Font); - DoCustomDrawCellEx(ACol, ARow, ACanvas, FSaveFont, ABoundsRect, AClientRect); - end; - ADone := True; -end; - -procedure TdxDrawGridReportLink.DoCustomDrawCellEx(ACol, ARow: Integer; - ACanvas: TCanvas; AFont: TFont; ABoundsRect, AClientRect: TRect); -var - ADone: Boolean; -begin - ADone := False; - if Assigned(FOnCustomDrawCellEx) then - FOnCustomDrawCellEx(Self, ACol, ARow, ACanvas, AFont, ABoundsRect, AClientRect, ADone); - if not ADone then - DoCustomDrawCell(ACol, ARow, ACanvas, ABoundsRect, AClientRect); -end; - -procedure TdxDrawGridReportLink.DoCustomDrawCell(ACol, ARow: Integer; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect); -begin - if Assigned(FOnCustomDrawCell) then - FOnCustomDrawCell(Self, ACol, ARow, ACanvas, ABoundsRect, AClientRect); -end; - -function TdxDrawGridReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -begin - Result := inherited IsSupportedCustomDraw(Item) and - (Assigned(FOnCustomDrawCellEx) or Assigned(FOnCustomDrawCell)); -end; - -{ TdxSGrReportLinkDesignWindow } - -constructor TdxGridReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxPSGlbl.dxhcStringGridReportLinkDesigner; - inherited; - CreateControls; - PageControl1.ActivePage := PageControl1.Pages[0]; -end; - -function TdxGridReportLinkDesignWindow.GetReportLink: TStddxGridReportLink; -begin - Result := inherited ReportLink as TStddxGridReportLink; -end; - -{$IFDEF DELPHI7} -function TdxGridReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxGridReportLinkDesignWindow.LoadStrings; -begin - inherited; - tshOptions.Caption := cxGetResourceString(@sdxOptions); - tshFont.Caption := cxGetResourceString(@sdxFonts); - tshColor.Caption := cxGetResourceString(@sdxColors); - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviors); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblShow.Caption := cxGetResourceString(@sdxShow); - chbxShowBorders.Caption := cxGetResourceString(@sdxBorderLines); - chbxShowHorzLines.Caption := cxGetResourceString(@sdxHorzLines); - chbxShowVertLines.Caption := cxGetResourceString(@sdxVertLines); - chbxShowFixedHorzLines.Caption := cxGetResourceString(@sdxFixedHorzLines); - chbxShowFixedVertLines.Caption := cxGetResourceString(@sdxFixedVertLines); - - lblMiscellaneous.Caption := cxGetResourceString(@sdxMiscellaneous); - chbxRowAutoHeight.Caption := cxGetResourceString(@sdxRowAutoHeight); - chbxAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - lblDrawMode.Caption := cxGetResourceString(@sdxDrawMode); - with cbxDrawMode.Items do - begin - BeginUpdate; - try - Clear; - AddObject(cxGetResourceString(@sdxDrawModeStrict), TObject(gdmStrict)); - AddObject(cxGetResourceString(@sdxDrawModeOddEven), TObject(gdmOddEven)); - AddObject(cxGetResourceString(@sdxDrawModeChess), TObject(gdmChess)); - finally - EndUpdate; - end; - end; - - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - lblEvenColor.Caption := cxGetResourceString(@sdxEvenColor); - stFixedTransparent.Caption := ' ' + cxGetResourceString(@sdxFixedTransparent) + ' '; - lblFixedColor.Caption := cxGetResourceString(@sdxFixedColor); - lblGridLinesColor.Caption := cxGetResourceString(@sdxGridLinesColor); - - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - btnEvenFont.Caption := cxGetResourceString(@sdxBtnEvenFont); - btnFixedFont.Caption := cxGetResourceString(@sdxBtnFixedFont); - - lblOnEveryPage.Caption := cxGetResourceString(@sdxOnEveryPage); - chbxFixedRowsOnEveryPage.Caption := cxGetResourceString(@sdxFixedRowOnEveryPage); - - lblSelection.Caption := cxGetResourceString(@sdxSelection); - chbxOnlySelected.Caption := cxGetResourceString(@sdxOnlySelected); - chbxIncludeFixed.Caption := cxGetResourceString(@sdxIncludeFixed); - - lblLookAndFeel.Caption := cxGetResourceString(@sdxLookAndFeel); - chbxUse3DEffects.Caption := cxGetResourceString(@sdxUse3DEffects); - chbxUseSoft3D.Caption := cxGetResourceString(@sdxSoft3D); -end; - -procedure TdxGridReportLinkDesignWindow.DoInitialize; -begin - inherited; - chbxShowBorders.Checked := gpoBorder in ReportLink.Options; - chbxShowHorzLines.Checked := gpoHorzLines in ReportLink.Options; - chbxShowVertLines.Checked := gpoVertLines in ReportLink.Options; - chbxShowFixedHorzLines.Checked := gpoFixedHorzLines in ReportLink.Options; - chbxShowFixedVertLines.Checked := gpoFixedVertLines in ReportLink.Options; - - chbxRowAutoHeight.Visible := ReportLink.IsStringGridLink; - if chbxRowAutoHeight.Visible then - chbxRowAutoHeight.Checked := TdxStringGridReportLink(ReportLink).RowAutoHeight; - chbxAutoWidth.Checked := ReportLink.AutoWidth; - - with cbxDrawMode do - ItemIndex := Items.IndexOfObject(TObject(ReportLink.DrawMode)); - chbxTransparent.Checked := ReportLink.Transparent; - TdxPSColorCombo(FccbxColor).ColorValue := ColorToRGB(ReportLink.Color); - TdxPSColorCombo(FccbxEvenColor).ColorValue := ColorToRGB(ReportLink.EvenColor); - chbxFixedTransparent.Checked := ReportLink.FixedTransparent; - TdxPSColorCombo(FccbxFixedColor).ColorValue := ColorToRGB(ReportLink.FixedColor); - TdxPSColorCombo(FccbxGridLineColor).ColorValue := ColorToRGB(ReportLink.GridLineColor); - - FontInfoToText(ReportLink.Font, edFont); - FontInfoToText(ReportLink.EvenFont, edEvenFont); - FontInfoToText(ReportLink.FixedFont, edFixedFont); - - chbxFixedRowsOnEveryPage.Checked := ReportLink.HeadersOnEveryPage; - chbxOnlySelected.Checked := ReportLink.OnlySelected; - chbxIncludeFixed.Checked := ReportLink.IncludeFixed; - - chbxUse3DEffects.Checked := ReportLink.Effects3D; - chbxUseSoft3D.Checked := ReportLink.Soft3D; -end; - -procedure TdxGridReportLinkDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -begin - inherited; - dxPSDrawGridPreview(ACanvas, R, ReportLink); -end; - -procedure TdxGridReportLinkDesignWindow.UpdateControlsState; -begin - inherited; - - FccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := FccbxColor.Enabled; - FccbxEvenColor.Enabled := - not chbxTransparent.Checked and (ReportLink.DrawMode in [gdmOddEven, gdmChess]); - lblEvenColor.Enabled := FccbxEvenColor.Enabled; - FccbxFixedColor.Enabled := not chbxFixedTransparent.Checked; - lblFixedColor.Enabled := FccbxFixedColor.Enabled; - - btnEvenFont.Enabled := ReportLink.DrawMode in [gdmOddEven, gdmChess]; - if ReportLink.DrawMode in [gdmOddEven, gdmChess] then - begin - lblColor.Caption := cxGetResourceString(@sdxOddColor); - btnFont.Caption := cxGetResourceString(@sdxBtnOddFont); - end - else - begin - lblColor.Caption := cxGetResourceString(@sdxColor); - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - end; - chbxFixedRowsOnEveryPage.Enabled := not ReportLink.IsAggregated; - chbxIncludeFixed.Enabled := chbxOnlySelected.Enabled and chbxOnlySelected.Checked; - chbxUseSoft3D.Enabled := chbxUse3DEffects.Checked; -end; - -procedure TdxGridReportLinkDesignWindow.UpdatePreview; -begin - FPreviewBox.Invalidate; -end; - -procedure TdxGridReportLinkDesignWindow.CreateControls; - - function CreateColorCombo(AParent: TWinControl; AHost: TControl; - ATag: Integer; AAutoColor: TColor; ALabel: TLabel): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(Result) do - begin - BoundsRect := AHost.BoundsRect; - Tag := MakeTTag(ATag); - Parent := AParent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - OnChange := ccbxColorChange; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - - procedure CreatePreviewBox; - var - R: TRect; - begin - FPreviewBox := TdxPSPaintPanel.Create(Self); - with TdxPSPaintPanel(FPreviewBox) do - begin - Parent := pnlPreview; - R := pnlPreview.BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - InflateRect(R, -1, -1); - BoundsRect := R; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := pbxPreviewPaint; - end; - end; - -begin - CreatePreviewBox; - - FccbxColor := - CreateColorCombo(gbxTransparent, bvlColorHolder, 0, dxDefaultColor, lblColor); - FccbxEvenColor := - CreateColorCombo(gbxTransparent, bvlEvenColorHolder, 1, dxDefaultColor, lblEvenColor); - FccbxFixedColor := - CreateColorCombo(gbxFixedTransparent, bvlFixedColorHolder, 2, dxDefaultFixedColor, lblFixedColor); - FccbxGridLineColor := - CreateColorCombo(pnlColor, bvlLineColorHolder, 3, dxDefaultGridLineColor, lblGridLinesColor); -end; - -procedure TdxGridReportLinkDesignWindow.CMDialogChar(var message: TCMDialogChar); -var - I: Integer; -begin - inherited; - with PageControl1 do - for I := 0 to PageCount - 1 do - if IsAccel(message.CharCode, Pages[I].Caption) then - begin - message.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TdxGridReportLinkDesignWindow.pbxPreviewPaint(Sender: TObject); -begin - with TdxPSPaintPanel(Sender) do - PaintPreview(Canvas, ClientRect); -end; - -procedure TdxGridReportLinkDesignWindow.ccbxColorChange(Sender: TObject); -var - AColor: TColor; -begin - if LockControlsUpdate then Exit; - AColor := TdxPSColorCombo(Sender).ColorValue; - case TTagToInt(TdxPSColorCombo(Sender).Tag) of - 0: ReportLink.Color := AColor; - 1: ReportLink.EvenColor := AColor; - 2: ReportLink.FixedColor := AColor; - 3: ReportLink.GridLineColor := AColor; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxGridReportLinkDesignWindow.btnFontClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - - with dxPSGlbl.FontDialog do - begin - case TTagToInt(TButton(Sender).Tag) of - 0: Font := ReportLink.Font; - 1: Font := ReportLink.EvenFont; - 2: Font := ReportLink.FixedFont; - end; - - if Execute then - begin - case TTagToInt(TButton(Sender).Tag) of - 0: - begin - ReportLink.Font := Font; - FontInfoToText(ReportLink.Font, edFont); - end; - 1: - begin - ReportLink.EvenFont := Font; - FontInfoToText(ReportLink.EvenFont, edEvenFont); - end; - 2: - begin - ReportLink.FixedFont := Font; - FontInfoToText(ReportLink.FixedFont, edFixedFont); - end; - end; - Modified := True; - UpdatePreview; - end; - end; -end; - -procedure TdxGridReportLinkDesignWindow.chbxRowAutoHeightClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - if ReportLink.IsStringGridLink then - TdxStringGridReportLink(ReportLink).RowAutoHeight := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxGridReportLinkDesignWindow.chbxAutoWidthClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoWidth := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxGridReportLinkDesignWindow.cbxDrawModeClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TComboBox(Sender) do - ReportLink.DrawMode := TdxGridDrawMode(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TdxGridReportLinkDesignWindow.cbxDrawModeDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -begin - dxPSBaseGridLnk.dxPSDrawComboDrawModeItem(Control, Index, Rect, State); -end; - -procedure TdxGridReportLinkDesignWindow.chbxOnlySelectedClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OnlySelected := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxGridReportLinkDesignWindow.chbxIncludeFixedClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.IncludeFixed := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxGridReportLinkDesignWindow.chbxUse3DEffectsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Effects3D := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxGridReportLinkDesignWindow.chbxUseSoft3DClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Soft3D := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxGridReportLinkDesignWindow.chbxShowBordersClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TCheckBox(Sender) do - if Checked then - ReportLink.Options := ReportLink.Options + [TdxGridPaintOption(TTagToInt(Tag))] - else - ReportLink.Options := ReportLink.Options - [TdxGridPaintOption(TTagToInt(Tag))]; - Modified := True; - UpdatePreview; -end; - -procedure TdxGridReportLinkDesignWindow.chbxFixedRowsOnEveryPageClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.HeadersOnEveryPage := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxGridReportLinkDesignWindow.chbxTransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - case TTagToInt(TCheckBox(Sender).Tag) of - 0: ReportLink.Transparent := TCheckBox(Sender).Checked; - 1: ReportLink.FixedTransparent := TCheckBox(Sender).Checked; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxGridReportLinkDesignWindow.stFixedTransparentClick(Sender: TObject); -begin - if chbxFixedTransparent.CanFocus then ActiveControl := chbxFixedTransparent; - chbxFixedTransparent.Checked := not chbxFixedTransparent.Checked; -end; - -procedure TdxGridReportLinkDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TdxGridReportLinkDesignWindow.lblColorClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TCustomComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxGridReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreview.Parent := TPageControl(Sender).ActivePage; -end; - -initialization - dxPSRegisterReportLink(TdxStringGridReportLink, TStringGrid, TdxGridReportLinkDesignWindow); - dxPSRegisterReportLink(TdxDrawGridReportLink, TDrawGrid, TdxGridReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxDrawGridReportLink, TDrawGrid, TdxGridReportLinkDesignWindow); - dxPSUnregisterReportLink(TdxStringGridReportLink, TStringGrid, TdxGridReportLinkDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSTCLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSTCLnk.pas deleted file mode 100644 index 2240dce7..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSTCLnk.pas +++ /dev/null @@ -1,302 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSTCLnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Chart, Graphics, dxPSCore, dxPSGraphicLnk; - -type - - TdxPSTeeChartReportLinkGetGraphicClassEvent = procedure(Sender: TBasedxReportLink; - var AGraphicClass: TGraphicClass) of object; - TdxPSTeeChartReportLinkCreateGraphicEvent = procedure(Sender: TBasedxReportLink; - var AGraphic: TGraphic) of object; - - TCustomdxTeeChartReportLink = class(TCustomdxGraphicReportLink) - private - FGraphicClass: TGraphicClass; - FIsGraphicClassAssigned: Boolean; - FOnCreateGraphic: TdxPSTeeChartReportLinkCreateGraphicEvent; - FOnGetGraphicClass: TdxPSTeeChartReportLinkGetGraphicClassEvent; - function GetChart: TCustomChart; - function GetGraphicClassName: string; - function GetGraphicClassValue: TGraphicClass; - function IsGraphicClassNameStored: Boolean; - procedure SetGraphicClassName(const Value: string); - procedure SetGraphicClassValue(Value: TGraphicClass); - protected - procedure ConstructReport(AReportCells: TdxReportCells); override; - - procedure InternalRestoreDefaults; override; - - function GetGraphic: TGraphic; override; - function GetGraphicClass: TGraphicClass; override; - function GetGraphicHeight: Integer; override; - function GetGraphicWidth: Integer; override; - - procedure CreateGraphicStandard(var AGraphic: TGraphic); virtual; - function DoCreateGraphic(var AGraphic: TGraphic): Boolean; dynamic; - procedure DoGetGraphicClass(var AGraphicClass: TGraphicClass); dynamic; - - property Chart: TCustomChart read GetChart; - property GraphicClass: TGraphicClass read GetGraphicClassValue write SetGraphicClassValue; - property GraphicClassName: string read GetGraphicClassName write SetGraphicClassName stored IsGraphicClassNameStored; - property OnCreateGraphic: TdxPSTeeChartReportLinkCreateGraphicEvent read FOnCreateGraphic write FOnCreateGraphic; - property OnGetGraphicClass: TdxPSTeeChartReportLinkGetGraphicClassEvent read FOnGetGraphicClass write FOnGetGraphicClass; - public - procedure Assign(Source: TPersistent); override; - class function Aggregable: Boolean; override; - - function DefaultGraphicClass: TGraphicClass; virtual; - end; - - TdxTeeChartReportLink = class(TCustomdxTeeChartReportLink) - private - function GetChart: TChart; - public - property Chart: TChart read GetChart; - property GraphicClass; - published - property GraphicClassName; - property OnCreateGraphic; - property OnGetGraphicClass; - end; - -implementation - -uses - {$IFDEF USEJPEGIMAGE} - Jpeg, - {$ENDIF} - SysUtils, dxPSUtl; - -procedure TCustomdxTeeChartReportLink.Assign(Source: TPersistent); -begin - if Source is TCustomdxTeeChartReportLink then - with TCustomdxTeeChartReportLink(Source) do - begin - Self.GraphicClass := GraphicClass; - Self.FIsGraphicClassAssigned := FIsGraphicClassAssigned; - end; - inherited; -end; - -class function TCustomdxTeeChartReportLink.Aggregable: Boolean; -begin - Result := True; -end; - -function TCustomdxTeeChartReportLink.DefaultGraphicClass: TGraphicClass; -begin - Result := TBitmap; -end; - -procedure TCustomdxTeeChartReportLink.ConstructReport( - AReportCells: TdxReportCells); -var - Cell: TdxReportCell; - ControllerIntf: IdxReportLinkController; -begin - inherited ConstructReport(AReportCells); - if (AReportCells.Count > 0) and Aggregable and - SysUtils.Supports(TObject(Controller), IdxReportLinkController, ControllerIntf) then - begin - Cell := AReportCells.Cells[AReportCells.Count - 1]; - if (Cell.DataItemCount > 0) and - (Cell.DataItems[Cell.DataItemCount - 1] is TdxReportCellGraphic) then - begin - TdxReportCellGraphic(Cell.DataItems[Cell.DataItemCount - 1]).DrawMode := gdmStretch; - end; - end; -end; - -procedure TCustomdxTeeChartReportLink.InternalRestoreDefaults; -begin - inherited; - FIsGraphicClassAssigned := False; -end; - -function TCustomdxTeeChartReportLink.DoCreateGraphic(var AGraphic: TGraphic): Boolean; -begin - AGraphic := nil; - if Assigned(FOnCreateGraphic) then FOnCreateGraphic(Self, AGraphic); - Result := AGraphic <> nil; -end; - -function TCustomdxTeeChartReportLink.GetGraphic: TGraphic; -begin - if not DoCreateGraphic(Result) then CreateGraphicStandard(Result) -end; - -function TCustomdxTeeChartReportLink.GetGraphicClass: TGraphicClass; -begin - Result := GraphicClass; - DoGetGraphicClass(Result); - if Result = nil then Result := DefaultGraphicClass; -end; - -function TCustomdxTeeChartReportLink.GetGraphicHeight: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if Chart <> nil then - begin - Result := Chart.Height; - if Aggregable and SysUtils.Supports(TObject(Controller), IdxReportLinkController, ControllerIntf) then - begin - with ControllerIntf.GetControlSiteBounds(Chart) do - Result := Bottom - Top - 1 - end; - end - else - Result := inherited GetGraphicHeight; -end; - -function TCustomdxTeeChartReportLink.GetGraphicWidth: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if Chart <> nil then - begin - Result := Chart.Width; - if Aggregable and SysUtils.Supports(TObject(Controller), IdxReportLinkController, ControllerIntf) then - begin - with ControllerIntf.GetControlSiteBounds(Chart) do - Result := Right - Left - 1 - end; - end - else - Result := inherited GetGraphicWidth; -end; - -procedure TCustomdxTeeChartReportLink.CreateGraphicStandard(var AGraphic: TGraphic); -var - OwnGraphicClass: TGraphicClass; - {$IFDEF USEJPEGIMAGE} - B: TBitmap; - {$ENDIF} -begin - OwnGraphicClass := GraphicClass; - - if OwnGraphicClass.InheritsFrom(TBitmap) then - AGraphic := Chart.TeeCreateBitmap(Color, Chart.ClientRect) - else - {$IFDEF USEJPEGIMAGE} - if OwnGraphicClass.InheritsFrom(TJPEGImage) then - begin - B := Chart.TeeCreateBitmap(Color, Chart.ClientRect); - try - AGraphic := TJPEGImage.Create; - try - AGraphic.Assign(B); - except - FreeAndNil(AGraphic); - raise; - end; - finally - B.Free; - end; - end - else - {$ENDIF} - AGraphic := Chart.TeeCreateMetafile(True, Chart.ClientRect); -end; - -procedure TCustomdxTeeChartReportLink.DoGetGraphicClass(var AGraphicClass: TGraphicClass); -begin - if Assigned(FOnGetGraphicClass) then FOnGetGraphicClass(Self, AGraphicClass); -end; - -function TCustomdxTeeChartReportLink.GetChart: TCustomChart; -begin - Result := inherited Component as TCustomChart; -end; - -function TCustomdxTeeChartReportLink.GetGraphicClassName: string; -begin - Result := GraphicClass.ClassName; -end; - -function TCustomdxTeeChartReportLink.GetGraphicClassValue: TGraphicClass; -begin - if FIsGraphicClassAssigned then - Result := FGraphicClass - else - Result := DefaultGraphicClass; -end; - -function TCustomdxTeeChartReportLink.IsGraphicClassNameStored: Boolean; -begin - Result := FIsGraphicClassAssigned and (GraphicClass <> DefaultGraphicClass); -end; - -procedure TCustomdxTeeChartReportLink.SetGraphicClassName(const Value: string); -var - ValueClass: TPersistentClass; -begin - ValueClass := GetClass(Value); - if (ValueClass <> nil) and ValueClass.InheritsFrom(TGraphic) then - GraphicClass := TGraphicClass(ValueClass); -end; - -procedure TCustomdxTeeChartReportLink.SetGraphicClassValue(Value: TGraphicClass); -begin - if FGraphicClass <> Value then - begin - FGraphicClass := Value; - FIsGraphicClassAssigned := True; - LinkModified(True); - end; -end; - -{ TdxTeeChartReportLink } - -function TdxTeeChartReportLink.GetChart: TChart; -begin - Result := inherited Chart as TChart; -end; - -initialization - dxPSRegisterReportLink(TdxTeeChartReportLink, TChart, nil); - -finalization - dxPSUnregisterReportLink(TdxTeeChartReportLink, TChart, nil); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSTCLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSTCLnkReg.pas deleted file mode 100644 index 2fa55da6..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSTCLnkReg.pas +++ /dev/null @@ -1,93 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSTCLnkReg; - -interface - -{$I cxVer.inc} - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes; - -procedure Register; - -type - TdxTeeChartReportLinkGraphicClassNamePropertyEditor = class(TStringProperty) - public - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - end; - -implementation - -uses - {$IFDEF USEJPEGIMAGE} - Jpeg, - {$ENDIF} - Graphics, dxPSTCLnk; - -{ TdxTeeChartReportLinkGraphicClassNamePropertyEditor } - -function TdxTeeChartReportLinkGraphicClassNamePropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paValueList, paSortList {$IFNDEF DELPHI6}, paReadOnly{$ENDIF}] -end; - -procedure TdxTeeChartReportLinkGraphicClassNamePropertyEditor.GetValues(Proc: TGetStrProc); -begin - Proc(TBitmap.ClassName); - Proc(TMetafile.ClassName); - {$IFDEF USEJPEGIMAGE} - Proc(TJPEGImage.ClassName); - {$ENDIF} -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterNoIcon([TdxTeeChartReportLink]); - RegisterPropertyEditor(TypeInfo(string), TCustomdxTeeChartReportLink, 'GraphicClassName', TdxTeeChartReportLinkGraphicClassNamePropertyEditor); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSTVLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSTVLnk.dfm deleted file mode 100644 index 02a7167b..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSTVLnk.dfm +++ /dev/null @@ -1,926 +0,0 @@ -object dxfmTVReportLinkDesignWindow: TdxfmTVReportLinkDesignWindow - Left = 370 - Top = 405 - ActiveControl = chbxTransparent - BorderStyle = bsDialog - Caption = 'dxfmTVReportLinkDesignWindow' - ClientHeight = 279 - ClientWidth = 582 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 574 - Height = 240 - ActivePage = tshColors - Anchors = [akLeft, akTop, akRight, akBottom] - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 566 - Height = 212 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 6 - Top = 12 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 41 - Top = 17 - Width = 207 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 6 - Top = 36 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel2: TBevel - Left = 63 - Top = 80 - Width = 185 - Height = 4 - Shape = bsBottomLine - end - object Bevel3: TBevel - Left = 63 - Top = 147 - Width = 185 - Height = 4 - Shape = bsBottomLine - end - object chbxShowBorders: TCheckBox - Left = 63 - Top = 30 - Width = 113 - Height = 17 - Caption = '&Border' - TabOrder = 0 - OnClick = chbxShowClick - end - object chbxShowGrid: TCheckBox - Tag = 1 - Left = 63 - Top = 51 - Width = 113 - Height = 17 - Caption = '&Grid' - TabOrder = 1 - OnClick = chbxShowClick - end - object chbxShowStateImages: TCheckBox - Tag = 2 - Left = 63 - Top = 163 - Width = 113 - Height = 17 - Caption = 'State Images' - TabOrder = 4 - OnClick = chbxShowClick - end - object chbxShowImages: TCheckBox - Tag = 3 - Left = 63 - Top = 184 - Width = 113 - Height = 17 - Caption = 'Images' - TabOrder = 5 - OnClick = chbxShowClick - end - object chbxShowTreeLines: TCheckBox - Tag = 4 - Left = 63 - Top = 98 - Width = 113 - Height = 17 - Caption = 'TreeLines' - TabOrder = 2 - OnClick = chbxShowClick - end - object chbxShowButtons: TCheckBox - Tag = 5 - Left = 63 - Top = 119 - Width = 113 - Height = 17 - Caption = 'Buttons' - TabOrder = 3 - OnClick = chbxShowClick - end - object lblPreview: TStaticText - Left = 264 - Top = 2 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 6 - end - end - end - object tshColors: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 566 - Height = 212 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 10 - Top = 88 - Width = 81 - Height = 13 - Caption = '&Grid Lines Color: ' - OnClick = lblColorClick - end - object bvlGridLineColorHost: TBevel - Left = 91 - Top = 84 - Width = 150 - Height = 21 - Visible = False - end - object bvlTreeLineColorHost: TBevel - Left = 91 - Top = 114 - Width = 150 - Height = 21 - end - object lblTreeLinesColor: TLabel - Left = 10 - Top = 118 - Width = 78 - Height = 13 - Caption = 'TreeLines Color:' - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 13 - Width = 247 - Height = 59 - Caption = ' ' - TabOrder = 1 - object lblColor: TLabel - Left = 6 - Top = 24 - Width = 32 - Height = 13 - Caption = 'Co&lor: ' - OnClick = lblColorClick - end - object bvlColorHost: TBevel - Left = 86 - Top = 20 - Width = 150 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 11 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = chbxTransparentClick - end - object stTransparent: TStaticText - Left = 33 - Top = 12 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 2 - OnClick = stTransparentClick - end - end - end - object tshFonts: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 566 - Height = 212 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 16 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 47 - Width = 235 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - Text = 'edFont' - end - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object pnlBehaviors: TPanel - Left = 0 - Top = 0 - Width = 566 - Height = 212 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblExpanding: TLabel - Left = 5 - Top = 12 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object Bevel13: TBevel - Left = 65 - Top = 17 - Width = 173 - Height = 4 - Shape = bsBottomLine - end - object bvlExpandLevelHolder: TBevel - Left = 163 - Top = 61 - Width = 69 - Height = 21 - Visible = False - end - object lblExpandLevel: TLabel - Left = 89 - Top = 65 - Width = 71 - Height = 13 - Caption = 'Expand &level : ' - OnClick = lblExpandLevelClick - end - object Image4: TImage - Left = 7 - Top = 40 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F877778880F87777777778078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel1: TBevel - Left = 81 - Top = 99 - Width = 157 - Height = 4 - Shape = bsBottomLine - end - object lblMiscellaneous: TLabel - Left = 6 - Top = 94 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object Image5: TImage - Left = 7 - Top = 121 - Width = 32 - Height = 32 - Picture.Data = { - 055449636F6E0000010003001010000000000000680500003600000020200000 - 00000000A80800009E0500003030000000000000A80E0000460E000028000000 - 1000000020000000010008000000000040010000000000000000000000010000 - 00000000FFFFFF00000080000080800080800000C0C0C000C0DCC000F0CAA600 - 4080800040400000FF800000804000000040800080FFFF00FFFF8000FF808000 - 4080FF0081818100000081000081810081810000000033000000660000009900 - 0000CC0000333300003366000033FF000066CC000066FF000099FF0000CCCC00 - 3300330033006600330099003300CC0033330000333333003333660033339900 - 3333CC003333FF00336666003366990074CAFF003366FF003399000033993300 - 33996600339999003399CC003399FF0033CC330033CC990033CCCC0033CCFF00 - 33FFFF0066000000663300006633330066336600663399006633FF0066660000 - 6666330066666600666699006666CC0066990000669933006699660066999900 - 6699CC006699FF0066CC330066CC990066CCCC004CCEFF0066FF330066FFCC00 - 999900009933990099333300996600009966330099336600996699009966CC00 - 9999330099996600999999009999CC009999FF0099CC000099CC330066CC6600 - 99CC990099CCCC0099CCFF0099CC660099FF990099FFFF00CC009900CC333300 - CC336600CC339900CC660000CC66330099666600CC669900CC66CC00CC990000 - CC993300CC996600CC999900CC99CC00CC99FF00CCCC0000CCCC3300CCCC6600 - CCCC9900CCCCCC00CCCCFF00CCFF0000CCFF330099FF6600CCFF9900CCFFCC00 - CCFFFF00FF333300FF336600FF660000FF663300CC666600FF669900FF66CC00 - FF990000FF993300FF996600FF999900FF99CC00FF99FF00FFCC0000FFCC3300 - FFCC6600FFCC9900FFCCCC00FFCCFF00FFFF3300FFFF9900FFFFCC006666FF00 - 66FFFF00FFFF6600C1C1C1005F5F5F00777777008686860096969600CBCBCB00 - B2B2B200D7D7D700DDDDDD00E3E3E300EAEAEA00F1F1F100F8F8F800F0FBFF00 - A4A0A000808080000000FF0000FF0000FF00FF00FFFF00007AE9FF007D780000 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 00000000FFFFFFFFFFFFFFFF9B40FFFFFFFFFFFFFFFFFFFF9B9AFFFF4747FFFF - 9C40FFFFFF242424A7309A6B36369A9C3607FFFFFF789C9C4B36313636363636 - 36FFFFFFFFA2A09A9A4736364B290736079A9AFFFFA2A04B363636614B022936 - 363636FFFFA2A0A0613536644B02293624FFFFFFFFA2409F463636644B022936 - 0724FFFFFFA2409F0061780C4B02294636FFFFFFFFA2404040A078640C4B2924 - FFFFFFFFFFA2A0A0A0A09F9F4A789B24FFFFFFFFFFA2409F00A0787878789B24 - FFFFFFFFFFA2409F00A09F9F9F789B24FFFFFFFFFFA2404040A0787878789B24 - FFFFFFFFFFA2A0A0A0A0A0A0A0A09B24FFFFFFFFFFA2A2A2A2A2A2A2A2A2A29A - FFFFFFFFFF3FFFFFF333FFFF8003FFFF8007FFFF8001FFFF8001FFFF8007FFFF - 8003FFFF8007FFFF800FFFFF800FFFFF800FFFFF800FFFFF800FFFFF800FFFFF - 800FFFFF28000000200000004000000001000800000000008004000000000000 - 000000000001000000000000FFFFFF00000080000080800080800000C0C0C000 - C0DCC000F0CAA6004080800040400000FF800000804000000040800080FFFF00 - FFFF8000FF8080004080FF008181810000008100008181008181000000003300 - 00006600000099000000CC0000333300003366000033FF000066CC000066FF00 - 0099FF0000CCCC003300330033006600330099003300CC003333000033333300 - 33336600333399003333CC003333FF00336666003366990074CAFF003366FF00 - 339900003399330033996600339999003399CC003399FF0033CC330033CC9900 - 33CCCC0033CCFF0033FFFF006600000066330000663333006633660066339900 - 6633FF00666600006666330066666600666699006666CC006699000066993300 - 66996600669999006699CC006699FF0066CC330066CC990066CCCC004CCEFF00 - 66FF330066FFCC00999900009933990099333300996600009966330099336600 - 996699009966CC009999330099996600999999009999CC009999FF0099CC0000 - 99CC330066CC660099CC990099CCCC0099CCFF0099CC660099FF990099FFFF00 - CC009900CC333300CC336600CC339900CC660000CC66330099666600CC669900 - CC66CC00CC990000CC993300CC996600CC999900CC99CC00CC99FF00CCCC0000 - CCCC3300CCCC6600CCCC9900CCCCCC00CCCCFF00CCFF0000CCFF330099FF6600 - CCFF9900CCFFCC00CCFFFF00FF333300FF336600FF660000FF663300CC666600 - FF669900FF66CC00FF990000FF993300FF996600FF999900FF99CC00FF99FF00 - FFCC0000FFCC3300FFCC6600FFCC9900FFCCCC00FFCCFF00FFFF3300FFFF9900 - FFFFCC006666FF0066FFFF00FFFF6600C1C1C1005F5F5F007777770086868600 - 96969600CBCBCB00B2B2B200D7D7D700DDDDDD00E3E3E300EAEAEA00F1F1F100 - F8F8F800F0FBFF00A4A0A000808080000000FF0000FF0000FF00FF00FFFF0000 - 7AE9FF007D7800007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF409C40 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9B9AFFFFFF9B469B - FFFFFF9B4040FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9D9B9A9AFFFF473647 - FFFF9B9D9B9A9AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9D079A409A9B473647 - 9A9A9BA707079AFFFFFFFFFFFFFFFFFFFFFF24242424244B363107409B343647 - 9A404631353646FFFFFFFFFFFFFFFFFFFFFF789C9C9C9C4B3636363636363636 - 3636363635FFFFFFFFFFFFFFFFFFFFFFFFFFA1A09C409A9A4736363661616161 - 4C363635409A9AFFFFFFFFFFFFFFFFFFFFFFA1A040409A404636364C4B460229 - 4C363635409A9A9AFFFFFFFFFFFFFFFFFFFFA1A04C47303031364C644C4B3002 - 074C363636363635FFFFFFFFFFFFFFFFFFFFA1A0A061363636364C644C4B3002 - 29313636074747FFFFFFFFFFFFFFFFFFFFFFA140A1A3A007303636644C4B3002 - 2936362924FFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA20430353636644C4B3002 - 293636302924FFFFFFFFFFFFFFFFFFFFFFFFA1409F00A261364C60644C4B3002 - 294C35363607FFFFFFFFFFFFFFFFFFFFFFFFA1409F0000A16104A0644C4B3002 - 299A476135FFFFFFFFFFFFFFFFFFFFFFFFFFA1404040404004A0A06461644B30 - 079A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A078640C644B - 469A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A078A04A4A4A - A09A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA140A1A2A1A1A2A0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409F04A700A2A0A09F9F9F9F9F - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA7009DA2A0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA0A0A0A2A0A09F9F9F9F9F - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA140404040409CA0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A0A0A0A0 - A09A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2A2A2A2A2A2A2A2A2A2A2A2 - A2A19AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8FFFFFF38E3F - FFE18C1FFFE0001FFC00001FFC00007FFC00001FFC00000FFC00000FFC00001F - FC00007FFC00003FFC00003FFC00007FFC0001FFFC0001FFFC0001FFFC0001FF - FC0001FFFC0001FFFC0001FFFC0001FFFC0001FFFC0001FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFF2800000030000000600000000100080000000000 - 800A000000000000000000000001000000000000FFFFFF000000800000808000 - 80800000C0C0C000C0DCC000F0CAA6004080800040400000FF80000080400000 - 0040800080FFFF00FFFF8000FF8080004080FF00818181000000810000818100 - 818100000000330000006600000099000000CC0000333300003366000033FF00 - 0066CC000066FF000099FF0000CCCC003300330033006600330099003300CC00 - 333300003333330033336600333399003333CC003333FF003366660033669900 - 74CAFF003366FF00339900003399330033996600339999003399CC003399FF00 - 33CC330033CC990033CCCC0033CCFF0033FFFF00660000006633000066333300 - 66336600663399006633FF00666600006666330066666600666699006666CC00 - 669900006699330066996600669999006699CC006699FF0066CC330066CC9900 - 66CCCC004CCEFF0066FF330066FFCC0099990000993399009933330099660000 - 9966330099336600996699009966CC009999330099996600999999009999CC00 - 9999FF0099CC000099CC330066CC660099CC990099CCCC0099CCFF0099CC6600 - 99FF990099FFFF00CC009900CC333300CC336600CC339900CC660000CC663300 - 99666600CC669900CC66CC00CC990000CC993300CC996600CC999900CC99CC00 - CC99FF00CCCC0000CCCC3300CCCC6600CCCC9900CCCCCC00CCCCFF00CCFF0000 - CCFF330099FF6600CCFF9900CCFFCC00CCFFFF00FF333300FF336600FF660000 - FF663300CC666600FF669900FF66CC00FF990000FF993300FF996600FF999900 - FF99CC00FF99FF00FFCC0000FFCC3300FFCC6600FFCC9900FFCCCC00FFCCFF00 - FFFF3300FFFF9900FFFFCC006666FF0066FFFF00FFFF6600C1C1C1005F5F5F00 - 777777008686860096969600CBCBCB00B2B2B200D7D7D700DDDDDD00E3E3E300 - EAEAEA00F1F1F100F8F8F800F0FBFF00A4A0A000808080000000FF0000FF0000 - FF00FF00FFFF00007AE9FF007D7800007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F0000000000FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF409B9B - 40FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFF9B9B9B9BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C9B9AFFFFFFFF9B4646 - 9BFFFFFFFF9B4040FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFA79D9B9A9AFFFFFF47363647FFFFFF9B9D9B409AFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA79D079A9A9A409B473636 - 479A9A9B9D9D07079AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF24 - 2424242424A73636309A9A409B463636479A9A9B9D46353607FFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF789C9C9C9C9C4B36363631400746353636 - 479A9A073536363546FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A79D9D4C36363636363636363636363636363635FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A09C409A9A9A473636363661616161 - 614C36363635409A9A9AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0789B409A9A9A46363636614C460202294C363636359A9A9A9A9AFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A047463030303136364C614B4B3030 - 02074C3636363030303030FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A04C4C3636363636364C644C4B30300229313636363636363636FFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0616161616136364C0C4C4B3030 - 02293636363607474747FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09BA3A3A3A00730363636974C4B303002293636362924FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9FA2A2040707363636974C4B3030 - 0229363636302424FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09B9F000078303636364C0C4C4B303002294C4C36360724FFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9F0000A24C364C60780C4C4B3030 - 02299B4736363607FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09B9F000000A16178A0780C4C4B303002299B24476135FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9B9B9B9B9B04A0A078644C64604B - 30299B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A078647F0C4C4E4B079B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A07805640C0C4B - 4B469B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A07878784A4A4A4A789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A040A2A2A2A2A2A2A0A0787878787878 - 78789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0409F009D00A1A2A0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0409F9D789DA1A2A0A09F9F9F9F9F9F - 9F789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0409F00009DA1A2A0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0409FA0A0A0A0A2A0A09F9F9F9F9F9F - 9F789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A04040404040409CA0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A0787878787878 - 78789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A09B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2 - A2A2A29AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF87FFFFFFFFFFFFFF87FFFFFFFFFFFFC787 - 8FFFFFFFFFFF838707FFFFFFFFFF800007FFFFFFFFE0000007FFFFFFFFE00000 - 07FFFFFFFFE000001FFFFFFFFFE0000003FFFFFFFFE0000001FFFFFFFFE00000 - 01FFFFFFFFE0000001FFFFFFFFE0000003FFFFFFFFE000001FFFFFFFFFE00000 - 0FFFFFFFFFE000000FFFFFFFFFE000000FFFFFFFFFE000001FFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF} - end - object chbxAutoNodesExpand: TCheckBox - Left = 88 - Top = 37 - Width = 154 - Height = 17 - Caption = '&Auto Node Expanded' - TabOrder = 0 - OnClick = chbxAutoNodesExpandClick - end - object chbxNodeAutoHeight: TCheckBox - Left = 88 - Top = 140 - Width = 111 - Height = 17 - Caption = '&Node Auto Height' - TabOrder = 1 - OnClick = chbxNodeAutoHeightClick - end - object chbxAutoWidth: TCheckBox - Left = 88 - Top = 117 - Width = 97 - Height = 17 - Caption = 'Auto &Width' - TabOrder = 2 - OnClick = chbxAutoWidthClick - end - end - end - end - object pnlPreview: TPanel - Left = 272 - Top = 46 - Width = 295 - Height = 185 - Anchors = [akLeft, akTop, akRight, akBottom] - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - end - object ilPreview: TImageList - Left = 5 - Top = 247 - Bitmap = { - 494C010102000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000084000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000840000008400000084000000FF000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000848484008484840084848400C6C6C60084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000840000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 840084848400FFFFFF00C6C6C600FFFFFF00C6C6C60084848400848484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF0000FF0000FFFFFF0000FF000000FF000000840000008400000084 - 000000000000000000000000000000000000000000000000000084848400C6C6 - C600FFFFFF00C6C6C600FFFFFF00C6C6C600C6C6C60084848400848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF0000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000084 - 000000840000000000000000000000000000000000000000000084848400FFFF - FF00C6C6C600FFFFFF00C6C6C600FFFFFF00C6C6C60084848400848484008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF00FFFFFF0000FF000000FF000000FF000000840000008400000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600FFFFFF00FFFFFF00C6C6C600C6C6C600C6C6C60084848400848484008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF000000FF000000FF000000FF000000FF000000FF0000008400000084 - 000000840000000000000000000000000000000000000000000084848400FFFF - FF00C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600848484008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF - 0000008400000084000000000000000000000000000000000000000000008484 - 8400C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6 - C600848484008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000084000000FF000000FF000000FF000000FF000000FF0000008400000084 - 0000000000000000000000000000000000000000000000000000000000000000 - 000084848400C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000084000000FF000000FF00000084000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000084848400C6C6C600C6C6C6008484840084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000840000008400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFF00000000FFFFFFFF00000000 - FF3FFF3F00000000F81FF81F00000000E00FE00F00000000C007C00700000000 - C003C00300000000C003C00300000000C003C00300000000C003C00300000000 - C003C00300000000E003E00300000000F00FF00F00000000F83FF83F00000000 - FCFFFCFF00000000FFFFFFFF0000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSTVLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSTVLnk.pas deleted file mode 100644 index ccea45f2..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSTVLnk.pas +++ /dev/null @@ -1,2028 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSTVLnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, - ImgList, CommCtrl, ExtCtrls, ComCtrls, {$IFDEF REGISTERSHELLCTRLS}ShellCtrls, {$ENDIF} - dxPSCore, dxPSGlbl, dxPSRes, cxDrawTextUtils; - -type - TdxfmTVReportLinkDesignWindow = class; - - TdxTreeViewPaintOption = (tvpoBorder, tvpoGrid, tvpoStateImages, tvpoImages, tvpoTreeLines, tvpoButtons); - TdxTreeViewPaintOptions = set of TdxTreeViewPaintOption; - - TCustomdxNativeTreeViewReportLink = class(TBasedxReportLink, IdxPSNativeWin32ControlHandleSupport) - private - FActualWidth: Integer; - FAutoNodesExpand: Boolean; - FAutoWidth: Boolean; - FExpandLevel: Integer; - FExplicitTreeViewExpand: Boolean; - FGridLineColor: TColor; - FImages: TCustomImageList; - FIsWidthAssigned: Boolean; - FNodeAutoHeight: Boolean; - FOptions: TdxTreeViewPaintOptions; - FStateImages: TCustomImageList; - FTreeLineColor: TColor; - FWidth: Integer; - function GetOptions: TdxTreeViewPaintOptions; - function GetWidth: Integer; - function IsWidthStored: Boolean; - procedure SetAutoNodesExpand(Value: Boolean); - procedure SetAutoWidth(Value: Boolean); - procedure SetExpandLevel(Value: Integer); - procedure SetExplicitTreeViewExpand(Value: Boolean); - procedure SetGridLineColor(Value: TColor); - procedure SetNodeAutoHeight(Value: Boolean); - procedure SetOptions(Value: TdxTreeViewPaintOptions); - procedure SetTreeLineColor(Value: TColor); - procedure SetWidth(Value: Integer); - - procedure CalcNodesHeight; - function CanDrawImages: Boolean; - function CanDrawStateImages: Boolean; - function GetCellSides(ANode: HTREEITEM): TdxCellSides; - function GetNodeHeight(Index: Integer): Integer; - function IsDrawBorder: Boolean; - function IsDrawGrid: Boolean; - function IsDrawNodeImages(ANode: HTREEITEM): Boolean; - function IsDrawNodeStateImages(ANode: HTREEITEM): Boolean; - function IsFirstNode(ANode: HTREEITEM): Boolean; - function IsLastNode(ANode: HTREEITEM): Boolean; - function IsValidNodeImageIndex(ANode: HTREEITEM): Boolean; - function IsValidNodeStateIndex(ANode: HTREEITEM): Boolean; - protected - FIndent: Integer; - FNodeHeight: Integer; - FNodeHeights: TList; - FNodeList: TList; - FScreenDC: HDC; - - procedure AssignData(ANode: HTREEITEM; ADataItem: TAbstractdxReportCellData); virtual; - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InitializeItem(ANode: HTREEITEM; ADataItem: TAbstractdxReportCellData); virtual; - procedure InternalRestoreDefaults; override; - procedure MakeDelimiters(AReportCells: TdxReportCells; AHorzDelimiters, - AVertDelimiters: TList); override; - procedure PrepareContruct; virtual; - procedure UnprepareContruct; virtual; - - function CheckImages: Boolean; - function CheckStateImages: Boolean; - procedure ClearImages; virtual; - procedure CreateImages; virtual; - procedure DeleteImages; virtual; - function GetImages: TCustomImageList; virtual; - function GetStateImages: TCustomImageList; virtual; - function HasImages: Boolean; virtual; - function HasStateImages: Boolean; virtual; - - function GetDataClass(ANode: HTREEITEM): TdxReportCellDataClass; virtual; - function GetTreeViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; virtual; abstract; - procedure SetTreeViewHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); virtual; abstract; - procedure DoExplicitTreeViewExpand(ALevel: Integer = -1); virtual; - - { IdxPSNativeWin32ControlHandleSupport } - function GetNativeHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; virtual; - procedure SetNativeHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); virtual; - - { TreeView native access helpers } - function TV_IsNodeExpanded(AItem: HTREEITEM): Boolean; - function TV_IsNodeParentExists(AItem: HTREEITEM): Boolean; - function TV_IsNodeFirstChild(AItem: HTREEITEM): Boolean; - function TV_IsNodeLastChild(AItem: HTREEITEM): Boolean; - function TV_IsShowButtons: Boolean; - function TV_IsShowLines: Boolean; - function TV_IsShowRoot: Boolean; - function TV_GetNodeCount(AItem: HTREEITEM): Integer; - function TV_GetNodeHasChildren(AItem: HTREEITEM): Boolean; - function TV_GetNodeImageIndex(AItem: HTREEITEM): Integer; - function TV_GetNodeLevel(AItem: HTREEITEM): Integer; - function TV_GetNodeParent(AItem: HTREEITEM): HTREEITEM; - function TV_GetNodeParentAtLevel(AItem: HTREEITEM; ALevel: Integer): HTREEITEM; - function TV_GetNodeStateIndex(AItem: HTREEITEM): Integer; - function TV_GetNodeText(AItem: HTREEITEM): string; - - property Images: TCustomImageList read GetImages; - property StateImages: TCustomImageList read GetStateImages; - property TreeViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF} read GetTreeViewHandle write SetTreeViewHandle; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - class function Aggregable: Boolean; override; - function DefaultWidth: Integer; virtual; - procedure Initialize; override; - - property AutoNodesExpand: Boolean read FAutoNodesExpand write SetAutoNodesExpand default False; - property AutoWidth: Boolean read FAutoWidth write SetAutoWidth default True; - property Color; - property ExpandLevel: Integer read FExpandLevel write SetExpandLevel default -1; - property ExplicitTreeViewExpand: Boolean read FExplicitTreeViewExpand write SetExplicitTreeViewExpand default False; - property Font; - property GridLineColor: TColor read FGridLineColor write SetGridLineColor default clBlack; - property Options: TdxTreeViewPaintOptions read GetOptions write SetOptions - default [tvpoStateImages, tvpoImages, tvpoTreeLines, tvpoButtons]; - property NodeAutoHeight: Boolean read FNodeAutoHeight write SetNodeAutoHeight default False; - property ScaleFonts; - property Transparent; - property TreeLineColor: TColor read FTreeLineColor write SetTreeLineColor default clGray; - property Width: Integer read GetWidth write SetWidth stored IsWidthStored; - end; - - TdxNativeTreeViewReportLink = class(TCustomdxNativeTreeViewReportLink) - private - FTreeViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; - protected - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - - function GetDesignerClass: TdxReportLinkDesignWindowClass; override; - - function GetTreeViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; override; - procedure SetTreeViewHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); override; - public - function DataProviderPresent: Boolean; override; - property TreeViewHandle; - published - property AutoNodesExpand; - property AutoWidth; - property Color; - property ExpandLevel; - property ExplicitTreeViewExpand; - property Font; - property GridLineColor; - property Options; - property NodeAutoHeight; - property ScaleFonts; - property Transparent; - property TreeLineColor; - property UseVertDelimiters; - property Width; - end; - - TdxTVInitializeNodeEvent = procedure(Sender: TBasedxReportLink; ANode: TTreeNode; - AnItem: TdxReportCellString) of object; - - TdxTVCustomDrawNodeEvent = procedure(Sender: TBasedxReportLink; ANode: TTreeNode; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var AText: string; - AFont: TFont; var AColor: TColor; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean) of object; - - TCustomdxTreeViewReportLink = class(TCustomdxNativeTreeViewReportLink) - private - FCustomDrawFontChanged: Boolean; - FSaveFont: TFont; - FSupportedCustomDraw: Boolean; - FOnCustomDrawNode: TdxTVCustomDrawNodeEvent; - FOnInitializeNode: TdxTVInitializeNodeEvent; - procedure SetSupportedCustomDraw(Value: Boolean); - procedure CustomDrawFontChanged(Sender: TObject); - protected - procedure InitializeItem(ANode: HTREEITEM; ADataItem: TAbstractdxReportCellData); override; - procedure InternalRestoreDefaults; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - - function GetImages: TCustomImageList; override; - function GetStateImages: TCustomImageList; override; - - function GetCustomTreeView: TCustomTreeView; virtual; - function GetTreeViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; override; - procedure SetTreeViewHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); override; - - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - procedure DoCustomDrawNode(ANode: TTreeNode; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var AText: string; AFont: TFont; - var AColor: TColor; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); virtual; - procedure DoInitializeNode(ANode: TTreeNode; AnItem: TAbstractdxReportCellData); dynamic; - - property CustomTreeView: TCustomTreeView read GetCustomTreeView; - property OnCustomDrawNode: TdxTVCustomDrawNodeEvent read FOnCustomDrawNode write FOnCustomDrawNode; - property OnInitializeNode: TdxTVInitializeNodeEvent read FOnInitializeNode write FOnInitializeNode; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - class function Aggregable: Boolean; override; - - property SupportedCustomDraw: Boolean read FSupportedCustomDraw write SetSupportedCustomDraw default False; - end; - - TdxTreeViewReportLink = class(TCustomdxTreeViewReportLink) - private - function GetTreeView: TTreeView; - public - property TreeView: TTreeView read GetTreeView; - published - property AutoNodesExpand; - property AutoWidth; - property Color; - property ExpandLevel; - property ExplicitTreeViewExpand; - property Font; - property GridLineColor; - property Options; - property ScaleFonts; - property SupportedCustomDraw; - property Transparent; - property TreeLineColor; - property UseVertDelimiters; - property Width; - - property OnCustomDrawNode; - property OnInitializeNode; - end; - - {$IFDEF REGISTERSHELLCTRLS} - - TCustomdxShellTreeViewReportLink = class(TCustomdxTreeViewReportLink) - private - function GetShellTreeView: TShellTreeView; - protected - procedure CreateImages; override; - procedure DeleteImages; override; - function GetImages: TCustomImageList; override; - function GetStateImages: TCustomImageList; override; - function HasStateImages: Boolean; override; - - property ShellTreeView: TShellTreeView read GetShellTreeView; - end; - - TdxShellTreeViewReportLink = class(TCustomdxShellTreeViewReportLink) - public - property ShellTreeView; - published - property AutoNodesExpand; - property AutoWidth; - property Color; - property ExpandLevel; - property ExplicitTreeViewExpand; - property Font; - property GridLineColor; - property Options; - property ScaleFonts; - property SupportedCustomDraw; - property Transparent; - property TreeLineColor; - property UseVertDelimiters; - property Width; - - property OnCustomDrawNode; - property OnInitializeNode; - end; - - {$ENDIF} - - TdxfmTVReportLinkDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshOptions: TTabSheet; - pnlOptions: TPanel; - tshColors: TTabSheet; - pnlColor: TPanel; - lblGridLinesColor: TLabel; - bvlGridLineColorHost: TBevel; - gbxTransparent: TGroupBox; - lblColor: TLabel; - bvlColorHost: TBevel; - chbxTransparent: TCheckBox; - tshFonts: TTabSheet; - pnlFont: TPanel; - btnFont: TButton; - edFont: TEdit; - pnlPreview: TPanel; - ilPreview: TImageList; - lblShow: TLabel; - chbxShowBorders: TCheckBox; - Bevel11: TBevel; - chbxShowGrid: TCheckBox; - chbxShowStateImages: TCheckBox; - chbxShowImages: TCheckBox; - tshBehaviors: TTabSheet; - pnlBehaviors: TPanel; - lblExpanding: TLabel; - Bevel13: TBevel; - chbxAutoNodesExpand: TCheckBox; - bvlExpandLevelHolder: TBevel; - lblExpandLevel: TLabel; - Image4: TImage; - imgGrid: TImage; - chbxShowTreeLines: TCheckBox; - bvlTreeLineColorHost: TBevel; - lblTreeLinesColor: TLabel; - chbxShowButtons: TCheckBox; - Bevel1: TBevel; - lblMiscellaneous: TLabel; - Image5: TImage; - chbxNodeAutoHeight: TCheckBox; - chbxAutoWidth: TCheckBox; - Bevel2: TBevel; - Bevel3: TBevel; - lblPreview: TStaticText; - stTransparent: TStaticText; - procedure btnFontClick(Sender: TObject); - procedure chbxTransparentClick(Sender: TObject); - procedure lblExpandLevelClick(Sender: TObject); - procedure lblColorClick(Sender: TObject); - procedure chbxAutoNodesExpandClick(Sender: TObject); - procedure chbxNodeAutoHeightClick(Sender: TObject); - procedure chbxShowClick(Sender: TObject); - procedure chbxAutoWidthClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure stTransparentClick(Sender: TObject); - private - FccbxColor: TCustomComboBox; - FccbxGridLineColor: TCustomComboBox; - FccbxTreeLineColor: TCustomComboBox; - FseExpandLevel: TCustomEdit; - FPreviewBox: TCustomControl; - FPreviewFont: TFont; - procedure ccbxColorChange(Sender: TObject); - procedure CreateControls; - procedure ExpandLevelChange(Sender: TObject); - function GetReportLink: TCustomdxNativeTreeViewReportLink; - procedure pbxPreviewPaint(Sender: TObject); - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property ReportLink: TCustomdxNativeTreeViewReportLink read GetReportLink; - end; - -const - dxDefaultTreeViewPaintOptions: TdxTreeViewPaintOptions = - [tvpoStateImages, tvpoImages, tvpoTreeLines, tvpoButtons]; - -implementation - -{$R *.DFM} - -uses - ClipBrd, SysUtils, cxClasses, dxPrnDev, dxPSUtl, dxExtCtrls; - -const - dxDefaultTVLinkWidth = 400; - -type - TCustomTreeViewAccess = class(TCustomTreeView); - -{ TreeView Helpers } - -function TreeViewGetImages(AControl: TCustomTreeView): TCustomImageList; -begin - Result := TCustomTreeViewAccess(AControl).Images; -end; - -function TreeViewGetItems(AControl: TCustomTreeView): TTreeNodes; -begin - Result := TCustomTreeViewAccess(AControl).Items; -end; - -function TreeViewGetStateImages(AControl: TCustomTreeView): TCustomImageList; -begin - Result := TCustomTreeViewAccess(AControl).StateImages; -end; - -{ Utilities } - -function GetDesignerString(AnIndex: Integer): string; -begin - case AnIndex of - 0: Result := cxGetResourceString(@sdxTechnicalDepartment); - 1: Result := cxGetResourceString(@sdxSoftwareDepartment); - 2: Result := cxGetResourceString(@sdxSystemProgrammers); - 3: Result := cxGetResourceString(@sdxEndUserProgrammers); - 4: Result := cxGetResourceString(@sdxBetaTesters); - else - Result := cxGetResourceString(@sdxHumanResourceDepartment); - end; -end; - -{ TCustomdxNativeTreeViewReportLink } - -constructor TCustomdxNativeTreeViewReportLink.Create(AOwner: TComponent); -begin - inherited; - InternalRestoreDefaults; - LinkModified(False); - FNodeList := TList.Create; - CreateImages; -end; - -destructor TCustomdxNativeTreeViewReportLink.Destroy; -begin - DeleteImages; - FreeAndNil(FNodeList); - inherited; -end; - -procedure TCustomdxNativeTreeViewReportLink.Assign(Source: TPersistent); -begin - if Source is TCustomdxNativeTreeViewReportLink then - with TCustomdxNativeTreeViewReportLink(Source) do - begin - Self.FIsWidthAssigned := FIsWidthAssigned; - Self.AutoNodesExpand := AutoNodesExpand; - Self.AutoWidth := AutoWidth; - Self.ExpandLevel := ExpandLevel; - Self.ExplicitTreeViewExpand := ExplicitTreeViewExpand; - Self.GridLineColor := GridLineColor; - Self.Options := Options; - Self.TreeLineColor := TreeLineColor; - Self.Width := Width; - end; - inherited; -end; - -class function TCustomdxNativeTreeViewReportLink.Aggregable: Boolean; -begin - Result := True; -end; - -function TCustomdxNativeTreeViewReportLink.DefaultWidth: Integer; -begin - Result := dxDefaultTVLinkWidth; -end; - -procedure TCustomdxNativeTreeViewReportLink.Initialize; -begin - inherited; - FreeAndNil(FNodeHeights); -end; - -procedure TCustomdxNativeTreeViewReportLink.AssignData(ANode: HTREEITEM; - ADataItem: TAbstractdxReportCellData); -begin - ADataItem.Data := Integer(ANode); - ADataItem.CellSides := GetCellSides(ANode); - ADataItem.Transparent := True; - TdxReportCellString(ADataItem).Text := TV_GetNodeText(ANode); - TdxReportCellString(ADataItem).Multiline := NodeAutoHeight and not AutoWidth; -end; - -procedure TCustomdxNativeTreeViewReportLink.ConstructReport(AReportCells: TdxReportCells); - - procedure InsertNodeIndent(AParentCell: TdxReportCell; ANode: HTREEITEM; var ALeftOffset: Integer); - - function GetIndentShowButton(AtLevel: Integer; ANode: HTREEITEM): Boolean; - begin - Result := (tvpoButtons in Options) and (TV_GetNodeParentAtLevel(ANode, AtLevel) = ANode) and - TV_GetNodeHasChildren(ANode); - end; - - function GetIndentButtonExpanded(ANode: HTREEITEM): Boolean; - begin - if AutoNodesExpand then - if ExplicitTreeViewExpand then - Result := TV_IsNodeExpanded(ANode) and ((ExpandLevel = -1) or (ExpandLevel > TV_GetNodeLevel(ANode))) - else - Result := TV_GetNodeCount(ANode) <> 0 - else - Result := TV_IsNodeExpanded(ANode); - end; - - function GetIndentTreeLineMode(AtLevel: Integer; ANode: HTREEITEM): TdxPSTreeLineMode; - var - Parent: HTREEITEM; - begin - if tvpoTreeLines in Options then - begin - Parent := TV_GetNodeParentAtLevel(ANode, AtLevel); - if Parent = ANode then - if TV_IsNodeLastChild(ANode) then - Result := tlmBottomRightCorner - else - if not TV_IsNodeParentExists(ANode) and TV_IsNodeFirstChild(ANode) then - Result := tlmTopRightCorner - else - Result := tlmCross - else - if TV_IsNodeLastChild(Parent) then - Result := tlmNone - else - Result := tlmVertical; - end - else - Result := tlmNone - end; - - function GetIndentCellSides(I, ALevel: Integer; ANode: HTREEITEM): TdxCellSides; - begin - Result := []; - if IsDrawGrid then - begin - if (I <> 0) or IsDrawBorder then - Include(Result, csLeft); - if I <> 0 then - Include(Result, csRight); - -{2.0} if (I = ALevel) or (not TV_IsNodeParentExists(ANode) and (not IsFirstNode(ANode) or IsDrawBorder)) then - Include(Result, csTop); - - if (TV_GetNodeCount(ANode) = 0) or (not TV_IsNodeExpanded(ANode) and not AutoNodesExpand) then - begin - if I = ALevel then - begin - if not IsFirstNode(ANode) or IsDrawBorder then - Include(Result, csTop); - if not IsLastNode(ANode) or IsDrawBorder then - Include(Result, csBottom); - end - else - if TV_IsNodeLastChild(ANode) then - Include(Result, csBottom); - end; - end; - if IsDrawBorder then - begin - if I = 0 then - Include(Result, csLeft); - if IsFirstNode(ANode) then - Include(Result, csTop); - if IsLastNode(ANode) then - Include(Result, csBottom); - end; - end; - - var - MaxLevel, I: Integer; - begin - MaxLevel := TV_GetNodeLevel(ANode) - Ord(not TV_IsShowRoot); - for I := 0 to MaxLevel do - begin - with TdxReportCellExpandButton.Create(AParentCell) do - begin - BoundsRect := MakeBounds(ALeftOffset, 0, FIndent, Parent.Height); - CellSides := GetIndentCellSides(I, MaxLevel, ANode); - ShowButton := GetIndentShowButton(MaxLevel - I, ANode); - if ShowButton then - begin - ButtonExpanded := GetIndentButtonExpanded(ANode); - ButtonSize := 9; - end; - TreeLineMode := GetIndentTreeLineMode(MaxLevel - I, ANode); - end; - Inc(ALeftOffset, FIndent); - end; - end; - - procedure InsertImage(AParentCell: TdxReportCell; ANode: HTREEITEM; - AImageList: TCustomImageList; AImageIndex: Integer; var ALeftOffset: Integer); - - function GetImageCellSides(ANode: HTREEITEM; AnItem: TdxReportVisualItem): TdxCellSides; - begin - Result := []; - if IsDrawBorder then - begin - if (TV_GetNodeLevel(ANode) = 0) and AnItem.IsFirstItem then - Include(Result, csLeft); - if IsFirstNode(ANode) then - Include(Result, csTop); - if IsLastNode(ANode) then - Include(Result, csBottom); - end; - if IsDrawGrid then - begin - if not IsFirstNode(ANode) or IsDrawBorder then - Include(Result, csTop); - if not IsLastNode(ANode) or IsDrawBorder then - Include(Result, csBottom); - end; - end; - - var - Item: TdxReportCellGraphic; - begin - Item := TdxReportCellGraphic.Create(AParentCell); - with Item do - begin - CellSides := GetImageCellSides(ANode, Item); - DrawMode := gdmCenter; - Transparent := True; - - BoundsRect := MakeBounds(ALeftOffset, 0, 0, Parent.Height); - Width := AImageList.Width; - if Width < FIndent then Width := FIndent; - - ImageList := AImageList; - ImageIndex := AImageIndex; - Inc(ALeftOffset, Width); - end; - end; - - procedure ProcessNode(ANode: HTREEITEM; Index: Integer); - var - LeftOffset, V: Integer; - Cell: TdxReportCell; - PrevSibl: TdxReportVisualItem; - DataItem: TAbstractdxReportCellData; - begin - Cell := TdxReportCell.Create(AReportCells.Cells); - with Cell do - begin - PrevSibl := TdxReportVisualItem(GetPrevSibling); - V := 0; - if PrevSibl <> nil then - V := PrevSibl.BoundsRect.Bottom; - BoundsRect := MakeBounds(0, V, FActualWidth, GetNodeHeight(Index)); - CellSides := []; - if IsDrawBorder then - begin - CellSides := CellSides + [csLeft, csRight]; - if IsFirstNode(ANode) then - CellSides := CellSides + [csTop]; - if IsLastNode(ANode) then - CellSides := CellSides + [csBottom]; - end; - - Color := Self.Color; - Transparent := Self.Transparent; - end; - - LeftOffset := 0; - InsertNodeIndent(Cell, ANode, LeftOffset); - if IsDrawNodeStateImages(ANode) then - InsertImage(Cell, ANode, StateImages, TV_GetNodeStateIndex(ANode), LeftOffset); - if IsDrawNodeImages(ANode) then - InsertImage(Cell, ANode, Images, TV_GetNodeImageIndex(ANode), LeftOffset); - - DataItem := GetDataClass(ANode).Create(Cell); - DataItem.BoundsRect := MakeRect(LeftOffset, 0, FActualWidth, Cell.Height); - InitializeItem(ANode, DataItem); - end; - - procedure AdjustCellsWidth; - - function GetRealWidth: Integer; - var - W, I: Integer; - Size: TSize; - Item: TdxReportVisualItem; - PrevFont: HFONT; - Node: HTREEITEM; - begin - Result := 0; - FScreenDC := GetDC(0); - try - PrevFont := SelectObject(FScreenDC, Font.Handle); - for I := 0 to AReportCells.Cells.CellCount - 1 do - begin - W := 0; - Node := HTREEITEM(FNodeList[I]); - Inc(W, (TV_GetNodeLevel(Node) + Ord(TV_IsShowRoot)) * FIndent); - - if IsDrawNodeStateImages(Node) then Inc(W, StateImages.Width); - if IsDrawNodeImages(Node) then Inc(W, Images.Width); - - with AReportCells.Cells[I] do - Item := DataItems[DataItemCount - 1]; - with TdxReportCellString(Item) do - GetTextExtentPoint32(FScreenDC, PChar(Text), Length(Text), Size); - - Inc(W, Size.cX + 10); - if W > Result then Result := W; - end; - SelectObject(FScreenDC, PrevFont); - finally - ReleaseDC(0, FScreenDC); - end; - end; - - var - I: Integer; - Item: TdxReportVisualItem; - begin - FActualWidth := GetRealWidth; - for I := 0 to AReportCells.Cells.CellCount - 1 do - begin - Item := AReportCells.Cells[I]; - Item.Width := FActualWidth; - with TdxReportCell(Item) do - Item := DataItems[DataItemCount - 1]; - with Item, BoundsRect do - BoundsRect := MakeRect(Left, Top, FActualWidth, Bottom); - end; - end; - - procedure AddNodes; - - procedure AddNode(ANode: HTREEITEM); - begin - FNodeList.Add(ANode); - if TV_IsNodeExpanded(ANode) or AutoNodesExpand then - begin - ANode := TreeView_GetChild(TreeViewHandle, ANode); - while ANode <> nil do - begin - if (ExpandLevel = -1) or (TV_GetNodeLevel(ANode) <= ExpandLevel) then - AddNode(ANode); - ANode := TreeView_GetNextSibling(TreeViewHandle, ANode); - end; - end; - end; - - var - Node: HTREEITEM; - begin - FNodeList.Clear; - if TreeView_GetCount(TreeViewHandle) = 0 then Exit; - - if AutoNodesExpand and ExplicitTreeViewExpand then - DoExplicitTreeViewExpand(ExpandLevel); - - Node := TreeView_GetRoot(TreeViewHandle); - while Node <> nil do - begin - AddNode(Node); - Node := TreeView_GetNextSibling(TreeViewHandle, Node); - end; - end; - - procedure IterateNodes; - var - I: Integer; - begin - with FNodeList do - for I := 0 to Count - 1 do - begin - ProcessNode(HTREEITEM(Items[I]), I); - AReportCells.DoProgress(MulDiv(I, 100, Count)); - if AbortBuilding then Break; - end; - end; - -begin - if TreeViewHandle = 0 then Exit; - inherited; - - AddNodes; - if FNodeList.Count = 0 then Exit; - - AReportCells.Cells.FontIndex := 0; - AReportCells.Cells.Transparent := Transparent; - AReportCells.Cells.Color := Color; - AReportCells.BorderColor := GridLineColor; - AReportCells.ExpandButtonBorderColor := clGrayText; - AReportCells.TreeLineColor := TreeLineColor; - - PrepareContruct; - try - IterateNodes; - if not AbortBuilding and AutoWidth then - AdjustCellsWidth; - finally - UnprepareContruct; - end; - - if not AbortBuilding then - with AReportCells do - Cells.BoundsRect := MakeRect(0, 0, FActualWidth, Cells.LastCell.BoundsRect.Bottom); -end; - -procedure TCustomdxNativeTreeViewReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(Images); - AProc(StateImages); -end; - -procedure TCustomdxNativeTreeViewReportLink.InitializeItem(ANode: HTREEITEM; - ADataItem: TAbstractdxReportCellData); -begin - AssignData(ANode, ADataItem); -end; - -procedure TCustomdxNativeTreeViewReportLink.InternalRestoreDefaults; -begin - inherited; - FAutoNodesExpand := False; - FAutoWidth := True; - FExpandLevel := -1; - FExplicitTreeViewExpand := False; - FGridLineColor := dxDefaultGridLineColor; - FTreeLineColor := dxDefaultTreeLineColor; - FNodeAutoHeight := False; - FOptions := dxDefaultTreeViewPaintOptions; - FIsWidthAssigned := False; -end; - -procedure TCustomdxNativeTreeViewReportLink.MakeDelimiters(AReportCells: TdxReportCells; - AHorzDelimiters, AVertDelimiters: TList); -var - I, V: Integer; -begin - inherited; - if UseVertDelimiters then - with AReportCells, Cells do - for I := 1 to CellCount - 2 do - begin - V := Cells[I].BoundsRect.Bottom; - AVertDelimiters.Add(TObject(V)); - end; -end; - -procedure TCustomdxNativeTreeViewReportLink.PrepareContruct; -var - R: TRect; -begin - SendMessage(TreeViewHandle, WM_SETREDRAW, 0, 0); - - ClearImages; - - FIndent := TreeView_GetIndent(TreeViewHandle); - if not Odd(FIndent) then Inc(FIndent); - - FScreenDC := GetDC(0); - try - FNodeHeight := Renderer.CalcTextPatternHeight(FScreenDC, Font); - - if CanDrawStateImages and (FNodeHeight < StateImages.Height + 2) then - FNodeHeight := StateImages.Height + 2; - if CanDrawImages and (FNodeHeight < Images.Height + 2) then - FNodeHeight := Images.Height + 2; - - if AutoWidth then - FActualWidth := 0 - else - if NodeAutoHeight then - begin - GetClientRect(TreeViewHandle, R); - FActualWidth := R.Right - R.Left; - end - else - FActualWidth := Self.Width; - - if NodeAutoHeight and not AutoWidth then - CalcNodesHeight; - finally - ReleaseDC(0, FScreenDC); - end; -end; - -procedure TCustomdxNativeTreeViewReportLink.UnprepareContruct; -begin - FreeAndNil(FNodeHeights); - - SendMessage(TreeViewHandle, WM_SETREDRAW, 1, 0); - InvalidateRect(TreeViewHandle, nil, False); -end; - -function TCustomdxNativeTreeViewReportLink.GetDataClass(ANode: HTREEITEM): TdxReportCellDataClass; -begin - Result := TdxReportCellString; -end; - -function TCustomdxNativeTreeViewReportLink.CheckImages: Boolean; -begin - Result := HasImages and (Images.Width <> 0) and (Images.Height <> 0); -end; - -function TCustomdxNativeTreeViewReportLink.CheckStateImages: Boolean; -begin - Result := HasStateImages and (StateImages.Width <> 0) and (StateImages.Height <> 0); -end; - -procedure TCustomdxNativeTreeViewReportLink.ClearImages; -begin - if not IsAggregated then - begin - if FImages <> nil then FImages.Clear; - if FStateImages <> nil then FStateImages.Clear; - end; -end; - -procedure TCustomdxNativeTreeViewReportLink.CreateImages; -begin - FImages := TImageList.Create(nil); - FStateImages := TImageList.Create(Self); -end; - -procedure TCustomdxNativeTreeViewReportLink.DeleteImages; -begin - FreeAndNil(FStateImages); - FreeAndNil(FImages); -end; - -function TCustomdxNativeTreeViewReportLink.GetImages: TCustomImageList; -begin - if FImages.Count = 0 then - CopyImages(TreeView_GetImageList(TreeViewHandle, TVSIL_NORMAL), FImages); - Result := FImages; -end; - -function TCustomdxNativeTreeViewReportLink.GetStateImages: TCustomImageList; -begin - if FStateImages.Count = 0 then - CopyImages(TreeView_GetImageList(TreeViewHandle, TVSIL_STATE), FStateImages); - Result := FStateImages; -end; - -function TCustomdxNativeTreeViewReportLink.HasImages: Boolean; -begin - Result := TreeView_GetImageList(TreeViewHandle, TVSIL_NORMAL) <> 0; -end; - -function TCustomdxNativeTreeViewReportLink.HasStateImages: Boolean; -begin - Result := TreeView_GetImageList(TreeViewHandle, TVSIL_STATE) <> 0; -end; - -procedure TCustomdxNativeTreeViewReportLink.DoExplicitTreeViewExpand(ALevel: Integer = -1); - - procedure ExpandNode(ANode: HTREEITEM); - begin - TreeView_Expand(TreeViewHandle, ANode, TVE_EXPAND); - if ALevel <> -1 then - begin - Dec(ALevel); - if ALevel = -1 then Exit; - end; - - ANode := TreeView_GetChild(TreeViewHandle, ANode); - while ANode <> nil do - begin - ExpandNode(ANode); - ANode := TreeView_GetNextSibling(TreeViewHandle, ANode); - end; - end; - -var - Node: HTREEITEM; -begin - if ALevel < -1 then ALevel := -1; - - Node := TreeView_GetRoot(TreeViewHandle); - if ALevel <> -1 then - begin - Dec(ALevel); - if ALevel = -1 then Exit; - end; - - while Node <> nil do - begin - ExpandNode(Node); - Node := TreeView_GetNextSibling(TreeViewHandle, Node); - end; -end; - -{ IdxPSNativeWin32ControlHandleSupport } - -function TCustomdxNativeTreeViewReportLink.GetNativeHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - Result := TreeViewHandle; -end; - -procedure TCustomdxNativeTreeViewReportLink.SetNativeHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); -begin - TreeViewHandle := Value; -end; - -function TCustomdxNativeTreeViewReportLink.TV_GetNodeCount(AItem: HTREEITEM): Integer; -var - Child: HTREEITEM; -begin - Result := 0; - Child := TreeView_GetChild(TreeViewHandle, AItem); - while Child <> nil do - begin - Inc(Result); - Child := TreeView_GetNextSibling(TreeViewHandle, Child); - end; -end; - -function TCustomdxNativeTreeViewReportLink.TV_GetNodeHasChildren(AItem: HTREEITEM): Boolean; -var - Item: TTVItem; -begin - FillChar(Item, Sizeof(Item), 0); - Item.Mask := TVIF_CHILDREN; - Item.hItem := AItem; - TreeView_GetItem(TreeViewHandle, Item); - Result := Item.cChildren <> 0; -end; - -function TCustomdxNativeTreeViewReportLink.TV_GetNodeImageIndex(AItem: HTREEITEM): Integer; -var - Item: TTVItem; -begin - FillChar(Item, Sizeof(Item), 0); - Item.Mask := TVIF_IMAGE; - Item.hItem := AItem; - TreeView_GetItem(TreeViewHandle, Item); - Result := Item.iImage; -end; - -function TCustomdxNativeTreeViewReportLink.TV_GetNodeLevel(AItem: HTREEITEM): Integer; -var - Parent: HTREEITEM; -begin - Result := 0; - Parent := TV_GetNodeParent(AItem); - while Parent <> nil do - begin - Inc(Result); - Parent := TV_GetNodeParent(Parent); - end; -end; - -function TCustomdxNativeTreeViewReportLink.TV_GetNodeParent(AItem: HTREEITEM): HTREEITEM; -begin - Result := TreeView_GetParent(TreeViewHandle, AItem); -end; - -function TCustomdxNativeTreeViewReportLink.TV_GetNodeParentAtLevel(AItem: HTREEITEM; - ALevel: Integer): HTREEITEM; -begin - Result := AItem; - while ALevel > 0 do - begin - Result := TV_GetNodeParent(Result); - Dec(ALevel); - end; -end; - -function TCustomdxNativeTreeViewReportLink.TV_GetNodeStateIndex(AItem: HTREEITEM): Integer; -var - Item: TTVItem; -begin - FillChar(Item, SizeOf(Item), 0); - Item.Mask := TVIF_IMAGE; - Item.StateMask := TVIS_STATEIMAGEMASK; - Item.hItem := AItem; - TreeView_GetItem(TreeViewHandle, Item); - Result := (Item.State and TVIS_STATEIMAGEMASK) shr 12; - if Result = 0 then Result := -1; -end; - -function TCustomdxNativeTreeViewReportLink.TV_GetNodeText(AItem: HTREEITEM): string; -const - BufferLength = 4096; -var - Item: TTVItem; - Buffer: array[0..BufferLength - 1] of Char; - PBuffer: Pointer; -begin - FillChar(Item, Sizeof(Item), 0); - PBuffer := @Buffer; - Item.Mask := TVIF_TEXT; - Item.hItem := AItem; - Item.pszText := PBuffer; - Item.cchTextMax := BufferLength; - TreeView_GetItem(TreeViewHandle, Item); - Result := (Item.pszText); -end; - -function TCustomdxNativeTreeViewReportLink.TV_IsNodeExpanded(AItem: HTREEITEM): Boolean; -var - Item: TTVItem; -begin - FillChar(Item, Sizeof(Item), 0); - Item.Mask := TVIF_STATE; - Item.hItem := AItem; - TreeView_GetItem(TreeViewHandle, Item); - Result := Item.State and TVIS_EXPANDED = TVIS_EXPANDED; -end; - -function TCustomdxNativeTreeViewReportLink.TV_IsNodeParentExists(AItem: HTREEITEM): Boolean; -begin - Result := TV_GetNodeParent(AItem) <> nil; -end; - -function TCustomdxNativeTreeViewReportLink.TV_IsNodeFirstChild(AItem: HTREEITEM): Boolean; -begin - Result := TreeView_GetPrevSibling(TreeViewHandle, AItem) = nil; -end; - -function TCustomdxNativeTreeViewReportLink.TV_IsNodeLastChild(AItem: HTREEITEM): Boolean; -begin - Result := TreeView_GetNextSibling(TreeViewHandle, AItem) = nil; -end; - -function TCustomdxNativeTreeViewReportLink.TV_IsShowButtons: Boolean; -begin - Result := GetWindowLong(TreeViewHandle, GWL_STYLE) and TVS_HASBUTTONS = TVS_HASBUTTONS; -end; - -function TCustomdxNativeTreeViewReportLink.TV_IsShowLines: Boolean; -begin - Result := GetWindowLong(TreeViewHandle, GWL_STYLE) and TVS_HASLINES = TVS_HASLINES; -end; - -function TCustomdxNativeTreeViewReportLink.TV_IsShowRoot: Boolean; -begin - Result := GetWindowLong(TreeViewHandle, GWL_STYLE) and TVS_LINESATROOT = TVS_LINESATROOT; -end; - -function TCustomdxNativeTreeViewReportLink.GetOptions: TdxTreeViewPaintOptions; -begin - Result := FOptions; -end; - -function TCustomdxNativeTreeViewReportLink.GetWidth: Integer; -begin - if FIsWidthAssigned then - Result := FWidth - else - Result := DefaultWidth; -end; - -function TCustomdxNativeTreeViewReportLink.IsWidthStored: Boolean; -begin - Result := FIsWidthAssigned and (Width <> DefaultWidth); -end; - -procedure TCustomdxNativeTreeViewReportLink.SetAutoNodesExpand(Value: Boolean); -begin - if FAutoNodesExpand <> Value then - begin - FAutoNodesExpand := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxNativeTreeViewReportLink.SetAutoWidth(Value: Boolean); -begin - if FAutoWidth <> Value then - begin - FAutoWidth := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxNativeTreeViewReportLink.SetExpandLevel(Value: Integer); -begin - if Value < -1 then Value := -1; - if FExpandLevel <> Value then - begin - FExpandLevel := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxNativeTreeViewReportLink.SetExplicitTreeViewExpand(Value: Boolean); -begin - FExplicitTreeViewExpand := Value; -end; - -procedure TCustomdxNativeTreeViewReportLink.SetGridLineColor(Value: TColor); -begin - if FGridLineColor <> Value then - begin - FGridLineColor := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxNativeTreeViewReportLink.SetNodeAutoHeight(Value: Boolean); -begin - if FNodeAutoHeight <> Value then - begin - FNodeAutoHeight := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxNativeTreeViewReportLink.SetOptions(Value: TdxTreeViewPaintOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxNativeTreeViewReportLink.SetTreeLineColor(Value: TColor); -begin - if FTreeLineColor <> Value then - begin - FTreeLineColor := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxNativeTreeViewReportLink.SetWidth(Value: Integer); -begin - if FWidth <> Value then - begin - FIsWidthAssigned := True; - FWidth := Value; - if not AutoWidth then LinkModified(True); - end; -end; - -procedure TCustomdxNativeTreeViewReportLink.CalcNodesHeight; -var - I, W, H: Integer; - Node: HTREEITEM; - R: TRect; -begin - FNodeHeights := TList.Create; - FNodeHeights.Capacity := FNodeList.Count; - for I := 0 to FNodeList.Count - 1 do - begin - Node := HTREEITEM(FNodeList[I]); - W := FActualWidth - (TV_GetNodeLevel(Node) + 1) * FIndent; - if CanDrawStateImages then Dec(W, StateImages.Width + 2); - if CanDrawImages then Dec(W, Images.Width + 2); - - R := MakeRect(0, 0, W, 0); - H := Renderer.CalcTextRect(FScreenDC, TV_GetNodeText(Node), R, False, nil); - if H < FNodeHeight then H := FNodeHeight; - if not Odd(H) then Inc(H); - FNodeHeights.Add(Pointer(H)); - end; -end; - -function TCustomdxNativeTreeViewReportLink.CanDrawImages: Boolean; -begin - Result := (tvpoImages in Options) and CheckImages and Images.HandleAllocated; -end; - -function TCustomdxNativeTreeViewReportLink.CanDrawStateImages: Boolean; -begin - Result := (tvpoStateImages in Options) and CheckStateImages and StateImages.HandleAllocated; -end; - -function TCustomdxNativeTreeViewReportLink.GetCellSides(ANode: HTREEITEM): TdxCellSides; -var - IsAnyImagesExists: Boolean; -begin - Result := []; - IsAnyImagesExists := IsDrawNodeImages(ANode) or IsDrawNodeStateImages(ANode); - if IsDrawGrid then - begin - if not IsFirstNode(ANode) or IsDrawBorder then - Include(Result, csTop); - if not IsLastNode(ANode) or IsDrawBorder then - Include(Result, csBottom); - if IsDrawBorder and (TV_GetNodeLevel(ANode) = 0) and not IsAnyImagesExists then - Include(Result, csLeft); - end; - if IsDrawBorder then - begin - Include(Result, csRight); - if (TV_GetNodeLevel(ANode) = 0) and not IsAnyImagesExists then - Include(Result, csLeft); - if IsFirstNode(ANode) then - Include(Result, csTop); - if IsLastNode(ANode) then - Include(Result, csBottom); - end; -end; - -function TCustomdxNativeTreeViewReportLink.GetNodeHeight(Index: Integer): Integer; -begin - if FNodeHeights <> nil then - Result := Integer(FNodeHeights[Index]) - else - Result := FNodeHeight; -end; - -function TCustomdxNativeTreeViewReportLink.IsDrawBorder: Boolean; -begin - Result := tvpoBorder in Options; -end; - -function TCustomdxNativeTreeViewReportLink.IsDrawGrid: Boolean; -begin - Result := tvpoGrid in Options; -end; - -function TCustomdxNativeTreeViewReportLink.IsDrawNodeImages(ANode: HTREEITEM): Boolean; -begin - Result := CanDrawImages and IsValidNodeImageIndex(ANode); -end; - -function TCustomdxNativeTreeViewReportLink.IsDrawNodeStateImages(ANode: HTREEITEM): Boolean; -begin - Result := CanDrawStateImages and IsValidNodeStateIndex(ANode); -end; - -function TCustomdxNativeTreeViewReportLink.IsFirstNode(ANode: HTREEITEM): Boolean; -begin - Result := TObject(ANode) = FNodeList.First; -end; - -function TCustomdxNativeTreeViewReportLink.IsLastNode(ANode: HTREEITEM): Boolean; -begin - Result := TObject(ANode) = FNodeList.Last; -end; - -function TCustomdxNativeTreeViewReportLink.IsValidNodeImageIndex(ANode: HTREEITEM): Boolean; -var - ImageIndex: Integer; -begin - ImageIndex := TV_GetNodeImageIndex(ANode); - Result := (ImageIndex > -1) and (ImageIndex < Images.Count); -end; - -function TCustomdxNativeTreeViewReportLink.IsValidNodeStateIndex(ANode: HTREEITEM): Boolean; -var - StateIndex: Integer; -begin - StateIndex := TV_GetNodeStateIndex(ANode); - Result := (StateIndex > -1) and (StateIndex < StateImages.Count); -end; - -{ TdxNativeTreeViewReportLink } - -function TdxNativeTreeViewReportLink.DataProviderPresent: Boolean; -begin - if DataSource = rldsComponent then - Result := IsWindow(TreeViewHandle) - else - Result := inherited DataProviderPresent; -end; - -procedure TdxNativeTreeViewReportLink.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent is TWinControl) and TWinControl(Component).HandleAllocated and - (TWinControl(Component).Handle = TreeViewHandle) then - TreeViewHandle := 0; -end; - -function TdxNativeTreeViewReportLink.GetDesignerClass: TdxReportLinkDesignWindowClass; -begin - Result := TdxfmTVReportLinkDesignWindow; -end; - -function TdxNativeTreeViewReportLink.GetTreeViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - Result := FTreeViewHandle; -end; - -procedure TdxNativeTreeViewReportLink.SetTreeViewHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); -begin - if (FTreeViewHandle <> Value) and IsWindow(Value) then - begin - FTreeViewHandle := Value; - LinkModified(True); - end; -end; - -{ TCustomdxTreeViewReportLink } - -constructor TCustomdxTreeViewReportLink.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FSaveFont := TFont.Create; - FSaveFont.OnChange := CustomDrawFontChanged; -end; - -destructor TCustomdxTreeViewReportLink.Destroy; -begin - FSaveFont.Free; - inherited Destroy; -end; - -procedure TCustomdxTreeViewReportLink.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TCustomdxTreeViewReportLink then - SupportedCustomDraw := TCustomdxTreeViewReportLink(Source).SupportedCustomDraw; -end; - -class function TCustomdxTreeViewReportLink.Aggregable: Boolean; -begin - Result := True; -end; - -procedure TCustomdxTreeViewReportLink.InitializeItem(ANode: HTREEITEM; - ADataItem: TAbstractdxReportCellData); -begin - inherited; - DoInitializeNode(TreeViewGetItems(CustomTreeView).GetNode(ANode), ADataItem); -end; - -procedure TCustomdxTreeViewReportLink.InternalRestoreDefaults; -begin - inherited InternalRestoreDefaults; - FSupportedCustomDraw := False; -end; - -function TCustomdxTreeViewReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -begin - Result := SupportedCustomDraw; - if Result and (Item <> nil) then - Result := (Item.Data <> 0) and Assigned(FOnCustomDrawNode); -end; - -function TCustomdxTreeViewReportLink.GetImages: TCustomImageList; -begin - if IsAggregated then - Result := TreeViewGetImages(CustomTreeView) - else - Result := inherited GetImages; -end; - -function TCustomdxTreeViewReportLink.GetStateImages: TCustomImageList; -begin - if IsAggregated then - Result := TreeViewGetStateImages(CustomTreeView) - else - Result := inherited GetStateImages; -end; - -function TCustomdxTreeViewReportLink.GetCustomTreeView: TCustomTreeView; -begin - Result := TCustomTreeView(Component); -end; - -function TCustomdxTreeViewReportLink.GetTreeViewHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - Result := CustomTreeView.Handle; -end; - -procedure TCustomdxTreeViewReportLink.SetTreeViewHandle(Value: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}); -begin - -end; - -{procedure TCustomdxTreeViewReportLink.DoExplicitTreeViewExpand; -begin - TreeView.FullExpand; -end;} - -procedure TCustomdxTreeViewReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - AColor: TColor; - AText: string; - ATextAlignX: TcxTextAlignX; - ATextAlignY: TcxTextAlignY; -begin - if AItem.Data = 0 then Exit; - with TdxReportCellString(AItem) do - begin - AColor := ColorToRGB(Color); - if Transparent then AColor := clNone; - FSaveFont.Assign(Font); - FCustomDrawFontChanged := False; - AText := Text; - ATextAlignX := TextAlignX; - ATextAlignY := TextAlignY; - DoCustomDrawNode(TreeViewGetItems(CustomTreeView).GetNode(HTREEITEM(Data)), - ACanvas, ABoundsRect, AClientRect, AText, FSaveFont, AColor, ATextAlignX, ATextAlignY, ADone); - if not ADone then - begin - if FCustomDrawFontChanged then - begin - SelectObject(ACanvas.Handle, FSaveFont.Handle); - SetTextColor(ACanvas.Handle, ColorToRGB(FSaveFont.Color)); - FontIndex := -1; - end; - if AColor <> clNone then - begin - Color := AColor; - Transparent := False; - end; - Text := AText; - TextAlignX := ATextAlignX; - TextAlignY := ATextAlignY; - end; - end; -end; - -procedure TCustomdxTreeViewReportLink.DoCustomDrawNode(ANode: TTreeNode; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var AText: string; AFont: TFont; - var AColor: TColor; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawNode) then - FOnCustomDrawNode(Self, ANode, ACanvas, ABoundsRect, AClientRect, AText, AFont, - AColor, ATextAlignX, ATextAlignY, ADone); -end; - -procedure TCustomdxTreeViewReportLink.DoInitializeNode(ANode: TTreeNode; - AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeNode) then - FOnInitializeNode(Self, ANode, TdxReportCellString(AnItem)); -end; - -procedure TCustomdxTreeViewReportLink.SetSupportedCustomDraw(Value: Boolean); -begin - if FSupportedCustomDraw <> Value then - begin - FSupportedCustomDraw := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeViewReportLink.CustomDrawFontChanged(Sender: TObject); -begin - FCustomDrawFontChanged := True; -end; - -{ TdxTreeViewReportLink } - -function TdxTreeViewReportLink.GetTreeView: TTreeView; -begin - Result := TTreeView(Component); -end; - -{$IFDEF REGISTERSHELLCTRLS} - -{ TCustomdxShellTreeViewReportLink } - -procedure TCustomdxShellTreeViewReportLink.CreateImages; -begin -end; - -procedure TCustomdxShellTreeViewReportLink.DeleteImages; -begin -end; - -function TCustomdxShellTreeViewReportLink.GetImages: TCustomImageList; -begin - Result := dxPSUtl.ShellSmallImages; -end; - -function TCustomdxShellTreeViewReportLink.GetStateImages: TCustomImageList; -begin - Result := dxPSUtl.ShellSmallImages; -end; - -function TCustomdxShellTreeViewReportLink.HasStateImages: Boolean; -begin - Result := False; -end; - -function TCustomdxShellTreeViewReportLink.GetShellTreeView: TShellTreeView; -begin - Result := TShellTreeView(Component); -end; - -{$ENDIF} - -{ TdxTVReportLinkDesignWindow } - -constructor TdxfmTVReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhcTreeViewReportLinkDesigner; - inherited; - CreateControls; - PageControl1.ActivePage := PageControl1.Pages[0]; - FPreviewFont := TFont.Create; -end; - -destructor TdxfmTVReportLinkDesignWindow.Destroy; -begin - FreeAndNil(FPreviewFont); - inherited; -end; - -procedure TdxfmTVReportLinkDesignWindow.DoInitialize; -begin - inherited; - chbxShowBorders.Checked := ReportLink.IsDrawBorder; - chbxShowGrid.Checked := ReportLink.IsDrawGrid; - - chbxShowTreeLines.Checked := tvpoTreeLines in ReportLink.Options; - chbxShowButtons.Checked := tvpoButtons in ReportLink.Options; - - chbxShowStateImages.Checked := tvpoStateImages in ReportLink.Options; - chbxShowImages.Checked := tvpoImages in ReportLink.Options; - - chbxTransparent.Checked := ReportLink.Transparent; - TdxPSColorCombo(FccbxColor).ColorValue := ReportLink.Color; - TdxPSColorCombo(FccbxGridLineColor).ColorValue := ReportLink.GridLineColor; - TdxPSColorCombo(FccbxTreeLineColor).ColorValue := ReportLink.TreeLineColor; - - FontInfoToText(ReportLink.Font, edFont); - - chbxAutoWidth.Checked := ReportLink.AutoWidth; - chbxNodeAutoHeight.Checked := ReportLink.NodeAutoHeight; - - chbxAutoNodesExpand.Checked := ReportLink.AutoNodesExpand; - TdxPSSpinEdit(FseExpandLevel).Value := ReportLink.ExpandLevel; -end; - -{$IFDEF DELPHI7} -function TdxfmTVReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxfmTVReportLinkDesignWindow.LoadStrings; -begin - inherited; - tshOptions.Caption := cxGetResourceString(@sdxOptions); - tshFonts.Caption := cxGetResourceString(@sdxFonts); - tshColors.Caption := cxGetResourceString(@sdxColors); - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviors); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblShow.Caption := cxGetResourceString(@sdxShow); - chbxShowBorders.Caption := cxGetResourceString(@sdxBorderLines); - chbxShowGrid.Caption := cxGetResourceString(@sdxGrid); - chbxShowTreeLines.Caption := cxGetResourceString(@sdxTreeLines); - chbxShowButtons.Caption := cxGetResourceString(@sdxButtons); - chbxShowImages.Caption := cxGetResourceString(@sdxImages); - chbxShowStateImages.Caption := cxGetResourceString(@sdxStateImages); - - lblMiscellaneous.Caption := cxGetResourceString(@sdxMiscellaneous); - chbxAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - chbxNodeAutoHeight.Caption := cxGetResourceString(@sdxNodeAutoHeight); - - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - lblGridLinesColor.Caption := cxGetResourceString(@sdxGridLinesColor); - lblTreeLinesColor.Caption := cxGetResourceString(@sdxTreeLinesColor); - - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - - lblExpanding.Caption := cxGetResourceString(@sdxExpanding); - chbxAutoNodesExpand.Caption := cxGetResourceString(@sdxAutoNodesExpand); - lblExpandLevel.Caption := cxGetResourceString(@sdxExpandLevel); -end; - -procedure TdxfmTVReportLinkDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -const - C: Integer = 6; - uFlags: UINT = DT_LEFT or DT_VCENTER or DT_SINGLELINE; -var - BR: TRect; - I, K, Offset, H, X, Y: Integer; - PrevMode: Integer; - PrevColor: COLORREF; - PrevFont: HFONT; - DC: HDC; - BorderBrush: HBRUSH; - FillBrush: HBRUSH; - - procedure DrawLine(const R: TRect); - begin - FillRect(DC, R, BorderBrush); - end; - - procedure DoDrawImage(X, Y, Index: Integer); - begin - ilPreview.Draw(ACanvas, X, Y, Index); - end; - - procedure DrawStateImage(X, Y: Integer); - begin - DoDrawImage(X, Y, 0); - end; - - procedure DrawImage(X, Y: Integer); - begin - DoDrawImage(X, Y, 1); - end; - - procedure DrawText(const S: string; R: TRect); - begin - if RectVisible(DC, R) then - Windows.DrawText(DC, PChar(S), Length(S), R, uFlags); - end; - -begin - inherited; - - BorderBrush := CreateSolidBrush(ColorToRGB(ReportLink.GridLineColor)); - BR := R; - OffsetRect(BR, -BR.Left, -BR.Top); - InflateRect(BR, -3, -3); - H := (BR.Bottom - BR.Top) div C; - BR.Bottom := BR.Top + H * C + 1; - DC := ACanvas.Handle; - - if ReportLink.IsDrawBorder and RectVisible(DC, BR) then - FrameRect(DC, BR, BorderBrush); - if not ReportLink.Transparent then - begin - if ReportLink.IsDrawBorder then - InflateRect(BR, -1, -1); - if RectVisible(DC, BR) then - begin - FillBrush := CreateSolidBrush(ColorToRGB(ReportLink.Color)); - FillRect(DC, BR, FillBrush); - DeleteObject(FillBrush); - end; - if ReportLink.IsDrawBorder then - InflateRect(BR, 1, 1); - end; - - // grid lines - if ReportLink.IsDrawGrid then - begin - // horz - for I := 0 to 4 do - begin - K := 1; - if I in [0, 4] then K := 0; - - X := BR.Left + K * H; - Y := BR.Top + (I + 1) * H; - DrawLine(MakeRect(X, Y, BR.Right, Y + 1)); - end; - // vert - X := BR.Left + H; - Y := BR.Top + H; - DrawLine(MakeRect(X, Y, X + 1, Y + 4 * H)); - DrawLine(MakeRect(X + H, Y + H, X + H + 1, Y + 3 * H)); - end; - - DeleteObject(BorderBrush); - - PrevMode := SetBkMode(DC, TRANSPARENT); - FPreviewFont.Assign(ReportLink.Font); - FPreviewFont.Size := 8; - PrevFont := SelectObject(DC, FPreviewFont.Handle); - PrevColor := SetTextColor(DC, ColorToRGB(FPreviewFont.Color)); - - for I := 0 to 5 do - begin - K := I; - if I > 2 then K := 5 - I; - Offset := 0; - if tvpoStateImages in ReportLink.Options then - begin - DrawStateImage(Offset + BR.Left + K * H + 1, BR.Top + I * H + 5); - Inc(Offset, ilPreview.Width); - end; - if tvpoImages in ReportLink.Options then - begin - DrawImage(Offset + BR.Left + K * H + 1, BR.Top + I * H + 5); - Inc(Offset, ilPreview.Width); - end; - Inc(Offset, 2); - - X := Offset + BR.Left + K * H; - Y := BR.Top + I * H; - DrawText(GetDesignerString(I), MakeRect(X, Y, BR.Right, Y + H)); - end; - - SelectObject(DC, PrevFont); - SetTextColor(DC, PrevColor); - SetBkMode(DC, PrevMode); -end; - -procedure TdxfmTVReportLinkDesignWindow.UpdateControlsState; -begin - inherited; - chbxNodeAutoHeight.Enabled := not chbxAutoWidth.Checked; - FccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := not chbxTransparent.Checked; - FseExpandLevel.Enabled := chbxAutoNodesExpand.Checked; -end; - -procedure TdxfmTVReportLinkDesignWindow.UpdatePreview; -begin - FPreviewBox.Invalidate; -end; - -procedure TdxfmTVReportLinkDesignWindow.ccbxColorChange(Sender: TObject); -var - AColor: TColor; -begin - if LockControlsUpdate then Exit; - AColor := TdxPSColorCombo(Sender).ColorValue; - case TTagToInt(TdxPSColorCombo(Sender).Tag) of - 0: ReportLink.Color := AColor; - 1: ReportLink.GridLineColor := AColor; - 2: ReportLink.TreeLineColor := AColor; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTVReportLinkDesignWindow.CreateControls; - - function CreateColorCombo(AParent: TWinControl; AHost: TControl; - ATag: Integer; AAutoColor: TColor; ALabel: TLabel): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(Result) do - begin - BoundsRect := AHost.BoundsRect; - Tag := MakeTTag(ATag); - Parent := AParent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - OnChange := ccbxColorChange; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - -var - R: TRect; -begin - FccbxColor := - CreateColorCombo(gbxTransparent, bvlColorHost, 0, dxDefaultColor, lblColor); - FccbxGridLineColor := - CreateColorCombo(pnlColor, bvlGridLineColorHost, 1, dxDefaultGridLineColor, lblGridLinesColor); - FccbxTreeLineColor := - CreateColorCombo(pnlColor, bvlTreeLineColorHost, 2, dxDefaultTreeLineColor, lblTreeLinesColor); - - FPreviewBox := TdxPSPaintPanel.Create(Self); - with TdxPSPaintPanel(FPreviewBox) do - begin - Parent := pnlPreview; - R := pnlPreview.BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - InflateRect(R, -1, -1); - BoundsRect := R; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := pbxPreviewPaint; - end; - FseExpandLevel := TdxPSSpinEdit.Create(Self); - with TdxPSSpinEdit(FseExpandLevel) do - begin - BoundsRect := bvlExpandLevelHolder.BoundsRect; - MinValue := -1; - MaxValue := 100; - Flat := False; - Parent := pnlBehaviors; - OnChange := ExpandLevelChange; - end; - lblExpandLevel.FocusControl := FseExpandLevel; -end; - -procedure TdxfmTVReportLinkDesignWindow.ExpandLevelChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.ExpandLevel := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -function TdxfmTVReportLinkDesignWindow.GetReportLink: TCustomdxNativeTreeViewReportLink; -begin - Result := inherited ReportLink as TCustomdxNativeTreeViewReportLink; -end; - -procedure TdxfmTVReportLinkDesignWindow.pbxPreviewPaint(Sender: TObject); -begin - with TdxPSPaintPanel(Sender) do - begin - FillRect(Canvas.Handle, ClientRect, GetSysColorBrush(COLOR_WINDOW)); - PaintPreview(Canvas, ClientRect); - end; -end; - -procedure TdxfmTVReportLinkDesignWindow.CMDialogChar(var Message: TCMDialogChar); -var - I: Integer; -begin - inherited; - with PageControl1 do - for I := 0 to PageCount - 1 do - if IsAccel(Message.CharCode, Pages[I].Caption) then - begin - Message.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TdxfmTVReportLinkDesignWindow.chbxShowClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TCheckBox(Sender) do - if Checked then - ReportLink.Options := ReportLink.Options + [TdxTreeViewPaintOption(TTagToInt(Tag))] - else - ReportLink.Options := ReportLink.Options - [TdxTreeViewPaintOption(TTagToInt(Tag))]; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTVReportLinkDesignWindow.chbxAutoWidthClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoWidth := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmTVReportLinkDesignWindow.chbxNodeAutoHeightClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.NodeAutoHeight := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmTVReportLinkDesignWindow.btnFontClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - - dxPSGlbl.FontDialog.Font := ReportLink.Font; - if dxPSGlbl.FontDialog.Execute then - begin - ReportLink.Font := dxPSGlbl.FontDialog.Font; - FontInfoToText(ReportLink.Font, edFont); - Modified := True; - UpdatePreview; - end; -end; - -procedure TdxfmTVReportLinkDesignWindow.chbxTransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Transparent := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTVReportLinkDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TdxfmTVReportLinkDesignWindow.chbxAutoNodesExpandClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoNodesExpand := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmTVReportLinkDesignWindow.lblExpandLevelClick(Sender: TObject); -begin - if TLabel(Sender).FocusControl <> nil then - ActiveControl := TLabel(Sender).FocusControl; -end; - -procedure TdxfmTVReportLinkDesignWindow.lblColorClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TCustomComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxfmTVReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreview.Parent := TPageControl(Sender).ActivePage; -end; - -initialization - dxPSRegisterReportLink(TdxTreeViewReportLink, TTreeView, TdxfmTVReportLinkDesignWindow); - {$IFDEF REGISTERSHELLCTRLS} - dxPSRegisterReportLink(TdxShellTreeViewReportLink, TShellTreeView, TdxfmTVReportLinkDesignWindow); - {$ENDIF} - -finalization - {$IFDEF REGISTERSHELLCTRLS} - dxPSUnregisterReportLink(TdxShellTreeViewReportLink, TShellTreeView, TdxfmTVReportLinkDesignWindow); - {$ENDIF} - dxPSUnregisterReportLink(TdxTreeViewReportLink, TTreeView, TdxfmTVReportLinkDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSTextLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSTextLnk.dfm deleted file mode 100644 index 9c2f3103..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSTextLnk.dfm +++ /dev/null @@ -1,524 +0,0 @@ -object dxfmTextReportLinkDesignWindow: TdxfmTextReportLinkDesignWindow - Left = 480 - Top = 279 - BorderStyle = bsDialog - Caption = 'dxfmTextReportLinkDesignWindow' - ClientHeight = 285 - ClientWidth = 580 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 7 - Width = 572 - Height = 243 - ActivePage = tshOptions - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - object tshOptions: TTabSheet - Caption = 'Options' - object lblLineSpacing: TLabel - Left = 9 - Top = 65 - Width = 63 - Height = 13 - Caption = '&Line Spacing:' - end - object lblAlignment: TLabel - Left = 9 - Top = 28 - Width = 51 - Height = 13 - Caption = '&Alignment:' - FocusControl = cbxAlignment - end - object bvlLineSpacingSite: TBevel - Left = 100 - Top = 60 - Width = 140 - Height = 21 - Visible = False - end - object Bevel2: TBevel - Left = 319 - Top = 8 - Width = 236 - Height = 4 - Shape = bsBottomLine - end - object lblPreview: TLabel - Left = 267 - Top = 3 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object Bevel1: TBevel - Left = 10 - Top = 99 - Width = 231 - Height = 4 - Shape = bsBottomLine - end - object pnlPreview: TPanel - Left = 267 - Top = 23 - Width = 290 - Height = 183 - Anchors = [akLeft, akTop, akRight, akBottom] - BevelOuter = bvLowered - Color = clWindow - TabOrder = 0 - object pbxPreview: TPaintBox - Left = 1 - Top = 1 - Width = 288 - Height = 181 - Align = alClient - OnPaint = pbxPreviewPaint - end - end - object btnFont: TButton - Left = 9 - Top = 123 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 2 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 9 - Top = 151 - Width = 231 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - object cbxAlignment: TComboBox - Left = 100 - Top = 23 - Width = 140 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 1 - OnClick = cbxAlignmentClick - OnDrawItem = cbxAlignmentDrawItem - end - end - end - object ilAlignments: TImageList - Left = 13 - Top = 254 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFF003FC00FF0030003FFFFFFFFFFFFFFFF0003000300030003 - FFFFFFFFFFFFFFFF003FC00FF0030003FFFFFFFFFFFFFFFF0003000300030003 - FFFFFFFFFFFFFFFF003FC00FF0030003FFFFFFFFFFFFFFFF0003000300030003 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSTextLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSTextLnk.pas deleted file mode 100644 index 6824fc0b..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSTextLnk.pas +++ /dev/null @@ -1,871 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSTextLnk; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, Graphics, Controls, StdCtrls, ExtCtrls, ComCtrls, dxPSCore, - dxPrnPg, cxDrawTextUtils, dxPSGlbl, dxExtCtrls, ImgList; - -type - TdxCustomTextReportLink = class; - TdxfmTextReportLinkDesignWindow = class; - - TdxMemoLineItem = class(TdxReportCellString) - public - function GetDTFormat: DWORD; override; - end; - - TdxTextReportLinkCustomDrawRowEvent = procedure(Sender: TdxCustomTextReportLink; - ACanvas: TCanvas; AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TdxTextReportLinkInitializeRowEvent = procedure(Sender: TdxCustomTextReportLink; - AnItem: TdxReportCellString) of object; - - TdxCustomTextReportLink = class(TBasedxReportLink) - private - FAlignment: TcxTextAlignX; - FDelimiters: TList; - FFontIndex: Integer; - FScreenDC: HDC; - FSupportedCustomDraw: Boolean; - FTextRowHeight: Integer; - FTextRowSpacing: Double; - FOnCustomDrawRow: TdxTextReportLinkCustomDrawRowEvent; - FOnInitializeRow: TdxTextReportLinkInitializeRowEvent; - function GetDelimiter(Index: Integer): Integer; - function GetDelimiterCount: Integer; - function GetDesignWindow: TdxfmTextReportLinkDesignWindow; - function GetTextBounds: TRect; - function IsTextRowSpacingStored: Boolean; - procedure SetAlignment(Value: TcxTextAlignX); - procedure SetOnCustomDrawRow(Value: TdxTextReportLinkCustomDrawRowEvent); - procedure SetSupportedCustomDraw(Value: Boolean); - procedure SetTextRowSpacing(Value: Double); - protected - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure ConvertCoords; override; - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - procedure InternalRestoreDefaults; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - procedure MakeDelimiters(AReportCells: TdxReportCells; AHorzDelimiters, AVertDelimiters: TList); override; - - procedure AddDelimiter(Value: Integer); overload; - procedure AddDelimiter(AItem: TdxReportVisualItem); overload; - - procedure AdjustHostBounds(AHost: TdxReportCell); - procedure CalculateTextRowHeight; virtual; - function CreateHost(AReportCells: TdxReportCells): TdxReportCell; virtual; - function CreateItem(AParent: TdxReportCell; const ATextRow: TcxTextRow): TdxReportCellString; virtual; - procedure CreateItems(AHost: TdxReportCell); - function GetTextRowBoundsWidth: Integer; virtual; - procedure InitializeHost(AHost: TdxReportCell); virtual; - procedure InitializeItem(AItem: TdxReportCellString; const AText: string); virtual; - - procedure DoConstructReport(AReportCells: TdxReportCells); virtual; - procedure PrepareConstruct(AReportCells: TdxReportCells); virtual; - procedure UnprepareConstruct(AReportCells: TdxReportCells); virtual; - - function GetText: string; virtual; - function GetTextFormat: DWORD; virtual; - function GetTextItemClass: TdxReportCellStringClass; virtual; - - procedure DoCustomDrawRow(ACanvas: TCanvas; AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoInitializeRow(AnItem: TdxReportCellString); dynamic; - - property DelimiterCount: Integer read GetDelimiterCount; - property DelimiterList: TList read FDelimiters; - property Delimiters[Index: Integer]: Integer read GetDelimiter; - property FontIndex: Integer read FFontIndex; - property ScreenDC: HDC read FScreenDC; - property TextBounds: TRect read GetTextBounds; - property TextFormat: DWORD read GetTextFormat; - property TextRowBoundsWidth: Integer read GetTextRowBoundsWidth; - property TextRowHeight: Integer read FTextRowHeight write FTextRowHeight; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - class function Aggregable: Boolean; override; - function DataProviderPresent: Boolean; override; - - property Alignment: TcxTextAlignX read FAlignment write SetAlignment default taLeft; - property Color; - property DesignWindow: TdxfmTextReportLinkDesignWindow read GetDesignWindow; - property Font; - property ScaleFonts; - property SupportedCustomDraw: Boolean read FSupportedCustomDraw write SetSupportedCustomDraw default False; - property Text: string read GetText; - property TextRowSpacing: Double read FTextRowSpacing write SetTextRowSpacing stored IsTextRowSpacingStored; - property Transparent; - property UseHorzDelimiters; - - property OnCustomDrawRow: TdxTextReportLinkCustomDrawRowEvent read FOnCustomDrawRow write SetOnCustomDrawRow; - property OnInitializeRow: TdxTextReportLinkInitializeRowEvent read FOnInitializeRow write FOnInitializeRow; - end; - - TdxCustomStringsReportLink = class(TdxCustomTextReportLink) - protected - function GetStrings: TStrings; virtual; abstract; - function GetText: string; override; - function GetTextFormat: DWORD; override; - public - property Strings: TStrings read GetStrings; - end; - - TdxTextReportLink = class(TdxCustomStringsReportLink) - private - FStrings: TStrings; - procedure StringsChanged(Sender: TObject); - protected - function GetStrings: TStrings; override; - procedure SetStrings(Value: TStrings); virtual; - procedure SetText(const Value: string); - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - property Text write SetText; - published - property Alignment; - property Color; - property Font; - property ScaleFonts; - property Strings write SetStrings; - property TextRowSpacing; - property SupportedCustomDraw; - property UseHorzDelimiters; - property Transparent; - - property OnCustomDrawRow; - property OnInitializeRow; - end; - - TdxCustomMemoReportLink = class(TdxCustomStringsReportLink) - protected - function GetTextRowBoundsWidth: Integer; override; - procedure InternalRestoreFromOriginal; override; - - function GetCustomMemo: TCustomMemo; virtual; - function GetStrings: TStrings; override; - property CustomMemo: TCustomMemo read GetCustomMemo; - published - property Alignment; - property Color; - property Font; - property ScaleFonts; - property SupportedCustomDraw; - property TextRowSpacing; - property UseHorzDelimiters; - property Transparent; - - property OnCustomDrawRow; - property OnInitializeRow; - end; - - TdxMemoReportLink = class(TdxCustomMemoReportLink) - private - function GetMemo: TMemo; - public - property Memo: TMemo read GetMemo; - end; - - TdxfmTextReportLinkDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshOptions: TTabSheet; - pnlPreview: TPanel; - pbxPreview: TPaintBox; - btnFont: TButton; - edFont: TEdit; - lblLineSpacing: TLabel; - lblAlignment: TLabel; - cbxAlignment: TComboBox; - bvlLineSpacingSite: TBevel; - Bevel2: TBevel; - lblPreview: TLabel; - Bevel1: TBevel; - ilAlignments: TImageList; - procedure cbxAlignmentClick(Sender: TObject); - procedure btnFontClick(Sender: TObject); - procedure pbxPreviewPaint(Sender: TObject); - procedure cbxAlignmentDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - private - seLineSpacing: TdxPSSpinEdit; - function GetReportLink: TdxCustomTextReportLink; - procedure LineSpacingChanged(Sender: TObject); - protected - procedure DoInitialize; override; - procedure LoadStrings; override; - procedure UpdatePreview; override; - - procedure CreateControls; - public - constructor Create(AOwner: TComponent); override; - property ReportLink: TdxCustomTextReportLink read GetReportLink; - end; - -implementation - -{$R *.dfm} - -uses - SysUtils, cxClasses, dxPSUtl, dxPSRes, dxCore, cxGraphics; - -type - TCustomMemoAccess = class(TCustomMemo); - - -{ TdxMemoLineItem } - -function TdxMemoLineItem.GetDTFormat: DWORD; -begin - if Renderer.ReportLink is TdxCustomTextReportLink then - Result := TdxCustomTextReportLink(Renderer.ReportLink).GetTextFormat - else - Result := inherited GetDTFormat and not CXTO_AUTOINDENTS; -end; - -{ TdxCustomTextReportLink } - -constructor TdxCustomTextReportLink.Create(AOwner: TComponent); -begin - inherited; - FDelimiters := TList.Create; - InternalRestoreDefaults; - LinkModified(False); -end; - -destructor TdxCustomTextReportLink.Destroy; -begin - FreeAndNil(FDelimiters); - inherited; -end; - -procedure TdxCustomTextReportLink.Assign(Source: TPersistent); -begin - if Source is TdxCustomTextReportLink then - with TdxCustomTextReportLink(Source) do - begin - Self.Alignment := Alignment; - Self.SupportedCustomDraw := SupportedCustomDraw; - Self.TextRowSpacing := TextRowSpacing; - end; - inherited; -end; - -class function TdxCustomTextReportLink.Aggregable: Boolean; -begin - Result := False; -end; - -function TdxCustomTextReportLink.DataProviderPresent: Boolean; -begin - if DataSource = rldsComponent then - Result := Text <> '' - else - Result := inherited DataProviderPresent; -end; - -procedure TdxCustomTextReportLink.ConstructReport(AReportCells: TdxReportCells); -begin - PrepareConstruct(AReportCells); - try - DoConstructReport(AReportCells); - finally - UnprepareConstruct(AReportCells) - end; -end; - -procedure TdxCustomTextReportLink.ConvertCoords; - - procedure ConvertDelimiters(ADelimiters: TList); - var - I, Value: Integer; - begin - for I := 0 to ADelimiters.Count - 1 do - begin - Value := Integer(ADelimiters[I]); - Value := MulDiv(Value, PixelsNumerator, PixelsDenominator); - ADelimiters[I] := Pointer(Value); - end; - end; - -begin - inherited; - ConvertDelimiters(DelimiterList); -end; - -procedure TdxCustomTextReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -begin - DoCustomDrawRow(ACanvas, TdxReportCellString(AItem), ADone); -end; - -function TdxCustomTextReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := AUpdateCodes * uaMarginsVert <> []; -end; - -procedure TdxCustomTextReportLink.InternalRestoreDefaults; -begin - inherited; - Alignment := taLeft; - TextRowSpacing := 1; - SupportedCustomDraw := False; -end; - -function TdxCustomTextReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -begin - Result := SupportedCustomDraw and (Item <> nil); -end; - -procedure TdxCustomTextReportLink.MakeDelimiters(AReportCells: TdxReportCells; - AHorzDelimiters, AVertDelimiters: TList); -begin - inherited; - dxPSUtl.dxCopyList(DelimiterList, AVertDelimiters); -end; - -procedure TdxCustomTextReportLink.AddDelimiter(Value: Integer); -begin - FDelimiters.Add(TObject(Value)); -end; - -procedure TdxCustomTextReportLink.AddDelimiter(AItem: TdxReportVisualItem); -begin - with AItem.AbsoluteRect do - begin - AddDelimiter(Top); - AddDelimiter(Bottom); - end; -end; - -procedure TdxCustomTextReportLink.AdjustHostBounds(AHost: TdxReportCell); -begin - with AHost do - if DataItemCount <> 0 then - begin - Left := 0; - Top := 0; - Width := DataItems[0].Width; - Height := DataItems[DataItemCount - 1].BoundsRect.Bottom; - end; -end; - -procedure TdxCustomTextReportLink.CalculateTextRowHeight; -begin - FTextRowHeight := Round(FTextRowSpacing * cxTextHeight(Font)); -end; - -function TdxCustomTextReportLink.CreateHost(AReportCells: TdxReportCells): TdxReportCell; -begin - Result := TdxReportCell.Create(AReportCells.Cells); - InitializeHost(Result); -end; - -function TdxCustomTextReportLink.CreateItem(AParent: TdxReportCell; - const ATextRow: TcxTextRow): TdxReportCellString; - - function ExtractString(ATextRow: TcxTextRow): string; - var - W: WideString; - begin - SetString(W, ATextRow.Text, ATextRow.TextLength); - Result := dxWideStringToString(W); - end; - - procedure PlaceItem(AItem: TdxReportCellString); - begin - with Result do - begin - Left := 0; - Top := Index * TextRowHeight; - Width := TextRowBoundsWidth; - Height := TextRowHeight; - end; - end; - -begin - Result := GetTextItemClass.Create(AParent); - PlaceItem(Result); - InitializeItem(Result, ExtractString(ATextRow)); - DoInitializeRow(Result); -end; - -procedure TdxCustomTextReportLink.CreateItems(AHost: TdxReportCell); -var - F: HFONT; - TextParams: TcxTextParams; - TextRows: TcxTextRows; - I, RowCount: Integer; - Item: TdxReportCellString; - PercentsDone: Double; -begin - F := SelectObject(ScreenDC, Font.Handle); - try - TextParams := cxDrawTextUtils.cxCalcTextParams(ScreenDC, TextFormat); - cxResetTextRows(TextRows); - cxMakeTextRows(ScreenDC, PChar(Text), Length(Text), TextBounds, TextParams, - TextRows, RowCount); - try - for I := 0 to cxGetTextRowCount(TextRows) - 1 do - begin - Item := CreateItem(AHost, cxGetTextRow(TextRows, I)^); - AddDelimiter(Item); - - PercentsDone := (I + 1) * 100 / cxGetTextRowCount(TextRows); - DoProgress(PercentsDone); - if AbortBuilding then Break; - end; - finally - cxResetTextRows(TextRows); - end; - finally - SelectObject(ScreenDC, F); - end; -end; - -function TdxCustomTextReportLink.GetTextRowBoundsWidth: Integer; -begin - with RealPrinterPage.PaintRectPixels do - Result := Right - Left - 1; -end; - -procedure TdxCustomTextReportLink.InitializeHost(AHost: TdxReportCell); -begin - AHost.CellSides := []; - AHost.Transparent := True; -end; - -procedure TdxCustomTextReportLink.InitializeItem(AItem: TdxReportCellString; - const AText: string); -begin - AItem.CellSides := []; - AItem.FontIndex := FontIndex; - AItem.Text := AText; - AItem.TextAlignX := Alignment; - AItem.Transparent := Transparent; -end; - -procedure TdxCustomTextReportLink.DoConstructReport(AReportCells: TdxReportCells); -var - Host: TdxReportCell; - R: TRect; -begin - Host := CreateHost(AReportCells); - CreateItems(Host); - if not AbortBuilding then - begin - AdjustHostBounds(Host); - - R := Host.BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - AReportCells.Cells.BoundsRect := R; - end; -end; - -procedure TdxCustomTextReportLink.PrepareConstruct(AReportCells: TdxReportCells); -begin - FScreenDC := GetDC(0); - FDelimiters.Clear; - FFontIndex := AddFontToPool(Font); - CalculateTextRowHeight; -end; - -procedure TdxCustomTextReportLink.UnprepareConstruct(AReportCells: TdxReportCells); -begin - ReleaseDC(0, FScreenDC); -end; - -function TdxCustomTextReportLink.GetText: string; -begin - Result := ''; -end; - -function TdxCustomTextReportLink.GetTextFormat: DWORD; -begin - Result := CXTO_WORDBREAK or CXTO_EXPANDTABS or cxDrawTextUtils.cxMakeFormat(Alignment, taTop); -end; - -function TdxCustomTextReportLink.GetTextItemClass: TdxReportCellStringClass; -begin - Result := TdxMemoLineItem; -end; - -procedure TdxCustomTextReportLink.DoCustomDrawRow(ACanvas: TCanvas; - AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawRow) then - FOnCustomDrawRow(Self, ACanvas, AnItem, ADone); -end; - -procedure TdxCustomTextReportLink.DoInitializeRow(AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeRow) then FOnInitializeRow(Self, AnItem); -end; - -function TdxCustomTextReportLink.GetDelimiter(Index: Integer): Integer; -begin - Result := Integer(FDelimiters[Index]); -end; - -function TdxCustomTextReportLink.GetDelimiterCount: Integer; -begin - Result := FDelimiters.Count; -end; - -function TdxCustomTextReportLink.GetDesignWindow: TdxfmTextReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TdxfmTextReportLinkDesignWindow; -end; - -function TdxCustomTextReportLink.GetTextBounds: TRect; -begin - Result := RealPrinterPage.PaintRectPixels; - Dec(Result.Right); - InflateRect(Result, -1, -1); - Result.Bottom := MaxInt; // no limit -end; - -function TdxCustomTextReportLink.IsTextRowSpacingStored: Boolean; -begin - Result := Abs(TextRowSpacing - 1) > 0.001; -end; - -procedure TdxCustomTextReportLink.SetAlignment(Value: TcxTextAlignX); -begin - if Value = taJustifyX then - Value := taDistributeX; - if FAlignment <> Value then - begin - FAlignment := Value; - LinkModified(True); - end; -end; - -procedure TdxCustomTextReportLink.SetOnCustomDrawRow(Value: TdxTextReportLinkCustomDrawRowEvent); -begin - if @FOnCustomDrawRow <> @Value then - begin - FOnCustomDrawRow := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxCustomTextReportLink.SetSupportedCustomDraw(Value: Boolean); -begin - if FSupportedCustomDraw <> Value then - begin - FSupportedCustomDraw := Value; - if Assigned(FOnCustomDrawRow) then LinkModified(True); - end; -end; - -procedure TdxCustomTextReportLink.SetTextRowSpacing(Value: Double); -begin - if Value < 1 then Value := 1; - if FTextRowSpacing <> Value then - begin - FTextRowSpacing := Value; - LinkModified(True); - end; -end; - -{ TdxCustomStringsReportLink } - -function TdxCustomStringsReportLink.GetText: string; -begin - if Strings <> nil then - Result := Strings.Text - else - Result := ''; -end; - -function TdxCustomStringsReportLink.GetTextFormat: DWORD; -begin - Result := inherited GetTextFormat or CXTO_CHARBREAK; -end; - -{ TdxTextReportLink } - -constructor TdxTextReportLink.Create(AOwner: TComponent); -begin - inherited; - FStrings := TStringList.Create; - TStringList(FStrings).OnChange := StringsChanged; -end; - -destructor TdxTextReportLink.Destroy; -begin - FreeAndNil(FStrings); - inherited; -end; - -procedure TdxTextReportLink.Assign(Source: TPersistent); -begin - if Source is TdxTextReportLink then - Text := TdxTextReportLink(Source).Text; - inherited; -end; - -function TdxTextReportLink.GetStrings: TStrings; -begin - Result := FStrings; -end; - -procedure TdxTextReportLink.SetStrings(Value: TStrings); -begin - Strings.Assign(Value); -end; - -procedure TdxTextReportLink.SetText(const Value: string); -begin - Strings.Text := Value; -end; - -procedure TdxTextReportLink.StringsChanged(Sender: TObject); -begin - LinkModified(True); -end; - -{ TdxCustomMemoReportLink } - -function TdxCustomMemoReportLink.GetTextRowBoundsWidth: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if IsAggregated and SysUtils.Supports(TObject(Controller), IdxReportLinkController, ControllerIntf) then - with ControllerIntf.GetControlSiteBounds(CustomMemo) do - Result := Right - Left - 1 - else - Result := inherited GetTextRowBoundsWidth; -end; - -procedure TdxCustomMemoReportLink.InternalRestoreFromOriginal; -begin - inherited; - Alignment := dxPSCore.dxTextAlignX[TCustomMemoAccess(CustomMemo).Alignment]; -end; - -function TdxCustomMemoReportLink.GetCustomMemo: TCustomMemo; -begin - Result := inherited Component as TCustomMemo; -end; - -function TdxCustomMemoReportLink.GetStrings: TStrings; -begin - if CustomMemo <> nil then - Result := CustomMemo.Lines - else - Result := nil; -end; - -{ TdxMemoReportLink } - -function TdxMemoReportLink.GetMemo: TMemo; -begin - Result := inherited Component as TMemo; -end; - -{ TdxfmTextReportLinkDesignWindow } - -constructor TdxfmTextReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxPSGlbl.dxhcTextReportLinkDesigner; - inherited; - CreateControls; -end; - -procedure TdxfmTextReportLinkDesignWindow.DoInitialize; -begin - inherited; - cbxAlignment.ItemIndex := cbxAlignment.Items.IndexOfObject(TObject(ReportLink.Alignment)); - seLineSpacing.Value := ReportLink.TextRowSpacing; - FontInfoToText(ReportLink.Font, edFont); -end; - -procedure TdxfmTextReportLinkDesignWindow.LoadStrings; -begin - inherited; - tshOptions.Caption := cxGetResourceString(@sdxOptions); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblAlignment.Caption := AddColon(cxGetResourceString(@sdxAlignment)); - lblLineSpacing.Caption := cxGetResourceString(@sdxLineSpacing); - with cbxAlignment do - begin - Items.BeginUpdate; - try - Items.AddObject(cxGetResourceString(@sdxTextAlignLeft), TObject(taLeft)); - Items.AddObject(cxGetResourceString(@sdxTextAlignCenter), TObject(taCenterX)); - Items.AddObject(cxGetResourceString(@sdxTextAlignRight), TObject(taRight)); - Items.AddObject(cxGetResourceString(@sdxTextAlignJustified), TObject(taDistributeX)); - finally - Items.EndUpdate; - end; - end; - btnFont.Caption := cxGetResourceString(@sdxBtnFont); -end; - -procedure TdxfmTextReportLinkDesignWindow.UpdatePreview; -begin - pbxPreview.Invalidate; -end; - -procedure TdxfmTextReportLinkDesignWindow.CreateControls; -begin - seLineSpacing := TdxPSSpinEdit.Create(Self); - with seLineSpacing do - begin - BoundsRect := bvlLineSpacingSite.BoundsRect; - Decimal := 1; - Increment := 0.1; - MaxValue := 10; - MinValue := 1; - Flat := False; - Parent := tshOptions; - ValueType := svtFloat; - TabOrder := cbxAlignment.TabOrder + 1; - OnChange := LineSpacingChanged; - end; -end; - -function TdxfmTextReportLinkDesignWindow.GetReportLink: TdxCustomTextReportLink; -begin - Result := inherited ReportLink as TdxCustomTextReportLink; -end; - -procedure TdxfmTextReportLinkDesignWindow.LineSpacingChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.TextRowSpacing := TdxPSSpinEdit(Sender).Value; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTextReportLinkDesignWindow.cbxAlignmentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - - with TComboBox(Sender) do - ReportLink.Alignment := TcxTextAlignX(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTextReportLinkDesignWindow.btnFontClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - - dxPSGlbl.FontDialog.Font := ReportLink.Font; - if dxPSGlbl.FontDialog.Execute then - begin - ReportLink.Font := dxPSGlbl.FontDialog.Font; - FontInfoToText(ReportLink.Font, edFont); - Modified := True; - UpdatePreview; - end; -end; - -procedure TdxfmTextReportLinkDesignWindow.pbxPreviewPaint(Sender: TObject); - - function GetText: string; - const - RowCount: Integer = 10; - var - Line: string; - I: Integer; - begin - Line := cxGetResourceString(@sdxSampleText); - Result := ''; - for I := 0 to RowCount - 1 do - Result := Result + Line + #13#10; - end; - -var - Format: DWORD; - R: TRect; -begin - Format := CXTO_PATTERNEDTEXT + CXTO_WORDBREAK + CXTO_CHARBREAK + cxMakeFormat(ReportLink.Alignment, taTop); - with TPaintBox(Sender) do - begin - Canvas.Font := ReportLink.Font; - Canvas.Font.Size := 8; - R := ClientRect; - cxTextOut(Canvas.Handle, GetText, R, Format, Canvas.Font, 0, 0, 0, clDefault, ReportLink.TextRowSpacing); - end; -end; - -procedure TdxfmTextReportLinkDesignWindow.cbxAlignmentDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -var - X, Y: Integer; -begin - with TComboBox(Control) do - begin - Canvas.FillRect(Rect); - with Rect do - begin - X := Left + 1; - Y := Top + 1; - end; - ilAlignments.Draw(Canvas, X, Y, Index); - - with Rect do - begin - X := Left + 1 + ilAlignments.Width + 1 + 2; - Y := Top + (Bottom - Top - Canvas.TextHeight('Wq')) div 2; - end; - Canvas.TextOut(X, Y, Items[Index]); - end; -end; - -initialization - dxPSRegisterReportLink(TdxTextReportLink, nil, TdxfmTextReportLinkDesignWindow); - dxPSRegisterReportLink(TdxMemoReportLink, TMemo, TdxfmTextReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxMemoReportLink, TMemo, TdxfmTextReportLinkDesignWindow); - dxPSUnregisterReportLink(TdxTextReportLink, nil, TdxfmTextReportLinkDesignWindow); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSUtl.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSUtl.pas deleted file mode 100644 index 0ada9763..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSUtl.pas +++ /dev/null @@ -1,2521 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSUtl; - -interface - -{$I cxVer.inc} - -uses - {$IFDEF DELPHI6} - Variants, - {$ENDIF} - Classes, Windows, SysUtils, Graphics, Messages, Controls, StdCtrls, ComCtrls, - Dialogs, CommCtrl, Forms, Menus, ImgList, TypInfo, Registry, - dxCore, cxClasses, cxControls, cxGraphics, dxPSGlbl, dxPrnDev; - -const - // Marlett Font - CheckMarkIndex = 98; - CheckTopLeftArcOuterIndex = 99; - CheckBottomRightArcOuterIndex = 100; - CheckTopLeftArcInnerIndex = 101; - CheckBottomRightArcInnerIndex = 102; - CheckInteriorIndex = 103; - - RadioBeanIndex = 105; - RadioTopLeftArcOuterIndex = 106; - RadioBottomRightArcOuterIndex = 107; - RadioTopLeftArcInnerIndex = 108; - RadioBottomRightArcInnerIndex = 109; - RadioInteriorIndex = 110; - - SortUpMarkIndex = 116; - SortDownMarkIndex = 117; - - // Symbol Font - PlusSignIndex = 43; - MinusSignIndex = 45; - - InvalidFileNameChars = '<>:"|/\'; - -function Min(A, B: Integer): Integer; -function Max(A, B: Integer): Integer; -function MinMax(A, B, C: Integer): Integer; -function SetLoWord(AValue: Integer; ALoWord: Word): Integer; -function SetHiWord(AValue: Integer; AHiWord: Word): Integer; -function SetLoHiWords(AValue: Integer; ALoWord, AHiWord: Word): Integer; -function ScalePoint(const Pt: TPoint; Numerator, Denominator: Integer): TPoint; -function ScaleRect(const R: TRect; ANumeratorW, ADenominatorW, ANumeratorH, ADenominatorH: Integer): TRect; overload; -function ScaleRect(const R: TRect; ANumerator, ADenominator: Integer): TRect; overload; -function ArePointsEqual(const Pt1, Pt2: TPoint): Boolean; - -// GDI -function GetRgnData(ARgn: HRGN; out ARgnDataHeader: TRgnDataHeader; out ARects: TRects): Integer; -function ExcludeClipRect(DC: HDC; const R: TRect): HRGN; overload; -function ExcludeClipRect(DC: HDC; ALeft, ATop, ARight, ABottom: Integer): HRGN; overload; -function IntersectClipRect(DC: HDC; const R: TRect; AlwaysClip: Boolean = False): HRGN; overload; -function IntersectClipRect(DC: HDC; ALeft, ATop, ARight, ABottom: Integer; AlwaysClip: Boolean = False): HRGN; overload; -function RectVisible(DC: HDC; const ARect: TRect): Boolean; -procedure RestoreClipRgn(DC: HDC; var ARgn: HRGN); - -function dxAreBitmapsEqual(ABitmap1, ABitmap2: TBitmap): Boolean; -function dxAreBrushesEqual(ABrush1, ABrush2: TBrush): Boolean; -function dxAreGraphicsEqual(AGraphic1, AGraphic2: TGraphic): Boolean; -function dxAreFontsEqual(AFont1, AFont2: TFont): Boolean; -function dxArePensEqual(APen1, APen2: TPen): Boolean; -function dxIsTrueTypeFont(AFont: TFont): Boolean; - -function FindNearestColor(AColor: TColor): TColor; -function InvertColor(AColor: TColor): TColor; -function OffsetColor(AColor: TColor; ARed, AGreen, ABlue: Byte): TColor; - -function IsDisplayDC(DC: HDC): Boolean; -function IsMetafileDC(DC: HDC): Boolean; -function IsPrinterDC(DC: HDC): Boolean; - -function PatternBrush: HBRUSH; -procedure SetFontAsNonAntialiased(AFont: TFont); -procedure ForcePictureToBitmap(APicture: TPicture); - -function CreateGraphic(AGraphicClass: TGraphicClass): TGraphic; -function IconToBitmap(AnIcon: TIcon): TBitmap; -function CreateArrowBitmap(AUpDownGlyph: TdxUpDownGlyph; AWidth: Integer = 16; - AHeight: Integer = 16; AFontSize: Integer = 12): TBitmap; -function CreateDoubleArrowBitmap(AUpDownGlyph: TdxUpDownGlyph; AWidth: Integer = 16; - AHeight: Integer = 16; AFontSize: Integer = 8): TBitmap; -function CreateGlyphBitmap(AGlyphIndex: Integer; AWidth: Integer = 16; - AHeight: Integer = 16; AFontSize: Integer = 12): TBitmap; -procedure DrawBlendedText(ACanvas: TCanvas; const R: TRect; const AText: string; AFont: TFont); -procedure DrawGlyph(DC: HDC; const R: TRect; AGlyph: Byte); -procedure DrawSizeGrip(DC: HDC; R: TRect); -procedure TransparentDraw(DrawDC: HDC; Brush: HBRUSH; const R: TRect; ABitmap: TBitmap); - -// System -function CopyDeviceMode(Src: HGLOBAL): HGLOBAL; -function GetDesktopWorkArea: TRect; overload; -function GetDesktopWorkArea(const P: TPoint): TRect; overload; -function GetLongFileName(const Source: string): string; -function GetMachineName: string; -function GetUserName: string; -function GetVolumeName(const APath: string): string; -function IsIntelliMousePresent: Boolean; -function IsNetworkPresent: Boolean; -function IsVolume(const APath: string): Boolean; -function IsWin32Version(AMajor: Integer; AMinor: Integer = 0): Boolean; -function PopulateShellImages(FullInit: Boolean): Boolean; -function ShellLargeImages: TImageList; -function ShellSmallImages: TImageList; -function ShowSystemSelectFolderDlg(var ADirPath: string): Boolean; -function FormatFileSize(const AFileSize: Int64): string; -function ValidateFileName(const FileName: string): Boolean; -procedure Delay(Value: DWORD); //milliseconds - -procedure MessageError(const AMessage: string); -procedure MessageWarning(const AMessage: string); -function MessageQuestion(const AMessage: string): Boolean; - -// string processing -function AddColon(const Source: string): string; -function AddEndEllipsis(const Source: string): string; -function DropAmpersand(const Source: string): string; -function DropColon(const Source: string): string; -function DropEndEllipsis(const Source: string): string; -function DropT(const Source: string): string; -function ReplaceSubStr(const Source, OldChars, NewChars: string): string; -function ReplicateChar(const S: string; ACount: Integer): string; - -function dxBoolToStr(AValue: Boolean): string; -function dxSameStr(const S1, S2: string): Boolean; -function dxSameText(const S1, S2: string): Boolean; - -function FormatFontInfo(AFont: TFont): string; -procedure FontInfoToText(AFont: TFont; AEdit: TEdit); - -function MakePageIndexes(const Source: string; out AnOutput: TIntegers): Boolean; - -// Number metrics conversation -function Chars2Int(const AText: string; AnUpperCase: Boolean): Integer; -function Int2Chars(AValue: Integer; AnUpperCase: Boolean): string; -function Roman2Int(AText: string; AnUpperCase: Boolean): Integer; -function Int2Roman(AValue: Integer; AnUpperCase: Boolean): string; - -//RTTI -function HasPropertyEx(AClass: TClass; const AName: string; ATypeKinds: TTypeKinds): Boolean; overload; -function HasPropertyEx(AnObject: TObject; const AName: string; ATypeKinds: TTypeKinds): Boolean; overload; -function HasProperty(AClass: TClass; const AName: string): Boolean; overload; -function HasProperty(AnObject: TObject; const AName: string): Boolean; overload; - -function GetProperty(AnObject: TObject; const AName: string): Variant; -procedure SetProperty(AnObject: TObject; const AName: string; const AValue: Variant); - -procedure dxDrawComboBoxItem(ACanvas: TCanvas; const R: TRect; const AText: string; - AnImageList: TCustomImageList; AnImageIndex: Integer; AState: TOwnerDrawState); -procedure dxLoadStringsFromRegistry(const APath: string; AStrings: TStrings); -procedure dxSaveStringsToRegistry(const APath: string; AStrings: TStrings); -procedure dxLoadListViewColumnsFromRegistry(AListView: TListView; const APath: string); -procedure dxSaveListViewColumnsToRegistry(AListView: TListView; const APath: string); -procedure dxRestoreListViewSelection(AListView: TListView; ASelection: TList); -procedure dxSaveListViewSelection(AListView: TListView; ASelection: TList); - -procedure CopyImages(ASourceHandle: HIMAGELIST; ADest: TCustomImageList); - -procedure PlaceButtons(const AButtons: array of TButton; ABtnOffsetX, ARightOrigin, ATopOrigin: Integer); - -procedure dxAppendList(ASource, ADest: TList); -procedure dxCopyList(ASource, ADest: TList); -procedure dxShiftIntegerListValues(AList: TList; AValue: Integer); - -function dxCheckStateImageIndexMap(AState: TCheckBoxState): Integer; -procedure dxCreateCheckMarkImages(AnImageList: TCustomImageList); - -function dxPSDrawModeImages: TCustomImageList; - -{$IFNDEF DELPHI5} -procedure FreeAndNil(var Obj); -{$ENDIF} - -// VCL Helpers - introduced mostly because of Delphi.Net - -function dxAllocatehWnd(AMethod: TWndMethod): HWND; -procedure dxDeallocatehWnd(AWnd: HWND); -procedure dxRecreateWnd(AControl: TWinControl); - -function MakeBounds(ALeft, ATop, AWidth, AHeight: Integer): TRect; -function MakePoint(X, Y: Integer): TPoint; -function MakeRect(ALeft, ATop, ARight, ABottom: Integer): TRect; overload; -function MakeRect(const ATopLeft, ABottomRight: TPoint): TRect; overload; - -function TTagToInt(AValue: Integer ): Integer; -function TTagToObj(AValue: Integer ): TObject; -function TTagToClass(AValue: Integer ): TClass; - -function MakeTTag(AValue: Integer): Integer ; overload; -function MakeTTag(AValue: TObject): Integer ; overload; -function MakeTTag(AValue: TClass): Integer ; overload; - -function Control_GetColor(AControl: TControl): TColor; -function Control_GetControlStyle(AControl: TControl): TControlStyle; -function Control_GetCtl3D(AControl: TWinControl): Boolean; -function Control_GetFont(AControl: TControl): TFont; -function Control_GetPopupMenu(AControl: TControl): TPopupMenu; -function Control_GetText(AControl: TControl): string; -procedure Control_SetParentBackground(AControl: TWinControl; Value: Boolean); - -procedure Control_DoContextPopup(AControl: TControl; const Pt: TPoint; var AHandled: Boolean); -procedure Control_PaintWindow(AControl: TWinControl; DC: HDC); -procedure Control_SendCancelMode(AControl, ASender: TControl); -procedure Control_UpdateBoundsRect(AControl: TControl; const R: TRect); overload; -procedure Control_UpdateBoundsRect(AControl: TControl; ALeft, ARight, AWidth, AHeight: Integer); overload; - -procedure PopupMenu_DoPopup(APopupMenu: TPopupMenu); - -function RichEdit_GetBorderStyle(AControl: TCustomRichEdit): TBorderStyle; -function RichEdit_GetLines(AControl: TCustomRichEdit): TStrings; - -procedure Bitmap_LoadFromResourceName(ABitmap: TBitmap; const AResName: string; ABaseName: string = 'dxPSImgs'); -procedure Icon_LoadFromResourceName(AIcon: TIcon; const AResName: string; ABaseName: string = 'dxPSImgs'); - -function IsDelphiObject(AData: DWORD): Boolean; - -implementation - -uses - {$IFDEF DELPHI6} - Types, - StrUtils, - {$ENDIF} - {$IFDEF USEJPEGIMAGE} - Jpeg, - {$ENDIF} - Consts, ActiveX, ShlObj, ShellAPI, FileCtrl, dxPSRes, dxPSImgs; - - -const - CharCount = 26; - Chars: array[Boolean] of string[CharCount] = (('abcdefghijklmnopqrstuvwxyz'), ('ABCDEFGHIJKLMNOPQRSTUVWXYZ')); - - ColumnPath = '\ColumnWidths'; // Don't Localize - ColumnPattern = 'Column%d'; // Don't Localize - -var - FDrawModeImages: TCustomImageList; - FPatternBrush: HBRUSH; - FShellLargeImages: TImageList; - FShellSmallImages: TImageList; - FNonTrueTypeFonts: TStringList; - FTrueTypeFonts: TStringList; - -type - - TControlAccess = class(TControl); - TCustomRichEditAccess = class(TCustomRichEdit); - TGraphicAccess = class(TGraphic); - {$IFNDEF DELPHI6} - TGraphicAccessClass = class of TGraphicAccess; - {$ENDIF} - {$IFDEF DELPHI5} - TPopupMenuAccess = class(TPopupMenu); - {$ENDIF} - TWinControlAccess = class(TWinControl); - - -function FontStyleNames(AFontStyle: TFontStyle): string; -begin - case AFontStyle of - fsBold: - Result := cxGetResourceString(@sdxFontStyleBold); - fsItalic: - Result := cxGetResourceString(@sdxFontStyleItalic); - fsUnderline: - Result := cxGetResourceString(@sdxFontStyleUnderline); - else - Result := cxGetResourceString(@sdxFontStyleStrikeOut); - end; -end; - -function NonTrueTypeFonts: TStringList; -begin - if FNonTrueTypeFonts = nil then - begin - FNonTrueTypeFonts := TStringList.Create; - FNonTrueTypeFonts.Sorted := True; - end; - Result := FNonTrueTypeFonts; -end; - -function TrueTypeFonts: TStringList; -begin - if FTrueTypeFonts = nil then - begin - FTrueTypeFonts := TStringList.Create; - FTrueTypeFonts.Sorted := True; - end; - Result := FTrueTypeFonts; -end; - -function Min(A, B: Integer): Integer; -begin - Result := A; - if A > B then Result := B; -end; - -function Max(A, B: Integer): Integer; -begin - Result := A; - if B > A then Result := B; -end; - -function MinMax(A, B, C: Integer): Integer; -begin - if B > C then - Result := A - else - if A < B then - Result := B - else - if A > C then - Result := C - else - Result := A; -end; - -function SetLoWord(AValue: Integer; ALoWord: Word): Integer; -begin - Result := (AValue and Integer($0000FFFF)) or (ALoWord shl 16); -end; - -function SetHiWord(AValue: Integer; AHiWord: Word): Integer; -begin - Result := (AValue and Integer($FFFF0000)) or (AHiWord and $FFFF); -end; - -function SetLoHiWords(AValue: Integer; ALoWord, AHiWord: Word): Integer; -begin - Result := SetHiWord(SetLoWord(AValue, ALoWord), AHiWord); -end; - -function ScaleRect(const R: TRect; ANumeratorW, ADenominatorW, ANumeratorH, - ADenominatorH: Integer): TRect; -begin - with Result do - begin - Left := MulDiv(R.Left, ANumeratorW, ADenominatorW); - Top := MulDiv(R.Top, ANumeratorH, ADenominatorH); - Right := MulDiv(R.Right, ANumeratorW, ADenominatorW); - Bottom := MulDiv(R.Bottom, ANumeratorH, ADenominatorH); - end; -end; - -function ScaleRect(const R: TRect; ANumerator, ADenominator: Integer): TRect; -begin - Result := ScaleRect(R, ANumerator, ADenominator, ANumerator, ADenominator); -end; - -function ScalePoint(const Pt: TPoint; Numerator, Denominator: Integer): TPoint; -begin - Result.X := MulDiv(Pt.X, Numerator, Denominator); - Result.Y := MulDiv(Pt.Y, Numerator, Denominator); -end; - -function ArePointsEqual(const Pt1, Pt2: TPoint): Boolean; -begin - Result := (Pt1.X = Pt2.X) and (Pt1.Y = Pt2.Y); -end; - -function GetRgnData(ARgn: HRGN; out ARgnDataHeader: TRgnDataHeader; - out ARects: TRects): Integer; -var - Size: Integer; - RgnData: PRgnData; - I: Integer; -begin - Size := GetRegionData(ARgn, 0, nil); - RgnData := AllocMem(SizeOf(TRgnDataHeader) + SizeOf(TRect) * (Size - SizeOf(TRgnDataHeader))); - try - GetRegionData(ARgn, Size, RgnData); - ARgnDataHeader := RgnData.rdh; - Result := RgnData.rdh.nCount; - SetLength(ARects, Result); - for I := 0 to Result - 1 do - Move(RgnData.Buffer[I * SizeOf(TRect)], ARects[I], SizeOf(TRect)); - finally - FreeMem(RgnData, Size); - end; -end; - -function ExcludeClipRect(DC: HDC; const R: TRect): HRGN; -begin - with R do - Result := ExcludeClipRect(DC, Left, Top, Right, Bottom); -end; - -function ExcludeClipRect(DC: HDC; ALeft, ATop, ARight, ABottom: Integer): HRGN; -begin - Result := Windows.CreateRectRgn(0, 0, 0, 0); - if Windows.GetClipRgn(DC, Result) <> 1 then - begin - Windows.DeleteObject(Result); - Result := 0; - end; - Windows.ExcludeClipRect(DC, ALeft, ATop, ARight, ABottom); -end; - -function IntersectClipRect(DC: HDC; const R: TRect; AlwaysClip: Boolean = False): HRGN; -begin - with R do - Result := IntersectClipRect(DC, Left, Top, Right, Bottom); -end; - -function IntersectClipRect(DC: HDC; ALeft, ATop, ARight, ABottom: Integer; AlwaysClip: Boolean = False): HRGN; -begin - Result := Windows.CreateRectRgn(0, 0, 0, 0); - if Windows.GetClipRgn(DC, Result) <> 1 then - begin - Windows.DeleteObject(Result); - Result := 0; - end - else - if IsMetaFileDC(DC) then - begin - Result := Windows.CreateRectRgn(0, 0, 320000, 320000); - if Windows.SelectClipRgn(DC, Result) = ERROR then - begin - DeleteObject(Result); - Result := 0; - Exit; - end; - end; - Windows.IntersectClipRect(DC, ALeft, ATop, ARight, ABottom); -end; - -function RectVisible(DC: HDC; const ARect: TRect): Boolean; -begin - if IsMetafileDC(DC) then - Result := True - else - Result := Windows.RectVisible(DC, ARect); -end; - -procedure RestoreClipRgn(DC: HDC; var ARgn: HRGN); -begin - Windows.SelectClipRgn(DC, ARgn); - if ARgn <> 0 then Windows.DeleteObject(ARgn); - ARgn := 0; -end; - -function dxBoolToStr(AValue: Boolean): string; -begin - {$IFDEF DELPHI6} - Result := SysUtils.BoolToStr(AValue, True); - {$ELSE} - if AValue then - Result := cxGetResourceString(@sdxTrue) - else - Result := cxGetResourceString(@sdxFalse); - {$ENDIF} -end; - -function dxSameStr(const S1, S2: string): Boolean; -begin - {$IFDEF DELPHI6} - Result := AnsiSameStr(S1, S2); - {$ELSE} - Result := AnsiCompareStr(S1, S2) = 0; - {$ENDIF} -end; - -function dxSameText(const S1, S2: string): Boolean; -begin - {$IFDEF DELPHI6} - Result := AnsiSameText(S1, S2); - {$ELSE} - Result := AnsiCompareText(S1, S2) = 0; - {$ENDIF} -end; - -function dxAreBitmapsEqual(ABitmap1, ABitmap2: TBitmap): Boolean; -begin - Result := dxAreGraphicsEqual(ABitmap1, ABitmap2); -end; - -function dxAreBrushesEqual(ABrush1, ABrush2: TBrush): Boolean; -begin - Result := ((ABrush1 = nil) and (ABrush2 = nil)) or - ((ABrush1 <> nil) and (ABrush2 <> nil) and - (ABrush1.Color = ABrush2.Color) and - (ABrush1.Style = ABrush2.Style)); -end; - -function dxAreFontsEqual(AFont1, AFont2: TFont): Boolean; -begin - Result := ((AFont1 = nil) and (AFont2 = nil)) or - ((AFont1 <> nil) and (AFont2 <> nil) and - (AFont1.Color = AFont2.Color) and - (AFont1.Name = AFont2.Name) and - (AFont1.Pitch = AFont2.Pitch) and - (AFont1.Style = AFont2.Style) and - (AFont1.Size = AFont2.Size)); // and -// (AFont1.Charset = AFont2.Charset)); -end; - -function dxAreGraphicsEqual(AGraphic1, AGraphic2: TGraphic): Boolean; -begin - Result := (AGraphic1 = AGraphic2) or ((AGraphic1 <> nil) and - TGraphicAccess(AGraphic1).Equals(AGraphic2)); -end; - -function dxArePensEqual(APen1, APen2: TPen): Boolean; -begin - Result := ((APen1 = nil) and (APen2 = nil)) or - ((APen1 <> nil) and (APen2 <> nil) and - (APen1.Color = APen2.Color) and - (APen1.Mode = APen2.Mode) and - (APen1.Style = APen2.Style) and - (APen1.Width = APen2.Width)); -end; - -function FormatFontInfo(AFont: TFont): string; -var - S: string; - FS: TFontStyle; -begin - Result := ''; - if AFont = nil then Exit; - - Result := Format('%d %s %s ', [AFont.Size, cxGetResourceString(@sdxPt), AFont.Name]); - if AFont.Style <> [] then - begin - Result := Result + ' ['; - S := ''; - for FS := Low(TFontStyle) to High(TFontStyle) do - if FS in AFont.Style then - begin - if S <> '' then - S := S + ', '; - S := S + FontStyleNames(FS); - end; - Result := Result + S + ']'; - end; -end; - -procedure FontInfoToText(AFont: TFont; AEdit: TEdit); -begin - AEdit.Text := FormatFontInfo(AFont); - if ColorToRGB(AFont.Color) <> ColorToRGB(AEdit.Color) then - AEdit.Font.Color := AFont.Color - else - AEdit.Font.Color := clWindowText; -end; - -type - PSearchBuffer = ^TSearchBuffer; - TSearchBuffer = record - FontName: string; - IsTrueType: Boolean; - end; - -function EnumFontsProc(var AnEnumLogFont: TEnumLogFont; var ATextMetric: TNewTextMetric; - AFontType: Integer; AData: LPARAM): Integer; stdcall; -begin - with AnEnumLogFont.elfLogFont do - begin - Result := Integer(not (StrIComp(PChar(PSearchBuffer(AData)^.FontName), PChar(@lfFaceName[0])) = 0)); - if Result = 0 then - PSearchBuffer(AData)^.IsTrueType := AFontType and TRUETYPE_FONTTYPE = TRUETYPE_FONTTYPE; - end; -end; - -function dxIsTrueTypeFont(AFont: TFont): Boolean; - - function CalculateIsTrueTypeFont(AFont: TFont): Boolean; - var - DC: HDC; - SearchBuffer: PSearchBuffer; - begin - DC := GetDC(0); - try - try - New(SearchBuffer); - try - SearchBuffer^.FontName := AFont.Name; - EnumFontFamilies(DC, nil, @EnumFontsProc, LPARAM(SearchBuffer)); - Result := SearchBuffer^.IsTrueType; - finally - Finalize(SearchBuffer^.FontName); - Dispose(PSearchBuffer(SearchBuffer)); - end; - except - Result := False; - end; - finally - ReleaseDC(0, DC); - end; - end; - -begin - Result := TrueTypeFonts.IndexOf(AFont.Name) <> -1; // found in TT Fonts - if not Result then - begin - Result := NonTrueTypeFonts.IndexOf(AFont.Name) = -1; // not found in non TT Fonts - if Result then - begin - Result := CalculateIsTrueTypeFont(AFont); - if Result then - TrueTypeFonts.Add(AFont.Name) - else - NonTrueTypeFonts.Add(AFont.Name); - end; - end; -end; - -function FindNearestColor(AColor: TColor): TColor; -var - DC: HDC; -begin - DC := GetDC(0); - Result := GetNearestColor(DC, AColor); - ReleaseDC(0, DC); -end; - -function InvertColor(AColor: TColor): TColor; -begin - Result := $FFFFFF xor ColorToRGB(AColor); -end; - -function OffsetColor(AColor: TColor; ARed, AGreen, ABlue: Byte): TColor; -var - Red, Green, Blue: Integer; -begin - AColor := ColorToRGB(AColor); - Red := GetRValue(AColor) + ARed; - if Red > High(Byte) then Red := High(Byte); - if Red < Low(Byte) then Red := Low(Byte); - - Green := GetGValue(AColor) + AGreen; - if Green > High(Byte) then Green := High(Byte); - if Green < Low(Byte) then Green := Low(Byte); - - Blue := GetBValue(AColor) + ABlue; - if Blue > High(Byte) then Blue := High(Byte); - if Blue < Low(Byte) then Blue := Low(Byte); - - Result := RGB(Red, Green, Blue); -end; - -function IsDisplayDC(DC: HDC): Boolean; -begin - Result := GetDeviceCaps(DC, TECHNOLOGY) = DT_RASDISPLAY; -end; - -function IsMetafileDC(DC: HDC): Boolean; -begin - Result := GetObjectType(DC) in [OBJ_METADC, OBJ_ENHMETADC]; -end; - -function IsPrinterDC(DC: HDC): Boolean; -begin - Result := GetDeviceCaps(DC, TECHNOLOGY) = DT_RASPRINTER; -end; - -function CreatePatternBrush: HBRUSH; -var - PatternBitmap: HBITMAP; - DC: HDC; - X, Y: Integer; -begin - PatternBitmap := CreateBitmap(8, 8, 1, 1, nil); - try - DC := CreateCompatibleDC(0); - PatternBitmap := SelectObject(DC, PatternBitmap); - for X := 0 to 7 do - for Y := 0 to 7 do - SetPixel(DC, X, Y, $FFFFFF * Byte(Odd(X) = Odd(Y))); - PatternBitmap := SelectObject(DC, PatternBitmap); - DeleteDC(DC); - - Result := Windows.CreatePatternBrush(PatternBitmap); - finally - DeleteObject(PatternBitmap); - end; -end; - -function PatternBrush: HBRUSH; -begin - if FPatternBrush = 0 then - FPatternBrush := CreatePatternBrush; - Result := FPatternBrush; -end; - -procedure SetFontAsNonAntialiased(AFont: TFont); -var - LogFont: TLogFont; -begin - cxGetFontData(AFont.Handle, LogFont); - LogFont.lfQuality := {LogFont.lfQuality and not} NONANTIALIASED_QUALITY; - AFont.Handle := CreateFontIndirect(LogFont); -end; - -procedure ForcePictureToBitmap(APicture: TPicture); -var - B: TBitmap; -begin - with APicture do - if (Graphic <> nil) and not Graphic.InheritsFrom(TBitmap) then - if not Graphic.InheritsFrom(TIcon) then - begin - B := TBitmap.Create; - try - B.Assign(Graphic); - Bitmap := B; - finally - B.Free; - end; - end - else - Bitmap := IconToBitmap(TIcon(Graphic)); -end; - -function CreateGraphic(AGraphicClass: TGraphicClass): TGraphic; -begin - {$IFDEF DELPHI6} - Result := AGraphicClass.Create; - {$ELSE} - Result := TGraphicAccessClass(AGraphicClass).Create; - {$ENDIF} -end; - -function IconToBitmap(AnIcon: TIcon): TBitmap; -//var -// IconInfo: TIconInfo; -begin - Result := TBitmap.Create; - with Result do - begin - Height := AnIcon.Height; - Width := AnIcon.Width; - //GetIconInfo(AnIcon.Handle, IconInfo); - //MaskHandle := IconInfo.hbmMask; - Transparent := True; - Canvas.Draw(0, 0, AnIcon); - end; -end; - -function CreateArrowBitmap(AUpDownGlyph: TdxUpDownGlyph; AWidth: Integer = 16; - AHeight: Integer = 16; AFontSize: Integer = 12): TBitmap; -const - GlyphIndexes: array[TdxUpDownGlyph] of Integer = (GLYPH_UPARROW, GLYPH_DOWNARROW); -begin - Result := CreateGlyphBitmap(GlyphIndexes[AUpDownGlyph], AWidth, AHeight, AFontSize); -end; - -function CreateDoubleArrowBitmap(AUpDownGlyph: TdxUpDownGlyph; AWidth: Integer = 16; - AHeight: Integer = 16; AFontSize: Integer = 8): TBitmap; -const - GlyphIndexes: array[TdxUpDownGlyph] of Integer = (GLYPH_UPARROW, GLYPH_DOWNARROW); - OffsetUp = 2; - OffsetDown = -1; -var - B1, B2: TBitmap; -begin - B1 := CreateGlyphBitmap(GlyphIndexes[AUpDownGlyph], AWidth, AHeight, AFontSize); - try - B1.Transparent := True; - B2 := CreateGlyphBitmap(GlyphIndexes[AUpDownGlyph], AWidth, AHeight, AFontSize); - try - B2.Transparent := True; - Result := TBitmap.Create; - with Result do - begin - Width := AWidth; - Height := AHeight; - Canvas.Brush.Color := clBtnFace; - Canvas.FillRect(Rect(0, 0, AWidth, AHeight)); - Canvas.Draw(0, OffsetUp, B1); - Canvas.Draw(0, OffsetDown, B2); - end; - finally - B2.Free; - end; - finally - B1.Free; - end; -end; - -function CreateGlyphBitmap(AGlyphIndex: Integer; AWidth: Integer = 16; - AHeight: Integer = 16; AFontSize: Integer = 12): TBitmap; -var - W, H, X, Y: Integer; - Ch: Char; -begin - W := AWidth; - H := AHeight; - if W = 0 then W := 16; - if H = 0 then H := 16; - - Result := TBitmap.Create; - with Result do - begin - Width := W; - Height := H; - - Canvas.Brush.Color := clBtnFace; - Canvas.FillRect(Rect(0, 0, Width, Height)); - - Canvas.Font.Name := 'Marlett'; - Canvas.Font.Size := AFontSize; - Canvas.Font.Color := clWindowText; - Canvas.Font.Charset := SYMBOL_CHARSET; - Ch := Chr(AGlyphIndex); - X := 0; - Y := 0; - if (AWidth <> 0) and (AHeight <> 0) then - begin - X := (Width - Canvas.TextWidth(Ch)) div 2; - Y := (Height - Canvas.TextHeight(Ch)) div 2; - end - else - begin - Width := Canvas.TextWidth(Ch); - Height := Canvas.TextHeight(Ch); - end; - - Canvas.TextOut(X, Y, Ch); - end; -end; - -procedure DrawBlendedText(ACanvas: TCanvas; const R: TRect; const AText: string; AFont: TFont); -var - MemDC: HDC; - MemBitmap: HBITMAP; - - procedure PrepareOffScreenStructures(DC: HDC; ASize: TSize); - begin - MemBitmap := CreateCompatibleBitmap(DC, ASize.cX, ASize.cY); - MemDC := CreateCompatibleDC(DC); - MemBitmap := SelectObject(MemDC, MemBitmap); - end; - - procedure CreateTextOutClipPath(const R: TRect; const AText: string; AFont: TFont); - var - F: HFONT; - C: TColor; - BkMode: Integer; - begin - FillRect(MemDC, R, GetStockObject(WHITE_BRUSH)); - - F := SelectObject(MemDC, AFont.Handle); - C := SetTextColor(MemDC, $FFFFFF); - BkMode := SetBkMode(MemDC, Windows.TRANSPARENT); - - BeginPath(MemDC); - TextOut(MemDC, 0, 0, PChar(AText), Length(AText)); - EndPath(MemDC); - - SetBkMode(MemDC, BkMode); - SetTextColor(MemDC, C); - SelectObject(MemDC, F); - - SelectClipPath(MemDC, RGN_COPY); - end; - - procedure PatternTextOutClipPath(const R: TRect; ATextColor: TColor); - var - BkColor: COLORREF; - begin - ATextColor := SetTextColor(MemDC, ATextColor); - BkColor := SetBkColor(MemDC, $FFFFFF); - FillRect(MemDC, R, PatternBrush); - SetTextColor(MemDC, ATextColor); - SetBkColor(MemDC, BkColor); - end; - - procedure UnprepareOffScreenStructures; - begin - MemBitmap := SelectObject(MemDC, MemBitmap); - DeleteDC(MemDC); - DeleteObject(MemBitmap); - end; - -var - DC: HDC; - Size: TSize; - MemRect: TRect; - F: HFONT; - X, Y: Integer; -begin - DC := ACanvas.Handle; - F := SelectObject(DC, AFont.Handle); - GetTextExtentPoint(DC, PChar(AText), Length(AText), Size); - - MemRect := MakeRect(0, 0, Size.cX, Size.cY); - - PrepareOffScreenStructures(DC, Size); - try - CreateTextOutClipPath(MemRect, AText, AFont); - PatternTextOutClipPath(MemRect, ColorToRGB(AFont.Color)); - SelectClipRgn(MemDC, 0); - - with R do - begin - X := Left + (Right - Left - Size.cX) div 2; - Y := Top + (Bottom - Top - Size.cY) div 2; - end; - BitBlt(DC, X, Y, Size.cX, Size.cY, MemDC, 0, 0, SRCAND); - finally - UnprepareOffScreenStructures; - end; - SelectObject(DC, F); -end; - -procedure DrawGlyph(DC: HDC; const R: TRect; AGlyph: Byte); -var - C: Char; -begin - C := Chr(AGlyph); - ExtTextOut(DC, R.Left, R.Top, 0, @R, @C, 1, nil); -end; - -procedure DrawSizeGrip(DC: HDC; R: TRect); -var - V: Integer; -begin - V := GetSystemMetrics(SM_CXVSCROLL); - R := MakeRect(R.Right - V, R.Bottom - V, R.Right, R.Bottom); - DrawFrameControl(DC, R, DFC_SCROLL, DFCS_SCROLLSIZEGRIP); -end; - -procedure TransparentDraw(DrawDC: HDC; Brush: HBRUSH; const R: TRect; - ABitmap: TBitmap); -const - ROP_DSPDxax = $00E20746; -var - BW, BH: Integer; - DC, MaskDC: HDC; - B, MaskHandle: HBITMAP; - ATextColor, ABackColor: COLORREF; - ABrush: HBRUSH; -begin - with R do - begin - BW := ABitmap.Width; - BH := ABitmap.Height; - - DC := CreateCompatibleDC(DrawDC); - B := SelectObject(DC, CreateCompatibleBitmap(DrawDC, BW, BH)); - try - BitBlt(DC, 0, 0, BW, BH, ABitmap.Canvas.Handle, 0, 0, SRCCOPY); - - MaskDC := CreateCompatibleDC(DrawDC); - MaskHandle := SelectObject(MaskDC, CreateBitmap(BW, BH, 1, 1, nil)); - try - ABackColor := SetBkColor(DC, ColorToRGB(ABitmap.TransparentColor){GetPixel(DC, 0, BH - 1)}); - BitBlt(MaskDC, 0, 0, BW, BH, DC, 0, 0, SRCCOPY); - SetBkColor(DC, ABackColor); - - ATextColor := SetTextColor(DC, 0); - ABackColor := SetBkColor(DC, $FFFFFF); - ABrush := SelectObject(DC, Brush); - BitBlt(DC, 0, 0, BW, BH, MaskDC, 0, 0, ROP_DSPDxax); - SelectObject(DC, ABrush); - SetTextColor(DC, ATextColor); - SetBkColor(DC, ABackColor); - finally - DeleteObject(SelectObject(MaskDC, MaskHandle)); - DeleteDC(MaskDC); - end; - - BitBlt(DrawDC, Left, Top, Right - Left, Bottom - Top, DC, 0, 0, SRCCOPY); - finally - DeleteObject(SelectObject(DC, B)); - DeleteDC(DC); - end; - end; -end; - -{.$WARN SYMBOL_DEPRECATED OFF} - -function CopyDeviceMode(Src: HGLOBAL): HGLOBAL; -var - Size: Integer; - SrcPtr, DestPtr: PChar; -begin - if Src <> 0 then - begin - Size := GlobalSize(Src); - Result := GlobalAlloc(GHND, Size); - if Result <> 0 then - begin - SrcPtr := GlobalLock(Src); - if SrcPtr <> nil then - try - DestPtr := GlobalLock(Result); - if DestPtr <> nil then - try - Move(SrcPtr^, DestPtr^, Size); - finally - GlobalUnlock(Result); - end; - finally - GlobalUnlock(Src); - end; - end; - end - else - Result := 0; -end; - -{.$WARN SYMBOL_DEPRECATED ON} - -function GetDesktopWorkArea: TRect; - - function IntersectionArea(const ABounds: TRect; APoint: TPoint; var Area: TRect): Integer; - var - R: TRect; - begin - Area := GetDesktopWorkArea(APoint); - if IntersectRect(R, ABounds, Area) then - Result := Abs(R.Right - R.Left) * Abs(R.Bottom - R.Top) - else - Result := 0; - end; - -var - R, R1: TRect; -begin - if Application.MainForm <> nil then - begin - Result := Application.MainForm.BoundsRect; - if IntersectionArea(Result, Result.TopLeft, R) > - IntersectionArea(Result, Result.BottomRight, R1) then - Result := R - else - Result := R1; - end - else - SystemParametersInfo(SPI_GETWORKAREA, 0, @Result, 0); -end; - -function GetDesktopWorkArea(const P: TPoint): TRect; -const - MONITOR_DEFAULTTONEAREST = $2; -type - HMONITOR = type Integer; - PMonitorInfo = ^TMonitorInfo; - TMonitorInfo = record - cbSize: DWORD; - rcMonitor: TRect; - rcWork: TRect; - dwFalgs: DWORD; - end; -var - AUser32DLL: THandle; - Info: TMonitorInfo; - GetMonitorInfo: function(hMonitor: HMONITOR; lpMonitorInfo: PMonitorInfo): Boolean; stdcall; - MonitorFromPoint: function(ptScreenCoords: TPoint; dwFlags: DWORD): HMONITOR; stdcall; -begin - AUser32DLL := LoadLibrary('USER32'); - if AUser32DLL > 32 then - begin - GetMonitorInfo := GetProcAddress(AUser32DLL, 'GetMonitorInfoA'); - MonitorFromPoint := GetProcAddress(AUser32DLL, 'MonitorFromPoint'); - end - else - begin - GetMonitorInfo := nil; - MonitorFromPoint := nil; - end; - - if @GetMonitorInfo = nil then - SystemParametersInfo(SPI_GETWORKAREA, 0, @Result, 0) - else - begin - Info.cbSize := SizeOf(Info); - GetMonitorInfo(MonitorFromPoint(P, MONITOR_DEFAULTTONEAREST), @Info); - Result := Info.rcWork; - end; - FreeLibrary(AUser32DLL); -end; - -function GetLongFileName(const Source: string): string; -var - Handle: THandle; - Proc: function(ShortPathName, LongPathName: PChar; cchBuffer: Integer): Integer; stdcall; - Buffer: array[0..MAX_PATH] of Char; -begin - Handle := GetModuleHandle(kernel32); - if Handle <> 0 then - begin - @Proc := GetProcAddress(Handle, 'GetLongPathNameA'); - if (@Proc <> nil) and (Proc(PChar(Source), Buffer, SizeOf(Buffer)) <> 0) then - Result := Buffer - else - Result := Source; - end - else - Result := Source; -end; - -function GetMachineName: string; -var - BufferSize: DWORD; - Buffer: array[0..MAX_COMPUTERNAME_LENGTH + 1] of Char ; -begin - BufferSize := MAX_COMPUTERNAME_LENGTH + 1; - GetComputerName(Buffer, BufferSize); - Result := Buffer; -end; - -function GetUserName: string; -var - BufferSize: DWORD; - Buffer: array[0..UNLEN + 1] of Char ; -begin - BufferSize := UNLEN + 1; - Windows.GetUserName(Buffer, BufferSize); - Result := Buffer; -end; - -function GetVolumeName(const APath: string): string; -var - PrevErrorMode: UINT; - Buffer: array[Byte] of Char; - L, Flags: DWORD; -begin - PrevErrorMode := Windows.SetErrorMode(SEM_FAILCRITICALERRORS); - try - if GetVolumeInformation(PChar(APath), @Buffer, SizeOf(Buffer), nil, L, Flags, nil, 0) then - Result := Buffer - else - Result := ''; - finally - Windows.SetErrorMode(PrevErrorMode); - end; -end; - -function IsIntelliMousePresent: Boolean; -begin - Result := Boolean(GetSystemMetrics(SM_MOUSEWHEELPRESENT)); -end; - -function IsNetworkPresent: Boolean; -begin - Result := GetSystemMetrics(SM_NETWORK) and $01 = $01; -end; - -function IsVolume(const APath: string): Boolean; -begin - Result := ExtractFileDir(APath) = APath; -end; - -function IsWin32Version(AMajor: Integer; AMinor: Integer = 0): Boolean; -begin - Result := (Win32MajorVersion > AMajor) or - ((Win32MajorVersion = AMajor) and (Win32MinorVersion >= AMinor)); -end; - -function PopulateShellImages(FullInit: Boolean): Boolean; -var - ShellDLLLoaded: Boolean; - ShellDLL: HMODULE; - Proc: function(FullInit: BOOL): BOOL; stdcall; -begin - Result := False; - if IsWinNT then - begin - ShellDLLLoaded := False; - ShellDLL := GetModuleHandle(ShellAPI.Shell32); - if ShellDLL = 0 then - begin - ShellDLL := LoadLibrary(ShellAPI.Shell32); - if ShellDLL <= Windows.HINSTANCE_ERROR then - ShellDLL := 0; - ShellDLLLoaded := ShellDLL <> 0; - end; - if ShellDLL <> 0 then - try - Proc := GetProcAddress(ShellDll, PChar(660)); - Result := (@Proc <> nil) and Proc(FullInit); - finally - if ShellDLLLoaded then FreeLibrary(ShellDll); - end; - end; -end; - -function ShellLargeImages: TImageList; -var - FileInfo: TSHFileInfo; -begin - if FShellLargeImages = nil then - begin - FShellLargeImages := TImageList.Create(nil); - FShellLargeImages.ShareImages := True; - try - FillChar(FileInfo, SizeOf(FileInfo), 0); - FShellLargeImages.Handle := SHGetFileInfo('', 0, FileInfo, SizeOf(FileInfo), SHGFI_SYSICONINDEX or SHGFI_LARGEICON); - finally - if FileInfo.hIcon <> 0 then Windows.DestroyIcon(FileInfo.hIcon); - end; - end; - Result := FShellLargeImages; -end; - -function ShellSmallImages: TImageList; -var - FileInfo: TSHFileInfo; -begin - if FShellSmallImages = nil then - begin - FShellSmallImages := TImageList.Create(nil); - FShellSmallImages.ShareImages := True; - try - FillChar(FileInfo, SizeOf(FileInfo), 0); - FShellSmallImages.Handle := SHGetFileInfo('', 0, FileInfo, SizeOf(FileInfo), SHGFI_SYSICONINDEX or SHGFI_SMALLICON); - finally - if FileInfo.hIcon <> 0 then Windows.DestroyIcon(FileInfo.hIcon); - end; - end; - Result := FShellSmallImages; -end; - -function BFFCallBack(Wnd: HWND; uMsg: UINT; lParam, lpData: LPARAM): Integer; stdcall; -var - Path: PChar absolute lParam; - B: Boolean; - Buffer: array[0..MAX_PATH] of Char; - S: string; -begin - Result := 0; - if uMsg = BFFM_INITIALIZED then - begin - B := not IsWin9X or (IsVolume(Path) and DirectoryExists(Path)); - if B then - SendMessage(Wnd, BFFM_SETSELECTION, WPARAM(True), lpData); - end; - - if uMsg = BFFM_SELCHANGED then - begin - B := SHGetPathFromIDList(PItemIDList(lParam), @Buffer); - if B then - begin - SetString(S, PChar(@Buffer), MAX_PATH); - B := DirectoryExists(S); - end; - SendMessage(Wnd, BFFM_ENABLEOK, 0, Ord(B)); - end; - - if (uMsg = BFFM_VALIDATEFAILEDA) or (uMsg = BFFM_VALIDATEFAILEDW) then - begin - S := Format(cxGetResourceString(@sdxInvalidRootDirectory), [Path]); - Result := Ord(MessageQuestion(S)); - if Result = 1 then - SendMessage(Wnd, BFFM_ENABLEOK, 0, 0); - end; -end; - -function ShowSystemSelectFolderDlg(var ADirPath: string): Boolean; -const - EditBoxFlags: array[Boolean] of UINT = (0, BIF_EDITBOX); - NewDialogStyleFlags: array[Boolean] of UINT = (0, BIF_NEWDIALOGSTYLE); - ValidateFlags: array[Boolean] of UINT = (0, BIF_VALIDATE); -var - ShellMalloc: IMalloc; - Buffer: PChar; - BrowseInfo: TBrowseInfo; - PrevErrorMode: Cardinal; - WindowList: Pointer ; - IDList: PItemIDList ; -begin - if (ShGetMalloc(ShellMalloc) = S_OK) and (ShellMalloc <> nil) then - begin - Buffer := ShellMalloc.Alloc(MAX_PATH); - try - FillChar(BrowseInfo, SizeOf(TBrowseInfo), 0); - BrowseInfo.hwndOwner := Application.Handle; - BrowseInfo.pszDisplayName := Buffer; - BrowseInfo.lpszTitle := PChar(cxGetResourceString(@sdxSelectNewRoot)); - - BrowseInfo.ulFlags := BIF_RETURNONLYFSDIRS or EditBoxFlags[IsComCtrlVersion471] or - NewDialogStyleFlags[IsComCtrlVersion500] or ValidateFlags[IsComCtrlVersion471]; - if IsVolume(ADirPath) then - ADirPath := ADirPath + '\'; - BrowseInfo.lpfn := BFFCallBack; - BrowseInfo.lParam := LPARAM(PChar(ADirPath)); - - WindowList := DisableTaskWindows(0); - try - PrevErrorMode := SetErrorMode(SEM_FAILCRITICALERRORS); - try - IDList := SHBrowseForFolder(BrowseInfo); - Result := IDList <> nil; - if Result then - begin - SHGetPathFromIDList(IDList, Buffer); - ShellMalloc.Free(IDList); - if StrLen(Buffer) > 0 then ADirPath := Buffer; - end; - finally - SetErrorMode(PrevErrorMode); - end; - finally - EnableTaskWindows(WindowList); - end; - finally - ShellMalloc.Free(Buffer); - end; - end - else - Result := False; -end; - -function FormatFileSize(const AFileSize: Int64): string; -const - FormatTemplate = '##0.#'; - KiloByte = 1024; - MegaByte = KiloByte * KiloByte; - GigaByte = KiloByte * MegaByte; -begin - if AFileSize > GigaByte then - Result := FormatFloat(FormatTemplate, AFileSize / GigaByte) + ' ' + cxGetResourceString(@sdxGigaBytes) - else - if AFileSize > MegaByte then - Result := FormatFloat(FormatTemplate, AFileSize / MegaByte) + ' ' + cxGetResourceString(@sdxMegaBytes) - else - if AFileSize > KiloByte then - Result := FormatFloat(FormatTemplate, AFileSize / KiloByte) + ' ' + cxGetResourceString(@sdxKiloBytes) - else - Result := FormatFloat(FormatTemplate, AFileSize) + ' ' + cxGetResourceString(@sdxBytes); -end; - -function ValidateFileName(const FileName: string): Boolean; - - function HasChars(const Str, Substr: string): Boolean; - var - I: Integer; - begin - Result := False; - for I := 1 to Length(Substr) do - if Pos(Substr[I], Str) > 0 then - begin - Result := True; - Break; - end; - end; - -begin - Result := (Trim(FileName) <> '') and not HasChars(FileName, '<>"[]|'); - if Result then - Result := Pos('\', ExtractFileName(FileName)) = 0; -end; - -procedure Delay(Value: DWORD); //milliseconds -var - T: DWORD; -begin - T := GetTickCount; - while GetTickCount - T < Value do ; -end; - -{ Strings management routines } - -function ReplaceSubStr(const Source, OldChars, NewChars: string): string; -var - L, P: Integer; -begin - Result := Source; - P := Pos(OldChars, Result); - if P > 0 then - begin - L := Length(OldChars); - while P > 0 do - begin - Delete(Result, P, L); - if NewChars <> #0 then - Insert(NewChars, Result, P); - P := Pos(OldChars, Result); - end; - end; -end; - -function ReplicateChar(const S: string; ACount: Integer): string; -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - {$IFDEF DELPHI6} - Result := DupeString(S, ACount); - {$ElSE} - Result := ''; - for I := 0 to ACount - 1 do - Result := Result + S; - {$ENDIF} -end; - -procedure SplitString(const ASource, ASeparator: string; AStrings: TStrings); -var - P, L: Integer; - Buffer: string; -begin - Buffer := ASource; - P := Pos(ASeparator, Buffer); - if P > 0 then - begin - L := Length(ASeparator); - while P > 0 do - begin - if P > 1 then - AStrings.Add(Copy(Buffer, 1, P + L - 2)); - Delete(Buffer, 1, P + L - 1); - P := Pos(ASeparator, Buffer); - end; - end; - if Length(Buffer) > 0 then AStrings.Add(Buffer); -end; - -function MakePageIndexes(const Source: string; out AnOutput: TIntegers): Boolean; - - function ProcessRange(const S: string; out AnArray: TIntegers): Boolean; - var - V1, V2, P, Code1, Code2, I: Integer; - SLeft, SRight: string; - begin - V1 := 0; - V2 := 0; - P := Pos(dxPSGlbl.cPageRangeSeparator, S); - Result := P <> 0; - if Result then - begin - SLeft := Copy(S, 1, P - 1); - SRight := Copy(S, P + 1, Length(S) - P); - Val(SLeft, V1, Code1); - Val(SRight, V2, Code2); - Result := (Code1 = 0) and (Code2 = 0) and (V2 >= V1); - end; - - if Result then - begin - SetLength(AnArray, V2 - V1 + 1); - for I := V1 to V2 do - AnArray[I - V1] := I; - end - else - SetLength(AnArray, 0); - end; - -var - Buffer: string; - Strings: TStrings; - S: string; - I, V, Code, L, J: Integer; - SubRange: TIntegers; -begin - SetLength(AnOutput, 0); - try - Buffer := StringReplace(Source, ' ', '', [rfReplaceAll, rfIgnoreCase]); - if Length(Buffer) > 0 then - begin - Strings := TStringList.Create; - try - SplitString(Buffer, dxPSGlbl.cPageSeparator, Strings); - for I := 0 to Strings.Count - 1 do - begin - S := Strings[I]; - Val(S, V, Code); - if (Code <> 0) or (V < 0) then - if ProcessRange(S, SubRange) then - begin - L := Length(AnOutput); - SetLength(AnOutput, L + Length(SubRange)); - for J := L to L + Length(SubRange) - 1 do - AnOutput[J] := SubRange[J - L]; - end - else - Abort - else - begin - SetLength(AnOutput, Length(AnOutput) + 1); - AnOutput[Length(AnOutput) - 1] := V; - end; - end; - finally - Strings.Free; - end; - end; - except - SetLength(AnOutput, 0); - end; - Result := Length(AnOutput) <> 0; -end; - -function Int2Roman(AValue: Integer; AnUpperCase: Boolean): string; -const - Max = 13; - RomanNumbers: array[1..Max] of Integer = - (1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000); - RomanStrings: array[Boolean, 1..Max] of string = - (('i', 'iv', 'v', 'ix', 'x', 'xl', 'l', 'xc', 'c', 'cd', 'd', 'cm', 'm'), - ('I', 'IV', 'V', 'IX', 'X', 'XL', 'L', 'XC', 'C', 'CD', 'D', 'CM', 'M')); -var - Index: Integer; -begin - Result := ''; - Index := Max; - while AValue > 0 do - begin - while AValue < RomanNumbers[Index] do - Dec(Index); - while AValue >= RomanNumbers[Index] do - begin - Dec(AValue, RomanNumbers[Index]); - Result := Result + RomanStrings[AnUpperCase, Index]; - end; - end; -end; - -function Roman2Int(AText: string; AnUpperCase: Boolean): Integer; -type - TdxNumberOrder = (noOnes, noTens, noHundreds); - TdxRomanNumber = 1..9; -const - RomanNumbers: array[TdxNumberOrder, TdxRomanNumber] of Integer = - (( 1, 2, 3, 4, 5, 6, 7, 8, 9), - ( 10, 20, 30, 40, 50, 60, 70, 80, 90), - (100, 200, 300, 400, 500, 600, 700, 800, 900)); - RomanThousand: array[Boolean] of string = ('m', 'M'); - RomanStrings: array[Boolean, TdxNumberOrder, TdxRomanNumber] of string = - ((('i', 'ii', 'iii', 'iv', 'v', 'vi', 'vii', 'viii', 'ix'), - ('x', 'xx', 'xxx', 'xl', 'l', 'lx', 'lxx', 'lxxx', 'lc'), - ('c', 'cc', 'ccc', 'cd', 'd', 'dc', 'dcc', 'dccc', 'dm')), - (('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'), - ('X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'), - ('C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM'))); -var - Number: TdxRomanNumber; - Order: TdxNumberOrder; -begin - Result := 0; - while (Length(AText) > 0) and (AText[1] = RomanThousand[AnUpperCase]) do - begin - Delete(AText, 1, 1); - Inc(Result, 1000); - end; - if AText <> '' then - for Order := noHundreds downto noOnes do - begin - Number := High(TdxRomanNumber); - while (Number > 0) and (Pos(RomanStrings[AnUpperCase, Order, Number], AText) <> 1) do - Dec(Number); - if Number > 0 then - begin - Inc(Result, RomanNumbers[Order, Number]); - Delete(AText, 1, Length(RomanStrings[AnUpperCase, Order, Number])); - if AText = '' then Exit; - end; - end; - if AText <> '' then Result := -1; -end; - -function Chars2Int(const AText: string; AnUpperCase: Boolean): Integer; -begin - Result := CharCount * (Length(AText) - 1) + Pos(AText[1], dxShortStringToString(Chars[AnUpperCase])); -end; - -function Int2Chars(AValue: Integer; AnUpperCase: Boolean): string; -var - I, C: Integer; -begin - I := AValue mod CharCount; - if I = 0 then I := CharCount; - C := AValue div CharCount; - if I <> 0 then Inc(C); - Result := ReplicateChar(dxShortStringToString(Chars[AnUpperCase][I]), C); -end; - -function AddColon(const Source: string): string; -begin - Result := Source; - if Pos(':', Result) <> (Length(Result) - Length(':') + 1) then - Result := Result + ':'; -end; - -function AddEndEllipsis(const Source: string): string; -begin - Result := Source; - if Pos('...', Result) <> (Length(Result) - Length('...') + 1) then - Result := Result + '...'; -end; - -function DropAmpersand(const Source: string): string; -var - I: Integer; -begin - Result := ''; - for I := 1 to Length(Source) do - if Source[I] <> '&' then - Result := Result + Source[I]; -end; - -function DropColon(const Source: string): string; -begin - Result := Source; - if Result[Length(Result)] = ':' then - Delete(Result, Length(Result), 1); -end; - -function DropEndEllipsis(const Source: string): string; -begin - Result := Source; - while (Length(Result) > 0) and (Result[Length(Result)] = '.') do - Delete(Result, Length(Result), 1); -end; - -procedure MessageError(const AMessage: string); -begin - MessageBeep(MB_ICONEXCLAMATION); - Application.MessageBox(PChar(AMessage), PChar(Application.Title), MB_OK or MB_ICONERROR); -end; - -procedure MessageWarning(const AMessage: string); -begin - MessageBeep(MB_ICONEXCLAMATION); - Application.MessageBox(PChar(AMessage), PChar(Application.Title), MB_OK or MB_ICONEXCLAMATION); -end; - -function MessageQuestion(const AMessage: string): Boolean; -begin - MessageBeep(MB_ICONQUESTION); - Result := (ID_YES = Application.MessageBox(PChar(AMessage), PChar(Application.Title), - MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON1)); -end; - -function DropT(const Source: string): string; -begin - Result := Source; - if Result[1] = 'T' then Delete(Result, 1, 1); -end; - -function HasPropertyEx(AClass: TClass; const AName: string; ATypeKinds: TTypeKinds): Boolean; -var - PropList: PPropList; - PropCount: Integer; - I: Integer; -begin - PropCount := GetPropList(AClass.ClassInfo, ATypeKinds, nil); - if PropCount > 0 then - begin - PropList := AllocMem(PropCount * SizeOf(PPropInfo)); - try - PropCount := GetPropList(AClass.ClassInfo, ATypeKinds, PropList); - I := 0; - while (I < PropCount) and (CompareText(dxShortStringToString(PropList^[I].Name), AName) <> 0) do - Inc(I); - Result := I < PropCount; - finally - FreeMem(PropList, PropCount * SizeOf(PPropInfo)); - end; - end - else - Result := False; -end; - -function HasPropertyEx(AnObject: TObject; const AName: string; ATypeKinds: TTypeKinds): Boolean; -begin - Result := HasPropertyEx(AnObject.ClassType, AName, ATypeKinds); -end; - -function HasProperty(AClass: TClass; const AName: string): Boolean; -begin - Result := HasPropertyEx(AClass, AName, tkAny); -end; - -function HasProperty(AnObject: TObject; const AName: string): Boolean; -begin - Result := HasPropertyEx(AnObject, AName, tkAny); -end; - -function GetProperty(AnObject: TObject; const AName: string): Variant; -{$IFNDEF DELPHI5} -var - PropInfo: PPropInfo; - TypeData: PTypeData; -{$ENDIF} -begin - Result := Null; - {$IFNDEF DELPHI5} - PropInfo := TypInfo.GetPropInfo(AnObject.ClassInfo, AName); - if PropInfo <> nil then - begin - TypeData := TypInfo.GetTypeData(PropInfo^.PropType^); - case PropInfo^.PropType^^.Kind of - tkInteger, - tkChar, - tkWChar, - tkClass: - Result := TypInfo.GetOrdProp(AnObject, PropInfo); - tkEnumeration: - if TypeData^.BaseType^ = TypeInfo(Boolean) then - Result := Boolean(GetOrdProp(AnObject, PropInfo)) - else - Result := TypInfo.GetOrdProp(AnObject, PropInfo); - tkSet: - Result := TypInfo.GetOrdProp(AnObject, PropInfo); - tkFloat: - Result := TypInfo.GetFloatProp(AnObject, PropInfo); - tkMethod: - Result := PropInfo^.PropType^.Name; - tkString, tkLString, tkWString: - Result := TypInfo.GetStrProp(AnObject, PropInfo); - tkVariant: - Result := TypInfo.GetVariantProp(AnObject, PropInfo); - tkInt64: - Result := TypInfo.GetInt64Prop(AnObject, PropInfo) + 0.0; - end; - end; - {$ELSE} - if HasProperty(AnObject, AName) then - Result := TypInfo.GetPropValue(AnObject, AName , False); - {$ENDIF} -end; - -procedure SetProperty(AnObject: TObject; const AName: string; const AValue: Variant); - -{$IFNDEF DELPHI5} - - function RangedValue(const AMin, AMax: Int64): Int64; - begin - Result := Trunc(AValue); - if Result < AMin then - Result := AMin; - if Result > AMax then - Result := AMax; - end; - - procedure SetEnumProp(AnObject: TObject; APropInfo: PPropInfo; const AValue: string); - var - Data: Longint; - begin - Data := TypInfo.GetEnumValue(APropInfo^.PropType^, AValue); - if Data >= 0 then - TypInfo.SetOrdProp(AnObject, APropInfo, Data); - end; - -var - PropInfo: PPropInfo; - TypeData: PTypeData; -{$ENDIF} -begin - {$IFNDEF DELPHI5} - PropInfo := TypInfo.GetPropInfo(AnObject.ClassInfo, AName); - if PropInfo <> nil then - begin - TypeData := TypInfo.GetTypeData(PropInfo^.PropType^); - case PropInfo.PropType^^.Kind of - tkInteger, - tkChar, - tkWChar: - TypInfo.SetOrdProp(AnObject, PropInfo, RangedValue(TypeData^.MinValue, TypeData^.MaxValue)); - tkEnumeration: - if VarIsStr(AValue) then - SetEnumProp(AnObject, PropInfo, VarToStr(AValue)) - else - TypInfo.SetOrdProp(AnObject, PropInfo, RangedValue(TypeData^.MinValue, TypeData^.MaxValue)); - tkSet: - if VarType(AValue) = varInteger then - TypInfo.SetOrdProp(AnObject, PropInfo, AValue); - tkFloat: - TypInfo.SetFloatProp(AnObject, PropInfo, AValue); - tkString, - tkLString, - tkWString: - TypInfo.SetStrProp(AnObject, PropInfo, VarToStr(AValue)); - tkVariant: - TypInfo.SetVariantProp(AnObject, PropInfo, AValue); - tkInt64: - TypInfo.SetInt64Prop(AnObject, PropInfo, RangedValue(TypeData^.MinInt64Value, TypeData^.MaxInt64Value)); - end; - end; - {$ELSE} - if HasProperty(AnObject, AName) then - TypInfo.SetPropValue(AnObject, AName, AValue); - {$ENDIF} -end; - -procedure dxDrawComboBoxItem(ACanvas: TCanvas; const R: TRect; const AText: string; - AnImageList: TCustomImageList; AnImageIndex: Integer; AState: TOwnerDrawState); - - function IsImageDrawn: Boolean; - begin - Result := (AnImageList <> nil) and (AnImageIndex > -1) and (AnImageIndex < AnImageList.Count); - end; - -var - X, Y: Integer; -begin - ACanvas.FillRect(R); - if IsImageDrawn then - begin - with R do - begin - X := Left + 1; - Y := Top + (Bottom - Top - AnImageList.Height) div 2; - end; - AnImageList.Draw(ACanvas, X, Y, AnImageIndex); - end; - - with R do - begin - X := Left + 1 + Ord(IsImageDrawn) * (AnImageList.Width + 2); - Y := Top + (Bottom - Top - ACanvas.TextHeight(AText)) div 2; - end; - ACanvas.TextOut(X, Y, AText); -end; - -procedure dxLoadStringsFromRegistry(const APath: string; AStrings: TStrings); -var - Entries: TStringList; - I: Integer; -begin - with TRegistry.Create do - try - try - if OpenKey(APath, False) then - begin - AStrings.Clear; - Entries := TStringList.Create; - try - GetValueNames(Entries); - for I := 0 to Entries.Count - 1 do - if ValueExists(Entries[I]) then - AStrings.Add(ReadString(Entries[I])); - finally - Entries.Free; - end; - end; - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Free; - end; -end; - -procedure dxSaveStringsToRegistry(const APath: string; AStrings: TStrings); -var - I: Integer; -begin - with TRegistry.Create do - try - try - if KeyExists(APath) then - DeleteKey(APath); - if OpenKey(APath, True) then - for I := 0 to AStrings.Count - 1 do - WriteString(IntToStr(I), AStrings[I]); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Free; - end; -end; - -procedure dxLoadListViewColumnsFromRegistry(AListView: TListView; const APath: string); -var - I: Integer; - S: string; -begin - with TRegistry.Create do - try - try - if OpenKey(APath + '\' + AListView.Name + ColumnPath, False) then - begin - AListView.Columns.BeginUpdate; - try - for I := 0 to AListView.Columns.Count - 1 do - begin - S := Format(ColumnPattern, [I]); - if ValueExists(S) then - AListView.Columns[I].Width := ReadInteger(S); - end; - finally - AListView.Columns.EndUpdate; - end; - end; - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Free; - end; -end; - -procedure dxSaveListViewColumnsToRegistry(AListView: TListView; const APath: string); -var - I: Integer; - S: string; -begin - with TRegistry.Create do - try - try - S := APath + '\' + AListView.Name + ColumnPath; - if KeyExists(S) then - DeleteKey(S); - if OpenKey(S, True) then - for I := 0 to AListView.Columns.Count - 1 do - WriteInteger(Format(ColumnPattern, [I]), AListView.Columns[I].Width); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Free; - end; -end; - -procedure dxSaveListViewSelection(AListView: TListView; ASelection: TList); -var - I: Integer; - Item: TListItem; -begin - for I := 0 to AListView.Items.Count - 1 do - begin - Item := AListView.Items[I]; - if Item.Selected then ASelection.Add(Item.Data); - end; -end; - -procedure dxRestoreListViewSelection(AListView: TListView; ASelection: TList); -var - I: Integer; - Item: TListItem; -begin - for I := 0 to ASelection.Count - 1 do - begin - Item := AListView.FindData(0, ASelection[I], True, True); - if Item <> nil then - begin - Item.Selected := True; - if I = 0 then - Item.MakeVisible(True); - end; - end; -end; - -procedure CopyImages(ASourceHandle: HIMAGELIST; ADest: TCustomImageList); -var - ImageCount, ImageWidth, ImageHeight, I: Integer; - Image, Mask: TBitmap; - R: TRect; -begin - ADest.Clear; - ImageCount := ImageList_GetImageCount(ASourceHandle); - if ImageCount = 0 then Exit; - - ImageList_GetIconSize(ASourceHandle, ImageWidth, ImageHeight); - ADest.Width := ImageWidth; - ADest.Height := ImageHeight; - - // we need to copy all color depth and alpha channel information - ADest.Handle := ImageList_Duplicate(ASourceHandle); - ADest.Clear; - {???} - R := MakeRect(0, 0, ImageWidth, ImageHeight); - Image := TBitmap.Create; - try - Image.Height := ImageHeight; - Image.Width := ImageWidth; - Mask := TBitmap.Create; - try - Mask.Monochrome := True; - Mask.Height := ImageHeight; - Mask.Width := ImageWidth; - - for I := 0 to ImageCount - 1 do - begin - with Image.Canvas do - begin - FillRect(R); - ImageList_Draw(ASourceHandle, I, Handle, 0, 0, ILD_NORMAL); - end; - with Mask.Canvas do - begin - FillRect(R); - ImageList_Draw(ASourceHandle, I, Handle, 0, 0, ILD_MASK); - end; - ADest.Add(Image, Mask); - end; - finally - Mask.Free; - end; - finally - Image.Free; - end; -end; - -procedure PlaceButtons(const AButtons: array of TButton; ABtnOffsetX, ARightOrigin, ATopOrigin: Integer); -var - DWP: HDWP; - - procedure PlaceButton(AButton: TButton; AOriginX, AOriginY: Integer); - begin - DWP := DeferWindowPos(DWP, AButton.Handle, 0, AOriginX, AOriginY, 0, 0, - SWP_NOACTIVATE or SWP_NOOWNERZORDER or SWP_NOSIZE or SWP_NOZORDER); - Control_UpdateBoundsRect(AButton, AOriginX, AOriginY, AButton.Width, AButton.Height); - end; - - procedure ShiftButtons(Index, Shift: Integer); - var - OriginX, OriginY, I: Integer; - begin - OriginY := ATopOrigin; - for I := High(AButtons) downto Index + 1 do - begin - OriginX := AButtons[I - Shift].Left; - PlaceButton(AButtons[I], OriginX, OriginY); - end; - end; - - procedure OriginalPlaceButtons; - var - OriginX, OriginY, I: Integer; - begin - OriginX := ARightOrigin; - OriginY := ATopOrigin; - for I := Low(AButtons) to High(AButtons) do - begin - Dec(OriginX, AButtons[I].Width); - if I > 0 then Dec(OriginX, ABtnOffsetX); - PlaceButton(AButtons[I], OriginX, OriginY); - end; - end; - - procedure ReplaceButtons; - var - Found: Boolean; - I, Count, StartIndex: Integer; - begin - StartIndex := 0; - Count := 1; - repeat - Found := False; - for I := StartIndex to High(AButtons) do - if not AButtons[I].Visible then - begin - Found := True; - Count := 1; - while not AButtons[I + Count].Visible do - Inc(Count); - end; - if Found then - begin - ShiftButtons(StartIndex, Count); - Inc(StartIndex, Count); - end; - until not Found; - end; - - procedure InvalidateButtons; - var - I: Integer; - begin - for I := Low(AButtons) to High(AButtons) do - AButtons[I].Invalidate; - end; - -begin - DWP := BeginDeferWindowPos(High(AButtons) - Low(AButtons)+ 1); - try - OriginalPlaceButtons; - ReplaceButtons; - finally - EndDeferWindowPos(DWP); - InvalidateButtons; - end; -end; - -procedure dxAppendList(ASource, ADest: TList); -var - PrevCount: Integer; - DestMem: PPointerList; -begin - PrevCount := ADest.Count; - ADest.Count := ADest.Count + ASource.Count; - ADest.Count := ADest.Count + ASource.Count; - if ADest.Count <> 0 then - begin - DestMem := Pointer(Integer(ADest.List) + SizeOf(Pointer) * PrevCount); - Move(ASource.List^, DestMem^, SizeOf(Pointer) * ASource.Count); - end; -end; - -procedure dxCopyList(ASource, ADest: TList); -begin - ADest.Count := ASource.Count; - Move(ASource.List^, ADest.List^, SizeOf(Pointer) * ADest.Count); -end; - -procedure dxShiftIntegerListValues(AList: TList; AValue: Integer); -var - I: Integer; -begin - with AList do - for I := 0 to Count - 1 do - List^[I] := Pointer(Integer(List^[I]) + AValue); -end; - -function dxCheckStateImageIndexMap(AState: TCheckBoxState): Integer; -const - CheckBoxStateMap: array[TCheckBoxState] of Integer = (0, 1, 2); -begin - Result := 1 + CheckBoxStateMap[AState]; -end; - -procedure dxCreateCheckMarkImages(AnImageList: TCustomImageList); -const - MaskColor: TColor = clFuchsia; - - procedure DrawCheckBox(ACanvas: TCanvas; const R: TRect; State: TCheckBoxState); - const - InteriorColors: array[Boolean] of TColor = (clWindow, clBtnFace); - var - C: TColor; - begin - with ACanvas do - begin - C := Font.Color; - - //frame - Font.Color := clBtnShadow; - DrawGlyph(Handle, R, CheckBottomRightArcInnerIndex); - DrawGlyph(Handle, R, CheckTopLeftArcInnerIndex); - - //interior - Font.Color := InteriorColors[State = cbGrayed]; - DrawGlyph(Handle, R, CheckInteriorIndex); - - //checkmark - if State in [cbChecked, cbGrayed] then - begin - Font.Color := clWindowText; - DrawGlyph(Handle, R, CheckMarkIndex); - end; - - Font.Color := C; - end; - end; - -var - Bitmap: TBitmap; - State: TCheckBoxState; - R, CheckRect: TRect; - Ch: Char; - Size: TSize; -begin - Bitmap := TBitmap.Create; - with Bitmap do - try - Width := AnImageList.Width; - Height := AnImageList.Height; - - Canvas.Font.Name := 'Marlett'; - Canvas.Font.Size := 10; - Canvas.Font.Charset := SYMBOL_CHARSET; - - R := MakeRect(0, 0, Width, Height); - Canvas.Brush.Color := MaskColor; - Canvas.FillRect(R); - AnImageList.AddMasked(Bitmap, clDefault); - - CheckRect := R; - Ch := Chr(CheckBottomRightArcInnerIndex); - Size := Canvas.TextExtent(Ch); - InflateRect(CheckRect, -(R.Right - R.Left - Size.cX) div 2, -(R.Bottom - R.Top - Size.cY) div 2); - - for State := Low(TCheckBoxState) to High(TCheckBoxState) do - begin - Canvas.Brush.Style := bsSolid; - Canvas.FillRect(R); - Canvas.Brush.Style := bsClear; - DrawCheckBox(Canvas, CheckRect, State); - - AnImageList.AddMasked(Bitmap, clDefault); - end; - finally - Bitmap.Free; - end; -end; - -function dxPSDrawModeImages: TCustomImageList; - - procedure LoadImages; - - procedure LoadImage(B: TBitmap; const AResName: string); - begin - Bitmap_LoadFromResourceName(B, AResName); - FDrawModeImages.AddMasked(B, clDefault); - end; - - var - B: TBitmap; - begin - B := TBitmap.Create; - try - LoadImage(B, IDB_DXPSDRAWMODE_STRICT); - LoadImage(B, IDB_DXPSDRAWMODE_ODDEVEN); - LoadImage(B, IDB_DXPSDRAWMODE_CHESS); - LoadImage(B, IDB_DXPSDRAWMODE_BORROW); - finally - B.Free; - end; - end; - -begin - if FDrawModeImages = nil then - begin - FDrawModeImages := TImageList.Create(nil); - LoadImages; - end; - Result := FDrawModeImages; -end; - -{$IFNDEF DELPHI5} -procedure FreeAndNil(var Obj); -var - P: TObject; -begin - P := TObject(Obj); - TObject(Obj) := nil; - P.Free; -end; -{$ENDIF} - -function dxAllocatehWnd(AMethod: TWndMethod): HWND; -begin - {$IFDEF DELPHI6} - Result := Classes.AllocatehWnd(AMethod); - {$ELSE} - Result := Forms.AllocatehWnd(AMethod); - {$ENDIF} -end; - -procedure dxDeallocatehWnd(AWnd: HWND); -begin - if IsWindow(AWnd) then - {$IFDEF DELPHI6} - Classes.DeallocatehWnd(AWnd); - {$ELSE} - Forms.DeallocatehWnd(AWnd); - {$ENDIF} -end; - -procedure dxRecreateWnd(AControl: TWinControl); -begin - TWinControlAccess(AControl).RecreateWnd; -end; - -function MakeBounds(ALeft, ATop, AWidth, AHeight: Integer): TRect; -begin - with Result do - begin - Left := ALeft; - Top := ATop; - Right := ALeft + AWidth; - Bottom := ATop + AHeight; - end; -end; - -function MakePoint(X, Y: Integer): TPoint; -begin - Result.X := X; - Result.Y := Y; -end; - -function MakeRect(ALeft, ATop, ARight, ABottom: Integer): TRect; -begin - with Result do - begin - Left := ALeft; - Top := ATop; - Right := ARight; - Bottom := ABottom; - end; -end; - -function MakeRect(const ATopLeft, ABottomRight: TPoint): TRect; -begin - with Result do - begin - TopLeft := ATopLeft; - BottomRight := ABottomRight; - end; -end; - -function TTagToInt(AValue: Integer ): Integer; -begin - Result := AValue; -end; - -function TTagToObj(AValue: Integer ): TObject; -begin - Result := TObject(AValue); -end; - -function TTagToClass(AValue: Integer ): TClass; -begin - Result := TClass(AValue); -end; - -function MakeTTag(AValue: Integer): Integer ; -begin - Result := AValue; -end; - -function MakeTTag(AValue: TObject): Integer ; -begin - Result := Integer(AValue); -end; - -function MakeTTag(AValue: TClass): Integer ; -begin - Result := Integer(AValue); -end; - -function Control_GetColor(AControl: TControl): TColor; -begin - Result := TControlAccess(AControl).Color; -end; - -function Control_GetControlStyle(AControl: TControl): TControlStyle; -begin - Result := TControlAccess(AControl).ControlStyle; -end; - -function Control_GetCtl3D(AControl: TWinControl): Boolean; -begin - Result := TWinControlAccess(AControl).Ctl3D; -end; - -function Control_GetFont(AControl: TControl): TFont; -begin - Result := TControlAccess(AControl).Font; -end; - -function Control_GetPopupMenu(AControl: TControl): TPopupMenu; -begin - Result := TControlAccess(AControl).PopupMenu; -end; - -function Control_GetText(AControl: TControl): string; -begin - Result := TControlAccess(AControl).Text; -end; - -procedure Control_SetParentBackground(AControl: TWinControl; Value: Boolean); -begin -{$IFDEF DELPHI7} - TWinControlAccess(AControl).ParentBackground := Value; -{$ENDIF} -end; - -procedure Control_DoContextPopup(AControl: TControl; const Pt: TPoint; var AHandled: Boolean); -begin - AHandled := False; - {$IFDEF DELPHI5} - TControlAccess(AControl).DoContextPopup(Pt, AHandled); - {$ENDIF} -end; - -procedure Control_PaintWindow(AControl: TWinControl; DC: HDC); -begin - TWinControlAccess(AControl).PaintWindow(DC); -end; - -procedure Control_SendCancelMode(AControl, ASender: TControl); -begin - TControlAccess(AControl).SendCancelMode(ASender); -end; - -procedure Control_UpdateBoundsRect(AControl: TControl; const R: TRect); -begin - TControlAccess(AControl).UpdateBoundsRect(R); -end; - -procedure Control_UpdateBoundsRect(AControl: TControl; ALeft, ARight, AWidth, AHeight: Integer); -begin - Control_UpdateBoundsRect(AControl, MakeBounds(ALeft, ARight, AWidth, AHeight)); -end; - -procedure PopupMenu_DoPopup(APopupMenu: TPopupMenu); -begin - {$IFDEF DELPHI5} - TPopupMenuAccess(APopupMenu).DoPopup(APopupMenu); - {$ELSE} - if Assigned(APopupMenu.OnPopup) then APopupMenu.OnPopup(APopupMenu); - {$ENDIF} -end; - -function RichEdit_GetBorderStyle(AControl: TCustomRichEdit): TBorderStyle; -begin - Result := TCustomRichEditAccess(AControl).BorderStyle; -end; - -function RichEdit_GetLines(AControl: TCustomRichEdit): TStrings; -begin - Result := TCustomRichEditAccess(AControl).Lines; -end; - -procedure Bitmap_LoadFromResourceName(ABitmap: TBitmap; const AResName: string; - ABaseName: string = 'dxPSImgs'); -begin - ABitmap.LoadFromResourceName(hInstance, AResName); -end; - -procedure Icon_LoadFromResourceName(AIcon: TIcon; const AResName: string; - ABaseName: string = 'dxPSImgs'); -var - Bitmap: TBitmap; - ImageList: TImageList; -begin - Bitmap := TBitmap.Create; - try - Bitmap_LoadFromResourceName(Bitmap, AResName); - ImageList := TImageList.CreateSize(Bitmap.Width, Bitmap.Height); - try - ImageList.AllocBy := 1; - ImageList.AddMasked(Bitmap, clDefault); - AIcon.Handle := ImageList_GetIcon(ImageList.Handle, 0, ILD_NORMAL); - finally - ImageList.Free; - end; - finally - Bitmap.Free; - end; -end; - -{$IFNDEF DELPHI6} -type - PPointer = ^Pointer; -{$ENDIF} - -function IsDelphiObject(AData: DWORD): Boolean; -var - P: Pointer; - SelfPtr: Pointer; -begin - Result := False; - - P := Pointer(AData); - if IsBadReadPtr(P, SizeOf(Pointer)) then Exit; - - P := PPointer(P)^; - if IsBadReadPtr(P, SizeOf(Pointer)) then Exit; - - SelfPtr := Pointer(Integer(P) + vmtSelfPtr); - if IsBadReadPtr(SelfPtr, SizeOf(Pointer)) then Exit; - SelfPtr := PPointer(SelfPtr)^; - - Result := P = SelfPtr; -end; - -initialization - CoInitialize(nil); - PopulateShellImages(True); - -finalization - FreeAndNil(FDrawModeImages); - if FPatternBrush <> 0 then - Windows.DeleteObject(FPatternBrush); - - FreeAndNil(FTrueTypeFonts); - FreeAndNil(FNonTrueTypeFonts); - FreeAndNil(FShellLargeImages); - FreeAndNil(FShellSmallImages); - - CoUninitialize; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSXplorerTreeView.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSXplorerTreeView.pas deleted file mode 100644 index 16905600..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSXplorerTreeView.pas +++ /dev/null @@ -1,1348 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSXplorerTreeView; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, Messages, CommCtrl, Graphics, Controls, ExtCtrls, ComCtrls, - Forms, dxPSCore; - -type - TCustomTreeViewClass = class of TCustomTreeView; - - TCustomdxPSExplorerTreeViewContainer = class(TCustomdxPSExplorerTreeContainer) - private - FFocusedNode: TTreeNode; - FStorageStream: TMemoryStream; - function GetRootNode: TTreeNode; - function GetTreeView: TCustomTreeView; - procedure TreeCancelEdit(Sender: TObject; ANode: TTreeNode); - procedure TreeChanged(Sender: TObject; ANode: TTreeNode); - procedure TreeCollapsing(Sender: TObject; Node: TTreeNode; var AllowCollapse: Boolean); - procedure TreeCustomDrawItem(Sender: TCustomTreeView; Node: TTreeNode; - State: TCustomDrawState; var DefaultDraw: Boolean); - procedure TreeDblClick(Sender: TObject); - procedure TreeDragDrop(Sender, Source: TObject; X, Y: Integer); - procedure TreeDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); - procedure TreeEdited(Sender: TObject; Node: TTreeNode; var S: string); - procedure TreeEditing(Sender: TObject; Node: TTreeNode; var AllowEdit: Boolean); - procedure TreeExpanding(Sender: TObject; Node: TTreeNode; var AllowExpansion: Boolean); - procedure TreeKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure TreeKeyPress(Sender: TObject; var Key: Char); - procedure TreeMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - - procedure ReadTreeViewState; - procedure WriteTreeViewState; - protected - procedure AddItem(AParent: TdxPSExplorerFolder; AnItem: TCustomdxPSExplorerItem); override; - procedure Clear; override; - procedure DeleteItem(AnItem: TCustomdxPSExplorerItem); override; - procedure InvalidateItem(AnItem: TCustomdxPSExplorerItem); override; - procedure MoveItem(AnItem: TCustomdxPSExplorerItem); override; - procedure RenameItem(AnItem: TCustomdxPSExplorerItem); override; - - function GetCreationParent: TdxPSExplorerFolder; override; - function GetFocusedItem: TCustomdxPSExplorerItem; override; - function GetIsEditing: Boolean; override; - function GetIsFolderSelected: Boolean; override; - function GetIsItemSelected: Boolean; override; - function GetIsRootSelected: Boolean; override; - function GetSelectedFolder: TdxPSExplorerFolder; override; - function GetSelectedItem: TCustomdxPSExplorerItem; override; - function GetSelectedItemText: string; override; - procedure SetFocusedItem(Value: TCustomdxPSExplorerItem); override; - procedure SetSelectedItem(Value: TCustomdxPSExplorerItem); override; - procedure SetSelectedItemText(const Value: string); override; - - procedure RestoreState; override; - procedure SaveState; override; - - procedure InitializeTreeContainer; override; - - function AddNode(AParent: TTreeNode; AnItem: TCustomdxPSExplorerItem): TTreeNode; virtual; - function CanDragNode(ANode: TTreeNode): Boolean; virtual; - function GetHitTestInfoAt(X, Y: Integer): THitTests; - function GetItemByNode(ANode: TTreeNode): TCustomdxPSExplorerItem; - function GetNodeByItem(AnItem: TCustomdxPSExplorerItem): TTreeNode; - - property FocusedNode: TTreeNode read FFocusedNode; - property RootNode: TTreeNode read GetRootNode; - property TreeView: TCustomTreeView read GetTreeView; - public - function BeginEdit(AnImmediate: Boolean = True): Boolean; override; - procedure EndEdit(ACancel: Boolean); override; - - class function ControlClass: TWinControlClass; override; - class function TreeViewClass: TCustomTreeViewClass; virtual; - - procedure CollapseItem(AnItem: TCustomdxPSExplorerItem; ARecursive: Boolean = False); override; - procedure ExpandItem(AnItem: TCustomdxPSExplorerItem; ARecursive: Boolean = False); override; - procedure MakeItemVisible(AnItem: TCustomdxPSExplorerItem); override; - - procedure BeginUpdate; override; - procedure EndUpdate; override; - - procedure RefreshSorting(ANode: TObject); override; - procedure RefreshSorting(AFolder: TdxPSExplorerFolder); override; - - function GetDropTarget(X, Y: Integer): TdxPSExplorerFolder; override; - function GetItemAt(X, Y: Integer): TCustomdxPSExplorerItem; override; - function GetItemAtMousePos: TCustomdxPSExplorerItem; - end; - - {$IFDEF DELPHI5} - {$IFNDEF DELPHI6} - {$DEFINE WMCONTEXTMENU} - {$ENDIF} - {$ENDIF} - - TdxPSExplorerTreeViewScrollArea = (etsaLeft, etsaTop, etsaRight, etsaBottom); - TdxPSExplorerTreeViewScrollAreas = set of TdxPSExplorerTreeViewScrollArea; - - TdxPSExplorerTreeView = class(TTreeView) - private - FContainer: TCustomdxPSExplorerTreeViewContainer; - FDragImage: TDragImageList; - FExpandTimer: TTimer; - FFlat: Boolean; - FSavedDropTarget: TTreeNode; - FSavedScrollActiveAreas: TdxPSExplorerTreeViewScrollAreas; - FScrollTimer: TTimer; - {$IFNDEF DELPHI6} - FOnCancelEdit: TTVChangedEvent; - {$ENDIF} - function GetIsMouseInScrollArea: Boolean; - function GetIsMouseInScrollAreaBound(ScrollArea: TdxPSExplorerTreeViewScrollArea): Boolean; - function GetScrollActiveAreas: TdxPSExplorerTreeViewScrollAreas; - function GetScrollAreaBounds(ScrollArea: TdxPSExplorerTreeViewScrollArea): TRect; - procedure SetFlat(Value: Boolean); - procedure OnExpandTimer(Sender: TObject); - procedure OnScrollTimer(Sender: TObject); - {$IFDEF WMCONTEXTMENU} - procedure WMContextMenu(var Message: TWMContextMenu); message WM_CONTEXTMENU; - {$ENDIF} - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; - protected - function CanCollapse(Node: TTreeNode): Boolean; override; - function CanEdit(Node: TTreeNode): Boolean; override; - function CanExpand(Node: TTreeNode): Boolean; override; - procedure Change(Node: TTreeNode); override; - procedure CreateParams(var Params: TCreateParams); override; - procedure DblClick; override; - procedure DoEndDrag(Target: TObject; X, Y: Integer); override; - procedure DoStartDrag(var DragObject: TDragObject); override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); override; - {$IFNDEF DELPHI6} - procedure Edit(const Item: TTVItem); override; - {$ENDIF} - {$IFNDEF DELPHI12} - function GetDragImages: TDragImageList; override; - {$ENDIF} - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure WndProc(var Message: TMessage); override; - - function CanDragNode(ANode: TTreeNode): Boolean; virtual; - procedure DrawFlatEdge; virtual; - function GetInfoTip(AnItem: HTREEITEM): string; - function MakeDragBitmap(ANode: TTreeNode): Graphics.TBitmap; virtual; - procedure UpdateDragMode(ANode: TTreeNode); - - property Container: TCustomdxPSExplorerTreeViewContainer read FContainer write FContainer; - property IsMouseInScrollArea: Boolean read GetIsMouseInScrollArea; - property IsMouseInScrollAreaBounds[ScrollArea: TdxPSExplorerTreeViewScrollArea]: Boolean read GetIsMouseInScrollAreaBound; - property ScrollActiveAreas: TdxPSExplorerTreeViewScrollAreas read GetScrollActiveAreas; - property ScrollAreaBounds[ScrollArea: TdxPSExplorerTreeViewScrollArea]: TRect read GetScrollAreaBounds; - public - constructor Create(AOwner: TComponent); override; - constructor CreateEx(AOwner: TComponent; AContainer: TCustomdxPSExplorerTreeViewContainer); virtual; - - procedure DragDrop(Source: TObject; X, Y: Integer); override; - {$IFDEF DELPHI12} - function GetDragImages: TDragImageList; override; - {$ENDIF} - - property Flat: Boolean read FFlat write SetFlat; - property OnCancelEdit{$IFNDEF DELPHI6} : TTVChangedEvent read FOnCancelEdit write FOnCancelEdit{$ENDIF}; - end; - - TdxPSExplorerTreeViewContainer = class(TCustomdxPSExplorerTreeViewContainer) - private - function GetTreeView: TdxPSExplorerTreeView; - protected - procedure InitializeTreeContainer; override; - public - class function TreeViewClass: TCustomTreeViewClass; override; - property TreeView: TdxPSExplorerTreeView read GetTreeView; - end; - -implementation - -uses - SysUtils, cxClasses, dxPSUtl, dxPSGlbl, dxCore; - -const - ScrollAreaHeight = 30; - ScrollAreaWidth = 30; - -type - TCustomTreeViewAccess = class(TCustomTreeView); - - -{ TreeView Helpers } - -function TreeView_GetItems(AControl: TCustomTreeView): TTreeNodes; -begin - Result := TCustomTreeViewAccess(AControl).Items; -end; - -{ TCustomdxPSExplorerTreeViewContainer } - -function TCustomdxPSExplorerTreeViewContainer.BeginEdit(AnImmediate: Boolean = True): Boolean; -var - SelectedNode: TTreeNode; -begin - Result := CanRenameSelectedItem; - if Result then - begin - SelectedNode := TreeView.Selected; - if AnImmediate then - Result := SelectedNode.EditText - else - Result := PostMessage(TreeView.Handle, TVM_EDITLABEL, 0, lParam(SelectedNode.ItemId)); - Host.UpdateState; - end; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.EndEdit(ACancel: Boolean); -var - Node: TTreeNode; -begin - if TreeView.IsEditing then - begin - Node := TreeView.Selected; - if Node <> nil then Node.EndEdit(ACancel); - end; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.CollapseItem(AnItem: TCustomdxPSExplorerItem; - ARecursive: Boolean = False); -var - Node: TTreeNode; -begin - Node := GetNodeByItem(AnItem); - if Node <> nil then Node.Collapse(ARecursive); -end; - -procedure TCustomdxPSExplorerTreeViewContainer.ExpandItem(AnItem: TCustomdxPSExplorerItem; - ARecursive: Boolean = False); -var - Node: TTreeNode; -begin - Node := GetNodeByItem(AnItem); - if Node <> nil then - begin - dxPSCore.dxPSStartWait; - try - Node.Expand(ARecursive); - finally - dxPSCore.dxPSStopWait; - end; - end; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.MakeItemVisible(AnItem: TCustomdxPSExplorerItem); -var - Node: TTreeNode; -begin - Node := GetNodeByItem(AnItem); - if Node <> nil then - begin - Node.MakeVisible; - Node.Focused := True; - Node.Selected := True; - end; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.BeginUpdate; -begin - inherited; - TreeView_GetItems(TreeView).BeginUpdate; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.EndUpdate; -begin - TreeView_GetItems(TreeView).EndUpdate; - inherited; -end; - -function TreeSortFunc(lParam1, lParam2, lParamSort: Longint): Integer; stdcall; -begin - if lParam2 <> 0 then - Result := TCustomdxPSExplorerItemComparator.CompareItems(TTreeNode(lParam1).Data, TTreeNode(lParam2).Data) - else - Result := 0; -end; - - -procedure TCustomdxPSExplorerTreeViewContainer.RefreshSorting(ANode: TObject); -begin - if Explorer.State * [esLoading{, esRefreshing}] = [] then - if ANode <> nil then - TTreeNode(ANode).CustomSort(TreeSortFunc, (0) {$IFDEF DELPHI6}, False{$ENDIF}) - else - TreeView.CustomSort(TreeSortFunc, (0) {$IFDEF DELPHI6}, True{$ENDIF}) -end; - -procedure TCustomdxPSExplorerTreeViewContainer.RefreshSorting(AFolder: TdxPSExplorerFolder); -var - Node: TObject; -begin - if (AFolder = nil) or AFolder.IsRoot then - Node := nil - else - Node := GetNodeByItem(AFolder); - RefreshSorting(Node); -end; - -class function TCustomdxPSExplorerTreeViewContainer.ControlClass: TWinControlClass; -begin - Result := TreeViewClass; -end; - -class function TCustomdxPSExplorerTreeViewContainer.TreeViewClass: TCustomTreeViewClass; -begin - Result := TCustomTreeView; -end; - -function TCustomdxPSExplorerTreeViewContainer.GetItemAt(X, Y: Integer): TCustomdxPSExplorerItem; -begin - Result := GetItemByNode(TreeView.GetNodeAt(X, Y)) -end; - -function TCustomdxPSExplorerTreeViewContainer.GetItemAtMousePos: TCustomdxPSExplorerItem; -begin - with Control.ScreenToClient(Mouse.CursorPos) do - Result := GetItemAt(X, Y); -end; - -function TCustomdxPSExplorerTreeViewContainer.GetDropTarget(X, Y: Integer): TdxPSExplorerFolder; -var - Item: TCustomdxPSExplorerItem; -begin - if TreeView.DropTarget <> nil then - if [ComCtrls.htBelow, ComCtrls.htNowhere] * GetHitTestInfoAt(X, Y) = [] then - begin - Item := GetItemByNode(TreeView.DropTarget); - if Item is TdxPSExplorerFolder then - Result := TdxPSExplorerFolder(Item) - else - Result := nil; - end - else - Result := Explorer.Root - else - Result := Explorer.Root; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.AddItem(AParent: TdxPSExplorerFolder; - AnItem: TCustomdxPSExplorerItem); -var - Node: TTreeNode; -begin - Node := AddNode(GetNodeByItem(AParent), AnItem); - if AnItem is TdxPSExplorerFolder then - Node.HasChildren := TdxPSExplorerFolderHelper.GetHasChildren(TdxPSExplorerFolder(AnItem)); -end; - -procedure TCustomdxPSExplorerTreeViewContainer.Clear; -begin - TreeView_GetItems(TreeView).Clear; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.DeleteItem(AnItem: TCustomdxPSExplorerItem); -begin - inherited; - GetNodeByItem(AnItem).Delete; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.InvalidateItem(AnItem: TCustomdxPSExplorerItem); -var - Node: TTreeNode; - R: TRect; -begin - Node := GetNodeByItem(AnItem); - if Node <> nil then - begin - R := Node.DisplayRect(False); - InvalidateRect(TreeView.Handle, @R, True); - end; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.MoveItem(AnItem: TCustomdxPSExplorerItem); -var - Node: TTreeNode; -begin - Node := GetNodeByItem(AnItem); - if Node <> nil then { We are not in creation phase of parent assigning } - if AnItem is TdxPSExplorerFolder then - Node.MoveTo(GetNodeByItem(AnItem.Parent), naAddChildFirst) - else - Node.MoveTo(GetNodeByItem(AnItem.Parent), naAddChild); -end; - -procedure TCustomdxPSExplorerTreeViewContainer.RenameItem(AnItem: TCustomdxPSExplorerItem); -begin - GetNodeByItem(AnItem).Text := AnItem.DisplayName; -end; - -function TCustomdxPSExplorerTreeViewContainer.GetCreationParent: TdxPSExplorerFolder; -var - Item: TCustomdxPSExplorerItem; -begin - Item := SelectedItem; - if Item = nil then - Result := Explorer.Root - else - if not (Item is TdxPSExplorerFolder) then - Result := Item.Parent - else - Result := TdxPSExplorerFolder(Item); -end; - -function TCustomdxPSExplorerTreeViewContainer.GetFocusedItem: TCustomdxPSExplorerItem; -begin - Result := GetItemByNode(FocusedNode); -end; - -function TCustomdxPSExplorerTreeViewContainer.GetIsEditing: Boolean; -begin - Result := TreeView.IsEditing; -end; - -function TCustomdxPSExplorerTreeViewContainer.GetIsFolderSelected: Boolean; -begin - Result := SelectedItem is TdxPSExplorerFolder; -end; - -function TCustomdxPSExplorerTreeViewContainer.GetIsItemSelected: Boolean; -begin - Result := SelectedItem is TdxPSExplorerItem; -end; - -function TCustomdxPSExplorerTreeViewContainer.GetIsRootSelected: Boolean; -begin - Result := SelectedItem = Explorer.Root; -end; - -function TCustomdxPSExplorerTreeViewContainer.GetSelectedFolder: TdxPSExplorerFolder; -var - Item: TCustomdxPSExplorerItem; -begin - Item := SelectedItem; - if Item is TdxPSExplorerFolder then - Result := TdxPSExplorerFolder(Item) - else - Result := nil; -end; - -function TCustomdxPSExplorerTreeViewContainer.GetSelectedItem: TCustomdxPSExplorerItem; -begin - Result := GetItemByNode(TreeView.Selected); -end; - -function TCustomdxPSExplorerTreeViewContainer.GetSelectedItemText: string; -var - Node: TTreeNode; -begin - Node := GetNodeByItem(SelectedItem); - if Node <> nil then - Result := Node.Text - else - Result := ''; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.SetFocusedItem(Value: TCustomdxPSExplorerItem); -var - Node: TTreeNode; -begin - Node := GetNodeByItem(Value); - if Node <> nil then - Node.Focused := True; - FFocusedNode := Node; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.SetSelectedItem(Value: TCustomdxPSExplorerItem); -var - Node: TTreeNode; -begin - Node := GetNodeByItem(Value); - if Node <> nil then - Node.Selected := True; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.SetSelectedItemText(const Value: string); -var - Node: TTreeNode; -begin - Node := GetNodeByItem(SelectedItem); - if Node <> nil then - begin - Node.Text := Value; - //RefreshSorting(Node.Parent); {.1} - end; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.RestoreState; -begin - FStorageStream.Position := 0; - ReadTreeViewState; - FreeAndNil(FStorageStream); -end; - -procedure TCustomdxPSExplorerTreeViewContainer.SaveState; -begin - FStorageStream := TMemoryStream.Create; - WriteTreeViewState; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.InitializeTreeContainer; -begin - inherited; - TCustomTreeViewAccess(TreeView).OnCustomDrawItem := TreeCustomDrawItem; - TCustomTreeViewAccess(TreeView).OnEdited := TreeEdited; -end; - -function TCustomdxPSExplorerTreeViewContainer.AddNode(AParent: TTreeNode; - AnItem: TCustomdxPSExplorerItem): TTreeNode; -begin - Result := TreeView_GetItems(TreeView).AddChildObject(AParent, AnItem.DisplayName, AnItem); - Result.ImageIndex := TCustomdxPSExplorerItemHelper.GetImageIndex(AnItem); - Result.SelectedIndex := TCustomdxPSExplorerItemHelper.GetSelectedIndex(AnItem); -// RefreshSorting(AParent); //3.1 -end; - -function TCustomdxPSExplorerTreeViewContainer.CanDragNode(ANode: TTreeNode): Boolean; -var - Item: TCustomdxPSExplorerItem; -begin - Item := GetItemByNode(ANode); - Result := (Item <> nil) and Item.CanMove; -end; - -function TCustomdxPSExplorerTreeViewContainer.GetHitTestInfoAt(X, Y: Integer): THitTests; -begin - Result := TreeView.GetHitTestInfoAt(X, Y); -end; - -function TCustomdxPSExplorerTreeViewContainer.GetItemByNode(ANode: TTreeNode): TCustomdxPSExplorerItem; -begin - if ANode <> nil then - Result := TCustomdxPSExplorerItem(ANode.Data) - else - Result := nil; -end; - -function TCustomdxPSExplorerTreeViewContainer.GetNodeByItem(AnItem: TCustomdxPSExplorerItem): TTreeNode; - - function FindInChildren(ANode: TTreeNode): TTreeNode; - var - I: Integer; - begin - for I := 0 to ANode.Count - 1 do - begin - Result := ANode[I]; - if GetItemByNode(Result) = AnItem then - Exit; - if Result.HasChildren then - begin - Result := FindInChildren(Result); - if Result <> nil then Exit; - end; - end; - Result := nil; - end; - -begin - Result := RootNode; - if (Result <> nil) and (GetItemByNode(Result) <> AnItem) then - Result := FindInChildren(Result); -end; - -function TCustomdxPSExplorerTreeViewContainer.GetRootNode: TTreeNode; -begin - Result := TreeView_GetItems(TreeView).GetFirstNode; -end; - -function TCustomdxPSExplorerTreeViewContainer.GetTreeView: TCustomTreeView; -begin - Result := TCustomTreeView(Control); -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeCollapsing(Sender: TObject; - Node: TTreeNode; var AllowCollapse: Boolean); -begin - AllowCollapse := GetItemByNode(Node) <> Explorer.Root; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeCustomDrawItem(Sender: TCustomTreeView; - Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean); -var - Item: TCustomdxPSExplorerItem; -begin - Item := GetItemByNode(Node); - if Item is TdxPSExplorerItem then - with Sender.Canvas do - begin - if TdxPSExplorerItem(Item).IsCurrentlyLoaded then - Font.Style := Font.Style + [fsBold]; - if TdxPSExplorerItem(Item).HasInvalidData then - Font.Color := clGrayText; - end; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeDblClick(Sender: TObject); -begin - if (SelectedItem <> nil) and (GetItemAtMousePos = SelectedItem) and CanLoadSelectedItemData then - LoadSelectedItemData; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeDragDrop(Sender, Source: TObject; - X, Y: Integer); -begin - SelectedItem.Parent := GetDropTarget(X, Y); -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeDragOver(Sender, Source: TObject; - X, Y: Integer; State: TDragState; var Accept: Boolean); -begin - Accept := (Source = Sender) and SelectedItem.CanMoveTo(GetDropTarget(X, Y)); -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeCancelEdit(Sender: TObject; ANode: TTreeNode); -begin - Host.UpdateState; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeChanged(Sender: TObject; ANode: TTreeNode); -begin - FFocusedNode := ANode; - Host.UpdateState; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeEdited(Sender: TObject; Node: TTreeNode; - var S: string); -var - Item: TCustomdxPSExplorerItem; - ErrorText: string; -begin - if Node.Selected then Node.Focused := True; - - Item := GetItemByNode(Node); - if not dxSameStr(Item.DisplayName, S) then - if not Item.CanRenameTo(S) then - begin - ErrorText := Item.CannotRenameMessageText(Item.DisplayName, S); - dxPSUtl.MessageError(ErrorText); - BeginEdit(False); - end - else - Item.Name := S; - - Host.UpdateState; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeEditing(Sender: TObject; Node: TTreeNode; - var AllowEdit: Boolean); -var - Item: TCustomdxPSExplorerItem; - Editor: HWND; -begin - Item := GetItemByNode(Node); - AllowEdit := (Item <> nil) and Item.CanRename; - if AllowEdit then - begin - TreeView.Selected.Text := Item.DisplayName; - Editor := TreeView_GetEditControl(TreeView.Handle); - if IsWindow(Editor) then - SendMessage(Editor, WM_SETTEXT, 0, Integer(PChar(Item.DisplayName))); - end; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeExpanding(Sender: TObject; Node: TTreeNode; - var AllowExpansion: Boolean); -var - Item: TCustomdxPSExplorerItem; -begin - Item := GetItemByNode(Node); - if Item is TdxPSExplorerFolder then - begin - TdxPSExplorerFolder(Item).Populate; - //RefreshSorting(Item); - end; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - ProcessKeyDown(Key, Shift); -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeKeyPress(Sender: TObject; - var Key: Char); -begin - ProcessKeyPress(Key); -end; - -procedure TCustomdxPSExplorerTreeViewContainer.TreeMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - Host.UpdateState; -end; - -type - TdxNodeInfo = record - Expanded: Integer; - Count: Integer; - UniqueIDSize: Integer; - //UniqueID: TBytes with UniqueIDSize length - end; - -function GetNodeInfoSize: Integer; -begin - Result := SizeOf(TdxNodeInfo); -end; - -procedure TCustomdxPSExplorerTreeViewContainer.ReadTreeViewState; - - function ReadNode(ARecursive: Boolean): TTreeNode; - var - NodeInfo: TdxNodeInfo; - Bytes: TBytes; - Item: TCustomdxPSExplorerItem; - I: Integer; - begin - Result := nil; - FStorageStream.ReadBuffer(NodeInfo, GetNodeInfoSize); - if NodeInfo.UniqueIDSize <> 0 then - begin - SetLength(Bytes, NodeInfo.UniqueIDSize); - FStorageStream.ReadBuffer(Pointer(Bytes)^, NodeInfo.UniqueIDSize); - Item := Explorer.FindCustomItemByUniqueID(Bytes); - if Item <> nil then - begin - Result := GetNodeByItem(Item); - if Result <> nil then - Result.Expanded := NodeInfo.Expanded = 1; - end; - end; - if ARecursive then - for I := 0 to NodeInfo.Count - 1 do - ReadNode(ARecursive); - end; - - procedure ReadSelection; - var - Buffer: Integer; - begin - FStorageStream.ReadBuffer(Buffer, SizeOf(Buffer)); - if Buffer <> 0 then - TreeView.Selected := ReadNode(False); - end; - -begin - BeginUpdate; - try - ReadNode(True); - ReadSelection; - finally - EndUpdate; - end; -end; - -procedure TCustomdxPSExplorerTreeViewContainer.WriteTreeViewState; - - procedure WriteNode(ANode: TTreeNode; ARecursive: Boolean); - var - Item: TCustomdxPSExplorerItem; - NodeInfo: TdxNodeInfo; - Bytes: TBytes; - I: Integer; - begin - Item := GetItemByNode(ANode); - with NodeInfo do - begin - Expanded := Ord(ANode.Expanded); - if Expanded = 1 then - Count := ANode.Count - else - Count := 0; - UniqueIDSize := Item.GetUniqueID(Bytes); - end; - FStorageStream.WriteBuffer(NodeInfo, GetNodeInfoSize); - if NodeInfo.UniqueIDSize <> 0 then - FStorageStream.WriteBuffer(Pointer(Bytes)^, NodeInfo.UniqueIDSize); - - for I := 0 to ANode.Count - 1 do - WriteNode(ANode[I], ARecursive); - end; - - procedure WriteSelection; - var - Flag: Integer; - begin - Flag := Ord(TreeView.Selected <> nil); - FStorageStream.WriteBuffer(Flag , SizeOf(Flag)); - if TreeView.Selected <> nil then - WriteNode(TreeView.Selected, False); - end; - -begin - WriteNode(RootNode, True); - WriteSelection; -end; - -{ TdxPSExplorerTreeView } - -constructor TdxPSExplorerTreeView.Create(AOwner: TComponent); - - function CreateTimer(AnInterval: Integer; AnOnTimer: TNotifyEvent): TTimer; - begin - Result := TTimer.Create(Self); - Result.Enabled := False; - Result.Interval := AnInterval; - Result.OnTimer := AnOnTimer; - end; - -begin - inherited; - Align := alClient; - DragMode := dmAutomatic; - HideSelection := False; - Images := dxPSExplorerImages; - ShowHint := True; - ShowRoot := False; - if IsWin32Version(5, 1) then - begin - ShowLines := False; - //HotTrack := True; - end; - - FDragImage := TDragImageList.Create(Self); - - FExpandTimer := CreateTimer(500, OnExpandTimer); - FScrollTimer := CreateTimer(80, OnScrollTimer); -end; - -constructor TdxPSExplorerTreeView.CreateEx(AOwner: TComponent; - AContainer: TCustomdxPSExplorerTreeViewContainer); -begin - Create(AOwner); - FContainer := AContainer; -end; - -procedure TdxPSExplorerTreeView.DragDrop(Source: TObject; X, Y: Integer); -begin - inherited; - Container.TreeDragDrop(Self, Source, X, Y); -end; - -function TdxPSExplorerTreeView.CanCollapse(Node: TTreeNode): Boolean; -begin - Result := inherited CanCollapse(Node); - Container.TreeCollapsing(Self, Node, Result); -end; - -function TdxPSExplorerTreeView.CanEdit(Node: TTreeNode): Boolean; -begin - Result := inherited CanEdit(Node); - Container.TreeEditing(Self, Node, Result); -end; - -function TdxPSExplorerTreeView.CanExpand(Node: TTreeNode): Boolean; -begin - Result := inherited CanExpand(Node); - Container.TreeExpanding(Self, Node, Result); -end; - -procedure TdxPSExplorerTreeView.Change(Node: TTreeNode); -begin - inherited; - Container.TreeChanged(Self, Node); -end; - -procedure TdxPSExplorerTreeView.CreateParams(var Params: TCreateParams); -begin - inherited; - Params.Style := Params.Style or TVS_INFOTIP; -end; - -procedure TdxPSExplorerTreeView.DblClick; -begin - inherited; - Container.TreeDblClick(Self); -end; - -procedure TdxPSExplorerTreeView.DoEndDrag(Target: TObject; X, Y: Integer); -begin - FDragImage.Clear; - FSavedScrollActiveAreas := []; - FSavedDropTarget := nil; - FExpandTimer.Enabled := False; - FScrollTimer.Enabled := False; - inherited; -end; - -procedure TdxPSExplorerTreeView.DoStartDrag(var DragObject: TDragObject); -var - Pt: TPoint; - DragNode: TTreeNode; - Bitmap: Graphics.TBitmap; -begin - inherited; - Pt := ScreenToClient(Mouse.CursorPos); - DragNode := GetNodeAt(Pt.X, Pt.Y); - if DragNode <> nil then - begin - FDragImage.Handle := TreeView_CreateDragImage(Handle, DragNode.ItemId); - if FDragImage.Handle <> 0 then - begin - //Item := GetItemFromNode(DragNode); - //Item.Unload; - Bitmap := MakeDragBitmap(DragNode); - try - with FDragImage do - begin - Clear; - Width := Bitmap.Width; - Height := Bitmap.Height; - AddMasked(Bitmap, clDefault); - SetDragImage(0, 2, 2); - end; - finally - Bitmap.Free; - end; - end; - end; -end; - -procedure TdxPSExplorerTreeView.DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); -begin - inherited; - Container.TreeDragOver(Self, Source, X, Y, State, Accept); - if Accept and (DropTarget <> nil) and not DropTarget.Expanded then - begin - FSavedDropTarget := DropTarget; - FExpandTimer.Enabled := False; - FExpandTimer.Enabled := True; - end; - if IsMouseInScrollArea then - begin - FSavedScrollActiveAreas := ScrollActiveAreas; - FScrollTimer.Enabled := False; - FScrollTimer.Enabled := True; - end; -end; - -{$IFNDEF DELPHI6} -procedure TdxPSExplorerTreeView.Edit(const Item: TTVItem); -var - Node: TTreeNode; -begin - inherited; - if Item.pszText = nil then - begin - if (Item.State and TVIF_PARAM) <> 0 then - Node := Pointer(Item.lParam) - else - Node := Items.GetNode(Item.hItem); - if Assigned(FOnCancelEdit) then FOnCancelEdit(Self, Node); - end; -end; -{$ENDIF} - -function TdxPSExplorerTreeView.GetDragImages: TDragImageList; -begin - if FDragImage.Count <> 0 then - Result := FDragImage - else - Result := nil; -end; - -procedure TdxPSExplorerTreeView.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited; - Container.TreeKeyDown(Self, Key, Shift); -end; - -procedure TdxPSExplorerTreeView.KeyPress(var Key: Char); -begin - inherited; - Container.TreeKeyPress(Self, Key); -end; - -procedure TdxPSExplorerTreeView.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited; - Container.TreeMouseDown(Self, Button, Shift, X, Y); -end; - -procedure TdxPSExplorerTreeView.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - Pt: TPoint; - Node: TTreeNode; -begin - if Button = mbRight then - begin - Pt := MakePoint(X, Y); - {$IFDEF DELPHI5} - {$IFNDEF DELPHI7} - Pt := ScreenToClient(Pt); - {$ENDIF} - {$ENDIF} - Node := GetNodeAt(Pt.X, Pt.Y); - if Node <> nil then - begin - Node.Focused := True; - Node.Selected := True; - end; - end; - inherited; -end; - -procedure TdxPSExplorerTreeView.WndProc(var Message: TMessage); -var - Node: TTreeNode; -begin - if (Message.Msg = WM_LBUTTONDOWN) or (Message.Msg = WM_LBUTTONDBLCLK) then - with TWMMouse(Message) do - if Keys and MK_LBUTTON = MK_LBUTTON then - begin - Node := GetNodeAt(XPos, YPos); - if Node <> nil then - UpdateDragMode(Node); - end; - try - inherited; - except - end; -end; - -function TdxPSExplorerTreeView.CanDragNode(ANode: TTreeNode): Boolean; -begin - Result := (Container = nil) or Container.CanDragNode(ANode); -end; - -procedure TdxPSExplorerTreeView.DrawFlatEdge; -var - R: TRect; - DC: HDC; -begin - GetWindowRect(Handle, R); - OffsetRect(R, -R.Left, -R.Top); - - DC := GetWindowDC(Handle); - try - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNSHADOW)); - InflateRect(R, -1, -1); - FrameRect(DC, R, GetSysColorBrush(COLOR_WINDOW)); - finally - ReleaseDC(Handle, DC); - end; -end; - -function TdxPSExplorerTreeView.GetInfoTip(AnItem: HTREEITEM): string; -var - ExplorerItem: TCustomdxPSExplorerItem; -begin - ExplorerItem := TCustomdxPSExplorerItem(Items.GetNode(AnItem).Data); - if ExplorerItem <> nil then - Result := ExplorerItem.InfoTip - else - Result := ''; - if Result <> '' then - Result := Result + ' ' + #0#0; -end; - -function TdxPSExplorerTreeView.MakeDragBitmap(ANode: TTreeNode): Graphics.TBitmap; -const - Format: UINT = DT_LEFT or DT_CENTER or DT_END_ELLIPSIS or DT_SINGLELINE; -var - S: string; - R: TRect; -begin - S := ANode.Text; - - Result := Graphics.TBitmap.Create; - with Result do - begin - Width := Images.Width + 2 + Self.Canvas.TextWidth(S) + 1; - Height := TreeView_GetItemHeight(Self.Handle); - R := MakeRect(0, 0, Width, Height); - - Canvas.Brush.Color := clWhite; - Canvas.FillRect(R); - - Images.Draw(Canvas, 0, 0, ANode.ImageIndex); - - Canvas.Font.Assign(Self.Font); - Canvas.Brush.Style := bsClear; - Inc(R.Left, Images.Width + 2); - Windows.DrawText(Canvas.Handle, PChar(S), Length(S), R, Format); - Canvas.Brush.Style := bsSolid; - end; -end; - -procedure TdxPSExplorerTreeView.UpdateDragMode(ANode: TTreeNode); -const - DragModesMap: array[Boolean] of TDragMode = (dmManual, dmAutomatic); -begin - DragMode := DragModesMap[CanDragNode(ANode)]; -end; - -function TdxPSExplorerTreeView.GetIsMouseInScrollArea: Boolean; -var - ScrollArea: TdxPSExplorerTreeViewScrollArea; -begin - Result := True; - for ScrollArea := Low(ScrollArea) to High(ScrollArea) do - if IsMouseInScrollAreaBounds[ScrollArea] then Exit; - Result := False; -end; - -function TdxPSExplorerTreeView.GetIsMouseInScrollAreaBound(ScrollArea: TdxPSExplorerTreeViewScrollArea): Boolean; -begin - Result := PtInRect(ScrollAreaBounds[ScrollArea], ScreenToClient(Mouse.CursorPos)); -end; - -function TdxPSExplorerTreeView.GetScrollActiveAreas: TdxPSExplorerTreeViewScrollAreas; -var - ScrollArea: TdxPSExplorerTreeViewScrollArea; -begin - Result := []; - for ScrollArea := Low(ScrollArea) to High(ScrollArea) do - if IsMouseInScrollAreaBounds[ScrollArea] then - Include(Result, ScrollArea); -end; - -function TdxPSExplorerTreeView.GetScrollAreaBounds(ScrollArea: TdxPSExplorerTreeViewScrollArea): TRect; -type - TScrollBarKind = (sbkHorz, sbkVert); - - function HasScrollBar(AScrollBarKind: TScrollBarKind): Boolean; - const - ScrollBarKindMap: array[TScrollBarKind] of Integer = (WS_HSCROLL, WS_VSCROLL); - begin - Result := Windows.GetWindowLong(Handle, GWL_STYLE) and ScrollBarKindMap[AScrollBarKind] <> 0; - end; - - function ScrollBarWidth(AScrollBarKind: TScrollBarKind): Integer; - const - ScrollBarWidthIndexMap: array[TScrollBarKind] of Integer = (SM_CYHSCROLL, SM_CXVSCROLL); - begin - Result := GetSystemMetrics(ScrollBarWidthIndexMap[AScrollBarKind]); - end; - -begin - case ScrollArea of - etsaLeft: - Result := MakeRect(0, 0, ScrollAreaWidth, Height); - etsaTop: - Result := MakeRect(0, 0, Width, ScrollAreaHeight); - etsaRight: - begin - Result := MakeRect(Width - ScrollAreaWidth, 0, Width, Height); - if HasScrollBar(sbkVert) then - Dec(Result.Left, ScrollBarWidth(sbkVert)); - end; - else //etsaBottom - begin - Result := MakeRect(0, Height - ScrollAreaHeight, Width, Height); - if HasScrollBar(sbkHorz) then - Dec(Result.Top, ScrollBarWidth(sbkHorz)); - end; - end; -end; - -procedure TdxPSExplorerTreeView.SetFlat(Value: Boolean); -begin - if FFlat <> Value then - begin - FFlat := Value; - RecreateWnd; - end; -end; - -procedure TdxPSExplorerTreeView.OnExpandTimer(Sender: TObject); -begin - FExpandTimer.Enabled := False; - - if DropTarget = FSavedDropTarget then - begin - ImageList_DragShowNolock(False); - try - DropTarget.Expand(False); - finally - Update; - ImageList_DragShowNolock(True); - end; - end; -end; - -procedure TdxPSExplorerTreeView.OnScrollTimer(Sender: TObject); - - procedure DoScroll(AMessage: Cardinal; AScrollCode: Integer); - begin - Perform(AMessage, AScrollCode, 0); - end; - -const - ScrollMessages: array[TdxPSExplorerTreeViewScrollArea] of Cardinal = (WM_HSCROLL, WM_VSCROLL, WM_HSCROLL, WM_VSCROLL); - ScrollCodes: array[TdxPSExplorerTreeViewScrollArea] of Integer = (SB_LINELEFT, SB_LINEUP, SB_LINERIGHT, SB_LINEDOWN); - -var - ScrollActiveAreas: TdxPSExplorerTreeViewScrollAreas; - ScrollArea: TdxPSExplorerTreeViewScrollArea; -begin - ScrollActiveAreas := Self.ScrollActiveAreas * FSavedScrollActiveAreas; - if ScrollActiveAreas <> [] then - begin - ImageList_DragShowNolock(False); - try - for ScrollArea := Low(ScrollArea) to High(ScrollArea) do - if ScrollArea in ScrollActiveAreas then - DoScroll(ScrollMessages[ScrollArea], ScrollCodes[ScrollArea]); - finally - Update; - ImageList_DragShowNolock(True); - end; - end; - FSavedScrollActiveAreas := Self.ScrollActiveAreas; -end; - -{$IFDEF WMCONTEXTMENU} -procedure TdxPSExplorerTreeView.WMContextMenu(var Message: TWMContextMenu); -var - KeyState: TKeyboardState; -begin - inherited; - GetKeyboardState(KeyState); - MouseUp(mbRight, KeyboardStateToShiftState(KeyState), Message.Pos.X, Message.Pos.Y); -end; -{$ENDIF} - -procedure TdxPSExplorerTreeView.WMNCPaint(var Message: TWMNCPaint); -begin - inherited; - if Flat then DrawFlatEdge; -end; - -procedure TdxPSExplorerTreeView.CMHintShow(var Message: TCMHintShow); - - function HasInfoTip: Boolean; - var - Node: TTreeNode; - begin - Result := dxPSGlbl.CanShowHints; - if Result then - begin - with Message.HintInfo^.CursorPos do - Node := GetNodeAt(X, Y); - Result := (Node <> nil) and (GetInfoTip(Node.ItemId) <> ''); - end; - end; - -var - Node: TTreeNode; -begin - if HasInfoTip then - begin - with Message.HintInfo^ do - begin - Node := GetNodeAt(CursorPos.X, CursorPos.Y); - - CursorRect := Node.DisplayRect(True); - Windows.MapWindowPoints(Handle, 0, CursorRect, 2); - HintStr := GetInfoTip(Node.ItemId); - HintPos.Y := CursorRect.Top + Windows.GetSystemMetrics(SM_CYCURSOR); - HintPos.X := CursorRect.Left + Windows.GetSystemMetrics(SM_CXCURSOR); - HintMaxWidth := ClientWidth; - end; - Message.Result := 0; - end - else - inherited; -end; - -{ TdxPSExplorerTreeViewContainer } - -class function TdxPSExplorerTreeViewContainer.TreeViewClass: TCustomTreeViewClass; -begin - Result := TdxPSExplorerTreeView; -end; - -procedure TdxPSExplorerTreeViewContainer.InitializeTreeContainer; -begin - inherited; - TreeView.Container := Self; - TreeView.Flat := Host.Flat; - TreeView.OnCancelEdit := TreeCancelEdit; -end; - -function TdxPSExplorerTreeViewContainer.GetTreeView: TdxPSExplorerTreeView; -begin - Result := TdxPSExplorerTreeView(inherited TreeView) -end; - -initialization - TCustomdxPSExplorerTreeViewContainer.Register; - TdxPSExplorerTreeViewContainer.Register; - -finalization - TdxPSExplorerTreeViewContainer.Unregister; - TCustomdxPSExplorerTreeViewContainer.Unregister; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxCheckListBoxLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxCheckListBoxLnk.dfm deleted file mode 100644 index f4ab0890..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxCheckListBoxLnk.dfm +++ /dev/null @@ -1,554 +0,0 @@ -object cxfmCheckListBoxDesignWindow: TcxfmCheckListBoxDesignWindow - Left = 393 - Top = 324 - BorderStyle = bsDialog - Caption = 'cxfmCheckListBoxDesignWindow' - ClientHeight = 243 - ClientWidth = 553 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 3 - Width = 545 - Height = 204 - ActivePage = tshColor - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 6 - Top = 13 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 41 - Top = 17 - Width = 207 - Height = 4 - Shape = bsBottomLine - end - object lblMiscellaneous: TLabel - Left = 6 - Top = 82 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object Bevel4: TBevel - Left = 79 - Top = 86 - Width = 170 - Height = 4 - Shape = bsBottomLine - end - object Image5: TImage - Left = 10 - Top = 107 - Width = 32 - Height = 32 - Picture.Data = { - 055449636F6E0000010003001010000000000000680500003600000020200000 - 00000000A80800009E0500003030000000000000A80E0000460E000028000000 - 1000000020000000010008000000000040010000000000000000000000010000 - 00000000FFFFFF00000080000080800080800000C0C0C000C0DCC000F0CAA600 - 4080800040400000FF800000804000000040800080FFFF00FFFF8000FF808000 - 4080FF0081818100000081000081810081810000000033000000660000009900 - 0000CC0000333300003366000033FF000066CC000066FF000099FF0000CCCC00 - 3300330033006600330099003300CC0033330000333333003333660033339900 - 3333CC003333FF00336666003366990074CAFF003366FF003399000033993300 - 33996600339999003399CC003399FF0033CC330033CC990033CCCC0033CCFF00 - 33FFFF0066000000663300006633330066336600663399006633FF0066660000 - 6666330066666600666699006666CC0066990000669933006699660066999900 - 6699CC006699FF0066CC330066CC990066CCCC004CCEFF0066FF330066FFCC00 - 999900009933990099333300996600009966330099336600996699009966CC00 - 9999330099996600999999009999CC009999FF0099CC000099CC330066CC6600 - 99CC990099CCCC0099CCFF0099CC660099FF990099FFFF00CC009900CC333300 - CC336600CC339900CC660000CC66330099666600CC669900CC66CC00CC990000 - CC993300CC996600CC999900CC99CC00CC99FF00CCCC0000CCCC3300CCCC6600 - CCCC9900CCCCCC00CCCCFF00CCFF0000CCFF330099FF6600CCFF9900CCFFCC00 - CCFFFF00FF333300FF336600FF660000FF663300CC666600FF669900FF66CC00 - FF990000FF993300FF996600FF999900FF99CC00FF99FF00FFCC0000FFCC3300 - FFCC6600FFCC9900FFCCCC00FFCCFF00FFFF3300FFFF9900FFFFCC006666FF00 - 66FFFF00FFFF6600C1C1C1005F5F5F00777777008686860096969600CBCBCB00 - B2B2B200D7D7D700DDDDDD00E3E3E300EAEAEA00F1F1F100F8F8F800F0FBFF00 - A4A0A000808080000000FF0000FF0000FF00FF00FFFF00007AE9FF007D780000 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 00000000FFFFFFFFFFFFFFFF9B40FFFFFFFFFFFFFFFFFFFF9B9AFFFF4747FFFF - 9C40FFFFFF242424A7309A6B36369A9C3607FFFFFF789C9C4B36313636363636 - 36FFFFFFFFA2A09A9A4736364B290736079A9AFFFFA2A04B363636614B022936 - 363636FFFFA2A0A0613536644B02293624FFFFFFFFA2409F463636644B022936 - 0724FFFFFFA2409F0061780C4B02294636FFFFFFFFA2404040A078640C4B2924 - FFFFFFFFFFA2A0A0A0A09F9F4A789B24FFFFFFFFFFA2409F00A0787878789B24 - FFFFFFFFFFA2409F00A09F9F9F789B24FFFFFFFFFFA2404040A0787878789B24 - FFFFFFFFFFA2A0A0A0A0A0A0A0A09B24FFFFFFFFFFA2A2A2A2A2A2A2A2A2A29A - FFFFFFFFFF3FFFFFF333FFFF8003FFFF8007FFFF8001FFFF8001FFFF8007FFFF - 8003FFFF8007FFFF800FFFFF800FFFFF800FFFFF800FFFFF800FFFFF800FFFFF - 800FFFFF28000000200000004000000001000800000000008004000000000000 - 000000000001000000000000FFFFFF00000080000080800080800000C0C0C000 - C0DCC000F0CAA6004080800040400000FF800000804000000040800080FFFF00 - FFFF8000FF8080004080FF008181810000008100008181008181000000003300 - 00006600000099000000CC0000333300003366000033FF000066CC000066FF00 - 0099FF0000CCCC003300330033006600330099003300CC003333000033333300 - 33336600333399003333CC003333FF00336666003366990074CAFF003366FF00 - 339900003399330033996600339999003399CC003399FF0033CC330033CC9900 - 33CCCC0033CCFF0033FFFF006600000066330000663333006633660066339900 - 6633FF00666600006666330066666600666699006666CC006699000066993300 - 66996600669999006699CC006699FF0066CC330066CC990066CCCC004CCEFF00 - 66FF330066FFCC00999900009933990099333300996600009966330099336600 - 996699009966CC009999330099996600999999009999CC009999FF0099CC0000 - 99CC330066CC660099CC990099CCCC0099CCFF0099CC660099FF990099FFFF00 - CC009900CC333300CC336600CC339900CC660000CC66330099666600CC669900 - CC66CC00CC990000CC993300CC996600CC999900CC99CC00CC99FF00CCCC0000 - CCCC3300CCCC6600CCCC9900CCCCCC00CCCCFF00CCFF0000CCFF330099FF6600 - CCFF9900CCFFCC00CCFFFF00FF333300FF336600FF660000FF663300CC666600 - FF669900FF66CC00FF990000FF993300FF996600FF999900FF99CC00FF99FF00 - FFCC0000FFCC3300FFCC6600FFCC9900FFCCCC00FFCCFF00FFFF3300FFFF9900 - FFFFCC006666FF0066FFFF00FFFF6600C1C1C1005F5F5F007777770086868600 - 96969600CBCBCB00B2B2B200D7D7D700DDDDDD00E3E3E300EAEAEA00F1F1F100 - F8F8F800F0FBFF00A4A0A000808080000000FF0000FF0000FF00FF00FFFF0000 - 7AE9FF007D7800007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF409C40 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9B9AFFFFFF9B469B - FFFFFF9B4040FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9D9B9A9AFFFF473647 - FFFF9B9D9B9A9AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9D079A409A9B473647 - 9A9A9BA707079AFFFFFFFFFFFFFFFFFFFFFF24242424244B363107409B343647 - 9A404631353646FFFFFFFFFFFFFFFFFFFFFF789C9C9C9C4B3636363636363636 - 3636363635FFFFFFFFFFFFFFFFFFFFFFFFFFA1A09C409A9A4736363661616161 - 4C363635409A9AFFFFFFFFFFFFFFFFFFFFFFA1A040409A404636364C4B460229 - 4C363635409A9A9AFFFFFFFFFFFFFFFFFFFFA1A04C47303031364C644C4B3002 - 074C363636363635FFFFFFFFFFFFFFFFFFFFA1A0A061363636364C644C4B3002 - 29313636074747FFFFFFFFFFFFFFFFFFFFFFA140A1A3A007303636644C4B3002 - 2936362924FFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA20430353636644C4B3002 - 293636302924FFFFFFFFFFFFFFFFFFFFFFFFA1409F00A261364C60644C4B3002 - 294C35363607FFFFFFFFFFFFFFFFFFFFFFFFA1409F0000A16104A0644C4B3002 - 299A476135FFFFFFFFFFFFFFFFFFFFFFFFFFA1404040404004A0A06461644B30 - 079A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A078640C644B - 469A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A078A04A4A4A - A09A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA140A1A2A1A1A2A0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409F04A700A2A0A09F9F9F9F9F - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA7009DA2A0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA0A0A0A2A0A09F9F9F9F9F - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA140404040409CA0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A0A0A0A0 - A09A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2A2A2A2A2A2A2A2A2A2A2A2 - A2A19AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8FFFFFF38E3F - FFE18C1FFFE0001FFC00001FFC00007FFC00001FFC00000FFC00000FFC00001F - FC00007FFC00003FFC00003FFC00007FFC0001FFFC0001FFFC0001FFFC0001FF - FC0001FFFC0001FFFC0001FFFC0001FFFC0001FFFC0001FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFF2800000030000000600000000100080000000000 - 800A000000000000000000000001000000000000FFFFFF000000800000808000 - 80800000C0C0C000C0DCC000F0CAA6004080800040400000FF80000080400000 - 0040800080FFFF00FFFF8000FF8080004080FF00818181000000810000818100 - 818100000000330000006600000099000000CC0000333300003366000033FF00 - 0066CC000066FF000099FF0000CCCC003300330033006600330099003300CC00 - 333300003333330033336600333399003333CC003333FF003366660033669900 - 74CAFF003366FF00339900003399330033996600339999003399CC003399FF00 - 33CC330033CC990033CCCC0033CCFF0033FFFF00660000006633000066333300 - 66336600663399006633FF00666600006666330066666600666699006666CC00 - 669900006699330066996600669999006699CC006699FF0066CC330066CC9900 - 66CCCC004CCEFF0066FF330066FFCC0099990000993399009933330099660000 - 9966330099336600996699009966CC009999330099996600999999009999CC00 - 9999FF0099CC000099CC330066CC660099CC990099CCCC0099CCFF0099CC6600 - 99FF990099FFFF00CC009900CC333300CC336600CC339900CC660000CC663300 - 99666600CC669900CC66CC00CC990000CC993300CC996600CC999900CC99CC00 - CC99FF00CCCC0000CCCC3300CCCC6600CCCC9900CCCCCC00CCCCFF00CCFF0000 - CCFF330099FF6600CCFF9900CCFFCC00CCFFFF00FF333300FF336600FF660000 - FF663300CC666600FF669900FF66CC00FF990000FF993300FF996600FF999900 - FF99CC00FF99FF00FFCC0000FFCC3300FFCC6600FFCC9900FFCCCC00FFCCFF00 - FFFF3300FFFF9900FFFFCC006666FF0066FFFF00FFFF6600C1C1C1005F5F5F00 - 777777008686860096969600CBCBCB00B2B2B200D7D7D700DDDDDD00E3E3E300 - EAEAEA00F1F1F100F8F8F800F0FBFF00A4A0A000808080000000FF0000FF0000 - FF00FF00FFFF00007AE9FF007D7800007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F0000000000FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF409B9B - 40FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFF9B9B9B9BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C9B9AFFFFFFFF9B4646 - 9BFFFFFFFF9B4040FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFA79D9B9A9AFFFFFF47363647FFFFFF9B9D9B409AFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA79D079A9A9A409B473636 - 479A9A9B9D9D07079AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF24 - 2424242424A73636309A9A409B463636479A9A9B9D46353607FFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF789C9C9C9C9C4B36363631400746353636 - 479A9A073536363546FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A79D9D4C36363636363636363636363636363635FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A09C409A9A9A473636363661616161 - 614C36363635409A9A9AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0789B409A9A9A46363636614C460202294C363636359A9A9A9A9AFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A047463030303136364C614B4B3030 - 02074C3636363030303030FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A04C4C3636363636364C644C4B30300229313636363636363636FFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0616161616136364C0C4C4B3030 - 02293636363607474747FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09BA3A3A3A00730363636974C4B303002293636362924FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9FA2A2040707363636974C4B3030 - 0229363636302424FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09B9F000078303636364C0C4C4B303002294C4C36360724FFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9F0000A24C364C60780C4C4B3030 - 02299B4736363607FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09B9F000000A16178A0780C4C4B303002299B24476135FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9B9B9B9B9B04A0A078644C64604B - 30299B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A078647F0C4C4E4B079B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A07805640C0C4B - 4B469B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A07878784A4A4A4A789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A040A2A2A2A2A2A2A0A0787878787878 - 78789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0409F009D00A1A2A0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0409F9D789DA1A2A0A09F9F9F9F9F9F - 9F789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0409F00009DA1A2A0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0409FA0A0A0A0A2A0A09F9F9F9F9F9F - 9F789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A04040404040409CA0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A0787878787878 - 78789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A09B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2 - A2A2A29AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF87FFFFFFFFFFFFFF87FFFFFFFFFFFFC787 - 8FFFFFFFFFFF838707FFFFFFFFFF800007FFFFFFFFE0000007FFFFFFFFE00000 - 07FFFFFFFFE000001FFFFFFFFFE0000003FFFFFFFFE0000001FFFFFFFFE00000 - 01FFFFFFFFE0000001FFFFFFFFE0000003FFFFFFFFE000001FFFFFFFFFE00000 - 0FFFFFFFFFE000000FFFFFFFFFE000000FFFFFFFFFE000001FFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF} - end - object imgGrid: TImage - Left = 10 - Top = 33 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object chbxShowBorders: TCheckBox - Left = 95 - Top = 30 - Width = 147 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxOptionsClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 95 - Top = 52 - Width = 147 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxOptionsClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 95 - Top = 104 - Width = 147 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 2 - OnClick = chbxOptionsClick - end - object chbxRowAutoHeight: TCheckBox - Left = 95 - Top = 150 - Width = 147 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 4 - OnClick = chbxRowAutoHeightClick - end - object lblPreview: TStaticText - Left = 258 - Top = 2 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 5 - end - object chbxAutoWidth: TCheckBox - Left = 95 - Top = 127 - Width = 147 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 3 - OnClick = chbxAutoWidthClick - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 14 - Top = 143 - Width = 81 - Height = 13 - Caption = 'Grid Lines Color: ' - end - object bvlLineColorHolder: TBevel - Left = 98 - Top = 140 - Width = 126 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 6 - Top = 18 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - end - object gbxTransparent: TGroupBox - Left = 6 - Top = 47 - Width = 230 - Height = 82 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 9 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - end - object bvlColorHolder: TBevel - Left = 92 - Top = 20 - Width = 126 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 9 - Top = 52 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - end - object bvlEvenColorHolder: TBevel - Left = 92 - Top = 48 - Width = 126 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 19 - Top = 45 - Width = 15 - Height = 17 - TabOrder = 1 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 77 - Top = 13 - Width = 159 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 46 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 3 - OnClick = stTransparentClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 11 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 39 - Width = 230 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - Text = 'edFont' - end - object btnEvenFont: TButton - Tag = 1 - Left = 9 - Top = 71 - Width = 110 - Height = 23 - Caption = 'E&ven Font ...' - TabOrder = 2 - OnClick = btnFontClick - end - object edEvenFont: TEdit - Left = 9 - Top = 100 - Width = 230 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - Text = 'edFont' - end - end - end - end - object pnlPreview: TPanel - Left = 265 - Top = 46 - Width = 273 - Height = 150 - BevelOuter = bvLowered - BorderWidth = 1 - Color = clWindow - TabOrder = 1 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxCheckListBoxLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxCheckListBoxLnk.pas deleted file mode 100644 index ef087151..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxCheckListBoxLnk.pas +++ /dev/null @@ -1,790 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxCheckListBoxLnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, Messages, Controls, Graphics, StdCtrls, ExtCtrls, ComCtrls, - Dialogs, dxPSCore, dxPSForm, dxExtCtrls, dxPSBaseGridLnk, dxPSGrLnks, - cxCheckListBox, cxLookAndFeelPainters; - -type - TcxCheckListBoxReportLinkOption = (chlbxoBorder, chlbxoHorzLines, chlbxoFlatCheckMarks); - TcxCheckListBoxReportLinkOptions = set of TcxCheckListBoxReportLinkOption; - - TcxCustomCheckListBoxReportLink = class(TdxCustomListBoxReportLink) - private - FOptions: TcxCheckListBoxReportLinkOptions; - function GetcxCustomCheckListBox: TcxCustomCheckListBox; - procedure SetOptions(Value: TcxCheckListBoxReportLinkOptions); - - function IsFlatCheckMarks: Boolean; - protected - procedure AssignData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData); override; - //function GetCellColor(ACol, ARow: Integer): TColor; override; - function GetCellFontIndex(ACol, ARow: Integer): Integer; override; - function GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - function IsDrawBorder: Boolean; override; - function IsDrawHorzLines: Boolean; override; - procedure SetDrawMode(Value: TdxGridDrawMode); override; - - function GetCustomListBox: TCustomListBox; override; - - property cxCustomCheckListBox: TcxCustomCheckListBox read GetcxCustomCheckListBox; - public - procedure Assign(Source: TPersistent); override; - property Options: TcxCheckListBoxReportLinkOptions read FOptions write SetOptions - default [chlbxoBorder..chlbxoFlatCheckMarks]; - end; - - TcxCheckListBoxReportLink = class(TcxCustomCheckListBoxReportLink) - private - function GetCheckListBox: TcxCheckListBox; - public - property CheckListBox: TcxCheckListBox read GetCheckListBox; - published - property AutoWidth; - property Color; - property EndEllipsis; - property EvenColor; - property EvenFont; - property Font; - property Multiline; - property OddColor; - property OddFont; - property Options; - property RowAutoHeight; - property ScaleFonts; - property SupportedCustomDraw; - property Transparent; - property UseCustomPageBreaks; - property UseHorzDelimiters; - property UseVertDelimiters; - property Width; - - property OnCustomDrawItem; - property OnGetCustomPageBreaks; - property OnInitializeItem; - end; - - TcxfmCheckListBoxDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshOptions: TTabSheet; - pnlOptions: TPanel; - lblShow: TLabel; - Bevel11: TBevel; - lblMiscellaneous: TLabel; - Bevel4: TBevel; - Image5: TImage; - imgGrid: TImage; - chbxShowBorders: TCheckBox; - chbxShowHorzLines: TCheckBox; - chbxFlatCheckMarks: TCheckBox; - chbxRowAutoHeight: TCheckBox; - tshColor: TTabSheet; - pnlColor: TPanel; - lblGridLinesColor: TLabel; - bvlLineColorHolder: TBevel; - gbxTransparent: TGroupBox; - lblColor: TLabel; - bvlColorHolder: TBevel; - lblEvenColor: TLabel; - bvlEvenColorHolder: TBevel; - chbxTransparent: TCheckBox; - tshFont: TTabSheet; - pnlFont: TPanel; - btnFont: TButton; - edFont: TEdit; - btnEvenFont: TButton; - edEvenFont: TEdit; - pnlPreview: TPanel; - lblDrawMode: TLabel; - cbxDrawMode: TComboBox; - lblPreview: TStaticText; - chbxAutoWidth: TCheckBox; - stTransparent: TStaticText; - procedure ccbxColorChange(Sender: TObject); - procedure pbxPreviewPaint(Sender: TObject); - procedure cbxDrawModeClick(Sender: TObject); - procedure chbxOptionsClick(Sender: TObject); - procedure chbxRowAutoHeightClick(Sender: TObject); - procedure chbxTransparentClick(Sender: TObject); - procedure btnFontClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure cbxDrawModeDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure chbxAutoWidthClick(Sender: TObject); - procedure stTransparentClick(Sender: TObject); - private - FccbxColor: TdxPSColorCombo; - FccbxEvenColor: TdxPSColorCombo; - FccbxGridLineColor: TdxPSColorCombo; - FItemCount: Integer; - FPaintWidth: Integer; - FPaintHeight: Integer; - FPreviewBox: TCustomPanel; - FRectWidth: Integer; - FRectHeight: Integer; - procedure CreateControls; - function GetReportLink: TcxCustomCheckListBoxReportLink; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - public - constructor Create(AOwner: TComponent); override; - property ReportLink: TcxCustomCheckListBoxReportLink read GetReportLink; - end; - -const - cxDefaultCheckListBoxOptions = [chlbxoBorder, chlbxoHorzLines, chlbxoFlatCheckMarks]; - - cxCheckListBoxStrings: array[0..4] of string = - ('Sample Text Row #1', 'Sample Text Row #2', 'Sample Text Row #3', - 'Sample Text Row #4', 'Sample Text Row #5'); - -implementation - -{$R *.dfm} - -uses - SysUtils, Forms, cxClasses, cxLookAndFeels, cxCheckBox, dxPSRes, dxPSGlbl, - dxPSUtl, dxPrnDev, dxPScxEditorLnks; - -type - TcxCustomCheckListBoxAccess = class(TcxCustomCheckListBox); - -{ TdxCheckListBoxReportLink } - -procedure TcxCustomCheckListBoxReportLink.Assign(Source: TPersistent); -begin - if Source is TcxCustomCheckListBoxReportLink then - Options := TcxCustomCheckListBoxReportLink(Source).Options; - inherited; -end; - -procedure TcxCustomCheckListBoxReportLink.InternalRestoreDefaults; -begin - inherited; - Options := cxDefaultCheckListBoxOptions; -end; - -procedure TcxCustomCheckListBoxReportLink.InternalRestoreFromOriginal; -begin - inherited; - if TcxCustomCheckListBoxAccess(cxCustomCheckListBox).LookAndFeel.Kind = lfUltraFlat then - Options := Options + [chlbxoFlatCheckMarks] - else - Options := Options - [chlbxoFlatCheckMarks]; -end; - -function TcxCustomCheckListBoxReportLink.IsDrawBorder: Boolean; -begin - Result := chlbxoBorder in Options; -end; - -function TcxCustomCheckListBoxReportLink.IsDrawHorzLines: Boolean; -begin - Result := chlbxoHorzLines in Options; -end; - -procedure TcxCustomCheckListBoxReportLink.SetDrawMode(Value: TdxGridDrawMode); -begin - if Value > gdmOddEven then Value := gdmOddEven; - inherited; -end; - -function TcxCustomCheckListBoxReportLink.GetCustomListBox: TCustomListBox; -begin - if cxCustomCheckListBox <> nil then - Result := cxContainer_GetInnerControl(cxCustomCheckListBox) as TCustomListBox - else - Result := nil; -end; - -procedure TcxCustomCheckListBoxReportLink.AssignData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData); -begin - inherited; - with TdxReportCellCheckImage(ADataItem) do - begin - CheckPos := ccpLeft; - Checked := TcxCustomCheckListBoxAccess(cxCustomCheckListBox).Items[ARow].State > cbsUnchecked; - Enabled := (TcxCustomCheckListBoxAccess(cxCustomCheckListBox).Items[ARow].State < cbsGrayed) and - TcxCustomCheckListBoxAccess(cxCustomCheckListBox).Items[ARow].Enabled; - FlatBorder := IsFlatCheckMarks; - Glyph := TcxCustomCheckListBoxAccess(cxCustomCheckListBox).Glyph; - end; -end; - -{function TcxCustomCheckListBoxReportLink.GetCellColor(ACol, ARow: Integer): TColor; -begin - if TcxCustomCheckListBoxAccess(CustomCheckListBox).Header[ARow] then - Result := TcxCustomCheckListBoxAccess(CustomCheckListBox).HeaderBackgroundColor - else - Result := inherited GetCellColor(ACol, ARow); -end; } - -function TcxCustomCheckListBoxReportLink.GetCellFontIndex(ACol, ARow: Integer): Integer; -begin - Result := inherited GetCellFontIndex(ACol, ARow); -end; - -function TcxCustomCheckListBoxReportLink.GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; -begin - Result := TdxReportCellCheckImage; -end; - -function TcxCustomCheckListBoxReportLink.GetcxCustomCheckListBox: TcxCustomCheckListBox; -begin - Result := TcxCustomCheckListBox(Component); -end; - -procedure TcxCustomCheckListBoxReportLink.SetOptions(Value: TcxCheckListBoxReportLinkOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - LinkModified(True); - end; -end; - -function TcxCustomCheckListBoxReportLink.IsFlatCheckMarks: Boolean; -begin - Result := chlbxoFlatCheckMarks in Options; -end; - -{ TcxCheckListBoxReportLink } - -function TcxCheckListBoxReportLink.GetCheckListBox: TcxCheckListBox; -begin - Result := TcxCheckListBox(Component); -end; - -{ TcxfmCheckListBoxDesignWindow } - -constructor TcxfmCheckListBoxDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhcCheckListBoxReportLinkDesigner; - inherited Create(AOwner); - CreateControls; - FItemCount := 5; - FRectWidth := FPreviewBox.Width - 15; - FRectHeight := (FPreviewBox.Height - 15) div FItemCount; - FPaintWidth := FRectWidth + 1; - FPaintHeight := FItemCount * (FRectHeight + 1); - PageControl1.ActivePage := PageControl1.Pages[0]; -end; - -procedure TcxfmCheckListBoxDesignWindow.CreateControls; - - function CreateColorCombo(AHost: TBevel; ATag: Integer; AnOnChange: TNotifyEvent; - ALabel: TLabel): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with Result do - begin - BoundsRect := AHost.BoundsRect; - Tag := MakeTTag(ATag); - Parent := AHost.Parent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := dxDefaultColor; - OnChange := AnOnChange - end; - ALabel.FocusControl := Result; - end; - - function CreatePreviewPane(AHost: TWinControl; AnOnPaint: TNotifyEvent): TdxPSPaintPanel; - var - R: TRect; - begin - Result := TdxPSPaintPanel.Create(Self); - with Result do - begin - Parent := AHost; - R := AHost.BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - InflateRect(R, -1, -1); - BoundsRect := R; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := AnOnPaint - end; - end; - -begin - FccbxColor := CreateColorCombo(bvlColorHolder, 0, ccbxColorChange, lblColor); - FccbxEvenColor := CreateColorCombo(bvlEvenColorHolder, 1, ccbxColorChange, lblEvenColor); - FccbxGridLineColor := CreateColorCombo(bvlLineColorHolder, 2, ccbxColorChange, lblGridLinesColor); - - FPreviewBox := CreatePreviewPane(pnlPreview, pbxPreviewPaint); -end; - -procedure TcxfmCheckListBoxDesignWindow.DoInitialize; -begin - inherited; - - with cbxDrawMode do - ItemIndex := Items.IndexOfObject(TObject(ReportLink.DrawMode)); - chbxShowBorders.Checked := chlbxoBorder in ReportLink.Options; - chbxShowHorzLines.Checked := chlbxoHorzLines in ReportLink.Options; - chbxFlatCheckMarks.Checked := chlbxoFlatCheckMarks in ReportLink.Options; - chbxAutoWidth.Checked := ReportLink.AutoWidth; - chbxRowAutoHeight.Checked := ReportLink.RowAutoHeight; - - chbxTransparent.Checked := ReportLink.Transparent; - TdxPSColorCombo(FccbxColor).ColorValue := ReportLink.Color; - TdxPSColorCombo(FccbxEvenColor).ColorValue := ReportLink.EvenColor; - TdxPSColorCombo(FccbxGridLineColor).ColorValue := ReportLink.GridLineColor; - - FontInfoToText(ReportLink.Font, edFont); - FontInfoToText(ReportLink.EvenFont, edEvenFont); -end; - -{$IFDEF DELPHI7} -function TcxfmCheckListBoxDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TcxfmCheckListBoxDesignWindow.LoadStrings; -begin - inherited; - tshOptions.Caption := cxGetResourceString(@sdxOptions); - tshFont.Caption := cxGetResourceString(@sdxFonts); - tshColor.Caption := cxGetResourceString(@sdxColors); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblShow.Caption := cxGetResourceString(@sdxShow); - chbxShowBorders.Caption := cxGetResourceString(@sdxBorderLines); - chbxShowHorzLines.Caption := cxGetResourceString(@sdxHorzLines); - - lblMiscellaneous.Caption := cxGetResourceString(@sdxMiscellaneous); - chbxFlatCheckMarks.Caption := cxGetResourceString(@sdxFlatCheckMarks); - chbxAutoWidth.Caption := cxGetResourceSTring(@sdxAutoWidth); - chbxRowAutoHeight.Caption := cxGetResourceString(@sdxRowAutoHeight); - - lblDrawMode.Caption := cxGetResourceString(@sdxDrawMode); - - with cbxDrawMode.Items do - begin - BeginUpdate; - try - Clear; - AddObject(cxGetResourceString(@sdxDrawModeStrict), TObject(gdmStrict)); - AddObject(cxGetResourceString(@sdxDrawModeOddEven), TObject(gdmOddEven)); - finally - EndUpdate; - end; - end; - - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - lblEvenColor.Caption := cxGetResourceString(@sdxEvenColor); - lblGridLinesColor.Caption := cxGetResourceString(@sdxGridLinesColor); - - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - btnEvenFont.Caption := cxGetResourceString(@sdxBtnEvenFont); -end; - -procedure TcxfmCheckListBoxDesignWindow.UpdateControlsState; -begin - inherited UpdateControlsState; - FccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := FccbxColor.Enabled; - FccbxEvenColor.Enabled := not chbxTransparent.Checked and - (ReportLink.DrawMode in [gdmOddEven, gdmChess]); - lblEvenColor.Enabled := FccbxEvenColor.Enabled; - - btnEvenFont.Enabled := ReportLink.DrawMode in [gdmOddEven, gdmChess]; - if ReportLink.DrawMode in [gdmOddEven, gdmChess] then - begin - lblColor.Caption := cxGetResourceString(@sdxOddColor); - btnFont.Caption := cxGetResourceString(@sdxBtnOddFont); - end - else - begin - lblColor.Caption := cxGetResourceString(@sdxColor); - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - end; -end; - -procedure TcxfmCheckListBoxDesignWindow.UpdatePreview; -begin - FPreviewBox.Invalidate; -end; - -procedure TcxfmCheckListBoxDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -const - RowCount = 5; -type - TdxCheckRowViewInfo = record - State: TCheckBoxState; - Text: string; - Color: TColor; - Font: TFont; - Sides: TdxCellSides; - Rect: TRect; - BackgroundRect: TRect; - CheckRect: TRect; - TextRect: TRect; - end; - TdxCheckRowViewInfos = array of TdxCheckRowViewInfo; - - procedure CalculateViewInfos(out AViewInfos: TdxCheckRowViewInfos); - - procedure CalculateViewInfo(AnIndex: Integer; var AViewInfo: TdxCheckRowViewInfo); - const - States: array[0..RowCount - 1] of TCheckBoxState = (cbUnchecked, cbChecked, cbGrayed, cbUnchecked, cbChecked); - var - V: Integer; - begin - with AViewInfo do - begin - State := States[AnIndex]; - Text := cxCheckListBoxStrings[AnIndex]; - Color := ReportLink.GetCellColor(0, AnIndex); - - Font := TFont.Create; - Font.Assign(ReportLink.GetCellFont(0, AnIndex)); - Font.Size := 8; - - Sides := csAll; - if not ReportLink.IsDrawBorder then - begin - Sides := Sides - csLeftRight; - if AnIndex = 0 then Exclude(Sides, csTop); - if AnIndex > RowCount - 1 then Exclude(Sides, csBottom); - end; - if not ReportLink.IsDrawHorzLines then - begin - if AnIndex > 0 then Exclude(Sides, csTop); - if AnIndex > RowCount - 1 then Exclude(Sides, csBottom); - end; - - Rect := R; - InflateRect(Rect, -4, -4); - V := (Rect.Bottom - R.Top) div RowCount; - Inc(Rect.Top, (V - 1) * AnIndex); - if AnIndex <> RowCount - 1 then - Rect.Bottom := Rect.Top + V; - - BackgroundRect := Rect; - InflateRect(BackgroundRect, -1, -1); - - CheckRect := BackgroundRect; - InflateRect(CheckRect, 0, -(CheckRect.Bottom - CheckRect.Top - dxPSGlbl.CheckHeight) div 2); - Inc(CheckRect.Left, 2); - CheckRect.Right := CheckRect.Left + dxPSGlbl.CheckWidth; - - TextRect := BackgroundRect; - ACanvas.Font := Font; - V := ACanvas.TextHeight('Wq'); - InflateRect(TextRect, 0, -(TextRect.Bottom - TextRect.Top - V) div 2); - TextRect.Left := CheckRect.Right + 4; - end; - end; - - var - I: Integer; - begin - SetLength(AViewInfos, RowCount); - for I := 0 to RowCount - 1 do - CalculateViewInfo(I, AViewInfos[I]); - end; - - procedure DrawCheckRows(const AViewInfos: TdxCheckRowViewInfos); - - procedure DrawCheckRow(const AViewInfo: TdxCheckRowViewInfo); - - function GetSideRect(ASide: TdxCellSide): TRect; - begin - Result := AViewInfo.Rect; - with Result do - case ASide of - csLeft: - Right := Left + 1; - csTop: - Bottom := Top + 1; - csRight: - Left := Right - 1; - csBottom: - Top := Bottom - 1; - end; - end; - - procedure DrawSides; - var - Side: TdxCellSide; - begin - ACanvas.Brush.Style := bsSolid; - ACanvas.Brush.Color := ReportLink.GridLineColor; - - for Side := csLeft to csBottom do - if Side in AViewInfo.Sides then - ACanvas.FillRect(GetSideRect(Side)); - end; - - procedure DrawBackground; - begin - ACanvas.Brush.Style := bsSolid; - ACanvas.Brush.Color := AViewInfo.Color; - ACanvas.FillRect(AViewInfo.BackgroundRect); - end; - - procedure DrawCheck; - const - CheckStateMap: array[TCheckBoxState] of UINT = - (DFCS_BUTTONCHECK, DFCS_BUTTONCHECK or DFCS_CHECKED, DFCS_BUTTON3STATE or DFCS_CHECKED); - FlatBorderMap: array[Boolean] of UINT = (0, DFCS_FLAT); - var - uState: UINT; - begin - uState := DFCS_TRANSPARENT or CheckStateMap[AViewInfo.State] or FlatBorderMap[ReportLink.IsFlatCheckMarks]; - DrawFrameControl(ACanvas.Handle, AViewInfo.CheckRect, DFC_BUTTON, uState); - end; - - procedure DrawText; - var - R: TRect; - begin - ACanvas.Brush.Style := bsClear; - ACanvas.Font := AViewInfo.Font; - R := AViewInfo.TextRect; - ACanvas.TextRect(R, R.Left, R.Top, AViewInfo.Text); - end; - - begin - DrawSides; - if not ReportLink.Transparent then DrawBackground; - DrawCheck; - DrawText; - end; - - var - I: Integer; - begin - for I := 0 to RowCount - 1 do - DrawCheckRow(AViewInfos[I]); - end; - - procedure FreeViewInfos(var AViewInfos: TdxCheckRowViewInfos); - - procedure FreeViewInfo(var AViewInfo: TdxCheckRowViewInfo); - begin - FreeAndNil(AViewInfo.Font); - end; - - var - I: Integer; - begin - for I := 0 to RowCount - 1 do - FreeViewInfo(AViewInfos[I]); - SetLength(AViewInfos, 0); - end; - -var - ViewInfos: TdxCheckRowViewInfos; -begin - inherited; - ACanvas.Brush.Color := clWindow; - - CalculateViewInfos(ViewInfos); - try - DrawCheckRows(ViewInfos); - finally - FreeViewInfos(ViewInfos); - end; -end; - -procedure TcxfmCheckListBoxDesignWindow.ccbxColorChange(Sender: TObject); -var - Color: TColor; -begin - if LockControlsUpdate then Exit; - - Color := TdxPSColorCombo(Sender).ColorValue; - case TTagToInt(TdxPSColorCombo(Sender).Tag) of - 0: ReportLink.Color := Color; - 1: ReportLink.EvenColor := Color; - 2: ReportLink.GridLineColor := Color; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmCheckListBoxDesignWindow.pbxPreviewPaint(Sender: TObject); -begin - with TdxPSPaintPanel(Sender) do PaintPreview(Canvas, ClientRect); -end; - -procedure TcxfmCheckListBoxDesignWindow.cbxDrawModeClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - - with TComboBox(Sender) do - ReportLink.DrawMode := TdxGridDrawMode(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmCheckListBoxDesignWindow.cbxDrawModeDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - dxPSBaseGridLnk.dxPSDrawComboDrawModeItem(Control, Index, Rect, State); -end; - -procedure TcxfmCheckListBoxDesignWindow.chbxOptionsClick(Sender: TObject); -var - Option: TcxCheckListBoxReportLinkOption; -begin - if LockControlsUpdate then Exit; - - Option := TcxCheckListBoxReportLinkOption(TTagToInt(TCheckBox(Sender).Tag)); - - with ReportLink do - if TCheckBox(Sender).Checked then - Options := Options + [Option] - else - Options := Options - [Option]; - - Modified := True; - UpdatePreview; -end; - -procedure TcxfmCheckListBoxDesignWindow.chbxAutoWidthClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoWidth := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmCheckListBoxDesignWindow.chbxRowAutoHeightClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.RowAutoHeight := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmCheckListBoxDesignWindow.chbxTransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Transparent := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmCheckListBoxDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TcxfmCheckListBoxDesignWindow.btnFontClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with dxPSGlbl.FontDialog do - begin - case TTagToInt(TComponent(Sender).Tag) of - 0: Font := ReportLink.Font; - 1: Font := ReportLink.EvenFont; - end; - - if Execute then - begin - case TTagToInt(TComponent(Sender).Tag) of - 0: - begin - ReportLink.Font := Font; - FontInfoToText(ReportLink.Font, edFont); - end; - 1: - begin - ReportLink.EvenFont := Font; - FontInfoToText(ReportLink.EvenFont, edEvenFont); - end; - end; - Modified := True; - UpdatePreview; - end; - end; -end; - -function TcxfmCheckListBoxDesignWindow.GetReportLink: TcxCustomCheckListBoxReportLink; -begin - Result := inherited ReportLink as TcxCustomCheckListBoxReportLink; -end; - -procedure TcxfmCheckListBoxDesignWindow.CMDialogChar(var Message: TCMDialogChar); -var - I: Integer; -begin - with PageControl1 do - for I := 0 to PageControl1.PageCount - 1 do - if IsAccel(Message.CharCode, Pages[I].Caption) then - begin - Message.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TcxfmCheckListBoxDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreview.Parent := TpageControl(Sender).ActivePage; -end; - -initialization - dxPSRegisterReportLink(TcxCheckListBoxReportLink, TcxCheckListBox, TcxfmCheckListBoxDesignWindow); - -finalization - dxPSUnregisterReportLink(TcxCheckListBoxReportLink, TcxCheckListBox, TcxfmCheckListBoxDesignWindow); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxCommon.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxCommon.pas deleted file mode 100644 index 89332360..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxCommon.pas +++ /dev/null @@ -1,4689 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxCommon; - -{$I cxVer.inc} - -interface - -uses - Classes, Windows, Messages, Graphics, Controls, StdCtrls, ExtCtrls, ImgList, - Dialogs, ExtDlgs, cxClasses, cxControls, cxGraphics, cxLookAndFeels, cxStyles, - cxLookAndFeelPainters, cxEdit, cxTextEdit, cxMemo, cxCheckBox, cxRadioGroup, - cxBlobEdit, cxGroupBox, cxImage, cxImageComboBox, cxHyperLinkEdit, cxCurrencyEdit, - dxPSGlbl, dxBase, dxPSCore, dxPSRes, cxDrawTextUtils, dxCore; - -type - TdxCustomcxControlReportLink = class; - TdxCustomTableControlReportLink = class; - TdxfmCustomcxControlReportLinkDesignWindow = class; - - TdxReportItemViewParams = record - CellSides: TdxCellSides; - FontSize: Integer; - FontStyle: TFontStyles; - Transparent: Boolean; - NativeParams: TcxViewParams; - end; - - - IdxPSCellParams = interface - ['{F0A495A1-1F0F-4245-A437-16E21ACF9FED}'] - function GetAutoHeight: Boolean; - function GetDC: HDC; - function GetDisplayGraphicsAsText: Boolean; - function GetEndEllipsis: Boolean; - function GetFlatCheckMarks: Boolean; - function GetGraphicsText: string; - function GetMultiline: Boolean; - function GetTransparentGraphics: Boolean; - - property AutoHeight: Boolean read GetAutoHeight; - property DC: HDC read GetDC; - property DisplayGraphicsAsText: Boolean read GetDisplayGraphicsAsText; - property EndEllipsis: Boolean read GetEndEllipsis; - property FlatCheckMarks: Boolean read GetFlatCheckMarks; - property GraphicsText: string read GetGraphicsText; - property Multiline: Boolean read GetMultiline; - property TransparentGraphics: Boolean read GetTransparentGraphics; - end; - - IdxPSCellParams2 = interface - ['{09EAB051-1AC2-46FB-A7F4-D6BFA883D015}'] - function GetPreviewMarginLeft: Integer; - function GetPreviewMarginRight: Integer; - function GetPreviewMaxHeight: Integer; - function GetPreviewMaxLineCount: Integer; - function GetRichEditGraphicClass: TGraphicClass; - function GetRichEditTransparent: Boolean; - - property PreviewMarginLeft: Integer read GetPreviewMarginLeft; - property PreviewMarginRight: Integer read GetPreviewMarginRight; - property PreviewMaxHeight: Integer read GetPreviewMaxHeight; - property PreviewMaxLineCount: Integer read GetPreviewMaxLineCount; - property RichEditGraphicClass: TGraphicClass read GetRichEditGraphicClass; - property RichEditTransparent: Boolean read GetRichEditTransparent; - end; - - { Data Maps } - - TdxPSDataMapClass = class of TdxPSCustomDataMap; - - TdxPSDataMaps = class(TdxCustomClassMaps) - private - function GetMapClass(Properties: TcxCustomEditProperties): TdxPSDataMapClass; - public - class function Instance: TdxPSDataMaps; reintroduce; overload; - - function DoesItemParticipateInAutoHeightCalculation(AProperties: TcxCustomEditProperties): Boolean; - function DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; - function DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; - procedure GetImageLists(AProperties: TcxCustomEditProperties; AProc: TdxPSGetImageListProc); - procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); - function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; - function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; - property MapClasses[Properties: TcxCustomEditProperties]: TdxPSDataMapClass read GetMapClass; default; - end; - - TdxPSCustomDataMap = class(TdxCustomClassMapItem) - protected - class function DoesItemParticipateInAutoHeightCalculation(AProperties: TcxCustomEditProperties): Boolean; virtual; - class function DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; virtual; - class function DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; virtual; - class procedure GetImageLists(AProperties: TcxCustomEditProperties; AProc: TdxPSGetImageListProc); virtual; - class function GetText(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): string; virtual; - class function HasText(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): Boolean; virtual; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); virtual; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; virtual; - class function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; virtual; - class function PropertiesClass: TcxCustomEditPropertiesClass; virtual; - public - class function PairClass: TClass; override; - - class procedure Register; - class procedure Unregister; - end; - - TdxPSTextDataMap = class(TdxPSCustomDataMap) - protected - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSMemoDataMap = class(TdxPSTextDataMap) - protected - class function DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class function DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSHyperLinkDataMap = class(TdxPSTextDataMap) - protected - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSCheckDataMap = class(TdxPSCustomDataMap) - protected - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSCustomButtonGroupDataMap = class(TdxPSCustomDataMap) - protected - class function ButtonGroupClass(AProperties: TcxCustomEditProperties): TdxCustomReportButtonGroupClass; virtual; - class procedure InitializeGroupButton(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; AButton: TdxCustomReportCellCheck; AnIndex: Integer); virtual; - - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSRadioButtonGroupDataMap = class(TdxPSCustomButtonGroupDataMap) - protected - class function ButtonGroupClass(AProperties: TcxCustomEditProperties): TdxCustomReportButtonGroupClass; override; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSGraphicDataMap = class(TdxPSCustomDataMap) - protected - class function DoesItemParticipateInAutoHeightCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class function DefaultGraphicClass: TGraphicClass; virtual; - class function GetGraphic(AProperties: TcxCustomEditProperties; AGraphicClass: TGraphicClass; - const AValue: TcxEditValue): TGraphic; virtual; - class function GetGraphicClass(AProperties: TcxCustomEditProperties; ARecordIndex: Integer; AOwner: TObject = nil): TGraphicClass; virtual; - class function HasGraphic(const AValue: TcxEditValue): Boolean; virtual; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSGraphicAsTextDataMap = class(TdxPSCustomDataMap) - protected - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSImageDataMap = class(TdxPSTextDataMap) - protected - class function DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class function GetComboBoxItem(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): TcxImageComboBoxItem; virtual; - class function GetImageIndex(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): Integer; virtual; - class procedure GetImageLists(AProperties: TcxCustomEditProperties; AProc: TdxPSGetImageListProc); override; - class function GetImages(AProperties: TcxCustomEditProperties): TCustomImageList; virtual; - class function GetText(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): string; override; - class function HasImages(AProperties: TcxCustomEditProperties): Boolean; virtual; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - class function IsMultilinedText(AProperties: TcxCustomEditProperties): Boolean; virtual; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSDelegateDataMap = class(TdxPSCustomDataMap) - protected - class function DataMapClass(AProperties: TcxCustomEditProperties): TdxPSDataMapClass; virtual; - class function DoesItemParticipateInAutoHeightCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class function DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class function DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class procedure GetImageLists(AProperties: TcxCustomEditProperties; AProc: TdxPSGetImageListProc); override; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; override; - end; - - TdxPSBlobDataMap = class(TdxPSDelegateDataMap) - protected - class function DataMapClass(AProperties: TcxCustomEditProperties): TdxPSDataMapClass; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSBlobDefaultDataMap = class(TdxPSTextDataMap) - protected - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - end; - - TdxPSBlobTextDataMap = class(TdxPSTextDataMap) - protected - class function DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class function DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - end; - - TdxPSBlobPictureDataMap = class(TdxPSCustomDataMap) - protected - class procedure GetImageLists(AProperties: TcxCustomEditProperties; AProc: TdxPSGetImageListProc); override; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); override; - class function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - end; - - { Extra ReportItems } - - TdxReportCellPreviewText = class(TdxReportCellString) - private - FMaxLineCount: Integer; - FRightIndent: Integer; - function GetLeftIndent: Integer; - procedure SetLeftIndent(Value: Integer); - procedure SetMaxLineCount(Value: Integer); - procedure SetRightIndent(Value: Integer); - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - procedure Assign(Source: TPersistent); override; - - procedure DrawText(DC: HDC); override; - - property LeftIndent: Integer read GetLeftIndent write SetLeftIndent; - property MaxLineCount: Integer read FMaxLineCount write SetMaxLineCount; - property PreventLeftTextExceed; - property PreventTopTextExceed; - property RightIndent: Integer read FRightIndent write SetRightIndent; - property TextAlignX; - property TextAlignY; - end; - - IdxReportLinkOptionsDesignerSupport = interface - ['{98EBA10A-01A5-4011-ABA0-C52CE12F5553}'] - procedure DesignerFinalize; - procedure DesignerInitialize; - function DesignerTabIndex: Integer; - end; - - { ReportLink Styles and StyleSheets } - - TdxCustomReportLinkStylesClass = class of TdxCustomReportLinkStyles; - - TdxCustomReportLinkStyles = class(TcxStyles, IdxReportLinkOptionsDesignerSupport) - private - function GetReportLink: TdxCustomcxControlReportLink; - protected - {IdxReportLinkOptionsDesignerSupport} - procedure DesignerFinalize; virtual; - procedure DesignerInitialize; virtual; - function DesignerTabIndex: Integer; virtual; - - procedure Changed(AIndex: Integer); override; - - procedure GetDefaultViewParamsByCaption(const ACaption: string; AData: Pointer; - out AParams: TcxViewParams); virtual; - class function GetStyleCaption(AnIndex: Integer): string; virtual; - function GetStyleByCaption(const Caption: string): TcxStyle; virtual; - function GetStyleIndexByCaption(const Caption: string): Integer; virtual; abstract; - procedure SetStyleByCaption(const Caption: string; Value: TcxStyle); virtual; - - property StyleIndexesByCaption[const Caption: string]: Integer read GetStyleIndexByCaption; - public - property ReportLink: TdxCustomcxControlReportLink read GetReportLink; - property StylesByCaption[const Caption: string]: TcxStyle read GetStyleByCaption write SetStyleByCaption; - end; - - TdxCustomReportLinkStyleSheetClass = class of TdxCustomReportLinkStyleSheet; - - TdxCustomReportLinkStyleSheet = class(TcxCustomStyleSheet) - public - class procedure Register; - class procedure Unregister; - end; - - { ReportLink Options } - - TdxCustomReportLinkOptionsClass = class of TdxCustomReportLinkOptions; - - TdxCustomReportLinkOptions = class(TPersistent, IUnknown, IdxReportLinkOptionsDesignerSupport) - private - FReportLink: TdxCustomcxControlReportLink; - protected - { IUnknown } - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - function QueryInterface(const IID: TGUID; out Obj): HRESULT; virtual; stdcall; - { IdxReportLinkOptionsDesignerSupport } - procedure DesignerFinalize; virtual; - procedure DesignerInitialize; virtual; - function DesignerTabIndex: Integer; virtual; - - procedure Changed; virtual; - procedure Notification(AComponent: TComponent; AOperation: TOperation); virtual; - - procedure CreateObjects; virtual; - procedure DestroyObjects; virtual; - - procedure DesignerModified; - public - constructor Create(AReportLink: TdxCustomcxControlReportLink); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; virtual; - property ReportLink: TdxCustomcxControlReportLink read FReportLink; - end; - - TdxCustomReportLinkOptionsExpandingClass = class of TdxCustomReportLinkOptionsExpanding; - - TdxCustomReportLinkOptionsExpanding = class(TdxCustomReportLinkOptions) - end; - - TdxCustomReportLinkOptionsFormattingClass = class of TdxCustomReportLinkOptionsFormatting; - - TdxCustomReportLinkOptionsFormatting = class(TdxCustomReportLinkOptions) - private - FGridLineColor: TColor; - FLookAndFeelKind: TcxLookAndFeelKind; - FSuppressBackgroundBitmaps: Boolean; - FUseLookAndFeelColors: Boolean; - FUseNativeStyles: Boolean; - procedure SetGridLineColor(Value: TColor); - procedure SetLookAndFeelKind(Value: TcxLookAndFeelKind); - procedure SetSuppressBackgroundBitmaps(Value: Boolean); - procedure SetUseLookAndFeelColors(Value: Boolean); - procedure SetUseNativeStyles(Value: Boolean); - protected - property UseLookAndFeelColors: Boolean read FUseLookAndFeelColors write SetUseLookAndFeelColors default False; // affects only in WinXP themed environment - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property GridLineColor: TColor read FGridLineColor write SetGridLineColor default clDefault; - property LookAndFeelKind: TcxLookAndFeelKind read FLookAndFeelKind write SetLookAndFeelKind default lfUltraFlat; - property SuppressBackgroundBitmaps: Boolean read FSuppressBackgroundBitmaps write SetSuppressBackgroundBitmaps default False; - property UseNativeStyles: Boolean read FUseNativeStyles write SetUseNativeStyles default False; - end; - - TdxCustomReportLinkOptionsPaginationClass = class of TdxCustomReportLinkOptionsPagination; - - TdxCustomReportLinkOptionsPagination = class(TdxCustomReportLinkOptions) - end; - - TdxCustomReportLinkOptionsRefinementsClass = class of TdxCustomReportLinkOptionsRefinements; - - TdxCustomReportLinkOptionsRefinements = class(TdxCustomReportLinkOptions) - private - FDisplayGraphicsAsText: Boolean; - FFlatCheckMarks: Boolean; - FGraphicsText: string; - FIsGraphicsTextAssigned: Boolean; - FTransparentGraphics: Boolean; - {$IFDEF DXVER500} - FTransparentRichEdits: Boolean; - {$ENDIF} - function GetGraphicsText: string; - function IsGraphicsTextStored: Boolean; - procedure SetDisplayGraphicsAsText(Value: Boolean); - procedure SetFlatCheckMarks(Value: Boolean); - procedure SetGraphicsText(const Value: string); - procedure SetTransparentGraphics(Value: Boolean); - {$IFDEF DXVER500} - procedure SetTransparentRichEdits(Value: Boolean); - {$ENDIF} - procedure ReadIsGraphicsTextAssigned(Reader: TReader); - procedure WriteIsGraphicsTextAssigned(Writer: TWriter); - protected - procedure DefineProperties(Filer: TFiler); override; - public - procedure Assign(Source: TPersistent); override; - function DefaultGraphicsText: string; virtual; - procedure RestoreDefaults; override; - published - property DisplayGraphicsAsText: Boolean read FDisplayGraphicsAsText write SetDisplayGraphicsAsText default False; - property FlatCheckMarks: Boolean read FFlatCheckMarks write SetFlatCheckMarks default True; - property GraphicsText: string read GetGraphicsText write SetGraphicsText stored IsGraphicsTextStored; - property TransparentGraphics: Boolean read FTransparentGraphics write SetTransparentGraphics default False; - {$IFDEF DXVER500} - property TransparentRichEdits: Boolean read FTransparentRichEdits write SetTransparentRichEdits default False; // you can expect slow painting when True - {$ENDIF} - end; - - TdxCustomReportLinkOptionsSizeClass = class of TdxCustomReportLinkOptionsSize; - - TdxCustomReportLinkOptionsSize = class(TdxCustomReportLinkOptions) - private - FAutoWidth: Boolean; - procedure SetAutoWidth(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property AutoWidth: Boolean read FAutoWidth write SetAutoWidth default False; - end; - - TdxCustomReportLinkOptionsViewClass = class of TdxCustomReportLinkOptionsView; - - TdxCustomReportLinkOptionsView = class(TdxCustomReportLinkOptions) - end; - - { ReportLink } - - TdxStyleSheetHasCaptionProc = function(const ACaption: string): Boolean of object; - - TdxCustomcxControlReportLink = class(TBasedxReportLink) - private - FDelimitersHorz: TList; - FDelimitersVert: TList; - FDesignerTabIndex: Integer; - FImageLists: TList; - FOptions: TList; - FOptionsExpanding: TdxCustomReportLinkOptionsExpanding; - FOptionsFormatting: TdxCustomReportLinkOptionsFormatting; - FOptionsPagination: TdxCustomReportLinkOptionsPagination; - FOptionsRefinements: TdxCustomReportLinkOptionsRefinements; - FOptionsSize: TdxCustomReportLinkOptionsSize; - FOptionsView: TdxCustomReportLinkOptionsView; - FScreenDC: HDC; - FStyleRepository: TcxStyleRepository; - FStyles: TdxCustomReportLinkStyles; - FSupportedCustomDraw: Boolean; - function GetActiveStyles: TdxCustomReportLinkStyles; - function GetDesignWindow: TdxfmCustomcxControlReportLinkDesignWindow; - function GetEffects3D: Boolean; - function GetImageList(Index: Integer): TCustomImageList; - function GetImageListCount: Integer; - function GetOptions(Index: Integer): TdxCustomReportLinkOptions; - function GetOptionsCount: Integer; - function GetSoft3D: Boolean; - procedure SetOptionsExpanding(Value: TdxCustomReportLinkOptionsExpanding); - procedure SetOptionsFormatting(Value: TdxCustomReportLinkOptionsFormatting); - procedure SetOptionsPagination(Value: TdxCustomReportLinkOptionsPagination); - procedure SetOptionsRefinements(Value: TdxCustomReportLinkOptionsRefinements); - procedure SetOptionsSize(Value: TdxCustomReportLinkOptionsSize); - procedure SetOptionsView(Value: TdxCustomReportLinkOptionsView); - procedure SetStyleRepository(Value: TcxStyleRepository); - procedure SetStyles(Value: TdxCustomReportLinkStyles); - procedure SetSupportedCustomDraw(Value: Boolean); - protected - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - - procedure BeforeDesignReport; override; - procedure ConvertCoords; override; - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InternalRestoreDefaults; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - procedure MakeDelimiters(AReportCells: TdxReportCells; AHorzDelimiters, AVertDelimiters: TList); override; - - procedure AddHorizontalDelimiter(ADelimiter: TdxReportCell); overload; - procedure AddHorizontalDelimiter(ADelimiter: Integer); overload; - procedure AddVerticalDelimiter(ADelimiter: TdxReportCell); overload; - procedure AddVerticalDelimiter(ADelimiter: Integer); overload; - - procedure CreateOptions; virtual; - procedure DestroyOptions; virtual; - function GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; virtual; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; virtual; - function GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; virtual; - function GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; virtual; - function GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; virtual; - function GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; virtual; - procedure OptionsChanged(AnOptions: TdxCustomReportLinkOptions); virtual; - - procedure AddOptions(AnOptions: TdxCustomReportLinkOptions); - procedure NotifyOptions(AComponent: TComponent; AOperation: TOperation); - procedure RemoveOptions(AnOptions: TdxCustomReportLinkOptions); - - procedure AppendImageList(AnImageList: TCustomImageList); - function CanCreateComponent: Boolean; - procedure ConvertDelimiters(ADelimiters: TList); - function CreateStyle(const ACaption: string): TcxStyle; - function CreateStyleRepository: TcxStyleRepository; - function CreateStyleSheet(APrototype: TcxCustomStyleSheet; - const ACaption: string; AUseStyles: Boolean): TdxCustomReportLinkStyleSheet; - function FindStyleRepositoryInStyles(AStyles: TcxStyles): TcxStyleRepository; - function GetChildComponentOwner: TComponent; - function GetStyleConsumerCount(AStyle: TcxStyle): Integer; - function GetStyleRepository: TcxStyleRepository; virtual; - function GetStyleSheetCaption(ACheckProc: TdxStyleSheetHasCaptionProc; var ACaption: string): Boolean; - function InitiateStyle(const ACaption: string; var AStyle: TcxStyle; AForceCreation: Boolean): Boolean; - procedure StyleRestoreDefaults(const ACaption: string; AStyle: TcxStyle); - procedure StyleChanged(const ACaption: string; AStyle: TcxStyle); virtual; - - function GetAreNativeStylesAvailable: Boolean; virtual; - function GetStylesClass: TdxCustomReportLinkStylesClass; virtual; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; virtual; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; virtual; - - procedure PrepareConstruct; virtual; - procedure UnprepareConstruct; virtual; - - property ActiveStyles: TdxCustomReportLinkStyles read GetActiveStyles; - property AreNativeStylesAvailable: Boolean read GetAreNativeStylesAvailable; - property DelimitersHorz: TList read FDelimitersHorz; - property DelimitersVert: TList read FDelimitersVert; - property DesignerTabIndex: Integer read FDesignerTabIndex write FDesignerTabIndex; - property Effects3D: Boolean read GetEffects3D; - property ImageListCount: Integer read GetImageListCount; - property ImageLists[Index: Integer]: TCustomImageList read GetImageList; - property Options[Index: Integer]: TdxCustomReportLinkOptions read GetOptions; - property OptionsCount: Integer read GetOptionsCount; - property ScreenDC: HDC read FScreenDC; - property Soft3D: Boolean read GetSoft3D; - property StyleRepository: TcxStyleRepository read FStyleRepository write SetStyleRepository; - property Styles: TdxCustomReportLinkStyles read FStyles write SetStyles; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - property DesignWindow: TdxfmCustomcxControlReportLinkDesignWindow read GetDesignWindow; - property OptionsExpanding: TdxCustomReportLinkOptionsExpanding read FOptionsExpanding write SetOptionsExpanding; - property OptionsFormatting: TdxCustomReportLinkOptionsFormatting read FOptionsFormatting write SetOptionsFormatting; - property OptionsPagination: TdxCustomReportLinkOptionsPagination read FOptionsPagination write SetOptionsPagination; - property OptionsRefinements: TdxCustomReportLinkOptionsRefinements read FOptionsRefinements write SetOptionsRefinements; - property OptionsSize: TdxCustomReportLinkOptionsSize read FOptionsSize write SetOptionsSize; - property OptionsView: TdxCustomReportLinkOptionsView read FOptionsView write SetOptionsView; - property SupportedCustomDraw: Boolean read FSupportedCustomDraw write SetSupportedCustomDraw default False; - end; - - { TableReportLink Options } - - TdxCustomTableControlReportLinkOptionsClass = class of TdxCustomTableControlReportLinkOptions; - - TdxCustomTableControlReportLinkOptions = class(TdxCustomReportLinkOptions) - private - function GetReportLink: TdxCustomTableControlReportLink; - public - property ReportLink: TdxCustomTableControlReportLink read GetReportLink; - end; - - TdxCustomTableControlReportLinkOptionsOnEveryPageClass = class of TdxCustomTableControlReportLinkOptionsOnEveryPage; - - TdxCustomTableControlReportLinkOptionsOnEveryPage = class(TdxCustomTableControlReportLinkOptions) - private - FBandHeaders: Boolean; - FFooters: Boolean; - FHeaders: Boolean; - procedure SetBandHeaders(Value: Boolean); - procedure SetFooters(Value: Boolean); - procedure SetHeaders(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property BandHeaders: Boolean read FBandHeaders write SetBandHeaders default True; - property Footers: Boolean read FFooters write SetFooters default True; - property Headers: Boolean read FHeaders write SetHeaders default True; - end; - - TdxCustomTableControlReportLinkOptionsPaginationClass = class of TdxCustomTableControlReportLinkOptionsPagination; - - TdxCustomTableControlReportLinkOptionsPagination = class(TdxCustomReportLinkOptionsPagination) - private - FBand: Boolean; - FCustom: Boolean; - function GetColumn: Boolean; - function GetRow: Boolean; - procedure SetBand(Value: Boolean); - procedure SetColumn(Value: Boolean); - procedure SetCustom(Value: Boolean); - procedure SetRow(Value: Boolean); - protected - property Band: Boolean read FBand write SetBand default False; - property Row: Boolean read GetRow write SetRow default True; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property Column: Boolean read GetColumn write SetColumn default True; - property Custom: Boolean read FCustom write SetCustom default False; - end; - - TdxCustomTableControlReportLinkOptionsPreviewClass = class of TdxCustomTableControlReportLinkOptionsPreview; - - TdxCustomTableControlReportLinkOptionsPreview = class(TdxCustomTableControlReportLinkOptions) - private - FAutoHeight: Boolean; - FMaxLineCount: Integer; - FVisible: Boolean; - procedure SetAutoHeight(Value: Boolean); - procedure SetMaxLineCount(Value: Integer); - procedure SetVisible(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property AutoHeight: Boolean read FAutoHeight write SetAutoHeight default True; - property MaxLineCount: Integer read FMaxLineCount write SetMaxLineCount default 0; - property Visible: Boolean read FVisible write SetVisible default True; - end; - - TdxCustomTableControlReportLinkOptionsSelectionClass = class of TdxCustomTableControlReportLinkOptionsSelection; - - TdxCustomTableControlReportLinkOptionsSelection = class(TdxCustomTableControlReportLinkOptions) - private - FProcessExactSelection: Boolean; - FProcessSelection: Boolean; - procedure SetProcessExactSelection(Value: Boolean); - procedure SetProcessSelection(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property ProcessExactSelection: Boolean read FProcessExactSelection write SetProcessExactSelection default False; - property ProcessSelection: Boolean read FProcessSelection write SetProcessSelection default False; - end; - - TdxCustomTableControlReportLinkOptionsViewClass = class of TdxCustomTableControlReportLinkOptionsView; - - TdxCustomTableControlReportLinkOptionsView = class(TdxCustomReportLinkOptionsView) - private - FBandHeaders: Boolean; - FExpandButtons: Boolean; - FFooters: Boolean; - FHeaders: Boolean; - procedure SetBandHeaders(Value: Boolean); - procedure SetExpandButtons(Value: Boolean); - procedure SetFooters(Value: Boolean); - procedure SetHeaders(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property BandHeaders: Boolean read FBandHeaders write SetBandHeaders default True; - property ExpandButtons: Boolean read FExpandButtons write SetExpandButtons default True; - published - property Footers: Boolean read FFooters write SetFooters default True; - property Headers: Boolean read FHeaders write SetHeaders default True; - end; - - { ReportLink } - - TdxCustomTableControlReportLink = class(TdxCustomcxControlReportLink) - private - FOptionsOnEveryPage: TdxCustomTableControlReportLinkOptionsOnEveryPage; - FOptionsPreview: TdxCustomTableControlReportLinkOptionsPreview; - FOptionsSelection: TdxCustomTableControlReportLinkOptionsSelection; - function GetOptionsPagination: TdxCustomTableControlReportLinkOptionsPagination; - function GetOptionsView: TdxCustomTableControlReportLinkOptionsView; - procedure SetOptionsOnEveryPage(Value: TdxCustomTableControlReportLinkOptionsOnEveryPage); - procedure SetOptionsPagination(Value: TdxCustomTableControlReportLinkOptionsPagination); - procedure SetOptionsPreview(Value: TdxCustomTableControlReportLinkOptionsPreview); - procedure SetOptionsSelection(Value: TdxCustomTableControlReportLinkOptionsSelection); - procedure SetOptionsView(Value: TdxCustomTableControlReportLinkOptionsView); - protected - procedure InternalRestoreDefaults; override; - - procedure CreateOptions; override; - procedure DestroyOptions; override; - function GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; virtual; - function GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; override; - function GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; virtual; - function GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; virtual; - function GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; override; - public - procedure Assign(Source: TPersistent); override; - property OptionsOnEveryPage: TdxCustomTableControlReportLinkOptionsOnEveryPage read FOptionsOnEveryPage write SetOptionsOnEveryPage; - property OptionsPagination: TdxCustomTableControlReportLinkOptionsPagination read GetOptionsPagination write SetOptionsPagination; - property OptionsPreview: TdxCustomTableControlReportLinkOptionsPreview read FOptionsPreview write SetOptionsPreview; - property OptionsSelection: TdxCustomTableControlReportLinkOptionsSelection read FOptionsSelection write SetOptionsSelection; - property OptionsView: TdxCustomTableControlReportLinkOptionsView read GetOptionsView write SetOptionsView; - end; - - { Design Window } - - TdxfmCustomcxControlReportLinkDesignWindow = class(TStandarddxReportLinkDesignWindow) - private - function GetActiveStyleSheet: TcxCustomStyleSheet; - function GetAreNativeStylesAvailable: Boolean; - function GetReportLink: TdxCustomcxControlReportLink; - function GetStyleRepository: TcxStyleRepository; - procedure SetActiveStyleSheet(Value: TcxCustomStyleSheet); - procedure WMActivate(var message: TWMActivate); message WM_ACTIVATE; - protected - procedure DoInitialize; override; - - function CanCopyStyleSheet: Boolean; virtual; - function CanCreateStyleSheet: Boolean; virtual; - function CanDeleteStyleSheet: Boolean; virtual; - function CanRenameStyleSheet: Boolean; virtual; - function CanSaveStyles: Boolean; virtual; - - function PerformStyleSheetCopy: Boolean; - function PerformStyleSheetDelete: Boolean; - procedure PerformStyleSheetDrawItem(ACanvas: TCanvas; AnIndex: Integer; - R: TRect; AState: TOwnerDrawState; AEnabled: Boolean); - function PerformStyleSheetKeyDown(Sender: TObject; var AKey: Word; - AShift: TShiftState): Boolean; - function PerformStyleSheetNew: Boolean; - function PerformStyleSheetRename: Boolean; - - function PerformStylesChangeBitmap: Boolean; - function PerformStylesChangeColor: Boolean; - function PerformStylesChangeFont: Boolean; - function PerformStylesClearBitmap: Boolean; - function PerformStylesRestoreDefaults: Boolean; - function PerformStylesSaveAsStyleSheet: Boolean; - procedure RefreshStyleSheetList; - procedure RefreshStylesList; - - // next methods can be overriden - procedure DoActiveStyleSheetChanged; dynamic; - procedure DoFormActivated(AnActive: Boolean); dynamic; - procedure DoRefreshStylesList; dynamic; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); dynamic; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); dynamic; - - function GetDesignerTabIndex: Integer; virtual; - procedure SetDesignerTabIndex(Value: Integer); virtual; - - // next methods must be overriden - procedure GetSelectedStyleNames(AStrings: TStrings); virtual; - procedure GetStyleNames(out AStrings: TStrings); virtual; - procedure GetStyleSheetNames(out AStrings: TStrings); virtual; - - function GetStyleConsumerCount(AStyle: TcxStyle): Integer; - function GetStyleSheetCaption(var ACaption: string): Boolean; - function HasStyleSheetWithCaption(const ACaption: string): Boolean; - procedure InitiateStyle(const ACaption: string; var AStyle: TcxStyle; AForceCreation: Boolean); - - property ActiveStyleSheet: TcxCustomStyleSheet read GetActiveStyleSheet write SetActiveStyleSheet; - property AreNativeStylesAvailable: Boolean read GetAreNativeStylesAvailable; - property DesignerTabIndex: Integer read GetDesignerTabIndex write SetDesignerTabIndex; - property ReportLink: TdxCustomcxControlReportLink read GetReportLink; - property StyleRepository: TcxStyleRepository read GetStyleRepository; - end; - - { Styles ListBox with ToolTips Support } - - TdxStyleBarViewInfo = record - BarColor: TColor; - BarFont: TFont; - BarStyleColorBoxFrameColor: TColor; - StyleCaption: string; - StyleBitmap: TBitmap; - StyleBitmapOrg: TPoint; - StyleColor: TColor; - StyleFont: TFont; - StyleTextColor: TColor; - StyleCaptionBoxBounds: TRect; - StyleColorBoxBounds: TRect; - StyleColorBoxContentBounds: TRect; - StyleFontInfoBoxBounds: TRect; - MaxWidth: Integer; - RestSpaceBounds: TRect; - end; - - TdxStylesListBox = class; - - TdxStylesListBoxToolTipsWindow = class(TCustomControl) - private - FStyleIndex: Integer; - function GetListBox: TdxStylesListBox; - procedure WMEraseBkgnd(var message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMNCHitTest(var message: TWMNCHitTest); message WM_NCHITTEST; - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure Paint; override; - - procedure CalculateStyleBarViewInfo(const R: TRect; var AViewInfo: TdxStyleBarViewInfo); virtual; - procedure DrawBorder(DC: HDC; const R: TRect); virtual; - procedure DrawStyle(R: TRect); virtual; - public - procedure Activate(const R: TRect; AnIndex: Integer); - procedure Deactivate; - - property ListBox: TdxStylesListBox read GetListBox; - property StyleIndex: Integer read FStyleIndex; - end; - - TdxStylesListBox = class(TListBox) - private - FHotTrackStyleIndex: Integer; - FReportLinkStyles: TdxCustomReportLinkStyles; - FToolTips: Boolean; - FToolTipsLongHideTimer: TTimer; - FToolTipsShortHideTimer: TTimer; - FToolTipsWindow: TdxStylesListBoxToolTipsWindow; - function GetHotTrackStyleBounds: TRect; - function GetHotTrackStyleName: string; - function GetStyle(Index: Integer): TcxStyle; - function GetToolTipsBounds: TRect; - procedure SetReportLinkStyles(Value: TdxCustomReportLinkStyles); - procedure SetToolTips(Value: Boolean); - - procedure ToolTipsLongHideTimerHandler(Sender: TObject); - procedure ToolTipsShortHideTimerHandler(Sender: TObject); - procedure WMHScroll(var Message: TWMHScroll); message WM_HSCROLL; - procedure WMMouseWheel(var Message: TWMMouseWheel); message WM_MOUSEWHEEL; - procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL; - protected - procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; - procedure MeasureItem(Index: Integer; var Height: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - - procedure CalculateStyleBarViewInfoSizes(AnIndex: Integer; const R: TRect; - var AViewInfo: TdxStyleBarViewInfo); virtual; - procedure CalculateStyleBarViewInfoViewParams(const ACaption: string; AStyle: TcxStyle; - const R: TRect; ASelected: Boolean; var AViewInfo: TdxStyleBarViewInfo); virtual; - procedure CalculateStyleBarViewInfo(const ACaption: string; AnIndex: Integer; - AStyle: TcxStyle; const R: TRect; ASelected: Boolean; - var AViewInfo: TdxStyleBarViewInfo); - - function AreToolTipsNeeded: Boolean; - function FindHotTrackStyle(const Pt: TPoint): Integer; - function IsHotTrackStyleViolateControlBounds: Boolean; - function IsMouseOver: Boolean; - procedure ShowToolTips; - procedure UpdateToolTips(const Pt: TPoint); - - property HotTrackStyleBounds: TRect read GetHotTrackStyleBounds; - property HotTrackStyleIndex: Integer read FHotTrackStyleIndex write FHotTrackStyleIndex; - property HotTrackStyleName: string read GetHotTrackStyleName; - property ToolTipsBounds: TRect read GetToolTipsBounds; - property ToolTipsWindow: TdxStylesListBoxToolTipsWindow read FToolTipsWindow; - public - constructor Create(AOwner: TComponent); override; - - procedure HideToolTips; - function IndexOfStyle(AStyle: TcxStyle): Integer; - - property ReportLinkStyles: TdxCustomReportLinkStyles read FReportLinkStyles write SetReportLinkStyles; - property Styles[Index: Integer]: TcxStyle read GetStyle; - published - property ToolTips: Boolean read FToolTips write SetToolTips default True; - end; - -{ Helpers } - -function cxButtonGroupItem_GetCaption(AnItem: TcxButtonGroupItem): string; - -function cxBlobEditProperties_GetEditKind(AProperties: TcxCustomEditProperties): TcxBlobEditKind; -function cxBlobEditProperties_GetPaintStyle(AProperties: TcxCustomEditProperties): TcxBlobPaintStyle; - -function cxButtonGroupProperties_GetColumnCount(AProperties: TcxCustomEditProperties): Integer; -function cxButtonGroupProperties_GetItems(AProperties: TcxCustomEditProperties): TcxButtonGroupItems; - -function cxCheckBoxProperties_GetAlignment(AProperties: TcxCustomEditProperties): TAlignment; -function cxCheckBoxProperties_GetGlyph(AProperties: TcxCustomEditProperties): TBitmap; -function cxCheckBoxProperties_GetGlyphCount(AProperties: TcxCustomEditProperties): Integer; -function cxCheckBoxProperties_GetIsMultilined(AProperties: TcxCustomEditProperties): Boolean; -function cxCheckBoxProperties_GetNullStyle(AProperties: TcxCustomEditProperties): TcxCheckBoxNullValueShowingStyle; - -function cxCurrencyProperties_GetNullString(AProperties: TcxCustomEditProperties): string; - -function cxEditProperties_GetAlignment(AProperties: TcxCustomEditProperties): TcxEditAlignment; - -function cxHyperLinkEditProperties_GetLinkColor(AProperties: TcxCustomEditProperties): TColor; - -function cxMemoProperties_GetAlignment(AProperties: TcxCustomEditProperties): TAlignment; -function cxMemoProperties_GetWordWrap(AProperties: TcxCustomEditProperties): Boolean; - -function cxImageComboBoxProperties_GetDefaultDescription(AProperties: TcxCustomEditProperties): string; -function cxImageComboBoxProperties_GetDefaultImageIndex(AProperties: TcxCustomEditProperties): Integer; -function cxImageComboBoxProperties_FindItemByValue(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): TcxImageComboBoxItem; -function cxImageComboBoxProperties_GetImageAlignment(AProperties: TcxCustomEditProperties): TcxImageAlign; -function cxImageComboBoxProperties_GetImages(AProperties: TcxCustomEditProperties): TCustomImageList; -function cxImageComboBoxProperties_GetIsMultilined(AProperties: TcxCustomEditProperties): Boolean; -function cxImageComboBoxProperties_GetItems(AProperties: TcxCustomEditProperties): TcxImageComboBoxItems; -function cxImageComboBoxProperties_GetShowDescription(AProperties: TcxCustomEditProperties): Boolean; - -function cxImageProperties_GetCaption(AProperties: TcxCustomEditProperties): string; -function cxImageProperties_GetCenter(AProperties: TcxCustomEditProperties): Boolean; -function cxImageProperties_GetProportional(AProperties: TcxCustomEditProperties): Boolean; -function cxImageProperties_GetStretch(AProperties: TcxCustomEditProperties): Boolean; -function cxImageProperties_GetGraphicClass(AProperties: TcxCustomEditProperties; ARecordIndex: Integer; AOwner: TObject = nil): TGraphicClass; - -function cxRadioGroupProperties_GetDisplayText(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): string; - -{ Utilities } - -function dxPSDataMaps: TdxPSDataMaps; -procedure dxPSDrawStyleBar(ACanvas: TCanvas; R: TRect; const AViewInfo: TdxStyleBarViewInfo); -function dxPSMakecxGridLines(AHorizontal, AVertical: Boolean): TcxGridLines; -function dxPSMeasureTextWidth(DC: HDC; const AText: string; AFont: TFont): Integer; -function dxPSPreviewCarLogos(Index: Integer): TPicture; -function dxPSPreviewCarLogosAsString(Index: Integer): AnsiString; -function dxPSPictureDialog: TOpenPictureDialog; -procedure dxPSResetStyles(AStyles: TcxStyles); - -const - dxPSPreviewCarLogoCount = 5; - dxPSPreviewCarLogoWidth = 60; - dxPSPreviewCarLogoHeight = 32; - - CellSidesMap: array[TcxGridLines] of TdxCellSides = (csAll, [], csLeftRight, csTopBottom); - EdgeStyleMap: array[Boolean] of TdxCheckButtonEdgeStyle = (cbes3D, cbesUltraFlat); - EditTextAlignXMap: array[TcxEditHorzAlignment] of TcxTextAlignX = (taLeft, taRight, taCenterX); - EditTextAlignYMap: array[TcxEditVertAlignment] of TcxTextAlignY = (taTop, taBottom, taCenterY); - HeaderImageLayoutMap: array[TAlignment, TcxAlignmentVert] of TdxImageLayout = - ((ilImageTopLeft, ilImageBottomLeft, ilImageCenterLeft), - (ilImageTopRight, ilImageBottomRight, ilImageCenterRight), - (ilImageTopCenter, ilImageBottomCenter, ilImageCenterCenter)); - ImageLayoutMap: array[TcxImageAlign] of TdxImageLayout = (ilImageCenterLeft, ilImageCenterRight); - TextAlignXMap: array[TAlignment] of TcxTextAlignX = (taLeft, taRight, taCenterX); - TextAlignYMap: array[TcxAlignmentVert] of TcxTextAlignY = (taTop, taBottom, taCenterY); - -implementation - -uses - {$IFDEF DELPHI7} - Themes, - {$ENDIF} - {$IFDEF DELPHI6} - Variants, - {$ENDIF} - SysUtils, Forms, dxThemeManager, cxVariants, cxDataUtils, dxPSUtl, dxPSEngn, - dxPSImgs, dxExtCtrls; - -var - FPicture: TPicture; - FPictureDialog: TOpenPictureDialog; - FPreviewPictures: array[0..dxPSPreviewCarLogoCount - 1] of TPicture; - -type - - TcxCustomStylesAccess = class(TcxCustomStyles); - TcxButtonGroupItemAccess = class(TcxButtonGroupItem); - TcxCustomBlobEditPropertiesAccess = class(TcxCustomBlobEditProperties); - TcxCustomButtonGroupPropertiesAccess = class(TcxCustomButtonGroupProperties); - TcxCustomCheckBoxPropertiesAccess = class(TcxCustomCheckBoxProperties); - TcxCustomCurrencyEditPropertiesAccess = class(TcxCustomCurrencyEditProperties); - TcxCustomEditPropertiesAccess = class(TcxCustomEditProperties); - TcxCustomHyperLinkEditPropertiesAccess = class(TcxCustomHyperLinkEditProperties); - TcxCustomMemoPropertiesAccess = class(TcxCustomMemoProperties); - TcxCustomImageComboBoxPropertiesAccess = class(TcxCustomImageComboBoxProperties); - TcxCustomImagePropertiesAccess = class(TcxCustomImageProperties); - TcxCustomRadioGroupPropertiesAccess = class(TcxCustomRadioGroupProperties); - {$IFDEF DXVER500} - TcxOffice11LookAndFeelPainterAccess = class(TcxOffice11LookAndFeelPainter); - {$ENDIF} - - -{ Helpers } - -{ TcxStyles Helpers } - -function cxStyles_GetCount(AInstance: TcxCustomStyles): Integer; -begin - Result := TcxCustomStylesAccess(AInstance).Count; -end; - -procedure cxStyles_ResetStyles(AInstance: TcxCustomStyles); -begin - TcxCustomStylesAccess(AInstance).ResetStyles; -end; - -function cxStyles_GetStyleSheet(AInstance: TcxCustomStyles): TcxCustomStyleSheet; -begin - Result := TcxCustomStylesAccess(AInstance).StyleSheet; -end; - -procedure cxStyles_SetStyleSheet(AInstance: TcxCustomStyles; Value: TcxCustomStyleSheet); -begin - TcxCustomStylesAccess(AInstance).StyleSheet := Value; -end; - -{ ButtonGroupItem Helpers } - -function cxButtonGroupItem_GetCaption(AnItem: TcxButtonGroupItem): string; -begin - Result := TcxButtonGroupItemAccess(AnItem).Caption; -end; - -{ BlobEditProperties Helpers } - -function cxBlobEditProperties_GetEditKind(AProperties: TcxCustomEditProperties): TcxBlobEditKind; -begin - Result := TcxCustomBlobEditPropertiesAccess(AProperties).BlobEditKind; -end; - -function cxBlobEditProperties_GetPaintStyle(AProperties: TcxCustomEditProperties): TcxBlobPaintStyle; -begin - Result := TcxCustomBlobEditPropertiesAccess(AProperties).BlobPaintStyle; -end; - -{ ButtonGroupProperties Helpers } - -function cxButtonGroupProperties_GetColumnCount(AProperties: TcxCustomEditProperties): Integer; -begin - Result := TcxCustomButtonGroupPropertiesAccess(AProperties).Columns; -end; - -function cxButtonGroupProperties_GetItems(AProperties: TcxCustomEditProperties): TcxButtonGroupItems; -begin - Result := TcxCustomButtonGroupPropertiesAccess(AProperties).Items; -end; - -{ CheckBoxProperties Helpers } - -function cxCheckBoxProperties_GetAlignment(AProperties: TcxCustomEditProperties): TAlignment; -begin - Result := TcxCustomCheckBoxPropertiesAccess(AProperties).Alignment; -end; - -function cxCheckBoxProperties_GetGlyph(AProperties: TcxCustomEditProperties): TBitmap; -begin - Result := TcxCustomCheckBoxPropertiesAccess(AProperties).Glyph; -end; - -function cxCheckBoxProperties_GetGlyphCount(AProperties: TcxCustomEditProperties): Integer; -begin - Result := TcxCustomCheckBoxPropertiesAccess(AProperties).GlyphCount; -end; - -function cxCheckBoxProperties_GetIsMultilined(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := TcxCustomCheckBoxPropertiesAccess(AProperties).Multiline; -end; - -function cxCheckBoxProperties_GetNullStyle(AProperties: TcxCustomEditProperties): TcxCheckBoxNullValueShowingStyle; -begin - Result := TcxCustomCheckBoxPropertiesAccess(AProperties).NullStyle; -end; - -{ CurrencyProperties Helpers } - -function cxCurrencyProperties_GetNullString(AProperties: TcxCustomEditProperties): string; -begin - Result := TcxCustomCurrencyEditPropertiesAccess(AProperties).NullString; -end; - -{ EditProperties Helpers} - -function cxEditProperties_GetAlignment(AProperties: TcxCustomEditProperties): TcxEditAlignment; -begin - Result := TcxCustomEditPropertiesAccess(AProperties).Alignment; -end; - -{ HyperLinkEditProperties Helpers } - -function cxHyperLinkEditProperties_GetLinkColor(AProperties: TcxCustomEditProperties): TColor; -begin - Result := TcxCustomHyperLinkEditPropertiesAccess(AProperties).LinkColor; -end; - -{ MemoProperties Helpers } - -function cxMemoProperties_GetAlignment(AProperties: TcxCustomEditProperties): TAlignment; -begin - Result := TcxCustomMemoPropertiesAccess(AProperties).Alignment; -end; - -function cxMemoProperties_GetWordWrap(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := TcxCustomMemoPropertiesAccess(AProperties).WordWrap; -end; - -{ ImageComboBoxProperties Helpers } - -function cxImageComboBoxProperties_GetDefaultDescription(AProperties: TcxCustomEditProperties): string; -begin - Result := TcxCustomImageComboBoxPropertiesAccess(AProperties).DefaultDescription; -end; - -function cxImageComboBoxProperties_GetDefaultImageIndex(AProperties: TcxCustomEditProperties): Integer; -begin - Result := TcxCustomImageComboBoxPropertiesAccess(AProperties).DefaultImageIndex; -end; - -function cxImageComboBoxProperties_FindItemByValue(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue): TcxImageComboBoxItem; -begin - Result := TcxCustomImageComboBoxPropertiesAccess(AProperties).FindItemByValue(AValue); -end; - -function cxImageComboBoxProperties_GetImageAlignment(AProperties: TcxCustomEditProperties): TcxImageAlign; -begin - Result := TcxCustomImageComboBoxPropertiesAccess(AProperties).ImageAlign; -end; - -function cxImageComboBoxProperties_GetImages(AProperties: TcxCustomEditProperties): TCustomImageList; -begin - Result := TcxCustomImageComboBoxPropertiesAccess(AProperties).Images; -end; - -function cxImageComboBoxProperties_GetIsMultilined(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := TcxCustomImageComboBoxPropertiesAccess(AProperties).MultiLineText; -end; - -function cxImageComboBoxProperties_GetItems(AProperties: TcxCustomEditProperties): TcxImageComboBoxItems; -begin - Result := TcxCustomImageComboBoxPropertiesAccess(AProperties).Items; -end; - -function cxImageComboBoxProperties_GetShowDescription(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := TcxCustomImageComboBoxPropertiesAccess(AProperties).ShowDescriptions; -end; - -{ ImageProperties Helpers } - -function cxImageProperties_GetCaption(AProperties: TcxCustomEditProperties): string; -begin - Result := TcxCustomImagePropertiesAccess(AProperties).Caption; -end; - -function cxImageProperties_GetCenter(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := TcxCustomImagePropertiesAccess(AProperties).Center; -end; - -function cxImageProperties_GetProportional(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := TcxCustomImagePropertiesAccess(AProperties).Proportional; -end; - -function cxImageProperties_GetStretch(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := TcxCustomImagePropertiesAccess(AProperties).Stretch; -end; - -function cxImageProperties_GetGraphicClass(AProperties: TcxCustomEditProperties; ARecordIndex: Integer; AOwner: TObject = nil): TGraphicClass; -begin - if AOwner = nil then AOwner := AProperties.Owner; - Result := TcxCustomImagePropertiesAccess(AProperties).GetGraphicClass{$IFDEF DXVER500}(AOwner, ARecordIndex){$ENDIF}; -end; - -{ RadioGroupProperties Helpers } - -function cxRadioGroupProperties_GetDisplayText(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): string; -begin - Result := TcxCustomRadioGroupPropertiesAccess(AProperties).GetDisplayText(AValue, True); -end; - -{ Office11 LookAndFeelPainter } - -function cxOffice11LookAndFeelPainter_GetHeaderTopColor(APainterClass: TcxCustomLookAndFeelPainterClass): TColor; -begin - Result := TcxCustomLookAndFeelPainter.DefaultHeaderColor; - if (APainterClass <> nil) and APainterClass.InheritsFrom(TcxOffice11LookAndFeelPainter) then - Result := APainterClass.DefaultHeaderColor - else -end; - -{ Utilities } - -function Picture: TPicture; -begin - if FPicture = nil then FPicture := TPicture.Create; - Result := FPicture; -end; - -function dxPSMakecxGridLines(AHorizontal, AVertical: Boolean): TcxGridLines; -const - Results: array[Boolean] of TcxGridLines = (glVertical, glHorizontal); -begin - Result := glNone; - case Ord(AHorizontal) + Ord(AVertical) of - 1: Result := Results[AHorizontal]; - 2: Result := glBoth; - end; -end; - -function GetUniqueName(AOwner: TComponent; const APrefix: string): string; -var - I: Integer; -begin - I := 0; - repeat - Inc(I); - Result := APrefix + IntToStr(I); - until (I = MaxInt) or (AOwner = nil) or (AOwner.FindComponent(Result) = nil); - - if I = MaxInt then Result := ''; -end; - -procedure InitializeStyleBarViewInfo(var AViewInfo: TdxStyleBarViewInfo); -begin - FillChar(AViewInfo, SizeOf(AViewInfo), 0); - AViewInfo.BarFont := TFont.Create; - AViewInfo.StyleBitmap := TBitmap.Create; - AViewInfo.StyleFont := TFont.Create; -end; - -procedure DeinitializeStyleBarViewInfo(var AViewInfo: TdxStyleBarViewInfo); -begin - AViewInfo.BarFont.Free; - AViewInfo.StyleCaption := ''; - AViewInfo.StyleBitmap.Free; - AViewInfo.StyleFont.Free; - FillChar(AViewInfo, SizeOf(AViewInfo), 0); -end; - -procedure dxPSDrawStyleBar(ACanvas: TCanvas; R: TRect; const AViewInfo: TdxStyleBarViewInfo); -const - ColorBarWidth: Integer = 60; - - procedure DrawStyleBarCaption; - var - X, Y: Integer; - begin - with ACanvas, AViewInfo do - begin - Brush.Style := bsSolid; - Brush.Color := BarColor; - Font := BarFont; - with StyleCaptionBoxBounds do - begin - X := Left + 2; - Y := Top + (Bottom - Top - TextHeight('Wq')) div 2; - end; - TextRect(StyleCaptionBoxBounds, X, Y, StyleCaption); - end; - end; - - procedure DrawStyleBarColorBar; - var - Rgn: HRGN; - PrevBrushOrg: TPoint; - begin - with ACanvas, AViewInfo do - begin - Brush.Style := bsSolid; - Brush.Color := StyleColor; - if not StyleBitmap.Empty then - begin - Brush.Bitmap := StyleBitmap; - SetBrushOrgEx(ACanvas.Handle, StyleBitmapOrg.X, StyleBitmapOrg.Y, @PrevBrushOrg); - end; - Pen.Color := BarStyleColorBoxFrameColor; - with StyleColorBoxContentBounds do - Rectangle(Left, Top, Right, Bottom); - if not StyleBitmap.Empty then - begin - Brush.Bitmap := nil; - SetBrushOrgEx(ACanvas.Handle, PrevBrushOrg.X, PrevBrushOrg.Y, nil); - end; - - Rgn := dxPSUtl.ExcludeClipRect(Handle, StyleColorBoxContentBounds); - try - Brush.Color := BarColor; - FillRect(StyleColorBoxBounds); - finally - dxPSUtl.RestoreClipRgn(Handle, Rgn); - end; - end; - end; - - procedure DrawStyleBarFontInfo; - var - X, Y: Integer; - begin - with ACanvas, AViewInfo do - begin - Brush.Style := bsSolid; - Brush.Color := BarColor; - Font := StyleFont; - Font.Color := StyleTextColor; - with StyleFontInfoBoxBounds do - begin - X := Left + 1; - Y := Top + (Bottom - Top - TextHeight('Wq')) div 2; - end; - TextRect(StyleFontInfoBoxBounds, X, Y, dxPSUtl.FormatFontInfo(StyleFont)); - end; - end; - - procedure DrawRestSpace; - begin - with ACanvas, AViewInfo do - if RectVisible(Handle, RestSpaceBounds) then - begin - Brush.Style := bsSolid; - Brush.Color := BarColor; - FillRect(RestSpaceBounds); - end; - end; - -begin - DrawStyleBarCaption; - DrawStyleBarColorBar; - DrawStyleBarFontInfo; - DrawRestSpace; -end; - -function dxPSMeasureTextWidth(DC: HDC; const AText: string; AFont: TFont): Integer; -var - F: HFONT; - Size: TSize; -begin - F := SelectObject(DC, AFont.Handle); - GetTextExtentPoint32(DC, PChar(AText), Length(AText), Size); - Result := 2 + Size.cx + 2; - SelectObject(DC, F); -end; - -function dxPSPreviewCarLogos(Index: Integer): TPicture; - - function ExtractImage(Source: TPicture; Index: Integer): TPicture; - begin - Result := TPicture.Create; - with Result.Bitmap do - begin - Width := dxPSPreviewCarLogoWidth; - Height := dxPSPreviewCarLogoHeight; - Canvas.Draw(-Index * dxPSPreviewCarLogoWidth, 0, Source.Bitmap); - Transparent := True; - end; - end; - -var - Picture: TPicture; - I: Integer; -begin - if FPreviewPictures[0] = nil then - begin - Picture := TPicture.Create; - try - Bitmap_LoadFromResourceName(Picture.Bitmap, IDB_DXPSCARLOGOS); - for I := 0 to dxPSPreviewCarLogoCount - 1 do - FPreviewPictures[I] := ExtractImage(Picture, I); - finally - Picture.Free; - end; - end; - - if (Index > -1) and (Index < dxPSPreviewCarLogoCount) then - Result := FPreviewPictures[Index] - else - Result := nil; -end; - -function dxPSPreviewCarLogosAsString(Index: Integer): AnsiString; -begin - cxImage.SavePicture(dxPSPreviewCarLogos(Index), Result); -end; - -procedure dxPSResetStyles(AStyles: TcxStyles); -begin - cxStyles_SetStyleSheet(AStyles, nil); - cxStyles_ResetStyles(AStyles); -end; - -function dxPSPictureDialog: TOpenPictureDialog; -begin - if FPictureDialog = nil then - begin - FPictureDialog := TOpenPictureDialog.Create(nil); - FPictureDialog.Title := cxGetResourceString(@sdxLoadBitmapDlgTitle); - //if dxPSEngn.InitialDir <> '' then - // FPictureDialog.InitialDir := dxPSEngn.InitialDir; - end; - Result := FPictureDialog; -end; - -{ CLR Accessors } - - -{ TdxPSDataMaps } - -function dxPSDataMaps: TdxPSDataMaps; -begin - Result := TdxPSDataMaps.Instance; -end; - -class function TdxPSDataMaps.Instance: TdxPSDataMaps; -begin - Result := inherited Instance as TdxPSDataMaps; -end; - -function TdxPSDataMaps.DoesItemParticipateInAutoHeightCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := MapClasses[AProperties].DoesItemParticipateInAutoHeightCalculation(AProperties); -end; - -function TdxPSDataMaps.DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := MapClasses[AProperties].DoesItemParticipateInAutoWidthCalculation(AProperties); -end; - -function TdxPSDataMaps.DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := MapClasses[AProperties].DoesItemParticipateInBestFitCalculation(AProperties); -end; - -procedure TdxPSDataMaps.GetImageLists(AProperties: TcxCustomEditProperties; - AProc: TdxPSGetImageListProc); -begin - MapClasses[AProperties].GetImageLists(AProperties, AProc); -end; - -procedure TdxPSDataMaps.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -begin - MapClasses[AProperties].InitializeItem(AnItem, AProperties, AValue, ACellParams, AViewParams, AnIsPreview, ARecordIndex, AOwner); -end; - -function TdxPSDataMaps.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := MapClasses[AProperties].ItemClass(AProperties, AnIsPreview); -end; - -function TdxPSDataMaps.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -begin - Result := MapClasses[AProperties].MeasureWidth(AProperties, AValue, ACellParams, AFont, ARecordIndex); -end; - -function TdxPSDataMaps.GetMapClass(Properties: TcxCustomEditProperties): TdxPSDataMapClass; -begin - Result := TdxPSDataMapClass(PairClasses[Properties.ClassType]); -end; - -{ TdxPSCustomDataMap } - -class function TdxPSCustomDataMap.PairClass: TClass; -begin - Result := PropertiesClass; -end; - -class procedure TdxPSCustomDataMap.Register; -begin - dxPSDataMaps.Register(Self); -end; - -class procedure TdxPSCustomDataMap.Unregister; -begin - dxPSDataMaps.Unregister(Self); -end; - -class function TdxPSCustomDataMap.DoesItemParticipateInAutoHeightCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := True; -end; - -class function TdxPSCustomDataMap.DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := True; -end; - -class function TdxPSCustomDataMap.DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := True; -end; - -class procedure TdxPSCustomDataMap.GetImageLists(AProperties: TcxCustomEditProperties; - AProc: TdxPSGetImageListProc); -begin -end; - -class function TdxPSCustomDataMap.GetText(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue): string; -begin - Result := AProperties.GetDisplayText(AValue, True); -end; - -class function TdxPSCustomDataMap.HasText(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue): Boolean; -begin - Result := GetText(AProperties, AValue) <> ''; -end; - -class procedure TdxPSCustomDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -begin - TdxReportCellString(AnItem).EndEllipsis := ACellParams.EndEllipsis; - TdxReportCellString(AnItem).Text := GetText(AProperties, AValue); -end; - -class function TdxPSCustomDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellString; -end; - -class function TdxPSCustomDataMap.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -begin - Result := 0; - if HasText(AProperties, AValue) then - Result := dxPSMeasureTextWidth(ACellParams.DC, GetText(AProperties, AValue), AFont); -end; - -class function TdxPSCustomDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomEditProperties; -end; - -{ TdxPSTextDataMap } - -class procedure TdxPSTextDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); - - procedure GetPreviewParams(out ALeftIndent, ARightIndent, AMaxLineCount: Integer); - var - CellParams2: IdxPSCellParams2; - begin - if Supports(ACellParams, IdxPSCellParams2, CellParams2) then - begin - ALeftIndent := CellParams2.PreviewMarginLeft; - ARightIndent := CellParams2.PreviewMarginRight; - AMaxLineCount := CellParams2.PreviewMaxLineCount; - end - else - begin - ALeftIndent := 20; - ARightIndent := 5; - AMaxLineCount := -1; - end; - end; - -var - LeftIndent, RightIndent, MaxLineCount: Integer; -begin - with TdxReportCellString(AnItem) do - begin - EndEllipsis := ACellParams.EndEllipsis; - Multiline := AnIsPreview or ACellParams.Multiline; - Text := GetText(AProperties, AValue); - TextAlignX := EditTextAlignXMap[cxEditProperties_GetAlignment(AProperties).Horz]; - if AnIsPreview then - TextAlignY := taTop - else - TextAlignY := EditTextAlignYMap[cxEditProperties_GetAlignment(AProperties).Vert]; - end; - if AnIsPreview then - begin - GetPreviewParams(LeftIndent, RightIndent, MaxLineCount); - if AnIsPreview then - begin - TdxReportCellPreviewText(AnItem).LeftIndent := LeftIndent; - TdxReportCellPreviewText(AnItem).RightIndent := RightIndent; - TdxReportCellPreviewText(AnItem).MaxLineCount := MaxLineCount; - end; - end; -end; - -class function TdxPSTextDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -const - ItemClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellString, TdxReportCellPreviewText); -begin - Result := ItemClasses[AnIsPreview]; -end; - -class function TdxPSTextDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomTextEditProperties; -end; - -{ TdxPSMemoDataMap } - -class function TdxPSMemoDataMap.DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := not cxMemoProperties_GetWordWrap(AProperties); -end; - -class function TdxPSMemoDataMap.DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := False; -end; - -class procedure TdxPSMemoDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -begin - inherited; - with TdxReportCellString(AnItem) do - begin - Multiline := cxMemoProperties_GetWordWrap(AProperties); - TextAlignX := TextAlignXMap[cxMemoProperties_GetAlignment(AProperties)]; - end; -end; - -class function TdxPSMemoDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomMemoProperties; -end; - -{ TdxPSHyperLinkDataMap } - -class procedure TdxPSHyperLinkDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -begin - inherited; - AViewParams.FontStyle := AViewParams.FontStyle + [fsUnderline]; - AViewParams.NativeParams.TextColor := cxHyperLinkEditProperties_GetLinkColor(AProperties); -end; - -class function TdxPSHyperLinkDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomHyperLinkEditProperties; -end; - -{ TdxPSCheckDataMap } - -class procedure TdxPSCheckDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -var - CheckDisplayValue: TcxEditValue; - CheckNullStyle: TcxCheckBoxNullValueShowingStyle; - CheckGlyph: TBitmap; -begin - with TdxReportCellCheckImage(AnItem) do - begin - AProperties.PrepareDisplayValue(AValue, CheckDisplayValue, False); - ButtonEdgeStyle := EdgeStyleMap[ACellParams.FlatCheckMarks]; - CheckNullStyle := cxCheckBoxProperties_GetNullStyle(AProperties); - Checked := (CheckDisplayValue = Integer(cbsChecked)) or ((CheckDisplayValue = Integer(cbsGrayed)) and (CheckNullStyle = nssGrayedChecked)); - Enabled := not ((CheckDisplayValue = Integer(cbsGrayed)) and (CheckNullStyle in [nssInactive, nssGrayedChecked])); - CheckGlyph := cxCheckBoxProperties_GetGlyph(AProperties); - if not CheckGlyph.Empty then - begin - Glyph := CheckGlyph; - GlyphCount := cxCheckBoxProperties_GetGlyphCount(AProperties); - end; - Multiline := cxCheckBoxProperties_GetIsMultilined(AProperties); - TextAlignX := dxTextAlignX[cxCheckBoxProperties_GetAlignment(AProperties)]; - TextAlignY := taCenterY; - end; -end; - -class function TdxPSCheckDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellCheckImage; -end; - -class function TdxPSCheckDataMap.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -begin - Result := 2 + dxPSGlbl.CheckWidth + 2; -end; - -class function TdxPSCheckDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomCheckBoxProperties; -end; - -{ TdxPSCustomButtonGroupDataMap } - -class function TdxPSCustomButtonGroupDataMap.ButtonGroupClass(AProperties: TcxCustomEditProperties): TdxCustomReportButtonGroupClass; -begin - Result := TdxCustomReportButtonGroup; -end; - -class procedure TdxPSCustomButtonGroupDataMap.InitializeGroupButton(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; AButton: TdxCustomReportCellCheck; AnIndex: Integer); -begin -end; - -class procedure TdxPSCustomButtonGroupDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -var - GroupItems: TcxButtonGroupItems; - I: Integer; - Button: TdxCustomReportCellCheck; -begin - inherited; - with TdxCustomReportButtonGroup(AnItem) do - begin - ButtonEdgeStyle := EdgeStyleMap[ACellParams.FlatCheckMarks]; - CheckPos := ccpLeft; - ColumnCount := cxButtonGroupProperties_GetColumnCount(AProperties); - GroupItems := cxButtonGroupProperties_GetItems(AProperties); - for I := 0 to GroupItems.Count - 1 do - begin - Button := Add(cxButtonGroupItem_GetCaption(GroupItems[I])); - InitializeGroupButton(AProperties, AValue, Button, I); - end; - if AViewParams.NativeParams.Font <> nil then - Font := AViewParams.NativeParams.Font; - Indents := dxPSGlbl.NullRect; - InterColumnsMinSpace := 0; - InterRowsMinSpace := 0; - AdjustContent(ACellParams.DC); - for I := 0 to ItemCount - 1 do - Items[I].Visible := True; - end; -end; - -class function TdxPSCustomButtonGroupDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellDataClass(ButtonGroupClass(AProperties)); -end; - -class function TdxPSCustomButtonGroupDataMap.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -var - GroupItems: TcxButtonGroupItems; - GroupColumnCount: Integer; - DC: HDC; - MaxColumnWidths: array of Integer; - I, J, V, Index, RowItemCount: Integer; -begin - Result := 0; - GroupItems := cxButtonGroupProperties_GetItems(AProperties); - if GroupItems.Count <> 0 then - begin - DC := ACellParams.DC; - GroupColumnCount := cxButtonGroupProperties_GetColumnCount(AProperties); - - SetLength(MaxColumnWidths, GroupColumnCount); - RowItemCount := GroupColumnCount div GroupItems.Count; - if (GroupColumnCount mod GroupItems.Count) <> 0 then - Inc(RowItemCount); - - for I := 0 to GroupColumnCount - 1 do - for J := 0 to RowItemCount - 1 do - begin - Index := I * RowItemCount + J; - if Index < GroupItems.Count then - begin - V := dxPSMeasureTextWidth(DC, cxButtonGroupItem_GetCaption(GroupItems[Index]), AFont); - if MaxColumnWidths[I] < V then MaxColumnWidths[I] := V; - end; - end; - - for I := 0 to Length(MaxColumnWidths) - 1 do - Inc(Result, MaxColumnWidths[I]); - if Result <> 0 then - begin - Inc(Result, GroupColumnCount * dxPSGlbl.CheckWidth); - Inc(Result, (GroupColumnCount - 1) * dxPSCore.dxRadioGroupInterColumnsMinSpace); - Inc(Result, dxPSCore.dxRadioGroupBoundsIndent + dxPSCore.dxRadioGroupBoundsIndent); - end; - end; -end; - -class function TdxPSCustomButtonGroupDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomButtonGroupProperties; -end; - -{ TdxPSRadioButtonGroupDataMap } - -class function TdxPSRadioButtonGroupDataMap.ButtonGroupClass(AProperties: TcxCustomEditProperties): TdxCustomReportButtonGroupClass; -begin - Result := TdxReportRadioGroup; -end; - -class procedure TdxPSRadioButtonGroupDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -begin - inherited; - with TdxReportRadioGroup(AnItem) do - ItemIndex := FindItem(cxRadioGroupProperties_GetDisplayText(AProperties, AValue)); -end; - -class function TdxPSRadioButtonGroupDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomRadioGroupProperties; -end; - -{ TdxPSGraphicDataMap } - -class function TdxPSGraphicDataMap.DoesItemParticipateInAutoHeightCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := True;//lcm: not cxImageProperties_GetStretch(AProperties); -end; - -class function TdxPSGraphicDataMap.DefaultGraphicClass: TGraphicClass; -begin - Result := TBitmap; -end; - -class function TdxPSGraphicDataMap.GetGraphic(AProperties: TcxCustomEditProperties; - AGraphicClass: TGraphicClass; const AValue: TcxEditValue): TGraphic; -begin - if HasGraphic(AValue) then - cxImage.LoadPicture(Picture, AGraphicClass, AValue) - else - Picture.Assign(nil); - Result := Picture.Graphic; -end; - -class function TdxPSGraphicDataMap.GetGraphicClass(AProperties: TcxCustomEditProperties; - ARecordIndex: Integer; AOwner: TObject = nil): TGraphicClass; -begin - Result := cxImageProperties_GetGraphicClass(AProperties, ARecordIndex, AOwner); - if Result = nil then - Result := DefaultGraphicClass; -end; - -class function TdxPSGraphicDataMap.HasGraphic(const AValue: TcxEditValue): Boolean; -begin - Result := dxVarIsBlob(AValue); -end; - -class procedure TdxPSGraphicDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -var - GraphicClass: TGraphicClass; -begin - if HasGraphic(AValue) then - GraphicClass := GetGraphicClass(AProperties, ARecordIndex, AOwner) - else - GraphicClass := nil; - - with TdxReportCellGraphic(AnItem) do - begin - Center := cxImageProperties_GetCenter(AProperties); - Image := GetGraphic(AProperties, GraphicClass, AValue); - ImageTransparent := ((GraphicClass <> nil) and GraphicClass.InheritsFrom(TIcon)) or ACellParams.TransparentGraphics; - Stretch := (GraphicClass <> nil) and not GraphicClass.InheritsFrom(TIcon) and cxImageProperties_GetStretch(AProperties); - Proportional := (GraphicClass <> nil) and not GraphicClass.InheritsFrom(TIcon) and cxImageProperties_GetProportional(AProperties); - end; -end; - -class function TdxPSGraphicDataMap.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -var - GraphicClass: TGraphicClass; -begin - if HasGraphic(AValue) then - begin - GraphicClass := GetGraphicClass(AProperties, ARecordIndex); - Result := GetGraphic(AProperties, GraphicClass, AValue).Width; - end - else - Result := 0; -end; - -class function TdxPSGraphicDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellGraphic; -end; - -class function TdxPSGraphicDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomImageProperties; -end; - -{ TdxPSGraphicAsTextDataMap } - -class procedure TdxPSGraphicAsTextDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -begin - TdxReportCellString(AnItem).Text := ACellParams.GraphicsText; - TdxReportCellString(AnItem).TextAlignX := taLeft; - TdxReportCellString(AnItem).TextAlignY := taTop; -end; - -class function TdxPSGraphicAsTextDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellString; -end; - -class function TdxPSGraphicAsTextDataMap.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -begin - Result := dxPSMeasureTextWidth(ACellParams.DC, ACellParams.GraphicsText, AFont); -end; - -class function TdxPSGraphicAsTextDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomImageProperties; -end; - -{ TdxPSImageDataMap } - -class function TdxPSImageDataMap.DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := not IsMultilinedText(AProperties); -end; - -class function TdxPSImageDataMap.GetComboBoxItem(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue): TcxImageComboBoxItem; -begin - Result := cxImageComboBoxProperties_FindItemByValue(AProperties, AValue); -end; - -class function TdxPSImageDataMap.GetImageIndex(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue): Integer; -var - CompoBoxItem: TcxImageComboBoxItem; -begin - CompoBoxItem := GetComboBoxItem(AProperties, AValue); - if CompoBoxItem <> nil then - Result := CompoBoxItem.ImageIndex - else - Result := cxImageComboBoxProperties_GetDefaultImageIndex(AProperties); -end; - -class procedure TdxPSImageDataMap.GetImageLists(AProperties: TcxCustomEditProperties; - AProc: TdxPSGetImageListProc); -begin - AProc(GetImages(AProperties)); -end; - -class function TdxPSImageDataMap.GetImages(AProperties: TcxCustomEditProperties): TCustomImageList; -begin - Result := cxImageComboBoxProperties_GetImages(AProperties); -end; - -class function TdxPSImageDataMap.GetText(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue): string; -var - CompoBoxItem: TcxImageComboBoxItem; -begin - Result := ''; - if cxImageComboBoxProperties_GetShowDescription(AProperties) then - begin - CompoBoxItem := GetComboBoxItem(AProperties, AValue); - if CompoBoxItem <> nil then - Result := CompoBoxItem.Description - else - Result := cxImageComboBoxProperties_GetDefaultDescription(AProperties); - end; -end; - -class function TdxPSImageDataMap.HasImages(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := GetImages(AProperties) <> nil; -end; - -class procedure TdxPSImageDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -begin - inherited; - with TdxReportCellImage(AnItem) do - begin - ImageList := GetImages(AProperties); - ImageIndex := GetImageIndex(AProperties, AValue); - ImageLayout := ImageLayoutMap[cxImageComboBoxProperties_GetImageAlignment(AProperties)]; - MultiLine := IsMultilinedText(AProperties); - if not cxImageComboBoxProperties_GetShowDescription(AProperties) then - begin - ImageLayout := ilImageCenterCenter; - Text := ''; - end; - end; -end; - -class function TdxPSImageDataMap.IsMultilinedText(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := cxImageComboBoxProperties_GetIsMultilined(AProperties); -end; - -class function TdxPSImageDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellImage; -end; - -class function TdxPSImageDataMap.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -begin - Result := inherited MeasureWidth(AProperties, AValue, ACellParams, AFont, ARecordIndex); - if HasImages(AProperties) then - Inc(Result, 1 + GetImages(AProperties).Width + 1); -end; - -class function TdxPSImageDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomImageComboBoxProperties; -end; - -{ TdxPSDelegateDataMap } - -class function TdxPSDelegateDataMap.DataMapClass(AProperties: TcxCustomEditProperties): TdxPSDataMapClass; -begin - Result := nil; {actually should be an abstract method, but C++ syntax does not allow us "static virtual abstract" methods :-( } -end; - -class function TdxPSDelegateDataMap.DoesItemParticipateInAutoHeightCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := DataMapClass(AProperties).DoesItemParticipateInAutoHeightCalculation(AProperties); -end; - -class function TdxPSDelegateDataMap.DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := DataMapClass(AProperties).DoesItemParticipateInAutoWidthCalculation(AProperties); -end; - -class function TdxPSDelegateDataMap.DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := DataMapClass(AProperties).DoesItemParticipateInBestFitCalculation(AProperties); -end; - -class procedure TdxPSDelegateDataMap.GetImageLists(AProperties: TcxCustomEditProperties; - AProc: TdxPSGetImageListProc); -begin - DataMapClass(AProperties).GetImageLists(AProperties, AProc); -end; - -class procedure TdxPSDelegateDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -begin - DataMapClass(AProperties).InitializeItem(AnItem, AProperties, AValue, ACellParams, AViewParams, AnIsPreview, ARecordIndex, AOwner); -end; - -class function TdxPSDelegateDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := DataMapClass(AProperties).ItemClass(nil, AnIsPreview); -end; - -class function TdxPSDelegateDataMap.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -begin - Result := DataMapClass(AProperties).MeasureWidth(AProperties, AValue, ACellParams, AFont, ARecordIndex); -end; - -{ TdxPSBlobDataMap } - -class function TdxPSBlobDataMap.DataMapClass(AProperties: TcxCustomEditProperties): TdxPSDataMapClass; -const - DataMapClasses: array[TcxBlobPaintStyle] of TdxPSDataMapClass = - (TdxPSBlobDefaultDataMap, TdxPSBlobPictureDataMap, TdxPSBlobTextDataMap); -begin - Result := DataMapClasses[cxBlobEditProperties_GetPaintStyle(AProperties)]; -end; - -class function TdxPSBlobDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomBlobEditProperties; -end; - -{ TdxPSBlobDefaultDataMap } - -class procedure TdxPSBlobDefaultDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -begin - inherited; - //TdxReportCellString(AnItem).Text := AValue; - TdxReportCellString(AnItem).Text := cxBlobEdit.GetBlobText(AValue, TcxCustomBlobEditProperties(AProperties), False); -end; - -{ TdxPSBlobPictureDataMap } - -class procedure TdxPSBlobPictureDataMap.GetImageLists(AProperties: TcxCustomEditProperties; - AProc: TdxPSGetImageListProc); -begin - AProc(imgBlobImages); -end; - -class procedure TdxPSBlobPictureDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -const - ImageIndexes: array[TcxBlobEditKind] of Integer = (0, 2, 4, 6, 0); -begin - inherited; - with TdxReportCellGraphic(AnItem) do - begin - ImageList := imgBlobImages; - ImageIndex := ImageIndexes[cxBlobEditProperties_GetEditKind(AProperties)] + Ord(not cxVariants.VarIsSoftNull(AValue)); - Center := True; - end; -end; - -class function TdxPSBlobPictureDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellGraphic; -end; - -class function TdxPSBlobPictureDataMap.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -begin - Result := imgBlobImages.Width; -end; - -{ TdxPSBlobTextDataMap } - -class function TdxPSBlobTextDataMap.DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := False; -end; - -class function TdxPSBlobTextDataMap.DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := False; -end; - -class procedure TdxPSBlobTextDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = 0; AOwner: TObject = nil); -begin - inherited; - TdxReportCellString(AnItem).Multiline := True;//False; {3.1} - //TdxReportCellString(AnItem).EndEllipsis := True; {3.1} -end; - -{ TdxReportCellPreviewText } - -procedure TdxReportCellPreviewText.Assign(Source: TPersistent); -begin - if Source is TdxReportCellPreviewText then - with TdxReportCellPreviewText(Source) do - begin - Self.MaxLineCount := MaxLineCount; - Self.RightIndent := RightIndent; - end; - inherited; -end; - -procedure TdxReportCellPreviewText.DrawText(DC: HDC); -var - R: TRect; -begin - R := GetTextBounds(DC); - if not IsRectEmpty(R) then - Renderer.DrawTextEx(DC, R, MaxLineCount, LeftIndent, RightIndent, GetText, Font, DTFormat); -end; - -procedure TdxReportCellPreviewText.ReadData(AReader: TdxPSDataReader); -begin - inherited; - MaxLineCount := AReader.ReadInteger; - RightIndent := AReader.ReadInteger; -end; - -procedure TdxReportCellPreviewText.WriteData(AWriter: TdxPSDataWriter); -begin - inherited; - AWriter.WriteInteger(MaxLineCount); - AWriter.WriteInteger(RightIndent); -end; - -function TdxReportCellPreviewText.GetLeftIndent: Integer; -begin - Result := Indent; -end; - -procedure TdxReportCellPreviewText.SetLeftIndent(Value: Integer); -begin - Indent := Value; -end; - -procedure TdxReportCellPreviewText.SetMaxLineCount(Value: Integer); -begin - if Value < 0 then Value := 0; - FMaxLineCount := Value; -end; - -procedure TdxReportCellPreviewText.SetRightIndent(Value: Integer); -begin - if Value < 0 then Value := 0; - FRightIndent := Value; -end; - -{ TdxCustomReportLinkStyles } - -procedure TdxCustomReportLinkStyles.DesignerFinalize; -begin - if ReportLink <> nil then ReportLink.DesignerTabIndex := 0; -end; - -procedure TdxCustomReportLinkStyles.DesignerInitialize; -begin - if ReportLink <> nil then ReportLink.DesignerTabIndex := DesignerTabIndex; -end; - -function TdxCustomReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -procedure TdxCustomReportLinkStyles.Changed(AIndex: Integer); -begin - inherited; - if ReportLink <> nil then - ReportLink.StyleChanged(GetStyleCaption(AIndex), Values[AIndex]); -end; - -procedure TdxCustomReportLinkStyles.GetDefaultViewParamsByCaption(const ACaption: string; - AData: Pointer; out AParams: TcxViewParams); -var - Index: Integer; -begin - FillChar(AParams, SizeOf(AParams), 0); - Index := StyleIndexesByCaption[ACaption]; - if Index = -1 then - with AParams do - begin - Bitmap := nil; - Color := clWindow; - Font := ReportLink.Font; - TextColor := Font.Color; - end - else - GetDefaultViewParams(Index, AData, AParams); -end; - -class function TdxCustomReportLinkStyles.GetStyleCaption(AnIndex: Integer): string; -begin - Result := ''; -end; - -function TdxCustomReportLinkStyles.GetStyleByCaption(const Caption: string): TcxStyle; -var - Index: Integer; -begin - Index := StyleIndexesByCaption[Caption]; - if Index <> -1 then - Result := Values[Index] - else - Result := nil; -end; - -{function TdxCustomReportLinkStyles.GetStyleIndexByCaption(const Caption: string): Integer; -begin - for Result := 0 to Count - 1 do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Items[Result].Index)) then - Exit; - Result := -1; -end;} - -procedure TdxCustomReportLinkStyles.SetStyleByCaption(const Caption: string; Value: TcxStyle); -var - Index: Integer; -begin - Index := StyleIndexesByCaption[Caption]; - if Index <> -1 then - Values[Index] := Value; -end; - -function TdxCustomReportLinkStyles.GetReportLink: TdxCustomcxControlReportLink; -begin - if GetOwner is TdxCustomcxControlReportLink then - Result := TdxCustomcxControlReportLink(GetOwner) - else - Result := nil; -end; - -{ TdxCustomReportLinkStyleSheet } - -class procedure TdxCustomReportLinkStyleSheet.Register; -begin - Classes.RegisterClass(Self); -end; - -class procedure TdxCustomReportLinkStyleSheet.Unregister; -begin - Classes.UnregisterClass(Self); -end; - -{ TdxCustomReportLinkOptions } - -constructor TdxCustomReportLinkOptions.Create(AReportLink: TdxCustomcxControlReportLink); -begin - inherited Create; - FReportLink := AReportLink; - if ReportLink <> nil then ReportLink.AddOptions(Self); - CreateObjects; - RestoreDefaults; - if ReportLink <> nil then ReportLink.LinkModified(False); -end; - -destructor TdxCustomReportLinkOptions.Destroy; -begin - DestroyObjects; - if ReportLink <> nil then ReportLink.RemoveOptions(Self); - inherited; -end; - -procedure TdxCustomReportLinkOptions.Assign(Source: TPersistent); -begin - if Source is TdxCustomReportLinkOptions then - else - inherited; -end; - -procedure TdxCustomReportLinkOptions.RestoreDefaults; -begin -end; - -{ IUnknown } -function TdxCustomReportLinkOptions.QueryInterface(const IID: TGUID; out Obj): HRESULT; -begin - if GetInterface(IID, Obj) then - Result := S_OK - else - Result := E_NOINTERFACE; -end; - -function TdxCustomReportLinkOptions._AddRef: Integer; -begin - Result := -1; -end; - -function TdxCustomReportLinkOptions._Release: Integer; -begin - Result := -1; -end; - -{ IdxReportLinkOptionsDesignerSupport } -procedure TdxCustomReportLinkOptions.DesignerFinalize; -begin - if ReportLink <> nil then ReportLink.DesignerTabIndex := 0; -end; - -procedure TdxCustomReportLinkOptions.DesignerInitialize; -begin - if ReportLink <> nil then ReportLink.DesignerTabIndex := DesignerTabIndex; -end; - -function TdxCustomReportLinkOptions.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -procedure TdxCustomReportLinkOptions.Changed; -begin - if ReportLink <> nil then ReportLink.OptionsChanged(Self); -end; - -procedure TdxCustomReportLinkOptions.Notification(AComponent: TComponent; AOperation: TOperation); -begin -end; - -procedure TdxCustomReportLinkOptions.CreateObjects; -begin -end; - -procedure TdxCustomReportLinkOptions.DestroyObjects; -begin -end; - -procedure TdxCustomReportLinkOptions.DesignerModified; -begin - if ReportLink <> nil then ReportLink.DesignerModified; -end; - -{ TdxGridReportLinkOptionsFormatting } - -procedure TdxCustomReportLinkOptionsFormatting.Assign(Source: TPersistent); -begin - if Source is TdxCustomReportLinkOptionsFormatting then - with TdxCustomReportLinkOptionsFormatting(Source) do - begin - Self.GridLineColor := GridLineColor; - Self.LookAndFeelKind := LookAndFeelKind; - Self.SuppressBackgroundBitmaps := SuppressBackgroundBitmaps; - Self.UseLookAndFeelColors := UseLookAndFeelColors; - Self.UseNativeStyles := UseNativeStyles; - end; - inherited; -end; - -procedure TdxCustomReportLinkOptionsFormatting.RestoreDefaults; -begin - inherited; - GridLineColor := clDefault; - LookAndFeelKind := lfUltraFlat; - SuppressBackgroundBitmaps := False; - UseLookAndFeelColors := False; - UseNativeStyles := False; -end; - -procedure TdxCustomReportLinkOptionsFormatting.SetGridLineColor(Value: TColor); -begin - if FGridLineColor <> Value then - begin - FGridLineColor := Value; - Changed; - end; -end; - -procedure TdxCustomReportLinkOptionsFormatting.SetLookAndFeelKind(Value: TcxLookAndFeelKind); -begin - {$IFDEF DXVER500} - if Value = lfOffice11 then Value := lfFlat; - {$ENDIF} - if FLookAndFeelKind <> Value then - begin - FLookAndFeelKind := Value; - Changed; - end; -end; - -procedure TdxCustomReportLinkOptionsFormatting.SetSuppressBackgroundBitmaps(Value: Boolean); -begin - if FSuppressBackgroundBitmaps <> Value then - begin - FSuppressBackgroundBitmaps := Value; - Changed; - end; -end; - -procedure TdxCustomReportLinkOptionsFormatting.SetUseLookAndFeelColors(Value: Boolean); -begin - if FUseLookAndFeelColors <> Value then - begin - FUseLookAndFeelColors := Value; - if dxThemeManager.AreVisualStylesAvailable then Changed; - end; -end; - -procedure TdxCustomReportLinkOptionsFormatting.SetUseNativeStyles(Value: Boolean); -begin - if FUseNativeStyles <> Value then - begin - FUseNativeStyles := Value; - Changed; - end; -end; - -{ TdxCustomReportLinkOptionsRefinements } - -procedure TdxCustomReportLinkOptionsRefinements.Assign(Source: TPersistent); -begin - if Source is TdxCustomReportLinkOptionsRefinements then - with TdxCustomReportLinkOptionsRefinements(Source) do - begin - Self.DisplayGraphicsAsText := DisplayGraphicsAsText; - Self.FlatCheckMarks := FlatCheckMarks; - Self.GraphicsText := GraphicsText; - Self.TransparentGraphics := TransparentGraphics; - {$IFDEF DXVER500} - Self.TransparentRichEdits := TransparentRichEdits; - {$ENDIF} - Self.FIsGraphicsTextAssigned := FIsGraphicsTextAssigned; - end; - inherited; -end; - -function TdxCustomReportLinkOptionsRefinements.DefaultGraphicsText: string; -begin - Result := cxGetResourceString(@sdxGraphicAsTextValue); -end; - -procedure TdxCustomReportLinkOptionsRefinements.RestoreDefaults; -begin - inherited; - DisplayGraphicsAsText := False; - FlatCheckMarks := True; - GraphicsText := ''; - TransparentGraphics := False; - {$IFDEF DXVER500} - TransparentRichEdits := False; - {$ENDIF} - FIsGraphicsTextAssigned := False; -end; - -procedure TdxCustomReportLinkOptionsRefinements.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('IsGraphicsAsTextAssigned', ReadIsGraphicsTextAssigned, WriteIsGraphicsTextAssigned, - FIsGraphicsTextAssigned and (GraphicsText = '')); -end; - -function TdxCustomReportLinkOptionsRefinements.GetGraphicsText: string; -begin - if FIsGraphicsTextAssigned then - Result := FGraphicsText - else - Result := DefaultGraphicsText; -end; - -function TdxCustomReportLinkOptionsRefinements.IsGraphicsTextStored: Boolean; -begin - Result := FIsGraphicsTextAssigned and (GraphicsText <> DefaultGraphicsText); -end; - -procedure TdxCustomReportLinkOptionsRefinements.SetDisplayGraphicsAsText(Value: Boolean); -begin - if FDisplayGraphicsAsText <> Value then - begin - FDisplayGraphicsAsText := Value; - Changed; - end; -end; - -procedure TdxCustomReportLinkOptionsRefinements.SetFlatCheckMarks(Value: Boolean); -begin - if FFlatCheckMarks <> Value then - begin - FFlatCheckMarks := Value; - Changed; - end; -end; - -procedure TdxCustomReportLinkOptionsRefinements.SetGraphicsText(const Value: string); -begin - if GraphicsText <> Value then - begin - FGraphicsText := Value; - FIsGraphicsTextAssigned := True; - if DisplayGraphicsAsText then Changed; - end; -end; - -procedure TdxCustomReportLinkOptionsRefinements.SetTransparentGraphics(Value: Boolean); -begin - if FTransparentGraphics <> Value then - begin - FTransparentGraphics := Value; - Changed; - end; -end; - -{$IFDEF DXVER500} -procedure TdxCustomReportLinkOptionsRefinements.SetTransparentRichEdits(Value: Boolean); -begin - if FTransparentRichEdits <> Value then - begin - FTransparentRichEdits := Value; - Changed; - end; -end; -{$ENDIF} - -procedure TdxCustomReportLinkOptionsRefinements.ReadIsGraphicsTextAssigned(Reader: TReader); -begin - FIsGraphicsTextAssigned := Reader.ReadBoolean; -end; - -procedure TdxCustomReportLinkOptionsRefinements.WriteIsGraphicsTextAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsGraphicsTextAssigned); -end; - -{ TcxVerticalGridReportLinkOptionsSize } - -procedure TdxCustomReportLinkOptionsSize.Assign(Source: TPersistent); -begin - if Source is TdxCustomReportLinkOptionsSize then - with TdxCustomReportLinkOptionsSize(Source) do - begin - Self.AutoWidth := AutoWidth; - end; - inherited; -end; - -procedure TdxCustomReportLinkOptionsSize.RestoreDefaults; -begin - inherited; - AutoWidth := False; -end; - -procedure TdxCustomReportLinkOptionsSize.SetAutoWidth(Value: Boolean); -begin - if FAutoWidth <> Value then - begin - FAutoWidth := Value; - Changed; - end; -end; - -{ TdxCustomcxControlReportLink } - -constructor TdxCustomcxControlReportLink.Create(AOwner: TComponent); -begin - inherited; - FDelimitersHorz := TList.Create; - FDelimitersVert := TList.Create; - FImageLists := TList.Create; - FOptions := TList.Create; - FStyles := GetStylesClass.Create(Self); - CreateOptions; -end; - -destructor TdxCustomcxControlReportLink.Destroy; -begin - FreeAndNil(FStyles); - FreeAndNil(FImageLists); - FreeAndNil(FDelimitersVert); - FreeAndNil(FDelimitersHorz); - DestroyOptions; - FreeAndNil(FOptions); - inherited; -end; - -procedure TdxCustomcxControlReportLink.Assign(Source: TPersistent); -begin - if Source is TdxCustomcxControlReportLink then - with TdxCustomcxControlReportLink(Source) do - begin - Self.OptionsExpanding := OptionsExpanding; - Self.OptionsFormatting := OptionsFormatting; - Self.OptionsPagination := OptionsPagination; - Self.OptionsRefinements := OptionsRefinements; - Self.OptionsSize := OptionsSize; - Self.OptionsView := OptionsView; - Self.Styles := Styles; - Self.SupportedCustomDraw := SupportedCustomDraw; - end; - inherited; -end; - -procedure TdxCustomcxControlReportLink.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited; - if (AComponent = StyleRepository) and (Operation = opRemove) then - StyleRepository := nil; - NotifyOptions(AComponent, Operation); -end; - -procedure TdxCustomcxControlReportLink.BeforeDesignReport; -begin - DesignWindow.DesignerTabIndex := FDesignerTabIndex; - inherited; -end; - -procedure TdxCustomcxControlReportLink.ConvertCoords; -begin - inherited; - ConvertDelimiters(DelimitersHorz); - ConvertDelimiters(DelimitersVert); -end; - -procedure TdxCustomcxControlReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -var - I: Integer; -begin - for I := 0 to ImageListCount - 1 do - AProc(ImageLists[I]); -end; - -procedure TdxCustomcxControlReportLink.InternalRestoreDefaults; -begin - inherited; - OptionsExpanding.RestoreDefaults; - OptionsFormatting.RestoreDefaults; - OptionsPagination.RestoreDefaults; - OptionsRefinements.RestoreDefaults; - OptionsSize.RestoreDefaults; - OptionsView.RestoreDefaults; - SupportedCustomDraw := False; -end; - -function TdxCustomcxControlReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -begin - Result := SupportedCustomDraw; -end; - -procedure TdxCustomcxControlReportLink.MakeDelimiters(AReportCells: TdxReportCells; - AHorzDelimiters, AVertDelimiters: TList); -begin - inherited; - dxPSUtl.dxCopyList(DelimitersHorz, AHorzDelimiters); - dxPSUtl.dxCopyList(DelimitersVert, AVertDelimiters); -end; - -procedure TdxCustomcxControlReportLink.AddHorizontalDelimiter(ADelimiter: TdxReportCell); -var - R: TRect; -begin - R := ADelimiter.AbsoluteRect; - AddHorizontalDelimiter(R.Left); - AddHorizontalDelimiter(R.Right); -end; - -procedure TdxCustomcxControlReportLink.AddHorizontalDelimiter(ADelimiter: Integer); -begin - FDelimitersHorz.Add(TObject(ADelimiter)); -end; - -procedure TdxCustomcxControlReportLink.AddVerticalDelimiter(ADelimiter: TdxReportCell); -var - R: TRect; -begin - R := ADelimiter.AbsoluteRect; - AddVerticalDelimiter(R.Top); - AddVerticalDelimiter(R.Bottom); -end; - -procedure TdxCustomcxControlReportLink.AddVerticalDelimiter(ADelimiter: Integer); -begin - FDelimitersVert.Add(TObject(ADelimiter)); -end; - -procedure TdxCustomcxControlReportLink.CreateOptions; -begin - FOptionsExpanding := GetOptionsExpandingClass.Create(Self); - FOptionsFormatting := GetOptionsFormattingClass.Create(Self); - FOptionsPagination := GetOptionsPaginationClass.Create(Self); - FOptionsRefinements := GetOptionsRefinementsClass.Create(Self); - FOptionsSize := GetOptionsSizeClass.Create(Self); - FOptionsView := GetOptionsViewClass.Create(Self); -end; - -procedure TdxCustomcxControlReportLink.DestroyOptions; -begin - FreeAndNil(FOptionsView); - FreeAndNil(FOptionsSize); - FreeAndNil(FOptionsRefinements); - FreeAndNil(FOptionsPagination); - FreeAndNil(FOptionsFormatting); - FreeAndNil(FOptionsExpanding); -end; - -function TdxCustomcxControlReportLink.GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; -begin - Result := TdxCustomReportLinkOptionsExpanding; -end; - -function TdxCustomcxControlReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TdxCustomReportLinkOptionsFormatting; -end; - -function TdxCustomcxControlReportLink.GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; -begin - Result := TdxCustomReportLinkOptionsPagination; -end; - -function TdxCustomcxControlReportLink.GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; -begin - Result := TdxCustomReportLinkOptionsRefinements; -end; - -function TdxCustomcxControlReportLink.GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; -begin - Result := TdxCustomReportLinkOptionsSize; -end; - -function TdxCustomcxControlReportLink.GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; -begin - Result := TdxCustomReportLinkOptionsView; -end; - -procedure TdxCustomcxControlReportLink.OptionsChanged(AnOptions: TdxCustomReportLinkOptions); -begin - LinkModified(True); -end; - -procedure TdxCustomcxControlReportLink.AddOptions(AnOptions: TdxCustomReportLinkOptions); -begin - FOptions.Remove(AnOptions); -end; - -procedure TdxCustomcxControlReportLink.NotifyOptions(AComponent: TComponent; AOperation: TOperation); -var - I: Integer; -begin - for I := 0 to OptionsCount - 1 do - Options[I].Notification(AComponent, AOperation); -end; - -procedure TdxCustomcxControlReportLink.RemoveOptions(AnOptions: TdxCustomReportLinkOptions); -begin - FOptions.Add(AnOptions); -end; - -procedure TdxCustomcxControlReportLink.AppendImageList(AnImageList: TCustomImageList); -begin - if (AnImageList <> nil) and (FImageLists.IndexOf(AnImageList) = -1) then - FImageLists.Add(AnImageList); -end; - -function TdxCustomcxControlReportLink.CanCreateComponent: Boolean; -begin -{$IFDEF DELPHI5} - Result := (Owner = nil) or not (csInline in Owner.ComponentState); -{$ELSE} - Result := True; -{$ENDIF} -end; - -procedure TdxCustomcxControlReportLink.ConvertDelimiters(ADelimiters: TList); -var - I, Value: Integer; -begin - for I := 0 to ADelimiters.Count - 1 do - begin - Value := Integer(ADelimiters[I]); - Value := MulDiv(Value, PixelsNumerator, PixelsDenominator); - ADelimiters[I] := Pointer(Value); - end; -end; - -function TdxCustomcxControlReportLink.CreateStyle(const ACaption: string): TcxStyle; -begin - Result := GetStyleRepository.CreateItemEx(TcxStyle, GetChildComponentOwner) as TcxStyle; - if IsDesigning then - Result.Name := GetUniqueName(GetChildComponentOwner, DropT(TcxStyle.ClassName)); - StyleRestoreDefaults(ACaption, Result); - Styles.StylesByCaption[ACaption] := Result; -end; - -function TdxCustomcxControlReportLink.CreateStyleRepository: TcxStyleRepository; -begin - Result := TcxStyleRepository.Create(Owner); - if IsDesigning then - begin - Result.Name := GetUniqueName(Owner, DropT(TcxStyleRepository.ClassName)); - DesignerModified; - MessageWarning(Format(cxGetResourceString(@sdxNewStyleRepositoryWasCreated), [Result.Name])); - end; -end; - -function TdxCustomcxControlReportLink.CreateStyleSheet(APrototype: TcxCustomStyleSheet; - const ACaption: string; AUseStyles: Boolean): TdxCustomReportLinkStyleSheet; -var - Styles: TStrings; - I: Integer; - NewStyles: TdxCustomReportLinkStyles; - Style: TcxStyle; - StyleCaption: string; -begin - Result := GetStyleRepository.CreateStyleSheetEx(GetStyleSheetClass, GetChildComponentOwner) as TdxCustomReportLinkStyleSheet; - if IsDesigning then - Result.Name := GetUniqueName(GetChildComponentOwner, DropT(GetStyleSheetClass.ClassName)); - Result.Caption := ACaption; - - if AUseStyles then - begin - DesignWindow.GetStyleNames(Styles); - NewStyles := TdxCustomReportLinkStyles(Result.GetStyles); - for I := 0 to Styles.Count - 1 do - begin - StyleCaption := Styles[I]; - Style := TcxStyle(Styles.Objects[I]); - InitiateStyle(StyleCaption, Style, Style = nil);// or (Style.AssignedValues = [])); - NewStyles.StylesByCaption[StyleCaption] := Style; - end; - end - else - begin - if APrototype = nil then - APrototype := GetStyleSheetPrototype; - if APrototype <> nil then - begin - Result.CopyFrom(APrototype); - if IsDesigning then - for I := 0 to cxStyles_GetCount(Result.GetStyles) - 1 do - begin - Style := TcxStyle(Result.GetStyles.Values[I]); - if Style <> nil then - Style.Name := GetUniqueName(GetChildComponentOwner, DropT(TcxStyle.ClassName)); - end; - end; - end; -end; - -function TdxCustomcxControlReportLink.FindStyleRepositoryInStyles(AStyles: TcxStyles): TcxStyleRepository; -var - I: Integer; - cxStyle: TcxCustomStyle; - StyleSheet: TcxCustomStyleSheet; -begin - for I := 0 to cxStyles_GetCount(AStyles) - 1 do - begin - cxStyle := AStyles.Values[I]; - if cxStyle <> nil then - begin - Result := cxStyle.StyleRepository; - if Result <> nil then - Exit; - end; - end; - Result := nil; - - StyleSheet := cxStyles_GetStyleSheet(AStyles); - if StyleSheet <> nil then - Result := StyleSheet.StyleRepository; -end; - -function TdxCustomcxControlReportLink.GetChildComponentOwner: TComponent; -begin - Result := GetStyleRepository.Owner; -end; - -function TdxCustomcxControlReportLink.GetStyleConsumerCount(AStyle: TcxStyle): Integer; - - function GetStyleConsumerCountInStyles(AStyles: TcxCustomStyles): Integer; - var - I: Integer; - begin - Result := 0; - for I := 0 to cxStyles_GetCount(AStyles) - 1 do - if AStyles.Values[I] = AStyle then - Inc(Result); - - if (Result = 0) and (cxStyles_GetStyleSheet(AStyles) <> nil) then - begin - I := GetStyleConsumerCountInStyles(cxStyles_GetStyleSheet(AStyles).GetStyles); - Inc(Result, I); - end; - end; - -begin - Result := GetStyleConsumerCountInStyles(Styles); -end; - -function TdxCustomcxControlReportLink.GetStyleRepository: TcxStyleRepository; -begin - Result := FStyleRepository; - if Result = nil then - begin - Result := FindStyleRepositoryInStyles(Styles); - if (Result = nil) and CanCreateComponent then - begin - FStyleRepository := CreateStyleRepository; - Result := FStyleRepository; - end; - end; -end; - -function TdxCustomcxControlReportLink.GetStyleSheetCaption(ACheckProc: TdxStyleSheetHasCaptionProc; - var ACaption: string): Boolean; - - function QueryStyleSheetCaption(var ACaption: string): Boolean; - begin - Result := InputQuery(Application.Title, cxGetResourceString(@sdxCreateNewStyleQueryNamePrompt), ACaption); - end; - - procedure Error(const ACaption: string); - begin - MessageError(Format(cxGetResourceString(@sdxStyleSheetNameAlreadyExists), [ACaption])); - end; - -var - Unnamed: string; - I: Integer; -begin - if ACaption = '' then - begin - I := 1; - Unnamed := cxGetResourceString(@sdxUnnamedStyleSheet); - repeat - ACaption := Unnamed + ' <' + IntToStr(I) + '>'; - Inc(I); - until not ACheckProc(ACaption) or (I = MaxInt); - end; - - repeat - Result := QueryStyleSheetCaption(ACaption); - if Result and ACheckProc(ACaption) then - Error(ACaption); - until not Result or not ACheckProc(ACaption); -end; - -function TdxCustomcxControlReportLink.InitiateStyle(const ACaption: string; - var AStyle: TcxStyle; AForceCreation: Boolean): Boolean; -begin - Result := AForceCreation or (AStyle = nil) or (GetStyleConsumerCount(AStyle) > 1); - if Result then - AStyle := CreateStyle(ACaption); -end; - -procedure TdxCustomcxControlReportLink.StyleRestoreDefaults(const ACaption: string; - AStyle: TcxStyle); -var - Params: TcxViewParams; -begin - Styles.GetDefaultViewParamsByCaption(ACaption, nil, Params); - with AStyle do - begin - Bitmap.Assign(Params.Bitmap); - Color := Params.Color; - Font := Params.Font; - TextColor := Params.TextColor; - end; -end; - -procedure TdxCustomcxControlReportLink.StyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - if DesignWindow <> nil then - DesignWindow.DoStyleChanged(ACaption, AStyle); - LinkModified(True); -end; - -function TdxCustomcxControlReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := False; -end; - -function TdxCustomcxControlReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TdxCustomReportLinkStyles; -end; - -function TdxCustomcxControlReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TdxCustomReportLinkStyleSheet; -end; - -function TdxCustomcxControlReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := nil; -end; - -procedure TdxCustomcxControlReportLink.PrepareConstruct; -begin - FScreenDC := GetDC(0); - FDelimitersHorz.Clear; - FDelimitersVert.Clear; - FImageLists.Clear; - if OptionsRefinements.DisplayGraphicsAsText then - TdxPSGraphicAsTextDataMap.Register; -end; - -procedure TdxCustomcxControlReportLink.UnprepareConstruct; -begin - if OptionsRefinements.DisplayGraphicsAsText then - TdxPSGraphicAsTextDataMap.Unregister; - ReleaseDC(0, FScreenDC); -end; - -function TdxCustomcxControlReportLink.GetActiveStyles: TdxCustomReportLinkStyles; -begin - Result := Styles; - if Result.StyleSheet <> nil then - Result := Result.StyleSheet.GetStyles as TdxCustomReportLinkStyles; -end; - -function TdxCustomcxControlReportLink.GetDesignWindow: TdxfmCustomcxControlReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TdxfmCustomcxControlReportLinkDesignWindow; -end; - -function TdxCustomcxControlReportLink.GetEffects3D: Boolean; -begin - Result := OptionsFormatting.LookAndFeelKind <> lfUltraFlat; -end; - -function TdxCustomcxControlReportLink.GetImageList(Index: Integer): TCustomImageList; -begin - Result := TCustomImageList(FImageLists[Index]); -end; - -function TdxCustomcxControlReportLink.GetImageListCount: Integer; -begin - Result := FImageLists.Count; -end; - -function TdxCustomcxControlReportLink.GetOptions(Index: Integer): TdxCustomReportLinkOptions; -begin - Result := TdxCustomReportLinkOptions(FOptions[Index]); -end; - -function TdxCustomcxControlReportLink.GetOptionsCount: Integer; -begin - if FOptions <> nil then - Result := FOptions.Count - else - Result := 0; -end; - -function TdxCustomcxControlReportLink.GetSoft3D: Boolean; -begin - Result := OptionsFormatting.LookAndFeelKind = lfFlat; -end; - -procedure TdxCustomcxControlReportLink.SetOptionsExpanding(Value: TdxCustomReportLinkOptionsExpanding); -begin - OptionsExpanding.Assign(Value); -end; - -procedure TdxCustomcxControlReportLink.SetOptionsFormatting(Value: TdxCustomReportLinkOptionsFormatting); -begin - OptionsFormatting.Assign(Value); -end; - -procedure TdxCustomcxControlReportLink.SetOptionsPagination(Value: TdxCustomReportLinkOptionsPagination); -begin - OptionsPagination.Assign(Value); -end; - -procedure TdxCustomcxControlReportLink.SetOptionsRefinements(Value: TdxCustomReportLinkOptionsRefinements); -begin - OptionsRefinements.Assign(Value); -end; - -procedure TdxCustomcxControlReportLink.SetOptionsSize(Value: TdxCustomReportLinkOptionsSize); -begin - OptionsSize.Assign(Value); -end; - -procedure TdxCustomcxControlReportLink.SetOptionsView(Value: TdxCustomReportLinkOptionsView); -begin - OptionsView.Assign(Value); -end; - -procedure TdxCustomcxControlReportLink.SetStyleRepository(Value: TcxStyleRepository); -begin - if FStyleRepository <> Value then - begin - FStyleRepository := Value; - if FStyleRepository <> nil then - FStyleRepository.FreeNotification(Self); - end; -end; - -procedure TdxCustomcxControlReportLink.SetStyles(Value: TdxCustomReportLinkStyles); -begin - Styles.Assign(Value); -end; - -procedure TdxCustomcxControlReportLink.SetSupportedCustomDraw(Value: Boolean); -begin - if FSupportedCustomDraw <> Value then - begin - FSupportedCustomDraw := Value; - LinkModified(True); - end; -end; - -{ TdxCustomTableControlReportLinkOptions } - -function TdxCustomTableControlReportLinkOptions.GetReportLink: TdxCustomTableControlReportLink; -begin - Result := inherited ReportLink as TdxCustomTableControlReportLink; -end; - -{ TdxCustomTableControlReportLinkOptionsOnEveryPage } - -procedure TdxCustomTableControlReportLinkOptionsOnEveryPage.Assign(Source: TPersistent); -begin - if Source is TdxCustomTableControlReportLinkOptionsOnEveryPage then - with TdxCustomTableControlReportLinkOptionsOnEveryPage(Source) do - begin - Self.BandHeaders := BandHeaders; - Self.Footers := Footers; - Self.Headers := Headers; - end; - inherited; -end; - -procedure TdxCustomTableControlReportLinkOptionsOnEveryPage.RestoreDefaults; -begin - inherited; - BandHeaders := True; - Headers := True; - Footers := True; -end; - -procedure TdxCustomTableControlReportLinkOptionsOnEveryPage.SetBandHeaders(Value: Boolean); -begin - if FBandHeaders <> Value then - begin - FBandHeaders := Value; - Changed; - end; -end; - -procedure TdxCustomTableControlReportLinkOptionsOnEveryPage.SetFooters(Value: Boolean); -begin - if FFooters <> Value then - begin - FFooters := Value; - Changed; - end; -end; - -procedure TdxCustomTableControlReportLinkOptionsOnEveryPage.SetHeaders(Value: Boolean); -begin - if FHeaders <> Value then - begin - FHeaders := Value; - Changed; - end; -end; - -{ TdxCustomTableControlReportLinkOptionsPagination } - -procedure TdxCustomTableControlReportLinkOptionsPagination.Assign(Source: TPersistent); -begin - if Source is TdxCustomTableControlReportLinkOptionsPagination then - with TdxCustomTableControlReportLinkOptionsPagination(Source) do - begin - Self.Band := Band; - Self.Column := Column; - Self.Custom := Custom; - Self.Row := Row; - end; - inherited; -end; - -procedure TdxCustomTableControlReportLinkOptionsPagination.RestoreDefaults; -begin - inherited; - Band := False; - Column := True; - Custom := False; - Row := True; -end; - -function TdxCustomTableControlReportLinkOptionsPagination.GetColumn: Boolean; -begin - Result := ReportLink.UseHorzDelimiters; -end; - -function TdxCustomTableControlReportLinkOptionsPagination.GetRow: Boolean; -begin - Result := ReportLink.UseVertDelimiters; -end; - -procedure TdxCustomTableControlReportLinkOptionsPagination.SetBand(Value: Boolean); -begin - if FBand <> Value then - begin - FBand := Value; - if Value then - Column := False; - Changed; - end; -end; - -procedure TdxCustomTableControlReportLinkOptionsPagination.SetColumn(Value: Boolean); -begin - ReportLink.UseHorzDelimiters := Value; - if Value then - Band := False; -end; - -procedure TdxCustomTableControlReportLinkOptionsPagination.SetCustom(Value: Boolean); -begin - if FCustom <> Value then - begin - FCustom := Value; - Changed; - end; -end; - -procedure TdxCustomTableControlReportLinkOptionsPagination.SetRow(Value: Boolean); -begin - ReportLink.UseVertDelimiters := Value; -end; - -{ TdxCustomTableControlReportLinkOptionsPreview } - -procedure TdxCustomTableControlReportLinkOptionsPreview.Assign(Source: TPersistent); -begin - if Source is TdxCustomTableControlReportLinkOptionsPreview then - with TdxCustomTableControlReportLinkOptionsPreview(Source) do - begin - Self.AutoHeight := AutoHeight; - Self.MaxLineCount := MaxLineCount; - Self.Visible := Visible; - end; - inherited; -end; - -procedure TdxCustomTableControlReportLinkOptionsPreview.RestoreDefaults; -begin - inherited; - AutoHeight := True; - MaxLineCount := 0; - Visible := True; -end; - -procedure TdxCustomTableControlReportLinkOptionsPreview.SetAutoHeight(Value: Boolean); -begin - if FAutoHeight <> Value then - begin - FAutoHeight := Value; - if Visible then Changed; - end; -end; - -procedure TdxCustomTableControlReportLinkOptionsPreview.SetMaxLineCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FMaxLineCount <> Value then - begin - FMaxLineCount := Value; - if Visible then Changed; - end; -end; - -procedure TdxCustomTableControlReportLinkOptionsPreview.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - FVisible := Value; - Changed; - end; -end; - -{ TdxCustomTableControlReportLinkOptionsSelection } - -procedure TdxCustomTableControlReportLinkOptionsSelection.Assign(Source: TPersistent); -begin - if Source is TdxCustomTableControlReportLinkOptionsSelection then - with TdxCustomTableControlReportLinkOptionsSelection(Source) do - begin - Self.ProcessExactSelection := ProcessExactSelection; - Self.ProcessSelection := ProcessSelection; - end; - inherited; -end; - -procedure TdxCustomTableControlReportLinkOptionsSelection.RestoreDefaults; -begin - inherited; - ProcessExactSelection := False; - ProcessSelection := False; -end; - -procedure TdxCustomTableControlReportLinkOptionsSelection.SetProcessExactSelection(Value: Boolean); -begin - if FProcessExactSelection <> Value then - begin - FProcessExactSelection := Value; - if ProcessSelection then Changed; - end; -end; - -procedure TdxCustomTableControlReportLinkOptionsSelection.SetProcessSelection(Value: Boolean); -begin - if FProcessSelection <> Value then - begin - FProcessSelection := Value; - Changed; - end; -end; - -{ TdxCustomTableControlReportLinkOptionsView } - -procedure TdxCustomTableControlReportLinkOptionsView.Assign(Source: TPersistent); -begin - if Source is TdxCustomTableControlReportLinkOptionsView then - with TdxCustomTableControlReportLinkOptionsView(Source) do - begin - Self.BandHeaders := BandHeaders; - Self.ExpandButtons := ExpandButtons; - Self.Footers := Footers; - Self.Headers := Headers; - end; - inherited; -end; - -procedure TdxCustomTableControlReportLinkOptionsView.RestoreDefaults; -begin - inherited; - BandHeaders := True; - ExpandButtons := True; - Footers := True; - Headers := True; -end; - -procedure TdxCustomTableControlReportLinkOptionsView.SetBandHeaders(Value: Boolean); -begin - if FBandHeaders <> Value then - begin - FBandHeaders := Value; - Changed; - end; -end; - -procedure TdxCustomTableControlReportLinkOptionsView.SetExpandButtons(Value: Boolean); -begin - if FExpandButtons <> Value then - begin - FExpandButtons := Value; - Changed; - end; -end; - -procedure TdxCustomTableControlReportLinkOptionsView.SetFooters(Value: Boolean); -begin - if FFooters <> Value then - begin - FFooters := Value; - Changed; - end; -end; - -procedure TdxCustomTableControlReportLinkOptionsView.SetHeaders(Value: Boolean); -begin - if FHeaders <> Value then - begin - FHeaders := Value; - Changed; - end; -end; - -{ TdxCustomTableControlReportLink } - -procedure TdxCustomTableControlReportLink.Assign(Source: TPersistent); -begin - if Source is TdxCustomTableControlReportLink then - with TdxCustomTableControlReportLink(Source) do - begin - Self.OptionsOnEveryPage := OptionsOnEveryPage; - Self.OptionsPreview := OptionsPreview; - Self.OptionsSelection := OptionsSelection; - end; - inherited; -end; - -procedure TdxCustomTableControlReportLink.InternalRestoreDefaults; -begin - inherited; - OptionsOnEveryPage.RestoreDefaults; - OptionsPreview.RestoreDefaults; - OptionsSelection.RestoreDefaults; -end; - -procedure TdxCustomTableControlReportLink.CreateOptions; -begin - inherited; - FOptionsOnEveryPage := GetOptionsOnEveryPageClass.Create(Self); - FOptionsPreview := GetOptionsPreviewClass.Create(Self); - FOptionsSelection := GetOptionsSelectionClass.Create(Self); -end; - -procedure TdxCustomTableControlReportLink.DestroyOptions; -begin - FreeAndNil(FOptionsSelection); - FreeAndNil(FOptionsPreview); - FreeAndNil(FOptionsOnEveryPage); - inherited; -end; - -function TdxCustomTableControlReportLink.GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; -begin - Result := TdxCustomTableControlReportLinkOptionsOnEveryPage; -end; - -function TdxCustomTableControlReportLink.GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; -begin - Result := TdxCustomReportLinkOptionsPagination; -end; - -function TdxCustomTableControlReportLink.GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; -begin - Result := TdxCustomTableControlReportLinkOptionsPreview; -end; - -function TdxCustomTableControlReportLink.GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; -begin - Result := TdxCustomTableControlReportLinkOptionsSelection; -end; - -function TdxCustomTableControlReportLink.GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; -begin - Result := TdxCustomTableControlReportLinkOptionsView; -end; - -function TdxCustomTableControlReportLink.GetOptionsPagination: TdxCustomTableControlReportLinkOptionsPagination; -begin - Result := inherited OptionsPagination as TdxCustomTableControlReportLinkOptionsPagination; -end; - -function TdxCustomTableControlReportLink.GetOptionsView: TdxCustomTableControlReportLinkOptionsView; -begin - Result := inherited OptionsView as TdxCustomTableControlReportLinkOptionsView; -end; - -procedure TdxCustomTableControlReportLink.SetOptionsOnEveryPage(Value: TdxCustomTableControlReportLinkOptionsOnEveryPage); -begin - OptionsOnEveryPage.Assign(Value); -end; - -procedure TdxCustomTableControlReportLink.SetOptionsPagination(Value: TdxCustomTableControlReportLinkOptionsPagination); -begin - inherited OptionsPagination := Value; -end; - -procedure TdxCustomTableControlReportLink.SetOptionsPreview(Value: TdxCustomTableControlReportLinkOptionsPreview); -begin - OptionsPreview.Assign(Value); -end; - -procedure TdxCustomTableControlReportLink.SetOptionsSelection(Value: TdxCustomTableControlReportLinkOptionsSelection); -begin - OptionsSelection.Assign(Value); -end; - -procedure TdxCustomTableControlReportLink.SetOptionsView(Value: TdxCustomTableControlReportLinkOptionsView); -begin - inherited OptionsView := Value; -end; - -{ TdxfmCustomcxControlReportLinkDesignWindow } - -procedure TdxfmCustomcxControlReportLinkDesignWindow.DoInitialize; -begin - inherited; - RefreshStyleSheetList; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.CanCopyStyleSheet: Boolean; -begin - Result := CanCreateStyleSheet and (ActiveStyleSheet <> nil); -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.CanCreateStyleSheet: Boolean; -begin - Result := AreNativeStylesAvailable and ReportLink.CanCreateComponent; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.CanDeleteStyleSheet: Boolean; -begin - Result := AreNativeStylesAvailable and (ActiveStyleSheet <> nil) and - (IsDesigning or not ActiveStyleSheet.BuiltIn); -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.CanRenameStyleSheet: Boolean; -begin - Result := AreNativeStylesAvailable and (ActiveStyleSheet <> nil) and - (IsDesigning or not ActiveStyleSheet.BuiltIn); -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.CanSaveStyles: Boolean; -begin - Result := AreNativeStylesAvailable and ReportLink.CanCreateComponent; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.PerformStyleSheetCopy: Boolean; -var - Caption: string; -begin - Result := CanCopyStyleSheet; - if Result then - begin - Caption := ''; - if (ActiveStyleSheet <> nil) and (ActiveStyleSheet.Caption <> '') then - Caption := cxGetResourceString(@sdxCopyOfItem) + ActiveStyleSheet.Caption; - - Result := GetStyleSheetCaption(Caption); - if Result then - begin - ActiveStyleSheet := ReportLink.CreateStyleSheet(ActiveStyleSheet, Caption, False); - RefreshStyleSheetList; - end; - end; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.PerformStyleSheetDelete: Boolean; - - function QueryDeleteStyleSheet(AStyleSheet: TcxCustomStyleSheet): Boolean; - begin - Result := dxPSUtl.MessageQuestion(Format(cxGetResourceString(@sdxDeleteStyleSheet), [AStyleSheet.Caption])); - end; - -var - StyleSheet: TcxCustomStyleSheet; - Index: Integer; -begin - Result := CanDeleteStyleSheet; - if Result then - begin - StyleSheet := ActiveStyleSheet; - Result := (StyleSheet <> nil) and QueryDeleteStyleSheet(StyleSheet); - if Result then - begin - Index := StyleSheet.Index; - StyleSheet.Free; - if Index >= StyleRepository.StyleSheetCount then - Index := StyleRepository.StyleSheetCount - 1; - if Index <> -1 then - ActiveStyleSheet := StyleRepository.StyleSheets[Index]; - RefreshStyleSheetList; - end; - end; -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.PerformStyleSheetDrawItem(ACanvas: TCanvas; - AnIndex: Integer; R: TRect; AState: TOwnerDrawState; AEnabled: Boolean); - - function CalculateMaxWidth(AStrings: TStrings): Integer; - var - I, W: Integer; - begin - Result := 0; - with AStrings do - for I := 0 to Count - 1 do - begin - W := ACanvas.TextWidth(Strings[I]); - if Result < W then Result := W; - end; - end; - -var - StyleSheets: TStrings; - StyleSheet: TcxCustomStyleSheet; - X, Y, W: Integer; - S: string; -begin - with ACanvas do - begin - FillRect(R); - - GetStyleSheetNames(StyleSheets); - if StyleSheets <> nil then - begin - with R do - begin - X := Left + 2; - Y := Top + (Bottom - Top - TextHeight('Wq')) div 2; - end; - S := StyleSheets[AnIndex]; - if not AEnabled then - Font.Color := clBtnShadow; - TextOut(X, Y, S); - - if not IsDesigning then - begin - StyleSheet := TcxCustomStyleSheet(StyleSheets.Objects[AnIndex]); - if StyleSheet.BuiltIn then - S := cxGetResourceString(@sdxBuiltIn) - else - S := cxGetResourceString(@sdxUserDefined); - W := CalculateMaxWidth(StyleSheets); - if W <> 0 then - X := R.Left + W + 15; - - if not (odSelected in AState) and AEnabled then - Font.Color := clBlue; - TextOut(X, Y, S); - Font.Color := clWindowText; - end; - end; - end; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.PerformStyleSheetKeyDown(Sender: TObject; - var AKey: Word; AShift: TShiftState): Boolean; -begin - Result := True; - case AKey of - VK_F2: - Result := PerformStyleSheetRename; - VK_INSERT: - if ssCtrl in AShift then - Result := PerformStyleSheetCopy - else - Result := PerformStyleSheetNew; - VK_DELETE: - Result := PerformStyleSheetDelete; - end; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.PerformStyleSheetNew: Boolean; -var - Caption: string; -begin - Caption := ''; - Result := CanCreateStyleSheet and GetStyleSheetCaption(Caption); - if Result then - begin - ActiveStyleSheet := ReportLink.CreateStyleSheet(nil, Caption, False); - RefreshStyleSheetList; - end; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.PerformStyleSheetRename: Boolean; -var - Caption: string; -begin - Caption := ActiveStyleSheet.Caption; - Result := CanRenameStyleSheet and GetStyleSheetCaption(Caption); - if Result then - begin - ActiveStyleSheet.Caption := Caption; - RefreshStyleSheetList; - end; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.PerformStylesChangeBitmap: Boolean; - - procedure ShowError(const AFileName: string); - begin - dxPSUtl.MessageError(Format(cxGetResourceString(@sdxCannotLoadImage), [AFileName])); - end; - -var - Styles: TStrings; - Picture: TPicture; - I: Integer; - cxStyle: TcxStyle; -begin - Styles := TStringList.Create; - try - GetSelectedStyleNames(Styles); - Result := Styles.Count <> 0; - if Result then - begin - Picture := TPicture.Create; - try - Result := dxPSPictureDialog.Execute; - if Result then - begin - try - Picture.LoadFromFile(dxPSPictureDialog.FileName); - dxPSUtl.ForcePictureToBitmap(Picture); - except - ShowError(dxPSPictureDialog.FileName); - raise; - end; - - for I := 0 to Styles.Count - 1 do - begin - cxStyle := TcxStyle(Styles.Objects[I]); - InitiateStyle(Styles[I], cxStyle, False); - cxStyle.Bitmap := Picture.Bitmap; - end; - DoStylesChanged(Styles, False); - end; - finally - Picture.Free; - end; - end; - finally - Styles.Free; - end; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.PerformStylesChangeColor: Boolean; -var - Styles: TStrings; - I: Integer; - cxStyle: TcxStyle; - Params: TcxViewParams; - StyleColor: TColor; -begin - Styles := TStringList.Create; - try - GetSelectedStyleNames(Styles); - Result := Styles.Count <> 0; - if Result then - begin - cxStyle := TcxStyle(Styles.Objects[0]); - if cxStyle = nil then - begin - ReportLink.Styles.GetDefaultViewParamsByCaption(Styles[0], nil, Params); - StyleColor := Params.Color; - end - else - StyleColor := cxStyle.Color; - dxPSGlbl.ColorDialog.Color := StyleColor; - - Result := dxPSGlbl.ColorDialog.Execute; - if Result then - begin - for I := 0 to Styles.Count - 1 do - begin - cxStyle := TcxStyle(Styles.Objects[I]); - InitiateStyle(Styles[I], cxStyle, False); - cxStyle.Color := dxPSGlbl.ColorDialog.Color; - end; - DoStylesChanged(Styles, False); - end; - end; - finally - Styles.Free; - end; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.PerformStylesChangeFont: Boolean; -var - Styles: TStrings; - I: Integer; - cxStyle: TcxStyle; - Params: TcxViewParams; - StyleFont: TFont; -begin - Styles := TStringList.Create; - try - GetSelectedStyleNames(Styles); - Result := Styles.Count <> 0; - if Result then - begin - cxStyle := TcxStyle(Styles.Objects[0]); - if cxStyle = nil then - begin - ReportLink.Styles.GetDefaultViewParamsByCaption(Styles[0], nil, Params); - StyleFont := Params.Font; - StyleFont.Color := Params.TextColor; - end - else - begin - StyleFont := cxStyle.Font; - StyleFont.Color := cxStyle.TextColor; - end; - dxPSGlbl.FontDialog.Font := StyleFont; - - Result := dxPSGlbl.FontDialog.Execute; - if Result then - begin - for I := 0 to Styles.Count - 1 do - begin - cxStyle := TcxStyle(Styles.Objects[I]); - InitiateStyle(Styles[I], cxStyle, False); - cxStyle.Font := dxPSGlbl.FontDialog.Font; - cxStyle.TextColor := cxStyle.Font.Color; - end; - DoStylesChanged(Styles, True); - end; - end; - finally - Styles.Free; - end; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.PerformStylesClearBitmap: Boolean; -var - Names: TStrings; - I: Integer; - cxStyle: TcxStyle; -begin - Names := TStringList.Create; - try - GetSelectedStyleNames(Names); - Result := Names.Count <> 0; - - for I := 0 to Names.Count - 1 do - begin - cxStyle := TcxStyle(Names.Objects[I]); - if cxStyle <> nil then - cxStyle.Bitmap := nil; - end; - DoStylesChanged(Names, False); - finally - Names.Free; - end; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.PerformStylesRestoreDefaults: Boolean; -var - Names: TStrings; - I: Integer; - cxStyle: TcxStyle; -begin - Names := TStringList.Create; - try - GetSelectedStyleNames(Names); - Result := Names.Count <> 0; - for I := 0 to Names.Count - 1 do - begin - cxStyle := TcxStyle(Names.Objects[I]); - if cxStyle <> nil then - ReportLink.StyleRestoreDefaults(Names[I], cxStyle); - end; - DoStylesChanged(Names, True); - finally - Names.Free; - end; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.PerformStylesSaveAsStyleSheet: Boolean; -var - Caption: string; -begin - Caption := ''; - Result := CanSaveStyles and GetStyleSheetCaption(Caption); - if Result then - begin - ActiveStyleSheet := ReportLink.CreateStyleSheet(nil, Caption, True); - RefreshStyleSheetList; - end; -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.RefreshStyleSheetList; -var - Names: TStrings; - K, I: Integer; - Unnamed, S: string; - StyleSheet: TcxCustomStyleSheet; -begin - GetStyleSheetNames(Names); - if Names <> nil then - begin - Names.BeginUpdate; - try - Names.Clear; - if StyleRepository <> nil then - begin - K := 0; - Unnamed := cxGetResourceString(@sdxUnnamedStyleSheet); - for I := 0 to StyleRepository.StyleSheetCount - 1 do - begin - StyleSheet := StyleRepository.StyleSheets[I]; - if StyleSheet is ReportLink.GetStyleSheetClass then - begin - S := StyleSheet.Caption; - if S = '' then - begin - Inc(K); - S := Unnamed + ' <' + IntToStr(K) + '>'; - end; - Names.AddObject(S, StyleSheet); - end; - end; - end; - finally - Names.EndUpdate; - end; - DoActiveStyleSheetChanged; - end; -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.RefreshStylesList; -begin - DoRefreshStylesList; -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - RefreshStylesList; - //DoStylesChanged(nil, True); -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.DoRefreshStylesList; -begin -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.GetDesignerTabIndex: Integer; -begin - Result := 0; -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.SetDesignerTabIndex(Value: Integer); -begin -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -begin -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := nil; -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := nil; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.GetStyleConsumerCount(AStyle: TcxStyle): Integer; -begin - Result := ReportLink.GetStyleConsumerCount(AStyle); -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.GetStyleSheetCaption(var ACaption: string): Boolean; -begin - Result := ReportLink.GetStyleSheetCaption(HasStyleSheetWithCaption, ACaption); -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.HasStyleSheetWithCaption(const ACaption: string): Boolean; -var - Strings: TStrings; - I: Integer; -begin - Result := True; - GetStyleSheetNames(Strings); - if Strings <> nil then - for I := 0 to Strings.Count - 1 do - if dxSameText(Strings[I], ACaption) then Exit; - Result := False; -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.InitiateStyle(const ACaption: string; - var AStyle: TcxStyle; AForceCreation: Boolean); -var - Names: TStrings; -begin - if ReportLink.InitiateStyle(ACaption, AStyle, AForceCreation) then - begin - GetStyleNames(Names); - if Names <> nil then - Names.Objects[Names.IndexOf(ACaption)] := AStyle; - end; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.GetActiveStyleSheet: TcxCustomStyleSheet; -begin - Result := ReportLink.Styles.StyleSheet; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.GetAreNativeStylesAvailable: Boolean; -begin - Result := ReportLink.AreNativeStylesAvailable; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.GetReportLink: TdxCustomcxControlReportLink; -begin - Result := inherited ReportLink as TdxCustomcxControlReportLink; -end; - -function TdxfmCustomcxControlReportLinkDesignWindow.GetStyleRepository: TcxStyleRepository; -begin - Result := ReportLink.StyleRepository; -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.SetActiveStyleSheet(Value: TcxCustomStyleSheet); -begin - if ReportLink.Styles.StyleSheet <> Value then - begin - ReportLink.Styles.StyleSheet := Value; - DoActiveStyleSheetChanged; - end; -end; - -procedure TdxfmCustomcxControlReportLinkDesignWindow.WMActivate(var message: TWMActivate); -begin - inherited; - DoFormActivated(message.Active <> WA_INACTIVE); -end; - -{ TdxStylesListBoxToolTipsWindow } - -procedure TdxStylesListBoxToolTipsWindow.Activate(const R: TRect; AnIndex: Integer); -const - ShowFlags = SWP_SHOWWINDOW or SWP_NOACTIVATE; -begin - Application.CancelHint; - FStyleIndex := AnIndex; - with R do - SetWindowPos(Handle, HWND_TOPMOST, Left, Top, Right - Left, Bottom - Top, ShowFlags); - Update; -end; - -procedure TdxStylesListBoxToolTipsWindow.Deactivate; -const - HideFlags = SWP_NOZORDER or SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE or SWP_HIDEWINDOW; -begin - SetWindowPos(Handle, 0, 0, 0, 0, 0, HideFlags); - FStyleIndex := -1; -end; - -function TdxStylesListBoxToolTipsWindow.GetListBox: TdxStylesListBox; -begin - Result := TdxStylesListBox(Owner); -end; - -procedure TdxStylesListBoxToolTipsWindow.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params do - begin - ExStyle := WS_EX_TOOLWINDOW or WS_EX_TOPMOST; - Style := WS_POPUP;// or WS_DISABLED; - WindowClass.Style := WindowClass.Style or CS_SAVEBITS; - if IsWin32Version(5, 1) then - WindowClass.Style := WindowClass.Style or CS_DROPSHADOW; - end; -end; - -procedure TdxStylesListBoxToolTipsWindow.Paint; -var - R: TRect; -begin - R := ClientRect; - DrawBorder(Canvas.Handle, R); - InflateRect(R, -1, -1); - DrawStyle(R); -end; - -procedure TdxStylesListBoxToolTipsWindow.CalculateStyleBarViewInfo(const R: TRect; - var AViewInfo: TdxStyleBarViewInfo); -var - cxStyle: TcxStyle; - Pt: TPoint; -begin - with ListBox do - begin - cxStyle := ReportLinkStyles.StylesByCaption[HotTrackStyleName]; - CalculateStyleBarViewInfo(HotTrackStyleName, StyleIndex, cxStyle, R, False, AViewInfo); - end; - with AViewInfo do - begin - BarColor := clInfoBk; - - Pt := R.TopLeft; - MapWindowPoints(Handle, ListBox.Handle, Pt, 1); - StyleBitmapOrg.X := -(Pt.X - R.Left); - StyleBitmapOrg.Y := -(Pt.Y - R.Top); - end; -end; - -procedure TdxStylesListBoxToolTipsWindow.DrawBorder(DC: HDC; const R: TRect); -var - R2: TRect; -begin - {$IFDEF DELPHI7} - with Themes.ThemeServices do - if ThemesEnabled then - begin - DrawEdge(DC, GetElementDetails(twWindowRoot), R, BDR_RAISEDOUTER, BF_RECT); - Exit; - end; - {$ENDIF} - R2 := R; - DrawEdge(DC, R2, BDR_RAISEDOUTER, BF_RECT) -end; - -procedure TdxStylesListBoxToolTipsWindow.DrawStyle(R: TRect); -var - ViewInfo: TdxStyleBarViewInfo; -begin - dxPScxCommon.InitializeStyleBarViewInfo(ViewInfo); - try - CalculateStyleBarViewInfo(R, ViewInfo); - dxPScxCommon.dxPSDrawStyleBar(Canvas, R, ViewInfo); - finally - dxPScxCommon.DeinitializeStyleBarViewInfo(ViewInfo); - end; -end; - -procedure TdxStylesListBoxToolTipsWindow.WMEraseBkgnd(var message: TWMEraseBkgnd); -begin - message.Result := 1; -end; - -procedure TdxStylesListBoxToolTipsWindow.WMNCHitTest(var message: TWMNCHitTest); -begin - message.Result := HTTRANSPARENT; -end; - -{ TdxStylesListBox } - -constructor TdxStylesListBox.Create(AOwner: TComponent); -begin - inherited; - MultiSelect := True; - Style := lbOwnerDrawVariable; - FToolTips := True; - - HotTrackStyleIndex := -1; - - FToolTipsLongHideTimer := TTimer.Create(Self); - FToolTipsLongHideTimer.Enabled := False; - FToolTipsLongHideTimer.Interval := 5000; - FToolTipsLongHideTimer.OnTimer := ToolTipsLongHideTimerHandler; - - FToolTipsShortHideTimer := TTimer.Create(Self); - FToolTipsShortHideTimer.Enabled := False; - FToolTipsShortHideTimer.Interval := 1; - FToolTipsShortHideTimer.OnTimer := ToolTipsShortHideTimerHandler; -end; - -procedure TdxStylesListBox.HideToolTips; -begin - if ToolTipsWindow <> nil then ToolTipsWindow.Deactivate; - HotTrackStyleIndex := -1; - FToolTipsLongHideTimer.Enabled := False; - FToolTipsShortHideTimer.Enabled := False; -end; - -function TdxStylesListBox.IndexOfStyle(AStyle: TcxStyle): Integer; -begin - Result := Items.IndexOfObject(AStyle); -end; - -procedure TdxStylesListBox.DrawItem(Index: Integer; Rect: TRect; - State: TOwnerDrawState); -var - S: string; - cxStyle: TcxStyle; - ViewInfo: TdxStyleBarViewInfo; -begin - dxPScxCommon.InitializeStyleBarViewInfo(ViewInfo); - try - S := Items[Index]; - cxStyle := ReportLinkStyles.StylesByCaption[S]; - CalculateStyleBarViewInfo(S, -1, cxStyle, Rect, odSelected in State, ViewInfo); - dxPScxCommon.dxPSDrawStyleBar(Canvas, Rect, ViewInfo); - Perform(LB_SETHORIZONTALEXTENT, ViewInfo.MaxWidth, 0); - finally - dxPScxCommon.DeinitializeStyleBarViewInfo(ViewInfo); - end; -end; - -procedure TdxStylesListBox.MeasureItem(Index: Integer; var Height: Integer); -var - S: string; - H1, H2: Integer; - cxStyle: TcxStyle; - Params: TcxViewParams; - StyleFont: TFont; -begin - S := Items[Index]; - Canvas.Font := Font; - H1 := Canvas.TextHeight(S); - cxStyle := ReportLinkStyles.StylesByCaption[S]; - if cxStyle = nil then - begin - ReportLinkStyles.GetDefaultViewParamsByCaption(S, nil, Params); - StyleFont := Params.Font; - end - else - StyleFont := cxStyle.Font; - - if StyleFont <> nil then - Canvas.Font := StyleFont; - H2 := Canvas.TextHeight('Wq'); - - Height := H1; - if Height < H2 then Height := H2; - Inc(Height, 1 + 1); -end; - -procedure TdxStylesListBox.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited; - if ToolTips then UpdateToolTips(MakePoint(X, Y)); -end; - -function CompareItemsAsIntegers(AnItem1, AnItem2: Pointer): Integer; -begin - Result := Integer(AnItem2) - Integer(AnItem1); -end; - -procedure TdxStylesListBox.CalculateStyleBarViewInfoSizes(AnIndex: Integer; - const R: TRect; var AViewInfo: TdxStyleBarViewInfo); - - procedure CalculateStyleBarViewInfoSizesForRow(AnIndex: Integer; - var ACaptionMaxWidth, AFontInfoMaxWidth: Integer); - var - S: string; - cxStyle: TcxStyle; - Params: TcxViewParams; - StyleFont: TFont; - begin - S := Items[AnIndex]; - Canvas.Font := Font; - ACaptionMaxWidth := Canvas.TextWidth(S); - - cxStyle := ReportLinkStyles.StylesByCaption[S]; - if cxStyle = nil then - begin - ReportLinkStyles.GetDefaultViewParamsByCaption(S, nil, Params); - StyleFont := Params.Font; - end - else - StyleFont := cxStyle.Font; - if StyleFont <> nil then - Canvas.Font := StyleFont; - AFontInfoMaxWidth := Canvas.TextWidth(dxPSUtl.FormatFontInfo(StyleFont)) + 2; - end; - - function GetMaxValue(AList: TList): Integer; - begin - AList.Sort(CompareItemsAsIntegers); - Result := Integer(AList[0]); - end; - -const - ColorBoxWidth = 60; -var - WidthList: TList; - F: TFont; - CaptionMaxWidth, I, W, FW: Integer; -begin - WidthList := TList.Create; - try - WidthList.Count := Items.Count; - - Canvas.Font := Font; - F := TFont.Create; - try - F.Assign(Canvas.Font); - CaptionMaxWidth := 0; - for I := 0 to Items.Count - 1 do - begin - FW := Integer(WidthList[I]); - CalculateStyleBarViewInfoSizesForRow(I, W, FW); - WidthList[I] := Pointer(FW); - if W > CaptionMaxWidth then CaptionMaxWidth := W; - end; - if AnIndex <> -1 then - begin - WidthList.Count := 1; - FW := Integer(WidthList[0]); - CalculateStyleBarViewInfoSizesForRow(AnIndex, W, FW); - WidthList[0] := Pointer(FW); - Canvas.Font := F; - end; - finally - F.Free; - end; - if CaptionMaxWidth <> 0 then Inc(CaptionMaxWidth, 6); - - AViewInfo.MaxWidth := CaptionMaxWidth + ColorBoxWidth + GetMaxValue(WidthList); - - with AViewInfo do - begin - StyleCaptionBoxBounds := R; - StyleCaptionBoxBounds.Right := StyleCaptionBoxBounds.Left + CaptionMaxWidth; - - StyleColorBoxBounds := R; - StyleColorBoxBounds.Left := StyleCaptionBoxBounds.Right; - StyleColorBoxBounds.Right := StyleColorBoxBounds.Left + ColorBoxWidth; - StyleColorBoxContentBounds := StyleColorBoxBounds; - InflateRect(StyleColorBoxContentBounds, -2, -2); - - StyleFontInfoBoxBounds := R; - StyleFontInfoBoxBounds.Left := StyleColorBoxBounds.Right; - StyleFontInfoBoxBounds.Right := StyleFontInfoBoxBounds.Left + Integer(WidthList[0]); - - RestSpaceBounds := R; - RestSpaceBounds.Left := StyleFontInfoBoxBounds.Right; - end; - finally - WidthList.Free; - end; -end; - -procedure TdxStylesListBox.CalculateStyleBarViewInfoViewParams(const ACaption: string; - AStyle: TcxStyle; const R: TRect; ASelected: Boolean; var AViewInfo: TdxStyleBarViewInfo); -var - DefaultParams, Params: TcxViewParams; -begin - AViewInfo.StyleCaption := ACaption; - - ReportLinkStyles.GetDefaultViewParamsByCaption(AViewInfo.StyleCaption, nil, DefaultParams); - if AStyle <> nil then - begin - Params.Bitmap := AStyle.Bitmap; - Params.Color := AStyle.Color; - Params.Font := AStyle.Font; - Params.TextColor := clWindowText; - if Params.Color = clDefault then - Params.Color := DefaultParams.Color; - if Params.TextColor = clDefault then - Params.TextColor := DefaultParams.TextColor; - end - else - Params := DefaultParams; - - with AViewInfo do - begin - BarColor := Color; - if ASelected then - BarColor := clHighlight; - - BarStyleColorBoxFrameColor := clBtnShadow; - if ColorToRGB(BarStyleColorBoxFrameColor) = ColorToRGB(BarColor) then - BarStyleColorBoxFrameColor := clHighlightText; - - BarFont.Assign(Font); - if not Enabled then - BarFont.Color := clGrayText; - if ASelected then - BarFont.Color := clHighlightText; - if BarFont.Color = Color then - BarFont.Color := dxPSUtl.InvertColor(BarFont.Color); - - StyleBitmap.Assign(Params.Bitmap); - StyleBitmapOrg := dxPSGlbl.NullPoint; - StyleColor := Params.Color; - if Params.Font <> nil then - StyleFont.Assign(Params.Font); - - StyleTextColor := Params.TextColor; - if not Enabled then - StyleTextColor := clGrayText; - if ASelected then - StyleTextColor := clHighlightText; - if StyleTextColor = Color then - StyleTextColor := dxPSUtl.InvertColor(StyleTextColor); - end; -end; - -procedure TdxStylesListBox.CalculateStyleBarViewInfo(const ACaption: string; - AnIndex: Integer; AStyle: TcxStyle; const R: TRect; ASelected: Boolean; - var AViewInfo: TdxStyleBarViewInfo); -begin - CalculateStyleBarViewInfoSizes(AnIndex, R, AViewInfo); - CalculateStyleBarViewInfoViewParams(ACaption, AStyle, R, ASelected, AViewInfo); -end; - -function TdxStylesListBox.AreToolTipsNeeded: Boolean; -begin - Result := IsHotTrackStyleViolateControlBounds and GetParentForm(Self).Active and - dxPSGlbl.CanShowHints; -end; - -function TdxStylesListBox.FindHotTrackStyle(const Pt: TPoint): Integer; -begin - Result := ItemAtPos(Pt, True); -end; - -function TdxStylesListBox.IsHotTrackStyleViolateControlBounds: Boolean; -begin - Result := (HotTrackStyleIndex <> -1) and - ((HotTrackStyleBounds.Right - HotTrackStyleBounds.Left) > ClientWidth); -end; - -function TdxStylesListBox.IsMouseOver: Boolean; -var - Pt: TPoint; -begin - Pt := Mouse.CursorPos; - MapWindowPoints(0, Parent.Handle, Pt, 1); - Result := PtInRect(BoundsRect, Pt); -end; - -procedure TdxStylesListBox.ShowToolTips; -begin - if FToolTipsWindow = nil then - FToolTipsWindow := TdxStylesListBoxToolTipsWindow.Create(Self); - ToolTipsWindow.Activate(ToolTipsBounds, HotTrackStyleIndex); - FToolTipsLongHideTimer.Enabled := True; - FToolTipsShortHideTimer.Enabled := True; -end; - -procedure TdxStylesListBox.UpdateToolTips(const Pt: TPoint); -var - NewHotTrackStyleIndex: Integer; -begin - NewHotTrackStyleIndex := FindHotTrackStyle(Pt); - if NewHotTrackStyleIndex <> HotTrackStyleIndex then - begin - HideToolTips; - HotTrackStyleIndex := NewHotTrackStyleIndex; - if AreToolTipsNeeded then ShowToolTips; - end; -end; - -function TdxStylesListBox.GetHotTrackStyleBounds: TRect; -var - ViewInfo: TdxStyleBarViewInfo; -begin - Result := ItemRect(HotTrackStyleIndex); - MapWindowPoints(Handle, 0, Result, 2); - - dxPScxCommon.InitializeStyleBarViewInfo(ViewInfo); - try - CalculateStyleBarViewInfoSizes(HotTrackStyleIndex, Result, ViewInfo); - Result.Right := Result.Left + ViewInfo.MaxWidth; - finally - dxPScxCommon.DeinitializeStyleBarViewInfo(ViewInfo); - end; -end; - -function TdxStylesListBox.GetHotTrackStyleName: string; -begin - Result := Items[HotTrackStyleIndex]; -end; - -function TdxStylesListBox.GetStyle(Index: Integer): TcxStyle; -begin - Result := TcxStyle(Items.Objects[Index]); -end; - -function TdxStylesListBox.GetToolTipsBounds: TRect; -var - SI: TScrollInfo; -begin - Result := HotTrackStyleBounds; - - FillChar(SI, SizeOf(SI), 0); - SI.cbSize := SizeOf(SI); - SI.fMask := SIF_POS; - GetScrollInfo(Handle, SB_HORZ, SI); - - OffsetRect(Result, -SI.nPos, 0); - InflateRect(Result, 1, 1); -end; - -procedure TdxStylesListBox.SetReportLinkStyles(Value: TdxCustomReportLinkStyles); -begin - if FReportLinkStyles <> Value then - begin - FReportLinkStyles := Value; - RecreateWnd; - end; -end; - -procedure TdxStylesListBox.SetToolTips(Value: Boolean); -var - Pt: TPoint; -begin - if FToolTips <> Value then - begin - FToolTips := Value; - if ToolTips then - begin - Pt := Mouse.CursorPos; - MapWindowPoints(0, Handle, Pt, 1); - UpdateToolTips(Pt); - end - else - HideToolTips; - end; -end; - -procedure TdxStylesListBox.ToolTipsLongHideTimerHandler(Sender: TObject); -begin - HideToolTips; -end; - -procedure TdxStylesListBox.ToolTipsShortHideTimerHandler(Sender: TObject); -begin - if not IsMouseOver then HideToolTips; -end; - -procedure TdxStylesListBox.WMHScroll(var Message: TWMHScroll); -begin - inherited; - HideToolTips; -end; - -procedure TdxStylesListBox.WMMouseWheel(var Message: TWMMouseWheel); -begin - inherited; - {if message.WheelDelta > 0 then CheckUpScroll} - HideToolTips; -end; - -procedure TdxStylesListBox.WMVScroll(var Message: TWMVScroll); -begin - inherited; - HideToolTips; -end; - -procedure RegisterAssistants; -begin - TdxPSCustomDataMap.Register; - TdxPSTextDataMap.Register; - TdxPSMemoDataMap.Register; - TdxPSHyperLinkDataMap.Register; - TdxPSCheckDataMap.Register; - TdxPSRadioButtonGroupDataMap.Register; - TdxPSGraphicDataMap.Register; - TdxPSImageDataMap.Register; - TdxPSBlobDataMap.Register; -end; - -procedure RegisterItems; -begin - TdxReportCellPreviewText.Register; -end; - -procedure UnregisterAssistants; -begin - TdxPSDataMaps.ReleaseInstance; -end; - -procedure UnregisterItems; -begin - TdxReportCellPreviewText.Unregister; -end; - -procedure FreeAndNilPreviewPictures; -var - I: Integer; -begin - for I := 0 to dxPSPreviewCarLogoCount - 1 do - FreeAndNil(FPreviewPictures[I]); -end; - -initialization - RegisterAssistants; - RegisterItems; - -finalization - UnregisterItems; - UnregisterAssistants; - - FreeAndNilPreviewPictures; - FreeAndNil(FPictureDialog); - FreeAndNil(FPicture); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxCommonReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxCommonReg.pas deleted file mode 100644 index 3bc9e4d6..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxCommonReg.pas +++ /dev/null @@ -1,135 +0,0 @@ -unit dxPScxCommonReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - SysUtils, TypInfo, Classes, cxClasses, cxLookAndFeels, dxPScxCommon; - -type - TdxReportLinkLookAndFeelKindPropertyEditor = class(TEnumProperty) - public - procedure GetValues(Proc: TGetStrProc); override; - end; - - TdxReportLinkOptionsPropertyEditor = class(TClassProperty) - private - function GetOptions: TdxCustomReportLinkOptions; - function GetReportLink: TdxCustomcxControlReportLink; - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - property Options: TdxCustomReportLinkOptions read GetOptions; - property ReportLink: TdxCustomcxControlReportLink read GetReportLink; - end; - - TdxReportLinkStylesPropertyEditor = class(TClassProperty) - private - function GetReportLink: TdxCustomcxControlReportLink; - function GetStyles: TdxCustomReportLinkStyles; - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - property Styles: TdxCustomReportLinkStyles read GetStyles; - property ReportLink: TdxCustomcxControlReportLink read GetReportLink; - end; - -{ TdxReportLinkLookAndFeelKindPropertyEditor } - -procedure TdxReportLinkLookAndFeelKindPropertyEditor.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := Integer(lfFlat) to Integer(lfUltraFlat) do - Proc(GetEnumName(GetPropType, I)); -end; - -{ TdxReportLinkOptionsPropertyEditor } - -procedure TdxReportLinkOptionsPropertyEditor.Edit; -var - DesignerSupport: IdxReportLinkOptionsDesignerSupport; -begin - if Supports(TObject(Options), IdxReportLinkOptionsDesignerSupport, DesignerSupport) then - begin - DesignerSupport.DesignerInitialize; - try - ReportLink.DesignReport; - finally - DesignerSupport.DesignerFinalize; - end; - end; -end; - -function TdxReportLinkOptionsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; // TODO: ReportLink.CanDesign -end; - -function TdxReportLinkOptionsPropertyEditor.GetOptions: TdxCustomReportLinkOptions; -begin - Result := TdxCustomReportLinkOptions(GetOrdValue); -end; - -function TdxReportLinkOptionsPropertyEditor.GetReportLink: TdxCustomcxControlReportLink; -begin - Result := TdxCustomcxControlReportLink(GetComponent(0)); -end; - -{ TdxReportLinkStylesPropertyEditor } - -procedure TdxReportLinkStylesPropertyEditor.Edit; -var - DesignerSupport: IdxReportLinkOptionsDesignerSupport; -begin - if Supports(TObject(Styles), IdxReportLinkOptionsDesignerSupport, DesignerSupport) then - begin - DesignerSupport.DesignerInitialize; - try - ReportLink.DesignReport; - finally - DesignerSupport.DesignerFinalize; - end; - end; -end; - -function TdxReportLinkStylesPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; // TODO: ReportLink.CanDesign -end; - -function TdxReportLinkStylesPropertyEditor.GetReportLink: TdxCustomcxControlReportLink; -begin - Result := TdxCustomcxControlReportLink(GetComponent(0)); -end; - -function TdxReportLinkStylesPropertyEditor.GetStyles: TdxCustomReportLinkStyles; -begin - Result := TdxCustomReportLinkStyles(GetOrdValue); -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterPropertyEditor(TypeInfo(TcxLookAndFeelKind), TdxCustomReportLinkOptionsFormatting, - 'LookAndFeelKind', TdxReportLinkLookAndFeelKindPropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxCustomReportLinkOptions), - TdxCustomcxControlReportLink, '', TdxReportLinkOptionsPropertyEditor); - RegisterPropertyEditor(TypeInfo(TdxCustomReportLinkStyles), - TdxCustomcxControlReportLink, '', TdxReportLinkStylesPropertyEditor); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxDBEditorLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxDBEditorLnkReg.pas deleted file mode 100644 index 50c953c5..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxDBEditorLnkReg.pas +++ /dev/null @@ -1,54 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxDBEditorLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - Classes, dxPScxDBEditorLnks; - -procedure Register; -begin - RegisterNoIcon([TcxDBListBoxReportLink, TcxDBImageReportLink, TcxDBMemoReportLink]); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxDBEditorLnks.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxDBEditorLnks.pas deleted file mode 100644 index 60d63e93..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxDBEditorLnks.pas +++ /dev/null @@ -1,111 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxDBEditorLnks; - -interface - -{$I cxVer.inc} - -uses - cxDBEdit, dxPScxEditorLnks; - -type - TcxDBListBoxReportLink = class(TcxListBoxReportLink) - private - function GetcxDBListBox: TcxDBListBox; - public - property cxDBListBox: TcxDBListBox read GetcxDBListBox; - end; - - TcxDBImageReportLink = class(TcxCustomImageReportLink) - private - function GetcxDBImage: TcxDBImage; - public - property cxDBImage: TcxDBImage read GetcxDBImage; - published - property BorderColor; - property Center; - property DrawBorder; - property Stretch; - property Transparent; - property TransparentColor; - end; - - TcxDBMemoReportLink = class(TcxCustomMemoReportLink) - private - function GetcxDBMemo: TcxDBMemo; - public - property cxDBMemo: TcxDBMemo read GetcxDBMemo; - end; - -implementation - -uses - dxPSCore, dxPSLbxLnk, dxPSTextLnk; - -{ TcxDBListBoxReportLink } - -function TcxDBListBoxReportLink.GetcxDBListBox: TcxDBListBox; -begin - Result := inherited Component as TcxDBListBox; -end; - -{ TcxDBImageReportLink } - -function TcxDBImageReportLink.GetcxDBImage: TcxDBImage; -begin - Result := inherited Component as TcxDBImage; -end; - -{ TcxDBMemoReportLink } - -function TcxDBMemoReportLink.GetcxDBMemo: TcxDBMemo; -begin - Result := inherited Component as TcxDBMemo; -end; - -initialization - dxPSRegisterReportLink(TcxDBListBoxReportLink, TcxDBListBox, dxPSLbxLnk.TdxLBxReportLinkDesignWindow); - dxPSRegisterReportLink(TcxDBImageReportLink, TcxDBImage, nil); - dxPSRegisterReportLink(TcxDBMemoReportLink, TcxDBMemo, TdxfmTextReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TcxDBMemoReportLink, TcxDBMemo, TdxfmTextReportLinkDesignWindow); - dxPSUnregisterReportLink(TcxDBImageReportLink, TcxDBImage, nil); - dxPSUnregisterReportLink(TcxDBListBoxReportLink, TcxDBListBox, dxPSLbxLnk.TdxLBxReportLinkDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxEditorLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxEditorLnkReg.pas deleted file mode 100644 index 751cd288..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxEditorLnkReg.pas +++ /dev/null @@ -1,54 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxEditorLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - Classes, dxPScxEditorLnks; - -procedure Register; -begin - RegisterNoIcon([TcxListBoxReportLink, TcxImageReportLink, TcxMemoReportLink]); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxEditorLnks.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxEditorLnks.pas deleted file mode 100644 index f9960724..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxEditorLnks.pas +++ /dev/null @@ -1,319 +0,0 @@ - -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxEditorLnks; - -interface - -{$I cxVer.inc} - -uses - Classes, Graphics, Controls, StdCtrls, cxControls, cxContainer, cxListBox, - cxImage, cxEdit, cxMemo, dxPSCore, dxPSLbxLnk, dxPSGraphicLnk, dxPSTextLnk; - -type - TcxListBoxReportLink = class(TCustomdxListBoxReportLinkControl) - private - function GetcxListBox: TcxListBox; - protected - function GetCustomListBox: TCustomListBox; override; - public - property cxListBox: TcxListBox read GetcxListBox; - published - property AutoWidth; - property Color; - property EndEllipsis; - property EvenColor; - property EvenFont; - property Font; - property OddColor; - property OddFont; - property Options; - property Multiline; - property PaintItemsGraphics; - property RowAutoHeight; - property ScaleFonts; - property SupportedCustomDraw; - property Transparent; - property TransparentGraphics; - property UseCustomPageBreaks; - property UseHorzDelimiters; - property UseVertDelimiters; - property Width; - - property OnCustomDrawItem; - property OnGetCustomPageBreaks; - property OnInitializeItem; - end; - - TcxCustomImageReportLink = class(TCustomdxPictureReportLink) - private - function GetcxCustomImage: TcxCustomImage; - protected - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - - function GetDrawMode: TdxGraphicDrawMode; override; - function GetGraphicHeight: Integer; override; - function GetGraphicWidth: Integer; override; - function GetPicture: TPicture; override; - - property cxCustomImage: TcxCustomImage read GetcxCustomImage; - public - constructor Create(AOwner: TComponent); override; - function DataProviderPresent: Boolean; override; - end; - - TcxImageReportLink = class(TcxCustomImageReportLink) - private - function GetcxImage: TcxImage; - public - property cxImage: TcxImage read GetcxImage; - published - property BorderColor; - property Center; - property DrawBorder; - property Stretch; - property Transparent; - property TransparentColor; - end; - - TcxCustomMemoReportLink = class(TdxCustomMemoReportLink) - private - function GetcxCustomMemo: TcxCustomMemo; - protected - function GetCustomMemo: TCustomMemo; override; - property cxCustomMemo: TcxCustomMemo read GetcxCustomMemo; - end; - - TcxMemoReportLink = class(TcxCustomMemoReportLink) - private - function GetcxMemo: TcxMemo; - public - property cxMemo: TcxMemo read GetcxMemo; - end; - -{ Helpers } - -function cxContainer_GetInnerControl(AControl: TcxContainer): TWinControl; -function cxControl_GetHScrollBar(AControl: TcxControl): TcxControlScrollBar; -function cxControl_GetVScrollBar(AControl: TcxControl): TcxControlScrollBar; -function cxControl_GetSizeGrip(AControl: TcxControl): TcxSizeGrip; -function cxEdit_GetProperties(AControl: TcxCustomEdit): TcxCustomEditProperties; -function cxImage_GetPicture(AControl: TcxCustomImage): TPicture; - -implementation - -uses - dxPScxCommon; - -type - TcxContainerAccess = class(TcxContainer); - TcxControlAccess = class(TcxControl); - TcxCustomEditAccess = class(TcxCustomEdit); - TcxCustomImageAccess = class(TcxCustomImage); - - -{ Helpers } - -function cxContainer_GetInnerControl(AControl: TcxContainer): TWinControl; -begin - Result := TcxContainerAccess(AControl).InnerControl; -end; - -function cxControl_GetHScrollBar(AControl: TcxControl): TcxControlScrollBar; -begin - Result := TcxControlAccess(AControl).HScrollBar; -end; - -function cxControl_GetVScrollBar(AControl: TcxControl): TcxControlScrollBar; -begin - Result := TcxControlAccess(AControl).VScrollBar; -end; - -function cxControl_GetSizeGrip(AControl: TcxControl): TcxSizeGrip; -begin - Result := TcxControlAccess(AControl).SizeGrip; -end; - -function cxEdit_GetProperties(AControl: TcxCustomEdit): TcxCustomEditProperties; -begin - Result := TcxCustomEditAccess(AControl).ActiveProperties; -end; - -function cxImage_GetPicture(AControl: TcxCustomImage): TPicture; -begin - Result := TcxCustomImageAccess(AControl).Picture; -end; - -{ TcxListBoxReportLink } - -function TcxListBoxReportLink.GetCustomListBox: TCustomListBox; -begin - if cxListBox <> nil then - Result := TCustomListBox(cxContainer_GetInnerControl(cxListBox)) - else - Result := nil; -end; - -function TcxListBoxReportLink.GetcxListBox: TcxListBox; -begin - Result := inherited Component as TcxListBox; -end; - -{ TcxCustomImageReportLink } - -constructor TcxCustomImageReportLink.Create(AOwner: TComponent); -begin - inherited; - InternalRestoreDefaults; - LinkModified(False); -end; - -function TcxCustomImageReportLink.DataProviderPresent: Boolean; -begin - if DataSource = rldsComponent then - Result := cxCustomImage <> nil - else - Result := inherited DataProviderPresent; -end; - -procedure TcxCustomImageReportLink.InternalRestoreDefaults; -begin - inherited; - Center := True; -end; - -procedure TcxCustomImageReportLink.InternalRestoreFromOriginal; -begin - inherited; - Center := cxImageProperties_GetCenter(cxEdit_GetProperties(cxCustomImage)); - Stretch := cxImageProperties_GetStretch(cxEdit_GetProperties(cxCustomImage)); -end; - -function TcxCustomImageReportLink.GetDrawMode: TdxGraphicDrawMode; -begin - if Stretch then - if Center then - Result := gdmCenterAndStretchProportional - else - Result := gdmStretchProportional - else - if Center then - Result := gdmCenter - else - Result := gdmNone; -end; - -function TcxCustomImageReportLink.GetGraphicHeight: Integer; -begin - if cxCustomImage <> nil then - begin - Result := cxCustomImage.Height; - // 3.2 - //if IsAggregated and (Result < inherited GetGraphicHeight) then - // Result := inherited GetGraphicHeight; - end - else - Result := inherited GetGraphicHeight; -end; - -function TcxCustomImageReportLink.GetGraphicWidth: Integer; -begin - if cxCustomImage <> nil then - begin - Result := cxCustomImage.Width; - // 3.2 - //if IsAggregated and (Result < inherited GetGraphicWidth) then - // Result := inherited GetGraphicWidth; - end - else - Result := inherited GetGraphicWidth; -end; - -function TcxCustomImageReportLink.GetPicture: TPicture; -begin - if cxCustomImage <> nil then - Result := cxImage_GetPicture(cxCustomImage) - else - Result := inherited GetPicture; -end; - -function TcxCustomImageReportLink.GetcxCustomImage: TcxCustomImage; -begin - Result := inherited Component as TcxCustomImage; -end; - -{ TcxImageReportLink } - -function TcxImageReportLink.GetcxImage: TcxImage; -begin - Result := inherited Component as TcxImage; -end; - -{ TcxCustomMemoReportLink } - -function TcxCustomMemoReportLink.GetCustomMemo: TCustomMemo; -begin - if cxCustomMemo <> nil then - Result := TCustomMemo(cxContainer_GetInnerControl(cxCustomMemo)) - else - Result := nil; -end; - -function TcxCustomMemoReportLink.GetcxCustomMemo: TcxCustomMemo; -begin - Result := inherited Component as TcxCustomMemo; -end; - -{ TcxMemoReportLink } - -function TcxMemoReportLink.GetcxMemo: TcxMemo; -begin - Result := inherited Component as TcxMemo; -end; - -initialization - dxPSRegisterReportLink(TcxListBoxReportLink, TcxListBox, TdxLBxReportLinkDesignWindow); - dxPSRegisterReportLink(TcxImageReportLink, TcxImage, nil); - dxPSRegisterReportLink(TcxMemoReportLink, TcxMemo, TdxfmTextReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TcxMemoReportLink, TcxMemo, TdxfmTextReportLinkDesignWindow); - dxPSUnregisterReportLink(TcxImageReportLink, TcxImage, nil); - dxPSUnregisterReportLink(TcxListBoxReportLink, TcxListBox, TdxLBxReportLinkDesignWindow); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxEditorProducers.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxEditorProducers.pas deleted file mode 100644 index 767f0804..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxEditorProducers.pas +++ /dev/null @@ -1,1300 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxEditorProducers; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, Controls, Graphics, cxLookAndFeels, cxGraphics, cxControls, - cxContainer, cxEdit, cxMemo, cxTextEdit, cxCheckBox, cxRadioGroup, cxBlobEdit, - cxHyperLinkEdit, cxCurrencyEdit, cxGroupBox, cxDropDownEdit, cxImageComboBox, - cxImage, dxThemeManager, dxPSGlbl, dxPScxCommon, dxPSContainerLnk, dxPSCore, - cxLookAndFeelPainters, cxDrawTextUtils; - -type - TdxPScxControlProducer = class(TdxPSContainerCustomWinControlProducer) - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - public - function Control: TcxControl; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPScxContainerProducer = class(TdxPSContainerCustomWinControlProducer) //TdxPSContainerWinControlProducer) - private - function GetIsNativeStyle: Boolean; - function GetStyle: {$IFDEF DXVER500} TcxCustomContainerStyle {$ELSE} TcxContainerStyle {$ENDIF}; - protected - function GetBorderClass: TdxPSCellBorderClass; virtual; - function GetBorderColor: TColor; virtual; - function GetContentColor: TColor; override; - function GetFont: TFont; override; - function GetFontColor: TColor; override; - function GetFontStyle: TFontStyles; override; - function GetThemedBorderColor: TColor; virtual; - - function CanProcessChild(AChildControl: TControl): Boolean; override; - function CanUseNativeStyle(AThemedObjectType: TdxThemedObjectType): Boolean; virtual; - function ObjectExpandHeight: Boolean; override; - - property BorderClass: TdxPSCellBorderClass read GetBorderClass; - property BorderColor: TColor read GetBorderColor; - property IsNativeStyle: Boolean read GetIsNativeStyle; - property ThemedBorderColor: TColor read GetThemedBorderColor; - public - function Control: TcxContainer; reintroduce; overload; - class function ControlClass: TControlClass; override; - class function HasNativeSupportForBorders: Boolean; override; - - property Style: {$IFDEF DXVER500} TcxCustomContainerStyle {$ELSE} TcxContainerStyle {$ENDIF} read GetStyle; - end; - - TdxPScxNativePrintableControlProducer = class(TdxPSNativePrintableControlProducer) - private - function GetBorderColor: TColor; - protected - function GetContentColor: TColor; override; - function GetFont: TFont; override; - procedure InitializeNativePrintableControlHost(AnItem: TdxReportVisualItem); override; - property BorderColor: TColor read GetBorderColor; - public - function Control: TcxContainer; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Style: TcxContainerStyle; overload; virtual; - - class function HasNativeSupportForBorders: Boolean; override; - end; - - TdxPScxCustomEditProducer = class(TdxPScxContainerProducer) - protected - function GetControlBoundsRect: TRect; override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ObjectShrinkHeight: Boolean; override; - public - function Control: TcxCustomEdit; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomEditProperties; virtual; - - property FontColor: TColor read GetFontColor; - end; - - TdxPScxCustomTextEditProducer = class(TdxPScxCustomEditProducer) - protected - function GetDisplayText: string; virtual; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TcxCustomTextEdit; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomTextEditProperties; reintroduce; overload; - end; - - TdxPScxCustomMemoEditProducer = class(TdxPScxCustomTextEditProducer) - protected - function ObjectExpandHeight: Boolean; override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - public - function Control: TcxCustomMemo; reintroduce; overload; - class function ControlClass: TControlClass; override; - - function ProducingObjectFriendlyName: string; override; - function Properties: TcxCustomMemoProperties; reintroduce; overload; - end; - - TcxPScxCustomHyperLinkEditProducer = class(TdxPScxCustomTextEditProducer) - protected - function GetFontColor: TColor; override; - function GetFontStyle: TFontStyles; override; - public - function Control: TcxCustomHyperLinkEdit; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomHyperLinkEditProperties; reintroduce; overload; - end; - - TcxPScxCustomCurrencyEditProducer = class(TdxPScxCustomTextEditProducer) - protected - function GetDisplayText: string; override; - public - function Control: TcxCustomCurrencyEdit; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomCurrencyEditProperties; reintroduce; overload; - end; - - TdxPScxCustomComboBoxProducer = class(TdxPScxCustomTextEditProducer) - public - function Control: TcxCustomComboBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomComboBoxProperties; reintroduce; overload; - end; - - TdxPScxCustomImageComboBoxProducer = class(TdxPScxCustomComboBoxProducer) - protected - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TcxCustomImageComboBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomImageComboBoxProperties; reintroduce; overload; - end; - - TdxPScxCustomCheckBoxProducer = class(TdxPScxCustomEditProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TcxCustomCheckBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomCheckBoxProperties; reintroduce; overload; - end; - - TdxPScxRadioButtonProducer = class(TdxPSRadioButtonProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TcxRadioButton; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPScxCustomBlobEditProducer = class(TdxPSCustomDelegateProducer) - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - function Producer: TdxPSCustomContainerItemProducer; override; - public - function Control: TcxCustomBlobEdit; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPScxDefaultBlobEditProducer = class(TdxPScxCustomTextEditProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - public - function Control: TcxCustomBlobEdit; reintroduce; overload; - end; - - TdxPScxPictureBlobProducer = class(TdxPScxCustomEditProducer) - protected - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TcxCustomBlobEdit; reintroduce; overload; - end; - - TdxPScxTextBlobEditProducer = class(TdxPScxCustomTextEditProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - public - function Control: TcxCustomBlobEdit; reintroduce; overload; - end; - - TdxPScxCustomImageEditProducer = class(TdxPScxCustomEditProducer) - protected - function GetHasImage: Boolean; virtual; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - procedure InitializeItemAsImage(AnItem: TdxReportCellGraphic); virtual; - procedure InitializeItemAsText(AnItem: TdxReportCellString); virtual; - function ItemClass: TdxReportVisualItemClass; override; - function ObjectShrinkHeight: Boolean; override; - function ObjectExpandHeight: Boolean; override; - public - function Control: TcxCustomImage; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomImageProperties; reintroduce; overload; - - property HasImage: Boolean read GetHasImage; - end; - - TdxPScxCustomGroupBoxProducer = class(TdxPScxCustomEditProducer) - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - procedure InitializeItemLookAndFeel(AnItem: TdxReportVisualItem; ALookAndFeel: TdxPSReportGroupLookAndFeel); virtual; - function ItemClass: TdxReportVisualItemClass; override; - function LookAndFeelClass: TdxPSReportGroupLookAndFeelClass; virtual; - public - class function CanHasAvailableChildren: Boolean; override; - function Control: TcxCustomGroupBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomGroupBoxProperties; reintroduce; overload; - end; - - TdxPScxCustomButtonGroupProducer = class(TdxPScxCustomGroupBoxProducer) - protected - procedure CreateItems(AButtonGroup: TdxCustomReportButtonGroup); virtual; - procedure InitializeButton(AGroup: TdxCustomReportButtonGroup; - AButton: TdxCustomReportCellCheck; AnIndex: Integer); virtual; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - procedure InitializeItemLookAndFeel(AnItem: TdxReportVisualItem; ALookAndFeel: TdxPSReportGroupLookAndFeel); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TcxCustomButtonGroup; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomButtonGroupProperties; reintroduce; overload; - end; - - TdxPScxCustomRadioGroupProducer = class(TdxPScxCustomButtonGroupProducer) - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - procedure InitializeButton(AGroup: TdxCustomReportButtonGroup; - AButton: TdxCustomReportCellCheck; AnIndex: Integer); override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TcxCustomRadioGroup; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxRadioGroupProperties; reintroduce; overload; - end; - -{ Utilities } - -function cxBordersMap(ABorders: TcxBorders): TdxCellSides; - -const - CheckBorderStyleMap: array[TcxContainerBorderStyle] of TdxCheckButtonEdgeStyle = - (cbesNone, {cbesUltraFlat}cbesSingle, cbesBoldFlat, cbesSoft3D, cbes3D, cbesUltraFlat - {$IFDEF DXVER500}, cbesUltraFlat {$ENDIF}); - CheckPosMap: array[TAlignment] of TdxCellCheckPos = (ccpLeft, ccpRight, ccpCenter); - ContainerBorderStyleMap: array[TcxContainerBorderStyle] of TdxPSCellBorderClass = - (TdxPSCellNullBorder, TdxPSCellUltraFlatBorder, TdxPSCellBoldFlatBorder, - TdxPSCellSunkenSoftBorder, TdxPSCellSunkenBorder, TdxPSCellUltraFlatBorder - {$IFDEF DXVER500}, TdxPSCellUltraFlatBorder {$ENDIF}); - EditBorderStyleMap: array[TcxEditBorderStyle] of TdxPSCellBorderClass = - (TdxPSCellNullBorder, TdxPSCellUltraFlatBorder, TdxPSCellBoldFlatBorder, - TdxPSCellSunkenSoftBorder, TdxPSCellSunkenBorder, TdxPSCellUltraFlatBorder - {$IFDEF DXVER500}, TdxPSCellSunkenSoftBorder{$ENDIF}); - RadioLookAndFeelKindMap: array[TcxLookAndFeelKind] of TdxCheckButtonEdgeStyle = - (cbesSoft3D, cbes3D, cbesUltraFlat{$IFDEF DXVER500}, cbesUltraFlat {$ENDIF}); - RadioBorderStyleMap: array[TcxContainerBorderStyle] of TdxCheckButtonEdgeStyle = - (cbesNone, cbesUltraFlat, cbesBoldFlat, cbesSoft3D, cbes3D, cbesUltraFlat - {$IFDEF DXVER500}, cbesUltraFlat {$ENDIF}); - GroupBoxCaptionAlignmentMap: array[TcxCaptionAlignment] of TcxTextAlignX = - (taLeft, taCenterX, taRight, taLeft, taLeft, taLeft, taLeft, taLeft, taLeft, taLeft, taLeft, taLeft, taLeft); - -implementation - -uses - {$IFDEF DELPHI6} - Variants, - {$ELSE} - cxClasses, - {$ENDIF} - SysUtils, dxThemeConsts, dxUxTheme, cxVariants, dxPSUtl, dxPScxEditorLnks, - dxPScxListBoxLnk; - -{$IFNDEF DXVER500} -type - TcxContainerAccess = class(TcxContainer); - TcxCustomCheckBoxAccess = class(TcxCustomCheckBox); - TcxCustomCurrencyEditAccess = class(TcxCustomCurrencyEdit); - TcxCustomGroupBoxAccess = class(TcxCustomGroupBox); - TcxCustomImageComboBoxAccess = class(TcxCustomImageComboBox); -{$ENDIF} - -var - FPicture: TPicture; - -function Picture: TPicture; -begin - if FPicture = nil then FPicture := TPicture.Create; - Result := FPicture; -end; - -{ Helpers } - -function cxCheckBox_GetState(AControl: TcxCustomEdit): TcxCheckBoxState; -begin - {$IFDEF DXVER500} - Result := TcxCustomCheckBox(AControl).State; - {$ELSE} - Result := TcxCustomCheckBoxAccess(AControl).State; - {$ENDIF} -end; - -function cxCurrencyEdit_GetValue(AControl: TcxCustomEdit): Double; -begin - {$IFDEF DXVER500} - Result := TcxCustomCurrencyEdit(AControl).Value; - {$ELSE} - Result := TcxCustomCurrencyEditAccess(AControl).Value; - {$ENDIF} -end; - -function cxGroupBox_GetAlignment(AControl: TcxCustomEdit): TcxCaptionAlignment; -begin - {$IFDEF DXVER500} - Result := TcxCustomGroupBox(AControl).Alignment; - {$ELSE} - Result := TcxCustomGroupBoxAccess(AControl).Alignment; - {$ENDIF} -end; - -function cxImageComboBox_GetItemIndex(AControl: TcxCustomEdit): Integer; -begin - {$IFDEF DXVER500} - Result := TcxCustomImageComboBox(AControl).ItemIndex; - {$ELSE} - Result := TcxCustomImageComboBoxAccess(AControl).ItemIndex; - {$ENDIF} -end; - -{ Utilities} - -function cxBordersMap(ABorders: TcxBorders): TdxCellSides; -begin - Result := []; - if bLeft in ABorders then Include(Result, csLeft); - if bTop in ABorders then Include(Result, csTop); - if bRight in ABorders then Include(Result, csRight); - if bBottom in ABorders then Include(Result, csBottom); -end; - -{ TdxPScxControlProducer } - -function TdxPScxControlProducer.Control: TcxControl; -begin - Result := inherited Control as TcxControl; -end; - -class function TdxPScxControlProducer.ControlClass: TControlClass; -begin - Result := TcxControl; -end; - -function TdxPScxControlProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := inherited CanProcessChild(AChildControl) and - (AChildControl <> cxControl_GetHScrollBar(Control)) and - (AChildControl <> cxControl_GetVScrollBar(Control)) and - (AChildControl <> cxControl_GetSizeGrip(Control)); -end; - -{ TdxPScxContainerProducer } - -function TdxPScxContainerProducer.Control: TcxContainer; -begin - Result := inherited Control as TcxContainer; -end; - -class function TdxPScxContainerProducer.ControlClass: TControlClass; -begin - Result := TcxContainer; -end; - -class function TdxPScxContainerProducer.HasNativeSupportForBorders: Boolean; -begin - Result := True; -end; - -function TdxPScxContainerProducer.GetBorderClass: TdxPSCellBorderClass; -begin - if CanUseNativeStyle(totEdit) then - Result := TdxPSCellUltraFlatBorder - else - Result := ContainerBorderStyleMap[Style.BorderStyle]; -end; - -function TdxPScxContainerProducer.GetBorderColor: TColor; -begin - if CanUseNativeStyle(totEdit) then - Result := ThemedBorderColor - else - if Style.BorderStyle in [cbsSingle, cbsThick] then - Result := Style.BorderColor - else - Result := dxPSCore.dxDefaultGridLineColor; -end; - -function TdxPScxContainerProducer.GetContentColor: TColor; -begin - {$IFDEF DXVER500} - Result := Style.Color; - {$ELSE} - if Control.Enabled then - Result := Style.Color - else - Result := inherited GetContentColor; - {$ENDIF} -end; - -function TdxPScxContainerProducer.GetFont: TFont; -begin - Result := Style.Font; -end; - -function TdxPScxContainerProducer.GetFontColor: TColor; -begin - {$IFDEF DXVER500} - Result := Style.TextColor; - {$ELSE} - Result := inherited GetFontColor; - {$ENDIF} -end; - -function TdxPScxContainerProducer.GetFontStyle: TFontStyles; -begin - {$IFDEF DXVER500} - Result := Style.TextStyle; - {$ELSE} - Result := inherited GetFontStyle; - {$ENDIF} -end; - -function TdxPScxContainerProducer.GetThemedBorderColor: TColor; -var - Theme: TdxTheme; - C: COLORREF; -begin - Theme := dxThemeManager.OpenTheme(totEdit); - if Succeeded(dxUxTheme.GetThemeColor(Theme, 0, 0, TMT_BORDERCOLOR, C)) then - Result := C - else - Result := dxPSCore.dxDefaultGridLineColor; -end; - -function TdxPScxContainerProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := inherited CanProcessChild(AChildControl) and - not {$IFNDEF DELPHI6}cxClasses.{$ENDIF}Supports(AChildControl, IcxContainerInnerControl); -end; - -function TdxPScxContainerProducer.CanUseNativeStyle(AThemedObjectType: TdxThemedObjectType): Boolean; -begin - Result := IsNativeStyle and - {$IFDEF DXVER500} - dxThemeManager.AreVisualStylesAvailable(AThemedObjectType); - {$ELSE} - dxThemeManager.AreVisualStylesAvailable([AThemedObjectType]); - {$ENDIF} -end; - -function TdxPScxContainerProducer.ObjectExpandHeight: Boolean; -begin - Result := True; -end; - -function TdxPScxContainerProducer.GetIsNativeStyle: Boolean; -begin - Result := Style.LookAndFeel.NativeStyle; -end; - -function TdxPScxContainerProducer.GetStyle: {$IFDEF DXVER500} TcxCustomContainerStyle {$ELSE} TcxContainerStyle {$ENDIF}; -begin - {$IFDEF DXVER500} - if Control.Enabled then - Result := Control.Styles[csNormal] - else - Result := Control.Styles[csDisabled] - {$ELSE} - Result := TcxContainerAccess(Control).Style; - {$ENDIF} -end; - -{ TdxPScxNativePrintableControlProducer } - -function TdxPScxNativePrintableControlProducer.Control: TcxContainer; -begin - Result := inherited Control as TcxContainer; -end; - -class function TdxPScxNativePrintableControlProducer.ControlClass: TControlClass; -begin - Result := TcxContainer; -end; - -function TdxPScxNativePrintableControlProducer.Style: TcxContainerStyle; -begin - {$IFDEF DXVER500} - Result := Control.Styles[csNormal]; - {$ELSE} - Result := TcxContainerAccess(Control).Style; - {$ENDIF} -end; - -class function TdxPScxNativePrintableControlProducer.HasNativeSupportForBorders: Boolean; -begin - Result := True; -end; - -function TdxPScxNativePrintableControlProducer.GetContentColor: TColor; -begin - Result := Style.Color; -end; - -function TdxPScxNativePrintableControlProducer.GetFont: TFont; -begin - Result := Style.Font; -end; - -procedure TdxPScxNativePrintableControlProducer.InitializeNativePrintableControlHost(AnItem: TdxReportVisualItem); -begin - with AnItem do - begin - BorderClass := ContainerBorderStyleMap[Style.BorderStyle]; - BorderColor := Style.BorderColor; - CellSides := cxBordersMap(Style.Edges); - ShowShadow := Style.Shadow; - end; - inherited; -end; - -function TdxPScxNativePrintableControlProducer.GetBorderColor: TColor; -begin - if Style.BorderStyle in [cbsSingle, cbsThick] then - Result := Style.BorderColor - else - Result := clWindowText; -end; - -{ TdxPScxCustomEditProducer } - -function TdxPScxCustomEditProducer.Control: TcxCustomEdit; -begin - Result := inherited Control as TcxCustomEdit; -end; - -class function TdxPScxCustomEditProducer.ControlClass: TControlClass; -begin - Result := TcxCustomEdit; -end; - -function TdxPScxCustomEditProducer.Properties: TcxCustomEditProperties; -begin - Result := cxEdit_GetProperties(Control); -end; - -function TdxPScxCustomEditProducer.GetControlBoundsRect: TRect; -const - ShadowDepth: Integer = 3; // Actually should be borrowed from AnItem.ShadowDepth -begin - Result := inherited GetControlBoundsRect; - if Style.Shadow then - with Result do - begin - Dec(Right, ShadowDepth); - Dec(Bottom, ShadowDepth); - end; -end; - -procedure TdxPScxCustomEditProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - AnItem.BorderClass := BorderClass; - AnItem.BorderColor := BorderColor; - AnItem.CellSides := cxBordersMap(Style.Edges); - AnItem.ShowShadow := Style.Shadow; -end; - -function TdxPScxCustomEditProducer.ObjectShrinkHeight: Boolean; -begin - Result := False;//True; -end; - -{ TdxPScxCustomTextEditProducer } - -function TdxPScxCustomTextEditProducer.Control: TcxCustomTextEdit; -begin - Result := inherited Control as TcxCustomTextEdit; -end; - -class function TdxPScxCustomTextEditProducer.ControlClass: TControlClass; -begin - Result := TcxCustomTextEdit; -end; - -function TdxPScxCustomTextEditProducer.Properties: TcxCustomTextEditProperties; -begin - Result := inherited Properties as TcxCustomTextEditProperties; -end; - -function TdxPScxCustomTextEditProducer.GetDisplayText: string; -begin - Result := Properties.GetDisplayText(Control.EditValue, False, False); -end; - -procedure TdxPScxCustomTextEditProducer.InitializeItem(AnItem: TdxReportVisualItem); -var - EditAlignment: TcxEditAlignment; -begin - inherited; - TdxReportCellString(AnItem).Text := GetDisplayText; - EditAlignment := cxEditProperties_GetAlignment(Properties); - TdxReportCellString(AnItem).TextAlignX := EditTextAlignXMap[EditAlignment.Horz]; - TdxReportCellString(AnItem).TextAlignY := EditTextAlignYMap[EditAlignment.Vert]; -end; - -function TdxPScxCustomTextEditProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellString; -end; - -{ TdxPScxCustomMemoEditProducer } - -function TdxPScxCustomMemoEditProducer.Control: TcxCustomMemo; -begin - Result := inherited Control as TcxCustomMemo; -end; - -class function TdxPScxCustomMemoEditProducer.ControlClass: TControlClass; -begin - Result := TcxCustomMemo; -end; - -function TdxPScxCustomMemoEditProducer.ProducingObjectFriendlyName: string; -begin - Result := ''; - if not IsDesigning and (Control.Lines.Count <> 0) then - begin - Result := Control.Lines[0]; - if Length(Result) > MaxCaptionLength then - begin - Delete(Result, MaxCaptionLength, Length(Result) - MaxCaptionLength); - Result := Result + '...'; - end; - end; - if Result = '' then - Result := inherited ProducingObjectFriendlyName; -end; - -function TdxPScxCustomMemoEditProducer.Properties: TcxCustomMemoProperties; -begin - Result := inherited Properties as TcxCustomMemoProperties; -end; - -function TdxPScxCustomMemoEditProducer.ObjectExpandHeight: Boolean; -begin - Result := False; -end; - -procedure TdxPScxCustomMemoEditProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportCellString(AnItem).MultiLine := True; - TdxReportCellString(AnItem).Text := Control.Text; - TdxReportCellString(AnItem).TextAlignX := TextAlignXMap[cxMemoProperties_GetAlignment(Properties)]; - TdxReportCellString(AnItem).TextAlignY := taTop; -end; - -{ TcxPScxCustomHyperLinkEditProducer } - -function TcxPScxCustomHyperLinkEditProducer.Control: TcxCustomHyperLinkEdit; -begin - Result := inherited Control as TcxCustomHyperLinkEdit; -end; - -class function TcxPScxCustomHyperLinkEditProducer.ControlClass: TControlClass; -begin - Result := TcxCustomHyperLinkEdit; -end; - -function TcxPScxCustomHyperLinkEditProducer.Properties: TcxCustomHyperLinkEditProperties; -begin - Result := inherited Properties as TcxCustomHyperLinkEditProperties; -end; - -function TcxPScxCustomHyperLinkEditProducer.GetFontColor: TColor; -begin - Result := cxHyperLinkEditProperties_GetLinkColor(Properties); -end; - -function TcxPScxCustomHyperLinkEditProducer.GetFontStyle: TFontStyles; -begin - Result := inherited GetFontStyle + [fsUnderline]; -end; - -{ TcxPScxCustomCurrencyEditProducer } - -function TcxPScxCustomCurrencyEditProducer.Control: TcxCustomCurrencyEdit; -begin - Result := inherited Control as TcxCustomCurrencyEdit; -end; - -class function TcxPScxCustomCurrencyEditProducer.ControlClass: TControlClass; -begin - Result := TcxCustomCurrencyEdit; -end; - -function TcxPScxCustomCurrencyEditProducer.Properties: TcxCustomCurrencyEditProperties; -begin - Result := inherited Properties as TcxCustomCurrencyEditProperties; -end; - -function TcxPScxCustomCurrencyEditProducer.GetDisplayText: string; -begin - try - Result := inherited GetDisplayText; - except - if cxCurrencyEdit_GetValue(Control) = 0 then - Result := cxCurrencyProperties_GetNullString(Properties) - else - Result := ''; - end; -end; - -{ TdxPScxCustomComboBoxProducer } - -function TdxPScxCustomComboBoxProducer.Control: TcxCustomComboBox; -begin - Result := inherited Control as TcxCustomComboBox; -end; - -class function TdxPScxCustomComboBoxProducer.ControlClass: TControlClass; -begin - Result := TcxCustomComboBox; -end; - -function TdxPScxCustomComboBoxProducer.Properties: TcxCustomComboBoxProperties; -begin - Result := inherited Properties as TcxCustomComboBoxProperties; -end; - -{ TdxPScxCustomImageComboBoxProducer } - -function TdxPScxCustomImageComboBoxProducer.Control: TcxCustomImageComboBox; -begin - Result := inherited Control as TcxCustomImageComboBox; -end; - -class function TdxPScxCustomImageComboBoxProducer.ControlClass: TControlClass; -begin - Result := TcxCustomImageComboBox; -end; - -function TdxPScxCustomImageComboBoxProducer.Properties: TcxCustomImageComboBoxProperties; -begin - Result := inherited Properties as TcxCustomImageComboBoxProperties; -end; - -procedure TdxPScxCustomImageComboBoxProducer.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(cxImageComboBoxProperties_GetImages(Properties)); -end; - -procedure TdxPScxCustomImageComboBoxProducer.InitializeItem(AnItem: TdxReportVisualItem); -var - ItemIndex: Integer; - ComboItems: TcxImageComboBoxItems; -begin - inherited; - ItemIndex := cxImageComboBox_GetItemIndex(Control); - if ItemIndex <> -1 then - begin - ComboItems := cxImageComboBoxProperties_GetItems(Properties); - TdxReportCellImage(AnItem).ImageIndex := ComboItems[ItemIndex].ImageIndex; - TdxReportCellImage(AnItem).Text := ComboItems[ItemIndex].Description; - end - else - begin - TdxReportCellImage(AnItem).ImageIndex := cxImageComboBoxProperties_GetDefaultImageIndex(Properties); - TdxReportCellImage(AnItem).Text := cxImageComboBoxProperties_GetDefaultDescription(Properties); - end; - - TdxReportCellImage(AnItem).ImageLayout := ImageLayoutMap[cxImageComboBoxProperties_GetImageAlignment(Properties)]; - TdxReportCellImage(AnItem).ImageList := cxImageComboBoxProperties_GetImages(Properties); - TdxReportCellImage(AnItem).MakeSpaceForEmptyImage := True; - TdxReportCellImage(AnItem).Multiline := cxImageComboBoxProperties_GetIsMultilined(Properties); - if not cxImageComboBoxProperties_GetShowDescription(Properties) then - begin - TdxReportCellImage(AnItem).ImageLayout := ilImageCenterCenter; - TdxReportCellImage(AnItem).Text := ''; - end; -end; - -function TdxPScxCustomImageComboBoxProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellImage; -end; - -{ TdxPScxCustomCheckBoxProducer } - -function TdxPScxCustomCheckBoxProducer.Control: TcxCustomCheckBox; -begin - Result := inherited Control as TcxCustomCheckBox; -end; - -class function TdxPScxCustomCheckBoxProducer.ControlClass: TControlClass; -begin - Result := TcxCustomCheckBox; -end; - -function TdxPScxCustomCheckBoxProducer.Properties: TcxCustomCheckBoxProperties; -begin - Result := inherited Properties as TcxCustomCheckBoxProperties; -end; - -procedure TdxPScxCustomCheckBoxProducer.InitializeItem(AnItem: TdxReportVisualItem); -var - CheckNullStyle: TcxCheckBoxNullValueShowingStyle; - CheckState: TcxCheckBoxState; - CheckGlyph: TBitmap; -begin - inherited; - CheckNullStyle := cxCheckBoxProperties_GetNullStyle(Properties); - CheckState := cxCheckBox_GetState(Control); - - TdxReportCellCheckImage(AnItem).CellSides := []; - TdxReportCellCheckImage(AnItem).Checked := (CheckState = cbsChecked) or ((CheckState = cbsGrayed) and (CheckNullStyle = nssGrayedChecked)); - TdxReportCellCheckImage(AnItem).ButtonEdgeStyle := CheckBorderStyleMap[Style.BorderStyle]; - TdxReportCellCheckImage(AnItem).CheckPos := CheckPosMap[cxCheckBoxProperties_GetAlignment(Properties)]; - TdxReportCellCheckImage(AnItem).Enabled := Control.Enabled and not ((CheckState = cbsGrayed) and (CheckNullStyle in [nssInactive, nssGrayedChecked])); - - CheckGlyph := cxCheckBoxProperties_GetGlyph(Properties); - if not CheckGlyph.Empty then - begin - TdxReportCellCheckImage(AnItem).Glyph := CheckGlyph; - TdxReportCellCheckImage(AnItem).GlyphCount := cxCheckBoxProperties_GetGlyphCount(Properties); - end; - TdxReportCellCheckImage(AnItem).Multiline := cxCheckBoxProperties_GetIsMultilined(Properties); - TdxReportCellCheckImage(AnItem).Text := Control_GetText(Control); - TdxReportCellCheckImage(AnItem).TextAlignY := taCenterY; - TdxReportCellCheckImage(AnItem).TextAlignX := taLeft; -end; - -function TdxPScxCustomCheckBoxProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellCheckImage; -end; - -{ TdxPScxRadioButtonProducer } - -function TdxPScxRadioButtonProducer.Control: TcxRadioButton; -begin - Result := inherited Control as TcxRadioButton; -end; - -class function TdxPScxRadioButtonProducer.ControlClass: TControlClass; -begin - Result := TcxRadioButton; -end; - -procedure TdxPScxRadioButtonProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportCellRadio(AnItem).ButtonEdgeStyle := RadioLookAndFeelKindMap[Control.LookAndFeel.Kind]; - TdxReportCellRadio(AnItem).Multiline := Control.WordWrap; -end; - -function TdxPScxRadioButtonProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellRadio; -end; - -{ TdxPScxCustomBlobEditProducer } - -function TdxPScxCustomBlobEditProducer.Control: TcxCustomBlobEdit; -begin - Result := inherited Control as TcxCustomBlobEdit; -end; - -class function TdxPScxCustomBlobEditProducer.ControlClass: TControlClass; -begin - Result := TcxCustomBlobEdit; -end; - -function TdxPScxCustomBlobEditProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := False; -end; - -function TdxPScxCustomBlobEditProducer.Producer: TdxPSCustomContainerItemProducer; -const - ProducerClasses: array[TcxBlobPaintStyle] of TdxPSCustomContainerItemProducerClass = - (TdxPScxDefaultBlobEditProducer, TdxPScxPictureBlobProducer, TdxPScxTextBlobEditProducer); -var - ProducerClass: TdxPSCustomContainerItemProducerClass; -begin - ProducerClass := ProducerClasses[cxBlobEditProperties_GetPaintStyle(cxEdit_GetProperties(Control))]; - Result := TdxPSCustomContainerItemProducer(ReportLink.ProducersByClass[ProducerClass, Control]); -end; - -{ TdxPScxDefaultBlobEditProducer } - -function TdxPScxDefaultBlobEditProducer.Control: TcxCustomBlobEdit; -begin - Result := inherited Control as TcxCustomBlobEdit; -end; - -procedure TdxPScxDefaultBlobEditProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportCellString(AnItem).Text := - cxBlobEdit.GetBlobText(Control.EditValue, TcxCustomBlobEditProperties(cxEdit_GetProperties(Control)), False); -end; - -{ TdxPScxPictureBlobProducer } - -function TdxPScxPictureBlobProducer.Control: TcxCustomBlobEdit; -begin - Result := inherited Control as TcxCustomBlobEdit; -end; - -procedure TdxPScxPictureBlobProducer.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(imgBlobImages); -end; - -procedure TdxPScxPictureBlobProducer.InitializeItem(AnItem: TdxReportVisualItem); - - function HasEditValue: Boolean; - begin - Result := not VarIsNull(Control.EditValue) and not VarIsEmpty(Control.EditValue); - end; - -const - ImageIndexes: array[TcxBlobEditKind] of Integer = (0, 2, 4, 6, 0); -begin - inherited; - TdxReportCellGraphic(AnItem).Center := True; - TdxReportCellGraphic(AnItem).ImageList := imgBlobImages; - TdxReportCellGraphic(AnItem).ImageIndex := Ord(HasEditValue) + ImageIndexes[cxBlobEditProperties_GetEditKind(cxEdit_GetProperties(Control))]; -end; - -function TdxPScxPictureBlobProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellGraphic; -end; - -{ TdxPScxTextBlobEditProducer } - -function TdxPScxTextBlobEditProducer.Control: TcxCustomBlobEdit; -begin - Result := inherited Control as TcxCustomBlobEdit; -end; - -procedure TdxPScxTextBlobEditProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportCellString(AnItem).EndEllipsis := True; - TdxReportCellString(AnItem).Multiline := False; - TdxReportCellString(AnItem).Text := cxBlobEdit.GetBlobText(Control.EditValue, TcxCustomBlobEditProperties(cxEdit_GetProperties(Control)), False); -end; - -{ TdxPScxCustomImageEditProducer } - -function TdxPScxCustomImageEditProducer.Control: TcxCustomImage; -begin - Result := inherited Control as TcxCustomImage; -end; - -class function TdxPScxCustomImageEditProducer.ControlClass: TControlClass; -begin - Result := TcxCustomImage; -end; - -function TdxPScxCustomImageEditProducer.Properties: TcxCustomImageProperties; -begin - Result := inherited Properties as TcxCustomImageProperties; -end; - -function TdxPScxCustomImageEditProducer.GetHasImage: Boolean; -var - ImagePicture: TPicture; -begin - ImagePicture := cxImage_GetPicture(Control); - Result := (ImagePicture.Graphic <> nil) and not ImagePicture.Graphic.Empty; -end; - -procedure TdxPScxCustomImageEditProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - if HasImage then - InitializeItemAsImage(TdxReportCellGraphic(AnItem)) - else - InitializeItemAsText(TdxReportCellString(AnItem)); -end; - -procedure TdxPScxCustomImageEditProducer.InitializeItemAsImage(AnItem: TdxReportCellGraphic); -var - GraphicClass: TClass; -begin - Picture.Assign(cxImage_GetPicture(Control)); - - if Picture.Graphic <> nil then - GraphicClass := Picture.Graphic.ClassType - else - GraphicClass := nil; - - AnItem.Center := cxImageProperties_GetCenter(Properties); - AnItem.Image := Picture.Graphic; - AnItem.ImageTransparent := ((GraphicClass <> nil) and GraphicClass.InheritsFrom(TIcon)) or - ReportLink.OptionsTransparent.Graphics; - AnItem.Stretch := (GraphicClass <> nil) and not GraphicClass.InheritsFrom(TIcon) and - cxImageProperties_GetStretch(Properties); -end; - -procedure TdxPScxCustomImageEditProducer.InitializeItemAsText(AnItem: TdxReportCellString); -begin - AnItem.Text := cxImageProperties_GetCaption(Properties); - AnItem.TextAlignX := taCenterX; - AnItem.TextAlignY := taCenterY; -end; - -function TdxPScxCustomImageEditProducer.ItemClass: TdxReportVisualItemClass; -const - ItemClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellString, TdxReportCellGraphic); -begin - Result := ItemClasses[HasImage]; -end; - -function TdxPScxCustomImageEditProducer.ObjectShrinkHeight: Boolean; -begin - Result := False; -end; - -function TdxPScxCustomImageEditProducer.ObjectExpandHeight: Boolean; -begin - Result := False; -end; - -{ TdxPScxCustomGroupBoxProducer } - -class function TdxPScxCustomGroupBoxProducer.CanHasAvailableChildren: Boolean; -begin - Result := True; -end; - -function TdxPScxCustomGroupBoxProducer.Control: TcxCustomGroupBox; -begin - Result := inherited Control as TcxCustomGroupBox; -end; - -class function TdxPScxCustomGroupBoxProducer.ControlClass: TControlClass; -begin - Result := TcxCustomGroupBox; -end; - -function TdxPScxCustomGroupBoxProducer.Properties: TcxCustomGroupBoxProperties; -begin - Result := inherited Properties as TcxCustomGroupBoxProperties; -end; - -function TdxPScxCustomGroupBoxProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := True; -end; - -procedure TdxPScxCustomGroupBoxProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportGroup(AnItem).BorderClass := ContainerBorderStyleMap[Self.Style.BorderStyle]; - TdxReportGroup(AnItem).CaptionAlignment := GroupBoxCaptionAlignmentMap[cxGroupBox_GetAlignment(Control)]; - TdxReportGroup(AnItem).CaptionText := Control_GetText(Control); - TdxReportGroup(AnItem).CaptionTransparent := TdxReportGroup(AnItem).Transparent; - TdxReportGroup(AnItem).UseOwnBorderClass := True; - - TdxReportGroup(AnItem).LookAndFeel := ReportLink.CreateGroupLookAndFeel(LookAndFeelClass, False); - InitializeItemLookAndFeel(AnItem, TdxReportGroup(AnItem).LookAndFeel); - TdxReportGroup(AnItem).LookAndFeel.Prepare(DC); - TdxReportGroup(AnItem).CalculateCaptionTextWidth(DC); -end; - -procedure TdxPScxCustomGroupBoxProducer.InitializeItemLookAndFeel(AnItem: TdxReportVisualItem; - ALookAndFeel: TdxPSReportGroupLookAndFeel); -begin - ALookAndFeel.CaptionFontIndex := AnItem.FontIndex; - ALookAndFeel.Color := ContentColor; - ALookAndFeel.FontIndex := AnItem.FontIndex; -end; - -function TdxPScxCustomGroupBoxProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportGroup; -end; - -function TdxPScxCustomGroupBoxProducer.LookAndFeelClass: TdxPSReportGroupLookAndFeelClass; -begin - Result := TdxPSReportGroupStandardLookAndFeel; -end; - -{ TdxPScxCustomButtonGroupProducer } - -function TdxPScxCustomButtonGroupProducer.Control: TcxCustomButtonGroup; -begin - Result := inherited Control as TcxCustomButtonGroup; -end; - -class function TdxPScxCustomButtonGroupProducer.ControlClass: TControlClass; -begin - Result := TcxCustomButtonGroup; -end; - -function TdxPScxCustomButtonGroupProducer.Properties: TcxCustomButtonGroupProperties; -begin - Result := inherited Properties as TcxCustomButtonGroupProperties; -end; - -procedure TdxPScxCustomButtonGroupProducer.CreateItems(AButtonGroup: TdxCustomReportButtonGroup); -var - Items: TcxButtonGroupItems; - I: Integer; - Button: TdxCustomReportCellCheck; -begin - Items := cxButtonGroupProperties_GetItems(Properties); - for I := 0 to Items.Count - 1 do - begin - Button := AButtonGroup.Add(cxButtonGroupItem_GetCaption(Items[I])); - InitializeButton(AButtonGroup, Button, I); - end; -end; - -procedure TdxPScxCustomButtonGroupProducer.InitializeButton(AGroup: TdxCustomReportButtonGroup; - AButton: TdxCustomReportCellCheck; AnIndex: Integer); -begin - AButton.BorderColor := Style.BorderColor; - AButton.ButtonEdgeStyle := AGroup.ButtonEdgeStyle; -end; - -procedure TdxPScxCustomButtonGroupProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxCustomReportButtonGroup(AnItem).ButtonEdgeStyle := RadioBorderStyleMap[Style.BorderStyle]; - TdxCustomReportButtonGroup(AnItem).ColumnCount := cxButtonGroupProperties_GetColumnCount(Properties); - CreateItems(TdxCustomReportButtonGroup(AnItem)); - TdxCustomReportButtonGroup(AnItem).ShowCaption := (TdxCustomReportButtonGroup(AnItem).CaptionText <> '') and - (cxGroupBox_GetAlignment(Control) <> alCenterCenter); - TdxCustomReportButtonGroup(AnItem).AdjustContent(DC); -end; - -procedure TdxPScxCustomButtonGroupProducer.InitializeItemLookAndFeel(AnItem: TdxReportVisualItem; - ALookAndFeel: TdxPSReportGroupLookAndFeel); -begin - inherited; -end; - -function TdxPScxCustomButtonGroupProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxCustomReportButtonGroup; -end; - -{ TdxPScxRadioGroupProducer } - -function TdxPScxCustomRadioGroupProducer.Control: TcxCustomRadioGroup; -begin - Result := inherited Control as TcxCustomRadioGroup; -end; - -class function TdxPScxCustomRadioGroupProducer.ControlClass: TControlClass; -begin - Result := TcxCustomRadioGroup; -end; - -function TdxPScxCustomRadioGroupProducer.Properties: TcxRadioGroupProperties; -begin - Result := inherited Properties as TcxRadioGroupProperties; -end; - -function TdxPScxCustomRadioGroupProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := inherited CanProcessChild(AChildControl) and - not (AChildControl is TcxCustomRadioGroupButton); // RadioGroup buttons are processed inside -end; - -procedure TdxPScxCustomRadioGroupProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - TdxReportRadioGroup(AnItem).ItemIndex := Control.ItemIndex; - TdxReportRadioGroup(AnItem).CheckPos := ccpLeft; -end; - -procedure TdxPScxCustomRadioGroupProducer.InitializeButton(AGroup: TdxCustomReportButtonGroup; - AButton: TdxCustomReportCellCheck; AnIndex: Integer); -begin - inherited; - //TdxReportCellRadio(AButton).ButtonEdgeStyle := AGroup.ButtonEdgeStyle; - TdxReportCellRadio(AButton).Enabled := Control.Enabled; -end; - -function TdxPScxCustomRadioGroupProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportRadioGroup; -end; - -procedure RegisterAssistants; -begin - TdxPScxNativePrintableControlProducer.Register; - - //TdxPScxControlProducer.Register; - //TdxPScxContainerProducer.Register; - //TdxPScxCustomEditProducer.Register; - TdxPScxCustomTextEditProducer.Register; - TdxPScxCustomMemoEditProducer.Register; - TcxPScxCustomHyperLinkEditProducer.Register; - TcxPScxCustomCurrencyEditProducer.Register; - TdxPScxCustomComboBoxProducer.Register; - TdxPScxCustomImageComboBoxProducer.Register; - TdxPScxCustomCheckBoxProducer.Register; - TdxPScxRadioButtonProducer.Register; - TdxPScxCustomBlobEditProducer.Register; - TdxPScxCustomImageEditProducer.Register; - TdxPScxCustomGroupBoxProducer.Register; - TdxPScxCustomRadioGroupProducer.Register; -end; - -procedure UnregisterAssistants; -begin - TdxPScxCustomRadioGroupProducer.Unregister; - TdxPScxCustomGroupBoxProducer.Unregister; - TdxPScxCustomImageEditProducer.Unregister; - TdxPScxCustomBlobEditProducer.Unregister; - TdxPScxRadioButtonProducer.Unregister; - TdxPScxCustomCheckBoxProducer.Unregister; - TdxPScxCustomImageComboBoxProducer.Unregister; - TdxPScxCustomComboBoxProducer.Unregister; - TcxPScxCustomCurrencyEditProducer.Unregister; - TcxPScxCustomHyperLinkEditProducer.Unregister; - TdxPScxCustomMemoEditProducer.Unregister; - TdxPScxCustomTextEditProducer.Unregister; - //TdxPScxCustomEditProducer.Unregister; - //TdxPScxContainerProducer.Unregister; - //TdxPScxControlProducer.Unregister; - - TdxPScxNativePrintableControlProducer.Unregister; -end; - -initialization - RegisterAssistants; - -finalization - UnregisterAssistants; - FreeAndNil(FPicture); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtComCtrlsLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxExtComCtrlsLnk.pas deleted file mode 100644 index e391597d..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtComCtrlsLnk.pas +++ /dev/null @@ -1,415 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxExtComCtrlsLnk; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, Graphics, Controls, ComCtrls, ImgList, cxListView, cxTreeView, -{$IFDEF DXVER500} - cxRichEdit, cxDBRichEdit, -{$ENDIF} -{$IFDEF REGISTERCXSHELLCTRLS} - cxShellTreeView, cxShellListView, -{$ENDIF} - dxPSCore, dxPSTVLnk, dxPSLVLnk, dxPSRELnk, dxPSContainerLnk; - -type - TcxCustomTreeViewReportLink = class(TCustomdxTreeViewReportLink) - private - function GetcxCustomTreeView: TcxCustomTreeView; - protected - function GetCustomTreeView: TCustomTreeView; override; - property cxCustomTreeView: TcxCustomTreeView read GetcxCustomTreeView; - end; - - TcxTreeViewReportLink = class(TcxCustomTreeViewReportLink) - private - function GetcxTreeView: TcxTreeView; - public - property cxTreeView: TcxTreeView read GetcxTreeView; - published - property AutoNodesExpand; - property AutoWidth; - property Color; - property ExpandLevel; - property ExplicitTreeViewExpand; - property Font; - property GridLineColor; - property Options; - property ScaleFonts; - property SupportedCustomDraw; - property Transparent; - property TreeLineColor; - property UseVertDelimiters; - property Width; - - property OnCustomDrawNode; - property OnInitializeNode; - end; - - {$IFDEF REGISTERCXSHELLCTRLS} - - TcxShellTreeViewReportLink = class(TcxCustomTreeViewReportLink) - private - function GetcxShellTreeView: TcxShellTreeView; - protected - function GetCustomTreeView: TCustomTreeView; override; - procedure CreateImages; override; - procedure DeleteImages; override; - function GetImages: TCustomImageList; override; - function GetStateImages: TCustomImageList; override; - function HasStateImages: Boolean; override; - public - property cxShellTreeView: TcxShellTreeView read GetcxShellTreeView; - published - property AutoNodesExpand; - property AutoWidth; - property Color; - property ExpandLevel; - property ExplicitTreeViewExpand; - property Font; - property GridLineColor; - property Options; - property ScaleFonts; - property SupportedCustomDraw; - property Transparent; - property TreeLineColor; - property UseVertDelimiters; - property Width; - - property OnCustomDrawNode; - property OnInitializeNode; - end; - - {$ENDIF} - - TcxCustomListViewReportLink = class(TCustomdxListViewReportLink) - private - function GetcxCustomListView: TcxCustomListView; - protected - function GetCustomListView: TCustomListView; override; - property cxCustomListView: TcxCustomListView read GetcxCustomListView; - end; - - TcxListViewReportLink = class(TcxCustomListViewReportLink) - private - function GetcxListView: TcxListView; - public - property cxListView: TcxListView read GetcxListView; - published - property AutoWidth; - property Color; - property DrawMode write SetDrawMode; - property Effects3D; - property EndEllipsis; - property HeaderColor; - property Font; - property HeaderFont; - property HeaderTransparent; - property GridLineColor; - property IncludeHeaders; - property OnlySelected; - property Options; - property RowAutoHeight; - property Soft3D; - property SupportedCustomDraw; - property Transparent; - - property OnCustomDrawHeader; - property OnCustomDrawItem; - property OnInitializeHeader; - property OnInitializeItem; - end; - - {$IFDEF REGISTERCXSHELLCTRLS} - - TcxShellListViewReportLink = class(TcxCustomListViewReportLink) - private - function GetcxShellListView: TcxShellListView; - protected - function GetCustomListView: TCustomListView; override; - - procedure CreateImages; override; - procedure DeleteImages; override; - function GetLargeImages: TCustomImageList; override; - function GetSmallImages: TCustomImageList; override; - function GetStateImages: TCustomImageList; override; - function HasStateImages: Boolean; override; - public - property cxShellListView: TcxShellListView read GetcxShellListView; - published - property AutoWidth; - property Color; - property DrawMode write SetDrawMode; - property Effects3D; - property EndEllipsis; - property Font; - property HeaderColor; - property HeaderFont; - property HeaderTransparent; - property GridLineColor; - property OnlySelected; - property Options; - property RowAutoHeight; - property IncludeHeaders; - property ShowColumnHeaders; - property Soft3D; - property SupportedCustomDraw; - property Transparent; - - property OnCustomDrawHeader; - property OnCustomDrawItem; - property OnInitializeHeader; - property OnInitializeItem; - end; - - {$ENDIF} - - {$IFDEF DXVER500} - - TcxCustomRichEditReportLink = class(TAbstractdxRichEditReportLink) - private - function GetRichEdit: TcxCustomRichEdit; - protected - function GetRichEditHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; override; - property RichEdit: TcxCustomRichEdit read GetRichEdit; - public - constructor Create(AOwner: TComponent); override; - end; - - TcxRichEditReportLink = class(TcxCustomRichEditReportLink) - private - function GetRichEdit: TcxRichEdit; - public - property RichEdit: TcxRichEdit read GetRichEdit; - end; - - {$ENDIF} - -implementation - -uses - cxControls, dxPSUtl; - -{ TcxCustomTreeViewReportLink } - -function TcxCustomTreeViewReportLink.GetCustomTreeView: TCustomTreeView; -begin - Result := cxCustomTreeView.InnerTreeView; -end; - -function TcxCustomTreeViewReportLink.GetcxCustomTreeView: TcxCustomTreeView; -begin - Result := Component as TcxCustomTreeView; -end; - -{ TcxTreeViewReportLink } - -function TcxTreeViewReportLink.GetcxTreeView: TcxTreeView; -begin - Result := Component as TcxTreeView; -end; - -{$IFDEF REGISTERCXSHELLCTRLS} - -{ TcxShellTreeViewReportLink } - -function TcxShellTreeViewReportLink.GetCustomTreeView: TCustomTreeView; -begin - Result := cxShellTreeView.InnerTreeView; -end; - -procedure TcxShellTreeViewReportLink.CreateImages; -begin -end; - -procedure TcxShellTreeViewReportLink.DeleteImages; -begin -end; - -function TcxShellTreeViewReportLink.GetImages: TCustomImageList; -begin - Result := dxPSUtl.ShellSmallImages; -end; - -function TcxShellTreeViewReportLink.GetStateImages: TCustomImageList; -begin - Result := dxPSUtl.ShellSmallImages; -end; - -function TcxShellTreeViewReportLink.HasStateImages: Boolean; -begin - Result := False; -end; - -function TcxShellTreeViewReportLink.GetcxShellTreeView: TcxShellTreeView; -begin - Result := TcxShellTreeView(Component); -end; - -{$ENDIF} - -{ TcxCustomListViewReportLink } - -function TcxCustomListViewReportLink.GetCustomListView: TCustomListView; -begin - Result := cxCustomListView.InnerListView; -end; - -function TcxCustomListViewReportLink.GetcxCustomListView: TcxCustomListView; -begin - Result := TcxCustomListView(Component); -end; - -{ TcxListViewReportLink } - -function TcxListViewReportLink.GetcxListView: TcxListView; -begin - Result := TcxListView(Component); -end; - -{$IFDEF REGISTERCXSHELLCTRLS} - -{ TcxShellListViewReportLink } - -function TcxShellListViewReportLink.GetCustomListView: TCustomListView; -begin - Result := cxShellListView.InnerListView; -end; - -procedure TcxShellListViewReportLink.CreateImages; -begin -end; - -procedure TcxShellListViewReportLink.DeleteImages; -begin -end; - -function TcxShellListViewReportLink.GetLargeImages: TCustomImageList; -begin - Result := dxPSUtl.ShellLargeImages; -end; - -function TcxShellListViewReportLink.GetSmallImages: TCustomImageList; -begin - Result := dxPSUtl.ShellSmallImages; -end; - -function TcxShellListViewReportLink.GetStateImages: TCustomImageList; -begin - Result := dxPSUtl.ShellSmallImages; -end; - -function TcxShellListViewReportLink.HasStateImages: Boolean; -begin - Result := not IsReportStyle or inherited HasStateImages; -end; - -function TcxShellListViewReportLink.GetcxShellListView: TcxShellListView; -begin - Result := TcxShellListView(Component); -end; - -{$ENDIF} - -{$IFDEF DXVER500} - -{ TcxCustomRichEditReportLink } - -constructor TcxCustomRichEditReportLink.Create(AOwner: TComponent); -begin - inherited; - RichEditVersion := 2; - LinkModified(False); -end; - -function TcxCustomRichEditReportLink.GetRichEditHandle: {$IFDEF BCB}Integer {$ELSE}HWND {$ENDIF}; -begin - if RichEdit <> nil then - Result := RichEdit.InnerControl.Handle - else - Result := 0; -end; - -function TcxCustomRichEditReportLink.GetRichEdit: TcxCustomRichEdit; -begin - Result := inherited Component as TcxCustomRichEdit; -end; - -{ TcxRichEditReportLink } - -function TcxRichEditReportLink.GetRichEdit: TcxRichEdit; -begin - Result := inherited Component as TcxRichEdit; -end; - -{$ENDIF} - -initialization - dxPSRegisterReportLink(TcxTreeViewReportLink, TcxTreeView, TdxfmTVReportLinkDesignWindow); - {$IFDEF REGISTERCXSHELLCTRLS} - dxPSRegisterReportLink(TcxShellTreeViewReportLink, TcxShellTreeView, TdxfmTVReportLinkDesignWindow); - {$ENDIF} - - dxPSRegisterReportLink(TcxListViewReportLink, TcxListView, TdxfmLVReportLinkDesignWindow); - {$IFDEF REGISTERCXSHELLCTRLS} - dxPSRegisterReportLink(TcxShellListViewReportLink, TcxShellListView, TdxfmLVReportLinkDesignWindow); - {$ENDIF} - - {$IFDEF DXVER500} - dxPSRegisterReportLink(TcxRichEditReportLink, TcxRichEdit, nil); - {$ENDIF} - -finalization - {$IFDEF DXVER500} - dxPSUnregisterReportLink(TcxRichEditReportLink, TcxRichEdit, nil); - {$ENDIF} - - {$IFDEF REGISTERCXSHELLCTRLS} - dxPSUnregisterReportLink(TcxShellListViewReportLink, TcxShellListView, TdxfmTVReportLinkDesignWindow); - {$ENDIF} - dxPSUnregisterReportLink(TcxListViewReportLink, TcxListView, TdxfmTVReportLinkDesignWindow); - - {$IFDEF REGISTERCXSHELLCTRLS} - dxPSUnregisterReportLink(TcxShellTreeViewReportLink, TcxShellTreeView, TdxfmLVReportLinkDesignWindow); - {$ENDIF} - dxPSUnregisterReportLink(TcxTreeViewReportLink, TcxTreeView, TdxfmLVReportLinkDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtCommon.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxExtCommon.pas deleted file mode 100644 index 66443971..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtCommon.pas +++ /dev/null @@ -1,1428 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxExtCommon; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, Graphics, ImgList, cxEdit, cxColorComboBox, cxLookAndFeelPainters, - {$IFDEF DXVER500} cxCheckBox, cxCheckGroup, {$ENDIF} dxPSCore, dxPScxCommon; - -type - TdxReportCellColorBoxAlignment = (ccbaLeft, ccbaRight); - - TdxReportCellColorBox = class(TdxReportCellImageContainer) - private - FColorBoxFrameColor: TColor; - FColorBoxWidth: Integer; - FColorValue: TColor; - function GetColorBoxAlignment: TdxReportCellColorBoxAlignment; - function GetShowDescription: Boolean; - procedure SetColorBoxAlignment(Value: TdxReportCellColorBoxAlignment); - procedure SetShowDescription(Value: Boolean); - protected - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - - function GetImageAreaBounds(DC: HDC): TRect; override; - function GetImageBounds(DC: HDC): TRect; override; - procedure GetImageSizes(var AImageWidth, AImageHeight: Integer); override; - function GetTextBounds(DC: HDC): TRect; override; - function HasImage: Boolean; override; - function IsImageBackgroundDrawn: Boolean; override; - function IsImageDrawn: Boolean; override; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - procedure DrawColorBox(DC: HDC); virtual; - function GetColorBoxFrameBounds(DC: HDC): TRect; virtual; - function GetColorBoxIntreriorBounds(DC: HDC): TRect; virtual; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - - function ActualColorBoxWidth(DC: HDC): Integer; virtual; - procedure DrawImage(DC: HDC); override; - function MeasureContentHeight(DC: HDC): Integer; override; - - property ColorBoxAlignment: TdxReportCellColorBoxAlignment read GetColorBoxAlignment write SetColorBoxAlignment; - property ColorBoxFrameColor: TColor read FColorBoxFrameColor write FColorBoxFrameColor; - property ColorBoxWidth: Integer read FColorBoxWidth write FColorBoxWidth; - property ColorValue: TColor read FColorValue write FColorValue; - property ShowDescription: Boolean read GetShowDescription write SetShowDescription; - end; - - TdxReportCellProgressBarOrientation = (pboHorizontal, pboVertical); - - TdxReportCellProgressBar = class(TdxReportCellText) - private - FMaxValue: Double; - FMinValue: Double; - FProgressColor: TColor; - FText: string; - FValue: Double; - function GetOrientation: TdxReportCellProgressBarOrientation; - function GetShowPercentSymbol: Boolean; - function GetShowText: Boolean; - procedure SetOrientation(Value: TdxReportCellProgressBarOrientation); - procedure SetMaxValue(Value: Double); - procedure SetMinValue(Value: Double); - procedure SetShowPercentSymbol(Value: Boolean); - procedure SetShowText(Value: Boolean); - procedure SetValue(Value: Double); - protected - function GetText: string; override; - procedure SetText(const Value: string); override; - - function GetProgressBarProgressBounds(DC: HDC): TRect; virtual; - function GetProgressBarProgressRestBounds(DC: HDC): TRect; virtual; - function IsProgressBarDrawn(DC: HDC): Boolean; virtual; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - procedure DrawProgressBar(DC: HDC); virtual; - procedure DrawText(DC: HDC); override; - - property MaxValue: Double read FMaxValue write SetMaxValue; - property MinValue: Double read FMinValue write SetMinValue; - property Orientation: TdxReportCellProgressBarOrientation read GetOrientation write SetOrientation; - property ProgressColor: TColor read FProgressColor write FProgressColor; - property ShowPercentSymbol: Boolean read GetShowPercentSymbol write SetShowPercentSymbol; - property ShowText: Boolean read GetShowText write SetShowText; - property Value: Double read FValue write SetValue; - end; - - TdxReportCellRichEditGraphic = class(TdxReportCellGraphic) - protected - function IsBackgroundBitmapDrawn: Boolean; override; - end; - - { Data Maps } - - TdxPSColorComboBoxDataMap = class(TdxPSTextDataMap) - protected - class function DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class function GetText(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): string; override; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSFontNameComboBoxDataMap = class(TdxPSTextDataMap) - protected - class procedure GetImageLists(AProperties: TcxCustomEditProperties; AProc: TdxPSGetImageListProc); override; - class function GetImages(AProperties: TcxCustomEditProperties): TCustomImageList; virtual; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - {$IFDEF REGISTERCXSHELLCTRLS} - - TdxPSShellComboBoxDataMap = class(TdxPSTextDataMap) - protected - class function GetImageIndex(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): Integer; - class procedure GetImageLists(AProperties: TcxCustomEditProperties; AProc: TdxPSGetImageListProc); override; - class function GetImages(AProperties: TcxCustomEditProperties): TCustomImageList; - class function HasImages(AProperties: TcxCustomEditProperties): Boolean; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - class function MeasureWidth(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; AFont: TFont; ARecordIndex: Integer = 0): Integer; override; - end; - - {$ENDIF} - - TdxPSLabelDataMap = class(TdxPSTextDataMap) - protected - class function DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class function DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSProgressBarDataMap = class(TdxPSCustomDataMap) - protected - class function GetValue(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): Double; - class function HasText(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): Boolean; override; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSTrackBarDataMap = class(TdxPSCustomDataMap) - protected - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - {$IFDEF DXVER500} - - TdxPSCheckButtonGroupDataMap = class(TdxPSCustomButtonGroupDataMap) - protected - class function ButtonGroupClass(AProperties: TcxCustomEditProperties): TdxCustomReportButtonGroupClass; override; - class procedure InitializeGroupButton(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; AButton: TdxCustomReportCellCheck; AnIndex: Integer); override; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSRichEditDataMap = class(TdxPSDelegateDataMap) - protected - class function DataMapClass(AProperties: TcxCustomEditProperties): TdxPSDataMapClass; override; - class function PropertiesClass: TcxCustomEditPropertiesClass; override; - end; - - TdxPSRichTextDataMap = class(TdxPSCustomDataMap) - protected - class function DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; override; - class procedure InitializeItem(AnItem: TAbstractdxReportCellData; AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); override; - class function ItemClass(AProperties: TcxCustomEditProperties; AnIsPreview: Boolean = False): TdxReportCellDataClass; override; - end; - - {$ENDIF} - -{ Helpers } - -function ColorComboBoxProperties_GetColor(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): TColor; -function ColorComboBoxProperties_GetColorBoxAlignment(AProperties: TcxCustomEditProperties): TdxReportCellColorBoxAlignment; -function ColorComboBoxProperties_GetColorBoxFrameColor(AProperties: TcxCustomEditProperties): TColor; -function ColorComboBoxProperties_GetColorBoxWidth(AProperties: TcxCustomEditProperties): Integer; -function ColorComboBoxProperties_GetShowDescriptions(AProperties: TcxCustomEditProperties): Boolean; -function ColorComboBoxProperties_GetText(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): string; -function FontNameComboBox_GetShowTypeIcon(AProperties: TcxCustomEditProperties): Boolean; -function FontNameComboBox_GetTypeIconImageIndex(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): Integer; -function ProgressBarProperties_GetMaxValue(AProperties: TcxCustomEditProperties): Double; -function ProgressBarProperties_GetMinValue(AProperties: TcxCustomEditProperties): Double; -function ProgressBarProperties_GetOrientation(AProperties: TcxCustomEditProperties): TdxReportCellProgressBarOrientation; -function ProgressBarProperties_GetProgressBarColor(AProperties: TcxCustomEditProperties): TColor; -function ProgressBarProperties_GetShowPercentSymbol(AProperties: TcxCustomEditProperties): Boolean; -function ProgressBarProperties_GetShowText(AProperties: TcxCustomEditProperties): Boolean; -function ProgressBarProperties_GetText(AProperties: TcxCustomEditProperties): string; -{$IFDEF DXVER500} -function CheckGroupProperties_GetGlyph(AProperties: TcxCustomEditProperties): TBitmap; -function CheckGroupProperties_GetGlyphCount(AProperties: TcxCustomEditProperties): Integer; -function CheckGroupProperties_GetCheckPos(AProperties: TcxCustomEditProperties): TdxCellCheckPos; -function CheckGroupProperties_GetCheckStates(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; out ACheckStates: TcxCheckStates): Boolean; -function CheckGroupProperties_GetIsItemEnabled(AProperties: TcxCustomEditProperties; AnIndex: Integer): Boolean; -function RichEditProperties_GetIsMemoMode(AProperties: TcxCustomEditProperties): Boolean; -{$ENDIF} - -{ Utilities } - -function FontImages: TCustomImageList; - -const - dxDefaultColorBoxWidth = 30; - dxDefaultColorBoxColorValue: TColor = clWhite; - - ColorBoxAlignmentMap: array[TcxColorBoxAlign] of TdxReportCellColorBoxAlignment = (ccbaLeft, ccbaRight); - LeftRightMap: array[TLeftRight] of TdxCellCheckPos = (ccpLeft, ccpRight); - -implementation - -uses - SysUtils, Controls, cxLabel, cxProgressBar, cxTrackBar, cxFontNameComboBox, - cxExtEditUtils, {$IFDEF REGISTERCXSHELLCTRLS} cxShellComboBox, {$ENDIF} - {$IFDEF DXVER500} ComCtrls, Forms, cxRichEdit, dxPSRELnk, {$ENDIF} dxPSGlbl, - dxPSUtl, cxDrawTextUtils; - -type - TcxCustomColorComboBoxPropertiesAccess = class(TcxCustomColorComboBoxProperties); - TcxCustomFontNameComboBoxPropertiesAccess = class(TcxCustomFontNameComboBoxProperties); - TcxCustomProgressBarPropertiesAccess = class(TcxCustomProgressBarProperties); - {$IFDEF REGISTERCXSHELLCTRLS} - TcxCustomShellComboBoxPropertiesAccess = class(TcxCustomShellComboBoxProperties); - {$ENDIF} - {$IFDEF DXVER500} - TcxCustomCheckGroupPropertiesAccess = class(TcxCustomCheckGroupProperties); - TcxCustomRichEditPropertiesAccess = class(TcxCustomRichEditProperties); - {$ENDIF} - -const - Eps: Double = 0.001; - ProgressBarOrientationMap: array[TcxProgressBarOrientation] of TdxReportCellProgressBarOrientation = (pboHorizontal, pboVertical); - - dxFormatColorBoxShowDescription = dxPSGlbl.dxFormatCheckBold; - dxFormatColorBoxAlignmentOffset = dxPSGlbl.dxFormatSortOrderOffset; - dxFormatColorBoxAlignmentLeft = dxPSGlbl.dxFormatSortNo; - dxFormatColorBoxAlignmentRight = dxPSGlbl.dxFormatSortUp; - dxFormatColorBoxAlignmentMask = dxFormatColorBoxAlignmentLeft or dxFormatColorBoxAlignmentRight; - - dxFormatProgressBarShowPercentSymbol = dxPSGlbl.dxFormatMakeSpaceForEmptyImage; - dxFormatProgressBarShowText = dxPSGlbl.dxFormatCheckFlat; - dxFormatProgressBarOrientationOffset = dxPSGlbl.dxFormatSortOrderOffset; - dxFormatProgressBarOrientationHorizontal = dxPSGlbl.dxFormatSortNo; - dxFormatProgressBarOrientationVertical = dxPSGlbl.dxFormatSortUp; - dxFormatProgressBarOrientationMask = dxFormatProgressBarOrientationHorizontal or dxFormatProgressBarOrientationVertical; - -var - FFontImages: TCustomImageList; - {$IFDEF DXVER500} - FRichEdit: TRichEdit; - FRichEditSite: TForm; - {$ENDIF} - -{ Helpers } - -{ ColorComboBoxProperties Helpers } - -function ColorComboBoxProperties_GetColor(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): TColor; -var - ItemIndex: Integer; - S: string; -begin - with TcxCustomColorComboBoxPropertiesAccess(AProperties) do - begin - ItemIndex := IndexByValue(AValue); - if ItemIndex <> -1 then - Result := GetColorByIndex(ItemIndex) - else - if (ColorComboStyle = cxccsComboList) and not IsVarEmpty(AValue) then - Result := DefaultColor - else - TranslateValues(AValue, Result, S); - end; -end; - -function ColorComboBoxProperties_GetColorBoxAlignment(AProperties: TcxCustomEditProperties): TdxReportCellColorBoxAlignment; -begin - Result := ColorBoxAlignmentMap[TcxCustomColorComboBoxPropertiesAccess(AProperties).ColorBoxAlign]; -end; - -function ColorComboBoxProperties_GetColorBoxFrameColor(AProperties: TcxCustomEditProperties): TColor; -begin - Result := TcxCustomColorComboBoxPropertiesAccess(AProperties).ColorBoxFrameColor; -end; - -function ColorComboBoxProperties_GetColorBoxWidth(AProperties: TcxCustomEditProperties): Integer; -begin - Result := TcxCustomColorComboBoxPropertiesAccess(AProperties).ColorBoxWidth; -end; - -function ColorComboBoxProperties_GetShowDescriptions(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := TcxCustomColorComboBoxPropertiesAccess(AProperties).ShowDescriptions; -end; - -function ColorComboBoxProperties_GetText(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): string; -var - ItemIndex: Integer; - Color: TColor; - S: string; -begin - with TcxCustomColorComboBoxPropertiesAccess(AProperties) do - begin - ItemIndex := IndexByValue(AValue); - if (ItemIndex = -1) and ((ColorComboStyle <> cxccsComboList) or IsVarEmpty(AValue)) then - begin - TranslateValues(AValue, Color, S); - Result := S; - end - else - Result := GetDescriptionByIndex(ItemIndex); - end; -end; - -{ FontNameComboBoxProperties Helpers } - -function FontNameComboBox_GetShowTypeIcon(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := ftiShowInCombo in TcxCustomFontNameComboBoxPropertiesAccess(AProperties).ShowFontTypeIcon; -end; - -function FontNameComboBox_GetTypeIconImageIndex(AProperties: TcxCustomEditProperties; const AValue: TcxEditValue): Integer; -const - ImageIndexes: array[Boolean] of Integer = (0, 1); -var - Index: Integer; -begin - Result := -1; - if FontNameComboBox_GetShowTypeIcon(AProperties) then - with TcxCustomFontNameComboBoxPropertiesAccess(AProperties) do - begin - Index := Items.IndexOf(GetDisplayText(AValue, False)); - if Index <> -1 then - Result := ImageIndexes[Integer(Items.Objects[Index]) and TRUETYPE_FONTTYPE = 0]; - end; -end; - -{ ProgressBarProperties Helpers } - -function ProgressBarProperties_GetMaxValue(AProperties: TcxCustomEditProperties): Double; -begin - Result := TcxCustomProgressBarPropertiesAccess(AProperties).Max; -end; - -function ProgressBarProperties_GetMinValue(AProperties: TcxCustomEditProperties): Double; -begin - Result := TcxCustomProgressBarPropertiesAccess(AProperties).Min; -end; - -function ProgressBarProperties_GetOrientation(AProperties: TcxCustomEditProperties): TdxReportCellProgressBarOrientation; -begin - Result := ProgressBarOrientationMap[TcxCustomProgressBarPropertiesAccess(AProperties).Orientation]; -end; - -function ProgressBarProperties_GetProgressBarColor(AProperties: TcxCustomEditProperties): TColor; -begin - Result := TcxCustomProgressBarPropertiesAccess(AProperties).BeginColor; -end; - -function ProgressBarProperties_GetShowPercentSymbol(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := TcxCustomProgressBarPropertiesAccess(AProperties).ShowTextStyle = cxtsPercent; -end; - -function ProgressBarProperties_GetShowText(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := TcxCustomProgressBarPropertiesAccess(AProperties).ShowText; -end; - -function ProgressBarProperties_GetText(AProperties: TcxCustomEditProperties): string; -begin - Result := TcxCustomProgressBarPropertiesAccess(AProperties).Text; -end; - -{$IFDEF DXVER500} - -{ CheckGroupProperties Helpers } - -function CheckGroupProperties_GetGlyph(AProperties: TcxCustomEditProperties): TBitmap; -begin - Result := TcxCustomCheckGroupPropertiesAccess(AProperties).Glyph; -end; - -function CheckGroupProperties_GetGlyphCount(AProperties: TcxCustomEditProperties): Integer; -begin - Result := TcxCustomCheckGroupPropertiesAccess(AProperties).GlyphCount; -end; - -function CheckGroupProperties_GetCheckPos(AProperties: TcxCustomEditProperties): TdxCellCheckPos; -begin - Result := LeftRightMap[TcxCustomCheckGroupPropertiesAccess(AProperties).ItemAlignment]; -end; - -function CheckGroupProperties_GetCheckStates(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; out ACheckStates: TcxCheckStates): Boolean; -begin - with TcxCustomCheckGroupPropertiesAccess(AProperties) do - Result := cxCheckBox.CalculateCheckStates(AValue, Items, EditValueFormat, ACheckStates) -end; - -function CheckGroupProperties_GetIsItemEnabled(AProperties: TcxCustomEditProperties; AnIndex: Integer): Boolean; -begin - Result := TcxCustomCheckGroupPropertiesAccess(AProperties).Items[AnIndex].Enabled; -end; - -{ RichEditProperties Helpers } - -function RichEditProperties_GetIsMemoMode(AProperties: TcxCustomEditProperties): Boolean; -begin - with TcxCustomRichEditPropertiesAccess(AProperties) do - Result := MemoMode or PlainText; -end; - -{$ENDIF} - - { Utilities } - -function FontImages: TCustomImageList; - - procedure AddImage(AnImage: TBitmap); - begin - FFontImages.AddMasked(AnImage, clDefault); - end; - -begin - if FFontImages = nil then - begin - FFontImages := TImageList.Create(nil); - FFontImages.Width := cxFontNameComboBox.FTrueTypeFontBitmap.Width; - FFontImages.Height := cxFontNameComboBox.FTrueTypeFontBitmap.Height; - FFontImages.AllocBy := 2; - - AddImage(cxFontNameComboBox.FTrueTypeFontBitmap); - AddImage(cxFontNameComboBox.FNonTrueTypeFontBitmap); - end; - Result := FFontImages; -end; - -{$IFDEF DXVER500} -function RichEdit: TRichEdit; -begin - if FRichEdit = nil then - begin - FRichEditSite := TForm.Create(nil); - FRichEdit := TRichEdit.Create(nil); - FRichEdit.Parent := FRichEditSite; - end; - Result := FRichEdit; -end; -{$ENDIF} - -{ TdxReportCellColorBox } - -constructor TdxReportCellColorBox.Create(AParent: TdxReportCell); -begin - inherited; - FColorBoxFrameColor := clBtnShadow; - FColorBoxWidth := dxDefaultColorBoxWidth; - FColorValue := clBlack; -end; - -procedure TdxReportCellColorBox.Assign(Source: TPersistent); -begin - if Source is TdxReportCellColorBox then - with TdxReportCellColorBox(Source) do - begin - Self.ColorBoxFrameColor := ColorBoxFrameColor; - Self.ColorBoxWidth := ColorBoxWidth; - Self.ColorValue := ColorValue; - end; - inherited; -end; - -function TdxReportCellColorBox.ActualColorBoxWidth(DC: HDC): Integer; -var - W: Integer; -begin - Result := ColorBoxWidth; - with GetInnerBounds(DC) do - W := Right - Left; - if Result > W - 2 * LineThickness then - Result := W - 2 * LineThickness; - if Result < 0 then - Result := 0; -end; - -procedure TdxReportCellColorBox.DrawImage(DC: HDC); -begin - DrawColorBox(DC); -end; - -function TdxReportCellColorBox.MeasureContentHeight(DC: HDC): Integer; -begin - if ShowDescription then - Result := inherited MeasureContentHeight(DC) - else - Result := Height; -end; - -procedure TdxReportCellColorBox.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -begin - inherited; - ColorBoxWidth := MulDiv(ColorBoxWidth, APixelsNumerator, APixelsDenominator); -end; - -function TdxReportCellColorBox.GetImageAreaBounds(DC: HDC): TRect; -begin - Result := GetInnerBounds(DC); - if ShowDescription then - if ColorBoxAlignment = ccbaLeft then - Result.Right := Result.Left + ActualColorBoxWidth(DC) + 2 * LineThickness - else - Result.Left := Result.Right - ActualColorBoxWidth(DC) + 2 * LineThickness; -end; - -function TdxReportCellColorBox.GetImageBounds(DC: HDC): TRect; -begin - Result := GetImageAreaBounds(DC); - - if not IsRectEmpty(Result) then - InflateRect(Result, -LineThickness, -LineThickness); - if IsRectEmpty(Result) then - Result := NullRect; -end; - -procedure TdxReportCellColorBox.GetImageSizes(var AImageWidth, AImageHeight: Integer); -begin - AImageWidth := ActualColorBoxWidth(NullDC) + 2; - AImageHeight := Height; -end; - -function TdxReportCellColorBox.GetTextBounds(DC: HDC): TRect; -begin - if ShowDescription then - begin - Result := GetInnerBounds(DC); - if ColorBoxAlignment = ccbaLeft then - Inc(Result.Left, ActualColorBoxWidth(DC) + 2 * LineThickness) - else - Dec(Result.Right, ActualColorBoxWidth(DC) + 2 * LineThickness); - if IsRectEmpty(Result) then - Result := NullRect; - end - else - Result := NullRect; -end; - -function TdxReportCellColorBox.HasImage: Boolean; -begin - Result := True; -end; - -function TdxReportCellColorBox.IsImageBackgroundDrawn: Boolean; -begin - Result := False; -end; - -function TdxReportCellColorBox.IsImageDrawn: Boolean; -begin - Result := True; -end; - -procedure TdxReportCellColorBox.ReadData(AReader: TdxPSDataReader); -begin - inherited; - ColorBoxFrameColor := AReader.ReadInteger; - ColorBoxWidth := AReader.ReadInteger; - ColorValue := AReader.ReadInteger; -end; - -procedure TdxReportCellColorBox.WriteData(AWriter: TdxPSDataWriter); -begin - inherited; - AWriter.WriteInteger(ColorBoxFrameColor); - AWriter.WriteInteger(ColorBoxWidth); - AWriter.WriteInteger(ColorValue); -end; - -procedure TdxReportCellColorBox.DrawColorBox(DC: HDC); -begin - Renderer.FrameRect(DC, GetImageAreaBounds(DC), Color); - Renderer.FrameRect(DC, GetColorBoxFrameBounds(DC), ColorBoxFrameColor); - Renderer.FillRect(DC, GetColorBoxIntreriorBounds(DC), ColorValue); -end; - -function TdxReportCellColorBox.GetColorBoxFrameBounds(DC: HDC): TRect; -begin - Result := GetImageBounds(DC); -end; - -function TdxReportCellColorBox.GetColorBoxIntreriorBounds(DC: HDC): TRect; -begin - Result := GetColorBoxFrameBounds(DC); - if not IsRectEmpty(Result) then - InflateRect(Result, -LineThickness, -LineThickness); - if IsRectEmpty(Result) then - Result := NullRect; -end; - -function TdxReportCellColorBox.GetColorBoxAlignment: TdxReportCellColorBoxAlignment; -begin - Result := TdxReportCellColorBoxAlignment((Format and dxFormatColorBoxAlignmentMask) shr dxFormatColorBoxAlignmentOffset); -end; - -function TdxReportCellColorBox.GetShowDescription: Boolean; -begin - Result := GetFormatBit(dxFormatColorBoxShowDescription); -end; - -procedure TdxReportCellColorBox.SetColorBoxAlignment(Value: TdxReportCellColorBoxAlignment); -begin - Format := Format and not dxFormatColorBoxAlignmentMask or (Byte(Value) shl dxFormatColorBoxAlignmentOffset); -end; - -procedure TdxReportCellColorBox.SetShowDescription(Value: Boolean); -begin - SetFormatBit(dxFormatColorBoxShowDescription, Value); -end; - -{ TdxReportCellProgressBar } - -constructor TdxReportCellProgressBar.Create(AParent: TdxReportCell); -begin - inherited; - MaxValue := 100; - MinValue := 0; - Orientation := pboHorizontal; - ProgressColor := clNavy; - Value := 0; - - TextAlignX := taCenterX; - TextAlignY := taCenterY; -end; - -procedure TdxReportCellProgressBar.Assign(Source: TPersistent); -begin - if Source is TdxReportCellProgressBar then - with TdxReportCellProgressBar(Source) do - begin - Self.MaxValue := MaxValue; - Self.MinValue := MinValue; - Self.ProgressColor := ProgressColor; - Self.Value := Value; - end; - inherited; -end; - -procedure TdxReportCellProgressBar.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - if IsBackgroundBitmapDrawn then - DrawBackgroundBitmap(DC) - else - if IsBackgroundDrawn then - DrawBackground(DC); - - if IsProgressBarDrawn(DC) then DrawProgressBar(DC); - if IsTextDrawn then DrawText(DC); - - if IsBordersDrawn then DrawBorders(DC); -end; - -procedure TdxReportCellProgressBar.DrawProgressBar(DC: HDC); -var - R: TRect; -begin - R := GetProgressBarProgressBounds(DC); - if RectVisible(DC, R) then - Renderer.FillRect(DC, R, ProgressColor); -end; - -procedure TdxReportCellProgressBar.DrawText(DC: HDC); - - procedure DrawClippedText(var ATextRect, AClipRect: TRect; ATextColor: TColor); - var - Rgn: HRGN; - begin - ATextColor := SetTextColor(DC, ATextColor); - Rgn := Renderer.IntersectClipRect(AClipRect); - Renderer.DrawTextEx(DC, ATextRect, 0, 0, 0, Text, nil, DTFormat and not CXTO_AUTOINDENTS); - Renderer.RestoreClipRgn(Rgn); - SetTextColor(DC, ATextColor); - end; - -var - PrevFont: HFONT; - Size: TSize; - TextRect, ClipRect: TRect; -begin - PrevFont := GetCurrentObject(DC, OBJ_FONT); - SelectObject(DC, Font.Handle); - - GetTextExtentPoint32(DC, PChar(Text), Length(Text), Size); - TextRect := GetInnerBounds(DC); - InflateRect(TextRect, -(TextRect.Right - TextRect.Left - Size.cX) div 2, 0); - - if IntersectRect(ClipRect, TextRect, GetProgressBarProgressBounds(DC)) then - DrawClippedText(TextRect, ClipRect, dxPSUtl.InvertColor(ProgressColor)); - if IntersectRect(ClipRect, TextRect, GetProgressBarProgressRestBounds(DC)) then - DrawClippedText(TextRect, ClipRect, ColorToRGB(Font.Color)); - - SelectObject(DC, PrevFont); -end; - -function TdxReportCellProgressBar.GetText: string; -begin - if ShowText then - begin - if FText = '' then - begin - Result := FloatToStr(Value); - if ShowPercentSymbol then - Result := Result + ' ' + PercentSymbol; - end - else - Result := FText; - end - else - Result := ''; -end; - -procedure TdxReportCellProgressBar.SetText(const Value: string); -begin - FText := Value; -end; - -function TdxReportCellProgressBar.GetProgressBarProgressBounds(DC: HDC): TRect; -begin - Result := GetInnerBounds(DC); - InflateRect(Result, -LineThickness, -LineThickness); - if IsRectEmpty(Result) then - Result := dxPSGlbl.NullRect; - - if not IsRectEmpty(Result) and (Abs(Value - MaxValue) > Eps) then - begin - with Result do - if Orientation = pboHorizontal then - Right := Left + Round((Right - Left) * (Value - MinValue) / (MaxValue - MinValue)) - else - Top := Bottom - Round((Bottom - Top) * (Value - MinValue) / (MaxValue - MinValue)); - - if IsRectEmpty(Result) then - Result := dxPSGlbl.NullRect; - end; - - if not IsRectEmpty(Result) then - dxPSCore.FixupRect(DC, Result); -end; - -function TdxReportCellProgressBar.GetProgressBarProgressRestBounds(DC: HDC): TRect; -begin - Result := GetInnerBounds(DC); - InflateRect(Result, -LineThickness, -LineThickness); - if IsRectEmpty(Result) then - Result := dxPSGlbl.NullRect; - - if not IsRectEmpty(Result) and (Abs(Value - MinValue) > Eps) then - begin - with Result do - if Orientation = pboHorizontal then - Left := Right - Round((Right - Left) * (MaxValue - Value) / (MaxValue - MinValue)) - else - Bottom := Top + Round((Bottom - Top) * (MaxValue - Value) / (MaxValue - MinValue)); - - if IsRectEmpty(Result) then - Result := dxPSGlbl.NullRect; - end; - - if not IsRectEmpty(Result) then - dxPSCore.FixupRect(DC, Result); -end; - -function TdxReportCellProgressBar.IsProgressBarDrawn(DC: HDC): Boolean; -begin - Result := not IsRectEmpty(GetProgressBarProgressBounds(DC)) or ShowText; -end; - -procedure TdxReportCellProgressBar.ReadData(AReader: TdxPSDataReader); -begin - inherited; - MaxValue := AReader.ReadFloat; - MinValue := AReader.ReadFloat; - ProgressColor := AReader.ReadInteger; - Value := AReader.ReadFloat; -end; - -procedure TdxReportCellProgressBar.WriteData(AWriter: TdxPSDataWriter); -begin - inherited; - AWriter.WriteFloat(MaxValue); - AWriter.WriteFloat(MinValue); - AWriter.WriteInteger(ProgressColor); - AWriter.WriteFloat(Value); -end; - -function TdxReportCellProgressBar.GetOrientation: TdxReportCellProgressBarOrientation; -begin - Result := TdxReportCellProgressBarOrientation((Format and dxFormatProgressBarOrientationMask) shr dxFormatProgressBarOrientationOffset); -end; - -function TdxReportCellProgressBar.GetShowPercentSymbol: Boolean; -begin - Result := GetFormatBit(dxFormatProgressBarShowPercentSymbol); -end; - -function TdxReportCellProgressBar.GetShowText: Boolean; -begin - Result := GetFormatBit(dxFormatProgressBarShowText); -end; - -procedure TdxReportCellProgressBar.SetOrientation(Value: TdxReportCellProgressBarOrientation); -begin - Format := Format and not dxFormatProgressBarOrientationMask or (Byte(Value) shl dxFormatProgressBarOrientationOffset); -end; - -procedure TdxReportCellProgressBar.SetMaxValue(Value: Double); -begin - if Value < MinValue then - Value := MinValue; - FMaxValue := Value; - SetValue(Self.Value); -end; - -procedure TdxReportCellProgressBar.SetMinValue(Value: Double); -begin - if Value > MaxValue then - Value := MaxValue; - FMinValue := Value; - SetValue(Self.Value); -end; - -procedure TdxReportCellProgressBar.SetShowPercentSymbol(Value: Boolean); -begin - SetFormatBit(dxFormatProgressBarShowPercentSymbol, Value); -end; - -procedure TdxReportCellProgressBar.SetShowText(Value: Boolean); -begin - SetFormatBit(dxFormatProgressBarShowText, Value); -end; - -procedure TdxReportCellProgressBar.SetValue(Value: Double); -begin - if Value < MinValue then Value := MinValue; - if Value > MaxValue then Value := MaxValue; - FValue := Value; -end; - -{ TdxReportCellRichEditGraphic } - -function TdxReportCellRichEditGraphic.IsBackgroundBitmapDrawn: Boolean; -begin - Result := inherited IsBackgroundBitmapDrawn and ImageTransparent; -end; - -{ TdxPSColorComboBoxDataMap } - -class function TdxPSColorComboBoxDataMap.DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := ColorComboBoxProperties_GetShowDescriptions(AProperties); -end; - -class function TdxPSColorComboBoxDataMap.GetText(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue): string; -begin - Result := ColorComboBoxProperties_GetText(AProperties, AValue); -end; - -class procedure TdxPSColorComboBoxDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); -begin - inherited; - with TdxReportCellColorBox(AnItem) do - begin - ColorBoxAlignment := ColorComboBoxProperties_GetColorBoxAlignment(AProperties); - ColorBoxFrameColor := ColorComboBoxProperties_GetColorBoxFrameColor(AProperties); - ColorBoxWidth := ColorComboBoxProperties_GetColorBoxWidth(AProperties); - ColorValue := ColorComboBoxProperties_GetColor(AProperties, AValue); - //EndEllipsis := True; - ShowDescription := ColorComboBoxProperties_GetShowDescriptions(AProperties); - end; -end; - -class function TdxPSColorComboBoxDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellColorBox; -end; - -class function TdxPSColorComboBoxDataMap.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -begin - Result := inherited MeasureWidth(AProperties, AValue, ACellParams, AFont, ARecordIndex); - Inc(Result, 2 + dxDefaultColorBoxWidth + 2); -end; - -class function TdxPSColorComboBoxDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomColorComboBoxProperties; -end; - -{ TdxPSFontNameComboBoxDataMap } - -class procedure TdxPSFontNameComboBoxDataMap.GetImageLists(AProperties: TcxCustomEditProperties; - AProc: TdxPSGetImageListProc); -begin - AProc(GetImages(AProperties)); -end; - -class function TdxPSFontNameComboBoxDataMap.GetImages(AProperties: TcxCustomEditProperties): TCustomImageList; -begin - Result := FontImages; -end; - -class procedure TdxPSFontNameComboBoxDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); -begin - inherited; - with TdxReportCellImage(AnItem) do - begin - if FontNameComboBox_GetShowTypeIcon(AProperties) then - begin - ImageIndex := FontNameComboBox_GetTypeIconImageIndex(AProperties, AValue); - ImageList := GetImages(AProperties); - end; - MakeSpaceForEmptyImage := True; - end; -end; - -class function TdxPSFontNameComboBoxDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellImage; -end; - -class function TdxPSFontNameComboBoxDataMap.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -begin - Result := inherited MeasureWidth(AProperties, AValue, ACellParams, AFont, ARecordIndex); - if FontNameComboBox_GetShowTypeIcon(AProperties) then - Inc(Result, 1 + GetImages(AProperties).Width + 1); -end; - -class function TdxPSFontNameComboBoxDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomFontNameComboBoxProperties; -end; - -{$IFDEF REGISTERCXSHELLCTRLS} - -{ TdxPSShellComboBoxDataMap } - -class function TdxPSShellComboBoxDataMap.GetImageIndex(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue): Integer; -var - Text: string; - Stub: Integer; -begin - TcxCustomShellComboBoxPropertiesAccess(AProperties).GetShellDisplayValue(AValue, False, Text, Result, Stub); -end; - -class procedure TdxPSShellComboBoxDataMap.GetImageLists(AProperties: TcxCustomEditProperties; - AProc: TdxPSGetImageListProc); -begin - AProc(GetImages(AProperties)); -end; - -class function TdxPSShellComboBoxDataMap.GetImages(AProperties: TcxCustomEditProperties): TCustomImageList; -begin - Result := dxPSUtl.ShellSmallImages; //cxShellComboBox.cxShellComboBoxImageList -end; - -class function TdxPSShellComboBoxDataMap.HasImages(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := GetImages(AProperties) <> nil; -end; - -class procedure TdxPSShellComboBoxDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); -begin - inherited; - with TdxReportCellImage(AnItem) do - begin - if not TcxCustomShellComboBoxPropertiesAccess(AProperties).FastSearch then - begin - ImageList := GetImages(AProperties); - ImageIndex := GetImageIndex(AProperties, AValue); - end; - EndEllipsis := True; - MakeSpaceForEmptyImage := True; - end; -end; - -class function TdxPSShellComboBoxDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellImage; -end; - -class function TdxPSShellComboBoxDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomShellComboBoxProperties; -end; - -class function TdxPSShellComboBoxDataMap.MeasureWidth(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; const ACellParams: IdxPSCellParams; AFont: TFont; - ARecordIndex: Integer = 0): Integer; -begin - Result := inherited MeasureWidth(AProperties, AValue, ACellParams, AFont, ARecordIndex); - if not TcxCustomShellComboBoxPropertiesAccess(AProperties).FastSearch then - Inc(Result, 1 + GetImages(AProperties).Width + 1); -end; - -{$ENDIF} - -{ TdxPSLabelDataMap } - -class function TdxPSLabelDataMap.DoesItemParticipateInAutoWidthCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := True; -end; - -class function TdxPSLabelDataMap.DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := True; -end; - -class procedure TdxPSLabelDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); -begin - inherited; -end; - -class function TdxPSLabelDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomLabelProperties; -end; - -{ TdxPSProgressBarDataMap } - -class function TdxPSProgressBarDataMap.GetValue(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue): Double; - - function DropPercentSymbol(const AText: string): string; - var - P: Integer; - begin - Result := AText; - P := Pos(PercentSymbol, Result); - if P <> 0 then - begin - Delete(Result, P, Length(PercentSymbol)); - if Result[Length(Result)] = ' ' then - Delete(Result, Length(Result), 1); - end; - end; - -var - Text: string; - Code: Integer; -begin - Text := GetText(AProperties, AValue); - Text := DropPercentSymbol(Text); - Val(Text, Result, Code); - if Code <> 0 then Result := 0; -end; - -class function TdxPSProgressBarDataMap.HasText(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue): Boolean; -begin - Result := inherited HasText(AProperties, AValue) and ProgressBarProperties_GetShowText(AProperties); -end; - -class procedure TdxPSProgressBarDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); -begin - inherited; - with TdxReportCellProgressBar(AnItem) do - begin - MaxValue := ProgressBarProperties_GetMaxValue(AProperties); - MinValue := ProgressBarProperties_GetMinValue(AProperties); - Multiline := False; - Orientation := ProgressBarProperties_GetOrientation(AProperties); - ProgressColor := ProgressBarProperties_GetProgressBarColor(AProperties); - ShowPercentSymbol := ProgressBarProperties_GetShowPercentSymbol(AProperties); - ShowText := ProgressBarProperties_GetShowText(AProperties); - if ShowText then - Text := ProgressBarProperties_GetText(AProperties); - Value := GetValue(AProperties, AValue); - end; -end; - -class function TdxPSProgressBarDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellProgressBar; -end; - -class function TdxPSProgressBarDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomProgressBarProperties; -end; - -{ TdxPSTrackBarDataMap } - -class procedure TdxPSTrackBarDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); -begin - inherited; - with TdxReportCellString(AnItem) do - begin - Multiline := False; - TextAlignX := taLeft; - TextAlignY := taCenterY; - end; -end; - -class function TdxPSTrackBarDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellString; -end; - -class function TdxPSTrackBarDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomTrackBarProperties; -end; - -{$IFDEF DXVER500} - -{ TdxPSCheckButtonGroupDataMap } - -class function TdxPSCheckButtonGroupDataMap.ButtonGroupClass(AProperties: TcxCustomEditProperties): TdxCustomReportButtonGroupClass; -begin - Result := TdxReportCheckGroup; -end; - -class procedure TdxPSCheckButtonGroupDataMap.InitializeGroupButton(AProperties: TcxCustomEditProperties; - const AValue: TcxEditValue; AButton: TdxCustomReportCellCheck; AnIndex: Integer); -var - CheckStates: TcxCheckStates; -begin - inherited; - AButton.CheckPos := CheckGroupProperties_GetCheckPos(AProperties); - if CheckGroupProperties_GetCheckStates(AProperties, AValue, CheckStates) then - begin - AButton.Checked := CheckStates[AnIndex] in [cbsChecked, cbsGrayed]; - AButton.Enabled := (CheckStates[AnIndex] <> cbsGrayed) and CheckGroupProperties_GetIsItemEnabled(AProperties, AnIndex); - end - else - begin - AButton.Checked := False; - AButton.Enabled := True; - end; -end; - -class procedure TdxPSCheckButtonGroupDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); -var - CheckGlyph: TBitmap; -begin - inherited; - with TdxReportCheckGroup(AnItem) do - begin - CheckGlyph := CheckGroupProperties_GetGlyph(AProperties); - if not CheckGlyph.Empty then - begin - Glyph := CheckGlyph; - GlyphCount := CheckGroupProperties_GetGlyphCount(AProperties); - end; - end; -end; - -class function TdxPSCheckButtonGroupDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomCheckGroupProperties; -end; - -{ TdxPSRichEditDataMap } - -class function TdxPSRichEditDataMap.DataMapClass(AProperties: TcxCustomEditProperties): TdxPSDataMapClass; -const - DataMapClasses: array[Boolean] of TdxPSDataMapClass = (TdxPSRichTextDataMap, TdxPSMemoDataMap); -begin - Result := DataMapClasses[RichEditProperties_GetIsMemoMode(AProperties)]; -end; - -class function TdxPSRichEditDataMap.PropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxCustomRichEditProperties; -end; - -{ TdxPSRichEditDataMap } - -class function TdxPSRichTextDataMap.DoesItemParticipateInBestFitCalculation(AProperties: TcxCustomEditProperties): Boolean; -begin - Result := False; -end; - -class procedure TdxPSRichTextDataMap.InitializeItem(AnItem: TAbstractdxReportCellData; - AProperties: TcxCustomEditProperties; const AValue: TcxEditValue; - const ACellParams: IdxPSCellParams; var AViewParams: TdxReportItemViewParams; - AnIsPreview: Boolean = False; ARecordIndex: Integer = -1; AOwner: TObject = nil); - - function GetGraphicClass: TGraphicClass; - var - CellParams2: IdxPSCellParams2; - begin - if Supports(ACellParams, IdxPSCellParams2, CellParams2) then - Result := CellParams2.RichEditGraphicClass - else - Result := TMetafile; - end; - - function GetImageTransparent: Boolean; - var - CellParams2: IdxPSCellParams2; - begin - Result := Supports(ACellParams, IdxPSCellParams2, CellParams2) and CellParams2.GetRichEditTransparent; - end; - - function GetMargins: TRect; - var - CellParams2: IdxPSCellParams2; - begin - if AnIsPreview and Supports(ACellParams, IdxPSCellParams2, CellParams2) then - with Result do - begin - Left := CellParams2.PreviewMarginLeft; - Top := dxTextSpace; - Right := CellParams2.PreviewMarginRight; - Bottom := dxTextSpace; - end - else - Result := MakeRect(dxTextSpace, dxTextSpace, dxTextSpace, dxTextSpace); - end; - - function GetMaxHeight: Integer; - var - CellParams2: IdxPSCellParams2; - begin - if Supports(ACellParams, IdxPSCellParams2, CellParams2) then - Result := CellParams2.PreviewMaxHeight - else - Result := -1; - end; - -var - Graphic: TGraphic; -begin - RichEdit.Clear; - inherited; - cxRichEdit.SetRichEditText(RichEdit, AValue); - try - RichEdit.Color := AViewParams.NativeParams.Color; - Graphic := dxPSRELnk.GetRichEditAsGraphic(RichEdit.Handle, - AViewParams.NativeParams.Color, GetMargins, GetGraphicClass, AnItem.Width, - -1, GetMaxHeight, ACellParams.DC, dxDefaultRichEditVersion); - try - TdxReportCellRichEditGraphic(AnItem).Image := Graphic; - TdxReportCellRichEditGraphic(AnItem).ImageTransparent := GetImageTransparent; - TdxReportCellRichEditGraphic(AnItem).Transparent := GetImageTransparent; - finally - Graphic.Free; - end; - finally - cxRichEdit.SetRichEditText(RichEdit, ''); - end; -end; - -class function TdxPSRichTextDataMap.ItemClass(AProperties: TcxCustomEditProperties; - AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := TdxReportCellRichEditGraphic;//TdxReportCellGraphic; -end; - -{$ENDIF} - -procedure RegisterAssistants; -begin - TdxPSColorComboBoxDataMap.Register; - TdxPSFontNameComboBoxDataMap.Register; - {$IFDEF REGISTERCXSHELLCTRLS} - TdxPSShellComboBoxDataMap.Register; - {$ENDIF} - TdxPSLabelDataMap.Register; - TdxPSProgressBarDataMap.Register; - TdxPSTrackBarDataMap.Register; - {$IFDEF DXVER500} - TdxPSCheckButtonGroupDataMap.Register; - TdxPSRichEditDataMap.Register; - {$ENDIF} -end; - -procedure RegisterItems; -begin - TdxReportCellColorBox.Register; - TdxReportCellProgressBar.Register; -end; - -procedure UnregisterAssistants; -begin - {$IFDEF DXVER500} - TdxPSRichEditDataMap.Unregister; - TdxPSCheckButtonGroupDataMap.Unregister; - {$ENDIF} - TdxPSTrackBarDataMap.Unregister; - TdxPSProgressBarDataMap.Unregister; - TdxPSLabelDataMap.Unregister; - {$IFDEF REGISTERCXSHELLCTRLS} - TdxPSShellComboBoxDataMap.Unregister; - {$ENDIF} - TdxPSFontNameComboBoxDataMap.Unregister; - TdxPSColorComboBoxDataMap.Unregister; -end; - -procedure UnregisterItems; -begin - TdxReportCellProgressBar.Unregister; - TdxReportCellColorBox.Unregister; -end; - -initialization - RegisterAssistants; - RegisterItems; - -finalization - UnregisterItems; - UnregisterAssistants; - - FreeAndNil(FFontImages); - {$IFDEF DXVER500} - FreeAndNil(FRichEdit); - FreeAndNil(FRichEditSite); - {$ENDIF} - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtDBEditorLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxExtDBEditorLnkReg.pas deleted file mode 100644 index 72ced510..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtDBEditorLnkReg.pas +++ /dev/null @@ -1,58 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxExtDBEditorLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - Classes, dxPScxExtDBEditorLnks; - -procedure Register; -begin - RegisterNoIcon([TcxDBCheckListBoxReportLink]); - {$IFDEF DXVER500} - RegisterNoIcon([TcxDBRichEditReportLink]); - {$ENDIF} -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtDBEditorLnks.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxExtDBEditorLnks.pas deleted file mode 100644 index bc1cd495..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtDBEditorLnks.pas +++ /dev/null @@ -1,119 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxExtDBEditorLnks; - -interface - -{$I cxVer.inc} - -uses - cxDBCheckListBox, cxDBRichEdit, dxPScxCheckListBoxLnk, dxPScxExtComCtrlsLnk; - -type - TcxDBCheckListBoxReportLink = class(TcxCustomCheckListBoxReportLink) - private - function GetcxDBCheckListBox: TcxDBCheckListBox; - public - property cxDBCheckListBox: TcxDBCheckListBox read GetcxDBCheckListBox; - published - property Color; - property EndEllipsis; - property EvenColor; - property EvenFont; - property Font; - property Multiline; - property OddColor; - property OddFont; - property Options; - property RowAutoHeight; - property ScaleFonts; - property SupportedCustomDraw; - property Transparent; - property UseHorzDelimiters; - property UseVertDelimiters; - property Width; - - property OnCustomDrawItem; - property OnInitializeItem; - end; - - {$IFDEF DXVER500} - - TcxDBRichEditReportLink = class(TcxCustomRichEditReportLink) - private - function GetRichEdit: TcxDBRichEdit; - public - property RichEdit: TcxDBRichEdit read GetRichEdit; - end; - - {$ENDIF} - -implementation - -uses - dxPSCore; - -{ TcxDBCheckListBoxReportLink } - -function TcxDBCheckListBoxReportLink.GetcxDBCheckListBox: TcxDBCheckListBox; -begin - Result := inherited Component as TcxDBCheckListBox; -end; - -{$IFDEF DXVER500} - -{ TcxDBRichEditReportLink } - -function TcxDBRichEditReportLink.GetRichEdit: TcxDBRichEdit; -begin - Result := inherited Component as TcxDBRichEdit; -end; - -{$ENDIF} - -initialization - dxPSRegisterReportLink(TcxDBCheckListBoxReportLink, TcxDBCheckListBox, TcxfmCheckListBoxDesignWindow); - {$IFDEF DXVER500} - dxPSRegisterReportLink(TcxDBRichEditReportLink, TcxDBRichEdit, nil); - {$ENDIF} - -finalization - {$IFDEF DXVER500} - dxPSUnregisterReportLink(TcxDBRichEditReportLink, TcxDBRichEdit, nil); - {$ENDIF} - dxPSUnregisterReportLink(TcxDBCheckListBoxReportLink, TcxDBCheckListBox, TcxfmCheckListBoxDesignWindow); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtEditorLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxExtEditorLnkReg.pas deleted file mode 100644 index f04e9fb4..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtEditorLnkReg.pas +++ /dev/null @@ -1,69 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxExtEditorLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI9} - DesignIntf, -{$ENDIF} - Classes, dxPScxMCListBoxLnk, dxPScxCheckListBoxLnk, dxPScxExtComCtrlsLnk; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterNoIcon([TcxMCListBoxReportLink, TcxCheckListBoxReportLink]); - {$IFDEF DXVER500} - RegisterNoIcon([TcxRichEditReportLink]); - {$ENDIF} - RegisterNoIcon([TcxTreeViewReportLink, TcxListViewReportLink]); - {$IFDEF REGISTERCXSHELLCTRLS} - RegisterNoIcon([TcxShellListViewReportLink, TcxShellTreeViewReportLink]); - {$ENDIF} -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtEditorProducers.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxExtEditorProducers.pas deleted file mode 100644 index 94949d4e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxExtEditorProducers.pas +++ /dev/null @@ -1,514 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxExtEditorProducers; - -interface - -{$I cxVer.inc} - -uses - Classes, Controls, Windows, Graphics, cxFontNameComboBox, cxColorComboBox, - cxCheckComboBox, {$IFDEF REGISTERCXSHELLCTRLS} cxShellComboBox, {$ENDIF} - cxSpinButton, {$IFDEF DXVER500} cxCheckGroup, cxRichEdit, {$ENDIF} - cxLookAndFeelPainters, dxPSContainerLnk, dxPScxExtCommon, dxPScxEditorProducers, - dxPSCore; - -type - TdxPScxCustomColorComboBoxProducer = class(TdxPScxCustomTextEditProducer) - protected - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TcxCustomColorComboBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomColorComboBoxProperties; reintroduce; overload; - end; - - {$IFDEF REGISTERCXSHELLCTRLS} - - TdxPScxCustomShellComboBoxProducer = class(TdxPScxCustomTextEditProducer) - protected - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TcxCustomShellComboBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomShellComboBoxProperties; reintroduce; overload; - end; - - {$ENDIF} - - TdxPScxCustomFontNameComboBoxProducer = class(TdxPScxCustomComboBoxProducer) - protected - function GetFontName: string; override; - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function IsFontSubstitutable: Boolean; override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TcxCustomFontNameComboBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomFontNameComboBoxProperties; reintroduce; overload; - end; - - TdxPScxCustomCheckComboBoxProducer = class(TdxPScxCustomComboBoxProducer) - public - function Control: TcxCustomCheckComboBox; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomCheckComboBoxProperties; reintroduce; overload; - end; - - TdxPScxCustomSpinButtonAsMetafileProducer = class(TdxPSWinControlAsMetafileProducer) - protected - class function BuddyClass: TdxPSCustomProducerClass; override; - end; - - TdxPScxCustomSpinButtonProducer = class(TdxPScxCustomTextEditProducer) - public - function Control: TcxCustomSpinButton; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - {$IFDEF DXVER500} - - TdxPScxCustomCheckGroupProducer = class(TdxPScxCustomButtonGroupProducer) - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - procedure InitializeButton(AGroup: TdxCustomReportButtonGroup; - AButton: TdxCustomReportCellCheck; AnIndex: Integer); override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - public - function Control: TcxCustomCheckGroup; reintroduce; overload; - class function ControlClass: TControlClass; override; - function Properties: TcxCustomCheckGroupProperties; reintroduce; overload; - end; - - TdxPScxCustomRichEditProducer = class(TdxPScxContainerProducer) - protected - function CreateImage: TGraphic; virtual; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - function ObjectExpandHeight: Boolean; override; - public - function Control: TcxCustomRichEdit; reintroduce; overload; - class function ControlClass: TControlClass; override; - - function ProducingObjectFriendlyName: string; override; - end; - - {$ENDIF} - -implementation - -uses - ImgList, SysUtils, dxPSGlbl, dxPSUtl, dxPScxCheckListBoxLnk, {dxPScxImgLnk,} - {$IFDEF REGISTERCXSHELLCTRLS} dxPScxExtComCtrlsLnk, {$ENDIF} dxPScxMCListBoxLnk, - {$IFDEF DXVER500} cxCheckBox, {$ENDIF} dxPSRELnk; - -type - TdxCustomReportCellCheckAccess = class(TdxCustomReportCellCheck); - - TcxCustomColorComboBoxAccess = class(TcxCustomColorComboBox); - TcxCustomFontNameComboBoxAccess = class(TcxCustomFontNameComboBox); - {$IFDEF DXVER500} - TcxCustomCheckGroupPropertiesAccess = class(TcxCustomCheckGroupProperties); - TcxCustomRichEditAccess = class(TcxCustomRichEdit); - {$ENDIF} - TcxCustomColorComboBoxPropertiesAccess = class(TcxCustomColorComboBoxProperties); - TcxCustomFontNameComboBoxPropertiesAccess = class(TcxCustomFontNameComboBoxProperties); - {$IFDEF REGISTERCXSHELLCTRLS} - TcxCustomShellComboBoxPropertiesAccess = class(TcxCustomShellComboBoxProperties); - {$ENDIF} - -{ TdxPScxColorComboBoxProducer } - -function TdxPScxCustomColorComboBoxProducer.Control: TcxCustomColorComboBox; -begin - Result := inherited Control as TcxCustomColorComboBox; -end; - -class function TdxPScxCustomColorComboBoxProducer.ControlClass: TControlClass; -begin - Result := TcxCustomColorComboBox; -end; - -function TdxPScxCustomColorComboBoxProducer.Properties: TcxCustomColorComboBoxProperties; -begin - Result := inherited Properties as TcxCustomColorComboBoxProperties; -end; - -procedure TdxPScxCustomColorComboBoxProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - with TcxCustomColorComboBoxPropertiesAccess(Properties) do - begin - TdxReportCellColorBox(AnItem).ColorBoxAlignment := ColorBoxAlignmentMap[ColorBoxAlign]; - TdxReportCellColorBox(AnItem).ColorBoxFrameColor := ColorBoxFrameColor; - TdxReportCellColorBox(AnItem).ColorBoxWidth := ColorBoxWidth; - TdxReportCellColorBox(AnItem).ColorValue := TcxCustomColorComboBoxAccess(Control).ColorValue; - TdxReportCellColorBox(AnItem).EndEllipsis := False; - TdxReportCellColorBox(AnItem).ShowDescription := ShowDescriptions; - end; -end; - -function TdxPScxCustomColorComboBoxProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellColorBox; -end; - -{$IFDEF REGISTERCXSHELLCTRLS} - -{ TdxPScxCustomShellComboBoxProducer } - -function TdxPScxCustomShellComboBoxProducer.Control: TcxCustomShellComboBox; -begin - Result := inherited Control as TcxCustomShellComboBox; -end; - -class function TdxPScxCustomShellComboBoxProducer.ControlClass: TControlClass; -begin - Result := TcxCustomShellComboBox; -end; - -function TdxPScxCustomShellComboBoxProducer.Properties: TcxCustomShellComboBoxProperties; -begin - Result := inherited Properties as TcxCustomShellComboBoxProperties; -end; - -procedure TdxPScxCustomShellComboBoxProducer.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(dxPSUtl.ShellSmallImages); -end; - -procedure TdxPScxCustomShellComboBoxProducer.InitializeItem(AnItem: TdxReportVisualItem); -var - AText: string; - AnImageIndex, Stub: Integer; -begin - inherited; - with TcxCustomShellComboBoxPropertiesAccess(Properties) do - begin - GetShellDisplayValue(Control.EditValue, False, AText, AnImageIndex, Stub); - if not FastSearch then - begin - TdxReportCellImage(AnItem).ImageList := dxPSUtl.ShellSmallImages; //cxShellComboBox.cxShellComboBoxImageList; - TdxReportCellImage(AnItem).ImageIndex := AnImageIndex; - end; - TdxReportCellImage(AnItem).EndEllipsis := True; - TdxReportCellImage(AnItem).Text := AText; - end; -end; - -function TdxPScxCustomShellComboBoxProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellImage; -end; - -{$ENDIF} - -{ TdxPScxCustomFontNameComboBoxProducer } - -function TdxPScxCustomFontNameComboBoxProducer.Control: TcxCustomFontNameComboBox; -begin - Result := inherited Control as TcxCustomFontNameComboBox; -end; - -class function TdxPScxCustomFontNameComboBoxProducer.ControlClass: TControlClass; -begin - Result := TcxCustomFontNameComboBox; -end; - -function TdxPScxCustomFontNameComboBoxProducer.Properties: TcxCustomFontNameComboBoxProperties; -begin - Result := inherited Properties as TcxCustomFontNameComboBoxProperties; -end; - -function TdxPScxCustomFontNameComboBoxProducer.GetFontName: string; -begin - if not IsFontSubstitutable then - Result := TcxCustomFontNameComboBoxPropertiesAccess(Properties).Items[TcxCustomFontNameComboBoxAccess(Control).ItemIndex] - else - Result := inherited GetFontName; -end; - -procedure TdxPScxCustomFontNameComboBoxProducer.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(FontImages); -end; - -procedure TdxPScxCustomFontNameComboBoxProducer.InitializeItem(AnItem: TdxReportVisualItem); -const - ImageIndexes: array[Boolean] of Integer = (1, 0); -var - ItemIndex: Integer; -begin - inherited; - with TcxCustomFontNameComboBoxPropertiesAccess(Properties) do - begin - ItemIndex := TcxCustomFontNameComboBoxAccess(Control).ItemIndex; - if ftiShowInCombo in ShowFontTypeIcon then - begin - TdxReportCellImage(AnItem).ImageList := FontImages; - if ItemIndex > -1 then - TdxReportCellImage(AnItem).ImageIndex := ImageIndexes[cxftTTF in ItemTypes[ItemIndex]]; - end; - TdxReportCellImage(AnItem).MakeSpaceForEmptyImage := ftiShowInCombo in ShowFontTypeIcon; - end; -end; - -function TdxPScxCustomFontNameComboBoxProducer.IsFontSubstitutable: Boolean; -begin - Result := not (TcxCustomFontNameComboBoxPropertiesAccess(Properties).UseOwnFont and - (TcxCustomFontNameComboBoxAccess(Control).ItemIndex <> -1)); -end; - -function TdxPScxCustomFontNameComboBoxProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellImage; -end; - -{ TdxPScxCustomCheckComboBoxProducer } - -function TdxPScxCustomCheckComboBoxProducer.Control: TcxCustomCheckComboBox; -begin - Result := inherited Control as TcxCustomCheckComboBox; -end; - -class function TdxPScxCustomCheckComboBoxProducer.ControlClass: TControlClass; -begin - Result := TcxCustomCheckComboBox; -end; - -function TdxPScxCustomCheckComboBoxProducer.Properties: TcxCustomCheckComboBoxProperties; -begin - Result := inherited Properties as TcxCustomCheckComboBoxProperties; -end; - -{ TdxPScxCustomSpinButtonAsMetafileProducer } - -class function TdxPScxCustomSpinButtonAsMetafileProducer.BuddyClass: TdxPSCustomProducerClass; -begin - Result := TdxPScxCustomSpinButtonProducer; -end; - -{ TdxPScxCustomSpinButtonProducer } - -function TdxPScxCustomSpinButtonProducer.Control: TcxCustomSpinButton; -begin - Result := inherited Control as TcxCustomSpinButton; -end; - -class function TdxPScxCustomSpinButtonProducer.ControlClass: TControlClass; -begin - Result := TcxCustomSpinButton; -end; - -{$IFDEF DXVER500} - -{ TdxPScxCustomCheckGroupProducer } - -function TdxPScxCustomCheckGroupProducer.Control: TcxCustomCheckGroup; -begin - Result := inherited Control as TcxCustomCheckGroup; -end; - -class function TdxPScxCustomCheckGroupProducer.ControlClass: TControlClass; -begin - Result := TcxCustomCheckGroup; -end; - -function TdxPScxCustomCheckGroupProducer.Properties: TcxCustomCheckGroupProperties; -begin - Result := inherited Properties as TcxCustomCheckGroupProperties; -end; - -function TdxPScxCustomCheckGroupProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := inherited CanProcessChild(AChildControl) and - not (AChildControl is TcxCheckGroupButton); -end; - -// TcxCheckBoxState = (cbsUnchecked, cbsChecked, cbsGrayed); -procedure TdxPScxCustomCheckGroupProducer.InitializeButton(AGroup: TdxCustomReportButtonGroup; - AButton: TdxCustomReportCellCheck; AnIndex: Integer); -const - LeftRightMap: array[TLeftRight] of TdxCellCheckPos = (ccpLeft, ccpRight); -begin - inherited; - with TdxCustomReportCellCheckAccess(AButton) do - begin - CheckPos := LeftRightMap[TcxCustomCheckGroupPropertiesAccess(Properties).ItemAlignment]; - Checked := Control.States[AnIndex] in [cbsChecked, cbsGrayed]; - Enabled := (Control.States[AnIndex] <> cbsGrayed) and - TcxCustomCheckGroupPropertiesAccess(Properties).Items[AnIndex].Enabled; - end; -end; - -procedure TdxPScxCustomCheckGroupProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - with TdxReportCheckGroup(AnItem) do - if not TcxCustomCheckGroupPropertiesAccess(Properties).Glyph.Empty then - begin - Glyph := TcxCustomCheckGroupPropertiesAccess(Properties).Glyph; - GlyphCount := TcxCustomCheckGroupPropertiesAccess(Properties).GlyphCount; - end; -end; - -function TdxPScxCustomCheckGroupProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCheckGroup; -end; - -{ TdxPScxCustomRichEditProducer } - -function TdxPScxCustomRichEditProducer.Control: TcxCustomRichEdit; -begin - Result := inherited Control as TcxCustomRichEdit; -end; - -class function TdxPScxCustomRichEditProducer.ControlClass: TControlClass; -begin - Result := TcxCustomRichEdit; -end; - -function TdxPScxCustomRichEditProducer.ProducingObjectFriendlyName: string; -begin - Result := ''; - if not IsDesigning and (TcxCustomRichEditAccess(Control).Text <> '') then - Result := dxPSContainerLnk.dxPSMakeFriendlyNameFromStrings(TcxCustomRichEditAccess(Control).Lines); - if Result = '' then - Result := inherited ProducingObjectFriendlyName; -end; - -function TdxPScxCustomRichEditProducer.CreateImage: TGraphic; - - function GetMargins: TRect; - begin - Result := Rect(dxTextSpace, dxTextSpace, dxTextSpace, dxTextSpace); - end; - - function GetMaxHeight: Integer; - begin - if Definition.OptionsPlace.ExpandHeight then - Result := -1 - else - Result := Control.Height; - end; - -begin - Result := GetRichEditAsGraphic(TcxCustomRichEditAccess(Control).InnerRich.Handle, ContentColor, - GetMargins, TMetafile, Control.Width, -1, GetMaxHeight, DC) -end; - -procedure TdxPScxCustomRichEditProducer.InitializeItem(AnItem: TdxReportVisualItem); -var - Graphic: TGraphic; -begin - inherited; - with TdxReportCellGraphic(AnItem) do - begin - BorderClass := Self.BorderClass; - BorderColor := Self.BorderColor; - CellSides := cxBordersMap(Style.Edges); - Color := TcxCustomRichEditAccess(Control).Color; - ShowShadow := Style.Shadow; - - Graphic := Self.CreateImage; - try - Image := Graphic; - finally - Graphic.Free; - end; - Transparent := False; - end; -end; - -function TdxPScxCustomRichEditProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCellGraphic; -end; - -function TdxPScxCustomRichEditProducer.ObjectExpandHeight: Boolean; -begin - Result := False; -end; - -{$ENDIF} - -procedure RegisterAssistants; -begin - TdxPScxCustomColorComboBoxProducer.Register; - {$IFDEF REGISTERCXSHELLCTRLS} - TdxPScxCustomShellComboBoxProducer.Register; - {$ENDIF} - TdxPScxCustomFontNameComboBoxProducer.Register; - TdxPScxCustomCheckComboBoxProducer.Register; - TdxPScxCustomSpinButtonProducer.Register; - TdxPScxCustomSpinButtonAsMetafileProducer.Register; - {$IFDEF DXVER500} - TdxPScxCustomCheckGroupProducer.Register; - TdxPScxCustomRichEditProducer.Register; - {$ENDIF} -end; - -procedure UnregisterAssistants; -begin - {$IFDEF DXVER500} - TdxPScxCustomRichEditProducer.Unregister; - TdxPScxCustomCheckGroupProducer.Unregister; - {$ENDIF} - TdxPScxCustomSpinButtonAsMetafileProducer.Unregister; - TdxPScxCustomSpinButtonProducer.Unregister; - TdxPScxCustomCheckComboBoxProducer.Unregister; - TdxPScxCustomFontNameComboBoxProducer.Unregister; - {$IFDEF REGISTERCXSHELLCTRLS} - TdxPScxCustomShellComboBoxProducer.Unregister; - {$ENDIF} - TdxPScxCustomColorComboBoxProducer.Unregister; -end; - -initialization - RegisterAssistants; - -finalization - UnregisterAssistants; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4Lnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4Lnk.dfm deleted file mode 100644 index fab0ba12..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4Lnk.dfm +++ /dev/null @@ -1,2086 +0,0 @@ -object dxfmGridReportLinkDesignWindow: TdxfmGridReportLinkDesignWindow - Left = 463 - Top = 133 - BorderStyle = bsDialog - Caption = 'fmdxGridDesignWindow' - ClientHeight = 437 - ClientWidth = 648 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 642 - Height = 399 - ActivePage = tshFormatting - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 9 - Top = 37 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 12 - Width = 266 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 164 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object imgOnEveryPage: TImage - Left = 9 - Top = 189 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlOnEveryPage: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object bvlWarningHost: TBevel - Left = 4 - Top = 289 - Width = 313 - Height = 77 - Visible = False - end - object chbxShowBands: TCheckBox - Tag = 1 - Left = 90 - Top = 42 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 1 - OnClick = OptionsViewClick - end - object chbxShowHeaders: TCheckBox - Tag = 2 - Left = 90 - Top = 63 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowFooters: TCheckBox - Tag = 3 - Left = 90 - Top = 84 - Width = 200 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 3 - OnClick = OptionsViewClick - end - object chbxShowGroupFooters: TCheckBox - Tag = 4 - Left = 90 - Top = 104 - Width = 200 - Height = 17 - Caption = 'G&roup Footers' - TabOrder = 4 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 5 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 5 - OnClick = OptionsViewClick - end - object chbxBandsOnEveryPage: TCheckBox - Tag = 1 - Left = 90 - Top = 202 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 8 - OnClick = OptionsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Tag = 2 - Left = 90 - Top = 223 - Width = 200 - Height = 17 - Caption = 'Headers' - TabOrder = 9 - OnClick = OptionsOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Tag = 3 - Left = 90 - Top = 245 - Width = 200 - Height = 17 - Caption = 'Footers' - TabOrder = 10 - OnClick = OptionsOnEveryPageClick - end - object chbxFilterBarOnEveryPage: TCheckBox - Tag = 4 - Left = 90 - Top = 266 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 11 - OnClick = OptionsOnEveryPageClick - end - object chbxCaptionsOnEveryPage: TCheckBox - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 7 - OnClick = OptionsOnEveryPageClick - end - object chbxShowCaptions: TCheckBox - Left = 90 - Top = 22 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowFilterBar: TCheckBox - Tag = 6 - Left = 90 - Top = 146 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 6 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 323 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 12 - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblSelection: TLabel - Left = 5 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object imgSelection: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlSelection: TBevel - Left = 56 - Top = 12 - Width = 255 - Height = 4 - Shape = bsBottomLine - end - object lblExpanding: TLabel - Left = 5 - Top = 74 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 9 - Top = 95 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 79 - Width = 248 - Height = 4 - Shape = bsBottomLine - end - object lblDetails: TLabel - Left = 5 - Top = 218 - Width = 32 - Height = 13 - Caption = 'Details' - end - object bvlDetails: TBevel - Left = 47 - Top = 223 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object imgDetails: TImage - Left = 9 - Top = 239 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0889999999999999999999907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897F78FF7FF77777788F907DDDDDDDDDDDD0FF777FFFF7FFF7777FFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF77777777F - F07DD0889777777777777777777907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F777F7FF7777888FF907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCCCCCDD0FF7777FFF7FF7777777FF - F07DD0889777777777777777777907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F788F7FF77778FFFF907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF777777777 - F07DD0889777777777777777777907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0777777777777777777777 - 707DD08897F888F7FF7777788FF907DDCCCCCCCCDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0FF77777FF7FF7777777FF - F07DD0889000000000000000000907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897888880F8888888888907DDDDDDDDDDDD0777777777777777777777 - 707DD08897F77780F8777777778907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFF80FFFFFFFFFFF907DDDDDDDDDDDD0FF7777FFF7FF7777777FF - F07DD0889000000000000000000907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0889999999999999999999907DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0F0F777777FF77777777FFF07DDDDDDDDDDDD0FF77777FF7FF77777777F - F07DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F888888880F8888888888807DDDDDDDDDDDD0F888888880F8888888888 - 807DD0F877778880F8777777777807DDDDDDDDDDDD0F877777880F8777777778 - 807DD0FFFFFFFFF0FFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF0FFFFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgLevels: TImage - Left = 9 - Top = 306 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0888888888888888888888807DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F000FF8F000FF8FCCCC44F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F77F7F8FCC99F - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F666CCCF07DDDDDDDDDDDDD0F7F77F8F777FF8FCC99F - 7F07D0F0000F8F00F0F8F999999F07DDCDDDDCDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7888888888888888888 - 7F07D0888888888888888888888807DDCCCCCCCCDDD0F7F77F8F777FF8FC99CF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F00FFF8F0000F8F9999CCF07DDCDDDDCDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F99AAACF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F0000F8F000FF8F9999CCF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F0000000000000000000 - 0F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F0000F8F000FF8FB99944F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0777777777777777777777707DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F000087F800087F800000807DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF7FFFFFF7FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0000000000000000000000007DDCDDDDCDDDDD0F7888888888888888888 - 7F07D7F88880777777777777777778DDCCCCDCCDDDD0F7777777777777777777 - 7F07D7F00080F87777788088888888DDCCCCCCCCDDD0F7777777777777777777 - 7F07D7F77780FFFFFFFFF088888888DDCCCCDCCDDDD0F0000000000000000000 - 0F07D7FFFFF0777777777088888888DDCDDDDCDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D7777770888888888888888888DDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblLevels: TLabel - Left = 5 - Top = 285 - Width = 30 - Height = 13 - Caption = 'Levels' - end - object bvlLevels: TBevel - Left = 47 - Top = 290 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object lblGridSize: TLabel - Left = 5 - Top = 150 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlGridSize: TBevel - Left = 33 - Top = 154 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 9 - Top = 172 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxProcessSelection: TCheckBox - Left = 90 - Top = 25 - Width = 200 - Height = 17 - Caption = 'Process Selection' - TabOrder = 0 - OnClick = OptionsSelectionClick - end - object chbxProcessExactSelection: TCheckBox - Tag = 1 - Left = 90 - Top = 46 - Width = 200 - Height = 17 - Caption = 'Process Exact Selection' - TabOrder = 1 - OnClick = OptionsSelectionClick - end - object chbxExpandGroupRows: TCheckBox - Left = 90 - Top = 89 - Width = 200 - Height = 17 - Caption = 'Groups' - TabOrder = 2 - OnClick = OptionsExpandingClick - end - object chbxExpandMasterRows: TCheckBox - Tag = 1 - Left = 90 - Top = 111 - Width = 200 - Height = 17 - Caption = 'Details' - TabOrder = 3 - OnClick = OptionsExpandingClick - end - object chbxStartFromActiveView: TCheckBox - Left = 90 - Top = 236 - Width = 200 - Height = 17 - Caption = 'Start From Active Details' - TabOrder = 6 - OnClick = OptionsDetailsClick - end - object chbxOnlyActiveView: TCheckBox - Tag = 1 - Left = 90 - Top = 258 - Width = 200 - Height = 17 - Caption = 'Only Active Details' - TabOrder = 7 - OnClick = OptionsDetailsClick - end - object chbxLevelsUnwrap: TCheckBox - Left = 90 - Top = 303 - Width = 200 - Height = 17 - Caption = '&Unwrap' - TabOrder = 8 - OnClick = OptionsLevelsClick - end - object chbxLevelsUnwrapTopLevel: TCheckBox - Tag = 1 - Left = 90 - Top = 326 - Width = 200 - Height = 17 - Caption = 'Unwrap Top Level' - TabOrder = 9 - OnClick = OptionsLevelsClick - end - object chbxLevelsRiseActiveLevelOntoTop: TCheckBox - Tag = 2 - Left = 90 - Top = 349 - Width = 200 - Height = 17 - Caption = 'Rise Active Level onto Top' - TabOrder = 10 - OnClick = OptionsLevelsClick - end - object chbxGridAutoWidth: TCheckBox - Left = 90 - Top = 169 - Width = 200 - Height = 17 - Caption = '&Auto Width' - TabOrder = 5 - OnClick = OptionsSizeClick - end - object chbxExpandCards: TCheckBox - Tag = 2 - Left = 90 - Top = 132 - Width = 200 - Height = 17 - Caption = 'Cards' - TabOrder = 4 - OnClick = OptionsExpandingClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 12 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 9 - Top = 95 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 74 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 79 - Width = 241 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object lblPagination: TLabel - Left = 5 - Top = 229 - Width = 50 - Height = 13 - Caption = 'Pagination' - end - object bvlPagination: TBevel - Left = 64 - Top = 234 - Width = 247 - Height = 4 - Shape = bsBottomLine - end - object imgPagination: TImage - Left = 8 - Top = 251 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD0000000000000000000000007DDDDDDDDDDDD77777777777777770DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7F8888888888888F0DDDDD - DDDDD0888000000000000000088F07DDDDDDDDDDDD7F8777877778778F07770D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8888888888888F0FFF0D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0D - DDDDD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8888888888888F078F07 - 770DD0F990FFFF8FFFF8FFFF099F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0F - FF0DD0F99999999999999999999F07DDCDDDDCDDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCDCCDDD7F8888888888888F088F07 - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F8F0FFFF8F00F8F00F0F8F07DDCDDDDCDDDD7F8888888888888F088F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCDDDDCDDDD7F8888888888888F088F0F - 8F0DD0F99999999999999999999F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCDCCDDD7F8888888888888F088F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCDDDDCDDDD7F8777877778778F0F8F08 - 8F0DD0F8F0F00F8F00F8F00F0F8F07DDDDDDDDDDDD7F8888888888888F0F8F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF088F0F - 8F0DD0F8F0777777777777770F8F07DDDDDDDDDDDD0000000000000000078F08 - 8F0DD0F8F0F8887F8887F8880F8F07DDDDDDDDDDDDDDDD7F8888888888888F0F - 8F0DD0F8F0F0087F0087F0080F8F07DDDDDDDDDDDDDDDD7FFFFFFFFFFFFFFF08 - 8F0DD0F8F0FFFF7FFFF7FFFF0F8F07DDDDDDDDDDDDDDDD00000000000000000F - 8F0DD0888000000000000000088807DDDDDDDDDDDDDDDDDDDD7F888888888888 - 8F0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD7FFFFFFFFFFFFF - FF0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD00000000000000 - 000DD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 33 - Width = 212 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 0 - OnClick = LookAndFeelClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 142 - Width = 200 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 119 - Width = 200 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 96 - Width = 200 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Suppress Background Images' - TabOrder = 4 - OnClick = OptionsFormatingClick - end - object chbxConsumeSelectionStyle: TCheckBox - Tag = 2 - Left = 90 - Top = 203 - Width = 200 - Height = 17 - Caption = 'Consume Selection Style' - TabOrder = 5 - OnClick = OptionsFormatingClick - end - object chbxPaginateOneGroupPerPage: TCheckBox - Tag = 1 - Left = 90 - Top = 274 - Width = 200 - Height = 17 - Caption = 'One Group Per Page' - TabOrder = 7 - OnClick = OptionsPaginationClick - end - object chbxPaginateByTopLevelGroups: TCheckBox - Left = 90 - Top = 251 - Width = 200 - Height = 17 - Caption = 'By TopLevel Groups' - TabOrder = 6 - OnClick = OptionsPaginationClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 5 - object bvlStyles: TBevel - Left = 118 - Top = 12 - Width = 191 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 295 - Width = 237 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 291 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 219 - end - object Label1: TLabel - Left = 76 - Top = 135 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 14 - Height = 17 - TabOrder = 0 - OnClick = OptionsFormatingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 311 - Width = 302 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 343 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = StyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 83 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = StyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 160 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = StyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 237 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = StyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 2 - object lblPreviewOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPreviewOptions: TBevel - Left = 50 - Top = 12 - Width = 261 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewMaxLineCount: TLabel - Left = 91 - Top = 73 - Width = 78 - Height = 13 - Caption = 'Max Line Count:' - end - object bvlPreviewMaxLineCountHost: TBevel - Left = 229 - Top = 69 - Width = 68 - Height = 21 - Visible = False - end - object imgPreview: TImage - Left = 9 - Top = 28 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F888F7FF888F7F8888F7F07DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7F888F7FF888F7FF888F7F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxPreviewVisible: TCheckBox - Left = 90 - Top = 28 - Width = 150 - Height = 17 - Caption = 'Visible' - TabOrder = 0 - OnClick = PreviewVisibleClick - end - object chbxPreviewAutoHeight: TCheckBox - Left = 90 - Top = 49 - Width = 150 - Height = 17 - Caption = 'Auto Height' - TabOrder = 1 - OnClick = PreviewAutoHeightClick - end - end - object tshCards: TTabSheet - Caption = 'Cards' - ImageIndex = 3 - object bvlCardSpaceVertHost: TBevel - Left = 231 - Top = 140 - Width = 75 - Height = 21 - Visible = False - end - object bvlCardSpaceHorzHost: TBevel - Left = 231 - Top = 112 - Width = 75 - Height = 21 - Visible = False - end - object lblCardSpaceVert: TLabel - Left = 90 - Top = 145 - Width = 39 - Height = 13 - Caption = 'Vertical:' - end - object lblCardSpaceHorz: TLabel - Left = 90 - Top = 116 - Width = 52 - Height = 13 - Caption = 'Horizontal:' - end - object imgCardSpacing: TImage - Left = 9 - Top = 112 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDD000000000000000000000000000000DDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD7DD0DDDDDD707000DDDDDD0DD7DDDDDDDDDDDDDDD - DDDDDDDDD0000000000000000000DDDDDD0D0D0DDDDDD0000000000000000000 - 0DDDDDDD77777777777777777770DDDDD00D0D0DDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDD0D000DDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF77777FF70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF77FFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF77FFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD7777777777777777777 - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardSpacing: TLabel - Left = 5 - Top = 92 - Width = 37 - Height = 13 - Caption = 'Spacing' - end - object bvlCardSpacing: TBevel - Left = 51 - Top = 97 - Width = 260 - Height = 4 - Shape = bsBottomLine - end - object bvlCardSizes: TBevel - Left = 34 - Top = 12 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object lblCardSizes: TLabel - Left = 5 - Top = 8 - Width = 24 - Height = 13 - Caption = 'Sizes' - end - object imgCardSizes: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDD000000000000DDDDDDDDDDDDDDDDDDDDDDDD000000000000DD00000000 - 0000D7777777777770DDDDDDDDDDDDDDDDDDDDDDD7777777777770D777777777 - 7770D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DD0000000000DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D77777777770DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8FFF70DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8F7F70DDDDDDDDDDD7FFFFF8F77F70D7FFFFF8F7 - FF70D7F777F8FFFF70D7FFFF8FFF70DDDDDDDDDDD7F777F8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - 7F70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F777F8FFFF70D7F77F8F7F70DDDDDDDDDDD7F777F8FFFF70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDCCCCDCCDD7F777F8F77F70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDCCCCDCCDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F7FFF8FFFF70D7F7FF8F7F70DDDDDDDDDDD7F7FFF8FFFF70D7F7FFF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D777777777777DD7777777777DDDDDDDDDDDD777777777777DD777777777 - 777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgCardFraming: TImage - Left = 9 - Top = 189 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD00000000000000000 - 00DDDDDDD88888888888888888887DDDDDDDDDDDDDDDDD000000000000000000 - 00DDDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF - 00DDDDD778FFFFFFF8FFF9999FF87DDDDDDDDDDDDDDD000FFFFFFF0FFF9999FF - 00DDDD8888FFFFFFF8FFF9999FF87DDDDDDDDDDDDDD0000FFFFFFF0FFF9999FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCDDDDCDDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCCCCDCCDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCCCCCDDD0FF0F77777F0FCCCCFFFF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCDCCDDDD0FF0F77777F0FCCCCFFFF - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF77777FF87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF77FFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF77FFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDCDDDDCDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCCCCDCCDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDCCCCCCCCDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDCCCCDCCDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F78888888888888888888DDDDDDDDDDDDDDD0F7000000000000000000 - 0DDDDD8F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDDDDD0F7FFFFF0FF7FFFFFF00D - DDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF00D - DDDDDD8888888888888888888DDDDDDDDDDDDDDDDDD0000000000000000000DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardFraming: TLabel - Left = 5 - Top = 171 - Width = 38 - Height = 13 - Caption = 'Framing' - end - object bvlCardFraming: TBevel - Left = 49 - Top = 176 - Width = 262 - Height = 4 - Shape = bsBottomLine - end - object bvlCardShadowColorHost: TBevel - Left = 177 - Top = 276 - Width = 129 - Height = 21 - Visible = False - end - object lblCardShadowDepth: TLabel - Left = 90 - Top = 308 - Width = 33 - Height = 13 - Caption = 'Depth:' - end - object bvlCardShadow: TBevel - Left = 48 - Top = 260 - Width = 263 - Height = 4 - Shape = bsBottomLine - end - object lblCardShadow: TLabel - Left = 5 - Top = 255 - Width = 38 - Height = 13 - Caption = 'Shadow' - end - object lblCardShadowColor: TLabel - Left = 90 - Top = 280 - Width = 29 - Height = 13 - Caption = 'Color:' - end - object bvlCardShadowDepthHost: TBevel - Left = 177 - Top = 304 - Width = 129 - Height = 21 - Visible = False - end - object imgCardShadow: TImage - Left = 9 - Top = 276 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF77777FFFFF7DDDDCDDDDCDDDDD7F77777F7FF77777FFFFF - 700DDD7F7FFFFF7FF77FFFFFFFF7DDDDCCCCDCCDDDD7F7FFFFF7FF77FFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDCCCCDCCDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 7DDDDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 7DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxCardsKeepSameHeight: TCheckBox - Tag = 2 - Left = 90 - Top = 70 - Width = 200 - Height = 17 - Caption = 'Keep Same Height' - TabOrder = 2 - OnClick = OptionsCardsClick - end - object chbxCardsKeepSameWidth: TCheckBox - Tag = 1 - Left = 90 - Top = 49 - Width = 200 - Height = 17 - Caption = 'Keep Same Width' - TabOrder = 1 - OnClick = OptionsCardsClick - end - object chbxCardsAutoWidth: TCheckBox - Left = 90 - Top = 28 - Width = 200 - Height = 17 - Caption = 'Auto Width' - TabOrder = 0 - OnClick = OptionsCardsClick - end - object chbxCardsVertLines: TCheckBox - Tag = 5 - Left = 90 - Top = 231 - Width = 200 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 5 - OnClick = OptionsCardsClick - end - object chbxCardsHorzLines: TCheckBox - Tag = 4 - Left = 90 - Top = 210 - Width = 200 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 4 - OnClick = OptionsCardsClick - end - object chbxCardsBorder: TCheckBox - Tag = 3 - Left = 90 - Top = 189 - Width = 200 - Height = 17 - Caption = 'Border' - TabOrder = 3 - OnClick = OptionsCardsClick - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 44 - Width = 306 - Height = 350 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewGrid: TcxGrid - Left = 5 - Top = 7 - Width = 296 - Height = 337 - TabOrder = 0 - LookAndFeel.NativeStyle = False - RootLevelOptions.DetailTabsPosition = dtpTop - object PreviewBandedView: TcxGridBandedTableView - DataController.Summary.DefaultGroupSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Position = spFooter - Column = colVendorName - end> - DataController.Summary.FooterSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Column = colVendorName - end> - DataController.Summary.SummaryGroups = <> - NavigatorButtons.ConfirmDelete = False - Filtering.CustomizeDialog = False - Filtering.Visible = fvAlways - OptionsView.ScrollBars = ssNone - OptionsView.CellAutoHeight = True - OptionsView.ColumnAutoWidth = True - OptionsView.Footer = True - OptionsView.GroupByBox = False - OptionsView.GroupFooters = gfAlwaysVisible - Preview.Column = colVendorCountry - Preview.Visible = True - OnCustomDrawColumnHeader = PreviewBandedViewCustomDrawColumnHeader - OnCustomDrawFooterCell = PreviewBandedViewCustomDrawFooterCell - Bands = < - item - Caption = 'Vendor Data' - Width = 150 - end - item - Caption = 'Car Data' - end> - OnCustomDrawBandHeader = PreviewBandedViewCustomDrawBandHeader - object colVendorName: TcxGridBandedColumn - Caption = 'Name' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colVendorLogo: TcxGridBandedColumn - Caption = 'Logo' - PropertiesClassName = 'TcxImageProperties' - Properties.GraphicTransparency = gtTransparent - OnCustomDrawCell = VendorLogoCustomDrawCell - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - object colVendorCountry: TcxGridBandedColumn - PropertiesClassName = 'TcxTextEditProperties' - Position.BandIndex = 0 - Position.ColIndex = 2 - Position.RowIndex = 0 - end - object colCarModel: TcxGridBandedColumn - Caption = 'Model' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 1 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colIsSUVModel: TcxGridBandedColumn - Caption = 'SUV' - PropertiesClassName = 'TcxCheckBoxProperties' - Properties.ValueGrayed = #39#39 - OnCustomDrawCell = IsSUVModelCustomDrawCell - HeaderAlignmentHorz = taCenter - Options.Filtering = False - Width = 30 - Position.BandIndex = 1 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - end - object PreviewGridLevel: TcxGridLevel - Caption = 'Cars' - end - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 4 - Top = 408 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 32 - Top = 408 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxStyleRepository1: TcxStyleRepository - Left = 60 - Top = 408 - object styleCardShadow: TcxStyle - end - object styleCardBorder: TcxStyle - AssignedValues = [svColor] - Color = clWindow - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4Lnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4Lnk.pas deleted file mode 100644 index afdd0053..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4Lnk.pas +++ /dev/null @@ -1,16802 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxGrid4Lnk; - -interface - -{$I cxVer.inc} - -uses - Windows, SysUtils, Messages, Classes, Graphics, Controls, StdCtrls, ComCtrls, - ExtCtrls, ImgList, Dialogs, ExtDlgs, Menus, cxGraphics, cxClasses, cxControls, - cxCustomData, cxDataStorage, cxData, cxDBData, cxGridDBDataDefinitions, cxGrid, - cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, - cxGridCardView, cxGridDBCardView, cxGridBandedTableView, cxGridDBBandedTableView, - cxGridViewData, cxGridLevel, cxStyles, cxLookAndFeels, - cxLookAndFeelPainters, cxFilter, cxTextEdit, cxEdit, cxCheckBox, cxImage, - dxBase, dxPSSngltn, dxPSCore, dxPrnPg, dxExtCtrls, dxPScxCommon; - -const - vspsGridFirst = 0; - vspsGridBandHeader = vspsGridFirst + 0; - vspsGridCaption = vspsGridFirst + 1; - vspsGridCardCaptionRow = vspsGridFirst + 2; - vspsGridCardRowCaption = vspsGridFirst + 3; - vspsGridContent = vspsGridFirst + 4; - vspsGridContentEven = vspsGridFirst + 5; - vspsGridContentOdd = vspsGridFirst + 6; - vspsGridFilterBar = vspsGridFirst + 7; - vspsGridFooter = vspsGridFirst + 8; - vspsGridGroup = vspsGridFirst + 9; - vspsGridHeader = vspsGridFirst + 10; - vspsGridPreview = vspsGridFirst + 11; - vspsGridSelection = vspsGridFirst + 12; - vspsGridLast = vspsGridFirst + 12; - - vsCardShadow = vsCardViewLast + 1; - vsCardViewLast = vsCardShadow; - - bbTabs = -1; - - dxDefaultInterCardsSpaceHorz = 4; - dxDefaultInterCardsSpaceVert = 4; - dxDefaultCardsShadowDepth = 4; - dxDefaultCardsShadowColor = clBlack; - - dxGridAttributeIDBase = 0; - dxGridUndefinedID = dxGridAttributeIDBase + 0; - dxGridBandID = dxGridAttributeIDBase + 1; - dxGridCardRowCaptionID = dxGridAttributeIDBase + 2; - dxGridCardRowDataID = dxGridAttributeIDBase + 3; - dxGridFilterBarID = dxGridAttributeIDBase + 4; - dxGridFooterID = dxGridAttributeIDBase + 5; - dxGridGroupFooterID = dxGridAttributeIDBase + 6; - dxGridHeaderID = dxGridAttributeIDBase + 7; - dxGridLevelCaptionID = dxGridAttributeIDBase + 8; - dxGridRecordID = dxGridAttributeIDBase + 9; - -type - TdxGridAttributeHostInfo = class; - TdxGridAttributeHostInfoServices = class; - TdxGridReportLink = class; - TdxGridReportLinkOptionsExpanding = class; - TdxfmGridReportLinkDesignWindow = class; - - TdxCustomGridViewAdapter = class; - TdxCustomGridViewFormatter = class; - TdxCustomGridViewBuilder = class; - - TdxCustomGridTableViewAdapter = class; - TdxCustomGridTableViewBuilder = class; - - TdxGridTableViewAdapter = class; - TdxGridTableViewFormatter = class; - TdxGridTableViewBuilder = class; - - TdxGridBandedTableViewAdapter = class; - TdxGridBandedTableViewFormatter = class; - TdxGridBandedTableViewBuilder = class; - - TdxGridCardViewBuilder = class; - - TdxGridTableViewColumnPlace = class; - TdxGridTableViewColumnPlaceController = class; - TdxCustomGridBandedTableViewItemPlace = class; - TdxGridBandedTableViewItemPlace = class; - TdxGridBandedTableViewItemPlaceController = class; - - TdxGridViewRowProducerClass = class of TdxGridViewRowProducer; - TdxGridViewRowProducer = class; - TdxGridViewCaptionProducerClass = class of TdxGridViewCaptionProducer; - TdxGridViewCaptionProducer = class; - TdxGridViewFilterBarProducerClass = class of TdxGridViewFilterBarProducer; - TdxGridViewFilterBarProducer = class; - TdxGridViewDetailsSeparatorProducerClass = class of TdxGridViewDetailsSeparatorProducer; - TdxGridViewDetailsSeparatorProducer = class; - TdxGridViewTerminatorProducerClass = class of TdxGridViewTerminatorProducer; - TdxGridViewTerminatorProducer = class; - TdxGridTableViewHeadersProducerClass = class of TdxGridTableViewHeadersProducer; - TdxGridTableViewHeadersProducer = class; - TdxGridTableViewFootersProducerClass = class of TdxGridTableViewFootersProducer; - TdxGridTableViewFootersProducer = class; - TdxGridTableViewCustomDataRowProducerClass = class of TdxGridTableViewCustomDataRowProducer; - TdxGridTableViewCustomDataRowProducer = class; - TdxGridTableViewRowSeparatorProducerClass = class of TdxGridTableViewRowSeparatorProducer; - TdxGridTableViewRowSeparatorProducer = class; - TdxGridTableViewGroupFooterProducerClass = class of TdxGridTableViewGroupFooterProducer; - TdxGridTableViewGroupFooterProducer = class; - TdxGridTableViewGroupRowSeparatorProducerClass = class of TdxGridTableViewGroupRowSeparatorProducer; - TdxGridTableViewGroupRowSeparatorProducer = class; - TdxGridTableViewBandsProducerClass = class of TdxGridTableViewBandsProducer; - TdxGridTableViewBandsProducer = class; - TdxGridCardViewCardsRowProducerClass = class of TdxGridCardViewCardsRowProducer; - TdxGridCardViewCardsRowProducer = class; - - { View Attributes } - - TdxGridAttributeClass = class of TdxGridAttribute; - TdxGridAttributeClasses = array of TdxGridAttributeClass; - TdxGridAttribute = class end; - - TdxGridBandHeader = class(TdxGridAttribute); - TdxGridCardRowCaption = class(TdxGridAttribute); - TdxGridCardRowData = class(TdxGridAttribute); - TdxGridDetails = class(TdxGridAttribute); - TdxGridExpandButton = class(TdxGridAttribute); - TdxGridFilterBar = class(TdxGridAttribute); - TdxGridFooter = class(TdxGridAttribute); - TdxGridGroupFooter = class(TdxGridAttribute); - TdxGridGroupRow = class(TdxGridAttribute); - TdxGridHeader = class(TdxGridAttribute); - TdxGridLevelCaption = class(TdxGridAttribute); - TdxGridPreview = class(TdxGridAttribute); - - TdxGridAttributeID = type Integer; - - - TdxGridCellCustomDrawInfo = record - GridAttributeID: TdxGridAttributeID; - GridView: TcxCustomGridView; - case Byte of - 0: (GridRecord: TcxCustomGridRecord; - GridColumn: TcxGridColumn; - GroupLevel: Integer; - GridBand: TcxGridBand); - 1: (GridCard: TcxGridCard; - GridCardRow: TcxGridCardViewRow); - end; - - - TdxAttributeColorKind = (ackContentColor, ackTextColor); - - TdxVerticalDetailsSeparatorKind = (vdskLeading, vdskTrailing); - - { View Helpers } - - TdxCustomGridViewHelperClass = class of TdxCustomGridViewHelper; - - TdxCustomGridViewHelper = class(TdxCustomClassMapItem) - private - FView: TcxCustomGridView; - protected - class procedure AddAttribute(var AnAtributes: TdxGridAttributeClasses; AnAttribute: TdxGridAttributeClass); - class function IsFilterBarAtBottom(AView: TcxCustomGridView): Boolean; virtual; - class function IsFilterBarAtTop(AView: TcxCustomGridView): Boolean; virtual; - class function IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; virtual; - class function ViewClass: TcxCustomGridViewClass; virtual; - public - constructor Create(AView: TcxCustomGridView); virtual; - - class function PairClass: TClass; override; - class procedure Register; - class procedure Unregister; - - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; virtual; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); virtual; - class function ExtractGridView(AnItem: TdxReportVisualItem): TcxCustomGridView; virtual; - class function IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; virtual; - class function SupportedAttributes: TdxGridAttributeClasses; virtual; - - property View: TcxCustomGridView read FView write FView; - end; - - TdxNullGridViewHelper = class(TdxCustomGridViewHelper) - protected - class function ViewClass: TcxCustomGridViewClass; override; - public - class function IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; override; - end; - - TdxCustomGridTableViewHelper = class(TdxCustomGridViewHelper) - protected - class function ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; virtual; - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class function SupportedAttributes: TdxGridAttributeClasses; override; - end; - - TdxGridCardViewHelper = class(TdxCustomGridTableViewHelper) - protected - class function ExtractCard(AnItem: TdxReportVisualItem): TcxGridCard; virtual; - class function ExtractCardRow(AnItem: TdxReportVisualItem): TcxGridCardViewRow; virtual; - class function ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; override; - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); override; - end; - - TdxGridTableViewHelper = class(TdxCustomGridTableViewHelper) - protected - class function ExtractColumn(AnItem: TdxReportVisualItem): TcxGridColumn; virtual; - class function ExtractGroupLevel(AnItem: TdxReportVisualItem): Integer; virtual; - class function ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; override; - class function IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; override; - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); override; - class function SupportedAttributes: TdxGridAttributeClasses; override; - end; - - TdxGridBandedTableViewHelper = class(TdxGridTableViewHelper) - protected - class function ExtractBand(AnItem: TdxReportVisualItem): TcxGridBand; virtual; - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); override; - class function SupportedAttributes: TdxGridAttributeClasses; override; - end; - - { Record Helpers } - - TdxCustomGridRecordHelperClass = class of TdxCustomGridRecordHelper; - - TdxCustomGridRecordHelper = class(TdxCustomClassMapItem) - private - FAdapter: TdxCustomGridTableViewAdapter; - FGridRecord: TcxCustomGridRecord; - protected - function Adapter: TdxCustomGridTableViewAdapter; overload; virtual; - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; virtual; - class function RecordClass: TcxCustomGridRecordClass; virtual; - - function GetHasDetails: Boolean; virtual; - function GetHasSelectedChildren: Boolean; virtual; - function GetParent: TcxCustomGridRecord; virtual; - public - constructor Create(AAdapter: TdxCustomGridTableViewAdapter); virtual; - - class function PairClass: TClass; override; - class procedure Register; - class procedure Unregister; - - property GridRecord: TcxCustomGridRecord read FGridRecord write FGridRecord; - property HasDetails: Boolean read GetHasDetails; - property HasSelectedChildren: Boolean read GetHasSelectedChildren; - property Parent: TcxCustomGridRecord read GetParent; - end; - - TdxCustomGridRowHelper = class(TdxCustomGridRecordHelper) - protected - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - class function RecordClass: TcxCustomGridRecordClass; override; - end; - - TdxGridDataRowHelper = class(TdxCustomGridRowHelper) - private - function GetRow: TcxGridDataRow; - protected - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; override; - class function RecordClass: TcxCustomGridRecordClass; override; - public - property Row: TcxGridDataRow read GetRow; - end; - - TdxGridGroupRowHelper = class(TdxCustomGridRowHelper) - private - function GetGroupRow: TcxGridGroupRow; - protected - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; override; - class function RecordClass: TcxCustomGridRecordClass; override; - - function GetHasSelectedChildren: Boolean; override; - public - property GroupRow: TcxGridGroupRow read GetGroupRow; - end; - - TdxGridMasterDataRowHelper = class(TdxCustomGridRowHelper) - private - function GetDetailView: TcxCustomGridView; - function GetMasterRow: TcxGridMasterDataRow; - protected - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; override; - class function RecordClass: TcxCustomGridRecordClass; override; - - function GetHasDetails: Boolean; override; - function GetHasSelectedChildren: Boolean; override; - public - property DetailView: TcxCustomGridView read GetDetailView; - property MasterRow: TcxGridMasterDataRow read GetMasterRow; - end; - - { caches } - - TdxRecordHelpersCache = class(TdxCustomCache) - private - FAdapter: TdxCustomGridTableViewAdapter; - function GetHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; - function GetItem(Index: Integer): TdxCustomGridRecordHelper; - protected - function IndexOf(ARecord: TcxCustomGridRecord): Integer; - property Items[Index: Integer]: TdxCustomGridRecordHelper read GetItem; - public - constructor Create(AAdapter: TdxCustomGridTableViewAdapter); - property Adapter: TdxCustomGridTableViewAdapter read FAdapter; - property Helpers[ARecord: TcxCustomGridRecord]: TdxCustomGridRecordHelper read GetHelper; default; - end; - - TdxProducerCache = class(TdxCustomCache) - private - FBuilder: TdxCustomGridViewBuilder; - function GetItem(Index: Integer): TdxGridViewRowProducer; - function GetProducer(ProducerClass: TdxGridViewRowProducerClass): TdxGridViewRowProducer; - protected - function IndexOf(AProducerClass: TdxGridViewRowProducerClass): Integer; - property Items[Index: Integer]: TdxGridViewRowProducer read GetItem; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); - property Builder: TdxCustomGridViewBuilder read FBuilder; - property Producers[ProducerClass: TdxGridViewRowProducerClass]: TdxGridViewRowProducer read GetProducer; default; - end; - - { CustomView Adapter, Formatter and Builder } - - TdxGridViewAdapterClass = class of TdxCustomGridViewAdapter; - - TdxCustomGridViewAdapter = class - private - FGridView: TcxCustomGridView; - FMasterAdapter: TdxCustomGridViewAdapter; - function GetAbsoluteLevel: Integer; - function GetCanUseLookAndFeelColors: Boolean; - function GetCaptionText: string; - function GetDetailsSeparatorColor: TColor; - function GetDetailsSeparatorThickness: Integer; - function GetFilter: TcxDataFilterCriteria; - function GetFilterActive: Boolean; - function GetFilterEmpty: Boolean; - function GetFilterText: string; - function GetGrid: TcxCustomGrid; - function GetGridLevel: TcxGridLevel; - function GetGridWidth: Integer; - function GetHasDetailsSeparator: Boolean; - function GetLookAndFeelKind: TcxLookAndFeelKind; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetIsDetail: Boolean; - function GetIsMaster: Boolean; - function GetMasterGridLevel: TcxGridLevel; - function GetSummary: TcxDataSummary; - function GetThemedCaptionColor: TColor; - function GetThemedCaptionTextColor: TColor; - function GetThemedFilterBarColor: TColor; - function GetThemedFilterBarTextColor: TColor; - function GetViewWidth: Integer; - protected - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - - function BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; overload; virtual; - function GetBackgroundBitmap(Index: Integer): TBitmap; - function HasBackgroundBitmap(Index: Integer): Boolean; - function IsBackgroundBitmapSupported(Index: Integer): Boolean; virtual; - - function Controller: TcxCustomGridController; overload; virtual; - function DataController: TcxCustomDataController; overload; virtual; - - function CreateCloneAdapter(AClone: TcxCustomGridView): TdxCustomGridViewAdapter; - procedure ExpandAllRowsInClones(AMasterRows, AGroupRows: Boolean); virtual; - procedure ExpandAllRowsInGridView(AGridView: TcxCustomGridView; AMasterRows, AGroupRows: Boolean); - procedure ExpandAllRowsInLevel(ALevel: TcxGridLevel; AMasterRows, AGroupRows: Boolean; ARecursive: Boolean); - procedure ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); virtual; - - function GetAreAllMasterRowsCollapsed: Boolean; virtual; - function GetAutoWidth: Boolean; virtual; - function GetCanUseOnEveryPageMode: Boolean; virtual; - function GetHasSelectedRecords: Boolean; virtual; - function GetIndentCount: Integer; virtual; - function GetIndentWidth: Integer; virtual; - function GetIsOffice11StyleGrouping: Boolean; virtual; - function GetMasterGridRecord: TcxCustomGridRecord; virtual; - function GetRecordCount: Integer; virtual; - function GetViewWidthExtra: Integer; virtual; - { Styles } - function GetCaptionViewParams: TcxViewParams; virtual; - function GetFilterBarViewParams: TcxViewParams; virtual; - function GetRootCaptionParams: TcxViewParams; virtual; - - property Filter: TcxDataFilterCriteria read GetFilter; - property Grid: TcxCustomGrid read GetGrid; - property LookAndFeelKind: TcxLookAndFeelKind read GetLookAndFeelKind; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property Summary: TcxDataSummary read GetSummary; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); virtual; - - function GridView: TcxCustomGridView; overload; virtual; - class function GridViewClass: TcxCustomGridViewClass; virtual; - function Styles: TcxCustomGridStyles; overload; virtual; - - procedure ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; - ARecursive: Boolean); virtual; - - property AbsoluteLevel: Integer read GetAbsoluteLevel; - property AreAllMasterRowsCollapsed: Boolean read GetAreAllMasterRowsCollapsed; - property AutoWidth: Boolean read GetAutoWidth; - property CanUseOnEveryPageMode: Boolean read GetCanUseOnEveryPageMode; - property CanUseLookAndFeelColors: Boolean read GetCanUseLookAndFeelColors; - property CaptionText: string read GetCaptionText; - property DetailsSeparatorColor: TColor read GetDetailsSeparatorColor; - property DetailsSeparatorThickness: Integer read GetDetailsSeparatorThickness; - property GridLevel: TcxGridLevel read GetGridLevel; - property GridWidth: Integer read GetGridWidth; - property FilterActive: Boolean read GetFilterActive; - property FilterEmpty: Boolean read GetFilterEmpty; - property FilterText: string read GetFilterText; - property HasDetailsSeparator: Boolean read GetHasDetailsSeparator; - property HasSelectedRecords: Boolean read GetHasSelectedRecords; - property IndentCount: Integer read GetIndentCount; - property IndentWidth: Integer read GetIndentWidth; - property IsDetail: Boolean read GetIsDetail; - property IsMaster: Boolean read GetIsMaster; - property IsOffice11StyleGrouping: Boolean read GetIsOffice11StyleGrouping; - property MasterAdapter: TdxCustomGridViewAdapter read FMasterAdapter; - property MasterGridLevel: TcxGridLevel read GetMasterGridLevel; - property MasterGridRecord: TcxCustomGridRecord read GetMasterGridRecord; - property RecordCount: Integer read GetRecordCount; - property ThemedCaptionColor: TColor read GetThemedCaptionColor; - property ThemedCaptionTextColor: TColor read GetThemedCaptionTextColor; - property ThemedFilterBarColor: TColor read GetThemedFilterBarColor; - property ThemedFilterBarTextColor: TColor read GetThemedFilterBarTextColor; - property ViewWidth: Integer read GetViewWidth; - property ViewWidthExtra: Integer read GetViewWidthExtra; - end; - - TdxGridViewFormatterClass = class of TdxCustomGridViewFormatter; - - TdxCustomGridViewFormatter = class(TObject, IUnknown) - private - FBuilder: TdxCustomGridViewBuilder; - FCaptionLineHeight: Integer; - FExpandButtons: TList; - FFilterBarLineHeight: Integer; - FFont: TFont; - FLookAndFeelItems: TList; - FTransparentColor: TColor; - function GetAbsoluteLevel: Integer; - function GetAutoWidth: Boolean; - function GetDC: HDC; - function GetEdgeMode: TdxCellEdgeMode; - function GetGridWidth: Integer; - function GetExpandButton(Index: Integer): TdxReportCellExpandButton; - function GetExpandButtonCount: Integer; - function GetIndentWidth: Integer; - function GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; - function GetLookAndFeelItemCount: Integer; - function GetPaginateByTopLevelGroups: Boolean; - function GetRenderer: TdxPSReportRenderer; - function GetReportLink: TdxGridReportLink; - function GetShowCaption: Boolean; - function GetShowFilterBar: Boolean; - function GetUseLookAndFeelColors: Boolean; - function GetViewAvailableWidth: Integer; - function GetViewWidthExtra: Integer; - - procedure FormatLookAndFeelItems; - procedure FormatExpandButtons; - protected - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - procedure AddDelimiters; virtual; - procedure AddHorizontalDelimiters; virtual; - procedure AddVerticalDelimiters; virtual; - - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - - procedure Calculate; virtual; - procedure CalculateLineHeights; virtual; - - function GetDetailsSeparatorColor: TColor; virtual; - function GetDetailsSeparatorThickness: Integer; virtual; - function GetHasDetailsSeparator: Boolean; virtual; - - function GetSiteHeight: Integer; virtual; - function GetSiteWidth: Integer; virtual; - function GetViewWidth: Integer; virtual; - function GetViewWidthExtraAfter: Integer; virtual; // MD relation considering - function GetViewWidthExtraBefore: Integer; virtual; // MD relation considering - - function BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; overload; virtual; - function GetBackgroundBitmap(Index: Integer): TBitmap; virtual; - function GetBackgroundBitmapIndex(Index: Integer): Integer; - function HasBackgroundBitmap(Index: Integer): Boolean; virtual; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; virtual; - - function CalculateFontHeight(const AParams: TdxReportItemViewParams): Integer; - procedure CalculateHeight(const AParams: TdxReportItemViewParams; var AHeight: Integer); - function GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; - function IsColorTransparent(AColor: TColor): Boolean; - procedure RegisterExpandButton(AExpandButton: TdxReportCellExpandButton); - procedure RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); - procedure SetViewParams(AnItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); - - property DC: HDC read GetDC; - property EdgeMode: TdxCellEdgeMode read GetEdgeMode; - property ExpandButtonCount: Integer read GetExpandButtonCount; - property ExpandButtons[Index: Integer]: TdxReportCellExpandButton read GetExpandButton; - property GridWidth: Integer read GetGridWidth; - property LookAndFeelItemCount: Integer read GetLookAndFeelItemCount; - property LookAndFeelItems[Index: Integer]: TdxReportVisualItem read GetLookAndFeelItem; - property PaginateByTopLevelGroups: Boolean read GetPaginateByTopLevelGroups; - property Renderer: TdxPSReportRenderer read GetRenderer; - property ReportLink: TdxGridReportLink read GetReportLink; - property SiteHeight: Integer read GetSiteHeight; - property SiteWidth: Integer read GetSiteWidth; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); virtual; - destructor Destroy; override; - - function Adapter: TdxCustomGridViewAdapter; overload; virtual; - function Builder: TdxCustomGridViewBuilder; overload; virtual; - - { Host } - procedure DoInitializeHost(AHost: TdxReportCell); virtual; - function GetHostClass: TdxReportCellClass; virtual; - function GetRowHostClass: TdxReportCellClass; virtual; - - { Caption } - procedure DoInitializeCaption(ACaption: TdxReportCellText); virtual; - procedure DoInitializeCaptionRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeCaption(ACaption: TdxReportCellText); virtual; - function GetCaptionClass: TdxReportCellTextClass; virtual; - function GetCaptionViewParams: TdxReportItemViewParams; virtual; - - { Filter Box } - procedure DoInitializeFilterBar(AFilterBar: TdxReportCellText); virtual; - procedure DoInitializeFilterBarRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeFilterBar(AFilterBar: TdxReportCellText); virtual; - function GetFilterBarClass: TdxReportCellTextClass; virtual; - function GetFilterBarViewParams: TdxReportItemViewParams; virtual; - - { Details Separator } - procedure DoInitializeDetailsSeparatorRow(ARow: TdxReportCell); virtual; - procedure DoInitializeHorzDetailsSeparator(ASeparator: TdxReportCellBox); virtual; - procedure DoInitializeVertBottomDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - procedure DoInitializeVertDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - procedure DoInitializeVertTopDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - function GetDetailsSeparatorClass: TdxReportCellBoxClass; virtual; - - { Master Indent } - procedure DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; AnIndex, AnIndentCount: Integer); virtual; - function GetMasterIndentClass: TdxReportCellExpandButtonClass; virtual; - - { View Terminator } - procedure DoInitializeViewTerminator(ATerminator: TdxReportCellBox); virtual; - - property AbsoluteLevel: Integer read GetAbsoluteLevel; - property AutoWidth: Boolean read GetAutoWidth; - property CaptionLineHeight: Integer read FCaptionLineHeight write FCaptionLineHeight; - property DetailsSeparatorColor: TColor read GetDetailsSeparatorColor; - property DetailsSeparatorThickness: Integer read GetDetailsSeparatorThickness; - property FilterBarLineHeight: Integer read FFilterBarLineHeight write FFilterBarLineHeight; - property HasDetailsSeparator: Boolean read GetHasDetailsSeparator; - property IndentWidth: Integer read GetIndentWidth; - property ShowCaption: Boolean read GetShowCaption; - property ShowFilterBar: Boolean read GetShowFilterBar; - property TransparentColor: TColor read FTransparentColor write FTransparentColor; - property UseLookAndFeelColors: Boolean read GetUseLookAndFeelColors; - property ViewAvailableWidth: Integer read GetViewAvailableWidth; - property ViewWidth: Integer read GetViewWidth; - property ViewWidthExtra: Integer read GetViewWidthExtra; - property ViewWidthExtraAfter: Integer read GetViewWidthExtraAfter; // MD relation considering - property ViewWidthExtraBefore: Integer read GetViewWidthExtraBefore; // MD relation considering - end; - - TdxGridViewBuilderClass = class of TdxCustomGridViewBuilder; - - TdxCustomGridViewBuilder = class(TdxCustomClassMapItem) - private - FAdapter: TdxCustomGridViewAdapter; - FDetailsBuilder: TdxCustomGridViewBuilder; - FFormatter: TdxCustomGridViewFormatter; - FGridView: TcxCustomGridView; - FMasterBuilder: TdxCustomGridViewBuilder; - FProducerCache: TdxProducerCache; - FReportLink: TdxGridReportLink; - FReportRows: TList; - function GetAbsoluteBuilder(AIndex: Integer): TdxCustomGridViewBuilder; - function GetAutoWidth: Boolean; - function GetGridLevel: TcxGridLevel; - function GetGrid: TcxCustomGrid; - function GetHost: TdxReportCell; - function GetHostInfoServices: TdxGridAttributeHostInfoServices; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowCount: Integer; - function GetRootBuilder: TdxCustomGridViewBuilder; - protected - procedure AddReportRow(ARow: TdxReportCell); - - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - procedure DoBuild; virtual; - procedure DoBuildViewBody; virtual; - procedure DoBuildViewFooter; virtual; - procedure DoBuildViewHeader; virtual; - - function GetViewAvailableWidth: Integer; virtual; - { Caption } - procedure CreateCaption; virtual; - function GetCaptionProducer: TdxGridViewCaptionProducer; virtual; - function GetCaptionProducerClass: TdxGridViewCaptionProducerClass; virtual; - { Details Separator } - procedure CreateBottomDetailsSeparator; virtual; - procedure CreateTopDetailsSeparator; virtual; - function GetDetailsBottomSeparatorProducer: TdxGridViewDetailsSeparatorProducer; virtual; - function GetDetailsBottomSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; virtual; - function GetDetailsTopSeparatorProducer: TdxGridViewDetailsSeparatorProducer; virtual; - function GetDetailsTopSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; virtual; - { Filter Box } - procedure CreateFilterBar; virtual; - function GetFilterBarProducer: TdxGridViewFilterBarProducer; virtual; - function GetFilterBarProducerClass: TdxGridViewFilterBarProducerClass; virtual; - { View Terminator } - procedure CreateViewTerminator; virtual; - function GetViewTerminatorProducer: TdxGridViewTerminatorProducer; virtual; - function GetViewTerminatorProducerClass: TdxGridViewTerminatorProducerClass; virtual; - - function GridView: TcxCustomGridView; overload; virtual; - class function GridViewClass: TcxCustomGridViewClass; virtual; - - property GridLevel: TcxGridLevel read GetGridLevel; - property HostInfoServices: TdxGridAttributeHostInfoServices read GetHostInfoServices; - property ProducerCache: TdxProducerCache read FProducerCache; - property ReportLink: TdxGridReportLink read FReportLink; - public - constructor Create(AReportLink: TdxGridReportLink; AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView); virtual; - destructor Destroy; override; - - function Adapter: TdxCustomGridViewAdapter; overload; virtual; - class function AdapterClass: TdxGridViewAdapterClass; virtual; - class function CreateAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; virtual; - - function Formatter: TdxCustomGridViewFormatter; overload; virtual; - class function FormatterClass: TdxGridViewFormatterClass; virtual; - - procedure Build; - function IsAborted: Boolean; - procedure Progress(const APercentDone: Double); - - class function PairClass: TClass; override; - class procedure Register; - class procedure Unregister; - - property AbsoluteBuilders[Index: Integer]: TdxCustomGridViewBuilder read GetAbsoluteBuilder; - property AutoWidth: Boolean read GetAutoWidth; - property DetailsBuilder: TdxCustomGridViewBuilder read FDetailsBuilder; - property Grid: TcxCustomGrid read GetGrid; - property Host: TdxReportCell read GetHost; - property MasterBuilder: TdxCustomGridViewBuilder read FMasterBuilder; - property ReportRowCount: Integer read GetReportRowCount; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property RootBuilder: TdxCustomGridViewBuilder read GetRootBuilder; - property ViewAvailableWidth: Integer read GetViewAvailableWidth; - end; - - { CustomTableView Adapter and Formatter } - - TdxGridTableAdapterForEachRecordProc = procedure(ARecord: TcxCustomGridRecord; - AData: Integer; var AContinue: Boolean) of object; - - TdxCustomGridTableViewAdapter = class(TdxCustomGridViewAdapter) - private - FDetailsLineCount: Integer; - FRecordHelpersCache: TdxRecordHelpersCache; - function GetCellEndEllipsis: Boolean; - function GetDetailsLineCount: Integer; - function GetFiltering: TcxCustomGridTableFiltering; - function GetIsGridMode: Boolean; - function GetRecord(Index: Integer): TcxCustomGridRecord; - function GetRecordHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; - function GetSelectedRecord(Index: Integer): TcxCustomGridRecord; - function GetSelectedRecordCount: Integer; - protected - function CalculateDetailsLineCount: Integer; virtual; - - function GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; virtual; - function GetPreviewViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; virtual; - function GetSelectionViewParams: TcxViewParams; virtual; - function HasSelectionStyle: Boolean; - - function Controller: TcxCustomGridTableController; reintroduce; overload; - - procedure DoExpandMasterRow(ARecord: TcxCustomGridRecord; AData: Integer; - var AContinue: Boolean); - procedure ExpandAllGroupRows; virtual; - procedure ExpandAllMasterRows(AnExpandGroups: Boolean); virtual; - procedure ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); override; - - function GetAreAllMasterRowsCollapsed: Boolean; override; - function GetCanUseOnEveryPageMode: Boolean; override; - function GetCellAutoHeight: Boolean; virtual; - function GetCellMultiline: Boolean; virtual; - function GetGridLineColor: TColor; virtual; - function GetHasSelectedRecords: Boolean; override; - function GetMasterGridRecord: TcxCustomGridRecord; override; - function GetRecordCount: Integer; override; - procedure IsMasterRowCollapsed(ARecord: TcxCustomGridRecord; AData: Integer; - var AContinue: Boolean); - - class function GetProperties(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; virtual; - class function GetPropertiesClass(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditPropertiesClass; virtual; - class function GetRepositoryItem(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxEditRepositoryItem; virtual; - - property RecordHelpersCache: TdxRecordHelpersCache read FRecordHelpersCache; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); override; - destructor Destroy; override; - - function ForEachRecord(AProc: TdxGridTableAdapterForEachRecordProc; AData: Integer; - AProcessSelection: Boolean): Boolean; - - function GridView: TcxCustomGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxCustomGridTableViewStyles; reintroduce; overload; - - property CellAutoHeight: Boolean read GetCellAutoHeight; - property CellEndEllipsis: Boolean read GetCellEndEllipsis; - property CellMultiline: Boolean read GetCellMultiline; - property DetailsLineCount: Integer read GetDetailsLineCount write FDetailsLineCount; - property Filtering: TcxCustomGridTableFiltering read GetFiltering; - property GridLineColor: TColor read GetGridLineColor; - property IsGridMode: Boolean read GetIsGridMode; - property RecordHelpers[Row: TcxCustomGridRecord]: TdxCustomGridRecordHelper read GetRecordHelper; - property Records[Index: Integer]: TcxCustomGridRecord read GetRecord; - property SelectedRecordCount: Integer read GetSelectedRecordCount; - property SelectedRecords[Index: Integer]: TcxCustomGridRecord read GetSelectedRecord; - end; - - TdxCustomGridTableViewFormatter = class(TdxCustomGridViewFormatter, IdxPSCellParams, IdxPSCellParams2) - private - FRecordIndexes: TList; - FSelectedRecordList: TList; - function GetGridLineColor: TColor; - function GetRecord(Index: Integer): TcxCustomGridRecord; - function GetRecordCount: Integer; - function GetRecordIndex(ARecord: TcxCustomGridRecord): Integer; - function GetSelectedRecord(Index: Integer): TcxCustomGridRecord; - function GetSelectedRecordCount: Integer; - protected - { IdxPSCellParams } - function IdxPSCellParams.GetAutoHeight = IdxPSCellParams_GetAutoHeight; - function IdxPSCellParams.GetDC = IdxPSCellParams_GetDC; - function IdxPSCellParams.GetDisplayGraphicsAsText = IdxPSCellParams_GetDisplayGraphicsAsText; - function IdxPSCellParams.GetEndEllipsis = IdxPSCellParams_GetEndEllipsis; - function IdxPSCellParams.GetFlatCheckMarks = IdxPSCellParams_GetFlatCheckMarks; - function IdxPSCellParams.GetGraphicsText = IdxPSCellParams_GetGraphicsText; - function IdxPSCellParams.GetMultiline = IdxPSCellParams_GetMultiline; - function IdxPSCellParams.GetTransparentGraphics = IdxPSCellParams_GetTransparentGraphics; - function IdxPSCellParams_GetAutoHeight: Boolean; virtual; - function IdxPSCellParams_GetDC: HDC; virtual; - function IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; virtual; - function IdxPSCellParams_GetEndEllipsis: Boolean; virtual; - function IdxPSCellParams_GetFlatCheckMarks: Boolean; virtual; - function IdxPSCellParams_GetGraphicsText: string; virtual; - function IdxPSCellParams_GetMultiline: Boolean; virtual; - function IdxPSCellParams_GetTransparentGraphics: Boolean; virtual; - { IdxPSCellParams2 } - function IdxPSCellParams2.GetPreviewMarginLeft = IdxPSCellParams2_GetPreviewMarginLeft; - function IdxPSCellParams2.GetPreviewMarginRight = IdxPSCellParams2_GetPreviewMarginRight; - function IdxPSCellParams2.GetPreviewMaxHeight = IdxPSCellParams2_GetPreviewMaxHeight; - function IdxPSCellParams2.GetPreviewMaxLineCount = IdxPSCellParams2_GetPreviewMaxLineCount; - function IdxPSCellParams2.GetRichEditGraphicClass = IdxPSCellParams2_GetRichEditGraphicClass; - function IdxPSCellParams2.GetRichEditTransparent = IdxPSCellParams2_GetRichEditTransparent; - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; virtual; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; virtual; - function IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; virtual; - function IdxPSCellParams2_GetRichEditTransparent: Boolean; virtual; - - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - - procedure BuildSelectedRecordList; virtual; - function CanProcessSelectionStyle(ARecord: TcxCustomGridRecord): Boolean; - function IsSelectedRecord(ARecord: TcxCustomGridRecord): Boolean; virtual; - - function GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; virtual; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - property SelectedRecordList: TList read FSelectedRecordList; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Adapter: TdxCustomGridTableViewAdapter; reintroduce; overload; - function Builder: TdxCustomGridTableViewBuilder; reintroduce; overload; - - function IndexOfRecord(ARecord: TcxCustomGridRecord): Integer; - - { Items } - procedure DoInitializeItem(AnItem: TAbstractdxReportCellData; ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False); virtual; - function GetItemClass(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportCellDataClass; virtual; - function GetItemProperties(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; virtual; - function GetItemValue(AProperties: TcxCustomEditProperties; ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxEditValue; virtual; - function GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; virtual; - - property GridLineColor: TColor read GetGridLineColor; - property RecordCount: Integer read GetRecordCount; - property RecordIndexes[ARecord: TcxCustomGridRecord]: Integer read GetRecordIndex; - property Records[Index: Integer]: TcxCustomGridRecord read GetRecord; - property SelectedRecordCount: Integer read GetSelectedRecordCount; - property SelectedRecords[Index: Integer]: TcxCustomGridRecord read GetSelectedRecord; - end; - - TdxCustomGridTableViewBuilder = class(TdxCustomGridViewBuilder) - protected - procedure DoBuildViewFooter; override; - procedure DoBuildViewHeader; override; - - procedure DoGetCellHeight(ARecord: TcxCustomGridRecord; ATableItem: TcxCustomGridTableItem; - var AHeight: Integer); - - function GridView: TcxCustomGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - public - function Adapter: TdxCustomGridTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxCustomGridTableViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - end; - - { GridTableView Adapter, Formatter and Builder } - - TdxGridTableViewAdapter = class(TdxCustomGridTableViewAdapter) - private - function GetColumn(Index: Integer): TcxGridColumn; - function GetColumnCount: Integer; - function GetExpandButtonColor: TColor; - function GetExpandButtonSize: Integer; - function GetFooterItemText(Index: Integer): string; - function GetFooterMultiline: Boolean; - function GetGridLines: TcxGridLines; - function GetGroupedColumn(Index: Integer): TcxGridColumn; - function GetGroupedColumnCount: Integer; - function GetGroupFootersMode: TcxGridGroupFootersMode; - function GetGroupFootersMultiline: Boolean; - function GetGroupRowSeparatorColor: TColor; - function GetGroupRowSeparatorThickness: Integer; - function GetHasFooterItem(Index: Integer): Boolean; - function GetHasPreview: Boolean; - function GetHasRowSeparators: Boolean; - function GetHeaderEndEllipsis: Boolean; - function GetInternalColumnMinWidth(Column: TcxGridColumn): Integer; - function GetInternalColumnWidth(Column: TcxGridColumn): Integer; - function GetPreviewColumn: TcxGridColumn; - function GetPreviewLeftIndent: Integer; - function GetPreviewPlace: TcxGridPreviewPlace; - function GetPreviewRightIndent: Integer; - function GetRow(Index: Integer): TcxCustomGridRow; - function GetRowCount: Integer; - function GetRowSeparatorColor: TColor; - function GetRowSeparatorThickness: Integer; - function GetShowExpandButtonsForEmptyDetails: Boolean; - function GetShowHorzGridLines: Boolean; - function GetShowVertGridLines: Boolean; - function GetThemedFooterItemColor: TColor; - function GetThemedFooterItemTextColor: TColor; - function GetThemedHeaderItemColor: TColor; - function GetThemedHeaderItemTextColor: TColor; - protected - function Controller: TcxGridTableController; reintroduce; overload; - function DataController: TcxGridDataController; reintroduce; overload; - - function GetAutoWidth: Boolean; override; - function GetCellAutoHeight: Boolean; override; - function GetCellMultiline: Boolean; override; - function GetGridLineColor: TColor; override; - function GetHeaderAutoHeight: Boolean; virtual; - function GetHeaderMultiline(Column: TcxGridColumn): Boolean; virtual; - function GetIndentCount: Integer; override; - function GetIndentWidth: Integer; override; - function GetIndicatorWidth: Integer; virtual; - function GetIsOffice11StyleGrouping: Boolean; override; - function GetViewWidthExtra: Integer; override; - - function GetDataRowHeight: Integer; virtual; - function GetDataRowHeightAssigned: Boolean; virtual; - function GetFooterHeight: Integer; virtual; - function GetFooterHeightAssigned: Boolean; virtual; - function GetGroupRowHeight: Integer; virtual; - function GetGroupRowHeightAssigned: Boolean; virtual; - function GetHeaderHeight: Integer; virtual; - function GetHeaderHeightAssigned: Boolean; virtual; - - { Styles } - function GetFilterBarViewParams: TcxViewParams; override; - function GetFooterViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; AColumn: TcxGridColumn): TcxViewParams; virtual; - function GetGroupRowViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer): TcxViewParams; virtual; - function GetHeaderViewParams(AColumn: TcxGridColumn): TcxViewParams; virtual; - function GetPreviewViewParams(ARecord: TcxCustomGridRecord; - AnItem: TcxCustomGridTableItem): TcxViewParams; override; - - property InternalColumnMinWidths[Column: TcxGridColumn]: Integer read GetInternalColumnMinWidth; - property InternalColumnWidths[Column: TcxGridColumn]: Integer read GetInternalColumnWidth; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); override; - - function GridView: TcxGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxGridTableViewStyles; reintroduce; overload; - - function HasDetails(AGridRow: TcxCustomGridRow): Boolean; - - function GetGroupFooterCount(AGridRow: TcxCustomGridRow): Integer; - function GetGroupFooterItemText(ARowIndex, ALevel, AIndex: Integer): string; - function HasGroupFooter(AGridRow: TcxCustomGridRow; ALevel: Integer): Boolean; - function HasGroupFooterItem(ALevel, AIndex: Integer): Boolean; - function HasGroupFooters(AGridRow: TcxCustomGridRow): Boolean; - - property ColumnCount: Integer read GetColumnCount; - property Columns[Index: Integer]: TcxGridColumn read GetColumn; - property DataRowHeight: Integer read GetDataRowHeight; - property DataRowHeightAssigned: Boolean read GetDataRowHeightAssigned; - property ExpandButtonColor: TColor read GetExpandButtonColor; - property ExpandButtonSize: Integer read GetExpandButtonSize; - property FooterHeight: Integer read GetFooterHeight; - property FooterHeightAssigned: Boolean read GetFooterHeightAssigned; - property FooterItemTexts[Index: Integer]: string read GetFooterItemText; - property FooterMultiline: Boolean read GetFooterMultiline; - property GridLines: TcxGridLines read GetGridLines; - property GroupedColumnCount: Integer read GetGroupedColumnCount; - property GroupedColumns[Index: Integer]: TcxGridColumn read GetGroupedColumn; - property GroupFootersMode: TcxGridGroupFootersMode read GetGroupFootersMode; - property GroupFootersMultiline: Boolean read GetGroupFootersMultiline; - property GroupRowHeight: Integer read GetGroupRowHeight; - property GroupRowHeightAssigned: Boolean read GetGroupRowHeightAssigned; - property GroupRowSeparatorColor: TColor read GetGroupRowSeparatorColor; - property GroupRowSeparatorThickness: Integer read GetGroupRowSeparatorThickness; - property HasFooterItem[Index: Integer]: Boolean read GetHasFooterItem; - property HasPreview: Boolean read GetHasPreview; - property HasRowSeparators: Boolean read GetHasRowSeparators; - property HeaderAutoHeight: Boolean read GetHeaderAutoHeight; - property HeaderEndEllipsis: Boolean read GetHeaderEndEllipsis; - property HeaderHeight: Integer read GetHeaderHeight; - property HeaderHeightAssigned: Boolean read GetHeaderHeightAssigned; - property HeaderMultilines[Column: TcxGridColumn]: Boolean read GetHeaderMultiline; - property IndicatorWidth: Integer read GetIndicatorWidth; - property PreviewColumn: TcxGridColumn read GetPreviewColumn; - property PreviewLeftIndent: Integer read GetPreviewLeftIndent; - property PreviewPlace: TcxGridPreviewPlace read GetPreviewPlace; - property PreviewRightIndent: Integer read GetPreviewRightIndent; - property RowCount: Integer read GetRowCount; - property Rows[Index: Integer]: TcxCustomGridRow read GetRow; - property RowSeparatorColor: TColor read GetRowSeparatorColor; - property RowSeparatorThickness: Integer read GetRowSeparatorThickness; - property ShowExpandButtonsForEmptyDetails: Boolean read GetShowExpandButtonsForEmptyDetails; - property ShowHorzGridLines: Boolean read GetShowHorzGridLines; - property ShowVertGridLines: Boolean read GetShowVertGridLines; - property ThemedFooterItemColor: TColor read GetThemedFooterItemColor; - property ThemedFooterItemTextColor: TColor read GetThemedFooterItemTextColor; - property ThemedHeaderItemColor: TColor read GetThemedHeaderItemColor; - property ThemedHeaderItemTextColor: TColor read GetThemedHeaderItemTextColor; - end; - - TdxCustomGridTableViewItemPlaceControllerClass = class of TdxCustomGridTableViewItemPlaceController; - - TdxCustomGridTableViewItemPlaceController = class - private - FFormatter: TdxGridTableViewFormatter; - FHeaderLineCount: Integer; - FWidth: Integer; - function GetHeaderLineCount: Integer; - function GetWidth: Integer; - procedure SetWidth(Value: Integer); - protected - function CalculateWidth: Integer; virtual; - function CalculateHeaderLineCount: Integer; virtual; - function GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; virtual; - procedure WidthChanged; virtual; - public - constructor Create(AFormatter: TdxGridTableViewFormatter); virtual; - - procedure Calculate; virtual; - procedure Refresh; virtual; - - property Formatter: TdxGridTableViewFormatter read FFormatter; - property HeaderLineCount: Integer read GetHeaderLineCount; - property ItemsByColumn[Column: TcxGridColumn]: TdxGridTableViewColumnPlace read GetItemByColumn; default; - property Width: Integer read GetWidth write SetWidth; - end; - - TdxGridTableViewColumnPlaceClass = class of TdxGridTableViewColumnPlace; - - TdxGridTableViewColumnPlace = class - private - FColumn: TcxGridColumn; - FController: TdxGridTableViewColumnPlaceController; - FLeftBound: Integer; - FWidth: Integer; - function GetAdapter: TdxGridTableViewAdapter; - function GetCellBounds(RowIndex: Integer): TRect; - function GetCellHeight(RowIndex: Integer): Integer; - function GetFooterCellBounds: TRect; - function GetFooterLineHeight: Integer; - function GetFormatter: TdxGridTableViewFormatter; - function GetGroupFooterCellBounds(IndentCount: Integer): TRect; - function GetGroupFooterLineHeight: Integer; - function GetHeaderCellBounds: TRect; - function GetHeaderLineHeight: Integer; - function GetIndex: Integer; - function GetIsFixed: Boolean; - function GetLeftBound: Integer; - function GetMinWidth: Integer; - function GetOriginalWidth: Integer; - function GetWidth: Integer; - protected - function CalculateLeftBound: Integer; virtual; - function GetLineCount: Integer; virtual; - function GetRowIndex: Integer; virtual; - procedure InitAutoWidthItem(AnItem: TcxAutoWidthItem); virtual; - - property Adapter: TdxGridTableViewAdapter read GetAdapter; - property Formatter: TdxGridTableViewFormatter read GetFormatter; - property IsFixed: Boolean read GetIsFixed; - property LineCount: Integer read GetLineCount; - property MinWidth: Integer read GetMinWidth; - property OriginalWidth: Integer read GetOriginalWidth; - property RowIndex: Integer read GetRowIndex; - public - constructor Create(AController: TdxGridTableViewColumnPlaceController; AColumn: TcxGridColumn); virtual; - procedure Calculate(ALeftBound: Integer); virtual; - - property CellBounds[RowIndex: Integer]: TRect read GetCellBounds; - property CellHeights[RowIndex: Integer]: Integer read GetCellHeight; - property Column: TcxGridColumn read FColumn; - property Controller: TdxGridTableViewColumnPlaceController read FController; - property FooterCellBounds: TRect read GetFooterCellBounds; - property FooterLineHeight: Integer read GetFooterLineHeight; - property GroupFooterCellBounds[IndentCount: Integer]: TRect read GetGroupFooterCellBounds; - property GroupFooterLineHeight: Integer read GetGroupFooterLineHeight; - property HeaderCellBounds: TRect read GetHeaderCellBounds; - property HeaderLineHeight: Integer read GetHeaderLineHeight; - property Index: Integer read GetIndex; - property LeftBound: Integer read GetLeftBound write FLeftBound; - property Width: Integer read GetWidth write FWidth; - end; - - TdxGridTableViewColumnPlaceController = class(TdxCustomGridTableViewItemPlaceController) - private - FColumnIndexes: TList; - FItems: TList; - function GetAdapter: TdxGridTableViewAdapter; - function GetColumnIndex(Column: TcxGridColumn): Integer; - function GetItem(Index: Integer): TdxGridTableViewColumnPlace; - function GetItemCount: Integer; - procedure FreeAndNilItems; - protected - function CalculateWidth: Integer; override; - function GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; override; - - procedure AddItems; virtual; - procedure ClearItems; - function CreateItem(AColumn: TcxGridColumn): TdxGridTableViewColumnPlace; virtual; - function GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; virtual; - - function CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; virtual; - procedure CalculateItemsWidth; virtual; - - function GetItemsAutoWidth: Boolean; virtual; - function GetItemsAvailableWidth: Integer; virtual; - - property Adapter: TdxGridTableViewAdapter read GetAdapter; - property ItemsAutoWidth: Boolean read GetItemsAutoWidth; - property ItemsAvailableWidth: Integer read GetItemsAvailableWidth; - public - constructor Create(AFormatter: TdxGridTableViewFormatter); override; - destructor Destroy; override; - - procedure Calculate; override; - procedure Refresh; override; - - function IndexOf(AnItem: TdxGridTableViewColumnPlace): Integer; overload; - function IndexOf(AColumn: TcxGridColumn): Integer; overload; - - property ColumnIndexes[Column: TcxGridColumn]: Integer read GetColumnIndex; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TdxGridTableViewColumnPlace read GetItem; default; - end; - - TdxGridTableViewReportDataAdapter = class - private - FBuilder: TdxCustomGridViewBuilder; - function GetReportItem(Row: TcxCustomGridRow; Column: TcxGridColumn): TdxReportVisualItem; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowByGridRow(Row: TcxCustomGridRow): TdxReportCell; - function GetReportRowCount: Integer; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); virtual; - - property Builder: TdxCustomGridViewBuilder read FBuilder; - property ReportItems[Row: TcxCustomGridRow; Column: TcxGridColumn]: TdxReportVisualItem read GetReportItem; - property ReportRowCount: Integer read GetReportRowCount; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; default; - property ReportRowsByGridRow[Row: TcxCustomGridRow]: TdxReportCell read GetReportRowByGridRow; - end; - - TdxGridTableViewFormatter = class(TdxCustomGridTableViewFormatter) - private - FColumns: TList; - FDetailsLineHeight: Integer; - FFooterLineHeight: Integer; - FGroupFooterLineHeight: Integer; - FGroupRowLineHeight: Integer; - FHeaderLineHeight: Integer; - FItemPlaceController: TdxCustomGridTableViewItemPlaceController; - FPreviewLineHeight: Integer; - FReportDataAdapter: TdxGridTableViewReportDataAdapter; - FRowHeights: TList; - function GetColumn(Index: Integer): TcxGridColumn; - function GetColumnCount: Integer; - function GetGroupRowSeparatorColor: TColor; - function GetGroupRowSeparatorThickness: Integer; - function GetHasPreview: Boolean; - function GetHeaderLineCount: Integer; - function GetPreviewAutoHeight: Boolean; - function GetPreviewColumn: TcxGridColumn; - function GetPreviewMaxLineCount: Integer; - function GetRow(Index: Integer): TcxCustomGridRow; - function GetRowCount: Integer; - function GetRowHeight(Index: Integer): Integer; - function GetRowHeightByRow(Row: TcxCustomGridRow): Integer; - function GetRowSeparatorColor: TColor; - function GetRowSeparatorThickness: Integer; - function GetShowGroupFooters: Boolean; - function GetShowFooters: Boolean; - function GetShowHeaders: Boolean; - function GetShowPreview: Boolean; - procedure SetRowHeight(Index: Integer; Value: Integer); - procedure SetRowHeightByRow(Row: TcxCustomGridRow; Value: Integer); - protected - { IdxPSCellParams2 } - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; override; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; override; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; override; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; override; - - procedure AddHorizontalDelimiters; override; - procedure BeforeBuilding; override; - procedure Calculate; override; - procedure CalculateDataRowHeights; virtual; - procedure CalculateLineHeights; override; - - function GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; virtual; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - - // actual columns used inside building (depends on ActualVisibility of columns and selection status) - procedure BuildColumnList; virtual; - procedure BuildItemLists; virtual; - function IsColumnActuallyVisible(AColumn: TcxGridColumn): Boolean; virtual; - - function GetViewWidth: Integer; override; - - property ItemPlaceController: TdxCustomGridTableViewItemPlaceController read FItemPlaceController; - property ReportDataAdapter: TdxGridTableViewReportDataAdapter read FReportDataAdapter; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - function Builder: TdxGridTableViewBuilder; reintroduce; overload; - - { Footers } - procedure DoInitializeFooterItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeFooterRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeFooterItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - function GetFooterItemBounds(AnIndex: Integer): TRect; virtual; - function GetFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetFooterItemViewParams(AColumn: TcxGridColumn): TdxReportItemViewParams; virtual; - - { Group Footers } - procedure DoInitializeGroupFooterHost(AnItem: TdxReportVisualItem; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); virtual; - procedure DoInitializeGroupFooterRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord; AGroupLevel: Integer); virtual; - procedure DoReportLinkInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); virtual; - function GetGroupFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetGroupFooterItemBounds(AnIndex, AGroupLevel: Integer): TRect; virtual; - function GetGroupFooterItemViewParams(ARecord: TcxCustomGridRecord; AGroupLevel: Integer; - AColumn: TcxGridColumn): TdxReportItemViewParams; virtual; - - { Group Row } - procedure DoInitializeGroupRowItem(AnItem: TAbstractdxReportCellData; ARow: TcxGridGroupRow); virtual; - procedure DoInitializeGroupRow(ARow: TdxReportCell; ARecord: TcxCustomGridRecord); virtual; - function GetGroupRowClass: TdxReportCellTextClass; virtual; - function GetGroupRowViewParams(ARecord: TcxCustomGridRecord; ALevel: Integer): TdxReportItemViewParams; virtual; - - { Group Row Separator - Office11 Grouping Style } - procedure DoInitializeGroupRowSeparator(ASeparator: TAbstractdxReportCellData); virtual; - procedure DoInitializeGroupSeparatorRow(ARow: TdxReportCell); virtual; - function GetGroupRowSeparatorClass: TdxReportCellDataClass; virtual; - - { Headers } - procedure DoInitializeHeaderItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeHeaderRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeHeaderItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - function GetHeaderItemBounds(AnIndex: Integer): TRect; virtual; - function GetHeaderItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetHeaderItemViewParams(AColumn: TcxGridColumn): TdxReportItemViewParams; virtual; - - { Indents and Expand Buttons } - function CreateIndent(AParent: TdxReportCell): TdxReportCellExpandButton; virtual; - procedure DoInitializeDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeExpandButton(AnExpandButton: TdxReportCellExpandButton; - ARecord: TcxCustomGridRecord; AnIsMasterIndent: Boolean); virtual; - procedure DoInitializeGroupFooterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeGroupRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeMasterDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeRowSeparatorIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - function GetIndentClass: TdxReportCellExpandButtonClass; virtual; - function GetIndentViewParams(ARecord: TcxCustomGridRecord; - AnIndex, AnIndentCount: Integer; ANonRecordIndent: Boolean): TdxReportItemViewParams; virtual; - function HasExpandButton(ARecord: TcxCustomGridRecord): Boolean; virtual; - - { Items } - procedure DoInitializeDataRow(ARow: TdxReportCell; ARecord: TcxCustomGridRecord); virtual; - procedure DoReportLinkInitializeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxGridColumn; ARecord: TcxCustomGridRecord); virtual; - function GetItemBounds(AGridRow: TcxCustomGridRow; - AGridRowIndex, AColumnIndex: Integer): TRect; virtual; - function GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; override; - - { Master Indent } - procedure DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer); override; - - { Preview } - procedure DoInitializePreview(APreview: TAbstractdxReportCellData; AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord); virtual; - function GetPreviewClass(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportCellDataClass; virtual; - function GetPreviewViewParams(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportItemViewParams; virtual; - - { Row Separator } - procedure DoInitializeSeparatorRow(ARow: TdxReportCell); virtual; - procedure DoInitializeRowSeparator(ASeparator: TAbstractdxReportCellData); virtual; - function GetRowSeparatorClass: TdxReportCellDataClass; virtual; - - function GetReportItem(ARow: TcxCustomGridRow; AColumn: TcxGridColumn): TdxReportVisualItem; - - property ColumnCount: Integer read GetColumnCount; - property Columns[Index: Integer]: TcxGridColumn read GetColumn; - property DetailsLineHeight: Integer read FDetailsLineHeight write FDetailsLineHeight; - property FooterLineHeight: Integer read FFooterLineHeight write FFooterLineHeight; - property GroupFooterLineHeight: Integer read FGroupFooterLineHeight write FGroupFooterLineHeight; - property GroupRowLineHeight: Integer read FGroupRowLineHeight write FGroupRowLineHeight; - property GroupRowSeparatorColor: TColor read GetGroupRowSeparatorColor; - property GroupRowSeparatorThickness: Integer read GetGroupRowSeparatorThickness; - property HasPreview: Boolean read GetHasPreview; - property HeaderLineCount: Integer read GetHeaderLineCount; - property HeaderLineHeight: Integer read FHeaderLineHeight write FHeaderLineHeight; - property PreviewAutoHeight: Boolean read GetPreviewAutoHeight; - property PreviewColumn: TcxGridColumn read GetPreviewColumn; - property PreviewLineHeight: Integer read FPreviewLineHeight write FPreviewLineHeight; - property PreviewMaxLineCount: Integer read GetPreviewMaxLineCount; - property RowCount: Integer read GetRowCount; - property RowHeights[Index: Integer]: Integer read GetRowHeight write SetRowHeight; - property RowHeightsByRow[Row: TcxCustomGridRow]: Integer read GetRowHeightByRow write SetRowHeightByRow; - property Rows[Index: Integer]: TcxCustomGridRow read GetRow; - property RowSeparatorColor: TColor read GetRowSeparatorColor; - property RowSeparatorThickness: Integer read GetRowSeparatorThickness; - property ShowGroupFooters: Boolean read GetShowGroupFooters; - property ShowFooters: Boolean read GetShowFooters; - property ShowHeaders: Boolean read GetShowHeaders; - property ShowPreview: Boolean read GetShowPreview; - end; - - TdxGridTableViewBuilder = class(TdxCustomGridTableViewBuilder) - private - function GetLastReportRow: TdxReportCell; - function GetProcessedView: TcxCustomGridView; - procedure SetProcessedView(Value: TcxCustomGridView); - protected - procedure AddDelimitersHardVert(AReportRow: TdxReportCell); - - procedure DoBuildViewBody; override; - procedure DoBuildViewFooter; override; - - { Details View } - procedure CreateDetails(AMasterRow: TcxGridMasterDataRow); virtual; - procedure CreateDetailView(AGridView: TcxCustomGridView); virtual; - function GetAreDetailsBuilt: Boolean; virtual; - - { Footer } - procedure CreateFooter; virtual; - function GetFootersProducer: TdxGridTableViewFootersProducer; virtual; - function GetFootersProducerClass: TdxGridTableViewFootersProducerClass; virtual; - - { Group Footer } - procedure CreateGroupFooters(AGridRow: TcxCustomGridRow); virtual; - function GetGroupFooterProducer: TdxGridTableViewGroupFooterProducer; virtual; - function GetGroupFooterProducerClass: TdxGridTableViewGroupFooterProducerClass; virtual; - - { Header } - procedure CreateHeader; virtual; - function GetHeadersProducer: TdxGridTableViewHeadersProducer; virtual; - function GetHeadersProducerClass: TdxGridTableViewHeadersProducerClass; virtual; - - { Rows } - procedure CreateRow(AGridRow: TcxCustomGridRow; ARowIndex: Integer); virtual; - procedure CreateRows; virtual; - function GetRowProducer(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducer; virtual; - function GetRowProducerClass(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducerClass; virtual; - - { Row Separators } - procedure CreateRowSeparator(AGridRow: TcxCustomGridRow; AnIsLast: Boolean = False); virtual; - function GetRowSeparatorProducer: TdxGridTableViewRowSeparatorProducer; virtual; - function GetRowSeparatorProducerClass: TdxGridTableViewRowSeparatorProducerClass; virtual; - function GetShowRowSeparators: Boolean; virtual; - - { GroupRow Separators } - procedure CreateGroupRowSeparator(AGridRow: TcxGridGroupRow); virtual; - function GetGroupRowSeparatorProducer: TdxGridTableViewGroupRowSeparatorProducer; virtual; - function GetGroupRowSeparatorProducerClass: TdxGridTableViewGroupRowSeparatorProducerClass; virtual; - function GetShowGroupRowSeparators: Boolean; virtual; - - function GridView: TcxGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - - property LastReportRow: TdxReportCell read GetLastReportRow; - property ProcessedView: TcxCustomGridView read GetProcessedView write SetProcessedView; - public - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxGridTableViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - - property AreDetailsBuilt: Boolean read GetAreDetailsBuilt; - property ShowGroupRowSeparators: Boolean read GetShowGroupRowSeparators; - property ShowRowSeparators: Boolean read GetShowRowSeparators; - end; - - { DBTableView Adapter, Formatter and Builder } - - TdxGridDBTableViewAdapter = class(TdxGridTableViewAdapter) - private - FPrevAllRecordsAreLoaded: Boolean; - protected - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - function DataController: TcxGridDBDataController; reintroduce; overload; - - function DBDataModeController: TcxDBDataModeController; virtual; - procedure LoadAllRecords; virtual; - procedure UnloadAllRecords; virtual; - public - function GridView: TcxGridDBTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - end; - - TdxGridDBTableViewBuilder = class(TdxGridTableViewBuilder) - public - function Adapter: TdxGridDBTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - end; - - { BandedTableView Adapter, Formatter and Builder } - - TdxGridBandedTableViewAdapter = class(TdxGridTableViewAdapter) - private - FFooterLineCount: Integer; - function GetBand(Index: Integer): TcxGridBand; - function GetBandCount: Integer; - function GetBandEndEllipsis: Boolean; - function GetBandHeaderLineCount: Integer; - function GetBandHeaderMultiline: Boolean; - function GetBottomBand(Index: Integer): TcxGridBand; - function GetBottomBandCount: Integer; - function GetColumn(Index: Integer): TcxGridBandedColumn; - function GetFooterLineCount: Integer; - function GetRootBand(Index: Integer): TcxGridBand; - function GetRootBandCount: Integer; - function GetThemedBandHeaderItemColor: TColor; - function GetThemedBandHeaderItemTextColor: TColor; - protected - function CalculateDetailsLineCount: Integer; override; - function CalculateFooterLineCount: Integer; virtual; - - function GetBandHeaderHeight: Integer; virtual; - function GetBandHeaderHeightAssigned: Boolean; virtual; - function GetBandHeaderViewParams(ABand: TcxGridBand): TcxViewParams; virtual; - function GetDataRowHeightAssigned: Boolean; override; - function GetFooterHeightAssigned: Boolean; override; - function GetHeaderHeightAssigned: Boolean; override; - function GetHeaderMultiline(Column: TcxGridColumn): Boolean; override; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); override; - - function GridView: TcxGridBandedTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxGridBandedTableViewStyles; reintroduce; overload; - - property BandCount: Integer read GetBandCount; - property BandEndEllipsis: Boolean read GetBandEndEllipsis; - property BandHeaderHeight: Integer read GetBandHeaderHeight; - property BandHeaderHeightAssigned: Boolean read GetBandHeaderHeightAssigned; - property BandHeaderLineCount: Integer read GetBandHeaderLineCount; - property BandHeaderMultiline: Boolean read GetBandHeaderMultiline; - property Bands[Index: Integer]: TcxGridBand read GetBand; - property BottomBandCount: Integer read GetBottomBandCount; - property BottomBands[Index: Integer]: TcxGridBand read GetBottomBand; - property Columns[Index: Integer]: TcxGridBandedColumn read GetColumn; - property FooterLineCount: Integer read GetFooterLineCount write FFooterLineCount; - property RootBandCount: Integer read GetRootBandCount; - property RootBands[Index: Integer]: TcxGridBand read GetRootBand; - property ThemedBandHeaderItemColor: TColor read GetThemedBandHeaderItemColor; - property ThemedBandHeaderItemTextColor: TColor read GetThemedBandHeaderItemTextColor; - end; - - TdxGridBandedTableViewColumnPlace = class(TdxGridTableViewColumnPlace) - private - function GetColumn: TcxGridBandedColumn; - function GetController: TdxCustomGridBandedTableViewItemPlace; - function GetFormatter: TdxGridBandedTableViewFormatter; - protected - function GetLineCount: Integer; override; - function GetRowIndex: Integer; override; - public - property Column: TcxGridBandedColumn read GetColumn; - property Controller: TdxCustomGridBandedTableViewItemPlace read GetController; - property Formatter: TdxGridBandedTableViewFormatter read GetFormatter; - end; - - TdxCustomGridBandedTableViewItemPlaceClass = class of TdxCustomGridBandedTableViewItemPlace; - - TdxCustomGridBandedTableViewItemPlace = class(TdxGridTableViewColumnPlaceController) - private - FBand: TcxGridBand; - FController: TdxGridBandedTableViewItemPlaceController; - FHeight: Integer; - FLeftBound: Integer; - FMinWidth: Integer; - FParent: TdxGridBandedTableViewItemPlace; - FTopBound: Integer; - function GetAdapter: TdxGridBandedTableViewAdapter; - function GetBounds: TRect; - function GetFormatter: TdxGridBandedTableViewFormatter; - function GetHeight: Integer; - function GetIndex: Integer; - function GetIsFixed: Boolean; - function GetLeftBound: Integer; - function GetLevelIndex: Integer; - function GetMinWidth: Integer; - function GetTopBound: Integer; - function GetViewParams: TdxReportItemViewParams; - protected - function CalculateHeaderLineCount: Integer; override; - function CalculateWidth: Integer; override; - function GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; override; - - procedure AssignWidth; - function CalculateHeight: Integer; virtual; - function CalculateLeftBound: Integer; virtual; - function CalculateLevelHeight: Integer; virtual; - function CalculateLineHeight: Integer; virtual; - function CalculateMinWidth: Integer; virtual; - function CalculateTopBound: Integer; virtual; - procedure InitAutoWidthItem(AnItem: TcxAutoWidthItem); virtual; - - function GetRowCount: Integer; virtual; - function InternalCalculateMinWidth: Integer; virtual; - function InternalCalculateWidth: Integer; virtual; - - property Adapter: TdxGridBandedTableViewAdapter read GetAdapter; - property Band: TcxGridBand read FBand; - property IsFixed: Boolean read GetIsFixed; - property LevelIndex: Integer read GetLevelIndex; - property MinWidth: Integer read GetMinWidth; - property RowCount: Integer read GetRowCount; - property ViewParams: TdxReportItemViewParams read GetViewParams; - public - constructor Create(AController: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); reintroduce; virtual; - - property Bounds: TRect read GetBounds; - property Controller: TdxGridBandedTableViewItemPlaceController read FController; - property Formatter: TdxGridBandedTableViewFormatter read GetFormatter; - property Height: Integer read GetHeight write FHeight; - property Index: Integer read GetIndex; - property LeftBound: Integer read GetLeftBound write FLeftBound; - property Parent: TdxGridBandedTableViewItemPlace read FParent; - property TopBound: Integer read GetTopBound write FTopBound; - end; - - TdxGridBandedTableViewItemPlace = class(TdxCustomGridBandedTableViewItemPlace) - private - FChildItems: TList; - function GetChildItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetChildItemCount: Integer; - protected - function GetRowCount: Integer; override; - function InternalCalculateMinWidth: Integer; override; - function InternalCalculateWidth: Integer; override; - procedure WidthChanged; override; - - procedure CalculateChildItemWidths; - public - constructor Create(AnOwner: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); override; - destructor Destroy; override; - - function IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; - - property ChildItemCount: Integer read GetChildItemCount; - property ChildItems[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetChildItem; - end; - - TdxGridBandedTableViewBottomItemPlace = class(TdxCustomGridBandedTableViewItemPlace) - protected - procedure AddItems; override; - function CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; override; - procedure CalculateItemsWidth; override; - function GetItemsAutoWidth: Boolean; override; - function GetItemsAvailableWidth: Integer; override; - - function GetRowCount: Integer; override; - function InternalCalculateMinWidth: Integer; override; - function InternalCalculateWidth: Integer; override; - procedure WidthChanged; override; - end; - - TdxGridBandedTableViewItemPlaceController = class(TdxCustomGridTableViewItemPlaceController) - private - FBottomItems: TList; - FHeight: Integer; - FItems: TList; - FLevelCount: Integer; - FLevelHeights: TList; - FRootItems: TList; - function GetAdapter: TdxGridBandedTableViewAdapter; - function GetAutoWidth: Boolean; - function GetAvailableWidth: Integer; - function GetBottomItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetBottomItemCount: Integer; - function GetFormatter: TdxGridBandedTableViewFormatter; - function GetHeight: Integer; - function GetItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetItemByBand(Band: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; - function GetItemCount: Integer; - function GetLevelCount: Integer; - function GetLevelHeight(Index: Integer): Integer; - function GetRootItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetRootItemCount: Integer; - procedure SetLevelHeight(Index: Integer; Value: Integer); - procedure FreeAndNilItems; - protected - function CalculateHeaderLineCount: Integer; override; - function CalculateWidth: Integer; override; - function GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; override; - - procedure AddItems; virtual; - procedure ClearItems; - function CreateItem(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; virtual; - function GetItemClass(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlaceClass; virtual; - procedure RefreshBottomItems; - procedure RefreshItems; - procedure RefreshRootItems; - - function CalculateHeight: Integer; virtual; - function CalculateItemHeight(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; virtual; - function CalculateItemLeftBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; virtual; - function CalculateItemTopBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; virtual; - function CalculateLevelCount: Integer; virtual; - - procedure CalculateItemWidths; - procedure CalculateLevelHeights; - - property AutoWidth: Boolean read GetAutoWidth; - property Adapter: TdxGridBandedTableViewAdapter read GetAdapter; - property AvailableWidth: Integer read GetAvailableWidth; - public - constructor Create(AFormatter: TdxGridTableViewFormatter); override; - destructor Destroy; override; - - procedure Calculate; override; - procedure Refresh; override; - - function IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; overload; - function IndexOf(ABand: TcxGridBand): Integer; overload; - function RootIndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; overload; - function RootIndexOf(ABand: TcxGridBand): Integer; overload; - - property BottomItemCount: Integer read GetBottomItemCount; - property BottomItems[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetBottomItem; - property Formatter: TdxGridBandedTableViewFormatter read GetFormatter; - property Height: Integer read GetHeight; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetItem; default; - property ItemsByBand[Band: TcxGridBand]: TdxCustomGridBandedTableViewItemPlace read GetItemByBand; - property LevelCount: Integer read GetLevelCount; - property LevelHeights[Index: Integer]: Integer read GetLevelHeight write SetLevelHeight; - property RootItemCount: Integer read GetRootItemCount; - property RootItems[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetRootItem; - end; - - TdxGridBandedTableViewFormatter = class(TdxGridTableViewFormatter) - private - FBands: TList; - function GetBand(Index: Integer): TcxGridBand; - function GetBandCount: Integer; - function GetColumn(Index: Integer): TcxGridBandedColumn; - function GetItemPlaceController: TdxGridBandedTableViewItemPlaceController; - function GetShowBandHeaders: Boolean; - protected - procedure AddHorizontalDelimiters; override; - - function GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; override; - - procedure BuildBandList; virtual; - procedure BuildItemLists; override; - function IsBandActuallyVisible(ABand: TcxGridBand): Boolean; virtual; - - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - property ItemPlaceController: TdxGridBandedTableViewItemPlaceController read GetItemPlaceController; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Adapter: TdxGridBandedTableViewAdapter; reintroduce; overload; - function Builder: TdxGridBandedTableViewBuilder; reintroduce; overload; - - { Bands } - procedure DoInitializeBandItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeBandRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeBandItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - function GetBandItemBounds(AnIndex: Integer): TRect; virtual; - function GetBandItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetBandItemViewParams(ABand: TcxGridBand): TdxReportItemViewParams; virtual; - - property BandCount: Integer read GetBandCount; - property Bands[Index: Integer]: TcxGridBand read GetBand; - property Columns[Index: Integer]: TcxGridBandedColumn read GetColumn; - property ShowBandHeaders: Boolean read GetShowBandHeaders; - end; - - TdxGridBandedTableViewBuilder = class(TdxGridTableViewBuilder) - protected - procedure DoBuildViewBody; override; - - procedure CreateBands; virtual; - function GetBandsProducer: TdxGridTableViewBandsProducer; virtual; - function GetBandsProducerClass: TdxGridTableViewBandsProducerClass; virtual; - - function GridView: TcxGridBandedTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - public - function Adapter: TdxGridBandedTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxGridBandedTableViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - end; - - { DBBandedTableView Adapter, Formatter and Builder } - - TdxGridDBBandedTableViewAdapter = class(TdxGridBandedTableViewAdapter) - private - FPrevAllRecordsAreLoaded: Boolean; - protected - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - function DataController: TcxGridDBDataController; reintroduce; overload; - - function DBDataModeController: TcxDBDataModeController; virtual; - procedure LoadAllRecords; virtual; - procedure UnloadAllRecords; virtual; - public - function GridView: TcxGridDBBandedTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - end; - - TdxGridDBBandedTableViewBuilder = class(TdxGridBandedTableViewBuilder) - public - function Adapter: TdxGridDBBandedTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - end; - - { CardView Adapter, Formatter and Builder } - - TdxReportCard = class; - - TdxReportCardRowClass = class of TdxReportCardRow; - - TdxReportCardRow = class(TdxReportCell) - private - function GetCard: TdxReportCard; - function GetGridCardRow: TcxGridCardViewRow; - function GetHasCaption: Boolean; - function GetHeight: Integer; - function GetProperties: TcxCustomEditProperties; - function GetRowCaption: TdxReportCellText; - function GetRowData: TAbstractdxReportCellData; - function GetWidth: Integer; - procedure SetHeight(Value: Integer); - procedure SetRowCaptionWidth(Value: Integer); - procedure SetWidth(Value: Integer); - protected - procedure AdjustCellSides; virtual; - procedure CreateItems(ABuilder: TdxGridCardViewBuilder); virtual; - function MeasureCaptionWidth(DC: HDC): Integer; - function MeasureDataWidth(DC: HDC): Integer; - property Properties: TcxCustomEditProperties read GetProperties; - public - constructor CreateEx(AParent: TdxReportCell; AGridCardRow: TcxGridCardViewRow); virtual; - - function MeasureHeight(DC: HDC; ACalculateLineHeight: Boolean; - ABuilder: TdxGridCardViewBuilder): Integer; reintroduce; overload; - - property Card: TdxReportCard read GetCard; - property GridCardRow: TcxGridCardViewRow read GetGridCardRow; - property HasCaption: Boolean read GetHasCaption; - property Height: Integer read GetHeight write SetHeight; - property RowCaption: TdxReportCellText read GetRowCaption; - property RowCaptionWidth: Integer write SetRowCaptionWidth; - property RowData: TAbstractdxReportCellData read GetRowData; - property Width: Integer read GetWidth write SetWidth; - end; - - TdxCardBorderPainter = class(TdxPSCellBorderPainter) - protected - procedure DrawShadow(DC: HDC); virtual; - public - procedure Paint(DC: HDC); override; - function Card: TdxReportCard; reintroduce; overload; - end; - - TdxGridCardShadowDepth = 0..15; - TdxGridCardShadowPosition = (cspTopLeft, cspTopRight, cspBottomRight, cspBottomLeft); - - TdxReportCard = class(TdxReportCell) - private - FRowCaptionWidth: Integer; - FShadowColor: TColor; - FShadowDepth: Integer; - FShadowPosition: TdxGridCardShadowPosition; - function GetGridCard: TcxGridCard; - function GetHasShadow: Boolean; - function GetHeight: Integer; - function GetReportLink: TdxGridReportLink; - function GetRow(Index: Integer): TdxReportCardRow; - function GetRowByCardRow(CardRow: TcxGridCardViewRow): TdxReportCardRow; - function GetRowCount: Integer; - function GetRowHeight(Index: Integer): Integer; - function GetRowsAvailableHeight: Integer; - function GetRowsAvailableWidth: Integer; - function GetRowsOriginLeft: Integer; - function GetRowsOriginTop: Integer; - function GetShadowRectHorz: TRect; - function GetShadowRectVert: TRect; - function GetWidth: Integer; - procedure SetHeight(Value: Integer); - procedure SetRowCaptionWidth(Value: Integer); - procedure SetRowHeight(Index, Value: Integer); - procedure SetShadowDepth2(Value: Integer); - procedure SetWidth(Value: Integer); - protected - procedure AddVerticalDelimiters; virtual; - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - procedure CreateRows(ABuilder: TdxGridCardViewBuilder); virtual; - function GetBorderPainterClass: TdxPSCellBorderPainterClass; override; - procedure ReadProperties(AReader: TdxPSDataReader); override; - procedure WriteProperties(AWriter: TdxPSDataWriter); override; - - procedure AdjustHeight; - procedure AdjustRowsCellSides; - procedure AdjustRowsPos; - procedure AdjustRowsHeight(DC: HDC; AAutoHeight: Boolean; ABuilder: TdxGridCardViewBuilder); - procedure AdjustRowsWidth(DC: HDC); - function MeasureCaptionWidth(DC: HDC): Integer; virtual; - function MeasureDataWidth(DC: HDC): Integer; virtual; - - property ReportLink: TdxGridReportLink read GetReportLink; - public - constructor Create(AParent: TdxReportCell); override; - constructor CreateEx(AParent: TdxReportCell; AGridCard: TcxGridCard); virtual; - - function GetBorderOuterBounds(DC: HDC): TRect; override; - function IndexOfCardRow(ACardRow: TcxGridCardViewRow): Integer; - - property GridCard: TcxGridCard read GetGridCard; - property HasShadow: Boolean read GetHasShadow; - property Height: Integer read GetHeight write SetHeight; - property RowCaptionWidth: Integer read FRowCaptionWidth write SetRowCaptionWidth; - property RowCount: Integer read GetRowCount; - property RowHeights[Index: Integer]: Integer read GetRowHeight write SetRowHeight; - property Rows[Index: Integer]: TdxReportCardRow read GetRow; - property RowsAvailableHeight: Integer read GetRowsAvailableHeight; - property RowsAvailableWidth: Integer read GetRowsAvailableWidth; - property RowsByCardRow[CardRow: TcxGridCardViewRow]: TdxReportCardRow read GetRowByCardRow; - property RowsOriginLeft: Integer read GetRowsOriginLeft; - property RowsOriginTop: Integer read GetRowsOriginTop; - property ShadowColor: TColor read FShadowColor write FShadowColor default clBlack; - property ShadowDepth: Integer read FShadowDepth write SetShadowDepth2 default dxDefaultCardsShadowDepth; - property ShadowRectHorz: TRect read GetShadowRectHorz; - property ShadowRectVert: TRect read GetShadowRectVert; - property ShadowPosition: TdxGridCardShadowPosition read FShadowPosition write FShadowPosition default cspBottomRight; - property Width: Integer read GetWidth write SetWidth; - end; - - TdxReportCardClass = class of TdxReportCard; - - TdxGridCardViewAdapter = class(TdxCustomGridTableViewAdapter) - private - function GetCaptionSeparator: string; - function GetCard(Index: Integer): TcxGridCard; - function GetCardCaptionWidth: Integer; - function GetCardCount: Integer; - function GetCardRow(Index: Integer): TcxGridCardViewRow; - function GetCardRowCount: Integer; - function GetCardSeparatorColor: Integer; - function GetCardSeparatorThickness: Integer; - function GetCardWidth: Integer; - function GetHasCardsSeparator: Boolean; - function GetRowAutoHeight: Boolean; - function GetRowCaptionAutoHeight: Boolean; - function GetRowCaptionEndEllipsis: Boolean; - function GetShowRowCaption(Index: Integer): Boolean; - protected - function GetAreAllMasterRowsCollapsed: Boolean; override; - - function GetCaptionRowViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; virtual; - function GetCardViewParams(ARecord: TcxCustomGridRecord): TcxViewParams; virtual; - function GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; override; - function GetRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; virtual; - public - function GridView: TcxGridCardView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxGridCardViewStyles; reintroduce; overload; - - procedure GetVisibleCardRows(ACard: TcxGridCard; AList: TList); - procedure ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; ARecursive: Boolean); override; - function IsFirstRow(ACardRow: TcxGridCardViewRow): Boolean; - function IsLastRow(ACardRow: TcxGridCardViewRow): Boolean; - - property CaptionSeparator: string read GetCaptionSeparator; - property CardCaptionWidth: Integer read GetCardCaptionWidth; - property CardCount: Integer read GetCardCount; - property CardRowCount: Integer read GetCardRowCount; - property CardRows[Index: Integer]: TcxGridCardViewRow read GetCardRow; - property Cards[Index: Integer]: TcxGridCard read GetCard; - property CardSeparatorColor: Integer read GetCardSeparatorColor; - property CardSeparatorThickness: Integer read GetCardSeparatorThickness; - property CardWidth: Integer read GetCardWidth; - property HasCardsSeparator: Boolean read GetHasCardsSeparator; - property RowCaptionAutoHeight: Boolean read GetRowCaptionAutoHeight; - property RowCaptionEndEllipsis: Boolean read GetRowCaptionEndEllipsis; - property RowAutoHeight: Boolean read GetRowAutoHeight; - property ShowRowCaption[Index: Integer]: Boolean read GetShowRowCaption; - end; - - TdxGridCardViewFormatter = class(TdxCustomGridTableViewFormatter) - private - function GetAutoWidth: Boolean; - function GetCaptionAutoWidth: Boolean; - function GetCard(Index: Integer): TcxGridCard; - function GetCardCount: Integer; - function GetCardsAreaWidth: Integer; - function GetInterCardsSpaceHorz: Integer; - function GetInterCardsSpaceVert: Integer; - function GetKeepSameHeight: Boolean; - function GetKeepSameWidth: Boolean; - function GetRowAutoHeight: Boolean; - protected - procedure AddHorizontalDelimiters; override; - procedure AddVerticalDelimiters; override; - function GetViewWidth: Integer; override; - - function GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; override; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - function NeedDelimitByRows: Boolean; virtual; - public - function Adapter: TdxGridCardViewAdapter; reintroduce; overload; - function Builder: TdxGridCardViewBuilder; reintroduce; overload; - - { Cards } - procedure DoInitializeCard(ACard: TdxReportCard; AGridCard: TcxGridCard); virtual; - procedure DoInitializeCardsRow(ACard: TdxReportCell); virtual; - function GetCardClass(AGridCard: TcxGridCard): TdxReportCardClass; virtual; - function GetCardViewParams(ARecord: TcxCustomGridRecord): TdxReportItemViewParams; virtual; - - { Cards Caption } - procedure DoInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); virtual; - procedure DoReportLinkInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); virtual; - function GetCardRowCaptionClass(ACardRow: TcxGridCardViewRow): TdxReportCellTextClass; virtual; - function GetCardRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TdxReportItemViewParams; virtual; - - { Cards Data } - procedure DoReportLinkInitializeCardRowData(AnItem: TAbstractdxReportCellData; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); virtual; - function GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; override; - - property AutoWidth: Boolean read GetAutoWidth; - property CaptionAutoWidth: Boolean read GetCaptionAutoWidth; - property CardCount: Integer read GetCardCount; - property Cards[Index: Integer]: TcxGridCard read GetCard; - property CardsAreaWidth: Integer read GetCardsAreaWidth; - property InterCardsSpaceHorz: Integer read GetInterCardsSpaceHorz; - property InterCardsSpaceVert: Integer read GetInterCardsSpaceVert; - property KeepSameHeight: Boolean read GetKeepSameHeight; - property KeepSameWidth: Boolean read GetKeepSameWidth; - property RowAutoHeight: Boolean read GetRowAutoHeight; - end; - - TdxGridCardViewBuilder = class(TdxCustomGridTableViewBuilder) - private - FCards: TList; - FMaxCardWidth: Integer; - function GetCard(Index: Integer): TdxReportCard; - function GetCardCount: Integer; - - procedure AdjustCardRowsCellSides; - procedure CreateCards; - procedure ResizeCards; - protected - procedure DoBuildViewBody; override; - - function GetCardsRowProducer: TdxGridCardViewCardsRowProducer; virtual; - function GetCardsRowProducerClass: TdxGridCardViewCardsRowProducerClass; virtual; - procedure PlaceCards; virtual; - - function GridView: TcxGridCardView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - - property CardCount: Integer read GetCardCount; - property Cards[Index: Integer]: TdxReportCard read GetCard; - public - constructor Create(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); override; - destructor Destroy; override; - - function Adapter: TdxGridCardViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxGridCardViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - - property MaxCardWidth: Integer read FMaxCardWidth; - end; - - { DBCardView Adapter, Formatter and Builder } - - TdxGridDBCardViewAdapter = class(TdxGridCardViewAdapter) - private - FPrevAllRecordsAreLoaded: Boolean; - protected - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - function DataController: TcxGridDBDataController; reintroduce; overload; - - function DBDataModeController: TcxDBDataModeController; virtual; - procedure LoadAllRecords; virtual; - procedure UnloadAllRecords; virtual; - public - function GridView: TcxGridDBCardView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - end; - - TdxGridDBCardViewBuilder = class(TdxGridCardViewBuilder) - public - function Adapter: TdxGridDBCardViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - end; - - { Producers } - - TdxGridViewRowProducer = class - private - FBuilder: TdxCustomGridViewBuilder; - FHost: TdxReportCell; - FMasterIndents: TList; - FRow: TdxReportCell; - FRowHeight: Integer; - function GetDC: HDC; - function GetHostClass: TdxReportCellClass; - function GetIndentWidth: Integer; - function GetMasterBuilder(Index: Integer): TdxCustomGridViewBuilder; - function GetMasterIndent(Index: Integer): TdxReportCellBox; - function GetMasterIndentCount: Integer; - function GetRowHostClass: TdxReportCellClass; - function GetRowOriginX: Integer; - function GetRowWidth: Integer; - protected - procedure AddLeadingMasterIndentsAndSeparators; virtual; - procedure AddMasterIndents(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; ALevel: Integer; var ALeftPos: Integer); - procedure AddMasterSeparator(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; var ALeftPos: Integer; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); - procedure AddTrailingMasterSeparators; virtual; - function CalculateItemHeight(DC: HDC; AnItem: TdxReportVisualItem): Integer; virtual; - procedure CalculateRowAutoHeight; virtual; - procedure CalculateRowHeight; virtual; - function CreateDetailsSeparator(AParent: TdxReportCell): TdxReportCellBox; virtual; - function CreateMasterIndent(AParent: TdxReportCell): TdxReportCellExpandButton; virtual; - procedure CreateRow; virtual; - procedure CreateRowHost(const AHostInfo: TdxGridAttributeHostInfo); virtual; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; virtual; - function GetDetailsSeparatorClass: TdxReportCellBoxClass; virtual; - function GetMasterIndentClass: TdxReportCellExpandButtonClass; virtual; - procedure FixupMasterIndentsHeight; virtual; - procedure FixupRowDataItemHeight(AnItem: TdxReportVisualItem); virtual; - procedure FixupRowDataHeight; virtual; - procedure FixupRowHeight; virtual; - procedure FixupRowOwnHeight; virtual; - procedure InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - procedure InitializeMasterIndent(AFormatter: TdxCustomGridViewFormatter; - AIndent: TdxReportCellExpandButton; AIndex, ALevel: Integer); virtual; - procedure InitializeHost; virtual; - procedure InitializeRow; virtual; - - function GetAutoHeight: Boolean; virtual; - function GetItemsSite: TdxReportCell; virtual; - function GetLineCount: Integer; virtual; - function GetLineHeight: Integer; virtual; - function GetWidth: Integer; virtual; - - property DC: HDC read GetDC; - property HostClass: TdxReportCellClass read GetHostClass; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); virtual; - destructor Destroy; override; - - function Adapter: TdxCustomGridViewAdapter; overload; virtual; - function Builder: TdxCustomGridViewBuilder; overload; virtual; - function Formatter: TdxCustomGridViewFormatter; overload; virtual; - - function Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; virtual; - - property AutoHeight: Boolean read GetAutoHeight; - property Host: TdxReportCell read FHost; - property IndentWidth: Integer read GetIndentWidth; - property ItemsSite: TdxReportCell read GetItemsSite; - property LineCount: Integer read GetLineCount; - property LineHeight: Integer read GetLineHeight; - property MasterBuilders[Index: Integer]: TdxCustomGridViewBuilder read GetMasterBuilder; - property MasterIndentCount: Integer read GetMasterIndentCount; - property MasterIndents[Index: Integer]: TdxReportCellBox read GetMasterIndent; - property Row: TdxReportCell read FRow; - property RowHeight: Integer read FRowHeight write FRowHeight; - property RowOriginX: Integer read GetRowOriginX; - property RowWidth: Integer read GetRowWidth; - property Width: Integer read GetWidth; - end; - - TdxGridViewCustomRowProducer = class(TdxGridViewRowProducer) - private - FItem: TAbstractdxReportCellData; - protected - procedure AddItem; virtual; - function CreateItem(AParent: TdxReportCell): TAbstractdxReportCellData; virtual; - procedure FixupRowDataHeight; override; - procedure InitializeItem; virtual; - - function GetAutoHeight: Boolean; override; - function GetItemClass: TdxReportCellDataClass; virtual; - - property Item: TAbstractdxReportCellData read FItem; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; override; - end; - - TdxGridViewCaptionProducer = class(TdxGridViewCustomRowProducer) - private - function GetItem: TdxReportCellText; - protected - procedure InitializeItem; override; - procedure InitializeRow; override; - - function GetItemClass: TdxReportCellDataClass; override; - function GetLineHeight: Integer; override; - public - property Item: TdxReportCellText read GetItem; - end; - - TdxGridViewFilterBarProducer = class(TdxGridViewCustomRowProducer) - private - function GetItem: TdxReportCellText; - protected - procedure InitializeItem; override; - procedure InitializeRow; override; - - function GetItemClass: TdxReportCellDataClass; override; - function GetLineHeight: Integer; override; - public - property Item: TdxReportCellText read GetItem; - end; - - TdxGridViewDetailsSeparatorProducer = class(TdxGridViewCustomRowProducer) - private - function GetItem: TdxReportCellBox; - protected - procedure InitializeItem; override; - procedure InitializeRow; override; - - function GetItemClass: TdxReportCellDataClass; override; - function GetLineHeight: Integer; override; - public - property Item: TdxReportCellBox read GetItem; - end; - - TdxGridViewDetailsTopSeparatorProducer = class(TdxGridViewDetailsSeparatorProducer) - protected - procedure InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); override; - end; - - TdxGridViewDetailsBottomSeparatorProducer = class(TdxGridViewDetailsSeparatorProducer) - protected - procedure InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); override; - end; - - TdxGridViewTerminatorProducer = class(TdxGridViewDetailsSeparatorProducer) - protected - procedure InitializeItem; override; - function GetLineHeight: Integer; override; - end; - - TdxGridTableViewRowProducer = class(TdxGridViewRowProducer) - public - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - function Builder: TdxGridTableViewBuilder; reintroduce; overload; - function Formatter: TdxGridTableViewFormatter; reintroduce; overload; - end; - - TdxGridTableViewRowSubItemsProducer = class(TdxGridTableViewRowProducer) - private - FIndents: TList; - FSubItems: TList; - function GetColumn(Index: Integer): TcxGridColumn; - function GetIndent(Index: Integer): TdxReportCellExpandButton; - function GetSubItem(Index: Integer): TdxReportVisualItem; - protected - procedure AddIndents(AParent: TdxReportCell); virtual; - procedure AddSubItems(AParent: TdxReportCell); virtual; - procedure CreateRow; override; - function CreateSubItem(AnIndex: Integer; AParent: TdxReportCell): TAbstractdxReportCellData; - function IsItemIndent(AnItem: TdxReportVisualItem): Boolean; - - procedure FixupIndentsHeight; virtual; - procedure FixupRowDataHeight; override; - procedure FixupRowHeight; override; - - procedure InitializeIndentList; virtual; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); virtual; - procedure InitializeSubItemList; virtual; - - function GetHasSubItem(Index: Integer): Boolean; virtual; - function GetIndentCount: Integer; virtual; - function GetSubItemBound(Index: Integer): TRect; virtual; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; virtual; abstract; - function GetSubItemCount: Integer; virtual; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; override; - - property Columns[Index: Integer]: TcxGridColumn read GetColumn; - property HasSubItem[Index: Integer]: Boolean read GetHasSubItem; - property IndentCount: Integer read GetIndentCount; - property Indents[Index: Integer]: TdxReportCellExpandButton read GetIndent; - property SubItemBounds[Index: Integer]: TRect read GetSubItemBound; - property SubItemClasses[Index: Integer]: TdxReportCellDataClass read GetSubItemClass; - property SubItemCount: Integer read GetSubItemCount; - property SubItems[Index: Integer]: TdxReportVisualItem read GetSubItem; default; - end; - - TdxGridTableViewHeadersProducer = class(TdxGridTableViewRowSubItemsProducer) - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - end; - - TdxGridTableViewFootersProducer = class(TdxGridTableViewRowSubItemsProducer) - protected - procedure CalculateRowAutoHeight; override; - procedure CalculateRowHeight; override; - procedure FixupRowDataItemHeight(AnItem: TdxReportVisualItem); override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetHasSubItem(Index: Integer): Boolean; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - end; - - TdxGridTableViewCustomDataRowProducer = class(TdxGridTableViewRowSubItemsProducer) - private - FGridRow: TcxCustomGridRow; - FGridRowIndex: Integer; - function GetIndentArea: Integer; - function GetIndentBounds(Index: Integer): TRect; - protected - procedure AddIndents(AParent: TdxReportCell); override; - function CreateIndent(AnIndex: Integer; AParent: TdxReportCell): TdxReportCellExpandButton; virtual; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); virtual; - - function GetIndentCount: Integer; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - public - function GridRow: TcxCustomGridRow; overload; virtual; - function Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AGridRowIndex: Integer): TdxReportCell; reintroduce; virtual; - - property GridRowIndex: Integer read FGridRowIndex; - property IndentArea: Integer read GetIndentArea; - property IndentBounds[Index: Integer]: TRect read GetIndentBounds; - end; - - TdxCustomGridTableViewRowSeparatorProducer = class(TdxGridTableViewCustomDataRowProducer) - protected - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetSubItemCount: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow): TdxReportCell; reintroduce; virtual; - end; - - TdxGridTableViewRowSeparatorProducer = class(TdxCustomGridTableViewRowSeparatorProducer) - private - FIsLast: Boolean; - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetIndentCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo; AGridRow: TcxCustomGridRow; - AnIsLast: Boolean): TdxReportCell; reintroduce; virtual; - property IsLast: Boolean read FIsLast; - end; - - TdxGridTableViewGroupRowSeparatorProducer = class(TdxCustomGridTableViewRowSeparatorProducer) - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - function GetLineHeight: Integer; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - end; - - TdxGridTableViewDataRowProducer = class(TdxGridTableViewCustomDataRowProducer) - private - FPreviewItem: TdxReportVisualItem;//TAbstractdxReportCellData; - function GetPreviewColumn: TcxGridColumn; - function GetPreviewPlace: TcxGridPreviewPlace; - protected - procedure AddPreview(AParent: TdxReportCell); virtual; - procedure AddSubItems(AParent: TdxReportCell); override; - procedure CalculateRowAutoHeight; override; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; override; - function CreatePreview(AParent: TdxReportCell): TdxReportVisualItem; virtual; - function GetPreviewClass: TdxReportCellDataClass; virtual; - procedure FixupRowDataHeight; override; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetCellAutoHeight: Boolean; virtual; - function GetHasPreview: Boolean; virtual; - function GetIndentCount: Integer; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetPreviewHeight: Integer; virtual; - function GetPreviewLineCount: Integer; virtual; - function GetPreviewLineHeight: Integer; virtual; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - public - function GridRow: TcxGridDataRow; reintroduce; overload; - - property CellAutoHeight: Boolean read GetCellAutoHeight; - property HasPreview: Boolean read GetHasPreview; - property PreviewColumn: TcxGridColumn read GetPreviewColumn; - property PreviewHeight: Integer read GetPreviewHeight; - property PreviewItem: TdxReportVisualItem read FPreviewItem;//TAbstractdxReportCellData read FPreviewItem; - property PreviewLineCount: Integer read GetPreviewLineCount; - property PreviewLineHeight: Integer read GetPreviewLineHeight; - property PreviewPlace: TcxGridPreviewPlace read GetPreviewPlace; - end; - - TdxGridTableViewGroupRowProducer = class(TdxGridTableViewCustomDataRowProducer) - protected - procedure InitializeRow; override; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetIndentCount: Integer; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - function GetSubItemCount: Integer; override; - public - function GridRow: TcxGridGroupRow; reintroduce; overload; - end; - - TdxGridTableViewMasterRowProducer = class(TdxGridTableViewDataRowProducer) - protected - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetIndentCount: Integer; override; - public - function GridRow: TcxGridMasterDataRow; reintroduce; overload; - end; - - TdxGridTableViewGroupFooterProducer = class(TdxGridTableViewCustomDataRowProducer) - private - FGroupLevel: Integer; - FIndex: Integer; - FItemsSite: TdxReportCell; - function GetGroupLevel: Integer; - function GetHostBounds: TRect; - protected - procedure AddSubItems(AParent: TdxReportCell); override; - procedure CalculateRowAutoHeight; override; - procedure FixupRowDataItemHeight(AnItem: TdxReportVisualItem); override; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetHasSubItem(Index: Integer): Boolean; override; - function GetIndentCount: Integer; override; - function GetItemsSite: TdxReportCell; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo; AGridRow: TcxCustomGridRow; - AGroupLevel, AnIndex: Integer): TdxReportCell; reintroduce; virtual; - - property GroupLevel: Integer read GetGroupLevel; - property HostBounds: TRect read GetHostBounds; - property Index: Integer read FIndex; - end; - - TdxGridTableViewBandsProducer = class(TdxGridTableViewRowSubItemsProducer) - protected - procedure CalculateRowHeight; override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - function GetSubItemCount: Integer; override; - public - function Adapter: TdxGridBandedTableViewAdapter; reintroduce; overload; - function Builder: TdxGridBandedTableViewBuilder; reintroduce; overload; - function Formatter: TdxGridBandedTableViewFormatter; reintroduce; overload; - end; - - TdxGridCardViewCardsRowProducer = class(TdxGridViewRowProducer) - protected - procedure CalculateRowHeight; override; - function GetAutoHeight: Boolean; override; - procedure InitializeRow; override; - public - function Adapter: TdxGridCardViewAdapter; reintroduce; overload; - function Builder: TdxGridCardViewBuilder; reintroduce; overload; - function Formatter: TdxGridCardViewFormatter; reintroduce; overload; - - function CreateCard(AParent: TdxReportCell; AGridCard: TcxGridCard): TdxReportCard; virtual; - procedure InjectCard(ACard: TdxReportCard; AIndex: Integer); virtual; - function Produce(AHostInfo: TdxGridAttributeHostInfo; - ARowHeight: Integer): TdxReportCell; reintroduce; virtual; - end; - - { Options } - - TdxGridReportLinkOptionsClass = class of TdxGridReportLinkOptions; - - TdxGridReportLinkOptions = class(TdxCustomReportLinkOptions) - private - function GetReportLink: TdxGridReportLink; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsCards = class; - - TdxGridReportLinkCardsShadowClass = class of TdxGridReportLinkCardsShadow; - - TdxGridReportLinkCardsShadow = class(TPersistent) - private - FColor: TColor; - FDepth: TdxGridCardShadowDepth; - FOptionsCards: TdxGridReportLinkOptionsCards; - FPosition: TdxGridCardShadowPosition; - function GetActualColor: TColor; - function GetVisible: Boolean; - procedure SetColor(Value: TColor); - procedure SetDepth(Value: TdxGridCardShadowDepth); - procedure SetPosition(Value: TdxGridCardShadowPosition); - protected - procedure Changed; dynamic; - public - constructor Create(AnOptionsCards: TdxGridReportLinkOptionsCards); virtual; - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; virtual; - - property ActualColor: TColor read GetActualColor; - property OptionsCards: TdxGridReportLinkOptionsCards read FOptionsCards; - property Visible: Boolean read GetVisible; - published - property Color: TColor read FColor write SetColor default clDefault; - property Depth: TdxGridCardShadowDepth read FDepth write SetDepth default dxDefaultCardsShadowDepth; - property Position: TdxGridCardShadowPosition read FPosition write SetPosition default cspBottomRight; - end; - - TdxGridReportLinkOptionsCardsClass = class of TdxGridReportLinkOptionsCards; - - TdxGridReportLinkOptionsCards = class(TdxGridReportLinkOptions) - private - FAutoWidth: Boolean; - FBorders: Boolean; - FInterCardsSpaceHorz: Integer; - FInterCardsSpaceVert: Integer; - FKeepSameHeight: Boolean; - FKeepSameWidth: Boolean; - FRowBordersHorz: Boolean; - FRowBordersVert: Boolean; - FShadow: TdxGridReportLinkCardsShadow; - function GetShadow: TdxGridReportLinkCardsShadow; - procedure SetAutoWidth(Value: Boolean); - procedure SetBorders(Value: Boolean); - procedure SetInterCardsSpaceHorz(Value: Integer); - procedure SetInterCardsSpaceVert(Value: Integer); - procedure SetKeepSameHeight(Value: Boolean); - procedure SetKeepSameWidth(Value: Boolean); - procedure SetRowBordersHorz(Value: Boolean); - procedure SetRowBordersVert(Value: Boolean); - procedure SetShadow(Value: TdxGridReportLinkCardsShadow); - protected - function DesignerTabIndex: Integer; override; - function GetShadowClass: TdxGridReportLinkCardsShadowClass; virtual; - public - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property AutoWidth: Boolean read FAutoWidth write SetAutoWidth default False; - property Borders: Boolean read FBorders write SetBorders default True; - property InterCardsSpaceHorz: Integer read FInterCardsSpaceHorz write SetInterCardsSpaceHorz default 4; - property InterCardsSpaceVert: Integer read FInterCardsSpaceVert write SetInterCardsSpaceVert default 4; - property KeepSameHeight: Boolean read FKeepSameHeight write SetKeepSameHeight default True; - property KeepSameWidth: Boolean read FKeepSameWidth write SetKeepSameWidth default True; - property RowBordersHorz: Boolean read FRowBordersHorz write SetRowBordersHorz default False; - property RowBordersVert: Boolean read FRowBordersVert write SetRowBordersVert default False; - property Shadow: TdxGridReportLinkCardsShadow read GetShadow write SetShadow; - end; - - TdxGridReportLinkOptionsDetailsClass = class of TdxGridReportLinkOptionsDetails; - - TdxGridReportLinkOptionsDetails = class(TdxGridReportLinkOptions) - private - FOnlyFocusedView: Boolean; - FStartFromFocusedView: Boolean; - procedure SetOnlyFocusedView(Value: Boolean); - procedure SetStartFromFocusedView(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property OnlyFocusedView: Boolean read FOnlyFocusedView write SetOnlyFocusedView default False; - property StartFromFocusedView: Boolean read FStartFromFocusedView write SetStartFromFocusedView default False; - end; - - TdxGridReportLinkOptionsExpanding = class(TdxCustomReportLinkOptionsExpanding) - private - FExpandGroupRows: Boolean; - FExpandMasterRows: Boolean; - function GetHasAny: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetExpandGroupRows(Value: Boolean); - procedure SetExpandMasterRows(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - property HasAny: Boolean read GetHasAny; - property ReportLink: TdxGridReportLink read GetReportLink; - published - property ExpandGroupRows: Boolean read FExpandGroupRows write SetExpandGroupRows default False; - property ExpandMasterRows: Boolean read FExpandMasterRows write SetExpandMasterRows default False; - end; - - TdxGridReportLinkOptionsFormatting = class(TdxCustomReportLinkOptionsFormatting) - private - FConsumeSelectionStyle: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetConsumeSelectionStyle(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TdxGridReportLink read GetReportLink; - published - property ConsumeSelectionStyle: Boolean read FConsumeSelectionStyle write SetConsumeSelectionStyle default False; - property UseLookAndFeelColors; - end; - - TdxGridReportLinkOptionsLevelsClass = class of TdxGridReportLinkOptionsLevels; - - TdxGridReportLinkOptionsLevels = class(TdxGridReportLinkOptions) - private - FRiseActiveLevelOntoTop: Boolean; - FUnwrap: Boolean; - FUnwrapTopLevel: Boolean; - procedure SetRiseActiveLevelOntoTop(Value: Boolean); - procedure SetUnwrap(Value: Boolean); - procedure SetUnwrapTopLevel(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property RiseActiveLevelOntoTop: Boolean read FRiseActiveLevelOntoTop write SetRiseActiveLevelOntoTop default True; - property Unwrap: Boolean read FUnwrap write SetUnwrap default False; - property UnwrapTopLevel: Boolean read FUnwrapTopLevel write SetUnwrapTopLevel default True; - end; - - TdxGridReportLinkOptionsOnEveryPage = class(TdxCustomTableControlReportLinkOptionsOnEveryPage) - private - FCaption: Boolean; - FFilterBar: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetCaption(Value: Boolean); - procedure SetFilterBar(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; virtual; - procedure SetAll; virtual; - procedure UnsetAll; virtual; - - property ReportLink: TdxGridReportLink read GetReportLink; - published - property BandHeaders; - property Caption: Boolean read FCaption write SetCaption default True; - property FilterBar: Boolean read FFilterBar write SetFilterBar default True; - property Footers; - property Headers; - end; - - TdxGridReportLinkOptionsPagination = class(TdxCustomTableControlReportLinkOptionsPagination) - private - FOneGroupPerPage: Boolean; - FTopLevelGroup: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetOneGroupPerPage(Value: Boolean); - procedure SetTopLevelGroup(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TdxGridReportLink read GetReportLink; - published - property Band; - property Column; - property Custom; - property OneGroupPerPage: Boolean read FOneGroupPerPage write SetOneGroupPerPage default False; - property Row; - property TopLevelGroup: Boolean read FTopLevelGroup write SetTopLevelGroup default False; - end; - - TdxGridReportLinkOptionsPreview = class(TdxCustomTableControlReportLinkOptionsPreview) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsRefinements = class(TdxCustomReportLinkOptionsRefinements) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsSelection = class(TdxCustomTableControlReportLinkOptionsSelection) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsSize = class(TdxCustomReportLinkOptionsSize) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - published - property AutoWidth; - end; - - TdxGridReportLinkOptionsView = class(TdxCustomTableControlReportLinkOptionsView) - private - FCaption: Boolean; - FFilterBar: Boolean; - FGroupFooters: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetCaption(Value: Boolean); - procedure SetFilterBar(Value: Boolean); - procedure SetGroupFooters(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; virtual; - procedure SetAll; - procedure UnsetAll; - - property ReportLink: TdxGridReportLink read GetReportLink; - published - property BandHeaders; - property Caption: Boolean read FCaption write SetCaption default True; - property ExpandButtons; - property FilterBar: Boolean read FFilterBar write SetFilterBar default True; - property Footers; - property GroupFooters: Boolean read FGroupFooters write SetGroupFooters default True; - property Headers; - end; - - TdxGridAttributeHostInfo = class - private - FParent: TdxReportCell; - public - Origin: TPoint; - procedure Initialize(AParent: TdxReportCell); - property Parent: TdxReportCell read FParent; - end; - - TdxGridAttributeHostInfoServicesClass = class of TdxGridAttributeHostInfoServices; - - TdxGridAttributeHostInfoServices = class - private - FPageDetailsHostInfo: TdxGridAttributeHostInfo; - FPageFootersHostInfo: TdxGridAttributeHostInfo; - FPageHeadersHostInfo: TdxGridAttributeHostInfo; - FReportLink: TdxGridReportLink; - function GetActiveView: TcxCustomGridView; - function GetActiveViewHelper: TdxCustomGridViewHelperClass; - function GetArePageFootersAssigned: Boolean; - function GetArePageHeadersAssigned: Boolean; - function GetCanUseBandHeadersOnEveyPage: Boolean; - function GetCanUseCaptionOnEveryPage: Boolean; - function GetCanUseFilterBarOnEveryPage: Boolean; - function GetCanUseFootersOnEveryPage: Boolean; - function GetCanUseHeadersOnEveryPage: Boolean; - function GetIsInconsistentBandHeadersState: Boolean; - function GetIsInconsistentFilterBarState: Boolean; - function GetIsInconsistentFootersState: Boolean; - function GetIsInconsistentHeadersState: Boolean; - function GetLevelSeparatorBottomHostInfo: TdxGridAttributeHostInfo; - function GetLevelSeparatorTopHostInfo: TdxGridAttributeHostInfo; - function GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; - function GetOptionsView: TdxGridReportLinkOptionsView; - function GetPageDetails: TdxReportCell; - function GetPageFooters: TdxReportCell; - function GetPageHeaders: TdxReportCell; - protected - procedure CreateHostInfos; - procedure DestroyHostInfos; - - function GetBandHeadersHostInfo: TdxGridAttributeHostInfo; virtual; - function GetCaptionHostInfo: TdxGridAttributeHostInfo; virtual; - function GetFilterBarHostInfo: TdxGridAttributeHostInfo; virtual; - function GetFootersHostInfo: TdxGridAttributeHostInfo; virtual; - function GetHeadersHostInfo: TdxGridAttributeHostInfo; virtual; - function GetInconsistentStateText: string; virtual; - function GetIsInconsistentState: Boolean; virtual; - function HasCells: Boolean; - function IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; - - //function HasAttributeOnEveryPage: Boolean; - - property ActiveView: TcxCustomGridView read GetActiveView; - property ActiveViewHelper: TdxCustomGridViewHelperClass read GetActiveViewHelper; - property OptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage read GetOptionsOnEveryPage; - property OptionsView: TdxGridReportLinkOptionsView read GetOptionsView; - property PageDetails: TdxReportCell read GetPageDetails; - property PageFooters: TdxReportCell read GetPageFooters; - property PageHeaders: TdxReportCell read GetPageHeaders; - public - constructor Create(AReportLink: TdxGridReportLink); virtual; - destructor Destroy; override; - procedure Initialize; - - property ArePageFootersAssigned: Boolean read GetArePageFootersAssigned; - property ArePageHeadersAssigned: Boolean read GetArePageHeadersAssigned; - property BandHeadersHostInfo: TdxGridAttributeHostInfo read GetBandHeadersHostInfo; - property CanUseBandHeadersOnEveyPage: Boolean read GetCanUseBandHeadersOnEveyPage; - property CanUseCaptionOnEveryPage: Boolean read GetCanUseCaptionOnEveryPage; - property CanUseFilterBarOnEveryPage: Boolean read GetCanUseFilterBarOnEveryPage; - property CanUseFootersOnEveryPage: Boolean read GetCanUseFootersOnEveryPage; - property CanUseHeadersOnEveryPage: Boolean read GetCanUseHeadersOnEveryPage; - property CaptionHostInfo: TdxGridAttributeHostInfo read GetCaptionHostInfo; - property FilterBarHostInfo: TdxGridAttributeHostInfo read GetFilterBarHostInfo; - property FootersHostInfo: TdxGridAttributeHostInfo read GetFootersHostInfo; - property HeadersHostInfo: TdxGridAttributeHostInfo read GetHeadersHostInfo; - property InconsistentStateText: string read GetInconsistentStateText; - property IsInconsistentBandHeadersState: Boolean read GetIsInconsistentBandHeadersState; - property IsInconsistentFilterBarState: Boolean read GetIsInconsistentFilterBarState; - property IsInconsistentFootersState: Boolean read GetIsInconsistentFootersState; - property IsInconsistentHeadersState: Boolean read GetIsInconsistentHeadersState; - property IsInconsistentState: Boolean read GetIsInconsistentState; - property LevelSeparatorBottomHostInfo: TdxGridAttributeHostInfo read GetLevelSeparatorBottomHostInfo; - property LevelSeparatorTopHostInfo: TdxGridAttributeHostInfo read GetLevelSeparatorTopHostInfo; - property PageDetailsHostInfo: TdxGridAttributeHostInfo read FPageDetailsHostInfo; - property PageFootersHostInfo: TdxGridAttributeHostInfo read FPageFootersHostInfo; - property PageHeadersHostInfo: TdxGridAttributeHostInfo read FPageHeadersHostInfo; - property ReportLink: TdxGridReportLink read FReportLink; - end; - - TdxGridReportLinkStylesClass = class of TdxGridReportLinkStyles; - - TdxGridReportLinkStyles = class(TdxCustomReportLinkStyles) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - class function GetStyleCaption(AnIndex: Integer): string; override; - function GetStyleIndexByCaption(const Caption: string): Integer; override; - - function IsCardViewStyle(AStyle: TcxStyle): Boolean; - public - procedure Assign(Source: TPersistent); override; - - procedure GetBandHeaderParams(ABand: TcxGridBand; out AParams: TcxViewParams); virtual; - procedure GetCaptionParams(ATabLevel: TcxGridLevel; out AParams: TcxViewParams); virtual; - procedure GetCardCaptionRowParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetCardRowCaptionParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetFilterBarParams(out AParams: TcxViewParams); virtual; - procedure GetFooterParams(ARecord: TcxCustomGridRecord; AGroupLevel: Integer; - AItem: TcxGridColumn; out AParams: TcxViewParams); virtual; - procedure GetGroupParams(ARecord: TcxCustomGridRecord; AGroupLevel: Integer; - out AParams: TcxViewParams); virtual; - procedure GetHeaderParams(AItem: TcxGridColumn; out AParams: TcxViewParams); virtual; - procedure GetPreviewParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetSelectionParams(out AParams: TcxViewParams); virtual; - - property ReportLink: TdxGridReportLink read GetReportLink; - published - property BandHeader: TcxStyle Index vspsGridBandHeader read GetValue write SetValue; - property Caption: TcxStyle Index vspsGridCaption read GetValue write SetValue; - property CardCaptionRow: TcxStyle Index vspsGridCardCaptionRow read GetValue write SetValue; - property CardRowCaption: TcxStyle Index vspsGridCardRowCaption read GetValue write SetValue; - property Content: TcxStyle Index vspsGridContent read GetValue write SetValue; - property ContentEven: TcxStyle Index vspsGridContentEven read GetValue write SetValue; - property ContentOdd: TcxStyle Index vspsGridContentOdd read GetValue write SetValue; - property FilterBar: TcxStyle Index vspsGridFilterBar read GetValue write SetValue; - property Footer: TcxStyle Index vspsGridFooter read GetValue write SetValue; - property Group: TcxStyle Index vspsGridGroup read GetValue write SetValue; - property Header: TcxStyle Index vspsGridHeader read GetValue write SetValue; - property Preview: TcxStyle Index vspsGridPreview read GetValue write SetValue; - property Selection: TcxStyle Index vspsGridSelection read GetValue write SetValue; - property StyleSheet; - end; - - TdxGridReportLinkStyleSheet = class(TdxCustomReportLinkStyleSheet) - private - function GetStylesValue: TdxGridReportLinkStyles; - procedure SetStylesValue(Value: TdxGridReportLinkStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TdxGridReportLinkStyles read GetStylesValue write SetStylesValue; - end; - - TdxGridReportLinkProcessParams = record - HasMasterDetails: Boolean; - HasMasterDetailsInTopView: Boolean; - HasOnlyCards: Boolean; - HasUnwrapableData: Boolean; - CanUseOnEveryPageMode: Boolean; - end; - - TdxGridRecordArray = array of TcxCustomGridRecord; - - TdxGridViewProc = procedure(AGridView: TcxCustomGridView) of object; - - TdxGridGetCustomPageBreaksEvent = procedure(Sender: TdxGridReportLink) of object; - - TdxGridReportLinkGetCellHeightEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; var AHeight: Integer) of object; - - { CustomDraw Events } - - TdxGridReportLinkCustomDrawBandCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridBandedTableView; ABand: TcxGridBand; - AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawCardRowCaptionCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawCardRowDataCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TAbstractdxReportCellData; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawFilterBarEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxCustomGridTableView; AnItem: TdxReportCellString; - var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawFooterCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; ALevel: Integer; AnItem: TdxReportCellString; - var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawHeaderCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridTableView; AColumn: TcxGridColumn; - AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawLevelCaptionEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxCustomGridView; AnItem: TdxReportCellString; - var ADone: Boolean) of object; - - { Initializtion Events } - - TdxGridReportLinkInitializeBandCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridBandedTableView; ABand: TcxGridBand; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData) of object; - - TdxGridReportLinkInitializeCardRowCaptionCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeCardRowDataCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TAbstractdxReportCellData) of object; - - TdxGridReportLinkInitializeFilterBarEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridTableView; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeFooterCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; ALevel: Integer; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeHeaderCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridTableView; AColumn: TcxGridColumn; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeLevelCaptionEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridView; AnItem: TdxReportCellString) of object; - - { ReportLink } - - TdxGridReportLink = class(TdxCustomTableControlReportLink) - private - FDelimitersHardVert: TList; - FHostInfoServices: TdxGridAttributeHostInfoServices; - FOptionsCards: TdxGridReportLinkOptionsCards; - FOptionsDetails: TdxGridReportLinkOptionsDetails; - FOptionsLevels: TdxGridReportLinkOptionsLevels; - FProcessedView: TcxCustomGridView; - FProcessParams: TdxGridReportLinkProcessParams; - FReportRows: TList; - FOnCustomDrawBandCell: TdxGridReportLinkCustomDrawBandCellEvent; - FOnCustomDrawCardRowCaptionCell: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent; - FOnCustomDrawCardRowDataCell: TdxGridReportLinkCustomDrawCardRowDataCellEvent; - FOnCustomDrawCell: TdxGridReportLinkCustomDrawCellEvent; - FOnCustomDrawFilterBar: TdxGridReportLinkCustomDrawFilterBarEvent; - FOnCustomDrawFooterCell: TdxGridReportLinkCustomDrawFooterCellEvent; - FOnCustomDrawHeaderCell: TdxGridReportLinkCustomDrawHeaderCellEvent; - FOnCustomDrawLevelCaption: TdxGridReportLinkCustomDrawLevelCaptionEvent; - FOnGetCellHeight: TdxGridReportLinkGetCellHeightEvent; - FOnGetCustomPageBreaks: TdxGridGetCustomPageBreaksEvent; - FOnInitializeBandCell: TdxGridReportLinkInitializeBandCellEvent; - FOnInitializeCardRowCaptionCell: TdxGridReportLinkInitializeCardRowCaptionCellEvent; - FOnInitializeCardRowDataCell: TdxGridReportLinkInitializeCardRowDataCellEvent; - FOnInitializeCell: TdxGridReportLinkInitializeCellEvent; - FOnInitializeFilterBar: TdxGridReportLinkInitializeFilterBarEvent; - FOnInitializeFooterCell: TdxGridReportLinkInitializeFooterCellEvent; - FOnInitializeHeaderCell: TdxGridReportLinkInitializeHeaderCellEvent; - FOnInitializeLevelCaption: TdxGridReportLinkInitializeLevelCaptionEvent; - function GetActiveStyles: TdxGridReportLinkStyles; - function GetActiveView: TcxCustomGridView; - function GetActiveViewHelper: TdxCustomGridViewHelperClass; - function GetActiveViewMasterRow: TcxGridMasterDataRow; - function GetActiveViewParentLevel: TcxGridLevel; - function GetDesignWindow: TdxfmGridReportLinkDesignWindow; - function GetGrid: TcxGrid; - function GetOptionsExpanding: TdxGridReportLinkOptionsExpanding; - function GetOptionsFormatting: TdxGridReportLinkOptionsFormatting; - function GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; - function GetOptionsPagination: TdxGridReportLinkOptionsPagination; - function GetOptionsPreview: TdxGridReportLinkOptionsPreview; - function GetOptionsRefinements: TdxGridReportLinkOptionsRefinements; - function GetOptionsSelection: TdxGridReportLinkOptionsSelection; - function GetOptionsSize: TdxGridReportLinkOptionsSize; - function GetOptionsView: TdxGridReportLinkOptionsView; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowByGridRecord(GridRecord: TcxCustomGridRecord): TdxReportCell; - function GetReportRowCount: Integer; - function GetStyles: TdxGridReportLinkStyles; - procedure SetOnCustomDrawBandCell(Value: TdxGridReportLinkCustomDrawBandCellEvent); - procedure SetOnCustomDrawCell(Value: TdxGridReportLinkCustomDrawCellEvent); - procedure SetOnCustomDrawCardRowCaptionCell(Value: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent); - procedure SetOnCustomDrawCardRowDataCell(Value: TdxGridReportLinkCustomDrawCardRowDataCellEvent); - procedure SetOnCustomDrawFilterBar(Value: TdxGridReportLinkCustomDrawFilterBarEvent); - procedure SetOnCustomDrawFooterCell(Value: TdxGridReportLinkCustomDrawFooterCellEvent); - procedure SetOnCustomDrawHeaderCell(Value: TdxGridReportLinkCustomDrawHeaderCellEvent); - procedure SetOnCustomDrawLevelCaption(Value: TdxGridReportLinkCustomDrawLevelCaptionEvent); - procedure SetOptionsCards(Value: TdxGridReportLinkOptionsCards); - procedure SetOptionsDetails(Value: TdxGridReportLinkOptionsDetails); - procedure SetOptionsExpanding(Value: TdxGridReportLinkOptionsExpanding); - procedure SetOptionsFormatting(Value: TdxGridReportLinkOptionsFormatting); - procedure SetOptionsLevels(Value: TdxGridReportLinkOptionsLevels); - procedure SetOptionsOnEveryPage(Value: TdxGridReportLinkOptionsOnEveryPage); - procedure SetOptionsPagination(Value: TdxGridReportLinkOptionsPagination); - procedure SetOptionsPreview(Value: TdxGridReportLinkOptionsPreview); - procedure SetOptionsRefinements(Value: TdxGridReportLinkOptionsRefinements); - procedure SetOptionsSelection(Value: TdxGridReportLinkOptionsSelection); - procedure SetOptionsSize(Value: TdxGridReportLinkOptionsSize); - procedure SetOptionsView(Value: TdxGridReportLinkOptionsView); - procedure SetStyles(Value: TdxGridReportLinkStyles); - protected - procedure BeforeDesignReport; override; - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure ConvertCoords; override; - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - function GetBreakPagesByHardDelimiters: Boolean; override; - function GetEmptyPagesCanExist: Boolean; override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - function GetUseHardVertDelimiters: Boolean; override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - function IsDrawFootersOnEveryPage: Boolean; override; - function IsDrawHeadersOnEveryPage: Boolean; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - procedure MakeHardDelimiters(AReportCells: TdxReportCells; AVertDelimiters: TList); override; - - function GetAreNativeStylesAvailable: Boolean; override; - function GetStylesClass: TdxCustomReportLinkStylesClass; override; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; override; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; override; - procedure PrepareConstruct; override; - - procedure DoCustomDrawBandCell(ACanvas: TCanvas; AView: TcxGridBandedTableView; - ABand: TcxGridBand; AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawCardRowCaptionCell(ACanvas: TCanvas; AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TdxReportCellString; - var ADone: Boolean); dynamic; - procedure DoCustomDrawCardRowDataCell(ACanvas: TCanvas; AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TAbstractdxReportCellData; - var ADone: Boolean); dynamic; - procedure DoCustomDrawCell(ACanvas: TCanvas; AView: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; - AnItem: TAbstractdxReportCellData; var ADone: Boolean); dynamic; - procedure DoCustomDrawFilterBar(ACanvas: TCanvas; AView: TcxCustomGridTableView; - AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawFooterCell(ACanvas: TCanvas; AView: TcxGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; ALevel: Integer; - AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawHeaderCell(ACanvas: TCanvas; AView: TcxGridTableView; - AColumn: TcxGridColumn; AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawLevelCaption(ACanvas: TCanvas; AView: TcxCustomGridView; - AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoGetCellHeight(AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; var AHeight: Integer); dynamic; - procedure DoGetCustomPageBreaks; dynamic; - procedure DoInitializeBandCell(AView: TcxGridBandedTableView; ABand: TcxGridBand; - AnItem: TdxReportCellString); dynamic; - procedure DoInitializeCardRowCaptionCell(AView: TcxGridCardView; ACard: TcxGridCard; - ARow: TcxGridCardViewRow; AnItem: TdxReportCellString); dynamic; - procedure DoInitializeCardRowDataCell(AView: TcxGridCardView; ACard: TcxGridCard; - ARow: TcxGridCardViewRow; AnItem: TAbstractdxReportCellData); dynamic; - procedure DoInitializeCell(AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData); dynamic; - procedure DoInitializeFilterBar(AView: TcxCustomGridTableView; AnItem: TdxReportCellString); dynamic; - procedure DoInitializeFooterCell(AView: TcxGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; ALevel: Integer; AnItem: TdxReportCellString); dynamic; - procedure DoInitializeHeaderCell(AView: TcxGridTableView; AColumn: TcxGridColumn; - AnItem: TdxReportCellString); dynamic; - procedure DoInitializeLevelCaption(AView: TcxCustomGridView; AnItem: TdxReportCellString); dynamic; - - procedure CreateOptions; override; - procedure DestroyOptions; override; - function GetOptionsCardsClass: TdxGridReportLinkOptionsCardsClass; virtual; - function GetOptionsDetailsClass: TdxGridReportLinkOptionsDetailsClass; virtual; - function GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; override; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; override; - function GetOptionsLevelsClass: TdxGridReportLinkOptionsLevelsClass; virtual; - function GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; override; - function GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; override; - function GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; override; - function GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; override; - function GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; override; - function GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; override; - function GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; override; - - procedure AddReportRow(AReportRow: TdxReportCell); - procedure AddVerticalHardDelimiter(ADelimiter: TdxReportCell); overload; - procedure AddVerticalHardDelimiter(ADelimiter: Integer); overload; - procedure BuildTopLevelView(AGridView: TcxCustomGridView); - procedure BuildTopLevelViews; - procedure BuildView(AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); - function CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; - function CreateViewBuilder(AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; - - procedure DoExpandRows; - procedure DoExpandViewRows(AGridView: TcxCustomGridView); - procedure ForEachView(AMasterRow: TcxGridMasterDataRow; AProc: TdxGridViewProc); - - function GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; out ADrawInfo: TdxGridCellCustomDrawInfo): TdxGridAttributeID; virtual; - function HasSiblings(AGridView: TcxCustomGridView): Boolean; - function IsCardViewStyle(AStyle: TcxStyle): Boolean; virtual; - function IsCustomDrawn(AnAttributeID: TdxGridAttributeID): Boolean; virtual; - function IsOffice11StyleGrouping: Boolean; - - procedure CalculateProcessParams; - function CanAttributeBeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; - function IsAttributeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; - - property ActiveStyles: TdxGridReportLinkStyles read GetActiveStyles; - property ActiveView: TcxCustomGridView read GetActiveView; - property ActiveViewHelper: TdxCustomGridViewHelperClass read GetActiveViewHelper; - property ActiveViewMasterRow: TcxGridMasterDataRow read GetActiveViewMasterRow; - property ActiveViewParentLevel: TcxGridLevel read GetActiveViewParentLevel; - property DelimitersHardVert: TList read FDelimitersHardVert; - property HostInfoServices: TdxGridAttributeHostInfoServices read FHostInfoServices; - property ProcessParams: TdxGridReportLinkProcessParams read FProcessParams; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure AddPageBreak(AGridRecord: TcxCustomGridRecord); overload; - procedure AddPageBreak(const AGridRecords: array of TcxCustomGridRecord); overload; - procedure AddPageBreak(const AGridRecords: TdxGridRecordArray); overload; - procedure AddPageBreak(AGridRecords: TList); overload; // list of TcxCustomGridRecord - - property Grid: TcxGrid read GetGrid; - property DesignWindow: TdxfmGridReportLinkDesignWindow read GetDesignWindow; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property ReportRowsByGridRecord[GridRow: TcxCustomGridRecord]: TdxReportCell read GetReportRowByGridRecord; - property ReportRowCount: Integer read GetReportRowCount; - published - property Color; - property Font; - property OptionsCards: TdxGridReportLinkOptionsCards read FOptionsCards write SetOptionsCards; - property OptionsDetails: TdxGridReportLinkOptionsDetails read FOptionsDetails write SetOptionsDetails; - property OptionsExpanding: TdxGridReportLinkOptionsExpanding read GetOptionsExpanding write SetOptionsExpanding; - property OptionsFormatting: TdxGridReportLinkOptionsFormatting read GetOptionsFormatting write SetOptionsFormatting; - property OptionsLevels: TdxGridReportLinkOptionsLevels read FOptionsLevels Write SetOptionsLevels; - property OptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage read GetOptionsOnEveryPage write SetOptionsOnEveryPage; - property OptionsPagination: TdxGridReportLinkOptionsPagination read GetOptionsPagination write SetOptionsPagination; - property OptionsPreview: TdxGridReportLinkOptionsPreview read GetOptionsPreview write SetOptionsPreview; - property OptionsRefinements: TdxGridReportLinkOptionsRefinements read GetOptionsRefinements write SetOptionsRefinements; - property OptionsSelection: TdxGridReportLinkOptionsSelection read GetOptionsSelection write SetOptionsSelection; - property OptionsSize: TdxGridReportLinkOptionsSize read GetOptionsSize write SetOptionsSize; - property OptionsView: TdxGridReportLinkOptionsView read GetOptionsView write SetOptionsView; - property ScaleFonts; - property StyleRepository; - property Styles: TdxGridReportLinkStyles read GetStyles write SetStyles; - property SupportedCustomDraw; - - property OnCustomDrawBandCell: TdxGridReportLinkCustomDrawBandCellEvent read FOnCustomDrawBandCell - write SetOnCustomDrawBandCell; - property OnCustomDrawCell: TdxGridReportLinkCustomDrawCellEvent read FOnCustomDrawCell - write SetOnCustomDrawCell; - property OnCustomDrawCardRowCaptionCell: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent read FOnCustomDrawCardRowCaptionCell - write SetOnCustomDrawCardRowCaptionCell; - property OnCustomDrawCardRowDataCell: TdxGridReportLinkCustomDrawCardRowDataCellEvent read FOnCustomDrawCardRowDataCell - write SetOnCustomDrawCardRowDataCell; - property OnCustomDrawFilterBar: TdxGridReportLinkCustomDrawFilterBarEvent read FOnCustomDrawFilterBar - write SetOnCustomDrawFilterBar; - property OnCustomDrawFooterCell: TdxGridReportLinkCustomDrawFooterCellEvent read FOnCustomDrawFooterCell - write SetOnCustomDrawFooterCell; - property OnCustomDrawHeaderCell: TdxGridReportLinkCustomDrawHeaderCellEvent read FOnCustomDrawHeaderCell - write SetOnCustomDrawHeaderCell; - property OnCustomDrawLevelCaption: TdxGridReportLinkCustomDrawLevelCaptionEvent read FOnCustomDrawLevelCaption - write SetOnCustomDrawLevelCaption; - property OnGetCellHeight: TdxGridReportLinkGetCellHeightEvent read FOnGetCellHeight write FOnGetCellHeight; - property OnGetCustomPageBreaks: TdxGridGetCustomPageBreaksEvent read FOnGetCustomPageBreaks write FOnGetCustomPageBreaks; - property OnInitializeBandCell: TdxGridReportLinkInitializeBandCellEvent read FOnInitializeBandCell - write FOnInitializeBandCell; - property OnInitializeCardRowCaptionCell: TdxGridReportLinkInitializeCardRowCaptionCellEvent read FOnInitializeCardRowCaptionCell - write FOnInitializeCardRowCaptionCell; - property OnInitializeCardRowDataCell: TdxGridReportLinkInitializeCardRowDataCellEvent read FOnInitializeCardRowDataCell - write FOnInitializeCardRowDataCell; - property OnInitializeCell: TdxGridReportLinkInitializeCellEvent read FOnInitializeCell - write FOnInitializeCell; - property OnInitializeFilterBar: TdxGridReportLinkInitializeFilterBarEvent read FOnInitializeFilterBar - write FOnInitializeFilterBar; - property OnInitializeFooterCell: TdxGridReportLinkInitializeFooterCellEvent read FOnInitializeFooterCell - write FOnInitializeFooterCell; - property OnInitializeHeaderCell: TdxGridReportLinkInitializeHeaderCellEvent read FOnInitializeHeaderCell - write FOnInitializeHeaderCell; - property OnInitializeLevelCaption: TdxGridReportLinkInitializeLevelCaptionEvent read FOnInitializeLevelCaption - write FOnInitializeLevelCaption; - end; - - TcxGridCardView2OptionsView = class(TcxGridCardViewOptionsView) - private - FCardBorders: Boolean; - FGridLineColor: TColor; - FGridLines: TcxGridLines; - FShadowDepth: Integer; - function GetShadowVisible: Boolean; - procedure SetCardBorders(Value: Boolean); - procedure SetGridLineColor(Value: TColor); - procedure SetGridLines(Value: TcxGridLines); - procedure SetShadowDepth(Value: Integer); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - property ShadowVisible: Boolean read GetShadowVisible; - published - property CardBorders: Boolean read FCardBorders write SetCardBorders default False; - property GridLineColor: TColor read FGridLineColor write SetGridLineColor default clDefault; - property GridLines: TcxGridLines read FGridLines write SetGridLines default glNone; - property ShadowDepth: Integer read FShadowDepth write SetShadowDepth; - end; - - TcxGridCardView2Styles = class(TcxGridCardViewStyles) - private - FOnGetCardShadowStyle: TcxGridGetRecordStyleEvent; - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - public - procedure Assign(Source: TPersistent); override; - procedure GetCardShadowParams(ARecord: TcxCustomGridRecord; out AParams: TcxViewParams); virtual; - published - property CardShadow: TcxStyle index vsCardShadow read GetValue write SetValue; - property OnGetCardShadowStyle: TcxGridGetRecordStyleEvent read FOnGetCardShadowStyle - write FOnGetCardShadowStyle; - end; - - TcxGridCardView2 = class(TcxGridCardView) - protected - function GetOptionsViewClass: TcxCustomGridOptionsViewClass; override; - function GetStylesClass: TcxCustomGridViewStylesClass; override; - function GetViewDataClass: TcxCustomGridViewDataClass; override; - function GetViewInfoClass: TcxCustomGridViewInfoClass; override; - end; - - TdxfmGridReportLinkDesignWindow = class(TdxfmCustomcxControlReportLinkDesignWindow) - PageControl1: TPageControl; - tshView: TTabSheet; - tshBehaviors: TTabSheet; - tshPreview: TTabSheet; - tshCards: TTabSheet; - lblShow: TLabel; - imgShow: TImage; - bvlShow: TBevel; - chbxShowBands: TCheckBox; - chbxShowHeaders: TCheckBox; - chbxShowFooters: TCheckBox; - chbxShowGroupFooters: TCheckBox; - chbxShowExpandButtons: TCheckBox; - lblOnEveryPage: TLabel; - imgOnEveryPage: TImage; - bvlOnEveryPage: TBevel; - chbxBandsOnEveryPage: TCheckBox; - chbxHeadersOnEveryPage: TCheckBox; - chbxFootersOnEveryPage: TCheckBox; - chbxFilterBarOnEveryPage: TCheckBox; - chbxCaptionsOnEveryPage: TCheckBox; - bvlWarningHost: TBevel; - lblSelection: TLabel; - imgSelection: TImage; - chbxProcessSelection: TCheckBox; - chbxProcessExactSelection: TCheckBox; - bvlSelection: TBevel; - lblExpanding: TLabel; - imgExpanding: TImage; - chbxExpandGroupRows: TCheckBox; - bvlExpanding: TBevel; - chbxExpandMasterRows: TCheckBox; - lblPreviewOptions: TLabel; - bvlPreviewOptions: TBevel; - chbxPreviewVisible: TCheckBox; - chbxPreviewAutoHeight: TCheckBox; - lblPreviewMaxLineCount: TLabel; - bvlPreviewMaxLineCountHost: TBevel; - chbxShowCaptions: TCheckBox; - chbxShowFilterBar: TCheckBox; - imgPreview: TImage; - chbxStartFromActiveView: TCheckBox; - chbxOnlyActiveView: TCheckBox; - lblDetails: TLabel; - bvlDetails: TBevel; - imgDetails: TImage; - tshFormatting: TTabSheet; - lblLookAndFeel: TLabel; - bvlLookAndFeel: TBevel; - imgLookAndFeel: TImage; - cbxLookAndFeel: TComboBox; - chbxFlatCheckMarks: TCheckBox; - chbxDisplayGraphicsAsText: TCheckBox; - chbxTransparentGraphics: TCheckBox; - imgRefinements: TImage; - lblRefinements: TLabel; - bvlRefinements: TBevel; - bvlCardSpaceVertHost: TBevel; - bvlCardSpaceHorzHost: TBevel; - lblCardSpaceVert: TLabel; - lblCardSpaceHorz: TLabel; - imgCardSpacing: TImage; - lblCardSpacing: TLabel; - bvlCardSpacing: TBevel; - bvlCardSizes: TBevel; - lblCardSizes: TLabel; - imgCardSizes: TImage; - chbxCardsKeepSameHeight: TCheckBox; - chbxCardsKeepSameWidth: TCheckBox; - chbxCardsAutoWidth: TCheckBox; - chbxCardsVertLines: TCheckBox; - chbxCardsHorzLines: TCheckBox; - chbxCardsBorder: TCheckBox; - imgCardFraming: TImage; - lblCardFraming: TLabel; - bvlCardFraming: TBevel; - bvlCardShadowColorHost: TBevel; - lblCardShadowDepth: TLabel; - bvlCardShadow: TBevel; - lblCardShadow: TLabel; - lblCardShadowColor: TLabel; - bvlCardShadowDepthHost: TBevel; - imgCardShadow: TImage; - pnlPreview: TPanel; - PreviewGrid: TcxGrid; - PreviewBandedView: TcxGridBandedTableView; - colVendorName: TcxGridBandedColumn; - colVendorLogo: TcxGridBandedColumn; - colVendorCountry: TcxGridBandedColumn; - colCarModel: TcxGridBandedColumn; - colIsSUVModel: TcxGridBandedColumn; - PreviewGridLevel: TcxGridLevel; - chbxLevelsUnwrap: TCheckBox; - imgLevels: TImage; - lblLevels: TLabel; - bvlLevels: TBevel; - chbxLevelsUnwrapTopLevel: TCheckBox; - chbxLevelsRiseActiveLevelOntoTop: TCheckBox; - chbxSuppressBackgroundBitmaps: TCheckBox; - tshStyles: TTabSheet; - btnStyleColor: TButton; - btnStyleFont: TButton; - btnStyleBackgroundBitmap: TButton; - chbxUseNativeStyles: TCheckBox; - bvlStyles: TBevel; - pmStyles: TPopupMenu; - miStyleFont: TMenuItem; - miStyleBackgroundBitmap: TMenuItem; - miStyleColor: TMenuItem; - bvlStyleSheets: TBevel; - lblStyleSheets: TLabel; - cbxStyleSheets: TComboBox; - btnStyleSheetNew: TButton; - btnStyleSheetCopy: TButton; - btnStyleSheetDelete: TButton; - milLine: TMenuItem; - miStylesSaveAs: TMenuItem; - btnStylesSaveAs: TButton; - btnStyleSheetRename: TButton; - miStyleBackgroundBitmapClear: TMenuItem; - btnStyleBackgroundBitmapClear: TButton; - btnStyleRestoreDefaults: TButton; - miStyleRestoreDefaults: TMenuItem; - miLine2: TMenuItem; - miLine3: TMenuItem; - bvlStylesHost: TBevel; - ilStylesPopup: TImageList; - miStylesSelectAll: TMenuItem; - miLine4: TMenuItem; - lblGridSize: TLabel; - bvlGridSize: TBevel; - imgGridSize: TImage; - chbxGridAutoWidth: TCheckBox; - chbxConsumeSelectionStyle: TCheckBox; - bvlRefinementsSeparator: TBevel; - lblPagination: TLabel; - bvlPagination: TBevel; - imgPagination: TImage; - chbxPaginateOneGroupPerPage: TCheckBox; - chbxPaginateByTopLevelGroups: TCheckBox; - lblPreviewWindow: TStaticText; - cxStyleRepository1: TcxStyleRepository; - styleCardShadow: TcxStyle; - styleCardBorder: TcxStyle; - Label1: TLabel; - chbxExpandCards: TCheckBox; - lblUseNativeStyles: TLabel; - procedure OptionsViewClick(Sender: TObject); - procedure OptionsOnEveryPageClick(Sender: TObject); - procedure OptionsSelectionClick(Sender: TObject); - procedure OptionsExpandingClick(Sender: TObject); - procedure OptionsRefinementClick(Sender: TObject); - procedure LookAndFeelClick(Sender: TObject); - procedure PreviewVisibleClick(Sender: TObject); - procedure PreviewAutoHeightClick(Sender: TObject); - procedure OptionsCardsClick(Sender: TObject); - procedure IsSUVModelCustomDrawCell(Sender: TcxCustomGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; - var ADone: Boolean); - procedure VendorLogoCustomDrawCell(Sender: TcxCustomGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; - var ADone: Boolean); - procedure PreviewBandedViewCustomDrawColumnHeader( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); - procedure PreviewBandedViewCustomDrawBandHeader( - Sender: TcxGridBandedTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridBandHeaderViewInfo; var ADone: Boolean); - procedure PreviewBandedViewCustomDrawFooterCell( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); - procedure OptionsDetailsClick(Sender: TObject); - procedure OptionsSizeClick(Sender: TObject); - procedure OptionsLevelsClick(Sender: TObject); - procedure OptionsFormatingClick(Sender: TObject); - procedure StyleColorClick(Sender: TObject); - procedure StyleFontClick(Sender: TObject); - procedure StyleBackgroundBitmapClick(Sender: TObject); - procedure lbxStylesClick(Sender: TObject); - procedure pmStylesPopup(Sender: TObject); - procedure cbxStyleSheetsClick(Sender: TObject); - procedure StyleSheetNewClick(Sender: TObject); - procedure StyleSheetCopyClick(Sender: TObject); - procedure StyleSheetDeleteClick(Sender: TObject); - procedure StylesSaveAsClick(Sender: TObject); - procedure cbxStyleSheetsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure StyleSheetRenameClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure StyleBackgroundBitmapClearClick(Sender: TObject); - procedure StyleRestoreDefaultsClick(Sender: TObject); - procedure miStylesSelectAllClick(Sender: TObject); - procedure OptionsPaginationClick(Sender: TObject); - procedure cbxStyleSheetsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure lblUseNativeStylesClick(Sender: TObject); - private - ccbxCardsShadowColor: TdxPSColorCombo; - lbxStyles: TdxStylesListBox; - PreviewCardView: TcxGridCardView2; - rowVendorName: TcxGridCardViewRow; - rowVendorLogo: TcxGridCardViewRow; - rowVendorCountry: TcxGridCardViewRow; - rowCarModel: TcxGridCardViewRow; - rowIsSuvModel: TcxGridCardViewRow; - seCardsShadowDepth: TdxPSSpinEdit; - seCardsSpaceHorz: TdxPSSpinEdit; - seCardsSpaceVert: TdxPSSpinEdit; - sePreviewMaxLineCount: TdxPSSpinEdit; - wpIncorrectOnEveryPageState: TdxPSWarningPane; - - function GetActiveStyle: TcxStyle; - function GetHasSelectedStyles: Boolean; - function GetHasSelectedStylesWithAssignedBitmap: Boolean; - function GetReportLink: TdxGridReportLink; - - procedure CardShadowDepthChanged(Sender: TObject); - procedure CardShadowColorChanged(Sender: TObject); - procedure CardSpaceHorzChanged(Sender: TObject); - procedure CardSpaceVertChanged(Sender: TObject); - procedure PreviewMaxLineCountChanged(Sender: TObject); - - function CanSelectAllStyles: Boolean; - procedure ChangeActiveView(AView: TcxCustomGridView); - procedure CreateCardView; - procedure CreateControls; - procedure CustomDrawBorders(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo); - procedure CustomDrawFooter(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxCustomGridCellViewInfo); - procedure CustomDrawHeader(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxCustomGridCellViewInfo); - procedure CustomDrawTextRect(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxCustomGridCellViewInfo; - ABackgroundBitmap: TBitmap); - procedure InitializePreviewGrid; - procedure InitializePreviewGridStyles; - procedure LoadDataIntoPreviewGridView(AView: TcxCustomGridTableView); - procedure RecreateStylesListBox; - procedure RestoreSelectedStyles(AList: TList); - procedure SaveSelectedStyles(AList: TList); - procedure SetActivePage; - procedure UpdatePreviewGridStyles(const ACaption: string; AStyle: TcxStyle); - procedure UpdateWarningPane; - - procedure SetOptionsCardsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsDetailsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsExpandingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsFormattingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsLevelsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsOnEveryPageByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsPaginationByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsRefinementsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsSelectionByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsSizeByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsViewByIndex(Index: Integer; Value: Boolean); - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - - function GetDesignerTabIndex: Integer; override; - procedure SetDesignerTabIndex(Value: Integer); override; - - procedure DoActiveStyleSheetChanged; override; - procedure DoFormActivated(AnActive: Boolean); override; - procedure DoRefreshStylesList; override; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); override; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); override; - - procedure GetSelectedStyleNames(AStrings: TStrings); override; - procedure GetStyleNames(out AStrings: TStrings); override; - procedure GetStyleSheetNames(out AStrings: TStrings); override; - - property ActiveStyle: TcxStyle read GetActiveStyle; - property HasSelectedStyles: Boolean read GetHasSelectedStyles; - property HasSelectedStylesWithAssignedBitmap: Boolean read GetHasSelectedStylesWithAssignedBitmap; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property ReportLink: TdxGridReportLink read GetReportLink; - end; - -implementation - -{$R *.DFM} - -{658 x 466 - DesignWindow} - -{.2 - IsOffice11StyleGrouping} -{.3 - chbxTransparentRichEdits} - -uses - Registry, Forms, cxVariants, cxGridStrs, cxDataUtils, dxThemeManager, - dxPSGlbl, cxDrawTextUtils, dxPSUtl, dxBkgnd, - dxPSPopupMan, dxPSRes, dxPSImgs; - -const - SortOrderMap: array[TcxGridSortOrder] of TdxCellSortOrder = (csoNone, csoUp, csoDown); - - ExpandButtonInteriorColor = clBtnFace; - DefaultFilterBarColor = clBtnShadow; - DefaultFilterBarTextColor = clWindow; - DefaultIndentWidth = 20; - DefaultDataRowLineHeight = 19; - DefaultGroupFooterLineHeight = 20; - DefaultGroupRowLineHeight = 20; - DefaultFooterLineHeight = 20; - FilterBarTextOffset = 3; - FirstCardOffset = 2; - FooterItemInflateHorz = 2; - FooterItemInflateVert = 3; - TabsAreaOffset = 2; - -var - FGridLinkStyleSheetPrototype: TdxGridReportLinkStyleSheet; - -type - TdxPSGridDataCellPos = TcxGridDataCellPos; - - TdxGridViewBuildersFactory = class(TdxCustomClassMaps) - private - function GetBuilderClass(GridView: TcxCustomGridView): TdxGridViewBuilderClass; - public - class function Instance: TdxGridViewBuildersFactory; reintroduce; overload; - function CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; - function CreateViewBuilder(AReportLink: TdxGridReportLink; AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; - property BuilderClasses[GridView: TcxCustomGridView]: TdxGridViewBuilderClass read GetBuilderClass; default; - end; - - TdxViewHelpersFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(GridView: TcxCustomGridView): TdxCustomGridViewHelperClass; - public - class function Instance: TdxViewHelpersFactory; reintroduce; overload; - function HelperClassByItem(AnItem: TdxReportVisualItem): TdxCustomGridViewHelperClass; - property HelperClasses[GridView: TcxCustomGridView]: TdxCustomGridViewHelperClass read GetHelperClass; default; - end; - - TdxRecordHelpersFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(GridRecord: TcxCustomGridRecord): TdxCustomGridRecordHelperClass; - public - class function Instance: TdxRecordHelpersFactory; reintroduce; overload; - property HelperClasses[GridRecord: TcxCustomGridRecord]: TdxCustomGridRecordHelperClass read GetHelperClass; default; - end; - - TcxCustomGridCellPainterAccess = class(TcxCustomGridCellPainter); - TcxCustomGridCellViewInfoAccess = class(TcxCustomGridCellViewInfo); - TcxCustomGridRecordAccess = class(TcxCustomGridRecord); - TcxCustomGridTableControllerAccess = class(TcxCustomGridTableController); - TcxCustomGridTableOptionsViewAccess = class(TcxCustomGridTableOptionsView); - TcxCustomGridViewAccess = class(TcxCustomGridView); - TcxGridColumnAccess = class(TcxGridColumn); - TcxGridMasterDataRowAccess = class(TcxGridMasterDataRow); - TcxGridTableViewInfoAccess = class(TcxGridTableViewInfo); - -{ Helpers } - -{ CustomGridCellPainter Helpers } - -procedure CustomGridCellPainter_DrawBorders(AInstance: TcxCustomGridCellPainter); -begin - TcxCustomGridCellPainterAccess(AInstance).DrawBorders; -end; - -{ CustomGridCellViewInfo Helpers } - -function CustomGridCellViewInfo_GetPainterClass(AInstance: TcxCustomGridCellViewInfo): TcxCustomGridCellPainterClass; -begin - Result := TcxCustomGridCellViewInfoAccess(AInstance).GetPainterClass; -end; - -{ CustomGridRecord Helpers } - -function CustomGridRecord_GetIsParent(AInstance: TcxCustomGridRecord): Boolean; -begin - Result := TcxCustomGridRecordAccess(AInstance).IsParent; -end; - -{ CustomGridTableController Helpers } - -function CustomGridTableController_GetMultiSelect(AInstance: TcxCustomGridTableController): Boolean; -begin - Result := TcxCustomGridTableControllerAccess(AInstance).MultiSelect; -end; - -{ CustomGridTableFiltering Helpers } - -{ CustomGridTableOptionsView Helpers } - -function CustomGridTableOptionsView_GetCellAutoHeight(AInstance: TcxCustomGridTableOptionsView): Boolean; -begin - Result := TcxCustomGridTableOptionsViewAccess(AInstance).CellAutoHeight; -end; - -{ CustomGridView Helpers } - -function CustomGridView_GetBackgroundBitmaps(AInstance: TcxCustomGridView): TcxCustomGridBackgroundBitmaps; -begin - Result := TcxCustomGridViewAccess(AInstance).BackgroundBitmaps; -end; - -function CustomGridView_GetDataController(AInstance: TcxCustomGridView): TcxCustomDataController; -begin - Result := TcxCustomGridViewAccess(AInstance).DataController; -end; - -function CustomGridView_GetStyles(AInstance: TcxCustomGridView): TcxCustomGridStyles; -begin - Result := TcxCustomGridViewAccess(AInstance).Styles; -end; - -{ GridColumn Helpers } - -function GridColumn_GetFixed(AInstance: TcxGridColumn): Boolean; -begin - Result := TcxGridColumnAccess(AInstance).Fixed; -end; - -{ GridMasterDataRow Helpers } - -procedure GridMasterDataRow_DoExpand(AInstance: TcxGridMasterDataRow; ARecurse: Boolean); -begin - TcxGridMasterDataRowAccess(AInstance).DoExpand(ARecurse); -end; - -{ GridTableViewInfo Helpers } - -procedure GridTableViewInfo_CalculateExpandButtonParams(AInstance: TcxGridTableViewInfo); -begin - TcxGridTableViewInfoAccess(AInstance).CalculateExpandButtonParams; -end; - -{ Utilities } - -function GridLinkStyleSheetPrototype: TdxGridReportLinkStyleSheet; - - function CreateStyle(AColor, AFontColor: TColor): TcxStyle; - begin - Result := TcxStyle.Create(FGridLinkStyleSheetPrototype); - with Result do - begin - Color := AColor; - Font.Name := dxPSCore.dxPSDefaultFontName; - Font.Color := AFontColor; - end; - end; - -begin - if FGridLinkStyleSheetPrototype = nil then - begin - FGridLinkStyleSheetPrototype := TdxGridReportLinkStyleSheet.Create(nil); - with FGridLinkStyleSheetPrototype.Styles as TdxGridReportLinkStyles do - begin - BandHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Caption := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - CardCaptionRow := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - CardRowCaption := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Content := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ContentEven := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ContentOdd := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - FilterBar := CreateStyle(clBtnShadow, dxPSCore.dxDefaultContentColor); - Footer := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Group := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Header := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Preview := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - Selection := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - end; - end; - Result := FGridLinkStyleSheetPrototype; -end; - -function CreatePSDataCellPos: TdxPSGridDataCellPos; -begin - Result := TdxPSGridDataCellPos.Create; -end; - -procedure FreePSDataCellPos(out ADataCellPos: TdxPSGridDataCellPos); -begin - FreeAndNil(ADataCellPos); -end; - -function IsValidPointer(const AData: Integer): Boolean; -begin - //Result := (HInstance = 0) or (FindHInstance(AData) = HInstance); //TODO: IsValidPointer( - Result := DWORD(AData) > SysInit.HInstance; -end; - -procedure _LoadAllRecords(ADBDataModeController: TcxDBDataModeController; - out APrevAllRecordsAreLoaded: Boolean); -begin - APrevAllRecordsAreLoaded := not ADBDataModeController.GridMode; - if not APrevAllRecordsAreLoaded then - ADBDataModeController.GridMode := False; -end; - -procedure _UnloadAllRecords(ADBDataModeController: TcxDBDataModeController; - const APrevAllRecordsAreLoaded: Boolean); -begin - if not APrevAllRecordsAreLoaded then - ADBDataModeController.GridMode := True; -end; - -{ TdxGridViewBuildersFactory } - -function dxGridViewBuildersFactory: TdxGridViewBuildersFactory; -begin - Result := TdxGridViewBuildersFactory.Instance; -end; - -class function TdxGridViewBuildersFactory.Instance: TdxGridViewBuildersFactory; -begin - Result := inherited Instance as TdxGridViewBuildersFactory; -end; - -function TdxGridViewBuildersFactory.CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := BuilderClasses[AGridView].CreateAdapter(AMasterAdapter, AGridView); -end; - -function TdxGridViewBuildersFactory.CreateViewBuilder(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; -begin - Result := BuilderClasses[AGridView].Create(AReportLink, AMasterBuilder, AGridView); -end; - -function TdxGridViewBuildersFactory.GetBuilderClass(GridView: TcxCustomGridView): TdxGridViewBuilderClass; -begin - Result := TdxGridViewBuilderClass(PairClasses[GridView.ClassType]); -end; - -{ TdxViewHelpersFactory } - -function dxViewHelpersFactory: TdxViewHelpersFactory; -begin - Result := TdxViewHelpersFactory.Instance; -end; - -class function TdxViewHelpersFactory.Instance: TdxViewHelpersFactory; -begin - Result := inherited Instance as TdxViewHelpersFactory; -end; - -function TdxViewHelpersFactory.HelperClassByItem(AnItem: TdxReportVisualItem): TdxCustomGridViewHelperClass; -begin - Result := HelperClasses[TcxCustomGridView(AnItem.TopLevelParent.Data)]; -end; - -function TdxViewHelpersFactory.GetHelperClass(GridView: TcxCustomGridView): TdxCustomGridViewHelperClass; -begin - if GridView = nil then - Result := nil - else - Result := TdxCustomGridViewHelperClass(PairClasses[GridView.ClassType]); -end; - -{ TdxRecordHelpersFactory } - -function dxRecordHelpersFactory: TdxRecordHelpersFactory; -begin - Result := TdxRecordHelpersFactory.Instance; -end; - -class function TdxRecordHelpersFactory.Instance: TdxRecordHelpersFactory; -begin - Result := inherited Instance as TdxRecordHelpersFactory; -end; - -function TdxRecordHelpersFactory.GetHelperClass(GridRecord: TcxCustomGridRecord): TdxCustomGridRecordHelperClass; -begin - Result := TdxCustomGridRecordHelperClass(PairClasses[GridRecord.ClassType]); -end; - -{ TdxCustomGridViewHelper } - -constructor TdxCustomGridViewHelper.Create(AView: TcxCustomGridView); -begin - inherited Create; - FView := AView; -end; - -class function TdxCustomGridViewHelper.PairClass: TClass; -begin - Result := ViewClass; -end; - -class procedure TdxCustomGridViewHelper.Register; -begin - dxViewHelpersFactory.Register(Self); -end; - -class procedure TdxCustomGridViewHelper.Unregister; -begin - dxViewHelpersFactory.Unregister(Self); -end; - -class function TdxCustomGridViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := dxGridUndefinedID; - if TClass(AnItem.Data) = TdxGridLevelCaption then - Result := dxGridLevelCaptionID; -end; - -class procedure TdxCustomGridViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - with ACustomDrawInfo do - begin - GridAttributeID := ExtractCustomDrawID(AnItem); - GridView := ExtractGridView(AnItem); - end; -end; - -class function TdxCustomGridViewHelper.ExtractGridView(AnItem: TdxReportVisualItem): TcxCustomGridView; -begin - Result := TcxCustomGridView(AnItem.TopLevelParent.Data); -end; - -class function TdxCustomGridViewHelper.IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; -var - Attributes: TdxGridAttributeClasses; - I: Integer; -begin - Attributes := SupportedAttributes; - - Result := True; - for I := Low(Attributes) to High(Attributes) do - if Attributes[I] = AnAttribute then Exit; - Result := False; -end; - -class function TdxCustomGridViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - SetLength(Result, 0); - AddAttribute(Result, TdxGridLevelCaption); -end; - -class procedure TdxCustomGridViewHelper.AddAttribute(var AnAtributes: TdxGridAttributeClasses; - AnAttribute: TdxGridAttributeClass); -begin - SetLength(AnAtributes, Length(AnAtributes) + 1); - AnAtributes[Length(AnAtributes) - 1] := AnAttribute; -end; - -class function TdxCustomGridViewHelper.IsFilterBarAtBottom(AView: TcxCustomGridView): Boolean; -begin - Result := True; -end; - -class function TdxCustomGridViewHelper.IsFilterBarAtTop(AView: TcxCustomGridView): Boolean; -begin - Result := False; -end; - -class function TdxCustomGridViewHelper.IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; -begin - Result := False; -end; - -class function TdxCustomGridViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -{ TdxNullGridViewHelper } - -class function TdxNullGridViewHelper.IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := True; -end; - -class function TdxNullGridViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := nil; -end; - -{ TdxCustomGridTableViewHelper } - -class function TdxCustomGridTableViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if TClass(AnItem.Data) = TdxGridFilterBar then - Result := dxGridFilterBarID; -end; - -class function TdxCustomGridTableViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - Result := inherited SupportedAttributes; - AddAttribute(Result, TdxGridFilterBar); -end; - -class function TdxCustomGridTableViewHelper.ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; -begin - Result := nil; -end; - -class function TdxCustomGridTableViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridTableView; -end; - -{ TdxGridCardViewHelper } - -class function TdxGridCardViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if (AnItem.Parent <> nil) and (AnItem.Parent is TdxReportCardRow) then - if TClass(AnItem.Data) = TdxGridCardRowCaption then - Result := dxGridCardRowCaptionID - else - Result := dxGridCardRowDataID; -end; - -class procedure TdxGridCardViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - with ACustomDrawInfo do - try - inherited; - if GridAttributeID in [dxGridCardRowCaptionID, dxGridCardRowDataID] then - begin - GridCard := ExtractCard(AnItem); - GridCardRow := ExtractCardRow(AnItem); - end; - except - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - GridAttributeID := dxGridUndefinedID; - end; -end; - -class function TdxGridCardViewHelper.ExtractCard(AnItem: TdxReportVisualItem): TcxGridCard; -begin - Result := ExtractRecord(AnItem) as TcxGridCard; -end; - -class function TdxGridCardViewHelper.ExtractCardRow(AnItem: TdxReportVisualItem): TcxGridCardViewRow; -begin - Result := TdxReportCardRow(AnItem.Parent).GridCardRow; -end; - -class function TdxGridCardViewHelper.ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; -begin - Result := TdxReportCard(AnItem.Parent.Parent).GridCard; -end; - -class function TdxGridCardViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -{ TdxGridTableViewHelper } - -class function TdxGridTableViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if AnItem.Parent <> nil then - if TClass(AnItem.Parent.Data) = TdxGridHeader then - Result := dxGridHeaderID - else - if TClass(AnItem.Parent.Data) = TdxGridFooter then - Result := dxGridFooterID - else - if IsDelphiObject(AnItem.Parent.Data) and (TObject(AnItem.Parent.Data) is TcxCustomGridRecord) then - if (AnItem.Parent.Parent <> nil) and (AnItem.Parent.Parent.Data >= 0) and - (AnItem.Parent.Parent.Data < High(Byte)) then - Result := dxGridGroupFooterID - else - Result := dxGridRecordID; -end; - -class procedure TdxGridTableViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - with ACustomDrawInfo do - try - inherited; - - if GridAttributeID in [dxGridFooterID, dxGridGroupFooterID, dxGridHeaderID, dxGridRecordID] then - begin - GridColumn := ExtractColumn(AnItem); - if GridAttributeID in [dxGridRecordID, dxGridGroupFooterID] then - begin - GridRecord := ExtractRecord(AnItem); - if GridAttributeID = dxGridGroupFooterID then - GroupLevel := ExtractGroupLevel(AnItem); - end - else - GroupLevel := -1; - end; - except - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - GridAttributeID := dxGridUndefinedID; - end; -end; - -class function TdxGridTableViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - Result := inherited SupportedAttributes; - AddAttribute(Result, TdxGridDetails); - AddAttribute(Result, TdxGridExpandButton); - AddAttribute(Result, TdxGridFooter); - AddAttribute(Result, TdxGridGroupFooter); - AddAttribute(Result, TdxGridGroupRow); - AddAttribute(Result, TdxGridHeader); - AddAttribute(Result, TdxGridPreview); -end; - -class function TdxGridTableViewHelper.ExtractColumn(AnItem: TdxReportVisualItem): TcxGridColumn; -begin - Result := TcxGridColumn(AnItem.Data); -end; - -class function TdxGridTableViewHelper.ExtractGroupLevel(AnItem: TdxReportVisualItem): Integer; -begin - Result := AnItem.Parent.Parent.Data; -end; - -class function TdxGridTableViewHelper.ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; -begin - Result := TcxCustomGridRecord(AnItem.Parent.Data); -end; - -class function TdxGridTableViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridTableView; -end; - -class function TdxGridTableViewHelper.IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; -begin - Result := False; -end; - -{ TdxGridBandedTableViewHelper } - -class function TdxGridBandedTableViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if IsDelphiObject(AnItem.Data) and (TObject(AnItem.Data) is TcxGridBand) then - Result := dxGridBandID; -end; - -class procedure TdxGridBandedTableViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - with ACustomDrawInfo do - try - inherited; - if GridAttributeID = dxGridBandID then - GridBand := ExtractBand(AnItem); - except - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - GridAttributeID := dxGridUndefinedID; - end; -end; - -class function TdxGridBandedTableViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - Result := inherited SupportedAttributes; - AddAttribute(Result, TdxGridBandHeader); -end; - -class function TdxGridBandedTableViewHelper.ExtractBand(AnItem: TdxReportVisualItem): TcxGridBand; -begin - Result := TcxGridBand(AnItem.Data); -end; - -class function TdxGridBandedTableViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridBandedTableView; -end; - -{ TdxCustomGridRecordHelper } - -constructor TdxCustomGridRecordHelper.Create(AAdapter: TdxCustomGridTableViewAdapter); -begin - inherited Create; - FAdapter := AAdapter; -end; - -class function TdxCustomGridRecordHelper.PairClass: TClass; -begin - Result := RecordClass; -end; - -class procedure TdxCustomGridRecordHelper.Register; -begin - dxRecordHelpersFactory.Register(Self); -end; - -class procedure TdxCustomGridRecordHelper.Unregister; -begin - dxRecordHelpersFactory.Unregister(Self); -end; - -function TdxCustomGridRecordHelper.Adapter: TdxCustomGridTableViewAdapter; -begin - Result := FAdapter; -end; - -class function TdxCustomGridRecordHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewCustomDataRowProducer; -end; - -class function TdxCustomGridRecordHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxCustomGridRecord; -end; - -function TdxCustomGridRecordHelper.GetHasDetails: Boolean; -begin - Result := False; -end; - -function TdxCustomGridRecordHelper.GetHasSelectedChildren: Boolean; -begin - Result := False; -end; - -function TdxCustomGridRecordHelper.GetParent: TcxCustomGridRecord; -var - I: Integer; -begin - for I := GridRecord.Index - 1 downto 0 do - begin - Result := Adapter.Records[I]; - if CustomGridRecord_GetIsParent(Result) and (Result.Level < GridRecord.Level) then - Exit; - end; - Result := nil; -end; - -{ TdxCustomGridRowHelper } - -function TdxCustomGridRowHelper.Adapter: TdxGridTableViewAdapter; -begin - Result := inherited Adapter as TdxGridTableViewAdapter; -end; - -class function TdxCustomGridRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxCustomGridRow; -end; - -{ TdxGridDataRowHelper } - -class function TdxGridDataRowHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewDataRowProducer; -end; - -class function TdxGridDataRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxGridDataRow; -end; - -function TdxGridDataRowHelper.GetRow: TcxGridDataRow; -begin - Result := inherited GridRecord as TcxGridDataRow; -end; - -{ TdxGridGroupRowHelper } - -class function TdxGridGroupRowHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewGroupRowProducer; -end; - -class function TdxGridGroupRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxGridGroupRow; -end; - -function TdxGridGroupRowHelper.GetHasSelectedChildren: Boolean; -var - GroupLevel, I: Integer; - Row: TcxCustomGridRow; -begin - GroupLevel := GroupRow.Level; - for I := GroupRow.Index + 1 to Adapter.RowCount - 1 do - begin - Row := Adapter.Rows[I]; - if Row.Level <= GroupLevel then Break; - Result := Row.Selected or Adapter.RecordHelpers[Row].HasSelectedChildren; //!!! - if Result then Exit; - end; - Result := False; -end; - -function TdxGridGroupRowHelper.GetGroupRow: TcxGridGroupRow; -begin - Result := inherited GridRecord as TcxGridGroupRow; -end; - -{ TdxGridMasterDataRowHelper } - -class function TdxGridMasterDataRowHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewMasterRowProducer; -end; - -class function TdxGridMasterDataRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxGridMasterDataRow; -end; - -function TdxGridMasterDataRowHelper.GetHasDetails: Boolean; -begin - Result := MasterRow.Expanded;// and MasterRow.ActiveDetailGridViewExists //!!! -end; - -function TdxGridMasterDataRowHelper.GetHasSelectedChildren: Boolean; -begin - Result := MasterRow.Expanded; - if Result then - with dxGridViewBuildersFactory.CreateViewAdapter(Adapter, DetailView) do - try - Result := HasSelectedRecords; - finally - Free; - end; -end; - -function TdxGridMasterDataRowHelper.GetDetailView: TcxCustomGridView; -begin - if HasDetails then - Result := MasterRow.ActiveDetailGridView - else - Result := nil; -end; - -function TdxGridMasterDataRowHelper.GetMasterRow: TcxGridMasterDataRow; -begin - Result := inherited GridRecord as TcxGridMasterDataRow; -end; - -{ TdxRecordHelpersCache } - -constructor TdxRecordHelpersCache.Create(AAdapter: TdxCustomGridTableViewAdapter); -begin - inherited Create; - FAdapter := AAdapter; -end; - -function TdxRecordHelpersCache.IndexOf(ARecord: TcxCustomGridRecord): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].RecordClass = ARecord.ClassType then - Exit; - - Result := Add(dxRecordHelpersFactory.HelperClasses[ARecord].Create(Adapter)); -end; - -function TdxRecordHelpersCache.GetHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; -begin - Result := Items[IndexOf(ARecord)]; - Result.GridRecord := ARecord; -end; - -function TdxRecordHelpersCache.GetItem(Index: Integer): TdxCustomGridRecordHelper; -begin - Result := TdxCustomGridRecordHelper(inherited Items[Index]); -end; - -{ TdxProducerCache } - -constructor TdxProducerCache.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TdxProducerCache.IndexOf(AProducerClass: TdxGridViewRowProducerClass): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].ClassType = AProducerClass then Exit; - - Result := Add(AProducerClass.Create(Builder)); -end; - -function TdxProducerCache.GetProducer(ProducerClass: TdxGridViewRowProducerClass): TdxGridViewRowProducer; -begin - Result := Items[IndexOf(ProducerClass)]; -end; - -function TdxProducerCache.GetItem(Index: Integer): TdxGridViewRowProducer; -begin - Result := inherited Items[Index] as TdxGridViewRowProducer; -end; - -{ TdxCustomGridViewAdapter } - -constructor TdxCustomGridViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited Create; - FMasterAdapter := AMasterAdapter; - FGridView := AGridView; - FGridView.SizeChanged(True, True); //!? -end; - -function TdxCustomGridViewAdapter.GridView: TcxCustomGridView; -begin - Result := FGridView; -end; - -class function TdxCustomGridViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -function TdxCustomGridViewAdapter.Styles: TcxCustomGridStyles; -begin - Result := CustomGridView_GetStyles(GridView); -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; - ARecursive: Boolean); -begin - Grid.BeginUpdate; - try - ExpandAllRowsInLevel(GridLevel, AnOptionsExpanding.ExpandMasterRows, - AnOptionsExpanding.ExpandGroupRows, ARecursive); - finally - Grid.EndUpdate; - end; -end; - -procedure TdxCustomGridViewAdapter.AfterBuilding; -begin - //GridView.CancelUpdate; -end; - -procedure TdxCustomGridViewAdapter.BeforeBuilding; -begin - //GridView.BeginUpdate; -end; - -function TdxCustomGridViewAdapter.BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; -begin - Result := CustomGridView_GetBackgroundBitmaps(GridView); -end; - -function TdxCustomGridViewAdapter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - if IsBackgroundBitmapSupported(Index) then - Result := BackgroundBitmaps.GetBitmap(Index) - else - Result := nil -end; - -function TdxCustomGridViewAdapter.HasBackgroundBitmap(Index: Integer): Boolean; -var - Bitmap: TBitmap; -begin - Bitmap := BackgroundBitmaps.GetBitmap(Index); - Result := (Bitmap <> nil) and not Bitmap.Empty; -end; - -function TdxCustomGridViewAdapter.IsBackgroundBitmapSupported(Index: Integer): Boolean; -begin - Result := Index <> bbTabs; -end; - -function TdxCustomGridViewAdapter.Controller: TcxCustomGridController; -begin - Result := GridView.Controller; -end; - -function TdxCustomGridViewAdapter.DataController: TcxCustomDataController; -begin - Result := CustomGridView_GetDataController(GridView); -end; - -function TdxCustomGridViewAdapter.CreateCloneAdapter(AClone: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := dxGridViewBuildersFactory.CreateViewAdapter(MasterAdapter, AClone); -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInGridView(AGridView: TcxCustomGridView; - AMasterRows, AGroupRows: Boolean); -begin - with dxGridViewBuildersFactory.CreateViewAdapter(nil, AGridView) do - try - ExpandAllRowsInItself(AMasterRows, AGroupRows); - ExpandAllRowsInClones(AMasterRows, AGroupRows); - finally - Free; - end; -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInClones(AMasterRows, AGroupRows: Boolean); -var - I: Integer; - Clone: TcxCustomGridView; -begin - for I := 0 to GridView.CloneCount - 1 do - begin - Clone := GridView.Clones[I]; - with CreateCloneAdapter(Clone) do - try - ExpandAllRowsInGridView(Clone, AMasterRows, AGroupRows); - finally - Free; - end; - end; -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInLevel(ALevel: TcxGridLevel; - AMasterRows, AGroupRows: Boolean; ARecursive: Boolean); -var - I: Integer; -begin - ExpandAllRowsInGridView(ALevel.GridView, AMasterRows, AGroupRows); - if ARecursive then - for I := 0 to ALevel.VisibleCount - 1 do - ExpandAllRowsInLevel(ALevel.VisibleItems[I], AMasterRows, AGroupRows, ARecursive); -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); -begin -end; - -function TdxCustomGridViewAdapter.GetAreAllMasterRowsCollapsed: Boolean; -begin - Result := True; -end; - -function TdxCustomGridViewAdapter.GetAutoWidth: Boolean; -begin - Result := False; -end; - -function TdxCustomGridViewAdapter.GetCanUseOnEveryPageMode: Boolean; -begin - Result := False; -end; - -function TdxCustomGridViewAdapter.GetHasSelectedRecords: Boolean; -begin - Result := False; -end; - -function TdxCustomGridViewAdapter.GetIndentCount: Integer; -begin - Result := Ord(IsMaster); -end; - -function TdxCustomGridViewAdapter.GetIndentWidth: Integer; -begin - Result := DefaultIndentWidth; -end; - -function TdxCustomGridViewAdapter.GetIsOffice11StyleGrouping: Boolean; -begin - Result := False; -end; - -function TdxCustomGridViewAdapter.GetMasterGridRecord: TcxCustomGridRecord; -begin - Result := nil; -end; - -function TdxCustomGridViewAdapter.GetRecordCount: Integer; -begin - Result := 0; -end; - -function TdxCustomGridViewAdapter.GetViewWidthExtra: Integer; -begin - Result := Ord(IsMaster) * IndentWidth; -end; - -function TdxCustomGridViewAdapter.GetCaptionViewParams: TcxViewParams; -var - Level: TcxGridLevel; -begin - if MasterAdapter = nil then - if GridView.MasterGridView <> nil then - begin - Level := GridView.MasterGridView.Level as TcxGridLevel; - Level.Styles.GetTabParams( GridLevel, Result); - end - else - Result := GetRootCaptionParams - else - MasterAdapter.GridLevel.Styles.GetTabParams( GridLevel, Result); -end; - -function TdxCustomGridViewAdapter.GetFilterBarViewParams: TcxViewParams; -begin - Result.Color := clBtnShadow; - Result.Font := nil; - Result.TextColor := clWindow; -end; - -function TdxCustomGridViewAdapter.GetRootCaptionParams: TcxViewParams; -begin - Grid.RootLevelStyles.GetTabParams( GridLevel, Result); -end; - -function TdxCustomGridViewAdapter.GetAbsoluteLevel: Integer; -begin - Result := GridLevel.Level; -end; - -function TdxCustomGridViewAdapter.GetCanUseLookAndFeelColors: Boolean; -begin - Result := Grid.LookAndFeel.NativeStyle and dxThemeManager.AreVisualStylesAvailable; -end; - -function TdxCustomGridViewAdapter.GetCaptionText: string; -begin - Result := GridLevel.Caption; -end; - -function TdxCustomGridViewAdapter.GetDetailsSeparatorColor: TColor; -begin - Result := MasterGridLevel.Options.DetailFrameColor; -end; - -function TdxCustomGridViewAdapter.GetDetailsSeparatorThickness: Integer; -begin - Result := MasterGridLevel.Options.DetailFrameWidth; -end; - -function TdxCustomGridViewAdapter.GetFilter: TcxDataFilterCriteria; -begin - Result := DataController.Filter; -end; - -function TdxCustomGridViewAdapter.GetFilterActive: Boolean; -begin - Result := Filter.Active; -end; - -function TdxCustomGridViewAdapter.GetFilterEmpty: Boolean; -begin - Result := Filter.FilterText = ''; -end; - -function TdxCustomGridViewAdapter.GetFilterText: string; -begin - Result := Filter.FilterCaption; - if Result = '' then - Result := cxGetResourceString(@scxGridFilterIsEmpty); -end; - -function TdxCustomGridViewAdapter.GetGrid: TcxCustomGrid; -begin - Result := GridView.Control as TcxCustomGrid; -end; - -function TdxCustomGridViewAdapter.GetGridLevel: TcxGridLevel; -begin - Result := GridView.Level as TcxGridLevel; -end; - -function TdxCustomGridViewAdapter.GetGridWidth: Integer; -begin - with Grid.ClientRect do - Result := Right - Left; -end; - -function TdxCustomGridViewAdapter.GetHasDetailsSeparator: Boolean; -begin - Result := DetailsSeparatorThickness <> 0; -end; - -function TdxCustomGridViewAdapter.GetLookAndFeelKind: TcxLookAndFeelKind; -begin - Result := Grid.LookAndFeel.Kind; -end; - -function TdxCustomGridViewAdapter.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := Grid.LookAndFeelPainter; -end; - -function TdxCustomGridViewAdapter.GetIsDetail: Boolean; -begin - Result := GridView.IsDetail; -end; - -function TdxCustomGridViewAdapter.GetIsMaster: Boolean; -begin - Result := GridView.IsMaster; -end; - -function TdxCustomGridViewAdapter.GetMasterGridLevel: TcxGridLevel; -begin - Result := GridLevel.Parent; -end; - -function TdxCustomGridViewAdapter.GetSummary: TcxDataSummary; -begin - Result := DataController.Summary; -end; - -function TdxCustomGridViewAdapter.GetThemedCaptionColor: TColor; -begin - Result := LookAndFeelPainter.DefaultTabColor; -end; - -function TdxCustomGridViewAdapter.GetThemedCaptionTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultTabTextColor; -end; - -function TdxCustomGridViewAdapter.GetThemedFilterBarColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFilterBoxColor; -end; - -function TdxCustomGridViewAdapter.GetThemedFilterBarTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFilterBoxTextColor; -end; - -function TdxCustomGridViewAdapter.GetViewWidth: Integer; -begin - Result := GridView.Control.Width; -end; - -{ TdxCustomGridViewFormatter } - -constructor TdxCustomGridViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; - - FLookAndFeelItems := TList.Create; - FExpandButtons := TList.Create; - FFont := TFont.Create; - - FTransparentColor := dxPSCore.dxDefaultContentColor; -end; - -destructor TdxCustomGridViewFormatter.Destroy; -begin - FreeAndNil(FFont); - FreeAndNil(FExpandButtons); - FreeAndNil(FLookAndFeelItems); - inherited; -end; - -function TdxCustomGridViewFormatter.Builder: TdxCustomGridViewBuilder; -begin - Result := FBuilder; -end; - -function TdxCustomGridViewFormatter.Adapter: TdxCustomGridViewAdapter; -begin - Result := Builder.Adapter; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeHost(AHost: TdxReportCell); -begin - AHost.CellSides := []; - AHost.Data := Integer(Adapter.GridView); - AHost.Transparent := True; -end; - -function TdxCustomGridViewFormatter.GetHostClass: TdxReportCellClass; -begin - Result := TdxReportCell; {Host} -end; - -function TdxCustomGridViewFormatter.GetRowHostClass: TdxReportCellClass; -begin - Result := TdxReportCell; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeCaption(ACaption: TdxReportCellText); -begin - SetViewParams(ACaption, GetCaptionViewParams); - if HasBackgroundBitmap(bbTabs) then - ACaption.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbTabs); - RegisterLookAndFeelItem(ACaption, cesRaised); - ACaption.Data := Integer(TdxGridLevelCaption); - ACaption.Text := Adapter.CaptionText; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeCaptionRow(ARow: TdxReportCell); -begin -end; - -procedure TdxCustomGridViewFormatter.DoReportLinkInitializeCaption(ACaption: TdxReportCellText); -begin - ReportLink.DoInitializeLevelCaption(Adapter.GridView, TdxReportCellString(ACaption)); -end; - -function TdxCustomGridViewFormatter.GetCaptionClass: TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxCustomGridViewFormatter.GetCaptionViewParams: TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetCaptionParams(Adapter.GridLevel, Result.NativeParams) - else - Result.NativeParams := Adapter.GetCaptionViewParams; - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - begin - Result.NativeParams.Color := Adapter.ThemedCaptionColor; - Result.NativeParams.TextColor := Adapter.ThemedCaptionTextColor; - end; - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeFilterBar(AFilterBar: TdxReportCellText); -begin - SetViewParams(AFilterBar, GetFilterBarViewParams); - if HasBackgroundBitmap(bbFilterBox) then - AFilterBar.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbFilterBox); - - with AFilterBar do - begin - Data := Integer(TdxGridFilterBar); - EndEllipsis := True; - Text := Adapter.FilterText; - end; - - if not Adapter.FilterEmpty then - with TdxReportCellCheck(AFilterBar) do - begin - Checked := Adapter.FilterActive; - CheckPos := ccpLeft; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeFilterBarRow(ARow: TdxReportCell); -begin -end; - -procedure TdxCustomGridViewFormatter.DoReportLinkInitializeFilterBar(AFilterBar: TdxReportCellText); -begin - ReportLink.DoInitializeFilterBar(TcxCustomGridTableView(Adapter.GridView), TdxReportCellString(AFilterBar)); -end; - -function TdxCustomGridViewFormatter.GetFilterBarClass: TdxReportCellTextClass; -const - CheckClasses: array[Boolean] of TdxReportCellTextClass = (TdxReportCellCheck, TdxReportCellString); -begin - Result := CheckClasses[Adapter.FilterEmpty]; -end; - -function TdxCustomGridViewFormatter.GetFilterBarViewParams: TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetFilterBarParams(Result.NativeParams) - else - Result.NativeParams := Adapter.GetFilterBarViewParams; - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - begin - Result.NativeParams.Color := Adapter.ThemedCaptionColor; - Result.NativeParams.TextColor := Adapter.ThemedCaptionTextColor; - end; - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeDetailsSeparatorRow(ARow: TdxReportCell); -begin -end; - -procedure TdxCustomGridViewFormatter.DoInitializeHorzDetailsSeparator(ASeparator: TdxReportCellBox); -begin - with ASeparator do - begin - CellSides := csTopBottom; - Color := DetailsSeparatorColor; - Transparent := False; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeVertBottomDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - DoInitializeVertDetailsSeparator(ASeparator, ASeparatorKind); - case ASeparatorKind of - vdskLeading: - ASeparator.CellSides := [csLeft, csBottom]; - vdskTrailing: - ASeparator.CellSides := [csRight, csBottom]; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeVertDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - with ASeparator do - begin - CellSides := [csLeft, csRight]; - Color := DetailsSeparatorColor; - Transparent := False; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeVertTopDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - DoInitializeVertDetailsSeparator(ASeparator, ASeparatorKind); - case ASeparatorKind of - vdskLeading: - ASeparator.CellSides := [csLeft, csTop]; - vdskTrailing: - ASeparator.CellSides := [csRight, csTop]; - end; -end; - -function TdxCustomGridViewFormatter.GetDetailsSeparatorClass: TdxReportCellBoxClass; -begin - Result := TdxReportCellBox; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer); -begin -end; - -function TdxCustomGridViewFormatter.GetMasterIndentClass: TdxReportCellExpandButtonClass; -begin - Result := TdxReportCellExpandButton; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeViewTerminator(ATerminator: TdxReportCellBox); -begin - ATerminator.CellSides := [csBottom]; - ATerminator.Transparent := True; -end; - -function TdxCustomGridViewFormatter.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; -function TdxCustomGridViewFormatter._AddRef: Integer; -begin - Result := 1; -end; -function TdxCustomGridViewFormatter._Release: Integer; -begin - Result := 1; -end; - -procedure TdxCustomGridViewFormatter.AddDelimiters; -begin - AddHorizontalDelimiters; - AddVerticalDelimiters; -end; - -procedure TdxCustomGridViewFormatter.AddHorizontalDelimiters; -begin -end; - -procedure TdxCustomGridViewFormatter.AddVerticalDelimiters; -var - I: Integer; -begin - if ReportLink.OptionsPagination.Row then - for I := 0 to Builder.ReportRowCount - 1 do - ReportLink.AddVerticalDelimiter(Builder.ReportRows[I]); -end; - -procedure TdxCustomGridViewFormatter.AfterBuilding; -begin - Adapter.AfterBuilding; - FormatLookAndFeelItems; - FormatExpandButtons; - AddDelimiters; -end; - -procedure TdxCustomGridViewFormatter.BeforeBuilding; -begin - Adapter.BeforeBuilding; - Calculate; -end; - -procedure TdxCustomGridViewFormatter.Calculate; -begin - CalculateLineHeights; -end; - -procedure TdxCustomGridViewFormatter.CalculateLineHeights; -begin - CaptionLineHeight := 2 * TabsAreaOffset + CalculateFontHeight(GetCaptionViewParams); - FilterBarLineHeight := 2 * FilterBarTextOffset + CalculateFontHeight(GetFilterBarViewParams); -end; - -function TdxCustomGridViewFormatter.GetDetailsSeparatorColor: TColor; -begin - Result := Adapter.DetailsSeparatorColor; - {with ReportLink.OptionsFormatting do - if UseNativeStyles then - begin - Result := FixedColor; - end;} -end; - -function TdxCustomGridViewFormatter.GetDetailsSeparatorThickness: Integer; -begin - Result := Adapter.DetailsSeparatorThickness; -end; - -function TdxCustomGridViewFormatter.GetHasDetailsSeparator: Boolean; -begin - Result := Adapter.HasDetailsSeparator; -end; - -function TdxCustomGridViewFormatter.GetSiteHeight: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if ReportLink.IsAggregated and - Supports(TObject(ReportLink.Controller), IdxReportLinkController, ControllerIntf) then - with ControllerIntf.GetControlSiteBounds(ReportLink.Grid) do - Result := Bottom - Top - 1 - else - with ReportLink.RealPrinterPage.PaintRectPixels do - Result := Bottom - Top - 1; -end; - -function TdxCustomGridViewFormatter.GetSiteWidth: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if ReportLink.IsAggregated and - Supports(TObject(ReportLink.Controller), IdxReportLinkController, ControllerIntf) then - with ControllerIntf.GetControlSiteBounds(ReportLink.Grid) do - Result := Right - Left - 1 - else - with ReportLink.RealPrinterPage.PaintRectPixels do - Result := Right - Left - 1; -end; - -function TdxCustomGridViewFormatter.GetViewWidth: Integer; -begin - Result := 0; -end; - -function TdxCustomGridViewFormatter.GetViewWidthExtraAfter: Integer; -var - I: Integer; -begin - Result := 0; - - for I := 0 to AbsoluteLevel - 1 do - with Builder.AbsoluteBuilders[I].Adapter do - if HasDetailsSeparator then Inc(Result, DetailsSeparatorThickness); - - if Adapter.HasDetailsSeparator then - Inc(Result, Adapter.DetailsSeparatorThickness); -end; - -function TdxCustomGridViewFormatter.GetViewWidthExtraBefore: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AbsoluteLevel - 1 do - with Builder.AbsoluteBuilders[I].Adapter do - begin - Inc(Result, ViewWidthExtra); - if HasDetailsSeparator then Inc(Result, DetailsSeparatorThickness); - end; - - if Adapter.HasDetailsSeparator then - Inc(Result, Adapter.DetailsSeparatorThickness); -end; - -function TdxCustomGridViewFormatter.BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; -begin - Result := Adapter.BackgroundBitmaps; -end; - -function TdxCustomGridViewFormatter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - Result := ReportLink.Styles.GetBitmap(MapStyleBackgroundBitmapIndex(Index)) - else - Result := Adapter.GetBackgroundBitmap(Index); -end; - -function TdxCustomGridViewFormatter.GetBackgroundBitmapIndex(Index: Integer): Integer; -begin - Result := ReportLink.AddBackgroundBitmapToPool(GetBackgroundBitmap(Index)); -end; - -function TdxCustomGridViewFormatter.HasBackgroundBitmap(Index: Integer): Boolean; -var - Bitmap: TBitmap; -begin - if not ReportLink.OptionsFormatting.SuppressBackgroundBitmaps then - begin - Bitmap := GetBackgroundBitmap(Index); - Result := (Bitmap <> nil) and not Bitmap.Empty; - end - else - Result := False; -end; - -function TdxCustomGridViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbTabs: - Result := vspsGridCaption; - bbContent: - Result := vspsGridContent; - bbFilterBox: - Result := vspsGridFilterBar; - else - Result := 0; - end; -end; - -function TdxCustomGridViewFormatter.CalculateFontHeight(const AParams: TdxReportItemViewParams): Integer; -begin - Result := Renderer.CalcTextPatternHeight(DC, AParams.NativeParams.Font); -end; - -procedure TdxCustomGridViewFormatter.CalculateHeight(const AParams: TdxReportItemViewParams; - var AHeight: Integer); -var - Value: Integer; -begin - Value := CalculateFontHeight(AParams); - if Value > AHeight then AHeight := Value; -end; - -function TdxCustomGridViewFormatter.GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; -begin - if AParams.NativeParams.Font <> nil then - begin - FFont.Assign(AParams.NativeParams.Font); - if not dxPSUtl.dxIsTrueTypeFont(FFont) then - FFont.Name := ReportLink.Font.Name; - FFont.Color := ColorToRGB(AParams.NativeParams.TextColor); - FFont.Style := FFont.Style + AParams.FontStyle; - Result := ReportLink.AddFontToPool(FFont); - end - else - Result := 0; -end; - -function TdxCustomGridViewFormatter.IsColorTransparent(AColor: TColor): Boolean; -begin - Result := ColorToRGB(AColor) = ColorToRGB(TransparentColor); -end; - -procedure TdxCustomGridViewFormatter.RegisterExpandButton(AExpandButton: TdxReportCellExpandButton); -begin - FExpandButtons.Add(AExpandButton); -end; - -procedure TdxCustomGridViewFormatter.RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; - AEdgeStyle: TdxCellEdgeStyle); -begin - AnItem.EdgeMode := Self.EdgeMode; - AnItem.Edge3DStyle := AEdgeStyle; - FLookAndFeelItems.Add(AnItem); -end; - -procedure TdxCustomGridViewFormatter.SetViewParams(AnItem: TdxReportVisualItem; - const AParams: TdxReportItemViewParams); -begin - AnItem.CellSides := AParams.CellSides; - AnItem.Color := ColorToRGB(AParams.NativeParams.Color); - AnItem.FontIndex := GetStyleFontIndex(AParams); - AnItem.Transparent := AParams.Transparent; -end; - -function TdxCustomGridViewFormatter.GetAbsoluteLevel: Integer; -begin - Result := Adapter.AbsoluteLevel; - if ReportLink.OptionsDetails.StartFromFocusedView then - Dec(Result, (ReportLink.ActiveView.Level as TcxGridLevel).Level); -end; - -function TdxCustomGridViewFormatter.GetAutoWidth: Boolean; -begin - Result := ReportLink.OptionsSize.AutoWidth or Adapter.AutoWidth; -end; - -function TdxCustomGridViewFormatter.GetDC: HDC; -begin - Result := ReportLink.ScreenDC; -end; - -function TdxCustomGridViewFormatter.GetEdgeMode: TdxCellEdgeMode; -const - EdgeModeMap: array[Boolean] of TdxCellEdgeMode = (cemPattern, cem3DEffects); -begin - Result := EdgeModeMap[ReportLink.OptionsFormatting.LookAndFeelKind <> lfUltraFlat]; -end; - -function TdxCustomGridViewFormatter.GetGridWidth: Integer; -begin - Result := Adapter.GridWidth; -end; - -function TdxCustomGridViewFormatter.GetExpandButton(Index: Integer): TdxReportCellExpandButton; -begin - Result := FExpandButtons[Index]; -end; - -function TdxCustomGridViewFormatter.GetExpandButtonCount: Integer; -begin - Result := FExpandButtons.Count; -end; - -function TdxCustomGridViewFormatter.GetIndentWidth: Integer; -begin - Result := Adapter.IndentWidth; -end; - -function TdxCustomGridViewFormatter.GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; -begin - Result := FLookAndFeelItems[Index]; -end; - -function TdxCustomGridViewFormatter.GetLookAndFeelItemCount: Integer; -begin - Result := FLookAndFeelItems.Count; -end; - -function TdxCustomGridViewFormatter.GetPaginateByTopLevelGroups: Boolean; -begin - Result := ReportLink.OptionsPagination.TopLevelGroup; -end; - -function TdxCustomGridViewFormatter.GetRenderer: TdxPSReportRenderer; -begin - Result := ReportLink.Renderer; -end; - -function TdxCustomGridViewFormatter.GetReportLink: TdxGridReportLink; -begin - Result := Builder.ReportLink; -end; - -function TdxCustomGridViewFormatter.GetShowCaption: Boolean; -begin - Result := ReportLink.OptionsView.Caption; -end; - -function TdxCustomGridViewFormatter.GetShowFilterBar: Boolean; -begin - Result := ReportLink.OptionsView.FilterBar; -end; - -function TdxCustomGridViewFormatter.GetUseLookAndFeelColors: Boolean; -begin - Result := ReportLink.OptionsFormatting.UseLookAndFeelColors; -end; - -function TdxCustomGridViewFormatter.GetViewAvailableWidth: Integer; -begin - if ReportLink.OptionsSize.AutoWidth then - Result := SiteWidth - else - Result := Adapter.ViewWidth; - Dec(Result, ViewWidthExtraBefore + ViewWidthExtraAfter); -end; - -function TdxCustomGridViewFormatter.GetViewWidthExtra: Integer; -begin - Result := Adapter.ViewWidthExtra; -end; - -procedure TdxCustomGridViewFormatter.FormatLookAndFeelItems; -const - Borders3D: array[TdxCellEdgeStyle, Boolean] of TdxPSCellBorderClass = - ((TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder), - (TdxPSCellSunkenBorder, TdxPSCellSunkenSoftBorder)); -var - I: Integer; -begin - for I := 0 to LookAndFeelItemCount - 1 do - with LookAndFeelItems[I] do - if ReportLink.Effects3D then - BorderClass := Borders3D[Edge3DStyle, ReportLink.Soft3D] - else - BorderClass := TdxPSCellUltraFlatBorder; -end; - -procedure TdxCustomGridViewFormatter.FormatExpandButtons; -var - I: Integer; -begin - for I := 0 to ExpandButtonCount - 1 do - with ExpandButtons[I] do - begin - ButtonBorder3D := ReportLink.Effects3D; - ButtonBorder3DSoft := ReportLink.Soft3D; - end; -end; - -{ TdxCustomGridViewBuilder } - -constructor TdxCustomGridViewBuilder.Create(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); - - function GetMasterAdapter: TdxCustomGridViewAdapter; - begin - if AMasterBuilder = nil then - Result := nil - else - Result := AMasterBuilder.Adapter; - end; - -begin - inherited Create; - FReportLink := AReportLink; - FMasterBuilder := AMasterBuilder; - FGridView := AGridView; - - FAdapter := CreateAdapter(GetMasterAdapter, GridView); - FFormatter := FormatterClass.Create(Self); - FProducerCache := TdxProducerCache.Create(Self); - FReportRows := TList.Create; - - if MasterBuilder <> nil then - MasterBuilder.FDetailsBuilder := Self; -end; - -destructor TdxCustomGridViewBuilder.Destroy; -begin - if MasterBuilder <> nil then - MasterBuilder.FDetailsBuilder := nil; - FreeAndNil(FReportRows); - FreeAndNil(FProducerCache); - FreeAndNil(FFormatter); - FreeAndNil(FAdapter); - inherited; -end; - -function TdxCustomGridViewBuilder.Adapter: TdxCustomGridViewAdapter; -begin - Result := FAdapter; -end; - -class function TdxCustomGridViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxCustomGridViewAdapter; -end; - -class function TdxCustomGridViewBuilder.CreateAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := AdapterClass.Create(AMasterAdapter, AGridView); -end; - -function TdxCustomGridViewBuilder.Formatter: TdxCustomGridViewFormatter; -begin - Result := FFormatter; -end; - -class function TdxCustomGridViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxCustomGridViewFormatter; -end; - -procedure TdxCustomGridViewBuilder.Build; -begin - BeforeBuilding; - try - DoBuild; - finally - AfterBuilding; - end; -end; - -function TdxCustomGridViewBuilder.IsAborted: Boolean; -begin - Result := ReportLink.AbortBuilding; -end; - -procedure TdxCustomGridViewBuilder.Progress(const APercentDone: Double); -begin - ReportLink.DoProgress(APercentDone); -end; - -class function TdxCustomGridViewBuilder.PairClass: TClass; -begin - Result := GridViewClass; -end; - -class procedure TdxCustomGridViewBuilder.Register; -begin - dxGridViewBuildersFactory.Register(Self); -end; - -class procedure TdxCustomGridViewBuilder.Unregister; -begin - dxGridViewBuildersFactory.Unregister(Self); -end; - -procedure TdxCustomGridViewBuilder.AddReportRow(ARow: TdxReportCell); -begin - if ARow.Parent = ReportLink.ReportCells.Cells then - FReportRows.Add(ARow); -end; - -procedure TdxCustomGridViewBuilder.AfterBuilding; -begin - if not IsAborted then Formatter.AfterBuilding; -end; - -procedure TdxCustomGridViewBuilder.BeforeBuilding; -begin - Formatter.BeforeBuilding; -end; - -procedure TdxCustomGridViewBuilder.DoBuild; -begin - DoBuildViewHeader; - DoBuildViewBody; - if not IsAborted then DoBuildViewFooter; -end; - -procedure TdxCustomGridViewBuilder.DoBuildViewBody; -begin -end; - -procedure TdxCustomGridViewBuilder.DoBuildViewFooter; -begin -end; - -procedure TdxCustomGridViewBuilder.DoBuildViewHeader; -begin -end; - -function TdxCustomGridViewBuilder.GetViewAvailableWidth: Integer; -begin - Result := Formatter.ViewAvailableWidth; -end; - -procedure TdxCustomGridViewBuilder.CreateCaption; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetCaptionProducer.Produce(HostInfoServices.CaptionHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetCaptionProducer: TdxGridViewCaptionProducer; -begin - Result := ProducerCache[GetCaptionProducerClass] as TdxGridViewCaptionProducer; -end; - -function TdxCustomGridViewBuilder.GetCaptionProducerClass: TdxGridViewCaptionProducerClass; -begin - Result := TdxGridViewCaptionProducer; -end; - -procedure TdxCustomGridViewBuilder.CreateBottomDetailsSeparator; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetDetailsBottomSeparatorProducer.Produce(HostInfoServices.LevelSeparatorBottomHostInfo); - AddReportRow(ReportRow); -end; - -procedure TdxCustomGridViewBuilder.CreateTopDetailsSeparator; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetDetailsTopSeparatorProducer.Produce(HostInfoServices.LevelSeparatorTopHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetDetailsBottomSeparatorProducer: TdxGridViewDetailsSeparatorProducer; -begin - Result := ProducerCache[GetDetailsBottomSeparatorProducerClass] as TdxGridViewDetailsSeparatorProducer; -end; - -function TdxCustomGridViewBuilder.GetDetailsBottomSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; -begin - Result := TdxGridViewDetailsBottomSeparatorProducer; -end; - -function TdxCustomGridViewBuilder.GetDetailsTopSeparatorProducer: TdxGridViewDetailsSeparatorProducer; -begin - Result := ProducerCache[GetDetailsTopSeparatorProducerClass] as TdxGridViewDetailsSeparatorProducer; -end; - -function TdxCustomGridViewBuilder.GetDetailsTopSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; -begin - Result := TdxGridViewDetailsTopSeparatorProducer; -end; - -procedure TdxCustomGridViewBuilder.CreateFilterBar; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetFilterBarProducer.Produce(HostInfoServices.FilterBarHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetFilterBarProducer: TdxGridViewFilterBarProducer; -begin - Result := ProducerCache[GetFilterBarProducerClass] as TdxGridViewFilterBarProducer; -end; - -function TdxCustomGridViewBuilder.GetFilterBarProducerClass: TdxGridViewFilterBarProducerClass; -begin - Result := TdxGridViewFilterBarProducer; -end; - -procedure TdxCustomGridViewBuilder.CreateViewTerminator; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetViewTerminatorProducer.Produce(HostInfoServices.PageDetailsHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetViewTerminatorProducer: TdxGridViewTerminatorProducer; -begin - Result := ProducerCache[GetViewTerminatorProducerClass] as TdxGridViewTerminatorProducer; -end; - -function TdxCustomGridViewBuilder.GetViewTerminatorProducerClass: TdxGridViewTerminatorProducerClass; -begin - Result := TdxGridViewTerminatorProducer; -end; - -function TdxCustomGridViewBuilder.GridView: TcxCustomGridView; -begin - Result := FGridView; -end; - -class function TdxCustomGridViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -function TdxCustomGridViewBuilder.GetAbsoluteBuilder(AIndex: Integer): TdxCustomGridViewBuilder; -begin - Result := RootBuilder; - while AIndex > 0 do - begin - Result := Result.DetailsBuilder; - Dec(AIndex); - end; -end; - -function TdxCustomGridViewBuilder.GetAutoWidth: Boolean; -begin - Result := Formatter.AutoWidth; -end; - -function TdxCustomGridViewBuilder.GetGridLevel: TcxGridLevel; -begin - Result := GridView.Level as TcxGridLevel; -end; - -function TdxCustomGridViewBuilder.GetGrid: TcxCustomGrid; -begin - Result := ReportLink.Grid; -end; - -function TdxCustomGridViewBuilder.GetHost: TdxReportCell; -begin - Result := ReportLink.ReportCells.Cells; -end; - -function TdxCustomGridViewBuilder.GetHostInfoServices: TdxGridAttributeHostInfoServices; -begin - Result := ReportLink.HostInfoServices; -end; - -function TdxCustomGridViewBuilder.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := FReportRows[Index]; -end; - -function TdxCustomGridViewBuilder.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TdxCustomGridViewBuilder.GetRootBuilder: TdxCustomGridViewBuilder; -begin - Result := Self; - while Result.MasterBuilder <> nil do - Result := Result.MasterBuilder; -end; - -{ TdxCustomGridTableViewAdapter } - -constructor TdxCustomGridTableViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited; - FRecordHelpersCache := TdxRecordHelpersCache.Create(Self); - FDetailsLineCount := -1; -end; - -destructor TdxCustomGridTableViewAdapter.Destroy; -begin - FreeAndNil(FRecordHelpersCache); - inherited; -end; - -function TdxCustomGridTableViewAdapter.ForEachRecord(AProc: TdxGridTableAdapterForEachRecordProc; - AData: Integer; AProcessSelection: Boolean): Boolean; -var - I: Integer; - Continue: Boolean; - Record_: TcxCustomGridRecord; -begin - Result := True; - if @AProc = nil then Exit; - - Continue := True; - for I := 0 to RecordCount - 1 do - begin - Record_ := Records[I]; - if not AProcessSelection or Record_.Selected then - AProc(Record_, AData, Continue); - if not Continue then - begin - Result := False; - Break; - end; - end; -end; - -function TdxCustomGridTableViewAdapter.GridView: TcxCustomGridTableView; -begin - Result := inherited GridView as TcxCustomGridTableView; -end; - -class function TdxCustomGridTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridTableView; -end; - -function TdxCustomGridTableViewAdapter.Styles: TcxCustomGridTableViewStyles; -begin - Result := inherited Styles as TcxCustomGridTableViewStyles; -end; - -function TdxCustomGridTableViewAdapter.CalculateDetailsLineCount: Integer; -begin - Result := 1; -end; - -function TdxCustomGridTableViewAdapter.GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; -begin - if (ATableItem <> nil) and (ATableItem.Styles <> nil) then - ATableItem.Styles.GetContentParams(ARecord, Result) - else - Styles.GetContentParams(ARecord, ATableItem, Result); - if Result.Color = clWindow then // 3.2 - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TdxCustomGridTableViewAdapter.GetPreviewViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; -begin - Result := GetContentViewParams(ARecord, ATableItem); -end; - -function TdxCustomGridTableViewAdapter.GetSelectionViewParams: TcxViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - with Styles.Selection do - begin - Result.Bitmap := Bitmap; - Result.Color := Color; - Result.Font := Font; - Result.TextColor := TextColor; - end; -end; - -function TdxCustomGridTableViewAdapter.HasSelectionStyle: Boolean; -begin - Result := Styles.Selection <> nil; -end; - -function TdxCustomGridTableViewAdapter.Controller: TcxCustomGridTableController; -begin - Result := inherited Controller as TcxCustomGridTableController; -end; - -procedure TdxCustomGridTableViewAdapter.DoExpandMasterRow(ARecord: TcxCustomGridRecord; - AData: Integer; var AContinue: Boolean); -begin - if (ARecord is TcxGridMasterDataRow) and ARecord.Expandable then - GridMasterDataRow_DoExpand(TcxGridMasterDataRow(ARecord), True); - {begin - ARecord.Expanded := True; - with TcxGridMasterDataRow(ARecord) do - if ActiveDetailGridViewExists then - ExpandAllRowsInGridView(ActiveDetailGridView, True, Boolean(AData)); - end;} -end; - -procedure TdxCustomGridTableViewAdapter.ExpandAllGroupRows; -begin - DataController.Groups.FullExpand; -end; - -procedure TdxCustomGridTableViewAdapter.ExpandAllMasterRows(AnExpandGroups: Boolean); -begin - ForEachRecord(DoExpandMasterRow, Integer(AnExpandGroups), False); -end; - -procedure TdxCustomGridTableViewAdapter.ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); -begin - if AGroupRows then ExpandAllGroupRows; - if AMasterRows then ExpandAllMasterRows(AGroupRows); -end; - -function TdxCustomGridTableViewAdapter.GetAreAllMasterRowsCollapsed: Boolean; -begin - Result := ForEachRecord(IsMasterRowCollapsed, 0, False); -end; - -function TdxCustomGridTableViewAdapter.GetCanUseOnEveryPageMode: Boolean; -begin - Result := RecordCount <> 0; -end; - -function TdxCustomGridTableViewAdapter.GetHasSelectedRecords: Boolean; -var - I: Integer; -begin - Result := SelectedRecordCount <> 0; - if not Result then - for I := 0 to RecordCount - 1 do - begin - Result := RecordHelpers[Records[I]].HasSelectedChildren; - if Result then Break; - end; -end; - -function TdxCustomGridTableViewAdapter.GetMasterGridRecord: TcxCustomGridRecord; -begin - Result := GridView.MasterGridRecord; -end; - -function TdxCustomGridTableViewAdapter.GetRecordCount: Integer; -begin - Result := GridView.ViewData.RecordCount; -end; - -class function TdxCustomGridTableViewAdapter.GetProperties(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; -begin - Result := AnItem.GetProperties(ARecord); - if Result = nil then - Result := GetRepositoryItem(AnItem, ARecord).Properties; -end; - -class function TdxCustomGridTableViewAdapter.GetPropertiesClass(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditPropertiesClass; -begin - Result := TcxCustomEditPropertiesClass(GetProperties(AnItem, ARecord).ClassType); -end; - -class function TdxCustomGridTableViewAdapter.GetRepositoryItem(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxEditRepositoryItem; -begin - Result := AnItem.GetRepositoryItem; -end; - -procedure TdxCustomGridTableViewAdapter.IsMasterRowCollapsed(ARecord: TcxCustomGridRecord; - AData: Integer; var AContinue: Boolean); -begin - if ARecord is TcxGridMasterDataRow then - AContinue := not ARecord.Expanded; -end; - -function TdxCustomGridTableViewAdapter.GetCellAutoHeight: Boolean; -begin - Result := CustomGridTableOptionsView_GetCellAutoHeight(GridView.OptionsView); -end; - -function TdxCustomGridTableViewAdapter.GetCellMultiline: Boolean; -begin - Result := CustomGridTableOptionsView_GetCellAutoHeight(GridView.OptionsView); -end; - -function TdxCustomGridTableViewAdapter.GetGridLineColor: TColor; -begin - Result := GridView.LookAndFeelPainter.DefaultGridLineColor; -end; - -function TdxCustomGridTableViewAdapter.GetCellEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.CellEndEllipsis; -end; - -function TdxCustomGridTableViewAdapter.GetDetailsLineCount: Integer; -begin - if FDetailsLineCount = -1 then - FDetailsLineCount := CalculateDetailsLineCount; - Result := FDetailsLineCount; -end; - -function TdxCustomGridTableViewAdapter.GetFiltering: TcxCustomGridTableFiltering; -begin - Result := GridView.Filtering; -end; - -function TdxCustomGridTableViewAdapter.GetIsGridMode: Boolean; -begin - Result := DataController.IsGridMode; -end; - -function TdxCustomGridTableViewAdapter.GetRecord(Index: Integer): TcxCustomGridRecord; -begin - Result := GridView.ViewData.Records[Index]; -end; - -function TdxCustomGridTableViewAdapter.GetRecordHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; -begin - Result := RecordHelpersCache.Helpers[ARecord]; -end; - -function TdxCustomGridTableViewAdapter.GetSelectedRecord(Index: Integer): TcxCustomGridRecord; -begin - Result := Controller.SelectedRecords[Index] -end; - -function TdxCustomGridTableViewAdapter.GetSelectedRecordCount: Integer; -begin - if CustomGridTableController_GetMultiSelect(Controller) then - Result := Controller.SelectedRecordCount - else - Result := 0; -end; - -{ TdxCustomGridTableViewFormatter } - -constructor TdxCustomGridTableViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FRecordIndexes := TList.Create; - FSelectedRecordList := TList.Create; - //if ReportLink.OptionsSelection.ProcessSelection then BuildSelectedRecordList; {moved to BeforeBuilding in 3.03} -end; - -destructor TdxCustomGridTableViewFormatter.Destroy; -begin - FreeAndNil(FRecordIndexes); - FreeAndNil(FSelectedRecordList); - inherited; -end; - -function TdxCustomGridTableViewFormatter.Adapter: TdxCustomGridTableViewAdapter; -begin - Result := inherited Adapter as TdxCustomGridTableViewAdapter; -end; - -function TdxCustomGridTableViewFormatter.Builder: TdxCustomGridTableViewBuilder; -begin - Result := inherited Builder as TdxCustomGridTableViewBuilder; -end; - -function TdxCustomGridTableViewFormatter.IndexOfRecord(ARecord: TcxCustomGridRecord): Integer; -begin - for Result := 0 to RecordCount - 1 do - if Records[Result] = ARecord then Exit; - Result := -1; -end; - -procedure TdxCustomGridTableViewFormatter.DoInitializeItem(AnItem: TAbstractdxReportCellData; - ATableItem: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False); - - function GetContentBackgroundBitmapStyleIndex: Integer; - begin - if AnIsPreview then - Result := bbPreview - else - Result := Self.GetContentBackgroundBitmapStyleIndex(ATableItem); - end; - -var - Properties: TcxCustomEditProperties; - ViewParams: TdxReportItemViewParams; - CellValue: TcxEditValue; - ContentBackgroundBitmapStyleIndex: Integer; -begin - Properties := GetItemProperties(ATableItem, ARecord); - ViewParams := GetItemViewParams(ATableItem, ARecord, AnIsPreview); - CellValue := GetItemValue(Properties, ATableItem, ARecord); - dxPScxCommon.dxPSDataMaps.InitializeItem(AnItem, Properties, CellValue, Self, ViewParams, AnIsPreview, ARecord.RecordIndex); - dxPScxCommon.dxPSDataMaps.GetImageLists(Properties, ReportLink.AppendImageList); - SetViewParams(AnItem, ViewParams); - - ContentBackgroundBitmapStyleIndex := GetContentBackgroundBitmapStyleIndex; - if HasBackgroundBitmap(ContentBackgroundBitmapStyleIndex) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(ContentBackgroundBitmapStyleIndex); - - AnItem.Data := Integer(ATableItem); -end; - -function TdxCustomGridTableViewFormatter.GetItemClass(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := dxPSDataMaps.ItemClass(GetItemProperties(ATableItem, ARecord), AnIsPreview); -end; - -function TdxCustomGridTableViewFormatter.GetItemProperties(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; -begin - Result := Adapter.GetProperties(ATableItem, ARecord); -end; - -function TdxCustomGridTableViewFormatter.GetItemValue(AProperties: TcxCustomEditProperties; - ATableItem: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord): TcxEditValue; -begin - if AProperties.GetEditValueSource(False) = evsValue then - Result := ARecord.Values[ATableItem.Index] - else - Result := ARecord.DisplayTexts[ATableItem.Index]; -end; - -function TdxCustomGridTableViewFormatter.GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - if AnIsPreview then - ReportLink.Styles.GetPreviewParams(ARecord, ATableItem, Result.NativeParams) - else - ReportLink.Styles.GetContentParams(ARecord, ATableItem, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - if AnIsPreview then - Result.NativeParams := Adapter.GetPreviewViewParams(ARecord, ATableItem) - else - Result.NativeParams := Adapter.GetContentViewParams(ARecord, ATableItem); -end; - -{ IdxPSCellParams } - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetAutoHeight: Boolean; -begin - Result := Adapter.CellAutoHeight; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetDC: HDC; -begin - Result := Self.DC; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; -begin - Result := ReportLink.OptionsRefinements.DisplayGraphicsAsText; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetEndEllipsis: Boolean; -begin - Result := Adapter.CellEndEllipsis; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetFlatCheckMarks: Boolean; -begin - Result := ReportLink.OptionsRefinements.FlatCheckMarks; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetGraphicsText: string; -begin - Result := ReportLink.OptionsRefinements.GraphicsText; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetMultiline: Boolean; -begin - Result := Adapter.CellMultiline; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetTransparentGraphics: Boolean; -begin - Result := ReportLink.OptionsRefinements.TransparentGraphics; -end; - -{ IdxPSCellParams2 } -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := dxTextSpace; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := dxTextSpace; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - Result := -1; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := -1; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; -const - GraphicClasses: array[Boolean] of TGraphicClass = (TMetafile, TBitmap); -begin - Result := GraphicClasses[IdxPSCellParams2_GetRichEditTransparent]; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetRichEditTransparent: Boolean; -begin - Result := False; -end; - -procedure TdxCustomGridTableViewFormatter.AfterBuilding; -begin - inherited; - ReportLink.ReportCells.BorderColor := GridLineColor; -end; - -procedure TdxCustomGridTableViewFormatter.BeforeBuilding; -begin - inherited; - if ReportLink.OptionsSelection.ProcessSelection then BuildSelectedRecordList; -end; - -procedure TdxCustomGridTableViewFormatter.BuildSelectedRecordList; -var - I: Integer; - ARecord: TcxCustomGridRecord; - IsRecordIncluded: Boolean; - Helper: TdxCustomGridRecordHelper; -begin - SelectedRecordList.Clear; - - for I := 0 to Adapter.RecordCount - 1 do - begin - ARecord := Adapter.Records[I]; - IsRecordIncluded := ARecord.Selected; - if not IsRecordIncluded then - begin - Helper := Adapter.RecordHelpers[ARecord]; - IsRecordIncluded := Helper.HasSelectedChildren or - (not ReportLink.OptionsSelection.ProcessExactSelection and (SelectedRecordList.IndexOf(Helper.Parent) <> -1)); - end; - - if IsRecordIncluded then - SelectedRecordList.Add(ARecord); - end; -end; - -function TdxCustomGridTableViewFormatter.CanProcessSelectionStyle(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := (ARecord <> nil) and ReportLink.OptionsFormatting.ConsumeSelectionStyle and IsSelectedRecord(ARecord); - if Result and not ReportLink.OptionsFormatting.UseNativeStyles then - Result := Adapter.HasSelectionStyle; -end; - -function TdxCustomGridTableViewFormatter.IsSelectedRecord(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := (SelectedRecordCount <> 0) or ARecord.Selected; -end; - -function TdxCustomGridTableViewFormatter.GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; -begin - Result := bbContent; -end; - -function TdxCustomGridTableViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbContent: - Result := vspsGridContent; - else - Result := 0; - end; - - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -function TdxCustomGridTableViewFormatter.GetGridLineColor: TColor; -begin - Result := ReportLink.OptionsFormatting.GridLineColor; - if Result = clDefault then - Result := Adapter.GridLineColor; -end; - -function TdxCustomGridTableViewFormatter.GetRecord(Index: Integer): TcxCustomGridRecord; -begin - if SelectedRecordCount <> 0 then - Result := SelectedRecords[Index] - else - Result := Adapter.Records[Index]; -end; - -function TdxCustomGridTableViewFormatter.GetRecordCount: Integer; -begin - Result := SelectedRecordCount; - if Result = 0 then - Result := Adapter.RecordCount; -end; - -function TdxCustomGridTableViewFormatter.GetRecordIndex(ARecord: TcxCustomGridRecord): Integer; -var - RecordIndex, IndexCount, I: Integer; -begin - RecordIndex := ARecord.Index; - IndexCount := FRecordIndexes.Count; - if RecordIndex > IndexCount - 1 then - begin - FRecordIndexes.Count := RecordIndex + 1; - for I := IndexCount to FRecordIndexes.Count - 1 do - FRecordIndexes[I] := TObject(-1); - end; - Result := Integer(FRecordIndexes[RecordIndex]); - if Result = -1 then - begin - FRecordIndexes[RecordIndex] := TObject(IndexOfRecord(ARecord)); - Result := Integer(FRecordIndexes[RecordIndex]); - end; -end; - -function TdxCustomGridTableViewFormatter.GetSelectedRecord(Index: Integer): TcxCustomGridRecord; -begin - Result := FSelectedRecordList[Index]; -end; - -function TdxCustomGridTableViewFormatter.GetSelectedRecordCount: Integer; -begin - Result := FSelectedRecordList.Count; -end; - -{ TdxCustomGridTableViewBuilder } - -function TdxCustomGridTableViewBuilder.Adapter: TdxCustomGridTableViewAdapter; -begin - Result := inherited Adapter as TdxCustomGridTableViewAdapter; -end; - -class function TdxCustomGridTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxCustomGridTableViewAdapter; -end; - -function TdxCustomGridTableViewBuilder.Formatter: TdxCustomGridTableViewFormatter; -begin - Result := inherited Formatter as TdxCustomGridTableViewFormatter; -end; - -class function TdxCustomGridTableViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxCustomGridTableViewFormatter; -end; - -procedure TdxCustomGridTableViewBuilder.DoBuildViewFooter; -begin - if Formatter.ShowFilterBar then - CreateFilterBar; - if Formatter.HasDetailsSeparator then - CreateBottomDetailsSeparator; - inherited; -end; - -procedure TdxCustomGridTableViewBuilder.DoBuildViewHeader; -begin - inherited; - if Formatter.HasDetailsSeparator then - CreateTopDetailsSeparator; - if Formatter.ShowCaption then - CreateCaption; -end; - -procedure TdxCustomGridTableViewBuilder.DoGetCellHeight(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; var AHeight: Integer); -begin - ReportLink.DoGetCellHeight(GridView, ARecord, ATableItem, AHeight); -end; - -function TdxCustomGridTableViewBuilder.GridView: TcxCustomGridTableView; -begin - Result := inherited GridView as TcxCustomGridTableView; -end; - -class function TdxCustomGridTableViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridTableView; -end; - -{ TdxGridTableViewAdapter } - -constructor TdxGridTableViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited; - GridTableViewInfo_CalculateExpandButtonParams(GridView.ViewInfo); // because LevelIndent -end; - -function TdxGridTableViewAdapter.GridView: TcxGridTableView; -begin - Result := inherited GridView as TcxGridTableView; -end; - -class function TdxGridTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -function TdxGridTableViewAdapter.Styles: TcxGridTableViewStyles; -begin - Result := inherited Styles as TcxGridTableViewStyles; -end; - -function TdxGridTableViewAdapter.HasDetails(AGridRow: TcxCustomGridRow): Boolean; -begin - Result := RecordHelpers[AGridRow].HasDetails; -end; - -function TdxGridTableViewAdapter.GetGroupFooterCount(AGridRow: TcxCustomGridRow): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AGridRow.Level do - if HasGroupFooter(AGridRow, I) then - Inc(Result); -end; - -function TdxGridTableViewAdapter.GetGroupFooterItemText(ARowIndex, ALevel, AIndex: Integer): string; -var - SummaryIndex: Integer; -begin - SummaryIndex := Summary.GroupFooterIndexOfItemLink[ALevel, Columns[AIndex]]; - if SummaryIndex <> -1 then - Result := Summary.GroupFooterSummaryTexts[ARowIndex, ALevel, SummaryIndex] - else - Result := ''; -end; - -function TdxGridTableViewAdapter.HasGroupFooter(AGridRow: TcxCustomGridRow; ALevel: Integer): Boolean; -begin - if GroupFootersMode <> gfInvisible then - begin - if GroupFootersMode = gfAlwaysVisible then - Dec(ALevel); - Result := (0 <= ALevel) and (ALevel < AGridRow.Level) and AGridRow.IsParentRecordLast[ALevel]; - if (AGridRow is TcxGridGroupRow) and (GroupFootersMode = gfAlwaysVisible) then - Result := Result or (ALevel = -1) and not AGridRow.Expanded; - end - else - Result := False; -end; - -function TdxGridTableViewAdapter.HasGroupFooterItem(ALevel, AIndex: Integer): Boolean; -begin - Result := Summary.GroupFooterIndexOfItemLink[ALevel, Columns[AIndex]] <> -1; -end; - -function TdxGridTableViewAdapter.HasGroupFooters(AGridRow: TcxCustomGridRow): Boolean; -begin - Result := GetGroupFooterCount(AGridRow) <> 0; -end; - -function TdxGridTableViewAdapter.Controller: TcxGridTableController; -begin - Result := inherited Controller as TcxGridTableController; -end; - -function TdxGridTableViewAdapter.DataController: TcxGridDataController; -begin - Result := GridView.DataController; -end; - -function TdxGridTableViewAdapter.GetAutoWidth: Boolean; -begin - Result := GridView.OptionsView.ColumnAutoWidth; -end; - -function TdxGridTableViewAdapter.GetCellAutoHeight: Boolean; -begin - Result := inherited GetCellAutoHeight and (DetailsLineCount = 1) and not DataRowHeightAssigned; -end; - -function TdxGridTableViewAdapter.GetCellMultiline: Boolean; -begin - Result := inherited GetCellAutoHeight;// {3.1} and not DataRowHeightAssigned;// and (DetailsLineCount <> 1); -end; - -function TdxGridTableViewAdapter.GetHeaderAutoHeight: Boolean; -begin - Result := GridView.OptionsView.HeaderAutoHeight and not HeaderHeightAssigned; -end; - -function TdxGridTableViewAdapter.GetHeaderMultiline(Column: TcxGridColumn): Boolean; -begin - Result := HeaderAutoHeight or HeaderHeightAssigned; -end; - -function TdxGridTableViewAdapter.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount + GroupedColumnCount; - if (Result <> 0) and (GroupedColumnCount <> 0) and IsOffice11StyleGrouping then - Dec(Result); -end; - -function TdxGridTableViewAdapter.GetIndentWidth: Integer; -begin - Result := GridView.ViewInfo.LevelIndent; -end; - -function TdxGridTableViewAdapter.GetIndicatorWidth: Integer; -begin - if GridView.OptionsView.Indicator then - Result := GridView.OptionsView.IndicatorWidth - else - Result := 0; -end; - -function TdxGridTableViewAdapter.GetIsOffice11StyleGrouping: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewAdapter.GetViewWidthExtra: Integer; -var - IndentCount: Integer; -begin - Result := inherited GetViewWidthExtra; - IndentCount := GroupedColumnCount; - if (IndentCount <> 0) and IsOffice11StyleGrouping then - Dec(IndentCount); - Inc(Result, IndentCount * IndentWidth); -end; - -function TdxGridTableViewAdapter.GetDataRowHeight: Integer; -begin - Result := GridView.OptionsView.DataRowHeight; -end; - -function TdxGridTableViewAdapter.GetDataRowHeightAssigned: Boolean; -begin - Result := DataRowHeight <> 0; -end; - -function TdxGridTableViewAdapter.GetFooterHeight: Integer; -begin - Result := GridView.OptionsView.HeaderHeight; -end; - -function TdxGridTableViewAdapter.GetFooterHeightAssigned: Boolean; -begin - Result := False;//FooterHeight <> 0; {PS 3.01} -end; - -function TdxGridTableViewAdapter.GetGroupRowHeight: Integer; -begin - Result := GridView.OptionsView.GroupRowHeight; -end; - -function TdxGridTableViewAdapter.GetGroupRowHeightAssigned: Boolean; -begin - Result := GroupRowHeight <> 0; -end; - -function TdxGridTableViewAdapter.GetHeaderHeight: Integer; -begin - Result := GridView.OptionsView.HeaderHeight; -end; - -function TdxGridTableViewAdapter.GetHeaderHeightAssigned: Boolean; -begin - Result := HeaderHeight <> 0; -end; - -function TdxGridTableViewAdapter.GetFilterBarViewParams: TcxViewParams; -begin - Styles.GetViewParams(vsFilterBox, nil, nil, Result); -end; - -function TdxGridTableViewAdapter.GetFooterViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; AColumn: TcxGridColumn): TcxViewParams; -begin - if (AColumn <> nil) and (AColumn.Styles <> nil) then - AColumn.Styles.GetFooterParams(TcxCustomGridRow(ARecord), Result) - else - Styles.GetFooterParams(TcxCustomGridRow(ARecord), AColumn, Result); -end; - -function TdxGridTableViewAdapter.GetGroupRowViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer): TcxViewParams; -begin - Styles.GetGroupParams(ARecord, AGroupLevel, Result); -end; - -function TdxGridTableViewAdapter.GetHeaderViewParams(AColumn: TcxGridColumn): TcxViewParams; -begin - if (AColumn <> nil) and (AColumn.Styles <> nil) then - AColumn.Styles.GetHeaderParams(Result) - else - Styles.GetHeaderParams(AColumn, Result); - if AColumn = nil then - Result.Color := LookAndFeelPainter.DefaultHeaderBackgroundColor; -end; - -function TdxGridTableViewAdapter.GetPreviewViewParams(ARecord: TcxCustomGridRecord; - AnItem: TcxCustomGridTableItem): TcxViewParams; -begin - Styles.GetPreviewParams(ARecord, TcxGridColumn(AnItem), Result); - // 3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TdxGridTableViewAdapter.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := GridView.VisibleColumns[Index]; -end; - -function TdxGridTableViewAdapter.GetColumnCount: Integer; -begin - Result := GridView.VisibleColumnCount; -end; - -function TdxGridTableViewAdapter.GetExpandButtonColor: TColor; -begin - Result := ExpandButtonInteriorColor; -end; - -function TdxGridTableViewAdapter.GetExpandButtonSize: Integer; -begin - Result := GridView.ViewInfo.ExpandButtonSize; -end; - -function TdxGridTableViewAdapter.GetFooterItemText(Index: Integer): string; -var - SummaryIndex: Integer; -begin - SummaryIndex := Summary.FooterSummaryItems.IndexOfItemLink(Columns[Index]); - if SummaryIndex <> -1 then - Result := Summary.FooterSummaryTexts[SummaryIndex] - else - Result := ''; -end; - -function TdxGridTableViewAdapter.GetFooterMultiline: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewAdapter.GetGridLineColor: TColor; -begin - Result := GridView.OptionsView.GridLineColor; - if Result = clDefault then - Result := GridView.LookAndFeelPainter.DefaultGridLineColor; -end; - -function TdxGridTableViewAdapter.GetGridLines: TcxGridLines; -begin - Result := GridView.OptionsView.GridLines; -end; - -function TdxGridTableViewAdapter.GetGroupedColumn(Index: Integer): TcxGridColumn; -begin - Result := GridView.GroupedColumns[Index]; -end; - -function TdxGridTableViewAdapter.GetGroupedColumnCount: Integer; -begin - Result := GridView.GroupedColumnCount; -end; - -function TdxGridTableViewAdapter.GetGroupFootersMode: TcxGridGroupFootersMode; -begin - Result := GridView.OptionsView.GroupFooters; -end; - -function TdxGridTableViewAdapter.GetGroupFootersMultiline: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewAdapter.GetGroupRowSeparatorColor: TColor; -begin - Result := clBtnFace; -end; - -function TdxGridTableViewAdapter.GetGroupRowSeparatorThickness: Integer; -begin - Result := 2; -end; - -function TdxGridTableViewAdapter.GetHasFooterItem(Index: Integer): Boolean; -begin - Result := Summary.FooterSummaryItems.IndexOfItemLink(Columns[Index]) <> -1; -end; - -function TdxGridTableViewAdapter.GetHasPreview: Boolean; -begin - Result := PreviewColumn <> nil; -end; - -function TdxGridTableViewAdapter.GetHasRowSeparators: Boolean; -begin - Result := RowSeparatorThickness > 0; -end; - -function TdxGridTableViewAdapter.GetHeaderEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.HeaderEndEllipsis; -end; - -function TdxGridTableViewAdapter.GetInternalColumnMinWidth(Column: TcxGridColumn): Integer; -begin - Result := Column.MinWidth; - if Column.IsMostLeft then - Inc(Result, IndentCount * IndentWidth); -end; - -function TdxGridTableViewAdapter.GetInternalColumnWidth(Column: TcxGridColumn): Integer; -begin - Result := Column.Width; - if Column.IsMostLeft then - Inc(Result, IndentCount * IndentWidth); -end; - -function TdxGridTableViewAdapter.GetPreviewColumn: TcxGridColumn; -begin - Result := GridView.Preview.Column; -end; - -function TdxGridTableViewAdapter.GetPreviewLeftIndent: Integer; -begin - Result := GridView.Preview.LeftIndent; -end; - -function TdxGridTableViewAdapter.GetPreviewPlace: TcxGridPreviewPlace; -begin - Result := GridView.Preview.Place; -end; - -function TdxGridTableViewAdapter.GetPreviewRightIndent: Integer; -begin - Result := GridView.Preview.RightIndent; -end; - -function TdxGridTableViewAdapter.GetRow(Index: Integer): TcxCustomGridRow; -begin - Result := TcxCustomGridRow(Records[Index]); -end; - -function TdxGridTableViewAdapter.GetRowCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridTableViewAdapter.GetRowSeparatorColor: TColor; -begin - Result := GridView.OptionsView.RowSeparatorColor; -end; - -function TdxGridTableViewAdapter.GetRowSeparatorThickness: Integer; -begin - Result := GridView.OptionsView.RowSeparatorWidth; -end; - -function TdxGridTableViewAdapter.GetShowExpandButtonsForEmptyDetails: Boolean; -begin - Result := True; -end; - -function TdxGridTableViewAdapter.GetShowHorzGridLines: Boolean; -begin - Result := GridLines in [glBoth, glHorizontal]; -end; - -function TdxGridTableViewAdapter.GetShowVertGridLines: Boolean; -begin - Result := GridLines in [glBoth, glVertical]; -end; - -function TdxGridTableViewAdapter.GetThemedFooterItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFooterColor; -end; - -function TdxGridTableViewAdapter.GetThemedFooterItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFooterTextColor; -end; - -function TdxGridTableViewAdapter.GetThemedHeaderItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderColor; -end; - -function TdxGridTableViewAdapter.GetThemedHeaderItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderTextColor; -end; - -{ TdxCustomGridTableViewItemPlaceController } - -constructor TdxCustomGridTableViewItemPlaceController.Create(AFormatter: TdxGridTableViewFormatter); -begin - inherited Create; - FFormatter := AFormatter; - FHeaderLineCount := -1; - FWidth := -1; -end; - -procedure TdxCustomGridTableViewItemPlaceController.Calculate; -begin -end; - -procedure TdxCustomGridTableViewItemPlaceController.Refresh; -begin -end; - -function TdxCustomGridTableViewItemPlaceController.CalculateHeaderLineCount: Integer; -begin - Result := 1; -end; - -function TdxCustomGridTableViewItemPlaceController.CalculateWidth: Integer; -begin - Result := 0; -end; - -function TdxCustomGridTableViewItemPlaceController.GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; -begin - Result := nil; -end; - -procedure TdxCustomGridTableViewItemPlaceController.WidthChanged; -begin -end; - -function TdxCustomGridTableViewItemPlaceController.GetHeaderLineCount: Integer; -begin - if FHeaderLineCount = -1 then - FHeaderLineCount := CalculateHeaderLineCount; - Result := FHeaderLineCount; -end; - -function TdxCustomGridTableViewItemPlaceController.GetWidth: Integer; -begin - if FWidth = -1 then - FWidth := CalculateWidth; - Result := FWidth; -end; - -procedure TdxCustomGridTableViewItemPlaceController.SetWidth(Value: Integer); -begin - FWidth := Value; - WidthChanged; -end; - -{ TdxGridTableViewColumnPlace } - -constructor TdxGridTableViewColumnPlace.Create(AController: TdxGridTableViewColumnPlaceController; - AColumn: TcxGridColumn); -begin - inherited Create; - FController := AController; - FColumn := AColumn; - - FLeftBound := -1; - FWidth := -1; -end; - -procedure TdxGridTableViewColumnPlace.Calculate(ALeftBound: Integer); -begin - FLeftBound := ALeftBound; -end; - -function TdxGridTableViewColumnPlace.CalculateLeftBound: Integer; -begin - Result := Controller.CalculateItemLeftBound(Self); -end; - -function TdxGridTableViewColumnPlace.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridTableViewColumnPlace.GetRowIndex: Integer; -begin - Result := 0; -end; - -procedure TdxGridTableViewColumnPlace.InitAutoWidthItem(AnItem: TcxAutoWidthItem); -begin - AnItem.Fixed := IsFixed; - AnItem.MinWidth := MinWidth; - AnItem.Width := Width; -end; - -function TdxGridTableViewColumnPlace.GetAdapter: TdxGridTableViewAdapter; -begin - Result := Formatter.Adapter; -end; - -function TdxGridTableViewColumnPlace.GetCellBounds(RowIndex: Integer): TRect; -var - CellHeight: Integer; -begin - CellHeight := CellHeights[RowIndex]; - with Result do - begin - Left := LeftBound; - Top := Self.RowIndex * CellHeight; - Right := Left + Width; - Bottom := Top + LineCount * CellHeight; - end; - - if Column.IsMostLeft then - Inc(Result.Left, Formatter.ViewWidthExtra); -end; - -function TdxGridTableViewColumnPlace.GetCellHeight(RowIndex: Integer): Integer; -begin - Result := Formatter.RowHeights[RowIndex]; -end; - -function TdxGridTableViewColumnPlace.GetFooterCellBounds: TRect; -begin - with Result do - begin - Left := LeftBound; - Top := RowIndex * FooterLineHeight; - Right := Left + Width; - Bottom := Top + LineCount * FooterLineHeight; - end; - - InflateRect(Result, -FooterItemInflateHorz, -FooterItemInflateVert); - if Column.IsMostLeft then - Inc(Result.Left, 2); -end; - -function TdxGridTableViewColumnPlace.GetFooterLineHeight: Integer; -begin - Result := Formatter.FooterLineHeight; -end; - -function TdxGridTableViewColumnPlace.GetFormatter: TdxGridTableViewFormatter; -begin - Result := Controller.Formatter; -end; - -function TdxGridTableViewColumnPlace.GetGroupFooterCellBounds(IndentCount: Integer): TRect; -var - V: Integer; -begin - with Result do - begin - Left := LeftBound; - Top := RowIndex * GroupFooterLineHeight; - Right := Left + Width; - Bottom := Top + LineCount * GroupFooterLineHeight; - end; - - V := IndentCount * Formatter.IndentWidth; - OffsetRect(Result, -V, 0); - if Column.IsMostLeft then - Inc(Result.Left, V); - - InflateRect(Result, -FooterItemInflateHorz, -FooterItemInflateVert); - if Column.IsMostLeft then - Inc(Result.Left, 2); -end; - -function TdxGridTableViewColumnPlace.GetGroupFooterLineHeight: Integer; -begin - Result := Formatter.GroupFooterLineHeight; -end; - -function TdxGridTableViewColumnPlace.GetHeaderCellBounds: TRect; -begin - with Result do - begin - Left := LeftBound; - Top := RowIndex * HeaderLineHeight; - Right := Left + Width; - Bottom := Top + LineCount * HeaderLineHeight; - end; -end; - -function TdxGridTableViewColumnPlace.GetHeaderLineHeight: Integer; -begin - Result := Formatter.HeaderLineHeight; -end; - -function TdxGridTableViewColumnPlace.GetIndex: Integer; -begin - Result := Controller.IndexOf(Self); -end; - -function TdxGridTableViewColumnPlace.GetIsFixed: Boolean; -begin - Result := GridColumn_GetFixed(Column); -end; - -function TdxGridTableViewColumnPlace.GetLeftBound: Integer; -begin - if FLeftBound = -1 then - FLeftBound := CalculateLeftBound; - Result := FLeftBound; -end; - -function TdxGridTableViewColumnPlace.GetMinWidth: Integer; -begin - Result := Adapter.InternalColumnMinWidths[Column]; -end; - -function TdxGridTableViewColumnPlace.GetOriginalWidth: Integer; -begin - Result := Adapter.InternalColumnWidths[Column]; -end; - -function TdxGridTableViewColumnPlace.GetWidth: Integer; -begin - Result := FWidth; - if Result = -1 then - Result := OriginalWidth; -end; - -{ TdxGridTableViewColumnPlaceController } - -constructor TdxGridTableViewColumnPlaceController.Create(AFormatter: TdxGridTableViewFormatter); -begin - inherited; - FColumnIndexes := TList.Create; - FItems := TList.Create; - FWidth := -1; -end; - -destructor TdxGridTableViewColumnPlaceController.Destroy; -begin - FreeAndNilItems; - FreeAndNil(FColumnIndexes); - inherited; -end; - -procedure TdxGridTableViewColumnPlaceController.Calculate; -begin - if ItemsAutoWidth then CalculateItemsWidth; -end; - -procedure TdxGridTableViewColumnPlaceController.Refresh; -begin - FColumnIndexes.Clear; - ClearItems; - AddItems; -end; - -function TdxGridTableViewColumnPlaceController.IndexOf(AnItem: TdxGridTableViewColumnPlace): Integer; -begin - Result := FItems.IndexOf(AnItem); -end; - -function TdxGridTableViewColumnPlaceController.IndexOf(AColumn: TcxGridColumn): Integer; -begin - for Result := 0 to ItemCount - 1 do - if Items[Result].Column = AColumn then - Exit; - Result := -1; -end; - -function TdxGridTableViewColumnPlaceController.CalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ItemCount - 1 do - Inc(Result, Items[I].Width); -end; - -function TdxGridTableViewColumnPlaceController.GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; -var - Index: Integer; -begin - Index := ColumnIndexes[Column]; - //Index := IndexOf(Column); - if Index <> -1 then // might be -1 when we are in loading stage (Building report while loading form) - Result := Items[Index] - else - Result := nil; -end; - -procedure TdxGridTableViewColumnPlaceController.AddItems; -var - I: Integer; -begin - for I := 0 to Formatter.ColumnCount - 1 do - CreateItem(Formatter.Columns[I]); -end; - -procedure TdxGridTableViewColumnPlaceController.ClearItems; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].Free; - FItems.Clear; -end; - -function TdxGridTableViewColumnPlaceController.CreateItem(AColumn: TcxGridColumn): TdxGridTableViewColumnPlace; -begin - Result := GetItemClass(AColumn).Create(Self, AColumn); - FItems.Add(Result); -end; - -function TdxGridTableViewColumnPlaceController.GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; -begin - Result := TdxGridTableViewColumnPlace; -end; - -function TdxGridTableViewColumnPlaceController.CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AnItem.Index - 1 do - Inc(Result, Items[I].Width); -end; - -procedure TdxGridTableViewColumnPlaceController.CalculateItemsWidth; -var - AutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AutoWidthObject := TcxAutoWidthObject.Create(ItemCount); - try - for I := 0 to ItemCount - 1 do - Items[I].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := ItemsAvailableWidth; - AutoWidthObject.Calculate; - - for I := 0 to ItemCount - 1 do - Items[I].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; -end; - -function TdxGridTableViewColumnPlaceController.GetItemsAutoWidth: Boolean; -begin - Result := Formatter.AutoWidth; -end; - -function TdxGridTableViewColumnPlaceController.GetItemsAvailableWidth: Integer; -begin - Result := Formatter.ViewAvailableWidth; -end; - -function TdxGridTableViewColumnPlaceController.GetAdapter: TdxGridTableViewAdapter; -begin - Result := Formatter.Adapter; -end; - -function TdxGridTableViewColumnPlaceController.GetColumnIndex(Column: TcxGridColumn): Integer; -var - ColumnIndex, IndexCount, I: Integer; -begin - ColumnIndex := Column.Index; - IndexCount := FColumnIndexes.Count; - if ColumnIndex > IndexCount - 1 then - begin - FColumnIndexes.Count := ColumnIndex + 1; - for I := IndexCount to FColumnIndexes.Count - 1 do - FColumnIndexes[I] := TObject(-1); - end; - Result := Integer(FColumnIndexes[ColumnIndex]); - if Result = -1 then - begin - FColumnIndexes[ColumnIndex] := TObject(IndexOf(Column)); - Result := Integer(FColumnIndexes[ColumnIndex]); - end; -end; - -function TdxGridTableViewColumnPlaceController.GetItem(Index: Integer): TdxGridTableViewColumnPlace; -begin - Result := FItems.List[Index]; -end; - -function TdxGridTableViewColumnPlaceController.GetItemCount: Integer; -begin - Result := FItems.Count; -end; - -procedure TdxGridTableViewColumnPlaceController.FreeAndNilItems; -begin - ClearItems; - FreeAndNil(FItems); -end; - -{ TdxGridTableViewReportDataAdapter } - -constructor TdxGridTableViewReportDataAdapter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TdxGridTableViewReportDataAdapter.GetReportItem(Row: TcxCustomGridRow; - Column: TcxGridColumn): TdxReportVisualItem; -var - ReportRow: TdxReportCell; - I: Integer; -begin - ReportRow := ReportRowsByGridRow[Row]; - if ReportRow <> nil then - for I := 0 to ReportRow.DataItemCount - 1 do - begin - Result := ReportRow.DataItems[I]; - if Result.Data = Integer(Column) then Exit; - end; - Result := nil; -end; - -function TdxGridTableViewReportDataAdapter.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := Builder.ReportRows[Index]; -end; - -function TdxGridTableViewReportDataAdapter.GetReportRowByGridRow(Row: TcxCustomGridRow): TdxReportCell; -var - I: Integer; -begin - for I := 0 to ReportRowCount - 1 do - if ReportRows[I].CellCount <> 0 then - begin - Result := ReportRows[I].Cells[0]; - if Result.Data = Integer(Row) then Exit; - end; - Result := nil; -end; - -function TdxGridTableViewReportDataAdapter.GetReportRowCount: Integer; -begin - Result := Builder.ReportRowCount; -end; - -{ TdxGridTableViewFormatter } - -constructor TdxGridTableViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FColumns := TList.Create; - FItemPlaceController := GetItemPlaceControllerClass.Create(Self); - FReportDataAdapter := TdxGridTableViewReportDataAdapter.Create(ABuilder); - FRowHeights := TList.Create; -end; - -destructor TdxGridTableViewFormatter.Destroy; -begin - FreeAndNil(FRowHeights); - FreeAndNil(FItemPlaceController); - FreeAndNil(FReportDataAdapter); - FreeAndNil(FColumns); - inherited; -end; - -function TdxGridTableViewFormatter.Adapter: TdxGridTableViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridTableViewFormatter.Builder: TdxGridTableViewBuilder; -begin - Result := inherited Builder as TdxGridTableViewBuilder; -end; - -procedure TdxGridTableViewFormatter.DoInitializeFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Column: TcxGridColumn; -begin - Column := Columns[AnIndex]; - SetViewParams(AnItem, GetFooterItemViewParams(Column)); - if HasBackgroundBitmap(bbFooter) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbFooter); - - RegisterLookAndFeelItem(AnItem, cesSunken); - - with AnItem as TdxReportCellString do - begin - Data := Integer(Column); - Text := Adapter.FooterItemTexts[AnIndex]; - Multiline := Adapter.FooterMultiline; - TextAlignX := TextAlignXMap[Column.FooterAlignmentHorz]; - if Multiline then - TextAlignY := taTop - else - TextAlignY := taCenterY; - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeFooterRow(ARow: TdxReportCell); -begin - SetViewParams(ARow, GetFooterItemViewParams(nil)); - RegisterLookAndFeelItem(ARow, cesRaised); - ARow.Data := Integer(TdxGridFooter); -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - ReportLink.DoInitializeFooterCell(Adapter.GridView, nil, Columns[AnIndex], 0, TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetFooterItemBounds(AnIndex: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AnIndex]]; - if Item <> nil then - Result := Item.FooterCellBounds - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridTableViewFormatter.GetFooterItemViewParams(AColumn: TcxGridColumn): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetFooterParams(nil, -1, AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetFooterViewParams(nil, -1, AColumn); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedFooterItemColor; - Result.NativeParams.TextColor := Adapter.ThemedFooterItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterHost(AnItem: TdxReportVisualItem; - ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnItem, GetGroupFooterItemViewParams(nil, -1, nil)); - RegisterLookAndFeelItem(AnItem, cesRaised); - AnItem.Data := Integer(ARecord); -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); -var - Column: TcxGridColumn; -begin - Column := Columns[AnIndex]; - SetViewParams(AnItem, GetGroupFooterItemViewParams(ARecord, AGroupLevel, Column)); - if HasBackgroundBitmap(bbFooter) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbFooter); - RegisterLookAndFeelItem(AnItem, cesSunken); - - with TdxReportCellString(AnItem) do - begin - Data := Integer(Column); - Multiline := Adapter.GetGroupFootersMultiline; - Text := Adapter.GetGroupFooterItemText(ARecord.Index, AGroupLevel, AnIndex); - TextAlignX := TextAlignXMap[Column.FooterAlignmentHorz]; - if Multiline then - TextAlignY := taTop - else - TextAlignY := taCenterY; - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord; AGroupLevel: Integer); -begin - ARow.CellSides := csLeftRight; - ARow.Data := AGroupLevel; //v3.0 ARecord.Level; - ARow.Transparent := True; -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); -begin - ReportLink.DoInitializeFooterCell(Adapter.GridView, ARecord, Columns[AnIndex], - AGroupLevel, TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetGroupFooterItemBounds(AnIndex, AGroupLevel: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AnIndex]]; - if Item <> nil then - Result := Item.GroupFooterCellBounds[AGroupLevel] - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetGroupFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridTableViewFormatter.GetGroupFooterItemViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; AColumn: TcxGridColumn): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetFooterParams(ARecord, AGroupLevel, AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetFooterViewParams(ARecord, AGroupLevel, AColumn); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedFooterItemColor; - Result.NativeParams.TextColor := Adapter.ThemedFooterItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRowItem(AnItem: TAbstractdxReportCellData; - ARow: TcxGridGroupRow); -begin - SetViewParams(AnItem, GetGroupRowViewParams(ARow, ARow.Level)); - if HasBackgroundBitmap(bbGroup) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); - - with AnItem as TdxReportCellString do - begin - Data := Integer(Adapter.GroupedColumns[ARow.Level]); - Text := ARow.DisplayText; - TextAlignX := taLeft; - if Adapter.IsOffice11StyleGrouping then TextAlignY := taBottom; {.2} - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord); -begin - ReportLink.AddReportRow(ARow); - - ARow.CellSides := []; - ARow.Data := Integer(ARecord); - ARow.Transparent := True; -end; - -function TdxGridTableViewFormatter.GetGroupRowClass: TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridTableViewFormatter.GetGroupRowViewParams(ARecord: TcxCustomGridRecord; - ALevel: Integer): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetGroupParams(ARecord, ALevel, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetGroupRowViewParams(ARecord, ALevel); - - Result.CellSides := CellSidesMap[Adapter.GridLines] - [csLeft] + [csRight]; - if ARecord.Index = 0 then - Result.CellSides := Result.CellSides + [csTop]; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRowSeparator(ASeparator: TAbstractdxReportCellData); -begin - ASeparator.CellSides := csAll; - ASeparator.Color := GroupRowSeparatorColor; - ASeparator.Transparent := IsColorTransparent(ASeparator.Color); //ReportLink.Transparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupSeparatorRow(ARow: TdxReportCell); -begin - ARow.CellSides := csLeftRight; - ARow.Transparent := True; -end; - -function TdxGridTableViewFormatter.GetGroupRowSeparatorClass: TdxReportCellDataClass; -begin - Result := TdxReportCellBox; -end; - -procedure TdxGridTableViewFormatter.DoInitializeHeaderItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Column: TcxGridColumn; -begin - Column := Columns[AnIndex]; - SetViewParams(AnItem, GetHeaderItemViewParams(Column)); - if HasBackgroundBitmap(bbHeader) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbHeader); - RegisterLookAndFeelItem(AnItem, cesRaised); - - with AnItem as TdxReportCellImage do - begin - Data := Integer(Column); - EndEllipsis := Adapter.HeaderEndEllipsis; - if (Column.HeaderGlyph <> nil) and not Column.HeaderGlyph.Empty then - begin - Image := Column.HeaderGlyph; - ImageLayout := HeaderImageLayoutMap[Column.HeaderGlyphAlignmentHorz, Column.HeaderGlyphAlignmentVert]; - IsTextDrawnForCenteredImage := True; - IsTextShiftedForHorizontallyCenteredImage := - not (ImageLayout in [ilImageTopCenter, ilImageCenterCenter, ilImageBottomCenter]) and (Text <> ''); - end; - Multiline := Adapter.HeaderMultilines[Column]; - SortOrder := SortOrderMap[Column.SortOrder]; - Text := Column.Caption; - TextAlignX := TextAlignXMap[Column.HeaderAlignmentHorz]; - if Multiline then - TextAlignY := TextAlignYMap[Column.HeaderAlignmentVert] - else - TextAlignY := taCenterY; - Transparent := Transparent {!!! v3.1} or not IsTextShiftedForHorizontallyCenteredImage; // TODO: Check - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeHeaderRow(ARow: TdxReportCell); -begin - SetViewParams(ARow, GetHeaderItemViewParams(nil)); - ARow.Data := Integer(TdxGridHeader); -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeHeaderItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - ReportLink.DoInitializeHeaderCell(Adapter.GridView, Columns[AnIndex], TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetHeaderItemBounds(AnIndex: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AnIndex]]; - if Item <> nil then - Result := Item.HeaderCellBounds - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetHeaderItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellImage; -end; - -function TdxGridTableViewFormatter.GetHeaderItemViewParams(AColumn: TcxGridColumn): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetHeaderParams(AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetHeaderViewParams(AColumn); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedHeaderItemColor; - Result.NativeParams.TextColor := Adapter.ThemedHeaderItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -function TdxGridTableViewFormatter.CreateIndent(AParent: TdxReportCell): TdxReportCellExpandButton; -begin - Result := GetIndentClass.Create(AParent); -end; - -procedure TdxGridTableViewFormatter.DoInitializeDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, False)); - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); -end; - -procedure TdxGridTableViewFormatter.DoInitializeExpandButton(AnExpandButton: TdxReportCellExpandButton; - ARecord: TcxCustomGridRecord; AnIsMasterIndent: Boolean); -begin - with AnExpandButton do - begin - {3.1 added} - ButtonAlignHorz := bahCenter; - if Adapter.IsOffice11StyleGrouping and not AnIsMasterIndent then {.2} - ButtonAlignVert := bavBottom - else - ButtonAlignVert := bavCenter; - - ButtonExpanded := ARecord.Expanded; - ButtonSize := Adapter.ExpandButtonSize; - if (ReportLink.OptionsFormatting.LookAndFeelKind <> lfStandard) and not Odd(ButtonSize) then - ButtonSize := ButtonSize - 1; - ButtonInteriorColor := Adapter.ExpandButtonColor; - ButtonTransparent := IsColorTransparent(ButtonInteriorColor); - end; - RegisterExpandButton(AnExpandButton); -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, True)); - - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); - -// if (AIndex = AIndentCount - 1) and Adapter.ShowHorzGridLines then -// AIndent.CellSides := AIndent.CellSides + [csBottom]; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, False)); - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); - - if AnIndex = AnIndentCount - 1 then - begin - AnIndent.CellSides := AnIndent.CellSides - [csRight]; - if Adapter.ShowHorzGridLines then - AnIndent.CellSides := AnIndent.CellSides + [csTop]; - //if Adapter.IsOffice11StyleGrouping then - // AnIndent.CellSides := AnIndent.CellSides + [csBottom]; - - AnIndent.ShowButton := HasExpandButton(ARecord); - if AnIndent.ShowButton then - DoInitializeExpandButton(AnIndent, ARecord, False); - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeMasterDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - { DoInitializeMasterIndent -> ARecord = nil } - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, False)); - if AnIndex = AnIndentCount - 1 then - if HasBackgroundBitmap(bbContent) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbContent) - else - else - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); - - if (ARecord <> nil) and (AnIndex = AnIndentCount - 1) then - begin - AnIndent.CellSides := AnIndent.CellSides - [csRight]; - if Adapter.ShowHorzGridLines then - AnIndent.CellSides := AnIndent.CellSides + [csTop]; - if not ARecord.Expanded then - AnIndent.CellSides := AnIndent.CellSides + [csBottom]; - - AnIndent.ShowButton := ReportLink.OptionsView.ExpandButtons and ARecord.Expandable; - if AnIndent.ShowButton then - DoInitializeExpandButton(AnIndent, ARecord, True); - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeRowSeparatorIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, True)); - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); -end; - -function TdxGridTableViewFormatter.GetIndentClass: TdxReportCellExpandButtonClass; -begin - if Adapter.IsOffice11StyleGrouping then - Result := TdxReportCellExpandButtonEx - else - Result := TdxReportCellExpandButton; -end; - -function TdxGridTableViewFormatter.GetIndentViewParams(ARecord: TcxCustomGridRecord; - AnIndex, AnIndentCount: Integer; ANonRecordIndent: Boolean): TdxReportItemViewParams; - - function IsMasterDataRowIndent: Boolean; - begin - with Adapter do - Result := AnIndex >= GroupedColumnCount - Ord(IsOffice11StyleGrouping and not (ARecord is TcxGridGroupRow)); - end; - - function GetRecord: TcxCustomGridRecord; - begin - if not ANonRecordIndent and (ARecord is TcxGridGroupRow) and (AnIndex = AnIndentCount - 1) then - Result := ARecord - else - Result := nil; - end; - -const - VertGridLinesMap: array[Boolean] of TdxCellSides = ([], csLeftRight); -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - if IsMasterDataRowIndent then - ReportLink.Styles.GetContentParams(Adapter.MasterGridRecord, nil, Result.NativeParams) - else - ReportLink.Styles.GetGroupParams(GetRecord, AnIndex, Result.NativeParams) - else - if IsMasterDataRowIndent then - Result.NativeParams := Adapter.GetContentViewParams(Adapter.MasterGridRecord, nil) - else - Result.NativeParams := Adapter.GetGroupRowViewParams(GetRecord, AnIndex); - - Result.CellSides := VertGridLinesMap[Adapter.ShowHorzGridLines]; //PS3.1 (it was Adapter.ShowVertGridLines) - if AnIndex = 0 then - Result.CellSides := Result.CellSides + [csLeft]; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); -end; - -function TdxGridTableViewFormatter.HasExpandButton(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := ReportLink.OptionsView.ExpandButtons{$IFDEF VER500} and Adapter.RecordHelpers[ARecord].HasExpandButton{$ENDIF}; -end; - -procedure TdxGridTableViewFormatter.DoInitializeDataRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord); -begin - ReportLink.AddReportRow(ARow); - - ARow.CellSides := csLeftRight; - ARow.Data := Integer(ARecord); - ARow.Transparent := True; -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxGridColumn; ARecord: TcxCustomGridRecord); -begin - ReportLink.DoInitializeCell(Adapter.GridView, ARecord, AColumn, TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetItemBounds(AGridRow: TcxCustomGridRow; - AGridRowIndex, AColumnIndex: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AColumnIndex]]; - if Item <> nil then - Result := Item.CellBounds[AGridRowIndex] - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; -begin - Result := inherited GetItemViewParams(ATableItem, ARecord, AnIsPreview); - if AnIsPreview then - begin - Result.CellSides := csLeftRight; - if Adapter.GridLines in [glBoth, glHorizontal] then - Result.CellSides := Result.CellSides + csTopBottom; - end - else - begin - Result.CellSides := CellSidesMap[Adapter.GridLines]; - if TcxGridColumn(ATableItem).IsMostLeft and (ARecord <> nil) and ARecord.Expandable then - Result.CellSides := Result.CellSides - [csLeft]; {3.1} - end; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer); -begin - DoInitializeMasterDataRowIndent(AnIndent, AnIndex, AnIndentCount, nil); //Adapter.GroupedColumnCount + 1, nil); //PS3.1 changed -end; - -procedure TdxGridTableViewFormatter.DoInitializePreview(APreview: TAbstractdxReportCellData; - AColumn: TcxGridColumn; ARecord: TcxCustomGridRecord); -begin - DoInitializeItem(APreview, AColumn, ARecord, True); -end; - -function TdxGridTableViewFormatter.GetPreviewClass(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportCellDataClass; -begin - Result := GetItemClass(AColumn, ARecord, True); -end; - -function TdxGridTableViewFormatter.GetPreviewViewParams(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportItemViewParams; -begin - Result := GetItemViewParams(AColumn, ARecord, True) -end; - -procedure TdxGridTableViewFormatter.DoInitializeSeparatorRow(ARow: TdxReportCell); -begin - ARow.CellSides := csLeftRight; - ARow.Transparent := True; -end; - -procedure TdxGridTableViewFormatter.DoInitializeRowSeparator(ASeparator: TAbstractdxReportCellData); -begin - ASeparator.CellSides := csAll; - ASeparator.Color := RowSeparatorColor; - ASeparator.Transparent := IsColorTransparent(ASeparator.Color); //ReportLink.Transparent; -end; - -function TdxGridTableViewFormatter.GetRowSeparatorClass: TdxReportCellDataClass; -begin - Result := TdxReportCellBox; -end; - -function TdxGridTableViewFormatter.GetReportItem(ARow: TcxCustomGridRow; - AColumn: TcxGridColumn): TdxReportVisualItem; -begin - Result := ReportDataAdapter.ReportItems[ARow, AColumn]; -end; - -{ IdxPSCellParams2 } -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := Adapter.PreviewLeftIndent; -end; - -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := Adapter.PreviewRightIndent; -end; - -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - if PreviewAutoHeight then - Result := -1 - else - Result := PreviewLineHeight * PreviewMaxLineCount; -end; - -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := PreviewMaxLineCount; -end; - -procedure TdxGridTableViewFormatter.AddHorizontalDelimiters; -var - Origin, I: Integer; - Item: TdxGridTableViewColumnPlace; - R: TRect; -begin - inherited; - if ReportLink.OptionsPagination.Column then - begin - Origin := ViewWidthExtraBefore; - for I := 0 to ColumnCount - 1 do - begin - Item := ItemPlaceController[Columns[I]]; - if Item <> nil then - begin - R := Item.HeaderCellBounds; - ReportLink.AddHorizontalDelimiter(Origin + R.Left); - ReportLink.AddHorizontalDelimiter(Origin + R.Right); - end; - end; - end; -end; - -procedure TdxGridTableViewFormatter.BeforeBuilding; -begin - BuildItemLists; - ItemPlaceController.Refresh; - inherited; -end; - -procedure TdxGridTableViewFormatter.Calculate; -begin - inherited; - ItemPlaceController.Calculate; -end; - -procedure TdxGridTableViewFormatter.CalculateDataRowHeights; -var - I, RowHeight, J, V: Integer; - Row: TcxCustomGridRow; - Column: TcxGridColumn; -begin - FRowHeights.Count := RowCount; - for I := 0 to RowCount - 1 do - begin - Row := Rows[I]; - if not (Row is TcxGridGroupRow) then - begin - RowHeight := DetailsLineHeight; - if HeaderLineCount = 1 then - for J := 0 to ColumnCount - 1 do - begin - // assign to 0, if you want to give an user ability to shrink RowHeight to smaller value - V := DetailsLineHeight; - Column := Columns[J]; - if not Column.IsPreview then - begin - Builder.DoGetCellHeight(Row, Columns[J], V); - if RowHeight < V then RowHeight := V; - end; - end - end - else - RowHeight := GroupRowLineHeight; - RowHeights[I] := RowHeight; - end; -end; - -procedure TdxGridTableViewFormatter.CalculateLineHeights; -var - I: Integer; - Column: TcxGridColumn; -begin - inherited; - FGroupFooterLineHeight := DefaultGroupFooterLineHeight; - if Adapter.GroupRowHeightAssigned then - FGroupRowLineHeight := Adapter.GroupRowHeight - else - begin - FGroupRowLineHeight := DefaultGroupRowLineHeight; - if Adapter.IsOffice11StyleGrouping then {.2} - FGroupRowLineHeight := 2 * FGroupRowLineHeight; - end; - - FFooterLineHeight := DefaultFooterLineHeight; - FHeaderLineHeight := Adapter.HeaderHeight; - - if Adapter.DataRowHeightAssigned then - FDetailsLineHeight := Adapter.DataRowHeight - else - FDetailsLineHeight := DefaultDataRowLineHeight; - - FPreviewLineHeight := DefaultDataRowLineHeight; - - for I := 0 to ColumnCount - 1 do - begin - Column := Columns[I]; - if not Adapter.HeaderHeightAssigned then - CalculateHeight(GetHeaderItemViewParams(Column), FHeaderLineHeight); - if not Adapter.FooterHeightAssigned then - begin - CalculateHeight(GetGroupFooterItemViewParams(nil, -1, Column), FGroupFooterLineHeight); - CalculateHeight(GetFooterItemViewParams(Column), FFooterLineHeight); - end; - if not Adapter.DataRowHeightAssigned and not Column.IsPreview then - CalculateHeight(GetItemViewParams(Column, nil, False), FDetailsLineHeight); - end; - - if not Adapter.GroupRowHeightAssigned then - for I := 0 to RowCount - 1 do - CalculateHeight(GetGroupRowViewParams(Rows[I], -1), FGroupRowLineHeight); - - if HasPreview then - CalculateHeight(GetItemViewParams({PreviewColumn}nil, nil, True), FPreviewLineHeight); - - Inc(FFooterLineHeight, 2 * FooterItemInflateVert + 1); - Inc(FGroupFooterLineHeight, 2 * FooterItemInflateVert + 1); - - CalculateDataRowHeights; -end; - -function TdxGridTableViewFormatter.GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; -begin - Result := TdxGridTableViewColumnPlaceController; -end; - -function TdxGridTableViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbFooter: - Result := vspsGridFooter; - bbGroup: - Result := vspsGridGroup; - bbHeader: - Result := vspsGridHeader; - bbPreview: - Result := vspsGridPreview; - else - Result := 0; - end; - - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -procedure TdxGridTableViewFormatter.BuildColumnList; -var - I: Integer; - Column: TcxGridColumn; -begin - FColumns.Clear; - for I := 0 to Adapter.ColumnCount - 1 do - begin - Column := Adapter.Columns[I]; - if IsColumnActuallyVisible(Column) then FColumns.Add(Column); - end; -end; - -procedure TdxGridTableViewFormatter.BuildItemLists; -begin - BuildColumnList; -end; - -function TdxGridTableViewFormatter.IsColumnActuallyVisible(AColumn: TcxGridColumn): Boolean; -begin - Result := AColumn.ActuallyVisible; -end; - -function TdxGridTableViewFormatter.GetViewWidth: Integer; -begin - Result := ItemPlaceController.Width; -end; - -function TdxGridTableViewFormatter.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := FColumns[Index]; -end; - -function TdxGridTableViewFormatter.GetColumnCount: Integer; -begin - Result := FColumns.Count; -end; - -function TdxGridTableViewFormatter.GetGroupRowSeparatorColor: TColor; -begin - Result := Adapter.GroupRowSeparatorColor; -end; - -function TdxGridTableViewFormatter.GetGroupRowSeparatorThickness: Integer; -begin - Result := Adapter.GroupRowSeparatorThickness; -end; - -function TdxGridTableViewFormatter.GetHasPreview: Boolean; -begin - Result := Adapter.HasPreview and ShowPreview and - (PreviewAutoHeight or (PreviewMaxLineCount > 0)); -end; - -function TdxGridTableViewFormatter.GetHeaderLineCount: Integer; -begin - Result := ItemPlaceController.HeaderLineCount; -end; - -function TdxGridTableViewFormatter.GetPreviewAutoHeight: Boolean; -begin - Result := ReportLink.OptionsPreview.AutoHeight; -end; - -function TdxGridTableViewFormatter.GetPreviewColumn: TcxGridColumn; -begin - Result := Adapter.PreviewColumn; -end; - -function TdxGridTableViewFormatter.GetPreviewMaxLineCount: Integer; -begin - Result := ReportLink.OptionsPreview.MaxLineCount; -end; - -function TdxGridTableViewFormatter.GetRow(Index: Integer): TcxCustomGridRow; -begin - Result := inherited Records[Index] as TcxCustomGridRow; -end; - -function TdxGridTableViewFormatter.GetRowCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridTableViewFormatter.GetRowHeight(Index: Integer): Integer; -begin - Result := Integer(FRowHeights[Index]) -end; - -function TdxGridTableViewFormatter.GetRowHeightByRow(Row: TcxCustomGridRow): Integer; -begin - Result := {20;//}RowHeights[RecordIndexes[Row]]; -end; - -function TdxGridTableViewFormatter.GetRowSeparatorColor: TColor; -begin - Result := Adapter.RowSeparatorColor; - {with ReportLink.OptionsFormatting do - if UseNativeStyles then - begin - Result := FixedColor; - end;} -end; - -function TdxGridTableViewFormatter.GetRowSeparatorThickness: Integer; -begin - Result := Adapter.RowSeparatorThickness; -end; - -function TdxGridTableViewFormatter.GetShowGroupFooters: Boolean; -begin - Result := ReportLink.OptionsView.GroupFooters; -end; - -function TdxGridTableViewFormatter.GetShowFooters: Boolean; -begin - Result := ReportLink.OptionsView.Footers; -end; - -function TdxGridTableViewFormatter.GetShowHeaders: Boolean; -begin - Result := ReportLink.OptionsView.Headers; -end; - -function TdxGridTableViewFormatter.GetShowPreview: Boolean; -begin - Result := ReportLink.OptionsPreview.Visible; -end; - -procedure TdxGridTableViewFormatter.SetRowHeight(Index: Integer; Value: Integer); -begin - FRowHeights[Index] := TObject(Value); -end; - -procedure TdxGridTableViewFormatter.SetRowHeightByRow(Row: TcxCustomGridRow; Value: Integer); -begin - RowHeights[IndexOfRecord(Row)] := Value; -end; - -{ TdxGridTableViewBuilder } - -function TdxGridTableViewBuilder.Adapter: TdxGridTableViewAdapter; -begin - Result := inherited Adapter as TdxGridTableViewAdapter; -end; - -class function TdxGridTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridTableViewAdapter; -end; - -function TdxGridTableViewBuilder.Formatter: TdxGridTableViewFormatter; -begin - Result := inherited Formatter as TdxGridTableViewFormatter; -end; - -class function TdxGridTableViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxGridTableViewFormatter; -end; - -procedure TdxGridTableViewBuilder.AddDelimitersHardVert(AReportRow: TdxReportCell); -begin - ReportLink.FDelimitersHardVert.Add(TObject(AReportRow.AbsoluteRect.Top)); -end; - -procedure TdxGridTableViewBuilder.DoBuildViewBody; -begin - if Formatter.ShowHeaders then CreateHeader; - CreateRows; - if not IsAborted and Formatter.ShowFooters then - CreateFooter; -end; - -procedure TdxGridTableViewBuilder.DoBuildViewFooter; -begin - inherited; - if not Formatter.HasDetailsSeparator then CreateViewTerminator; -end; - -procedure TdxGridTableViewBuilder.CreateDetails(AMasterRow: TcxGridMasterDataRow); -var - CurrentView: TcxCustomGridView; -begin - if AMasterRow.ActiveDetailGridViewExists then - if ReportLink.OptionsLevels.Unwrap then - begin - ProcessedView := nil; - try - if ReportLink.OptionsLevels.RiseActiveLevelOntoTop then - begin - CurrentView := AMasterRow.ActiveDetailGridView; - CreateDetailView(CurrentView); - ProcessedView := CurrentView; - end; - ReportLink.ForEachView(AMasterRow, CreateDetailView); - finally - ProcessedView := nil; - end; - end - else - CreateDetailView(AMasterRow.ActiveDetailGridView); -end; - -procedure TdxGridTableViewBuilder.CreateDetailView(AGridView: TcxCustomGridView); -begin - if AGridView <> ProcessedView then ReportLink.BuildView(Self, AGridView); -end; - -function TdxGridTableViewBuilder.GetAreDetailsBuilt: Boolean; -begin - with ReportLink.OptionsDetails do - Result := not StartFromFocusedView or not OnlyFocusedView; -end; - -procedure TdxGridTableViewBuilder.CreateFooter; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetFootersProducer.Produce(HostInfoServices.FootersHostInfo); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetFootersProducer: TdxGridTableViewFootersProducer; -begin - Result := ProducerCache[GetFootersProducerClass] as TdxGridTableViewFootersProducer; -end; - -function TdxGridTableViewBuilder.GetFootersProducerClass: TdxGridTableViewFootersProducerClass; -begin - Result := TdxGridTableViewFootersProducer; -end; - -procedure TdxGridTableViewBuilder.CreateGroupFooters(AGridRow: TcxCustomGridRow); -var - Producer: TdxGridTableViewGroupFooterProducer; - HostInfo: TdxGridAttributeHostInfo; - Index, I: Integer; - ReportRow: TdxReportCell; -begin - Producer := GetGroupFooterProducer; - HostInfo := HostInfoServices.PageDetailsHostInfo; - Index := 0; - for I := 0 to AGridRow.Level do - if Adapter.HasGroupFooter(AGridRow, I) then - begin - ReportRow := Producer.Produce(HostInfo, AGridRow, AGridRow.Level - I, Index); - AddReportRow(ReportRow); - Inc(Index); - end; -end; - -function TdxGridTableViewBuilder.GetGroupFooterProducer: TdxGridTableViewGroupFooterProducer; -begin - Result := ProducerCache[GetGroupFooterProducerClass] as TdxGridTableViewGroupFooterProducer; -end; - -function TdxGridTableViewBuilder.GetGroupFooterProducerClass: TdxGridTableViewGroupFooterProducerClass; -begin - Result := TdxGridTableViewGroupFooterProducer; -end; - -procedure TdxGridTableViewBuilder.CreateHeader; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetHeadersProducer.Produce(HostInfoServices.HeadersHostInfo); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetHeadersProducer: TdxGridTableViewHeadersProducer; -begin - Result := ProducerCache[GetHeadersProducerClass] as TdxGridTableViewHeadersProducer; -end; - -function TdxGridTableViewBuilder.GetHeadersProducerClass: TdxGridTableViewHeadersProducerClass; -begin - Result := TdxGridTableViewHeadersProducer; -end; - -procedure TdxGridTableViewBuilder.CreateRow(AGridRow: TcxCustomGridRow; ARowIndex: Integer); -var - ReportRow: TdxReportCell; -begin - ReportRow := GetRowProducer(AGridRow).Produce(HostInfoServices.PageDetailsHostInfo, AGridRow, ARowIndex); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetRowProducer(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducer; -begin - Result := ProducerCache[GetRowProducerClass(AGridRow)] as TdxGridTableViewCustomDataRowProducer; -end; - -procedure TdxGridTableViewBuilder.CreateRows; -var - PrevGridRow, GridRow: TcxCustomGridRow; - I: Integer; - HasGroupDelimiter: Boolean; -begin - PrevGridRow := nil; - for I := 0 to Formatter.RowCount - 1 do - begin - GridRow := Formatter.Rows[I]; - - if (ShowRowSeparators and (I > 0)) and (not (PrevGridRow is TcxGridGroupRow) or not ShowGroupRowSeparators) then - CreateRowSeparator(GridRow, False); - - HasGroupDelimiter := Formatter.PaginateByTopLevelGroups and (I > 0) and - (GridRow.Level = 0) and (GridRow is TcxGridGroupRow); - - CreateRow(GridRow, I); - - // Hard Delimiters - if HasGroupDelimiter then - AddDelimitersHardVert(LastReportRow); - - if AreDetailsBuilt and Adapter.HasDetails(GridRow) then - CreateDetails(GridRow as TcxGridMasterDataRow); - - if ShowGroupRowSeparators and (GridRow is TcxGridGroupRow) then - CreateGroupRowSeparator(TcxGridGroupRow(GridRow)); - - if Formatter.ShowGroupFooters and Adapter.HasGroupFooters(GridRow) then - CreateGroupFooters(GridRow); - - // Last Row Separator - if (ShowRowSeparators and (I = Formatter.RowCount - 1)) and (not (GridRow is TcxGridGroupRow) or not ShowGroupRowSeparators) then - CreateRowSeparator(GridRow, True); - - // Progress - if MasterBuilder = nil then - begin - Progress(100 * (I + 1) / Formatter.RowCount); - if IsAborted then Break; - end; - - PrevGridRow := GridRow; - end; -end; - -function TdxGridTableViewBuilder.GetRowProducerClass(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducerClass; -begin - Result := Adapter.RecordHelpers[AGridRow].ProducerClass; -end; - -procedure TdxGridTableViewBuilder.CreateRowSeparator(AGridRow: TcxCustomGridRow; - AnIsLast: Boolean = False); -var - ReportRow: TdxReportCell; -begin - ReportRow := GetRowSeparatorProducer.Produce(HostInfoServices.PageDetailsHostInfo, AGridRow, AnIsLast); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetRowSeparatorProducer: TdxGridTableViewRowSeparatorProducer; -begin - Result := ProducerCache[GetRowSeparatorProducerClass] as TdxGridTableViewRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetRowSeparatorProducerClass: TdxGridTableViewRowSeparatorProducerClass; -begin - Result := TdxGridTableViewRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetShowRowSeparators: Boolean; -begin - Result := Adapter.HasRowSeparators; -end; - -procedure TdxGridTableViewBuilder.CreateGroupRowSeparator(AGridRow: TcxGridGroupRow); -var - ReportRow: TdxReportCell; -begin - ReportRow := GetGroupRowSeparatorProducer.Produce(HostInfoServices.PageDetailsHostInfo, AGridRow); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetGroupRowSeparatorProducer: TdxGridTableViewGroupRowSeparatorProducer; -begin - Result := ProducerCache[GetGroupRowSeparatorProducerClass] as TdxGridTableViewGroupRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetGroupRowSeparatorProducerClass: TdxGridTableViewGroupRowSeparatorProducerClass; -begin - Result := TdxGridTableViewGroupRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetShowGroupRowSeparators: Boolean; -begin - Result := Adapter.IsOffice11StyleGrouping; -end; - -function TdxGridTableViewBuilder.GridView: TcxGridTableView; -begin - Result := inherited GridView as TcxGridTableView; -end; - -class function TdxGridTableViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridTableView; -end; - -function TdxGridTableViewBuilder.GetLastReportRow: TdxReportCell; -begin - Result := ReportRows[ReportRowCount - 1]; -end; - -function TdxGridTableViewBuilder.GetProcessedView: TcxCustomGridView; -begin - Result := ReportLink.FProcessedView; -end; - -procedure TdxGridTableViewBuilder.SetProcessedView(Value: TcxCustomGridView); -begin - ReportLink.FProcessedView := Value; -end; - -{ TdxGridDBTableViewAdapter } - -function TdxGridDBTableViewAdapter.GridView: TcxGridDBTableView; -begin - Result := inherited GridView as TcxGridDBTableView; -end; - -class function TdxGridDBTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridDBTableView; -end; - -procedure TdxGridDBTableViewAdapter.AfterBuilding; -begin - UnloadAllRecords; - inherited; -end; - -procedure TdxGridDBTableViewAdapter.BeforeBuilding; -begin - inherited; - LoadAllRecords; -end; - -function TdxGridDBTableViewAdapter.DataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(inherited DataController); -end; - -function TdxGridDBTableViewAdapter.DBDataModeController: TcxDBDataModeController; -begin - Result := DataController.DataModeController; -end; - -procedure TdxGridDBTableViewAdapter.LoadAllRecords; -begin - _LoadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -procedure TdxGridDBTableViewAdapter.UnloadAllRecords; -begin - _UnloadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -{ TdxGridDBTableViewBuilder } - -function TdxGridDBTableViewBuilder.Adapter: TdxGridDBTableViewAdapter; -begin - Result := inherited Adapter as TdxGridDBTableViewAdapter; -end; - -class function TdxGridDBTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridDBTableViewAdapter; -end; - -{ TdxGridBandedTableViewAdapter } - -constructor TdxGridBandedTableViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited; - FFooterLineCount := -1; -end; - -function TdxGridBandedTableViewAdapter.GridView: TcxGridBandedTableView; -begin - Result := inherited GridView as TcxGridBandedTableView; -end; - -class function TdxGridBandedTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridBandedTableView; -end; - -function TdxGridBandedTableViewAdapter.Styles: TcxGridBandedTableViewStyles; -begin - Result := inherited Styles as TcxGridBandedTableViewStyles; -end; - -function TdxGridBandedTableViewAdapter.CalculateDetailsLineCount: Integer; -var - I, J, V: Integer; - BandRows: TcxGridBandRows; -begin - Result := 0; - for I := 0 to BottomBandCount - 1 do - begin - BandRows := BottomBands[I].Rows; - V := 0; - for J := 0 to BandRows.VisibleCount - 1 do - Inc(V, BandRows[J].LineCount); - if Result < V then Result := V; - end; -end; - -function TdxGridBandedTableViewAdapter.CalculateFooterLineCount: Integer; -var - I, V: Integer; -begin - Result := 0; - for I := 0 to BottomBandCount - 1 do - begin - V := BottomBands[I].Rows.Count; - if Result < V then Result := V; - end; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderHeight: Integer; -begin - Result := GridView.OptionsView.BandHeaderHeight; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderHeightAssigned: Boolean; -begin - Result := BandHeaderHeight <> 0; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderViewParams(ABand: TcxGridBand): TcxViewParams; -begin - if (ABand <> nil) and (ABand.Styles <> nil) then - ABand.Styles.GetHeaderParams(Result) - else - Styles.GetBandHeaderParams(ABand, Result); - if ABand = nil then - Result.Color := LookAndFeelPainter.DefaultHeaderBackgroundColor; -end; - -function TdxGridBandedTableViewAdapter.GetDataRowHeightAssigned: Boolean; -begin - Result := (DetailsLineCount = 1) and inherited GetDataRowHeightAssigned; -end; - -function TdxGridBandedTableViewAdapter.GetFooterHeightAssigned: Boolean; -begin - Result := (FooterLineCount = 1) and inherited GetFooterHeightAssigned; -end; - -function TdxGridBandedTableViewAdapter.GetHeaderHeightAssigned: Boolean; -begin - Result := (DetailsLineCount = 1) and inherited GetHeaderHeightAssigned; -end; - -function TdxGridBandedTableViewAdapter.GetHeaderMultiline(Column: TcxGridColumn): Boolean; -begin - Result := ((DetailsLineCount = 1) and inherited GetHeaderMultiline(Column)) or - (TcxGridBandedColumn(Column).Position.LineCount > 1); {PS 3.01} -end; - -function TdxGridBandedTableViewAdapter.GetBand(Index: Integer): TcxGridBand; -begin - Result := GridView.Bands.VisibleItems[Index]; -end; - -function TdxGridBandedTableViewAdapter.GetBandCount: Integer; -begin - Result := GridView.Bands.VisibleCount; -end; - -function TdxGridBandedTableViewAdapter.GetBandEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.BandHeaderEndEllipsis; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderLineCount: Integer; -begin - Result := GridView.OptionsView.BandHeaderLineCount; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderMultiline: Boolean; -begin - Result := BandHeaderHeightAssigned;// or (BandHeaderLineCount > 1); {!!! v3.03} -end; - -function TdxGridBandedTableViewAdapter.GetBottomBand(Index: Integer): TcxGridBand; -begin - Result := GridView.Bands.VisibleItems[Index]; -end; - -function TdxGridBandedTableViewAdapter.GetBottomBandCount: Integer; -begin - Result := GridView.Bands.VisibleCount; -end; - -function TdxGridBandedTableViewAdapter.GetColumn(Index: Integer): TcxGridBandedColumn; -begin - Result := GridView.VisibleColumns[Index]; -end; - -function TdxGridBandedTableViewAdapter.GetFooterLineCount: Integer; -begin - if FFooterLineCount = -1 then - FFooterLineCount := CalculateFooterLineCount; - Result := FFooterLineCount; -end; - -function TdxGridBandedTableViewAdapter.GetRootBand(Index: Integer): TcxGridBand; -begin - Result := GridView.Bands.VisibleItems[Index]; -end; - -function TdxGridBandedTableViewAdapter.GetRootBandCount: Integer; -begin - Result := GridView.Bands.VisibleCount; -end; - -function TdxGridBandedTableViewAdapter.GetThemedBandHeaderItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderColor; -end; - -function TdxGridBandedTableViewAdapter.GetThemedBandHeaderItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderTextColor; -end; - -{ TdxGridBandedTableViewColumnPlace } - -function TdxGridBandedTableViewColumnPlace.GetLineCount: Integer; -begin - Result := Column.Position.LineCount; -end; - -function TdxGridBandedTableViewColumnPlace.GetRowIndex: Integer; -begin - Result := Column.Position.Row.LineOffset; -end; - -function TdxGridBandedTableViewColumnPlace.GetColumn: TcxGridBandedColumn; -begin - Result := inherited Column as TcxGridBandedColumn; -end; - -function TdxGridBandedTableViewColumnPlace.GetController: TdxCustomGridBandedTableViewItemPlace; -begin - Result := inherited Controller as TdxCustomGridBandedTableViewItemPlace; -end; - -function TdxGridBandedTableViewColumnPlace.GetFormatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -{ TdxCustomGridBandedTableViewItemPlace } - -constructor TdxCustomGridBandedTableViewItemPlace.Create(AController: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); -begin - inherited Create(AController.Formatter); - FController := AController; - FParent := AParent; - FBand := ABand; - - FHeight := -1; - FLeftBound := -1; - FMinWidth := -1; - FTopBound := -1; -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateHeaderLineCount: Integer; -var - I: Integer; -begin - Result := 0; - with Band.Rows do - for I := 0 to VisibleCount - 1 do - Inc(Result, VisibleItems[I].LineCount); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateWidth: Integer; -begin - Result := Band.Width; - if Result = 0 then - begin - Result := InternalCalculateWidth; - if Result = 0 then - Result := cxGridBandedTableView.cxGridDefaultEmptyBandWidth; - end; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; -begin - Result := TdxGridBandedTableViewColumnPlace; -end; - -procedure TdxCustomGridBandedTableViewItemPlace.AssignWidth; -begin - Width := Width; -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateHeight: Integer; -begin - Result := Controller.CalculateItemHeight(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateLevelHeight: Integer; -begin - if Adapter.BandHeaderHeightAssigned then - Result := Adapter.BandHeaderHeight - else - Result := CalculateLineHeight * Adapter.BandHeaderLineCount; -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateLineHeight: Integer; -begin - Result := 0; - Formatter.CalculateHeight(ViewParams, Result); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateMinWidth: Integer; -begin - Result := InternalCalculateMinWidth; -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateLeftBound: Integer; -begin - Result := Controller.CalculateItemLeftBound(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateTopBound: Integer; -begin - Result := Controller.CalculateItemTopBound(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.GetRowCount: Integer; -begin - Result := 0; -end; - -function TdxCustomGridBandedTableViewItemPlace.InternalCalculateMinWidth: Integer; -begin - Result := 0; -end; - -function TdxCustomGridBandedTableViewItemPlace.InternalCalculateWidth: Integer; -begin - Result := 0; -end; - -procedure TdxCustomGridBandedTableViewItemPlace.InitAutoWidthItem(AnItem: TcxAutoWidthItem); -begin - AnItem.Fixed := IsFixed; - AnItem.MinWidth := MinWidth; - AnItem.Width := Width; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetAdapter: TdxGridBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridBandedTableViewAdapter; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetBounds: TRect; -begin - Result := Classes.Bounds(LeftBound, TopBound, Width, Height); -end; - -function TdxCustomGridBandedTableViewItemPlace.GetFormatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetHeight: Integer; -begin - if FHeight = -1 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetIndex: Integer; -begin - if Parent <> nil then - Result := Parent.IndexOf(Self) - else - Result := Controller.RootIndexOf(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.GetIsFixed: Boolean; -begin - Result := not Band.Options.Sizing; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetLeftBound: Integer; -begin - if FLeftBound = -1 then - FLeftBound := CalculateLeftBound; - Result := FLeftBound; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetLevelIndex: Integer; -begin - Result := 0; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetMinWidth: Integer; -begin - if FMinWidth = -1 then - FMinWidth := CalculateMinWidth; - Result := FMinWidth; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetTopBound: Integer; -begin - if FTopBound = -1 then - FTopBound := CalculateTopBound; - Result := FTopBound; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetViewParams: TdxReportItemViewParams; -begin - Result := Formatter.GetBandItemViewParams(Band); -end; - -{ TdxGridBandedTableViewItemPlace } - -constructor TdxGridBandedTableViewItemPlace.Create(AnOwner: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); -begin - inherited; - FChildItems := TList.Create; -end; - -destructor TdxGridBandedTableViewItemPlace.Destroy; -begin - FreeAndNil(FChildItems); - inherited; -end; - -function TdxGridBandedTableViewItemPlace.IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -begin - Result := FChildItems.IndexOf(AnItem); -end; - - -function TdxGridBandedTableViewItemPlace.GetRowCount: Integer; -begin - Result := 1; -end; - -function TdxGridBandedTableViewItemPlace.InternalCalculateMinWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ChildItemCount - 1 do - Inc(Result, ChildItems[I].MinWidth); -end; - -function TdxGridBandedTableViewItemPlace.InternalCalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ChildItemCount - 1 do - Inc(Result, ChildItems[I].Width); -end; - -procedure TdxGridBandedTableViewItemPlace.WidthChanged; -begin - inherited; - CalculateChildItemWidths; -end; - -procedure TdxGridBandedTableViewItemPlace.CalculateChildItemWidths; -var - AutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AutoWidthObject := TcxAutoWidthObject.Create(ChildItemCount); - try - for I := 0 to ChildItemCount - 1 do - ChildItems[I].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := Width; - AutoWidthObject.Calculate; - - for I := 0 to ChildItemCount - 1 do - ChildItems[I].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; -end; - -function TdxGridBandedTableViewItemPlace.GetChildItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := FChildItems[Index]; -end; - -function TdxGridBandedTableViewItemPlace.GetChildItemCount: Integer; -begin - Result := FChildItems.Count; -end; - -{ TdxGridBandedTableViewBottomItemPlace } - -procedure TdxGridBandedTableViewBottomItemPlace.AddItems; -var - I, J: Integer; - Row: TcxGridBandRow; -begin - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - Row := Band.Rows.VisibleItems[I]; - for J := 0 to Row.VisibleCount - 1 do - CreateItem(Row.VisibleItems[J]); - end; -end; - -function TdxGridBandedTableViewBottomItemPlace.CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; -var - Row: TcxGridBandRow; - I: Integer; - Item: TdxGridTableViewColumnPlace; -begin - Result := LeftBound; - Row := TdxGridBandedTableViewColumnPlace(AnItem).Column.Position.Row; - for I := 0 to TdxGridBandedTableViewColumnPlace(AnItem).Column.Position.VisibleColIndex - 1 do - begin - Item := ItemsByColumn[Row.VisibleItems[I]]; - Inc(Result, Item.Width); - end; -end; - -procedure TdxGridBandedTableViewBottomItemPlace.CalculateItemsWidth; -var - I, J: Integer; - Row: TcxGridBandRow; - AutoWidthObject: TcxAutoWidthObject; - Column: TcxGridColumn; -begin - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - Row := Band.Rows.VisibleItems[I]; - AutoWidthObject := TcxAutoWidthObject.Create(Row.VisibleCount); - try - for J := 0 to Row.VisibleCount - 1 do - ItemsByColumn[Row.VisibleItems[J]].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := ItemsAvailableWidth; - AutoWidthObject.Calculate; - - for J := 0 to Row.VisibleCount - 1 do - begin - Column := Row.VisibleItems[J]; - ItemsByColumn[Column].Width := AutoWidthObject[J].AutoWidth; - end; - finally - AutoWidthObject.Free; - end; - end; -end; - -function TdxGridBandedTableViewBottomItemPlace.GetItemsAutoWidth: Boolean; -begin - Result := True; -end; - -function TdxGridBandedTableViewBottomItemPlace.GetItemsAvailableWidth: Integer; -begin - Result := Width; -end; - -function TdxGridBandedTableViewBottomItemPlace.GetRowCount: Integer; -begin - Result := Controller.LevelCount - LevelIndex; -end; - -function TdxGridBandedTableViewBottomItemPlace.InternalCalculateMinWidth: Integer; -var - I, V, J: Integer; - Row: TcxGridBandRow; - Column: TcxGridColumn; -begin - Result := 0; - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - V := 0; - Row := Band.Rows.VisibleItems[I]; - for J := 0 to Row.VisibleCount - 1 do - begin - Column := Row.VisibleItems[J]; - Inc(V, Adapter.InternalColumnMinWidths[Column]); - end; - //if Row.IsFirst then - // Inc(V, Formatter.IndentWidth * Formatter.IndentCount); - if Result < V then Result := V; - end -end; - -function TdxGridBandedTableViewBottomItemPlace.InternalCalculateWidth: Integer; -var - I, V, J: Integer; - Row: TcxGridBandRow; - Column: TcxGridColumn; -begin - Result := 0; - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - V := 0; - Row := Band.Rows.VisibleItems[I]; - for J := 0 to Row.VisibleCount - 1 do - begin - Column := Row.VisibleItems[J]; - Inc(V, Adapter.InternalColumnWidths[Column]); - end; - if Result < V then Result := V; - end; -end; - -procedure TdxGridBandedTableViewBottomItemPlace.WidthChanged; -begin - inherited; - CalculateItemsWidth; -end; - -{ TdxGridBandedTableViewItemPlaceController } - -constructor TdxGridBandedTableViewItemPlaceController.Create(AFormatter: TdxGridTableViewFormatter); -begin - inherited; - FBottomItems := TList.Create; - FItems := TList.Create; - FRootItems := TList.Create; - FLevelHeights := TList.Create; - - FHeight := -1; - FLevelCount := -1; -end; - -destructor TdxGridBandedTableViewItemPlaceController.Destroy; -begin - FreeAndNil(FLevelHeights); - FreeAndNil(FRootItems); - FreeAndNilItems; - FreeAndNil(FBottomItems); - inherited; -end; - -procedure TdxGridBandedTableViewItemPlaceController.Calculate; -begin - CalculateLevelHeights; - CalculateItemWidths; -end; - -procedure TdxGridBandedTableViewItemPlaceController.Refresh; -begin - ClearItems; - AddItems; - RefreshRootItems; - RefreshBottomItems; - RefreshItems; -end; - -function TdxGridBandedTableViewItemPlaceController.IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -begin - Result := FItems.IndexOf(AnItem); -end; - -function TdxGridBandedTableViewItemPlaceController.IndexOf(ABand: TcxGridBand): Integer; -begin - for Result := 0 to ItemCount - 1 do - if Items[Result].Band = ABand then - Exit; - Result := -1; -end; - -function TdxGridBandedTableViewItemPlaceController.RootIndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -begin - Result := FRootItems.IndexOf(AnItem); -end; - -function TdxGridBandedTableViewItemPlaceController.RootIndexOf(ABand: TcxGridBand): Integer; -begin - for Result := 0 to RootItemCount - 1 do - if RootItems[Result].Band = ABand then - Exit; - Result := -1; -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateHeaderLineCount: Integer; -var - I, V: Integer; -begin - Result := -1; - for I := 0 to BottomItemCount - 1 do - begin - V := BottomItems[I].HeaderLineCount; - if Result < V then Result := V; - end; -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RootItemCount - 1 do - Inc(Result, RootItems[I].Width); -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; -var - BandPlace: TdxCustomGridBandedTableViewItemPlace; -begin - BandPlace := ItemsByBand[TcxGridBandedColumn(Column).Position.Band]; - if BandPlace <> nil then - Result := BandPlace.ItemsByColumn[Column] - else - Result := nil; -end; - -procedure TdxGridBandedTableViewItemPlaceController.AddItems; -var - I: Integer; -begin - FItems.Count := Formatter.BandCount; - for I := 0 to ItemCount - 1 do - FItems[I] := CreateItem(Formatter.Bands[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateHeight: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to LevelCount - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateItemHeight(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := AnItem.LevelIndex to AnItem.LevelIndex + AnItem.RowCount - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateItemLeftBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -var - I: Integer; -begin - if AnItem.Parent <> nil then - begin - Result := AnItem.Parent.LeftBound; - for I := 0 to AnItem.Index - 1 do - Inc(Result, AnItem.Parent.ChildItems[I].Width); - end - else - begin - Result := 0; - for I := 0 to AnItem.Index - 1 do - Inc(Result, RootItems[I].Width); - end; -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateItemTopBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AnItem.LevelIndex - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateLevelCount: Integer; -var - I, V: Integer; -begin - Result := 0; - if ItemCount <> 0 then - begin - for I := 0 to ItemCount - 1 do - begin - V := Items[I].LevelIndex; - if Result < V then Result := V; - end; - Inc(Result); - end; -end; - -procedure TdxGridBandedTableViewItemPlaceController.CalculateItemWidths; -var - I: Integer; - AutoWidthObject: TcxAutoWidthObject; -begin - for I := 0 to RootItemCount - 1 do - RootItems[I].AssignWidth; - - if AutoWidth then - begin - AutoWidthObject := TcxAutoWidthObject.Create(RootItemCount); - try - for I := 0 to RootItemCount - 1 do - RootItems[I].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := AvailableWidth; - AutoWidthObject.Calculate; - - for I := 0 to RootItemCount - 1 do - RootItems[I].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; - end; -end; - -procedure TdxGridBandedTableViewItemPlaceController.CalculateLevelHeights; -var - I, V: Integer; - Item: TdxCustomGridBandedTableViewItemPlace; -begin - FLevelHeights.Count := LevelCount; - for I := 0 to ItemCount - 1 do - begin - Item := Items[I]; - V := Item.CalculateLevelHeight; - if LevelHeights[Item.LevelIndex] < V then - LevelHeights[Item.LevelIndex] := V; - end; -end; - -procedure TdxGridBandedTableViewItemPlaceController.ClearItems; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].Free; - FItems.Clear; -end; - -function TdxGridBandedTableViewItemPlaceController.CreateItem(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; -begin - Result := GetItemClass(ABand).Create(Self, nil, ABand); -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemClass(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlaceClass; -begin - Result := TdxGridBandedTableViewBottomItemPlace; -end; - -procedure TdxGridBandedTableViewItemPlaceController.RefreshBottomItems; -var - I: Integer; -begin - FBottomItems.Count := Adapter.BottomBandCount; - for I := 0 to BottomItemCount - 1 do - FBottomItems[I] := ItemsByBand[Adapter.BottomBands[I]]; -end; - -procedure TdxGridBandedTableViewItemPlaceController.RefreshItems; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].Refresh; -end; - -procedure TdxGridBandedTableViewItemPlaceController.RefreshRootItems; -var - I: Integer; -begin - FRootItems.Count := Adapter.RootBandCount; - for I := 0 to RootItemCount - 1 do - FRootItems[I] := ItemsByBand[Adapter.RootBands[I]]; -end; - -function TdxGridBandedTableViewItemPlaceController.GetAdapter: TdxGridBandedTableViewAdapter; -begin - Result := Formatter.Adapter; -end; - -function TdxGridBandedTableViewItemPlaceController.GetAutoWidth: Boolean; -begin - Result := Formatter.AutoWidth; -end; - -function TdxGridBandedTableViewItemPlaceController.GetAvailableWidth: Integer; -begin - Result := Formatter.ViewAvailableWidth; -end; - -function TdxGridBandedTableViewItemPlaceController.GetBottomItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := FBottomItems[Index]; -end; - -function TdxGridBandedTableViewItemPlaceController.GetBottomItemCount: Integer; -begin - Result := FBottomItems.Count; -end; - -function TdxGridBandedTableViewItemPlaceController.GetFormatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -function TdxGridBandedTableViewItemPlaceController.GetHeight: Integer; -begin - if FHeight = -1 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TdxGridBandedTableViewItemPlaceController.GetItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := FItems[Index]; -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemByBand(Band: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; -var - Index: Integer; -begin - Index := IndexOf(Band); - if Index <> -1 then - Result := Items[IndexOf(Band)] - else - Result := nil; -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxGridBandedTableViewItemPlaceController.GetLevelCount: Integer; -begin - if FLevelCount = -1 then - FLevelCount := CalculateLevelCount; - Result := FLevelCount; -end; - -function TdxGridBandedTableViewItemPlaceController.GetLevelHeight(Index: Integer): Integer; -begin - Result := Integer(FLevelHeights[Index]); -end; - -function TdxGridBandedTableViewItemPlaceController.GetRootItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := FRootItems[Index]; -end; - -function TdxGridBandedTableViewItemPlaceController.GetRootItemCount: Integer; -begin - Result := FRootItems.Count; -end; - -procedure TdxGridBandedTableViewItemPlaceController.SetLevelHeight(Index: Integer; Value: Integer); -begin - FLevelHeights[Index] := TObject(Value); -end; - -procedure TdxGridBandedTableViewItemPlaceController.FreeAndNilItems; -begin - ClearItems; - FreeAndNil(FItems); -end; - -{ TdxGridBandedTableViewFormatter } - -constructor TdxGridBandedTableViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FBands := TList.Create; -end; - -destructor TdxGridBandedTableViewFormatter.Destroy; -begin - FreeAndNil(FBands); - inherited; -end; - -function TdxGridBandedTableViewFormatter.Adapter: TdxGridBandedTableViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridBandedTableViewFormatter.Builder: TdxGridBandedTableViewBuilder; -begin - Result := inherited Builder as TdxGridBandedTableViewBuilder; -end; - -procedure TdxGridBandedTableViewFormatter.DoInitializeBandItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Band: TcxGridBand; -begin - Band := Bands[AnIndex]; - SetViewParams(AnItem, GetBandItemViewParams(Band)); - if HasBackgroundBitmap(bbBandHeader) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbBandHeader); - - RegisterLookAndFeelItem(AnItem, cesRaised); - - with AnItem as TdxReportCellString do - begin - Data := Integer(Band); - EndEllipsis := Adapter.BandEndEllipsis; - Multiline := Adapter.BandHeaderMultiline; - Text := Band.Caption; - TextAlignX := TextAlignXMap[Band.HeaderAlignmentHorz]; - TextAlignY := TextAlignYMap[Band.HeaderAlignmentVert]; - //Transparent := False; {!!! v3.03} - end; -end; - -procedure TdxGridBandedTableViewFormatter.DoInitializeBandRow(ARow: TdxReportCell); -begin - SetViewParams(ARow, GetBandItemViewParams(nil)); - ARow.Transparent := True; //??? -end; - -procedure TdxGridBandedTableViewFormatter.DoReportLinkInitializeBandItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - ReportLink.DoInitializeBandCell(Adapter.GridView, Bands[AnIndex], TdxReportCellString(AnItem)); -end; - -function TdxGridBandedTableViewFormatter.GetBandItemBounds(AnIndex: Integer): TRect; -var - Item: TdxCustomGridBandedTableViewItemPlace; -begin - Item := ItemPlaceController.ItemsByBand[Bands[AnIndex]]; - if Item <> nil then - Result := Item.Bounds - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridBandedTableViewFormatter.GetBandItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridBandedTableViewFormatter.GetBandItemViewParams(ABand: TcxGridBand): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetBandHeaderParams(ABand, Result.NativeParams) - else - Result.NativeParams := Adapter.GetBandHeaderViewParams(ABand); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if ABand <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedBandHeaderItemColor; - Result.NativeParams.TextColor := Adapter.ThemedBandHeaderItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent; -end; - -procedure TdxGridBandedTableViewFormatter.AddHorizontalDelimiters; -var - Origin, I: Integer; - R: TRect; - Item: TdxCustomGridBandedTableViewItemPlace; -begin - if ReportLink.OptionsPagination.Band then - begin - Origin := ViewWidthExtraBefore; - for I := 0 to BandCount - 1 do - begin - Item := ItemPlaceController.ItemsByBand[Bands[I]]; - if Item <> nil then - begin - R := Item.Bounds; - ReportLink.AddHorizontalDelimiter(Origin + R.Left); - ReportLink.AddHorizontalDelimiter(Origin + R.Right); - end; - end; - end; - inherited; -end; - -function TdxGridBandedTableViewFormatter.GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; -begin - Result := TdxGridBandedTableViewItemPlaceController; -end; - -procedure TdxGridBandedTableViewFormatter.BuildBandList; -var - I: Integer; - Band: TcxGridBand; -begin - FBands.Clear; - for I := 0 to Adapter.BandCount - 1 do - begin - Band := Adapter.Bands[I]; - if IsBandActuallyVisible(Band) then FBands.Add(Band); - end; -end; - -procedure TdxGridBandedTableViewFormatter.BuildItemLists; -begin - BuildBandList; - inherited; -end; - -function TdxGridBandedTableViewFormatter.IsBandActuallyVisible(ABand: TcxGridBand): Boolean; -begin - Result := True; -end; - -function TdxGridBandedTableViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbBandHeader: - Result := vspsGridBandHeader; - else - Result := 0; - end; - - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -function TdxGridBandedTableViewFormatter.GetBand(Index: Integer): TcxGridBand; -begin - Result := FBands[Index]; -end; - -function TdxGridBandedTableViewFormatter.GetBandCount: Integer; -begin - Result := FBands.Count; -end; - -function TdxGridBandedTableViewFormatter.GetColumn(Index: Integer): TcxGridBandedColumn; -begin - Result := inherited Columns[Index] as TcxGridBandedColumn; -end; - -function TdxGridBandedTableViewFormatter.GetItemPlaceController: TdxGridBandedTableViewItemPlaceController; -begin - Result := inherited ItemPlaceController as TdxGridBandedTableViewItemPlaceController; -end; - -function TdxGridBandedTableViewFormatter.GetShowBandHeaders: Boolean; -begin - Result := ReportLink.OptionsView.BandHeaders; -end; - -{ TdxGridBandedTableViewBuilder } - -function TdxGridBandedTableViewBuilder.Adapter: TdxGridBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridBandedTableViewAdapter; -end; - -class function TdxGridBandedTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridBandedTableViewAdapter; -end; - -function TdxGridBandedTableViewBuilder.Formatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -class function TdxGridBandedTableViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxGridBandedTableViewFormatter; -end; - -procedure TdxGridBandedTableViewBuilder.DoBuildViewBody; -begin - if Formatter.ShowBandHeaders then CreateBands; - if Formatter.ShowHeaders then CreateHeader; - CreateRows; - if Formatter.ShowFooters then CreateFooter; -end; - -procedure TdxGridBandedTableViewBuilder.CreateBands; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetBandsProducer.Produce(HostInfoServices.BandHeadersHostInfo); - AddReportRow(ReportRow); -end; - -function TdxGridBandedTableViewBuilder.GetBandsProducer: TdxGridTableViewBandsProducer; -begin - Result := ProducerCache[GetBandsProducerClass] as TdxGridTableViewBandsProducer; -end; - -function TdxGridBandedTableViewBuilder.GetBandsProducerClass: TdxGridTableViewBandsProducerClass; -begin - Result := TdxGridTableViewBandsProducer; -end; - -function TdxGridBandedTableViewBuilder.GridView: TcxGridBandedTableView; -begin - Result := inherited GridView as TcxGridBandedTableView; -end; - -class function TdxGridBandedTableViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridBandedTableView; -end; - -{ TdxGridDBBandedTableViewAdapter } - -function TdxGridDBBandedTableViewAdapter.GridView: TcxGridDBBandedTableView; -begin - Result := inherited GridView as TcxGridDBBandedTableView; -end; - -class function TdxGridDBBandedTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridDBBandedTableView; -end; - -procedure TdxGridDBBandedTableViewAdapter.AfterBuilding; -begin - UnloadAllRecords; - inherited; -end; - -procedure TdxGridDBBandedTableViewAdapter.BeforeBuilding; -begin - inherited; - LoadAllRecords; -end; - -function TdxGridDBBandedTableViewAdapter.DataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(inherited DataController); -end; - -function TdxGridDBBandedTableViewAdapter.DBDataModeController: TcxDBDataModeController; -begin - Result := DataController.DataModeController; -end; - -procedure TdxGridDBBandedTableViewAdapter.LoadAllRecords; -begin - _LoadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -procedure TdxGridDBBandedTableViewAdapter.UnloadAllRecords; -begin - _UnloadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -{ TdxGridDBBandedTableViewBuilder } - -function TdxGridDBBandedTableViewBuilder.Adapter: TdxGridDBBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridDBBandedTableViewAdapter; -end; - -class function TdxGridDBBandedTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridDBBandedTableViewAdapter; -end; - -{ TdxGridCardViewAdapter } - -function TdxGridCardViewAdapter.GridView: TcxGridCardView; -begin - Result := inherited GridView as TcxGridCardView; -end; - -class function TdxGridCardViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -function TdxGridCardViewAdapter.Styles: TcxGridCardViewStyles; -begin - Result := inherited Styles as TcxGridCardViewStyles; -end; - -procedure TdxGridCardViewAdapter.GetVisibleCardRows(ACard: TcxGridCard; AList: TList); -var - I: Integer; -begin - for I := 0 to CardRowCount - 1 do - AList.Add(CardRows[I]); -end; - -procedure TdxGridCardViewAdapter.ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; - ARecursive: Boolean); -begin -end; - -function TdxGridCardViewAdapter.IsFirstRow(ACardRow: TcxGridCardViewRow): Boolean; -begin - Result := ACardRow.VisibleIndex = 0; -end; - -function TdxGridCardViewAdapter.IsLastRow(ACardRow: TcxGridCardViewRow): Boolean; -begin - Result := ACardRow.VisibleIndex = CardRowCount - 1; -end; - -function TdxGridCardViewAdapter.GetAreAllMasterRowsCollapsed: Boolean; -begin - Result := True; -end; - -function TdxGridCardViewAdapter.GetCaptionRowViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; -begin - if (ACardRow <> nil) and (ACardRow.Styles.CaptionRow <> nil) then - ACardRow.Styles.GetCaptionRowParams(ARecord, Result) - else - Styles.GetCaptionRowParams(ARecord, ACardRow, Result); -end; - -function TdxGridCardViewAdapter.GetCardViewParams(ARecord: TcxCustomGridRecord): TcxViewParams; -begin - Styles.GetContentParams(ARecord, nil, Result); -end; - -function TdxGridCardViewAdapter.GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; -begin - if TcxGridCardViewRow(ATableItem).Kind = rkData then - Result := inherited GetContentViewParams(ARecord, ATableItem) - else - Result := GetCaptionRowViewParams(ARecord, TcxGridCardViewRow(ATableItem)); -end; - -function TdxGridCardViewAdapter.GetRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; -begin - if (ACardRow <> nil) and (ACardRow.Kind = rkData) then - if ACardRow.Styles.Caption <> nil then - ACardRow.Styles.GetCaptionParams(ARecord, Result) - else - Styles.GetRowCaptionParams(ARecord, ACardRow, Result) - else - Result := GetCaptionRowViewParams(ARecord, ACardRow); -end; - -function TdxGridCardViewAdapter.GetCaptionSeparator: string; -begin - Result := GridView.OptionsView.CaptionSeparator; -end; - -function TdxGridCardViewAdapter.GetCard(Index: Integer): TcxGridCard; -begin - Result := Records[Index] as TcxGridCard; -end; - -function TdxGridCardViewAdapter.GetCardCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridCardViewAdapter.GetCardCaptionWidth: Integer; -begin - Result := GridView.OptionsView.CaptionWidth; -end; - -function TdxGridCardViewAdapter.GetCardRow(Index: Integer): TcxGridCardViewRow; -begin - Result := GridView.VisibleRows[Index]; -end; - -function TdxGridCardViewAdapter.GetCardRowCount: Integer; -begin - Result := GridView.VisibleRowCount; -end; - -function TdxGridCardViewAdapter.GetCardSeparatorColor: Integer; -begin - Result := GridView.OptionsView.SeparatorColor; -end; - -function TdxGridCardViewAdapter.GetCardSeparatorThickness: Integer; -begin - Result := GridView.OptionsView.SeparatorWidth; -end; - -function TdxGridCardViewAdapter.GetCardWidth: Integer; -begin - Result := GridView.OptionsView.CardWidth; -end; - -function TdxGridCardViewAdapter.GetHasCardsSeparator: Boolean; -begin - Result := CardSeparatorThickness <> 0; -end; - -function TdxGridCardViewAdapter.GetRowAutoHeight: Boolean; -begin - with GridView.OptionsView do - Result := CellAutoHeight or RowCaptionAutoHeight; -end; - -function TdxGridCardViewAdapter.GetRowCaptionAutoHeight: Boolean; -begin - Result := GridView.OptionsView.RowCaptionAutoHeight; -end; - -function TdxGridCardViewAdapter.GetRowCaptionEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.RowCaptionEndEllipsis; -end; - -function TdxGridCardViewAdapter.GetShowRowCaption(Index: Integer): Boolean; -begin - Result := CardRows[Index].Options.ShowCaption; -end; - -{ TdxGridCardViewFormatter } - -function TdxGridCardViewFormatter.Adapter: TdxGridCardViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridCardViewFormatter.Builder: TdxGridCardViewBuilder; -begin - Result := inherited Builder as TdxGridCardViewBuilder; -end; - -procedure TdxGridCardViewFormatter.DoInitializeCard(ACard: TdxReportCard; - AGridCard: TcxGridCard); -begin - with ReportLink.OptionsCards.Shadow do - begin - ACard.ShadowColor := ActualColor; - ACard.ShadowDepth := Depth; - ACard.ShadowPosition := Position; - end; - - SetViewParams(ACard, GetCardViewParams(AGridCard)); - - ACard.Data := Integer(AGridCard); - ACard.Width := Adapter.CardWidth; - ACard.CreateRows(Builder); -end; - -procedure TdxGridCardViewFormatter.DoInitializeCardsRow(ACard: TdxReportCell); -begin - if HasBackgroundBitmap(bbBackground) then - ACard.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbBackground); - ACard.CellSides := []; -end; - -function TdxGridCardViewFormatter.GetCardClass(AGridCard: TcxGridCard): TdxReportCardClass; -begin - Result := TdxReportCard; -end; - -function TdxGridCardViewFormatter.GetCardViewParams(ARecord: TcxCustomGridRecord): TdxReportItemViewParams; -begin - Result.NativeParams := Adapter.GetCardViewParams(ARecord); - Result.CellSides := csAll;//[]; // because of Card Shadow - Result.FontStyle := []; - Result.Transparent := True; -end; - -procedure TdxGridCardViewFormatter.DoInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); -const - BackgroundBitmapIndexes: array[TcxGridCardViewRowKind] of Integer = (bbRowCaption, bbCaptionRow); -begin - SetViewParams(AnItem, GetCardRowCaptionViewParams(AGridCard, ACardRow)); - if HasBackgroundBitmap(BackgroundBitmapIndexes[ACardRow.Kind]) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(BackgroundBitmapIndexes[ACardRow.Kind]); - - with AnItem as TdxReportCellString do - begin - EndEllipsis := Adapter.RowCaptionEndEllipsis; - Multiline := {True; //}not EndEllipsis and not CaptionAutoWidth and Adapter.RowCaptionAutoHeight; - TextAlignX := TextAlignXMap[ACardRow.CaptionAlignmentHorz]; - if Multiline then - TextAlignY := TextAlignYMap[ACardRow.CaptionAlignmentVert] - else - TextAlignY := taTop; - end; - AnItem.Text := ACardRow.Caption + Adapter.CaptionSeparator; -end; - -procedure TdxGridCardViewFormatter.DoReportLinkInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); -begin - ReportLink.DoInitializeCardRowCaptionCell(Adapter.GridView, AGridCard, ACardRow, TdxReportCellString(AnItem)); -end; - -function TdxGridCardViewFormatter.GetCardRowCaptionClass(ACardRow: TcxGridCardViewRow): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridCardViewFormatter.GetCardRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - if ACardRow.Kind = rkData then - ReportLink.Styles.GetCardRowCaptionParams(ARecord, ACardRow, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetCardCaptionRowParams(ARecord, ACardRow, Result.NativeParams) - else - if (ACardRow.Kind = rkCaption) and CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetRowCaptionViewParams(ARecord, ACardRow); - - // v.3.1 - because of fact that each Card in Grid v.5 might has different number of Rows, - // CellSides initialization was moved inside ReportCard - Result.CellSides := []; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent -end; - -procedure TdxGridCardViewFormatter.DoReportLinkInitializeCardRowData(AnItem: TAbstractdxReportCellData; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); -begin - ReportLink.DoInitializeCardRowDataCell(Adapter.GridView, AGridCard, ACardRow, TdxReportCellString(AnItem)); -end; - -function TdxGridCardViewFormatter.GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; -var - CardRow: TcxGridCardViewRow; -begin - CardRow := TcxGridCardViewRow(ATableItem); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CardRow.Kind = rkData then - ReportLink.Styles.GetContentParams(ARecord, CardRow, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetCardCaptionRowParams(ARecord, CardRow, Result.NativeParams) - else - if CardRow.Kind = rkData then - Result := inherited GetItemViewParams(ATableItem, ARecord, AnIsPreview) - else - if CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetCaptionRowViewParams(ARecord, CardRow); - - // v.3.1 - because fact that each Card in Grid v.5 might has different number of Rows, - // CellSides initialization was moved inside ReportCard - Result.CellSides := []; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent -end; - -procedure TdxGridCardViewFormatter.AddHorizontalDelimiters; -var - I: Integer; -begin - for I := 0 to Builder.CardCount - 1 do - ReportLink.AddHorizontalDelimiter(Builder.Cards[I].AbsoluteRect.Right); -end; - -procedure TdxGridCardViewFormatter.AddVerticalDelimiters; -var - I: Integer; -begin - if NeedDelimitByRows then - begin - for I := 0 to Builder.CardCount - 1 do - Builder.Cards[I].AddVerticalDelimiters; - end - else - inherited; -end; - -function TdxGridCardViewFormatter.GetViewWidth: Integer; -var - MasterBuilder: TdxCustomGridViewBuilder; -begin - MasterBuilder := Builder.MasterBuilder; - if MasterBuilder <> nil then - begin - Result := MasterBuilder.Formatter.ViewWidth - MasterBuilder.Adapter.ViewWidthExtra; - if HasDetailsSeparator then - Dec(Result, 2 * DetailsSeparatorThickness); - end - else - begin - Result := SiteWidth; - if HasDetailsSeparator then - Dec(Result, 2 * DetailsSeparatorThickness); - if Result < Builder.MaxCardWidth + FirstCardOffset then - Result := Builder.MaxCardWidth + FirstCardOffset; - end; -end; - -function TdxGridCardViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbCaptionRow: - Result := vspsGridCardCaptionRow; - bbRowCaption: - Result := vspsGridCardRowCaption; - else - Result := 0; - end; - - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -function TdxGridCardViewFormatter.GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; -const - BackgroundBitmapIndexes: array[TcxGridCardViewRowKind] of Integer = (bbContent, bbCaptionRow); -begin - Result := BackgroundBitmapIndexes[TcxGridCardViewRow(ATableItem).Kind]; -end; - -function TdxGridCardViewFormatter.NeedDelimitByRows: Boolean; -{var - I: Integer;} -begin - Result := False; - {if MasterBuilder = nil then - for I := 0 to Builder.CardCount - 1 do - if Builder.Cards[I].Height > SiteHeight then - begin - Result := True; - Exit; - end;} -end; - -function TdxGridCardViewFormatter.GetAutoWidth: Boolean; -begin - Result := ReportLink.OptionsCards.AutoWidth; -end; - -function TdxGridCardViewFormatter.GetCaptionAutoWidth: Boolean; -begin - Result := Adapter.CardCaptionWidth = 0; -end; - -function TdxGridCardViewFormatter.GetCard(Index: Integer): TcxGridCard; -begin - Result := TcxGridCard(Records[Index]); -end; - -function TdxGridCardViewFormatter.GetCardCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridCardViewFormatter.GetCardsAreaWidth: Integer; -begin - Result := ViewWidth - FirstCardOffset; -end; - -function TdxGridCardViewFormatter.GetInterCardsSpaceHorz: Integer; -begin - Result := ReportLink.OptionsCards.InterCardsSpaceHorz; -end; - -function TdxGridCardViewFormatter.GetInterCardsSpaceVert: Integer; -begin - Result := ReportLink.OptionsCards.InterCardsSpaceVert; -end; - -function TdxGridCardViewFormatter.GetKeepSameHeight: Boolean; -begin - Result := ReportLink.OptionsCards.KeepSameHeight; -end; - -function TdxGridCardViewFormatter.GetKeepSameWidth: Boolean; -begin - Result := ReportLink.OptionsCards.KeepSameWidth; -end; - -function TdxGridCardViewFormatter.GetRowAutoHeight: Boolean; -begin - Result := Adapter.RowAutoHeight; -end; - -{ TdxReportCardRow } - -constructor TdxReportCardRow.CreateEx(AParent: TdxReportCell; AGridCardRow: TcxGridCardViewRow); -begin - inherited Create(AParent); - CellSides := []; - Data := Integer(AGridCardRow); - Width := Card.RowsAvailableWidth; -end; - -function TdxReportCardRow.MeasureHeight(DC: HDC; ACalculateLineHeight: Boolean; - ABuilder: TdxGridCardViewBuilder): Integer; - - function MeasureCaptionHeight: Integer; - begin - Result := DefaultDataRowLineHeight; - if HasCaption then - if ACalculateLineHeight then - Result := RowCaption.MeasureFontHeight(DC) - else - Result := RowCaption.MeasureContentHeight(DC); - - if Result < DefaultDataRowLineHeight then - Result := DefaultDataRowLineHeight; - end; - - function MeasureDataHeight: Integer; - var - MinHeight: Integer; - begin - MinHeight := RowData.MeasureFontHeight(DC); - if not ACalculateLineHeight then - begin - Result := RowData.MeasureContentHeight(DC); - if Result = 0 then - Result := MinHeight; - end - else - Result := MinHeight; - - ABuilder.DoGetCellHeight(Card.GridCard, GridCardRow, Result); - if Result < MinHeight then - Result := MinHeight; - end; - -begin - Result := Max(MeasureCaptionHeight, MeasureDataHeight); -end; - -function TdxReportCardRow.MeasureCaptionWidth(DC: HDC): Integer; -begin - if HasCaption then - Result := RowCaption.MeasureContentWidth(DC) + 2 - else - Result := 0; -end; - -function TdxReportCardRow.MeasureDataWidth(DC: HDC): Integer; -begin - if dxPSDataMaps.DoesItemParticipateInAutoWidthCalculation(Properties) then - Result := RowData.MeasureContentWidth(DC) + 2 - else - Result := 0; -end; - -procedure TdxReportCardRow.AdjustCellSides; -var - ReportLink: TdxGridReportLink; - Sides: TdxCellSides; -begin - ReportLink := Card.ReportLink; - if ReportLink.OptionsCards.Borders then - begin - Sides := []; - if IsFirstItem then Include(Sides, csTop); - if IsLastItem then Include(Sides, csBottom); - if HasCaption then - begin - RowCaption.CellSides := RowCaption.CellSides + Sides; - RowCaption.CellSides := RowCaption.CellSides + [csLeft]; - end; - RowData.CellSides := RowData.CellSides + Sides; - RowData.CellSides := RowData.CellSides + [csRight]; - if not HasCaption then - RowData.CellSides := RowData.CellSides + [csLeft]; - end; - - if ReportLink.OptionsCards.RowBordersHorz then - begin - Sides := []; - if not IsFirstItem then Include(Sides, csTop); - if not IsLastItem then Include(Sides, csBottom); - if HasCaption then - RowCaption.CellSides := RowCaption.CellSides + Sides; - RowData.CellSides := RowData.CellSides + Sides; - end; - - if ReportLink.OptionsCards.RowBordersVert then - if HasCaption then - begin - RowCaption.CellSides := RowCaption.CellSides + [csRight]; - RowData.CellSides := RowData.CellSides + [csLeft]; - end; -end; - -procedure TdxReportCardRow.CreateItems(ABuilder: TdxGridCardViewBuilder); -const - InitialCaptionWidth = 100; - - function HasRowCaption: Boolean; - begin - Result := ABuilder.Adapter.ShowRowCaption[Index]; - end; - - procedure CreateRowCaption; - var - RowCaption: TdxReportCellText; - begin - RowCaption := ABuilder.Formatter.GetCardRowCaptionClass(GridCardRow).Create(Self); - RowCaption.Width := InitialCaptionWidth; - RowCaption.Height := Height; - RowCaption.Data := Integer(TdxGridCardRowCaption); - ABuilder.Formatter.DoInitializeCardRowCaption(RowCaption, GridCardRow, Card.GridCard); - ABuilder.Formatter.DoReportLinkInitializeCardRowCaption(RowCaption, GridCardRow, Card.GridCard); - end; - - procedure CreateRowData; - var - RowData: TAbstractdxReportCellData; - begin - RowData := ABuilder.Formatter.GetItemClass(GridCardRow, Card.GridCard, False).Create(Self); - if HasRowCaption then - RowData.Left := InitialCaptionWidth - else - RowData.Left := 0; - RowData.Width := Parent.Width - Left; - RowData.Height := Height; - ABuilder.Formatter.DoInitializeItem(RowData, GridCardRow, Card.GridCard, False); - ABuilder.Formatter.DoReportLinkInitializeCardRowData(RowData, GridCardRow, Card.GridCard); - end; - -begin - if HasRowCaption then CreateRowCaption; - CreateRowData; - - Width := Width; - Height := Height; -end; - -function TdxReportCardRow.GetCard: TdxReportCard; -begin - Result := TdxReportCard(Parent); -end; - -function TdxReportCardRow.GetGridCardRow: TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(Data); -end; - -function TdxReportCardRow.GetHasCaption: Boolean; -begin - Result := DataItemCount > 1; -end; - -function TdxReportCardRow.GetHeight: Integer; -begin - Result := inherited Height; -end; - -function TdxReportCardRow.GetProperties: TcxCustomEditProperties; -begin - Result := GridCardRow.GetProperties; -end; - -function TdxReportCardRow.GetRowCaption: TdxReportCellText; -begin - if HasCaption then - Result := DataItems[0] as TdxReportCellText - else - Result := nil; -end; - -function TdxReportCardRow.GetRowData: TAbstractdxReportCellData; -begin - if DataItemCount > 0 then - if HasCaption then - Result := DataItems[1] - else - Result := DataItems[0] - else - Result := nil; -end; - -function TdxReportCardRow.GetWidth: Integer; -begin - Result := inherited Width; -end; - -procedure TdxReportCardRow.SetHeight(Value: Integer); -begin - inherited Height := Value; - if HasCaption then RowCaption.Height := Height; - RowData.Height := Height; -end; - -procedure TdxReportCardRow.SetRowCaptionWidth(Value: Integer); -begin - if HasCaption then - begin - RowCaption.Width := Value; - RowData.Left := Value; - RowData.Width := Width - Value; - - if RowCaption.Width >= Width then - RowCaption.CellSides := RowCaption.CellSides + [csRight]; - end; -end; - -procedure TdxReportCardRow.SetWidth(Value: Integer); -begin - inherited Width := Value; - - if RowCaption <> nil then - if RowCaption.Width > Width then RowCaption.Width := Width; - - if RowData <> nil then - begin - if RowData.Left > Width then RowData.Left := Width; - RowData.Width := Width - RowData.Left; - end; -end; - -{ TdxCardBorderPainter } - -function TdxCardBorderPainter.Card: TdxReportCard; -begin - Result := inherited Item as TdxReportCard; -end; - -procedure TdxCardBorderPainter.Paint(DC: HDC); -begin - if Card.HasShadow then DrawShadow(DC); -end; - -procedure TdxCardBorderPainter.DrawShadow(DC: HDC); -begin - Renderer.FillRect(DC, Card.ShadowRectHorz, Card.ShadowColor); - Renderer.FillRect(DC, Card.ShadowRectVert, Card.ShadowColor); -end; - -{ TdxReportCard } - -constructor TdxReportCard.Create(AParent: TdxReportCell); -begin - inherited; - ShadowColor := clBlack; - ShadowDepth := dxDefaultCardsShadowDepth; - ShadowPosition := cspBottomRight; -end; - -constructor TdxReportCard.CreateEx(AParent: TdxReportCell; AGridCard: TcxGridCard); -begin - Create(AParent); - Data := Integer(AGridCard); -end; - -function TdxReportCard.GetBorderOuterBounds(DC: HDC): TRect; -begin - Result := inherited GetBorderBounds(DC); - with Result do - case ShadowPosition of - cspTopLeft: - begin - Inc(Left, ShadowDepth); - Inc(Top, ShadowDepth); - end; - cspTopRight: - begin - Dec(Right, ShadowDepth); - Inc(Top, ShadowDepth); - end; - cspBottomRight: - begin - Dec(Right, ShadowDepth); - Dec(Bottom, ShadowDepth); - end; - cspBottomLeft: - begin - Inc(Left, ShadowDepth); - Dec(Bottom, ShadowDepth); - end; - end; -end; - -function TdxReportCard.IndexOfCardRow(ACardRow: TcxGridCardViewRow): Integer; -begin - for Result := 0 to CellCount - 1 do - if Rows[Result].GridCardRow = ACardRow then Exit; - Result := -1; -end; - -procedure TdxReportCard.AdjustHeight; -var - TotalHeight, I: Integer; -begin - TotalHeight := 0; - for I := 0 to RowCount - 1 do - Inc(TotalHeight, RowHeights[I]); - Height := TotalHeight; -end; - -procedure TdxReportCard.AdjustRowsCellSides; -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - Rows[I].AdjustCellSides; -end; - -procedure TdxReportCard.AdjustRowsPos; -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - with Rows[I] do - begin - Left := RowsOriginLeft; - Top := Top + RowsOriginTop; - end; -end; - -procedure TdxReportCard.AdjustRowsHeight(DC: HDC; AAutoHeight: Boolean; - ABuilder: TdxGridCardViewBuilder); -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - RowHeights[I] := Rows[I].MeasureHeight(DC, not AAutoHeight, ABuilder); -end; - -procedure TdxReportCard.AdjustRowsWidth(DC: HDC); -begin - Width := RowCaptionWidth + MeasureDataWidth(DC); -end; - -function TdxReportCard.MeasureCaptionWidth(DC: HDC): Integer; -var - I, V: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - begin - V := Rows[I].MeasureCaptionWidth(DC); - if V > Result then Result := V; - end; -end; - -function TdxReportCard.MeasureDataWidth(DC: HDC): Integer; -var - I, V: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - begin - V := Rows[I].MeasureDataWidth(DC); - if V > Result then Result := V; - end; -end; - -procedure TdxReportCard.AddVerticalDelimiters; -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - ReportLink.AddVerticalDelimiter(Rows[I]); -end; - -procedure TdxReportCard.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -begin - inherited; - FShadowDepth := MulDiv(FShadowDepth, APixelsNumerator, APixelsDenominator); -end; - -procedure TdxReportCard.CreateRows(ABuilder: TdxGridCardViewBuilder); -var - I: Integer; - List: TList; - CardRow: TdxReportCardRow; -begin - List := TList.Create; - try - ABuilder.Adapter.GetVisibleCardRows(GridCard, List); - - AllocateSpaceForCells(List.Count); - for I := 0 to List.Count - 1 do - begin - CardRow := TdxReportCardRow.CreateEx(Self, TcxGridCardViewRow(List[I])); - CardRow.CreateItems(ABuilder); - end; - finally - List.Free; - end; -end; - -function TdxReportCard.GetBorderPainterClass: TdxPSCellBorderPainterClass; -begin - Result := TdxCardBorderPainter; -end; - -procedure TdxReportCard.ReadProperties(AReader: TdxPSDataReader); -begin - inherited; - with AReader do - begin - FRowCaptionWidth := ReadInteger; - FShadowColor := ReadInteger; - FShadowDepth := ReadInteger; - FShadowPosition := TdxGridCardShadowPosition(ReadInteger); - end; -end; - -procedure TdxReportCard.WriteProperties(AWriter: TdxPSDataWriter); -begin - inherited; - with AWriter do - begin - WriteInteger(RowCaptionWidth); - WriteInteger(ShadowColor); - WriteInteger(ShadowDepth); - WriteInteger(Integer(ShadowPosition)); - end; -end; - -function TdxReportCard.GetGridCard: TcxGridCard; -begin - Result := TcxGridCard(Data); -end; - -function TdxReportCard.GetHasShadow: Boolean; -begin - Result := ShadowDepth > 0; -end; - -function TdxReportCard.GetHeight: Integer; -begin - Result := inherited Height; -end; - -function TdxReportCard.GetRowCount: Integer; -begin - Result := CellCount; -end; - -function TdxReportCard.GetReportLink: TdxGridReportLink; -begin - Result := TdxGridReportLink(ReportCells.ReportLink); -end; - -function TdxReportCard.GetRow(Index: Integer): TdxReportCardRow; -begin - Result := Cells[Index] as TdxReportCardRow; -end; - -function TdxReportCard.GetRowByCardRow(CardRow: TcxGridCardViewRow): TdxReportCardRow; -begin - Result := Rows[IndexOfCardRow(CardRow)]; -end; - -function TdxReportCard.GetRowHeight(Index: Integer): Integer; -begin - Result := Rows[Index].Height; -end; - -function TdxReportCard.GetRowsAvailableHeight: Integer; -begin - Result := Height - ShadowDepth; -end; - -function TdxReportCard.GetRowsAvailableWidth: Integer; -begin - Result := Width - ShadowDepth; -end; - -function TdxReportCard.GetRowsOriginLeft: Integer; -begin - if ShadowPosition in [cspTopLeft, cspBottomLeft] then - Result := ShadowDepth - else - Result := 0; -end; - -function TdxReportCard.GetRowsOriginTop: Integer; -begin - if ShadowPosition in [cspTopLeft, cspTopRight] then - Result := ShadowDepth - else - Result := 0; -end; - -function TdxReportCard.GetShadowRectHorz: TRect; -begin - Result := BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - with Result do - case ShadowPosition of - cspTopLeft: - begin - Right := Right - ShadowDepth; - Bottom := Top + ShadowDepth; - end; - cspTopRight: - begin - Left := Left + ShadowDepth; - Bottom := Top + ShadowDepth; - end; - cspBottomRight: - begin - Left := Left + ShadowDepth; - Top := Bottom - ShadowDepth; - end; - cspBottomLeft: - begin - Right := Right - ShadowDepth; - Top := Bottom - ShadowDepth; - end; - end; -end; - -function TdxReportCard.GetShadowRectVert: TRect; -begin - Result := BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - with Result do - case ShadowPosition of - cspTopLeft: - begin - Right := Left + ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - cspTopRight: - begin - Left := Right - ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - cspBottomRight: - begin - Left := Right - ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - cspBottomLeft: - begin - Right := Left + ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - end; -end; - -function TdxReportCard.GetWidth: Integer; -begin - Result := inherited Width; -end; - -procedure TdxReportCard.SetHeight(Value: Integer); -begin - inherited Height := Value + ShadowDepth; -end; - -procedure TdxReportCard.SetRowCaptionWidth(Value: Integer); -var - I: Integer; -begin - if Value < 0 then Value := 0; - - FRowCaptionWidth := Value; - for I := 0 to RowCount - 1 do - Rows[I].RowCaptionWidth := Value; -end; - -procedure TdxReportCard.SetRowHeight(Index, Value: Integer); -var - Delta, I: Integer; -begin - if Value < 0 then Value := 0; - - Delta := Value - Rows[Index].Height; - Rows[Index].Height := Value; - - for I := Index + 1 to RowCount - 1 do - Rows[I].Top := Rows[I].Top + Delta; -end; - -procedure TdxReportCard.SetShadowDepth2(Value: Integer); -var - SaveWidth, SaveHeight: Integer; -begin - if FShadowDepth <> Value then - begin - SaveHeight := RowsAvailableHeight; - SaveWidth := RowsAvailableWidth; - FShadowDepth := Value; - Height := SaveHeight; - Width := SaveWidth; - end; -end; - -procedure TdxReportCard.SetWidth(Value: Integer); -var - I: Integer; -begin - inherited Width := Value + ShadowDepth; - for I := 0 to RowCount - 1 do - Rows[I].Width := RowsAvailableWidth; -end; - -{ TdxGridCardViewBuilder } - -constructor TdxGridCardViewBuilder.Create(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); -begin - inherited; - FCards := TList.Create; -end; - -destructor TdxGridCardViewBuilder.Destroy; -begin - FreeAndNil(FCards); - inherited; -end; - -function TdxGridCardViewBuilder.Adapter: TdxGridCardViewAdapter; -begin - Result := inherited Adapter as TdxGridCardViewAdapter; -end; - -class function TdxGridCardViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridCardViewAdapter; -end; - -function TdxGridCardViewBuilder.Formatter: TdxGridCardViewFormatter; -begin - Result := inherited Formatter as TdxGridCardViewFormatter; -end; - -class function TdxGridCardViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxGridCardViewFormatter; -end; - -procedure TdxGridCardViewBuilder.DoBuildViewBody; -begin - CreateCards; - if not IsAborted then - begin - ResizeCards; - PlaceCards; - AdjustCardRowsCellSides; - end; -end; - -procedure TdxGridCardViewBuilder.AdjustCardRowsCellSides; -var - I: Integer; -begin - for I := 0 to CardCount - 1 do - Cards[I].AdjustRowsCellSides; -end; - -procedure TdxGridCardViewBuilder.CreateCards; -var - Producer: TdxGridCardViewCardsRowProducer; - I: Integer; -begin - Producer := GetCardsRowProducer; - - FCards.Count := Formatter.CardCount; - for I := 0 to CardCount - 1 do - begin - FCards[I] := Producer.CreateCard(Host, Formatter.Cards[I]); - if MasterBuilder = nil then - begin - Progress(100 * (I + 1) / Formatter.CardCount); - if IsAborted then Break; - end; - end; -end; - -procedure TdxGridCardViewBuilder.PlaceCards; - - procedure MakeRowIndexes(AnIndexes: TList); - var - I, PlaceWidth, EntryNumber: Integer; - begin - I := 0; - if CardCount > 0 then AnIndexes.Add(TObject(0)); - - while I < CardCount do - begin - PlaceWidth := Formatter.CardsAreaWidth; - EntryNumber := 0; - repeat - Inc(EntryNumber); - if EntryNumber > 1 then - Dec(PlaceWidth, Formatter.InterCardsSpaceHorz); - Dec(PlaceWidth, Cards[I].Width); - if (PlaceWidth >= 0) or (EntryNumber = 1) then - Inc(I); - until (PlaceWidth <= 0) or (I >= CardCount); - AnIndexes.Add(TObject(I)); - end; - end; - - procedure MakeRows(AIndexes: TList; AProducer: TdxGridCardViewCardsRowProducer); - - function GetMaxCardHeight(AStartIndex, AEndIndex: Integer): Integer; - var - I, V: Integer; - begin - Result := Cards[AStartIndex].Height; - if not Formatter.KeepSameHeight then - for I := AStartIndex + 1 to AEndIndex do - begin - V := Cards[I].Height; - if Result < V then Result := V; - end; - end; - - var - RowIndex, StartIndex, EndIndex, I, RowHeight: Integer; - ReportRow: TdxReportCell; - begin - for RowIndex := 0 to AIndexes.Count - 2 do - begin - StartIndex := Integer(AIndexes[RowIndex]); - EndIndex := Integer(AIndexes[RowIndex + 1]) - 1; - - RowHeight := GetMaxCardHeight(StartIndex, EndIndex) + Formatter.InterCardsSpaceHorz; - ReportRow := AProducer.Produce(HostInfoServices.PageDetailsHostInfo, RowHeight); - AddReportRow(ReportRow); - - for I := StartIndex to EndIndex do - AProducer.InjectCard(Cards[I], I - StartIndex); - end; - end; - -var - Indexes: TList; -begin - Indexes := TList.Create; - try - MakeRowIndexes(Indexes); - MakeRows(Indexes, GetCardsRowProducer); - finally - Indexes.Free; - end; -end; - -procedure TdxGridCardViewBuilder.ResizeCards; - - procedure SetCardsRowCaptionWidth(DC: HDC); - var - RowCaptionWidth, I, V: Integer; - begin - if Formatter.CaptionAutoWidth then - begin - RowCaptionWidth := 0; - for I := 0 to CardCount - 1 do - begin - V := Cards[I].MeasureCaptionWidth(DC); - if V > RowCaptionWidth then RowCaptionWidth := V; - end; - end - else - RowCaptionWidth := Adapter.CardCaptionWidth; - - if (RowCaptionWidth > Adapter.CardWidth) and not Formatter.AutoWidth then - RowCaptionWidth := Adapter.CardWidth; - - for I := 0 to CardCount - 1 do - Cards[I].RowCaptionWidth := RowCaptionWidth; - end; - - procedure CalcMaxCardWidth; - var - I, V: Integer; - begin - FMaxCardWidth := 0; - for I := 0 to CardCount - 1 do - begin - V := Cards[I].Width; - if V > FMaxCardWidth then FMaxCardWidth := V; - end; - end; - - procedure SetCardsAutoWidth(DC: HDC); - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - Cards[I].AdjustRowsWidth(DC); - end; - - procedure SetSameCardsWidth(AWidth: Integer); - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - Cards[I].Width := AWidth; - end; - - procedure SetCardsRowHeight(DC: HDC; AAutoHeight: Boolean); - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - Cards[I].AdjustRowsHeight(DC, AAutoHeight, Self); - end; - - procedure SetCardsSameHeights; - var - CardRowHeights: array of Integer; - I, J, RowIndex: Integer; - Card: TdxReportCard; - Row: TdxReportCardRow; - begin - SetLength(CardRowHeights, Adapter.CardRowCount); - - for I := 0 to CardCount - 1 do - begin - Card := Cards[I]; - for J := 0 to Card.RowCount - 1 do - begin - Row := Card.Rows[J]; - RowIndex := Row.GridCardRow.VisibleIndex; - if CardRowHeights[RowIndex] < Row.Height then - CardRowHeights[RowIndex] := Row.Height; - end; - end; - - for I := 0 to CardCount - 1 do - begin - Card := Cards[I]; - for J := 0 to Card.RowCount - 1 do - begin - RowIndex := Card.Rows[J].GridCardRow.VisibleIndex; - Card.RowHeights[J] := CardRowHeights[RowIndex]; - end; - end; - end; - - procedure AdjustCards; - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - with Cards[I] do - begin - AdjustHeight; - AdjustRowsPos; - end; - end; - -begin - FMaxCardWidth := 0; - SetCardsRowCaptionWidth(Formatter.DC); - if Formatter.AutoWidth then - begin - SetCardsAutoWidth(Formatter.DC); - CalcMaxCardWidth; - if Formatter.KeepSameWidth then SetSameCardsWidth(FMaxCardWidth - 4); - end; - CalcMaxCardWidth; - - SetCardsRowHeight(Formatter.DC, Formatter.RowAutoHeight); - if Formatter.KeepSameHeight then SetCardsSameHeights; - - AdjustCards; -end; - -function TdxGridCardViewBuilder.GetCardsRowProducer: TdxGridCardViewCardsRowProducer; -begin - Result := ProducerCache[GetCardsRowProducerClass] as TdxGridCardViewCardsRowProducer; -end; - -function TdxGridCardViewBuilder.GetCardsRowProducerClass: TdxGridCardViewCardsRowProducerClass; -begin - Result := TdxGridCardViewCardsRowProducer; -end; - -function TdxGridCardViewBuilder.GridView: TcxGridCardView; -begin - Result := inherited GridView as TcxGridCardView; -end; - -class function TdxGridCardViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -function TdxGridCardViewBuilder.GetCard(Index: Integer): TdxReportCard; -begin - Result := FCards[Index]; -end; - -function TdxGridCardViewBuilder.GetCardCount: Integer; -begin - Result := FCards.Count; -end; - -{ TdxGridDBCardViewAdapter } - -function TdxGridDBCardViewAdapter.GridView: TcxGridDBCardView; -begin - Result := inherited GridView as TcxGridDBCardView; -end; - -class function TdxGridDBCardViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -procedure TdxGridDBCardViewAdapter.AfterBuilding; -begin - UnloadAllRecords; - inherited; -end; - -procedure TdxGridDBCardViewAdapter.BeforeBuilding; -begin - inherited; - LoadAllRecords; -end; - -function TdxGridDBCardViewAdapter.DataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(inherited DataController); -end; - -function TdxGridDBCardViewAdapter.DBDataModeController: TcxDBDataModeController; -begin - Result := DataController.DataModeController; -end; - -procedure TdxGridDBCardViewAdapter.LoadAllRecords; -begin - _LoadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -procedure TdxGridDBCardViewAdapter.UnloadAllRecords; -begin - _UnloadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -{ TdxGridDBCardViewBuilder } - -function TdxGridDBCardViewBuilder.Adapter: TdxGridDBCardViewAdapter; -begin - Result := inherited Adapter as TdxGridDBCardViewAdapter; -end; - -class function TdxGridDBCardViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridDBCardViewAdapter; -end; - -{ TdxGridViewRowProducer } - -constructor TdxGridViewRowProducer.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; - FMasterIndents := TList.Create; -end; - -destructor TdxGridViewRowProducer.Destroy; -begin - FMasterIndents.Free; - inherited; -end; - -function TdxGridViewRowProducer.Adapter: TdxCustomGridViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridViewRowProducer.Builder: TdxCustomGridViewBuilder; -begin - Result := FBuilder; -end; - -function TdxGridViewRowProducer.Formatter: TdxCustomGridViewFormatter; -begin - Result := Builder.Formatter; -end; - -function TdxGridViewRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; -begin - FMasterIndents.Clear; - - CalculateRowHeight; - - CreateRowHost(AHostInfo); - CreateRow; - if AutoHeight then - begin - CalculateRowAutoHeight; - FixupRowHeight; - end; - - Inc(AHostInfo.Origin.Y, RowHeight); - Result := Host; -end; - -procedure TdxGridViewRowProducer.AddLeadingMasterIndentsAndSeparators; -var - LeftPos, I: Integer; -begin - LeftPos := 0; - for I := 0 to Formatter.AbsoluteLevel - 1 do - with MasterBuilders[I] do - begin - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskLeading); - AddMasterIndents(Formatter, Adapter, I, LeftPos); - end; - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskLeading); -end; - -procedure TdxGridViewRowProducer.AddMasterIndents(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; ALevel: Integer; var ALeftPos: Integer); -var - I: Integer; - Indent: TdxReportCellExpandButton; -begin - for I := 0 to AMasterAdapter.IndentCount - 1 do - begin - Indent := CreateMasterIndent(Host); - Indent.BoundsRect := MakeBounds(ALeftPos, 0, AMasterAdapter.IndentWidth, RowHeight); - InitializeMasterIndent(AMasterFormatter, Indent, I, ALevel); - Inc(ALeftPos, Indent.Width); - end; -end; - -procedure TdxGridViewRowProducer.AddMasterSeparator(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; var ALeftPos: Integer; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -var - Separator: TdxReportCellBox; -begin - if AMasterAdapter.HasDetailsSeparator then - begin - Separator := CreateDetailsSeparator(Host); - Separator.BoundsRect := MakeBounds(ALeftPos, 0, AMasterFormatter.DetailsSeparatorThickness, RowHeight); - InitializeDetailsSeparator(AMasterFormatter, Separator, ASeparatorKind); - Inc(ALeftPos, Separator.Width); - end; -end; - -procedure TdxGridViewRowProducer.AddTrailingMasterSeparators; -var - LeftPos, I: Integer; -begin - LeftPos := Width - Formatter.ViewWidthExtraAfter; - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskTrailing); - for I := Formatter.AbsoluteLevel - 1 downto 0 do - with Builder.AbsoluteBuilders[I] do - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskTrailing); -end; - -function TdxGridViewRowProducer.CalculateItemHeight(DC: HDC; AnItem: TdxReportVisualItem): Integer; -begin - Result := AnItem.MeasureContentHeight(DC); -end; - -procedure TdxGridViewRowProducer.CalculateRowAutoHeight; -var - DC: HDC; - ItemsSite: TdxReportCell; - MaxRowHeight, I, V: Integer; - Item: TdxReportVisualItem; -begin - DC := Self.DC; - ItemsSite := Self.ItemsSite; - MaxRowHeight := 0; - for I := 0 to ItemsSite.DataItemCount - 1 do - begin - Item := ItemsSite.DataItems[I]; - if DoesItemParticipateInRowAutoHeightCalculation(Item) then - begin - V := CalculateItemHeight(DC, Item); - if MaxRowHeight < V then MaxRowHeight := V; - end; - end; - {3.1} - for I := 0 to ItemsSite.CellCount - 1 do - begin - Item := ItemsSite.Cells[I]; - if DoesItemParticipateInRowAutoHeightCalculation(Item) then - begin - V := CalculateItemHeight(DC, Item); - if MaxRowHeight < V then MaxRowHeight := V; - end; - end; - if RowHeight < MaxRowHeight then - RowHeight := MaxRowHeight; -end; - -procedure TdxGridViewRowProducer.CalculateRowHeight; -begin - FRowHeight := LineCount * LineHeight; -end; - -function TdxGridViewRowProducer.CreateDetailsSeparator(AParent: TdxReportCell): TdxReportCellBox; -begin - Result := GetDetailsSeparatorClass.Create(AParent); - FMasterIndents.Add(Result); -end; - -function TdxGridViewRowProducer.CreateMasterIndent(AParent: TdxReportCell): TdxReportCellExpandButton; -begin - Result := GetMasterIndentClass.Create(AParent); - FMasterIndents.Add(Result); -end; - -procedure TdxGridViewRowProducer.CreateRow; -begin - FRow := GetRowHostClass.Create(Host); - FRow.BoundsRect := MakeBounds(RowOriginX, 0, RowWidth, RowHeight); - InitializeRow; - AddTrailingMasterSeparators; -end; - -procedure TdxGridViewRowProducer.CreateRowHost(const AHostInfo: TdxGridAttributeHostInfo); -begin - FHost := HostClass.Create(AHostInfo.Parent); - FHost.BoundsRect := MakeBounds(AHostInfo.Origin.X, AHostInfo.Origin.Y, Width, RowHeight); - InitializeHost; - AddLeadingMasterIndentsAndSeparators; -end; - -function TdxGridViewRowProducer.DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; -begin - Result := True; -end; - -function TdxGridViewRowProducer.GetDetailsSeparatorClass: TdxReportCellBoxClass; -begin - Result := Formatter.GetDetailsSeparatorClass; -end; - -function TdxGridViewRowProducer.GetMasterIndentClass: TdxReportCellExpandButtonClass; -begin - Result := Formatter.GetMasterIndentClass; -end; - -procedure TdxGridViewRowProducer.FixupMasterIndentsHeight; -var - I: Integer; -begin - for I := 0 to MasterIndentCount - 1 do - with MasterIndents[I] do - Height := Parent.Height; -end; - -procedure TdxGridViewRowProducer.FixupRowDataItemHeight(AnItem: TdxReportVisualItem); -begin - with AnItem do - Height := Parent.Height; -end; - -procedure TdxGridViewRowProducer.FixupRowDataHeight; -begin -end; - -procedure TdxGridViewRowProducer.FixupRowHeight; -begin - FixupRowOwnHeight; - FixupMasterIndentsHeight; - FixupRowDataHeight; -end; - -procedure TdxGridViewRowProducer.FixupRowOwnHeight; -begin - Host.Height := RowHeight; - Row.Height := RowHeight; - ItemsSite.Height := RowHeight; -end; - -procedure TdxGridViewRowProducer.InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - AFormatter.DoInitializeVertDetailsSeparator(ASeparator, ASeparatorKind); -end; - -procedure TdxGridViewRowProducer.InitializeMasterIndent(AFormatter: TdxCustomGridViewFormatter; - AIndent: TdxReportCellExpandButton; AIndex, ALevel: Integer); -begin - AFormatter.DoInitializeMasterIndent(AIndent, AIndex, MasterBuilders[ALevel].Adapter.IndentCount); -end; - -procedure TdxGridViewRowProducer.InitializeHost; -begin - Formatter.DoInitializeHost(Host); -end; - -procedure TdxGridViewRowProducer.InitializeRow; -begin -end; - -function TdxGridViewRowProducer.GetAutoHeight: Boolean; -begin - Result := LineCount = 1; -end; - -function TdxGridViewRowProducer.GetItemsSite: TdxReportCell; -begin - Result := Row; -end; - -function TdxGridViewRowProducer.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridViewRowProducer.GetLineHeight: Integer; -begin - Result := 20; -end; - -function TdxGridViewRowProducer.GetDC: HDC; -begin - Result := Formatter.DC; -end; - -function TdxGridViewRowProducer.GetHostClass: TdxReportCellClass; -begin - Result := Formatter.GetHostClass; -end; - -function TdxGridViewRowProducer.GetIndentWidth: Integer; -begin - Result := Adapter.IndentWidth; -end; - -function TdxGridViewRowProducer.GetMasterBuilder(Index: Integer): TdxCustomGridViewBuilder; -begin - Result := Builder.AbsoluteBuilders[Index]; -end; - -function TdxGridViewRowProducer.GetMasterIndent(Index: Integer): TdxReportCellBox; -begin - Result := FMasterIndents[Index]; -end; - -function TdxGridViewRowProducer.GetMasterIndentCount: Integer; -begin - Result := FMasterIndents.Count; -end; - -function TdxGridViewRowProducer.GetRowHostClass: TdxReportCellClass; -begin - Result := Formatter.GetRowHostClass; -end; - -function TdxGridViewRowProducer.GetWidth: Integer; -begin - with Formatter do - Result := ViewWidthExtraBefore + ViewWidth + ViewWidthExtraAfter; -end; - -function TdxGridViewRowProducer.GetRowOriginX: Integer; -begin - Result := Formatter.ViewWidthExtraBefore; -end; - -function TdxGridViewRowProducer.GetRowWidth: Integer; -begin - Result := Formatter.ViewWidth; -end; - -{ TdxGridViewCustomRowProducer } - -function TdxGridViewCustomRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; -begin - Result := inherited Produce(AHostInfo); - AddItem; -end; - -procedure TdxGridViewCustomRowProducer.AddItem; -begin - FItem := CreateItem(Row); - FItem.BoundsRect := MakeRect(0, 0, RowWidth, RowHeight); - InitializeItem; -end; - -function TdxGridViewCustomRowProducer.CreateItem(AParent: TdxReportCell): TAbstractdxReportCellData; -begin - Result := GetItemClass.Create(AParent); -end; - -procedure TdxGridViewCustomRowProducer.FixupRowDataHeight; -begin - inherited; - FixupRowDataItemHeight(Item); -end; - -procedure TdxGridViewCustomRowProducer.InitializeItem; -begin -end; - -function TdxGridViewCustomRowProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxGridViewCustomRowProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := TAbstractdxReportCellData; -end; - -{ TdxGridViewCaptionProducer } - -procedure TdxGridViewCaptionProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeCaption(Item); - Formatter.DoReportLinkInitializeCaption(Item); -end; - -procedure TdxGridViewCaptionProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeCaptionRow(Row); -end; - -function TdxGridViewCaptionProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetCaptionClass; -end; - -function TdxGridViewCaptionProducer.GetLineHeight: Integer; -begin - Result := Formatter.CaptionLineHeight; -end; - -function TdxGridViewCaptionProducer.GetItem: TdxReportCellText; -begin - Result := TdxReportCellText(inherited Item); -end; - -{ TdxGridViewFilterBarProducer } - -procedure TdxGridViewFilterBarProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeFilterBar(Item); - Formatter.DoReportLinkInitializeFilterBar(Item); -end; - -procedure TdxGridViewFilterBarProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeFilterBarRow(Row); -end; - -function TdxGridViewFilterBarProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetFilterBarClass; -end; - -function TdxGridViewFilterBarProducer.GetLineHeight: Integer; -begin - Result := Formatter.FilterBarLineHeight; -end; - -function TdxGridViewFilterBarProducer.GetItem: TdxReportCellText; -begin - Result := TdxReportCellText(inherited Item); -end; - -{ TdxGridViewDetailsSeparatorProducer } - -procedure TdxGridViewDetailsSeparatorProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeHorzDetailsSeparator(Item); -end; - -procedure TdxGridViewDetailsSeparatorProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeDetailsSeparatorRow(Row); -end; - -function TdxGridViewDetailsSeparatorProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetDetailsSeparatorClass; -end; - -function TdxGridViewDetailsSeparatorProducer.GetLineHeight: Integer; -begin - Result := Formatter.DetailsSeparatorThickness; -end; - -function TdxGridViewDetailsSeparatorProducer.GetItem: TdxReportCellBox; -begin - Result := TdxReportCellBox(inherited Item); -end; - -{ TdxGridViewDetailsTopSeparatorProducer } - -procedure TdxGridViewDetailsTopSeparatorProducer.InitializeDetailsSeparator( - AFormatter: TdxCustomGridViewFormatter; ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - if AFormatter = Formatter then - AFormatter.DoInitializeVertTopDetailsSeparator(ASeparator, ASeparatorKind) - else - inherited; -end; - -{ TdxGridViewDetailsBottomSeparatorProducer } - -procedure TdxGridViewDetailsBottomSeparatorProducer.InitializeDetailsSeparator( - AFormatter: TdxCustomGridViewFormatter; ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - if AFormatter = Formatter then - AFormatter.DoInitializeVertBottomDetailsSeparator(ASeparator, ASeparatorKind) - else - inherited; -end; - -{ TdxGridViewTerminatorProducer } - -procedure TdxGridViewTerminatorProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeViewTerminator(Item); -end; - -function TdxGridViewTerminatorProducer.GetLineHeight: Integer; -begin - Result := 1; -end; - -{ TdxGridTableViewRowProducer } - -function TdxGridTableViewRowProducer.Adapter: TdxGridTableViewAdapter; -begin - Result := inherited Adapter as TdxGridTableViewAdapter; -end; - -function TdxGridTableViewRowProducer.Builder: TdxGridTableViewBuilder; -begin - Result := inherited Builder as TdxGridTableViewBuilder; -end; - -function TdxGridTableViewRowProducer.Formatter: TdxGridTableViewFormatter; -begin - Result := Builder.Formatter; -end; - -{ TdxGridTableViewRowSubItemsProducer } - -constructor TdxGridTableViewRowSubItemsProducer.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FIndents := TList.Create; - FSubItems := TList.Create; -end; - -destructor TdxGridTableViewRowSubItemsProducer.Destroy; -begin - FreeAndNil(FSubItems); - FreeAndNil(FIndents); - inherited; -end; - -function TdxGridTableViewRowSubItemsProducer.Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; -begin - InitializeIndentList; - InitializeSubItemList; - Result := inherited Produce(AHostInfo); -end; - -procedure TdxGridTableViewRowSubItemsProducer.AddIndents(AParent: TdxReportCell); -begin -end; - -procedure TdxGridTableViewRowSubItemsProducer.AddSubItems(AParent: TdxReportCell); -var - I: Integer; - Item: TAbstractdxReportCellData; -begin - for I := 0 to GetSubItemCount - 1 do - if HasSubItem[I] then - begin - Item := CreateSubItem(I, AParent); - Item.BoundsRect := SubItemBounds[I]; // needed before item initialization - InitializeSubItem(Item, I); - end; -end; - -procedure TdxGridTableViewRowSubItemsProducer.CreateRow; -begin - inherited; - AddIndents(Row); - AddSubItems(Row); -end; - -function TdxGridTableViewRowSubItemsProducer.CreateSubItem(AnIndex: Integer; - AParent: TdxReportCell): TAbstractdxReportCellData; -begin - Result := SubItemClasses[AnIndex].Create(AParent); - FSubItems[AnIndex] := Result; -end; - -function TdxGridTableViewRowSubItemsProducer.IsItemIndent(AnItem: TdxReportVisualItem): Boolean; -begin - Result := FIndents.IndexOf(AnItem) <> -1; -end; - -procedure TdxGridTableViewRowSubItemsProducer.FixupIndentsHeight; -var - I: Integer; -begin - for I := 0 to IndentCount - 1 do - with Indents[I] do - Height := Parent.Height; -end; - -procedure TdxGridTableViewRowSubItemsProducer.FixupRowDataHeight; -var - I: Integer; - SubItem: TdxReportVisualItem; -begin - for I := 0 to SubItemCount - 1 do {.SubItemCount} - begin - SubItem := SubItems[I]; - if SubItem <> nil then - FixupRowDataItemHeight(SubItem); - end; -end; - -procedure TdxGridTableViewRowSubItemsProducer.FixupRowHeight; -begin - inherited; - FixupIndentsHeight; -end; - -procedure TdxGridTableViewRowSubItemsProducer.InitializeIndentList; -begin - FIndents.Clear; - FIndents.Count := GetIndentCount; -end; - -procedure TdxGridTableViewRowSubItemsProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin -end; - -procedure TdxGridTableViewRowSubItemsProducer.InitializeSubItemList; -begin - FSubItems.Clear; - FSubItems.Count := GetSubItemCount; -end; - -function TdxGridTableViewRowSubItemsProducer.GetHasSubItem(Index: Integer): Boolean; -begin - Result := True; -end; - -function TdxGridTableViewRowSubItemsProducer.GetIndentCount: Integer; -begin - Result := 0; -end; - -function TdxGridTableViewRowSubItemsProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := MakeRect(0, 0, -1, -1); -end; - -function TdxGridTableViewRowSubItemsProducer.GetSubItemCount: Integer; -begin - Result := Formatter.ColumnCount; -end; - -function TdxGridTableViewRowSubItemsProducer.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := Formatter.Columns[Index]; -end; - -function TdxGridTableViewRowSubItemsProducer.GetIndent(Index: Integer): TdxReportCellExpandButton; -begin - Result := FIndents[Index]; -end; - -function TdxGridTableViewRowSubItemsProducer.GetSubItem(Index: Integer): TdxReportVisualItem; -begin - Result := FSubItems[Index]; -end; - -{ TdxGridTableViewHeadersProducer } - -procedure TdxGridTableViewHeadersProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeHeaderRow(Row); -end; - -procedure TdxGridTableViewHeadersProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeHeaderItem(ASubItem, AIndex); - Formatter.DoReportLinkInitializeHeaderItem(ASubItem, AIndex); -end; - -function TdxGridTableViewHeadersProducer.GetAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.HeaderAutoHeight; -end; - -function TdxGridTableViewHeadersProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TdxGridTableViewHeadersProducer.GetLineHeight: Integer; -begin - Result := Formatter.HeaderLineHeight; -end; - -function TdxGridTableViewHeadersProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetHeaderItemBounds(Index); -end; - -function TdxGridTableViewHeadersProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetHeaderItemClass(Index); -end; - -{ TdxGridTableViewFootersProducer } - -procedure TdxGridTableViewFootersProducer.CalculateRowAutoHeight; -begin - inherited; - Inc(FRowHeight, 2 * FooterItemInflateVert); -end; - -procedure TdxGridTableViewFootersProducer.CalculateRowHeight; -begin - if AutoHeight then - inherited - else - RowHeight := LineCount * LineHeight; -end; - -procedure TdxGridTableViewFootersProducer.FixupRowDataItemHeight(AnItem: TdxReportVisualItem); -begin - with AnItem do - Height := Parent.Height - 2 * FooterItemInflateVert; -end; - -procedure TdxGridTableViewFootersProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeFooterRow(Row); -end; - -procedure TdxGridTableViewFootersProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeFooterItem(ASubItem, AIndex); - Formatter.DoReportLinkInitializeFooterItem(ASubItem, AIndex); -end; - -function TdxGridTableViewFootersProducer.GetAutoHeight: Boolean; -var - I: Integer; -begin - Result := inherited GetAutoHeight and Adapter.FooterMultiline; - if Result then - begin - for I := 0 to SubItemCount - 1 do - if HasSubItem[I] then Exit; - Result := False; - end; -end; - -function TdxGridTableViewFootersProducer.GetHasSubItem(Index: Integer): Boolean; -begin - Result := Adapter.HasFooterItem[Index]; -end; - -function TdxGridTableViewFootersProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TdxGridTableViewFootersProducer.GetLineHeight: Integer; -begin - Result := Formatter.FooterLineHeight; -end; - -function TdxGridTableViewFootersProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetFooterItemBounds(Index); -end; - -function TdxGridTableViewFootersProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetFooterItemClass(Index); -end; - -{ TdxGridTableViewCustomDataRowProducer } - -function TdxGridTableViewCustomDataRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AGridRowIndex: Integer): TdxReportCell; -begin - FGridRow := AGridRow; - FGridRowIndex := AGridRowIndex; - Result := inherited Produce(AHostInfo); - FGridRowIndex := -1; - FGridRow := nil; -end; - -function TdxGridTableViewCustomDataRowProducer.GridRow: TcxCustomGridRow; -begin - Result := FGridRow; -end; - -procedure TdxGridTableViewCustomDataRowProducer.AddIndents(AParent: TdxReportCell); -var - I: Integer; - Indent: TdxReportCellExpandButton; -begin - inherited; - for I := 0 to IndentCount - 1 do - begin - Indent := CreateIndent(I, AParent); - Indent.BoundsRect := IndentBounds[I]; - InitializeIndent(Indent, I); - end; -end; - -function TdxGridTableViewCustomDataRowProducer.CreateIndent(AnIndex: Integer; - AParent: TdxReportCell): TdxReportCellExpandButton; -begin - Result := Formatter.CreateIndent(AParent); - FIndents[AnIndex] := Result; -end; - -procedure TdxGridTableViewCustomDataRowProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin -end; - -function TdxGridTableViewCustomDataRowProducer.GetIndentCount: Integer; -begin - Result := GridRow.Level; -end; - -function TdxGridTableViewCustomDataRowProducer.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridTableViewCustomDataRowProducer.GetLineHeight: Integer; -begin - Result := DefaultDataRowLineHeight; -end; - -function TdxGridTableViewCustomDataRowProducer.GetIndentArea: Integer; -begin - Result := IndentCount * IndentWidth; -end; - -function TdxGridTableViewCustomDataRowProducer.GetIndentBounds(Index: Integer): TRect; -begin - Result := MakeBounds(IndentWidth * Index, 0, IndentWidth, RowHeight); -end; - -{ TdxCustomGridTableViewRowSeparatorProducer } - -function TdxCustomGridTableViewRowSeparatorProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow): TdxReportCell; -begin - Result := inherited Produce(AHostInfo, AGridRow, -1); -end; - -procedure TdxCustomGridTableViewRowSeparatorProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeRowSeparatorIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -function TdxCustomGridTableViewRowSeparatorProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxCustomGridTableViewRowSeparatorProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := MakeRect(IndentArea, 0, RowWidth, RowHeight); -end; - -function TdxCustomGridTableViewRowSeparatorProducer.GetSubItemCount: Integer; -begin - Result := 1; -end; - -{ TdxGridTableViewRowSeparatorProducer } - -function TdxGridTableViewRowSeparatorProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AnIsLast: Boolean): TdxReportCell; -begin - FIsLast := AnIsLast; - Result := inherited Produce(AHostInfo, AGridRow); -end; - -procedure TdxGridTableViewRowSeparatorProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeSeparatorRow(Row); -end; - -procedure TdxGridTableViewRowSeparatorProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - Formatter.DoInitializeRowSeparator(ASubItem); -end; - -function TdxGridTableViewRowSeparatorProducer.GetIndentCount: Integer; -begin - if not IsLast then - begin - Result := inherited GetIndentCount; - if (Result <> 0) and Adapter.IsOffice11StyleGrouping and not (GridRow is TcxGridGroupRow) then {.2} - Dec(Result); - end - else - Result := 0; -end; - -function TdxGridTableViewRowSeparatorProducer.GetLineHeight: Integer; -begin - Result := Formatter.RowSeparatorThickness; -end; - -function TdxGridTableViewRowSeparatorProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetRowSeparatorClass; -end; - -{ TdxGridTableViewGroupRowSeparatorProducer } - -procedure TdxGridTableViewGroupRowSeparatorProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeGroupSeparatorRow(Row); -end; - -procedure TdxGridTableViewGroupRowSeparatorProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupRowSeparator(ASubItem); -end; - -function TdxGridTableViewGroupRowSeparatorProducer.GetLineHeight: Integer; -begin - Result := Formatter.GroupRowSeparatorThickness; -end; - -function TdxGridTableViewGroupRowSeparatorProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetGroupRowSeparatorClass; -end; - -{ TdxGridTableViewDataRowProducer } - -function TdxGridTableViewDataRowProducer.GridRow: TcxGridDataRow; -begin - Result := inherited GridRow as TcxGridDataRow; -end; - -procedure TdxGridTableViewDataRowProducer.AddPreview(AParent: TdxReportCell); -begin - FPreviewItem := CreatePreview(Row); - - PreviewItem.Left := IndentArea; - // We have to set Width before because we use that value for PreviewHeight calculation - PreviewItem.Width := Width - IndentArea; - Formatter.DoInitializePreview(TAbstractdxReportCellData(PreviewItem), PreviewColumn, GridRow); - PreviewItem.Height := PreviewHeight; - PreviewItem.AdjustContent(Formatter.DC); {3.1} -end; - -procedure TdxGridTableViewDataRowProducer.AddSubItems(AParent: TdxReportCell); -begin - inherited; - if HasPreview then AddPreview(AParent); -end; - -procedure TdxGridTableViewDataRowProducer.CalculateRowAutoHeight; -begin - if CellAutoHeight then inherited; - if PreviewItem <> nil then - RowHeight := RowHeight + PreviewItem.Height; -end; - -function TdxGridTableViewDataRowProducer.CreatePreview(AParent: TdxReportCell): TdxReportVisualItem; -begin - Result := GetPreviewClass.Create(AParent); - FPreviewItem := Result; -end; - -function TdxGridTableViewDataRowProducer.DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; -var - TableItem: TcxCustomGridTableItem; - Properties: TcxCustomEditProperties; -begin - Result := AnItem <> FPreviewItem; - // 3.2 - if Result and not IsItemIndent(AnItem) then - begin - TableItem := TcxCustomGridTableItem(AnItem.Data); - Properties := Adapter.GetProperties(TableItem, GridRow); - Result := dxPScxCommon.dxPSDataMaps.DoesItemParticipateInAutoHeightCalculation(Properties); - end; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewClass: TdxReportCellDataClass; -begin - Result := Formatter.GetPreviewClass(PreviewColumn, GridRow); -end; - -procedure TdxGridTableViewDataRowProducer.FixupRowDataHeight; -var - NewHeight, I: Integer; - Item: TdxReportVisualItem; -begin - NewHeight := RowHeight; - if PreviewItem <> nil then - Dec(NewHeight, PreviewItem.Height); - - for I := 0 to Row.DataItemCount - 1 do - begin - Item := Row.DataItems[I]; - if Item = PreviewItem then - if PreviewPlace = ppTop then - Item.Top := 0 - else - Item.Top := NewHeight - else - if IsItemIndent(Item) then - begin - Item.Top := 0; - Item.Height := RowHeight; - end - else - begin - if CellAutoHeight then - Item.Height := NewHeight; - if HasPreview and (PreviewPlace = ppTop) then - Item.Top := Item.Top + PreviewItem.Height; - end; - end; - {3.1} - for I := 0 to Row.CellCount - 1 do - begin - Item := Row.Cells[I]; - if Item = PreviewItem then - if PreviewPlace = ppTop then - Item.Top := 0 - else - Item.Top := NewHeight - else - begin - if CellAutoHeight then - Item.Height := NewHeight; - if HasPreview and (PreviewPlace = ppTop) then - Item.Top := Item.Top + PreviewItem.Height; - end; - end; -end; - -procedure TdxGridTableViewDataRowProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeDataRowIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewDataRowProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeDataRow(Row, GridRow); -end; - -procedure TdxGridTableViewDataRowProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeItem(ASubItem, Columns[AIndex], GridRow, False); - Formatter.DoReportLinkInitializeItem(ASubItem, Columns[AIndex], GridRow); -end; - -function TdxGridTableViewDataRowProducer.GetAutoHeight: Boolean; -begin - Result := CellAutoHeight or HasPreview; -end; - -function TdxGridTableViewDataRowProducer.GetCellAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.CellAutoHeight; -end; - -function TdxGridTableViewDataRowProducer.GetHasPreview: Boolean; -begin - Result := Formatter.HasPreview; -end; - -function TdxGridTableViewDataRowProducer.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount; - if (Result <> 0) and Adapter.IsOffice11StyleGrouping then {.2} - Dec(Result); -end; - -function TdxGridTableViewDataRowProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TdxGridTableViewDataRowProducer.GetLineHeight: Integer; -begin - if Formatter.HeaderLineCount = 1 then - Result := Formatter.RowHeights[GridRowIndex] - else - Result := Formatter.DetailsLineHeight; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewHeight: Integer; -begin - Result := PreviewLineCount * PreviewLineHeight; - if not (Formatter.PreviewAutoHeight and (Formatter.PreviewMaxLineCount = 0)) then - Inc(Result, 2 * dxTextSpace); -end; - -function TdxGridTableViewDataRowProducer.GetPreviewLineCount: Integer; -begin - if FPreviewItem <> nil then - if not Formatter.PreviewAutoHeight then - begin - Result := PreviewItem.CalculateLineCount(Formatter.DC); - if Result <> Formatter.PreviewMaxLineCount then - Result := Formatter.PreviewMaxLineCount; - end - else - Result := 1 - else - Result := 0; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewLineHeight: Integer; -var - LineHeight: Integer; -begin - if FPreviewItem <> nil then - if Formatter.PreviewAutoHeight then - begin - Result := PreviewItem.MeasureContentHeight(Formatter.DC); - if Formatter.PreviewMaxLineCount <> 0 then - begin - LineHeight := PreviewItem.MeasureFontHeight(Formatter.DC) - 2 * dxTextSpace; - if Result > LineHeight * Formatter.PreviewMaxLineCount then - Result := LineHeight * Formatter.PreviewMaxLineCount; - end; - end - else - Result := PreviewItem.MeasureFontHeight(Formatter.DC) - 2 * dxTextSpace - else - Result := 0; -end; - -function TdxGridTableViewDataRowProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetItemBounds(GridRow, GridRowIndex, Index); -end; - -function TdxGridTableViewDataRowProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetItemClass(Columns[Index], GridRow, False); -end; - -function TdxGridTableViewDataRowProducer.GetPreviewColumn: TcxGridColumn; -begin - Result := Adapter.PreviewColumn; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewPlace: TcxGridPreviewPlace; -begin - Result := Adapter.PreviewPlace; -end; - -{ TdxGridTableViewGroupRowProducer} - -procedure TdxGridTableViewGroupRowProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeGroupRow(Row, GridRow); -end; - -function TdxGridTableViewGroupRowProducer.GridRow: TcxGridGroupRow; -begin - Result := inherited GridRow as TcxGridGroupRow; -end; - -procedure TdxGridTableViewGroupRowProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupRowIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewGroupRowProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupRowItem(ASubItem, GridRow); -end; - -function TdxGridTableViewGroupRowProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewGroupRowProducer.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount + 1; -end; - -function TdxGridTableViewGroupRowProducer.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridTableViewGroupRowProducer.GetLineHeight: Integer; -begin - Result := Formatter.RowHeights[GridRowIndex];//}Formatter.GroupRowLineHeight; {3.1} -end; - -function TdxGridTableViewGroupRowProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := MakeRect(IndentArea, 0, RowWidth, LineHeight); -end; - -function TdxGridTableViewGroupRowProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetGroupRowClass; -end; - -function TdxGridTableViewGroupRowProducer.GetSubItemCount: Integer; -begin - Result := 1; -end; - -{ TdxGridTableViewMasterRowProducer } - -function TdxGridTableViewMasterRowProducer.GridRow: TcxGridMasterDataRow; -begin - Result := inherited GridRow as TcxGridMasterDataRow; -end; - -procedure TdxGridTableViewMasterRowProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - //inherited; - Formatter.DoInitializeMasterDataRowIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewMasterRowProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - if AIndex = 0 then - ASubItem.CellSides := ASubItem.CellSides - [csLeft]; -end; - -function TdxGridTableViewMasterRowProducer.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount + 1; -end; - -{ TdxGridTableViewGroupFooterProducer } - -function TdxGridTableViewGroupFooterProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AGroupLevel, AnIndex: Integer): TdxReportCell; -begin - FGroupLevel := AGroupLevel; - FIndex := AnIndex; - Result := inherited Produce(AHostInfo, AGridRow, -1); - FGroupLevel := -1; -end; - -procedure TdxGridTableViewGroupFooterProducer.AddSubItems(AParent: TdxReportCell); - - function SubstituteParent(AParent: TdxReportCell): TdxReportCell; - begin - Result := TdxReportCell.Create(AParent); - Result.BoundsRect := HostBounds; - Formatter.DoInitializeGroupFooterHost(Result, GridRow); - end; - -begin - FItemsSite := SubstituteParent(AParent); - inherited AddSubItems(ItemsSite); -end; - -procedure TdxGridTableViewGroupFooterProducer.CalculateRowAutoHeight; -begin - inherited; - Inc(FRowHeight, FooterItemInflateVert); -end; - -procedure TdxGridTableViewGroupFooterProducer.FixupRowDataItemHeight(AnItem: TdxReportVisualItem); -begin - with AnItem do - Height := Parent.Height - 2 * FooterItemInflateVert; -end; - -procedure TdxGridTableViewGroupFooterProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupFooterIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewGroupFooterProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeGroupFooterRow(Row, GridRow, GroupLevel); -end; - -procedure TdxGridTableViewGroupFooterProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupFooterItem(ASubItem, AIndex, GridRow, GroupLevel); - Formatter.DoReportLinkInitializeGroupFooterItem(ASubItem, AIndex, GridRow, GroupLevel); -end; - -function TdxGridTableViewGroupFooterProducer.GetAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.GroupFootersMultiline and - ((ItemsSite.DataItemCount <> 0) or (ItemsSite.CellCount <> 0)); -end; - -function TdxGridTableViewGroupFooterProducer.GetHasSubItem(Index: Integer): Boolean; -begin - Result := Adapter.HasGroupFooterItem(GroupLevel, Index); -end; - -function TdxGridTableViewGroupFooterProducer.GetIndentCount: Integer; -begin - Result := GroupLevel; - if Adapter.GroupFootersMode = gfVisibleWhenExpanded then - begin - Inc(Result); - if Adapter.IsOffice11StyleGrouping and (Index = 0) and not (GridRow is TcxGridGroupRow) then - Dec(Result); - end -end; - -function TdxGridTableViewGroupFooterProducer.GetItemsSite: TdxReportCell; -begin - Result := FItemsSite; -end; - -function TdxGridTableViewGroupFooterProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TdxGridTableViewGroupFooterProducer.GetLineHeight: Integer; -begin - Result := Formatter.GroupFooterLineHeight; -end; - -function TdxGridTableViewGroupFooterProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetGroupFooterItemBounds(Index, IndentCount); -end; - -function TdxGridTableViewGroupFooterProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetGroupFooterItemClass(Index); -end; - -function TdxGridTableViewGroupFooterProducer.GetGroupLevel: Integer; -begin - Result := FGroupLevel; - if Adapter.GroupFootersMode = gfVisibleWhenExpanded then - Dec(Result); -end; - -function TdxGridTableViewGroupFooterProducer.GetHostBounds: TRect; -begin - Result := MakeRect(IndentArea, 0, Row.Width, Row.Height); -end; - -{ TdxGridTableViewBandsProducer } - -function TdxGridTableViewBandsProducer.Adapter: TdxGridBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridBandedTableViewAdapter; -end; - -function TdxGridTableViewBandsProducer.Builder: TdxGridBandedTableViewBuilder; -begin - Result := inherited Builder as TdxGridBandedTableViewBuilder; -end; - -function TdxGridTableViewBandsProducer.Formatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -function TdxGridTableViewBandsProducer.GetSubItemCount: Integer; -begin - Result := Formatter.BandCount; -end; - -procedure TdxGridTableViewBandsProducer.CalculateRowHeight; -begin - FRowHeight := Formatter.ItemPlaceController.Height; -end; - -procedure TdxGridTableViewBandsProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeBandRow(Row); -end; - -procedure TdxGridTableViewBandsProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeBandItem(ASubItem, AIndex); - Formatter.DoReportLinkInitializeBandItem(ASubItem, AIndex); -end; - -function TdxGridTableViewBandsProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewBandsProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetBandItemBounds(Index); -end; - -function TdxGridTableViewBandsProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetBandItemClass(Index); -end; - -{ TdxGridCardViewCardsRowProducer } - -function TdxGridCardViewCardsRowProducer.Adapter: TdxGridCardViewAdapter; -begin - Result := inherited Adapter as TdxGridCardViewAdapter; -end; - -function TdxGridCardViewCardsRowProducer.Builder: TdxGridCardViewBuilder; -begin - Result := inherited Builder as TdxGridCardViewBuilder; -end; - -function TdxGridCardViewCardsRowProducer.Formatter: TdxGridCardViewFormatter; -begin - Result := inherited Formatter as TdxGridCardViewFormatter; -end; - -function TdxGridCardViewCardsRowProducer.CreateCard(AParent: TdxReportCell; - AGridCard: TcxGridCard): TdxReportCard; -begin - Result := Formatter.GetCardClass(AGridCard).CreateEx(AParent, AGridCard); - Formatter.DoInitializeCard(Result, AGridCard); -end; - -procedure TdxGridCardViewCardsRowProducer.InjectCard(ACard: TdxReportCard; - AIndex: Integer); -begin - ACard.Parent := Row; - ACard.Left := Formatter.InterCardsSpaceHorz div 2 + - AIndex * (Builder.MaxCardWidth + Formatter.InterCardsSpaceHorz); - ACard.Top := Formatter.InterCardsSpaceVert div 2; -end; - -function TdxGridCardViewCardsRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - ARowHeight: Integer): TdxReportCell; -begin - FRowHeight := ARowHeight; - Result := inherited Produce(AHostInfo); -end; - -procedure TdxGridCardViewCardsRowProducer.CalculateRowHeight; -begin -end; - -function TdxGridCardViewCardsRowProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -procedure TdxGridCardViewCardsRowProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeCardsRow(Row); -end; - -{ TdxGridReportLinkOptions } - -function TdxGridReportLinkOptions.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsCardsShadow } - -constructor TdxGridReportLinkCardsShadow.Create(AnOptionsCards: TdxGridReportLinkOptionsCards); -begin - inherited Create; - RestoreDefaults; - FOptionsCards := AnOptionsCards; -end; - -procedure TdxGridReportLinkCardsShadow.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkCardsShadow then - with TdxGridReportLinkCardsShadow(Source) do - begin - Self.Color := Color; - Self.Depth := Depth; - Self.Position := Position; - end - else - inherited; -end; - -procedure TdxGridReportLinkCardsShadow.RestoreDefaults; -begin - inherited; - Color := clDefault; - Depth := dxDefaultCardsShadowDepth; - Position := cspBottomRight; -end; - -procedure TdxGridReportLinkCardsShadow.Changed; -begin - if OptionsCards <> nil then OptionsCards.Changed; -end; - -function TdxGridReportLinkCardsShadow.GetActualColor: TColor; -begin - Result := Color; - if Result = clDefault then - Result := dxDefaultCardsShadowColor; -end; - -function TdxGridReportLinkCardsShadow.GetVisible: Boolean; -begin - Result := Depth <> 0; -end; - -procedure TdxGridReportLinkCardsShadow.SetColor(Value: TColor); -begin - if FColor <> Value then - begin - FColor := Value; - if Visible then Changed; - end; -end; - -procedure TdxGridReportLinkCardsShadow.SetDepth(Value: TdxGridCardShadowDepth); -begin - if FDepth <> Value then - begin - FDepth := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkCardsShadow.SetPosition(Value: TdxGridCardShadowPosition); -begin - if FPosition <> Value then - begin - FPosition := Value; - if Visible then Changed; - end; -end; - -{ TdxGridReportLinkOptionsCards } - -destructor TdxGridReportLinkOptionsCards.Destroy; -begin - FreeAndNil(FShadow); - inherited; -end; - -procedure TdxGridReportLinkOptionsCards.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsCards then - with TdxGridReportLinkOptionsCards(Source) do - begin - Self.AutoWidth := AutoWidth; - Self.Borders := Borders; - Self.InterCardsSpaceHorz := InterCardsSpaceHorz; - Self.InterCardsSpaceVert := InterCardsSpaceVert; - Self.KeepSameHeight := KeepSameHeight; - Self.KeepSameWidth := KeepSameWidth; - Self.RowBordersHorz := RowBordersHorz; - Self.RowBordersVert := RowBordersVert; - Self.Shadow := Shadow; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsCards.RestoreDefaults; -begin - inherited; - AutoWidth := False; - Borders := True; - InterCardsSpaceHorz := dxDefaultInterCardsSpaceHorz; - InterCardsSpaceVert := dxDefaultInterCardsSpaceVert; - KeepSameHeight := True; - KeepSameWidth := True; - RowBordersHorz := False; - RowBordersVert := False; - Shadow.RestoreDefaults; -end; - -function TdxGridReportLinkOptionsCards.DesignerTabIndex: Integer; -begin - Result := 5; -end; - -function TdxGridReportLinkOptionsCards.GetShadowClass: TdxGridReportLinkCardsShadowClass; -begin - Result := TdxGridReportLinkCardsShadow; -end; - -function TdxGridReportLinkOptionsCards.GetShadow: TdxGridReportLinkCardsShadow; -begin - if FShadow = nil then - FShadow := GetShadowClass.Create(Self); - Result := FShadow; -end; - -procedure TdxGridReportLinkOptionsCards.SetAutoWidth(Value: Boolean); -begin - if FAutoWidth <> Value then - begin - FAutoWidth := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetBorders(Value: Boolean); -begin - if FBorders <> Value then - begin - FBorders := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetInterCardsSpaceHorz(Value: Integer); -begin - if Value < 0 then Value := 0; - if FInterCardsSpaceHorz <> Value then - begin - FInterCardsSpaceHorz := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetInterCardsSpaceVert(Value: Integer); -begin - if Value < 0 then Value := 0; - if FInterCardsSpaceVert <> Value then - begin - FInterCardsSpaceVert := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetKeepSameHeight(Value: Boolean); -begin - if FKeepSameHeight <> Value then - begin - FKeepSameHeight := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetKeepSameWidth(Value: Boolean); -begin - if FKeepSameWidth <> Value then - begin - FKeepSameWidth := Value; - if AutoWidth then Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetRowBordersHorz(Value: Boolean); -begin - if FRowBordersHorz <> Value then - begin - FRowBordersHorz := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetRowBordersVert(Value: Boolean); -begin - if FRowBordersVert <> Value then - begin - FRowBordersVert := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetShadow(Value: TdxGridReportLinkCardsShadow); -begin - Shadow.Assign(Value); -end; - -{ TdxGridReportLinkOptionsPagination } - -procedure TdxGridReportLinkOptionsPagination.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsPagination then - with TdxGridReportLinkOptionsPagination(Source) do - begin - Self.OneGroupPerPage := OneGroupPerPage; - Self.TopLevelGroup := TopLevelGroup; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsPagination.RestoreDefaults; -begin - inherited; - OneGroupPerPage := False; - TopLevelGroup := False; -end; - -function TdxGridReportLinkOptionsPagination.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TdxGridReportLinkOptionsPagination.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsPagination.SetOneGroupPerPage(Value: Boolean); -begin - if FOneGroupPerPage <> Value then - begin - FOneGroupPerPage := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsPagination.SetTopLevelGroup(Value: Boolean); -begin - if FTopLevelGroup <> Value then - begin - FTopLevelGroup := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsDetails } - -procedure TdxGridReportLinkOptionsDetails.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsDetails then - with TdxGridReportLinkOptionsDetails(Source) do - begin - Self.OnlyFocusedView := OnlyFocusedView; - Self.StartFromFocusedView := StartFromFocusedView; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsDetails.RestoreDefaults; -begin - inherited; - OnlyFocusedView := False; - StartFromFocusedView := False; -end; - -function TdxGridReportLinkOptionsDetails.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -procedure TdxGridReportLinkOptionsDetails.SetOnlyFocusedView(Value: Boolean); -begin - if FOnlyFocusedView <> Value then - begin - FOnlyFocusedView := Value; - if StartFromFocusedView then Changed; - end; -end; - -procedure TdxGridReportLinkOptionsDetails.SetStartFromFocusedView(Value: Boolean); -begin - if FStartFromFocusedView <> Value then - begin - FStartFromFocusedView := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsExpanding } - -procedure TdxGridReportLinkOptionsExpanding.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsExpanding then - with TdxGridReportLinkOptionsExpanding(Source) do - begin - Self.ExpandGroupRows := ExpandGroupRows; - Self.ExpandMasterRows := ExpandMasterRows; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsExpanding.RestoreDefaults; -begin - inherited; - ExpandGroupRows := False; - ExpandMasterRows := False; -end; - -function TdxGridReportLinkOptionsExpanding.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TdxGridReportLinkOptionsExpanding.GetHasAny: Boolean; -begin - Result := ExpandGroupRows or ExpandMasterRows ; -end; - -function TdxGridReportLinkOptionsExpanding.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsExpanding.SetExpandGroupRows(Value: Boolean); -begin - if FExpandGroupRows <> Value then - begin - FExpandGroupRows := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsExpanding.SetExpandMasterRows(Value: Boolean); -begin - if FExpandMasterRows <> Value then - begin - FExpandMasterRows := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsFormatting } - -procedure TdxGridReportLinkOptionsFormatting.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsFormatting then - with TdxGridReportLinkOptionsFormatting(Source) do - begin - Self.ConsumeSelectionStyle := ConsumeSelectionStyle; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsFormatting.RestoreDefaults; -begin - inherited; - ConsumeSelectionStyle := False; -end; - -function TdxGridReportLinkOptionsFormatting.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TdxGridReportLinkOptionsFormatting.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsFormatting.SetConsumeSelectionStyle(Value: Boolean); -begin - if FConsumeSelectionStyle <> Value then - begin - FConsumeSelectionStyle := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsLevels } - -procedure TdxGridReportLinkOptionsLevels.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsLevels then - with TdxGridReportLinkOptionsLevels(Source) do - begin - Self.RiseActiveLevelOntoTop := RiseActiveLevelOntoTop; - Self.Unwrap := Unwrap; - Self.UnwrapTopLevel := UnwrapTopLevel; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsLevels.RestoreDefaults; -begin - inherited; - RiseActiveLevelOntoTop := True; - Unwrap := False; - UnwrapTopLevel := True; -end; - -function TdxGridReportLinkOptionsLevels.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -procedure TdxGridReportLinkOptionsLevels.SetRiseActiveLevelOntoTop(Value: Boolean); -begin - if FRiseActiveLevelOntoTop <> Value then - begin - FRiseActiveLevelOntoTop := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsLevels.SetUnwrap(Value: Boolean); -begin - if FUnwrap <> Value then - begin - FUnwrap := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsLevels.SetUnwrapTopLevel(Value: Boolean); -begin - if FUnwrapTopLevel <> Value then - begin - FUnwrapTopLevel := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsOnEveryPage } - -procedure TdxGridReportLinkOptionsOnEveryPage.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsOnEveryPage then - with TdxGridReportLinkOptionsOnEveryPage(Source) do - begin - Self.Caption := Caption; - Self.FilterBar := FilterBar; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.RestoreDefaults; -begin - inherited; - Caption := True; - FilterBar := True; -end; - -function TdxGridReportLinkOptionsOnEveryPage.HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; -begin - if AnAttribute.InheritsFrom(TdxGridLevelCaption) then - Result := Caption - else - if AnAttribute.InheritsFrom(TdxGridBandHeader) then - Result := BandHeaders - else - if AnAttribute.InheritsFrom(TdxGridHeader) then - Result := Headers - else - if AnAttribute.InheritsFrom(TdxGridFooter) then - Result := Footers - else - if AnAttribute.InheritsFrom(TdxGridFilterBar) then - Result := FilterBar - else - Result := False; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.SetAll; -begin - BandHeaders := True; - Caption := True; - FilterBar := True; - Footers := True; - Headers := True; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.UnsetAll; -begin - BandHeaders := False; - Caption := False; - FilterBar := False; - Footers := False; - Headers := False; -end; - -function TdxGridReportLinkOptionsOnEveryPage.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TdxGridReportLinkOptionsOnEveryPage.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.SetCaption(Value: Boolean); -begin - if FCaption <> Value then - begin - FCaption := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.SetFilterBar(Value: Boolean); -begin - if FFilterBar <> Value then - begin - FFilterBar := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsPreview } - -function TdxGridReportLinkOptionsPreview.DesignerTabIndex: Integer; -begin - Result := 4; -end; - -function TdxGridReportLinkOptionsPreview.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsRefinements } - -function TdxGridReportLinkOptionsRefinements.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TdxGridReportLinkOptionsRefinements.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsSelection } - -function TdxGridReportLinkOptionsSelection.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TdxGridReportLinkOptionsSelection.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsSize } - -function TdxGridReportLinkOptionsSize.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TdxGridReportLinkOptionsSize.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsView } - -procedure TdxGridReportLinkOptionsView.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsView then - with TdxGridReportLinkOptionsView(Source) do - begin - Self.Caption := Caption; - Self.FilterBar := FilterBar; - Self.GroupFooters := GroupFooters; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsView.RestoreDefaults; -begin - inherited; - Caption := True; - FilterBar := True; - GroupFooters := True; -end; - -function TdxGridReportLinkOptionsView.HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; -begin - if AnAttribute.InheritsFrom(TdxGridLevelCaption) then - Result := Caption - else - if AnAttribute.InheritsFrom(TdxGridBandHeader) then - Result := BandHeaders - else - if AnAttribute.InheritsFrom(TdxGridHeader) then - Result := Headers - else - if AnAttribute.InheritsFrom(TdxGridFooter) then - Result := Footers - else - if AnAttribute.InheritsFrom(TdxGridFilterBar) then - Result := FilterBar - else - Result := False; -end; - -procedure TdxGridReportLinkOptionsView.SetAll; -begin - BandHeaders := True; - Caption := True; - FilterBar := True; - Footers := True; - GroupFooters := True; - Headers := True; - ExpandButtons := True; -end; - -procedure TdxGridReportLinkOptionsView.UnsetAll; -begin - BandHeaders := False; - Caption := False; - FilterBar := False; - Footers := False; - GroupFooters := False; - Headers := False; - ExpandButtons := False; -end; - -function TdxGridReportLinkOptionsView.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TdxGridReportLinkOptionsView.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsView.SetCaption(Value: Boolean); -begin - if FCaption <> Value then - begin - FCaption := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsView.SetFilterBar(Value: Boolean); -begin - if FFilterBar <> Value then - begin - FFilterBar := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsView.SetGroupFooters(Value: Boolean); -begin - if FGroupFooters <> Value then - begin - FGroupFooters := Value; - Changed; - end; -end; - -{ TdxGridAttributeHostInfo } - -procedure TdxGridAttributeHostInfo.Initialize(AParent: TdxReportCell); -begin - Origin := NullPoint; - FParent := AParent; -end; - -{ TdxGridAttributeHostInfoServices } - -constructor TdxGridAttributeHostInfoServices.Create(AReportLink: TdxGridReportLink); -begin - inherited Create; - FReportLink := AReportLink; - CreateHostInfos; -end; - -destructor TdxGridAttributeHostInfoServices.Destroy; -begin - DestroyHostInfos; - inherited; -end; - -procedure TdxGridAttributeHostInfoServices.Initialize; -begin - PageDetailsHostInfo.Initialize(PageDetails); - PageFootersHostInfo.Initialize(PageFooters); - PageHeadersHostInfo.Initialize(PageHeaders); -end; - -procedure TdxGridAttributeHostInfoServices.CreateHostInfos; -begin - FPageDetailsHostInfo := TdxGridAttributeHostInfo.Create; - FPageFootersHostInfo := TdxGridAttributeHostInfo.Create; - FPageHeadersHostInfo := TdxGridAttributeHostInfo.Create; -end; - -procedure TdxGridAttributeHostInfoServices.DestroyHostInfos; -begin - FreeAndNil(FPageHeadersHostInfo); - FreeAndNil(FPageFootersHostInfo); - FreeAndNil(FPageDetailsHostInfo); -end; - -function TdxGridAttributeHostInfoServices.GetBandHeadersHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseBandHeadersOnEveyPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetCaptionHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseCaptionOnEveryPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetFilterBarHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseFilterBarOnEveryPage then - if ActiveViewHelper.IsFilterBarAtTop(ActiveView) then - Result := PageHeadersHostInfo - else - Result := PageFootersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetFootersHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseFootersOnEveryPage then - Result := PageFootersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetHeadersHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseHeadersOnEveryPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetInconsistentStateText: string; -begin - if ReportLink.IsAggregated then - Result := cxGetResourceString(@sdxCannotUseOnEveryPageModeInAggregatedState) - else - if ReportLink.ProcessParams.HasMasterDetails then - Result := cxGetResourceString(@sdxCannotUseOnEveryPageMode) - else - if IsInconsistentFilterBarState then - Result := cxGetResourceString(@sdxIncorrectFilterBarState) - else - if IsInconsistentBandHeadersState then - if ActiveViewHelper.IsFilterBarAtTop(ActiveView) then - Result := cxGetResourceString(@sdxIncorrectBandHeadersState2) - else - Result := cxGetResourceString(@sdxIncorrectBandHeadersState) - else - if IsInconsistentHeadersState then - if ActiveViewHelper.IsFilterBarAtTop(ActiveView) then - Result := cxGetResourceString(@sdxIncorrectHeadersState2) - else - Result := cxGetResourceString(@sdxIncorrectHeadersState) - else - if IsInconsistentFootersState then - Result := cxGetResourceString(@sdxIncorrectFootersState) - else - Result := ''; -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentState: Boolean; -begin - Result := ReportLink.IsAggregated or ReportLink.ProcessParams.HasMasterDetails or - IsInconsistentFilterBarState or IsInconsistentBandHeadersState or - IsInconsistentHeadersState or IsInconsistentFootersState; -end; - -function TdxGridAttributeHostInfoServices.HasCells: Boolean; -begin - Result := ReportLink.ReportCells <> nil; -end; - -function TdxGridAttributeHostInfoServices.IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := ActiveViewHelper.IsAttributeSupported(AnAttribute) -end; - -function TdxGridAttributeHostInfoServices.GetActiveView: TcxCustomGridView; -begin - Result := ReportLink.ActiveView; -end; - -function TdxGridAttributeHostInfoServices.GetActiveViewHelper: TdxCustomGridViewHelperClass; -begin - Result := ReportLink.ActiveViewHelper; -// if ActiveView = nil then -// Result := TdxNullGridViewHelper -// else -// Result := dxViewHelpersFactory[ActiveView]; -end; - -function TdxGridAttributeHostInfoServices.GetArePageFootersAssigned: Boolean; -begin - with ReportLink.ReportCells do - Result := (FootersHostInfo.Parent = FooterCells) or (FilterBarHostInfo.Parent = FooterCells); -end; - -function TdxGridAttributeHostInfoServices.GetArePageHeadersAssigned: Boolean; -begin - with ReportLink.ReportCells do - Result := (CaptionHostInfo.Parent = HeaderCells) or (FilterBarHostInfo.Parent = HeaderCells) or - (BandHeadersHostInfo.Parent = HeaderCells) or (HeadersHostInfo.Parent = HeaderCells); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseBandHeadersOnEveyPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridBandHeader) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridLevelCaption) and - (ActiveViewHelper.IsFilterBarAtBottom(ActiveView) or ReportLink.IsAttributeUsedOnEveryPage(TdxGridFilterBar)); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseCaptionOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridLevelCaption); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseFilterBarOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridFilterBar) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridLevelCaption); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseFootersOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridFooter) and - (ActiveViewHelper.IsFilterBarAtTop(ActiveView) or ReportLink.IsAttributeUsedOnEveryPage(TdxGridFilterBar)); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseHeadersOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridHeader) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridLevelCaption) and - (ActiveViewHelper.IsFilterBarAtBottom(ActiveView) or ReportLink.IsAttributeUsedOnEveryPage(TdxGridFilterBar)) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridBandHeader); -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentBandHeadersState: Boolean; -begin - Result := IsAttributeSupported(TdxGridBandHeader) and OptionsOnEveryPage.BandHeaders and OptionsView.BandHeaders and - ((IsAttributeSupported(TdxGridLevelCaption) and OptionsView.Caption and not OptionsOnEveryPage.Caption) or - (IsAttributeSupported(TdxGridFilterBar) and ActiveViewHelper.IsFilterBarAtTop(ActiveView) and - OptionsView.FilterBar and not OptionsOnEveryPage.FilterBar)); -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentFilterBarState: Boolean; -begin - Result := ActiveViewHelper.IsFilterBarAtTop(ActiveView) and - (IsAttributeSupported(TdxGridFilterBar) and OptionsView.FilterBar and OptionsOnEveryPage.FilterBar and - IsAttributeSupported(TdxGridLevelCaption) and OptionsView.Caption and not OptionsOnEveryPage.Caption); -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentFootersState: Boolean; -begin - Result := IsAttributeSupported(TdxGridFooter) and OptionsView.Footers and OptionsOnEveryPage.Footers and - IsAttributeSupported(TdxGridFilterBar) and ActiveViewHelper.IsFilterBarAtBottom(ActiveView) and - OptionsView.FilterBar and not OptionsOnEveryPage.FilterBar; -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentHeadersState: Boolean; -begin - Result := IsAttributeSupported(TdxGridHeader) and OptionsView.Headers and OptionsOnEveryPage.Headers and - ((IsAttributeSupported(TdxGridLevelCaption) and OptionsView.Caption and not OptionsOnEveryPage.Caption) or - (IsAttributeSupported(TdxGridFilterBar) and ActiveViewHelper.IsFilterBarAtTop(ActiveView) and - OptionsView.FilterBar and not OptionsOnEveryPage.FilterBar) or - (IsAttributeSupported(TdxGridBandHeader) and OptionsView.BandHeaders and not OptionsOnEveryPage.BandHeaders)); -end; - -function TdxGridAttributeHostInfoServices.GetLevelSeparatorBottomHostInfo: TdxGridAttributeHostInfo; -begin - if ArePageFootersAssigned then - Result := PageFootersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetLevelSeparatorTopHostInfo: TdxGridAttributeHostInfo; -begin - if ArePageHeadersAssigned then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; -begin - Result := ReportLink.OptionsOnEveryPage; -end; - -function TdxGridAttributeHostInfoServices.GetOptionsView: TdxGridReportLinkOptionsView; -begin - Result := ReportLink.OptionsView; -end; - -function TdxGridAttributeHostInfoServices.GetPageDetails: TdxReportCell; -begin - if HasCells then - Result := ReportLink.ReportCells.Cells - else - Result := nil; -end; - -function TdxGridAttributeHostInfoServices.GetPageFooters: TdxReportCell; -begin - if HasCells and not ReportLink.ProcessParams.HasMasterDetails then - Result := ReportLink.ReportCells.FooterCells - else - Result := PageDetails; -end; - -function TdxGridAttributeHostInfoServices.GetPageHeaders: TdxReportCell; -begin - if HasCells and not ReportLink.ProcessParams.HasMasterDetails then - Result := ReportLink.ReportCells.HeaderCells - else - Result := PageDetails; -end; - -{ TdxGridReportLinkStyles } - -procedure TdxGridReportLinkStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxGridReportLinkStyles then - with TdxGridReportLinkStyles(Source) do - begin - Self.BandHeader := BandHeader; - Self.Caption := Caption; - Self.CardCaptionRow := CardCaptionRow; - Self.CardRowCaption := CardRowCaption; - Self.Content := Content; - Self.ContentEven := ContentEven; - Self.ContentOdd := ContentOdd; - Self.FilterBar := FilterBar; - Self.Footer := Footer; - Self.Group := Group; - Self.Header := Header; - Self.Preview := Preview; - Self.Selection := Selection; - end; // TODO: assign to TcxGridXXXStyles -end; - -procedure TdxGridReportLinkStyles.GetBandHeaderParams(ABand: TcxGridBand; - out AParams: TcxViewParams); -begin - GetViewParams(vspsGridBandHeader, ABand, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetCaptionParams(ATabLevel: TcxGridLevel; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridCaption, ATabLevel, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetCardCaptionRowParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -var - DataCellPos: TdxPSGridDataCellPos; -begin - DataCellPos := CreatePSDataCellPos; - try - with DataCellPos do - begin - GridRecord := ARecord; - Item := AItem; - end; - GetViewParams(vspsGridCardCaptionRow, DataCellPos, nil, AParams); - finally - FreePSDataCellPos(DataCellPos); - end; -end; - -procedure TdxGridReportLinkStyles.GetCardRowCaptionParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -var - DataCellPos: TdxPSGridDataCellPos; -begin - DataCellPos := CreatePSDataCellPos; - try - with DataCellPos do - begin - GridRecord := ARecord; - Item := AItem; - end; - GetViewParams(vspsGridCardRowCaption, DataCellPos, nil, AParams); - finally - FreePSDataCellPos(DataCellPos); - end; -end; - -procedure TdxGridReportLinkStyles.GetContentParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -const - StyleIndexes: array[Boolean] of Integer = (vspsGridContentEven, vspsGridContentOdd); -var - DataCellPos: TdxPSGridDataCellPos; -begin - if (ARecord <> nil) and (GetValue(StyleIndexes[Odd(ARecord.Index)]) <> nil) then - begin - DataCellPos := CreatePSDataCellPos; - try - with DataCellPos do - begin - GridRecord := ARecord; - Item := AItem; - end; - GetViewParams(StyleIndexes[Odd(ARecord.Index)], DataCellPos, nil, AParams); - finally - FreePSDataCellPos(DataCellPos); - end; - end - else - GetViewParams(vspsGridContent, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetFilterBarParams(out AParams: TcxViewParams); -begin - GetViewParams(vspsGridFilterBar, nil, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetFooterParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; AItem: TcxGridColumn; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridFooter, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetGroupParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridGroup, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetHeaderParams(AItem: TcxGridColumn; - out AParams: TcxViewParams); -begin - GetViewParams(vspsGridHeader, nil, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetPreviewParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridPreview, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetSelectionParams(out AParams: TcxViewParams); -begin - GetViewParams(vspsGridSelection, nil, nil, AParams); -end; - -function TdxGridReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 3; -end; - -procedure TdxGridReportLinkStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -const - FixedParts = [vspsGridBandHeader, vspsGridCaption, vspsGridFooter, vspsGridHeader, - vspsGridSelection]; -begin - inherited; - if ReportLink <> nil then - with AParams do - begin - if Index in FixedParts then - Color := dxPSCore.dxDefaultFixedColor - else - if Index = vspsGridGroup then - if ReportLink.IsOffice11StyleGrouping and (AData = nil) then - Color := dxPSCore.dxDefaultFixedColor - else - Color := dxPSCore.dxDefaultContentColor - else - if Index = vspsGridFilterBar then - Color := DefaultFilterBarColor - else - Color := dxPSCore.dxDefaultContentColor; - - Font := ReportLink.Font; - - if Index = vspsGridFilterBar then - TextColor := DefaultFilterBarTextColor - else - TextColor := Font.Color; - end; -end; - -class function TdxGridReportLinkStyles.GetStyleCaption(AnIndex: Integer): string; -begin - case AnIndex of - vspsGridBandHeader: - Result := cxGetResourceString(@sdxBandHeaderStyle); - vspsGridCaption: - Result := cxGetResourceString(@sdxCaptionStyle); - vspsGridCardCaptionRow: - Result := cxGetResourceString(@sdxCardCaptionRowStyle); - vspsGridCardRowCaption: - Result := cxGetResourceString(@sdxCardRowCaptionStyle); - vspsGridContent: - Result := cxGetResourceString(@sdxContentStyle); - vspsGridContentEven: - Result := cxGetResourceString(@sdxContentEvenStyle); - vspsGridContentOdd: - Result := cxGetResourceString(@sdxContentOddStyle); - vspsGridFilterBar: - Result := cxGetResourceString(@sdxFilterBarStyle); - vspsGridFooter: - Result := cxGetResourceString(@sdxFooterStyle); - vspsGridGroup: - Result := cxGetResourceString(@sdxGroupStyle); - vspsGridHeader: - Result := cxGetResourceString(@sdxHeaderStyle); - vspsGridPreview: - Result := cxGetResourceString(@sdxPreviewStyle); - else - Result := cxGetResourceString(@sdxSelectionStyle); - end; -end; - -function TdxGridReportLinkStyles.GetStyleIndexByCaption(const Caption: string): Integer; -begin - for Result := vspsGridFirst to vspsGridLast do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Result)) then - Exit; - Result := -1; -end; - -function TdxGridReportLinkStyles.IsCardViewStyle(AStyle: TcxStyle): Boolean; -begin - Result := (AStyle <> nil) and ((AStyle = CardRowCaption) or (AStyle = CardCaptionRow)); -end; - -function TdxGridReportLinkStyles.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkStyleSheet } - -class function TdxGridReportLinkStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TdxGridReportLinkStyles; -end; - -function TdxGridReportLinkStyleSheet.GetStylesValue: TdxGridReportLinkStyles; -begin - if GetStyles is TdxGridReportLinkStyles then - Result := TdxGridReportLinkStyles(GetStyles) - else - Result := nil; -end; - -procedure TdxGridReportLinkStyleSheet.SetStylesValue(Value: TdxGridReportLinkStyles); -begin - SetStyles(Value); -end; - -{ TdxGridReportLink } - -constructor TdxGridReportLink.Create(AOwner: TComponent); -begin - inherited; - FDelimitersHardVert := TList.Create; - FHostInfoServices := TdxGridAttributeHostInfoServices.Create(Self); - FReportRows := TList.Create; - InternalRestoreDefaults; - LinkModified(False); -end; - -destructor TdxGridReportLink.Destroy; -begin - FreeAndNil(FReportRows); - FreeAndNil(FHostInfoServices); - FreeAndNil(FDelimitersHardVert); - inherited; -end; - -procedure TdxGridReportLink.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLink then - with TdxGridReportLink(Source) do - begin - Self.OptionsCards := OptionsCards; - Self.OptionsDetails := OptionsDetails; - Self.OptionsLevels := OptionsLevels; - end; - inherited; -end; - -procedure TdxGridReportLink.AddPageBreak(AGridRecord: TcxCustomGridRecord); -var - ReportRow: TdxReportCell; -begin - ReportRow := ReportRowsByGridRecord[AGridRecord]; - if ReportRow <> nil then - AddVerticalHardDelimiter(ReportRow); -end; - -procedure TdxGridReportLink.AddPageBreak(const AGridRecords: array of TcxCustomGridRecord); -var - I: Integer; -begin - for I := Low(AGridRecords) to High(AGridRecords) do - AddPageBreak(AGridRecords[I]); -end; - -procedure TdxGridReportLink.AddPageBreak(const AGridRecords: TdxGridRecordArray); -var - I: Integer; -begin - for I := 0 to Length(AGridRecords) - 1 do - AddPageBreak(AGridRecords[I]); -end; - -procedure TdxGridReportLink.AddPageBreak(AGridRecords: TList); -var - I: Integer; - P: Pointer; -begin - for I := 0 to AGridRecords.Count - 1 do - begin - P := AGridRecords[I]; - if TObject(P) is TcxCustomGridRecord then - AddPageBreak(TcxCustomGridRecord(P)); - end; -end; - -procedure TdxGridReportLink.BeforeDesignReport; -begin - CalculateProcessParams; - inherited; -end; - -procedure TdxGridReportLink.ConstructReport(AReportCells: TdxReportCells); - - procedure CalculateSizes; - - procedure CalculateReportPartSizes(ACell: TdxReportCell); - var - Width, I, V: Integer; - begin - if ACell.CellCount > 0 then - begin - Width := 0; - for I := 0 to ACell.CellCount - 1 do - begin - V := ACell.Cells[I].Width; - if Width < V then Width := V; - end; - ACell.BoundsRect := MakeRect(0, 0, Width, ACell.LastCell.BoundsRect.Bottom); - end; - end; - - begin - with AReportCells do - begin - CalculateReportPartSizes(Cells); - if AreFooterCellsAllocated then CalculateReportPartSizes(FooterCells); - if AreHeaderCellsAllocated then CalculateReportPartSizes(HeaderCells); - end; - end; - -begin - if Grid = nil then Exit; - inherited; - if ActiveView = nil then Exit; - - PrepareConstruct; - try - BuildTopLevelViews; - if not AbortBuilding then CalculateSizes; - finally - UnprepareConstruct; - end; -end; - -procedure TdxGridReportLink.ConvertCoords; -begin - inherited; - ConvertDelimiters(DelimitersHardVert); -end; - -procedure TdxGridReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - DrawInfo: TdxGridCellCustomDrawInfo; -begin - GetItemCustomDrawInfo(AItem, DrawInfo); - with DrawInfo do - case GridAttributeID of - dxGridBandID: - DoCustomDrawBandCell(ACanvas, TcxGridBandedTableView(GridView), GridBand, - TdxReportCellString(AItem), ADone); - dxGridCardRowCaptionID: - DoCustomDrawCardRowCaptionCell(ACanvas, TcxGridCardView(GridView), GridCard, - GridCardRow, TdxReportCellString(AItem), ADone); - dxGridCardRowDataID: - DoCustomDrawCardRowDataCell(ACanvas, TcxGridCardView(GridView), GridCard, - GridCardRow, AItem, ADone); - dxGridFilterBarID: - DoCustomDrawFilterBar(ACanvas, TcxCustomGridTableView(GridView), - TdxReportCellString(AItem), ADone); - dxGridFooterID, - dxGridGroupFooterID: - DoCustomDrawFooterCell(ACanvas, TcxGridTableView(GridView), GridRecord, - GridColumn, GroupLevel, TdxReportCellString(AItem), ADone); - dxGridHeaderID: - DoCustomDrawHeaderCell(ACanvas, TcxGridTableView(GridView), GridColumn, - TdxReportCellString(AItem), ADone); - dxGridRecordID: - DoCustomDrawCell(ACanvas, TcxCustomGridTableView(GridView), GridRecord, - GridColumn, AItem, ADone); - dxGridLevelCaptionID: - DoCustomDrawLevelCaption(ACanvas, GridView, TdxReportCellString(AItem), ADone); - end; -end; - -function TdxGridReportLink.GetBreakPagesByHardDelimiters: Boolean; -begin - with OptionsPagination do - Result := OneGroupPerPage or Custom; -end; - -function TdxGridReportLink.GetEmptyPagesCanExist: Boolean; -begin - Result := ProcessParams.HasMasterDetails; -end; - -function TdxGridReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := (AUpdateCodes * uaMarginsVert <> []) and (ProcessParams.HasOnlyCards or OptionsSize.AutoWidth); -end; - -function TdxGridReportLink.GetUseHardVertDelimiters: Boolean; -begin - with OptionsPagination do - Result := TopLevelGroup or Custom; -end; - -procedure TdxGridReportLink.InternalRestoreDefaults; -begin - inherited; - OptionsCards.RestoreDefaults; - OptionsDetails.RestoreDefaults; - OptionsLevels.RestoreDefaults; -end; - -procedure TdxGridReportLink.InternalRestoreFromOriginal; -var - View: TcxCustomGridView; -begin - inherited; - Color := clWhite; - - if Grid <> nil then - begin - OptionsFormatting.LookAndFeelKind := Grid.LookAndFeel.Kind; - OptionsView.Caption := Grid.RootLevelOptions.DetailTabsPosition <> dtpNone; - - View := ActiveView; - if View <> nil then - begin - if View is TcxGridTableView then - begin - OptionsPreview.AutoHeight := TcxGridTableView(View).Preview.AutoHeight; - OptionsPreview.MaxLineCount := TcxGridTableView(View).Preview.MaxLineCount; - OptionsPreview.Visible := TcxGridTableView(View).Preview.Visible; - - if View is TcxGridBandedTableView then - OptionsView.BandHeaders := TcxGridBandedTableView(View).OptionsView.BandHeaders; - OptionsView.FilterBar := (TcxGridTableView(View).Filtering.Visible = fvAlways) or - ((TcxGridTableView(View).Filtering.Visible = fvNonEmpty) and - (TcxGridTableView(View).DataController.Filter.FilterText <> '')); - OptionsView.Footers := TcxGridTableView(View).OptionsView.Footer; - OptionsView.GroupFooters := TcxGridTableView(View).OptionsView.GroupFooters <> gfInvisible; - OptionsView.Headers := TcxGridTableView(View).OptionsView.Header; - - OptionsSize.AutoWidth := TcxGridTableView(View).OptionsView.ColumnAutoWidth; - end; - - if View is TcxGridCardView then - OptionsView.FilterBar := False; - end; - end; -end; - -function TdxGridReportLink.IsDrawFootersOnEveryPage: Boolean; -begin - Result := HostInfoServices.ArePageFootersAssigned; -end; - -function TdxGridReportLink.IsDrawHeadersOnEveryPage: Boolean; -begin - Result := HostInfoServices.ArePageHeadersAssigned; -end; - -function TdxGridReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -var - DrawInfo: TdxGridCellCustomDrawInfo; -begin - Result := inherited IsSupportedCustomDraw(Item) and - (Item <> nil) and IsCustomDrawn(GetItemCustomDrawInfo(Item, DrawInfo)); -end; - -procedure TdxGridReportLink.MakeHardDelimiters(AReportCells: TdxReportCells; - AVertDelimiters: TList); -begin - inherited; - if OptionsPagination.Custom then - try - DoGetCustomPageBreaks; - except - Application.HandleException(Self); - end; - dxPSUtl.dxCopyList(DelimitersHardVert, AVertDelimiters); -end; - -function TdxGridReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := OptionsFormatting.UseNativeStyles; -end; - -function TdxGridReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TdxGridReportLinkStyles; -end; - -function TdxGridReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TdxGridReportLinkStyleSheet; -end; - -function TdxGridReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := GridLinkStyleSheetPrototype; -end; - -procedure TdxGridReportLink.PrepareConstruct; -begin - inherited; - DelimitersHardVert.Clear; - FReportRows.Clear; - - ReportCells.LookAndFeel := nil;//ReportCells.CreateGroupLookAndFeel(TdxPSReportGroupNullLookAndFeel); - - if OptionsExpanding.HasAny then - DoExpandRows; - - CalculateProcessParams; - HostInfoServices.Initialize; -end; - -procedure TdxGridReportLink.DoCustomDrawBandCell(ACanvas: TCanvas; - AView: TcxGridBandedTableView; ABand: TcxGridBand; AnItem: TdxReportCellString; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawBandCell) then - FOnCustomDrawBandCell(Self, ACanvas, AView, ABand, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawCardRowCaptionCell(ACanvas: TCanvas; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCardRowCaptionCell) then - FOnCustomDrawCardRowCaptionCell(Self, ACanvas, AView, ACard, ARow, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawCardRowDataCell(ACanvas: TCanvas; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCardRowDataCell) then - FOnCustomDrawCardRowDataCell(Self, ACanvas, AView, ACard, ARow, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawCell(ACanvas: TCanvas; - AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCell) then - FOnCustomDrawCell(Self, ACanvas, AView, ARecord, AColumn, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawFilterBar(ACanvas: TCanvas; - AView: TcxCustomGridTableView; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFilterBar) then - FOnCustomDrawFilterBar(Self, ACanvas, AView, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawFooterCell(ACanvas: TCanvas; - AView: TcxGridTableView; ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; - ALevel: Integer; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFooterCell) then - FOnCustomDrawFooterCell(Self, ACanvas, AView, ARecord, AColumn, ALevel, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawHeaderCell(ACanvas: TCanvas; - AView: TcxGridTableView; AColumn: TcxGridColumn; AnItem: TdxReportCellString; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeaderCell) then - FOnCustomDrawHeaderCell(Self, ACanvas, AView, AColumn, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawLevelCaption(ACanvas: TCanvas; - AView: TcxCustomGridView; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawLevelCaption) then - FOnCustomDrawLevelCaption(Self, ACanvas, AView, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoGetCellHeight(AView: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; ATableItem: TcxCustomGridTableItem; - var AHeight: Integer); -begin - if Assigned(FOnGetCellHeight) then - FOnGetCellHeight(Self, AView, ARecord, ATableItem, AHeight); -end; - -procedure TdxGridReportLink.DoGetCustomPageBreaks; -begin - if Assigned(FOnGetCustomPageBreaks) then FOnGetCustomPageBreaks(Self); -end; - -procedure TdxGridReportLink.DoInitializeBandCell(AView: TcxGridBandedTableView; - ABand: TcxGridBand; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeBandCell) then - FOnInitializeBandCell(Self, AView, ABand, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeCardRowCaptionCell(AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeCardRowCaptionCell) then - FOnInitializeCardRowCaptionCell(Self, AView, ACard, ARow, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeCardRowDataCell(AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeCardRowDataCell) then - FOnInitializeCardRowDataCell(Self, AView, ACard, ARow, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeCell(AView: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeCell) then - FOnInitializeCell(Self, AView, ARecord, AColumn, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeFilterBar(AView: TcxCustomGridTableView; - AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeFilterBar) then - FOnInitializeFilterBar(Self, AView, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeFooterCell(AView: TcxGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; ALevel: Integer; - AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeFooterCell) then - FOnInitializeFooterCell(Self, AView, ARecord, AColumn, ALevel, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeHeaderCell(AView: TcxGridTableView; - AColumn: TcxGridColumn; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeHeaderCell) then - FOnInitializeHeaderCell(Self, AView, AColumn, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeLevelCaption(AView: TcxCustomGridView; - AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeLevelCaption) then - FOnInitializeLevelCaption(Self, AView, AnItem); -end; - -procedure TdxGridReportLink.CreateOptions; -begin - inherited; - FOptionsCards := GetOptionsCardsClass.Create(Self); - FOptionsDetails := GetOptionsDetailsClass.Create(Self); - FOptionsLevels := GetOptionsLevelsClass.Create(Self); -end; - -procedure TdxGridReportLink.DestroyOptions; -begin - FreeAndNil(FOptionsLevels); - FreeAndNil(FOptionsDetails); - FreeAndNil(FOptionsCards); - inherited; -end; - -function TdxGridReportLink.GetOptionsCardsClass: TdxGridReportLinkOptionsCardsClass; -begin - Result := TdxGridReportLinkOptionsCards; -end; - -function TdxGridReportLink.GetOptionsDetailsClass: TdxGridReportLinkOptionsDetailsClass; -begin - Result := TdxGridReportLinkOptionsDetails; -end; - -function TdxGridReportLink.GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; -begin - Result := TdxGridReportLinkOptionsExpanding; -end; - -function TdxGridReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TdxGridReportLinkOptionsFormatting; -end; - -function TdxGridReportLink.GetOptionsLevelsClass: TdxGridReportLinkOptionsLevelsClass; -begin - Result := TdxGridReportLinkOptionsLevels; -end; - -function TdxGridReportLink.GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; -begin - Result := TdxGridReportLinkOptionsOnEveryPage; -end; - -function TdxGridReportLink.GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; -begin - Result := TdxGridReportLinkOptionsPagination; -end; - -function TdxGridReportLink.GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; -begin - Result := TdxGridReportLinkOptionsPreview; -end; - -function TdxGridReportLink.GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; -begin - Result := TdxGridReportLinkOptionsRefinements; -end; - -function TdxGridReportLink.GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; -begin - Result := TdxGridReportLinkOptionsSelection; -end; - -function TdxGridReportLink.GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; -begin - Result := TdxGridReportLinkOptionsSize; -end; - -function TdxGridReportLink.GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; -begin - Result := TdxGridReportLinkOptionsView; -end; - -procedure TdxGridReportLink.AddReportRow(AReportRow: TdxReportCell); -begin - FReportRows.Add(AReportRow); -end; - -procedure TdxGridReportLink.AddVerticalHardDelimiter(ADelimiter: TdxReportCell); -var - R: TRect; -begin - R := ADelimiter.AbsoluteRect; - AddVerticalHardDelimiter(R.Top); -end; - -procedure TdxGridReportLink.AddVerticalHardDelimiter(ADelimiter: Integer); -begin - FDelimitersHardVert.Add(TObject(ADelimiter)); -end; - -procedure TdxGridReportLink.BuildTopLevelView(AGridView: TcxCustomGridView); -begin - if AGridView <> FProcessedView then BuildView(nil, AGridView); -end; - -procedure TdxGridReportLink.BuildTopLevelViews; -var - MasterRow: TcxGridMasterDataRow; - CurrentView: TcxCustomGridView; -begin - if OptionsLevels.Unwrap and OptionsLevels.UnwrapTopLevel then - begin - FProcessedView := nil; - try - MasterRow := ActiveViewMasterRow; - if OptionsLevels.RiseActiveLevelOntoTop then - begin - if MasterRow <> nil then - CurrentView := MasterRow.ActiveDetailGridView - else - CurrentView := ActiveView; - BuildTopLevelView(CurrentView); - FProcessedView := CurrentView; - end; - if not AbortBuilding then - ForEachView(MasterRow, BuildTopLevelView); - finally - FProcessedView := nil; - end; - end - else - BuildTopLevelView(ActiveView); -end; - -procedure TdxGridReportLink.BuildView(AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView); -begin - with CreateViewBuilder(AMasterBuilder, AGridView) do - try - Build; - finally - Free; - end; -end; - -function TdxGridReportLink.CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := dxGridViewBuildersFactory.CreateViewAdapter(AMasterAdapter, AGridView); -end; - -function TdxGridReportLink.CreateViewBuilder(AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; -begin - Result := dxGridViewBuildersFactory.CreateViewBuilder(Self, AMasterBuilder, AGridView); -end; - -procedure TdxGridReportLink.DoExpandRows; -begin - if OptionsLevels.Unwrap and OptionsLevels.UnwrapTopLevel then - ForEachView(ActiveViewMasterRow, DoExpandViewRows) - else - DoExpandViewRows(ActiveView); -end; - -procedure TdxGridReportLink.DoExpandViewRows(AGridView: TcxCustomGridView); -begin - if AGridView <> nil then - with CreateViewAdapter(nil, AGridView) do - try - ExpandAllRows(OptionsExpanding, not OptionsDetails.OnlyFocusedView); - finally - Free; - end; -end; - -procedure TdxGridReportLink.ForEachView(AMasterRow: TcxGridMasterDataRow; AProc: TdxGridViewProc); -var - I: Integer; - GridView: TcxCustomGridView; - Level: TcxGridLevel; -begin - if not Assigned(AProc) then Exit; - - if AMasterRow <> nil then - for I := 0 to AMasterRow.DetailGridViewCount -1 do - begin - GridView := AMasterRow.DetailGridViews[I]; - if GridView <> nil then - begin - Level := GridView.Level as TcxGridLevel; - if Level.Visible then AProc(GridView); - end; - if AbortBuilding then Break; - end - else - with Grid.Levels do - for I := 0 to VisibleCount - 1 do - begin - AProc(VisibleItems[I].GridView); - if AbortBuilding then Break; - end; -end; - -function TdxGridReportLink.GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; - out ADrawInfo: TdxGridCellCustomDrawInfo): TdxGridAttributeID; -begin - dxViewHelpersFactory.HelperClassByItem(AnItem).ExtractCustomDrawInfo(AnItem, ADrawInfo); - Result := ADrawInfo.GridAttributeID; -end; - -function TdxGridReportLink.HasSiblings(AGridView: TcxCustomGridView): Boolean; -var - ValidViewCount, I: Integer; -begin - if AGridView <> nil then - begin - ValidViewCount := 0; - with TcxGridLevel(AGridView.Level).Parent do - for I := 0 to VisibleCount - 1 do - begin - if VisibleItems[I].GridView <> nil then Inc(ValidViewCount); - if ValidViewCount > 1 then Break; - end; - Result := ValidViewCount > 1; - end - else - Result := False; -end; - -function TdxGridReportLink.IsCardViewStyle(AStyle: TcxStyle): Boolean; -begin - Result := Styles.IsCardViewStyle(AStyle); -end; - -function TdxGridReportLink.IsCustomDrawn(AnAttributeID: TdxGridAttributeID): Boolean; -begin - Result := False; - case AnAttributeID of - dxGridBandID: - Result := Assigned(FOnCustomDrawBandCell); - dxGridCardRowCaptionID: - Result := Assigned(FOnCustomDrawCardRowCaptionCell); - dxGridCardRowDataID: - Result := Assigned(FOnCustomDrawCardRowDataCell); - dxGridFilterBarID: - Result := Assigned(FOnCustomDrawFilterBar); - dxGridFooterID, - dxGridGroupFooterID: - Result := Assigned(FOnCustomDrawFooterCell); - dxGridHeaderID: - Result := Assigned(FOnCustomDrawHeaderCell); - dxGridLevelCaptionID: - Result := Assigned(FOnCustomDrawLevelCaption); - dxGridRecordID: - Result := Assigned(FOnCustomDrawCell); - end; -end; - -function TdxGridReportLink.IsOffice11StyleGrouping: Boolean; -begin - Result := False; -end; - -procedure TdxGridReportLink.CalculateProcessParams; -var - Adapter: TdxCustomGridViewAdapter; - View: TcxCustomGridView; -begin - View := ActiveView; - - with FProcessParams do - if View = nil then - begin - HasMasterDetails := False; - HasMasterDetailsInTopView := False; - HasOnlyCards := False; - HasUnwrapableData := False; - CanUseOnEveryPageMode := not IsAggregated; - end - else - begin - Adapter := CreateViewAdapter(nil, View); - try - HasUnwrapableData := HasSiblings(Grid.ActiveLevel.GridView); - HasMasterDetailsInTopView := View.IsDetail or View.IsMaster; - HasMasterDetails := (HasUnwrapableData and OptionsLevels.Unwrap) or - (View.IsMaster and not Adapter.AreAllMasterRowsCollapsed and - not (OptionsDetails.StartFromFocusedView and OptionsDetails.OnlyFocusedView)); - HasOnlyCards := View is TcxGridCardView; - CanUseOnEveryPageMode := not IsAggregated and not HasMasterDetails and - Adapter.CanUseOnEveryPageMode; {Adapter.RecordCount <> 0} - finally - Adapter.Free; - end; - end; -end; - -function TdxGridReportLink.CanAttributeBeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := ProcessParams.CanUseOnEveryPageMode and OptionsOnEveryPage.HasInstalledAttribute(AnAttribute); -end; - -function TdxGridReportLink.IsAttributeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := CanAttributeBeUsedOnEveryPage(AnAttribute) or not OptionsView.HasInstalledAttribute(AnAttribute); -end; - -function TdxGridReportLink.GetActiveStyles: TdxGridReportLinkStyles; -begin - Result := inherited ActiveStyles as TdxGridReportLinkStyles; -end; - -function TdxGridReportLink.GetActiveView: TcxCustomGridView; -var - Level: TcxGridLevel; -begin - Result := nil; - if Grid <> nil then - Result := Grid.FocusedView; - if (Result <> nil) and not OptionsDetails.StartFromFocusedView then - begin - Level := Result.Level as TcxGridLevel; - while not Level.IsTop do - Level := Level.Parent; - Result := Level.GridView; - end; -end; - -function TdxGridReportLink.GetActiveViewHelper: TdxCustomGridViewHelperClass; -begin - if ActiveView = nil then - Result := TdxNullGridViewHelper - else - Result := dxViewHelpersFactory[ActiveView]; -end; - -function TdxGridReportLink.GetActiveViewMasterRow: TcxGridMasterDataRow; -begin - Result := nil; - with ActiveView do - if MasterGridRecordIndex <> -1 then - Result := (MasterGridView as TcxGridTableView).ViewData.Rows[MasterGridRecordIndex] as TcxGridMasterDataRow; -end; - -function TdxGridReportLink.GetActiveViewParentLevel: TcxGridLevel; -var - GridView: TcxCustomGridView; -begin - Result := nil; - GridView := ActiveView; - if GridView <> nil then - Result := TcxGridLevel(GridView.Level).Parent; -end; - -function TdxGridReportLink.GetDesignWindow: TdxfmGridReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TdxfmGridReportLinkDesignWindow; -end; - -function TdxGridReportLink.GetGrid: TcxGrid; -begin - Result := TcxGrid(Component); -end; - -function TdxGridReportLink.GetOptionsExpanding: TdxGridReportLinkOptionsExpanding; -begin - Result := inherited OptionsExpanding as TdxGridReportLinkOptionsExpanding; -end; - -function TdxGridReportLink.GetOptionsFormatting: TdxGridReportLinkOptionsFormatting; -begin - Result := inherited OptionsFormatting as TdxGridReportLinkOptionsFormatting; -end; - -function TdxGridReportLink.GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; -begin - Result := inherited OptionsOnEveryPage as TdxGridReportLinkOptionsOnEveryPage; -end; - -function TdxGridReportLink.GetOptionsPagination: TdxGridReportLinkOptionsPagination; -begin - Result := inherited OptionsPagination as TdxGridReportLinkOptionsPagination; -end; - -function TdxGridReportLink.GetOptionsPreview: TdxGridReportLinkOptionsPreview; -begin - Result := inherited OptionsPreview as TdxGridReportLinkOptionsPreview; -end; - -function TdxGridReportLink.GetOptionsRefinements: TdxGridReportLinkOptionsRefinements; -begin - Result := inherited OptionsRefinements as TdxGridReportLinkOptionsRefinements; -end; - -function TdxGridReportLink.GetOptionsSelection: TdxGridReportLinkOptionsSelection; -begin - Result := inherited OptionsSelection as TdxGridReportLinkOptionsSelection; -end; - -function TdxGridReportLink.GetOptionsSize: TdxGridReportLinkOptionsSize; -begin - Result := inherited OptionsSize as TdxGridReportLinkOptionsSize; -end; - -function TdxGridReportLink.GetOptionsView: TdxGridReportLinkOptionsView; -begin - Result := inherited OptionsView as TdxGridReportLinkOptionsView; -end; - -function TdxGridReportLink.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := FReportRows[Index]; -end; - -function TdxGridReportLink.GetReportRowByGridRecord(GridRecord: TcxCustomGridRecord): TdxReportCell; -var - I: Integer; -begin - if GridRecord <> nil then - for I := 0 to ReportRowCount - 1 do - begin - Result := ReportRows[I]; - if Result.Data = Integer(GridRecord) then Exit; - end; - Result := nil; -end; - -function TdxGridReportLink.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TdxGridReportLink.GetStyles: TdxGridReportLinkStyles; -begin - Result := inherited Styles as TdxGridReportLinkStyles; -end; - -procedure TdxGridReportLink.SetOnCustomDrawBandCell(Value: TdxGridReportLinkCustomDrawBandCellEvent); -begin - if @FOnCustomDrawBandCell <> @Value then - begin - FOnCustomDrawBandCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawCell(Value: TdxGridReportLinkCustomDrawCellEvent); -begin - if @FOnCustomDrawCell <> @Value then - begin - FOnCustomDrawCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawCardRowCaptionCell(Value: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent); -begin - if @FOnCustomDrawCardRowCaptionCell <> @Value then - begin - FOnCustomDrawCardRowCaptionCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawCardRowDataCell(Value: TdxGridReportLinkCustomDrawCardRowDataCellEvent); -begin - if @FOnCustomDrawCardRowDataCell <> @Value then - begin - FOnCustomDrawCardRowDataCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawFilterBar(Value: TdxGridReportLinkCustomDrawFilterBarEvent); -begin - if @FOnCustomDrawFilterBar <> @Value then - begin - FOnCustomDrawFilterBar := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawFooterCell(Value: TdxGridReportLinkCustomDrawFooterCellEvent); -begin - if @FOnCustomDrawFooterCell <> @Value then - begin - FOnCustomDrawFooterCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawHeaderCell(Value: TdxGridReportLinkCustomDrawHeaderCellEvent); -begin - if @FOnCustomDrawHeaderCell <> @Value then - begin - FOnCustomDrawHeaderCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawLevelCaption(Value: TdxGridReportLinkCustomDrawLevelCaptionEvent); -begin - if @FOnCustomDrawLevelCaption <> @Value then - begin - FOnCustomDrawLevelCaption := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOptionsCards(Value: TdxGridReportLinkOptionsCards); -begin - OptionsCards.Assign(Value); -end; - -procedure TdxGridReportLink.SetOptionsDetails(Value: TdxGridReportLinkOptionsDetails); -begin - OptionsDetails.Assign(Value); -end; - -procedure TdxGridReportLink.SetOptionsExpanding(Value: TdxGridReportLinkOptionsExpanding); -begin - OptionsExpanding.Assign(Value); -end; - -procedure TdxGridReportLink.SetOptionsFormatting(Value: TdxGridReportLinkOptionsFormatting); -begin - inherited OptionsFormatting := Value; -end; - -procedure TdxGridReportLink.SetOptionsLevels(Value: TdxGridReportLinkOptionsLevels); -begin - OptionsLevels.Assign(Value); -end; - -procedure TdxGridReportLink.SetOptionsOnEveryPage(Value: TdxGridReportLinkOptionsOnEveryPage); -begin - inherited OptionsOnEveryPage := Value; -end; - -procedure TdxGridReportLink.SetOptionsPagination(Value: TdxGridReportLinkOptionsPagination); -begin - inherited OptionsPagination := Value; -end; - -procedure TdxGridReportLink.SetOptionsPreview(Value: TdxGridReportLinkOptionsPreview); -begin - inherited OptionsPreview := Value; -end; - -procedure TdxGridReportLink.SetOptionsRefinements(Value: TdxGridReportLinkOptionsRefinements); -begin - inherited OptionsRefinements := Value; -end; - -procedure TdxGridReportLink.SetOptionsSelection(Value: TdxGridReportLinkOptionsSelection); -begin - inherited OptionsSelection := Value; -end; - -procedure TdxGridReportLink.SetOptionsSize(Value: TdxGridReportLinkOptionsSize); -begin - inherited OptionsSize := Value; -end; - -procedure TdxGridReportLink.SetOptionsView(Value: TdxGridReportLinkOptionsView); -begin - inherited OptionsView := Value; -end; - -procedure TdxGridReportLink.SetStyles(Value: TdxGridReportLinkStyles); -begin - inherited Styles := Value; -end; - -{ TcxGridCardView2OptionsView } - -constructor TcxGridCardView2OptionsView.Create(AGridView: TcxCustomGridView); -begin - inherited; - FCardBorders := False; - FGridLineColor := clDefault; - FGridLines := glNone; - FShadowDepth := 4; -end; - -procedure TcxGridCardView2OptionsView.Assign(Source: TPersistent); -begin - if Source is TcxGridCardView2OptionsView then - with TcxGridCardView2OptionsView(Source) do - begin - Self.CardBorders := CardBorders; - Self.GridLineColor := GridLineColor; - Self.GridLines := GridLines; - Self.ShadowDepth := ShadowDepth; - end; - inherited; -end; - -function TcxGridCardView2OptionsView.GetShadowVisible: Boolean; -begin - Result := ShadowDepth <> 0; -end; - -procedure TcxGridCardView2OptionsView.SetCardBorders(Value: Boolean); -begin - if FCardBorders <> Value then - begin - FCardBorders := Value; - SizeChanged; - end; -end; - -procedure TcxGridCardView2OptionsView.SetGridLineColor(Value: TColor); -begin - if FGridLineColor <> Value then - begin - FGridLineColor := Value; - LayoutChanged; - end; -end; - -procedure TcxGridCardView2OptionsView.SetGridLines(Value: TcxGridLines); -begin - if FGridLines <> Value then - begin - FGridLines := Value; - SizeChanged; - end; -end; - -procedure TcxGridCardView2OptionsView.SetShadowDepth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FShadowDepth <> Value then - begin - FShadowDepth := Value; - SizeChanged; - end; -end; - -{ TcxGridCardView2Styles } - -procedure TcxGridCardView2Styles.Assign(Source: TPersistent); -begin - if Source is TcxGridCardView2Styles then - with TcxGridCardView2Styles(Source) do - begin - Self.CardShadow := CardShadow; - end; - inherited; -end; - -procedure TcxGridCardView2Styles.GetCardShadowParams(ARecord: TcxCustomGridRecord; - out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if Assigned(FOnGetCardShadowStyle) then - FOnGetCardShadowStyle(GridView, ARecord, AStyle); - GetViewParams(vsCardShadow, ARecord, AStyle, AParams); -end; - -procedure TcxGridCardView2Styles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - inherited; - if Index = vsCardShadow then AParams.Color := clWindowText; -end; - -type - TcxGridCardViewInfo2 = class; - TcxGridCardViewViewInfo2 = class; - - TcxGridCardRowCaptionViewInfo2 = class(TcxGridCardRowCaptionViewInfo) - private - function GetCardViewInfo: TcxGridCardViewInfo2; - protected - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - public - property CardViewInfo: TcxGridCardViewInfo2 read GetCardViewInfo; - end; - - TcxGridCardRowDataViewInfo2 = class(TcxGridCardRowDataViewInfo) - private - function GetCardViewInfo: TcxGridCardViewInfo2; - protected - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - public - property CardViewInfo: TcxGridCardViewInfo2 read GetCardViewInfo; - end; - - TcxGridCardDataRowViewInfo2 = class(TcxGridCardDataRowViewInfo) - protected - function GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; override; - function GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; override; - end; - - TcxGridCardCaptionRowViewInfo2 = class(TcxGridCardRowViewInfo) - protected - function GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; override; - function GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; override; - end; - - TcxGridCardPainter2 = class(TcxGridCardPainter) - private - function GetViewInfo: TcxGridCardViewInfo2; - protected - procedure DrawBottomShadowAndRestSpace; virtual; - procedure DrawRightShadowAndRestSpace; virtual; - procedure DrawShadows; virtual; - procedure Paint; override; - property ViewInfo: TcxGridCardViewInfo2 read GetViewInfo; - end; - - TcxGridCardViewInfo2 = class(TcxGridCardViewInfo) - private - function GetGridView: TcxGridCardView2; - protected - function CalculateHeight: Integer; override; - function GetContentWidth: Integer; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetRowViewInfoClass(ARow: TcxGridCardViewRow): TcxGridCardRowViewInfoClass; override; - - function GetBottomShadowRect: TRect; virtual; - function GetBottomShadowRestRect: TRect; virtual; - function GetCardRowCaptionBorders(ARowCaption: TcxGridCardRowCaptionViewInfo2): TcxBorders; virtual; - function GetCardRowDataBorders(ARowData: TcxGridCardRowDataViewInfo2): TcxBorders; virtual; - function GetGridLineColor: TColor; virtual; - function GetRightShadowRect: TRect; virtual; - function GetRightShadowRestRect: TRect; virtual; - function GetShadowColor: TColor; virtual; - function GetShadowDepth: Integer; virtual; - function GetShadowRestColor: TColor; virtual; - - property GridView: TcxGridCardView2 read GetGridView; - public - property BottomShadowRect: TRect read GetBottomShadowRect; - property BottomShadowRestRect: TRect read GetBottomShadowRestRect; - property GridLineColor: TColor read GetGridLineColor; - property RightShadowRect: TRect read GetRightShadowRect; - property RightShadowRestRect: TRect read GetRightShadowRestRect; - property ShadowColor: TColor read GetShadowColor; - property ShadowDepth: Integer read GetShadowDepth; - property ShadowRestColor: TColor read GetShadowRestColor; - end; - - TcxGridCard2 = class(TcxGridCard) - protected - function GetViewInfoClass: TcxCustomGridRecordViewInfoClass; override; - end; - - TcxGridCardViewViewData2 = class(TcxGridCardViewViewData) - protected - function GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; override; - end; - - TcxGridCardsHorizontalViewInfo2 = class(TcxGridCardsHorizontalViewInfo) - private - function GetGridView: TcxGridCardView2; - protected - function CalculateCardHeight: Integer; override; - function GetShadowDepth: Integer; virtual; - - property GridView: TcxGridCardView2 read GetGridView; - public - property ShadowDepth: Integer read GetShadowDepth; - end; - - TcxGridCardsVerticalViewInfo2 = class(TcxGridCardsVerticalViewInfo) - private - function GetGridView: TcxGridCardView2; - protected - function CalculateCardHeight: Integer; override; - function GetShadowDepth: Integer; virtual; - - property GridView: TcxGridCardView2 read GetGridView; - public - property ShadowDepth: Integer read GetShadowDepth; - end; - - TcxGridCardViewViewInfo2 = class(TcxGridCardViewViewInfo) - protected - function GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; override; - end; - -{ TcxGridCardRowCaptionViewInfo2 } - -function TcxGridCardRowCaptionViewInfo2.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := CardViewInfo.GridLineColor; -end; - -function TcxGridCardRowCaptionViewInfo2.GetBorders: TcxBorders; -begin - Result := CardViewInfo.GetCardRowCaptionBorders(Self); -end; - -function TcxGridCardRowCaptionViewInfo2.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := 1; -end; - -function TcxGridCardRowCaptionViewInfo2.GetCardViewInfo: TcxGridCardViewInfo2; -begin - Result := inherited CardViewInfo as TcxGridCardViewInfo2 -end; - -{ TcxGridCardRowDataViewInfo2 } - -function TcxGridCardRowDataViewInfo2.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := CardViewInfo.GridLineColor; -end; - -function TcxGridCardRowDataViewInfo2.GetBorders: TcxBorders; -begin - Result := CardViewInfo.GetCardRowDataBorders(Self); -end; - -function TcxGridCardRowDataViewInfo2.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := 1; -end; - -function TcxGridCardRowDataViewInfo2.GetCardViewInfo: TcxGridCardViewInfo2; -begin - Result := inherited CardViewInfo as TcxGridCardViewInfo2 -end; - -{ TcxGridCardDataRowViewInfo2 } - -function TcxGridCardDataRowViewInfo2.GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; -begin - Result := TcxGridCardRowCaptionViewInfo2; -end; - -function TcxGridCardDataRowViewInfo2.GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; -begin - Result := TcxGridCardRowDataViewInfo2; -end; - -{ TcxGridCardCaptionRowViewInfo2 } - -function TcxGridCardCaptionRowViewInfo2.GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; -begin - Result := TcxGridCardRowCaptionViewInfo2; -end; - -function TcxGridCardCaptionRowViewInfo2.GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; -begin - Result := TcxGridCardRowDataViewInfo2; -end; - -{ TcxGridCardPainter2 } - -procedure TcxGridCardPainter2.DrawBottomShadowAndRestSpace; -var - R: TRect; -begin - R := ViewInfo.BottomShadowRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowColor; - Canvas.FillRect(R); - end; - - R := ViewInfo.BottomShadowRestRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowRestColor; - Canvas.FillRect(R); - end; -end; - -procedure TcxGridCardPainter2.DrawRightShadowAndRestSpace; -var - R: TRect; -begin - R := ViewInfo.RightShadowRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowColor; - Canvas.FillRect(R); - end; - - R := ViewInfo.RightShadowRestRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowRestColor; - Canvas.FillRect(R); - end; -end; - -procedure TcxGridCardPainter2.DrawShadows; -var - Color: TColor; -begin - Color := Canvas.Brush.Color; - DrawBottomShadowAndRestSpace; - DrawRightShadowAndRestSpace; - Canvas.Brush.Color := Color; -end; - -procedure TcxGridCardPainter2.Paint; -begin - DrawShadows; - inherited; -end; - -function TcxGridCardPainter2.GetViewInfo: TcxGridCardViewInfo2; -begin - Result := TcxGridCardViewInfo2(inherited ViewInfo); -end; - -{ TcxGridCardViewInfo2 } - -function TcxGridCardViewInfo2.CalculateHeight: Integer; -begin - Result := inherited CalculateHeight; - if RecordsViewInfo.AutoCardHeight or (RecordsViewInfo.CardHeight = -1) then - Inc(Result, ShadowDepth); -end; - -function TcxGridCardViewInfo2.GetContentWidth: Integer; -begin - Result := inherited GetContentWidth - ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridCardPainter2; -end; - -function TcxGridCardViewInfo2.GetRowViewInfoClass(ARow: TcxGridCardViewRow): TcxGridCardRowViewInfoClass; -const - RowViewInfoClasses: array[TcxGridCardViewRowKind] of TcxGridCardRowViewInfoClass = - (TcxGridCardDataRowViewInfo2, TcxGridCardCaptionRowViewInfo2); -begin - Result := RowViewInfoClasses[ARow.Kind]; -end; - -function TcxGridCardViewInfo2.GetBottomShadowRect: TRect; -begin - Result := ContentBounds; - Inc(Result.Left, ShadowDepth); - Result.Top := Result.Bottom - ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetBottomShadowRestRect: TRect; -begin - Result := ContentBounds; - Result.Right := Result.Left + ShadowDepth; - Result.Top := Result.Bottom - ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetCardRowCaptionBorders(ARowCaption: TcxGridCardRowCaptionViewInfo2): TcxBorders; -begin - Result := [bLeft, bTop]; - if ARowCaption.Row.VisibleIndex = GridView.RowCount - 1 then - Include(Result, bBottom); - - with TcxGridCardView2OptionsView(GridView.OptionsView) do - begin - if not CardBorders then - begin - Exclude(Result, bLeft); - if ARowCaption.Row.VisibleIndex = 0 then - Exclude(Result, bTop); - if ARowCaption.Row.VisibleIndex = Self.GridView.RowCount - 1 then - Exclude(Result, bBottom); - end; - if not (GridLines in [glBoth, glHorizontal]) and (ARowCaption.Row.VisibleIndex > 0) then - Exclude(Result, bTop); - end; -end; - -function TcxGridCardViewInfo2.GetCardRowDataBorders(ARowData: TcxGridCardRowDataViewInfo2): TcxBorders; -begin - Result := [bLeft, bTop, bRight]; - if ARowData.Row.VisibleIndex = GridView.RowCount - 1 then - Include(Result, bBottom); - with TcxGridCardView2OptionsView(GridView.OptionsView) do - begin - if not CardBorders then - begin - Exclude(Result, bRight); - if ARowData.Row.VisibleIndex = 0 then - Exclude(Result, bTop); - if ARowData.Row.VisibleIndex = Self.GridView.RowCount - 1 then - Exclude(Result, bBottom); - end; - if not (GridLines in [glBoth, glHorizontal]) and (ARowData.Row.VisibleIndex > 0) then - Exclude(Result, bTop); - if not (GridLines in [glBoth, glVertical]) then - Exclude(Result, bLeft); - end; -end; - -function TcxGridCardViewInfo2.GetGridLineColor: TColor; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).GridLineColor; - if Result = clDefault then - Result := GridView.LookAndFeelPainter.DefaultGridLineColor; -end; - -function TcxGridCardViewInfo2.GetRightShadowRect: TRect; -begin - Result := ContentBounds; - Result.Left := Result.Right - ShadowDepth; - Inc(Result.Top, ShadowDepth); -end; - -function TcxGridCardViewInfo2.GetRightShadowRestRect: TRect; -begin - Result := ContentBounds; - Result.Left := Result.Right - ShadowDepth; - Result.Bottom := Result.Top + ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetShadowColor: TColor; -var - Params: TcxViewParams; -begin - TcxGridCardView2Styles(GridView.Styles).GetCardShadowParams(GridRecord, Params); - Result := Params.Color; - if Result = clDefault then - Result := clWindowText; -end; - -function TcxGridCardViewInfo2.GetShadowDepth: Integer; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetShadowRestColor: TColor; -var - Params: TcxViewParams; -begin - TcxGridCardView2Styles(GridView.Styles).GetViewParams(vsBackground, nil, nil, Params); - Result := Params.Color; -end; - -function TcxGridCardViewInfo2.GetGridView: TcxGridCardView2; -begin - Result := TcxGridCardView2(inherited GridView); -end; - -{ TcxGridCard2 } - -function TcxGridCard2.GetViewInfoClass: TcxCustomGridRecordViewInfoClass; -begin - Result := TcxGridCardViewInfo2; -end; - -{ TcxGridCardViewViewData2 } - -function TcxGridCardViewViewData2.GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; -begin - Result := TcxGridCard2; -end; - -{ TcxGridCardsHorizontalViewInfo2 } - -function TcxGridCardsHorizontalViewInfo2.GetGridView: TcxGridCardView2; -begin - Result := TcxGridCardView2(inherited GridView); -end; - -function TcxGridCardsHorizontalViewInfo2.CalculateCardHeight: Integer; -begin - Result := inherited CalculateCardHeight + ShadowDepth; -end; - -function TcxGridCardsHorizontalViewInfo2.GetShadowDepth: Integer; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).ShadowDepth; -end; - -{ TcxGridCardsVerticalViewInfo2 } - -function TcxGridCardsVerticalViewInfo2.GetGridView: TcxGridCardView2; -begin - Result := TcxGridCardView2(inherited GridView); -end; - -function TcxGridCardsVerticalViewInfo2.CalculateCardHeight: Integer; -begin - Result := inherited CalculateCardHeight + ShadowDepth; -end; - -function TcxGridCardsVerticalViewInfo2.GetShadowDepth: Integer; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).ShadowDepth; -end; - -{ TcxGridCardViewViewInfo2 } - -function TcxGridCardViewViewInfo2.GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; -const - ViewInfoClasses: array[TcxGridCardViewLayoutDirection] of TcxCustomGridRecordsViewInfoClass = - (TcxGridCardsHorizontalViewInfo2, TcxGridCardsVerticalViewInfo2); -begin - Result := ViewInfoClasses[GridView.LayoutDirection]; -end; - -{ TcxGridCardView2 } - -function TcxGridCardView2.GetOptionsViewClass: TcxCustomGridOptionsViewClass; -begin - Result := TcxGridCardView2OptionsView; -end; - -function TcxGridCardView2.GetStylesClass: TcxCustomGridViewStylesClass; -begin - Result := TcxGridCardView2Styles; -end; - -function TcxGridCardView2.GetViewDataClass: TcxCustomGridViewDataClass; -begin - Result := TcxGridCardViewViewData2; -end; - -function TcxGridCardView2.GetViewInfoClass: TcxCustomGridViewInfoClass; -begin - Result := TcxGridCardViewViewInfo2; -end; - -{ TdxfmGridReportLinkDesignWindow } - -constructor TdxfmGridReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhccxGridReportLinkDesigner; - inherited; - CreateControls; - SetActivePage; -end; - -destructor TdxfmGridReportLinkDesignWindow.Destroy; -begin - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(lbxStyles); - inherited; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoInitialize; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited; - RefreshStylesList; - - CreateCardView; - //CreateChartView; - //tshCharts.TabVisible := False; - - chbxExpandCards.Visible := False; - //chbxTransparentRichEdits.Visible := False; {.3} - //bvlRefinementsSeparator.Top := bvlRefinementsSeparator.Top - 20; - //chbxSuppressBackgroundBitmaps.Top := chbxSuppressBackgroundBitmaps.Top - 20; - //chbxConsumeSelectionStyle.Top := chbxConsumeSelectionStyle.Top - 20; - - if ReportLink.ProcessParams.HasOnlyCards then - PageControl1.ActivePage := tshCards; - - InitializePreviewGrid; - InitializePreviewGridStyles; - LoadDataIntoPreviewGridView(PreviewGrid.Levels[0].GridView as TcxCustomGridTableView); - - with ReportLink.OptionsView do - begin - chbxShowCaptions.Checked := Caption; - chbxShowBands.Checked := BandHeaders; - chbxShowExpandButtons.Checked := ExpandButtons; - chbxShowGroupFooters.Checked := GroupFooters; - chbxShowFilterBar.Checked := FilterBar; - chbxShowFooters.Checked := Footers; - chbxShowHeaders.Checked := Headers; - end; - - with ReportLink.OptionsOnEveryPage do - begin - chbxCaptionsOnEveryPage.Checked := Caption; - chbxBandsOnEveryPage.Checked := BandHeaders; - chbxFilterBarOnEveryPage.Checked := FilterBar; - chbxFootersOnEveryPage.Checked := Footers; - chbxHeadersOnEveryPage.Checked := Headers; - end; - - with cbxLookAndFeel do - begin - Items.Clear; - Items.AddObject(cxGetResourceString(@sdxLookAndFeelFlat), TObject(lfFlat)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelStandard), TObject(lfStandard)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelUltraFlat), TObject(lfUltraFlat)); - - ItemIndex := Items.IndexOfObject(TObject(ReportLink.OptionsFormatting.LookAndFeelKind)); - end; - - with ReportLink.OptionsSelection do - begin - chbxProcessSelection.Checked := ProcessSelection; - chbxProcessExactSelection.Checked := ProcessExactSelection; - end; - - with ReportLink.OptionsExpanding do - begin - chbxExpandGroupRows.Checked := ExpandGroupRows; - chbxExpandMasterRows.Checked := ExpandMasterRows; - end; - - with ReportLink.OptionsRefinements do - begin - chbxTransparentGraphics.Checked := TransparentGraphics; - chbxDisplayGraphicsAsText.Checked := DisplayGraphicsAsText; - chbxFlatCheckMarks.Checked := FlatCheckMarks; - end; - - with ReportLink.OptionsSize do - begin - chbxGridAutoWidth.Checked := AutoWidth; - end; - - with ReportLink.OptionsDetails do - begin - chbxStartFromActiveView.Checked := StartFromFocusedView; - chbxOnlyActiveView.Checked := OnlyFocusedView; - end; - - with ReportLink.OptionsLevels do - begin - chbxLevelsUnwrap.Checked := Unwrap; - chbxLevelsUnwrapTopLevel.Checked := UnwrapTopLevel; - chbxLevelsRiseActiveLevelOntoTop.Checked := RiseActiveLevelOntoTop; - end; - - with ReportLink.OptionsFormatting do - begin - chbxSuppressBackgroundBitmaps.Checked := SuppressBackgroundBitmaps; - chbxConsumeSelectionStyle.Checked := ConsumeSelectionStyle; - chbxUseNativeStyles.Checked := UseNativeStyles; - end; - - with ReportLink.OptionsPagination do - begin - chbxPaginateByTopLevelGroups.Checked := TopLevelGroup; - chbxPaginateOneGroupPerPage.Checked := OneGroupPerPage; - end; - - with ReportLink.OptionsPreview do - begin - chbxPreviewVisible.Checked := Visible; - chbxPreviewAutoHeight.Checked := AutoHeight; - sePreviewMaxLineCount.AsInteger := MaxLineCount; - end; - - with ReportLink.OptionsCards do - begin - chbxCardsAutoWidth.Checked := AutoWidth; - chbxCardsKeepSameWidth.Checked := KeepSameWidth; - chbxCardsKeepSameHeight.Checked := KeepSameHeight; - chbxCardsBorder.Checked := Borders; - chbxCardsHorzLines.Checked := RowBordersHorz; - chbxCardsVertLines.Checked := RowBordersVert; - seCardsSpaceHorz.AsInteger := InterCardsSpaceHorz; - seCardsSpaceVert.AsInteger := InterCardsSpaceVert; - with Shadow do - begin - seCardsShadowDepth.AsInteger := Depth; - ccbxCardsShadowColor.ColorValue := Color; - end; - end; -end; - -{$IFDEF DELPHI7} -function TdxfmGridReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxfmGridReportLinkDesignWindow.LoadStrings; - - procedure AdjustBevelSize(ABevel: TBevel; AControl: TControl); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := AControl.Left + AControl.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - inherited; - - lblPreviewWindow.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - tshView.Caption := cxGetResourceString(@sdxViewTab); - - lblShow.Caption := cxGetResourceString(@sdxShow); - AdjustBevelSize(bvlShow, lblShow); - chbxShowCaptions.Caption := cxGetResourceString(@sdxLevelCaption); - chbxShowBands.Caption := cxGetResourceString(@sdxBands); - chbxShowHeaders.Caption := cxGetResourceString(@sdxHeaders); - chbxShowFooters.Caption := cxGetResourceString(@sdxFooters); - chbxShowGroupFooters.Caption := cxGetResourceString(@sdxGroupFooters); - chbxShowExpandButtons.Caption := cxGetResourceString(@sdxExpandButtons); - chbxShowFilterBar.Caption := cxGetResourceString(@sdxFilterBar); - - lblOnEveryPage.Caption := cxGetResourceString(@sdxOnEveryPage); - AdjustBevelSize(bvlOnEveryPage, lblOnEveryPage); - chbxCaptionsOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxLevelCaption)); - chbxBandsOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxBands)); - chbxHeadersOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxHeaders)); - chbxFootersOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxFooters)); - chbxFilterBarOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxFilterBar)); - - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviorsTab); - - lblSelection.Caption := cxGetResourceString(@sdxSelection); - AdjustBevelSize(bvlSelection, lblSelection); - chbxProcessSelection.Caption := cxGetResourceString(@sdxProcessSelection); - chbxProcessExactSelection.Caption := cxGetResourceString(@sdxProcessExactSelection); - - lblExpanding.Caption := cxGetResourceString(@sdxExpanding); - AdjustBevelSize(bvlExpanding, lblExpanding); - chbxExpandGroupRows.Caption := cxGetResourceString(@sdxGroups); - chbxExpandMasterRows.Caption := cxGetResourceString(@sdxDetails); - chbxExpandCards.Caption := cxGetResourceString(@sdxCardsRows); - - lblGridSize.Caption := cxGetResourceString(@sdxSize); - AdjustBevelSize(bvlGridSize, lblGridSize); - chbxGridAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - - lblDetails.Caption := DropAmpersand(cxGetResourceString(@sdxDetails)); - AdjustBevelSize(bvlDetails, lblDetails); - chbxStartFromActiveView.Caption := cxGetResourceString(@sdxStartFromActiveDetails); - chbxOnlyActiveView.Caption := cxGetResourceString(@sdxOnlyActiveDetails); - - lblLevels.Caption := cxGetResourceString(@sdxLevels); - AdjustBevelSize(bvlLevels, lblLevels); - chbxLevelsUnwrap.Caption := cxGetResourceString(@sdxUnwrap); - chbxLevelsUnwrapTopLevel.Caption := cxGetResourceString(@sdxUnwrapTopLevel); - chbxLevelsRiseActiveLevelOntoTop.Caption := cxGetResourceString(@sdxRiseActiveToTop); - - tshFormatting.Caption := cxGetResourceString(@sdxFormatting); - lblLookAndFeel.Caption := cxGetResourceString(@sdxLookAndFeel); - AdjustBevelSize(bvlLookAndFeel, lblLookAndFeel); - - lblRefinements.Caption := cxGetResourceString(@sdxRefinements); - AdjustBevelSize(bvlRefinements, lblRefinements); - chbxTransparentGraphics.Caption := cxGetResourceString(@sdxTransparentGraphics); - chbxDisplayGraphicsAsText.Caption := DropAmpersand(cxGetResourceString(@sdxDisplayGraphicsAsText)); - chbxFlatCheckMarks.Caption := cxGetResourceString(@sdxFlatCheckMarks); - //chbxTransparentRichEdits.Caption := cxGetResourceString(@sdxTransparentRichEdits); {.3} - - chbxSuppressBackgroundBitmaps.Caption := cxGetResourceString(@sdxSuppressBackgroundBitmaps); - chbxConsumeSelectionStyle.Caption := cxGetResourceString(@sdxConsumeSelectionStyle); - - lblPagination.Caption := cxGetResourceString(@sdxPagination); - AdjustBevelSize(bvlPagination, lblPagination); - chbxPaginateByTopLevelGroups.Caption := cxGetResourceString(@sdxByTopLevelGroups); - chbxPaginateOneGroupPerPage.Caption := cxGetResourceString(@sdxOneGroupPerPage); - - tshStyles.Caption := cxGetResourceString(@sdxStyles); - lblUseNativeStyles.Caption := cxGetResourceString(@sdxUseNativeStyles); - AdjustBevelSize(bvlStyles, lblUseNativeStyles); - btnStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - btnStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - btnStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - btnStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - btnStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - btnStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); - - miStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - miStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - miStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - miStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - miStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - miStylesSelectAll.Caption := cxGetResourceString(@sdxSelectAll); - miStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); - - lblStyleSheets.Caption := cxGetResourceString(@sdxStyleSheets); - AdjustBevelSize(bvlStyleSheets, lblStyleSheets); - btnStyleSheetNew.Caption := cxGetResourceString(@sdxBtnNew); - btnStyleSheetCopy.Caption := cxGetResourceString(@sdxBtnCopy); - btnStyleSheetDelete.Caption := cxGetResourceString(@sdxBtnDelete); - btnStyleSheetRename.Caption := cxGetResourceString(@sdxBtnRename); - - tshPreview.Caption := cxGetResourceString(@sdxPreviewTab); - lblPreviewOptions.Caption := cxGetResourceString(@sdxOptions); - AdjustBevelSize(bvlPreviewOptions, lblPreviewOptions); - chbxPreviewVisible.Caption := cxGetResourceString(@sdxVisible); - chbxPreviewAutoHeight.Caption := cxGetResourceString(@sdxPreviewAutoHeight); - lblPreviewMaxLineCount.Caption := cxGetResourceString(@sdxPreviewMaxLineCount); - - tshCards.Caption := cxGetResourceString(@sdxCardsTab); - lblCardSizes.Caption := cxGetResourceString(@sdxSizes); - AdjustBevelSize(bvlCardSizes, lblCardSizes); - chbxCardsAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - chbxCardsKeepSameWidth.Caption := cxGetResourceString(@sdxKeepSameWidth); - chbxCardsKeepSameHeight.Caption := cxGetResourceString(@sdxKeepSameHeight); - - lblCardSpacing.Caption := cxGetResourceString(@sdxSpacing); - AdjustBevelSize(bvlCardSpacing, lblCardSpacing); - lblCardSpaceHorz.Caption := cxGetResourceString(@sdxHorizontal); - lblCardSpaceVert.Caption := cxGetResourceString(@sdxVertical); - - lblCardFraming.Caption := cxGetResourceString(@sdxFraming); - AdjustBevelSize(bvlCardFraming, lblCardFraming); - chbxCardsBorder.Caption := cxGetResourceString(@sdxBorderLines); - chbxCardsHorzLines.Caption := cxGetResourceString(@sdxHorzLines); - chbxCardsVertLines.Caption := cxGetResourceString(@sdxVertLines); - - lblCardShadow.Caption := cxGetResourceString(@sdxShadow); - AdjustBevelSize(bvlCardShadow, lblCardShadow); - lblCardShadowColor.Caption := cxGetResourceString(@sdxColor); - lblCardShadowDepth.Caption := cxGetResourceString(@sdxDepth); -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdateControlsState; -var - View: TcxCustomGridView; -begin - inherited; - - View := ReportLink.ActiveView; - if View <> nil then - with ReportLink.ProcessParams, dxViewHelpersFactory[View] do - begin - chbxShowBands.Enabled := IsAttributeSupported(TdxGridBandHeader); - chbxShowExpandButtons.Enabled := IsAttributeSupported(TdxGridExpandButton); - chbxShowFooters.Enabled := IsAttributeSupported(TdxGridFooter); - chbxShowGroupFooters.Enabled := IsAttributeSupported(TdxGridGroupFooter); - chbxShowHeaders.Enabled := IsAttributeSupported(TdxGridHeader); - - chbxCaptionsOnEveryPage.Enabled := IsAttributeSupported(TdxGridLevelCaption) and not ReportLink.IsAggregated; - chbxBandsOnEveryPage.Enabled := IsAttributeSupported(TdxGridBandHeader) and not ReportLink.IsAggregated; - chbxHeadersOnEveryPage.Enabled := IsAttributeSupported(TdxGridHeader) and not ReportLink.IsAggregated; - chbxFilterBarOnEveryPage.Enabled := IsAttributeSupported(TdxGridFilterBar) and not ReportLink.IsAggregated; - chbxFootersOnEveryPage.Enabled := IsAttributeSupported(TdxGridFooter) and not ReportLink.IsAggregated; - - chbxExpandGroupRows.Enabled := IsAttributeSupported(TdxGridGroupRow); - chbxExpandMasterRows.Enabled := IsAttributeSupported(TdxGridDetails); - - lblDetails.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - bvlDetails.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - imgDetails.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - chbxStartFromActiveView.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - chbxOnlyActiveView.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - chbxOnlyActiveView.Enabled := chbxStartFromActiveView.Checked; - - lblLevels.Visible := IsDesigning or HasUnwrapableData; - bvlLevels.Visible := IsDesigning or HasUnwrapableData; - imgLevels.Visible := IsDesigning or HasUnwrapableData; - chbxLevelsUnwrap.Visible := IsDesigning or HasUnwrapableData; - chbxLevelsUnwrapTopLevel.Visible := IsDesigning or HasUnwrapableData; - chbxLevelsRiseActiveLevelOntoTop.Visible := IsDesigning or HasUnwrapableData; - - chbxLevelsUnwrapTopLevel.Enabled := chbxLevelsUnwrap.Checked; - chbxLevelsRiseActiveLevelOntoTop.Enabled := chbxLevelsUnwrap.Checked; - - chbxPreviewVisible.Enabled := IsAttributeSupported(TdxGridPreview); - chbxPreviewAutoHeight.Enabled := IsAttributeSupported(TdxGridPreview); - sePreviewMaxLineCount.Enabled := IsAttributeSupported(TdxGridPreview); - - lblPagination.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - bvlPagination.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - imgPagination.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - chbxPaginateByTopLevelGroups.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - chbxPaginateOneGroupPerPage.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - end; - - chbxProcessExactSelection.Enabled := chbxProcessSelection.Checked; - - chbxPaginateOneGroupPerPage.Enabled := chbxPaginateByTopLevelGroups.Checked; - - chbxCardsKeepSameWidth.Enabled := chbxCardsAutoWidth.Checked; - - lbxStyles.Enabled := AreNativeStylesAvailable; - btnStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - btnStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStylesSaveAs.Enabled := CanSaveStyles; - - lblStyleSheets.Enabled := AreNativeStylesAvailable; - cbxStyleSheets.Enabled := AreNativeStylesAvailable; - btnStyleSheetNew.Enabled := CanCreateStyleSheet; - btnStyleSheetCopy.Enabled := CanCopyStyleSheet; - btnStyleSheetDelete.Enabled := CanDeleteStyleSheet; - btnStyleSheetRename.Enabled := CanRenameStyleSheet; - - UpdateWarningPane; -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdatePreview; -const - DetailTabsPositionMap: array[Boolean] of TcxGridDetailTabsPosition = (dtpNone, dtpTop); - GroupFootersMap: array[Boolean] of TcxGridGroupFootersMode = (gfInvisible, gfAlwaysVisible); - FilteringMap: array[Boolean] of TcxGridTableFilterVisible = - (fvNonEmpty, fvAlways); - TransparentsMap: array[Boolean] of TcxImageTransparency = (gtOpaque, gtTransparent); - - - procedure UpdateBandedView; - begin - TcxImageProperties(colVendorLogo.Properties).GraphicTransparency := - TransparentsMap[ReportLink.OptionsRefinements.TransparentGraphics]; - with PreviewBandedView do - begin - Filtering.Visible := FilteringMap[ReportLink.OptionsView.FilterBar]; - OptionsView.BandHeaders := ReportLink.OptionsView.BandHeaders; - OptionsView.Footer := ReportLink.OptionsView.Footers; - OptionsView.GroupFooters := GroupFootersMap[ReportLink.OptionsView.GroupFooters]; - OptionsView.Header := ReportLink.OptionsView.Headers; - Preview.Visible := ReportLink.OptionsPreview.Visible; - ViewChanged; - end; - end; - - procedure UpdateCardView; - begin - TcxImageProperties(rowVendorLogo.Properties).GraphicTransparency := - TransparentsMap[ReportLink.OptionsRefinements.TransparentGraphics]; - PreviewCardView.ViewChanged; - end; - -begin - PreviewGrid.Enabled := False; - - PreviewGrid.LookAndFeel.Kind := ReportLink.OptionsFormatting.LookAndFeelKind; - PreviewGrid.LookAndFeel.NativeStyle := False; - PreviewGrid.Font := ReportLink.Font; - PreviewGrid.RootLevelOptions.DetailTabsPosition := DetailTabsPositionMap[ReportLink.OptionsView.Caption]; - - UpdateBandedView; - UpdateCardView; -end; - -function TdxfmGridReportLinkDesignWindow.GetDesignerTabIndex: Integer; -begin - Result := PageControl1.ActivePage.TabIndex; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetDesignerTabIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > PageControl1.PageCount - 1 then - Value := PageControl1.PageCount - 1; - PageControl1.ActivePage := PageControl1.Pages[Value]; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited; - with cbxStyleSheets do - ItemIndex := Items.IndexOfObject(ActiveStyleSheet); - - if not LockControlsUpdate then - begin - Modified := True; - UpdatePreview; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin - inherited; - if not AnActive then lbxStyles.HideToolTips; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoRefreshStylesList; -var - Styles: TdxGridReportLinkStyles; - List: TList; -begin - Styles := ReportLink.ActiveStyles; - - with lbxStyles.Items do - begin - BeginUpdate; - try - List := TList.Create; - try - SaveSelectedStyles(List); - try - Clear; - AddObject(cxGetResourceString(@sdxBandHeaderStyle), Styles.BandHeader); - AddObject(cxGetResourceString(@sdxCaptionStyle), Styles.Caption); - AddObject(cxGetResourceString(@sdxCardCaptionRowStyle), Styles.CardCaptionRow); - AddObject(cxGetResourceString(@sdxCardRowCaptionStyle), Styles.CardRowCaption); - AddObject(cxGetResourceString(@sdxContentStyle), Styles.Content); - AddObject(cxGetResourceString(@sdxContentEvenStyle), Styles.ContentEven); - AddObject(cxGetResourceString(@sdxContentOddStyle), Styles.ContentOdd); - AddObject(cxGetResourceString(@sdxFilterBarStyle), Styles.FilterBar); - AddObject(cxGetResourceString(@sdxFooterStyle), Styles.Footer); - AddObject(cxGetResourceString(@sdxGroupStyle), Styles.Group); - AddObject(cxGetResourceString(@sdxHeaderStyle), Styles.Header); - AddObject(cxGetResourceString(@sdxPreviewStyle), Styles.Preview); - AddObject(cxGetResourceString(@sdxSelectionStyle), Styles.Selection); - finally - RestoreSelectedStyles(List); - end; - finally - List.Free; - end; - finally - EndUpdate; - end; - end; - InitializePreviewGridStyles; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - inherited; - Modified := True; - UpdatePreviewGridStyles(ACaption, AStyle); -end; - -procedure TdxfmGridReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin - if ARecreate then - RecreateStylesListBox - else - lbxStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - with lbxStyles do - for I := 0 to Items.Count - 1 do - if Selected[I] then - AStrings.AddObject(Items[I], Items.Objects[I]); -end; - -procedure TdxfmGridReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := lbxStyles.Items; -end; - -procedure TdxfmGridReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := cbxStyleSheets.Items; -end; - -function TdxfmGridReportLinkDesignWindow.GetActiveStyle: TcxStyle; -begin - with lbxStyles do - if ItemIndex <> -1 then - Result := TcxStyle(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -function TdxfmGridReportLinkDesignWindow.GetHasSelectedStyles: Boolean; -begin - Result := lbxStyles.SelCount <> 0; -end; - -function TdxfmGridReportLinkDesignWindow.GetHasSelectedStylesWithAssignedBitmap: Boolean; -var - Strings: TStrings; - I: Integer; - cxStyle: TcxStyle; -begin - Result := True; - Strings := TStringList.Create; - try - GetSelectedStyleNames(Strings); - for I := 0 to Strings.Count - 1 do - begin - cxStyle := TcxStyle(Strings.Objects[I]); - if (cxStyle <> nil) and (cxStyle.Bitmap <> nil) and not cxStyle.Bitmap.Empty then - Exit; - end; - finally - Strings.Free; - end; - Result := False; -end; - -function TdxfmGridReportLinkDesignWindow.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardShadowColorChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - if TdxPSColorCombo(Sender).IsAutoColorSelected then - ReportLink.OptionsCards.Shadow.Color := clDefault - else - ReportLink.OptionsCards.Shadow.Color := TdxPSColorCombo(Sender).ColorValue; - TcxGridCardView2Styles(PreviewCardView.Styles).CardShadow.Color := ReportLink.OptionsCards.Shadow.ActualColor; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardShadowDepthChanged(Sender: TObject); -var - NewDepth: Integer; -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsCards.Shadow.Depth := TdxPSSpinEdit(Sender).AsInteger; - - NewDepth := TdxPSSpinEdit(Sender).AsInteger; - if NewDepth > 4 then NewDepth := 4; - TcxGridCardView2OptionsView(PreviewCardView.OptionsView).ShadowDepth := NewDepth; - - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardSpaceHorzChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsCards.InterCardsSpaceHorz := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardSpaceVertChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsCards.InterCardsSpaceVert := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewMaxLineCountChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.MaxLineCount := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -function TdxfmGridReportLinkDesignWindow.CanSelectAllStyles: Boolean; -var - I: Integer; -begin - Result := AreNativeStylesAvailable; - if Result then - begin - for I := 0 to lbxStyles.Items.Count - 1 do - if not lbxStyles.Selected[I] then Exit; - Result := False; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.ChangeActiveView(AView: TcxCustomGridView); -var - OldGridView: TcxCustomGridView; -begin - with PreviewGrid.Levels[0] do - begin - OldGridView := GridView; - GridView := AView; - if OldGridView <> GridView then - LoadDataIntoPreviewGridView(GridView as TcxCustomGridTableView); - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.CreateCardView; - - function CreateRow(APropertiesClass: TcxCustomEditPropertiesClass = nil; - AOnCustomDraw: TcxGridTableDataCellCustomDrawEvent = nil): TcxGridCardViewRow; - begin - Result := PreviewCardView.CreateRow; - Result.PropertiesClass := APropertiesClass; - Result.OnCustomDrawCell := AOnCustomDraw; - end; - -begin - PreviewCardView := PreviewGrid.CreateView(TcxGridCardView2) as TcxGridCardView2; - with PreviewCardView do - begin - LayoutDirection := ldVertical; - TcxGridCardView2Styles(Styles).CardShadow := styleCardShadow; - with TcxGridCardView2OptionsView(OptionsView) do - begin - CardWidth := 135; - CardBorderWidth := 1; - CellAutoHeight := True; - GridLineColor := ReportLink.OptionsFormatting.GridLineColor; - SeparatorWidth := 0; - ScrollBars := ssNone; - ShadowDepth := ReportLink.OptionsCards.Shadow.Depth; - end; - end; - - rowVendorName := CreateRow; - rowVendorLogo := CreateRow(TcxImageProperties, VendorLogoCustomDrawCell); - rowVendorCountry := CreateRow; - rowCarModel := CreateRow; - rowIsSuvModel := CreateRow(TcxCheckBoxProperties, IsSUVModelCustomDrawCell); -end; - -procedure TdxfmGridReportLinkDesignWindow.CreateControls; - - function CreateSpin(AHost: TControl; ALabel: TLabel; ATabOrder: TTabOrder; - AMinValue, AMaxValue, AValue: Integer): TdxPSSpinEdit; - begin - Result := TdxPSSpinEdit.Create(Self); - with Result do - begin - Parent := AHost.Parent; - BoundsRect := AHost.BoundsRect; - TabOrder := ATabOrder; - - MinValue := AMinValue; - MaxValue := AMaxValue; - Value := AValue; - DefaultValue := AValue; - end; - ALabel.FocusControl := Result; - end; - - function CreateColorCombo(AParent: TWinControl; AHost: TControl; ALabel: TLabel; - ATabOrder: TTabOrder; ATag: Integer; AAutoColor: TColor): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(Result) do - begin - BoundsRect := AHost.BoundsRect; - Tag := MakeTTag(ATag); - Parent := AParent; - TabOrder := ATabOrder; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - - procedure CreateWarningPane; - begin - wpIncorrectOnEveryPageState := TdxPSWarningPane.Create(Self); - wpIncorrectOnEveryPageState.Parent := tshView; - wpIncorrectOnEveryPageState.BoundsRect := bvlWarningHost.BoundsRect; - wpIncorrectOnEveryPageState.Font.Name := 'Tahoma'; - wpIncorrectOnEveryPageState.Font.Size := 8; - - bvlWarningHost.Visible := False; - end; - - procedure CreateStylesListBox; - begin - lbxStyles := TdxStylesListBox.Create(Self); - lbxStyles.Parent := tshStyles; - lbxStyles.BoundsRect := bvlStylesHost.BoundsRect; - lbxStyles.PopupMenu := pmStyles; - lbxStyles.TabOrder := chbxUseNativeStyles.TabOrder + 1; - lbxStyles.OnClick := lbxStylesClick; - bvlStylesHost.Visible := False; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(lbxStyles); - end; - -begin - sePreviewMaxLineCount := CreateSpin(bvlPreviewMaxLineCountHost, lblPreviewMaxLineCount, - chbxPreviewAutoHeight.TabOrder + 1, 0, 1000, 0); - sePreviewMaxLineCount.OnChange := PreviewMaxLineCountChanged; - - seCardsSpaceHorz := CreateSpin(bvlCardSpaceHorzHost, lblCardSpaceHorz, - chbxCardsKeepSameHeight.TabOrder + 1, 0, 20, dxDefaultInterCardsSpaceHorz); - seCardsSpaceHorz.OnChange := CardSpaceHorzChanged; - - seCardsSpaceVert := CreateSpin(bvlCardSpaceVertHost, lblCardSpaceVert, - seCardsSpaceHorz.TabOrder + 1, 0, 20, dxDefaultInterCardsSpaceVert); - seCardsSpaceVert.OnChange := CardSpaceVertChanged; - - ccbxCardsShadowColor := CreateColorCombo(tshCards, bvlCardShadowColorHost, lblCardShadowColor, - chbxCardsVertLines.TabOrder + 1, 0, dxDefaultCardsShadowColor); - ccbxCardsShadowColor.OnChange := CardShadowColorChanged; - - seCardsShadowDepth := CreateSpin(bvlCardShadowDepthHost, lblCardShadowDepth, - ccbxCardsShadowColor.TabOrder + 1, Low(TdxGridCardShadowDepth), High(TdxGridCardShadowDepth), - dxDefaultCardsShadowDepth); - seCardsShadowDepth.OnChange := CardShadowDepthChanged; - - CreateStylesListBox; - CreateWarningPane; -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawBorders(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridCellViewInfo); -var - PainterClass: TcxCustomGridCellPainterClass; - Painter: TcxCustomGridCellPainter; -begin - PainterClass := CustomGridCellViewInfo_GetPainterClass(AViewInfo); - Painter := PainterClass.Create(ACanvas, AViewInfo); - try - CustomGridCellPainter_DrawBorders(Painter); - finally - Painter.Free; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawFooter(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxCustomGridCellViewInfo); -begin - case ReportLink.OptionsFormatting.LookAndFeelKind of - lfStandard, - lfFlat: - ACanvas.DrawComplexFrame(R, AViewInfo.Params.TextColor, clBtnHighlight); - lfUltraFlat: - ACanvas.FrameRect(R, AViewInfo.Params.TextColor); - end; - - InflateRect(R, -1, -1); - CustomDrawTextRect(ACanvas, R, AViewInfo, AViewInfo.BackgroundBitmap); -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawHeader(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxCustomGridCellViewInfo); -const - BottomRightColors: array[Boolean] of TColor = (clBtnFace, clBtnShadow); -begin - ACanvas.FrameRect(R, clWindowText); - - if ReportLink.OptionsFormatting.LookAndFeelKind <> lfUltraFlat then - begin - InflateRect(R, -1, -1); - ACanvas.DrawComplexFrame(R, clBtnHighlight, BottomRightColors[ReportLink.OptionsFormatting.LookAndFeelKind = lfStandard]); - end; - - InflateRect(R, -1, -1); - CustomDrawTextRect(ACanvas, R, AViewInfo, AViewInfo.BackgroundBitmap); -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawTextRect(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxCustomGridCellViewInfo; ABackgroundBitmap: TBitmap); -const - AlignmentHorzMap: array[TAlignment] of Integer = (cxAlignLeft, cxAlignRight, cxAlignCenter); - AlignmentVertMap: array[TcxAlignmentVert] of Integer = (cxAlignTop, cxAlignBottom, cxAlignVCenter); -begin - with AViewInfo do - begin - if ABackgroundBitmap = nil then - begin - ACanvas.Brush.Color := Params.Color; - ACanvas.FillRect(R); - end - else - dxBkgnd.DrawPicture(ABackgroundBitmap, ACanvas.Canvas, R, ppmTile, 1, 1, - R.Left - 0, - R.Top - 0); - - InflateRect(R, -2, -1); - if ReportLink.OptionsFormatting.LookAndFeelKind = lfUltraFlat then - InflateRect(R, -1, -1); - if Params.Font <> nil then - ACanvas.Font := Params.Font; - ACanvas.Font.Color := Params.TextColor; - ACanvas.Brush.Style := bsClear; - ACanvas.DrawText(Text, R, AlignmentHorzMap[AlignmentHorz] or AlignmentVertMap[AlignmentVert] or cxSingleLine); - ACanvas.Brush.Style := bsSolid; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.InitializePreviewGrid; - - procedure SetupDataBindings(AView: TcxCustomGridTableView); - - function GetColumnCaption(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxManufacturerNameColumnCaption); - 1: Result := cxGetResourceString(@sdxManufacturerLogoColumnCaption); - 2: Result := cxGetResourceString(@sdxManufacturerCountryColumnCaption); - 3: Result := cxGetResourceString(@sdxCarModelColumnCaption); - else - Result := cxGetResourceString(@sdxCarIsSUVColumnCaption); - end; - end; - - const - ColumnTypes: array[0..4] of TcxValueTypeClass = - (TcxStringValueType, TcxStringValueType, TcxStringValueType, - TcxStringValueType, TcxBooleanValueType); - var - I: Integer; - begin - for I := 0 to AView.ItemCount - 1 do - with AView.Items[I] do - begin - DataBinding.ValueTypeClass := ColumnTypes[I]; - Caption := GetColumnCaption(I); - end; - end; - -begin - if PageControl1.ActivePage = tshCards then - PreviewGrid.Levels[0].GridView := PreviewCardView - else - PreviewGrid.Levels[0].GridView := PreviewBandedView; - - SetupDataBindings(PreviewBandedView); - PreviewGridLevel.Caption := cxGetResourceString(@sdxCarLevelCaption); - - PreviewBandedView.Bands[0].Caption := cxGetResourceString(@sdxManufacturerBandCaption); - PreviewBandedView.Bands[1].Caption := cxGetResourceString(@sdxModelBandCaption); - PreviewBandedView.DataController.Summary.FooterSummaryItems[0].Format := cxGetResourceString(@sdxSummaryFormat); - - SetupDataBindings(PreviewCardView); -// PreviewCardView.Rows[3].Visible := False; -end; - -procedure TdxfmGridReportLinkDesignWindow.InitializePreviewGridStyles; - - procedure ResetEvents(AStyles: TcxGridBandedTableViewStyles); overload; - begin - with AStyles do - begin - OnGetBandHeaderStyle := nil; - OnGetContentStyle := nil; - OnGetFooterStyle := nil; - OnGetGroupStyle := nil; - OnGetHeaderStyle := nil; - OnGetPreviewStyle := nil; - end; - end; - - procedure ResetEvents(AStyles: TcxGridCardViewStyles); overload; - begin - with AStyles do - begin - OnGetCaptionRowStyle := nil; - OnGetCardBorderStyle := nil; - OnGetContentStyle := nil; - OnGetRowCaptionStyle := nil; - end; - end; - -var - Styles: TdxGridReportLinkStyles; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - begin - Styles := ReportLink.ActiveStyles; - - PreviewGrid.RootLevelStyles.Tab := Styles.Caption; - PreviewGrid.RootLevelStyles.TabsBackground := Styles.Caption; - - if PreviewBandedView <> nil then - begin - dxPScxCommon.dxPSResetStyles(PreviewBandedView.Styles); - with PreviewBandedView.Styles do - begin - BandHeader := Styles.BandHeader; - Content := Styles.Content; - ContentEven := Styles.ContentEven; - ContentOdd := Styles.ContentOdd; - FilterBox := Styles.FilterBar; - Footer := Styles.Footer; - Group := Styles.Group; - Header := Styles.Header; - Preview := Styles.Preview; - end; - end; - - if PreviewCardView <> nil then - begin - dxPScxCommon.dxPSResetStyles(PreviewCardView.Styles); - with PreviewCardView.Styles do - begin - CaptionRow := Styles.CardCaptionRow; - CardBorder := StyleCardBorder; - Content := Styles.Content; - ContentEven := Styles.ContentEven; - ContentOdd := Styles.ContentOdd; - RowCaption := Styles.CardRowCaption; - end; - end; - - end - else - begin - if ReportLink.Grid <> nil then - begin - PreviewGrid.RootLevelStyles.Tab := ReportLink.Grid.RootLevelStyles.Tab; - PreviewGrid.RootLevelStyles.TabsBackground := ReportLink.Grid.RootLevelStyles.TabsBackground; - end - else - dxPScxCommon.dxPSResetStyles(PreviewGrid.RootLevelStyles); - - if PreviewBandedView <> nil then - if ReportLink.ActiveView is TcxGridBandedTableView then - PreviewBandedView.Styles := TcxGridBandedTableView(ReportLink.ActiveView).Styles - else - dxPScxCommon.dxPSResetStyles(PreviewBandedView.Styles); - - if PreviewCardView <> nil then - if ReportLink.ActiveView is TcxGridCardView then - PreviewCardView.Styles := TcxGridCardView(ReportLink.ActiveView).Styles - else - dxPScxCommon.dxPSResetStyles(PreviewCardView.Styles); - end; - - PreviewGrid.RootLevelStyles.OnGetTabStyle := nil; - if PreviewBandedView <> nil then - begin - ResetEvents(PreviewBandedView.Styles); - PreviewBandedView.SizeChanged; - end; - if PreviewCardView <> nil then - begin - ResetEvents(PreviewCardView.Styles); - PreviewCardView.SizeChanged; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.LoadDataIntoPreviewGridView(AView: TcxCustomGridTableView); - - procedure AddRecord(ARecordIndex: Integer; const AValues: array of string); - var - I: Integer; - begin - with AView.DataController do - for I := 0 to ItemCount - 1 do - Values[ARecordIndex, I] := AValues[I]; - end; - - function CarVendorName(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxCarManufacturerName1); - 1: Result := cxGetResourceString(@sdxCarManufacturerName2); - 2: Result := cxGetResourceString(@sdxCarManufacturerName3); - else - Result := cxGetResourceString(@sdxCarManufacturerName4); - end; - end; - - function CarVendorCountry(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxCarManufacturerCountry1); - 1: Result := cxGetResourceString(@sdxCarManufacturerCountry2); - 2: Result := cxGetResourceString(@sdxCarManufacturerCountry3); - else - Result := cxGetResourceString(@sdxCarManufacturerCountry4); - end; - end; - - function CarModel(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxCarModel1); - 1: Result := cxGetResourceString(@sdxCarModel2); - 2: Result := cxGetResourceString(@sdxCarModel3); - else - Result := cxGetResourceString(@sdxCarModel4); - end; - end; - -const - RecordCount = 4; - //CarSalesCount: array[0..RecordCount - 1] of Integer = (10, 6, 3, 5); - IsCarSUV: array[0..RecordCount - 1] of string = ('True', 'True', 'False', 'True'); -var - I: Integer; -begin - AView.DataController.RecordCount := RecordCount; - for I := 0 to RecordCount - 1 do - AddRecord(I, [CarVendorName(I), dxPScxCommon.dxPSPreviewCarLogosAsString(I), - CarVendorCountry(I), CarModel(I), IsCarSUV[I]]);//, CarSalesCount[I]]); -end; - -procedure TdxfmGridReportLinkDesignWindow.RecreateStylesListBox; -var - List: TList; -begin - List := TList.Create; - try - SaveSelectedStyles(List); - dxPSUtl.dxRecreateWnd(lbxStyles); - RestoreSelectedStyles(List); - finally - List.Free; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.RestoreSelectedStyles(AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - lbxStyles.Selected[Integer(AList[I])] := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SaveSelectedStyles(AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to lbxStyles.Items.Count - 1 do - if lbxStyles.Selected[I] then AList.Add(TObject(I)); -end; - -procedure TdxfmGridReportLinkDesignWindow.SetActivePage; -begin - PageControl1.ActivePage := PageControl1.Pages[DesignerTabIndex]; -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdatePreviewGridStyles(const ACaption: string; - AStyle: TcxStyle); -begin - with PreviewGrid.RootLevelStyles do - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxCaptionStyle)) then - begin - Tab := AStyle; - TabsBackground := AStyle; - end; - - with PreviewBandedView.Styles do - begin - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxBandHeaderStyle)) then - BandHeader := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentStyle)) then - Content := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentEvenStyle)) then - ContentEven := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentOddStyle)) then - ContentOdd := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxFooterStyle)) then - Footer := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxGroupStyle)) then - Group := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxHeaderStyle)) then - Header := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxPreviewStyle)) then - Preview := AStyle; - end; - - with PreviewCardView.Styles do - begin - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxCardCaptionRowStyle)) then - CaptionRow := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxCardRowCaptionStyle)) then - RowCaption := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentStyle)) then - Content := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentEvenStyle)) then - ContentEven := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentOddStyle)) then - ContentOdd := AStyle - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdateWarningPane; -begin - with ReportLink.HostInfoServices do - wpIncorrectOnEveryPageState.SetStateAndHint(IsInconsistentState, InconsistentStateText); -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsCardsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsCards do - case Index of - 0: AutoWidth := Value; - 1: KeepSameWidth := Value; - 2: KeepSameHeight := Value; - 3: Borders := Value; - 4: RowBordersHorz := Value; - 5: RowBordersVert := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsDetailsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsDetails do - case Index of - 0: StartFromFocusedView := Value; - 1: OnlyFocusedView := Value; - end; - ReportLink.CalculateProcessParams; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsExpandingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsExpanding do - case Index of - 0: ExpandGroupRows := Value; - 1: ExpandMasterRows := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsFormattingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsFormatting do - case Index of - 0: - begin - UseNativeStyles := Value; - InitializePreviewGridStyles; - RecreateStylesListBox; - end; - 1: SuppressBackgroundBitmaps := Value; - 2: ConsumeSelectionStyle := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsLevelsByIndex(Index: Integer; Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsLevels do - case Index of - 0: Unwrap := Value; - 1: UnwrapTopLevel := Value; - 2: RiseActiveLevelOntoTop := Value; - end; - ReportLink.CalculateProcessParams; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsOnEveryPageByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsOnEveryPage do - case Index of - 0: Caption := Value; - 1: BandHeaders := Value; - 2: Headers := Value; - 3: Footers := Value; - 4: FilterBar := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsPaginationByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsPagination do - case Index of - 0: TopLevelGroup := Value; - 1: OneGroupPerPage := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsRefinementsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsRefinements do - case Index of - 0: TransparentGraphics := Value; - 1: DisplayGraphicsAsText := Value; - 2: FlatCheckMarks := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsSelectionByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsSelection do - case Index of - 0: ProcessSelection := Value; - 1: ProcessExactSelection := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsSizeByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsSize do - case Index of - 0: AutoWidth := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsViewByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsView do - case Index of - 0: Caption := Value; - 1: BandHeaders := Value; - 2: Headers := Value; - 3: Footers := Value; - 4: GroupFooters := Value; - 5: ExpandButtons := Value; - 6: FilterBar := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsViewClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsViewByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsOnEveryPageClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsOnEveryPageByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsSelectionClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSelectionByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsExpandingClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsExpandingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsRefinementClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsRefinementsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsFormatingClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsFormattingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.lblUseNativeStylesClick(Sender: TObject); -begin - if chbxUseNativeStyles.CanFocus then ActiveControl := chbxUseNativeStyles; - chbxUseNativeStyles.Checked := not chbxUseNativeStyles.Checked; -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsPaginationClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsPaginationByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsSizeClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSizeByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsDetailsClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsDetailsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsLevelsClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsLevelsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.LookAndFeelClick(Sender: TObject); -begin - with TComboBox(Sender) do - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreviewWindow.Parent := TPageControl(Sender).ActivePage; - if not ReportLink.ProcessParams.HasOnlyCards then - if PageControl1.ActivePage = tshCards then - ChangeActiveView(PreviewCardView) - else - if PageControl1.ActivePage = tshStyles then - if ReportLink.IsCardViewStyle(ActiveStyle) then - ChangeActiveView(PreviewCardView) - else - ChangeActiveView(PreviewBandedView) - else - ChangeActiveView(PreviewBandedView); -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewVisibleClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.Visible := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewAutoHeightClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.AutoHeight := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsCardsClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsCardsByIndex(TTagToInt(Tag), Checked); - with TcxGridCardView2OptionsView(PreviewCardView.OptionsView), ReportLink.OptionsCards do - begin - CardBorders := Borders; - GridLines := dxPScxCommon.dxPSMakecxGridLines(RowBordersHorz, RowBordersVert); - end; - //UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.pmStylesPopup(Sender: TObject); -begin - lbxStyles.HideToolTips; - miStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - miStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStylesSelectAll.Enabled := CanSelectAllStyles; - miStylesSaveAs.Enabled := CanSaveStyles; -end; - -procedure TdxfmGridReportLinkDesignWindow.lbxStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - if not ReportLink.ProcessParams.HasOnlyCards then - if ReportLink.IsCardViewStyle(ActiveStyle) then - ChangeActiveView(PreviewCardView) - else - ChangeActiveView(PreviewBandedView); - UpdateControlsState; -end; - -procedure TdxfmGridReportLinkDesignWindow.IsSUVModelCustomDrawCell( - Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); - - procedure DrawBackground(const R: TRect); - - function GetParams: TcxViewParams; - begin - if AViewInfo is TcxGridCardRowDataViewInfo then - PreviewCardView.Styles.GetContentParams(AViewInfo.GridRecord, AViewInfo.Item, Result) - else - PreviewBandedView.Styles.GetContentParams(AViewInfo.GridRecord, AViewInfo.Item, Result); - end; - - var - BackgroundBitmap: TBitmap; - PrevColor: TColor; - begin - BackgroundBitmap := CustomGridView_GetBackgroundBitmaps(AViewInfo.GridRecord.GridView).GetBitmap(bbContent); - if BackgroundBitmap = nil then - begin - PrevColor := ACanvas.Brush.Color; - ACanvas.Brush.Color := GetParams.Color; - ACanvas.FillRect(R); - ACanvas.Brush.Color := PrevColor; - end - else - dxBkgnd.DrawPicture(BackgroundBitmap, ACanvas.Canvas, R, ppmTile, 1, 1, -R.Left, -R.Top); - end; - - procedure DrawCheck(R: TRect); - const - Painters: array[Boolean] of TcxCustomLookAndFeelPainterClass = - (TcxStandardLookAndFeelPainter, TcxUltraFlatLookAndFeelPainter); - CheckStateMap: array[Boolean] of TcxCheckBoxState = (cbsChecked, cbsUnchecked); - var - X, Y: Integer; - CheckState: Variant; - begin - with R do - begin - X := Left + (Right - Left - dxPSGlbl.CheckWidth) div 2; - Y := Top + (Bottom - Top - dxPSGlbl.CheckHeight) div 2; - end; - R := MakeBounds(X, Y, dxPSGlbl.CheckWidth, dxPSGlbl.CheckHeight); - - CheckState := CheckStateMap[AViewInfo.RecordViewInfo.GridRecord.RecordIndex = 2]; - with Painters[ReportLink.OptionsRefinements.FlatCheckMarks] do - DrawCheckButton(ACanvas, R, cxbsDefault, CheckState = cbsChecked); - end; - -var - R: TRect; -begin - if (Sender is TcxGridTableView) or (AViewInfo is TcxGridCardRowDataViewInfo) then - begin - R := AViewInfo.Bounds; - DrawBackground(R); - DrawCheck(R); - - CustomDrawBorders(ACanvas, AViewInfo); - ADone := True; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.VendorLogoCustomDrawCell( - Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); -var - PrevText: string; -begin - if ReportLink.OptionsRefinements.DisplayGraphicsAsText and - ((Sender is TcxGridTableView) or (AViewInfo is TcxGridCardRowDataViewInfo)) then - begin - PrevText := AViewInfo.Text; - AViewInfo.Text := ReportLink.OptionsRefinements.GraphicsText; - AViewInfo.AlignmentVert := vaTop; - //AViewInfo.Transparent := True; - CustomDrawTextRect(ACanvas, AViewInfo.Bounds, AViewInfo, AViewInfo.RecordViewInfo.BackgroundBitmap); - AViewInfo.Text := PrevText; - CustomDrawBorders(ACanvas, AViewInfo); - ADone := True; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewBandedViewCustomDrawColumnHeader( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); -var - R: TRect; -begin - R := AViewInfo.Bounds; - Dec(R.Left); - if not ((PreviewGrid.LookAndFeel.Kind = lfUltraFlat) and - not TcxGridBandedTableOptionsView(Sender.OptionsView).BandHeaders) then - Dec(R.Top); - CustomDrawHeader(ACanvas, R, AViewInfo); - - ADone := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewBandedViewCustomDrawBandHeader( - Sender: TcxGridBandedTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridBandHeaderViewInfo; var ADone: Boolean); -var - R: TRect; -begin - R := AViewInfo.Bounds; - Dec(R.Left); - CustomDrawHeader(ACanvas, R, AViewInfo); - - ADone := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewBandedViewCustomDrawFooterCell( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); -begin - CustomDrawFooter(ACanvas, AViewInfo.Bounds, AViewInfo); - ADone := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleColorClick(Sender: TObject); -begin - PerformStylesChangeColor; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleFontClick(Sender: TObject); -begin - PerformStylesChangeFont; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleBackgroundBitmapClick(Sender: TObject); -begin - PerformStylesChangeBitmap; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleBackgroundBitmapClearClick(Sender: TObject); -begin - PerformStylesClearBitmap; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleRestoreDefaultsClick(Sender: TObject); -begin - PerformStylesRestoreDefaults; -end; - -procedure TdxfmGridReportLinkDesignWindow.miStylesSelectAllClick(Sender: TObject); -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - with lbxStyles do - begin - {$IFDEF DELPHI6} - SelectAll; - {$ELSE} - Items.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - Selected[I] := True; - finally - Items.EndUpdate; - end; - {$ENDIF} - end; - UpdateControlsState; -end; - -procedure TdxfmGridReportLinkDesignWindow.cbxStyleSheetsClick(Sender: TObject); -begin - with TComboBox(Sender) do - ActiveStyleSheet := TcxCustomStyleSheet(Items.Objects[ItemIndex]); -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetNewClick(Sender: TObject); -begin - PerformStyleSheetNew; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetCopyClick(Sender: TObject); -begin - PerformStyleSheetCopy; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetDeleteClick(Sender: TObject); -begin - PerformStyleSheetDelete; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetRenameClick(Sender: TObject); -begin - PerformStyleSheetRename; -end; - -procedure TdxfmGridReportLinkDesignWindow.StylesSaveAsClick(Sender: TObject); -begin - PerformStylesSaveAsStyleSheet; -end; - -procedure TdxfmGridReportLinkDesignWindow.cbxStyleSheetsKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - PerformStyleSheetKeyDown(Sender, Key, Shift); -end; - -procedure TdxfmGridReportLinkDesignWindow.cbxStyleSheetsDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -begin - PerformStyleSheetDrawItem(TComboBox(Control).Canvas, Index, Rect, State, Control.Enabled); -end; - -procedure RegisterAssistants; -begin - TdxCustomGridViewBuilder.Register; - TdxCustomGridTableViewBuilder.Register; - TdxGridTableViewBuilder.Register; - TdxGridDBTableViewBuilder.Register; - TdxGridBandedTableViewBuilder.Register; - TdxGridDBBandedTableViewBuilder.Register; - TdxGridCardViewBuilder.Register; - TdxGridDBCardViewBuilder.Register; - - TdxCustomGridViewHelper.Register; - TdxCustomGridTableViewHelper.Register; - TdxGridCardViewHelper.Register; - TdxGridTableViewHelper.Register; - TdxGridBandedTableViewHelper.Register; - - TdxCustomGridRecordHelper.Register; - TdxCustomGridRowHelper.Register; - TdxGridDataRowHelper.Register; - TdxGridGroupRowHelper.Register; - TdxGridMasterDataRowHelper.Register; - - TdxGridReportLinkStyleSheet.Register; -end; - -procedure RegisterItems; -begin - TdxReportCard.Register; - TdxReportCardRow.Register; -end; - -procedure UnregisterAssistants; -begin - TdxGridReportLinkStyleSheet.Unregister; - - TdxGridViewBuildersFactory.ReleaseInstance; - TdxViewHelpersFactory.ReleaseInstance; - TdxRecordHelpersFactory.ReleaseInstance; -end; - -procedure UnregisterItems; -begin - TdxReportCardRow.Unregister; - TdxReportCard.Unregister; -end; - -initialization - RegisterAssistants; - RegisterItems; - - dxPSRegisterReportLink(TdxGridReportLink, TcxGrid, TdxfmGridReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxGridReportLink, TcxGrid, TdxfmGridReportLinkDesignWindow); - - UnregisterItems; - UnregisterAssistants; - - FreeAndNil(FGridLinkStyleSheetPrototype); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4LnkPredefinedStyleSheets.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4LnkPredefinedStyleSheets.dfm deleted file mode 100644 index aa92920a..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4LnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,352 +0,0 @@ -object dxdmPScxGridLnkPredefinedStyles: TdxdmPScxGridLnkPredefinedStyles - OldCreateOrder = False - Left = 352 - Top = 156 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 37 - Top = 12 - object styleProfessionalFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3355443 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6582120 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalCaptionRow: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14541789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGreenFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGreenFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12778719 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14154698 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenSelected: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4949549 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11328403 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentBandHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsItalic] - TextColor = clBlack - end - object styleTransparentLevelCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFilterBar: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentCaptionRow: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13816275 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TdxGridReportLinkStyleSheet - Caption = 'Professional' - Styles.BandHeader = styleProfessionalFixed - Styles.Caption = styleProfessionalFixed - Styles.CardCaptionRow = styleProfessionalCaptionRow - Styles.CardRowCaption = styleProfessionalRowCaption - Styles.Content = styleNoneContent - Styles.ContentEven = styleProfessionalContentEven - Styles.ContentOdd = styleProfessionalContentOdd - Styles.FilterBar = styleProfessionalFixed - Styles.Footer = styleProfessionalFixed - Styles.Group = styleProfessionalGroup - Styles.Header = styleProfessionalFixed - Styles.Preview = styleProfessionalPreview - Styles.Selection = styleProfessionalSelection - BuiltIn = True - end - object ssGreen: TdxGridReportLinkStyleSheet - Caption = 'Green' - Styles.BandHeader = styleGreenFixed - Styles.Caption = styleGreenFixed - Styles.CardCaptionRow = styleGreenFixed - Styles.CardRowCaption = styleGreenFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleGreenLightContent - Styles.ContentOdd = styleNoneContent - Styles.FilterBar = styleGreenFixed - Styles.Footer = styleGreenFixed - Styles.Group = styleGreenGroup - Styles.Header = styleGreenFixed - Styles.Preview = styleGreenLightPreview - Styles.Selection = styleGreenSelected - BuiltIn = True - end - object ssTransparent: TdxGridReportLinkStyleSheet - Caption = 'Transparent' - Styles.BandHeader = styleTransparentBandHeader - Styles.Caption = styleTransparentLevelCaption - Styles.CardCaptionRow = styleTransparentCaptionRow - Styles.CardRowCaption = styleTransparentRowCaption - Styles.Content = styleTransparentContent - Styles.ContentEven = styleTransparentContentEven - Styles.ContentOdd = styleTransparentContentOdd - Styles.FilterBar = styleTransparentFilterBar - Styles.Footer = styleTransparentFooter - Styles.Group = styleTransparentGroup - Styles.Header = styleTransparentHeader - Styles.Preview = styleTransparentPreview - Styles.Selection = styleTransparentSelection - BuiltIn = True - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4LnkPredefinedStyleSheets.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4LnkPredefinedStyleSheets.pas deleted file mode 100644 index ae88161d..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4LnkPredefinedStyleSheets.pas +++ /dev/null @@ -1,143 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxGrid4LnkPredefinedStyleSheets; - -interface - -{$I cxVer.inc} - -uses - Classes, {$IFNDEF DELPHI6} Forms, {$ENDIF} cxClasses, cxStyles, dxPScxGrid4Lnk, - dxPScxCommon; - -type - TdxdmPScxGridLnkPredefinedStyles = class(TDataModule) - StyleRepository: TcxStyleRepository; - styleGreenFixed: TcxStyle; - styleGreenLightContent: TcxStyle; - styleProfessionalFixed: TcxStyle; - styleGreenLightPreview: TcxStyle; - ssGreen: TdxGridReportLinkStyleSheet; - ssProfessional: TdxGridReportLinkStyleSheet; - styleGreenFooter: TcxStyle; - styleNoneContent: TcxStyle; - styleNoneFixed: TcxStyle; - styleProfessionalGroup: TcxStyle; - styleProfessionalContentOdd: TcxStyle; - styleProfessionalContentEven: TcxStyle; - styleProfessionalSelection: TcxStyle; - styleProfessionalPreview: TcxStyle; - styleGreenSelected: TcxStyle; - styleGreenGroup: TcxStyle; - styleProfessionalRowCaption: TcxStyle; - styleProfessionalCaptionRow: TcxStyle; - ssTransparent: TdxGridReportLinkStyleSheet; - styleTransparentContent: TcxStyle; - styleTransparentBandHeader: TcxStyle; - styleTransparentHeader: TcxStyle; - styleTransparentFooter: TcxStyle; - styleTransparentGroup: TcxStyle; - styleTransparentPreview: TcxStyle; - styleTransparentLevelCaption: TcxStyle; - styleTransparentFilterBar: TcxStyle; - styleTransparentCaptionRow: TcxStyle; - styleTransparentRowCaption: TcxStyle; - styleTransparentContentEven: TcxStyle; - styleTransparentContentOdd: TcxStyle; - styleTransparentSelection: TcxStyle; - end; - -implementation - -{$R *.dfm} - -uses - cxStyleSheetsLoad; - -type - TdxPScxGridLnkPredefinedStyleSheets = class(TcxPredefinedStyleSheets) - private - FDataModule: TdxdmPScxGridLnkPredefinedStyles; - protected - procedure AddStyleSheets; override; - property DataModule: TdxdmPScxGridLnkPredefinedStyles read FDataModule; - public - constructor Create; override; - destructor Destroy; override; - - class procedure Register; - class procedure Unregister; - end; - -constructor TdxPScxGridLnkPredefinedStyleSheets.Create; -begin - inherited; - FDataModule := TdxdmPScxGridLnkPredefinedStyles.Create(nil); - AddStyleSheets; -end; - -destructor TdxPScxGridLnkPredefinedStyleSheets.Destroy; -begin - FDataModule.Free; - inherited; -end; - -class procedure TdxPScxGridLnkPredefinedStyleSheets.Register; -begin - cxStyleSheetsLoad.RegisterPredefinedStyleSheets(Self); -end; - -class procedure TdxPScxGridLnkPredefinedStyleSheets.Unregister; -begin - cxStyleSheetsLoad.UnregisterPredefinedStyleSheets(Self); -end; - -procedure TdxPScxGridLnkPredefinedStyleSheets.AddStyleSheets; -var - I: Integer; -begin - with DataModule.StyleRepository do - for I := 0 to StyleSheetCount - 1 do - AddStyleSheet(StyleSheets[I]); -end; - -initialization - TdxPScxGridLnkPredefinedStyleSheets.Register; - -finalization - TdxPScxGridLnkPredefinedStyleSheets.Unregister; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4LnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4LnkReg.pas deleted file mode 100644 index fe297e46..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid4LnkReg.pas +++ /dev/null @@ -1,376 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxGrid4LnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - SysUtils, Classes, Controls, cxCustomData, cxDataStorage, cxStyles, cxGrid, - cxGridLevel, cxGridCustomView, cxGridCustomTableView, cxGridCardView, - cxGridTableView, cxGridBandedTableView, cxStyleSheetEditor, dxPScxGrid4Lnk; - -type - TdxGridReportLinkStyleSheetEditorPreview = class(TcxStyleSheetEditorPreview) - private - FGrid: TcxGrid; - function GetBandedTableView: TcxGridBandedTableView; - function GetCardView: TcxGridCardView; - protected - function AddItem(AView: TcxCustomGridTableView; const ACaption: string; - AValueTypeClass: TcxValueTypeClass): TcxCustomGridTableItem; - procedure AddItems(AView: TcxCustomGridTableView); - procedure CreateBandedTableView; - procedure CreateCardView; - procedure Initialize; virtual; - - property BandedTableView: TcxGridBandedTableView read GetBandedTableView; - property CardView: TcxGridCardView read GetCardView; - property Grid: TcxGrid read FGrid; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - class function GetStyleSheetClass: TcxCustomStyleSheetClass; override; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); override; - - function Control: TWinControl; override; - - class procedure Register; - class procedure Unregister; - end; - -{ TdxGridReportLinkStyleSheetEditorPreview } - -constructor TdxGridReportLinkStyleSheetEditorPreview.Create(AOwner: TComponent); -begin -// inherited; cannot call ancestor method if it's an abstract method in Delphi4(5) !!!! - FGrid := TcxGrid.Create(AOwner); - Initialize; -end; - -destructor TdxGridReportLinkStyleSheetEditorPreview.Destroy; -begin - FGrid.Free; - inherited; -end; - -class function TdxGridReportLinkStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := TdxGridReportLinkStyleSheet; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); -begin - if AStyleSheet is TdxGridReportLinkStyleSheet then - with TdxGridReportLinkStyleSheet(AStyleSheet).Styles do - begin - BandedTableView.Styles.BandHeader := BandHeader; - BandedTableView.Styles.Content := Content; - BandedTableView.Styles.ContentEven := ContentEven; - BandedTableView.Styles.ContentOdd := ContentOdd; - BandedTableView.Styles.FilterBox := FilterBar; - BandedTableView.Styles.Footer := Footer; - BandedTableView.Styles.Group := Group; - BandedTableView.Styles.Header := Header; - BandedTableView.Styles.Indicator := Header; - BandedTableView.Styles.Preview := Preview; - - CardView.Styles.CaptionRow := CardCaptionRow; - CardView.Styles.Content := Content; - CardView.Styles.ContentEven := ContentEven; - CardView.Styles.ContentOdd := ContentOdd; - CardView.Styles.RowCaption := CardRowCaption; - - Grid.RootLevelStyles.Tab := Caption; - Grid.RootLevelStyles.TabsBackground := Caption; - end - else - begin - BandedTableView.Styles.ResetStyles; - CardView.Styles.ResetStyles; - Grid.RootLevelStyles.ResetStyles; - end; -end; - -function TdxGridReportLinkStyleSheetEditorPreview.Control: TWinControl; -begin - Result := Grid; -end; - -class procedure TdxGridReportLinkStyleSheetEditorPreview.Register; -begin - cxStyleSheetEditor.RegisterStyleSheetEditorPreview(Self); -end; - -class procedure TdxGridReportLinkStyleSheetEditorPreview.Unregister; -begin - cxStyleSheetEditor.UnregisterStyleSheetEditorPreview(Self); -end; - -function TdxGridReportLinkStyleSheetEditorPreview.AddItem(AView: TcxCustomGridTableView; - const ACaption: string; AValueTypeClass: TcxValueTypeClass): TcxCustomGridTableItem; -begin - Result := AView.CreateItem; - with Result do - begin - Caption := ACaption; - DataBinding.ValueTypeClass := AValueTypeClass; - end; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.AddItems(AView: TcxCustomGridTableView); -begin - AddItem(AView, 'Text', TcxStringValueType); - AddItem(AView, 'Currency', TcxCurrencyValueType); - AddItem(AView, 'Date', TcxDateTimeValueType); -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.CreateBandedTableView; - - procedure AddBands; - begin - BandedTableView.Bands.Add.Caption := 'Band'; - end; - - procedure AddGroups; - begin - BandedTableView.Columns[2].GroupIndex := 0; - end; - - procedure AddPreview; - begin - with BandedTableView.Preview do - begin - Column := AddItem(BandedTableView, '', TcxStringValueType) as TcxGridColumn; - Column.Visible := False; - Visible := True; - end; - end; - - procedure AddRecords; - const - ARecordCount: Integer = 3; - var - I: Integer; - begin - with BandedTableView.DataController as TcxGridDataController do - begin - BeginUpdate; - try - RecordCount := ARecordCount; - for I := 0 to ARecordCount - 1 do - begin - Values[I, 0] := 'ABC'; - Values[I, 1] := (I + 1) * 100; - Values[I, 2] := Date - I; - Values[I, 3] := 'Check the preview style'; - end; - finally - EndUpdate; - end; - end; - end; - - procedure AddSummaries; - begin - with BandedTableView do - begin - DataController.Groups.FullExpand; - with DataController.Summary.FooterSummaryItems.Add do - begin - Kind := skSum; - ItemLink := Columns[1]; - end; - end; - end; - - procedure InitializeOptions; - begin - with BandedTableView do - begin - Filtering.CustomizeDialog := False; - - OptionsBehavior.IncSearch := True; - - OptionsData.Deleting := False; - OptionsData.Editing := False; - OptionsData.Appending := False; - OptionsData.Inserting := False; - - OptionsView.BandHeaders := True; - OptionsView.ColumnAutoWidth := True; - OptionsView.Footer := True; - OptionsView.Indicator := True; - end; - end; - - procedure PlaceColumns; - var - I: Integer; - begin - with BandedTableView do - for I := 0 to ItemCount - 1 do - Columns[I].Position.BandIndex := 0; - end; - -begin - Grid.Levels.Add.GridView := Grid.CreateView(TcxGridBandedTableView); - TcxGridLevel(BandedTableView.Level).Caption := 'Table'; - - AddBands; - AddItems(BandedTableView); - AddGroups; - AddPreview; - AddRecords; - AddSummaries; - InitializeOptions; - PlaceColumns; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.CreateCardView; - - procedure AddRecords; - const - ARecordCount: Integer = 3; - var - I: Integer; - begin - with CardView.DataController as TcxGridDataController do - begin - BeginUpdate; - try - RecordCount := ARecordCount; - for I := 0 to ARecordCount - 1 do - begin - Values[I, 1] := 'ABC'; - Values[I, 2] := (I + 1) * 100; - Values[I, 3] := Date - I; - end; - finally - EndUpdate; - end; - end; - end; - - procedure AddCaptionRow; - begin - with CardView.CreateRow do - begin - Caption := 'Caption'; - Index := 0; - Kind := rkCaption; - end; - end; - - procedure InitializeOptions; - begin - with CardView do - begin - OptionsBehavior.IncSearch := True; - - OptionsData.Deleting := False; - OptionsData.Editing := False; - OptionsData.Appending := False; - OptionsData.Inserting := False; - end; - end; - -begin - Grid.Levels.Add.GridView := Grid.CreateView(TcxGridCardView); - TcxGridLevel(CardView.Level).Caption := 'Cards'; - - AddItems(CardView); - AddCaptionRow; - AddRecords; - InitializeOptions; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.Initialize; -begin - CreateBandedTableView; - CreateCardView; - - Grid.RootLevelOptions.DetailTabsPosition := dtpTop; -end; - -function TdxGridReportLinkStyleSheetEditorPreview.GetBandedTableView: TcxGridBandedTableView; -begin - Result := Grid.Levels[0].GridView as TcxGridBandedTableView; -end; - -function TdxGridReportLinkStyleSheetEditorPreview.GetCardView: TcxGridCardView; -begin - Result := Grid.Levels[1].GridView as TcxGridCardView; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TdxGridReportLink, TdxGridReportLinkStyleSheet]); -end; - -procedure RegisterStyleSheetAssistants; -begin - cxStyles.RegisterStyleSheetClass(TdxGridReportLinkStyleSheet); - TdxGridReportLinkStyleSheetEditorPreview.Register; -end; - -procedure UnregisterStyleSheetAssistants; -begin - TdxGridReportLinkStyleSheetEditorPreview.Unregister; - cxStyles.UnregisterStyleSheetClass(TdxGridReportLinkStyleSheet); -end; - -initialization - RegisterStyleSheetAssistants; - -finalization - UnregisterStyleSheetAssistants; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6Lnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6Lnk.dfm deleted file mode 100644 index b27d54ec..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6Lnk.dfm +++ /dev/null @@ -1,1961 +0,0 @@ -object dxfmGridReportLinkDesignWindow: TdxfmGridReportLinkDesignWindow - Left = 438 - Top = 133 - BorderStyle = bsDialog - Caption = 'fmdxGridDesignWindow' - ClientHeight = 450 - ClientWidth = 648 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 5 - Top = 5 - Width = 639 - Height = 405 - ActivePage = tshBehaviors - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 9 - Top = 37 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 12 - Width = 266 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 164 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object imgOnEveryPage: TImage - Left = 9 - Top = 189 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlOnEveryPage: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object bvlWarningHost: TBevel - Left = 4 - Top = 289 - Width = 313 - Height = 76 - Visible = False - end - object chbxShowBands: TCheckBox - Tag = 1 - Left = 90 - Top = 42 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 1 - OnClick = OptionsViewClick - end - object chbxShowHeaders: TCheckBox - Tag = 2 - Left = 90 - Top = 63 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowFooters: TCheckBox - Tag = 3 - Left = 90 - Top = 84 - Width = 200 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 3 - OnClick = OptionsViewClick - end - object chbxShowGroupFooters: TCheckBox - Tag = 4 - Left = 90 - Top = 104 - Width = 200 - Height = 17 - Caption = 'G&roup Footers' - TabOrder = 4 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 5 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 5 - OnClick = OptionsViewClick - end - object chbxBandsOnEveryPage: TCheckBox - Tag = 1 - Left = 90 - Top = 202 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 8 - OnClick = OptionsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Tag = 2 - Left = 90 - Top = 223 - Width = 200 - Height = 17 - Caption = 'Headers' - TabOrder = 9 - OnClick = OptionsOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Tag = 3 - Left = 90 - Top = 245 - Width = 200 - Height = 17 - Caption = 'Footers' - TabOrder = 10 - OnClick = OptionsOnEveryPageClick - end - object chbxFilterBarOnEveryPage: TCheckBox - Tag = 4 - Left = 90 - Top = 266 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 11 - OnClick = OptionsOnEveryPageClick - end - object chbxCaptionsOnEveryPage: TCheckBox - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 7 - OnClick = OptionsOnEveryPageClick - end - object chbxShowCaptions: TCheckBox - Left = 90 - Top = 22 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowFilterBar: TCheckBox - Tag = 6 - Left = 90 - Top = 146 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 6 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 323 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 12 - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblSelection: TLabel - Left = 5 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object imgSelection: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlSelection: TBevel - Left = 56 - Top = 12 - Width = 255 - Height = 4 - Shape = bsBottomLine - end - object lblExpanding: TLabel - Left = 5 - Top = 67 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 9 - Top = 88 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 72 - Width = 248 - Height = 4 - Shape = bsBottomLine - end - object lblDetails: TLabel - Left = 5 - Top = 204 - Width = 32 - Height = 13 - Caption = 'Details' - end - object bvlDetails: TBevel - Left = 47 - Top = 209 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object imgDetails: TImage - Left = 9 - Top = 225 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0889999999999999999999907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897F78FF7FF77777788F907DDDDDDDDDDDD0FF777FFFF7FFF7777FFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF77777777F - F07DD0889777777777777777777907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F777F7FF7777888FF907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCCCCCDD0FF7777FFF7FF7777777FF - F07DD0889777777777777777777907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F788F7FF77778FFFF907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF777777777 - F07DD0889777777777777777777907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0777777777777777777777 - 707DD08897F888F7FF7777788FF907DDCCCCCCCCDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0FF77777FF7FF7777777FF - F07DD0889000000000000000000907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897888880F8888888888907DDDDDDDDDDDD0777777777777777777777 - 707DD08897F77780F8777777778907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFF80FFFFFFFFFFF907DDDDDDDDDDDD0FF7777FFF7FF7777777FF - F07DD0889000000000000000000907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0889999999999999999999907DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0F0F777777FF77777777FFF07DDDDDDDDDDDD0FF77777FF7FF77777777F - F07DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F888888880F8888888888807DDDDDDDDDDDD0F888888880F8888888888 - 807DD0F877778880F8777777777807DDDDDDDDDDDD0F877777880F8777777778 - 807DD0FFFFFFFFF0FFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF0FFFFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgLevels: TImage - Left = 9 - Top = 288 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0888888888888888888888807DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F000FF8F000FF8FCCCC44F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F77F7F8FCC99F - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F666CCCF07DDDDDDDDDDDDD0F7F77F8F777FF8FCC99F - 7F07D0F0000F8F00F0F8F999999F07DDCDDDDCDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7888888888888888888 - 7F07D0888888888888888888888807DDCCCCCCCCDDD0F7F77F8F777FF8FC99CF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F00FFF8F0000F8F9999CCF07DDCDDDDCDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F99AAACF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F0000F8F000FF8F9999CCF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F0000000000000000000 - 0F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F0000F8F000FF8FB99944F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0777777777777777777777707DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F000087F800087F800000807DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF7FFFFFF7FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0000000000000000000000007DDCDDDDCDDDDD0F7888888888888888888 - 7F07D7F88880777777777777777778DDCCCCDCCDDDD0F7777777777777777777 - 7F07D7F00080F87777788088888888DDCCCCCCCCDDD0F7777777777777777777 - 7F07D7F77780FFFFFFFFF088888888DDCCCCDCCDDDD0F0000000000000000000 - 0F07D7FFFFF0777777777088888888DDCDDDDCDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D7777770888888888888888888DDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblLevels: TLabel - Left = 5 - Top = 267 - Width = 30 - Height = 13 - Caption = 'Levels' - end - object bvlLevels: TBevel - Left = 47 - Top = 272 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object lblGridSize: TLabel - Left = 5 - Top = 140 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlGridSize: TBevel - Left = 33 - Top = 144 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 9 - Top = 162 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxProcessSelection: TCheckBox - Left = 90 - Top = 25 - Width = 200 - Height = 17 - Caption = 'Process Selection' - TabOrder = 0 - OnClick = OptionsSelectionClick - end - object chbxProcessExactSelection: TCheckBox - Tag = 1 - Left = 90 - Top = 46 - Width = 200 - Height = 17 - Caption = 'Process Exact Selection' - TabOrder = 1 - OnClick = OptionsSelectionClick - end - object chbxExpandGroupRows: TCheckBox - Left = 90 - Top = 82 - Width = 200 - Height = 17 - Caption = 'Groups' - TabOrder = 2 - OnClick = OptionsExpandingClick - end - object chbxExpandMasterRows: TCheckBox - Tag = 1 - Left = 90 - Top = 104 - Width = 200 - Height = 17 - Caption = 'Details' - TabOrder = 3 - OnClick = OptionsExpandingClick - end - object chbxStartFromActiveView: TCheckBox - Left = 90 - Top = 222 - Width = 200 - Height = 17 - Caption = 'Start From Active Details' - TabOrder = 6 - OnClick = OptionsDetailsClick - end - object chbxOnlyActiveView: TCheckBox - Tag = 1 - Left = 90 - Top = 244 - Width = 200 - Height = 17 - Caption = 'Only Active Details' - TabOrder = 7 - OnClick = OptionsDetailsClick - end - object chbxLevelsUnwrap: TCheckBox - Left = 90 - Top = 285 - Width = 200 - Height = 17 - Caption = '&Unwrap' - TabOrder = 8 - OnClick = OptionsLevelsClick - end - object chbxLevelsUnwrapTopLevel: TCheckBox - Tag = 1 - Left = 90 - Top = 308 - Width = 200 - Height = 17 - Caption = 'Unwrap Top Level' - TabOrder = 9 - OnClick = OptionsLevelsClick - end - object chbxLevelsRiseActiveLevelOntoTop: TCheckBox - Tag = 2 - Left = 90 - Top = 331 - Width = 200 - Height = 17 - Caption = 'Rise Active Level onto Top' - TabOrder = 10 - OnClick = OptionsLevelsClick - end - object chbxGridAutoWidth: TCheckBox - Left = 90 - Top = 159 - Width = 200 - Height = 17 - Caption = '&Auto Width' - TabOrder = 5 - OnClick = OptionsSizeClick - end - object chbxExpandCards: TCheckBox - Tag = 2 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = 'Cards' - TabOrder = 4 - OnClick = OptionsExpandingClick - end - object chbxLevelsSkipEmptyViews: TCheckBox - Tag = 3 - Left = 90 - Top = 353 - Width = 200 - Height = 17 - Caption = 'Skip Empty Views' - TabOrder = 11 - OnClick = OptionsLevelsClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 12 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 9 - Top = 95 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 74 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 79 - Width = 241 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object lblPagination: TLabel - Left = 5 - Top = 229 - Width = 50 - Height = 13 - Caption = 'Pagination' - end - object bvlPagination: TBevel - Left = 64 - Top = 234 - Width = 247 - Height = 4 - Shape = bsBottomLine - end - object imgPagination: TImage - Left = 8 - Top = 251 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD0000000000000000000000007DDDDDDDDDDDD77777777777777770DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7F8888888888888F0DDDDD - DDDDD0888000000000000000088F07DDDDDDDDDDDD7F8777877778778F07770D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8888888888888F0FFF0D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0D - DDDDD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8888888888888F078F07 - 770DD0F990FFFF8FFFF8FFFF099F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0F - FF0DD0F99999999999999999999F07DDCDDDDCDDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCDCCDDD7F8888888888888F088F07 - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F8F0FFFF8F00F8F00F0F8F07DDCDDDDCDDDD7F8888888888888F088F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCDDDDCDDDD7F8888888888888F088F0F - 8F0DD0F99999999999999999999F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCDCCDDD7F8888888888888F088F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCDDDDCDDDD7F8777877778778F0F8F08 - 8F0DD0F8F0F00F8F00F8F00F0F8F07DDDDDDDDDDDD7F8888888888888F0F8F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF088F0F - 8F0DD0F8F0777777777777770F8F07DDDDDDDDDDDD0000000000000000078F08 - 8F0DD0F8F0F8887F8887F8880F8F07DDDDDDDDDDDDDDDD7F8888888888888F0F - 8F0DD0F8F0F0087F0087F0080F8F07DDDDDDDDDDDDDDDD7FFFFFFFFFFFFFFF08 - 8F0DD0F8F0FFFF7FFFF7FFFF0F8F07DDDDDDDDDDDDDDDD00000000000000000F - 8F0DD0888000000000000000088807DDDDDDDDDDDDDDDDDDDD7F888888888888 - 8F0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD7FFFFFFFFFFFFF - FF0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD00000000000000 - 000DD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 33 - Width = 212 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnClick = LookAndFeelClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 142 - Width = 200 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 119 - Width = 200 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 96 - Width = 200 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Suppress Background Images' - TabOrder = 4 - OnClick = OptionsFormatingClick - end - object chbxConsumeSelectionStyle: TCheckBox - Tag = 2 - Left = 90 - Top = 203 - Width = 200 - Height = 17 - Caption = 'Consume Selection Style' - TabOrder = 5 - OnClick = OptionsFormatingClick - end - object chbxPaginateOneGroupPerPage: TCheckBox - Tag = 1 - Left = 90 - Top = 274 - Width = 200 - Height = 17 - Caption = 'One Group Per Page' - TabOrder = 7 - OnClick = OptionsPaginationClick - end - object chbxPaginateByTopLevelGroups: TCheckBox - Left = 90 - Top = 251 - Width = 200 - Height = 17 - Caption = 'By TopLevel Groups' - TabOrder = 6 - OnClick = OptionsPaginationClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 5 - object bvlStyles: TBevel - Left = 118 - Top = 12 - Width = 191 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 295 - Width = 237 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 291 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 219 - end - object Label1: TLabel - Left = 76 - Top = 135 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 14 - Height = 17 - TabOrder = 0 - OnClick = OptionsFormatingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 311 - Width = 302 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 343 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = StyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 83 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = StyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 160 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = StyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 237 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = StyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 2 - object lblPreviewOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPreviewOptions: TBevel - Left = 50 - Top = 12 - Width = 261 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewMaxLineCount: TLabel - Left = 91 - Top = 73 - Width = 78 - Height = 13 - Caption = 'Max Line Count:' - end - object bvlPreviewMaxLineCountHost: TBevel - Left = 229 - Top = 69 - Width = 68 - Height = 21 - Visible = False - end - object imgPreview: TImage - Left = 9 - Top = 28 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F888F7FF888F7F8888F7F07DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7F888F7FF888F7FF888F7F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxPreviewVisible: TCheckBox - Left = 90 - Top = 28 - Width = 150 - Height = 17 - Caption = 'Visible' - TabOrder = 0 - OnClick = PreviewVisibleClick - end - object chbxPreviewAutoHeight: TCheckBox - Left = 90 - Top = 49 - Width = 150 - Height = 17 - Caption = 'Auto Height' - TabOrder = 1 - OnClick = PreviewAutoHeightClick - end - end - object tshCards: TTabSheet - Caption = 'Cards' - ImageIndex = 3 - object bvlCardSpaceVertHost: TBevel - Left = 231 - Top = 140 - Width = 75 - Height = 21 - Visible = False - end - object bvlCardSpaceHorzHost: TBevel - Left = 231 - Top = 112 - Width = 75 - Height = 21 - Visible = False - end - object lblCardSpaceVert: TLabel - Left = 90 - Top = 145 - Width = 39 - Height = 13 - Caption = 'Vertical:' - end - object lblCardSpaceHorz: TLabel - Left = 90 - Top = 116 - Width = 52 - Height = 13 - Caption = 'Horizontal:' - end - object imgCardSpacing: TImage - Left = 9 - Top = 112 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDD000000000000000000000000000000DDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD7DD0DDDDDD707000DDDDDD0DD7DDDDDDDDDDDDDDD - DDDDDDDDD0000000000000000000DDDDDD0D0D0DDDDDD0000000000000000000 - 0DDDDDDD77777777777777777770DDDDD00D0D0DDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDD0D000DDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF77777FF70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF77FFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF77FFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD7777777777777777777 - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardSpacing: TLabel - Left = 5 - Top = 92 - Width = 37 - Height = 13 - Caption = 'Spacing' - end - object bvlCardSpacing: TBevel - Left = 51 - Top = 97 - Width = 260 - Height = 4 - Shape = bsBottomLine - end - object bvlCardSizes: TBevel - Left = 34 - Top = 12 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object lblCardSizes: TLabel - Left = 5 - Top = 8 - Width = 24 - Height = 13 - Caption = 'Sizes' - end - object imgCardSizes: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDD000000000000DDDDDDDDDDDDDDDDDDDDDDDD000000000000DD00000000 - 0000D7777777777770DDDDDDDDDDDDDDDDDDDDDDD7777777777770D777777777 - 7770D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DD0000000000DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D77777777770DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8FFF70DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8F7F70DDDDDDDDDDD7FFFFF8F77F70D7FFFFF8F7 - FF70D7F777F8FFFF70D7FFFF8FFF70DDDDDDDDDDD7F777F8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - 7F70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F777F8FFFF70D7F77F8F7F70DDDDDDDDDDD7F777F8FFFF70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDCCCCDCCDD7F777F8F77F70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDCCCCDCCDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F7FFF8FFFF70D7F7FF8F7F70DDDDDDDDDDD7F7FFF8FFFF70D7F7FFF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D777777777777DD7777777777DDDDDDDDDDDD777777777777DD777777777 - 777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgCardFraming: TImage - Left = 9 - Top = 189 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD00000000000000000 - 00DDDDDDD88888888888888888887DDDDDDDDDDDDDDDDD000000000000000000 - 00DDDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF - 00DDDDD778FFFFFFF8FFF9999FF87DDDDDDDDDDDDDDD000FFFFFFF0FFF9999FF - 00DDDD8888FFFFFFF8FFF9999FF87DDDDDDDDDDDDDD0000FFFFFFF0FFF9999FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCDDDDCDDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCCCCDCCDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCCCCCDDD0FF0F77777F0FCCCCFFFF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCDCCDDDD0FF0F77777F0FCCCCFFFF - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF77777FF87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF77FFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF77FFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDCDDDDCDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCCCCDCCDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDCCCCCCCCDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDCCCCDCCDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F78888888888888888888DDDDDDDDDDDDDDD0F7000000000000000000 - 0DDDDD8F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDDDDD0F7FFFFF0FF7FFFFFF00D - DDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF00D - DDDDDD8888888888888888888DDDDDDDDDDDDDDDDDD0000000000000000000DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardFraming: TLabel - Left = 5 - Top = 171 - Width = 38 - Height = 13 - Caption = 'Framing' - end - object bvlCardFraming: TBevel - Left = 49 - Top = 176 - Width = 262 - Height = 4 - Shape = bsBottomLine - end - object bvlCardShadowColorHost: TBevel - Left = 177 - Top = 276 - Width = 129 - Height = 21 - Visible = False - end - object lblCardShadowDepth: TLabel - Left = 90 - Top = 308 - Width = 33 - Height = 13 - Caption = 'Depth:' - end - object bvlCardShadow: TBevel - Left = 48 - Top = 260 - Width = 263 - Height = 4 - Shape = bsBottomLine - end - object lblCardShadow: TLabel - Left = 5 - Top = 255 - Width = 38 - Height = 13 - Caption = 'Shadow' - end - object lblCardShadowColor: TLabel - Left = 90 - Top = 280 - Width = 29 - Height = 13 - Caption = 'Color:' - end - object bvlCardShadowDepthHost: TBevel - Left = 177 - Top = 304 - Width = 129 - Height = 21 - Visible = False - end - object imgCardShadow: TImage - Left = 9 - Top = 276 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF77777FFFFF7DDDDCDDDDCDDDDD7F77777F7FF77777FFFFF - 700DDD7F7FFFFF7FF77FFFFFFFF7DDDDCCCCDCCDDDD7F7FFFFF7FF77FFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDCCCCDCCDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 7DDDDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 7DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxCardsKeepSameHeight: TCheckBox - Tag = 2 - Left = 90 - Top = 70 - Width = 200 - Height = 17 - Caption = 'Keep Same Height' - TabOrder = 2 - OnClick = OptionsCardsClick - end - object chbxCardsKeepSameWidth: TCheckBox - Tag = 1 - Left = 90 - Top = 49 - Width = 200 - Height = 17 - Caption = 'Keep Same Width' - TabOrder = 1 - OnClick = OptionsCardsClick - end - object chbxCardsAutoWidth: TCheckBox - Left = 90 - Top = 28 - Width = 200 - Height = 17 - Caption = 'Auto Width' - TabOrder = 0 - OnClick = OptionsCardsClick - end - object chbxCardsVertLines: TCheckBox - Tag = 5 - Left = 90 - Top = 231 - Width = 200 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 5 - OnClick = OptionsCardsClick - end - object chbxCardsHorzLines: TCheckBox - Tag = 4 - Left = 90 - Top = 210 - Width = 200 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 4 - OnClick = OptionsCardsClick - end - object chbxCardsBorder: TCheckBox - Tag = 3 - Left = 90 - Top = 189 - Width = 200 - Height = 17 - Caption = 'Border' - TabOrder = 3 - OnClick = OptionsCardsClick - end - end - object tshCharts: TTabSheet - Caption = 'Charts' - ImageIndex = 6 - object lblChartsOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object imgCharts: TImage - Left = 9 - Top = 28 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDD777777777777777777777777DDDDDDD000000000000000000000000 - 7DDDDDDD0887FFFFFFFFFFFFFFFFFFF07DDDDDDD0887F8888888888888888880 - 7DDDDDDD0887F8FC491A2FFC491A2FF07DDDDDDD0887F8FC491A2FFC491A2FF0 - 7DDDDDDD0887F8FC4FFA2FFC491A2FF07DDDDDDD0887F8FC4FFA2FFC4FFA2FF0 - 7DDDDDDD0887F8FFFFFFFFFFFFFFFFF07DDDDDDD088777777777777777777770 - 7DDDDDDD0888888888888888888888807DDDDDDD087807777777788888888880 - 7DDDDDDD0888888888888888888888807DDDDDDD077777777777777777777770 - 7DDDDDDD0887FFFFFFFFFFFFFFFFFFF07DDDDDDD0887F8888888888888888880 - 7DDDDDDD0887F8FC491A2FFC491A2FF07DDDDDDD0887F8FC491A2FFC491A2FF0 - 7DDDDDDD0887F8FC491FFFFC491A2FF07DDDDDDD0887F8FFF91FFFFC4FFA2FF0 - 7DDDDDDD0887F8FFFFFFFFFFFFFFFFF07DDDDDDD088777777777777777777770 - 7DDDDDDD0888888888888888888888807DDDDDDD087800777777788888888880 - 7DDDDDDD0888888888888888888888807DDDDDDD077777777777777777777770 - 7DDDDDDD0F8888887F888888888888807DDDDDDD0F8000087F80000000088880 - 7DDDDDDD0F8888887F888888888888807DDDDDDD0FFFFFFF7FFFFFFFFFFFFFF0 - 7DDDDDDD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlChartsOptions: TBevel - Left = 57 - Top = 12 - Width = 254 - Height = 4 - Shape = bsBottomLine - end - object chbxChartsTransparent: TCheckBox - Left = 90 - Top = 28 - Width = 200 - Height = 17 - Caption = 'Transparent' - TabOrder = 0 - OnClick = chbxChartsTransparentClick - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 44 - Width = 306 - Height = 350 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewGrid: TcxGrid - Left = 5 - Top = 7 - Width = 296 - Height = 337 - TabOrder = 0 - LookAndFeel.NativeStyle = False - RootLevelOptions.DetailTabsPosition = dtpTop - object PreviewBandedView: TcxGridBandedTableView - NavigatorButtons.ConfirmDelete = False - FilterBox.CustomizeDialog = False - FilterBox.Visible = fvAlways - DataController.Summary.DefaultGroupSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Position = spFooter - Column = colVendorName - end> - DataController.Summary.FooterSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Column = colVendorName - end> - DataController.Summary.SummaryGroups = <> - OptionsView.ScrollBars = ssNone - OptionsView.CellAutoHeight = True - OptionsView.ColumnAutoWidth = True - OptionsView.Footer = True - OptionsView.GroupByBox = False - OptionsView.GroupFooters = gfAlwaysVisible - Preview.Column = colVendorCountry - Preview.Visible = True - OnCustomDrawColumnHeader = PreviewBandedViewCustomDrawColumnHeader - OnCustomDrawFooterCell = PreviewBandedViewCustomDrawFooterCell - Bands = < - item - Caption = 'Vendor Data' - Width = 150 - end - item - Caption = 'Car Data' - end> - OnCustomDrawBandHeader = PreviewBandedViewCustomDrawBandHeader - object colVendorName: TcxGridBandedColumn - Caption = 'Name' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colVendorLogo: TcxGridBandedColumn - Caption = 'Logo' - PropertiesClassName = 'TcxImageProperties' - Properties.GraphicTransparency = gtTransparent - OnCustomDrawCell = VendorLogoCustomDrawCell - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - object colVendorCountry: TcxGridBandedColumn - PropertiesClassName = 'TcxTextEditProperties' - Position.BandIndex = 0 - Position.ColIndex = 2 - Position.RowIndex = 0 - end - object colCarModel: TcxGridBandedColumn - Caption = 'Model' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 1 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colIsSUVModel: TcxGridBandedColumn - Caption = 'SUV' - PropertiesClassName = 'TcxCheckBoxProperties' - Properties.ValueGrayed = #39#39 - OnCustomDrawCell = IsSUVModelCustomDrawCell - HeaderAlignmentHorz = taCenter - Options.Filtering = False - Width = 30 - Position.BandIndex = 1 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - end - object PreviewGridLevel: TcxGridLevel - Caption = 'Cars' - end - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 4 - Top = 408 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 32 - Top = 408 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001001000000000000018 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000420042000000000000 - 0000000000001863186300000042000000000000000000000000000000000000 - 0000000000000000000000000000FF7F00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000420042004200420042 - 0042004200420042000000000000000000000000000000420042000000000000 - 0000000000001863186300000042000000000000000000000000FF7F00000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000E07F00000042004200420042 - 0042004200420042004200000000000000000000000000420042000000000000 - 00000000000018631863000000420000000000000000000000000000FF7F0000 - 000000000000000000000000FF7F000000000000000000001042104210421042 - 1042104200000000000000000000000000000000FF7FE07F0000004200420042 - 0042004200420042004200420000000000000000000000420042000000000000 - 00000000000000000000000000420000000000000000000000000000FF7F0000 - 00000000000000000000FF7F0000000000000000000000000000000010421042 - 0000000000000000000000000000000000000000E07FFF7F1042000000420042 - 0042004200420042004200420042000000000000000000420042004200420042 - 004200420042004200420042004200000000000000000000000000000000FF7F - 00000000000000000000FF7F0000000000000000000000000000000010420000 - 0000000000000000000000000000000000000000FF7FE07F1042FF7F00000000 - 0000000000000000000000000000000000000000000000420042000000000000 - 0000000000000000000000420042000000000000000000000000000000000000 - FF7F000000000000FF7F00000000000000000000000000000000000010420000 - 0000000000000000000000000000000000000000E07FFF7F1042FF7FFF03FF7F - FF03FF7FFF03FF7FFF03FF7FFF7F000000000000000000420000186318631863 - 1863186318631863186300000042000000000000000000000000000000000000 - 000000000000FF7F000000000000000000000000000000000000000010420000 - 0000000000000000000000000000000000000000FF7FE07F1042FF7FFF7FFF03 - FF7FFF03FF7FFF03FF7FFF03FF7F000000000000000000420000186318631863 - 1863186318631863186300000042000000000000000000000000000000000000 - 00000000FF7F0000000000000000000000000000000010420000000010420000 - 0000000000000000000000000000000000000000E07FFF7F1042FF7FFF031863 - FF03FF7FFF03FF7FFF03FF7FFF7F000000000000000000420000186318631863 - 1863186318631863186300000042000000000000000000000000000000000000 - 000000000000FF7F000000000000000000000000000010420000000010421042 - 0000000010420000000000000000000000000000000000001042FF7F1863E07F - 1863FF03FF7FFF03FF7FFF03FF7F000000000000000000420000186318631863 - 1863186318631863186300000042000000000000000000000000000000000000 - FF7F00000000FF7F000000000000000000000000000010421042000010421042 - 0000104210420000000000000000000000000000000000001042FF7FFF031863 - FF03FF7FFF03FF7FFF03FF7FFF7F000000000000000000420000186318631863 - 186318631863186318630000000000000000000000000000000000000000FF7F - 00000000000000000000FF7F0000000000000000000010421042104210421042 - 1042104210420000000000000000000000000000000000001042FF7FFF7FFF7F - FF7FFF7FFF7FFF7FFF7FFF7FFF7F000000000000000000420000186318631863 - 18631863186318631863000018630000000000000000000000000000FF7F0000 - 000000000000000000000000FF7F000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000001042104210421042 - 1042104210421042104210421042104200000000000000000000000000000000 - 000000000000000000000000000000000000000000000000FF7F000000000000 - 0000000000000000000000000000FF7F00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxStyleRepository1: TcxStyleRepository - Left = 60 - Top = 408 - object styleCardShadow: TcxStyle - end - object styleCardBorder: TcxStyle - AssignedValues = [svColor] - Color = clWindow - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6Lnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6Lnk.pas deleted file mode 100644 index 873115b5..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6Lnk.pas +++ /dev/null @@ -1,19607 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxGrid6Lnk; - -{$I cxVer.Inc} -{$DEFINE CHARTVIEW} - -interface - -uses - Windows, SysUtils, Messages, Classes, Graphics, Controls, StdCtrls, ComCtrls, - ExtCtrls, ImgList, Dialogs, ExtDlgs, Menus, cxGraphics, cxClasses, cxControls, - cxCustomData, cxDataStorage, cxData, cxDBData, cxGridDBDataDefinitions, cxGrid, - cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, - cxGridCardView, cxGridDBCardView, cxGridBandedTableView, cxGridDBBandedTableView, - {$IFDEF CHARTVIEW}cxGridChartView, cxGridDBChartView, {$ENDIF} - {$IFNDEF DXVER500}cxGridViewData, {$ENDIF} cxGridLevel, cxStyles, cxLookAndFeels, - cxLookAndFeelPainters, cxFilter, cxEdit, cxTextEdit, cxCheckBox, cxImage, dxBase, - dxPSSngltn, dxExtCtrls, dxPSCore, dxPrnPg, dxPScxCommon, dxCore; - -const - vspsGridFirst = 0; - vspsGridBandHeader = vspsGridFirst + 0; - vspsGridCaption = vspsGridFirst + 1; - vspsGridCardCaptionRow = vspsGridFirst + 2; - vspsGridCardRowCaption = vspsGridFirst + 3; - vspsGridContent = vspsGridFirst + 4; - vspsGridContentEven = vspsGridFirst + 5; - vspsGridContentOdd = vspsGridFirst + 6; - vspsGridFilterBar = vspsGridFirst + 7; - vspsGridFooter = vspsGridFirst + 8; - vspsGridGroup = vspsGridFirst + 9; - vspsGridHeader = vspsGridFirst + 10; - vspsGridPreview = vspsGridFirst + 11; - vspsGridSelection = vspsGridFirst + 12; - vspsGridLast = vspsGridFirst + 12; - - vsCardShadow = vsCardViewLast + 1; - vsCardViewLast = vsCardShadow; - - bbTabs = -1; - - dxDefaultInterCardsSpaceHorz = 4; - dxDefaultInterCardsSpaceVert = 4; - dxDefaultCardsShadowDepth = 4; - dxDefaultCardsShadowColor = clBlack; - - dxGridAttributeIDBase = 0; - dxGridUndefinedID = dxGridAttributeIDBase + 0; - dxGridBandID = dxGridAttributeIDBase + 1; - dxGridCardRowCaptionID = dxGridAttributeIDBase + 2; - dxGridCardRowDataID = dxGridAttributeIDBase + 3; - dxGridFilterBarID = dxGridAttributeIDBase + 4; - dxGridFooterID = dxGridAttributeIDBase + 5; - dxGridGroupFooterID = dxGridAttributeIDBase + 6; - dxGridHeaderID = dxGridAttributeIDBase + 7; - dxGridLevelCaptionID = dxGridAttributeIDBase + 8; - dxGridRecordID = dxGridAttributeIDBase + 9; - -type - TdxGridAttributeHostInfo = class; - TdxGridAttributeHostInfoServices = class; - TdxGridReportLink = class; - TdxGridReportLinkOptionsExpanding = class; - TdxfmGridReportLinkDesignWindow = class; - - TdxCustomGridViewAdapter = class; - TdxCustomGridViewFormatter = class; - TdxCustomGridViewBuilder = class; - - TdxCustomGridTableViewAdapter = class; - TdxCustomGridTableViewBuilder = class; - - TdxGridTableViewAdapter = class; - TdxGridTableViewFormatter = class; - TdxGridTableViewBuilder = class; - - TdxGridBandedTableViewAdapter = class; - TdxGridBandedTableViewFormatter = class; - TdxGridBandedTableViewBuilder = class; - - TdxGridCardViewBuilder = class; - -{$IFDEF CHARTVIEW} - TdxGridChartViewBuilder = class; -{$ENDIF} - - TdxGridTableViewColumnPlace = class; - TdxGridTableViewColumnPlaceController = class; - TdxCustomGridBandedTableViewItemPlace = class; - TdxGridBandedTableViewItemPlace = class; - TdxGridBandedTableViewItemPlaceController = class; - - TdxGridViewRowProducerClass = class of TdxGridViewRowProducer; - TdxGridViewRowProducer = class; - TdxGridViewCaptionProducerClass = class of TdxGridViewCaptionProducer; - TdxGridViewCaptionProducer = class; - TdxGridViewFilterBarProducerClass = class of TdxGridViewFilterBarProducer; - TdxGridViewFilterBarProducer = class; - TdxGridViewDetailsSeparatorProducerClass = class of TdxGridViewDetailsSeparatorProducer; - TdxGridViewDetailsSeparatorProducer = class; - TdxGridViewTerminatorProducerClass = class of TdxGridViewTerminatorProducer; - TdxGridViewTerminatorProducer = class; - TdxGridTableViewHeadersProducerClass = class of TdxGridTableViewHeadersProducer; - TdxGridTableViewHeadersProducer = class; - TdxGridTableViewFootersProducerClass = class of TdxGridTableViewFootersProducer; - TdxGridTableViewFootersProducer = class; - TdxGridTableViewCustomDataRowProducerClass = class of TdxGridTableViewCustomDataRowProducer; - TdxGridTableViewCustomDataRowProducer = class; - TdxGridTableViewRowSeparatorProducerClass = class of TdxGridTableViewRowSeparatorProducer; - TdxGridTableViewRowSeparatorProducer = class; - TdxGridTableViewGroupFooterProducerClass = class of TdxGridTableViewGroupFooterProducer; - TdxGridTableViewGroupFooterProducer = class; - TdxGridTableViewGroupRowSeparatorProducerClass = class of TdxGridTableViewGroupRowSeparatorProducer; - TdxGridTableViewGroupRowSeparatorProducer = class; - TdxGridTableViewBandsProducerClass = class of TdxGridTableViewBandsProducer; - TdxGridTableViewBandsProducer = class; - TdxGridCardViewCardsRowProducerClass = class of TdxGridCardViewCardsRowProducer; - TdxGridCardViewCardsRowProducer = class; -{$IFDEF CHARTVIEW} - TdxGridChartViewChartProducerClass = class of TdxGridChartViewChartProducer; - TdxGridChartViewChartProducer = class; -{$ENDIF} - - { View Attributes } - - TdxGridAttributeClass = class of TdxGridAttribute; - TdxGridAttributeClasses = array of TdxGridAttributeClass; - TdxGridAttribute = class end; - - TdxGridBandHeader = class(TdxGridAttribute); - TdxGridCardRowCaption = class(TdxGridAttribute); - TdxGridCardRowData = class(TdxGridAttribute); - TdxGridDetails = class(TdxGridAttribute); - TdxGridExpandButton = class(TdxGridAttribute); - TdxGridFilterBar = class(TdxGridAttribute); - TdxGridFooter = class(TdxGridAttribute); - TdxGridGroupFooter = class(TdxGridAttribute); - TdxGridGroupRow = class(TdxGridAttribute); - TdxGridHeader = class(TdxGridAttribute); - TdxGridLevelCaption = class(TdxGridAttribute); - TdxGridPreview = class(TdxGridAttribute); - - TdxGridAttributeID = type Integer; - - - TdxGridCellCustomDrawInfo = record - GridAttributeID: TdxGridAttributeID; - GridView: TcxCustomGridView; - GridRecord: TcxCustomGridRecord; - GridColumn: TcxGridColumn; - GroupLevel: Integer; - GridBand: TcxGridBand; - GridCard: TcxGridCard; - GridCardRow: TcxGridCardViewRow; - (*case Byte of - 0: (GridRecord: TcxCustomGridRecord; - GridColumn: TcxGridColumn; - GroupLevel: Integer; - GridBand: TcxGridBand); - 1: (GridCard: TcxGridCard; - GridCardRow: TcxGridCardViewRow); *) - end; - - - TdxAttributeColorKind = (ackContentColor, ackTextColor); - - TdxVerticalDetailsSeparatorKind = (vdskLeading, vdskTrailing); - - { View Helpers } - - TdxCustomGridViewHelperClass = class of TdxCustomGridViewHelper; - - TdxCustomGridViewHelper = class(TdxCustomClassMapItem) - private - FView: TcxCustomGridView; - protected - class procedure AddAttribute(var AnAtributes: TdxGridAttributeClasses; AnAttribute: TdxGridAttributeClass); - class function FilterPosition(AView: TcxCustomGridView): TcxGridFilterPosition; virtual; - - class function IsFilterBarAtBottom(AView: TcxCustomGridView): Boolean; virtual; - class function IsFilterBarAtTop(AView: TcxCustomGridView): Boolean; virtual; - class function IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; virtual; - class function ViewClass: TcxCustomGridViewClass; virtual; - public - constructor Create(AView: TcxCustomGridView); virtual; - - class function PairClass: TClass; override; - class procedure Register; - class procedure Unregister; - - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; virtual; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); virtual; - class function ExtractGridView(AnItem: TdxReportVisualItem): TcxCustomGridView; virtual; - class function HasData(AView: TcxCustomGridView): Boolean; virtual; - class function IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; virtual; - class function SupportedAttributes: TdxGridAttributeClasses; virtual; - - property View: TcxCustomGridView read FView write FView; - end; - - TdxNullGridViewHelper = class(TdxCustomGridViewHelper) - protected - class function ViewClass: TcxCustomGridViewClass; override; - public - class function IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; override; - end; - - TdxCustomGridTableViewHelper = class(TdxCustomGridViewHelper) - protected - class function ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; virtual; - {$IFDEF DXVER500} - class function FilterPosition(AView: TcxCustomGridView): TcxGridFilterPosition; override; - {$ENDIF} - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class function HasData(AView: TcxCustomGridView): Boolean; override; - class function SupportedAttributes: TdxGridAttributeClasses; override; - end; - - TdxGridCardViewHelper = class(TdxCustomGridTableViewHelper) - protected - class function ExtractCard(AnItem: TdxReportVisualItem): TcxGridCard; virtual; - class function ExtractCardRow(AnItem: TdxReportVisualItem): TcxGridCardViewRow; virtual; - class function ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; override; - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); override; - end; - - TdxGridTableViewHelper = class(TdxCustomGridTableViewHelper) - protected - class function ExtractColumn(AnItem: TdxReportVisualItem): TcxGridColumn; virtual; - class function ExtractGroupLevel(AnItem: TdxReportVisualItem): Integer; virtual; - class function ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; override; - class function IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; override; - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); override; - class function SupportedAttributes: TdxGridAttributeClasses; override; - end; - - TdxGridBandedTableViewHelper = class(TdxGridTableViewHelper) - protected - class function ExtractBand(AnItem: TdxReportVisualItem): TcxGridBand; virtual; - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); override; - class function SupportedAttributes: TdxGridAttributeClasses; override; - end; - - {$IFDEF CHARTVIEW} - TdxGridChartViewHelper = class(TdxCustomGridViewHelper) - protected - class function ViewClass: TcxCustomGridViewClass; override; - public - class function HasData(AView: TcxCustomGridView): Boolean; override; - end; - {$ENDIF} - - { Record Helpers } - - TdxCustomGridRecordHelperClass = class of TdxCustomGridRecordHelper; - - TdxCustomGridRecordHelper = class(TdxCustomClassMapItem) - private - FAdapter: TdxCustomGridTableViewAdapter; - FGridRecord: TcxCustomGridRecord; - protected - function Adapter: TdxCustomGridTableViewAdapter; overload; virtual; - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; virtual; - class function RecordClass: TcxCustomGridRecordClass; virtual; - - {$IFDEF DXVER500} - function GetCanCellMergingAsMaster: Boolean; virtual; - function GetCanCellMergingAsSlave: Boolean; virtual; - {$ENDIF} - function GetHasDetails: Boolean; virtual; - {$IFDEF DXVER500} - function GetHasExpandButton: Boolean; virtual; - {$ENDIF} - function GetHasSelectedChildren: Boolean; virtual; - {$IFDEF DXVER500} - function GetIsCellMergingSeparator: Boolean; virtual; - {$ENDIF} - function GetParent: TcxCustomGridRecord; virtual; - public - constructor Create(AAdapter: TdxCustomGridTableViewAdapter); virtual; - - class function PairClass: TClass; override; - class procedure Register; - class procedure Unregister; - - {$IFDEF DXVER500} - property CanCellMergingAsMaster: Boolean read GetCanCellMergingAsMaster; - property CanCellMergingAsSlave: Boolean read GetCanCellMergingAsSlave; - {$ENDIF} - property GridRecord: TcxCustomGridRecord read FGridRecord write FGridRecord; - property HasDetails: Boolean read GetHasDetails; - {$IFDEF DXVER500} - property HasExpandButton: Boolean read GetHasExpandButton; - {$ENDIF} - property HasSelectedChildren: Boolean read GetHasSelectedChildren; - {$IFDEF DXVER500} - property IsCellMergingSeparator: Boolean read GetIsCellMergingSeparator; - {$ENDIF} - property Parent: TcxCustomGridRecord read GetParent; - end; - - TdxCustomGridRowHelper = class(TdxCustomGridRecordHelper) - protected - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - class function RecordClass: TcxCustomGridRecordClass; override; - end; - - TdxGridDataRowHelper = class(TdxCustomGridRowHelper) - private - function GetRow: TcxGridDataRow; - protected - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; override; - class function RecordClass: TcxCustomGridRecordClass; override; - public - property Row: TcxGridDataRow read GetRow; - end; - - TdxGridGroupRowHelper = class(TdxCustomGridRowHelper) - private - function GetGroupRow: TcxGridGroupRow; - protected - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; override; - class function RecordClass: TcxCustomGridRecordClass; override; - - {$IFDEF DXVER500} - function GetCanCellMergingAsMaster: Boolean; override; - function GetCanCellMergingAsSlave: Boolean; override; - function GetHasExpandButton: Boolean; override; - {$ENDIF} - function GetHasSelectedChildren: Boolean; override; - public - property GroupRow: TcxGridGroupRow read GetGroupRow; - end; - - TdxGridMasterDataRowHelper = class(TdxCustomGridRowHelper) - private - function GetDetailView: TcxCustomGridView; - function GetMasterRow: TcxGridMasterDataRow; - protected - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; override; - class function RecordClass: TcxCustomGridRecordClass; override; - - {$IFDEF DXVER500} - function GetCanCellMergingAsMaster: Boolean; override; - {$ENDIF} - function GetHasDetails: Boolean; override; - {$IFDEF DXVER500} - function GetHasExpandButton: Boolean; override; - {$ENDIF} - function GetHasSelectedChildren: Boolean; override; - {$IFDEF DXVER500} - function GetIsCellMergingSeparator: Boolean; override; - {$ENDIF} - public - property DetailView: TcxCustomGridView read GetDetailView; - property MasterRow: TcxGridMasterDataRow read GetMasterRow; - end; - - { caches } - - TdxRecordHelpersCache = class(TdxCustomCache) - private - FAdapter: TdxCustomGridTableViewAdapter; - function GetHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; - function GetItem(Index: Integer): TdxCustomGridRecordHelper; - protected - function IndexOf(ARecord: TcxCustomGridRecord): Integer; - property Items[Index: Integer]: TdxCustomGridRecordHelper read GetItem; - public - constructor Create(AAdapter: TdxCustomGridTableViewAdapter); - property Adapter: TdxCustomGridTableViewAdapter read FAdapter; - property Helpers[ARecord: TcxCustomGridRecord]: TdxCustomGridRecordHelper read GetHelper; default; - end; - - TdxProducerCache = class(TdxCustomCache) - private - FBuilder: TdxCustomGridViewBuilder; - function GetItem(Index: Integer): TdxGridViewRowProducer; - function GetProducer(ProducerClass: TdxGridViewRowProducerClass): TdxGridViewRowProducer; - protected - function IndexOf(AProducerClass: TdxGridViewRowProducerClass): Integer; - property Items[Index: Integer]: TdxGridViewRowProducer read GetItem; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); - property Builder: TdxCustomGridViewBuilder read FBuilder; - property Producers[ProducerClass: TdxGridViewRowProducerClass]: TdxGridViewRowProducer read GetProducer; default; - end; - - { CustomView Adapter, Formatter and Builder } - - TdxGridViewAdapterClass = class of TdxCustomGridViewAdapter; - - TdxCustomGridViewAdapter = class - private - FGridView: TcxCustomGridView; - FMasterAdapter: TdxCustomGridViewAdapter; - function GetAbsoluteLevel: Integer; - function GetCanUseLookAndFeelColors: Boolean; - function GetCaptionText: string; - function GetDetailsSeparatorColor: TColor; - function GetDetailsSeparatorThickness: Integer; - function GetExpandButtonColor: TColor; - function GetExpandButtonSize: Integer; - function GetFilter: TcxDataFilterCriteria; - function GetFilterActive: Boolean; - function GetFilterEmpty: Boolean; - function GetFilterText: string; - function GetGrid: TcxCustomGrid; - function GetGridLevel: TcxGridLevel; - function GetGridWidth: Integer; - function GetHasDetailsSeparator: Boolean; - function GetLookAndFeelKind: TcxLookAndFeelKind; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetIsDetail: Boolean; - function GetIsMaster: Boolean; - function GetMasterGridLevel: TcxGridLevel; - function GetSummary: TcxDataSummary; - function GetThemedCaptionColor: TColor; - function GetThemedCaptionTextColor: TColor; - function GetThemedFilterBarColor: TColor; - function GetThemedFilterBarTextColor: TColor; - function GetViewWidth: Integer; - protected - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - - function BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; overload; virtual; - function GetBackgroundBitmap(Index: Integer): TBitmap; - function HasBackgroundBitmap(Index: Integer): Boolean; - function IsBackgroundBitmapSupported(Index: Integer): Boolean; virtual; - - function Controller: TcxCustomGridController; overload; virtual; - function DataController: TcxCustomDataController; overload; virtual; - - function CreateCloneAdapter(AClone: TcxCustomGridView): TdxCustomGridViewAdapter; - procedure ExpandAllRowsInClones(AMasterRows, AGroupRows: Boolean); virtual; - procedure ExpandAllRowsInGridView(AGridView: TcxCustomGridView; AMasterRows, AGroupRows: Boolean); - procedure ExpandAllRowsInLevel(ALevel: TcxGridLevel; AMasterRows, AGroupRows: Boolean; ARecursive: Boolean); - procedure ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); virtual; - - function GetAreAllMasterRowsCollapsed: Boolean; virtual; - function GetAutoWidth: Boolean; virtual; - function GetCanUseOnEveryPageMode: Boolean; virtual; - {$IFDEF DXVER500} - function GetFilterPosition: TcxGridFilterPosition; virtual; - {$ENDIF} - function GetHasSelectedRecords: Boolean; virtual; - function GetIndentCount: Integer; virtual; - function GetIndentWidth: Integer; virtual; - function GetIsOffice11StyleGrouping: Boolean; virtual; - function GetMasterGridRecord: TcxCustomGridRecord; virtual; - function GetRecordCount: Integer; virtual; - function GetViewWidthExtra: Integer; virtual; - { Styles } - function GetCaptionViewParams: TcxViewParams; virtual; - function GetFilterBarViewParams: TcxViewParams; virtual; - function GetRootCaptionParams: TcxViewParams; virtual; - - property Filter: TcxDataFilterCriteria read GetFilter; - property Grid: TcxCustomGrid read GetGrid; - property LookAndFeelKind: TcxLookAndFeelKind read GetLookAndFeelKind; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property Summary: TcxDataSummary read GetSummary; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); virtual; - - function GridView: TcxCustomGridView; overload; virtual; - class function GridViewClass: TcxCustomGridViewClass; virtual; - function Styles: TcxCustomGridStyles; overload; virtual; - - procedure ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; - ARecursive: Boolean); virtual; - - property AbsoluteLevel: Integer read GetAbsoluteLevel; - property AreAllMasterRowsCollapsed: Boolean read GetAreAllMasterRowsCollapsed; - property AutoWidth: Boolean read GetAutoWidth; - property CanUseOnEveryPageMode: Boolean read GetCanUseOnEveryPageMode; - property CanUseLookAndFeelColors: Boolean read GetCanUseLookAndFeelColors; - property CaptionText: string read GetCaptionText; - property DetailsSeparatorColor: TColor read GetDetailsSeparatorColor; - property DetailsSeparatorThickness: Integer read GetDetailsSeparatorThickness; - property ExpandButtonColor: TColor read GetExpandButtonColor; - property ExpandButtonSize: Integer read GetExpandButtonSize; - property GridLevel: TcxGridLevel read GetGridLevel; - property GridWidth: Integer read GetGridWidth; - property FilterActive: Boolean read GetFilterActive; - property FilterEmpty: Boolean read GetFilterEmpty; - {$IFDEF DXVER500} - property FilterPosition: TcxGridFilterPosition read GetFilterPosition; - {$ENDIF} - property FilterText: string read GetFilterText; - property HasDetailsSeparator: Boolean read GetHasDetailsSeparator; - property HasSelectedRecords: Boolean read GetHasSelectedRecords; - property IndentCount: Integer read GetIndentCount; - property IndentWidth: Integer read GetIndentWidth; - property IsDetail: Boolean read GetIsDetail; - property IsMaster: Boolean read GetIsMaster; - property IsOffice11StyleGrouping: Boolean read GetIsOffice11StyleGrouping; - property MasterAdapter: TdxCustomGridViewAdapter read FMasterAdapter; - property MasterGridLevel: TcxGridLevel read GetMasterGridLevel; - property MasterGridRecord: TcxCustomGridRecord read GetMasterGridRecord; - property RecordCount: Integer read GetRecordCount; - property ThemedCaptionColor: TColor read GetThemedCaptionColor; - property ThemedCaptionTextColor: TColor read GetThemedCaptionTextColor; - property ThemedFilterBarColor: TColor read GetThemedFilterBarColor; - property ThemedFilterBarTextColor: TColor read GetThemedFilterBarTextColor; - property ViewWidth: Integer read GetViewWidth; - property ViewWidthExtra: Integer read GetViewWidthExtra; - end; - - TdxGridViewFormatterClass = class of TdxCustomGridViewFormatter; - - TdxCustomGridViewFormatter = class(TObject, IUnknown) - private - FBuilder: TdxCustomGridViewBuilder; - FCaptionLineHeight: Integer; - FExpandButtons: TList; - FFilterBarLineHeight: Integer; - FFont: TFont; - FLookAndFeelItems: TList; - FTransparentColor: TColor; - function GetAbsoluteLevel: Integer; - function GetAutoWidth: Boolean; - function GetDC: HDC; - function GetEdgeMode: TdxCellEdgeMode; - {$IFDEF DXVER500} - function GetFilterBarPosition: TcxGridFilterPosition; - {$ENDIF} - function GetGridWidth: Integer; - function GetExpandButton(Index: Integer): TdxReportCellExpandButton; - function GetExpandButtonCount: Integer; - function GetIndentWidth: Integer; - function GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; - function GetLookAndFeelItemCount: Integer; - function GetPaginateByTopLevelGroups: Boolean; - function GetRenderer: TdxPSReportRenderer; - function GetReportLink: TdxGridReportLink; - function GetShowCaption: Boolean; - function GetShowFilterBar: Boolean; - function GetUseLookAndFeelColors: Boolean; - function GetViewAvailableWidth: Integer; - function GetViewWidthExtra: Integer; - - procedure FormatLookAndFeelItems; - procedure FormatExpandButtons; - protected - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - procedure AddDelimiters; virtual; - procedure AddHorizontalDelimiters; virtual; - procedure AddVerticalDelimiters; virtual; - - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - - procedure Calculate; virtual; - procedure CalculateLineHeights; virtual; - - function GetDetailsSeparatorColor: TColor; virtual; - function GetDetailsSeparatorThickness: Integer; virtual; - function GetHasDetailsSeparator: Boolean; virtual; - - function GetSiteHeight: Integer; virtual; - function GetSiteWidth: Integer; virtual; - function GetViewWidth: Integer; virtual; - function GetViewWidthExtraAfter: Integer; virtual; // MD relation considering - function GetViewWidthExtraBefore: Integer; virtual; // MD relation considering - - function BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; overload; virtual; - function GetBackgroundBitmap(Index: Integer): TBitmap; virtual; - function GetBackgroundBitmapIndex(Index: Integer): Integer; - function HasBackgroundBitmap(Index: Integer): Boolean; virtual; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; virtual; - - function CalculateFontHeight(const AParams: TdxReportItemViewParams): Integer; - procedure CalculateHeight(const AParams: TdxReportItemViewParams; var AHeight: Integer); - function GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; - function IsColorTransparent(AColor: TColor): Boolean; - procedure RegisterExpandButton(AExpandButton: TdxReportCellExpandButton); - procedure RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); - procedure SetViewParams(AnItem: TdxReportVisualItem; AGridLines: TcxGridLines; const AParams: TcxViewParams); overload; - procedure SetViewParams(AnItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); overload; - - property DC: HDC read GetDC; - property EdgeMode: TdxCellEdgeMode read GetEdgeMode; - property ExpandButtonCount: Integer read GetExpandButtonCount; - property ExpandButtons[Index: Integer]: TdxReportCellExpandButton read GetExpandButton; - property GridWidth: Integer read GetGridWidth; - property LookAndFeelItemCount: Integer read GetLookAndFeelItemCount; - property LookAndFeelItems[Index: Integer]: TdxReportVisualItem read GetLookAndFeelItem; - property PaginateByTopLevelGroups: Boolean read GetPaginateByTopLevelGroups; - property Renderer: TdxPSReportRenderer read GetRenderer; - property ReportLink: TdxGridReportLink read GetReportLink; - property SiteHeight: Integer read GetSiteHeight; - property SiteWidth: Integer read GetSiteWidth; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); virtual; - destructor Destroy; override; - - function Adapter: TdxCustomGridViewAdapter; overload; virtual; - function Builder: TdxCustomGridViewBuilder; overload; virtual; - - { Host } - procedure DoInitializeHost(AHost: TdxReportCell); virtual; - function GetHostClass: TdxReportCellClass; virtual; - function GetRowHostClass: TdxReportCellClass; virtual; - - { Caption } - procedure DoInitializeCaption(ACaption: TdxReportCellText); virtual; - procedure DoInitializeCaptionRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeCaption(ACaption: TdxReportCellText); virtual; - function GetCaptionClass: TdxReportCellTextClass; virtual; - function GetCaptionViewParams: TdxReportItemViewParams; virtual; - - { Filter Box } - procedure DoInitializeFilterBar(AFilterBar: TdxReportCellText); virtual; - procedure DoInitializeFilterBarRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeFilterBar(AFilterBar: TdxReportCellText); virtual; - function GetFilterBarClass: TdxReportCellTextClass; virtual; - function GetFilterBarViewParams: TdxReportItemViewParams; virtual; - - { Details Separator } - procedure DoInitializeDetailsSeparatorRow(ARow: TdxReportCell); virtual; - procedure DoInitializeHorzDetailsSeparator(ASeparator: TdxReportCellBox); virtual; - procedure DoInitializeVertBottomDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - procedure DoInitializeVertDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - procedure DoInitializeVertTopDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - function GetDetailsSeparatorClass: TdxReportCellBoxClass; virtual; - - { Master Indent } - procedure DoInitializeExpandButton(AnExpandButton: TdxReportCellExpandButton; - ARecord: TcxCustomGridRecord; AnIsMasterIndent: Boolean); - procedure DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; AnIndex, AnIndentCount: Integer); virtual; - function GetMasterIndentClass: TdxReportCellExpandButtonClass; virtual; - - { View Terminator } - procedure DoInitializeViewTerminator(ATerminator: TdxReportCellBox); virtual; - - property AbsoluteLevel: Integer read GetAbsoluteLevel; - property AutoWidth: Boolean read GetAutoWidth; - property CaptionLineHeight: Integer read FCaptionLineHeight write FCaptionLineHeight; - property DetailsSeparatorColor: TColor read GetDetailsSeparatorColor; - property DetailsSeparatorThickness: Integer read GetDetailsSeparatorThickness; - property FilterBarLineHeight: Integer read FFilterBarLineHeight write FFilterBarLineHeight; - {$IFDEF DXVER500} - property FilterBarPosition: TcxGridFilterPosition read GetFilterBarPosition; - {$ENDIF} - property HasDetailsSeparator: Boolean read GetHasDetailsSeparator; - property IndentWidth: Integer read GetIndentWidth; - property ShowCaption: Boolean read GetShowCaption; - property ShowFilterBar: Boolean read GetShowFilterBar; - property TransparentColor: TColor read FTransparentColor write FTransparentColor; - property UseLookAndFeelColors: Boolean read GetUseLookAndFeelColors; - property ViewAvailableWidth: Integer read GetViewAvailableWidth; - property ViewWidth: Integer read GetViewWidth; - property ViewWidthExtra: Integer read GetViewWidthExtra; - property ViewWidthExtraAfter: Integer read GetViewWidthExtraAfter; // MD relation considering - property ViewWidthExtraBefore: Integer read GetViewWidthExtraBefore; // MD relation considering - end; - - TdxGridViewBuilderClass = class of TdxCustomGridViewBuilder; - - TdxCustomGridViewBuilder = class(TdxCustomClassMapItem) - private - FAdapter: TdxCustomGridViewAdapter; - FDetailsBuilder: TdxCustomGridViewBuilder; - FFormatter: TdxCustomGridViewFormatter; - FGridView: TcxCustomGridView; - FMasterBuilder: TdxCustomGridViewBuilder; - FProducerCache: TdxProducerCache; - FReportLink: TdxGridReportLink; - FReportRows: TList; - function GetAbsoluteBuilder(AIndex: Integer): TdxCustomGridViewBuilder; - function GetAutoWidth: Boolean; - function GetGridLevel: TcxGridLevel; - function GetGrid: TcxCustomGrid; - function GetHost: TdxReportCell; - function GetHostInfoServices: TdxGridAttributeHostInfoServices; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowCount: Integer; - function GetRootBuilder: TdxCustomGridViewBuilder; - protected - procedure AddReportRow(ARow: TdxReportCell); - - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - procedure DoBuild; virtual; - procedure DoBuildViewBody; virtual; - procedure DoBuildViewFooter; virtual; - procedure DoBuildViewHeader; virtual; - - function GetViewAvailableWidth: Integer; virtual; - { Caption } - procedure CreateCaption; virtual; - function GetCaptionProducer: TdxGridViewCaptionProducer; virtual; - function GetCaptionProducerClass: TdxGridViewCaptionProducerClass; virtual; - { Details Separator } - procedure CreateBottomDetailsSeparator; virtual; - procedure CreateTopDetailsSeparator; virtual; - function GetDetailsBottomSeparatorProducer: TdxGridViewDetailsSeparatorProducer; virtual; - function GetDetailsBottomSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; virtual; - function GetDetailsTopSeparatorProducer: TdxGridViewDetailsSeparatorProducer; virtual; - function GetDetailsTopSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; virtual; - { Filter Box } - procedure CreateFilterBar; virtual; - function GetFilterBarProducer: TdxGridViewFilterBarProducer; virtual; - function GetFilterBarProducerClass: TdxGridViewFilterBarProducerClass; virtual; - { View Terminator } - procedure CreateViewTerminator; virtual; - function GetViewTerminatorProducer: TdxGridViewTerminatorProducer; virtual; - function GetViewTerminatorProducerClass: TdxGridViewTerminatorProducerClass; virtual; - - function GridView: TcxCustomGridView; overload; virtual; - class function GridViewClass: TcxCustomGridViewClass; virtual; - - property GridLevel: TcxGridLevel read GetGridLevel; - property HostInfoServices: TdxGridAttributeHostInfoServices read GetHostInfoServices; - property ProducerCache: TdxProducerCache read FProducerCache; - property ReportLink: TdxGridReportLink read FReportLink; - public - constructor Create(AReportLink: TdxGridReportLink; AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView); virtual; - destructor Destroy; override; - - function Adapter: TdxCustomGridViewAdapter; overload; virtual; - class function AdapterClass: TdxGridViewAdapterClass; virtual; - class function CreateAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; virtual; - - function Formatter: TdxCustomGridViewFormatter; overload; virtual; - class function FormatterClass: TdxGridViewFormatterClass; virtual; - - procedure Build; - function IsAborted: Boolean; - procedure Progress(const APercentDone: Double); - - class function PairClass: TClass; override; - class procedure Register; - class procedure Unregister; - - property AbsoluteBuilders[Index: Integer]: TdxCustomGridViewBuilder read GetAbsoluteBuilder; - property AutoWidth: Boolean read GetAutoWidth; - property DetailsBuilder: TdxCustomGridViewBuilder read FDetailsBuilder; - property Grid: TcxCustomGrid read GetGrid; - property Host: TdxReportCell read GetHost; - property MasterBuilder: TdxCustomGridViewBuilder read FMasterBuilder; - property ReportRowCount: Integer read GetReportRowCount; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property RootBuilder: TdxCustomGridViewBuilder read GetRootBuilder; - property ViewAvailableWidth: Integer read GetViewAvailableWidth; - end; - - { CustomTableView Adapter and Formatter } - - TdxGridTableAdapterForEachRecordProc = procedure(ARecord: TcxCustomGridRecord; - AData: Integer; var AContinue: Boolean) of object; - - TdxCustomGridTableViewAdapter = class(TdxCustomGridViewAdapter) - private - FDetailsLineCount: Integer; - FRecordHelpersCache: TdxRecordHelpersCache; - function GetCellEndEllipsis: Boolean; - function GetDetailsLineCount: Integer; - function GetFiltering: TcxCustomGridTableFiltering; - function GetIsGridMode: Boolean; - function GetRecord(Index: Integer): TcxCustomGridRecord; - function GetRecordHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; - function GetSelectedRecord(Index: Integer): TcxCustomGridRecord; - function GetSelectedRecordCount: Integer; - protected - function CalculateDetailsLineCount: Integer; virtual; - - function GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; AIsDataCell: Boolean = False): TcxViewParams; virtual; - function GetPreviewViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; virtual; - function GetSelectionViewParams: TcxViewParams; virtual; - function HasSelectionStyle: Boolean; - - function Controller: TcxCustomGridTableController; reintroduce; overload; - - procedure DoExpandMasterRow(ARecord: TcxCustomGridRecord; AData: Integer; - var AContinue: Boolean); - procedure ExpandAllGroupRows; virtual; - procedure ExpandAllMasterRows(AnExpandGroups: Boolean); virtual; - procedure ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); override; - - function GetAreAllMasterRowsCollapsed: Boolean; override; - function GetCanUseOnEveryPageMode: Boolean; override; - function GetCellAutoHeight: Boolean; virtual; - function GetCellMultiline: Boolean; virtual; - {$IFDEF DXVER500} - function GetFilterPosition: TcxGridFilterPosition; override; - {$ENDIF} - function GetGridLineColor: TColor; virtual; - function GetHasSelectedRecords: Boolean; override; - function GetMasterGridRecord: TcxCustomGridRecord; override; - function GetRecordCount: Integer; override; - procedure IsMasterRowCollapsed(ARecord: TcxCustomGridRecord; AData: Integer; - var AContinue: Boolean); - - class function GetProperties(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; virtual; - class function GetPropertiesClass(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditPropertiesClass; virtual; - class function GetRepositoryItem(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxEditRepositoryItem; virtual; - - property RecordHelpersCache: TdxRecordHelpersCache read FRecordHelpersCache; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); override; - destructor Destroy; override; - - function ForEachRecord(AProc: TdxGridTableAdapterForEachRecordProc; AData: Integer; - AProcessSelection: Boolean): Boolean; - - function GridView: TcxCustomGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxCustomGridTableViewStyles; reintroduce; overload; - - property CellAutoHeight: Boolean read GetCellAutoHeight; - property CellEndEllipsis: Boolean read GetCellEndEllipsis; - property CellMultiline: Boolean read GetCellMultiline; - property DetailsLineCount: Integer read GetDetailsLineCount write FDetailsLineCount; - property Filtering: TcxCustomGridTableFiltering read GetFiltering; - property GridLineColor: TColor read GetGridLineColor; - property IsGridMode: Boolean read GetIsGridMode; - property RecordHelpers[Row: TcxCustomGridRecord]: TdxCustomGridRecordHelper read GetRecordHelper; - property Records[Index: Integer]: TcxCustomGridRecord read GetRecord; - property SelectedRecordCount: Integer read GetSelectedRecordCount; - property SelectedRecords[Index: Integer]: TcxCustomGridRecord read GetSelectedRecord; - end; - - TdxCustomGridTableViewFormatter = class(TdxCustomGridViewFormatter, IdxPSCellParams, IdxPSCellParams2) - private - FRecordIndexes: TList; - FSelectedRecordList: TList; - function GetGridLineColor: TColor; - function GetRecord(Index: Integer): TcxCustomGridRecord; - function GetRecordCount: Integer; - function GetRecordIndex(ARecord: TcxCustomGridRecord): Integer; - function GetSelectedRecord(Index: Integer): TcxCustomGridRecord; - function GetSelectedRecordCount: Integer; - protected - { IdxPSCellParams } - function IdxPSCellParams.GetAutoHeight = IdxPSCellParams_GetAutoHeight; - function IdxPSCellParams.GetDC = IdxPSCellParams_GetDC; - function IdxPSCellParams.GetDisplayGraphicsAsText = IdxPSCellParams_GetDisplayGraphicsAsText; - function IdxPSCellParams.GetEndEllipsis = IdxPSCellParams_GetEndEllipsis; - function IdxPSCellParams.GetFlatCheckMarks = IdxPSCellParams_GetFlatCheckMarks; - function IdxPSCellParams.GetGraphicsText = IdxPSCellParams_GetGraphicsText; - function IdxPSCellParams.GetMultiline = IdxPSCellParams_GetMultiline; - function IdxPSCellParams.GetTransparentGraphics = IdxPSCellParams_GetTransparentGraphics; - function IdxPSCellParams_GetAutoHeight: Boolean; virtual; - function IdxPSCellParams_GetDC: HDC; virtual; - function IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; virtual; - function IdxPSCellParams_GetEndEllipsis: Boolean; virtual; - function IdxPSCellParams_GetFlatCheckMarks: Boolean; virtual; - function IdxPSCellParams_GetGraphicsText: string; virtual; - function IdxPSCellParams_GetMultiline: Boolean; virtual; - function IdxPSCellParams_GetTransparentGraphics: Boolean; virtual; - { IdxPSCellParams2 } - function IdxPSCellParams2.GetPreviewMarginLeft = IdxPSCellParams2_GetPreviewMarginLeft; - function IdxPSCellParams2.GetPreviewMarginRight = IdxPSCellParams2_GetPreviewMarginRight; - function IdxPSCellParams2.GetPreviewMaxHeight = IdxPSCellParams2_GetPreviewMaxHeight; - function IdxPSCellParams2.GetPreviewMaxLineCount = IdxPSCellParams2_GetPreviewMaxLineCount; - function IdxPSCellParams2.GetRichEditGraphicClass = IdxPSCellParams2_GetRichEditGraphicClass; - function IdxPSCellParams2.GetRichEditTransparent = IdxPSCellParams2_GetRichEditTransparent; - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; virtual; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; virtual; - function IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; virtual; - function IdxPSCellParams2_GetRichEditTransparent: Boolean; virtual; - - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - - procedure BuildSelectedRecordList; virtual; - function CanProcessSelectionStyle(ARecord: TcxCustomGridRecord): Boolean; - function IsSelectedRecord(ARecord: TcxCustomGridRecord): Boolean; virtual; - - function GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; virtual; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - property SelectedRecordList: TList read FSelectedRecordList; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Adapter: TdxCustomGridTableViewAdapter; reintroduce; overload; - function Builder: TdxCustomGridTableViewBuilder; reintroduce; overload; - - function IndexOfRecord(ARecord: TcxCustomGridRecord): Integer; - - { Items } - procedure CheckDisplayValuePost(AProperties: TcxCustomEditProperties; - ATableItem: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; AnItem: TAbstractdxReportCellData); - procedure DoInitializeItem(AnItem: TAbstractdxReportCellData; ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False); virtual; - function GetItemClass(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportCellDataClass; virtual; - function GetItemProperties(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; virtual; - function GetItemValue(AProperties: TcxCustomEditProperties; ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxEditValue; virtual; - function GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False; AIsDataCell: Boolean = False): TdxReportItemViewParams; virtual; - - property GridLineColor: TColor read GetGridLineColor; - property RecordCount: Integer read GetRecordCount; - property RecordIndexes[ARecord: TcxCustomGridRecord]: Integer read GetRecordIndex; - property Records[Index: Integer]: TcxCustomGridRecord read GetRecord; - property SelectedRecordCount: Integer read GetSelectedRecordCount; - property SelectedRecords[Index: Integer]: TcxCustomGridRecord read GetSelectedRecord; - end; - - TdxCustomGridTableViewBuilder = class(TdxCustomGridViewBuilder) - protected - procedure DoBuildViewFooter; override; - procedure DoBuildViewHeader; override; - - procedure DoGetCellHeight(ARecord: TcxCustomGridRecord; ATableItem: TcxCustomGridTableItem; - var AHeight: Integer); - - function GridView: TcxCustomGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - public - function Adapter: TdxCustomGridTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxCustomGridTableViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - end; - - { GridTableView Adapter, Formatter and Builder } - - TdxGridTableViewAdapter = class(TdxCustomGridTableViewAdapter) - private - function GetColumn(Index: Integer): TcxGridColumn; - function GetColumnCount: Integer; - function GetFooterItemText(Index: Integer): string; - function GetFooterMultiline: Boolean; - function GetFooterMultiSummaries: Boolean; - function GetGridLines: TcxGridLines; - function GetGroupFooterMultiSummaries: Boolean; - function GetGroupedColumn(Index: Integer): TcxGridColumn; - function GetGroupedColumnCount: Integer; - function GetGroupFootersMode: TcxGridGroupFootersMode; - function GetGroupFootersMultiline: Boolean; - function GetGroupRowSeparatorColor: TColor; - function GetGroupRowSeparatorThickness: Integer; - function GetHasFooterItem(Index: Integer): Boolean; - function GetHasPreview: Boolean; - function GetHasRowSeparators: Boolean; - function GetHeaderEndEllipsis: Boolean; - function GetInternalColumnMinWidth(Column: TcxGridColumn): Integer; - function GetInternalColumnWidth(Column: TcxGridColumn): Integer; - function GetPreviewColumn: TcxGridColumn; - function GetPreviewLeftIndent: Integer; - function GetPreviewPlace: TcxGridPreviewPlace; - function GetPreviewRightIndent: Integer; - function GetRow(Index: Integer): TcxCustomGridRow; - function GetRowCount: Integer; - function GetRowSeparatorColor: TColor; - function GetRowSeparatorThickness: Integer; - function GetShowExpandButtonsForEmptyDetails: Boolean; - function GetShowHorzGridLines: Boolean; - function GetShowVertGridLines: Boolean; - function GetThemedFooterItemColor: TColor; - function GetThemedFooterItemTextColor: TColor; - function GetThemedHeaderItemColor: TColor; - function GetThemedHeaderItemTextColor: TColor; - protected - function Controller: TcxGridTableController; reintroduce; overload; - function DataController: TcxGridDataController; reintroduce; overload; - - function GetAutoWidth: Boolean; override; - function GetCellAutoHeight: Boolean; override; - function GetCellMultiline: Boolean; override; - function GetGridLineColor: TColor; override; - function GetHeaderAutoHeight: Boolean; virtual; - function GetHeaderMultiline(Column: TcxGridColumn): Boolean; virtual; - function GetIndentCount: Integer; override; - function GetIndentWidth: Integer; override; - function GetIndicatorWidth: Integer; virtual; - function GetIsOffice11StyleGrouping: Boolean; override; - function GetViewWidthExtra: Integer; override; - - function GetDataRowHeight: Integer; virtual; - function GetDataRowHeightAssigned: Boolean; virtual; - function GetFooterHeight: Integer; virtual; - function GetFooterHeightAssigned: Boolean; virtual; - function GetGroupFooterHeight: Integer; virtual; - function GetGroupFooterHeightAssigned: Boolean; virtual; - function GetGroupRowHeight: Integer; virtual; - function GetGroupRowHeightAssigned: Boolean; virtual; - function GetHeaderHeight: Integer; virtual; - function GetHeaderHeightAssigned: Boolean; virtual; - function GetRowLineCount: Integer; virtual; - - { Styles } - function GetFilterBarViewParams: TcxViewParams; override; - function GetFooterViewParams(ARecord: TcxCustomGridRecord; AGroupLevel: Integer; - AColumn: TcxGridColumn; AItem: TcxDataSummaryItem): TcxViewParams; virtual; - function GetGroupRowViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer): TcxViewParams; virtual; - function GetHeaderViewParams(AColumn: TcxGridColumn): TcxViewParams; virtual; - function GetPreviewViewParams(ARecord: TcxCustomGridRecord; - AnItem: TcxCustomGridTableItem): TcxViewParams; override; - - property InternalColumnMinWidths[Column: TcxGridColumn]: Integer read GetInternalColumnMinWidth; - property InternalColumnWidths[Column: TcxGridColumn]: Integer read GetInternalColumnWidth; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); override; - - function GridView: TcxGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxGridTableViewStyles; reintroduce; overload; - - function HasDetails(AGridRow: TcxCustomGridRow): Boolean; - - function IsSummaryHasSameLink(AItem1, AItem2: TcxDataSummaryItem): Boolean; - function CheckSummaryItemIndex(AItems: TcxDataSummaryItems; AIndex: Integer; AIsGroup: Boolean): Integer; - function GetFooterItemCount(AItems: TcxDataSummaryItems; ACanMultiLine: Boolean; AIsGroup: Boolean): Integer; - function GetFooterItemInfo(AItems: TcxDataSummaryItems; AIndex: Integer; var ARowIndex: Integer): Integer; - function GetFooterLineCount(AItems: TcxDataSummaryItems; ACanMultiLine: Boolean): Integer; - - function GetGroupFooterCount(AGridRow: TcxCustomGridRow): Integer; - function GetGroupFooterItemText(ARowIndex, ALevel, AIndex: Integer): string; - function HasGroupFooter(AGridRow: TcxCustomGridRow; ALevel: Integer): Boolean; - function HasGroupFooterItem(ALevel, AIndex: Integer): Boolean; - function HasGroupFooters(AGridRow: TcxCustomGridRow): Boolean; - - property ColumnCount: Integer read GetColumnCount; - property Columns[Index: Integer]: TcxGridColumn read GetColumn; - property DataRowHeight: Integer read GetDataRowHeight; - property DataRowHeightAssigned: Boolean read GetDataRowHeightAssigned; - property FooterHeight: Integer read GetFooterHeight; - property FooterHeightAssigned: Boolean read GetFooterHeightAssigned; - property FooterItemTexts[Index: Integer]: string read GetFooterItemText; - property FooterMultiSummaries: Boolean read GetFooterMultiSummaries; - property FooterMultiline: Boolean read GetFooterMultiline; - property GridLines: TcxGridLines read GetGridLines; - property GroupedColumnCount: Integer read GetGroupedColumnCount; - property GroupedColumns[Index: Integer]: TcxGridColumn read GetGroupedColumn; - property GroupFooterHeight: Integer read GetGroupFooterHeight; - property GroupFooterHeightAssigned: Boolean read GetGroupFooterHeightAssigned; - property GroupFooterMultiSummaries: Boolean read GetGroupFooterMultiSummaries; - property GroupFootersMode: TcxGridGroupFootersMode read GetGroupFootersMode; - property GroupFootersMultiline: Boolean read GetGroupFootersMultiline; - property GroupRowHeight: Integer read GetGroupRowHeight; - property GroupRowHeightAssigned: Boolean read GetGroupRowHeightAssigned; - property GroupRowSeparatorColor: TColor read GetGroupRowSeparatorColor; - property GroupRowSeparatorThickness: Integer read GetGroupRowSeparatorThickness; - property HasFooterItem[Index: Integer]: Boolean read GetHasFooterItem; - property HasPreview: Boolean read GetHasPreview; - property HasRowSeparators: Boolean read GetHasRowSeparators; - property HeaderAutoHeight: Boolean read GetHeaderAutoHeight; - property HeaderEndEllipsis: Boolean read GetHeaderEndEllipsis; - property HeaderHeight: Integer read GetHeaderHeight; - property HeaderHeightAssigned: Boolean read GetHeaderHeightAssigned; - property HeaderMultilines[Column: TcxGridColumn]: Boolean read GetHeaderMultiline; - property IndicatorWidth: Integer read GetIndicatorWidth; - property PreviewColumn: TcxGridColumn read GetPreviewColumn; - property PreviewLeftIndent: Integer read GetPreviewLeftIndent; - property PreviewPlace: TcxGridPreviewPlace read GetPreviewPlace; - property PreviewRightIndent: Integer read GetPreviewRightIndent; - property RowCount: Integer read GetRowCount; - property RowLineCount: Integer read GetRowLineCount; - property Rows[Index: Integer]: TcxCustomGridRow read GetRow; - property RowSeparatorColor: TColor read GetRowSeparatorColor; - property RowSeparatorThickness: Integer read GetRowSeparatorThickness; - property ShowExpandButtonsForEmptyDetails: Boolean read GetShowExpandButtonsForEmptyDetails; - property ShowHorzGridLines: Boolean read GetShowHorzGridLines; - property ShowVertGridLines: Boolean read GetShowVertGridLines; - property ThemedFooterItemColor: TColor read GetThemedFooterItemColor; - property ThemedFooterItemTextColor: TColor read GetThemedFooterItemTextColor; - property ThemedHeaderItemColor: TColor read GetThemedHeaderItemColor; - property ThemedHeaderItemTextColor: TColor read GetThemedHeaderItemTextColor; - end; - - TdxCustomGridTableViewItemPlaceControllerClass = class of TdxCustomGridTableViewItemPlaceController; - - TdxCustomGridTableViewItemPlaceController = class - private - FFormatter: TdxGridTableViewFormatter; - FHeaderLineCount: Integer; - FWidth: Integer; - function GetHeaderLineCount: Integer; - function GetWidth: Integer; - procedure SetWidth(Value: Integer); - protected - function CalculateWidth: Integer; virtual; - function CalculateHeaderLineCount: Integer; virtual; - function GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; virtual; - procedure WidthChanged; virtual; - public - constructor Create(AFormatter: TdxGridTableViewFormatter); virtual; - - procedure Calculate; virtual; - procedure Refresh; virtual; - - property Formatter: TdxGridTableViewFormatter read FFormatter; - property HeaderLineCount: Integer read GetHeaderLineCount; - property ItemsByColumn[Column: TcxGridColumn]: TdxGridTableViewColumnPlace read GetItemByColumn; default; - property Width: Integer read GetWidth write SetWidth; - end; - - TdxGridTableViewColumnPlaceClass = class of TdxGridTableViewColumnPlace; - - TdxGridTableViewColumnPlace = class - private - FColumn: TcxGridColumn; - FController: TdxGridTableViewColumnPlaceController; - FLeftBound: Integer; - FWidth: Integer; - function GetAdapter: TdxGridTableViewAdapter; - function GetCellBounds(RowIndex: Integer): TRect; - function GetCellHeight(RowIndex: Integer): Integer; - function GetFooterCellBounds: TRect; - function GetFooterLineHeight: Integer; - function GetFormatter: TdxGridTableViewFormatter; - function GetGroupFooterCellBounds(IndentCount: Integer): TRect; - function GetGroupFooterLineHeight: Integer; - function GetHeaderCellBounds: TRect; - function GetHeaderLineHeight: Integer; - function GetIndex: Integer; - function GetIsFixed: Boolean; - function GetLeftBound: Integer; - function GetMinWidth: Integer; - function GetOriginalWidth: Integer; - function GetWidth: Integer; - protected - function CalculateLeftBound: Integer; virtual; - function GetLineCount: Integer; virtual; - function GetRowIndex: Integer; virtual; - procedure InitAutoWidthItem(AnItem: TcxAutoWidthItem); virtual; - - property Adapter: TdxGridTableViewAdapter read GetAdapter; - property Formatter: TdxGridTableViewFormatter read GetFormatter; - property IsFixed: Boolean read GetIsFixed; - property LineCount: Integer read GetLineCount; - property MinWidth: Integer read GetMinWidth; - property OriginalWidth: Integer read GetOriginalWidth; - property RowIndex: Integer read GetRowIndex; - public - constructor Create(AController: TdxGridTableViewColumnPlaceController; AColumn: TcxGridColumn); virtual; - procedure Calculate(ALeftBound: Integer); virtual; - - property CellBounds[RowIndex: Integer]: TRect read GetCellBounds; - property CellHeights[RowIndex: Integer]: Integer read GetCellHeight; - property Column: TcxGridColumn read FColumn; - property Controller: TdxGridTableViewColumnPlaceController read FController; - property FooterCellBounds: TRect read GetFooterCellBounds; - property FooterLineHeight: Integer read GetFooterLineHeight; - property GroupFooterCellBounds[IndentCount: Integer]: TRect read GetGroupFooterCellBounds; - property GroupFooterLineHeight: Integer read GetGroupFooterLineHeight; - property HeaderCellBounds: TRect read GetHeaderCellBounds; - property HeaderLineHeight: Integer read GetHeaderLineHeight; - property Index: Integer read GetIndex; - property LeftBound: Integer read GetLeftBound write FLeftBound; - property Width: Integer read GetWidth write FWidth; - end; - - TdxGridTableViewColumnPlaceController = class(TdxCustomGridTableViewItemPlaceController) - private - FColumnIndexes: TList; - FItems: TList; - function GetAdapter: TdxGridTableViewAdapter; - function GetColumnIndex(Column: TcxGridColumn): Integer; - function GetItem(Index: Integer): TdxGridTableViewColumnPlace; - function GetItemCount: Integer; - procedure FreeAndNilItems; - protected - function CalculateWidth: Integer; override; - function GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; override; - - procedure AddItems; virtual; - procedure ClearItems; - function CreateItem(AColumn: TcxGridColumn): TdxGridTableViewColumnPlace; virtual; - function GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; virtual; - - function CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; virtual; - procedure CalculateItemsWidth; virtual; - - function GetItemsAutoWidth: Boolean; virtual; - function GetItemsAvailableWidth: Integer; virtual; - - property Adapter: TdxGridTableViewAdapter read GetAdapter; - property ItemsAutoWidth: Boolean read GetItemsAutoWidth; - property ItemsAvailableWidth: Integer read GetItemsAvailableWidth; - public - constructor Create(AFormatter: TdxGridTableViewFormatter); override; - destructor Destroy; override; - - procedure Calculate; override; - procedure Refresh; override; - - function IndexOf(AnItem: TdxGridTableViewColumnPlace): Integer; overload; - function IndexOf(AColumn: TcxGridColumn): Integer; overload; - - property ColumnIndexes[Column: TcxGridColumn]: Integer read GetColumnIndex; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TdxGridTableViewColumnPlace read GetItem; default; - end; - - TdxGridTableViewReportDataAdapter = class - private - FBuilder: TdxCustomGridViewBuilder; - function GetReportItem(Row: TcxCustomGridRow; Column: TcxGridColumn): TdxReportVisualItem; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowByGridRow(Row: TcxCustomGridRow): TdxReportCell; - function GetReportRowCount: Integer; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); virtual; - - property Builder: TdxCustomGridViewBuilder read FBuilder; - property ReportItems[Row: TcxCustomGridRow; Column: TcxGridColumn]: TdxReportVisualItem read GetReportItem; - property ReportRowCount: Integer read GetReportRowCount; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; default; - property ReportRowsByGridRow[Row: TcxCustomGridRow]: TdxReportCell read GetReportRowByGridRow; - end; - - TdxGridTableViewFormatter = class(TdxCustomGridTableViewFormatter) - private - FColumns: TList; - FDetailsLineHeight: Integer; - FFooterLineHeight: Integer; - FGroupFooterLineHeight: Integer; - FGroupRowLineHeight: Integer; - FHeaderLineHeight: Integer; - FItemPlaceController: TdxCustomGridTableViewItemPlaceController; - FPreviewLineHeight: Integer; - FReportDataAdapter: TdxGridTableViewReportDataAdapter; - FRowHeights: TList; - function GetColumn(Index: Integer): TcxGridColumn; - function GetColumnCount: Integer; - function GetGroupRowSeparatorColor: TColor; - function GetGroupRowSeparatorThickness: Integer; - function GetHasPreview: Boolean; - function GetHeaderLineCount: Integer; - function GetPreviewAutoHeight: Boolean; - function GetPreviewColumn: TcxGridColumn; - function GetPreviewMaxLineCount: Integer; - function GetRow(Index: Integer): TcxCustomGridRow; - function GetRowCount: Integer; - function GetRowHeight(Index: Integer): Integer; - function GetRowHeightByRow(Row: TcxCustomGridRow): Integer; - function GetRowSeparatorColor: TColor; - function GetRowSeparatorThickness: Integer; - function GetShowGroupFooters: Boolean; - function GetShowFooters: Boolean; - function GetShowHeaders: Boolean; - function GetShowPreview: Boolean; - procedure SetRowHeight(Index: Integer; Value: Integer); - procedure SetRowHeightByRow(Row: TcxCustomGridRow; Value: Integer); - protected - { IdxPSCellParams2 } - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; override; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; override; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; override; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; override; - - procedure AddHorizontalDelimiters; override; - {$IFDEF DXVER500} - procedure AfterBuilding; override; - {$ENDIF} - procedure BeforeBuilding; override; - procedure Calculate; override; - procedure CalculateDataRowHeights; virtual; - procedure CalculateLineHeights; override; - - function GetAlignSummaryWithColumns: Boolean; virtual; - function GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; virtual; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - {$IFDEF DXVER500} - function CanCellMerging: Boolean; virtual; - function CanColumnCellMerging(AColumn: TcxGridColumn): Boolean; virtual; - procedure PerformCellMerging; virtual; - procedure PerformColumnCellMerging(AColumn: TcxGridColumn); virtual; - {$ENDIF} - - // actual columns used inside building (depends on ActualVisibility of columns and selection status) - procedure BuildColumnList; virtual; - procedure BuildItemLists; virtual; - function IsColumnActuallyVisible(AColumn: TcxGridColumn): Boolean; virtual; - - function GetViewWidth: Integer; override; - - property ItemPlaceController: TdxCustomGridTableViewItemPlaceController read FItemPlaceController; - property ReportDataAdapter: TdxGridTableViewReportDataAdapter read FReportDataAdapter; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - function Builder: TdxGridTableViewBuilder; reintroduce; overload; - - { Footers } - procedure DoInitializeFooterItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer; AItem: TcxDataSummaryItem); virtual; - procedure DoInitializeFooterRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeFooterItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - function GetFooterItemBounds(AnIndex: Integer): TRect; virtual; - function GetFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetFooterItemViewParams(AColumn: TcxGridColumn; AItem: TcxDataSummaryItem): TdxReportItemViewParams; virtual; - - { Group Footers } - procedure DoInitializeGroupFooterHost(AnItem: TdxReportVisualItem; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); virtual; - procedure DoInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; const AValue: Variant; AItem: TcxDataSummaryItem); virtual; - procedure DoInitializeGroupFooterRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord; AGroupLevel: Integer); virtual; - procedure DoReportLinkInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxGridColumn; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); virtual; - function GetGroupFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetGroupFooterItemBounds(AnIndex, AGroupLevel: Integer): TRect; virtual; - function GetGroupFooterItemViewParams(ARecord: TcxCustomGridRecord; AGroupLevel: Integer; - AColumn: TcxGridColumn; AItem: TcxDataSummaryItem): TdxReportItemViewParams; virtual; - - { Group Row } - procedure DoInitializeGroupRowItem(AnItem: TAbstractdxReportCellData; ARow: TcxGridGroupRow; - AIndex: Integer; const AText: string); virtual; - procedure DoInitializeGroupRow(ARow: TdxReportCell; ARecord: TcxCustomGridRecord); virtual; - function GetGroupRowClass: TdxReportCellTextClass; virtual; - function GetGroupRowViewParams(ARecord: TcxCustomGridRecord; ALevel: Integer): TdxReportItemViewParams; virtual; - - { Group Row Separator - Office11 Grouping Style } - procedure DoInitializeGroupRowSeparator(ASeparator: TAbstractdxReportCellData); virtual; - procedure DoInitializeGroupSeparatorRow(ARow: TdxReportCell); virtual; - function GetGroupRowSeparatorClass: TdxReportCellDataClass; virtual; - - { Headers } - procedure DoInitializeHeaderItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeHeaderRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeHeaderItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - function GetHeaderItemBounds(AnIndex: Integer): TRect; virtual; - function GetHeaderItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetHeaderItemViewParams(AColumn: TcxGridColumn): TdxReportItemViewParams; virtual; - - { Indents and Expand Buttons } - function CreateIndent(AParent: TdxReportCell): TdxReportCellExpandButton; virtual; - procedure DoInitializeDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeGroupFooterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeGroupRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeMasterDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeRowSeparatorIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - function GetIndentClass: TdxReportCellExpandButtonClass; virtual; - function GetIndentViewParams(ARecord: TcxCustomGridRecord; - AnIndex, AnIndentCount: Integer; ANonRecordIndent: Boolean): TdxReportItemViewParams; virtual; - function HasExpandButton(ARecord: TcxCustomGridRecord): Boolean; virtual; - - { Items } - procedure DoInitializeDataRow(ARow: TdxReportCell; ARecord: TcxCustomGridRecord); virtual; - procedure DoReportLinkInitializeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxGridColumn; ARecord: TcxCustomGridRecord); virtual; - function GetItemBounds(AGridRow: TcxCustomGridRow; - AGridRowIndex, AColumnIndex: Integer): TRect; virtual; - function GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False; AIsDataCell: Boolean = False): TdxReportItemViewParams; override; - - { Master Indent } - procedure DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer); override; - - { Preview } - procedure DoInitializePreview(APreview: TAbstractdxReportCellData; AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord); virtual; - function GetPreviewClass(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportCellDataClass; virtual; - function GetPreviewViewParams(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportItemViewParams; virtual; - - { Row Separator } - procedure DoInitializeSeparatorRow(ARow: TdxReportCell); virtual; - procedure DoInitializeRowSeparator(ASeparator: TAbstractdxReportCellData); virtual; - function GetRowSeparatorClass: TdxReportCellDataClass; virtual; - - function GetReportItem(ARow: TcxCustomGridRow; AColumn: TcxGridColumn): TdxReportVisualItem; - - property AlignSummaryWithColumns: Boolean read GetAlignSummaryWithColumns; - property ColumnCount: Integer read GetColumnCount; - property Columns[Index: Integer]: TcxGridColumn read GetColumn; - property DetailsLineHeight: Integer read FDetailsLineHeight write FDetailsLineHeight; - property FooterLineHeight: Integer read FFooterLineHeight write FFooterLineHeight; - property GroupFooterLineHeight: Integer read FGroupFooterLineHeight write FGroupFooterLineHeight; - property GroupRowLineHeight: Integer read FGroupRowLineHeight write FGroupRowLineHeight; - property GroupRowSeparatorColor: TColor read GetGroupRowSeparatorColor; - property GroupRowSeparatorThickness: Integer read GetGroupRowSeparatorThickness; - property HasPreview: Boolean read GetHasPreview; - property HeaderLineCount: Integer read GetHeaderLineCount; - property HeaderLineHeight: Integer read FHeaderLineHeight write FHeaderLineHeight; - property PreviewAutoHeight: Boolean read GetPreviewAutoHeight; - property PreviewColumn: TcxGridColumn read GetPreviewColumn; - property PreviewLineHeight: Integer read FPreviewLineHeight write FPreviewLineHeight; - property PreviewMaxLineCount: Integer read GetPreviewMaxLineCount; - property RowCount: Integer read GetRowCount; - property RowHeights[Index: Integer]: Integer read GetRowHeight write SetRowHeight; - property RowHeightsByRow[Row: TcxCustomGridRow]: Integer read GetRowHeightByRow write SetRowHeightByRow; - property Rows[Index: Integer]: TcxCustomGridRow read GetRow; - property RowSeparatorColor: TColor read GetRowSeparatorColor; - property RowSeparatorThickness: Integer read GetRowSeparatorThickness; - property ShowGroupFooters: Boolean read GetShowGroupFooters; - property ShowFooters: Boolean read GetShowFooters; - property ShowHeaders: Boolean read GetShowHeaders; - property ShowPreview: Boolean read GetShowPreview; - end; - - TdxGridTableViewBuilder = class(TdxCustomGridTableViewBuilder) - private - function GetLastReportRow: TdxReportCell; - function GetProcessedView: TcxCustomGridView; - procedure SetProcessedView(Value: TcxCustomGridView); - protected - procedure AddDelimitersHardVert(AReportRow: TdxReportCell); - - procedure DoBuildViewBody; override; - procedure DoBuildViewFooter; override; - - { Details View } - procedure CreateDetails(AMasterRow: TcxGridMasterDataRow); virtual; - procedure CreateDetailView(AGridView: TcxCustomGridView); virtual; - function GetAreDetailsBuilt: Boolean; virtual; - - { Footer } - procedure CreateFooter; virtual; - function GetFootersProducer: TdxGridTableViewFootersProducer; virtual; - function GetFootersProducerClass: TdxGridTableViewFootersProducerClass; virtual; - - { Group Footer } - procedure CreateGroupFooters(AGridRow: TcxCustomGridRow); virtual; - function GetGroupFooterProducer: TdxGridTableViewGroupFooterProducer; virtual; - function GetGroupFooterProducerClass: TdxGridTableViewGroupFooterProducerClass; virtual; - - { Header } - procedure CreateHeader; virtual; - function GetHeadersProducer: TdxGridTableViewHeadersProducer; virtual; - function GetHeadersProducerClass: TdxGridTableViewHeadersProducerClass; virtual; - - { Rows } - procedure CreateRow(AGridRow: TcxCustomGridRow; ARowIndex: Integer); virtual; - procedure CreateRows; virtual; - function GetRowProducer(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducer; virtual; - function GetRowProducerClass(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducerClass; virtual; - - { Row Separators } - procedure CreateRowSeparator(AGridRow: TcxCustomGridRow; AnIsLast: Boolean = False); virtual; - function GetRowSeparatorProducer: TdxGridTableViewRowSeparatorProducer; virtual; - function GetRowSeparatorProducerClass: TdxGridTableViewRowSeparatorProducerClass; virtual; - function GetShowRowSeparators: Boolean; virtual; - - { GroupRow Separators } - procedure CreateGroupRowSeparator(AGridRow: TcxGridGroupRow); virtual; - function GetGroupRowSeparatorProducer: TdxGridTableViewGroupRowSeparatorProducer; virtual; - function GetGroupRowSeparatorProducerClass: TdxGridTableViewGroupRowSeparatorProducerClass; virtual; - function GetShowGroupRowSeparators: Boolean; virtual; - - function GridView: TcxGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - - property LastReportRow: TdxReportCell read GetLastReportRow; - property ProcessedView: TcxCustomGridView read GetProcessedView write SetProcessedView; - public - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxGridTableViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - - property AreDetailsBuilt: Boolean read GetAreDetailsBuilt; - property ShowGroupRowSeparators: Boolean read GetShowGroupRowSeparators; - property ShowRowSeparators: Boolean read GetShowRowSeparators; - end; - - { DBTableView Adapter, Formatter and Builder } - - TdxGridDBTableViewAdapter = class(TdxGridTableViewAdapter) - private - FPrevAllRecordsAreLoaded: Boolean; - protected - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - function DataController: TcxGridDBDataController; reintroduce; overload; - - function DBDataModeController: TcxDBDataModeController; virtual; - procedure LoadAllRecords; virtual; - procedure UnloadAllRecords; virtual; - public - function GridView: TcxGridDBTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - end; - - TdxGridDBTableViewBuilder = class(TdxGridTableViewBuilder) - public - function Adapter: TdxGridDBTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - end; - - { BandedTableView Adapter, Formatter and Builder } - - TdxGridBandedTableViewAdapter = class(TdxGridTableViewAdapter) - private - FFooterLineCount: Integer; - function GetBand(Index: Integer): TcxGridBand; - function GetBandCount: Integer; - function GetBandEndEllipsis: Boolean; - function GetBandHeaderLineCount: Integer; - function GetBandHeaderMultiline: Boolean; - function GetBottomBand(Index: Integer): TcxGridBand; - function GetBottomBandCount: Integer; - function GetColumn(Index: Integer): TcxGridBandedColumn; - function GetFooterLineCount: Integer; - function GetRootBand(Index: Integer): TcxGridBand; - function GetRootBandCount: Integer; - function GetThemedBandHeaderItemColor: TColor; - function GetThemedBandHeaderItemTextColor: TColor; - protected - function CalculateDetailsLineCount: Integer; override; - function CalculateFooterLineCount: Integer; virtual; - - function GetBandHeaderHeight: Integer; virtual; - function GetBandHeaderHeightAssigned: Boolean; virtual; - function GetBandHeaderViewParams(ABand: TcxGridBand): TcxViewParams; virtual; - function GetDataRowHeightAssigned: Boolean; override; - function GetFooterHeightAssigned: Boolean; override; - function GetHeaderHeightAssigned: Boolean; override; - function GetHeaderMultiline(Column: TcxGridColumn): Boolean; override; - function GetRowLineCount: Integer; override; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); override; - - function GridView: TcxGridBandedTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxGridBandedTableViewStyles; reintroduce; overload; - - property BandCount: Integer read GetBandCount; - property BandEndEllipsis: Boolean read GetBandEndEllipsis; - property BandHeaderHeight: Integer read GetBandHeaderHeight; - property BandHeaderHeightAssigned: Boolean read GetBandHeaderHeightAssigned; - property BandHeaderLineCount: Integer read GetBandHeaderLineCount; - property BandHeaderMultiline: Boolean read GetBandHeaderMultiline; - property Bands[Index: Integer]: TcxGridBand read GetBand; - property BottomBandCount: Integer read GetBottomBandCount; - property BottomBands[Index: Integer]: TcxGridBand read GetBottomBand; - property Columns[Index: Integer]: TcxGridBandedColumn read GetColumn; - property FooterLineCount: Integer read GetFooterLineCount write FFooterLineCount; - property RootBandCount: Integer read GetRootBandCount; - property RootBands[Index: Integer]: TcxGridBand read GetRootBand; - property ThemedBandHeaderItemColor: TColor read GetThemedBandHeaderItemColor; - property ThemedBandHeaderItemTextColor: TColor read GetThemedBandHeaderItemTextColor; - end; - - TdxGridBandedTableViewColumnPlace = class(TdxGridTableViewColumnPlace) - private - function GetColumn: TcxGridBandedColumn; - function GetController: TdxCustomGridBandedTableViewItemPlace; - function GetFormatter: TdxGridBandedTableViewFormatter; - protected - function GetLineCount: Integer; override; - function GetRowIndex: Integer; override; - public - property Column: TcxGridBandedColumn read GetColumn; - property Controller: TdxCustomGridBandedTableViewItemPlace read GetController; - property Formatter: TdxGridBandedTableViewFormatter read GetFormatter; - end; - - TdxCustomGridBandedTableViewItemPlaceClass = class of TdxCustomGridBandedTableViewItemPlace; - - TdxCustomGridBandedTableViewItemPlace = class(TdxGridTableViewColumnPlaceController) - private - FBand: TcxGridBand; - FController: TdxGridBandedTableViewItemPlaceController; - FHeight: Integer; - FLeftBound: Integer; - FMinWidth: Integer; - FParent: TdxGridBandedTableViewItemPlace; - FTopBound: Integer; - function GetAdapter: TdxGridBandedTableViewAdapter; - function GetBounds: TRect; - function GetFormatter: TdxGridBandedTableViewFormatter; - function GetHeight: Integer; - function GetIndex: Integer; - function GetIsFixed: Boolean; - function GetLeftBound: Integer; - function GetLevelIndex: Integer; - function GetMinWidth: Integer; - function GetTopBound: Integer; - function GetViewParams: TdxReportItemViewParams; - protected - function CalculateHeaderLineCount: Integer; override; - function CalculateWidth: Integer; override; - function GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; override; - - procedure AssignWidth; - function CalculateHeight: Integer; virtual; - function CalculateLeftBound: Integer; virtual; - function CalculateLevelHeight: Integer; virtual; - function CalculateLineHeight: Integer; virtual; - function CalculateMinWidth: Integer; virtual; - function CalculateTopBound: Integer; virtual; - procedure InitAutoWidthItem(AnItem: TcxAutoWidthItem); virtual; - - function GetRowCount: Integer; virtual; - function InternalCalculateMinWidth: Integer; virtual; - function InternalCalculateWidth: Integer; virtual; - - property Adapter: TdxGridBandedTableViewAdapter read GetAdapter; - property Band: TcxGridBand read FBand; - property IsFixed: Boolean read GetIsFixed; - property LevelIndex: Integer read GetLevelIndex; - property MinWidth: Integer read GetMinWidth; - property RowCount: Integer read GetRowCount; - property ViewParams: TdxReportItemViewParams read GetViewParams; - public - constructor Create(AController: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); reintroduce; virtual; - - property Bounds: TRect read GetBounds; - property Controller: TdxGridBandedTableViewItemPlaceController read FController; - property Formatter: TdxGridBandedTableViewFormatter read GetFormatter; - property Height: Integer read GetHeight write FHeight; - property Index: Integer read GetIndex; - property LeftBound: Integer read GetLeftBound write FLeftBound; - property Parent: TdxGridBandedTableViewItemPlace read FParent; - property TopBound: Integer read GetTopBound write FTopBound; - end; - - TdxGridBandedTableViewItemPlace = class(TdxCustomGridBandedTableViewItemPlace) - private - FChildItems: TList; - function GetChildItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetChildItemCount: Integer; - protected - function GetRowCount: Integer; override; - function InternalCalculateMinWidth: Integer; override; - function InternalCalculateWidth: Integer; override; - procedure WidthChanged; override; - - procedure CalculateChildItemWidths; - {$IFDEF DXVER500} - procedure RefreshChildItems; - {$ENDIF} - public - constructor Create(AnOwner: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); override; - destructor Destroy; override; - - function IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; - {$IFDEF DXVER500} - procedure Refresh; override; - {$ENDIF} - - property ChildItemCount: Integer read GetChildItemCount; - property ChildItems[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetChildItem; - end; - - TdxGridBandedTableViewBottomItemPlace = class(TdxCustomGridBandedTableViewItemPlace) - protected - procedure AddItems; override; - function CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; override; - procedure CalculateItemsWidth; override; - function GetItemsAutoWidth: Boolean; override; - function GetItemsAvailableWidth: Integer; override; - - function GetRowCount: Integer; override; - function InternalCalculateMinWidth: Integer; override; - function InternalCalculateWidth: Integer; override; - procedure WidthChanged; override; - end; - - TdxGridBandedTableViewItemPlaceController = class(TdxCustomGridTableViewItemPlaceController) - private - FBottomItems: TList; - FHeight: Integer; - FItems: TList; - FLevelCount: Integer; - FLevelHeights: TList; - FRootItems: TList; - function GetAdapter: TdxGridBandedTableViewAdapter; - function GetAutoWidth: Boolean; - function GetAvailableWidth: Integer; - function GetBottomItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetBottomItemCount: Integer; - function GetFormatter: TdxGridBandedTableViewFormatter; - function GetHeight: Integer; - function GetItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetItemByBand(Band: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; - function GetItemCount: Integer; - function GetLevelCount: Integer; - function GetLevelHeight(Index: Integer): Integer; - function GetRootItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetRootItemCount: Integer; - procedure SetLevelHeight(Index: Integer; Value: Integer); - procedure FreeAndNilItems; - protected - function CalculateHeaderLineCount: Integer; override; - function CalculateWidth: Integer; override; - function GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; override; - - procedure AddItems; virtual; - procedure ClearItems; - function CreateItem(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; virtual; - function GetItemClass(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlaceClass; virtual; - procedure RefreshBottomItems; - procedure RefreshItems; - procedure RefreshRootItems; - - function CalculateHeight: Integer; virtual; - function CalculateItemHeight(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; virtual; - function CalculateItemLeftBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; virtual; - function CalculateItemTopBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; virtual; - function CalculateLevelCount: Integer; virtual; - - procedure CalculateItemWidths; - procedure CalculateLevelHeights; - - property AutoWidth: Boolean read GetAutoWidth; - property Adapter: TdxGridBandedTableViewAdapter read GetAdapter; - property AvailableWidth: Integer read GetAvailableWidth; - public - constructor Create(AFormatter: TdxGridTableViewFormatter); override; - destructor Destroy; override; - - procedure Calculate; override; - procedure Refresh; override; - - function IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; overload; - function IndexOf(ABand: TcxGridBand): Integer; overload; - function RootIndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; overload; - function RootIndexOf(ABand: TcxGridBand): Integer; overload; - - property BottomItemCount: Integer read GetBottomItemCount; - property BottomItems[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetBottomItem; - property Formatter: TdxGridBandedTableViewFormatter read GetFormatter; - property Height: Integer read GetHeight; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetItem; default; - property ItemsByBand[Band: TcxGridBand]: TdxCustomGridBandedTableViewItemPlace read GetItemByBand; - property LevelCount: Integer read GetLevelCount; - property LevelHeights[Index: Integer]: Integer read GetLevelHeight write SetLevelHeight; - property RootItemCount: Integer read GetRootItemCount; - property RootItems[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetRootItem; - end; - - TdxGridBandedTableViewFormatter = class(TdxGridTableViewFormatter) - private - FBands: TList; - FHeadersSingleLine: Boolean; - function GetBand(Index: Integer): TcxGridBand; - function GetBandCount: Integer; - function GetColumn(Index: Integer): TcxGridBandedColumn; - function GetItemPlaceController: TdxGridBandedTableViewItemPlaceController; - function GetShowBandHeaders: Boolean; - protected - procedure AddHorizontalDelimiters; override; - - {$IFDEF DXVER500} - function CanColumnCellMerging(AColumn: TcxGridColumn): Boolean; override; - function IsColumnActuallyVisible(AColumn: TcxGridColumn): Boolean; override; - {$ENDIF} - function GetAlignSummaryWithColumns: Boolean; override; - function GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; override; - - procedure BuildBandList; virtual; - procedure BuildItemLists; override; - function IsBandActuallyVisible(ABand: TcxGridBand): Boolean; virtual; - - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - property HeadersSingleLine: Boolean read FHeadersSingleLine; - property ItemPlaceController: TdxGridBandedTableViewItemPlaceController read GetItemPlaceController; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Adapter: TdxGridBandedTableViewAdapter; reintroduce; overload; - function Builder: TdxGridBandedTableViewBuilder; reintroduce; overload; - - { Bands } - procedure DoInitializeBandItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeBandRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeBandItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - function GetBandItemBounds(AnIndex: Integer): TRect; virtual; - function GetBandItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetBandItemViewParams(ABand: TcxGridBand): TdxReportItemViewParams; virtual; - - property BandCount: Integer read GetBandCount; - property Bands[Index: Integer]: TcxGridBand read GetBand; - property Columns[Index: Integer]: TcxGridBandedColumn read GetColumn; - property ShowBandHeaders: Boolean read GetShowBandHeaders; - end; - - TdxGridBandedTableViewBuilder = class(TdxGridTableViewBuilder) - protected - procedure DoBuildViewBody; override; - - procedure CreateBands; virtual; - function GetBandsProducer: TdxGridTableViewBandsProducer; virtual; - function GetBandsProducerClass: TdxGridTableViewBandsProducerClass; virtual; - - function GridView: TcxGridBandedTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - public - function Adapter: TdxGridBandedTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxGridBandedTableViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - end; - - { DBBandedTableView Adapter, Formatter and Builder } - - TdxGridDBBandedTableViewAdapter = class(TdxGridBandedTableViewAdapter) - private - FPrevAllRecordsAreLoaded: Boolean; - protected - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - function DataController: TcxGridDBDataController; reintroduce; overload; - - function DBDataModeController: TcxDBDataModeController; virtual; - procedure LoadAllRecords; virtual; - procedure UnloadAllRecords; virtual; - public - function GridView: TcxGridDBBandedTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - end; - - TdxGridDBBandedTableViewBuilder = class(TdxGridBandedTableViewBuilder) - public - function Adapter: TdxGridDBBandedTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - end; - - { CardView Adapter, Formatter and Builder } - - TdxReportCard = class; - TdxReportCardHorz = class; - TdxReportCardVert = class; - TdxReportCardRow = class; - - TdxReportCardRowClass = class of TdxReportCardRow; - TdxReportCardLayerClass = class of TdxReportCardLayer; - - TdxReportCardLayer = class(TdxReportCell) - private - FCategorySeparator: TdxReportCellBox; - FLayerSeparator: TdxReportCellBox; - FNeedCategorySeparator: Boolean; - FNeedLayerSeparator: Boolean; - FRows: TList; - function GetBeginsLayerRow: TcxGridCardViewRow; - function GetCard: TdxReportCardHorz; - function GetHeight: Integer; - function GetInternalHeight: Integer; - function GetInternalWidth: Integer; - function GetRow(AIndex: Integer): TdxReportCardRow; - function GetRowCount: Integer; - function GetWidth: Integer; - procedure SetHeight(AValue: Integer); - procedure SetInternalHeight(AValue: Integer); - procedure SetInternalWidth(AValue: Integer); - procedure SetWidth(AValue: Integer); - protected - procedure AdjustRowsHeight; virtual; - procedure AdjustRowHeight(DC: HDC; AAutoHeight: Boolean; ABuilder: TdxGridCardViewBuilder); virtual; - function CanHaveIndent(ARow: TdxReportCardRow): Boolean; virtual; - procedure CheckNeedCategorySeparator(ANextLayer: TdxReportCardLayer); virtual; - procedure CreateItems(ABuilder: TdxGridCardViewBuilder); - procedure CreateCategorySeparator; - procedure CreateLayerSeparator; virtual; - procedure InitAutoWidthItem(AnItem: TcxAutoWidthItem; var AAllFixed: Boolean); - procedure PlaceSeparatorAndExcludeHeightFromHeight(var AValue: Integer); virtual; - procedure RecalculateHeight; virtual; - procedure ResizeRowsHorz; virtual; - function SetPosition(ALeft, AWidth: Integer): Integer; - procedure SetRowCaptionWidth(DC: HDC; ACaptionAutoWidths: Boolean; AValue: Integer); virtual; - procedure SetRowHeight(ARowIndex, AValue: Integer); virtual; - procedure SizeChanged; virtual; - - property InternalHeight: Integer read GetInternalHeight write SetInternalHeight; - property InternalWidth: Integer read GetInternalWidth write SetInternalWidth; - - property NeedCategorySeparator: Boolean read FNeedCategorySeparator write FNeedCategorySeparator; - property NeedLayerSeparator: Boolean read FNeedLayerSeparator write FNeedLayerSeparator; - public - constructor CreateEx(AParent: TdxReportCell; ABeginsLayerRow: TcxGridCardViewRow); virtual; - destructor Destroy; override; - procedure AdjustCellSides; virtual; - function AddRow(AGridCardRow: TcxGridCardViewRow): TdxReportCardRow; - function MeasureCaptionWidth(DC: HDC): Integer; virtual; - function MeasureDataWidth(DC: HDC): Integer; - function MeasureLayerHeight(DC: HDC; ACalculateLineHeight: Boolean; - ABuilder: TdxGridCardViewBuilder): Integer; virtual; - function MeasureWidth(DC: HDC): Integer; override; - - property BeginsLayerRow: TcxGridCardViewRow read GetBeginsLayerRow; - property Card: TdxReportCardHorz read GetCard; - property CategorySeparator: TdxReportCellBox read FCategorySeparator; - property Height: Integer read GetHeight write SetHeight; - property LayerSeparator: TdxReportCellBox read FLayerSeparator; - property RowCount: Integer read GetRowCount; - property Rows[Index: Integer]: TdxReportCardRow read GetRow; default; - property Width: Integer read GetWidth write SetWidth; - end; - - TdxReportCardVerticalLayer = class(TdxReportCardLayer) - protected - procedure AdjustRowsHeight; override; - function CanHaveIndent(ARow: TdxReportCardRow): Boolean; override; - procedure CreateLayerSeparator; override; - procedure CheckNeedCategorySeparator(ANextLayer: TdxReportCardLayer); override; - procedure PlaceSeparatorAndExcludeHeightFromHeight(var AValue: Integer); override; - procedure RecalculateHeight; override; - procedure SetRowCaptionWidth(DC: HDC; ACaptionAutoWidths: Boolean; AValue: Integer); override; - procedure SizeChanged; override; - public - procedure AdjustCellSides; override; - function MeasureCaptionWidth(DC: HDC): Integer; override; - function MeasureWidth(DC: HDC): Integer; override; - end; - - TdxReportCardRow = class(TdxReportCell) - private - FNeedSeparator: Boolean; - FRowCaption: TdxReportCellText; - FRowData: TAbstractdxReportCellData; - FRowIndent: TdxReportCellExpandButton; - FRowSeparator: TdxReportCellBox; - function GetCard: TdxReportCard; - function GetGridCardRow: TcxGridCardViewRow; - function GetHasCaption: Boolean; - function GetHasData: Boolean; - function GetHasIndent: Boolean; - function GetHasRowSeparator: Boolean; - function GetHeight: Integer; - function GetLayer: TdxReportCardLayer; - function GetProperties: TcxCustomEditProperties; - function GetWidth: Integer; - procedure SetHeight(AValue: Integer); - procedure SetRowCaptionWidth(Value: Integer); - procedure SetWidth(Value: Integer); - protected - procedure AdjustCellSides(AIsFirstItem, AIsLastItem, AIsLeftItem, AIsRightItem: Boolean); virtual; - procedure CreateItems(ABuilder: TdxGridCardViewBuilder); virtual; - function MeasureCaptionWidth(DC: HDC): Integer; - function MeasureDataWidth(DC: HDC): Integer; - - property Properties: TcxCustomEditProperties read GetProperties; - property NeedSeparator: Boolean read FNeedSeparator write FNeedSeparator; - public - constructor CreateEx(AParent: TdxReportCell; AGridCardRow: TcxGridCardViewRow); virtual; - - function MeasureHeight(DC: HDC; ACalculateLineHeight: Boolean; - ABuilder: TdxGridCardViewBuilder): Integer; reintroduce; overload; - function MeasureWidth(DC: HDC): Integer; override; - - property Card: TdxReportCard read GetCard; - property GridCardRow: TcxGridCardViewRow read GetGridCardRow; - property HasCaption: Boolean read GetHasCaption; - property HasData: Boolean read GetHasData; - property HasIndent: Boolean read GetHasIndent; - property HasRowSeparator: Boolean read GetHasRowSeparator; - property Height: Integer read GetHeight write SetHeight; - property Layer: TdxReportCardLayer read GetLayer; - property RowCaption: TdxReportCellText read FRowCaption; - property RowCaptionWidth: Integer write SetRowCaptionWidth; - property RowData: TAbstractdxReportCellData read FRowData; - property RowIndent: TdxReportCellExpandButton read FRowIndent; - property RowSeparator: TdxReportCellBox read FRowSeparator; - - property Width: Integer read GetWidth write SetWidth; - - end; - - TdxCardBorderPainter = class(TdxPSCellBorderPainter) - protected - procedure DrawShadow(DC: HDC); virtual; - public - procedure Paint(DC: HDC); override; - function Card: TdxReportCard; reintroduce; overload; - end; - - TdxGridCardShadowDepth = 0..15; - TdxGridCardShadowPosition = (cspTopLeft, cspTopRight, cspBottomRight, cspBottomLeft); - - TdxReportCard = class(TdxReportCell) - private - FCaptionWidth: Integer; - FLayerCaptionWidth: Integer; - FShadowColor: TColor; - FShadowDepth: Integer; - FShadowPosition: TdxGridCardShadowPosition; - function GetContentHeight: Integer; - function GetContentWidth: Integer; - function GetHasShadow: Boolean; - function GetHeight: Integer; - function GetLayerCount: Integer; - function GetLayer(Index: Integer): TdxReportCardLayer; - function GetLayerHeight(Index: Integer): Integer; - function GetLayersOriginLeft: Integer; - function GetLayersOriginTop: Integer; - function GetReportLink: TdxGridReportLink; - function GetShadowRectHorz: TRect; - function GetShadowRectVert: TRect; - function GetGridCard: TcxGridCard; - function GetWidth: Integer; - procedure SetContentHeight(AValue: Integer); - procedure SetContentWidth(AValue: Integer); - procedure SetHeight(Value: Integer); - procedure SetShadowDepth2(AValue: Integer); - procedure SetWidth(Value: Integer); - protected - procedure AddVerticalDelimiters; virtual; - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - function GetBorderPainterClass: TdxPSCellBorderPainterClass; override; - procedure ReadProperties(AReader: TdxPSDataReader); override; - procedure WriteProperties(AWriter: TdxPSDataWriter); override; - - procedure AdjustHeight; virtual; abstract; - procedure AdjustWidth(DC: HDC); virtual; abstract; - function MeasureCaptionWidth(DC: HDC): Integer; virtual; abstract; - procedure SetCaptionWidth(DC: HDC; ALayer, AValue, AMaxValue: Integer; ACaptionAutoWidths: Boolean); virtual; - // layers - procedure AdjustLayers; virtual; - procedure AdjustLayersCellSides; virtual; abstract; - procedure AdjustLayersPos; virtual; abstract; - procedure CreateLayers(ABuilder: TdxGridCardViewBuilder); virtual; - function GetLayerClass: TdxReportCardLayerClass; virtual; - function GetLayerIndexByRow(ARow: TcxGridCardViewRow): Integer; virtual; - function GetLayerWidth(Index: Integer): Integer; virtual; - function HasLayerSeparator(ALayerIndex: Integer): Boolean; virtual; - procedure RecalculateLayersHeight; - procedure SetLayerHeight(Index, Value: Integer); virtual; - procedure SetLayerWidth(Index, Value: Integer); virtual; - // virtual card rows - procedure AdjustRowHeight(DC: HDC; AAutoHeight: Boolean; ABuilder: TdxGridCardViewBuilder); virtual; abstract; - function GetRowCount: Integer; virtual; - function GetRowHeight(AIndex: Integer): Integer; virtual; - procedure SetRowHeight(AIndex, AValue: Integer); virtual; - procedure SizeChanged; virtual; - - property ReportLink: TdxGridReportLink read GetReportLink; - public - constructor Create(AParent: TdxReportCell); override; - constructor CreateEx(AParent: TdxReportCell; AGridCard: TcxGridCard); virtual; - function GetBorderOuterBounds(DC: HDC): TRect; override; - - property CaptionWidth: Integer read FCaptionWidth write FCaptionWidth; - property ContentHeight: Integer read GetContentHeight write SetContentHeight; - property ContentWidth: Integer read GetContentWidth write SetContentWidth; - property GridCard: TcxGridCard read GetGridCard; - property HasShadow: Boolean read GetHasShadow; - property Height: Integer read GetHeight write SetHeight; - property LayerCaptionWidth: Integer read FLayerCaptionWidth write FLayerCaptionWidth; - property LayerCount: Integer read GetLayerCount; - property LayerHeights[Index: Integer]: Integer read GetLayerHeight write SetLayerHeight; - property Layers[Index: Integer]: TdxReportCardLayer read GetLayer; - property LayersOriginLeft: Integer read GetLayersOriginLeft; - property LayersOriginTop: Integer read GetLayersOriginTop; - property LayerWidths[Index: Integer]: Integer read GetLayerWidth write SetLayerWidth; - property RowCount: Integer read GetRowCount; - property RowHeight[AIndex: Integer]: Integer read GetRowHeight write SetRowHeight; - property ShadowColor: TColor read FShadowColor write FShadowColor default clBlack; - property ShadowDepth: Integer read FShadowDepth write SetShadowDepth2 default dxDefaultCardsShadowDepth; - property ShadowPosition: TdxGridCardShadowPosition read FShadowPosition write FShadowPosition default cspBottomRight; - property ShadowRectHorz: TRect read GetShadowRectHorz; - property ShadowRectVert: TRect read GetShadowRectVert; - property Width: Integer read GetWidth write SetWidth; - end; - - TdxReportCardHorz = class(TdxReportCard) - protected - procedure AdjustHeight; override; - procedure AdjustLayersCellSides; override; - procedure AdjustLayersPos; override; - procedure AdjustRowHeight(DC: HDC; AAutoHeight: Boolean; ABuilder: TdxGridCardViewBuilder); override; - procedure AdjustWidth(DC: HDC); override; - function MeasureCaptionWidth(DC: HDC): Integer; override; - function MeasureDataWidth(DC: HDC): Integer; virtual; - procedure SizeChanged; override; - end; - - TdxReportCardVert = class(TdxReportCard) - protected - procedure AdjustHeight; override; - procedure AdjustLayers; override; - procedure AdjustLayersCellSides; override; - procedure AdjustLayersPos; override; - procedure AdjustRowHeight(DC: HDC; AAutoHeight: Boolean; ABuilder: TdxGridCardViewBuilder); override; - procedure AdjustWidth(DC: HDC); override; - function GetLayerClass: TdxReportCardLayerClass; override; - function GetLayerByAbsoluteRowIndex(var AIndex: Integer): TdxReportCardLayer; - function GetLayerIndexByRow(ARow: TcxGridCardViewRow): Integer; override; - function GetRowCount: Integer; override; - function GetRowHeight(AIndex: Integer): Integer; override; - function HasLayerSeparator(ALayerIndex: Integer): Boolean; override; - function MeasureCaptionWidth(DC: HDC): Integer; override; - procedure SetCaptionWidth(DC: HDC; ALayer, AValue, AMaxValue: Integer; ACaptionAutoWidth: Boolean); override; - procedure SetLayerWidth(Index, Value: Integer); override; - procedure SetLayerHeight(AIndex, AValue: Integer); override; - procedure SetLayersSameHeight; - procedure SetRowHeight(AIndex, AValue: Integer); override; - procedure SizeChanged; override; - end; - - TdxReportCardClass = class of TdxReportCard; - - TdxGridCardViewAdapter = class(TdxCustomGridTableViewAdapter) - private - function GetCaptionSeparator: string; - function GetCard(Index: Integer): TcxGridCard; - function GetCardAutoWidth: Boolean; - function GetCardCaptionWidth: Integer; - function GetCardCount: Integer; - function GetCardRow(Index: Integer): TcxGridCardViewRow; - function GetCardRowCount: Integer; - function GetCardSeparatorColor: Integer; - function GetCardSeparatorThickness: Integer; - function GetCardWidth: Integer; - function GetHasCardsSeparator: Boolean; - function GetHasIndent(Index: Integer): Boolean; - function GetRowAutoHeight: Boolean; - function GetRowCaptionAutoHeight: Boolean; - function GetRowCaptionEndEllipsis: Boolean; - function GetShowRowCaption(Index: Integer): Boolean; - function GetShowRowData(Index: Integer): Boolean; - protected - function GetAreAllMasterRowsCollapsed: Boolean; override; - - function GetCaptionRowViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; virtual; - function GetCardViewParams(ARecord: TcxCustomGridRecord): TcxViewParams; virtual; - function GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; AIsDataCell: Boolean = False): TcxViewParams; override; - function GetRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; virtual; - public - function GridView: TcxGridCardView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxGridCardViewStyles; reintroduce; overload; - - procedure GetVisibleCardRows(ACard: TcxGridCard; AList: TList); - procedure ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; ARecursive: Boolean); override; - function IsFirstRow(ACardRow: TcxGridCardViewRow): Boolean; - function IsLastRow(ACardRow: TcxGridCardViewRow): Boolean; - - property CaptionSeparator: string read GetCaptionSeparator; - property CardAutoWidth: Boolean read GetCardAutoWidth; - property CardCaptionWidth: Integer read GetCardCaptionWidth; - property CardCount: Integer read GetCardCount; - property CardRowCount: Integer read GetCardRowCount; - property CardRows[Index: Integer]: TcxGridCardViewRow read GetCardRow; - property Cards[Index: Integer]: TcxGridCard read GetCard; - property CardSeparatorColor: Integer read GetCardSeparatorColor; - property CardSeparatorThickness: Integer read GetCardSeparatorThickness; - property CardWidth: Integer read GetCardWidth; - property HasCardsSeparator: Boolean read GetHasCardsSeparator; - property HasIndent[Index: Integer]: Boolean read GetHasIndent; - property RowCaptionAutoHeight: Boolean read GetRowCaptionAutoHeight; - property RowCaptionEndEllipsis: Boolean read GetRowCaptionEndEllipsis; - property RowAutoHeight: Boolean read GetRowAutoHeight; - property ShowRowCaption[Index: Integer]: Boolean read GetShowRowCaption; - property ShowRowData[Index: Integer]: Boolean read GetShowRowData; - end; - - TdxGridCardViewFormatter = class(TdxCustomGridTableViewFormatter) - private - function GetAutoWidth: Boolean; - function GetCaptionAutoWidth: Boolean; - function GetCardAutoWidth: Boolean; - function GetCard(Index: Integer): TcxGridCard; - function GetCardCount: Integer; - function GetCardsAreaWidth: Integer; - function GetInterCardsSpaceHorz: Integer; - function GetInterCardsSpaceVert: Integer; - function GetKeepSameHeight: Boolean; - function GetKeepSameWidth: Boolean; - function GetRowAutoHeight: Boolean; - protected - procedure AddHorizontalDelimiters; override; - procedure AddVerticalDelimiters; override; - function GetViewWidth: Integer; override; - - function GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; override; - function IsHorizontalLayout(AGridCard: TcxGridCard): Boolean; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - function NeedDelimitByRows: Boolean; virtual; - public - function Adapter: TdxGridCardViewAdapter; reintroduce; overload; - function Builder: TdxGridCardViewBuilder; reintroduce; overload; - - { Cards } - procedure DoInitializeCard(ACard: TdxReportCard; AGridCard: TcxGridCard); virtual; - procedure DoInitializeCardsRow(ACard: TdxReportCell); virtual; - function GetCardClass(AGridCard: TcxGridCard): TdxReportCardClass; virtual; - function GetCardViewParams(ARecord: TcxCustomGridRecord): TdxReportItemViewParams; virtual; - - { Cards Indent } - procedure DoInitializeCardRowIndent(AnItem: TdxReportCellExpandButton; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); virtual; - - { Cards Caption } - procedure DoInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); virtual; - procedure DoReportLinkInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); virtual; - function GetCardRowCaptionClass(ACardRow: TcxGridCardViewRow): TdxReportCellTextClass; virtual; - function GetCardRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TdxReportItemViewParams; virtual; - - { Cards Data } - procedure DoReportLinkInitializeCardRowData(AnItem: TAbstractdxReportCellData; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); virtual; - function GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False; AIsDataCell: Boolean = False): TdxReportItemViewParams; override; - - property AutoWidth: Boolean read GetAutoWidth; - property CaptionAutoWidth: Boolean read GetCaptionAutoWidth; - property CardAutoWidth: Boolean read GetCardAutoWidth; - property CardCount: Integer read GetCardCount; - property Cards[Index: Integer]: TcxGridCard read GetCard; - property CardsAreaWidth: Integer read GetCardsAreaWidth; - property InterCardsSpaceHorz: Integer read GetInterCardsSpaceHorz; - property InterCardsSpaceVert: Integer read GetInterCardsSpaceVert; - property KeepSameHeight: Boolean read GetKeepSameHeight; - property KeepSameWidth: Boolean read GetKeepSameWidth; - property RowAutoHeight: Boolean read GetRowAutoHeight; - end; - - TdxGridCardViewBuilder = class(TdxCustomGridTableViewBuilder) - private - FCards: TList; - FMaxCardWidth: Integer; - function GetCard(Index: Integer): TdxReportCard; - function GetCardCount: Integer; - function GetMaxCardWidth: Integer; - - procedure AdjustCardRowsCellSides; - procedure CreateCards; - procedure ResizeCards; - protected - procedure DoBuildViewBody; override; - - function GetCardsRowProducer: TdxGridCardViewCardsRowProducer; virtual; - function GetCardsRowProducerClass: TdxGridCardViewCardsRowProducerClass; virtual; - procedure PlaceCards; virtual; - - function GridView: TcxGridCardView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - - property CardCount: Integer read GetCardCount; - property Cards[Index: Integer]: TdxReportCard read GetCard; - public - constructor Create(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); override; - destructor Destroy; override; - - function Adapter: TdxGridCardViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxGridCardViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - - property MaxCardWidth: Integer read GetMaxCardWidth; - end; - - { DBCardView Adapter, Formatter and Builder } - - TdxGridDBCardViewAdapter = class(TdxGridCardViewAdapter) - private - FPrevAllRecordsAreLoaded: Boolean; - protected - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - function DataController: TcxGridDBDataController; reintroduce; overload; - - function DBDataModeController: TcxDBDataModeController; virtual; - procedure LoadAllRecords; virtual; - procedure UnloadAllRecords; virtual; - public - function GridView: TcxGridDBCardView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - end; - - TdxGridDBCardViewBuilder = class(TdxGridCardViewBuilder) - public - function Adapter: TdxGridDBCardViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - end; - -{$IFDEF CHARTVIEW} - { ChartView Adapter, Formatter and Builder } - - TdxGridChartViewAdapter = class(TdxCustomGridViewAdapter) - protected - function CreateGraphic(AGraphicClass: TGraphicClass; AWidth: Integer): TGraphic; - function GetCanUseOnEveryPageMode: Boolean; override; - public - function GridView: TcxGridChartView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - end; - - TdxGridChartViewFormatter = class(TdxCustomGridViewFormatter) - private - function GetGraphicClass: TGraphicClass; - function GetGraphicTransparent: Boolean; - protected - function CreateChartImage: TGraphic; virtual; - procedure DoInitializeChartItem(AnItem: TdxReportCellGraphic); virtual; - procedure DoReportLinkInitializeChartItem(AnItem: TdxReportCellGraphic); virtual; - function GetChartItemClass: TdxReportCellGraphicClass; - function GetViewWidth: Integer; override; - public - function Adapter: TdxGridChartViewAdapter; reintroduce; overload; - function Builder: TdxGridChartViewBuilder; reintroduce; overload; - - property GraphicClass: TGraphicClass read GetGraphicClass; - property GraphicTransparent: Boolean read GetGraphicTransparent; - end; - - TdxGridChartViewBuilder = class(TdxCustomGridViewBuilder) - protected - function GetChartProducer: TdxGridChartViewChartProducer; virtual; - function GetChartProducerClass: TdxGridChartViewChartProducerClass; virtual; - procedure CreateChart; virtual; - procedure DoBuildViewBody; override; - - function GridView: TcxGridChartView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - public - function Adapter: TdxGridChartViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxGridChartViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - end; -{$ENDIF} - - { Producers } - - TdxGridViewRowProducer = class - private - FBuilder: TdxCustomGridViewBuilder; - FHost: TdxReportCell; - FMasterIndents: TList; - FRow: TdxReportCell; - FRowHeight: Integer; - function GetDC: HDC; - function GetHostClass: TdxReportCellClass; - function GetIndentWidth: Integer; - function GetMasterBuilder(Index: Integer): TdxCustomGridViewBuilder; - function GetMasterIndent(Index: Integer): TdxReportCellBox; - function GetMasterIndentCount: Integer; - function GetRowHostClass: TdxReportCellClass; - function GetRowOriginX: Integer; - function GetRowWidth: Integer; - protected - procedure AddLeadingMasterIndentsAndSeparators; virtual; - procedure AddMasterIndents(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; ALevel: Integer; var ALeftPos: Integer); - procedure AddMasterSeparator(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; var ALeftPos: Integer; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); - procedure AddTrailingMasterSeparators; virtual; - function CalculateItemHeight(DC: HDC; AnItem: TdxReportVisualItem): Integer; virtual; - procedure CalculateRowAutoHeight; virtual; - procedure CalculateRowHeight; virtual; - function CreateDetailsSeparator(AParent: TdxReportCell): TdxReportCellBox; virtual; - function CreateMasterIndent(AParent: TdxReportCell): TdxReportCellExpandButton; virtual; - procedure CreateRow; virtual; - procedure CreateRowHost(const AHostInfo: TdxGridAttributeHostInfo); virtual; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; virtual; - function GetDetailsSeparatorClass: TdxReportCellBoxClass; virtual; - function GetMasterIndentClass: TdxReportCellExpandButtonClass; virtual; - procedure FixupMasterIndentsHeight; virtual; - procedure FixupRowDataItemHeight(AnItem: TdxReportVisualItem); virtual; - procedure FixupRowDataHeight; virtual; - procedure FixupRowHeight; virtual; - procedure FixupRowOwnHeight; virtual; - procedure InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - procedure InitializeMasterIndent(AFormatter: TdxCustomGridViewFormatter; - AIndent: TdxReportCellExpandButton; AIndex, ALevel: Integer); virtual; - procedure InitializeHost; virtual; - procedure InitializeRow; virtual; - - function GetAutoHeight: Boolean; virtual; - function GetItemsSite: TdxReportCell; virtual; - function GetLineCount: Integer; virtual; - function GetLineHeight: Integer; virtual; - function GetWidth: Integer; virtual; - - property DC: HDC read GetDC; - property HostClass: TdxReportCellClass read GetHostClass; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); virtual; - destructor Destroy; override; - - function Adapter: TdxCustomGridViewAdapter; overload; virtual; - function Builder: TdxCustomGridViewBuilder; overload; virtual; - function Formatter: TdxCustomGridViewFormatter; overload; virtual; - - function Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; virtual; - - property AutoHeight: Boolean read GetAutoHeight; - property Host: TdxReportCell read FHost; - property IndentWidth: Integer read GetIndentWidth; - property ItemsSite: TdxReportCell read GetItemsSite; - property LineCount: Integer read GetLineCount; - property LineHeight: Integer read GetLineHeight; - property MasterBuilders[Index: Integer]: TdxCustomGridViewBuilder read GetMasterBuilder; - property MasterIndentCount: Integer read GetMasterIndentCount; - property MasterIndents[Index: Integer]: TdxReportCellBox read GetMasterIndent; - property Row: TdxReportCell read FRow; - property RowHeight: Integer read FRowHeight write FRowHeight; - property RowOriginX: Integer read GetRowOriginX; - property RowWidth: Integer read GetRowWidth; - property Width: Integer read GetWidth; - end; - - TdxGridViewCustomRowProducer = class(TdxGridViewRowProducer) - private - FItem: TAbstractdxReportCellData; - protected - procedure AddItem; virtual; - function CreateItem(AParent: TdxReportCell): TAbstractdxReportCellData; virtual; - procedure FixupRowDataHeight; override; - procedure InitializeItem; virtual; - - function GetAutoHeight: Boolean; override; - function GetItemClass: TdxReportCellDataClass; virtual; - - property Item: TAbstractdxReportCellData read FItem; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; override; - end; - - TdxGridViewCaptionProducer = class(TdxGridViewCustomRowProducer) - private - function GetItem: TdxReportCellText; - protected - procedure InitializeItem; override; - procedure InitializeRow; override; - - function GetItemClass: TdxReportCellDataClass; override; - function GetLineHeight: Integer; override; - public - property Item: TdxReportCellText read GetItem; - end; - - TdxGridViewFilterBarProducer = class(TdxGridViewCustomRowProducer) - private - function GetItem: TdxReportCellText; - protected - procedure InitializeItem; override; - procedure InitializeRow; override; - - function GetItemClass: TdxReportCellDataClass; override; - function GetLineHeight: Integer; override; - public - property Item: TdxReportCellText read GetItem; - end; - - TdxGridViewDetailsSeparatorProducer = class(TdxGridViewCustomRowProducer) - private - function GetItem: TdxReportCellBox; - protected - procedure InitializeItem; override; - procedure InitializeRow; override; - - function GetItemClass: TdxReportCellDataClass; override; - function GetLineHeight: Integer; override; - public - property Item: TdxReportCellBox read GetItem; - end; - - TdxGridViewDetailsTopSeparatorProducer = class(TdxGridViewDetailsSeparatorProducer) - protected - procedure InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); override; - end; - - TdxGridViewDetailsBottomSeparatorProducer = class(TdxGridViewDetailsSeparatorProducer) - protected - procedure InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); override; - end; - - TdxGridViewTerminatorProducer = class(TdxGridViewDetailsSeparatorProducer) - protected - procedure InitializeItem; override; - function GetLineHeight: Integer; override; - end; - - TdxGridTableViewRowProducer = class(TdxGridViewRowProducer) - public - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - function Builder: TdxGridTableViewBuilder; reintroduce; overload; - function Formatter: TdxGridTableViewFormatter; reintroduce; overload; - end; - - TdxGridTableViewRowSubItemsProducer = class(TdxGridTableViewRowProducer) - private - FIndents: TList; - FSubItems: TList; - function GetColumn(Index: Integer): TcxGridColumn; - function GetIndent(Index: Integer): TdxReportCellExpandButton; - function GetSubItem(Index: Integer): TdxReportVisualItem; - protected - procedure AddIndents(AParent: TdxReportCell); virtual; - procedure AddSubItems(AParent: TdxReportCell); virtual; - procedure CreateRow; override; - function CreateSubItem(AnIndex: Integer; AParent: TdxReportCell): TAbstractdxReportCellData; - function IsItemIndent(AnItem: TdxReportVisualItem): Boolean; - - procedure FixupIndentsHeight; virtual; - procedure FixupRowDataHeight; override; - procedure FixupRowHeight; override; - - procedure InitializeIndentList; virtual; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); virtual; - procedure InitializeSubItemList; virtual; - - function GetHasSubItem(Index: Integer): Boolean; virtual; - function GetIndentCount: Integer; virtual; - function GetSubItemBound(Index: Integer): TRect; virtual; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; virtual; abstract; - function GetSubItemCount: Integer; virtual; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; override; - - property Columns[Index: Integer]: TcxGridColumn read GetColumn; - property HasSubItem[Index: Integer]: Boolean read GetHasSubItem; - property IndentCount: Integer read GetIndentCount; - property Indents[Index: Integer]: TdxReportCellExpandButton read GetIndent; - property SubItemBounds[Index: Integer]: TRect read GetSubItemBound; - property SubItemClasses[Index: Integer]: TdxReportCellDataClass read GetSubItemClass; - property SubItemCount: Integer read GetSubItemCount; - property SubItems[Index: Integer]: TdxReportVisualItem read GetSubItem; default; - end; - - TdxGridTableViewHeadersProducer = class(TdxGridTableViewRowSubItemsProducer) - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - end; - - TdxGridTableViewFootersProducer = class(TdxGridTableViewRowSubItemsProducer) - private - function GetSummaryItems: TcxDataSummaryItems; virtual; - protected - procedure CalculateRowAutoHeight; override; - procedure CalculateRowHeight; override; - procedure FixupRowDataItemHeight(AnItem: TdxReportVisualItem); override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetHasSubItem(Index: Integer): Boolean; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - function GetSubItemCount: Integer; override; - - property SummaryItems: TcxDataSummaryItems read GetSummaryItems; - end; - - TdxGridTableViewCustomDataRowProducer = class(TdxGridTableViewRowSubItemsProducer) - private - FGridRow: TcxCustomGridRow; - FGridRowIndex: Integer; - function GetIndentArea: Integer; - function GetIndentBounds(Index: Integer): TRect; - protected - procedure AddIndents(AParent: TdxReportCell); override; - function CreateIndent(AnIndex: Integer; AParent: TdxReportCell): TdxReportCellExpandButton; virtual; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); virtual; - - function GetIndentCount: Integer; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - public - function GridRow: TcxCustomGridRow; overload; virtual; - function Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AGridRowIndex: Integer): TdxReportCell; reintroduce; virtual; - - property GridRowIndex: Integer read FGridRowIndex; - property IndentArea: Integer read GetIndentArea; - property IndentBounds[Index: Integer]: TRect read GetIndentBounds; - end; - - TdxCustomGridTableViewRowSeparatorProducer = class(TdxGridTableViewCustomDataRowProducer) - protected - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetSubItemCount: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow): TdxReportCell; reintroduce; virtual; - end; - - TdxGridTableViewRowSeparatorProducer = class(TdxCustomGridTableViewRowSeparatorProducer) - private - FIsLast: Boolean; - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetIndentCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo; AGridRow: TcxCustomGridRow; - AnIsLast: Boolean): TdxReportCell; reintroduce; virtual; - property IsLast: Boolean read FIsLast; - end; - - TdxGridTableViewGroupRowSeparatorProducer = class(TdxCustomGridTableViewRowSeparatorProducer) - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - function GetLineHeight: Integer; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - end; - - TdxGridTableViewDataRowProducer = class(TdxGridTableViewCustomDataRowProducer) - private - FPreviewItem: TdxReportVisualItem;//TAbstractdxReportCellData; - function GetPreviewColumn: TcxGridColumn; - function GetPreviewPlace: TcxGridPreviewPlace; - protected - procedure AddPreview(AParent: TdxReportCell); virtual; - procedure AddSubItems(AParent: TdxReportCell); override; - procedure CalculateRowAutoHeight; override; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; override; - function CreatePreview(AParent: TdxReportCell): TdxReportVisualItem; virtual; - function GetPreviewClass: TdxReportCellDataClass; virtual; - procedure FixupRowDataHeight; override; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetCellAutoHeight: Boolean; virtual; - function GetHasPreview: Boolean; virtual; - function GetIndentCount: Integer; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetPreviewHeight: Integer; virtual; - function GetPreviewLineCount: Integer; virtual; - function GetPreviewLineHeight: Integer; virtual; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - public - function GridRow: TcxGridDataRow; reintroduce; overload; - - property CellAutoHeight: Boolean read GetCellAutoHeight; - property HasPreview: Boolean read GetHasPreview; - property PreviewColumn: TcxGridColumn read GetPreviewColumn; - property PreviewHeight: Integer read GetPreviewHeight; - property PreviewItem: TdxReportVisualItem read FPreviewItem;//TAbstractdxReportCellData read FPreviewItem; - property PreviewLineCount: Integer read GetPreviewLineCount; - property PreviewLineHeight: Integer read GetPreviewLineHeight; - property PreviewPlace: TcxGridPreviewPlace read GetPreviewPlace; - end; - - TcxGridSummaryItemInfo = class - public - Bounds: TRect; - Column: TcxGridColumn; - DisplayText: string; - SummaryIndex: Integer; - ViewParams: TcxViewParams; - end; - - TdxGridTableViewGroupRowProducer = class(TdxGridTableViewCustomDataRowProducer) - private - function GetSummaryItemInfo(Index: Integer): TcxGridSummaryItemInfo; - protected - SummaryItemInfoList: TcxObjectList; - RowViewParams: TcxViewParams; - procedure AddSummaryGroupInfo(AItem: TcxDataSummaryItem; const ADisplayText: string); - procedure AddSubItems(AParent: TdxReportCell); override; - procedure DeleteInfo(AIndex: Integer); - procedure InitializeRow; override; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - procedure InitializeSubItemList; override; - function GetAutoHeight: Boolean; override; - function GetIndentCount: Integer; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - function GetSubItemCount: Integer; override; - procedure PrepareSummaryItemsInfo; - procedure PrepareSummaryItemsBounds; - public - function GridRow: TcxGridGroupRow; reintroduce; overload; - function Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AGridRowIndex: Integer): TdxReportCell; override; - - property SummaryItemInfos[Index: Integer]: TcxGridSummaryItemInfo read GetSummaryItemInfo; - end; - - TdxGridTableViewMasterRowProducer = class(TdxGridTableViewDataRowProducer) - protected - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetIndentCount: Integer; override; - public - function GridRow: TcxGridMasterDataRow; reintroduce; overload; - end; - - TdxGridTableViewGroupFooterProducer = class(TdxGridTableViewCustomDataRowProducer) - private - FGroupLevel: Integer; - FIndex: Integer; - FInternalLineCount: Integer; - FItemsSite: TdxReportCell; - function GetGroupLevel: Integer; - function GetHostBounds: TRect; - protected - SummaryItems: TcxDataSummaryItems; - SummaryValues: PVariant; - procedure AddSubItems(AParent: TdxReportCell); override; - procedure CalculateRowAutoHeight; override; - procedure FixupRowDataItemHeight(AnItem: TdxReportVisualItem); override; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - function GetAutoHeight: Boolean; override; - function GetCorrectRowIndex(AGridRow: TcxCustomGridRow; AGroupLevel: Integer): Integer; - function GetHasSubItem(Index: Integer): Boolean; override; - function GetIndentCount: Integer; override; - function GetItemsSite: TdxReportCell; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - function GetSubItemCount: Integer; override; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo; AGridRow: TcxCustomGridRow; - AGroupLevel, AnIndex: Integer): TdxReportCell; reintroduce; virtual; - - property GroupLevel: Integer read GetGroupLevel; - property HostBounds: TRect read GetHostBounds; - property Index: Integer read FIndex; - property InternalLineCount: Integer read FInternalLineCount; - end; - - TdxGridTableViewBandsProducer = class(TdxGridTableViewRowSubItemsProducer) - protected - procedure CalculateRowHeight; override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - function GetSubItemCount: Integer; override; - public - function Adapter: TdxGridBandedTableViewAdapter; reintroduce; overload; - function Builder: TdxGridBandedTableViewBuilder; reintroduce; overload; - function Formatter: TdxGridBandedTableViewFormatter; reintroduce; overload; - end; - - TdxGridCardViewCardsRowProducer = class(TdxGridViewRowProducer) - protected - procedure CalculateRowHeight; override; - function GetAutoHeight: Boolean; override; - procedure InitializeRow; override; - public - function Adapter: TdxGridCardViewAdapter; reintroduce; overload; - function Builder: TdxGridCardViewBuilder; reintroduce; overload; - function Formatter: TdxGridCardViewFormatter; reintroduce; overload; - - function CreateCard(AParent: TdxReportCell; AGridCard: TcxGridCard): TdxReportCard; virtual; - procedure InjectCard(ACard: TdxReportCard; AIndex: Integer); virtual; - function Produce(AHostInfo: TdxGridAttributeHostInfo; - ARowHeight: Integer): TdxReportCell; reintroduce; virtual; - end; - -{$IFDEF CHARTVIEW} - TdxGridChartViewChartProducer = class(TdxGridViewCustomRowProducer) - private - FChartImage: TGraphic; - function GetChartImage: TGraphic; - function GetItem: TdxReportCellGraphic; - protected - procedure CalculateRowHeight; override; - function GetItemClass: TdxReportCellDataClass; override; - procedure InitializeItem; override; - - property ChartImage: TGraphic read GetChartImage; - property Item: TdxReportCellGraphic read GetItem; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; override; - function Formatter: TdxGridChartViewFormatter; reintroduce; overload; - end; -{$ENDIF} - - { Options } - - TdxGridReportLinkOptionsClass = class of TdxGridReportLinkOptions; - - TdxGridReportLinkOptions = class(TdxCustomReportLinkOptions) - private - function GetReportLink: TdxGridReportLink; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsCards = class; - - TdxGridReportLinkCardsShadowClass = class of TdxGridReportLinkCardsShadow; - - TdxGridReportLinkCardsShadow = class(TPersistent) - private - FColor: TColor; - FDepth: TdxGridCardShadowDepth; - FOptionsCards: TdxGridReportLinkOptionsCards; - FPosition: TdxGridCardShadowPosition; - function GetActualColor: TColor; - function GetVisible: Boolean; - procedure SetColor(Value: TColor); - procedure SetDepth(Value: TdxGridCardShadowDepth); - procedure SetPosition(Value: TdxGridCardShadowPosition); - protected - procedure Changed; dynamic; - public - constructor Create(AnOptionsCards: TdxGridReportLinkOptionsCards); virtual; - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; virtual; - - property ActualColor: TColor read GetActualColor; - property OptionsCards: TdxGridReportLinkOptionsCards read FOptionsCards; - property Visible: Boolean read GetVisible; - published - property Color: TColor read FColor write SetColor default clDefault; - property Depth: TdxGridCardShadowDepth read FDepth write SetDepth default dxDefaultCardsShadowDepth; - property Position: TdxGridCardShadowPosition read FPosition write SetPosition default cspBottomRight; - end; - - TdxGridReportLinkOptionsCardsClass = class of TdxGridReportLinkOptionsCards; - - TdxGridReportLinkOptionsCards = class(TdxGridReportLinkOptions) - private - FAutoWidth: Boolean; - FBorders: Boolean; - FInterCardsSpaceHorz: Integer; - FInterCardsSpaceVert: Integer; - FKeepSameHeight: Boolean; - FKeepSameWidth: Boolean; - FRowBordersHorz: Boolean; - FRowBordersVert: Boolean; - FShadow: TdxGridReportLinkCardsShadow; - function GetShadow: TdxGridReportLinkCardsShadow; - procedure SetAutoWidth(Value: Boolean); - procedure SetBorders(Value: Boolean); - procedure SetInterCardsSpaceHorz(Value: Integer); - procedure SetInterCardsSpaceVert(Value: Integer); - procedure SetKeepSameHeight(Value: Boolean); - procedure SetKeepSameWidth(Value: Boolean); - procedure SetRowBordersHorz(Value: Boolean); - procedure SetRowBordersVert(Value: Boolean); - procedure SetShadow(Value: TdxGridReportLinkCardsShadow); - protected - function DesignerTabIndex: Integer; override; - function GetShadowClass: TdxGridReportLinkCardsShadowClass; virtual; - public - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property AutoWidth: Boolean read FAutoWidth write SetAutoWidth default False; - property Borders: Boolean read FBorders write SetBorders default True; - property InterCardsSpaceHorz: Integer read FInterCardsSpaceHorz write SetInterCardsSpaceHorz default 4; - property InterCardsSpaceVert: Integer read FInterCardsSpaceVert write SetInterCardsSpaceVert default 4; - property KeepSameHeight: Boolean read FKeepSameHeight write SetKeepSameHeight default True; - property KeepSameWidth: Boolean read FKeepSameWidth write SetKeepSameWidth default True; - property RowBordersHorz: Boolean read FRowBordersHorz write SetRowBordersHorz default False; - property RowBordersVert: Boolean read FRowBordersVert write SetRowBordersVert default False; - property Shadow: TdxGridReportLinkCardsShadow read GetShadow write SetShadow; - end; - -{$IFDEF CHARTVIEW} - TdxGridReportLinkOptionsChartsClass = class of TdxGridReportLinkOptionsCharts; - - TdxGridReportLinkOptionsCharts = class(TdxGridReportLinkOptions) - private - FGraphicClass: TGraphicClass; - FIsGraphicClassAssigned: Boolean; - FTransparent: Boolean; - function GetGraphicClass: TGraphicClass; - function GetGraphicClassName: string; - function IsGraphicClassNameStored: Boolean; - procedure SetGraphicClass(Value: TGraphicClass); - procedure SetGraphicClassName(const Value: string); - procedure SetTransparent(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - function DefaultGraphicClass: TGraphicClass; virtual; //TBitmap - function SupportsGraphicClass(AGraphicClass: TGraphicClass): Boolean; virtual; //excluding TIcon - - property GraphicClass: TGraphicClass read GetGraphicClass write SetGraphicClass; - published - property GraphicClassName: string read GetGraphicClassName write SetGraphicClassName stored IsGraphicClassNameStored; - property Transparent: Boolean read FTransparent write SetTransparent default False; - end; -{$ENDIF} - - TdxGridReportLinkOptionsDetailsClass = class of TdxGridReportLinkOptionsDetails; - - TdxGridReportLinkOptionsDetails = class(TdxGridReportLinkOptions) - private - FOnlyFocusedView: Boolean; - FStartFromFocusedView: Boolean; - procedure SetOnlyFocusedView(Value: Boolean); - procedure SetStartFromFocusedView(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property OnlyFocusedView: Boolean read FOnlyFocusedView write SetOnlyFocusedView default False; - property StartFromFocusedView: Boolean read FStartFromFocusedView write SetStartFromFocusedView default False; - end; - - TdxGridReportLinkOptionsExpanding = class(TdxCustomReportLinkOptionsExpanding) - private - {$IFDEF DXVER500} - FExpandCards: Boolean; - {$ENDIF} - FExpandGroupRows: Boolean; - FExpandMasterRows: Boolean; - function GetHasAny: Boolean; - function GetReportLink: TdxGridReportLink; - {$IFDEF DXVER500} - procedure SetExpandCards(Value: Boolean); - {$ENDIF} - procedure SetExpandGroupRows(Value: Boolean); - procedure SetExpandMasterRows(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - property HasAny: Boolean read GetHasAny; - property ReportLink: TdxGridReportLink read GetReportLink; - published - {$IFDEF DXVER500} - property ExpandCards: Boolean read FExpandCards write SetExpandCards default False; - {$ENDIF} - property ExpandGroupRows: Boolean read FExpandGroupRows write SetExpandGroupRows default False; - property ExpandMasterRows: Boolean read FExpandMasterRows write SetExpandMasterRows default False; - end; - - TdxGridReportLinkOptionsFormatting = class(TdxCustomReportLinkOptionsFormatting) - private - FConsumeSelectionStyle: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetConsumeSelectionStyle(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TdxGridReportLink read GetReportLink; - published - property ConsumeSelectionStyle: Boolean read FConsumeSelectionStyle write SetConsumeSelectionStyle default False; - property UseLookAndFeelColors; - end; - - TdxGridReportLinkOptionsLevelsClass = class of TdxGridReportLinkOptionsLevels; - - TdxGridReportLinkOptionsLevels = class(TdxGridReportLinkOptions) - private - FRiseActiveLevelOntoTop: Boolean; - FSkipEmptyViews: Boolean; - FUnwrap: Boolean; - FUnwrapTopLevel: Boolean; - procedure SetRiseActiveLevelOntoTop(Value: Boolean); - procedure SetSkipEmptyViews(Value: Boolean); - procedure SetUnwrap(Value: Boolean); - procedure SetUnwrapTopLevel(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property RiseActiveLevelOntoTop: Boolean read FRiseActiveLevelOntoTop write SetRiseActiveLevelOntoTop default True; - property SkipEmptyViews: Boolean read FSkipEmptyViews write SetSkipEmptyViews default True; - property Unwrap: Boolean read FUnwrap write SetUnwrap default False; - property UnwrapTopLevel: Boolean read FUnwrapTopLevel write SetUnwrapTopLevel default True; - end; - - TdxGridReportLinkOptionsOnEveryPage = class(TdxCustomTableControlReportLinkOptionsOnEveryPage) - private - FCaption: Boolean; - FFilterBar: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetCaption(Value: Boolean); - procedure SetFilterBar(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; virtual; - procedure SetAll; virtual; - procedure UnsetAll; virtual; - - property ReportLink: TdxGridReportLink read GetReportLink; - published - property BandHeaders; - property Caption: Boolean read FCaption write SetCaption default True; - property FilterBar: Boolean read FFilterBar write SetFilterBar default True; - property Footers; - property Headers; - end; - - TdxGridReportLinkOptionsPagination = class(TdxCustomTableControlReportLinkOptionsPagination) - private - FOneGroupPerPage: Boolean; - FTopLevelGroup: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetOneGroupPerPage(Value: Boolean); - procedure SetTopLevelGroup(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TdxGridReportLink read GetReportLink; - published - property Band; - property Column; - property Custom; - property OneGroupPerPage: Boolean read FOneGroupPerPage write SetOneGroupPerPage default False; - property Row; - property TopLevelGroup: Boolean read FTopLevelGroup write SetTopLevelGroup default False; - end; - - TdxGridReportLinkOptionsPreview = class(TdxCustomTableControlReportLinkOptionsPreview) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsRefinements = class(TdxCustomReportLinkOptionsRefinements) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsSelection = class(TdxCustomTableControlReportLinkOptionsSelection) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsSize = class(TdxCustomReportLinkOptionsSize) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - published - property AutoWidth; - end; - - TdxGridReportLinkOptionsView = class(TdxCustomTableControlReportLinkOptionsView) - private - FCaption: Boolean; - FFilterBar: Boolean; - FGroupFooters: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetCaption(Value: Boolean); - procedure SetFilterBar(Value: Boolean); - procedure SetGroupFooters(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; virtual; - procedure SetAll; - procedure UnsetAll; - - property ReportLink: TdxGridReportLink read GetReportLink; - published - property BandHeaders; - property Caption: Boolean read FCaption write SetCaption default True; - property ExpandButtons; - property FilterBar: Boolean read FFilterBar write SetFilterBar default True; - property Footers; - property GroupFooters: Boolean read FGroupFooters write SetGroupFooters default True; - property Headers; - end; - - TdxGridAttributeHostInfo = class - private - FParent: TdxReportCell; - public - Origin: TPoint; - procedure Initialize(AParent: TdxReportCell); - property Parent: TdxReportCell read FParent; - end; - - TdxGridAttributeHostInfoServicesClass = class of TdxGridAttributeHostInfoServices; - - TdxGridAttributeHostInfoServices = class - private - FPageDetailsHostInfo: TdxGridAttributeHostInfo; - FPageFootersHostInfo: TdxGridAttributeHostInfo; - FPageHeadersHostInfo: TdxGridAttributeHostInfo; - FReportLink: TdxGridReportLink; - function GetActiveView: TcxCustomGridView; - function GetActiveViewHelper: TdxCustomGridViewHelperClass; - function GetArePageFootersAssigned: Boolean; - function GetArePageHeadersAssigned: Boolean; - function GetCanUseBandHeadersOnEveyPage: Boolean; - function GetCanUseCaptionOnEveryPage: Boolean; - function GetCanUseFilterBarOnEveryPage: Boolean; - function GetCanUseFootersOnEveryPage: Boolean; - function GetCanUseHeadersOnEveryPage: Boolean; - function GetIsInconsistentBandHeadersState: Boolean; - function GetIsInconsistentFilterBarState: Boolean; - function GetIsInconsistentFootersState: Boolean; - function GetIsInconsistentHeadersState: Boolean; - function GetLevelSeparatorBottomHostInfo: TdxGridAttributeHostInfo; - function GetLevelSeparatorTopHostInfo: TdxGridAttributeHostInfo; - function GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; - function GetOptionsView: TdxGridReportLinkOptionsView; - function GetPageDetails: TdxReportCell; - function GetPageFooters: TdxReportCell; - function GetPageHeaders: TdxReportCell; - protected - procedure CreateHostInfos; - procedure DestroyHostInfos; - - function GetBandHeadersHostInfo: TdxGridAttributeHostInfo; virtual; - function GetCaptionHostInfo: TdxGridAttributeHostInfo; virtual; - function GetFilterBarHostInfo: TdxGridAttributeHostInfo; virtual; - function GetFootersHostInfo: TdxGridAttributeHostInfo; virtual; - function GetHeadersHostInfo: TdxGridAttributeHostInfo; virtual; - function GetInconsistentStateText: string; virtual; - function GetIsInconsistentState: Boolean; virtual; - function HasCells: Boolean; - function IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; - - //function HasAttributeOnEveryPage: Boolean; - - property ActiveView: TcxCustomGridView read GetActiveView; - property ActiveViewHelper: TdxCustomGridViewHelperClass read GetActiveViewHelper; - property OptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage read GetOptionsOnEveryPage; - property OptionsView: TdxGridReportLinkOptionsView read GetOptionsView; - property PageDetails: TdxReportCell read GetPageDetails; - property PageFooters: TdxReportCell read GetPageFooters; - property PageHeaders: TdxReportCell read GetPageHeaders; - public - constructor Create(AReportLink: TdxGridReportLink); virtual; - destructor Destroy; override; - procedure Initialize; - - property ArePageFootersAssigned: Boolean read GetArePageFootersAssigned; - property ArePageHeadersAssigned: Boolean read GetArePageHeadersAssigned; - property BandHeadersHostInfo: TdxGridAttributeHostInfo read GetBandHeadersHostInfo; - property CanUseBandHeadersOnEveyPage: Boolean read GetCanUseBandHeadersOnEveyPage; - property CanUseCaptionOnEveryPage: Boolean read GetCanUseCaptionOnEveryPage; - property CanUseFilterBarOnEveryPage: Boolean read GetCanUseFilterBarOnEveryPage; - property CanUseFootersOnEveryPage: Boolean read GetCanUseFootersOnEveryPage; - property CanUseHeadersOnEveryPage: Boolean read GetCanUseHeadersOnEveryPage; - property CaptionHostInfo: TdxGridAttributeHostInfo read GetCaptionHostInfo; - property FilterBarHostInfo: TdxGridAttributeHostInfo read GetFilterBarHostInfo; - property FootersHostInfo: TdxGridAttributeHostInfo read GetFootersHostInfo; - property HeadersHostInfo: TdxGridAttributeHostInfo read GetHeadersHostInfo; - property InconsistentStateText: string read GetInconsistentStateText; - property IsInconsistentBandHeadersState: Boolean read GetIsInconsistentBandHeadersState; - property IsInconsistentFilterBarState: Boolean read GetIsInconsistentFilterBarState; - property IsInconsistentFootersState: Boolean read GetIsInconsistentFootersState; - property IsInconsistentHeadersState: Boolean read GetIsInconsistentHeadersState; - property IsInconsistentState: Boolean read GetIsInconsistentState; - property LevelSeparatorBottomHostInfo: TdxGridAttributeHostInfo read GetLevelSeparatorBottomHostInfo; - property LevelSeparatorTopHostInfo: TdxGridAttributeHostInfo read GetLevelSeparatorTopHostInfo; - property PageDetailsHostInfo: TdxGridAttributeHostInfo read FPageDetailsHostInfo; - property PageFootersHostInfo: TdxGridAttributeHostInfo read FPageFootersHostInfo; - property PageHeadersHostInfo: TdxGridAttributeHostInfo read FPageHeadersHostInfo; - property ReportLink: TdxGridReportLink read FReportLink; - end; - - TdxGridReportLinkStylesClass = class of TdxGridReportLinkStyles; - - TdxGridReportLinkStyles = class(TdxCustomReportLinkStyles) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - class function GetStyleCaption(AnIndex: Integer): string; override; - function GetStyleIndexByCaption(const Caption: string): Integer; override; - - function IsCardViewStyle(AStyle: TcxStyle): Boolean; - public - procedure Assign(Source: TPersistent); override; - - procedure GetBandHeaderParams(ABand: TcxGridBand; out AParams: TcxViewParams); virtual; - procedure GetCaptionParams(ATabLevel: TcxGridLevel; out AParams: TcxViewParams); virtual; - procedure GetCardCaptionRowParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetCardRowCaptionParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetFilterBarParams(out AParams: TcxViewParams); virtual; - procedure GetFooterParams(ARecord: TcxCustomGridRecord; AGroupLevel: Integer; - AItem: TcxGridColumn; out AParams: TcxViewParams); virtual; - procedure GetGroupParams(ARecord: TcxCustomGridRecord; AGroupLevel: Integer; - out AParams: TcxViewParams); virtual; - procedure GetHeaderParams(AItem: TcxGridColumn; out AParams: TcxViewParams); virtual; - procedure GetPreviewParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetSelectionParams(out AParams: TcxViewParams); virtual; - - property ReportLink: TdxGridReportLink read GetReportLink; - published - property BandHeader: TcxStyle Index vspsGridBandHeader read GetValue write SetValue; - property Caption: TcxStyle Index vspsGridCaption read GetValue write SetValue; - property CardCaptionRow: TcxStyle Index vspsGridCardCaptionRow read GetValue write SetValue; - property CardRowCaption: TcxStyle Index vspsGridCardRowCaption read GetValue write SetValue; - property Content: TcxStyle Index vspsGridContent read GetValue write SetValue; - property ContentEven: TcxStyle Index vspsGridContentEven read GetValue write SetValue; - property ContentOdd: TcxStyle Index vspsGridContentOdd read GetValue write SetValue; - property FilterBar: TcxStyle Index vspsGridFilterBar read GetValue write SetValue; - property Footer: TcxStyle Index vspsGridFooter read GetValue write SetValue; - property Group: TcxStyle Index vspsGridGroup read GetValue write SetValue; - property Header: TcxStyle Index vspsGridHeader read GetValue write SetValue; - property Preview: TcxStyle Index vspsGridPreview read GetValue write SetValue; - property Selection: TcxStyle Index vspsGridSelection read GetValue write SetValue; - property StyleSheet; - end; - - TdxGridReportLinkStyleSheet = class(TdxCustomReportLinkStyleSheet) - private - function GetStylesValue: TdxGridReportLinkStyles; - procedure SetStylesValue(Value: TdxGridReportLinkStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TdxGridReportLinkStyles read GetStylesValue write SetStylesValue; - end; - - TdxGridReportLinkProcessParams = record - HasMasterDetails: Boolean; - HasMasterDetailsInTopView: Boolean; - HasOnlyCards: Boolean; - HasOnlyCharts: Boolean; - HasUnwrapableData: Boolean; - CanUseOnEveryPageMode: Boolean; - end; - - TdxGridRecordArray = array of TcxCustomGridRecord; - - TdxGridViewProc = procedure(AGridView: TcxCustomGridView) of object; - - TdxGridGetCustomPageBreaksEvent = procedure(Sender: TdxGridReportLink) of object; - - TdxGridReportLinkGetCellHeightEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; var AHeight: Integer) of object; - - { CustomDraw Events } - - TdxGridReportLinkCustomDrawBandCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridBandedTableView; ABand: TcxGridBand; - AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawCardRowCaptionCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawCardRowDataCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TAbstractdxReportCellData; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawFilterBarEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxCustomGridTableView; AnItem: TdxReportCellString; - var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawFooterCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; ALevel: Integer; AnItem: TdxReportCellString; - var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawHeaderCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridTableView; AColumn: TcxGridColumn; - AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawLevelCaptionEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxCustomGridView; AnItem: TdxReportCellString; - var ADone: Boolean) of object; - - { Initializtion Events } - - TdxGridReportLinkInitializeBandCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridBandedTableView; ABand: TcxGridBand; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData) of object; - - TdxGridReportLinkInitializeCardRowCaptionCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeCardRowDataCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TAbstractdxReportCellData) of object; - -{$IFDEF CHARTVIEW} - TdxGridReportLinkInitializeChartCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridChartView; AnItem: TdxReportCellGraphic) of object; -{$ENDIF} - - TdxGridReportLinkInitializeFilterBarEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridTableView; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeFooterCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; ALevel: Integer; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeHeaderCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridTableView; AColumn: TcxGridColumn; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeLevelCaptionEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridView; AnItem: TdxReportCellString) of object; - - { ReportLink } - - TdxGridReportLink = class(TdxCustomTableControlReportLink) - private - FDelimitersHardVert: TList; - FHostInfoServices: TdxGridAttributeHostInfoServices; - FOptionsCards: TdxGridReportLinkOptionsCards; -{$IFDEF CHARTVIEW} - FOptionsCharts: TdxGridReportLinkOptionsCharts; -{$ENDIF} - FOptionsDetails: TdxGridReportLinkOptionsDetails; - FOptionsLevels: TdxGridReportLinkOptionsLevels; - FProcessedView: TcxCustomGridView; - FProcessParams: TdxGridReportLinkProcessParams; - FReportRows: TList; - FOnCustomDrawBandCell: TdxGridReportLinkCustomDrawBandCellEvent; - FOnCustomDrawCardRowCaptionCell: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent; - FOnCustomDrawCardRowDataCell: TdxGridReportLinkCustomDrawCardRowDataCellEvent; - FOnCustomDrawCell: TdxGridReportLinkCustomDrawCellEvent; - FOnCustomDrawFilterBar: TdxGridReportLinkCustomDrawFilterBarEvent; - FOnCustomDrawFooterCell: TdxGridReportLinkCustomDrawFooterCellEvent; - FOnCustomDrawHeaderCell: TdxGridReportLinkCustomDrawHeaderCellEvent; - FOnCustomDrawLevelCaption: TdxGridReportLinkCustomDrawLevelCaptionEvent; - FOnGetCellHeight: TdxGridReportLinkGetCellHeightEvent; - FOnGetCustomPageBreaks: TdxGridGetCustomPageBreaksEvent; - FOnInitializeBandCell: TdxGridReportLinkInitializeBandCellEvent; - FOnInitializeCardRowCaptionCell: TdxGridReportLinkInitializeCardRowCaptionCellEvent; - FOnInitializeCardRowDataCell: TdxGridReportLinkInitializeCardRowDataCellEvent; - FOnInitializeCell: TdxGridReportLinkInitializeCellEvent; -{$IFDEF CHARTVIEW} - FOnInitializeChartCell: TdxGridReportLinkInitializeChartCellEvent; -{$ENDIF} - FOnInitializeFilterBar: TdxGridReportLinkInitializeFilterBarEvent; - FOnInitializeFooterCell: TdxGridReportLinkInitializeFooterCellEvent; - FOnInitializeHeaderCell: TdxGridReportLinkInitializeHeaderCellEvent; - FOnInitializeLevelCaption: TdxGridReportLinkInitializeLevelCaptionEvent; - function GetActiveStyles: TdxGridReportLinkStyles; - function GetActiveView: TcxCustomGridView; - function GetActiveViewHelper: TdxCustomGridViewHelperClass; - function GetActiveViewMasterRow: TcxGridMasterDataRow; - function GetActiveViewParentLevel: TcxGridLevel; - function GetDesignWindow: TdxfmGridReportLinkDesignWindow; - function GetGrid: TcxGrid; - function GetOptionsExpanding: TdxGridReportLinkOptionsExpanding; - function GetOptionsFormatting: TdxGridReportLinkOptionsFormatting; - function GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; - function GetOptionsPagination: TdxGridReportLinkOptionsPagination; - function GetOptionsPreview: TdxGridReportLinkOptionsPreview; - function GetOptionsRefinements: TdxGridReportLinkOptionsRefinements; - function GetOptionsSelection: TdxGridReportLinkOptionsSelection; - function GetOptionsSize: TdxGridReportLinkOptionsSize; - function GetOptionsView: TdxGridReportLinkOptionsView; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowByGridRecord(GridRecord: TcxCustomGridRecord): TdxReportCell; - function GetReportRowCount: Integer; - function GetStyles: TdxGridReportLinkStyles; - procedure SetOnCustomDrawBandCell(Value: TdxGridReportLinkCustomDrawBandCellEvent); - procedure SetOnCustomDrawCell(Value: TdxGridReportLinkCustomDrawCellEvent); - procedure SetOnCustomDrawCardRowCaptionCell(Value: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent); - procedure SetOnCustomDrawCardRowDataCell(Value: TdxGridReportLinkCustomDrawCardRowDataCellEvent); - procedure SetOnCustomDrawFilterBar(Value: TdxGridReportLinkCustomDrawFilterBarEvent); - procedure SetOnCustomDrawFooterCell(Value: TdxGridReportLinkCustomDrawFooterCellEvent); - procedure SetOnCustomDrawHeaderCell(Value: TdxGridReportLinkCustomDrawHeaderCellEvent); - procedure SetOnCustomDrawLevelCaption(Value: TdxGridReportLinkCustomDrawLevelCaptionEvent); - procedure SetOptionsCards(Value: TdxGridReportLinkOptionsCards); -{$IFDEF CHARTVIEW} - procedure SetOptionsCharts(Value: TdxGridReportLinkOptionsCharts); -{$ENDIF} - procedure SetOptionsDetails(Value: TdxGridReportLinkOptionsDetails); - procedure SetOptionsExpanding(Value: TdxGridReportLinkOptionsExpanding); - procedure SetOptionsFormatting(Value: TdxGridReportLinkOptionsFormatting); - procedure SetOptionsLevels(Value: TdxGridReportLinkOptionsLevels); - procedure SetOptionsOnEveryPage(Value: TdxGridReportLinkOptionsOnEveryPage); - procedure SetOptionsPagination(Value: TdxGridReportLinkOptionsPagination); - procedure SetOptionsPreview(Value: TdxGridReportLinkOptionsPreview); - procedure SetOptionsRefinements(Value: TdxGridReportLinkOptionsRefinements); - procedure SetOptionsSelection(Value: TdxGridReportLinkOptionsSelection); - procedure SetOptionsSize(Value: TdxGridReportLinkOptionsSize); - procedure SetOptionsView(Value: TdxGridReportLinkOptionsView); - procedure SetStyles(Value: TdxGridReportLinkStyles); - protected - procedure BeforeDesignReport; override; - function CalculateActualScaleFactor: Integer; override; - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure ConvertCoords; override; - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - function GetBreakPagesByHardDelimiters: Boolean; override; - function GetEmptyPagesCanExist: Boolean; override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - function GetUseHardVertDelimiters: Boolean; override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - function IsDrawFootersOnEveryPage: Boolean; override; - function IsDrawHeadersOnEveryPage: Boolean; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - procedure MakeHardDelimiters(AReportCells: TdxReportCells; AVertDelimiters: TList); override; - - function GetAreNativeStylesAvailable: Boolean; override; - function GetStylesClass: TdxCustomReportLinkStylesClass; override; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; override; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; override; - procedure PrepareConstruct; override; - - procedure DoCustomDrawBandCell(ACanvas: TCanvas; AView: TcxGridBandedTableView; - ABand: TcxGridBand; AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawCardRowCaptionCell(ACanvas: TCanvas; AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TdxReportCellString; - var ADone: Boolean); dynamic; - procedure DoCustomDrawCardRowDataCell(ACanvas: TCanvas; AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TAbstractdxReportCellData; - var ADone: Boolean); dynamic; - procedure DoCustomDrawCell(ACanvas: TCanvas; AView: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; - AnItem: TAbstractdxReportCellData; var ADone: Boolean); dynamic; - procedure DoCustomDrawFilterBar(ACanvas: TCanvas; AView: TcxCustomGridTableView; - AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawFooterCell(ACanvas: TCanvas; AView: TcxGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; ALevel: Integer; - AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawHeaderCell(ACanvas: TCanvas; AView: TcxGridTableView; - AColumn: TcxGridColumn; AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawLevelCaption(ACanvas: TCanvas; AView: TcxCustomGridView; - AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoGetCellHeight(AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; var AHeight: Integer); dynamic; - procedure DoGetCustomPageBreaks; dynamic; - procedure DoInitializeBandCell(AView: TcxGridBandedTableView; ABand: TcxGridBand; - AnItem: TdxReportCellString); dynamic; - procedure DoInitializeCardRowCaptionCell(AView: TcxGridCardView; ACard: TcxGridCard; - ARow: TcxGridCardViewRow; AnItem: TdxReportCellString); dynamic; - procedure DoInitializeCardRowDataCell(AView: TcxGridCardView; ACard: TcxGridCard; - ARow: TcxGridCardViewRow; AnItem: TAbstractdxReportCellData); dynamic; - procedure DoInitializeCell(AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData); dynamic; -{$IFDEF CHARTVIEW} - procedure DoInitializeChartCell(AView: TcxGridChartView; AnItem: TdxReportCellGraphic); dynamic; -{$ENDIF} - procedure DoInitializeFilterBar(AView: TcxCustomGridTableView; AnItem: TdxReportCellString); dynamic; - procedure DoInitializeFooterCell(AView: TcxGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; ALevel: Integer; AnItem: TdxReportCellString); dynamic; - procedure DoInitializeHeaderCell(AView: TcxGridTableView; AColumn: TcxGridColumn; - AnItem: TdxReportCellString); dynamic; - procedure DoInitializeLevelCaption(AView: TcxCustomGridView; AnItem: TdxReportCellString); dynamic; - - procedure CreateOptions; override; - procedure DestroyOptions; override; - function GetOptionsCardsClass: TdxGridReportLinkOptionsCardsClass; virtual; -{$IFDEF CHARTVIEW} - function GetOptionsChartsClass: TdxGridReportLinkOptionsChartsClass; virtual; -{$ENDIF} - function GetOptionsDetailsClass: TdxGridReportLinkOptionsDetailsClass; virtual; - function GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; override; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; override; - function GetOptionsLevelsClass: TdxGridReportLinkOptionsLevelsClass; virtual; - function GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; override; - function GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; override; - function GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; override; - function GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; override; - function GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; override; - function GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; override; - function GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; override; - - procedure AddReportRow(AReportRow: TdxReportCell); - procedure AddVerticalHardDelimiter(ADelimiter: TdxReportCell); overload; - procedure AddVerticalHardDelimiter(ADelimiter: Integer); overload; - procedure BuildTopLevelView(AGridView: TcxCustomGridView); - procedure BuildTopLevelViews; - procedure BuildView(AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); - function CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; - function CreateViewBuilder(AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; - - procedure DoExpandRows; - procedure DoExpandViewRows(AGridView: TcxCustomGridView); - procedure ForEachView(AMasterRow: TcxGridMasterDataRow; AProc: TdxGridViewProc); - - function GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; out ADrawInfo: TdxGridCellCustomDrawInfo): TdxGridAttributeID; virtual; - function IsCardViewStyle(AStyle: TcxStyle): Boolean; virtual; - function IsCustomDrawn(AnAttributeID: TdxGridAttributeID): Boolean; virtual; - function IsOffice11StyleGrouping: Boolean; - - procedure CalculateProcessParams; - function CanAttributeBeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; - function IsAttributeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; - - property ActiveStyles: TdxGridReportLinkStyles read GetActiveStyles; - property ActiveView: TcxCustomGridView read GetActiveView; - property ActiveViewHelper: TdxCustomGridViewHelperClass read GetActiveViewHelper; - property ActiveViewMasterRow: TcxGridMasterDataRow read GetActiveViewMasterRow; - property ActiveViewParentLevel: TcxGridLevel read GetActiveViewParentLevel; - property DelimitersHardVert: TList read FDelimitersHardVert; - property HostInfoServices: TdxGridAttributeHostInfoServices read FHostInfoServices; - property ProcessParams: TdxGridReportLinkProcessParams read FProcessParams; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure AddPageBreak(AGridRecord: TcxCustomGridRecord); overload; - procedure AddPageBreak(const AGridRecords: array of TcxCustomGridRecord); overload; - procedure AddPageBreak(const AGridRecords: TdxGridRecordArray); overload; - procedure AddPageBreak(AGridRecords: TList); overload; // list of TcxCustomGridRecord - - property Grid: TcxGrid read GetGrid; - property DesignWindow: TdxfmGridReportLinkDesignWindow read GetDesignWindow; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property ReportRowsByGridRecord[GridRow: TcxCustomGridRecord]: TdxReportCell read GetReportRowByGridRecord; - property ReportRowCount: Integer read GetReportRowCount; - published - property Color; - property Font; - property OptionsCards: TdxGridReportLinkOptionsCards read FOptionsCards write SetOptionsCards; -{$IFDEF CHARTVIEW} - property OptionsCharts: TdxGridReportLinkOptionsCharts read FOptionsCharts write SetOptionsCharts; -{$ENDIF} - property OptionsDetails: TdxGridReportLinkOptionsDetails read FOptionsDetails write SetOptionsDetails; - property OptionsExpanding: TdxGridReportLinkOptionsExpanding read GetOptionsExpanding write SetOptionsExpanding; - property OptionsFormatting: TdxGridReportLinkOptionsFormatting read GetOptionsFormatting write SetOptionsFormatting; - property OptionsLevels: TdxGridReportLinkOptionsLevels read FOptionsLevels Write SetOptionsLevels; - property OptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage read GetOptionsOnEveryPage write SetOptionsOnEveryPage; - property OptionsPagination: TdxGridReportLinkOptionsPagination read GetOptionsPagination write SetOptionsPagination; - property OptionsPreview: TdxGridReportLinkOptionsPreview read GetOptionsPreview write SetOptionsPreview; - property OptionsRefinements: TdxGridReportLinkOptionsRefinements read GetOptionsRefinements write SetOptionsRefinements; - property OptionsSelection: TdxGridReportLinkOptionsSelection read GetOptionsSelection write SetOptionsSelection; - property OptionsSize: TdxGridReportLinkOptionsSize read GetOptionsSize write SetOptionsSize; - property OptionsView: TdxGridReportLinkOptionsView read GetOptionsView write SetOptionsView; - property ScaleFonts; - property StyleRepository; - property Styles: TdxGridReportLinkStyles read GetStyles write SetStyles; - property SupportedCustomDraw; - - property OnCustomDrawBandCell: TdxGridReportLinkCustomDrawBandCellEvent read FOnCustomDrawBandCell - write SetOnCustomDrawBandCell; - property OnCustomDrawCell: TdxGridReportLinkCustomDrawCellEvent read FOnCustomDrawCell - write SetOnCustomDrawCell; - property OnCustomDrawCardRowCaptionCell: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent read FOnCustomDrawCardRowCaptionCell - write SetOnCustomDrawCardRowCaptionCell; - property OnCustomDrawCardRowDataCell: TdxGridReportLinkCustomDrawCardRowDataCellEvent read FOnCustomDrawCardRowDataCell - write SetOnCustomDrawCardRowDataCell; - property OnCustomDrawFilterBar: TdxGridReportLinkCustomDrawFilterBarEvent read FOnCustomDrawFilterBar - write SetOnCustomDrawFilterBar; - property OnCustomDrawFooterCell: TdxGridReportLinkCustomDrawFooterCellEvent read FOnCustomDrawFooterCell - write SetOnCustomDrawFooterCell; - property OnCustomDrawHeaderCell: TdxGridReportLinkCustomDrawHeaderCellEvent read FOnCustomDrawHeaderCell - write SetOnCustomDrawHeaderCell; - property OnCustomDrawLevelCaption: TdxGridReportLinkCustomDrawLevelCaptionEvent read FOnCustomDrawLevelCaption - write SetOnCustomDrawLevelCaption; - property OnGetCellHeight: TdxGridReportLinkGetCellHeightEvent read FOnGetCellHeight write FOnGetCellHeight; - property OnGetCustomPageBreaks: TdxGridGetCustomPageBreaksEvent read FOnGetCustomPageBreaks write FOnGetCustomPageBreaks; - property OnInitializeBandCell: TdxGridReportLinkInitializeBandCellEvent read FOnInitializeBandCell - write FOnInitializeBandCell; - property OnInitializeCardRowCaptionCell: TdxGridReportLinkInitializeCardRowCaptionCellEvent read FOnInitializeCardRowCaptionCell - write FOnInitializeCardRowCaptionCell; - property OnInitializeCardRowDataCell: TdxGridReportLinkInitializeCardRowDataCellEvent read FOnInitializeCardRowDataCell - write FOnInitializeCardRowDataCell; - property OnInitializeCell: TdxGridReportLinkInitializeCellEvent read FOnInitializeCell - write FOnInitializeCell; -{$IFDEF CHARTVIEW} - property OnInitializeChartCell: TdxGridReportLinkInitializeChartCellEvent read FOnInitializeChartCell - write FOnInitializeChartCell; -{$ENDIF} - property OnInitializeFilterBar: TdxGridReportLinkInitializeFilterBarEvent read FOnInitializeFilterBar - write FOnInitializeFilterBar; - property OnInitializeFooterCell: TdxGridReportLinkInitializeFooterCellEvent read FOnInitializeFooterCell - write FOnInitializeFooterCell; - property OnInitializeHeaderCell: TdxGridReportLinkInitializeHeaderCellEvent read FOnInitializeHeaderCell - write FOnInitializeHeaderCell; - property OnInitializeLevelCaption: TdxGridReportLinkInitializeLevelCaptionEvent read FOnInitializeLevelCaption - write FOnInitializeLevelCaption; - end; - - TcxGridCardView2OptionsView = class(TcxGridCardViewOptionsView) - private - FCardBorders: Boolean; - FGridLineColor: TColor; - FGridLines: TcxGridLines; - FShadowDepth: Integer; - function GetShadowVisible: Boolean; - procedure SetCardBorders(Value: Boolean); - procedure SetGridLineColor(Value: TColor); - procedure SetGridLines(Value: TcxGridLines); - procedure SetShadowDepth(Value: Integer); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - property ShadowVisible: Boolean read GetShadowVisible; - published - property CardBorders: Boolean read FCardBorders write SetCardBorders default False; - property GridLineColor: TColor read FGridLineColor write SetGridLineColor default clDefault; - property GridLines: TcxGridLines read FGridLines write SetGridLines default glNone; - property ShadowDepth: Integer read FShadowDepth write SetShadowDepth; - end; - - TcxGridCardView2Styles = class(TcxGridCardViewStyles) - private - FOnGetCardShadowStyle: TcxGridGetRecordStyleEvent; - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - public - procedure Assign(Source: TPersistent); override; - procedure GetCardShadowParams(ARecord: TcxCustomGridRecord; out AParams: TcxViewParams); virtual; - published - property CardShadow: TcxStyle index vsCardShadow read GetValue write SetValue; - property OnGetCardShadowStyle: TcxGridGetRecordStyleEvent read FOnGetCardShadowStyle - write FOnGetCardShadowStyle; - end; - - TcxGridCardView2 = class(TcxGridCardView) - protected - function GetOptionsViewClass: TcxCustomGridOptionsViewClass; override; - function GetStylesClass: TcxCustomGridViewStylesClass; override; - function GetViewDataClass: TcxCustomGridViewDataClass; override; - function GetViewInfoClass: TcxCustomGridViewInfoClass; override; - end; - - TdxfmGridReportLinkDesignWindow = class(TdxfmCustomcxControlReportLinkDesignWindow) - PageControl1: TPageControl; - tshView: TTabSheet; - tshBehaviors: TTabSheet; - tshPreview: TTabSheet; - tshCards: TTabSheet; - lblShow: TLabel; - imgShow: TImage; - bvlShow: TBevel; - chbxShowBands: TCheckBox; - chbxShowHeaders: TCheckBox; - chbxShowFooters: TCheckBox; - chbxShowGroupFooters: TCheckBox; - chbxShowExpandButtons: TCheckBox; - lblOnEveryPage: TLabel; - imgOnEveryPage: TImage; - bvlOnEveryPage: TBevel; - chbxBandsOnEveryPage: TCheckBox; - chbxHeadersOnEveryPage: TCheckBox; - chbxFootersOnEveryPage: TCheckBox; - chbxFilterBarOnEveryPage: TCheckBox; - chbxCaptionsOnEveryPage: TCheckBox; - bvlWarningHost: TBevel; - lblSelection: TLabel; - imgSelection: TImage; - chbxProcessSelection: TCheckBox; - chbxProcessExactSelection: TCheckBox; - bvlSelection: TBevel; - lblExpanding: TLabel; - imgExpanding: TImage; - chbxExpandGroupRows: TCheckBox; - bvlExpanding: TBevel; - chbxExpandMasterRows: TCheckBox; - lblPreviewOptions: TLabel; - bvlPreviewOptions: TBevel; - chbxPreviewVisible: TCheckBox; - chbxPreviewAutoHeight: TCheckBox; - lblPreviewMaxLineCount: TLabel; - bvlPreviewMaxLineCountHost: TBevel; - chbxShowCaptions: TCheckBox; - chbxShowFilterBar: TCheckBox; - imgPreview: TImage; - chbxStartFromActiveView: TCheckBox; - chbxOnlyActiveView: TCheckBox; - lblDetails: TLabel; - bvlDetails: TBevel; - imgDetails: TImage; - tshFormatting: TTabSheet; - lblLookAndFeel: TLabel; - bvlLookAndFeel: TBevel; - imgLookAndFeel: TImage; - cbxLookAndFeel: TComboBox; - chbxFlatCheckMarks: TCheckBox; - chbxDisplayGraphicsAsText: TCheckBox; - chbxTransparentGraphics: TCheckBox; - imgRefinements: TImage; - lblRefinements: TLabel; - bvlRefinements: TBevel; - bvlCardSpaceVertHost: TBevel; - bvlCardSpaceHorzHost: TBevel; - lblCardSpaceVert: TLabel; - lblCardSpaceHorz: TLabel; - imgCardSpacing: TImage; - lblCardSpacing: TLabel; - bvlCardSpacing: TBevel; - bvlCardSizes: TBevel; - lblCardSizes: TLabel; - imgCardSizes: TImage; - chbxCardsKeepSameHeight: TCheckBox; - chbxCardsKeepSameWidth: TCheckBox; - chbxCardsAutoWidth: TCheckBox; - chbxCardsVertLines: TCheckBox; - chbxCardsHorzLines: TCheckBox; - chbxCardsBorder: TCheckBox; - imgCardFraming: TImage; - lblCardFraming: TLabel; - bvlCardFraming: TBevel; - bvlCardShadowColorHost: TBevel; - lblCardShadowDepth: TLabel; - bvlCardShadow: TBevel; - lblCardShadow: TLabel; - lblCardShadowColor: TLabel; - bvlCardShadowDepthHost: TBevel; - imgCardShadow: TImage; - pnlPreview: TPanel; - PreviewGrid: TcxGrid; - PreviewBandedView: TcxGridBandedTableView; - colVendorName: TcxGridBandedColumn; - colVendorLogo: TcxGridBandedColumn; - colVendorCountry: TcxGridBandedColumn; - colCarModel: TcxGridBandedColumn; - colIsSUVModel: TcxGridBandedColumn; - PreviewGridLevel: TcxGridLevel; - chbxLevelsUnwrap: TCheckBox; - imgLevels: TImage; - lblLevels: TLabel; - bvlLevels: TBevel; - chbxLevelsUnwrapTopLevel: TCheckBox; - chbxLevelsRiseActiveLevelOntoTop: TCheckBox; - chbxSuppressBackgroundBitmaps: TCheckBox; - tshStyles: TTabSheet; - btnStyleColor: TButton; - btnStyleFont: TButton; - btnStyleBackgroundBitmap: TButton; - chbxUseNativeStyles: TCheckBox; - bvlStyles: TBevel; - pmStyles: TPopupMenu; - miStyleFont: TMenuItem; - miStyleBackgroundBitmap: TMenuItem; - miStyleColor: TMenuItem; - bvlStyleSheets: TBevel; - lblStyleSheets: TLabel; - cbxStyleSheets: TComboBox; - btnStyleSheetNew: TButton; - btnStyleSheetCopy: TButton; - btnStyleSheetDelete: TButton; - milLine: TMenuItem; - miStylesSaveAs: TMenuItem; - btnStylesSaveAs: TButton; - btnStyleSheetRename: TButton; - miStyleBackgroundBitmapClear: TMenuItem; - btnStyleBackgroundBitmapClear: TButton; - btnStyleRestoreDefaults: TButton; - miStyleRestoreDefaults: TMenuItem; - miLine2: TMenuItem; - miLine3: TMenuItem; - bvlStylesHost: TBevel; - ilStylesPopup: TImageList; - miStylesSelectAll: TMenuItem; - miLine4: TMenuItem; - lblGridSize: TLabel; - bvlGridSize: TBevel; - imgGridSize: TImage; - chbxGridAutoWidth: TCheckBox; - chbxConsumeSelectionStyle: TCheckBox; - bvlRefinementsSeparator: TBevel; - lblPagination: TLabel; - bvlPagination: TBevel; - imgPagination: TImage; - chbxPaginateOneGroupPerPage: TCheckBox; - chbxPaginateByTopLevelGroups: TCheckBox; - lblPreviewWindow: TStaticText; - cxStyleRepository1: TcxStyleRepository; - styleCardShadow: TcxStyle; - styleCardBorder: TcxStyle; - Label1: TLabel; - chbxExpandCards: TCheckBox; - lblUseNativeStyles: TLabel; - tshCharts: TTabSheet; - lblChartsOptions: TLabel; - imgCharts: TImage; - chbxChartsTransparent: TCheckBox; - bvlChartsOptions: TBevel; - chbxLevelsSkipEmptyViews: TCheckBox; - procedure OptionsViewClick(Sender: TObject); - procedure OptionsOnEveryPageClick(Sender: TObject); - procedure OptionsSelectionClick(Sender: TObject); - procedure OptionsExpandingClick(Sender: TObject); - procedure OptionsRefinementClick(Sender: TObject); - procedure LookAndFeelClick(Sender: TObject); - procedure PreviewVisibleClick(Sender: TObject); - procedure PreviewAutoHeightClick(Sender: TObject); - procedure OptionsCardsClick(Sender: TObject); - procedure IsSUVModelCustomDrawCell(Sender: TcxCustomGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; - var ADone: Boolean); - procedure VendorLogoCustomDrawCell(Sender: TcxCustomGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; - var ADone: Boolean); - procedure PreviewBandedViewCustomDrawColumnHeader( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); - procedure PreviewBandedViewCustomDrawBandHeader( - Sender: TcxGridBandedTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridBandHeaderViewInfo; var ADone: Boolean); - procedure PreviewBandedViewCustomDrawFooterCell( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); - procedure OptionsDetailsClick(Sender: TObject); - procedure OptionsSizeClick(Sender: TObject); - procedure OptionsLevelsClick(Sender: TObject); - procedure OptionsFormatingClick(Sender: TObject); - procedure StyleColorClick(Sender: TObject); - procedure StyleFontClick(Sender: TObject); - procedure StyleBackgroundBitmapClick(Sender: TObject); - procedure lbxStylesClick(Sender: TObject); - procedure pmStylesPopup(Sender: TObject); - procedure cbxStyleSheetsClick(Sender: TObject); - procedure StyleSheetNewClick(Sender: TObject); - procedure StyleSheetCopyClick(Sender: TObject); - procedure StyleSheetDeleteClick(Sender: TObject); - procedure StylesSaveAsClick(Sender: TObject); - procedure cbxStyleSheetsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure StyleSheetRenameClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure StyleBackgroundBitmapClearClick(Sender: TObject); - procedure StyleRestoreDefaultsClick(Sender: TObject); - procedure miStylesSelectAllClick(Sender: TObject); - procedure OptionsPaginationClick(Sender: TObject); - procedure cbxStyleSheetsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure lblUseNativeStylesClick(Sender: TObject); - procedure chbxChartsTransparentClick(Sender: TObject); - private - ccbxCardsShadowColor: TdxPSColorCombo; - lbxStyles: TdxStylesListBox; - PreviewCardView: TcxGridCardView2; - rowVendorName: TcxGridCardViewRow; - rowVendorLogo: TcxGridCardViewRow; - rowVendorCountry: TcxGridCardViewRow; - rowCarModel: TcxGridCardViewRow; - rowIsSuvModel: TcxGridCardViewRow; - seCardsShadowDepth: TdxPSSpinEdit; - seCardsSpaceHorz: TdxPSSpinEdit; - seCardsSpaceVert: TdxPSSpinEdit; - sePreviewMaxLineCount: TdxPSSpinEdit; - wpIncorrectOnEveryPageState: TdxPSWarningPane; - - function GetActiveStyle: TcxStyle; - function GetHasSelectedStyles: Boolean; - function GetHasSelectedStylesWithAssignedBitmap: Boolean; - function GetReportLink: TdxGridReportLink; - - procedure CardShadowDepthChanged(Sender: TObject); - procedure CardShadowColorChanged(Sender: TObject); - procedure CardSpaceHorzChanged(Sender: TObject); - procedure CardSpaceVertChanged(Sender: TObject); - procedure PreviewMaxLineCountChanged(Sender: TObject); - - function CanSelectAllStyles: Boolean; - procedure ChangeActiveView(AView: TcxCustomGridView); - procedure CreateCardView; - procedure CreateControls; - procedure CustomDrawBorders(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo); - procedure CustomDrawFooter(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxCustomGridCellViewInfo); - procedure CustomDrawHeader(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxCustomGridCellViewInfo); - procedure CustomDrawTextRect(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxCustomGridCellViewInfo; - ABackgroundBitmap: TBitmap); - procedure InitializePreviewGrid; - procedure InitializePreviewGridStyles; - procedure LoadDataIntoPreviewGridView(AView: TcxCustomGridTableView); - procedure RecreateStylesListBox; - procedure RestoreSelectedStyles(AList: TList); - procedure SaveSelectedStyles(AList: TList); - procedure SetActivePage; - procedure UpdatePreviewGridStyles(const ACaption: string; AStyle: TcxStyle); - procedure UpdateWarningPane; - - procedure SetOptionsCardsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsChartsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsDetailsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsExpandingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsFormattingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsLevelsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsOnEveryPageByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsPaginationByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsRefinementsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsSelectionByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsSizeByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsViewByIndex(Index: Integer; Value: Boolean); - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - - function GetDesignerTabIndex: Integer; override; - procedure SetDesignerTabIndex(Value: Integer); override; - - procedure DoActiveStyleSheetChanged; override; - procedure DoFormActivated(AnActive: Boolean); override; - procedure DoRefreshStylesList; override; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); override; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); override; - - procedure GetSelectedStyleNames(AStrings: TStrings); override; - procedure GetStyleNames(out AStrings: TStrings); override; - procedure GetStyleSheetNames(out AStrings: TStrings); override; - - property ActiveStyle: TcxStyle read GetActiveStyle; - property HasSelectedStyles: Boolean read GetHasSelectedStyles; - property HasSelectedStylesWithAssignedBitmap: Boolean read GetHasSelectedStylesWithAssignedBitmap; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property ReportLink: TdxGridReportLink read GetReportLink; - end; - -implementation - -{$R *.DFM} - -{658 x 466 - DesignWindow} - -{.2 - IsOffice11StyleGrouping} -{.3 - chbxTransparentRichEdits} - -uses - Registry, Forms, {$IFDEF DELPHI6}Variants, {$ENDIF}cxVariants, cxGridStrs, - cxDataUtils, dxThemeManager, {$IFDEF DXVER500}dxOffice11, {$ENDIF}dxPSGlbl, - cxDrawTextUtils, dxPSUtl, dxBkgnd, dxPSPopupMan, dxPSRes, dxPSImgs, Math; - -const - SortOrderMap: array[TcxGridSortOrder] of TdxCellSortOrder = (csoNone, csoUp, csoDown); - - ExpandButtonInteriorColor = clBtnFace; - DefaultFilterBarColor = clBtnShadow; - DefaultFilterBarTextColor = clWindow; - DefaultIndentWidth = 20; - DefaultDataRowLineHeight = 19; - DefaultGroupFooterLineHeight = 20; - DefaultGroupRowLineHeight = 20; - DefaultFooterLineHeight = 20; - FilterBarTextOffset = 3; - FirstCardOffset = 2; - FooterItemInflateHorz = 2; - FooterItemInflateVert = 3; - TabsAreaOffset = 2; - -var - FGridLinkStyleSheetPrototype: TdxGridReportLinkStyleSheet; - -type - TdxPSGridDataCellPos = TcxGridDataCellPos; - - TdxGridViewBuildersFactory = class(TdxCustomClassMaps) - private - function GetBuilderClass(GridView: TcxCustomGridView): TdxGridViewBuilderClass; - public - class function Instance: TdxGridViewBuildersFactory; reintroduce; overload; - function CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; - function CreateViewBuilder(AReportLink: TdxGridReportLink; AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; - property BuilderClasses[GridView: TcxCustomGridView]: TdxGridViewBuilderClass read GetBuilderClass; default; - end; - - TdxViewHelpersFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(GridView: TcxCustomGridView): TdxCustomGridViewHelperClass; - public - class function Instance: TdxViewHelpersFactory; reintroduce; overload; - function HelperClassByItem(AnItem: TdxReportVisualItem): TdxCustomGridViewHelperClass; - property HelperClasses[GridView: TcxCustomGridView]: TdxCustomGridViewHelperClass read GetHelperClass; default; - end; - - TdxRecordHelpersFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(GridRecord: TcxCustomGridRecord): TdxCustomGridRecordHelperClass; - public - class function Instance: TdxRecordHelpersFactory; reintroduce; overload; - property HelperClasses[GridRecord: TcxCustomGridRecord]: TdxCustomGridRecordHelperClass read GetHelperClass; default; - end; - - - TcxCustomGridCellPainterAccess = class(TcxCustomGridCellPainter); - TcxCustomGridCellViewInfoAccess = class(TcxCustomGridCellViewInfo); - TcxCustomGridRecordAccess = class(TcxCustomGridRecord); - TcxCustomGridTableControllerAccess = class(TcxCustomGridTableController); - TcxCustomGridTableItemAccess = class(TcxCustomGridTableItem); - {$IFDEF DXVER500} - TcxCustomGridTableFilteringAccess = class(TcxCustomGridTableFiltering); - {$ENDIF} - TcxCustomGridTableOptionsViewAccess = class(TcxCustomGridTableOptionsView); - TcxCustomGridViewAccess = class(TcxCustomGridView); - TcxGridColumnAccess = class(TcxGridColumn); - TcxGridMasterDataRowAccess = class(TcxGridMasterDataRow); - TcxGridTableViewInfoAccess = class(TcxGridTableViewInfo); - - -{ Helpers } - -{ CustomGridCellPainter Helpers } - -procedure CustomGridCellPainter_DrawBorders(AInstance: TcxCustomGridCellPainter); -begin - TcxCustomGridCellPainterAccess(AInstance).DrawBorders; -end; - -{ CustomGridCellViewInfo Helpers } - -function CustomGridCellViewInfo_GetPainterClass(AInstance: TcxCustomGridCellViewInfo): TcxCustomGridCellPainterClass; -begin - Result := TcxCustomGridCellViewInfoAccess(AInstance).GetPainterClass; -end; - -{ CustomGridRecord Helpers } - -function CustomGridRecord_GetIsParent(AInstance: TcxCustomGridRecord): Boolean; -begin - Result := TcxCustomGridRecordAccess(AInstance).IsParent; -end; - -{ CustomGridTableController Helpers } - -function CustomGridTableController_GetMultiSelect(AInstance: TcxCustomGridTableController): Boolean; -begin - Result := TcxCustomGridTableControllerAccess(AInstance).MultiSelect; -end; - -{ CustomGridTableFiltering Helpers } - -function CustomGridTableFiltering_GetPosition(AInstance: TcxCustomGridTableFiltering): TcxGridFilterPosition; -begin - Result := TcxCustomGridTableFilteringAccess(AInstance).Position; -end; - -{ CustomGridTableOptionsView Helpers } - -function CustomGridTableOptionsView_GetCellAutoHeight(AInstance: TcxCustomGridTableOptionsView): Boolean; -begin - Result := TcxCustomGridTableOptionsViewAccess(AInstance).CellAutoHeight; -end; - -{ CustomGridView Helpers } - -function CustomGridView_GetBackgroundBitmaps(AInstance: TcxCustomGridView): TcxCustomGridBackgroundBitmaps; -begin - Result := TcxCustomGridViewAccess(AInstance).BackgroundBitmaps; -end; - -function CustomGridView_GetDataController(AInstance: TcxCustomGridView): TcxCustomDataController; -begin - Result := TcxCustomGridViewAccess(AInstance).DataController; -end; - -function CustomGridView_GetStyles(AInstance: TcxCustomGridView): TcxCustomGridStyles; -begin - Result := TcxCustomGridViewAccess(AInstance).Styles; -end; - -{ GridColumn Helpers } - -function GridColumn_GetFixed(AInstance: TcxGridColumn): Boolean; -begin - Result := TcxGridColumnAccess(AInstance).Fixed; -end; - -function GridColumn_DoCompareValuesForCellMerging(AInstance: TcxGridColumn; - ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: TcxEditValue; - ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: TcxEditValue): Boolean; -begin - Result := TcxGridColumnAccess(AInstance).DoCompareValuesForCellMerging(ARow1, AProperties1, AValue1, ARow2, AProperties2, AValue2); -end; - -{ GridMasterDataRow Helpers } - -procedure GridMasterDataRow_DoExpand(AInstance: TcxGridMasterDataRow; ARecurse: Boolean); -begin - TcxGridMasterDataRowAccess(AInstance).DoExpand(ARecurse); -end; - -{ GridTableViewInfo Helpers } - -procedure GridTableViewInfo_CalculateExpandButtonParams(AInstance: TcxGridTableViewInfo); -begin - TcxGridTableViewInfoAccess(AInstance).CalculateExpandButtonParams; -end; - -{ Utilities } - -function GridLinkStyleSheetPrototype: TdxGridReportLinkStyleSheet; - - function CreateStyle(AColor, AFontColor: TColor): TcxStyle; - begin - Result := TcxStyle.Create(FGridLinkStyleSheetPrototype); - with Result do - begin - Color := AColor; - Font.Name := dxPSCore.dxPSDefaultFontName; - Font.Color := AFontColor; - end; - end; - -begin - if FGridLinkStyleSheetPrototype = nil then - begin - FGridLinkStyleSheetPrototype := TdxGridReportLinkStyleSheet.Create(nil); - with FGridLinkStyleSheetPrototype.Styles as TdxGridReportLinkStyles do - begin - BandHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Caption := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - CardCaptionRow := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - CardRowCaption := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Content := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ContentEven := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ContentOdd := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - FilterBar := CreateStyle(clBtnShadow, dxPSCore.dxDefaultContentColor); - Footer := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Group := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Header := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Preview := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - Selection := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - end; - end; - Result := FGridLinkStyleSheetPrototype; -end; - -function CreatePSDataCellPos: TdxPSGridDataCellPos; -begin - Result := TdxPSGridDataCellPos.Create; -end; - -procedure FreePSDataCellPos(out ADataCellPos: TdxPSGridDataCellPos); -begin - FreeAndNil(ADataCellPos); -end; - -procedure _LoadAllRecords(ADBDataModeController: TcxDBDataModeController; - out APrevAllRecordsAreLoaded: Boolean); -begin - APrevAllRecordsAreLoaded := not ADBDataModeController.GridMode; - if not APrevAllRecordsAreLoaded then - ADBDataModeController.GridMode := False; -end; - -procedure _UnloadAllRecords(ADBDataModeController: TcxDBDataModeController; - const APrevAllRecordsAreLoaded: Boolean); -begin - if not APrevAllRecordsAreLoaded then - ADBDataModeController.GridMode := True; -end; - -{ TdxGridViewBuildersFactory } - -function dxGridViewBuildersFactory: TdxGridViewBuildersFactory; -begin - Result := TdxGridViewBuildersFactory.Instance; -end; - -class function TdxGridViewBuildersFactory.Instance: TdxGridViewBuildersFactory; -begin - Result := inherited Instance as TdxGridViewBuildersFactory; -end; - -function TdxGridViewBuildersFactory.CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := BuilderClasses[AGridView].CreateAdapter(AMasterAdapter, AGridView); -end; - -function TdxGridViewBuildersFactory.CreateViewBuilder(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; -begin - Result := BuilderClasses[AGridView].Create(AReportLink, AMasterBuilder, AGridView); -end; - -function TdxGridViewBuildersFactory.GetBuilderClass(GridView: TcxCustomGridView): TdxGridViewBuilderClass; -begin - Result := TdxGridViewBuilderClass(PairClasses[GridView.ClassType]); -end; - -{ TdxViewHelpersFactory } - -function dxViewHelpersFactory: TdxViewHelpersFactory; -begin - Result := TdxViewHelpersFactory.Instance; -end; - -class function TdxViewHelpersFactory.Instance: TdxViewHelpersFactory; -begin - Result := inherited Instance as TdxViewHelpersFactory; -end; - -function TdxViewHelpersFactory.HelperClassByItem(AnItem: TdxReportVisualItem): TdxCustomGridViewHelperClass; -begin - Result := HelperClasses[TcxCustomGridView(AnItem.TopLevelParent.Data)]; -end; - -function TdxViewHelpersFactory.GetHelperClass(GridView: TcxCustomGridView): TdxCustomGridViewHelperClass; -begin - if GridView = nil then - Result := nil - else - Result := TdxCustomGridViewHelperClass(PairClasses[GridView.ClassType]); -end; - -{ TdxRecordHelpersFactory } - -function dxRecordHelpersFactory: TdxRecordHelpersFactory; -begin - Result := TdxRecordHelpersFactory.Instance; -end; - -class function TdxRecordHelpersFactory.Instance: TdxRecordHelpersFactory; -begin - Result := inherited Instance as TdxRecordHelpersFactory; -end; - -function TdxRecordHelpersFactory.GetHelperClass(GridRecord: TcxCustomGridRecord): TdxCustomGridRecordHelperClass; -begin - Result := TdxCustomGridRecordHelperClass(PairClasses[GridRecord.ClassType]); -end; - -{ CLR Accesssors } - - - -{ TdxCustomGridViewHelper } - -constructor TdxCustomGridViewHelper.Create(AView: TcxCustomGridView); -begin - inherited Create; - FView := AView; -end; - -class function TdxCustomGridViewHelper.PairClass: TClass; -begin - Result := ViewClass; -end; - -class procedure TdxCustomGridViewHelper.Register; -begin - dxViewHelpersFactory.Register(Self); -end; - -class procedure TdxCustomGridViewHelper.Unregister; -begin - dxViewHelpersFactory.Unregister(Self); -end; - -class function TdxCustomGridViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := dxGridUndefinedID; - if TClass(AnItem.Data) = TdxGridLevelCaption then - Result := dxGridLevelCaptionID; -end; - -class procedure TdxCustomGridViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - with ACustomDrawInfo do - begin - GridAttributeID := ExtractCustomDrawID(AnItem); - GridView := ExtractGridView(AnItem); - end; -end; - -class function TdxCustomGridViewHelper.ExtractGridView(AnItem: TdxReportVisualItem): TcxCustomGridView; -begin - Result := TcxCustomGridView(AnItem.TopLevelParent.Data); -end; - -class function TdxCustomGridViewHelper.HasData(AView: TcxCustomGridView): Boolean; -begin - Result := True; -end; - -class function TdxCustomGridViewHelper.IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; -var - Attributes: TdxGridAttributeClasses; - I: Integer; -begin - Attributes := SupportedAttributes; - - Result := True; - for I := Low(Attributes) to High(Attributes) do - if Attributes[I] = AnAttribute then Exit; - Result := False; -end; - -class function TdxCustomGridViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - SetLength(Result, 0); - AddAttribute(Result, TdxGridLevelCaption); -end; - -class procedure TdxCustomGridViewHelper.AddAttribute(var AnAtributes: TdxGridAttributeClasses; - AnAttribute: TdxGridAttributeClass); -begin - SetLength(AnAtributes, Length(AnAtributes) + 1); - AnAtributes[Length(AnAtributes) - 1] := AnAttribute; -end; - -{$IFDEF DXVER500} -class function TdxCustomGridViewHelper.FilterPosition(AView: TcxCustomGridView): TcxGridFilterPosition; -begin - Result := fpBottom; -end; -{$ENDIF} - -class function TdxCustomGridViewHelper.IsFilterBarAtBottom(AView: TcxCustomGridView): Boolean; -begin - {$IFDEF DXVER500} - Result := FilterPosition(AView) = fpBottom; - {$ELSE} - Result := True; - {$ENDIF} -end; - -class function TdxCustomGridViewHelper.IsFilterBarAtTop(AView: TcxCustomGridView): Boolean; -begin - {$IFDEF DXVER500} - Result := FilterPosition(AView) = fpTop; - {$ELSE} - Result := False; - {$ENDIF} -end; - -class function TdxCustomGridViewHelper.IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; -begin - Result := False; -end; - -class function TdxCustomGridViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -{ TdxNullGridViewHelper } - -class function TdxNullGridViewHelper.IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := True; -end; - -class function TdxNullGridViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := nil; -end; - -{ TdxCustomGridTableViewHelper } - -class function TdxCustomGridTableViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if TClass(AnItem.Data) = TdxGridFilterBar then - Result := dxGridFilterBarID; -end; - -class function TdxCustomGridTableViewHelper.HasData(AView: TcxCustomGridView): Boolean; -begin - Result := (AView <> nil) and (TcxCustomGridTableView(AView).ViewData.RecordCount <> 0); -end; - -class function TdxCustomGridTableViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - Result := inherited SupportedAttributes; - AddAttribute(Result, TdxGridFilterBar); -end; - -class function TdxCustomGridTableViewHelper.ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; -begin - Result := nil; -end; - -{$IFDEF DXVER500} -class function TdxCustomGridTableViewHelper.FilterPosition(AView: TcxCustomGridView): TcxGridFilterPosition; -begin - Result := CustomGridTableFiltering_GetPosition(TcxCustomGridTableView(AView).Filtering); -end; -{$ENDIF} - -class function TdxCustomGridTableViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridTableView; -end; - -{ TdxGridCardViewHelper } - -class function TdxGridCardViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if (AnItem.Parent <> nil) and (AnItem.Parent is TdxReportCardRow) then - if TClass(AnItem.Data) = TdxGridCardRowCaption then - Result := dxGridCardRowCaptionID - else - Result := dxGridCardRowDataID; -end; - -class procedure TdxGridCardViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - with ACustomDrawInfo do - try - inherited; - if GridAttributeID in [dxGridCardRowCaptionID, dxGridCardRowDataID] then - begin - GridCard := ExtractCard(AnItem); - GridCardRow := ExtractCardRow(AnItem); - end; - except - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - GridAttributeID := dxGridUndefinedID; - end; -end; - -class function TdxGridCardViewHelper.ExtractCard(AnItem: TdxReportVisualItem): TcxGridCard; -begin - Result := ExtractRecord(AnItem) as TcxGridCard; -end; - -class function TdxGridCardViewHelper.ExtractCardRow(AnItem: TdxReportVisualItem): TcxGridCardViewRow; -begin - Result := TdxReportCardRow(AnItem.Parent).GridCardRow; -end; - -class function TdxGridCardViewHelper.ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; -begin - Result := TdxReportCardRow(AnItem.Parent).Card.GridCard; -end; - -class function TdxGridCardViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -{ TdxGridTableViewHelper } - -class function TdxGridTableViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if AnItem.Parent <> nil then - if TClass(AnItem.Parent.Data) = TdxGridHeader then - Result := dxGridHeaderID - else - if TClass(AnItem.Parent.Data) = TdxGridFooter then - Result := dxGridFooterID - else - if IsDelphiObject(AnItem.Data) and (TObject(AnItem.Data) is TcxCustomGridTableItem) then - if (AnItem.Parent.Parent <> nil) and (AnItem.Parent.Parent.Data >= 0) and - (AnItem.Parent.Parent.Data < High(Byte)) then - Result := dxGridGroupFooterID - else - Result := dxGridRecordID; -end; - -class procedure TdxGridTableViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - with ACustomDrawInfo do - try - inherited; - - if GridAttributeID in [dxGridFooterID, dxGridGroupFooterID, dxGridHeaderID, dxGridRecordID] then - begin - GridColumn := ExtractColumn(AnItem); - if GridAttributeID in [dxGridRecordID, dxGridGroupFooterID] then - begin - GridRecord := ExtractRecord(AnItem); - if GridAttributeID = dxGridGroupFooterID then - GroupLevel := ExtractGroupLevel(AnItem); - end - else - GroupLevel := -1; - end; - except - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - GridAttributeID := dxGridUndefinedID; - end; -end; - -class function TdxGridTableViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - Result := inherited SupportedAttributes; - AddAttribute(Result, TdxGridDetails); - AddAttribute(Result, TdxGridExpandButton); - AddAttribute(Result, TdxGridFooter); - AddAttribute(Result, TdxGridGroupFooter); - AddAttribute(Result, TdxGridGroupRow); - AddAttribute(Result, TdxGridHeader); - AddAttribute(Result, TdxGridPreview); -end; - -class function TdxGridTableViewHelper.ExtractColumn(AnItem: TdxReportVisualItem): TcxGridColumn; -begin - Result := TcxGridColumn(AnItem.Data); -end; - -class function TdxGridTableViewHelper.ExtractGroupLevel(AnItem: TdxReportVisualItem): Integer; -begin - Result := Integer(AnItem.Parent.Parent.Data); -end; - -class function TdxGridTableViewHelper.ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; -begin - Result := TcxCustomGridRecord(AnItem.Parent.Data); -end; - -class function TdxGridTableViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridTableView; -end; - -class function TdxGridTableViewHelper.IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; -begin - {$IFDEF DXVER500} - Result := TcxGridTableView(AView).OptionsView.GroupRowStyle = grsOffice11; - {$ELSE} - Result := False; - {$ENDIF} -end; - -{ TdxGridBandedTableViewHelper } - -class function TdxGridBandedTableViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if IsDelphiObject(AnItem.Data) and (TObject(AnItem.Data) is TcxGridBand) then - Result := dxGridBandID; -end; - -class procedure TdxGridBandedTableViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - with ACustomDrawInfo do - try - inherited; - if GridAttributeID = dxGridBandID then - GridBand := ExtractBand(AnItem); - except - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - GridAttributeID := dxGridUndefinedID; - end; -end; - -class function TdxGridBandedTableViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - Result := inherited SupportedAttributes; - AddAttribute(Result, TdxGridBandHeader); -end; - -class function TdxGridBandedTableViewHelper.ExtractBand(AnItem: TdxReportVisualItem): TcxGridBand; -begin - Result := TcxGridBand(AnItem.Data); -end; - -class function TdxGridBandedTableViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridBandedTableView; -end; - -{$IFDEF CHARTVIEW} -class function TdxGridChartViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridChartView; -end; - -class function TdxGridChartViewHelper.HasData(AView: TcxCustomGridView): Boolean; -begin - Result := TcxGridChartView(AView).VisibleSeriesCount <> 0; -end; -{$ENDIF} - -{ TdxCustomGridRecordHelper } - -constructor TdxCustomGridRecordHelper.Create(AAdapter: TdxCustomGridTableViewAdapter); -begin - inherited Create; - FAdapter := AAdapter; -end; - -class function TdxCustomGridRecordHelper.PairClass: TClass; -begin - Result := RecordClass; -end; - -class procedure TdxCustomGridRecordHelper.Register; -begin - dxRecordHelpersFactory.Register(Self); -end; - -class procedure TdxCustomGridRecordHelper.Unregister; -begin - dxRecordHelpersFactory.Unregister(Self); -end; - -function TdxCustomGridRecordHelper.Adapter: TdxCustomGridTableViewAdapter; -begin - Result := FAdapter; -end; - -class function TdxCustomGridRecordHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewCustomDataRowProducer; -end; - -class function TdxCustomGridRecordHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxCustomGridRecord; -end; - -{$IFDEF DXVER500} - -function TdxCustomGridRecordHelper.GetCanCellMergingAsMaster: Boolean; -begin - Result := True; -end; - -function TdxCustomGridRecordHelper.GetCanCellMergingAsSlave: Boolean; -begin - Result := True; -end; - -{$ENDIF} - -function TdxCustomGridRecordHelper.GetHasDetails: Boolean; -begin - Result := False; -end; - -{$IFDEF DXVER500} - -function TdxCustomGridRecordHelper.GetHasExpandButton: Boolean; -begin - Result := False; -end; - -{$ENDIF} - -function TdxCustomGridRecordHelper.GetHasSelectedChildren: Boolean; -begin - Result := False; -end; - -{$IFDEF DXVER500} - -function TdxCustomGridRecordHelper.GetIsCellMergingSeparator: Boolean; -begin - Result := False; -end; - -{$ENDIF} - -function TdxCustomGridRecordHelper.GetParent: TcxCustomGridRecord; -var - I: Integer; -begin - for I := GridRecord.Index - 1 downto 0 do - begin - Result := Adapter.Records[I]; - if CustomGridRecord_GetIsParent(Result) and (Result.Level < GridRecord.Level) then - Exit; - end; - Result := nil; -end; - -{ TdxCustomGridRowHelper } - -function TdxCustomGridRowHelper.Adapter: TdxGridTableViewAdapter; -begin - Result := inherited Adapter as TdxGridTableViewAdapter; -end; - -class function TdxCustomGridRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxCustomGridRow; -end; - -{ TdxGridDataRowHelper } - -class function TdxGridDataRowHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewDataRowProducer; -end; - -class function TdxGridDataRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxGridDataRow; -end; - -function TdxGridDataRowHelper.GetRow: TcxGridDataRow; -begin - Result := inherited GridRecord as TcxGridDataRow; -end; - -{ TdxGridGroupRowHelper } - -class function TdxGridGroupRowHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewGroupRowProducer; -end; - -class function TdxGridGroupRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxGridGroupRow; -end; - -{$IFDEF DXVER500} - -function TdxGridGroupRowHelper.GetCanCellMergingAsMaster: Boolean; -begin - Result := False; -end; - -function TdxGridGroupRowHelper.GetCanCellMergingAsSlave: Boolean; -begin - Result := False; -end; - -function TdxGridGroupRowHelper.GetHasExpandButton: Boolean; -begin - Result := not (dcoGroupsAlwaysExpanded in Adapter.DataController.Options); -end; - -{$ENDIF} - -function TdxGridGroupRowHelper.GetHasSelectedChildren: Boolean; -var - GroupLevel, I: Integer; - Row: TcxCustomGridRow; -begin - GroupLevel := GroupRow.Level; - for I := GroupRow.Index + 1 to Adapter.RowCount - 1 do - begin - Row := Adapter.Rows[I]; - if Row.Level <= GroupLevel then Break; - Result := Row.Selected or Adapter.RecordHelpers[Row].HasSelectedChildren; //!!! - if Result then Exit; - end; - Result := False; -end; - -function TdxGridGroupRowHelper.GetGroupRow: TcxGridGroupRow; -begin - Result := inherited GridRecord as TcxGridGroupRow; -end; - -{ TdxGridMasterDataRowHelper } - -class function TdxGridMasterDataRowHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewMasterRowProducer; -end; - -class function TdxGridMasterDataRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxGridMasterDataRow; -end; - -{$IFDEF DXVER500} - -function TdxGridMasterDataRowHelper.GetCanCellMergingAsMaster: Boolean; -begin - Result := not MasterRow.Expanded; -end; - -{$ENDIF} - -function TdxGridMasterDataRowHelper.GetHasDetails: Boolean; -begin - Result := MasterRow.Expanded;// and MasterRow.ActiveDetailGridViewExists //!!! -end; - -{$IFDEF DXVER500} - -function TdxGridMasterDataRowHelper.GetHasExpandButton: Boolean; -begin - Result := True; -end; - -{$ENDIF} - -function TdxGridMasterDataRowHelper.GetHasSelectedChildren: Boolean; -begin - Result := MasterRow.Expanded; - if Result then - with dxGridViewBuildersFactory.CreateViewAdapter(Adapter, DetailView) do - try - Result := HasSelectedRecords; - finally - Free; - end; -end; - -{$IFDEF DXVER500} - -function TdxGridMasterDataRowHelper.GetIsCellMergingSeparator: Boolean; -begin - Result := MasterRow.Expanded; -end; - -{$ENDIF} - -function TdxGridMasterDataRowHelper.GetDetailView: TcxCustomGridView; -begin - if HasDetails then - Result := MasterRow.ActiveDetailGridView - else - Result := nil; -end; - -function TdxGridMasterDataRowHelper.GetMasterRow: TcxGridMasterDataRow; -begin - Result := inherited GridRecord as TcxGridMasterDataRow; -end; - -{ TdxRecordHelpersCache } - -constructor TdxRecordHelpersCache.Create(AAdapter: TdxCustomGridTableViewAdapter); -begin - inherited Create; - FAdapter := AAdapter; -end; - -function TdxRecordHelpersCache.IndexOf(ARecord: TcxCustomGridRecord): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].RecordClass = ARecord.ClassType then - Exit; - - Result := Add(dxRecordHelpersFactory.HelperClasses[ARecord].Create(Adapter)); -end; - -function TdxRecordHelpersCache.GetHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; -begin - Result := Items[IndexOf(ARecord)]; - Result.GridRecord := ARecord; -end; - -function TdxRecordHelpersCache.GetItem(Index: Integer): TdxCustomGridRecordHelper; -begin - Result := TdxCustomGridRecordHelper(inherited Items[Index]); -end; - -{ TdxProducerCache } - -constructor TdxProducerCache.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TdxProducerCache.IndexOf(AProducerClass: TdxGridViewRowProducerClass): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].ClassType = AProducerClass then Exit; - - Result := Add(AProducerClass.Create(Builder)); -end; - -function TdxProducerCache.GetProducer(ProducerClass: TdxGridViewRowProducerClass): TdxGridViewRowProducer; -begin - Result := Items[IndexOf(ProducerClass)]; -end; - -function TdxProducerCache.GetItem(Index: Integer): TdxGridViewRowProducer; -begin - Result := inherited Items[Index] as TdxGridViewRowProducer; -end; - -{ TdxCustomGridViewAdapter } - -constructor TdxCustomGridViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited Create; - FMasterAdapter := AMasterAdapter; - FGridView := AGridView; - FGridView.SizeChanged(True, True); //!? -end; - -function TdxCustomGridViewAdapter.GridView: TcxCustomGridView; -begin - Result := FGridView; -end; - -class function TdxCustomGridViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -function TdxCustomGridViewAdapter.Styles: TcxCustomGridStyles; -begin - Result := CustomGridView_GetStyles(GridView); -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; - ARecursive: Boolean); -begin - Grid.BeginUpdate; - try - ExpandAllRowsInLevel(GridLevel, AnOptionsExpanding.ExpandMasterRows, - AnOptionsExpanding.ExpandGroupRows, ARecursive); - finally - Grid.EndUpdate; - end; -end; - -procedure TdxCustomGridViewAdapter.AfterBuilding; -begin - //GridView.CancelUpdate; -end; - -procedure TdxCustomGridViewAdapter.BeforeBuilding; -begin - //GridView.BeginUpdate; -end; - -function TdxCustomGridViewAdapter.BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; -begin - Result := CustomGridView_GetBackgroundBitmaps(GridView); -end; - -function TdxCustomGridViewAdapter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - if IsBackgroundBitmapSupported(Index) then - Result := BackgroundBitmaps.GetBitmap(Index) - else - Result := nil -end; - -function TdxCustomGridViewAdapter.HasBackgroundBitmap(Index: Integer): Boolean; -var - Bitmap: TBitmap; -begin - Bitmap := BackgroundBitmaps.GetBitmap(Index); - Result := (Bitmap <> nil) and not Bitmap.Empty; -end; - -function TdxCustomGridViewAdapter.IsBackgroundBitmapSupported(Index: Integer): Boolean; -begin - Result := Index <> bbTabs; -end; - -function TdxCustomGridViewAdapter.Controller: TcxCustomGridController; -begin - Result := GridView.Controller; -end; - -function TdxCustomGridViewAdapter.DataController: TcxCustomDataController; -begin - Result := CustomGridView_GetDataController(GridView); -end; - -function TdxCustomGridViewAdapter.CreateCloneAdapter(AClone: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := dxGridViewBuildersFactory.CreateViewAdapter(MasterAdapter, AClone); -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInGridView(AGridView: TcxCustomGridView; - AMasterRows, AGroupRows: Boolean); -begin - if AGridView = nil then Exit; - with dxGridViewBuildersFactory.CreateViewAdapter(nil, AGridView) do - try - ExpandAllRowsInItself(AMasterRows, AGroupRows); - ExpandAllRowsInClones(AMasterRows, AGroupRows); - finally - Free; - end; -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInClones(AMasterRows, AGroupRows: Boolean); -var - I: Integer; - Clone: TcxCustomGridView; -begin - for I := 0 to GridView.CloneCount - 1 do - begin - Clone := GridView.Clones[I]; - with CreateCloneAdapter(Clone) do - try - ExpandAllRowsInGridView(Clone, AMasterRows, AGroupRows); - finally - Free; - end; - end; -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInLevel(ALevel: TcxGridLevel; - AMasterRows, AGroupRows: Boolean; ARecursive: Boolean); -var - I: Integer; -begin - ExpandAllRowsInGridView(ALevel.GridView, AMasterRows, AGroupRows); - if ARecursive then - for I := 0 to ALevel.VisibleCount - 1 do - ExpandAllRowsInLevel(ALevel.VisibleItems[I], AMasterRows, AGroupRows, ARecursive); -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); -begin -end; - -function TdxCustomGridViewAdapter.GetAreAllMasterRowsCollapsed: Boolean; -begin - Result := True; -end; - -function TdxCustomGridViewAdapter.GetAutoWidth: Boolean; -begin - Result := False; -end; - -function TdxCustomGridViewAdapter.GetCanUseOnEveryPageMode: Boolean; -begin - Result := False; -end; - -{$IFDEF DXVER500} -function TdxCustomGridViewAdapter.GetFilterPosition: TcxGridFilterPosition; -begin - Result := fpBottom; -end; -{$ENDIF} - -function TdxCustomGridViewAdapter.GetHasSelectedRecords: Boolean; -begin - Result := False; -end; - -function TdxCustomGridViewAdapter.GetIndentCount: Integer; -begin - Result := Ord(IsMaster); -end; - -function TdxCustomGridViewAdapter.GetIndentWidth: Integer; -begin - Result := DefaultIndentWidth; -end; - -function TdxCustomGridViewAdapter.GetIsOffice11StyleGrouping: Boolean; -begin - Result := False; -end; - -function TdxCustomGridViewAdapter.GetMasterGridRecord: TcxCustomGridRecord; -begin - Result := nil; -end; - -function TdxCustomGridViewAdapter.GetRecordCount: Integer; -begin - Result := 0; -end; - -function TdxCustomGridViewAdapter.GetViewWidthExtra: Integer; -begin - Result := Ord(IsMaster) * IndentWidth; -end; - -function TdxCustomGridViewAdapter.GetCaptionViewParams: TcxViewParams; -var - Level: TcxGridLevel; -begin - if MasterAdapter = nil then - if GridView.MasterGridView <> nil then - begin - Level := GridView.MasterGridView.Level as TcxGridLevel; - Level.Styles.GetTabParams({$IFDEF DXVER500} MasterGridRecord, {$ENDIF} GridLevel, Result); - end - else - Result := GetRootCaptionParams - else - MasterAdapter.GridLevel.Styles.GetTabParams({$IFDEF DXVER500} MasterGridRecord, {$ENDIF} GridLevel, Result); -end; - -function TdxCustomGridViewAdapter.GetFilterBarViewParams: TcxViewParams; -begin - Result.Color := clBtnShadow; - Result.Font := nil; - Result.TextColor := clWindow; -end; - -function TdxCustomGridViewAdapter.GetRootCaptionParams: TcxViewParams; -begin - Grid.RootLevelStyles.GetTabParams({$IFDEF DXVER500} nil, {$ENDIF} GridLevel, Result); -end; - -function TdxCustomGridViewAdapter.GetAbsoluteLevel: Integer; -begin - Result := GridLevel.Level; -end; - -function TdxCustomGridViewAdapter.GetCanUseLookAndFeelColors: Boolean; -begin - Result := Grid.LookAndFeel.NativeStyle and dxThemeManager.AreVisualStylesAvailable; -end; - -function TdxCustomGridViewAdapter.GetCaptionText: string; -begin - Result := GridLevel.DisplayCaption; -end; - -function TdxCustomGridViewAdapter.GetDetailsSeparatorColor: TColor; -begin - Result := MasterGridLevel.Options.DetailFrameColor; -end; - -function TdxCustomGridViewAdapter.GetDetailsSeparatorThickness: Integer; -begin - Result := MasterGridLevel.Options.DetailFrameWidth; -end; - -function TdxCustomGridViewAdapter.GetExpandButtonColor: TColor; -begin - Result := ExpandButtonInteriorColor; -end; - -function TdxCustomGridViewAdapter.GetExpandButtonSize: Integer; -begin - Result := GridView.ViewInfo.LookAndFeelPainter.ExpandButtonSize; -end; - -function TdxCustomGridViewAdapter.GetFilter: TcxDataFilterCriteria; -begin - Result := DataController.Filter; -end; - -function TdxCustomGridViewAdapter.GetFilterActive: Boolean; -begin - Result := Filter.Active; -end; - -function TdxCustomGridViewAdapter.GetFilterEmpty: Boolean; -begin - Result := Filter.FilterText = ''; -end; - -function TdxCustomGridViewAdapter.GetFilterText: string; -begin - Result := Filter.FilterCaption; - if Result = '' then - Result := cxGetResourceString(@scxGridFilterIsEmpty); -end; - -function TdxCustomGridViewAdapter.GetGrid: TcxCustomGrid; -begin - Result := GridView.Control as TcxCustomGrid; -end; - -function TdxCustomGridViewAdapter.GetGridLevel: TcxGridLevel; -begin - Result := GridView.Level as TcxGridLevel; -end; - -function TdxCustomGridViewAdapter.GetGridWidth: Integer; -begin - with Grid.ClientRect do - Result := Right - Left; -end; - -function TdxCustomGridViewAdapter.GetHasDetailsSeparator: Boolean; -begin - Result := DetailsSeparatorThickness <> 0; -end; - -function TdxCustomGridViewAdapter.GetLookAndFeelKind: TcxLookAndFeelKind; -begin - Result := Grid.LookAndFeel.Kind; -end; - -function TdxCustomGridViewAdapter.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := Grid.LookAndFeelPainter; -end; - -function TdxCustomGridViewAdapter.GetIsDetail: Boolean; -begin - Result := GridView.IsDetail; -end; - -function TdxCustomGridViewAdapter.GetIsMaster: Boolean; -begin - Result := GridView.IsMaster; -end; - -function TdxCustomGridViewAdapter.GetMasterGridLevel: TcxGridLevel; -begin - Result := GridLevel.Parent; -end; - -function TdxCustomGridViewAdapter.GetSummary: TcxDataSummary; -begin - Result := DataController.Summary; -end; - -function TdxCustomGridViewAdapter.GetThemedCaptionColor: TColor; -begin - Result := LookAndFeelPainter.DefaultTabColor; -end; - -function TdxCustomGridViewAdapter.GetThemedCaptionTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultTabTextColor; -end; - -function TdxCustomGridViewAdapter.GetThemedFilterBarColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFilterBoxColor; -end; - -function TdxCustomGridViewAdapter.GetThemedFilterBarTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFilterBoxTextColor; -end; - -function TdxCustomGridViewAdapter.GetViewWidth: Integer; -begin - Result := GridView.Control.Width; -end; - -{ TdxCustomGridViewFormatter } - -constructor TdxCustomGridViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; - - FLookAndFeelItems := TList.Create; - FExpandButtons := TList.Create; - FFont := TFont.Create; - - FTransparentColor := dxPSCore.dxDefaultContentColor; -end; - -destructor TdxCustomGridViewFormatter.Destroy; -begin - FreeAndNil(FFont); - FreeAndNil(FExpandButtons); - FreeAndNil(FLookAndFeelItems); - inherited; -end; - -function TdxCustomGridViewFormatter.Builder: TdxCustomGridViewBuilder; -begin - Result := FBuilder; -end; - -function TdxCustomGridViewFormatter.Adapter: TdxCustomGridViewAdapter; -begin - Result := Builder.Adapter; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeHost(AHost: TdxReportCell); -begin - AHost.CellSides := []; - AHost.Data := Integer(Adapter.GridView); - AHost.Transparent := True; -end; - -function TdxCustomGridViewFormatter.GetHostClass: TdxReportCellClass; -begin - Result := TdxReportCell; {Host} -end; - -function TdxCustomGridViewFormatter.GetRowHostClass: TdxReportCellClass; -begin - Result := TdxReportCell; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeCaption(ACaption: TdxReportCellText); -begin - SetViewParams(ACaption, GetCaptionViewParams); - if HasBackgroundBitmap(bbTabs) then - ACaption.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbTabs); - RegisterLookAndFeelItem(ACaption, cesRaised); - ACaption.Data := Integer(TdxGridLevelCaption); - ACaption.Text := Adapter.CaptionText; - ACaption.HidePrefix := True; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeCaptionRow(ARow: TdxReportCell); -begin -end; - -procedure TdxCustomGridViewFormatter.DoReportLinkInitializeCaption(ACaption: TdxReportCellText); -begin - ReportLink.DoInitializeLevelCaption(Adapter.GridView, TdxReportCellString(ACaption)); -end; - -function TdxCustomGridViewFormatter.GetCaptionClass: TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxCustomGridViewFormatter.GetCaptionViewParams: TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetCaptionParams(Adapter.GridLevel, Result.NativeParams) - else - Result.NativeParams := Adapter.GetCaptionViewParams; - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - begin - Result.NativeParams.Color := Adapter.ThemedCaptionColor; - Result.NativeParams.TextColor := Adapter.ThemedCaptionTextColor; - end; - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeFilterBar(AFilterBar: TdxReportCellText); -begin - SetViewParams(AFilterBar, GetFilterBarViewParams); - if HasBackgroundBitmap(bbFilterBox) then - AFilterBar.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbFilterBox); - - with AFilterBar do - begin - Data := Integer(TdxGridFilterBar); - EndEllipsis := True; - Text := Adapter.FilterText; - end; - - if not Adapter.FilterEmpty then - with TdxReportCellCheck(AFilterBar) do - begin - Checked := Adapter.FilterActive; - CheckPos := ccpLeft; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeFilterBarRow(ARow: TdxReportCell); -begin -end; - -procedure TdxCustomGridViewFormatter.DoReportLinkInitializeFilterBar(AFilterBar: TdxReportCellText); -begin - ReportLink.DoInitializeFilterBar(TcxCustomGridTableView(Adapter.GridView), TdxReportCellString(AFilterBar)); -end; - -function TdxCustomGridViewFormatter.GetFilterBarClass: TdxReportCellTextClass; -const - CheckClasses: array[Boolean] of TdxReportCellTextClass = (TdxReportCellCheck, TdxReportCellString); -begin - Result := CheckClasses[Adapter.FilterEmpty]; -end; - -function TdxCustomGridViewFormatter.GetFilterBarViewParams: TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetFilterBarParams(Result.NativeParams) - else - Result.NativeParams := Adapter.GetFilterBarViewParams; - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - begin - Result.NativeParams.Color := Adapter.ThemedCaptionColor; - Result.NativeParams.TextColor := Adapter.ThemedCaptionTextColor; - end; - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeDetailsSeparatorRow(ARow: TdxReportCell); -begin -end; - -procedure TdxCustomGridViewFormatter.DoInitializeHorzDetailsSeparator(ASeparator: TdxReportCellBox); -begin - with ASeparator do - begin - CellSides := csTopBottom; - Color := DetailsSeparatorColor; - Transparent := False; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeVertBottomDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - DoInitializeVertDetailsSeparator(ASeparator, ASeparatorKind); - case ASeparatorKind of - vdskLeading: - ASeparator.CellSides := [csLeft, csBottom]; - vdskTrailing: - ASeparator.CellSides := [csRight, csBottom]; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeVertDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - with ASeparator do - begin - CellSides := [csLeft, csRight]; - Color := DetailsSeparatorColor; - Transparent := False; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeVertTopDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - DoInitializeVertDetailsSeparator(ASeparator, ASeparatorKind); - case ASeparatorKind of - vdskLeading: - ASeparator.CellSides := [csLeft, csTop]; - vdskTrailing: - ASeparator.CellSides := [csRight, csTop]; - end; -end; - -function TdxCustomGridViewFormatter.GetDetailsSeparatorClass: TdxReportCellBoxClass; -begin - Result := TdxReportCellBox; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeExpandButton(AnExpandButton: TdxReportCellExpandButton; - ARecord: TcxCustomGridRecord; AnIsMasterIndent: Boolean); -begin - with AnExpandButton do - begin - {3.1 added} - ButtonAlignHorz := bahCenter; - if Adapter.IsOffice11StyleGrouping and not AnIsMasterIndent then {.2} - ButtonAlignVert := bavBottom - else - ButtonAlignVert := bavCenter; - - ButtonExpanded := ARecord.Expanded; - ButtonSize := Adapter.ExpandButtonSize; - if (ReportLink.OptionsFormatting.LookAndFeelKind <> lfStandard) and not Odd(ButtonSize) then - ButtonSize := ButtonSize - 1; - ButtonInteriorColor := Adapter.ExpandButtonColor; - ButtonTransparent := IsColorTransparent(ButtonInteriorColor); - end; - RegisterExpandButton(AnExpandButton); -end; - -procedure TdxCustomGridViewFormatter.DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer); -begin -end; - -function TdxCustomGridViewFormatter.GetMasterIndentClass: TdxReportCellExpandButtonClass; -begin - Result := TdxReportCellExpandButton; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeViewTerminator(ATerminator: TdxReportCellBox); -begin - ATerminator.CellSides := [csBottom]; - ATerminator.Transparent := True; -end; - -function TdxCustomGridViewFormatter.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TdxCustomGridViewFormatter._AddRef: Integer; -begin - Result := 1; -end; - -function TdxCustomGridViewFormatter._Release: Integer; -begin - Result := 1; -end; - -procedure TdxCustomGridViewFormatter.AddDelimiters; -begin - AddHorizontalDelimiters; - AddVerticalDelimiters; -end; - -procedure TdxCustomGridViewFormatter.AddHorizontalDelimiters; -begin -end; - -procedure TdxCustomGridViewFormatter.AddVerticalDelimiters; -var - I: Integer; -begin - if ReportLink.OptionsPagination.Row then - for I := 0 to Builder.ReportRowCount - 1 do - ReportLink.AddVerticalDelimiter(Builder.ReportRows[I]); -end; - -procedure TdxCustomGridViewFormatter.AfterBuilding; -begin - Adapter.AfterBuilding; - FormatLookAndFeelItems; - FormatExpandButtons; - AddDelimiters; -end; - -procedure TdxCustomGridViewFormatter.BeforeBuilding; -begin - Adapter.BeforeBuilding; - Calculate; -end; - -procedure TdxCustomGridViewFormatter.Calculate; -begin - CalculateLineHeights; -end; - -procedure TdxCustomGridViewFormatter.CalculateLineHeights; -begin - CaptionLineHeight := 2 * TabsAreaOffset + CalculateFontHeight(GetCaptionViewParams); - FilterBarLineHeight := 2 * FilterBarTextOffset + CalculateFontHeight(GetFilterBarViewParams); -end; - -function TdxCustomGridViewFormatter.GetDetailsSeparatorColor: TColor; -begin - Result := Adapter.DetailsSeparatorColor; - {with ReportLink.OptionsFormatting do - if UseNativeStyles then - begin - Result := FixedColor; - end;} -end; - -function TdxCustomGridViewFormatter.GetDetailsSeparatorThickness: Integer; -begin - Result := Adapter.DetailsSeparatorThickness; -end; - -function TdxCustomGridViewFormatter.GetHasDetailsSeparator: Boolean; -begin - Result := Adapter.HasDetailsSeparator; -end; - -function TdxCustomGridViewFormatter.GetSiteHeight: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if ReportLink.IsAggregated and - Supports(TObject(ReportLink.Controller), IdxReportLinkController, ControllerIntf) then - with ControllerIntf.GetControlSiteBounds(ReportLink.Grid) do - Result := Bottom - Top - 1 - else - with ReportLink.RealPrinterPage.PaintRectPixels do - Result := Bottom - Top - 1; -end; - -function TdxCustomGridViewFormatter.GetSiteWidth: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if ReportLink.IsAggregated and - Supports(TObject(ReportLink.Controller), IdxReportLinkController, ControllerIntf) then - with ControllerIntf.GetControlSiteBounds(ReportLink.Grid) do - Result := Right - Left - 1 - else - with ReportLink.RealPrinterPage.PaintRectPixels do - Result := Right - Left - 1; - Result := MulDiv(Result, 100, ReportLink.GetRealScaleFactor); -end; - -function TdxCustomGridViewFormatter.GetViewWidth: Integer; -begin - Result := 0; -end; - -function TdxCustomGridViewFormatter.GetViewWidthExtraAfter: Integer; -var - I: Integer; -begin - Result := 0; - - for I := 0 to AbsoluteLevel - 1 do - with Builder.AbsoluteBuilders[I].Adapter do - if HasDetailsSeparator then Inc(Result, DetailsSeparatorThickness); - - if Adapter.HasDetailsSeparator then - Inc(Result, Adapter.DetailsSeparatorThickness); -end; - -function TdxCustomGridViewFormatter.GetViewWidthExtraBefore: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AbsoluteLevel - 1 do - with Builder.AbsoluteBuilders[I].Adapter do - begin - Inc(Result, ViewWidthExtra); - if HasDetailsSeparator then Inc(Result, DetailsSeparatorThickness); - end; - - if Adapter.HasDetailsSeparator then - Inc(Result, Adapter.DetailsSeparatorThickness); -end; - -function TdxCustomGridViewFormatter.BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; -begin - Result := Adapter.BackgroundBitmaps; -end; - -function TdxCustomGridViewFormatter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - Result := ReportLink.Styles.GetBitmap(MapStyleBackgroundBitmapIndex(Index)) - else - Result := Adapter.GetBackgroundBitmap(Index); -end; - -function TdxCustomGridViewFormatter.GetBackgroundBitmapIndex(Index: Integer): Integer; -begin - Result := ReportLink.AddBackgroundBitmapToPool(GetBackgroundBitmap(Index)); -end; - -function TdxCustomGridViewFormatter.HasBackgroundBitmap(Index: Integer): Boolean; -var - Bitmap: TBitmap; -begin - if not ReportLink.OptionsFormatting.SuppressBackgroundBitmaps then - begin - Bitmap := GetBackgroundBitmap(Index); - Result := (Bitmap <> nil) and not Bitmap.Empty; - end - else - Result := False; -end; - -function TdxCustomGridViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbTabs: - Result := vspsGridCaption; - bbContent: - Result := vspsGridContent; - bbFilterBox: - Result := vspsGridFilterBar; - else - Result := 0; - end; -end; - -function TdxCustomGridViewFormatter.CalculateFontHeight(const AParams: TdxReportItemViewParams): Integer; -begin - Result := Renderer.CalcTextPatternHeight(DC, AParams.NativeParams.Font); -end; - -procedure TdxCustomGridViewFormatter.CalculateHeight(const AParams: TdxReportItemViewParams; - var AHeight: Integer); -var - Value: Integer; -begin - Value := CalculateFontHeight(AParams); - if Value > AHeight then AHeight := Value; -end; - -function TdxCustomGridViewFormatter.GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; -begin - if AParams.NativeParams.Font <> nil then - begin - FFont.Assign(AParams.NativeParams.Font); - if not dxPSUtl.dxIsTrueTypeFont(FFont) then - FFont.Name := ReportLink.Font.Name; - FFont.Color := ColorToRGB(AParams.NativeParams.TextColor); - FFont.Style := FFont.Style + AParams.FontStyle; - Result := ReportLink.AddFontToPool(FFont); - end - else - Result := 0; -end; - -function TdxCustomGridViewFormatter.IsColorTransparent(AColor: TColor): Boolean; -begin - Result := ColorToRGB(AColor) = ColorToRGB(TransparentColor); -end; - -procedure TdxCustomGridViewFormatter.RegisterExpandButton(AExpandButton: TdxReportCellExpandButton); -begin - FExpandButtons.Add(AExpandButton); -end; - -procedure TdxCustomGridViewFormatter.RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; - AEdgeStyle: TdxCellEdgeStyle); -begin - AnItem.EdgeMode := Self.EdgeMode; - AnItem.Edge3DStyle := AEdgeStyle; - FLookAndFeelItems.Add(AnItem); -end; - -procedure TdxCustomGridViewFormatter.SetViewParams(AnItem: TdxReportVisualItem; - AGridLines: TcxGridLines; const AParams: TcxViewParams); -var - AReportItemParams: TdxReportItemViewParams; -begin - AReportItemParams.NativeParams := AParams; - AReportItemParams.CellSides := CellSidesMap[AGridLines] - [csLeft] + [csRight]; - AReportItemParams.FontStyle := []; - AReportItemParams.Transparent := IsColorTransparent(AReportItemParams.NativeParams.Color); - - SetViewParams(AnItem, AReportItemParams); -end; - -procedure TdxCustomGridViewFormatter.SetViewParams(AnItem: TdxReportVisualItem; - const AParams: TdxReportItemViewParams); -begin - AnItem.CellSides := AParams.CellSides; - AnItem.Color := ColorToRGB(AParams.NativeParams.Color); - AnItem.FontIndex := GetStyleFontIndex(AParams); - AnItem.Transparent := AParams.Transparent; -end; - -function TdxCustomGridViewFormatter.GetAbsoluteLevel: Integer; -begin - Result := Adapter.AbsoluteLevel; - if ReportLink.OptionsDetails.StartFromFocusedView then - Dec(Result, (ReportLink.ActiveView.Level as TcxGridLevel).Level); -end; - -function TdxCustomGridViewFormatter.GetAutoWidth: Boolean; -begin - Result := ReportLink.OptionsSize.AutoWidth or Adapter.AutoWidth; -end; - -function TdxCustomGridViewFormatter.GetDC: HDC; -begin - Result := ReportLink.ScreenDC; -end; - -function TdxCustomGridViewFormatter.GetEdgeMode: TdxCellEdgeMode; -const - EdgeModeMap: array[Boolean] of TdxCellEdgeMode = (cemPattern, cem3DEffects); -begin - Result := EdgeModeMap[ReportLink.OptionsFormatting.LookAndFeelKind <> lfUltraFlat]; -end; - -{$IFDEF DXVER500} -function TdxCustomGridViewFormatter.GetFilterBarPosition: TcxGridFilterPosition; -begin - Result := Adapter.FilterPosition; -end; -{$ENDIF} - -function TdxCustomGridViewFormatter.GetGridWidth: Integer; -begin - Result := Adapter.GridWidth; -end; - -function TdxCustomGridViewFormatter.GetExpandButton(Index: Integer): TdxReportCellExpandButton; -begin - Result := TdxReportCellExpandButton(FExpandButtons[Index]); -end; - -function TdxCustomGridViewFormatter.GetExpandButtonCount: Integer; -begin - Result := FExpandButtons.Count; -end; - -function TdxCustomGridViewFormatter.GetIndentWidth: Integer; -begin - Result := Adapter.IndentWidth; -end; - -function TdxCustomGridViewFormatter.GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; -begin - Result := TdxReportVisualItem(FLookAndFeelItems[Index]); -end; - -function TdxCustomGridViewFormatter.GetLookAndFeelItemCount: Integer; -begin - Result := FLookAndFeelItems.Count; -end; - -function TdxCustomGridViewFormatter.GetPaginateByTopLevelGroups: Boolean; -begin - Result := ReportLink.OptionsPagination.TopLevelGroup; -end; - -function TdxCustomGridViewFormatter.GetRenderer: TdxPSReportRenderer; -begin - Result := ReportLink.Renderer; -end; - -function TdxCustomGridViewFormatter.GetReportLink: TdxGridReportLink; -begin - Result := Builder.ReportLink; -end; - -function TdxCustomGridViewFormatter.GetShowCaption: Boolean; -begin - Result := ReportLink.OptionsView.Caption; -end; - -function TdxCustomGridViewFormatter.GetShowFilterBar: Boolean; -begin - Result := ReportLink.OptionsView.FilterBar; -end; - -function TdxCustomGridViewFormatter.GetUseLookAndFeelColors: Boolean; -begin - Result := ReportLink.OptionsFormatting.UseLookAndFeelColors; -end; - -function TdxCustomGridViewFormatter.GetViewAvailableWidth: Integer; -begin - if ReportLink.OptionsSize.AutoWidth then - Result := SiteWidth - else - Result := Adapter.ViewWidth; - Dec(Result, ViewWidthExtraBefore + ViewWidthExtraAfter); -end; - -function TdxCustomGridViewFormatter.GetViewWidthExtra: Integer; -begin - Result := Adapter.ViewWidthExtra; -end; - -procedure TdxCustomGridViewFormatter.FormatLookAndFeelItems; -const - Borders3D: array[TdxCellEdgeStyle, Boolean] of TdxPSCellBorderClass = - ((TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder), - (TdxPSCellSunkenBorder, TdxPSCellSunkenSoftBorder)); -var - I: Integer; -begin - for I := 0 to LookAndFeelItemCount - 1 do - with LookAndFeelItems[I] do - if ReportLink.Effects3D then - BorderClass := Borders3D[Edge3DStyle, ReportLink.Soft3D] - else - BorderClass := TdxPSCellUltraFlatBorder; -end; - -procedure TdxCustomGridViewFormatter.FormatExpandButtons; -var - I: Integer; -begin - for I := 0 to ExpandButtonCount - 1 do - with ExpandButtons[I] do - begin - ButtonBorder3D := ReportLink.Effects3D; - ButtonBorder3DSoft := ReportLink.Soft3D; - end; -end; - -{ TdxCustomGridViewBuilder } - -constructor TdxCustomGridViewBuilder.Create(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); - - function GetMasterAdapter: TdxCustomGridViewAdapter; - begin - if AMasterBuilder = nil then - Result := nil - else - Result := AMasterBuilder.Adapter; - end; - -begin - inherited Create; - FReportLink := AReportLink; - FMasterBuilder := AMasterBuilder; - FGridView := AGridView; - - FAdapter := CreateAdapter(GetMasterAdapter, GridView); - FFormatter := FormatterClass.Create(Self); - FProducerCache := TdxProducerCache.Create(Self); - FReportRows := TList.Create; - - if MasterBuilder <> nil then - MasterBuilder.FDetailsBuilder := Self; -end; - -destructor TdxCustomGridViewBuilder.Destroy; -begin - if MasterBuilder <> nil then - MasterBuilder.FDetailsBuilder := nil; - FreeAndNil(FReportRows); - FreeAndNil(FProducerCache); - FreeAndNil(FFormatter); - FreeAndNil(FAdapter); - inherited; -end; - -function TdxCustomGridViewBuilder.Adapter: TdxCustomGridViewAdapter; -begin - Result := FAdapter; -end; - -class function TdxCustomGridViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxCustomGridViewAdapter; -end; - -class function TdxCustomGridViewBuilder.CreateAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := AdapterClass.Create(AMasterAdapter, AGridView); -end; - -function TdxCustomGridViewBuilder.Formatter: TdxCustomGridViewFormatter; -begin - Result := FFormatter; -end; - -class function TdxCustomGridViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxCustomGridViewFormatter; -end; - -procedure TdxCustomGridViewBuilder.Build; -begin - BeforeBuilding; - try - DoBuild; - finally - AfterBuilding; - end; -end; - -function TdxCustomGridViewBuilder.IsAborted: Boolean; -begin - Result := ReportLink.AbortBuilding; -end; - -procedure TdxCustomGridViewBuilder.Progress(const APercentDone: Double); -begin - ReportLink.DoProgress(APercentDone); -end; - -class function TdxCustomGridViewBuilder.PairClass: TClass; -begin - Result := GridViewClass; -end; - -class procedure TdxCustomGridViewBuilder.Register; -begin - dxGridViewBuildersFactory.Register(Self); -end; - -class procedure TdxCustomGridViewBuilder.Unregister; -begin - dxGridViewBuildersFactory.Unregister(Self); -end; - -procedure TdxCustomGridViewBuilder.AddReportRow(ARow: TdxReportCell); -begin - if ARow.Parent = ReportLink.ReportCells.Cells then - FReportRows.Add(ARow); -end; - -procedure TdxCustomGridViewBuilder.AfterBuilding; -begin - if not IsAborted then Formatter.AfterBuilding; -end; - -procedure TdxCustomGridViewBuilder.BeforeBuilding; -begin - Formatter.BeforeBuilding; -end; - -procedure TdxCustomGridViewBuilder.DoBuild; -begin - DoBuildViewHeader; - DoBuildViewBody; - if not IsAborted then DoBuildViewFooter; -end; - -procedure TdxCustomGridViewBuilder.DoBuildViewBody; -begin -end; - -procedure TdxCustomGridViewBuilder.DoBuildViewFooter; -begin -end; - -procedure TdxCustomGridViewBuilder.DoBuildViewHeader; -begin -end; - -function TdxCustomGridViewBuilder.GetViewAvailableWidth: Integer; -begin - Result := Formatter.ViewAvailableWidth; -end; - -procedure TdxCustomGridViewBuilder.CreateCaption; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetCaptionProducer.Produce(HostInfoServices.CaptionHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetCaptionProducer: TdxGridViewCaptionProducer; -begin - Result := ProducerCache[GetCaptionProducerClass] as TdxGridViewCaptionProducer; -end; - -function TdxCustomGridViewBuilder.GetCaptionProducerClass: TdxGridViewCaptionProducerClass; -begin - Result := TdxGridViewCaptionProducer; -end; - -procedure TdxCustomGridViewBuilder.CreateBottomDetailsSeparator; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetDetailsBottomSeparatorProducer.Produce(HostInfoServices.LevelSeparatorBottomHostInfo); - AddReportRow(ReportRow); -end; - -procedure TdxCustomGridViewBuilder.CreateTopDetailsSeparator; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetDetailsTopSeparatorProducer.Produce(HostInfoServices.LevelSeparatorTopHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetDetailsBottomSeparatorProducer: TdxGridViewDetailsSeparatorProducer; -begin - Result := ProducerCache[GetDetailsBottomSeparatorProducerClass] as TdxGridViewDetailsSeparatorProducer; -end; - -function TdxCustomGridViewBuilder.GetDetailsBottomSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; -begin - Result := TdxGridViewDetailsBottomSeparatorProducer; -end; - -function TdxCustomGridViewBuilder.GetDetailsTopSeparatorProducer: TdxGridViewDetailsSeparatorProducer; -begin - Result := ProducerCache[GetDetailsTopSeparatorProducerClass] as TdxGridViewDetailsSeparatorProducer; -end; - -function TdxCustomGridViewBuilder.GetDetailsTopSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; -begin - Result := TdxGridViewDetailsTopSeparatorProducer; -end; - -procedure TdxCustomGridViewBuilder.CreateFilterBar; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetFilterBarProducer.Produce(HostInfoServices.FilterBarHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetFilterBarProducer: TdxGridViewFilterBarProducer; -begin - Result := ProducerCache[GetFilterBarProducerClass] as TdxGridViewFilterBarProducer; -end; - -function TdxCustomGridViewBuilder.GetFilterBarProducerClass: TdxGridViewFilterBarProducerClass; -begin - Result := TdxGridViewFilterBarProducer; -end; - -procedure TdxCustomGridViewBuilder.CreateViewTerminator; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetViewTerminatorProducer.Produce(HostInfoServices.PageDetailsHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetViewTerminatorProducer: TdxGridViewTerminatorProducer; -begin - Result := ProducerCache[GetViewTerminatorProducerClass] as TdxGridViewTerminatorProducer; -end; - -function TdxCustomGridViewBuilder.GetViewTerminatorProducerClass: TdxGridViewTerminatorProducerClass; -begin - Result := TdxGridViewTerminatorProducer; -end; - -function TdxCustomGridViewBuilder.GridView: TcxCustomGridView; -begin - Result := FGridView; -end; - -class function TdxCustomGridViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -function TdxCustomGridViewBuilder.GetAbsoluteBuilder(AIndex: Integer): TdxCustomGridViewBuilder; -begin - Result := RootBuilder; - while AIndex > 0 do - begin - Result := Result.DetailsBuilder; - Dec(AIndex); - end; -end; - -function TdxCustomGridViewBuilder.GetAutoWidth: Boolean; -begin - Result := Formatter.AutoWidth; -end; - -function TdxCustomGridViewBuilder.GetGridLevel: TcxGridLevel; -begin - Result := GridView.Level as TcxGridLevel; -end; - -function TdxCustomGridViewBuilder.GetGrid: TcxCustomGrid; -begin - Result := ReportLink.Grid; -end; - -function TdxCustomGridViewBuilder.GetHost: TdxReportCell; -begin - Result := ReportLink.ReportCells.Cells; -end; - -function TdxCustomGridViewBuilder.GetHostInfoServices: TdxGridAttributeHostInfoServices; -begin - Result := ReportLink.HostInfoServices; -end; - -function TdxCustomGridViewBuilder.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := TdxReportCell(FReportRows[Index]); -end; - -function TdxCustomGridViewBuilder.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TdxCustomGridViewBuilder.GetRootBuilder: TdxCustomGridViewBuilder; -begin - Result := Self; - while Result.MasterBuilder <> nil do - Result := Result.MasterBuilder; -end; - -{ TdxCustomGridTableViewAdapter } - -constructor TdxCustomGridTableViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited; - FRecordHelpersCache := TdxRecordHelpersCache.Create(Self); - FDetailsLineCount := -1; -end; - -destructor TdxCustomGridTableViewAdapter.Destroy; -begin - FreeAndNil(FRecordHelpersCache); - inherited; -end; - -function TdxCustomGridTableViewAdapter.ForEachRecord(AProc: TdxGridTableAdapterForEachRecordProc; - AData: Integer; AProcessSelection: Boolean): Boolean; -var - I: Integer; - Continue: Boolean; - Record_: TcxCustomGridRecord; -begin - Result := True; - if @AProc = nil then Exit; - - Continue := True; - for I := 0 to RecordCount - 1 do - begin - Record_ := Records[I]; - if not AProcessSelection or Record_.Selected then - AProc(Record_, AData, Continue); - if not Continue then - begin - Result := False; - Break; - end; - end; -end; - -function TdxCustomGridTableViewAdapter.GridView: TcxCustomGridTableView; -begin - Result := inherited GridView as TcxCustomGridTableView; -end; - -class function TdxCustomGridTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridTableView; -end; - -function TdxCustomGridTableViewAdapter.Styles: TcxCustomGridTableViewStyles; -begin - Result := inherited Styles as TcxCustomGridTableViewStyles; -end; - -function TdxCustomGridTableViewAdapter.CalculateDetailsLineCount: Integer; -begin - Result := 1; -end; - -function TdxCustomGridTableViewAdapter.GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; AIsDataCell: Boolean = False): TcxViewParams; -begin - if (ATableItem <> nil) and (ATableItem.Styles <> nil) then - ATableItem.Styles.GetContentParams(ARecord, Result) - else - Styles.GetContentParams(ARecord, ATableItem, Result); - if Result.Color = clWindow then // 3.2 - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TdxCustomGridTableViewAdapter.GetPreviewViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; -begin - Result := GetContentViewParams(ARecord, ATableItem); -end; - -function TdxCustomGridTableViewAdapter.GetSelectionViewParams: TcxViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - with Styles.Selection do - begin - Result.Bitmap := Bitmap; - Result.Color := Color; - Result.Font := Font; - Result.TextColor := TextColor; - end; -end; - -function TdxCustomGridTableViewAdapter.HasSelectionStyle: Boolean; -begin - Result := Styles.Selection <> nil; -end; - -function TdxCustomGridTableViewAdapter.Controller: TcxCustomGridTableController; -begin - Result := inherited Controller as TcxCustomGridTableController; -end; - -procedure TdxCustomGridTableViewAdapter.DoExpandMasterRow(ARecord: TcxCustomGridRecord; - AData: Integer; var AContinue: Boolean); -begin - if (ARecord is TcxGridMasterDataRow) and ARecord.Expandable then - GridMasterDataRow_DoExpand(TcxGridMasterDataRow(ARecord), True); - {begin - ARecord.Expanded := True; - with TcxGridMasterDataRow(ARecord) do - if ActiveDetailGridViewExists then - ExpandAllRowsInGridView(ActiveDetailGridView, True, Boolean(AData)); - end;} -end; - -procedure TdxCustomGridTableViewAdapter.ExpandAllGroupRows; -begin - DataController.Groups.FullExpand; -end; - -procedure TdxCustomGridTableViewAdapter.ExpandAllMasterRows(AnExpandGroups: Boolean); -begin - ForEachRecord(DoExpandMasterRow, Integer(AnExpandGroups), False); -end; - -procedure TdxCustomGridTableViewAdapter.ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); -begin - if AGroupRows then ExpandAllGroupRows; - if AMasterRows then ExpandAllMasterRows(AGroupRows); -end; - -function TdxCustomGridTableViewAdapter.GetAreAllMasterRowsCollapsed: Boolean; -begin - Result := ForEachRecord(IsMasterRowCollapsed, 0, False); -end; - -function TdxCustomGridTableViewAdapter.GetCanUseOnEveryPageMode: Boolean; -begin - Result := RecordCount <> 0; -end; - -function TdxCustomGridTableViewAdapter.GetHasSelectedRecords: Boolean; -var - I: Integer; -begin - Result := SelectedRecordCount <> 0; - if not Result then - for I := 0 to RecordCount - 1 do - begin - Result := RecordHelpers[Records[I]].HasSelectedChildren; - if Result then Break; - end; -end; - -function TdxCustomGridTableViewAdapter.GetMasterGridRecord: TcxCustomGridRecord; -begin - Result := GridView.MasterGridRecord; -end; - -function TdxCustomGridTableViewAdapter.GetRecordCount: Integer; -begin - Result := GridView.ViewData.RecordCount; -end; - -class function TdxCustomGridTableViewAdapter.GetProperties(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; -begin - Result := AnItem.GetProperties(ARecord); - if Result = nil then - Result := GetRepositoryItem(AnItem, ARecord).Properties; -end; - -class function TdxCustomGridTableViewAdapter.GetPropertiesClass(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditPropertiesClass; -begin - Result := TcxCustomEditPropertiesClass(GetProperties(AnItem, ARecord).ClassType); -end; - -class function TdxCustomGridTableViewAdapter.GetRepositoryItem(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxEditRepositoryItem; -begin - Result := AnItem.GetRepositoryItem; -end; - -procedure TdxCustomGridTableViewAdapter.IsMasterRowCollapsed(ARecord: TcxCustomGridRecord; - AData: Integer; var AContinue: Boolean); -begin - if ARecord is TcxGridMasterDataRow then - AContinue := not ARecord.Expanded; -end; - -function TdxCustomGridTableViewAdapter.GetCellAutoHeight: Boolean; -begin - Result := CustomGridTableOptionsView_GetCellAutoHeight(GridView.OptionsView); -end; - -function TdxCustomGridTableViewAdapter.GetCellMultiline: Boolean; -begin - Result := CustomGridTableOptionsView_GetCellAutoHeight(GridView.OptionsView); -end; - -{$IFDEF DXVER500} -function TdxCustomGridTableViewAdapter.GetFilterPosition: TcxGridFilterPosition; -begin - Result := CustomGridTableFiltering_GetPosition(Filtering); -end; -{$ENDIF} - -function TdxCustomGridTableViewAdapter.GetGridLineColor: TColor; -begin - Result := GridView.LookAndFeelPainter.DefaultGridLineColor; -end; - -function TdxCustomGridTableViewAdapter.GetCellEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.CellEndEllipsis; -end; -function TdxCustomGridTableViewAdapter.GetDetailsLineCount: Integer; -begin - if FDetailsLineCount = -1 then - FDetailsLineCount := CalculateDetailsLineCount; - Result := FDetailsLineCount; -end; - -function TdxCustomGridTableViewAdapter.GetFiltering: TcxCustomGridTableFiltering; -begin - Result := GridView.Filtering; -end; - -function TdxCustomGridTableViewAdapter.GetIsGridMode: Boolean; -begin - Result := DataController.IsGridMode; -end; - -function TdxCustomGridTableViewAdapter.GetRecord(Index: Integer): TcxCustomGridRecord; -begin - Result := GridView.ViewData.Records[Index]; -end; - -function TdxCustomGridTableViewAdapter.GetRecordHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; -begin - Result := RecordHelpersCache.Helpers[ARecord]; -end; - -function TdxCustomGridTableViewAdapter.GetSelectedRecord(Index: Integer): TcxCustomGridRecord; -begin - Result := Controller.SelectedRecords[Index] -end; - -function TdxCustomGridTableViewAdapter.GetSelectedRecordCount: Integer; -begin - if CustomGridTableController_GetMultiSelect(Controller) then - Result := Controller.SelectedRecordCount - else - Result := 0; -end; - -{ TdxCustomGridTableViewFormatter } - -constructor TdxCustomGridTableViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FRecordIndexes := TList.Create; - FSelectedRecordList := TList.Create; - //if ReportLink.OptionsSelection.ProcessSelection then BuildSelectedRecordList; {moved to BeforeBuilding in 3.03} -end; - -destructor TdxCustomGridTableViewFormatter.Destroy; -begin - FreeAndNil(FRecordIndexes); - FreeAndNil(FSelectedRecordList); - inherited; -end; - -function TdxCustomGridTableViewFormatter.Adapter: TdxCustomGridTableViewAdapter; -begin - Result := inherited Adapter as TdxCustomGridTableViewAdapter; -end; - -function TdxCustomGridTableViewFormatter.Builder: TdxCustomGridTableViewBuilder; -begin - Result := inherited Builder as TdxCustomGridTableViewBuilder; -end; - -function TdxCustomGridTableViewFormatter.IndexOfRecord(ARecord: TcxCustomGridRecord): Integer; -begin - for Result := 0 to RecordCount - 1 do - if Records[Result] = ARecord then Exit; - Result := -1; -end; - -procedure TdxCustomGridTableViewFormatter.CheckDisplayValuePost( - AProperties: TcxCustomEditProperties; ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnItem: TAbstractdxReportCellData); -var - S: string; -begin - if (ATableItem <> nil) and (ARecord <> nil) and (AnItem is TdxReportCellText) and - (AProperties.GetEditValueSource(False) = evsValue) then - begin - S := TdxReportCellText(AnItem).Text; - TcxCustomGridTableItemAccess(ATableItem).DoGetDisplayText(ARecord, S); - TdxReportCellText(AnItem).Text := S; - end; -end; - -procedure TdxCustomGridTableViewFormatter.DoInitializeItem(AnItem: TAbstractdxReportCellData; - ATableItem: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False); - - function GetContentBackgroundBitmapStyleIndex: Integer; - begin - if AnIsPreview then - Result := bbPreview - else - Result := Self.GetContentBackgroundBitmapStyleIndex(ATableItem); - end; - -var - Properties: TcxCustomEditProperties; - ViewParams: TdxReportItemViewParams; - CellValue: TcxEditValue; - ContentBackgroundBitmapStyleIndex: Integer; -begin - Properties := GetItemProperties(ATableItem, ARecord); - ViewParams := GetItemViewParams(ATableItem, ARecord, AnIsPreview, True); - CellValue := GetItemValue(Properties, ATableItem, ARecord); - - dxPScxCommon.dxPSDataMaps.InitializeItem(AnItem, Properties, CellValue, Self, - ViewParams, AnIsPreview, ARecord.RecordIndex, ATableItem); - CheckDisplayValuePost(Properties, ATableItem, ARecord, AnItem); - dxPScxCommon.dxPSDataMaps.GetImageLists(Properties, ReportLink.AppendImageList); - SetViewParams(AnItem, ViewParams); - - ContentBackgroundBitmapStyleIndex := GetContentBackgroundBitmapStyleIndex; - if HasBackgroundBitmap(ContentBackgroundBitmapStyleIndex) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(ContentBackgroundBitmapStyleIndex); - - AnItem.Data := Integer(ATableItem); -end; - -function TdxCustomGridTableViewFormatter.GetItemClass(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := dxPSDataMaps.ItemClass(GetItemProperties(ATableItem, ARecord), AnIsPreview); -end; - -function TdxCustomGridTableViewFormatter.GetItemProperties(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; -begin - Result := Adapter.GetProperties(ATableItem, ARecord); -end; - -function TdxCustomGridTableViewFormatter.GetItemValue(AProperties: TcxCustomEditProperties; - ATableItem: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord): TcxEditValue; -var - S: string; -begin - if AProperties.GetEditValueSource(False) = evsValue then - Result := ARecord.Values[ATableItem.Index] - else - begin - S := ARecord.DisplayTexts[ATableItem.Index]; - TcxCustomGridTableItemAccess(ATableItem).DoGetDisplayText(ARecord, S); - Result := S; - end; -end; - -function TdxCustomGridTableViewFormatter.GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False; AIsDataCell: Boolean = False): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - if AnIsPreview then - ReportLink.Styles.GetPreviewParams(ARecord, ATableItem, Result.NativeParams) - else - ReportLink.Styles.GetContentParams(ARecord, ATableItem, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - if AnIsPreview then - Result.NativeParams := Adapter.GetPreviewViewParams(ARecord, ATableItem) - else - Result.NativeParams := Adapter.GetContentViewParams(ARecord, ATableItem, AIsDataCell); -end; - -{ IdxPSCellParams } - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetAutoHeight: Boolean; -begin - Result := Adapter.CellAutoHeight; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetDC: HDC; -begin - Result := Self.DC; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; -begin - Result := ReportLink.OptionsRefinements.DisplayGraphicsAsText; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetEndEllipsis: Boolean; -begin - Result := Adapter.CellEndEllipsis; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetFlatCheckMarks: Boolean; -begin - Result := ReportLink.OptionsRefinements.FlatCheckMarks; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetGraphicsText: string; -begin - Result := ReportLink.OptionsRefinements.GraphicsText; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetMultiline: Boolean; -begin - Result := Adapter.CellMultiline; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetTransparentGraphics: Boolean; -begin - Result := ReportLink.OptionsRefinements.TransparentGraphics; -end; - -{ IdxPSCellParams2 } -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := dxTextSpace; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := dxTextSpace; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - Result := -1; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := -1; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; -const - GraphicClasses: array[Boolean] of TGraphicClass = (TMetafile, TBitmap); -begin - Result := GraphicClasses[IdxPSCellParams2_GetRichEditTransparent]; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetRichEditTransparent: Boolean; -begin - {$IFDEF DXVER500} - Result := ReportLink.OptionsRefinements.TransparentRichEdits; - {$ELSE} - Result := False; - {$ENDIF} -end; - -procedure TdxCustomGridTableViewFormatter.AfterBuilding; -begin - inherited; - ReportLink.ReportCells.BorderColor := GridLineColor; -end; - -procedure TdxCustomGridTableViewFormatter.BeforeBuilding; -begin - inherited; - if ReportLink.OptionsSelection.ProcessSelection then BuildSelectedRecordList; -end; - -procedure TdxCustomGridTableViewFormatter.BuildSelectedRecordList; -var - I: Integer; - ARecord: TcxCustomGridRecord; - IsRecordIncluded: Boolean; - Helper: TdxCustomGridRecordHelper; -begin - SelectedRecordList.Clear; - - for I := 0 to Adapter.RecordCount - 1 do - begin - ARecord := Adapter.Records[I]; - IsRecordIncluded := ARecord.Selected; - if not IsRecordIncluded then - begin - Helper := Adapter.RecordHelpers[ARecord]; - IsRecordIncluded := Helper.HasSelectedChildren or - (not ReportLink.OptionsSelection.ProcessExactSelection and (SelectedRecordList.IndexOf(Helper.Parent) <> -1)); - end; - - if IsRecordIncluded then - SelectedRecordList.Add(ARecord); - end; -end; - -function TdxCustomGridTableViewFormatter.CanProcessSelectionStyle(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := (ARecord <> nil) and ReportLink.OptionsFormatting.ConsumeSelectionStyle and IsSelectedRecord(ARecord); - if Result and not ReportLink.OptionsFormatting.UseNativeStyles then - Result := Adapter.HasSelectionStyle; -end; - -function TdxCustomGridTableViewFormatter.IsSelectedRecord(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := (SelectedRecordCount <> 0) or ARecord.Selected; -end; - -function TdxCustomGridTableViewFormatter.GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; -begin - Result := bbContent; -end; - -function TdxCustomGridTableViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbContent: - Result := vspsGridContent; - else - Result := 0; - end; - - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -function TdxCustomGridTableViewFormatter.GetGridLineColor: TColor; -begin - Result := ReportLink.OptionsFormatting.GridLineColor; - if Result = clDefault then - Result := Adapter.GridLineColor; -end; - -function TdxCustomGridTableViewFormatter.GetRecord(Index: Integer): TcxCustomGridRecord; -begin - if SelectedRecordCount <> 0 then - Result := SelectedRecords[Index] - else - Result := Adapter.Records[Index]; -end; - -function TdxCustomGridTableViewFormatter.GetRecordCount: Integer; -begin - Result := SelectedRecordCount; - if Result = 0 then - Result := Adapter.RecordCount; -end; - -function TdxCustomGridTableViewFormatter.GetRecordIndex(ARecord: TcxCustomGridRecord): Integer; -var - RecordIndex, IndexCount, I: Integer; -begin - RecordIndex := ARecord.Index; - IndexCount := FRecordIndexes.Count; - if RecordIndex > IndexCount - 1 then - begin - FRecordIndexes.Count := RecordIndex + 1; - for I := IndexCount to FRecordIndexes.Count - 1 do - FRecordIndexes[I] := TObject(-1); - end; - Result := Integer(FRecordIndexes[RecordIndex]); - if Result = -1 then - begin - FRecordIndexes[RecordIndex] := TObject(IndexOfRecord(ARecord)); - Result := Integer(FRecordIndexes[RecordIndex]); - end; -end; - -function TdxCustomGridTableViewFormatter.GetSelectedRecord(Index: Integer): TcxCustomGridRecord; -begin - Result := TcxCustomGridRecord(FSelectedRecordList[Index]); -end; - -function TdxCustomGridTableViewFormatter.GetSelectedRecordCount: Integer; -begin - Result := FSelectedRecordList.Count; -end; - -{ TdxCustomGridTableViewBuilder } - -function TdxCustomGridTableViewBuilder.Adapter: TdxCustomGridTableViewAdapter; -begin - Result := inherited Adapter as TdxCustomGridTableViewAdapter; -end; - -class function TdxCustomGridTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxCustomGridTableViewAdapter; -end; - -function TdxCustomGridTableViewBuilder.Formatter: TdxCustomGridTableViewFormatter; -begin - Result := inherited Formatter as TdxCustomGridTableViewFormatter; -end; - -class function TdxCustomGridTableViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxCustomGridTableViewFormatter; -end; - -procedure TdxCustomGridTableViewBuilder.DoBuildViewFooter; -begin - if Formatter.ShowFilterBar {$IFDEF DXVER500} and (Formatter.FilterBarPosition = fpBottom) {$ENDIF} then - CreateFilterBar; - if Formatter.HasDetailsSeparator then - CreateBottomDetailsSeparator; - inherited; -end; - -procedure TdxCustomGridTableViewBuilder.DoBuildViewHeader; -begin - inherited; - if Formatter.HasDetailsSeparator then - CreateTopDetailsSeparator; - if Formatter.ShowCaption then - CreateCaption; - {$IFDEF DXVER500} - if Formatter.ShowFilterBar and (Formatter.FilterBarPosition = fpTop) then - CreateFilterBar; - {$ENDIF} -end; - -procedure TdxCustomGridTableViewBuilder.DoGetCellHeight(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; var AHeight: Integer); -begin - ReportLink.DoGetCellHeight(GridView, ARecord, ATableItem, AHeight); -end; - -function TdxCustomGridTableViewBuilder.GridView: TcxCustomGridTableView; -begin - Result := inherited GridView as TcxCustomGridTableView; -end; - -class function TdxCustomGridTableViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridTableView; -end; - -{ TdxGridTableViewAdapter } - -constructor TdxGridTableViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited; - GridTableViewInfo_CalculateExpandButtonParams(GridView.ViewInfo); // because LevelIndent -end; - -function TdxGridTableViewAdapter.GridView: TcxGridTableView; -begin - Result := inherited GridView as TcxGridTableView; -end; - -class function TdxGridTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -function TdxGridTableViewAdapter.Styles: TcxGridTableViewStyles; -begin - Result := inherited Styles as TcxGridTableViewStyles; -end; - -function TdxGridTableViewAdapter.HasDetails(AGridRow: TcxCustomGridRow): Boolean; -begin - Result := RecordHelpers[AGridRow].HasDetails; -end; - -function TdxGridTableViewAdapter.IsSummaryHasSameLink( - AItem1, AItem2: TcxDataSummaryItem): Boolean; -begin - Result := (AItem1.ItemLink = AItem2.ItemLink) and - (AItem1.Position = spFooter) and (AItem2.Position = spFooter); -end; - -function TdxGridTableViewAdapter.GetFooterItemCount( - AItems: TcxDataSummaryItems; ACanMultiLine: Boolean; AIsGroup: Boolean): Integer; -var - I, J, ACount: Integer; -const - APos: array[Boolean] of TcxSummaryPosition = (spFooter, spGroup); -begin - Result := 0; - if AItems = nil then Exit; - for I := 0 to ColumnCount - 1 do - begin - ACount := 0; - for J := 0 to AItems.Count - 1 do - if (AItems[J].Position = APos[AIsGroup]) and (AItems[J].ItemLink = Columns[I]) then - begin - Inc(ACount); - if not ACanMultiline then Break; - end; - Inc(Result, ACount); - if (Result = AItems.Count) then Break; - end; -end; - -function TdxGridTableViewAdapter.CheckSummaryItemIndex( - AItems: TcxDataSummaryItems; AIndex: Integer; AIsGroup: Boolean): Integer; -var - I: Integer; - AColumn: TcxGridColumn; -const - APos: array[Boolean] of TcxSummaryPosition = (spFooter, spGroup); -begin - Result := AIndex; - I := 0; - while I <= Result do - begin - AColumn := AItems[I].ItemLink as TcxGridColumn; - if (AColumn = nil) or (AColumn.VisibleIndex < 0) or (AItems[I].Position <> APos[AIsGroup]) then - Inc(Result); - Inc(I); - end; -end; - -function TdxGridTableViewAdapter.GetFooterItemInfo( - AItems: TcxDataSummaryItems; AIndex: Integer; var ARowIndex: Integer): Integer; -var - I: Integer; - AColumn: TcxGridColumn; -begin - ARowIndex := 0; - AIndex := CheckSummaryItemIndex(AItems, AIndex, False); - AColumn := AItems[AIndex].ItemLink as TcxGridColumn; - for I := 0 to AIndex - 1 do - if AItems[I].ItemLink = AColumn then - Inc(ARowIndex); - Result := AColumn.VisibleIndex; -end; - -function TdxGridTableViewAdapter.GetFooterLineCount( - AItems: TcxDataSummaryItems; ACanMultiLine: Boolean): Integer; -var - I, J, ACount: Integer; -begin - Result := RowLineCount; - if (AItems = nil) or not ACanMultiLine then Exit; - for I := 0 to AItems.Count - 1 do - begin - ACount := 0; - for J := 0 to AItems.Count - 1 do - if IsSummaryHasSameLink(AItems[I], AItems[J]) then - Inc(ACount); - Result := Max(Result, ACount); - end; -end; - -function TdxGridTableViewAdapter.GetGroupFooterCount(AGridRow: TcxCustomGridRow): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AGridRow.Level do - if HasGroupFooter(AGridRow, I) then - Inc(Result); -{ if Result > 0 then - Result := 1;} -end; - -function TdxGridTableViewAdapter.GetGroupFooterItemText(ARowIndex, ALevel, AIndex: Integer): string; -var - SummaryIndex: Integer; -begin - SummaryIndex := Summary.GroupFooterIndexOfItemLink[ALevel, Columns[AIndex]]; - if SummaryIndex <> -1 then - Result := Summary.GroupFooterSummaryTexts[ARowIndex, ALevel, SummaryIndex] - else - Result := ''; -end; - -function TdxGridTableViewAdapter.HasGroupFooter(AGridRow: TcxCustomGridRow; ALevel: Integer): Boolean; -begin - if GroupFootersMode = gfInvisible then - Result := False - else - begin - if GroupFootersMode = gfAlwaysVisible then - Dec(ALevel); - Result := (0 <= ALevel) and (ALevel < AGridRow.Level) and - TcxCustomGridRecordAccess(AGridRow).IsParentRecordLast[ALevel] and - TcxGridColumnAccess(GridView.GroupedColumns[AGridRow.Level - 1 - ALevel]).Options.GroupFooters; - end; - if not Result and (AGridRow is TcxGridGroupRow) then - begin - Result := Result or - (GroupFootersMode = gfAlwaysVisible) and (ALevel = -1) and not AGridRow.Expanded and - TcxGridColumnAccess(TcxGridGroupRow(AGridRow).GroupedColumn).Options.GroupFooters; - end; -end; - -function TdxGridTableViewAdapter.HasGroupFooterItem(ALevel, AIndex: Integer): Boolean; -begin - Result := Summary.GroupFooterIndexOfItemLink[ALevel, Columns[AIndex]] <> -1; -end; - -function TdxGridTableViewAdapter.HasGroupFooters(AGridRow: TcxCustomGridRow): Boolean; -begin - Result := GetGroupFooterCount(AGridRow) <> 0; -end; - -function TdxGridTableViewAdapter.Controller: TcxGridTableController; -begin - Result := inherited Controller as TcxGridTableController; -end; - -function TdxGridTableViewAdapter.DataController: TcxGridDataController; -begin - Result := GridView.DataController; -end; - -function TdxGridTableViewAdapter.GetAutoWidth: Boolean; -begin - Result := GridView.OptionsView.ColumnAutoWidth; -end; - -function TdxGridTableViewAdapter.GetCellAutoHeight: Boolean; -begin - Result := inherited GetCellAutoHeight and (DetailsLineCount = 1) and not DataRowHeightAssigned; -end; - -function TdxGridTableViewAdapter.GetCellMultiline: Boolean; -begin - Result := inherited GetCellAutoHeight;// {3.1} and not DataRowHeightAssigned;// and (DetailsLineCount <> 1); -end; - -function TdxGridTableViewAdapter.GetHeaderAutoHeight: Boolean; -begin - Result := GridView.OptionsView.HeaderAutoHeight and not HeaderHeightAssigned; -end; - -function TdxGridTableViewAdapter.GetHeaderMultiline(Column: TcxGridColumn): Boolean; -begin - Result := HeaderAutoHeight or HeaderHeightAssigned; -end; - -function TdxGridTableViewAdapter.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount + GroupedColumnCount; - if (Result <> 0) and (GroupedColumnCount <> 0) and IsOffice11StyleGrouping then - Dec(Result); -end; - -function TdxGridTableViewAdapter.GetIndentWidth: Integer; -begin - Result := GridView.ViewInfo.LevelIndent; -end; - -function TdxGridTableViewAdapter.GetIndicatorWidth: Integer; -begin - if GridView.OptionsView.Indicator then - Result := GridView.OptionsView.IndicatorWidth - else - Result := 0; -end; - -function TdxGridTableViewAdapter.GetIsOffice11StyleGrouping: Boolean; -begin - {$IFDEF DXVER500} - Result := GridView.OptionsView.GroupRowStyle = grsOffice11; - {$ELSE} - Result := False; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetViewWidthExtra: Integer; -var - IndentCount: Integer; -begin - Result := inherited GetViewWidthExtra; - IndentCount := GroupedColumnCount; - if (IndentCount <> 0) and IsOffice11StyleGrouping then - Dec(IndentCount); - Inc(Result, IndentCount * IndentWidth); -end; - -function TdxGridTableViewAdapter.GetDataRowHeight: Integer; -begin - Result := GridView.OptionsView.DataRowHeight; -end; - -function TdxGridTableViewAdapter.GetDataRowHeightAssigned: Boolean; -begin - Result := DataRowHeight <> 0; -end; - -function TdxGridTableViewAdapter.GetFooterHeight: Integer; -begin - Result := DefaultFooterLineHeight;//GridView.OptionsView.HeaderHeight; {PS 3.03} -end; - -function TdxGridTableViewAdapter.GetFooterHeightAssigned: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewAdapter.GetGroupFooterHeight: Integer; -begin - Result := DefaultGroupFooterLineHeight; -end; - -function TdxGridTableViewAdapter.GetGroupFooterHeightAssigned: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewAdapter.GetGroupRowHeight: Integer; -begin - Result := GridView.OptionsView.GroupRowHeight; -end; - -function TdxGridTableViewAdapter.GetGroupRowHeightAssigned: Boolean; -begin - Result := GroupRowHeight <> 0; -end; - -function TdxGridTableViewAdapter.GetHeaderHeight: Integer; -begin - Result := GridView.OptionsView.HeaderHeight; -end; - -function TdxGridTableViewAdapter.GetHeaderHeightAssigned: Boolean; -begin - Result := HeaderHeight <> 0; -end; - -function TdxGridTableViewAdapter.GetRowLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridTableViewAdapter.GetFilterBarViewParams: TcxViewParams; -begin - Styles.GetViewParams(vsFilterBox, nil, nil, Result); -end; - -function TdxGridTableViewAdapter.GetFooterViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; AColumn: TcxGridColumn; AItem: TcxDataSummaryItem): TcxViewParams; -begin - if (AColumn <> nil) and (AColumn.Styles <> nil) then - Styles.GetFooterCellParams(TcxCustomGridRow(ARecord), AColumn, AGroupLevel, AItem, Result) - else - Styles.GetFooterParams(TcxCustomGridRow(ARecord), AColumn, AGroupLevel, AItem, Result); -end; - -function TdxGridTableViewAdapter.GetGroupRowViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer): TcxViewParams; -begin - if (AGroupLevel >= 0) and (AGroupLevel < Styles.GridView.GroupedItemCount) then - Styles.GetGroupParams(ARecord, AGroupLevel, Result) - else - Styles.GetViewParams(vsGroup, ARecord, nil, Result); -end; - -function TdxGridTableViewAdapter.GetHeaderViewParams(AColumn: TcxGridColumn): TcxViewParams; -begin - if (AColumn <> nil) and (AColumn.Styles <> nil) then - AColumn.Styles.GetHeaderParams(Result) - else - Styles.GetHeaderParams(AColumn, Result); - if AColumn = nil then - Result.Color := LookAndFeelPainter.DefaultHeaderBackgroundColor; -end; - -function TdxGridTableViewAdapter.GetPreviewViewParams(ARecord: TcxCustomGridRecord; - AnItem: TcxCustomGridTableItem): TcxViewParams; -begin - Styles.GetPreviewParams(ARecord, TcxGridColumn(AnItem), Result); - // 3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TdxGridTableViewAdapter.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := GridView.VisibleColumns[Index]; -end; - -function TdxGridTableViewAdapter.GetColumnCount: Integer; -begin - Result := GridView.VisibleColumnCount; -end; - -function TdxGridTableViewAdapter.GetFooterItemText(Index: Integer): string; -var - SummaryIndex: Integer; -begin - SummaryIndex := Summary.FooterSummaryItems.IndexOfItemLink(Columns[Index]); - if SummaryIndex <> -1 then - Result := Summary.FooterSummaryTexts[SummaryIndex] - else - Result := ''; -end; - -function TdxGridTableViewAdapter.GetFooterMultiline: Boolean; -begin - {$IFDEF DXVER500} - Result := GridView.OptionsView.FooterAutoHeight; - {$ELSE} - Result := False; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetFooterMultiSummaries: Boolean; -begin - Result := GridView.OptionsView.CanShowFooterMultiSummaries; -end; - -function TdxGridTableViewAdapter.GetGridLineColor: TColor; -begin - Result := GridView.OptionsView.GridLineColor; - if Result = clDefault then - Result := GridView.LookAndFeelPainter.DefaultGridLineColor; -end; - -function TdxGridTableViewAdapter.GetGridLines: TcxGridLines; -begin - Result := GridView.OptionsView.GridLines; -end; - -function TdxGridTableViewAdapter.GetGroupedColumn(Index: Integer): TcxGridColumn; -begin - Result := GridView.GroupedColumns[Index]; -end; - -function TdxGridTableViewAdapter.GetGroupedColumnCount: Integer; -begin - Result := GridView.GroupedColumnCount; -end; - -function TdxGridTableViewAdapter.GetGroupFootersMode: TcxGridGroupFootersMode; -begin - Result := GridView.OptionsView.GroupFooters; -end; - -function TdxGridTableViewAdapter.GetGroupFooterMultiSummaries: Boolean; -begin - Result := GridView.OptionsView.CanShowGroupFooterMultiSummaries; -end; - -function TdxGridTableViewAdapter.GetGroupFootersMultiline: Boolean; -begin - {$IFDEF DXVER500} - Result := GridView.OptionsView.FooterAutoHeight; - {$ELSE} - Result := False; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetGroupRowSeparatorColor: TColor; -begin - {$IFDEF DXVER500} - Result := dxOffice11.dxOffice11GroupRowSeparatorColor; - {$ELSE} - Result := clBtnFace; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetGroupRowSeparatorThickness: Integer; -begin - {$IFDEF DXVER500} - Result := cxGridTableView.cxGridOffice11GroupRowSeparatorWidth; - {$ELSE} - Result := 2; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetHasFooterItem(Index: Integer): Boolean; -begin - Result := Summary.FooterSummaryItems.IndexOfItemLink(Columns[Index]) <> -1; -end; - -function TdxGridTableViewAdapter.GetHasPreview: Boolean; -begin - Result := PreviewColumn <> nil; -end; - -function TdxGridTableViewAdapter.GetHasRowSeparators: Boolean; -begin - Result := RowSeparatorThickness > 0; -end; - -function TdxGridTableViewAdapter.GetHeaderEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.HeaderEndEllipsis; -end; - -function TdxGridTableViewAdapter.GetInternalColumnMinWidth(Column: TcxGridColumn): Integer; -begin - Result := Column.MinWidth; - if Column.IsMostLeft then - Inc(Result, IndentCount * IndentWidth); -end; - -function TdxGridTableViewAdapter.GetInternalColumnWidth(Column: TcxGridColumn): Integer; -begin - Result := Column.Width; - if Column.IsMostLeft then - Inc(Result, IndentCount * IndentWidth); -end; - -function TdxGridTableViewAdapter.GetPreviewColumn: TcxGridColumn; -begin - Result := GridView.Preview.Column; -end; - -function TdxGridTableViewAdapter.GetPreviewLeftIndent: Integer; -begin - Result := GridView.Preview.LeftIndent; -end; - -function TdxGridTableViewAdapter.GetPreviewPlace: TcxGridPreviewPlace; -begin - Result := GridView.Preview.Place; -end; - -function TdxGridTableViewAdapter.GetPreviewRightIndent: Integer; -begin - Result := GridView.Preview.RightIndent; -end; - -function TdxGridTableViewAdapter.GetRow(Index: Integer): TcxCustomGridRow; -begin - Result := TcxCustomGridRow(Records[Index]); -end; - -function TdxGridTableViewAdapter.GetRowCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridTableViewAdapter.GetRowSeparatorColor: TColor; -begin - Result := GridView.OptionsView.RowSeparatorColor; -end; - -function TdxGridTableViewAdapter.GetRowSeparatorThickness: Integer; -begin - Result := GridView.OptionsView.RowSeparatorWidth; -end; - -function TdxGridTableViewAdapter.GetShowExpandButtonsForEmptyDetails: Boolean; -begin - {$IFDEF DXVER500} - Result := GridView.OptionsView.ExpandButtonsForEmptyDetails; - {$ELSE} - Result := True; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetShowHorzGridLines: Boolean; -begin - Result := GridLines in [glBoth, glHorizontal]; -end; - -function TdxGridTableViewAdapter.GetShowVertGridLines: Boolean; -begin - Result := GridLines in [glBoth, glVertical]; -end; - -function TdxGridTableViewAdapter.GetThemedFooterItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFooterColor; -end; - -function TdxGridTableViewAdapter.GetThemedFooterItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFooterTextColor; -end; - -function TdxGridTableViewAdapter.GetThemedHeaderItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderColor; -end; - -function TdxGridTableViewAdapter.GetThemedHeaderItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderTextColor; -end; - -{ TdxCustomGridTableViewItemPlaceController } - -constructor TdxCustomGridTableViewItemPlaceController.Create(AFormatter: TdxGridTableViewFormatter); -begin - inherited Create; - FFormatter := AFormatter; - FHeaderLineCount := -1; - FWidth := -1; -end; - -procedure TdxCustomGridTableViewItemPlaceController.Calculate; -begin -end; - -procedure TdxCustomGridTableViewItemPlaceController.Refresh; -begin -end; - -function TdxCustomGridTableViewItemPlaceController.CalculateHeaderLineCount: Integer; -begin - Result := 1; -end; - -function TdxCustomGridTableViewItemPlaceController.CalculateWidth: Integer; -begin - Result := 0; -end; - -function TdxCustomGridTableViewItemPlaceController.GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; -begin - Result := nil; -end; - -procedure TdxCustomGridTableViewItemPlaceController.WidthChanged; -begin -end; - -function TdxCustomGridTableViewItemPlaceController.GetHeaderLineCount: Integer; -begin - if FHeaderLineCount = -1 then - FHeaderLineCount := CalculateHeaderLineCount; - Result := FHeaderLineCount; -end; - -function TdxCustomGridTableViewItemPlaceController.GetWidth: Integer; -begin - if FWidth = -1 then - FWidth := CalculateWidth; - Result := FWidth; -end; - -procedure TdxCustomGridTableViewItemPlaceController.SetWidth(Value: Integer); -begin - FWidth := Value; - WidthChanged; -end; - -{ TdxGridTableViewColumnPlace } - -constructor TdxGridTableViewColumnPlace.Create(AController: TdxGridTableViewColumnPlaceController; - AColumn: TcxGridColumn); -begin - inherited Create; - FController := AController; - FColumn := AColumn; - - FLeftBound := -1; - FWidth := -1; -end; - -procedure TdxGridTableViewColumnPlace.Calculate(ALeftBound: Integer); -begin - FLeftBound := ALeftBound; -end; - -function TdxGridTableViewColumnPlace.CalculateLeftBound: Integer; -begin - Result := Controller.CalculateItemLeftBound(Self); -end; - -function TdxGridTableViewColumnPlace.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridTableViewColumnPlace.GetRowIndex: Integer; -begin - Result := 0; -end; - -procedure TdxGridTableViewColumnPlace.InitAutoWidthItem(AnItem: TcxAutoWidthItem); -begin - AnItem.Fixed := IsFixed; - AnItem.MinWidth := MinWidth; - AnItem.Width := Width; -end; - -function TdxGridTableViewColumnPlace.GetAdapter: TdxGridTableViewAdapter; -begin - Result := Formatter.Adapter; -end; - -function TdxGridTableViewColumnPlace.GetCellBounds(RowIndex: Integer): TRect; -var - CellHeight: Integer; -begin - CellHeight := CellHeights[RowIndex]; - with Result do - begin - Left := LeftBound; - Top := Self.RowIndex * CellHeight; - Right := Left + Width; - Bottom := Top + LineCount * CellHeight; - end; - - if Column.IsMostLeft then - Inc(Result.Left, Formatter.ViewWidthExtra); -end; - -function TdxGridTableViewColumnPlace.GetCellHeight(RowIndex: Integer): Integer; -begin - Result := Formatter.RowHeights[RowIndex]; -end; - -function TdxGridTableViewColumnPlace.GetFooterCellBounds: TRect; -begin - with Result do - begin - Left := LeftBound; - Top := RowIndex * FooterLineHeight; - Right := Left + Width; - Bottom := Top + LineCount * FooterLineHeight; - end; - - InflateRect(Result, -FooterItemInflateHorz, -FooterItemInflateVert); - if Column.IsMostLeft then - Inc(Result.Left, 2); -end; - -function TdxGridTableViewColumnPlace.GetFooterLineHeight: Integer; -begin - Result := Formatter.FooterLineHeight; -end; - -function TdxGridTableViewColumnPlace.GetFormatter: TdxGridTableViewFormatter; -begin - Result := Controller.Formatter; -end; - -function TdxGridTableViewColumnPlace.GetGroupFooterCellBounds(IndentCount: Integer): TRect; -var - V: Integer; -begin - with Result do - begin - Left := LeftBound; - Top := RowIndex * GroupFooterLineHeight; - Right := Left + Width; - Bottom := Top + LineCount * GroupFooterLineHeight; - end; - - V := IndentCount * Formatter.IndentWidth; - OffsetRect(Result, -V, 0); - if Column.IsMostLeft then - Inc(Result.Left, V); - - InflateRect(Result, -FooterItemInflateHorz, -FooterItemInflateVert); - if Column.IsMostLeft then - Inc(Result.Left, 2); -end; - -function TdxGridTableViewColumnPlace.GetGroupFooterLineHeight: Integer; -begin - Result := Formatter.GroupFooterLineHeight; -end; - -function TdxGridTableViewColumnPlace.GetHeaderCellBounds: TRect; -begin - with Result do - begin - Left := LeftBound; - Top := RowIndex * HeaderLineHeight; - Right := Left + Width; - Bottom := Top + LineCount * HeaderLineHeight; - end; -end; - -function TdxGridTableViewColumnPlace.GetHeaderLineHeight: Integer; -begin - Result := Formatter.HeaderLineHeight; -end; - -function TdxGridTableViewColumnPlace.GetIndex: Integer; -begin - Result := Controller.IndexOf(Self); -end; - -function TdxGridTableViewColumnPlace.GetIsFixed: Boolean; -begin - Result := GridColumn_GetFixed(Column); -end; - -function TdxGridTableViewColumnPlace.GetLeftBound: Integer; -begin - if FLeftBound = -1 then - FLeftBound := CalculateLeftBound; - Result := FLeftBound; -end; - -function TdxGridTableViewColumnPlace.GetMinWidth: Integer; -begin - Result := Adapter.InternalColumnMinWidths[Column]; -end; - -function TdxGridTableViewColumnPlace.GetOriginalWidth: Integer; -begin - Result := Adapter.InternalColumnWidths[Column]; -end; - -function TdxGridTableViewColumnPlace.GetWidth: Integer; -begin - Result := FWidth; - if Result = -1 then - Result := OriginalWidth; -end; - -{ TdxGridTableViewColumnPlaceController } - -constructor TdxGridTableViewColumnPlaceController.Create(AFormatter: TdxGridTableViewFormatter); -begin - inherited; - FColumnIndexes := TList.Create; - FItems := TList.Create; - FWidth := -1; -end; - -destructor TdxGridTableViewColumnPlaceController.Destroy; -begin - FreeAndNilItems; - FreeAndNil(FColumnIndexes); - inherited; -end; - -procedure TdxGridTableViewColumnPlaceController.Calculate; -begin - if ItemsAutoWidth then CalculateItemsWidth; -end; - -procedure TdxGridTableViewColumnPlaceController.Refresh; -begin - FColumnIndexes.Clear; - ClearItems; - AddItems; -end; - -function TdxGridTableViewColumnPlaceController.IndexOf(AnItem: TdxGridTableViewColumnPlace): Integer; -begin - Result := FItems.IndexOf(AnItem); -end; - -function TdxGridTableViewColumnPlaceController.IndexOf(AColumn: TcxGridColumn): Integer; -begin - for Result := 0 to ItemCount - 1 do - if Items[Result].Column = AColumn then - Exit; - Result := -1; -end; - -function TdxGridTableViewColumnPlaceController.CalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ItemCount - 1 do - Inc(Result, Items[I].Width); -end; - -function TdxGridTableViewColumnPlaceController.GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; -var - Index: Integer; -begin - Index := ColumnIndexes[Column]; - //Index := IndexOf(Column); - if Index <> -1 then // might be -1 when we are in loading stage (Building report while loading form) - Result := Items[Index] - else - Result := nil; -end; - -procedure TdxGridTableViewColumnPlaceController.AddItems; -var - I: Integer; -begin - for I := 0 to Formatter.ColumnCount - 1 do - CreateItem(Formatter.Columns[I]); -end; - -procedure TdxGridTableViewColumnPlaceController.ClearItems; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].Free; - FItems.Clear; -end; - -function TdxGridTableViewColumnPlaceController.CreateItem(AColumn: TcxGridColumn): TdxGridTableViewColumnPlace; -begin - Result := GetItemClass(AColumn).Create(Self, AColumn); - FItems.Add(Result); -end; - -function TdxGridTableViewColumnPlaceController.GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; -begin - Result := TdxGridTableViewColumnPlace; -end; - -function TdxGridTableViewColumnPlaceController.CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AnItem.Index - 1 do - Inc(Result, Items[I].Width); -end; - -procedure TdxGridTableViewColumnPlaceController.CalculateItemsWidth; -var - AutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AutoWidthObject := TcxAutoWidthObject.Create(ItemCount); - try - for I := 0 to ItemCount - 1 do - Items[I].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := ItemsAvailableWidth; - AutoWidthObject.Calculate; - - for I := 0 to ItemCount - 1 do - Items[I].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; -end; - -function TdxGridTableViewColumnPlaceController.GetItemsAutoWidth: Boolean; -begin - Result := Formatter.AutoWidth; -end; - -function TdxGridTableViewColumnPlaceController.GetItemsAvailableWidth: Integer; -begin - Result := Formatter.ViewAvailableWidth; -end; - -function TdxGridTableViewColumnPlaceController.GetAdapter: TdxGridTableViewAdapter; -begin - Result := Formatter.Adapter; -end; - -function TdxGridTableViewColumnPlaceController.GetColumnIndex(Column: TcxGridColumn): Integer; -var - ColumnIndex, IndexCount, I: Integer; -begin - ColumnIndex := Column.Index; - IndexCount := FColumnIndexes.Count; - if ColumnIndex > IndexCount - 1 then - begin - FColumnIndexes.Count := ColumnIndex + 1; - for I := IndexCount to FColumnIndexes.Count - 1 do - FColumnIndexes[I] := TObject(-1); - end; - Result := Integer(FColumnIndexes[ColumnIndex]); - if Result = -1 then - begin - FColumnIndexes[ColumnIndex] := TObject(IndexOf(Column)); - Result := Integer(FColumnIndexes[ColumnIndex]); - end; -end; - -function TdxGridTableViewColumnPlaceController.GetItem(Index: Integer): TdxGridTableViewColumnPlace; -begin - Result := TdxGridTableViewColumnPlace(FItems[Index]); -end; - -function TdxGridTableViewColumnPlaceController.GetItemCount: Integer; -begin - Result := FItems.Count; -end; - -procedure TdxGridTableViewColumnPlaceController.FreeAndNilItems; -begin - ClearItems; - FreeAndNil(FItems); -end; - -{ TdxGridTableViewReportDataAdapter } - -constructor TdxGridTableViewReportDataAdapter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TdxGridTableViewReportDataAdapter.GetReportItem(Row: TcxCustomGridRow; - Column: TcxGridColumn): TdxReportVisualItem; -var - ReportRow: TdxReportCell; - I: Integer; -begin - ReportRow := ReportRowsByGridRow[Row]; - if ReportRow <> nil then - for I := 0 to ReportRow.DataItemCount - 1 do - begin - Result := ReportRow.DataItems[I]; - if Result.Data = Integer(Column) then Exit; - end; - Result := nil; -end; - -function TdxGridTableViewReportDataAdapter.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := Builder.ReportRows[Index]; -end; - -function TdxGridTableViewReportDataAdapter.GetReportRowByGridRow(Row: TcxCustomGridRow): TdxReportCell; -var - I: Integer; -begin - for I := 0 to ReportRowCount - 1 do - if ReportRows[I].CellCount <> 0 then - begin - Result := ReportRows[I].Cells[0]; - if Result.Data = Integer(Row) then Exit; - end; - Result := nil; -end; - -function TdxGridTableViewReportDataAdapter.GetReportRowCount: Integer; -begin - Result := Builder.ReportRowCount; -end; - -{ TdxGridTableViewFormatter } - -constructor TdxGridTableViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FColumns := TList.Create; - FItemPlaceController := GetItemPlaceControllerClass.Create(Self); - FReportDataAdapter := TdxGridTableViewReportDataAdapter.Create(ABuilder); - FRowHeights := TList.Create; -end; - -destructor TdxGridTableViewFormatter.Destroy; -begin - FreeAndNil(FRowHeights); - FreeAndNil(FItemPlaceController); - FreeAndNil(FReportDataAdapter); - FreeAndNil(FColumns); - inherited; -end; - -function TdxGridTableViewFormatter.Adapter: TdxGridTableViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridTableViewFormatter.Builder: TdxGridTableViewBuilder; -begin - Result := inherited Builder as TdxGridTableViewBuilder; -end; - -procedure TdxGridTableViewFormatter.DoInitializeFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer; AItem: TcxDataSummaryItem); -var - Column: TcxGridColumn; -begin - Column := TcxGridColumn(AItem.ItemLink); - SetViewParams(AnItem, GetFooterItemViewParams(Column, AItem)); - if HasBackgroundBitmap(bbFooter) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbFooter); - - RegisterLookAndFeelItem(AnItem, cesSunken); - - with AnItem as TdxReportCellString do - begin - Data := Integer(Column); - Text := AItem.FormatValue(Adapter.Summary.FooterSummaryValues[AnIndex], True); - Multiline := Adapter.FooterMultiline; - TextAlignX := TextAlignXMap[Column.FooterAlignmentHorz]; - if Multiline then - TextAlignY := taTop - else - TextAlignY := taCenterY; - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeFooterRow(ARow: TdxReportCell); -begin - SetViewParams(ARow, GetFooterItemViewParams(nil, nil)); - if HasBackgroundBitmap(bbFooter) then - ARow.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbFooter); - - RegisterLookAndFeelItem(ARow, cesRaised); - ARow.Data := Integer(TdxGridFooter); -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - ReportLink.DoInitializeFooterCell(Adapter.GridView, nil, Columns[AnIndex], 0, TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetFooterItemBounds(AnIndex: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AnIndex]]; - if Item <> nil then - Result := Item.FooterCellBounds - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridTableViewFormatter.GetFooterItemViewParams( - AColumn: TcxGridColumn; AItem: TcxDataSummaryItem): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetFooterParams(nil, -1, AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetFooterViewParams(nil, -1, AColumn, AItem); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedFooterItemColor; - Result.NativeParams.TextColor := Adapter.ThemedFooterItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterHost(AnItem: TdxReportVisualItem; - ARecord: TcxCustomGridRecord; AGroupLevel: Integer); -begin - SetViewParams(AnItem, GetGroupFooterItemViewParams(nil, AGroupLevel, nil, nil)); - if HasBackgroundBitmap(bbFooter) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbFooter); - - RegisterLookAndFeelItem(AnItem, cesRaised); - AnItem.Data := Integer(ARecord); -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; - ARecord: TcxCustomGridRecord; AGroupLevel: Integer; const AValue: Variant; AItem: TcxDataSummaryItem); -var - AColumn: TcxGridColumn; -begin - AColumn := TcxGridColumn(AItem.ItemLink); - SetViewParams(AnItem, GetGroupFooterItemViewParams( - ARecord, AGroupLevel, AColumn, AItem)); - if HasBackgroundBitmap(bbFooter) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbFooter); - RegisterLookAndFeelItem(AnItem, cesSunken); - - with TdxReportCellString(AnItem) do - begin - Data := Integer(AColumn); - - Multiline := Adapter.GetGroupFootersMultiline; - Text := AItem.FormatValue(AValue, True); - TextAlignX := TextAlignXMap[AColumn.FooterAlignmentHorz]; - if Multiline then - TextAlignY := taTop - else - TextAlignY := taCenterY; - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord; AGroupLevel: Integer); -begin - ARow.CellSides := csLeftRight; - ARow.Data := AGroupLevel; //v3.0 ARecord.Level - ARow.Transparent := True; -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxGridColumn; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); -begin - ReportLink.DoInitializeFooterCell(Adapter.GridView, ARecord, AColumn, - AGroupLevel, TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetGroupFooterItemBounds(AnIndex, AGroupLevel: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AnIndex]]; - if Item <> nil then - Result := Item.GroupFooterCellBounds[AGroupLevel] - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetGroupFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridTableViewFormatter.GetGroupFooterItemViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; AColumn: TcxGridColumn; AItem: TcxDataSummaryItem): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetFooterParams(ARecord, AGroupLevel, AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetFooterViewParams(ARecord, AGroupLevel, AColumn, AItem); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedFooterItemColor; - Result.NativeParams.TextColor := Adapter.ThemedFooterItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRowItem(AnItem: TAbstractdxReportCellData; - ARow: TcxGridGroupRow; AIndex: Integer; const AText: string); -begin - if not ReportLink.OptionsFormatting.UseNativeStyles and IsDelphiObject(AnItem.Data) - and (TObject(AnItem.Data) is TcxGridSummaryItemInfo) then - SetViewParams(AnItem, Adapter.GridLines, TcxGridSummaryItemInfo(AnItem.Data).ViewParams) - else - SetViewParams(AnItem, GetGroupRowViewParams(ARow, ARow.Level)); - if HasBackgroundBitmap(bbGroup) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); - with AnItem as TdxReportCellString do - begin - Data := Integer(Adapter.GroupedColumns[ARow.Level]); - Text := AText; - if AIndex = 0 then - TextAlignX := taLeft; - if Adapter.IsOffice11StyleGrouping then TextAlignY := taBottom; {.2} - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord); -begin - ReportLink.AddReportRow(ARow); - - ARow.CellSides := []; - ARow.Data := Integer(ARecord); - ARow.Transparent := True; -end; - -function TdxGridTableViewFormatter.GetGroupRowClass: TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridTableViewFormatter.GetGroupRowViewParams(ARecord: TcxCustomGridRecord; - ALevel: Integer): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetGroupParams(ARecord, ALevel, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetGroupRowViewParams(ARecord, ALevel); - - Result.CellSides := CellSidesMap[Adapter.GridLines] - [csLeft] + [csRight]; - if ARecord.Index = 0 then - Result.CellSides := Result.CellSides + [csTop]; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRowSeparator(ASeparator: TAbstractdxReportCellData); -begin - ASeparator.CellSides := csAll; - ASeparator.Color := GroupRowSeparatorColor; - ASeparator.Transparent := IsColorTransparent(ASeparator.Color); //ReportLink.Transparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupSeparatorRow(ARow: TdxReportCell); -begin - ARow.CellSides := csLeftRight; - ARow.Transparent := True; -end; - -function TdxGridTableViewFormatter.GetGroupRowSeparatorClass: TdxReportCellDataClass; -begin - Result := TdxReportCellBox; -end; - -procedure TdxGridTableViewFormatter.DoInitializeHeaderItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Column: TcxGridColumn; -begin - Column := Columns[AnIndex]; - SetViewParams(AnItem, GetHeaderItemViewParams(Column)); - if HasBackgroundBitmap(bbHeader) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbHeader); - RegisterLookAndFeelItem(AnItem, cesRaised); - - with AnItem as TdxReportCellImage do - begin - Data := Integer(Column); - EndEllipsis := Adapter.HeaderEndEllipsis; - if (Column.HeaderGlyph <> nil) and not Column.HeaderGlyph.Empty then - begin - Image := Column.HeaderGlyph; - ImageLayout := HeaderImageLayoutMap[Column.HeaderGlyphAlignmentHorz, Column.HeaderGlyphAlignmentVert]; - IsTextDrawnForCenteredImage := True; - IsTextShiftedForHorizontallyCenteredImage := - not (ImageLayout in [ilImageTopCenter, ilImageCenterCenter, ilImageBottomCenter]) and (Text <> ''); - end; - Multiline := Adapter.HeaderMultilines[Column]; - SortOrder := SortOrderMap[Column.SortOrder]; - if Column.Options.ShowCaption then - Text := Column.Caption - else - Text := ''; - TextAlignX := TextAlignXMap[Column.HeaderAlignmentHorz]; - if Multiline then - TextAlignY := TextAlignYMap[Column.HeaderAlignmentVert] - else - TextAlignY := taCenterY; - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeHeaderRow(ARow: TdxReportCell); -begin - SetViewParams(ARow, GetHeaderItemViewParams(nil)); - ARow.Data := Integer(TdxGridHeader); -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeHeaderItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - ReportLink.DoInitializeHeaderCell(Adapter.GridView, Columns[AnIndex], TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetHeaderItemBounds(AnIndex: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AnIndex]]; - if Item <> nil then - Result := Item.HeaderCellBounds - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetHeaderItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellImage; -end; - -function TdxGridTableViewFormatter.GetHeaderItemViewParams(AColumn: TcxGridColumn): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetHeaderParams(AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetHeaderViewParams(AColumn); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedHeaderItemColor; - Result.NativeParams.TextColor := Adapter.ThemedHeaderItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := False; -end; - -function TdxGridTableViewFormatter.CreateIndent(AParent: TdxReportCell): TdxReportCellExpandButton; -begin - Result := GetIndentClass.Create(AParent); -end; - -procedure TdxGridTableViewFormatter.DoInitializeDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, False)); - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, True)); - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); -// if (AIndex = AIndentCount - 1) and Adapter.ShowHorzGridLines then -// AIndent.CellSides := AIndent.CellSides + [csBottom]; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, False)); - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); - - if AnIndex = AnIndentCount - 1 then - begin - AnIndent.CellSides := AnIndent.CellSides - [csRight]; - if Adapter.ShowHorzGridLines then - AnIndent.CellSides := AnIndent.CellSides + [csTop]; - //if Adapter.IsOffice11StyleGrouping then - // AnIndent.CellSides := AnIndent.CellSides + [csBottom]; - - AnIndent.ShowButton := HasExpandButton(ARecord); - if AnIndent.ShowButton then - DoInitializeExpandButton(AnIndent, ARecord, False); - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeMasterDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - { DoInitializeMasterIndent -> ARecord = nil } - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, False)); - if AnIndex = AnIndentCount - 1 then - if HasBackgroundBitmap(bbContent) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbContent) - else - else - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); - - if (ARecord <> nil) and (AnIndex = AnIndentCount - 1) then - begin - AnIndent.CellSides := AnIndent.CellSides - [csRight]; - if Adapter.ShowHorzGridLines then - AnIndent.CellSides := AnIndent.CellSides + [csTop]; - if not ARecord.Expanded then - AnIndent.CellSides := AnIndent.CellSides + [csBottom]; - - AnIndent.ShowButton := ReportLink.OptionsView.ExpandButtons and ARecord.Expandable; - if AnIndent.ShowButton then - DoInitializeExpandButton(AnIndent, ARecord, True); - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeRowSeparatorIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, True)); - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); -end; - -function TdxGridTableViewFormatter.GetIndentClass: TdxReportCellExpandButtonClass; -begin - if Adapter.IsOffice11StyleGrouping then - Result := TdxReportCellExpandButtonEx - else - Result := TdxReportCellExpandButton; -end; - -function TdxGridTableViewFormatter.GetIndentViewParams(ARecord: TcxCustomGridRecord; - AnIndex, AnIndentCount: Integer; ANonRecordIndent: Boolean): TdxReportItemViewParams; - - function IsMasterDataRowIndent: Boolean; - begin - with Adapter do - Result := AnIndex >= GroupedColumnCount - Ord(IsOffice11StyleGrouping and not (ARecord is TcxGridGroupRow)); - end; - - function GetRecord: TcxCustomGridRecord; - begin - if not ANonRecordIndent and (ARecord is TcxGridGroupRow) and (AnIndex = AnIndentCount - 1) then - Result := ARecord - else - Result := nil; - end; - -const - VertGridLinesMap: array[Boolean] of TdxCellSides = ([], csLeftRight); -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - if IsMasterDataRowIndent then - ReportLink.Styles.GetContentParams(Adapter.MasterGridRecord, nil, Result.NativeParams) - else - ReportLink.Styles.GetGroupParams(GetRecord, AnIndex, Result.NativeParams) - else - if IsMasterDataRowIndent then - Result.NativeParams := Adapter.GetContentViewParams(Adapter.MasterGridRecord, nil) - else - Result.NativeParams := Adapter.GetGroupRowViewParams(GetRecord, AnIndex); - - Result.CellSides := VertGridLinesMap[Adapter.ShowHorzGridLines]; //PS3.1 (it was Adapter.ShowVertGridLines) - if AnIndex = 0 then - Result.CellSides := Result.CellSides + [csLeft]; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); -end; - -function TdxGridTableViewFormatter.HasExpandButton(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := ReportLink.OptionsView.ExpandButtons{$IFDEF VER500} and Adapter.RecordHelpers[ARecord].HasExpandButton{$ENDIF}; -end; - -procedure TdxGridTableViewFormatter.DoInitializeDataRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord); -begin - ReportLink.AddReportRow(ARow); - - ARow.CellSides := csLeftRight; - ARow.Data := Integer(ARecord); - ARow.Transparent := True; -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxGridColumn; ARecord: TcxCustomGridRecord); -begin - ReportLink.DoInitializeCell(Adapter.GridView, ARecord, AColumn, TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetItemBounds(AGridRow: TcxCustomGridRow; - AGridRowIndex, AColumnIndex: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AColumnIndex]]; - if Item <> nil then - Result := Item.CellBounds[AGridRowIndex] - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False; AIsDataCell: Boolean = False): TdxReportItemViewParams; -begin - Result := inherited GetItemViewParams(ATableItem, ARecord, AnIsPreview, AIsDataCell); - if AnIsPreview then - begin - Result.CellSides := csLeftRight; - if Adapter.GridLines in [glBoth, glHorizontal] then - Result.CellSides := Result.CellSides + csTopBottom; - end - else - begin - Result.CellSides := CellSidesMap[Adapter.GridLines]; - if TcxGridColumn(ATableItem).IsMostLeft and (ARecord <> nil) and ARecord.Expandable then - Result.CellSides := Result.CellSides - [csLeft]; {3.1} - end; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer); -begin - DoInitializeMasterDataRowIndent(AnIndent, AnIndex, AnIndentCount, nil); //Adapter.GroupedColumnCount + 1, nil); //PS3.1 changed -end; - -procedure TdxGridTableViewFormatter.DoInitializePreview(APreview: TAbstractdxReportCellData; - AColumn: TcxGridColumn; ARecord: TcxCustomGridRecord); -begin - DoInitializeItem(APreview, AColumn, ARecord, True); -end; - -function TdxGridTableViewFormatter.GetPreviewClass(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportCellDataClass; -begin - Result := GetItemClass(AColumn, ARecord, True); -end; - -function TdxGridTableViewFormatter.GetPreviewViewParams(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportItemViewParams; -begin - Result := GetItemViewParams(AColumn, ARecord, True) -end; - -procedure TdxGridTableViewFormatter.DoInitializeSeparatorRow(ARow: TdxReportCell); -begin - ARow.CellSides := csLeftRight; - ARow.Transparent := True; -end; - -procedure TdxGridTableViewFormatter.DoInitializeRowSeparator(ASeparator: TAbstractdxReportCellData); -begin - ASeparator.CellSides := csAll; - ASeparator.Color := RowSeparatorColor; - ASeparator.Transparent := IsColorTransparent(ASeparator.Color); //ReportLink.Transparent; -end; - -function TdxGridTableViewFormatter.GetRowSeparatorClass: TdxReportCellDataClass; -begin - Result := TdxReportCellBox; -end; - -function TdxGridTableViewFormatter.GetReportItem(ARow: TcxCustomGridRow; - AColumn: TcxGridColumn): TdxReportVisualItem; -begin - Result := ReportDataAdapter.ReportItems[ARow, AColumn]; -end; - -{ IdxPSCellParams2 } -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := Adapter.PreviewLeftIndent; -end; - -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := Adapter.PreviewRightIndent; -end; - -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - if PreviewAutoHeight then - Result := -1 - else - Result := PreviewLineHeight * PreviewMaxLineCount; -end; - -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := PreviewMaxLineCount; -end; - -procedure TdxGridTableViewFormatter.AddHorizontalDelimiters; -var - Origin, I: Integer; - Item: TdxGridTableViewColumnPlace; - R: TRect; -begin - inherited; - if ReportLink.OptionsPagination.Column then - begin - Origin := ViewWidthExtraBefore; - for I := 0 to ColumnCount - 1 do - begin - Item := ItemPlaceController[Columns[I]]; - if Item <> nil then - begin - R := Item.HeaderCellBounds; - ReportLink.AddHorizontalDelimiter(Origin + R.Left); - ReportLink.AddHorizontalDelimiter(Origin + R.Right); - end; - end; - end; -end; - -{$IFDEF DXVER500} -procedure TdxGridTableViewFormatter.AfterBuilding; -begin - if CanCellMerging then PerformCellMerging; - inherited; -end; -{$ENDIF} - -procedure TdxGridTableViewFormatter.BeforeBuilding; -begin - BuildItemLists; - ItemPlaceController.Refresh; - inherited; -end; - -procedure TdxGridTableViewFormatter.Calculate; -begin - inherited; - ItemPlaceController.Calculate; -end; - -procedure TdxGridTableViewFormatter.CalculateDataRowHeights; -var - I, RowHeight, J, V: Integer; - Row: TcxCustomGridRow; - Column: TcxGridColumn; -begin - FRowHeights.Count := RowCount; - for I := 0 to RowCount - 1 do - begin - Row := Rows[I]; - if not (Row is TcxGridGroupRow) then - begin - RowHeight := DetailsLineHeight; - if HeaderLineCount = 1 then - for J := 0 to ColumnCount - 1 do - begin - // assign to 0, if you want to give an user ability to shrink RowHeight to smaller value - V := DetailsLineHeight; - Column := Columns[J]; - if not Column.IsPreview then - begin - Builder.DoGetCellHeight(Row, Columns[J], V); - if RowHeight <> V then RowHeight := V; - end; - end - end - else - RowHeight := GroupRowLineHeight; - RowHeights[I] := RowHeight; - end; -end; - -procedure TdxGridTableViewFormatter.CalculateLineHeights; -var - I: Integer; - Column: TcxGridColumn; -begin - inherited; - FGroupFooterLineHeight := DefaultGroupFooterLineHeight; - if Adapter.GroupRowHeightAssigned then - FGroupRowLineHeight := Adapter.GroupRowHeight - else - begin - FGroupRowLineHeight := DefaultGroupRowLineHeight; - if Adapter.IsOffice11StyleGrouping then {.2} - FGroupRowLineHeight := 2 * FGroupRowLineHeight; - end; - - FFooterLineHeight := Adapter.FooterHeight; - FGroupFooterLineHeight := Adapter.GroupFooterHeight; - FHeaderLineHeight := Adapter.HeaderHeight; - - if Adapter.DataRowHeightAssigned then - FDetailsLineHeight := Adapter.DataRowHeight - else - FDetailsLineHeight := DefaultDataRowLineHeight; - - FPreviewLineHeight := DefaultDataRowLineHeight; - - for I := 0 to ColumnCount - 1 do - begin - Column := Columns[I]; - if not Adapter.HeaderHeightAssigned then - CalculateHeight(GetHeaderItemViewParams(Column), FHeaderLineHeight); - {if not Adapter.FooterHeightAssigned then - begin - CalculateHeight(GetGroupFooterItemViewParams(nil, -1, Column), FGroupFooterLineHeight); - CalculateHeight(GetFooterItemViewParams(Column), FFooterLineHeight); - end;} - if not Adapter.FooterHeightAssigned then - CalculateHeight(GetFooterItemViewParams(Column, nil), FFooterLineHeight); - if not Adapter.GroupFooterHeightAssigned then - CalculateHeight(GetGroupFooterItemViewParams(nil, -1, Column, nil), FGroupFooterLineHeight); - if not Adapter.DataRowHeightAssigned and not Column.IsPreview then - CalculateHeight(GetItemViewParams(Column, nil, False), FDetailsLineHeight); - end; - - if not Adapter.GroupRowHeightAssigned then - for I := 0 to RowCount - 1 do - CalculateHeight(GetGroupRowViewParams(Rows[I], -1), FGroupRowLineHeight); - - if HasPreview then - CalculateHeight(GetItemViewParams({PreviewColumn}nil, nil, True), FPreviewLineHeight); - - Inc(FFooterLineHeight, 2 * FooterItemInflateVert - 1); - Inc(FGroupFooterLineHeight, 2 * FooterItemInflateVert - 1); - - CalculateDataRowHeights; -end; - -function TdxGridTableViewFormatter.GetAlignSummaryWithColumns: Boolean; -begin - Result := Adapter.GridView.OptionsView.GetGroupSummaryLayout <> gslStandard; -end; - -function TdxGridTableViewFormatter.GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; -begin - Result := TdxGridTableViewColumnPlaceController; -end; - -function TdxGridTableViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbFooter: - Result := vspsGridFooter; - bbGroup: - Result := vspsGridGroup; - bbHeader: - Result := vspsGridHeader; - bbPreview: - Result := vspsGridPreview; - else - Result := 0; - end; - - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -{$IFDEF DXVER500} - -function TdxGridTableViewFormatter.CanCellMerging: Boolean; -begin - Result := not HasPreview and (RowSeparatorThickness = 0); -end; - -function TdxGridTableViewFormatter.CanColumnCellMerging(AColumn: TcxGridColumn): Boolean; -begin - Result := AColumn.Options.CellMerging; -end; - -procedure TdxGridTableViewFormatter.PerformCellMerging; -var - I: Integer; - Column: TcxGridColumn; -begin - for I := 0 to ColumnCount - 1 do - begin - Column := Columns[I]; - if CanColumnCellMerging(Column) then // because Column.CanCellMerging also performs GridView.CellMerging validation - PerformColumnCellMerging(Column); - end; -end; - -procedure TdxGridTableViewFormatter.PerformColumnCellMerging(AColumn: TcxGridColumn); - - function CanRowBeMergedAsMaster(ARow: TcxCustomGridRow): Boolean; - begin - Result := Adapter.RecordHelpers[ARow].CanCellMergingAsMaster; - end; - - function CanRowBeMergedAsSlave(ARow: TcxCustomGridRow): Boolean; - begin - Result := Adapter.RecordHelpers[ARow].CanCellMergingAsSlave; - end; - - function IsRowMergingSeparator(ARow: TcxCustomGridRow): Boolean; - begin - Result := Adapter.RecordHelpers[ARow].IsCellMergingSeparator; - end; - - procedure RetrieveCellPropertiesAndValue(ARow: TcxCustomGridRow; - out AProperties: TcxCustomEditProperties; out AValue: TcxEditValue); - begin - AProperties := GetItemProperties(AColumn, ARow); - AValue := GetItemValue(AProperties, AColumn, ARow); - end; - - function CompareCellsForMerging(ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; - const AValue1: TcxEditValue; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; - const AValue2: TcxEditValue): Boolean; - begin - Result := GridColumn_DoCompareValuesForCellMerging(AColumn, - ARow1, AProperties1, AValue1, ARow2, AProperties2, AValue2); - end; - - procedure DoMergeCells(AStartRowIndex, AStopRowIndex: Integer); - var - I: Integer; - MasterReportItem, SlaveReportItem: TdxReportVisualItem; - begin - MasterReportItem := GetReportItem(Rows[AStartRowIndex], AColumn); - for I := AStartRowIndex + 1 to AStopRowIndex do - begin - SlaveReportItem := GetReportItem(Rows[I], AColumn); - with MasterReportItem do - Height := Height + SlaveReportItem.Height; - end; - for I := AStartRowIndex + 1 to AStopRowIndex do - begin - SlaveReportItem := GetReportItem(Rows[I], AColumn); - if SlaveReportItem is TdxReportCellString then - TdxReportCellString(SlaveReportItem).Text := ''; - SlaveReportItem.BackgroundBitmapIndex := MasterReportItem.BackgroundBitmapIndex; - if I <> AStopRowIndex then - SlaveReportItem.CellSides := SlaveReportItem.CellSides - [csBottom]; - SlaveReportItem.CellSides := SlaveReportItem.CellSides - [csTop]; - SlaveReportItem.Color := MasterReportItem.Color; - SlaveReportItem.ContentBkColor := MasterReportItem.ContentBkColor; - SlaveReportItem.ContentPattern := MasterReportItem.ContentPattern; - SlaveReportItem.Transparent := True; - if SlaveReportItem is TCustomdxReportCellImageContainer then - begin - TCustomdxReportCellImageContainer(SlaveReportItem).Image := nil; - TCustomdxReportCellImageContainer(SlaveReportItem).ImageIndex := -1; - end; - end; - end; - -var - I, J: Integer; - Row1, Row2: TcxCustomGridRow; - HasCellsMerging, AreCellsMerged, IsMergingSeparator: Boolean; - Properties1, Properties2: TcxCustomEditProperties; - Value1, Value2: TcxEditValue; -begin - I := 0; - while I < RowCount - 1 do - begin - HasCellsMerging := False; - Row1 := Rows[I]; - if CanRowBeMergedAsMaster(Row1) then - begin - RetrieveCellPropertiesAndValue(Row1, Properties1, Value1); - //AreCellsMerged := False; - IsMergingSeparator := False; - J := I; - repeat - Inc(J); - Row2 := Rows[J]; - if CanRowBeMergedAsSlave(Row2) then - begin - RetrieveCellPropertiesAndValue(Row2, Properties2, Value2); - AreCellsMerged := CompareCellsForMerging(TcxGridDataRow(Row1), - Properties1, Value1, TcxGridDataRow(Row2), Properties2, Value2); - if not HasCellsMerging then - HasCellsMerging := AreCellsMerged; - IsMergingSeparator := IsRowMergingSeparator(Row2); - end - else - AreCellsMerged := False; - until (J = RowCount - 1) or not AreCellsMerged or IsMergingSeparator; - - if HasCellsMerging then - begin - if not AreCellsMerged then Dec(J); - DoMergeCells(I, J); - Inc(J); - end; - I := J; - end - else - Inc(I); - end; -end; - -{$ENDIF} - -procedure TdxGridTableViewFormatter.BuildColumnList; -var - I: Integer; - Column: TcxGridColumn; -begin - FColumns.Clear; - for I := 0 to Adapter.ColumnCount - 1 do - begin - Column := Adapter.Columns[I]; - if IsColumnActuallyVisible(Column) then FColumns.Add(Column); - end; -end; - -procedure TdxGridTableViewFormatter.BuildItemLists; -begin - BuildColumnList; -end; - -function TdxGridTableViewFormatter.IsColumnActuallyVisible(AColumn: TcxGridColumn): Boolean; -begin - Result := AColumn.ActuallyVisible; -end; - -function TdxGridTableViewFormatter.GetViewWidth: Integer; -begin - Result := ItemPlaceController.Width; -end; - -function TdxGridTableViewFormatter.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := TcxGridColumn(FColumns[Index]); -end; - -function TdxGridTableViewFormatter.GetColumnCount: Integer; -begin - Result := FColumns.Count; -end; - -function TdxGridTableViewFormatter.GetGroupRowSeparatorColor: TColor; -begin - Result := Adapter.GroupRowSeparatorColor; -end; - -function TdxGridTableViewFormatter.GetGroupRowSeparatorThickness: Integer; -begin - Result := Adapter.GroupRowSeparatorThickness; -end; - -function TdxGridTableViewFormatter.GetHasPreview: Boolean; -begin - Result := Adapter.HasPreview and ShowPreview and - (PreviewAutoHeight or (PreviewMaxLineCount > 0)); -end; - -function TdxGridTableViewFormatter.GetHeaderLineCount: Integer; -begin - Result := ItemPlaceController.HeaderLineCount; -end; - -function TdxGridTableViewFormatter.GetPreviewAutoHeight: Boolean; -begin - Result := ReportLink.OptionsPreview.AutoHeight; -end; - -function TdxGridTableViewFormatter.GetPreviewColumn: TcxGridColumn; -begin - Result := Adapter.PreviewColumn; -end; - -function TdxGridTableViewFormatter.GetPreviewMaxLineCount: Integer; -begin - Result := ReportLink.OptionsPreview.MaxLineCount; -end; - -function TdxGridTableViewFormatter.GetRow(Index: Integer): TcxCustomGridRow; -begin - Result := inherited Records[Index] as TcxCustomGridRow; -end; - -function TdxGridTableViewFormatter.GetRowCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridTableViewFormatter.GetRowHeight(Index: Integer): Integer; -begin - Result := Integer(FRowHeights[Index]) -end; - -function TdxGridTableViewFormatter.GetRowHeightByRow(Row: TcxCustomGridRow): Integer; -begin - Result := {20;//}RowHeights[RecordIndexes[Row]]; -end; - -function TdxGridTableViewFormatter.GetRowSeparatorColor: TColor; -begin - Result := Adapter.RowSeparatorColor; - {with ReportLink.OptionsFormatting do - if UseNativeStyles then - begin - Result := FixedColor; - end;} -end; - -function TdxGridTableViewFormatter.GetRowSeparatorThickness: Integer; -begin - Result := Adapter.RowSeparatorThickness; -end; - -function TdxGridTableViewFormatter.GetShowGroupFooters: Boolean; -begin - Result := ReportLink.OptionsView.GroupFooters; -end; - -function TdxGridTableViewFormatter.GetShowFooters: Boolean; -begin - Result := ReportLink.OptionsView.Footers; -end; - -function TdxGridTableViewFormatter.GetShowHeaders: Boolean; -begin - Result := ReportLink.OptionsView.Headers; -end; - -function TdxGridTableViewFormatter.GetShowPreview: Boolean; -begin - Result := ReportLink.OptionsPreview.Visible; -end; - -procedure TdxGridTableViewFormatter.SetRowHeight(Index: Integer; Value: Integer); -begin - FRowHeights[Index] := TObject(Value); -end; - -procedure TdxGridTableViewFormatter.SetRowHeightByRow(Row: TcxCustomGridRow; Value: Integer); -begin - RowHeights[IndexOfRecord(Row)] := Value; -end; - -{ TdxGridTableViewBuilder } - -function TdxGridTableViewBuilder.Adapter: TdxGridTableViewAdapter; -begin - Result := inherited Adapter as TdxGridTableViewAdapter; -end; - -class function TdxGridTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridTableViewAdapter; -end; - -function TdxGridTableViewBuilder.Formatter: TdxGridTableViewFormatter; -begin - Result := inherited Formatter as TdxGridTableViewFormatter; -end; - -class function TdxGridTableViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxGridTableViewFormatter; -end; - -procedure TdxGridTableViewBuilder.AddDelimitersHardVert(AReportRow: TdxReportCell); -begin - ReportLink.FDelimitersHardVert.Add(TObject(AReportRow.AbsoluteRect.Top)); -end; - -procedure TdxGridTableViewBuilder.DoBuildViewBody; -begin - if Formatter.ShowHeaders then CreateHeader; - CreateRows; - if not IsAborted and Formatter.ShowFooters then - CreateFooter; -end; - -procedure TdxGridTableViewBuilder.DoBuildViewFooter; -begin - inherited; - if not Formatter.HasDetailsSeparator then CreateViewTerminator; -end; - -procedure TdxGridTableViewBuilder.CreateDetails(AMasterRow: TcxGridMasterDataRow); -var - CurrentView: TcxCustomGridView; -begin - if AMasterRow.ActiveDetailGridView <> nil then - if ReportLink.OptionsLevels.Unwrap then - begin - ProcessedView := nil; - try - if ReportLink.OptionsLevels.RiseActiveLevelOntoTop then - begin - CurrentView := AMasterRow.ActiveDetailGridView; - CreateDetailView(CurrentView); - ProcessedView := CurrentView; - end; - ReportLink.ForEachView(AMasterRow, CreateDetailView); - finally - ProcessedView := nil; - end; - end - else - CreateDetailView(AMasterRow.ActiveDetailGridView); -end; - -procedure TdxGridTableViewBuilder.CreateDetailView(AGridView: TcxCustomGridView); -begin - if AGridView <> ProcessedView then ReportLink.BuildView(Self, AGridView); -end; - -function TdxGridTableViewBuilder.GetAreDetailsBuilt: Boolean; -begin - with ReportLink.OptionsDetails do - Result := not StartFromFocusedView or not OnlyFocusedView; -end; - -procedure TdxGridTableViewBuilder.CreateFooter; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetFootersProducer.Produce(HostInfoServices.FootersHostInfo); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetFootersProducer: TdxGridTableViewFootersProducer; -begin - Result := ProducerCache[GetFootersProducerClass] as TdxGridTableViewFootersProducer; -end; - -function TdxGridTableViewBuilder.GetFootersProducerClass: TdxGridTableViewFootersProducerClass; -begin - Result := TdxGridTableViewFootersProducer; -end; - -procedure TdxGridTableViewBuilder.CreateGroupFooters(AGridRow: TcxCustomGridRow); -var - Producer: TdxGridTableViewGroupFooterProducer; - HostInfo: TdxGridAttributeHostInfo; - Index, I: Integer; - ReportRow: TdxReportCell; -begin - Producer := GetGroupFooterProducer; - HostInfo := HostInfoServices.PageDetailsHostInfo; - Index := 0; - for I := 0 to AGridRow.Level do - if Adapter.HasGroupFooter(AGridRow, I) then - begin - ReportRow := Producer.Produce(HostInfo, AGridRow, AGridRow.Level - I, Index); - AddReportRow(ReportRow); - Inc(Index); - end; -end; - -function TdxGridTableViewBuilder.GetGroupFooterProducer: TdxGridTableViewGroupFooterProducer; -begin - Result := ProducerCache[GetGroupFooterProducerClass] as TdxGridTableViewGroupFooterProducer; -end; - -function TdxGridTableViewBuilder.GetGroupFooterProducerClass: TdxGridTableViewGroupFooterProducerClass; -begin - Result := TdxGridTableViewGroupFooterProducer; -end; - -procedure TdxGridTableViewBuilder.CreateHeader; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetHeadersProducer.Produce(HostInfoServices.HeadersHostInfo); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetHeadersProducer: TdxGridTableViewHeadersProducer; -begin - Result := ProducerCache[GetHeadersProducerClass] as TdxGridTableViewHeadersProducer; -end; - -function TdxGridTableViewBuilder.GetHeadersProducerClass: TdxGridTableViewHeadersProducerClass; -begin - Result := TdxGridTableViewHeadersProducer; -end; - -procedure TdxGridTableViewBuilder.CreateRow(AGridRow: TcxCustomGridRow; ARowIndex: Integer); -var - ReportRow: TdxReportCell; -begin - ReportRow := GetRowProducer(AGridRow).Produce(HostInfoServices.PageDetailsHostInfo, AGridRow, ARowIndex); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetRowProducer(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducer; -begin - Result := ProducerCache[GetRowProducerClass(AGridRow)] as TdxGridTableViewCustomDataRowProducer; -end; - -procedure TdxGridTableViewBuilder.CreateRows; -var - PrevGridRow, GridRow: TcxCustomGridRow; - I: Integer; - HasGroupDelimiter: Boolean; -begin - PrevGridRow := nil; - for I := 0 to Formatter.RowCount - 1 do - begin - GridRow := Formatter.Rows[I]; - - if (ShowRowSeparators and (I > 0)) and (not (PrevGridRow is TcxGridGroupRow) or not ShowGroupRowSeparators) then - CreateRowSeparator(GridRow, False); - - HasGroupDelimiter := Formatter.PaginateByTopLevelGroups and (I > 0) and - (GridRow.Level = 0) and (GridRow is TcxGridGroupRow); - - CreateRow(GridRow, I); - - // Hard Delimiters - if HasGroupDelimiter then - AddDelimitersHardVert(LastReportRow); - - if AreDetailsBuilt and Adapter.HasDetails(GridRow) then - CreateDetails(GridRow as TcxGridMasterDataRow); - - if ShowGroupRowSeparators and (GridRow is TcxGridGroupRow) then - CreateGroupRowSeparator(TcxGridGroupRow(GridRow)); - - if Formatter.ShowGroupFooters and Adapter.HasGroupFooters(GridRow) then - CreateGroupFooters(GridRow); - - // Last Row Separator - if (ShowRowSeparators and (I = Formatter.RowCount - 1)) and (not (GridRow is TcxGridGroupRow) or not ShowGroupRowSeparators) then - CreateRowSeparator(GridRow, True); - - // Progress - if MasterBuilder = nil then - begin - Progress(100 * (I + 1) / Formatter.RowCount); - if IsAborted then Break; - end; - - PrevGridRow := GridRow; - end; -end; - -function TdxGridTableViewBuilder.GetRowProducerClass(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducerClass; -begin - Result := Adapter.RecordHelpers[AGridRow].ProducerClass; -end; - -procedure TdxGridTableViewBuilder.CreateRowSeparator(AGridRow: TcxCustomGridRow; - AnIsLast: Boolean = False); -var - ReportRow: TdxReportCell; -begin - ReportRow := GetRowSeparatorProducer.Produce(HostInfoServices.PageDetailsHostInfo, AGridRow, AnIsLast); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetRowSeparatorProducer: TdxGridTableViewRowSeparatorProducer; -begin - Result := ProducerCache[GetRowSeparatorProducerClass] as TdxGridTableViewRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetRowSeparatorProducerClass: TdxGridTableViewRowSeparatorProducerClass; -begin - Result := TdxGridTableViewRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetShowRowSeparators: Boolean; -begin - Result := Adapter.HasRowSeparators; -end; - -procedure TdxGridTableViewBuilder.CreateGroupRowSeparator(AGridRow: TcxGridGroupRow); -var - ReportRow: TdxReportCell; -begin - ReportRow := GetGroupRowSeparatorProducer.Produce(HostInfoServices.PageDetailsHostInfo, AGridRow); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetGroupRowSeparatorProducer: TdxGridTableViewGroupRowSeparatorProducer; -begin - Result := ProducerCache[GetGroupRowSeparatorProducerClass] as TdxGridTableViewGroupRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetGroupRowSeparatorProducerClass: TdxGridTableViewGroupRowSeparatorProducerClass; -begin - Result := TdxGridTableViewGroupRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetShowGroupRowSeparators: Boolean; -begin - Result := Adapter.IsOffice11StyleGrouping; -end; - -function TdxGridTableViewBuilder.GridView: TcxGridTableView; -begin - Result := inherited GridView as TcxGridTableView; -end; - -class function TdxGridTableViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridTableView; -end; - -function TdxGridTableViewBuilder.GetLastReportRow: TdxReportCell; -begin - Result := ReportRows[ReportRowCount - 1]; -end; - -function TdxGridTableViewBuilder.GetProcessedView: TcxCustomGridView; -begin - Result := ReportLink.FProcessedView; -end; - -procedure TdxGridTableViewBuilder.SetProcessedView(Value: TcxCustomGridView); -begin - ReportLink.FProcessedView := Value; -end; - -{ TdxGridDBTableViewAdapter } - -function TdxGridDBTableViewAdapter.GridView: TcxGridDBTableView; -begin - Result := inherited GridView as TcxGridDBTableView; -end; - -class function TdxGridDBTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridDBTableView; -end; - -procedure TdxGridDBTableViewAdapter.AfterBuilding; -begin - UnloadAllRecords; - inherited; -end; - -procedure TdxGridDBTableViewAdapter.BeforeBuilding; -begin - inherited; - LoadAllRecords; -end; - -function TdxGridDBTableViewAdapter.DataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(inherited DataController); -end; - -function TdxGridDBTableViewAdapter.DBDataModeController: TcxDBDataModeController; -begin - Result := DataController.DataModeController; -end; - -procedure TdxGridDBTableViewAdapter.LoadAllRecords; -begin - _LoadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -procedure TdxGridDBTableViewAdapter.UnloadAllRecords; -begin - _UnloadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -{ TdxGridDBTableViewBuilder } - -function TdxGridDBTableViewBuilder.Adapter: TdxGridDBTableViewAdapter; -begin - Result := inherited Adapter as TdxGridDBTableViewAdapter; -end; - -class function TdxGridDBTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridDBTableViewAdapter; -end; - -{ TdxGridBandedTableViewAdapter } - -constructor TdxGridBandedTableViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited; - FFooterLineCount := -1; -end; - -function TdxGridBandedTableViewAdapter.GridView: TcxGridBandedTableView; -begin - Result := inherited GridView as TcxGridBandedTableView; -end; - -class function TdxGridBandedTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridBandedTableView; -end; - -function TdxGridBandedTableViewAdapter.Styles: TcxGridBandedTableViewStyles; -begin - Result := inherited Styles as TcxGridBandedTableViewStyles; -end; - -function TdxGridBandedTableViewAdapter.CalculateDetailsLineCount: Integer; -var - I, J, V: Integer; - BandRows: TcxGridBandRows; -begin - Result := 0; - for I := 0 to BottomBandCount - 1 do - begin - BandRows := BottomBands[I].Rows; - V := 0; - for J := 0 to BandRows.VisibleCount - 1 do - Inc(V, BandRows[J].LineCount); - if Result < V then Result := V; - end; -end; - -function TdxGridBandedTableViewAdapter.CalculateFooterLineCount: Integer; -var - I, V: Integer; -begin - Result := 0; - for I := 0 to BottomBandCount - 1 do - begin - V := BottomBands[I].Rows.VisibleCount; - if Result < V then Result := V; - end; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderHeight: Integer; -begin - Result := GridView.OptionsView.BandHeaderHeight; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderHeightAssigned: Boolean; -begin - Result := BandHeaderHeight <> 0; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderViewParams(ABand: TcxGridBand): TcxViewParams; -begin - if (ABand <> nil) and (ABand.Styles <> nil) then - ABand.Styles.GetHeaderParams(Result) - else - Styles.GetBandHeaderParams(ABand, Result); - if ABand = nil then - Result.Color := LookAndFeelPainter.DefaultHeaderBackgroundColor -end; - -function TdxGridBandedTableViewAdapter.GetDataRowHeightAssigned: Boolean; -begin - Result := (DetailsLineCount = 1) and inherited GetDataRowHeightAssigned; -end; - -function TdxGridBandedTableViewAdapter.GetFooterHeightAssigned: Boolean; -begin - Result := (FooterLineCount = 1) and inherited GetFooterHeightAssigned; -end; - -function TdxGridBandedTableViewAdapter.GetHeaderHeightAssigned: Boolean; -begin - Result := (DetailsLineCount = 1) and inherited GetHeaderHeightAssigned; -end; - -function TdxGridBandedTableViewAdapter.GetHeaderMultiline(Column: TcxGridColumn): Boolean; -begin - Result := ((DetailsLineCount = 1) and inherited GetHeaderMultiline(Column)) or - (TcxGridBandedColumn(Column).Position.LineCount > 1); {PS 3.01} -end; - -function TdxGridBandedTableViewAdapter.GetRowLineCount: Integer; -begin - Result := CalculateFooterLineCount; -end; - -function TdxGridBandedTableViewAdapter.GetBand(Index: Integer): TcxGridBand; -begin - Result := GridView.Bands.VisibleItems[Index]; -end; - -function TdxGridBandedTableViewAdapter.GetBandCount: Integer; -begin - Result := GridView.Bands.VisibleCount; -end; - -function TdxGridBandedTableViewAdapter.GetBandEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.BandHeaderEndEllipsis; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderLineCount: Integer; -begin - Result := GridView.OptionsView.BandHeaderLineCount; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderMultiline: Boolean; -begin - Result := BandHeaderHeightAssigned;// or (BandHeaderLineCount > 1); {!!! v3.03} -end; - -function TdxGridBandedTableViewAdapter.GetBottomBand(Index: Integer): TcxGridBand; -begin - {$IFDEF DXVER500} - Result := GridView.Bands.VisibleBottomItems[Index]; - {$ELSE} - Result := GridView.Bands.VisibleItems[Index]; - {$ENDIF} -end; - -function TdxGridBandedTableViewAdapter.GetBottomBandCount: Integer; -begin - {$IFDEF DXVER500} - Result := GridView.Bands.VisibleBottomItemCount; - {$ELSE} - Result := GridView.Bands.VisibleCount; - {$ENDIF} -end; - -function TdxGridBandedTableViewAdapter.GetColumn(Index: Integer): TcxGridBandedColumn; -begin - Result := GridView.VisibleColumns[Index]; -end; - -function TdxGridBandedTableViewAdapter.GetFooterLineCount: Integer; -begin - if FFooterLineCount = -1 then - FFooterLineCount := CalculateFooterLineCount; - Result := FFooterLineCount; -end; - -function TdxGridBandedTableViewAdapter.GetRootBand(Index: Integer): TcxGridBand; -begin - {$IFDEF DXVER500} - Result := GridView.Bands.VisibleRootItems[Index]; - {$ELSE} - Result := GridView.Bands.VisibleItems[Index]; - {$ENDIF} -end; - -function TdxGridBandedTableViewAdapter.GetRootBandCount: Integer; -begin - {$IFDEF DXVER500} - Result := GridView.Bands.VisibleRootItemCount; - {$ELSE} - Result := GridView.Bands.VisibleCount; - {$ENDIF} -end; - -function TdxGridBandedTableViewAdapter.GetThemedBandHeaderItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderColor; -end; - -function TdxGridBandedTableViewAdapter.GetThemedBandHeaderItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderTextColor; -end; - -{ TdxGridBandedTableViewColumnPlace } - -function TdxGridBandedTableViewColumnPlace.GetLineCount: Integer; -begin - Result := Column.Position.LineCount; -end; - -function TdxGridBandedTableViewColumnPlace.GetRowIndex: Integer; -begin - Result := Column.Position.Row.LineOffset; -end; - -function TdxGridBandedTableViewColumnPlace.GetColumn: TcxGridBandedColumn; -begin - Result := inherited Column as TcxGridBandedColumn; -end; - -function TdxGridBandedTableViewColumnPlace.GetController: TdxCustomGridBandedTableViewItemPlace; -begin - Result := inherited Controller as TdxCustomGridBandedTableViewItemPlace; -end; - -function TdxGridBandedTableViewColumnPlace.GetFormatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -{ TdxCustomGridBandedTableViewItemPlace } - -constructor TdxCustomGridBandedTableViewItemPlace.Create(AController: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); -begin - inherited Create(AController.Formatter); - FController := AController; - FParent := AParent; - FBand := ABand; - - FHeight := -1; - FLeftBound := -1; - FMinWidth := -1; - FTopBound := -1; -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateHeaderLineCount: Integer; -var - I: Integer; -begin - Result := 0; - with Band.Rows do - for I := 0 to VisibleCount - 1 do - Inc(Result, VisibleItems[I].LineCount); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateWidth: Integer; - - function FixedSize: Boolean; - var - I: Integer; - begin - Result := False; - for I := 0 to Band.ColumnCount - 1 do - Result := Result or not Band.Columns[I].Options.HorzSizing; - end; - -begin - if FixedSize then - Result := Max(Band.Width, InternalCalculateWidth) - else - begin - Result := Band.Width; - if Result = 0 then - Result := InternalCalculateWidth - end; - if Result = 0 then - Result := cxGridBandedTableView.cxGridDefaultEmptyBandWidth; - if Result < InternalCalculateMinWidth then - Result := InternalCalculateMinWidth; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; -begin - Result := TdxGridBandedTableViewColumnPlace; -end; - -procedure TdxCustomGridBandedTableViewItemPlace.AssignWidth; -begin - Width := Width; -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateHeight: Integer; -begin - Result := Controller.CalculateItemHeight(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateLevelHeight: Integer; -begin - if Adapter.BandHeaderHeightAssigned then - Result := Adapter.BandHeaderHeight - else - Result := CalculateLineHeight * Adapter.BandHeaderLineCount; -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateLineHeight: Integer; -begin - Result := 0; - Formatter.CalculateHeight(ViewParams, Result); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateMinWidth: Integer; -begin - Result := InternalCalculateMinWidth; - {$IFDEF DXVER500} - if Result < Band.MinWidth then Result := Band.MinWidth; - {$ENDIF} -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateLeftBound: Integer; -begin - Result := Controller.CalculateItemLeftBound(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateTopBound: Integer; -begin - Result := Controller.CalculateItemTopBound(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.GetRowCount: Integer; -begin - Result := 0; -end; - -function TdxCustomGridBandedTableViewItemPlace.InternalCalculateMinWidth: Integer; -begin - Result := 0; -end; - -function TdxCustomGridBandedTableViewItemPlace.InternalCalculateWidth: Integer; -begin - Result := 0; -end; - -procedure TdxCustomGridBandedTableViewItemPlace.InitAutoWidthItem(AnItem: TcxAutoWidthItem); -begin - AnItem.Fixed := IsFixed; - AnItem.MinWidth := MinWidth; - AnItem.Width := Width; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetAdapter: TdxGridBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridBandedTableViewAdapter; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetBounds: TRect; -begin - Result := MakeBounds(LeftBound, TopBound, Width, Height); -end; - -function TdxCustomGridBandedTableViewItemPlace.GetFormatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetHeight: Integer; -begin - if FHeight = -1 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetIndex: Integer; -begin - if Parent <> nil then - Result := Parent.IndexOf(Self) - else - Result := Controller.RootIndexOf(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.GetIsFixed: Boolean; -begin - Result := not Band.Options.Sizing; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetLeftBound: Integer; -begin - if FLeftBound = -1 then - FLeftBound := CalculateLeftBound; - Result := FLeftBound; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetLevelIndex: Integer; -begin - {$IFDEF DXVER500} - Result := Band.BandLevelIndex; - {$ELSE} - Result := 0; - {$ENDIF} -end; - -function TdxCustomGridBandedTableViewItemPlace.GetMinWidth: Integer; -begin - if FMinWidth = -1 then - FMinWidth := CalculateMinWidth; - Result := FMinWidth; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetTopBound: Integer; -begin - if FTopBound = -1 then - FTopBound := CalculateTopBound; - Result := FTopBound; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetViewParams: TdxReportItemViewParams; -begin - Result := Formatter.GetBandItemViewParams(Band); -end; - -{ TdxGridBandedTableViewItemPlace } - -constructor TdxGridBandedTableViewItemPlace.Create(AnOwner: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); -begin - inherited; - FChildItems := TList.Create; -end; - -destructor TdxGridBandedTableViewItemPlace.Destroy; -begin - FreeAndNil(FChildItems); - inherited; -end; - -function TdxGridBandedTableViewItemPlace.IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -begin - Result := FChildItems.IndexOf(AnItem); -end; - -{$IFDEF DXVER500} -procedure TdxGridBandedTableViewItemPlace.Refresh; -begin - inherited; - RefreshChildItems; -end; -{$ENDIF} - -function TdxGridBandedTableViewItemPlace.GetRowCount: Integer; -begin - Result := 1; -end; - -function TdxGridBandedTableViewItemPlace.InternalCalculateMinWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ChildItemCount - 1 do - Inc(Result, ChildItems[I].MinWidth); -end; - -function TdxGridBandedTableViewItemPlace.InternalCalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ChildItemCount - 1 do - Inc(Result, ChildItems[I].Width); -end; - -procedure TdxGridBandedTableViewItemPlace.WidthChanged; -begin - inherited; - CalculateChildItemWidths; -end; - -procedure TdxGridBandedTableViewItemPlace.CalculateChildItemWidths; -var - AutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AutoWidthObject := TcxAutoWidthObject.Create(ChildItemCount); - try - for I := 0 to ChildItemCount - 1 do - ChildItems[I].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := Width; - AutoWidthObject.Calculate; - - for I := 0 to ChildItemCount - 1 do - ChildItems[I].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; -end; - -{$IFDEF DXVER500} -procedure TdxGridBandedTableViewItemPlace.RefreshChildItems; -var - I: Integer; -begin - FChildItems.Count := Band.VisibleChildBandCount; - for I := 0 to FChildItems.Count - 1 do - begin - FChildItems[I] := Controller.ItemsByBand[Band.VisibleChildBands[I]]; - ChildItems[I].FParent := Self; - end; -end; -{$ENDIF} - -function TdxGridBandedTableViewItemPlace.GetChildItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := TdxCustomGridBandedTableViewItemPlace(FChildItems[Index]); -end; - -function TdxGridBandedTableViewItemPlace.GetChildItemCount: Integer; -begin - Result := FChildItems.Count; -end; - -{ TdxGridBandedTableViewBottomItemPlace } - -procedure TdxGridBandedTableViewBottomItemPlace.AddItems; -var - I, J: Integer; - Row: TcxGridBandRow; -begin - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - Row := Band.Rows.VisibleItems[I]; - for J := 0 to Row.VisibleCount - 1 do - CreateItem(Row.VisibleItems[J]); - end; -end; - -function TdxGridBandedTableViewBottomItemPlace.CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; -var - Row: TcxGridBandRow; - I: Integer; - Item: TdxGridTableViewColumnPlace; -begin - Result := LeftBound; - Row := TdxGridBandedTableViewColumnPlace(AnItem).Column.Position.Row; - for I := 0 to TdxGridBandedTableViewColumnPlace(AnItem).Column.Position.VisibleColIndex - 1 do - begin - Item := ItemsByColumn[Row.VisibleItems[I]]; - Inc(Result, Item.Width); - end; -end; - -procedure TdxGridBandedTableViewBottomItemPlace.CalculateItemsWidth; -var - I, J: Integer; - Row: TcxGridBandRow; - AutoWidthObject: TcxAutoWidthObject; - Column: TcxGridColumn; -begin - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - Row := Band.Rows.VisibleItems[I]; - AutoWidthObject := TcxAutoWidthObject.Create(Row.VisibleCount); - try - for J := 0 to Row.VisibleCount - 1 do - ItemsByColumn[Row.VisibleItems[J]].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := ItemsAvailableWidth; - AutoWidthObject.Calculate; - - for J := 0 to Row.VisibleCount - 1 do - begin - Column := Row.VisibleItems[J]; - ItemsByColumn[Column].Width := AutoWidthObject[J].AutoWidth; - end; - finally - AutoWidthObject.Free; - end; - end; -end; - -function TdxGridBandedTableViewBottomItemPlace.GetItemsAutoWidth: Boolean; -begin - Result := True; -end; - -function TdxGridBandedTableViewBottomItemPlace.GetItemsAvailableWidth: Integer; -begin - Result := Width; -end; - -function TdxGridBandedTableViewBottomItemPlace.GetRowCount: Integer; -begin - Result := Controller.LevelCount - LevelIndex; -end; - -function TdxGridBandedTableViewBottomItemPlace.InternalCalculateMinWidth: Integer; -var - I, V, J: Integer; - Row: TcxGridBandRow; - Column: TcxGridColumn; -begin - Result := 0; - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - V := 0; - Row := Band.Rows.VisibleItems[I]; - for J := 0 to Row.VisibleCount - 1 do - begin - Column := Row.VisibleItems[J]; - Inc(V, Adapter.InternalColumnMinWidths[Column]); - end; - //if Row.IsFirst then - // Inc(V, Formatter.IndentWidth * Formatter.IndentCount); - if Result < V then Result := V; - end -end; - -function TdxGridBandedTableViewBottomItemPlace.InternalCalculateWidth: Integer; -var - I, V, J: Integer; - Row: TcxGridBandRow; - Column: TcxGridColumn; -begin - Result := 0; - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - V := 0; - Row := Band.Rows.VisibleItems[I]; - for J := 0 to Row.VisibleCount - 1 do - begin - Column := Row.VisibleItems[J]; - Inc(V, Adapter.InternalColumnWidths[Column]); - end; - if Result < V then Result := V; - end; -end; - -procedure TdxGridBandedTableViewBottomItemPlace.WidthChanged; -begin - inherited; - CalculateItemsWidth; -end; - -{ TdxGridBandedTableViewItemPlaceController } - -constructor TdxGridBandedTableViewItemPlaceController.Create(AFormatter: TdxGridTableViewFormatter); -begin - inherited; - FBottomItems := TList.Create; - FItems := TList.Create; - FRootItems := TList.Create; - FLevelHeights := TList.Create; - - FHeight := -1; - FLevelCount := -1; -end; - -destructor TdxGridBandedTableViewItemPlaceController.Destroy; -begin - FreeAndNil(FLevelHeights); - FreeAndNil(FRootItems); - FreeAndNilItems; - FreeAndNil(FBottomItems); - inherited; -end; - -procedure TdxGridBandedTableViewItemPlaceController.Calculate; -begin - CalculateLevelHeights; - CalculateItemWidths; -end; - -procedure TdxGridBandedTableViewItemPlaceController.Refresh; -begin - ClearItems; - AddItems; - RefreshRootItems; - RefreshBottomItems; - RefreshItems; -end; - -function TdxGridBandedTableViewItemPlaceController.IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -begin - Result := FItems.IndexOf(AnItem); -end; - -function TdxGridBandedTableViewItemPlaceController.IndexOf(ABand: TcxGridBand): Integer; -begin - for Result := 0 to ItemCount - 1 do - if Items[Result].Band = ABand then - Exit; - Result := -1; -end; - -function TdxGridBandedTableViewItemPlaceController.RootIndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -begin - Result := FRootItems.IndexOf(AnItem); -end; - -function TdxGridBandedTableViewItemPlaceController.RootIndexOf(ABand: TcxGridBand): Integer; -begin - for Result := 0 to RootItemCount - 1 do - if RootItems[Result].Band = ABand then - Exit; - Result := -1; -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateHeaderLineCount: Integer; -var - I, V: Integer; -begin - Result := -1; - for I := 0 to BottomItemCount - 1 do - begin - V := BottomItems[I].HeaderLineCount; - if Result < V then Result := V; - end; -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RootItemCount - 1 do - Inc(Result, RootItems[I].Width); -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; -var - BandPlace: TdxCustomGridBandedTableViewItemPlace; -begin - BandPlace := ItemsByBand[TcxGridBandedColumn(Column).Position.Band]; - if BandPlace <> nil then - Result := BandPlace.ItemsByColumn[Column] - else - Result := nil; -end; - -procedure TdxGridBandedTableViewItemPlaceController.AddItems; -var - I: Integer; -begin - FItems.Count := Formatter.BandCount; - for I := 0 to ItemCount - 1 do - FItems[I] := CreateItem(Formatter.Bands[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateHeight: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to LevelCount - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateItemHeight(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := AnItem.LevelIndex to AnItem.LevelIndex + AnItem.RowCount - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateItemLeftBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -var - I: Integer; -begin - if AnItem.Parent <> nil then - begin - Result := AnItem.Parent.LeftBound; - for I := 0 to AnItem.Index - 1 do - Inc(Result, AnItem.Parent.ChildItems[I].Width); - end - else - begin - Result := 0; - for I := 0 to AnItem.Index - 1 do - Inc(Result, RootItems[I].Width); - end; -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateItemTopBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AnItem.LevelIndex - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateLevelCount: Integer; -var - I, V: Integer; -begin - Result := 0; - if ItemCount <> 0 then - begin - for I := 0 to ItemCount - 1 do - begin - V := Items[I].LevelIndex; - if Result < V then Result := V; - end; - Inc(Result); - end; -end; - -procedure TdxGridBandedTableViewItemPlaceController.CalculateItemWidths; -var - I: Integer; - AutoWidthObject: TcxAutoWidthObject; -begin - for I := 0 to RootItemCount - 1 do - RootItems[I].AssignWidth; - - if AutoWidth then - begin - AutoWidthObject := TcxAutoWidthObject.Create(RootItemCount); - try - for I := 0 to RootItemCount - 1 do - RootItems[I].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := AvailableWidth; - AutoWidthObject.Calculate; - - for I := 0 to RootItemCount - 1 do - RootItems[I].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; - end; -end; - -procedure TdxGridBandedTableViewItemPlaceController.CalculateLevelHeights; -var - I, V: Integer; - Item: TdxCustomGridBandedTableViewItemPlace; -begin - FLevelHeights.Count := LevelCount; - for I := 0 to ItemCount - 1 do - begin - Item := Items[I]; - V := Item.CalculateLevelHeight; - if LevelHeights[Item.LevelIndex] < V then - LevelHeights[Item.LevelIndex] := V; - end; -end; - -procedure TdxGridBandedTableViewItemPlaceController.ClearItems; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].Free; - FItems.Clear; -end; - -function TdxGridBandedTableViewItemPlaceController.CreateItem(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; -begin - Result := GetItemClass(ABand).Create(Self, nil, ABand); -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemClass(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlaceClass; -begin - {$IFDEF DXVER500} - if ABand.IsBottom then - Result := TdxGridBandedTableViewBottomItemPlace - else - Result := TdxGridBandedTableViewItemPlace; - {$ELSE} - Result := TdxGridBandedTableViewBottomItemPlace; - {$ENDIF} -end; - -procedure TdxGridBandedTableViewItemPlaceController.RefreshBottomItems; -var - I: Integer; -begin - FBottomItems.Count := Adapter.BottomBandCount; - for I := 0 to BottomItemCount - 1 do - FBottomItems[I] := ItemsByBand[Adapter.BottomBands[I]]; -end; - -procedure TdxGridBandedTableViewItemPlaceController.RefreshItems; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].Refresh; -end; - -procedure TdxGridBandedTableViewItemPlaceController.RefreshRootItems; -var - I: Integer; -begin - FRootItems.Count := Adapter.RootBandCount; - for I := 0 to RootItemCount - 1 do - FRootItems[I] := ItemsByBand[Adapter.RootBands[I]]; -end; - -function TdxGridBandedTableViewItemPlaceController.GetAdapter: TdxGridBandedTableViewAdapter; -begin - Result := Formatter.Adapter; -end; - -function TdxGridBandedTableViewItemPlaceController.GetAutoWidth: Boolean; -begin - Result := Formatter.AutoWidth; -end; - -function TdxGridBandedTableViewItemPlaceController.GetAvailableWidth: Integer; -begin - Result := Formatter.ViewAvailableWidth; -end; - -function TdxGridBandedTableViewItemPlaceController.GetBottomItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := TdxCustomGridBandedTableViewItemPlace(FBottomItems[Index]); -end; - -function TdxGridBandedTableViewItemPlaceController.GetBottomItemCount: Integer; -begin - Result := FBottomItems.Count; -end; - -function TdxGridBandedTableViewItemPlaceController.GetFormatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -function TdxGridBandedTableViewItemPlaceController.GetHeight: Integer; -begin - if FHeight = -1 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TdxGridBandedTableViewItemPlaceController.GetItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := TdxCustomGridBandedTableViewItemPlace(FItems[Index]); -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemByBand(Band: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; -var - Index: Integer; -begin - Index := IndexOf(Band); - if Index <> -1 then - Result := Items[IndexOf(Band)] - else - Result := nil; -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxGridBandedTableViewItemPlaceController.GetLevelCount: Integer; -begin - if FLevelCount = -1 then - FLevelCount := CalculateLevelCount; - Result := FLevelCount; -end; - -function TdxGridBandedTableViewItemPlaceController.GetLevelHeight(Index: Integer): Integer; -begin - Result := Integer(FLevelHeights[Index]); -end; - -function TdxGridBandedTableViewItemPlaceController.GetRootItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := TdxCustomGridBandedTableViewItemPlace(FRootItems[Index]); -end; - -function TdxGridBandedTableViewItemPlaceController.GetRootItemCount: Integer; -begin - Result := FRootItems.Count; -end; - -procedure TdxGridBandedTableViewItemPlaceController.SetLevelHeight(Index: Integer; Value: Integer); -begin - FLevelHeights[Index] := TObject(Value); -end; - -procedure TdxGridBandedTableViewItemPlaceController.FreeAndNilItems; -begin - ClearItems; - FreeAndNil(FItems); -end; - -{ TdxGridBandedTableViewFormatter } - -constructor TdxGridBandedTableViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FBands := TList.Create; -end; - -destructor TdxGridBandedTableViewFormatter.Destroy; -begin - FreeAndNil(FBands); - inherited; -end; - -function TdxGridBandedTableViewFormatter.Adapter: TdxGridBandedTableViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridBandedTableViewFormatter.Builder: TdxGridBandedTableViewBuilder; -begin - Result := inherited Builder as TdxGridBandedTableViewBuilder; -end; - -procedure TdxGridBandedTableViewFormatter.DoInitializeBandItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Band: TcxGridBand; -begin - Band := Bands[AnIndex]; - SetViewParams(AnItem, GetBandItemViewParams(Band)); - if HasBackgroundBitmap(bbBandHeader) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbBandHeader); - - RegisterLookAndFeelItem(AnItem, cesRaised); - - with AnItem as TdxReportCellString do - begin - Data := Integer(Band); - EndEllipsis := Adapter.BandEndEllipsis; - Multiline := Adapter.BandHeaderMultiline; - Text := Band.Caption; - TextAlignX := TextAlignXMap[Band.HeaderAlignmentHorz]; - TextAlignY := TextAlignYMap[Band.HeaderAlignmentVert]; - //Transparent := False; {!!! v3.03} - end; -end; - -procedure TdxGridBandedTableViewFormatter.DoInitializeBandRow(ARow: TdxReportCell); -begin - SetViewParams(ARow, GetBandItemViewParams(nil)); - ARow.Transparent := True; //??? -end; - -procedure TdxGridBandedTableViewFormatter.DoReportLinkInitializeBandItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - ReportLink.DoInitializeBandCell(Adapter.GridView, Bands[AnIndex], TdxReportCellString(AnItem)); -end; - -function TdxGridBandedTableViewFormatter.GetBandItemBounds(AnIndex: Integer): TRect; -var - Item: TdxCustomGridBandedTableViewItemPlace; -begin - Item := ItemPlaceController.ItemsByBand[Bands[AnIndex]]; - if Item <> nil then - Result := Item.Bounds - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridBandedTableViewFormatter.GetBandItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridBandedTableViewFormatter.GetBandItemViewParams(ABand: TcxGridBand): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetBandHeaderParams(ABand, Result.NativeParams) - else - Result.NativeParams := Adapter.GetBandHeaderViewParams(ABand); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if ABand <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedBandHeaderItemColor; - Result.NativeParams.TextColor := Adapter.ThemedBandHeaderItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := False; -end; - -procedure TdxGridBandedTableViewFormatter.AddHorizontalDelimiters; -var - Origin, I: Integer; - R: TRect; - Item: TdxCustomGridBandedTableViewItemPlace; -begin - if ReportLink.OptionsPagination.Band then - begin - Origin := ViewWidthExtraBefore; - for I := 0 to BandCount - 1 do - begin - Item := ItemPlaceController.ItemsByBand[Bands[I]]; - if Item <> nil then - begin - R := Item.Bounds; - ReportLink.AddHorizontalDelimiter(Origin + R.Left); - ReportLink.AddHorizontalDelimiter(Origin + R.Right); - end; - end; - end; - inherited; -end; - -{$IFDEF DXVER500} -function TdxGridBandedTableViewFormatter.CanColumnCellMerging(AColumn: TcxGridColumn): Boolean; -begin - Result := inherited CanColumnCellMerging(AColumn) and - (TcxGridBandedColumn(AColumn).Position.LineCount = ItemPlaceController.HeaderLineCount); -end; - -function TdxGridBandedTableViewFormatter.IsColumnActuallyVisible(AColumn: TcxGridColumn): Boolean; -begin - Result := inherited IsColumnActuallyVisible(AColumn) and - TcxGridBandedColumn(AColumn).Position.Band.ActuallyVisible; -end; -{$ENDIF} - -function TdxGridBandedTableViewFormatter.GetAlignSummaryWithColumns: Boolean; -begin - Result := inherited GetAlignSummaryWithColumns and HeadersSingleLine; -end; - -function TdxGridBandedTableViewFormatter.GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; -begin - Result := TdxGridBandedTableViewItemPlaceController; -end; - -procedure TdxGridBandedTableViewFormatter.BuildBandList; -var - I: Integer; - Band: TcxGridBand; -begin - FBands.Clear; - for I := 0 to Adapter.BandCount - 1 do - begin - Band := Adapter.Bands[I]; - if IsBandActuallyVisible(Band) then FBands.Add(Band); - end; -end; - -procedure TdxGridBandedTableViewFormatter.BuildItemLists; -var - I: Integer; -begin - BuildBandList; - inherited; - FHeadersSingleLine := True; - for I := 0 to ColumnCount - 1 do - begin - FHeadersSingleLine := FHeadersSingleLine and - (Columns[I].Position.RowIndex = 0); - end; -end; - -function TdxGridBandedTableViewFormatter.IsBandActuallyVisible(ABand: TcxGridBand): Boolean; -begin - {$IFDEF DXVER500} - Result := ABand.ActuallyVisible; - {$ELSE} - Result := True; - {$ENDIF} -end; - -function TdxGridBandedTableViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbBandHeader: - Result := vspsGridBandHeader; - else - Result := 0; - end; - - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -function TdxGridBandedTableViewFormatter.GetBand(Index: Integer): TcxGridBand; -begin - Result := TcxGridBand(FBands[Index]); -end; - -function TdxGridBandedTableViewFormatter.GetBandCount: Integer; -begin - Result := FBands.Count; -end; - -function TdxGridBandedTableViewFormatter.GetColumn(Index: Integer): TcxGridBandedColumn; -begin - Result := inherited Columns[Index] as TcxGridBandedColumn; -end; - -function TdxGridBandedTableViewFormatter.GetItemPlaceController: TdxGridBandedTableViewItemPlaceController; -begin - Result := inherited ItemPlaceController as TdxGridBandedTableViewItemPlaceController; -end; - -function TdxGridBandedTableViewFormatter.GetShowBandHeaders: Boolean; -begin - Result := ReportLink.OptionsView.BandHeaders; -end; - -{ TdxGridBandedTableViewBuilder } - -function TdxGridBandedTableViewBuilder.Adapter: TdxGridBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridBandedTableViewAdapter; -end; - -class function TdxGridBandedTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridBandedTableViewAdapter; -end; - -function TdxGridBandedTableViewBuilder.Formatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -class function TdxGridBandedTableViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxGridBandedTableViewFormatter; -end; - -procedure TdxGridBandedTableViewBuilder.DoBuildViewBody; -begin - if Formatter.ShowBandHeaders then CreateBands; - if Formatter.ShowHeaders then CreateHeader; - CreateRows; - if Formatter.ShowFooters then CreateFooter; -end; - -procedure TdxGridBandedTableViewBuilder.CreateBands; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetBandsProducer.Produce(HostInfoServices.BandHeadersHostInfo); - AddReportRow(ReportRow); -end; - -function TdxGridBandedTableViewBuilder.GetBandsProducer: TdxGridTableViewBandsProducer; -begin - Result := ProducerCache[GetBandsProducerClass] as TdxGridTableViewBandsProducer; -end; - -function TdxGridBandedTableViewBuilder.GetBandsProducerClass: TdxGridTableViewBandsProducerClass; -begin - Result := TdxGridTableViewBandsProducer; -end; - -function TdxGridBandedTableViewBuilder.GridView: TcxGridBandedTableView; -begin - Result := inherited GridView as TcxGridBandedTableView; -end; - -class function TdxGridBandedTableViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridBandedTableView; -end; - -{ TdxGridDBBandedTableViewAdapter } - -function TdxGridDBBandedTableViewAdapter.GridView: TcxGridDBBandedTableView; -begin - Result := inherited GridView as TcxGridDBBandedTableView; -end; - -class function TdxGridDBBandedTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridDBBandedTableView; -end; - -procedure TdxGridDBBandedTableViewAdapter.AfterBuilding; -begin - UnloadAllRecords; - inherited; -end; - -procedure TdxGridDBBandedTableViewAdapter.BeforeBuilding; -begin - inherited; - LoadAllRecords; -end; - -function TdxGridDBBandedTableViewAdapter.DataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(inherited DataController); -end; - -function TdxGridDBBandedTableViewAdapter.DBDataModeController: TcxDBDataModeController; -begin - Result := DataController.DataModeController; -end; - -procedure TdxGridDBBandedTableViewAdapter.LoadAllRecords; -begin - _LoadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -procedure TdxGridDBBandedTableViewAdapter.UnloadAllRecords; -begin - _UnloadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -{ TdxGridDBBandedTableViewBuilder } - -function TdxGridDBBandedTableViewBuilder.Adapter: TdxGridDBBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridDBBandedTableViewAdapter; -end; - -class function TdxGridDBBandedTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridDBBandedTableViewAdapter; -end; - -{ TdxGridCardViewAdapter } - -function TdxGridCardViewAdapter.GridView: TcxGridCardView; -begin - Result := inherited GridView as TcxGridCardView; -end; - -class function TdxGridCardViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -function TdxGridCardViewAdapter.Styles: TcxGridCardViewStyles; -begin - Result := inherited Styles as TcxGridCardViewStyles; -end; - -procedure TdxGridCardViewAdapter.GetVisibleCardRows(ACard: TcxGridCard; AList: TList); -{$IFNDEF DXVER500} -var - I: Integer; -{$ENDIF} -begin - {$IFDEF DXVER500} - ACard.GetVisibleRows(AList); - {$ELSE} - for I := 0 to CardRowCount - 1 do - AList.Add(CardRows[I]); - {$ENDIF} -end; - -procedure TdxGridCardViewAdapter.ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; - ARecursive: Boolean); -begin - {$IFDEF DXVER500} - if AnOptionsExpanding.ExpandCards then GridView.ViewData.Expand(True); - {$ENDIF} -end; - -function TdxGridCardViewAdapter.IsFirstRow(ACardRow: TcxGridCardViewRow): Boolean; -begin - Result := ACardRow.VisibleIndex = 0; -end; - -function TdxGridCardViewAdapter.IsLastRow(ACardRow: TcxGridCardViewRow): Boolean; -begin - Result := ACardRow.VisibleIndex = CardRowCount - 1; -end; - -function TdxGridCardViewAdapter.GetAreAllMasterRowsCollapsed: Boolean; -begin - Result := True; -end; - -function TdxGridCardViewAdapter.GetCaptionRowViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; -begin - if (ACardRow <> nil) and (ACardRow.Styles.CaptionRow <> nil) then - ACardRow.Styles.GetCaptionRowParams(ARecord, Result) - else - Styles.GetCaptionRowParams(ARecord, ACardRow, Result); -end; - -function TdxGridCardViewAdapter.GetCardViewParams(ARecord: TcxCustomGridRecord): TcxViewParams; -begin - Styles.GetContentParams(ARecord, nil, Result); -end; - -function TdxGridCardViewAdapter.GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; AIsDataCell: Boolean = False): TcxViewParams; -begin - if (TcxGridCardViewRow(ATableItem).Kind = rkData) or AIsDataCell then - Result := inherited GetContentViewParams(ARecord, ATableItem) - else - Result := GetCaptionRowViewParams(ARecord, TcxGridCardViewRow(ATableItem)); -end; - -function TdxGridCardViewAdapter.GetRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; -begin - if (ACardRow <> nil) and (ACardRow.Kind = rkData) then - if ACardRow.Styles.Caption <> nil then - ACardRow.Styles.GetCaptionParams(ARecord, Result) - else - Styles.GetRowCaptionParams(ARecord, ACardRow, Result) - else - Result := GetCaptionRowViewParams(ARecord, ACardRow); -end; - -function TdxGridCardViewAdapter.GetCaptionSeparator: string; -begin - Result := GridView.OptionsView.CaptionSeparator; -end; - -function TdxGridCardViewAdapter.GetCard(Index: Integer): TcxGridCard; -begin - Result := Records[Index] as TcxGridCard; -end; - -function TdxGridCardViewAdapter.GetCardAutoWidth: Boolean; -begin - Result := GridView.OptionsView.CardAutoWidth; -end; - -function TdxGridCardViewAdapter.GetCardCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridCardViewAdapter.GetCardCaptionWidth: Integer; -begin - Result := GridView.OptionsView.CaptionWidth; -end; - -function TdxGridCardViewAdapter.GetCardRow(Index: Integer): TcxGridCardViewRow; -begin - Result := GridView.VisibleRows[Index]; -end; - -function TdxGridCardViewAdapter.GetCardRowCount: Integer; -begin - Result := GridView.VisibleRowCount; -end; - -function TdxGridCardViewAdapter.GetCardSeparatorColor: Integer; -begin - Result := GridView.OptionsView.SeparatorColor; -end; - -function TdxGridCardViewAdapter.GetCardSeparatorThickness: Integer; -begin - Result := GridView.OptionsView.SeparatorWidth; -end; - -function TdxGridCardViewAdapter.GetCardWidth: Integer; -begin - Result := GridView.OptionsView.CardWidth; -end; - -function TdxGridCardViewAdapter.GetHasCardsSeparator: Boolean; -begin - Result := CardSeparatorThickness <> 0; -end; - -function TdxGridCardViewAdapter.GetHasIndent(Index: Integer): Boolean; -begin - with CardRows[Index] do - Result := HasExpandButton or (CategoryRow <> nil); -end; - -function TdxGridCardViewAdapter.GetRowAutoHeight: Boolean; -begin - with GridView.OptionsView do - Result := CellAutoHeight or RowCaptionAutoHeight; -end; - -function TdxGridCardViewAdapter.GetRowCaptionAutoHeight: Boolean; -begin - Result := GridView.OptionsView.RowCaptionAutoHeight; -end; - -function TdxGridCardViewAdapter.GetRowCaptionEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.RowCaptionEndEllipsis; -end; - -function TdxGridCardViewAdapter.GetShowRowCaption(Index: Integer): Boolean; -begin - Result := CardRows[Index].Options.ShowCaption; -end; - -function TdxGridCardViewAdapter.GetShowRowData(Index: Integer): Boolean; -begin - Result := CardRows[Index].Options.ShowData; -end; - -{ TdxGridCardViewFormatter } - -function TdxGridCardViewFormatter.Adapter: TdxGridCardViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridCardViewFormatter.Builder: TdxGridCardViewBuilder; -begin - Result := inherited Builder as TdxGridCardViewBuilder; -end; - -procedure TdxGridCardViewFormatter.DoInitializeCard(ACard: TdxReportCard; - AGridCard: TcxGridCard); -begin - with ReportLink.OptionsCards.Shadow do - begin - ACard.ShadowColor := ActualColor; - ACard.ShadowDepth := Depth; - ACard.ShadowPosition := Position; - end; - - SetViewParams(ACard, GetCardViewParams(AGridCard)); - - ACard.Data := Integer(AGridCard); - ACard.Width := Adapter.CardWidth; - ACard.CreateLayers(Builder); -end; - -procedure TdxGridCardViewFormatter.DoInitializeCardsRow(ACard: TdxReportCell); -begin - if HasBackgroundBitmap(bbBackground) then - ACard.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbBackground); - ACard.CellSides := []; -end; - -function TdxGridCardViewFormatter.GetCardClass(AGridCard: TcxGridCard): TdxReportCardClass; -begin - if IsHorizontalLayout(AGridCard) then - Result := TdxReportCardHorz - else - Result := TdxReportCardVert; -// Result := TdxReportCardHorz; -end; - -function TdxGridCardViewFormatter.GetCardViewParams(ARecord: TcxCustomGridRecord): TdxReportItemViewParams; -begin - Result.NativeParams := Adapter.GetCardViewParams(ARecord); - Result.CellSides := csAll;//[]; // because of Card Shadow - Result.FontStyle := []; - Result.Transparent := True; -end; - -procedure TdxGridCardViewFormatter.DoInitializeCardRowIndent( - AnItem: TdxReportCellExpandButton; ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); -const - BackgroundBitmapIndexes: array[TcxGridCardViewRowKind] of Integer = - (bbRowCaption, bbCaptionRow, bbCaptionRow); -begin - if ACardRow.CategoryRow <> nil then - ACardRow := ACardRow.CategoryRow; - SetViewParams(AnItem, GetCardRowCaptionViewParams(AGridCard, ACardRow)); - if HasBackgroundBitmap(BackgroundBitmapIndexes[ACardRow.Kind]) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(BackgroundBitmapIndexes[ACardRow.Kind]); -end; - -procedure TdxGridCardViewFormatter.DoInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); -const - BackgroundBitmapIndexes: array[TcxGridCardViewRowKind] of Integer = - (bbRowCaption, bbCaptionRow, bbCaptionRow); -begin - SetViewParams(AnItem, GetCardRowCaptionViewParams(AGridCard, ACardRow)); - if HasBackgroundBitmap(BackgroundBitmapIndexes[ACardRow.Kind]) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(BackgroundBitmapIndexes[ACardRow.Kind]); - - with AnItem as TdxReportCellString do - begin - EndEllipsis := Adapter.RowCaptionEndEllipsis; - Multiline := {True; //}not EndEllipsis and not CaptionAutoWidth and Adapter.RowCaptionAutoHeight; - TextAlignX := TextAlignXMap[ACardRow.CaptionAlignmentHorz]; - if Multiline then - TextAlignY := TextAlignYMap[ACardRow.CaptionAlignmentVert] - else - TextAlignY := taTop; - end; - AnItem.Text := ACardRow.Caption + Adapter.CaptionSeparator; -end; - -procedure TdxGridCardViewFormatter.DoReportLinkInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); -begin - ReportLink.DoInitializeCardRowCaptionCell(Adapter.GridView, AGridCard, ACardRow, TdxReportCellString(AnItem)); -end; - -function TdxGridCardViewFormatter.GetCardRowCaptionClass(ACardRow: TcxGridCardViewRow): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridCardViewFormatter.GetCardRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - if ACardRow.Kind = rkData then - ReportLink.Styles.GetCardRowCaptionParams(ARecord, ACardRow, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetCardCaptionRowParams(ARecord, ACardRow, Result.NativeParams) - else - if (ACardRow.Kind = rkCaption) and CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetRowCaptionViewParams(ARecord, ACardRow); - - // v.3.1 - because of fact that each Card in Grid v.5 might has different number of Rows, - // CellSides initialization was moved inside ReportCard - Result.CellSides := []; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent -end; - -procedure TdxGridCardViewFormatter.DoReportLinkInitializeCardRowData(AnItem: TAbstractdxReportCellData; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); -begin - ReportLink.DoInitializeCardRowDataCell(Adapter.GridView, AGridCard, ACardRow, TdxReportCellString(AnItem)); -end; - -function TdxGridCardViewFormatter.GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False; AIsDataCell: Boolean = False): TdxReportItemViewParams; -var - CardRow: TcxGridCardViewRow; -begin - CardRow := TcxGridCardViewRow(ATableItem); - AIsDataCell := AIsDataCell and (CardRow.Kind <> rkCaption); - if ReportLink.OptionsFormatting.UseNativeStyles then - if (CardRow.Kind = rkData) or AIsDataCell then - ReportLink.Styles.GetContentParams(ARecord, CardRow, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetCardCaptionRowParams(ARecord, CardRow, Result.NativeParams) - else - if (CardRow.Kind = rkData) or AIsDataCell then - Result := inherited GetItemViewParams(ATableItem, ARecord, AnIsPreview, AIsDataCell) - else - if CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetCaptionRowViewParams(ARecord, CardRow); - - // v.3.1 - because fact that each Card in Grid v.5 might has different number of Rows, - // CellSides initialization was moved inside ReportCard - Result.CellSides := []; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent -end; - -procedure TdxGridCardViewFormatter.AddHorizontalDelimiters; -var - I: Integer; -begin - for I := 0 to Builder.CardCount - 1 do - ReportLink.AddHorizontalDelimiter(Builder.Cards[I].AbsoluteRect.Right); -end; - -procedure TdxGridCardViewFormatter.AddVerticalDelimiters; -var - I: Integer; -begin - if NeedDelimitByRows then - begin - for I := 0 to Builder.CardCount - 1 do - Builder.Cards[I].AddVerticalDelimiters; - end - else - inherited; -end; - -function TdxGridCardViewFormatter.GetViewWidth: Integer; -var - MasterBuilder: TdxCustomGridViewBuilder; -begin - MasterBuilder := Builder.MasterBuilder; - if MasterBuilder <> nil then - begin - Result := MasterBuilder.Formatter.ViewWidth - MasterBuilder.Adapter.ViewWidthExtra; - if HasDetailsSeparator then - Dec(Result, 2 * DetailsSeparatorThickness); - end - else - begin - Result := SiteWidth; - if HasDetailsSeparator then - Dec(Result, 2 * DetailsSeparatorThickness); - if Result < Builder.MaxCardWidth + FirstCardOffset then - Result := Builder.MaxCardWidth + FirstCardOffset; - end; -end; - -function TdxGridCardViewFormatter.IsHorizontalLayout(AGridCard: TcxGridCard): Boolean; -begin - Result := AGridCard.GridView.RowLayout = rlHorizontal; -end; - -function TdxGridCardViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbCaptionRow: - Result := vspsGridCardCaptionRow; - bbRowCaption: - Result := vspsGridCardRowCaption; - else - Result := 0; - end; - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -function TdxGridCardViewFormatter.GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; -const - BackgroundBitmapIndexes: array[TcxGridCardViewRowKind] of Integer = - (bbContent, bbCaptionRow, bbCaptionRow); -begin - Result := BackgroundBitmapIndexes[TcxGridCardViewRow(ATableItem).Kind]; -end; - -function TdxGridCardViewFormatter.NeedDelimitByRows: Boolean; -{var - I: Integer;} -begin - Result := False; - {if MasterBuilder = nil then - for I := 0 to Builder.CardCount - 1 do - if Builder.Cards[I].Height > SiteHeight then - begin - Result := True; - Exit; - end;} -end; - -function TdxGridCardViewFormatter.GetAutoWidth: Boolean; -begin - Result := ReportLink.OptionsCards.AutoWidth; -end; - -function TdxGridCardViewFormatter.GetCaptionAutoWidth: Boolean; -begin - Result := Adapter.CardCaptionWidth = 0; -end; - -function TdxGridCardViewFormatter.GetCardAutoWidth: Boolean; -begin - Result := Adapter.CardAutoWidth or ReportLink.OptionsSize.AutoWidth; -end; - -function TdxGridCardViewFormatter.GetCard(Index: Integer): TcxGridCard; -begin - Result := TcxGridCard(Records[Index]); -end; - -function TdxGridCardViewFormatter.GetCardCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridCardViewFormatter.GetCardsAreaWidth: Integer; -begin - Result := ViewWidth - FirstCardOffset; -end; - -function TdxGridCardViewFormatter.GetInterCardsSpaceHorz: Integer; -begin - Result := ReportLink.OptionsCards.InterCardsSpaceHorz; -end; - -function TdxGridCardViewFormatter.GetInterCardsSpaceVert: Integer; -begin - Result := ReportLink.OptionsCards.InterCardsSpaceVert; -end; - -function TdxGridCardViewFormatter.GetKeepSameHeight: Boolean; -begin - Result := ReportLink.OptionsCards.KeepSameHeight; -end; - -function TdxGridCardViewFormatter.GetKeepSameWidth: Boolean; -begin - Result := ReportLink.OptionsCards.KeepSameWidth; -end; - -function TdxGridCardViewFormatter.GetRowAutoHeight: Boolean; -begin - Result := Adapter.RowAutoHeight; -end; - -{ TdxReportCardLayer } - -constructor TdxReportCardLayer.CreateEx( - AParent: TdxReportCell; ABeginsLayerRow: TcxGridCardViewRow); -begin - inherited Create(AParent); - FRows := TList.Create; - CellSides := []; - Data := Integer(ABeginsLayerRow); - Width := Card.LayerWidths[Index]; -// Height := Card.ContentHeight; - AddRow(ABeginsLayerRow); -end; - -destructor TdxReportCardLayer.Destroy; -begin - FreeAndNil(FRows); - inherited Destroy; -end; - -procedure TdxReportCardLayer.AdjustCellSides; -var - I: Integer; - ReportLink: TdxGridReportLink; -begin - ReportLink := Card.ReportLink; - for I := 0 to RowCount - 1 do - begin - Rows[I].AdjustCellSides(IsFirstItem, IsLastItem and - not (NeedCategorySeparator or NeedLayerSeparator), I = 0, I = RowCount - 1); - if Rows[I].Left + Rows[I].Width > Width then - Rows[I].Width := Width - Rows[I].Left; - end; - if ReportLink.OptionsCards.Borders then - begin - if LayerSeparator <> nil then - begin - LayerSeparator.CellSides := [csLeft, csRight]; - if IsLastItem and not NeedCategorySeparator then - LayerSeparator.CellSides := LayerSeparator.CellSides + [csBottom]; - end; - if CategorySeparator <> nil then - begin - CategorySeparator.CellSides := [csLeft, csRight]; - if IsLastItem then - CategorySeparator.CellSides := CategorySeparator.CellSides + [csBottom]; - end; - end; -end; - -function TdxReportCardLayer.AddRow( - AGridCardRow: TcxGridCardViewRow): TdxReportCardRow; -begin - Result := TdxReportCardRow.CreateEx(Self, AGridCardRow); - FRows.Add(Result); -end; - -function TdxReportCardLayer.MeasureCaptionWidth(DC: HDC): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Min(0, RowCount - 1) do - Result := Max(Result, Rows[I].MeasureCaptionWidth(DC)); -end; - -function TdxReportCardLayer.MeasureDataWidth(DC: HDC): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - Result := Max(Result, Rows[I].MeasureDataWidth(DC)); -end; - -function TdxReportCardLayer.MeasureLayerHeight(DC: HDC; ACalculateLineHeight: Boolean; - ABuilder: TdxGridCardViewBuilder): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - Result := Max(Result, Rows[I].MeasureHeight(DC, ACalculateLineHeight, ABuilder)); - if LayerSeparator <> nil then - Inc(Result, LayerSeparator.Height); - if CategorySeparator <> nil then - Inc(Result, CategorySeparator.Height); -end; - -function TdxReportCardLayer.MeasureWidth(DC: HDC): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - Inc(Result, Rows[I].MeasureWidth(DC)); -end; - -procedure TdxReportCardLayer.AdjustRowsHeight; -var - I, H: Integer; -begin - H := Height; - if LayerSeparator <> nil then - Dec(H, LayerSeparator.Height); - if CategorySeparator <> nil then - Dec(H, CategorySeparator.Height); - for I := 0 to RowCount - 1 do - Rows[I].Height := H; -end; - -procedure TdxReportCardLayer.AdjustRowHeight( - DC: HDC; AAutoHeight: Boolean; ABuilder: TdxGridCardViewBuilder); -var - I, ARowHeight, ATotalHeight: Integer; -begin - ATotalHeight := 0; - for I := 0 to RowCount - 1 do - begin - ARowHeight := Rows[I].MeasureHeight(DC, not AAutoHeight, ABuilder); - SetRowHeight(I, ARowHeight); - Inc(ATotalHeight, ARowHeight); - end; - InternalHeight := ATotalHeight; -end; - -function TdxReportCardLayer.CanHaveIndent(ARow: TdxReportCardRow): Boolean; -begin - Result := ARow.GridCardRow.Position.VisibleColIndex = 0; -end; - -procedure TdxReportCardLayer.CheckNeedCategorySeparator(ANextLayer: TdxReportCardLayer); -var - I: Integer; -begin - FNeedCategorySeparator := ANextLayer.BeginsLayerRow.HasExpandButton; - if FNeedCategorySeparator then - begin - FNeedCategorySeparator := False; - for I := 0 to RowCount - 1 do - with Rows[I].GridCardRow do - FNeedCategorySeparator := FNeedCategorySeparator or (HasExpandButton or (CategoryRow <> nil)); - end; -end; - -procedure TdxReportCardLayer.CreateItems(ABuilder: TdxGridCardViewBuilder); -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - Rows[I].CreateItems(ABuilder); - if NeedCategorySeparator then - CreateCategorySeparator; - if NeedLayerSeparator then - CreateLayerSeparator; -end; - -procedure TdxReportCardLayer.CreateCategorySeparator; -var - AParams: TcxViewParams; - ACardView: TcxGridCardView; -begin - FCategorySeparator := TdxReportCellBox.Create(Self); - ACardView := TcxGridCardView(BeginsLayerRow.GridView); - ACardView.Styles.GetViewParams(vsCategorySeparator, nil, nil, AParams); - FCategorySeparator.BoundsRect := MakeRect(0, 0, Width, - ACardView.OptionsView.CategorySeparatorWidth); - FCategorySeparator.Color := AParams.Color; - FCategorySeparator.CellSides := []; - FCategorySeparator.Transparent := False; -end; - -procedure TdxReportCardLayer.CreateLayerSeparator; -var - AParams: TcxViewParams; - ACardView: TcxGridCardView; -begin - FLayerSeparator := TdxReportCellBox(AddDataItem(TdxReportCellBox)); - ACardView := TcxGridCardView(BeginsLayerRow.GridView); - FLayerSeparator.BoundsRect := MakeRect(0, 0, Width, - ACardView.OptionsView.LayerSeparatorWidth); - ACardView.Styles.GetViewParams(vsLayerSeparator, nil, nil, AParams); - FLayerSeparator.Transparent := False; - FLayerSeparator.CellSides := []; - FLayerSeparator.Color := AParams.Color; -end; - -procedure TdxReportCardLayer.InitAutoWidthItem( - AnItem: TcxAutoWidthItem; var AAllFixed: Boolean); -var - I, AWidth: Integer; -const - LayerDefaultWidth = 20; -begin - AWidth := 0; - for I := 0 to RowCount - 1 do - AWidth := Max(AWidth, Rows[I].GridCardRow.Position.Width); - AnItem.Width := AWidth; - AnItem.Fixed := AnItem.Width <> 0; - AAllFixed := AAllFixed and AnItem.Fixed; - if AnItem.Width = 0 then - AnItem.Width := LayerDefaultWidth; -end; - -procedure TdxReportCardLayer.PlaceSeparatorAndExcludeHeightFromHeight( - var AValue: Integer); -begin - if LayerSeparator <> nil then - begin - Dec(AValue, LayerSeparator.Height); - LayerSeparator.Top := AValue; - end; -end; - -procedure TdxReportCardLayer.RecalculateHeight; -var - AHeight, I: Integer; -begin - AHeight := 0; - for I := 0 to RowCount - 1 do - AHeight := Max(AHeight, Rows[I].Height); - if LayerSeparator <> nil then - Inc(AHeight, LayerSeparator.Height); - if CategorySeparator <> nil then - Inc(AHeight, CategorySeparator.Height); - Height := AHeight; -end; - -procedure TdxReportCardLayer.ResizeRowsHorz; -var - ALeft, I: Integer; - AAllFixed: Boolean; - AAutoWidths: TcxAutoWidthObject; - AItem: TcxAutoWidthItem; -const - CardRowDefaultWidth = 20; -begin - if RowCount = 0 then Exit; - if RowCount = 1 then - Rows[0].Width := Width - else - begin - AAutoWidths := TcxAutoWidthObject.Create(RowCount); - try - AAllFixed := True; - for I := 0 to RowCount - 1 do - begin - AItem := AAutoWidths.AddItem; - AItem.Width := Rows[I].GridCardRow.Position.Width; - AItem.Fixed := AItem.Width <> 0; - AAllFixed := AAllFixed and AItem.Fixed; - if AItem.Width = 0 then - AItem.Width := CardRowDefaultWidth; - end; - if AAllFixed or (AAutoWidths.Width > Width) then - for I := 0 to AAutoWidths.Count - 1 do - AAutoWidths[I].Fixed := False; - AAutoWidths.AvailableWidth := Width; - AAutoWidths.Calculate; - ALeft := 0; - for I := 0 to RowCount - 1 do - begin - Rows[I].Left := ALeft; - Rows[I].Width := AAutoWidths[I].AutoWidth; - Inc(ALeft, Rows[I].Width); - end; - finally - AAutoWidths.Free; - end; - end; -end; - -function TdxReportCardLayer.SetPosition(ALeft, AWidth: Integer): Integer; -begin - Left := ALeft; - Width := AWidth; - Result := Left + Width; -end; - -procedure TdxReportCardLayer.SetRowCaptionWidth( - DC: HDC; ACaptionAutoWidths: Boolean; AValue: Integer); -var - I: Integer; -begin - if ACaptionAutoWidths then - begin - for I := 0 to Min(0, RowCount - 1) do - Rows[I].RowCaptionWidth := AValue; - for I := 1 to RowCount - 1 do - Rows[I].RowCaptionWidth := Rows[I].MeasureCaptionWidth(DC); - end - else - for I := 0 to RowCount - 1 do - Rows[I].RowCaptionWidth := AValue; -end; - -procedure TdxReportCardLayer.SetRowHeight(ARowIndex, AValue: Integer); -var - Delta, I: Integer; -begin - if AValue < 0 then AValue := 0; - - Delta := AValue - Rows[ARowIndex].Height; - Rows[ARowIndex].Height := AValue; - - for I := ARowIndex + 1 to RowCount - 1 do - Rows[I].Top := Rows[I].Top + Delta; -end; - -procedure TdxReportCardLayer.SizeChanged; -begin - if LayerSeparator <> nil then - LayerSeparator.Width := Width; - if CategorySeparator <> nil then - CategorySeparator.Width := Width; - ResizeRowsHorz; -end; - -function TdxReportCardLayer.GetBeginsLayerRow: TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(Data); -end; - -function TdxReportCardLayer.GetCard: TdxReportCardHorz; -begin - Result := TdxReportCardHorz(Parent); -end; - -function TdxReportCardLayer.GetHeight: Integer; -begin - Result := inherited Height; -end; - -function TdxReportCardLayer.GetInternalHeight: Integer; -begin - Result := inherited Height; -end; - -function TdxReportCardLayer.GetInternalWidth: Integer; -begin - Result := inherited Width; -end; - -function TdxReportCardLayer.GetRow(AIndex: Integer): TdxReportCardRow; -begin - Result := TdxReportCardRow(FRows[AIndex]); -end; - -function TdxReportCardLayer.GetRowCount: Integer; -begin - Result := FRows.Count; -end; - -function TdxReportCardLayer.GetWidth: Integer; -begin - Result := inherited Width; -end; - -procedure TdxReportCardLayer.SetHeight(AValue: Integer); -begin - inherited Height := AValue; - if AValue = 0 then Exit; - if CategorySeparator <> nil then - begin - FCategorySeparator.Top := AValue - FCategorySeparator.Height; - Dec(AValue, FCategorySeparator.Height); - end; - PlaceSeparatorAndExcludeHeightFromHeight(AValue); - AdjustRowsHeight; -end; - -procedure TdxReportCardLayer.SetInternalHeight(AValue: Integer); -begin - inherited Height := AValue; -end; - -procedure TdxReportCardLayer.SetInternalWidth(AValue: Integer); -begin - inherited Width := AValue; -end; - -procedure TdxReportCardLayer.SetWidth(AValue: Integer); -begin - inherited Width := AValue; - SizeChanged; -end; - -{ TdxReportCardVerticalLayer } - -procedure TdxReportCardVerticalLayer.AdjustCellSides; -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - Rows[I].AdjustCellSides(I = 0, False, Index = 0, Index = Card.LayerCount - 1); - if (LayerSeparator <> nil) and Card.ReportLink.OptionsCards.RowBordersVert then - LayerSeparator.CellSides := LayerSeparator.CellSides + [csLeft, csRight]; -end; - -function TdxReportCardVerticalLayer.MeasureCaptionWidth(DC: HDC): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - Result := Max(Result, Rows[I].MeasureCaptionWidth(DC)); -end; - -function TdxReportCardVerticalLayer.MeasureWidth(DC: HDC): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - Result := Max(Result, Rows[I].MeasureWidth(DC)); - if LayerSeparator <> nil then - Inc(Result, LayerSeparator.Width); -end; - -procedure TdxReportCardVerticalLayer.AdjustRowsHeight; -begin -end; - -function TdxReportCardVerticalLayer.CanHaveIndent(ARow: TdxReportCardRow): Boolean; -begin - Result := True; -end; - -procedure TdxReportCardVerticalLayer.CreateLayerSeparator; -begin - inherited CreateLayerSeparator; - LayerSeparator.Width := LayerSeparator.Height; -end; - -procedure TdxReportCardVerticalLayer.CheckNeedCategorySeparator( - ANextLayer: TdxReportCardLayer); -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - begin - if Rows[I].GridCardRow.HasExpandButton and (I > 0) then - Rows[I - 1].NeedSeparator := True; - end; -end; - -procedure TdxReportCardVerticalLayer.PlaceSeparatorAndExcludeHeightFromHeight( - var AValue: Integer); -begin -end; - -procedure TdxReportCardVerticalLayer.RecalculateHeight; -var - I, AHeight: Integer; -begin - AHeight := 0; - for I := 0 to RowCount - 1 do - Inc(AHeight, Rows[I].Height); - Height := AHeight; -end; - -procedure TdxReportCardVerticalLayer.SetRowCaptionWidth( - DC: HDC; ACaptionAutoWidths: Boolean; AValue: Integer); -var - I: Integer; -begin - if ACaptionAutoWidths then - for I := 0 to RowCount - 1 do - Rows[I].RowCaptionWidth := AValue - else - for I := 0 to RowCount - 1 do - Rows[I].RowCaptionWidth := AValue; -end; - -procedure TdxReportCardVerticalLayer.SizeChanged; -var - I, AWidth: Integer; -begin - AWidth := Width; - if LayerSeparator <> nil then - begin - Dec(AWidth, LayerSeparator.Width); - LayerSeparator.Height := Card.ContentHeight; - end; - for I := 0 to RowCount - 1 do - begin - Rows[I].Width := AWidth; - if LayerSeparator <> nil then - Rows[I].Left := LayerSeparator.Width; - end; -end; - -{ TdxReportCardRow } - -constructor TdxReportCardRow.CreateEx(AParent: TdxReportCell; AGridCardRow: TcxGridCardViewRow); -begin - inherited Create(AParent); - CellSides := []; - Data := Integer(AGridCardRow); - Width := Card.ContentWidth; -end; - -function TdxReportCardRow.MeasureHeight(DC: HDC; ACalculateLineHeight: Boolean; - ABuilder: TdxGridCardViewBuilder): Integer; - - function MeasureCaptionHeight: Integer; - begin - Result := DefaultDataRowLineHeight; - if HasCaption then - if ACalculateLineHeight then - Result := RowCaption.MeasureFontHeight(DC) - else - Result := RowCaption.MeasureContentHeight(DC); - - if Result < DefaultDataRowLineHeight then - Result := DefaultDataRowLineHeight; - end; - - function MeasureDataHeight: Integer; - var - MinHeight: Integer; - begin - Result := DefaultDataRowLineHeight; - if HasData then - begin - MinHeight := RowData.MeasureFontHeight(DC); - if not ACalculateLineHeight then - begin - Result := RowData.MeasureContentHeight(DC); - if Result = 0 then - Result := MinHeight; - end - else - Result := MinHeight; - - ABuilder.DoGetCellHeight(Card.GridCard, GridCardRow, Result); - if Result < MinHeight then - Result := MinHeight; - end; - end; - -begin - Result := Max(MeasureCaptionHeight, MeasureDataHeight); - if RowSeparator <> nil then - Inc(Result, RowSeparator.Height); -end; - -function TdxReportCardRow.MeasureWidth(DC: HDC): Integer; -begin - Result := GridCardRow.Position.Width; - if Result = 0 then - begin - Result := MeasureCaptionWidth(DC) + MeasureDataWidth(DC); - if HasIndent then - Inc(Result, RowIndent.Width); - end; -end; - -function TdxReportCardRow.MeasureCaptionWidth(DC: HDC): Integer; -begin - if HasCaption then - begin - Result := RowCaption.MeasureContentWidth(DC){ + 2}; - if HasIndent then - Inc(Result, RowIndent.Width); - end - else - Result := 0; -end; - -function TdxReportCardRow.MeasureDataWidth(DC: HDC): Integer; -begin - if HasData and dxPSDataMaps.DoesItemParticipateInAutoWidthCalculation(Properties) then - Result := RowData.MeasureContentWidth(DC) + 2 - else - Result := 0; -end; - -procedure TdxReportCardRow.AdjustCellSides( - AIsFirstItem, AIsLastItem, AIsLeftItem, AIsRightItem: Boolean); -var - ReportLink: TdxGridReportLink; - Sides: TdxCellSides; -begin - ReportLink := Card.ReportLink; - if ReportLink.OptionsCards.Borders then - begin - Sides := []; - if AIsFirstItem then Include(Sides, csTop); - if AIsLastItem then Include(Sides, csBottom); - if HasIndent then - RowIndent.CellSides := Sides; - if HasIndent and AIsLeftItem then - RowIndent.CellSides := Sides + [csLeft]; - if HasCaption then - begin - RowCaption.CellSides := RowCaption.CellSides + Sides; - if not HasIndent and AIsLeftItem then - RowCaption.CellSides := RowCaption.CellSides + [csLeft]; - end; - if HasData then - begin - RowData.CellSides := RowData.CellSides + Sides; - if AIsRightItem then - RowData.CellSides := RowData.CellSides + [csRight]; - end; - if not HasCaption and AIsLeftItem then - RowData.CellSides := RowData.CellSides + [csLeft] - else - if not HasData and AIsRightItem then - RowCaption.CellSides := RowCaption.CellSides + [csRight]; - end; - - if ReportLink.OptionsCards.RowBordersHorz then - begin - Sides := []; - if not AIsFirstItem then Include(Sides, csTop); - if not AIsLastItem then Include(Sides, csBottom); - if HasCaption then - RowCaption.CellSides := RowCaption.CellSides + Sides; - if HasData then - RowData.CellSides := RowData.CellSides + Sides; - if HasIndent then - RowIndent.CellSides := RowIndent.CellSides + Sides; - end; - - if ReportLink.OptionsCards.RowBordersVert then - begin - if HasCaption then - begin - RowCaption.CellSides := RowCaption.CellSides + [csRight]; - if not HasIndent then - RowCaption.CellSides := RowCaption.CellSides + [csLeft]; - end; - if HasData and (HasCaption or not HasIndent) then - RowData.CellSides := RowData.CellSides + [csLeft]; - if HasIndent then - RowIndent.CellSides := RowIndent.CellSides + [csLeft]; - end; -end; - -procedure TdxReportCardRow.CreateItems(ABuilder: TdxGridCardViewBuilder); -const - InitialCaptionWidth = 100; - - function HasRowCaption: Boolean; - begin - Result := GridCardRow.Options.ShowCaption; - end; - - function HasRowData: Boolean; - begin - Result := GridCardRow.Options.ShowData; - end; - - function HasIndent: Boolean; - begin - Result := GridCardRow.HasExpandButton or - ((GridCardRow.CategoryRow <> nil) and Layer.CanHaveIndent(Self)); - end; - - function ExpandButtonSize: Integer; - begin - Result := ABuilder.Adapter.ExpandButtonSize + cxTextOffset * 3; - end; - - procedure CreateRowCaption; - begin - FRowCaption := ABuilder.Formatter.GetCardRowCaptionClass(GridCardRow).Create(Self); - if HasIndent then - begin - FRowIndent := TdxReportCellExpandButton.Create(Self); - FRowIndent.Width := ExpandButtonSize; - FRowIndent.ShowButton := GridCardRow.HasExpandButton; - FRowIndent.CellSides := []; - if FRowIndent.ShowButton then - begin - ABuilder.Formatter.DoInitializeExpandButton(FRowIndent, Card.GridCard, True); - FRowIndent.ButtonExpanded := GridCardRow.Expanded; - end; - ABuilder.Formatter.DoInitializeCardRowIndent(FRowIndent, GridCardRow, Card.GridCard); - end; - if FRowIndent <> nil then - RowCaption.Left := FRowIndent.Width; - if HasRowData then - RowCaption.Width := InitialCaptionWidth - else - RowCaption.Width := Parent.Width - RowCaption.Left; - RowCaption.Height := Height; - RowCaption.Data := Integer(TdxGridCardRowCaption); - ABuilder.Formatter.DoInitializeCardRowCaption(RowCaption, GridCardRow, Card.GridCard); - ABuilder.Formatter.DoReportLinkInitializeCardRowCaption(RowCaption, GridCardRow, Card.GridCard); - end; - - procedure CreateRowData; - begin - FRowData := ABuilder.Formatter.GetItemClass(GridCardRow, Card.GridCard, False).Create(Self); - if HasRowCaption then - RowData.Left := InitialCaptionWidth - else - RowData.Left := 0; - RowData.Width := Parent.Width - Left; - RowData.Height := DefaultDataRowLineHeight; - ABuilder.Formatter.DoInitializeItem(RowData, GridCardRow, Card.GridCard, False); - ABuilder.Formatter.DoReportLinkInitializeCardRowData(RowData, GridCardRow, Card.GridCard); - end; - - procedure CreateRowSeparator; - var - AParams: TcxViewParams; - AGridView: TcxGridCardView; - begin - AGridView := TcxGridCardView(GridCardRow.GridView); - FRowSeparator := TdxReportCellBox(AddDataItem(TdxReportCellBox)); - FRowSeparator.BoundsRect := MakeRect(0, 0, Width, AGridView.OptionsView.CategorySeparatorWidth); - AGridView.Styles.GetViewParams(vsCategorySeparator, nil, nil, AParams); - FRowSeparator.Color := AParams.Color; - FRowSeparator.Transparent := False; - FRowSeparator.CellSides := []; - end; - -begin - if HasRowCaption then - CreateRowCaption; - if HasRowData then - CreateRowData; - if NeedSeparator then - CreateRowSeparator; - Width := Width; - Height := Height; -end; - -function TdxReportCardRow.GetCard: TdxReportCard; -begin - Result := TdxReportCard(Parent.Parent); -end; - -function TdxReportCardRow.GetGridCardRow: TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(Data); -end; - -function TdxReportCardRow.GetHasCaption: Boolean; -begin - Result := FRowCaption <> nil; -end; - -function TdxReportCardRow.GetHasData: Boolean; -begin - Result := FRowData <> nil; -end; - -function TdxReportCardRow.GetHasIndent: Boolean; -begin - Result := FRowIndent <> nil; -end; - -function TdxReportCardRow.GetHasRowSeparator: Boolean; -begin - Result := FRowSeparator <> nil; -end; - -function TdxReportCardRow.GetHeight: Integer; -begin - Result := inherited Height; -end; - -function TdxReportCardRow.GetLayer: TdxReportCardLayer; -begin - Result := Parent as TdxReportCardLayer; -end; - -function TdxReportCardRow.GetProperties: TcxCustomEditProperties; -begin - Result := GridCardRow.GetProperties; -end; - -function TdxReportCardRow.GetWidth: Integer; -begin - Result := inherited Width; -end; - -procedure TdxReportCardRow.SetHeight(AValue: Integer); -begin - inherited Height := AValue; - if HasRowSeparator then - begin - Dec(AValue, RowSeparator.Height); - RowSeparator.Top := AValue; - end; - if HasCaption then - RowCaption.Height := AValue; - if HasData then - RowData.Height := AValue; - if HasIndent then - RowIndent.Height := AValue; -end; - -procedure TdxReportCardRow.SetRowCaptionWidth(Value: Integer); -begin - if Value > Width then - Value := Width - 1; - if not HasData then - Value := Width; - if HasIndent then - Dec(Value, RowIndent.Width); - if HasCaption then - begin - RowCaption.Width := Value; - if HasData then - RowData.Left := RowCaption.Left + RowCaption.Width; - end; - Width := Width; -end; - -procedure TdxReportCardRow.SetWidth(Value: Integer); -begin - inherited Width := Value; - if HasRowSeparator then - RowSeparator.Width := Value; - if HasCaption and (RowCaption.Width > Width) then - RowCaption.Width := Width - RowCaption.Left; - if HasData then - RowData.Width := Width - RowData.Left; -end; - -{ TdxCardBorderPainter } - -function TdxCardBorderPainter.Card: TdxReportCard; -begin - Result := inherited Item as TdxReportCard; -end; - -procedure TdxCardBorderPainter.Paint(DC: HDC); -begin - if Card.HasShadow then DrawShadow(DC); -end; - -procedure TdxCardBorderPainter.DrawShadow(DC: HDC); -begin - Renderer.FillRect(DC, Card.ShadowRectHorz, Card.ShadowColor); - Renderer.FillRect(DC, Card.ShadowRectVert, Card.ShadowColor); -end; - -{ TdxReportCard } - -constructor TdxReportCard.Create(AParent: TdxReportCell); -begin - inherited; - ShadowColor := clBlack; - ShadowDepth := dxDefaultCardsShadowDepth; - ShadowPosition := cspBottomRight; -end; - -constructor TdxReportCard.CreateEx(AParent: TdxReportCell; AGridCard: TcxGridCard); -begin - Create(AParent); - Data := Integer(AGridCard); -end; - -function TdxReportCard.GetBorderOuterBounds(DC: HDC): TRect; -begin - Result := inherited GetBorderBounds(DC); - with Result do - begin - case ShadowPosition of - cspTopLeft: - begin - Inc(Left, ShadowDepth); - Inc(Top, ShadowDepth); - end; - cspTopRight: - begin - Dec(Right, ShadowDepth); - Inc(Top, ShadowDepth); - end; - cspBottomRight: - begin - Dec(Right, ShadowDepth); - Dec(Bottom, ShadowDepth); - end; - cspBottomLeft: - begin - Inc(Left, ShadowDepth); - Dec(Bottom, ShadowDepth); - end; - end; - end; -end; - -procedure TdxReportCard.AddVerticalDelimiters; -var - I: Integer; -begin - for I := 0 to CellCount - 1 do - ReportLink.AddVerticalDelimiter(Cells[I]); -end; - -procedure TdxReportCard.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -begin - inherited; - FShadowDepth := MulDiv(FShadowDepth, APixelsNumerator, APixelsDenominator); -end; - -function TdxReportCard.GetBorderPainterClass: TdxPSCellBorderPainterClass; -begin - Result := TdxCardBorderPainter; -end; - -procedure TdxReportCard.ReadProperties(AReader: TdxPSDataReader); -begin - inherited ReadProperties(AReader); - with AReader do - begin - FCaptionWidth := ReadInteger; - FShadowColor := ReadInteger; - FShadowDepth := ReadInteger; - FShadowPosition := TdxGridCardShadowPosition(ReadInteger); - end; -end; - -procedure TdxReportCard.WriteProperties(AWriter: TdxPSDataWriter); -begin - inherited WriteProperties(AWriter); - with AWriter do - begin - WriteInteger(FCaptionWidth); - WriteInteger(ShadowColor); - WriteInteger(ShadowDepth); - WriteInteger(Integer(ShadowPosition)); - end; -end; - -procedure TdxReportCard.SetCaptionWidth( - DC: HDC; ALayer, AValue, AMaxValue: Integer; ACaptionAutoWidths: Boolean); -var - I: Integer; -begin - AValue := Max(AValue, 0); - FLayerCaptionWidth := AValue; - for I := 0 to LayerCount - 1 do - Layers[I].SetRowCaptionWidth(DC, ACaptionAutoWidths, AMaxValue); -end; - -procedure TdxReportCard.AdjustLayers; -begin -end; - -procedure TdxReportCard.CreateLayers(ABuilder: TdxGridCardViewBuilder); -var - List: TList; - ACurIndex, APrevIndex, I: Integer; - ARow: TcxGridCardViewRow; - ALayer: TdxReportCardLayer; - ANeedLayerSeparator: Boolean; -begin - List := TList.Create; - try - ABuilder.Adapter.GetVisibleCardRows(GridCard, List); - ALayer := nil; - AllocateSpaceForCells(List.Count); - APrevIndex := -1; - ANeedLayerSeparator := False; - for I := 0 to List.Count - 1 do - begin - ARow := TcxGridCardViewRow(List[I]); - ACurIndex := GetLayerIndexByRow(ARow); - if ACurIndex <> APrevIndex then - begin - ALayer := GetLayerClass.CreateEx(Self, ARow); - APrevIndex := ACurIndex; - end - else - begin - ALayer.AddRow(ARow); - ANeedLayerSeparator := True; - end; - end; - ANeedLayerSeparator := ANeedLayerSeparator and - (GridCard.GridView.OptionsView.LayerSeparatorWidth > 0); - for I := 0 to LayerCount - 1 do - begin - if I < (LayerCount - 1) then - Layers[I].CheckNeedCategorySeparator(Layers[I + 1]); - Layers[I].NeedLayerSeparator := ANeedLayerSeparator and HasLayerSeparator(I); - Layers[I].CreateItems(ABuilder); - Layers[I].Width := Layers[I].Width; - end; - AdjustLayers; - finally - List.Free; - end; -end; - -function TdxReportCard.GetLayerClass: TdxReportCardLayerClass; -begin - Result := TdxReportCardLayer; -end; - -function TdxReportCard.GetLayerIndexByRow(ARow: TcxGridCardViewRow): Integer; -begin - Result := ARow.Position.RowIndex; -end; - -function TdxReportCard.GetLayerWidth(Index: Integer): Integer; -begin - Result := ContentWidth; -end; - -function TdxReportCard.HasLayerSeparator(ALayerIndex: Integer): Boolean; -begin - Result := ALayerIndex < (LayerCount - 1); -end; - -procedure TdxReportCard.RecalculateLayersHeight; -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - Layers[I].RecalculateHeight; -end; - -procedure TdxReportCard.SetLayerHeight(Index, Value: Integer); -var - Delta, I: Integer; -begin - if Value < 0 then Value := 0; - - Delta := Value - Layers[Index].Height; - Layers[Index].Height := Value; - - for I := Index + 1 to LayerCount - 1 do - Layers[I].Top := Layers[I].Top + Delta; -end; - -procedure TdxReportCard.SetLayerWidth(Index, Value: Integer); -begin - Layers[Index].Width := Value; -end; - -function TdxReportCard.GetRowCount: Integer; -begin - Result := LayerCount; -end; - -function TdxReportCard.GetRowHeight(AIndex: Integer): Integer; -begin - Result := LayerHeights[AIndex]; -end; - -procedure TdxReportCard.SetRowHeight(AIndex, AValue: Integer); -begin - LayerHeights[AIndex] := AValue; -end; - -procedure TdxReportCard.SizeChanged; -begin -end; - -function TdxReportCard.GetGridCard: TcxGridCard; -begin - Result := TcxGridCard(Data); -end; - -function TdxReportCard.GetWidth: Integer; -begin - Result := inherited Width; -end; - -function TdxReportCard.GetContentHeight: Integer; -begin - Result := Height - ShadowDepth; -end; - -function TdxReportCard.GetContentWidth: Integer; -begin - Result := Width - ShadowDepth; -end; - -function TdxReportCard.GetHasShadow: Boolean; -begin - Result := FShadowDepth > 0; -end; - -function TdxReportCard.GetHeight: Integer; -begin - Result := inherited Height; -end; - -function TdxReportCard.GetLayerCount: Integer; -begin - Result := CellCount; -end; - -function TdxReportCard.GetLayer(Index: Integer): TdxReportCardLayer; -begin - Result := Cells[Index] as TdxReportCardLayer; -end; - -function TdxReportCard.GetLayerHeight(Index: Integer): Integer; -begin - Result := Layers[Index].Height; -end; - -function TdxReportCard.GetLayersOriginLeft: Integer; -begin - if ShadowPosition in [cspTopLeft, cspBottomLeft] then - Result := ShadowDepth - else - Result := 0; -end; - -function TdxReportCard.GetLayersOriginTop: Integer; -begin - if ShadowPosition in [cspTopLeft, cspTopRight] then - Result := ShadowDepth - else - Result := 0; -end; - -function TdxReportCard.GetReportLink: TdxGridReportLink; -begin - Result := TdxGridReportLink(ReportCells.ReportLink); -end; - -function TdxReportCard.GetShadowRectHorz: TRect; -begin - Result := BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - with Result do - case ShadowPosition of - cspTopLeft: - begin - Right := Right - ShadowDepth; - Bottom := Top + ShadowDepth; - end; - cspTopRight: - begin - Left := Left + ShadowDepth; - Bottom := Top + ShadowDepth; - end; - cspBottomRight: - begin - Left := Left + ShadowDepth; - Top := Bottom - ShadowDepth; - end; - cspBottomLeft: - begin - Right := Right - ShadowDepth; - Top := Bottom - ShadowDepth; - end; - end; -end; - -function TdxReportCard.GetShadowRectVert: TRect; -begin - Result := BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - with Result do - case ShadowPosition of - cspTopLeft: - begin - Right := Left + ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - cspTopRight: - begin - Left := Right - ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - cspBottomRight: - begin - Left := Right - ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - cspBottomLeft: - begin - Right := Left + ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - end; -end; - -procedure TdxReportCard.SetContentHeight(AValue: Integer); -begin - Height := AValue + ShadowDepth; -end; - -procedure TdxReportCard.SetContentWidth(AValue: Integer); -begin - Width := AValue + ShadowDepth; -end; - -procedure TdxReportCard.SetHeight(Value: Integer); -begin - inherited Height := Value + ShadowDepth; - SizeChanged; -end; - -procedure TdxReportCard.SetShadowDepth2(AValue: Integer); -var - SaveWidth, SaveHeight: Integer; -begin - if FShadowDepth <> AValue then - begin - SaveHeight := ContentHeight; - SaveWidth := ContentWidth; - FShadowDepth := AValue; - Height := SaveHeight; - Width := SaveWidth; - end; -end; - -procedure TdxReportCard.SetWidth(Value: Integer); -begin - inherited Width := Value + ShadowDepth; - SizeChanged; -end; - -{ TdxReportCardHorz } - -procedure TdxReportCardHorz.AdjustHeight; -var - TotalHeight, I: Integer; -begin - TotalHeight := 0; - for I := 0 to LayerCount - 1 do - Inc(TotalHeight, LayerHeights[I]); - Height := TotalHeight; -end; - -procedure TdxReportCardHorz.AdjustLayersCellSides; -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - Layers[I].AdjustCellSides; -end; - -procedure TdxReportCardHorz.AdjustLayersPos; -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - with Layers[I] do - begin - Left := LayersOriginLeft; - Top := Top + LayersOriginTop; - end; -end; - -procedure TdxReportCardHorz.AdjustRowHeight(DC: HDC; AAutoHeight: Boolean; - ABuilder: TdxGridCardViewBuilder); -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - LayerHeights[I] := Layers[I].MeasureLayerHeight(DC, not AAutoHeight, ABuilder); -end; - -procedure TdxReportCardHorz.AdjustWidth(DC: HDC); -var - AMaxLayerWidth, I: Integer; -begin - AMaxLayerWidth := 0; - for I := 0 to LayerCount - 1 do - AMaxLayerWidth := Max(AMaxLayerWidth, Layers[I].MeasureWidth(DC)); - Width := AMaxLayerWidth; -end; - -function TdxReportCardHorz.MeasureCaptionWidth(DC: HDC): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to LayerCount - 1 do - Result := Max(Result, Layers[I].MeasureCaptionWidth(DC)); -end; - -function TdxReportCardHorz.MeasureDataWidth(DC: HDC): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to LayerCount - 1 do - Result := Max(Result, Layers[I].MeasureDataWidth(DC)); -end; - -procedure TdxReportCardHorz.SizeChanged; -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - Layers[I].Width := ContentWidth; -end; - -{ TdxReportCardVert } - -procedure TdxReportCardVert.AdjustHeight; -var - TotalHeight, I: Integer; -begin - TotalHeight := 0; - for I := 0 to LayerCount - 1 do - TotalHeight := Max(TotalHeight, LayerHeights[I]); - Height := TotalHeight; -end; - -procedure TdxReportCardVert.AdjustLayers; -var - I, ALeft: Integer; - AAllFixed: Boolean; - AAutoWidths: TcxAutoWidthObject; -begin - if LayerCount = 0 then Exit; - AAutoWidths := TcxAutoWidthObject.Create(LayerCount); - try - AAllFixed := True; - for I := 0 to LayerCount - 1 do - Layers[I].InitAutoWidthItem(AAutoWidths.AddItem, AAllFixed); - if AAllFixed or (AAutoWidths.Width > Width) then - for I := 0 to AAutoWidths.Count - 1 do - AAutoWidths[I].Fixed := False; - AAutoWidths.AvailableWidth := ContentWidth; - AAutoWidths.Calculate; - ALeft := 0; - for I := 0 to LayerCount - 1 do - begin - Layers[I].NeedLayerSeparator := I > 0; - ALeft := Layers[I].SetPosition(ALeft, AAutoWidths[I].AutoWidth); - end; - finally - AAutoWidths.Free; - end; -end; - -procedure TdxReportCardVert.AdjustLayersCellSides; -var - I: Integer; - ASides: TdxCellSides; -begin - for I := 0 to LayerCount - 1 do - begin - ASides := [csTop, csBottom]; - if I = 0 then - ASides := ASides + [csLeft]; - if I = LayerCount - 1 then - ASides := ASides + [csRight]; - Layers[I].CellSides := ASides; - Layers[I].AdjustCellSides; - end; -end; - -procedure TdxReportCardVert.AdjustLayersPos; -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - with Layers[I] do Top := Top + LayersOriginTop; -end; - -procedure TdxReportCardVert.AdjustRowHeight( - DC: HDC; AAutoHeight: Boolean; ABuilder: TdxGridCardViewBuilder); -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - Layers[I].AdjustRowHeight(DC, AAutoHeight, ABuilder); -end; - -procedure TdxReportCardVert.AdjustWidth(DC: HDC); -var - AMaxWidth, I: Integer; -begin - AMaxWidth := 0; - for I := 0 to LayerCount - 1 do - Inc(AMaxWidth, Layers[I].MeasureWidth(DC)); - Width := AMaxWidth; -end; - -function TdxReportCardVert.GetLayerClass: TdxReportCardLayerClass; -begin - Result := TdxReportCardVerticalLayer; -end; - -function TdxReportCardVert.GetLayerByAbsoluteRowIndex(var AIndex: Integer): TdxReportCardLayer; -var - I: Integer; -begin - Result := nil; - for I := 0 to LayerCount - 1 do - begin - Result := Layers[I]; - if AIndex < Result.RowCount then - Break - else - Dec(AIndex, Result.RowCount); - end; -end; - -function TdxReportCardVert.GetLayerIndexByRow( - ARow: TcxGridCardViewRow): Integer; -begin - Result := ARow.Position.ColIndex; -end; - -function TdxReportCardVert.GetRowCount: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to LayerCount - 1 do - Inc(Result, Layers[I].RowCount); -end; - -function TdxReportCardVert.GetRowHeight(AIndex: Integer): Integer; -var - ALayer: TdxReportCardLayer; -begin - ALayer := GetLayerByAbsoluteRowIndex(AIndex); - Result := ALayer.Rows[AIndex].Height; -end; - -function TdxReportCardVert.HasLayerSeparator(ALayerIndex: Integer): Boolean; -begin - Result := ALayerIndex > 0; -end; - -function TdxReportCardVert.MeasureCaptionWidth(DC: HDC): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to LayerCount - 1 do - Result := Max(Result, Layers[I].MeasureCaptionWidth(DC)); -end; - -procedure TdxReportCardVert.SetCaptionWidth( - DC: HDC; ALayer, AValue, AMaxValue: Integer; ACaptionAutoWidth: Boolean); -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - Layers[ALayer].SetRowCaptionWidth(DC, ACaptionAutoWidth, AValue); -end; - -procedure TdxReportCardVert.SetLayerWidth(Index, Value: Integer); -var - Delta, I: Integer; -begin - if Value < 0 then Value := 0; - - Delta := Value - Layers[Index].Height; - Layers[Index].Width := Value; - - for I := Index + 1 to LayerCount - 1 do - Layers[I].Left := Layers[I].Left + Delta; -end; - -procedure TdxReportCardVert.SetLayerHeight(AIndex, AValue: Integer); -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - Layers[I].Height := AValue; -end; - -procedure TdxReportCardVert.SetLayersSameHeight; -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - begin - Layers[I].Height := ContentHeight; - Layers[I].ClipChildren := True; - end; -end; - -procedure TdxReportCardVert.SetRowHeight(AIndex, AValue: Integer); -var - ALayer: TdxReportCardLayer; -begin - ALayer := GetLayerByAbsoluteRowIndex(AIndex); - ALayer.SetRowHeight(AIndex, AValue); -end; - -procedure TdxReportCardVert.SizeChanged; -begin - AdjustLayers; - SetLayersSameHeight; -end; - -{ TdxGridCardViewBuilder } - -constructor TdxGridCardViewBuilder.Create(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); -begin - inherited; - FCards := TList.Create; -end; - -destructor TdxGridCardViewBuilder.Destroy; -begin - FreeAndNil(FCards); - inherited; -end; - -function TdxGridCardViewBuilder.Adapter: TdxGridCardViewAdapter; -begin - Result := inherited Adapter as TdxGridCardViewAdapter; -end; - -class function TdxGridCardViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridCardViewAdapter; -end; - -function TdxGridCardViewBuilder.Formatter: TdxGridCardViewFormatter; -begin - Result := inherited Formatter as TdxGridCardViewFormatter; -end; - -class function TdxGridCardViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxGridCardViewFormatter; -end; - -procedure TdxGridCardViewBuilder.DoBuildViewBody; -begin - CreateCards; - if not IsAborted then - begin - ResizeCards; - PlaceCards; - AdjustCardRowsCellSides; - end; -end; - -procedure TdxGridCardViewBuilder.AdjustCardRowsCellSides; -var - I: Integer; -begin - for I := 0 to CardCount - 1 do - Cards[I].AdjustLayersCellSides; -end; - -procedure TdxGridCardViewBuilder.CreateCards; -var - Producer: TdxGridCardViewCardsRowProducer; - I: Integer; -begin - Producer := GetCardsRowProducer; - - FCards.Count := Formatter.CardCount; - for I := 0 to CardCount - 1 do - begin - FCards[I] := Producer.CreateCard(Host, Formatter.Cards[I]); - if MasterBuilder = nil then - begin - Progress(100 * (I + 1) / Formatter.CardCount); - if IsAborted then Break; - end; - end; -end; - -procedure TdxGridCardViewBuilder.PlaceCards; - - procedure MakeRowIndexes(AnIndexes: TList); - var - I, PlaceWidth, EntryNumber: Integer; - begin - I := 0; - if CardCount > 0 then AnIndexes.Add(TObject(0)); - - while I < CardCount do - begin - PlaceWidth := Formatter.CardsAreaWidth; - EntryNumber := 0; - repeat - Inc(EntryNumber); - if EntryNumber > 1 then - Dec(PlaceWidth, Formatter.InterCardsSpaceHorz); - Dec(PlaceWidth, Cards[I].Width); - if (PlaceWidth >= 0) or (EntryNumber = 1) then - Inc(I); - until (PlaceWidth <= 0) or (I >= CardCount); - AnIndexes.Add(TObject(I)); - end; - end; - - procedure MakeRows(AIndexes: TList; AProducer: TdxGridCardViewCardsRowProducer); - - function GetMaxCardHeight(AStartIndex, AEndIndex: Integer): Integer; - var - I, V: Integer; - begin - Result := Cards[AStartIndex].Height; - {$IFNDEF DXVER500} - if not Formatter.KeepSameHeight then - {$ENDIF} - for I := AStartIndex + 1 to AEndIndex do - begin - V := Cards[I].Height; - if Result < V then Result := V; - end; - end; - - var - RowIndex, StartIndex, EndIndex, I, RowHeight: Integer; - ReportRow: TdxReportCell; - begin - for RowIndex := 0 to AIndexes.Count - 2 do - begin - StartIndex := Integer(AIndexes[RowIndex]); - EndIndex := Integer(AIndexes[RowIndex + 1]) - 1; - - RowHeight := GetMaxCardHeight(StartIndex, EndIndex) + Formatter.InterCardsSpaceHorz; - ReportRow := AProducer.Produce(HostInfoServices.PageDetailsHostInfo, RowHeight); - AddReportRow(ReportRow); - - for I := StartIndex to EndIndex do - AProducer.InjectCard(Cards[I], I - StartIndex); - end; - end; - -var - Indexes: TList; -begin - Indexes := TList.Create; - try - MakeRowIndexes(Indexes); - MakeRows(Indexes, GetCardsRowProducer); - finally - Indexes.Free; - end; -end; - -procedure TdxGridCardViewBuilder.ResizeCards; - - procedure SetCardsRowCaptionWidth(DC: HDC); - var - RowCaptionWidth, I, J: Integer; - ALayerCaptionWidths: array of Integer; - begin - if (CardCount = 0) or (Cards[0].LayerCount = 0) then Exit; - SetLength(ALayerCaptionWidths, Cards[0].LayerCount); - RowCaptionWidth := 0; - for J := 0 to Length(ALayerCaptionWidths) - 1 do - begin - if Formatter.CaptionAutoWidth then - begin - for I := 0 to CardCount - 1 do - if J < Cards[I].LayerCount then - ALayerCaptionWidths[J] := Max(ALayerCaptionWidths[J], Cards[I].Layers[J].MeasureCaptionWidth(DC)); - end - else - ALayerCaptionWidths[J] := Adapter.CardCaptionWidth; - RowCaptionWidth := Max(RowCaptionWidth, ALayerCaptionWidths[J]); - end; - - if (RowCaptionWidth > Adapter.CardWidth) and not Formatter.AutoWidth then - RowCaptionWidth := Adapter.CardWidth; - - for I := 0 to CardCount - 1 do - for J := 0 to Length(ALayerCaptionWidths) - 1 do - begin - Cards[I].SetCaptionWidth(DC, J, Min(ALayerCaptionWidths[J], - RowCaptionWidth), RowCaptionWidth, Formatter.CaptionAutoWidth); - end; - end; - - procedure CalcMaxCardWidth; - var - I: Integer; - begin - FMaxCardWidth := 0; - for I := 0 to CardCount - 1 do - FMaxCardWidth := Max(FMaxCardWidth, Cards[I].Width); - end; - - procedure SetCardsAutoWidth(DC: HDC); - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - Cards[I].AdjustWidth(DC); - end; - - procedure SetSameCardsWidth(AWidth: Integer); - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - with Cards[I] do - begin - Width := AWidth; - AdjustLayers; - end; - end; - - procedure SetCardsRowHeight(DC: HDC; AAutoHeight: Boolean); - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - Cards[I].AdjustRowHeight(DC, AAutoHeight, Self); - end; - - procedure SetCardsSameHeights; - var - CardRowHeights: array of Integer; - I, J: Integer; - begin - SetLength(CardRowHeights, Adapter.CardRowCount); - - for I := 0 to CardCount - 1 do - with Cards[I] do - begin - for J := 0 to RowCount - 1 do - CardRowHeights[J] := Max(CardRowHeights[J], RowHeight[J]); - end; - - for I := 0 to CardCount - 1 do - with Cards[I] do - begin - for J := 0 to RowCount - 1 do - RowHeight[J] := CardRowHeights[J]; - RecalculateLayersHeight; - end; - end; - - procedure AdjustCards; - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - with Cards[I] do - begin - AdjustHeight; - AdjustLayersPos; - end; - end; - -var - ACardColCount: Integer; -begin - FMaxCardWidth := 0; - SetCardsRowCaptionWidth(Formatter.DC); - if Formatter.AutoWidth then - begin - SetCardsAutoWidth(Formatter.DC); - CalcMaxCardWidth; - if Formatter.KeepSameWidth then - SetSameCardsWidth(FMaxCardWidth - 4); - SetCardsRowCaptionWidth(Formatter.DC); - end; - CalcMaxCardWidth; - if Formatter.CardAutoWidth then - begin - ACardColCount := Max((Formatter.ViewAvailableWidth - 4) div FMaxCardWidth, 1); - FMaxCardWidth := (Formatter.ViewAvailableWidth - (4 * ACardColCount)) div ACardColCount; - SetSameCardsWidth(FMaxCardWidth - 4); - end; - SetCardsRowHeight(Formatter.DC, Formatter.RowAutoHeight); - if Formatter.KeepSameHeight then SetCardsSameHeights; - - AdjustCards; -end; - -function TdxGridCardViewBuilder.GetCardsRowProducer: TdxGridCardViewCardsRowProducer; -begin - Result := ProducerCache[GetCardsRowProducerClass] as TdxGridCardViewCardsRowProducer; -end; - -function TdxGridCardViewBuilder.GetCardsRowProducerClass: TdxGridCardViewCardsRowProducerClass; -begin - Result := TdxGridCardViewCardsRowProducer; -end; - -function TdxGridCardViewBuilder.GridView: TcxGridCardView; -begin - Result := inherited GridView as TcxGridCardView; -end; - -class function TdxGridCardViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -function TdxGridCardViewBuilder.GetCard(Index: Integer): TdxReportCard; -begin - Result := TdxReportCard(FCards[Index]); -end; - -function TdxGridCardViewBuilder.GetCardCount: Integer; -begin - Result := FCards.Count; -end; - -function TdxGridCardViewBuilder.GetMaxCardWidth: Integer; -begin - Result := FMaxCardWidth; -end; - -{ TdxGridDBCardViewAdapter } - -function TdxGridDBCardViewAdapter.GridView: TcxGridDBCardView; -begin - Result := inherited GridView as TcxGridDBCardView; -end; - -class function TdxGridDBCardViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -procedure TdxGridDBCardViewAdapter.AfterBuilding; -begin - UnloadAllRecords; - inherited; -end; - -procedure TdxGridDBCardViewAdapter.BeforeBuilding; -begin - inherited; - LoadAllRecords; -end; - -function TdxGridDBCardViewAdapter.DataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(inherited DataController); -end; - -function TdxGridDBCardViewAdapter.DBDataModeController: TcxDBDataModeController; -begin - Result := DataController.DataModeController; -end; - -procedure TdxGridDBCardViewAdapter.LoadAllRecords; -begin - _LoadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -procedure TdxGridDBCardViewAdapter.UnloadAllRecords; -begin - _UnloadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -{ TdxGridDBCardViewBuilder } - -function TdxGridDBCardViewBuilder.Adapter: TdxGridDBCardViewAdapter; -begin - Result := inherited Adapter as TdxGridDBCardViewAdapter; -end; - -class function TdxGridDBCardViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridDBCardViewAdapter; -end; -{$IFDEF CHARTVIEW} -{ TdxGridChartViewAdapter } - -function TdxGridChartViewAdapter.GridView: TcxGridChartView; -begin - Result := inherited GridView as TcxGridChartView; -end; - -class function TdxGridChartViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridChartView; -end; - -function TdxGridChartViewAdapter.CreateGraphic(AGraphicClass: TGraphicClass; - AWidth: Integer): TGraphic; -var - AGraphic: TGraphic; -begin - if not (AGraphicClass.InheritsFrom(TBitmap) or AGraphicClass.InheritsFrom(TMetaFile)) then - begin - Result := GridView.CreateImage(TBitmap, Max(AWidth, 0), 0); - AGraphic := AGraphicClass.Create; - try - AGraphic.Assign(Result); - finally - Result.Free; - Result := AGraphic; - end; - end - else - Result := GridView.CreateImage(AGraphicClass, Max(AWidth, 0), 0); -end; - -function TdxGridChartViewAdapter.GetCanUseOnEveryPageMode: Boolean; -begin - Result := True; -end; - -{ TdxGridChartViewFormatter } - -function TdxGridChartViewFormatter.Adapter: TdxGridChartViewAdapter; -begin - Result := inherited Adapter as TdxGridChartViewAdapter; -end; - -function TdxGridChartViewFormatter.Builder: TdxGridChartViewBuilder; -begin - Result := inherited Builder as TdxGridChartViewBuilder; -end; - -function TdxGridChartViewFormatter.CreateChartImage: TGraphic; - - function GetWidth: Integer; - begin - if ReportLink.OptionsSize.AutoWidth then - Result := ViewAvailableWidth - else - Result := -1; - end; - -begin - Result := Adapter.CreateGraphic(GraphicClass, GetWidth); -end; - -procedure TdxGridChartViewFormatter.DoInitializeChartItem(AnItem: TdxReportCellGraphic); -begin - AnItem.ImageBuffering := cibNone; - AnItem.Image.Transparent := GraphicTransparent; - AnItem.ImageTransparent := GraphicTransparent; - AnItem.Center := True; -end; - -procedure TdxGridChartViewFormatter.DoReportLinkInitializeChartItem(AnItem: TdxReportCellGraphic); -begin - ReportLink.DoInitializeChartCell(Adapter.GridView, AnItem); -end; - -function TdxGridChartViewFormatter.GetChartItemClass: TdxReportCellGraphicClass; -begin - Result := TdxReportCellGraphic; -end; - -function TdxGridChartViewFormatter.GetViewWidth: Integer; -begin - Result := ViewAvailableWidth; -end; - -function TdxGridChartViewFormatter.GetGraphicClass: TGraphicClass; -begin - Result := ReportLink.OptionsCharts.GraphicClass; -end; - -function TdxGridChartViewFormatter.GetGraphicTransparent: Boolean; -begin - Result := ReportLink.OptionsCharts.Transparent; -end; - -{ TdxGridChartViewBuilder } - -function TdxGridChartViewBuilder.Adapter: TdxGridChartViewAdapter; -begin - Result := inherited Adapter as TdxGridChartViewAdapter; -end; - -class function TdxGridChartViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridChartViewAdapter; -end; - -function TdxGridChartViewBuilder.Formatter: TdxGridChartViewFormatter; -begin - Result := inherited Formatter as TdxGridChartViewFormatter; -end; - -class function TdxGridChartViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxGridChartViewFormatter; -end; - -procedure TdxGridChartViewBuilder.DoBuildViewBody; -begin - inherited; - CreateChart; -end; - -procedure TdxGridChartViewBuilder.CreateChart; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetChartProducer.Produce(HostInfoServices.PageDetailsHostInfo); - AddReportRow(ReportRow); -end; - -function TdxGridChartViewBuilder.GetChartProducer: TdxGridChartViewChartProducer; -begin - Result := ProducerCache[GetChartProducerClass] as TdxGridChartViewChartProducer; -end; - -function TdxGridChartViewBuilder.GetChartProducerClass: TdxGridChartViewChartProducerClass; -begin - Result := TdxGridChartViewChartProducer; -end; - -function TdxGridChartViewBuilder.GridView: TcxGridChartView; -begin - Result := inherited GridView as TcxGridChartView; -end; - -class function TdxGridChartViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridChartView; -end; - -{$ENDIF} - -{ TdxGridViewRowProducer } - -constructor TdxGridViewRowProducer.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; - FMasterIndents := TList.Create; -end; - -destructor TdxGridViewRowProducer.Destroy; -begin - FMasterIndents.Free; - inherited; -end; - -function TdxGridViewRowProducer.Adapter: TdxCustomGridViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridViewRowProducer.Builder: TdxCustomGridViewBuilder; -begin - Result := FBuilder; -end; - -function TdxGridViewRowProducer.Formatter: TdxCustomGridViewFormatter; -begin - Result := Builder.Formatter; -end; - -function TdxGridViewRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; -begin - FMasterIndents.Clear; - - CalculateRowHeight; - - CreateRowHost(AHostInfo); - CreateRow; - if AutoHeight then - begin - CalculateRowAutoHeight; - FixupRowHeight; - end; - - Inc(AHostInfo.Origin.Y, RowHeight); - Result := Host; -end; - -procedure TdxGridViewRowProducer.AddLeadingMasterIndentsAndSeparators; -var - LeftPos, I: Integer; -begin - LeftPos := 0; - for I := 0 to Formatter.AbsoluteLevel - 1 do - with MasterBuilders[I] do - begin - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskLeading); - AddMasterIndents(Formatter, Adapter, I, LeftPos); - end; - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskLeading); -end; - -procedure TdxGridViewRowProducer.AddMasterIndents(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; ALevel: Integer; var ALeftPos: Integer); -var - I: Integer; - Indent: TdxReportCellExpandButton; -begin - for I := 0 to AMasterAdapter.IndentCount - 1 do - begin - Indent := CreateMasterIndent(Host); - Indent.BoundsRect := MakeBounds(ALeftPos, 0, AMasterAdapter.IndentWidth, RowHeight); - InitializeMasterIndent(AMasterFormatter, Indent, I, ALevel); - Inc(ALeftPos, Indent.Width); - end; -end; - -procedure TdxGridViewRowProducer.AddMasterSeparator(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; var ALeftPos: Integer; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -var - Separator: TdxReportCellBox; -begin - if AMasterAdapter.HasDetailsSeparator then - begin - Separator := CreateDetailsSeparator(Host); - Separator.BoundsRect := MakeBounds(ALeftPos, 0, AMasterFormatter.DetailsSeparatorThickness, RowHeight); - InitializeDetailsSeparator(AMasterFormatter, Separator, ASeparatorKind); - Inc(ALeftPos, Separator.Width); - end; -end; - -procedure TdxGridViewRowProducer.AddTrailingMasterSeparators; -var - LeftPos, I: Integer; -begin - LeftPos := Width - Formatter.ViewWidthExtraAfter; - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskTrailing); - for I := Formatter.AbsoluteLevel - 1 downto 0 do - with Builder.AbsoluteBuilders[I] do - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskTrailing); -end; - -function TdxGridViewRowProducer.CalculateItemHeight(DC: HDC; AnItem: TdxReportVisualItem): Integer; -begin - Result := AnItem.MeasureContentHeight(DC); -end; - -procedure TdxGridViewRowProducer.CalculateRowAutoHeight; -var - DC: HDC; - ItemsSite: TdxReportCell; - MaxRowHeight, I, V: Integer; - Item: TdxReportVisualItem; -begin - DC := Self.DC; - ItemsSite := Self.ItemsSite; - MaxRowHeight := 0; - for I := 0 to ItemsSite.DataItemCount - 1 do - begin - Item := ItemsSite.DataItems[I]; - if DoesItemParticipateInRowAutoHeightCalculation(Item) then - begin - V := CalculateItemHeight(DC, Item); - if MaxRowHeight < V then MaxRowHeight := V; - end; - end; - {3.1} - for I := 0 to ItemsSite.CellCount - 1 do - begin - Item := ItemsSite.Cells[I]; - if DoesItemParticipateInRowAutoHeightCalculation(Item) then - begin - V := CalculateItemHeight(DC, Item); - if MaxRowHeight < V then MaxRowHeight := V; - end; - end; - if RowHeight < MaxRowHeight then - RowHeight := MaxRowHeight; -end; - -procedure TdxGridViewRowProducer.CalculateRowHeight; -begin - FRowHeight := LineCount * LineHeight; -end; - -function TdxGridViewRowProducer.CreateDetailsSeparator(AParent: TdxReportCell): TdxReportCellBox; -begin - Result := GetDetailsSeparatorClass.Create(AParent); - FMasterIndents.Add(Result); -end; - -function TdxGridViewRowProducer.CreateMasterIndent(AParent: TdxReportCell): TdxReportCellExpandButton; -begin - Result := GetMasterIndentClass.Create(AParent); - FMasterIndents.Add(Result); -end; - -procedure TdxGridViewRowProducer.CreateRow; -begin - FRow := GetRowHostClass.Create(Host); - FRow.BoundsRect := MakeBounds(RowOriginX, 0, RowWidth, RowHeight); - InitializeRow; - AddTrailingMasterSeparators; -end; - -procedure TdxGridViewRowProducer.CreateRowHost(const AHostInfo: TdxGridAttributeHostInfo); -begin - FHost := HostClass.Create(AHostInfo.Parent); - FHost.BoundsRect := MakeBounds(AHostInfo.Origin.X, AHostInfo.Origin.Y, Width, RowHeight); - InitializeHost; - AddLeadingMasterIndentsAndSeparators; -end; - -function TdxGridViewRowProducer.DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; -begin - Result := True; -end; - -function TdxGridViewRowProducer.GetDetailsSeparatorClass: TdxReportCellBoxClass; -begin - Result := Formatter.GetDetailsSeparatorClass; -end; - -function TdxGridViewRowProducer.GetMasterIndentClass: TdxReportCellExpandButtonClass; -begin - Result := Formatter.GetMasterIndentClass; -end; - -procedure TdxGridViewRowProducer.FixupMasterIndentsHeight; -var - I: Integer; -begin - for I := 0 to MasterIndentCount - 1 do - with MasterIndents[I] do - Height := Parent.Height; -end; - -procedure TdxGridViewRowProducer.FixupRowDataItemHeight(AnItem: TdxReportVisualItem); -begin - with AnItem do - Height := Parent.Height; -end; - -procedure TdxGridViewRowProducer.FixupRowDataHeight; -begin -end; - -procedure TdxGridViewRowProducer.FixupRowHeight; -begin - FixupRowOwnHeight; - FixupMasterIndentsHeight; - FixupRowDataHeight; -end; - -procedure TdxGridViewRowProducer.FixupRowOwnHeight; -begin - Host.Height := RowHeight; - Row.Height := RowHeight; - ItemsSite.Height := RowHeight; -end; - -procedure TdxGridViewRowProducer.InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - AFormatter.DoInitializeVertDetailsSeparator(ASeparator, ASeparatorKind); -end; - -procedure TdxGridViewRowProducer.InitializeMasterIndent(AFormatter: TdxCustomGridViewFormatter; - AIndent: TdxReportCellExpandButton; AIndex, ALevel: Integer); -begin - AFormatter.DoInitializeMasterIndent(AIndent, AIndex, MasterBuilders[ALevel].Adapter.IndentCount); -end; - -procedure TdxGridViewRowProducer.InitializeHost; -begin - Formatter.DoInitializeHost(Host); -end; - -procedure TdxGridViewRowProducer.InitializeRow; -begin -end; - -function TdxGridViewRowProducer.GetAutoHeight: Boolean; -begin - Result := LineCount = 1; -end; - -function TdxGridViewRowProducer.GetItemsSite: TdxReportCell; -begin - Result := Row; -end; - -function TdxGridViewRowProducer.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridViewRowProducer.GetLineHeight: Integer; -begin - Result := 20; -end; - -function TdxGridViewRowProducer.GetDC: HDC; -begin - Result := Formatter.DC; -end; - -function TdxGridViewRowProducer.GetHostClass: TdxReportCellClass; -begin - Result := Formatter.GetHostClass; -end; - -function TdxGridViewRowProducer.GetIndentWidth: Integer; -begin - Result := Adapter.IndentWidth; -end; - -function TdxGridViewRowProducer.GetMasterBuilder(Index: Integer): TdxCustomGridViewBuilder; -begin - Result := Builder.AbsoluteBuilders[Index]; -end; - -function TdxGridViewRowProducer.GetMasterIndent(Index: Integer): TdxReportCellBox; -begin - Result := TdxReportCellBox(FMasterIndents[Index]); -end; - -function TdxGridViewRowProducer.GetMasterIndentCount: Integer; -begin - Result := FMasterIndents.Count; -end; - -function TdxGridViewRowProducer.GetRowHostClass: TdxReportCellClass; -begin - Result := Formatter.GetRowHostClass; -end; - -function TdxGridViewRowProducer.GetWidth: Integer; -begin - with Formatter do - Result := ViewWidthExtraBefore + ViewWidth + ViewWidthExtraAfter; -end; - -function TdxGridViewRowProducer.GetRowOriginX: Integer; -begin - Result := Formatter.ViewWidthExtraBefore; -end; - -function TdxGridViewRowProducer.GetRowWidth: Integer; -begin - Result := Formatter.ViewWidth; -end; - -{ TdxGridViewCustomRowProducer } - -function TdxGridViewCustomRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; -begin - Result := inherited Produce(AHostInfo); - AddItem; -end; - -procedure TdxGridViewCustomRowProducer.AddItem; -begin - FItem := CreateItem(Row); - FItem.BoundsRect := MakeRect(0, 0, RowWidth, RowHeight); - InitializeItem; -end; - -function TdxGridViewCustomRowProducer.CreateItem(AParent: TdxReportCell): TAbstractdxReportCellData; -begin - Result := GetItemClass.Create(AParent); -end; - -procedure TdxGridViewCustomRowProducer.FixupRowDataHeight; -begin - inherited; - FixupRowDataItemHeight(Item); -end; - -procedure TdxGridViewCustomRowProducer.InitializeItem; -begin -end; - -function TdxGridViewCustomRowProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxGridViewCustomRowProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := TAbstractdxReportCellData; -end; - -{ TdxGridViewCaptionProducer } - -procedure TdxGridViewCaptionProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeCaption(Item); - Formatter.DoReportLinkInitializeCaption(Item); -end; - -procedure TdxGridViewCaptionProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeCaptionRow(Row); -end; - -function TdxGridViewCaptionProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetCaptionClass; -end; - -function TdxGridViewCaptionProducer.GetLineHeight: Integer; -begin - Result := Formatter.CaptionLineHeight; -end; - -function TdxGridViewCaptionProducer.GetItem: TdxReportCellText; -begin - Result := TdxReportCellText(inherited Item); -end; - -{ TdxGridViewFilterBarProducer } - -procedure TdxGridViewFilterBarProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeFilterBar(Item); - Formatter.DoReportLinkInitializeFilterBar(Item); -end; - -procedure TdxGridViewFilterBarProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeFilterBarRow(Row); -end; - -function TdxGridViewFilterBarProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetFilterBarClass; -end; - -function TdxGridViewFilterBarProducer.GetLineHeight: Integer; -begin - Result := Formatter.FilterBarLineHeight; -end; - -function TdxGridViewFilterBarProducer.GetItem: TdxReportCellText; -begin - Result := TdxReportCellText(inherited Item); -end; - -{ TdxGridViewDetailsSeparatorProducer } - -procedure TdxGridViewDetailsSeparatorProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeHorzDetailsSeparator(Item); -end; - -procedure TdxGridViewDetailsSeparatorProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeDetailsSeparatorRow(Row); -end; - -function TdxGridViewDetailsSeparatorProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetDetailsSeparatorClass; -end; - -function TdxGridViewDetailsSeparatorProducer.GetLineHeight: Integer; -begin - Result := Formatter.DetailsSeparatorThickness; -end; - -function TdxGridViewDetailsSeparatorProducer.GetItem: TdxReportCellBox; -begin - Result := TdxReportCellBox(inherited Item); -end; - -{ TdxGridViewDetailsTopSeparatorProducer } - -procedure TdxGridViewDetailsTopSeparatorProducer.InitializeDetailsSeparator( - AFormatter: TdxCustomGridViewFormatter; ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - if AFormatter = Formatter then - AFormatter.DoInitializeVertTopDetailsSeparator(ASeparator, ASeparatorKind) - else - inherited; -end; - -{ TdxGridViewDetailsBottomSeparatorProducer } - -procedure TdxGridViewDetailsBottomSeparatorProducer.InitializeDetailsSeparator( - AFormatter: TdxCustomGridViewFormatter; ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - if AFormatter = Formatter then - AFormatter.DoInitializeVertBottomDetailsSeparator(ASeparator, ASeparatorKind) - else - inherited; -end; - -{ TdxGridViewTerminatorProducer } - -procedure TdxGridViewTerminatorProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeViewTerminator(Item); -end; - -function TdxGridViewTerminatorProducer.GetLineHeight: Integer; -begin - Result := 1; -end; - -{ TdxGridTableViewRowProducer } - -function TdxGridTableViewRowProducer.Adapter: TdxGridTableViewAdapter; -begin - Result := inherited Adapter as TdxGridTableViewAdapter; -end; - -function TdxGridTableViewRowProducer.Builder: TdxGridTableViewBuilder; -begin - Result := inherited Builder as TdxGridTableViewBuilder; -end; - -function TdxGridTableViewRowProducer.Formatter: TdxGridTableViewFormatter; -begin - Result := Builder.Formatter; -end; - -{ TdxGridTableViewRowSubItemsProducer } - -constructor TdxGridTableViewRowSubItemsProducer.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FIndents := TList.Create; - FSubItems := TList.Create; -end; - -destructor TdxGridTableViewRowSubItemsProducer.Destroy; -begin - FreeAndNil(FSubItems); - FreeAndNil(FIndents); - inherited; -end; - -function TdxGridTableViewRowSubItemsProducer.Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; -begin - InitializeIndentList; - InitializeSubItemList; - Result := inherited Produce(AHostInfo); -end; - -procedure TdxGridTableViewRowSubItemsProducer.AddIndents(AParent: TdxReportCell); -begin -end; - -procedure TdxGridTableViewRowSubItemsProducer.AddSubItems(AParent: TdxReportCell); -var - I: Integer; - Item: TAbstractdxReportCellData; -begin - for I := 0 to GetSubItemCount - 1 do - if HasSubItem[I] then - begin - Item := CreateSubItem(I, AParent); - Item.BoundsRect := SubItemBounds[I]; // needed before item initialization - InitializeSubItem(Item, I); - end; -end; - -procedure TdxGridTableViewRowSubItemsProducer.CreateRow; -begin - inherited; - AddIndents(Row); - AddSubItems(Row); -end; - -function TdxGridTableViewRowSubItemsProducer.CreateSubItem(AnIndex: Integer; - AParent: TdxReportCell): TAbstractdxReportCellData; -begin - Result := SubItemClasses[AnIndex].Create(AParent); - FSubItems[AnIndex] := Result; -end; - -function TdxGridTableViewRowSubItemsProducer.IsItemIndent(AnItem: TdxReportVisualItem): Boolean; -begin - Result := FIndents.IndexOf(AnItem) <> -1; -end; - -procedure TdxGridTableViewRowSubItemsProducer.FixupIndentsHeight; -var - I: Integer; -begin - for I := 0 to IndentCount - 1 do - with Indents[I] do - Height := Parent.Height; -end; - -procedure TdxGridTableViewRowSubItemsProducer.FixupRowDataHeight; -var - I: Integer; - SubItem: TdxReportVisualItem; -begin - for I := 0 to SubItemCount - 1 do {.SubItemCount} - begin - SubItem := SubItems[I]; - if SubItem <> nil then - FixupRowDataItemHeight(SubItem); - end; -end; - -procedure TdxGridTableViewRowSubItemsProducer.FixupRowHeight; -begin - inherited; - FixupIndentsHeight; -end; - -procedure TdxGridTableViewRowSubItemsProducer.InitializeIndentList; -begin - FIndents.Clear; - FIndents.Count := GetIndentCount; -end; - -procedure TdxGridTableViewRowSubItemsProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin -end; - -procedure TdxGridTableViewRowSubItemsProducer.InitializeSubItemList; -begin - FSubItems.Clear; - FSubItems.Count := GetSubItemCount; -end; - -function TdxGridTableViewRowSubItemsProducer.GetHasSubItem(Index: Integer): Boolean; -begin - Result := True; -end; - -function TdxGridTableViewRowSubItemsProducer.GetIndentCount: Integer; -begin - Result := 0; -end; - -function TdxGridTableViewRowSubItemsProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := MakeRect(0, 0, -1, -1); -end; - -function TdxGridTableViewRowSubItemsProducer.GetSubItemCount: Integer; -begin - Result := Formatter.ColumnCount; -end; - -function TdxGridTableViewRowSubItemsProducer.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := Formatter.Columns[Index]; -end; - -function TdxGridTableViewRowSubItemsProducer.GetIndent(Index: Integer): TdxReportCellExpandButton; -begin - Result := TdxReportCellExpandButton(FIndents[Index]); -end; - -function TdxGridTableViewRowSubItemsProducer.GetSubItem(Index: Integer): TdxReportVisualItem; -begin - Result := TdxReportVisualItem(FSubItems[Index]); -end; - -{ TdxGridTableViewHeadersProducer } - -procedure TdxGridTableViewHeadersProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeHeaderRow(Row); -end; - -procedure TdxGridTableViewHeadersProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeHeaderItem(ASubItem, AIndex); - Formatter.DoReportLinkInitializeHeaderItem(ASubItem, AIndex); -end; - -function TdxGridTableViewHeadersProducer.GetAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.HeaderAutoHeight; -end; - -function TdxGridTableViewHeadersProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TdxGridTableViewHeadersProducer.GetLineHeight: Integer; -begin - Result := Formatter.HeaderLineHeight; -end; - -function TdxGridTableViewHeadersProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetHeaderItemBounds(Index); -end; - -function TdxGridTableViewHeadersProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetHeaderItemClass(Index); -end; - -{ TdxGridTableViewFootersProducer } - -procedure TdxGridTableViewFootersProducer.CalculateRowAutoHeight; -begin - inherited; - Inc(FRowHeight, 2 * FooterItemInflateVert); -end; - -procedure TdxGridTableViewFootersProducer.CalculateRowHeight; -begin - if AutoHeight then - inherited - else - RowHeight := LineCount * LineHeight; -end; - -procedure TdxGridTableViewFootersProducer.FixupRowDataItemHeight(AnItem: TdxReportVisualItem); -begin - with AnItem do - Height := Parent.Height - 2 * FooterItemInflateVert; -end; - -procedure TdxGridTableViewFootersProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeFooterRow(Row); -end; - -procedure TdxGridTableViewFootersProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -var - ARowIndex, ARealIndex, AColIndex: Integer; -begin - inherited; - AColIndex := Adapter.GetFooterItemInfo(SummaryItems, AIndex, ARowIndex); - ARealIndex := Adapter.CheckSummaryItemIndex(SummaryItems, AIndex, False); - Formatter.DoInitializeFooterItem(ASubItem, ARealIndex, SummaryItems[ARealIndex]); - Formatter.DoReportLinkInitializeFooterItem(ASubItem, AColIndex); -end; - -function TdxGridTableViewFootersProducer.GetAutoHeight: Boolean; -var - I: Integer; -begin - Result := inherited GetAutoHeight and - Adapter.FooterMultiline and Adapter.FooterMultiSummaries; - if Result then - begin - for I := 0 to SubItemCount - 1 do - if HasSubItem[I] then Exit; - Result := False; - end; -end; - -function TdxGridTableViewFootersProducer.GetHasSubItem(Index: Integer): Boolean; -var - ARowIndex: Integer; -begin - Adapter.GetFooterItemInfo(SummaryItems, Index, ARowIndex); - Result := Adapter.FooterMultiSummaries or (ARowIndex = 0); -end; - -function TdxGridTableViewFootersProducer.GetLineCount: Integer; -begin - Result := Adapter.GetFooterLineCount(SummaryItems, Adapter.FooterMultiSummaries); -end; - -function TdxGridTableViewFootersProducer.GetLineHeight: Integer; -begin - Result := Formatter.FooterLineHeight; -end; - -function TdxGridTableViewFootersProducer.GetSubItemBound(Index: Integer): TRect; -var - AColIndex, ARowIndex: Integer; -begin - AColIndex := Adapter.GetFooterItemInfo(SummaryItems, Index, ARowIndex); - Result := Formatter.GetFooterItemBounds(AColIndex); - if Adapter.FooterMultiSummaries then - begin - Result.Top := LineHeight * ARowIndex; - Result.Bottom := Result.Top + LineHeight; - InflateRect(Result, 0, -FooterItemInflateVert); - end; -end; - -function TdxGridTableViewFootersProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetFooterItemClass(Index); -end; - -function TdxGridTableViewFootersProducer.GetSubItemCount: Integer; -begin - Result := Adapter.GetFooterItemCount(SummaryItems, True, False); -end; - -function TdxGridTableViewFootersProducer.GetSummaryItems: TcxDataSummaryItems; -begin - Result := Adapter.Summary.FooterSummaryItems; -end; - -{ TdxGridTableViewCustomDataRowProducer } - -function TdxGridTableViewCustomDataRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AGridRowIndex: Integer): TdxReportCell; -begin - FGridRow := AGridRow; - FGridRowIndex := AGridRowIndex; - Result := inherited Produce(AHostInfo); - FGridRowIndex := -1; - FGridRow := nil; -end; - -function TdxGridTableViewCustomDataRowProducer.GridRow: TcxCustomGridRow; -begin - Result := FGridRow; -end; - -procedure TdxGridTableViewCustomDataRowProducer.AddIndents(AParent: TdxReportCell); -var - I: Integer; - Indent: TdxReportCellExpandButton; -begin - inherited; - for I := 0 to IndentCount - 1 do - begin - Indent := CreateIndent(I, AParent); - Indent.BoundsRect := IndentBounds[I]; - InitializeIndent(Indent, I); - end; -end; - -function TdxGridTableViewCustomDataRowProducer.CreateIndent(AnIndex: Integer; - AParent: TdxReportCell): TdxReportCellExpandButton; -begin - Result := Formatter.CreateIndent(AParent); - FIndents[AnIndex] := Result; -end; - -procedure TdxGridTableViewCustomDataRowProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin -end; - -function TdxGridTableViewCustomDataRowProducer.GetIndentCount: Integer; -begin - Result := GridRow.Level; -end; - -function TdxGridTableViewCustomDataRowProducer.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridTableViewCustomDataRowProducer.GetLineHeight: Integer; -begin - Result := DefaultDataRowLineHeight; -end; - -function TdxGridTableViewCustomDataRowProducer.GetIndentArea: Integer; -begin - Result := IndentCount * IndentWidth; -end; - -function TdxGridTableViewCustomDataRowProducer.GetIndentBounds(Index: Integer): TRect; -begin - Result := MakeBounds(IndentWidth * Index, 0, IndentWidth, RowHeight); -end; - -{ TdxCustomGridTableViewRowSeparatorProducer } - -function TdxCustomGridTableViewRowSeparatorProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow): TdxReportCell; -begin - Result := inherited Produce(AHostInfo, AGridRow, -1); -end; - -procedure TdxCustomGridTableViewRowSeparatorProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeRowSeparatorIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -function TdxCustomGridTableViewRowSeparatorProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxCustomGridTableViewRowSeparatorProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := MakeRect(IndentArea, 0, RowWidth, RowHeight); -end; - -function TdxCustomGridTableViewRowSeparatorProducer.GetSubItemCount: Integer; -begin - Result := 1; -end; - -{ TdxGridTableViewRowSeparatorProducer } - -function TdxGridTableViewRowSeparatorProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AnIsLast: Boolean): TdxReportCell; -begin - FIsLast := AnIsLast; - Result := inherited Produce(AHostInfo, AGridRow); -end; - -procedure TdxGridTableViewRowSeparatorProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeSeparatorRow(Row); -end; - -procedure TdxGridTableViewRowSeparatorProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - Formatter.DoInitializeRowSeparator(ASubItem); -end; - -function TdxGridTableViewRowSeparatorProducer.GetIndentCount: Integer; -begin - if not IsLast then - begin - Result := inherited GetIndentCount; - if (Result <> 0) and Adapter.IsOffice11StyleGrouping and not (GridRow is TcxGridGroupRow) then {.2} - Dec(Result); - end - else - Result := 0; -end; - -function TdxGridTableViewRowSeparatorProducer.GetLineHeight: Integer; -begin - Result := Formatter.RowSeparatorThickness; -end; - -function TdxGridTableViewRowSeparatorProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetRowSeparatorClass; -end; - -{ TdxGridTableViewGroupRowSeparatorProducer } - -procedure TdxGridTableViewGroupRowSeparatorProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeGroupSeparatorRow(Row); -end; - -procedure TdxGridTableViewGroupRowSeparatorProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupRowSeparator(ASubItem); -end; - -function TdxGridTableViewGroupRowSeparatorProducer.GetLineHeight: Integer; -begin - Result := Formatter.GroupRowSeparatorThickness; -end; - -function TdxGridTableViewGroupRowSeparatorProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetGroupRowSeparatorClass; -end; - -{ TdxGridTableViewDataRowProducer } - -function TdxGridTableViewDataRowProducer.GridRow: TcxGridDataRow; -begin - Result := inherited GridRow as TcxGridDataRow; -end; - -procedure TdxGridTableViewDataRowProducer.AddPreview(AParent: TdxReportCell); -begin - FPreviewItem := CreatePreview(Row); - - PreviewItem.Left := IndentArea; - // We have to set Width before because we use that value for PreviewHeight calculation - PreviewItem.Width := Width - IndentArea; - Formatter.DoInitializePreview(TAbstractdxReportCellData(PreviewItem), PreviewColumn, GridRow); - PreviewItem.Height := PreviewHeight; - PreviewItem.AdjustContent(Formatter.DC); {3.1} -end; - -procedure TdxGridTableViewDataRowProducer.AddSubItems(AParent: TdxReportCell); -begin - inherited; - if HasPreview then AddPreview(AParent); -end; - -procedure TdxGridTableViewDataRowProducer.CalculateRowAutoHeight; -begin - if CellAutoHeight then inherited; - if PreviewItem <> nil then - RowHeight := RowHeight + PreviewItem.Height; -end; - -function TdxGridTableViewDataRowProducer.CreatePreview(AParent: TdxReportCell): TdxReportVisualItem; -begin - Result := GetPreviewClass.Create(AParent); - FPreviewItem := Result; -end; - -function TdxGridTableViewDataRowProducer.DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; -var - TableItem: TcxCustomGridTableItem; - Properties: TcxCustomEditProperties; -begin - Result := AnItem <> FPreviewItem; - // 3.2 - if Result and not IsItemIndent(AnItem) then - begin - TableItem := TcxCustomGridTableItem(AnItem.Data); - Properties := Adapter.GetProperties(TableItem, GridRow); - Result := dxPScxCommon.dxPSDataMaps.DoesItemParticipateInAutoHeightCalculation(Properties); - end; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewClass: TdxReportCellDataClass; -begin - Result := Formatter.GetPreviewClass(PreviewColumn, GridRow); -end; - -procedure TdxGridTableViewDataRowProducer.FixupRowDataHeight; -var - NewHeight, I: Integer; - Item: TdxReportVisualItem; -begin - NewHeight := RowHeight; - if PreviewItem <> nil then - Dec(NewHeight, PreviewItem.Height); - - for I := 0 to Row.DataItemCount - 1 do - begin - Item := Row.DataItems[I]; - if Item = PreviewItem then - if PreviewPlace = cxGridTableView.ppTop then - Item.Top := 0 - else - Item.Top := NewHeight - else - if IsItemIndent(Item) then - begin - Item.Top := 0; - Item.Height := RowHeight; - end - else - begin - if CellAutoHeight then - Item.Height := NewHeight; - if HasPreview and (PreviewPlace = cxGridTableView.ppTop) then - Item.Top := Item.Top + PreviewItem.Height; - end; - end; - {3.1} - for I := 0 to Row.CellCount - 1 do - begin - Item := Row.Cells[I]; - if Item = PreviewItem then - if PreviewPlace = cxGridTableView.ppTop then - Item.Top := 0 - else - Item.Top := NewHeight - else - begin - if CellAutoHeight then - Item.Height := NewHeight; - if HasPreview and (PreviewPlace = cxGridTableView.ppTop) then - Item.Top := Item.Top + PreviewItem.Height; - end; - end; -end; - -procedure TdxGridTableViewDataRowProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeDataRowIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewDataRowProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeDataRow(Row, GridRow); -end; - -procedure TdxGridTableViewDataRowProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeItem(ASubItem, Columns[AIndex], GridRow, False); - Formatter.DoReportLinkInitializeItem(ASubItem, Columns[AIndex], GridRow); -end; - -function TdxGridTableViewDataRowProducer.GetAutoHeight: Boolean; -begin - Result := CellAutoHeight or HasPreview; -end; - -function TdxGridTableViewDataRowProducer.GetCellAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.CellAutoHeight; -end; - -function TdxGridTableViewDataRowProducer.GetHasPreview: Boolean; -begin - Result := Formatter.HasPreview; -end; - -function TdxGridTableViewDataRowProducer.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount; - if (Result <> 0) and Adapter.IsOffice11StyleGrouping then {.2} - Dec(Result); -end; - -function TdxGridTableViewDataRowProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TdxGridTableViewDataRowProducer.GetLineHeight: Integer; -begin - if Formatter.HeaderLineCount = 1 then - Result := Formatter.RowHeights[GridRowIndex] - else - Result := Formatter.DetailsLineHeight; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewHeight: Integer; -begin - Result := PreviewLineCount * PreviewLineHeight; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewLineCount: Integer; -begin - if FPreviewItem <> nil then - if not Formatter.PreviewAutoHeight then - begin - Result := PreviewItem.CalculateLineCount(Formatter.DC); - if Result <> Formatter.PreviewMaxLineCount then - Result := Formatter.PreviewMaxLineCount; - end - else - Result := 1 - else - Result := 0; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewLineHeight: Integer; -var - LineHeight: Integer; -begin - if FPreviewItem <> nil then - if Formatter.PreviewAutoHeight then - begin - Result := PreviewItem.MeasureContentHeight(Formatter.DC); - if Formatter.PreviewMaxLineCount <> 0 then - begin - LineHeight := PreviewItem.MeasureFontHeight(Formatter.DC); - if Result > LineHeight * Formatter.PreviewMaxLineCount then - Result := LineHeight * Formatter.PreviewMaxLineCount; - end; - end - else - Result := PreviewItem.MeasureFontHeight(Formatter.DC) - else - Result := 0; -end; - -function TdxGridTableViewDataRowProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetItemBounds(GridRow, GridRowIndex, Index); -end; - -function TdxGridTableViewDataRowProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetItemClass(Columns[Index], GridRow, False); -end; - -function TdxGridTableViewDataRowProducer.GetPreviewColumn: TcxGridColumn; -begin - Result := Adapter.PreviewColumn; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewPlace: TcxGridPreviewPlace; -begin - Result := Adapter.PreviewPlace; -end; - -{ TdxGridTableViewGroupRowProducer} - -function TdxGridTableViewGroupRowProducer.GridRow: TcxGridGroupRow; -begin - Result := inherited GridRow as TcxGridGroupRow; -end; - -function TdxGridTableViewGroupRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AGridRowIndex: Integer): TdxReportCell; -begin - SummaryItemInfoList := TcxObjectList.Create; - try - Result := inherited Produce(AHostInfo, AGridRow, AGridRowIndex); - finally - FreeAndNil(SummaryItemInfoList); - end; -end; - -procedure TdxGridTableViewGroupRowProducer.AddSubItems(AParent: TdxReportCell); -var - I: Integer; - Item: TAbstractdxReportCellData; -begin - for I := GetSubItemCount - 1 downto 0 do - if HasSubItem[I] then - begin - Item := CreateSubItem(I, AParent); - Item.BoundsRect := SubItemBounds[I]; // needed before item initialization - Item.Data := Integer(SummaryItemInfos[I]); - InitializeSubItem(Item, I); - end; -end; - -procedure TdxGridTableViewGroupRowProducer.AddSummaryGroupInfo( - AItem: TcxDataSummaryItem; const ADisplayText: string); -var - AInfo: TcxGridSummaryItemInfo; -begin - if ADisplayText = '' then Exit; - AInfo := TcxGridSummaryItemInfo.Create; - if AItem <> nil then - AInfo.Column := TcxGridColumn(AItem.ItemLink); - if (AInfo.Column <> nil) and (AInfo.Column.VisibleIndex < 0) then Exit; - if not Formatter.AlignSummaryWithColumns or ((AInfo.Column <> nil) and (AInfo.Column.VisibleIndex < 0)) then - AInfo.Column := nil; - if AInfo.Column <> nil then - begin - Formatter.Adapter.Styles.GetGroupSummaryCellContentParams( - GridRow, AItem, AInfo.ViewParams); - AInfo.ViewParams.Color := RowViewParams.Color; - AInfo.ViewParams.Bitmap := RowViewParams.Bitmap; - end - else - AInfo.ViewParams := RowViewParams; - AInfo.DisplayText := ADisplayText; - if AItem <> nil then - AInfo.SummaryIndex := AItem.Index; - AInfo.Bounds := MakeRect(IndentArea, 0, RowWidth, LineHeight); - SummaryItemInfoList.Add(AInfo); -end; - -procedure TdxGridTableViewGroupRowProducer.DeleteInfo(AIndex: Integer); -begin - SummaryItemInfoList.Items[AIndex].Free; - SummaryItemInfoList.Delete(AIndex); -end; - -procedure TdxGridTableViewGroupRowProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeGroupRow(Row, GridRow); -end; - -procedure TdxGridTableViewGroupRowProducer.InitializeIndent( - AIndent: TdxReportCellExpandButton; AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupRowIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewGroupRowProducer.InitializeSubItem( - ASubItem: TAbstractdxReportCellData; AIndex: Integer); -const - Alignment2TextAlign: array[TAlignment] of TcxTextAlignX = - (taLeft, taRight, taCenterX); -begin - inherited; - Formatter.DoInitializeGroupRowItem(ASubItem, GridRow, - AIndex, SummaryItemInfos[AIndex].DisplayText); - if AIndex <> 0 then - begin - ASubItem.CellSides := []; - TdxReportCellString(ASubItem).TextAlignX := - Alignment2TextAlign[SummaryItemInfos[AIndex].Column.GroupSummaryAlignment]; - TdxReportCellString(ASubItem).EndEllipsis := True; - end; -end; - -procedure TdxGridTableViewGroupRowProducer.InitializeSubItemList; -begin - SummaryItemInfoList.Clear; - PrepareSummaryItemsInfo; - PrepareSummaryItemsBounds; - inherited InitializeSubItemList; -end; - -function TdxGridTableViewGroupRowProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewGroupRowProducer.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount + 1; -end; - -function TdxGridTableViewGroupRowProducer.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridTableViewGroupRowProducer.GetLineHeight: Integer; -begin - Result := Formatter.RowHeights[GridRowIndex];//}Formatter.GroupRowLineHeight; {3.1} -end; - -function TdxGridTableViewGroupRowProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := SummaryItemInfos[Index].Bounds; -end; - -function TdxGridTableViewGroupRowProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetGroupRowClass; -end; - -function CompareSummaryItemsInfo(AInfo1, AInfo2: TcxGridSummaryItemInfo): Integer; -begin - if AInfo1.Column = AInfo2.Column then - Result := AInfo1.SummaryIndex - AInfo2.SummaryIndex - else - if AInfo1.Column = nil then - Result := -1 - else - if AInfo2.Column = nil then - Result := 1 - else - Result := AInfo1.Column.VisibleIndex - AInfo2.Column.VisibleIndex; -end; - -function TdxGridTableViewGroupRowProducer.GetSubItemCount: Integer; -begin - Result := SummaryItemInfoList.Count; -end; - -procedure TdxGridTableViewGroupRowProducer.PrepareSummaryItemsInfo; -var - I: Integer; - S: string; - AValues: PVariant; - AItems: TcxDataSummaryItems; -begin - if not GridRow.GetGroupSummaryInfo(AItems, AValues) then Exit; - Formatter.Adapter.Styles.GetGroupParams(GridRow, GridRow.Level, RowViewParams); - for I := 0 to AItems.Count - 1 do - if AItems[I].Position = spGroup then - AddSummaryGroupInfo(AItems[I], AItems[I].FormatValue(AValues^[I], False)); - SummaryItemInfoList.Sort(@CompareSummaryItemsInfo); - I := 0; - with GridRow.GroupSummaryItems do - begin - while I < SubItemCount do - begin - with SummaryItemInfos[I] do - begin - if (I < (SubItemCount - 1)) and (Column = SummaryItemInfos[I + 1].Column) then - begin - DisplayText := DisplayText + Separator + ' ' + SummaryItemInfos[I + 1].DisplayText; - DeleteInfo(I + 1); - Continue; - end - else - Inc(I); - end; - end; - if (SubItemCount > 0) and (SummaryItemInfos[0].Column = nil) then - begin - with GridRow.GroupSummaryItems do - SummaryItemInfos[0].DisplayText := GridRow.DisplayCaption + BeginText + - SummaryItemInfos[0].DisplayText + EndText; - cxGridCustomTableView.TcxCustomGridTableItemAccess.DoGetDisplayText( - GridRow.GroupedColumn, GridRow, SummaryItemInfos[0].DisplayText); - end - else - begin - S := GridRow.DisplayCaption; - if SubItemCount = 0 then - begin - S := GridRow.DisplayText;; - cxGridCustomTableView.TcxCustomGridTableItemAccess.DoGetDisplayText( - GridRow.GroupedColumn, GridRow, S); - end; - AddSummaryGroupInfo(nil, S); - SummaryItemInfoList.Exchange(0, SubItemCount - 1); - end; - end; -end; - -procedure TdxGridTableViewGroupRowProducer.PrepareSummaryItemsBounds; -var - I, AMinLeft: Integer; - AItem: TcxGridSummaryItemInfo; -begin - if SubItemCount = 0 then Exit; - AItem := SummaryItemInfos[0]; - AMinLeft := AItem.Bounds.Left + - cxTextWidth(AItem.ViewParams.Font, AItem.DisplayText) + cxTextOffset * 2; - I := 1; - while I < SubItemCount do - begin - AItem := SummaryItemInfos[I]; - with Formatter.GetHeaderItemBounds(SummaryItemInfos[I].Column.VisibleIndex) do - begin - AItem.Bounds.Left := Left; - AItem.Bounds.Right := Right; - end; - if AItem.Bounds.Left < AMinLeft then - AItem.Bounds.Left := AMinLeft; - if AItem.Bounds.Left >= AItem.Bounds.Right then - DeleteInfo(I) - else - Inc(I); - end; -end; - -function TdxGridTableViewGroupRowProducer.GetSummaryItemInfo( - Index: Integer): TcxGridSummaryItemInfo; -begin - Result := SummaryItemInfoList[Index] as TcxGridSummaryItemInfo; -end; - -{ TdxGridTableViewMasterRowProducer } - -function TdxGridTableViewMasterRowProducer.GridRow: TcxGridMasterDataRow; -begin - Result := inherited GridRow as TcxGridMasterDataRow; -end; - -procedure TdxGridTableViewMasterRowProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - //inherited; - Formatter.DoInitializeMasterDataRowIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewMasterRowProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - if AIndex = 0 then - ASubItem.CellSides := ASubItem.CellSides - [csLeft]; -end; - -function TdxGridTableViewMasterRowProducer.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount + 1; -end; - -{ TdxGridTableViewGroupFooterProducer } - -function TdxGridTableViewGroupFooterProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AGroupLevel, AnIndex: Integer): TdxReportCell; -begin - FGroupLevel := AGroupLevel; - FIndex := AnIndex; - Adapter.Summary.GetGroupSummaryInfo(GetCorrectRowIndex(AGridRow, - AGroupLevel), SummaryItems, SummaryValues); - FInternalLineCount := Adapter.GetFooterLineCount( - SummaryItems, Adapter.GroupFooterMultiSummaries); - Result := inherited Produce(AHostInfo, AGridRow, -1); - FGroupLevel := -1; -end; - -procedure TdxGridTableViewGroupFooterProducer.AddSubItems(AParent: TdxReportCell); - - function SubstituteParent(AParent: TdxReportCell): TdxReportCell; - begin - Result := TdxReportCell.Create(AParent); - Result.BoundsRect := HostBounds; - Formatter.DoInitializeGroupFooterHost(Result, GridRow, GroupLevel); - end; - -begin - FItemsSite := SubstituteParent(AParent); - inherited AddSubItems(ItemsSite); -end; - -procedure TdxGridTableViewGroupFooterProducer.CalculateRowAutoHeight; -begin - inherited; - Inc(FRowHeight, FooterItemInflateVert); -end; - -procedure TdxGridTableViewGroupFooterProducer.FixupRowDataItemHeight(AnItem: TdxReportVisualItem); -begin - with AnItem do - Height := Parent.Height - 2 * FooterItemInflateVert; -end; - -procedure TdxGridTableViewGroupFooterProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupFooterIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewGroupFooterProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeGroupFooterRow(Row, GridRow, GroupLevel); -end; - -procedure TdxGridTableViewGroupFooterProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - AIndex := Adapter.CheckSummaryItemIndex(SummaryItems, AIndex, False); - Formatter.DoInitializeGroupFooterItem(ASubItem, - GridRow, GroupLevel, SummaryValues^[AIndex], SummaryItems[AIndex]); - Formatter.DoReportLinkInitializeGroupFooterItem(ASubItem, - TcxGridColumn(SummaryItems[AIndex].ItemLink), GridRow, GroupLevel); -end; - -function TdxGridTableViewGroupFooterProducer.GetAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.GroupFootersMultiline and - ((ItemsSite.DataItemCount <> 0) or (ItemsSite.CellCount <> 0)); -end; - -function TdxGridTableViewGroupFooterProducer.GetCorrectRowIndex( - AGridRow: TcxCustomGridRow; AGroupLevel: Integer): Integer; -begin - if Adapter.GroupFootersMode = gfVisibleWhenExpanded then - Dec(AGroupLevel); - while (AGridRow.Level > AGroupLevel) and (AGridRow.Level > 0) do - AGridRow := TcxCustomGridRow(AGridRow.ParentRecord); - Result := AGridRow.Index; -end; - -function TdxGridTableViewGroupFooterProducer.GetHasSubItem(Index: Integer): Boolean; -begin - Result := True; -end; - -function TdxGridTableViewGroupFooterProducer.GetIndentCount: Integer; -begin - Result := GroupLevel; - if Adapter.GroupFootersMode = gfVisibleWhenExpanded then - begin - Inc(Result); - if Adapter.IsOffice11StyleGrouping and (Index = 0) and not (GridRow is TcxGridGroupRow) then - Dec(Result); - end -end; - -function TdxGridTableViewGroupFooterProducer.GetItemsSite: TdxReportCell; -begin - Result := FItemsSite; -end; - -function TdxGridTableViewGroupFooterProducer.GetLineCount: Integer; -begin - Result := InternalLineCount; -end; - -function TdxGridTableViewGroupFooterProducer.GetLineHeight: Integer; -begin - Result := Formatter.GroupFooterLineHeight; -end; - -function TdxGridTableViewGroupFooterProducer.GetSubItemBound(Index: Integer): TRect; -var - AColIndex, ARowIndex: Integer; -begin - AColIndex := Adapter.GetFooterItemInfo(SummaryItems, Index, ARowIndex); - Result := Formatter.GetGroupFooterItemBounds(AColIndex, IndentCount); - if Adapter.GroupFooterMultiSummaries then - begin - Result.Top := LineHeight * ARowIndex; - Result.Bottom := Result.Top + LineHeight; - InflateRect(Result, 0, -FooterItemInflateVert); - end; -end; - -function TdxGridTableViewGroupFooterProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetGroupFooterItemClass(Index); -end; - -function TdxGridTableViewGroupFooterProducer.GetSubItemCount: Integer; -begin - Result := Adapter.GetFooterItemCount( - SummaryItems, Adapter.GetGroupFooterMultiSummaries, False) -end; - -function TdxGridTableViewGroupFooterProducer.GetGroupLevel: Integer; -begin - Result := FGroupLevel; - if Adapter.GroupFootersMode = gfVisibleWhenExpanded then - Dec(Result); -end; - -function TdxGridTableViewGroupFooterProducer.GetHostBounds: TRect; -begin - Result := MakeRect(IndentArea, 0, Row.Width, Row.Height); -end; - -{ TdxGridTableViewBandsProducer } - -function TdxGridTableViewBandsProducer.Adapter: TdxGridBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridBandedTableViewAdapter; -end; - -function TdxGridTableViewBandsProducer.Builder: TdxGridBandedTableViewBuilder; -begin - Result := inherited Builder as TdxGridBandedTableViewBuilder; -end; - -function TdxGridTableViewBandsProducer.Formatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -function TdxGridTableViewBandsProducer.GetSubItemCount: Integer; -begin - Result := Formatter.BandCount; -end; - -procedure TdxGridTableViewBandsProducer.CalculateRowHeight; -begin - FRowHeight := Formatter.ItemPlaceController.Height; -end; - -procedure TdxGridTableViewBandsProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeBandRow(Row); -end; - -procedure TdxGridTableViewBandsProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeBandItem(ASubItem, AIndex); - Formatter.DoReportLinkInitializeBandItem(ASubItem, AIndex); -end; - -function TdxGridTableViewBandsProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewBandsProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetBandItemBounds(Index); -end; - -function TdxGridTableViewBandsProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetBandItemClass(Index); -end; - -{ TdxGridCardViewCardsRowProducer } - -function TdxGridCardViewCardsRowProducer.Adapter: TdxGridCardViewAdapter; -begin - Result := inherited Adapter as TdxGridCardViewAdapter; -end; - -function TdxGridCardViewCardsRowProducer.Builder: TdxGridCardViewBuilder; -begin - Result := inherited Builder as TdxGridCardViewBuilder; -end; - -function TdxGridCardViewCardsRowProducer.Formatter: TdxGridCardViewFormatter; -begin - Result := inherited Formatter as TdxGridCardViewFormatter; -end; - -function TdxGridCardViewCardsRowProducer.CreateCard(AParent: TdxReportCell; - AGridCard: TcxGridCard): TdxReportCard; -begin - Result := Formatter.GetCardClass(AGridCard).CreateEx(AParent, AGridCard); - Formatter.DoInitializeCard(Result, AGridCard); -end; - -procedure TdxGridCardViewCardsRowProducer.InjectCard(ACard: TdxReportCard; - AIndex: Integer); -begin - ACard.Parent := Row; - ACard.Left := Formatter.InterCardsSpaceHorz div 2 + - AIndex * (Builder.MaxCardWidth + Formatter.InterCardsSpaceHorz); - ACard.Top := Formatter.InterCardsSpaceVert div 2; -end; - -function TdxGridCardViewCardsRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - ARowHeight: Integer): TdxReportCell; -begin - FRowHeight := ARowHeight; - Result := inherited Produce(AHostInfo); -end; - -procedure TdxGridCardViewCardsRowProducer.CalculateRowHeight; -begin -end; - -function TdxGridCardViewCardsRowProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -procedure TdxGridCardViewCardsRowProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeCardsRow(Row); -end; - -{$IFDEF CHARTVIEW} -{ TdxGridViewChartRowProducer } - -function TdxGridChartViewChartProducer.Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; -begin - try - Result := inherited Produce(AHostInfo); - finally - FreeAndNil(FChartImage); - end; -end; - -function TdxGridChartViewChartProducer.Formatter: TdxGridChartViewFormatter; -begin - Result := inherited Formatter as TdxGridChartViewFormatter; -end; - -procedure TdxGridChartViewChartProducer.CalculateRowHeight; -begin - if ChartImage <> nil then - RowHeight := ChartImage.Height - else - inherited; -end; - -procedure TdxGridChartViewChartProducer.InitializeItem; -begin - inherited; - Item.Image := ChartImage; - - Formatter.DoInitializeChartItem(Item); - Formatter.DoReportLinkInitializeChartItem(Item); -end; - -function TdxGridChartViewChartProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetChartItemClass; -end; - -function TdxGridChartViewChartProducer.GetChartImage: TGraphic; -begin - if FChartImage = nil then - FChartImage := Formatter.CreateChartImage; - Result := FChartImage; -end; - -function TdxGridChartViewChartProducer.GetItem: TdxReportCellGraphic; -begin - Result := inherited Item as TdxReportCellGraphic; -end; - -{$ENDIF} - -{ TdxGridReportLinkOptions } - -function TdxGridReportLinkOptions.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsCardsShadow } - -constructor TdxGridReportLinkCardsShadow.Create(AnOptionsCards: TdxGridReportLinkOptionsCards); -begin - inherited Create; - RestoreDefaults; - FOptionsCards := AnOptionsCards; -end; - -procedure TdxGridReportLinkCardsShadow.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkCardsShadow then - with TdxGridReportLinkCardsShadow(Source) do - begin - Self.Color := Color; - Self.Depth := Depth; - Self.Position := Position; - end - else - inherited; -end; - -procedure TdxGridReportLinkCardsShadow.RestoreDefaults; -begin - inherited; - Color := clDefault; - Depth := dxDefaultCardsShadowDepth; - Position := cspBottomRight; -end; - -procedure TdxGridReportLinkCardsShadow.Changed; -begin - if OptionsCards <> nil then OptionsCards.Changed; -end; - -function TdxGridReportLinkCardsShadow.GetActualColor: TColor; -begin - Result := Color; - if Result = clDefault then - Result := dxDefaultCardsShadowColor; -end; - -function TdxGridReportLinkCardsShadow.GetVisible: Boolean; -begin - Result := Depth <> 0; -end; - -procedure TdxGridReportLinkCardsShadow.SetColor(Value: TColor); -begin - if FColor <> Value then - begin - FColor := Value; - if Visible then Changed; - end; -end; - -procedure TdxGridReportLinkCardsShadow.SetDepth(Value: TdxGridCardShadowDepth); -begin - if FDepth <> Value then - begin - FDepth := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkCardsShadow.SetPosition(Value: TdxGridCardShadowPosition); -begin - if FPosition <> Value then - begin - FPosition := Value; - if Visible then Changed; - end; -end; - -{ TdxGridReportLinkOptionsCards } - -destructor TdxGridReportLinkOptionsCards.Destroy; -begin - FreeAndNil(FShadow); - inherited; -end; - -procedure TdxGridReportLinkOptionsCards.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsCards then - with TdxGridReportLinkOptionsCards(Source) do - begin - Self.AutoWidth := AutoWidth; - Self.Borders := Borders; - Self.InterCardsSpaceHorz := InterCardsSpaceHorz; - Self.InterCardsSpaceVert := InterCardsSpaceVert; - Self.KeepSameHeight := KeepSameHeight; - Self.KeepSameWidth := KeepSameWidth; - Self.RowBordersHorz := RowBordersHorz; - Self.RowBordersVert := RowBordersVert; - Self.Shadow := Shadow; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsCards.RestoreDefaults; -begin - inherited; - AutoWidth := False; - Borders := True; - InterCardsSpaceHorz := dxDefaultInterCardsSpaceHorz; - InterCardsSpaceVert := dxDefaultInterCardsSpaceVert; - KeepSameHeight := True; - KeepSameWidth := True; - RowBordersHorz := False; - RowBordersVert := False; - Shadow.RestoreDefaults; -end; - -function TdxGridReportLinkOptionsCards.DesignerTabIndex: Integer; -begin - Result := 5; -end; - -function TdxGridReportLinkOptionsCards.GetShadowClass: TdxGridReportLinkCardsShadowClass; -begin - Result := TdxGridReportLinkCardsShadow; -end; - -function TdxGridReportLinkOptionsCards.GetShadow: TdxGridReportLinkCardsShadow; -begin - if FShadow = nil then - FShadow := GetShadowClass.Create(Self); - Result := FShadow; -end; - -procedure TdxGridReportLinkOptionsCards.SetAutoWidth(Value: Boolean); -begin - if FAutoWidth <> Value then - begin - FAutoWidth := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetBorders(Value: Boolean); -begin - if FBorders <> Value then - begin - FBorders := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetInterCardsSpaceHorz(Value: Integer); -begin - if Value < 0 then Value := 0; - if FInterCardsSpaceHorz <> Value then - begin - FInterCardsSpaceHorz := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetInterCardsSpaceVert(Value: Integer); -begin - if Value < 0 then Value := 0; - if FInterCardsSpaceVert <> Value then - begin - FInterCardsSpaceVert := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetKeepSameHeight(Value: Boolean); -begin - if FKeepSameHeight <> Value then - begin - FKeepSameHeight := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetKeepSameWidth(Value: Boolean); -begin - if FKeepSameWidth <> Value then - begin - FKeepSameWidth := Value; - if AutoWidth then Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetRowBordersHorz(Value: Boolean); -begin - if FRowBordersHorz <> Value then - begin - FRowBordersHorz := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetRowBordersVert(Value: Boolean); -begin - if FRowBordersVert <> Value then - begin - FRowBordersVert := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetShadow(Value: TdxGridReportLinkCardsShadow); -begin - Shadow.Assign(Value); -end; - -{ TdxGridReportLinkOptionsPagination } - -procedure TdxGridReportLinkOptionsPagination.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsPagination then - with TdxGridReportLinkOptionsPagination(Source) do - begin - Self.OneGroupPerPage := OneGroupPerPage; - Self.TopLevelGroup := TopLevelGroup; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsPagination.RestoreDefaults; -begin - inherited; - OneGroupPerPage := False; - TopLevelGroup := False; -end; - -function TdxGridReportLinkOptionsPagination.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TdxGridReportLinkOptionsPagination.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsPagination.SetOneGroupPerPage(Value: Boolean); -begin - if FOneGroupPerPage <> Value then - begin - FOneGroupPerPage := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsPagination.SetTopLevelGroup(Value: Boolean); -begin - if FTopLevelGroup <> Value then - begin - FTopLevelGroup := Value; - Changed; - end; -end; - -{$IFDEF CHARTVIEW} -{ TdxGridReportLinkOptionsCharts } - -procedure TdxGridReportLinkOptionsCharts.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsCharts then - with TdxGridReportLinkOptionsCharts(Source) do - begin - Self.GraphicClass := GraphicClass; - Self.Transparent := Transparent; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsCharts.RestoreDefaults; -begin - inherited; - FIsGraphicClassAssigned := False; - Transparent := False; -end; - -function TdxGridReportLinkOptionsCharts.DefaultGraphicClass: TGraphicClass; -begin - Result := TBitmap; -end; - -function TdxGridReportLinkOptionsCharts.SupportsGraphicClass(AGraphicClass: TGraphicClass): Boolean; -begin - Result := (AGraphicClass <> nil) and not AGraphicClass.InheritsFrom(TIcon); -end; - -function TdxGridReportLinkOptionsCharts.DesignerTabIndex: Integer; -begin - Result := 6; -end; - -function TdxGridReportLinkOptionsCharts.GetGraphicClass: TGraphicClass; -begin - if FIsGraphicClassAssigned then - Result := FGraphicClass - else - Result := DefaultGraphicClass; -end; - -function TdxGridReportLinkOptionsCharts.GetGraphicClassName: string; -begin - Result := GraphicClass.ClassName; -end; - -function TdxGridReportLinkOptionsCharts.IsGraphicClassNameStored: Boolean; -begin - Result := FIsGraphicClassAssigned; -end; - -procedure TdxGridReportLinkOptionsCharts.SetGraphicClass(Value: TGraphicClass); -begin - if Value = nil then - Value := DefaultGraphicClass; - if (GraphicClass <> Value) and SupportsGraphicClass(Value) then - begin - FGraphicClass := Value; - FIsGraphicClassAssigned := Value <> DefaultGraphicClass; - end; -end; - -procedure TdxGridReportLinkOptionsCharts.SetGraphicClassName(const Value: string); -var - AClass: TClass; -begin - AClass := Classes.GetClass(Value); - if (AClass <> nil) and AClass.InheritsFrom(TGraphic) then - GraphicClass := TGraphicClass(AClass) - else - GraphicClass := nil; -end; - -procedure TdxGridReportLinkOptionsCharts.SetTransparent(Value: Boolean); -begin - if FTransparent <> Value then - begin - FTransparent := Value; - Changed; - end; -end; - -{$ENDIF} - -{ TdxGridReportLinkOptionsDetails } - -procedure TdxGridReportLinkOptionsDetails.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsDetails then - with TdxGridReportLinkOptionsDetails(Source) do - begin - Self.OnlyFocusedView := OnlyFocusedView; - Self.StartFromFocusedView := StartFromFocusedView; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsDetails.RestoreDefaults; -begin - inherited; - OnlyFocusedView := False; - StartFromFocusedView := False; -end; - -function TdxGridReportLinkOptionsDetails.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -procedure TdxGridReportLinkOptionsDetails.SetOnlyFocusedView(Value: Boolean); -begin - if FOnlyFocusedView <> Value then - begin - FOnlyFocusedView := Value; - if StartFromFocusedView then Changed; - end; -end; - -procedure TdxGridReportLinkOptionsDetails.SetStartFromFocusedView(Value: Boolean); -begin - if FStartFromFocusedView <> Value then - begin - FStartFromFocusedView := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsExpanding } - -procedure TdxGridReportLinkOptionsExpanding.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsExpanding then - with TdxGridReportLinkOptionsExpanding(Source) do - begin - {$IFDEF DXVER500} - Self.ExpandCards := ExpandCards; - {$ENDIF} - Self.ExpandGroupRows := ExpandGroupRows; - Self.ExpandMasterRows := ExpandMasterRows; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsExpanding.RestoreDefaults; -begin - inherited; - {$IFDEF DXVER500} - ExpandCards := False; - {$ENDIF} - ExpandGroupRows := False; - ExpandMasterRows := False; -end; - -function TdxGridReportLinkOptionsExpanding.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TdxGridReportLinkOptionsExpanding.GetHasAny: Boolean; -begin - Result := ExpandGroupRows or ExpandMasterRows {$IFDEF DXVER500} or ExpandCards {$ENDIF}; -end; - -function TdxGridReportLinkOptionsExpanding.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{$IFDEF DXVER500} -procedure TdxGridReportLinkOptionsExpanding.SetExpandCards(Value: Boolean); -begin - if FExpandCards <> Value then - begin - FExpandCards := Value; - Changed; - end; -end; -{$ENDIF} - -procedure TdxGridReportLinkOptionsExpanding.SetExpandGroupRows(Value: Boolean); -begin - if FExpandGroupRows <> Value then - begin - FExpandGroupRows := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsExpanding.SetExpandMasterRows(Value: Boolean); -begin - if FExpandMasterRows <> Value then - begin - FExpandMasterRows := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsFormatting } - -procedure TdxGridReportLinkOptionsFormatting.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsFormatting then - with TdxGridReportLinkOptionsFormatting(Source) do - begin - Self.ConsumeSelectionStyle := ConsumeSelectionStyle; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsFormatting.RestoreDefaults; -begin - inherited; - ConsumeSelectionStyle := False; -end; - -function TdxGridReportLinkOptionsFormatting.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TdxGridReportLinkOptionsFormatting.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsFormatting.SetConsumeSelectionStyle(Value: Boolean); -begin - if FConsumeSelectionStyle <> Value then - begin - FConsumeSelectionStyle := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsLevels } - -{ TdxGridReportLinkOptionsLevels } - -procedure TdxGridReportLinkOptionsLevels.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsLevels then - with TdxGridReportLinkOptionsLevels(Source) do - begin - Self.RiseActiveLevelOntoTop := RiseActiveLevelOntoTop; - Self.SkipEmptyViews := SkipEmptyViews; - Self.Unwrap := Unwrap; - Self.UnwrapTopLevel := UnwrapTopLevel; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsLevels.RestoreDefaults; -begin - inherited; - RiseActiveLevelOntoTop := True; - SkipEmptyViews := True; - Unwrap := False; - UnwrapTopLevel := True; -end; - -function TdxGridReportLinkOptionsLevels.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -procedure TdxGridReportLinkOptionsLevels.SetRiseActiveLevelOntoTop(Value: Boolean); -begin - if FRiseActiveLevelOntoTop <> Value then - begin - FRiseActiveLevelOntoTop := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsLevels.SetSkipEmptyViews(Value: Boolean); -begin - if FSkipEmptyViews <> Value then - begin - FSkipEmptyViews := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsLevels.SetUnwrap(Value: Boolean); -begin - if FUnwrap <> Value then - begin - FUnwrap := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsLevels.SetUnwrapTopLevel(Value: Boolean); -begin - if FUnwrapTopLevel <> Value then - begin - FUnwrapTopLevel := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsOnEveryPage } - -procedure TdxGridReportLinkOptionsOnEveryPage.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsOnEveryPage then - with TdxGridReportLinkOptionsOnEveryPage(Source) do - begin - Self.Caption := Caption; - Self.FilterBar := FilterBar; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.RestoreDefaults; -begin - inherited; - Caption := True; - FilterBar := True; -end; - -function TdxGridReportLinkOptionsOnEveryPage.HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; -begin - if AnAttribute.InheritsFrom(TdxGridLevelCaption) then - Result := Caption - else - if AnAttribute.InheritsFrom(TdxGridBandHeader) then - Result := BandHeaders - else - if AnAttribute.InheritsFrom(TdxGridHeader) then - Result := Headers - else - if AnAttribute.InheritsFrom(TdxGridFooter) then - Result := Footers - else - if AnAttribute.InheritsFrom(TdxGridFilterBar) then - Result := FilterBar - else - Result := False; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.SetAll; -begin - BandHeaders := True; - Caption := True; - FilterBar := True; - Footers := True; - Headers := True; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.UnsetAll; -begin - BandHeaders := False; - Caption := False; - FilterBar := False; - Footers := False; - Headers := False; -end; - -function TdxGridReportLinkOptionsOnEveryPage.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TdxGridReportLinkOptionsOnEveryPage.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.SetCaption(Value: Boolean); -begin - if FCaption <> Value then - begin - FCaption := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.SetFilterBar(Value: Boolean); -begin - if FFilterBar <> Value then - begin - FFilterBar := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsPreview } - -function TdxGridReportLinkOptionsPreview.DesignerTabIndex: Integer; -begin - Result := 4; -end; - -function TdxGridReportLinkOptionsPreview.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsRefinements } - -function TdxGridReportLinkOptionsRefinements.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TdxGridReportLinkOptionsRefinements.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsSelection } - -function TdxGridReportLinkOptionsSelection.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TdxGridReportLinkOptionsSelection.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsSize } - -function TdxGridReportLinkOptionsSize.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TdxGridReportLinkOptionsSize.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsView } - -procedure TdxGridReportLinkOptionsView.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsView then - with TdxGridReportLinkOptionsView(Source) do - begin - Self.Caption := Caption; - Self.FilterBar := FilterBar; - Self.GroupFooters := GroupFooters; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsView.RestoreDefaults; -begin - inherited; - Caption := True; - FilterBar := True; - GroupFooters := True; -end; - -function TdxGridReportLinkOptionsView.HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; -begin - if AnAttribute.InheritsFrom(TdxGridLevelCaption) then - Result := Caption - else - if AnAttribute.InheritsFrom(TdxGridBandHeader) then - Result := BandHeaders - else - if AnAttribute.InheritsFrom(TdxGridHeader) then - Result := Headers - else - if AnAttribute.InheritsFrom(TdxGridFooter) then - Result := Footers - else - if AnAttribute.InheritsFrom(TdxGridFilterBar) then - Result := FilterBar - else - Result := False; -end; - -procedure TdxGridReportLinkOptionsView.SetAll; -begin - BandHeaders := True; - Caption := True; - FilterBar := True; - Footers := True; - GroupFooters := True; - Headers := True; - ExpandButtons := True; -end; - -procedure TdxGridReportLinkOptionsView.UnsetAll; -begin - BandHeaders := False; - Caption := False; - FilterBar := False; - Footers := False; - GroupFooters := False; - Headers := False; - ExpandButtons := False; -end; - -function TdxGridReportLinkOptionsView.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TdxGridReportLinkOptionsView.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsView.SetCaption(Value: Boolean); -begin - if FCaption <> Value then - begin - FCaption := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsView.SetFilterBar(Value: Boolean); -begin - if FFilterBar <> Value then - begin - FFilterBar := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsView.SetGroupFooters(Value: Boolean); -begin - if FGroupFooters <> Value then - begin - FGroupFooters := Value; - Changed; - end; -end; - -{ TdxGridAttributeHostInfo } - -procedure TdxGridAttributeHostInfo.Initialize(AParent: TdxReportCell); -begin - Origin := NullPoint; - FParent := AParent; -end; - -{ TdxGridAttributeHostInfoServices } - -constructor TdxGridAttributeHostInfoServices.Create(AReportLink: TdxGridReportLink); -begin - inherited Create; - FReportLink := AReportLink; - CreateHostInfos; -end; - -destructor TdxGridAttributeHostInfoServices.Destroy; -begin - DestroyHostInfos; - inherited; -end; - -procedure TdxGridAttributeHostInfoServices.Initialize; -begin - PageDetailsHostInfo.Initialize(PageDetails); - PageFootersHostInfo.Initialize(PageFooters); - PageHeadersHostInfo.Initialize(PageHeaders); -end; - -procedure TdxGridAttributeHostInfoServices.CreateHostInfos; -begin - FPageDetailsHostInfo := TdxGridAttributeHostInfo.Create; - FPageFootersHostInfo := TdxGridAttributeHostInfo.Create; - FPageHeadersHostInfo := TdxGridAttributeHostInfo.Create; -end; - -procedure TdxGridAttributeHostInfoServices.DestroyHostInfos; -begin - FreeAndNil(FPageHeadersHostInfo); - FreeAndNil(FPageFootersHostInfo); - FreeAndNil(FPageDetailsHostInfo); -end; - -function TdxGridAttributeHostInfoServices.GetBandHeadersHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseBandHeadersOnEveyPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetCaptionHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseCaptionOnEveryPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetFilterBarHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseFilterBarOnEveryPage then - if ActiveViewHelper.IsFilterBarAtTop(ActiveView) then - Result := PageHeadersHostInfo - else - Result := PageFootersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetFootersHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseFootersOnEveryPage then - Result := PageFootersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetHeadersHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseHeadersOnEveryPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetInconsistentStateText: string; -begin - if ReportLink.IsAggregated then - Result := cxGetResourceString(@sdxCannotUseOnEveryPageModeInAggregatedState) - else - if ReportLink.ProcessParams.HasMasterDetails then - Result := cxGetResourceString(@sdxCannotUseOnEveryPageMode) - else - if IsInconsistentFilterBarState then - Result := cxGetResourceString(@sdxIncorrectFilterBarState) - else - if IsInconsistentBandHeadersState then - if ActiveViewHelper.IsFilterBarAtTop(ActiveView) then - Result := cxGetResourceString(@sdxIncorrectBandHeadersState2) - else - Result := cxGetResourceString(@sdxIncorrectBandHeadersState) - else - if IsInconsistentHeadersState then - if ActiveViewHelper.IsFilterBarAtTop(ActiveView) then - Result := cxGetResourceString(@sdxIncorrectHeadersState2) - else - Result := cxGetResourceString(@sdxIncorrectHeadersState) - else - if IsInconsistentFootersState then - Result := cxGetResourceString(@sdxIncorrectFootersState) - else - Result := ''; -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentState: Boolean; -begin - Result := ReportLink.IsAggregated or ReportLink.ProcessParams.HasMasterDetails or - IsInconsistentFilterBarState or IsInconsistentBandHeadersState or - IsInconsistentHeadersState or IsInconsistentFootersState; -end; - -function TdxGridAttributeHostInfoServices.HasCells: Boolean; -begin - Result := ReportLink.ReportCells <> nil; -end; - -function TdxGridAttributeHostInfoServices.IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := ActiveViewHelper.IsAttributeSupported(AnAttribute) -end; - -function TdxGridAttributeHostInfoServices.GetActiveView: TcxCustomGridView; -begin - Result := ReportLink.ActiveView; -end; - -function TdxGridAttributeHostInfoServices.GetActiveViewHelper: TdxCustomGridViewHelperClass; -begin - Result := ReportLink.ActiveViewHelper; -// if ActiveView = nil then -// Result := TdxNullGridViewHelper -// else -// Result := dxViewHelpersFactory[ActiveView]; -end; - -function TdxGridAttributeHostInfoServices.GetArePageFootersAssigned: Boolean; -begin - with ReportLink.ReportCells do - Result := (FootersHostInfo.Parent = FooterCells) or (FilterBarHostInfo.Parent = FooterCells); -end; - -function TdxGridAttributeHostInfoServices.GetArePageHeadersAssigned: Boolean; -begin - with ReportLink.ReportCells do - Result := (CaptionHostInfo.Parent = HeaderCells) or (FilterBarHostInfo.Parent = HeaderCells) or - (BandHeadersHostInfo.Parent = HeaderCells) or (HeadersHostInfo.Parent = HeaderCells); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseBandHeadersOnEveyPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridBandHeader) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridLevelCaption) and - (ActiveViewHelper.IsFilterBarAtBottom(ActiveView) or ReportLink.IsAttributeUsedOnEveryPage(TdxGridFilterBar)); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseCaptionOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridLevelCaption); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseFilterBarOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridFilterBar) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridLevelCaption); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseFootersOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridFooter) and - (ActiveViewHelper.IsFilterBarAtTop(ActiveView) or ReportLink.IsAttributeUsedOnEveryPage(TdxGridFilterBar)); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseHeadersOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridHeader) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridLevelCaption) and - (ActiveViewHelper.IsFilterBarAtBottom(ActiveView) or ReportLink.IsAttributeUsedOnEveryPage(TdxGridFilterBar)) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridBandHeader); -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentBandHeadersState: Boolean; -begin - Result := IsAttributeSupported(TdxGridBandHeader) and OptionsOnEveryPage.BandHeaders and OptionsView.BandHeaders and - ((IsAttributeSupported(TdxGridLevelCaption) and OptionsView.Caption and not OptionsOnEveryPage.Caption) or - (IsAttributeSupported(TdxGridFilterBar) and ActiveViewHelper.IsFilterBarAtTop(ActiveView) and - OptionsView.FilterBar and not OptionsOnEveryPage.FilterBar)); -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentFilterBarState: Boolean; -begin - Result := ActiveViewHelper.IsFilterBarAtTop(ActiveView) and - (IsAttributeSupported(TdxGridFilterBar) and OptionsView.FilterBar and OptionsOnEveryPage.FilterBar and - IsAttributeSupported(TdxGridLevelCaption) and OptionsView.Caption and not OptionsOnEveryPage.Caption); -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentFootersState: Boolean; -begin - Result := IsAttributeSupported(TdxGridFooter) and OptionsView.Footers and OptionsOnEveryPage.Footers and - IsAttributeSupported(TdxGridFilterBar) and ActiveViewHelper.IsFilterBarAtBottom(ActiveView) and - OptionsView.FilterBar and not OptionsOnEveryPage.FilterBar; -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentHeadersState: Boolean; -begin - Result := IsAttributeSupported(TdxGridHeader) and OptionsView.Headers and OptionsOnEveryPage.Headers and - ((IsAttributeSupported(TdxGridLevelCaption) and OptionsView.Caption and not OptionsOnEveryPage.Caption) or - (IsAttributeSupported(TdxGridFilterBar) and ActiveViewHelper.IsFilterBarAtTop(ActiveView) and - OptionsView.FilterBar and not OptionsOnEveryPage.FilterBar) or - (IsAttributeSupported(TdxGridBandHeader) and OptionsView.BandHeaders and not OptionsOnEveryPage.BandHeaders)); -end; - -function TdxGridAttributeHostInfoServices.GetLevelSeparatorBottomHostInfo: TdxGridAttributeHostInfo; -begin - if ArePageFootersAssigned then - Result := PageFootersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetLevelSeparatorTopHostInfo: TdxGridAttributeHostInfo; -begin - if ArePageHeadersAssigned then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; -begin - Result := ReportLink.OptionsOnEveryPage; -end; - -function TdxGridAttributeHostInfoServices.GetOptionsView: TdxGridReportLinkOptionsView; -begin - Result := ReportLink.OptionsView; -end; - -function TdxGridAttributeHostInfoServices.GetPageDetails: TdxReportCell; -begin - if HasCells then - Result := ReportLink.ReportCells.Cells - else - Result := nil; -end; - -function TdxGridAttributeHostInfoServices.GetPageFooters: TdxReportCell; -begin - if HasCells and not ReportLink.ProcessParams.HasMasterDetails then - Result := ReportLink.ReportCells.FooterCells - else - Result := PageDetails; -end; - -function TdxGridAttributeHostInfoServices.GetPageHeaders: TdxReportCell; -begin - if HasCells and not ReportLink.ProcessParams.HasMasterDetails then - Result := ReportLink.ReportCells.HeaderCells - else - Result := PageDetails; -end; - -{ TdxGridReportLinkStyles } - -procedure TdxGridReportLinkStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxGridReportLinkStyles then - with TdxGridReportLinkStyles(Source) do - begin - Self.BandHeader := BandHeader; - Self.Caption := Caption; - Self.CardCaptionRow := CardCaptionRow; - Self.CardRowCaption := CardRowCaption; - Self.Content := Content; - Self.ContentEven := ContentEven; - Self.ContentOdd := ContentOdd; - Self.FilterBar := FilterBar; - Self.Footer := Footer; - Self.Group := Group; - Self.Header := Header; - Self.Preview := Preview; - Self.Selection := Selection; - end; // TODO: assign to TcxGridXXXStyles -end; - -procedure TdxGridReportLinkStyles.GetBandHeaderParams(ABand: TcxGridBand; - out AParams: TcxViewParams); -begin - GetViewParams(vspsGridBandHeader, ABand, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetCaptionParams(ATabLevel: TcxGridLevel; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridCaption, ATabLevel, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetCardCaptionRowParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -var - DataCellPos: TdxPSGridDataCellPos; -begin - DataCellPos := CreatePSDataCellPos; - try - with DataCellPos do - begin - GridRecord := ARecord; - Item := AItem; - end; - GetViewParams(vspsGridCardCaptionRow, DataCellPos, nil, AParams); - finally - FreePSDataCellPos(DataCellPos); - end; -end; - -procedure TdxGridReportLinkStyles.GetCardRowCaptionParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -var - DataCellPos: TdxPSGridDataCellPos; -begin - DataCellPos := CreatePSDataCellPos; - try - with DataCellPos do - begin - GridRecord := ARecord; - Item := AItem; - end; - GetViewParams(vspsGridCardRowCaption, DataCellPos, nil, AParams); - finally - FreePSDataCellPos(DataCellPos); - end; -end; - -procedure TdxGridReportLinkStyles.GetContentParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -const - StyleIndexes: array[Boolean] of Integer = (vspsGridContentEven, vspsGridContentOdd); -var - DataCellPos: TdxPSGridDataCellPos; -begin - if (ARecord <> nil) and (GetValue(StyleIndexes[Odd(ARecord.Index)]) <> nil) then - begin - DataCellPos := CreatePSDataCellPos; - try - with DataCellPos do - begin - GridRecord := ARecord; - Item := AItem; - end; - GetViewParams(StyleIndexes[Odd(ARecord.Index)], DataCellPos, nil, AParams); - finally - FreePSDataCellPos(DataCellPos); - end; - end - else - GetViewParams(vspsGridContent, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetFilterBarParams(out AParams: TcxViewParams); -begin - GetViewParams(vspsGridFilterBar, nil, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetFooterParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; AItem: TcxGridColumn; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridFooter, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetGroupParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridGroup, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetHeaderParams(AItem: TcxGridColumn; - out AParams: TcxViewParams); -begin - GetViewParams(vspsGridHeader, nil, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetPreviewParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridPreview, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetSelectionParams(out AParams: TcxViewParams); -begin - GetViewParams(vspsGridSelection, nil, nil, AParams); -end; - -function TdxGridReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 3; -end; - -procedure TdxGridReportLinkStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -const - FixedParts = [vspsGridBandHeader, vspsGridCaption, vspsGridFooter, vspsGridHeader, - vspsGridSelection]; -begin - inherited; - if ReportLink <> nil then - with AParams do - begin - if Index in FixedParts then - Color := dxPSCore.dxDefaultFixedColor - else - if Index = vspsGridGroup then - if ReportLink.IsOffice11StyleGrouping and (AData = nil) then - Color := dxPSCore.dxDefaultFixedColor - else - Color := dxPSCore.dxDefaultContentColor - else - if Index = vspsGridFilterBar then - Color := DefaultFilterBarColor - else - Color := dxPSCore.dxDefaultContentColor; - - Font := ReportLink.Font; - - if Index = vspsGridFilterBar then - TextColor := DefaultFilterBarTextColor - else - TextColor := Font.Color; - end; -end; - -class function TdxGridReportLinkStyles.GetStyleCaption(AnIndex: Integer): string; -begin - case AnIndex of - vspsGridBandHeader: - Result := cxGetResourceString(@sdxBandHeaderStyle); - vspsGridCaption: - Result := cxGetResourceString(@sdxCaptionStyle); - vspsGridCardCaptionRow: - Result := cxGetResourceString(@sdxCardCaptionRowStyle); - vspsGridCardRowCaption: - Result := cxGetResourceString(@sdxCardRowCaptionStyle); - vspsGridContent: - Result := cxGetResourceString(@sdxContentStyle); - vspsGridContentEven: - Result := cxGetResourceString(@sdxContentEvenStyle); - vspsGridContentOdd: - Result := cxGetResourceString(@sdxContentOddStyle); - vspsGridFilterBar: - Result := cxGetResourceString(@sdxFilterBarStyle); - vspsGridFooter: - Result := cxGetResourceString(@sdxFooterStyle); - vspsGridGroup: - Result := cxGetResourceString(@sdxGroupStyle); - vspsGridHeader: - Result := cxGetResourceString(@sdxHeaderStyle); - vspsGridPreview: - Result := cxGetResourceString(@sdxPreviewStyle); - else - Result := cxGetResourceString(@sdxSelectionStyle); - end; -end; - -function TdxGridReportLinkStyles.GetStyleIndexByCaption(const Caption: string): Integer; -begin - for Result := vspsGridFirst to vspsGridLast do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Result)) then - Exit; - Result := -1; -end; - -function TdxGridReportLinkStyles.IsCardViewStyle(AStyle: TcxStyle): Boolean; -begin - Result := (AStyle <> nil) and ((AStyle = CardRowCaption) or (AStyle = CardCaptionRow)); -end; - -function TdxGridReportLinkStyles.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkStyleSheet } - -class function TdxGridReportLinkStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TdxGridReportLinkStyles; -end; - -function TdxGridReportLinkStyleSheet.GetStylesValue: TdxGridReportLinkStyles; -begin - if GetStyles is TdxGridReportLinkStyles then - Result := TdxGridReportLinkStyles(GetStyles) - else - Result := nil; -end; - -procedure TdxGridReportLinkStyleSheet.SetStylesValue(Value: TdxGridReportLinkStyles); -begin - SetStyles(Value); -end; - -{ TdxGridReportLink } - -constructor TdxGridReportLink.Create(AOwner: TComponent); -begin - inherited; - FDelimitersHardVert := TList.Create; - FHostInfoServices := TdxGridAttributeHostInfoServices.Create(Self); - FReportRows := TList.Create; - InternalRestoreDefaults; - LinkModified(False); -end; - -destructor TdxGridReportLink.Destroy; -begin - FreeAndNil(FReportRows); - FreeAndNil(FHostInfoServices); - FreeAndNil(FDelimitersHardVert); - inherited; -end; - -procedure TdxGridReportLink.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLink then - with TdxGridReportLink(Source) do - begin - Self.OptionsCards := OptionsCards; -{$IFDEF CHARTVIEW} - Self.OptionsCharts := OptionsCharts; -{$ENDIF} - Self.OptionsDetails := OptionsDetails; - Self.OptionsLevels := OptionsLevels; - end; - inherited; -end; - -procedure TdxGridReportLink.AddPageBreak(AGridRecord: TcxCustomGridRecord); -var - ReportRow: TdxReportCell; -begin - ReportRow := ReportRowsByGridRecord[AGridRecord]; - if ReportRow <> nil then - AddVerticalHardDelimiter(ReportRow); -end; - -procedure TdxGridReportLink.AddPageBreak(const AGridRecords: array of TcxCustomGridRecord); -var - I: Integer; -begin - for I := Low(AGridRecords) to High(AGridRecords) do - AddPageBreak(AGridRecords[I]); -end; - -procedure TdxGridReportLink.AddPageBreak(const AGridRecords: TdxGridRecordArray); -var - I: Integer; -begin - for I := 0 to Length(AGridRecords) - 1 do - AddPageBreak(AGridRecords[I]); -end; - -procedure TdxGridReportLink.AddPageBreak(AGridRecords: TList); -var - I: Integer; - P: Pointer; -begin - for I := 0 to AGridRecords.Count - 1 do - begin - P := AGridRecords[I]; - if TObject(P) is TcxCustomGridRecord then - AddPageBreak(TcxCustomGridRecord(P)); - end; -end; - -procedure TdxGridReportLink.BeforeDesignReport; -begin - CalculateProcessParams; - inherited; -end; - -function TdxGridReportLink.CalculateActualScaleFactor: Integer; -begin - if OptionsSize.AutoWidth then - Result := 100 - else - Result := inherited CalculateActualScaleFactor; -end; - -procedure TdxGridReportLink.ConstructReport(AReportCells: TdxReportCells); - - procedure CalculateSizes; - - procedure CalculateReportPartSizes(ACell: TdxReportCell); - var - Width, I, V: Integer; - begin - if ACell.CellCount > 0 then - begin - Width := 0; - for I := 0 to ACell.CellCount - 1 do - begin - V := ACell.Cells[I].Width; - if Width < V then Width := V; - end; - ACell.BoundsRect := MakeRect(0, 0, Width, ACell.LastCell.BoundsRect.Bottom); - end; - end; - - begin - with AReportCells do - begin - CalculateReportPartSizes(Cells); - if AreFooterCellsAllocated then CalculateReportPartSizes(FooterCells); - if AreHeaderCellsAllocated then CalculateReportPartSizes(HeaderCells); - end; - end; - -begin - if Grid = nil then Exit; - inherited; - if ActiveView = nil then Exit; - - PrepareConstruct; - try - BuildTopLevelViews; - if not AbortBuilding then - CalculateSizes; - finally - UnprepareConstruct; - end; -end; - -procedure TdxGridReportLink.ConvertCoords; -begin - inherited; - ConvertDelimiters(DelimitersHardVert); -end; - -procedure TdxGridReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - DrawInfo: TdxGridCellCustomDrawInfo; -begin - GetItemCustomDrawInfo(AItem, DrawInfo); - with DrawInfo do - case GridAttributeID of - dxGridBandID: - DoCustomDrawBandCell(ACanvas, TcxGridBandedTableView(GridView), GridBand, - TdxReportCellString(AItem), ADone); - dxGridCardRowCaptionID: - DoCustomDrawCardRowCaptionCell(ACanvas, TcxGridCardView(GridView), GridCard, - GridCardRow, TdxReportCellString(AItem), ADone); - dxGridCardRowDataID: - DoCustomDrawCardRowDataCell(ACanvas, TcxGridCardView(GridView), GridCard, - GridCardRow, AItem, ADone); - dxGridFilterBarID: - DoCustomDrawFilterBar(ACanvas, TcxCustomGridTableView(GridView), - TdxReportCellString(AItem), ADone); - dxGridFooterID, - dxGridGroupFooterID: - DoCustomDrawFooterCell(ACanvas, TcxGridTableView(GridView), GridRecord, - GridColumn, GroupLevel, TdxReportCellString(AItem), ADone); - dxGridHeaderID: - DoCustomDrawHeaderCell(ACanvas, TcxGridTableView(GridView), GridColumn, - TdxReportCellString(AItem), ADone); - dxGridRecordID: - DoCustomDrawCell(ACanvas, TcxCustomGridTableView(GridView), GridRecord, - GridColumn, AItem, ADone); - dxGridLevelCaptionID: - DoCustomDrawLevelCaption(ACanvas, GridView, TdxReportCellString(AItem), ADone); - end; -end; - -function TdxGridReportLink.GetBreakPagesByHardDelimiters: Boolean; -begin - with OptionsPagination do - Result := OneGroupPerPage or Custom; -end; - -function TdxGridReportLink.GetEmptyPagesCanExist: Boolean; -begin - Result := True;//}ProcessParams.HasMasterDetails; -end; - -function TdxGridReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := (AUpdateCodes * uaMarginsVert <> []) and (ProcessParams.HasOnlyCards or OptionsSize.AutoWidth); -end; - -function TdxGridReportLink.GetUseHardVertDelimiters: Boolean; -begin - with OptionsPagination do - Result := TopLevelGroup or Custom; -end; - -procedure TdxGridReportLink.InternalRestoreDefaults; -begin - inherited; - OptionsCards.RestoreDefaults; -{$IFDEF CHARTVIEW} - OptionsCharts.RestoreDefaults; -{$ENDIF} - OptionsDetails.RestoreDefaults; - OptionsLevels.RestoreDefaults; -end; - -procedure TdxGridReportLink.InternalRestoreFromOriginal; -var - View: TcxCustomGridView; -begin - inherited; - Color := clWhite; - - if Grid <> nil then - begin - OptionsFormatting.LookAndFeelKind := Grid.LookAndFeel.Kind; - OptionsView.Caption := Grid.RootLevelOptions.DetailTabsPosition <> dtpNone; - - View := ActiveView; - if View <> nil then - begin - if View is TcxGridTableView then - begin - OptionsPreview.AutoHeight := TcxGridTableView(View).Preview.AutoHeight; - OptionsPreview.MaxLineCount := TcxGridTableView(View).Preview.MaxLineCount; - OptionsPreview.Visible := TcxGridTableView(View).Preview.Visible; - - if View is TcxGridBandedTableView then - OptionsView.BandHeaders := TcxGridBandedTableView(View).OptionsView.BandHeaders; - OptionsView.FilterBar := (TcxGridTableView(View).Filtering.Visible = fvAlways) or - ((TcxGridTableView(View).Filtering.Visible = fvNonEmpty) and - (TcxGridTableView(View).DataController.Filter.FilterText <> '')); - OptionsView.Footers := TcxGridTableView(View).OptionsView.Footer; - OptionsView.GroupFooters := TcxGridTableView(View).OptionsView.GroupFooters <> gfInvisible; - OptionsView.Headers := TcxGridTableView(View).OptionsView.Header; - - OptionsSize.AutoWidth := TcxGridTableView(View).OptionsView.ColumnAutoWidth; - end; - - if View is TcxGridCardView then - OptionsView.FilterBar := False; - end; - end; -end; - -function TdxGridReportLink.IsDrawFootersOnEveryPage: Boolean; -begin - Result := HostInfoServices.ArePageFootersAssigned; -end; - -function TdxGridReportLink.IsDrawHeadersOnEveryPage: Boolean; -begin - Result := HostInfoServices.ArePageHeadersAssigned; -end; - -function TdxGridReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -var - DrawInfo: TdxGridCellCustomDrawInfo; -begin - Result := inherited IsSupportedCustomDraw(Item) and - (Item <> nil) and IsCustomDrawn(GetItemCustomDrawInfo(Item, DrawInfo)); -end; - -procedure TdxGridReportLink.MakeHardDelimiters(AReportCells: TdxReportCells; - AVertDelimiters: TList); -begin - inherited; - if OptionsPagination.Custom then - try - DoGetCustomPageBreaks; - except - Application.HandleException(Self); - end; - dxPSUtl.dxCopyList(DelimitersHardVert, AVertDelimiters); -end; - -function TdxGridReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := OptionsFormatting.UseNativeStyles; -end; - -function TdxGridReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TdxGridReportLinkStyles; -end; - -function TdxGridReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TdxGridReportLinkStyleSheet; -end; - -function TdxGridReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := GridLinkStyleSheetPrototype; -end; - -procedure TdxGridReportLink.PrepareConstruct; -begin - inherited; - DelimitersHardVert.Clear; - FReportRows.Clear; - - ReportCells.LookAndFeel := nil;//ReportCells.CreateGroupLookAndFeel(TdxPSReportGroupNullLookAndFeel); - - if OptionsExpanding.HasAny then - DoExpandRows; - - CalculateProcessParams; - HostInfoServices.Initialize; -end; - -procedure TdxGridReportLink.DoCustomDrawBandCell(ACanvas: TCanvas; - AView: TcxGridBandedTableView; ABand: TcxGridBand; AnItem: TdxReportCellString; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawBandCell) then - FOnCustomDrawBandCell(Self, ACanvas, AView, ABand, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawCardRowCaptionCell(ACanvas: TCanvas; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCardRowCaptionCell) then - FOnCustomDrawCardRowCaptionCell(Self, ACanvas, AView, ACard, ARow, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawCardRowDataCell(ACanvas: TCanvas; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCardRowDataCell) then - FOnCustomDrawCardRowDataCell(Self, ACanvas, AView, ACard, ARow, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawCell(ACanvas: TCanvas; - AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCell) then - FOnCustomDrawCell(Self, ACanvas, AView, ARecord, AColumn, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawFilterBar(ACanvas: TCanvas; - AView: TcxCustomGridTableView; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFilterBar) then - FOnCustomDrawFilterBar(Self, ACanvas, AView, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawFooterCell(ACanvas: TCanvas; - AView: TcxGridTableView; ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; - ALevel: Integer; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFooterCell) then - FOnCustomDrawFooterCell(Self, ACanvas, AView, ARecord, AColumn, ALevel, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawHeaderCell(ACanvas: TCanvas; - AView: TcxGridTableView; AColumn: TcxGridColumn; AnItem: TdxReportCellString; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeaderCell) then - FOnCustomDrawHeaderCell(Self, ACanvas, AView, AColumn, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawLevelCaption(ACanvas: TCanvas; - AView: TcxCustomGridView; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawLevelCaption) then - FOnCustomDrawLevelCaption(Self, ACanvas, AView, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoGetCellHeight(AView: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; ATableItem: TcxCustomGridTableItem; - var AHeight: Integer); -begin - if Assigned(FOnGetCellHeight) then - FOnGetCellHeight(Self, AView, ARecord, ATableItem, AHeight); -end; - -procedure TdxGridReportLink.DoGetCustomPageBreaks; -begin - if Assigned(FOnGetCustomPageBreaks) then FOnGetCustomPageBreaks(Self); -end; - -procedure TdxGridReportLink.DoInitializeBandCell(AView: TcxGridBandedTableView; - ABand: TcxGridBand; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeBandCell) then - FOnInitializeBandCell(Self, AView, ABand, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeCardRowCaptionCell(AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeCardRowCaptionCell) then - FOnInitializeCardRowCaptionCell(Self, AView, ACard, ARow, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeCardRowDataCell(AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeCardRowDataCell) then - FOnInitializeCardRowDataCell(Self, AView, ACard, ARow, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeCell(AView: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeCell) then - FOnInitializeCell(Self, AView, ARecord, AColumn, AnItem); -end; - -{$IFDEF CHARTVIEW} -procedure TdxGridReportLink.DoInitializeChartCell(AView: TcxGridChartView; - AnItem: TdxReportCellGraphic); -begin - if Assigned(FOnInitializeChartCell) then - FOnInitializeChartCell(Self, AView, AnItem); -end; -{$ENDIF} - -procedure TdxGridReportLink.DoInitializeFilterBar(AView: TcxCustomGridTableView; - AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeFilterBar) then - FOnInitializeFilterBar(Self, AView, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeFooterCell(AView: TcxGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; ALevel: Integer; - AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeFooterCell) then - FOnInitializeFooterCell(Self, AView, ARecord, AColumn, ALevel, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeHeaderCell(AView: TcxGridTableView; - AColumn: TcxGridColumn; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeHeaderCell) then - FOnInitializeHeaderCell(Self, AView, AColumn, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeLevelCaption(AView: TcxCustomGridView; - AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeLevelCaption) then - FOnInitializeLevelCaption(Self, AView, AnItem); -end; - -procedure TdxGridReportLink.CreateOptions; -begin - inherited; - FOptionsCards := GetOptionsCardsClass.Create(Self); -{$IFDEF CHARTVIEW} - FOptionsCharts := GetOptionsChartsClass.Create(Self); -{$ENDIF} - FOptionsDetails := GetOptionsDetailsClass.Create(Self); - FOptionsLevels := GetOptionsLevelsClass.Create(Self); -end; - -procedure TdxGridReportLink.DestroyOptions; -begin - FreeAndNil(FOptionsLevels); - FreeAndNil(FOptionsDetails); -{$IFDEF CHARTVIEW} - FreeAndNil(FOptionsCharts); -{$ENDIF} - FreeAndNil(FOptionsCards); - inherited; -end; - -function TdxGridReportLink.GetOptionsCardsClass: TdxGridReportLinkOptionsCardsClass; -begin - Result := TdxGridReportLinkOptionsCards; -end; - -{$IFDEF CHARTVIEW} -function TdxGridReportLink.GetOptionsChartsClass: TdxGridReportLinkOptionsChartsClass; -begin - Result := TdxGridReportLinkOptionsCharts; -end; -{$ENDIF} - -function TdxGridReportLink.GetOptionsDetailsClass: TdxGridReportLinkOptionsDetailsClass; -begin - Result := TdxGridReportLinkOptionsDetails; -end; - -function TdxGridReportLink.GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; -begin - Result := TdxGridReportLinkOptionsExpanding; -end; - -function TdxGridReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TdxGridReportLinkOptionsFormatting; -end; - -function TdxGridReportLink.GetOptionsLevelsClass: TdxGridReportLinkOptionsLevelsClass; -begin - Result := TdxGridReportLinkOptionsLevels; -end; - -function TdxGridReportLink.GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; -begin - Result := TdxGridReportLinkOptionsOnEveryPage; -end; - -function TdxGridReportLink.GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; -begin - Result := TdxGridReportLinkOptionsPagination; -end; - -function TdxGridReportLink.GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; -begin - Result := TdxGridReportLinkOptionsPreview; -end; - -function TdxGridReportLink.GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; -begin - Result := TdxGridReportLinkOptionsRefinements; -end; - -function TdxGridReportLink.GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; -begin - Result := TdxGridReportLinkOptionsSelection; -end; - -function TdxGridReportLink.GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; -begin - Result := TdxGridReportLinkOptionsSize; -end; - -function TdxGridReportLink.GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; -begin - Result := TdxGridReportLinkOptionsView; -end; - -procedure TdxGridReportLink.AddReportRow(AReportRow: TdxReportCell); -begin - FReportRows.Add(AReportRow); -end; - -procedure TdxGridReportLink.AddVerticalHardDelimiter(ADelimiter: TdxReportCell); -var - R: TRect; -begin - R := ADelimiter.AbsoluteRect; - AddVerticalHardDelimiter(R.Top); -end; - -procedure TdxGridReportLink.AddVerticalHardDelimiter(ADelimiter: Integer); -begin - FDelimitersHardVert.Add(TObject(ADelimiter)); -end; - -procedure TdxGridReportLink.BuildTopLevelView(AGridView: TcxCustomGridView); -begin - if (AGridView <> FProcessedView) and (AGridView <> nil) then BuildView(nil, AGridView); -end; - -procedure TdxGridReportLink.BuildTopLevelViews; -var - MasterRow: TcxGridMasterDataRow; - CurrentView: TcxCustomGridView; -begin - if OptionsLevels.Unwrap and OptionsLevels.UnwrapTopLevel then - begin - FProcessedView := nil; - try - MasterRow := ActiveViewMasterRow; - if OptionsLevels.RiseActiveLevelOntoTop then - begin - if MasterRow <> nil then - CurrentView := MasterRow.ActiveDetailGridView - else - CurrentView := ActiveView; - BuildTopLevelView(CurrentView); - FProcessedView := CurrentView; - end; - if not AbortBuilding then - ForEachView(MasterRow, BuildTopLevelView); - finally - FProcessedView := nil; - end; - end - else - BuildTopLevelView(ActiveView); -end; - -procedure TdxGridReportLink.BuildView(AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView); -begin - if OptionsLevels.Unwrap and OptionsLevels.SkipEmptyViews and not dxViewHelpersFactory[AGridView].HasData(AGridView) then - Exit; - with CreateViewBuilder(AMasterBuilder, AGridView) do - try - Build; - finally - Free; - end; -end; - -function TdxGridReportLink.CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := dxGridViewBuildersFactory.CreateViewAdapter(AMasterAdapter, AGridView); -end; - -function TdxGridReportLink.CreateViewBuilder(AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; -begin - Result := dxGridViewBuildersFactory.CreateViewBuilder(Self, AMasterBuilder, AGridView); -end; - -procedure TdxGridReportLink.DoExpandRows; -begin - if OptionsLevels.Unwrap and OptionsLevels.UnwrapTopLevel then - ForEachView(ActiveViewMasterRow, DoExpandViewRows) - else - DoExpandViewRows(ActiveView); -end; - -procedure TdxGridReportLink.DoExpandViewRows(AGridView: TcxCustomGridView); -begin - if AGridView <> nil then - with CreateViewAdapter(nil, AGridView) do - try - ExpandAllRows(OptionsExpanding, not OptionsDetails.OnlyFocusedView); - finally - Free; - end; -end; - -procedure TdxGridReportLink.ForEachView(AMasterRow: TcxGridMasterDataRow; AProc: TdxGridViewProc); -var - I: Integer; - GridView: TcxCustomGridView; - Level: TcxGridLevel; -begin - if not Assigned(AProc) then Exit; - - if AMasterRow <> nil then - for I := 0 to AMasterRow.DetailGridViewCount -1 do - begin - GridView := AMasterRow.DetailGridViews[I]; - if GridView <> nil then - begin - Level := GridView.Level as TcxGridLevel; - if Level.Visible then AProc(GridView); - end; - if AbortBuilding then Break; - end - else - with Grid.Levels do - for I := 0 to VisibleCount - 1 do - begin - AProc(VisibleItems[I].GridView); - if AbortBuilding then Break; - end; -end; - -function TdxGridReportLink.GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; - out ADrawInfo: TdxGridCellCustomDrawInfo): TdxGridAttributeID; -begin - dxViewHelpersFactory.HelperClassByItem(AnItem).ExtractCustomDrawInfo(AnItem, ADrawInfo); - Result := ADrawInfo.GridAttributeID; -end; - -function TdxGridReportLink.IsCardViewStyle(AStyle: TcxStyle): Boolean; -begin - Result := Styles.IsCardViewStyle(AStyle); -end; - -function TdxGridReportLink.IsCustomDrawn(AnAttributeID: TdxGridAttributeID): Boolean; -begin - Result := False; - case AnAttributeID of - dxGridBandID: - Result := Assigned(FOnCustomDrawBandCell); - dxGridCardRowCaptionID: - Result := Assigned(FOnCustomDrawCardRowCaptionCell); - dxGridCardRowDataID: - Result := Assigned(FOnCustomDrawCardRowDataCell); - dxGridFilterBarID: - Result := Assigned(FOnCustomDrawFilterBar); - dxGridFooterID, - dxGridGroupFooterID: - Result := Assigned(FOnCustomDrawFooterCell); - dxGridHeaderID: - Result := Assigned(FOnCustomDrawHeaderCell); - dxGridLevelCaptionID: - Result := Assigned(FOnCustomDrawLevelCaption); - dxGridRecordID: - Result := Assigned(FOnCustomDrawCell); - end; -end; - -function TdxGridReportLink.IsOffice11StyleGrouping: Boolean; -begin - {$IFDEF DXVER500} - Result := ActiveViewHelper.IsOffice11StyleGrouping(ActiveView); - {$ELSE} - Result := False; - {$ENDIF} -end; - -procedure TdxGridReportLink.CalculateProcessParams; - - function CalculateHasUnwrapableData(ALevel: TComponent; ARecursive: Boolean): Boolean; overload; - var - ViewCount, I: Integer; - GridView: TcxCustomGridView; - begin - ViewCount := 0; - for I := 0 to TcxGridLevel(ALevel).VisibleCount - 1 do - begin - GridView := TcxGridLevel(ALevel).VisibleItems[I].GridView; - if GridView <> nil then - Inc(ViewCount); - if ViewCount > 1 then - begin - Result := True; - Exit; - end; - - if ARecursive and (GridView <> nil) then - begin - Result := CalculateHasUnwrapableData(GridView.Level, ARecursive); - if Result then - Exit; - end; - end; - Result := False; - end; - - function CalculateHasUnwrapableData: Boolean; overload; - begin - if OptionsDetails.StartFromFocusedView and (Grid.FocusedView <> nil) then - Result := CalculateHasUnwrapableData(TcxGridLevel(Grid.FocusedView.Level).Parent, not OptionsDetails.OnlyFocusedView) - else - Result := CalculateHasUnwrapableData(Grid.Levels, True); - end; - -var - Adapter: TdxCustomGridViewAdapter; - View: TcxCustomGridView; -begin - View := ActiveView; - - with FProcessParams do - if View = nil then - begin - HasMasterDetails := False; - HasMasterDetailsInTopView := False; - HasOnlyCards := False; - HasOnlyCharts := False; - HasUnwrapableData := False; - CanUseOnEveryPageMode := not IsAggregated; - end - else - begin - Adapter := CreateViewAdapter(nil, View); - try - HasUnwrapableData := CalculateHasUnwrapableData;//Grid.ActiveLevel.GridView); - HasMasterDetailsInTopView := View.IsDetail or View.IsMaster; - HasMasterDetails := (HasUnwrapableData and OptionsLevels.Unwrap) or - (View.IsMaster and not Adapter.AreAllMasterRowsCollapsed and - not (OptionsDetails.StartFromFocusedView and OptionsDetails.OnlyFocusedView)); - HasOnlyCards := View is TcxGridCardView; - {$IFDEF CHARTVIEW} - HasOnlyCharts := View is TcxGridChartView; - {$ENDIF} - CanUseOnEveryPageMode := not IsAggregated and not HasMasterDetails and - Adapter.CanUseOnEveryPageMode; {Adapter.RecordCount <> 0} - finally - Adapter.Free; - end; - end; -end; - -function TdxGridReportLink.CanAttributeBeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := ProcessParams.CanUseOnEveryPageMode and OptionsOnEveryPage.HasInstalledAttribute(AnAttribute); -end; - -function TdxGridReportLink.IsAttributeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := CanAttributeBeUsedOnEveryPage(AnAttribute) or not OptionsView.HasInstalledAttribute(AnAttribute); -end; - -function TdxGridReportLink.GetActiveStyles: TdxGridReportLinkStyles; -begin - Result := inherited ActiveStyles as TdxGridReportLinkStyles; -end; - -function TdxGridReportLink.GetActiveView: TcxCustomGridView; -var - Level: TcxGridLevel; -begin - Result := nil; - if Grid <> nil then - Result := Grid.FocusedView; - if (Result <> nil) and not OptionsDetails.StartFromFocusedView then - begin - Level := Result.Level as TcxGridLevel; - while not Level.IsTop do - Level := Level.Parent; - Result := Level.GridView; - end; -end; - -function TdxGridReportLink.GetActiveViewHelper: TdxCustomGridViewHelperClass; -begin - if ActiveView = nil then - Result := TdxNullGridViewHelper - else - Result := dxViewHelpersFactory[ActiveView]; -end; - -function TdxGridReportLink.GetActiveViewMasterRow: TcxGridMasterDataRow; -begin - Result := nil; - with ActiveView do - if MasterGridRecordIndex <> -1 then - Result := (MasterGridView as TcxGridTableView).ViewData.Rows[MasterGridRecordIndex] as TcxGridMasterDataRow; -end; - -function TdxGridReportLink.GetActiveViewParentLevel: TcxGridLevel; -var - GridView: TcxCustomGridView; -begin - Result := nil; - GridView := ActiveView; - if GridView <> nil then - Result := TcxGridLevel(GridView.Level).Parent; -end; - -function TdxGridReportLink.GetDesignWindow: TdxfmGridReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TdxfmGridReportLinkDesignWindow; -end; - -function TdxGridReportLink.GetGrid: TcxGrid; -begin - Result := TcxGrid(Component); -end; - -function TdxGridReportLink.GetOptionsExpanding: TdxGridReportLinkOptionsExpanding; -begin - Result := inherited OptionsExpanding as TdxGridReportLinkOptionsExpanding; -end; - -function TdxGridReportLink.GetOptionsFormatting: TdxGridReportLinkOptionsFormatting; -begin - Result := inherited OptionsFormatting as TdxGridReportLinkOptionsFormatting; -end; - -function TdxGridReportLink.GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; -begin - Result := inherited OptionsOnEveryPage as TdxGridReportLinkOptionsOnEveryPage; -end; - -function TdxGridReportLink.GetOptionsPagination: TdxGridReportLinkOptionsPagination; -begin - Result := inherited OptionsPagination as TdxGridReportLinkOptionsPagination; -end; - -function TdxGridReportLink.GetOptionsPreview: TdxGridReportLinkOptionsPreview; -begin - Result := inherited OptionsPreview as TdxGridReportLinkOptionsPreview; -end; - -function TdxGridReportLink.GetOptionsRefinements: TdxGridReportLinkOptionsRefinements; -begin - Result := inherited OptionsRefinements as TdxGridReportLinkOptionsRefinements; -end; - -function TdxGridReportLink.GetOptionsSelection: TdxGridReportLinkOptionsSelection; -begin - Result := inherited OptionsSelection as TdxGridReportLinkOptionsSelection; -end; - -function TdxGridReportLink.GetOptionsSize: TdxGridReportLinkOptionsSize; -begin - Result := inherited OptionsSize as TdxGridReportLinkOptionsSize; -end; - -function TdxGridReportLink.GetOptionsView: TdxGridReportLinkOptionsView; -begin - Result := inherited OptionsView as TdxGridReportLinkOptionsView; -end; - -function TdxGridReportLink.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := TdxReportCell(FReportRows[Index]); -end; - -function TdxGridReportLink.GetReportRowByGridRecord(GridRecord: TcxCustomGridRecord): TdxReportCell; -var - I: Integer; -begin - if GridRecord <> nil then - for I := 0 to ReportRowCount - 1 do - begin - Result := ReportRows[I]; - if Result.Data = Integer(GridRecord) then Exit; - end; - Result := nil; -end; - -function TdxGridReportLink.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TdxGridReportLink.GetStyles: TdxGridReportLinkStyles; -begin - Result := inherited Styles as TdxGridReportLinkStyles; -end; - -procedure TdxGridReportLink.SetOnCustomDrawBandCell(Value: TdxGridReportLinkCustomDrawBandCellEvent); -begin - if @FOnCustomDrawBandCell <> @Value then - begin - FOnCustomDrawBandCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawCell(Value: TdxGridReportLinkCustomDrawCellEvent); -begin - if @FOnCustomDrawCell <> @Value then - begin - FOnCustomDrawCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawCardRowCaptionCell(Value: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent); -begin - if @FOnCustomDrawCardRowCaptionCell <> @Value then - begin - FOnCustomDrawCardRowCaptionCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawCardRowDataCell(Value: TdxGridReportLinkCustomDrawCardRowDataCellEvent); -begin - if @FOnCustomDrawCardRowDataCell <> @Value then - begin - FOnCustomDrawCardRowDataCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawFilterBar(Value: TdxGridReportLinkCustomDrawFilterBarEvent); -begin - if @FOnCustomDrawFilterBar <> @Value then - begin - FOnCustomDrawFilterBar := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawFooterCell(Value: TdxGridReportLinkCustomDrawFooterCellEvent); -begin - if @FOnCustomDrawFooterCell <> @Value then - begin - FOnCustomDrawFooterCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawHeaderCell(Value: TdxGridReportLinkCustomDrawHeaderCellEvent); -begin - if @FOnCustomDrawHeaderCell <> @Value then - begin - FOnCustomDrawHeaderCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawLevelCaption(Value: TdxGridReportLinkCustomDrawLevelCaptionEvent); -begin - if @FOnCustomDrawLevelCaption <> @Value then - begin - FOnCustomDrawLevelCaption := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOptionsCards(Value: TdxGridReportLinkOptionsCards); -begin - OptionsCards.Assign(Value); -end; - -{$IFDEF CHARTVIEW} -procedure TdxGridReportLink.SetOptionsCharts(Value: TdxGridReportLinkOptionsCharts); -begin - OptionsCharts.Assign(Value); -end; -{$ENDIF} - -procedure TdxGridReportLink.SetOptionsDetails(Value: TdxGridReportLinkOptionsDetails); -begin - OptionsDetails.Assign(Value); -end; - -procedure TdxGridReportLink.SetOptionsExpanding(Value: TdxGridReportLinkOptionsExpanding); -begin - OptionsExpanding.Assign(Value); -end; - -procedure TdxGridReportLink.SetOptionsFormatting(Value: TdxGridReportLinkOptionsFormatting); -begin - inherited OptionsFormatting := Value; -end; - -procedure TdxGridReportLink.SetOptionsLevels(Value: TdxGridReportLinkOptionsLevels); -begin - OptionsLevels.Assign(Value); -end; - -procedure TdxGridReportLink.SetOptionsOnEveryPage(Value: TdxGridReportLinkOptionsOnEveryPage); -begin - inherited OptionsOnEveryPage := Value; -end; - -procedure TdxGridReportLink.SetOptionsPagination(Value: TdxGridReportLinkOptionsPagination); -begin - inherited OptionsPagination := Value; -end; - -procedure TdxGridReportLink.SetOptionsPreview(Value: TdxGridReportLinkOptionsPreview); -begin - inherited OptionsPreview := Value; -end; - -procedure TdxGridReportLink.SetOptionsRefinements(Value: TdxGridReportLinkOptionsRefinements); -begin - inherited OptionsRefinements := Value; -end; - -procedure TdxGridReportLink.SetOptionsSelection(Value: TdxGridReportLinkOptionsSelection); -begin - inherited OptionsSelection := Value; -end; - -procedure TdxGridReportLink.SetOptionsSize(Value: TdxGridReportLinkOptionsSize); -begin - inherited OptionsSize := Value; -end; - -procedure TdxGridReportLink.SetOptionsView(Value: TdxGridReportLinkOptionsView); -begin - inherited OptionsView := Value; -end; - -procedure TdxGridReportLink.SetStyles(Value: TdxGridReportLinkStyles); -begin - inherited Styles := Value; -end; - -{ TcxGridCardView2OptionsView } - -constructor TcxGridCardView2OptionsView.Create(AGridView: TcxCustomGridView); -begin - inherited; - FCardBorders := False; - FGridLineColor := clDefault; - FGridLines := glNone; - FShadowDepth := 4; -end; - -procedure TcxGridCardView2OptionsView.Assign(Source: TPersistent); -begin - if Source is TcxGridCardView2OptionsView then - with TcxGridCardView2OptionsView(Source) do - begin - Self.CardBorders := CardBorders; - Self.GridLineColor := GridLineColor; - Self.GridLines := GridLines; - Self.ShadowDepth := ShadowDepth; - end; - inherited; -end; - -function TcxGridCardView2OptionsView.GetShadowVisible: Boolean; -begin - Result := ShadowDepth <> 0; -end; - -procedure TcxGridCardView2OptionsView.SetCardBorders(Value: Boolean); -begin - if FCardBorders <> Value then - begin - FCardBorders := Value; - {$IFDEF DXVER500} - Changed(vcSize); - {$ELSE} - SizeChanged; - {$ENDIF} - end; -end; - -procedure TcxGridCardView2OptionsView.SetGridLineColor(Value: TColor); -begin - if FGridLineColor <> Value then - begin - FGridLineColor := Value; - {$IFDEF DXVER500} - Changed(vcLayout); - {$ELSE} - LayoutChanged; - {$ENDIF} - end; -end; - -procedure TcxGridCardView2OptionsView.SetGridLines(Value: TcxGridLines); -begin - if FGridLines <> Value then - begin - FGridLines := Value; - {$IFDEF DXVER500} - Changed(vcSize); - {$ELSE} - SizeChanged; - {$ENDIF} - end; -end; - -procedure TcxGridCardView2OptionsView.SetShadowDepth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FShadowDepth <> Value then - begin - FShadowDepth := Value; - {$IFDEF DXVER500} - Changed(vcSize); - {$ELSE} - SizeChanged; - {$ENDIF} - end; -end; - -{ TcxGridCardView2Styles } - -procedure TcxGridCardView2Styles.Assign(Source: TPersistent); -begin - if Source is TcxGridCardView2Styles then - with TcxGridCardView2Styles(Source) do - begin - Self.CardShadow := CardShadow; - end; - inherited; -end; - -procedure TcxGridCardView2Styles.GetCardShadowParams(ARecord: TcxCustomGridRecord; - out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if Assigned(FOnGetCardShadowStyle) then - FOnGetCardShadowStyle(GridView, ARecord, AStyle); - GetViewParams(vsCardShadow, ARecord, AStyle, AParams); -end; - -procedure TcxGridCardView2Styles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - inherited; - if Index = vsCardShadow then AParams.Color := clWindowText; -end; - -type - TcxGridCardViewInfo2 = class; - TcxGridCardViewViewInfo2 = class; - - TcxGridCardRowCaptionViewInfo2 = class(TcxGridCardRowCaptionViewInfo) - private - function GetCardViewInfo: TcxGridCardViewInfo2; - protected - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - public - property CardViewInfo: TcxGridCardViewInfo2 read GetCardViewInfo; - end; - - TcxGridCardRowDataViewInfo2 = class(TcxGridCardRowDataViewInfo) - private - function GetCardViewInfo: TcxGridCardViewInfo2; - protected - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - public - property CardViewInfo: TcxGridCardViewInfo2 read GetCardViewInfo; - end; - - TcxGridCardDataRowViewInfo2 = class(TcxGridCardDataRowViewInfo) - protected - class function GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; override; - class function GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; override; - end; - - TcxGridCardCaptionRowViewInfo2 = class(TcxGridCardRowViewInfo) - protected - class function GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; override; - class function GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; override; - end; - - TcxGridCardPainter2 = class(TcxGridCardPainter) - private - function GetViewInfo: TcxGridCardViewInfo2; - protected - procedure DrawBottomShadowAndRestSpace; virtual; - {$IFDEF DXVER500} - procedure DrawCardBorder; override; - {$ENDIF} - procedure DrawRightShadowAndRestSpace; virtual; - procedure DrawShadows; virtual; - procedure Paint; override; - property ViewInfo: TcxGridCardViewInfo2 read GetViewInfo; - end; - - TcxGridCardViewInfo2 = class(TcxGridCardViewInfo) - private - function GetGridView: TcxGridCardView2; - protected - function CalculateHeight: Integer; override; - function GetContentWidth: Integer; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - class function GetRowViewInfoClass(ARow: TcxGridCardViewRow): TcxGridCardRowViewInfoClass; override; - - function GetBottomShadowRect: TRect; virtual; - function GetBottomShadowRestRect: TRect; virtual; - function GetCardRowCaptionBorders(ARowCaption: TcxGridCardRowCaptionViewInfo2): TcxBorders; virtual; - function GetCardRowDataBorders(ARowData: TcxGridCardRowDataViewInfo2): TcxBorders; virtual; - function GetGridLineColor: TColor; virtual; - function GetRightShadowRect: TRect; virtual; - function GetRightShadowRestRect: TRect; virtual; - function GetShadowColor: TColor; virtual; - function GetShadowDepth: Integer; virtual; - function GetShadowRestColor: TColor; virtual; - - property GridView: TcxGridCardView2 read GetGridView; - public - property BottomShadowRect: TRect read GetBottomShadowRect; - property BottomShadowRestRect: TRect read GetBottomShadowRestRect; - property GridLineColor: TColor read GetGridLineColor; - property RightShadowRect: TRect read GetRightShadowRect; - property RightShadowRestRect: TRect read GetRightShadowRestRect; - property ShadowColor: TColor read GetShadowColor; - property ShadowDepth: Integer read GetShadowDepth; - property ShadowRestColor: TColor read GetShadowRestColor; - end; - - TcxGridCard2 = class(TcxGridCard) - protected - function GetViewInfoClass: TcxCustomGridRecordViewInfoClass; override; - end; - - TcxGridCardViewViewData2 = class(TcxGridCardViewViewData) - protected - function GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; override; - end; - - TcxGridCardsHorizontalViewInfo2 = class(TcxGridCardsHorizontalViewInfo) - private - function GetGridView: TcxGridCardView2; - protected - function CalculateCardHeight: Integer; override; - function GetShadowDepth: Integer; virtual; - - property GridView: TcxGridCardView2 read GetGridView; - public - property ShadowDepth: Integer read GetShadowDepth; - end; - - TcxGridCardsVerticalViewInfo2 = class(TcxGridCardsVerticalViewInfo) - private - function GetGridView: TcxGridCardView2; - protected - function CalculateCardHeight: Integer; override; - function GetShadowDepth: Integer; virtual; - - property GridView: TcxGridCardView2 read GetGridView; - public - property ShadowDepth: Integer read GetShadowDepth; - end; - - TcxGridCardViewViewInfo2 = class(TcxGridCardViewViewInfo) - protected - function GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; override; - end; - -{ TcxGridCardRowCaptionViewInfo2 } - -function TcxGridCardRowCaptionViewInfo2.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := CardViewInfo.GridLineColor; -end; - -function TcxGridCardRowCaptionViewInfo2.GetBorders: TcxBorders; -begin - Result := CardViewInfo.GetCardRowCaptionBorders(Self); -end; - -function TcxGridCardRowCaptionViewInfo2.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := 1; -end; - -function TcxGridCardRowCaptionViewInfo2.GetCardViewInfo: TcxGridCardViewInfo2; -begin - Result := inherited CardViewInfo as TcxGridCardViewInfo2 -end; - -{ TcxGridCardRowDataViewInfo2 } - -function TcxGridCardRowDataViewInfo2.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := CardViewInfo.GridLineColor; -end; - -function TcxGridCardRowDataViewInfo2.GetBorders: TcxBorders; -begin - Result := CardViewInfo.GetCardRowDataBorders(Self); -end; - -function TcxGridCardRowDataViewInfo2.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := 1; -end; - -function TcxGridCardRowDataViewInfo2.GetCardViewInfo: TcxGridCardViewInfo2; -begin - Result := inherited CardViewInfo as TcxGridCardViewInfo2 -end; - -{ TcxGridCardDataRowViewInfo2 } - -class function TcxGridCardDataRowViewInfo2.GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; -begin - Result := TcxGridCardRowCaptionViewInfo2; -end; - -class function TcxGridCardDataRowViewInfo2.GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; -begin - Result := TcxGridCardRowDataViewInfo2; -end; - -{ TcxGridCardCaptionRowViewInfo2 } - -class function TcxGridCardCaptionRowViewInfo2.GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; -begin - Result := TcxGridCardRowCaptionViewInfo2; -end; - -class function TcxGridCardCaptionRowViewInfo2.GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; -begin - Result := TcxGridCardRowDataViewInfo2; -end; - -{ TcxGridCardPainter2 } - -procedure TcxGridCardPainter2.DrawBottomShadowAndRestSpace; -var - R: TRect; -begin - R := ViewInfo.BottomShadowRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowColor; - Canvas.FillRect(R); - end; - - R := ViewInfo.BottomShadowRestRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowRestColor; - Canvas.FillRect(R); - end; -end; - -{$IFDEF DXVER500} -procedure TcxGridCardPainter2.DrawCardBorder; -begin - with ViewInfo, Self.Canvas do - FrameRect(Bounds, clWindow, CardBorderWidth); -end; -{$ENDIF} - -procedure TcxGridCardPainter2.DrawRightShadowAndRestSpace; -var - R: TRect; -begin - R := ViewInfo.RightShadowRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowColor; - Canvas.FillRect(R); - end; - - R := ViewInfo.RightShadowRestRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowRestColor; - Canvas.FillRect(R); - end; -end; - -procedure TcxGridCardPainter2.DrawShadows; -var - Color: TColor; -begin - Color := Canvas.Brush.Color; - DrawBottomShadowAndRestSpace; - DrawRightShadowAndRestSpace; - Canvas.Brush.Color := Color; -end; - -procedure TcxGridCardPainter2.Paint; -begin - inherited; - DrawShadows; -end; - -function TcxGridCardPainter2.GetViewInfo: TcxGridCardViewInfo2; -begin - Result := TcxGridCardViewInfo2(inherited ViewInfo); -end; - -{ TcxGridCardViewInfo2 } - -function TcxGridCardViewInfo2.CalculateHeight: Integer; -begin - Result := inherited CalculateHeight; - if RecordsViewInfo.AutoDataRecordHeight or (RecordsViewInfo.CardHeight = -1) then - Inc(Result, ShadowDepth); -end; - -function TcxGridCardViewInfo2.GetContentWidth: Integer; -begin - Result := inherited GetContentWidth - ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridCardPainter2; -end; - -class function TcxGridCardViewInfo2.GetRowViewInfoClass(ARow: TcxGridCardViewRow): TcxGridCardRowViewInfoClass; -const - RowViewInfoClasses: array[TcxGridCardViewRowKind] of TcxGridCardRowViewInfoClass = - (TcxGridCardDataRowViewInfo2, TcxGridCardCaptionRowViewInfo2, TcxGridCardCaptionRowViewInfo2); -begin - Result := RowViewInfoClasses[ARow.Kind]; -end; - -function TcxGridCardViewInfo2.GetBottomShadowRect: TRect; -begin - Result := ContentBounds; - Inc(Result.Left, ShadowDepth); - Result.Top := Result.Bottom - ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetBottomShadowRestRect: TRect; -begin - Result := ContentBounds; - Result.Right := Result.Left + ShadowDepth; - Result.Top := Result.Bottom - ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetCardRowCaptionBorders(ARowCaption: TcxGridCardRowCaptionViewInfo2): TcxBorders; -begin - Result := [bLeft, bTop]; - if ARowCaption.Row.VisibleIndex = GridView.RowCount - 1 then - Include(Result, bBottom); - - with TcxGridCardView2OptionsView(GridView.OptionsView) do - begin - if not CardBorders then - begin - Exclude(Result, bLeft); - if ARowCaption.Row.VisibleIndex = 0 then - Exclude(Result, bTop); - if ARowCaption.Row.VisibleIndex = Self.GridView.RowCount - 1 then - Exclude(Result, bBottom); - end; - if not (GridLines in [glBoth, glHorizontal]) and (ARowCaption.Row.VisibleIndex > 0) then - Exclude(Result, bTop); - end; -end; - -function TcxGridCardViewInfo2.GetCardRowDataBorders(ARowData: TcxGridCardRowDataViewInfo2): TcxBorders; -begin - Result := [bLeft, bTop, bRight]; - if ARowData.Row.VisibleIndex = GridView.RowCount - 1 then - Include(Result, bBottom); - with TcxGridCardView2OptionsView(GridView.OptionsView) do - begin - if not CardBorders then - begin - Exclude(Result, bRight); - if ARowData.Row.VisibleIndex = 0 then - Exclude(Result, bTop); - if ARowData.Row.VisibleIndex = Self.GridView.RowCount - 1 then - Exclude(Result, bBottom); - end; - if not (GridLines in [glBoth, glHorizontal]) and (ARowData.Row.VisibleIndex > 0) then - Exclude(Result, bTop); - if not (GridLines in [glBoth, glVertical]) then - Exclude(Result, bLeft); - end; -end; - -function TcxGridCardViewInfo2.GetGridLineColor: TColor; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).GridLineColor; - if Result = clDefault then - Result := GridView.LookAndFeelPainter.DefaultGridLineColor; -end; - -function TcxGridCardViewInfo2.GetRightShadowRect: TRect; -begin - Result := ContentBounds; - Result.Left := Result.Right - ShadowDepth; - Inc(Result.Top, ShadowDepth); -end; - -function TcxGridCardViewInfo2.GetRightShadowRestRect: TRect; -begin - Result := ContentBounds; - Result.Left := Result.Right - ShadowDepth; - Result.Bottom := Result.Top + ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetShadowColor: TColor; -var - Params: TcxViewParams; -begin - TcxGridCardView2Styles(GridView.Styles).GetCardShadowParams(GridRecord, Params); - Result := Params.Color; - if Result = clDefault then - Result := clWindowText; -end; - -function TcxGridCardViewInfo2.GetShadowDepth: Integer; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetShadowRestColor: TColor; -var - Params: TcxViewParams; -begin - TcxGridCardView2Styles(GridView.Styles).GetViewParams(vsBackground, nil, nil, Params); - Result := Params.Color; -end; - -function TcxGridCardViewInfo2.GetGridView: TcxGridCardView2; -begin - Result := TcxGridCardView2(inherited GridView); -end; - -{ TcxGridCard2 } - -function TcxGridCard2.GetViewInfoClass: TcxCustomGridRecordViewInfoClass; -begin - Result := TcxGridCardViewInfo2; -end; - -{ TcxGridCardViewViewData2 } - -function TcxGridCardViewViewData2.GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; -begin - Result := TcxGridCard2; -end; - -{ TcxGridCardsHorizontalViewInfo2 } - -function TcxGridCardsHorizontalViewInfo2.GetGridView: TcxGridCardView2; -begin - Result := TcxGridCardView2(inherited GridView); -end; - -function TcxGridCardsHorizontalViewInfo2.CalculateCardHeight: Integer; -begin - Result := inherited CalculateCardHeight + ShadowDepth; -end; - -function TcxGridCardsHorizontalViewInfo2.GetShadowDepth: Integer; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).ShadowDepth; -end; - -{ TcxGridCardsVerticalViewInfo2 } - -function TcxGridCardsVerticalViewInfo2.GetGridView: TcxGridCardView2; -begin - Result := TcxGridCardView2(inherited GridView); -end; - -function TcxGridCardsVerticalViewInfo2.CalculateCardHeight: Integer; -begin - Result := inherited CalculateCardHeight + ShadowDepth; -end; - -function TcxGridCardsVerticalViewInfo2.GetShadowDepth: Integer; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).ShadowDepth; -end; - -{ TcxGridCardViewViewInfo2 } - -function TcxGridCardViewViewInfo2.GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; -const - ViewInfoClasses: array[TcxGridCardViewLayoutDirection] of TcxCustomGridRecordsViewInfoClass = - (TcxGridCardsHorizontalViewInfo2, TcxGridCardsVerticalViewInfo2); -begin - Result := ViewInfoClasses[GridView.LayoutDirection]; -end; - -{ TcxGridCardView2 } - -function TcxGridCardView2.GetOptionsViewClass: TcxCustomGridOptionsViewClass; -begin - Result := TcxGridCardView2OptionsView; -end; - -function TcxGridCardView2.GetStylesClass: TcxCustomGridViewStylesClass; -begin - Result := TcxGridCardView2Styles; -end; - -function TcxGridCardView2.GetViewDataClass: TcxCustomGridViewDataClass; -begin - Result := TcxGridCardViewViewData2; -end; - -function TcxGridCardView2.GetViewInfoClass: TcxCustomGridViewInfoClass; -begin - Result := TcxGridCardViewViewInfo2; -end; - -{ TdxfmGridReportLinkDesignWindow } - -constructor TdxfmGridReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhccxGridReportLinkDesigner; - inherited; - CreateControls; - SetActivePage; -end; - -destructor TdxfmGridReportLinkDesignWindow.Destroy; -begin - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(lbxStyles); - inherited; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoInitialize; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited; - RefreshStylesList; - - CreateCardView; - //CreateChartView; - {.$IFNDEF DXVER500} - {.$ENDIF} - - {$IFNDEF DXVER500} - chbxExpandCards.Visible := False; - - //chbxTransparentRichEdits.Visible := False; {.3} - //bvlRefinementsSeparator.Top := bvlRefinementsSeparator.Top - 20; - //chbxSuppressBackgroundBitmaps.Top := chbxSuppressBackgroundBitmaps.Top - 20; - //chbxConsumeSelectionStyle.Top := chbxConsumeSelectionStyle.Top - 20; - {$ENDIF} - - if ReportLink.ProcessParams.HasOnlyCards then - PageControl1.ActivePage := tshCards; - if ReportLink.ProcessParams.HasOnlyCharts then - PageControl1.ActivePage := tshCharts; - - InitializePreviewGrid; - InitializePreviewGridStyles; - LoadDataIntoPreviewGridView(PreviewGrid.Levels[0].GridView as TcxCustomGridTableView); - - with ReportLink.OptionsView do - begin - chbxShowCaptions.Checked := Caption; - chbxShowBands.Checked := BandHeaders; - chbxShowExpandButtons.Checked := ExpandButtons; - chbxShowGroupFooters.Checked := GroupFooters; - chbxShowFilterBar.Checked := FilterBar; - chbxShowFooters.Checked := Footers; - chbxShowHeaders.Checked := Headers; - end; - - with ReportLink.OptionsOnEveryPage do - begin - chbxCaptionsOnEveryPage.Checked := Caption; - chbxBandsOnEveryPage.Checked := BandHeaders; - chbxFilterBarOnEveryPage.Checked := FilterBar; - chbxFootersOnEveryPage.Checked := Footers; - chbxHeadersOnEveryPage.Checked := Headers; - end; - - with cbxLookAndFeel do - begin - Items.Clear; - Items.AddObject(cxGetResourceString(@sdxLookAndFeelFlat), TObject(lfFlat)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelStandard), TObject(lfStandard)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelUltraFlat), TObject(lfUltraFlat)); - - ItemIndex := Items.IndexOfObject(TObject(ReportLink.OptionsFormatting.LookAndFeelKind)); - end; - - with ReportLink.OptionsSelection do - begin - chbxProcessSelection.Checked := ProcessSelection; - chbxProcessExactSelection.Checked := ProcessExactSelection; - end; - - with ReportLink.OptionsExpanding do - begin - chbxExpandGroupRows.Checked := ExpandGroupRows; - chbxExpandMasterRows.Checked := ExpandMasterRows; - {$IFDEF DXVER500} - chbxExpandCards.Checked := ExpandCards; - {$ENDIF} - end; - - with ReportLink.OptionsRefinements do - begin - chbxTransparentGraphics.Checked := TransparentGraphics; - chbxDisplayGraphicsAsText.Checked := DisplayGraphicsAsText; - chbxFlatCheckMarks.Checked := FlatCheckMarks; - {$IFDEF DXVER500} {.3} - //chbxTransparentRichEdits.Checked := TransparentRichEdits; - {$ENDIF} - end; - - with ReportLink.OptionsSize do - begin - chbxGridAutoWidth.Checked := AutoWidth; - end; - - with ReportLink.OptionsDetails do - begin - chbxStartFromActiveView.Checked := StartFromFocusedView; - chbxOnlyActiveView.Checked := OnlyFocusedView; - end; - - with ReportLink.OptionsLevels do - begin - chbxLevelsUnwrap.Checked := Unwrap; - chbxLevelsUnwrapTopLevel.Checked := UnwrapTopLevel; - chbxLevelsRiseActiveLevelOntoTop.Checked := RiseActiveLevelOntoTop; - chbxLevelsSkipEmptyViews.Checked := SkipEmptyViews; - end; - - with ReportLink.OptionsFormatting do - begin - chbxSuppressBackgroundBitmaps.Checked := SuppressBackgroundBitmaps; - chbxConsumeSelectionStyle.Checked := ConsumeSelectionStyle; - chbxUseNativeStyles.Checked := UseNativeStyles; - end; - - with ReportLink.OptionsPagination do - begin - chbxPaginateByTopLevelGroups.Checked := TopLevelGroup; - chbxPaginateOneGroupPerPage.Checked := OneGroupPerPage; - end; - - with ReportLink.OptionsPreview do - begin - chbxPreviewVisible.Checked := Visible; - chbxPreviewAutoHeight.Checked := AutoHeight; - sePreviewMaxLineCount.AsInteger := MaxLineCount; - end; - - with ReportLink.OptionsCards do - begin - chbxCardsAutoWidth.Checked := AutoWidth; - chbxCardsKeepSameWidth.Checked := KeepSameWidth; - chbxCardsKeepSameHeight.Checked := KeepSameHeight; - chbxCardsBorder.Checked := Borders; - chbxCardsHorzLines.Checked := RowBordersHorz; - chbxCardsVertLines.Checked := RowBordersVert; - seCardsSpaceHorz.AsInteger := InterCardsSpaceHorz; - seCardsSpaceVert.AsInteger := InterCardsSpaceVert; - with Shadow do - begin - seCardsShadowDepth.AsInteger := Depth; - ccbxCardsShadowColor.ColorValue := Color; - end; - end; - -{$IFDEF CHARTVIEW} - with ReportLink.OptionsCharts do - begin - chbxChartsTransparent.Checked := Transparent; - end; -{$ENDIF} -end; - -{$IFDEF DELPHI7} -function TdxfmGridReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxfmGridReportLinkDesignWindow.LoadStrings; - - procedure AdjustBevelSize(ABevel: TBevel; AControl: TControl); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := AControl.Left + AControl.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - inherited; - - lblPreviewWindow.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - tshView.Caption := cxGetResourceString(@sdxViewTab); - - lblShow.Caption := cxGetResourceString(@sdxShow); - AdjustBevelSize(bvlShow, lblShow); - chbxShowCaptions.Caption := cxGetResourceString(@sdxLevelCaption); - chbxShowBands.Caption := cxGetResourceString(@sdxBands); - chbxShowHeaders.Caption := cxGetResourceString(@sdxHeaders); - chbxShowFooters.Caption := cxGetResourceString(@sdxFooters); - chbxShowGroupFooters.Caption := cxGetResourceString(@sdxGroupFooters); - chbxShowExpandButtons.Caption := cxGetResourceString(@sdxExpandButtons); - chbxShowFilterBar.Caption := cxGetResourceString(@sdxFilterBar); - - lblOnEveryPage.Caption := cxGetResourceString(@sdxOnEveryPage); - AdjustBevelSize(bvlOnEveryPage, lblOnEveryPage); - chbxCaptionsOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxLevelCaption)); - chbxBandsOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxBands)); - chbxHeadersOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxHeaders)); - chbxFootersOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxFooters)); - chbxFilterBarOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxFilterBar)); - - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviorsTab); - - lblSelection.Caption := cxGetResourceString(@sdxSelection); - AdjustBevelSize(bvlSelection, lblSelection); - chbxProcessSelection.Caption := cxGetResourceString(@sdxProcessSelection); - chbxProcessExactSelection.Caption := cxGetResourceString(@sdxProcessExactSelection); - - lblExpanding.Caption := cxGetResourceString(@sdxExpanding); - AdjustBevelSize(bvlExpanding, lblExpanding); - chbxExpandGroupRows.Caption := cxGetResourceString(@sdxGroups); - chbxExpandMasterRows.Caption := cxGetResourceString(@sdxDetails); - chbxExpandCards.Caption := cxGetResourceString(@sdxCardsRows); - - lblGridSize.Caption := cxGetResourceString(@sdxSize); - AdjustBevelSize(bvlGridSize, lblGridSize); - chbxGridAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - - lblDetails.Caption := DropAmpersand(cxGetResourceString(@sdxDetails)); - AdjustBevelSize(bvlDetails, lblDetails); - chbxStartFromActiveView.Caption := cxGetResourceString(@sdxStartFromActiveDetails); - chbxOnlyActiveView.Caption := cxGetResourceString(@sdxOnlyActiveDetails); - - lblLevels.Caption := cxGetResourceString(@sdxLevels); - AdjustBevelSize(bvlLevels, lblLevels); - chbxLevelsUnwrap.Caption := cxGetResourceString(@sdxUnwrap); - chbxLevelsUnwrapTopLevel.Caption := cxGetResourceString(@sdxUnwrapTopLevel); - chbxLevelsRiseActiveLevelOntoTop.Caption := cxGetResourceString(@sdxRiseActiveToTop); - chbxLevelsSkipEmptyViews.Caption := cxGetResourceString(@sdxSkipEmptyViews); - - tshFormatting.Caption := cxGetResourceString(@sdxFormatting); - lblLookAndFeel.Caption := cxGetResourceString(@sdxLookAndFeel); - AdjustBevelSize(bvlLookAndFeel, lblLookAndFeel); - - lblRefinements.Caption := cxGetResourceString(@sdxRefinements); - AdjustBevelSize(bvlRefinements, lblRefinements); - chbxTransparentGraphics.Caption := cxGetResourceString(@sdxTransparentGraphics); - chbxDisplayGraphicsAsText.Caption := DropAmpersand(cxGetResourceString(@sdxDisplayGraphicsAsText)); - chbxFlatCheckMarks.Caption := cxGetResourceString(@sdxFlatCheckMarks); - //chbxTransparentRichEdits.Caption := cxGetResourceString(@sdxTransparentRichEdits); {.3} - - chbxSuppressBackgroundBitmaps.Caption := cxGetResourceString(@sdxSuppressBackgroundBitmaps); - chbxConsumeSelectionStyle.Caption := cxGetResourceString(@sdxConsumeSelectionStyle); - - lblPagination.Caption := cxGetResourceString(@sdxPagination); - AdjustBevelSize(bvlPagination, lblPagination); - chbxPaginateByTopLevelGroups.Caption := cxGetResourceString(@sdxByTopLevelGroups); - chbxPaginateOneGroupPerPage.Caption := cxGetResourceString(@sdxOneGroupPerPage); - - tshStyles.Caption := cxGetResourceString(@sdxStyles); - lblUseNativeStyles.Caption := cxGetResourceString(@sdxUseNativeStyles); - AdjustBevelSize(bvlStyles, lblUseNativeStyles); - btnStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - btnStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - btnStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - btnStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - btnStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - btnStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); - - miStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - miStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - miStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - miStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - miStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - miStylesSelectAll.Caption := cxGetResourceString(@sdxSelectAll); - miStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); - - lblStyleSheets.Caption := cxGetResourceString(@sdxStyleSheets); - AdjustBevelSize(bvlStyleSheets, lblStyleSheets); - btnStyleSheetNew.Caption := cxGetResourceString(@sdxBtnNew); - btnStyleSheetCopy.Caption := cxGetResourceString(@sdxBtnCopy); - btnStyleSheetDelete.Caption := cxGetResourceString(@sdxBtnDelete); - btnStyleSheetRename.Caption := cxGetResourceString(@sdxBtnRename); - - tshPreview.Caption := cxGetResourceString(@sdxPreviewTab); - lblPreviewOptions.Caption := cxGetResourceString(@sdxOptions); - AdjustBevelSize(bvlPreviewOptions, lblPreviewOptions); - chbxPreviewVisible.Caption := cxGetResourceString(@sdxVisible); - chbxPreviewAutoHeight.Caption := cxGetResourceString(@sdxPreviewAutoHeight); - lblPreviewMaxLineCount.Caption := cxGetResourceString(@sdxPreviewMaxLineCount); - - tshCards.Caption := cxGetResourceString(@sdxCardsTab); - lblCardSizes.Caption := cxGetResourceString(@sdxSizes); - AdjustBevelSize(bvlCardSizes, lblCardSizes); - chbxCardsAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - chbxCardsKeepSameWidth.Caption := cxGetResourceString(@sdxKeepSameWidth); - chbxCardsKeepSameHeight.Caption := cxGetResourceString(@sdxKeepSameHeight); - - lblCardSpacing.Caption := cxGetResourceString(@sdxSpacing); - AdjustBevelSize(bvlCardSpacing, lblCardSpacing); - lblCardSpaceHorz.Caption := cxGetResourceString(@sdxHorizontal); - lblCardSpaceVert.Caption := cxGetResourceString(@sdxVertical); - - lblCardFraming.Caption := cxGetResourceString(@sdxFraming); - AdjustBevelSize(bvlCardFraming, lblCardFraming); - chbxCardsBorder.Caption := cxGetResourceString(@sdxBorderLines); - chbxCardsHorzLines.Caption := cxGetResourceString(@sdxHorzLines); - chbxCardsVertLines.Caption := cxGetResourceString(@sdxVertLines); - - lblCardShadow.Caption := cxGetResourceString(@sdxShadow); - AdjustBevelSize(bvlCardShadow, lblCardShadow); - lblCardShadowColor.Caption := cxGetResourceString(@sdxColor); - lblCardShadowDepth.Caption := cxGetResourceString(@sdxDepth); - - tshCharts.Caption := cxGetResourceString(@sdxCharts); - lblChartsOptions.Caption := cxGetResourceString(@sdxOptions); - AdjustBevelSize(bvlChartsOptions, lblChartsOptions); - - chbxChartsTransparent.Caption := cxGetResourceString(@sdxTransparent); -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdateControlsState; -var - View: TcxCustomGridView; -begin - inherited; - - View := ReportLink.ActiveView; - if View <> nil then - with ReportLink.ProcessParams, dxViewHelpersFactory[View] do - begin - chbxShowBands.Enabled := IsAttributeSupported(TdxGridBandHeader); - chbxShowExpandButtons.Enabled := IsAttributeSupported(TdxGridExpandButton); - chbxShowFooters.Enabled := IsAttributeSupported(TdxGridFooter); - chbxShowGroupFooters.Enabled := IsAttributeSupported(TdxGridGroupFooter); - chbxShowHeaders.Enabled := IsAttributeSupported(TdxGridHeader); - - chbxCaptionsOnEveryPage.Enabled := IsAttributeSupported(TdxGridLevelCaption) and not ReportLink.IsAggregated; - chbxBandsOnEveryPage.Enabled := IsAttributeSupported(TdxGridBandHeader) and not ReportLink.IsAggregated; - chbxHeadersOnEveryPage.Enabled := IsAttributeSupported(TdxGridHeader) and not ReportLink.IsAggregated; - chbxFilterBarOnEveryPage.Enabled := IsAttributeSupported(TdxGridFilterBar) and not ReportLink.IsAggregated; - chbxFootersOnEveryPage.Enabled := IsAttributeSupported(TdxGridFooter) and not ReportLink.IsAggregated; - - chbxExpandGroupRows.Enabled := IsAttributeSupported(TdxGridGroupRow); - chbxExpandMasterRows.Enabled := IsAttributeSupported(TdxGridDetails); - - lblDetails.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - bvlDetails.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - imgDetails.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - chbxStartFromActiveView.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - chbxOnlyActiveView.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - chbxOnlyActiveView.Enabled := chbxStartFromActiveView.Checked; - - lblLevels.Visible := IsDesigning or HasUnwrapableData; - bvlLevels.Visible := IsDesigning or HasUnwrapableData; - imgLevels.Visible := IsDesigning or HasUnwrapableData; - chbxLevelsUnwrap.Visible := IsDesigning or HasUnwrapableData; - chbxLevelsUnwrapTopLevel.Visible := IsDesigning or HasUnwrapableData; - chbxLevelsRiseActiveLevelOntoTop.Visible := IsDesigning or HasUnwrapableData; - chbxLevelsSkipEmptyViews.Visible := IsDesigning or HasUnwrapableData; - - chbxLevelsUnwrapTopLevel.Enabled := chbxLevelsUnwrap.Checked; - chbxLevelsRiseActiveLevelOntoTop.Enabled := chbxLevelsUnwrap.Checked; - chbxLevelsSkipEmptyViews.Enabled := chbxLevelsUnwrap.Checked; - - chbxPreviewVisible.Enabled := IsAttributeSupported(TdxGridPreview); - chbxPreviewAutoHeight.Enabled := IsAttributeSupported(TdxGridPreview); - sePreviewMaxLineCount.Enabled := IsAttributeSupported(TdxGridPreview); - - lblPagination.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - bvlPagination.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - imgPagination.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - chbxPaginateByTopLevelGroups.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - chbxPaginateOneGroupPerPage.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - end; - - chbxProcessExactSelection.Enabled := chbxProcessSelection.Checked; - - chbxPaginateOneGroupPerPage.Enabled := chbxPaginateByTopLevelGroups.Checked; - - chbxCardsKeepSameWidth.Enabled := chbxCardsAutoWidth.Checked; - -{$IFDEF CHARTVIEW} - chbxChartsTransparent.Checked := ReportLink.OptionsCharts.Transparent; -{$ELSE} - tshCharts.TabVisible := False; // if chart not available -{$ENDIF} - - lbxStyles.Enabled := AreNativeStylesAvailable; - btnStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - btnStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStylesSaveAs.Enabled := CanSaveStyles; - - lblStyleSheets.Enabled := AreNativeStylesAvailable; - cbxStyleSheets.Enabled := AreNativeStylesAvailable; - btnStyleSheetNew.Enabled := CanCreateStyleSheet; - btnStyleSheetCopy.Enabled := CanCopyStyleSheet; - btnStyleSheetDelete.Enabled := CanDeleteStyleSheet; - btnStyleSheetRename.Enabled := CanRenameStyleSheet; - - UpdateWarningPane; -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdatePreview; -const - DetailTabsPositionMap: array[Boolean] of TcxGridDetailTabsPosition = (dtpNone, dtpTop); - GroupFootersMap: array[Boolean] of TcxGridGroupFootersMode = (gfInvisible, gfAlwaysVisible); - FilteringMap: array[Boolean] of {$IFDEF DXVER500}TcxGridFilterVisible{$ELSE}TcxGridTableFilterVisible{$ENDIF} = - (fvNonEmpty, fvAlways); - TransparentsMap: array[Boolean] of TcxImageTransparency = (gtOpaque, gtTransparent); - - {$IFDEF DXVER500} - function GetFilterBarPosition: TcxGridFilterPosition; - var - View: TcxCustomGridView; - begin - View := ReportLink.ActiveView; - if View is TcxCustomGridTableView then - Result := CustomGridTableFiltering_GetPosition(TcxCustomGridTableView(View).Filtering) - else - Result := fpBottom; - end; - {$ENDIF} - - procedure UpdateBandedView; - begin - TcxImageProperties(colVendorLogo.Properties).GraphicTransparency := - TransparentsMap[ReportLink.OptionsRefinements.TransparentGraphics]; - with PreviewBandedView do - begin - {$IFDEF DXVER500} - Filtering.Position := GetFilterBarPosition; - {$ENDIF} - Filtering.Visible := FilteringMap[ReportLink.OptionsView.FilterBar]; - OptionsView.BandHeaders := ReportLink.OptionsView.BandHeaders; - OptionsView.Footer := ReportLink.OptionsView.Footers; - OptionsView.GroupFooters := GroupFootersMap[ReportLink.OptionsView.GroupFooters]; - OptionsView.Header := ReportLink.OptionsView.Headers; - Preview.Visible := ReportLink.OptionsPreview.Visible; - ViewChanged; - end; - end; - - procedure UpdateCardView; - begin - TcxImageProperties(rowVendorLogo.Properties).GraphicTransparency := - TransparentsMap[ReportLink.OptionsRefinements.TransparentGraphics]; - {$IFDEF DXVER500} - PreviewCardView.Filtering.Position := GetFilterBarPosition; - PreviewCardView.Filtering.Visible := FilteringMap[ReportLink.OptionsView.FilterBar]; - {$ENDIF} - PreviewCardView.ViewChanged; - end; - -begin - PreviewGrid.Enabled := False; - - PreviewGrid.LookAndFeel.Kind := ReportLink.OptionsFormatting.LookAndFeelKind; - PreviewGrid.LookAndFeel.NativeStyle := False; - PreviewGrid.Font := ReportLink.Font; - PreviewGrid.RootLevelOptions.DetailTabsPosition := DetailTabsPositionMap[ReportLink.OptionsView.Caption]; - - UpdateBandedView; - UpdateCardView; -end; - -function TdxfmGridReportLinkDesignWindow.GetDesignerTabIndex: Integer; -begin - Result := PageControl1.ActivePage.TabIndex; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetDesignerTabIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > PageControl1.PageCount - 1 then - Value := PageControl1.PageCount - 1; - PageControl1.ActivePage := PageControl1.Pages[Value]; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited; - with cbxStyleSheets do - ItemIndex := Items.IndexOfObject(ActiveStyleSheet); - - if not LockControlsUpdate then - begin - Modified := True; - UpdatePreview; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin - inherited; - if not AnActive then lbxStyles.HideToolTips; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoRefreshStylesList; -var - Styles: TdxGridReportLinkStyles; - List: TList; -begin - Styles := ReportLink.ActiveStyles; - - with lbxStyles.Items do - begin - BeginUpdate; - try - List := TList.Create; - try - SaveSelectedStyles(List); - try - Clear; - AddObject(cxGetResourceString(@sdxBandHeaderStyle), Styles.BandHeader); - AddObject(cxGetResourceString(@sdxCaptionStyle), Styles.Caption); - AddObject(cxGetResourceString(@sdxCardCaptionRowStyle), Styles.CardCaptionRow); - AddObject(cxGetResourceString(@sdxCardRowCaptionStyle), Styles.CardRowCaption); - AddObject(cxGetResourceString(@sdxContentStyle), Styles.Content); - AddObject(cxGetResourceString(@sdxContentEvenStyle), Styles.ContentEven); - AddObject(cxGetResourceString(@sdxContentOddStyle), Styles.ContentOdd); - AddObject(cxGetResourceString(@sdxFilterBarStyle), Styles.FilterBar); - AddObject(cxGetResourceString(@sdxFooterStyle), Styles.Footer); - AddObject(cxGetResourceString(@sdxGroupStyle), Styles.Group); - AddObject(cxGetResourceString(@sdxHeaderStyle), Styles.Header); - AddObject(cxGetResourceString(@sdxPreviewStyle), Styles.Preview); - AddObject(cxGetResourceString(@sdxSelectionStyle), Styles.Selection); - finally - RestoreSelectedStyles(List); - end; - finally - List.Free; - end; - finally - EndUpdate; - end; - end; - InitializePreviewGridStyles; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - inherited; - Modified := True; - UpdatePreviewGridStyles(ACaption, AStyle); -end; - -procedure TdxfmGridReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin - if ARecreate then - RecreateStylesListBox - else - lbxStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - with lbxStyles do - for I := 0 to Items.Count - 1 do - if Selected[I] then - AStrings.AddObject(Items[I], Items.Objects[I]); -end; - -procedure TdxfmGridReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := lbxStyles.Items; -end; - -procedure TdxfmGridReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := cbxStyleSheets.Items; -end; - -function TdxfmGridReportLinkDesignWindow.GetActiveStyle: TcxStyle; -begin - with lbxStyles do - if ItemIndex <> -1 then - Result := TcxStyle(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -function TdxfmGridReportLinkDesignWindow.GetHasSelectedStyles: Boolean; -begin - Result := lbxStyles.SelCount <> 0; -end; - -function TdxfmGridReportLinkDesignWindow.GetHasSelectedStylesWithAssignedBitmap: Boolean; -var - Strings: TStrings; - I: Integer; - cxStyle: TcxStyle; -begin - Result := True; - Strings := TStringList.Create; - try - GetSelectedStyleNames(Strings); - for I := 0 to Strings.Count - 1 do - begin - cxStyle := TcxStyle(Strings.Objects[I]); - if (cxStyle <> nil) and (cxStyle.Bitmap <> nil) and not cxStyle.Bitmap.Empty then - Exit; - end; - finally - Strings.Free; - end; - Result := False; -end; - -function TdxfmGridReportLinkDesignWindow.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardShadowColorChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - if TdxPSColorCombo(Sender).IsAutoColorSelected then - ReportLink.OptionsCards.Shadow.Color := clDefault - else - ReportLink.OptionsCards.Shadow.Color := TdxPSColorCombo(Sender).ColorValue; - TcxGridCardView2Styles(PreviewCardView.Styles).CardShadow.Color := ReportLink.OptionsCards.Shadow.ActualColor; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardShadowDepthChanged(Sender: TObject); -var - NewDepth: Integer; -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsCards.Shadow.Depth := TdxPSSpinEdit(Sender).AsInteger; - - NewDepth := TdxPSSpinEdit(Sender).AsInteger; - if NewDepth > 4 then NewDepth := 4; - TcxGridCardView2OptionsView(PreviewCardView.OptionsView).ShadowDepth := NewDepth; - - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardSpaceHorzChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsCards.InterCardsSpaceHorz := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardSpaceVertChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsCards.InterCardsSpaceVert := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewMaxLineCountChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.MaxLineCount := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -function TdxfmGridReportLinkDesignWindow.CanSelectAllStyles: Boolean; -var - I: Integer; -begin - Result := AreNativeStylesAvailable; - if Result then - begin - for I := 0 to lbxStyles.Items.Count - 1 do - if not lbxStyles.Selected[I] then Exit; - Result := False; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.ChangeActiveView(AView: TcxCustomGridView); -var - OldGridView: TcxCustomGridView; -begin - with PreviewGrid.Levels[0] do - begin - OldGridView := GridView; - GridView := AView; - if OldGridView <> GridView then - LoadDataIntoPreviewGridView(GridView as TcxCustomGridTableView); - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.CreateCardView; - - function CreateRow(APropertiesClass: TcxCustomEditPropertiesClass = nil; - AOnCustomDraw: TcxGridTableDataCellCustomDrawEvent = nil): TcxGridCardViewRow; - begin - Result := PreviewCardView.CreateRow; - Result.PropertiesClass := APropertiesClass; - Result.OnCustomDrawCell := AOnCustomDraw; - end; - -begin - PreviewCardView := PreviewGrid.CreateView(TcxGridCardView2) as TcxGridCardView2; - with PreviewCardView do - begin - LayoutDirection := ldVertical; - {$IFDEF DXVER500} - Filtering.CustomizeDialog := False; - {$ENDIF} - TcxGridCardView2Styles(Styles).CardShadow := styleCardShadow; - with TcxGridCardView2OptionsView(OptionsView) do - begin - CardWidth := 135; - CardBorderWidth := 1; - CellAutoHeight := True; - GridLineColor := ReportLink.OptionsFormatting.GridLineColor; - SeparatorWidth := 0; - ScrollBars := ssNone; - ShadowDepth := ReportLink.OptionsCards.Shadow.Depth; - end; - {$IFDEF DXVER500} - with OptionsCustomize do - begin - CardExpanding := False; - RowFiltering := False; - end; - {$ENDIF} - end; - - rowVendorName := CreateRow; - rowVendorLogo := CreateRow(TcxImageProperties, VendorLogoCustomDrawCell); - rowVendorCountry := CreateRow; - rowCarModel := CreateRow; - rowIsSuvModel := CreateRow(TcxCheckBoxProperties, IsSUVModelCustomDrawCell); -end; - -procedure TdxfmGridReportLinkDesignWindow.CreateControls; - - function CreateSpin(AHost: TControl; ALabel: TLabel; ATabOrder: TTabOrder; - AMinValue, AMaxValue, AValue: Integer): TdxPSSpinEdit; - begin - Result := TdxPSSpinEdit.Create(Self); - with Result do - begin - Parent := AHost.Parent; - BoundsRect := AHost.BoundsRect; - TabOrder := ATabOrder; - - MinValue := AMinValue; - MaxValue := AMaxValue; - Value := AValue; - DefaultValue := AValue; - end; - ALabel.FocusControl := Result; - end; - - function CreateColorCombo(AParent: TWinControl; AHost: TControl; ALabel: TLabel; - ATabOrder: TTabOrder; ATag: Integer; AAutoColor: TColor): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(Result) do - begin - BoundsRect := AHost.BoundsRect; - Tag := MakeTTag(ATag); - Parent := AParent; - TabOrder := ATabOrder; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - - procedure CreateWarningPane; - begin - wpIncorrectOnEveryPageState := TdxPSWarningPane.Create(Self); - wpIncorrectOnEveryPageState.Parent := tshView; - wpIncorrectOnEveryPageState.BoundsRect := bvlWarningHost.BoundsRect; - wpIncorrectOnEveryPageState.Font.Name := 'Tahoma'; - wpIncorrectOnEveryPageState.Font.Size := 8; - - bvlWarningHost.Visible := False; - end; - - procedure CreateStylesListBox; - begin - lbxStyles := TdxStylesListBox.Create(Self); - lbxStyles.Parent := tshStyles; - lbxStyles.BoundsRect := bvlStylesHost.BoundsRect; - lbxStyles.PopupMenu := pmStyles; - lbxStyles.TabOrder := chbxUseNativeStyles.TabOrder + 1; - lbxStyles.OnClick := lbxStylesClick; - bvlStylesHost.Visible := False; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(lbxStyles); - end; - -begin - sePreviewMaxLineCount := CreateSpin(bvlPreviewMaxLineCountHost, lblPreviewMaxLineCount, - chbxPreviewAutoHeight.TabOrder + 1, 0, 1000, 0); - sePreviewMaxLineCount.OnChange := PreviewMaxLineCountChanged; - - seCardsSpaceHorz := CreateSpin(bvlCardSpaceHorzHost, lblCardSpaceHorz, - chbxCardsKeepSameHeight.TabOrder + 1, 0, 20, dxDefaultInterCardsSpaceHorz); - seCardsSpaceHorz.OnChange := CardSpaceHorzChanged; - - seCardsSpaceVert := CreateSpin(bvlCardSpaceVertHost, lblCardSpaceVert, - seCardsSpaceHorz.TabOrder + 1, 0, 20, dxDefaultInterCardsSpaceVert); - seCardsSpaceVert.OnChange := CardSpaceVertChanged; - - ccbxCardsShadowColor := CreateColorCombo(tshCards, bvlCardShadowColorHost, lblCardShadowColor, - chbxCardsVertLines.TabOrder + 1, 0, dxDefaultCardsShadowColor); - ccbxCardsShadowColor.OnChange := CardShadowColorChanged; - - seCardsShadowDepth := CreateSpin(bvlCardShadowDepthHost, lblCardShadowDepth, - ccbxCardsShadowColor.TabOrder + 1, Low(TdxGridCardShadowDepth), High(TdxGridCardShadowDepth), - dxDefaultCardsShadowDepth); - seCardsShadowDepth.OnChange := CardShadowDepthChanged; - - CreateStylesListBox; - CreateWarningPane; -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawBorders(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridCellViewInfo); -var - PainterClass: TcxCustomGridCellPainterClass; - Painter: TcxCustomGridCellPainter; -begin - PainterClass := CustomGridCellViewInfo_GetPainterClass(AViewInfo); - Painter := PainterClass.Create(ACanvas, AViewInfo); - try - CustomGridCellPainter_DrawBorders(Painter); - finally - Painter.Free; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawFooter(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxCustomGridCellViewInfo); -begin - case ReportLink.OptionsFormatting.LookAndFeelKind of - lfStandard, - lfFlat: - ACanvas.DrawComplexFrame(R, AViewInfo.Params.TextColor, clBtnHighlight); - lfUltraFlat: - ACanvas.FrameRect(R, AViewInfo.Params.TextColor); - end; - - InflateRect(R, -1, -1); - CustomDrawTextRect(ACanvas, R, AViewInfo, AViewInfo.BackgroundBitmap); -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawHeader(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxCustomGridCellViewInfo); -const - BottomRightColors: array[Boolean] of TColor = (clBtnFace, clBtnShadow); -begin - ACanvas.FrameRect(R, clWindowText); - - if ReportLink.OptionsFormatting.LookAndFeelKind <> lfUltraFlat then - begin - InflateRect(R, -1, -1); - ACanvas.DrawComplexFrame(R, clBtnHighlight, BottomRightColors[ReportLink.OptionsFormatting.LookAndFeelKind = lfStandard]); - end; - - InflateRect(R, -1, -1); - CustomDrawTextRect(ACanvas, R, AViewInfo, AViewInfo.BackgroundBitmap); -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawTextRect(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxCustomGridCellViewInfo; ABackgroundBitmap: TBitmap); -const - AlignmentHorzMap: array[TAlignment] of Integer = (cxAlignLeft, cxAlignRight, cxAlignCenter); - AlignmentVertMap: array[TcxAlignmentVert] of Integer = (cxAlignTop, cxAlignBottom, cxAlignVCenter); -begin - with AViewInfo do - begin - if ABackgroundBitmap = nil then - begin - ACanvas.Brush.Color := Params.Color; - ACanvas.FillRect(R); - end - else - dxBkgnd.DrawPicture(ABackgroundBitmap, ACanvas.Canvas, R, ppmTile, 1, 1, - R.Left - 0, - R.Top - 0); - - InflateRect(R, -2, -1); - if ReportLink.OptionsFormatting.LookAndFeelKind = lfUltraFlat then - InflateRect(R, -1, -1); - if Params.Font <> nil then - ACanvas.Font := Params.Font; - ACanvas.Font.Color := Params.TextColor; - ACanvas.Brush.Style := bsClear; - ACanvas.DrawText(Text, R, AlignmentHorzMap[AlignmentHorz] or AlignmentVertMap[AlignmentVert] or cxSingleLine); - ACanvas.Brush.Style := bsSolid; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.InitializePreviewGrid; - - procedure SetupDataBindings(AView: TcxCustomGridTableView); - - function GetColumnCaption(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxManufacturerNameColumnCaption); - 1: Result := cxGetResourceString(@sdxManufacturerLogoColumnCaption); - 2: Result := cxGetResourceString(@sdxManufacturerCountryColumnCaption); - 3: Result := cxGetResourceString(@sdxCarModelColumnCaption); - else - Result := cxGetResourceString(@sdxCarIsSUVColumnCaption); - end; - end; - - const - ColumnTypes: array[0..4] of TcxValueTypeClass = - (TcxStringValueType, TcxStringValueType, TcxStringValueType, - TcxStringValueType, TcxBooleanValueType); - var - I: Integer; - begin - for I := 0 to AView.ItemCount - 1 do - with AView.Items[I] do - begin - DataBinding.ValueTypeClass := ColumnTypes[I]; - Caption := GetColumnCaption(I); - end; - end; - -begin - if PageControl1.ActivePage = tshCards then - PreviewGrid.Levels[0].GridView := PreviewCardView - else - PreviewGrid.Levels[0].GridView := PreviewBandedView; - - SetupDataBindings(PreviewBandedView); - PreviewGridLevel.Caption := cxGetResourceString(@sdxCarLevelCaption); - - PreviewBandedView.Bands[0].Caption := cxGetResourceString(@sdxManufacturerBandCaption); - PreviewBandedView.Bands[1].Caption := cxGetResourceString(@sdxModelBandCaption); - PreviewBandedView.DataController.Summary.FooterSummaryItems[0].Format := cxGetResourceString(@sdxSummaryFormat); - - SetupDataBindings(PreviewCardView); -// PreviewCardView.Rows[3].Visible := False; -end; - -procedure TdxfmGridReportLinkDesignWindow.InitializePreviewGridStyles; - - procedure ResetEvents(AStyles: TcxGridBandedTableViewStyles); overload; - begin - with AStyles do - begin - OnGetBandHeaderStyle := nil; - OnGetContentStyle := nil; - OnGetFooterStyle := nil; - OnGetGroupStyle := nil; - OnGetHeaderStyle := nil; - OnGetPreviewStyle := nil; - end; - end; - - procedure ResetEvents(AStyles: TcxGridCardViewStyles); overload; - begin - with AStyles do - begin - OnGetCaptionRowStyle := nil; - OnGetCardBorderStyle := nil; - OnGetContentStyle := nil; - OnGetRowCaptionStyle := nil; - end; - end; - -var - Styles: TdxGridReportLinkStyles; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - begin - Styles := ReportLink.ActiveStyles; - - PreviewGrid.RootLevelStyles.Tab := Styles.Caption; - PreviewGrid.RootLevelStyles.TabsBackground := Styles.Caption; - - if PreviewBandedView <> nil then - begin - dxPScxCommon.dxPSResetStyles(PreviewBandedView.Styles); - with PreviewBandedView.Styles do - begin - BandHeader := Styles.BandHeader; - Content := Styles.Content; - ContentEven := Styles.ContentEven; - ContentOdd := Styles.ContentOdd; - FilterBox := Styles.FilterBar; - Footer := Styles.Footer; - Group := Styles.Group; - Header := Styles.Header; - Preview := Styles.Preview; - end; - end; - - if PreviewCardView <> nil then - begin - dxPScxCommon.dxPSResetStyles(PreviewCardView.Styles); - with PreviewCardView.Styles do - begin - CaptionRow := Styles.CardCaptionRow; - CardBorder := StyleCardBorder; - Content := Styles.Content; - ContentEven := Styles.ContentEven; - ContentOdd := Styles.ContentOdd; - RowCaption := Styles.CardRowCaption; - end; - end; - - end - else - begin - if ReportLink.Grid <> nil then - begin - PreviewGrid.RootLevelStyles.Tab := ReportLink.Grid.RootLevelStyles.Tab; - PreviewGrid.RootLevelStyles.TabsBackground := ReportLink.Grid.RootLevelStyles.TabsBackground; - end - else - dxPScxCommon.dxPSResetStyles(PreviewGrid.RootLevelStyles); - - if PreviewBandedView <> nil then - if ReportLink.ActiveView is TcxGridBandedTableView then - PreviewBandedView.Styles := TcxGridBandedTableView(ReportLink.ActiveView).Styles - else - dxPScxCommon.dxPSResetStyles(PreviewBandedView.Styles); - - if PreviewCardView <> nil then - if ReportLink.ActiveView is TcxGridCardView then - PreviewCardView.Styles := TcxGridCardView(ReportLink.ActiveView).Styles - else - dxPScxCommon.dxPSResetStyles(PreviewCardView.Styles); - end; - - PreviewGrid.RootLevelStyles.OnGetTabStyle := nil; - if PreviewBandedView <> nil then - begin - ResetEvents(PreviewBandedView.Styles); - PreviewBandedView.SizeChanged; - end; - if PreviewCardView <> nil then - begin - ResetEvents(PreviewCardView.Styles); - PreviewCardView.SizeChanged; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.LoadDataIntoPreviewGridView(AView: TcxCustomGridTableView); - - procedure AddRecord(ARecordIndex: Integer; const AValues: array of AnsiString); - var - I: Integer; - begin - with AView.DataController do - for I := 0 to ItemCount - 1 do - Values[ARecordIndex, I] := AValues[I]; - end; - - function CarVendorName(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxCarManufacturerName1); - 1: Result := cxGetResourceString(@sdxCarManufacturerName2); - 2: Result := cxGetResourceString(@sdxCarManufacturerName3); - else - Result := cxGetResourceString(@sdxCarManufacturerName4); - end; - end; - - function CarVendorCountry(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxCarManufacturerCountry1); - 1: Result := cxGetResourceString(@sdxCarManufacturerCountry2); - 2: Result := cxGetResourceString(@sdxCarManufacturerCountry3); - else - Result := cxGetResourceString(@sdxCarManufacturerCountry4); - end; - end; - - function CarModel(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxCarModel1); - 1: Result := cxGetResourceString(@sdxCarModel2); - 2: Result := cxGetResourceString(@sdxCarModel3); - else - Result := cxGetResourceString(@sdxCarModel4); - end; - end; - -const - RecordCount = 4; - //CarSalesCount: array[0..RecordCount - 1] of Integer = (10, 6, 3, 5); - IsCarSUV: array[0..RecordCount - 1] of string = ('True', 'True', 'False', 'True'); -var - I: Integer; -begin - AView.DataController.RecordCount := RecordCount; - for I := 0 to RecordCount - 1 do - AddRecord(I, [dxStringToAnsiString(CarVendorName(I)), dxPScxCommon.dxPSPreviewCarLogosAsString(I), - dxStringToAnsiString(CarVendorCountry(I)), dxStringToAnsiString(CarModel(I)), dxStringToAnsiString(IsCarSUV[I])]);//, CarSalesCount[I]]); -end; - -procedure TdxfmGridReportLinkDesignWindow.RecreateStylesListBox; -var - List: TList; -begin - List := TList.Create; - try - SaveSelectedStyles(List); - dxPSUtl.dxRecreateWnd(lbxStyles); - RestoreSelectedStyles(List); - finally - List.Free; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.RestoreSelectedStyles(AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - lbxStyles.Selected[Integer(AList[I])] := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SaveSelectedStyles(AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to lbxStyles.Items.Count - 1 do - if lbxStyles.Selected[I] then AList.Add(TObject(I)); -end; - -procedure TdxfmGridReportLinkDesignWindow.SetActivePage; -begin - PageControl1.ActivePage := PageControl1.Pages[DesignerTabIndex]; -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdatePreviewGridStyles(const ACaption: string; - AStyle: TcxStyle); -begin - with PreviewGrid.RootLevelStyles do - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxCaptionStyle)) then - begin - Tab := AStyle; - TabsBackground := AStyle; - end; - - with PreviewBandedView.Styles do - begin - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxBandHeaderStyle)) then - BandHeader := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentStyle)) then - Content := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentEvenStyle)) then - ContentEven := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentOddStyle)) then - ContentOdd := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxFooterStyle)) then - Footer := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxGroupStyle)) then - Group := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxHeaderStyle)) then - Header := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxPreviewStyle)) then - Preview := AStyle; - end; - - with PreviewCardView.Styles do - begin - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxCardCaptionRowStyle)) then - CaptionRow := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxCardRowCaptionStyle)) then - RowCaption := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentStyle)) then - Content := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentEvenStyle)) then - ContentEven := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentOddStyle)) then - ContentOdd := AStyle - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdateWarningPane; -begin - with ReportLink.HostInfoServices do - wpIncorrectOnEveryPageState.SetStateAndHint(IsInconsistentState, InconsistentStateText); -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsCardsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsCards do - case Index of - 0: AutoWidth := Value; - 1: KeepSameWidth := Value; - 2: KeepSameHeight := Value; - 3: Borders := Value; - 4: RowBordersHorz := Value; - 5: RowBordersVert := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsChartsByIndex(Index: Integer; - Value: Boolean); -begin -{$IFDEF CHARTVIEW} - if LockControlsUpdate then Exit; - - with ReportLink.OptionsCharts do - case Index of - 0: Transparent := Value; - end; - Modified := True; -{$ENDIF} -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsDetailsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsDetails do - case Index of - 0: StartFromFocusedView := Value; - 1: OnlyFocusedView := Value; - end; - ReportLink.CalculateProcessParams; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsExpandingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsExpanding do - case Index of - 0: ExpandGroupRows := Value; - 1: ExpandMasterRows := Value; - {$IFDEF DXVER500} - 2: ExpandCards := Value; - {$ENDIF} - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsFormattingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsFormatting do - case Index of - 0: - begin - UseNativeStyles := Value; - InitializePreviewGridStyles; - RecreateStylesListBox; - end; - 1: SuppressBackgroundBitmaps := Value; - 2: ConsumeSelectionStyle := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsLevelsByIndex(Index: Integer; Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsLevels do - case Index of - 0: Unwrap := Value; - 1: UnwrapTopLevel := Value; - 2: RiseActiveLevelOntoTop := Value; - 3: SkipEmptyViews := Value; - end; - ReportLink.CalculateProcessParams; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsOnEveryPageByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsOnEveryPage do - case Index of - 0: Caption := Value; - 1: BandHeaders := Value; - 2: Headers := Value; - 3: Footers := Value; - 4: FilterBar := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsPaginationByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsPagination do - case Index of - 0: TopLevelGroup := Value; - 1: OneGroupPerPage := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsRefinementsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsRefinements do - case Index of - 0: TransparentGraphics := Value; - 1: DisplayGraphicsAsText := Value; - 2: FlatCheckMarks := Value; - {$IFDEF DXVER500} - 3: TransparentRichEdits := Value; - {$ENDIF} - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsSelectionByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsSelection do - case Index of - 0: ProcessSelection := Value; - 1: ProcessExactSelection := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsSizeByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsSize do - case Index of - 0: AutoWidth := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsViewByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsView do - case Index of - 0: Caption := Value; - 1: BandHeaders := Value; - 2: Headers := Value; - 3: Footers := Value; - 4: GroupFooters := Value; - 5: ExpandButtons := Value; - 6: FilterBar := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsViewClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsViewByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsOnEveryPageClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsOnEveryPageByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsSelectionClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSelectionByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsExpandingClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsExpandingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsRefinementClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsRefinementsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsFormatingClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsFormattingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.lblUseNativeStylesClick(Sender: TObject); -begin - if chbxUseNativeStyles.CanFocus then ActiveControl := chbxUseNativeStyles; - chbxUseNativeStyles.Checked := not chbxUseNativeStyles.Checked; -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsPaginationClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsPaginationByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsSizeClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSizeByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsDetailsClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsDetailsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsLevelsClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsLevelsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.LookAndFeelClick(Sender: TObject); -begin - with TComboBox(Sender) do - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreviewWindow.Parent := TPageControl(Sender).ActivePage; - if not ReportLink.ProcessParams.HasOnlyCards then - if PageControl1.ActivePage = tshCards then - ChangeActiveView(PreviewCardView) - else - if PageControl1.ActivePage = tshStyles then - if ReportLink.IsCardViewStyle(ActiveStyle) then - ChangeActiveView(PreviewCardView) - else - ChangeActiveView(PreviewBandedView) - else - ChangeActiveView(PreviewBandedView); -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewVisibleClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.Visible := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewAutoHeightClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.AutoHeight := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsCardsClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsCardsByIndex(TTagToInt(Tag), Checked); - with TcxGridCardView2OptionsView(PreviewCardView.OptionsView), ReportLink.OptionsCards do - begin - CardBorders := Borders; - GridLines := dxPScxCommon.dxPSMakecxGridLines(RowBordersHorz, RowBordersVert); - end; - //UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.chbxChartsTransparentClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsChartsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.pmStylesPopup(Sender: TObject); -begin - lbxStyles.HideToolTips; - miStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - miStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStylesSelectAll.Enabled := CanSelectAllStyles; - miStylesSaveAs.Enabled := CanSaveStyles; -end; - -procedure TdxfmGridReportLinkDesignWindow.lbxStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - if not ReportLink.ProcessParams.HasOnlyCards then - if ReportLink.IsCardViewStyle(ActiveStyle) then - ChangeActiveView(PreviewCardView) - else - ChangeActiveView(PreviewBandedView); - UpdateControlsState; -end; - -procedure TdxfmGridReportLinkDesignWindow.IsSUVModelCustomDrawCell( - Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); - - procedure DrawBackground(const R: TRect); - - function GetParams: TcxViewParams; - begin - if AViewInfo is TcxGridCardRowDataViewInfo then - PreviewCardView.Styles.GetContentParams(AViewInfo.GridRecord, AViewInfo.Item, Result) - else - PreviewBandedView.Styles.GetContentParams(AViewInfo.GridRecord, AViewInfo.Item, Result); - end; - - var - BackgroundBitmap: TBitmap; - PrevColor: TColor; - begin - BackgroundBitmap := CustomGridView_GetBackgroundBitmaps(AViewInfo.GridRecord.GridView).GetBitmap(bbContent); - if BackgroundBitmap = nil then - begin - PrevColor := ACanvas.Brush.Color; - ACanvas.Brush.Color := GetParams.Color; - ACanvas.FillRect(R); - ACanvas.Brush.Color := PrevColor; - end - else - dxBkgnd.DrawPicture(BackgroundBitmap, ACanvas.Canvas, R, ppmTile, 1, 1, -R.Left, -R.Top); - end; - - procedure DrawCheck(R: TRect); - const - Painters: array[Boolean] of TcxCustomLookAndFeelPainterClass = - (TcxStandardLookAndFeelPainter, TcxUltraFlatLookAndFeelPainter); - CheckStateMap: array[Boolean] of TcxCheckBoxState = (cbsChecked, cbsUnchecked); - var - X, Y: Integer; - CheckState: Variant; - begin - with R do - begin - X := Left + (Right - Left - dxPSGlbl.CheckWidth) div 2; - Y := Top + (Bottom - Top - dxPSGlbl.CheckHeight) div 2; - end; - R := MakeBounds(X, Y, dxPSGlbl.CheckWidth, dxPSGlbl.CheckHeight); - - CheckState := Variant(CheckStateMap[AViewInfo.RecordViewInfo.GridRecord.RecordIndex = 2]); - with Painters[ReportLink.OptionsRefinements.FlatCheckMarks] do - DrawCheckButton(ACanvas, R, cxbsDefault, CheckState = Variant(cbsChecked)); - end; - -var - R: TRect; -begin - if (Sender is TcxGridTableView) or (AViewInfo is TcxGridCardRowDataViewInfo) then - begin - R := AViewInfo.Bounds; - DrawBackground(R); - DrawCheck(R); - - CustomDrawBorders(ACanvas, AViewInfo); - ADone := True; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.VendorLogoCustomDrawCell( - Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); -var - PrevText: string; -begin - if ReportLink.OptionsRefinements.DisplayGraphicsAsText and - ((Sender is TcxGridTableView) or (AViewInfo is TcxGridCardRowDataViewInfo)) then - begin - PrevText := AViewInfo.Text; - AViewInfo.Text := ReportLink.OptionsRefinements.GraphicsText; - AViewInfo.AlignmentVert := vaTop; - //AViewInfo.Transparent := True; - CustomDrawTextRect(ACanvas, AViewInfo.Bounds, AViewInfo, AViewInfo.RecordViewInfo.BackgroundBitmap); - AViewInfo.Text := PrevText; - CustomDrawBorders(ACanvas, AViewInfo); - ADone := True; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewBandedViewCustomDrawColumnHeader( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); -var - R: TRect; -begin - R := AViewInfo.Bounds; - Dec(R.Left); - if not ((PreviewGrid.LookAndFeel.Kind = lfUltraFlat) and - not TcxGridBandedTableOptionsView(Sender.OptionsView).BandHeaders) then - Dec(R.Top); - CustomDrawHeader(ACanvas, R, AViewInfo); - - ADone := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewBandedViewCustomDrawBandHeader( - Sender: TcxGridBandedTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridBandHeaderViewInfo; var ADone: Boolean); -var - R: TRect; -begin - R := AViewInfo.Bounds; - Dec(R.Left); - CustomDrawHeader(ACanvas, R, AViewInfo); - - ADone := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewBandedViewCustomDrawFooterCell( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); -begin - CustomDrawFooter(ACanvas, AViewInfo.Bounds, AViewInfo); - ADone := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleColorClick(Sender: TObject); -begin - PerformStylesChangeColor; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleFontClick(Sender: TObject); -begin - PerformStylesChangeFont; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleBackgroundBitmapClick(Sender: TObject); -begin - PerformStylesChangeBitmap; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleBackgroundBitmapClearClick(Sender: TObject); -begin - PerformStylesClearBitmap; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleRestoreDefaultsClick(Sender: TObject); -begin - PerformStylesRestoreDefaults; -end; - -procedure TdxfmGridReportLinkDesignWindow.miStylesSelectAllClick(Sender: TObject); -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - with lbxStyles do - begin - {$IFDEF DELPHI6} - SelectAll; - {$ELSE} - Items.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - Selected[I] := True; - finally - Items.EndUpdate; - end; - {$ENDIF} - end; - UpdateControlsState; -end; - -procedure TdxfmGridReportLinkDesignWindow.cbxStyleSheetsClick(Sender: TObject); -begin - with TComboBox(Sender) do - ActiveStyleSheet := TcxCustomStyleSheet(Items.Objects[ItemIndex]); -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetNewClick(Sender: TObject); -begin - PerformStyleSheetNew; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetCopyClick(Sender: TObject); -begin - PerformStyleSheetCopy; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetDeleteClick(Sender: TObject); -begin - PerformStyleSheetDelete; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetRenameClick(Sender: TObject); -begin - PerformStyleSheetRename; -end; - -procedure TdxfmGridReportLinkDesignWindow.StylesSaveAsClick(Sender: TObject); -begin - PerformStylesSaveAsStyleSheet; -end; - -procedure TdxfmGridReportLinkDesignWindow.cbxStyleSheetsKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - PerformStyleSheetKeyDown(Sender, Key, Shift); -end; - -procedure TdxfmGridReportLinkDesignWindow.cbxStyleSheetsDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -begin - PerformStyleSheetDrawItem(TComboBox(Control).Canvas, Index, Rect, State, Control.Enabled); -end; - -procedure RegisterAssistants; -begin - TdxCustomGridViewBuilder.Register; - TdxCustomGridTableViewBuilder.Register; - TdxGridTableViewBuilder.Register; - TdxGridDBTableViewBuilder.Register; - TdxGridBandedTableViewBuilder.Register; - TdxGridDBBandedTableViewBuilder.Register; - TdxGridCardViewBuilder.Register; - TdxGridDBCardViewBuilder.Register; -{$IFDEF CHARTVIEW} - TdxGridChartViewBuilder.Register; -{$ENDIF} - - TdxCustomGridViewHelper.Register; - TdxCustomGridTableViewHelper.Register; - TdxGridCardViewHelper.Register; - TdxGridTableViewHelper.Register; - TdxGridBandedTableViewHelper.Register; - - TdxCustomGridRecordHelper.Register; - TdxCustomGridRowHelper.Register; - TdxGridDataRowHelper.Register; - TdxGridGroupRowHelper.Register; - TdxGridMasterDataRowHelper.Register; - - TdxGridReportLinkStyleSheet.Register; -end; - -procedure RegisterItems; -begin - TdxReportCardHorz.Register; - TdxReportCardVert.Register; - - TdxReportCardLayer.Register; - TdxReportCardVerticalLayer.Register; - - TdxReportCardRow.Register; -end; - -procedure UnregisterAssistants; -begin - TdxGridReportLinkStyleSheet.Unregister; - - TdxGridViewBuildersFactory.ReleaseInstance; - TdxViewHelpersFactory.ReleaseInstance; - TdxRecordHelpersFactory.ReleaseInstance; -end; - -procedure UnregisterItems; -begin - TdxReportCardHorz.UnRegister; - TdxReportCardVert.UnRegister; - - TdxReportCardLayer.UnRegister; - TdxReportCardVerticalLayer.UnRegister; - - TdxReportCardRow.UnRegister; -end; - -initialization - RegisterAssistants; - RegisterItems; - - dxPSRegisterReportLink(TdxGridReportLink, TcxGrid, TdxfmGridReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxGridReportLink, TcxGrid, TdxfmGridReportLinkDesignWindow); - - UnregisterItems; - UnregisterAssistants; - - FreeAndNil(FGridLinkStyleSheetPrototype); - -end. - - - - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6LnkPredefinedStyleSheets.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6LnkPredefinedStyleSheets.dfm deleted file mode 100644 index aa92920a..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6LnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,352 +0,0 @@ -object dxdmPScxGridLnkPredefinedStyles: TdxdmPScxGridLnkPredefinedStyles - OldCreateOrder = False - Left = 352 - Top = 156 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 37 - Top = 12 - object styleProfessionalFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3355443 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6582120 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalCaptionRow: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14541789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGreenFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGreenFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12778719 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14154698 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenSelected: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4949549 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11328403 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentBandHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsItalic] - TextColor = clBlack - end - object styleTransparentLevelCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFilterBar: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentCaptionRow: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13816275 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TdxGridReportLinkStyleSheet - Caption = 'Professional' - Styles.BandHeader = styleProfessionalFixed - Styles.Caption = styleProfessionalFixed - Styles.CardCaptionRow = styleProfessionalCaptionRow - Styles.CardRowCaption = styleProfessionalRowCaption - Styles.Content = styleNoneContent - Styles.ContentEven = styleProfessionalContentEven - Styles.ContentOdd = styleProfessionalContentOdd - Styles.FilterBar = styleProfessionalFixed - Styles.Footer = styleProfessionalFixed - Styles.Group = styleProfessionalGroup - Styles.Header = styleProfessionalFixed - Styles.Preview = styleProfessionalPreview - Styles.Selection = styleProfessionalSelection - BuiltIn = True - end - object ssGreen: TdxGridReportLinkStyleSheet - Caption = 'Green' - Styles.BandHeader = styleGreenFixed - Styles.Caption = styleGreenFixed - Styles.CardCaptionRow = styleGreenFixed - Styles.CardRowCaption = styleGreenFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleGreenLightContent - Styles.ContentOdd = styleNoneContent - Styles.FilterBar = styleGreenFixed - Styles.Footer = styleGreenFixed - Styles.Group = styleGreenGroup - Styles.Header = styleGreenFixed - Styles.Preview = styleGreenLightPreview - Styles.Selection = styleGreenSelected - BuiltIn = True - end - object ssTransparent: TdxGridReportLinkStyleSheet - Caption = 'Transparent' - Styles.BandHeader = styleTransparentBandHeader - Styles.Caption = styleTransparentLevelCaption - Styles.CardCaptionRow = styleTransparentCaptionRow - Styles.CardRowCaption = styleTransparentRowCaption - Styles.Content = styleTransparentContent - Styles.ContentEven = styleTransparentContentEven - Styles.ContentOdd = styleTransparentContentOdd - Styles.FilterBar = styleTransparentFilterBar - Styles.Footer = styleTransparentFooter - Styles.Group = styleTransparentGroup - Styles.Header = styleTransparentHeader - Styles.Preview = styleTransparentPreview - Styles.Selection = styleTransparentSelection - BuiltIn = True - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6LnkPredefinedStyleSheets.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6LnkPredefinedStyleSheets.pas deleted file mode 100644 index b3672b01..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6LnkPredefinedStyleSheets.pas +++ /dev/null @@ -1,143 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxGrid6LnkPredefinedStyleSheets; - -interface - -{$I cxVer.inc} - -uses - Classes, {$IFNDEF DELPHI6} Forms, {$ENDIF} cxClasses, cxStyles, dxPScxGrid6Lnk, - dxPScxCommon; - -type - TdxdmPScxGridLnkPredefinedStyles = class(TDataModule) - StyleRepository: TcxStyleRepository; - styleGreenFixed: TcxStyle; - styleGreenLightContent: TcxStyle; - styleProfessionalFixed: TcxStyle; - styleGreenLightPreview: TcxStyle; - ssGreen: TdxGridReportLinkStyleSheet; - ssProfessional: TdxGridReportLinkStyleSheet; - styleGreenFooter: TcxStyle; - styleNoneContent: TcxStyle; - styleNoneFixed: TcxStyle; - styleProfessionalGroup: TcxStyle; - styleProfessionalContentOdd: TcxStyle; - styleProfessionalContentEven: TcxStyle; - styleProfessionalSelection: TcxStyle; - styleProfessionalPreview: TcxStyle; - styleGreenSelected: TcxStyle; - styleGreenGroup: TcxStyle; - styleProfessionalRowCaption: TcxStyle; - styleProfessionalCaptionRow: TcxStyle; - ssTransparent: TdxGridReportLinkStyleSheet; - styleTransparentContent: TcxStyle; - styleTransparentBandHeader: TcxStyle; - styleTransparentHeader: TcxStyle; - styleTransparentFooter: TcxStyle; - styleTransparentGroup: TcxStyle; - styleTransparentPreview: TcxStyle; - styleTransparentLevelCaption: TcxStyle; - styleTransparentFilterBar: TcxStyle; - styleTransparentCaptionRow: TcxStyle; - styleTransparentRowCaption: TcxStyle; - styleTransparentContentEven: TcxStyle; - styleTransparentContentOdd: TcxStyle; - styleTransparentSelection: TcxStyle; - end; - -implementation - -{$R *.dfm} - -uses - cxStyleSheetsLoad; - -type - TdxPScxGridLnkPredefinedStyleSheets = class(TcxPredefinedStyleSheets) - private - FDataModule: TdxdmPScxGridLnkPredefinedStyles; - protected - procedure AddStyleSheets; override; - property DataModule: TdxdmPScxGridLnkPredefinedStyles read FDataModule; - public - constructor Create; override; - destructor Destroy; override; - - class procedure Register; - class procedure Unregister; - end; - -constructor TdxPScxGridLnkPredefinedStyleSheets.Create; -begin - inherited; - FDataModule := TdxdmPScxGridLnkPredefinedStyles.Create(nil); - AddStyleSheets; -end; - -destructor TdxPScxGridLnkPredefinedStyleSheets.Destroy; -begin - FDataModule.Free; - inherited; -end; - -class procedure TdxPScxGridLnkPredefinedStyleSheets.Register; -begin - cxStyleSheetsLoad.RegisterPredefinedStyleSheets(Self); -end; - -class procedure TdxPScxGridLnkPredefinedStyleSheets.Unregister; -begin - cxStyleSheetsLoad.UnregisterPredefinedStyleSheets(Self); -end; - -procedure TdxPScxGridLnkPredefinedStyleSheets.AddStyleSheets; -var - I: Integer; -begin - with DataModule.StyleRepository do - for I := 0 to StyleSheetCount - 1 do - AddStyleSheet(StyleSheets[I]); -end; - -initialization - TdxPScxGridLnkPredefinedStyleSheets.Register; - -finalization - TdxPScxGridLnkPredefinedStyleSheets.Unregister; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6LnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6LnkReg.pas deleted file mode 100644 index b38a03f6..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGrid6LnkReg.pas +++ /dev/null @@ -1,376 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxGrid6LnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - SysUtils, Classes, Controls, cxCustomData, cxDataStorage, cxStyles, cxGrid, - cxGridLevel, cxGridCustomView, cxGridCustomTableView, cxGridCardView, - cxGridTableView, cxGridBandedTableView, cxStyleSheetEditor, dxPScxGrid6Lnk; - -type - TdxGridReportLinkStyleSheetEditorPreview = class(TcxStyleSheetEditorPreview) - private - FGrid: TcxGrid; - function GetBandedTableView: TcxGridBandedTableView; - function GetCardView: TcxGridCardView; - protected - function AddItem(AView: TcxCustomGridTableView; const ACaption: string; - AValueTypeClass: TcxValueTypeClass): TcxCustomGridTableItem; - procedure AddItems(AView: TcxCustomGridTableView); - procedure CreateBandedTableView; - procedure CreateCardView; - procedure Initialize; virtual; - - property BandedTableView: TcxGridBandedTableView read GetBandedTableView; - property CardView: TcxGridCardView read GetCardView; - property Grid: TcxGrid read FGrid; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - class function GetStyleSheetClass: TcxCustomStyleSheetClass; override; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); override; - - function Control: TWinControl; override; - - class procedure Register; - class procedure Unregister; - end; - -{ TdxGridReportLinkStyleSheetEditorPreview } - -constructor TdxGridReportLinkStyleSheetEditorPreview.Create(AOwner: TComponent); -begin -// inherited; cannot call ancestor method if it's an abstract method in Delphi4(5) !!!! - FGrid := TcxGrid.Create(AOwner); - Initialize; -end; - -destructor TdxGridReportLinkStyleSheetEditorPreview.Destroy; -begin - FGrid.Free; - inherited; -end; - -class function TdxGridReportLinkStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := TdxGridReportLinkStyleSheet; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); -begin - if AStyleSheet is TdxGridReportLinkStyleSheet then - with TdxGridReportLinkStyleSheet(AStyleSheet).Styles do - begin - BandedTableView.Styles.BandHeader := BandHeader; - BandedTableView.Styles.Content := Content; - BandedTableView.Styles.ContentEven := ContentEven; - BandedTableView.Styles.ContentOdd := ContentOdd; - BandedTableView.Styles.FilterBox := FilterBar; - BandedTableView.Styles.Footer := Footer; - BandedTableView.Styles.Group := Group; - BandedTableView.Styles.Header := Header; - BandedTableView.Styles.Indicator := Header; - BandedTableView.Styles.Preview := Preview; - - CardView.Styles.CaptionRow := CardCaptionRow; - CardView.Styles.Content := Content; - CardView.Styles.ContentEven := ContentEven; - CardView.Styles.ContentOdd := ContentOdd; - CardView.Styles.RowCaption := CardRowCaption; - - Grid.RootLevelStyles.Tab := Caption; - Grid.RootLevelStyles.TabsBackground := Caption; - end - else - begin - BandedTableView.Styles.ResetStyles; - CardView.Styles.ResetStyles; - Grid.RootLevelStyles.ResetStyles; - end; -end; - -function TdxGridReportLinkStyleSheetEditorPreview.Control: TWinControl; -begin - Result := Grid; -end; - -class procedure TdxGridReportLinkStyleSheetEditorPreview.Register; -begin - cxStyleSheetEditor.RegisterStyleSheetEditorPreview(Self); -end; - -class procedure TdxGridReportLinkStyleSheetEditorPreview.Unregister; -begin - cxStyleSheetEditor.UnregisterStyleSheetEditorPreview(Self); -end; - -function TdxGridReportLinkStyleSheetEditorPreview.AddItem(AView: TcxCustomGridTableView; - const ACaption: string; AValueTypeClass: TcxValueTypeClass): TcxCustomGridTableItem; -begin - Result := AView.CreateItem; - with Result do - begin - Caption := ACaption; - DataBinding.ValueTypeClass := AValueTypeClass; - end; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.AddItems(AView: TcxCustomGridTableView); -begin - AddItem(AView, 'Text', TcxStringValueType); - AddItem(AView, 'Currency', TcxCurrencyValueType); - AddItem(AView, 'Date', TcxDateTimeValueType); -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.CreateBandedTableView; - - procedure AddBands; - begin - BandedTableView.Bands.Add.Caption := 'Band'; - end; - - procedure AddGroups; - begin - BandedTableView.Columns[2].GroupIndex := 0; - end; - - procedure AddPreview; - begin - with BandedTableView.Preview do - begin - Column := AddItem(BandedTableView, '', TcxStringValueType) as TcxGridColumn; - Column.Visible := False; - Visible := True; - end; - end; - - procedure AddRecords; - const - ARecordCount: Integer = 3; - var - I: Integer; - begin - with BandedTableView.DataController as TcxGridDataController do - begin - BeginUpdate; - try - RecordCount := ARecordCount; - for I := 0 to ARecordCount - 1 do - begin - Values[I, 0] := 'ABC'; - Values[I, 1] := (I + 1) * 100; - Values[I, 2] := Date - I; - Values[I, 3] := 'Check the preview style'; - end; - finally - EndUpdate; - end; - end; - end; - - procedure AddSummaries; - begin - with BandedTableView do - begin - DataController.Groups.FullExpand; - with DataController.Summary.FooterSummaryItems.Add do - begin - Kind := skSum; - ItemLink := Columns[1]; - end; - end; - end; - - procedure InitializeOptions; - begin - with BandedTableView do - begin - Filtering.CustomizeDialog := False; - - OptionsBehavior.IncSearch := True; - - OptionsData.Deleting := False; - OptionsData.Editing := False; - OptionsData.Appending := False; - OptionsData.Inserting := False; - - OptionsView.BandHeaders := True; - OptionsView.ColumnAutoWidth := True; - OptionsView.Footer := True; - OptionsView.Indicator := True; - end; - end; - - procedure PlaceColumns; - var - I: Integer; - begin - with BandedTableView do - for I := 0 to ItemCount - 1 do - Columns[I].Position.BandIndex := 0; - end; - -begin - Grid.Levels.Add.GridView := Grid.CreateView(TcxGridBandedTableView); - TcxGridLevel(BandedTableView.Level).Caption := 'Table'; - - AddBands; - AddItems(BandedTableView); - AddGroups; - AddPreview; - AddRecords; - AddSummaries; - InitializeOptions; - PlaceColumns; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.CreateCardView; - - procedure AddRecords; - const - ARecordCount: Integer = 3; - var - I: Integer; - begin - with CardView.DataController as TcxGridDataController do - begin - BeginUpdate; - try - RecordCount := ARecordCount; - for I := 0 to ARecordCount - 1 do - begin - Values[I, 1] := 'ABC'; - Values[I, 2] := (I + 1) * 100; - Values[I, 3] := Date - I; - end; - finally - EndUpdate; - end; - end; - end; - - procedure AddCaptionRow; - begin - with CardView.CreateRow do - begin - Caption := 'Caption'; - Index := 0; - Kind := rkCaption; - end; - end; - - procedure InitializeOptions; - begin - with CardView do - begin - OptionsBehavior.IncSearch := True; - - OptionsData.Deleting := False; - OptionsData.Editing := False; - OptionsData.Appending := False; - OptionsData.Inserting := False; - end; - end; - -begin - Grid.Levels.Add.GridView := Grid.CreateView(TcxGridCardView); - TcxGridLevel(CardView.Level).Caption := 'Cards'; - - AddItems(CardView); - AddCaptionRow; - AddRecords; - InitializeOptions; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.Initialize; -begin - CreateBandedTableView; - CreateCardView; - - Grid.RootLevelOptions.DetailTabsPosition := dtpTop; -end; - -function TdxGridReportLinkStyleSheetEditorPreview.GetBandedTableView: TcxGridBandedTableView; -begin - Result := Grid.Levels[0].GridView as TcxGridBandedTableView; -end; - -function TdxGridReportLinkStyleSheetEditorPreview.GetCardView: TcxGridCardView; -begin - Result := Grid.Levels[1].GridView as TcxGridCardView; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TdxGridReportLink, TdxGridReportLinkStyleSheet]); -end; - -procedure RegisterStyleSheetAssistants; -begin - cxStyles.RegisterStyleSheetClass(TdxGridReportLinkStyleSheet); - TdxGridReportLinkStyleSheetEditorPreview.Register; -end; - -procedure UnregisterStyleSheetAssistants; -begin - TdxGridReportLinkStyleSheetEditorPreview.Unregister; - cxStyles.UnregisterStyleSheetClass(TdxGridReportLinkStyleSheet); -end; - -initialization - RegisterStyleSheetAssistants; - -finalization - UnregisterStyleSheetAssistants; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnk.dfm deleted file mode 100644 index 7d2c3cce..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnk.dfm +++ /dev/null @@ -1,2143 +0,0 @@ -object dxfmGridReportLinkDesignWindow: TdxfmGridReportLinkDesignWindow - Left = 463 - Top = 133 - BorderStyle = bsDialog - Caption = 'fmdxGridDesignWindow' - ClientHeight = 437 - ClientWidth = 648 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 5 - Top = 5 - Width = 642 - Height = 396 - ActivePage = tshCharts - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 9 - Top = 37 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 12 - Width = 266 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 164 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object imgOnEveryPage: TImage - Left = 9 - Top = 189 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlOnEveryPage: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object bvlWarningHost: TBevel - Left = 4 - Top = 289 - Width = 313 - Height = 77 - Visible = False - end - object chbxShowBands: TCheckBox - Tag = 1 - Left = 90 - Top = 42 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 1 - OnClick = OptionsViewClick - end - object chbxShowHeaders: TCheckBox - Tag = 2 - Left = 90 - Top = 63 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowFooters: TCheckBox - Tag = 3 - Left = 90 - Top = 84 - Width = 200 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 3 - OnClick = OptionsViewClick - end - object chbxShowGroupFooters: TCheckBox - Tag = 4 - Left = 90 - Top = 104 - Width = 200 - Height = 17 - Caption = 'G&roup Footers' - TabOrder = 4 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 5 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 5 - OnClick = OptionsViewClick - end - object chbxBandsOnEveryPage: TCheckBox - Tag = 1 - Left = 90 - Top = 202 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 8 - OnClick = OptionsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Tag = 2 - Left = 90 - Top = 223 - Width = 200 - Height = 17 - Caption = 'Headers' - TabOrder = 9 - OnClick = OptionsOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Tag = 3 - Left = 90 - Top = 245 - Width = 200 - Height = 17 - Caption = 'Footers' - TabOrder = 10 - OnClick = OptionsOnEveryPageClick - end - object chbxFilterBarOnEveryPage: TCheckBox - Tag = 4 - Left = 90 - Top = 266 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 11 - OnClick = OptionsOnEveryPageClick - end - object chbxCaptionsOnEveryPage: TCheckBox - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 7 - OnClick = OptionsOnEveryPageClick - end - object chbxShowCaptions: TCheckBox - Left = 90 - Top = 22 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowFilterBar: TCheckBox - Tag = 6 - Left = 90 - Top = 146 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 6 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 323 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 12 - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblSelection: TLabel - Left = 5 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object imgSelection: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlSelection: TBevel - Left = 56 - Top = 12 - Width = 255 - Height = 4 - Shape = bsBottomLine - end - object lblExpanding: TLabel - Left = 5 - Top = 74 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 9 - Top = 95 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 79 - Width = 248 - Height = 4 - Shape = bsBottomLine - end - object lblDetails: TLabel - Left = 5 - Top = 218 - Width = 32 - Height = 13 - Caption = 'Details' - end - object bvlDetails: TBevel - Left = 47 - Top = 223 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object imgDetails: TImage - Left = 9 - Top = 239 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0889999999999999999999907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897F78FF7FF77777788F907DDDDDDDDDDDD0FF777FFFF7FFF7777FFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF77777777F - F07DD0889777777777777777777907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F777F7FF7777888FF907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCCCCCDD0FF7777FFF7FF7777777FF - F07DD0889777777777777777777907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F788F7FF77778FFFF907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF777777777 - F07DD0889777777777777777777907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0777777777777777777777 - 707DD08897F888F7FF7777788FF907DDCCCCCCCCDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0FF77777FF7FF7777777FF - F07DD0889000000000000000000907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897888880F8888888888907DDDDDDDDDDDD0777777777777777777777 - 707DD08897F77780F8777777778907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFF80FFFFFFFFFFF907DDDDDDDDDDDD0FF7777FFF7FF7777777FF - F07DD0889000000000000000000907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0889999999999999999999907DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0F0F777777FF77777777FFF07DDDDDDDDDDDD0FF77777FF7FF77777777F - F07DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F888888880F8888888888807DDDDDDDDDDDD0F888888880F8888888888 - 807DD0F877778880F8777777777807DDDDDDDDDDDD0F877777880F8777777778 - 807DD0FFFFFFFFF0FFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF0FFFFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgLevels: TImage - Left = 9 - Top = 306 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0888888888888888888888807DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F000FF8F000FF8FCCCC44F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F77F7F8FCC99F - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F666CCCF07DDDDDDDDDDDDD0F7F77F8F777FF8FCC99F - 7F07D0F0000F8F00F0F8F999999F07DDCDDDDCDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7888888888888888888 - 7F07D0888888888888888888888807DDCCCCCCCCDDD0F7F77F8F777FF8FC99CF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F00FFF8F0000F8F9999CCF07DDCDDDDCDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F99AAACF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F0000F8F000FF8F9999CCF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F0000000000000000000 - 0F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F0000F8F000FF8FB99944F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0777777777777777777777707DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F000087F800087F800000807DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF7FFFFFF7FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0000000000000000000000007DDCDDDDCDDDDD0F7888888888888888888 - 7F07D7F88880777777777777777778DDCCCCDCCDDDD0F7777777777777777777 - 7F07D7F00080F87777788088888888DDCCCCCCCCDDD0F7777777777777777777 - 7F07D7F77780FFFFFFFFF088888888DDCCCCDCCDDDD0F0000000000000000000 - 0F07D7FFFFF0777777777088888888DDCDDDDCDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D7777770888888888888888888DDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblLevels: TLabel - Left = 5 - Top = 285 - Width = 30 - Height = 13 - Caption = 'Levels' - end - object bvlLevels: TBevel - Left = 47 - Top = 290 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object lblGridSize: TLabel - Left = 5 - Top = 150 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlGridSize: TBevel - Left = 33 - Top = 154 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 9 - Top = 172 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxProcessSelection: TCheckBox - Left = 90 - Top = 25 - Width = 200 - Height = 17 - Caption = 'Process Selection' - TabOrder = 0 - OnClick = OptionsSelectionClick - end - object chbxProcessExactSelection: TCheckBox - Tag = 1 - Left = 90 - Top = 46 - Width = 200 - Height = 17 - Caption = 'Process Exact Selection' - TabOrder = 1 - OnClick = OptionsSelectionClick - end - object chbxExpandGroupRows: TCheckBox - Left = 90 - Top = 89 - Width = 200 - Height = 17 - Caption = 'Groups' - TabOrder = 2 - OnClick = OptionsExpandingClick - end - object chbxExpandMasterRows: TCheckBox - Tag = 1 - Left = 90 - Top = 111 - Width = 200 - Height = 17 - Caption = 'Details' - TabOrder = 3 - OnClick = OptionsExpandingClick - end - object chbxStartFromActiveView: TCheckBox - Left = 90 - Top = 236 - Width = 200 - Height = 17 - Caption = 'Start From Active Details' - TabOrder = 6 - OnClick = OptionsDetailsClick - end - object chbxOnlyActiveView: TCheckBox - Tag = 1 - Left = 90 - Top = 258 - Width = 200 - Height = 17 - Caption = 'Only Active Details' - TabOrder = 7 - OnClick = OptionsDetailsClick - end - object chbxLevelsUnwrap: TCheckBox - Left = 90 - Top = 303 - Width = 200 - Height = 17 - Caption = '&Unwrap' - TabOrder = 8 - OnClick = OptionsLevelsClick - end - object chbxLevelsUnwrapTopLevel: TCheckBox - Tag = 1 - Left = 90 - Top = 326 - Width = 200 - Height = 17 - Caption = 'Unwrap Top Level' - TabOrder = 9 - OnClick = OptionsLevelsClick - end - object chbxLevelsRiseActiveLevelOntoTop: TCheckBox - Tag = 2 - Left = 90 - Top = 349 - Width = 200 - Height = 17 - Caption = 'Rise Active Level onto Top' - TabOrder = 10 - OnClick = OptionsLevelsClick - end - object chbxGridAutoWidth: TCheckBox - Left = 90 - Top = 169 - Width = 200 - Height = 17 - Caption = '&Auto Width' - TabOrder = 5 - OnClick = OptionsSizeClick - end - object chbxExpandCards: TCheckBox - Tag = 2 - Left = 90 - Top = 132 - Width = 200 - Height = 17 - Caption = 'Cards' - TabOrder = 4 - OnClick = OptionsExpandingClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 12 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 9 - Top = 95 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 74 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 79 - Width = 241 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object lblPagination: TLabel - Left = 5 - Top = 229 - Width = 50 - Height = 13 - Caption = 'Pagination' - end - object bvlPagination: TBevel - Left = 64 - Top = 234 - Width = 247 - Height = 4 - Shape = bsBottomLine - end - object imgPagination: TImage - Left = 8 - Top = 251 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD0000000000000000000000007DDDDDDDDDDDD77777777777777770DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7F8888888888888F0DDDDD - DDDDD0888000000000000000088F07DDDDDDDDDDDD7F8777877778778F07770D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8888888888888F0FFF0D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0D - DDDDD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8888888888888F078F07 - 770DD0F990FFFF8FFFF8FFFF099F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0F - FF0DD0F99999999999999999999F07DDCDDDDCDDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCDCCDDD7F8888888888888F088F07 - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F8F0FFFF8F00F8F00F0F8F07DDCDDDDCDDDD7F8888888888888F088F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCDDDDCDDDD7F8888888888888F088F0F - 8F0DD0F99999999999999999999F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCDCCDDD7F8888888888888F088F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCDDDDCDDDD7F8777877778778F0F8F08 - 8F0DD0F8F0F00F8F00F8F00F0F8F07DDDDDDDDDDDD7F8888888888888F0F8F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF088F0F - 8F0DD0F8F0777777777777770F8F07DDDDDDDDDDDD0000000000000000078F08 - 8F0DD0F8F0F8887F8887F8880F8F07DDDDDDDDDDDDDDDD7F8888888888888F0F - 8F0DD0F8F0F0087F0087F0080F8F07DDDDDDDDDDDDDDDD7FFFFFFFFFFFFFFF08 - 8F0DD0F8F0FFFF7FFFF7FFFF0F8F07DDDDDDDDDDDDDDDD00000000000000000F - 8F0DD0888000000000000000088807DDDDDDDDDDDDDDDDDDDD7F888888888888 - 8F0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD7FFFFFFFFFFFFF - FF0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD00000000000000 - 000DD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 33 - Width = 212 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnClick = LookAndFeelClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 142 - Width = 200 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 119 - Width = 200 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 96 - Width = 200 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Suppress Background Images' - TabOrder = 4 - OnClick = OptionsFormatingClick - end - object chbxConsumeSelectionStyle: TCheckBox - Tag = 2 - Left = 90 - Top = 203 - Width = 200 - Height = 17 - Caption = 'Consume Selection Style' - TabOrder = 5 - OnClick = OptionsFormatingClick - end - object chbxPaginateOneGroupPerPage: TCheckBox - Tag = 1 - Left = 90 - Top = 274 - Width = 200 - Height = 17 - Caption = 'One Group Per Page' - TabOrder = 7 - OnClick = OptionsPaginationClick - end - object chbxPaginateByTopLevelGroups: TCheckBox - Left = 90 - Top = 251 - Width = 200 - Height = 17 - Caption = 'By TopLevel Groups' - TabOrder = 6 - OnClick = OptionsPaginationClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 5 - object bvlStyles: TBevel - Left = 118 - Top = 12 - Width = 191 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 295 - Width = 237 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 291 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 219 - end - object Label1: TLabel - Left = 76 - Top = 135 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 14 - Height = 17 - TabOrder = 0 - OnClick = OptionsFormatingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 311 - Width = 302 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 343 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = StyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 83 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = StyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 160 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = StyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 237 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = StyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 2 - object lblPreviewOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPreviewOptions: TBevel - Left = 50 - Top = 12 - Width = 261 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewMaxLineCount: TLabel - Left = 91 - Top = 73 - Width = 78 - Height = 13 - Caption = 'Max Line Count:' - end - object bvlPreviewMaxLineCountHost: TBevel - Left = 229 - Top = 69 - Width = 68 - Height = 21 - Visible = False - end - object imgPreview: TImage - Left = 9 - Top = 28 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F888F7FF888F7F8888F7F07DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7F888F7FF888F7FF888F7F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxPreviewVisible: TCheckBox - Left = 90 - Top = 28 - Width = 150 - Height = 17 - Caption = 'Visible' - TabOrder = 0 - OnClick = PreviewVisibleClick - end - object chbxPreviewAutoHeight: TCheckBox - Left = 90 - Top = 49 - Width = 150 - Height = 17 - Caption = 'Auto Height' - TabOrder = 1 - OnClick = PreviewAutoHeightClick - end - end - object tshCards: TTabSheet - Caption = 'Cards' - ImageIndex = 3 - object bvlCardSpaceVertHost: TBevel - Left = 231 - Top = 140 - Width = 75 - Height = 21 - Visible = False - end - object bvlCardSpaceHorzHost: TBevel - Left = 231 - Top = 112 - Width = 75 - Height = 21 - Visible = False - end - object lblCardSpaceVert: TLabel - Left = 90 - Top = 145 - Width = 39 - Height = 13 - Caption = 'Vertical:' - end - object lblCardSpaceHorz: TLabel - Left = 90 - Top = 116 - Width = 52 - Height = 13 - Caption = 'Horizontal:' - end - object imgCardSpacing: TImage - Left = 9 - Top = 112 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDD000000000000000000000000000000DDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD7DD0DDDDDD707000DDDDDD0DD7DDDDDDDDDDDDDDD - DDDDDDDDD0000000000000000000DDDDDD0D0D0DDDDDD0000000000000000000 - 0DDDDDDD77777777777777777770DDDDD00D0D0DDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDD0D000DDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF77777FF70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF77FFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF77FFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD7777777777777777777 - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardSpacing: TLabel - Left = 5 - Top = 92 - Width = 37 - Height = 13 - Caption = 'Spacing' - end - object bvlCardSpacing: TBevel - Left = 51 - Top = 97 - Width = 260 - Height = 4 - Shape = bsBottomLine - end - object bvlCardSizes: TBevel - Left = 34 - Top = 12 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object lblCardSizes: TLabel - Left = 5 - Top = 8 - Width = 24 - Height = 13 - Caption = 'Sizes' - end - object imgCardSizes: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDD000000000000DDDDDDDDDDDDDDDDDDDDDDDD000000000000DD00000000 - 0000D7777777777770DDDDDDDDDDDDDDDDDDDDDDD7777777777770D777777777 - 7770D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DD0000000000DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D77777777770DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8FFF70DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8F7F70DDDDDDDDDDD7FFFFF8F77F70D7FFFFF8F7 - FF70D7F777F8FFFF70D7FFFF8FFF70DDDDDDDDDDD7F777F8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - 7F70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F777F8FFFF70D7F77F8F7F70DDDDDDDDDDD7F777F8FFFF70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDCCCCDCCDD7F777F8F77F70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDCCCCDCCDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F7FFF8FFFF70D7F7FF8F7F70DDDDDDDDDDD7F7FFF8FFFF70D7F7FFF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D777777777777DD7777777777DDDDDDDDDDDD777777777777DD777777777 - 777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgCardFraming: TImage - Left = 9 - Top = 189 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD00000000000000000 - 00DDDDDDD88888888888888888887DDDDDDDDDDDDDDDDD000000000000000000 - 00DDDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF - 00DDDDD778FFFFFFF8FFF9999FF87DDDDDDDDDDDDDDD000FFFFFFF0FFF9999FF - 00DDDD8888FFFFFFF8FFF9999FF87DDDDDDDDDDDDDD0000FFFFFFF0FFF9999FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCDDDDCDDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCCCCDCCDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCCCCCDDD0FF0F77777F0FCCCCFFFF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCDCCDDDD0FF0F77777F0FCCCCFFFF - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF77777FF87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF77FFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF77FFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDCDDDDCDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCCCCDCCDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDCCCCCCCCDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDCCCCDCCDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F78888888888888888888DDDDDDDDDDDDDDD0F7000000000000000000 - 0DDDDD8F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDDDDD0F7FFFFF0FF7FFFFFF00D - DDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF00D - DDDDDD8888888888888888888DDDDDDDDDDDDDDDDDD0000000000000000000DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardFraming: TLabel - Left = 5 - Top = 171 - Width = 38 - Height = 13 - Caption = 'Framing' - end - object bvlCardFraming: TBevel - Left = 49 - Top = 176 - Width = 262 - Height = 4 - Shape = bsBottomLine - end - object bvlCardShadowColorHost: TBevel - Left = 177 - Top = 276 - Width = 129 - Height = 21 - Visible = False - end - object lblCardShadowDepth: TLabel - Left = 90 - Top = 308 - Width = 33 - Height = 13 - Caption = 'Depth:' - end - object bvlCardShadow: TBevel - Left = 48 - Top = 260 - Width = 263 - Height = 4 - Shape = bsBottomLine - end - object lblCardShadow: TLabel - Left = 5 - Top = 255 - Width = 38 - Height = 13 - Caption = 'Shadow' - end - object lblCardShadowColor: TLabel - Left = 90 - Top = 280 - Width = 29 - Height = 13 - Caption = 'Color:' - end - object bvlCardShadowDepthHost: TBevel - Left = 177 - Top = 304 - Width = 129 - Height = 21 - Visible = False - end - object imgCardShadow: TImage - Left = 9 - Top = 276 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF77777FFFFF7DDDDCDDDDCDDDDD7F77777F7FF77777FFFFF - 700DDD7F7FFFFF7FF77FFFFFFFF7DDDDCCCCDCCDDDD7F7FFFFF7FF77FFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDCCCCDCCDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 7DDDDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 7DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxCardsKeepSameHeight: TCheckBox - Tag = 2 - Left = 90 - Top = 70 - Width = 200 - Height = 17 - Caption = 'Keep Same Height' - TabOrder = 2 - OnClick = OptionsCardsClick - end - object chbxCardsKeepSameWidth: TCheckBox - Tag = 1 - Left = 90 - Top = 49 - Width = 200 - Height = 17 - Caption = 'Keep Same Width' - TabOrder = 1 - OnClick = OptionsCardsClick - end - object chbxCardsAutoWidth: TCheckBox - Left = 90 - Top = 28 - Width = 200 - Height = 17 - Caption = 'Auto Width' - TabOrder = 0 - OnClick = OptionsCardsClick - end - object chbxCardsVertLines: TCheckBox - Tag = 5 - Left = 90 - Top = 231 - Width = 200 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 5 - OnClick = OptionsCardsClick - end - object chbxCardsHorzLines: TCheckBox - Tag = 4 - Left = 90 - Top = 210 - Width = 200 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 4 - OnClick = OptionsCardsClick - end - object chbxCardsBorder: TCheckBox - Tag = 3 - Left = 90 - Top = 189 - Width = 200 - Height = 17 - Caption = 'Border' - TabOrder = 3 - OnClick = OptionsCardsClick - end - end - object tshCharts: TTabSheet - Caption = 'Charts' - ImageIndex = 6 - object lblChartsOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object imgCharts: TImage - Left = 9 - Top = 28 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDD777777777777777777777777DDDDDDD000000000000000000000000 - 7DDDDDDD0887FFFFFFFFFFFFFFFFFFF07DDDDDDD0887F8888888888888888880 - 7DDDDDDD0887F8FC491A2FFC491A2FF07DDDDDDD0887F8FC491A2FFC491A2FF0 - 7DDDDDDD0887F8FC4FFA2FFC491A2FF07DDDDDDD0887F8FC4FFA2FFC4FFA2FF0 - 7DDDDDDD0887F8FFFFFFFFFFFFFFFFF07DDDDDDD088777777777777777777770 - 7DDDDDDD0888888888888888888888807DDDDDDD087807777777788888888880 - 7DDDDDDD0888888888888888888888807DDDDDDD077777777777777777777770 - 7DDDDDDD0887FFFFFFFFFFFFFFFFFFF07DDDDDDD0887F8888888888888888880 - 7DDDDDDD0887F8FC491A2FFC491A2FF07DDDDDDD0887F8FC491A2FFC491A2FF0 - 7DDDDDDD0887F8FC491FFFFC491A2FF07DDDDDDD0887F8FFF91FFFFC4FFA2FF0 - 7DDDDDDD0887F8FFFFFFFFFFFFFFFFF07DDDDDDD088777777777777777777770 - 7DDDDDDD0888888888888888888888807DDDDDDD087800777777788888888880 - 7DDDDDDD0888888888888888888888807DDDDDDD077777777777777777777770 - 7DDDDDDD0F8888887F888888888888807DDDDDDD0F8000087F80000000088880 - 7DDDDDDD0F8888887F888888888888807DDDDDDD0FFFFFFF7FFFFFFFFFFFFFF0 - 7DDDDDDD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlChartsOptions: TBevel - Left = 57 - Top = 12 - Width = 254 - Height = 4 - Shape = bsBottomLine - end - object chbxChartsTransparent: TCheckBox - Left = 90 - Top = 28 - Width = 200 - Height = 17 - Caption = 'Transparent' - TabOrder = 0 - OnClick = chbxChartsTransparentClick - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 44 - Width = 306 - Height = 350 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewGrid: TcxGrid - Left = 5 - Top = 7 - Width = 296 - Height = 337 - TabOrder = 0 - LookAndFeel.NativeStyle = False - RootLevelOptions.DetailTabsPosition = dtpTop - object PreviewBandedView: TcxGridBandedTableView - NavigatorButtons.ConfirmDelete = False - DataController.Summary.DefaultGroupSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Position = spFooter - Column = colVendorName - end> - DataController.Summary.FooterSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Column = colVendorName - end> - DataController.Summary.SummaryGroups = <> - Filtering.CustomizeDialog = False - Filtering.Visible = fvAlways - OptionsView.ScrollBars = ssNone - OptionsView.CellAutoHeight = True - OptionsView.ColumnAutoWidth = True - OptionsView.Footer = True - OptionsView.GroupByBox = False - OptionsView.GroupFooters = gfAlwaysVisible - Preview.Column = colVendorCountry - Preview.Visible = True - OnCustomDrawColumnHeader = PreviewBandedViewCustomDrawColumnHeader - OnCustomDrawFooterCell = PreviewBandedViewCustomDrawFooterCell - Bands = < - item - Caption = 'Vendor Data' - Width = 150 - end - item - Caption = 'Car Data' - end> - OnCustomDrawBandHeader = PreviewBandedViewCustomDrawBandHeader - object colVendorName: TcxGridBandedColumn - Caption = 'Name' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colVendorLogo: TcxGridBandedColumn - Caption = 'Logo' - PropertiesClassName = 'TcxImageProperties' - Properties.GraphicTransparency = gtTransparent - OnCustomDrawCell = VendorLogoCustomDrawCell - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - object colVendorCountry: TcxGridBandedColumn - PropertiesClassName = 'TcxTextEditProperties' - Position.BandIndex = 0 - Position.ColIndex = 2 - Position.RowIndex = 0 - end - object colCarModel: TcxGridBandedColumn - Caption = 'Model' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 1 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colIsSUVModel: TcxGridBandedColumn - Caption = 'SUV' - PropertiesClassName = 'TcxCheckBoxProperties' - Properties.ValueGrayed = #39#39 - OnCustomDrawCell = IsSUVModelCustomDrawCell - HeaderAlignmentHorz = taCenter - Options.Filtering = False - Width = 30 - Position.BandIndex = 1 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - end - object PreviewGridLevel: TcxGridLevel - Caption = 'Cars' - end - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 4 - Top = 408 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 32 - Top = 408 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxStyleRepository1: TcxStyleRepository - Left = 60 - Top = 408 - object styleCardShadow: TcxStyle - end - object styleCardBorder: TcxStyle - AssignedValues = [svColor] - Color = clWindow - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnk.pas deleted file mode 100644 index 53a22c94..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnk.pas +++ /dev/null @@ -1,17965 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxGridLnk; - -{$I cxVer.Inc} -{$DEFINE CHARTVIEW} - -interface - -uses - Windows, SysUtils, Messages, Classes, Graphics, Controls, StdCtrls, ComCtrls, - ExtCtrls, ImgList, Dialogs, ExtDlgs, Menus, cxGraphics, cxClasses, cxControls, - cxCustomData, cxDataStorage, cxData, cxDBData, cxGridDBDataDefinitions, cxGrid, - cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, - cxGridCardView, cxGridDBCardView, cxGridBandedTableView, cxGridDBBandedTableView, - {$IFDEF CHARTVIEW}cxGridChartView, cxGridDBChartView, {$ENDIF} - {$IFNDEF DXVER500}cxGridViewData, {$ENDIF} cxGridLevel, cxStyles, cxLookAndFeels, - cxLookAndFeelPainters, cxFilter, cxEdit, cxTextEdit, cxCheckBox, cxImage, dxBase, - dxPSSngltn, dxExtCtrls, dxPSCore, dxPrnPg, dxPScxCommon; - -const - vspsGridFirst = 0; - vspsGridBandHeader = vspsGridFirst + 0; - vspsGridCaption = vspsGridFirst + 1; - vspsGridCardCaptionRow = vspsGridFirst + 2; - vspsGridCardRowCaption = vspsGridFirst + 3; - vspsGridContent = vspsGridFirst + 4; - vspsGridContentEven = vspsGridFirst + 5; - vspsGridContentOdd = vspsGridFirst + 6; - vspsGridFilterBar = vspsGridFirst + 7; - vspsGridFooter = vspsGridFirst + 8; - vspsGridGroup = vspsGridFirst + 9; - vspsGridHeader = vspsGridFirst + 10; - vspsGridPreview = vspsGridFirst + 11; - vspsGridSelection = vspsGridFirst + 12; - vspsGridLast = vspsGridFirst + 12; - - vsCardShadow = vsCardViewLast + 1; - vsCardViewLast = vsCardShadow; - - bbTabs = -1; - - dxDefaultInterCardsSpaceHorz = 4; - dxDefaultInterCardsSpaceVert = 4; - dxDefaultCardsShadowDepth = 4; - dxDefaultCardsShadowColor = clBlack; - - dxGridAttributeIDBase = 0; - dxGridUndefinedID = dxGridAttributeIDBase + 0; - dxGridBandID = dxGridAttributeIDBase + 1; - dxGridCardRowCaptionID = dxGridAttributeIDBase + 2; - dxGridCardRowDataID = dxGridAttributeIDBase + 3; - dxGridFilterBarID = dxGridAttributeIDBase + 4; - dxGridFooterID = dxGridAttributeIDBase + 5; - dxGridGroupFooterID = dxGridAttributeIDBase + 6; - dxGridHeaderID = dxGridAttributeIDBase + 7; - dxGridLevelCaptionID = dxGridAttributeIDBase + 8; - dxGridRecordID = dxGridAttributeIDBase + 9; - -type - TdxGridAttributeHostInfo = class; - TdxGridAttributeHostInfoServices = class; - TdxGridReportLink = class; - TdxGridReportLinkOptionsExpanding = class; - TdxfmGridReportLinkDesignWindow = class; - - TdxCustomGridViewAdapter = class; - TdxCustomGridViewFormatter = class; - TdxCustomGridViewBuilder = class; - - TdxCustomGridTableViewAdapter = class; - TdxCustomGridTableViewBuilder = class; - - TdxGridTableViewAdapter = class; - TdxGridTableViewFormatter = class; - TdxGridTableViewBuilder = class; - - TdxGridBandedTableViewAdapter = class; - TdxGridBandedTableViewFormatter = class; - TdxGridBandedTableViewBuilder = class; - - TdxGridCardViewBuilder = class; - -{$IFDEF CHARTVIEW} - TdxGridChartViewBuilder = class; -{$ENDIF} - - TdxGridTableViewColumnPlace = class; - TdxGridTableViewColumnPlaceController = class; - TdxCustomGridBandedTableViewItemPlace = class; - TdxGridBandedTableViewItemPlace = class; - TdxGridBandedTableViewItemPlaceController = class; - - TdxGridViewRowProducerClass = class of TdxGridViewRowProducer; - TdxGridViewRowProducer = class; - TdxGridViewCaptionProducerClass = class of TdxGridViewCaptionProducer; - TdxGridViewCaptionProducer = class; - TdxGridViewFilterBarProducerClass = class of TdxGridViewFilterBarProducer; - TdxGridViewFilterBarProducer = class; - TdxGridViewDetailsSeparatorProducerClass = class of TdxGridViewDetailsSeparatorProducer; - TdxGridViewDetailsSeparatorProducer = class; - TdxGridViewTerminatorProducerClass = class of TdxGridViewTerminatorProducer; - TdxGridViewTerminatorProducer = class; - TdxGridTableViewHeadersProducerClass = class of TdxGridTableViewHeadersProducer; - TdxGridTableViewHeadersProducer = class; - TdxGridTableViewFootersProducerClass = class of TdxGridTableViewFootersProducer; - TdxGridTableViewFootersProducer = class; - TdxGridTableViewCustomDataRowProducerClass = class of TdxGridTableViewCustomDataRowProducer; - TdxGridTableViewCustomDataRowProducer = class; - TdxGridTableViewRowSeparatorProducerClass = class of TdxGridTableViewRowSeparatorProducer; - TdxGridTableViewRowSeparatorProducer = class; - TdxGridTableViewGroupFooterProducerClass = class of TdxGridTableViewGroupFooterProducer; - TdxGridTableViewGroupFooterProducer = class; - TdxGridTableViewGroupRowSeparatorProducerClass = class of TdxGridTableViewGroupRowSeparatorProducer; - TdxGridTableViewGroupRowSeparatorProducer = class; - TdxGridTableViewBandsProducerClass = class of TdxGridTableViewBandsProducer; - TdxGridTableViewBandsProducer = class; - TdxGridCardViewCardsRowProducerClass = class of TdxGridCardViewCardsRowProducer; - TdxGridCardViewCardsRowProducer = class; -{$IFDEF CHARTVIEW} - TdxGridChartViewChartProducerClass = class of TdxGridChartViewChartProducer; - TdxGridChartViewChartProducer = class; -{$ENDIF} - - { View Attributes } - - TdxGridAttributeClass = class of TdxGridAttribute; - TdxGridAttributeClasses = array of TdxGridAttributeClass; - TdxGridAttribute = class end; - - TdxGridBandHeader = class(TdxGridAttribute); - TdxGridCardRowCaption = class(TdxGridAttribute); - TdxGridCardRowData = class(TdxGridAttribute); - TdxGridDetails = class(TdxGridAttribute); - TdxGridExpandButton = class(TdxGridAttribute); - TdxGridFilterBar = class(TdxGridAttribute); - TdxGridFooter = class(TdxGridAttribute); - TdxGridGroupFooter = class(TdxGridAttribute); - TdxGridGroupRow = class(TdxGridAttribute); - TdxGridHeader = class(TdxGridAttribute); - TdxGridLevelCaption = class(TdxGridAttribute); - TdxGridPreview = class(TdxGridAttribute); - - TdxGridAttributeID = type Integer; - - - TdxGridCellCustomDrawInfo = record - GridAttributeID: TdxGridAttributeID; - GridView: TcxCustomGridView; - GridRecord: TcxCustomGridRecord; - GridColumn: TcxGridColumn; - GroupLevel: Integer; - GridBand: TcxGridBand; - GridCard: TcxGridCard; - GridCardRow: TcxGridCardViewRow; - (*case Byte of - 0: (GridRecord: TcxCustomGridRecord; - GridColumn: TcxGridColumn; - GroupLevel: Integer; - GridBand: TcxGridBand); - 1: (GridCard: TcxGridCard; - GridCardRow: TcxGridCardViewRow); *) - end; - - - TdxAttributeColorKind = (ackContentColor, ackTextColor); - - TdxVerticalDetailsSeparatorKind = (vdskLeading, vdskTrailing); - - { View Helpers } - - TdxCustomGridViewHelperClass = class of TdxCustomGridViewHelper; - - TdxCustomGridViewHelper = class(TdxCustomClassMapItem) - private - FView: TcxCustomGridView; - protected - class procedure AddAttribute(var AnAtributes: TdxGridAttributeClasses; AnAttribute: TdxGridAttributeClass); - class function FilterPosition(AView: TcxCustomGridView): TcxGridFilterPosition; virtual; - - class function IsFilterBarAtBottom(AView: TcxCustomGridView): Boolean; virtual; - class function IsFilterBarAtTop(AView: TcxCustomGridView): Boolean; virtual; - class function IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; virtual; - class function ViewClass: TcxCustomGridViewClass; virtual; - public - constructor Create(AView: TcxCustomGridView); virtual; - - class function PairClass: TClass; override; - class procedure Register; - class procedure Unregister; - - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; virtual; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); virtual; - class function ExtractGridView(AnItem: TdxReportVisualItem): TcxCustomGridView; virtual; - class function IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; virtual; - class function SupportedAttributes: TdxGridAttributeClasses; virtual; - - property View: TcxCustomGridView read FView write FView; - end; - - TdxNullGridViewHelper = class(TdxCustomGridViewHelper) - protected - class function ViewClass: TcxCustomGridViewClass; override; - public - class function IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; override; - end; - - TdxCustomGridTableViewHelper = class(TdxCustomGridViewHelper) - protected - class function ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; virtual; - {$IFDEF DXVER500} - class function FilterPosition(AView: TcxCustomGridView): TcxGridFilterPosition; override; - {$ENDIF} - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class function SupportedAttributes: TdxGridAttributeClasses; override; - end; - - TdxGridCardViewHelper = class(TdxCustomGridTableViewHelper) - protected - class function ExtractCard(AnItem: TdxReportVisualItem): TcxGridCard; virtual; - class function ExtractCardRow(AnItem: TdxReportVisualItem): TcxGridCardViewRow; virtual; - class function ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; override; - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); override; - end; - - TdxGridTableViewHelper = class(TdxCustomGridTableViewHelper) - protected - class function ExtractColumn(AnItem: TdxReportVisualItem): TcxGridColumn; virtual; - class function ExtractGroupLevel(AnItem: TdxReportVisualItem): Integer; virtual; - class function ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; override; - class function IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; override; - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); override; - class function SupportedAttributes: TdxGridAttributeClasses; override; - end; - - TdxGridBandedTableViewHelper = class(TdxGridTableViewHelper) - protected - class function ExtractBand(AnItem: TdxReportVisualItem): TcxGridBand; virtual; - class function ViewClass: TcxCustomGridViewClass; override; - public - class function ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; override; - class procedure ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); override; - class function SupportedAttributes: TdxGridAttributeClasses; override; - end; - - { Record Helpers } - - TdxCustomGridRecordHelperClass = class of TdxCustomGridRecordHelper; - - TdxCustomGridRecordHelper = class(TdxCustomClassMapItem) - private - FAdapter: TdxCustomGridTableViewAdapter; - FGridRecord: TcxCustomGridRecord; - protected - function Adapter: TdxCustomGridTableViewAdapter; overload; virtual; - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; virtual; - class function RecordClass: TcxCustomGridRecordClass; virtual; - - {$IFDEF DXVER500} - function GetCanCellMergingAsMaster: Boolean; virtual; - function GetCanCellMergingAsSlave: Boolean; virtual; - {$ENDIF} - function GetHasDetails: Boolean; virtual; - {$IFDEF DXVER500} - function GetHasExpandButton: Boolean; virtual; - {$ENDIF} - function GetHasSelectedChildren: Boolean; virtual; - {$IFDEF DXVER500} - function GetIsCellMergingSeparator: Boolean; virtual; - {$ENDIF} - function GetParent: TcxCustomGridRecord; virtual; - public - constructor Create(AAdapter: TdxCustomGridTableViewAdapter); virtual; - - class function PairClass: TClass; override; - class procedure Register; - class procedure Unregister; - - {$IFDEF DXVER500} - property CanCellMergingAsMaster: Boolean read GetCanCellMergingAsMaster; - property CanCellMergingAsSlave: Boolean read GetCanCellMergingAsSlave; - {$ENDIF} - property GridRecord: TcxCustomGridRecord read FGridRecord write FGridRecord; - property HasDetails: Boolean read GetHasDetails; - {$IFDEF DXVER500} - property HasExpandButton: Boolean read GetHasExpandButton; - {$ENDIF} - property HasSelectedChildren: Boolean read GetHasSelectedChildren; - {$IFDEF DXVER500} - property IsCellMergingSeparator: Boolean read GetIsCellMergingSeparator; - {$ENDIF} - property Parent: TcxCustomGridRecord read GetParent; - end; - - TdxCustomGridRowHelper = class(TdxCustomGridRecordHelper) - protected - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - class function RecordClass: TcxCustomGridRecordClass; override; - end; - - TdxGridDataRowHelper = class(TdxCustomGridRowHelper) - private - function GetRow: TcxGridDataRow; - protected - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; override; - class function RecordClass: TcxCustomGridRecordClass; override; - public - property Row: TcxGridDataRow read GetRow; - end; - - TdxGridGroupRowHelper = class(TdxCustomGridRowHelper) - private - function GetGroupRow: TcxGridGroupRow; - protected - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; override; - class function RecordClass: TcxCustomGridRecordClass; override; - - {$IFDEF DXVER500} - function GetCanCellMergingAsMaster: Boolean; override; - function GetCanCellMergingAsSlave: Boolean; override; - function GetHasExpandButton: Boolean; override; - {$ENDIF} - function GetHasSelectedChildren: Boolean; override; - public - property GroupRow: TcxGridGroupRow read GetGroupRow; - end; - - TdxGridMasterDataRowHelper = class(TdxCustomGridRowHelper) - private - function GetDetailView: TcxCustomGridView; - function GetMasterRow: TcxGridMasterDataRow; - protected - class function ProducerClass: TdxGridTableViewCustomDataRowProducerClass; override; - class function RecordClass: TcxCustomGridRecordClass; override; - - {$IFDEF DXVER500} - function GetCanCellMergingAsMaster: Boolean; override; - {$ENDIF} - function GetHasDetails: Boolean; override; - {$IFDEF DXVER500} - function GetHasExpandButton: Boolean; override; - {$ENDIF} - function GetHasSelectedChildren: Boolean; override; - {$IFDEF DXVER500} - function GetIsCellMergingSeparator: Boolean; override; - {$ENDIF} - public - property DetailView: TcxCustomGridView read GetDetailView; - property MasterRow: TcxGridMasterDataRow read GetMasterRow; - end; - - { caches } - - TdxRecordHelpersCache = class(TdxCustomCache) - private - FAdapter: TdxCustomGridTableViewAdapter; - function GetHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; - function GetItem(Index: Integer): TdxCustomGridRecordHelper; - protected - function IndexOf(ARecord: TcxCustomGridRecord): Integer; - property Items[Index: Integer]: TdxCustomGridRecordHelper read GetItem; - public - constructor Create(AAdapter: TdxCustomGridTableViewAdapter); - property Adapter: TdxCustomGridTableViewAdapter read FAdapter; - property Helpers[ARecord: TcxCustomGridRecord]: TdxCustomGridRecordHelper read GetHelper; default; - end; - - TdxProducerCache = class(TdxCustomCache) - private - FBuilder: TdxCustomGridViewBuilder; - function GetItem(Index: Integer): TdxGridViewRowProducer; - function GetProducer(ProducerClass: TdxGridViewRowProducerClass): TdxGridViewRowProducer; - protected - function IndexOf(AProducerClass: TdxGridViewRowProducerClass): Integer; - property Items[Index: Integer]: TdxGridViewRowProducer read GetItem; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); - property Builder: TdxCustomGridViewBuilder read FBuilder; - property Producers[ProducerClass: TdxGridViewRowProducerClass]: TdxGridViewRowProducer read GetProducer; default; - end; - - { CustomView Adapter, Formatter and Builder } - - TdxGridViewAdapterClass = class of TdxCustomGridViewAdapter; - - TdxCustomGridViewAdapter = class - private - FGridView: TcxCustomGridView; - FMasterAdapter: TdxCustomGridViewAdapter; - function GetAbsoluteLevel: Integer; - function GetCanUseLookAndFeelColors: Boolean; - function GetCaptionText: string; - function GetDetailsSeparatorColor: TColor; - function GetDetailsSeparatorThickness: Integer; - function GetFilter: TcxDataFilterCriteria; - function GetFilterActive: Boolean; - function GetFilterEmpty: Boolean; - function GetFilterText: string; - function GetGrid: TcxCustomGrid; - function GetGridLevel: TcxGridLevel; - function GetGridWidth: Integer; - function GetHasDetailsSeparator: Boolean; - function GetLookAndFeelKind: TcxLookAndFeelKind; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetIsDetail: Boolean; - function GetIsMaster: Boolean; - function GetMasterGridLevel: TcxGridLevel; - function GetSummary: TcxDataSummary; - function GetThemedCaptionColor: TColor; - function GetThemedCaptionTextColor: TColor; - function GetThemedFilterBarColor: TColor; - function GetThemedFilterBarTextColor: TColor; - function GetViewWidth: Integer; - protected - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - - function BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; overload; virtual; - function GetBackgroundBitmap(Index: Integer): TBitmap; - function HasBackgroundBitmap(Index: Integer): Boolean; - function IsBackgroundBitmapSupported(Index: Integer): Boolean; virtual; - - function Controller: TcxCustomGridController; overload; virtual; - function DataController: TcxCustomDataController; overload; virtual; - - function CreateCloneAdapter(AClone: TcxCustomGridView): TdxCustomGridViewAdapter; - procedure ExpandAllRowsInClones(AMasterRows, AGroupRows: Boolean); virtual; - procedure ExpandAllRowsInGridView(AGridView: TcxCustomGridView; AMasterRows, AGroupRows: Boolean); - procedure ExpandAllRowsInLevel(ALevel: TcxGridLevel; AMasterRows, AGroupRows: Boolean; ARecursive: Boolean); - procedure ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); virtual; - - function GetAreAllMasterRowsCollapsed: Boolean; virtual; - function GetAutoWidth: Boolean; virtual; - function GetCanUseOnEveryPageMode: Boolean; virtual; - {$IFDEF DXVER500} - function GetFilterPosition: TcxGridFilterPosition; virtual; - {$ENDIF} - function GetHasSelectedRecords: Boolean; virtual; - function GetIndentCount: Integer; virtual; - function GetIndentWidth: Integer; virtual; - function GetIsOffice11StyleGrouping: Boolean; virtual; - function GetMasterGridRecord: TcxCustomGridRecord; virtual; - function GetRecordCount: Integer; virtual; - function GetViewWidthExtra: Integer; virtual; - { Styles } - function GetCaptionViewParams: TcxViewParams; virtual; - function GetFilterBarViewParams: TcxViewParams; virtual; - function GetRootCaptionParams: TcxViewParams; virtual; - - property Filter: TcxDataFilterCriteria read GetFilter; - property Grid: TcxCustomGrid read GetGrid; - property LookAndFeelKind: TcxLookAndFeelKind read GetLookAndFeelKind; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property Summary: TcxDataSummary read GetSummary; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); virtual; - - function GridView: TcxCustomGridView; overload; virtual; - class function GridViewClass: TcxCustomGridViewClass; virtual; - function Styles: TcxCustomGridStyles; overload; virtual; - - procedure ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; - ARecursive: Boolean); virtual; - - property AbsoluteLevel: Integer read GetAbsoluteLevel; - property AreAllMasterRowsCollapsed: Boolean read GetAreAllMasterRowsCollapsed; - property AutoWidth: Boolean read GetAutoWidth; - property CanUseOnEveryPageMode: Boolean read GetCanUseOnEveryPageMode; - property CanUseLookAndFeelColors: Boolean read GetCanUseLookAndFeelColors; - property CaptionText: string read GetCaptionText; - property DetailsSeparatorColor: TColor read GetDetailsSeparatorColor; - property DetailsSeparatorThickness: Integer read GetDetailsSeparatorThickness; - property GridLevel: TcxGridLevel read GetGridLevel; - property GridWidth: Integer read GetGridWidth; - property FilterActive: Boolean read GetFilterActive; - property FilterEmpty: Boolean read GetFilterEmpty; - {$IFDEF DXVER500} - property FilterPosition: TcxGridFilterPosition read GetFilterPosition; - {$ENDIF} - property FilterText: string read GetFilterText; - property HasDetailsSeparator: Boolean read GetHasDetailsSeparator; - property HasSelectedRecords: Boolean read GetHasSelectedRecords; - property IndentCount: Integer read GetIndentCount; - property IndentWidth: Integer read GetIndentWidth; - property IsDetail: Boolean read GetIsDetail; - property IsMaster: Boolean read GetIsMaster; - property IsOffice11StyleGrouping: Boolean read GetIsOffice11StyleGrouping; - property MasterAdapter: TdxCustomGridViewAdapter read FMasterAdapter; - property MasterGridLevel: TcxGridLevel read GetMasterGridLevel; - property MasterGridRecord: TcxCustomGridRecord read GetMasterGridRecord; - property RecordCount: Integer read GetRecordCount; - property ThemedCaptionColor: TColor read GetThemedCaptionColor; - property ThemedCaptionTextColor: TColor read GetThemedCaptionTextColor; - property ThemedFilterBarColor: TColor read GetThemedFilterBarColor; - property ThemedFilterBarTextColor: TColor read GetThemedFilterBarTextColor; - property ViewWidth: Integer read GetViewWidth; - property ViewWidthExtra: Integer read GetViewWidthExtra; - end; - - TdxGridViewFormatterClass = class of TdxCustomGridViewFormatter; - - TdxCustomGridViewFormatter = class(TObject, IUnknown) - private - FBuilder: TdxCustomGridViewBuilder; - FCaptionLineHeight: Integer; - FExpandButtons: TList; - FFilterBarLineHeight: Integer; - FFont: TFont; - FLookAndFeelItems: TList; - FTransparentColor: TColor; - function GetAbsoluteLevel: Integer; - function GetAutoWidth: Boolean; - function GetDC: HDC; - function GetEdgeMode: TdxCellEdgeMode; - {$IFDEF DXVER500} - function GetFilterBarPosition: TcxGridFilterPosition; - {$ENDIF} - function GetGridWidth: Integer; - function GetExpandButton(Index: Integer): TdxReportCellExpandButton; - function GetExpandButtonCount: Integer; - function GetIndentWidth: Integer; - function GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; - function GetLookAndFeelItemCount: Integer; - function GetPaginateByTopLevelGroups: Boolean; - function GetRenderer: TdxPSReportRenderer; - function GetReportLink: TdxGridReportLink; - function GetShowCaption: Boolean; - function GetShowFilterBar: Boolean; - function GetUseLookAndFeelColors: Boolean; - function GetViewAvailableWidth: Integer; - function GetViewWidthExtra: Integer; - - procedure FormatLookAndFeelItems; - procedure FormatExpandButtons; - protected - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - procedure AddDelimiters; virtual; - procedure AddHorizontalDelimiters; virtual; - procedure AddVerticalDelimiters; virtual; - - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - - procedure Calculate; virtual; - procedure CalculateLineHeights; virtual; - - function GetDetailsSeparatorColor: TColor; virtual; - function GetDetailsSeparatorThickness: Integer; virtual; - function GetHasDetailsSeparator: Boolean; virtual; - - function GetSiteHeight: Integer; virtual; - function GetSiteWidth: Integer; virtual; - function GetViewWidth: Integer; virtual; - function GetViewWidthExtraAfter: Integer; virtual; // MD relation considering - function GetViewWidthExtraBefore: Integer; virtual; // MD relation considering - - function BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; overload; virtual; - function GetBackgroundBitmap(Index: Integer): TBitmap; virtual; - function GetBackgroundBitmapIndex(Index: Integer): Integer; - function HasBackgroundBitmap(Index: Integer): Boolean; virtual; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; virtual; - - function CalculateFontHeight(const AParams: TdxReportItemViewParams): Integer; - procedure CalculateHeight(const AParams: TdxReportItemViewParams; var AHeight: Integer); - function GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; - function IsColorTransparent(AColor: TColor): Boolean; - procedure RegisterExpandButton(AExpandButton: TdxReportCellExpandButton); - procedure RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); - procedure SetViewParams(AnItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); - - property DC: HDC read GetDC; - property EdgeMode: TdxCellEdgeMode read GetEdgeMode; - property ExpandButtonCount: Integer read GetExpandButtonCount; - property ExpandButtons[Index: Integer]: TdxReportCellExpandButton read GetExpandButton; - property GridWidth: Integer read GetGridWidth; - property LookAndFeelItemCount: Integer read GetLookAndFeelItemCount; - property LookAndFeelItems[Index: Integer]: TdxReportVisualItem read GetLookAndFeelItem; - property PaginateByTopLevelGroups: Boolean read GetPaginateByTopLevelGroups; - property Renderer: TdxPSReportRenderer read GetRenderer; - property ReportLink: TdxGridReportLink read GetReportLink; - property SiteHeight: Integer read GetSiteHeight; - property SiteWidth: Integer read GetSiteWidth; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); virtual; - destructor Destroy; override; - - function Adapter: TdxCustomGridViewAdapter; overload; virtual; - function Builder: TdxCustomGridViewBuilder; overload; virtual; - - { Host } - procedure DoInitializeHost(AHost: TdxReportCell); virtual; - function GetHostClass: TdxReportCellClass; virtual; - function GetRowHostClass: TdxReportCellClass; virtual; - - { Caption } - procedure DoInitializeCaption(ACaption: TdxReportCellText); virtual; - procedure DoInitializeCaptionRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeCaption(ACaption: TdxReportCellText); virtual; - function GetCaptionClass: TdxReportCellTextClass; virtual; - function GetCaptionViewParams: TdxReportItemViewParams; virtual; - - { Filter Box } - procedure DoInitializeFilterBar(AFilterBar: TdxReportCellText); virtual; - procedure DoInitializeFilterBarRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeFilterBar(AFilterBar: TdxReportCellText); virtual; - function GetFilterBarClass: TdxReportCellTextClass; virtual; - function GetFilterBarViewParams: TdxReportItemViewParams; virtual; - - { Details Separator } - procedure DoInitializeDetailsSeparatorRow(ARow: TdxReportCell); virtual; - procedure DoInitializeHorzDetailsSeparator(ASeparator: TdxReportCellBox); virtual; - procedure DoInitializeVertBottomDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - procedure DoInitializeVertDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - procedure DoInitializeVertTopDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - function GetDetailsSeparatorClass: TdxReportCellBoxClass; virtual; - - { Master Indent } - procedure DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; AnIndex, AnIndentCount: Integer); virtual; - function GetMasterIndentClass: TdxReportCellExpandButtonClass; virtual; - - { View Terminator } - procedure DoInitializeViewTerminator(ATerminator: TdxReportCellBox); virtual; - - property AbsoluteLevel: Integer read GetAbsoluteLevel; - property AutoWidth: Boolean read GetAutoWidth; - property CaptionLineHeight: Integer read FCaptionLineHeight write FCaptionLineHeight; - property DetailsSeparatorColor: TColor read GetDetailsSeparatorColor; - property DetailsSeparatorThickness: Integer read GetDetailsSeparatorThickness; - property FilterBarLineHeight: Integer read FFilterBarLineHeight write FFilterBarLineHeight; - {$IFDEF DXVER500} - property FilterBarPosition: TcxGridFilterPosition read GetFilterBarPosition; - {$ENDIF} - property HasDetailsSeparator: Boolean read GetHasDetailsSeparator; - property IndentWidth: Integer read GetIndentWidth; - property ShowCaption: Boolean read GetShowCaption; - property ShowFilterBar: Boolean read GetShowFilterBar; - property TransparentColor: TColor read FTransparentColor write FTransparentColor; - property UseLookAndFeelColors: Boolean read GetUseLookAndFeelColors; - property ViewAvailableWidth: Integer read GetViewAvailableWidth; - property ViewWidth: Integer read GetViewWidth; - property ViewWidthExtra: Integer read GetViewWidthExtra; - property ViewWidthExtraAfter: Integer read GetViewWidthExtraAfter; // MD relation considering - property ViewWidthExtraBefore: Integer read GetViewWidthExtraBefore; // MD relation considering - end; - - TdxGridViewBuilderClass = class of TdxCustomGridViewBuilder; - - TdxCustomGridViewBuilder = class(TdxCustomClassMapItem) - private - FAdapter: TdxCustomGridViewAdapter; - FDetailsBuilder: TdxCustomGridViewBuilder; - FFormatter: TdxCustomGridViewFormatter; - FGridView: TcxCustomGridView; - FMasterBuilder: TdxCustomGridViewBuilder; - FProducerCache: TdxProducerCache; - FReportLink: TdxGridReportLink; - FReportRows: TList; - function GetAbsoluteBuilder(AIndex: Integer): TdxCustomGridViewBuilder; - function GetAutoWidth: Boolean; - function GetGridLevel: TcxGridLevel; - function GetGrid: TcxCustomGrid; - function GetHost: TdxReportCell; - function GetHostInfoServices: TdxGridAttributeHostInfoServices; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowCount: Integer; - function GetRootBuilder: TdxCustomGridViewBuilder; - protected - procedure AddReportRow(ARow: TdxReportCell); - - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - procedure DoBuild; virtual; - procedure DoBuildViewBody; virtual; - procedure DoBuildViewFooter; virtual; - procedure DoBuildViewHeader; virtual; - - function GetViewAvailableWidth: Integer; virtual; - { Caption } - procedure CreateCaption; virtual; - function GetCaptionProducer: TdxGridViewCaptionProducer; virtual; - function GetCaptionProducerClass: TdxGridViewCaptionProducerClass; virtual; - { Details Separator } - procedure CreateBottomDetailsSeparator; virtual; - procedure CreateTopDetailsSeparator; virtual; - function GetDetailsBottomSeparatorProducer: TdxGridViewDetailsSeparatorProducer; virtual; - function GetDetailsBottomSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; virtual; - function GetDetailsTopSeparatorProducer: TdxGridViewDetailsSeparatorProducer; virtual; - function GetDetailsTopSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; virtual; - { Filter Box } - procedure CreateFilterBar; virtual; - function GetFilterBarProducer: TdxGridViewFilterBarProducer; virtual; - function GetFilterBarProducerClass: TdxGridViewFilterBarProducerClass; virtual; - { View Terminator } - procedure CreateViewTerminator; virtual; - function GetViewTerminatorProducer: TdxGridViewTerminatorProducer; virtual; - function GetViewTerminatorProducerClass: TdxGridViewTerminatorProducerClass; virtual; - - function GridView: TcxCustomGridView; overload; virtual; - class function GridViewClass: TcxCustomGridViewClass; virtual; - - property GridLevel: TcxGridLevel read GetGridLevel; - property HostInfoServices: TdxGridAttributeHostInfoServices read GetHostInfoServices; - property ProducerCache: TdxProducerCache read FProducerCache; - property ReportLink: TdxGridReportLink read FReportLink; - public - constructor Create(AReportLink: TdxGridReportLink; AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView); virtual; - destructor Destroy; override; - - function Adapter: TdxCustomGridViewAdapter; overload; virtual; - class function AdapterClass: TdxGridViewAdapterClass; virtual; - class function CreateAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; virtual; - - function Formatter: TdxCustomGridViewFormatter; overload; virtual; - class function FormatterClass: TdxGridViewFormatterClass; virtual; - - procedure Build; - function IsAborted: Boolean; - procedure Progress(const APercentDone: Double); - - class function PairClass: TClass; override; - class procedure Register; - class procedure Unregister; - - property AbsoluteBuilders[Index: Integer]: TdxCustomGridViewBuilder read GetAbsoluteBuilder; - property AutoWidth: Boolean read GetAutoWidth; - property DetailsBuilder: TdxCustomGridViewBuilder read FDetailsBuilder; - property Grid: TcxCustomGrid read GetGrid; - property Host: TdxReportCell read GetHost; - property MasterBuilder: TdxCustomGridViewBuilder read FMasterBuilder; - property ReportRowCount: Integer read GetReportRowCount; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property RootBuilder: TdxCustomGridViewBuilder read GetRootBuilder; - property ViewAvailableWidth: Integer read GetViewAvailableWidth; - end; - - { CustomTableView Adapter and Formatter } - - TdxGridTableAdapterForEachRecordProc = procedure(ARecord: TcxCustomGridRecord; - AData: Integer; var AContinue: Boolean) of object; - - TdxCustomGridTableViewAdapter = class(TdxCustomGridViewAdapter) - private - FDetailsLineCount: Integer; - FRecordHelpersCache: TdxRecordHelpersCache; - function GetCellEndEllipsis: Boolean; - function GetDetailsLineCount: Integer; - function GetFiltering: TcxCustomGridTableFiltering; - function GetIsGridMode: Boolean; - function GetRecord(Index: Integer): TcxCustomGridRecord; - function GetRecordHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; - function GetSelectedRecord(Index: Integer): TcxCustomGridRecord; - function GetSelectedRecordCount: Integer; - protected - function CalculateDetailsLineCount: Integer; virtual; - - function GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; virtual; - function GetPreviewViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; virtual; - function GetSelectionViewParams: TcxViewParams; virtual; - function HasSelectionStyle: Boolean; - - function Controller: TcxCustomGridTableController; reintroduce; overload; - - procedure DoExpandMasterRow(ARecord: TcxCustomGridRecord; AData: Integer; - var AContinue: Boolean); - procedure ExpandAllGroupRows; virtual; - procedure ExpandAllMasterRows(AnExpandGroups: Boolean); virtual; - procedure ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); override; - - function GetAreAllMasterRowsCollapsed: Boolean; override; - function GetCanUseOnEveryPageMode: Boolean; override; - function GetCellAutoHeight: Boolean; virtual; - function GetCellMultiline: Boolean; virtual; - {$IFDEF DXVER500} - function GetFilterPosition: TcxGridFilterPosition; override; - {$ENDIF} - function GetGridLineColor: TColor; virtual; - function GetHasSelectedRecords: Boolean; override; - function GetMasterGridRecord: TcxCustomGridRecord; override; - function GetRecordCount: Integer; override; - procedure IsMasterRowCollapsed(ARecord: TcxCustomGridRecord; AData: Integer; - var AContinue: Boolean); - - class function GetProperties(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; virtual; - class function GetPropertiesClass(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditPropertiesClass; virtual; - class function GetRepositoryItem(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxEditRepositoryItem; virtual; - - property RecordHelpersCache: TdxRecordHelpersCache read FRecordHelpersCache; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); override; - destructor Destroy; override; - - function ForEachRecord(AProc: TdxGridTableAdapterForEachRecordProc; AData: Integer; - AProcessSelection: Boolean): Boolean; - - function GridView: TcxCustomGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxCustomGridTableViewStyles; reintroduce; overload; - - property CellAutoHeight: Boolean read GetCellAutoHeight; - property CellEndEllipsis: Boolean read GetCellEndEllipsis; - property CellMultiline: Boolean read GetCellMultiline; - property DetailsLineCount: Integer read GetDetailsLineCount write FDetailsLineCount; - property Filtering: TcxCustomGridTableFiltering read GetFiltering; - property GridLineColor: TColor read GetGridLineColor; - property IsGridMode: Boolean read GetIsGridMode; - property RecordHelpers[Row: TcxCustomGridRecord]: TdxCustomGridRecordHelper read GetRecordHelper; - property Records[Index: Integer]: TcxCustomGridRecord read GetRecord; - property SelectedRecordCount: Integer read GetSelectedRecordCount; - property SelectedRecords[Index: Integer]: TcxCustomGridRecord read GetSelectedRecord; - end; - - TdxCustomGridTableViewFormatter = class(TdxCustomGridViewFormatter, IdxPSCellParams, IdxPSCellParams2) - private - FRecordIndexes: TList; - FSelectedRecordList: TList; - function GetGridLineColor: TColor; - function GetRecord(Index: Integer): TcxCustomGridRecord; - function GetRecordCount: Integer; - function GetRecordIndex(ARecord: TcxCustomGridRecord): Integer; - function GetSelectedRecord(Index: Integer): TcxCustomGridRecord; - function GetSelectedRecordCount: Integer; - protected - { IdxPSCellParams } - function IdxPSCellParams.GetAutoHeight = IdxPSCellParams_GetAutoHeight; - function IdxPSCellParams.GetDC = IdxPSCellParams_GetDC; - function IdxPSCellParams.GetDisplayGraphicsAsText = IdxPSCellParams_GetDisplayGraphicsAsText; - function IdxPSCellParams.GetEndEllipsis = IdxPSCellParams_GetEndEllipsis; - function IdxPSCellParams.GetFlatCheckMarks = IdxPSCellParams_GetFlatCheckMarks; - function IdxPSCellParams.GetGraphicsText = IdxPSCellParams_GetGraphicsText; - function IdxPSCellParams.GetMultiline = IdxPSCellParams_GetMultiline; - function IdxPSCellParams.GetTransparentGraphics = IdxPSCellParams_GetTransparentGraphics; - function IdxPSCellParams_GetAutoHeight: Boolean; virtual; - function IdxPSCellParams_GetDC: HDC; virtual; - function IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; virtual; - function IdxPSCellParams_GetEndEllipsis: Boolean; virtual; - function IdxPSCellParams_GetFlatCheckMarks: Boolean; virtual; - function IdxPSCellParams_GetGraphicsText: string; virtual; - function IdxPSCellParams_GetMultiline: Boolean; virtual; - function IdxPSCellParams_GetTransparentGraphics: Boolean; virtual; - { IdxPSCellParams2 } - function IdxPSCellParams2.GetPreviewMarginLeft = IdxPSCellParams2_GetPreviewMarginLeft; - function IdxPSCellParams2.GetPreviewMarginRight = IdxPSCellParams2_GetPreviewMarginRight; - function IdxPSCellParams2.GetPreviewMaxHeight = IdxPSCellParams2_GetPreviewMaxHeight; - function IdxPSCellParams2.GetPreviewMaxLineCount = IdxPSCellParams2_GetPreviewMaxLineCount; - function IdxPSCellParams2.GetRichEditGraphicClass = IdxPSCellParams2_GetRichEditGraphicClass; - function IdxPSCellParams2.GetRichEditTransparent = IdxPSCellParams2_GetRichEditTransparent; - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; virtual; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; virtual; - function IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; virtual; - function IdxPSCellParams2_GetRichEditTransparent: Boolean; virtual; - - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - - procedure BuildSelectedRecordList; virtual; - function CanProcessSelectionStyle(ARecord: TcxCustomGridRecord): Boolean; - function IsSelectedRecord(ARecord: TcxCustomGridRecord): Boolean; virtual; - - function GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; virtual; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - property SelectedRecordList: TList read FSelectedRecordList; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Adapter: TdxCustomGridTableViewAdapter; reintroduce; overload; - function Builder: TdxCustomGridTableViewBuilder; reintroduce; overload; - - function IndexOfRecord(ARecord: TcxCustomGridRecord): Integer; - - { Items } - procedure CheckDisplayValuePost(AProperties: TcxCustomEditProperties; - ATableItem: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; AnItem: TAbstractdxReportCellData); - procedure DoInitializeItem(AnItem: TAbstractdxReportCellData; ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False); virtual; - function GetItemClass(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportCellDataClass; virtual; - function GetItemProperties(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; virtual; - function GetItemValue(AProperties: TcxCustomEditProperties; ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxEditValue; virtual; - function GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; virtual; - - property GridLineColor: TColor read GetGridLineColor; - property RecordCount: Integer read GetRecordCount; - property RecordIndexes[ARecord: TcxCustomGridRecord]: Integer read GetRecordIndex; - property Records[Index: Integer]: TcxCustomGridRecord read GetRecord; - property SelectedRecordCount: Integer read GetSelectedRecordCount; - property SelectedRecords[Index: Integer]: TcxCustomGridRecord read GetSelectedRecord; - end; - - TdxCustomGridTableViewBuilder = class(TdxCustomGridViewBuilder) - protected - procedure DoBuildViewFooter; override; - procedure DoBuildViewHeader; override; - - procedure DoGetCellHeight(ARecord: TcxCustomGridRecord; ATableItem: TcxCustomGridTableItem; - var AHeight: Integer); - - function GridView: TcxCustomGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - public - function Adapter: TdxCustomGridTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxCustomGridTableViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - end; - - { GridTableView Adapter, Formatter and Builder } - - TdxGridTableViewAdapter = class(TdxCustomGridTableViewAdapter) - private - function GetColumn(Index: Integer): TcxGridColumn; - function GetColumnCount: Integer; - function GetExpandButtonColor: TColor; - function GetExpandButtonSize: Integer; - function GetFooterItemText(Index: Integer): string; - function GetFooterMultiline: Boolean; - function GetGridLines: TcxGridLines; - function GetGroupedColumn(Index: Integer): TcxGridColumn; - function GetGroupedColumnCount: Integer; - function GetGroupFootersMode: TcxGridGroupFootersMode; - function GetGroupFootersMultiline: Boolean; - function GetGroupRowSeparatorColor: TColor; - function GetGroupRowSeparatorThickness: Integer; - function GetHasFooterItem(Index: Integer): Boolean; - function GetHasPreview: Boolean; - function GetHasRowSeparators: Boolean; - function GetHeaderEndEllipsis: Boolean; - function GetInternalColumnMinWidth(Column: TcxGridColumn): Integer; - function GetInternalColumnWidth(Column: TcxGridColumn): Integer; - function GetPreviewColumn: TcxGridColumn; - function GetPreviewLeftIndent: Integer; - function GetPreviewPlace: TcxGridPreviewPlace; - function GetPreviewRightIndent: Integer; - function GetRow(Index: Integer): TcxCustomGridRow; - function GetRowCount: Integer; - function GetRowSeparatorColor: TColor; - function GetRowSeparatorThickness: Integer; - function GetShowExpandButtonsForEmptyDetails: Boolean; - function GetShowHorzGridLines: Boolean; - function GetShowVertGridLines: Boolean; - function GetThemedFooterItemColor: TColor; - function GetThemedFooterItemTextColor: TColor; - function GetThemedHeaderItemColor: TColor; - function GetThemedHeaderItemTextColor: TColor; - protected - function Controller: TcxGridTableController; reintroduce; overload; - function DataController: TcxGridDataController; reintroduce; overload; - - function GetAutoWidth: Boolean; override; - function GetCellAutoHeight: Boolean; override; - function GetCellMultiline: Boolean; override; - function GetGridLineColor: TColor; override; - function GetHeaderAutoHeight: Boolean; virtual; - function GetHeaderMultiline(Column: TcxGridColumn): Boolean; virtual; - function GetIndentCount: Integer; override; - function GetIndentWidth: Integer; override; - function GetIndicatorWidth: Integer; virtual; - function GetIsOffice11StyleGrouping: Boolean; override; - function GetViewWidthExtra: Integer; override; - - function GetDataRowHeight: Integer; virtual; - function GetDataRowHeightAssigned: Boolean; virtual; - function GetFooterHeight: Integer; virtual; - function GetFooterHeightAssigned: Boolean; virtual; - function GetGroupFooterHeight: Integer; virtual; - function GetGroupFooterHeightAssigned: Boolean; virtual; - function GetGroupRowHeight: Integer; virtual; - function GetGroupRowHeightAssigned: Boolean; virtual; - function GetHeaderHeight: Integer; virtual; - function GetHeaderHeightAssigned: Boolean; virtual; - - { Styles } - function GetFilterBarViewParams: TcxViewParams; override; - function GetFooterViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; AColumn: TcxGridColumn): TcxViewParams; virtual; - function GetGroupRowViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer): TcxViewParams; virtual; - function GetHeaderViewParams(AColumn: TcxGridColumn): TcxViewParams; virtual; - function GetPreviewViewParams(ARecord: TcxCustomGridRecord; - AnItem: TcxCustomGridTableItem): TcxViewParams; override; - - property InternalColumnMinWidths[Column: TcxGridColumn]: Integer read GetInternalColumnMinWidth; - property InternalColumnWidths[Column: TcxGridColumn]: Integer read GetInternalColumnWidth; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); override; - - function GridView: TcxGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxGridTableViewStyles; reintroduce; overload; - - function HasDetails(AGridRow: TcxCustomGridRow): Boolean; - - function GetGroupFooterCount(AGridRow: TcxCustomGridRow): Integer; - function GetGroupFooterItemText(ARowIndex, ALevel, AIndex: Integer): string; - function HasGroupFooter(AGridRow: TcxCustomGridRow; ALevel: Integer): Boolean; - function HasGroupFooterItem(ALevel, AIndex: Integer): Boolean; - function HasGroupFooters(AGridRow: TcxCustomGridRow): Boolean; - - property ColumnCount: Integer read GetColumnCount; - property Columns[Index: Integer]: TcxGridColumn read GetColumn; - property DataRowHeight: Integer read GetDataRowHeight; - property DataRowHeightAssigned: Boolean read GetDataRowHeightAssigned; - property ExpandButtonColor: TColor read GetExpandButtonColor; - property ExpandButtonSize: Integer read GetExpandButtonSize; - property FooterHeight: Integer read GetFooterHeight; - property FooterHeightAssigned: Boolean read GetFooterHeightAssigned; - property FooterItemTexts[Index: Integer]: string read GetFooterItemText; - property FooterMultiline: Boolean read GetFooterMultiline; - property GridLines: TcxGridLines read GetGridLines; - property GroupedColumnCount: Integer read GetGroupedColumnCount; - property GroupedColumns[Index: Integer]: TcxGridColumn read GetGroupedColumn; - property GroupFooterHeight: Integer read GetGroupFooterHeight; - property GroupFooterHeightAssigned: Boolean read GetGroupFooterHeightAssigned; - property GroupFootersMode: TcxGridGroupFootersMode read GetGroupFootersMode; - property GroupFootersMultiline: Boolean read GetGroupFootersMultiline; - property GroupRowHeight: Integer read GetGroupRowHeight; - property GroupRowHeightAssigned: Boolean read GetGroupRowHeightAssigned; - property GroupRowSeparatorColor: TColor read GetGroupRowSeparatorColor; - property GroupRowSeparatorThickness: Integer read GetGroupRowSeparatorThickness; - property HasFooterItem[Index: Integer]: Boolean read GetHasFooterItem; - property HasPreview: Boolean read GetHasPreview; - property HasRowSeparators: Boolean read GetHasRowSeparators; - property HeaderAutoHeight: Boolean read GetHeaderAutoHeight; - property HeaderEndEllipsis: Boolean read GetHeaderEndEllipsis; - property HeaderHeight: Integer read GetHeaderHeight; - property HeaderHeightAssigned: Boolean read GetHeaderHeightAssigned; - property HeaderMultilines[Column: TcxGridColumn]: Boolean read GetHeaderMultiline; - property IndicatorWidth: Integer read GetIndicatorWidth; - property PreviewColumn: TcxGridColumn read GetPreviewColumn; - property PreviewLeftIndent: Integer read GetPreviewLeftIndent; - property PreviewPlace: TcxGridPreviewPlace read GetPreviewPlace; - property PreviewRightIndent: Integer read GetPreviewRightIndent; - property RowCount: Integer read GetRowCount; - property Rows[Index: Integer]: TcxCustomGridRow read GetRow; - property RowSeparatorColor: TColor read GetRowSeparatorColor; - property RowSeparatorThickness: Integer read GetRowSeparatorThickness; - property ShowExpandButtonsForEmptyDetails: Boolean read GetShowExpandButtonsForEmptyDetails; - property ShowHorzGridLines: Boolean read GetShowHorzGridLines; - property ShowVertGridLines: Boolean read GetShowVertGridLines; - property ThemedFooterItemColor: TColor read GetThemedFooterItemColor; - property ThemedFooterItemTextColor: TColor read GetThemedFooterItemTextColor; - property ThemedHeaderItemColor: TColor read GetThemedHeaderItemColor; - property ThemedHeaderItemTextColor: TColor read GetThemedHeaderItemTextColor; - end; - - TdxCustomGridTableViewItemPlaceControllerClass = class of TdxCustomGridTableViewItemPlaceController; - - TdxCustomGridTableViewItemPlaceController = class - private - FFormatter: TdxGridTableViewFormatter; - FHeaderLineCount: Integer; - FWidth: Integer; - function GetHeaderLineCount: Integer; - function GetWidth: Integer; - procedure SetWidth(Value: Integer); - protected - function CalculateWidth: Integer; virtual; - function CalculateHeaderLineCount: Integer; virtual; - function GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; virtual; - procedure WidthChanged; virtual; - public - constructor Create(AFormatter: TdxGridTableViewFormatter); virtual; - - procedure Calculate; virtual; - procedure Refresh; virtual; - - property Formatter: TdxGridTableViewFormatter read FFormatter; - property HeaderLineCount: Integer read GetHeaderLineCount; - property ItemsByColumn[Column: TcxGridColumn]: TdxGridTableViewColumnPlace read GetItemByColumn; default; - property Width: Integer read GetWidth write SetWidth; - end; - - TdxGridTableViewColumnPlaceClass = class of TdxGridTableViewColumnPlace; - - TdxGridTableViewColumnPlace = class - private - FColumn: TcxGridColumn; - FController: TdxGridTableViewColumnPlaceController; - FLeftBound: Integer; - FWidth: Integer; - function GetAdapter: TdxGridTableViewAdapter; - function GetCellBounds(RowIndex: Integer): TRect; - function GetCellHeight(RowIndex: Integer): Integer; - function GetFooterCellBounds: TRect; - function GetFooterLineHeight: Integer; - function GetFormatter: TdxGridTableViewFormatter; - function GetGroupFooterCellBounds(IndentCount: Integer): TRect; - function GetGroupFooterLineHeight: Integer; - function GetHeaderCellBounds: TRect; - function GetHeaderLineHeight: Integer; - function GetIndex: Integer; - function GetIsFixed: Boolean; - function GetLeftBound: Integer; - function GetMinWidth: Integer; - function GetOriginalWidth: Integer; - function GetWidth: Integer; - protected - function CalculateLeftBound: Integer; virtual; - function GetLineCount: Integer; virtual; - function GetRowIndex: Integer; virtual; - procedure InitAutoWidthItem(AnItem: TcxAutoWidthItem); virtual; - - property Adapter: TdxGridTableViewAdapter read GetAdapter; - property Formatter: TdxGridTableViewFormatter read GetFormatter; - property IsFixed: Boolean read GetIsFixed; - property LineCount: Integer read GetLineCount; - property MinWidth: Integer read GetMinWidth; - property OriginalWidth: Integer read GetOriginalWidth; - property RowIndex: Integer read GetRowIndex; - public - constructor Create(AController: TdxGridTableViewColumnPlaceController; AColumn: TcxGridColumn); virtual; - procedure Calculate(ALeftBound: Integer); virtual; - - property CellBounds[RowIndex: Integer]: TRect read GetCellBounds; - property CellHeights[RowIndex: Integer]: Integer read GetCellHeight; - property Column: TcxGridColumn read FColumn; - property Controller: TdxGridTableViewColumnPlaceController read FController; - property FooterCellBounds: TRect read GetFooterCellBounds; - property FooterLineHeight: Integer read GetFooterLineHeight; - property GroupFooterCellBounds[IndentCount: Integer]: TRect read GetGroupFooterCellBounds; - property GroupFooterLineHeight: Integer read GetGroupFooterLineHeight; - property HeaderCellBounds: TRect read GetHeaderCellBounds; - property HeaderLineHeight: Integer read GetHeaderLineHeight; - property Index: Integer read GetIndex; - property LeftBound: Integer read GetLeftBound write FLeftBound; - property Width: Integer read GetWidth write FWidth; - end; - - TdxGridTableViewColumnPlaceController = class(TdxCustomGridTableViewItemPlaceController) - private - FColumnIndexes: TList; - FItems: TList; - function GetAdapter: TdxGridTableViewAdapter; - function GetColumnIndex(Column: TcxGridColumn): Integer; - function GetItem(Index: Integer): TdxGridTableViewColumnPlace; - function GetItemCount: Integer; - procedure FreeAndNilItems; - protected - function CalculateWidth: Integer; override; - function GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; override; - - procedure AddItems; virtual; - procedure ClearItems; - function CreateItem(AColumn: TcxGridColumn): TdxGridTableViewColumnPlace; virtual; - function GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; virtual; - - function CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; virtual; - procedure CalculateItemsWidth; virtual; - - function GetItemsAutoWidth: Boolean; virtual; - function GetItemsAvailableWidth: Integer; virtual; - - property Adapter: TdxGridTableViewAdapter read GetAdapter; - property ItemsAutoWidth: Boolean read GetItemsAutoWidth; - property ItemsAvailableWidth: Integer read GetItemsAvailableWidth; - public - constructor Create(AFormatter: TdxGridTableViewFormatter); override; - destructor Destroy; override; - - procedure Calculate; override; - procedure Refresh; override; - - function IndexOf(AnItem: TdxGridTableViewColumnPlace): Integer; overload; - function IndexOf(AColumn: TcxGridColumn): Integer; overload; - - property ColumnIndexes[Column: TcxGridColumn]: Integer read GetColumnIndex; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TdxGridTableViewColumnPlace read GetItem; default; - end; - - TdxGridTableViewReportDataAdapter = class - private - FBuilder: TdxCustomGridViewBuilder; - function GetReportItem(Row: TcxCustomGridRow; Column: TcxGridColumn): TdxReportVisualItem; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowByGridRow(Row: TcxCustomGridRow): TdxReportCell; - function GetReportRowCount: Integer; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); virtual; - - property Builder: TdxCustomGridViewBuilder read FBuilder; - property ReportItems[Row: TcxCustomGridRow; Column: TcxGridColumn]: TdxReportVisualItem read GetReportItem; - property ReportRowCount: Integer read GetReportRowCount; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; default; - property ReportRowsByGridRow[Row: TcxCustomGridRow]: TdxReportCell read GetReportRowByGridRow; - end; - - TdxGridTableViewFormatter = class(TdxCustomGridTableViewFormatter) - private - FColumns: TList; - FDetailsLineHeight: Integer; - FFooterLineHeight: Integer; - FGroupFooterLineHeight: Integer; - FGroupRowLineHeight: Integer; - FHeaderLineHeight: Integer; - FItemPlaceController: TdxCustomGridTableViewItemPlaceController; - FPreviewLineHeight: Integer; - FReportDataAdapter: TdxGridTableViewReportDataAdapter; - FRowHeights: TList; - function GetColumn(Index: Integer): TcxGridColumn; - function GetColumnCount: Integer; - function GetGroupRowSeparatorColor: TColor; - function GetGroupRowSeparatorThickness: Integer; - function GetHasPreview: Boolean; - function GetHeaderLineCount: Integer; - function GetPreviewAutoHeight: Boolean; - function GetPreviewColumn: TcxGridColumn; - function GetPreviewMaxLineCount: Integer; - function GetRow(Index: Integer): TcxCustomGridRow; - function GetRowCount: Integer; - function GetRowHeight(Index: Integer): Integer; - function GetRowHeightByRow(Row: TcxCustomGridRow): Integer; - function GetRowSeparatorColor: TColor; - function GetRowSeparatorThickness: Integer; - function GetShowGroupFooters: Boolean; - function GetShowFooters: Boolean; - function GetShowHeaders: Boolean; - function GetShowPreview: Boolean; - procedure SetRowHeight(Index: Integer; Value: Integer); - procedure SetRowHeightByRow(Row: TcxCustomGridRow; Value: Integer); - protected - { IdxPSCellParams2 } - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; override; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; override; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; override; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; override; - - procedure AddHorizontalDelimiters; override; - {$IFDEF DXVER500} - procedure AfterBuilding; override; - {$ENDIF} - procedure BeforeBuilding; override; - procedure Calculate; override; - procedure CalculateDataRowHeights; virtual; - procedure CalculateLineHeights; override; - - function GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; virtual; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - {$IFDEF DXVER500} - function CanCellMerging: Boolean; virtual; - function CanColumnCellMerging(AColumn: TcxGridColumn): Boolean; virtual; - procedure PerformCellMerging; virtual; - procedure PerformColumnCellMerging(AColumn: TcxGridColumn); virtual; - {$ENDIF} - - // actual columns used inside building (depends on ActualVisibility of columns and selection status) - procedure BuildColumnList; virtual; - procedure BuildItemLists; virtual; - function IsColumnActuallyVisible(AColumn: TcxGridColumn): Boolean; virtual; - - function GetViewWidth: Integer; override; - - property ItemPlaceController: TdxCustomGridTableViewItemPlaceController read FItemPlaceController; - property ReportDataAdapter: TdxGridTableViewReportDataAdapter read FReportDataAdapter; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - function Builder: TdxGridTableViewBuilder; reintroduce; overload; - - { Footers } - procedure DoInitializeFooterItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeFooterRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeFooterItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - function GetFooterItemBounds(AnIndex: Integer): TRect; virtual; - function GetFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetFooterItemViewParams(AColumn: TcxGridColumn): TdxReportItemViewParams; virtual; - - { Group Footers } - procedure DoInitializeGroupFooterHost(AnItem: TdxReportVisualItem; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); virtual; - procedure DoInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); virtual; - procedure DoInitializeGroupFooterRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord; AGroupLevel: Integer); virtual; - procedure DoReportLinkInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); virtual; - function GetGroupFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetGroupFooterItemBounds(AnIndex, AGroupLevel: Integer): TRect; virtual; - function GetGroupFooterItemViewParams(ARecord: TcxCustomGridRecord; AGroupLevel: Integer; - AColumn: TcxGridColumn): TdxReportItemViewParams; virtual; - - { Group Row } - procedure DoInitializeGroupRowItem(AnItem: TAbstractdxReportCellData; ARow: TcxGridGroupRow); virtual; - procedure DoInitializeGroupRow(ARow: TdxReportCell; ARecord: TcxCustomGridRecord); virtual; - function GetGroupRowClass: TdxReportCellTextClass; virtual; - function GetGroupRowViewParams(ARecord: TcxCustomGridRecord; ALevel: Integer): TdxReportItemViewParams; virtual; - - { Group Row Separator - Office11 Grouping Style } - procedure DoInitializeGroupRowSeparator(ASeparator: TAbstractdxReportCellData); virtual; - procedure DoInitializeGroupSeparatorRow(ARow: TdxReportCell); virtual; - function GetGroupRowSeparatorClass: TdxReportCellDataClass; virtual; - - { Headers } - procedure DoInitializeHeaderItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeHeaderRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeHeaderItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - function GetHeaderItemBounds(AnIndex: Integer): TRect; virtual; - function GetHeaderItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetHeaderItemViewParams(AColumn: TcxGridColumn): TdxReportItemViewParams; virtual; - - { Indents and Expand Buttons } - function CreateIndent(AParent: TdxReportCell): TdxReportCellExpandButton; virtual; - procedure DoInitializeDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeExpandButton(AnExpandButton: TdxReportCellExpandButton; - ARecord: TcxCustomGridRecord; AnIsMasterIndent: Boolean); virtual; - procedure DoInitializeGroupFooterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeGroupRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeMasterDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - procedure DoInitializeRowSeparatorIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); virtual; - function GetIndentClass: TdxReportCellExpandButtonClass; virtual; - function GetIndentViewParams(ARecord: TcxCustomGridRecord; - AnIndex, AnIndentCount: Integer; ANonRecordIndent: Boolean): TdxReportItemViewParams; virtual; - function HasExpandButton(ARecord: TcxCustomGridRecord): Boolean; virtual; - - { Items } - procedure DoInitializeDataRow(ARow: TdxReportCell; ARecord: TcxCustomGridRecord); virtual; - procedure DoReportLinkInitializeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxGridColumn; ARecord: TcxCustomGridRecord); virtual; - function GetItemBounds(AGridRow: TcxCustomGridRow; - AGridRowIndex, AColumnIndex: Integer): TRect; virtual; - function GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; override; - - { Master Indent } - procedure DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer); override; - - { Preview } - procedure DoInitializePreview(APreview: TAbstractdxReportCellData; AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord); virtual; - function GetPreviewClass(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportCellDataClass; virtual; - function GetPreviewViewParams(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportItemViewParams; virtual; - - { Row Separator } - procedure DoInitializeSeparatorRow(ARow: TdxReportCell); virtual; - procedure DoInitializeRowSeparator(ASeparator: TAbstractdxReportCellData); virtual; - function GetRowSeparatorClass: TdxReportCellDataClass; virtual; - - function GetReportItem(ARow: TcxCustomGridRow; AColumn: TcxGridColumn): TdxReportVisualItem; - - property ColumnCount: Integer read GetColumnCount; - property Columns[Index: Integer]: TcxGridColumn read GetColumn; - property DetailsLineHeight: Integer read FDetailsLineHeight write FDetailsLineHeight; - property FooterLineHeight: Integer read FFooterLineHeight write FFooterLineHeight; - property GroupFooterLineHeight: Integer read FGroupFooterLineHeight write FGroupFooterLineHeight; - property GroupRowLineHeight: Integer read FGroupRowLineHeight write FGroupRowLineHeight; - property GroupRowSeparatorColor: TColor read GetGroupRowSeparatorColor; - property GroupRowSeparatorThickness: Integer read GetGroupRowSeparatorThickness; - property HasPreview: Boolean read GetHasPreview; - property HeaderLineCount: Integer read GetHeaderLineCount; - property HeaderLineHeight: Integer read FHeaderLineHeight write FHeaderLineHeight; - property PreviewAutoHeight: Boolean read GetPreviewAutoHeight; - property PreviewColumn: TcxGridColumn read GetPreviewColumn; - property PreviewLineHeight: Integer read FPreviewLineHeight write FPreviewLineHeight; - property PreviewMaxLineCount: Integer read GetPreviewMaxLineCount; - property RowCount: Integer read GetRowCount; - property RowHeights[Index: Integer]: Integer read GetRowHeight write SetRowHeight; - property RowHeightsByRow[Row: TcxCustomGridRow]: Integer read GetRowHeightByRow write SetRowHeightByRow; - property Rows[Index: Integer]: TcxCustomGridRow read GetRow; - property RowSeparatorColor: TColor read GetRowSeparatorColor; - property RowSeparatorThickness: Integer read GetRowSeparatorThickness; - property ShowGroupFooters: Boolean read GetShowGroupFooters; - property ShowFooters: Boolean read GetShowFooters; - property ShowHeaders: Boolean read GetShowHeaders; - property ShowPreview: Boolean read GetShowPreview; - end; - - TdxGridTableViewBuilder = class(TdxCustomGridTableViewBuilder) - private - function GetLastReportRow: TdxReportCell; - function GetProcessedView: TcxCustomGridView; - procedure SetProcessedView(Value: TcxCustomGridView); - protected - procedure AddDelimitersHardVert(AReportRow: TdxReportCell); - - procedure DoBuildViewBody; override; - procedure DoBuildViewFooter; override; - - { Details View } - procedure CreateDetails(AMasterRow: TcxGridMasterDataRow); virtual; - procedure CreateDetailView(AGridView: TcxCustomGridView); virtual; - function GetAreDetailsBuilt: Boolean; virtual; - - { Footer } - procedure CreateFooter; virtual; - function GetFootersProducer: TdxGridTableViewFootersProducer; virtual; - function GetFootersProducerClass: TdxGridTableViewFootersProducerClass; virtual; - - { Group Footer } - procedure CreateGroupFooters(AGridRow: TcxCustomGridRow); virtual; - function GetGroupFooterProducer: TdxGridTableViewGroupFooterProducer; virtual; - function GetGroupFooterProducerClass: TdxGridTableViewGroupFooterProducerClass; virtual; - - { Header } - procedure CreateHeader; virtual; - function GetHeadersProducer: TdxGridTableViewHeadersProducer; virtual; - function GetHeadersProducerClass: TdxGridTableViewHeadersProducerClass; virtual; - - { Rows } - procedure CreateRow(AGridRow: TcxCustomGridRow; ARowIndex: Integer); virtual; - procedure CreateRows; virtual; - function GetRowProducer(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducer; virtual; - function GetRowProducerClass(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducerClass; virtual; - - { Row Separators } - procedure CreateRowSeparator(AGridRow: TcxCustomGridRow; AnIsLast: Boolean = False); virtual; - function GetRowSeparatorProducer: TdxGridTableViewRowSeparatorProducer; virtual; - function GetRowSeparatorProducerClass: TdxGridTableViewRowSeparatorProducerClass; virtual; - function GetShowRowSeparators: Boolean; virtual; - - { GroupRow Separators } - procedure CreateGroupRowSeparator(AGridRow: TcxGridGroupRow); virtual; - function GetGroupRowSeparatorProducer: TdxGridTableViewGroupRowSeparatorProducer; virtual; - function GetGroupRowSeparatorProducerClass: TdxGridTableViewGroupRowSeparatorProducerClass; virtual; - function GetShowGroupRowSeparators: Boolean; virtual; - - function GridView: TcxGridTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - - property LastReportRow: TdxReportCell read GetLastReportRow; - property ProcessedView: TcxCustomGridView read GetProcessedView write SetProcessedView; - public - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxGridTableViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - - property AreDetailsBuilt: Boolean read GetAreDetailsBuilt; - property ShowGroupRowSeparators: Boolean read GetShowGroupRowSeparators; - property ShowRowSeparators: Boolean read GetShowRowSeparators; - end; - - { DBTableView Adapter, Formatter and Builder } - - TdxGridDBTableViewAdapter = class(TdxGridTableViewAdapter) - private - FPrevAllRecordsAreLoaded: Boolean; - protected - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - function DataController: TcxGridDBDataController; reintroduce; overload; - - function DBDataModeController: TcxDBDataModeController; virtual; - procedure LoadAllRecords; virtual; - procedure UnloadAllRecords; virtual; - public - function GridView: TcxGridDBTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - end; - - TdxGridDBTableViewBuilder = class(TdxGridTableViewBuilder) - public - function Adapter: TdxGridDBTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - end; - - { BandedTableView Adapter, Formatter and Builder } - - TdxGridBandedTableViewAdapter = class(TdxGridTableViewAdapter) - private - FFooterLineCount: Integer; - function GetBand(Index: Integer): TcxGridBand; - function GetBandCount: Integer; - function GetBandEndEllipsis: Boolean; - function GetBandHeaderLineCount: Integer; - function GetBandHeaderMultiline: Boolean; - function GetBottomBand(Index: Integer): TcxGridBand; - function GetBottomBandCount: Integer; - function GetColumn(Index: Integer): TcxGridBandedColumn; - function GetFooterLineCount: Integer; - function GetRootBand(Index: Integer): TcxGridBand; - function GetRootBandCount: Integer; - function GetThemedBandHeaderItemColor: TColor; - function GetThemedBandHeaderItemTextColor: TColor; - protected - function CalculateDetailsLineCount: Integer; override; - function CalculateFooterLineCount: Integer; virtual; - - function GetBandHeaderHeight: Integer; virtual; - function GetBandHeaderHeightAssigned: Boolean; virtual; - function GetBandHeaderViewParams(ABand: TcxGridBand): TcxViewParams; virtual; - function GetDataRowHeightAssigned: Boolean; override; - function GetFooterHeightAssigned: Boolean; override; - function GetHeaderHeightAssigned: Boolean; override; - function GetHeaderMultiline(Column: TcxGridColumn): Boolean; override; - public - constructor Create(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView); override; - - function GridView: TcxGridBandedTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxGridBandedTableViewStyles; reintroduce; overload; - - property BandCount: Integer read GetBandCount; - property BandEndEllipsis: Boolean read GetBandEndEllipsis; - property BandHeaderHeight: Integer read GetBandHeaderHeight; - property BandHeaderHeightAssigned: Boolean read GetBandHeaderHeightAssigned; - property BandHeaderLineCount: Integer read GetBandHeaderLineCount; - property BandHeaderMultiline: Boolean read GetBandHeaderMultiline; - property Bands[Index: Integer]: TcxGridBand read GetBand; - property BottomBandCount: Integer read GetBottomBandCount; - property BottomBands[Index: Integer]: TcxGridBand read GetBottomBand; - property Columns[Index: Integer]: TcxGridBandedColumn read GetColumn; - property FooterLineCount: Integer read GetFooterLineCount write FFooterLineCount; - property RootBandCount: Integer read GetRootBandCount; - property RootBands[Index: Integer]: TcxGridBand read GetRootBand; - property ThemedBandHeaderItemColor: TColor read GetThemedBandHeaderItemColor; - property ThemedBandHeaderItemTextColor: TColor read GetThemedBandHeaderItemTextColor; - end; - - TdxGridBandedTableViewColumnPlace = class(TdxGridTableViewColumnPlace) - private - function GetColumn: TcxGridBandedColumn; - function GetController: TdxCustomGridBandedTableViewItemPlace; - function GetFormatter: TdxGridBandedTableViewFormatter; - protected - function GetLineCount: Integer; override; - function GetRowIndex: Integer; override; - public - property Column: TcxGridBandedColumn read GetColumn; - property Controller: TdxCustomGridBandedTableViewItemPlace read GetController; - property Formatter: TdxGridBandedTableViewFormatter read GetFormatter; - end; - - TdxCustomGridBandedTableViewItemPlaceClass = class of TdxCustomGridBandedTableViewItemPlace; - - TdxCustomGridBandedTableViewItemPlace = class(TdxGridTableViewColumnPlaceController) - private - FBand: TcxGridBand; - FController: TdxGridBandedTableViewItemPlaceController; - FHeight: Integer; - FLeftBound: Integer; - FMinWidth: Integer; - FParent: TdxGridBandedTableViewItemPlace; - FTopBound: Integer; - function GetAdapter: TdxGridBandedTableViewAdapter; - function GetBounds: TRect; - function GetFormatter: TdxGridBandedTableViewFormatter; - function GetHeight: Integer; - function GetIndex: Integer; - function GetIsFixed: Boolean; - function GetLeftBound: Integer; - function GetLevelIndex: Integer; - function GetMinWidth: Integer; - function GetTopBound: Integer; - function GetViewParams: TdxReportItemViewParams; - protected - function CalculateHeaderLineCount: Integer; override; - function CalculateWidth: Integer; override; - function GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; override; - - procedure AssignWidth; - function CalculateHeight: Integer; virtual; - function CalculateLeftBound: Integer; virtual; - function CalculateLevelHeight: Integer; virtual; - function CalculateLineHeight: Integer; virtual; - function CalculateMinWidth: Integer; virtual; - function CalculateTopBound: Integer; virtual; - procedure InitAutoWidthItem(AnItem: TcxAutoWidthItem); virtual; - - function GetRowCount: Integer; virtual; - function InternalCalculateMinWidth: Integer; virtual; - function InternalCalculateWidth: Integer; virtual; - - property Adapter: TdxGridBandedTableViewAdapter read GetAdapter; - property Band: TcxGridBand read FBand; - property IsFixed: Boolean read GetIsFixed; - property LevelIndex: Integer read GetLevelIndex; - property MinWidth: Integer read GetMinWidth; - property RowCount: Integer read GetRowCount; - property ViewParams: TdxReportItemViewParams read GetViewParams; - public - constructor Create(AController: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); reintroduce; virtual; - - property Bounds: TRect read GetBounds; - property Controller: TdxGridBandedTableViewItemPlaceController read FController; - property Formatter: TdxGridBandedTableViewFormatter read GetFormatter; - property Height: Integer read GetHeight write FHeight; - property Index: Integer read GetIndex; - property LeftBound: Integer read GetLeftBound write FLeftBound; - property Parent: TdxGridBandedTableViewItemPlace read FParent; - property TopBound: Integer read GetTopBound write FTopBound; - end; - - TdxGridBandedTableViewItemPlace = class(TdxCustomGridBandedTableViewItemPlace) - private - FChildItems: TList; - function GetChildItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetChildItemCount: Integer; - protected - function GetRowCount: Integer; override; - function InternalCalculateMinWidth: Integer; override; - function InternalCalculateWidth: Integer; override; - procedure WidthChanged; override; - - procedure CalculateChildItemWidths; - {$IFDEF DXVER500} - procedure RefreshChildItems; - {$ENDIF} - public - constructor Create(AnOwner: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); override; - destructor Destroy; override; - - function IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; - {$IFDEF DXVER500} - procedure Refresh; override; - {$ENDIF} - - property ChildItemCount: Integer read GetChildItemCount; - property ChildItems[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetChildItem; - end; - - TdxGridBandedTableViewBottomItemPlace = class(TdxCustomGridBandedTableViewItemPlace) - protected - procedure AddItems; override; - function CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; override; - procedure CalculateItemsWidth; override; - function GetItemsAutoWidth: Boolean; override; - function GetItemsAvailableWidth: Integer; override; - - function GetRowCount: Integer; override; - function InternalCalculateMinWidth: Integer; override; - function InternalCalculateWidth: Integer; override; - procedure WidthChanged; override; - end; - - TdxGridBandedTableViewItemPlaceController = class(TdxCustomGridTableViewItemPlaceController) - private - FBottomItems: TList; - FHeight: Integer; - FItems: TList; - FLevelCount: Integer; - FLevelHeights: TList; - FRootItems: TList; - function GetAdapter: TdxGridBandedTableViewAdapter; - function GetAutoWidth: Boolean; - function GetAvailableWidth: Integer; - function GetBottomItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetBottomItemCount: Integer; - function GetFormatter: TdxGridBandedTableViewFormatter; - function GetHeight: Integer; - function GetItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetItemByBand(Band: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; - function GetItemCount: Integer; - function GetLevelCount: Integer; - function GetLevelHeight(Index: Integer): Integer; - function GetRootItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; - function GetRootItemCount: Integer; - procedure SetLevelHeight(Index: Integer; Value: Integer); - procedure FreeAndNilItems; - protected - function CalculateHeaderLineCount: Integer; override; - function CalculateWidth: Integer; override; - function GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; override; - - procedure AddItems; virtual; - procedure ClearItems; - function CreateItem(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; virtual; - function GetItemClass(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlaceClass; virtual; - procedure RefreshBottomItems; - procedure RefreshItems; - procedure RefreshRootItems; - - function CalculateHeight: Integer; virtual; - function CalculateItemHeight(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; virtual; - function CalculateItemLeftBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; virtual; - function CalculateItemTopBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; virtual; - function CalculateLevelCount: Integer; virtual; - - procedure CalculateItemWidths; - procedure CalculateLevelHeights; - - property AutoWidth: Boolean read GetAutoWidth; - property Adapter: TdxGridBandedTableViewAdapter read GetAdapter; - property AvailableWidth: Integer read GetAvailableWidth; - public - constructor Create(AFormatter: TdxGridTableViewFormatter); override; - destructor Destroy; override; - - procedure Calculate; override; - procedure Refresh; override; - - function IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; overload; - function IndexOf(ABand: TcxGridBand): Integer; overload; - function RootIndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; overload; - function RootIndexOf(ABand: TcxGridBand): Integer; overload; - - property BottomItemCount: Integer read GetBottomItemCount; - property BottomItems[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetBottomItem; - property Formatter: TdxGridBandedTableViewFormatter read GetFormatter; - property Height: Integer read GetHeight; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetItem; default; - property ItemsByBand[Band: TcxGridBand]: TdxCustomGridBandedTableViewItemPlace read GetItemByBand; - property LevelCount: Integer read GetLevelCount; - property LevelHeights[Index: Integer]: Integer read GetLevelHeight write SetLevelHeight; - property RootItemCount: Integer read GetRootItemCount; - property RootItems[Index: Integer]: TdxCustomGridBandedTableViewItemPlace read GetRootItem; - end; - - TdxGridBandedTableViewFormatter = class(TdxGridTableViewFormatter) - private - FBands: TList; - function GetBand(Index: Integer): TcxGridBand; - function GetBandCount: Integer; - function GetColumn(Index: Integer): TcxGridBandedColumn; - function GetItemPlaceController: TdxGridBandedTableViewItemPlaceController; - function GetShowBandHeaders: Boolean; - protected - procedure AddHorizontalDelimiters; override; - - {$IFDEF DXVER500} - function CanColumnCellMerging(AColumn: TcxGridColumn): Boolean; override; - function IsColumnActuallyVisible(AColumn: TcxGridColumn): Boolean; override; - {$ENDIF} - function GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; override; - - procedure BuildBandList; virtual; - procedure BuildItemLists; override; - function IsBandActuallyVisible(ABand: TcxGridBand): Boolean; virtual; - - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - property ItemPlaceController: TdxGridBandedTableViewItemPlaceController read GetItemPlaceController; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Adapter: TdxGridBandedTableViewAdapter; reintroduce; overload; - function Builder: TdxGridBandedTableViewBuilder; reintroduce; overload; - - { Bands } - procedure DoInitializeBandItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeBandRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeBandItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - function GetBandItemBounds(AnIndex: Integer): TRect; virtual; - function GetBandItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetBandItemViewParams(ABand: TcxGridBand): TdxReportItemViewParams; virtual; - - property BandCount: Integer read GetBandCount; - property Bands[Index: Integer]: TcxGridBand read GetBand; - property Columns[Index: Integer]: TcxGridBandedColumn read GetColumn; - property ShowBandHeaders: Boolean read GetShowBandHeaders; - end; - - TdxGridBandedTableViewBuilder = class(TdxGridTableViewBuilder) - protected - procedure DoBuildViewBody; override; - - procedure CreateBands; virtual; - function GetBandsProducer: TdxGridTableViewBandsProducer; virtual; - function GetBandsProducerClass: TdxGridTableViewBandsProducerClass; virtual; - - function GridView: TcxGridBandedTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - public - function Adapter: TdxGridBandedTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxGridBandedTableViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - end; - - { DBBandedTableView Adapter, Formatter and Builder } - - TdxGridDBBandedTableViewAdapter = class(TdxGridBandedTableViewAdapter) - private - FPrevAllRecordsAreLoaded: Boolean; - protected - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - function DataController: TcxGridDBDataController; reintroduce; overload; - - function DBDataModeController: TcxDBDataModeController; virtual; - procedure LoadAllRecords; virtual; - procedure UnloadAllRecords; virtual; - public - function GridView: TcxGridDBBandedTableView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - end; - - TdxGridDBBandedTableViewBuilder = class(TdxGridBandedTableViewBuilder) - public - function Adapter: TdxGridDBBandedTableViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - end; - - { CardView Adapter, Formatter and Builder } - - TdxReportCard = class; - - TdxReportCardRowClass = class of TdxReportCardRow; - - TdxReportCardRow = class(TdxReportCell) - private - function GetCard: TdxReportCard; - function GetGridCardRow: TcxGridCardViewRow; - function GetHasCaption: Boolean; - function GetHeight: Integer; - function GetProperties: TcxCustomEditProperties; - function GetRowCaption: TdxReportCellText; - function GetRowData: TAbstractdxReportCellData; - function GetWidth: Integer; - procedure SetHeight(Value: Integer); - procedure SetRowCaptionWidth(Value: Integer); - procedure SetWidth(Value: Integer); - protected - procedure AdjustCellSides; virtual; - procedure CreateItems(ABuilder: TdxGridCardViewBuilder); virtual; - function MeasureCaptionWidth(DC: HDC): Integer; - function MeasureDataWidth(DC: HDC): Integer; - property Properties: TcxCustomEditProperties read GetProperties; - public - constructor CreateEx(AParent: TdxReportCell; AGridCardRow: TcxGridCardViewRow); virtual; - - function MeasureHeight(DC: HDC; ACalculateLineHeight: Boolean; - ABuilder: TdxGridCardViewBuilder): Integer; reintroduce; overload; - - property Card: TdxReportCard read GetCard; - property GridCardRow: TcxGridCardViewRow read GetGridCardRow; - property HasCaption: Boolean read GetHasCaption; - property Height: Integer read GetHeight write SetHeight; - property RowCaption: TdxReportCellText read GetRowCaption; - property RowCaptionWidth: Integer write SetRowCaptionWidth; - property RowData: TAbstractdxReportCellData read GetRowData; - property Width: Integer read GetWidth write SetWidth; - end; - - TdxCardBorderPainter = class(TdxPSCellBorderPainter) - protected - procedure DrawShadow(DC: HDC); virtual; - public - procedure Paint(DC: HDC); override; - function Card: TdxReportCard; reintroduce; overload; - end; - - TdxGridCardShadowDepth = 0..15; - TdxGridCardShadowPosition = (cspTopLeft, cspTopRight, cspBottomRight, cspBottomLeft); - - TdxReportCard = class(TdxReportCell) - private - FRowCaptionWidth: Integer; - FShadowColor: TColor; - FShadowDepth: Integer; - FShadowPosition: TdxGridCardShadowPosition; - function GetGridCard: TcxGridCard; - function GetHasShadow: Boolean; - function GetHeight: Integer; - function GetReportLink: TdxGridReportLink; - function GetRow(Index: Integer): TdxReportCardRow; - function GetRowByCardRow(CardRow: TcxGridCardViewRow): TdxReportCardRow; - function GetRowCount: Integer; - function GetRowHeight(Index: Integer): Integer; - function GetRowsAvailableHeight: Integer; - function GetRowsAvailableWidth: Integer; - function GetRowsOriginLeft: Integer; - function GetRowsOriginTop: Integer; - function GetShadowRectHorz: TRect; - function GetShadowRectVert: TRect; - function GetWidth: Integer; - procedure SetHeight(Value: Integer); - procedure SetRowCaptionWidth(Value: Integer); - procedure SetRowHeight(Index, Value: Integer); - procedure SetShadowDepth2(Value: Integer); - procedure SetWidth(Value: Integer); - protected - procedure AddVerticalDelimiters; virtual; - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - procedure CreateRows(ABuilder: TdxGridCardViewBuilder); virtual; - function GetBorderPainterClass: TdxPSCellBorderPainterClass; override; - procedure ReadProperties(AReader: TdxPSDataReader); override; - procedure WriteProperties(AWriter: TdxPSDataWriter); override; - - procedure AdjustHeight; - procedure AdjustRowsCellSides; - procedure AdjustRowsPos; - procedure AdjustRowsHeight(DC: HDC; AAutoHeight: Boolean; ABuilder: TdxGridCardViewBuilder); - procedure AdjustRowsWidth(DC: HDC); - function MeasureCaptionWidth(DC: HDC): Integer; virtual; - function MeasureDataWidth(DC: HDC): Integer; virtual; - - property ReportLink: TdxGridReportLink read GetReportLink; - public - constructor Create(AParent: TdxReportCell); override; - constructor CreateEx(AParent: TdxReportCell; AGridCard: TcxGridCard); virtual; - - function GetBorderOuterBounds(DC: HDC): TRect; override; - function IndexOfCardRow(ACardRow: TcxGridCardViewRow): Integer; - - property GridCard: TcxGridCard read GetGridCard; - property HasShadow: Boolean read GetHasShadow; - property Height: Integer read GetHeight write SetHeight; - property RowCaptionWidth: Integer read FRowCaptionWidth write SetRowCaptionWidth; - property RowCount: Integer read GetRowCount; - property RowHeights[Index: Integer]: Integer read GetRowHeight write SetRowHeight; - property Rows[Index: Integer]: TdxReportCardRow read GetRow; - property RowsAvailableHeight: Integer read GetRowsAvailableHeight; - property RowsAvailableWidth: Integer read GetRowsAvailableWidth; - property RowsByCardRow[CardRow: TcxGridCardViewRow]: TdxReportCardRow read GetRowByCardRow; - property RowsOriginLeft: Integer read GetRowsOriginLeft; - property RowsOriginTop: Integer read GetRowsOriginTop; - property ShadowColor: TColor read FShadowColor write FShadowColor default clBlack; - property ShadowDepth: Integer read FShadowDepth write SetShadowDepth2 default dxDefaultCardsShadowDepth; - property ShadowRectHorz: TRect read GetShadowRectHorz; - property ShadowRectVert: TRect read GetShadowRectVert; - property ShadowPosition: TdxGridCardShadowPosition read FShadowPosition write FShadowPosition default cspBottomRight; - property Width: Integer read GetWidth write SetWidth; - end; - - TdxReportCardClass = class of TdxReportCard; - - TdxGridCardViewAdapter = class(TdxCustomGridTableViewAdapter) - private - function GetCaptionSeparator: string; - function GetCard(Index: Integer): TcxGridCard; - function GetCardCaptionWidth: Integer; - function GetCardCount: Integer; - function GetCardRow(Index: Integer): TcxGridCardViewRow; - function GetCardRowCount: Integer; - function GetCardSeparatorColor: Integer; - function GetCardSeparatorThickness: Integer; - function GetCardWidth: Integer; - function GetHasCardsSeparator: Boolean; - function GetRowAutoHeight: Boolean; - function GetRowCaptionAutoHeight: Boolean; - function GetRowCaptionEndEllipsis: Boolean; - function GetShowRowCaption(Index: Integer): Boolean; - protected - function GetAreAllMasterRowsCollapsed: Boolean; override; - - function GetCaptionRowViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; virtual; - function GetCardViewParams(ARecord: TcxCustomGridRecord): TcxViewParams; virtual; - function GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; override; - function GetRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; virtual; - public - function GridView: TcxGridCardView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - function Styles: TcxGridCardViewStyles; reintroduce; overload; - - procedure GetVisibleCardRows(ACard: TcxGridCard; AList: TList); - procedure ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; ARecursive: Boolean); override; - function IsFirstRow(ACardRow: TcxGridCardViewRow): Boolean; - function IsLastRow(ACardRow: TcxGridCardViewRow): Boolean; - - property CaptionSeparator: string read GetCaptionSeparator; - property CardCaptionWidth: Integer read GetCardCaptionWidth; - property CardCount: Integer read GetCardCount; - property CardRowCount: Integer read GetCardRowCount; - property CardRows[Index: Integer]: TcxGridCardViewRow read GetCardRow; - property Cards[Index: Integer]: TcxGridCard read GetCard; - property CardSeparatorColor: Integer read GetCardSeparatorColor; - property CardSeparatorThickness: Integer read GetCardSeparatorThickness; - property CardWidth: Integer read GetCardWidth; - property HasCardsSeparator: Boolean read GetHasCardsSeparator; - property RowCaptionAutoHeight: Boolean read GetRowCaptionAutoHeight; - property RowCaptionEndEllipsis: Boolean read GetRowCaptionEndEllipsis; - property RowAutoHeight: Boolean read GetRowAutoHeight; - property ShowRowCaption[Index: Integer]: Boolean read GetShowRowCaption; - end; - - TdxGridCardViewFormatter = class(TdxCustomGridTableViewFormatter) - private - function GetAutoWidth: Boolean; - function GetCaptionAutoWidth: Boolean; - function GetCard(Index: Integer): TcxGridCard; - function GetCardCount: Integer; - function GetCardsAreaWidth: Integer; - function GetInterCardsSpaceHorz: Integer; - function GetInterCardsSpaceVert: Integer; - function GetKeepSameHeight: Boolean; - function GetKeepSameWidth: Boolean; - function GetRowAutoHeight: Boolean; - protected - procedure AddHorizontalDelimiters; override; - procedure AddVerticalDelimiters; override; - function GetViewWidth: Integer; override; - - function GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; override; - function MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; override; - - function NeedDelimitByRows: Boolean; virtual; - public - function Adapter: TdxGridCardViewAdapter; reintroduce; overload; - function Builder: TdxGridCardViewBuilder; reintroduce; overload; - - { Cards } - procedure DoInitializeCard(ACard: TdxReportCard; AGridCard: TcxGridCard); virtual; - procedure DoInitializeCardsRow(ACard: TdxReportCell); virtual; - function GetCardClass(AGridCard: TcxGridCard): TdxReportCardClass; virtual; - function GetCardViewParams(ARecord: TcxCustomGridRecord): TdxReportItemViewParams; virtual; - - { Cards Caption } - procedure DoInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); virtual; - procedure DoReportLinkInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); virtual; - function GetCardRowCaptionClass(ACardRow: TcxGridCardViewRow): TdxReportCellTextClass; virtual; - function GetCardRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TdxReportItemViewParams; virtual; - - { Cards Data } - procedure DoReportLinkInitializeCardRowData(AnItem: TAbstractdxReportCellData; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); virtual; - function GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; override; - - property AutoWidth: Boolean read GetAutoWidth; - property CaptionAutoWidth: Boolean read GetCaptionAutoWidth; - property CardCount: Integer read GetCardCount; - property Cards[Index: Integer]: TcxGridCard read GetCard; - property CardsAreaWidth: Integer read GetCardsAreaWidth; - property InterCardsSpaceHorz: Integer read GetInterCardsSpaceHorz; - property InterCardsSpaceVert: Integer read GetInterCardsSpaceVert; - property KeepSameHeight: Boolean read GetKeepSameHeight; - property KeepSameWidth: Boolean read GetKeepSameWidth; - property RowAutoHeight: Boolean read GetRowAutoHeight; - end; - - TdxGridCardViewBuilder = class(TdxCustomGridTableViewBuilder) - private - FCards: TList; - FMaxCardWidth: Integer; - function GetCard(Index: Integer): TdxReportCard; - function GetCardCount: Integer; - - procedure AdjustCardRowsCellSides; - procedure CreateCards; - procedure ResizeCards; - protected - procedure DoBuildViewBody; override; - - function GetCardsRowProducer: TdxGridCardViewCardsRowProducer; virtual; - function GetCardsRowProducerClass: TdxGridCardViewCardsRowProducerClass; virtual; - procedure PlaceCards; virtual; - - function GridView: TcxGridCardView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - - property CardCount: Integer read GetCardCount; - property Cards[Index: Integer]: TdxReportCard read GetCard; - public - constructor Create(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); override; - destructor Destroy; override; - - function Adapter: TdxGridCardViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxGridCardViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - - property MaxCardWidth: Integer read FMaxCardWidth; - end; - - { DBCardView Adapter, Formatter and Builder } - - TdxGridDBCardViewAdapter = class(TdxGridCardViewAdapter) - private - FPrevAllRecordsAreLoaded: Boolean; - protected - procedure AfterBuilding; override; - procedure BeforeBuilding; override; - function DataController: TcxGridDBDataController; reintroduce; overload; - - function DBDataModeController: TcxDBDataModeController; virtual; - procedure LoadAllRecords; virtual; - procedure UnloadAllRecords; virtual; - public - function GridView: TcxGridDBCardView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - end; - - TdxGridDBCardViewBuilder = class(TdxGridCardViewBuilder) - public - function Adapter: TdxGridDBCardViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - end; - -{$IFDEF CHARTVIEW} - { ChartView Adapter, Formatter and Builder } - - TdxGridChartViewAdapter = class(TdxCustomGridViewAdapter) - protected - function CreateGraphic(AGraphicClass: TGraphicClass; AWidth: Integer): TGraphic; - function GetCanUseOnEveryPageMode: Boolean; override; - public - function GridView: TcxGridChartView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - end; - - TdxGridChartViewFormatter = class(TdxCustomGridViewFormatter) - private - function GetGraphicClass: TGraphicClass; - function GetGraphicTransparent: Boolean; - protected - function CreateChartImage: TGraphic; virtual; - procedure DoInitializeChartItem(AnItem: TdxReportCellGraphic); virtual; - procedure DoReportLinkInitializeChartItem(AnItem: TdxReportCellGraphic); virtual; - function GetChartItemClass: TdxReportCellGraphicClass; - function GetViewWidth: Integer; override; - public - function Adapter: TdxGridChartViewAdapter; reintroduce; overload; - function Builder: TdxGridChartViewBuilder; reintroduce; overload; - - property GraphicClass: TGraphicClass read GetGraphicClass; - property GraphicTransparent: Boolean read GetGraphicTransparent; - end; - - TdxGridChartViewBuilder = class(TdxCustomGridViewBuilder) - protected - function GetChartProducer: TdxGridChartViewChartProducer; virtual; - function GetChartProducerClass: TdxGridChartViewChartProducerClass; virtual; - procedure CreateChart; virtual; - procedure DoBuildViewBody; override; - - function GridView: TcxGridChartView; reintroduce; overload; - class function GridViewClass: TcxCustomGridViewClass; override; - public - function Adapter: TdxGridChartViewAdapter; reintroduce; overload; - class function AdapterClass: TdxGridViewAdapterClass; override; - function Formatter: TdxGridChartViewFormatter; reintroduce; overload; - class function FormatterClass: TdxGridViewFormatterClass; override; - end; -{$ENDIF} - - { Producers } - - TdxGridViewRowProducer = class - private - FBuilder: TdxCustomGridViewBuilder; - FHost: TdxReportCell; - FMasterIndents: TList; - FRow: TdxReportCell; - FRowHeight: Integer; - function GetDC: HDC; - function GetHostClass: TdxReportCellClass; - function GetIndentWidth: Integer; - function GetMasterBuilder(Index: Integer): TdxCustomGridViewBuilder; - function GetMasterIndent(Index: Integer): TdxReportCellBox; - function GetMasterIndentCount: Integer; - function GetRowHostClass: TdxReportCellClass; - function GetRowOriginX: Integer; - function GetRowWidth: Integer; - protected - procedure AddLeadingMasterIndentsAndSeparators; virtual; - procedure AddMasterIndents(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; ALevel: Integer; var ALeftPos: Integer); - procedure AddMasterSeparator(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; var ALeftPos: Integer; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); - procedure AddTrailingMasterSeparators; virtual; - function CalculateItemHeight(DC: HDC; AnItem: TdxReportVisualItem): Integer; virtual; - procedure CalculateRowAutoHeight; virtual; - procedure CalculateRowHeight; virtual; - function CreateDetailsSeparator(AParent: TdxReportCell): TdxReportCellBox; virtual; - function CreateMasterIndent(AParent: TdxReportCell): TdxReportCellExpandButton; virtual; - procedure CreateRow; virtual; - procedure CreateRowHost(const AHostInfo: TdxGridAttributeHostInfo); virtual; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; virtual; - function GetDetailsSeparatorClass: TdxReportCellBoxClass; virtual; - function GetMasterIndentClass: TdxReportCellExpandButtonClass; virtual; - procedure FixupMasterIndentsHeight; virtual; - procedure FixupRowDataItemHeight(AnItem: TdxReportVisualItem); virtual; - procedure FixupRowDataHeight; virtual; - procedure FixupRowHeight; virtual; - procedure FixupRowOwnHeight; virtual; - procedure InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); virtual; - procedure InitializeMasterIndent(AFormatter: TdxCustomGridViewFormatter; - AIndent: TdxReportCellExpandButton; AIndex, ALevel: Integer); virtual; - procedure InitializeHost; virtual; - procedure InitializeRow; virtual; - - function GetAutoHeight: Boolean; virtual; - function GetItemsSite: TdxReportCell; virtual; - function GetLineCount: Integer; virtual; - function GetLineHeight: Integer; virtual; - function GetWidth: Integer; virtual; - - property DC: HDC read GetDC; - property HostClass: TdxReportCellClass read GetHostClass; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); virtual; - destructor Destroy; override; - - function Adapter: TdxCustomGridViewAdapter; overload; virtual; - function Builder: TdxCustomGridViewBuilder; overload; virtual; - function Formatter: TdxCustomGridViewFormatter; overload; virtual; - - function Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; virtual; - - property AutoHeight: Boolean read GetAutoHeight; - property Host: TdxReportCell read FHost; - property IndentWidth: Integer read GetIndentWidth; - property ItemsSite: TdxReportCell read GetItemsSite; - property LineCount: Integer read GetLineCount; - property LineHeight: Integer read GetLineHeight; - property MasterBuilders[Index: Integer]: TdxCustomGridViewBuilder read GetMasterBuilder; - property MasterIndentCount: Integer read GetMasterIndentCount; - property MasterIndents[Index: Integer]: TdxReportCellBox read GetMasterIndent; - property Row: TdxReportCell read FRow; - property RowHeight: Integer read FRowHeight write FRowHeight; - property RowOriginX: Integer read GetRowOriginX; - property RowWidth: Integer read GetRowWidth; - property Width: Integer read GetWidth; - end; - - TdxGridViewCustomRowProducer = class(TdxGridViewRowProducer) - private - FItem: TAbstractdxReportCellData; - protected - procedure AddItem; virtual; - function CreateItem(AParent: TdxReportCell): TAbstractdxReportCellData; virtual; - procedure FixupRowDataHeight; override; - procedure InitializeItem; virtual; - - function GetAutoHeight: Boolean; override; - function GetItemClass: TdxReportCellDataClass; virtual; - - property Item: TAbstractdxReportCellData read FItem; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; override; - end; - - TdxGridViewCaptionProducer = class(TdxGridViewCustomRowProducer) - private - function GetItem: TdxReportCellText; - protected - procedure InitializeItem; override; - procedure InitializeRow; override; - - function GetItemClass: TdxReportCellDataClass; override; - function GetLineHeight: Integer; override; - public - property Item: TdxReportCellText read GetItem; - end; - - TdxGridViewFilterBarProducer = class(TdxGridViewCustomRowProducer) - private - function GetItem: TdxReportCellText; - protected - procedure InitializeItem; override; - procedure InitializeRow; override; - - function GetItemClass: TdxReportCellDataClass; override; - function GetLineHeight: Integer; override; - public - property Item: TdxReportCellText read GetItem; - end; - - TdxGridViewDetailsSeparatorProducer = class(TdxGridViewCustomRowProducer) - private - function GetItem: TdxReportCellBox; - protected - procedure InitializeItem; override; - procedure InitializeRow; override; - - function GetItemClass: TdxReportCellDataClass; override; - function GetLineHeight: Integer; override; - public - property Item: TdxReportCellBox read GetItem; - end; - - TdxGridViewDetailsTopSeparatorProducer = class(TdxGridViewDetailsSeparatorProducer) - protected - procedure InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); override; - end; - - TdxGridViewDetailsBottomSeparatorProducer = class(TdxGridViewDetailsSeparatorProducer) - protected - procedure InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); override; - end; - - TdxGridViewTerminatorProducer = class(TdxGridViewDetailsSeparatorProducer) - protected - procedure InitializeItem; override; - function GetLineHeight: Integer; override; - end; - - TdxGridTableViewRowProducer = class(TdxGridViewRowProducer) - public - function Adapter: TdxGridTableViewAdapter; reintroduce; overload; - function Builder: TdxGridTableViewBuilder; reintroduce; overload; - function Formatter: TdxGridTableViewFormatter; reintroduce; overload; - end; - - TdxGridTableViewRowSubItemsProducer = class(TdxGridTableViewRowProducer) - private - FIndents: TList; - FSubItems: TList; - function GetColumn(Index: Integer): TcxGridColumn; - function GetIndent(Index: Integer): TdxReportCellExpandButton; - function GetSubItem(Index: Integer): TdxReportVisualItem; - protected - procedure AddIndents(AParent: TdxReportCell); virtual; - procedure AddSubItems(AParent: TdxReportCell); virtual; - procedure CreateRow; override; - function CreateSubItem(AnIndex: Integer; AParent: TdxReportCell): TAbstractdxReportCellData; - function IsItemIndent(AnItem: TdxReportVisualItem): Boolean; - - procedure FixupIndentsHeight; virtual; - procedure FixupRowDataHeight; override; - procedure FixupRowHeight; override; - - procedure InitializeIndentList; virtual; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); virtual; - procedure InitializeSubItemList; virtual; - - function GetHasSubItem(Index: Integer): Boolean; virtual; - function GetIndentCount: Integer; virtual; - function GetSubItemBound(Index: Integer): TRect; virtual; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; virtual; abstract; - function GetSubItemCount: Integer; virtual; - public - constructor Create(ABuilder: TdxCustomGridViewBuilder); override; - destructor Destroy; override; - - function Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; override; - - property Columns[Index: Integer]: TcxGridColumn read GetColumn; - property HasSubItem[Index: Integer]: Boolean read GetHasSubItem; - property IndentCount: Integer read GetIndentCount; - property Indents[Index: Integer]: TdxReportCellExpandButton read GetIndent; - property SubItemBounds[Index: Integer]: TRect read GetSubItemBound; - property SubItemClasses[Index: Integer]: TdxReportCellDataClass read GetSubItemClass; - property SubItemCount: Integer read GetSubItemCount; - property SubItems[Index: Integer]: TdxReportVisualItem read GetSubItem; default; - end; - - TdxGridTableViewHeadersProducer = class(TdxGridTableViewRowSubItemsProducer) - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - end; - - TdxGridTableViewFootersProducer = class(TdxGridTableViewRowSubItemsProducer) - protected - procedure CalculateRowAutoHeight; override; - procedure CalculateRowHeight; override; - procedure FixupRowDataItemHeight(AnItem: TdxReportVisualItem); override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetHasSubItem(Index: Integer): Boolean; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - end; - - TdxGridTableViewCustomDataRowProducer = class(TdxGridTableViewRowSubItemsProducer) - private - FGridRow: TcxCustomGridRow; - FGridRowIndex: Integer; - function GetIndentArea: Integer; - function GetIndentBounds(Index: Integer): TRect; - protected - procedure AddIndents(AParent: TdxReportCell); override; - function CreateIndent(AnIndex: Integer; AParent: TdxReportCell): TdxReportCellExpandButton; virtual; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); virtual; - - function GetIndentCount: Integer; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - public - function GridRow: TcxCustomGridRow; overload; virtual; - function Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AGridRowIndex: Integer): TdxReportCell; reintroduce; virtual; - - property GridRowIndex: Integer read FGridRowIndex; - property IndentArea: Integer read GetIndentArea; - property IndentBounds[Index: Integer]: TRect read GetIndentBounds; - end; - - TdxCustomGridTableViewRowSeparatorProducer = class(TdxGridTableViewCustomDataRowProducer) - protected - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetSubItemCount: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow): TdxReportCell; reintroduce; virtual; - end; - - TdxGridTableViewRowSeparatorProducer = class(TdxCustomGridTableViewRowSeparatorProducer) - private - FIsLast: Boolean; - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetIndentCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo; AGridRow: TcxCustomGridRow; - AnIsLast: Boolean): TdxReportCell; reintroduce; virtual; - property IsLast: Boolean read FIsLast; - end; - - TdxGridTableViewGroupRowSeparatorProducer = class(TdxCustomGridTableViewRowSeparatorProducer) - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - function GetLineHeight: Integer; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - end; - - TdxGridTableViewDataRowProducer = class(TdxGridTableViewCustomDataRowProducer) - private - FPreviewItem: TdxReportVisualItem;//TAbstractdxReportCellData; - function GetPreviewColumn: TcxGridColumn; - function GetPreviewPlace: TcxGridPreviewPlace; - protected - procedure AddPreview(AParent: TdxReportCell); virtual; - procedure AddSubItems(AParent: TdxReportCell); override; - procedure CalculateRowAutoHeight; override; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; override; - function CreatePreview(AParent: TdxReportCell): TdxReportVisualItem; virtual; - function GetPreviewClass: TdxReportCellDataClass; virtual; - procedure FixupRowDataHeight; override; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetCellAutoHeight: Boolean; virtual; - function GetHasPreview: Boolean; virtual; - function GetIndentCount: Integer; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetPreviewHeight: Integer; virtual; - function GetPreviewLineCount: Integer; virtual; - function GetPreviewLineHeight: Integer; virtual; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - public - function GridRow: TcxGridDataRow; reintroduce; overload; - - property CellAutoHeight: Boolean read GetCellAutoHeight; - property HasPreview: Boolean read GetHasPreview; - property PreviewColumn: TcxGridColumn read GetPreviewColumn; - property PreviewHeight: Integer read GetPreviewHeight; - property PreviewItem: TdxReportVisualItem read FPreviewItem;//TAbstractdxReportCellData read FPreviewItem; - property PreviewLineCount: Integer read GetPreviewLineCount; - property PreviewLineHeight: Integer read GetPreviewLineHeight; - property PreviewPlace: TcxGridPreviewPlace read GetPreviewPlace; - end; - - TdxGridTableViewGroupRowProducer = class(TdxGridTableViewCustomDataRowProducer) - protected - procedure InitializeRow; override; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetIndentCount: Integer; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - function GetSubItemCount: Integer; override; - public - function GridRow: TcxGridGroupRow; reintroduce; overload; - end; - - TdxGridTableViewMasterRowProducer = class(TdxGridTableViewDataRowProducer) - protected - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetIndentCount: Integer; override; - public - function GridRow: TcxGridMasterDataRow; reintroduce; overload; - end; - - TdxGridTableViewGroupFooterProducer = class(TdxGridTableViewCustomDataRowProducer) - private - FGroupLevel: Integer; - FIndex: Integer; - FItemsSite: TdxReportCell; - function GetGroupLevel: Integer; - function GetHostBounds: TRect; - protected - procedure AddSubItems(AParent: TdxReportCell); override; - procedure CalculateRowAutoHeight; override; - procedure FixupRowDataItemHeight(AnItem: TdxReportVisualItem); override; - procedure InitializeIndent(AIndent: TdxReportCellExpandButton; AIndex: Integer); override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetHasSubItem(Index: Integer): Boolean; override; - function GetIndentCount: Integer; override; - function GetItemsSite: TdxReportCell; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo; AGridRow: TcxCustomGridRow; - AGroupLevel, AnIndex: Integer): TdxReportCell; reintroduce; virtual; - - property GroupLevel: Integer read GetGroupLevel; - property HostBounds: TRect read GetHostBounds; - property Index: Integer read FIndex; - end; - - TdxGridTableViewBandsProducer = class(TdxGridTableViewRowSubItemsProducer) - protected - procedure CalculateRowHeight; override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - function GetSubItemCount: Integer; override; - public - function Adapter: TdxGridBandedTableViewAdapter; reintroduce; overload; - function Builder: TdxGridBandedTableViewBuilder; reintroduce; overload; - function Formatter: TdxGridBandedTableViewFormatter; reintroduce; overload; - end; - - TdxGridCardViewCardsRowProducer = class(TdxGridViewRowProducer) - protected - procedure CalculateRowHeight; override; - function GetAutoHeight: Boolean; override; - procedure InitializeRow; override; - public - function Adapter: TdxGridCardViewAdapter; reintroduce; overload; - function Builder: TdxGridCardViewBuilder; reintroduce; overload; - function Formatter: TdxGridCardViewFormatter; reintroduce; overload; - - function CreateCard(AParent: TdxReportCell; AGridCard: TcxGridCard): TdxReportCard; virtual; - procedure InjectCard(ACard: TdxReportCard; AIndex: Integer); virtual; - function Produce(AHostInfo: TdxGridAttributeHostInfo; - ARowHeight: Integer): TdxReportCell; reintroduce; virtual; - end; - -{$IFDEF CHARTVIEW} - TdxGridChartViewChartProducer = class(TdxGridViewCustomRowProducer) - private - FChartImage: TGraphic; - function GetChartImage: TGraphic; - function GetItem: TdxReportCellGraphic; - protected - procedure CalculateRowHeight; override; - function GetItemClass: TdxReportCellDataClass; override; - procedure InitializeItem; override; - - property ChartImage: TGraphic read GetChartImage; - property Item: TdxReportCellGraphic read GetItem; - public - function Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; override; - function Formatter: TdxGridChartViewFormatter; reintroduce; overload; - end; -{$ENDIF} - - { Options } - - TdxGridReportLinkOptionsClass = class of TdxGridReportLinkOptions; - - TdxGridReportLinkOptions = class(TdxCustomReportLinkOptions) - private - function GetReportLink: TdxGridReportLink; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsCards = class; - - TdxGridReportLinkCardsShadowClass = class of TdxGridReportLinkCardsShadow; - - TdxGridReportLinkCardsShadow = class(TPersistent) - private - FColor: TColor; - FDepth: TdxGridCardShadowDepth; - FOptionsCards: TdxGridReportLinkOptionsCards; - FPosition: TdxGridCardShadowPosition; - function GetActualColor: TColor; - function GetVisible: Boolean; - procedure SetColor(Value: TColor); - procedure SetDepth(Value: TdxGridCardShadowDepth); - procedure SetPosition(Value: TdxGridCardShadowPosition); - protected - procedure Changed; dynamic; - public - constructor Create(AnOptionsCards: TdxGridReportLinkOptionsCards); virtual; - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; virtual; - - property ActualColor: TColor read GetActualColor; - property OptionsCards: TdxGridReportLinkOptionsCards read FOptionsCards; - property Visible: Boolean read GetVisible; - published - property Color: TColor read FColor write SetColor default clDefault; - property Depth: TdxGridCardShadowDepth read FDepth write SetDepth default dxDefaultCardsShadowDepth; - property Position: TdxGridCardShadowPosition read FPosition write SetPosition default cspBottomRight; - end; - - TdxGridReportLinkOptionsCardsClass = class of TdxGridReportLinkOptionsCards; - - TdxGridReportLinkOptionsCards = class(TdxGridReportLinkOptions) - private - FAutoWidth: Boolean; - FBorders: Boolean; - FInterCardsSpaceHorz: Integer; - FInterCardsSpaceVert: Integer; - FKeepSameHeight: Boolean; - FKeepSameWidth: Boolean; - FRowBordersHorz: Boolean; - FRowBordersVert: Boolean; - FShadow: TdxGridReportLinkCardsShadow; - function GetShadow: TdxGridReportLinkCardsShadow; - procedure SetAutoWidth(Value: Boolean); - procedure SetBorders(Value: Boolean); - procedure SetInterCardsSpaceHorz(Value: Integer); - procedure SetInterCardsSpaceVert(Value: Integer); - procedure SetKeepSameHeight(Value: Boolean); - procedure SetKeepSameWidth(Value: Boolean); - procedure SetRowBordersHorz(Value: Boolean); - procedure SetRowBordersVert(Value: Boolean); - procedure SetShadow(Value: TdxGridReportLinkCardsShadow); - protected - function DesignerTabIndex: Integer; override; - function GetShadowClass: TdxGridReportLinkCardsShadowClass; virtual; - public - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property AutoWidth: Boolean read FAutoWidth write SetAutoWidth default False; - property Borders: Boolean read FBorders write SetBorders default True; - property InterCardsSpaceHorz: Integer read FInterCardsSpaceHorz write SetInterCardsSpaceHorz default 4; - property InterCardsSpaceVert: Integer read FInterCardsSpaceVert write SetInterCardsSpaceVert default 4; - property KeepSameHeight: Boolean read FKeepSameHeight write SetKeepSameHeight default True; - property KeepSameWidth: Boolean read FKeepSameWidth write SetKeepSameWidth default True; - property RowBordersHorz: Boolean read FRowBordersHorz write SetRowBordersHorz default False; - property RowBordersVert: Boolean read FRowBordersVert write SetRowBordersVert default False; - property Shadow: TdxGridReportLinkCardsShadow read GetShadow write SetShadow; - end; - -{$IFDEF CHARTVIEW} - TdxGridReportLinkOptionsChartsClass = class of TdxGridReportLinkOptionsCharts; - - TdxGridReportLinkOptionsCharts = class(TdxGridReportLinkOptions) - private - FGraphicClass: TGraphicClass; - FIsGraphicClassAssigned: Boolean; - FTransparent: Boolean; - function GetGraphicClass: TGraphicClass; - function GetGraphicClassName: string; - function IsGraphicClassNameStored: Boolean; - procedure SetGraphicClass(Value: TGraphicClass); - procedure SetGraphicClassName(const Value: string); - procedure SetTransparent(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - function DefaultGraphicClass: TGraphicClass; virtual; //TBitmap - function SupportsGraphicClass(AGraphicClass: TGraphicClass): Boolean; virtual; //excluding TIcon - - property GraphicClass: TGraphicClass read GetGraphicClass write SetGraphicClass; - published - property GraphicClassName: string read GetGraphicClassName write SetGraphicClassName stored IsGraphicClassNameStored; - property Transparent: Boolean read FTransparent write SetTransparent default False; - end; -{$ENDIF} - - TdxGridReportLinkOptionsDetailsClass = class of TdxGridReportLinkOptionsDetails; - - TdxGridReportLinkOptionsDetails = class(TdxGridReportLinkOptions) - private - FOnlyFocusedView: Boolean; - FStartFromFocusedView: Boolean; - procedure SetOnlyFocusedView(Value: Boolean); - procedure SetStartFromFocusedView(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property OnlyFocusedView: Boolean read FOnlyFocusedView write SetOnlyFocusedView default False; - property StartFromFocusedView: Boolean read FStartFromFocusedView write SetStartFromFocusedView default False; - end; - - TdxGridReportLinkOptionsExpanding = class(TdxCustomReportLinkOptionsExpanding) - private - {$IFDEF DXVER500} - FExpandCards: Boolean; - {$ENDIF} - FExpandGroupRows: Boolean; - FExpandMasterRows: Boolean; - function GetHasAny: Boolean; - function GetReportLink: TdxGridReportLink; - {$IFDEF DXVER500} - procedure SetExpandCards(Value: Boolean); - {$ENDIF} - procedure SetExpandGroupRows(Value: Boolean); - procedure SetExpandMasterRows(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - property HasAny: Boolean read GetHasAny; - property ReportLink: TdxGridReportLink read GetReportLink; - published - {$IFDEF DXVER500} - property ExpandCards: Boolean read FExpandCards write SetExpandCards default False; - {$ENDIF} - property ExpandGroupRows: Boolean read FExpandGroupRows write SetExpandGroupRows default False; - property ExpandMasterRows: Boolean read FExpandMasterRows write SetExpandMasterRows default False; - end; - - TdxGridReportLinkOptionsFormatting = class(TdxCustomReportLinkOptionsFormatting) - private - FConsumeSelectionStyle: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetConsumeSelectionStyle(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TdxGridReportLink read GetReportLink; - published - property ConsumeSelectionStyle: Boolean read FConsumeSelectionStyle write SetConsumeSelectionStyle default False; - property UseLookAndFeelColors; - end; - - TdxGridReportLinkOptionsLevelsClass = class of TdxGridReportLinkOptionsLevels; - - TdxGridReportLinkOptionsLevels = class(TdxGridReportLinkOptions) - private - FRiseActiveLevelOntoTop: Boolean; - FUnwrap: Boolean; - FUnwrapTopLevel: Boolean; - procedure SetRiseActiveLevelOntoTop(Value: Boolean); - procedure SetUnwrap(Value: Boolean); - procedure SetUnwrapTopLevel(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property RiseActiveLevelOntoTop: Boolean read FRiseActiveLevelOntoTop write SetRiseActiveLevelOntoTop default True; - property Unwrap: Boolean read FUnwrap write SetUnwrap default False; - property UnwrapTopLevel: Boolean read FUnwrapTopLevel write SetUnwrapTopLevel default True; - end; - - TdxGridReportLinkOptionsOnEveryPage = class(TdxCustomTableControlReportLinkOptionsOnEveryPage) - private - FCaption: Boolean; - FFilterBar: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetCaption(Value: Boolean); - procedure SetFilterBar(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; virtual; - procedure SetAll; virtual; - procedure UnsetAll; virtual; - - property ReportLink: TdxGridReportLink read GetReportLink; - published - property BandHeaders; - property Caption: Boolean read FCaption write SetCaption default True; - property FilterBar: Boolean read FFilterBar write SetFilterBar default True; - property Footers; - property Headers; - end; - - TdxGridReportLinkOptionsPagination = class(TdxCustomTableControlReportLinkOptionsPagination) - private - FOneGroupPerPage: Boolean; - FTopLevelGroup: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetOneGroupPerPage(Value: Boolean); - procedure SetTopLevelGroup(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TdxGridReportLink read GetReportLink; - published - property Band; - property Column; - property Custom; - property OneGroupPerPage: Boolean read FOneGroupPerPage write SetOneGroupPerPage default False; - property Row; - property TopLevelGroup: Boolean read FTopLevelGroup write SetTopLevelGroup default False; - end; - - TdxGridReportLinkOptionsPreview = class(TdxCustomTableControlReportLinkOptionsPreview) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsRefinements = class(TdxCustomReportLinkOptionsRefinements) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsSelection = class(TdxCustomTableControlReportLinkOptionsSelection) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - end; - - TdxGridReportLinkOptionsSize = class(TdxCustomReportLinkOptionsSize) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TdxGridReportLink read GetReportLink; - published - property AutoWidth; - end; - - TdxGridReportLinkOptionsView = class(TdxCustomTableControlReportLinkOptionsView) - private - FCaption: Boolean; - FFilterBar: Boolean; - FGroupFooters: Boolean; - function GetReportLink: TdxGridReportLink; - procedure SetCaption(Value: Boolean); - procedure SetFilterBar(Value: Boolean); - procedure SetGroupFooters(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; virtual; - procedure SetAll; - procedure UnsetAll; - - property ReportLink: TdxGridReportLink read GetReportLink; - published - property BandHeaders; - property Caption: Boolean read FCaption write SetCaption default True; - property ExpandButtons; - property FilterBar: Boolean read FFilterBar write SetFilterBar default True; - property Footers; - property GroupFooters: Boolean read FGroupFooters write SetGroupFooters default True; - property Headers; - end; - - TdxGridAttributeHostInfo = class - private - FParent: TdxReportCell; - public - Origin: TPoint; - procedure Initialize(AParent: TdxReportCell); - property Parent: TdxReportCell read FParent; - end; - - TdxGridAttributeHostInfoServicesClass = class of TdxGridAttributeHostInfoServices; - - TdxGridAttributeHostInfoServices = class - private - FPageDetailsHostInfo: TdxGridAttributeHostInfo; - FPageFootersHostInfo: TdxGridAttributeHostInfo; - FPageHeadersHostInfo: TdxGridAttributeHostInfo; - FReportLink: TdxGridReportLink; - function GetActiveView: TcxCustomGridView; - function GetActiveViewHelper: TdxCustomGridViewHelperClass; - function GetArePageFootersAssigned: Boolean; - function GetArePageHeadersAssigned: Boolean; - function GetCanUseBandHeadersOnEveyPage: Boolean; - function GetCanUseCaptionOnEveryPage: Boolean; - function GetCanUseFilterBarOnEveryPage: Boolean; - function GetCanUseFootersOnEveryPage: Boolean; - function GetCanUseHeadersOnEveryPage: Boolean; - function GetIsInconsistentBandHeadersState: Boolean; - function GetIsInconsistentFilterBarState: Boolean; - function GetIsInconsistentFootersState: Boolean; - function GetIsInconsistentHeadersState: Boolean; - function GetLevelSeparatorBottomHostInfo: TdxGridAttributeHostInfo; - function GetLevelSeparatorTopHostInfo: TdxGridAttributeHostInfo; - function GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; - function GetOptionsView: TdxGridReportLinkOptionsView; - function GetPageDetails: TdxReportCell; - function GetPageFooters: TdxReportCell; - function GetPageHeaders: TdxReportCell; - protected - procedure CreateHostInfos; - procedure DestroyHostInfos; - - function GetBandHeadersHostInfo: TdxGridAttributeHostInfo; virtual; - function GetCaptionHostInfo: TdxGridAttributeHostInfo; virtual; - function GetFilterBarHostInfo: TdxGridAttributeHostInfo; virtual; - function GetFootersHostInfo: TdxGridAttributeHostInfo; virtual; - function GetHeadersHostInfo: TdxGridAttributeHostInfo; virtual; - function GetInconsistentStateText: string; virtual; - function GetIsInconsistentState: Boolean; virtual; - function HasCells: Boolean; - function IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; - - //function HasAttributeOnEveryPage: Boolean; - - property ActiveView: TcxCustomGridView read GetActiveView; - property ActiveViewHelper: TdxCustomGridViewHelperClass read GetActiveViewHelper; - property OptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage read GetOptionsOnEveryPage; - property OptionsView: TdxGridReportLinkOptionsView read GetOptionsView; - property PageDetails: TdxReportCell read GetPageDetails; - property PageFooters: TdxReportCell read GetPageFooters; - property PageHeaders: TdxReportCell read GetPageHeaders; - public - constructor Create(AReportLink: TdxGridReportLink); virtual; - destructor Destroy; override; - procedure Initialize; - - property ArePageFootersAssigned: Boolean read GetArePageFootersAssigned; - property ArePageHeadersAssigned: Boolean read GetArePageHeadersAssigned; - property BandHeadersHostInfo: TdxGridAttributeHostInfo read GetBandHeadersHostInfo; - property CanUseBandHeadersOnEveyPage: Boolean read GetCanUseBandHeadersOnEveyPage; - property CanUseCaptionOnEveryPage: Boolean read GetCanUseCaptionOnEveryPage; - property CanUseFilterBarOnEveryPage: Boolean read GetCanUseFilterBarOnEveryPage; - property CanUseFootersOnEveryPage: Boolean read GetCanUseFootersOnEveryPage; - property CanUseHeadersOnEveryPage: Boolean read GetCanUseHeadersOnEveryPage; - property CaptionHostInfo: TdxGridAttributeHostInfo read GetCaptionHostInfo; - property FilterBarHostInfo: TdxGridAttributeHostInfo read GetFilterBarHostInfo; - property FootersHostInfo: TdxGridAttributeHostInfo read GetFootersHostInfo; - property HeadersHostInfo: TdxGridAttributeHostInfo read GetHeadersHostInfo; - property InconsistentStateText: string read GetInconsistentStateText; - property IsInconsistentBandHeadersState: Boolean read GetIsInconsistentBandHeadersState; - property IsInconsistentFilterBarState: Boolean read GetIsInconsistentFilterBarState; - property IsInconsistentFootersState: Boolean read GetIsInconsistentFootersState; - property IsInconsistentHeadersState: Boolean read GetIsInconsistentHeadersState; - property IsInconsistentState: Boolean read GetIsInconsistentState; - property LevelSeparatorBottomHostInfo: TdxGridAttributeHostInfo read GetLevelSeparatorBottomHostInfo; - property LevelSeparatorTopHostInfo: TdxGridAttributeHostInfo read GetLevelSeparatorTopHostInfo; - property PageDetailsHostInfo: TdxGridAttributeHostInfo read FPageDetailsHostInfo; - property PageFootersHostInfo: TdxGridAttributeHostInfo read FPageFootersHostInfo; - property PageHeadersHostInfo: TdxGridAttributeHostInfo read FPageHeadersHostInfo; - property ReportLink: TdxGridReportLink read FReportLink; - end; - - TdxGridReportLinkStylesClass = class of TdxGridReportLinkStyles; - - TdxGridReportLinkStyles = class(TdxCustomReportLinkStyles) - private - function GetReportLink: TdxGridReportLink; - protected - function DesignerTabIndex: Integer; override; - - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - class function GetStyleCaption(AnIndex: Integer): string; override; - function GetStyleIndexByCaption(const Caption: string): Integer; override; - - function IsCardViewStyle(AStyle: TcxStyle): Boolean; - public - procedure Assign(Source: TPersistent); override; - - procedure GetBandHeaderParams(ABand: TcxGridBand; out AParams: TcxViewParams); virtual; - procedure GetCaptionParams(ATabLevel: TcxGridLevel; out AParams: TcxViewParams); virtual; - procedure GetCardCaptionRowParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetCardRowCaptionParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetFilterBarParams(out AParams: TcxViewParams); virtual; - procedure GetFooterParams(ARecord: TcxCustomGridRecord; AGroupLevel: Integer; - AItem: TcxGridColumn; out AParams: TcxViewParams); virtual; - procedure GetGroupParams(ARecord: TcxCustomGridRecord; AGroupLevel: Integer; - out AParams: TcxViewParams); virtual; - procedure GetHeaderParams(AItem: TcxGridColumn; out AParams: TcxViewParams); virtual; - procedure GetPreviewParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetSelectionParams(out AParams: TcxViewParams); virtual; - - property ReportLink: TdxGridReportLink read GetReportLink; - published - property BandHeader: TcxStyle Index vspsGridBandHeader read GetValue write SetValue; - property Caption: TcxStyle Index vspsGridCaption read GetValue write SetValue; - property CardCaptionRow: TcxStyle Index vspsGridCardCaptionRow read GetValue write SetValue; - property CardRowCaption: TcxStyle Index vspsGridCardRowCaption read GetValue write SetValue; - property Content: TcxStyle Index vspsGridContent read GetValue write SetValue; - property ContentEven: TcxStyle Index vspsGridContentEven read GetValue write SetValue; - property ContentOdd: TcxStyle Index vspsGridContentOdd read GetValue write SetValue; - property FilterBar: TcxStyle Index vspsGridFilterBar read GetValue write SetValue; - property Footer: TcxStyle Index vspsGridFooter read GetValue write SetValue; - property Group: TcxStyle Index vspsGridGroup read GetValue write SetValue; - property Header: TcxStyle Index vspsGridHeader read GetValue write SetValue; - property Preview: TcxStyle Index vspsGridPreview read GetValue write SetValue; - property Selection: TcxStyle Index vspsGridSelection read GetValue write SetValue; - property StyleSheet; - end; - - TdxGridReportLinkStyleSheet = class(TdxCustomReportLinkStyleSheet) - private - function GetStylesValue: TdxGridReportLinkStyles; - procedure SetStylesValue(Value: TdxGridReportLinkStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TdxGridReportLinkStyles read GetStylesValue write SetStylesValue; - end; - - TdxGridReportLinkProcessParams = record - HasMasterDetails: Boolean; - HasMasterDetailsInTopView: Boolean; - HasOnlyCards: Boolean; - HasOnlyCharts: Boolean; - HasUnwrapableData: Boolean; - CanUseOnEveryPageMode: Boolean; - end; - - TdxGridRecordArray = array of TcxCustomGridRecord; - - TdxGridViewProc = procedure(AGridView: TcxCustomGridView) of object; - - TdxGridGetCustomPageBreaksEvent = procedure(Sender: TdxGridReportLink) of object; - - TdxGridReportLinkGetCellHeightEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; var AHeight: Integer) of object; - - { CustomDraw Events } - - TdxGridReportLinkCustomDrawBandCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridBandedTableView; ABand: TcxGridBand; - AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawCardRowCaptionCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawCardRowDataCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TAbstractdxReportCellData; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawFilterBarEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxCustomGridTableView; AnItem: TdxReportCellString; - var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawFooterCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; ALevel: Integer; AnItem: TdxReportCellString; - var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawHeaderCellEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxGridTableView; AColumn: TcxGridColumn; - AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TdxGridReportLinkCustomDrawLevelCaptionEvent = procedure(Sender: TdxGridReportLink; - ACanvas: TCanvas; AView: TcxCustomGridView; AnItem: TdxReportCellString; - var ADone: Boolean) of object; - - { Initializtion Events } - - TdxGridReportLinkInitializeBandCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridBandedTableView; ABand: TcxGridBand; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData) of object; - - TdxGridReportLinkInitializeCardRowCaptionCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeCardRowDataCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TAbstractdxReportCellData) of object; - -{$IFDEF CHARTVIEW} - TdxGridReportLinkInitializeChartCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridChartView; AnItem: TdxReportCellGraphic) of object; -{$ENDIF} - - TdxGridReportLinkInitializeFilterBarEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridTableView; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeFooterCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; ALevel: Integer; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeHeaderCellEvent = procedure(Sender: TdxGridReportLink; - AView: TcxGridTableView; AColumn: TcxGridColumn; AnItem: TdxReportCellString) of object; - - TdxGridReportLinkInitializeLevelCaptionEvent = procedure(Sender: TdxGridReportLink; - AView: TcxCustomGridView; AnItem: TdxReportCellString) of object; - - { ReportLink } - - TdxGridReportLink = class(TdxCustomTableControlReportLink) - private - FDelimitersHardVert: TList; - FHostInfoServices: TdxGridAttributeHostInfoServices; - FOptionsCards: TdxGridReportLinkOptionsCards; -{$IFDEF CHARTVIEW} - FOptionsCharts: TdxGridReportLinkOptionsCharts; -{$ENDIF} - FOptionsDetails: TdxGridReportLinkOptionsDetails; - FOptionsLevels: TdxGridReportLinkOptionsLevels; - FProcessedView: TcxCustomGridView; - FProcessParams: TdxGridReportLinkProcessParams; - FReportRows: TList; - FOnCustomDrawBandCell: TdxGridReportLinkCustomDrawBandCellEvent; - FOnCustomDrawCardRowCaptionCell: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent; - FOnCustomDrawCardRowDataCell: TdxGridReportLinkCustomDrawCardRowDataCellEvent; - FOnCustomDrawCell: TdxGridReportLinkCustomDrawCellEvent; - FOnCustomDrawFilterBar: TdxGridReportLinkCustomDrawFilterBarEvent; - FOnCustomDrawFooterCell: TdxGridReportLinkCustomDrawFooterCellEvent; - FOnCustomDrawHeaderCell: TdxGridReportLinkCustomDrawHeaderCellEvent; - FOnCustomDrawLevelCaption: TdxGridReportLinkCustomDrawLevelCaptionEvent; - FOnGetCellHeight: TdxGridReportLinkGetCellHeightEvent; - FOnGetCustomPageBreaks: TdxGridGetCustomPageBreaksEvent; - FOnInitializeBandCell: TdxGridReportLinkInitializeBandCellEvent; - FOnInitializeCardRowCaptionCell: TdxGridReportLinkInitializeCardRowCaptionCellEvent; - FOnInitializeCardRowDataCell: TdxGridReportLinkInitializeCardRowDataCellEvent; - FOnInitializeCell: TdxGridReportLinkInitializeCellEvent; -{$IFDEF CHARTVIEW} - FOnInitializeChartCell: TdxGridReportLinkInitializeChartCellEvent; -{$ENDIF} - FOnInitializeFilterBar: TdxGridReportLinkInitializeFilterBarEvent; - FOnInitializeFooterCell: TdxGridReportLinkInitializeFooterCellEvent; - FOnInitializeHeaderCell: TdxGridReportLinkInitializeHeaderCellEvent; - FOnInitializeLevelCaption: TdxGridReportLinkInitializeLevelCaptionEvent; - function GetActiveStyles: TdxGridReportLinkStyles; - function GetActiveView: TcxCustomGridView; - function GetActiveViewHelper: TdxCustomGridViewHelperClass; - function GetActiveViewMasterRow: TcxGridMasterDataRow; - function GetActiveViewParentLevel: TcxGridLevel; - function GetDesignWindow: TdxfmGridReportLinkDesignWindow; - function GetGrid: TcxGrid; - function GetOptionsExpanding: TdxGridReportLinkOptionsExpanding; - function GetOptionsFormatting: TdxGridReportLinkOptionsFormatting; - function GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; - function GetOptionsPagination: TdxGridReportLinkOptionsPagination; - function GetOptionsPreview: TdxGridReportLinkOptionsPreview; - function GetOptionsRefinements: TdxGridReportLinkOptionsRefinements; - function GetOptionsSelection: TdxGridReportLinkOptionsSelection; - function GetOptionsSize: TdxGridReportLinkOptionsSize; - function GetOptionsView: TdxGridReportLinkOptionsView; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowByGridRecord(GridRecord: TcxCustomGridRecord): TdxReportCell; - function GetReportRowCount: Integer; - function GetStyles: TdxGridReportLinkStyles; - procedure SetOnCustomDrawBandCell(Value: TdxGridReportLinkCustomDrawBandCellEvent); - procedure SetOnCustomDrawCell(Value: TdxGridReportLinkCustomDrawCellEvent); - procedure SetOnCustomDrawCardRowCaptionCell(Value: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent); - procedure SetOnCustomDrawCardRowDataCell(Value: TdxGridReportLinkCustomDrawCardRowDataCellEvent); - procedure SetOnCustomDrawFilterBar(Value: TdxGridReportLinkCustomDrawFilterBarEvent); - procedure SetOnCustomDrawFooterCell(Value: TdxGridReportLinkCustomDrawFooterCellEvent); - procedure SetOnCustomDrawHeaderCell(Value: TdxGridReportLinkCustomDrawHeaderCellEvent); - procedure SetOnCustomDrawLevelCaption(Value: TdxGridReportLinkCustomDrawLevelCaptionEvent); - procedure SetOptionsCards(Value: TdxGridReportLinkOptionsCards); -{$IFDEF CHARTVIEW} - procedure SetOptionsCharts(Value: TdxGridReportLinkOptionsCharts); -{$ENDIF} - procedure SetOptionsDetails(Value: TdxGridReportLinkOptionsDetails); - procedure SetOptionsExpanding(Value: TdxGridReportLinkOptionsExpanding); - procedure SetOptionsFormatting(Value: TdxGridReportLinkOptionsFormatting); - procedure SetOptionsLevels(Value: TdxGridReportLinkOptionsLevels); - procedure SetOptionsOnEveryPage(Value: TdxGridReportLinkOptionsOnEveryPage); - procedure SetOptionsPagination(Value: TdxGridReportLinkOptionsPagination); - procedure SetOptionsPreview(Value: TdxGridReportLinkOptionsPreview); - procedure SetOptionsRefinements(Value: TdxGridReportLinkOptionsRefinements); - procedure SetOptionsSelection(Value: TdxGridReportLinkOptionsSelection); - procedure SetOptionsSize(Value: TdxGridReportLinkOptionsSize); - procedure SetOptionsView(Value: TdxGridReportLinkOptionsView); - procedure SetStyles(Value: TdxGridReportLinkStyles); - protected - procedure BeforeDesignReport; override; - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure ConvertCoords; override; - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - function GetBreakPagesByHardDelimiters: Boolean; override; - function GetEmptyPagesCanExist: Boolean; override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - function GetUseHardVertDelimiters: Boolean; override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - function IsDrawFootersOnEveryPage: Boolean; override; - function IsDrawHeadersOnEveryPage: Boolean; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - procedure MakeHardDelimiters(AReportCells: TdxReportCells; AVertDelimiters: TList); override; - - function GetAreNativeStylesAvailable: Boolean; override; - function GetStylesClass: TdxCustomReportLinkStylesClass; override; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; override; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; override; - procedure PrepareConstruct; override; - - procedure DoCustomDrawBandCell(ACanvas: TCanvas; AView: TcxGridBandedTableView; - ABand: TcxGridBand; AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawCardRowCaptionCell(ACanvas: TCanvas; AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TdxReportCellString; - var ADone: Boolean); dynamic; - procedure DoCustomDrawCardRowDataCell(ACanvas: TCanvas; AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TAbstractdxReportCellData; - var ADone: Boolean); dynamic; - procedure DoCustomDrawCell(ACanvas: TCanvas; AView: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; - AnItem: TAbstractdxReportCellData; var ADone: Boolean); dynamic; - procedure DoCustomDrawFilterBar(ACanvas: TCanvas; AView: TcxCustomGridTableView; - AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawFooterCell(ACanvas: TCanvas; AView: TcxGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; ALevel: Integer; - AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawHeaderCell(ACanvas: TCanvas; AView: TcxGridTableView; - AColumn: TcxGridColumn; AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawLevelCaption(ACanvas: TCanvas; AView: TcxCustomGridView; - AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoGetCellHeight(AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; var AHeight: Integer); dynamic; - procedure DoGetCustomPageBreaks; dynamic; - procedure DoInitializeBandCell(AView: TcxGridBandedTableView; ABand: TcxGridBand; - AnItem: TdxReportCellString); dynamic; - procedure DoInitializeCardRowCaptionCell(AView: TcxGridCardView; ACard: TcxGridCard; - ARow: TcxGridCardViewRow; AnItem: TdxReportCellString); dynamic; - procedure DoInitializeCardRowDataCell(AView: TcxGridCardView; ACard: TcxGridCard; - ARow: TcxGridCardViewRow; AnItem: TAbstractdxReportCellData); dynamic; - procedure DoInitializeCell(AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData); dynamic; -{$IFDEF CHARTVIEW} - procedure DoInitializeChartCell(AView: TcxGridChartView; AnItem: TdxReportCellGraphic); dynamic; -{$ENDIF} - procedure DoInitializeFilterBar(AView: TcxCustomGridTableView; AnItem: TdxReportCellString); dynamic; - procedure DoInitializeFooterCell(AView: TcxGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; ALevel: Integer; AnItem: TdxReportCellString); dynamic; - procedure DoInitializeHeaderCell(AView: TcxGridTableView; AColumn: TcxGridColumn; - AnItem: TdxReportCellString); dynamic; - procedure DoInitializeLevelCaption(AView: TcxCustomGridView; AnItem: TdxReportCellString); dynamic; - - procedure CreateOptions; override; - procedure DestroyOptions; override; - function GetOptionsCardsClass: TdxGridReportLinkOptionsCardsClass; virtual; -{$IFDEF CHARTVIEW} - function GetOptionsChartsClass: TdxGridReportLinkOptionsChartsClass; virtual; -{$ENDIF} - function GetOptionsDetailsClass: TdxGridReportLinkOptionsDetailsClass; virtual; - function GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; override; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; override; - function GetOptionsLevelsClass: TdxGridReportLinkOptionsLevelsClass; virtual; - function GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; override; - function GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; override; - function GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; override; - function GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; override; - function GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; override; - function GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; override; - function GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; override; - - procedure AddReportRow(AReportRow: TdxReportCell); - procedure AddVerticalHardDelimiter(ADelimiter: TdxReportCell); overload; - procedure AddVerticalHardDelimiter(ADelimiter: Integer); overload; - procedure BuildTopLevelView(AGridView: TcxCustomGridView); - procedure BuildTopLevelViews; - procedure BuildView(AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); - function CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; - function CreateViewBuilder(AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; - - procedure DoExpandRows; - procedure DoExpandViewRows(AGridView: TcxCustomGridView); - procedure ForEachView(AMasterRow: TcxGridMasterDataRow; AProc: TdxGridViewProc); - - function GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; out ADrawInfo: TdxGridCellCustomDrawInfo): TdxGridAttributeID; virtual; - function HasSiblings(AGridView: TcxCustomGridView): Boolean; - function IsCardViewStyle(AStyle: TcxStyle): Boolean; virtual; - function IsCustomDrawn(AnAttributeID: TdxGridAttributeID): Boolean; virtual; - function IsOffice11StyleGrouping: Boolean; - - procedure CalculateProcessParams; - function CanAttributeBeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; - function IsAttributeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; - - property ActiveStyles: TdxGridReportLinkStyles read GetActiveStyles; - property ActiveView: TcxCustomGridView read GetActiveView; - property ActiveViewHelper: TdxCustomGridViewHelperClass read GetActiveViewHelper; - property ActiveViewMasterRow: TcxGridMasterDataRow read GetActiveViewMasterRow; - property ActiveViewParentLevel: TcxGridLevel read GetActiveViewParentLevel; - property DelimitersHardVert: TList read FDelimitersHardVert; - property HostInfoServices: TdxGridAttributeHostInfoServices read FHostInfoServices; - property ProcessParams: TdxGridReportLinkProcessParams read FProcessParams; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure AddPageBreak(AGridRecord: TcxCustomGridRecord); overload; - procedure AddPageBreak(const AGridRecords: array of TcxCustomGridRecord); overload; - procedure AddPageBreak(const AGridRecords: TdxGridRecordArray); overload; - procedure AddPageBreak(AGridRecords: TList); overload; // list of TcxCustomGridRecord - - property Grid: TcxGrid read GetGrid; - property DesignWindow: TdxfmGridReportLinkDesignWindow read GetDesignWindow; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property ReportRowsByGridRecord[GridRow: TcxCustomGridRecord]: TdxReportCell read GetReportRowByGridRecord; - property ReportRowCount: Integer read GetReportRowCount; - published - property Color; - property Font; - property OptionsCards: TdxGridReportLinkOptionsCards read FOptionsCards write SetOptionsCards; -{$IFDEF CHARTVIEW} - property OptionsCharts: TdxGridReportLinkOptionsCharts read FOptionsCharts write SetOptionsCharts; -{$ENDIF} - property OptionsDetails: TdxGridReportLinkOptionsDetails read FOptionsDetails write SetOptionsDetails; - property OptionsExpanding: TdxGridReportLinkOptionsExpanding read GetOptionsExpanding write SetOptionsExpanding; - property OptionsFormatting: TdxGridReportLinkOptionsFormatting read GetOptionsFormatting write SetOptionsFormatting; - property OptionsLevels: TdxGridReportLinkOptionsLevels read FOptionsLevels Write SetOptionsLevels; - property OptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage read GetOptionsOnEveryPage write SetOptionsOnEveryPage; - property OptionsPagination: TdxGridReportLinkOptionsPagination read GetOptionsPagination write SetOptionsPagination; - property OptionsPreview: TdxGridReportLinkOptionsPreview read GetOptionsPreview write SetOptionsPreview; - property OptionsRefinements: TdxGridReportLinkOptionsRefinements read GetOptionsRefinements write SetOptionsRefinements; - property OptionsSelection: TdxGridReportLinkOptionsSelection read GetOptionsSelection write SetOptionsSelection; - property OptionsSize: TdxGridReportLinkOptionsSize read GetOptionsSize write SetOptionsSize; - property OptionsView: TdxGridReportLinkOptionsView read GetOptionsView write SetOptionsView; - property ScaleFonts; - property StyleRepository; - property Styles: TdxGridReportLinkStyles read GetStyles write SetStyles; - property SupportedCustomDraw; - - property OnCustomDrawBandCell: TdxGridReportLinkCustomDrawBandCellEvent read FOnCustomDrawBandCell - write SetOnCustomDrawBandCell; - property OnCustomDrawCell: TdxGridReportLinkCustomDrawCellEvent read FOnCustomDrawCell - write SetOnCustomDrawCell; - property OnCustomDrawCardRowCaptionCell: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent read FOnCustomDrawCardRowCaptionCell - write SetOnCustomDrawCardRowCaptionCell; - property OnCustomDrawCardRowDataCell: TdxGridReportLinkCustomDrawCardRowDataCellEvent read FOnCustomDrawCardRowDataCell - write SetOnCustomDrawCardRowDataCell; - property OnCustomDrawFilterBar: TdxGridReportLinkCustomDrawFilterBarEvent read FOnCustomDrawFilterBar - write SetOnCustomDrawFilterBar; - property OnCustomDrawFooterCell: TdxGridReportLinkCustomDrawFooterCellEvent read FOnCustomDrawFooterCell - write SetOnCustomDrawFooterCell; - property OnCustomDrawHeaderCell: TdxGridReportLinkCustomDrawHeaderCellEvent read FOnCustomDrawHeaderCell - write SetOnCustomDrawHeaderCell; - property OnCustomDrawLevelCaption: TdxGridReportLinkCustomDrawLevelCaptionEvent read FOnCustomDrawLevelCaption - write SetOnCustomDrawLevelCaption; - property OnGetCellHeight: TdxGridReportLinkGetCellHeightEvent read FOnGetCellHeight write FOnGetCellHeight; - property OnGetCustomPageBreaks: TdxGridGetCustomPageBreaksEvent read FOnGetCustomPageBreaks write FOnGetCustomPageBreaks; - property OnInitializeBandCell: TdxGridReportLinkInitializeBandCellEvent read FOnInitializeBandCell - write FOnInitializeBandCell; - property OnInitializeCardRowCaptionCell: TdxGridReportLinkInitializeCardRowCaptionCellEvent read FOnInitializeCardRowCaptionCell - write FOnInitializeCardRowCaptionCell; - property OnInitializeCardRowDataCell: TdxGridReportLinkInitializeCardRowDataCellEvent read FOnInitializeCardRowDataCell - write FOnInitializeCardRowDataCell; - property OnInitializeCell: TdxGridReportLinkInitializeCellEvent read FOnInitializeCell - write FOnInitializeCell; -{$IFDEF CHARTVIEW} - property OnInitializeChartCell: TdxGridReportLinkInitializeChartCellEvent read FOnInitializeChartCell - write FOnInitializeChartCell; -{$ENDIF} - property OnInitializeFilterBar: TdxGridReportLinkInitializeFilterBarEvent read FOnInitializeFilterBar - write FOnInitializeFilterBar; - property OnInitializeFooterCell: TdxGridReportLinkInitializeFooterCellEvent read FOnInitializeFooterCell - write FOnInitializeFooterCell; - property OnInitializeHeaderCell: TdxGridReportLinkInitializeHeaderCellEvent read FOnInitializeHeaderCell - write FOnInitializeHeaderCell; - property OnInitializeLevelCaption: TdxGridReportLinkInitializeLevelCaptionEvent read FOnInitializeLevelCaption - write FOnInitializeLevelCaption; - end; - - TcxGridCardView2OptionsView = class(TcxGridCardViewOptionsView) - private - FCardBorders: Boolean; - FGridLineColor: TColor; - FGridLines: TcxGridLines; - FShadowDepth: Integer; - function GetShadowVisible: Boolean; - procedure SetCardBorders(Value: Boolean); - procedure SetGridLineColor(Value: TColor); - procedure SetGridLines(Value: TcxGridLines); - procedure SetShadowDepth(Value: Integer); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - property ShadowVisible: Boolean read GetShadowVisible; - published - property CardBorders: Boolean read FCardBorders write SetCardBorders default False; - property GridLineColor: TColor read FGridLineColor write SetGridLineColor default clDefault; - property GridLines: TcxGridLines read FGridLines write SetGridLines default glNone; - property ShadowDepth: Integer read FShadowDepth write SetShadowDepth; - end; - - TcxGridCardView2Styles = class(TcxGridCardViewStyles) - private - FOnGetCardShadowStyle: TcxGridGetRecordStyleEvent; - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - public - procedure Assign(Source: TPersistent); override; - procedure GetCardShadowParams(ARecord: TcxCustomGridRecord; out AParams: TcxViewParams); virtual; - published - property CardShadow: TcxStyle index vsCardShadow read GetValue write SetValue; - property OnGetCardShadowStyle: TcxGridGetRecordStyleEvent read FOnGetCardShadowStyle - write FOnGetCardShadowStyle; - end; - - TcxGridCardView2 = class(TcxGridCardView) - protected - function GetOptionsViewClass: TcxCustomGridOptionsViewClass; override; - function GetStylesClass: TcxCustomGridViewStylesClass; override; - function GetViewDataClass: TcxCustomGridViewDataClass; override; - function GetViewInfoClass: TcxCustomGridViewInfoClass; override; - end; - - TdxfmGridReportLinkDesignWindow = class(TdxfmCustomcxControlReportLinkDesignWindow) - PageControl1: TPageControl; - tshView: TTabSheet; - tshBehaviors: TTabSheet; - tshPreview: TTabSheet; - tshCards: TTabSheet; - lblShow: TLabel; - imgShow: TImage; - bvlShow: TBevel; - chbxShowBands: TCheckBox; - chbxShowHeaders: TCheckBox; - chbxShowFooters: TCheckBox; - chbxShowGroupFooters: TCheckBox; - chbxShowExpandButtons: TCheckBox; - lblOnEveryPage: TLabel; - imgOnEveryPage: TImage; - bvlOnEveryPage: TBevel; - chbxBandsOnEveryPage: TCheckBox; - chbxHeadersOnEveryPage: TCheckBox; - chbxFootersOnEveryPage: TCheckBox; - chbxFilterBarOnEveryPage: TCheckBox; - chbxCaptionsOnEveryPage: TCheckBox; - bvlWarningHost: TBevel; - lblSelection: TLabel; - imgSelection: TImage; - chbxProcessSelection: TCheckBox; - chbxProcessExactSelection: TCheckBox; - bvlSelection: TBevel; - lblExpanding: TLabel; - imgExpanding: TImage; - chbxExpandGroupRows: TCheckBox; - bvlExpanding: TBevel; - chbxExpandMasterRows: TCheckBox; - lblPreviewOptions: TLabel; - bvlPreviewOptions: TBevel; - chbxPreviewVisible: TCheckBox; - chbxPreviewAutoHeight: TCheckBox; - lblPreviewMaxLineCount: TLabel; - bvlPreviewMaxLineCountHost: TBevel; - chbxShowCaptions: TCheckBox; - chbxShowFilterBar: TCheckBox; - imgPreview: TImage; - chbxStartFromActiveView: TCheckBox; - chbxOnlyActiveView: TCheckBox; - lblDetails: TLabel; - bvlDetails: TBevel; - imgDetails: TImage; - tshFormatting: TTabSheet; - lblLookAndFeel: TLabel; - bvlLookAndFeel: TBevel; - imgLookAndFeel: TImage; - cbxLookAndFeel: TComboBox; - chbxFlatCheckMarks: TCheckBox; - chbxDisplayGraphicsAsText: TCheckBox; - chbxTransparentGraphics: TCheckBox; - imgRefinements: TImage; - lblRefinements: TLabel; - bvlRefinements: TBevel; - bvlCardSpaceVertHost: TBevel; - bvlCardSpaceHorzHost: TBevel; - lblCardSpaceVert: TLabel; - lblCardSpaceHorz: TLabel; - imgCardSpacing: TImage; - lblCardSpacing: TLabel; - bvlCardSpacing: TBevel; - bvlCardSizes: TBevel; - lblCardSizes: TLabel; - imgCardSizes: TImage; - chbxCardsKeepSameHeight: TCheckBox; - chbxCardsKeepSameWidth: TCheckBox; - chbxCardsAutoWidth: TCheckBox; - chbxCardsVertLines: TCheckBox; - chbxCardsHorzLines: TCheckBox; - chbxCardsBorder: TCheckBox; - imgCardFraming: TImage; - lblCardFraming: TLabel; - bvlCardFraming: TBevel; - bvlCardShadowColorHost: TBevel; - lblCardShadowDepth: TLabel; - bvlCardShadow: TBevel; - lblCardShadow: TLabel; - lblCardShadowColor: TLabel; - bvlCardShadowDepthHost: TBevel; - imgCardShadow: TImage; - pnlPreview: TPanel; - PreviewGrid: TcxGrid; - PreviewBandedView: TcxGridBandedTableView; - colVendorName: TcxGridBandedColumn; - colVendorLogo: TcxGridBandedColumn; - colVendorCountry: TcxGridBandedColumn; - colCarModel: TcxGridBandedColumn; - colIsSUVModel: TcxGridBandedColumn; - PreviewGridLevel: TcxGridLevel; - chbxLevelsUnwrap: TCheckBox; - imgLevels: TImage; - lblLevels: TLabel; - bvlLevels: TBevel; - chbxLevelsUnwrapTopLevel: TCheckBox; - chbxLevelsRiseActiveLevelOntoTop: TCheckBox; - chbxSuppressBackgroundBitmaps: TCheckBox; - tshStyles: TTabSheet; - btnStyleColor: TButton; - btnStyleFont: TButton; - btnStyleBackgroundBitmap: TButton; - chbxUseNativeStyles: TCheckBox; - bvlStyles: TBevel; - pmStyles: TPopupMenu; - miStyleFont: TMenuItem; - miStyleBackgroundBitmap: TMenuItem; - miStyleColor: TMenuItem; - bvlStyleSheets: TBevel; - lblStyleSheets: TLabel; - cbxStyleSheets: TComboBox; - btnStyleSheetNew: TButton; - btnStyleSheetCopy: TButton; - btnStyleSheetDelete: TButton; - milLine: TMenuItem; - miStylesSaveAs: TMenuItem; - btnStylesSaveAs: TButton; - btnStyleSheetRename: TButton; - miStyleBackgroundBitmapClear: TMenuItem; - btnStyleBackgroundBitmapClear: TButton; - btnStyleRestoreDefaults: TButton; - miStyleRestoreDefaults: TMenuItem; - miLine2: TMenuItem; - miLine3: TMenuItem; - bvlStylesHost: TBevel; - ilStylesPopup: TImageList; - miStylesSelectAll: TMenuItem; - miLine4: TMenuItem; - lblGridSize: TLabel; - bvlGridSize: TBevel; - imgGridSize: TImage; - chbxGridAutoWidth: TCheckBox; - chbxConsumeSelectionStyle: TCheckBox; - bvlRefinementsSeparator: TBevel; - lblPagination: TLabel; - bvlPagination: TBevel; - imgPagination: TImage; - chbxPaginateOneGroupPerPage: TCheckBox; - chbxPaginateByTopLevelGroups: TCheckBox; - lblPreviewWindow: TStaticText; - cxStyleRepository1: TcxStyleRepository; - styleCardShadow: TcxStyle; - styleCardBorder: TcxStyle; - Label1: TLabel; - chbxExpandCards: TCheckBox; - lblUseNativeStyles: TLabel; - tshCharts: TTabSheet; - lblChartsOptions: TLabel; - imgCharts: TImage; - chbxChartsTransparent: TCheckBox; - bvlChartsOptions: TBevel; - procedure OptionsViewClick(Sender: TObject); - procedure OptionsOnEveryPageClick(Sender: TObject); - procedure OptionsSelectionClick(Sender: TObject); - procedure OptionsExpandingClick(Sender: TObject); - procedure OptionsRefinementClick(Sender: TObject); - procedure LookAndFeelClick(Sender: TObject); - procedure PreviewVisibleClick(Sender: TObject); - procedure PreviewAutoHeightClick(Sender: TObject); - procedure OptionsCardsClick(Sender: TObject); - procedure IsSUVModelCustomDrawCell(Sender: TcxCustomGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; - var ADone: Boolean); - procedure VendorLogoCustomDrawCell(Sender: TcxCustomGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; - var ADone: Boolean); - procedure PreviewBandedViewCustomDrawColumnHeader( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); - procedure PreviewBandedViewCustomDrawBandHeader( - Sender: TcxGridBandedTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridBandHeaderViewInfo; var ADone: Boolean); - procedure PreviewBandedViewCustomDrawFooterCell( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); - procedure OptionsDetailsClick(Sender: TObject); - procedure OptionsSizeClick(Sender: TObject); - procedure OptionsLevelsClick(Sender: TObject); - procedure OptionsFormatingClick(Sender: TObject); - procedure StyleColorClick(Sender: TObject); - procedure StyleFontClick(Sender: TObject); - procedure StyleBackgroundBitmapClick(Sender: TObject); - procedure lbxStylesClick(Sender: TObject); - procedure pmStylesPopup(Sender: TObject); - procedure cbxStyleSheetsClick(Sender: TObject); - procedure StyleSheetNewClick(Sender: TObject); - procedure StyleSheetCopyClick(Sender: TObject); - procedure StyleSheetDeleteClick(Sender: TObject); - procedure StylesSaveAsClick(Sender: TObject); - procedure cbxStyleSheetsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure StyleSheetRenameClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure StyleBackgroundBitmapClearClick(Sender: TObject); - procedure StyleRestoreDefaultsClick(Sender: TObject); - procedure miStylesSelectAllClick(Sender: TObject); - procedure OptionsPaginationClick(Sender: TObject); - procedure cbxStyleSheetsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure lblUseNativeStylesClick(Sender: TObject); - procedure chbxChartsTransparentClick(Sender: TObject); - private - ccbxCardsShadowColor: TdxPSColorCombo; - lbxStyles: TdxStylesListBox; - PreviewCardView: TcxGridCardView2; - rowVendorName: TcxGridCardViewRow; - rowVendorLogo: TcxGridCardViewRow; - rowVendorCountry: TcxGridCardViewRow; - rowCarModel: TcxGridCardViewRow; - rowIsSuvModel: TcxGridCardViewRow; - seCardsShadowDepth: TdxPSSpinEdit; - seCardsSpaceHorz: TdxPSSpinEdit; - seCardsSpaceVert: TdxPSSpinEdit; - sePreviewMaxLineCount: TdxPSSpinEdit; - wpIncorrectOnEveryPageState: TdxPSWarningPane; - - function GetActiveStyle: TcxStyle; - function GetHasSelectedStyles: Boolean; - function GetHasSelectedStylesWithAssignedBitmap: Boolean; - function GetReportLink: TdxGridReportLink; - - procedure CardShadowDepthChanged(Sender: TObject); - procedure CardShadowColorChanged(Sender: TObject); - procedure CardSpaceHorzChanged(Sender: TObject); - procedure CardSpaceVertChanged(Sender: TObject); - procedure PreviewMaxLineCountChanged(Sender: TObject); - - function CanSelectAllStyles: Boolean; - procedure ChangeActiveView(AView: TcxCustomGridView); - procedure CreateCardView; - procedure CreateControls; - procedure CustomDrawBorders(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo); - procedure CustomDrawFooter(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxCustomGridCellViewInfo); - procedure CustomDrawHeader(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxCustomGridCellViewInfo); - procedure CustomDrawTextRect(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxCustomGridCellViewInfo; - ABackgroundBitmap: TBitmap); - procedure InitializePreviewGrid; - procedure InitializePreviewGridStyles; - procedure LoadDataIntoPreviewGridView(AView: TcxCustomGridTableView); - procedure RecreateStylesListBox; - procedure RestoreSelectedStyles(AList: TList); - procedure SaveSelectedStyles(AList: TList); - procedure SetActivePage; - procedure UpdatePreviewGridStyles(const ACaption: string; AStyle: TcxStyle); - procedure UpdateWarningPane; - - procedure SetOptionsCardsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsChartsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsDetailsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsExpandingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsFormattingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsLevelsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsOnEveryPageByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsPaginationByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsRefinementsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsSelectionByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsSizeByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsViewByIndex(Index: Integer; Value: Boolean); - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - - function GetDesignerTabIndex: Integer; override; - procedure SetDesignerTabIndex(Value: Integer); override; - - procedure DoActiveStyleSheetChanged; override; - procedure DoFormActivated(AnActive: Boolean); override; - procedure DoRefreshStylesList; override; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); override; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); override; - - procedure GetSelectedStyleNames(AStrings: TStrings); override; - procedure GetStyleNames(out AStrings: TStrings); override; - procedure GetStyleSheetNames(out AStrings: TStrings); override; - - property ActiveStyle: TcxStyle read GetActiveStyle; - property HasSelectedStyles: Boolean read GetHasSelectedStyles; - property HasSelectedStylesWithAssignedBitmap: Boolean read GetHasSelectedStylesWithAssignedBitmap; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property ReportLink: TdxGridReportLink read GetReportLink; - end; - -implementation - -{$R *.DFM} - -{658 x 466 - DesignWindow} - -{.2 - IsOffice11StyleGrouping} -{.3 - chbxTransparentRichEdits} - -uses - Registry, Forms, {$IFDEF DELPHI6}Variants, {$ENDIF}cxVariants, cxGridStrs, - cxDataUtils, dxThemeManager, {$IFDEF DXVER500}dxOffice11, {$ENDIF}dxPSGlbl, - cxDrawTextUtils, dxPSUtl, dxBkgnd, dxPSPopupMan, dxPSRes, dxPSImgs; - -const - SortOrderMap: array[TcxGridSortOrder] of TdxCellSortOrder = (csoNone, csoUp, csoDown); - - ExpandButtonInteriorColor = clBtnFace; - DefaultFilterBarColor = clBtnShadow; - DefaultFilterBarTextColor = clWindow; - DefaultIndentWidth = 20; - DefaultDataRowLineHeight = 19; - DefaultGroupFooterLineHeight = 20; - DefaultGroupRowLineHeight = 20; - DefaultFooterLineHeight = 20; - FilterBarTextOffset = 3; - FirstCardOffset = 2; - FooterItemInflateHorz = 2; - FooterItemInflateVert = 3; - TabsAreaOffset = 2; - -var - FGridLinkStyleSheetPrototype: TdxGridReportLinkStyleSheet; - -type - TdxPSGridDataCellPos = TcxGridDataCellPos; - - TdxGridViewBuildersFactory = class(TdxCustomClassMaps) - private - function GetBuilderClass(GridView: TcxCustomGridView): TdxGridViewBuilderClass; - public - class function Instance: TdxGridViewBuildersFactory; reintroduce; overload; - function CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; - function CreateViewBuilder(AReportLink: TdxGridReportLink; AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; - property BuilderClasses[GridView: TcxCustomGridView]: TdxGridViewBuilderClass read GetBuilderClass; default; - end; - - TdxViewHelpersFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(GridView: TcxCustomGridView): TdxCustomGridViewHelperClass; - public - class function Instance: TdxViewHelpersFactory; reintroduce; overload; - function HelperClassByItem(AnItem: TdxReportVisualItem): TdxCustomGridViewHelperClass; - property HelperClasses[GridView: TcxCustomGridView]: TdxCustomGridViewHelperClass read GetHelperClass; default; - end; - - TdxRecordHelpersFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(GridRecord: TcxCustomGridRecord): TdxCustomGridRecordHelperClass; - public - class function Instance: TdxRecordHelpersFactory; reintroduce; overload; - property HelperClasses[GridRecord: TcxCustomGridRecord]: TdxCustomGridRecordHelperClass read GetHelperClass; default; - end; - - - TcxCustomGridCellPainterAccess = class(TcxCustomGridCellPainter); - TcxCustomGridCellViewInfoAccess = class(TcxCustomGridCellViewInfo); - TcxCustomGridRecordAccess = class(TcxCustomGridRecord); - TcxCustomGridTableControllerAccess = class(TcxCustomGridTableController); - TcxCustomGridTableItemAccess = class(TcxCustomGridTableItem); - {$IFDEF DXVER500} - TcxCustomGridTableFilteringAccess = class(TcxCustomGridTableFiltering); - {$ENDIF} - TcxCustomGridTableOptionsViewAccess = class(TcxCustomGridTableOptionsView); - TcxCustomGridViewAccess = class(TcxCustomGridView); - TcxGridColumnAccess = class(TcxGridColumn); - TcxGridMasterDataRowAccess = class(TcxGridMasterDataRow); - TcxGridTableViewInfoAccess = class(TcxGridTableViewInfo); - - -{ Helpers } - -{ CustomGridCellPainter Helpers } - -procedure CustomGridCellPainter_DrawBorders(AInstance: TcxCustomGridCellPainter); -begin - TcxCustomGridCellPainterAccess(AInstance).DrawBorders; -end; - -{ CustomGridCellViewInfo Helpers } - -function CustomGridCellViewInfo_GetPainterClass(AInstance: TcxCustomGridCellViewInfo): TcxCustomGridCellPainterClass; -begin - Result := TcxCustomGridCellViewInfoAccess(AInstance).GetPainterClass; -end; - -{ CustomGridRecord Helpers } - -function CustomGridRecord_GetIsParent(AInstance: TcxCustomGridRecord): Boolean; -begin - Result := TcxCustomGridRecordAccess(AInstance).IsParent; -end; - -{ CustomGridTableController Helpers } - -function CustomGridTableController_GetMultiSelect(AInstance: TcxCustomGridTableController): Boolean; -begin - Result := TcxCustomGridTableControllerAccess(AInstance).MultiSelect; -end; - -{ CustomGridTableFiltering Helpers } - -function CustomGridTableFiltering_GetPosition(AInstance: TcxCustomGridTableFiltering): TcxGridFilterPosition; -begin - Result := TcxCustomGridTableFilteringAccess(AInstance).Position; -end; - -{ CustomGridTableOptionsView Helpers } - -function CustomGridTableOptionsView_GetCellAutoHeight(AInstance: TcxCustomGridTableOptionsView): Boolean; -begin - Result := TcxCustomGridTableOptionsViewAccess(AInstance).CellAutoHeight; -end; - -{ CustomGridView Helpers } - -function CustomGridView_GetBackgroundBitmaps(AInstance: TcxCustomGridView): TcxCustomGridBackgroundBitmaps; -begin - Result := TcxCustomGridViewAccess(AInstance).BackgroundBitmaps; -end; - -function CustomGridView_GetDataController(AInstance: TcxCustomGridView): TcxCustomDataController; -begin - Result := TcxCustomGridViewAccess(AInstance).DataController; -end; - -function CustomGridView_GetStyles(AInstance: TcxCustomGridView): TcxCustomGridStyles; -begin - Result := TcxCustomGridViewAccess(AInstance).Styles; -end; - -{ GridColumn Helpers } - -function GridColumn_GetFixed(AInstance: TcxGridColumn): Boolean; -begin - Result := TcxGridColumnAccess(AInstance).Fixed; -end; - -function GridColumn_DoCompareValuesForCellMerging(AInstance: TcxGridColumn; - ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: TcxEditValue; - ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: TcxEditValue): Boolean; -begin - Result := TcxGridColumnAccess(AInstance).DoCompareValuesForCellMerging(ARow1, AProperties1, AValue1, ARow2, AProperties2, AValue2); -end; - -{ GridMasterDataRow Helpers } - -procedure GridMasterDataRow_DoExpand(AInstance: TcxGridMasterDataRow; ARecurse: Boolean); -begin - TcxGridMasterDataRowAccess(AInstance).DoExpand(ARecurse); -end; - -{ GridTableViewInfo Helpers } - -procedure GridTableViewInfo_CalculateExpandButtonParams(AInstance: TcxGridTableViewInfo); -begin - TcxGridTableViewInfoAccess(AInstance).CalculateExpandButtonParams; -end; - -{ Utilities } - -function GridLinkStyleSheetPrototype: TdxGridReportLinkStyleSheet; - - function CreateStyle(AColor, AFontColor: TColor): TcxStyle; - begin - Result := TcxStyle.Create(FGridLinkStyleSheetPrototype); - with Result do - begin - Color := AColor; - Font.Name := dxPSCore.dxPSDefaultFontName; - Font.Color := AFontColor; - end; - end; - -begin - if FGridLinkStyleSheetPrototype = nil then - begin - FGridLinkStyleSheetPrototype := TdxGridReportLinkStyleSheet.Create(nil); - with FGridLinkStyleSheetPrototype.Styles as TdxGridReportLinkStyles do - begin - BandHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Caption := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - CardCaptionRow := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - CardRowCaption := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Content := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ContentEven := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ContentOdd := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - FilterBar := CreateStyle(clBtnShadow, dxPSCore.dxDefaultContentColor); - Footer := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Group := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Header := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Preview := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - Selection := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - end; - end; - Result := FGridLinkStyleSheetPrototype; -end; - -function CreatePSDataCellPos: TdxPSGridDataCellPos; -begin - Result := TdxPSGridDataCellPos.Create; -end; - -procedure FreePSDataCellPos(out ADataCellPos: TdxPSGridDataCellPos); -begin - FreeAndNil(ADataCellPos); -end; - -procedure _LoadAllRecords(ADBDataModeController: TcxDBDataModeController; - out APrevAllRecordsAreLoaded: Boolean); -begin - APrevAllRecordsAreLoaded := not ADBDataModeController.GridMode; - if not APrevAllRecordsAreLoaded then - ADBDataModeController.GridMode := False; -end; - -procedure _UnloadAllRecords(ADBDataModeController: TcxDBDataModeController; - const APrevAllRecordsAreLoaded: Boolean); -begin - if not APrevAllRecordsAreLoaded then - ADBDataModeController.GridMode := True; -end; - -{ TdxGridViewBuildersFactory } - -function dxGridViewBuildersFactory: TdxGridViewBuildersFactory; -begin - Result := TdxGridViewBuildersFactory.Instance; -end; - -class function TdxGridViewBuildersFactory.Instance: TdxGridViewBuildersFactory; -begin - Result := inherited Instance as TdxGridViewBuildersFactory; -end; - -function TdxGridViewBuildersFactory.CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := BuilderClasses[AGridView].CreateAdapter(AMasterAdapter, AGridView); -end; - -function TdxGridViewBuildersFactory.CreateViewBuilder(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; -begin - Result := BuilderClasses[AGridView].Create(AReportLink, AMasterBuilder, AGridView); -end; - -function TdxGridViewBuildersFactory.GetBuilderClass(GridView: TcxCustomGridView): TdxGridViewBuilderClass; -begin - Result := TdxGridViewBuilderClass(PairClasses[GridView.ClassType]); -end; - -{ TdxViewHelpersFactory } - -function dxViewHelpersFactory: TdxViewHelpersFactory; -begin - Result := TdxViewHelpersFactory.Instance; -end; - -class function TdxViewHelpersFactory.Instance: TdxViewHelpersFactory; -begin - Result := inherited Instance as TdxViewHelpersFactory; -end; - -function TdxViewHelpersFactory.HelperClassByItem(AnItem: TdxReportVisualItem): TdxCustomGridViewHelperClass; -begin - Result := HelperClasses[TcxCustomGridView(AnItem.TopLevelParent.Data)]; -end; - -function TdxViewHelpersFactory.GetHelperClass(GridView: TcxCustomGridView): TdxCustomGridViewHelperClass; -begin - if GridView = nil then - Result := nil - else - Result := TdxCustomGridViewHelperClass(PairClasses[GridView.ClassType]); -end; - -{ TdxRecordHelpersFactory } - -function dxRecordHelpersFactory: TdxRecordHelpersFactory; -begin - Result := TdxRecordHelpersFactory.Instance; -end; - -class function TdxRecordHelpersFactory.Instance: TdxRecordHelpersFactory; -begin - Result := inherited Instance as TdxRecordHelpersFactory; -end; - -function TdxRecordHelpersFactory.GetHelperClass(GridRecord: TcxCustomGridRecord): TdxCustomGridRecordHelperClass; -begin - Result := TdxCustomGridRecordHelperClass(PairClasses[GridRecord.ClassType]); -end; - -{ CLR Accesssors } - - - -{ TdxCustomGridViewHelper } - -constructor TdxCustomGridViewHelper.Create(AView: TcxCustomGridView); -begin - inherited Create; - FView := AView; -end; - -class function TdxCustomGridViewHelper.PairClass: TClass; -begin - Result := ViewClass; -end; - -class procedure TdxCustomGridViewHelper.Register; -begin - dxViewHelpersFactory.Register(Self); -end; - -class procedure TdxCustomGridViewHelper.Unregister; -begin - dxViewHelpersFactory.Unregister(Self); -end; - -class function TdxCustomGridViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := dxGridUndefinedID; - if TClass(AnItem.Data) = TdxGridLevelCaption then - Result := dxGridLevelCaptionID; -end; - -class procedure TdxCustomGridViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - with ACustomDrawInfo do - begin - GridAttributeID := ExtractCustomDrawID(AnItem); - GridView := ExtractGridView(AnItem); - end; -end; - -class function TdxCustomGridViewHelper.ExtractGridView(AnItem: TdxReportVisualItem): TcxCustomGridView; -begin - Result := TcxCustomGridView(AnItem.TopLevelParent.Data); -end; - -class function TdxCustomGridViewHelper.IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; -var - Attributes: TdxGridAttributeClasses; - I: Integer; -begin - Attributes := SupportedAttributes; - - Result := True; - for I := Low(Attributes) to High(Attributes) do - if Attributes[I] = AnAttribute then Exit; - Result := False; -end; - -class function TdxCustomGridViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - SetLength(Result, 0); - AddAttribute(Result, TdxGridLevelCaption); -end; - -class procedure TdxCustomGridViewHelper.AddAttribute(var AnAtributes: TdxGridAttributeClasses; - AnAttribute: TdxGridAttributeClass); -begin - SetLength(AnAtributes, Length(AnAtributes) + 1); - AnAtributes[Length(AnAtributes) - 1] := AnAttribute; -end; - -{$IFDEF DXVER500} -class function TdxCustomGridViewHelper.FilterPosition(AView: TcxCustomGridView): TcxGridFilterPosition; -begin - Result := fpBottom; -end; -{$ENDIF} - -class function TdxCustomGridViewHelper.IsFilterBarAtBottom(AView: TcxCustomGridView): Boolean; -begin - {$IFDEF DXVER500} - Result := FilterPosition(AView) = fpBottom; - {$ELSE} - Result := True; - {$ENDIF} -end; - -class function TdxCustomGridViewHelper.IsFilterBarAtTop(AView: TcxCustomGridView): Boolean; -begin - {$IFDEF DXVER500} - Result := FilterPosition(AView) = fpTop; - {$ELSE} - Result := False; - {$ENDIF} -end; - -class function TdxCustomGridViewHelper.IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; -begin - Result := False; -end; - -class function TdxCustomGridViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -{ TdxNullGridViewHelper } - -class function TdxNullGridViewHelper.IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := True; -end; - -class function TdxNullGridViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := nil; -end; - -{ TdxCustomGridTableViewHelper } - -class function TdxCustomGridTableViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if TClass(AnItem.Data) = TdxGridFilterBar then - Result := dxGridFilterBarID; -end; - -class function TdxCustomGridTableViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - Result := inherited SupportedAttributes; - AddAttribute(Result, TdxGridFilterBar); -end; - -class function TdxCustomGridTableViewHelper.ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; -begin - Result := nil; -end; - -{$IFDEF DXVER500} -class function TdxCustomGridTableViewHelper.FilterPosition(AView: TcxCustomGridView): TcxGridFilterPosition; -begin - Result := CustomGridTableFiltering_GetPosition(TcxCustomGridTableView(AView).Filtering); -end; -{$ENDIF} - -class function TdxCustomGridTableViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridTableView; -end; - -{ TdxGridCardViewHelper } - -class function TdxGridCardViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if (AnItem.Parent <> nil) and (AnItem.Parent is TdxReportCardRow) then - if TClass(AnItem.Data) = TdxGridCardRowCaption then - Result := dxGridCardRowCaptionID - else - Result := dxGridCardRowDataID; -end; - -class procedure TdxGridCardViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - with ACustomDrawInfo do - try - inherited; - if GridAttributeID in [dxGridCardRowCaptionID, dxGridCardRowDataID] then - begin - GridCard := ExtractCard(AnItem); - GridCardRow := ExtractCardRow(AnItem); - end; - except - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - GridAttributeID := dxGridUndefinedID; - end; -end; - -class function TdxGridCardViewHelper.ExtractCard(AnItem: TdxReportVisualItem): TcxGridCard; -begin - Result := ExtractRecord(AnItem) as TcxGridCard; -end; - -class function TdxGridCardViewHelper.ExtractCardRow(AnItem: TdxReportVisualItem): TcxGridCardViewRow; -begin - Result := TdxReportCardRow(AnItem.Parent).GridCardRow; -end; - -class function TdxGridCardViewHelper.ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; -begin - Result := TdxReportCard(AnItem.Parent.Parent).GridCard; -end; - -class function TdxGridCardViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -{ TdxGridTableViewHelper } - -class function TdxGridTableViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if AnItem.Parent <> nil then - if TClass(AnItem.Parent.Data) = TdxGridHeader then - Result := dxGridHeaderID - else - if TClass(AnItem.Parent.Data) = TdxGridFooter then - Result := dxGridFooterID - else - if IsDelphiObject(AnItem.Data) and (TObject(AnItem.Data) is TcxCustomGridTableItem) then - if (AnItem.Parent.Parent <> nil) and (AnItem.Parent.Parent.Data >= 0) and - (AnItem.Parent.Parent.Data < High(Byte)) then - Result := dxGridGroupFooterID - else - Result := dxGridRecordID; -end; - -class procedure TdxGridTableViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - with ACustomDrawInfo do - try - inherited; - - if GridAttributeID in [dxGridFooterID, dxGridGroupFooterID, dxGridHeaderID, dxGridRecordID] then - begin - GridColumn := ExtractColumn(AnItem); - if GridAttributeID in [dxGridRecordID, dxGridGroupFooterID] then - begin - GridRecord := ExtractRecord(AnItem); - if GridAttributeID = dxGridGroupFooterID then - GroupLevel := ExtractGroupLevel(AnItem); - end - else - GroupLevel := -1; - end; - except - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - GridAttributeID := dxGridUndefinedID; - end; -end; - -class function TdxGridTableViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - Result := inherited SupportedAttributes; - AddAttribute(Result, TdxGridDetails); - AddAttribute(Result, TdxGridExpandButton); - AddAttribute(Result, TdxGridFooter); - AddAttribute(Result, TdxGridGroupFooter); - AddAttribute(Result, TdxGridGroupRow); - AddAttribute(Result, TdxGridHeader); - AddAttribute(Result, TdxGridPreview); -end; - -class function TdxGridTableViewHelper.ExtractColumn(AnItem: TdxReportVisualItem): TcxGridColumn; -begin - Result := TcxGridColumn(AnItem.Data); -end; - -class function TdxGridTableViewHelper.ExtractGroupLevel(AnItem: TdxReportVisualItem): Integer; -begin - Result := Integer(AnItem.Parent.Parent.Data); -end; - -class function TdxGridTableViewHelper.ExtractRecord(AnItem: TdxReportVisualItem): TcxCustomGridRecord; -begin - Result := TcxCustomGridRecord(AnItem.Parent.Data); -end; - -class function TdxGridTableViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridTableView; -end; - -class function TdxGridTableViewHelper.IsOffice11StyleGrouping(AView: TcxCustomGridView): Boolean; -begin - {$IFDEF DXVER500} - Result := TcxGridTableView(AView).OptionsView.GroupRowStyle = grsOffice11; - {$ELSE} - Result := False; - {$ENDIF} -end; - -{ TdxGridBandedTableViewHelper } - -class function TdxGridBandedTableViewHelper.ExtractCustomDrawID(AnItem: TdxReportVisualItem): TdxGridAttributeID; -begin - Result := inherited ExtractCustomDrawID(AnItem); - if Result = dxGridUndefinedID then - if IsDelphiObject(AnItem.Data) and (TObject(AnItem.Data) is TcxGridBand) then - Result := dxGridBandID; -end; - -class procedure TdxGridBandedTableViewHelper.ExtractCustomDrawInfo(AnItem: TdxReportVisualItem; - out ACustomDrawInfo: TdxGridCellCustomDrawInfo); -begin - with ACustomDrawInfo do - try - inherited; - if GridAttributeID = dxGridBandID then - GridBand := ExtractBand(AnItem); - except - FillChar(ACustomDrawInfo, SizeOf(ACustomDrawInfo), 0); - GridAttributeID := dxGridUndefinedID; - end; -end; - -class function TdxGridBandedTableViewHelper.SupportedAttributes: TdxGridAttributeClasses; -begin - Result := inherited SupportedAttributes; - AddAttribute(Result, TdxGridBandHeader); -end; - -class function TdxGridBandedTableViewHelper.ExtractBand(AnItem: TdxReportVisualItem): TcxGridBand; -begin - Result := TcxGridBand(AnItem.Data); -end; - -class function TdxGridBandedTableViewHelper.ViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridBandedTableView; -end; - -{ TdxCustomGridRecordHelper } - -constructor TdxCustomGridRecordHelper.Create(AAdapter: TdxCustomGridTableViewAdapter); -begin - inherited Create; - FAdapter := AAdapter; -end; - -class function TdxCustomGridRecordHelper.PairClass: TClass; -begin - Result := RecordClass; -end; - -class procedure TdxCustomGridRecordHelper.Register; -begin - dxRecordHelpersFactory.Register(Self); -end; - -class procedure TdxCustomGridRecordHelper.Unregister; -begin - dxRecordHelpersFactory.Unregister(Self); -end; - -function TdxCustomGridRecordHelper.Adapter: TdxCustomGridTableViewAdapter; -begin - Result := FAdapter; -end; - -class function TdxCustomGridRecordHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewCustomDataRowProducer; -end; - -class function TdxCustomGridRecordHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxCustomGridRecord; -end; - -{$IFDEF DXVER500} - -function TdxCustomGridRecordHelper.GetCanCellMergingAsMaster: Boolean; -begin - Result := True; -end; - -function TdxCustomGridRecordHelper.GetCanCellMergingAsSlave: Boolean; -begin - Result := True; -end; - -{$ENDIF} - -function TdxCustomGridRecordHelper.GetHasDetails: Boolean; -begin - Result := False; -end; - -{$IFDEF DXVER500} - -function TdxCustomGridRecordHelper.GetHasExpandButton: Boolean; -begin - Result := False; -end; - -{$ENDIF} - -function TdxCustomGridRecordHelper.GetHasSelectedChildren: Boolean; -begin - Result := False; -end; - -{$IFDEF DXVER500} - -function TdxCustomGridRecordHelper.GetIsCellMergingSeparator: Boolean; -begin - Result := False; -end; - -{$ENDIF} - -function TdxCustomGridRecordHelper.GetParent: TcxCustomGridRecord; -var - I: Integer; -begin - for I := GridRecord.Index - 1 downto 0 do - begin - Result := Adapter.Records[I]; - if CustomGridRecord_GetIsParent(Result) and (Result.Level < GridRecord.Level) then - Exit; - end; - Result := nil; -end; - -{ TdxCustomGridRowHelper } - -function TdxCustomGridRowHelper.Adapter: TdxGridTableViewAdapter; -begin - Result := inherited Adapter as TdxGridTableViewAdapter; -end; - -class function TdxCustomGridRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxCustomGridRow; -end; - -{ TdxGridDataRowHelper } - -class function TdxGridDataRowHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewDataRowProducer; -end; - -class function TdxGridDataRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxGridDataRow; -end; - -function TdxGridDataRowHelper.GetRow: TcxGridDataRow; -begin - Result := inherited GridRecord as TcxGridDataRow; -end; - -{ TdxGridGroupRowHelper } - -class function TdxGridGroupRowHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewGroupRowProducer; -end; - -class function TdxGridGroupRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxGridGroupRow; -end; - -{$IFDEF DXVER500} - -function TdxGridGroupRowHelper.GetCanCellMergingAsMaster: Boolean; -begin - Result := False; -end; - -function TdxGridGroupRowHelper.GetCanCellMergingAsSlave: Boolean; -begin - Result := False; -end; - -function TdxGridGroupRowHelper.GetHasExpandButton: Boolean; -begin - Result := not (dcoGroupsAlwaysExpanded in Adapter.DataController.Options); -end; - -{$ENDIF} - -function TdxGridGroupRowHelper.GetHasSelectedChildren: Boolean; -var - GroupLevel, I: Integer; - Row: TcxCustomGridRow; -begin - GroupLevel := GroupRow.Level; - for I := GroupRow.Index + 1 to Adapter.RowCount - 1 do - begin - Row := Adapter.Rows[I]; - if Row.Level <= GroupLevel then Break; - Result := Row.Selected or Adapter.RecordHelpers[Row].HasSelectedChildren; //!!! - if Result then Exit; - end; - Result := False; -end; - -function TdxGridGroupRowHelper.GetGroupRow: TcxGridGroupRow; -begin - Result := inherited GridRecord as TcxGridGroupRow; -end; - -{ TdxGridMasterDataRowHelper } - -class function TdxGridMasterDataRowHelper.ProducerClass: TdxGridTableViewCustomDataRowProducerClass; -begin - Result := TdxGridTableViewMasterRowProducer; -end; - -class function TdxGridMasterDataRowHelper.RecordClass: TcxCustomGridRecordClass; -begin - Result := TcxGridMasterDataRow; -end; - -{$IFDEF DXVER500} - -function TdxGridMasterDataRowHelper.GetCanCellMergingAsMaster: Boolean; -begin - Result := not MasterRow.Expanded; -end; - -{$ENDIF} - -function TdxGridMasterDataRowHelper.GetHasDetails: Boolean; -begin - Result := MasterRow.Expanded;// and MasterRow.ActiveDetailGridViewExists //!!! -end; - -{$IFDEF DXVER500} - -function TdxGridMasterDataRowHelper.GetHasExpandButton: Boolean; -begin - Result := True; -end; - -{$ENDIF} - -function TdxGridMasterDataRowHelper.GetHasSelectedChildren: Boolean; -begin - Result := MasterRow.Expanded; - if Result then - with dxGridViewBuildersFactory.CreateViewAdapter(Adapter, DetailView) do - try - Result := HasSelectedRecords; - finally - Free; - end; -end; - -{$IFDEF DXVER500} - -function TdxGridMasterDataRowHelper.GetIsCellMergingSeparator: Boolean; -begin - Result := MasterRow.Expanded; -end; - -{$ENDIF} - -function TdxGridMasterDataRowHelper.GetDetailView: TcxCustomGridView; -begin - if HasDetails then - Result := MasterRow.ActiveDetailGridView - else - Result := nil; -end; - -function TdxGridMasterDataRowHelper.GetMasterRow: TcxGridMasterDataRow; -begin - Result := inherited GridRecord as TcxGridMasterDataRow; -end; - -{ TdxRecordHelpersCache } - -constructor TdxRecordHelpersCache.Create(AAdapter: TdxCustomGridTableViewAdapter); -begin - inherited Create; - FAdapter := AAdapter; -end; - -function TdxRecordHelpersCache.IndexOf(ARecord: TcxCustomGridRecord): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].RecordClass = ARecord.ClassType then - Exit; - - Result := Add(dxRecordHelpersFactory.HelperClasses[ARecord].Create(Adapter)); -end; - -function TdxRecordHelpersCache.GetHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; -begin - Result := Items[IndexOf(ARecord)]; - Result.GridRecord := ARecord; -end; - -function TdxRecordHelpersCache.GetItem(Index: Integer): TdxCustomGridRecordHelper; -begin - Result := TdxCustomGridRecordHelper(inherited Items[Index]); -end; - -{ TdxProducerCache } - -constructor TdxProducerCache.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TdxProducerCache.IndexOf(AProducerClass: TdxGridViewRowProducerClass): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].ClassType = AProducerClass then Exit; - - Result := Add(AProducerClass.Create(Builder)); -end; - -function TdxProducerCache.GetProducer(ProducerClass: TdxGridViewRowProducerClass): TdxGridViewRowProducer; -begin - Result := Items[IndexOf(ProducerClass)]; -end; - -function TdxProducerCache.GetItem(Index: Integer): TdxGridViewRowProducer; -begin - Result := inherited Items[Index] as TdxGridViewRowProducer; -end; - -{ TdxCustomGridViewAdapter } - -constructor TdxCustomGridViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited Create; - FMasterAdapter := AMasterAdapter; - FGridView := AGridView; - FGridView.SizeChanged(True, True); //!? -end; - -function TdxCustomGridViewAdapter.GridView: TcxCustomGridView; -begin - Result := FGridView; -end; - -class function TdxCustomGridViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -function TdxCustomGridViewAdapter.Styles: TcxCustomGridStyles; -begin - Result := CustomGridView_GetStyles(GridView); -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; - ARecursive: Boolean); -begin - Grid.BeginUpdate; - try - ExpandAllRowsInLevel(GridLevel, AnOptionsExpanding.ExpandMasterRows, - AnOptionsExpanding.ExpandGroupRows, ARecursive); - finally - Grid.EndUpdate; - end; -end; - -procedure TdxCustomGridViewAdapter.AfterBuilding; -begin - //GridView.CancelUpdate; -end; - -procedure TdxCustomGridViewAdapter.BeforeBuilding; -begin - //GridView.BeginUpdate; -end; - -function TdxCustomGridViewAdapter.BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; -begin - Result := CustomGridView_GetBackgroundBitmaps(GridView); -end; - -function TdxCustomGridViewAdapter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - if IsBackgroundBitmapSupported(Index) then - Result := BackgroundBitmaps.GetBitmap(Index) - else - Result := nil -end; - -function TdxCustomGridViewAdapter.HasBackgroundBitmap(Index: Integer): Boolean; -var - Bitmap: TBitmap; -begin - Bitmap := BackgroundBitmaps.GetBitmap(Index); - Result := (Bitmap <> nil) and not Bitmap.Empty; -end; - -function TdxCustomGridViewAdapter.IsBackgroundBitmapSupported(Index: Integer): Boolean; -begin - Result := Index <> bbTabs; -end; - -function TdxCustomGridViewAdapter.Controller: TcxCustomGridController; -begin - Result := GridView.Controller; -end; - -function TdxCustomGridViewAdapter.DataController: TcxCustomDataController; -begin - Result := CustomGridView_GetDataController(GridView); -end; - -function TdxCustomGridViewAdapter.CreateCloneAdapter(AClone: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := dxGridViewBuildersFactory.CreateViewAdapter(MasterAdapter, AClone); -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInGridView(AGridView: TcxCustomGridView; - AMasterRows, AGroupRows: Boolean); -begin - if AGridView = nil then Exit; - with dxGridViewBuildersFactory.CreateViewAdapter(nil, AGridView) do - try - ExpandAllRowsInItself(AMasterRows, AGroupRows); - ExpandAllRowsInClones(AMasterRows, AGroupRows); - finally - Free; - end; -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInClones(AMasterRows, AGroupRows: Boolean); -var - I: Integer; - Clone: TcxCustomGridView; -begin - for I := 0 to GridView.CloneCount - 1 do - begin - Clone := GridView.Clones[I]; - with CreateCloneAdapter(Clone) do - try - ExpandAllRowsInGridView(Clone, AMasterRows, AGroupRows); - finally - Free; - end; - end; -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInLevel(ALevel: TcxGridLevel; - AMasterRows, AGroupRows: Boolean; ARecursive: Boolean); -var - I: Integer; -begin - ExpandAllRowsInGridView(ALevel.GridView, AMasterRows, AGroupRows); - if ARecursive then - for I := 0 to ALevel.VisibleCount - 1 do - ExpandAllRowsInLevel(ALevel.VisibleItems[I], AMasterRows, AGroupRows, ARecursive); -end; - -procedure TdxCustomGridViewAdapter.ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); -begin -end; - -function TdxCustomGridViewAdapter.GetAreAllMasterRowsCollapsed: Boolean; -begin - Result := True; -end; - -function TdxCustomGridViewAdapter.GetAutoWidth: Boolean; -begin - Result := False; -end; - -function TdxCustomGridViewAdapter.GetCanUseOnEveryPageMode: Boolean; -begin - Result := False; -end; - -{$IFDEF DXVER500} -function TdxCustomGridViewAdapter.GetFilterPosition: TcxGridFilterPosition; -begin - Result := fpBottom; -end; -{$ENDIF} - -function TdxCustomGridViewAdapter.GetHasSelectedRecords: Boolean; -begin - Result := False; -end; - -function TdxCustomGridViewAdapter.GetIndentCount: Integer; -begin - Result := Ord(IsMaster); -end; - -function TdxCustomGridViewAdapter.GetIndentWidth: Integer; -begin - Result := DefaultIndentWidth; -end; - -function TdxCustomGridViewAdapter.GetIsOffice11StyleGrouping: Boolean; -begin - Result := False; -end; - -function TdxCustomGridViewAdapter.GetMasterGridRecord: TcxCustomGridRecord; -begin - Result := nil; -end; - -function TdxCustomGridViewAdapter.GetRecordCount: Integer; -begin - Result := 0; -end; - -function TdxCustomGridViewAdapter.GetViewWidthExtra: Integer; -begin - Result := Ord(IsMaster) * IndentWidth; -end; - -function TdxCustomGridViewAdapter.GetCaptionViewParams: TcxViewParams; -var - Level: TcxGridLevel; -begin - if MasterAdapter = nil then - if GridView.MasterGridView <> nil then - begin - Level := GridView.MasterGridView.Level as TcxGridLevel; - Level.Styles.GetTabParams({$IFDEF DXVER500} MasterGridRecord, {$ENDIF} GridLevel, Result); - end - else - Result := GetRootCaptionParams - else - MasterAdapter.GridLevel.Styles.GetTabParams({$IFDEF DXVER500} MasterGridRecord, {$ENDIF} GridLevel, Result); -end; - -function TdxCustomGridViewAdapter.GetFilterBarViewParams: TcxViewParams; -begin - Result.Color := clBtnShadow; - Result.Font := nil; - Result.TextColor := clWindow; -end; - -function TdxCustomGridViewAdapter.GetRootCaptionParams: TcxViewParams; -begin - Grid.RootLevelStyles.GetTabParams({$IFDEF DXVER500} nil, {$ENDIF} GridLevel, Result); -end; - -function TdxCustomGridViewAdapter.GetAbsoluteLevel: Integer; -begin - Result := GridLevel.Level; -end; - -function TdxCustomGridViewAdapter.GetCanUseLookAndFeelColors: Boolean; -begin - Result := Grid.LookAndFeel.NativeStyle and dxThemeManager.AreVisualStylesAvailable; -end; - -function TdxCustomGridViewAdapter.GetCaptionText: string; -begin - Result := GridLevel.DisplayCaption; -end; - -function TdxCustomGridViewAdapter.GetDetailsSeparatorColor: TColor; -begin - Result := MasterGridLevel.Options.DetailFrameColor; -end; - -function TdxCustomGridViewAdapter.GetDetailsSeparatorThickness: Integer; -begin - Result := MasterGridLevel.Options.DetailFrameWidth; -end; - -function TdxCustomGridViewAdapter.GetFilter: TcxDataFilterCriteria; -begin - Result := DataController.Filter; -end; - -function TdxCustomGridViewAdapter.GetFilterActive: Boolean; -begin - Result := Filter.Active; -end; - -function TdxCustomGridViewAdapter.GetFilterEmpty: Boolean; -begin - Result := Filter.FilterText = ''; -end; - -function TdxCustomGridViewAdapter.GetFilterText: string; -begin - Result := Filter.FilterCaption; - if Result = '' then - Result := cxGetResourceString(@scxGridFilterIsEmpty); -end; - -function TdxCustomGridViewAdapter.GetGrid: TcxCustomGrid; -begin - Result := GridView.Control as TcxCustomGrid; -end; - -function TdxCustomGridViewAdapter.GetGridLevel: TcxGridLevel; -begin - Result := GridView.Level as TcxGridLevel; -end; - -function TdxCustomGridViewAdapter.GetGridWidth: Integer; -begin - with Grid.ClientRect do - Result := Right - Left; -end; - -function TdxCustomGridViewAdapter.GetHasDetailsSeparator: Boolean; -begin - Result := DetailsSeparatorThickness <> 0; -end; - -function TdxCustomGridViewAdapter.GetLookAndFeelKind: TcxLookAndFeelKind; -begin - Result := Grid.LookAndFeel.Kind; -end; - -function TdxCustomGridViewAdapter.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := Grid.LookAndFeelPainter; -end; - -function TdxCustomGridViewAdapter.GetIsDetail: Boolean; -begin - Result := GridView.IsDetail; -end; - -function TdxCustomGridViewAdapter.GetIsMaster: Boolean; -begin - Result := GridView.IsMaster; -end; - -function TdxCustomGridViewAdapter.GetMasterGridLevel: TcxGridLevel; -begin - Result := GridLevel.Parent; -end; - -function TdxCustomGridViewAdapter.GetSummary: TcxDataSummary; -begin - Result := DataController.Summary; -end; - -function TdxCustomGridViewAdapter.GetThemedCaptionColor: TColor; -begin - Result := LookAndFeelPainter.DefaultTabColor; -end; - -function TdxCustomGridViewAdapter.GetThemedCaptionTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultTabTextColor; -end; - -function TdxCustomGridViewAdapter.GetThemedFilterBarColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFilterBoxColor; -end; - -function TdxCustomGridViewAdapter.GetThemedFilterBarTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFilterBoxTextColor; -end; - -function TdxCustomGridViewAdapter.GetViewWidth: Integer; -begin - Result := GridView.Control.Width; -end; - -{ TdxCustomGridViewFormatter } - -constructor TdxCustomGridViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; - - FLookAndFeelItems := TList.Create; - FExpandButtons := TList.Create; - FFont := TFont.Create; - - FTransparentColor := dxPSCore.dxDefaultContentColor; -end; - -destructor TdxCustomGridViewFormatter.Destroy; -begin - FreeAndNil(FFont); - FreeAndNil(FExpandButtons); - FreeAndNil(FLookAndFeelItems); - inherited; -end; - -function TdxCustomGridViewFormatter.Builder: TdxCustomGridViewBuilder; -begin - Result := FBuilder; -end; - -function TdxCustomGridViewFormatter.Adapter: TdxCustomGridViewAdapter; -begin - Result := Builder.Adapter; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeHost(AHost: TdxReportCell); -begin - AHost.CellSides := []; - AHost.Data := Integer(Adapter.GridView); - AHost.Transparent := True; -end; - -function TdxCustomGridViewFormatter.GetHostClass: TdxReportCellClass; -begin - Result := TdxReportCell; {Host} -end; - -function TdxCustomGridViewFormatter.GetRowHostClass: TdxReportCellClass; -begin - Result := TdxReportCell; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeCaption(ACaption: TdxReportCellText); -begin - SetViewParams(ACaption, GetCaptionViewParams); - if HasBackgroundBitmap(bbTabs) then - ACaption.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbTabs); - RegisterLookAndFeelItem(ACaption, cesRaised); - ACaption.Data := Integer(TdxGridLevelCaption); - ACaption.Text := Adapter.CaptionText; - ACaption.HidePrefix := True; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeCaptionRow(ARow: TdxReportCell); -begin -end; - -procedure TdxCustomGridViewFormatter.DoReportLinkInitializeCaption(ACaption: TdxReportCellText); -begin - ReportLink.DoInitializeLevelCaption(Adapter.GridView, TdxReportCellString(ACaption)); -end; - -function TdxCustomGridViewFormatter.GetCaptionClass: TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxCustomGridViewFormatter.GetCaptionViewParams: TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetCaptionParams(Adapter.GridLevel, Result.NativeParams) - else - Result.NativeParams := Adapter.GetCaptionViewParams; - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - begin - Result.NativeParams.Color := Adapter.ThemedCaptionColor; - Result.NativeParams.TextColor := Adapter.ThemedCaptionTextColor; - end; - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeFilterBar(AFilterBar: TdxReportCellText); -begin - SetViewParams(AFilterBar, GetFilterBarViewParams); - if HasBackgroundBitmap(bbFilterBox) then - AFilterBar.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbFilterBox); - - with AFilterBar do - begin - Data := Integer(TdxGridFilterBar); - EndEllipsis := True; - Text := Adapter.FilterText; - end; - - if not Adapter.FilterEmpty then - with TdxReportCellCheck(AFilterBar) do - begin - Checked := Adapter.FilterActive; - CheckPos := ccpLeft; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeFilterBarRow(ARow: TdxReportCell); -begin -end; - -procedure TdxCustomGridViewFormatter.DoReportLinkInitializeFilterBar(AFilterBar: TdxReportCellText); -begin - ReportLink.DoInitializeFilterBar(TcxCustomGridTableView(Adapter.GridView), TdxReportCellString(AFilterBar)); -end; - -function TdxCustomGridViewFormatter.GetFilterBarClass: TdxReportCellTextClass; -const - CheckClasses: array[Boolean] of TdxReportCellTextClass = (TdxReportCellCheck, TdxReportCellString); -begin - Result := CheckClasses[Adapter.FilterEmpty]; -end; - -function TdxCustomGridViewFormatter.GetFilterBarViewParams: TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetFilterBarParams(Result.NativeParams) - else - Result.NativeParams := Adapter.GetFilterBarViewParams; - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - begin - Result.NativeParams.Color := Adapter.ThemedCaptionColor; - Result.NativeParams.TextColor := Adapter.ThemedCaptionTextColor; - end; - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeDetailsSeparatorRow(ARow: TdxReportCell); -begin -end; - -procedure TdxCustomGridViewFormatter.DoInitializeHorzDetailsSeparator(ASeparator: TdxReportCellBox); -begin - with ASeparator do - begin - CellSides := csTopBottom; - Color := DetailsSeparatorColor; - Transparent := False; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeVertBottomDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - DoInitializeVertDetailsSeparator(ASeparator, ASeparatorKind); - case ASeparatorKind of - vdskLeading: - ASeparator.CellSides := [csLeft, csBottom]; - vdskTrailing: - ASeparator.CellSides := [csRight, csBottom]; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeVertDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - with ASeparator do - begin - CellSides := [csLeft, csRight]; - Color := DetailsSeparatorColor; - Transparent := False; - end; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeVertTopDetailsSeparator(ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - DoInitializeVertDetailsSeparator(ASeparator, ASeparatorKind); - case ASeparatorKind of - vdskLeading: - ASeparator.CellSides := [csLeft, csTop]; - vdskTrailing: - ASeparator.CellSides := [csRight, csTop]; - end; -end; - -function TdxCustomGridViewFormatter.GetDetailsSeparatorClass: TdxReportCellBoxClass; -begin - Result := TdxReportCellBox; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer); -begin -end; - -function TdxCustomGridViewFormatter.GetMasterIndentClass: TdxReportCellExpandButtonClass; -begin - Result := TdxReportCellExpandButton; -end; - -procedure TdxCustomGridViewFormatter.DoInitializeViewTerminator(ATerminator: TdxReportCellBox); -begin - ATerminator.CellSides := [csBottom]; - ATerminator.Transparent := True; -end; - -function TdxCustomGridViewFormatter.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TdxCustomGridViewFormatter._AddRef: Integer; -begin - Result := 1; -end; - -function TdxCustomGridViewFormatter._Release: Integer; -begin - Result := 1; -end; - -procedure TdxCustomGridViewFormatter.AddDelimiters; -begin - AddHorizontalDelimiters; - AddVerticalDelimiters; -end; - -procedure TdxCustomGridViewFormatter.AddHorizontalDelimiters; -begin -end; - -procedure TdxCustomGridViewFormatter.AddVerticalDelimiters; -var - I: Integer; -begin - if ReportLink.OptionsPagination.Row then - for I := 0 to Builder.ReportRowCount - 1 do - ReportLink.AddVerticalDelimiter(Builder.ReportRows[I]); -end; - -procedure TdxCustomGridViewFormatter.AfterBuilding; -begin - Adapter.AfterBuilding; - FormatLookAndFeelItems; - FormatExpandButtons; - AddDelimiters; -end; - -procedure TdxCustomGridViewFormatter.BeforeBuilding; -begin - Adapter.BeforeBuilding; - Calculate; -end; - -procedure TdxCustomGridViewFormatter.Calculate; -begin - CalculateLineHeights; -end; - -procedure TdxCustomGridViewFormatter.CalculateLineHeights; -begin - CaptionLineHeight := 2 * TabsAreaOffset + CalculateFontHeight(GetCaptionViewParams); - FilterBarLineHeight := 2 * FilterBarTextOffset + CalculateFontHeight(GetFilterBarViewParams); -end; - -function TdxCustomGridViewFormatter.GetDetailsSeparatorColor: TColor; -begin - Result := Adapter.DetailsSeparatorColor; - {with ReportLink.OptionsFormatting do - if UseNativeStyles then - begin - Result := FixedColor; - end;} -end; - -function TdxCustomGridViewFormatter.GetDetailsSeparatorThickness: Integer; -begin - Result := Adapter.DetailsSeparatorThickness; -end; - -function TdxCustomGridViewFormatter.GetHasDetailsSeparator: Boolean; -begin - Result := Adapter.HasDetailsSeparator; -end; - -function TdxCustomGridViewFormatter.GetSiteHeight: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if ReportLink.IsAggregated and - Supports(TObject(ReportLink.Controller), IdxReportLinkController, ControllerIntf) then - with ControllerIntf.GetControlSiteBounds(ReportLink.Grid) do - Result := Bottom - Top - 1 - else - with ReportLink.RealPrinterPage.PaintRectPixels do - Result := Bottom - Top - 1; -end; - -function TdxCustomGridViewFormatter.GetSiteWidth: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if ReportLink.IsAggregated and - Supports(TObject(ReportLink.Controller), IdxReportLinkController, ControllerIntf) then - with ControllerIntf.GetControlSiteBounds(ReportLink.Grid) do - Result := Right - Left - 1 - else - with ReportLink.RealPrinterPage.PaintRectPixels do - Result := Right - Left - 1; -end; - -function TdxCustomGridViewFormatter.GetViewWidth: Integer; -begin - Result := 0; -end; - -function TdxCustomGridViewFormatter.GetViewWidthExtraAfter: Integer; -var - I: Integer; -begin - Result := 0; - - for I := 0 to AbsoluteLevel - 1 do - with Builder.AbsoluteBuilders[I].Adapter do - if HasDetailsSeparator then Inc(Result, DetailsSeparatorThickness); - - if Adapter.HasDetailsSeparator then - Inc(Result, Adapter.DetailsSeparatorThickness); -end; - -function TdxCustomGridViewFormatter.GetViewWidthExtraBefore: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AbsoluteLevel - 1 do - with Builder.AbsoluteBuilders[I].Adapter do - begin - Inc(Result, ViewWidthExtra); - if HasDetailsSeparator then Inc(Result, DetailsSeparatorThickness); - end; - - if Adapter.HasDetailsSeparator then - Inc(Result, Adapter.DetailsSeparatorThickness); -end; - -function TdxCustomGridViewFormatter.BackgroundBitmaps: TcxCustomGridBackgroundBitmaps; -begin - Result := Adapter.BackgroundBitmaps; -end; - -function TdxCustomGridViewFormatter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - Result := ReportLink.Styles.GetBitmap(MapStyleBackgroundBitmapIndex(Index)) - else - Result := Adapter.GetBackgroundBitmap(Index); -end; - -function TdxCustomGridViewFormatter.GetBackgroundBitmapIndex(Index: Integer): Integer; -begin - Result := ReportLink.AddBackgroundBitmapToPool(GetBackgroundBitmap(Index)); -end; - -function TdxCustomGridViewFormatter.HasBackgroundBitmap(Index: Integer): Boolean; -var - Bitmap: TBitmap; -begin - if not ReportLink.OptionsFormatting.SuppressBackgroundBitmaps then - begin - Bitmap := GetBackgroundBitmap(Index); - Result := (Bitmap <> nil) and not Bitmap.Empty; - end - else - Result := False; -end; - -function TdxCustomGridViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbTabs: - Result := vspsGridCaption; - bbContent: - Result := vspsGridContent; - bbFilterBox: - Result := vspsGridFilterBar; - else - Result := 0; - end; -end; - -function TdxCustomGridViewFormatter.CalculateFontHeight(const AParams: TdxReportItemViewParams): Integer; -begin - Result := Renderer.CalcTextPatternHeight(DC, AParams.NativeParams.Font); -end; - -procedure TdxCustomGridViewFormatter.CalculateHeight(const AParams: TdxReportItemViewParams; - var AHeight: Integer); -var - Value: Integer; -begin - Value := CalculateFontHeight(AParams); - if Value > AHeight then AHeight := Value; -end; - -function TdxCustomGridViewFormatter.GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; -begin - if AParams.NativeParams.Font <> nil then - begin - FFont.Assign(AParams.NativeParams.Font); - if not dxPSUtl.dxIsTrueTypeFont(FFont) then - FFont.Name := ReportLink.Font.Name; - FFont.Color := ColorToRGB(AParams.NativeParams.TextColor); - FFont.Style := FFont.Style + AParams.FontStyle; - Result := ReportLink.AddFontToPool(FFont); - end - else - Result := 0; -end; - -function TdxCustomGridViewFormatter.IsColorTransparent(AColor: TColor): Boolean; -begin - Result := ColorToRGB(AColor) = ColorToRGB(TransparentColor); -end; - -procedure TdxCustomGridViewFormatter.RegisterExpandButton(AExpandButton: TdxReportCellExpandButton); -begin - FExpandButtons.Add(AExpandButton); -end; - -procedure TdxCustomGridViewFormatter.RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; - AEdgeStyle: TdxCellEdgeStyle); -begin - AnItem.EdgeMode := Self.EdgeMode; - AnItem.Edge3DStyle := AEdgeStyle; - FLookAndFeelItems.Add(AnItem); -end; - -procedure TdxCustomGridViewFormatter.SetViewParams(AnItem: TdxReportVisualItem; - const AParams: TdxReportItemViewParams); -begin - AnItem.CellSides := AParams.CellSides; - AnItem.Color := ColorToRGB(AParams.NativeParams.Color); - AnItem.FontIndex := GetStyleFontIndex(AParams); - AnItem.Transparent := AParams.Transparent; -end; - -function TdxCustomGridViewFormatter.GetAbsoluteLevel: Integer; -begin - Result := Adapter.AbsoluteLevel; - if ReportLink.OptionsDetails.StartFromFocusedView then - Dec(Result, (ReportLink.ActiveView.Level as TcxGridLevel).Level); -end; - -function TdxCustomGridViewFormatter.GetAutoWidth: Boolean; -begin - Result := ReportLink.OptionsSize.AutoWidth or Adapter.AutoWidth; -end; - -function TdxCustomGridViewFormatter.GetDC: HDC; -begin - Result := ReportLink.ScreenDC; -end; - -function TdxCustomGridViewFormatter.GetEdgeMode: TdxCellEdgeMode; -const - EdgeModeMap: array[Boolean] of TdxCellEdgeMode = (cemPattern, cem3DEffects); -begin - Result := EdgeModeMap[ReportLink.OptionsFormatting.LookAndFeelKind <> lfUltraFlat]; -end; - -{$IFDEF DXVER500} -function TdxCustomGridViewFormatter.GetFilterBarPosition: TcxGridFilterPosition; -begin - Result := Adapter.FilterPosition; -end; -{$ENDIF} - -function TdxCustomGridViewFormatter.GetGridWidth: Integer; -begin - Result := Adapter.GridWidth; -end; - -function TdxCustomGridViewFormatter.GetExpandButton(Index: Integer): TdxReportCellExpandButton; -begin - Result := TdxReportCellExpandButton(FExpandButtons[Index]); -end; - -function TdxCustomGridViewFormatter.GetExpandButtonCount: Integer; -begin - Result := FExpandButtons.Count; -end; - -function TdxCustomGridViewFormatter.GetIndentWidth: Integer; -begin - Result := Adapter.IndentWidth; -end; - -function TdxCustomGridViewFormatter.GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; -begin - Result := TdxReportVisualItem(FLookAndFeelItems[Index]); -end; - -function TdxCustomGridViewFormatter.GetLookAndFeelItemCount: Integer; -begin - Result := FLookAndFeelItems.Count; -end; - -function TdxCustomGridViewFormatter.GetPaginateByTopLevelGroups: Boolean; -begin - Result := ReportLink.OptionsPagination.TopLevelGroup; -end; - -function TdxCustomGridViewFormatter.GetRenderer: TdxPSReportRenderer; -begin - Result := ReportLink.Renderer; -end; - -function TdxCustomGridViewFormatter.GetReportLink: TdxGridReportLink; -begin - Result := Builder.ReportLink; -end; - -function TdxCustomGridViewFormatter.GetShowCaption: Boolean; -begin - Result := ReportLink.OptionsView.Caption; -end; - -function TdxCustomGridViewFormatter.GetShowFilterBar: Boolean; -begin - Result := ReportLink.OptionsView.FilterBar; -end; - -function TdxCustomGridViewFormatter.GetUseLookAndFeelColors: Boolean; -begin - Result := ReportLink.OptionsFormatting.UseLookAndFeelColors; -end; - -function TdxCustomGridViewFormatter.GetViewAvailableWidth: Integer; -begin - if ReportLink.OptionsSize.AutoWidth then - Result := SiteWidth - else - Result := Adapter.ViewWidth; - Dec(Result, ViewWidthExtraBefore + ViewWidthExtraAfter); -end; - -function TdxCustomGridViewFormatter.GetViewWidthExtra: Integer; -begin - Result := Adapter.ViewWidthExtra; -end; - -procedure TdxCustomGridViewFormatter.FormatLookAndFeelItems; -const - Borders3D: array[TdxCellEdgeStyle, Boolean] of TdxPSCellBorderClass = - ((TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder), - (TdxPSCellSunkenBorder, TdxPSCellSunkenSoftBorder)); -var - I: Integer; -begin - for I := 0 to LookAndFeelItemCount - 1 do - with LookAndFeelItems[I] do - if ReportLink.Effects3D then - BorderClass := Borders3D[Edge3DStyle, ReportLink.Soft3D] - else - BorderClass := TdxPSCellUltraFlatBorder; -end; - -procedure TdxCustomGridViewFormatter.FormatExpandButtons; -var - I: Integer; -begin - for I := 0 to ExpandButtonCount - 1 do - with ExpandButtons[I] do - begin - ButtonBorder3D := ReportLink.Effects3D; - ButtonBorder3DSoft := ReportLink.Soft3D; - end; -end; - -{ TdxCustomGridViewBuilder } - -constructor TdxCustomGridViewBuilder.Create(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); - - function GetMasterAdapter: TdxCustomGridViewAdapter; - begin - if AMasterBuilder = nil then - Result := nil - else - Result := AMasterBuilder.Adapter; - end; - -begin - inherited Create; - FReportLink := AReportLink; - FMasterBuilder := AMasterBuilder; - FGridView := AGridView; - - FAdapter := CreateAdapter(GetMasterAdapter, GridView); - FFormatter := FormatterClass.Create(Self); - FProducerCache := TdxProducerCache.Create(Self); - FReportRows := TList.Create; - - if MasterBuilder <> nil then - MasterBuilder.FDetailsBuilder := Self; -end; - -destructor TdxCustomGridViewBuilder.Destroy; -begin - if MasterBuilder <> nil then - MasterBuilder.FDetailsBuilder := nil; - FreeAndNil(FReportRows); - FreeAndNil(FProducerCache); - FreeAndNil(FFormatter); - FreeAndNil(FAdapter); - inherited; -end; - -function TdxCustomGridViewBuilder.Adapter: TdxCustomGridViewAdapter; -begin - Result := FAdapter; -end; - -class function TdxCustomGridViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxCustomGridViewAdapter; -end; - -class function TdxCustomGridViewBuilder.CreateAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := AdapterClass.Create(AMasterAdapter, AGridView); -end; - -function TdxCustomGridViewBuilder.Formatter: TdxCustomGridViewFormatter; -begin - Result := FFormatter; -end; - -class function TdxCustomGridViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxCustomGridViewFormatter; -end; - -procedure TdxCustomGridViewBuilder.Build; -begin - BeforeBuilding; - try - DoBuild; - finally - AfterBuilding; - end; -end; - -function TdxCustomGridViewBuilder.IsAborted: Boolean; -begin - Result := ReportLink.AbortBuilding; -end; - -procedure TdxCustomGridViewBuilder.Progress(const APercentDone: Double); -begin - ReportLink.DoProgress(APercentDone); -end; - -class function TdxCustomGridViewBuilder.PairClass: TClass; -begin - Result := GridViewClass; -end; - -class procedure TdxCustomGridViewBuilder.Register; -begin - dxGridViewBuildersFactory.Register(Self); -end; - -class procedure TdxCustomGridViewBuilder.Unregister; -begin - dxGridViewBuildersFactory.Unregister(Self); -end; - -procedure TdxCustomGridViewBuilder.AddReportRow(ARow: TdxReportCell); -begin - if ARow.Parent = ReportLink.ReportCells.Cells then - FReportRows.Add(ARow); -end; - -procedure TdxCustomGridViewBuilder.AfterBuilding; -begin - if not IsAborted then Formatter.AfterBuilding; -end; - -procedure TdxCustomGridViewBuilder.BeforeBuilding; -begin - Formatter.BeforeBuilding; -end; - -procedure TdxCustomGridViewBuilder.DoBuild; -begin - DoBuildViewHeader; - DoBuildViewBody; - if not IsAborted then DoBuildViewFooter; -end; - -procedure TdxCustomGridViewBuilder.DoBuildViewBody; -begin -end; - -procedure TdxCustomGridViewBuilder.DoBuildViewFooter; -begin -end; - -procedure TdxCustomGridViewBuilder.DoBuildViewHeader; -begin -end; - -function TdxCustomGridViewBuilder.GetViewAvailableWidth: Integer; -begin - Result := Formatter.ViewAvailableWidth; -end; - -procedure TdxCustomGridViewBuilder.CreateCaption; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetCaptionProducer.Produce(HostInfoServices.CaptionHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetCaptionProducer: TdxGridViewCaptionProducer; -begin - Result := ProducerCache[GetCaptionProducerClass] as TdxGridViewCaptionProducer; -end; - -function TdxCustomGridViewBuilder.GetCaptionProducerClass: TdxGridViewCaptionProducerClass; -begin - Result := TdxGridViewCaptionProducer; -end; - -procedure TdxCustomGridViewBuilder.CreateBottomDetailsSeparator; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetDetailsBottomSeparatorProducer.Produce(HostInfoServices.LevelSeparatorBottomHostInfo); - AddReportRow(ReportRow); -end; - -procedure TdxCustomGridViewBuilder.CreateTopDetailsSeparator; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetDetailsTopSeparatorProducer.Produce(HostInfoServices.LevelSeparatorTopHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetDetailsBottomSeparatorProducer: TdxGridViewDetailsSeparatorProducer; -begin - Result := ProducerCache[GetDetailsBottomSeparatorProducerClass] as TdxGridViewDetailsSeparatorProducer; -end; - -function TdxCustomGridViewBuilder.GetDetailsBottomSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; -begin - Result := TdxGridViewDetailsBottomSeparatorProducer; -end; - -function TdxCustomGridViewBuilder.GetDetailsTopSeparatorProducer: TdxGridViewDetailsSeparatorProducer; -begin - Result := ProducerCache[GetDetailsTopSeparatorProducerClass] as TdxGridViewDetailsSeparatorProducer; -end; - -function TdxCustomGridViewBuilder.GetDetailsTopSeparatorProducerClass: TdxGridViewDetailsSeparatorProducerClass; -begin - Result := TdxGridViewDetailsTopSeparatorProducer; -end; - -procedure TdxCustomGridViewBuilder.CreateFilterBar; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetFilterBarProducer.Produce(HostInfoServices.FilterBarHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetFilterBarProducer: TdxGridViewFilterBarProducer; -begin - Result := ProducerCache[GetFilterBarProducerClass] as TdxGridViewFilterBarProducer; -end; - -function TdxCustomGridViewBuilder.GetFilterBarProducerClass: TdxGridViewFilterBarProducerClass; -begin - Result := TdxGridViewFilterBarProducer; -end; - -procedure TdxCustomGridViewBuilder.CreateViewTerminator; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetViewTerminatorProducer.Produce(HostInfoServices.PageDetailsHostInfo); - AddReportRow(ReportRow); -end; - -function TdxCustomGridViewBuilder.GetViewTerminatorProducer: TdxGridViewTerminatorProducer; -begin - Result := ProducerCache[GetViewTerminatorProducerClass] as TdxGridViewTerminatorProducer; -end; - -function TdxCustomGridViewBuilder.GetViewTerminatorProducerClass: TdxGridViewTerminatorProducerClass; -begin - Result := TdxGridViewTerminatorProducer; -end; - -function TdxCustomGridViewBuilder.GridView: TcxCustomGridView; -begin - Result := FGridView; -end; - -class function TdxCustomGridViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -function TdxCustomGridViewBuilder.GetAbsoluteBuilder(AIndex: Integer): TdxCustomGridViewBuilder; -begin - Result := RootBuilder; - while AIndex > 0 do - begin - Result := Result.DetailsBuilder; - Dec(AIndex); - end; -end; - -function TdxCustomGridViewBuilder.GetAutoWidth: Boolean; -begin - Result := Formatter.AutoWidth; -end; - -function TdxCustomGridViewBuilder.GetGridLevel: TcxGridLevel; -begin - Result := GridView.Level as TcxGridLevel; -end; - -function TdxCustomGridViewBuilder.GetGrid: TcxCustomGrid; -begin - Result := ReportLink.Grid; -end; - -function TdxCustomGridViewBuilder.GetHost: TdxReportCell; -begin - Result := ReportLink.ReportCells.Cells; -end; - -function TdxCustomGridViewBuilder.GetHostInfoServices: TdxGridAttributeHostInfoServices; -begin - Result := ReportLink.HostInfoServices; -end; - -function TdxCustomGridViewBuilder.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := TdxReportCell(FReportRows[Index]); -end; - -function TdxCustomGridViewBuilder.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TdxCustomGridViewBuilder.GetRootBuilder: TdxCustomGridViewBuilder; -begin - Result := Self; - while Result.MasterBuilder <> nil do - Result := Result.MasterBuilder; -end; - -{ TdxCustomGridTableViewAdapter } - -constructor TdxCustomGridTableViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited; - FRecordHelpersCache := TdxRecordHelpersCache.Create(Self); - FDetailsLineCount := -1; -end; - -destructor TdxCustomGridTableViewAdapter.Destroy; -begin - FreeAndNil(FRecordHelpersCache); - inherited; -end; - -function TdxCustomGridTableViewAdapter.ForEachRecord(AProc: TdxGridTableAdapterForEachRecordProc; - AData: Integer; AProcessSelection: Boolean): Boolean; -var - I: Integer; - Continue: Boolean; - Record_: TcxCustomGridRecord; -begin - Result := True; - if @AProc = nil then Exit; - - Continue := True; - for I := 0 to RecordCount - 1 do - begin - Record_ := Records[I]; - if not AProcessSelection or Record_.Selected then - AProc(Record_, AData, Continue); - if not Continue then - begin - Result := False; - Break; - end; - end; -end; - -function TdxCustomGridTableViewAdapter.GridView: TcxCustomGridTableView; -begin - Result := inherited GridView as TcxCustomGridTableView; -end; - -class function TdxCustomGridTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridTableView; -end; - -function TdxCustomGridTableViewAdapter.Styles: TcxCustomGridTableViewStyles; -begin - Result := inherited Styles as TcxCustomGridTableViewStyles; -end; - -function TdxCustomGridTableViewAdapter.CalculateDetailsLineCount: Integer; -begin - Result := 1; -end; - -function TdxCustomGridTableViewAdapter.GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; -begin - if (ATableItem <> nil) and (ATableItem.Styles <> nil) then - ATableItem.Styles.GetContentParams(ARecord, Result) - else - Styles.GetContentParams(ARecord, ATableItem, Result); - if Result.Color = clWindow then // 3.2 - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TdxCustomGridTableViewAdapter.GetPreviewViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; -begin - Result := GetContentViewParams(ARecord, ATableItem); -end; - -function TdxCustomGridTableViewAdapter.GetSelectionViewParams: TcxViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - with Styles.Selection do - begin - Result.Bitmap := Bitmap; - Result.Color := Color; - Result.Font := Font; - Result.TextColor := TextColor; - end; -end; - -function TdxCustomGridTableViewAdapter.HasSelectionStyle: Boolean; -begin - Result := Styles.Selection <> nil; -end; - -function TdxCustomGridTableViewAdapter.Controller: TcxCustomGridTableController; -begin - Result := inherited Controller as TcxCustomGridTableController; -end; - -procedure TdxCustomGridTableViewAdapter.DoExpandMasterRow(ARecord: TcxCustomGridRecord; - AData: Integer; var AContinue: Boolean); -begin - if (ARecord is TcxGridMasterDataRow) and ARecord.Expandable then - GridMasterDataRow_DoExpand(TcxGridMasterDataRow(ARecord), True); - {begin - ARecord.Expanded := True; - with TcxGridMasterDataRow(ARecord) do - if ActiveDetailGridViewExists then - ExpandAllRowsInGridView(ActiveDetailGridView, True, Boolean(AData)); - end;} -end; - -procedure TdxCustomGridTableViewAdapter.ExpandAllGroupRows; -begin - DataController.Groups.FullExpand; -end; - -procedure TdxCustomGridTableViewAdapter.ExpandAllMasterRows(AnExpandGroups: Boolean); -begin - ForEachRecord(DoExpandMasterRow, Integer(AnExpandGroups), False); -end; - -procedure TdxCustomGridTableViewAdapter.ExpandAllRowsInItself(AMasterRows, AGroupRows: Boolean); -begin - if AGroupRows then ExpandAllGroupRows; - if AMasterRows then ExpandAllMasterRows(AGroupRows); -end; - -function TdxCustomGridTableViewAdapter.GetAreAllMasterRowsCollapsed: Boolean; -begin - Result := ForEachRecord(IsMasterRowCollapsed, 0, False); -end; - -function TdxCustomGridTableViewAdapter.GetCanUseOnEveryPageMode: Boolean; -begin - Result := RecordCount <> 0; -end; - -function TdxCustomGridTableViewAdapter.GetHasSelectedRecords: Boolean; -var - I: Integer; -begin - Result := SelectedRecordCount <> 0; - if not Result then - for I := 0 to RecordCount - 1 do - begin - Result := RecordHelpers[Records[I]].HasSelectedChildren; - if Result then Break; - end; -end; - -function TdxCustomGridTableViewAdapter.GetMasterGridRecord: TcxCustomGridRecord; -begin - Result := GridView.MasterGridRecord; -end; - -function TdxCustomGridTableViewAdapter.GetRecordCount: Integer; -begin - Result := GridView.ViewData.RecordCount; -end; - -class function TdxCustomGridTableViewAdapter.GetProperties(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; -begin - Result := AnItem.GetProperties(ARecord); - if Result = nil then - Result := GetRepositoryItem(AnItem, ARecord).Properties; -end; - -class function TdxCustomGridTableViewAdapter.GetPropertiesClass(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditPropertiesClass; -begin - Result := TcxCustomEditPropertiesClass(GetProperties(AnItem, ARecord).ClassType); -end; - -class function TdxCustomGridTableViewAdapter.GetRepositoryItem(AnItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxEditRepositoryItem; -begin - Result := AnItem.GetRepositoryItem; -end; - -procedure TdxCustomGridTableViewAdapter.IsMasterRowCollapsed(ARecord: TcxCustomGridRecord; - AData: Integer; var AContinue: Boolean); -begin - if ARecord is TcxGridMasterDataRow then - AContinue := not ARecord.Expanded; -end; - -function TdxCustomGridTableViewAdapter.GetCellAutoHeight: Boolean; -begin - Result := CustomGridTableOptionsView_GetCellAutoHeight(GridView.OptionsView); -end; - -function TdxCustomGridTableViewAdapter.GetCellMultiline: Boolean; -begin - Result := CustomGridTableOptionsView_GetCellAutoHeight(GridView.OptionsView); -end; - -{$IFDEF DXVER500} -function TdxCustomGridTableViewAdapter.GetFilterPosition: TcxGridFilterPosition; -begin - Result := CustomGridTableFiltering_GetPosition(Filtering); -end; -{$ENDIF} - -function TdxCustomGridTableViewAdapter.GetGridLineColor: TColor; -begin - Result := GridView.LookAndFeelPainter.DefaultGridLineColor; -end; - -function TdxCustomGridTableViewAdapter.GetCellEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.CellEndEllipsis; -end; - -function TdxCustomGridTableViewAdapter.GetDetailsLineCount: Integer; -begin - if FDetailsLineCount = -1 then - FDetailsLineCount := CalculateDetailsLineCount; - Result := FDetailsLineCount; -end; - -function TdxCustomGridTableViewAdapter.GetFiltering: TcxCustomGridTableFiltering; -begin - Result := GridView.Filtering; -end; - -function TdxCustomGridTableViewAdapter.GetIsGridMode: Boolean; -begin - Result := DataController.IsGridMode; -end; - -function TdxCustomGridTableViewAdapter.GetRecord(Index: Integer): TcxCustomGridRecord; -begin - Result := GridView.ViewData.Records[Index]; -end; - -function TdxCustomGridTableViewAdapter.GetRecordHelper(ARecord: TcxCustomGridRecord): TdxCustomGridRecordHelper; -begin - Result := RecordHelpersCache.Helpers[ARecord]; -end; - -function TdxCustomGridTableViewAdapter.GetSelectedRecord(Index: Integer): TcxCustomGridRecord; -begin - Result := Controller.SelectedRecords[Index] -end; - -function TdxCustomGridTableViewAdapter.GetSelectedRecordCount: Integer; -begin - if CustomGridTableController_GetMultiSelect(Controller) then - Result := Controller.SelectedRecordCount - else - Result := 0; -end; - -{ TdxCustomGridTableViewFormatter } - -constructor TdxCustomGridTableViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FRecordIndexes := TList.Create; - FSelectedRecordList := TList.Create; - //if ReportLink.OptionsSelection.ProcessSelection then BuildSelectedRecordList; {moved to BeforeBuilding in 3.03} -end; - -destructor TdxCustomGridTableViewFormatter.Destroy; -begin - FreeAndNil(FRecordIndexes); - FreeAndNil(FSelectedRecordList); - inherited; -end; - -function TdxCustomGridTableViewFormatter.Adapter: TdxCustomGridTableViewAdapter; -begin - Result := inherited Adapter as TdxCustomGridTableViewAdapter; -end; - -function TdxCustomGridTableViewFormatter.Builder: TdxCustomGridTableViewBuilder; -begin - Result := inherited Builder as TdxCustomGridTableViewBuilder; -end; - -function TdxCustomGridTableViewFormatter.IndexOfRecord(ARecord: TcxCustomGridRecord): Integer; -begin - for Result := 0 to RecordCount - 1 do - if Records[Result] = ARecord then Exit; - Result := -1; -end; - -procedure TdxCustomGridTableViewFormatter.CheckDisplayValuePost( - AProperties: TcxCustomEditProperties; ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnItem: TAbstractdxReportCellData); -var - S: string; -begin - if (ATableItem <> nil) and (ARecord <> nil) and (AnItem is TdxReportCellText) and - (AProperties.GetEditValueSource(False) = evsValue) then - begin - S := TdxReportCellText(AnItem).Text; - TcxCustomGridTableItemAccess(ATableItem).DoGetDisplayText(ARecord, S); - TdxReportCellText(AnItem).Text := S; - end; -end; - -procedure TdxCustomGridTableViewFormatter.DoInitializeItem(AnItem: TAbstractdxReportCellData; - ATableItem: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False); - - function GetContentBackgroundBitmapStyleIndex: Integer; - begin - if AnIsPreview then - Result := bbPreview - else - Result := Self.GetContentBackgroundBitmapStyleIndex(ATableItem); - end; - -var - Properties: TcxCustomEditProperties; - ViewParams: TdxReportItemViewParams; - CellValue: TcxEditValue; - ContentBackgroundBitmapStyleIndex: Integer; -begin - Properties := GetItemProperties(ATableItem, ARecord); - ViewParams := GetItemViewParams(ATableItem, ARecord, AnIsPreview); - CellValue := GetItemValue(Properties, ATableItem, ARecord); - - dxPScxCommon.dxPSDataMaps.InitializeItem(AnItem, Properties, CellValue, Self, - ViewParams, AnIsPreview, ARecord.RecordIndex, ATableItem); - CheckDisplayValuePost(Properties, ATableItem, ARecord, AnItem); - dxPScxCommon.dxPSDataMaps.GetImageLists(Properties, ReportLink.AppendImageList); - SetViewParams(AnItem, ViewParams); - - ContentBackgroundBitmapStyleIndex := GetContentBackgroundBitmapStyleIndex; - if HasBackgroundBitmap(ContentBackgroundBitmapStyleIndex) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(ContentBackgroundBitmapStyleIndex); - - AnItem.Data := Integer(ATableItem); -end; - -function TdxCustomGridTableViewFormatter.GetItemClass(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := dxPSDataMaps.ItemClass(GetItemProperties(ATableItem, ARecord), AnIsPreview); -end; - -function TdxCustomGridTableViewFormatter.GetItemProperties(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord): TcxCustomEditProperties; -begin - Result := Adapter.GetProperties(ATableItem, ARecord); -end; - -function TdxCustomGridTableViewFormatter.GetItemValue(AProperties: TcxCustomEditProperties; - ATableItem: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord): TcxEditValue; -var - S: string; -begin - if AProperties.GetEditValueSource(False) = evsValue then - Result := ARecord.Values[ATableItem.Index] - else - begin - S := ARecord.DisplayTexts[ATableItem.Index]; - TcxCustomGridTableItemAccess(ATableItem).DoGetDisplayText(ARecord, S); - Result := S; - end; -end; - -function TdxCustomGridTableViewFormatter.GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - if AnIsPreview then - ReportLink.Styles.GetPreviewParams(ARecord, ATableItem, Result.NativeParams) - else - ReportLink.Styles.GetContentParams(ARecord, ATableItem, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - if AnIsPreview then - Result.NativeParams := Adapter.GetPreviewViewParams(ARecord, ATableItem) - else - Result.NativeParams := Adapter.GetContentViewParams(ARecord, ATableItem); -end; - -{ IdxPSCellParams } - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetAutoHeight: Boolean; -begin - Result := Adapter.CellAutoHeight; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetDC: HDC; -begin - Result := Self.DC; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; -begin - Result := ReportLink.OptionsRefinements.DisplayGraphicsAsText; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetEndEllipsis: Boolean; -begin - Result := Adapter.CellEndEllipsis; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetFlatCheckMarks: Boolean; -begin - Result := ReportLink.OptionsRefinements.FlatCheckMarks; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetGraphicsText: string; -begin - Result := ReportLink.OptionsRefinements.GraphicsText; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetMultiline: Boolean; -begin - Result := Adapter.CellMultiline; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams_GetTransparentGraphics: Boolean; -begin - Result := ReportLink.OptionsRefinements.TransparentGraphics; -end; - -{ IdxPSCellParams2 } -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := dxTextSpace; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := dxTextSpace; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - Result := -1; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := -1; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; -const - GraphicClasses: array[Boolean] of TGraphicClass = (TMetafile, TBitmap); -begin - Result := GraphicClasses[IdxPSCellParams2_GetRichEditTransparent]; -end; - -function TdxCustomGridTableViewFormatter.IdxPSCellParams2_GetRichEditTransparent: Boolean; -begin - {$IFDEF DXVER500} - Result := ReportLink.OptionsRefinements.TransparentRichEdits; - {$ELSE} - Result := False; - {$ENDIF} -end; - -procedure TdxCustomGridTableViewFormatter.AfterBuilding; -begin - inherited; - ReportLink.ReportCells.BorderColor := GridLineColor; -end; - -procedure TdxCustomGridTableViewFormatter.BeforeBuilding; -begin - inherited; - if ReportLink.OptionsSelection.ProcessSelection then BuildSelectedRecordList; -end; - -procedure TdxCustomGridTableViewFormatter.BuildSelectedRecordList; -var - I: Integer; - ARecord: TcxCustomGridRecord; - IsRecordIncluded: Boolean; - Helper: TdxCustomGridRecordHelper; -begin - SelectedRecordList.Clear; - - for I := 0 to Adapter.RecordCount - 1 do - begin - ARecord := Adapter.Records[I]; - IsRecordIncluded := ARecord.Selected; - if not IsRecordIncluded then - begin - Helper := Adapter.RecordHelpers[ARecord]; - IsRecordIncluded := Helper.HasSelectedChildren or - (not ReportLink.OptionsSelection.ProcessExactSelection and (SelectedRecordList.IndexOf(Helper.Parent) <> -1)); - end; - - if IsRecordIncluded then - SelectedRecordList.Add(ARecord); - end; -end; - -function TdxCustomGridTableViewFormatter.CanProcessSelectionStyle(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := (ARecord <> nil) and ReportLink.OptionsFormatting.ConsumeSelectionStyle and IsSelectedRecord(ARecord); - if Result and not ReportLink.OptionsFormatting.UseNativeStyles then - Result := Adapter.HasSelectionStyle; -end; - -function TdxCustomGridTableViewFormatter.IsSelectedRecord(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := (SelectedRecordCount <> 0) or ARecord.Selected; -end; - -function TdxCustomGridTableViewFormatter.GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; -begin - Result := bbContent; -end; - -function TdxCustomGridTableViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbContent: - Result := vspsGridContent; - else - Result := 0; - end; - - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -function TdxCustomGridTableViewFormatter.GetGridLineColor: TColor; -begin - Result := ReportLink.OptionsFormatting.GridLineColor; - if Result = clDefault then - Result := Adapter.GridLineColor; -end; - -function TdxCustomGridTableViewFormatter.GetRecord(Index: Integer): TcxCustomGridRecord; -begin - if SelectedRecordCount <> 0 then - Result := SelectedRecords[Index] - else - Result := Adapter.Records[Index]; -end; - -function TdxCustomGridTableViewFormatter.GetRecordCount: Integer; -begin - Result := SelectedRecordCount; - if Result = 0 then - Result := Adapter.RecordCount; -end; - -function TdxCustomGridTableViewFormatter.GetRecordIndex(ARecord: TcxCustomGridRecord): Integer; -var - RecordIndex, IndexCount, I: Integer; -begin - RecordIndex := ARecord.Index; - IndexCount := FRecordIndexes.Count; - if RecordIndex > IndexCount - 1 then - begin - FRecordIndexes.Count := RecordIndex + 1; - for I := IndexCount to FRecordIndexes.Count - 1 do - FRecordIndexes[I] := TObject(-1); - end; - Result := Integer(FRecordIndexes[RecordIndex]); - if Result = -1 then - begin - FRecordIndexes[RecordIndex] := TObject(IndexOfRecord(ARecord)); - Result := Integer(FRecordIndexes[RecordIndex]); - end; -end; - -function TdxCustomGridTableViewFormatter.GetSelectedRecord(Index: Integer): TcxCustomGridRecord; -begin - Result := TcxCustomGridRecord(FSelectedRecordList[Index]); -end; - -function TdxCustomGridTableViewFormatter.GetSelectedRecordCount: Integer; -begin - Result := FSelectedRecordList.Count; -end; - -{ TdxCustomGridTableViewBuilder } - -function TdxCustomGridTableViewBuilder.Adapter: TdxCustomGridTableViewAdapter; -begin - Result := inherited Adapter as TdxCustomGridTableViewAdapter; -end; - -class function TdxCustomGridTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxCustomGridTableViewAdapter; -end; - -function TdxCustomGridTableViewBuilder.Formatter: TdxCustomGridTableViewFormatter; -begin - Result := inherited Formatter as TdxCustomGridTableViewFormatter; -end; - -class function TdxCustomGridTableViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxCustomGridTableViewFormatter; -end; - -procedure TdxCustomGridTableViewBuilder.DoBuildViewFooter; -begin - if Formatter.ShowFilterBar {$IFDEF DXVER500} and (Formatter.FilterBarPosition = fpBottom) {$ENDIF} then - CreateFilterBar; - if Formatter.HasDetailsSeparator then - CreateBottomDetailsSeparator; - inherited; -end; - -procedure TdxCustomGridTableViewBuilder.DoBuildViewHeader; -begin - inherited; - if Formatter.HasDetailsSeparator then - CreateTopDetailsSeparator; - if Formatter.ShowCaption then - CreateCaption; - {$IFDEF DXVER500} - if Formatter.ShowFilterBar and (Formatter.FilterBarPosition = fpTop) then - CreateFilterBar; - {$ENDIF} -end; - -procedure TdxCustomGridTableViewBuilder.DoGetCellHeight(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem; var AHeight: Integer); -begin - ReportLink.DoGetCellHeight(GridView, ARecord, ATableItem, AHeight); -end; - -function TdxCustomGridTableViewBuilder.GridView: TcxCustomGridTableView; -begin - Result := inherited GridView as TcxCustomGridTableView; -end; - -class function TdxCustomGridTableViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridTableView; -end; - -{ TdxGridTableViewAdapter } - -constructor TdxGridTableViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited; - GridTableViewInfo_CalculateExpandButtonParams(GridView.ViewInfo); // because LevelIndent -end; - -function TdxGridTableViewAdapter.GridView: TcxGridTableView; -begin - Result := inherited GridView as TcxGridTableView; -end; - -class function TdxGridTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -function TdxGridTableViewAdapter.Styles: TcxGridTableViewStyles; -begin - Result := inherited Styles as TcxGridTableViewStyles; -end; - -function TdxGridTableViewAdapter.HasDetails(AGridRow: TcxCustomGridRow): Boolean; -begin - Result := RecordHelpers[AGridRow].HasDetails; -end; - -function TdxGridTableViewAdapter.GetGroupFooterCount(AGridRow: TcxCustomGridRow): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AGridRow.Level do - if HasGroupFooter(AGridRow, I) then - Inc(Result); -end; - -function TdxGridTableViewAdapter.GetGroupFooterItemText(ARowIndex, ALevel, AIndex: Integer): string; -var - SummaryIndex: Integer; -begin - SummaryIndex := Summary.GroupFooterIndexOfItemLink[ALevel, Columns[AIndex]]; - if SummaryIndex <> -1 then - Result := Summary.GroupFooterSummaryTexts[ARowIndex, ALevel, SummaryIndex] - else - Result := ''; -end; - -function TdxGridTableViewAdapter.HasGroupFooter(AGridRow: TcxCustomGridRow; ALevel: Integer): Boolean; -begin - if GroupFootersMode <> gfInvisible then - begin - if GroupFootersMode = gfAlwaysVisible then - Dec(ALevel); - Result := (0 <= ALevel) and (ALevel < AGridRow.Level) and AGridRow.IsParentRecordLast[ALevel]; - if (AGridRow is TcxGridGroupRow) and (GroupFootersMode = gfAlwaysVisible) then - Result := Result or (ALevel = -1) and not AGridRow.Expanded; - end - else - Result := False; -end; - -function TdxGridTableViewAdapter.HasGroupFooterItem(ALevel, AIndex: Integer): Boolean; -begin - Result := Summary.GroupFooterIndexOfItemLink[ALevel, Columns[AIndex]] <> -1; -end; - -function TdxGridTableViewAdapter.HasGroupFooters(AGridRow: TcxCustomGridRow): Boolean; -begin - Result := GetGroupFooterCount(AGridRow) <> 0; -end; - -function TdxGridTableViewAdapter.Controller: TcxGridTableController; -begin - Result := inherited Controller as TcxGridTableController; -end; - -function TdxGridTableViewAdapter.DataController: TcxGridDataController; -begin - Result := GridView.DataController; -end; - -function TdxGridTableViewAdapter.GetAutoWidth: Boolean; -begin - Result := GridView.OptionsView.ColumnAutoWidth; -end; - -function TdxGridTableViewAdapter.GetCellAutoHeight: Boolean; -begin - Result := inherited GetCellAutoHeight and (DetailsLineCount = 1) and not DataRowHeightAssigned; -end; - -function TdxGridTableViewAdapter.GetCellMultiline: Boolean; -begin - Result := inherited GetCellAutoHeight;// {3.1} and not DataRowHeightAssigned;// and (DetailsLineCount <> 1); -end; - -function TdxGridTableViewAdapter.GetHeaderAutoHeight: Boolean; -begin - Result := GridView.OptionsView.HeaderAutoHeight and not HeaderHeightAssigned; -end; - -function TdxGridTableViewAdapter.GetHeaderMultiline(Column: TcxGridColumn): Boolean; -begin - Result := HeaderAutoHeight or HeaderHeightAssigned; -end; - -function TdxGridTableViewAdapter.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount + GroupedColumnCount; - if (Result <> 0) and (GroupedColumnCount <> 0) and IsOffice11StyleGrouping then - Dec(Result); -end; - -function TdxGridTableViewAdapter.GetIndentWidth: Integer; -begin - Result := GridView.ViewInfo.LevelIndent; -end; - -function TdxGridTableViewAdapter.GetIndicatorWidth: Integer; -begin - if GridView.OptionsView.Indicator then - Result := GridView.OptionsView.IndicatorWidth - else - Result := 0; -end; - -function TdxGridTableViewAdapter.GetIsOffice11StyleGrouping: Boolean; -begin - {$IFDEF DXVER500} - Result := GridView.OptionsView.GroupRowStyle = grsOffice11; - {$ELSE} - Result := False; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetViewWidthExtra: Integer; -var - IndentCount: Integer; -begin - Result := inherited GetViewWidthExtra; - IndentCount := GroupedColumnCount; - if (IndentCount <> 0) and IsOffice11StyleGrouping then - Dec(IndentCount); - Inc(Result, IndentCount * IndentWidth); -end; - -function TdxGridTableViewAdapter.GetDataRowHeight: Integer; -begin - Result := GridView.OptionsView.DataRowHeight; -end; - -function TdxGridTableViewAdapter.GetDataRowHeightAssigned: Boolean; -begin - Result := DataRowHeight <> 0; -end; - -function TdxGridTableViewAdapter.GetFooterHeight: Integer; -begin - Result := DefaultFooterLineHeight;//GridView.OptionsView.HeaderHeight; {PS 3.03} -end; - -function TdxGridTableViewAdapter.GetFooterHeightAssigned: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewAdapter.GetGroupFooterHeight: Integer; -begin - Result := DefaultGroupFooterLineHeight; -end; - -function TdxGridTableViewAdapter.GetGroupFooterHeightAssigned: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewAdapter.GetGroupRowHeight: Integer; -begin - Result := GridView.OptionsView.GroupRowHeight; -end; - -function TdxGridTableViewAdapter.GetGroupRowHeightAssigned: Boolean; -begin - Result := GroupRowHeight <> 0; -end; - -function TdxGridTableViewAdapter.GetHeaderHeight: Integer; -begin - Result := GridView.OptionsView.HeaderHeight; -end; - -function TdxGridTableViewAdapter.GetHeaderHeightAssigned: Boolean; -begin - Result := HeaderHeight <> 0; -end; - -function TdxGridTableViewAdapter.GetFilterBarViewParams: TcxViewParams; -begin - Styles.GetViewParams(vsFilterBox, nil, nil, Result); -end; - -function TdxGridTableViewAdapter.GetFooterViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; AColumn: TcxGridColumn): TcxViewParams; -begin - if (AColumn <> nil) and (AColumn.Styles <> nil) then - AColumn.Styles.GetFooterParams(TcxCustomGridRow(ARecord), {$IFDEF DXVER500} AGroupLevel, {$ENDIF} Result) - else - Styles.GetFooterParams(TcxCustomGridRow(ARecord), AColumn, {$IFDEF DXVER500} AGroupLevel, {$ENDIF} Result); -end; - -function TdxGridTableViewAdapter.GetGroupRowViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer): TcxViewParams; -begin - if (AGroupLevel >= 0) and (AGroupLevel < Styles.GridView.GroupedItemCount) then - Styles.GetGroupParams(ARecord, AGroupLevel, Result) - else - Styles.GetViewParams(vsGroup, ARecord, nil, Result); -end; - -function TdxGridTableViewAdapter.GetHeaderViewParams(AColumn: TcxGridColumn): TcxViewParams; -begin - if (AColumn <> nil) and (AColumn.Styles <> nil) then - AColumn.Styles.GetHeaderParams(Result) - else - Styles.GetHeaderParams(AColumn, Result); - if AColumn = nil then - Result.Color := LookAndFeelPainter.DefaultHeaderBackgroundColor; -end; - -function TdxGridTableViewAdapter.GetPreviewViewParams(ARecord: TcxCustomGridRecord; - AnItem: TcxCustomGridTableItem): TcxViewParams; -begin - Styles.GetPreviewParams(ARecord, TcxGridColumn(AnItem), Result); - // 3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TdxGridTableViewAdapter.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := GridView.VisibleColumns[Index]; -end; - -function TdxGridTableViewAdapter.GetColumnCount: Integer; -begin - Result := GridView.VisibleColumnCount; -end; - -function TdxGridTableViewAdapter.GetExpandButtonColor: TColor; -begin - Result := ExpandButtonInteriorColor; -end; - -function TdxGridTableViewAdapter.GetExpandButtonSize: Integer; -begin - Result := GridView.ViewInfo.ExpandButtonSize; -end; - -function TdxGridTableViewAdapter.GetFooterItemText(Index: Integer): string; -var - SummaryIndex: Integer; -begin - SummaryIndex := Summary.FooterSummaryItems.IndexOfItemLink(Columns[Index]); - if SummaryIndex <> -1 then - Result := Summary.FooterSummaryTexts[SummaryIndex] - else - Result := ''; -end; - -function TdxGridTableViewAdapter.GetFooterMultiline: Boolean; -begin - {$IFDEF DXVER500} - Result := GridView.OptionsView.FooterAutoHeight; - {$ELSE} - Result := False; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetGridLineColor: TColor; -begin - Result := GridView.OptionsView.GridLineColor; - if Result = clDefault then - Result := GridView.LookAndFeelPainter.DefaultGridLineColor; -end; - -function TdxGridTableViewAdapter.GetGridLines: TcxGridLines; -begin - Result := GridView.OptionsView.GridLines; -end; - -function TdxGridTableViewAdapter.GetGroupedColumn(Index: Integer): TcxGridColumn; -begin - Result := GridView.GroupedColumns[Index]; -end; - -function TdxGridTableViewAdapter.GetGroupedColumnCount: Integer; -begin - Result := GridView.GroupedColumnCount; -end; - -function TdxGridTableViewAdapter.GetGroupFootersMode: TcxGridGroupFootersMode; -begin - Result := GridView.OptionsView.GroupFooters; -end; - -function TdxGridTableViewAdapter.GetGroupFootersMultiline: Boolean; -begin - {$IFDEF DXVER500} - Result := GridView.OptionsView.FooterAutoHeight; - {$ELSE} - Result := False; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetGroupRowSeparatorColor: TColor; -begin - {$IFDEF DXVER500} - Result := dxOffice11.dxOffice11GroupRowSeparatorColor; - {$ELSE} - Result := clBtnFace; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetGroupRowSeparatorThickness: Integer; -begin - {$IFDEF DXVER500} - Result := cxGridTableView.cxGridOffice11GroupRowSeparatorWidth; - {$ELSE} - Result := 2; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetHasFooterItem(Index: Integer): Boolean; -begin - Result := Summary.FooterSummaryItems.IndexOfItemLink(Columns[Index]) <> -1; -end; - -function TdxGridTableViewAdapter.GetHasPreview: Boolean; -begin - Result := PreviewColumn <> nil; -end; - -function TdxGridTableViewAdapter.GetHasRowSeparators: Boolean; -begin - Result := RowSeparatorThickness > 0; -end; - -function TdxGridTableViewAdapter.GetHeaderEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.HeaderEndEllipsis; -end; - -function TdxGridTableViewAdapter.GetInternalColumnMinWidth(Column: TcxGridColumn): Integer; -begin - Result := Column.MinWidth; - if Column.IsMostLeft then - Inc(Result, IndentCount * IndentWidth); -end; - -function TdxGridTableViewAdapter.GetInternalColumnWidth(Column: TcxGridColumn): Integer; -begin - Result := Column.Width; - if Column.IsMostLeft then - Inc(Result, IndentCount * IndentWidth); -end; - -function TdxGridTableViewAdapter.GetPreviewColumn: TcxGridColumn; -begin - Result := GridView.Preview.Column; -end; - -function TdxGridTableViewAdapter.GetPreviewLeftIndent: Integer; -begin - Result := GridView.Preview.LeftIndent; -end; - -function TdxGridTableViewAdapter.GetPreviewPlace: TcxGridPreviewPlace; -begin - Result := GridView.Preview.Place; -end; - -function TdxGridTableViewAdapter.GetPreviewRightIndent: Integer; -begin - Result := GridView.Preview.RightIndent; -end; - -function TdxGridTableViewAdapter.GetRow(Index: Integer): TcxCustomGridRow; -begin - Result := TcxCustomGridRow(Records[Index]); -end; - -function TdxGridTableViewAdapter.GetRowCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridTableViewAdapter.GetRowSeparatorColor: TColor; -begin - Result := GridView.OptionsView.RowSeparatorColor; -end; - -function TdxGridTableViewAdapter.GetRowSeparatorThickness: Integer; -begin - Result := GridView.OptionsView.RowSeparatorWidth; -end; - -function TdxGridTableViewAdapter.GetShowExpandButtonsForEmptyDetails: Boolean; -begin - {$IFDEF DXVER500} - Result := GridView.OptionsView.ExpandButtonsForEmptyDetails; - {$ELSE} - Result := True; - {$ENDIF} -end; - -function TdxGridTableViewAdapter.GetShowHorzGridLines: Boolean; -begin - Result := GridLines in [glBoth, glHorizontal]; -end; - -function TdxGridTableViewAdapter.GetShowVertGridLines: Boolean; -begin - Result := GridLines in [glBoth, glVertical]; -end; - -function TdxGridTableViewAdapter.GetThemedFooterItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFooterColor; -end; - -function TdxGridTableViewAdapter.GetThemedFooterItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFooterTextColor; -end; - -function TdxGridTableViewAdapter.GetThemedHeaderItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderColor; -end; - -function TdxGridTableViewAdapter.GetThemedHeaderItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderTextColor; -end; - -{ TdxCustomGridTableViewItemPlaceController } - -constructor TdxCustomGridTableViewItemPlaceController.Create(AFormatter: TdxGridTableViewFormatter); -begin - inherited Create; - FFormatter := AFormatter; - FHeaderLineCount := -1; - FWidth := -1; -end; - -procedure TdxCustomGridTableViewItemPlaceController.Calculate; -begin -end; - -procedure TdxCustomGridTableViewItemPlaceController.Refresh; -begin -end; - -function TdxCustomGridTableViewItemPlaceController.CalculateHeaderLineCount: Integer; -begin - Result := 1; -end; - -function TdxCustomGridTableViewItemPlaceController.CalculateWidth: Integer; -begin - Result := 0; -end; - -function TdxCustomGridTableViewItemPlaceController.GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; -begin - Result := nil; -end; - -procedure TdxCustomGridTableViewItemPlaceController.WidthChanged; -begin -end; - -function TdxCustomGridTableViewItemPlaceController.GetHeaderLineCount: Integer; -begin - if FHeaderLineCount = -1 then - FHeaderLineCount := CalculateHeaderLineCount; - Result := FHeaderLineCount; -end; - -function TdxCustomGridTableViewItemPlaceController.GetWidth: Integer; -begin - if FWidth = -1 then - FWidth := CalculateWidth; - Result := FWidth; -end; - -procedure TdxCustomGridTableViewItemPlaceController.SetWidth(Value: Integer); -begin - FWidth := Value; - WidthChanged; -end; - -{ TdxGridTableViewColumnPlace } - -constructor TdxGridTableViewColumnPlace.Create(AController: TdxGridTableViewColumnPlaceController; - AColumn: TcxGridColumn); -begin - inherited Create; - FController := AController; - FColumn := AColumn; - - FLeftBound := -1; - FWidth := -1; -end; - -procedure TdxGridTableViewColumnPlace.Calculate(ALeftBound: Integer); -begin - FLeftBound := ALeftBound; -end; - -function TdxGridTableViewColumnPlace.CalculateLeftBound: Integer; -begin - Result := Controller.CalculateItemLeftBound(Self); -end; - -function TdxGridTableViewColumnPlace.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridTableViewColumnPlace.GetRowIndex: Integer; -begin - Result := 0; -end; - -procedure TdxGridTableViewColumnPlace.InitAutoWidthItem(AnItem: TcxAutoWidthItem); -begin - AnItem.Fixed := IsFixed; - AnItem.MinWidth := MinWidth; - AnItem.Width := Width; -end; - -function TdxGridTableViewColumnPlace.GetAdapter: TdxGridTableViewAdapter; -begin - Result := Formatter.Adapter; -end; - -function TdxGridTableViewColumnPlace.GetCellBounds(RowIndex: Integer): TRect; -var - CellHeight: Integer; -begin - CellHeight := CellHeights[RowIndex]; - with Result do - begin - Left := LeftBound; - Top := Self.RowIndex * CellHeight; - Right := Left + Width; - Bottom := Top + LineCount * CellHeight; - end; - - if Column.IsMostLeft then - Inc(Result.Left, Formatter.ViewWidthExtra); -end; - -function TdxGridTableViewColumnPlace.GetCellHeight(RowIndex: Integer): Integer; -begin - Result := Formatter.RowHeights[RowIndex]; -end; - -function TdxGridTableViewColumnPlace.GetFooterCellBounds: TRect; -begin - with Result do - begin - Left := LeftBound; - Top := RowIndex * FooterLineHeight; - Right := Left + Width; - Bottom := Top + LineCount * FooterLineHeight; - end; - - InflateRect(Result, -FooterItemInflateHorz, -FooterItemInflateVert); - if Column.IsMostLeft then - Inc(Result.Left, 2); -end; - -function TdxGridTableViewColumnPlace.GetFooterLineHeight: Integer; -begin - Result := Formatter.FooterLineHeight; -end; - -function TdxGridTableViewColumnPlace.GetFormatter: TdxGridTableViewFormatter; -begin - Result := Controller.Formatter; -end; - -function TdxGridTableViewColumnPlace.GetGroupFooterCellBounds(IndentCount: Integer): TRect; -var - V: Integer; -begin - with Result do - begin - Left := LeftBound; - Top := RowIndex * GroupFooterLineHeight; - Right := Left + Width; - Bottom := Top + LineCount * GroupFooterLineHeight; - end; - - V := IndentCount * Formatter.IndentWidth; - OffsetRect(Result, -V, 0); - if Column.IsMostLeft then - Inc(Result.Left, V); - - InflateRect(Result, -FooterItemInflateHorz, -FooterItemInflateVert); - if Column.IsMostLeft then - Inc(Result.Left, 2); -end; - -function TdxGridTableViewColumnPlace.GetGroupFooterLineHeight: Integer; -begin - Result := Formatter.GroupFooterLineHeight; -end; - -function TdxGridTableViewColumnPlace.GetHeaderCellBounds: TRect; -begin - with Result do - begin - Left := LeftBound; - Top := RowIndex * HeaderLineHeight; - Right := Left + Width; - Bottom := Top + LineCount * HeaderLineHeight; - end; -end; - -function TdxGridTableViewColumnPlace.GetHeaderLineHeight: Integer; -begin - Result := Formatter.HeaderLineHeight; -end; - -function TdxGridTableViewColumnPlace.GetIndex: Integer; -begin - Result := Controller.IndexOf(Self); -end; - -function TdxGridTableViewColumnPlace.GetIsFixed: Boolean; -begin - Result := GridColumn_GetFixed(Column); -end; - -function TdxGridTableViewColumnPlace.GetLeftBound: Integer; -begin - if FLeftBound = -1 then - FLeftBound := CalculateLeftBound; - Result := FLeftBound; -end; - -function TdxGridTableViewColumnPlace.GetMinWidth: Integer; -begin - Result := Adapter.InternalColumnMinWidths[Column]; -end; - -function TdxGridTableViewColumnPlace.GetOriginalWidth: Integer; -begin - Result := Adapter.InternalColumnWidths[Column]; -end; - -function TdxGridTableViewColumnPlace.GetWidth: Integer; -begin - Result := FWidth; - if Result = -1 then - Result := OriginalWidth; -end; - -{ TdxGridTableViewColumnPlaceController } - -constructor TdxGridTableViewColumnPlaceController.Create(AFormatter: TdxGridTableViewFormatter); -begin - inherited; - FColumnIndexes := TList.Create; - FItems := TList.Create; - FWidth := -1; -end; - -destructor TdxGridTableViewColumnPlaceController.Destroy; -begin - FreeAndNilItems; - FreeAndNil(FColumnIndexes); - inherited; -end; - -procedure TdxGridTableViewColumnPlaceController.Calculate; -begin - if ItemsAutoWidth then CalculateItemsWidth; -end; - -procedure TdxGridTableViewColumnPlaceController.Refresh; -begin - FColumnIndexes.Clear; - ClearItems; - AddItems; -end; - -function TdxGridTableViewColumnPlaceController.IndexOf(AnItem: TdxGridTableViewColumnPlace): Integer; -begin - Result := FItems.IndexOf(AnItem); -end; - -function TdxGridTableViewColumnPlaceController.IndexOf(AColumn: TcxGridColumn): Integer; -begin - for Result := 0 to ItemCount - 1 do - if Items[Result].Column = AColumn then - Exit; - Result := -1; -end; - -function TdxGridTableViewColumnPlaceController.CalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ItemCount - 1 do - Inc(Result, Items[I].Width); -end; - -function TdxGridTableViewColumnPlaceController.GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; -var - Index: Integer; -begin - Index := ColumnIndexes[Column]; - //Index := IndexOf(Column); - if Index <> -1 then // might be -1 when we are in loading stage (Building report while loading form) - Result := Items[Index] - else - Result := nil; -end; - -procedure TdxGridTableViewColumnPlaceController.AddItems; -var - I: Integer; -begin - for I := 0 to Formatter.ColumnCount - 1 do - CreateItem(Formatter.Columns[I]); -end; - -procedure TdxGridTableViewColumnPlaceController.ClearItems; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].Free; - FItems.Clear; -end; - -function TdxGridTableViewColumnPlaceController.CreateItem(AColumn: TcxGridColumn): TdxGridTableViewColumnPlace; -begin - Result := GetItemClass(AColumn).Create(Self, AColumn); - FItems.Add(Result); -end; - -function TdxGridTableViewColumnPlaceController.GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; -begin - Result := TdxGridTableViewColumnPlace; -end; - -function TdxGridTableViewColumnPlaceController.CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AnItem.Index - 1 do - Inc(Result, Items[I].Width); -end; - -procedure TdxGridTableViewColumnPlaceController.CalculateItemsWidth; -var - AutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AutoWidthObject := TcxAutoWidthObject.Create(ItemCount); - try - for I := 0 to ItemCount - 1 do - Items[I].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := ItemsAvailableWidth; - AutoWidthObject.Calculate; - - for I := 0 to ItemCount - 1 do - Items[I].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; -end; - -function TdxGridTableViewColumnPlaceController.GetItemsAutoWidth: Boolean; -begin - Result := Formatter.AutoWidth; -end; - -function TdxGridTableViewColumnPlaceController.GetItemsAvailableWidth: Integer; -begin - Result := Formatter.ViewAvailableWidth; -end; - -function TdxGridTableViewColumnPlaceController.GetAdapter: TdxGridTableViewAdapter; -begin - Result := Formatter.Adapter; -end; - -function TdxGridTableViewColumnPlaceController.GetColumnIndex(Column: TcxGridColumn): Integer; -var - ColumnIndex, IndexCount, I: Integer; -begin - ColumnIndex := Column.Index; - IndexCount := FColumnIndexes.Count; - if ColumnIndex > IndexCount - 1 then - begin - FColumnIndexes.Count := ColumnIndex + 1; - for I := IndexCount to FColumnIndexes.Count - 1 do - FColumnIndexes[I] := TObject(-1); - end; - Result := Integer(FColumnIndexes[ColumnIndex]); - if Result = -1 then - begin - FColumnIndexes[ColumnIndex] := TObject(IndexOf(Column)); - Result := Integer(FColumnIndexes[ColumnIndex]); - end; -end; - -function TdxGridTableViewColumnPlaceController.GetItem(Index: Integer): TdxGridTableViewColumnPlace; -begin - Result := TdxGridTableViewColumnPlace(FItems[Index]); -end; - -function TdxGridTableViewColumnPlaceController.GetItemCount: Integer; -begin - Result := FItems.Count; -end; - -procedure TdxGridTableViewColumnPlaceController.FreeAndNilItems; -begin - ClearItems; - FreeAndNil(FItems); -end; - -{ TdxGridTableViewReportDataAdapter } - -constructor TdxGridTableViewReportDataAdapter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TdxGridTableViewReportDataAdapter.GetReportItem(Row: TcxCustomGridRow; - Column: TcxGridColumn): TdxReportVisualItem; -var - ReportRow: TdxReportCell; - I: Integer; -begin - ReportRow := ReportRowsByGridRow[Row]; - if ReportRow <> nil then - for I := 0 to ReportRow.DataItemCount - 1 do - begin - Result := ReportRow.DataItems[I]; - if Result.Data = Integer(Column) then Exit; - end; - Result := nil; -end; - -function TdxGridTableViewReportDataAdapter.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := Builder.ReportRows[Index]; -end; - -function TdxGridTableViewReportDataAdapter.GetReportRowByGridRow(Row: TcxCustomGridRow): TdxReportCell; -var - I: Integer; -begin - for I := 0 to ReportRowCount - 1 do - if ReportRows[I].CellCount <> 0 then - begin - Result := ReportRows[I].Cells[0]; - if Result.Data = Integer(Row) then Exit; - end; - Result := nil; -end; - -function TdxGridTableViewReportDataAdapter.GetReportRowCount: Integer; -begin - Result := Builder.ReportRowCount; -end; - -{ TdxGridTableViewFormatter } - -constructor TdxGridTableViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FColumns := TList.Create; - FItemPlaceController := GetItemPlaceControllerClass.Create(Self); - FReportDataAdapter := TdxGridTableViewReportDataAdapter.Create(ABuilder); - FRowHeights := TList.Create; -end; - -destructor TdxGridTableViewFormatter.Destroy; -begin - FreeAndNil(FRowHeights); - FreeAndNil(FItemPlaceController); - FreeAndNil(FReportDataAdapter); - FreeAndNil(FColumns); - inherited; -end; - -function TdxGridTableViewFormatter.Adapter: TdxGridTableViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridTableViewFormatter.Builder: TdxGridTableViewBuilder; -begin - Result := inherited Builder as TdxGridTableViewBuilder; -end; - -procedure TdxGridTableViewFormatter.DoInitializeFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Column: TcxGridColumn; -begin - Column := Columns[AnIndex]; - SetViewParams(AnItem, GetFooterItemViewParams(Column)); - if HasBackgroundBitmap(bbFooter) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbFooter); - - RegisterLookAndFeelItem(AnItem, cesSunken); - - with AnItem as TdxReportCellString do - begin - Data := Integer(Column); - Text := Adapter.FooterItemTexts[AnIndex]; - Multiline := Adapter.FooterMultiline; - TextAlignX := TextAlignXMap[Column.FooterAlignmentHorz]; - if Multiline then - TextAlignY := taTop - else - TextAlignY := taCenterY; - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeFooterRow(ARow: TdxReportCell); -begin - SetViewParams(ARow, GetFooterItemViewParams(nil)); - RegisterLookAndFeelItem(ARow, cesRaised); - ARow.Data := Integer(TdxGridFooter); -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - ReportLink.DoInitializeFooterCell(Adapter.GridView, nil, Columns[AnIndex], 0, TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetFooterItemBounds(AnIndex: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AnIndex]]; - if Item <> nil then - Result := Item.FooterCellBounds - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridTableViewFormatter.GetFooterItemViewParams(AColumn: TcxGridColumn): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetFooterParams(nil, -1, AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetFooterViewParams(nil, -1, AColumn); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedFooterItemColor; - Result.NativeParams.TextColor := Adapter.ThemedFooterItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterHost(AnItem: TdxReportVisualItem; - ARecord: TcxCustomGridRecord; AGroupLevel: Integer); -begin - SetViewParams(AnItem, GetGroupFooterItemViewParams(nil, AGroupLevel, nil)); - RegisterLookAndFeelItem(AnItem, cesRaised); - AnItem.Data := Integer(ARecord); -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); -var - Column: TcxGridColumn; -begin - Column := Columns[AnIndex]; - SetViewParams(AnItem, GetGroupFooterItemViewParams(ARecord, AGroupLevel, Column)); - if HasBackgroundBitmap(bbFooter) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbFooter); - RegisterLookAndFeelItem(AnItem, cesSunken); - - with TdxReportCellString(AnItem) do - begin - Data := Integer(Column); - Multiline := Adapter.GetGroupFootersMultiline; - Text := Adapter.GetGroupFooterItemText(ARecord.Index, AGroupLevel, AnIndex); - TextAlignX := TextAlignXMap[Column.FooterAlignmentHorz]; - if Multiline then - TextAlignY := taTop - else - TextAlignY := taCenterY; - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord; AGroupLevel: Integer); -begin - ARow.CellSides := csLeftRight; - ARow.Data := AGroupLevel; //v3.0 ARecord.Level - ARow.Transparent := True; -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeGroupFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer; ARecord: TcxCustomGridRecord; AGroupLevel: Integer); -begin - ReportLink.DoInitializeFooterCell(Adapter.GridView, ARecord, Columns[AnIndex], - AGroupLevel, TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetGroupFooterItemBounds(AnIndex, AGroupLevel: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AnIndex]]; - if Item <> nil then - Result := Item.GroupFooterCellBounds[AGroupLevel] - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetGroupFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridTableViewFormatter.GetGroupFooterItemViewParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; AColumn: TcxGridColumn): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetFooterParams(ARecord, AGroupLevel, AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetFooterViewParams(ARecord, AGroupLevel, AColumn); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedFooterItemColor; - Result.NativeParams.TextColor := Adapter.ThemedFooterItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRowItem(AnItem: TAbstractdxReportCellData; - ARow: TcxGridGroupRow); -var - AText: string; -begin - SetViewParams(AnItem, GetGroupRowViewParams(ARow, ARow.Level)); - if HasBackgroundBitmap(bbGroup) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); - - with AnItem as TdxReportCellString do - begin - Data := Integer(Adapter.GroupedColumns[ARow.Level]); - AText := ARow.DisplayText; - TcxCustomGridTableItemAccess(ARow.GroupedColumn).DoGetDisplayText(ARow, AText); - Text := AText; - TextAlignX := taLeft; - if Adapter.IsOffice11StyleGrouping then TextAlignY := taBottom; {.2} - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord); -begin - ReportLink.AddReportRow(ARow); - - ARow.CellSides := []; - ARow.Data := Integer(ARecord); - ARow.Transparent := True; -end; - -function TdxGridTableViewFormatter.GetGroupRowClass: TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridTableViewFormatter.GetGroupRowViewParams(ARecord: TcxCustomGridRecord; - ALevel: Integer): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetGroupParams(ARecord, ALevel, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetGroupRowViewParams(ARecord, ALevel); - - Result.CellSides := CellSidesMap[Adapter.GridLines] - [csLeft] + [csRight]; - if ARecord.Index = 0 then - Result.CellSides := Result.CellSides + [csTop]; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRowSeparator(ASeparator: TAbstractdxReportCellData); -begin - ASeparator.CellSides := csAll; - ASeparator.Color := GroupRowSeparatorColor; - ASeparator.Transparent := IsColorTransparent(ASeparator.Color); //ReportLink.Transparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupSeparatorRow(ARow: TdxReportCell); -begin - ARow.CellSides := csLeftRight; - ARow.Transparent := True; -end; - -function TdxGridTableViewFormatter.GetGroupRowSeparatorClass: TdxReportCellDataClass; -begin - Result := TdxReportCellBox; -end; - -procedure TdxGridTableViewFormatter.DoInitializeHeaderItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Column: TcxGridColumn; -begin - Column := Columns[AnIndex]; - SetViewParams(AnItem, GetHeaderItemViewParams(Column)); - if HasBackgroundBitmap(bbHeader) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbHeader); - RegisterLookAndFeelItem(AnItem, cesRaised); - - with AnItem as TdxReportCellImage do - begin - Data := Integer(Column); - EndEllipsis := Adapter.HeaderEndEllipsis; - if (Column.HeaderGlyph <> nil) and not Column.HeaderGlyph.Empty then - begin - Image := Column.HeaderGlyph; - ImageLayout := HeaderImageLayoutMap[Column.HeaderGlyphAlignmentHorz, Column.HeaderGlyphAlignmentVert]; - IsTextDrawnForCenteredImage := True; - IsTextShiftedForHorizontallyCenteredImage := - not (ImageLayout in [ilImageTopCenter, ilImageCenterCenter, ilImageBottomCenter]) and (Text <> ''); - end; - Multiline := Adapter.HeaderMultilines[Column]; - SortOrder := SortOrderMap[Column.SortOrder]; - Text := Column.Caption; - TextAlignX := TextAlignXMap[Column.HeaderAlignmentHorz]; - if Multiline then - TextAlignY := TextAlignYMap[Column.HeaderAlignmentVert] - else - TextAlignY := taCenterY; - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeHeaderRow(ARow: TdxReportCell); -begin - SetViewParams(ARow, GetHeaderItemViewParams(nil)); - ARow.Data := Integer(TdxGridHeader); -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeHeaderItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - ReportLink.DoInitializeHeaderCell(Adapter.GridView, Columns[AnIndex], TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetHeaderItemBounds(AnIndex: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AnIndex]]; - if Item <> nil then - Result := Item.HeaderCellBounds - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetHeaderItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellImage; -end; - -function TdxGridTableViewFormatter.GetHeaderItemViewParams(AColumn: TcxGridColumn): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetHeaderParams(AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetHeaderViewParams(AColumn); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedHeaderItemColor; - Result.NativeParams.TextColor := Adapter.ThemedHeaderItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := False; -end; - -function TdxGridTableViewFormatter.CreateIndent(AParent: TdxReportCell): TdxReportCellExpandButton; -begin - Result := GetIndentClass.Create(AParent); -end; - -procedure TdxGridTableViewFormatter.DoInitializeDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, False)); - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); -end; - -procedure TdxGridTableViewFormatter.DoInitializeExpandButton(AnExpandButton: TdxReportCellExpandButton; - ARecord: TcxCustomGridRecord; AnIsMasterIndent: Boolean); -begin - with AnExpandButton do - begin - {3.1 added} - ButtonAlignHorz := bahCenter; - if Adapter.IsOffice11StyleGrouping and not AnIsMasterIndent then {.2} - ButtonAlignVert := bavBottom - else - ButtonAlignVert := bavCenter; - - ButtonExpanded := ARecord.Expanded; - ButtonSize := Adapter.ExpandButtonSize; - if (ReportLink.OptionsFormatting.LookAndFeelKind <> lfStandard) and not Odd(ButtonSize) then - ButtonSize := ButtonSize - 1; - ButtonInteriorColor := Adapter.ExpandButtonColor; - ButtonTransparent := IsColorTransparent(ButtonInteriorColor); - end; - RegisterExpandButton(AnExpandButton); -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupFooterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, True)); - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); -// if (AIndex = AIndentCount - 1) and Adapter.ShowHorzGridLines then -// AIndent.CellSides := AIndent.CellSides + [csBottom]; -end; - -procedure TdxGridTableViewFormatter.DoInitializeGroupRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, False)); - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); - - if AnIndex = AnIndentCount - 1 then - begin - AnIndent.CellSides := AnIndent.CellSides - [csRight]; - if Adapter.ShowHorzGridLines then - AnIndent.CellSides := AnIndent.CellSides + [csTop]; - //if Adapter.IsOffice11StyleGrouping then - // AnIndent.CellSides := AnIndent.CellSides + [csBottom]; - - AnIndent.ShowButton := HasExpandButton(ARecord); - if AnIndent.ShowButton then - DoInitializeExpandButton(AnIndent, ARecord, False); - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeMasterDataRowIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - { DoInitializeMasterIndent -> ARecord = nil } - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, False)); - if AnIndex = AnIndentCount - 1 then - if HasBackgroundBitmap(bbContent) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbContent) - else - else - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); - - if (ARecord <> nil) and (AnIndex = AnIndentCount - 1) then - begin - AnIndent.CellSides := AnIndent.CellSides - [csRight]; - if Adapter.ShowHorzGridLines then - AnIndent.CellSides := AnIndent.CellSides + [csTop]; - if not ARecord.Expanded then - AnIndent.CellSides := AnIndent.CellSides + [csBottom]; - - AnIndent.ShowButton := ReportLink.OptionsView.ExpandButtons and ARecord.Expandable; - if AnIndent.ShowButton then - DoInitializeExpandButton(AnIndent, ARecord, True); - end; -end; - -procedure TdxGridTableViewFormatter.DoInitializeRowSeparatorIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ARecord: TcxCustomGridRecord); -begin - SetViewParams(AnIndent, GetIndentViewParams(ARecord, AnIndex, AnIndentCount, True)); - if HasBackgroundBitmap(bbGroup) then - AnIndent.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbGroup); -end; - -function TdxGridTableViewFormatter.GetIndentClass: TdxReportCellExpandButtonClass; -begin - if Adapter.IsOffice11StyleGrouping then - Result := TdxReportCellExpandButtonEx - else - Result := TdxReportCellExpandButton; -end; - -function TdxGridTableViewFormatter.GetIndentViewParams(ARecord: TcxCustomGridRecord; - AnIndex, AnIndentCount: Integer; ANonRecordIndent: Boolean): TdxReportItemViewParams; - - function IsMasterDataRowIndent: Boolean; - begin - with Adapter do - Result := AnIndex >= GroupedColumnCount - Ord(IsOffice11StyleGrouping and not (ARecord is TcxGridGroupRow)); - end; - - function GetRecord: TcxCustomGridRecord; - begin - if not ANonRecordIndent and (ARecord is TcxGridGroupRow) and (AnIndex = AnIndentCount - 1) then - Result := ARecord - else - Result := nil; - end; - -const - VertGridLinesMap: array[Boolean] of TdxCellSides = ([], csLeftRight); -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - if IsMasterDataRowIndent then - ReportLink.Styles.GetContentParams(Adapter.MasterGridRecord, nil, Result.NativeParams) - else - ReportLink.Styles.GetGroupParams(GetRecord, AnIndex, Result.NativeParams) - else - if IsMasterDataRowIndent then - Result.NativeParams := Adapter.GetContentViewParams(Adapter.MasterGridRecord, nil) - else - Result.NativeParams := Adapter.GetGroupRowViewParams(GetRecord, AnIndex); - - Result.CellSides := VertGridLinesMap[Adapter.ShowHorzGridLines]; //PS3.1 (it was Adapter.ShowVertGridLines) - if AnIndex = 0 then - Result.CellSides := Result.CellSides + [csLeft]; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); -end; - -function TdxGridTableViewFormatter.HasExpandButton(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := ReportLink.OptionsView.ExpandButtons{$IFDEF VER500} and Adapter.RecordHelpers[ARecord].HasExpandButton{$ENDIF}; -end; - -procedure TdxGridTableViewFormatter.DoInitializeDataRow(ARow: TdxReportCell; - ARecord: TcxCustomGridRecord); -begin - ReportLink.AddReportRow(ARow); - - ARow.CellSides := csLeftRight; - ARow.Data := Integer(ARecord); - ARow.Transparent := True; -end; - -procedure TdxGridTableViewFormatter.DoReportLinkInitializeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxGridColumn; ARecord: TcxCustomGridRecord); -begin - ReportLink.DoInitializeCell(Adapter.GridView, ARecord, AColumn, TdxReportCellString(AnItem)); -end; - -function TdxGridTableViewFormatter.GetItemBounds(AGridRow: TcxCustomGridRow; - AGridRowIndex, AColumnIndex: Integer): TRect; -var - Item: TdxGridTableViewColumnPlace; -begin - Item := ItemPlaceController[Columns[AColumnIndex]]; - if Item <> nil then - Result := Item.CellBounds[AGridRowIndex] - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridTableViewFormatter.GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; -begin - Result := inherited GetItemViewParams(ATableItem, ARecord, AnIsPreview); - if AnIsPreview then - begin - Result.CellSides := csLeftRight; - if Adapter.GridLines in [glBoth, glHorizontal] then - Result.CellSides := Result.CellSides + csTopBottom; - end - else - begin - Result.CellSides := CellSidesMap[Adapter.GridLines]; - if TcxGridColumn(ATableItem).IsMostLeft and (ARecord <> nil) and ARecord.Expandable then - Result.CellSides := Result.CellSides - [csLeft]; {3.1} - end; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; -end; - -procedure TdxGridTableViewFormatter.DoInitializeMasterIndent(AnIndent: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer); -begin - DoInitializeMasterDataRowIndent(AnIndent, AnIndex, AnIndentCount, nil); //Adapter.GroupedColumnCount + 1, nil); //PS3.1 changed -end; - -procedure TdxGridTableViewFormatter.DoInitializePreview(APreview: TAbstractdxReportCellData; - AColumn: TcxGridColumn; ARecord: TcxCustomGridRecord); -begin - DoInitializeItem(APreview, AColumn, ARecord, True); -end; - -function TdxGridTableViewFormatter.GetPreviewClass(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportCellDataClass; -begin - Result := GetItemClass(AColumn, ARecord, True); -end; - -function TdxGridTableViewFormatter.GetPreviewViewParams(AColumn: TcxGridColumn; - ARecord: TcxCustomGridRecord): TdxReportItemViewParams; -begin - Result := GetItemViewParams(AColumn, ARecord, True) -end; - -procedure TdxGridTableViewFormatter.DoInitializeSeparatorRow(ARow: TdxReportCell); -begin - ARow.CellSides := csLeftRight; - ARow.Transparent := True; -end; - -procedure TdxGridTableViewFormatter.DoInitializeRowSeparator(ASeparator: TAbstractdxReportCellData); -begin - ASeparator.CellSides := csAll; - ASeparator.Color := RowSeparatorColor; - ASeparator.Transparent := IsColorTransparent(ASeparator.Color); //ReportLink.Transparent; -end; - -function TdxGridTableViewFormatter.GetRowSeparatorClass: TdxReportCellDataClass; -begin - Result := TdxReportCellBox; -end; - -function TdxGridTableViewFormatter.GetReportItem(ARow: TcxCustomGridRow; - AColumn: TcxGridColumn): TdxReportVisualItem; -begin - Result := ReportDataAdapter.ReportItems[ARow, AColumn]; -end; - -{ IdxPSCellParams2 } -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := Adapter.PreviewLeftIndent; -end; - -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := Adapter.PreviewRightIndent; -end; - -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - if PreviewAutoHeight then - Result := -1 - else - Result := PreviewLineHeight * PreviewMaxLineCount; -end; - -function TdxGridTableViewFormatter.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := PreviewMaxLineCount; -end; - -procedure TdxGridTableViewFormatter.AddHorizontalDelimiters; -var - Origin, I: Integer; - Item: TdxGridTableViewColumnPlace; - R: TRect; -begin - inherited; - if ReportLink.OptionsPagination.Column then - begin - Origin := ViewWidthExtraBefore; - for I := 0 to ColumnCount - 1 do - begin - Item := ItemPlaceController[Columns[I]]; - if Item <> nil then - begin - R := Item.HeaderCellBounds; - ReportLink.AddHorizontalDelimiter(Origin + R.Left); - ReportLink.AddHorizontalDelimiter(Origin + R.Right); - end; - end; - end; -end; - -{$IFDEF DXVER500} -procedure TdxGridTableViewFormatter.AfterBuilding; -begin - if CanCellMerging then PerformCellMerging; - inherited; -end; -{$ENDIF} - -procedure TdxGridTableViewFormatter.BeforeBuilding; -begin - BuildItemLists; - ItemPlaceController.Refresh; - inherited; -end; - -procedure TdxGridTableViewFormatter.Calculate; -begin - inherited; - ItemPlaceController.Calculate; -end; - -procedure TdxGridTableViewFormatter.CalculateDataRowHeights; -var - I, RowHeight, J, V: Integer; - Row: TcxCustomGridRow; - Column: TcxGridColumn; -begin - FRowHeights.Count := RowCount; - for I := 0 to RowCount - 1 do - begin - Row := Rows[I]; - if not (Row is TcxGridGroupRow) then - begin - RowHeight := DetailsLineHeight; - if HeaderLineCount = 1 then - for J := 0 to ColumnCount - 1 do - begin - // assign to 0, if you want to give an user ability to shrink RowHeight to smaller value - V := DetailsLineHeight; - Column := Columns[J]; - if not Column.IsPreview then - begin - Builder.DoGetCellHeight(Row, Columns[J], V); - if RowHeight <> V then RowHeight := V; - end; - end - end - else - RowHeight := GroupRowLineHeight; - RowHeights[I] := RowHeight; - end; -end; - -procedure TdxGridTableViewFormatter.CalculateLineHeights; -var - I: Integer; - Column: TcxGridColumn; -begin - inherited; - FGroupFooterLineHeight := DefaultGroupFooterLineHeight; - if Adapter.GroupRowHeightAssigned then - FGroupRowLineHeight := Adapter.GroupRowHeight - else - begin - FGroupRowLineHeight := DefaultGroupRowLineHeight; - if Adapter.IsOffice11StyleGrouping then {.2} - FGroupRowLineHeight := 2 * FGroupRowLineHeight; - end; - - FFooterLineHeight := Adapter.FooterHeight; - FGroupFooterLineHeight := Adapter.GroupFooterHeight; - FHeaderLineHeight := Adapter.HeaderHeight; - - if Adapter.DataRowHeightAssigned then - FDetailsLineHeight := Adapter.DataRowHeight - else - FDetailsLineHeight := DefaultDataRowLineHeight; - - FPreviewLineHeight := DefaultDataRowLineHeight; - - for I := 0 to ColumnCount - 1 do - begin - Column := Columns[I]; - if not Adapter.HeaderHeightAssigned then - CalculateHeight(GetHeaderItemViewParams(Column), FHeaderLineHeight); - {if not Adapter.FooterHeightAssigned then - begin - CalculateHeight(GetGroupFooterItemViewParams(nil, -1, Column), FGroupFooterLineHeight); - CalculateHeight(GetFooterItemViewParams(Column), FFooterLineHeight); - end;} - if not Adapter.FooterHeightAssigned then - CalculateHeight(GetFooterItemViewParams(Column), FFooterLineHeight); - if not Adapter.GroupFooterHeightAssigned then - CalculateHeight(GetGroupFooterItemViewParams(nil, -1, Column), FGroupFooterLineHeight); - if not Adapter.DataRowHeightAssigned and not Column.IsPreview then - CalculateHeight(GetItemViewParams(Column, nil, False), FDetailsLineHeight); - end; - - if not Adapter.GroupRowHeightAssigned then - for I := 0 to RowCount - 1 do - CalculateHeight(GetGroupRowViewParams(Rows[I], -1), FGroupRowLineHeight); - - if HasPreview then - CalculateHeight(GetItemViewParams({PreviewColumn}nil, nil, True), FPreviewLineHeight); - - Inc(FFooterLineHeight, 2 * FooterItemInflateVert - 1); - Inc(FGroupFooterLineHeight, 2 * FooterItemInflateVert - 1); - - CalculateDataRowHeights; -end; - -function TdxGridTableViewFormatter.GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; -begin - Result := TdxGridTableViewColumnPlaceController; -end; - -function TdxGridTableViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbFooter: - Result := vspsGridFooter; - bbGroup: - Result := vspsGridGroup; - bbHeader: - Result := vspsGridHeader; - bbPreview: - Result := vspsGridPreview; - else - Result := 0; - end; - - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -{$IFDEF DXVER500} - -function TdxGridTableViewFormatter.CanCellMerging: Boolean; -begin - Result := not HasPreview and (RowSeparatorThickness = 0); -end; - -function TdxGridTableViewFormatter.CanColumnCellMerging(AColumn: TcxGridColumn): Boolean; -begin - Result := AColumn.Options.CellMerging; -end; - -procedure TdxGridTableViewFormatter.PerformCellMerging; -var - I: Integer; - Column: TcxGridColumn; -begin - for I := 0 to ColumnCount - 1 do - begin - Column := Columns[I]; - if CanColumnCellMerging(Column) then // because Column.CanCellMerging also performs GridView.CellMerging validation - PerformColumnCellMerging(Column); - end; -end; - -procedure TdxGridTableViewFormatter.PerformColumnCellMerging(AColumn: TcxGridColumn); - - function CanRowBeMergedAsMaster(ARow: TcxCustomGridRow): Boolean; - begin - Result := Adapter.RecordHelpers[ARow].CanCellMergingAsMaster; - end; - - function CanRowBeMergedAsSlave(ARow: TcxCustomGridRow): Boolean; - begin - Result := Adapter.RecordHelpers[ARow].CanCellMergingAsSlave; - end; - - function IsRowMergingSeparator(ARow: TcxCustomGridRow): Boolean; - begin - Result := Adapter.RecordHelpers[ARow].IsCellMergingSeparator; - end; - - procedure RetrieveCellPropertiesAndValue(ARow: TcxCustomGridRow; - out AProperties: TcxCustomEditProperties; out AValue: TcxEditValue); - begin - AProperties := GetItemProperties(AColumn, ARow); - AValue := GetItemValue(AProperties, AColumn, ARow); - end; - - function CompareCellsForMerging(ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; - const AValue1: TcxEditValue; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; - const AValue2: TcxEditValue): Boolean; - begin - Result := GridColumn_DoCompareValuesForCellMerging(AColumn, - ARow1, AProperties1, AValue1, ARow2, AProperties2, AValue2); - end; - - procedure DoMergeCells(AStartRowIndex, AStopRowIndex: Integer); - var - I: Integer; - MasterReportItem, SlaveReportItem: TdxReportVisualItem; - begin - MasterReportItem := GetReportItem(Rows[AStartRowIndex], AColumn); - for I := AStartRowIndex + 1 to AStopRowIndex do - begin - SlaveReportItem := GetReportItem(Rows[I], AColumn); - with MasterReportItem do - Height := Height + SlaveReportItem.Height; - end; - for I := AStartRowIndex + 1 to AStopRowIndex do - begin - SlaveReportItem := GetReportItem(Rows[I], AColumn); - if SlaveReportItem is TdxReportCellString then - TdxReportCellString(SlaveReportItem).Text := ''; - SlaveReportItem.BackgroundBitmapIndex := MasterReportItem.BackgroundBitmapIndex; - if I <> AStopRowIndex then - SlaveReportItem.CellSides := SlaveReportItem.CellSides - [csBottom]; - SlaveReportItem.CellSides := SlaveReportItem.CellSides - [csTop]; - SlaveReportItem.Color := MasterReportItem.Color; - SlaveReportItem.ContentBkColor := MasterReportItem.ContentBkColor; - SlaveReportItem.ContentPattern := MasterReportItem.ContentPattern; - SlaveReportItem.Transparent := True; - end; - end; - -var - I, J: Integer; - Row1, Row2: TcxCustomGridRow; - HasCellsMerging, AreCellsMerged, IsMergingSeparator: Boolean; - Properties1, Properties2: TcxCustomEditProperties; - Value1, Value2: TcxEditValue; -begin - I := 0; - while I < RowCount - 1 do - begin - HasCellsMerging := False; - Row1 := Rows[I]; - if CanRowBeMergedAsMaster(Row1) then - begin - RetrieveCellPropertiesAndValue(Row1, Properties1, Value1); - //AreCellsMerged := False; - IsMergingSeparator := False; - J := I; - repeat - Inc(J); - Row2 := Rows[J]; - if CanRowBeMergedAsSlave(Row2) then - begin - RetrieveCellPropertiesAndValue(Row2, Properties2, Value2); - AreCellsMerged := CompareCellsForMerging(TcxGridDataRow(Row1), - Properties1, Value1, TcxGridDataRow(Row2), Properties2, Value2); - if not HasCellsMerging then - HasCellsMerging := AreCellsMerged; - IsMergingSeparator := IsRowMergingSeparator(Row2); - end - else - AreCellsMerged := False; - until (J = RowCount - 1) or not AreCellsMerged or IsMergingSeparator; - - if HasCellsMerging then - begin - if not AreCellsMerged then Dec(J); - DoMergeCells(I, J); - Inc(J); - end; - I := J; - end - else - Inc(I); - end; -end; - -{$ENDIF} - -procedure TdxGridTableViewFormatter.BuildColumnList; -var - I: Integer; - Column: TcxGridColumn; -begin - FColumns.Clear; - for I := 0 to Adapter.ColumnCount - 1 do - begin - Column := Adapter.Columns[I]; - if IsColumnActuallyVisible(Column) then FColumns.Add(Column); - end; -end; - -procedure TdxGridTableViewFormatter.BuildItemLists; -begin - BuildColumnList; -end; - -function TdxGridTableViewFormatter.IsColumnActuallyVisible(AColumn: TcxGridColumn): Boolean; -begin - Result := AColumn.ActuallyVisible; -end; - -function TdxGridTableViewFormatter.GetViewWidth: Integer; -begin - Result := ItemPlaceController.Width; -end; - -function TdxGridTableViewFormatter.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := TcxGridColumn(FColumns[Index]); -end; - -function TdxGridTableViewFormatter.GetColumnCount: Integer; -begin - Result := FColumns.Count; -end; - -function TdxGridTableViewFormatter.GetGroupRowSeparatorColor: TColor; -begin - Result := Adapter.GroupRowSeparatorColor; -end; - -function TdxGridTableViewFormatter.GetGroupRowSeparatorThickness: Integer; -begin - Result := Adapter.GroupRowSeparatorThickness; -end; - -function TdxGridTableViewFormatter.GetHasPreview: Boolean; -begin - Result := Adapter.HasPreview and ShowPreview and - (PreviewAutoHeight or (PreviewMaxLineCount > 0)); -end; - -function TdxGridTableViewFormatter.GetHeaderLineCount: Integer; -begin - Result := ItemPlaceController.HeaderLineCount; -end; - -function TdxGridTableViewFormatter.GetPreviewAutoHeight: Boolean; -begin - Result := ReportLink.OptionsPreview.AutoHeight; -end; - -function TdxGridTableViewFormatter.GetPreviewColumn: TcxGridColumn; -begin - Result := Adapter.PreviewColumn; -end; - -function TdxGridTableViewFormatter.GetPreviewMaxLineCount: Integer; -begin - Result := ReportLink.OptionsPreview.MaxLineCount; -end; - -function TdxGridTableViewFormatter.GetRow(Index: Integer): TcxCustomGridRow; -begin - Result := inherited Records[Index] as TcxCustomGridRow; -end; - -function TdxGridTableViewFormatter.GetRowCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridTableViewFormatter.GetRowHeight(Index: Integer): Integer; -begin - Result := Integer(FRowHeights[Index]) -end; - -function TdxGridTableViewFormatter.GetRowHeightByRow(Row: TcxCustomGridRow): Integer; -begin - Result := {20;//}RowHeights[RecordIndexes[Row]]; -end; - -function TdxGridTableViewFormatter.GetRowSeparatorColor: TColor; -begin - Result := Adapter.RowSeparatorColor; - {with ReportLink.OptionsFormatting do - if UseNativeStyles then - begin - Result := FixedColor; - end;} -end; - -function TdxGridTableViewFormatter.GetRowSeparatorThickness: Integer; -begin - Result := Adapter.RowSeparatorThickness; -end; - -function TdxGridTableViewFormatter.GetShowGroupFooters: Boolean; -begin - Result := ReportLink.OptionsView.GroupFooters; -end; - -function TdxGridTableViewFormatter.GetShowFooters: Boolean; -begin - Result := ReportLink.OptionsView.Footers; -end; - -function TdxGridTableViewFormatter.GetShowHeaders: Boolean; -begin - Result := ReportLink.OptionsView.Headers; -end; - -function TdxGridTableViewFormatter.GetShowPreview: Boolean; -begin - Result := ReportLink.OptionsPreview.Visible; -end; - -procedure TdxGridTableViewFormatter.SetRowHeight(Index: Integer; Value: Integer); -begin - FRowHeights[Index] := TObject(Value); -end; - -procedure TdxGridTableViewFormatter.SetRowHeightByRow(Row: TcxCustomGridRow; Value: Integer); -begin - RowHeights[IndexOfRecord(Row)] := Value; -end; - -{ TdxGridTableViewBuilder } - -function TdxGridTableViewBuilder.Adapter: TdxGridTableViewAdapter; -begin - Result := inherited Adapter as TdxGridTableViewAdapter; -end; - -class function TdxGridTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridTableViewAdapter; -end; - -function TdxGridTableViewBuilder.Formatter: TdxGridTableViewFormatter; -begin - Result := inherited Formatter as TdxGridTableViewFormatter; -end; - -class function TdxGridTableViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxGridTableViewFormatter; -end; - -procedure TdxGridTableViewBuilder.AddDelimitersHardVert(AReportRow: TdxReportCell); -begin - ReportLink.FDelimitersHardVert.Add(TObject(AReportRow.AbsoluteRect.Top)); -end; - -procedure TdxGridTableViewBuilder.DoBuildViewBody; -begin - if Formatter.ShowHeaders then CreateHeader; - CreateRows; - if not IsAborted and Formatter.ShowFooters then - CreateFooter; -end; - -procedure TdxGridTableViewBuilder.DoBuildViewFooter; -begin - inherited; - if not Formatter.HasDetailsSeparator then CreateViewTerminator; -end; - -procedure TdxGridTableViewBuilder.CreateDetails(AMasterRow: TcxGridMasterDataRow); -var - CurrentView: TcxCustomGridView; -begin - if AMasterRow.ActiveDetailGridView <> nil then - if ReportLink.OptionsLevels.Unwrap then - begin - ProcessedView := nil; - try - if ReportLink.OptionsLevels.RiseActiveLevelOntoTop then - begin - CurrentView := AMasterRow.ActiveDetailGridView; - CreateDetailView(CurrentView); - ProcessedView := CurrentView; - end; - ReportLink.ForEachView(AMasterRow, CreateDetailView); - finally - ProcessedView := nil; - end; - end - else - CreateDetailView(AMasterRow.ActiveDetailGridView); -end; - -procedure TdxGridTableViewBuilder.CreateDetailView(AGridView: TcxCustomGridView); -begin - if AGridView <> ProcessedView then ReportLink.BuildView(Self, AGridView); -end; - -function TdxGridTableViewBuilder.GetAreDetailsBuilt: Boolean; -begin - with ReportLink.OptionsDetails do - Result := not StartFromFocusedView or not OnlyFocusedView; -end; - -procedure TdxGridTableViewBuilder.CreateFooter; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetFootersProducer.Produce(HostInfoServices.FootersHostInfo); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetFootersProducer: TdxGridTableViewFootersProducer; -begin - Result := ProducerCache[GetFootersProducerClass] as TdxGridTableViewFootersProducer; -end; - -function TdxGridTableViewBuilder.GetFootersProducerClass: TdxGridTableViewFootersProducerClass; -begin - Result := TdxGridTableViewFootersProducer; -end; - -procedure TdxGridTableViewBuilder.CreateGroupFooters(AGridRow: TcxCustomGridRow); -var - Producer: TdxGridTableViewGroupFooterProducer; - HostInfo: TdxGridAttributeHostInfo; - Index, I: Integer; - ReportRow: TdxReportCell; -begin - Producer := GetGroupFooterProducer; - HostInfo := HostInfoServices.PageDetailsHostInfo; - Index := 0; - for I := 0 to AGridRow.Level do - if Adapter.HasGroupFooter(AGridRow, I) then - begin - ReportRow := Producer.Produce(HostInfo, AGridRow, AGridRow.Level - I, Index); - AddReportRow(ReportRow); - Inc(Index); - end; -end; - -function TdxGridTableViewBuilder.GetGroupFooterProducer: TdxGridTableViewGroupFooterProducer; -begin - Result := ProducerCache[GetGroupFooterProducerClass] as TdxGridTableViewGroupFooterProducer; -end; - -function TdxGridTableViewBuilder.GetGroupFooterProducerClass: TdxGridTableViewGroupFooterProducerClass; -begin - Result := TdxGridTableViewGroupFooterProducer; -end; - -procedure TdxGridTableViewBuilder.CreateHeader; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetHeadersProducer.Produce(HostInfoServices.HeadersHostInfo); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetHeadersProducer: TdxGridTableViewHeadersProducer; -begin - Result := ProducerCache[GetHeadersProducerClass] as TdxGridTableViewHeadersProducer; -end; - -function TdxGridTableViewBuilder.GetHeadersProducerClass: TdxGridTableViewHeadersProducerClass; -begin - Result := TdxGridTableViewHeadersProducer; -end; - -procedure TdxGridTableViewBuilder.CreateRow(AGridRow: TcxCustomGridRow; ARowIndex: Integer); -var - ReportRow: TdxReportCell; -begin - ReportRow := GetRowProducer(AGridRow).Produce(HostInfoServices.PageDetailsHostInfo, AGridRow, ARowIndex); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetRowProducer(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducer; -begin - Result := ProducerCache[GetRowProducerClass(AGridRow)] as TdxGridTableViewCustomDataRowProducer; -end; - -procedure TdxGridTableViewBuilder.CreateRows; -var - PrevGridRow, GridRow: TcxCustomGridRow; - I: Integer; - HasGroupDelimiter: Boolean; -begin - PrevGridRow := nil; - for I := 0 to Formatter.RowCount - 1 do - begin - GridRow := Formatter.Rows[I]; - - if (ShowRowSeparators and (I > 0)) and (not (PrevGridRow is TcxGridGroupRow) or not ShowGroupRowSeparators) then - CreateRowSeparator(GridRow, False); - - HasGroupDelimiter := Formatter.PaginateByTopLevelGroups and (I > 0) and - (GridRow.Level = 0) and (GridRow is TcxGridGroupRow); - - CreateRow(GridRow, I); - - // Hard Delimiters - if HasGroupDelimiter then - AddDelimitersHardVert(LastReportRow); - - if AreDetailsBuilt and Adapter.HasDetails(GridRow) then - CreateDetails(GridRow as TcxGridMasterDataRow); - - if ShowGroupRowSeparators and (GridRow is TcxGridGroupRow) then - CreateGroupRowSeparator(TcxGridGroupRow(GridRow)); - - if Formatter.ShowGroupFooters and Adapter.HasGroupFooters(GridRow) then - CreateGroupFooters(GridRow); - - // Last Row Separator - if (ShowRowSeparators and (I = Formatter.RowCount - 1)) and (not (GridRow is TcxGridGroupRow) or not ShowGroupRowSeparators) then - CreateRowSeparator(GridRow, True); - - // Progress - if MasterBuilder = nil then - begin - Progress(100 * (I + 1) / Formatter.RowCount); - if IsAborted then Break; - end; - - PrevGridRow := GridRow; - end; -end; - -function TdxGridTableViewBuilder.GetRowProducerClass(AGridRow: TcxCustomGridRow): TdxGridTableViewCustomDataRowProducerClass; -begin - Result := Adapter.RecordHelpers[AGridRow].ProducerClass; -end; - -procedure TdxGridTableViewBuilder.CreateRowSeparator(AGridRow: TcxCustomGridRow; - AnIsLast: Boolean = False); -var - ReportRow: TdxReportCell; -begin - ReportRow := GetRowSeparatorProducer.Produce(HostInfoServices.PageDetailsHostInfo, AGridRow, AnIsLast); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetRowSeparatorProducer: TdxGridTableViewRowSeparatorProducer; -begin - Result := ProducerCache[GetRowSeparatorProducerClass] as TdxGridTableViewRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetRowSeparatorProducerClass: TdxGridTableViewRowSeparatorProducerClass; -begin - Result := TdxGridTableViewRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetShowRowSeparators: Boolean; -begin - Result := Adapter.HasRowSeparators; -end; - -procedure TdxGridTableViewBuilder.CreateGroupRowSeparator(AGridRow: TcxGridGroupRow); -var - ReportRow: TdxReportCell; -begin - ReportRow := GetGroupRowSeparatorProducer.Produce(HostInfoServices.PageDetailsHostInfo, AGridRow); - AddReportRow(ReportRow); -end; - -function TdxGridTableViewBuilder.GetGroupRowSeparatorProducer: TdxGridTableViewGroupRowSeparatorProducer; -begin - Result := ProducerCache[GetGroupRowSeparatorProducerClass] as TdxGridTableViewGroupRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetGroupRowSeparatorProducerClass: TdxGridTableViewGroupRowSeparatorProducerClass; -begin - Result := TdxGridTableViewGroupRowSeparatorProducer; -end; - -function TdxGridTableViewBuilder.GetShowGroupRowSeparators: Boolean; -begin - Result := Adapter.IsOffice11StyleGrouping; -end; - -function TdxGridTableViewBuilder.GridView: TcxGridTableView; -begin - Result := inherited GridView as TcxGridTableView; -end; - -class function TdxGridTableViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridTableView; -end; - -function TdxGridTableViewBuilder.GetLastReportRow: TdxReportCell; -begin - Result := ReportRows[ReportRowCount - 1]; -end; - -function TdxGridTableViewBuilder.GetProcessedView: TcxCustomGridView; -begin - Result := ReportLink.FProcessedView; -end; - -procedure TdxGridTableViewBuilder.SetProcessedView(Value: TcxCustomGridView); -begin - ReportLink.FProcessedView := Value; -end; - -{ TdxGridDBTableViewAdapter } - -function TdxGridDBTableViewAdapter.GridView: TcxGridDBTableView; -begin - Result := inherited GridView as TcxGridDBTableView; -end; - -class function TdxGridDBTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridDBTableView; -end; - -procedure TdxGridDBTableViewAdapter.AfterBuilding; -begin - UnloadAllRecords; - inherited; -end; - -procedure TdxGridDBTableViewAdapter.BeforeBuilding; -begin - inherited; - LoadAllRecords; -end; - -function TdxGridDBTableViewAdapter.DataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(inherited DataController); -end; - -function TdxGridDBTableViewAdapter.DBDataModeController: TcxDBDataModeController; -begin - Result := DataController.DataModeController; -end; - -procedure TdxGridDBTableViewAdapter.LoadAllRecords; -begin - _LoadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -procedure TdxGridDBTableViewAdapter.UnloadAllRecords; -begin - _UnloadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -{ TdxGridDBTableViewBuilder } - -function TdxGridDBTableViewBuilder.Adapter: TdxGridDBTableViewAdapter; -begin - Result := inherited Adapter as TdxGridDBTableViewAdapter; -end; - -class function TdxGridDBTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridDBTableViewAdapter; -end; - -{ TdxGridBandedTableViewAdapter } - -constructor TdxGridBandedTableViewAdapter.Create(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView); -begin - inherited; - FFooterLineCount := -1; -end; - -function TdxGridBandedTableViewAdapter.GridView: TcxGridBandedTableView; -begin - Result := inherited GridView as TcxGridBandedTableView; -end; - -class function TdxGridBandedTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridBandedTableView; -end; - -function TdxGridBandedTableViewAdapter.Styles: TcxGridBandedTableViewStyles; -begin - Result := inherited Styles as TcxGridBandedTableViewStyles; -end; - -function TdxGridBandedTableViewAdapter.CalculateDetailsLineCount: Integer; -var - I, J, V: Integer; - BandRows: TcxGridBandRows; -begin - Result := 0; - for I := 0 to BottomBandCount - 1 do - begin - BandRows := BottomBands[I].Rows; - V := 0; - for J := 0 to BandRows.VisibleCount - 1 do - Inc(V, BandRows[J].LineCount); - if Result < V then Result := V; - end; -end; - -function TdxGridBandedTableViewAdapter.CalculateFooterLineCount: Integer; -var - I, V: Integer; -begin - Result := 0; - for I := 0 to BottomBandCount - 1 do - begin - V := BottomBands[I].Rows.Count; - if Result < V then Result := V; - end; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderHeight: Integer; -begin - Result := GridView.OptionsView.BandHeaderHeight; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderHeightAssigned: Boolean; -begin - Result := BandHeaderHeight <> 0; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderViewParams(ABand: TcxGridBand): TcxViewParams; -begin - if (ABand <> nil) and (ABand.Styles <> nil) then - ABand.Styles.GetHeaderParams(Result) - else - Styles.GetBandHeaderParams(ABand, Result); - if ABand = nil then - Result.Color := LookAndFeelPainter.DefaultHeaderBackgroundColor -end; - -function TdxGridBandedTableViewAdapter.GetDataRowHeightAssigned: Boolean; -begin - Result := (DetailsLineCount = 1) and inherited GetDataRowHeightAssigned; -end; - -function TdxGridBandedTableViewAdapter.GetFooterHeightAssigned: Boolean; -begin - Result := (FooterLineCount = 1) and inherited GetFooterHeightAssigned; -end; - -function TdxGridBandedTableViewAdapter.GetHeaderHeightAssigned: Boolean; -begin - Result := (DetailsLineCount = 1) and inherited GetHeaderHeightAssigned; -end; - -function TdxGridBandedTableViewAdapter.GetHeaderMultiline(Column: TcxGridColumn): Boolean; -begin - Result := ((DetailsLineCount = 1) and inherited GetHeaderMultiline(Column)) or - (TcxGridBandedColumn(Column).Position.LineCount > 1); {PS 3.01} -end; - -function TdxGridBandedTableViewAdapter.GetBand(Index: Integer): TcxGridBand; -begin - Result := GridView.Bands.VisibleItems[Index]; -end; - -function TdxGridBandedTableViewAdapter.GetBandCount: Integer; -begin - Result := GridView.Bands.VisibleCount; -end; - -function TdxGridBandedTableViewAdapter.GetBandEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.BandHeaderEndEllipsis; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderLineCount: Integer; -begin - Result := GridView.OptionsView.BandHeaderLineCount; -end; - -function TdxGridBandedTableViewAdapter.GetBandHeaderMultiline: Boolean; -begin - Result := BandHeaderHeightAssigned;// or (BandHeaderLineCount > 1); {!!! v3.03} -end; - -function TdxGridBandedTableViewAdapter.GetBottomBand(Index: Integer): TcxGridBand; -begin - {$IFDEF DXVER500} - Result := GridView.Bands.VisibleBottomItems[Index]; - {$ELSE} - Result := GridView.Bands.VisibleItems[Index]; - {$ENDIF} -end; - -function TdxGridBandedTableViewAdapter.GetBottomBandCount: Integer; -begin - {$IFDEF DXVER500} - Result := GridView.Bands.VisibleBottomItemCount; - {$ELSE} - Result := GridView.Bands.VisibleCount; - {$ENDIF} -end; - -function TdxGridBandedTableViewAdapter.GetColumn(Index: Integer): TcxGridBandedColumn; -begin - Result := GridView.VisibleColumns[Index]; -end; - -function TdxGridBandedTableViewAdapter.GetFooterLineCount: Integer; -begin - if FFooterLineCount = -1 then - FFooterLineCount := CalculateFooterLineCount; - Result := FFooterLineCount; -end; - -function TdxGridBandedTableViewAdapter.GetRootBand(Index: Integer): TcxGridBand; -begin - {$IFDEF DXVER500} - Result := GridView.Bands.VisibleRootItems[Index]; - {$ELSE} - Result := GridView.Bands.VisibleItems[Index]; - {$ENDIF} -end; - -function TdxGridBandedTableViewAdapter.GetRootBandCount: Integer; -begin - {$IFDEF DXVER500} - Result := GridView.Bands.VisibleRootItemCount; - {$ELSE} - Result := GridView.Bands.VisibleCount; - {$ENDIF} -end; - -function TdxGridBandedTableViewAdapter.GetThemedBandHeaderItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderColor; -end; - -function TdxGridBandedTableViewAdapter.GetThemedBandHeaderItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderTextColor; -end; - -{ TdxGridBandedTableViewColumnPlace } - -function TdxGridBandedTableViewColumnPlace.GetLineCount: Integer; -begin - Result := Column.Position.LineCount; -end; - -function TdxGridBandedTableViewColumnPlace.GetRowIndex: Integer; -begin - Result := Column.Position.Row.LineOffset; -end; - -function TdxGridBandedTableViewColumnPlace.GetColumn: TcxGridBandedColumn; -begin - Result := inherited Column as TcxGridBandedColumn; -end; - -function TdxGridBandedTableViewColumnPlace.GetController: TdxCustomGridBandedTableViewItemPlace; -begin - Result := inherited Controller as TdxCustomGridBandedTableViewItemPlace; -end; - -function TdxGridBandedTableViewColumnPlace.GetFormatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -{ TdxCustomGridBandedTableViewItemPlace } - -constructor TdxCustomGridBandedTableViewItemPlace.Create(AController: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); -begin - inherited Create(AController.Formatter); - FController := AController; - FParent := AParent; - FBand := ABand; - - FHeight := -1; - FLeftBound := -1; - FMinWidth := -1; - FTopBound := -1; -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateHeaderLineCount: Integer; -var - I: Integer; -begin - Result := 0; - with Band.Rows do - for I := 0 to VisibleCount - 1 do - Inc(Result, VisibleItems[I].LineCount); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateWidth: Integer; - - function FixedSize: Boolean; - var - I: Integer; - begin - Result := False; - for I := 0 to Band.ColumnCount - 1 do - Result := Result or not Band.Columns[I].Options.HorzSizing; - end; - -begin - if FixedSize then - Result := Max(Band.Width, InternalCalculateWidth) - else - begin - Result := Band.Width; - if Result = 0 then - Result := InternalCalculateWidth - end; - if Result = 0 then - Result := cxGridBandedTableView.cxGridDefaultEmptyBandWidth; - if Result < InternalCalculateMinWidth then - Result := InternalCalculateMinWidth; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetItemClass(AColumn: TcxGridColumn): TdxGridTableViewColumnPlaceClass; -begin - Result := TdxGridBandedTableViewColumnPlace; -end; - -procedure TdxCustomGridBandedTableViewItemPlace.AssignWidth; -begin - Width := Width; -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateHeight: Integer; -begin - Result := Controller.CalculateItemHeight(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateLevelHeight: Integer; -begin - if Adapter.BandHeaderHeightAssigned then - Result := Adapter.BandHeaderHeight - else - Result := CalculateLineHeight * Adapter.BandHeaderLineCount; -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateLineHeight: Integer; -begin - Result := 0; - Formatter.CalculateHeight(ViewParams, Result); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateMinWidth: Integer; -begin - Result := InternalCalculateMinWidth; - {$IFDEF DXVER500} - if Result < Band.MinWidth then Result := Band.MinWidth; - {$ENDIF} -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateLeftBound: Integer; -begin - Result := Controller.CalculateItemLeftBound(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.CalculateTopBound: Integer; -begin - Result := Controller.CalculateItemTopBound(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.GetRowCount: Integer; -begin - Result := 0; -end; - -function TdxCustomGridBandedTableViewItemPlace.InternalCalculateMinWidth: Integer; -begin - Result := 0; -end; - -function TdxCustomGridBandedTableViewItemPlace.InternalCalculateWidth: Integer; -begin - Result := 0; -end; - -procedure TdxCustomGridBandedTableViewItemPlace.InitAutoWidthItem(AnItem: TcxAutoWidthItem); -begin - AnItem.Fixed := IsFixed; - AnItem.MinWidth := MinWidth; - AnItem.Width := Width; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetAdapter: TdxGridBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridBandedTableViewAdapter; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetBounds: TRect; -begin - Result := MakeBounds(LeftBound, TopBound, Width, Height); -end; - -function TdxCustomGridBandedTableViewItemPlace.GetFormatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetHeight: Integer; -begin - if FHeight = -1 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetIndex: Integer; -begin - if Parent <> nil then - Result := Parent.IndexOf(Self) - else - Result := Controller.RootIndexOf(Self); -end; - -function TdxCustomGridBandedTableViewItemPlace.GetIsFixed: Boolean; -begin - Result := not Band.Options.Sizing; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetLeftBound: Integer; -begin - if FLeftBound = -1 then - FLeftBound := CalculateLeftBound; - Result := FLeftBound; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetLevelIndex: Integer; -begin - {$IFDEF DXVER500} - Result := Band.BandLevelIndex; - {$ELSE} - Result := 0; - {$ENDIF} -end; - -function TdxCustomGridBandedTableViewItemPlace.GetMinWidth: Integer; -begin - if FMinWidth = -1 then - FMinWidth := CalculateMinWidth; - Result := FMinWidth; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetTopBound: Integer; -begin - if FTopBound = -1 then - FTopBound := CalculateTopBound; - Result := FTopBound; -end; - -function TdxCustomGridBandedTableViewItemPlace.GetViewParams: TdxReportItemViewParams; -begin - Result := Formatter.GetBandItemViewParams(Band); -end; - -{ TdxGridBandedTableViewItemPlace } - -constructor TdxGridBandedTableViewItemPlace.Create(AnOwner: TdxGridBandedTableViewItemPlaceController; - AParent: TdxGridBandedTableViewItemPlace; ABand: TcxGridBand); -begin - inherited; - FChildItems := TList.Create; -end; - -destructor TdxGridBandedTableViewItemPlace.Destroy; -begin - FreeAndNil(FChildItems); - inherited; -end; - -function TdxGridBandedTableViewItemPlace.IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -begin - Result := FChildItems.IndexOf(AnItem); -end; - -{$IFDEF DXVER500} -procedure TdxGridBandedTableViewItemPlace.Refresh; -begin - inherited; - RefreshChildItems; -end; -{$ENDIF} - -function TdxGridBandedTableViewItemPlace.GetRowCount: Integer; -begin - Result := 1; -end; - -function TdxGridBandedTableViewItemPlace.InternalCalculateMinWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ChildItemCount - 1 do - Inc(Result, ChildItems[I].MinWidth); -end; - -function TdxGridBandedTableViewItemPlace.InternalCalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ChildItemCount - 1 do - Inc(Result, ChildItems[I].Width); -end; - -procedure TdxGridBandedTableViewItemPlace.WidthChanged; -begin - inherited; - CalculateChildItemWidths; -end; - -procedure TdxGridBandedTableViewItemPlace.CalculateChildItemWidths; -var - AutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AutoWidthObject := TcxAutoWidthObject.Create(ChildItemCount); - try - for I := 0 to ChildItemCount - 1 do - ChildItems[I].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := Width; - AutoWidthObject.Calculate; - - for I := 0 to ChildItemCount - 1 do - ChildItems[I].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; -end; - -{$IFDEF DXVER500} -procedure TdxGridBandedTableViewItemPlace.RefreshChildItems; -var - I: Integer; -begin - FChildItems.Count := Band.VisibleChildBandCount; - for I := 0 to FChildItems.Count - 1 do - begin - FChildItems[I] := Controller.ItemsByBand[Band.VisibleChildBands[I]]; - ChildItems[I].FParent := Self; - end; -end; -{$ENDIF} - -function TdxGridBandedTableViewItemPlace.GetChildItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := TdxCustomGridBandedTableViewItemPlace(FChildItems[Index]); -end; - -function TdxGridBandedTableViewItemPlace.GetChildItemCount: Integer; -begin - Result := FChildItems.Count; -end; - -{ TdxGridBandedTableViewBottomItemPlace } - -procedure TdxGridBandedTableViewBottomItemPlace.AddItems; -var - I, J: Integer; - Row: TcxGridBandRow; -begin - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - Row := Band.Rows.VisibleItems[I]; - for J := 0 to Row.VisibleCount - 1 do - CreateItem(Row.VisibleItems[J]); - end; -end; - -function TdxGridBandedTableViewBottomItemPlace.CalculateItemLeftBound(AnItem: TdxGridTableViewColumnPlace): Integer; -var - Row: TcxGridBandRow; - I: Integer; - Item: TdxGridTableViewColumnPlace; -begin - Result := LeftBound; - Row := TdxGridBandedTableViewColumnPlace(AnItem).Column.Position.Row; - for I := 0 to TdxGridBandedTableViewColumnPlace(AnItem).Column.Position.VisibleColIndex - 1 do - begin - Item := ItemsByColumn[Row.VisibleItems[I]]; - Inc(Result, Item.Width); - end; -end; - -procedure TdxGridBandedTableViewBottomItemPlace.CalculateItemsWidth; -var - I, J: Integer; - Row: TcxGridBandRow; - AutoWidthObject: TcxAutoWidthObject; - Column: TcxGridColumn; -begin - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - Row := Band.Rows.VisibleItems[I]; - AutoWidthObject := TcxAutoWidthObject.Create(Row.VisibleCount); - try - for J := 0 to Row.VisibleCount - 1 do - ItemsByColumn[Row.VisibleItems[J]].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := ItemsAvailableWidth; - AutoWidthObject.Calculate; - - for J := 0 to Row.VisibleCount - 1 do - begin - Column := Row.VisibleItems[J]; - ItemsByColumn[Column].Width := AutoWidthObject[J].AutoWidth; - end; - finally - AutoWidthObject.Free; - end; - end; -end; - -function TdxGridBandedTableViewBottomItemPlace.GetItemsAutoWidth: Boolean; -begin - Result := True; -end; - -function TdxGridBandedTableViewBottomItemPlace.GetItemsAvailableWidth: Integer; -begin - Result := Width; -end; - -function TdxGridBandedTableViewBottomItemPlace.GetRowCount: Integer; -begin - Result := Controller.LevelCount - LevelIndex; -end; - -function TdxGridBandedTableViewBottomItemPlace.InternalCalculateMinWidth: Integer; -var - I, V, J: Integer; - Row: TcxGridBandRow; - Column: TcxGridColumn; -begin - Result := 0; - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - V := 0; - Row := Band.Rows.VisibleItems[I]; - for J := 0 to Row.VisibleCount - 1 do - begin - Column := Row.VisibleItems[J]; - Inc(V, Adapter.InternalColumnMinWidths[Column]); - end; - //if Row.IsFirst then - // Inc(V, Formatter.IndentWidth * Formatter.IndentCount); - if Result < V then Result := V; - end -end; - -function TdxGridBandedTableViewBottomItemPlace.InternalCalculateWidth: Integer; -var - I, V, J: Integer; - Row: TcxGridBandRow; - Column: TcxGridColumn; -begin - Result := 0; - for I := 0 to Band.Rows.VisibleCount - 1 do - begin - V := 0; - Row := Band.Rows.VisibleItems[I]; - for J := 0 to Row.VisibleCount - 1 do - begin - Column := Row.VisibleItems[J]; - Inc(V, Adapter.InternalColumnWidths[Column]); - end; - if Result < V then Result := V; - end; -end; - -procedure TdxGridBandedTableViewBottomItemPlace.WidthChanged; -begin - inherited; - CalculateItemsWidth; -end; - -{ TdxGridBandedTableViewItemPlaceController } - -constructor TdxGridBandedTableViewItemPlaceController.Create(AFormatter: TdxGridTableViewFormatter); -begin - inherited; - FBottomItems := TList.Create; - FItems := TList.Create; - FRootItems := TList.Create; - FLevelHeights := TList.Create; - - FHeight := -1; - FLevelCount := -1; -end; - -destructor TdxGridBandedTableViewItemPlaceController.Destroy; -begin - FreeAndNil(FLevelHeights); - FreeAndNil(FRootItems); - FreeAndNilItems; - FreeAndNil(FBottomItems); - inherited; -end; - -procedure TdxGridBandedTableViewItemPlaceController.Calculate; -begin - CalculateLevelHeights; - CalculateItemWidths; -end; - -procedure TdxGridBandedTableViewItemPlaceController.Refresh; -begin - ClearItems; - AddItems; - RefreshRootItems; - RefreshBottomItems; - RefreshItems; -end; - -function TdxGridBandedTableViewItemPlaceController.IndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -begin - Result := FItems.IndexOf(AnItem); -end; - -function TdxGridBandedTableViewItemPlaceController.IndexOf(ABand: TcxGridBand): Integer; -begin - for Result := 0 to ItemCount - 1 do - if Items[Result].Band = ABand then - Exit; - Result := -1; -end; - -function TdxGridBandedTableViewItemPlaceController.RootIndexOf(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -begin - Result := FRootItems.IndexOf(AnItem); -end; - -function TdxGridBandedTableViewItemPlaceController.RootIndexOf(ABand: TcxGridBand): Integer; -begin - for Result := 0 to RootItemCount - 1 do - if RootItems[Result].Band = ABand then - Exit; - Result := -1; -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateHeaderLineCount: Integer; -var - I, V: Integer; -begin - Result := -1; - for I := 0 to BottomItemCount - 1 do - begin - V := BottomItems[I].HeaderLineCount; - if Result < V then Result := V; - end; -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RootItemCount - 1 do - Inc(Result, RootItems[I].Width); -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemByColumn(Column: TcxGridColumn): TdxGridTableViewColumnPlace; -var - BandPlace: TdxCustomGridBandedTableViewItemPlace; -begin - BandPlace := ItemsByBand[TcxGridBandedColumn(Column).Position.Band]; - if BandPlace <> nil then - Result := BandPlace.ItemsByColumn[Column] - else - Result := nil; -end; - -procedure TdxGridBandedTableViewItemPlaceController.AddItems; -var - I: Integer; -begin - FItems.Count := Formatter.BandCount; - for I := 0 to ItemCount - 1 do - FItems[I] := CreateItem(Formatter.Bands[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateHeight: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to LevelCount - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateItemHeight(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := AnItem.LevelIndex to AnItem.LevelIndex + AnItem.RowCount - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateItemLeftBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -var - I: Integer; -begin - if AnItem.Parent <> nil then - begin - Result := AnItem.Parent.LeftBound; - for I := 0 to AnItem.Index - 1 do - Inc(Result, AnItem.Parent.ChildItems[I].Width); - end - else - begin - Result := 0; - for I := 0 to AnItem.Index - 1 do - Inc(Result, RootItems[I].Width); - end; -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateItemTopBound(AnItem: TdxCustomGridBandedTableViewItemPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AnItem.LevelIndex - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TdxGridBandedTableViewItemPlaceController.CalculateLevelCount: Integer; -var - I, V: Integer; -begin - Result := 0; - if ItemCount <> 0 then - begin - for I := 0 to ItemCount - 1 do - begin - V := Items[I].LevelIndex; - if Result < V then Result := V; - end; - Inc(Result); - end; -end; - -procedure TdxGridBandedTableViewItemPlaceController.CalculateItemWidths; -var - I: Integer; - AutoWidthObject: TcxAutoWidthObject; -begin - for I := 0 to RootItemCount - 1 do - RootItems[I].AssignWidth; - - if AutoWidth then - begin - AutoWidthObject := TcxAutoWidthObject.Create(RootItemCount); - try - for I := 0 to RootItemCount - 1 do - RootItems[I].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := AvailableWidth; - AutoWidthObject.Calculate; - - for I := 0 to RootItemCount - 1 do - RootItems[I].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; - end; -end; - -procedure TdxGridBandedTableViewItemPlaceController.CalculateLevelHeights; -var - I, V: Integer; - Item: TdxCustomGridBandedTableViewItemPlace; -begin - FLevelHeights.Count := LevelCount; - for I := 0 to ItemCount - 1 do - begin - Item := Items[I]; - V := Item.CalculateLevelHeight; - if LevelHeights[Item.LevelIndex] < V then - LevelHeights[Item.LevelIndex] := V; - end; -end; - -procedure TdxGridBandedTableViewItemPlaceController.ClearItems; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].Free; - FItems.Clear; -end; - -function TdxGridBandedTableViewItemPlaceController.CreateItem(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; -begin - Result := GetItemClass(ABand).Create(Self, nil, ABand); -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemClass(ABand: TcxGridBand): TdxCustomGridBandedTableViewItemPlaceClass; -begin - {$IFDEF DXVER500} - if ABand.IsBottom then - Result := TdxGridBandedTableViewBottomItemPlace - else - Result := TdxGridBandedTableViewItemPlace; - {$ELSE} - Result := TdxGridBandedTableViewBottomItemPlace; - {$ENDIF} -end; - -procedure TdxGridBandedTableViewItemPlaceController.RefreshBottomItems; -var - I: Integer; -begin - FBottomItems.Count := Adapter.BottomBandCount; - for I := 0 to BottomItemCount - 1 do - FBottomItems[I] := ItemsByBand[Adapter.BottomBands[I]]; -end; - -procedure TdxGridBandedTableViewItemPlaceController.RefreshItems; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].Refresh; -end; - -procedure TdxGridBandedTableViewItemPlaceController.RefreshRootItems; -var - I: Integer; -begin - FRootItems.Count := Adapter.RootBandCount; - for I := 0 to RootItemCount - 1 do - FRootItems[I] := ItemsByBand[Adapter.RootBands[I]]; -end; - -function TdxGridBandedTableViewItemPlaceController.GetAdapter: TdxGridBandedTableViewAdapter; -begin - Result := Formatter.Adapter; -end; - -function TdxGridBandedTableViewItemPlaceController.GetAutoWidth: Boolean; -begin - Result := Formatter.AutoWidth; -end; - -function TdxGridBandedTableViewItemPlaceController.GetAvailableWidth: Integer; -begin - Result := Formatter.ViewAvailableWidth; -end; - -function TdxGridBandedTableViewItemPlaceController.GetBottomItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := TdxCustomGridBandedTableViewItemPlace(FBottomItems[Index]); -end; - -function TdxGridBandedTableViewItemPlaceController.GetBottomItemCount: Integer; -begin - Result := FBottomItems.Count; -end; - -function TdxGridBandedTableViewItemPlaceController.GetFormatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -function TdxGridBandedTableViewItemPlaceController.GetHeight: Integer; -begin - if FHeight = -1 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TdxGridBandedTableViewItemPlaceController.GetItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := TdxCustomGridBandedTableViewItemPlace(FItems[Index]); -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemByBand(Band: TcxGridBand): TdxCustomGridBandedTableViewItemPlace; -var - Index: Integer; -begin - Index := IndexOf(Band); - if Index <> -1 then - Result := Items[IndexOf(Band)] - else - Result := nil; -end; - -function TdxGridBandedTableViewItemPlaceController.GetItemCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxGridBandedTableViewItemPlaceController.GetLevelCount: Integer; -begin - if FLevelCount = -1 then - FLevelCount := CalculateLevelCount; - Result := FLevelCount; -end; - -function TdxGridBandedTableViewItemPlaceController.GetLevelHeight(Index: Integer): Integer; -begin - Result := Integer(FLevelHeights[Index]); -end; - -function TdxGridBandedTableViewItemPlaceController.GetRootItem(Index: Integer): TdxCustomGridBandedTableViewItemPlace; -begin - Result := TdxCustomGridBandedTableViewItemPlace(FRootItems[Index]); -end; - -function TdxGridBandedTableViewItemPlaceController.GetRootItemCount: Integer; -begin - Result := FRootItems.Count; -end; - -procedure TdxGridBandedTableViewItemPlaceController.SetLevelHeight(Index: Integer; Value: Integer); -begin - FLevelHeights[Index] := TObject(Value); -end; - -procedure TdxGridBandedTableViewItemPlaceController.FreeAndNilItems; -begin - ClearItems; - FreeAndNil(FItems); -end; - -{ TdxGridBandedTableViewFormatter } - -constructor TdxGridBandedTableViewFormatter.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FBands := TList.Create; -end; - -destructor TdxGridBandedTableViewFormatter.Destroy; -begin - FreeAndNil(FBands); - inherited; -end; - -function TdxGridBandedTableViewFormatter.Adapter: TdxGridBandedTableViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridBandedTableViewFormatter.Builder: TdxGridBandedTableViewBuilder; -begin - Result := inherited Builder as TdxGridBandedTableViewBuilder; -end; - -procedure TdxGridBandedTableViewFormatter.DoInitializeBandItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Band: TcxGridBand; -begin - Band := Bands[AnIndex]; - SetViewParams(AnItem, GetBandItemViewParams(Band)); - if HasBackgroundBitmap(bbBandHeader) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbBandHeader); - - RegisterLookAndFeelItem(AnItem, cesRaised); - - with AnItem as TdxReportCellString do - begin - Data := Integer(Band); - EndEllipsis := Adapter.BandEndEllipsis; - Multiline := Adapter.BandHeaderMultiline; - Text := Band.Caption; - TextAlignX := TextAlignXMap[Band.HeaderAlignmentHorz]; - TextAlignY := TextAlignYMap[Band.HeaderAlignmentVert]; - //Transparent := False; {!!! v3.03} - end; -end; - -procedure TdxGridBandedTableViewFormatter.DoInitializeBandRow(ARow: TdxReportCell); -begin - SetViewParams(ARow, GetBandItemViewParams(nil)); - ARow.Transparent := True; //??? -end; - -procedure TdxGridBandedTableViewFormatter.DoReportLinkInitializeBandItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - ReportLink.DoInitializeBandCell(Adapter.GridView, Bands[AnIndex], TdxReportCellString(AnItem)); -end; - -function TdxGridBandedTableViewFormatter.GetBandItemBounds(AnIndex: Integer): TRect; -var - Item: TdxCustomGridBandedTableViewItemPlace; -begin - Item := ItemPlaceController.ItemsByBand[Bands[AnIndex]]; - if Item <> nil then - Result := Item.Bounds - else - Result := dxPSGlbl.NullRect; -end; - -function TdxGridBandedTableViewFormatter.GetBandItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridBandedTableViewFormatter.GetBandItemViewParams(ABand: TcxGridBand): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetBandHeaderParams(ABand, Result.NativeParams) - else - Result.NativeParams := Adapter.GetBandHeaderViewParams(ABand); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if ABand <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedBandHeaderItemColor; - Result.NativeParams.TextColor := Adapter.ThemedBandHeaderItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := False; -end; - -procedure TdxGridBandedTableViewFormatter.AddHorizontalDelimiters; -var - Origin, I: Integer; - R: TRect; - Item: TdxCustomGridBandedTableViewItemPlace; -begin - if ReportLink.OptionsPagination.Band then - begin - Origin := ViewWidthExtraBefore; - for I := 0 to BandCount - 1 do - begin - Item := ItemPlaceController.ItemsByBand[Bands[I]]; - if Item <> nil then - begin - R := Item.Bounds; - ReportLink.AddHorizontalDelimiter(Origin + R.Left); - ReportLink.AddHorizontalDelimiter(Origin + R.Right); - end; - end; - end; - inherited; -end; - -{$IFDEF DXVER500} -function TdxGridBandedTableViewFormatter.CanColumnCellMerging(AColumn: TcxGridColumn): Boolean; -begin - Result := inherited CanColumnCellMerging(AColumn) and - (TcxGridBandedColumn(AColumn).Position.LineCount = ItemPlaceController.HeaderLineCount); -end; - -function TdxGridBandedTableViewFormatter.IsColumnActuallyVisible(AColumn: TcxGridColumn): Boolean; -begin - Result := inherited IsColumnActuallyVisible(AColumn) and - TcxGridBandedColumn(AColumn).Position.Band.ActuallyVisible; -end; -{$ENDIF} - -function TdxGridBandedTableViewFormatter.GetItemPlaceControllerClass: TdxCustomGridTableViewItemPlaceControllerClass; -begin - Result := TdxGridBandedTableViewItemPlaceController; -end; - -procedure TdxGridBandedTableViewFormatter.BuildBandList; -var - I: Integer; - Band: TcxGridBand; -begin - FBands.Clear; - for I := 0 to Adapter.BandCount - 1 do - begin - Band := Adapter.Bands[I]; - if IsBandActuallyVisible(Band) then FBands.Add(Band); - end; -end; - -procedure TdxGridBandedTableViewFormatter.BuildItemLists; -begin - BuildBandList; - inherited; -end; - -function TdxGridBandedTableViewFormatter.IsBandActuallyVisible(ABand: TcxGridBand): Boolean; -begin - {$IFDEF DXVER500} - Result := ABand.ActuallyVisible; - {$ELSE} - Result := True; - {$ENDIF} -end; - -function TdxGridBandedTableViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbBandHeader: - Result := vspsGridBandHeader; - else - Result := 0; - end; - - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -function TdxGridBandedTableViewFormatter.GetBand(Index: Integer): TcxGridBand; -begin - Result := TcxGridBand(FBands[Index]); -end; - -function TdxGridBandedTableViewFormatter.GetBandCount: Integer; -begin - Result := FBands.Count; -end; - -function TdxGridBandedTableViewFormatter.GetColumn(Index: Integer): TcxGridBandedColumn; -begin - Result := inherited Columns[Index] as TcxGridBandedColumn; -end; - -function TdxGridBandedTableViewFormatter.GetItemPlaceController: TdxGridBandedTableViewItemPlaceController; -begin - Result := inherited ItemPlaceController as TdxGridBandedTableViewItemPlaceController; -end; - -function TdxGridBandedTableViewFormatter.GetShowBandHeaders: Boolean; -begin - Result := ReportLink.OptionsView.BandHeaders; -end; - -{ TdxGridBandedTableViewBuilder } - -function TdxGridBandedTableViewBuilder.Adapter: TdxGridBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridBandedTableViewAdapter; -end; - -class function TdxGridBandedTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridBandedTableViewAdapter; -end; - -function TdxGridBandedTableViewBuilder.Formatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -class function TdxGridBandedTableViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxGridBandedTableViewFormatter; -end; - -procedure TdxGridBandedTableViewBuilder.DoBuildViewBody; -begin - if Formatter.ShowBandHeaders then CreateBands; - if Formatter.ShowHeaders then CreateHeader; - CreateRows; - if Formatter.ShowFooters then CreateFooter; -end; - -procedure TdxGridBandedTableViewBuilder.CreateBands; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetBandsProducer.Produce(HostInfoServices.BandHeadersHostInfo); - AddReportRow(ReportRow); -end; - -function TdxGridBandedTableViewBuilder.GetBandsProducer: TdxGridTableViewBandsProducer; -begin - Result := ProducerCache[GetBandsProducerClass] as TdxGridTableViewBandsProducer; -end; - -function TdxGridBandedTableViewBuilder.GetBandsProducerClass: TdxGridTableViewBandsProducerClass; -begin - Result := TdxGridTableViewBandsProducer; -end; - -function TdxGridBandedTableViewBuilder.GridView: TcxGridBandedTableView; -begin - Result := inherited GridView as TcxGridBandedTableView; -end; - -class function TdxGridBandedTableViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridBandedTableView; -end; - -{ TdxGridDBBandedTableViewAdapter } - -function TdxGridDBBandedTableViewAdapter.GridView: TcxGridDBBandedTableView; -begin - Result := inherited GridView as TcxGridDBBandedTableView; -end; - -class function TdxGridDBBandedTableViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridDBBandedTableView; -end; - -procedure TdxGridDBBandedTableViewAdapter.AfterBuilding; -begin - UnloadAllRecords; - inherited; -end; - -procedure TdxGridDBBandedTableViewAdapter.BeforeBuilding; -begin - inherited; - LoadAllRecords; -end; - -function TdxGridDBBandedTableViewAdapter.DataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(inherited DataController); -end; - -function TdxGridDBBandedTableViewAdapter.DBDataModeController: TcxDBDataModeController; -begin - Result := DataController.DataModeController; -end; - -procedure TdxGridDBBandedTableViewAdapter.LoadAllRecords; -begin - _LoadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -procedure TdxGridDBBandedTableViewAdapter.UnloadAllRecords; -begin - _UnloadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -{ TdxGridDBBandedTableViewBuilder } - -function TdxGridDBBandedTableViewBuilder.Adapter: TdxGridDBBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridDBBandedTableViewAdapter; -end; - -class function TdxGridDBBandedTableViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridDBBandedTableViewAdapter; -end; - -{ TdxGridCardViewAdapter } - -function TdxGridCardViewAdapter.GridView: TcxGridCardView; -begin - Result := inherited GridView as TcxGridCardView; -end; - -class function TdxGridCardViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -function TdxGridCardViewAdapter.Styles: TcxGridCardViewStyles; -begin - Result := inherited Styles as TcxGridCardViewStyles; -end; - -procedure TdxGridCardViewAdapter.GetVisibleCardRows(ACard: TcxGridCard; AList: TList); -{$IFNDEF DXVER500} -var - I: Integer; -{$ENDIF} -begin - {$IFDEF DXVER500} - ACard.GetVisibleRows(AList); - {$ELSE} - for I := 0 to CardRowCount - 1 do - AList.Add(CardRows[I]); - {$ENDIF} -end; - -procedure TdxGridCardViewAdapter.ExpandAllRows(AnOptionsExpanding: TdxGridReportLinkOptionsExpanding; - ARecursive: Boolean); -begin - {$IFDEF DXVER500} - if AnOptionsExpanding.ExpandCards then GridView.ViewData.Expand(True); - {$ENDIF} -end; - -function TdxGridCardViewAdapter.IsFirstRow(ACardRow: TcxGridCardViewRow): Boolean; -begin - Result := ACardRow.VisibleIndex = 0; -end; - -function TdxGridCardViewAdapter.IsLastRow(ACardRow: TcxGridCardViewRow): Boolean; -begin - Result := ACardRow.VisibleIndex = CardRowCount - 1; -end; - -function TdxGridCardViewAdapter.GetAreAllMasterRowsCollapsed: Boolean; -begin - Result := True; -end; - -function TdxGridCardViewAdapter.GetCaptionRowViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; -begin - if (ACardRow <> nil) and (ACardRow.Styles.CaptionRow <> nil) then - ACardRow.Styles.GetCaptionRowParams(ARecord, Result) - else - Styles.GetCaptionRowParams(ARecord, ACardRow, Result); -end; - -function TdxGridCardViewAdapter.GetCardViewParams(ARecord: TcxCustomGridRecord): TcxViewParams; -begin - Styles.GetContentParams(ARecord, nil, Result); -end; - -function TdxGridCardViewAdapter.GetContentViewParams(ARecord: TcxCustomGridRecord; - ATableItem: TcxCustomGridTableItem): TcxViewParams; -begin - if TcxGridCardViewRow(ATableItem).Kind = rkData then - Result := inherited GetContentViewParams(ARecord, ATableItem) - else - Result := GetCaptionRowViewParams(ARecord, TcxGridCardViewRow(ATableItem)); -end; - -function TdxGridCardViewAdapter.GetRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TcxViewParams; -begin - if (ACardRow <> nil) and (ACardRow.Kind = rkData) then - if ACardRow.Styles.Caption <> nil then - ACardRow.Styles.GetCaptionParams(ARecord, Result) - else - Styles.GetRowCaptionParams(ARecord, ACardRow, Result) - else - Result := GetCaptionRowViewParams(ARecord, ACardRow); -end; - -function TdxGridCardViewAdapter.GetCaptionSeparator: string; -begin - Result := GridView.OptionsView.CaptionSeparator; -end; - -function TdxGridCardViewAdapter.GetCard(Index: Integer): TcxGridCard; -begin - Result := Records[Index] as TcxGridCard; -end; - -function TdxGridCardViewAdapter.GetCardCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridCardViewAdapter.GetCardCaptionWidth: Integer; -begin - Result := GridView.OptionsView.CaptionWidth; -end; - -function TdxGridCardViewAdapter.GetCardRow(Index: Integer): TcxGridCardViewRow; -begin - Result := GridView.VisibleRows[Index]; -end; - -function TdxGridCardViewAdapter.GetCardRowCount: Integer; -begin - Result := GridView.VisibleRowCount; -end; - -function TdxGridCardViewAdapter.GetCardSeparatorColor: Integer; -begin - Result := GridView.OptionsView.SeparatorColor; -end; - -function TdxGridCardViewAdapter.GetCardSeparatorThickness: Integer; -begin - Result := GridView.OptionsView.SeparatorWidth; -end; - -function TdxGridCardViewAdapter.GetCardWidth: Integer; -begin - Result := GridView.OptionsView.CardWidth; -end; - -function TdxGridCardViewAdapter.GetHasCardsSeparator: Boolean; -begin - Result := CardSeparatorThickness <> 0; -end; - -function TdxGridCardViewAdapter.GetRowAutoHeight: Boolean; -begin - with GridView.OptionsView do - Result := CellAutoHeight or RowCaptionAutoHeight; -end; - -function TdxGridCardViewAdapter.GetRowCaptionAutoHeight: Boolean; -begin - Result := GridView.OptionsView.RowCaptionAutoHeight; -end; - -function TdxGridCardViewAdapter.GetRowCaptionEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.RowCaptionEndEllipsis; -end; - -function TdxGridCardViewAdapter.GetShowRowCaption(Index: Integer): Boolean; -begin - Result := CardRows[Index].Options.ShowCaption; -end; - -{ TdxGridCardViewFormatter } - -function TdxGridCardViewFormatter.Adapter: TdxGridCardViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridCardViewFormatter.Builder: TdxGridCardViewBuilder; -begin - Result := inherited Builder as TdxGridCardViewBuilder; -end; - -procedure TdxGridCardViewFormatter.DoInitializeCard(ACard: TdxReportCard; - AGridCard: TcxGridCard); -begin - with ReportLink.OptionsCards.Shadow do - begin - ACard.ShadowColor := ActualColor; - ACard.ShadowDepth := Depth; - ACard.ShadowPosition := Position; - end; - - SetViewParams(ACard, GetCardViewParams(AGridCard)); - - ACard.Data := Integer(AGridCard); - ACard.Width := Adapter.CardWidth; - ACard.CreateRows(Builder); -end; - -procedure TdxGridCardViewFormatter.DoInitializeCardsRow(ACard: TdxReportCell); -begin - if HasBackgroundBitmap(bbBackground) then - ACard.BackgroundBitmapIndex := GetBackgroundBitmapIndex(bbBackground); - ACard.CellSides := []; -end; - -function TdxGridCardViewFormatter.GetCardClass(AGridCard: TcxGridCard): TdxReportCardClass; -begin - Result := TdxReportCard; -end; - -function TdxGridCardViewFormatter.GetCardViewParams(ARecord: TcxCustomGridRecord): TdxReportItemViewParams; -begin - Result.NativeParams := Adapter.GetCardViewParams(ARecord); - Result.CellSides := csAll;//[]; // because of Card Shadow - Result.FontStyle := []; - Result.Transparent := True; -end; - -procedure TdxGridCardViewFormatter.DoInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); -const - BackgroundBitmapIndexes: array[TcxGridCardViewRowKind] of Integer = - (bbRowCaption, bbCaptionRow{$IFDEF GRID6}, bbCaptionRow{$ENDIF}); -begin - SetViewParams(AnItem, GetCardRowCaptionViewParams(AGridCard, ACardRow)); - if HasBackgroundBitmap(BackgroundBitmapIndexes[ACardRow.Kind]) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(BackgroundBitmapIndexes[ACardRow.Kind]); - - with AnItem as TdxReportCellString do - begin - EndEllipsis := Adapter.RowCaptionEndEllipsis; - Multiline := {True; //}not EndEllipsis and not CaptionAutoWidth and Adapter.RowCaptionAutoHeight; - TextAlignX := TextAlignXMap[ACardRow.CaptionAlignmentHorz]; - if Multiline then - TextAlignY := TextAlignYMap[ACardRow.CaptionAlignmentVert] - else - TextAlignY := taTop; - end; - AnItem.Text := ACardRow.Caption + Adapter.CaptionSeparator; -end; - -procedure TdxGridCardViewFormatter.DoReportLinkInitializeCardRowCaption(AnItem: TdxReportCellText; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); -begin - ReportLink.DoInitializeCardRowCaptionCell(Adapter.GridView, AGridCard, ACardRow, TdxReportCellString(AnItem)); -end; - -function TdxGridCardViewFormatter.GetCardRowCaptionClass(ACardRow: TcxGridCardViewRow): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TdxGridCardViewFormatter.GetCardRowCaptionViewParams(ARecord: TcxCustomGridRecord; - ACardRow: TcxGridCardViewRow): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - if ACardRow.Kind = rkData then - ReportLink.Styles.GetCardRowCaptionParams(ARecord, ACardRow, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetCardCaptionRowParams(ARecord, ACardRow, Result.NativeParams) - else - if (ACardRow.Kind = rkCaption) and CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetRowCaptionViewParams(ARecord, ACardRow); - - // v.3.1 - because of fact that each Card in Grid v.5 might has different number of Rows, - // CellSides initialization was moved inside ReportCard - Result.CellSides := []; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent -end; - -procedure TdxGridCardViewFormatter.DoReportLinkInitializeCardRowData(AnItem: TAbstractdxReportCellData; - ACardRow: TcxGridCardViewRow; AGridCard: TcxGridCard); -begin - ReportLink.DoInitializeCardRowDataCell(Adapter.GridView, AGridCard, ACardRow, TdxReportCellString(AnItem)); -end; - -function TdxGridCardViewFormatter.GetItemViewParams(ATableItem: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; AnIsPreview: Boolean = False): TdxReportItemViewParams; -var - CardRow: TcxGridCardViewRow; -begin - CardRow := TcxGridCardViewRow(ATableItem); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CardRow.Kind = rkData then - ReportLink.Styles.GetContentParams(ARecord, CardRow, Result.NativeParams) - else - if CanProcessSelectionStyle(ARecord) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetCardCaptionRowParams(ARecord, CardRow, Result.NativeParams) - else - if CardRow.Kind = rkData then - Result := inherited GetItemViewParams(ATableItem, ARecord, AnIsPreview) - else - if CanProcessSelectionStyle(ARecord) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetCaptionRowViewParams(ARecord, CardRow); - - // v.3.1 - because fact that each Card in Grid v.5 might has different number of Rows, - // CellSides initialization was moved inside ReportCard - Result.CellSides := []; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent -end; - -procedure TdxGridCardViewFormatter.AddHorizontalDelimiters; -var - I: Integer; -begin - for I := 0 to Builder.CardCount - 1 do - ReportLink.AddHorizontalDelimiter(Builder.Cards[I].AbsoluteRect.Right); -end; - -procedure TdxGridCardViewFormatter.AddVerticalDelimiters; -var - I: Integer; -begin - if NeedDelimitByRows then - begin - for I := 0 to Builder.CardCount - 1 do - Builder.Cards[I].AddVerticalDelimiters; - end - else - inherited; -end; - -function TdxGridCardViewFormatter.GetViewWidth: Integer; -var - MasterBuilder: TdxCustomGridViewBuilder; -begin - MasterBuilder := Builder.MasterBuilder; - if MasterBuilder <> nil then - begin - Result := MasterBuilder.Formatter.ViewWidth - MasterBuilder.Adapter.ViewWidthExtra; - if HasDetailsSeparator then - Dec(Result, 2 * DetailsSeparatorThickness); - end - else - begin - Result := SiteWidth; - if HasDetailsSeparator then - Dec(Result, 2 * DetailsSeparatorThickness); - if Result < Builder.MaxCardWidth + FirstCardOffset then - Result := Builder.MaxCardWidth + FirstCardOffset; - end; -end; - -function TdxGridCardViewFormatter.MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex: Integer): Integer; -begin - case AGridBackgroundBitmapIndex of - bbCaptionRow: - Result := vspsGridCardCaptionRow; - bbRowCaption: - Result := vspsGridCardRowCaption; - else - Result := 0; - end; - - if Result = 0 then - Result := inherited MapStyleBackgroundBitmapIndex(AGridBackgroundBitmapIndex); -end; - -function TdxGridCardViewFormatter.GetContentBackgroundBitmapStyleIndex(ATableItem: TcxCustomGridTableItem): Integer; -const - BackgroundBitmapIndexes: array[TcxGridCardViewRowKind] of Integer = - (bbContent, bbCaptionRow{$IFDEF GRID6}, bbCaptionRow{$ENDIF}); -begin - Result := BackgroundBitmapIndexes[TcxGridCardViewRow(ATableItem).Kind]; -end; - -function TdxGridCardViewFormatter.NeedDelimitByRows: Boolean; -{var - I: Integer;} -begin - Result := False; - {if MasterBuilder = nil then - for I := 0 to Builder.CardCount - 1 do - if Builder.Cards[I].Height > SiteHeight then - begin - Result := True; - Exit; - end;} -end; - -function TdxGridCardViewFormatter.GetAutoWidth: Boolean; -begin - Result := ReportLink.OptionsCards.AutoWidth; -end; - -function TdxGridCardViewFormatter.GetCaptionAutoWidth: Boolean; -begin - Result := Adapter.CardCaptionWidth = 0; -end; - -function TdxGridCardViewFormatter.GetCard(Index: Integer): TcxGridCard; -begin - Result := TcxGridCard(Records[Index]); -end; - -function TdxGridCardViewFormatter.GetCardCount: Integer; -begin - Result := RecordCount; -end; - -function TdxGridCardViewFormatter.GetCardsAreaWidth: Integer; -begin - Result := ViewWidth - FirstCardOffset; -end; - -function TdxGridCardViewFormatter.GetInterCardsSpaceHorz: Integer; -begin - Result := ReportLink.OptionsCards.InterCardsSpaceHorz; -end; - -function TdxGridCardViewFormatter.GetInterCardsSpaceVert: Integer; -begin - Result := ReportLink.OptionsCards.InterCardsSpaceVert; -end; - -function TdxGridCardViewFormatter.GetKeepSameHeight: Boolean; -begin - Result := ReportLink.OptionsCards.KeepSameHeight; -end; - -function TdxGridCardViewFormatter.GetKeepSameWidth: Boolean; -begin - Result := ReportLink.OptionsCards.KeepSameWidth; -end; - -function TdxGridCardViewFormatter.GetRowAutoHeight: Boolean; -begin - Result := Adapter.RowAutoHeight; -end; - -{ TdxReportCardRow } - -constructor TdxReportCardRow.CreateEx(AParent: TdxReportCell; AGridCardRow: TcxGridCardViewRow); -begin - inherited Create(AParent); - CellSides := []; - Data := Integer(AGridCardRow); - Width := Card.RowsAvailableWidth; -end; - -function TdxReportCardRow.MeasureHeight(DC: HDC; ACalculateLineHeight: Boolean; - ABuilder: TdxGridCardViewBuilder): Integer; - - function MeasureCaptionHeight: Integer; - begin - Result := DefaultDataRowLineHeight; - if HasCaption then - if ACalculateLineHeight then - Result := RowCaption.MeasureFontHeight(DC) - else - Result := RowCaption.MeasureContentHeight(DC); - - if Result < DefaultDataRowLineHeight then - Result := DefaultDataRowLineHeight; - end; - - function MeasureDataHeight: Integer; - var - MinHeight: Integer; - begin - MinHeight := RowData.MeasureFontHeight(DC); - if not ACalculateLineHeight then - begin - Result := RowData.MeasureContentHeight(DC); - if Result = 0 then - Result := MinHeight; - end - else - Result := MinHeight; - - ABuilder.DoGetCellHeight(Card.GridCard, GridCardRow, Result); - if Result < MinHeight then - Result := MinHeight; - end; - -begin - Result := Max(MeasureCaptionHeight, MeasureDataHeight); -end; - -function TdxReportCardRow.MeasureCaptionWidth(DC: HDC): Integer; -begin - if HasCaption then - Result := RowCaption.MeasureContentWidth(DC) + 2 - else - Result := 0; -end; - -function TdxReportCardRow.MeasureDataWidth(DC: HDC): Integer; -begin - if dxPSDataMaps.DoesItemParticipateInAutoWidthCalculation(Properties) then - Result := RowData.MeasureContentWidth(DC) + 2 - else - Result := 0; -end; - -procedure TdxReportCardRow.AdjustCellSides; -var - ReportLink: TdxGridReportLink; - Sides: TdxCellSides; -begin - ReportLink := Card.ReportLink; - if ReportLink.OptionsCards.Borders then - begin - Sides := []; - if IsFirstItem then Include(Sides, csTop); - if IsLastItem then Include(Sides, csBottom); - if HasCaption then - begin - RowCaption.CellSides := RowCaption.CellSides + Sides; - RowCaption.CellSides := RowCaption.CellSides + [csLeft]; - end; - RowData.CellSides := RowData.CellSides + Sides; - RowData.CellSides := RowData.CellSides + [csRight]; - if not HasCaption then - RowData.CellSides := RowData.CellSides + [csLeft]; - end; - - if ReportLink.OptionsCards.RowBordersHorz then - begin - Sides := []; - if not IsFirstItem then Include(Sides, csTop); - if not IsLastItem then Include(Sides, csBottom); - if HasCaption then - RowCaption.CellSides := RowCaption.CellSides + Sides; - RowData.CellSides := RowData.CellSides + Sides; - end; - - if ReportLink.OptionsCards.RowBordersVert then - if HasCaption then - begin - RowCaption.CellSides := RowCaption.CellSides + [csRight]; - RowData.CellSides := RowData.CellSides + [csLeft]; - end; -end; - -procedure TdxReportCardRow.CreateItems(ABuilder: TdxGridCardViewBuilder); -const - InitialCaptionWidth = 100; - - function HasRowCaption: Boolean; - begin - Result := ABuilder.Adapter.ShowRowCaption[Index]; - end; - - procedure CreateRowCaption; - var - RowCaption: TdxReportCellText; - begin - RowCaption := ABuilder.Formatter.GetCardRowCaptionClass(GridCardRow).Create(Self); - RowCaption.Width := InitialCaptionWidth; - RowCaption.Height := Height; - RowCaption.Data := Integer(TdxGridCardRowCaption); - ABuilder.Formatter.DoInitializeCardRowCaption(RowCaption, GridCardRow, Card.GridCard); - ABuilder.Formatter.DoReportLinkInitializeCardRowCaption(RowCaption, GridCardRow, Card.GridCard); - end; - - procedure CreateRowData; - var - RowData: TAbstractdxReportCellData; - begin - RowData := ABuilder.Formatter.GetItemClass(GridCardRow, Card.GridCard, False).Create(Self); - if HasRowCaption then - RowData.Left := InitialCaptionWidth - else - RowData.Left := 0; - RowData.Width := Parent.Width - Left; - RowData.Height := DefaultDataRowLineHeight; - ABuilder.Formatter.DoInitializeItem(RowData, GridCardRow, Card.GridCard, False); - ABuilder.Formatter.DoReportLinkInitializeCardRowData(RowData, GridCardRow, Card.GridCard); - end; - -begin - if HasRowCaption then CreateRowCaption; - CreateRowData; - - Width := Width; - Height := Height; -end; - -function TdxReportCardRow.GetCard: TdxReportCard; -begin - Result := TdxReportCard(Parent); -end; - -function TdxReportCardRow.GetGridCardRow: TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(Data); -end; - -function TdxReportCardRow.GetHasCaption: Boolean; -begin - Result := (DataItemCount > 1) or ((DataItemCount = 1) and (CellCount > 0)); -end; - -function TdxReportCardRow.GetHeight: Integer; -begin - Result := inherited Height; -end; - -function TdxReportCardRow.GetProperties: TcxCustomEditProperties; -begin - Result := GridCardRow.GetProperties; -end; - -function TdxReportCardRow.GetRowCaption: TdxReportCellText; -begin - if HasCaption then - Result := DataItems[0] as TdxReportCellText - else - Result := nil; -end; - -function TdxReportCardRow.GetRowData: TAbstractdxReportCellData; -begin - if CellCount > 0 then - Result := TAbstractdxReportCellData(Cells[0]) - else - begin - if DataItemCount > 0 then - Result := DataItems[DataItemCount - 1] - else - Result := nil; - end; -end; - -function TdxReportCardRow.GetWidth: Integer; -begin - Result := inherited Width; -end; - -procedure TdxReportCardRow.SetHeight(Value: Integer); -begin - inherited Height := Value; - if HasCaption then RowCaption.Height := Height; - RowData.Height := Height; -end; - -procedure TdxReportCardRow.SetRowCaptionWidth(Value: Integer); -begin - if HasCaption then - begin - RowCaption.Width := Value; - RowData.Left := Value; - RowData.Width := Width - Value; - - if RowCaption.Width >= Width then - RowCaption.CellSides := RowCaption.CellSides + [csRight]; - end; -end; - -procedure TdxReportCardRow.SetWidth(Value: Integer); -begin - inherited Width := Value; - - if RowCaption <> nil then - if RowCaption.Width > Width then RowCaption.Width := Width; - - if RowData <> nil then - begin - if RowData.Left > Width then RowData.Left := Width; - RowData.Width := Width - RowData.Left; - end; -end; - -{ TdxCardBorderPainter } - -function TdxCardBorderPainter.Card: TdxReportCard; -begin - Result := inherited Item as TdxReportCard; -end; - -procedure TdxCardBorderPainter.Paint(DC: HDC); -begin - if Card.HasShadow then DrawShadow(DC); -end; - -procedure TdxCardBorderPainter.DrawShadow(DC: HDC); -begin - Renderer.FillRect(DC, Card.ShadowRectHorz, Card.ShadowColor); - Renderer.FillRect(DC, Card.ShadowRectVert, Card.ShadowColor); -end; - -{ TdxReportCard } - -constructor TdxReportCard.Create(AParent: TdxReportCell); -begin - inherited; - ShadowColor := clBlack; - ShadowDepth := dxDefaultCardsShadowDepth; - ShadowPosition := cspBottomRight; -end; - -constructor TdxReportCard.CreateEx(AParent: TdxReportCell; AGridCard: TcxGridCard); -begin - Create(AParent); - Data := Integer(AGridCard); -end; - -function TdxReportCard.GetBorderOuterBounds(DC: HDC): TRect; -begin - Result := inherited GetBorderBounds(DC); - with Result do - case ShadowPosition of - cspTopLeft: - begin - Inc(Left, ShadowDepth); - Inc(Top, ShadowDepth); - end; - cspTopRight: - begin - Dec(Right, ShadowDepth); - Inc(Top, ShadowDepth); - end; - cspBottomRight: - begin - Dec(Right, ShadowDepth); - Dec(Bottom, ShadowDepth); - end; - cspBottomLeft: - begin - Inc(Left, ShadowDepth); - Dec(Bottom, ShadowDepth); - end; - end; -end; - -function TdxReportCard.IndexOfCardRow(ACardRow: TcxGridCardViewRow): Integer; -begin - for Result := 0 to CellCount - 1 do - if Rows[Result].GridCardRow = ACardRow then Exit; - Result := -1; -end; - -procedure TdxReportCard.AdjustHeight; -var - TotalHeight, I: Integer; -begin - TotalHeight := 0; - for I := 0 to RowCount - 1 do - Inc(TotalHeight, RowHeights[I]); - Height := TotalHeight; -end; - -procedure TdxReportCard.AdjustRowsCellSides; -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - Rows[I].AdjustCellSides; -end; - -procedure TdxReportCard.AdjustRowsPos; -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - with Rows[I] do - begin - Left := RowsOriginLeft; - Top := Top + RowsOriginTop; - end; -end; - -procedure TdxReportCard.AdjustRowsHeight(DC: HDC; AAutoHeight: Boolean; - ABuilder: TdxGridCardViewBuilder); -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - RowHeights[I] := Rows[I].MeasureHeight(DC, not AAutoHeight, ABuilder); -end; - -procedure TdxReportCard.AdjustRowsWidth(DC: HDC); -begin - Width := RowCaptionWidth + MeasureDataWidth(DC); -end; - -function TdxReportCard.MeasureCaptionWidth(DC: HDC): Integer; -var - I, V: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - begin - V := Rows[I].MeasureCaptionWidth(DC); - if V > Result then Result := V; - end; -end; - -function TdxReportCard.MeasureDataWidth(DC: HDC): Integer; -var - I, V: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - begin - V := Rows[I].MeasureDataWidth(DC); - if V > Result then Result := V; - end; -end; - -procedure TdxReportCard.AddVerticalDelimiters; -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - ReportLink.AddVerticalDelimiter(Rows[I]); -end; - -procedure TdxReportCard.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -begin - inherited; - FShadowDepth := MulDiv(FShadowDepth, APixelsNumerator, APixelsDenominator); -end; - -procedure TdxReportCard.CreateRows(ABuilder: TdxGridCardViewBuilder); -var - I: Integer; - List: TList; - CardRow: TdxReportCardRow; -begin - List := TList.Create; - try - ABuilder.Adapter.GetVisibleCardRows(GridCard, List); - - AllocateSpaceForCells(List.Count); - for I := 0 to List.Count - 1 do - begin - CardRow := TdxReportCardRow.CreateEx(Self, TcxGridCardViewRow(List[I])); - CardRow.CreateItems(ABuilder); - end; - finally - List.Free; - end; -end; - -function TdxReportCard.GetBorderPainterClass: TdxPSCellBorderPainterClass; -begin - Result := TdxCardBorderPainter; -end; - -procedure TdxReportCard.ReadProperties(AReader: TdxPSDataReader); -begin - inherited; - with AReader do - begin - FRowCaptionWidth := ReadInteger; - FShadowColor := ReadInteger; - FShadowDepth := ReadInteger; - FShadowPosition := TdxGridCardShadowPosition(ReadInteger); - end; -end; - -procedure TdxReportCard.WriteProperties(AWriter: TdxPSDataWriter); -begin - inherited; - with AWriter do - begin - WriteInteger(RowCaptionWidth); - WriteInteger(ShadowColor); - WriteInteger(ShadowDepth); - WriteInteger(Integer(ShadowPosition)); - end; -end; - -function TdxReportCard.GetGridCard: TcxGridCard; -begin - Result := TcxGridCard(Data); -end; - -function TdxReportCard.GetHasShadow: Boolean; -begin - Result := ShadowDepth > 0; -end; - -function TdxReportCard.GetHeight: Integer; -begin - Result := inherited Height; -end; - -function TdxReportCard.GetRowCount: Integer; -begin - Result := CellCount; -end; - -function TdxReportCard.GetReportLink: TdxGridReportLink; -begin - Result := TdxGridReportLink(ReportCells.ReportLink); -end; - -function TdxReportCard.GetRow(Index: Integer): TdxReportCardRow; -begin - Result := Cells[Index] as TdxReportCardRow; -end; - -function TdxReportCard.GetRowByCardRow(CardRow: TcxGridCardViewRow): TdxReportCardRow; -begin - Result := Rows[IndexOfCardRow(CardRow)]; -end; - -function TdxReportCard.GetRowHeight(Index: Integer): Integer; -begin - Result := Rows[Index].Height; -end; - -function TdxReportCard.GetRowsAvailableHeight: Integer; -begin - Result := Height - ShadowDepth; -end; - -function TdxReportCard.GetRowsAvailableWidth: Integer; -begin - Result := Width - ShadowDepth; -end; - -function TdxReportCard.GetRowsOriginLeft: Integer; -begin - if ShadowPosition in [cspTopLeft, cspBottomLeft] then - Result := ShadowDepth - else - Result := 0; -end; - -function TdxReportCard.GetRowsOriginTop: Integer; -begin - if ShadowPosition in [cspTopLeft, cspTopRight] then - Result := ShadowDepth - else - Result := 0; -end; - -function TdxReportCard.GetShadowRectHorz: TRect; -begin - Result := BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - with Result do - case ShadowPosition of - cspTopLeft: - begin - Right := Right - ShadowDepth; - Bottom := Top + ShadowDepth; - end; - cspTopRight: - begin - Left := Left + ShadowDepth; - Bottom := Top + ShadowDepth; - end; - cspBottomRight: - begin - Left := Left + ShadowDepth; - Top := Bottom - ShadowDepth; - end; - cspBottomLeft: - begin - Right := Right - ShadowDepth; - Top := Bottom - ShadowDepth; - end; - end; -end; - -function TdxReportCard.GetShadowRectVert: TRect; -begin - Result := BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); - with Result do - case ShadowPosition of - cspTopLeft: - begin - Right := Left + ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - cspTopRight: - begin - Left := Right - ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - cspBottomRight: - begin - Left := Right - ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - cspBottomLeft: - begin - Right := Left + ShadowDepth; - Top := Top + ShadowDepth; - Bottom := Bottom - ShadowDepth; - end; - end; -end; - -function TdxReportCard.GetWidth: Integer; -begin - Result := inherited Width; -end; - -procedure TdxReportCard.SetHeight(Value: Integer); -begin - inherited Height := Value + ShadowDepth; -end; - -procedure TdxReportCard.SetRowCaptionWidth(Value: Integer); -var - I: Integer; -begin - if Value < 0 then Value := 0; - - FRowCaptionWidth := Value; - for I := 0 to RowCount - 1 do - Rows[I].RowCaptionWidth := Value; -end; - -procedure TdxReportCard.SetRowHeight(Index, Value: Integer); -var - Delta, I: Integer; -begin - if Value < 0 then Value := 0; - - Delta := Value - Rows[Index].Height; - Rows[Index].Height := Value; - - for I := Index + 1 to RowCount - 1 do - Rows[I].Top := Rows[I].Top + Delta; -end; - -procedure TdxReportCard.SetShadowDepth2(Value: Integer); -var - SaveWidth, SaveHeight: Integer; -begin - if FShadowDepth <> Value then - begin - SaveHeight := RowsAvailableHeight; - SaveWidth := RowsAvailableWidth; - FShadowDepth := Value; - Height := SaveHeight; - Width := SaveWidth; - end; -end; - -procedure TdxReportCard.SetWidth(Value: Integer); -var - I: Integer; -begin - inherited Width := Value + ShadowDepth; - for I := 0 to RowCount - 1 do - Rows[I].Width := RowsAvailableWidth; -end; - -{ TdxGridCardViewBuilder } - -constructor TdxGridCardViewBuilder.Create(AReportLink: TdxGridReportLink; - AMasterBuilder: TdxCustomGridViewBuilder; AGridView: TcxCustomGridView); -begin - inherited; - FCards := TList.Create; -end; - -destructor TdxGridCardViewBuilder.Destroy; -begin - FreeAndNil(FCards); - inherited; -end; - -function TdxGridCardViewBuilder.Adapter: TdxGridCardViewAdapter; -begin - Result := inherited Adapter as TdxGridCardViewAdapter; -end; - -class function TdxGridCardViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridCardViewAdapter; -end; - -function TdxGridCardViewBuilder.Formatter: TdxGridCardViewFormatter; -begin - Result := inherited Formatter as TdxGridCardViewFormatter; -end; - -class function TdxGridCardViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxGridCardViewFormatter; -end; - -procedure TdxGridCardViewBuilder.DoBuildViewBody; -begin - CreateCards; - if not IsAborted then - begin - ResizeCards; - PlaceCards; - AdjustCardRowsCellSides; - end; -end; - -procedure TdxGridCardViewBuilder.AdjustCardRowsCellSides; -var - I: Integer; -begin - for I := 0 to CardCount - 1 do - Cards[I].AdjustRowsCellSides; -end; - -procedure TdxGridCardViewBuilder.CreateCards; -var - Producer: TdxGridCardViewCardsRowProducer; - I: Integer; -begin - Producer := GetCardsRowProducer; - - FCards.Count := Formatter.CardCount; - for I := 0 to CardCount - 1 do - begin - FCards[I] := Producer.CreateCard(Host, Formatter.Cards[I]); - if MasterBuilder = nil then - begin - Progress(100 * (I + 1) / Formatter.CardCount); - if IsAborted then Break; - end; - end; -end; - -procedure TdxGridCardViewBuilder.PlaceCards; - - procedure MakeRowIndexes(AnIndexes: TList); - var - I, PlaceWidth, EntryNumber: Integer; - begin - I := 0; - if CardCount > 0 then AnIndexes.Add(TObject(0)); - - while I < CardCount do - begin - PlaceWidth := Formatter.CardsAreaWidth; - EntryNumber := 0; - repeat - Inc(EntryNumber); - if EntryNumber > 1 then - Dec(PlaceWidth, Formatter.InterCardsSpaceHorz); - Dec(PlaceWidth, Cards[I].Width); - if (PlaceWidth >= 0) or (EntryNumber = 1) then - Inc(I); - until (PlaceWidth <= 0) or (I >= CardCount); - AnIndexes.Add(TObject(I)); - end; - end; - - procedure MakeRows(AIndexes: TList; AProducer: TdxGridCardViewCardsRowProducer); - - function GetMaxCardHeight(AStartIndex, AEndIndex: Integer): Integer; - var - I, V: Integer; - begin - Result := Cards[AStartIndex].Height; - {$IFNDEF DXVER500} - if not Formatter.KeepSameHeight then - {$ENDIF} - for I := AStartIndex + 1 to AEndIndex do - begin - V := Cards[I].Height; - if Result < V then Result := V; - end; - end; - - var - RowIndex, StartIndex, EndIndex, I, RowHeight: Integer; - ReportRow: TdxReportCell; - begin - for RowIndex := 0 to AIndexes.Count - 2 do - begin - StartIndex := Integer(AIndexes[RowIndex]); - EndIndex := Integer(AIndexes[RowIndex + 1]) - 1; - - RowHeight := GetMaxCardHeight(StartIndex, EndIndex) + Formatter.InterCardsSpaceHorz; - ReportRow := AProducer.Produce(HostInfoServices.PageDetailsHostInfo, RowHeight); - AddReportRow(ReportRow); - - for I := StartIndex to EndIndex do - AProducer.InjectCard(Cards[I], I - StartIndex); - end; - end; - -var - Indexes: TList; -begin - Indexes := TList.Create; - try - MakeRowIndexes(Indexes); - MakeRows(Indexes, GetCardsRowProducer); - finally - Indexes.Free; - end; -end; - -procedure TdxGridCardViewBuilder.ResizeCards; - - procedure SetCardsRowCaptionWidth(DC: HDC); - var - RowCaptionWidth, I, V: Integer; - begin - if Formatter.CaptionAutoWidth then - begin - RowCaptionWidth := 0; - for I := 0 to CardCount - 1 do - begin - V := Cards[I].MeasureCaptionWidth(DC); - if V > RowCaptionWidth then RowCaptionWidth := V; - end; - end - else - RowCaptionWidth := Adapter.CardCaptionWidth; - - if (RowCaptionWidth > Adapter.CardWidth) and not Formatter.AutoWidth then - RowCaptionWidth := Adapter.CardWidth; - - for I := 0 to CardCount - 1 do - Cards[I].RowCaptionWidth := RowCaptionWidth; - end; - - procedure CalcMaxCardWidth; - var - I, V: Integer; - begin - FMaxCardWidth := 0; - for I := 0 to CardCount - 1 do - begin - V := Cards[I].Width; - if V > FMaxCardWidth then FMaxCardWidth := V; - end; - end; - - procedure SetCardsAutoWidth(DC: HDC); - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - Cards[I].AdjustRowsWidth(DC); - end; - - procedure SetSameCardsWidth(AWidth: Integer); - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - Cards[I].Width := AWidth; - end; - - procedure SetCardsRowHeight(DC: HDC; AAutoHeight: Boolean); - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - Cards[I].AdjustRowsHeight(DC, AAutoHeight, Self); - end; - - procedure SetCardsSameHeights; - var - CardRowHeights: array of Integer; - I, J, RowIndex: Integer; - Card: TdxReportCard; - Row: TdxReportCardRow; - begin - SetLength(CardRowHeights, Adapter.CardRowCount); - - for I := 0 to CardCount - 1 do - begin - Card := Cards[I]; - for J := 0 to Card.RowCount - 1 do - begin - Row := Card.Rows[J]; - RowIndex := Row.GridCardRow.VisibleIndex; - if CardRowHeights[RowIndex] < Row.Height then - CardRowHeights[RowIndex] := Row.Height; - end; - end; - - for I := 0 to CardCount - 1 do - begin - Card := Cards[I]; - for J := 0 to Card.RowCount - 1 do - begin - RowIndex := Card.Rows[J].GridCardRow.VisibleIndex; - Card.RowHeights[J] := CardRowHeights[RowIndex]; - end; - end; - end; - - procedure AdjustCards; - var - I: Integer; - begin - for I := 0 to CardCount - 1 do - with Cards[I] do - begin - AdjustHeight; - AdjustRowsPos; - end; - end; - -begin - FMaxCardWidth := 0; - SetCardsRowCaptionWidth(Formatter.DC); - if Formatter.AutoWidth then - begin - SetCardsAutoWidth(Formatter.DC); - CalcMaxCardWidth; - if Formatter.KeepSameWidth then SetSameCardsWidth(FMaxCardWidth - 4); - end; - CalcMaxCardWidth; - - SetCardsRowHeight(Formatter.DC, Formatter.RowAutoHeight); - if Formatter.KeepSameHeight then SetCardsSameHeights; - - AdjustCards; -end; - -function TdxGridCardViewBuilder.GetCardsRowProducer: TdxGridCardViewCardsRowProducer; -begin - Result := ProducerCache[GetCardsRowProducerClass] as TdxGridCardViewCardsRowProducer; -end; - -function TdxGridCardViewBuilder.GetCardsRowProducerClass: TdxGridCardViewCardsRowProducerClass; -begin - Result := TdxGridCardViewCardsRowProducer; -end; - -function TdxGridCardViewBuilder.GridView: TcxGridCardView; -begin - Result := inherited GridView as TcxGridCardView; -end; - -class function TdxGridCardViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -function TdxGridCardViewBuilder.GetCard(Index: Integer): TdxReportCard; -begin - Result := TdxReportCard(FCards[Index]); -end; - -function TdxGridCardViewBuilder.GetCardCount: Integer; -begin - Result := FCards.Count; -end; - -{ TdxGridDBCardViewAdapter } - -function TdxGridDBCardViewAdapter.GridView: TcxGridDBCardView; -begin - Result := inherited GridView as TcxGridDBCardView; -end; - -class function TdxGridDBCardViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -procedure TdxGridDBCardViewAdapter.AfterBuilding; -begin - UnloadAllRecords; - inherited; -end; - -procedure TdxGridDBCardViewAdapter.BeforeBuilding; -begin - inherited; - LoadAllRecords; -end; - -function TdxGridDBCardViewAdapter.DataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(inherited DataController); -end; - -function TdxGridDBCardViewAdapter.DBDataModeController: TcxDBDataModeController; -begin - Result := DataController.DataModeController; -end; - -procedure TdxGridDBCardViewAdapter.LoadAllRecords; -begin - _LoadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -procedure TdxGridDBCardViewAdapter.UnloadAllRecords; -begin - _UnloadAllRecords(DBDataModeController, FPrevAllRecordsAreLoaded); -end; - -{ TdxGridDBCardViewBuilder } - -function TdxGridDBCardViewBuilder.Adapter: TdxGridDBCardViewAdapter; -begin - Result := inherited Adapter as TdxGridDBCardViewAdapter; -end; - -class function TdxGridDBCardViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridDBCardViewAdapter; -end; -{$IFDEF CHARTVIEW} -{ TdxGridChartViewAdapter } - -function TdxGridChartViewAdapter.GridView: TcxGridChartView; -begin - Result := inherited GridView as TcxGridChartView; -end; - -class function TdxGridChartViewAdapter.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridChartView; -end; - -function TdxGridChartViewAdapter.CreateGraphic(AGraphicClass: TGraphicClass; - AWidth: Integer): TGraphic; -var - AGraphic: TGraphic; -begin - if not (AGraphicClass.InheritsFrom(TBitmap) or AGraphicClass.InheritsFrom(TMetaFile)) then - begin - Result := GridView.CreateImage(TBitmap, Max(AWidth, 0), 0); - AGraphic := AGraphicClass.Create; - try - AGraphic.Assign(Result); - finally - Result.Free; - Result := AGraphic; - end; - end - else - Result := GridView.CreateImage(AGraphicClass, Max(AWidth, 0), 0); -end; - -function TdxGridChartViewAdapter.GetCanUseOnEveryPageMode: Boolean; -begin - Result := True; -end; - -{ TdxGridChartViewFormatter } - -function TdxGridChartViewFormatter.Adapter: TdxGridChartViewAdapter; -begin - Result := inherited Adapter as TdxGridChartViewAdapter; -end; - -function TdxGridChartViewFormatter.Builder: TdxGridChartViewBuilder; -begin - Result := inherited Builder as TdxGridChartViewBuilder; -end; - -function TdxGridChartViewFormatter.CreateChartImage: TGraphic; - - function GetWidth: Integer; - begin - if ReportLink.OptionsSize.AutoWidth then - Result := ViewAvailableWidth - else - Result := -1; - end; - -begin - Result := Adapter.CreateGraphic(GraphicClass, GetWidth); -end; - -procedure TdxGridChartViewFormatter.DoInitializeChartItem(AnItem: TdxReportCellGraphic); -begin - AnItem.ImageBuffering := cibNone; - AnItem.Image.Transparent := GraphicTransparent; - AnItem.ImageTransparent := GraphicTransparent; - AnItem.Center := True; -end; - -procedure TdxGridChartViewFormatter.DoReportLinkInitializeChartItem(AnItem: TdxReportCellGraphic); -begin - ReportLink.DoInitializeChartCell(Adapter.GridView, AnItem); -end; - -function TdxGridChartViewFormatter.GetChartItemClass: TdxReportCellGraphicClass; -begin - Result := TdxReportCellGraphic; -end; - -function TdxGridChartViewFormatter.GetViewWidth: Integer; -begin - Result := ViewAvailableWidth; -end; - -function TdxGridChartViewFormatter.GetGraphicClass: TGraphicClass; -begin - Result := ReportLink.OptionsCharts.GraphicClass; -end; - -function TdxGridChartViewFormatter.GetGraphicTransparent: Boolean; -begin - Result := ReportLink.OptionsCharts.Transparent; -end; - -{ TdxGridChartViewBuilder } - -function TdxGridChartViewBuilder.Adapter: TdxGridChartViewAdapter; -begin - Result := inherited Adapter as TdxGridChartViewAdapter; -end; - -class function TdxGridChartViewBuilder.AdapterClass: TdxGridViewAdapterClass; -begin - Result := TdxGridChartViewAdapter; -end; - -function TdxGridChartViewBuilder.Formatter: TdxGridChartViewFormatter; -begin - Result := inherited Formatter as TdxGridChartViewFormatter; -end; - -class function TdxGridChartViewBuilder.FormatterClass: TdxGridViewFormatterClass; -begin - Result := TdxGridChartViewFormatter; -end; - -procedure TdxGridChartViewBuilder.DoBuildViewBody; -begin - inherited; - CreateChart; -end; - -procedure TdxGridChartViewBuilder.CreateChart; -var - ReportRow: TdxReportCell; -begin - ReportRow := GetChartProducer.Produce(HostInfoServices.PageDetailsHostInfo); - AddReportRow(ReportRow); -end; - -function TdxGridChartViewBuilder.GetChartProducer: TdxGridChartViewChartProducer; -begin - Result := ProducerCache[GetChartProducerClass] as TdxGridChartViewChartProducer; -end; - -function TdxGridChartViewBuilder.GetChartProducerClass: TdxGridChartViewChartProducerClass; -begin - Result := TdxGridChartViewChartProducer; -end; - -function TdxGridChartViewBuilder.GridView: TcxGridChartView; -begin - Result := inherited GridView as TcxGridChartView; -end; - -class function TdxGridChartViewBuilder.GridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridChartView; -end; - -{$ENDIF} - -{ TdxGridViewRowProducer } - -constructor TdxGridViewRowProducer.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited Create; - FBuilder := ABuilder; - FMasterIndents := TList.Create; -end; - -destructor TdxGridViewRowProducer.Destroy; -begin - FMasterIndents.Free; - inherited; -end; - -function TdxGridViewRowProducer.Adapter: TdxCustomGridViewAdapter; -begin - Result := Builder.Adapter; -end; - -function TdxGridViewRowProducer.Builder: TdxCustomGridViewBuilder; -begin - Result := FBuilder; -end; - -function TdxGridViewRowProducer.Formatter: TdxCustomGridViewFormatter; -begin - Result := Builder.Formatter; -end; - -function TdxGridViewRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; -begin - FMasterIndents.Clear; - - CalculateRowHeight; - - CreateRowHost(AHostInfo); - CreateRow; - if AutoHeight then - begin - CalculateRowAutoHeight; - FixupRowHeight; - end; - - Inc(AHostInfo.Origin.Y, RowHeight); - Result := Host; -end; - -procedure TdxGridViewRowProducer.AddLeadingMasterIndentsAndSeparators; -var - LeftPos, I: Integer; -begin - LeftPos := 0; - for I := 0 to Formatter.AbsoluteLevel - 1 do - with MasterBuilders[I] do - begin - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskLeading); - AddMasterIndents(Formatter, Adapter, I, LeftPos); - end; - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskLeading); -end; - -procedure TdxGridViewRowProducer.AddMasterIndents(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; ALevel: Integer; var ALeftPos: Integer); -var - I: Integer; - Indent: TdxReportCellExpandButton; -begin - for I := 0 to AMasterAdapter.IndentCount - 1 do - begin - Indent := CreateMasterIndent(Host); - Indent.BoundsRect := MakeBounds(ALeftPos, 0, AMasterAdapter.IndentWidth, RowHeight); - InitializeMasterIndent(AMasterFormatter, Indent, I, ALevel); - Inc(ALeftPos, Indent.Width); - end; -end; - -procedure TdxGridViewRowProducer.AddMasterSeparator(AMasterFormatter: TdxCustomGridViewFormatter; - AMasterAdapter: TdxCustomGridViewAdapter; var ALeftPos: Integer; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -var - Separator: TdxReportCellBox; -begin - if AMasterAdapter.HasDetailsSeparator then - begin - Separator := CreateDetailsSeparator(Host); - Separator.BoundsRect := MakeBounds(ALeftPos, 0, AMasterFormatter.DetailsSeparatorThickness, RowHeight); - InitializeDetailsSeparator(AMasterFormatter, Separator, ASeparatorKind); - Inc(ALeftPos, Separator.Width); - end; -end; - -procedure TdxGridViewRowProducer.AddTrailingMasterSeparators; -var - LeftPos, I: Integer; -begin - LeftPos := Width - Formatter.ViewWidthExtraAfter; - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskTrailing); - for I := Formatter.AbsoluteLevel - 1 downto 0 do - with Builder.AbsoluteBuilders[I] do - AddMasterSeparator(Formatter, Adapter, LeftPos, vdskTrailing); -end; - -function TdxGridViewRowProducer.CalculateItemHeight(DC: HDC; AnItem: TdxReportVisualItem): Integer; -begin - Result := AnItem.MeasureContentHeight(DC); -end; - -procedure TdxGridViewRowProducer.CalculateRowAutoHeight; -var - DC: HDC; - ItemsSite: TdxReportCell; - MaxRowHeight, I, V: Integer; - Item: TdxReportVisualItem; -begin - DC := Self.DC; - ItemsSite := Self.ItemsSite; - MaxRowHeight := 0; - for I := 0 to ItemsSite.DataItemCount - 1 do - begin - Item := ItemsSite.DataItems[I]; - if DoesItemParticipateInRowAutoHeightCalculation(Item) then - begin - V := CalculateItemHeight(DC, Item); - if MaxRowHeight < V then MaxRowHeight := V; - end; - end; - {3.1} - for I := 0 to ItemsSite.CellCount - 1 do - begin - Item := ItemsSite.Cells[I]; - if DoesItemParticipateInRowAutoHeightCalculation(Item) then - begin - V := CalculateItemHeight(DC, Item); - if MaxRowHeight < V then MaxRowHeight := V; - end; - end; - if RowHeight < MaxRowHeight then - RowHeight := MaxRowHeight; -end; - -procedure TdxGridViewRowProducer.CalculateRowHeight; -begin - FRowHeight := LineCount * LineHeight; -end; - -function TdxGridViewRowProducer.CreateDetailsSeparator(AParent: TdxReportCell): TdxReportCellBox; -begin - Result := GetDetailsSeparatorClass.Create(AParent); - FMasterIndents.Add(Result); -end; - -function TdxGridViewRowProducer.CreateMasterIndent(AParent: TdxReportCell): TdxReportCellExpandButton; -begin - Result := GetMasterIndentClass.Create(AParent); - FMasterIndents.Add(Result); -end; - -procedure TdxGridViewRowProducer.CreateRow; -begin - FRow := GetRowHostClass.Create(Host); - FRow.BoundsRect := MakeBounds(RowOriginX, 0, RowWidth, RowHeight); - InitializeRow; - AddTrailingMasterSeparators; -end; - -procedure TdxGridViewRowProducer.CreateRowHost(const AHostInfo: TdxGridAttributeHostInfo); -begin - FHost := HostClass.Create(AHostInfo.Parent); - FHost.BoundsRect := MakeBounds(AHostInfo.Origin.X, AHostInfo.Origin.Y, Width, RowHeight); - InitializeHost; - AddLeadingMasterIndentsAndSeparators; -end; - -function TdxGridViewRowProducer.DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; -begin - Result := True; -end; - -function TdxGridViewRowProducer.GetDetailsSeparatorClass: TdxReportCellBoxClass; -begin - Result := Formatter.GetDetailsSeparatorClass; -end; - -function TdxGridViewRowProducer.GetMasterIndentClass: TdxReportCellExpandButtonClass; -begin - Result := Formatter.GetMasterIndentClass; -end; - -procedure TdxGridViewRowProducer.FixupMasterIndentsHeight; -var - I: Integer; -begin - for I := 0 to MasterIndentCount - 1 do - with MasterIndents[I] do - Height := Parent.Height; -end; - -procedure TdxGridViewRowProducer.FixupRowDataItemHeight(AnItem: TdxReportVisualItem); -begin - with AnItem do - Height := Parent.Height; -end; - -procedure TdxGridViewRowProducer.FixupRowDataHeight; -begin -end; - -procedure TdxGridViewRowProducer.FixupRowHeight; -begin - FixupRowOwnHeight; - FixupMasterIndentsHeight; - FixupRowDataHeight; -end; - -procedure TdxGridViewRowProducer.FixupRowOwnHeight; -begin - Host.Height := RowHeight; - Row.Height := RowHeight; - ItemsSite.Height := RowHeight; -end; - -procedure TdxGridViewRowProducer.InitializeDetailsSeparator(AFormatter: TdxCustomGridViewFormatter; - ASeparator: TdxReportCellBox; ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - AFormatter.DoInitializeVertDetailsSeparator(ASeparator, ASeparatorKind); -end; - -procedure TdxGridViewRowProducer.InitializeMasterIndent(AFormatter: TdxCustomGridViewFormatter; - AIndent: TdxReportCellExpandButton; AIndex, ALevel: Integer); -begin - AFormatter.DoInitializeMasterIndent(AIndent, AIndex, MasterBuilders[ALevel].Adapter.IndentCount); -end; - -procedure TdxGridViewRowProducer.InitializeHost; -begin - Formatter.DoInitializeHost(Host); -end; - -procedure TdxGridViewRowProducer.InitializeRow; -begin -end; - -function TdxGridViewRowProducer.GetAutoHeight: Boolean; -begin - Result := LineCount = 1; -end; - -function TdxGridViewRowProducer.GetItemsSite: TdxReportCell; -begin - Result := Row; -end; - -function TdxGridViewRowProducer.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridViewRowProducer.GetLineHeight: Integer; -begin - Result := 20; -end; - -function TdxGridViewRowProducer.GetDC: HDC; -begin - Result := Formatter.DC; -end; - -function TdxGridViewRowProducer.GetHostClass: TdxReportCellClass; -begin - Result := Formatter.GetHostClass; -end; - -function TdxGridViewRowProducer.GetIndentWidth: Integer; -begin - Result := Adapter.IndentWidth; -end; - -function TdxGridViewRowProducer.GetMasterBuilder(Index: Integer): TdxCustomGridViewBuilder; -begin - Result := Builder.AbsoluteBuilders[Index]; -end; - -function TdxGridViewRowProducer.GetMasterIndent(Index: Integer): TdxReportCellBox; -begin - Result := TdxReportCellBox(FMasterIndents[Index]); -end; - -function TdxGridViewRowProducer.GetMasterIndentCount: Integer; -begin - Result := FMasterIndents.Count; -end; - -function TdxGridViewRowProducer.GetRowHostClass: TdxReportCellClass; -begin - Result := Formatter.GetRowHostClass; -end; - -function TdxGridViewRowProducer.GetWidth: Integer; -begin - with Formatter do - Result := ViewWidthExtraBefore + ViewWidth + ViewWidthExtraAfter; -end; - -function TdxGridViewRowProducer.GetRowOriginX: Integer; -begin - Result := Formatter.ViewWidthExtraBefore; -end; - -function TdxGridViewRowProducer.GetRowWidth: Integer; -begin - Result := Formatter.ViewWidth; -end; - -{ TdxGridViewCustomRowProducer } - -function TdxGridViewCustomRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; -begin - Result := inherited Produce(AHostInfo); - AddItem; -end; - -procedure TdxGridViewCustomRowProducer.AddItem; -begin - FItem := CreateItem(Row); - FItem.BoundsRect := MakeRect(0, 0, RowWidth, RowHeight); - InitializeItem; -end; - -function TdxGridViewCustomRowProducer.CreateItem(AParent: TdxReportCell): TAbstractdxReportCellData; -begin - Result := GetItemClass.Create(AParent); -end; - -procedure TdxGridViewCustomRowProducer.FixupRowDataHeight; -begin - inherited; - FixupRowDataItemHeight(Item); -end; - -procedure TdxGridViewCustomRowProducer.InitializeItem; -begin -end; - -function TdxGridViewCustomRowProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxGridViewCustomRowProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := TAbstractdxReportCellData; -end; - -{ TdxGridViewCaptionProducer } - -procedure TdxGridViewCaptionProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeCaption(Item); - Formatter.DoReportLinkInitializeCaption(Item); -end; - -procedure TdxGridViewCaptionProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeCaptionRow(Row); -end; - -function TdxGridViewCaptionProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetCaptionClass; -end; - -function TdxGridViewCaptionProducer.GetLineHeight: Integer; -begin - Result := Formatter.CaptionLineHeight; -end; - -function TdxGridViewCaptionProducer.GetItem: TdxReportCellText; -begin - Result := TdxReportCellText(inherited Item); -end; - -{ TdxGridViewFilterBarProducer } - -procedure TdxGridViewFilterBarProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeFilterBar(Item); - Formatter.DoReportLinkInitializeFilterBar(Item); -end; - -procedure TdxGridViewFilterBarProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeFilterBarRow(Row); -end; - -function TdxGridViewFilterBarProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetFilterBarClass; -end; - -function TdxGridViewFilterBarProducer.GetLineHeight: Integer; -begin - Result := Formatter.FilterBarLineHeight; -end; - -function TdxGridViewFilterBarProducer.GetItem: TdxReportCellText; -begin - Result := TdxReportCellText(inherited Item); -end; - -{ TdxGridViewDetailsSeparatorProducer } - -procedure TdxGridViewDetailsSeparatorProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeHorzDetailsSeparator(Item); -end; - -procedure TdxGridViewDetailsSeparatorProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeDetailsSeparatorRow(Row); -end; - -function TdxGridViewDetailsSeparatorProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetDetailsSeparatorClass; -end; - -function TdxGridViewDetailsSeparatorProducer.GetLineHeight: Integer; -begin - Result := Formatter.DetailsSeparatorThickness; -end; - -function TdxGridViewDetailsSeparatorProducer.GetItem: TdxReportCellBox; -begin - Result := TdxReportCellBox(inherited Item); -end; - -{ TdxGridViewDetailsTopSeparatorProducer } - -procedure TdxGridViewDetailsTopSeparatorProducer.InitializeDetailsSeparator( - AFormatter: TdxCustomGridViewFormatter; ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - if AFormatter = Formatter then - AFormatter.DoInitializeVertTopDetailsSeparator(ASeparator, ASeparatorKind) - else - inherited; -end; - -{ TdxGridViewDetailsBottomSeparatorProducer } - -procedure TdxGridViewDetailsBottomSeparatorProducer.InitializeDetailsSeparator( - AFormatter: TdxCustomGridViewFormatter; ASeparator: TdxReportCellBox; - ASeparatorKind: TdxVerticalDetailsSeparatorKind); -begin - if AFormatter = Formatter then - AFormatter.DoInitializeVertBottomDetailsSeparator(ASeparator, ASeparatorKind) - else - inherited; -end; - -{ TdxGridViewTerminatorProducer } - -procedure TdxGridViewTerminatorProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeViewTerminator(Item); -end; - -function TdxGridViewTerminatorProducer.GetLineHeight: Integer; -begin - Result := 1; -end; - -{ TdxGridTableViewRowProducer } - -function TdxGridTableViewRowProducer.Adapter: TdxGridTableViewAdapter; -begin - Result := inherited Adapter as TdxGridTableViewAdapter; -end; - -function TdxGridTableViewRowProducer.Builder: TdxGridTableViewBuilder; -begin - Result := inherited Builder as TdxGridTableViewBuilder; -end; - -function TdxGridTableViewRowProducer.Formatter: TdxGridTableViewFormatter; -begin - Result := Builder.Formatter; -end; - -{ TdxGridTableViewRowSubItemsProducer } - -constructor TdxGridTableViewRowSubItemsProducer.Create(ABuilder: TdxCustomGridViewBuilder); -begin - inherited; - FIndents := TList.Create; - FSubItems := TList.Create; -end; - -destructor TdxGridTableViewRowSubItemsProducer.Destroy; -begin - FreeAndNil(FSubItems); - FreeAndNil(FIndents); - inherited; -end; - -function TdxGridTableViewRowSubItemsProducer.Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; -begin - InitializeIndentList; - InitializeSubItemList; - Result := inherited Produce(AHostInfo); -end; - -procedure TdxGridTableViewRowSubItemsProducer.AddIndents(AParent: TdxReportCell); -begin -end; - -procedure TdxGridTableViewRowSubItemsProducer.AddSubItems(AParent: TdxReportCell); -var - I: Integer; - Item: TAbstractdxReportCellData; -begin - for I := 0 to GetSubItemCount - 1 do - if HasSubItem[I] then - begin - Item := CreateSubItem(I, AParent); - Item.BoundsRect := SubItemBounds[I]; // needed before item initialization - InitializeSubItem(Item, I); - end; -end; - -procedure TdxGridTableViewRowSubItemsProducer.CreateRow; -begin - inherited; - AddIndents(Row); - AddSubItems(Row); -end; - -function TdxGridTableViewRowSubItemsProducer.CreateSubItem(AnIndex: Integer; - AParent: TdxReportCell): TAbstractdxReportCellData; -begin - Result := SubItemClasses[AnIndex].Create(AParent); - FSubItems[AnIndex] := Result; -end; - -function TdxGridTableViewRowSubItemsProducer.IsItemIndent(AnItem: TdxReportVisualItem): Boolean; -begin - Result := FIndents.IndexOf(AnItem) <> -1; -end; - -procedure TdxGridTableViewRowSubItemsProducer.FixupIndentsHeight; -var - I: Integer; -begin - for I := 0 to IndentCount - 1 do - with Indents[I] do - Height := Parent.Height; -end; - -procedure TdxGridTableViewRowSubItemsProducer.FixupRowDataHeight; -var - I: Integer; - SubItem: TdxReportVisualItem; -begin - for I := 0 to SubItemCount - 1 do {.SubItemCount} - begin - SubItem := SubItems[I]; - if SubItem <> nil then - FixupRowDataItemHeight(SubItem); - end; -end; - -procedure TdxGridTableViewRowSubItemsProducer.FixupRowHeight; -begin - inherited; - FixupIndentsHeight; -end; - -procedure TdxGridTableViewRowSubItemsProducer.InitializeIndentList; -begin - FIndents.Clear; - FIndents.Count := GetIndentCount; -end; - -procedure TdxGridTableViewRowSubItemsProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin -end; - -procedure TdxGridTableViewRowSubItemsProducer.InitializeSubItemList; -begin - FSubItems.Clear; - FSubItems.Count := GetSubItemCount; -end; - -function TdxGridTableViewRowSubItemsProducer.GetHasSubItem(Index: Integer): Boolean; -begin - Result := True; -end; - -function TdxGridTableViewRowSubItemsProducer.GetIndentCount: Integer; -begin - Result := 0; -end; - -function TdxGridTableViewRowSubItemsProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := MakeRect(0, 0, -1, -1); -end; - -function TdxGridTableViewRowSubItemsProducer.GetSubItemCount: Integer; -begin - Result := Formatter.ColumnCount; -end; - -function TdxGridTableViewRowSubItemsProducer.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := Formatter.Columns[Index]; -end; - -function TdxGridTableViewRowSubItemsProducer.GetIndent(Index: Integer): TdxReportCellExpandButton; -begin - Result := TdxReportCellExpandButton(FIndents[Index]); -end; - -function TdxGridTableViewRowSubItemsProducer.GetSubItem(Index: Integer): TdxReportVisualItem; -begin - Result := TdxReportVisualItem(FSubItems[Index]); -end; - -{ TdxGridTableViewHeadersProducer } - -procedure TdxGridTableViewHeadersProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeHeaderRow(Row); -end; - -procedure TdxGridTableViewHeadersProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeHeaderItem(ASubItem, AIndex); - Formatter.DoReportLinkInitializeHeaderItem(ASubItem, AIndex); -end; - -function TdxGridTableViewHeadersProducer.GetAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.HeaderAutoHeight; -end; - -function TdxGridTableViewHeadersProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TdxGridTableViewHeadersProducer.GetLineHeight: Integer; -begin - Result := Formatter.HeaderLineHeight; -end; - -function TdxGridTableViewHeadersProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetHeaderItemBounds(Index); -end; - -function TdxGridTableViewHeadersProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetHeaderItemClass(Index); -end; - -{ TdxGridTableViewFootersProducer } - -procedure TdxGridTableViewFootersProducer.CalculateRowAutoHeight; -begin - inherited; - Inc(FRowHeight, 2 * FooterItemInflateVert); -end; - -procedure TdxGridTableViewFootersProducer.CalculateRowHeight; -begin - if AutoHeight then - inherited - else - RowHeight := LineCount * LineHeight; -end; - -procedure TdxGridTableViewFootersProducer.FixupRowDataItemHeight(AnItem: TdxReportVisualItem); -begin - with AnItem do - Height := Parent.Height - 2 * FooterItemInflateVert; -end; - -procedure TdxGridTableViewFootersProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeFooterRow(Row); -end; - -procedure TdxGridTableViewFootersProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeFooterItem(ASubItem, AIndex); - Formatter.DoReportLinkInitializeFooterItem(ASubItem, AIndex); -end; - -function TdxGridTableViewFootersProducer.GetAutoHeight: Boolean; -var - I: Integer; -begin - Result := inherited GetAutoHeight and Adapter.FooterMultiline; - if Result then - begin - for I := 0 to SubItemCount - 1 do - if HasSubItem[I] then Exit; - Result := False; - end; -end; - -function TdxGridTableViewFootersProducer.GetHasSubItem(Index: Integer): Boolean; -begin - Result := Adapter.HasFooterItem[Index]; -end; - -function TdxGridTableViewFootersProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TdxGridTableViewFootersProducer.GetLineHeight: Integer; -begin - Result := Formatter.FooterLineHeight; -end; - -function TdxGridTableViewFootersProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetFooterItemBounds(Index); -end; - -function TdxGridTableViewFootersProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetFooterItemClass(Index); -end; - -{ TdxGridTableViewCustomDataRowProducer } - -function TdxGridTableViewCustomDataRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AGridRowIndex: Integer): TdxReportCell; -begin - FGridRow := AGridRow; - FGridRowIndex := AGridRowIndex; - Result := inherited Produce(AHostInfo); - FGridRowIndex := -1; - FGridRow := nil; -end; - -function TdxGridTableViewCustomDataRowProducer.GridRow: TcxCustomGridRow; -begin - Result := FGridRow; -end; - -procedure TdxGridTableViewCustomDataRowProducer.AddIndents(AParent: TdxReportCell); -var - I: Integer; - Indent: TdxReportCellExpandButton; -begin - inherited; - for I := 0 to IndentCount - 1 do - begin - Indent := CreateIndent(I, AParent); - Indent.BoundsRect := IndentBounds[I]; - InitializeIndent(Indent, I); - end; -end; - -function TdxGridTableViewCustomDataRowProducer.CreateIndent(AnIndex: Integer; - AParent: TdxReportCell): TdxReportCellExpandButton; -begin - Result := Formatter.CreateIndent(AParent); - FIndents[AnIndex] := Result; -end; - -procedure TdxGridTableViewCustomDataRowProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin -end; - -function TdxGridTableViewCustomDataRowProducer.GetIndentCount: Integer; -begin - Result := GridRow.Level; -end; - -function TdxGridTableViewCustomDataRowProducer.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridTableViewCustomDataRowProducer.GetLineHeight: Integer; -begin - Result := DefaultDataRowLineHeight; -end; - -function TdxGridTableViewCustomDataRowProducer.GetIndentArea: Integer; -begin - Result := IndentCount * IndentWidth; -end; - -function TdxGridTableViewCustomDataRowProducer.GetIndentBounds(Index: Integer): TRect; -begin - Result := MakeBounds(IndentWidth * Index, 0, IndentWidth, RowHeight); -end; - -{ TdxCustomGridTableViewRowSeparatorProducer } - -function TdxCustomGridTableViewRowSeparatorProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow): TdxReportCell; -begin - Result := inherited Produce(AHostInfo, AGridRow, -1); -end; - -procedure TdxCustomGridTableViewRowSeparatorProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeRowSeparatorIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -function TdxCustomGridTableViewRowSeparatorProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxCustomGridTableViewRowSeparatorProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := MakeRect(IndentArea, 0, RowWidth, RowHeight); -end; - -function TdxCustomGridTableViewRowSeparatorProducer.GetSubItemCount: Integer; -begin - Result := 1; -end; - -{ TdxGridTableViewRowSeparatorProducer } - -function TdxGridTableViewRowSeparatorProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AnIsLast: Boolean): TdxReportCell; -begin - FIsLast := AnIsLast; - Result := inherited Produce(AHostInfo, AGridRow); -end; - -procedure TdxGridTableViewRowSeparatorProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeSeparatorRow(Row); -end; - -procedure TdxGridTableViewRowSeparatorProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - Formatter.DoInitializeRowSeparator(ASubItem); -end; - -function TdxGridTableViewRowSeparatorProducer.GetIndentCount: Integer; -begin - if not IsLast then - begin - Result := inherited GetIndentCount; - if (Result <> 0) and Adapter.IsOffice11StyleGrouping and not (GridRow is TcxGridGroupRow) then {.2} - Dec(Result); - end - else - Result := 0; -end; - -function TdxGridTableViewRowSeparatorProducer.GetLineHeight: Integer; -begin - Result := Formatter.RowSeparatorThickness; -end; - -function TdxGridTableViewRowSeparatorProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetRowSeparatorClass; -end; - -{ TdxGridTableViewGroupRowSeparatorProducer } - -procedure TdxGridTableViewGroupRowSeparatorProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeGroupSeparatorRow(Row); -end; - -procedure TdxGridTableViewGroupRowSeparatorProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupRowSeparator(ASubItem); -end; - -function TdxGridTableViewGroupRowSeparatorProducer.GetLineHeight: Integer; -begin - Result := Formatter.GroupRowSeparatorThickness; -end; - -function TdxGridTableViewGroupRowSeparatorProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetGroupRowSeparatorClass; -end; - -{ TdxGridTableViewDataRowProducer } - -function TdxGridTableViewDataRowProducer.GridRow: TcxGridDataRow; -begin - Result := inherited GridRow as TcxGridDataRow; -end; - -procedure TdxGridTableViewDataRowProducer.AddPreview(AParent: TdxReportCell); -begin - FPreviewItem := CreatePreview(Row); - - PreviewItem.Left := IndentArea; - // We have to set Width before because we use that value for PreviewHeight calculation - PreviewItem.Width := Width - IndentArea; - Formatter.DoInitializePreview(TAbstractdxReportCellData(PreviewItem), PreviewColumn, GridRow); - PreviewItem.Height := PreviewHeight; - PreviewItem.AdjustContent(Formatter.DC); {3.1} -end; - -procedure TdxGridTableViewDataRowProducer.AddSubItems(AParent: TdxReportCell); -begin - inherited; - if HasPreview then AddPreview(AParent); -end; - -procedure TdxGridTableViewDataRowProducer.CalculateRowAutoHeight; -begin - if CellAutoHeight then inherited; - if PreviewItem <> nil then - RowHeight := RowHeight + PreviewItem.Height; -end; - -function TdxGridTableViewDataRowProducer.CreatePreview(AParent: TdxReportCell): TdxReportVisualItem; -begin - Result := GetPreviewClass.Create(AParent); - FPreviewItem := Result; -end; - -function TdxGridTableViewDataRowProducer.DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; -var - TableItem: TcxCustomGridTableItem; - Properties: TcxCustomEditProperties; -begin - Result := AnItem <> FPreviewItem; - // 3.2 - if Result and not IsItemIndent(AnItem) then - begin - TableItem := TcxCustomGridTableItem(AnItem.Data); - Properties := Adapter.GetProperties(TableItem, GridRow); - Result := dxPScxCommon.dxPSDataMaps.DoesItemParticipateInAutoHeightCalculation(Properties); - end; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewClass: TdxReportCellDataClass; -begin - Result := Formatter.GetPreviewClass(PreviewColumn, GridRow); -end; - -procedure TdxGridTableViewDataRowProducer.FixupRowDataHeight; -var - NewHeight, I: Integer; - Item: TdxReportVisualItem; -begin - NewHeight := RowHeight; - if PreviewItem <> nil then - Dec(NewHeight, PreviewItem.Height); - - for I := 0 to Row.DataItemCount - 1 do - begin - Item := Row.DataItems[I]; - if Item = PreviewItem then - if PreviewPlace = cxGridTableView.ppTop then - Item.Top := 0 - else - Item.Top := NewHeight - else - if IsItemIndent(Item) then - begin - Item.Top := 0; - Item.Height := RowHeight; - end - else - begin - if CellAutoHeight then - Item.Height := NewHeight; - if HasPreview and (PreviewPlace = cxGridTableView.ppTop) then - Item.Top := Item.Top + PreviewItem.Height; - end; - end; - {3.1} - for I := 0 to Row.CellCount - 1 do - begin - Item := Row.Cells[I]; - if Item = PreviewItem then - if PreviewPlace = cxGridTableView.ppTop then - Item.Top := 0 - else - Item.Top := NewHeight - else - begin - if CellAutoHeight then - Item.Height := NewHeight; - if HasPreview and (PreviewPlace = cxGridTableView.ppTop) then - Item.Top := Item.Top + PreviewItem.Height; - end; - end; -end; - -procedure TdxGridTableViewDataRowProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeDataRowIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewDataRowProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeDataRow(Row, GridRow); -end; - -procedure TdxGridTableViewDataRowProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeItem(ASubItem, Columns[AIndex], GridRow, False); - Formatter.DoReportLinkInitializeItem(ASubItem, Columns[AIndex], GridRow); -end; - -function TdxGridTableViewDataRowProducer.GetAutoHeight: Boolean; -begin - Result := CellAutoHeight or HasPreview; -end; - -function TdxGridTableViewDataRowProducer.GetCellAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.CellAutoHeight; -end; - -function TdxGridTableViewDataRowProducer.GetHasPreview: Boolean; -begin - Result := Formatter.HasPreview; -end; - -function TdxGridTableViewDataRowProducer.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount; - if (Result <> 0) and Adapter.IsOffice11StyleGrouping then {.2} - Dec(Result); -end; - -function TdxGridTableViewDataRowProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TdxGridTableViewDataRowProducer.GetLineHeight: Integer; -begin - if Formatter.HeaderLineCount = 1 then - Result := Formatter.RowHeights[GridRowIndex] - else - Result := Formatter.DetailsLineHeight; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewHeight: Integer; -begin - Result := PreviewLineCount * PreviewLineHeight; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewLineCount: Integer; -begin - if FPreviewItem <> nil then - if not Formatter.PreviewAutoHeight then - begin - Result := PreviewItem.CalculateLineCount(Formatter.DC); - if Result <> Formatter.PreviewMaxLineCount then - Result := Formatter.PreviewMaxLineCount; - end - else - Result := 1 - else - Result := 0; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewLineHeight: Integer; -var - LineHeight: Integer; -begin - if FPreviewItem <> nil then - if Formatter.PreviewAutoHeight then - begin - Result := PreviewItem.MeasureContentHeight(Formatter.DC); - if Formatter.PreviewMaxLineCount <> 0 then - begin - LineHeight := PreviewItem.MeasureFontHeight(Formatter.DC); - if Result > LineHeight * Formatter.PreviewMaxLineCount then - Result := LineHeight * Formatter.PreviewMaxLineCount; - end; - end - else - Result := PreviewItem.MeasureFontHeight(Formatter.DC) - else - Result := 0; -end; - -function TdxGridTableViewDataRowProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetItemBounds(GridRow, GridRowIndex, Index); -end; - -function TdxGridTableViewDataRowProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetItemClass(Columns[Index], GridRow, False); -end; - -function TdxGridTableViewDataRowProducer.GetPreviewColumn: TcxGridColumn; -begin - Result := Adapter.PreviewColumn; -end; - -function TdxGridTableViewDataRowProducer.GetPreviewPlace: TcxGridPreviewPlace; -begin - Result := Adapter.PreviewPlace; -end; - -{ TdxGridTableViewGroupRowProducer} - -procedure TdxGridTableViewGroupRowProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeGroupRow(Row, GridRow); -end; - -function TdxGridTableViewGroupRowProducer.GridRow: TcxGridGroupRow; -begin - Result := inherited GridRow as TcxGridGroupRow; -end; - -procedure TdxGridTableViewGroupRowProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupRowIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewGroupRowProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupRowItem(ASubItem, GridRow); -end; - -function TdxGridTableViewGroupRowProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewGroupRowProducer.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount + 1; -end; - -function TdxGridTableViewGroupRowProducer.GetLineCount: Integer; -begin - Result := 1; -end; - -function TdxGridTableViewGroupRowProducer.GetLineHeight: Integer; -begin - Result := Formatter.RowHeights[GridRowIndex];//}Formatter.GroupRowLineHeight; {3.1} -end; - -function TdxGridTableViewGroupRowProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := MakeRect(IndentArea, 0, RowWidth, LineHeight); -end; - -function TdxGridTableViewGroupRowProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetGroupRowClass; -end; - -function TdxGridTableViewGroupRowProducer.GetSubItemCount: Integer; -begin - Result := 1; -end; - -{ TdxGridTableViewMasterRowProducer } - -function TdxGridTableViewMasterRowProducer.GridRow: TcxGridMasterDataRow; -begin - Result := inherited GridRow as TcxGridMasterDataRow; -end; - -procedure TdxGridTableViewMasterRowProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - //inherited; - Formatter.DoInitializeMasterDataRowIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewMasterRowProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - if AIndex = 0 then - ASubItem.CellSides := ASubItem.CellSides - [csLeft]; -end; - -function TdxGridTableViewMasterRowProducer.GetIndentCount: Integer; -begin - Result := inherited GetIndentCount + 1; -end; - -{ TdxGridTableViewGroupFooterProducer } - -function TdxGridTableViewGroupFooterProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - AGridRow: TcxCustomGridRow; AGroupLevel, AnIndex: Integer): TdxReportCell; -begin - FGroupLevel := AGroupLevel; - FIndex := AnIndex; - Result := inherited Produce(AHostInfo, AGridRow, -1); - FGroupLevel := -1; -end; - -procedure TdxGridTableViewGroupFooterProducer.AddSubItems(AParent: TdxReportCell); - - function SubstituteParent(AParent: TdxReportCell): TdxReportCell; - begin - Result := TdxReportCell.Create(AParent); - Result.BoundsRect := HostBounds; - Formatter.DoInitializeGroupFooterHost(Result, GridRow, GroupLevel); - end; - -begin - FItemsSite := SubstituteParent(AParent); - inherited AddSubItems(ItemsSite); -end; - -procedure TdxGridTableViewGroupFooterProducer.CalculateRowAutoHeight; -begin - inherited; - Inc(FRowHeight, FooterItemInflateVert); -end; - -procedure TdxGridTableViewGroupFooterProducer.FixupRowDataItemHeight(AnItem: TdxReportVisualItem); -begin - with AnItem do - Height := Parent.Height - 2 * FooterItemInflateVert; -end; - -procedure TdxGridTableViewGroupFooterProducer.InitializeIndent(AIndent: TdxReportCellExpandButton; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupFooterIndent(AIndent, AIndex, IndentCount, GridRow); -end; - -procedure TdxGridTableViewGroupFooterProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeGroupFooterRow(Row, GridRow, GroupLevel); -end; - -procedure TdxGridTableViewGroupFooterProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeGroupFooterItem(ASubItem, AIndex, GridRow, GroupLevel); - Formatter.DoReportLinkInitializeGroupFooterItem(ASubItem, AIndex, GridRow, GroupLevel); -end; - -function TdxGridTableViewGroupFooterProducer.GetAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.GroupFootersMultiline and - ((ItemsSite.DataItemCount <> 0) or (ItemsSite.CellCount <> 0)); -end; - -function TdxGridTableViewGroupFooterProducer.GetHasSubItem(Index: Integer): Boolean; -begin - Result := Adapter.HasGroupFooterItem(GroupLevel, Index); -end; - -function TdxGridTableViewGroupFooterProducer.GetIndentCount: Integer; -begin - Result := GroupLevel; - if Adapter.GroupFootersMode = gfVisibleWhenExpanded then - begin - Inc(Result); - if Adapter.IsOffice11StyleGrouping and (Index = 0) and not (GridRow is TcxGridGroupRow) then - Dec(Result); - end -end; - -function TdxGridTableViewGroupFooterProducer.GetItemsSite: TdxReportCell; -begin - Result := FItemsSite; -end; - -function TdxGridTableViewGroupFooterProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TdxGridTableViewGroupFooterProducer.GetLineHeight: Integer; -begin - Result := Formatter.GroupFooterLineHeight; -end; - -function TdxGridTableViewGroupFooterProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetGroupFooterItemBounds(Index, IndentCount); -end; - -function TdxGridTableViewGroupFooterProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetGroupFooterItemClass(Index); -end; - -function TdxGridTableViewGroupFooterProducer.GetGroupLevel: Integer; -begin - Result := FGroupLevel; - if Adapter.GroupFootersMode = gfVisibleWhenExpanded then - Dec(Result); -end; - -function TdxGridTableViewGroupFooterProducer.GetHostBounds: TRect; -begin - Result := MakeRect(IndentArea, 0, Row.Width, Row.Height); -end; - -{ TdxGridTableViewBandsProducer } - -function TdxGridTableViewBandsProducer.Adapter: TdxGridBandedTableViewAdapter; -begin - Result := inherited Adapter as TdxGridBandedTableViewAdapter; -end; - -function TdxGridTableViewBandsProducer.Builder: TdxGridBandedTableViewBuilder; -begin - Result := inherited Builder as TdxGridBandedTableViewBuilder; -end; - -function TdxGridTableViewBandsProducer.Formatter: TdxGridBandedTableViewFormatter; -begin - Result := inherited Formatter as TdxGridBandedTableViewFormatter; -end; - -function TdxGridTableViewBandsProducer.GetSubItemCount: Integer; -begin - Result := Formatter.BandCount; -end; - -procedure TdxGridTableViewBandsProducer.CalculateRowHeight; -begin - FRowHeight := Formatter.ItemPlaceController.Height; -end; - -procedure TdxGridTableViewBandsProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeBandRow(Row); -end; - -procedure TdxGridTableViewBandsProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - inherited; - Formatter.DoInitializeBandItem(ASubItem, AIndex); - Formatter.DoReportLinkInitializeBandItem(ASubItem, AIndex); -end; - -function TdxGridTableViewBandsProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TdxGridTableViewBandsProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetBandItemBounds(Index); -end; - -function TdxGridTableViewBandsProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetBandItemClass(Index); -end; - -{ TdxGridCardViewCardsRowProducer } - -function TdxGridCardViewCardsRowProducer.Adapter: TdxGridCardViewAdapter; -begin - Result := inherited Adapter as TdxGridCardViewAdapter; -end; - -function TdxGridCardViewCardsRowProducer.Builder: TdxGridCardViewBuilder; -begin - Result := inherited Builder as TdxGridCardViewBuilder; -end; - -function TdxGridCardViewCardsRowProducer.Formatter: TdxGridCardViewFormatter; -begin - Result := inherited Formatter as TdxGridCardViewFormatter; -end; - -function TdxGridCardViewCardsRowProducer.CreateCard(AParent: TdxReportCell; - AGridCard: TcxGridCard): TdxReportCard; -begin - Result := Formatter.GetCardClass(AGridCard).CreateEx(AParent, AGridCard); - Formatter.DoInitializeCard(Result, AGridCard); -end; - -procedure TdxGridCardViewCardsRowProducer.InjectCard(ACard: TdxReportCard; - AIndex: Integer); -begin - ACard.Parent := Row; - ACard.Left := Formatter.InterCardsSpaceHorz div 2 + - AIndex * (Builder.MaxCardWidth + Formatter.InterCardsSpaceHorz); - ACard.Top := Formatter.InterCardsSpaceVert div 2; -end; - -function TdxGridCardViewCardsRowProducer.Produce(AHostInfo: TdxGridAttributeHostInfo; - ARowHeight: Integer): TdxReportCell; -begin - FRowHeight := ARowHeight; - Result := inherited Produce(AHostInfo); -end; - -procedure TdxGridCardViewCardsRowProducer.CalculateRowHeight; -begin -end; - -function TdxGridCardViewCardsRowProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -procedure TdxGridCardViewCardsRowProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeCardsRow(Row); -end; - -{$IFDEF CHARTVIEW} -{ TdxGridViewChartRowProducer } - -function TdxGridChartViewChartProducer.Produce(AHostInfo: TdxGridAttributeHostInfo): TdxReportCell; -begin - try - Result := inherited Produce(AHostInfo); - finally - FreeAndNil(FChartImage); - end; -end; - -function TdxGridChartViewChartProducer.Formatter: TdxGridChartViewFormatter; -begin - Result := inherited Formatter as TdxGridChartViewFormatter; -end; - -procedure TdxGridChartViewChartProducer.CalculateRowHeight; -begin - if ChartImage <> nil then - RowHeight := ChartImage.Height - else - inherited; -end; - -procedure TdxGridChartViewChartProducer.InitializeItem; -begin - inherited; - Item.Image := ChartImage; - - Formatter.DoInitializeChartItem(Item); - Formatter.DoReportLinkInitializeChartItem(Item); -end; - -function TdxGridChartViewChartProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetChartItemClass; -end; - -function TdxGridChartViewChartProducer.GetChartImage: TGraphic; -begin - if FChartImage = nil then - FChartImage := Formatter.CreateChartImage; - Result := FChartImage; -end; - -function TdxGridChartViewChartProducer.GetItem: TdxReportCellGraphic; -begin - Result := inherited Item as TdxReportCellGraphic; -end; - -{$ENDIF} - -{ TdxGridReportLinkOptions } - -function TdxGridReportLinkOptions.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsCardsShadow } - -constructor TdxGridReportLinkCardsShadow.Create(AnOptionsCards: TdxGridReportLinkOptionsCards); -begin - inherited Create; - RestoreDefaults; - FOptionsCards := AnOptionsCards; -end; - -procedure TdxGridReportLinkCardsShadow.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkCardsShadow then - with TdxGridReportLinkCardsShadow(Source) do - begin - Self.Color := Color; - Self.Depth := Depth; - Self.Position := Position; - end - else - inherited; -end; - -procedure TdxGridReportLinkCardsShadow.RestoreDefaults; -begin - inherited; - Color := clDefault; - Depth := dxDefaultCardsShadowDepth; - Position := cspBottomRight; -end; - -procedure TdxGridReportLinkCardsShadow.Changed; -begin - if OptionsCards <> nil then OptionsCards.Changed; -end; - -function TdxGridReportLinkCardsShadow.GetActualColor: TColor; -begin - Result := Color; - if Result = clDefault then - Result := dxDefaultCardsShadowColor; -end; - -function TdxGridReportLinkCardsShadow.GetVisible: Boolean; -begin - Result := Depth <> 0; -end; - -procedure TdxGridReportLinkCardsShadow.SetColor(Value: TColor); -begin - if FColor <> Value then - begin - FColor := Value; - if Visible then Changed; - end; -end; - -procedure TdxGridReportLinkCardsShadow.SetDepth(Value: TdxGridCardShadowDepth); -begin - if FDepth <> Value then - begin - FDepth := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkCardsShadow.SetPosition(Value: TdxGridCardShadowPosition); -begin - if FPosition <> Value then - begin - FPosition := Value; - if Visible then Changed; - end; -end; - -{ TdxGridReportLinkOptionsCards } - -destructor TdxGridReportLinkOptionsCards.Destroy; -begin - FreeAndNil(FShadow); - inherited; -end; - -procedure TdxGridReportLinkOptionsCards.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsCards then - with TdxGridReportLinkOptionsCards(Source) do - begin - Self.AutoWidth := AutoWidth; - Self.Borders := Borders; - Self.InterCardsSpaceHorz := InterCardsSpaceHorz; - Self.InterCardsSpaceVert := InterCardsSpaceVert; - Self.KeepSameHeight := KeepSameHeight; - Self.KeepSameWidth := KeepSameWidth; - Self.RowBordersHorz := RowBordersHorz; - Self.RowBordersVert := RowBordersVert; - Self.Shadow := Shadow; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsCards.RestoreDefaults; -begin - inherited; - AutoWidth := False; - Borders := True; - InterCardsSpaceHorz := dxDefaultInterCardsSpaceHorz; - InterCardsSpaceVert := dxDefaultInterCardsSpaceVert; - KeepSameHeight := True; - KeepSameWidth := True; - RowBordersHorz := False; - RowBordersVert := False; - Shadow.RestoreDefaults; -end; - -function TdxGridReportLinkOptionsCards.DesignerTabIndex: Integer; -begin - Result := 5; -end; - -function TdxGridReportLinkOptionsCards.GetShadowClass: TdxGridReportLinkCardsShadowClass; -begin - Result := TdxGridReportLinkCardsShadow; -end; - -function TdxGridReportLinkOptionsCards.GetShadow: TdxGridReportLinkCardsShadow; -begin - if FShadow = nil then - FShadow := GetShadowClass.Create(Self); - Result := FShadow; -end; - -procedure TdxGridReportLinkOptionsCards.SetAutoWidth(Value: Boolean); -begin - if FAutoWidth <> Value then - begin - FAutoWidth := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetBorders(Value: Boolean); -begin - if FBorders <> Value then - begin - FBorders := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetInterCardsSpaceHorz(Value: Integer); -begin - if Value < 0 then Value := 0; - if FInterCardsSpaceHorz <> Value then - begin - FInterCardsSpaceHorz := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetInterCardsSpaceVert(Value: Integer); -begin - if Value < 0 then Value := 0; - if FInterCardsSpaceVert <> Value then - begin - FInterCardsSpaceVert := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetKeepSameHeight(Value: Boolean); -begin - if FKeepSameHeight <> Value then - begin - FKeepSameHeight := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetKeepSameWidth(Value: Boolean); -begin - if FKeepSameWidth <> Value then - begin - FKeepSameWidth := Value; - if AutoWidth then Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetRowBordersHorz(Value: Boolean); -begin - if FRowBordersHorz <> Value then - begin - FRowBordersHorz := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetRowBordersVert(Value: Boolean); -begin - if FRowBordersVert <> Value then - begin - FRowBordersVert := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsCards.SetShadow(Value: TdxGridReportLinkCardsShadow); -begin - Shadow.Assign(Value); -end; - -{ TdxGridReportLinkOptionsPagination } - -procedure TdxGridReportLinkOptionsPagination.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsPagination then - with TdxGridReportLinkOptionsPagination(Source) do - begin - Self.OneGroupPerPage := OneGroupPerPage; - Self.TopLevelGroup := TopLevelGroup; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsPagination.RestoreDefaults; -begin - inherited; - OneGroupPerPage := False; - TopLevelGroup := False; -end; - -function TdxGridReportLinkOptionsPagination.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TdxGridReportLinkOptionsPagination.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsPagination.SetOneGroupPerPage(Value: Boolean); -begin - if FOneGroupPerPage <> Value then - begin - FOneGroupPerPage := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsPagination.SetTopLevelGroup(Value: Boolean); -begin - if FTopLevelGroup <> Value then - begin - FTopLevelGroup := Value; - Changed; - end; -end; - -{$IFDEF CHARTVIEW} -{ TdxGridReportLinkOptionsCharts } - -procedure TdxGridReportLinkOptionsCharts.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsCharts then - with TdxGridReportLinkOptionsCharts(Source) do - begin - Self.GraphicClass := GraphicClass; - Self.Transparent := Transparent; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsCharts.RestoreDefaults; -begin - inherited; - FIsGraphicClassAssigned := False; - Transparent := False; -end; - -function TdxGridReportLinkOptionsCharts.DefaultGraphicClass: TGraphicClass; -begin - Result := TBitmap; -end; - -function TdxGridReportLinkOptionsCharts.SupportsGraphicClass(AGraphicClass: TGraphicClass): Boolean; -begin - Result := (AGraphicClass <> nil) and not AGraphicClass.InheritsFrom(TIcon); -end; - -function TdxGridReportLinkOptionsCharts.DesignerTabIndex: Integer; -begin - Result := 6; -end; - -function TdxGridReportLinkOptionsCharts.GetGraphicClass: TGraphicClass; -begin - if FIsGraphicClassAssigned then - Result := FGraphicClass - else - Result := DefaultGraphicClass; -end; - -function TdxGridReportLinkOptionsCharts.GetGraphicClassName: string; -begin - Result := GraphicClass.ClassName; -end; - -function TdxGridReportLinkOptionsCharts.IsGraphicClassNameStored: Boolean; -begin - Result := FIsGraphicClassAssigned; -end; - -procedure TdxGridReportLinkOptionsCharts.SetGraphicClass(Value: TGraphicClass); -begin - if Value = nil then - Value := DefaultGraphicClass; - if (GraphicClass <> Value) and SupportsGraphicClass(Value) then - begin - FGraphicClass := Value; - FIsGraphicClassAssigned := Value <> DefaultGraphicClass; - end; -end; - -procedure TdxGridReportLinkOptionsCharts.SetGraphicClassName(const Value: string); -var - AClass: TClass; -begin - AClass := Classes.GetClass(Value); - if (AClass <> nil) and AClass.InheritsFrom(TGraphic) then - GraphicClass := TGraphicClass(AClass) - else - GraphicClass := nil; -end; - -procedure TdxGridReportLinkOptionsCharts.SetTransparent(Value: Boolean); -begin - if FTransparent <> Value then - begin - FTransparent := Value; - Changed; - end; -end; - -{$ENDIF} - -{ TdxGridReportLinkOptionsDetails } - -procedure TdxGridReportLinkOptionsDetails.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsDetails then - with TdxGridReportLinkOptionsDetails(Source) do - begin - Self.OnlyFocusedView := OnlyFocusedView; - Self.StartFromFocusedView := StartFromFocusedView; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsDetails.RestoreDefaults; -begin - inherited; - OnlyFocusedView := False; - StartFromFocusedView := False; -end; - -function TdxGridReportLinkOptionsDetails.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -procedure TdxGridReportLinkOptionsDetails.SetOnlyFocusedView(Value: Boolean); -begin - if FOnlyFocusedView <> Value then - begin - FOnlyFocusedView := Value; - if StartFromFocusedView then Changed; - end; -end; - -procedure TdxGridReportLinkOptionsDetails.SetStartFromFocusedView(Value: Boolean); -begin - if FStartFromFocusedView <> Value then - begin - FStartFromFocusedView := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsExpanding } - -procedure TdxGridReportLinkOptionsExpanding.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsExpanding then - with TdxGridReportLinkOptionsExpanding(Source) do - begin - {$IFDEF DXVER500} - Self.ExpandCards := ExpandCards; - {$ENDIF} - Self.ExpandGroupRows := ExpandGroupRows; - Self.ExpandMasterRows := ExpandMasterRows; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsExpanding.RestoreDefaults; -begin - inherited; - {$IFDEF DXVER500} - ExpandCards := False; - {$ENDIF} - ExpandGroupRows := False; - ExpandMasterRows := False; -end; - -function TdxGridReportLinkOptionsExpanding.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TdxGridReportLinkOptionsExpanding.GetHasAny: Boolean; -begin - Result := ExpandGroupRows or ExpandMasterRows {$IFDEF DXVER500} or ExpandCards {$ENDIF}; -end; - -function TdxGridReportLinkOptionsExpanding.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{$IFDEF DXVER500} -procedure TdxGridReportLinkOptionsExpanding.SetExpandCards(Value: Boolean); -begin - if FExpandCards <> Value then - begin - FExpandCards := Value; - Changed; - end; -end; -{$ENDIF} - -procedure TdxGridReportLinkOptionsExpanding.SetExpandGroupRows(Value: Boolean); -begin - if FExpandGroupRows <> Value then - begin - FExpandGroupRows := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsExpanding.SetExpandMasterRows(Value: Boolean); -begin - if FExpandMasterRows <> Value then - begin - FExpandMasterRows := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsFormatting } - -procedure TdxGridReportLinkOptionsFormatting.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsFormatting then - with TdxGridReportLinkOptionsFormatting(Source) do - begin - Self.ConsumeSelectionStyle := ConsumeSelectionStyle; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsFormatting.RestoreDefaults; -begin - inherited; - ConsumeSelectionStyle := False; -end; - -function TdxGridReportLinkOptionsFormatting.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TdxGridReportLinkOptionsFormatting.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsFormatting.SetConsumeSelectionStyle(Value: Boolean); -begin - if FConsumeSelectionStyle <> Value then - begin - FConsumeSelectionStyle := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsLevels } - -procedure TdxGridReportLinkOptionsLevels.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsLevels then - with TdxGridReportLinkOptionsLevels(Source) do - begin - Self.RiseActiveLevelOntoTop := RiseActiveLevelOntoTop; - Self.Unwrap := Unwrap; - Self.UnwrapTopLevel := UnwrapTopLevel; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsLevels.RestoreDefaults; -begin - inherited; - RiseActiveLevelOntoTop := True; - Unwrap := False; - UnwrapTopLevel := True; -end; - -function TdxGridReportLinkOptionsLevels.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -procedure TdxGridReportLinkOptionsLevels.SetRiseActiveLevelOntoTop(Value: Boolean); -begin - if FRiseActiveLevelOntoTop <> Value then - begin - FRiseActiveLevelOntoTop := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsLevels.SetUnwrap(Value: Boolean); -begin - if FUnwrap <> Value then - begin - FUnwrap := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsLevels.SetUnwrapTopLevel(Value: Boolean); -begin - if FUnwrapTopLevel <> Value then - begin - FUnwrapTopLevel := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsOnEveryPage } - -procedure TdxGridReportLinkOptionsOnEveryPage.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsOnEveryPage then - with TdxGridReportLinkOptionsOnEveryPage(Source) do - begin - Self.Caption := Caption; - Self.FilterBar := FilterBar; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.RestoreDefaults; -begin - inherited; - Caption := True; - FilterBar := True; -end; - -function TdxGridReportLinkOptionsOnEveryPage.HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; -begin - if AnAttribute.InheritsFrom(TdxGridLevelCaption) then - Result := Caption - else - if AnAttribute.InheritsFrom(TdxGridBandHeader) then - Result := BandHeaders - else - if AnAttribute.InheritsFrom(TdxGridHeader) then - Result := Headers - else - if AnAttribute.InheritsFrom(TdxGridFooter) then - Result := Footers - else - if AnAttribute.InheritsFrom(TdxGridFilterBar) then - Result := FilterBar - else - Result := False; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.SetAll; -begin - BandHeaders := True; - Caption := True; - FilterBar := True; - Footers := True; - Headers := True; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.UnsetAll; -begin - BandHeaders := False; - Caption := False; - FilterBar := False; - Footers := False; - Headers := False; -end; - -function TdxGridReportLinkOptionsOnEveryPage.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TdxGridReportLinkOptionsOnEveryPage.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.SetCaption(Value: Boolean); -begin - if FCaption <> Value then - begin - FCaption := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsOnEveryPage.SetFilterBar(Value: Boolean); -begin - if FFilterBar <> Value then - begin - FFilterBar := Value; - Changed; - end; -end; - -{ TdxGridReportLinkOptionsPreview } - -function TdxGridReportLinkOptionsPreview.DesignerTabIndex: Integer; -begin - Result := 4; -end; - -function TdxGridReportLinkOptionsPreview.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsRefinements } - -function TdxGridReportLinkOptionsRefinements.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TdxGridReportLinkOptionsRefinements.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsSelection } - -function TdxGridReportLinkOptionsSelection.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TdxGridReportLinkOptionsSelection.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsSize } - -function TdxGridReportLinkOptionsSize.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TdxGridReportLinkOptionsSize.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkOptionsView } - -procedure TdxGridReportLinkOptionsView.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLinkOptionsView then - with TdxGridReportLinkOptionsView(Source) do - begin - Self.Caption := Caption; - Self.FilterBar := FilterBar; - Self.GroupFooters := GroupFooters; - end; - inherited; -end; - -procedure TdxGridReportLinkOptionsView.RestoreDefaults; -begin - inherited; - Caption := True; - FilterBar := True; - GroupFooters := True; -end; - -function TdxGridReportLinkOptionsView.HasInstalledAttribute(AnAttribute: TdxGridAttributeClass): Boolean; -begin - if AnAttribute.InheritsFrom(TdxGridLevelCaption) then - Result := Caption - else - if AnAttribute.InheritsFrom(TdxGridBandHeader) then - Result := BandHeaders - else - if AnAttribute.InheritsFrom(TdxGridHeader) then - Result := Headers - else - if AnAttribute.InheritsFrom(TdxGridFooter) then - Result := Footers - else - if AnAttribute.InheritsFrom(TdxGridFilterBar) then - Result := FilterBar - else - Result := False; -end; - -procedure TdxGridReportLinkOptionsView.SetAll; -begin - BandHeaders := True; - Caption := True; - FilterBar := True; - Footers := True; - GroupFooters := True; - Headers := True; - ExpandButtons := True; -end; - -procedure TdxGridReportLinkOptionsView.UnsetAll; -begin - BandHeaders := False; - Caption := False; - FilterBar := False; - Footers := False; - GroupFooters := False; - Headers := False; - ExpandButtons := False; -end; - -function TdxGridReportLinkOptionsView.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TdxGridReportLinkOptionsView.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxGridReportLinkOptionsView.SetCaption(Value: Boolean); -begin - if FCaption <> Value then - begin - FCaption := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsView.SetFilterBar(Value: Boolean); -begin - if FFilterBar <> Value then - begin - FFilterBar := Value; - Changed; - end; -end; - -procedure TdxGridReportLinkOptionsView.SetGroupFooters(Value: Boolean); -begin - if FGroupFooters <> Value then - begin - FGroupFooters := Value; - Changed; - end; -end; - -{ TdxGridAttributeHostInfo } - -procedure TdxGridAttributeHostInfo.Initialize(AParent: TdxReportCell); -begin - Origin := NullPoint; - FParent := AParent; -end; - -{ TdxGridAttributeHostInfoServices } - -constructor TdxGridAttributeHostInfoServices.Create(AReportLink: TdxGridReportLink); -begin - inherited Create; - FReportLink := AReportLink; - CreateHostInfos; -end; - -destructor TdxGridAttributeHostInfoServices.Destroy; -begin - DestroyHostInfos; - inherited; -end; - -procedure TdxGridAttributeHostInfoServices.Initialize; -begin - PageDetailsHostInfo.Initialize(PageDetails); - PageFootersHostInfo.Initialize(PageFooters); - PageHeadersHostInfo.Initialize(PageHeaders); -end; - -procedure TdxGridAttributeHostInfoServices.CreateHostInfos; -begin - FPageDetailsHostInfo := TdxGridAttributeHostInfo.Create; - FPageFootersHostInfo := TdxGridAttributeHostInfo.Create; - FPageHeadersHostInfo := TdxGridAttributeHostInfo.Create; -end; - -procedure TdxGridAttributeHostInfoServices.DestroyHostInfos; -begin - FreeAndNil(FPageHeadersHostInfo); - FreeAndNil(FPageFootersHostInfo); - FreeAndNil(FPageDetailsHostInfo); -end; - -function TdxGridAttributeHostInfoServices.GetBandHeadersHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseBandHeadersOnEveyPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetCaptionHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseCaptionOnEveryPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetFilterBarHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseFilterBarOnEveryPage then - if ActiveViewHelper.IsFilterBarAtTop(ActiveView) then - Result := PageHeadersHostInfo - else - Result := PageFootersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetFootersHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseFootersOnEveryPage then - Result := PageFootersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetHeadersHostInfo: TdxGridAttributeHostInfo; -begin - if CanUseHeadersOnEveryPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetInconsistentStateText: string; -begin - if ReportLink.IsAggregated then - Result := cxGetResourceString(@sdxCannotUseOnEveryPageModeInAggregatedState) - else - if ReportLink.ProcessParams.HasMasterDetails then - Result := cxGetResourceString(@sdxCannotUseOnEveryPageMode) - else - if IsInconsistentFilterBarState then - Result := cxGetResourceString(@sdxIncorrectFilterBarState) - else - if IsInconsistentBandHeadersState then - if ActiveViewHelper.IsFilterBarAtTop(ActiveView) then - Result := cxGetResourceString(@sdxIncorrectBandHeadersState2) - else - Result := cxGetResourceString(@sdxIncorrectBandHeadersState) - else - if IsInconsistentHeadersState then - if ActiveViewHelper.IsFilterBarAtTop(ActiveView) then - Result := cxGetResourceString(@sdxIncorrectHeadersState2) - else - Result := cxGetResourceString(@sdxIncorrectHeadersState) - else - if IsInconsistentFootersState then - Result := cxGetResourceString(@sdxIncorrectFootersState) - else - Result := ''; -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentState: Boolean; -begin - Result := ReportLink.IsAggregated or ReportLink.ProcessParams.HasMasterDetails or - IsInconsistentFilterBarState or IsInconsistentBandHeadersState or - IsInconsistentHeadersState or IsInconsistentFootersState; -end; - -function TdxGridAttributeHostInfoServices.HasCells: Boolean; -begin - Result := ReportLink.ReportCells <> nil; -end; - -function TdxGridAttributeHostInfoServices.IsAttributeSupported(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := ActiveViewHelper.IsAttributeSupported(AnAttribute) -end; - -function TdxGridAttributeHostInfoServices.GetActiveView: TcxCustomGridView; -begin - Result := ReportLink.ActiveView; -end; - -function TdxGridAttributeHostInfoServices.GetActiveViewHelper: TdxCustomGridViewHelperClass; -begin - Result := ReportLink.ActiveViewHelper; -// if ActiveView = nil then -// Result := TdxNullGridViewHelper -// else -// Result := dxViewHelpersFactory[ActiveView]; -end; - -function TdxGridAttributeHostInfoServices.GetArePageFootersAssigned: Boolean; -begin - with ReportLink.ReportCells do - Result := (FootersHostInfo.Parent = FooterCells) or (FilterBarHostInfo.Parent = FooterCells); -end; - -function TdxGridAttributeHostInfoServices.GetArePageHeadersAssigned: Boolean; -begin - with ReportLink.ReportCells do - Result := (CaptionHostInfo.Parent = HeaderCells) or (FilterBarHostInfo.Parent = HeaderCells) or - (BandHeadersHostInfo.Parent = HeaderCells) or (HeadersHostInfo.Parent = HeaderCells); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseBandHeadersOnEveyPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridBandHeader) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridLevelCaption) and - (ActiveViewHelper.IsFilterBarAtBottom(ActiveView) or ReportLink.IsAttributeUsedOnEveryPage(TdxGridFilterBar)); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseCaptionOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridLevelCaption); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseFilterBarOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridFilterBar) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridLevelCaption); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseFootersOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridFooter) and - (ActiveViewHelper.IsFilterBarAtTop(ActiveView) or ReportLink.IsAttributeUsedOnEveryPage(TdxGridFilterBar)); -end; - -function TdxGridAttributeHostInfoServices.GetCanUseHeadersOnEveryPage: Boolean; -begin - Result := ReportLink.CanAttributeBeUsedOnEveryPage(TdxGridHeader) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridLevelCaption) and - (ActiveViewHelper.IsFilterBarAtBottom(ActiveView) or ReportLink.IsAttributeUsedOnEveryPage(TdxGridFilterBar)) and - ReportLink.IsAttributeUsedOnEveryPage(TdxGridBandHeader); -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentBandHeadersState: Boolean; -begin - Result := IsAttributeSupported(TdxGridBandHeader) and OptionsOnEveryPage.BandHeaders and OptionsView.BandHeaders and - ((IsAttributeSupported(TdxGridLevelCaption) and OptionsView.Caption and not OptionsOnEveryPage.Caption) or - (IsAttributeSupported(TdxGridFilterBar) and ActiveViewHelper.IsFilterBarAtTop(ActiveView) and - OptionsView.FilterBar and not OptionsOnEveryPage.FilterBar)); -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentFilterBarState: Boolean; -begin - Result := ActiveViewHelper.IsFilterBarAtTop(ActiveView) and - (IsAttributeSupported(TdxGridFilterBar) and OptionsView.FilterBar and OptionsOnEveryPage.FilterBar and - IsAttributeSupported(TdxGridLevelCaption) and OptionsView.Caption and not OptionsOnEveryPage.Caption); -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentFootersState: Boolean; -begin - Result := IsAttributeSupported(TdxGridFooter) and OptionsView.Footers and OptionsOnEveryPage.Footers and - IsAttributeSupported(TdxGridFilterBar) and ActiveViewHelper.IsFilterBarAtBottom(ActiveView) and - OptionsView.FilterBar and not OptionsOnEveryPage.FilterBar; -end; - -function TdxGridAttributeHostInfoServices.GetIsInconsistentHeadersState: Boolean; -begin - Result := IsAttributeSupported(TdxGridHeader) and OptionsView.Headers and OptionsOnEveryPage.Headers and - ((IsAttributeSupported(TdxGridLevelCaption) and OptionsView.Caption and not OptionsOnEveryPage.Caption) or - (IsAttributeSupported(TdxGridFilterBar) and ActiveViewHelper.IsFilterBarAtTop(ActiveView) and - OptionsView.FilterBar and not OptionsOnEveryPage.FilterBar) or - (IsAttributeSupported(TdxGridBandHeader) and OptionsView.BandHeaders and not OptionsOnEveryPage.BandHeaders)); -end; - -function TdxGridAttributeHostInfoServices.GetLevelSeparatorBottomHostInfo: TdxGridAttributeHostInfo; -begin - if ArePageFootersAssigned then - Result := PageFootersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetLevelSeparatorTopHostInfo: TdxGridAttributeHostInfo; -begin - if ArePageHeadersAssigned then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TdxGridAttributeHostInfoServices.GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; -begin - Result := ReportLink.OptionsOnEveryPage; -end; - -function TdxGridAttributeHostInfoServices.GetOptionsView: TdxGridReportLinkOptionsView; -begin - Result := ReportLink.OptionsView; -end; - -function TdxGridAttributeHostInfoServices.GetPageDetails: TdxReportCell; -begin - if HasCells then - Result := ReportLink.ReportCells.Cells - else - Result := nil; -end; - -function TdxGridAttributeHostInfoServices.GetPageFooters: TdxReportCell; -begin - if HasCells and not ReportLink.ProcessParams.HasMasterDetails then - Result := ReportLink.ReportCells.FooterCells - else - Result := PageDetails; -end; - -function TdxGridAttributeHostInfoServices.GetPageHeaders: TdxReportCell; -begin - if HasCells and not ReportLink.ProcessParams.HasMasterDetails then - Result := ReportLink.ReportCells.HeaderCells - else - Result := PageDetails; -end; - -{ TdxGridReportLinkStyles } - -procedure TdxGridReportLinkStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxGridReportLinkStyles then - with TdxGridReportLinkStyles(Source) do - begin - Self.BandHeader := BandHeader; - Self.Caption := Caption; - Self.CardCaptionRow := CardCaptionRow; - Self.CardRowCaption := CardRowCaption; - Self.Content := Content; - Self.ContentEven := ContentEven; - Self.ContentOdd := ContentOdd; - Self.FilterBar := FilterBar; - Self.Footer := Footer; - Self.Group := Group; - Self.Header := Header; - Self.Preview := Preview; - Self.Selection := Selection; - end; // TODO: assign to TcxGridXXXStyles -end; - -procedure TdxGridReportLinkStyles.GetBandHeaderParams(ABand: TcxGridBand; - out AParams: TcxViewParams); -begin - GetViewParams(vspsGridBandHeader, ABand, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetCaptionParams(ATabLevel: TcxGridLevel; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridCaption, ATabLevel, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetCardCaptionRowParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -var - DataCellPos: TdxPSGridDataCellPos; -begin - DataCellPos := CreatePSDataCellPos; - try - with DataCellPos do - begin - GridRecord := ARecord; - Item := AItem; - end; - GetViewParams(vspsGridCardCaptionRow, DataCellPos, nil, AParams); - finally - FreePSDataCellPos(DataCellPos); - end; -end; - -procedure TdxGridReportLinkStyles.GetCardRowCaptionParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -var - DataCellPos: TdxPSGridDataCellPos; -begin - DataCellPos := CreatePSDataCellPos; - try - with DataCellPos do - begin - GridRecord := ARecord; - Item := AItem; - end; - GetViewParams(vspsGridCardRowCaption, DataCellPos, nil, AParams); - finally - FreePSDataCellPos(DataCellPos); - end; -end; - -procedure TdxGridReportLinkStyles.GetContentParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -const - StyleIndexes: array[Boolean] of Integer = (vspsGridContentEven, vspsGridContentOdd); -var - DataCellPos: TdxPSGridDataCellPos; -begin - if (ARecord <> nil) and (GetValue(StyleIndexes[Odd(ARecord.Index)]) <> nil) then - begin - DataCellPos := CreatePSDataCellPos; - try - with DataCellPos do - begin - GridRecord := ARecord; - Item := AItem; - end; - GetViewParams(StyleIndexes[Odd(ARecord.Index)], DataCellPos, nil, AParams); - finally - FreePSDataCellPos(DataCellPos); - end; - end - else - GetViewParams(vspsGridContent, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetFilterBarParams(out AParams: TcxViewParams); -begin - GetViewParams(vspsGridFilterBar, nil, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetFooterParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; AItem: TcxGridColumn; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridFooter, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetGroupParams(ARecord: TcxCustomGridRecord; - AGroupLevel: Integer; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridGroup, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetHeaderParams(AItem: TcxGridColumn; - out AParams: TcxViewParams); -begin - GetViewParams(vspsGridHeader, nil, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetPreviewParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -begin - GetViewParams(vspsGridPreview, ARecord, nil, AParams); -end; - -procedure TdxGridReportLinkStyles.GetSelectionParams(out AParams: TcxViewParams); -begin - GetViewParams(vspsGridSelection, nil, nil, AParams); -end; - -function TdxGridReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 3; -end; - -procedure TdxGridReportLinkStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -const - FixedParts = [vspsGridBandHeader, vspsGridCaption, vspsGridFooter, vspsGridHeader, - vspsGridSelection]; -begin - inherited; - if ReportLink <> nil then - with AParams do - begin - if Index in FixedParts then - Color := dxPSCore.dxDefaultFixedColor - else - if Index = vspsGridGroup then - if ReportLink.IsOffice11StyleGrouping and (AData = nil) then - Color := dxPSCore.dxDefaultFixedColor - else - Color := dxPSCore.dxDefaultContentColor - else - if Index = vspsGridFilterBar then - Color := DefaultFilterBarColor - else - Color := dxPSCore.dxDefaultContentColor; - - Font := ReportLink.Font; - - if Index = vspsGridFilterBar then - TextColor := DefaultFilterBarTextColor - else - TextColor := Font.Color; - end; -end; - -class function TdxGridReportLinkStyles.GetStyleCaption(AnIndex: Integer): string; -begin - case AnIndex of - vspsGridBandHeader: - Result := cxGetResourceString(@sdxBandHeaderStyle); - vspsGridCaption: - Result := cxGetResourceString(@sdxCaptionStyle); - vspsGridCardCaptionRow: - Result := cxGetResourceString(@sdxCardCaptionRowStyle); - vspsGridCardRowCaption: - Result := cxGetResourceString(@sdxCardRowCaptionStyle); - vspsGridContent: - Result := cxGetResourceString(@sdxContentStyle); - vspsGridContentEven: - Result := cxGetResourceString(@sdxContentEvenStyle); - vspsGridContentOdd: - Result := cxGetResourceString(@sdxContentOddStyle); - vspsGridFilterBar: - Result := cxGetResourceString(@sdxFilterBarStyle); - vspsGridFooter: - Result := cxGetResourceString(@sdxFooterStyle); - vspsGridGroup: - Result := cxGetResourceString(@sdxGroupStyle); - vspsGridHeader: - Result := cxGetResourceString(@sdxHeaderStyle); - vspsGridPreview: - Result := cxGetResourceString(@sdxPreviewStyle); - else - Result := cxGetResourceString(@sdxSelectionStyle); - end; -end; - -function TdxGridReportLinkStyles.GetStyleIndexByCaption(const Caption: string): Integer; -begin - for Result := vspsGridFirst to vspsGridLast do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Result)) then - Exit; - Result := -1; -end; - -function TdxGridReportLinkStyles.IsCardViewStyle(AStyle: TcxStyle): Boolean; -begin - Result := (AStyle <> nil) and ((AStyle = CardRowCaption) or (AStyle = CardCaptionRow)); -end; - -function TdxGridReportLinkStyles.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -{ TdxGridReportLinkStyleSheet } - -class function TdxGridReportLinkStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TdxGridReportLinkStyles; -end; - -function TdxGridReportLinkStyleSheet.GetStylesValue: TdxGridReportLinkStyles; -begin - if GetStyles is TdxGridReportLinkStyles then - Result := TdxGridReportLinkStyles(GetStyles) - else - Result := nil; -end; - -procedure TdxGridReportLinkStyleSheet.SetStylesValue(Value: TdxGridReportLinkStyles); -begin - SetStyles(Value); -end; - -{ TdxGridReportLink } - -constructor TdxGridReportLink.Create(AOwner: TComponent); -begin - inherited; - FDelimitersHardVert := TList.Create; - FHostInfoServices := TdxGridAttributeHostInfoServices.Create(Self); - FReportRows := TList.Create; - InternalRestoreDefaults; - LinkModified(False); -end; - -destructor TdxGridReportLink.Destroy; -begin - FreeAndNil(FReportRows); - FreeAndNil(FHostInfoServices); - FreeAndNil(FDelimitersHardVert); - inherited; -end; - -procedure TdxGridReportLink.Assign(Source: TPersistent); -begin - if Source is TdxGridReportLink then - with TdxGridReportLink(Source) do - begin - Self.OptionsCards := OptionsCards; -{$IFDEF CHARTVIEW} - Self.OptionsCharts := OptionsCharts; -{$ENDIF} - Self.OptionsDetails := OptionsDetails; - Self.OptionsLevels := OptionsLevels; - end; - inherited; -end; - -procedure TdxGridReportLink.AddPageBreak(AGridRecord: TcxCustomGridRecord); -var - ReportRow: TdxReportCell; -begin - ReportRow := ReportRowsByGridRecord[AGridRecord]; - if ReportRow <> nil then - AddVerticalHardDelimiter(ReportRow); -end; - -procedure TdxGridReportLink.AddPageBreak(const AGridRecords: array of TcxCustomGridRecord); -var - I: Integer; -begin - for I := Low(AGridRecords) to High(AGridRecords) do - AddPageBreak(AGridRecords[I]); -end; - -procedure TdxGridReportLink.AddPageBreak(const AGridRecords: TdxGridRecordArray); -var - I: Integer; -begin - for I := 0 to Length(AGridRecords) - 1 do - AddPageBreak(AGridRecords[I]); -end; - -procedure TdxGridReportLink.AddPageBreak(AGridRecords: TList); -var - I: Integer; - P: Pointer; -begin - for I := 0 to AGridRecords.Count - 1 do - begin - P := AGridRecords[I]; - if TObject(P) is TcxCustomGridRecord then - AddPageBreak(TcxCustomGridRecord(P)); - end; -end; - -procedure TdxGridReportLink.BeforeDesignReport; -begin - CalculateProcessParams; - inherited; -end; - -procedure TdxGridReportLink.ConstructReport(AReportCells: TdxReportCells); - - procedure CalculateSizes; - - procedure CalculateReportPartSizes(ACell: TdxReportCell); - var - Width, I, V: Integer; - begin - if ACell.CellCount > 0 then - begin - Width := 0; - for I := 0 to ACell.CellCount - 1 do - begin - V := ACell.Cells[I].Width; - if Width < V then Width := V; - end; - ACell.BoundsRect := MakeRect(0, 0, Width, ACell.LastCell.BoundsRect.Bottom); - end; - end; - - begin - with AReportCells do - begin - CalculateReportPartSizes(Cells); - if AreFooterCellsAllocated then CalculateReportPartSizes(FooterCells); - if AreHeaderCellsAllocated then CalculateReportPartSizes(HeaderCells); - end; - end; - -begin - if Grid = nil then Exit; - inherited; - if ActiveView = nil then Exit; - - PrepareConstruct; - try - BuildTopLevelViews; - if not AbortBuilding then CalculateSizes; - finally - UnprepareConstruct; - end; -end; - -procedure TdxGridReportLink.ConvertCoords; -begin - inherited; - ConvertDelimiters(DelimitersHardVert); -end; - -procedure TdxGridReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - DrawInfo: TdxGridCellCustomDrawInfo; -begin - GetItemCustomDrawInfo(AItem, DrawInfo); - with DrawInfo do - case GridAttributeID of - dxGridBandID: - DoCustomDrawBandCell(ACanvas, TcxGridBandedTableView(GridView), GridBand, - TdxReportCellString(AItem), ADone); - dxGridCardRowCaptionID: - DoCustomDrawCardRowCaptionCell(ACanvas, TcxGridCardView(GridView), GridCard, - GridCardRow, TdxReportCellString(AItem), ADone); - dxGridCardRowDataID: - DoCustomDrawCardRowDataCell(ACanvas, TcxGridCardView(GridView), GridCard, - GridCardRow, AItem, ADone); - dxGridFilterBarID: - DoCustomDrawFilterBar(ACanvas, TcxCustomGridTableView(GridView), - TdxReportCellString(AItem), ADone); - dxGridFooterID, - dxGridGroupFooterID: - DoCustomDrawFooterCell(ACanvas, TcxGridTableView(GridView), GridRecord, - GridColumn, GroupLevel, TdxReportCellString(AItem), ADone); - dxGridHeaderID: - DoCustomDrawHeaderCell(ACanvas, TcxGridTableView(GridView), GridColumn, - TdxReportCellString(AItem), ADone); - dxGridRecordID: - DoCustomDrawCell(ACanvas, TcxCustomGridTableView(GridView), GridRecord, - GridColumn, AItem, ADone); - dxGridLevelCaptionID: - DoCustomDrawLevelCaption(ACanvas, GridView, TdxReportCellString(AItem), ADone); - end; -end; - -function TdxGridReportLink.GetBreakPagesByHardDelimiters: Boolean; -begin - with OptionsPagination do - Result := OneGroupPerPage or Custom; -end; - -function TdxGridReportLink.GetEmptyPagesCanExist: Boolean; -begin - Result := True;//}ProcessParams.HasMasterDetails; -end; - -function TdxGridReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := (AUpdateCodes * uaMarginsVert <> []) and (ProcessParams.HasOnlyCards or OptionsSize.AutoWidth); -end; - -function TdxGridReportLink.GetUseHardVertDelimiters: Boolean; -begin - with OptionsPagination do - Result := TopLevelGroup or Custom; -end; - -procedure TdxGridReportLink.InternalRestoreDefaults; -begin - inherited; - OptionsCards.RestoreDefaults; -{$IFDEF CHARTVIEW} - OptionsCharts.RestoreDefaults; -{$ENDIF} - OptionsDetails.RestoreDefaults; - OptionsLevels.RestoreDefaults; -end; - -procedure TdxGridReportLink.InternalRestoreFromOriginal; -var - View: TcxCustomGridView; -begin - inherited; - Color := clWhite; - - if Grid <> nil then - begin - OptionsFormatting.LookAndFeelKind := Grid.LookAndFeel.Kind; - OptionsView.Caption := Grid.RootLevelOptions.DetailTabsPosition <> dtpNone; - - View := ActiveView; - if View <> nil then - begin - if View is TcxGridTableView then - begin - OptionsPreview.AutoHeight := TcxGridTableView(View).Preview.AutoHeight; - OptionsPreview.MaxLineCount := TcxGridTableView(View).Preview.MaxLineCount; - OptionsPreview.Visible := TcxGridTableView(View).Preview.Visible; - - if View is TcxGridBandedTableView then - OptionsView.BandHeaders := TcxGridBandedTableView(View).OptionsView.BandHeaders; - OptionsView.FilterBar := (TcxGridTableView(View).Filtering.Visible = fvAlways) or - ((TcxGridTableView(View).Filtering.Visible = fvNonEmpty) and - (TcxGridTableView(View).DataController.Filter.FilterText <> '')); - OptionsView.Footers := TcxGridTableView(View).OptionsView.Footer; - OptionsView.GroupFooters := TcxGridTableView(View).OptionsView.GroupFooters <> gfInvisible; - OptionsView.Headers := TcxGridTableView(View).OptionsView.Header; - - OptionsSize.AutoWidth := TcxGridTableView(View).OptionsView.ColumnAutoWidth; - end; - - if View is TcxGridCardView then - OptionsView.FilterBar := False; - end; - end; -end; - -function TdxGridReportLink.IsDrawFootersOnEveryPage: Boolean; -begin - Result := HostInfoServices.ArePageFootersAssigned; -end; - -function TdxGridReportLink.IsDrawHeadersOnEveryPage: Boolean; -begin - Result := HostInfoServices.ArePageHeadersAssigned; -end; - -function TdxGridReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -var - DrawInfo: TdxGridCellCustomDrawInfo; -begin - Result := inherited IsSupportedCustomDraw(Item) and - (Item <> nil) and IsCustomDrawn(GetItemCustomDrawInfo(Item, DrawInfo)); -end; - -procedure TdxGridReportLink.MakeHardDelimiters(AReportCells: TdxReportCells; - AVertDelimiters: TList); -begin - inherited; - if OptionsPagination.Custom then - try - DoGetCustomPageBreaks; - except - Application.HandleException(Self); - end; - dxPSUtl.dxCopyList(DelimitersHardVert, AVertDelimiters); -end; - -function TdxGridReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := OptionsFormatting.UseNativeStyles; -end; - -function TdxGridReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TdxGridReportLinkStyles; -end; - -function TdxGridReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TdxGridReportLinkStyleSheet; -end; - -function TdxGridReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := GridLinkStyleSheetPrototype; -end; - -procedure TdxGridReportLink.PrepareConstruct; -begin - inherited; - DelimitersHardVert.Clear; - FReportRows.Clear; - - ReportCells.LookAndFeel := nil;//ReportCells.CreateGroupLookAndFeel(TdxPSReportGroupNullLookAndFeel); - - if OptionsExpanding.HasAny then - DoExpandRows; - - CalculateProcessParams; - HostInfoServices.Initialize; -end; - -procedure TdxGridReportLink.DoCustomDrawBandCell(ACanvas: TCanvas; - AView: TcxGridBandedTableView; ABand: TcxGridBand; AnItem: TdxReportCellString; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawBandCell) then - FOnCustomDrawBandCell(Self, ACanvas, AView, ABand, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawCardRowCaptionCell(ACanvas: TCanvas; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCardRowCaptionCell) then - FOnCustomDrawCardRowCaptionCell(Self, ACanvas, AView, ACard, ARow, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawCardRowDataCell(ACanvas: TCanvas; - AView: TcxGridCardView; ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AnItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCardRowDataCell) then - FOnCustomDrawCardRowDataCell(Self, ACanvas, AView, ACard, ARow, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawCell(ACanvas: TCanvas; - AView: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCell) then - FOnCustomDrawCell(Self, ACanvas, AView, ARecord, AColumn, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawFilterBar(ACanvas: TCanvas; - AView: TcxCustomGridTableView; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFilterBar) then - FOnCustomDrawFilterBar(Self, ACanvas, AView, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawFooterCell(ACanvas: TCanvas; - AView: TcxGridTableView; ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; - ALevel: Integer; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFooterCell) then - FOnCustomDrawFooterCell(Self, ACanvas, AView, ARecord, AColumn, ALevel, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawHeaderCell(ACanvas: TCanvas; - AView: TcxGridTableView; AColumn: TcxGridColumn; AnItem: TdxReportCellString; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeaderCell) then - FOnCustomDrawHeaderCell(Self, ACanvas, AView, AColumn, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoCustomDrawLevelCaption(ACanvas: TCanvas; - AView: TcxCustomGridView; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawLevelCaption) then - FOnCustomDrawLevelCaption(Self, ACanvas, AView, AnItem, ADone); -end; - -procedure TdxGridReportLink.DoGetCellHeight(AView: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; ATableItem: TcxCustomGridTableItem; - var AHeight: Integer); -begin - if Assigned(FOnGetCellHeight) then - FOnGetCellHeight(Self, AView, ARecord, ATableItem, AHeight); -end; - -procedure TdxGridReportLink.DoGetCustomPageBreaks; -begin - if Assigned(FOnGetCustomPageBreaks) then FOnGetCustomPageBreaks(Self); -end; - -procedure TdxGridReportLink.DoInitializeBandCell(AView: TcxGridBandedTableView; - ABand: TcxGridBand; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeBandCell) then - FOnInitializeBandCell(Self, AView, ABand, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeCardRowCaptionCell(AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeCardRowCaptionCell) then - FOnInitializeCardRowCaptionCell(Self, AView, ACard, ARow, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeCardRowDataCell(AView: TcxGridCardView; - ACard: TcxGridCard; ARow: TcxGridCardViewRow; AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeCardRowDataCell) then - FOnInitializeCardRowDataCell(Self, AView, ACard, ARow, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeCell(AView: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeCell) then - FOnInitializeCell(Self, AView, ARecord, AColumn, AnItem); -end; - -{$IFDEF CHARTVIEW} -procedure TdxGridReportLink.DoInitializeChartCell(AView: TcxGridChartView; - AnItem: TdxReportCellGraphic); -begin - if Assigned(FOnInitializeChartCell) then - FOnInitializeChartCell(Self, AView, AnItem); -end; -{$ENDIF} - -procedure TdxGridReportLink.DoInitializeFilterBar(AView: TcxCustomGridTableView; - AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeFilterBar) then - FOnInitializeFilterBar(Self, AView, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeFooterCell(AView: TcxGridTableView; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn; ALevel: Integer; - AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeFooterCell) then - FOnInitializeFooterCell(Self, AView, ARecord, AColumn, ALevel, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeHeaderCell(AView: TcxGridTableView; - AColumn: TcxGridColumn; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeHeaderCell) then - FOnInitializeHeaderCell(Self, AView, AColumn, AnItem); -end; - -procedure TdxGridReportLink.DoInitializeLevelCaption(AView: TcxCustomGridView; - AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeLevelCaption) then - FOnInitializeLevelCaption(Self, AView, AnItem); -end; - -procedure TdxGridReportLink.CreateOptions; -begin - inherited; - FOptionsCards := GetOptionsCardsClass.Create(Self); -{$IFDEF CHARTVIEW} - FOptionsCharts := GetOptionsChartsClass.Create(Self); -{$ENDIF} - FOptionsDetails := GetOptionsDetailsClass.Create(Self); - FOptionsLevels := GetOptionsLevelsClass.Create(Self); -end; - -procedure TdxGridReportLink.DestroyOptions; -begin - FreeAndNil(FOptionsLevels); - FreeAndNil(FOptionsDetails); -{$IFDEF CHARTVIEW} - FreeAndNil(FOptionsCharts); -{$ENDIF} - FreeAndNil(FOptionsCards); - inherited; -end; - -function TdxGridReportLink.GetOptionsCardsClass: TdxGridReportLinkOptionsCardsClass; -begin - Result := TdxGridReportLinkOptionsCards; -end; - -{$IFDEF CHARTVIEW} -function TdxGridReportLink.GetOptionsChartsClass: TdxGridReportLinkOptionsChartsClass; -begin - Result := TdxGridReportLinkOptionsCharts; -end; -{$ENDIF} - -function TdxGridReportLink.GetOptionsDetailsClass: TdxGridReportLinkOptionsDetailsClass; -begin - Result := TdxGridReportLinkOptionsDetails; -end; - -function TdxGridReportLink.GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; -begin - Result := TdxGridReportLinkOptionsExpanding; -end; - -function TdxGridReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TdxGridReportLinkOptionsFormatting; -end; - -function TdxGridReportLink.GetOptionsLevelsClass: TdxGridReportLinkOptionsLevelsClass; -begin - Result := TdxGridReportLinkOptionsLevels; -end; - -function TdxGridReportLink.GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; -begin - Result := TdxGridReportLinkOptionsOnEveryPage; -end; - -function TdxGridReportLink.GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; -begin - Result := TdxGridReportLinkOptionsPagination; -end; - -function TdxGridReportLink.GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; -begin - Result := TdxGridReportLinkOptionsPreview; -end; - -function TdxGridReportLink.GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; -begin - Result := TdxGridReportLinkOptionsRefinements; -end; - -function TdxGridReportLink.GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; -begin - Result := TdxGridReportLinkOptionsSelection; -end; - -function TdxGridReportLink.GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; -begin - Result := TdxGridReportLinkOptionsSize; -end; - -function TdxGridReportLink.GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; -begin - Result := TdxGridReportLinkOptionsView; -end; - -procedure TdxGridReportLink.AddReportRow(AReportRow: TdxReportCell); -begin - FReportRows.Add(AReportRow); -end; - -procedure TdxGridReportLink.AddVerticalHardDelimiter(ADelimiter: TdxReportCell); -var - R: TRect; -begin - R := ADelimiter.AbsoluteRect; - AddVerticalHardDelimiter(R.Top); -end; - -procedure TdxGridReportLink.AddVerticalHardDelimiter(ADelimiter: Integer); -begin - FDelimitersHardVert.Add(TObject(ADelimiter)); -end; - -procedure TdxGridReportLink.BuildTopLevelView(AGridView: TcxCustomGridView); -begin - if (AGridView <> FProcessedView) and (AGridView <> nil) then BuildView(nil, AGridView); -end; - -procedure TdxGridReportLink.BuildTopLevelViews; -var - MasterRow: TcxGridMasterDataRow; - CurrentView: TcxCustomGridView; -begin - if OptionsLevels.Unwrap and OptionsLevels.UnwrapTopLevel then - begin - FProcessedView := nil; - try - MasterRow := ActiveViewMasterRow; - if OptionsLevels.RiseActiveLevelOntoTop then - begin - if MasterRow <> nil then - CurrentView := MasterRow.ActiveDetailGridView - else - CurrentView := ActiveView; - BuildTopLevelView(CurrentView); - FProcessedView := CurrentView; - end; - if not AbortBuilding then - ForEachView(MasterRow, BuildTopLevelView); - finally - FProcessedView := nil; - end; - end - else - BuildTopLevelView(ActiveView); -end; - -procedure TdxGridReportLink.BuildView(AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView); -begin - with CreateViewBuilder(AMasterBuilder, AGridView) do - try - Build; - finally - Free; - end; -end; - -function TdxGridReportLink.CreateViewAdapter(AMasterAdapter: TdxCustomGridViewAdapter; - AGridView: TcxCustomGridView): TdxCustomGridViewAdapter; -begin - Result := dxGridViewBuildersFactory.CreateViewAdapter(AMasterAdapter, AGridView); -end; - -function TdxGridReportLink.CreateViewBuilder(AMasterBuilder: TdxCustomGridViewBuilder; - AGridView: TcxCustomGridView): TdxCustomGridViewBuilder; -begin - Result := dxGridViewBuildersFactory.CreateViewBuilder(Self, AMasterBuilder, AGridView); -end; - -procedure TdxGridReportLink.DoExpandRows; -begin - if OptionsLevels.Unwrap and OptionsLevels.UnwrapTopLevel then - ForEachView(ActiveViewMasterRow, DoExpandViewRows) - else - DoExpandViewRows(ActiveView); -end; - -procedure TdxGridReportLink.DoExpandViewRows(AGridView: TcxCustomGridView); -begin - if AGridView <> nil then - with CreateViewAdapter(nil, AGridView) do - try - ExpandAllRows(OptionsExpanding, not OptionsDetails.OnlyFocusedView); - finally - Free; - end; -end; - -procedure TdxGridReportLink.ForEachView(AMasterRow: TcxGridMasterDataRow; AProc: TdxGridViewProc); -var - I: Integer; - GridView: TcxCustomGridView; - Level: TcxGridLevel; -begin - if not Assigned(AProc) then Exit; - - if AMasterRow <> nil then - for I := 0 to AMasterRow.DetailGridViewCount -1 do - begin - GridView := AMasterRow.DetailGridViews[I]; - if GridView <> nil then - begin - Level := GridView.Level as TcxGridLevel; - if Level.Visible then AProc(GridView); - end; - if AbortBuilding then Break; - end - else - with Grid.Levels do - for I := 0 to VisibleCount - 1 do - begin - AProc(VisibleItems[I].GridView); - if AbortBuilding then Break; - end; -end; - -function TdxGridReportLink.GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; - out ADrawInfo: TdxGridCellCustomDrawInfo): TdxGridAttributeID; -begin - dxViewHelpersFactory.HelperClassByItem(AnItem).ExtractCustomDrawInfo(AnItem, ADrawInfo); - Result := ADrawInfo.GridAttributeID; -end; - -function TdxGridReportLink.HasSiblings(AGridView: TcxCustomGridView): Boolean; -var - ValidViewCount, I: Integer; -begin - if AGridView <> nil then - begin - ValidViewCount := 0; - with TcxGridLevel(AGridView.PatternGridView.Level).Parent do - for I := 0 to VisibleCount - 1 do - begin - if VisibleItems[I].GridView <> nil then Inc(ValidViewCount); - if ValidViewCount > 1 then Break; - end; - Result := ValidViewCount > 1; - end - else - Result := False; -end; - -function TdxGridReportLink.IsCardViewStyle(AStyle: TcxStyle): Boolean; -begin - Result := Styles.IsCardViewStyle(AStyle); -end; - -function TdxGridReportLink.IsCustomDrawn(AnAttributeID: TdxGridAttributeID): Boolean; -begin - Result := False; - case AnAttributeID of - dxGridBandID: - Result := Assigned(FOnCustomDrawBandCell); - dxGridCardRowCaptionID: - Result := Assigned(FOnCustomDrawCardRowCaptionCell); - dxGridCardRowDataID: - Result := Assigned(FOnCustomDrawCardRowDataCell); - dxGridFilterBarID: - Result := Assigned(FOnCustomDrawFilterBar); - dxGridFooterID, - dxGridGroupFooterID: - Result := Assigned(FOnCustomDrawFooterCell); - dxGridHeaderID: - Result := Assigned(FOnCustomDrawHeaderCell); - dxGridLevelCaptionID: - Result := Assigned(FOnCustomDrawLevelCaption); - dxGridRecordID: - Result := Assigned(FOnCustomDrawCell); - end; -end; - -function TdxGridReportLink.IsOffice11StyleGrouping: Boolean; -begin - {$IFDEF DXVER500} - Result := ActiveViewHelper.IsOffice11StyleGrouping(ActiveView); - {$ELSE} - Result := False; - {$ENDIF} -end; - -procedure TdxGridReportLink.CalculateProcessParams; -var - Adapter: TdxCustomGridViewAdapter; - View: TcxCustomGridView; -begin - View := ActiveView; - - with FProcessParams do - if View = nil then - begin - HasMasterDetails := False; - HasMasterDetailsInTopView := False; - HasOnlyCards := False; - HasOnlyCharts := False; - HasUnwrapableData := False; - CanUseOnEveryPageMode := not IsAggregated; - end - else - begin - Adapter := CreateViewAdapter(nil, View); - try - HasUnwrapableData := HasSiblings(Grid.ActiveLevel.GridView); - HasMasterDetailsInTopView := View.IsDetail or View.IsMaster; - HasMasterDetails := (HasUnwrapableData and OptionsLevels.Unwrap) or - (View.IsMaster and not Adapter.AreAllMasterRowsCollapsed and - not (OptionsDetails.StartFromFocusedView and OptionsDetails.OnlyFocusedView)); - HasOnlyCards := View is TcxGridCardView; -{$IFDEF CHARTVIEW} - HasOnlyCharts := View is TcxGridChartView; -{$ENDIF} - CanUseOnEveryPageMode := not IsAggregated and not HasMasterDetails and - Adapter.CanUseOnEveryPageMode; {Adapter.RecordCount <> 0} - finally - Adapter.Free; - end; - end; -end; - -function TdxGridReportLink.CanAttributeBeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := ProcessParams.CanUseOnEveryPageMode and OptionsOnEveryPage.HasInstalledAttribute(AnAttribute); -end; - -function TdxGridReportLink.IsAttributeUsedOnEveryPage(AnAttribute: TdxGridAttributeClass): Boolean; -begin - Result := CanAttributeBeUsedOnEveryPage(AnAttribute) or not OptionsView.HasInstalledAttribute(AnAttribute); -end; - -function TdxGridReportLink.GetActiveStyles: TdxGridReportLinkStyles; -begin - Result := inherited ActiveStyles as TdxGridReportLinkStyles; -end; - -function TdxGridReportLink.GetActiveView: TcxCustomGridView; -var - Level: TcxGridLevel; -begin - Result := nil; - if Grid <> nil then - Result := Grid.FocusedView; - if (Result <> nil) and not OptionsDetails.StartFromFocusedView then - begin - Level := Result.Level as TcxGridLevel; - while not Level.IsTop do - Level := Level.Parent; - Result := Level.GridView; - end; -end; - -function TdxGridReportLink.GetActiveViewHelper: TdxCustomGridViewHelperClass; -begin - if ActiveView = nil then - Result := TdxNullGridViewHelper - else - Result := dxViewHelpersFactory[ActiveView]; -end; - -function TdxGridReportLink.GetActiveViewMasterRow: TcxGridMasterDataRow; -begin - Result := nil; - with ActiveView do - if MasterGridRecordIndex <> -1 then - Result := (MasterGridView as TcxGridTableView).ViewData.Rows[MasterGridRecordIndex] as TcxGridMasterDataRow; -end; - -function TdxGridReportLink.GetActiveViewParentLevel: TcxGridLevel; -var - GridView: TcxCustomGridView; -begin - Result := nil; - GridView := ActiveView; - if GridView <> nil then - Result := TcxGridLevel(GridView.Level).Parent; -end; - -function TdxGridReportLink.GetDesignWindow: TdxfmGridReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TdxfmGridReportLinkDesignWindow; -end; - -function TdxGridReportLink.GetGrid: TcxGrid; -begin - Result := TcxGrid(Component); -end; - -function TdxGridReportLink.GetOptionsExpanding: TdxGridReportLinkOptionsExpanding; -begin - Result := inherited OptionsExpanding as TdxGridReportLinkOptionsExpanding; -end; - -function TdxGridReportLink.GetOptionsFormatting: TdxGridReportLinkOptionsFormatting; -begin - Result := inherited OptionsFormatting as TdxGridReportLinkOptionsFormatting; -end; - -function TdxGridReportLink.GetOptionsOnEveryPage: TdxGridReportLinkOptionsOnEveryPage; -begin - Result := inherited OptionsOnEveryPage as TdxGridReportLinkOptionsOnEveryPage; -end; - -function TdxGridReportLink.GetOptionsPagination: TdxGridReportLinkOptionsPagination; -begin - Result := inherited OptionsPagination as TdxGridReportLinkOptionsPagination; -end; - -function TdxGridReportLink.GetOptionsPreview: TdxGridReportLinkOptionsPreview; -begin - Result := inherited OptionsPreview as TdxGridReportLinkOptionsPreview; -end; - -function TdxGridReportLink.GetOptionsRefinements: TdxGridReportLinkOptionsRefinements; -begin - Result := inherited OptionsRefinements as TdxGridReportLinkOptionsRefinements; -end; - -function TdxGridReportLink.GetOptionsSelection: TdxGridReportLinkOptionsSelection; -begin - Result := inherited OptionsSelection as TdxGridReportLinkOptionsSelection; -end; - -function TdxGridReportLink.GetOptionsSize: TdxGridReportLinkOptionsSize; -begin - Result := inherited OptionsSize as TdxGridReportLinkOptionsSize; -end; - -function TdxGridReportLink.GetOptionsView: TdxGridReportLinkOptionsView; -begin - Result := inherited OptionsView as TdxGridReportLinkOptionsView; -end; - -function TdxGridReportLink.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := TdxReportCell(FReportRows[Index]); -end; - -function TdxGridReportLink.GetReportRowByGridRecord(GridRecord: TcxCustomGridRecord): TdxReportCell; -var - I: Integer; -begin - if GridRecord <> nil then - for I := 0 to ReportRowCount - 1 do - begin - Result := ReportRows[I]; - if Result.Data = Integer(GridRecord) then Exit; - end; - Result := nil; -end; - -function TdxGridReportLink.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TdxGridReportLink.GetStyles: TdxGridReportLinkStyles; -begin - Result := inherited Styles as TdxGridReportLinkStyles; -end; - -procedure TdxGridReportLink.SetOnCustomDrawBandCell(Value: TdxGridReportLinkCustomDrawBandCellEvent); -begin - if @FOnCustomDrawBandCell <> @Value then - begin - FOnCustomDrawBandCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawCell(Value: TdxGridReportLinkCustomDrawCellEvent); -begin - if @FOnCustomDrawCell <> @Value then - begin - FOnCustomDrawCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawCardRowCaptionCell(Value: TdxGridReportLinkCustomDrawCardRowCaptionCellEvent); -begin - if @FOnCustomDrawCardRowCaptionCell <> @Value then - begin - FOnCustomDrawCardRowCaptionCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawCardRowDataCell(Value: TdxGridReportLinkCustomDrawCardRowDataCellEvent); -begin - if @FOnCustomDrawCardRowDataCell <> @Value then - begin - FOnCustomDrawCardRowDataCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawFilterBar(Value: TdxGridReportLinkCustomDrawFilterBarEvent); -begin - if @FOnCustomDrawFilterBar <> @Value then - begin - FOnCustomDrawFilterBar := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawFooterCell(Value: TdxGridReportLinkCustomDrawFooterCellEvent); -begin - if @FOnCustomDrawFooterCell <> @Value then - begin - FOnCustomDrawFooterCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawHeaderCell(Value: TdxGridReportLinkCustomDrawHeaderCellEvent); -begin - if @FOnCustomDrawHeaderCell <> @Value then - begin - FOnCustomDrawHeaderCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOnCustomDrawLevelCaption(Value: TdxGridReportLinkCustomDrawLevelCaptionEvent); -begin - if @FOnCustomDrawLevelCaption <> @Value then - begin - FOnCustomDrawLevelCaption := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TdxGridReportLink.SetOptionsCards(Value: TdxGridReportLinkOptionsCards); -begin - OptionsCards.Assign(Value); -end; - -{$IFDEF CHARTVIEW} -procedure TdxGridReportLink.SetOptionsCharts(Value: TdxGridReportLinkOptionsCharts); -begin - OptionsCharts.Assign(Value); -end; -{$ENDIF} - -procedure TdxGridReportLink.SetOptionsDetails(Value: TdxGridReportLinkOptionsDetails); -begin - OptionsDetails.Assign(Value); -end; - -procedure TdxGridReportLink.SetOptionsExpanding(Value: TdxGridReportLinkOptionsExpanding); -begin - OptionsExpanding.Assign(Value); -end; - -procedure TdxGridReportLink.SetOptionsFormatting(Value: TdxGridReportLinkOptionsFormatting); -begin - inherited OptionsFormatting := Value; -end; - -procedure TdxGridReportLink.SetOptionsLevels(Value: TdxGridReportLinkOptionsLevels); -begin - OptionsLevels.Assign(Value); -end; - -procedure TdxGridReportLink.SetOptionsOnEveryPage(Value: TdxGridReportLinkOptionsOnEveryPage); -begin - inherited OptionsOnEveryPage := Value; -end; - -procedure TdxGridReportLink.SetOptionsPagination(Value: TdxGridReportLinkOptionsPagination); -begin - inherited OptionsPagination := Value; -end; - -procedure TdxGridReportLink.SetOptionsPreview(Value: TdxGridReportLinkOptionsPreview); -begin - inherited OptionsPreview := Value; -end; - -procedure TdxGridReportLink.SetOptionsRefinements(Value: TdxGridReportLinkOptionsRefinements); -begin - inherited OptionsRefinements := Value; -end; - -procedure TdxGridReportLink.SetOptionsSelection(Value: TdxGridReportLinkOptionsSelection); -begin - inherited OptionsSelection := Value; -end; - -procedure TdxGridReportLink.SetOptionsSize(Value: TdxGridReportLinkOptionsSize); -begin - inherited OptionsSize := Value; -end; - -procedure TdxGridReportLink.SetOptionsView(Value: TdxGridReportLinkOptionsView); -begin - inherited OptionsView := Value; -end; - -procedure TdxGridReportLink.SetStyles(Value: TdxGridReportLinkStyles); -begin - inherited Styles := Value; -end; - -{ TcxGridCardView2OptionsView } - -constructor TcxGridCardView2OptionsView.Create(AGridView: TcxCustomGridView); -begin - inherited; - FCardBorders := False; - FGridLineColor := clDefault; - FGridLines := glNone; - FShadowDepth := 4; -end; - -procedure TcxGridCardView2OptionsView.Assign(Source: TPersistent); -begin - if Source is TcxGridCardView2OptionsView then - with TcxGridCardView2OptionsView(Source) do - begin - Self.CardBorders := CardBorders; - Self.GridLineColor := GridLineColor; - Self.GridLines := GridLines; - Self.ShadowDepth := ShadowDepth; - end; - inherited; -end; - -function TcxGridCardView2OptionsView.GetShadowVisible: Boolean; -begin - Result := ShadowDepth <> 0; -end; - -procedure TcxGridCardView2OptionsView.SetCardBorders(Value: Boolean); -begin - if FCardBorders <> Value then - begin - FCardBorders := Value; - {$IFDEF DXVER500} - Changed(vcSize); - {$ELSE} - SizeChanged; - {$ENDIF} - end; -end; - -procedure TcxGridCardView2OptionsView.SetGridLineColor(Value: TColor); -begin - if FGridLineColor <> Value then - begin - FGridLineColor := Value; - {$IFDEF DXVER500} - Changed(vcLayout); - {$ELSE} - LayoutChanged; - {$ENDIF} - end; -end; - -procedure TcxGridCardView2OptionsView.SetGridLines(Value: TcxGridLines); -begin - if FGridLines <> Value then - begin - FGridLines := Value; - {$IFDEF DXVER500} - Changed(vcSize); - {$ELSE} - SizeChanged; - {$ENDIF} - end; -end; - -procedure TcxGridCardView2OptionsView.SetShadowDepth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FShadowDepth <> Value then - begin - FShadowDepth := Value; - {$IFDEF DXVER500} - Changed(vcSize); - {$ELSE} - SizeChanged; - {$ENDIF} - end; -end; - -{ TcxGridCardView2Styles } - -procedure TcxGridCardView2Styles.Assign(Source: TPersistent); -begin - if Source is TcxGridCardView2Styles then - with TcxGridCardView2Styles(Source) do - begin - Self.CardShadow := CardShadow; - end; - inherited; -end; - -procedure TcxGridCardView2Styles.GetCardShadowParams(ARecord: TcxCustomGridRecord; - out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if Assigned(FOnGetCardShadowStyle) then - FOnGetCardShadowStyle(GridView, ARecord, AStyle); - GetViewParams(vsCardShadow, ARecord, AStyle, AParams); -end; - -procedure TcxGridCardView2Styles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - inherited; - if Index = vsCardShadow then AParams.Color := clWindowText; -end; - -type - TcxGridCardViewInfo2 = class; - TcxGridCardViewViewInfo2 = class; - - TcxGridCardRowCaptionViewInfo2 = class(TcxGridCardRowCaptionViewInfo) - private - function GetCardViewInfo: TcxGridCardViewInfo2; - protected - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - public - property CardViewInfo: TcxGridCardViewInfo2 read GetCardViewInfo; - end; - - TcxGridCardRowDataViewInfo2 = class(TcxGridCardRowDataViewInfo) - private - function GetCardViewInfo: TcxGridCardViewInfo2; - protected - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - public - property CardViewInfo: TcxGridCardViewInfo2 read GetCardViewInfo; - end; - - TcxGridCardDataRowViewInfo2 = class(TcxGridCardDataRowViewInfo) - protected - {$IFDEF GRID6}class {$ENDIF}function GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; override; - {$IFDEF GRID6}class {$ENDIF}function GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; override; - end; - - TcxGridCardCaptionRowViewInfo2 = class(TcxGridCardRowViewInfo) - protected - {$IFDEF GRID6}class {$ENDIF}function GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; override; - {$IFDEF GRID6}class {$ENDIF}function GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; override; - end; - - TcxGridCardPainter2 = class(TcxGridCardPainter) - private - function GetViewInfo: TcxGridCardViewInfo2; - protected - procedure DrawBottomShadowAndRestSpace; virtual; - {$IFDEF DXVER500} - procedure DrawCardBorder; override; - {$ENDIF} - procedure DrawRightShadowAndRestSpace; virtual; - procedure DrawShadows; virtual; - procedure Paint; override; - property ViewInfo: TcxGridCardViewInfo2 read GetViewInfo; - end; - - TcxGridCardViewInfo2 = class(TcxGridCardViewInfo) - private - function GetGridView: TcxGridCardView2; - protected - function CalculateHeight: Integer; override; - function GetContentWidth: Integer; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - {$IFDEF GRID6}class {$ENDIF}function GetRowViewInfoClass(ARow: TcxGridCardViewRow): TcxGridCardRowViewInfoClass; override; - - function GetBottomShadowRect: TRect; virtual; - function GetBottomShadowRestRect: TRect; virtual; - function GetCardRowCaptionBorders(ARowCaption: TcxGridCardRowCaptionViewInfo2): TcxBorders; virtual; - function GetCardRowDataBorders(ARowData: TcxGridCardRowDataViewInfo2): TcxBorders; virtual; - function GetGridLineColor: TColor; virtual; - function GetRightShadowRect: TRect; virtual; - function GetRightShadowRestRect: TRect; virtual; - function GetShadowColor: TColor; virtual; - function GetShadowDepth: Integer; virtual; - function GetShadowRestColor: TColor; virtual; - - property GridView: TcxGridCardView2 read GetGridView; - public - property BottomShadowRect: TRect read GetBottomShadowRect; - property BottomShadowRestRect: TRect read GetBottomShadowRestRect; - property GridLineColor: TColor read GetGridLineColor; - property RightShadowRect: TRect read GetRightShadowRect; - property RightShadowRestRect: TRect read GetRightShadowRestRect; - property ShadowColor: TColor read GetShadowColor; - property ShadowDepth: Integer read GetShadowDepth; - property ShadowRestColor: TColor read GetShadowRestColor; - end; - - TcxGridCard2 = class(TcxGridCard) - protected - function GetViewInfoClass: TcxCustomGridRecordViewInfoClass; override; - end; - - TcxGridCardViewViewData2 = class(TcxGridCardViewViewData) - protected - function GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; override; - end; - - TcxGridCardsHorizontalViewInfo2 = class(TcxGridCardsHorizontalViewInfo) - private - function GetGridView: TcxGridCardView2; - protected - function CalculateCardHeight: Integer; override; - function GetShadowDepth: Integer; virtual; - - property GridView: TcxGridCardView2 read GetGridView; - public - property ShadowDepth: Integer read GetShadowDepth; - end; - - TcxGridCardsVerticalViewInfo2 = class(TcxGridCardsVerticalViewInfo) - private - function GetGridView: TcxGridCardView2; - protected - function CalculateCardHeight: Integer; override; - function GetShadowDepth: Integer; virtual; - - property GridView: TcxGridCardView2 read GetGridView; - public - property ShadowDepth: Integer read GetShadowDepth; - end; - - TcxGridCardViewViewInfo2 = class(TcxGridCardViewViewInfo) - protected - function GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; override; - end; - -{ TcxGridCardRowCaptionViewInfo2 } - -function TcxGridCardRowCaptionViewInfo2.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := CardViewInfo.GridLineColor; -end; - -function TcxGridCardRowCaptionViewInfo2.GetBorders: TcxBorders; -begin - Result := CardViewInfo.GetCardRowCaptionBorders(Self); -end; - -function TcxGridCardRowCaptionViewInfo2.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := 1; -end; - -function TcxGridCardRowCaptionViewInfo2.GetCardViewInfo: TcxGridCardViewInfo2; -begin - Result := inherited CardViewInfo as TcxGridCardViewInfo2 -end; - -{ TcxGridCardRowDataViewInfo2 } - -function TcxGridCardRowDataViewInfo2.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := CardViewInfo.GridLineColor; -end; - -function TcxGridCardRowDataViewInfo2.GetBorders: TcxBorders; -begin - Result := CardViewInfo.GetCardRowDataBorders(Self); -end; - -function TcxGridCardRowDataViewInfo2.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := 1; -end; - -function TcxGridCardRowDataViewInfo2.GetCardViewInfo: TcxGridCardViewInfo2; -begin - Result := inherited CardViewInfo as TcxGridCardViewInfo2 -end; - -{ TcxGridCardDataRowViewInfo2 } - -{$IFDEF GRID6}class {$ENDIF}function TcxGridCardDataRowViewInfo2.GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; -begin - Result := TcxGridCardRowCaptionViewInfo2; -end; - -{$IFDEF GRID6}class {$ENDIF}function TcxGridCardDataRowViewInfo2.GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; -begin - Result := TcxGridCardRowDataViewInfo2; -end; - -{ TcxGridCardCaptionRowViewInfo2 } - -{$IFDEF GRID6}class {$ENDIF}function TcxGridCardCaptionRowViewInfo2.GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; -begin - Result := TcxGridCardRowCaptionViewInfo2; -end; - -{$IFDEF GRID6}class {$ENDIF}function TcxGridCardCaptionRowViewInfo2.GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; -begin - Result := TcxGridCardRowDataViewInfo2; -end; - -{ TcxGridCardPainter2 } - -procedure TcxGridCardPainter2.DrawBottomShadowAndRestSpace; -var - R: TRect; -begin - R := ViewInfo.BottomShadowRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowColor; - Canvas.FillRect(R); - end; - - R := ViewInfo.BottomShadowRestRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowRestColor; - Canvas.FillRect(R); - end; -end; - -{$IFDEF DXVER500} -procedure TcxGridCardPainter2.DrawCardBorder; -begin - with ViewInfo, Self.Canvas do - FrameRect(Bounds, clWindow, CardBorderWidth); -end; -{$ENDIF} - -procedure TcxGridCardPainter2.DrawRightShadowAndRestSpace; -var - R: TRect; -begin - R := ViewInfo.RightShadowRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowColor; - Canvas.FillRect(R); - end; - - R := ViewInfo.RightShadowRestRect; - if Canvas.RectVisible(R) then - begin - Canvas.Brush.Color := ViewInfo.ShadowRestColor; - Canvas.FillRect(R); - end; -end; - -procedure TcxGridCardPainter2.DrawShadows; -var - Color: TColor; -begin - Color := Canvas.Brush.Color; - DrawBottomShadowAndRestSpace; - DrawRightShadowAndRestSpace; - Canvas.Brush.Color := Color; -end; - -procedure TcxGridCardPainter2.Paint; -begin - DrawShadows; - inherited; -end; - -function TcxGridCardPainter2.GetViewInfo: TcxGridCardViewInfo2; -begin - Result := TcxGridCardViewInfo2(inherited ViewInfo); -end; - -{ TcxGridCardViewInfo2 } - -function TcxGridCardViewInfo2.CalculateHeight: Integer; -begin - Result := inherited CalculateHeight; - if RecordsViewInfo.AutoDataRecordHeight or (RecordsViewInfo.CardHeight = -1) then - Inc(Result, ShadowDepth); -end; - -function TcxGridCardViewInfo2.GetContentWidth: Integer; -begin - Result := inherited GetContentWidth - ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridCardPainter2; -end; - -{$IFDEF GRID6}class {$ENDIF}function TcxGridCardViewInfo2.GetRowViewInfoClass(ARow: TcxGridCardViewRow): TcxGridCardRowViewInfoClass; -const - RowViewInfoClasses: array[TcxGridCardViewRowKind] of TcxGridCardRowViewInfoClass = - (TcxGridCardDataRowViewInfo2, TcxGridCardCaptionRowViewInfo2{$IFDEF GRID6}, TcxGridCardCaptionRowViewInfo2{$ENDIF}); -begin - Result := RowViewInfoClasses[ARow.Kind]; -end; - -function TcxGridCardViewInfo2.GetBottomShadowRect: TRect; -begin - Result := ContentBounds; - Inc(Result.Left, ShadowDepth); - Result.Top := Result.Bottom - ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetBottomShadowRestRect: TRect; -begin - Result := ContentBounds; - Result.Right := Result.Left + ShadowDepth; - Result.Top := Result.Bottom - ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetCardRowCaptionBorders(ARowCaption: TcxGridCardRowCaptionViewInfo2): TcxBorders; -begin - Result := [bLeft, bTop]; - if ARowCaption.Row.VisibleIndex = GridView.RowCount - 1 then - Include(Result, bBottom); - - with TcxGridCardView2OptionsView(GridView.OptionsView) do - begin - if not CardBorders then - begin - Exclude(Result, bLeft); - if ARowCaption.Row.VisibleIndex = 0 then - Exclude(Result, bTop); - if ARowCaption.Row.VisibleIndex = Self.GridView.RowCount - 1 then - Exclude(Result, bBottom); - end; - if not (GridLines in [glBoth, glHorizontal]) and (ARowCaption.Row.VisibleIndex > 0) then - Exclude(Result, bTop); - end; -end; - -function TcxGridCardViewInfo2.GetCardRowDataBorders(ARowData: TcxGridCardRowDataViewInfo2): TcxBorders; -begin - Result := [bLeft, bTop, bRight]; - if ARowData.Row.VisibleIndex = GridView.RowCount - 1 then - Include(Result, bBottom); - with TcxGridCardView2OptionsView(GridView.OptionsView) do - begin - if not CardBorders then - begin - Exclude(Result, bRight); - if ARowData.Row.VisibleIndex = 0 then - Exclude(Result, bTop); - if ARowData.Row.VisibleIndex = Self.GridView.RowCount - 1 then - Exclude(Result, bBottom); - end; - if not (GridLines in [glBoth, glHorizontal]) and (ARowData.Row.VisibleIndex > 0) then - Exclude(Result, bTop); - if not (GridLines in [glBoth, glVertical]) then - Exclude(Result, bLeft); - end; -end; - -function TcxGridCardViewInfo2.GetGridLineColor: TColor; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).GridLineColor; - if Result = clDefault then - Result := GridView.LookAndFeelPainter.DefaultGridLineColor; -end; - -function TcxGridCardViewInfo2.GetRightShadowRect: TRect; -begin - Result := ContentBounds; - Result.Left := Result.Right - ShadowDepth; - Inc(Result.Top, ShadowDepth); -end; - -function TcxGridCardViewInfo2.GetRightShadowRestRect: TRect; -begin - Result := ContentBounds; - Result.Left := Result.Right - ShadowDepth; - Result.Bottom := Result.Top + ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetShadowColor: TColor; -var - Params: TcxViewParams; -begin - TcxGridCardView2Styles(GridView.Styles).GetCardShadowParams(GridRecord, Params); - Result := Params.Color; - if Result = clDefault then - Result := clWindowText; -end; - -function TcxGridCardViewInfo2.GetShadowDepth: Integer; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).ShadowDepth; -end; - -function TcxGridCardViewInfo2.GetShadowRestColor: TColor; -var - Params: TcxViewParams; -begin - TcxGridCardView2Styles(GridView.Styles).GetViewParams(vsBackground, nil, nil, Params); - Result := Params.Color; -end; - -function TcxGridCardViewInfo2.GetGridView: TcxGridCardView2; -begin - Result := TcxGridCardView2(inherited GridView); -end; - -{ TcxGridCard2 } - -function TcxGridCard2.GetViewInfoClass: TcxCustomGridRecordViewInfoClass; -begin - Result := TcxGridCardViewInfo2; -end; - -{ TcxGridCardViewViewData2 } - -function TcxGridCardViewViewData2.GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; -begin - Result := TcxGridCard2; -end; - -{ TcxGridCardsHorizontalViewInfo2 } - -function TcxGridCardsHorizontalViewInfo2.GetGridView: TcxGridCardView2; -begin - Result := TcxGridCardView2(inherited GridView); -end; - -function TcxGridCardsHorizontalViewInfo2.CalculateCardHeight: Integer; -begin - Result := inherited CalculateCardHeight + ShadowDepth; -end; - -function TcxGridCardsHorizontalViewInfo2.GetShadowDepth: Integer; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).ShadowDepth; -end; - -{ TcxGridCardsVerticalViewInfo2 } - -function TcxGridCardsVerticalViewInfo2.GetGridView: TcxGridCardView2; -begin - Result := TcxGridCardView2(inherited GridView); -end; - -function TcxGridCardsVerticalViewInfo2.CalculateCardHeight: Integer; -begin - Result := inherited CalculateCardHeight + ShadowDepth; -end; - -function TcxGridCardsVerticalViewInfo2.GetShadowDepth: Integer; -begin - Result := TcxGridCardView2OptionsView(GridView.OptionsView).ShadowDepth; -end; - -{ TcxGridCardViewViewInfo2 } - -function TcxGridCardViewViewInfo2.GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; -const - ViewInfoClasses: array[TcxGridCardViewLayoutDirection] of TcxCustomGridRecordsViewInfoClass = - (TcxGridCardsHorizontalViewInfo2, TcxGridCardsVerticalViewInfo2); -begin - Result := ViewInfoClasses[GridView.LayoutDirection]; -end; - -{ TcxGridCardView2 } - -function TcxGridCardView2.GetOptionsViewClass: TcxCustomGridOptionsViewClass; -begin - Result := TcxGridCardView2OptionsView; -end; - -function TcxGridCardView2.GetStylesClass: TcxCustomGridViewStylesClass; -begin - Result := TcxGridCardView2Styles; -end; - -function TcxGridCardView2.GetViewDataClass: TcxCustomGridViewDataClass; -begin - Result := TcxGridCardViewViewData2; -end; - -function TcxGridCardView2.GetViewInfoClass: TcxCustomGridViewInfoClass; -begin - Result := TcxGridCardViewViewInfo2; -end; - -{ TdxfmGridReportLinkDesignWindow } - -constructor TdxfmGridReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhccxGridReportLinkDesigner; - inherited; - CreateControls; - SetActivePage; -end; - -destructor TdxfmGridReportLinkDesignWindow.Destroy; -begin - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(lbxStyles); - inherited; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoInitialize; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited; - RefreshStylesList; - - CreateCardView; - //CreateChartView; - {.$IFNDEF DXVER500} - {.$ENDIF} - - {$IFNDEF DXVER500} - chbxExpandCards.Visible := False; - - //chbxTransparentRichEdits.Visible := False; {.3} - //bvlRefinementsSeparator.Top := bvlRefinementsSeparator.Top - 20; - //chbxSuppressBackgroundBitmaps.Top := chbxSuppressBackgroundBitmaps.Top - 20; - //chbxConsumeSelectionStyle.Top := chbxConsumeSelectionStyle.Top - 20; - {$ENDIF} - - if ReportLink.ProcessParams.HasOnlyCards then - PageControl1.ActivePage := tshCards; - if ReportLink.ProcessParams.HasOnlyCharts then - PageControl1.ActivePage := tshCharts; - - InitializePreviewGrid; - InitializePreviewGridStyles; - LoadDataIntoPreviewGridView(PreviewGrid.Levels[0].GridView as TcxCustomGridTableView); - - with ReportLink.OptionsView do - begin - chbxShowCaptions.Checked := Caption; - chbxShowBands.Checked := BandHeaders; - chbxShowExpandButtons.Checked := ExpandButtons; - chbxShowGroupFooters.Checked := GroupFooters; - chbxShowFilterBar.Checked := FilterBar; - chbxShowFooters.Checked := Footers; - chbxShowHeaders.Checked := Headers; - end; - - with ReportLink.OptionsOnEveryPage do - begin - chbxCaptionsOnEveryPage.Checked := Caption; - chbxBandsOnEveryPage.Checked := BandHeaders; - chbxFilterBarOnEveryPage.Checked := FilterBar; - chbxFootersOnEveryPage.Checked := Footers; - chbxHeadersOnEveryPage.Checked := Headers; - end; - - with cbxLookAndFeel do - begin - Items.Clear; - Items.AddObject(cxGetResourceString(@sdxLookAndFeelFlat), TObject(lfFlat)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelStandard), TObject(lfStandard)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelUltraFlat), TObject(lfUltraFlat)); - - ItemIndex := Items.IndexOfObject(TObject(ReportLink.OptionsFormatting.LookAndFeelKind)); - end; - - with ReportLink.OptionsSelection do - begin - chbxProcessSelection.Checked := ProcessSelection; - chbxProcessExactSelection.Checked := ProcessExactSelection; - end; - - with ReportLink.OptionsExpanding do - begin - chbxExpandGroupRows.Checked := ExpandGroupRows; - chbxExpandMasterRows.Checked := ExpandMasterRows; - {$IFDEF DXVER500} - chbxExpandCards.Checked := ExpandCards; - {$ENDIF} - end; - - with ReportLink.OptionsRefinements do - begin - chbxTransparentGraphics.Checked := TransparentGraphics; - chbxDisplayGraphicsAsText.Checked := DisplayGraphicsAsText; - chbxFlatCheckMarks.Checked := FlatCheckMarks; - {$IFDEF DXVER500} {.3} - //chbxTransparentRichEdits.Checked := TransparentRichEdits; - {$ENDIF} - end; - - with ReportLink.OptionsSize do - begin - chbxGridAutoWidth.Checked := AutoWidth; - end; - - with ReportLink.OptionsDetails do - begin - chbxStartFromActiveView.Checked := StartFromFocusedView; - chbxOnlyActiveView.Checked := OnlyFocusedView; - end; - - with ReportLink.OptionsLevels do - begin - chbxLevelsUnwrap.Checked := Unwrap; - chbxLevelsUnwrapTopLevel.Checked := UnwrapTopLevel; - chbxLevelsRiseActiveLevelOntoTop.Checked := RiseActiveLevelOntoTop; - end; - - with ReportLink.OptionsFormatting do - begin - chbxSuppressBackgroundBitmaps.Checked := SuppressBackgroundBitmaps; - chbxConsumeSelectionStyle.Checked := ConsumeSelectionStyle; - chbxUseNativeStyles.Checked := UseNativeStyles; - end; - - with ReportLink.OptionsPagination do - begin - chbxPaginateByTopLevelGroups.Checked := TopLevelGroup; - chbxPaginateOneGroupPerPage.Checked := OneGroupPerPage; - end; - - with ReportLink.OptionsPreview do - begin - chbxPreviewVisible.Checked := Visible; - chbxPreviewAutoHeight.Checked := AutoHeight; - sePreviewMaxLineCount.AsInteger := MaxLineCount; - end; - - with ReportLink.OptionsCards do - begin - chbxCardsAutoWidth.Checked := AutoWidth; - chbxCardsKeepSameWidth.Checked := KeepSameWidth; - chbxCardsKeepSameHeight.Checked := KeepSameHeight; - chbxCardsBorder.Checked := Borders; - chbxCardsHorzLines.Checked := RowBordersHorz; - chbxCardsVertLines.Checked := RowBordersVert; - seCardsSpaceHorz.AsInteger := InterCardsSpaceHorz; - seCardsSpaceVert.AsInteger := InterCardsSpaceVert; - with Shadow do - begin - seCardsShadowDepth.AsInteger := Depth; - ccbxCardsShadowColor.ColorValue := Color; - end; - end; - -{$IFDEF CHARTVIEW} - with ReportLink.OptionsCharts do - begin - chbxChartsTransparent.Checked := Transparent; - end; -{$ENDIF} -end; - -{$IFDEF DELPHI7} -function TdxfmGridReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxfmGridReportLinkDesignWindow.LoadStrings; - - procedure AdjustBevelSize(ABevel: TBevel; AControl: TControl); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := AControl.Left + AControl.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - inherited; - - lblPreviewWindow.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - tshView.Caption := cxGetResourceString(@sdxViewTab); - - lblShow.Caption := cxGetResourceString(@sdxShow); - AdjustBevelSize(bvlShow, lblShow); - chbxShowCaptions.Caption := cxGetResourceString(@sdxLevelCaption); - chbxShowBands.Caption := cxGetResourceString(@sdxBands); - chbxShowHeaders.Caption := cxGetResourceString(@sdxHeaders); - chbxShowFooters.Caption := cxGetResourceString(@sdxFooters); - chbxShowGroupFooters.Caption := cxGetResourceString(@sdxGroupFooters); - chbxShowExpandButtons.Caption := cxGetResourceString(@sdxExpandButtons); - chbxShowFilterBar.Caption := cxGetResourceString(@sdxFilterBar); - - lblOnEveryPage.Caption := cxGetResourceString(@sdxOnEveryPage); - AdjustBevelSize(bvlOnEveryPage, lblOnEveryPage); - chbxCaptionsOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxLevelCaption)); - chbxBandsOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxBands)); - chbxHeadersOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxHeaders)); - chbxFootersOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxFooters)); - chbxFilterBarOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxFilterBar)); - - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviorsTab); - - lblSelection.Caption := cxGetResourceString(@sdxSelection); - AdjustBevelSize(bvlSelection, lblSelection); - chbxProcessSelection.Caption := cxGetResourceString(@sdxProcessSelection); - chbxProcessExactSelection.Caption := cxGetResourceString(@sdxProcessExactSelection); - - lblExpanding.Caption := cxGetResourceString(@sdxExpanding); - AdjustBevelSize(bvlExpanding, lblExpanding); - chbxExpandGroupRows.Caption := cxGetResourceString(@sdxGroups); - chbxExpandMasterRows.Caption := cxGetResourceString(@sdxDetails); - chbxExpandCards.Caption := cxGetResourceString(@sdxCardsRows); - - lblGridSize.Caption := cxGetResourceString(@sdxSize); - AdjustBevelSize(bvlGridSize, lblGridSize); - chbxGridAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - - lblDetails.Caption := DropAmpersand(cxGetResourceString(@sdxDetails)); - AdjustBevelSize(bvlDetails, lblDetails); - chbxStartFromActiveView.Caption := cxGetResourceString(@sdxStartFromActiveDetails); - chbxOnlyActiveView.Caption := cxGetResourceString(@sdxOnlyActiveDetails); - - lblLevels.Caption := cxGetResourceString(@sdxLevels); - AdjustBevelSize(bvlLevels, lblLevels); - chbxLevelsUnwrap.Caption := cxGetResourceString(@sdxUnwrap); - chbxLevelsUnwrapTopLevel.Caption := cxGetResourceString(@sdxUnwrapTopLevel); - chbxLevelsRiseActiveLevelOntoTop.Caption := cxGetResourceString(@sdxRiseActiveToTop); - - tshFormatting.Caption := cxGetResourceString(@sdxFormatting); - lblLookAndFeel.Caption := cxGetResourceString(@sdxLookAndFeel); - AdjustBevelSize(bvlLookAndFeel, lblLookAndFeel); - - lblRefinements.Caption := cxGetResourceString(@sdxRefinements); - AdjustBevelSize(bvlRefinements, lblRefinements); - chbxTransparentGraphics.Caption := cxGetResourceString(@sdxTransparentGraphics); - chbxDisplayGraphicsAsText.Caption := DropAmpersand(cxGetResourceString(@sdxDisplayGraphicsAsText)); - chbxFlatCheckMarks.Caption := cxGetResourceString(@sdxFlatCheckMarks); - //chbxTransparentRichEdits.Caption := cxGetResourceString(@sdxTransparentRichEdits); {.3} - - chbxSuppressBackgroundBitmaps.Caption := cxGetResourceString(@sdxSuppressBackgroundBitmaps); - chbxConsumeSelectionStyle.Caption := cxGetResourceString(@sdxConsumeSelectionStyle); - - lblPagination.Caption := cxGetResourceString(@sdxPagination); - AdjustBevelSize(bvlPagination, lblPagination); - chbxPaginateByTopLevelGroups.Caption := cxGetResourceString(@sdxByTopLevelGroups); - chbxPaginateOneGroupPerPage.Caption := cxGetResourceString(@sdxOneGroupPerPage); - - tshStyles.Caption := cxGetResourceString(@sdxStyles); - lblUseNativeStyles.Caption := cxGetResourceString(@sdxUseNativeStyles); - AdjustBevelSize(bvlStyles, lblUseNativeStyles); - btnStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - btnStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - btnStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - btnStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - btnStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - btnStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); - - miStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - miStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - miStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - miStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - miStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - miStylesSelectAll.Caption := cxGetResourceString(@sdxSelectAll); - miStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); - - lblStyleSheets.Caption := cxGetResourceString(@sdxStyleSheets); - AdjustBevelSize(bvlStyleSheets, lblStyleSheets); - btnStyleSheetNew.Caption := cxGetResourceString(@sdxBtnNew); - btnStyleSheetCopy.Caption := cxGetResourceString(@sdxBtnCopy); - btnStyleSheetDelete.Caption := cxGetResourceString(@sdxBtnDelete); - btnStyleSheetRename.Caption := cxGetResourceString(@sdxBtnRename); - - tshPreview.Caption := cxGetResourceString(@sdxPreviewTab); - lblPreviewOptions.Caption := cxGetResourceString(@sdxOptions); - AdjustBevelSize(bvlPreviewOptions, lblPreviewOptions); - chbxPreviewVisible.Caption := cxGetResourceString(@sdxVisible); - chbxPreviewAutoHeight.Caption := cxGetResourceString(@sdxPreviewAutoHeight); - lblPreviewMaxLineCount.Caption := cxGetResourceString(@sdxPreviewMaxLineCount); - - tshCards.Caption := cxGetResourceString(@sdxCardsTab); - lblCardSizes.Caption := cxGetResourceString(@sdxSizes); - AdjustBevelSize(bvlCardSizes, lblCardSizes); - chbxCardsAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - chbxCardsKeepSameWidth.Caption := cxGetResourceString(@sdxKeepSameWidth); - chbxCardsKeepSameHeight.Caption := cxGetResourceString(@sdxKeepSameHeight); - - lblCardSpacing.Caption := cxGetResourceString(@sdxSpacing); - AdjustBevelSize(bvlCardSpacing, lblCardSpacing); - lblCardSpaceHorz.Caption := cxGetResourceString(@sdxHorizontal); - lblCardSpaceVert.Caption := cxGetResourceString(@sdxVertical); - - lblCardFraming.Caption := cxGetResourceString(@sdxFraming); - AdjustBevelSize(bvlCardFraming, lblCardFraming); - chbxCardsBorder.Caption := cxGetResourceString(@sdxBorderLines); - chbxCardsHorzLines.Caption := cxGetResourceString(@sdxHorzLines); - chbxCardsVertLines.Caption := cxGetResourceString(@sdxVertLines); - - lblCardShadow.Caption := cxGetResourceString(@sdxShadow); - AdjustBevelSize(bvlCardShadow, lblCardShadow); - lblCardShadowColor.Caption := cxGetResourceString(@sdxColor); - lblCardShadowDepth.Caption := cxGetResourceString(@sdxDepth); - - tshCharts.Caption := cxGetResourceString(@sdxCharts); - lblChartsOptions.Caption := cxGetResourceString(@sdxOptions); - AdjustBevelSize(bvlChartsOptions, lblChartsOptions); - - chbxChartsTransparent.Caption := cxGetResourceString(@sdxTransparent); -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdateControlsState; -var - View: TcxCustomGridView; -begin - inherited; - - View := ReportLink.ActiveView; - if View <> nil then - with ReportLink.ProcessParams, dxViewHelpersFactory[View] do - begin - chbxShowBands.Enabled := IsAttributeSupported(TdxGridBandHeader); - chbxShowExpandButtons.Enabled := IsAttributeSupported(TdxGridExpandButton); - chbxShowFooters.Enabled := IsAttributeSupported(TdxGridFooter); - chbxShowGroupFooters.Enabled := IsAttributeSupported(TdxGridGroupFooter); - chbxShowHeaders.Enabled := IsAttributeSupported(TdxGridHeader); - - chbxCaptionsOnEveryPage.Enabled := IsAttributeSupported(TdxGridLevelCaption) and not ReportLink.IsAggregated; - chbxBandsOnEveryPage.Enabled := IsAttributeSupported(TdxGridBandHeader) and not ReportLink.IsAggregated; - chbxHeadersOnEveryPage.Enabled := IsAttributeSupported(TdxGridHeader) and not ReportLink.IsAggregated; - chbxFilterBarOnEveryPage.Enabled := IsAttributeSupported(TdxGridFilterBar) and not ReportLink.IsAggregated; - chbxFootersOnEveryPage.Enabled := IsAttributeSupported(TdxGridFooter) and not ReportLink.IsAggregated; - - chbxExpandGroupRows.Enabled := IsAttributeSupported(TdxGridGroupRow); - chbxExpandMasterRows.Enabled := IsAttributeSupported(TdxGridDetails); - - lblDetails.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - bvlDetails.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - imgDetails.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - chbxStartFromActiveView.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - chbxOnlyActiveView.Visible := IsDesigning or HasMasterDetailsInTopView or HasUnwrapableData; - chbxOnlyActiveView.Enabled := chbxStartFromActiveView.Checked; - - lblLevels.Visible := IsDesigning or HasUnwrapableData; - bvlLevels.Visible := IsDesigning or HasUnwrapableData; - imgLevels.Visible := IsDesigning or HasUnwrapableData; - chbxLevelsUnwrap.Visible := IsDesigning or HasUnwrapableData; - chbxLevelsUnwrapTopLevel.Visible := IsDesigning or HasUnwrapableData; - chbxLevelsRiseActiveLevelOntoTop.Visible := IsDesigning or HasUnwrapableData; - - chbxLevelsUnwrapTopLevel.Enabled := chbxLevelsUnwrap.Checked; - chbxLevelsRiseActiveLevelOntoTop.Enabled := chbxLevelsUnwrap.Checked; - - chbxPreviewVisible.Enabled := IsAttributeSupported(TdxGridPreview); - chbxPreviewAutoHeight.Enabled := IsAttributeSupported(TdxGridPreview); - sePreviewMaxLineCount.Enabled := IsAttributeSupported(TdxGridPreview); - - lblPagination.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - bvlPagination.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - imgPagination.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - chbxPaginateByTopLevelGroups.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - chbxPaginateOneGroupPerPage.Visible := IsDesigning or IsAttributeSupported(TdxGridGroupRow); - end; - - chbxProcessExactSelection.Enabled := chbxProcessSelection.Checked; - - chbxPaginateOneGroupPerPage.Enabled := chbxPaginateByTopLevelGroups.Checked; - - chbxCardsKeepSameWidth.Enabled := chbxCardsAutoWidth.Checked; - -{$IFDEF CHARTVIEW} - chbxChartsTransparent.Checked := ReportLink.OptionsCharts.Transparent; -{$ELSE} - tshCharts.TabVisible := False; // if chart not available -{$ENDIF} - - lbxStyles.Enabled := AreNativeStylesAvailable; - btnStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - btnStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStylesSaveAs.Enabled := CanSaveStyles; - - lblStyleSheets.Enabled := AreNativeStylesAvailable; - cbxStyleSheets.Enabled := AreNativeStylesAvailable; - btnStyleSheetNew.Enabled := CanCreateStyleSheet; - btnStyleSheetCopy.Enabled := CanCopyStyleSheet; - btnStyleSheetDelete.Enabled := CanDeleteStyleSheet; - btnStyleSheetRename.Enabled := CanRenameStyleSheet; - - UpdateWarningPane; -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdatePreview; -const - DetailTabsPositionMap: array[Boolean] of TcxGridDetailTabsPosition = (dtpNone, dtpTop); - GroupFootersMap: array[Boolean] of TcxGridGroupFootersMode = (gfInvisible, gfAlwaysVisible); - FilteringMap: array[Boolean] of {$IFDEF DXVER500}TcxGridFilterVisible{$ELSE}TcxGridTableFilterVisible{$ENDIF} = - (fvNonEmpty, fvAlways); - TransparentsMap: array[Boolean] of TcxImageTransparency = (gtOpaque, gtTransparent); - - {$IFDEF DXVER500} - function GetFilterBarPosition: TcxGridFilterPosition; - var - View: TcxCustomGridView; - begin - View := ReportLink.ActiveView; - if View is TcxCustomGridTableView then - Result := CustomGridTableFiltering_GetPosition(TcxCustomGridTableView(View).Filtering) - else - Result := fpBottom; - end; - {$ENDIF} - - procedure UpdateBandedView; - begin - TcxImageProperties(colVendorLogo.Properties).GraphicTransparency := - TransparentsMap[ReportLink.OptionsRefinements.TransparentGraphics]; - with PreviewBandedView do - begin - {$IFDEF DXVER500} - Filtering.Position := GetFilterBarPosition; - {$ENDIF} - Filtering.Visible := FilteringMap[ReportLink.OptionsView.FilterBar]; - OptionsView.BandHeaders := ReportLink.OptionsView.BandHeaders; - OptionsView.Footer := ReportLink.OptionsView.Footers; - OptionsView.GroupFooters := GroupFootersMap[ReportLink.OptionsView.GroupFooters]; - OptionsView.Header := ReportLink.OptionsView.Headers; - Preview.Visible := ReportLink.OptionsPreview.Visible; - ViewChanged; - end; - end; - - procedure UpdateCardView; - begin - TcxImageProperties(rowVendorLogo.Properties).GraphicTransparency := - TransparentsMap[ReportLink.OptionsRefinements.TransparentGraphics]; - {$IFDEF DXVER500} - PreviewCardView.Filtering.Position := GetFilterBarPosition; - PreviewCardView.Filtering.Visible := FilteringMap[ReportLink.OptionsView.FilterBar]; - {$ENDIF} - PreviewCardView.ViewChanged; - end; - -begin - PreviewGrid.Enabled := False; - - PreviewGrid.LookAndFeel.Kind := ReportLink.OptionsFormatting.LookAndFeelKind; - PreviewGrid.LookAndFeel.NativeStyle := False; - PreviewGrid.Font := ReportLink.Font; - PreviewGrid.RootLevelOptions.DetailTabsPosition := DetailTabsPositionMap[ReportLink.OptionsView.Caption]; - - UpdateBandedView; - UpdateCardView; -end; - -function TdxfmGridReportLinkDesignWindow.GetDesignerTabIndex: Integer; -begin - Result := PageControl1.ActivePage.TabIndex; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetDesignerTabIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > PageControl1.PageCount - 1 then - Value := PageControl1.PageCount - 1; - PageControl1.ActivePage := PageControl1.Pages[Value]; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited; - with cbxStyleSheets do - ItemIndex := Items.IndexOfObject(ActiveStyleSheet); - - if not LockControlsUpdate then - begin - Modified := True; - UpdatePreview; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin - inherited; - if not AnActive then lbxStyles.HideToolTips; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoRefreshStylesList; -var - Styles: TdxGridReportLinkStyles; - List: TList; -begin - Styles := ReportLink.ActiveStyles; - - with lbxStyles.Items do - begin - BeginUpdate; - try - List := TList.Create; - try - SaveSelectedStyles(List); - try - Clear; - AddObject(cxGetResourceString(@sdxBandHeaderStyle), Styles.BandHeader); - AddObject(cxGetResourceString(@sdxCaptionStyle), Styles.Caption); - AddObject(cxGetResourceString(@sdxCardCaptionRowStyle), Styles.CardCaptionRow); - AddObject(cxGetResourceString(@sdxCardRowCaptionStyle), Styles.CardRowCaption); - AddObject(cxGetResourceString(@sdxContentStyle), Styles.Content); - AddObject(cxGetResourceString(@sdxContentEvenStyle), Styles.ContentEven); - AddObject(cxGetResourceString(@sdxContentOddStyle), Styles.ContentOdd); - AddObject(cxGetResourceString(@sdxFilterBarStyle), Styles.FilterBar); - AddObject(cxGetResourceString(@sdxFooterStyle), Styles.Footer); - AddObject(cxGetResourceString(@sdxGroupStyle), Styles.Group); - AddObject(cxGetResourceString(@sdxHeaderStyle), Styles.Header); - AddObject(cxGetResourceString(@sdxPreviewStyle), Styles.Preview); - AddObject(cxGetResourceString(@sdxSelectionStyle), Styles.Selection); - finally - RestoreSelectedStyles(List); - end; - finally - List.Free; - end; - finally - EndUpdate; - end; - end; - InitializePreviewGridStyles; -end; - -procedure TdxfmGridReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - inherited; - Modified := True; - UpdatePreviewGridStyles(ACaption, AStyle); -end; - -procedure TdxfmGridReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin - if ARecreate then - RecreateStylesListBox - else - lbxStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - with lbxStyles do - for I := 0 to Items.Count - 1 do - if Selected[I] then - AStrings.AddObject(Items[I], Items.Objects[I]); -end; - -procedure TdxfmGridReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := lbxStyles.Items; -end; - -procedure TdxfmGridReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := cbxStyleSheets.Items; -end; - -function TdxfmGridReportLinkDesignWindow.GetActiveStyle: TcxStyle; -begin - with lbxStyles do - if ItemIndex <> -1 then - Result := TcxStyle(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -function TdxfmGridReportLinkDesignWindow.GetHasSelectedStyles: Boolean; -begin - Result := lbxStyles.SelCount <> 0; -end; - -function TdxfmGridReportLinkDesignWindow.GetHasSelectedStylesWithAssignedBitmap: Boolean; -var - Strings: TStrings; - I: Integer; - cxStyle: TcxStyle; -begin - Result := True; - Strings := TStringList.Create; - try - GetSelectedStyleNames(Strings); - for I := 0 to Strings.Count - 1 do - begin - cxStyle := TcxStyle(Strings.Objects[I]); - if (cxStyle <> nil) and (cxStyle.Bitmap <> nil) and not cxStyle.Bitmap.Empty then - Exit; - end; - finally - Strings.Free; - end; - Result := False; -end; - -function TdxfmGridReportLinkDesignWindow.GetReportLink: TdxGridReportLink; -begin - Result := inherited ReportLink as TdxGridReportLink; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardShadowColorChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - if TdxPSColorCombo(Sender).IsAutoColorSelected then - ReportLink.OptionsCards.Shadow.Color := clDefault - else - ReportLink.OptionsCards.Shadow.Color := TdxPSColorCombo(Sender).ColorValue; - TcxGridCardView2Styles(PreviewCardView.Styles).CardShadow.Color := ReportLink.OptionsCards.Shadow.ActualColor; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardShadowDepthChanged(Sender: TObject); -var - NewDepth: Integer; -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsCards.Shadow.Depth := TdxPSSpinEdit(Sender).AsInteger; - - NewDepth := TdxPSSpinEdit(Sender).AsInteger; - if NewDepth > 4 then NewDepth := 4; - TcxGridCardView2OptionsView(PreviewCardView.OptionsView).ShadowDepth := NewDepth; - - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardSpaceHorzChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsCards.InterCardsSpaceHorz := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.CardSpaceVertChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsCards.InterCardsSpaceVert := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewMaxLineCountChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.MaxLineCount := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -function TdxfmGridReportLinkDesignWindow.CanSelectAllStyles: Boolean; -var - I: Integer; -begin - Result := AreNativeStylesAvailable; - if Result then - begin - for I := 0 to lbxStyles.Items.Count - 1 do - if not lbxStyles.Selected[I] then Exit; - Result := False; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.ChangeActiveView(AView: TcxCustomGridView); -var - OldGridView: TcxCustomGridView; -begin - with PreviewGrid.Levels[0] do - begin - OldGridView := GridView; - GridView := AView; - if OldGridView <> GridView then - LoadDataIntoPreviewGridView(GridView as TcxCustomGridTableView); - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.CreateCardView; - - function CreateRow(APropertiesClass: TcxCustomEditPropertiesClass = nil; - AOnCustomDraw: TcxGridTableDataCellCustomDrawEvent = nil): TcxGridCardViewRow; - begin - Result := PreviewCardView.CreateRow; - Result.PropertiesClass := APropertiesClass; - Result.OnCustomDrawCell := AOnCustomDraw; - end; - -begin - PreviewCardView := PreviewGrid.CreateView(TcxGridCardView2) as TcxGridCardView2; - with PreviewCardView do - begin - LayoutDirection := ldVertical; - {$IFDEF DXVER500} - Filtering.CustomizeDialog := False; - {$ENDIF} - TcxGridCardView2Styles(Styles).CardShadow := styleCardShadow; - with TcxGridCardView2OptionsView(OptionsView) do - begin - CardWidth := 135; - CardBorderWidth := 1; - CellAutoHeight := True; - GridLineColor := ReportLink.OptionsFormatting.GridLineColor; - SeparatorWidth := 0; - ScrollBars := ssNone; - ShadowDepth := ReportLink.OptionsCards.Shadow.Depth; - end; - {$IFDEF DXVER500} - with OptionsCustomize do - begin - CardExpanding := False; - RowFiltering := False; - end; - {$ENDIF} - end; - - rowVendorName := CreateRow; - rowVendorLogo := CreateRow(TcxImageProperties, VendorLogoCustomDrawCell); - rowVendorCountry := CreateRow; - rowCarModel := CreateRow; - rowIsSuvModel := CreateRow(TcxCheckBoxProperties, IsSUVModelCustomDrawCell); -end; - -procedure TdxfmGridReportLinkDesignWindow.CreateControls; - - function CreateSpin(AHost: TControl; ALabel: TLabel; ATabOrder: TTabOrder; - AMinValue, AMaxValue, AValue: Integer): TdxPSSpinEdit; - begin - Result := TdxPSSpinEdit.Create(Self); - with Result do - begin - Parent := AHost.Parent; - BoundsRect := AHost.BoundsRect; - TabOrder := ATabOrder; - - MinValue := AMinValue; - MaxValue := AMaxValue; - Value := AValue; - DefaultValue := AValue; - end; - ALabel.FocusControl := Result; - end; - - function CreateColorCombo(AParent: TWinControl; AHost: TControl; ALabel: TLabel; - ATabOrder: TTabOrder; ATag: Integer; AAutoColor: TColor): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(Result) do - begin - BoundsRect := AHost.BoundsRect; - Tag := MakeTTag(ATag); - Parent := AParent; - TabOrder := ATabOrder; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - - procedure CreateWarningPane; - begin - wpIncorrectOnEveryPageState := TdxPSWarningPane.Create(Self); - wpIncorrectOnEveryPageState.Parent := tshView; - wpIncorrectOnEveryPageState.BoundsRect := bvlWarningHost.BoundsRect; - wpIncorrectOnEveryPageState.Font.Name := 'Tahoma'; - wpIncorrectOnEveryPageState.Font.Size := 8; - - bvlWarningHost.Visible := False; - end; - - procedure CreateStylesListBox; - begin - lbxStyles := TdxStylesListBox.Create(Self); - lbxStyles.Parent := tshStyles; - lbxStyles.BoundsRect := bvlStylesHost.BoundsRect; - lbxStyles.PopupMenu := pmStyles; - lbxStyles.TabOrder := chbxUseNativeStyles.TabOrder + 1; - lbxStyles.OnClick := lbxStylesClick; - bvlStylesHost.Visible := False; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(lbxStyles); - end; - -begin - sePreviewMaxLineCount := CreateSpin(bvlPreviewMaxLineCountHost, lblPreviewMaxLineCount, - chbxPreviewAutoHeight.TabOrder + 1, 0, 1000, 0); - sePreviewMaxLineCount.OnChange := PreviewMaxLineCountChanged; - - seCardsSpaceHorz := CreateSpin(bvlCardSpaceHorzHost, lblCardSpaceHorz, - chbxCardsKeepSameHeight.TabOrder + 1, 0, 20, dxDefaultInterCardsSpaceHorz); - seCardsSpaceHorz.OnChange := CardSpaceHorzChanged; - - seCardsSpaceVert := CreateSpin(bvlCardSpaceVertHost, lblCardSpaceVert, - seCardsSpaceHorz.TabOrder + 1, 0, 20, dxDefaultInterCardsSpaceVert); - seCardsSpaceVert.OnChange := CardSpaceVertChanged; - - ccbxCardsShadowColor := CreateColorCombo(tshCards, bvlCardShadowColorHost, lblCardShadowColor, - chbxCardsVertLines.TabOrder + 1, 0, dxDefaultCardsShadowColor); - ccbxCardsShadowColor.OnChange := CardShadowColorChanged; - - seCardsShadowDepth := CreateSpin(bvlCardShadowDepthHost, lblCardShadowDepth, - ccbxCardsShadowColor.TabOrder + 1, Low(TdxGridCardShadowDepth), High(TdxGridCardShadowDepth), - dxDefaultCardsShadowDepth); - seCardsShadowDepth.OnChange := CardShadowDepthChanged; - - CreateStylesListBox; - CreateWarningPane; -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawBorders(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridCellViewInfo); -var - PainterClass: TcxCustomGridCellPainterClass; - Painter: TcxCustomGridCellPainter; -begin - PainterClass := CustomGridCellViewInfo_GetPainterClass(AViewInfo); - Painter := PainterClass.Create(ACanvas, AViewInfo); - try - CustomGridCellPainter_DrawBorders(Painter); - finally - Painter.Free; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawFooter(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxCustomGridCellViewInfo); -begin - case ReportLink.OptionsFormatting.LookAndFeelKind of - lfStandard, - lfFlat: - ACanvas.DrawComplexFrame(R, AViewInfo.Params.TextColor, clBtnHighlight); - lfUltraFlat: - ACanvas.FrameRect(R, AViewInfo.Params.TextColor); - end; - - InflateRect(R, -1, -1); - CustomDrawTextRect(ACanvas, R, AViewInfo, AViewInfo.BackgroundBitmap); -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawHeader(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxCustomGridCellViewInfo); -const - BottomRightColors: array[Boolean] of TColor = (clBtnFace, clBtnShadow); -begin - ACanvas.FrameRect(R, clWindowText); - - if ReportLink.OptionsFormatting.LookAndFeelKind <> lfUltraFlat then - begin - InflateRect(R, -1, -1); - ACanvas.DrawComplexFrame(R, clBtnHighlight, BottomRightColors[ReportLink.OptionsFormatting.LookAndFeelKind = lfStandard]); - end; - - InflateRect(R, -1, -1); - CustomDrawTextRect(ACanvas, R, AViewInfo, AViewInfo.BackgroundBitmap); -end; - -procedure TdxfmGridReportLinkDesignWindow.CustomDrawTextRect(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxCustomGridCellViewInfo; ABackgroundBitmap: TBitmap); -const - AlignmentHorzMap: array[TAlignment] of Integer = (cxAlignLeft, cxAlignRight, cxAlignCenter); - AlignmentVertMap: array[TcxAlignmentVert] of Integer = (cxAlignTop, cxAlignBottom, cxAlignVCenter); -begin - with AViewInfo do - begin - if ABackgroundBitmap = nil then - begin - ACanvas.Brush.Color := Params.Color; - ACanvas.FillRect(R); - end - else - dxBkgnd.DrawPicture(ABackgroundBitmap, ACanvas.Canvas, R, ppmTile, 1, 1, - R.Left - 0, - R.Top - 0); - - InflateRect(R, -2, -1); - if ReportLink.OptionsFormatting.LookAndFeelKind = lfUltraFlat then - InflateRect(R, -1, -1); - if Params.Font <> nil then - ACanvas.Font := Params.Font; - ACanvas.Font.Color := Params.TextColor; - ACanvas.Brush.Style := bsClear; - ACanvas.DrawText(Text, R, AlignmentHorzMap[AlignmentHorz] or AlignmentVertMap[AlignmentVert] or cxSingleLine); - ACanvas.Brush.Style := bsSolid; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.InitializePreviewGrid; - - procedure SetupDataBindings(AView: TcxCustomGridTableView); - - function GetColumnCaption(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxManufacturerNameColumnCaption); - 1: Result := cxGetResourceString(@sdxManufacturerLogoColumnCaption); - 2: Result := cxGetResourceString(@sdxManufacturerCountryColumnCaption); - 3: Result := cxGetResourceString(@sdxCarModelColumnCaption); - else - Result := cxGetResourceString(@sdxCarIsSUVColumnCaption); - end; - end; - - const - ColumnTypes: array[0..4] of TcxValueTypeClass = - (TcxStringValueType, TcxStringValueType, TcxStringValueType, - TcxStringValueType, TcxBooleanValueType); - var - I: Integer; - begin - for I := 0 to AView.ItemCount - 1 do - with AView.Items[I] do - begin - DataBinding.ValueTypeClass := ColumnTypes[I]; - Caption := GetColumnCaption(I); - end; - end; - -begin - if PageControl1.ActivePage = tshCards then - PreviewGrid.Levels[0].GridView := PreviewCardView - else - PreviewGrid.Levels[0].GridView := PreviewBandedView; - - SetupDataBindings(PreviewBandedView); - PreviewGridLevel.Caption := cxGetResourceString(@sdxCarLevelCaption); - - PreviewBandedView.Bands[0].Caption := cxGetResourceString(@sdxManufacturerBandCaption); - PreviewBandedView.Bands[1].Caption := cxGetResourceString(@sdxModelBandCaption); - PreviewBandedView.DataController.Summary.FooterSummaryItems[0].Format := cxGetResourceString(@sdxSummaryFormat); - - SetupDataBindings(PreviewCardView); -// PreviewCardView.Rows[3].Visible := False; -end; - -procedure TdxfmGridReportLinkDesignWindow.InitializePreviewGridStyles; - - procedure ResetEvents(AStyles: TcxGridBandedTableViewStyles); overload; - begin - with AStyles do - begin - OnGetBandHeaderStyle := nil; - OnGetContentStyle := nil; - OnGetFooterStyle := nil; - OnGetGroupStyle := nil; - OnGetHeaderStyle := nil; - OnGetPreviewStyle := nil; - end; - end; - - procedure ResetEvents(AStyles: TcxGridCardViewStyles); overload; - begin - with AStyles do - begin - OnGetCaptionRowStyle := nil; - OnGetCardBorderStyle := nil; - OnGetContentStyle := nil; - OnGetRowCaptionStyle := nil; - end; - end; - -var - Styles: TdxGridReportLinkStyles; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - begin - Styles := ReportLink.ActiveStyles; - - PreviewGrid.RootLevelStyles.Tab := Styles.Caption; - PreviewGrid.RootLevelStyles.TabsBackground := Styles.Caption; - - if PreviewBandedView <> nil then - begin - dxPScxCommon.dxPSResetStyles(PreviewBandedView.Styles); - with PreviewBandedView.Styles do - begin - BandHeader := Styles.BandHeader; - Content := Styles.Content; - ContentEven := Styles.ContentEven; - ContentOdd := Styles.ContentOdd; - FilterBox := Styles.FilterBar; - Footer := Styles.Footer; - Group := Styles.Group; - Header := Styles.Header; - Preview := Styles.Preview; - end; - end; - - if PreviewCardView <> nil then - begin - dxPScxCommon.dxPSResetStyles(PreviewCardView.Styles); - with PreviewCardView.Styles do - begin - CaptionRow := Styles.CardCaptionRow; - CardBorder := StyleCardBorder; - Content := Styles.Content; - ContentEven := Styles.ContentEven; - ContentOdd := Styles.ContentOdd; - RowCaption := Styles.CardRowCaption; - end; - end; - - end - else - begin - if ReportLink.Grid <> nil then - begin - PreviewGrid.RootLevelStyles.Tab := ReportLink.Grid.RootLevelStyles.Tab; - PreviewGrid.RootLevelStyles.TabsBackground := ReportLink.Grid.RootLevelStyles.TabsBackground; - end - else - dxPScxCommon.dxPSResetStyles(PreviewGrid.RootLevelStyles); - - if PreviewBandedView <> nil then - if ReportLink.ActiveView is TcxGridBandedTableView then - PreviewBandedView.Styles := TcxGridBandedTableView(ReportLink.ActiveView).Styles - else - dxPScxCommon.dxPSResetStyles(PreviewBandedView.Styles); - - if PreviewCardView <> nil then - if ReportLink.ActiveView is TcxGridCardView then - PreviewCardView.Styles := TcxGridCardView(ReportLink.ActiveView).Styles - else - dxPScxCommon.dxPSResetStyles(PreviewCardView.Styles); - end; - - PreviewGrid.RootLevelStyles.OnGetTabStyle := nil; - if PreviewBandedView <> nil then - begin - ResetEvents(PreviewBandedView.Styles); - PreviewBandedView.SizeChanged; - end; - if PreviewCardView <> nil then - begin - ResetEvents(PreviewCardView.Styles); - PreviewCardView.SizeChanged; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.LoadDataIntoPreviewGridView(AView: TcxCustomGridTableView); - - procedure AddRecord(ARecordIndex: Integer; const AValues: array of string); - var - I: Integer; - begin - with AView.DataController do - for I := 0 to ItemCount - 1 do - Values[ARecordIndex, I] := AValues[I]; - end; - - function CarVendorName(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxCarManufacturerName1); - 1: Result := cxGetResourceString(@sdxCarManufacturerName2); - 2: Result := cxGetResourceString(@sdxCarManufacturerName3); - else - Result := cxGetResourceString(@sdxCarManufacturerName4); - end; - end; - - function CarVendorCountry(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxCarManufacturerCountry1); - 1: Result := cxGetResourceString(@sdxCarManufacturerCountry2); - 2: Result := cxGetResourceString(@sdxCarManufacturerCountry3); - else - Result := cxGetResourceString(@sdxCarManufacturerCountry4); - end; - end; - - function CarModel(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxCarModel1); - 1: Result := cxGetResourceString(@sdxCarModel2); - 2: Result := cxGetResourceString(@sdxCarModel3); - else - Result := cxGetResourceString(@sdxCarModel4); - end; - end; - -const - RecordCount = 4; - //CarSalesCount: array[0..RecordCount - 1] of Integer = (10, 6, 3, 5); - IsCarSUV: array[0..RecordCount - 1] of string = ('True', 'True', 'False', 'True'); -var - I: Integer; -begin - AView.DataController.RecordCount := RecordCount; - for I := 0 to RecordCount - 1 do - AddRecord(I, [CarVendorName(I), dxPScxCommon.dxPSPreviewCarLogosAsString(I), - CarVendorCountry(I), CarModel(I), IsCarSUV[I]]);//, CarSalesCount[I]]); -end; - -procedure TdxfmGridReportLinkDesignWindow.RecreateStylesListBox; -var - List: TList; -begin - List := TList.Create; - try - SaveSelectedStyles(List); - dxPSUtl.dxRecreateWnd(lbxStyles); - RestoreSelectedStyles(List); - finally - List.Free; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.RestoreSelectedStyles(AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - lbxStyles.Selected[Integer(AList[I])] := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SaveSelectedStyles(AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to lbxStyles.Items.Count - 1 do - if lbxStyles.Selected[I] then AList.Add(TObject(I)); -end; - -procedure TdxfmGridReportLinkDesignWindow.SetActivePage; -begin - PageControl1.ActivePage := PageControl1.Pages[DesignerTabIndex]; -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdatePreviewGridStyles(const ACaption: string; - AStyle: TcxStyle); -begin - with PreviewGrid.RootLevelStyles do - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxCaptionStyle)) then - begin - Tab := AStyle; - TabsBackground := AStyle; - end; - - with PreviewBandedView.Styles do - begin - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxBandHeaderStyle)) then - BandHeader := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentStyle)) then - Content := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentEvenStyle)) then - ContentEven := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentOddStyle)) then - ContentOdd := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxFooterStyle)) then - Footer := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxGroupStyle)) then - Group := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxHeaderStyle)) then - Header := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxPreviewStyle)) then - Preview := AStyle; - end; - - with PreviewCardView.Styles do - begin - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxCardCaptionRowStyle)) then - CaptionRow := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxCardRowCaptionStyle)) then - RowCaption := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentStyle)) then - Content := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentEvenStyle)) then - ContentEven := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentOddStyle)) then - ContentOdd := AStyle - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.UpdateWarningPane; -begin - with ReportLink.HostInfoServices do - wpIncorrectOnEveryPageState.SetStateAndHint(IsInconsistentState, InconsistentStateText); -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsCardsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsCards do - case Index of - 0: AutoWidth := Value; - 1: KeepSameWidth := Value; - 2: KeepSameHeight := Value; - 3: Borders := Value; - 4: RowBordersHorz := Value; - 5: RowBordersVert := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsChartsByIndex(Index: Integer; - Value: Boolean); -begin -{$IFDEF CHARTVIEW} - if LockControlsUpdate then Exit; - - with ReportLink.OptionsCharts do - case Index of - 0: Transparent := Value; - end; - Modified := True; -{$ENDIF} -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsDetailsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsDetails do - case Index of - 0: StartFromFocusedView := Value; - 1: OnlyFocusedView := Value; - end; - ReportLink.CalculateProcessParams; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsExpandingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsExpanding do - case Index of - 0: ExpandGroupRows := Value; - 1: ExpandMasterRows := Value; - {$IFDEF DXVER500} - 2: ExpandCards := Value; - {$ENDIF} - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsFormattingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsFormatting do - case Index of - 0: - begin - UseNativeStyles := Value; - InitializePreviewGridStyles; - RecreateStylesListBox; - end; - 1: SuppressBackgroundBitmaps := Value; - 2: ConsumeSelectionStyle := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsLevelsByIndex(Index: Integer; Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsLevels do - case Index of - 0: Unwrap := Value; - 1: UnwrapTopLevel := Value; - 2: RiseActiveLevelOntoTop := Value; - end; - ReportLink.CalculateProcessParams; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsOnEveryPageByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsOnEveryPage do - case Index of - 0: Caption := Value; - 1: BandHeaders := Value; - 2: Headers := Value; - 3: Footers := Value; - 4: FilterBar := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsPaginationByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsPagination do - case Index of - 0: TopLevelGroup := Value; - 1: OneGroupPerPage := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsRefinementsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsRefinements do - case Index of - 0: TransparentGraphics := Value; - 1: DisplayGraphicsAsText := Value; - 2: FlatCheckMarks := Value; - {$IFDEF DXVER500} - 3: TransparentRichEdits := Value; - {$ENDIF} - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsSelectionByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsSelection do - case Index of - 0: ProcessSelection := Value; - 1: ProcessExactSelection := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsSizeByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsSize do - case Index of - 0: AutoWidth := Value; - end; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.SetOptionsViewByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsView do - case Index of - 0: Caption := Value; - 1: BandHeaders := Value; - 2: Headers := Value; - 3: Footers := Value; - 4: GroupFooters := Value; - 5: ExpandButtons := Value; - 6: FilterBar := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsViewClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsViewByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsOnEveryPageClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsOnEveryPageByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsSelectionClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSelectionByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsExpandingClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsExpandingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsRefinementClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsRefinementsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsFormatingClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsFormattingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.lblUseNativeStylesClick(Sender: TObject); -begin - if chbxUseNativeStyles.CanFocus then ActiveControl := chbxUseNativeStyles; - chbxUseNativeStyles.Checked := not chbxUseNativeStyles.Checked; -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsPaginationClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsPaginationByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsSizeClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSizeByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsDetailsClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsDetailsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsLevelsClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsLevelsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.LookAndFeelClick(Sender: TObject); -begin - with TComboBox(Sender) do - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreviewWindow.Parent := TPageControl(Sender).ActivePage; - if not ReportLink.ProcessParams.HasOnlyCards then - if PageControl1.ActivePage = tshCards then - ChangeActiveView(PreviewCardView) - else - if PageControl1.ActivePage = tshStyles then - if ReportLink.IsCardViewStyle(ActiveStyle) then - ChangeActiveView(PreviewCardView) - else - ChangeActiveView(PreviewBandedView) - else - ChangeActiveView(PreviewBandedView); -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewVisibleClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.Visible := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewAutoHeightClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.AutoHeight := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.OptionsCardsClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsCardsByIndex(TTagToInt(Tag), Checked); - with TcxGridCardView2OptionsView(PreviewCardView.OptionsView), ReportLink.OptionsCards do - begin - CardBorders := Borders; - GridLines := dxPScxCommon.dxPSMakecxGridLines(RowBordersHorz, RowBordersVert); - end; - //UpdatePreview; -end; - -procedure TdxfmGridReportLinkDesignWindow.chbxChartsTransparentClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsChartsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmGridReportLinkDesignWindow.pmStylesPopup(Sender: TObject); -begin - lbxStyles.HideToolTips; - miStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - miStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStylesSelectAll.Enabled := CanSelectAllStyles; - miStylesSaveAs.Enabled := CanSaveStyles; -end; - -procedure TdxfmGridReportLinkDesignWindow.lbxStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - if not ReportLink.ProcessParams.HasOnlyCards then - if ReportLink.IsCardViewStyle(ActiveStyle) then - ChangeActiveView(PreviewCardView) - else - ChangeActiveView(PreviewBandedView); - UpdateControlsState; -end; - -procedure TdxfmGridReportLinkDesignWindow.IsSUVModelCustomDrawCell( - Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); - - procedure DrawBackground(const R: TRect); - - function GetParams: TcxViewParams; - begin - if AViewInfo is TcxGridCardRowDataViewInfo then - PreviewCardView.Styles.GetContentParams(AViewInfo.GridRecord, AViewInfo.Item, Result) - else - PreviewBandedView.Styles.GetContentParams(AViewInfo.GridRecord, AViewInfo.Item, Result); - end; - - var - BackgroundBitmap: TBitmap; - PrevColor: TColor; - begin - BackgroundBitmap := CustomGridView_GetBackgroundBitmaps(AViewInfo.GridRecord.GridView).GetBitmap(bbContent); - if BackgroundBitmap = nil then - begin - PrevColor := ACanvas.Brush.Color; - ACanvas.Brush.Color := GetParams.Color; - ACanvas.FillRect(R); - ACanvas.Brush.Color := PrevColor; - end - else - dxBkgnd.DrawPicture(BackgroundBitmap, ACanvas.Canvas, R, ppmTile, 1, 1, -R.Left, -R.Top); - end; - - procedure DrawCheck(R: TRect); - const - Painters: array[Boolean] of TcxCustomLookAndFeelPainterClass = - (TcxStandardLookAndFeelPainter, TcxUltraFlatLookAndFeelPainter); - CheckStateMap: array[Boolean] of TcxCheckBoxState = (cbsChecked, cbsUnchecked); - var - X, Y: Integer; - CheckState: Variant; - begin - with R do - begin - X := Left + (Right - Left - dxPSGlbl.CheckWidth) div 2; - Y := Top + (Bottom - Top - dxPSGlbl.CheckHeight) div 2; - end; - R := MakeBounds(X, Y, dxPSGlbl.CheckWidth, dxPSGlbl.CheckHeight); - - CheckState := Variant(CheckStateMap[AViewInfo.RecordViewInfo.GridRecord.RecordIndex = 2]); - with Painters[ReportLink.OptionsRefinements.FlatCheckMarks] do - DrawCheckButton(ACanvas, R, cxbsDefault, CheckState = Variant(cbsChecked)); - end; - -var - R: TRect; -begin - if (Sender is TcxGridTableView) or (AViewInfo is TcxGridCardRowDataViewInfo) then - begin - R := AViewInfo.Bounds; - DrawBackground(R); - DrawCheck(R); - - CustomDrawBorders(ACanvas, AViewInfo); - ADone := True; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.VendorLogoCustomDrawCell( - Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); -var - PrevText: string; -begin - if ReportLink.OptionsRefinements.DisplayGraphicsAsText and - ((Sender is TcxGridTableView) or (AViewInfo is TcxGridCardRowDataViewInfo)) then - begin - PrevText := AViewInfo.Text; - AViewInfo.Text := ReportLink.OptionsRefinements.GraphicsText; - AViewInfo.AlignmentVert := vaTop; - //AViewInfo.Transparent := True; - CustomDrawTextRect(ACanvas, AViewInfo.Bounds, AViewInfo, AViewInfo.RecordViewInfo.BackgroundBitmap); - AViewInfo.Text := PrevText; - CustomDrawBorders(ACanvas, AViewInfo); - ADone := True; - end; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewBandedViewCustomDrawColumnHeader( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); -var - R: TRect; -begin - R := AViewInfo.Bounds; - Dec(R.Left); - if not ((PreviewGrid.LookAndFeel.Kind = lfUltraFlat) and - not TcxGridBandedTableOptionsView(Sender.OptionsView).BandHeaders) then - Dec(R.Top); - CustomDrawHeader(ACanvas, R, AViewInfo); - - ADone := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewBandedViewCustomDrawBandHeader( - Sender: TcxGridBandedTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridBandHeaderViewInfo; var ADone: Boolean); -var - R: TRect; -begin - R := AViewInfo.Bounds; - Dec(R.Left); - CustomDrawHeader(ACanvas, R, AViewInfo); - - ADone := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.PreviewBandedViewCustomDrawFooterCell( - Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); -begin - CustomDrawFooter(ACanvas, AViewInfo.Bounds, AViewInfo); - ADone := True; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleColorClick(Sender: TObject); -begin - PerformStylesChangeColor; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleFontClick(Sender: TObject); -begin - PerformStylesChangeFont; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleBackgroundBitmapClick(Sender: TObject); -begin - PerformStylesChangeBitmap; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleBackgroundBitmapClearClick(Sender: TObject); -begin - PerformStylesClearBitmap; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleRestoreDefaultsClick(Sender: TObject); -begin - PerformStylesRestoreDefaults; -end; - -procedure TdxfmGridReportLinkDesignWindow.miStylesSelectAllClick(Sender: TObject); -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - with lbxStyles do - begin - {$IFDEF DELPHI6} - SelectAll; - {$ELSE} - Items.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - Selected[I] := True; - finally - Items.EndUpdate; - end; - {$ENDIF} - end; - UpdateControlsState; -end; - -procedure TdxfmGridReportLinkDesignWindow.cbxStyleSheetsClick(Sender: TObject); -begin - with TComboBox(Sender) do - ActiveStyleSheet := TcxCustomStyleSheet(Items.Objects[ItemIndex]); -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetNewClick(Sender: TObject); -begin - PerformStyleSheetNew; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetCopyClick(Sender: TObject); -begin - PerformStyleSheetCopy; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetDeleteClick(Sender: TObject); -begin - PerformStyleSheetDelete; -end; - -procedure TdxfmGridReportLinkDesignWindow.StyleSheetRenameClick(Sender: TObject); -begin - PerformStyleSheetRename; -end; - -procedure TdxfmGridReportLinkDesignWindow.StylesSaveAsClick(Sender: TObject); -begin - PerformStylesSaveAsStyleSheet; -end; - -procedure TdxfmGridReportLinkDesignWindow.cbxStyleSheetsKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - PerformStyleSheetKeyDown(Sender, Key, Shift); -end; - -procedure TdxfmGridReportLinkDesignWindow.cbxStyleSheetsDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -begin - PerformStyleSheetDrawItem(TComboBox(Control).Canvas, Index, Rect, State, Control.Enabled); -end; - -procedure RegisterAssistants; -begin - TdxCustomGridViewBuilder.Register; - TdxCustomGridTableViewBuilder.Register; - TdxGridTableViewBuilder.Register; - TdxGridDBTableViewBuilder.Register; - TdxGridBandedTableViewBuilder.Register; - TdxGridDBBandedTableViewBuilder.Register; - TdxGridCardViewBuilder.Register; - TdxGridDBCardViewBuilder.Register; -{$IFDEF CHARTVIEW} - TdxGridChartViewBuilder.Register; -{$ENDIF} - - TdxCustomGridViewHelper.Register; - TdxCustomGridTableViewHelper.Register; - TdxGridCardViewHelper.Register; - TdxGridTableViewHelper.Register; - TdxGridBandedTableViewHelper.Register; - - TdxCustomGridRecordHelper.Register; - TdxCustomGridRowHelper.Register; - TdxGridDataRowHelper.Register; - TdxGridGroupRowHelper.Register; - TdxGridMasterDataRowHelper.Register; - - TdxGridReportLinkStyleSheet.Register; -end; - -procedure RegisterItems; -begin - TdxReportCard.Register; - TdxReportCardRow.Register; -end; - -procedure UnregisterAssistants; -begin - TdxGridReportLinkStyleSheet.Unregister; - - TdxGridViewBuildersFactory.ReleaseInstance; - TdxViewHelpersFactory.ReleaseInstance; - TdxRecordHelpersFactory.ReleaseInstance; -end; - -procedure UnregisterItems; -begin - TdxReportCardRow.Unregister; - TdxReportCard.Unregister; -end; - -initialization - RegisterAssistants; - RegisterItems; - - dxPSRegisterReportLink(TdxGridReportLink, TcxGrid, TdxfmGridReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxGridReportLink, TcxGrid, TdxfmGridReportLinkDesignWindow); - - UnregisterItems; - UnregisterAssistants; - - FreeAndNil(FGridLinkStyleSheetPrototype); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnkPredefinedStyleSheets.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnkPredefinedStyleSheets.dfm deleted file mode 100644 index aa92920a..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,352 +0,0 @@ -object dxdmPScxGridLnkPredefinedStyles: TdxdmPScxGridLnkPredefinedStyles - OldCreateOrder = False - Left = 352 - Top = 156 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 37 - Top = 12 - object styleProfessionalFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3355443 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6582120 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalCaptionRow: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14541789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGreenFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGreenFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12778719 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14154698 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenSelected: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4949549 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11328403 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentBandHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsItalic] - TextColor = clBlack - end - object styleTransparentLevelCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFilterBar: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentCaptionRow: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13816275 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TdxGridReportLinkStyleSheet - Caption = 'Professional' - Styles.BandHeader = styleProfessionalFixed - Styles.Caption = styleProfessionalFixed - Styles.CardCaptionRow = styleProfessionalCaptionRow - Styles.CardRowCaption = styleProfessionalRowCaption - Styles.Content = styleNoneContent - Styles.ContentEven = styleProfessionalContentEven - Styles.ContentOdd = styleProfessionalContentOdd - Styles.FilterBar = styleProfessionalFixed - Styles.Footer = styleProfessionalFixed - Styles.Group = styleProfessionalGroup - Styles.Header = styleProfessionalFixed - Styles.Preview = styleProfessionalPreview - Styles.Selection = styleProfessionalSelection - BuiltIn = True - end - object ssGreen: TdxGridReportLinkStyleSheet - Caption = 'Green' - Styles.BandHeader = styleGreenFixed - Styles.Caption = styleGreenFixed - Styles.CardCaptionRow = styleGreenFixed - Styles.CardRowCaption = styleGreenFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleGreenLightContent - Styles.ContentOdd = styleNoneContent - Styles.FilterBar = styleGreenFixed - Styles.Footer = styleGreenFixed - Styles.Group = styleGreenGroup - Styles.Header = styleGreenFixed - Styles.Preview = styleGreenLightPreview - Styles.Selection = styleGreenSelected - BuiltIn = True - end - object ssTransparent: TdxGridReportLinkStyleSheet - Caption = 'Transparent' - Styles.BandHeader = styleTransparentBandHeader - Styles.Caption = styleTransparentLevelCaption - Styles.CardCaptionRow = styleTransparentCaptionRow - Styles.CardRowCaption = styleTransparentRowCaption - Styles.Content = styleTransparentContent - Styles.ContentEven = styleTransparentContentEven - Styles.ContentOdd = styleTransparentContentOdd - Styles.FilterBar = styleTransparentFilterBar - Styles.Footer = styleTransparentFooter - Styles.Group = styleTransparentGroup - Styles.Header = styleTransparentHeader - Styles.Preview = styleTransparentPreview - Styles.Selection = styleTransparentSelection - BuiltIn = True - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnkPredefinedStyleSheets.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnkPredefinedStyleSheets.pas deleted file mode 100644 index 6f22551c..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnkPredefinedStyleSheets.pas +++ /dev/null @@ -1,143 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxGridLnkPredefinedStyleSheets; - -interface - -{$I cxVer.inc} - -uses - Classes, {$IFNDEF DELPHI6} Forms, {$ENDIF} cxClasses, cxStyles, dxPScxGridLnk, - dxPScxCommon; - -type - TdxdmPScxGridLnkPredefinedStyles = class(TDataModule) - StyleRepository: TcxStyleRepository; - styleGreenFixed: TcxStyle; - styleGreenLightContent: TcxStyle; - styleProfessionalFixed: TcxStyle; - styleGreenLightPreview: TcxStyle; - ssGreen: TdxGridReportLinkStyleSheet; - ssProfessional: TdxGridReportLinkStyleSheet; - styleGreenFooter: TcxStyle; - styleNoneContent: TcxStyle; - styleNoneFixed: TcxStyle; - styleProfessionalGroup: TcxStyle; - styleProfessionalContentOdd: TcxStyle; - styleProfessionalContentEven: TcxStyle; - styleProfessionalSelection: TcxStyle; - styleProfessionalPreview: TcxStyle; - styleGreenSelected: TcxStyle; - styleGreenGroup: TcxStyle; - styleProfessionalRowCaption: TcxStyle; - styleProfessionalCaptionRow: TcxStyle; - ssTransparent: TdxGridReportLinkStyleSheet; - styleTransparentContent: TcxStyle; - styleTransparentBandHeader: TcxStyle; - styleTransparentHeader: TcxStyle; - styleTransparentFooter: TcxStyle; - styleTransparentGroup: TcxStyle; - styleTransparentPreview: TcxStyle; - styleTransparentLevelCaption: TcxStyle; - styleTransparentFilterBar: TcxStyle; - styleTransparentCaptionRow: TcxStyle; - styleTransparentRowCaption: TcxStyle; - styleTransparentContentEven: TcxStyle; - styleTransparentContentOdd: TcxStyle; - styleTransparentSelection: TcxStyle; - end; - -implementation - -{$R *.dfm} - -uses - cxStyleSheetsLoad; - -type - TdxPScxGridLnkPredefinedStyleSheets = class(TcxPredefinedStyleSheets) - private - FDataModule: TdxdmPScxGridLnkPredefinedStyles; - protected - procedure AddStyleSheets; override; - property DataModule: TdxdmPScxGridLnkPredefinedStyles read FDataModule; - public - constructor Create; override; - destructor Destroy; override; - - class procedure Register; - class procedure Unregister; - end; - -constructor TdxPScxGridLnkPredefinedStyleSheets.Create; -begin - inherited; - FDataModule := TdxdmPScxGridLnkPredefinedStyles.Create(nil); - AddStyleSheets; -end; - -destructor TdxPScxGridLnkPredefinedStyleSheets.Destroy; -begin - FDataModule.Free; - inherited; -end; - -class procedure TdxPScxGridLnkPredefinedStyleSheets.Register; -begin - cxStyleSheetsLoad.RegisterPredefinedStyleSheets(Self); -end; - -class procedure TdxPScxGridLnkPredefinedStyleSheets.Unregister; -begin - cxStyleSheetsLoad.UnregisterPredefinedStyleSheets(Self); -end; - -procedure TdxPScxGridLnkPredefinedStyleSheets.AddStyleSheets; -var - I: Integer; -begin - with DataModule.StyleRepository do - for I := 0 to StyleSheetCount - 1 do - AddStyleSheet(StyleSheets[I]); -end; - -initialization - TdxPScxGridLnkPredefinedStyleSheets.Register; - -finalization - TdxPScxGridLnkPredefinedStyleSheets.Unregister; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnkReg.pas deleted file mode 100644 index c2342843..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxGridLnkReg.pas +++ /dev/null @@ -1,376 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxGridLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - SysUtils, Classes, Controls, cxCustomData, cxDataStorage, cxStyles, cxGrid, - cxGridLevel, cxGridCustomView, cxGridCustomTableView, cxGridCardView, - cxGridTableView, cxGridBandedTableView, cxStyleSheetEditor, dxPScxGridLnk; - -type - TdxGridReportLinkStyleSheetEditorPreview = class(TcxStyleSheetEditorPreview) - private - FGrid: TcxGrid; - function GetBandedTableView: TcxGridBandedTableView; - function GetCardView: TcxGridCardView; - protected - function AddItem(AView: TcxCustomGridTableView; const ACaption: string; - AValueTypeClass: TcxValueTypeClass): TcxCustomGridTableItem; - procedure AddItems(AView: TcxCustomGridTableView); - procedure CreateBandedTableView; - procedure CreateCardView; - procedure Initialize; virtual; - - property BandedTableView: TcxGridBandedTableView read GetBandedTableView; - property CardView: TcxGridCardView read GetCardView; - property Grid: TcxGrid read FGrid; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - class function GetStyleSheetClass: TcxCustomStyleSheetClass; override; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); override; - - function Control: TWinControl; override; - - class procedure Register; - class procedure Unregister; - end; - -{ TdxGridReportLinkStyleSheetEditorPreview } - -constructor TdxGridReportLinkStyleSheetEditorPreview.Create(AOwner: TComponent); -begin -// inherited; cannot call ancestor method if it's an abstract method in Delphi4(5) !!!! - FGrid := TcxGrid.Create(AOwner); - Initialize; -end; - -destructor TdxGridReportLinkStyleSheetEditorPreview.Destroy; -begin - FGrid.Free; - inherited; -end; - -class function TdxGridReportLinkStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := TdxGridReportLinkStyleSheet; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); -begin - if AStyleSheet is TdxGridReportLinkStyleSheet then - with TdxGridReportLinkStyleSheet(AStyleSheet).Styles do - begin - BandedTableView.Styles.BandHeader := BandHeader; - BandedTableView.Styles.Content := Content; - BandedTableView.Styles.ContentEven := ContentEven; - BandedTableView.Styles.ContentOdd := ContentOdd; - BandedTableView.Styles.FilterBox := FilterBar; - BandedTableView.Styles.Footer := Footer; - BandedTableView.Styles.Group := Group; - BandedTableView.Styles.Header := Header; - BandedTableView.Styles.Indicator := Header; - BandedTableView.Styles.Preview := Preview; - - CardView.Styles.CaptionRow := CardCaptionRow; - CardView.Styles.Content := Content; - CardView.Styles.ContentEven := ContentEven; - CardView.Styles.ContentOdd := ContentOdd; - CardView.Styles.RowCaption := CardRowCaption; - - Grid.RootLevelStyles.Tab := Caption; - Grid.RootLevelStyles.TabsBackground := Caption; - end - else - begin - BandedTableView.Styles.ResetStyles; - CardView.Styles.ResetStyles; - Grid.RootLevelStyles.ResetStyles; - end; -end; - -function TdxGridReportLinkStyleSheetEditorPreview.Control: TWinControl; -begin - Result := Grid; -end; - -class procedure TdxGridReportLinkStyleSheetEditorPreview.Register; -begin - cxStyleSheetEditor.RegisterStyleSheetEditorPreview(Self); -end; - -class procedure TdxGridReportLinkStyleSheetEditorPreview.Unregister; -begin - cxStyleSheetEditor.UnregisterStyleSheetEditorPreview(Self); -end; - -function TdxGridReportLinkStyleSheetEditorPreview.AddItem(AView: TcxCustomGridTableView; - const ACaption: string; AValueTypeClass: TcxValueTypeClass): TcxCustomGridTableItem; -begin - Result := AView.CreateItem; - with Result do - begin - Caption := ACaption; - DataBinding.ValueTypeClass := AValueTypeClass; - end; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.AddItems(AView: TcxCustomGridTableView); -begin - AddItem(AView, 'Text', TcxStringValueType); - AddItem(AView, 'Currency', TcxCurrencyValueType); - AddItem(AView, 'Date', TcxDateTimeValueType); -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.CreateBandedTableView; - - procedure AddBands; - begin - BandedTableView.Bands.Add.Caption := 'Band'; - end; - - procedure AddGroups; - begin - BandedTableView.Columns[2].GroupIndex := 0; - end; - - procedure AddPreview; - begin - with BandedTableView.Preview do - begin - Column := AddItem(BandedTableView, '', TcxStringValueType) as TcxGridColumn; - Column.Visible := False; - Visible := True; - end; - end; - - procedure AddRecords; - const - ARecordCount: Integer = 3; - var - I: Integer; - begin - with BandedTableView.DataController as TcxGridDataController do - begin - BeginUpdate; - try - RecordCount := ARecordCount; - for I := 0 to ARecordCount - 1 do - begin - Values[I, 0] := 'ABC'; - Values[I, 1] := (I + 1) * 100; - Values[I, 2] := Date - I; - Values[I, 3] := 'Check the preview style'; - end; - finally - EndUpdate; - end; - end; - end; - - procedure AddSummaries; - begin - with BandedTableView do - begin - DataController.Groups.FullExpand; - with DataController.Summary.FooterSummaryItems.Add do - begin - Kind := skSum; - ItemLink := Columns[1]; - end; - end; - end; - - procedure InitializeOptions; - begin - with BandedTableView do - begin - Filtering.CustomizeDialog := False; - - OptionsBehavior.IncSearch := True; - - OptionsData.Deleting := False; - OptionsData.Editing := False; - OptionsData.Appending := False; - OptionsData.Inserting := False; - - OptionsView.BandHeaders := True; - OptionsView.ColumnAutoWidth := True; - OptionsView.Footer := True; - OptionsView.Indicator := True; - end; - end; - - procedure PlaceColumns; - var - I: Integer; - begin - with BandedTableView do - for I := 0 to ItemCount - 1 do - Columns[I].Position.BandIndex := 0; - end; - -begin - Grid.Levels.Add.GridView := Grid.CreateView(TcxGridBandedTableView); - TcxGridLevel(BandedTableView.Level).Caption := 'Table'; - - AddBands; - AddItems(BandedTableView); - AddGroups; - AddPreview; - AddRecords; - AddSummaries; - InitializeOptions; - PlaceColumns; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.CreateCardView; - - procedure AddRecords; - const - ARecordCount: Integer = 3; - var - I: Integer; - begin - with CardView.DataController as TcxGridDataController do - begin - BeginUpdate; - try - RecordCount := ARecordCount; - for I := 0 to ARecordCount - 1 do - begin - Values[I, 1] := 'ABC'; - Values[I, 2] := (I + 1) * 100; - Values[I, 3] := Date - I; - end; - finally - EndUpdate; - end; - end; - end; - - procedure AddCaptionRow; - begin - with CardView.CreateRow do - begin - Caption := 'Caption'; - Index := 0; - Kind := rkCaption; - end; - end; - - procedure InitializeOptions; - begin - with CardView do - begin - OptionsBehavior.IncSearch := True; - - OptionsData.Deleting := False; - OptionsData.Editing := False; - OptionsData.Appending := False; - OptionsData.Inserting := False; - end; - end; - -begin - Grid.Levels.Add.GridView := Grid.CreateView(TcxGridCardView); - TcxGridLevel(CardView.Level).Caption := 'Cards'; - - AddItems(CardView); - AddCaptionRow; - AddRecords; - InitializeOptions; -end; - -procedure TdxGridReportLinkStyleSheetEditorPreview.Initialize; -begin - CreateBandedTableView; - CreateCardView; - - Grid.RootLevelOptions.DetailTabsPosition := dtpTop; -end; - -function TdxGridReportLinkStyleSheetEditorPreview.GetBandedTableView: TcxGridBandedTableView; -begin - Result := Grid.Levels[0].GridView as TcxGridBandedTableView; -end; - -function TdxGridReportLinkStyleSheetEditorPreview.GetCardView: TcxGridCardView; -begin - Result := Grid.Levels[1].GridView as TcxGridCardView; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TdxGridReportLink, TdxGridReportLinkStyleSheet]); -end; - -procedure RegisterStyleSheetAssistants; -begin - cxStyles.RegisterStyleSheetClass(TdxGridReportLinkStyleSheet); - TdxGridReportLinkStyleSheetEditorPreview.Register; -end; - -procedure UnregisterStyleSheetAssistants; -begin - TdxGridReportLinkStyleSheetEditorPreview.Unregister; - cxStyles.UnregisterStyleSheetClass(TdxGridReportLinkStyleSheet); -end; - -initialization - RegisterStyleSheetAssistants; - -finalization - UnregisterStyleSheetAssistants; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxImgLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxImgLnk.pas deleted file mode 100644 index 1fba5dc9..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxImgLnk.pas +++ /dev/null @@ -1,45 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxImgLnk; - -interface - -// All code was moved to dxPScxEditorLnks.pas - -implementation - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxListBoxLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxListBoxLnk.pas deleted file mode 100644 index 2b7ce7c8..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxListBoxLnk.pas +++ /dev/null @@ -1,44 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxListBoxLnk; - -// all code was moved to dxPScxEditorLnks.pas - -interface - -implementation - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxMCListBoxLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxMCListBoxLnk.dfm deleted file mode 100644 index 0bcc7906..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxMCListBoxLnk.dfm +++ /dev/null @@ -1,656 +0,0 @@ -object cxfmMCListBoxDesignWindow: TcxfmMCListBoxDesignWindow - Left = 391 - Top = 313 - BorderIcons = [biSystemMenu, biMinimize, biMaximize, biHelp] - BorderStyle = bsDialog - Caption = 'cxfmMCListBoxDesignWindow' - ClientHeight = 293 - ClientWidth = 558 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 6 - Width = 549 - Height = 251 - ActivePage = tshColor - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 223 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 5 - Top = 12 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 40 - Top = 17 - Width = 194 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 7 - Top = 34 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 125 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object Image1: TImage - Left = 7 - Top = 149 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel10: TBevel - Left = 84 - Top = 129 - Width = 150 - Height = 4 - Shape = bsBottomLine - end - object chbxShowVertLines: TCheckBox - Tag = 2 - Left = 95 - Top = 75 - Width = 137 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 2 - OnClick = ShowClick - end - object chbxShowBorders: TCheckBox - Left = 95 - Top = 29 - Width = 137 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = ShowClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 95 - Top = 51 - Width = 137 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = ShowClick - end - object chbxShowColumnHeaders: TCheckBox - Tag = 3 - Left = 95 - Top = 99 - Width = 137 - Height = 17 - Caption = '&Column Headers' - TabOrder = 3 - OnClick = ShowClick - end - object chbxHeadersOnEveryPage: TCheckBox - Left = 95 - Top = 148 - Width = 137 - Height = 17 - Caption = 'Headers' - TabOrder = 4 - OnClick = HeadersOnEveryPageClick - end - object lblPreview: TStaticText - Left = 244 - Top = 2 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 5 - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 223 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 6 - Top = 200 - Width = 79 - Height = 13 - Caption = '&Grid lines color : ' - end - object bvlGridLineColorHost: TBevel - Left = 91 - Top = 196 - Width = 127 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 5 - Top = 17 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - end - object gbxTransparentHeaders: TGroupBox - Left = 5 - Top = 131 - Width = 223 - Height = 55 - Caption = ' ' - TabOrder = 4 - object lblHeadersColor: TLabel - Left = 6 - Top = 24 - Width = 78 - Height = 13 - Caption = 'Headers Color : ' - end - object bvlHeadersColorHost: TBevel - Left = 86 - Top = 22 - Width = 127 - Height = 21 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 45 - Width = 223 - Height = 80 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 6 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - end - object bvlColorHost: TBevel - Left = 86 - Top = 20 - Width = 127 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 6 - Top = 51 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - end - object bvlEvenColorHost: TBevel - Left = 86 - Top = 47 - Width = 127 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 43 - Width = 15 - Height = 17 - Caption = 'T&ransparent' - TabOrder = 1 - OnClick = TransparentClick - end - object chbxTransparentHeaders: TCheckBox - Tag = 1 - Left = 18 - Top = 129 - Width = 15 - Height = 17 - Caption = 'T&ransparent Headers' - TabOrder = 3 - OnClick = TransparentClick - end - object cbxDrawMode: TComboBox - Left = 69 - Top = 12 - Width = 159 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = DrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 44 - Width = 69 - Height = 17 - Caption = ' Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stTransparentHeaders: TStaticText - Left = 33 - Top = 130 - Width = 112 - Height = 17 - Caption = ' Transparent Headers ' - FocusControl = chbxTransparentHeaders - TabOrder = 6 - OnClick = stTransparentHeadersClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 223 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 21 - Caption = 'Fo&nt...' - TabOrder = 0 - OnClick = FontClick - end - object edFont: TEdit - Left = 8 - Top = 34 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnHeadersFont: TButton - Tag = 2 - Left = 8 - Top = 122 - Width = 110 - Height = 21 - Caption = 'Headers Font...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 4 - OnClick = FontClick - end - object edFixedFont: TEdit - Left = 8 - Top = 147 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 5 - end - object btnEvenFont: TButton - Tag = 1 - Left = 8 - Top = 65 - Width = 110 - Height = 21 - Caption = 'E&ven Font...' - TabOrder = 2 - OnClick = FontClick - end - object edEvenFont: TEdit - Left = 8 - Top = 90 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 223 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Image3: TImage - Left = 7 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblSelection: TLabel - Left = 5 - Top = 12 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object Bevel3: TBevel - Left = 53 - Top = 17 - Width = 179 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 81 - Width = 67 - Height = 13 - Caption = 'Look And Feel' - end - object Bevel15: TBevel - Left = 81 - Top = 85 - Width = 151 - Height = 4 - Shape = bsBottomLine - end - object Image8: TImage - Left = 7 - Top = 101 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblMiscellaneous: TLabel - Left = 6 - Top = 147 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object Bevel4: TBevel - Left = 80 - Top = 152 - Width = 152 - Height = 4 - Shape = bsBottomLine - end - object Image5: TImage - Left = 7 - Top = 167 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxIncludeFixed: TCheckBox - Left = 95 - Top = 51 - Width = 139 - Height = 17 - Caption = '&Including fixed cells' - TabOrder = 1 - OnClick = IncludeFixedClick - end - object chbxOnlySelected: TCheckBox - Left = 95 - Top = 29 - Width = 139 - Height = 17 - Caption = 'Only &selected cells' - TabOrder = 0 - OnClick = OnlySelectedClick - end - object chbxUse3DEffects: TCheckBox - Tag = 12 - Left = 95 - Top = 96 - Width = 139 - Height = 17 - Caption = '3D Effects' - TabOrder = 2 - OnClick = Use3DEffectsClick - end - object chbxUseSoft3D: TCheckBox - Tag = 13 - Left = 95 - Top = 118 - Width = 139 - Height = 17 - Caption = 'Soft &3D' - TabOrder = 3 - OnClick = UseSoft3DClick - end - object chbxRowAutoHeight: TCheckBox - Left = 95 - Top = 185 - Width = 139 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 5 - OnClick = RowAutoHeightClick - end - object chbxAutoWidth: TCheckBox - Left = 95 - Top = 163 - Width = 139 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 4 - OnClick = chbxAutoWidthClick - end - end - end - end - object pnlPreview: TPanel - Left = 252 - Top = 49 - Width = 293 - Height = 200 - BevelOuter = bvLowered - TabOrder = 1 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxMCListBoxLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxMCListBoxLnk.pas deleted file mode 100644 index 9953c694..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxMCListBoxLnk.pas +++ /dev/null @@ -1,979 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxMCListBoxLnk; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, Classes, Graphics, Controls, ImgList, Dialogs, StdCtrls, - ExtCtrls, ComCtrls, cxMCListBox, cxHeader, dxPSGlbl, dxPSCore, dxPSForm, - dxPSBaseGridLnk, dxExtCtrls, cxDrawTextUtils; - -type - TcxMCListBoxPaintOption = (mclbpoBorder, mclbpoHorzLines, mclbpoVertLines, mclbpoColumnHeaders); - TcxMCListBoxPaintOptions = set of TcxMCListBoxPaintOption; - - TcxMCListBoxReportLink = class; - - TcxMCListBoxCustomDrawItemEvent = procedure(Sender: TcxMCListBoxReportLink; - ACanvas: TCanvas; ACol, ARow: Integer; AnItem: TdxReportCellString; - var ADone: Boolean) of object; - - TcxMCListBoxReportLink = class(TAbstractdxGridReportLink) - private - FOptions: TcxMCListBoxPaintOptions; - FOnCustomDrawItem: TcxMCListBoxCustomDrawItemEvent; - - function GetColumn(Index: Integer): TcxHeaderSection; - function GetcxMCListBox: TcxMCListBox; - function GetHeaderColor: TColor; - function GetHeaderFont: TFont; - function GetHeaderTransparent: Boolean; - function GetIncludeHeaders: Boolean; - function GetOptions: TcxMCListBoxPaintOptions; - function GetText(Column, Row: Integer): string; - procedure SetOnCustomDrawItem(Value: TcxMCListBoxCustomDrawItemEvent); - procedure SetHeaderColor(Value: TColor); - procedure SetHeaderFont(Value: TFont); - procedure SetHeaderTransparent(Value: Boolean); - procedure SetIncludeHeaders(Value: Boolean); - procedure SetOptions(Value: TcxMCListBoxPaintOptions); - - function AreColumnHeadersShown: Boolean; - function HasHeaderSections: Boolean; - protected - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - procedure DoCustomDrawItem(ACanvas: TCanvas; AnItem: TdxReportCellString; - var ADone: Boolean); dynamic; - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - - function GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; override; - - function GetColCount: Integer; override; - function GetFixedRowCount: Integer; override; - function GetRowCount: Integer; override; - - function GetCellImageIndex(ACol, ARow: Integer): Integer; override; - function GetCellImageList(ACol, ARow: Integer): TCustomImageList; override; - function GetCellMultiline(ACol, ARow: Integer): Boolean; override; - function GetCellText(ACol, ARow: Integer): string; override; - function GetCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; override; - function GetColSortOrder(ACol: Integer): TdxCellSortOrder; override; - function GetSelectedColCount: Integer; override; - function GetSelectedRowCount: Integer; override; - function GetSourceColWidth(ACol: Integer): Integer; override; - function GetSourceRowHeight(ARow: Integer): Integer; override; - function HasColumnHeaderImage(ACol: Integer): Boolean; override; - function HasSelection: Boolean; override; - function HasSelectionInCol(ACol: Integer): Boolean; override; - function HasSelectionInRow(ARow: Integer): Boolean; override; - function IsDrawBorder: Boolean; override; - function IsDrawFixedHorzLines: Boolean; override; - function IsDrawHorzLines: Boolean; override; - function IsDrawVertLines: Boolean; override; - function IsSelectedCell(ACol, ARow: Integer): Boolean; override; - function IsSelectedRow(ARow: Integer): Boolean; override; - procedure SetDrawMode(Value: TdxGridDrawMode); override; - - property Columns[Index: Integer]: TcxHeaderSection read GetColumn; - property Texts[Column, Row: Integer]: string read GetText; - public - procedure Assign(Source: TPersistent); override; - - property cxMCListBox: TcxMCListBox read GetcxMCListBox; - published - property AutoWidth; - property DrawMode write SetDrawMode; - property Effects3D; - property EndEllipsis; - property EvenColor; - property EvenFont; - property HeaderColor: TColor read GetHeaderColor write SetHeaderColor default clBtnFace; - property HeaderFont: TFont read GetHeaderFont write SetHeaderFont stored IsFixedFontStored; - property HeaderTransparent: Boolean read GetHeaderTransparent write SetHeaderTransparent default False; - property IncludeHeaders: Boolean read GetIncludeHeaders write SetIncludeHeaders default True; - property GridLineColor; - property OnlySelected; - property Options: TcxMCListBoxPaintOptions read GetOptions write SetOptions - default [Low(TcxMCListBoxPaintOption)..High(TcxMCListBoxPaintOption)]; - property RowAutoHeight; - property Soft3D; - property SupportedCustomDraw; - property Transparent; - property UseCustomPageBreaks; - property UseHorzDelimiters; - property UseVertDelimiters; - - property OnCustomDrawItem: TcxMCListBoxCustomDrawItemEvent read FOnCustomDrawItem write SetOnCustomDrawItem; - property OnGetCustomPageBreaks; - property OnInitializeItem; - end; - - TcxfmMCListBoxDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshOptions: TTabSheet; - pnlOptions: TPanel; - lblShow: TLabel; - Bevel11: TBevel; - imgGrid: TImage; - chbxShowVertLines: TCheckBox; - chbxShowBorders: TCheckBox; - chbxShowHorzLines: TCheckBox; - tshColor: TTabSheet; - pnlColor: TPanel; - lblGridLinesColor: TLabel; - bvlGridLineColorHost: TBevel; - gbxTransparentHeaders: TGroupBox; - lblHeadersColor: TLabel; - bvlHeadersColorHost: TBevel; - gbxTransparent: TGroupBox; - lblColor: TLabel; - bvlColorHost: TBevel; - lblEvenColor: TLabel; - bvlEvenColorHost: TBevel; - chbxTransparent: TCheckBox; - chbxTransparentHeaders: TCheckBox; - tshFont: TTabSheet; - pnlFont: TPanel; - btnFont: TButton; - edFont: TEdit; - btnHeadersFont: TButton; - edFixedFont: TEdit; - btnEvenFont: TButton; - edEvenFont: TEdit; - tshBehaviors: TTabSheet; - Panel1: TPanel; - Image3: TImage; - lblSelection: TLabel; - Bevel3: TBevel; - lblLookAndFeel: TLabel; - Bevel15: TBevel; - Image8: TImage; - chbxIncludeFixed: TCheckBox; - chbxOnlySelected: TCheckBox; - chbxUse3DEffects: TCheckBox; - chbxUseSoft3D: TCheckBox; - pnlPreview: TPanel; - chbxShowColumnHeaders: TCheckBox; - lblDrawMode: TLabel; - cbxDrawMode: TComboBox; - lblMiscellaneous: TLabel; - Bevel4: TBevel; - Image5: TImage; - chbxRowAutoHeight: TCheckBox; - lblOnEveryPage: TLabel; - Image1: TImage; - Bevel10: TBevel; - chbxHeadersOnEveryPage: TCheckBox; - lblPreview: TStaticText; - chbxAutoWidth: TCheckBox; - stTransparent: TStaticText; - stTransparentHeaders: TStaticText; - procedure DrawModeClick(Sender: TObject); - procedure ShowClick(Sender: TObject); - procedure RowAutoHeightClick(Sender: TObject); - procedure TransparentClick(Sender: TObject); - procedure FontClick(Sender: TObject); - procedure HeadersOnEveryPageClick(Sender: TObject); - procedure OnlySelectedClick(Sender: TObject); - procedure IncludeFixedClick(Sender: TObject); - procedure Use3DEffectsClick(Sender: TObject); - procedure UseSoft3DClick(Sender: TObject); - procedure ColorChange(Sender: TObject); - procedure PreviewPaint(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure cbxDrawModeDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure chbxAutoWidthClick(Sender: TObject); - procedure stTransparentClick(Sender: TObject); - procedure stTransparentHeadersClick(Sender: TObject); - private - FccbxColor: TdxPSColorCombo; - FccbxEvenColor: TdxPSColorCombo; - FccbxFixedColor: TdxPSColorCombo; - FccbxGridLineColor: TdxPSColorCombo; - FPreviewBox: TdxPSPaintPanel; - function GetReportLink: TcxMCListBoxReportLink; - - procedure CreateControls; - procedure CMDialogChar(var message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - public - constructor Create(AOwner: TComponent); override; - property ReportLink: TcxMCListBoxReportLink read GetReportLink; - end; - -const - dxDefaultMCListBoxOptions = [Low(TcxMCListBoxPaintOption)..High(TcxMCListBoxPaintOption)]; - -implementation - -{$R *.dfm} - -uses - SysUtils, Forms, cxClasses, cxLookAndFeels, dxPSRes, dxPSUtl, dxPrnDev; - -const - SortOrderMap: array[TcxHeaderSortOrder] of TdxCellSortOrder = (csoNone, csoUp, csoDown); - -{ TcxMCListBoxReportLink } - -procedure TcxMCListBoxReportLink.Assign(Source: TPersistent); -begin - if Source is TcxMCListBoxReportLink then - with TcxMCListBoxReportLink(Source) do - begin - Self.Options := Options; - end; - inherited; -end; - -procedure TcxMCListBoxReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -begin -// if AItem.Data <> 0 then - DoCustomDrawItem(ACanvas, TdxReportCellString(AItem), ADone); -end; - -procedure TcxMCListBoxReportLink.DoCustomDrawItem(ACanvas: TCanvas; - AnItem: TdxReportCellString; var ADone: Boolean); -var - Col, Row: Integer; -begin - if Assigned(FOnCustomDrawItem) then - begin - GetCellColRow(AnItem, Col, Row); - FOnCustomDrawItem(Self, ACanvas, Col, Row, AnItem, ADone); - end; -end; - -procedure TcxMCListBoxReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(cxMCListBox.Images); -end; - -procedure TcxMCListBoxReportLink.InternalRestoreDefaults; -begin - inherited; - Options := dxDefaultMCListBoxOptions; -end; - -procedure TcxMCListBoxReportLink.InternalRestoreFromOriginal; -begin - inherited; - EndEllipsis := cxMCListBox.ShowEndEllipsis; - Multiline := cxMCListBox.MultiLines; - Options := [mclbpoBorder]; - if cxMCListBox.ShowColumnLines then - Options := Options + [mclbpoVertLines]; - with cxMCListBox.Style.LookAndFeel do - begin - Effects3D := (lfvKind in AssignedValues) and (Kind <> lfUltraFlat); - Soft3D := (lfvKind in AssignedValues) and (Kind = lfFlat); - end; -end; - -function TcxMCListBoxReportLink.GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; -const - ItemClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellString, TdxReportCellImage); -begin - Result := ItemClasses[IsFixedRow(ARow)]; -end; - -function TcxMCListBoxReportLink.GetColCount: Integer; -begin - Result := cxMCListBox.HeaderSections.Count; - if Result = 0 then Result := 1; -end; - -function TcxMCListBoxReportLink.GetFixedRowCount: Integer; -begin - Result := Ord(AreColumnHeadersShown); -end; - -function TcxMCListBoxReportLink.GetRowCount: Integer; -begin - Result := cxMCListBox.Items.Count + Ord(AreColumnHeadersShown); -end; - -function TcxMCListBoxReportLink.GetCellImageIndex(ACol, ARow: Integer): Integer; -begin - if HasHeaderSections and IsFixedRow(ARow) then - Result := Columns[ACol].ImageIndex - else - Result := inherited GetCellImageIndex(ACol, ARow); -end; - -function TcxMCListBoxReportLink.GetCellImageList(ACol, ARow: Integer): TCustomImageList; -begin - if HasHeaderSections and IsFixedRow(ARow) then - Result := cxMCListBox.Images - else - Result := inherited GetCellImageList(ACol, ARow); -end; - -function TcxMCListBoxReportLink.GetCellMultiline(ACol, ARow: Integer): Boolean; -begin - Result := cxMCListBox.MultiLines; -end; - -function TcxMCListBoxReportLink.GetCellText(ACol, ARow: Integer): string; -begin - if IsFixedRow(ARow) then - if HasHeaderSections then - Result := Columns[ACol].Text - else - Result := '' - else - Result := Texts[ACol, ARow - Ord(AreColumnHeadersShown)]; -end; - -function TcxMCListBoxReportLink.GetCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; -begin - if HasHeaderSections then - Result := dxTextAlignX[Columns[ACol].Alignment] - else - Result := dxTextAlignX[cxMCListBox.Alignment]; -end; - -function TcxMCListBoxReportLink.GetColSortOrder(ACol: Integer): TdxCellSortOrder; -begin - if HasHeaderSections then - Result := SortOrderMap[Columns[ACol].SortOrder] - else - Result := inherited GetColSortOrder(ACol); -end; - -function TcxMCListBoxReportLink.GetSelectedColCount: Integer; -begin - if HasHeaderSections then - Result := cxMCListBox.HeaderSections.Count - else - Result := 1; -end; - -function TcxMCListBoxReportLink.GetSelectedRowCount: Integer; -begin - Result := cxMCListBox.SelCount; -end; - -function TcxMCListBoxReportLink.GetSourceColWidth(ACol: Integer): Integer; -begin - if HasHeaderSections then - Result := Columns[ACol].Width - else - Result := cxMCListBox.Width; -end; - -function TcxMCListBoxReportLink.GetSourceRowHeight(ARow: Integer): Integer; -begin - Result := inherited GetSourceRowHeight(ARow); - if Result = 0 then - Result := GetMinRowHeight(ScreenDC, Font); -end; - -function TcxMCListBoxReportLink.HasColumnHeaderImage(ACol: Integer): Boolean; -begin - Result := HasHeaderSections and (cxMCListBox.Images <> nil) and (Columns[ACol].ImageIndex > -1) and - (Columns[ACol].ImageIndex < cxMCListBox.Images.Count); -end; - -function TcxMCListBoxReportLink.HasSelection: Boolean; -begin - Result := inherited HasSelection and (cxMCListBox.SelCount > 0); -end; - -function TcxMCListBoxReportLink.HasSelectionInCol(ACol: Integer): Boolean; -begin - Result := True; -end; - -function TcxMCListBoxReportLink.HasSelectionInRow(ARow: Integer): Boolean; -begin - Result := IsSelectedRow(ARow); -end; - -function TcxMCListBoxReportLink.IsDrawBorder: Boolean; -begin - Result := mclbpoBorder in Options; -end; - -function TcxMCListBoxReportLink.IsDrawHorzLines: Boolean; -begin - Result := mclbpoHorzLines in Options; -end; - -function TcxMCListBoxReportLink.IsDrawVertLines: Boolean; -begin - Result := mclbpoVertLines in Options; -end; - -function TcxMCListBoxReportLink.IsDrawFixedHorzLines: Boolean; -begin - Result := mclbpoBorder in Options; -end; - -function TcxMCListBoxReportLink.IsSelectedCell(ACol, ARow: Integer): Boolean; -begin - Result := IsSelectedRow(ARow); -end; - -function TcxMCListBoxReportLink.IsSelectedRow(ARow: Integer): Boolean; -begin - if IsFixedRow(ARow) then - Result := IncludeHeaders - else - Result := cxMCListBox.Selected[ARow - Ord(AreColumnHeadersShown)]; -end; - -procedure TcxMCListBoxReportLink.SetDrawMode(Value: TdxGridDrawMode); -begin - if Value = gdmBorrowSource then Value := gdmStrict; - inherited; -end; - -function TcxMCListBoxReportLink.GetColumn(Index: Integer): TcxHeaderSection; -begin - Result := cxMCListBox.HeaderSections[Index]; -end; - -function TcxMCListBoxReportLink.GetcxMCListBox: TcxMCListBox; -begin - Result := TcxMCListBox(Component); -end; - -function TcxMCListBoxReportLink.GetHeaderColor: TColor; -begin - Result := FixedColor; -end; - -function TcxMCListBoxReportLink.GetHeaderFont: TFont; -begin - Result := FixedFont; -end; - -function TcxMCListBoxReportLink.GetHeaderTransparent: Boolean; -begin - Result := FixedTransparent; -end; - -function TcxMCListBoxReportLink.GetIncludeHeaders: Boolean; -begin - Result := IncludeFixed; -end; - -function TcxMCListBoxReportLink.GetOptions: TcxMCListBoxPaintOptions; -begin - Result := FOptions; -end; - -function TcxMCListBoxReportLink.GetText(Column, Row: Integer): string; -var - TextLine: string; - P, I: Integer; -begin - TextLine := cxMCListBox.Items[Row]; - if cxMCListBox.Delimiter <> #0 then - begin - I := -1; - repeat - P := Pos(cxMCListBox.Delimiter, TextLine); - if P <> 0 then - begin - Result := Copy(TextLine, 1, P - 1); - Delete(TextLine, 1, P); - end - else - Result := TextLine; - Inc(I); - until (I = Column) or (P = 0); - end - else - Result := TextLine; -end; - -procedure TcxMCListBoxReportLink.SetOnCustomDrawItem(Value: TcxMCListBoxCustomDrawItemEvent); -begin - if @FOnCustomDrawItem <> @Value then - begin - FOnCustomDrawItem := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxMCListBoxReportLink.SetHeaderColor(Value: TColor); -begin - FixedColor := Value; -end; - -procedure TcxMCListBoxReportLink.SetHeaderFont(Value: TFont); -begin - FixedFont := Value; -end; - -procedure TcxMCListBoxReportLink.SetHeaderTransparent(Value: Boolean); -begin - FixedTransparent := Value; -end; - -procedure TcxMCListBoxReportLink.SetIncludeHeaders(Value: Boolean); -begin - IncludeFixed := Value; -end; - -procedure TcxMCListBoxReportLink.SetOptions(Value: TcxMCListBoxPaintOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - LinkModified(True); - end; -end; - -function TcxMCListBoxReportLink.AreColumnHeadersShown: Boolean; -begin - Result := mclbpoColumnHeaders in Options; -end; - -function TcxMCListBoxReportLink.HasHeaderSections: Boolean; -begin - Result := cxMCListBox.HeaderSections.Count <> 0; -end; - -{ TcxfmMCListBoxDesignWindow } - -constructor TcxfmMCListBoxDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxPSGlbl.dxhccxMCListBoxReportLinkDesigner; - inherited; - CreateControls; - PageControl1.ActivePage := PageControl1.Pages[0]; -end; - -procedure TcxfmMCListBoxDesignWindow.DoInitialize; -begin - inherited; - - chbxShowBorders.Checked := mclbpoBorder in ReportLink.Options; - chbxShowHorzLines.Checked := mclbpoHorzLines in ReportLink.Options; - chbxShowVertLines.Checked := mclbpoVertLines in ReportLink.Options; - chbxShowColumnHeaders.Checked := mclbpoColumnHeaders in ReportLink.Options; - - chbxAutoWidth.Checked := ReportLink.AutoWidth; - chbxRowAutoHeight.Checked := ReportLink.RowAutoHeight; - - with cbxDrawMode do - ItemIndex := Items.IndexOfObject(TObject(ReportLink.DrawMode)); - - chbxTransparent.Checked := ReportLink.Transparent; - TdxPSColorCombo(FccbxColor).ColorValue := ColorToRGB(ReportLink.Color); - TdxPSColorCombo(FccbxEvenColor).ColorValue := ColorToRGB(ReportLink.EvenColor); - chbxTransparentHeaders.Checked := ReportLink.HeaderTransparent; - TdxPSColorCombo(FccbxFixedColor).ColorValue := ColorToRGB(ReportLink.HeaderColor); - TdxPSColorCombo(FccbxGridLineColor).ColorValue := ColorToRGB(ReportLink.GridLineColor); - - FontInfoToText(ReportLink.Font, edFont); - FontInfoToText(ReportLink.EvenFont, edEvenFont); - FontInfoToText(ReportLink.HeaderFont, edFixedFont); - - chbxHeadersOnEveryPage.Checked := ReportLink.HeadersOnEveryPage; - chbxOnlySelected.Checked := ReportLink.OnlySelected; - chbxIncludeFixed.Checked := ReportLink.IncludeFixed; - - chbxUse3DEffects.Checked := ReportLink.Effects3D; - chbxUseSoft3D.Checked := ReportLink.Soft3D; -end; - -{$IFDEF DELPHI7} -function TcxfmMCListBoxDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TcxfmMCListBoxDesignWindow.LoadStrings; -begin - inherited; - - tshOptions.Caption := cxGetResourceString(@sdxOptions); - tshFont.Caption := cxGetResourceString(@sdxFonts); - tshColor.Caption := cxGetResourceString(@sdxColors); - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviors); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblShow.Caption := cxGetResourceString(@sdxShow); - chbxShowBorders.Caption := cxGetResourceString(@sdxBorderLines); - chbxShowHorzLines.Caption := cxGetResourceString(@sdxHorzLines); - chbxShowVertLines.Caption := cxGetResourceString(@sdxVertLines); - chbxShowColumnHeaders.Caption := cxGetResourceString(@sdxColumnHeaders); - - lblMiscellaneous.Caption := cxGetResourceString(@sdxMiscellaneous); - chbxRowAutoHeight.Caption := cxGetResourceString(@sdxRowAutoHeight); - lblDrawMode.Caption := cxGetResourceString(@sdxDrawMode); - - with cbxDrawMode.Items do - begin - BeginUpdate; - try - Clear; - AddObject(cxGetResourceString(@sdxDrawModeStrict), TObject(gdmStrict)); - AddObject(cxGetResourceString(@sdxDrawModeOddEven), TObject(gdmOddEven)); - AddObject(cxGetResourceString(@sdxDrawModeChess), TObject(gdmChess)); - finally - EndUpdate; - end; - end; - - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - lblEvenColor.Caption := cxGetResourceString(@sdxEvenColor); - stTransparentHeaders.Caption := ' ' + cxGetResourceString(@sdxHeadersTransparent) + ' '; - lblHeadersColor.Caption := cxGetResourceString(@sdxHeaderColor); - lblGridLinesColor.Caption := cxGetResourceString(@sdxGridLinesColor); - - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - btnEvenFont.Caption := cxGetResourceString(@sdxBtnEvenFont); - btnHeadersFont.Caption := cxGetResourceString(@sdxBtnHeadersFont); - - lblOnEveryPage.Caption := cxGetResourceString(@sdxOnEveryPage); - chbxHeadersOnEveryPage.Caption := cxGetResourceString(@sdxColumnHeadersOnEveryPage); - - lblSelection.Caption := cxGetResourceString(@sdxSelection); - chbxOnlySelected.Caption := cxGetResourceString(@sdxOnlySelected); - chbxIncludeFixed.Caption := cxGetResourceString(@sdxIncludeFixed); - - lblLookAndFeel.Caption := cxGetResourceString(@sdxLookAndFeel); - chbxUse3DEffects.Caption := cxGetResourceString(@sdxUse3DEffects); - chbxUseSoft3D.Caption := cxGetResourceString(@sdxSoft3D); -end; - -procedure TcxfmMCListBoxDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -begin - inherited; - dxPSDrawGridPreview(ACanvas, R, ReportLink, False, ReportLink.AreColumnHeadersShown); -end; - -procedure TcxfmMCListBoxDesignWindow.UpdateControlsState; -begin - inherited; - - FccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := FccbxColor.Enabled; - FccbxEvenColor.Enabled := not chbxTransparent.Checked and - (ReportLink.DrawMode in [gdmOddEven, gdmChess]); - lblEvenColor.Enabled := FccbxEvenColor.Enabled; - FccbxFixedColor.Enabled := not chbxTransparentHeaders.Checked; - lblHeadersColor.Enabled := FccbxFixedColor.Enabled; - - btnEvenFont.Enabled := ReportLink.DrawMode in [gdmOddEven, gdmChess]; - if ReportLink.DrawMode in [gdmOddEven, gdmChess] then - begin - lblColor.Caption := cxGetResourceString(@sdxOddColor); - btnFont.Caption := cxGetResourceString(@sdxBtnOddFont); - end - else - begin - lblColor.Caption := cxGetResourceString(@sdxColor); - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - end; - chbxHeadersOnEveryPage.Enabled := not ReportLink.IsAggregated; - chbxIncludeFixed.Enabled := chbxOnlySelected.Enabled and chbxOnlySelected.Checked; - chbxUseSoft3D.Enabled := chbxUse3DEffects.Checked; -end; - -procedure TcxfmMCListBoxDesignWindow.UpdatePreview; -begin - FPreviewBox.Invalidate; -end; - -function TcxfmMCListBoxDesignWindow.GetReportLink: TcxMCListBoxReportLink; -begin - Result := inherited ReportLink as TcxMCListBoxReportLink; -end; - -procedure TcxfmMCListBoxDesignWindow.CreateControls; - - function CreateColorCombo(AParent: TWinControl; AHost: TControl; - ATag: Integer; AAutoColor: TColor; ALabel: TLabel): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with Result do - begin - BoundsRect := AHost.BoundsRect; - Tag := MakeTTag(ATag); - Parent := AParent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - OnChange := ColorChange; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - - procedure CreatePreviewBox; - var - R: TRect; - begin - FPreviewBox := TdxPSPaintPanel.Create(Self); - with FPreviewBox do - begin - Parent := pnlPreview; - R := pnlPreview.BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - InflateRect(R, -1, -1); - BoundsRect := R; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := PreviewPaint; - end; - end; - -begin - CreatePreviewBox; - - FccbxColor := - CreateColorCombo(gbxTransparent, bvlColorHost, 0, dxDefaultColor, lblColor); - FccbxEvenColor := - CreateColorCombo(gbxTransparent, bvlEvenColorHost, 1, dxDefaultColor, lblEvenColor); - FccbxFixedColor := - CreateColorCombo(gbxTransparentHeaders, bvlHeadersColorHost, 2, dxDefaultFixedColor, lblHeadersColor); - FccbxGridLineColor := - CreateColorCombo(pnlColor, bvlGridLineColorHost, 3, dxDefaultGridLineColor, lblGridLinesColor); -end; - -procedure TcxfmMCListBoxDesignWindow.CMDialogChar(var message: TCMDialogChar); -var - I: Integer; -begin - inherited; - with PageControl1 do - for I := 0 to PageCount - 1 do - if IsAccel(message.CharCode, Pages[I].Caption) then - begin - message.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TcxfmMCListBoxDesignWindow.DrawModeClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TComboBox(Sender) do - ReportLink.DrawMode := TdxGridDrawMode(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmMCListBoxDesignWindow.cbxDrawModeDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - dxPSBaseGridLnk.dxPSDrawComboDrawModeItem(Control, Index, Rect, State); -end; - -procedure TcxfmMCListBoxDesignWindow.ShowClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TCheckBox(Sender) do - if Checked then - ReportLink.Options := ReportLink.Options + [TcxMCListBoxPaintOption(Tag)] - else - ReportLink.Options := ReportLink.Options - [TcxMCListBoxPaintOption(Tag)]; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmMCListBoxDesignWindow.chbxAutoWidthClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoWidth := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmMCListBoxDesignWindow.RowAutoHeightClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.RowAutoHeight := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmMCListBoxDesignWindow.TransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - case TTagToInt(TCheckBox(Sender).Tag) of - 0: ReportLink.Transparent := TCheckBox(Sender).Checked; - 1: ReportLink.HeaderTransparent := TCheckBox(Sender).Checked; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmMCListBoxDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TcxfmMCListBoxDesignWindow.stTransparentHeadersClick(Sender: TObject); -begin - if chbxTransparentHeaders.CanFocus then ActiveControl := chbxTransparentHeaders; - chbxTransparentHeaders.Checked := not chbxTransparentHeaders.Checked; -end; - -procedure TcxfmMCListBoxDesignWindow.FontClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - - with dxPSGlbl.FontDialog do - begin - case TTagToInt(TButton(Sender).Tag) of - 0: Font := ReportLink.Font; - 1: Font := ReportLink.EvenFont; - 2: Font := ReportLink.HeaderFont; - end; - if Execute then - begin - case TTagToInt(TButton(Sender).Tag) of - 0: - begin - ReportLink.Font := Font; - FontInfoToText(ReportLink.Font, edFont); - end; - 1: - begin - ReportLink.EvenFont := Font; - FontInfoToText(ReportLink.EvenFont, edEvenFont); - end; - 2: - begin - ReportLink.FixedFont := Font; - FontInfoToText(ReportLink.HeaderFont, edFixedFont); - end; - end; - Modified := True; - UpdatePreview; - end; - end; -end; - -procedure TcxfmMCListBoxDesignWindow.HeadersOnEveryPageClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.HeadersOnEveryPage := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmMCListBoxDesignWindow.OnlySelectedClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OnlySelected := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmMCListBoxDesignWindow.IncludeFixedClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.IncludeFixed := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmMCListBoxDesignWindow.Use3DEffectsClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Effects3D := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmMCListBoxDesignWindow.UseSoft3DClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Soft3D := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmMCListBoxDesignWindow.ColorChange(Sender: TObject); -var - AColor: TColor; -begin - if LockControlsUpdate then Exit; - AColor := TdxPSColorCombo(Sender).ColorValue; - case TTagToInt(TdxPSColorCombo(Sender).Tag) of - 0: ReportLink.Color := AColor; - 1: ReportLink.EvenColor := AColor; - 2: ReportLink.FixedColor := AColor; - 3: ReportLink.GridLineColor := AColor; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmMCListBoxDesignWindow.PreviewPaint(Sender: TObject); -begin - with FPreviewBox do - PaintPreview(Canvas, ClientRect); -end; - -procedure TcxfmMCListBoxDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreview.Parent := TPageControl(Sender).ActivePage; -end; - -initialization - dxPSRegisterReportLink(TcxMCListBoxReportLink, TcxMCListBox, TcxfmMCListBoxDesignWindow); - -finalization - dxPSUnregisterReportLink(TcxMCListBoxReportLink, TcxMCListBox, TcxfmMCListBoxDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxPageControlProducer.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxPageControlProducer.pas deleted file mode 100644 index 21f8cf13..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxPageControlProducer.pas +++ /dev/null @@ -1,164 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxPageControlProducer; - -interface - -{$I cxVer.inc} - -uses - Classes, Controls, dxPSContainerLnk, cxPC; - -type - TdxPScxTabControlProducer = class(TdxPSRootContainerProducer) - public - function Control: TcxTabControl; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPScxPageControlIterator = class(TdxPSWinControlIterator) - private - function GetPageControl: TcxPageControl; - protected - function GetControl(Index: Integer): TControl; override; - function GetControlCount: Integer; override; - public - property PageControl: TcxPageControl read GetPageControl; - end; - - TdxPScxTabSheetProducer = class(TdxPSRootContainerProducer) - public - function Control: TcxTabSheet; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPScxPageControlProducer = class(TdxPSRootContainerProducer) - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - class function IteratorClass: TdxPSWinControlIteratorClass; override; - public - function Control: TcxPageControl; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - -implementation - -{ TdxPScxTabControlProducer } - -function TdxPScxTabControlProducer.Control: TcxTabControl; -begin - Result := inherited Control as TcxTabControl; -end; - -class function TdxPScxTabControlProducer.ControlClass: TControlClass; -begin - Result := TcxTabControl; -end; - -{ TdxPScxPageControlIterator } - -function TdxPScxPageControlIterator.GetControl(Index: Integer): TControl; -begin - Result := PageControl.ActivePage; -end; - -function TdxPScxPageControlIterator.GetControlCount: Integer; -begin - Result := Ord(PageControl.PageCount > 0); -end; - -function TdxPScxPageControlIterator.GetPageControl: TcxPageControl; -begin - Result := TcxPageControl(Control); -end; - -{ TdxPScxTabSheetProducer } - -function TdxPScxTabSheetProducer.Control: TcxTabSheet; -begin - Result := inherited Control as TcxTabSheet; -end; - -class function TdxPScxTabSheetProducer.ControlClass: TControlClass; -begin - Result := TcxTabSheet; -end; - -{ TdxPScxPageControlProducer } - -function TdxPScxPageControlProducer.Control: TcxPageControl; -begin - Result := inherited Control as TcxPageControl; -end; - -class function TdxPScxPageControlProducer.ControlClass: TControlClass; -begin - Result := TcxPageControl; -end; - -function TdxPScxPageControlProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := AChildControl = Control.ActivePage; -end; - -class function TdxPScxPageControlProducer.IteratorClass: TdxPSWinControlIteratorClass; -begin - Result := TdxPScxPageControlIterator; -end; - -procedure RegisterAssistants; -begin - TdxPScxTabControlProducer.Register; - TdxPScxTabSheetProducer.Register; - TdxPScxPageControlProducer.Register; -end; - -procedure UnregisterAssistants; -begin - TdxPScxPageControlProducer.Unregister; - TdxPScxTabSheetProducer.Unregister; - TdxPScxTabControlProducer.Unregister; -end; - -initialization - RegisterAssistants; - dxPSContainerLnk.dxPSRegisterContainers([TcxTabSheet, TcxTabControl, TcxPageControl]); - -finalization - dxPSContainerLnk.dxPSUnregisterContainers([TcxTabSheet, TcxTabControl, TcxPageControl]); - UnregisterAssistants; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2Lnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2Lnk.dfm deleted file mode 100644 index b2c22c72..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2Lnk.dfm +++ /dev/null @@ -1,1247 +0,0 @@ -object cxfmPivotGridReportLinkDesignWindow: TcxfmPivotGridReportLinkDesignWindow - Left = 349 - Top = 253 - BorderStyle = bsDialog - Caption = 'cxfmPivotGridReportLinkDesignWindow' - ClientHeight = 398 - ClientWidth = 702 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 0 - Top = 0 - Width = 702 - Height = 363 - ActivePage = tshView - TabOrder = 0 - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object bvlShow: TBevel - Left = 43 - Top = 13 - Width = 253 - Height = 4 - Shape = bsBottomLine - end - object Bevel1: TBevel - Left = 56 - Top = 171 - Width = 240 - Height = 4 - Shape = bsBottomLine - end - object Image1: TImage - Left = 9 - Top = 37 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object imgCardFraming: TImage - Left = 9 - Top = 195 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD00000000000000000 - 00DDDDDDD88888888888888888887DDDDDDDDDDDDDDDDD000000000000000000 - 00DDDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF - 00DDDDD778FFFFFFF8FFF9999FF87DDDDDDDDDDDDDDD000FFFFFFF0FFF9999FF - 00DDDD8888FFFFFFF8FFF9999FF87DDDDDDDDDDDDDD0000FFFFFFF0FFF9999FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCDDDDCDDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCCCCDCCDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCCCCCDDD0FF0F77777F0FCCCCFFFF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCDCCDDDD0FF0F77777F0FCCCCFFFF - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF77777FF87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF77FFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF77FFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDCDDDDCDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCCCCDCCDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDCCCCCCCCDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDCCCCDCCDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F78888888888888888888DDDDDDDDDDDDDDD0F7000000000000000000 - 0DDDDD8F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDDDDD0F7FFFFF0FF7FFFFFF00D - DDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF00D - DDDDDD8888888888888888888DDDDDDDDDDDDDDDDDD0000000000000000000DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardFraming: TLabel - Left = 5 - Top = 165 - Width = 38 - Height = 13 - Caption = 'Framing' - end - object chbxColumnFields: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = '&Column Fields' - TabOrder = 0 - OnClick = chbxOptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 4 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = '&Expand Buttons' - TabOrder = 4 - OnClick = chbxOptionsViewClick - end - object chbxHorizontalLines: TCheckBox - Tag = 1 - Left = 90 - Top = 187 - Width = 200 - Height = 17 - Caption = '&Horizontal Lines' - TabOrder = 6 - OnClick = chbxOptionsViewClick - end - object chbxVerticalLines: TCheckBox - Tag = 2 - Left = 90 - Top = 211 - Width = 200 - Height = 17 - Caption = '&Vertical Lines' - TabOrder = 7 - OnClick = chbxOptionsViewClick - end - object chbxBorders: TCheckBox - Tag = 3 - Left = 90 - Top = 235 - Width = 200 - Height = 17 - Caption = '&Borders' - TabOrder = 8 - OnClick = chbxOptionsViewClick - end - object chbxDataFields: TCheckBox - Left = 90 - Top = 53 - Width = 200 - Height = 17 - Caption = '&Data Fields' - TabOrder = 1 - OnClick = chbxOptionsViewClick - end - object chbxFilterFields: TCheckBox - Left = 90 - Top = 77 - Width = 200 - Height = 17 - Caption = '&Filter Fields' - TabOrder = 2 - OnClick = chbxOptionsViewClick - end - object chbxRowFields: TCheckBox - Left = 90 - Top = 101 - Width = 200 - Height = 17 - Caption = '&Row Fields' - TabOrder = 3 - OnClick = chbxOptionsViewClick - end - object chbxPrefilter: TCheckBox - Tag = 5 - Left = 90 - Top = 149 - Width = 200 - Height = 17 - Caption = '&Prefilter' - TabOrder = 5 - OnClick = chbxOptionsViewClick - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblExpanding: TLabel - Left = 5 - Top = 8 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object bvlExpanding: TBevel - Left = 62 - Top = 13 - Width = 234 - Height = 4 - Shape = bsBottomLine - end - object imgExpanding: TImage - Left = 9 - Top = 31 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object chbxExpandRows: TCheckBox - Tag = 1 - Left = 90 - Top = 53 - Width = 200 - Height = 17 - Caption = 'Rows' - TabOrder = 1 - OnClick = chbxExpandOptionsClick - end - object chbxExpandColumns: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = 'Columns' - TabOrder = 0 - OnClick = chbxExpandOptionsClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 211 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D0887777787787FFFFFFFFFFF07DDDDDDDDDDD0F87777787787FFFFFFFFF - FF07D0888888888887F000FF0000F07DDDDDDDDDDD0F88888888887F000FF000 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000080087F00000000FF07DDDDDDDDDDD0F80000080087F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000000F07DCCCCDCCDDD0F80000000887F00000000 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000F00F07DDDDDDDDDDD0F80000000887F000000F0 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000008887F00000FF00F07DCCCCDCCDDD0F80000008887F00000FF0 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F00000000FF07DDDDDDDDDDD0F80000000887F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 8 - Top = 102 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF7FFFFFFF07DDCCCCDCCDDD0888888888887FF777777F - F07DD0888888888887FF70888FFF07DDCCCCCCCCDD0888888888887FF7FFFF7F - F07DD0880000000887FF70FF8FFF07DDCCCCDCCDDD0880000000887FF7F00F7F - F07DD0888888888887FF70FF8FFF07DDCDDDDCDDDD0888888888887FF7F00F7F - F07DD0880008888887FF70000FFF07DDDDDDDDDDDD0880008888887FF7FFFF7F - F07DD0888888888887FF777777FF07DDDDDDDDDDDD0888888888887FF777777F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCCCCCCCCDD0888888888887FFFFFFFFF - F07DD0880000000887FCCCCCCCFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0880000000887F9999999FF07DDDDDDDDDDDD0880000000887F88888FFF - F07DD0888888888887FF99999FFF07DDDDDDDDDDDD0888888888887F888888FF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF888FFFFF07DDDDDDDDDDDD0888888888887FF888FFFF - F07DD0880000888887FFFFFFFFFF07DDDDDDDDDDDD0880000888887FFFFFFFFF - F07DD0880000000087FF888888FF07DDDDDDDDDDDD0880000000087FF888888F - F07DD0888888888887FF888888FF07DDDDDDDDDDDD0888888888887FF888888F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 82 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 206 - Height = 4 - Shape = bsBottomLine - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 37 - Width = 202 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnChange = cbxLookAndFeelChange - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Suppress Background Textures' - TabOrder = 4 - OnClick = OptionsFormattingChanged - end - object chbxSuppressContentColoration: TCheckBox - Tag = 2 - Left = 90 - Top = 205 - Width = 200 - Height = 17 - Caption = 'Suppress Content Coloration' - TabOrder = 5 - OnClick = OptionsFormattingChanged - end - object chbxTransparentGraphics: TCheckBox - Tag = 3 - Left = 90 - Top = 96 - Width = 200 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsFormattingChanged - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 4 - Left = 90 - Top = 119 - Width = 200 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsFormattingChanged - end - object chbxFlatCheckMarks: TCheckBox - Tag = 5 - Left = 90 - Top = 142 - Width = 200 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsFormattingChanged - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 4 - object bvlStyles: TBevel - Left = 115 - Top = 13 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 259 - Width = 224 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 255 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 214 - Height = 183 - end - object Label1: TLabel - Left = 77 - Top = 118 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 228 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = btnStyleColorClick - end - object btnStyleFont: TButton - Left = 228 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = btnStyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 228 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = btnStyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 15 - Height = 17 - TabStop = False - Caption = '&Use Native Styles' - TabOrder = 0 - OnClick = OptionsFormattingChanged - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 307 - Width = 68 - Height = 23 - Caption = '&New...' - TabOrder = 7 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 79 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Copy...' - TabOrder = 8 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 153 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Delete...' - TabOrder = 9 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 116 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = btnStylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 226 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Rename...' - TabOrder = 10 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 228 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Clear' - TabOrder = 4 - OnClick = btnStyleClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Restore Defaults' - TabOrder = 5 - OnClick = btnStyleRestoreDefaultsClick - end - object cbxStyleSheets: TComboBox - Left = 9 - Top = 274 - Width = 288 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 11 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - end - end - object pnlPreview: TPanel - Left = 309 - Top = 39 - Width = 382 - Height = 315 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewPivotGrid: TcxPivotGrid - Left = 5 - Top = 5 - Width = 371 - Height = 302 - Enabled = False - Groups = < - item - IsCaptionAssigned = True - Caption = 'FieldsGroup 1' - end> - TabOrder = 0 - object pgfPurchaseQuarter: TcxPivotGridField - Area = faColumn - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Purchase Quarter' - DataBinding.ValueType = 'DateTime' - GroupIndex = 0 - GroupInterval = giDateQuarter - Visible = True - end - object pgfPurchaseMonth: TcxPivotGridField - Area = faColumn - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Purchase Month' - DataBinding.ValueType = 'DateTime' - GroupIndex = 0 - GroupExpanded = False - GroupInterval = giDateMonth - Visible = True - end - object pgfPaymentType: TcxPivotGridField - Tag = 1 - Area = faRow - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Payment Type' - DataBinding.ValueType = 'String' - Visible = True - Width = 90 - end - object pgfQuantity: TcxPivotGridField - Tag = 2 - Area = faData - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Quantity' - DataBinding.ValueType = 'Integer' - Visible = True - Width = 62 - end - object pgfCarName: TcxPivotGridField - Tag = 3 - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Car Name' - DataBinding.ValueType = 'String' - Visible = True - end - object pgfUnitPrice: TcxPivotGridField - Tag = 4 - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Unit Price' - DataBinding.ValueType = 'Currency' - Visible = True - end - object pgfCompanyName: TcxPivotGridField - Tag = 5 - Area = faRow - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Company Name' - DataBinding.ValueType = 'String' - Visible = True - Width = 90 - end - object pgfPaymentAmount: TcxPivotGridField - Tag = 6 - Area = faData - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Payment Amount' - DataBinding.ValueType = 'Currency' - Visible = True - end - end - end - object lblPreviewWindow: TStaticText - Left = 314 - Top = 24 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 2 - end - object cxStyleRepository1: TcxStyleRepository - Left = 4 - Top = 368 - PixelsPerInch = 96 - object styleCategory: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWindowText - end - object styleHeader: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - object styleContent: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 32 - Top = 368 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - ShortCut = 16454 - OnClick = btnStyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - ShortCut = 16451 - OnClick = btnStyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - OnClick = btnStyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = btnStyleClearClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = btnStyleRestoreDefaultsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = btnStylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 60 - Top = 368 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2Lnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2Lnk.pas deleted file mode 100644 index bf460e10..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2Lnk.pas +++ /dev/null @@ -1,2240 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxPivotGrid2Lnk; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, SysUtils, {$IFDEF DELPHI6} Variants, {$ENDIF} Classes, Graphics, - Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, ImgList, Menus, cxStyles, - cxControls, dxPSUtl, cxLookAndFeels, cxLookAndFeelPainters, cxCustomPivotGrid, - cxDBPivotGrid, dxPSCore, dxPSGlbl, dxPScxCommon, cxGraphics, cxContainer, cxEdit, - cxTextEdit, cxMaskEdit, cxDropDownEdit, cxClasses, cxPivotGrid, cxCustomData; - -const - - // visual print style indexes - vspsPGridFirst = 0; - vspsPGridColumnHeader = vspsPGridFirst + 0; - vspsPGridContent = vspsPGridFirst + 1; - vspsPGridFieldHeader = vspsPGridFirst + 2; - vspsPGridHeaderBackground = vspsPGridFirst + 3; - vspsPGridPrefilter = vspsPGridFirst + 4; - vspsPGridRowHeader = vspsPGridFirst + 5; - vspsPGridLast = vspsPGridRowHeader; - - // - cxPivotGridAttributeIDBase = 0; - cxPivotGridDataCellID = cxPivotGridAttributeIDBase + 1; - cxPivotGridFieldHeaderCellID = cxPivotGridAttributeIDBase + 2; - cxPivotGridGroupHeaderCellID = cxPivotGridAttributeIDBase + 3; - cxPivotGridPrefilterID = cxPivotGridAttributeIDBase + 4; - cxPivotGridHeaderBackgroundID = cxPivotGridAttributeIDBase + 5; - -type - TcxPivotGridReportLink = class; - TcxfmPivotGridReportLinkDesignWindow = class; - - { TcxPivotGridReportLinkOptionsExpanding } - - TcxPivotGridReportLinkOptionsExpanding = class(TdxCustomReportLinkOptionsExpanding) - private - FAutoExpandColumns: Boolean; - FAutoExpandRows: Boolean; - procedure SetAutoExpandColumns(AValue: Boolean); - procedure SetAutoExpandRows(AValue: Boolean); - protected - procedure AssignToPivot(APivotGrid: TcxCustomPivotGrid); virtual; - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property AutoExpandColumns: Boolean read FAutoExpandColumns write SetAutoExpandColumns default False; - property AutoExpandRows: Boolean read FAutoExpandRows write SetAutoExpandRows default False; - end; - - { TcxPivotGridReportLinkOptionsView } - - TcxPivotGridReportLinkOptionsView = class(TdxCustomReportLinkOptionsView) - private - FBorders: Boolean; - FColumnFields: Boolean; - FDataFields: Boolean; - FExpandButtons: Boolean; - FFilterFields: Boolean; - FGridLines: TcxPivotGridLines; - FPrefilter: TcxPivotGridPrefilterVisible; - FRowFields: Boolean; - procedure SetBorders(AValue: Boolean); - procedure SetColumnFields(AValue: Boolean); - procedure SetDataFields(AValue: Boolean); - procedure SetExpandButtons(AValue: Boolean); - procedure SetFilterFields(AValue: Boolean); - procedure SetGridLines(AValue: TcxPivotGridLines); - procedure SetPrefilter(AValue: TcxPivotGridPrefilterVisible); - procedure SetRowFields(AValue: Boolean); - protected - procedure AssignToPivot(APivotGrid: TcxCustomPivotGrid); virtual; - procedure SetBoolValue(var AField: Boolean; ANewValue: Boolean); - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property Borders: Boolean read FBorders write SetBorders default True; - property ColumnFields: Boolean read FColumnFields write SetColumnFields default True; - property DataFields: Boolean read FDataFields write SetDataFields default True; - property ExpandButtons: Boolean read FExpandButtons write SetExpandButtons default True; - property FilterFields: Boolean read FFilterFields write SetFilterFields default False; - property GridLines: TcxPivotGridLines read FGridLines write SetGridLines default pglBoth; - property Prefilter: TcxPivotGridPrefilterVisible read FPrefilter write SetPrefilter default pfvAlways; - property RowFields: Boolean read FRowFields write SetRowFields default True; - end; - - { TcxPivotGridReportLinkOptionsFormatting } - - TcxPivotGridReportLinkOptionsFormatting = class(TdxCustomReportLinkOptionsFormatting) - private - FSuppressContentColoration: Boolean; - procedure SetSuppressContentColoration(AValue: Boolean); - protected - procedure AssignToPivot(APivotGrid: TcxCustomPivotGrid); virtual; - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property SuppressContentColoration: Boolean read FSuppressContentColoration write SetSuppressContentColoration default False; - property UseLookAndFeelColors; - end; - - { TcxPivotGridReportLinkStyles } - - TcxPivotGridReportLinkStyles = class(TdxCustomReportLinkStyles, IcxPivotGridBaseStyles) - private - function GetReportLink: TcxPivotGridReportLink; - protected - procedure AssignToPivot(AFromGrid, ADestGrid: TcxCustomPivotGrid; AUsePivotStyles: Boolean); virtual; - function DesignerTabIndex: Integer; override; - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - class function GetStyleCaption(AnIndex: Integer): string; override; - function GetStyleIndexByCaption(const Caption: string): Integer; override; - function UsePivotStyles: Boolean; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - function GetColumnHeaderParams(AColumn: TcxPivotGridViewDataItem): TcxViewParams; - function GetContentParams(ACell: TcxPivotGridDataCellViewInfo): TcxViewParams; - function GetFieldHeaderParams(AField: TcxPivotGridField): TcxViewParams; - function GetHeaderBackgroundParams(AArea: TcxPivotGridFieldArea): TcxViewParams; - function GetPrefilterParams: TcxViewParams; - function GetRowHeaderParams(ARow: TcxPivotGridViewDataItem): TcxViewParams; - - property ReportLink: TcxPivotGridReportLink read GetReportLink; - published - property ColumnHeader: TcxStyle index vspsPGridColumnHeader read GetValue write SetValue; - property Content: TcxStyle index vspsPGridContent read GetValue write SetValue; - property FieldHeader: TcxStyle index vspsPGridFieldHeader read GetValue write SetValue; - property HeaderBackground: TcxStyle index vspsPGridHeaderBackground read GetValue write SetValue; - property Prefilter: TcxStyle index vspsPGridPrefilter read GetValue write SetValue; - property RowHeader: TcxStyle index vspsPGridRowHeader read GetValue write SetValue; - property StyleSheet; - end; - - TcxPivotGridReportLinkStylesClass = class of TcxPivotGridReportLinkStyles; - - { TcxPivotGridReportLinkStyleSheet } - - TcxPivotGridReportLinkStyleSheet = class(TdxCustomReportLinkStyleSheet) - private - function GetStylesValue: TcxPivotGridReportLinkStyles; - procedure SetStylesValue(AValue: TcxPivotGridReportLinkStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TcxPivotGridReportLinkStyles read GetStylesValue write SetStylesValue; - end; - - { TcxPivotGridReportLink } - - TcxPivotGridReportLinkCustomDrawDataCellEventEvent = procedure(Sender: TcxPivotGridReportLink; - ACanvas: TCanvas; AnItem: TAbstractdxReportCellData; var ADone: Boolean) of object; - - TcxPivotGridReportLinkCustomDrawFieldHeaderCellEvent = procedure(Sender: TcxPivotGridReportLink; - ACanvas: TCanvas; AnItem: TdxReportCell; var ADone: Boolean) of object; - - TcxPivotGridReportLinkCustomDrawGroupHeaderCellEvent = procedure(Sender: TcxPivotGridReportLink; - ACanvas: TCanvas; AnItem: TdxReportCell; var ADone: Boolean) of object; - - TcxPivotGridReportLinkCustomDrawHeaderBackgroundEvent = procedure(Sender: TcxPivotGridReportLink; - ACanvas: TCanvas; AnItem: TdxReportCell; var ADone: Boolean) of object; - - TcxPivotGridReportLinkCustomDrawPrefilterEvent = procedure(Sender: TcxPivotGridReportLink; - ACanvas: TCanvas; AnItem: TdxReportCellText; var ADone: Boolean) of object; - - TcxPivotGridReportLinkInitializeDataCellEvent = procedure(Sender: TcxPivotGridReportLink; - ACell: TcxPivotGridDataCellViewInfo; AnItem: TAbstractdxReportCellData) of object; - - TcxPivotGridReportLinkInitializeFieldHeaderCellEvent = procedure(Sender: TcxPivotGridReportLink; - ACell: TcxPivotGridFieldHeaderCellViewInfo; AnItem: TdxReportCell) of object; - - TcxPivotGridReportLinkInitializeGroupHeaderCellEvent = procedure(Sender: TcxPivotGridReportLink; - ACell: TcxPivotGridHeaderCellViewInfo; AnItem: TdxReportCell) of object; - - TcxPivotGridReportLinkInitializeHeaderBackgroundEvent = procedure(Sender: TcxPivotGridReportLink; - ACell: TcxPivotGridHeaderBackgroundCellViewInfo; AnItem: TdxReportCell) of object; - - TcxPivotGridReportLinkInitializePrefilterEvent = procedure(Sender: TcxPivotGridReportLink; - ACell: TcxPivotGridPrefilterViewInfo; AnItem: TdxReportCellText) of object; - - TcxPivotGridReportLink = class(TdxCustomcxControlReportLink, IdxPSCellParams) - private - FHostCell: TdxReportCell; - FLookAndFeelItems: TList; - FOnCustomDrawDataCell: TcxPivotGridReportLinkCustomDrawDataCellEventEvent; - FOnCustomDrawFieldHeaderCell: TcxPivotGridReportLinkCustomDrawFieldHeaderCellEvent; - FOnCustomDrawGroupHeaderCell: TcxPivotGridReportLinkCustomDrawGroupHeaderCellEvent; - FOnCustomDrawHeaderBackground: TcxPivotGridReportLinkCustomDrawHeaderBackgroundEvent; - FOnCustomDrawPrefilter: TcxPivotGridReportLinkCustomDrawPrefilterEvent; - FOnInitializeDataCell: TcxPivotGridReportLinkInitializeDataCellEvent; - FOnInitializeFieldHeaderCell: TcxPivotGridReportLinkInitializeFieldHeaderCellEvent; - FOnInitializeGroupHeaderCell: TcxPivotGridReportLinkInitializeGroupHeaderCellEvent; - FOnInitializeHeaderBackground: TcxPivotGridReportLinkInitializeHeaderBackgroundEvent; - FOnInitializePrefilter: TcxPivotGridReportLinkInitializePrefilterEvent; - function GetActiveStyles: TcxPivotGridReportLinkStyles; - function GetDesignWindow: TcxfmPivotGridReportLinkDesignWindow; - function GetGridLineColor: TColor; - function GetOptionsExpanding: TcxPivotGridReportLinkOptionsExpanding; - function GetOptionsFormatting: TcxPivotGridReportLinkOptionsFormatting; - function GetOptionsView: TcxPivotGridReportLinkOptionsView; - - function GetStyles: TcxPivotGridReportLinkStyles; - function GetPivotGrid: TcxCustomPivotGrid; - procedure SetOptionsExpanding(AValue: TcxPivotGridReportLinkOptionsExpanding); - procedure SetOptionsFormatting(AValue: TcxPivotGridReportLinkOptionsFormatting); - procedure SetOptionsView(AValue: TcxPivotGridReportLinkOptionsView); - procedure SetStyles(AValue: TcxPivotGridReportLinkStyles); - protected - procedure BuildReport; virtual; - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure ConvertCoords; override; - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - - procedure DoCustomDrawDataCell(ACanvas: TCanvas; AItem: TAbstractdxReportCellData; var ADone: Boolean); virtual; - procedure DoCustomDrawFieldHeaderCell(ACanvas: TCanvas; AItem: TdxReportCell; var ADone: Boolean); virtual; - procedure DoCustomDrawGroupHeaderCell(ACanvas: TCanvas; AItem: TdxReportCell; var ADone: Boolean); virtual; - procedure DoCustomDrawHeaderBackground(ACanvas: TCanvas; AItem: TdxReportCell; var ADone: Boolean); virtual; - procedure DoCustomDrawPrefilter(ACanvas: TCanvas; AItem: TdxReportCellString; var ADone: Boolean); virtual; - procedure DoInitializeDataCell(AItem: TAbstractdxReportCellData; ACell: TcxPivotGridDataCellViewInfo); virtual; - procedure DoInitializeFieldHeaderCell(AItem: TdxReportCell; ACell: TcxPivotGridFieldHeaderCellViewInfo); virtual; - procedure DoInitializeGroupHeaderCell(AItem: TdxReportCell; ACell: TcxPivotGridHeaderCellViewInfo); virtual; - procedure DoInitializeHeaderBackground(AItem: TdxReportCell; ACell: TcxPivotGridHeaderBackgroundCellViewInfo); virtual; - procedure DoInitializePrefilter(AItem: TdxReportCellString; ACell: TcxPivotGridPrefilterViewInfo); virtual; - - { IdxPSCellParams } - function IdxPSCellParams.GetAutoHeight = IdxPSCellParams_GetAutoHeight; - function IdxPSCellParams.GetDC = IdxPSCellParams_GetDC; - function IdxPSCellParams.GetDisplayGraphicsAsText = IdxPSCellParams_GetDisplayGraphicsAsText; - function IdxPSCellParams.GetEndEllipsis = IdxPSCellParams_GetEndEllipsis; - function IdxPSCellParams.GetFlatCheckMarks = IdxPSCellParams_GetFlatCheckMarks; - function IdxPSCellParams.GetGraphicsText = IdxPSCellParams_GetGraphicsText; - function IdxPSCellParams.GetMultiline = IdxPSCellParams_GetMultiline; - function IdxPSCellParams.GetTransparentGraphics = IdxPSCellParams_GetTransparentGraphics; - function IdxPSCellParams_GetAutoHeight: Boolean; virtual; - function IdxPSCellParams_GetDC: HDC; virtual; - function IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; virtual; - function IdxPSCellParams_GetEndEllipsis: Boolean; virtual; - function IdxPSCellParams_GetFlatCheckMarks: Boolean; virtual; - function IdxPSCellParams_GetGraphicsText: string; virtual; - function IdxPSCellParams_GetMultiline: Boolean; virtual; - function IdxPSCellParams_GetTransparentGraphics: Boolean; virtual; - - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InternalRestoreFromOriginal; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - procedure FormatLookAndFeelItems; - function GetEdgeMode: TdxCellEdgeMode; - function GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; override; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; override; - function GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; override; - - function GetAreNativeStylesAvailable: Boolean; override; - function GetStylesClass: TdxCustomReportLinkStylesClass; override; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; override; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; override; - procedure PrepareConstruct; override; - procedure UnprepareConstruct; override; - // - procedure AddDataCell(ACell: TcxPivotGridDataCellViewInfo); - procedure AddFieldHeaderCell(ACell: TcxPivotGridFieldHeaderCellViewInfo); - procedure AddHeaderBackground(ACell: TcxPivotGridHeaderBackgroundCellViewInfo); - procedure AddHeaderCell(ACell: TcxPivotGridHeaderCellViewInfo); - procedure AddPrefilter(ACell: TcxPivotGridPrefilterViewInfo); - function CreateHeaderCell(ACell: TcxPivotGridHeaderCellViewInfo; AttributeID: Integer): TdxReportCell; - - procedure InitializeOptionsBeforeBuildReport(AController: TcxPivotGridExportController); virtual; - procedure ProcessCreateReportItems(AViewInfo: TcxPivotGridViewInfo); virtual; - procedure RegisterLookAndFeelItem(AItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); - procedure SetCellViewParams(ACell: TdxReportVisualItem; const AParams: TcxViewParams); - procedure SetCellViewParamsEx(ACell: TdxReportVisualItem; - const AParams: TdxReportItemViewParams); - - property ActiveStyles: TcxPivotGridReportLinkStyles read GetActiveStyles; - property GridLineColor: TColor read GetGridLineColor; - property HostCell: TdxReportCell read FHostCell; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - property DesignWindow: TcxfmPivotGridReportLinkDesignWindow read GetDesignWindow; - property LookAndFeelItems: TList read FLookAndFeelItems; - property PivotGrid: TcxCustomPivotGrid read GetPivotGrid; - published - property Color; - property Font; - property OptionsExpanding: TcxPivotGridReportLinkOptionsExpanding read GetOptionsExpanding write SetOptionsExpanding; - property OptionsFormatting: TcxPivotGridReportLinkOptionsFormatting read GetOptionsFormatting write SetOptionsFormatting; - property OptionsView: TcxPivotGridReportLinkOptionsView read GetOptionsView write SetOptionsView; - property ScaleFonts; - property StyleRepository; - property Styles: TcxPivotGridReportLinkStyles read GetStyles write SetStyles; - property SupportedCustomDraw; - property OnCustomDrawDataCell: TcxPivotGridReportLinkCustomDrawDataCellEventEvent read FOnCustomDrawDataCell write FOnCustomDrawDataCell; - property OnCustomDrawFieldHeaderCell: TcxPivotGridReportLinkCustomDrawFieldHeaderCellEvent read FOnCustomDrawFieldHeaderCell write FOnCustomDrawFieldHeaderCell; - property OnCustomDrawGroupHeaderCell: TcxPivotGridReportLinkCustomDrawGroupHeaderCellEvent read FOnCustomDrawGroupHeaderCell write FOnCustomDrawGroupHeaderCell; - property OnCustomDrawHeaderBackground: TcxPivotGridReportLinkCustomDrawHeaderBackgroundEvent read FOnCustomDrawHeaderBackground write FOnCustomDrawHeaderBackground; - property OnCustomDrawPrefilter: TcxPivotGridReportLinkCustomDrawPrefilterEvent read FOnCustomDrawPrefilter write FOnCustomDrawPrefilter; - property OnInitializeDataCell: TcxPivotGridReportLinkInitializeDataCellEvent read FOnInitializeDataCell write FOnInitializeDataCell; - property OnInitializeFieldHeaderCell: TcxPivotGridReportLinkInitializeFieldHeaderCellEvent read FOnInitializeFieldHeaderCell write FOnInitializeFieldHeaderCell; - property OnInitializeGroupHeaderCell: TcxPivotGridReportLinkInitializeGroupHeaderCellEvent read FOnInitializeGroupHeaderCell write FOnInitializeGroupHeaderCell; - property OnInitializeHeaderBackground: TcxPivotGridReportLinkInitializeHeaderBackgroundEvent read FOnInitializeHeaderBackground write FOnInitializeHeaderBackground; - property OnInitializePrefilter: TcxPivotGridReportLinkInitializePrefilterEvent read FOnInitializePrefilter write FOnInitializePrefilter; - end; - - TcxfmPivotGridReportLinkDesignWindow = class(TdxfmCustomcxControlReportLinkDesignWindow) - PageControl1: TPageControl; - tshView: TTabSheet; - lblShow: TLabel; - bvlShow: TBevel; - chbxColumnFields: TCheckBox; - chbxShowExpandButtons: TCheckBox; - chbxHorizontalLines: TCheckBox; - chbxVerticalLines: TCheckBox; - tshBehaviors: TTabSheet; - lblExpanding: TLabel; - bvlExpanding: TBevel; - chbxExpandRows: TCheckBox; - tshFormatting: TTabSheet; - lblLookAndFeel: TLabel; - bvlLookAndFeel: TBevel; - imgLookAndFeel: TImage; - imgRefinements: TImage; - lblRefinements: TLabel; - bvlRefinements: TBevel; - cbxLookAndFeel: TComboBox; - chbxSuppressBackgroundBitmaps: TCheckBox; - tshStyles: TTabSheet; - bvlStyles: TBevel; - bvlStyleSheets: TBevel; - lblStyleSheets: TLabel; - bvlStylesHost: TBevel; - Label1: TLabel; - btnStyleColor: TButton; - btnStyleFont: TButton; - btnStyleBackgroundBitmap: TButton; - chbxUseNativeStyles: TCheckBox; - btnStyleSheetNew: TButton; - btnStyleSheetCopy: TButton; - btnStyleSheetDelete: TButton; - btnStylesSaveAs: TButton; - btnStyleSheetRename: TButton; - btnStyleBackgroundBitmapClear: TButton; - btnStyleRestoreDefaults: TButton; - pnlPreview: TPanel; - cxStyleRepository1: TcxStyleRepository; - styleCategory: TcxStyle; - styleHeader: TcxStyle; - styleContent: TcxStyle; - pmStyles: TPopupMenu; - miStyleFont: TMenuItem; - miStyleColor: TMenuItem; - miLine3: TMenuItem; - miStyleBackgroundBitmap: TMenuItem; - miStyleBackgroundBitmapClear: TMenuItem; - milLine: TMenuItem; - miStylesSelectAll: TMenuItem; - miLine2: TMenuItem; - miStyleRestoreDefaults: TMenuItem; - miLine4: TMenuItem; - miStylesSaveAs: TMenuItem; - ilStylesPopup: TImageList; - chbxExpandColumns: TCheckBox; - chbxSuppressContentColoration: TCheckBox; - lblUseNativeStyles: TLabel; - cbxStyleSheets: TComboBox; - chbxBorders: TCheckBox; - chbxDataFields: TCheckBox; - chbxFilterFields: TCheckBox; - chbxRowFields: TCheckBox; - Bevel1: TBevel; - imgExpanding: TImage; - Image1: TImage; - imgCardFraming: TImage; - lblCardFraming: TLabel; - PreviewPivotGrid: TcxPivotGrid; - pgfPurchaseQuarter: TcxPivotGridField; - pgfPurchaseMonth: TcxPivotGridField; - pgfPaymentType: TcxPivotGridField; - pgfQuantity: TcxPivotGridField; - pgfCarName: TcxPivotGridField; - pgfUnitPrice: TcxPivotGridField; - pgfCompanyName: TcxPivotGridField; - pgfPaymentAmount: TcxPivotGridField; - lblPreviewWindow: TStaticText; - chbxPrefilter: TCheckBox; - chbxTransparentGraphics: TCheckBox; - chbxDisplayGraphicsAsText: TCheckBox; - chbxFlatCheckMarks: TCheckBox; - bvlRefinementsSeparator: TBevel; - procedure OptionsFormattingChanged(Sender: TObject); - procedure btnStyleFontClick(Sender: TObject); - procedure btnStyleColorClick(Sender: TObject); - procedure btnStyleBackgroundBitmapClick(Sender: TObject); - procedure btnStyleClearClick(Sender: TObject); - procedure lblUseNativeStylesClick(Sender: TObject); - procedure pmStylesPopup(Sender: TObject); - procedure miStylesSelectAllClick(Sender: TObject); - procedure btnStyleRestoreDefaultsClick(Sender: TObject); - procedure btnStylesSaveAsClick(Sender: TObject); - procedure btnStyleSheetNewClick(Sender: TObject); - procedure btnStyleSheetCopyClick(Sender: TObject); - procedure btnStyleSheetDeleteClick(Sender: TObject); - procedure btnStyleSheetRenameClick(Sender: TObject); - procedure cbxStyleSheetsClick(Sender: TObject); - procedure cbxStyleSheetsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure cbxStyleSheetsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure cbxLookAndFeelChange(Sender: TObject); - procedure chbxExpandOptionsClick(Sender: TObject); - procedure chbxOptionsViewClick(Sender: TObject); - private - function GetActiveStyle: TcxStyle; - function GetHasSelectedStyles: Boolean; - function GetHasSelectedStylesWithAssignedBitmap: Boolean; - function GetReportLink: TcxPivotGridReportLink; - procedure lbxStylesClick(Sender: TObject); - protected - lbxStyles: TdxStylesListBox; - procedure CreateControls; virtual; - function CanSelectAllStyles: Boolean; - procedure DoInitialize; override; - // - procedure DoActiveStyleSheetChanged; override; - procedure DoFormActivated(AnActive: Boolean); override; - procedure DoRefreshStylesList; override; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); override; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); override; - - procedure GetSelectedStyleNames(AStrings: TStrings); override; - procedure GetStyleNames(out AStrings: TStrings); override; - procedure GetStyleSheetNames(out AStrings: TStrings); override; - procedure LoadCaption(AControl: TControl; StrPtr: Pointer); overload; - procedure LoadCaption(AItem: TMenuItem; StrPtr: Pointer); overload; - procedure LoadPreviewData; - procedure LoadStrings; override; - procedure LoadStringsCombo(ACombo: TComboBox; ACaptions: array of Pointer); - - procedure RecreateStylesListBox; - procedure RestoreSelectedStyles(AList: TList); - procedure SaveSelectedStyles(AList: TList); - // - procedure UpdateControlsState; override; - procedure UpdateEnabled(AControl: TControl; AEnabled: Boolean); overload; - procedure UpdateEnabled(AItem: TMenuItem; AEnabled: Boolean); overload; - procedure UpdateEnabledControls(AControls: array of TControl; AEnabled: Boolean); - procedure UpdatePreview; override; - - property ActiveStyle: TcxStyle read GetActiveStyle; - property HasSelectedStyles: Boolean read GetHasSelectedStyles; - property HasSelectedStylesWithAssignedBitmap: Boolean read GetHasSelectedStylesWithAssignedBitmap; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - property ReportLink: TcxPivotGridReportLink read GetReportLink; - end; - -implementation - -uses Math, dxPSRes, dxPSPopupMan; - -{$R *.dfm} -{$R dxPScxPivotGrid2Lnk.res} - -type - TControlAccess = class(TControl); - TcxPivotGridAccess = class(TcxCustomPivotGrid); - TcxPivotGridViewDataAccess = class(TcxPivotGridViewData); - TcxPivotGridStylesAccess = class(TcxPivotGridStyles); - -var - FDefaultdxPScxPivotGridLinkStyleSheet: TcxPivotGridReportLinkStyleSheet; - -// -function DefaultdxPScxPivotGridLinkStyleSheet: TcxPivotGridReportLinkStyleSheet; - - function CreateStyle(AColor: TColor; AFontColor: TColor): TcxStyle; - begin - Result := TcxStyle.Create(DefaultdxPScxPivotGridLinkStyleSheet); - with Result do - begin - Color := AColor; - Font.Name := dxPSCore.dxPSDefaultFontName; - Font.Color := AFontColor; - end; - end; - -begin - if FDefaultdxPScxPivotGridLinkStyleSheet = nil then - begin - FDefaultdxPScxPivotGridLinkStyleSheet := TcxPivotGridReportLinkStyleSheet.Create(nil); - with FDefaultdxPScxPivotGridLinkStyleSheet.Styles as TcxPivotGridReportLinkStyles do - begin - ColumnHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - FieldHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - RowHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Content := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - HeaderBackground := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Prefilter := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - end; - end; - Result := FDefaultdxPScxPivotGridLinkStyleSheet; -end; - -{ TcxPivotGridReportLinkOptionsExpanding } - -procedure TcxPivotGridReportLinkOptionsExpanding.AssignToPivot( - APivotGrid: TcxCustomPivotGrid); -begin - TcxPivotGridViewDataAccess(APivotGrid.ViewData). - ExpandColumns := AutoExpandColumns; - TcxPivotGridViewDataAccess(APivotGrid.ViewData). - ExpandRows := AutoExpandRows; -end; - -function TcxPivotGridReportLinkOptionsExpanding.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -procedure TcxPivotGridReportLinkOptionsExpanding.Assign(Source: TPersistent); -begin - if Source is TcxPivotGridReportLinkOptionsExpanding then - with TcxPivotGridReportLinkOptionsExpanding(Source) do - begin - Self.FAutoExpandColumns := FAutoExpandColumns; - Self.FAutoExpandRows := FAutoExpandRows; - end; - inherited Assign(Source); -end; - -procedure TcxPivotGridReportLinkOptionsExpanding.RestoreDefaults; -begin - inherited RestoreDefaults; - FAutoExpandColumns := False; - FAutoExpandRows := False; -end; - -procedure TcxPivotGridReportLinkOptionsExpanding.SetAutoExpandColumns( - AValue: Boolean); -begin - if FAutoExpandColumns <> AValue then - begin - FAutoExpandColumns := AValue; - Changed; - end; -end; - -procedure TcxPivotGridReportLinkOptionsExpanding.SetAutoExpandRows( - AValue: Boolean); -begin - if FAutoExpandRows <> AValue then - begin - FAutoExpandRows := AValue; - Changed; - end; -end; - -{ TcxPivotGridReportLinkOptionsView } - -procedure TcxPivotGridReportLinkOptionsView.Assign(Source: TPersistent); -begin - if Source is TcxPivotGridReportLinkOptionsView then - with TcxPivotGridReportLinkOptionsView(Source) do - begin - Self.FColumnFields := FColumnFields; - Self.FDataFields := FDataFields; - self.FBorders := FBorders; - Self.FExpandButtons := FExpandButtons; - Self.FFilterFields := FFilterFields; - Self.FGridLines := FGridLines; - Self.FPrefilter := FPrefilter; - Self.FRowFields := FRowFields; - end; - inherited Assign(Source); -end; - -procedure TcxPivotGridReportLinkOptionsView.RestoreDefaults; -begin - FColumnFields := True; - FDataFields := True; - FBorders := True; - FExpandButtons := True; - FFilterFields := False; - FGridLines := pglBoth; - FPrefilter := pfvAlways; - FRowFields := True; -end; - -procedure TcxPivotGridReportLinkOptionsView.AssignToPivot( - APivotGrid: TcxCustomPivotGrid); -begin - APivotGrid.OptionsView.ColumnFields := ColumnFields; - APivotGrid.OptionsView.DataFields := DataFields; - APivotGrid.OptionsView.FilterFields := FilterFields; - APivotGrid.OptionsView.RowFields := RowFields; - APivotGrid.OptionsView.GridLines := GridLines; - APivotGrid.OptionsPrefilter.Visible := Prefilter; - TcxPivotGridAccess(APivotGrid).ViewInfo.DrawBorders := Borders; - TcxPivotGridAccess(APivotGrid).ViewInfo.DrawExpandButtons := ExpandButtons; -end; - -procedure TcxPivotGridReportLinkOptionsView.SetBoolValue( - var AField: Boolean; ANewValue: Boolean); -begin - if AField <> ANewValue then - begin - AField := ANewValue; - Changed; - end; -end; - -function TcxPivotGridReportLinkOptionsView.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -procedure TcxPivotGridReportLinkOptionsView.SetBorders(AValue: Boolean); -begin - if FBorders <> AValue then - begin - FBorders := AValue; - Changed; - end; -end; - -procedure TcxPivotGridReportLinkOptionsView.SetColumnFields(AValue: Boolean); -begin - SetBoolValue(FColumnFields, AValue); -end; - -procedure TcxPivotGridReportLinkOptionsView.SetDataFields(AValue: Boolean); -begin - SetBoolValue(FDataFields, AValue); -end; - -procedure TcxPivotGridReportLinkOptionsView.SetExpandButtons(AValue: Boolean); -begin - SetBoolValue(FExpandButtons, AValue); -end; - -procedure TcxPivotGridReportLinkOptionsView.SetFilterFields(AValue: Boolean); -begin - SetBoolValue(FFilterFields, AValue); -end; - -procedure TcxPivotGridReportLinkOptionsView.SetGridLines( - AValue: TcxPivotGridLines); -begin - if FGridLines <> AValue then - begin - FGridLines := AValue; - Changed; - end; -end; - -procedure TcxPivotGridReportLinkOptionsView.SetPrefilter(AValue: TcxPivotGridPrefilterVisible); -begin - if FPrefilter <> AValue then - begin - FPrefilter := AValue; - Changed; - end; -end; - -procedure TcxPivotGridReportLinkOptionsView.SetRowFields(AValue: Boolean); -begin - SetBoolValue(FRowFields, AValue); -end; - -{ TcxPivotGridReportLinkStyles } - -constructor TcxPivotGridReportLinkStyles.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - BitmapInViewParams := True; -end; - -procedure TcxPivotGridReportLinkStyles.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxPivotGridReportLinkStyles then - with TcxPivotGridReportLinkStyles(Source) do - begin - Self.ColumnHeader := ColumnHeader; - Self.Content := Content; - Self.FieldHeader := FieldHeader; - Self.HeaderBackground := HeaderBackground; - Self.Prefilter := Prefilter; - Self.RowHeader := RowHeader; - end; -end; - -function TcxPivotGridReportLinkStyles.GetColumnHeaderParams( - AColumn: TcxPivotGridViewDataItem): TcxViewParams; -begin - if UsePivotStyles then - else - GetViewParams(vspsPGridColumnHeader, AColumn, nil, Result); -end; - -function TcxPivotGridReportLinkStyles.GetContentParams( - ACell: TcxPivotGridDataCellViewInfo): TcxViewParams; -begin - GetViewParams(vspsPGridContent, ACell, nil, Result); -end; - -function TcxPivotGridReportLinkStyles.GetFieldHeaderParams( - AField: TcxPivotGridField): TcxViewParams; -begin - GetViewParams(vspsPGridFieldHeader, AField, nil, Result); -end; - -function TcxPivotGridReportLinkStyles.GetHeaderBackgroundParams( - AArea: TcxPivotGridFieldArea): TcxViewParams; -begin - GetViewParams(vspsPGridHeaderBackground, nil, nil, Result); -end; - -function TcxPivotGridReportLinkStyles.GetPrefilterParams: TcxViewParams; -begin - GetViewParams(vspsPGridPrefilter, nil, nil, Result); -end; - -function TcxPivotGridReportLinkStyles.GetRowHeaderParams( - ARow: TcxPivotGridViewDataItem): TcxViewParams; -begin - GetViewParams(vspsPGridRowHeader, ARow, nil, Result); -end; - -procedure TcxPivotGridReportLinkStyles.AssignToPivot( - AFromGrid, ADestGrid: TcxCustomPivotGrid; AUsePivotStyles: Boolean); -begin - if (ADestGrid = nil) or (AFromGrid = nil) then Exit; - if AUsePivotStyles then - ADestGrid.Styles.Assign(AFromGrid.Styles) - else - begin - ADestGrid.Styles.ColumnHeader := ColumnHeader; - ADestGrid.Styles.Content := Content; - ADestGrid.Styles.FieldHeader := FieldHeader; - ADestGrid.Styles.HeaderBackground := HeaderBackground; - ADestGrid.Styles.Prefilter := Prefilter; - ADestGrid.Styles.RowHeader := RowHeader; - end; -end; - -function TcxPivotGridReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 3; -end; - -procedure TcxPivotGridReportLinkStyles.GetDefaultViewParams( - Index: Integer; AData: TObject; out AParams: TcxViewParams); -begin - inherited GetDefaultViewParams(Index, AData, AParams); - if ReportLink <> nil then - begin - if Index in [vspsPGridColumnHeader, vspsPGridFieldHeader, vspsPGridRowHeader] then - AParams.Color := dxPSCore.dxDefaultFixedColor - else - AParams.Color := dxDefaultContentColor; - AParams.Font := ReportLink.Font; - AParams.TextColor := AParams.Font.Color; - end; -end; - -class function TcxPivotGridReportLinkStyles.GetStyleCaption( - AnIndex: Integer): string; -begin - case AnIndex of - vspsPGridColumnHeader: - Result := cxGetResourceString(@sdxPivotGridColumnHeader); - vspsPGridContent: - Result := cxGetResourceString(@sdxPivotGridContent); - vspsPGridFieldHeader: - Result := cxGetResourceString(@sdxPivotGridFieldHeader); - vspsPGridHeaderBackground: - Result := cxGetResourceString(@sdxPivotGridHeaderBackground); - vspsPGridPrefilter: - Result := cxGetResourceString(@sdxPivotGridPrefilter); - else - Result := cxGetResourceString(@sdxPivotGridRowHeader); - end; -end; - -function TcxPivotGridReportLinkStyles.GetStyleIndexByCaption( - const Caption: string): Integer; -begin - for Result := vspsPGridFirst to vspsPGridLast do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Result)) then - Exit; - Result := -1; -end; - -function TcxPivotGridReportLinkStyles.UsePivotStyles: Boolean; -begin - if ReportLink = nil then - begin - Result := False; - Exit; - end; - Result := not ReportLink.OptionsFormatting.UseNativeStyles; - if not Result then - Result := (ReportLink = nil) or (ReportLink.PivotGrid = nil); -end; - -function TcxPivotGridReportLinkStyles.GetReportLink: TcxPivotGridReportLink; -begin - if Owner is TcxPivotGridReportLink then - Result := Owner as TcxPivotGridReportLink - else - Result := nil; -end; - -{ TcxPivotGridReportLinkOptionsFormatting } - -procedure TcxPivotGridReportLinkOptionsFormatting.Assign(Source: TPersistent); -begin - if Source is TcxPivotGridReportLinkOptionsFormatting then - SuppressContentColoration := TcxPivotGridReportLinkOptionsFormatting(Source).SuppressContentColoration; - inherited Assign(Source); -end; - -procedure TcxPivotGridReportLinkOptionsFormatting.RestoreDefaults; -begin - inherited RestoreDefaults; - SuppressContentColoration := False; -end; - -procedure TcxPivotGridReportLinkOptionsFormatting.AssignToPivot( - APivotGrid: TcxCustomPivotGrid); -begin - APivotGrid.LookAndFeel.Kind := LookAndFeelKind; - APivotGrid.LookAndFeel.NativeStyle := False; - with TcxPivotGridStylesAccess(APivotGrid.Styles) do - begin - SuppressContentColoration := Self.SuppressContentColoration; - SuppressBackgroundBitmaps := Self.SuppressBackgroundBitmaps; - end; -end; - -function TcxPivotGridReportLinkOptionsFormatting.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -procedure TcxPivotGridReportLinkOptionsFormatting.SetSuppressContentColoration( - AValue: Boolean); -begin - if FSuppressContentColoration <> AValue then - begin - FSuppressContentColoration := AValue; - Changed; - end; -end; - -{ TcxPivotGridReportLinkStyleSheet } - -class function TcxPivotGridReportLinkStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxPivotGridReportLinkStyles; -end; - -function TcxPivotGridReportLinkStyleSheet.GetStylesValue: TcxPivotGridReportLinkStyles; -begin - Result := TcxPivotGridReportLinkStyles(GetStyles); -end; - -procedure TcxPivotGridReportLinkStyleSheet.SetStylesValue( - AValue: TcxPivotGridReportLinkStyles); -begin - Styles.Assign(AValue); -end; - -{ TcxPivotGridReportLink } - -constructor TcxPivotGridReportLink.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FLookAndFeelItems := TList.Create; -end; - -destructor TcxPivotGridReportLink.Destroy; -begin - FreeAndNil(FLookAndFeelItems); - inherited Destroy; -end; - -procedure TcxPivotGridReportLink.BuildReport; -var - AController: TcxPivotGridExportController; -begin - LookAndFeelItems.Clear; - FHostCell := TdxReportCell.Create(ReportCells.Cells); - FHostCell.BoundsRect := MakeBounds(0, 0, PageWidth, PageHeight); - FHostCell.CellSides := []; - FHostCell.Transparent := True; - FHostCell.Visible := True; - AController := TcxPivotGridExportController.Create(PivotGrid); - try - AController.ViewInfo.DrawBorders := OptionsView.Borders; - AController.ViewInfo.DrawExpandButtons := OptionsView.ExpandButtons; - InitializeOptionsBeforeBuildReport(AController); - ProcessCreateReportItems(AController.CalculateViewInfo); - finally - AController.Free; - end; -end; - -procedure TcxPivotGridReportLink.ConstructReport(AReportCells: TdxReportCells); - - procedure CalculateSizes; - - procedure CalculateReportPartSizes(ACell: TdxReportCell); - var - ARight, ABottom, I: Integer; - begin - if ACell.CellCount > 0 then - begin - ARight := 0; - ABottom := 0; - for I := 0 to ACell.CellCount - 1 do - with ACell.Cells[I] do - begin - ARight := Max(ARight, Left + Width); - ABottom := Max(ABottom, Top + Height); - end; - ACell.BoundsRect := Rect(0, 0, ARight, ABottom); - end; - end; - - begin - with AReportCells do - begin - CalculateReportPartSizes(HostCell); - if AreFooterCellsAllocated then - CalculateReportPartSizes(FooterCells); - if AreHeaderCellsAllocated then - CalculateReportPartSizes(HeaderCells); - CalculateReportPartSizes(Cells); - end; - end; - -begin - if PivotGrid = nil then Exit; - inherited ConstructReport(AReportCells) ; - PrepareConstruct; - try - BuildReport; - if not AbortBuilding then CalculateSizes; - finally - UnprepareConstruct; - end; -end; - -procedure TcxPivotGridReportLink.ConvertCoords; -begin - inherited ConvertCoords; -end; - -procedure TcxPivotGridReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -begin - case AItem.Data of - cxPivotGridDataCellID: - if AItem.ClassType = TdxReportCellString then - DoCustomDrawDataCell(ACanvas, TdxReportCellString(AItem), ADone); - cxPivotGridFieldHeaderCellID: - DoCustomDrawFieldHeaderCell(ACanvas, AItem.Parent, ADone); - cxPivotGridGroupHeaderCellID: - DoCustomDrawGroupHeaderCell(ACanvas, AItem.Parent, ADone); - cxPivotGridHeaderBackgroundID: - DoCustomDrawHeaderBackground(ACanvas, AItem.Parent, ADone); - cxPivotGridPrefilterID: - DoCustomDrawPrefilter(ACanvas, TdxReportCellString(AItem), ADone); - end; -end; - -procedure TcxPivotGridReportLink.DoCustomDrawDataCell(ACanvas: TCanvas; - AItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDataCell) then - FOnCustomDrawDataCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxPivotGridReportLink.DoCustomDrawFieldHeaderCell(ACanvas: TCanvas; - AItem: TdxReportCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFieldHeaderCell) then - FOnCustomDrawFieldHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxPivotGridReportLink.DoCustomDrawGroupHeaderCell(ACanvas: TCanvas; - AItem: TdxReportCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawGroupHeaderCell) then - FOnCustomDrawGroupHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxPivotGridReportLink.DoCustomDrawHeaderBackground(ACanvas: TCanvas; - AItem: TdxReportCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeaderBackground) then - FOnCustomDrawHeaderBackground(Self, ACanvas, AItem, ADone); -end; - -procedure TcxPivotGridReportLink.DoCustomDrawPrefilter(ACanvas: TCanvas; AItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawPrefilter) then - FOnCustomDrawPrefilter(Self, ACanvas, AItem, ADone); -end; - -procedure TcxPivotGridReportLink.DoInitializeDataCell( - AItem: TAbstractdxReportCellData; ACell: TcxPivotGridDataCellViewInfo); -begin - if Assigned(FOnInitializeDataCell) then - FOnInitializeDataCell(Self, ACell, AItem); -end; - -procedure TcxPivotGridReportLink.DoInitializeFieldHeaderCell( - AItem: TdxReportCell; ACell: TcxPivotGridFieldHeaderCellViewInfo); -begin - if Assigned(FOnInitializeFieldHeaderCell) then - FOnInitializeFieldHeaderCell(Self, ACell, AItem); -end; - -procedure TcxPivotGridReportLink.DoInitializeGroupHeaderCell( - AItem: TdxReportCell; ACell: TcxPivotGridHeaderCellViewInfo); -begin - if Assigned(FOnInitializeGroupHeaderCell) then - FOnInitializeGroupHeaderCell(Self, ACell, AItem); -end; - -procedure TcxPivotGridReportLink.DoInitializeHeaderBackground(AItem: TdxReportCell; ACell: TcxPivotGridHeaderBackgroundCellViewInfo); -begin - if Assigned(FOnInitializeHeaderBackground) then - FOnInitializeHeaderBackground(Self, ACell, AItem); -end; - -procedure TcxPivotGridReportLink.DoInitializePrefilter(AItem: TdxReportCellString; - ACell: TcxPivotGridPrefilterViewInfo); -begin - if Assigned(FOnInitializePrefilter) then - FOnInitializePrefilter(Self, ACell, AItem); -end; - -function TcxPivotGridReportLink.IdxPSCellParams_GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxPivotGridReportLink.IdxPSCellParams_GetDC: HDC; -begin - Result := ScreenDC; -end; - -function TcxPivotGridReportLink.IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; -begin - Result := OptionsRefinements.DisplayGraphicsAsText; -end; - -function TcxPivotGridReportLink.IdxPSCellParams_GetEndEllipsis: Boolean; -begin - Result := False; -end; - -function TcxPivotGridReportLink.IdxPSCellParams_GetFlatCheckMarks: Boolean; -begin - Result := OptionsRefinements.FlatCheckMarks; -end; - -function TcxPivotGridReportLink.IdxPSCellParams_GetGraphicsText: string; -begin - Result := OptionsRefinements.GraphicsText; -end; - -function TcxPivotGridReportLink.IdxPSCellParams_GetMultiline: Boolean; -begin - Result := False; -end; - -function TcxPivotGridReportLink.IdxPSCellParams_GetTransparentGraphics: Boolean; -begin - Result := OptionsRefinements.TransparentGraphics; -end; - -procedure TcxPivotGridReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited GetImageLists(AProc); - AProc(PivotGrid.FieldHeaderImages); - AProc(PivotGrid.GroupHeaderImages); -end; - -procedure TcxPivotGridReportLink.AddDataCell( - ACell: TcxPivotGridDataCellViewInfo); -var - APSCell: TAbstractdxReportCellData; - AViewParams: TdxReportItemViewParams; -begin - if ACell.Properties <> nil then - begin - APSCell := HostCell.AddDataItem(dxPSDataMaps.ItemClass(ACell.Properties, False)); - dxPScxCommon.dxPSDataMaps.InitializeItem(APSCell, ACell.Properties, - ACell.Value, Self, AViewParams); - end - else - begin - APSCell := HostCell.AddDataItem(TdxReportCellString); - TdxReportCellString(APSCell).TextAlignX := TextAlignXMap[ACell.Align]; - TdxReportCellString(APSCell).Text := ACell.DisplayText; - APSCell.Color := ACell.Color; - APSCell.CellSides := TdxCellSides(ACell.Borders); - end; - APSCell.BoundsRect := ACell.Bounds; - SetCellViewParams(APSCell, ACell.ViewParams); - APSCell.Data := cxPivotGridDataCellID; - DoInitializeDataCell(APSCell, ACell); -end; - -procedure TcxPivotGridReportLink.AddFieldHeaderCell( - ACell: TcxPivotGridFieldHeaderCellViewInfo); -begin - DoInitializeFieldHeaderCell(CreateHeaderCell( - ACell, cxPivotGridFieldHeaderCellID), ACell); -end; - -procedure TcxPivotGridReportLink.AddHeaderBackground(ACell: TcxPivotGridHeaderBackgroundCellViewInfo); -var - ABackgroundCell: TdxReportCell; -begin - ABackgroundCell := HostCell.AddCell; - ABackgroundCell.BoundsRect := ACell.Bounds; - ABackgroundCell.CellSides := []; - ABackgroundCell.Color := ACell.Color; - SetCellViewParams(ABackgroundCell, ACell.ViewParams); - ABackgroundCell.Data := cxPivotGridHeaderBackgroundID; - DoInitializeHeaderBackground(ABackgroundCell, ACell); -end; - -procedure TcxPivotGridReportLink.AddHeaderCell( - ACell: TcxPivotGridHeaderCellViewInfo); -var - AItem: TdxReportCell; -begin - AItem := CreateHeaderCell(ACell, cxPivotGridGroupHeaderCellID); - AddHorizontalDelimiter(AItem); - AddVerticalDelimiter(AItem); - DoInitializeGroupHeaderCell(AItem, ACell); -end; - -procedure TcxPivotGridReportLink.AddPrefilter(ACell: TcxPivotGridPrefilterViewInfo); -const - APSCellClass: array [Boolean] of TdxReportCellStringClass = - (TdxReportCellCheck, TdxReportCellString); -var - APrefilterCell: TdxReportCell; - APSCell: TdxReportCellString; -begin - APrefilterCell := HostCell.AddCell; - APrefilterCell.BoundsRect := ACell.Bounds; - APrefilterCell.CellSides := []; - APSCell := APrefilterCell.AddDataItem(APSCellClass[ACell.Prefilter.Filter.IsEmpty]) as APSCellClass[ACell.Prefilter.Filter.IsEmpty]; - APSCell.BoundsRect := MakeRect(0, 0, APrefilterCell.Width, APrefilterCell.Height); - APSCell.Text := ACell.DisplayText; - APSCell.Color := ACell.Color; - APSCell.CellSides := []; - SetCellViewParams(APSCell, ACell.ViewParams); - APSCell.Data := cxPivotGridPrefilterID; - APSCell.EndEllipsis := True; - if APSCell is TdxReportCellCheck then - begin - TdxReportCellCheck(APSCell).Checked := ACell.Prefilter.Filter.Active; - TdxReportCellCheck(APSCell).CheckPos := ccpLeft; - end; - DoInitializePrefilter(APSCell, ACell); -end; - -function TcxPivotGridReportLink.CreateHeaderCell( - ACell: TcxPivotGridHeaderCellViewInfo; AttributeID: Integer): TdxReportCell; -var - R: TRect; - APSCell: TAbstractdxReportCellData; - AIndent: TdxReportCellString; - AButton: TdxReportCellExpandButton; - AViewParams: TdxReportItemViewParams; -const - AImageLayout: array[TcxAlignmentVert, TAlignment] of TdxImageLayout = - ((ilImageTopLeft, ilImageTopRight, ilImageTopCenter), - (ilImageBottomLeft, ilImageBottomRight, ilImageBottomCenter), - (ilImageCenterLeft, ilImageCenterRight, ilImageCenterCenter)); - -begin - Result := HostCell.AddCell; - Result.BoundsRect := ACell.Bounds; - Result.CellSides := []; - if ACell.Properties <> nil then - begin - APSCell := Result.AddDataItem(dxPSDataMaps.ItemClass(ACell.Properties, False)); - dxPScxCommon.dxPSDataMaps.InitializeItem(APSCell, ACell.Properties, - ACell.Value, Self, AViewParams); - end - else - begin - APSCell := Result.AddDataItem(TdxReportCellImage); - with TdxReportCellImage(APSCell) do - begin - TextAlignX := TextAlignXMap[ACell.AlignHorz]; - TextAlignY := TextAlignYMap[ACell.AlignVert]; - Text := ACell.DisplayText; - Color := ACell.Color; - SortOrder := TdxCellSortOrder(ACell.SortOrder); - EndEllipsis := ACell.ShowEndEllipsis; - Multiline := ACell.MultiLine; - ImageIndex := ACell.ImageIndex; - if ImageIndex <> -1 then - ImageList := ACell.Images; - ImageLayout := AImageLayout[ACell.ImageAlignVert, ACell.ImageAlignHorz]; - IsTextDrawnForCenteredImage := True; - CellSides := csAll; - end - end; - APSCell.BoundsRect := MakeRect(0, 0, Result.Width, Result.Height); - if ACell.HasButton and OptionsView.ExpandButtons and (ACell.Bounds.Right > ACell.ButtonRect.Right) then - begin - AButton := Result.AddDataItem(TdxReportCellExpandButton) as TdxReportCellExpandButton; - R := ACell.ButtonRect; - OffsetRect(R, -ACell.Bounds.Left, -ACell.Bounds.Top); - AButton.BoundsRect := R; - AButton.CellSides := []; - AIndent := Result.AddDataItem(TdxReportCellString) as TdxReportCellString; - AIndent.BoundsRect := MakeRect(0, 0, AButton.Left + AButton.Width + cxTextOffset, - Result.Height); - AIndent.CellSides := [csLeft, csTop, csBottom]; - APSCell.CellSides := APSCell.CellSides - [csLeft]; - AButton.ButtonExpanded := ACell.Expanded; - AButton.ShowButtonBorder := True; - AButton.ShowButton := True; - AButton.ButtonBorder3D := Effects3D; - AButton.ButtonBorder3DSoft := Soft3D; - APSCell.Left := AIndent.Left + AIndent.Width; - APSCell.Width := APSCell.Width - APSCell.Left; - SetCellViewParams(AButton, ACell.ViewParams); - SetCellViewParams(AIndent, ACell.ViewParams); - RegisterLookAndFeelItem(AIndent, cesRaised); - end; - APSCell.Data := AttributeID; - SetCellViewParams(APSCell, ACell.ViewParams); - RegisterLookAndFeelItem(APSCell, cesRaised); -end; - -procedure TcxPivotGridReportLink.InitializeOptionsBeforeBuildReport( - AController: TcxPivotGridExportController); -begin - AController.ExpandColumns := OptionsExpanding.AutoExpandColumns; - AController.ExpandRows := OptionsExpanding.AutoExpandRows; - if OptionsFormatting.UseNativeStyles then - AController.ReplaceStyles(ActiveStyles); - with AController.OptionsView do - begin - ColumnFields := Self.OptionsView.ColumnFields; - DataFields := Self.OptionsView.DataFields; - FilterFields := Self.OptionsView.FilterFields; - GridLines := Self.OptionsView.GridLines; - RowFields := Self.OptionsView.RowFields; - end; - AController.PivotGrid.OptionsPrefilter.Visible := Self.OptionsView.Prefilter; -end; - -procedure TcxPivotGridReportLink.ProcessCreateReportItems( - AViewInfo: TcxPivotGridViewInfo); -var - I, AStart, ACount: Integer; -begin - with AViewInfo do - begin - AStart := 0; - ACount := RowHeaders.Count + ColumnHeaders.Count + - FieldHeaders.Count + DataCells.Count; - for I := 0 to CommonCells.Count - 1 do - if (CommonCells[I] is TcxPivotGridHeaderBackgroundCellViewInfo) then - AddHeaderBackground(TcxPivotGridHeaderBackgroundCellViewInfo(CommonCells[I])); - for I := 0 to RowHeaders.Count - 1 do - begin - AddHeaderCell(TcxPivotGridHeaderCellViewInfo(RowHeaders[I])); - DoProgress(100 * (AStart + I + 1) / ACount); - end; - Inc(AStart, RowHeaders.Count); - for I := 0 to ColumnHeaders.Count - 1 do - begin - AddHeaderCell(TcxPivotGridHeaderCellViewInfo(ColumnHeaders[I])); - DoProgress(100 * (AStart + I + 1) / ACount); - end; - Inc(AStart, ColumnHeaders.Count); - for I := 0 to FieldHeaders.Count - 1 do - begin - AddFieldHeaderCell(TcxPivotGridFieldHeaderCellViewInfo(FieldHeaders[I])); - DoProgress(100 * (AStart + I + 1) / ACount); - end; - Inc(AStart, FieldHeaders.Count); - for I := 0 to DataCells.Count - 1 do - begin - AddDataCell(TcxPivotGridDataCellViewInfo(DataCells[I])); - DoProgress(100 * (AStart + I + 1) / ACount); - end; - if Prefilter.Visible then - AddPrefilter(Prefilter.ViewInfo); - end; -end; - -procedure TcxPivotGridReportLink.RegisterLookAndFeelItem( - AItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); -begin - AItem.EdgeMode := GetEdgeMode; - AItem.Edge3DStyle := AEdgeStyle; - FLookAndFeelItems.Add(AItem); -end; - -procedure TcxPivotGridReportLink.SetCellViewParams( - ACell: TdxReportVisualItem; const AParams: TcxViewParams); -var - AdxPSViewParams: TdxReportItemViewParams; -begin - if not Assigned(ACell) then Exit; - FillChar(AdxPSViewParams, SizeOf(AdxPSViewParams), 0); - AdxPSViewParams.NativeParams := AParams; - SetCellViewParamsEx(ACell, AdxPSViewParams); -end; - -procedure TcxPivotGridReportLink.SetCellViewParamsEx( - ACell: TdxReportVisualItem; const AParams: TdxReportItemViewParams); -var - AFont: TFont; - AHasBitmap: Boolean; -begin - if not Assigned(ACell) then Exit; - AFont := TFont.Create; - try - AFont.Assign(AParams.NativeParams.Font); - if not dxPSUtl.dxIsTrueTypeFont(AFont) then - AFont.Name := Font.Name; - AFont.Color := ColorToRGB(AParams.NativeParams.TextColor); - if AParams.FontSize <> 0 then - AFont.Size := AParams.FontSize; - AFont.Style := AFont.Style + AParams.FontStyle; - ACell.FontIndex := AddFontToPool(AFont); - ACell.Transparent := OptionsFormatting.SuppressContentColoration or AParams.Transparent; - with AParams.NativeParams do - begin - AHasBitmap := not OptionsFormatting.SuppressBackgroundBitmaps and - (Bitmap <> nil) and not Bitmap.Empty; - if AHasBitmap then - ACell.BackgroundBitmapIndex := AddBackgroundBitmapToPool(Bitmap); - end; - ACell.Color := ColorToRGB(AParams.NativeParams.Color); - finally - AFont.Free; - end; -end; - -procedure TcxPivotGridReportLink.InternalRestoreFromOriginal; -begin - inherited InternalRestoreFromOriginal; - if PivotGrid <> nil then - begin - OptionsFormatting.LookAndFeelKind := PivotGrid.LookAndFeel.Kind; - // optionsview todo: - end; -end; - -function TcxPivotGridReportLink.IsSupportedCustomDraw( - Item: TAbstractdxReportCellData): Boolean; -begin - Result := (Item <> nil) and inherited IsSupportedCustomDraw(Item); -end; - -function TcxPivotGridReportLink.GetEdgeMode: TdxCellEdgeMode; -const - EdgeModeMap: array[Boolean] of TdxCellEdgeMode = (cemPattern, cem3DEffects); -begin - Result := EdgeModeMap[OptionsFormatting.LookAndFeelKind <> lfUltraFlat]; -end; - -function TcxPivotGridReportLink.GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; -begin - Result := TcxPivotGridReportLinkOptionsExpanding; -end; - -function TcxPivotGridReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TcxPivotGridReportLinkOptionsFormatting; -end; - -function TcxPivotGridReportLink.GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; -begin - Result := TcxPivotGridReportLinkOptionsView; -end; - -function TcxPivotGridReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := OptionsFormatting.UseNativeStyles; -end; - -function TcxPivotGridReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TcxPivotGridReportLinkStyles; -end; - -function TcxPivotGridReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TcxPivotGridReportLinkStyleSheet; -end; - -function TcxPivotGridReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := DefaultdxPScxPivotGridLinkStyleSheet; -end; - -procedure TcxPivotGridReportLink.PrepareConstruct; -begin - inherited; - ReportCells.LookAndFeel := nil; -end; - -procedure TcxPivotGridReportLink.UnprepareConstruct; -begin - ReportCells.BorderColor := GridLineColor; - FormatLookAndFeelItems; - inherited UnprepareConstruct; -end; - -procedure TcxPivotGridReportLink.FormatLookAndFeelItems; -const - Borders3D: array[TdxCellEdgeStyle, Boolean] of TdxPSCellBorderClass = - ((TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder), - (TdxPSCellSunkenBorder, TdxPSCellSunkenSoftBorder)); -var - I: Integer; -begin - for I := 0 to LookAndFeelItems.Count - 1 do - with TdxReportVisualItem(LookAndFeelItems[I]) do - if Effects3D then - BorderClass := Borders3D[Edge3DStyle, Soft3D] - else - BorderClass := TdxPSCellUltraFlatBorder; -end; - -function TcxPivotGridReportLink.GetActiveStyles: TcxPivotGridReportLinkStyles; -begin - Result := inherited ActiveStyles as TcxPivotGridReportLinkStyles; -end; - -function TcxPivotGridReportLink.GetDesignWindow: TcxfmPivotGridReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TcxfmPivotGridReportLinkDesignWindow; -end; - -function TcxPivotGridReportLink.GetGridLineColor: TColor; -begin - Result := OptionsFormatting.GridLineColor; - if (Result = clDefault) and (PivotGrid <> nil) then - Result := PivotGrid.LookAndFeelPainter.DefaultGridLineColor; -end; - -function TcxPivotGridReportLink.GetOptionsExpanding: TcxPivotGridReportLinkOptionsExpanding; -begin - Result := inherited OptionsExpanding as TcxPivotGridReportLinkOptionsExpanding; -end; - -function TcxPivotGridReportLink.GetOptionsFormatting: TcxPivotGridReportLinkOptionsFormatting; -begin - Result := inherited OptionsFormatting as TcxPivotGridReportLinkOptionsFormatting; -end; - -function TcxPivotGridReportLink.GetOptionsView: TcxPivotGridReportLinkOptionsView; -begin - Result := inherited OptionsView as TcxPivotGridReportLinkOptionsView; -end; - -function TcxPivotGridReportLink.GetStyles: TcxPivotGridReportLinkStyles; -begin - Result := inherited Styles as TcxPivotGridReportLinkStyles; -end; - -function TcxPivotGridReportLink.GetPivotGrid: TcxCustomPivotGrid; -begin - Result := TcxCustomPivotGrid(Component); -end; - -procedure TcxPivotGridReportLink.SetOptionsExpanding( - AValue: TcxPivotGridReportLinkOptionsExpanding); -begin - OptionsExpanding.Assign(AValue); -end; - -procedure TcxPivotGridReportLink.SetOptionsFormatting( - AValue: TcxPivotGridReportLinkOptionsFormatting); -begin - OptionsFormatting.Assign(AValue); -end; - -procedure TcxPivotGridReportLink.SetOptionsView( - AValue: TcxPivotGridReportLinkOptionsView); -begin - OptionsView.Assign(AValue) -end; - -procedure TcxPivotGridReportLink.SetStyles( - AValue: TcxPivotGridReportLinkStyles); -begin - Styles.Assign(AValue) -end; - -{ TcxfmPivotGridReportLinkDesignWindow } - -constructor TcxfmPivotGridReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhccxPivotGridReportLinkDesigner; - inherited Create(AOwner); - CreateControls; - LoadPreviewData; -end; - -destructor TcxfmPivotGridReportLinkDesignWindow.Destroy; -begin - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(lbxStyles); - inherited Destroy; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.CreateControls; - - procedure CreateStylesListBox; - begin - lbxStyles := TdxStylesListBox.Create(Self); - lbxStyles.Parent := tshStyles; - lbxStyles.BoundsRect := bvlStylesHost.BoundsRect; - lbxStyles.PopupMenu := pmStyles; - lbxStyles.TabOrder := chbxUseNativeStyles.TabOrder + 1; - lbxStyles.OnClick := lbxStylesClick; - bvlStylesHost.Visible := False; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(lbxStyles); - end; - -begin - CreateStylesListBox; -end; - -function TcxfmPivotGridReportLinkDesignWindow.CanSelectAllStyles: Boolean; -var - I: Integer; -begin - Result := AreNativeStylesAvailable; - if Result then - begin - for I := 0 to lbxStyles.Items.Count - 1 do - if not lbxStyles.Selected[I] then Exit; - Result := False; - end; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.DoInitialize; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited DoInitialize; - BeginUpdateControls; - // view - with ReportLink.OptionsView do - begin - chbxColumnFields.Checked := ColumnFields; - chbxDataFields.Checked := DataFields; - chbxFilterFields.Checked := FilterFields; - chbxPrefilter.Checked := Prefilter = pfvAlways; - chbxRowFields.Checked := RowFields; - chbxBorders.Checked := Borders; - chbxShowExpandButtons.Checked := ExpandButtons; - chbxHorizontalLines.Checked := GridLines in [pglBoth, pglHorz]; - chbxVerticalLines.Checked := GridLines in [pglBoth, pglVert];; - end; - // behavior - chbxExpandColumns.Checked := ReportLink.OptionsExpanding.AutoExpandColumns; - chbxExpandRows.Checked := ReportLink.OptionsExpanding.AutoExpandRows; - // formatting - with ReportLink.OptionsFormatting do - begin - chbxSuppressBackgroundBitmaps.Checked := SuppressBackgroundBitmaps; - chbxSuppressContentColoration.Checked := SuppressContentColoration; - chbxUseNativeStyles.Checked := UseNativeStyles; - end; - with ReportLink.OptionsRefinements do - begin - chbxTransparentGraphics.Checked := TransparentGraphics; - chbxDisplayGraphicsAsText.Checked := DisplayGraphicsAsText; - chbxFlatCheckMarks.Checked := FlatCheckMarks; - end; - EndUpdateControls; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.RecreateStylesListBox; -var - List: TList; -begin - List := TList.Create; - try - SaveSelectedStyles(List); - dxPSUtl.dxRecreateWnd(lbxStyles); - RestoreSelectedStyles(List); - finally - List.Free; - end; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.RestoreSelectedStyles( - AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - lbxStyles.Selected[Integer(AList[I])] := True; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.SaveSelectedStyles( - AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to lbxStyles.Items.Count - 1 do - if lbxStyles.Selected[I] then AList.Add(TObject(I)); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.UpdateControlsState; -begin - inherited UpdateControlsState; - - UpdateEnabled(lbxStyles, AreNativeStylesAvailable); - UpdateEnabled(btnStyleColor, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleFont, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleBackgroundBitmap, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleBackgroundBitmapClear, AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap); - UpdateEnabled(btnStyleRestoreDefaults, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStylesSaveAs, CanSaveStyles); - - UpdateEnabled(lblStyleSheets, AreNativeStylesAvailable); - UpdateEnabled(cbxStyleSheets, AreNativeStylesAvailable); - UpdateEnabled(btnStyleSheetNew, CanCreateStyleSheet); - UpdateEnabled(btnStyleSheetCopy, CanCopyStyleSheet); - UpdateEnabled(btnStyleSheetDelete, CanDeleteStyleSheet); - UpdateEnabled(btnStyleSheetRename, CanRenameStyleSheet); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.UpdateEnabled( - AControl: TControl; AEnabled: Boolean); -begin - TControlAccess(AControl).Enabled := AEnabled; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.UpdateEnabled( - AItem: TMenuItem; AEnabled: Boolean); -begin - AItem.Enabled := AEnabled; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.UpdateEnabledControls( - AControls: array of TControl; AEnabled: Boolean); -var - I: Integer; -begin - for I := 0 to High(AControls) do - UpdateEnabled(AControls[I], AEnabled); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.UpdatePreview; -begin - inherited UpdatePreview; - PreviewPivotGrid.BeginUpdate; - try - ReportLink.OptionsView.AssignToPivot(PreviewPivotGrid); - ReportLink.OptionsExpanding.AssignToPivot(PreviewPivotGrid); - ReportLink.ActiveStyles.AssignToPivot(ReportLink.PivotGrid, - PreviewPivotGrid, not ReportLink.OptionsFormatting.UseNativeStyles); - ReportLink.OptionsFormatting.AssignToPivot(PreviewPivotGrid); - PreviewPivotGrid.FullRefresh; - finally - PreviewPivotGrid.EndUpdate; - end; -end; - -// - -procedure TcxfmPivotGridReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited DoActiveStyleSheetChanged; - with cbxStyleSheets do - ItemIndex := Items.IndexOfObject(ActiveStyleSheet); - if not LockControlsUpdate then - begin - Modified := True; - UpdatePreview; - end; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin - inherited; - if not AnActive then lbxStyles.HideToolTips; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.DoRefreshStylesList; -var - Styles: TcxPivotGridReportLinkStyles; - List: TList; -begin - Styles := ReportLink.ActiveStyles; - with lbxStyles.Items do - begin - BeginUpdate; - try - List := TList.Create; - try - SaveSelectedStyles(List); - try - Clear; - AddObject(cxGetResourceString(@sdxPivotGridColumnHeader), Styles.ColumnHeader); - AddObject(cxGetResourceString(@sdxPivotGridContent), Styles.Content); - AddObject(cxGetResourceString(@sdxPivotGridFieldHeader), Styles.FieldHeader); - AddObject(cxGetResourceString(@sdxPivotGridHeaderBackground), Styles.HeaderBackground); - AddObject(cxGetResourceString(@sdxPivotGridPrefilter), Styles.Prefilter); - AddObject(cxGetResourceString(@sdxPivotGridRowHeader), Styles.RowHeader); - finally - RestoreSelectedStyles(List); - end; - finally - List.Free; - end; - finally - EndUpdate; - end; - end; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - inherited; - Modified := True; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin - if ARecreate then - RecreateStylesListBox - else - lbxStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - with lbxStyles do - for I := 0 to Items.Count - 1 do - if Selected[I] then - AStrings.AddObject(Items[I], Items.Objects[I]); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := lbxStyles.Items; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := cbxStyleSheets.Items; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.LoadCaption( - AControl: TControl; StrPtr: Pointer); -begin - TControlAccess(AControl).Caption := cxGetResourceString(StrPtr); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.LoadCaption( - AItem: TMenuItem; StrPtr: Pointer); -begin - AItem.Caption := cxGetResourceString(StrPtr); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.LoadPreviewData; -var - AStream: TStream; -begin - AStream := TResourceStream.Create(hInstance, 'PIVOTPREVIEWDATA', 'PIVOTDATA'); - try - AStream.Position := 0; - PreviewPivotGrid.DataController.LoadFromStream(AStream); - PreviewPivotGrid.FullRefresh; - finally - AStream.Free; - end; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.LoadStrings; - - procedure AdjustBevelSize(ABevel: TBevel; AControl: TControl); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := AControl.Left + AControl.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - inherited LoadStrings; - - LoadCaption(tshView, @sdxViewTab); - LoadCaption(tshBehaviors, @sdxBehaviorsTab); - LoadCaption(tshFormatting, @sdxFormatting); - LoadCaption(tshStyles, @sdxStyles); - LoadCaption(lblPreviewWindow, @sdxPreview); - LoadCaption(lblShow, @sdxShow); - LoadCaption(lblCardFraming, @sdxFraming); - - // pivot preview - pgfPurchaseQuarter.Caption := cxGetResourceString(@sdxPurchaseQuarter); - pgfPurchaseMonth.Caption := cxGetResourceString(@sdxPurchaseMonth); - pgfPaymentType.Caption := cxGetResourceString(@sdxPaymentType); - pgfQuantity.Caption := cxGetResourceString(@sdxQuantity); - pgfCarName.Caption := cxGetResourceString(@sdxCarName); - pgfUnitPrice.Caption := cxGetResourceString(@sdxUnitPrice); - pgfCompanyName.Caption := cxGetResourceString(@sdxCompanyName); - pgfPaymentAmount.Caption := cxGetResourceString(@sdxPaymentAmount); - // view - LoadCaption(chbxColumnFields, @sdxColumnFields); - LoadCaption(chbxDataFields, @sdxDataFields); - LoadCaption(chbxFilterFields, @sdxFiterFields); - LoadCaption(chbxPrefilter, @sdxPrefilter); - LoadCaption(chbxRowFields, @sdxRowFields); - LoadCaption(chbxShowExpandButtons, @sdxExpandButtons); - LoadCaption(chbxHorizontalLines, @sdxHorzLines); - LoadCaption(chbxVerticalLines, @sdxVertLines); - LoadCaption(chbxBorders, @sdxBorderLines); - //Behaviors - LoadCaption(lblExpanding, @sdxExpanding); - LoadCaption(chbxExpandColumns, @sdxAutoColumnsExpand); - LoadCaption(chbxExpandRows, @sdxAutoRowsExpand); - // Formatting - LoadCaption(lblLookAndFeel, @sdxLookAndFeel); - AdjustBevelSize(bvlLookAndFeel, lblLookAndFeel); - LoadStringsCombo(cbxLookAndFeel, [@sdxLookAndFeelFlat, - @sdxLookAndFeelStandard, @sdxLookAndFeelUltraFlat]); - cbxLookAndFeel.ItemIndex := Integer(ReportLink.OptionsFormatting.LookAndFeelKind); - LoadCaption(lblRefinements, @sdxRefinements); - LoadCaption(chbxTransparentGraphics, @sdxTransparentGraphics); - LoadCaption(chbxDisplayGraphicsAsText, @sdxDisplayGraphicsAsText); - LoadCaption(chbxFlatCheckMarks, @sdxFlatCheckMarks); - LoadCaption(chbxSuppressBackgroundBitmaps, @ sdxSuppressBackgroundBitmaps); - LoadCaption(chbxSuppressContentColoration, @ sdxSuppressContentColoration); - //styles - LoadCaption(lblUseNativeStyles, @sdxUseNativeStyles); - AdjustBevelSize(bvlStyles, lblUseNativeStyles); - LoadCaption(btnStyleColor, @sdxBtnColor); - LoadCaption(btnStyleFont, @sdxBtnFont); - LoadCaption(btnStyleBackgroundBitmap, @sdxBtnTexture); - LoadCaption(btnStyleBackgroundBitmapClear, @sdxBtnTextureClear); - LoadCaption(btnStyleRestoreDefaults, @sdxBtnRestoreDefaults); - LoadCaption(btnStylesSaveAs, @sdxBtnSaveAs); - LoadCaption(miStyleColor, @sdxBtnColor); - LoadCaption(miStyleFont, @sdxBtnFont); - LoadCaption(miStyleBackgroundBitmap, @sdxBtnTexture); - LoadCaption(miStyleBackgroundBitmapClear, @sdxBtnTextureClear); - LoadCaption(miStyleRestoreDefaults, @sdxBtnRestoreDefaults); - LoadCaption(miStylesSelectAll, @sdxSelectAll); - LoadCaption(miStylesSaveAs, @sdxBtnSaveAs); - LoadCaption(lblStyleSheets, @sdxStyleSheets); - AdjustBevelSize(bvlStyleSheets, lblStyleSheets); - LoadCaption(btnStyleSheetNew, @sdxBtnNew); - LoadCaption(btnStyleSheetCopy, @sdxBtnCopy); - LoadCaption(btnStyleSheetDelete, @sdxBtnDelete); - LoadCaption(btnStyleSheetRename, @sdxBtnRename); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.LoadStringsCombo( - ACombo: TComboBox; ACaptions: array of Pointer); -var - I: Integer; -begin - with ACombo.Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to High(ACaptions) do - if ACaptions[I] <> nil then Add(cxGetResourceString(ACaptions[I])); - finally - EndUpdate; - end; - end; -end; - -function TcxfmPivotGridReportLinkDesignWindow.GetActiveStyle: TcxStyle; -begin - with lbxStyles do - begin - if ItemIndex <> -1 then - Result := TcxStyle(Items.Objects[ItemIndex]) - else - Result := nil; - end; -end; - -function TcxfmPivotGridReportLinkDesignWindow.GetHasSelectedStyles: Boolean; -begin - Result := lbxStyles.SelCount <> 0; -end; - -function TcxfmPivotGridReportLinkDesignWindow.GetHasSelectedStylesWithAssignedBitmap: Boolean; -var - Strings: TStrings; - I: Integer; - cxStyle: TcxStyle; -begin - Result := True; - Strings := TStringList.Create; - try - GetSelectedStyleNames(Strings); - for I := 0 to Strings.Count - 1 do - begin - cxStyle := TcxStyle(Strings.Objects[I]); - if (cxStyle <> nil) and (cxStyle.Bitmap <> nil) and not cxStyle.Bitmap.Empty then - Exit; - end; - finally - Strings.Free; - end; - Result := False; -end; - -function TcxfmPivotGridReportLinkDesignWindow.GetReportLink: TcxPivotGridReportLink; -begin - Result := TcxPivotGridReportLink(inherited ReportLink); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.lbxStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - UpdateControlsState; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.OptionsFormattingChanged( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - case TControl(Sender).Tag of - 0: - begin - ReportLink.OptionsFormatting.UseNativeStyles := chbxUseNativeStyles.Checked; - RecreateStylesListBox; - end; - 1: - ReportLink.OptionsFormatting.SuppressBackgroundBitmaps := chbxSuppressBackgroundBitmaps.Checked; - 2: - ReportLink.OptionsFormatting.SuppressContentColoration := chbxSuppressContentColoration.Checked; - 3: - ReportLink.OptionsRefinements.TransparentGraphics := chbxTransparentGraphics.Checked; - 4: - ReportLink.OptionsRefinements.DisplayGraphicsAsText := chbxDisplayGraphicsAsText.Checked; - 5: - ReportLink.OptionsRefinements.FlatCheckMarks := chbxFlatCheckMarks.Checked; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleFontClick(Sender: TObject); -begin - PerformStylesChangeFont; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleColorClick(Sender: TObject); -begin - PerformStylesChangeColor; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleBackgroundBitmapClick(Sender: TObject); -begin - PerformStylesChangeBitmap; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleClearClick(Sender: TObject); -begin - PerformStylesClearBitmap; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleRestoreDefaultsClick( - Sender: TObject); -begin - PerformStylesRestoreDefaults; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStylesSaveAsClick( - Sender: TObject); -begin - PerformStylesSaveAsStyleSheet; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleSheetNewClick(Sender: TObject); -begin - PerformStyleSheetNew; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleSheetCopyClick(Sender: TObject); -begin - PerformStyleSheetCopy; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleSheetDeleteClick(Sender: TObject); -begin - PerformStyleSheetDelete; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleSheetRenameClick(Sender: TObject); -begin - PerformStyleSheetRename; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.lblUseNativeStylesClick( - Sender: TObject); -begin - if chbxUseNativeStyles.CanFocus then - ActiveControl := chbxUseNativeStyles; - chbxUseNativeStyles.Checked := not chbxUseNativeStyles.Checked; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.pmStylesPopup( - Sender: TObject); -begin - lbxStyles.HideToolTips; - UpdateEnabled(miStyleColor, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleFont, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleBackgroundBitmap, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleBackgroundBitmapClear, AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap); - UpdateEnabled(miStyleRestoreDefaults, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStylesSelectAll, CanSelectAllStyles); - UpdateEnabled(miStylesSaveAs, CanSaveStyles); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.miStylesSelectAllClick( - Sender: TObject); -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - with lbxStyles do - begin - {$IFDEF DELPHI6} - SelectAll; - {$ELSE} - Items.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - Selected[I] := True; - finally - Items.EndUpdate; - end; - {$ENDIF} - end; - UpdateControlsState; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.cbxStyleSheetsClick( - Sender: TObject); -begin - with TComboBox(Sender) do - ActiveStyleSheet := TcxCustomStyleSheet(Items.Objects[ItemIndex]) -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.cbxStyleSheetsKeyDown( - Sender: TObject; var Key: Word; Shift: TShiftState); -begin - PerformStyleSheetKeyDown(Sender, Key, Shift); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.cbxStyleSheetsDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -begin - PerformStyleSheetDrawItem(TComboBox(Control).Canvas, Index, Rect, State, Control.Enabled); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.cbxLookAndFeelChange( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsFormatting.LookAndFeelKind := - TcxLookAndFeelKind(cbxLookAndFeel.ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.chbxExpandOptionsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TCheckBox(Sender) do - begin - case Tag of - 0: - ReportLink.OptionsExpanding.AutoExpandColumns := Checked; - 1: - ReportLink.OptionsExpanding.AutoExpandRows := Checked; - end; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.chbxOptionsViewClick( - Sender: TObject); -const - AVisible: array [Boolean] of TcxPivotGridPrefilterVisible = (pfvNever, pfvAlways); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsView do - begin - case TCheckBox(Sender).Tag of - 0: - begin - ColumnFields := chbxColumnFields.Checked; - DataFields := chbxDataFields.Checked; - FilterFields := chbxFilterFields.Checked; - RowFields := chbxRowFields.Checked; - end; - 1, 2: - begin - if chbxHorizontalLines.Checked and chbxVerticalLines.Checked then - GridLines := pglBoth - else - if chbxHorizontalLines.Checked then - GridLines := pglHorz - else - if chbxVerticalLines.Checked then - GridLines := pglVert - else - GridLines := pglNone; - end; - 3: - Borders := TCheckBox(Sender).Checked; - 4: - ExpandButtons := TCheckBox(Sender).Checked; - 5: - Prefilter := AVisible[TCheckBox(Sender).Checked]; - end; - end; - Modified := True; - UpdatePreview; -end; - -// common - -procedure RegisterAssistants; -begin - dxPSRegisterReportLink(TcxPivotGridReportLink, - TcxCustomPivotGrid, TcxfmPivotGridReportLinkDesignWindow); -end; - -procedure UnregisterAssistants; -begin - dxPSUnregisterReportLink(TcxPivotGridReportLink, - TcxCustomPivotGrid, TcxfmPivotGridReportLinkDesignWindow); -end; - -initialization - RegisterAssistants; - -finalization - UnregisterAssistants; - -end. -//1. --borders-- -//2. --gridlines-- -//3. --expandbuttons-- -//4. --sorting mark-- -//5. --Images-- -//6. styles in pivot (font height, etc) - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2Lnk.res b/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2Lnk.res deleted file mode 100644 index aab165c7..00000000 Binary files a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2Lnk.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2LnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2LnkReg.pas deleted file mode 100644 index e0464794..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGrid2LnkReg.pas +++ /dev/null @@ -1,118 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxPivotGrid2LnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Windows, Classes, Controls, dxPSRes, dxPSUtl, cxStyles, cxCustomPivotGrid, cxPivotGrid, - dxPScxPivotGrid2Lnk, cxStyleSheetEditor, SysUtils, cxPivotGridStyleSheetsPreview; - -type - TcxPivotGridReportLinkStyleSheetEditorPreview = class(TcxPivotGridStyleSheetEditorPreview) - public - class function GetStyleSheetClass: TcxCustomStyleSheetClass; override; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); override; - - class procedure Register; - class procedure Unregister; - end; - -class function TcxPivotGridReportLinkStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := TcxPivotGridReportLinkStyleSheet; -end; - -procedure TcxPivotGridReportLinkStyleSheetEditorPreview.SetStyleSheet( - AStyleSheet: TcxCustomStyleSheet); -var - AStyles: TcxPivotGridReportLinkStyles; -begin - if AStyleSheet is TcxPivotGridReportLinkStyleSheet then - begin - AStyles := TcxPivotGridReportLinkStyleSheet(AStyleSheet).Styles; - with PivotGrid.Styles do - begin - ColumnHeader := AStyles.ColumnHeader; - Content := AStyles.Content; - FieldHeader := AStyles.FieldHeader; - FilterHeaderArea := AStyles.HeaderBackground; - RowHeader := AStyles.RowHeader; - end; - end - else - PivotGrid.Styles.ResetStyles; -end; - -class procedure TcxPivotGridReportLinkStyleSheetEditorPreview.Register; -begin - RegisterStyleSheetEditorPreview(Self); -end; - -class procedure TcxPivotGridReportLinkStyleSheetEditorPreview.Unregister; -begin - UnregisterStyleSheetEditorPreview(Self); -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TcxPivotGridReportLink, TcxPivotGridReportLinkStyleSheet]); - RegisterClasses([TcxPivotGridReportLink, - TcxPivotGridReportLinkStyles, TcxPivotGridReportLinkStyleSheet]); - RegisterStyleSheetClass(TcxPivotGridReportLinkStyleSheet); -end; - -initialization - TcxPivotGridReportLinkStyleSheetEditorPreview.Register; - -finalization - TcxPivotGridReportLinkStyleSheetEditorPreview.Unregister; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnk.dfm deleted file mode 100644 index e84c6db9..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnk.dfm +++ /dev/null @@ -1,1200 +0,0 @@ -object cxfmPivotGridReportLinkDesignWindow: TcxfmPivotGridReportLinkDesignWindow - Left = 349 - Top = 253 - BorderStyle = bsDialog - Caption = 'cxfmPivotGridReportLinkDesignWindow' - ClientHeight = 398 - ClientWidth = 702 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 0 - Top = 0 - Width = 702 - Height = 363 - ActivePage = tshView - TabOrder = 0 - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object bvlShow: TBevel - Left = 43 - Top = 13 - Width = 253 - Height = 4 - Shape = bsBottomLine - end - object Bevel1: TBevel - Left = 56 - Top = 147 - Width = 240 - Height = 4 - Shape = bsBottomLine - end - object Image1: TImage - Left = 9 - Top = 37 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object imgCardFraming: TImage - Left = 9 - Top = 173 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD00000000000000000 - 00DDDDDDD88888888888888888887DDDDDDDDDDDDDDDDD000000000000000000 - 00DDDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF - 00DDDDD778FFFFFFF8FFF9999FF87DDDDDDDDDDDDDDD000FFFFFFF0FFF9999FF - 00DDDD8888FFFFFFF8FFF9999FF87DDDDDDDDDDDDDD0000FFFFFFF0FFF9999FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCDDDDCDDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCCCCDCCDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCCCCCDDD0FF0F77777F0FCCCCFFFF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCDCCDDDD0FF0F77777F0FCCCCFFFF - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF77777FF87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF77FFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF77FFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDCDDDDCDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCCCCDCCDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDCCCCCCCCDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDCCCCDCCDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F78888888888888888888DDDDDDDDDDDDDDD0F7000000000000000000 - 0DDDDD8F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDDDDD0F7FFFFF0FF7FFFFFF00D - DDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF00D - DDDDDD8888888888888888888DDDDDDDDDDDDDDDDDD0000000000000000000DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardFraming: TLabel - Left = 5 - Top = 141 - Width = 38 - Height = 13 - Caption = 'Framing' - end - object chbxColumnFields: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = '&Column Fields' - TabOrder = 0 - OnClick = chbxOptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 4 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = '&Expand Buttons' - TabOrder = 4 - OnClick = chbxOptionsViewClick - end - object chbxHorizontalLines: TCheckBox - Tag = 1 - Left = 90 - Top = 157 - Width = 200 - Height = 17 - Caption = '&Horizontal Lines' - TabOrder = 5 - OnClick = chbxOptionsViewClick - end - object chbxVerticalLines: TCheckBox - Tag = 2 - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = '&Vertical Lines' - TabOrder = 6 - OnClick = chbxOptionsViewClick - end - object chbxBorders: TCheckBox - Tag = 3 - Left = 90 - Top = 205 - Width = 200 - Height = 17 - Caption = '&Borders' - TabOrder = 7 - OnClick = chbxOptionsViewClick - end - object chbxDataFields: TCheckBox - Left = 90 - Top = 53 - Width = 200 - Height = 17 - Caption = '&Data Fields' - TabOrder = 1 - OnClick = chbxOptionsViewClick - end - object chbxFilterFields: TCheckBox - Left = 90 - Top = 77 - Width = 200 - Height = 17 - Caption = '&Filter Fields' - TabOrder = 2 - OnClick = chbxOptionsViewClick - end - object chbxRowFields: TCheckBox - Left = 90 - Top = 101 - Width = 200 - Height = 17 - Caption = '&Row Fields' - TabOrder = 3 - OnClick = chbxOptionsViewClick - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblExpanding: TLabel - Left = 5 - Top = 8 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object bvlExpanding: TBevel - Left = 62 - Top = 13 - Width = 234 - Height = 4 - Shape = bsBottomLine - end - object imgExpanding: TImage - Left = 9 - Top = 31 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object chbxExpandRows: TCheckBox - Tag = 1 - Left = 90 - Top = 53 - Width = 200 - Height = 17 - Caption = 'Rows' - TabOrder = 1 - OnClick = chbxExpandOptionsClick - end - object chbxExpandColumns: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = 'Columns' - TabOrder = 0 - OnClick = chbxExpandOptionsClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 211 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D0887777787787FFFFFFFFFFF07DDDDDDDDDDD0F87777787787FFFFFFFFF - FF07D0888888888887F000FF0000F07DDDDDDDDDDD0F88888888887F000FF000 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000080087F00000000FF07DDDDDDDDDDD0F80000080087F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000000F07DCCCCDCCDDD0F80000000887F00000000 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000F00F07DDDDDDDDDDD0F80000000887F000000F0 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000008887F00000FF00F07DCCCCDCCDDD0F80000008887F00000FF0 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F00000000FF07DDDDDDDDDDD0F80000000887F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF7FFFFFFF07DDCCCCDCCDDD0888888888887FF777777F - F07DD0888888888887FF70888FFF07DDCCCCCCCCDD0888888888887FF7FFFF7F - F07DD0880000000887FF70FF8FFF07DDCCCCDCCDDD0880000000887FF7F00F7F - F07DD0888888888887FF70FF8FFF07DDCDDDDCDDDD0888888888887FF7F00F7F - F07DD0880008888887FF70000FFF07DDDDDDDDDDDD0880008888887FF7FFFF7F - F07DD0888888888887FF777777FF07DDDDDDDDDDDD0888888888887FF777777F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCCCCCCCCDD0888888888887FFFFFFFFF - F07DD0880000000887FCCCCCCCFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0880000000887F9999999FF07DDDDDDDDDDDD0880000000887F88888FFF - F07DD0888888888887FF99999FFF07DDDDDDDDDDDD0888888888887F888888FF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF888FFFFF07DDDDDDDDDDDD0888888888887FF888FFFF - F07DD0880000888887FFFFFFFFFF07DDDDDDDDDDDD0880000888887FFFFFFFFF - F07DD0880000000087FF888888FF07DDDDDDDDDDDD0880000000087FF888888F - F07DD0888888888887FF888888FF07DDDDDDDDDDDD0888888888887FF888888F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 82 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 37 - Width = 202 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnChange = cbxLookAndFeelChange - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 97 - Width = 200 - Height = 17 - Caption = 'Suppress Background Textures' - TabOrder = 1 - OnClick = OptionsFormattingChanged - end - object chbxSuppressContentColoration: TCheckBox - Tag = 2 - Left = 90 - Top = 121 - Width = 200 - Height = 17 - Caption = 'Suppress Content Coloration' - TabOrder = 2 - OnClick = OptionsFormattingChanged - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 4 - object bvlStyles: TBevel - Left = 115 - Top = 13 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 259 - Width = 224 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 255 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 214 - Height = 183 - end - object Label1: TLabel - Left = 77 - Top = 118 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 228 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = btnStyleColorClick - end - object btnStyleFont: TButton - Left = 228 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = btnStyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 228 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = btnStyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 15 - Height = 17 - TabStop = False - Caption = '&Use Native Styles' - TabOrder = 0 - OnClick = OptionsFormattingChanged - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 307 - Width = 68 - Height = 23 - Caption = '&New...' - TabOrder = 7 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 79 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Copy...' - TabOrder = 8 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 153 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Delete...' - TabOrder = 9 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 116 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = btnStylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 226 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Rename...' - TabOrder = 10 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 228 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Clear' - TabOrder = 4 - OnClick = btnStyleClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Restore Defaults' - TabOrder = 5 - OnClick = btnStyleRestoreDefaultsClick - end - object cbxStyleSheets: TComboBox - Left = 9 - Top = 274 - Width = 288 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 11 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - end - end - object pnlPreview: TPanel - Left = 309 - Top = 39 - Width = 382 - Height = 315 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewPivotGrid: TcxPivotGrid - Left = 5 - Top = 5 - Width = 371 - Height = 302 - Enabled = False - Groups = < - item - IsCaptionAssigned = True - Caption = 'FieldsGroup 1' - end> - TabOrder = 0 - TabStop = True - object pgfPurchaseQuarter: TcxPivotGridField - Area = faColumn - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Purchase Quarter' - DataBinding.ValueType = 'DateTime' - GroupIndex = 0 - GroupInterval = giDateQuarter - Visible = True - end - object pgfPurchaseMonth: TcxPivotGridField - Area = faColumn - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Purchase Month' - DataBinding.ValueType = 'DateTime' - GroupIndex = 0 - GroupExpanded = False - GroupInterval = giDateMonth - Visible = True - end - object pgfPaymentType: TcxPivotGridField - Tag = 1 - Area = faRow - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Payment Type' - DataBinding.ValueType = 'String' - Visible = True - Width = 90 - end - object pgfQuantity: TcxPivotGridField - Tag = 2 - Area = faData - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Quantity' - DataBinding.ValueType = 'Integer' - Visible = True - Width = 62 - end - object pgfCarName: TcxPivotGridField - Tag = 3 - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Car Name' - DataBinding.ValueType = 'String' - Visible = True - end - object pgfUnitPrice: TcxPivotGridField - Tag = 4 - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Unit Price' - DataBinding.ValueType = 'Currency' - Visible = True - end - object pgfCompanyName: TcxPivotGridField - Tag = 5 - Area = faRow - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Company Name' - DataBinding.ValueType = 'String' - Visible = True - Width = 90 - end - object pgfPaymentAmount: TcxPivotGridField - Tag = 6 - Area = faData - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Payment Amount' - DataBinding.ValueType = 'Currency' - Visible = True - end - end - end - object lblPreviewWindow: TStaticText - Left = 314 - Top = 24 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 2 - end - object cxStyleRepository1: TcxStyleRepository - Left = 4 - Top = 368 - object styleCategory: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWindowText - end - object styleHeader: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - object styleContent: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 32 - Top = 368 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - ShortCut = 16454 - OnClick = btnStyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - ShortCut = 16451 - OnClick = btnStyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - OnClick = btnStyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = btnStyleClearClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = btnStyleRestoreDefaultsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = btnStylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 60 - Top = 368 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnk.pas deleted file mode 100644 index 242ecdfb..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnk.pas +++ /dev/null @@ -1,2005 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxPivotGridLnk; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, SysUtils, {$IFDEF DELPHI6} Variants, {$ENDIF} Classes, Graphics, - Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, ImgList, Menus, cxStyles, - cxControls, dxPSUtl, cxLookAndFeels, cxLookAndFeelPainters, cxCustomPivotGrid, - cxDBPivotGrid, dxPSCore, dxPSGlbl, dxPScxCommon, cxGraphics, cxContainer, cxEdit, - cxTextEdit, cxMaskEdit, cxDropDownEdit, cxClasses, cxPivotGrid, cxCustomData; - -const - - // visual print style indexes - vspsPGridFirst = 0; - vspsPGridColumnHeader = vspsPGridFirst + 0; - vspsPGridContent = vspsPGridFirst + 1; - vspsPGridFieldHeader = vspsPGridFirst + 2; - vspsPGridHeaderBackground = vspsPGridFirst + 3; - vspsPGridRowHeader = vspsPGridFirst + 4; - vspsPGridLast = vspsPGridRowHeader; - - // - cxPivotGridAttributeIDBase = 0; - cxPivotGridDataCellID = cxPivotGridAttributeIDBase + 1; - cxPivotGridFieldHeaderCellID = cxPivotGridAttributeIDBase + 2; - cxPivotGridGroupHeaderCellID = cxPivotGridAttributeIDBase + 3; - -type - TcxPivotGridReportLink = class; - TcxfmPivotGridReportLinkDesignWindow = class; - - { TcxPivotGridReportLinkOptionsExpanding } - - TcxPivotGridReportLinkOptionsExpanding = class(TdxCustomReportLinkOptionsExpanding) - private - FAutoExpandColumns: Boolean; - FAutoExpandRows: Boolean; - procedure SetAutoExpandColumns(AValue: Boolean); - procedure SetAutoExpandRows(AValue: Boolean); - protected - procedure AssignToPivot(APivotGrid: TcxCustomPivotGrid); virtual; - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property AutoExpandColumns: Boolean read FAutoExpandColumns write SetAutoExpandColumns default False; - property AutoExpandRows: Boolean read FAutoExpandRows write SetAutoExpandRows default False; - end; - - { TcxPivotGridReportLinkOptionsView } - - TcxPivotGridReportLinkOptionsView = class(TdxCustomReportLinkOptionsView) - private - FBorders: Boolean; - FColumnFields: Boolean; - FDataFields: Boolean; - FExpandButtons: Boolean; - FFilterFields: Boolean; - FGridLines: TcxPivotGridLines; - FRowFields: Boolean; - procedure SetBorders(AValue: Boolean); - procedure SetColumnFields(AValue: Boolean); - procedure SetDataFields(AValue: Boolean); - procedure SetExpandButtons(AValue: Boolean); - procedure SetFilterFields(AValue: Boolean); - procedure SetGridLines(AValue: TcxPivotGridLines); - procedure SetRowFields(AValue: Boolean); - protected - procedure AssignToPivot(APivotGrid: TcxCustomPivotGrid); virtual; - procedure SetBoolValue(var AField: Boolean; ANewValue: Boolean); - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property Borders: Boolean read FBorders write SetBorders default True; - property ColumnFields: Boolean read FColumnFields write SetColumnFields default True; - property DataFields: Boolean read FDataFields write SetDataFields default True; - property ExpandButtons: Boolean read FExpandButtons write SetExpandButtons default True; - property FilterFields: Boolean read FFilterFields write SetFilterFields default False; - property GridLines: TcxPivotGridLines read FGridLines write SetGridLines default pglBoth; - property RowFields: Boolean read FRowFields write SetRowFields default True; - end; - - { TcxPivotGridReportLinkOptionsFormatting } - - TcxPivotGridReportLinkOptionsFormatting = class(TdxCustomReportLinkOptionsFormatting) - private - FSuppressContentColoration: Boolean; - procedure SetSuppressContentColoration(AValue: Boolean); - protected - procedure AssignToPivot(APivotGrid: TcxCustomPivotGrid); virtual; - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property SuppressContentColoration: Boolean read FSuppressContentColoration write SetSuppressContentColoration default False; - property UseLookAndFeelColors; - end; - - { TcxPivotGridReportLinkStyles } - - TcxPivotGridReportLinkStyles = class(TdxCustomReportLinkStyles, IcxPivotGridBaseStyles) - private - function GetReportLink: TcxPivotGridReportLink; - protected - procedure AssignToPivot(AFromGrid, ADestGrid: TcxCustomPivotGrid; AUsePivotStyles: Boolean); virtual; - function DesignerTabIndex: Integer; override; - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - class function GetStyleCaption(AnIndex: Integer): string; override; - function GetStyleIndexByCaption(const Caption: string): Integer; override; - function UsePivotStyles: Boolean; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - function GetColumnHeaderParams(AColumn: TcxPivotGridViewDataItem): TcxViewParams; - function GetContentParams(ACell: TcxPivotGridDataCellViewInfo): TcxViewParams; - function GetFieldHeaderParams(AField: TcxPivotGridField): TcxViewParams; - function GetHeaderBackgroundParams(AArea: TcxPivotGridFieldArea): TcxViewParams; - function GetRowHeaderParams(ARow: TcxPivotGridViewDataItem): TcxViewParams; - - property ReportLink: TcxPivotGridReportLink read GetReportLink; - published - property ColumnHeader: TcxStyle index vspsPGridColumnHeader read GetValue write SetValue; - property Content: TcxStyle index vspsPGridContent read GetValue write SetValue; - property FieldHeader: TcxStyle index vspsPGridFieldHeader read GetValue write SetValue; - property HeaderBackground: TcxStyle index vspsPGridHeaderBackground read GetValue write SetValue; - property RowHeader: TcxStyle index vspsPGridRowHeader read GetValue write SetValue; - property StyleSheet; - end; - - TcxPivotGridReportLinkStylesClass = class of TcxPivotGridReportLinkStyles; - - { TcxPivotGridReportLinkStyleSheet } - - TcxPivotGridReportLinkStyleSheet = class(TdxCustomReportLinkStyleSheet) - private - function GetStylesValue: TcxPivotGridReportLinkStyles; - procedure SetStylesValue(AValue: TcxPivotGridReportLinkStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TcxPivotGridReportLinkStyles read GetStylesValue write SetStylesValue; - end; - - { TcxPivotGridReportLink } - - TcxPivotGridReportLinkCustomDrawDataCellEventEvent = procedure(Sender: TcxPivotGridReportLink; - ACanvas: TCanvas; AnItem: TdxReportCellText; var ADone: Boolean) of object; - - TcxPivotGridReportLinkCustomDrawFieldHeaderCellEvent = procedure(Sender: TcxPivotGridReportLink; - ACanvas: TCanvas; AnItem: TdxReportCell; var ADone: Boolean) of object; - - TcxPivotGridReportLinkCustomDrawGroupHeaderCellEvent = procedure(Sender: TcxPivotGridReportLink; - ACanvas: TCanvas; AnItem: TdxReportCell; var ADone: Boolean) of object; - - TcxPivotGridReportLinkInitializeDataCellEvent = procedure(Sender: TcxPivotGridReportLink; - ACell: TcxPivotGridDataCellViewInfo; AnItem: TdxReportCellText) of object; - - TcxPivotGridReportLinkInitializeFieldHeaderCellEvent = procedure(Sender: TcxPivotGridReportLink; - ACell: TcxPivotGridFieldHeaderCellViewInfo; AnItem: TdxReportCell) of object; - - TcxPivotGridReportLinkInitializeGroupHeaderCellEvent = procedure(Sender: TcxPivotGridReportLink; - ACell: TcxPivotGridHeaderCellViewInfo; AnItem: TdxReportCell) of object; - - TcxPivotGridReportLink = class(TdxCustomcxControlReportLink) - private - FHostCell: TdxReportCell; - FLookAndFeelItems: TList; - FOnCustomDrawDataCell: TcxPivotGridReportLinkCustomDrawDataCellEventEvent; - FOnCustomDrawFieldHeaderCell: TcxPivotGridReportLinkCustomDrawFieldHeaderCellEvent; - FOnCustomDrawGroupHeaderCell: TcxPivotGridReportLinkCustomDrawGroupHeaderCellEvent; - FOnInitializeDataCell: TcxPivotGridReportLinkInitializeDataCellEvent; - FOnInitializeFieldHeaderCell: TcxPivotGridReportLinkInitializeFieldHeaderCellEvent; - FOnInitializeGroupHeaderCell: TcxPivotGridReportLinkInitializeGroupHeaderCellEvent; - function GetActiveStyles: TcxPivotGridReportLinkStyles; - function GetDesignWindow: TcxfmPivotGridReportLinkDesignWindow; - function GetGridLineColor: TColor; - function GetOptionsExpanding: TcxPivotGridReportLinkOptionsExpanding; - function GetOptionsFormatting: TcxPivotGridReportLinkOptionsFormatting; - function GetOptionsView: TcxPivotGridReportLinkOptionsView; - - function GetStyles: TcxPivotGridReportLinkStyles; - function GetPivotGrid: TcxCustomPivotGrid; - procedure SetOptionsExpanding(AValue: TcxPivotGridReportLinkOptionsExpanding); - procedure SetOptionsFormatting(AValue: TcxPivotGridReportLinkOptionsFormatting); - procedure SetOptionsView(AValue: TcxPivotGridReportLinkOptionsView); - procedure SetStyles(AValue: TcxPivotGridReportLinkStyles); - protected - procedure BuildReport; virtual; - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure ConvertCoords; override; - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - - procedure DoCustomDrawDataCell(ACanvas: TCanvas; AItem: TdxReportCellString; var ADone: Boolean); virtual; - procedure DoCustomDrawFieldHeaderCell(ACanvas: TCanvas; AItem: TdxReportCell; var ADone: Boolean); virtual; - procedure DoCustomDrawGroupHeaderCell(ACanvas: TCanvas; AItem: TdxReportCell; var ADone: Boolean); virtual; - procedure DoInitializeDataCell(AItem: TdxReportCellString; ACell: TcxPivotGridDataCellViewInfo); virtual; - procedure DoInitializeFieldHeaderCell(AItem: TdxReportCell; ACell: TcxPivotGridFieldHeaderCellViewInfo); virtual; - procedure DoInitializeGroupHeaderCell(AItem: TdxReportCell; ACell: TcxPivotGridHeaderCellViewInfo); virtual; - - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InternalRestoreFromOriginal; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - procedure FormatLookAndFeelItems; - function GetEdgeMode: TdxCellEdgeMode; - function GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; override; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; override; - function GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; override; - - function GetAreNativeStylesAvailable: Boolean; override; - function GetStylesClass: TdxCustomReportLinkStylesClass; override; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; override; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; override; - procedure PrepareConstruct; override; - procedure UnprepareConstruct; override; - // - procedure AddDataCell(ACell: TcxPivotGridDataCellViewInfo); - procedure AddFieldHeaderCell(ACell: TcxPivotGridFieldHeaderCellViewInfo); - procedure AddHeaderCell(ACell: TcxPivotGridHeaderCellViewInfo); - function CreateHeaderCell(ACell: TcxPivotGridHeaderCellViewInfo; AttributeID: Integer): TdxReportCell; - - procedure InitializeOptionsBeforeBuildReport(AController: TcxPivotGridExportController); virtual; - procedure ProcessCreateReportItems(AViewInfo: TcxPivotGridViewInfo); virtual; - procedure RegisterLookAndFeelItem(AItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); - procedure SetCellViewParams(ACell: TdxReportVisualItem; const AParams: TcxViewParams); - procedure SetCellViewParamsEx(ACell: TdxReportVisualItem; - const AParams: TdxReportItemViewParams); - - property ActiveStyles: TcxPivotGridReportLinkStyles read GetActiveStyles; - property GridLineColor: TColor read GetGridLineColor; - property HostCell: TdxReportCell read FHostCell; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - property DesignWindow: TcxfmPivotGridReportLinkDesignWindow read GetDesignWindow; - property LookAndFeelItems: TList read FLookAndFeelItems; - property PivotGrid: TcxCustomPivotGrid read GetPivotGrid; - published - property Color; - property Font; - property OptionsExpanding: TcxPivotGridReportLinkOptionsExpanding read GetOptionsExpanding write SetOptionsExpanding; - property OptionsFormatting: TcxPivotGridReportLinkOptionsFormatting read GetOptionsFormatting write SetOptionsFormatting; - property OptionsView: TcxPivotGridReportLinkOptionsView read GetOptionsView write SetOptionsView; - property ScaleFonts; - property StyleRepository; - property Styles: TcxPivotGridReportLinkStyles read GetStyles write SetStyles; - property SupportedCustomDraw; - property OnCustomDrawDataCell: TcxPivotGridReportLinkCustomDrawDataCellEventEvent read FOnCustomDrawDataCell write FOnCustomDrawDataCell; - property OnCustomDrawFieldHeaderCell: TcxPivotGridReportLinkCustomDrawFieldHeaderCellEvent read FOnCustomDrawFieldHeaderCell write FOnCustomDrawFieldHeaderCell; - property OnCustomDrawGroupHeaderCell: TcxPivotGridReportLinkCustomDrawGroupHeaderCellEvent read FOnCustomDrawGroupHeaderCell write FOnCustomDrawGroupHeaderCell; - property OnInitializeDataCell: TcxPivotGridReportLinkInitializeDataCellEvent read FOnInitializeDataCell write FOnInitializeDataCell; - property OnInitializeFieldHeaderCell: TcxPivotGridReportLinkInitializeFieldHeaderCellEvent read FOnInitializeFieldHeaderCell write FOnInitializeFieldHeaderCell; - property OnInitializeGroupHeaderCell: TcxPivotGridReportLinkInitializeGroupHeaderCellEvent read FOnInitializeGroupHeaderCell write FOnInitializeGroupHeaderCell; - end; - - TcxfmPivotGridReportLinkDesignWindow = class(TdxfmCustomcxControlReportLinkDesignWindow) - PageControl1: TPageControl; - tshView: TTabSheet; - lblShow: TLabel; - bvlShow: TBevel; - chbxColumnFields: TCheckBox; - chbxShowExpandButtons: TCheckBox; - chbxHorizontalLines: TCheckBox; - chbxVerticalLines: TCheckBox; - tshBehaviors: TTabSheet; - lblExpanding: TLabel; - bvlExpanding: TBevel; - chbxExpandRows: TCheckBox; - tshFormatting: TTabSheet; - lblLookAndFeel: TLabel; - bvlLookAndFeel: TBevel; - imgLookAndFeel: TImage; - imgRefinements: TImage; - lblRefinements: TLabel; - bvlRefinements: TBevel; - cbxLookAndFeel: TComboBox; - chbxSuppressBackgroundBitmaps: TCheckBox; - tshStyles: TTabSheet; - bvlStyles: TBevel; - bvlStyleSheets: TBevel; - lblStyleSheets: TLabel; - bvlStylesHost: TBevel; - Label1: TLabel; - btnStyleColor: TButton; - btnStyleFont: TButton; - btnStyleBackgroundBitmap: TButton; - chbxUseNativeStyles: TCheckBox; - btnStyleSheetNew: TButton; - btnStyleSheetCopy: TButton; - btnStyleSheetDelete: TButton; - btnStylesSaveAs: TButton; - btnStyleSheetRename: TButton; - btnStyleBackgroundBitmapClear: TButton; - btnStyleRestoreDefaults: TButton; - pnlPreview: TPanel; - cxStyleRepository1: TcxStyleRepository; - styleCategory: TcxStyle; - styleHeader: TcxStyle; - styleContent: TcxStyle; - pmStyles: TPopupMenu; - miStyleFont: TMenuItem; - miStyleColor: TMenuItem; - miLine3: TMenuItem; - miStyleBackgroundBitmap: TMenuItem; - miStyleBackgroundBitmapClear: TMenuItem; - milLine: TMenuItem; - miStylesSelectAll: TMenuItem; - miLine2: TMenuItem; - miStyleRestoreDefaults: TMenuItem; - miLine4: TMenuItem; - miStylesSaveAs: TMenuItem; - ilStylesPopup: TImageList; - chbxExpandColumns: TCheckBox; - chbxSuppressContentColoration: TCheckBox; - lblUseNativeStyles: TLabel; - cbxStyleSheets: TComboBox; - chbxBorders: TCheckBox; - chbxDataFields: TCheckBox; - chbxFilterFields: TCheckBox; - chbxRowFields: TCheckBox; - Bevel1: TBevel; - imgExpanding: TImage; - Image1: TImage; - imgCardFraming: TImage; - lblCardFraming: TLabel; - PreviewPivotGrid: TcxPivotGrid; - pgfPurchaseQuarter: TcxPivotGridField; - pgfPurchaseMonth: TcxPivotGridField; - pgfPaymentType: TcxPivotGridField; - pgfQuantity: TcxPivotGridField; - pgfCarName: TcxPivotGridField; - pgfUnitPrice: TcxPivotGridField; - pgfCompanyName: TcxPivotGridField; - pgfPaymentAmount: TcxPivotGridField; - lblPreviewWindow: TStaticText; - procedure OptionsFormattingChanged(Sender: TObject); - procedure btnStyleFontClick(Sender: TObject); - procedure btnStyleColorClick(Sender: TObject); - procedure btnStyleBackgroundBitmapClick(Sender: TObject); - procedure btnStyleClearClick(Sender: TObject); - procedure lblUseNativeStylesClick(Sender: TObject); - procedure pmStylesPopup(Sender: TObject); - procedure miStylesSelectAllClick(Sender: TObject); - procedure btnStyleRestoreDefaultsClick(Sender: TObject); - procedure btnStylesSaveAsClick(Sender: TObject); - procedure btnStyleSheetNewClick(Sender: TObject); - procedure btnStyleSheetCopyClick(Sender: TObject); - procedure btnStyleSheetDeleteClick(Sender: TObject); - procedure btnStyleSheetRenameClick(Sender: TObject); - procedure cbxStyleSheetsClick(Sender: TObject); - procedure cbxStyleSheetsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure cbxStyleSheetsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure cbxLookAndFeelChange(Sender: TObject); - procedure chbxExpandOptionsClick(Sender: TObject); - procedure chbxOptionsViewClick(Sender: TObject); - private - function GetActiveStyle: TcxStyle; - function GetHasSelectedStyles: Boolean; - function GetHasSelectedStylesWithAssignedBitmap: Boolean; - function GetReportLink: TcxPivotGridReportLink; - procedure lbxStylesClick(Sender: TObject); - protected - lbxStyles: TdxStylesListBox; - procedure CreateControls; virtual; - function CanSelectAllStyles: Boolean; - procedure DoInitialize; override; - // - procedure DoActiveStyleSheetChanged; override; - procedure DoFormActivated(AnActive: Boolean); override; - procedure DoRefreshStylesList; override; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); override; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); override; - - procedure GetSelectedStyleNames(AStrings: TStrings); override; - procedure GetStyleNames(out AStrings: TStrings); override; - procedure GetStyleSheetNames(out AStrings: TStrings); override; - procedure LoadCaption(AControl: TControl; StrPtr: Pointer); overload; - procedure LoadCaption(AItem: TMenuItem; StrPtr: Pointer); overload; - procedure LoadPreviewData; - procedure LoadStrings; override; - procedure LoadStringsCombo(ACombo: TComboBox; ACaptions: array of Pointer); - - procedure RecreateStylesListBox; - procedure RestoreSelectedStyles(AList: TList); - procedure SaveSelectedStyles(AList: TList); - // - procedure UpdateControlsState; override; - procedure UpdateEnabled(AControl: TControl; AEnabled: Boolean); overload; - procedure UpdateEnabled(AItem: TMenuItem; AEnabled: Boolean); overload; - procedure UpdateEnabledControls(AControls: array of TControl; AEnabled: Boolean); - procedure UpdatePreview; override; - - property ActiveStyle: TcxStyle read GetActiveStyle; - property HasSelectedStyles: Boolean read GetHasSelectedStyles; - property HasSelectedStylesWithAssignedBitmap: Boolean read GetHasSelectedStylesWithAssignedBitmap; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - property ReportLink: TcxPivotGridReportLink read GetReportLink; - end; - -implementation - -uses Math, dxPSRes, dxPSPopupMan; - -{$R *.dfm} -{$R dxPScxPivotGridLnk.res} - -type - TControlAccess = class(TControl); - TcxPivotGridAccess = class(TcxCustomPivotGrid); - TcxPivotGridViewDataAccess = class(TcxPivotGridViewData); - TcxPivotGridStylesAccess = class(TcxPivotGridStyles); - -var - FDefaultdxPScxPivotGridLinkStyleSheet: TcxPivotGridReportLinkStyleSheet; - -// -function DefaultdxPScxPivotGridLinkStyleSheet: TcxPivotGridReportLinkStyleSheet; - - function CreateStyle(AColor: TColor; AFontColor: TColor): TcxStyle; - begin - Result := TcxStyle.Create(DefaultdxPScxPivotGridLinkStyleSheet); - with Result do - begin - Color := AColor; - Font.Name := dxPSCore.dxPSDefaultFontName; - Font.Color := AFontColor; - end; - end; - -begin - if FDefaultdxPScxPivotGridLinkStyleSheet = nil then - begin - FDefaultdxPScxPivotGridLinkStyleSheet := TcxPivotGridReportLinkStyleSheet.Create(nil); - with FDefaultdxPScxPivotGridLinkStyleSheet.Styles as TcxPivotGridReportLinkStyles do - begin - ColumnHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - FieldHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - RowHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Content := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - HeaderBackground := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - end; - end; - Result := FDefaultdxPScxPivotGridLinkStyleSheet; -end; - -{ TcxPivotGridReportLinkOptionsExpanding } - -procedure TcxPivotGridReportLinkOptionsExpanding.AssignToPivot( - APivotGrid: TcxCustomPivotGrid); -begin - TcxPivotGridViewDataAccess(APivotGrid.ViewData). - ExpandColumns := AutoExpandColumns; - TcxPivotGridViewDataAccess(APivotGrid.ViewData). - ExpandRows := AutoExpandRows; -end; - -function TcxPivotGridReportLinkOptionsExpanding.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -procedure TcxPivotGridReportLinkOptionsExpanding.Assign(Source: TPersistent); -begin - if Source is TcxPivotGridReportLinkOptionsExpanding then - with TcxPivotGridReportLinkOptionsExpanding(Source) do - begin - Self.FAutoExpandColumns := FAutoExpandColumns; - Self.FAutoExpandRows := FAutoExpandRows; - end; - inherited Assign(Source); -end; - -procedure TcxPivotGridReportLinkOptionsExpanding.RestoreDefaults; -begin - inherited RestoreDefaults; - FAutoExpandColumns := False; - FAutoExpandRows := False; -end; - -procedure TcxPivotGridReportLinkOptionsExpanding.SetAutoExpandColumns( - AValue: Boolean); -begin - if FAutoExpandColumns <> AValue then - begin - FAutoExpandColumns := AValue; - Changed; - end; -end; - -procedure TcxPivotGridReportLinkOptionsExpanding.SetAutoExpandRows( - AValue: Boolean); -begin - if FAutoExpandRows <> AValue then - begin - FAutoExpandRows := AValue; - Changed; - end; -end; - -{ TcxPivotGridReportLinkOptionsView } - -procedure TcxPivotGridReportLinkOptionsView.Assign(Source: TPersistent); -begin - if Source is TcxPivotGridReportLinkOptionsView then - with TcxPivotGridReportLinkOptionsView(Source) do - begin - Self.FColumnFields := FColumnFields; - Self.FDataFields := FDataFields; - self.FBorders := FBorders; - Self.FExpandButtons := FExpandButtons; - Self.FFilterFields := FFilterFields; - Self.FGridLines := FGridLines; - Self.FRowFields := FRowFields; - end; - inherited Assign(Source); -end; - -procedure TcxPivotGridReportLinkOptionsView.RestoreDefaults; -begin - FColumnFields := True; - FDataFields := True; - FBorders := True; - FExpandButtons := True; - FFilterFields := False; - FGridLines := pglBoth; - FRowFields := True; -end; - -procedure TcxPivotGridReportLinkOptionsView.AssignToPivot( - APivotGrid: TcxCustomPivotGrid); -begin - APivotGrid.OptionsView.ColumnFields := ColumnFields; - APivotGrid.OptionsView.DataFields := DataFields; - APivotGrid.OptionsView.FilterFields := FilterFields; - APivotGrid.OptionsView.RowFields := RowFields; - APivotGrid.OptionsView.GridLines := GridLines; - TcxPivotGridAccess(APivotGrid).ViewInfo.DrawBorders := Borders; - TcxPivotGridAccess(APivotGrid).ViewInfo.DrawExpandButtons := ExpandButtons; -end; - -procedure TcxPivotGridReportLinkOptionsView.SetBoolValue( - var AField: Boolean; ANewValue: Boolean); -begin - if AField <> ANewValue then - begin - AField := ANewValue; - Changed; - end; -end; - -function TcxPivotGridReportLinkOptionsView.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -procedure TcxPivotGridReportLinkOptionsView.SetBorders(AValue: Boolean); -begin - if FBorders <> AValue then - begin - FBorders := AValue; - Changed; - end; -end; - -procedure TcxPivotGridReportLinkOptionsView.SetColumnFields(AValue: Boolean); -begin - SetBoolValue(FColumnFields, AValue); -end; - -procedure TcxPivotGridReportLinkOptionsView.SetDataFields(AValue: Boolean); -begin - SetBoolValue(FDataFields, AValue); -end; - -procedure TcxPivotGridReportLinkOptionsView.SetExpandButtons(AValue: Boolean); -begin - SetBoolValue(FExpandButtons, AValue); -end; - -procedure TcxPivotGridReportLinkOptionsView.SetFilterFields(AValue: Boolean); -begin - SetBoolValue(FFilterFields, AValue); -end; - -procedure TcxPivotGridReportLinkOptionsView.SetGridLines( - AValue: TcxPivotGridLines); -begin - if FGridLines <> AValue then - begin - FGridLines := AValue; - Changed; - end; -end; - -procedure TcxPivotGridReportLinkOptionsView.SetRowFields(AValue: Boolean); -begin - SetBoolValue(FRowFields, AValue); -end; - -{ TcxPivotGridReportLinkStyles } - -constructor TcxPivotGridReportLinkStyles.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - BitmapInViewParams := True; -end; - -procedure TcxPivotGridReportLinkStyles.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxPivotGridReportLinkStyles then - with TcxPivotGridReportLinkStyles(Source) do - begin - Self.ColumnHeader := ColumnHeader; - Self.Content := Content; - Self.FieldHeader := FieldHeader; - Self.HeaderBackground := HeaderBackground; - Self.RowHeader := RowHeader; - end; -end; - -function TcxPivotGridReportLinkStyles.GetColumnHeaderParams( - AColumn: TcxPivotGridViewDataItem): TcxViewParams; -begin - if UsePivotStyles then - else - GetViewParams(vspsPGridColumnHeader, AColumn, nil, Result); -end; - -function TcxPivotGridReportLinkStyles.GetContentParams( - ACell: TcxPivotGridDataCellViewInfo): TcxViewParams; -begin - GetViewParams(vspsPGridContent, ACell, nil, Result); -end; - -function TcxPivotGridReportLinkStyles.GetFieldHeaderParams( - AField: TcxPivotGridField): TcxViewParams; -begin - GetViewParams(vspsPGridFieldHeader, AField, nil, Result); -end; - -function TcxPivotGridReportLinkStyles.GetHeaderBackgroundParams( - AArea: TcxPivotGridFieldArea): TcxViewParams; -begin - GetViewParams(vspsPGridHeaderBackground, nil, nil, Result); -end; - -function TcxPivotGridReportLinkStyles.GetRowHeaderParams( - ARow: TcxPivotGridViewDataItem): TcxViewParams; -begin - GetViewParams(vspsPGridRowHeader, ARow, nil, Result); -end; - -procedure TcxPivotGridReportLinkStyles.AssignToPivot( - AFromGrid, ADestGrid: TcxCustomPivotGrid; AUsePivotStyles: Boolean); -begin - if AUsePivotStyles then - ADestGrid.Styles.Assign(AFromGrid.Styles) - else - begin - ADestGrid.Styles.ColumnHeader := ColumnHeader; - ADestGrid.Styles.Content := Content; - ADestGrid.Styles.FieldHeader := FieldHeader; - ADestGrid.Styles.HeaderBackground := HeaderBackground; - ADestGrid.Styles.RowHeader := RowHeader; - end; -end; - -function TcxPivotGridReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 3; -end; - -procedure TcxPivotGridReportLinkStyles.GetDefaultViewParams( - Index: Integer; AData: TObject; out AParams: TcxViewParams); -begin - inherited GetDefaultViewParams(Index, AData, AParams); - if ReportLink <> nil then - begin - if Index in [vspsPGridColumnHeader, vspsPGridFieldHeader, vspsPGridRowHeader] then - AParams.Color := dxPSCore.dxDefaultFixedColor - else - AParams.Color := dxDefaultContentColor; - AParams.Font := ReportLink.Font; - AParams.TextColor := AParams.Font.Color; - end; -end; - -class function TcxPivotGridReportLinkStyles.GetStyleCaption( - AnIndex: Integer): string; -begin - case AnIndex of - vspsPGridColumnHeader: - Result := cxGetResourceString(@sdxPivotGridColumnHeader); - vspsPGridContent: - Result := cxGetResourceString(@sdxPivotGridContent); - vspsPGridFieldHeader: - Result := cxGetResourceString(@sdxPivotGridFieldHeader); - vspsPGridHeaderBackground: - Result := cxGetResourceString(@sdxPivotGridHeaderBackground); - else - Result := cxGetResourceString(@sdxPivotGridRowHeader); - end; -end; - -function TcxPivotGridReportLinkStyles.GetStyleIndexByCaption( - const Caption: string): Integer; -begin - for Result := vspsPGridFirst to vspsPGridLast do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Result)) then - Exit; - Result := -1; -end; - -function TcxPivotGridReportLinkStyles.UsePivotStyles: Boolean; -begin - if ReportLink = nil then - begin - Result := False; - Exit; - end; - Result := not ReportLink.OptionsFormatting.UseNativeStyles; - if not Result then - Result := (ReportLink = nil) or (ReportLink.PivotGrid = nil); -end; - -function TcxPivotGridReportLinkStyles.GetReportLink: TcxPivotGridReportLink; -begin - if Owner is TcxPivotGridReportLink then - Result := Owner as TcxPivotGridReportLink - else - Result := nil; -end; - -{ TcxPivotGridReportLinkOptionsFormatting } - -procedure TcxPivotGridReportLinkOptionsFormatting.Assign(Source: TPersistent); -begin - if Source is TcxPivotGridReportLinkOptionsFormatting then - SuppressContentColoration := TcxPivotGridReportLinkOptionsFormatting(Source).SuppressContentColoration; - inherited Assign(Source); -end; - -procedure TcxPivotGridReportLinkOptionsFormatting.RestoreDefaults; -begin - inherited RestoreDefaults; - SuppressContentColoration := False; -end; - -procedure TcxPivotGridReportLinkOptionsFormatting.AssignToPivot( - APivotGrid: TcxCustomPivotGrid); -begin - APivotGrid.LookAndFeel.Kind := LookAndFeelKind; - APivotGrid.LookAndFeel.NativeStyle := False; - with TcxPivotGridStylesAccess(APivotGrid.Styles) do - begin - SuppressContentColoration := Self.SuppressContentColoration; - SuppressBackgroundBitmaps := Self.SuppressBackgroundBitmaps; - end; -end; - -function TcxPivotGridReportLinkOptionsFormatting.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -procedure TcxPivotGridReportLinkOptionsFormatting.SetSuppressContentColoration( - AValue: Boolean); -begin - if FSuppressContentColoration <> AValue then - begin - FSuppressContentColoration := AValue; - Changed; - end; -end; - -{ TcxPivotGridReportLinkStyleSheet } - -class function TcxPivotGridReportLinkStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxPivotGridReportLinkStyles; -end; - -function TcxPivotGridReportLinkStyleSheet.GetStylesValue: TcxPivotGridReportLinkStyles; -begin - Result := TcxPivotGridReportLinkStyles(GetStyles); -end; - -procedure TcxPivotGridReportLinkStyleSheet.SetStylesValue( - AValue: TcxPivotGridReportLinkStyles); -begin - Styles.Assign(AValue); -end; - -{ TcxPivotGridReportLink } - -constructor TcxPivotGridReportLink.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FLookAndFeelItems := TList.Create; -end; - -destructor TcxPivotGridReportLink.Destroy; -begin - FreeAndNil(FLookAndFeelItems); - inherited Destroy; -end; - -procedure TcxPivotGridReportLink.BuildReport; -var - AController: TcxPivotGridExportController; -begin - LookAndFeelItems.Clear; - FHostCell := TdxReportCell.Create(ReportCells.Cells); - FHostCell.BoundsRect := MakeBounds(0, 0, PageWidth, PageHeight); - FHostCell.CellSides := []; - FHostCell.Transparent := True; - FHostCell.Visible := True; - AController := TcxPivotGridExportController.Create(PivotGrid); - try - AController.ViewInfo.DrawBorders := OptionsView.Borders; - AController.ViewInfo.DrawExpandButtons := OptionsView.ExpandButtons; - InitializeOptionsBeforeBuildReport(AController); - ProcessCreateReportItems(AController.CalculateViewInfo); - finally - AController.Free; - end; -end; - -procedure TcxPivotGridReportLink.ConstructReport(AReportCells: TdxReportCells); - - procedure CalculateSizes; - - procedure CalculateReportPartSizes(ACell: TdxReportCell); - var - ARight, ABottom, I: Integer; - begin - if ACell.CellCount > 0 then - begin - ARight := 0; - ABottom := 0; - for I := 0 to ACell.CellCount - 1 do - with ACell.Cells[I] do - begin - ARight := Max(ARight, Left + Width); - ABottom := Max(ABottom, Top + Height); - end; - ACell.BoundsRect := Rect(0, 0, ARight, ABottom); - end; - end; - - begin - with AReportCells do - begin - CalculateReportPartSizes(HostCell); - if AreFooterCellsAllocated then - CalculateReportPartSizes(FooterCells); - if AreHeaderCellsAllocated then - CalculateReportPartSizes(HeaderCells); - CalculateReportPartSizes(Cells); - end; - end; - -begin - if PivotGrid = nil then Exit; - inherited ConstructReport(AReportCells) ; - PrepareConstruct; - try - BuildReport; - if not AbortBuilding then CalculateSizes; - finally - UnprepareConstruct; - end; -end; - -procedure TcxPivotGridReportLink.ConvertCoords; -begin - inherited ConvertCoords; -end; - -procedure TcxPivotGridReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -begin - case AItem.Data of - cxPivotGridDataCellID: - if AItem.ClassType = TdxReportCellString then - DoCustomDrawDataCell(ACanvas, TdxReportCellString(AItem), ADone); - cxPivotGridFieldHeaderCellID: - DoCustomDrawFieldHeaderCell(ACanvas, AItem.Parent, ADone); - cxPivotGridGroupHeaderCellID: - DoCustomDrawGroupHeaderCell(ACanvas, AItem.Parent, ADone); - end; -end; - -procedure TcxPivotGridReportLink.DoCustomDrawDataCell(ACanvas: TCanvas; - AItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDataCell) then - FOnCustomDrawDataCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxPivotGridReportLink.DoCustomDrawFieldHeaderCell(ACanvas: TCanvas; - AItem: TdxReportCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFieldHeaderCell) then - FOnCustomDrawFieldHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxPivotGridReportLink.DoCustomDrawGroupHeaderCell(ACanvas: TCanvas; - AItem: TdxReportCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawGroupHeaderCell) then - FOnCustomDrawGroupHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxPivotGridReportLink.DoInitializeDataCell( - AItem: TdxReportCellString; ACell: TcxPivotGridDataCellViewInfo); -begin - if Assigned(FOnInitializeDataCell) then - FOnInitializeDataCell(Self, ACell, AItem); -end; - -procedure TcxPivotGridReportLink.DoInitializeFieldHeaderCell( - AItem: TdxReportCell; ACell: TcxPivotGridFieldHeaderCellViewInfo); -begin - if Assigned(FOnInitializeFieldHeaderCell) then - FOnInitializeFieldHeaderCell(Self, ACell, AItem); -end; - -procedure TcxPivotGridReportLink.DoInitializeGroupHeaderCell( - AItem: TdxReportCell; ACell: TcxPivotGridHeaderCellViewInfo); -begin - if Assigned(FOnInitializeGroupHeaderCell) then - FOnInitializeGroupHeaderCell(Self, ACell, AItem); -end; - -procedure TcxPivotGridReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited GetImageLists(AProc); - AProc(PivotGrid.FieldHeaderImages); - AProc(PivotGrid.GroupHeaderImages); -end; - -procedure TcxPivotGridReportLink.AddDataCell( - ACell: TcxPivotGridDataCellViewInfo); -var - APSCell: TdxReportCellString; -begin - APSCell := HostCell.AddDataItem(TdxReportCellString) as TdxReportCellString; - APSCell.BoundsRect := ACell.Bounds; - APSCell.TextAlignX := TextAlignXMap[ACell.Align]; - APSCell.Text := ACell.DisplayText; - APSCell.Color := ACell.Color; - SetCellViewParams(APSCell, ACell.ViewParams); - APSCell.Data := cxPivotGridDataCellID; - APSCell.CellSides := TdxCellSides(ACell.Borders); - DoInitializeDataCell(APSCell, ACell); -end; - -procedure TcxPivotGridReportLink.AddFieldHeaderCell( - ACell: TcxPivotGridFieldHeaderCellViewInfo); -begin - DoInitializeFieldHeaderCell(CreateHeaderCell( - ACell, cxPivotGridFieldHeaderCellID), ACell); -end; - -procedure TcxPivotGridReportLink.AddHeaderCell( - ACell: TcxPivotGridHeaderCellViewInfo); -var - AItem: TdxReportCell; -begin - AItem := CreateHeaderCell(ACell, cxPivotGridGroupHeaderCellID); - AddHorizontalDelimiter(AItem); - AddVerticalDelimiter(AItem); - DoInitializeGroupHeaderCell(AItem, ACell); -end; - -function TcxPivotGridReportLink.CreateHeaderCell( - ACell: TcxPivotGridHeaderCellViewInfo; AttributeID: Integer): TdxReportCell; -var - R: TRect; - APSCell: TdxReportCellImage; - AIndent: TdxReportCellString; - AButton: TdxReportCellExpandButton; -const - ImageLayout: array[TcxAlignmentVert, TAlignment] of TdxImageLayout = - ((ilImageTopLeft, ilImageTopRight, ilImageTopCenter), - (ilImageBottomLeft, ilImageBottomRight, ilImageBottomCenter), - (ilImageCenterLeft, ilImageCenterRight, ilImageCenterCenter)); - -begin - Result := HostCell.AddCell; - Result.BoundsRect := ACell.Bounds; - Result.CellSides := []; - APSCell := Result.AddDataItem(TdxReportCellImage) as TdxReportCellImage; - APSCell.TextAlignX := TextAlignXMap[ACell.AlignHorz]; - APSCell.TextAlignY := TextAlignYMap[ACell.AlignVert]; - APSCell.Text := ACell.DisplayText; - APSCell.Color := ACell.Color; - APSCell.BoundsRect := MakeRect(0, 0, Result.Width, Result.Height); - APSCell.ImageIndex := ACell.ImageIndex; - if APSCell.ImageIndex <> -1 then - APSCell.ImageList := ACell.Images; - APSCell.ImageLayout := ImageLayout[ACell.ImageAlignVert, ACell.ImageAlignHorz]; - APSCell.IsTextDrawnForCenteredImage := True; - APSCell.EndEllipsis := ACell.ShowEndEllipsis; - APSCell.Multiline := ACell.MultiLine; - APSCell.CellSides := csAll; - if ACell.HasButton and OptionsView.ExpandButtons and (ACell.Bounds.Right > ACell.ButtonRect.Right) then - begin - AButton := Result.AddDataItem(TdxReportCellExpandButton) as TdxReportCellExpandButton; - R := ACell.ButtonRect; - OffsetRect(R, -ACell.Bounds.Left, -ACell.Bounds.Top); - AButton.BoundsRect := R; - AButton.CellSides := []; - AIndent := Result.AddDataItem(TdxReportCellString) as TdxReportCellString; - AIndent.BoundsRect := MakeRect(0, 0, AButton.Left + AButton.Width + cxTextOffset, - Result.Height); - AIndent.CellSides := [csLeft, csTop, csBottom]; - APSCell.CellSides := APSCell.CellSides - [csLeft]; - AButton.ButtonExpanded := ACell.Expanded; - AButton.ShowButtonBorder := True; - AButton.ShowButton := True; - AButton.ButtonBorder3D := Effects3D; - AButton.ButtonBorder3DSoft := Soft3D; - APSCell.Left := AIndent.Left + AIndent.Width; - APSCell.Width := APSCell.Width - APSCell.Left; - SetCellViewParams(AButton, ACell.ViewParams); - SetCellViewParams(AIndent, ACell.ViewParams); - RegisterLookAndFeelItem(AIndent, cesRaised); - end; - APSCell.SortOrder := TdxCellSortOrder(ACell.SortOrder); - APSCell.Data := AttributeID; - SetCellViewParams(APSCell, ACell.ViewParams); - RegisterLookAndFeelItem(APSCell, cesRaised); -end; - -procedure TcxPivotGridReportLink.InitializeOptionsBeforeBuildReport( - AController: TcxPivotGridExportController); -begin - AController.ExpandColumns := OptionsExpanding.AutoExpandColumns; - AController.ExpandRows := OptionsExpanding.AutoExpandRows; - if OptionsFormatting.UseNativeStyles then - AController.ReplaceStyles(ActiveStyles); - with AController.OptionsView do - begin - ColumnFields := Self.OptionsView.ColumnFields; - DataFields := Self.OptionsView.DataFields; - FilterFields := Self.OptionsView.FilterFields; - GridLines := Self.OptionsView.GridLines; - RowFields := Self.OptionsView.RowFields; - end; -end; - -procedure TcxPivotGridReportLink.ProcessCreateReportItems( - AViewInfo: TcxPivotGridViewInfo); -var - I, AStart, ACount: Integer; -begin - with AViewInfo do - begin - AStart := 0; - ACount := RowHeaders.Count + ColumnHeaders.Count + - FieldHeaders.Count + DataCells.Count; - for I := 0 to RowHeaders.Count - 1 do - begin - AddHeaderCell(TcxPivotGridHeaderCellViewInfo(RowHeaders[I])); - DoProgress(100 * (AStart + I + 1) / ACount); - end; - Inc(AStart, RowHeaders.Count); - for I := 0 to ColumnHeaders.Count - 1 do - begin - AddHeaderCell(TcxPivotGridHeaderCellViewInfo(ColumnHeaders[I])); - DoProgress(100 * (AStart + I + 1) / ACount); - end; - Inc(AStart, ColumnHeaders.Count); - for I := 0 to FieldHeaders.Count - 1 do - begin - AddFieldHeaderCell(TcxPivotGridFieldHeaderCellViewInfo(FieldHeaders[I])); - DoProgress(100 * (AStart + I + 1) / ACount); - end; - Inc(AStart, FieldHeaders.Count); - for I := 0 to DataCells.Count - 1 do - begin - AddDataCell(TcxPivotGridDataCellViewInfo(DataCells[I])); - DoProgress(100 * (AStart + I + 1) / ACount); - end; - end; -end; - -procedure TcxPivotGridReportLink.RegisterLookAndFeelItem( - AItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); -begin - AItem.EdgeMode := GetEdgeMode; - AItem.Edge3DStyle := AEdgeStyle; - FLookAndFeelItems.Add(AItem); -end; - -procedure TcxPivotGridReportLink.SetCellViewParams( - ACell: TdxReportVisualItem; const AParams: TcxViewParams); -var - AdxPSViewParams: TdxReportItemViewParams; -begin - if not Assigned(ACell) then Exit; - FillChar(AdxPSViewParams, SizeOf(AdxPSViewParams), 0); - AdxPSViewParams.NativeParams := AParams; - SetCellViewParamsEx(ACell, AdxPSViewParams); -end; - -procedure TcxPivotGridReportLink.SetCellViewParamsEx( - ACell: TdxReportVisualItem; const AParams: TdxReportItemViewParams); -var - AFont: TFont; - AHasBitmap: Boolean; -begin - if not Assigned(ACell) then Exit; - AFont := TFont.Create; - try - AFont.Assign(AParams.NativeParams.Font); - if not dxPSUtl.dxIsTrueTypeFont(AFont) then - AFont.Name := Font.Name; - AFont.Color := ColorToRGB(AParams.NativeParams.TextColor); - if AParams.FontSize <> 0 then - AFont.Size := AParams.FontSize; - AFont.Style := AFont.Style + AParams.FontStyle; - ACell.FontIndex := AddFontToPool(AFont); - ACell.Transparent := OptionsFormatting.SuppressContentColoration or AParams.Transparent; - with AParams.NativeParams do - begin - AHasBitmap := not OptionsFormatting.SuppressBackgroundBitmaps and - (Bitmap <> nil) and not Bitmap.Empty; - if AHasBitmap then - ACell.BackgroundBitmapIndex := AddBackgroundBitmapToPool(Bitmap); - end; - ACell.Color := ColorToRGB(AParams.NativeParams.Color); - finally - AFont.Free; - end; -end; - -procedure TcxPivotGridReportLink.InternalRestoreFromOriginal; -begin - inherited InternalRestoreFromOriginal; - if PivotGrid <> nil then - begin - OptionsFormatting.LookAndFeelKind := PivotGrid.LookAndFeel.Kind; - // optionsview todo: - end; -end; - -function TcxPivotGridReportLink.IsSupportedCustomDraw( - Item: TAbstractdxReportCellData): Boolean; -begin - Result := (Item <> nil) and inherited IsSupportedCustomDraw(Item); -end; - -function TcxPivotGridReportLink.GetEdgeMode: TdxCellEdgeMode; -const - EdgeModeMap: array[Boolean] of TdxCellEdgeMode = (cemPattern, cem3DEffects); -begin - Result := EdgeModeMap[OptionsFormatting.LookAndFeelKind <> lfUltraFlat]; -end; - -function TcxPivotGridReportLink.GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; -begin - Result := TcxPivotGridReportLinkOptionsExpanding; -end; - -function TcxPivotGridReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TcxPivotGridReportLinkOptionsFormatting; -end; - -function TcxPivotGridReportLink.GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; -begin - Result := TcxPivotGridReportLinkOptionsView; -end; - -function TcxPivotGridReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := OptionsFormatting.UseNativeStyles; -end; - -function TcxPivotGridReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TcxPivotGridReportLinkStyles; -end; - -function TcxPivotGridReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TcxPivotGridReportLinkStyleSheet; -end; - -function TcxPivotGridReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := DefaultdxPScxPivotGridLinkStyleSheet; -end; - -procedure TcxPivotGridReportLink.PrepareConstruct; -begin - inherited; - ReportCells.LookAndFeel := nil; -end; - -procedure TcxPivotGridReportLink.UnprepareConstruct; -begin - ReportCells.BorderColor := GridLineColor; - FormatLookAndFeelItems; - inherited UnprepareConstruct; -end; - -procedure TcxPivotGridReportLink.FormatLookAndFeelItems; -const - Borders3D: array[TdxCellEdgeStyle, Boolean] of TdxPSCellBorderClass = - ((TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder), - (TdxPSCellSunkenBorder, TdxPSCellSunkenSoftBorder)); -var - I: Integer; -begin - for I := 0 to LookAndFeelItems.Count - 1 do - with TdxReportVisualItem(LookAndFeelItems[I]) do - if Effects3D then - BorderClass := Borders3D[Edge3DStyle, Soft3D] - else - BorderClass := TdxPSCellUltraFlatBorder; -end; - -function TcxPivotGridReportLink.GetActiveStyles: TcxPivotGridReportLinkStyles; -begin - Result := inherited ActiveStyles as TcxPivotGridReportLinkStyles; -end; - -function TcxPivotGridReportLink.GetDesignWindow: TcxfmPivotGridReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TcxfmPivotGridReportLinkDesignWindow; -end; - -function TcxPivotGridReportLink.GetGridLineColor: TColor; -begin - Result := OptionsFormatting.GridLineColor; - if (Result = clDefault) and (PivotGrid <> nil) then - Result := PivotGrid.LookAndFeelPainter.DefaultGridLineColor; -end; - -function TcxPivotGridReportLink.GetOptionsExpanding: TcxPivotGridReportLinkOptionsExpanding; -begin - Result := inherited OptionsExpanding as TcxPivotGridReportLinkOptionsExpanding; -end; - -function TcxPivotGridReportLink.GetOptionsFormatting: TcxPivotGridReportLinkOptionsFormatting; -begin - Result := inherited OptionsFormatting as TcxPivotGridReportLinkOptionsFormatting; -end; - -function TcxPivotGridReportLink.GetOptionsView: TcxPivotGridReportLinkOptionsView; -begin - Result := inherited OptionsView as TcxPivotGridReportLinkOptionsView; -end; - -function TcxPivotGridReportLink.GetStyles: TcxPivotGridReportLinkStyles; -begin - Result := inherited Styles as TcxPivotGridReportLinkStyles; -end; - -function TcxPivotGridReportLink.GetPivotGrid: TcxCustomPivotGrid; -begin - Result := TcxCustomPivotGrid(Component); -end; - -procedure TcxPivotGridReportLink.SetOptionsExpanding( - AValue: TcxPivotGridReportLinkOptionsExpanding); -begin - OptionsExpanding.Assign(AValue); -end; - -procedure TcxPivotGridReportLink.SetOptionsFormatting( - AValue: TcxPivotGridReportLinkOptionsFormatting); -begin - OptionsFormatting.Assign(AValue); -end; - -procedure TcxPivotGridReportLink.SetOptionsView( - AValue: TcxPivotGridReportLinkOptionsView); -begin - OptionsView.Assign(AValue) -end; - -procedure TcxPivotGridReportLink.SetStyles( - AValue: TcxPivotGridReportLinkStyles); -begin - Styles.Assign(AValue) -end; - -{ TcxfmPivotGridReportLinkDesignWindow } - -constructor TcxfmPivotGridReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhccxPivotGridReportLinkDesigner; - inherited Create(AOwner); - CreateControls; - LoadPreviewData; -end; - -destructor TcxfmPivotGridReportLinkDesignWindow.Destroy; -begin - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(lbxStyles); - inherited Destroy; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.CreateControls; - - procedure CreateStylesListBox; - begin - lbxStyles := TdxStylesListBox.Create(Self); - lbxStyles.Parent := tshStyles; - lbxStyles.BoundsRect := bvlStylesHost.BoundsRect; - lbxStyles.PopupMenu := pmStyles; - lbxStyles.TabOrder := chbxUseNativeStyles.TabOrder + 1; - lbxStyles.OnClick := lbxStylesClick; - bvlStylesHost.Visible := False; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(lbxStyles); - end; - -begin - CreateStylesListBox; -end; - -function TcxfmPivotGridReportLinkDesignWindow.CanSelectAllStyles: Boolean; -var - I: Integer; -begin - Result := AreNativeStylesAvailable; - if Result then - begin - for I := 0 to lbxStyles.Items.Count - 1 do - if not lbxStyles.Selected[I] then Exit; - Result := False; - end; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.DoInitialize; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited DoInitialize; - BeginUpdateControls; - // view - with ReportLink.OptionsView do - begin - chbxColumnFields.Checked := ColumnFields; - chbxDataFields.Checked := DataFields; - chbxFilterFields.Checked := FilterFields; - chbxRowFields.Checked := RowFields; - chbxBorders.Checked := Borders; - chbxShowExpandButtons.Checked := ExpandButtons; - chbxHorizontalLines.Checked := GridLines in [pglBoth, pglHorz]; - chbxVerticalLines.Checked := GridLines in [pglBoth, pglVert];; - end; - // behavior - chbxExpandColumns.Checked := ReportLink.OptionsExpanding.AutoExpandColumns; - chbxExpandRows.Checked := ReportLink.OptionsExpanding.AutoExpandRows; - // formatting - with ReportLink.OptionsFormatting do - begin - chbxSuppressBackgroundBitmaps.Checked := SuppressBackgroundBitmaps; - chbxSuppressContentColoration.Checked := SuppressContentColoration; - chbxUseNativeStyles.Checked := UseNativeStyles; - end; - EndUpdateControls; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.RecreateStylesListBox; -var - List: TList; -begin - List := TList.Create; - try - SaveSelectedStyles(List); - dxPSUtl.dxRecreateWnd(lbxStyles); - RestoreSelectedStyles(List); - finally - List.Free; - end; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.RestoreSelectedStyles( - AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - lbxStyles.Selected[Integer(AList[I])] := True; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.SaveSelectedStyles( - AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to lbxStyles.Items.Count - 1 do - if lbxStyles.Selected[I] then AList.Add(TObject(I)); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.UpdateControlsState; -begin - inherited UpdateControlsState; - - UpdateEnabled(lbxStyles, AreNativeStylesAvailable); - UpdateEnabled(btnStyleColor, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleFont, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleBackgroundBitmap, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleBackgroundBitmapClear, AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap); - UpdateEnabled(btnStyleRestoreDefaults, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStylesSaveAs, CanSaveStyles); - - UpdateEnabled(lblStyleSheets, AreNativeStylesAvailable); - UpdateEnabled(cbxStyleSheets, AreNativeStylesAvailable); - UpdateEnabled(btnStyleSheetNew, CanCreateStyleSheet); - UpdateEnabled(btnStyleSheetCopy, CanCopyStyleSheet); - UpdateEnabled(btnStyleSheetDelete, CanDeleteStyleSheet); - UpdateEnabled(btnStyleSheetRename, CanRenameStyleSheet); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.UpdateEnabled( - AControl: TControl; AEnabled: Boolean); -begin - TControlAccess(AControl).Enabled := AEnabled; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.UpdateEnabled( - AItem: TMenuItem; AEnabled: Boolean); -begin - AItem.Enabled := AEnabled; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.UpdateEnabledControls( - AControls: array of TControl; AEnabled: Boolean); -var - I: Integer; -begin - for I := 0 to High(AControls) do - UpdateEnabled(AControls[I], AEnabled); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.UpdatePreview; -begin - inherited UpdatePreview; - PreviewPivotGrid.BeginUpdate; - try - ReportLink.OptionsView.AssignToPivot(PreviewPivotGrid); - ReportLink.OptionsExpanding.AssignToPivot(PreviewPivotGrid); - ReportLink.ActiveStyles.AssignToPivot(ReportLink.PivotGrid, - PreviewPivotGrid, not ReportLink.OptionsFormatting.UseNativeStyles); - ReportLink.OptionsFormatting.AssignToPivot(PreviewPivotGrid); - PreviewPivotGrid.FullRefresh; - finally - PreviewPivotGrid.EndUpdate; - end; -end; - -// - -procedure TcxfmPivotGridReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited DoActiveStyleSheetChanged; - with cbxStyleSheets do - ItemIndex := Items.IndexOfObject(ActiveStyleSheet); - if not LockControlsUpdate then - begin - Modified := True; - UpdatePreview; - end; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin - inherited; - if not AnActive then lbxStyles.HideToolTips; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.DoRefreshStylesList; -var - Styles: TcxPivotGridReportLinkStyles; - List: TList; -begin - Styles := ReportLink.ActiveStyles; - with lbxStyles.Items do - begin - BeginUpdate; - try - List := TList.Create; - try - SaveSelectedStyles(List); - try - Clear; - AddObject(cxGetResourceString(@sdxPivotGridColumnHeader), Styles.ColumnHeader); - AddObject(cxGetResourceString(@sdxPivotGridContent), Styles.Content); - AddObject(cxGetResourceString(@sdxPivotGridFieldHeader), Styles.FieldHeader); - AddObject(cxGetResourceString(@sdxPivotGridHeaderBackground), Styles.HeaderBackground); - AddObject(cxGetResourceString(@sdxPivotGridRowHeader), Styles.RowHeader); - finally - RestoreSelectedStyles(List); - end; - finally - List.Free; - end; - finally - EndUpdate; - end; - end; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - inherited; - Modified := True; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin - if ARecreate then - RecreateStylesListBox - else - lbxStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - with lbxStyles do - for I := 0 to Items.Count - 1 do - if Selected[I] then - AStrings.AddObject(Items[I], Items.Objects[I]); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := lbxStyles.Items; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := cbxStyleSheets.Items; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.LoadCaption( - AControl: TControl; StrPtr: Pointer); -begin - TControlAccess(AControl).Caption := cxGetResourceString(StrPtr); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.LoadCaption( - AItem: TMenuItem; StrPtr: Pointer); -begin - AItem.Caption := cxGetResourceString(StrPtr); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.LoadPreviewData; -var - AStream: TStream; -begin - AStream := TResourceStream.Create(hInstance, 'PIVOTPREVIEWDATA', 'PIVOTDATA'); - try - AStream.Position := 0; - PreviewPivotGrid.DataController.LoadFromStream(AStream); - with PreviewPivotGrid.ViewData do - begin - Rows[0].Parent.GroupItem.Expanded := False; - Columns[0].Parent.Parent.GroupItem.Expanded := False; - end; - PreviewPivotGrid.FullRefresh; - finally - AStream.Free; - end; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.LoadStrings; - - procedure AdjustBevelSize(ABevel: TBevel; AControl: TControl); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := AControl.Left + AControl.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - inherited LoadStrings; - - LoadCaption(tshView, @sdxViewTab); - LoadCaption(tshBehaviors, @sdxBehaviorsTab); - LoadCaption(tshFormatting, @sdxFormatting); - LoadCaption(tshStyles, @sdxStyles); - LoadCaption(lblPreviewWindow, @sdxPreview); - LoadCaption(lblShow, @sdxShow); - LoadCaption(lblCardFraming, @sdxFraming); - - // pivot preview - pgfPurchaseQuarter.Caption := cxGetResourceString(@sdxPurchaseQuarter); - pgfPurchaseMonth.Caption := cxGetResourceString(@sdxPurchaseMonth); - pgfPaymentType.Caption := cxGetResourceString(@sdxPaymentType); - pgfQuantity.Caption := cxGetResourceString(@sdxQuantity); - pgfCarName.Caption := cxGetResourceString(@sdxCarName); - pgfUnitPrice.Caption := cxGetResourceString(@sdxUnitPrice); - pgfCompanyName.Caption := cxGetResourceString(@sdxCompanyName); - pgfPaymentAmount.Caption := cxGetResourceString(@sdxPaymentAmount); - // view - LoadCaption(chbxColumnFields, @sdxColumnFields); - LoadCaption(chbxDataFields, @sdxDataFields); - LoadCaption(chbxFilterFields, @sdxFiterFields); - LoadCaption(chbxRowFields, @sdxRowFields); - LoadCaption(chbxShowExpandButtons, @sdxExpandButtons); - LoadCaption(chbxHorizontalLines, @sdxHorzLines); - LoadCaption(chbxVerticalLines, @sdxVertLines); - LoadCaption(chbxBorders, @sdxBorderLines); - //Behaviors - LoadCaption(chbxExpandColumns, @sdxAutoColumnsExpand); - LoadCaption(chbxExpandRows, @sdxAutoRowsExpand); - // Formatting - LoadCaption(lblLookAndFeel, @sdxLookAndFeel); - AdjustBevelSize(bvlLookAndFeel, lblLookAndFeel); - LoadStringsCombo(cbxLookAndFeel, [@sdxLookAndFeelFlat, - @sdxLookAndFeelStandard, @sdxLookAndFeelUltraFlat]); - cbxLookAndFeel.ItemIndex := Integer(ReportLink.OptionsFormatting.LookAndFeelKind); - LoadCaption(chbxSuppressBackgroundBitmaps, @ sdxSuppressBackgroundBitmaps); - LoadCaption(chbxSuppressContentColoration, @ sdxSuppressContentColoration); - //styles - LoadCaption(lblUseNativeStyles, @sdxUseNativeStyles); - AdjustBevelSize(bvlStyles, lblUseNativeStyles); - LoadCaption(btnStyleColor, @sdxBtnColor); - LoadCaption(btnStyleFont, @sdxBtnFont); - LoadCaption(btnStyleBackgroundBitmap, @sdxBtnTexture); - LoadCaption(btnStyleBackgroundBitmapClear, @sdxBtnTextureClear); - LoadCaption(btnStyleRestoreDefaults, @sdxBtnRestoreDefaults); - LoadCaption(btnStylesSaveAs, @sdxBtnSaveAs); - LoadCaption(miStyleColor, @sdxBtnColor); - LoadCaption(miStyleFont, @sdxBtnFont); - LoadCaption(miStyleBackgroundBitmap, @sdxBtnTexture); - LoadCaption(miStyleBackgroundBitmapClear, @sdxBtnTextureClear); - LoadCaption(miStyleRestoreDefaults, @sdxBtnRestoreDefaults); - LoadCaption(miStylesSelectAll, @sdxSelectAll); - LoadCaption(miStylesSaveAs, @sdxBtnSaveAs); - LoadCaption(lblStyleSheets, @sdxStyleSheets); - AdjustBevelSize(bvlStyleSheets, lblStyleSheets); - LoadCaption(btnStyleSheetNew, @sdxBtnNew); - LoadCaption(btnStyleSheetCopy, @sdxBtnCopy); - LoadCaption(btnStyleSheetDelete, @sdxBtnDelete); - LoadCaption(btnStyleSheetRename, @sdxBtnRename); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.LoadStringsCombo( - ACombo: TComboBox; ACaptions: array of Pointer); -var - I: Integer; -begin - with ACombo.Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to High(ACaptions) do - if ACaptions[I] <> nil then Add(cxGetResourceString(ACaptions[I])); - finally - EndUpdate; - end; - end; -end; - -function TcxfmPivotGridReportLinkDesignWindow.GetActiveStyle: TcxStyle; -begin - with lbxStyles do - begin - if ItemIndex <> -1 then - Result := TcxStyle(Items.Objects[ItemIndex]) - else - Result := nil; - end; -end; - -function TcxfmPivotGridReportLinkDesignWindow.GetHasSelectedStyles: Boolean; -begin - Result := lbxStyles.SelCount <> 0; -end; - -function TcxfmPivotGridReportLinkDesignWindow.GetHasSelectedStylesWithAssignedBitmap: Boolean; -var - Strings: TStrings; - I: Integer; - cxStyle: TcxStyle; -begin - Result := True; - Strings := TStringList.Create; - try - GetSelectedStyleNames(Strings); - for I := 0 to Strings.Count - 1 do - begin - cxStyle := TcxStyle(Strings.Objects[I]); - if (cxStyle <> nil) and (cxStyle.Bitmap <> nil) and not cxStyle.Bitmap.Empty then - Exit; - end; - finally - Strings.Free; - end; - Result := False; -end; - -function TcxfmPivotGridReportLinkDesignWindow.GetReportLink: TcxPivotGridReportLink; -begin - Result := TcxPivotGridReportLink(inherited ReportLink); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.lbxStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - UpdateControlsState; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.OptionsFormattingChanged( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsFormatting do - begin - case TControl(Sender).Tag of - 0: - begin - UseNativeStyles := chbxUseNativeStyles.Checked; - RecreateStylesListBox; - end; - 1: - SuppressBackgroundBitmaps := chbxSuppressBackgroundBitmaps.Checked; - 2: - SuppressContentColoration := chbxSuppressContentColoration.Checked; - end; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleFontClick(Sender: TObject); -begin - PerformStylesChangeFont; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleColorClick(Sender: TObject); -begin - PerformStylesChangeColor; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleBackgroundBitmapClick(Sender: TObject); -begin - PerformStylesChangeBitmap; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleClearClick(Sender: TObject); -begin - PerformStylesClearBitmap; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleRestoreDefaultsClick( - Sender: TObject); -begin - PerformStylesRestoreDefaults; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStylesSaveAsClick( - Sender: TObject); -begin - PerformStylesSaveAsStyleSheet; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleSheetNewClick(Sender: TObject); -begin - PerformStyleSheetNew; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleSheetCopyClick(Sender: TObject); -begin - PerformStyleSheetCopy; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleSheetDeleteClick(Sender: TObject); -begin - PerformStyleSheetDelete; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.btnStyleSheetRenameClick(Sender: TObject); -begin - PerformStyleSheetRename; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.lblUseNativeStylesClick( - Sender: TObject); -begin - if chbxUseNativeStyles.CanFocus then - ActiveControl := chbxUseNativeStyles; - chbxUseNativeStyles.Checked := not chbxUseNativeStyles.Checked; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.pmStylesPopup( - Sender: TObject); -begin - lbxStyles.HideToolTips; - UpdateEnabled(miStyleColor, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleFont, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleBackgroundBitmap, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleBackgroundBitmapClear, AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap); - UpdateEnabled(miStyleRestoreDefaults, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStylesSelectAll, CanSelectAllStyles); - UpdateEnabled(miStylesSaveAs, CanSaveStyles); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.miStylesSelectAllClick( - Sender: TObject); -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - with lbxStyles do - begin - {$IFDEF DELPHI6} - SelectAll; - {$ELSE} - Items.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - Selected[I] := True; - finally - Items.EndUpdate; - end; - {$ENDIF} - end; - UpdateControlsState; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.cbxStyleSheetsClick( - Sender: TObject); -begin - with TComboBox(Sender) do - ActiveStyleSheet := TcxCustomStyleSheet(Items.Objects[ItemIndex]) -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.cbxStyleSheetsKeyDown( - Sender: TObject; var Key: Word; Shift: TShiftState); -begin - PerformStyleSheetKeyDown(Sender, Key, Shift); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.cbxStyleSheetsDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -begin - PerformStyleSheetDrawItem(TComboBox(Control).Canvas, Index, Rect, State, Control.Enabled); -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.cbxLookAndFeelChange( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsFormatting.LookAndFeelKind := - TcxLookAndFeelKind(cbxLookAndFeel.ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.chbxExpandOptionsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TCheckBox(Sender) do - begin - case Tag of - 0: - ReportLink.OptionsExpanding.AutoExpandColumns := Checked; - 1: - ReportLink.OptionsExpanding.AutoExpandRows := Checked; - end; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmPivotGridReportLinkDesignWindow.chbxOptionsViewClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsView do - begin - case TCheckBox(Sender).Tag of - 0: - begin - ColumnFields := chbxColumnFields.Checked; - DataFields := chbxDataFields.Checked; - FilterFields := chbxFilterFields.Checked; - RowFields := chbxRowFields.Checked; - end; - 1, 2: - begin - if chbxHorizontalLines.Checked and chbxVerticalLines.Checked then - GridLines := pglBoth - else - if chbxHorizontalLines.Checked then - GridLines := pglHorz - else - if chbxVerticalLines.Checked then - GridLines := pglVert - else - GridLines := pglNone; - end; - 3: - Borders := TCheckBox(Sender).Checked; - 4: - ExpandButtons := TCheckBox(Sender).Checked; - end; - end; - Modified := True; - UpdatePreview; -end; - -// common - -procedure RegisterAssistants; -begin - dxPSRegisterReportLink(TcxPivotGridReportLink, - TcxCustomPivotGrid, TcxfmPivotGridReportLinkDesignWindow); -end; - -procedure UnregisterAssistants; -begin - dxPSUnregisterReportLink(TcxPivotGridReportLink, - TcxCustomPivotGrid, TcxfmPivotGridReportLinkDesignWindow); -end; - -initialization - RegisterAssistants; - -finalization - UnregisterAssistants; - -end. -//1. --borders-- -//2. --gridlines-- -//3. --expandbuttons-- -//4. --sorting mark-- -//5. --Images-- -//6. styles in pivot (font height, etc) - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnk.res b/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnk.res deleted file mode 100644 index aab165c7..00000000 Binary files a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnk.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnkReg.pas deleted file mode 100644 index f7b1e526..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxPivotGridLnkReg.pas +++ /dev/null @@ -1,118 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxPivotGridLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Windows, Classes, Controls, dxPSRes, dxPSUtl, cxStyles, cxCustomPivotGrid, cxPivotGrid, - dxPScxPivotGridLnk, cxStyleSheetEditor, SysUtils, cxPivotGridStyleSheetsPreview; - -type - TcxPivotGridReportLinkStyleSheetEditorPreview = class(TcxPivotGridStyleSheetEditorPreview) - public - class function GetStyleSheetClass: TcxCustomStyleSheetClass; override; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); override; - - class procedure Register; - class procedure Unregister; - end; - -class function TcxPivotGridReportLinkStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := TcxPivotGridReportLinkStyleSheet; -end; - -procedure TcxPivotGridReportLinkStyleSheetEditorPreview.SetStyleSheet( - AStyleSheet: TcxCustomStyleSheet); -var - AStyles: TcxPivotGridReportLinkStyles; -begin - if AStyleSheet is TcxPivotGridReportLinkStyleSheet then - begin - AStyles := TcxPivotGridReportLinkStyleSheet(AStyleSheet).Styles; - with PivotGrid.Styles do - begin - ColumnHeader := AStyles.ColumnHeader; - Content := AStyles.Content; - FieldHeader := AStyles.FieldHeader; - FilterHeaderArea := AStyles.HeaderBackground; - RowHeader := AStyles.RowHeader; - end; - end - else - PivotGrid.Styles.ResetStyles; -end; - -class procedure TcxPivotGridReportLinkStyleSheetEditorPreview.Register; -begin - RegisterStyleSheetEditorPreview(Self); -end; - -class procedure TcxPivotGridReportLinkStyleSheetEditorPreview.Unregister; -begin - UnregisterStyleSheetEditorPreview(Self); -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TcxPivotGridReportLink, TcxPivotGridReportLinkStyleSheet]); - RegisterClasses([TcxPivotGridReportLink, - TcxPivotGridReportLinkStyles, TcxPivotGridReportLinkStyleSheet]); - RegisterStyleSheetClass(TcxPivotGridReportLinkStyleSheet); -end; - -initialization - TcxPivotGridReportLinkStyleSheetEditorPreview.Register; - -finalization - TcxPivotGridReportLinkStyleSheetEditorPreview.Unregister; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxSSLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxSSLnk.dfm deleted file mode 100644 index d21b8119..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxSSLnk.dfm +++ /dev/null @@ -1,506 +0,0 @@ -object fmdxSpreadSheetDesignWindow: TfmdxSpreadSheetDesignWindow - Left = 551 - Top = 286 - BorderStyle = bsDialog - Caption = 'SpreadSheet DesignWindow' - ClientHeight = 263 - ClientWidth = 557 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pgctrlMain: TPageControl - Left = 4 - Top = 6 - Width = 549 - Height = 221 - ActivePage = tshOptions - MultiLine = True - TabOrder = 1 - OnChange = pgctrlMainChange - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 193 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Bevel11: TBevel - Left = 40 - Top = 10 - Width = 194 - Height = 4 - Shape = bsBottomLine - end - object Bevel4: TBevel - Left = 79 - Top = 83 - Width = 156 - Height = 5 - Shape = bsBottomLine - end - object Image5: TImage - Left = 7 - Top = 102 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D7AAAAAA9AAAAA7AAAAA9AAAA07DCDDDDCDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7AAAAAA9AAAAA7AAAAA9AAAA07DCCCCDCCDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7A77AAA9A777A7A777A9A77A07DCCCCCCCCDD7F77FFF8F777F8F777F8F7 - 7F07D7AAAAAA9AAAAA7AAAAA9AAAA07DCCCCDCCDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D79999999777777777779999907DCDDDDCDDDD7888888888888888888888 - 8807D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7C77CCC9B77BB7B777B9C77C07DDDDDDDDDDD7F77FFF8F77FF8F777F8F7 - 7F07D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777779777777777779777707DDDDDDDDDDD7888888888888888888888 - 8807D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7C7777C9B77BB7B77BB9C7CC07DDDDDDDDDDD7F7777F8F77FF8F77FF8F7 - FF07D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777779777777777779777707DDDDDDDDDDD7888888888888888888888 - 8807D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7C777CC9B777B7B777B9C7CC07DDDDDDDDDDD7F777FF8F777F8F777F8F7 - FF07D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D79999999777777777779999907DDDDDDDDDDD7888888888888888888888 - 8807D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7C777CC9B777B7B77BB9C77C07DDDDDDDDDDD7F777FF8F777F8F77FF8F7 - 7F07D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777779777777777779777707DDDDDDDDDDD7888888888888888888888 - 8807D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7C777CC9B7B7B7B777B9C77C07DDDDDDDDDDD7F777FF8F7F7F8F777F8F7 - 7F07D7CCCCCC9BBBBB7BBBBB9CCCC07DCDDDDCDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DCCCCDCCDDD7777777777777777777777 - 7707D7F888887F88887F88887F88807DCCCCCCCCDD7888888788888788888788 - 8807D7F777787F77787F77787F77807DCCCCDCCDDD7877778787778787778787 - 7807D7FFFFFF7FFFFF7FFFFF7FFFF07DCDDDDCDDDD7888888788888788888788 - 8807D7777777777777777777777770DDDDDDDDDDDD7777777777777777777777 - 770DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgGrid: TImage - Left = 6 - Top = 31 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D7FFFFFF7FFFFF7FFFFF7FFFF07DCDDDDCDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7FFFFFF7FFFFF7FFFFF7FFFF07DCCCCDCCDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F7777F7F777F7F777F7F7FF07DCCCCCCCCDD7F7777F8F777F8F777F8F7 - FF07D7FFFFFF7FFFFF7FFFFF7FFFF07DCCCCDCCDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DCDDDDCDDDD7888888888888888888888 - 8807D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F77F7F7F77FF7F7F7F7F77F07DDDDDDDDDDD7F77F7F8F77FF8F7F7F8F7 - 7F07D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DDDDDDDDDDD7888888888888888888888 - 8807D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F7F7FF7F77FF7F777F7F77F07DDDDDDDDDDD7F7F7FF8F77FF8F777F8F7 - 7F07D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DDDDDDDDDDD7888888888888888888888 - 8807D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F77FFF7F7F7F7F777F7F77F07DDDDDDDDDDD7F77FFF8F7F7F8F777F8F7 - 7F07D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DDDDDDDDDDD7888888888888888888888 - 8807D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F7777F7F77FF7F77FF7F77F07DDDDDDDDDDD7F7777F8F77FF8F77FF8F7 - 7F07D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DDDDDDDDDDD7888888888888888888888 - 8807D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F7777F7F77FF7F77FF7F77F07DDDDDDDDDDD7F7778F8F77FF8F77FF8F7 - 7F07D7FFFFFF7FFFFF7FFFFF7FFFF07DCDDDDCDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DCCCCDCCDDD7888888888888888888888 - 8807D78888887888887888887888807DCCCCCCCCDD7FFFFFF8FFFFF8FFFFF8FF - FF07D78777787877787877787877807DCCCCDCCDDD7F7777F8F777F8F777F8F7 - 7F07D78888887888887888887888807DCDDDDCDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7777777777777777777777770DDDDDDDDDDDD7777777777777777777777 - 770DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblShow: TLabel - Left = 5 - Top = 6 - Width = 26 - Height = 13 - Caption = 'Show' - end - object lblMiscellaneous: TLabel - Left = 5 - Top = 78 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object chbxRowAutoHeight: TCheckBox - Left = 88 - Top = 105 - Width = 150 - Height = 17 - Caption = '&Row AutoHeight' - TabOrder = 2 - OnClick = chbxRowAutoHeightClick - end - object chbxShowRowAndColumnHeadings: TCheckBox - Left = 88 - Top = 27 - Width = 150 - Height = 17 - Caption = 'Row and column headings' - TabOrder = 0 - OnClick = chbxShowRowAndColumnHeadingsClick - end - object chbxShowGridlines: TCheckBox - Left = 88 - Top = 50 - Width = 150 - Height = 17 - Caption = 'Gridlines' - TabOrder = 1 - OnClick = chbxShowGridlinesClick - end - object chbxSuppressSourceFormats: TCheckBox - Left = 88 - Top = 128 - Width = 150 - Height = 17 - Caption = '&Suppress source formats' - TabOrder = 3 - OnClick = chbxSuppressSourceFormatsClick - end - object lblPreview: TStaticText - Left = 243 - Top = 3 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 4 - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 193 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 6 - Top = 144 - Width = 79 - Height = 13 - Caption = '&Grid lines color : ' - OnClick = lblColorClick - end - object bvlLineColorHolder: TBevel - Left = 91 - Top = 140 - Width = 134 - Height = 21 - Visible = False - end - object gbxFixedTransparent: TGroupBox - Left = 5 - Top = 74 - Width = 231 - Height = 54 - Caption = ' ' - TabOrder = 3 - object lblFixedColor: TLabel - Left = 6 - Top = 24 - Width = 62 - Height = 13 - Caption = 'F&ixed color : ' - OnClick = lblColorClick - end - object bvlFixedColorHolder: TBevel - Left = 86 - Top = 20 - Width = 134 - Height = 21 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 8 - Width = 231 - Height = 54 - Caption = ' ' - TabOrder = 1 - object lblColor: TLabel - Left = 6 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblColorClick - end - object bvlColorHolder: TBevel - Left = 86 - Top = 20 - Width = 134 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 6 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = chbxFixedTransparentClick - end - object chbxFixedTransparent: TCheckBox - Tag = 1 - Left = 18 - Top = 72 - Width = 15 - Height = 17 - TabOrder = 2 - OnClick = chbxFixedTransparentClick - end - object stTransparent: TStaticText - Left = 33 - Top = 7 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 4 - OnClick = stTransparentClick - end - object stFixedTransparent: TStaticText - Left = 33 - Top = 73 - Width = 98 - Height = 17 - Caption = ' Fixed Transparent ' - FocusControl = chbxFixedTransparent - TabOrder = 5 - OnClick = stFixedTransparentClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 193 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 23 - Caption = 'Fo&nt...' - TabOrder = 0 - OnClick = btnFixedFontClick - end - object edFont: TEdit - Left = 8 - Top = 38 - Width = 224 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnFixedFont: TButton - Tag = 1 - Left = 8 - Top = 70 - Width = 110 - Height = 23 - Caption = 'Fi&xed Font...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnFixedFontClick - end - object edFixedFont: TEdit - Left = 8 - Top = 99 - Width = 224 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 193 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Image3: TImage - Left = 7 - Top = 102 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel3: TBevel - Left = 56 - Top = 83 - Width = 178 - Height = 4 - Shape = bsBottomLine - end - object Image1: TImage - Left = 22 - Top = 31 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel10: TBevel - Left = 83 - Top = 10 - Width = 150 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 6 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object lblSelection: TLabel - Left = 5 - Top = 78 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object chbxOnlySelected: TCheckBox - Left = 88 - Top = 102 - Width = 150 - Height = 17 - Caption = 'Only &selected cells' - TabOrder = 1 - OnClick = chbxOnlySelectedClick - end - object chbxFixedRowsOnEveryPage: TCheckBox - Left = 88 - Top = 29 - Width = 150 - Height = 17 - Caption = 'Fi&xed Rows On Every Page' - TabOrder = 0 - OnClick = chbxFixedRowsOnEveryPageClick - end - end - end - end - object pnlPreview: TPanel - Left = 253 - Top = 50 - Width = 289 - Height = 165 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 0 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxSSLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxSSLnk.pas deleted file mode 100644 index 2fa9e542..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxSSLnk.pas +++ /dev/null @@ -1,3066 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxSSLnk; - -interface - -{$I cxVer.inc} - -{$IFDEF CBUILDER5} - (*$HPPEMIT '#define HRGN unsigned'*) -{$ELSE} - (*$HPPEMIT '#define HRGN int'*) -{$ENDIF} - -uses - Windows, Classes, Graphics, Controls, StdCtrls, ExtCtrls, ComCtrls, Dialogs, - cxSSTypes, cxSSData, cxSSStyles, cxSSheet, cxExcelConst, dxPSCore, dxPSForm, - dxPSGlbl, dxPSBaseGridLnk, dxPSExcelEdgePatterns, dxPSExcelFillPatterns, - dxPSEdgePatterns, dxPSFillPatterns, cxDrawTextUtils; - -type - PdxPSCellBorder = ^TdxPSCellBorder; - TdxPSCellBorder = record - Color: TColor; - Pattern: TdxPSEdgePatternClass; - end; - - PdxPSCellBorders = ^TdxPSCellBorders; - TdxPSCellBorders = array[TdxCellSide] of TdxPSCellBorder; - - TdxPSCellBorderCorner = (cbcTopLeft, cbcTopRight, cbcBottomRight, cbcBottomLeft); - TdxPSCellBorderCorners = set of TdxPSCellBorderCorner; - - TdxPSCellBorderEnd = (cbsTopLeft, cbsBottomRight); - TdxPSCellBorderEnds = set of TdxPSCellBorderEnd; - - TdxPSCellBorderSub = 0..3; - - TdxPSCellCorner = (ccTopLeft, ccTopRight, ccBottomRight, ccBottomLeft); - - TdxPSCellPatternsBorderPainter = class; - TdxPSGridCellsAdapter = class; - - TdxReportCellSSString = class(TdxReportCellString) - private - FBorders: TdxPSCellBorders; - FBorderSlants: DWORD; - FBorderSubs: DWORD; - FContentBkColor: TColor; - FContentPattern: TdxPSFillPatternClass; - FRealCol: Integer; - FRealRow: Integer; - FTextExtentLeft: Integer; - FTextExtentRight: Integer; - function GetBorder(ASide: TdxCellSide): TdxPSCellBorder; - function GetBordersBkColor: TColor; - function GetBorderSlant(ASide: TdxCellSide; ACorner: TdxPSCellBorderCorner): Integer; - function GetBorderSlantOffset(ASide: TdxCellSide; ACorner: TdxPSCellBorderCorner): TDWORDBits; - function GetBorderSub(ASide: TdxCellSide; AEnd: TdxPSCellBorderEnd): TdxPSCellBorderSub; - function GetBorderSubMask(ASide: TdxCellSide; AEnd: TdxPSCellBorderEnd): DWORD; - function GetBorderSubOffset(ASide: TdxCellSide; AEnd: TdxPSCellBorderEnd): TDWORDBits; - function GetClipContent: Boolean; - function GetCol: Integer; - function GetFill: Boolean; - function GetIsFixed: Boolean; - function GetIsMerged: Boolean; - function GetIsNearMostLeft: Boolean; - function GetIsNearMostTop: Boolean; - function GetIsNearMostTopOrLeft: Boolean; - function GetIsVirtual: Boolean; - function GetRow: Integer; - procedure SetBorder(ASide: TdxCellSide; Value: TdxPSCellBorder); - procedure SetBorderSlant(ASide: TdxCellSide; ACorner: TdxPSCellBorderCorner; Value: Integer); - procedure SetBorderSub(ASide: TdxCellSide; AEnd: TdxPSCellBorderEnd; Value: TdxPSCellBorderSub); - procedure SetClipConent(Value: Boolean); - procedure SetFill(Value: Boolean); - procedure SetIsFixed(Value: Boolean); - procedure SetIsMerged(Value: Boolean); - procedure SetIsNearMostLeft(Value: Boolean); - procedure SetIsNearMostTop(Value: Boolean); - procedure SetIsVirtual(Value: Boolean); - protected - procedure CalcBorderSubs(AnAdapter: TdxPSGridCellsAdapter); - procedure CalcDoubleBorderSlants(AnAdapter: TdxPSGridCellsAdapter); - - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - function GetBackgroundBounds(DC: HDC): TRect; override; - function GetBorderEdgeBounds(ASide: TdxCellSide; const AOuterRect: TRect): TRect; override; - function GetBorderBrush(ASide: TdxCellSide): HBRUSH; - function GetBorderEdgeClass(ASide: TdxCellSide): TdxPSCellBorderClass; override; - function GetEffectiveBounds(DC: HDC; AStage: TdxPSRenderStages): TRect; override; - function GetTextBounds(DC: HDC): TRect; override; - function IsDrawn(DC: HDC; AStage: TdxPSRenderStages; const ARect: TRect): Boolean; override; - - function GetBorderPainterClass: TdxPSCellBorderPainterClass; override; - procedure InitBorderPainter(ABordersPainter: TdxPSCellBorderPainter); override; - - function GetContentBkColor: TColor; override; - function GetContentPattern: TdxPSFillPatternClass; override; - procedure SetContentBkColor(Value: TColor); override; - procedure SetContentPattern(Value: TdxPSFillPatternClass); override; - - procedure ReadBorders(AReader: TdxPSDataReader); - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteBorders(AWriter: TdxPSDataWriter); - procedure WriteData(AWriter: TdxPSDataWriter); override; - - function GetAbsoluteInnerBounds(DC: HDC): TRect; - function GetDoubleBorderRgn(ASide: TdxCellSide; const R: TRect): HRGN; - function IsDoubleLineBorderPattern(ABorder: TdxPSCellBorder): Boolean; overload; - function IsDoubleLineBorderPattern(ASide: TdxCellSide): Boolean; overload; - function NullBorder: TdxPSCellBorder; - public - constructor Create(AParent: TdxReportCell); override; - procedure Assign(Source: TPersistent); override; - - procedure SetBorders(AColor: TColor; APattern: TdxPSEdgePatternClass); - - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - - property Borders[ASide: TdxCellSide]: TdxPSCellBorder read GetBorder write SetBorder; - property BordersBkColor: TColor read GetBordersBkColor; - property BorderSlants[ASide: TdxCellSide; ACorner: TdxPSCellBorderCorner]: Integer read GetBorderSlant write SetBorderSlant; - property BorderSubs[ASide: TdxCellSide; AEnd: TdxPSCellBorderEnd]: TdxPSCellBorderSub read GetBorderSub write SetBorderSub; - property ClipContent: Boolean read GetClipContent write SetClipConent; - property Col: Integer read GetCol; - property Fill: Boolean read GetFill write SetFill; - property IsFixed: Boolean read GetIsFixed write SetIsFixed; - property IsMerged: Boolean read GetIsMerged write SetIsMerged; - property IsNearMostLeft: Boolean read GetIsNearMostLeft write SetIsNearMostLeft; - property IsNearMostTop: Boolean read GetIsNearMostTop write SetIsNearMostTop; - property IsNearMostTopOrLeft: Boolean read GetIsNearMostTopOrLeft; - property IsVirtual: Boolean read GetIsVirtual write SetIsVirtual; - property RealCol: Integer read FRealCol write FRealCol; - property RealRow: Integer read FRealRow write FRealRow; - property Row: Integer read GetRow; - property TextExtentLeft: Integer read FTextExtentLeft write FTextExtentLeft; - property TextExtentRight: Integer read FTextExtentRight write FTextExtentRight; - end; - - TdxPSCellPatternsBorderPainter = class(TdxPSCellBorderPainter) - private - FGridAdapter: TdxPSGridCellsAdapter; - protected - function ClipItemBounds(DC: HDC; AOuterRect: TRect): HRGN; - procedure DrawBorder(DC: HDC; const R: TRect; AForeColor, ABkColor: TColor; ABrush: HBRUSH); overload; - procedure DrawBorder(DC: HDC; ABorderRgn: HRGN; AForeColor, ABkColor: TColor; ABrush: HBRUSH); overload; - public - function Item: TdxReportCellSSString; reintroduce; overload; - procedure Paint(DC: HDC); override; - - property GridAdapter: TdxPSGridCellsAdapter read FGridAdapter; - end; - - TdxPSGridCellsAdapter = class - private - FReportCells: TdxReportCells; - function GetCell(Col, Row: Integer): TdxReportCellSSString; - function GetColCount: Integer; - function GetColOffset(Index: Integer): Integer; - function GetColWidth(Index: Integer): Integer; - function GetRow(Index: Integer): TdxReportCell; - function GetRowCount: Integer; - function GetRowHeight(Index: Integer): Integer; - function GetRowIndex(Index: Integer): Integer; - function GetRowOffset(Index: Integer): Integer; - public - constructor Create(AReportCells: TdxReportCells); - function GetNeighborCell(AItem: TdxReportCellSSString; ASide: TdxCellSide): TdxReportCellSSString; - - property Cells[Col, Row: Integer]: TdxReportCellSSString read GetCell; default; - property ColCount: Integer read GetColCount; - property ColOffsets[Index: Integer]: Integer read GetColOffset; - property ColWidths[Index: Integer]: Integer read GetColWidth; - property RowCount: Integer read GetRowCount; - property RowHeights[Index: Integer]: Integer read GetRowHeight; - property RowIndexes[Index: Integer]: Integer read GetRowIndex; - property RowOffsets[Index: Integer]: Integer read GetRowOffset; - property Rows[Index: Integer]: TdxReportCell read GetRow; - end; - - TdxPSSSStringGridCellDataMap = class(TdxPSTextGridCellDataMap) - protected - class procedure InitializeCellData(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData; - AReportLink: TAbstractdxGridReportLink); override; - class function DataClass: TdxReportCellDataClass; override; - end; - - TdxPSSpreadSheetReportLinkOptionView = (ssovRowAndColumnHeadings, ssovGridLines, ssovSuppressSourceFormats); - TdxPSSpreadSheetReportLinkOptionsView = set of TdxPSSpreadSheetReportLinkOptionView; - - TCustomdxSpreadSheetReportLink = class(TAbstractdxGridReportLink) - private - FAppendingExtraColumns: Boolean; - FColCount: Integer; - FCellObjects: TList; - FExtraColumnCount: Integer; - FGridAdapter: TdxPSGridCellsAdapter; - FOptionsView: TdxPSSpreadSheetReportLinkOptionsView; - FPrintArea: TRect; - FProcessingMerges: Boolean; - FRowCount: Integer; - FTempFont: TFont; - function GetBookSheet: TcxSSBookSheet; - function GetCustomSpreadSheetBook: TcxCustomSpreadSheetBook; - function GetMeaningColCount: Integer; - function GetMeaningRowCount: Integer; - function GetMergedCells: TcxSSMergedCellsStorage; - procedure SetOptionsView(Value: TdxPSSpreadSheetReportLinkOptionsView); - procedure SetPrintArea(Value: TRect); - function GetSSCellObject(ACol, ARow: Integer): TcxSSCellObject; - function GetSSCellStyle(ACol, ARow: Integer): TcxSSCellStyle; - function GetSSColorPalette: PcxExcelPalette; - function GetSSDataStorage: TcxSSDataStorage; - function GetSSDefaultCellSideColor(ASide: TdxCellSide): TColor; - function GetSSDefaultStyle: TcxSSCellStyle; - function GetFlatIndex(ACol, ARow: Integer): Integer; - function GetRealColor(AColorIndex: Integer; ADefaultColor: TColor): TColor; - function IsSSDefaultStyle(AStyle: TcxSSCellStyle): Boolean; - protected - FSourceHeaderFontIndex: Integer; - - function CannotActivateReportErrorString: string; override; - procedure DoChangeComponent; override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - function IsScaleGridLines: Boolean; override; - function NeedTwoPassRendering: Boolean; override; - - function GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; override; - - function GetColCount: Integer; override; - function GetFixedColCount: Integer; override; - function GetFixedRowCount: Integer; override; - function GetRowCount: Integer; override; - - function GetCellSides(ACol, ARow: Integer): TdxCellSides; override; - function GetCellText(ACol, ARow: Integer): string; override; - function GetCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; override; - function GetMinRowHeight(DC: HDC; AFont: TFont): Integer; override; - function GetSelectionRect: TRect; override; - function GetSourceCellColor(ACol, ARow: Integer): TColor; override; - function GetSourceCellContentBkColor(ACol, ARow: Integer): TColor; override; - function GetSourceCellContentPattern(ACol, ARow: Integer): TdxPSFillPatternClass; override; - function GetSourceCellEdge3DSoft(ACol, ARow: Integer): Boolean; override; - function GetSourceCellEdgeMode(ACol, ARow: Integer): TdxCellEdgeMode; override; - function GetSourceCellFontIndex(ACol, ARow: Integer): Integer; override; - function GetSourceCellMultiline(ACol, ARow: Integer): Boolean; override; - function GetSourceCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; override; - function GetSourceCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; override; - function GetSourceCellTransparent(ACol, ARow: Integer): Boolean; override; - function GetSourceColWidth(ACol: Integer): Integer; override; - function GetSourceRowHeight(ARow: Integer): Integer; override; - function HasSelection: Boolean; override; - function IsDrawBorder: Boolean; override; - function IsDrawHorzLines: Boolean; override; - function IsDrawVertLines: Boolean; override; - function IsProcessedCol(ACol: Integer): Boolean; override; - function IsProcessedRow(ARow: Integer): Boolean; override; - - procedure AfterConstruct(AReportCells: TdxReportCells); override; - procedure PrepareConstruct(AReportCells: TdxReportCells); override; - procedure UnprepareConstruct(AReportCells: TdxReportCells); override; - - procedure AddMerges(AReportCells: TdxReportCells); - procedure AppendAdditionalColumns(AnAdapter: TdxPSGridCellsAdapter); - procedure CalcTextExtents(AnAdapter: TdxPSGridCellsAdapter); - procedure DeleteCellObjects; - procedure DeleteUnneededCellSides(AnAdapter: TdxPSGridCellsAdapter); - procedure FixupRowWidths(AnAdapter: TdxPSGridCellsAdapter); - function HasMerges: Boolean; - function IsEmptyCell(const ACell: TcxSSCellRec): Boolean; - function OnlyEdgeIsAssigned(const ACell: TcxSSCellRec; AEdge: TcxSSEdgeBorder): Boolean; - function OnlyLeftEdgeIsAssigned(ACell: TcxSSCellRec): Boolean; - function OnlyTopEdgeIsAssigned(ACell: TcxSSCellRec): Boolean; - procedure PostProcessItems(AnAdapter: TdxPSGridCellsAdapter); - procedure SetupCellBorders(ACol, ARow: Integer; ADataItem: TAbstractdxReportCellData); virtual; - - procedure CheckPrintAreaBounds(var R: TRect); - function GetColumnOffset(ACol: Integer): Integer; - function GetRowOffset(ARow: Integer): Integer; - function IsMergedBorder(ACol, ARow: Integer; ASide: TdxCellSide): Boolean; - function IsMergedCell(ACol, ARow: Integer): Boolean; virtual; - function IsNearMostLeftCell(ACol, ARow: Integer): Boolean; virtual; - function IsNearMostTopCell(ACol, ARow: Integer): Boolean; virtual; - function IsShowGridLines: Boolean; - function IsShowRowAndColumnHeadings: Boolean; - function IsSuppressSourceFormats: Boolean; - - property ColCount: Integer read GetColCount; - property ExtraColumnCount: Integer read FExtraColumnCount; - property MeaningColCount: Integer read GetMeaningColCount; - property MeaningRowCount: Integer read GetMeaningRowCount; - property MergedCells: TcxSSMergedCellsStorage read GetMergedCells; - property RowCount: Integer read GetRowCount; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure ClearPrintArea; - function DataProviderPresent: Boolean; override; - function DataToPrintExist: Boolean; virtual; - function PrintAreaExists: Boolean; virtual; - - property BookSheet: TcxSSBookSheet read GetBookSheet; - property CustomSpreadSheetBook: TcxCustomSpreadSheetBook read GetCustomSpreadSheetBook; - property PrintArea: TRect read FPrintArea write SetPrintArea; - published - property Color; - property Effects3D; - property FixedColor; - property FixedFont; - property FixedTransparent; - property Font; - property GridLineColor; - property HeadersOnEveryPage; - property OnlySelected; - property OptionsView: TdxPSSpreadSheetReportLinkOptionsView read FOptionsView write SetOptionsView - default [ssovRowAndColumnHeadings]; - property RowAutoHeight; - property ScaleFonts; - property Soft3D; - property Transparent; - property UseCustomPageBreaks; - property UseHorzDelimiters; - property UseVertDelimiters; - - property OnGetCustomPageBreaks; - property OnInitializeItem; - end; - - TdxSpreadSheetBookReportLink = class(TCustomdxSpreadSheetReportLink) - private - function GetSpreadSheetBook: TcxSpreadSheetBook; - public - property SpreadSheetBook: TcxSpreadSheetBook read GetSpreadSheetBook; - end; - - TdxSpreadSheetReportLink = class(TCustomdxSpreadSheetReportLink) - private - function GetSpreadSheet: TcxSpreadSheet; - public - property SpreadSheet: TcxSpreadSheet read GetSpreadSheet; - end; - - TfmdxSpreadSheetDesignWindow = class(TStandarddxReportLinkDesignWindow) - pnlPreview: TPanel; - pgctrlMain: TPageControl; - tshOptions: TTabSheet; - pnlOptions: TPanel; - lblShow: TLabel; - Bevel11: TBevel; - lblMiscellaneous: TLabel; - Bevel4: TBevel; - Image5: TImage; - imgGrid: TImage; - chbxRowAutoHeight: TCheckBox; - tshColor: TTabSheet; - pnlColor: TPanel; - lblGridLinesColor: TLabel; - bvlLineColorHolder: TBevel; - gbxFixedTransparent: TGroupBox; - lblFixedColor: TLabel; - bvlFixedColorHolder: TBevel; - gbxTransparent: TGroupBox; - lblColor: TLabel; - bvlColorHolder: TBevel; - chbxTransparent: TCheckBox; - chbxFixedTransparent: TCheckBox; - tshFont: TTabSheet; - pnlFont: TPanel; - btnFont: TButton; - edFont: TEdit; - btnFixedFont: TButton; - edFixedFont: TEdit; - tshBehaviors: TTabSheet; - Panel1: TPanel; - Image3: TImage; - lblSelection: TLabel; - Bevel3: TBevel; - lblOnEveryPage: TLabel; - Image1: TImage; - Bevel10: TBevel; - chbxOnlySelected: TCheckBox; - chbxFixedRowsOnEveryPage: TCheckBox; - chbxShowRowAndColumnHeadings: TCheckBox; - chbxShowGridLines: TCheckBox; - chbxSuppressSourceFormats: TCheckBox; - lblPreview: TStaticText; - stTransparent: TStaticText; - stFixedTransparent: TStaticText; - procedure chbxFixedRowsOnEveryPageClick(Sender: TObject); - procedure chbxOnlySelectedClick(Sender: TObject); - procedure btnFixedFontClick(Sender: TObject); - procedure chbxRowAutoHeightClick(Sender: TObject); - procedure chbxSuppressSourceFormatsClick(Sender: TObject); - procedure chbxShowRowAndColumnHeadingsClick(Sender: TObject); - procedure chbxShowGridLinesClick(Sender: TObject); - procedure chbxFixedTransparentClick(Sender: TObject); - procedure ccbxColorChange(Sender: TObject); - procedure pbxPreviewPaint(Sender: TObject); - procedure lblColorClick(Sender: TObject); - procedure pgctrlMainChange(Sender: TObject); - procedure stTransparentClick(Sender: TObject); - procedure stFixedTransparentClick(Sender: TObject); - private - FccbxColor: TCustomComboBox; - FccbxFixedColor: TCustomComboBox; - FccbxGridLineColor: TCustomComboBox; - FPreviewBox: TCustomControl; - function GetReportLink: TCustomdxSpreadSheetReportLink; - procedure SetReportLink(Value: TCustomdxSpreadSheetReportLink); - procedure CreateControls; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - public - constructor Create(AOwner: TComponent); override; - property ReportLink: TCustomdxSpreadSheetReportLink read GetReportLink write SetReportLink; - end; - -const - dxPSEmptySSPrintArea: TRect = (Left: -1; Top: -1; Right: -1; Bottom: -1); - - dxPSCellSideMap: array[TcxSSEdgeBorder] of TdxCellSide = (csLeft, csTop, csRight, csBottom); - cxSSEdgeBorderMap: array[TdxCellSide] of TcxSSEdgeBorder = (eLeft, eTop, eRight, eBottom); - - dxCellEdgeSideOrientation: array[TdxCellSide] of TdxPSCellEdgePatternOrientation = - (cepoVertical, cepoHorizontal, cepoVertical, cepoHorizontal); - - dxPSEdgePatternClassMap: array[TcxSSEdgeLineStyle] of TdxPSEdgePatternClass = - (TdxPSSolidEdgePattern, TdxPSSolidEdgePattern, TdxPSMediumSolidEdgePattern, - TdxPSDashedEdgePattern, TdxPSDottedEdgePattern, TdxPSThickSolidEdgePattern, - TdxPSDoubleLineSolidEdgePattern, TdxPSHairEdgePattern, TdxPSMediumDashedEdgePattern, - TdxPSDashDotEdgePattern, TdxPSMediumDashDotEdgePattern, TdxPSDashDotDotEdgePattern, - TdxPSMediumDashDotDotEdgePattern, TdxPSSlantedDashDotEdgePattern, TdxPSSolidEdgePattern); - - dxPSFillPatternClassMap: array[TcxSSFillStyle] of TdxPSFillPatternClass = - (TdxPSSolidFillPattern, TdxPSGray75FillPattern, TdxPSGray50FillPattern, - TdxPSGray25FillPattern, TdxPSGray125FillPattern, TdxPSGray625FillPattern, - TdxPSHorizontalStripeFillPattern, TdxPSVerticalStripeFillPattern, - TdxPSDiagonalStripeFillPattern, TdxPSReverseDiagonalStripeFillPattern, - TdxPSDiagonalCrossHatchFillPattern, TdxPSThickCrossHatchFillPattern, - TdxPSThinHorizontalStripeFillPattern, TdxPSThinVerticalStripeFillPattern, - TdxPSThinDiagonalStripeFillPattern, TdxPSThinReverseDiagonalStripeFillPattern, - TdxPSThinHorizontalCrossHatchFillPattern, TdxPSThinDiagonalCrossHatchFillPattern); - - dxPSTextAlignXMap: array[TcxDisplayTextAlignment] of TcxTextAlignX = - (taLeft, taCenterX, taRight, taLeft, taDistributeX); - dxPSTextAlignYMap: array[TcxVertTextAlign] of TcxTextAlignY = - (taTop, taCenterY, taBottom, taDistributeY); - -implementation - -{$R *.DFM} - -uses - SysUtils, Forms, cxSSUtils, cxClasses, dxPSRes, dxPSUtl, dxExtCtrls, dxPrnDev; - -const - { Since we don't use following Format Bits in TdxReportCellSSString we are allowed to safely override them } - dxFormatClipContent = dxPSGlbl.dxFormatMakeSpaceForEmptyImage; - dxFormatFill = dxPSGlbl.dxFormatCheckEnabled; - dxFormatFixed = dxPSGlbl.dxFormatCheckBold; - dxFormatMerged = dxPSGlbl.dxFormatImageTransparent; - dxFormatNearMostLeft = dxPSGlbl.dxFormatCheckFlat; - dxFormatNearMostTop = dxPSGlbl.dxFormatCheckChecked; - dxFormatVirtual = dxPSGlbl.dxFormatImageTransparent; - - SubEndMask = $00000003; - SubBitsPerEnd = 2; - SubBitsPerSide = SubBitsPerEnd * (Integer(High(TdxPSCellBorderEnd)) + 1); - SlantBitsPerSide = 4; - SlantMask = $00000001; - - { from SS } - SystemColorStart = 55; - -type - TcxCustomSpreadSheetBookAccess = class(TcxCustomSpreadSheetBook); - TcxSSBookSheetAccess = class(TcxSSBookSheet); - TcxSSDataStorageAccess = class(TcxSSDataStorage); - TcxSSCellStyleAccess = class(TcxSSCellStyle); - -function AreBackgroundsEqual(AStyle1, AStyle2: TcxSSCellStyleRec): Boolean; -begin - Result := - (AStyle1.BrushStyle = AStyle2.BrushStyle) and - (AStyle1.BrushBkColor = AStyle2.BrushBkColor) and - (AStyle1.BrushFgColor = AStyle2.BrushFgColor); -end; - -function AreEdgesEqual(AEdge1, AEdge2: TcxSSEdgeStyleRec): Boolean; -begin - Result := (AEdge1.Color = AEdge2.Color) and (AEdge1.Style = AEdge2.Style); -end; - -function AreBordersEqual(ABorders1, ABorders2: TcxSSBordersStyle; - AExclusion: TcxSSEdgeBorders = []): Boolean; -var - Edge: TcxSSEdgeBorder; -begin - for Edge := eLeft to eBottom do - begin - if Edge in AExclusion then - Result := not AreEdgesEqual(ABorders1[Edge], ABorders2[Edge]) - else - Result := AreEdgesEqual(ABorders1[Edge], ABorders2[Edge]); - if not Result then Break; - end; -end; - -function AreStylesEqual(AStyle1, AStyle2: TcxSSCellStyleRec; - AExclusion: TcxSSEdgeBorders = []): Boolean; -begin - Result := AreBackgroundsEqual(AStyle1, AStyle2) and - AreBordersEqual(AStyle1.Borders, AStyle2.Borders, AExclusion); -end; - -function IsCellDataEmpty(const ACell: TcxSSCellRec): Boolean; -begin - Result := (ACell.Text = '') and (ACell.DateTime = 0); -end; - -function ExposeBookSheet(ASpreadSheet: TcxSSBookSheet): TcxSSBookSheetAccess; -begin - Result := TcxSSBookSheetAccess(ASpreadSheet); -end; - -function ExposeDataStorage(ADataStorage: TcxSSDataStorage): TcxSSDataStorageAccess; -begin - Result := TcxSSDataStorageAccess(ADataStorage); -end; - -function ExposeSpreadSheetBook(ASpreadSheetBook: TcxCustomSpreadSheetBook): TcxCustomSpreadSheetBookAccess; -begin - Result := TcxCustomSpreadSheetBookAccess(ASpreadSheetBook); -end; - -function ExposeActiveSpreadSheet(ASpreadSheetBook: TcxCustomSpreadSheetBook): TcxSSBookSheetAccess; -begin - Result := ExposeBookSheet(ExposeSpreadSheetBook(ASpreadSheetBook).ActiveSheet); -end; - -function ExposeStyle(AStyle: TcxSSCellStyle): TcxSSCellStyleAccess; -begin - Result := TcxSSCellStyleAccess(AStyle); -end; - -function GetTextWidth(DC: HDC; AFont: HFONT; const S: string): Integer; -var - Size: TSize; -begin - AFont := SelectObject(DC, AFont); - GetTextExtentPoint32(DC, PChar(S), Length(S), Size); - SelectObject(DC, AFont); - Result := Size.cx; -end; - -{ TdxReportCellSSString } - -constructor TdxReportCellSSString.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - PreventLeftTextExceed := False; - TextAlignY := taBottom; -end; - -procedure TdxReportCellSSString.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TdxReportCellSSString then - begin - FBorders := TdxReportCellSSString(Source).FBorders; - FBorderSlants := TdxReportCellSSString(Source).FBorderSlants; - FBorderSubs := TdxReportCellSSString(Source).FBorderSubs; - FContentBkColor := TdxReportCellSSString(Source).FContentBkColor; - FContentPattern := TdxReportCellSSString(Source).FContentPattern; - FRealCol := TdxReportCellSSString(Source).FRealCol; - FRealRow := TdxReportCellSSString(Source).FRealRow; - FTextExtentLeft := TdxReportCellSSString(Source).FTextExtentLeft; - FTextExtentRight := TdxReportCellSSString(Source).FTextExtentRight; - end; -end; - -procedure TdxReportCellSSString.SetBorders(AColor: TColor; APattern: TdxPSEdgePatternClass); -var - Side: TdxCellSide; - ABorder: TdxPSCellBorder; -begin - for Side := csLeft to csBottom do - begin - ABorder := Borders[Side]; - ABorder.Color := AColor; - ABorder.Pattern := APattern; - Borders[Side] := ABorder; - end; -end; - -procedure TdxReportCellSSString.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - if rsFirstPass in AStage then - if IsBackgroundDrawn then DrawBackground(DC); - if rsSecondPass in AStage then - begin - if IsTextDrawn then DrawText(DC); - if IsBordersDrawn then DrawBorders(DC); - end; -end; - -procedure TdxReportCellSSString.CalcBorderSubs(AnAdapter: TdxPSGridCellsAdapter); - - function GetNeighborCell(ASide: TdxCellSide): TdxReportCellSSString; - begin - Result := AnAdapter.GetNeighborCell(Self, ASide); - end; - - function GetNeighborCellBorder(ASide, ABorderSide: TdxCellSide): TdxPSCellBorder; - var - Neighbor: TdxReportCellSSString; - begin - Neighbor := GetNeighborCell(ASide); - if Neighbor <> nil then - Result := Neighbor.Borders[ABorderSide] - else - Result := NullBorder; - end; - - function GetNeighborCellBorderSalient(ASide, ABorderSide: TdxCellSide; - ASalient: TdxPSCellBorderSalientType): Integer; - var - Neighbor: TdxReportCellSSString; - begin - Neighbor := GetNeighborCell(ASide); - if Neighbor <> nil then - Result := Neighbor.BorderEdgeSalients[ABorderSide, ASalient] - else - Result := 0; - end; - - procedure GetBordersAtCorner(ACorner: TdxPSCellCorner; out ABorders: TdxPSCellBorders); - begin - case ACorner of - ccTopLeft: - begin - ABorders[csLeft] := GetNeighborCellBorder(csLeft, csTop); - ABorders[csTop] := GetNeighborCellBorder(csTop, csLeft); - ABorders[csRight] := Borders[csTop]; - ABorders[csBottom] := Borders[csLeft]; - end; - ccTopRight: - begin - ABorders[csLeft] := Borders[csTop]; - ABorders[csTop] := GetNeighborCellBorder(csTop, csRight); - ABorders[csRight] := GetNeighborCellBorder(csRight, csTop); - ABorders[csBottom] := Borders[csRight]; - end; - ccBottomRight: - begin - ABorders[csLeft] := Borders[csBottom]; - ABorders[csTop] := Borders[csRight]; - ABorders[csRight] := GetNeighborCellBorder(csRight, csBottom); - ABorders[csBottom] := GetNeighborCellBorder(csBottom, csRight); - end; - ccBottomLeft: - begin - ABorders[csLeft] := GetNeighborCellBorder(csLeft, csBottom); - ABorders[csTop] := Borders[csLeft]; - ABorders[csRight] := Borders[csBottom]; - ABorders[csBottom] := GetNeighborCellBorder(csBottom, csLeft); - end; - end; - end; - - function DontNeedCornerSubsCalculation(ACorner: TdxPSCellCorner; ABorders: TdxPSCellBorders): Boolean; - var - BorderCount, DblCount: Integer; - Color: TColor; - Side: TdxCellSide; - Border: TdxPSCellBorder; - begin - BorderCount := 0; - DblCount := 0; - Color := clBlack; - - Result := False; - for Side := csLeft to csBottom do - begin - Border := ABorders[Side]; - if Border.Pattern = nil then Continue; - - Inc(BorderCount); - if IsDoubleLineBorderPattern(Border) then - Inc(DblCount); - - if (DblCount <> 0) and (DblCount <> BorderCount) then - Exit; - - if BorderCount = 1 then - Color := Border.Color - else - if Color <> Border.Color then - Exit; - end; - Result := True; - end; - - function GetFavoriteSides(ACorner: TdxPSCellCorner; const ABorders: TdxPSCellBorders): TdxCellSides; - const - CornerSideMaps: array[TdxPSCellCorner, TdxCellSide] of TdxCellSides = - (([], [], [csTop], [csLeft]), - ([csTop], [], [], [csRight]), - ([csBottom], [csRight], [], []), - ([], [csLeft], [csBottom], [])); - var - StartSide, FavoriteSide, Side: TdxCellSide; - DblCount: Integer; - DblCandidates: TdxCellSides; - Border, FavoriteBorder: TdxPSCellBorder; - begin - StartSide := csLeft; - while (StartSide < csBottom) and (ABorders[StartSide].Pattern = nil) do - Inc(StartSide); - FavoriteSide := StartSide; - FavoriteBorder := ABorders[FavoriteSide]; - - DblCount := 0; - DblCandidates := []; - for Side := StartSide to csBottom do - begin - Border := ABorders[Side]; - if Border.Pattern = nil then Continue; - - if IsDoubleLineBorderPattern(Border) then - begin - Inc(DblCount); - DblCandidates := DblCandidates + CornerSideMaps[ACorner, Side]; - end; - - if Side > StartSide then - if not IsDoubleLineBorderPattern(Border) and - (IsDoubleLineBorderPattern(FavoriteBorder) or - (Border.Pattern.Thickness > FavoriteBorder.Pattern.Thickness) or - ((Border.Pattern.Thickness = FavoriteBorder.Pattern.Thickness) and - (Border.Color < FavoriteBorder.Color))) then - begin - FavoriteBorder := Border; - FavoriteSide := Side; - end; - end; - - if DblCount > 1 then - Result := DblCandidates - else - Result := CornerSideMaps[ACorner, FavoriteSide]; - end; - - function CalcBorderSub(ASide: TdxCellSide; AEnd: TdxPSCellBorderEnd): Integer; - const - ConcurSides: array[TdxCellSide, TdxPSCellBorderEnd] of TdxCellSide = - ((csTop, csBottom), - (csLeft, csRight), - (csTop, csBottom), - (csLeft, csRight)); - var - ConcurSide: TdxCellSide; - begin - ConcurSide := ConcurSides[ASide, AEnd]; - Result := BorderEdgeSalients[ConcurSide, bstOuter] + - Max(BorderEdgeSalients[ConcurSide, bstInner], GetNeighborCellBorderSalient(ASide, ConcurSide, bstInner)); - end; - -const - BorderEnds: array[TdxPSCellCorner, TdxCellSide] of TdxPSCellBorderEnd = - ((cbsTopLeft, cbsTopLeft, cbsTopLeft, cbsTopLeft), - (cbsTopLeft, cbsBottomRight, cbsTopLeft, cbsTopLeft), - (cbsBottomRight, cbsBottomRight, cbsBottomRight, cbsBottomRight), - (cbsBottomRight, cbsTopLeft, cbsTopLeft, cbsTopLeft)); - CornerSides: array[TdxPSCellCorner] of TdxCellSides = - ([csLeft, csTop], - [csTop, csRight], - [csRight, csBottom], - [csBottom, csLeft]); -var - Corner: TdxPSCellCorner; - Borders: TdxPSCellBorders; - UnfavorableSides: TdxCellSides; - Side: TdxCellSide; - BorderEnd: TdxPSCellBorderEnd; -begin - for Corner := ccTopLeft to ccBottomLeft do - begin - GetBordersAtCorner(Corner, Borders); - if DontNeedCornerSubsCalculation(Corner, Borders) then - Continue; - - UnfavorableSides := CornerSides[Corner] - GetFavoriteSides(Corner, Borders); - for Side := csLeft to csBottom do - if Side in UnfavorableSides then - begin - BorderEnd := BorderEnds[Corner, Side]; - BorderSubs[Side, BorderEnd] := CalcBorderSub(Side, BorderEnd); - end; - end; -end; - -procedure TdxReportCellSSString.CalcDoubleBorderSlants(AnAdapter: TdxPSGridCellsAdapter); -var - Neighbor: TdxReportCellSSString; -begin - if IsDoubleLineBorderPattern(csLeft) then - begin - Neighbor := AnAdapter.GetNeighborCell(Self, csLeft); - BorderSlants[csLeft, cbcTopLeft] := Ord((Neighbor <> nil) and Neighbor.IsDoubleLineBorderPattern(csTop)); - BorderSlants[csLeft, cbcTopRight] := Ord(IsDoubleLineBorderPattern(csTop)); - BorderSlants[csLeft, cbcBottomRight] := Ord(IsDoubleLineBorderPattern(csBottom)); - BorderSlants[csLeft, cbcBottomLeft] := Ord((Neighbor <> nil) and Neighbor.IsDoubleLineBorderPattern(csBottom)); - end; - - if IsDoubleLineBorderPattern(csTop) then - begin - Neighbor := AnAdapter.GetNeighborCell(Self, csTop); - BorderSlants[csTop, cbcTopLeft] := Ord((Neighbor <> nil) and Neighbor.IsDoubleLineBorderPattern(csLeft)); - BorderSlants[csTop, cbcTopRight] := Ord((Neighbor <> nil) and Neighbor.IsDoubleLineBorderPattern(csRight)); - BorderSlants[csTop, cbcBottomRight] := Ord(IsDoubleLineBorderPattern(csRight)); - BorderSlants[csTop, cbcBottomLeft] := Ord(IsDoubleLineBorderPattern(csLeft)); - end; - - if IsDoubleLineBorderPattern(csRight) then - begin - Neighbor := AnAdapter.GetNeighborCell(Self, csRight); - BorderSlants[csRight, cbcTopLeft] := Ord(IsDoubleLineBorderPattern(csTop)); - BorderSlants[csRight, cbcTopRight] := Ord((Neighbor <> nil) and Neighbor.IsDoubleLineBorderPattern(csTop)); - BorderSlants[csRight, cbcBottomRight] := Ord((Neighbor <> nil) and Neighbor.IsDoubleLineBorderPattern(csBottom)); - BorderSlants[csRight, cbcBottomLeft] := Ord(IsDoubleLineBorderPattern(csBottom)); - end; - - if IsDoubleLineBorderPattern(csBottom) then - begin - Neighbor := AnAdapter.GetNeighborCell(Self, csBottom); - BorderSlants[csBottom, cbcTopLeft] := Ord(IsDoubleLineBorderPattern(csLeft)); - BorderSlants[csBottom, cbcTopRight] := Ord(IsDoubleLineBorderPattern(csRight)); - BorderSlants[csBottom, cbcBottomRight] := Ord((Neighbor <> nil) and Neighbor.IsDoubleLineBorderPattern(csRight)); - BorderSlants[csBottom, cbcBottomLeft] := Ord((Neighbor <> nil) and Neighbor.IsDoubleLineBorderPattern(csLeft)); - end; -end; - -procedure TdxReportCellSSString.ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); -begin - inherited ConvertCoords(APixelsNumerator, APixelsDenominator); - TextExtentLeft := MulDiv(TextExtentLeft, APixelsNumerator, APixelsDenominator); - TextExtentRight := MulDiv(TextExtentRight, APixelsNumerator, APixelsDenominator); -end; - -function TdxReportCellSSString.GetBackgroundBounds(DC: HDC): TRect; -var - LineThickness: Integer; -begin - Result := inherited GetBackgroundBounds(DC); - if not IsFixed then - begin - LineThickness := Self.LineThickness; - if BorderEdgeSalients[csLeft, bstOuter] > 0 then Dec(Result.Left, LineThickness); - if BorderEdgeSalients[csTop, bstOuter] > 0 then Dec(Result.Top, LineThickness); - if BorderEdgeSalients[csRight, bstOuter] > 0 then Inc(Result.Right, LineThickness); - if BorderEdgeSalients[csBottom, bstOuter] > 0 then Inc(Result.Bottom, LineThickness); - FixupRect(DC, Result); - end; -end; - -function TdxReportCellSSString.GetBorderEdgeBounds(ASide: TdxCellSide; const AOuterRect: TRect): TRect; -begin - Result := inherited GetBorderEdgeBounds(ASide, AOuterRect); - with Result do - if ASide in csLeftRight then - begin - Inc(Top, LineThickness * BorderSubs[ASide, cbsTopLeft]); - Dec(Bottom, LineThickness * BorderSubs[ASide, cbsBottomRight]); - end - else - begin - Inc(Left, LineThickness * BorderSubs[ASide, cbsTopLeft]); - Dec(Right, LineThickness * BorderSubs[ASide, cbsBottomRight]); - end; -end; - -function TdxReportCellSSString.GetBorderBrush(ASide: TdxCellSide): HBRUSH; -begin - Result := dxPSEdgePatternFactory.Items[TdxPSEdgePatternClass(BorderEdgeClasses[ASide]), IsPrinting].Brushes[dxCellEdgeSideOrientation[ASide]].Handle; -end; - -function TdxReportCellSSString.GetBorderEdgeClass(ASide: TdxCellSide): TdxPSCellBorderClass; -begin - Result := Borders[ASide].Pattern; - if Result = nil then - Result := TdxPSSolidEdgePattern; -end; - -function TdxReportCellSSString.GetEffectiveBounds(DC: HDC; AStage: TdxPSRenderStages): TRect; -begin - if rsFirstPass in AStage then - Result := inherited GetEffectiveBounds(DC, AStage) - else - UnionRect(Result, GetOuterBounds(DC), GetTextBounds(DC)); -end; - -function TdxReportCellSSString.GetTextBounds(DC: HDC): TRect; -begin - Result := inherited GetTextBounds(DC); - if TextExtentLeft <> 0 then - Result.Left := TextExtentLeft; - if TextExtentRight <> 0 then - Result.Right := TextExtentRight; -end; - -function TdxReportCellSSString.IsDrawn(DC: HDC; AStage: TdxPSRenderStages; const ARect: TRect): Boolean; -var - R: TRect; -begin - Result := IntersectRect(R, GetAbsoluteInnerBounds(DC), ARect); -end; - -function TdxReportCellSSString.GetBorderPainterClass: TdxPSCellBorderPainterClass; -begin - if IsFixed then - Result := inherited GetBorderPainterClass - else - Result := TdxPSCellPatternsBorderPainter; -end; - -procedure TdxReportCellSSString.InitBorderPainter(ABordersPainter: TdxPSCellBorderPainter); -begin - inherited InitBorderPainter(ABordersPainter); - if not IsFixed then - TdxPSCellPatternsBorderPainter(ABordersPainter).FGridAdapter := - TCustomdxSpreadSheetReportLink(ReportCells.ReportLink).FGridAdapter; -end; - -function TdxReportCellSSString.GetContentBkColor: TColor; -begin - Result := FContentBkColor; -end; - -function TdxReportCellSSString.GetContentPattern: TdxPSFillPatternClass; -begin - Result := FContentPattern; -end; - -procedure TdxReportCellSSString.SetContentBkColor(Value: TColor); -begin - FContentBkColor := Value; -end; - -procedure TdxReportCellSSString.SetContentPattern(Value: TdxPSFillPatternClass); -begin - FContentPattern := Value; -end; - -procedure TdxReportCellSSString.ReadBorders(AReader: TdxPSDataReader); -var - Side: TdxCellSide; - Border: TdxPSCellBorder; -begin - for Side := csLeft to csBottom do - begin - Border.Color := AReader.ReadInteger; - Border.Pattern := TdxPSEdgePatternClass(AReader.ReadCellBorderClass); - - Borders[Side] := Border; - end; -end; - -procedure TdxReportCellSSString.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - with AReader do - begin - ReadBorders(AReader); - FBorderSlants := ReadInteger; - FBorderSubs := ReadInteger; - RealCol := ReadInteger; - RealRow := ReadInteger; - TextExtentLeft := ReadInteger; - TextExtentRight := ReadInteger; - end; -end; - -procedure TdxReportCellSSString.WriteBorders(AWriter: TdxPSDataWriter); -var - Side: TdxCellSide; -begin - for Side := csLeft to csBottom do - begin - AWriter.WriteInteger(Borders[Side].Color); - AWriter.WriteClassName(Borders[Side].Pattern); - end; -end; - -procedure TdxReportCellSSString.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - with AWriter do - begin - WriteBorders(AWriter); - WriteInteger(FBorderSlants); - WriteInteger(FBorderSubs); - WriteInteger(RealCol); - WriteInteger(RealRow); - WriteInteger(TextExtentLeft); - WriteInteger(TextExtentRight); - end; -end; - -function TdxReportCellSSString.GetAbsoluteInnerBounds(DC: HDC): TRect; -begin - Result := GetInnerBounds(DC); - if Parent <> nil then - with Parent.AbsoluteOrigin do - OffsetRect(Result, X, Y); -end; - -function TdxReportCellSSString.GetDoubleBorderRgn(ASide: TdxCellSide; const R: TRect): HRGN; -const - VertexCount = 4; -type - PdxPSCellEdgeCoords = ^TdxPSCellEdgeCoords; - TdxPSCellEdgeCoords = record - case Byte of - 0: (TopLeft, TopRight, BottomRight, BottomLeft: TPoint); - 1: (Points: array[0..VertexCount - 1] of TPoint); - end; -var - EdgeCoords: TdxPSCellEdgeCoords; - Thickness: Integer; -begin - with EdgeCoords do - begin - TopLeft := R.TopLeft; - TopRight := Point(R.Right, R.Top); - BottomRight := R.BottomRight; - BottomLeft := Point(R.Left, R.Bottom); - end; - - Thickness := LineThickness * (TdxPSDoubleLineSolidEdgePattern.Thickness - 1); - - with EdgeCoords do - case ASide of - csLeft: - begin - Inc(TopLeft.Y, Thickness * BorderSlants[ASide, cbcTopLeft]); - Inc(TopRight.Y, Thickness * BorderSlants[ASide, cbcTopRight]); - Dec(BottomRight.Y, Thickness * BorderSlants[ASide, cbcBottomRight]); - Dec(BottomLeft.Y, Thickness * BorderSlants[ASide, cbcBottomLeft]); - end; - csTop: - begin - Inc(TopLeft.X, Thickness * BorderSlants[ASide, cbcTopLeft]); - Dec(TopRight.X, Thickness * BorderSlants[ASide, cbcTopRight]); - Dec(BottomRight.X, Thickness * BorderSlants[ASide, cbcBottomRight]); - Inc(BottomLeft.X, Thickness * BorderSlants[ASide, cbcBottomLeft]); - end; - csRight: - begin - Inc(TopLeft.Y, Thickness * BorderSlants[ASide, cbcTopLeft]); - Inc(TopRight.Y, Thickness * BorderSlants[ASide, cbcTopRight]); - Dec(BottomRight.Y, Thickness * BorderSlants[ASide, cbcBottomRight]); - Dec(BottomLeft.Y, Thickness * BorderSlants[ASide, cbcBottomLeft]); - end; - csBottom: - begin - Inc(TopLeft.X, Thickness * BorderSlants[ASide, cbcTopLeft]); - Dec(TopRight.X, Thickness * BorderSlants[ASide, cbcTopRight]); - Dec(BottomRight.X, Thickness * BorderSlants[ASide, cbcBottomRight]); - Inc(BottomLeft.X, Thickness * BorderSlants[ASide, cbcBottomLeft]); - end; - end; - - Result := CreatePolygonRgn(EdgeCoords.Points, SizeOf(TdxPSCellEdgeCoords) div SizeOf(TPoint), Windows.WINDING); -end; - -function TdxReportCellSSString.IsDoubleLineBorderPattern(ABorder: TdxPSCellBorder): Boolean; -begin - with ABorder do - Result := (Pattern <> nil) and Pattern.InheritsFrom(TdxPSDoubleLineSolidEdgePattern); -end; - -function TdxReportCellSSString.IsDoubleLineBorderPattern(ASide: TdxCellSide): Boolean; -begin - Result := (ASide in CellSides) and IsDoubleLineBorderPattern(Self.Borders[ASide]); -end; - -function TdxReportCellSSString.NullBorder: TdxPSCellBorder; -begin - FillChar(Result, SizeOf(TdxPSCellBorder), 0); -end; - -function TdxReportCellSSString.GetBorder(ASide: TdxCellSide): TdxPSCellBorder; -begin - Result := FBorders[ASide]; -end; - -function TdxReportCellSSString.GetBordersBkColor: TColor; -begin - if Transparent then - Result := ColorToRGB(clWindow) - else - Result := Color; -end; - -function TdxReportCellSSString.GetBorderSlant(ASide: TdxCellSide; ACorner: TdxPSCellBorderCorner): Integer; -begin - Result := (FBorderSlants shr GetBorderSlantOffset(ASide, ACorner)) and SlantMask; -end; - -function TdxReportCellSSString.GetBorderSlantOffset(ASide: TdxCellSide; ACorner: TdxPSCellBorderCorner): TDWORDBits; -begin - Result := Integer(ASide) * SlantBitsPerSide + Integer(ACorner); -end; - -function TdxReportCellSSString.GetBorderSub(ASide: TdxCellSide; AEnd: TdxPSCellBorderEnd): TdxPSCellBorderSub; -begin - Result := (FBorderSubs shr GetBorderSubOffset(ASide, AEnd)) and SubEndMask; -end; - -function TdxReportCellSSString.GetBorderSubMask(ASide: TdxCellSide; AEnd: TdxPSCellBorderEnd): DWORD; -begin - Result := 0 or (SubEndMask shl GetBorderSubOffset(ASide, AEnd)); -end; - -function TdxReportCellSSString.GetBorderSubOffset(ASide: TdxCellSide; AEnd: TdxPSCellBorderEnd): TDWORDBits; -begin - Result := Integer(ASide) * SubBitsPerSide + SubBitsPerEnd * Integer(AEnd); -end; - -function TdxReportCellSSString.GetClipContent: Boolean; -begin - Result := (Format and dxFormatClipContent) = dxFormatClipContent; -end; - -function TdxReportCellSSString.GetCol: Integer; -begin - Result := Index; -end; - -function TdxReportCellSSString.GetFill: Boolean; -begin - Result := (Format and dxFormatFill) = dxFormatFill; -end; - -function TdxReportCellSSString.GetIsFixed: Boolean; -begin - Result := (Format and dxFormatFixed) = dxFormatFixed; -end; - -function TdxReportCellSSString.GetIsMerged: Boolean; -begin - Result := (Format and dxFormatMerged) = dxFormatMerged; -end; - -function TdxReportCellSSString.GetIsNearMostLeft: Boolean; -begin - Result := (Format and dxFormatNearMostLeft) = dxFormatNearMostLeft; -end; - -function TdxReportCellSSString.GetIsNearMostTop: Boolean; -begin - Result := (Format and dxFormatNearMostTop) = dxFormatNearMostTop; -end; - -function TdxReportCellSSString.GetIsNearMostTopOrLeft: Boolean; -begin - Result := GetIsNearMostLeft or GetIsNearMostTop; -end; - -function TdxReportCellSSString.GetIsVirtual: Boolean; -begin - Result := GetFormatBit(dxFormatVirtual); -end; - -function TdxReportCellSSString.GetRow: Integer; -begin - Result := Parent.Index; -end; - -procedure TdxReportCellSSString.SetBorder(ASide: TdxCellSide; Value: TdxPSCellBorder); -begin - FBorders[ASide] := Value; -end; - -procedure TdxReportCellSSString.SetBorderSlant(ASide: TdxCellSide; - ACorner: TdxPSCellBorderCorner; Value: Integer); -var - Mask: DWORD; -begin - Mask := 1 shl GetBorderSlantOffset(ASide, ACorner); - FBorderSlants := FBorderSlants and not Mask; - if Value <> 0 then - FBorderSlants := FBorderSlants or Mask; -end; - -procedure TdxReportCellSSString.SetBorderSub(ASide: TdxCellSide; AEnd: TdxPSCellBorderEnd; - Value: TdxPSCellBorderSub); -begin - FBorderSubs := FBorderSubs and not GetBorderSubMask(ASide, AEnd) or - (Value shl GetBorderSubOffset(ASide, AEnd)); -end; - -procedure TdxReportCellSSString.SetClipConent(Value: Boolean); -const - dxClipContent: array[Boolean] of DWORD = (0, dxFormatClipContent); -begin - Format := Format and not dxFormatClipContent or dxClipContent[Value]; -end; - -procedure TdxReportCellSSString.SetFill(Value: Boolean); -const - dxFill: array[Boolean] of DWORD = (0, dxFormatFill); -begin - Format := Format and not dxFormatFill or dxFill[Value]; -end; - -procedure TdxReportCellSSString.SetIsFixed(Value: Boolean); -const - dxFixed: array[Boolean] of DWORD = (0, dxFormatFixed); -begin - Format := Format and not dxFormatFixed or dxFixed[Value]; -end; - -procedure TdxReportCellSSString.SetIsMerged(Value: Boolean); -const - dxMerged: array[Boolean] of DWORD = (0, dxFormatMerged); -begin - Format := Format and not dxFormatMerged or dxMerged[Value]; -end; - -procedure TdxReportCellSSString.SetIsNearMostLeft(Value: Boolean); -const - dxIsNearMostLeft: array[Boolean] of DWORD = (0, dxFormatNearMostLeft); -begin - Format := Format and not dxFormatNearMostLeft or dxIsNearMostLeft[Value]; -end; - -procedure TdxReportCellSSString.SetIsNearMostTop(Value: Boolean); -const - dxIsNearMostTop: array[Boolean] of DWORD = (0, dxFormatNearMostTop); -begin - Format := Format and not dxFormatNearMostTop or dxIsNearMostTop[Value]; -end; - -procedure TdxReportCellSSString.SetIsVirtual(Value: Boolean); -begin - SetFormatBit(dxFormatVirtual, Value); -end; - -{ TdxPSCellPatternsBorderPainter } - -function TdxPSCellPatternsBorderPainter.Item: TdxReportCellSSString; -begin - Result := inherited Item as TdxReportCellSSString; -end; - -function TdxPSCellPatternsBorderPainter.ClipItemBounds(DC: HDC; AOuterRect: TRect): HRGN; -begin - with Item do - begin - if IsNearMostTop then - Inc(AOuterRect.Top, LineThickness * BorderEdgeSalients[csTop, bstOuter]); - if IsNearMostLeft then - Inc(AOuterRect.Left, LineThickness * BorderEdgeSalients[csLeft, bstOuter]); - end; - Result := Renderer.IntersectClipRect(AOuterRect); -end; - -procedure TdxPSCellPatternsBorderPainter.DrawBorder(DC: HDC; const R: TRect; - AForeColor, ABkColor: TColor; ABrush: HBRUSH); -begin - ABkColor := SetBkColor(DC, ABkColor); - AForeColor := SetTextColor(DC, AForeColor); - FillRect(DC, R, ABrush); - SetTextColor(DC, AForeColor); - SetBkColor(DC, ABkColor); -end; - -procedure TdxPSCellPatternsBorderPainter.DrawBorder(DC: HDC; ABorderRgn: HRGN; - AForeColor, ABkColor: TColor; ABrush: HBRUSH); -begin - ABkColor := SetBkColor(DC, ABkColor); - AForeColor := SetTextColor(DC, AForeColor); - FillRgn(DC, ABorderRgn, ABrush); - SetTextColor(DC, AForeColor); - SetBkColor(DC, ABkColor); -end; - -procedure TdxPSCellPatternsBorderPainter.Paint(DC: HDC); -var - R: TRect; - Rgn: HRGN; - Side: TdxCellSide; - BorderRect: TRect; - BorderBr: HBRUSH; - BrushOrg: TPoint; - BorderRgn: HRGN; - Border: TdxPSCellBorder; -begin - with Item do - begin - R := GetOuterBounds(DC); - Rgn := 0; - if IsNearMostTopOrLeft then Rgn := ClipItemBounds(DC, R); - - for Side := csLeft to csBottom do - if Side in CellSides then - begin - BorderRect := GetBorderEdgeBounds(Side, R); - if RectVisible(DC, BorderRect) then - begin - BorderBr := GetBorderBrush(Side); - Border := Borders[Side]; - GetBrushOrgEx(DC, BrushOrg); - if (Border.Pattern <> nil) and Border.Pattern.RequiredBrushOrigin then - begin - UnrealizeObject(BorderBrush); - BrushOrg := BorderRect.TopLeft; - LPToDP(DC, BrushOrg, 1); - SetBrushOrgEx(DC, BrushOrg.X mod 2{Border.Pattern.Thickness}, BrushOrg.Y mod 2{Border.Pattern.Thickness}, nil); - end; - - FixupRect(DC, BorderRect); - if IsDoubleLineBorderPattern(Side) then - begin - BorderRgn := GetDoubleBorderRgn(Side, BorderRect); - DrawBorder(DC, BorderRgn, Border.Color, BordersBkColor, BorderBr); - DeleteObject(BorderRgn); - end - else - DrawBorder(DC, BorderRect, Border.Color, BordersBkColor, BorderBr); - - if (Border.Pattern <> nil) and Border.Pattern.RequiredBrushOrigin then - SetBrushOrgEx(DC, BrushOrg.X, BrushOrg.Y, nil); - end; - end; - - if IsNearMostTopOrLeft then Renderer.RestoreClipRgn(Rgn); - end; -end; - -{ TdxPSGridCellsAdapter } - -constructor TdxPSGridCellsAdapter.Create(AReportCells: TdxReportCells); -begin - inherited Create; - FReportCells := AReportCells; -end; - -function TdxPSGridCellsAdapter.GetNeighborCell(AItem: TdxReportCellSSString; - ASide: TdxCellSide): TdxReportCellSSString; -begin - Result := nil; - case ASide of - csLeft: - if AItem.Col > 0 then - Result := Cells[AItem.Col - 1, AItem.Row]; - csTop: - if AItem.Row > 0 then - Result := Cells[AItem.Col, AItem.Row - 1]; - csRight: - if AItem.Col + 1 < ColCount then - Result := Cells[AItem.Col + 1, AItem.Row]; - csBottom: - if AItem.Row + 1 < RowCount then - Result := Cells[AItem.Col, AItem.Row + 1]; - end; -end; - -function TdxPSGridCellsAdapter.GetCell(Col, Row: Integer): TdxReportCellSSString; -begin - Result := FReportCells.Cells[Row].DataItems[Col] as TdxReportCellSSString; -end; - -function TdxPSGridCellsAdapter.GetColCount: Integer; -begin - with FReportCells do - if Cells.CellCount > 0 then - Result := Cells[0].DataItemCount - else - Result := 0; -end; - -function TdxPSGridCellsAdapter.GetColOffset(Index: Integer): Integer; -begin - if Index < ColCount then - Result := Cells[Index, 0].Left - else - Result := Cells[ColCount - 1, 0].Left + Cells[ColCount - 1, 0].Width; -end; - -function TdxPSGridCellsAdapter.GetColWidth(Index: Integer): Integer; -begin - Result := Cells[Index, 0].Width; -end; - -function TdxPSGridCellsAdapter.GetRow(Index: Integer): TdxReportCell; -begin - Result := FReportCells.Cells[Index]; -end; - -function TdxPSGridCellsAdapter.GetRowCount: Integer; -begin - Result := FReportCells.Cells.CellCount; -end; - -function TdxPSGridCellsAdapter.GetRowHeight(Index: Integer): Integer; -begin - Result := Cells[0, Index].Height; -end; - -function TdxPSGridCellsAdapter.GetRowIndex(Index: Integer): Integer; -begin - Result := Rows[Index].Data; -end; - -function TdxPSGridCellsAdapter.GetRowOffset(Index: Integer): Integer; -begin - if Index < RowCount then - Result := Cells[0, Index].Top - else - Result := Cells[0, RowCount - 1].Top + Cells[0, RowCount - 1].Height; -end; - -{ TdxPSSSStringGridCellDataMap } - -class procedure TdxPSSSStringGridCellDataMap.InitializeCellData(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData; AReportLink: TAbstractdxGridReportLink); -begin - inherited; - with TCustomdxSpreadSheetReportLink(AReportLink) do - begin - TdxReportCellSSString(ADataItem).Fill := not IsFixedCell(ACol, ARow) and - (GetSSCellObject(ACol, ARow).DisplayTextAlignment = dtaFILL); - TdxReportCellSSString(ADataItem).IsFixed := IsFixedCell(ACol, ARow); - TdxReportCellSSString(ADataItem).IsMerged := IsMergedCell(ACol, ARow); - TdxReportCellSSString(ADataItem).IsNearMostLeft := IsNearMostLeftCell(ACol, ARow); - TdxReportCellSSString(ADataItem).IsNearMostTop := IsNearMostTopCell(ACol, ARow); - TdxReportCellSSString(ADataItem).RealCol := ACol; - TdxReportCellSSString(ADataItem).RealRow := ARow; - - SetupCellBorders(ACol, ARow, ADataItem); - end; -end; - -class function TdxPSSSStringGridCellDataMap.DataClass: TdxReportCellDataClass; -begin - Result := TdxReportCellSSString; -end; - -{ TCustomdxSpreadSheetReportLink } - -constructor TCustomdxSpreadSheetReportLink.Create(AOwner: TComponent); -begin - inherited; - FColCount := -1; - FRowCount := -1; - FCellObjects := TList.Create; - FGridAdapter := TdxPSGridCellsAdapter.Create(nil); - FTempFont := TFont.Create; -end; - -destructor TCustomdxSpreadSheetReportLink.Destroy; -begin - FTempFont.Free; - FGridAdapter.Free; - DeleteCellObjects; - FCellObjects.Free; - inherited; -end; - -procedure TCustomdxSpreadSheetReportLink.Assign(Source: TPersistent); -begin - inherited; - if Source is TCustomdxSpreadSheetReportLink then - with TCustomdxSpreadSheetReportLink(Source) do - begin - Self.OptionsView := OptionsView; - Self.PrintArea := PrintArea; - end; -end; - -procedure TCustomdxSpreadSheetReportLink.ClearPrintArea; -begin - PrintArea := dxPSEmptySSPrintArea; -end; - -function TCustomdxSpreadSheetReportLink.DataProviderPresent: Boolean; -begin - Result := inherited DataProviderPresent and DataToPrintExist; -end; - -function TCustomdxSpreadSheetReportLink.DataToPrintExist: Boolean; -begin - Result := (MeaningColCount > 0) and (MeaningRowCount > 0); -end; - -function TCustomdxSpreadSheetReportLink.PrintAreaExists: Boolean; -begin - Result := not EqualRect(PrintArea, dxPSEmptySSPrintArea); -end; - -function TCustomdxSpreadSheetReportLink.CannotActivateReportErrorString: string; -begin - if not inherited DataProviderPresent then - Result := inherited CannotActivateReportErrorString - else - Result := cxGetResourceString(@sdxDataToPrintDoesNotExist); -end; - -procedure TCustomdxSpreadSheetReportLink.DoChangeComponent; -begin - ClearPrintArea; - inherited; -end; - -procedure TCustomdxSpreadSheetReportLink.InternalRestoreDefaults; -begin - inherited; - EndEllipsis := False; - Soft3D := True; - FPrintArea := dxPSEmptySSPrintArea; - OptionsView := [ssovRowAndColumnHeadings]; -end; - -procedure TCustomdxSpreadSheetReportLink.InternalRestoreFromOriginal; -begin - inherited; - FixedFont := ExposeSpreadSheetBook(CustomSpreadSheetBook).HeaderFont; -end; - -function TCustomdxSpreadSheetReportLink.IsScaleGridLines: Boolean; -begin - Result := False; -end; - -function TCustomdxSpreadSheetReportLink.NeedTwoPassRendering: Boolean; -begin - Result := True; -end; - -function TCustomdxSpreadSheetReportLink.GetDataItemClass(ACol: Integer; ARow: Integer = 0): TdxReportCellDataClass; -begin - Result := TdxReportCellSSString; -end; - -function TCustomdxSpreadSheetReportLink.GetColCount: Integer; -var - BeginCol, BeginRow, EndRow: Integer; -begin - if FColCount <= 0 then - if HasSelection then - begin - GetSelectedRange(BeginCol, FColCount, BeginRow, EndRow); - Inc(FColCount); - end - else - FColCount := MeaningColCount + 1; - Result := FColCount; -end; - -function TCustomdxSpreadSheetReportLink.GetFixedColCount: Integer; -begin - Result := 1; -end; - -function TCustomdxSpreadSheetReportLink.GetFixedRowCount: Integer; -begin - Result := 1; -end; - -function TCustomdxSpreadSheetReportLink.GetRowCount: Integer; -var - BeginCol, EndCol, BeginRow: Integer; -begin - if FRowCount <= 0 then - if HasSelection then - begin - GetSelectedRange(BeginCol, EndCol, BeginRow, FRowCount); - Inc(FRowCount); - end - else - FRowCount := MeaningRowCount + 1; - Result := FRowCount; -end; - -function TCustomdxSpreadSheetReportLink.GetCellSides(ACol, ARow: Integer): TdxCellSides; - - function AreNeigborhoodsTransparent(ASide: TdxCellSide): Boolean; - begin - case ASide of - csLeft: - Result := IsNearMostLeftCell(ACol, ARow) or - (GetCellTransparent(ACol - 1, ARow) and GetCellTransparent(ACol, ARow)); - csTop: - Result := IsNearMostTopCell(ACol, ARow) or - (GetCellTransparent(ACol, ARow - 1) and GetCellTransparent(ACol, ARow)); - csRight: - Result := ((ACol = GetColCount - 1) {and not FAppendingExtraColumns}) or - (GetCellTransparent(ACol + 1, ARow) and GetCellTransparent(ACol, ARow)); - else // csBottom - Result := ((ARow = GetRowCount - 1) {and not FAppendingExtraColumns}) or - (GetCellTransparent(ACol, ARow + 1) and GetCellTransparent(ACol, ARow)); - end; - end; - -var - Style: TcxSSCellStyle; - Side: TdxCellSide; - BorderStyle: TcxSSEdgeLineStyle; -begin - if IsFixedCell(ACol, ARow) or IsSuppressSourceFormats then - Result := inherited GetCellSides(ACol, ARow) - else - begin - Result := csAll; - Style := GetSSCellStyle(ACol, ARow); - - for Side := Low(TdxCellSide) to High(TdxCellSide) do - begin - if Style <> nil then - BorderStyle := Style.Borders.Edges[cxSSEdgeBorderMap[Side]].Style - else - BorderStyle := lsDefault; - - if (BorderStyle in [lsNone, lsDefault]) and - (not IsShowGridLines or not AreNeigborhoodsTransparent(Side) or - (IsMergedCell(ACol, ARow) and not IsMergedBorder(ACol, ARow, Side))) then - Exclude(Result, Side); - end; - end; -end; - -function TCustomdxSpreadSheetReportLink.GetCellText(ACol, ARow: Integer): string; -begin - if IsFixedCell(ACol, ARow) then - begin - if (ACol = 0) and (ARow <> 0) then - Result := TcxSSUtils.RowNameByIndex(ARow - 1, CustomSpreadSheetBook.R1C1ReferenceStyle); - if (ARow = 0) and (ACol <> 0) then - Result := TcxSSUtils.ColumnNameByIndex(ACol - 1, CustomSpreadSheetBook.R1C1ReferenceStyle); - end - else - if (FProcessingMerges or not IsMergedCell(ACol, ARow)) and not FAppendingExtraColumns then - Result := GetSSCellObject(ACol, ARow).DisplayText - else - Result := ''; -end; - -function TCustomdxSpreadSheetReportLink.GetCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; -begin - if (DrawMode <> gdmBorrowSource) and not IsFixedCell(ACol, ARow) then - Result := taBottom - else - Result := inherited GetCellTextAlignY(ACol, ARow); -end; - -function TCustomdxSpreadSheetReportLink.GetMinRowHeight(DC: HDC; AFont: TFont): Integer; -begin - Result := 1; -end; - -function TCustomdxSpreadSheetReportLink.GetSelectionRect: TRect; -begin - if OnlySelected then - Result := ExposeBookSheet(BookSheet).SelectionRect - else - Result := PrintArea; - OffsetRect(Result, 1, 1); -end; - -function TCustomdxSpreadSheetReportLink.GetSourceCellColor(ACol, ARow: Integer): TColor; -begin - if IsFixedCell(ACol, ARow) then - Result := ColorToRGB(ExposeSpreadSheetBook(CustomSpreadSheetBook).HeaderColor) - else - if GetSourceCellContentPattern(ACol, ARow).InheritsFrom(TdxPSSolidFillPattern) then - Result := GetRealColor(GetSSCellStyle(ACol, ARow).Brush.BackgroundColor, clWindow) - else - Result := GetRealColor(GetSSCellStyle(ACol, ARow).Brush.ForegroundColor, clWindow); -end; - -function TCustomdxSpreadSheetReportLink.GetSourceCellContentBkColor(ACol, ARow: Integer): TColor; -begin - if IsFixedCell(ACol, ARow) then - Result := ColorToRGB(ExposeSpreadSheetBook(CustomSpreadSheetBook).HeaderColor) - else - Result := GetRealColor(GetSSCellStyle(ACol, ARow).Brush.BackgroundColor, clWindow); -end; - -function TCustomdxSpreadSheetReportLink.GetSourceCellContentPattern(ACol, ARow: Integer): TdxPSFillPatternClass; -begin - if IsFixedCell(ACol, ARow) then - Result := TdxPSSolidFillPattern - else - Result := dxPSFillPatternClassMap[GetSSCellStyle(ACol, ARow).Brush.Style]; -end; - -function TCustomdxSpreadSheetReportLink.GetSourceCellEdge3DSoft(ACol, ARow: Integer): Boolean; -begin - Result := True; -end; - -function TCustomdxSpreadSheetReportLink.GetSourceCellEdgeMode(ACol, ARow: Integer): TdxCellEdgeMode; -const - FixedEdgeModes: array[Boolean] of TdxCellEdgeMode = (cem3DEffects, cemPattern); -begin - if IsFixedCell(ACol, ARow) then - Result := FixedEdgeModes[ExposeSpreadSheetBook(CustomSpreadSheetBook).PainterType = ptOfficeXPStyle] - else - Result := cemPattern; -end; - -function TCustomdxSpreadSheetReportLink.GetSourceCellFontIndex(ACol, ARow: Integer): Integer; - - procedure SetupFont(AFontRec: PcxSSFontRec; AFont: TFont); - begin - with AFont do - begin - Name := AFontRec.Name; - Color := GetRealColor(AFontRec.FontColor, Self.Font.Color); - Style := AFontRec.Style; - Charset := AFontRec.Charset; - Size := AFontRec.Size; - end; - - if not dxIsTrueTypeFont(AFont) then AFont.Name := Self.Font.Name; - end; - -begin - if not IsFixedCell(ACol, ARow) then - begin - SetupFont(ExposeStyle(GetSSCellStyle(ACol, ARow)).StylePtr^.FontPtr, FTempFont); - Result := AddFontToPool(FTempFont); - end - else - Result := FSourceHeaderFontIndex; -end; - -function TCustomdxSpreadSheetReportLink.GetSourceCellMultiline(ACol, ARow: Integer): Boolean; -begin - Result := not IsFixedCell(ACol, ARow) and GetSSCellStyle(ACol, ARow).WordBreak; -end; - -function TCustomdxSpreadSheetReportLink.GetSourceCellTextAlignX(ACol, ARow: Integer): TcxTextAlignX; -begin - if IsFixedCell(ACol, ARow) then - Result := taCenterX - else - Result := dxPSTextAlignXMap[GetSSCellObject(ACol, ARow).DisplayTextAlignment]; -end; - -function TCustomdxSpreadSheetReportLink.GetSourceCellTextAlignY(ACol, ARow: Integer): TcxTextAlignY; -begin - if IsFixedCell(ACol, ARow) then - Result := taBottom - else - Result := dxPSTextAlignYMap[GetSSCellStyle(ACol, ARow).VertTextAlign]; -end; - -function TCustomdxSpreadSheetReportLink.GetSourceCellTransparent(ACol, ARow: Integer): Boolean; -begin - if not IsFixedCell(ACol, ARow) then - begin - Result := inherited GetSourceCellTransparent(ACol, ARow); - if Result then - Result := (GetSSCellStyle(ACol, ARow).Brush.Style = fsSolid) and (GetSourceCellColor(ACol, ARow) = ColorToRGB(clWindow)); - end - else - Result := FixedTransparent; -end; - -function TCustomdxSpreadSheetReportLink.GetSourceColWidth(ACol: Integer): Integer; -begin - with ExposeSpreadSheetBook(CustomSpreadSheetBook) do - if IsFixedCol(ACol) then - Result := RowHeaderWidth - else - Result := ActiveSheet.Cols.Size[ACol - 1]; - Result := MulDiv(Result, Screen.PixelsPerInch, 96); -end; - -function TCustomdxSpreadSheetReportLink.GetSourceRowHeight(ARow: Integer): Integer; -begin - with ExposeSpreadSheetBook(CustomSpreadSheetBook) do - if IsFixedRow(ARow) then - Result := ColHeaderHeight - else - begin - Result := ActiveSheet.Rows.Size[ARow - 1]; - Result := MulDiv(Result, 96, Screen.PixelsPerInch); - end; - if Result > 3 then Inc(Result, 3); - Result := MulDiv(Result, Screen.PixelsPerInch, 96); -end; - -function TCustomdxSpreadSheetReportLink.HasSelection: Boolean; -begin - Result := inherited HasSelection or PrintAreaExists; -end; - -function TCustomdxSpreadSheetReportLink.IsDrawBorder: Boolean; -begin - Result := True;//ssovGridLines in OptionsView; -end; - -function TCustomdxSpreadSheetReportLink.IsDrawHorzLines: Boolean; -begin - Result := ssovGridLines in OptionsView; -end; - -function TCustomdxSpreadSheetReportLink.IsDrawVertLines: Boolean; -begin - Result := ssovGridLines in OptionsView; -end; - -function TCustomdxSpreadSheetReportLink.IsProcessedCol(ACol: Integer): Boolean; -begin - Result := inherited IsProcessedCol(ACol); - if Result then - if IsFixedCol(ACol) then - Result := IsShowRowAndColumnHeadings - else - Result := ExposeSpreadSheetBook(CustomSpreadSheetBook).ActiveSheet.Cols.Visible[ACol - 1]; -end; - -function TCustomdxSpreadSheetReportLink.IsProcessedRow(ARow: Integer): Boolean; -begin - Result := inherited IsProcessedRow(ARow); - if Result then - if IsFixedRow(ARow) then - Result := IsShowRowAndColumnHeadings - else - with ExposeSpreadSheetBook(CustomSpreadSheetBook) do - Result := ActiveSheet.Rows.Visible[ARow - 1]; -end; - -procedure TCustomdxSpreadSheetReportLink.AfterConstruct(AReportCells: TdxReportCells); -begin - FColCount := -1; - FRowCount := -1; - FGridAdapter.FReportCells := nil; - DeleteCellObjects; - inherited; -end; - -procedure TCustomdxSpreadSheetReportLink.PrepareConstruct(AReportCells: TdxReportCells); -begin - FExtraColumnCount := 0; - FCellObjects.Count := ColCount * RowCount - 1; - FGridAdapter.FReportCells := AReportCells; - FSourceHeaderFontIndex := AddFontToPool(ExposeSpreadSheetBook(CustomSpreadSheetBook).HeaderFont); - inherited; -end; - -procedure TCustomdxSpreadSheetReportLink.UnprepareConstruct(AReportCells: TdxReportCells); -begin - if not AbortBuilding then - begin - if HasMerges then AddMerges(AReportCells); - CalcTextExtents(FGridAdapter); - if not HasSelection then - AppendAdditionalColumns(FGridAdapter); - DeleteUnneededCellSides(FGridAdapter); - PostProcessItems(FGridAdapter); - FixupRowWidths(FGridAdapter); - end; - inherited; -end; - -procedure TCustomdxSpreadSheetReportLink.AddMerges(AReportCells: TdxReportCells); - - function IntersectRect(R1, R2: TRect): Boolean; - begin - Inc(R1.Right); - Inc(R1.Bottom); - Inc(R2.Right); - Inc(R2.Bottom); - Result := Windows.IntersectRect(R1, R1, R2); - end; - -var - SelRect, R: TRect; - LeftOffset, TopOffset, I, ACol, ARow: Integer; - Overlay, Cell: TdxReportCell; - DataClass: TdxReportCellDataClass; - DataItem: TAbstractdxReportCellData; -begin - FProcessingMerges := True; - try - SelRect := Rect(0, 0, 0, 0); - LeftOffset := 0; - TopOffset := 0; - - if HasSelection then - begin - SelRect := GetSelectionRect; - LeftOffset := GetColumnOffset(SelRect.Left); - TopOffset := GetRowOffset(SelRect.Top); - if IsShowRowAndColumnHeadings then - begin - Dec(LeftOffset, ColumnWidths[0]); - if not HeadersOnEveryPage then Dec(TopOffset, RowHeights[0]); - end; - end - else - if not IsShowRowAndColumnHeadings then - begin - Inc(LeftOffset, ColumnWidths[0]); - Inc(TopOffset, RowHeights[0]); - end - else - if HeadersOnEveryPage then Inc(TopOffset, RowHeights[0]); - - Overlay := AReportCells.AddOverlay; - - for I := 0 to MergedCells.Count - 1 do - begin - R := MergedCells.MergedAsRect[I]; - OffsetRect(R, 1, 1); - - if HasSelection and not IntersectRect(R, SelRect) then - Continue; - - ACol := R.Left; - ARow := R.Top; - - R.Left := GetColumnOffset(R.Left); - R.Top := GetRowOffset(R.Top); - R.Right := GetColumnOffset(R.Right + 1); - R.Bottom := GetRowOffset(R.Bottom + 1); - - OffsetRect(R, -LeftOffset, -TopOffset); - - Cell := TdxReportCell.Create(Overlay); - Cell.BoundsRect := R; - Cell.Transparent := True; - Cell.CellSides := []; - - DataClass := GetDataItemClass(ACol); - if DataClass <> nil then - begin - DataItem := DataClass.Create(Cell); - OffsetRect(R, -R.Left, -R.Top); - DataItem.BoundsRect := R; - AssignData(ACol, ARow, DataItem); - DataItem.CellSides := []; - //DataItem.Transparent := False;//True; - end; - end; - finally - FProcessingMerges := False; - end; -end; - -procedure TCustomdxSpreadSheetReportLink.CheckPrintAreaBounds(var R: TRect); -begin - if not EqualRect(R, dxPSEmptySSPrintArea) then - with R do - begin - if Left < 0 then Left :=0; - if Top < 0 then Top := 0; - if Right < Left then Right := Left; - if Bottom < Top then Bottom := Top; - end; -end; - -function TCustomdxSpreadSheetReportLink.GetColumnOffset(ACol: Integer): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ACol - 1 do - Inc(Result, ColumnWidths[I]); -end; - -function TCustomdxSpreadSheetReportLink.GetRowOffset(ARow: Integer): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ARow - 1 do - Inc(Result, RowHeights[I]); -end; - -function TCustomdxSpreadSheetReportLink.IsMergedBorder(ACol, ARow: Integer; - ASide: TdxCellSide): Boolean; - - function CellInRect(const R: TRect; X, Y: Integer): Boolean; - begin - Result := (X >= R.Left) and (X <= R.Right) and (Y >= R.Top) and (Y <= R.Bottom); - end; - -var - I: Integer; - R: TRect; -begin - Result := IsMergedCell(ACol, ARow); - if Result then - for I := 0 to MergedCells.Count - 1 do - begin - R := MergedCells.MergedAsRect[I]; - OffsetRect(R, 1, 1); - if CellInRect(R, ACol, ARow) then - begin - case ASide of - csLeft: - Result := ACol = R.Left; - csTop: - Result := ARow = R.Top; - csRight: - Result := ACol = R.Right; - csBottom: - Result := ARow = R.Bottom; - end; - if Result then Exit; - end; - //Result := (ACol = R.Left) or (ACol = R.Right) or (ARow = R.Top) or (ARow = R.Bottom); - end; -end; - -function TCustomdxSpreadSheetReportLink.IsMergedCell(ACol, ARow: Integer): Boolean; -begin - Result := not IsFixedCell(ACol, ARow) and ExposeStyle(GetSSCellStyle(ACol, ARow)).Merge; -end; - -function TCustomdxSpreadSheetReportLink.IsNearMostLeftCell(ACol, ARow: Integer): Boolean; -var - R: TRect; -begin - if IsShowRowAndColumnHeadings then - begin - if HasSelection then - begin - R := GetSelectionRect; - Dec(R.Left); - Dec(ACol, R.Left); - end; - Result := ACol = 1 - end - else - Result := False;//ACol = 0; -end; - -function TCustomdxSpreadSheetReportLink.IsNearMostTopCell(ACol, ARow: Integer): Boolean; -var - R: TRect; -begin - if IsShowRowAndColumnHeadings then - begin - if HasSelection then - begin - R := GetSelectionRect; - Dec(R.Top); - Dec(ARow, R.Top); - end; - Result := ARow = 1 - end - else - Result := False;//ARow = 0; -end; - -function TCustomdxSpreadSheetReportLink.IsShowGridLines: Boolean; -begin - Result := ssovGridLines in OptionsView; -end; - -function TCustomdxSpreadSheetReportLink.IsShowRowAndColumnHeadings: Boolean; -begin - Result := ssovRowAndColumnHeadings in OptionsView; -end; - -function TCustomdxSpreadSheetReportLink.IsSuppressSourceFormats: Boolean; -begin - Result := ssovSuppressSourceFormats in OptionsView; -end; - -procedure TCustomdxSpreadSheetReportLink.AppendAdditionalColumns(AnAdapter: TdxPSGridCellsAdapter); - - function DoCalcExtraColumnCount(AnAdapter: TdxPSGridCellsAdapter; - ADefaultColumnWidth: Integer): Integer; - var - Col, Row, Index, CurrentColumnOffset: Integer; - Item: TdxReportCellSSString; - begin - Result := AnAdapter.ColCount; - - for Row := 0 to AnAdapter.RowCount - 1 do - for Col := 0 to AnAdapter.ColCount - 1 do - begin - Item := AnAdapter[Col, Row]; - if Item.TextExtentRight <> 0 then - begin - Index := Col; - CurrentColumnOffset := AnAdapter.ColOffsets[Index]; - while Item.TextExtentRight > CurrentColumnOffset do - begin - Inc(Index); - if Index <= AnAdapter.ColCount then - CurrentColumnOffset := AnAdapter.ColOffsets[Index] - else - Inc(CurrentColumnOffset, ADefaultColumnWidth); - end; - if Index > Result then Result := Index; - end; - end; - Dec(Result, AnAdapter.ColCount); - end; - - function FindNearestVisibleColIndex(AStartIndex: Integer): Integer; - begin - Result := AStartIndex; - with ExposeSpreadSheetBook(CustomSpreadSheetBook).ActiveSheet.Cols do - while not Visible[Result - 1] do - Inc(Result); - end; - - procedure DoAppendExtraColumns(AnAdapter: TdxPSGridCellsAdapter; - AExtraColumnCount, ADefaultColumnWidth: Integer); - var - L, Row, Col, StartRealCol, RealCol: Integer; - Item: TdxReportCellSSString; - Cell: TdxReportCell; - R: TRect; - begin - L := AnAdapter.ColOffsets[AnAdapter.ColCount]; - StartRealCol := AnAdapter.Cells[AnAdapter.ColCount - 1, 0].RealCol; - - for Row := 0 to AnAdapter.RowCount - 1 do - begin - Item := nil; - Cell := AnAdapter.Rows[Row]; - R := Bounds(L, 0, 0, Cell.Height); - RealCol := StartRealCol; - for Col := 0 to AExtraColumnCount - 1 do - begin - R.Left := R.Right; - R.Right := R.Left + ADefaultColumnWidth; - - Item := TdxReportCellSSString.Create(Cell); - Item.BoundsRect := R; - Item.IsVirtual := True; - - RealCol := FindNearestVisibleColIndex(RealCol + 1); - AssignData(RealCol, AnAdapter.RowIndexes[Row], Item); - if Item.IsFixed then - Item.Text := TcxSSUtils.ColumnNameByIndex(RealCol - 1, CustomSpreadSheetBook.R1C1ReferenceStyle); - end; - Cell.Width := Item.BoundsRect.Right; - end; - end; - -var - DefaultColumnWidth: Integer; -begin - FAppendingExtraColumns := True; - try - DefaultColumnWidth := ExposeSpreadSheetBook(CustomSpreadSheetBook).DefaultColWidth; - FExtraColumnCount := DoCalcExtraColumnCount(FGridAdapter, DefaultColumnWidth); - if ExtraColumnCount <> 0 then - DoAppendExtraColumns(FGridAdapter, ExtraColumnCount, DefaultColumnWidth); - finally - FAppendingExtraColumns := False; - end; -end; - -procedure TCustomdxSpreadSheetReportLink.PostProcessItems(AnAdapter: TdxPSGridCellsAdapter); -var - Col, Row: Integer; -begin - for Col := 0 to AnAdapter.ColCount - 1 do - for Row := 0 to AnAdapter.RowCount - 1 do - with AnAdapter.Cells[Col, Row] do - if not IsFixed and not IsVirtual then - begin - CalcBorderSubs(AnAdapter); - CalcDoubleBorderSlants(AnAdapter); - end; -end; - -procedure TCustomdxSpreadSheetReportLink.CalcTextExtents(AnAdapter: TdxPSGridCellsAdapter); - - function NeedCalcItemTextExtents(AItem: TdxReportCellSSString): Boolean; - begin - with AItem do - Result := not IsMerged and not IsFixed and not Multiline and not Fill and - (Text <> '') and (TextAlignX in [taLeft, taCenterX, taRight]); - end; - - procedure DoCalcItemTextExtents(AItem: TdxReportCellSSString; Col, Row: Integer); - - function CalcTextRightExtent(ATextWidth, ACol, ARow: Integer): Integer; - var - OriginalColumnOffset, CurrentColumnOffset, EndOfTextOffset, I: Integer; - Item: TdxReportCellSSString; - begin - OriginalColumnOffset := AnAdapter.ColOffsets[ACol]; - EndOfTextOffset := OriginalColumnOffset + ATextWidth; - Result := 0; - - CurrentColumnOffset := AnAdapter.ColOffsets[ACol + 1]; - - for I := ACol + 1 to AnAdapter.ColCount do - begin - CurrentColumnOffset := AnAdapter.ColOffsets[I]; - if CurrentColumnOffset > EndOfTextOffset then - Break; - - if I < AnAdapter.ColCount then - Item := AnAdapter[I, ARow] - else - Item := nil; - - if (Item <> nil) and (Item.IsMerged or (Item.Text <> '')) then - begin - Result := CurrentColumnOffset; - Break; - end - end; - - if Result = 0 then - begin - Result := EndOfTextOffset; - if (Result > CurrentColumnOffset) and HasSelection then - Result := CurrentColumnOffset + dxTextSpace; - if Result < AnAdapter.ColOffsets[ACol + 1] then Result := 0; - end; - end; - - function CalcTextLeftExtent(ATextWidth, ACol, ARow: Integer): Integer; - var - TextLeftEdge, I, CurrentColumnOffset: Integer; - Item: TdxReportCellSSString; - begin - TextLeftEdge := AnAdapter.ColOffsets[ACol + 1] - ATextWidth; - if TextLeftEdge < 0 then TextLeftEdge := 0; - - Result := 0; - - for I := ACol downto 0 do - begin - if I > 0 then - Item := AnAdapter[I - 1, ARow] - else - Item := nil; - CurrentColumnOffset := AnAdapter.ColOffsets[I]; - if CurrentColumnOffset < TextLeftEdge then - Break; - if (Item = nil) or Item.IsFixed or Item.IsMerged or (Item.Text <> '') then - begin - Result := CurrentColumnOffset; - Break; - end - end; - - if Result = 0 then - begin - Result := TextLeftEdge; - if Result > AnAdapter.ColOffsets[ACol] then Result := 0; - end; - end; - - var - TextWidth: Integer; - begin - TextWidth := GetTextWidth(ScreenDC, AItem.Font.Handle, AItem.Text); - - case AItem.TextAlignX of - taLeft: - AItem.TextExtentRight := CalcTextRightExtent(TextWidth + 3 * dxTextSpace, Col, Row); - taCenterX: - begin - Dec(TextWidth, (TextWidth - AItem.Width) div 2); - AItem.TextExtentRight := CalcTextRightExtent(TextWidth + 1 * dxTextSpace, Col, Row); - AItem.TextExtentLeft := CalcTextLeftExtent(TextWidth + 1 * dxTextSpace, Col, Row); - end; - taRight: - AItem.TextExtentLeft := CalcTextLeftExtent(TextWidth + 3 * dxTextSpace, Col, Row); - end; - end; - -var - Font: HFONT; - Col, Row: Integer; - Item: TdxReportCellSSString; -begin - Font := GetCurrentObject(ScreenDC, OBJ_FONT); - for Col := 0 to AnAdapter.ColCount - 1 do - for Row := 0 to AnAdapter.RowCount - 1 do - begin - Item := AnAdapter[Col, Row]; - if NeedCalcItemTextExtents(Item) then DoCalcItemTextExtents(Item, Col, Row); - end; - SelectObject(ScreenDC, Font); -end; - -procedure TCustomdxSpreadSheetReportLink.DeleteCellObjects; -var - I: Integer; -begin - for I := 0 to FCellObjects.Count - 1 do - TObject(FCellObjects[I]).Free; - FCellObjects.Clear; -end; - -procedure TCustomdxSpreadSheetReportLink.DeleteUnneededCellSides(AnAdapter: TdxPSGridCellsAdapter); - - procedure DoDeleteUnneededCellSidesFromRightSide(AItem: TdxReportCellSSString; ACol: Integer); - var - TextRightExtent, Col, CurrentColumnOffset: Integer; - begin - TextRightExtent := AItem.TextExtentRight; - for Col := ACol + 1 to AnAdapter.ColCount - 1 do - begin - CurrentColumnOffset := AnAdapter.ColOffsets[Col]; - if CurrentColumnOffset < TextRightExtent then - begin - AItem.CellSides := AItem.CellSides - [csRight]; - AItem := TdxReportCellSSString(AItem.GetNextSibling); - if AItem = nil then - Break; - AItem.CellSides := AItem.CellSides - [csLeft]; - end; - end; - end; - - procedure DoDeleteUnneededCellSidesFromLeftSide(AItem: TdxReportCellSSString; ACol: Integer); - var - TextLeftExtent, Col, CurrentColumnOffset: Integer; - begin - TextLeftExtent := AItem.TextExtentLeft; - for Col := ACol downto 0 do - begin - CurrentColumnOffset := AnAdapter.ColOffsets[Col]; - if CurrentColumnOffset > TextLeftExtent then - begin - AItem.CellSides := AItem.CellSides - [csLeft]; - AItem := TdxReportCellSSString(AItem.GetPrevSibling); - if (AItem = nil) or AItem.IsFixed then - Break; - AItem.CellSides := AItem.CellSides - [csRight]; - end; - end; - end; - -var - Col, Row: Integer; - Item: TdxReportCellSSString; -begin - for Row := 0 to AnAdapter.RowCount - 1 do - for Col := 0 to AnAdapter.ColCount - 1 do - begin - Item := AnAdapter[Col, Row]; - if Item.TextExtentRight <> 0 then - DoDeleteUnneededCellSidesFromRightSide(Item, Col); - if Item.TextExtentLeft <> 0 then - DoDeleteUnneededCellSidesFromLeftSide(Item, Col); - end; -end; - -procedure TCustomdxSpreadSheetReportLink.FixupRowWidths(AnAdapter: TdxPSGridCellsAdapter); -var - MaxWidth, I: Integer; -begin - with AnAdapter do - begin - MaxWidth := 0; - for I := 0 to ColCount - 1 do - Inc(MaxWidth, ColWidths[I]); - - for I := 0 to RowCount - 1 do - Rows[I].Width := MaxWidth; - end; -end; - -function TCustomdxSpreadSheetReportLink.HasMerges: Boolean; -begin - Result := MergedCells.Count <> 0; -end; - -function TCustomdxSpreadSheetReportLink.IsEmptyCell(const ACell: TcxSSCellRec): Boolean; -var - DefaultStyle: TcxSSCellStyleRec; -begin - DefaultStyle := ExposeDataStorage(GetSSDataStorage).DefaultCellRec.StylePtr^; - Result := IsCellDataEmpty(ACell) and AreStylesEqual(DefaultStyle, ACell.StylePtr^); -end; - -function TCustomdxSpreadSheetReportLink.OnlyEdgeIsAssigned(const ACell: TcxSSCellRec; - AEdge: TcxSSEdgeBorder): Boolean; -var - DefaultStyle: TcxSSCellStyleRec; -begin - DefaultStyle := ExposeDataStorage(GetSSDataStorage).DefaultCellRec.StylePtr^; - Result := IsCellDataEmpty(ACell) and AreStylesEqual(DefaultStyle, ACell.StylePtr^, [AEdge]); -end; - -function TCustomdxSpreadSheetReportLink.OnlyLeftEdgeIsAssigned(ACell: TcxSSCellRec): Boolean; -begin - Result := OnlyEdgeIsAssigned(ACell, eLeft); -end; - -function TCustomdxSpreadSheetReportLink.OnlyTopEdgeIsAssigned(ACell: TcxSSCellRec): Boolean; -begin - Result := OnlyEdgeIsAssigned(ACell, eTop); -end; - -procedure TCustomdxSpreadSheetReportLink.SetupCellBorders(ACol, ARow: Integer; - ADataItem: TAbstractdxReportCellData); -var - DefaultAutoColor, DefaultColor: TColor; - Style: TcxSSCellStyle; - Side: TdxCellSide; - Border: TdxPSCellBorder; -begin - if not IsFixedCell(ACol, ARow) then - begin - DefaultAutoColor := ColorToRGB(clWindowText); - DefaultColor := ColorToRGB(ExposeSpreadSheetBook(CustomSpreadSheetBook).GridColor); - - if IsSuppressSourceFormats then - Style := nil - else - Style := GetSSCellStyle(ACol, ARow); - - for Side := csLeft to csBottom do - if Side in ADataItem.CellSides then - begin - if Style <> nil then - begin - with Style.Borders.Edges[cxSSEdgeBorderMap[Side]] do - begin - Border.Pattern := dxPSEdgePatternClassMap[Style]; - if Style = lsDefault then - Border.Color := GetRealColor(Color, DefaultColor) - else - Border.Color := GetRealColor(Color, DefaultAutoColor); - end; - if IsSSDefaultStyle(Style) then - Border.Color := GetRealColor(GetSSDefaultCellSideColor(Side), DefaultColor); - end - else - if not IsMergedCell(ACol, ARow) then - begin - Border.Color := GetRealColor(GetSSDefaultCellSideColor(Side), ColorToRGB(GridLineColor)); - Border.Pattern := TdxPSSolidEdgePattern; - end - else - Border.Pattern := nil; - - TdxReportCellSSString(ADataItem).Borders[Side] := Border; - end; - end -end; - -function TCustomdxSpreadSheetReportLink.GetBookSheet: TcxSSBookSheet; -begin - if CustomSpreadSheetBook = nil then - Result := nil - else - Result := ExposeSpreadSheetBook(CustomSpreadSheetBook).ActiveSheet; -end; - -function TCustomdxSpreadSheetReportLink.GetCustomSpreadSheetBook: TcxCustomSpreadSheetBook; -begin - Result := TcxCustomSpreadSheetBook(Component); -end; - -function TCustomdxSpreadSheetReportLink.GetMeaningColCount: Integer; -var - Storage: TcxSSDataStorageAccess; - Col, Row, CandidateCol: Integer; - Cell: TcxSSCellRec; - R: TRect; -begin - Result := -1; - CandidateCol := 0; - Storage := ExposeDataStorage(GetSSDataStorage); - for Row := 0 to Storage.Capacity.cY - 1 do - begin - for Col := Storage.Capacity.cX - 1 downto 0 do - begin - Cell := Storage.Cells[Col, Row]; - if not IsEmptyCell(Cell) then - begin - CandidateCol := Col; - if (CandidateCol > 0) and OnlyLeftEdgeIsAssigned(Cell) then Dec(CandidateCol); - Break; - end; - end; - if CandidateCol > Result then Result := CandidateCol; - end; - - for Col := 0 to MergedCells.Count - 1 do - begin - R := Storage.MergedCells.MergedAsRect[Col]; - if R.Right > Result then Result := R.Right; - end; - - if Result > -1 then Inc(Result); -end; - -function TCustomdxSpreadSheetReportLink.GetMeaningRowCount: Integer; -var - Storage: TcxSSDataStorageAccess; - CandidateRow, Col, Row: Integer; - Cell: TcxSSCellRec; - IsBreaked: Boolean; - R: TRect; -begin - Storage := ExposeDataStorage(GetSSDataStorage); - CandidateRow := -1; - - for Row := Storage.Capacity.cY - 1 downto 0 do - begin - IsBreaked := False; - for Col := 0 to Storage.Capacity.cX - 1 do - begin - Cell := Storage.Cells[Col, Row]; - if not IsEmptyCell(Cell) then - begin - CandidateRow := Row; - if (CandidateRow = 0) or not OnlyTopEdgeIsAssigned(Cell) then - begin - IsBreaked := True; - Break; - end; - end; - end; - if CandidateRow <> -1 then - begin - if not IsBreaked then Dec(CandidateRow); - Break; - end; - end; - Result := CandidateRow; - - for Col := 0 to Storage.MergedCells.Count - 1 do - begin - R := Storage.MergedCells.MergedAsRect[Col]; - if R.Bottom > Result then Result := R.Bottom; - end; - Result := Min(Result, Storage.MaxRow + 1); - if Result > -1 then Inc(Result); -end; - -function TCustomdxSpreadSheetReportLink.GetMergedCells: TcxSSMergedCellsStorage; -begin - Result := ExposeDataStorage(ExposeBookSheet(BookSheet).DataStorage).MergedCells; -end; - -procedure TCustomdxSpreadSheetReportLink.SetOptionsView(Value: TdxPSSpreadSheetReportLinkOptionsView); -begin - if FOptionsView <> Value then - begin - FOptionsView := Value; - if ssovSuppressSourceFormats in FOptionsView then - DrawMode := gdmStrict - else - DrawMode := gdmBorrowSource; - LinkModified(True); - end; -end; - -procedure TCustomdxSpreadSheetReportLink.SetPrintArea(Value: TRect); -begin - CheckPrintAreaBounds(Value); - if not EqualRect(Value, FPrintArea) then - begin - FPrintArea := Value; - LinkModified(True); - end; -end; - -function TCustomdxSpreadSheetReportLink.GetSSCellObject(ACol, ARow: Integer): TcxSSCellObject; -var - Index: Integer; -begin - Index := GetFlatIndex(ACol - 1, ARow - 1); - if Index > FCellObjects.Count - 1 then // ExtraColumns - Result := nil - else - Result := FCellObjects.List^[Index]; - - if Result = nil then - begin - Result := ExposeActiveSpreadSheet(CustomSpreadSheetBook).GetCellObject(ACol - 1, ARow - 1); - if Index > FCellObjects.Count - 1 then - FCellObjects.Count := Index + 1; - FCellObjects.List^[Index] := Result; - end; -end; - -function TCustomdxSpreadSheetReportLink.GetSSCellStyle(ACol, ARow: Integer): TcxSSCellStyle; -var - CellObject: TcxSSCellObject; -begin - if not FAppendingExtraColumns then - begin - CellObject := GetSSCellObject(ACol, ARow); - if (CellObject <> nil) and CellObject.StyleExist then - Result := CellObject.Style - else - Result := GetSSDefaultStyle; - end - else - Result := GetSSDefaultStyle; -end; - -function TCustomdxSpreadSheetReportLink.GetSSColorPalette: PcxExcelPalette; -begin - Result := ExposeSpreadSheetBook(CustomSpreadSheetBook).Palette; -end; - -function TCustomdxSpreadSheetReportLink.GetSSDataStorage: TcxSSDataStorage; -begin - Result := ExposeBookSheet(BookSheet).DataStorage; -end; - -function TCustomdxSpreadSheetReportLink.GetSSDefaultCellSideColor(ASide: TdxCellSide): TColor; -begin - with ExposeSpreadSheetBook(CustomSpreadSheetBook), DefaultStyle.Borders do - if ASide in csLeftRight then - if VerticalBorders.Style <> lsDefault then - Result := VerticalBorders.Color - else - Result := ColorToRGB(GridColor) - else - if HorizontalBorders.Style <> lsDefault then - Result := HorizontalBorders.Color - else - Result := ColorToRGB(GridColor); -end; - -function TCustomdxSpreadSheetReportLink.GetSSDefaultStyle: TcxSSCellStyle; -begin - Result := ExposeSpreadSheetBook(CustomSpreadSheetBook).StyleCache.DefaultStyle; -end; - -function TCustomdxSpreadSheetReportLink.GetFlatIndex(ACol, ARow: Integer): Integer; -begin - Result := ARow * (ColCount - 1) + ACol; -end; - -function TCustomdxSpreadSheetReportLink.GetRealColor(AColorIndex: Integer; ADefaultColor: TColor): TColor; -begin - if AColorIndex > SystemColorStart then - Result := ADefaultColor - else - Result := GetSSColorPalette^[AColorIndex]; - Result := ColorToRGB(Result); -end; - -function TCustomdxSpreadSheetReportLink.IsSSDefaultStyle(AStyle: TcxSSCellStyle): Boolean; -begin - Result := AStyle = GetSSDefaultStyle; -end; - -{ TdxSpreadSheetBookReportLink } - -function TdxSpreadSheetBookReportLink.GetSpreadSheetBook: TcxSpreadSheetBook; -begin - Result := TcxSpreadSheetBook(Component); -end; - -{ TdxSpreadSheetReportLink } - -function TdxSpreadSheetReportLink.GetSpreadSheet: TcxSpreadSheet; -begin - Result := TcxSpreadSheet(Component); -end; - -{ TfmdxSpreadSheetDesignWindow } - -constructor TfmdxSpreadSheetDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhccxSpreadSheetReportLinkDesigner; - inherited; - CreateControls; - pgctrlMain.ActivePage := pgctrlMain.Pages[0]; -end; - -procedure TfmdxSpreadSheetDesignWindow.DoInitialize; -begin - inherited; - chbxShowRowAndColumnHeadings.Checked := ssovRowAndColumnHeadings in ReportLink.OptionsView; - chbxShowGridLines.Checked := ssovGridLines in ReportLink.OptionsView; - -// chbxAutoWidth.Checked := ReportLink.AutoWidth; - chbxRowAutoHeight.Checked := ReportLink.RowAutoHeight; - chbxSuppressSourceFormats.Checked := ssovSuppressSourceFormats in ReportLink.OptionsView; - - chbxTransparent.Checked := ReportLink.Transparent; - TdxPSColorCombo(FccbxColor).ColorValue := ReportLink.Color; - chbxFixedTransparent.Checked := ReportLink.FixedTransparent; - TdxPSColorCombo(FccbxFixedColor).ColorValue := ReportLink.FixedColor; - TdxPSColorCombo(FccbxGridLineColor).ColorValue := ReportLink.GridLineColor; - - FontInfoToText(ReportLink.Font, edFont); - FontInfoToText(ReportLink.FixedFont, edFixedFont); - - chbxFixedRowsOnEveryPage.Checked := ReportLink.HeadersOnEveryPage; - chbxOnlySelected.Checked := ReportLink.OnlySelected; -end; - -{$IFDEF DELPHI7} -function TfmdxSpreadSheetDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TfmdxSpreadSheetDesignWindow.LoadStrings; -begin - inherited; - - tshOptions.Caption := cxGetResourceString(@sdxOptions); - tshFont.Caption := cxGetResourceString(@sdxFonts); - tshColor.Caption := cxGetResourceString(@sdxColors); - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviors); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblShow.Caption := cxGetResourceString(@sdxShow); - chbxShowRowAndColumnHeadings.Caption := cxGetResourceString(@sdxShowRowAndColumnHeadings); - chbxShowGridLines.Caption := cxGetResourceString(@sdxShowGridLines); - - lblMiscellaneous.Caption := cxGetResourceString(@sdxMiscellaneous); - //chbxAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - chbxRowAutoHeight.Caption := cxGetResourceString(@sdxRowAutoHeight); - chbxSuppressSourceFormats.Caption := cxGetResourceString(@sdxSuppressSourceFormats); - - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - stFixedTransparent.Caption := ' ' + cxGetResourceString(@sdxFixedTransparent) + ' '; - lblFixedColor.Caption := cxGetResourceString(@sdxFixedColor); - lblGridLinesColor.Caption := cxGetResourceString(@sdxGridLinesColor); - - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - btnFixedFont.Caption := cxGetResourceString(@sdxBtnFixedFont); - - lblOnEveryPage.Caption := cxGetResourceString(@sdxOnEveryPage); - chbxFixedRowsOnEveryPage.Caption := cxGetResourceString(@sdxRepeatHeaderRowAtTop); - - lblSelection.Caption := cxGetResourceString(@sdxSelection); - chbxOnlySelected.Caption := cxGetResourceString(@sdxOnlySelected); -end; - -procedure TfmdxSpreadSheetDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -begin - inherited; - dxPSBaseGridLnk.dxPSDrawGridPreview(ACanvas, R, ReportLink, - ReportLink.IsShowRowAndColumnHeadings, ReportLink.IsShowRowAndColumnHeadings); -end; - -procedure TfmdxSpreadSheetDesignWindow.UpdateControlsState; -begin - inherited; - FccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := FccbxColor.Enabled; - FccbxFixedColor.Enabled := not chbxFixedTransparent.Checked; - lblFixedColor.Enabled := FccbxFixedColor.Enabled; - chbxFixedRowsOnEveryPage.Enabled := not ReportLink.IsAggregated; -end; - -procedure TfmdxSpreadSheetDesignWindow.UpdatePreview; -begin - FPreviewBox.Invalidate; -end; - -function TfmdxSpreadSheetDesignWindow.GetReportLink: TCustomdxSpreadSheetReportLink; -begin - Result := inherited ReportLink as TCustomdxSpreadSheetReportLink; -end; - -procedure TfmdxSpreadSheetDesignWindow.SetReportLink(Value: TCustomdxSpreadSheetReportLink); -begin - inherited ReportLink := Value; -end; - -procedure TfmdxSpreadSheetDesignWindow.CreateControls; - - function CreateColorCombo(AHost: TBevel; ALabel: TLabel; ATag: Integer; AnAutoColor: TColor): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with Result do - begin - BoundsRect := AHost.BoundsRect; - Tag := ATag; - Parent := AHost.Parent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AnAutoColor; - OnChange := ccbxColorChange; - end; - ALabel.FocusControl := Result; - end; - - function CreatePreviewBox(AParent: TWinControl) : TdxPSPaintPanel; - begin - Result := TdxPSPaintPanel.Create(Self); - with Result do - begin - Parent := AParent; - Align := alClient; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := pbxPreviewPaint; - end; - end; - -begin - FccbxColor := CreateColorCombo(bvlColorHolder, lblColor, 0, dxDefaultColor); - FccbxFixedColor := CreateColorCombo(bvlFixedColorHolder, lblFixedColor, 1, dxDefaultFixedColor); - FccbxGridLineColor := CreateColorCombo(bvlLineColorHolder, lblGridLinesColor, 2, dxDefaultGridLineColor); - - FPreviewBox := CreatePreviewBox(pnlPreview); -end; - -procedure TfmdxSpreadSheetDesignWindow.CMDialogChar(var Message: TCMDialogChar); -var - I: Integer; -begin - inherited; - with pgctrlMain do - for I := 0 to PageCount - 1 do - if IsAccel(Message.CharCode, Pages[I].Caption) then - begin - Message.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TfmdxSpreadSheetDesignWindow.pbxPreviewPaint(Sender: TObject); -begin - with TdxPSPaintPanel(Sender) do - PaintPreview(Canvas, ClientRect); -end; - -procedure TfmdxSpreadSheetDesignWindow.chbxFixedRowsOnEveryPageClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.HeadersOnEveryPage := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TfmdxSpreadSheetDesignWindow.chbxOnlySelectedClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OnlySelected := TCheckBox(Sender).checked; - Modified := True; -end; - -procedure TfmdxSpreadSheetDesignWindow.ccbxColorChange(Sender: TObject); -var - Color: TColor; -begin - if LockControlsUpdate then Exit; - Color := TdxPSColorCombo(Sender).ColorValue; - case TdxPSColorCombo(Sender).Tag of - 0: ReportLink.Color := Color; - 1: ReportLink.FixedColor := Color; - 2: ReportLink.GridLineColor := Color; - end; - Modified := True; - UpdatePreview; -end; - -procedure TfmdxSpreadSheetDesignWindow.btnFixedFontClick(Sender: TObject); - - function GetEdit: TEdit; - begin - if TButton(Sender).Tag = 0 then - Result := edFont - else - Result := edFixedFont; - end; - -begin - if LockControlsUpdate then Exit; - - with dxPSGlbl.FontDialog do - begin - case TButton(Sender).Tag of - 0: Font := ReportLink.Font; - 1: Font := ReportLink.FixedFont; - end; - - if Execute then - begin - case TButton(Sender).Tag of - 0: ReportLink.Font := Font; - 1: ReportLink.FixedFont := Font; - end; - FontInfoToText(Font, GetEdit); - Modified := True; - UpdatePreview; - end; - end; -end; - -procedure TfmdxSpreadSheetDesignWindow.chbxRowAutoHeightClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.RowAutoHeight := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TfmdxSpreadSheetDesignWindow.chbxSuppressSourceFormatsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - with ReportLink do - if TCheckBox(Sender).Checked then - OptionsView := OptionsView + [ssovSuppressSourceFormats] - else - OptionsView := OptionsView - [ssovSuppressSourceFormats]; - Modified := True; - UpdatePreview; -end; - -procedure TfmdxSpreadSheetDesignWindow.chbxShowRowAndColumnHeadingsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - with ReportLink do - if TCheckBox(Sender).Checked then - OptionsView := OptionsView + [ssovRowAndColumnHeadings] - else - OptionsView := OptionsView - [ssovRowAndColumnHeadings]; - Modified := True; - UpdatePreview; -end; - -procedure TfmdxSpreadSheetDesignWindow.chbxShowGridLinesClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - with ReportLink do - if TCheckBox(Sender).Checked then - OptionsView := OptionsView + [ssovGridLines] - else - OptionsView := OptionsView - [ssovGridLines]; - Modified := True; - UpdatePreview; -end; - -procedure TfmdxSpreadSheetDesignWindow.chbxFixedTransparentClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - case TCheckBox(Sender).Tag of - 0: ReportLink.Transparent := TCheckBox(Sender).checked; - 1: ReportLink.FixedTransparent := TCheckBox(Sender).checked; - end; - Modified := True; - UpdatePreview; -end; - -procedure TfmdxSpreadSheetDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TfmdxSpreadSheetDesignWindow.stFixedTransparentClick(Sender: TObject); -begin - if chbxFixedTransparent.CanFocus then ActiveControl := chbxFixedTransparent; - chbxFixedTransparent.Checked := not chbxFixedTransparent.Checked; -end; - -procedure TfmdxSpreadSheetDesignWindow.lblColorClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TCustomComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TfmdxSpreadSheetDesignWindow.pgctrlMainChange(Sender: TObject); -begin - lblPreview.Parent := TPageControl(Sender).ActivePage; -end; - -procedure RegisterItems; -begin - TdxReportCellSSString.Register; -end; - -procedure UnregisterItems; -begin - TdxReportCellSSString.Unregister; -end; - -procedure RegisterAssistants; -begin - TdxPSSSStringGridCellDataMap.Register; -end; - -procedure UnregisterAssistants; -begin - TdxPSSSStringGridCellDataMap.Unregister; -end; - -initialization - RegisterAssistants; - RegisterItems; - - dxPSRegisterReportLink(TdxSpreadSheetBookReportLink, TcxSpreadSheetBook, TfmdxSpreadSheetDesignWindow); - dxPSRegisterReportLink(TdxSpreadSheetReportLink, TcxSpreadSheet, TfmdxSpreadSheetDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxSpreadSheetReportLink, TcxSpreadSheet, TfmdxSpreadSheetDesignWindow); - dxPSUnregisterReportLink(TdxSpreadSheetBookReportLink, TcxSpreadSheetBook, TfmdxSpreadSheetDesignWindow); - - UnregisterItems; - UnregisterAssistants; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxSSLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxSSLnkReg.pas deleted file mode 100644 index b47bdd9e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxSSLnkReg.pas +++ /dev/null @@ -1,60 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxSSLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI9} - DesignIntf, -{$ENDIF} - Classes, dxPScxSSLnk; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TdxSpreadSheetBookReportLink, TdxSpreadSheetReportLink]); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler2Lnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler2Lnk.dfm deleted file mode 100644 index 611ba107..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler2Lnk.dfm +++ /dev/null @@ -1,1630 +0,0 @@ -object cxfmSchedulerReportLinkDesignWindow: TcxfmSchedulerReportLinkDesignWindow - Left = 296 - Top = 90 - BorderStyle = bsDialog - Caption = 'cxfmSchedulerReportLinkDesignWindow' - ClientHeight = 446 - ClientWidth = 618 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 610 - Height = 404 - ActivePage = tshPrintStyles - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - OnChange = PageControl1Change - object tshPrintRange: TTabSheet - Caption = 'Print Range' - ImageIndex = 3 - object lblPrintRangeStart: TLabel - Left = 17 - Top = 22 - Width = 28 - Height = 13 - Caption = '&Start:' - end - object lblPrintRangeEnd: TLabel - Left = 18 - Top = 54 - Width = 22 - Height = 13 - Caption = '&End:' - end - object lblPrintRangesMiscellaneous: TLabel - Left = 5 - Top = 91 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - Visible = False - end - object Bevel1: TBevel - Left = 80 - Top = 95 - Width = 231 - Height = 4 - Shape = bsBottomLine - Visible = False - end - object dePrintRangeStart: TcxDateEdit - Left = 70 - Top = 18 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeStartEditValueChanged - TabOrder = 0 - Width = 235 - end - object dePrintRangeEnd: TcxDateEdit - Left = 70 - Top = 50 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeEndEditValueChanged - TabOrder = 1 - Width = 235 - end - object chbxHideDetailsOfPrivateAppointments: TcxCheckBox - Left = 66 - Top = 113 - Caption = 'Hide Details of Private Appointments' - TabOrder = 2 - Visible = False - Width = 236 - end - end - object tshPrintStyles: TTabSheet - Caption = 'Print Styles' - object lblPrintStylesOptions: TLabel - Left = 5 - Top = 48 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPrintStyleOptions: TBevel - Left = 50 - Top = 52 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewWindow: TStaticText - Left = 324 - Top = 0 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 0 - end - object cbxPrintStyles: TcxImageComboBox - Left = 6 - Top = 7 - Properties.Alignment.Vert = taVCenter - Properties.Items = <> - TabOrder = 1 - OnClick = cbxPrintStylesClick - Width = 303 - end - object pcPrintStyleOptions: TPageControl - Left = 4 - Top = 62 - Width = 314 - Height = 313 - ActivePage = tshYearly - Style = tsButtons - TabOrder = 2 - TabStop = False - object tshDaily: TTabSheet - Caption = 'Daily' - TabVisible = False - object lblPrintStyleDailyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleDailyLayout - end - object lblPrintStyleDailyInclude: TLabel - Left = 14 - Top = 64 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleDailyPrintFrom: TLabel - Left = 14 - Top = 136 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleDailyPrintFrom - end - object lblPrintStyleDailyPrintTo: TLabel - Left = 14 - Top = 165 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleDailyPrintTo - end - object lblPrintStyleDailyResourceCountPerPage: TLabel - Left = 14 - Top = 34 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleDailyResourceCountPerPage - end - object Bevel2: TBevel - Left = 0 - Top = 192 - Width = 306 - Height = 4 - Shape = bsBottomLine - end - object cbxPrintStyleDailyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 0 - OnClick = cbxPrintStyleDailyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleDailyTaskPad: TcxCheckBox - Left = 111 - Top = 61 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleDailyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 82 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleDailyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 103 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object tePrintStyleDailyPrintFrom: TcxTimeEdit - Left = 114 - Top = 132 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 5 - Width = 100 - end - object tePrintStyleDailyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 161 - EditValue = 0.000000000000000000 - Properties.ImmediatePost = True - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 6 - Width = 100 - end - object sePrintStyleDailyResourceCountPerPage: TcxSpinEdit - Left = 115 - Top = 30 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - Width = 100 - end - object chbxPrintStyleDailyShowResourceImages: TcxCheckBox - Left = -1 - Top = 201 - Caption = 'Show resource images' - TabOrder = 7 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - object chbxPrintStyleDailyShowEventImages: TcxCheckBox - Left = -1 - Top = 222 - Caption = 'Show event images' - TabOrder = 8 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - end - object tshWeekly: TTabSheet - Caption = 'Weekly' - ImageIndex = 1 - TabVisible = False - object lblPrintStyleWeeklyPrintTo: TLabel - Left = 14 - Top = 212 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleWeeklyPrintTo - end - object lblPrintStyleWeeklyPrintFrom: TLabel - Left = 14 - Top = 183 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleWeeklyPrintFrom - end - object lblPrintStyleWeeklyInclude: TLabel - Left = 14 - Top = 119 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleWeeklyLayout: TLabel - Left = 14 - Top = 33 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleWeeklyLayout - end - object lblPrintStyleWeeklyArrange: TLabel - Left = 14 - Top = 4 - Width = 43 - Height = 13 - Caption = '&Arrange:' - FocusControl = cbxPrintStyleWeeklyArrange - end - object lblPrintStyleWeeklyResourceCountPerPage: TLabel - Left = 14 - Top = 94 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleWeeklyResourceCountPerPage - end - object lblPrintStyleWeeklyDaysLayout: TLabel - Left = 14 - Top = 63 - Width = 61 - Height = 13 - Caption = '&Days layout:' - FocusControl = cbxPrintStyleWeeklyDaysLayout - end - object Bevel3: TBevel - Left = 0 - Top = 237 - Width = 306 - Height = 4 - Shape = bsBottomLine - end - object tePrintStyleWeeklyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 207 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 8 - Width = 100 - end - object tePrintStyleWeeklyPrintFrom: TcxTimeEdit - Left = 114 - Top = 178 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 7 - Width = 100 - end - object chbxPrintStyleWeeklyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 152 - Caption = 'Notes Area (&Lined)' - TabOrder = 6 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleWeeklyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 134 - Caption = 'Notes Area (&Blank)' - TabOrder = 5 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object cbxPrintStyleWeeklyArrange: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Top to Bottom' - 'Left to Right') - TabOrder = 0 - OnClick = cbxPrintStyleWeeklyArrangeClick - Height = 23 - Width = 186 - end - object cbxPrintStyleWeeklyLayout: TcxComboBox - Left = 115 - Top = 29 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 1 - OnClick = cbxPrintStyleWeeklyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleWeeklyTaskPad: TcxCheckBox - Left = 111 - Top = 116 - Caption = 'TaskPad' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleWeeklyDontPrintWeekends: TcxCheckBox - Left = -1 - Top = 243 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 9 - OnClick = chbxPrintStyleWeeklyDontPrintWeekendsClick - Width = 285 - end - object sePrintStyleWeeklyResourceCountPerPage: TcxSpinEdit - Tag = 1 - Left = 115 - Top = 90 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 3 - Width = 100 - end - object cbxPrintStyleWeeklyDaysLayout: TcxComboBox - Left = 115 - Top = 59 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Two columns' - 'One column') - TabOrder = 2 - OnClick = cbxPrintStyleWeeklyDaysLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleWeeklyShowEventImages: TcxCheckBox - Left = -1 - Top = 283 - Caption = 'Show event images' - TabOrder = 11 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - object chbxPrintStyleWeeklyShowResourceImages: TcxCheckBox - Left = -1 - Top = 263 - Caption = 'Show resource images' - TabOrder = 10 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - end - object tshMonthly: TTabSheet - Caption = 'Monthly' - ImageIndex = 2 - TabVisible = False - object lblPrintStyleMonthlyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleMonthlyLayout - end - object lblPrintStyleMonthlyInclude: TLabel - Left = 14 - Top = 62 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleMonthlyResourceCountPerPage: TLabel - Left = 14 - Top = 34 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleMonthlyResourceCountPerPage - end - object Bevel4: TBevel - Left = 0 - Top = 127 - Width = 314 - Height = 4 - Shape = bsBottomLine - end - object cbxPrintStyleMonthlyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/month' - '2 pages/month') - TabOrder = 0 - OnClick = cbxPrintStyleMonthlyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleMonthlyTaskPad: TcxCheckBox - Left = 111 - Top = 59 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 80 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 101 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyDontPrintWeekends: TcxCheckBox - Left = -1 - Top = 136 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 5 - OnClick = chbxPrintStyleMonthlyDontPrintWeekendsClick - Width = 285 - end - object chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage: TcxCheckBox - Left = -1 - Top = 156 - Caption = 'Print Exactly One Month Per Page' - TabOrder = 6 - OnClick = chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick - Width = 285 - end - object sePrintStyleMonthlyResourceCountPerPage: TcxSpinEdit - Tag = 2 - Left = 115 - Top = 29 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - Width = 100 - end - object chbxPrintStyleMonthlyShowEventImages: TcxCheckBox - Left = -1 - Top = 198 - Caption = 'Show event images' - TabOrder = 7 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - object chbxPrintStyleMonthlyShowResourceImages: TcxCheckBox - Left = -1 - Top = 177 - Caption = 'Show resource images' - TabOrder = 8 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - end - object tshTrifold: TTabSheet - Caption = 'Tri-fold' - ImageIndex = 3 - TabVisible = False - object lblPrintStyleTrifoldSectionLeft: TLabel - Left = 14 - Top = 4 - Width = 61 - Height = 13 - Caption = '&Left Section:' - FocusControl = cbxPrintStyleTrifoldSectionLeft - end - object lblPrintStyleTrifoldSectionMiddle: TLabel - Left = 14 - Top = 38 - Width = 72 - Height = 13 - Caption = '&Middle Section:' - FocusControl = cbxPrintStyleTrifoldSectionMiddle - end - object lblPrintStyleTrifoldSectionRight: TLabel - Left = 14 - Top = 71 - Width = 67 - Height = 13 - Caption = '&Right Section:' - FocusControl = cbxPrintStyleTrifoldSectionRight - end - object cbxPrintStyleTrifoldSectionLeft: TcxComboBox - Left = 100 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 0 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - object cbxPrintStyleTrifoldSectionMiddle: TcxComboBox - Tag = 1 - Left = 100 - Top = 33 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 1 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - object cbxPrintStyleTrifoldSectionRight: TcxComboBox - Tag = 2 - Left = 100 - Top = 66 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 2 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - end - object tshDetails: TTabSheet - Caption = 'Details' - ImageIndex = 4 - TabVisible = False - object chbxPrintStyleDetailsUsePagination: TcxCheckBox - Left = 14 - Top = 0 - Caption = 'Start a New Page Each:' - TabOrder = 0 - OnClick = chbxPrintStyleDetailsUsePaginationClick - Width = 187 - end - object cbxPrintStyleDetailsPagination: TcxComboBox - Left = 203 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Day' - 'Week' - 'Month') - TabOrder = 1 - OnClick = cbxPrintStyleDetailsPaginationClick - Height = 23 - Width = 98 - end - end - object tshMemo: TTabSheet - Caption = 'Memo' - ImageIndex = 5 - TabVisible = False - object chbxPrintStyleMemoStartEachItemOnNewPage: TcxCheckBox - Left = 14 - Top = 1 - Caption = 'Start Each Item On New Page' - TabOrder = 0 - OnClick = chbxPrintStyleMemoStartEachItemOnNewPageClick - Width = 187 - end - object chbxPrintStyleMemoPrintOnlySelectedEvents: TcxCheckBox - Left = 14 - Top = 25 - Caption = 'Print Only Selected Events' - State = cbsChecked - TabOrder = 1 - OnClick = chbxPrintStyleMemoPrintOnlySelectedEventsClick - Width = 187 - end - end - object tshYearly: TTabSheet - ImageIndex = 6 - TabVisible = False - object lblPrintStyleYearlyMonthPerPage: TLabel - Left = 14 - Top = 38 - Width = 67 - Height = 13 - Caption = '&Months/Page:' - FocusControl = cbxPrintStyleYearlyMonthPerPage - end - object lblPrintStyleYearlyResourceCountPerPage: TLabel - Left = 14 - Top = 72 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleYearlyResourceCountPerPage - Visible = False - end - object lblPrintStyleYearlyInclude: TLabel - Left = 14 - Top = 102 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleYearlyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleYearlyLayout - end - object Bevel5: TBevel - Left = 0 - Top = 168 - Width = 306 - Height = 4 - Shape = bsBottomLine - end - object cbxPrintStyleYearlyMonthPerPage: TcxComboBox - Left = 115 - Top = 33 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/year' - '2 pages/year' - '3 pages/year' - '4 pages/year' - '6 pages/year' - '12 pages/year') - TabOrder = 1 - Text = '12 pages/year' - OnClick = cbxPrintStyleYearlyMonthPagesPerYearClick - Height = 23 - Width = 186 - end - object sePrintStyleYearlyResourceCountPerPage: TcxSpinEdit - Tag = 3 - Left = 115 - Top = 68 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 2 - Visible = False - Width = 100 - end - object chbxPrintStyleYearlyTaskPad: TcxCheckBox - Left = 111 - Top = 99 - Caption = 'Task&Pad' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleYearlyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 120 - Caption = 'Notes Area (&Blank)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleYearlyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 141 - Caption = 'Notes Area (&Lined)' - TabOrder = 5 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object cbxPrintStyleYearlyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/month' - '2 pages/month') - TabOrder = 0 - Text = '1 page/month' - OnClick = cbxPrintStyleYearlyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrimaryPageHeadersOnly: TcxCheckBox - Left = -1 - Top = 178 - Caption = 'Primary page headers only' - TabOrder = 6 - OnClick = chbxPrimaryPageHeadersOnlyClick - Width = 153 - end - object chbxPrintStyleYearlyShowEventImages: TcxCheckBox - Left = -1 - Top = 199 - Caption = 'Show event images' - TabOrder = 7 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - end - end - object pnlPrintStylesPreview: TPanel - Left = 323 - Top = 17 - Width = 275 - Height = 356 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 3 - object pbxPrintStylesPreview: TPaintBox - Left = 1 - Top = 1 - Width = 273 - Height = 354 - Align = alClient - OnPaint = pbxPrintStylesPreviewPaint - end - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 2 - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF78888877787807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0888877787878888877787807DDDDDDDDDDDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF0DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 75 - Top = 82 - Width = 236 - Height = 4 - Shape = bsBottomLine - end - object imgRefinements: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FAFAFAFAFA788888777CC807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0AFAFAFAFAF78888888888807DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0AFAFAFAFAF7FAFAFAFAFAF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FEFEFEFEFE7EFEFEFEFEFE07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0EFEFEFEFEF7FEFEFEFEFEF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0EFEFEFEFEF7FEFEFEFEFEF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FEFEFEFEFE7EFEFEFEFEFE07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FBFBFBFBFB7BFBFBFBFBFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FBFBFBFBFB7BFBFBFBFBFB07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDDDDDDDDDDD088887778787888887778 - 7807D088888888887888888888880DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TcxComboBox - Left = 90 - Top = 37 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.OnChange = cbxLookAndFeelPropertiesChange - TabOrder = 0 - OnClick = LookAndFeelChange - Height = 23 - Width = 215 - end - object chbxSuppressBackgroundBitmaps: TcxCheckBox - Tag = 1 - Left = 90 - Top = 104 - Caption = 'Suppress Background Textures' - TabOrder = 1 - OnClick = OptionsFormattingClick - Width = 200 - end - object chbxSuppressContentColoration: TcxCheckBox - Tag = 2 - Left = 90 - Top = 130 - Caption = 'Suppress Content Coloration' - TabOrder = 2 - OnClick = OptionsFormattingClick - Width = 200 - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 1 - object bvlStyles: TBevel - Left = 118 - Top = 13 - Width = 193 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 302 - Width = 239 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 298 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 222 - end - object Label1: TLabel - Left = 85 - Top = 140 - Width = 64 - Height = 13 - Caption = '[ Styles Site ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 0 - OnClick = btnStyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = btnStyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 2 - OnClick = btnStyleBackgroundBitmapClick - end - object cbxStyleSheets: TcxComboBox - Left = 6 - Top = 318 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 20 - Properties.OnDrawItem = cbxStyleSheetsPropertiesDrawItem - TabOrder = 3 - OnClick = cbxStyleSheetsClick - OnKeyDown = cbxStyleSheetsKeyDown - Height = 24 - Width = 305 - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 350 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 4 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 84 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 5 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 162 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 6 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 7 - OnClick = btnStylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 240 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 8 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 9 - OnClick = btnStyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 10 - OnClick = btnStyleRestoreDefaultsClick - end - object chbxUseNativeStyles: TcxCheckBox - Left = 3 - Top = 6 - TabOrder = 11 - OnClick = OptionsFormattingClick - Width = 22 - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 46 - Width = 275 - Height = 356 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object Panel1: TPanel - Left = 1 - Top = 1 - Width = 273 - Height = 354 - Align = alClient - Color = clWindow - TabOrder = 0 - object pbPreview: TPaintBox - Left = 1 - Top = 1 - Width = 271 - Height = 352 - Align = alClient - OnPaint = pbPreviewPaint - end - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 6 - Top = 417 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = btnStyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = btnStyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = btnStyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = btnStyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = btnStyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = btnStylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 34 - Top = 417 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxEditStyleController1: TcxEditStyleController - OnStyleChanged = StyleController1StyleChanged - Left = 64 - Top = 416 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler2Lnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler2Lnk.pas deleted file mode 100644 index ff378a06..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler2Lnk.pas +++ /dev/null @@ -1,10726 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxScheduler2Lnk; - -{$I cxVer.Inc} - -interface - -uses - Windows, Classes, SysUtils, Forms, Graphics, Controls, StdCtrls, ExtCtrls, ComCtrls, - ImgList, Menus, cxGraphics, cxClasses, cxControls, cxStyles, cxLookAndFeels, cxLookAndFeelPainters, - cxScheduler, cxEdit, cxContainer, cxTextEdit, cxMaskEdit, cxDropDownEdit, - cxCalendar, cxCheckBox, cxImageComboBox, cxTimeEdit, cxSpinEdit, cxDateUtils, - dxPSCore, dxPSGlbl, dxExtCtrls, dxPScxCommon, dxPrevw, dxPgsdlg, dxPrnPg, cxSchedulerUtils, - cxSchedulerStorage, cxSchedulerCustomControls, cxSchedulerCustomResourceView, - cxSchedulerDayView, cxSchedulerDateNavigator, cxSchedulerWeekView, cxSchedulerTimeGridView, - cxSchedulerYearView, cxGeometry, dxCore, cxDrawTextUtils; - -const - // visual print style indexes - - vspsSchedulerFirst = 0; - - vspsSchedulerControlFirst = vspsSchedulerFirst + 0; - vspsSchedulerContent = vspsSchedulerControlFirst + 0; - vspsSchedulerDayHeader = vspsSchedulerControlFirst + 1; - vspsSchedulerEvent = vspsSchedulerControlFirst + 2; - vspsSchedulerResourceHeader = vspsSchedulerControlFirst + 3; - vspsSchedulerControlLast = vspsSchedulerControlFirst + 3; - - vspsSchedulerViewDayFirst = vspsSchedulerControlLast + 1; - vspsSchedulerTimeRuler = vspsSchedulerViewDayFirst + 0; - vspsSchedulerViewDayLast = vspsSchedulerViewDayFirst + 0; - - vspsSchedulerDateNavigatorFirst = vspsSchedulerViewDayLast + 1; - vspsSchedulerDateNavigatorContent = vspsSchedulerDateNavigatorFirst + 0; - vspsSchedulerDateNavigatorHeader = vspsSchedulerDateNavigatorFirst + 1; - vspsSchedulerDateNavigatorLast = vspsSchedulerDateNavigatorFirst + 1; - - vspsSchedulerNativeFirst = vspsSchedulerDateNavigatorLast + 1; - vspsSchedulerSchedulerHeader = vspsSchedulerNativeFirst + 0; - vspsSchedulerNotesAreaBlank = vspsSchedulerNativeFirst + 1; - vspsSchedulerNotesAreaLined = vspsSchedulerNativeFirst + 2; - vspsSchedulerTaskPad = vspsSchedulerNativeFirst + 3; - vspsSchedulerNativeLast = vspsSchedulerNativeFirst + 3; - - vspsSchedulerLast = vspsSchedulerNativeLast; - - // custom draw ID's - cdidSchedulerFirst = 1; - cdidSchedulerSchedulerHeader = cdidSchedulerFirst + 0; - cdidSchedulerDateNavigatorHeader = cdidSchedulerFirst + 1; - cdidSchedulerDateNavigatorDay = cdidSchedulerFirst + 2; - cdidSchedulerDateNavigatorDayCaption = cdidSchedulerFirst + 3; - cdidSchedulerDateNavigatorWeekNumber = cdidSchedulerFirst + 4; - cdidSchedulerTimeRuler = cdidSchedulerFirst + 5; - cdidSchedulerNotesArea = cdidSchedulerFirst + 6; - cdidSchedulerTaskPad = cdidSchedulerFirst + 7; - cdidSchedulerContent = cdidSchedulerFirst + 8; - cdidSchedulerHeader = cdidSchedulerFirst + 9; - // keep order - cdidSchedulerEventCaption = cdidSchedulerFirst + 10; - cdidSchedulerEventStart = cdidSchedulerFirst + 11; - cdidSchedulerEventFinish = cdidSchedulerFirst + 12; - cdidSchedulerEventIcons = cdidSchedulerFirst + 13; - cdidSchedulerEventMessage = cdidSchedulerFirst + 14; - cdidSchedulerEventTimeLine = cdidSchedulerFirst + 15; - - InterAreaSpace = 5; - NotesAreaWidth = 1 / 3; - SchedulerHeaderMinHeight = 1 / 10; - SchedulerHeaderMaxHeight = 1 / 4; - SchedulerHeaderSmallHeight = 1 / 18; - -type - TcxSchedulerReportItemsType = (srSchedulingArea, srHeader, srDateNavigator, - srNotesBlank, srNotesLined, srTaskPad, srUnknownItem); - TcxSchedulerReportEventPartType = (epCaption, epStart, epFinish, epIcons, - epMessage, epTimeLine); - - TcxfmSchedulerReportLinkDesignWindow = class; - - TcxSchedulerReportLink = class; - TcxCustomSchedulerReportLinkPrintStyle = class; - TcxCustomSchedulerReportLinkPrintStyleClass = class of TcxCustomSchedulerReportLinkPrintStyle; - - TcxSchedulerReportLinkPrintStyles = class; - TcxSchedulerReportPageItemCell = class; - TcxSchedulerReportPageSite = class; - TcxSchedulerReportSchedulingAreaCell = class; - TcxSchedulerReportSchedulerHeaderCell = class; - TcxSchedulerReportDateNavigatorCell = class; - TcxSchedulerReportNotesAreaCell = class; - TcxSchedulerReportTaskPadCell = class; - - TcxSchedulerReportCustomCell = class; - TcxSchedulerReportCustomCellClass = class of TcxSchedulerReportCustomCell; - TcxSchedulerReportCommonCellsProducer = class; - - // for options - TcxCustomSchedulerReportLinkOptions = class; - TcxSchedulerReportDateNavigatorHeader = class; - TcxSchedulerReportDateNavigatorDay = class; - TcxSchedulerReportDateNavigatorDayCaption = class; - TcxSchedulerReportDateNavigatorWeekNumber = class; - TcxSchedulerReportDailyTimeRulerCell = class; - TcxSchedulerReportContentCell = class; - TcxSchedulerReportCustomEventCell = class; - TcxSchedulerReportSchedulerHeaderDataCell = class; - TcxSchedulerReportNotesDataCell = class; - TcxSchedulerReportHeaderItemCell = class; - TcxSchedulerReportDetailsEventCell = class; - TcxSchedulerReportDetailsEventCellClass = class of TcxSchedulerReportDetailsEventCell; - - { TcxCustomSchedulerReportLinkOptions } - - TcxCustomSchedulerReportLinkOptions = class(TdxCustomReportLinkOptions) - private - function GetReportLink: TcxSchedulerReportLink; - function GetScheduler: TcxScheduler; - public - property ReportLink: TcxSchedulerReportLink read GetReportLink; - property Scheduler: TcxScheduler read GetScheduler; - end; - - { TcxSchedulerReportLinkPrintRange } - - TcxSchedulerReportLinkPrintRange = class(TcxCustomSchedulerReportLinkOptions) - private - FDatePrint: array[0..1] of TDate; - FTimePrint: array[0..1] of TTime; - function GetActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetDayCount: Integer; - function GetMonthCount: Integer; - function GetPrintDate(AIndex: Integer): TDate; - function GetPrintTime(AIndex: Integer): TTime; - function GetWeekCount: Integer; - function GetYearCount: Integer; - procedure SetPrintDate(AIndex: Integer; const Value: TDate); - procedure SetPrintTime(AIndex: Integer; const Value: TTime); - - function IsDateStored(AIndex: Integer): Boolean; - function IsTimeStored(AIndex: Integer): Boolean; - protected - procedure CheckTimeRange; virtual; - function GetDateTimeIF(const AValue, ADefaultValue: TDateTime): TDateTime; - - function DesignerTabIndex: Integer; override; - property ActiveStyle: TcxCustomSchedulerReportLinkPrintStyle read GetActiveStyle; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function DefaultDatePrintFrom: TDate; virtual; - function DefaultDatePrintTo: TDate; virtual; - function DefaultTimePrintFrom: TTime; virtual; - function DefaultTimePrintTo: TTime; virtual; - - property DayCount: Integer read GetDayCount; - property MonthCount: Integer read GetMonthCount; - property WeekCount: Integer read GetWeekCount; - property YearCount: Integer read GetYearCount; - published - property PrintFrom: TDate index 0 read GetPrintDate write SetPrintDate stored IsDateStored; - property PrintTo: TDate index 1 read GetPrintDate write SetPrintDate stored IsDateStored; - property TimePrintFrom: TTime index 0 read GetPrintTime write SetPrintTime stored IsTimeStored; - property TimePrintTo: TTime index 1 read GetPrintTime write SetPrintTime stored IsTimeStored; - end; - - { TcxSchedulerReportLinkOptionsFormatting } - - TcxSchedulerReportLinkOptionsFormatting = class(TdxCustomReportLinkOptionsFormatting) - private - FSuppressContentColoration: Boolean; - function GetReportLink: TcxSchedulerReportLink; - procedure SetSuppressContentColoration(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - property ReportLink: TcxSchedulerReportLink read GetReportLink; - published - property SuppressContentColoration: Boolean read FSuppressContentColoration write SetSuppressContentColoration default False; - property UseLookAndFeelColors; - end; - - { TcxSchedulerReportLinkStyles } - - TcxSchedulerReportLinkStyles = class(TdxCustomReportLinkStyles, IcxSchedulerStylesAdapter, IcxSchedulerTimeRulerParams) - private - function GetExtStyles: TcxSchedulerStyles; - function GetReportLink: TcxSchedulerReportLink; - function GetUseSchedulerStyles: Boolean; - protected - FReportLink: TcxSchedulerReportLink; - function DesignerTabIndex: Integer; override; - - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - class function GetStyleCaption(AnIndex: Integer): string; override; - function GetStyleIndexByCaption(const Caption: string): Integer; override; - - // IcxSchedulerStylesAdapter - function GetDayHeaderStyle: TcxStyle; - function GetResourceHeaderStyle: TcxStyle; - - property ExtStyles: TcxSchedulerStyles read GetExtStyles; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - - function GetSchedulerHeaderParams: TcxViewParams; virtual; - function GetContentParams(const ADateTime: TDateTime; - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; overload; virtual; - function GetContentParams(const ADateTime: TDateTime; ALightColor: Boolean; - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; overload; virtual; - function GetDateNavigatorContentParams: TcxViewParams; virtual; - function GetDateNavigatorHeaderParams: TcxViewParams; virtual; - function GetDayHeaderParams(const ADateTime: TDateTime): TcxViewParams; virtual; - function GetEventParams(AEvent: TcxSchedulerEvent): TcxViewParams; virtual; - function GetNotesAreaBlankParams: TcxViewParams; virtual; - function GetNotesAreaLinedParams: TcxViewParams; virtual; - function GetResourceHeaderParams(AResource: TcxSchedulerStorageResourceItem): TcxViewParams; virtual; - function GetTaskPadParams: TcxViewParams; virtual; - function GetTimeRulerParams: TcxViewParams; virtual; - - property UseSchedulerStyles: Boolean read GetUseSchedulerStyles; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - published - property SchedulerHeader: TcxStyle Index vspsSchedulerSchedulerHeader read GetValue write SetValue; - property Content: TcxStyle Index vspsSchedulerContent read GetValue write SetValue; - property DateNavigatorContent: TcxStyle Index vspsSchedulerDateNavigatorContent read GetValue write SetValue; - property DateNavigatorHeader: TcxStyle Index vspsSchedulerDateNavigatorHeader read GetValue write SetValue; - property DayHeader: TcxStyle Index vspsSchedulerDayHeader read GetValue write SetValue; - property Event: TcxStyle Index vspsSchedulerEvent read GetValue write SetValue; - property ResourceHeader: TcxStyle Index vspsSchedulerResourceHeader read GetValue write SetValue; - property NotesAreaBlank: TcxStyle Index vspsSchedulerNotesAreaBlank read GetValue write SetValue; - property NotesAreaLined: TcxStyle Index vspsSchedulerNotesAreaLined read GetValue write SetValue; - property TaskPad: TcxStyle Index vspsSchedulerTaskPad read GetValue write SetValue; - property TimeRuler: TcxStyle Index vspsSchedulerTimeRuler read GetValue write SetValue; - - property StyleSheet; - end; - - TcxSchedulerReportLinkStyleSheet = class(TdxCustomReportLinkStyleSheet) - private - function GetStylesValue: TcxSchedulerReportLinkStyles; - procedure SetStylesValue(Value: TcxSchedulerReportLinkStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TcxSchedulerReportLinkStyles read GetStylesValue write SetStylesValue; - end; - - { TcxSchedulerReportLinkRenderInfo } - - TcxSchedulerReportLinkRenderInfo = class(TdxPSReportRenderInfo) - private - function GetReportLink: TcxSchedulerReportLink; - protected - Rendering: Boolean; - FPageColCount: Integer; - FPageRowCount: Integer; - procedure DoCalculate; override; - function GetPageColCount: Integer; override; - function GetPageRowCount: Integer; override; - function IsLoading: Boolean; - public - function IsDrawPageTitleOnPage(APageIndex: Integer): Boolean; override; - function IsDrawReportTitleOnPage(APageIndex: Integer): Boolean; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - end; - - { TcxSchedulerReportRenderer } - - TcxSchedulerReportRenderer = class(TdxPSReportRenderer) - public - procedure PrepareRenderPage; override; - procedure UnprepareRenderPage; override; - end; - - { TcxSchedulerReportLink } - TcxSchedulerReportLinkCanPrintEventEvent = procedure(Sender: TcxSchedulerReportLink; - AEvent: TcxSchedulerEvent; var AllowPrint: Boolean) of object; - - { Initilization Events } - - TcxSchedulerReportLinkInitializeSchedulerHeaderEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportSchedulerHeaderCell) of object; - TcxSchedulerReportLinkInitializeSchedulingAreaEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportSchedulingAreaCell) of object; - TcxSchedulerReportLinkInitializeNotesEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportNotesAreaCell) of object; - TcxSchedulerReportLinkInitializeTaskPadEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportTaskPadCell) of object; - TcxSchedulerReportLinkInitializeEventCellEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportCustomEventCell) of object; - - { CustomDraw Events } - - TcxSchedulerReportLinkCustomDrawSchedulerHeaderCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportSchedulerHeaderDataCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorHeaderCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorHeader; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorDayCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDay; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorDayCaptionCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDayCaption; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorWeekNumberCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorWeekNumber; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawTimeRulerCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDailyTimeRulerCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawNotesCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawContentCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportContentCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawHeaderCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportHeaderItemCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawEventPartCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TAbstractdxReportCellData; - APart: TcxSchedulerReportEventPartType; var ADone: Boolean) of object; - - TcxSchedulerReportLink = class(TdxCustomcxControlReportLink, IdxReportLinkController) - private - FLinkInPreviewMode: Boolean; - FLookAndFeelItems: TList; - FPageSites: TList; - FPrintRange: TcxSchedulerReportLinkPrintRange; - FPrintStyles: TcxSchedulerReportLinkPrintStyles; - FTaskPadReportLink: TBasedxReportLink; - FSupportImages: Boolean; - FOnActivePrintStyleChanged: TNotifyEvent; - FOnCanPrintEvent: TcxSchedulerReportLinkCanPrintEventEvent; - - FOnCustomDrawSchedulerHeaderCell: TcxSchedulerReportLinkCustomDrawSchedulerHeaderCellEvent; - FOnCustomDrawDateNavigatorHeaderCell: TcxSchedulerReportLinkCustomDrawDateNavigatorHeaderCellEvent; - FOnCustomDrawDateNavigatorDayCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCellEvent; - FOnCustomDrawDateNavigatorDayCaptionCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCaptionCellEvent; - FOnCustomDrawDateNavigatorWeekNumberCell: TcxSchedulerReportLinkCustomDrawDateNavigatorWeekNumberCellEvent; - FOnCustomDrawTimeRulerCell: TcxSchedulerReportLinkCustomDrawTimeRulerCellEvent; - FOnCustomDrawContentCell: TcxSchedulerReportLinkCustomDrawContentCellEvent; - FOnCustomDrawHeaderCell: TcxSchedulerReportLinkCustomDrawHeaderCellEvent; - FOnCustomDrawEventPartCell: TcxSchedulerReportLinkCustomDrawEventPartCellEvent; - FOnCustomDrawNotesCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent; - FOnCustomDrawTaskPadCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent; - - FOnInitializeSchedulingAreaCell: TcxSchedulerReportLinkInitializeSchedulingAreaEvent; - FOnInitializeEventCell: TcxSchedulerReportLinkInitializeEventCellEvent; - FOnInitializeHeaderPrimaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent; - FOnInitializeHeaderSecondaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent; - FOnInitializeNotesAreaCell: TcxSchedulerReportLinkInitializeNotesEvent; - FOnInitializeTaskPadCell: TcxSchedulerReportLinkInitializeTaskPadEvent; - function GetActiveStyles: TcxSchedulerReportLinkStyles; - function GetDesignWindow: TcxfmSchedulerReportLinkDesignWindow; - function GetEdgeMode: TdxCellEdgeMode; - function GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; - function GetLookAndFeelItemCount: Integer; - function GetOptionsFormatting: TcxSchedulerReportLinkOptionsFormatting; - function GetPrintStyles: TcxSchedulerReportLinkPrintStyles; - function GetRenderInfo: TcxSchedulerReportLinkRenderInfo; - function GetScheduler: TcxScheduler; - function GetStyles: TcxSchedulerReportLinkStyles; - procedure SetOptionsFormatting(Value: TcxSchedulerReportLinkOptionsFormatting); - procedure SetPrintRange(Value: TcxSchedulerReportLinkPrintRange); - procedure SetPrintStyles(Value: TcxSchedulerReportLinkPrintStyles); - procedure SetStyles(Value: TcxSchedulerReportLinkStyles); - procedure SetTaskPadReportLink(Value: TBasedxReportLink); - - protected - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - { IdxReportLinkController } - function GetControlSiteBounds(AControl: TControl): TRect; virtual; - - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure DoCreateReport; override; - - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - - procedure DoCanPrintEvent(AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); virtual; - - procedure DoCustomDrawSchedulerHeaderCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportSchedulerHeaderDataCell; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorHeaderCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorHeader; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorDayCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorDay; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorDayCaptionCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorDayCaption; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorWeekNumberCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorWeekNumber; var ADone: Boolean); virtual; - procedure DoCustomDrawTimeRulerCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDailyTimeRulerCell; var ADone: Boolean); virtual; - procedure DoCustomDrawContentCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportContentCell; var ADone: Boolean); virtual; - procedure DoCustomDrawHeaderCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportHeaderItemCell; var ADone: Boolean); virtual; - procedure DoCustomDrawEventPartCell(ACanvas: TCanvas; - AItem: TAbstractdxReportCellData; var ADone: Boolean); virtual; - procedure DoCustomDrawNotesCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); virtual; - procedure DoCustomDrawTaskPadCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); virtual; - - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - function GetRealScaleFactor: Integer; override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - function GetRendererClass: TdxPSReportRendererClass; override; - function GetRenderInfoClass: TdxPSReportRenderInfoClass; override; - procedure InternalRestoreDefaults; override; - procedure PrepareConstruct; override; - procedure UnprepareConstruct; override; - - procedure CreateOptions; override; - procedure DestroyOptions; override; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; override; - - function CreatePrintRange: TcxSchedulerReportLinkPrintRange; virtual; - function CreatePrintStyles: TcxSchedulerReportLinkPrintStyles; virtual; - function HasEventImages: Boolean; - function HasResourceImages: Boolean; - - function GetAreNativeStylesAvailable: Boolean; override; - function GetStylesClass: TdxCustomReportLinkStylesClass; override; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; override; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; override; - - procedure ActivePrintStyleChanged; virtual; - procedure DoActivePrintStyleChanged; virtual; - - procedure FormatLookAndFeelItems; - procedure RegisterLookAndFeelItem(AItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); - - procedure DoInitializeSchedulingAreaCell(AItem: TcxSchedulerReportSchedulingAreaCell); virtual; - procedure DoInitializeEventCell(AItem: TcxSchedulerReportCustomEventCell); virtual; - procedure DoInitializeHeaderPrimaryCell(AItem: TcxSchedulerReportSchedulerHeaderCell); virtual; - procedure DoInitializeHeaderSecondaryCell(AItem: TcxSchedulerReportSchedulerHeaderCell); virtual; - procedure DoInitializeNotesAreaCell(AItem: TcxSchedulerReportNotesAreaCell); virtual; - procedure DoInitializeTaskPadCell(AItem: TcxSchedulerReportTaskPadCell); virtual; - - procedure AssignTaskPadData(ATaskPad: TcxSchedulerReportTaskPadCell); - procedure InitializeTaskPadCell(ATaskPad: TcxSchedulerReportTaskPadCell); virtual; - - procedure SetCellViewParams(ACell: TdxReportVisualItem; const AParams: TcxViewParams); overload; - procedure SetCellViewParams(ACell: TdxReportVisualItem; const AParams: TdxReportItemViewParams); overload; - - function AddPageSite(const ABounds: TRect): TcxSchedulerReportPageSite; - procedure BuildStyle; virtual; - - property ActiveStyles: TcxSchedulerReportLinkStyles read GetActiveStyles; - - property EdgeMode: TdxCellEdgeMode read GetEdgeMode; - property LinkInPreviewMode: Boolean read FLinkInPreviewMode write FLinkInPreviewMode; - property LookAndFeelItemCount: Integer read GetLookAndFeelItemCount; - property LookAndFeelItems[Index: Integer]: TdxReportVisualItem read GetLookAndFeelItem; - property PageSites: TList read FPageSites; - property RenderInfo: TcxSchedulerReportLinkRenderInfo read GetRenderInfo; - property SupportImages: Boolean read FSupportImages; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - class function Aggregable: Boolean; override; - procedure LoadDataFromStream(AStream: TStream); override; - procedure RebuildReport; override; - - property DesignWindow: TcxfmSchedulerReportLinkDesignWindow read GetDesignWindow; - property Scheduler: TcxScheduler read GetScheduler; - - published - property Color; - property Font; - - property OptionsFormatting: TcxSchedulerReportLinkOptionsFormatting read GetOptionsFormatting write SetOptionsFormatting; - property PrintRange: TcxSchedulerReportLinkPrintRange read FPrintRange write SetPrintRange; - property PrintStyles: TcxSchedulerReportLinkPrintStyles read GetPrintStyles write SetPrintStyles; - property ScaleFonts; - property StyleRepository; - property Styles: TcxSchedulerReportLinkStyles read GetStyles write SetStyles; - property SupportedCustomDraw; - property TaskPadReportLink: TBasedxReportLink read FTaskPadReportLink write SetTaskPadReportLink; - - property OnActivePrintStyleChanged: TNotifyEvent read FOnActivePrintStyleChanged write FOnActivePrintStyleChanged; - property OnCanPrintEvent: TcxSchedulerReportLinkCanPrintEventEvent read FOnCanPrintEvent write FOnCanPrintEvent; - - property OnCustomDrawSchedulerHeaderCell: TcxSchedulerReportLinkCustomDrawSchedulerHeaderCellEvent - read FOnCustomDrawSchedulerHeaderCell write FOnCustomDrawSchedulerHeaderCell; - property OnCustomDrawDateNavigatorHeaderCell: TcxSchedulerReportLinkCustomDrawDateNavigatorHeaderCellEvent - read FOnCustomDrawDateNavigatorHeaderCell write FOnCustomDrawDateNavigatorHeaderCell; - property OnCustomDrawDateNavigatorDayCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCellEvent - read FOnCustomDrawDateNavigatorDayCell write FOnCustomDrawDateNavigatorDayCell; - property OnCustomDrawDateNavigatorDayCaptionCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCaptionCellEvent - read FOnCustomDrawDateNavigatorDayCaptionCell write FOnCustomDrawDateNavigatorDayCaptionCell; - property OnCustomDrawDateNavigatorWeekNumberCell: TcxSchedulerReportLinkCustomDrawDateNavigatorWeekNumberCellEvent - read FOnCustomDrawDateNavigatorWeekNumberCell write FOnCustomDrawDateNavigatorWeekNumberCell; - property OnCustomDrawTimeRulerCell: TcxSchedulerReportLinkCustomDrawTimeRulerCellEvent - read FOnCustomDrawTimeRulerCell write FOnCustomDrawTimeRulerCell; - property OnCustomDrawContentCell: TcxSchedulerReportLinkCustomDrawContentCellEvent - read FOnCustomDrawContentCell write FOnCustomDrawContentCell; - property OnCustomDrawHeaderCell: TcxSchedulerReportLinkCustomDrawHeaderCellEvent - read FOnCustomDrawHeaderCell write FOnCustomDrawHeaderCell; - property OnCustomDrawEventPartCell: TcxSchedulerReportLinkCustomDrawEventPartCellEvent - read FOnCustomDrawEventPartCell write FOnCustomDrawEventPartCell; - property OnCustomDrawNotesCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent - read FOnCustomDrawNotesCell write FOnCustomDrawNotesCell; - property OnCustomDrawTaskPadCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent - read FOnCustomDrawTaskPadCell write FOnCustomDrawTaskPadCell; - - property OnInitializeSchedulingAreaCell: TcxSchedulerReportLinkInitializeSchedulingAreaEvent - read FOnInitializeSchedulingAreaCell write FOnInitializeSchedulingAreaCell; - property OnInitializeEventCell: TcxSchedulerReportLinkInitializeEventCellEvent - read FOnInitializeEventCell write FOnInitializeEventCell; - property OnInitializeHeaderPrimaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent - read FOnInitializeHeaderPrimaryCell write FOnInitializeHeaderPrimaryCell; - property OnInitializeHeaderSecondaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent - read FOnInitializeHeaderSecondaryCell write FOnInitializeHeaderSecondaryCell; - property OnInitializeNotesAreaCell: TcxSchedulerReportLinkInitializeNotesEvent - read FOnInitializeNotesAreaCell write FOnInitializeNotesAreaCell; - property OnInitializeTaskPadCell: TcxSchedulerReportLinkInitializeTaskPadEvent - read FOnInitializeTaskPadCell write FOnInitializeTaskPadCell; - end; - - { TcxCustomSchedulerReportLinkPrintStyle } - - TcxSchedulerReportLinkPeriodicPrintStyleLayout = (pslOnePage, pslTwoPages); - - TcxCustomSchedulerReportLinkPrintStyle = class(TPersistent, - IUnknown, IdxPSCellParams, IdxPSCellParams2) - private - FBoldedDays: TcxSchedulerDateList; - FCaption: string; - FCompressWeekends: Boolean; - FDontPrintWeekends: Boolean; - FEvents: TcxSchedulerCachedEventList; - FLayout: TcxSchedulerReportLinkPeriodicPrintStyleLayout; - FPagesPerPeriod: Integer; - FResourceCountPerPage: Integer; - FShowNotesAreaBlank: Boolean; - FShowNotesAreaLined: Boolean; - FShowTaskPad: Boolean; - FStyles: TcxSchedulerReportLinkPrintStyles; - FUsedDays: TcxSchedulerDateList; - FShowEventImages: Boolean; - FShowResourceImages: Boolean; - function GetActive: Boolean; - function GetHasAdditionalArea: Boolean; - function GetIndex: Integer; - function GetPageSite(AIndex: Integer): TcxSchedulerReportPageSite; - function GetPeriodCount: Integer; - function GetPrintRange: TcxSchedulerReportLinkPrintRange; - function GetReportLink: TcxSchedulerReportLink; - function GetResourceCount: Integer; - function GetScheduler: TcxScheduler; - function GetStorage: TcxCustomSchedulerStorage; - function GetTimePrintFrom: TTime; - function GetTimePrintTo: TTime; - function GetVisualStyles: TcxSchedulerReportLinkStyles; - function IsCaptionStored: Boolean; - function IsLayoutStored: Boolean; - function IsShowNotesAreaBlankStored: Boolean; - function IsActiveStored: Boolean; - procedure SetActive(Value: Boolean); - procedure SetCaption(const Value: string); - procedure SetCompressWeekends(Value: Boolean); - procedure SetDontPrintWeekends(Value: Boolean); - procedure SetLayout(Value: TcxSchedulerReportLinkPeriodicPrintStyleLayout); - procedure SetResourceCountPerPage(Value: Integer); - procedure SetShowEventImages(Value: Boolean); - procedure SetShowNotesAreaBlank(Value: Boolean); - procedure SetShowNotesAreaLined(Value: Boolean); - procedure SetShowResourceImages(Value: Boolean); - procedure SetShowTaskPad(Value: Boolean); - procedure SetTimePrintFrom(Value: TTime); - procedure SetTimePrintTo(Value: TTime); - protected - CurrentDate: TDateTime; - { IUnknown } - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - { IdxReportLinkController } - function GetControlSiteBounds(AControl: TControl): TRect; virtual; - { IdxPSCellParams } - function IdxPSCellParams.GetAutoHeight = IdxPSCellParams_GetAutoHeight; - function IdxPSCellParams.GetDC = IdxPSCellParams_GetDC; - function IdxPSCellParams.GetDisplayGraphicsAsText = IdxPSCellParams_GetDisplayGraphicsAsText; - function IdxPSCellParams.GetEndEllipsis = IdxPSCellParams_GetEndEllipsis; - function IdxPSCellParams.GetFlatCheckMarks = IdxPSCellParams_GetFlatCheckMarks; - function IdxPSCellParams.GetGraphicsText = IdxPSCellParams_GetGraphicsText; - function IdxPSCellParams.GetMultiline = IdxPSCellParams_GetMultiline; - function IdxPSCellParams.GetTransparentGraphics = IdxPSCellParams_GetTransparentGraphics; - function IdxPSCellParams_GetAutoHeight: Boolean; virtual; - function IdxPSCellParams_GetDC: HDC; virtual; - function IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; virtual; - function IdxPSCellParams_GetEndEllipsis: Boolean; virtual; - function IdxPSCellParams_GetFlatCheckMarks: Boolean; virtual; - function IdxPSCellParams_GetGraphicsText: string; virtual; - function IdxPSCellParams_GetMultiline: Boolean; virtual; - function IdxPSCellParams_GetTransparentGraphics: Boolean; virtual; - { IdxPSCellParams2 } - function IdxPSCellParams2.GetPreviewMarginLeft = IdxPSCellParams2_GetPreviewMarginLeft; - function IdxPSCellParams2.GetPreviewMarginRight = IdxPSCellParams2_GetPreviewMarginRight; - function IdxPSCellParams2.GetPreviewMaxHeight = IdxPSCellParams2_GetPreviewMaxHeight; - function IdxPSCellParams2.GetPreviewMaxLineCount = IdxPSCellParams2_GetPreviewMaxLineCount; - function IdxPSCellParams2.GetRichEditGraphicClass = IdxPSCellParams2_GetRichEditGraphicClass; - function IdxPSCellParams2.GetRichEditTransparent = IdxPSCellParams2_GetRichEditTransparent; - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; virtual; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; virtual; - function IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; virtual; - function IdxPSCellParams2_GetRichEditTransparent: Boolean; virtual; - - // - function AddPageSite(const ABounds: TRect): TcxSchedulerReportPageSite; virtual; - - procedure AfterBuild; virtual; - procedure BeforeBuild; virtual; - procedure Build; virtual; - procedure BuildPages; virtual; - procedure BuildSchedulerCells(ASite: TcxSchedulerReportSchedulingAreaCell); virtual; - procedure Progress(APercentDone: Double); virtual; - - procedure PrepareEvents; virtual; - procedure DoCanPrintEvent(AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); virtual; - - procedure Changed; virtual; - procedure CreateObjects; virtual; - procedure DestroyObjects; virtual; - function GetPageCount: Integer; virtual; - - function GetRebuildOnPageParamsChange(AnUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; virtual; - - function GetActualDatePrintFrom: TDate; virtual; - function GetActualDatePrintTo: TDate; virtual; - function GetCorrespondedView: TcxSchedulerCustomResourceView; virtual; - function GetPagesPerPeriod: Integer; virtual; - - function GetGlyphIndex: Integer; virtual; - function GetPreviewGlyphIndex: Integer; virtual; - function GetSchedulerHeaderParams: TdxReportItemViewParams; virtual; - - procedure DrawDesignWindowPreview(ACanvas: TCanvas; const ABounds: TRect); - // actually option state - function GetResourcePageCount: Integer; virtual; - function GetShowDateNavigator(APageIndex: Integer): Boolean; virtual; - function GetShowNotesAreaBlank: Boolean; virtual; - - procedure SetBoolOption(var AOption: Boolean; Value: Boolean); - function SupportTimeRange: Boolean; virtual; - function SupportMessage: Boolean; virtual; - - // report cells creation - function CreateDateNavigatorCell(ASite: TdxReportCell; AYear, AMonth: Word): TcxSchedulerReportDateNavigatorCell; virtual; - function CreateHeaderCell(ASite: TdxReportCell): TcxSchedulerReportSchedulerHeaderCell; virtual; - function CreateNotesCell(ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; virtual; - function CreateNotesLinedCell(ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; virtual; - function CreateSchedulingAreaCell(ASite: TdxReportCell): TcxSchedulerReportSchedulingAreaCell; virtual; - function CreateSchedulingCellsProducer(ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; virtual; - function CreateTaskPadCell(ASite: TdxReportCell): TcxSchedulerReportTaskPadCell; virtual; - - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); virtual; - function InitReportCell(ACell: TdxReportCell; const ABounds: TRect): TdxReportCell; - - procedure CorrectBoundsWithHeader(AHeader: TcxSchedulerReportSchedulerHeaderCell; var ABounds: TRect); - procedure CreateAdditionalControls(ASite: TdxReportCell; AHasCalendar, - AHasTaskPad, AHasNotes, AHasNotesLined, ARightSide: Boolean; var ABounds: TRect); virtual; - - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); virtual; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); virtual; - procedure CreateHeaderDateNavigator(AHeader: TcxSchedulerReportSchedulerHeaderCell; APageIndex: Integer; out ABounds: TRect); virtual; - procedure CreateLayoutForPeriod(APeriodIndex: Integer); virtual; - procedure CreatePageSiteWithHeader(APageIndex: Integer; - out ASite: TcxSchedulerReportPageSite; out AHeader: TcxSchedulerReportSchedulerHeaderCell; - out ABounds: TRect; AIsPrimary: Boolean = True); - // items visibility - function CanSplitSchedulingOnTwoPages: Boolean; virtual; - function GetHasPageHeader(APageIndex: Integer): Boolean; virtual; - function GetHasPageReportTitle(APageIndex: Integer): Boolean; virtual; - function GetPageHeaderHeight(const ASiteBounds: TRect; APageIndex: Integer): Integer; - function GetPageIndex(APeriodIndex, AIndex: Integer): Integer; - procedure GetPagePeriodAndIndex(APageIndex: Integer; var APeriodIndex, ASubIndex: Integer); - function GetPageSiteBounds(APageIndex: Integer): TRect; virtual; - function GetStartOfWeekOffset: Integer; virtual; - // extracting events and dates for period - procedure GetPageDateNavigatorInfo( - APageIndex: Integer; out AYear, AMonth: Word); virtual; - function GetDaysPerPeriod: Integer; virtual; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); virtual; - - property CompressWeekends: Boolean read FCompressWeekends write SetCompressWeekends default True; - property DontPrintWeekends: Boolean read FDontPrintWeekends write SetDontPrintWeekends default False; - property Events: TcxSchedulerCachedEventList read FEvents; - property GlyphIndex: Integer read GetGlyphIndex; - property Layout: TcxSchedulerReportLinkPeriodicPrintStyleLayout read FLayout write SetLayout stored IsLayoutStored; - property PagesPerPeriod: Integer read FPagesPerPeriod; - property PageSites[Index: Integer]: TcxSchedulerReportPageSite read GetPageSite; - property PreviewGlyphIndex: Integer read GetPreviewGlyphIndex; - property PrintRange: TcxSchedulerReportLinkPrintRange read GetPrintRange; - property ResourceCount: Integer read GetResourceCount; - property ResourceCountPerPage: Integer read FResourceCountPerPage write SetResourceCountPerPage default 0; - property ShowEventImages: Boolean read FShowEventImages write SetShowEventImages; - property ShowNotesAreaBlank: Boolean read GetShowNotesAreaBlank write SetShowNotesAreaBlank stored IsShowNotesAreaBlankStored; - property ShowNotesAreaLined: Boolean read FShowNotesAreaLined write SetShowNotesAreaLined default False; - property ShowResourceImages: Boolean read FShowResourceImages write SetShowResourceImages; - property ShowTaskPad: Boolean read FShowTaskPad write SetShowTaskPad default False; - property StartOfWeekOffset: Integer read GetStartOfWeekOffset; - property Storage: TcxCustomSchedulerStorage read GetStorage; - property TimePrintFrom: TTime read GetTimePrintFrom write SetTimePrintFrom stored False; - property TimePrintTo: TTime read GetTimePrintTo write SetTimePrintTo stored False; - property UsedDays: TcxSchedulerDateList read FUsedDays; - public - constructor Create(AStyles: TcxSchedulerReportLinkPrintStyles); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function DefaultCaption: string; virtual; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; virtual; - procedure RestoreDefaults; virtual; - - property ActualDatePrintFrom: TDate read GetActualDatePrintFrom; - property ActualDatePrintTo: TDate read GetActualDatePrintTo; - property CorrespondedView: TcxSchedulerCustomResourceView read GetCorrespondedView; - property HasAdditionalArea: Boolean read GetHasAdditionalArea; - property Index: Integer read GetIndex; - property PageCount: Integer read GetPageCount; - property PeriodCount: Integer read GetPeriodCount; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - property Scheduler: TcxScheduler read GetScheduler; - property Styles: TcxSchedulerReportLinkPrintStyles read FStyles; - property VisualStyles: TcxSchedulerReportLinkStyles read GetVisualStyles; - published - property Active: Boolean read GetActive write SetActive stored IsActiveStored; - property Caption: string read FCaption write SetCaption stored IsCaptionStored; - end; - - { TcxSchedulerReportLinkDailyPrintStyle } - - TcxSchedulerReportLinkDailyPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FCurrentPagePerDate: Integer; - protected - procedure BeforeBuild; override; - function CanSplitSchedulingOnTwoPages: Boolean; override; - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - function CreateSchedulingCellsProducer(ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetGlyphIndex: Integer; override; - function GetPageCount: Integer; override; - function GetPagesPerPeriod: Integer; override; - function GetShowNotesAreaBlank: Boolean; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - function SupportMessage: Boolean; override; - function SupportTimeRange: Boolean; override; - public - constructor Create(AStyles: TcxSchedulerReportLinkPrintStyles); override; - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - published - property Active; - property Caption; - property Layout; - property ResourceCountPerPage; - property ShowEventImages default True; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowResourceImages default True; - property ShowTaskPad; - end; - - { TcxSchedulerReportLinkCustomDetailsPrintStyle } - - TcxSchedulerReportLinkCustomDetailsPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FTimeWidth: Integer; - function GetPageWidth: Integer; - protected - BuildedPageCount: Integer; - CellsOnPage: Integer; - CurrentPage: TcxSchedulerReportPageSite; - function AddPageSite(const ABounds: TRect): TcxSchedulerReportPageSite; override; - procedure BeforeBuild; override; - function GetNextPage(APrevPage: TcxSchedulerReportPageSite; out ABounds: TRect): TcxSchedulerReportPageSite; - function GetPageCount: Integer; override; - function MeasureTimeWidth: Integer; virtual; - - property PageWidth: Integer read GetPageWidth; - property TimeWidth: Integer read FTimeWidth; - end; - - { TcxSchedulerReportLinkDetailsPrintStyle } - - TcxSchedulerReportLinkDetailsPrintStylePaginationMode = (dpmByDay, dpmByWeek, dpmByMonth); - - TcxSchedulerReportLinkDetailsPrintStyle = class(TcxSchedulerReportLinkCustomDetailsPrintStyle) - private - FPaginationMode: TcxSchedulerReportLinkDetailsPrintStylePaginationMode; - FUsePagination: Boolean; - procedure SetPaginationMode(Value: TcxSchedulerReportLinkDetailsPrintStylePaginationMode); - procedure SetUsePagination(Value: Boolean); - protected - EventIndex, DayIndex: Integer; - CurrentCell: TcxSchedulerReportDetailsEventCell; - CurrentPageBounds: TRect; - PreviousHeader: TcxSchedulerReportSchedulerHeaderCell; - Site: TcxSchedulerReportPageSite; - function AddDayHeader(ADate: TDateTime; AContinue: Boolean; - var ABounds: TRect): TcxSchedulerReportSchedulerHeaderCell; - procedure BeforeBuild; override; - procedure BuildPages; override; - function GetDayHeaderHeight: Integer; virtual; - function GetDayHeaderText(AContinue: Boolean): string; virtual; - function GetGlyphIndex: Integer; override; - function GetPreviewGlyphIndex: Integer; override; - function GetSchedulerHeaderParams: TdxReportItemViewParams; override; - - // layout calculation - function AddEventCell(AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; virtual; - procedure CheckPagination; - procedure HeaderNeeded; virtual; - function NeedAddDayHeader: Boolean; - function MeasureCellBounds: TRect; virtual; - procedure PrepareNextPage; - procedure SetCellPlace; - - property DayHeaderHeight: Integer read GetDayHeaderHeight; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property PaginationMode: TcxSchedulerReportLinkDetailsPrintStylePaginationMode read FPaginationMode write SetPaginationMode default dpmByDay; - property UsePagination: Boolean read FUsePagination write SetUsePagination default False; - end; - - { TcxSchedulerReportLinkMemoPrintStyle } - - TcxSchedulerReportLinkMemoPrintStyle = class(TcxSchedulerReportLinkCustomDetailsPrintStyle) - private - FSelectedEventsOnly: Boolean; - FStartEachItemOnNewPage: Boolean; - protected - Site: TdxReportCell; - function AddEventCell(AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; virtual; - procedure BuildPages; override; - procedure DoCanPrintEvent(AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); override; - function GetGlyphIndex: Integer; override; - function GetPreviewGlyphIndex: Integer; override; - function MeasureTimeWidth: Integer; override; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property SelectedEventsOnly: Boolean read FSelectedEventsOnly write FSelectedEventsOnly default True; - property StartEachItemOnNewPage: Boolean read FStartEachItemOnNewPage write FStartEachItemOnNewPage default True; - end; - - { TcxSchedulerReportLinkMonthlyPrintStyle } - - TcxSchedulerReportLinkMonthlyPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FPrintExactlyOneMonthPerPage: Boolean; - procedure SetPrintExactlyOneMonthPerPage(Value: Boolean); - protected - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetDateForPage(APageIndex: Integer): TDateTime; - function GetDaysPerPeriod: Integer; override; - function GetGlyphIndex: Integer; override; - function GetPageCount: Integer; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - public - constructor Create(AStyles: TcxSchedulerReportLinkPrintStyles); override; - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property DontPrintWeekends; - property Layout; - property PrintExactlyOneMonthPerPage: Boolean read FPrintExactlyOneMonthPerPage write SetPrintExactlyOneMonthPerPage default False; - property ResourceCountPerPage; - property ShowEventImages default False; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowResourceImages default True; - property ShowTaskPad; - end; - - { TcxSchedulerReportLinkTrifoldPrintStyle } - - TcxSchedulerReportLinkTrifoldPrintStyleSectionMode = (smDailyCalendar, smWeeklyCalendar, - smMonthlyCalendar, smTaskPad, smNotesAreaBlank, smNotesAreaLined); - - TcxSchedulerReportLinkTrifoldPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FSections: array[0..2] of TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; - function GetHasDailySection: Boolean; - function GetSection(Index: Integer): TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; - procedure SetSection(Index: Integer; AValue: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); - function IsSectionStored(Index: Integer): Boolean; - protected - FCurrentSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; - FCurrentSchedulingArea: TcxSchedulerReportSchedulingAreaCell; - FPageRange: Byte; - procedure CreateLayoutForPeriod(APeriodIndex: Integer); override; - procedure CreateLayoutForSection(ASite: TdxReportCell; APeriodIndex: Integer; const ABounds: TRect; - ASection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); virtual; - procedure CreateSchedulingAreaWithHeader(ASite: TdxReportCell; ABounds: TRect); virtual; - function CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetGlyphIndex: Integer; override; - function GetPageCount: Integer; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - - property HasDailySection: Boolean read GetHasDailySection; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property LeftSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode index 0 read GetSection write SetSection stored IsSectionStored; - property MiddleSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode index 1 read GetSection write SetSection stored IsSectionStored; - property RightSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode index 2 read GetSection write SetSection stored IsSectionStored; - end; - - { TcxSchedulerReportLinkWeeklyPrintStyle } - - TcxSchedulerReportLinkWeeklyPrintStyleArrange = (wsaTopToBottom, wsaLeftToRight); - - TcxSchedulerReportLinkWeeklyPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FArrange: TcxSchedulerReportLinkWeeklyPrintStyleArrange; - FDaysLayout: TcxSchedulerWeekViewDaysLayout; - FDaysLayoutAssigned: Boolean; - - function GetDaysLayout: TcxSchedulerWeekViewDaysLayout; - - function IsArrangeStored: Boolean; - function IsDaysLayoutStored: Boolean; - - procedure SetArrange(Value: TcxSchedulerReportLinkWeeklyPrintStyleArrange); - procedure SetDaysLayout(Value: TcxSchedulerWeekViewDaysLayout); - protected - procedure Build; override; - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - function CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetGlyphIndex: Integer; override; - function GetDateForPage(APageIndex: Integer): TDateTime; - function GetDaysPerPeriod: Integer; override; - function GetPageCount: Integer; override; - function GetPreviewGlyphIndex: Integer; override; - function GetStartOfWeekOffset: Integer; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - function CanDontPrintWeekends: Boolean; virtual; - function SupportMessage: Boolean; override; - function SupportTimeRange: Boolean; override; - public - constructor Create(AStyles: TcxSchedulerReportLinkPrintStyles); override; - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - procedure RestoreDefaults; override; - - property DaysLayoutAssigned: Boolean read FDaysLayoutAssigned write FDaysLayoutAssigned; - published - property Active; - property Arrange: TcxSchedulerReportLinkWeeklyPrintStyleArrange read FArrange write SetArrange stored IsArrangeStored; - property Caption; - property DaysLayout: TcxSchedulerWeekViewDaysLayout read GetDaysLayout write SetDaysLayout stored IsDaysLayoutStored; - property DontPrintWeekends; - property Layout; - property ResourceCountPerPage; - property ShowEventImages default False; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowResourceImages default True; - property ShowTaskPad; - end; - - { TcxSchedulerReportLinkYearlyPrintStyle } - - TcxSchedulerReportLinkYearlyPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FMonthCountPerPage: Integer; - FPrimaryPageHeadersOnly: Boolean; - function GetPeriodPageCount: Integer; - procedure SetMonthCountPerPage(AValue: Integer); - procedure SetPrimaryPageHeadersOnly(AValue: Boolean); - protected - procedure BuildSchedulerCells(ASite: TcxSchedulerReportSchedulingAreaCell); override; - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - function CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetHasPageHeader(APageIndex: Integer): Boolean; override; - function GetGlyphIndex: Integer; override; - function GetPreviewGlyphIndex: Integer; override; - function GetPageCount: Integer; override; - function GetShowDateNavigator(APageIndex: Integer): Boolean; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - - property PeriodPageCount: Integer read GetPeriodPageCount; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property Layout; - property MonthCountPerPage: Integer read FMonthCountPerPage write SetMonthCountPerPage default 12; - property PrimaryPageHeadersOnly: Boolean read FPrimaryPageHeadersOnly write SetPrimaryPageHeadersOnly default False; - property ShowEventImages default False; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowTaskPad; - end; - - { TcxSchedulerReportLinkPrintStyles } - - TcxSchedulerReportLinkPrintStyles = class(TcxCustomSchedulerReportLinkOptions) - private - FActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; - FActiveStyleAssigned: Boolean; - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxCustomSchedulerReportLinkPrintStyle; - function GetStyleDaily: TcxSchedulerReportLinkDailyPrintStyle; - function GetStyleDetails: TcxSchedulerReportLinkDetailsPrintStyle; - function GetStyleMemo: TcxSchedulerReportLinkMemoPrintStyle; - function GetStyleMonthly: TcxSchedulerReportLinkMonthlyPrintStyle; - function GetStyleTrifold: TcxSchedulerReportLinkTrifoldPrintStyle; - function GetStyleWeekly: TcxSchedulerReportLinkWeeklyPrintStyle; - function GetStyleYearly: TcxSchedulerReportLinkYearlyPrintStyle; - procedure SetActiveStyle(Value: TcxCustomSchedulerReportLinkPrintStyle); - procedure SetActiveStyleAssigned(Value: Boolean); - procedure SetItem(Index: Integer; Value: TcxCustomSchedulerReportLinkPrintStyle); - procedure SetStyleDaily(Value: TcxSchedulerReportLinkDailyPrintStyle); - procedure SetStyleDetails(Value: TcxSchedulerReportLinkDetailsPrintStyle); - procedure SetStyleMemo(Value: TcxSchedulerReportLinkMemoPrintStyle); - procedure SetStyleMonthly(Value: TcxSchedulerReportLinkMonthlyPrintStyle); - procedure SetStyleTrifold(Value: TcxSchedulerReportLinkTrifoldPrintStyle); - procedure SetStyleWeekly(Value: TcxSchedulerReportLinkWeeklyPrintStyle); - procedure SetStyleYearly(Value: TcxSchedulerReportLinkYearlyPrintStyle); - protected - procedure CreateObjects; override; - procedure DestroyObjects; override; - - { IdxReportLinkOptionsDesignerSupport } - - function DesignerTabIndex: Integer; override; - - function CreateStyle(AStyleClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; virtual; - procedure CreateStyles; virtual; - procedure DestroyStyles; virtual; - procedure GetStyleByClassEx(AClass: TcxCustomSchedulerReportLinkPrintStyleClass; var AInstance); - procedure SetActiveStyleEx(Value: TcxCustomSchedulerReportLinkPrintStyle); - - procedure ActiveStyleChanged; virtual; - procedure StyleChanged(AStyle: TcxCustomSchedulerReportLinkPrintStyle); virtual; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function GetCorrespondingStyle: TcxCustomSchedulerReportLinkPrintStyle; virtual; - function GetStyleByClass(AClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; - function GetStyleByName(const Name: string): TcxCustomSchedulerReportLinkPrintStyle; - function GetStyleByView(View: TcxSchedulerCustomView): TcxCustomSchedulerReportLinkPrintStyle; - - function IndexOf(AItem: TcxCustomSchedulerReportLinkPrintStyle): Integer; - - property ActiveStyle: TcxCustomSchedulerReportLinkPrintStyle read FActiveStyle write SetActiveStyle stored False; - property ActiveStyleAssigned: Boolean read FActiveStyleAssigned write SetActiveStyleAssigned; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxCustomSchedulerReportLinkPrintStyle read GetItem write SetItem; default; - published - property Daily: TcxSchedulerReportLinkDailyPrintStyle read GetStyleDaily write SetStyleDaily; - property Details: TcxSchedulerReportLinkDetailsPrintStyle read GetStyleDetails write SetStyleDetails; - property Memo: TcxSchedulerReportLinkMemoPrintStyle read GetStyleMemo write SetStyleMemo; - property Monthly: TcxSchedulerReportLinkMonthlyPrintStyle read GetStyleMonthly write SetStyleMonthly; - property Trifold: TcxSchedulerReportLinkTrifoldPrintStyle read GetStyleTrifold write SetStyleTrifold; - property Weekly: TcxSchedulerReportLinkWeeklyPrintStyle read GetStyleWeekly write SetStyleWeekly; - property Yearly: TcxSchedulerReportLinkYearlyPrintStyle read GetStyleYearly write SetStyleYearly; - end; - - { DesignWindow } - - TcxfmSchedulerReportLinkDesignWindow = class(TdxfmCustomcxControlReportLinkDesignWindow) - PageControl1: TPageControl; - tshPrintStyles: TTabSheet; - tshStyles: TTabSheet; - bvlStyles: TBevel; - bvlStyleSheets: TBevel; - lblStyleSheets: TLabel; - bvlStylesHost: TBevel; - Label1: TLabel; - lblUseNativeStyles: TLabel; - btnStyleColor: TButton; - btnStyleFont: TButton; - btnStyleBackgroundBitmap: TButton; - cbxStyleSheets: TcxComboBox; - btnStyleSheetNew: TButton; - btnStyleSheetCopy: TButton; - btnStyleSheetDelete: TButton; - btnStylesSaveAs: TButton; - btnStyleSheetRename: TButton; - btnStyleBackgroundBitmapClear: TButton; - btnStyleRestoreDefaults: TButton; - chbxUseNativeStyles: TcxCheckBox; - pmStyles: TPopupMenu; - miStyleFont: TMenuItem; - miStyleColor: TMenuItem; - miLine3: TMenuItem; - miStyleBackgroundBitmap: TMenuItem; - miStyleBackgroundBitmapClear: TMenuItem; - miLine2: TMenuItem; - miStyleRestoreDefaults: TMenuItem; - milLine: TMenuItem; - miStylesSelectAll: TMenuItem; - miLine4: TMenuItem; - miStylesSaveAs: TMenuItem; - ilStylesPopup: TImageList; - lblPreviewWindow: TStaticText; - Panel1: TPanel; - pnlPreview: TPanel; - cbxPrintStyles: TcxImageComboBox; - lblPrintStylesOptions: TLabel; - bvlPrintStyleOptions: TBevel; - pcPrintStyleOptions: TPageControl; - tshWeekly: TTabSheet; - tshMonthly: TTabSheet; - tshTrifold: TTabSheet; - tshDetails: TTabSheet; - tshMemo: TTabSheet; - lblPrintStyleTrifoldSectionLeft: TLabel; - lblPrintStyleTrifoldSectionMiddle: TLabel; - lblPrintStyleTrifoldSectionRight: TLabel; - lblPrintStyleWeeklyPrintTo: TLabel; - lblPrintStyleWeeklyPrintFrom: TLabel; - chbxPrintStyleWeeklyNotesAreaLined: TcxCheckBox; - chbxPrintStyleWeeklyNotesAreaBlank: TcxCheckBox; - lblPrintStyleWeeklyInclude: TLabel; - lblPrintStyleWeeklyLayout: TLabel; - lblPrintStyleWeeklyArrange: TLabel; - cbxPrintStyleWeeklyArrange: TcxComboBox; - cbxPrintStyleWeeklyLayout: TcxComboBox; - chbxPrintStyleWeeklyTaskPad: TcxCheckBox; - tePrintStyleWeeklyPrintFrom: TcxTimeEdit; - tePrintStyleWeeklyPrintTo: TcxTimeEdit; - cbxPrintStyleMonthlyLayout: TcxComboBox; - lblPrintStyleMonthlyLayout: TLabel; - lblPrintStyleMonthlyInclude: TLabel; - chbxPrintStyleMonthlyTaskPad: TcxCheckBox; - chbxPrintStyleMonthlyNotesAreaBlank: TcxCheckBox; - chbxPrintStyleMonthlyNotesAreaLined: TcxCheckBox; - chbxPrintStyleMonthlyDontPrintWeekends: TcxCheckBox; - chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage: TcxCheckBox; - chbxPrintStyleWeeklyDontPrintWeekends: TcxCheckBox; - pnlPrintStylesPreview: TPanel; - pbxPrintStylesPreview: TPaintBox; - chbxPrintStyleDetailsUsePagination: TcxCheckBox; - cbxPrintStyleDetailsPagination: TcxComboBox; - tshFormatting: TTabSheet; - bvlLookAndFeel: TBevel; - lblLookAndFeel: TLabel; - imgLookAndFeel: TImage; - cbxLookAndFeel: TcxComboBox; - lblRefinements: TLabel; - bvlRefinements: TBevel; - imgRefinements: TImage; - chbxSuppressBackgroundBitmaps: TcxCheckBox; - tshPrintRange: TTabSheet; - lblPrintRangeStart: TLabel; - lblPrintRangeEnd: TLabel; - lblPrintRangesMiscellaneous: TLabel; - Bevel1: TBevel; - dePrintRangeStart: TcxDateEdit; - dePrintRangeEnd: TcxDateEdit; - chbxHideDetailsOfPrivateAppointments: TcxCheckBox; - cbxPrintStyleTrifoldSectionLeft: TcxComboBox; - cbxPrintStyleTrifoldSectionMiddle: TcxComboBox; - cbxPrintStyleTrifoldSectionRight: TcxComboBox; - chbxSuppressContentColoration: TcxCheckBox; - sePrintStyleMonthlyResourceCountPerPage: TcxSpinEdit; - lblPrintStyleMonthlyResourceCountPerPage: TLabel; - lblPrintStyleWeeklyResourceCountPerPage: TLabel; - sePrintStyleWeeklyResourceCountPerPage: TcxSpinEdit; - tshDaily: TTabSheet; - lblPrintStyleDailyLayout: TLabel; - lblPrintStyleDailyInclude: TLabel; - lblPrintStyleDailyPrintFrom: TLabel; - lblPrintStyleDailyPrintTo: TLabel; - lblPrintStyleDailyResourceCountPerPage: TLabel; - cbxPrintStyleDailyLayout: TcxComboBox; - chbxPrintStyleDailyTaskPad: TcxCheckBox; - chbxPrintStyleDailyNotesAreaBlank: TcxCheckBox; - chbxPrintStyleDailyNotesAreaLined: TcxCheckBox; - tePrintStyleDailyPrintFrom: TcxTimeEdit; - tePrintStyleDailyPrintTo: TcxTimeEdit; - sePrintStyleDailyResourceCountPerPage: TcxSpinEdit; - cxEditStyleController1: TcxEditStyleController; - pbPreview: TPaintBox; - chbxPrintStyleMemoStartEachItemOnNewPage: TcxCheckBox; - chbxPrintStyleMemoPrintOnlySelectedEvents: TcxCheckBox; - cbxPrintStyleWeeklyDaysLayout: TcxComboBox; - lblPrintStyleWeeklyDaysLayout: TLabel; - tshYearly: TTabSheet; - cbxPrintStyleYearlyMonthPerPage: TcxComboBox; - lblPrintStyleYearlyMonthPerPage: TLabel; - lblPrintStyleYearlyResourceCountPerPage: TLabel; - sePrintStyleYearlyResourceCountPerPage: TcxSpinEdit; - chbxPrintStyleYearlyTaskPad: TcxCheckBox; - chbxPrintStyleYearlyNotesAreaBlank: TcxCheckBox; - chbxPrintStyleYearlyNotesAreaLined: TcxCheckBox; - lblPrintStyleYearlyInclude: TLabel; - cbxPrintStyleYearlyLayout: TcxComboBox; - lblPrintStyleYearlyLayout: TLabel; - chbxPrimaryPageHeadersOnly: TcxCheckBox; - chbxPrintStyleDailyShowResourceImages: TcxCheckBox; - chbxPrintStyleDailyShowEventImages: TcxCheckBox; - Bevel2: TBevel; - Bevel3: TBevel; - chbxPrintStyleWeeklyShowEventImages: TcxCheckBox; - chbxPrintStyleWeeklyShowResourceImages: TcxCheckBox; - Bevel4: TBevel; - chbxPrintStyleMonthlyShowEventImages: TcxCheckBox; - chbxPrintStyleMonthlyShowResourceImages: TcxCheckBox; - chbxPrintStyleYearlyShowEventImages: TcxCheckBox; - Bevel5: TBevel; - procedure PageControl1Change(Sender: TObject); - procedure lbxStylesClick(Sender: TObject); - procedure btnStyleFontClick(Sender: TObject); - procedure btnStyleColorClick(Sender: TObject); - procedure btnStyleBackgroundBitmapClick(Sender: TObject); - procedure btnStyleBackgroundBitmapClearClick(Sender: TObject); - procedure btnStyleRestoreDefaultsClick(Sender: TObject); - procedure btnStylesSaveAsClick(Sender: TObject); - procedure cbxStyleSheetsClick(Sender: TObject); - procedure miStylesSelectAllClick(Sender: TObject); - procedure cbxStyleSheetsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure btnStyleSheetNewClick(Sender: TObject); - procedure btnStyleSheetCopyClick(Sender: TObject); - procedure btnStyleSheetDeleteClick(Sender: TObject); - procedure btnStyleSheetRenameClick(Sender: TObject); - procedure lblUseNativeStylesClick(Sender: TObject); - procedure OptionsFormattingClick(Sender: TObject); - procedure pmStylesPopup(Sender: TObject); - procedure cbxPrintStylesClick(Sender: TObject); - procedure pbxPrintStylesPreviewPaint(Sender: TObject); - procedure cbxPrintStyleDailyLayoutClick(Sender: TObject); - procedure chbxPrintStyleOptionsViewClick(Sender: TObject); - procedure cbxPrintStyleWeeklyArrangeClick(Sender: TObject); - procedure chbxPrintStyleWeeklyDontPrintWeekendsClick(Sender: TObject); - procedure chbxPrintStyleMonthlyDontPrintWeekendsClick(Sender: TObject); - procedure chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick( - Sender: TObject); - procedure cbxPrintStyleTrifoldSectionModeClick(Sender: TObject); - procedure chbxPrintStyleDetailsUsePaginationClick(Sender: TObject); - procedure cbxPrintStyleDetailsPaginationClick(Sender: TObject); - procedure cbxPrintStyleWeeklyLayoutClick(Sender: TObject); - procedure cbxPrintStyleMonthlyLayoutClick(Sender: TObject); - procedure dePrintRangeStartEditValueChanged(Sender: TObject); - procedure dePrintRangeEndEditValueChanged(Sender: TObject); - procedure cbxStyleSheetsPropertiesDrawItem(AControl: TcxCustomComboBox; - ACanvas: TcxCanvas; AIndex: Integer; const ARect: TRect; - AState: TOwnerDrawState); - procedure tePrintStylePrintRangePropertiesEditValueChanged( - Sender: TObject); - procedure LookAndFeelChange(Sender: TObject); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure sePrintStyleResourceCountPerPagePropertiesEditValueChanged( - Sender: TObject); - procedure tePrintStylePrintRangePropertiesChange(Sender: TObject); - procedure sePrintStyleResourceCountPerPagePropertiesChanged( - Sender: TObject); - procedure StyleController1StyleChanged(Sender: TObject); - procedure pbPreviewPaint(Sender: TObject); - procedure cbxLookAndFeelPropertiesChange(Sender: TObject); - procedure chbxPrintStyleMemoStartEachItemOnNewPageClick( - Sender: TObject); - procedure chbxPrintStyleMemoPrintOnlySelectedEventsClick( - Sender: TObject); - procedure cbxPrintStyleWeeklyDaysLayoutClick(Sender: TObject); - procedure cbxPrintStyleYearlyLayoutClick(Sender: TObject); - procedure cbxPrintStyleYearlyMonthPagesPerYearClick(Sender: TObject); - procedure chbxPrimaryPageHeadersOnlyClick(Sender: TObject); - procedure chbxPrintStyleShowResourceImagesClick(Sender: TObject); - procedure chbxPrintStyleShowEventImagesClick(Sender: TObject); - private - FActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; - FActiveStyleAssigned: Boolean; - FIsFormClosing: Boolean; - lbxStyles: TdxStylesListBox; - wpPrintStyles: TList; - - function GetActivePrintStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetActiveStyle: TcxStyle; - function GetComponent: TcxScheduler; - function GetHasSelectedStyles: Boolean; - function GetHasSelectedStylesWithAssignedBitmap: Boolean; - function GetReportLink: TcxSchedulerReportLink; - - function CanSelectAllStyles: Boolean; - procedure CreateControls; - - procedure RecreateStylesListBox; - procedure RestoreSelectedStyles(AList: TList); - procedure SaveSelectedStyles(AList: TList); - procedure SetActivePage; - - procedure SetOptionsFormattingByIndex(AnIndex: Integer; AValue: Boolean); - procedure SetPrintStyleOptionsViewByIndex(AnIndex: Integer; AValue: Boolean); - procedure SetPrintStyleRangeByIndex(AnIndex: Integer; const ATime: TDateTime); - procedure SetPrintStyleResourceCountPerPageByIndex(AnIndex: Integer; AValue: TcxEditValue); - procedure SetShowImagesCheckBoxes(AEventImages, AResourceImages: TcxCheckBox; - APrintStyle: TcxCustomSchedulerReportLinkPrintStyle); - protected - procedure AssignDailyTabObjects; virtual; - procedure AssignDetailsTabObjects; virtual; - procedure AssignMemoTabObjects; virtual; - procedure AssignMonthlyTabObjects; virtual; - procedure AssignTrifoldTabObjects; virtual; - procedure AssignWeeklyTabObjects; virtual; - procedure AssignYearlyTabObjects; virtual; - - function CanApply: Boolean; override; - procedure DoApply; override; - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - - function CheckPrintRange: Boolean; virtual; - function CheckPrintStyleSettings: Boolean; virtual; - function IsValidConditions: Boolean; virtual; - procedure LoadCaption(AControl: TControl; StrPtr: Pointer); overload; - procedure LoadCaption(AItem: TMenuItem; StrPtr: Pointer); overload; - procedure LoadStrings; override; - procedure LoadStringsCombo(ACombo: TcxComboBox; ACaptions: array of Pointer); - procedure LoadStringsDaily; virtual; - procedure LoadStringsDetails; virtual; - procedure LoadStringsMemo; virtual; - procedure LoadStringsMonthly; virtual; - procedure LoadStringsOther; virtual; - procedure LoadStringsTrifold; virtual; - procedure LoadStringsWeekly; virtual; - procedure LoadStringsYearly; virtual; - - procedure PreviewDrawPageContent(ACanvas: TCanvas; ABounds: TRect); virtual; - - procedure UpdateControlsState; override; - procedure UpdateEnabled(AControl: TControl; AEnabled: Boolean); overload; - procedure UpdateEnabled(AItem: TMenuItem; AEnabled: Boolean); overload; - procedure UpdateEnabledControls(AControls: array of TControl; AEnabled: Boolean); - procedure UpdatePreview; override; - - function GetDesignerTabIndex: Integer; override; - procedure SetDesignerTabIndex(Value: Integer); override; - - procedure DoActiveStyleSheetChanged; override; - procedure DoFormActivated(AnActive: Boolean); override; - procedure DoRefreshStylesList; override; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); override; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); override; - - procedure GetSelectedStyleNames(AStrings: TStrings); override; - procedure GetStyleNames(out AStrings: TStrings); override; - procedure GetStyleSheetNames(out AStrings: TStrings); override; - - procedure ActivatePrintStyleTab; virtual; - procedure AssignTabSheetObjects; virtual; - function FindTabIndexByPrintStyle(APrintStyle: TcxCustomSchedulerReportLinkPrintStyle): Integer; virtual; - procedure RefreshPrintStyles; virtual; - - property ActivePrintStyle: TcxCustomSchedulerReportLinkPrintStyle read GetActivePrintStyle; - property ActiveStyle: TcxStyle read GetActiveStyle; - property HasSelectedStyles: Boolean read GetHasSelectedStyles; - property HasSelectedStylesWithAssignedBitmap: Boolean read GetHasSelectedStylesWithAssignedBitmap; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; override; - - property Component: TcxScheduler read GetComponent; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - end; - - // cells - - { TcxSchedulerReportPageSite } - - TcxSchedulerReportPageSite = class(TdxReportCell) - protected - FPageIndex: Integer; - FPrimaryPage: Boolean; - - procedure ReadProperties(AReader: TdxPSDataReader); override; - procedure WriteProperties(AWriter: TdxPSDataWriter); override; - public - property PageIndex: Integer read FPageIndex; - property PrimaryPage: Boolean read FPrimaryPage; - end; - - { TcxSchedulerReportPageItemCell } - - TcxSchedulerReportPageItemCell = class(TdxReportCell) - private - function GetPageIndex: Integer; - function GetPageSite: TcxSchedulerReportPageSite; - function GetPrimaryPage: Boolean; - function GetReportLink: TcxSchedulerReportLink; - protected - function GetType: TcxSchedulerReportItemsType; virtual; - - procedure SetCellViewParams(AItem: TdxReportVisualItem; const AParams: TcxViewParams); overload; - procedure SetCellViewParams(AItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); overload; - - property ReportLink: TcxSchedulerReportLink read GetReportLink; - public - constructor Create(AParent: TdxReportCell); override; - property PageSite: TcxSchedulerReportPageSite read GetPageSite; - property PrimaryPage: Boolean read GetPrimaryPage; - property PageIndex: Integer read GetPageIndex; - end; - - { TcxSchedulerReportNotesDataCell } - - TcxSchedulerReportNotesDataCell = class(TAbstractdxReportCellData) - private - FCaption: string; - FCaptionHeight: Integer; - FLined: Boolean; - function GetMultiLine: Boolean; - function GetTextAlignX: TcxTextAlignX; - function GetTextAlignY: TcxTextAlignY; - procedure SetMultiLine(Value: Boolean); - procedure SetTextAlignX(Value: TcxTextAlignX); - procedure SetTextAlignY(Value: TcxTextAlignY); - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor Create(AParent: TdxReportCell); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - - property Caption: string read FCaption write FCaption; - property CaptionHeight: Integer read FCaptionHeight write FCaptionHeight; - property Lined: Boolean read FLined write FLined; - property MultiLine: Boolean read GetMultiLine write SetMultiLine; - property TextAlignX: TcxTextAlignX read GetTextAlignX write SetTextAlignX; - property TextAlignY: TcxTextAlignY read GetTextAlignY write SetTextAlignY; - end; - - TcxSchedulerReportNotesDataCellClass = class of TcxSchedulerReportNotesDataCell; - - { TcxSchedulerReportNotesAreaCell } - - TcxSchedulerReportNotesAreaCell = class(TcxSchedulerReportPageItemCell) - private - FLined: Boolean; - function GetDataCell: TcxSchedulerReportNotesDataCell; - protected - procedure BoundsChanged; override; - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - function GetType: TcxSchedulerReportItemsType; override; - function GetDataCellClass: TcxSchedulerReportNotesDataCellClass; virtual; - procedure SetFontIndex(Value: Integer); override; - public - constructor Create(AParent: TdxReportCell); override; - constructor CreateEx(AParent: TdxReportCell; ALined: Boolean); virtual; - property DataCell: TcxSchedulerReportNotesDataCell read GetDataCell; - property Lined: Boolean read FLined; - end; - - { TcxSchedulerReportTaskPadCell } - - TcxSchedulerReportTaskPadCell = class(TcxSchedulerReportNotesAreaCell) - private - function GetTaskPadDataSite: TdxReportCell; - protected - procedure BoundsChanged; override; - function CalculateTaskPadDataSiteBounds: TRect; virtual; - function GetType: TcxSchedulerReportItemsType; override; - public - constructor CreateEx(AParent: TdxReportCell; ALined: Boolean); override; - - property TaskPadDataSite: TdxReportCell read GetTaskPadDataSite; - end; - - { TcxSchedulerReportSchedulerHeaderDataCell } - - TcxSchedulerReportSchedulerHeaderDataCell = class(TAbstractdxReportCellData) - public - constructor Create(AParent: TdxReportCell); override; - end; - - { TcxSchedulerReportSchedulerHeaderCell } - - TcxSchedulerReportSchedulerHeaderCell = class(TcxSchedulerReportPageItemCell) - private - FContent: TcxSchedulerReportSchedulerHeaderDataCell; - FDate: TDateTime; - FPrimaryText: string; //todo: remove - FSecondaryText: string; //todo: remove - FPrimaryTextCell: TdxReportCellString; - FSecondaryTextCell: TdxReportCellString; - protected - function AddContentCell: TcxSchedulerReportSchedulerHeaderDataCell; virtual; - function AddTextCell(AText: string; const ABounds: TRect; AMultiLine: Boolean): TdxReportCellString; - function GetType: TcxSchedulerReportItemsType; override; - - property Date: TDateTime read FDate write FDate; - property PrimaryText: string read FPrimaryText write FPrimaryText; //todo: remove - property SecondaryText: string read FSecondaryText write FSecondaryText; //todo: remove - public - constructor Create(AParent: TdxReportCell); override; - procedure AdjustTextSize; - - property Content: TcxSchedulerReportSchedulerHeaderDataCell read FContent; - property PrimaryTextCell: TdxReportCellString read FPrimaryTextCell; - property SecondaryTextCell: TdxReportCellString read FSecondaryTextCell; - end; - - { TcxSchedulerReportDateNavigatorItem } - - TcxSchedulerReportDateNavigatorItem = class(TdxReportCellPreviewText) - private - function GetDateNavigator: TcxSchedulerReportDateNavigatorCell; - protected - function GetDefaultDTFormat: DWORD; override; - procedure SetText(const Value: string); override; - public - constructor Create(AParent: TdxReportCell); override; - - property DateNavigator: TcxSchedulerReportDateNavigatorCell read GetDateNavigator; - end; - - { TcxSchedulerReportDateNavigatorHeader } - - TcxSchedulerReportDateNavigatorHeader = class(TcxSchedulerReportDateNavigatorItem) - private - FMonth: Word; - FYear: Word; - protected - function GetText: string; override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; AYear, AMonth: Word); - procedure Assign(Source: TPersistent); override; - - property Month: Word read FMonth; - property Year: Word read FYear; - end; - - { TcxSchedulerReportDateNavigatorDay } - - TcxSchedulerReportDateNavigatorDay = class(TcxSchedulerReportDateNavigatorItem) - private - FDay: Integer; - FCol: Integer; - FRow: Integer; - function GetBold: Boolean; - function GetDate: TDate; - function GetMonth: Word; - function GetYear: Word; - procedure SetBold(Value: Boolean); - protected - function GetText: string; override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; - ADay, ACol, ARow: Integer; ABold: Boolean); virtual; - procedure Assign(Source: TPersistent); override; - - property Col: Integer read FCol; - property Date: TDate read GetDate; - property Day: Integer read FDay write FDay; - property Bold: Boolean read GetBold write SetBold; - property Month: Word read GetMonth; - property Row: Integer read FRow; - property Year: Word read GetYear; - end; - - { TcxSchedulerReportDateNavigatorDayCaption } - - TcxSchedulerReportDateNavigatorDayCaption = class(TcxSchedulerReportDateNavigatorItem) - private - FCol: Integer; - FDayOfWeek: TDay; - FDayText: string; - protected - function GetText: string; override; - function GetDayText: string; virtual; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; ADayOfWeek: TDay; ACol: Integer); virtual; - procedure Assign(Source: TPersistent); override; - - property Col: Integer read FCol; - property DayOfWeek: TDay read FDayOfWeek; - end; - - { TcxSchedulerReportDateNavigatorWeekNumber } - - TcxSchedulerReportDateNavigatorWeekNumber = class(TcxSchedulerReportDateNavigatorItem) - private - FWeekNumber: Integer; - FRow: Integer; - protected - function GetText: string; override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; AWeekNumber, ARow: Integer); virtual; - procedure Assign(Source: TPersistent); override; - - property Row: Integer read FRow; - property WeekNumber: Integer read FWeekNumber write FWeekNumber; - end; - - { TcxSchedulerReportDateNavigatorCell } - - TcxSchedulerReportDateNavigatorCell = class(TcxSchedulerReportPageItemCell) - private - FBoldedDays: TcxSchedulerDateList; - FFirstWeekOfYear: TcxFirstWeekOfYear; - FMonth: Word; - FShowDatesContainingEventsInBold: Boolean; - FShowWeekNumbers: Boolean; - FStartOfWeek: TDay; - FYear: Word; - - FColWidth: Integer; - FDayCaptionsHeight: Integer; - FHeaderHeight: Integer; - FMonthSize: TSize; - FRowHeight: Integer; - FVertOffset: Integer; - FContentParams: TdxReportItemViewParams; - FHeaderParams: TdxReportItemViewParams; - - FDayCaptionCount: Integer; - FDayCount: Integer; - FWeekNumberCount: Integer; - - class function GetMonthHeight(AHeaderHeight, ADayCaptionsHeight, ARowHeight: Integer): Integer; - function GetDay(Index: Integer): TcxSchedulerReportDateNavigatorDay; - function GetDayCaption(Index: Integer): TcxSchedulerReportDateNavigatorDayCaption; - function GetHeader: TcxSchedulerReportDateNavigatorHeader; - function GetWeekNumber(Index: Integer): TcxSchedulerReportDateNavigatorWeekNumber; - protected - procedure AdjustItemsVertical; - function ColOfDate(ADate: TDateTime): Integer; - procedure CreateDayCaptions; virtual; - procedure CreateDay(const ABounds: TRect; ADate: TDateTime; ACol, ARow: Integer); virtual; - procedure CreateItems; - procedure CreateLines; virtual; - procedure CreateMonth; virtual; - procedure CreateMonthHeader; virtual; - procedure CreateWeekNumber(const ABounds: TRect; ADate: TDateTime; ARow: Integer); virtual; - class procedure GetContentPartSizes(AFont: TFont; var AColWidth, ARowHeight, - ADayCaptionsHeight: Integer; AFontSize: Integer = 0); virtual; - function GetDayBoundsFromColAndRow(ACol, ARow: Integer): TRect; virtual; - function GetDayIsBold(ADate: TDateTime): Boolean; virtual; - function GetHeaderBounds: TRect; virtual; - class procedure GetHeaderPartSizes(AFont: TFont; var AHeaderHeight: Integer; - AFontSize: Integer = 0); virtual; - function GetMonthSize(const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; - function GetType: TcxSchedulerReportItemsType; override; - procedure SetViewParams(const AContentParams, AHeaderParams: TdxReportItemViewParams); virtual; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property ColWidth: Integer read FColWidth; - property DayCaptionsHeight: Integer read FDayCaptionsHeight; - property HeaderHeight: Integer read FHeaderHeight; - property MonthSize: TSize read FMonthSize; - property RowHeight: Integer read FRowHeight; - property ContentParams: TdxReportItemViewParams read FContentParams; - property HeaderParams: TdxReportItemViewParams read FHeaderParams; - public - constructor Create(AParent: TdxReportCell); override; - constructor CreateEx(AParent: TdxReportCell; AFirstWeekOfYear: TcxFirstWeekOfYear; - AYear, AMonth: Word; AShowDatesContainingEventsInBold, AShowWeekNumbers: Boolean); virtual; - - procedure AdjustSize(var AContentParams, AHeaderParams: TdxReportItemViewParams; AHeight, AMaxHeight: Integer); virtual; - function CalculateSize(const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; - class function MeasureDateNavigatorHeight(const AContentParams, AHeaderParams: TcxViewParams): Integer; virtual; - - property FirstWeekOfYear: TcxFirstWeekOfYear read FFirstWeekOfYear write FFirstWeekOfYear; - property Month: Word read FMonth write FMonth; - property ShowDatesContainingEventsInBold: Boolean read FShowDatesContainingEventsInBold write FShowDatesContainingEventsInBold; - property ShowWeekNumbers: Boolean read FShowWeekNumbers write FShowWeekNumbers; - property StartOfWeek: TDay read FStartOfWeek; - property Year: Word read FYear write FYear; - - // Helpers - property DayCaptionCount: Integer read FDayCaptionCount; - property DayCaptions[Index: Integer]: TcxSchedulerReportDateNavigatorDayCaption read GetDayCaption; - property DayCount: Integer read FDayCount; - property Days[Index: Integer]: TcxSchedulerReportDateNavigatorDay read GetDay; - property Header: TcxSchedulerReportDateNavigatorHeader read GetHeader; - property WeekNumberCount: Integer read FWeekNumberCount; - property WeekNumbers[Index: Integer]: TcxSchedulerReportDateNavigatorWeekNumber read GetWeekNumber; - end; - - { TcxSchedulerReportSchedulingAreaCell } - - TcxSchedulerReportSchedulingAreaCell = class(TcxSchedulerReportPageItemCell) - private - FVisibleDays: TcxSchedulerDateList; - FDaysList: TStringList; - protected - function GetType: TcxSchedulerReportItemsType; override; - property VisibleDays: TcxSchedulerDateList read FVisibleDays; - public - constructor Create(AParent: TdxReportCell); override; - destructor Destroy; override; - procedure DrawContent(DC: HDC; DrawRect: TRect; const OriginRect: TRect; AStage: TdxPSRenderStages); override; - procedure DrawItself(DC: HDC; AStage: TdxPSRenderStages); override; - end; - - TcxSchedulerReportCustomCell = class(TAbstractdxReportCellData) - private - function GetReportLink: TcxSchedulerReportLink; - protected - FDateTime: TDateTime; - FDayBorderColor: TColor; - FNoClip: Boolean; - procedure DrawCellFrame(DC: HDC; const ARect: TRect; ABorders: TcxBorders = []; - ABorderColor: TColor = clDefault; ALineWidth: Integer = 1); - procedure DrawCellRect(DC: HDC; const ARect: TRect; ABorders: TcxBorders = []; - ABorderColor: TColor = clDefault; ALineWidth: Integer = 1; AColor: TColor = clDefault); - procedure DrawCellText(DC: HDC; const ARect: TRect; const AText: string; AlignHorz: TcxTextAlignX; - AlignVert: TcxTextAlignY; AFont: TFont = nil; AColor: TColor = clDefault; AMultiLine: Boolean = False); - procedure DrawCellTextVert(DC: HDC; const ARect: TRect; const AText: string; - AlignHorz: TcxTextAlignX; AlignVert: TcxTextAlignY; AFont: TFont = nil; AMultiLine: Boolean = True); - procedure DrawCellState(DC: HDC; R: TRect; - AState: Integer; ABorders: TcxBorders = []; ABorderColor: TColor = clBlack); - - function AdjustTextRect(const ARect: TRect): TRect; - function ExcludeBorders(const ARect: TRect; ABorders: TcxBorders; ABorderWidth: Integer = 1): TRect; - function FixupWidth(AWidth: Integer): Integer; - function GetFixupRect(DC: HDC; const ARect: TRect): TRect; - function InflateRect(const ARect: TRect; dX, dY: Integer): TRect; - - property ReportLink: TcxSchedulerReportLink read GetReportLink; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); virtual; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class procedure RegisterMirrorClass; virtual; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; virtual; - procedure SuppressColoration; virtual; - end; - - { TcxSchedulerReportContentCell } - - TcxSchedulerReportContentCell = class(TcxSchedulerReportCustomCell) - protected - FBorderColor: TColor; - FShowTimeLine: Boolean; -// FSmallFont: Boolean; - FState: Integer; - FTimeLineBorders: TcxBorders; - function HasBorderColoration: Boolean; override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - procedure SuppressColoration; override; - end; - - { TcxSchedulerReportHeaderItemCell } - - TcxSchedulerReportHeaderItemCell = class(TcxSchedulerReportCustomCell) - private - FCaption: string; - FDate: TDateTime; - FIsResourceHeader: Boolean; - FResourceID: Variant; - FRotateText: Boolean; - //support images - FImageIndex: Integer; - FImages: TCustomImageList; - FImageRect: TRect; - FTextRect: TRect; - function GetTextAlignX: TcxTextAlignX; - function GetTextAlignY: TcxTextAlignY; - procedure SetTextAlignX(Value: TcxTextAlignX); - procedure SetTextAlignY(Value: TcxTextAlignY); - protected - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - function HasImage: Boolean; virtual; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - procedure DrawImage(DC: HDC); - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - property TextAlignX: TcxTextAlignX read GetTextAlignX write SetTextAlignX; - property TextAlignY: TcxTextAlignY read GetTextAlignY write SetTextAlignY; - - property TextRect: TRect read FTextRect; - property Caption: string read FCaption write FCaption; - property Date: TDateTime read FDate; - property ImageIndex: Integer read FImageIndex; - property ImageRect: TRect read FImageRect; - property Images: TCustomImageList read FImages; - property IsResourceHeader: Boolean read FIsResourceHeader; - property ResourceID: Variant read FResourceID; - property RotateText: Boolean read FRotateText; - end; - - { TcxSchedulerReportGroupSeparatorCell } - - TcxSchedulerReportGroupSeparatorCell = class(TcxSchedulerReportCustomCell) - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - end; - - { TcxSchedulerReportContainerCell } - - TcxSchedulerReportContainerCell = class(TcxSchedulerReportCustomCell) - public - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - end; - - { TcxSchedulerReportBackgroundSlotCell } - - TcxSchedulerReportBackgroundSlotCell = class(TcxSchedulerReportCustomCell) - protected - FDisplayText: string; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - property DisplayText: string read FDisplayText write FDisplayText; - end; - - { TcxSchedulerReportDailyTimeRulerCellsSite } - - TcxSchedulerReportDailyTimeRulerCellsSite = class(TdxReportCell) - private - FLargeFont: TFont; - FLargeFontIndex: Integer; - function GetLargeFont: TFont; - protected - procedure SetFontIndex(Index: Integer); override; - procedure ReadProperties(AReader: TdxPSDataReader); override; - procedure WriteProperties(AWriter: TdxPSDataWriter); override; - public - constructor Create(AParent: TdxReportCell); override; - destructor Destroy; override; - property LargeFont: TFont read GetLargeFont; - end; - - { TcxSchedulerReportDailyTimeRulerCell } - - TcxSchedulerReportDailyTimeRulerCell = class(TcxSchedulerReportCustomCell) - private - function GetBoundsRect(AType: Boolean): TRect; - function GetDisplayText(AType: Boolean): string; - function GetLargeFont: TFont; - function GetTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; - protected - FBounds: array[Boolean] of TRect; - FDisplayTexts: array[Boolean] of string; - FHasAdditionalTimeZone: Boolean; - FHour: Integer; - FLineColor: TColor; - FLineCount: Integer; - FShowMinutes: Boolean; - procedure CalculateDisplayInfo; - procedure DrawTimeZone(DC: HDC; const ABounds: TRect; const AText: string; AIsCurrent: Boolean); virtual; - procedure DrawTimeZoneLabel(DC: HDC; const ABounds: TRect; const AText: string; ABorders: TcxBorders); virtual; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property LargeFont: TFont read GetLargeFont; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - procedure SuppressColoration; override; - - property Bounds[ACurrentTimeZone: Boolean]: TRect read GetBoundsRect; - property DisplayTexts[ACurrentTimeZone: Boolean]: string read GetDisplayText; - property HasAdditionalTimeZone: Boolean read FHasAdditionalTimeZone; - property Hour: Integer read FHour; - property LineCount: Integer read FLineCount; - property ShowMinutes: Boolean read FShowMinutes; - property TimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite read GetTimeRulerSite; - end; - - { TcxSchedulerReportMonthDayCell } - - TcxSchedulerReportMonthDayCell = class(TcxSchedulerReportContentCell) - private - FSmallFont: Boolean; - FDisplayText: string; - FDontPrint: Boolean; - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - property DisplayText: string read FDisplayText write FDisplayText; - property SmallFont: Boolean read FSmallFont write FSmallFont; - end; - - { TcxSchedulerReportTimeLinePart} - - TcxSchedulerReportTimeLinePart = class(TdxReportCellBox) - private - FState: Integer; - FTriangle: Boolean; - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - property State: Integer read FState write FState; - public - constructor CreateEx(AParent: TdxReportCell; ATriangle: Boolean; AState: Integer); - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - end; - - { TcxSchedulerReportTimeLineCell } - - TcxSchedulerReportTimeLineCell = class(TdxReportCell) - private - FCurrentValue: TAbstractdxReportCellData; - public - constructor Create(AParent: TdxReportCell); override; - procedure SetTimeRect(const ABounds: TRect; AState: Integer); - end; - - TcxSchedulerReportCellString = class(TdxReportCellString) - protected - function GetDefaultDTFormat: DWORD; override; - end; - - { TcxSchedulerReportCustomEventCell } - - TcxSchedulerReportCustomEventCell = class(TdxReportCell) - private - function GetPrintStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetReportLink: TcxSchedulerReportLink; - function GetSuppressColoration: Boolean; - protected - FCaptionCell: TdxReportCellString; - FMessageCell: TAbstractdxReportCellData; - FStartCell: TdxReportCellString; - FFinishCell: TdxReportCellString; - FTimeLineCell: TcxSchedulerReportTimeLineCell; - procedure SetViewParams(const AViewParams: TcxViewParams); virtual; - public - function CreateStringCell(const AText: string; AMultiline: Boolean = True; AData: Integer = 0): TdxReportCellString; virtual; - - property CaptionCell: TdxReportCellString read FCaptionCell; - property StartCell: TdxReportCellString read FStartCell; - property FinishCell: TdxReportCellString read FFinishCell; - property MessageCell: TAbstractdxReportCellData read FMessageCell; - property PrintStyle: TcxCustomSchedulerReportLinkPrintStyle read GetPrintStyle; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - property TimeLineCell: TcxSchedulerReportTimeLineCell read FTimeLineCell; - property SuppressColoration: Boolean read GetSuppressColoration; - end; - - { TcxSchedulerReportEventCell } - - TcxSchedulerReportEventCell = class(TcxSchedulerReportCustomEventCell) - private - FCaptionLeft: Integer; - FContentBounds: TRect; - FEditViewInfo: TcxCustomEditViewInfo; - FEventViewInfo: TcxSchedulerEventCellViewInfo; - FHasDetailInfo: Boolean; - FHasImages: Boolean; - FHasMessage: Boolean; - FIsHeaderEvent: Boolean; - FIsNeedCreateTimeCells: Boolean; - FMessage: Variant; - procedure CheckBounds(var ABounds: TRect); - function GetEvent: TcxSchedulerControlEvent; - protected - procedure AdjustItemsHeight(DC: HDC); virtual; - procedure CalculateLayout; virtual; - procedure CalculateTimeLine(DC: HDC); virtual; - function CreateCaptionCell: TdxReportCellString; virtual; - procedure CreateDataItems; virtual; - procedure CreateEventImageCells; virtual; - procedure CreateMessageCell(AMessage: Variant; - AProperties: TcxCustomEditProperties; AViewParams: TcxViewParams); - function CreateTimeLineCell: TcxSchedulerReportTimeLineCell; virtual; - function CreateTimeTextCell(const ATimeText: string; AData: Integer = 0): TdxReportCellString; virtual; - function GetCaptionRect(DC: HDC): TRect; virtual; - function GetContentBounds(DC: HDC): TRect; virtual; - function GetHasImages: Boolean; virtual; - function GetHasMessage: Boolean; virtual; - function GetMessageClass(AProperties: TcxCustomEditProperties): TdxReportCellDataClass; virtual; - function GetMessageRect(DC: HDC): TRect; virtual; - function GetRelativeRect(const R: TRect): TRect; - function GetTimeLineRect(DC: HDC): TRect; virtual; - procedure InitializeFromViewInfo(AEventViewInfo: TcxSchedulerEventCellViewInfo); - procedure SetViewParams(const AViewParams: TcxViewParams); override; - - property ContentBounds: TRect read FContentBounds; - property Event: TcxSchedulerControlEvent read GetEvent; - property EventViewInfo: TcxSchedulerEventCellViewInfo read FEventViewInfo; - property HasDetailInfo: Boolean read FHasDetailInfo; - property HasImages: Boolean read FHasImages; - property IsHeaderEvent: Boolean read FIsHeaderEvent; - property IsNeedCreateTimeCells: Boolean read FIsNeedCreateTimeCells; - public - constructor CreateFrom(AParent: TdxReportCell; AEventViewInfo: TcxSchedulerEventCellViewInfo); virtual; - - property CaptionCell: TdxReportCellString read FCaptionCell; - property HasMessage: Boolean read FHasMessage; - property Message: Variant read FMessage; - property MessageCell; - property TimeLineCell; - property StartCell; - property FinishCell; - end; - - { TcxSchedulerReportDetailsEventCell } - - TcxSchedulerReportDetailsEventCell = class(TcxSchedulerReportCustomEventCell) - protected - FContinued: Boolean; - FDate: TDateTime; - - FEvent: TcxSchedulerEvent; - FLineHeight: Integer; - procedure CreateCaptionCell; virtual; - procedure CreateDataItems; virtual; - procedure CreateMessageCell; virtual; - procedure CreateTimeCell; virtual; - function GetCaptionCellText: string; virtual; - function GetMessageCellText: string; virtual; - function GetTimeCellText: string; virtual; - procedure SetViewParams(const AViewParams: TcxViewParams); override; - public - constructor CreateEx(AParent: TdxReportCell; AEvent: TcxSchedulerEvent; - ADate: TDateTime; const AParams: TcxViewParams; AContinued: Boolean = False); - function CalculateHeight: Integer; virtual; - procedure CalculateLayout(AWidth, ATimeWidth: Integer); virtual; - - property Date: TDateTime read FDate; - property Event: TcxSchedulerEvent read FEvent; - property Continued: Boolean read FContinued; - end; - - { TcxSchedulerReportMemoEventCell } - - TcxSchedulerReportMemoEventCell = class(TcxSchedulerReportDetailsEventCell) - protected - FCaptionLabelCell: TdxReportCellString; - FHeaderCell: TdxReportCellString; - FLocationCell: TdxReportCellString; - FLocationLabelCell: TdxReportCellString; - FShowTimeAsCell: TdxReportCellString; - FShowTimeAsLabelCell: TdxReportCellString; - FStartLabelCell: TdxReportCellString; - FFinishLabelCell: TdxReportCellString; - FRecurrenceCell: TdxReportCellString; - FRecurrenceLabelCell: TdxReportCellString; - FRecurrencePatternCell: TdxReportCellString; - FRecurrencePatternLabelCell: TdxReportCellString; - procedure CreateDataItems; override; - function GetCaptionCellText: string; override; - function GetMessageCellText: string; override; - function GetTimeCellText: string; override; - procedure SetViewParams(const AViewParams: TcxViewParams); override; - - procedure CalculateLabelAndData(ALabelCell, ADataCell: TAbstractdxReportCellData; - DC: HDC; ATimeWidth, AWidth: Integer; var ATop: Integer); virtual; - procedure CreateHeader; virtual; - procedure CreateFinish; virtual; - procedure CreateFinishCell; virtual; - procedure CreateFinishLabelCell; virtual; - procedure CreateLocation; virtual; - procedure CreateLocationCell; virtual; - procedure CreateLocationLabelCell; virtual; - procedure CreateMessage; virtual; - procedure CreateRecurrence; virtual; - procedure CreateRecurrenceCell; virtual; - procedure CreateRecurrenceLabelCell; virtual; - procedure CreateRecurrencePattern; virtual; - procedure CreateRecurrencePatternCell; virtual; - procedure CreateRecurrencePatternLabelCell; virtual; - procedure CreateShowTimeAs; virtual; - procedure CreateShowTimeAsCell; virtual; - procedure CreateShowTimeAsLabelCell; virtual; - procedure CreateStart; virtual; - procedure CreateStartLabelCell; virtual; - procedure CreateSubject; virtual; - procedure CreateSubjectLabelCell; virtual; - function GetHeaderCellText: string; virtual; - function GetRecurrenceCellText: string; virtual; - function GetRecurrencePatternCellText: string; virtual; - function GetShowTimeAsCellText: string; virtual; - public - procedure CalculateLayout(AWidth, ATimeWidth: Integer); override; - - property CaptionLabelCell: TdxReportCellString read FCaptionLabelCell; - property HeaderCell: TdxReportCellString read FHeaderCell; - property LocationCell: TdxReportCellString read FLocationCell; - property LocationLabelCell: TdxReportCellString read FLocationLabelCell; - property ShowTimeAsCell: TdxReportCellString read FShowTimeAsCell; - property ShowTimeAsLabelCell: TdxReportCellString read FShowTimeAsLabelCell; - property StartLabelCell: TdxReportCellString read FStartLabelCell; - property FinishLabelCell: TdxReportCellString read FFinishLabelCell; - property RecurrenceCell: TdxReportCellString read FRecurrenceCell; - property RecurrenceLabelCell: TdxReportCellString read FRecurrenceLabelCell; - property RecurrencePatternCell: TdxReportCellString read FRecurrencePatternCell; - property RecurrencePatternLabelCell: TdxReportCellString read FRecurrencePatternLabelCell; - end; - - { TcxSchedulerReportCommonCellsProducer } - - TcxSchedulerReportCommonCellsProducer = class(TcxCustomResourceViewAdapter) - private - FSite: TcxSchedulerReportSchedulingAreaCell; - FStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetStyles: TcxSchedulerReportLinkStyles; - protected - FBounds: TRect; - - procedure AfterCalculatePage; override; - - function CanCalculate: Boolean; override; - - procedure ConvertSchedulerCellToPSCells(AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); virtual; - function CreateEventCell(AEventViewInfo: TcxSchedulerEventCellViewInfo): TcxSchedulerReportEventCell; virtual; - - procedure DoInitialize( - var ASelectedDays: TcxSchedulerDateList; var AEvents: TcxSchedulerCachedEventList); override; - // layout settings - function GetCompressWeekends: Boolean; override; - function GetDontPrintWeekEnds: Boolean; override; - function GetHideSelection: Boolean; override; - function GetPageBounds: TRect; override; - function GetPagesPerWeek: Byte; override; - function GetPrintExactlyOneMonth: Boolean; override; - function GetPrintRange(Index: Integer): TDateTime; override; - function GetPrimaryPage: Boolean; override; - function GetStylesAdapter: IcxSchedulerStylesAdapter; override; - // styles - procedure SetCellViewParams(ACell: TdxReportVisualItem; const AParams: TcxViewParams); virtual; - public - constructor CreateEx(AStyle: TcxCustomSchedulerReportLinkPrintStyle; - ASite: TcxSchedulerReportSchedulingAreaCell); virtual; - procedure GetPageResources(AResources: TcxObjectList); override; - procedure Produce; virtual; - property Site: TcxSchedulerReportSchedulingAreaCell read FSite; - property Style: TcxCustomSchedulerReportLinkPrintStyle read FStyle; - property Styles: TcxSchedulerReportLinkStyles read GetStyles; - end; - - TcxSchedulerReportCommonCellsProducerClass = class of TcxSchedulerReportCommonCellsProducer; - - { TcxSchedulerReportWeeksCellsProducer } - - TcxSchedulerReportWeeksCellsProducer = class(TcxSchedulerReportCommonCellsProducer) - end; - - { TcxSchedulerReportDailyCellsProducer } - - TcxSchedulerReportDailyCellsProducer = class(TcxSchedulerReportCommonCellsProducer) - private - FRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; - protected - procedure AfterCalculatePage; override; - procedure BeforeCalculatePage; override; - - function CreateTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; virtual; - procedure ConvertSchedulerCellToPSCells(AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); override; - end; - - { TcxSchedulerReportYearlyCellsProducer } - - TcxSchedulerReportYearlyCellsProducer = class(TcxSchedulerReportCommonCellsProducer, - IUnknown, IcxSchedulerYearViewAdapter) - private - function GetIsPrimaryPage: Boolean; - function GetStyle: TcxSchedulerReportLinkYearlyPrintStyle; - protected - FFirstMonth: Integer; - { IUnknown } - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - { IcxSchedulerYearViewAdapter } - function GetDayCountPerPage: Integer; virtual; - function GetMonthCount: Integer; virtual; - function GetFirstMonth: Integer; virtual; - function GetShowMonthHeaders: Boolean; virtual; - function GetShowWeekDayHeaders: Boolean; virtual; - function GetStartDayIndex: Integer; virtual; - - property IsPrimaryPage: Boolean read GetIsPrimaryPage; - property Style: TcxSchedulerReportLinkYearlyPrintStyle read GetStyle; - public - procedure Produce; override; - end; - -var - SpecialSymbolFont: TFont; - -implementation - -{$R *.dfm} -{$R dxPScxSchedulerLnk.res} - -uses - Messages, ShlObj, dxPSUtl, dxPSRes, dxPSPopupMan, Math, -{$IFDEF DELPHI6} - DateUtils, Types, -{$ENDIF} - ActiveX, CommCtrl; - -const - IDB_DXPSSCHEDULER_STYLEDESIGNPREVIEW = 'IDB_DXPSSCHEDULER_STYLEDESIGNPREVIEW'; - IDB_DXPSSCHEDULER_SMALLDESIGNPREVIEW = 'IDB_DXPSSCHEDULER_SMALLDESIGNPREVIEW'; - dxFormatShowDaysWithEventsInBold = dxPSGlbl.dxFormatCheckEnabled; - dxFormatDayIsBold = dxPSGlbl.dxFormatCheckChecked; - - cxYearStyleDaysOnPrimaryPage = 18; - -type - TLongRec = packed record - Bytes: array [0..3] of Byte; - end; - - TControlAccess = class(TControl); - TcxSchedulerCachedEventListAccess = class(TcxSchedulerCachedEventList); - -var - MirrorClasses: TList; - StyleImages: TImageList; - SchedulerFontHandle: THandle; - SchedulerFontFileName: string; - StylePreviewImages: TImageList; - StyleSheetPrototype: TcxSchedulerReportLinkStyleSheet; - -function cxCompareEventsOrder( - AEvent1, AEvent2: TcxSchedulerControlEvent): Integer; -var - AAllDay1, AAllDay2: Boolean; -begin - Result := 0; - AAllDay1 := AEvent1.AllDayEvent or (AEvent1.Duration >= 1); - AAllDay2 := AEvent2.AllDayEvent or (AEvent2.Duration >= 1); - if DateOf(AEvent1.Start) = DateOf(AEvent2.Start) then - Result := Byte(AAllDay2) - Byte(AAllDay1); - if Result <> 0 then Exit; - if AEvent1.Start < AEvent2.Start then - Result := -1 - else - if AEvent1.Start > AEvent2.Start then - Result := 1 - else - if AEvent1.Finish > AEvent2.Finish then - Result := -1 - else - if AEvent1.Finish < AEvent2.Finish then - Result := 1 - else - if AEvent1.RecordIndex < AEvent2.RecordIndex then - Result := -1 - else - if AEvent1.RecordIndex > AEvent2.RecordIndex then - Result := 1 - else - Result := 0; -end; - -{$IFNDEF DELPHI6} -function StartOfTheDay(const AValue: TDateTime): TDateTime; -begin - Result := Trunc(AValue); -end; - -function EndOfTheDay(const AValue: TDateTime): TDateTime; -begin - Result := Trunc(AValue) + EncodeTime(23, 59, 59, 999); -end; - -function StartOfTheWeek(const AValue: TDateTime): TDateTime; -begin - Result := Trunc(AValue) - (DayOfTheWeek(AValue) - 1); -end; - -function EndOfTheWeek(const AValue: TDateTime): TDateTime; -begin - Result := EndOfTheDay(StartOfTheWeek(AValue) + 6); -end; - -{$ENDIF} - -procedure Rect2RectsVert(const ASource: TRect; var R1, R2: TRect); overload; -begin - R1 := ASource; - R2 := ASource; - R1.Bottom := (ASource.Bottom + ASource.Top - InterAreaSpace) div 2; - R2.Top := R1.Bottom + InterAreaSpace; -end; - -procedure Rect2RectsVert(const ASource: TRect; var R1, R2, R3: TRect); overload; -var - H: Integer; -begin - R1 := ASource; - R2 := ASource; - R3 := ASource; - H := ASource.Bottom - ASource.Top; - R1.Bottom := ASource.Top + MulDiv(H, 1, 3); - R2.Top := R1.Bottom + InterAreaSpace; - R2.Bottom := ASource.Top + MulDiv(H, 2, 3); - R3.Top := R2.Bottom + InterAreaSpace; -end; - -procedure Rect2RectsHorz(const ASource: TRect; var R1, R2: TRect); overload; -begin - R1 := ASource; - R2 := ASource; - R1.Right := (ASource.Left + ASource.Right - InterAreaSpace) div 2; - R2.Left := R1.Right + InterAreaSpace; -end; - -procedure Rect2RectsHorz(const ASource: TRect; var R1, R2, R3: TRect); overload; -var - W: Integer; -begin - R1 := ASource; - R2 := ASource; - R3 := ASource; - W := ASource.Right - ASource.Left; - R1.Right := ASource.Left + MulDiv(W, 1, 3); - R2.Left := R1.Right + InterAreaSpace; - R2.Right := ASource.Left + MulDiv(W, 2, 3); - R3.Left := R2.Right + InterAreaSpace; -end; - -function AdditionalWidth(const ABounds: TRect): Integer; -begin - with ABounds do - Result := Round((Right - Left) * NotesAreaWidth) - InterAreaSpace div 2; -end; - -procedure SplitToRects(const ASource: TRect; AShowCalendar, - AIsRightArea: Boolean; out R1, R2: TRect); -begin - R1 := ASource; - R2 := ASource; - if AShowCalendar then - begin - if AIsRightArea then - begin - R2.Left := R2.Right - AdditionalWidth(R1); - R1.Right := R2.Left - InterAreaSpace; - end - else - begin - R2.Right := R2.Left + AdditionalWidth(R1); - R1.Left := R2.Right + InterAreaSpace; - end; - end; -end; - -function SchedulerLinkStyleSheetPrototype: TcxSchedulerReportLinkStyleSheet; - - function CreateStyle(AColor, AFontColor: TColor): TcxStyle; - begin - Result := TcxStyle.Create(StyleSheetPrototype); - with Result do - begin - Color := AColor; - Font.Name := dxPSCore.dxPSDefaultFontName; - Font.Color := AFontColor; - end; - end; - -begin - if StyleSheetPrototype = nil then - begin - StyleSheetPrototype := TcxSchedulerReportLinkStyleSheet.Create(nil); - with StyleSheetPrototype.Styles as TcxSchedulerReportLinkStyles do - begin - SchedulerHeader := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - Content := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - DateNavigatorContent := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - DateNavigatorHeader := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - DayHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Event := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ResourceHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - NotesAreaBlank := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - NotesAreaLined := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - TaskPad := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - TimeRuler := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - end; - end; - Result := StyleSheetPrototype; -end; - -function FindMirorClassForItem(AItem: TObject; - var APSItemClass: TcxSchedulerReportCustomCellClass): Boolean; -var - I: Integer; -begin - APSItemClass := nil; - Result := False; - for I := MirrorClasses.Count - 1 downto 0 do - begin - APSItemClass := MirrorClasses[I]; - if AItem.InheritsFrom(APSItemClass.SchedulerCellClass) then - begin - Result := True; - Break; - end; - end; -end; - -{ TcxSchedulerReportLinkRenderInfo } - -procedure TcxSchedulerReportLinkRenderInfo.DoCalculate; -var - I: Integer; -begin - if not IsLoading then - begin - if (ReportLink <> nil) and (ReportLink.PrintStyles.ActiveStyle <> nil) then - begin - FPageColCount := Byte(ReportLink.PrintStyles.ActiveStyle.Layout) + 1; - FPageRowCount := ReportLink.PageSites.Count; - end - else - begin - FPageColCount := 1; - FPageRowCount := 1; - end; - end; - if (ReportLink = nil) or (ReportLink.ReportCells <> nil) and (ReportLink.ReportCells.Count > 0) then - begin - inherited DoCalculate; - for I := 0 to PageRenderInfoCount - 1 do - with PageRenderInfos[I] do - TitleOffset := DataOffset; - end; -end; - -function TcxSchedulerReportLinkRenderInfo.GetPageColCount: Integer; -begin - if not IsLoading then - Result := 1//FPageColCount - else - Result := inherited GetPageColCount; -end; - -function TcxSchedulerReportLinkRenderInfo.GetPageRowCount: Integer; -begin - if not IsLoading then - Result := FPageRowCount - else - Result := inherited GetPageRowCount; -end; - -function TcxSchedulerReportLinkRenderInfo.IsLoading: Boolean; -begin - Result := ReportLink.DataSource = rldsExternalStorage; -end; - -function TcxSchedulerReportLinkRenderInfo.IsDrawPageTitleOnPage( - APageIndex: Integer): Boolean; -begin - Result := Rendering and IsDrawReportTitleOnPage(APageIndex); -end; - -function TcxSchedulerReportLinkRenderInfo.IsDrawReportTitleOnPage( - APageIndex: Integer): Boolean; -begin - case ReportLink.ReportTitleMode of - tmNone: - Result := False; - tmOnFirstPage: - Result := APageIndex = 0; - else - Result := APageIndex mod FPageColCount = 0; - end; -end; - -function TcxSchedulerReportLinkRenderInfo.GetReportLink: TcxSchedulerReportLink; -begin - Result := TcxSchedulerReportLink(inherited ReportLink); -end; - -{ TcxSchedulerReportRenderer } - -procedure TcxSchedulerReportRenderer.PrepareRenderPage; -begin - inherited PrepareRenderPage; - TcxSchedulerReportLinkRenderInfo(RenderInfo).Rendering := True; -end; - -procedure TcxSchedulerReportRenderer.UnprepareRenderPage; -begin - TcxSchedulerReportLinkRenderInfo(RenderInfo).Rendering := False; - inherited UnprepareRenderPage; -end; - -{ TcxSchedulerReportLink } - -constructor TcxSchedulerReportLink.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FPageSites := TList.Create; - FLookAndFeelItems := TList.Create; - FSupportImages := True; -end; - -destructor TcxSchedulerReportLink.Destroy; -begin - FreeAndNil(FPageSites); - FreeAndNil(FLookAndFeelItems); - inherited Destroy; -end; - -procedure TcxSchedulerReportLink.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLink then - with TcxSchedulerReportLink(Source) do - begin - Self.PrintRange := PrintRange; - Self.PrintStyles := PrintStyles; - end; - inherited; -end; - -class function TcxSchedulerReportLink.Aggregable: Boolean; -begin - Result := False; -end; - -procedure TcxSchedulerReportLink.LoadDataFromStream(AStream: TStream); -const - SupportImagesVersion: TdxPSVersion = (Major: 3; Minor: 5; SubMinor: 5); -var - AStorageInfo: TdxPSDataStorageInfo; -begin - if PossibleDataStorage(AStream, True) then - begin - CopyDataStreamFrom(AStream); - AStorageInfo := ExtractStorageInfo(DataStream); - if AStorageInfo <> nil then - begin - FSupportImages := ComparePSVersions(AStorageInfo.PrintingSystemVersion, SupportImagesVersion) >= 0; - AStorageInfo.Free; - end; - DataStream.Position := 0; - if DataSource <> rldsExternalStorage then - DataSource := rldsExternalStorage - else - if IsRebuildNeededAndAllowed(True) then - RebuildReport; - end; -end; - -procedure TcxSchedulerReportLink.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited; - if (TaskPadReportLink = AComponent) and (Operation = opRemove) then - TaskPadReportLink := nil; -end; - -// IdxReportLinkController -function TcxSchedulerReportLink.GetControlSiteBounds(AControl: TControl): TRect; -begin - if PrintStyles.ActiveStyle <> nil then - Result := PrintStyles.ActiveStyle.GetControlSiteBounds(AControl) - else - Result := NullRect; -end; - -procedure TcxSchedulerReportLink.ConstructReport(AReportCells: TdxReportCells); - - procedure CalculateSizes; - - procedure CalculateReportPartSizes(ACell: TdxReportCell); - var - Width, I, V: Integer; - begin - if ACell.CellCount > 0 then - begin - Width := 0; - for I := 0 to ACell.CellCount - 1 do - begin - V := ACell.Cells[I].Width; - if Width < V then Width := V; - end; - ACell.BoundsRect := MakeRect(0, 0, Width, ACell.LastCell.BoundsRect.Bottom); - end; - end; - - begin - with AReportCells do - begin - CalculateReportPartSizes(Cells); - if AreFooterCellsAllocated then CalculateReportPartSizes(FooterCells); - if AreHeaderCellsAllocated then CalculateReportPartSizes(HeaderCells); - end; - end; - -begin - if Scheduler = nil then Exit; - inherited; - - if PrintStyles.ActiveStyle = nil then - Exit; - - PrepareConstruct; - try - BuildStyle; - if not AbortBuilding then CalculateSizes; - finally - UnprepareConstruct; - end; -end; - -procedure TcxSchedulerReportLink.DoCreateReport; -begin - if (PrintStyles.ActiveStyle = nil) or not PrintStyles.ActiveStyleAssigned then - PrintStyles.SetActiveStyleEx(PrintStyles.GetCorrespondingStyle); - inherited DoCreateReport; -end; - -procedure TcxSchedulerReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - if HasEventImages then - AProc(Scheduler.EventImages); - if HasResourceImages then - AProc(Scheduler.Storage.Resources.Images); -end; - -function TcxSchedulerReportLink.GetRealScaleFactor: Integer; -begin - Result := 100; -end; - -procedure TcxSchedulerReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -begin - case AItem.GetCustomDrawID of - cdidSchedulerContent: - DoCustomDrawContentCell(ACanvas, TcxSchedulerReportContentCell(AItem), ADone); - cdidSchedulerSchedulerHeader: - DoCustomDrawSchedulerHeaderCell(ACanvas, TcxSchedulerReportSchedulerHeaderDataCell(AItem), ADone); - cdidSchedulerDateNavigatorHeader: - DoCustomDrawDateNavigatorHeaderCell(ACanvas, TcxSchedulerReportDateNavigatorHeader(AItem), ADone); - cdidSchedulerDateNavigatorDay: - DoCustomDrawDateNavigatorDayCell(ACanvas, TcxSchedulerReportDateNavigatorDay(AItem), ADone); - cdidSchedulerDateNavigatorDayCaption: - DoCustomDrawDateNavigatorDayCaptionCell(ACanvas, TcxSchedulerReportDateNavigatorDayCaption(AItem), ADone); - cdidSchedulerDateNavigatorWeekNumber: - DoCustomDrawDateNavigatorWeekNumberCell(ACanvas, TcxSchedulerReportDateNavigatorWeekNumber(AItem), ADone); - cdidSchedulerTimeRuler: - DoCustomDrawTimeRulerCell(ACanvas, TcxSchedulerReportDailyTimeRulerCell(AItem), ADone); - cdidSchedulerEventCaption..cdidSchedulerEventTimeLine: - DoCustomDrawEventPartCell(ACanvas, AItem, ADone); - cdidSchedulerNotesArea: - DoCustomDrawNotesCell(ACanvas, TcxSchedulerReportNotesDataCell(AItem), ADone); - cdidSchedulerTaskPad: - DoCustomDrawTaskPadCell(ACanvas, TcxSchedulerReportNotesDataCell(AItem), ADone); - cdidSchedulerHeader: - DoCustomDrawHeaderCell(ACanvas, TcxSchedulerReportHeaderItemCell(AItem), ADone); - end; -end; - -procedure TcxSchedulerReportLink.DoCanPrintEvent(AEvent: TcxSchedulerEvent; - var AllowPrint: Boolean); -begin - if Assigned(FOnCanPrintEvent) then - FOnCanPrintEvent(Self, AEvent, AllowPrint); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawSchedulerHeaderCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportSchedulerHeaderDataCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawSchedulerHeaderCell) then - FOnCustomDrawSchedulerHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorHeaderCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorHeader; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorHeaderCell) then - FOnCustomDrawDateNavigatorHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorDayCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDay; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorDayCell) then - FOnCustomDrawDateNavigatorDayCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorDayCaptionCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDayCaption; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorDayCaptionCell) then - FOnCustomDrawDateNavigatorDayCaptionCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorWeekNumberCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorWeekNumber; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorWeekNumberCell) then - FOnCustomDrawDateNavigatorWeekNumberCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawTimeRulerCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDailyTimeRulerCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawTimeRulerCell) then - FOnCustomDrawTimeRulerCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawContentCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportContentCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawContentCell) then - FOnCustomDrawContentCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawHeaderCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportHeaderItemCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeaderCell) then - FOnCustomDrawHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawEventPartCell( - ACanvas: TCanvas; AItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawEventPartCell) then - FOnCustomDrawEventPartCell(Self, ACanvas, AItem, - TcxSchedulerReportEventPartType(AItem.GetCustomDrawID - cdidSchedulerEventCaption), - ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawNotesCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawNotesCell) then - FOnCustomDrawNotesCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawTaskPadCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawTaskPadCell) then - FOnCustomDrawTaskPadCell(Self, ACanvas, AItem, ADone); -end; - -function TcxSchedulerReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - if PrintStyles.ActiveStyle <> nil then - Result := PrintStyles.ActiveStyle.GetRebuildOnPageParamsChange(AUpdateCodes) - else - Result := inherited GetRebuildOnPageParamsChange(AUpdateCodes); -end; - -function TcxSchedulerReportLink.GetRendererClass: TdxPSReportRendererClass; -begin - Result := TcxSchedulerReportRenderer; -end; - -function TcxSchedulerReportLink.GetRenderInfoClass: TdxPSReportRenderInfoClass; -begin - Result := TcxSchedulerReportLinkRenderInfo; -end; - -procedure TcxSchedulerReportLink.InternalRestoreDefaults; -begin - inherited; - PrintRange.RestoreDefaults; - PrintStyles.RestoreDefaults; -end; - -procedure TcxSchedulerReportLink.RebuildReport; -begin - inherited RebuildReport; - if DesignWindow <> nil then - DesignWindow.UpdatePreview; -end; - -procedure TcxSchedulerReportLink.PrepareConstruct; -begin - FLookAndFeelItems.Clear; - inherited PrepareConstruct; -end; - -procedure TcxSchedulerReportLink.UnprepareConstruct; -begin - FormatLookAndFeelItems; - inherited UnprepareConstruct; -end; - -procedure TcxSchedulerReportLink.CreateOptions; -begin - inherited CreateOptions; - FPrintRange := CreatePrintRange; - FPrintStyles := CreatePrintStyles; -end; - -procedure TcxSchedulerReportLink.DestroyOptions; -begin - FreeAndNil(FPrintStyles); - FreeAndNil(FPrintRange); - inherited DestroyOptions; -end; - -function TcxSchedulerReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TcxSchedulerReportLinkOptionsFormatting; -end; - -function TcxSchedulerReportLink.CreatePrintRange: TcxSchedulerReportLinkPrintRange; -begin - Result := TcxSchedulerReportLinkPrintRange.Create(Self); -end; - -function TcxSchedulerReportLink.CreatePrintStyles: TcxSchedulerReportLinkPrintStyles; -begin - Result := TcxSchedulerReportLinkPrintStyles.Create(Self); -end; - -function TcxSchedulerReportLink.HasEventImages: Boolean; -begin - Result := Assigned(Scheduler) and Assigned(Scheduler.EventImages); -end; - -function TcxSchedulerReportLink.HasResourceImages: Boolean; -begin - Result := Assigned(Scheduler) and Assigned(Scheduler.Storage) and Assigned(Scheduler.Storage.Resources.Images) ; -end; - -function TcxSchedulerReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := OptionsFormatting.UseNativeStyles; -end; - -function TcxSchedulerReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TcxSchedulerReportLinkStyles; -end; - -function TcxSchedulerReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TcxSchedulerReportLinkStyleSheet; -end; - -function TcxSchedulerReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := SchedulerLinkStyleSheetPrototype; -end; - -procedure TcxSchedulerReportLink.ActivePrintStyleChanged; -begin - if not IsDestroying and not IsLoading then - begin - if Active then - begin - FreeRenderInfos; - FreeRenderer; - RebuildReport; - end; - DoActivePrintStyleChanged; - end; -end; - -procedure TcxSchedulerReportLink.DoActivePrintStyleChanged; -begin - if Assigned(FOnActivePrintStyleChanged) then FOnActivePrintStyleChanged(Self); -end; - -procedure TcxSchedulerReportLink.FormatLookAndFeelItems; -const - Borders3D: array[Boolean] of TdxPSCellBorderClass = - (TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder); -var - I: Integer; -begin - for I := 0 to LookAndFeelItemCount - 1 do - with LookAndFeelItems[I] do - if Effects3D then - BorderClass := Borders3D[Soft3D] - else - BorderClass := TdxPSCellUltraFlatBorder; -end; - -procedure TcxSchedulerReportLink.RegisterLookAndFeelItem(AItem: TdxReportVisualItem; - AEdgeStyle: TdxCellEdgeStyle); -begin - AItem.EdgeMode := Self.EdgeMode; - AItem.Edge3DStyle := AEdgeStyle; - FLookAndFeelItems.Add(AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeSchedulingAreaCell( - AItem: TcxSchedulerReportSchedulingAreaCell); -begin - if Assigned(FOnInitializeSchedulingAreaCell) then - FOnInitializeSchedulingAreaCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeEventCell(AItem: TcxSchedulerReportCustomEventCell); -begin - if Assigned(FOnInitializeEventCell) then - FOnInitializeEventCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeHeaderPrimaryCell( - AItem: TcxSchedulerReportSchedulerHeaderCell); -begin - if Assigned(FOnInitializeHeaderPrimaryCell) then - FOnInitializeHeaderPrimaryCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeHeaderSecondaryCell( - AItem: TcxSchedulerReportSchedulerHeaderCell); -begin - if Assigned(FOnInitializeHeaderSecondaryCell) then - FOnInitializeHeaderSecondaryCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeNotesAreaCell( - AItem: TcxSchedulerReportNotesAreaCell); -begin - if Assigned(FOnInitializeNotesAreaCell) then - FOnInitializeNotesAreaCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeTaskPadCell( - AItem: TcxSchedulerReportTaskPadCell); -begin - if Assigned(FOnInitializeTaskPadCell) then - FOnInitializeTaskPadCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.AssignTaskPadData(ATaskPad: TcxSchedulerReportTaskPadCell); - - procedure CropData(ASite: TdxReportCell); - var - CropBounds, R: TRect; - I: Integer; - Cell: TdxReportCell; - begin - CropBounds := ASite.AbsoluteRect; - for I := ASite.CellCount - 1 downto 0 do - begin - Cell := ASite.Cells[I]; - if not IntersectRect(R, Cell.AbsoluteRect, CropBounds) then - Cell.Free; - end; - end; - -begin - if (TaskPadReportLink <> nil) and TaskPadReportLink.DataProviderPresent then - begin - TaskPadReportLink.Controller := Renderer.ReportLink; - try - TaskPadReportLink.RebuildReport; - ATaskPad.TaskPadDataSite.Assign(TaskPadReportLink.ReportCells.Cells); - CropData(ATaskPad.TaskPadDataSite); - ATaskPad.TaskPadDataSite.ClipChildren := True; - finally - TaskPadReportLink.Controller := nil; - end; - end; -end; - -procedure TcxSchedulerReportLink.InitializeTaskPadCell(ATaskPad: TcxSchedulerReportTaskPadCell); -begin - AssignTaskPadData(ATaskPad); - DoInitializeTaskPadCell(ATaskPad); -end; - -procedure TcxSchedulerReportLink.SetCellViewParams( - ACell: TdxReportVisualItem; const AParams: TcxViewParams); -var - AdxPSViewParams: TdxReportItemViewParams; -begin - if not Assigned(ACell) then Exit; - FillChar(AdxPSViewParams, SizeOf(AdxPSViewParams), 0); - AdxPSViewParams.NativeParams := AParams; - SetCellViewParams(ACell, AdxPSViewParams); -end; - -procedure TcxSchedulerReportLink.SetCellViewParams( - ACell: TdxReportVisualItem; const AParams: TdxReportItemViewParams); -var - AFont: TFont; - AHasBitmap: Boolean; -begin - if not Assigned(ACell) then Exit; - AFont := TFont.Create; - try - AFont.Assign(AParams.NativeParams.Font); - if not dxPSUtl.dxIsTrueTypeFont(AFont) then - AFont.Name := Font.Name; - AFont.Color := ColorToRGB(AParams.NativeParams.TextColor); - if AParams.FontSize <> 0 then - AFont.Size := AParams.FontSize; - AFont.Style := AFont.Style + AParams.FontStyle; - ACell.FontIndex := AddFontToPool(AFont); - ACell.Transparent := ACell.Transparent or AParams.Transparent; - with AParams.NativeParams do - begin - AHasBitmap := not OptionsFormatting.SuppressBackgroundBitmaps and - (Bitmap <> nil) and not Bitmap.Empty; - if AHasBitmap then - ACell.BackgroundBitmapIndex := AddBackgroundBitmapToPool(Bitmap); - end; - if OptionsFormatting.SuppressContentColoration and not AHasBitmap then - ACell.Color := clWhite - else - ACell.Color := ColorToRGB(AParams.NativeParams.Color); - finally - AFont.Free; - end; -end; - -function TcxSchedulerReportLink.AddPageSite( - const ABounds: TRect): TcxSchedulerReportPageSite; -begin - Result := TcxSchedulerReportPageSite.Create(ReportCells.Cells); - Result.BoundsRect := ABounds; - Result.CellSides := []; - Result.Transparent := True; - FPageSites.Add(Result); - AddVerticalDelimiter(Result); - AddHorizontalDelimiter(Result); -end; - -procedure TcxSchedulerReportLink.BuildStyle; -var - AImages: TCustomImageList; -begin - FPageSites.Clear; - if PrintStyles.ActiveStyle <> nil then - begin - AImages := nil; - with PrintStyles.ActiveStyle do - begin - try - if not ShowResourceImages and HasResourceImages then - begin - AImages := Scheduler.Storage.Resources.Images; - Scheduler.Storage.Resources.Images := nil; - end; - BeforeBuild; - RenderInfo.FPageColCount := Byte(PrintStyles.ActiveStyle.Layout) + 1; - try - Build; - finally - AfterBuild; - end; - finally - if AImages <> nil then - Scheduler.Storage.Resources.Images := AImages; - end; - end; - end; -end; - -function TcxSchedulerReportLink.GetActiveStyles: TcxSchedulerReportLinkStyles; -begin - Result := inherited ActiveStyles as TcxSchedulerReportLinkStyles; -end; - -function TcxSchedulerReportLink.GetDesignWindow: TcxfmSchedulerReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TcxfmSchedulerReportLinkDesignWindow; -end; - -function TcxSchedulerReportLink.GetEdgeMode: TdxCellEdgeMode; -const - EdgeModeMap: array[Boolean] of TdxCellEdgeMode = (cemPattern, cem3DEffects); -begin - Result := EdgeModeMap[OptionsFormatting.LookAndFeelKind <> lfUltraFlat]; -end; - -function TcxSchedulerReportLink.GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; -begin - Result := TdxReportVisualItem(FLookAndFeelItems[Index]); -end; - -function TcxSchedulerReportLink.GetLookAndFeelItemCount: Integer; -begin - Result := FLookAndFeelItems.Count; -end; - -function TcxSchedulerReportLink.GetOptionsFormatting: TcxSchedulerReportLinkOptionsFormatting; -begin - Result := inherited OptionsFormatting as TcxSchedulerReportLinkOptionsFormatting; -end; - -function TcxSchedulerReportLink.GetPrintStyles: TcxSchedulerReportLinkPrintStyles; -begin - Result := FPrintStyles; -end; - -function TcxSchedulerReportLink.GetRenderInfo: TcxSchedulerReportLinkRenderInfo; -begin - Result := TcxSchedulerReportLinkRenderInfo(inherited RenderInfo); -end; - -function TcxSchedulerReportLink.GetScheduler: TcxScheduler; -begin - Result := Component as TcxScheduler; -end; - -function TcxSchedulerReportLink.GetStyles: TcxSchedulerReportLinkStyles; -begin - Result := inherited Styles as TcxSchedulerReportLinkStyles; -end; - -procedure TcxSchedulerReportLink.SetOptionsFormatting(Value: TcxSchedulerReportLinkOptionsFormatting); -begin - inherited OptionsFormatting := Value; -end; - -procedure TcxSchedulerReportLink.SetPrintRange(Value: TcxSchedulerReportLinkPrintRange); -begin - PrintRange.Assign(Value); -end; - -procedure TcxSchedulerReportLink.SetPrintStyles(Value: TcxSchedulerReportLinkPrintStyles); -begin - FPrintStyles.Assign(Value); -end; - -procedure TcxSchedulerReportLink.SetStyles(Value: TcxSchedulerReportLinkStyles); -begin - inherited Styles := Value; -end; - -procedure TcxSchedulerReportLink.SetTaskPadReportLink(Value: TBasedxReportLink); -begin - if (Value <> Self) and (FTaskPadReportLink <> Value) then - begin - FTaskPadReportLink := Value; - if FTaskPadReportLink <> nil then - FTaskPadReportLink.FreeNotification(Self); - LinkModified(True); - end; -end; - -{ TcxSchedulerReportLinkPrintRange } - -procedure TcxSchedulerReportLinkPrintRange.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkPrintRange then - with TcxSchedulerReportLinkPrintRange(Source) do - begin - Move(FDatePrint, Self.FDatePrint[0], SizeOf(FDatePrint)); - Move(FTimePrint, Self.FTimePrint[0], SizeOf(FTimePrint)); - end; - inherited Assign(Source); -end; - -procedure TcxSchedulerReportLinkPrintRange.RestoreDefaults; -begin - inherited RestoreDefaults; - FDatePrint[0] := NullDate; - FDatePrint[1] := NullDate; - FTimePrint[0] := NullDate; - FTimePrint[1] := NullDate; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultDatePrintFrom: TDate; -begin - if Scheduler <> nil then - Result := Scheduler.CurrentView.FirstVisibleDate - else - Result := Date; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultDatePrintTo: TDate; -begin - if Scheduler <> nil then - Result := Scheduler.CurrentView.LastVisibleDate - else - Result := Date; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultTimePrintFrom: TTime; -begin - if Scheduler <> nil then - Result := Scheduler.OptionsView.WorkStart - else - Result := 0; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultTimePrintTo: TTime; -begin - if Scheduler <> nil then - Result := Scheduler.OptionsView.WorkFinish - else - Result := 0; -end; - -procedure TcxSchedulerReportLinkPrintRange.CheckTimeRange; -begin -{ if (PrintTo - PrintFrom) < 0 then - FPrintTo := DateOf(PrintFrom) + TimeOf(FPrintTo);} -end; - -function TcxSchedulerReportLinkPrintRange.GetDateTimeIF( - const AValue, ADefaultValue: TDateTime): TDateTime; -begin - Result := AValue; - if Trunc(Result) = NullDate then - Result := ADefaultValue; -end; - -function TcxSchedulerReportLinkPrintRange.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TcxSchedulerReportLinkPrintRange.GetActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := ReportLink.PrintStyles.ActiveStyle; -end; - -function TcxSchedulerReportLinkPrintRange.GetDayCount: Integer; -begin - Result := Trunc(PrintTo) - Trunc(PrintFrom) + 1; - if Result < 1 then - Result := 1; -end; - -function TcxSchedulerReportLinkPrintRange.GetMonthCount: Integer; - - function MonthOfDate(const ADate: TDateTime): Integer; - var - Y, M, D: Word; - begin - DecodeDate(ADate, Y, M, D); - Result := Y * 12 + M; - end; - -begin - Result := MonthOfDate(PrintTo) - MonthOfDate(PrintFrom) + 1; -end; - -function TcxSchedulerReportLinkPrintRange.GetPrintDate(AIndex: Integer): TDate; -var - DefaultDate: TTime; -begin - if AIndex = 0 then - DefaultDate := DefaultDatePrintFrom - else - DefaultDate := DefaultDatePrintTo; - Result := GetDateTimeIF(DateOf(FDatePrint[AIndex]), DefaultDate); -end; - -function TcxSchedulerReportLinkPrintRange.GetPrintTime(AIndex: Integer): TTime; -var - DefaultTime: TTime; -begin - if AIndex = 0 then - DefaultTime := DefaultTimePrintFrom - else - DefaultTime := DefaultTimePrintTo; - Result := TimeOf(GetDateTimeIF(FTimePrint[AIndex], DefaultTime)); -end; - -function TcxSchedulerReportLinkPrintRange.GetWeekCount: Integer; -begin - Result := WeeksBetween(StartOfTheWeek(PrintFrom), IncDay(EndOfTheWeek(PrintTo))); - if Result < 1 then - Result := 1; -end; - -function TcxSchedulerReportLinkPrintRange.GetYearCount: Integer; -begin - Result := YearOf(PrintTo) - YearOf(PrintFrom) + 1; - if Result < 1 then - Result := 1; -end; - -procedure TcxSchedulerReportLinkPrintRange.SetPrintDate( - AIndex: Integer; const Value: TDate); -begin - if FDatePrint[AIndex] <> Value then - begin - FDatePrint[AIndex] := Value; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkPrintRange.SetPrintTime( - AIndex: Integer; const Value: TTime); -begin - if FTimePrint[AIndex] <> Value then - begin - FTimePrint[AIndex] := Value; - Changed; - end; -end; - -function TcxSchedulerReportLinkPrintRange.IsDateStored( - AIndex: Integer): Boolean; -begin - Result := FDatePrint[AIndex] <> NullDate; -end; - -function TcxSchedulerReportLinkPrintRange.IsTimeStored( - AIndex: Integer): Boolean; -begin - Result := FTimePrint[AIndex] <> NullDate; -end; - -{ TcxSchedulerReportLinkOptionsFormatting } - -procedure TcxSchedulerReportLinkOptionsFormatting.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxSchedulerReportLinkOptionsFormatting then - with TcxSchedulerReportLinkOptionsFormatting(Source) do - begin - Self.SuppressContentColoration := SuppressContentColoration; - end; -end; - -procedure TcxSchedulerReportLinkOptionsFormatting.RestoreDefaults; -begin - inherited; - SuppressContentColoration := False; -end; - -function TcxSchedulerReportLinkOptionsFormatting.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TcxSchedulerReportLinkOptionsFormatting.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; -end; - -procedure TcxSchedulerReportLinkOptionsFormatting.SetSuppressContentColoration(Value: Boolean); -begin - if FSuppressContentColoration <> Value then - begin - FSuppressContentColoration := Value; - Changed; - end; -end; - -{ TcxCustomSchedulerReportLinkOptions } - -function TcxCustomSchedulerReportLinkOptions.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; -end; - -function TcxCustomSchedulerReportLinkOptions.GetScheduler: TcxScheduler; -begin - if ReportLink <> nil then - Result := ReportLink.Scheduler - else - Result := nil; -end; - -{ TcxSchedulerReportLinkStyles } - -constructor TcxSchedulerReportLinkStyles.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - BitmapInViewParams := True; -end; - -procedure TcxSchedulerReportLinkStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxSchedulerReportLinkStyles then - with TcxSchedulerReportLinkStyles(Source) do - begin - Self.SchedulerHeader := SchedulerHeader; - Self.Content := Content; - Self.DateNavigatorContent := DateNavigatorContent; - Self.DateNavigatorHeader := DateNavigatorHeader; - Self.DayHeader := DayHeader; - Self.Event := Event; - Self.ResourceHeader := ResourceHeader; - Self.NotesAreaBlank := NotesAreaBlank; - Self.NotesAreaLined := NotesAreaLined; - Self.TaskPad := TaskPad; - Self.TimeRuler := TimeRuler; - end; -end; - -function TcxSchedulerReportLinkStyles.GetSchedulerHeaderParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerSchedulerHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetContentParams(const ADateTime: TDateTime; - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetContentParams(ADateTime, AResource) - else - GetViewParams(vspsSchedulerContent, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetContentParams(const ADateTime: TDateTime; - ALightColor: Boolean; AResource: TcxSchedulerStorageResourceItem): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetContentParams(ADateTime, ALightColor, AResource) - else - GetViewParams(vspsSchedulerContent, nil, nil, Result) -end; - -function TcxSchedulerReportLinkStyles.GetDateNavigatorContentParams: TcxViewParams; -begin - if UseSchedulerStyles then - begin - Result := TcxSchedulerDateNavigator( - ExtStyles.Scheduler.DateNavigator).Styles.GetContentParams - end - else - GetViewParams(vspsSchedulerDateNavigatorContent, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetDateNavigatorHeaderParams: TcxViewParams; -begin - if UseSchedulerStyles then - begin - Result := TcxSchedulerDateNavigator( - ExtStyles.Scheduler.DateNavigator).Styles.GetHeaderParams - end - else - GetViewParams(vspsSchedulerDateNavigatorHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetDayHeaderParams( - const ADateTime: TDateTime): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetDayHeaderParams(ADateTime) - else - GetViewParams(vspsSchedulerDayHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetEventParams( - AEvent: TcxSchedulerEvent): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetEventContentParams(AEvent) - else - GetViewParams(vspsSchedulerEvent, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetNotesAreaBlankParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerNotesAreaBlank, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetNotesAreaLinedParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerNotesAreaLined, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetResourceHeaderParams( - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetResourceHeaderParams(AResource) - else - GetViewParams(vspsSchedulerResourceHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetTaskPadParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerTaskPad, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetTimeRulerParams: TcxViewParams; -begin - if UseSchedulerStyles then - Result := ReportLink.Scheduler.ViewDay.Styles.GetTimeRulerParams - else - GetViewParams(vspsSchedulerTimeRuler, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 3; -end; - -procedure TcxSchedulerReportLinkStyles.GetDefaultViewParams(Index: Integer; - AData: TObject; out AParams: TcxViewParams); -const - FixedParts = [vspsSchedulerDayHeader, vspsSchedulerResourceHeader, vspsSchedulerTimeRuler]; -begin - inherited; - if ReportLink <> nil then - with AParams do - begin - if Index in FixedParts then - Color := dxPSCore.dxDefaultFixedColor - else - Color := dxDefaultContentColor; - Font := ReportLink.Font; - TextColor := Font.Color; - end; -end; - -class function TcxSchedulerReportLinkStyles.GetStyleCaption(AnIndex: Integer): string; -begin - case AnIndex of - vspsSchedulerSchedulerHeader: - Result := cxGetResourceString(@sdxSchedulerSchedulerHeader); - vspsSchedulerContent: - Result := cxGetResourceString(@sdxSchedulerContent); - vspsSchedulerDateNavigatorContent: - Result := cxGetResourceString(@sdxSchedulerDateNavigatorContent); - vspsSchedulerDateNavigatorHeader: - Result := cxGetResourceString(@sdxSchedulerDateNavigatorHeader); - vspsSchedulerDayHeader: - Result := cxGetResourceString(@sdxSchedulerDayHeader); - vspsSchedulerEvent: - Result := cxGetResourceString(@sdxSchedulerEvent); - vspsSchedulerResourceHeader: - Result := cxGetResourceString(@sdxSchedulerResourceHeader); - vspsSchedulerNotesAreaBlank: - Result := cxGetResourceString(@sdxSchedulerNotesAreaBlank); - vspsSchedulerNotesAreaLined: - Result := cxGetResourceString(@sdxSchedulerNotesAreaLined); - vspsSchedulerTaskPad: - Result := cxGetResourceString(@sdxSchedulerTaskPad); - else {vspsSchedulerTimeRuler} - Result := cxGetResourceString(@sdxSchedulerTimeRuler); - end; -end; - -function TcxSchedulerReportLinkStyles.GetStyleIndexByCaption(const Caption: string): Integer; -begin - for Result := vspsSchedulerFirst to vspsSchedulerLast do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Result)) then - Exit; - Result := -1; -end; - -// IcxSchedulerStylesAdapter -function TcxSchedulerReportLinkStyles.GetDayHeaderStyle: TcxStyle; -begin - if UseSchedulerStyles then - Result := ExtStyles.DayHeader - else - Result := DayHeader; -end; - -function TcxSchedulerReportLinkStyles.GetResourceHeaderStyle: TcxStyle; -begin - if UseSchedulerStyles then - Result := ExtStyles.ResourceHeader - else - Result := ResourceHeader; -end; - -function TcxSchedulerReportLinkStyles.GetExtStyles: TcxSchedulerStyles; -begin - Result := ReportLink.Scheduler.Styles; -end; - -function TcxSchedulerReportLinkStyles.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; - if Result = nil then - Result := FReportLink; -end; - -function TcxSchedulerReportLinkStyles.GetUseSchedulerStyles: Boolean; -begin - if ReportLink = nil then - begin - Result := False; - Exit; - end; - Result := not ReportLink.OptionsFormatting.UseNativeStyles; - if not Result then - Result := (ReportLink = nil) or (ReportLink.Scheduler = nil); -end; - -{ TcxSchedulerReportLinkStyleSheet } - -class function TcxSchedulerReportLinkStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxSchedulerReportLinkStyles; -end; - -function TcxSchedulerReportLinkStyleSheet.GetStylesValue: TcxSchedulerReportLinkStyles; -begin - if GetStyles is TcxSchedulerReportLinkStyles then - Result := TcxSchedulerReportLinkStyles(GetStyles) - else - Result := nil; -end; - -procedure TcxSchedulerReportLinkStyleSheet.SetStylesValue(Value: TcxSchedulerReportLinkStyles); -begin - SetStyles(Value); -end; - -{ TcxSchedulerReportLinkPrintStyles } - -procedure TcxSchedulerReportLinkPrintStyles.Assign(Source: TPersistent); -var - I: Integer; -begin - if Source is TcxSchedulerReportLinkPrintStyles then - for I := 0 to Count - 1 do - Items[I] := TcxSchedulerReportLinkPrintStyles(Source).Items[I]; - inherited; -end; - -procedure TcxSchedulerReportLinkPrintStyles.RestoreDefaults; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].RestoreDefaults; - inherited; -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleByClass( - AClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.ClassType = AClass then Exit; - end; - Result := nil; -end; - -function TcxSchedulerReportLinkPrintStyles.GetCorrespondingStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := nil; - if Scheduler = nil then Exit; - Result := GetStyleByView(Scheduler.CurrentView) -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleByName( - const Name: string): TcxCustomSchedulerReportLinkPrintStyle; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if CompareText(Result.Caption, Name) = 0 then Exit; - end; - Result := nil; -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleByView( - View: TcxSchedulerCustomView): TcxCustomSchedulerReportLinkPrintStyle; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.IsCompatibleWith(View) then Exit; - end; - Result := nil; -end; - -function TcxSchedulerReportLinkPrintStyles.IndexOf(AItem: TcxCustomSchedulerReportLinkPrintStyle): Integer; -begin - Result := FItems.IndexOf(AItem); -end; - -procedure TcxSchedulerReportLinkPrintStyles.CreateObjects; -begin - inherited CreateObjects; - FItems := TList.Create; - CreateStyles; -end; - -procedure TcxSchedulerReportLinkPrintStyles.DestroyObjects; -begin - DestroyStyles; - FreeAndNil(FItems); - inherited DestroyObjects; -end; - -function TcxSchedulerReportLinkPrintStyles.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TcxSchedulerReportLinkPrintStyles.CreateStyle( - AStyleClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := AStyleClass.Create(Self); - FItems.Add(Result); -end; - -procedure TcxSchedulerReportLinkPrintStyles.CreateStyles; -begin - CreateStyle(TcxSchedulerReportLinkDailyPrintStyle); - CreateStyle(TcxSchedulerReportLinkWeeklyPrintStyle); - CreateStyle(TcxSchedulerReportLinkMonthlyPrintStyle); - CreateStyle(TcxSchedulerReportLinkTrifoldPrintStyle); - CreateStyle(TcxSchedulerReportLinkDetailsPrintStyle); - CreateStyle(TcxSchedulerReportLinkMemoPrintStyle); - CreateStyle(TcxSchedulerReportLinkYearlyPrintStyle); -end; - -procedure TcxSchedulerReportLinkPrintStyles.DestroyStyles; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Items[I].Free; - FItems.Clear; -end; - -procedure TcxSchedulerReportLinkPrintStyles.GetStyleByClassEx( - AClass: TcxCustomSchedulerReportLinkPrintStyleClass; var AInstance); -begin - TPersistent(AInstance) := GetStyleByClass(AClass); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetActiveStyleEx( - Value: TcxCustomSchedulerReportLinkPrintStyle); -begin - if (ActiveStyle <> Value) or ActiveStyleAssigned then - begin - FActiveStyle := Value; - ActiveStyleAssigned := False; - end; -end; - -procedure TcxSchedulerReportLinkPrintStyles.ActiveStyleChanged; -begin - if ReportLink <> nil then - ReportLink.ActivePrintStyleChanged; -end; - -procedure TcxSchedulerReportLinkPrintStyles.StyleChanged(AStyle: TcxCustomSchedulerReportLinkPrintStyle); -begin - Changed; -end; - -function TcxSchedulerReportLinkPrintStyles.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxSchedulerReportLinkPrintStyles.GetItem( - Index: Integer): TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := TcxCustomSchedulerReportLinkPrintStyle(FItems[Index]); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleDaily: TcxSchedulerReportLinkDailyPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkDailyPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleDetails: TcxSchedulerReportLinkDetailsPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkDetailsPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleMemo: TcxSchedulerReportLinkMemoPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkMemoPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleMonthly: TcxSchedulerReportLinkMonthlyPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkMonthlyPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleTrifold: TcxSchedulerReportLinkTrifoldPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkTrifoldPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleWeekly: TcxSchedulerReportLinkWeeklyPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkWeeklyPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleYearly: TcxSchedulerReportLinkYearlyPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkYearlyPrintStyle, Result); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetActiveStyle( - Value: TcxCustomSchedulerReportLinkPrintStyle); -begin - if (FActiveStyle <> Value) or not FActiveStyleAssigned then - begin - FActiveStyle := Value; - FActiveStyleAssigned := Value <> nil; - ActiveStyleChanged; - DesignerModified; - end; -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetActiveStyleAssigned( - Value: Boolean); -begin - if FActiveStyleAssigned <> Value then - begin - FActiveStyleAssigned := Value; - DesignerModified; - end; -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetItem(Index: Integer; - Value: TcxCustomSchedulerReportLinkPrintStyle); -begin - Items[Index].Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleDaily( - Value: TcxSchedulerReportLinkDailyPrintStyle); -begin - Daily.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleDetails( - Value: TcxSchedulerReportLinkDetailsPrintStyle); -begin - GetStyleDetails.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleMemo( - Value: TcxSchedulerReportLinkMemoPrintStyle); -begin - GetStyleMemo.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleMonthly( - Value: TcxSchedulerReportLinkMonthlyPrintStyle); -begin - Monthly.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleTrifold( - Value: TcxSchedulerReportLinkTrifoldPrintStyle); -begin - GetStyleTrifold.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleWeekly( - Value: TcxSchedulerReportLinkWeeklyPrintStyle); -begin - Weekly.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleYearly( - Value: TcxSchedulerReportLinkYearlyPrintStyle); -begin - Yearly.Assign(Value); -end; - -{ TcxCustomSchedulerReportLinkPrintStyle } - -constructor TcxCustomSchedulerReportLinkPrintStyle.Create(AStyles: TcxSchedulerReportLinkPrintStyles); -begin - inherited Create; - FStyles := AStyles; - FCaption := DefaultCaption; - CreateObjects; - RestoreDefaults; -end; - -destructor TcxCustomSchedulerReportLinkPrintStyle.Destroy; -begin - Active := False; - DestroyObjects; - inherited Destroy; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Assign(Source: TPersistent); -var - ASource: TcxCustomSchedulerReportLinkPrintStyle; -begin - if Source is TcxCustomSchedulerReportLinkPrintStyle then - begin - ASource := TcxCustomSchedulerReportLinkPrintStyle(Source); - Caption := ASource.Caption; - CompressWeekends := ASource.CompressWeekends; - DontPrintWeekends := ASource.DontPrintWeekends; - Layout := ASource.Layout; - ResourceCountPerPage := ASource.ResourceCountPerPage; - ShowNotesAreaBlank := ASource.ShowNotesAreaBlank; - ShowNotesAreaLined := ASource.ShowNotesAreaLined; - ShowTaskPad := ASource.ShowTaskPad; - if SupportTimeRange then - begin - TimePrintFrom := ASource.TimePrintFrom; - TimePrintTo := ASource.TimePrintTo; - end; - ShowEventImages := ASource.ShowEventImages; - end - else - inherited; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.DefaultCaption: string; -begin - Result := ''; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; -begin - Result := False; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.RestoreDefaults; -begin - FCaption := DefaultCaption; - FCompressWeekends := True; - FDontPrintWeekends := False; - FLayout := pslOnePage; - ResourceCountPerPage := 0; - ShowNotesAreaBlank := False; - ShowNotesAreaLined := False; - ShowTaskPad := False; - if SupportTimeRange and (Scheduler <> nil) then - begin - TimePrintFrom := TimeOf(Scheduler.OptionsView.WorkStart); - TimePrintTo := TimeOf(Scheduler.OptionsView.WorkFinish); - end; -end; - -// IdxReportLinkController -function TcxCustomSchedulerReportLinkPrintStyle.GetControlSiteBounds(AControl: TControl): TRect; -begin - Result := NullRect; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Build; -begin - FBoldedDays := TcxSchedulerDateList.Create; - try - if Storage <> nil then - begin - Events.SelStart := PrintRange.PrintFrom - 30; - Events.SelFinish := PrintRange.PrintTo + 30; - Storage.GetEvents(Events, Events.SelStart, Events.SelFinish); - end; - Events.ExtractUsedDays(FBoldedDays); - PrepareEvents; - BuildPages; - Events.Clear; - UsedDays.Clear; - finally - FreeAndNil(FBoldedDays); - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.BuildPages; -var - I: Integer; -begin - for I := 0 to PeriodCount - 1 do - begin - CreateLayoutForPeriod(I); - Progress(100 * (I + 1) / PeriodCount); - if ReportLink.AbortBuilding or ReportLink.LinkInPreviewMode then Break; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.BuildSchedulerCells( - ASite: TcxSchedulerReportSchedulingAreaCell); -var - APageIndex, APeriodIndex, ASubIndex: Integer; -begin - APageIndex := ASite.PageIndex; - GetPagePeriodAndIndex(APageIndex, APeriodIndex, ASubIndex); - FillDatesForPage(ASite.VisibleDays, APageIndex, APeriodIndex, ASubIndex); - with CreateSchedulingCellsProducer(ASite) do - try - Produce; - finally - Free; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.PrepareEvents; -var - I: Integer; - AEvent: TcxSchedulerEvent; - AllowPrint: Boolean; -begin - for I := 0 to FEvents.AbsoluteCount - 1 do - begin - AEvent := FEvents.AbsoluteItems[I]; - AllowPrint := True; - DoCanPrintEvent(AEvent, AllowPrint); - if not AllowPrint then - FEvents.Remove(AEvent); - end; - FEvents.Sort(TcxCompareEventsProc(@cxCompareEventsOrder)); - TcxSchedulerCachedEventListAccess(FEvents).Changed; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.DoCanPrintEvent( - AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); -begin - ReportLink.DoCanPrintEvent(AEvent, AllowPrint); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Progress(APercentDone: Double); -begin - if ReportLink <> nil then - ReportLink.DoProgress(APercentDone); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.AfterBuild; -begin - VisualStyles.FReportLink := nil; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.BeforeBuild; -begin - VisualStyles.FReportLink := ReportLink; - CurrentDate := PrintRange.PrintFrom; - FPagesPerPeriod := GetPagesPerPeriod; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TcxCustomSchedulerReportLinkPrintStyle._AddRef: Integer; -begin - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle._Release: Integer; -begin - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetDC: HDC; -begin - Result := ReportLink.Renderer.DC; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; -begin - Result := ReportLink.OptionsRefinements.DisplayGraphicsAsText; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetEndEllipsis: Boolean; -begin - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetFlatCheckMarks: Boolean; -begin - Result := ReportLink.OptionsRefinements.FlatCheckMarks; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetGraphicsText: string; -begin - Result := ReportLink.OptionsRefinements.GraphicsText; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetMultiline: Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetTransparentGraphics: Boolean; -begin - Result := ReportLink.OptionsRefinements.TransparentGraphics; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := 2; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := 2; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; -const - GraphicClasses: array[Boolean] of TGraphicClass = (TMetafile, TBitmap); -begin - Result := GraphicClasses[IdxPSCellParams2_GetRichEditTransparent]; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetRichEditTransparent: Boolean; -begin - {$IFDEF DXVER500} - Result := ReportLink.OptionsRefinements.TransparentRichEdits; - {$ELSE} - Result := False; - {$ENDIF} -end; - -function TcxCustomSchedulerReportLinkPrintStyle.AddPageSite( - const ABounds: TRect): TcxSchedulerReportPageSite; -begin - Result := ReportLink.AddPageSite(ABounds); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Changed; -begin - if Styles <> nil then Styles.StyleChanged(Self); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateObjects; -begin - FUsedDays := TcxSchedulerDateList.Create; - FEvents := TcxSchedulerCachedEventList.Create; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.DestroyObjects; -begin - FEvents.Free; - FUsedDays.Free; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageCount: Integer; -begin - Result := 0; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetRebuildOnPageParamsChange( - AnUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetActualDatePrintFrom: TDate; -begin - if PrintRange <> nil then - Result := PrintRange.PrintFrom - else - Result := 0; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetActualDatePrintTo: TDate; -begin - if PrintRange <> nil then - Result := PrintRange.PrintTo - else - Result := 0; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPagesPerPeriod: Integer; -begin - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetGlyphIndex: Integer; -begin - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := GetGlyphIndex; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetSchedulerHeaderParams: TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - Result.NativeParams := VisualStyles.GetSchedulerHeaderParams; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.DrawDesignWindowPreview(ACanvas: TCanvas; const ABounds: TRect); -var - ALeft, ATop: Integer; -begin - with ABounds do - begin - ALeft := (Left + Right - StylePreviewImages.Width) div 2; - ATop := (Top + Bottom - StylePreviewImages.Height) div 2; - end; - StylePreviewImages.Draw(ACanvas, ALeft, ATop, PreviewGlyphIndex); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetResourcePageCount: Integer; -begin - Result := ResourceCountPerPage; - if Result = 0 then - Result := 1 - else - if ResourceCount > 0 then - begin - Result := ResourceCount div ResourceCountPerPage + - Byte(ResourceCount mod ResourceCountPerPage > 0); - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetShowDateNavigator( - APageIndex: Integer): Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetShowNotesAreaBlank: Boolean; -begin - Result := FShowNotesAreaBlank; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetBoolOption( - var AOption: Boolean; Value: Boolean); -begin - if AOption <> Value then - begin - AOption := Value; - Changed; - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.SupportTimeRange: Boolean; -begin - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.SupportMessage: Boolean; -begin - Result := False; -end; - -// report cells creation - -function TcxCustomSchedulerReportLinkPrintStyle.CreateSchedulingAreaCell( - ASite: TdxReportCell): TcxSchedulerReportSchedulingAreaCell; -begin - Result := TcxSchedulerReportSchedulingAreaCell.Create(ASite); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - Result := TcxSchedulerReportCommonCellsProducer.CreateEx(Self, ASite); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateDateNavigatorCell( - ASite: TdxReportCell; AYear, AMonth: Word): TcxSchedulerReportDateNavigatorCell; -begin - with Scheduler.DateNavigator do - begin - Result := TcxSchedulerReportDateNavigatorCell.CreateEx(ASite, - ActualFirstWeekOfYear, AYear, AMonth, ShowDatesContainingEventsInBold, ShowWeekNumbers); - Result.FBoldedDays := Self.FBoldedDays; - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateHeaderCell( - ASite: TdxReportCell): TcxSchedulerReportSchedulerHeaderCell; -begin - Result := TcxSchedulerReportSchedulerHeaderCell.Create(ASite); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateNotesCell( - ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; -begin - Result := TcxSchedulerReportNotesAreaCell.CreateEx(ASite, False); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateNotesLinedCell( - ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; -begin - Result := TcxSchedulerReportNotesAreaCell.CreateEx(ASite, True); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateTaskPadCell( - ASite: TdxReportCell): TcxSchedulerReportTaskPadCell; -begin - Result := TcxSchedulerReportTaskPadCell.CreateEx(ASite, False); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); -begin - ReportLink.SetCellViewParams(ACell, GetSchedulerHeaderParams); - ReportLink.SetCellViewParams(ACell.Content, GetSchedulerHeaderParams); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.InitReportCell( - ACell: TdxReportCell; const ABounds: TRect): TdxReportCell; - - procedure InitAdditionalAreaCell(const AViewParams: TcxViewParams); - begin - ReportLink.SetCellViewParams(ACell, AViewParams); - ReportLink.SetCellViewParams(TcxSchedulerReportNotesAreaCell( - ACell).DataCell, AViewParams); - end; - -begin - ACell.BoundsRect := ABounds; - Result := ACell; - if ReportLink = nil then Exit; - ACell.Transparent := not ReportLink.OptionsFormatting.UseNativeStyles; - if ACell is TcxSchedulerReportPageItemCell then - begin - case TcxSchedulerReportPageItemCell(ACell).GetType of - srSchedulingArea: - begin - BuildSchedulerCells(TcxSchedulerReportSchedulingAreaCell(ACell)); - ReportLink.DoInitializeSchedulingAreaCell( - TcxSchedulerReportSchedulingAreaCell(ACell)); - end; - srHeader: - InitHeaderCell(TcxSchedulerReportSchedulerHeaderCell(ACell)); - srNotesBlank: - begin - InitAdditionalAreaCell(VisualStyles.GetNotesAreaBlankParams); - ReportLink.DoInitializeNotesAreaCell( - TcxSchedulerReportNotesAreaCell(ACell)); - end; - srNotesLined: - begin - InitAdditionalAreaCell(VisualStyles.GetNotesAreaLinedParams); - ReportLink.DoInitializeNotesAreaCell( - TcxSchedulerReportNotesAreaCell(ACell)); - end; - srTaskPad: - begin - InitAdditionalAreaCell(VisualStyles.GetTaskPadParams); - ReportLink.InitializeTaskPadCell( - TcxSchedulerReportTaskPadCell(ACell)); - end; - end; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CorrectBoundsWithHeader( - AHeader: TcxSchedulerReportSchedulerHeaderCell; var ABounds: TRect); -begin - if not AHeader.Visible then - ABounds.Top := 0 - else - ABounds.Top := AHeader.BoundsRect.Bottom + InterAreaSpace; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateAdditionalControls( - ASite: TdxReportCell; AHasCalendar, AHasTaskPad, AHasNotes, - AHasNotesLined, ARightSide: Boolean; var ABounds: TRect); -var - R: array[0..2] of TRect; - C: Integer; - - function GetAreaBounds(AllowShow: Boolean; - var ABounds: TRect; var AIndex: Integer): Boolean; - begin - Result := AllowShow; - if not Result then Exit; - ABounds := R[AIndex]; - Inc(AIndex); - end; - - procedure CreateCells; - var - AIndex: Integer; - ABounds: TRect; - begin - AIndex := 0; - if GetAreaBounds(AHasTaskPad, ABounds, AIndex) then - InitReportCell(CreateTaskPadCell(ASite), ABounds); - if GetAreaBounds(AHasNotes, ABounds, AIndex) then - InitReportCell(CreateNotesCell(ASite), ABounds); - if GetAreaBounds(AHasNotesLined, ABounds, AIndex) then - InitReportCell(CreateNotesLinedCell(ASite), ABounds); - end; - -begin - C := Byte(AHasTaskPad) + Byte(AHasNotes) + Byte(AHasNotesLined); - if C = 0 then Exit; - SplitToRects(ABounds, AHasCalendar, ARightSide, ABounds, R[0]); - if C = 2 then - Rect2RectsVert(R[0], R[0], R[1]) - else - if C = 3 then - begin - if AHasCalendar then - Rect2RectsVert(R[0], R[0], R[1], R[2]) - else - begin - Rect2RectsVert(R[0], R[1], R[0]); - Rect2RectsHorz(R[1], R[1], R[2]); - end; - end; - CreateCells; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateHeaderDateNavigator( - AHeader: TcxSchedulerReportSchedulerHeaderCell; APageIndex: Integer; out ABounds: TRect); -var - R: TRect; - Y, M, D: Word; - AHeight, H, ALeft: Integer; - CP, HP: TdxReportItemViewParams; - ACell: TcxSchedulerReportDateNavigatorCell; -begin - FillChar(CP, SizeOf(CP), 0); - FillChar(HP, SizeOf(HP), 0); - AHeight := ABounds.Bottom - ABounds.Top; - CP.NativeParams := VisualStyles.GetDateNavigatorContentParams; - HP.NativeParams := VisualStyles.GetDateNavigatorHeaderParams; - HP.Transparent := not ReportLink.OptionsFormatting.UseNativeStyles; - GetPageDateNavigatorInfo(APageIndex, Y, M); - ACell := CreateDateNavigatorCell(AHeader, Y, M); - H := ACell.MeasureDateNavigatorHeight(CP.NativeParams, HP.NativeParams); - if H > AHeight then - ACell.AdjustSize(CP, HP, H, AHeight); - R.TopLeft := Point(0, 0); - R.BottomRight := TPoint(ACell.CalculateSize(CP, HP)); - OffsetRect(R, ABounds.Right - ABounds.Left - R.Right, 0); - InflateRect(R, 0, -3); - ACell.BoundsRect := R; - ALeft := R.Left; - if PrintRange.MonthCount > 1 then - begin - IncAMonth(Y, M, D); - ACell.BoundsRect := cxRectSetRight(R, R.Left); - ALeft := R.Left - (R.Right - R.Left); - ACell := CreateDateNavigatorCell(AHeader, Y, M); - if H > AHeight then - ACell.AdjustSize(CP, HP, H, AHeight); - ACell.CalculateSize(CP, HP); - ACell.BoundsRect := R; - end; - AHeader.Content.BoundsRect := MakeRect(ABounds.Left + cxTextOffset, - ABounds.Top + cxTextOffset, ALeft, ABounds.Bottom - cxTextOffset); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateLayoutForPeriod( - APeriodIndex: Integer); -var - APageIndex: Integer; - R: TRect; - APage: TcxSchedulerReportPageSite; - AHeader: TcxSchedulerReportSchedulerHeaderCell; -begin - APageIndex := GetPageIndex(APeriodIndex, 0); - CreatePageSiteWithHeader(APageIndex, APage, AHeader, R); - CorrectBoundsWithHeader(AHeader, R); - CreateControlsOnFirstPage(APageIndex, APage, AHeader, R); - if Layout = pslTwoPages then - begin - CreatePageSiteWithHeader(APageIndex + 1, APage, AHeader, R, False); - CorrectBoundsWithHeader(AHeader, R); - CreateControlsOnSecondPage(APageIndex + 1, APage, AHeader, R); - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreatePageSiteWithHeader( - APageIndex: Integer; out ASite: TcxSchedulerReportPageSite; - out AHeader: TcxSchedulerReportSchedulerHeaderCell; - out ABounds: TRect; AIsPrimary: Boolean = True); -var - R: TRect; -begin - ABounds := GetPageSiteBounds(APageIndex); - ASite := AddPageSite(ABounds); - ASite.FPageIndex := APageIndex; - ASite.FPrimaryPage := AIsPrimary; - ABounds := ASite.GetInnerBounds(0); - if GetHasPageReportTitle(APageIndex) then - Inc(ABounds.Top, ReportLink.RenderInfo.CalculateTitleHeight); - if GetHasPageHeader(APageIndex) then - begin - R := ABounds; - R.Bottom := R.Top + GetPageHeaderHeight(R, APageIndex); - ABounds.Top := R.Bottom + InterAreaSpace; - AHeader := CreateHeaderCell(ASite); - Inc(R.Bottom, AHeader.BorderEdgeThicknesses[csBottom]); - InitReportCell(AHeader, R); - if GetShowDateNavigator(APageIndex) then - begin - R := AHeader.GetInnerBounds(0); - CreateHeaderDateNavigator(TcxSchedulerReportSchedulerHeaderCell(AHeader), APageIndex, R); - end; - AHeader.AdjustTextSize; - if AIsPrimary then - ReportLink.DoInitializeHeaderPrimaryCell(AHeader) - else - ReportLink.DoInitializeHeaderSecondaryCell(AHeader); - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CanSplitSchedulingOnTwoPages: Boolean; -begin - Result := Layout = pslTwoPages; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetHasPageHeader( - APageIndex: Integer): Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetHasPageReportTitle( - APageIndex: Integer): Boolean; -begin - case ReportLink.ReportTitleMode of - tmNone: - Result := False; - tmOnFirstPage: - Result := APageIndex div (Byte(Layout) + 1) = 0; - else - Result := True; - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageHeaderHeight( - const ASiteBounds: TRect; APageIndex: Integer): Integer; -var - AMin, AMax: Integer; -begin - Result := 0; - AMin := Round((ASiteBounds.Bottom - ASiteBounds.Top) * SchedulerHeaderMinHeight); - AMax := Round((ASiteBounds.Bottom - ASiteBounds.Top) * SchedulerHeaderMaxHeight); - if GetShowDateNavigator(APageIndex) and (ReportLink <> nil) then - begin - with VisualStyles do - Result := TcxSchedulerReportDateNavigatorCell.MeasureDateNavigatorHeight( - GetDateNavigatorContentParams, GetDateNavigatorHeaderParams); - end; - Result := Max(Min(AMax, Result), AMin); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageIndex( - APeriodIndex, AIndex: Integer): Integer; -begin - Result := (APeriodIndex * (Byte(Layout) + 1) + AIndex); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.GetPagePeriodAndIndex( - APageIndex: Integer; var APeriodIndex, ASubIndex: Integer); -begin - ASubIndex := 0; - if Layout = pslTwoPages then - begin - APeriodIndex := APageIndex div 2; - ASubIndex := APageIndex mod 2; - end - else - APeriodIndex := APageIndex; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageSiteBounds( - APageIndex: Integer): TRect; -begin - Result := MakeBounds(0, 0, ReportLink.PageWidth, ReportLink.PageHeight); - OffsetRect(Result, 0, APageIndex * ReportLink.PageHeight); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetStartOfWeekOffset: Integer; -begin - Result := 0; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.GetPageDateNavigatorInfo( - APageIndex: Integer; out AYear, AMonth: Word); -var - ADate: TDateTime; - ADayCount: Integer; -begin - ADayCount := APageIndex * GetDaysPerPeriod div - ((Byte(Layout) + 1) * GetResourcePageCount); - ADate := PrintRange.PrintFrom + ADayCount; - AYear := YearOf(ADate); - AMonth := MonthOf(ADate); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetDaysPerPeriod: Integer; -begin - Result := 1; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -begin -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetActive: Boolean; -begin - if Styles <> nil then - Result := (Styles.ActiveStyle = Self) and Styles.ActiveStyleAssigned - else - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetHasAdditionalArea: Boolean; -begin - Result := ShowNotesAreaBlank or ShowNotesAreaLined or ShowTaskPad; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetIndex: Integer; -begin - if Styles <> nil then - Result := Styles.IndexOf(Self) - else - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageSite( - AIndex: Integer): TcxSchedulerReportPageSite; -begin - if ReportLink <> nil then - Result := TcxSchedulerReportPageSite(ReportLink.PageSites[AIndex]) - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPeriodCount: Integer; -begin - Result := PageCount; - if Layout = pslTwoPages then - Result := Result div 2; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPrintRange: TcxSchedulerReportLinkPrintRange; -begin - if ReportLink <> nil then - Result := ReportLink.PrintRange - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetReportLink: TcxSchedulerReportLink; -begin - if Styles <> nil then - Result := Styles.ReportLink - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetResourceCount: Integer; -begin - if (Scheduler <> nil) and (Scheduler.Storage <> nil) and - (Scheduler.Storage.Resources.ResourceItems.VisibleResourceCount > 0) then - Result := Scheduler.Storage.Resources.ResourceItems.VisibleResourceCount - else - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetScheduler: TcxScheduler; -begin - if ReportLink <> nil then - Result := ReportLink.Scheduler - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetStorage: TcxCustomSchedulerStorage; -begin - if Scheduler <> nil then - Result := Scheduler.Storage - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetTimePrintFrom: TTime; -begin - Result := TimeOf(PrintRange.TimePrintFrom); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetTimePrintTo: TTime; -begin - Result := TimeOf(PrintRange.TimePrintTo); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetVisualStyles: TcxSchedulerReportLinkStyles; -begin - if ReportLink <> nil then - Result := ReportLink.ActiveStyles - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsCaptionStored: Boolean; -begin - Result := (FCaption <> DefaultCaption); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsLayoutStored: Boolean; -begin - Result := Layout <> pslOnePage; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsShowNotesAreaBlankStored: Boolean; -begin - Result := FShowNotesAreaBlank <> False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsActiveStored: Boolean; -begin - Result := Active and Styles.ActiveStyleAssigned; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetActive(Value: Boolean); -begin - if Styles <> nil then - begin - if Value then - Styles.ActiveStyle := Self - else - Styles.ActiveStyle := nil; - Styles.ActiveStyleAssigned := Value; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetCaption(const Value: string); -begin - if Caption <> Value then - begin - FCaption := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetCompressWeekends( - Value: Boolean); -begin - SetBoolOption(FCompressWeekends, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetDontPrintWeekends( - Value: Boolean); -begin - SetBoolOption(FDontPrintWeekEnds, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetLayout( - Value: TcxSchedulerReportLinkPeriodicPrintStyleLayout); -begin - if FLayout <> Value then - begin - FLayout := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetResourceCountPerPage( - Value: Integer); -begin - if FResourceCountPerPage <> Value then - begin - FResourceCountPerPage := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowEventImages(Value: Boolean); -begin - if FShowEventImages <> Value then - begin - FShowEventImages := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowNotesAreaBlank( - Value: Boolean); -begin - SetBoolOption(FShowNotesAreaBlank, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowNotesAreaLined( - Value: Boolean); -begin - SetBoolOption(FShowNotesAreaLined, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowResourceImages(Value: Boolean); -begin - if FShowResourceImages <> Value then - begin - FShowResourceImages := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowTaskPad(Value: Boolean); -begin - SetBoolOption(FShowTaskPad, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetTimePrintFrom(Value: TTime); -begin - PrintRange.TimePrintFrom := Value; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetTimePrintTo(Value: TTime); -begin - PrintRange.TimePrintTo := Value; -end; - -{ TcxSchedulerReportLinkDailyPrintStyle } - -constructor TcxSchedulerReportLinkDailyPrintStyle.Create( - AStyles: TcxSchedulerReportLinkPrintStyles); -begin - inherited Create(AStyles); - FShowEventImages := True; - FShowResourceImages := True; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionDaily); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := (AView is TcxSchedulerDayView) or (AView is TcxSchedulerTimeGridView); -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.BeforeBuild; -begin - inherited BeforeBuild; - FCurrentPagePerDate := PagesPerPeriod; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.CanSplitSchedulingOnTwoPages: Boolean; -begin - Result := False; -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - if Layout = pslOnePage then - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - CreateAdditionalControls(ASite, False, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - Result := TcxSchedulerReportDailyCellsProducer.CreateEx(Self, ASite); -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -begin - APageIndex := APageIndex div (Byte(Layout) + 1) div GetResourcePageCount; - ADateList.Add(PrintRange.PrintFrom + APageIndex); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - Result := Scheduler.ViewDay - else - Result := inherited GetCorrespondedView; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetGlyphIndex: Integer; -begin - Result := Byte(HasAdditionalArea); - if Layout = pslTwoPages then - Result := 2; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetPageCount: Integer; -begin - Result := GetResourcePageCount * PrintRange.DayCount * (Byte(Layout) + 1); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetPagesPerPeriod: Integer; -var - I, J: Integer; -begin - if (ResourceCountPerPage = 0) or (ResourceCount < 2) then - Result := Byte(Layout) + 1 - else - begin - I := Min(ResourceCount, ResourceCountPerPage); - J := ResourceCount div I; - if J * I < ResourceCount then Inc(J); - Result := J * (Byte(Layout) + 1); - end; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetShowNotesAreaBlank: Boolean; -begin - Result := inherited GetShowNotesAreaBlank; - if not Result and (Layout <> pslOnePage) then - Result := not (ShowTaskPad or ShowNotesAreaLined); -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); -begin - ReportLink.SetCellViewParams(ACell, VisualStyles.GetSchedulerHeaderParams); - ACell.PrimaryText := DateTimeHelper.DateToLongDateStr(CurrentDate); - ACell.SecondaryText := LongDayNames[DayOfWeek(CurrentDate)]; - inherited InitHeaderCell(ACell); - Dec(FCurrentPagePerDate); - if FCurrentPagePerDate = 0 then - begin - CurrentDate := CurrentDate + 1; - FCurrentPagePerDate := PagesPerPeriod; - end; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.SupportMessage: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.SupportTimeRange: Boolean; -begin - Result := True; -end; - -{ TcxSchedulerReportLinkCustomDetailsPrintStyle } - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.AddPageSite( - const ABounds: TRect): TcxSchedulerReportPageSite; -begin - Inc(BuildedPageCount); - Result := inherited AddPageSite(ABounds); -end; - -procedure TcxSchedulerReportLinkCustomDetailsPrintStyle.BeforeBuild; -begin - CurrentPage := nil; - CellsOnPage := 0; - BuildedPageCount := 0; - FTimeWidth := MeasureTimeWidth; - inherited BeforeBuild; -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.GetNextPage( - APrevPage: TcxSchedulerReportPageSite; out ABounds: TRect): TcxSchedulerReportPageSite; -begin - CellsOnPage := 0; - if APrevPage = nil then - Result := PageSites[0] - else - Result := AddPageSite(GetPageSiteBounds(BuildedPageCount)); - ABounds := Result.GetInnerBounds(0); - if GetHasPageReportTitle(BuildedPageCount - 1) then - Inc(ABounds.Top, ReportLink.RenderInfo.CalculateTitleHeight); -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.GetPageCount: Integer; -begin - Result := Max(1, BuildedPageCount); -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.MeasureTimeWidth: Integer; -var - AFont: TFont; -begin - AFont := ReportLink.Font; - if (VisualStyles.Event <> nil) and (cxStyles.svFont in VisualStyles.Event.AssignedValues) then - AFont := VisualStyles.Event.Font; - Result := cxTextWidth(AFont, '00:00 - 00:00') * 2; -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.GetPageWidth: Integer; -begin - Result := ReportLink.PageWidth; -end; - -{ TcxSchedulerReportLinkDetailsPrintStyle } - -procedure TcxSchedulerReportLinkDetailsPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkDetailsPrintStyle then - begin - PaginationMode := TcxSchedulerReportLinkDetailsPrintStyle(Source).PaginationMode; - UsePagination := TcxSchedulerReportLinkDetailsPrintStyle(Source).UsePagination; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionDetails); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.RestoreDefaults; -begin - PaginationMode := dpmByDay; - UsePagination := False; - inherited RestoreDefaults; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.AddDayHeader(ADate: TDateTime; - AContinue: Boolean; var ABounds: TRect): TcxSchedulerReportSchedulerHeaderCell; -var - R: TRect; -begin - Result := TcxSchedulerReportSchedulerHeaderCell.Create(CurrentPage); - Result.Date := ADate; - R := cxRectSetHeight(ABounds, DayHeaderHeight); - ABounds.Top := R.Bottom + InterAreaSpace; - Result.Transparent := False; - Result.PrimaryText := GetDayHeaderText(AContinue); - InitReportCell(Result, R); - Result.Content.BoundsRect := Result.GetInnerBounds(0); - Result.AdjustTextSize; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.BeforeBuild; -begin - PreviousHeader := nil; - CellsOnPage := 0; - inherited BeforeBuild; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.BuildPages; -var - ADayEvents: TcxSchedulerEventList; -begin - ADayEvents := TcxSchedulerEventList.Create; - try - CellsOnPage := 0; - Site := nil; - DayIndex := 0; - while DayIndex < PrintRange.DayCount do - begin - ADayEvents.Clear; - Events.ExtractEvents(CurrentDate, ADayEvents); - Events.Sort(@cxCompareEventsOrder); - if (ADayEvents.Count > 0) and (Site = nil) then - begin - Site := AddPageSite(GetPageSiteBounds(0)); - PrepareNextPage; - end; - if (CellsOnPage > 0) and (ADayEvents.Count > 0) then - CheckPagination; - EventIndex := 0; - while EventIndex < ADayEvents.Count do - begin - CurrentCell := AddEventCell(ADayEvents[EventIndex]); - ReportLink.DoInitializeEventCell(CurrentCell); - if (CellsOnPage > 0) and (MeasureCellBounds.Bottom > CurrentPageBounds.Bottom) then - PrepareNextPage; - HeaderNeeded; - SetCellPlace; - Inc(EventIndex); - end; - CurrentDate := CurrentDate + 1; - Inc(DayIndex); - end; - finally - ADayEvents.Free; - end; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetDayHeaderHeight: Integer; -var - DC: HDC; -begin - DC := GetDC(0); - try - Result := ReportLink.Renderer.CalcTextHeight(DC, 'Wg', False, GetSchedulerHeaderParams.NativeParams.Font) * 2; - finally - ReleaseDC(0, DC); - end -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetDayHeaderText(AContinue: Boolean): string; -begin - Result := DateTimeHelper.DateToLongDateStr(CurrentDate); - if AContinue then - Result := Result + ' ' + cxGetResourceString(@sdxContinuedMessage); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetGlyphIndex: Integer; -begin - Result := 22; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := 16; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetSchedulerHeaderParams: TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - Result.NativeParams := VisualStyles.GetDayHeaderParams(CurrentDate); - Include(Result.FontStyle, fsBold); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.AddEventCell( - AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; -begin - Result := TcxSchedulerReportDetailsEventCell.CreateEx(Site, AEvent, - CurrentDate, VisualStyles.GetEventParams(AEvent), - (AEvent.Start < CurrentDate) and (CurrentDate > PrintRange.PrintFrom)); - Result.CalculateLayout(PageWidth, TimeWidth); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.CheckPagination; -begin - if not UsePagination then Exit; - case PaginationMode of - dpmByDay: - PrepareNextPage; - dpmByWeek: - if GetWeekNumber(CurrentDate, dSunday, fwySystem) <> - GetWeekNumber(PreviousHeader.Date, dSunday, fwySystem) then - PrepareNextPage; - dpmByMonth: - if MonthOf(CurrentDate) <> MonthOf(PreviousHeader.Date) then - PrepareNextPage; - end; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.HeaderNeeded; -begin - if NeedAddDayHeader then - PreviousHeader := AddDayHeader(CurrentDate, EventIndex > 0, CurrentPageBounds); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.NeedAddDayHeader: Boolean; -begin - Result := (CellsOnPage = 0) or (PreviousHeader = nil) or (PreviousHeader.Date <> CurrentDate); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.MeasureCellBounds: TRect; -begin - Result := CurrentPageBounds; - Result.Bottom := Result.Top + CurrentCell.CalculateHeight; - if NeedAddDayHeader then - Inc(Result.Bottom, DayHeaderHeight); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.PrepareNextPage; -begin - CurrentPage := GetNextPage(CurrentPage, CurrentPageBounds); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.SetCellPlace; -begin - Inc(CellsOnPage); - CurrentCell.BoundsRect := MeasureCellBounds; - CurrentCell.Parent := CurrentPage; - CurrentPageBounds.Top := CurrentCell.BoundsRect.Bottom + InterAreaSpace; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.SetPaginationMode( - Value: TcxSchedulerReportLinkDetailsPrintStylePaginationMode); -begin - if FPaginationMode <> Value then - begin - FPaginationMode := Value; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.SetUsePagination( - Value: Boolean); -begin - SetBoolOption(FUsePagination, Value); -end; - -{ TcxSchedulerReportLinkMemoPrintStyle } - -procedure TcxSchedulerReportLinkMemoPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkMemoPrintStyle then - with TcxSchedulerReportLinkMemoPrintStyle(Source) do - begin - Self.FSelectedEventsOnly := FSelectedEventsOnly; - Self.FStartEachItemOnNewPage := FStartEachItemOnNewPage; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkMemoPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionMemo); -end; - -procedure TcxSchedulerReportLinkMemoPrintStyle.RestoreDefaults; -begin - FSelectedEventsOnly := True; - FStartEachItemOnNewPage := True; - inherited RestoreDefaults; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.AddEventCell( - AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; -begin - Result := TcxSchedulerReportMemoEventCell.CreateEx(CurrentPage, AEvent, - NullDate, VisualStyles.GetEventParams(AEvent)); - Result.CalculateLayout(PageWidth, TimeWidth); -end; - -procedure TcxSchedulerReportLinkMemoPrintStyle.BuildPages; -var - I: Integer; - APageBounds: TRect; - ACell: TcxSchedulerReportDetailsEventCell; - - function GetCellBounds: TRect; - begin - Result := APageBounds; - Result.Bottom := Result.Top + ACell.CalculateHeight; - end; - -begin - Site := nil; - if Events.Count = 0 then Exit; - Site := AddPageSite(GetPageSiteBounds(0)); - CurrentPage := GetNextPage(CurrentPage, APageBounds); - Events.Sort(@cxCompareEventsOrder); - for I := 0 to Events.AbsoluteCount - 1 do - begin - ACell := AddEventCell(Events[I]); - ReportLink.DoInitializeEventCell(ACell); - if (CellsOnPage > 0) and (StartEachItemOnNewPage or - (GetCellBounds.Bottom > APageBounds.Bottom)) then - CurrentPage := GetNextPage(CurrentPage, APageBounds); - ACell.Parent := CurrentPage; - ACell.BoundsRect := GetCellBounds; - APageBounds.Top := ACell.BoundsRect.Bottom + InterAreaSpace; - Inc(CellsOnPage); - end; -end; - -procedure TcxSchedulerReportLinkMemoPrintStyle.DoCanPrintEvent( - AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); -var - I: Integer; - AUseEvent: Boolean; -begin - if SelectedEventsOnly and (Scheduler <> nil) then - begin - AllowPrint := False; - for I := 0 to Scheduler.SelectedEventCount - 1 do - begin - AllowPrint := Scheduler.SelectedEvents[I].Source = TcxSchedulerControlEvent(AEvent).Source; - if AllowPrint then Break; - end; - end; - AUseEvent := False; - for I := 0 to PrintRange.DayCount - 1 do - if AEvent.IsDayEvent(PrintRange.PrintFrom + I) then - begin - AUseEvent := True; - Break; - end; - if AUseEvent then - inherited DoCanPrintEvent(AEvent, AllowPrint) - else - AllowPrint := False; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.GetGlyphIndex: Integer; -begin - Result := 20; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := 17; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.MeasureTimeWidth: Integer; -var - AFont: TFont; -begin - AFont := ReportLink.Font; - if (VisualStyles.Event <> nil) and (cxStyles.svFont in VisualStyles.Event.AssignedValues) then - AFont := VisualStyles.Event.Font; - Result := 0; - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxSubjectLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxLocationLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxStartLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxFinishLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxShowTimeAsLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxRecurrenceLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxRecurrencePatternLabelCaption))); - if Result = 0 then - Result := inherited MeasureTimeWidth - else - Inc(Result, cxTextWidth(AFont, '0000 - 0000')); - Result := Min(PageWidth div 3, Result); -end; - -{ TcxSchedulerReportLinkMonthlyPrintStyle } - -constructor TcxSchedulerReportLinkMonthlyPrintStyle.Create( - AStyles: TcxSchedulerReportLinkPrintStyles); -begin - inherited Create(AStyles); - FShowResourceImages := True; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkMonthlyPrintStyle then - PrintExactlyOneMonthPerPage := - TcxSchedulerReportLinkMonthlyPrintStyle(Source).PrintExactlyOneMonthPerPage; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionMonthly); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := AView is TcxSchedulerWeeksView; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.RestoreDefaults; -begin - PrintExactlyOneMonthPerPage := False; - inherited RestoreDefaults; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - if Layout = pslTwoPages then - CreateAdditionalControls(ASite, True, ShowTaskPad and - (ShowNotesAreaLined or ShowNotesAreaBlank), False, False, False, ABounds) - else - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -var - HasTaskPad: Boolean; -begin - HasTaskPad := ShowTaskPad and not (ShowNotesAreaBlank or ShowNotesAreaLined); - CreateAdditionalControls(ASite, True, HasTaskPad, ShowNotesAreaBlank, - ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - Result := Scheduler.ViewWeeks - else - Result := inherited GetCorrespondedView; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -var - I: Integer; - Y, M, D: Word; - AStart: TDateTime; -begin - AStart := GetDateForPage(APageIndex); - DecodeDate(AStart, Y, M, D); - for I := 0 to DaysInAMonth(Y, M) - 1 do - ADateList.Add(AStart + I); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetDaysPerPeriod: Integer; -begin - Result := 30; -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetDateForPage( - APageIndex: Integer): TDateTime; -var - Y, M, D: Word; - APeriodIndex: Integer; -begin - APeriodIndex := APageIndex div (Byte(Layout) + 1) div GetResourcePageCount; - DecodeDate(PrintRange.PrintFrom, Y, M, D); - D := 1; - IncAMonth(Y, M, D, APeriodIndex); - Result := EncodeDate(Y, M, D); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetGlyphIndex: Integer; -begin - Result := 11 + Byte(HasAdditionalArea); - if Layout = pslTwoPages then - Inc(Result, 2); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetPageCount: Integer; -begin - Result := PrintRange.MonthCount * (Byte(Layout) + 1) * GetResourcePageCount; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); - - function GetMonthText(ADate: TDateTime): string; - begin - Result := FormatDateTime('mmmm', ADate) + ' ' + IntToStr(YearOf(ADate)); - end; - -var - ADate: TDateTime; -begin - ADate := GetDateForPage(ACell.PageIndex); - if PrintExactlyOneMonthPerPage then - ACell.PrimaryText := GetMonthText(ADate) - else - ACell.PrimaryText := GetMonthText(ADate) + ' - ' + GetMonthText(ADate + 32); - inherited InitHeaderCell(ACell); -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.SetPrintExactlyOneMonthPerPage( - Value: Boolean); -begin - SetBoolOption(FPrintExactlyOneMonthPerPage, Value); -end; - -{ TcxSchedulerReportLinkTrifoldPrintStyle } - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportLinkTrifoldPrintStyle then - with TcxSchedulerReportLinkTrifoldPrintStyle(Source) do - begin - Self.LeftSection := LeftSection; - Self.MiddleSection := MiddleSection; - Self.RightSection := RightSection; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionTrifold); -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.RestoreDefaults; -begin - inherited RestoreDefaults; - FSections[0] := smDailyCalendar; - FSections[1] := smTaskPad; - FSections[2] := smWeeklyCalendar; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.CreateLayoutForPeriod( - APeriodIndex: Integer); -var - I: Integer; - R: array[0..2] of TRect; - ABounds: TRect; - ASite: TcxSchedulerReportPageSite; -begin - ABounds := GetPageSiteBounds(APeriodIndex); - ASite := AddPageSite(ABounds); - ASite.FPageIndex := APeriodIndex; - ASite.FPrimaryPage := True; - ABounds := ASite.GetInnerBounds(0); - if GetHasPageReportTitle(APeriodIndex) then - Inc(ABounds.Top, ReportLink.RenderInfo.CalculateTitleHeight); - Rect2RectsHorz(ABounds, R[0], R[1], R[2]); - for I := 0 to 2 do - CreateLayoutForSection(ASite, APeriodIndex, R[I], FSections[I]); -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.CreateLayoutForSection( - ASite: TdxReportCell; APeriodIndex: Integer; const ABounds: TRect; - ASection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); -begin - FCurrentSection := ASection; - case ASection of - smDailyCalendar: - CreateSchedulingAreaWithHeader(ASite, ABounds); - smWeeklyCalendar: - CreateSchedulingAreaWithHeader(ASite, ABounds); - smMonthlyCalendar: - CreateSchedulingAreaWithHeader(ASite, ABounds); - smTaskPad: - InitReportCell(CreateTaskPadCell(ASite), ABounds); - smNotesAreaBlank: - InitReportCell(CreateNotesCell(ASite), ABounds); - smNotesAreaLined: - InitReportCell(CreateNotesLinedCell(ASite), ABounds); - end; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.CreateSchedulingAreaWithHeader( - ASite: TdxReportCell; ABounds: TRect); -var - R: TRect; - AHeader: TcxSchedulerReportSchedulerHeaderCell; -begin - R := ABounds; - R.Bottom := R.Top + Round((R.Bottom - R.Top) * SchedulerHeaderSmallHeight); - ABounds.Top := R.Bottom + InterAreaSpace; - FCurrentSchedulingArea := CreateSchedulingAreaCell(ASite); - InitReportCell(FCurrentSchedulingArea, ABounds); - AHeader := CreateHeaderCell(ASite); - InitReportCell(AHeader, R); - AHeader.Content.BoundsRect := AHeader.GetInnerBounds(0); - AHeader.AdjustTextSize; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - case FCurrentSection of - smDailyCalendar: - Result := TcxSchedulerReportDailyCellsProducer.CreateEx(Self, ASite); - smWeeklyCalendar, smMonthlyCalendar: - Result := TcxSchedulerReportWeeksCellsProducer.CreateEx(Self, ASite); - else - Result := nil; - end; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -var - I: Integer; - ADate: TDateTime; -begin - ADateList.Clear; - case FCurrentSection of - smDailyCalendar: - ADateList.Add(APageIndex + PrintRange.PrintFrom); - smWeeklyCalendar: - begin - if HasDailySection then - ADate := StartOfTheWeek(APageIndex + PrintRange.PrintFrom) - else - ADate := StartOfTheWeek(PrintRange.PrintFrom + - MulDiv(APageIndex * 7, PrintRange.WeekCount, PageCount)); - for I := 0 to 7 do - ADateList.Add(ADate + I); - end; - smMonthlyCalendar: - begin - ADate := StartOfTheMonth(PrintRange.PrintFrom + APageIndex * FPageRange); - for I := 0 to DaysInMonth(ADate) do - ADateList.Add(ADate + I); - end; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - case FCurrentSection of - smDailyCalendar: - Result := Scheduler.ViewDay; - smWeeklyCalendar: - Result := Scheduler.ViewWeek; - smMonthlyCalendar: - Result := Scheduler.ViewWeeks; - else - Result := inherited GetCorrespondedView; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetGlyphIndex: Integer; -begin - Result := 15; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetPageCount: Integer; -var - I: Integer; -begin - Result := 1; - FPageRange := 30; - for I := 0 to 2 do - begin - case FSections[I] of - smDailyCalendar: - begin - Result := Max(Result, PrintRange.DayCount); - FPageRange := 1; - end; - smWeeklyCalendar: - begin - Result := Max(Result, PrintRange.WeekCount); - FPageRange := Min(FPageRange, 7); - end; - smMonthlyCalendar: - begin - Result := Max(Result, PrintRange.MonthCount); - FPageRange := Min(FPageRange, 30); - end; - end; - end; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); -var - AText: string; - ADate1, ADate2: TDateTime; -begin - with FCurrentSchedulingArea.VisibleDays do - begin - ADate1 := Items[0]; - ADate2 := Items[Count - 1]; - end; - case FCurrentSection of - smDailyCalendar: - AText := DateTimeHelper.DateToLongDateStr(ADate1); - smWeeklyCalendar: - AText := DateTimeHelper.DayToStr(ADate1, 0, False) + ' - ' + - DateTimeHelper.DayToStr(ADate2 - 1, 0, False); - smMonthlyCalendar: - if not cxGetDateFormat(ADate1, AText, DATE_YEARMONTH) then - AText := FormatDateTime('mmmm', ADate1) + ' ' + IntToStr(YearOf(ADate1)) - end; - ACell.PrimaryText := AText; - inherited InitHeaderCell(ACell); -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetSection( - Index: Integer): TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; -begin - Result := FSections[Index]; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetHasDailySection: Boolean; -begin - Result := smDailyCalendar in [FSections[0], FSections[1], FSections[2]] -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.SetSection( - Index: Integer; AValue: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); -begin - if AValue <> FSections[Index] then - begin - FSections[Index] := AValue; - Changed; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.IsSectionStored( - Index: Integer): Boolean; -const - Sections: array[0..2] of TcxSchedulerReportLinkTrifoldPrintStyleSectionMode = - (smDailyCalendar, smTaskPad, smWeeklyCalendar); -begin - Result := FSections[Index] <> Sections[Index]; -end; - -{ TcxSchedulerReportLinkWeeklyPrintStyle } - -constructor TcxSchedulerReportLinkWeeklyPrintStyle.Create( - AStyles: TcxSchedulerReportLinkPrintStyles); -begin - inherited Create(AStyles); - FShowResourceImages := True; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkWeeklyPrintStyle then - begin - Arrange := TcxSchedulerReportLinkWeeklyPrintStyle(Source).Arrange; - DaysLayout := TcxSchedulerReportLinkWeeklyPrintStyle(Source).DaysLayout; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionWeekly); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := AView is TcxSchedulerWeekView; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.RestoreDefaults; -begin - Arrange := wsaTopToBottom; - inherited RestoreDefaults; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.Build; -var - APrevLayout: TcxSchedulerWeekViewDaysLayout; -begin - APrevLayout := Scheduler.ViewWeek.DaysLayout; - Scheduler.ViewWeek.DaysLayout := DaysLayout; - try - inherited Build; - finally - Scheduler.ViewWeek.DaysLayout := APrevLayout; - end; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - if Layout = pslTwoPages then - CreateAdditionalControls(ASite, True, ShowTaskPad and - (ShowNotesAreaLined or ShowNotesAreaBlank), False, False, False, ABounds) - else - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -var - HasTaskPad: Boolean; -begin - HasTaskPad := ShowTaskPad and not (ShowNotesAreaBlank or ShowNotesAreaLined); - CreateAdditionalControls(ASite, True, HasTaskPad, ShowNotesAreaBlank, - ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -const - CellsProducers: array[Boolean] of TcxSchedulerReportCommonCellsProducerClass = - (TcxSchedulerReportDailyCellsProducer, TcxSchedulerReportWeeksCellsProducer); -begin - Result := CellsProducers[Arrange = wsaTopToBottom].CreateEx(Self, ASite); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - begin - if Arrange = wsaTopToBottom then - Result := Scheduler.ViewWeek - else - Result := Scheduler.ViewDay; - end - else - Result := inherited GetCorrespondedView; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetGlyphIndex: Integer; -begin - if (DaysLayout = wdlOneColumn) and (Layout = pslOnePage) then - Result := 27 - else - Result := 3 + Byte(Arrange) + Byte(HasAdditionalArea) * 4 + - Byte(Layout = pslTwoPages) * 2 -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetDateForPage( - APageIndex: Integer): TDateTime; -begin - Result := StartOfTheWeek(PrintRange.PrintFrom + (APageIndex div GetResourcePageCount div (Byte(Layout) + 1)) * 7); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetDaysPerPeriod: Integer; -begin - Result := 7; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetPageCount: Integer; -begin - Result := PrintRange.WeekCount * (Byte(Layout) + 1) * GetResourcePageCount; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetPreviewGlyphIndex: Integer; -begin - if (DaysLayout = wdlOneColumn) and (Layout = pslOnePage) then - Result := 22 - else - Result := inherited GetPreviewGlyphIndex; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetStartOfWeekOffset: Integer; -begin - Result := -DayOfWeek(PrintRange.PrintFrom) + 2; // -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -const - DayCount: array[TcxSchedulerReportLinkPeriodicPrintStyleLayout, Boolean] of Integer = - ((7, 7), (3, 4)); -var - I: Integer; - AStart, ADate: TDateTime; -begin - AStart := GetDateForPage(APageIndex); - if Arrange = wsaLeftToRight then - for I := 0 to DayCount[Layout, ASubIndex <> 0] - 1 do - begin - ADate := AStart + ASubIndex * 3 + I; - if not DontPrintWeekEnds or not (DayOfWeek(ADate) in [1, 7]) then - ADateList.Add(ADate); - end - else - begin - AStart := AStart + Byte(Scheduler.OptionsView.ActualStartOfWeek); - for I := 0 to 6 do - ADateList.Add(AStart + I); - end; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); - - function GetWeekDayText(ADate: TDateTime): string; - begin - Result := DateTimeHelper.DayToStr(ADate, 0, False); - end; - -var - AWeekDate: TDateTime; -begin - AWeekDate := GetDateForPage(ACell.PageIndex); - ACell.PrimaryText := GetWeekDayText(AWeekDate) + ' - ' + - GetWeekDayText(AWeekDate + 6); - inherited InitHeaderCell(ACell); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.CanDontPrintWeekends: Boolean; -begin - Result := SupportTimeRange; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.SupportMessage: Boolean; -begin - Result := Arrange = wsaLeftToRight; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.SupportTimeRange: Boolean; -begin - Result := Arrange = wsaLeftToRight; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.IsDaysLayoutStored: Boolean; -begin - Result := FDaysLayoutAssigned and (DaysLayout <> wdlTwoColumns); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetDaysLayout: TcxSchedulerWeekViewDaysLayout; -begin - if DaysLayoutAssigned or (Scheduler = nil) then - Result := FDaysLayout - else - Result := Scheduler.ViewWeek.DaysLayout; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.IsArrangeStored: Boolean; -begin - Result := Arrange <> wsaTopToBottom; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.SetArrange( - Value: TcxSchedulerReportLinkWeeklyPrintStyleArrange); -begin - if Arrange <> Value then - begin - FArrange := Value; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.SetDaysLayout( - Value: TcxSchedulerWeekViewDaysLayout); -begin - FDaysLayout := Value; - FDaysLayoutAssigned := True; - Changed; -end; - -{ TcxSchedulerReportLinkYearlyPrintStyle } - -procedure TcxSchedulerReportLinkYearlyPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkYearlyPrintStyle then - with TcxSchedulerReportLinkYearlyPrintStyle(Source) do - begin - Self.FMonthCountPerPage := FMonthCountPerPage; - Self.FPrimaryPageHeadersOnly := FPrimaryPageHeadersOnly; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionYearly); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := AView is TcxSchedulerYearView; -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.RestoreDefaults; -begin - FMonthCountPerPage := 12; - FPrimaryPageHeadersOnly := False; - inherited RestoreDefaults; -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.BuildSchedulerCells( - ASite: TcxSchedulerReportSchedulingAreaCell); -begin - ASite.CellSides := ASite.CellSides + [csRight]; - inherited BuildSchedulerCells(ASite); -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - if (Layout = pslTwoPages) and (APageIndex mod 2 = 0) then - CreateAdditionalControls(ASite, True, ShowTaskPad and - (ShowNotesAreaLined or ShowNotesAreaBlank), False, False, False, ABounds) - else - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); -var - HasTaskPad: Boolean; -begin - HasTaskPad := ShowTaskPad and not (ShowNotesAreaBlank or ShowNotesAreaLined); - CreateAdditionalControls(ASite, True, HasTaskPad, ShowNotesAreaBlank, - ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - Result := TcxSchedulerReportYearlyCellsProducer.CreateEx(Self, ASite); -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -begin - ADateList.Clear; - APageIndex := APageIndex div PeriodPageCount; - ADateList.Add(EncodeDate(YearOf(PrintRange.PrintFrom) + APageIndex, 1, 1)) -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - Result := Scheduler.ViewYear - else - Result := inherited GetCorrespondedView; -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetHasPageHeader( - APageIndex: Integer): Boolean; -const - Indexes: array[TcxSchedulerReportLinkPeriodicPrintStyleLayout] of Integer = (0, 1); -begin - APageIndex := APageIndex mod PeriodPageCount; - Result := not PrimaryPageHeadersOnly or (APageIndex <= Indexes[Layout]); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetGlyphIndex: Integer; -begin - Result := 23 + Byte(HasAdditionalArea); - if Layout = pslTwoPages then - Inc(Result, 2); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := 18 + Byte(HasAdditionalArea); - if Layout = pslTwoPages then - Inc(Result, 2); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetPageCount: Integer; -begin - Result := PrintRange.YearCount * GetResourcePageCount * - (12 div FMonthCountPerPage) * (Byte(Layout) + 1); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetShowDateNavigator( - APageIndex: Integer): Boolean; -begin - Result := False; -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); - - function GetYearText(AYear: Word): string; - var - ADate: TDateTime; - S, S1: string; - begin - ADate := EncodeDate(AYear, 1, 1); - if not cxGetDateFormat(ADate, S, DATE_YEARMONTH) then - S := FormatDateTime('dddddd', ADate); - ADate := EncodeDate(AYear, 12, 31); - if not cxGetDateFormat(ADate, S1, DATE_YEARMONTH) then - S1 := FormatDateTime('dddddd', ADate); - Result := S + ' - ' + S1; - end; - -var - AIndex: Integer; -begin - if ACell.PageSite.PageIndex mod PeriodPageCount <> 0 then Exit; - AIndex := ACell.PageSite.PageIndex div PeriodPageCount; - ACell.Content.BoundsRect := ACell.GetInnerBounds(0); - ACell.PrimaryText := GetYearText(YearOf(PrintRange.PrintFrom) + AIndex); - inherited InitHeaderCell(ACell); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetPeriodPageCount: Integer; -begin - Result := (Byte(Layout) + 1) * 12 div MonthCountPerPage; -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.SetMonthCountPerPage( - AValue: Integer); -begin - AValue := Max(1, Min(12, AValue)); - while 12 mod AValue <> 0 do - Inc(AValue); - if AValue <> FMonthCountPerPage then - begin - FMonthCountPerPage := AValue; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.SetPrimaryPageHeadersOnly( - AValue: Boolean); -begin - if AValue <> FPrimaryPageHeadersOnly then - begin - FPrimaryPageHeadersOnly := AValue; - Changed; - end; -end; - -{ TdxfmSchedulerReportLinkDesignWindow } - -constructor TcxfmSchedulerReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhccxSchedulerReportLinkDesigner; - inherited; - wpPrintStyles := TList.Create; - CreateControls; - SetActivePage; -end; - -destructor TcxfmSchedulerReportLinkDesignWindow.Destroy; -begin - FreeAndNil(wpPrintStyles); - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(lbxStyles); - inherited; -end; - -function TcxfmSchedulerReportLinkDesignWindow.Execute: Boolean; -begin - Self.FActiveStyle := ReportLink.PrintStyles.FActiveStyle; - Self.FActiveStyleAssigned := ReportLink.PrintStyles.FActiveStyleAssigned; - if (ReportLink.PrintStyles.ActiveStyle = nil) or not FActiveStyleAssigned then - with ReportLink.PrintStyles do SetActiveStyleEx(GetCorrespondingStyle); - Result := inherited Execute; - if Result then - ReportLink.PrintStyles.ActiveStyle := ActivePrintStyle - else - begin - ReportLink.PrintStyles.FActiveStyleAssigned := FActiveStyleAssigned; - ReportLink.PrintStyles.FActiveStyle := FActiveStyle; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignDailyTabObjects; -var - ADailyStyle: TcxSchedulerReportLinkDailyPrintStyle; -begin - ADailyStyle := ReportLink.PrintStyles.Daily; - cbxPrintStyleDailyLayout.ItemIndex := Integer(ADailyStyle.Layout); - sePrintStyleDailyResourceCountPerPage.Properties.MaxValue := ADailyStyle.ResourceCount; - sePrintStyleDailyResourceCountPerPage.Value := ADailyStyle.ResourceCountPerPage; - chbxPrintStyleDailyTaskPad.Checked := ADailyStyle.ShowTaskPad; - chbxPrintStyleDailyNotesAreaBlank.Checked := ADailyStyle.ShowNotesAreaBlank; - chbxPrintStyleDailyNotesAreaLined.Checked := ADailyStyle.ShowNotesAreaLined; - tePrintStyleDailyPrintFrom.Time := ADailyStyle.TimePrintFrom; - tePrintStyleDailyPrintTo.Time := ADailyStyle.TimePrintTo; - SetShowImagesCheckBoxes(chbxPrintStyleDailyShowEventImages, - chbxPrintStyleDailyShowResourceImages, ADailyStyle); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignDetailsTabObjects; -var - ADetailsStyle: TcxSchedulerReportLinkDetailsPrintStyle; -begin - ADetailsStyle := ReportLink.PrintStyles.Details; - chbxPrintStyleDetailsUsePagination.Checked := ADetailsStyle.UsePagination; - cbxPrintStyleDetailsPagination.ItemIndex := Integer(ADetailsStyle.PaginationMode); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignMemoTabObjects; -var - AMemoStyle: TcxSchedulerReportLinkMemoPrintStyle; -begin - AMemoStyle := ReportLink.PrintStyles.Memo; - chbxPrintStyleMemoStartEachItemOnNewPage.Checked := AMemoStyle.StartEachItemOnNewPage; - chbxPrintStyleMemoPrintOnlySelectedEvents.Checked := AMemoStyle.SelectedEventsOnly; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignMonthlyTabObjects; -var - AMonthlyStyle: TcxSchedulerReportLinkMonthlyPrintStyle; -begin - AMonthlyStyle := ReportLink.PrintStyles.Monthly; - cbxPrintStyleMonthlyLayout.ItemIndex := Integer(AMonthlyStyle.Layout); - sePrintStyleMonthlyResourceCountPerPage.Properties.MaxValue := AMonthlyStyle.ResourceCount; - sePrintStyleMonthlyResourceCountPerPage.Value := AMonthlyStyle.ResourceCountPerPage; - chbxPrintStyleMonthlyTaskPad.Checked := AMonthlyStyle.ShowTaskPad; - chbxPrintStyleMonthlyNotesAreaBlank.Checked := AMonthlyStyle.ShowNotesAreaBlank; - chbxPrintStyleMonthlyNotesAreaLined.Checked := AMonthlyStyle.ShowNotesAreaLined; - chbxPrintStyleMonthlyDontPrintWeekends.Checked := AMonthlyStyle.DontPrintWeekends; - chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage.Checked := AMonthlyStyle.PrintExactlyOneMonthPerPage; - SetShowImagesCheckBoxes(chbxPrintStyleMonthlyShowEventImages, - chbxPrintStyleMonthlyShowResourceImages, AMonthlyStyle); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignTrifoldTabObjects; -var - ATrifoldStyle: TcxSchedulerReportLinkTrifoldPrintStyle; -begin - ATrifoldStyle := ReportLink.PrintStyles.Trifold; - cbxPrintStyleTrifoldSectionLeft.ItemIndex := Byte(ATrifoldStyle.LeftSection); - cbxPrintStyleTrifoldSectionMiddle.ItemIndex := Byte(ATrifoldStyle.MiddleSection); - cbxPrintStyleTrifoldSectionRight.ItemIndex := Byte(ATrifoldStyle.RightSection); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignWeeklyTabObjects; -var - AWeeklyStyle: TcxSchedulerReportLinkWeeklyPrintStyle; -begin - AWeeklyStyle := ReportLink.PrintStyles.Weekly; - cbxPrintStyleWeeklyArrange.ItemIndex := Integer(AWeeklyStyle.Arrange); - cbxPrintStyleWeeklyDaysLayout.ItemIndex := Integer(AWeeklyStyle.DaysLayout); - cbxPrintStyleWeeklyLayout.ItemIndex := Integer(AWeeklyStyle.Layout); - sePrintStyleWeeklyResourceCountPerPage.Properties.MaxValue := AWeeklyStyle.ResourceCount; - sePrintStyleWeeklyResourceCountPerPage.Value := AWeeklyStyle.ResourceCountPerPage; - chbxPrintStyleWeeklyTaskPad.Checked := AWeeklyStyle.ShowTaskPad; - chbxPrintStyleWeeklyNotesAreaBlank.Checked := AWeeklyStyle.ShowNotesAreaBlank; - chbxPrintStyleWeeklyNotesAreaLined.Checked := AWeeklyStyle.ShowNotesAreaLined; - chbxPrintStyleWeeklyDontPrintWeekends.Checked := AWeeklyStyle.DontPrintWeekends; - tePrintStyleWeeklyPrintFrom.Time := AWeeklyStyle.TimePrintFrom; - tePrintStyleWeeklyPrintTo.Time := AWeeklyStyle.TimePrintTo; - SetShowImagesCheckBoxes(chbxPrintStyleWeeklyShowEventImages, - chbxPrintStyleWeeklyShowResourceImages, AWeeklyStyle); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignYearlyTabObjects; -const - MontPerPageIndexes: array[0..11] of Integer = - (0, 1, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5); -var - AYearlyStyle: TcxSchedulerReportLinkYearlyPrintStyle; -begin - AYearlyStyle := ReportLink.PrintStyles.Yearly; - cbxPrintStyleYearlyLayout.ItemIndex := Integer(AYearlyStyle.Layout); - cbxPrintStyleYearlyMonthPerPage.ItemIndex := MontPerPageIndexes[AYearlyStyle.MonthCountPerPage - 1]; - sePrintStyleYearlyResourceCountPerPage.Properties.MaxValue := AYearlyStyle.ResourceCount; - sePrintStyleYearlyResourceCountPerPage.Value := AYearlyStyle.ResourceCountPerPage; - chbxPrintStyleYearlyTaskPad.Checked := AYearlyStyle.ShowTaskPad; - chbxPrintStyleYearlyNotesAreaBlank.Checked := AYearlyStyle.ShowNotesAreaBlank; - chbxPrintStyleYearlyNotesAreaLined.Checked := AYearlyStyle.ShowNotesAreaLined; - chbxPrimaryPageHeadersOnly.Checked := AYearlyStyle.PrimaryPageHeadersOnly; - SetShowImagesCheckBoxes(chbxPrintStyleYearlyShowEventImages, nil, AYearlyStyle); -end; - -function TcxfmSchedulerReportLinkDesignWindow.CanApply: Boolean; -begin - Result := inherited CanApply;// and not ReportLink.IsInconsistentState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoApply; -begin - if not IsValidConditions then Exit; - ReportLink.PrintStyles.ActiveStyle := ActivePrintStyle; - FActiveStyle := ReportLink.PrintStyles.FActiveStyle; - FActiveStyleAssigned := ReportLink.PrintStyles.FActiveStyleAssigned; - inherited DoApply; - ReportLink.RebuildReport; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoInitialize; -begin - - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited DoInitialize; - - with ReportLink.PrintRange do - begin - dePrintRangeStart.Date := PrintFrom; - dePrintRangeEnd.Date := PrintTo; - end; - - AssignTabSheetObjects; - RefreshPrintStyles; - ActivatePrintStyleTab; - - AssignDailyTabObjects; - AssignDetailsTabObjects; - AssignMemoTabObjects; - AssignMonthlyTabObjects; - AssignTrifoldTabObjects; - AssignWeeklyTabObjects; - AssignYearlyTabObjects; - - // Formatting - with ReportLink.OptionsFormatting do - begin - cbxLookAndFeel.ItemIndex := Min(2, Integer(LookAndFeelKind)); - chbxSuppressBackgroundBitmaps.Checked := SuppressBackgroundBitmaps; - chbxSuppressContentColoration.Checked := SuppressContentColoration; - chbxUseNativeStyles.Checked := UseNativeStyles; - end; - - PageControl1Change(nil); -end; - -{$IFDEF DELPHI7} -function TcxfmSchedulerReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -function TcxfmSchedulerReportLinkDesignWindow.CheckPrintRange: Boolean; -begin - Result := dePrintRangeEnd.Date >= dePrintRangeStart.Date; - if not Result then - begin - MessageBox(0, - PChar(cxGetResourceString(@sdxBadDatePrintRange)), - PChar(cxGetResourceString(@sdxReportDesignerCaption)), - MB_ICONINFORMATION or MB_OK); - PageControl1.ActivePage := tshPrintRange; - ActiveControl := dePrintRangeEnd; - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.CheckPrintStyleSettings: Boolean; - - procedure ShowWarning; - begin - MessageBox(0, - PChar(cxGetResourceString(@sdxBadTimePrintRange)), - PChar(cxGetResourceString(@sdxReportDesignerCaption)), - MB_ICONINFORMATION or MB_OK); - end; - -begin - if pcPrintStyleOptions.ActivePage = tshDaily then - begin - Result := TimeOf(tePrintStyleDailyPrintFrom.Time) <= TimeOf(tePrintStyleDailyPrintTo.Time); - if not Result then - begin - ShowWarning; - PageControl1.ActivePage := tshPrintStyles; - pcPrintStyleOptions.ActivePage := tshDaily; - ActiveControl := tePrintStyleDailyPrintTo; - end; - end - else - if pcPrintStyleOptions.ActivePage = tshWeekly then - begin - Result := TimeOf(tePrintStyleWeeklyPrintFrom.Time) <= TimeOf(tePrintStyleWeeklyPrintTo.Time); - if not Result then - begin - ShowWarning; - PageControl1.ActivePage := tshPrintStyles; - pcPrintStyleOptions.ActivePage := tshWeekly; - ActiveControl := tePrintStyleWeeklyPrintTo; - end; - end - else - Result := True; -end; - -function TcxfmSchedulerReportLinkDesignWindow.IsValidConditions: Boolean; -begin - Result := CheckPrintRange and CheckPrintStyleSettings; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadCaption( - AControl: TControl; StrPtr: Pointer); -begin - TControlAccess(AControl).Caption := cxGetResourceString(StrPtr); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadCaption( - AItem: TMenuItem; StrPtr: Pointer); -begin - AItem.Caption := cxGetResourceString(StrPtr); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStrings; -begin - inherited LoadStrings; - LoadStringsDaily; - LoadStringsMonthly; - LoadStringsWeekly; - LoadStringsTrifold; - LoadStringsDetails; - LoadStringsMemo; - LoadStringsOther; - LoadStringsYearly; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsCombo( - ACombo: TcxComboBox; ACaptions: array of Pointer); -var - I: Integer; -begin - with ACombo.Properties.Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to High(ACaptions) do - if ACaptions[I] <> nil then Add(cxGetResourceString(ACaptions[I])); - finally - EndUpdate; - end; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsDaily; -begin - LoadCaption(lblPrintStyleDailyLayout, @sdxPrintStyleLayout); - LoadStringsCombo(cbxPrintStyleDailyLayout, - [@sdxPrintStyleDailyLayout1PPD, - @sdxPrintStyleDailyLayout2PPD]); - LoadCaption(lblPrintStyleDailyResourceCountPerPage, - @sdxResourceCountPerPage); - LoadCaption(lblPrintStyleDailyInclude, - @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleDailyTaskPad, - @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleDailyNotesAreaBlank, - @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleDailyNotesAreaLined, - @sdxPrintStyleIncludeNotesAreaLined); - LoadCaption(lblPrintStyleDailyPrintFrom, @sdxPrintStylePrintFrom); - LoadCaption(lblPrintStyleDailyPrintTo, @sdxPrintStylePrintTo); - LoadCaption(chbxPrintStyleDailyShowEventImages, @sdxPrintStyleShowEventImages); - LoadCaption(chbxPrintStyleDailyShowResourceImages, @sdxPrintStyleShowResourceImages); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsDetails; -begin - LoadCaption(chbxPrintStyleDetailsUsePagination, - @sdxPrintStyleDetailsStartNewPageEach); - LoadStringsCombo(cbxPrintStyleDetailsPagination, - [@sdxDay, @sdxWeek, @sdxMonth]); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsMemo; -begin - LoadCaption(chbxPrintStyleMemoStartEachItemOnNewPage, - @sdxPrintStyleMemoStartEachItemOnNewPage); - LoadCaption(chbxPrintStyleMemoPrintOnlySelectedEvents, - @sdxPrintStyleMemoPrintOnlySelectedEvents); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsMonthly; -begin - LoadCaption(lblPrintStyleMonthlyLayout, @sdxPrintStyleLayout); - LoadStringsCombo(cbxPrintStyleMonthlyLayout, - [@sdxPrintStyleMonthlyLayout1PPM, @sdxPrintStyleMonthlyLayout2PPM]); - LoadCaption(lblPrintStyleMonthlyResourceCountPerPage, @sdxResourceCountPerPage); - LoadCaption(lblPrintStyleMonthlyInclude, @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleMonthlyTaskPad, @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleMonthlyNotesAreaBlank, @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleMonthlyNotesAreaLined, @sdxPrintStyleIncludeNotesAreaLined); - - LoadCaption(chbxPrintStyleMonthlyDontPrintWeekends, @sdxPrintStyleDontPrintWeekEnds); - LoadCaption(chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage, @sdxPrintStyleMonthlyPrintExactly1MPP); - LoadCaption(chbxPrintStyleMonthlyShowEventImages, @sdxPrintStyleShowEventImages); - LoadCaption(chbxPrintStyleMonthlyShowResourceImages, @sdxPrintStyleShowResourceImages); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsOther; - - procedure AdjustBevelSize(ABevel: TBevel; AControl: TControl); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := AControl.Left + AControl.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - lblPreviewWindow.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - // Misc - LoadCaption(tshPrintRange, @sdxPrintRanges); - LoadCaption(lblPrintRangeStart, @sdxPrintRangeStart); - LoadCaption(lblPrintRangeEnd, @sdxPrintRangeEnd); - LoadCaption(lblPrintRangesMiscellaneous, @sdxMiscellaneous); - LoadCaption(chbxHideDetailsOfPrivateAppointments, - @sdxHideDetailsOfPrivateAppointments); - LoadCaption(tshPrintStyles, @sdxTabPrintStyles); - LoadCaption(lblPrintStylesOptions, @sdxOptions); - AdjustBevelSize(bvlPrintStyleOptions, lblPrintStylesOptions); - // Formatting - LoadCaption(tshFormatting, @sdxFormatting); - LoadCaption(lblLookAndFeel, @sdxLookAndFeel); - AdjustBevelSize(bvlLookAndFeel, lblLookAndFeel); - LoadStringsCombo(cbxLookAndFeel, [@sdxLookAndFeelFlat, - @sdxLookAndFeelStandard, @sdxLookAndFeelUltraFlat]); - LoadCaption(lblRefinements, @sdxRefinements); - AdjustBevelSize(bvlRefinements, lblRefinements); - LoadCaption(chbxSuppressBackgroundBitmaps, @sdxSuppressBackgroundBitmaps); - LoadCaption(chbxSuppressContentColoration, @sdxSuppressContentColoration); - // Styles - LoadCaption(tshStyles, @sdxStyles); - LoadCaption(lblUseNativeStyles, @sdxUseNativeStyles); - AdjustBevelSize(bvlStyles, lblUseNativeStyles); - LoadCaption(btnStyleColor, @sdxBtnColor); - LoadCaption(btnStyleFont, @sdxBtnFont); - LoadCaption(btnStyleBackgroundBitmap, @sdxBtnTexture); - LoadCaption(btnStyleBackgroundBitmapClear, @sdxBtnTextureClear); - LoadCaption(btnStyleRestoreDefaults, @sdxBtnRestoreDefaults); - LoadCaption(btnStylesSaveAs, @sdxBtnSaveAs); - LoadCaption(miStyleColor, @sdxBtnColor); - LoadCaption(miStyleFont, @sdxBtnFont); - LoadCaption(miStyleBackgroundBitmap, @sdxBtnTexture); - LoadCaption(miStyleBackgroundBitmapClear, @sdxBtnTextureClear); - LoadCaption(miStyleRestoreDefaults, @sdxBtnRestoreDefaults); - LoadCaption(miStylesSelectAll, @sdxSelectAll); - LoadCaption(miStylesSaveAs, @sdxBtnSaveAs); - LoadCaption(lblStyleSheets, @sdxStyleSheets); - AdjustBevelSize(bvlStyleSheets, lblStyleSheets); - LoadCaption(btnStyleSheetNew, @sdxBtnNew); - LoadCaption(btnStyleSheetCopy, @sdxBtnCopy); - LoadCaption(btnStyleSheetDelete, @sdxBtnDelete); - LoadCaption(btnStyleSheetRename, @sdxBtnRename); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsTrifold; - - procedure FillTrifoldSectionStrings(ACombobox: TcxCombobox); - begin - LoadStringsCombo(ACombobox, - [@sdxPrintStyleTrifoldSectionModeDailyCalendar, - @sdxPrintStyleTrifoldSectionModeWeeklyCalendar, - @sdxPrintStyleTrifoldSectionModeMonthlyCalendar, - @sdxPrintStyleTrifoldSectionModeTaskPad, - @sdxPrintStyleTrifoldSectionModeNotesBlank, - @sdxPrintStyleTrifoldSectionModeNotesLined]); - end; - -begin - LoadCaption(lblPrintStyleTrifoldSectionLeft, @sdxPrintStyleTrifoldSectionLeft); - FillTrifoldSectionStrings(cbxPrintStyleTrifoldSectionLeft); - LoadCaption(lblPrintStyleTrifoldSectionMiddle, @sdxPrintStyleTrifoldSectionMiddle); - FillTrifoldSectionStrings(cbxPrintStyleTrifoldSectionMiddle); - LoadCaption(lblPrintStyleTrifoldSectionRight, @sdxPrintStyleTrifoldSectionRight); - FillTrifoldSectionStrings(cbxPrintStyleTrifoldSectionRight); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsWeekly; -begin - LoadCaption(lblPrintStyleWeeklyArrange, @sdxPrintStyleWeeklyArrange); - LoadCaption(lblPrintStyleWeeklyDaysLayout, @sdxPrintStyleWeeklyDaysLayout); - LoadStringsCombo(cbxPrintStyleWeeklyArrange, - [@sdxPrintStyleWeeklyArrangeT2B, @sdxPrintStyleWeeklyArrangeL2R]); - LoadStringsCombo(cbxPrintStyleWeeklyDaysLayout, - [@sdxPrintStyleWeeklyDaysLayoutTC, @sdxPrintStyleWeeklyDaysLayoutOC]); - - LoadCaption(lblPrintStyleWeeklyLayout, @sdxPrintStyleLayout); - LoadStringsCombo(cbxPrintStyleWeeklyLayout, - [@sdxPrintStyleWeeklyLayout1PPW, @sdxPrintStyleWeeklyLayout2PPW]); - LoadCaption(lblPrintStyleWeeklyResourceCountPerPage, @sdxResourceCountPerPage); - LoadCaption(lblPrintStyleWeeklyInclude, @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleWeeklyTaskPad, @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleWeeklyNotesAreaBlank, @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleWeeklyNotesAreaLined, @sdxPrintStyleIncludeNotesAreaLined); - - LoadCaption(lblPrintStyleWeeklyPrintFrom, @sdxPrintStylePrintFrom); - LoadCaption(lblPrintStyleWeeklyPrintTo, @sdxPrintStylePrintTo); - - LoadCaption(chbxPrintStyleWeeklyDontPrintWeekends, @sdxPrintStyleDontPrintWeekEnds); - LoadCaption(chbxPrintStyleWeeklyShowEventImages, @sdxPrintStyleShowEventImages); - LoadCaption(chbxPrintStyleWeeklyShowResourceImages, @sdxPrintStyleShowResourceImages); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsYearly; -begin - LoadCaption(lblPrintStyleYearlyLayout, @sdxPrintStyleLayout); - LoadCaption(lblPrintStyleYearlyMonthPerPage, @ sdxPrintStyleMonthPerPage); - LoadStringsCombo(cbxPrintStyleYearlyLayout, - [@sdxPrintStyleMonthlyLayout1PPM, @sdxPrintStyleMonthlyLayout2PPM]); - - LoadStringsCombo(cbxPrintStyleYearlyMonthPerPage, - [@sdxPrintStyleYearly1MPP, @sdxPrintStyleYearly2MPP, - @sdxPrintStyleYearly3MPP, @sdxPrintStyleYearly4MPP, - @sdxPrintStyleYearly6MPP, @sdxPrintStyleYearly12MPP]); - - LoadCaption(lblPrintStyleYearlyResourceCountPerPage, @sdxResourceCountPerPage); - - LoadCaption(lblPrintStyleYearlyInclude, @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleYearlyTaskPad, @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleYearlyNotesAreaBlank, @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleYearlyNotesAreaLined, @sdxPrintStyleIncludeNotesAreaLined); - LoadCaption(chbxPrimaryPageHeadersOnly, @sdxPrintStylePrimaryPageHeadersOnly); - LoadCaption(chbxPrintStyleYearlyShowEventImages, @sdxPrintStyleShowEventImages); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.PreviewDrawPageContent( - ACanvas: TCanvas; ABounds: TRect); -const - AMessageFlags = CXTO_CENTER_HORIZONTALLY or CXTO_CENTER_VERTICALLY or CXTO_WORDBREAK; -var - AMsg: PChar; - R, R1: TRect; - APrinter: TdxComponentPrinter; - ALink: TcxSchedulerReportLink; - ASource, ADest: TBitmap; -begin - if ReportLink.Component = nil then - begin - ACanvas.Brush.Color := clWindow; - ACanvas.FillRect(ABounds); - Exit; - end; - APrinter := TdxComponentPrinter.Create(nil); - try - ALink := TcxSchedulerReportLink.Create(APrinter); - ALink.LinkInPreviewMode := True; - try - ALink.Assign(ReportLink); - ALink.PrinterPage.RestoreDefaults; - ALink.Component := ReportLink.Component; - ALink.ComponentPrinter := APrinter; - AMsg := nil; - with ALink do - R1 := MakeBounds(0, 0, PageWidth, PageHeight); - ASource := cxCreateBitmap(cxSize(R1.Right, R1.Bottom)); - ASource.Canvas.Lock; - try - R := cxRectOffset(ABounds, -ABounds.Left, -ABounds.Top); - ALink.PrintStyles.ActiveStyle := ALink.PrintStyles[ - ReportLink.PrintStyles.IndexOf(ReportLink.PrintStyles.ActiveStyle)]; - ALink.RebuildReport; - FillRect(ASource.Canvas.Handle, R1, GetSysColorBrush(COLOR_WINDOW)); - if ALink.PageCount > 0 then - APrinter.PaintPage(ASource.Canvas, 0, R1, R1, ALink) - else - with ReportLink.PrintStyles do - begin - if (FActiveStyle = Memo) and Memo.SelectedEventsOnly then - AMsg := PChar(cxGetResourceString(@sdxCannotPrintNoSelectedItems)) - else - AMsg := PChar(cxGetResourceString(@sdxCannotPrintNoItemsAvailable)); - end; - ADest := cxCreateBitmap(cxSize(R.Right, R.Bottom)); - ADest.Canvas.Lock; - try - cxSmoothResizeBitmap(ASource, ADest); - if AMsg <> nil then - cxTextOut(ADest.Canvas.Handle, AMsg, R, AMessageFlags); - ACanvas.Draw(0, 0, ADest); - finally - ADest.Canvas.UnLock; - ADest.Free; - end; - finally - ASource.Canvas.Unlock; - ASource.Free; - end; - finally - ALink.Free; - end; - finally - APrinter.Free; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateControlsState; -begin - inherited UpdateControlsState; - - UpdateEnabledControls([lblPrintStyleDailyPrintFrom, tePrintStyleDailyPrintFrom, - lblPrintStyleDailyPrintTo, tePrintStyleDailyPrintTo], - ReportLink.PrintStyles.Daily.SupportTimeRange); - UpdateEnabledControls([lblPrintStyleWeeklyPrintFrom, tePrintStyleWeeklyPrintFrom, - lblPrintStyleWeeklyPrintTo, tePrintStyleWeeklyPrintTo], - ReportLink.PrintStyles.Weekly.SupportTimeRange); - - chbxPrintStyleWeeklyDontPrintWeekends.Enabled := - ReportLink.PrintStyles.Weekly.CanDontPrintWeekends; - - UpdateEnabled(lbxStyles, AreNativeStylesAvailable); - UpdateEnabled(btnStyleColor, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleFont, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleBackgroundBitmap, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleBackgroundBitmapClear, AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap); - UpdateEnabled(btnStyleRestoreDefaults, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStylesSaveAs, CanSaveStyles); - - UpdateEnabled(lblStyleSheets, AreNativeStylesAvailable); - UpdateEnabled(cbxStyleSheets, AreNativeStylesAvailable); - UpdateEnabled(btnStyleSheetNew, CanCreateStyleSheet); - UpdateEnabled(btnStyleSheetCopy, CanCopyStyleSheet); - UpdateEnabled(btnStyleSheetDelete, CanDeleteStyleSheet); - UpdateEnabled(btnStyleSheetRename, CanRenameStyleSheet); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateEnabled( - AControl: TControl; AEnabled: Boolean); -begin - TControlAccess(AControl).Enabled := AEnabled; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateEnabled( - AItem: TMenuItem; AEnabled: Boolean); -begin - AItem.Enabled := AEnabled; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateEnabledControls( - AControls: array of TControl; AEnabled: Boolean); -var - I: Integer; -begin - for I := 0 to High(AControls) do - UpdateEnabled(AControls[I], AEnabled); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdatePreview; -begin - if Visible then - begin - RefreshPrintStyles; - pbxPrintStylesPreview.Refresh; - pbPreview.Refresh; - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetDesignerTabIndex: Integer; -begin - Result := PageControl1.ActivePage.TabIndex; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetDesignerTabIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > PageControl1.PageCount - 1 then - Value := PageControl1.PageCount - 1; - PageControl1.ActivePage := PageControl1.Pages[Value]; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - inherited; - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - with cbxStyleSheets do - ItemIndex := Properties.Items.IndexOfObject(ActiveStyleSheet); - - if not LockControlsUpdate then - begin - Modified := True; - UpdatePreview; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin - inherited; - if not AnActive then lbxStyles.HideToolTips; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoRefreshStylesList; -var - Styles: TcxSchedulerReportLinkStyles; - List: TList; -begin - Styles := ReportLink.ActiveStyles; - with lbxStyles.Items do - begin - BeginUpdate; - try - List := TList.Create; - try - SaveSelectedStyles(List); - try - Clear; - AddObject(cxGetResourceString(@sdxSchedulerSchedulerHeader), Styles.SchedulerHeader); - AddObject(cxGetResourceString(@sdxSchedulerContent), Styles.Content); - AddObject(cxGetResourceString(@sdxSchedulerDateNavigatorContent), Styles.DateNavigatorContent); - AddObject(cxGetResourceString(@sdxSchedulerDateNavigatorHeader), Styles.DateNavigatorHeader); - AddObject(cxGetResourceString(@sdxSchedulerDayHeader), Styles.DayHeader); - AddObject(cxGetResourceString(@sdxSchedulerEvent), Styles.Event); - AddObject(cxGetResourceString(@sdxSchedulerResourceHeader), Styles.ResourceHeader); - AddObject(cxGetResourceString(@sdxSchedulerNotesAreaBlank), Styles.NotesAreaBlank); - AddObject(cxGetResourceString(@sdxSchedulerNotesAreaLined), Styles.NotesAreaLined); - AddObject(cxGetResourceString(@sdxSchedulerTaskPad), Styles.TaskPad); - AddObject(cxGetResourceString(@sdxSchedulerTimeRuler), Styles.TimeRuler); - finally - RestoreSelectedStyles(List); - end; - finally - List.Free; - end; - finally - EndUpdate; - end; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - inherited; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin - if ARecreate then - RecreateStylesListBox - else - lbxStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - with lbxStyles do - for I := 0 to Items.Count - 1 do - if Selected[I] then - AStrings.AddObject(Items[I], Items.Objects[I]); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := lbxStyles.Items; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := cbxStyleSheets.Properties.Items; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.ActivatePrintStyleTab; -begin - pcPrintStyleOptions.ActivePageIndex := FindTabIndexByPrintStyle(ActivePrintStyle); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignTabSheetObjects; -begin - with ReportLink.PrintStyles do - begin - tshDaily.Tag := MakeTTag(Daily); - tshWeekly.Tag := MakeTTag(Weekly); - tshMonthly.Tag := MakeTTag(Monthly); - tshTrifold.Tag := MakeTTag(Trifold); - tshDetails.Tag := MakeTTag(Details); - tshMemo.Tag := MakeTTag(Memo); - tshYearly.Tag := MakeTTag(Yearly); - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.FindTabIndexByPrintStyle(APrintStyle: TcxCustomSchedulerReportLinkPrintStyle): Integer; -begin - for Result := 0 to pcPrintStyleOptions.PageCount - 1 do - if pcPrintStyleOptions.Pages[Result].Tag = MakeTTag(APrintStyle) then Exit; - Result := -1; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.RefreshPrintStyles; -var - AItems: TcxImageComboBoxItems; - ActiveStyleIndex, I: Integer; - - procedure CheckAndAddPrintStyle(APrintStyle: TcxCustomSchedulerReportLinkPrintStyle); - begin - with TcxImageComboBoxItem(AItems.Add) do - begin - ImageIndex := APrintStyle.GlyphIndex; - Description := APrintStyle.Caption; - Value := Index; - Tag := Integer(APrintStyle); - end; - if (ActiveStyleIndex = -1) and (APrintStyle = ReportLink.PrintStyles.ActiveStyle) then - ActiveStyleIndex := AItems.Count - 1; - end; - -begin - ActiveStyleIndex := cbxPrintStyles.ItemIndex; - cbxPrintStyles.Properties.Images := StyleImages; - AItems := cbxPrintStyles.Properties.Items; - AItems.BeginUpdate; - try - AItems.Clear; - for I := 0 to ReportLink.PrintStyles.Count - 1 do - CheckAndAddPrintStyle(ReportLink.PrintStyles.Items[I]); - cbxPrintStyles.ItemIndex := ActiveStyleIndex; - finally - AItems.EndUpdate; - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetActivePrintStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - if cbxPrintStyles.ItemIndex <> -1 then - begin - with cbxPrintStyles.Properties.Items[cbxPrintStyles.ItemIndex] do - Result := TcxCustomSchedulerReportLinkPrintStyle(Tag) - end - else - Result := nil; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetActiveStyle: TcxStyle; -begin - with lbxStyles do - if ItemIndex <> -1 then - Result := TcxStyle(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetComponent: TcxScheduler; -begin - Result := inherited Component as TcxScheduler; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetHasSelectedStyles: Boolean; -begin - Result := lbxStyles.SelCount <> 0; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetHasSelectedStylesWithAssignedBitmap: Boolean; -var - Strings: TStrings; - I: Integer; - cxStyle: TcxStyle; -begin - Result := True; - Strings := TStringList.Create; - try - GetSelectedStyleNames(Strings); - for I := 0 to Strings.Count - 1 do - begin - cxStyle := TcxStyle(Strings.Objects[I]); - if (cxStyle <> nil) and (cxStyle.Bitmap <> nil) and not cxStyle.Bitmap.Empty then - Exit; - end; - finally - Strings.Free; - end; - Result := False; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; -end; - -function TcxfmSchedulerReportLinkDesignWindow.CanSelectAllStyles: Boolean; -var - I: Integer; -begin - Result := AreNativeStylesAvailable; - if Result then - begin - for I := 0 to lbxStyles.Items.Count - 1 do - if not lbxStyles.Selected[I] then Exit; - Result := False; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.CreateControls; - - procedure CreateStylesListBox; - begin - lbxStyles := TdxStylesListBox.Create(Self); - lbxStyles.Parent := tshStyles; - lbxStyles.BoundsRect := bvlStylesHost.BoundsRect; - lbxStyles.PopupMenu := pmStyles; - lbxStyles.TabOrder := chbxUseNativeStyles.TabOrder + 1; - lbxStyles.OnClick := lbxStylesClick; - bvlStylesHost.Visible := False; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(lbxStyles); - end; - -begin - CreateStylesListBox; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.RecreateStylesListBox; -var - List: TList; -begin - List := TList.Create; - try - SaveSelectedStyles(List); - dxPSUtl.dxRecreateWnd(lbxStyles); - RestoreSelectedStyles(List); - finally - List.Free; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.RestoreSelectedStyles(AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - lbxStyles.Selected[Integer(AList[I])] := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SaveSelectedStyles(AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to lbxStyles.Items.Count - 1 do - if lbxStyles.Selected[I] then AList.Add(TObject(I)); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetActivePage; -begin - PageControl1.ActivePage := PageControl1.Pages[DesignerTabIndex]; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetOptionsFormattingByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsFormatting do - case AnIndex of - 0: - begin - UseNativeStyles := AValue; - RecreateStylesListBox; - end; - 1: SuppressBackgroundBitmaps := AValue; - 2: SuppressContentColoration := AValue; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetPrintStyleOptionsViewByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if not LockControlsUpdate then - begin - case AnIndex of - 0: - ActivePrintStyle.ShowTaskPad := AValue; - 1: - ActivePrintStyle.ShowNotesAreaBlank := AValue; - 2: - ActivePrintStyle.ShowNotesAreaLined := AValue; - end; - Modified := True; - UpdatePreview; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetPrintStyleRangeByIndex(AnIndex: Integer; - const ATime: TDateTime); -begin - if not LockControlsUpdate then - begin - case AnIndex of - 0: - ActivePrintStyle.TimePrintFrom := ATime; - 1: - ActivePrintStyle.TimePrintTo := ATime; - end; - Modified := True; - UpdatePreview; - UpdateControlsState; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetPrintStyleResourceCountPerPageByIndex(AnIndex: Integer; - AValue: TcxEditValue); -begin - if LockControlsUpdate then Exit; - with ReportLink.PrintStyles do - case AnIndex of - 0: - Daily.ResourceCountPerPage := AValue; - 1: - Weekly.ResourceCountPerPage := AValue; - 2: - Monthly.ResourceCountPerPage := AValue; - 3: - Yearly.ResourceCountPerPage := AValue; - end; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetShowImagesCheckBoxes( - AEventImages, AResourceImages: TcxCheckBox; - APrintStyle: TcxCustomSchedulerReportLinkPrintStyle); -begin - if AEventImages <> nil then - begin - AEventImages.Enabled := ReportLink.HasEventImages; - AEventImages.Checked := AEventImages.Enabled and APrintStyle.ShowEventImages; - end; - if AResourceImages <> nil then - begin - AResourceImages.Enabled := ReportLink.HasResourceImages; - AResourceImages.Checked := AResourceImages.Enabled and APrintStyle.ShowResourceImages; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.FormCloseQuery(Sender: TObject; - var CanClose: Boolean); - - procedure ValidateEditors; - begin - FIsFormClosing := True; - try - dePrintRangeStart.ValidateEdit(False); - dePrintRangeEnd.ValidateEdit(False); - - tePrintStyleDailyPrintFrom.ValidateEdit(False); - tePrintStyleDailyPrintTo.ValidateEdit(False); - tePrintStyleWeeklyPrintFrom.ValidateEdit(False); - tePrintStyleWeeklyPrintTo.ValidateEdit(False); - finally - FisFormClosing := False; - end; - end; - -begin - if ModalResult = mrOK then - begin - ValidateEditors; - CanClose := IsValidConditions; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - pnlPrintStylesPreview.Visible := PageControl1.ActivePage = tshPrintStyles; - pnlPreview.Visible := PageControl1.ActivePage <> tshPrintStyles; - lblPreviewWindow.Parent := PageControl1.ActivePage; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.lbxStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleFontClick(Sender: TObject); -begin - PerformStylesChangeFont; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleColorClick(Sender: TObject); -begin - PerformStylesChangeColor; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleBackgroundBitmapClick(Sender: TObject); -begin - PerformStylesChangeBitmap; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleBackgroundBitmapClearClick(Sender: TObject); -begin - PerformStylesClearBitmap; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.miStylesSelectAllClick(Sender: TObject); -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - with lbxStyles do - begin - {$IFDEF DELPHI6} - SelectAll; - {$ELSE} - Items.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - Selected[I] := True; - finally - Items.EndUpdate; - end; - {$ENDIF} - end; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleRestoreDefaultsClick(Sender: TObject); -begin - PerformStylesRestoreDefaults; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStylesSaveAsClick(Sender: TObject); -begin - PerformStylesSaveAsStyleSheet; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxStyleSheetsClick(Sender: TObject); -begin - with TcxComboBox(Sender) do - ActiveStyleSheet := TcxCustomStyleSheet(Properties.Items.Objects[ItemIndex]); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxStyleSheetsPropertiesDrawItem( - AControl: TcxCustomComboBox; ACanvas: TcxCanvas; AIndex: Integer; - const ARect: TRect; AState: TOwnerDrawState); -begin - PerformStyleSheetDrawItem(ACanvas.Canvas, AIndex, ARect, AState, AControl.Enabled); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxStyleSheetsKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - PerformStyleSheetKeyDown(Sender, Key, Shift); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetNewClick(Sender: TObject); -begin - PerformStyleSheetNew; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetCopyClick(Sender: TObject); -begin - PerformStyleSheetCopy; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetDeleteClick(Sender: TObject); -begin - PerformStyleSheetDelete; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetRenameClick(Sender: TObject); -begin - PerformStyleSheetRename; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.lblUseNativeStylesClick(Sender: TObject); -begin - if chbxUseNativeStyles.CanFocus then ActiveControl := chbxUseNativeStyles; - chbxUseNativeStyles.Checked := not chbxUseNativeStyles.Checked; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.OptionsFormattingClick(Sender: TObject); -begin - with TcxCheckBox(Sender) do - SetOptionsFormattingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LookAndFeelChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TcxComboBox(Sender) do - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(Properties.Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.pmStylesPopup(Sender: TObject); -begin - lbxStyles.HideToolTips; - UpdateEnabled(miStyleColor, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleFont, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleBackgroundBitmap, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleBackgroundBitmapClear, AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap); - UpdateEnabled(miStyleRestoreDefaults, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStylesSelectAll, CanSelectAllStyles); - UpdateEnabled(miStylesSaveAs, CanSaveStyles); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleYearlyLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Yearly.Layout := - TcxSchedulerReportLinkPeriodicPrintStyleLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleYearlyMonthPagesPerYearClick( - Sender: TObject); -const - MonthsPerPage: array[0..5] of Integer = (1, 2, 3, 4, 6, 12); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Yearly.MonthCountPerPage := - MonthsPerPage[TcxComboBox(Sender).ItemIndex]; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.dePrintRangeStartEditValueChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintRange.PrintFrom := TcxDateEdit(Sender).Date; - Modified := True; - UpdatePreview; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.dePrintRangeEndEditValueChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintRange.PrintTo := TcxDateEdit(Sender).Date; - Modified := True; - UpdatePreview; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with ReportLink.PrintStyles do - FActiveStyle := Items[TcxComboBox(Sender).ItemIndex]; - ActivatePrintStyleTab; - Modified := True; - UpdatePreview; - UpdateControlsState; -end; - -// Daily -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleDailyLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Daily.Layout := - TcxSchedulerReportLinkPeriodicPrintStyleLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.sePrintStyleResourceCountPerPagePropertiesChanged( - Sender: TObject); -begin - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.sePrintStyleResourceCountPerPagePropertiesEditValueChanged( - Sender: TObject); -begin - with TcxSpinEdit(Sender) do - SetPrintStyleResourceCountPerPageByIndex(TTagToInt(Tag), Value); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleOptionsViewClick( - Sender: TObject); -begin - with TcxCheckBox(Sender) do - SetPrintStyleOptionsViewByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.tePrintStylePrintRangePropertiesEditValueChanged( - Sender: TObject); -begin - with TcxTimeEdit(Sender) do - SetPrintStyleRangeByIndex(TTagToInt(Tag), Time); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.tePrintStylePrintRangePropertiesChange( - Sender: TObject); -begin - Modified := True; -end; - -// Weekly -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleWeeklyArrangeClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Weekly.Arrange := - TcxSchedulerReportLinkWeeklyPrintStyleArrange(TcxComboBox(Sender).ItemIndex); - cbxPrintStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleWeeklyLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Weekly.Layout := - TcxSchedulerReportLinkPeriodicPrintStyleLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleWeeklyDaysLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Weekly.DaysLayout := - TcxSchedulerWeekViewDaysLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleWeeklyDontPrintWeekendsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Weekly.DontPrintWeekends := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -// Monthly -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleMonthlyLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Monthly.Layout := - TcxSchedulerReportLinkPeriodicPrintStyleLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleMonthlyDontPrintWeekendsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Monthly.DontPrintWeekends := - TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Monthly.PrintExactlyOneMonthPerPage := - TcxCheckBox(Sender).Checked; - Modified := True; -end; - -// Tri-fold -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleTrifoldSectionModeClick( - Sender: TObject); -begin - if LockControlsUpdate or not (ActivePrintStyle is TcxSchedulerReportLinkTrifoldPrintStyle) then Exit; - with TcxSchedulerReportLinkTrifoldPrintStyle(ActivePrintStyle) do - FSections[TTagToInt(TcxComboBox(Sender).Tag)] := TcxSchedulerReportLinkTrifoldPrintStyleSectionMode(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdateControlsState; -end; - -// Details -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleDetailsUsePaginationClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Details.UsePagination := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleDetailsPaginationClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Details.PaginationMode := - TcxSchedulerReportLinkDetailsPrintStylePaginationMode(TcxComboBox(Sender).ItemIndex); - Modified := True; -end; - -// Memo -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleMemoStartEachItemOnNewPageClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Memo.StartEachItemOnNewPage := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleMemoPrintOnlySelectedEventsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Memo.SelectedEventsOnly := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.pbxPrintStylesPreviewPaint(Sender: TObject); -begin - with TPaintBox(Sender) do - if ActivePrintStyle <> nil then - ActivePrintStyle.DrawDesignWindowPreview(Canvas, ClientRect); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.StyleController1StyleChanged( - Sender: TObject); -begin -// -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.pbPreviewPaint( - Sender: TObject); -begin - PreviewDrawPageContent(pbPreview.Canvas, pbPreview.ClientRect); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxLookAndFeelPropertiesChange( - Sender: TObject); -begin - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(cbxLookAndFeel.ItemIndex); -end; - -{ TcxSchedulerReportPageSite } - -procedure TcxSchedulerReportPageSite.ReadProperties(AReader: TdxPSDataReader); -begin - inherited ReadProperties(AReader); - FPageIndex := AReader.ReadInteger; - FPrimaryPage := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportPageSite.WriteProperties(AWriter: TdxPSDataWriter); -begin - inherited WriteProperties(AWriter); - AWriter.WriteInteger(FPageIndex); - AWriter.WriteBoolean(FPrimaryPage); -end; - -{ TcxSchedulerReportPageItemCell } - -constructor TcxSchedulerReportPageItemCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - BorderClass := TdxPSCellUltraFlatBorder; - ClipChildren := True; -end; - -function TcxSchedulerReportPageItemCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srUnknownItem; -end; - -procedure TcxSchedulerReportPageItemCell.SetCellViewParams( - AItem: TdxReportVisualItem; const AParams: TcxViewParams); -begin - ReportLink.SetCellViewParams(AItem, AParams); -end; - -procedure TcxSchedulerReportPageItemCell.SetCellViewParams( - AItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); -begin - ReportLink.SetCellViewParams(AItem, AParams); -end; - -function TcxSchedulerReportPageItemCell.GetPageIndex: Integer; -begin - Result := PageSite.PageIndex; -end; - -function TcxSchedulerReportPageItemCell.GetPageSite: TcxSchedulerReportPageSite; -var - AParent: TdxReportCell; -begin - AParent := inherited Parent; - while (AParent <> nil) and not (AParent is TcxSchedulerReportPageSite) do - AParent := AParent.Parent; - Result := AParent as TcxSchedulerReportPageSite; -end; - -function TcxSchedulerReportPageItemCell.GetPrimaryPage: Boolean; -begin - Result := PageSite.PrimaryPage; -end; - -function TcxSchedulerReportPageItemCell.GetReportLink: TcxSchedulerReportLink; -begin - Result := TcxSchedulerReportLink(Renderer.ReportLink); -end; - -{ TcxSchedulerReportNotesDataCell } - -constructor TcxSchedulerReportNotesDataCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - TextAlignX := taCenterX; - TextAlignY := taCenterY; - CaptionHeight := 16; - Data := cdidSchedulerNotesArea; -end; - -procedure TcxSchedulerReportNotesDataCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - R: TRect; - C, I: Integer; -begin - inherited DrawContent(DC, AStage); - if CaptionHeight <= 0 then Exit; - R := GetInnerBounds(DC); - FixupRect(DC, R); - C := R.Bottom - R. Top; - R.Bottom := R.Top + CaptionHeight; - // - if Caption <> '' then - begin - Renderer.DrawText(DC, R, -1, cxTextOffset, cxTextOffset, Caption, Font, - Color, TextAlignX, TextAlignY, False, MultiLine, False); - end; - // - Inc(R.Bottom, Max(1, Renderer.LineThickness div 2)); - if Lined then - C := (C - Renderer.LineThickness) div CaptionHeight - else - C := 1; - R.Top := R.Bottom - Renderer.LineThickness; - for I := 0 to C - 1 do - begin - FixupRect(DC, R); - Renderer.FillRect(DC, R, clBlack); - OffsetRect(R, 0, CaptionHeight); - end; -end; - -procedure TcxSchedulerReportNotesDataCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FCaption := AReader.ReadString; - FCaptionHeight := AReader.ReadInteger; - FLined := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportNotesDataCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FCaption); - AWriter.WriteInteger(FCaptionHeight); - AWriter.WriteBoolean(FLined); -end; - -function TcxSchedulerReportNotesDataCell.GetMultiLine: Boolean; -begin - Result := inherited MultiLine; -end; - -function TcxSchedulerReportNotesDataCell.GetTextAlignX: TcxTextAlignX; -begin - Result := inherited TextAlignX; -end; - -function TcxSchedulerReportNotesDataCell.GetTextAlignY: TcxTextAlignY; -begin - Result := inherited TextAlignY; -end; - -procedure TcxSchedulerReportNotesDataCell.SetMultiLine(Value: Boolean); -begin - inherited MultiLine := Value; -end; - -procedure TcxSchedulerReportNotesDataCell.SetTextAlignX( - Value: TcxTextAlignX); -begin - inherited TextAlignX := Value; -end; - -procedure TcxSchedulerReportNotesDataCell.SetTextAlignY( - Value: TcxTextAlignY); -begin - inherited TextAlignY := Value; -end; - -{ TcxSchedulerReportNotesAreaCell } - -constructor TcxSchedulerReportNotesAreaCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - AddDataItem(GetDataCellClass) -end; - -constructor TcxSchedulerReportNotesAreaCell.CreateEx(AParent: TdxReportCell; ALined: Boolean); -begin - Create(AParent); - FLined := ALined; - DataCell.CellSides := []; - DataCell.Caption := cxGetResourceString(@sdxNotes); - DataCell.Lined := ALined; - ClipChildren := True; -end; - -procedure TcxSchedulerReportNotesAreaCell.BoundsChanged; -begin - inherited BoundsChanged; - DataCell.BoundsRect := GetInnerBounds(0); -end; - -procedure TcxSchedulerReportNotesAreaCell.ConvertCoords( - APixelsNumerator, APixelsDenominator: Integer); -begin - inherited ConvertCoords(APixelsNumerator, APixelsDenominator); - DataCell.CaptionHeight := MulDiv(DataCell.CaptionHeight, APixelsNumerator, APixelsDenominator); -end; - -function TcxSchedulerReportNotesAreaCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srNotesBlank; - if DataCell.Lined then - Result := srNotesLined; -end; - -function TcxSchedulerReportNotesAreaCell.GetDataCellClass: TcxSchedulerReportNotesDataCellClass; -begin - Result := TcxSchedulerReportNotesDataCell; -end; - -procedure TcxSchedulerReportNotesAreaCell.SetFontIndex(Value: Integer); -begin - inherited SetFontIndex(Value); - if Font <> nil then - DataCell.CaptionHeight := cxTextHeight(Font) + cxTextOffset * 2; -end; - -function TcxSchedulerReportNotesAreaCell.GetDataCell: TcxSchedulerReportNotesDataCell; -begin - if (DataItemCount > 0) and (DataItems[0] is TcxSchedulerReportNotesDataCell) then - Result := TcxSchedulerReportNotesDataCell(DataItems[0]) - else - Result := nil; -end; - -{ TcxSchedulerReportTaskPadCell } - -constructor TcxSchedulerReportTaskPadCell.CreateEx( - AParent: TdxReportCell; ALined: Boolean); -begin - inherited CreateEx(AParent, ALined); - DataCell.Caption := cxGetResourceString(@sdxTaskPad); - DataCell.Data := cdidSchedulerTaskPad; -end; - -procedure TcxSchedulerReportTaskPadCell.BoundsChanged; -begin - inherited; - TaskPadDataSite.BoundsRect := CalculateTaskPadDataSiteBounds; -end; - -function TcxSchedulerReportTaskPadCell.CalculateTaskPadDataSiteBounds: TRect; -begin - Result := GetInnerBounds(NullDC); - Inc(Result.Top, DataCell.CaptionHeight); -end; - -function TcxSchedulerReportTaskPadCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srTaskPad; -end; - -function TcxSchedulerReportTaskPadCell.GetTaskPadDataSite: TdxReportCell; -begin - if CellCount = 0 then AddCell; - Result := Cells[0]; - Result.CellSides := []; - Result.BoundsRect := CalculateTaskPadDataSiteBounds; -end; - -{ TcxSchedulerReportSchedulerHeaderDataCell } - -constructor TcxSchedulerReportSchedulerHeaderDataCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - CellSides := []; - Transparent := True; - Data := cdidSchedulerSchedulerHeader; -end; - -{ TcxSchedulerReportSchedulerHeaderCell } - -constructor TcxSchedulerReportSchedulerHeaderCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - FContent := AddContentCell; -end; - -procedure TcxSchedulerReportSchedulerHeaderCell.AdjustTextSize; -var - R1, R2: TRect; -begin - R1 := Content.BoundsRect; - R2 := R1; - if (SecondaryText <> '') and (PrimaryText <> '') then - begin - with R1 do - Bottom := Bottom - (Bottom - Top) div 4; - R2.Top := R1.Bottom; - end; - FPrimaryTextCell := AddTextCell(PrimaryText, R1, True); - FSecondaryTextCell := AddTextCell(SecondaryText, R2, False); - FContent.Index := MaxInt; //send to back -end; - -function TcxSchedulerReportSchedulerHeaderCell.AddContentCell: TcxSchedulerReportSchedulerHeaderDataCell; -begin - Result := TcxSchedulerReportSchedulerHeaderDataCell(AddDataItem(TcxSchedulerReportSchedulerHeaderDataCell)); -end; - -function TcxSchedulerReportSchedulerHeaderCell.AddTextCell(AText: string; - const ABounds: TRect; AMultiLine: Boolean): TdxReportCellString; -var - AFontH, ABoundsH: Integer; - AParams: TdxReportItemViewParams; -begin - if PrimaryText = '' then - begin - Result := nil; - Exit; - end; - Result := AddDataItem(TdxReportCellString) as TdxReportCellString; - Result.BoundsRect := ABounds; - Result.Text := AText; - Result.CellSides := []; - Result.Transparent := True; - Result.TextAlignY := taTop; - Result.TextAlignX := taLeft; - Result.Multiline := AMultiLine; - if AMultiLine and (Pos('#13', AText) <> 0) then - AText := Copy(AText, 1, Pos('#13', AText)); - AFontH := cxTextHeight(Font); - ABoundsH := (ABounds.Bottom - ABounds.Top) - cxTextOffset * 2; - if AMultiLine then - ABoundsH := ABoundsH div 2; - FillChar(AParams, SizeOf(AParams), 0); - AParams.FontStyle := []; - AParams.FontSize := MulDiv(Font.Size, ABoundsH, AFontH); - while (AParams.FontSize > 3) and (cxTextWidth(Font, AText, AParams.FontSize) > - ((ABounds.Right - ABounds.Left) - cxTextOffset * 2)) do Dec(AParams.FontSize, 2); - AParams.Transparent := True; - AParams.NativeParams.Font := Font; - AParams.NativeParams.TextColor := Font.Color; - ReportLink.SetCellViewParams(Result, AParams); -end; - -function TcxSchedulerReportSchedulerHeaderCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srHeader; -end; - -{ TcxSchedulerReportDateNavigatorItem } - -constructor TcxSchedulerReportDateNavigatorItem.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - CellSides := []; -end; - -function TcxSchedulerReportDateNavigatorItem.GetDefaultDTFormat: DWORD; -begin - Result := CXTO_PATTERNEDTEXT or CXTO_SINGLELINE; -end; - -procedure TcxSchedulerReportDateNavigatorItem.SetText(const Value: string); -begin -end; - -function TcxSchedulerReportDateNavigatorItem.GetDateNavigator: TcxSchedulerReportDateNavigatorCell; -begin - Result := Parent as TcxSchedulerReportDateNavigatorCell; -end; - -{ TcxSchedulerReportDateNavigatorHeader } - -constructor TcxSchedulerReportDateNavigatorHeader.CreateEx(AParent: TdxReportCell; AYear, AMonth: Word); -begin - Create(AParent); - Transparent := False; - TextAlignX := taCenterX; - Data := cdidSchedulerDateNavigatorHeader; - FMonth := AMonth; - FYear := AYear; -end; - -procedure TcxSchedulerReportDateNavigatorHeader.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportDateNavigatorHeader then - with TcxSchedulerReportDateNavigatorHeader(Source) do - begin - Self.FMonth := Month; - Self.FYear := Year; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportDateNavigatorHeader.GetText: string; -begin - Result := LongMonthNames[Month] + ' ' + IntToStr(Year); -end; - -procedure TcxSchedulerReportDateNavigatorHeader.ReadData( - AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FMonth := AReader.ReadInteger; - FYear := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportDateNavigatorHeader.WriteData( - AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteInteger(FMonth); - AWriter.WriteInteger(FYear); -end; - -{ TcxSchedulerReportDateNavigatorDay } - -constructor TcxSchedulerReportDateNavigatorDay.CreateEx(AParent: TdxReportCell; - ADay, ACol, ARow: Integer; ABold: Boolean); -begin - Create(AParent); - RightIndent := 2; - TextAlignX := taRight; - TextAlignY := taCenterY; - Data := cdidSchedulerDateNavigatorDay; - FDay := ADay; - FCol := ACol; - FRow := ARow; - Bold := ABold; -end; - -procedure TcxSchedulerReportDateNavigatorDay.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportDateNavigatorDay then - with TcxSchedulerReportDateNavigatorDay(Source) do - begin - Self.FDay := Day; - Self.FCol := Col; - Self.FRow := Row; - end; -end; - -function TcxSchedulerReportDateNavigatorDay.GetText: string; -begin - Result := IntToStr(Day); -end; - -procedure TcxSchedulerReportDateNavigatorDay.ReadData(AReader: TdxPSDataReader); -var - Value: Integer; -begin - inherited ReadData(AReader); - Value := AReader.ReadInteger; - FDay := TLongRec(Value).Bytes[0]; - FCol := TLongRec(Value).Bytes[1]; - FRow := TLongRec(Value).Bytes[2]; -end; - -procedure TcxSchedulerReportDateNavigatorDay.WriteData(AWriter: TdxPSDataWriter); -var - Value: Integer; -begin - inherited WriteData(AWriter); - TLongRec(Value).Bytes[0] := Day; - TLongRec(Value).Bytes[1] := Col; - TLongRec(Value).Bytes[2] := Row; - AWriter.WriteInteger(Value); -end; - -function TcxSchedulerReportDateNavigatorDay.GetDate: TDate; -begin - Result := EncodeDate(Year, Month, Day); -end; - -function TcxSchedulerReportDateNavigatorDay.GetBold: Boolean; -begin - Result := GetFormatBit(dxFormatDayIsBold); -end; - -function TcxSchedulerReportDateNavigatorDay.GetMonth: Word; -begin - if DateNavigator <> nil then - Result := DateNavigator.Month - else - Result := 1; -end; - -function TcxSchedulerReportDateNavigatorDay.GetYear: Word; -begin - if DateNavigator <> nil then - Result := DateNavigator.Year - else - Result := 1; -end; - -procedure TcxSchedulerReportDateNavigatorDay.SetBold(Value: Boolean); -begin - SetFormatBit(dxFormatDayIsBold, Value); -end; - -{ TcxSchedulerReportDateNavigatorDayCaption } - -constructor TcxSchedulerReportDateNavigatorDayCaption.CreateEx(AParent: TdxReportCell; - ADayOfWeek: TDay; ACol: Integer); -begin - inherited Create(AParent); - RightIndent := 2; - TextAlignX := taRight; - TextAlignY := taCenterY; - Data := cdidSchedulerDateNavigatorDayCaption; - FCol := ACol; - FDayOfWeek := ADayOfWeek; - FDayText := GetDayText; -end; - -procedure TcxSchedulerReportDateNavigatorDayCaption.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportDateNavigatorDayCaption then - with TcxSchedulerReportDateNavigatorDayCaption(Source) do - begin - Self.FDayOfWeek := DayOfWeek; - Self.FCol := Col; - Self.FDayText := FDayText; - end; -end; - -function TcxSchedulerReportDateNavigatorDayCaption.GetText: string; -begin - Result := FDayText; -end; - -function TcxSchedulerReportDateNavigatorDayCaption.GetDayText: string; -var - FDayIndex: Integer; -begin - FDayIndex := Byte(DateNavigator.StartOfWeek) + 1 + Col; - if FDayIndex > 7 then Dec(FDayIndex, 7); - - if Font.Charset in [ARABIC_CHARSET, CHINESEBIG5_CHARSET, GB2312_CHARSET] then - Result := AnsiLastChar(ShortDayNames[FDayIndex]) - else - Result := WideString(ShortDayNames[FDayIndex])[1]; -end; - -procedure TcxSchedulerReportDateNavigatorDayCaption.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FDayText := AReader.ReadString; -end; - -procedure TcxSchedulerReportDateNavigatorDayCaption.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FDayText); -end; - -{ TcxSchedulerReportDateNavigatorWeekNumber } - -constructor TcxSchedulerReportDateNavigatorWeekNumber.CreateEx(AParent: TdxReportCell; - AWeekNumber, ARow: Integer); -begin - Create(AParent); - RightIndent := 4; - TextAlignX := taRight; - TextAlignY := taCenterY; - Data := cdidSchedulerDateNavigatorWeekNumber; - FRow := ARow; - FWeekNumber := AWeekNumber; -end; - -procedure TcxSchedulerReportDateNavigatorWeekNumber.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxSchedulerReportDateNavigatorWeekNumber then - with TcxSchedulerReportDateNavigatorWeekNumber(Source) do - begin - Self.FWeekNumber := WeekNumber; - Self.FRow := Row; - end; -end; - -function TcxSchedulerReportDateNavigatorWeekNumber.GetText: string; -begin - Result := IntToStr(WeekNumber); -end; - -procedure TcxSchedulerReportDateNavigatorWeekNumber.ReadData(AReader: TdxPSDataReader); -var - Value: Integer; -begin - inherited ReadData(AReader); - Value := AReader.ReadInteger; - FWeekNumber := TLongRec(Value).Bytes[0]; - FRow := TLongRec(Value).Bytes[1]; -end; - -procedure TcxSchedulerReportDateNavigatorWeekNumber.WriteData(AWriter: TdxPSDataWriter); -var - Value: Integer; -begin - inherited WriteData(AWriter); - TLongRec(Value).Bytes[0] := WeekNumber; - TLongRec(Value).Bytes[1] := Row; - AWriter.WriteInteger(Value); -end; - -{ TcxSchedulerReportDateNavigatorCell } - -constructor TcxSchedulerReportDateNavigatorCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - CellSides := []; - Transparent := False; - FStartOfWeek := TDay(DateTimeHelper.StartOfWeek); -end; - -constructor TcxSchedulerReportDateNavigatorCell.CreateEx(AParent: TdxReportCell; - AFirstWeekOfYear: TcxFirstWeekOfYear; AYear, AMonth: Word; - AShowDatesContainingEventsInBold, AShowWeekNumbers: Boolean); -begin - Create(AParent); - FYear := AYear; - FMonth := AMonth; - FVertOffset := -1; - FFirstWeekOfYear := AFirstWeekOfYear; - FShowWeekNumbers := AShowWeekNumbers; - FShowDatesContainingEventsInBold := AShowDatesContainingEventsInBold; -end; - -procedure TcxSchedulerReportDateNavigatorCell.AdjustSize(var AContentParams, - AHeaderParams: TdxReportItemViewParams; AHeight, AMaxHeight: Integer); - - function TestSize: Boolean; - var - ATestHeight: Integer; - begin - ATestHeight := GetMonthSize(AContentParams, AHeaderParams).cy; - if AMaxHeight > (ATestHeight + RowHeight) then - begin - FVertOffset := (AMaxHeight - ATestHeight) div 2; - Result := True; - end - else - Result := False; - end; - -begin - if TestSize then Exit; - AContentParams.FontSize := Abs(AContentParams.NativeParams.Font.Size); - AHeaderParams.FontSize := Abs(AHeaderParams.NativeParams.Font.Size); - repeat - if AContentParams.FontSize > AHeaderParams.FontSize then - Dec(AContentParams.FontSize) - else - if AContentParams.FontSize < AHeaderParams.FontSize then - Dec(AHeaderParams.FontSize) - else - begin - Dec(AContentParams.FontSize); - Dec(AHeaderParams.FontSize); - end; - until TestSize; -end; - -function TcxSchedulerReportDateNavigatorCell.CalculateSize( - const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; -begin - FMonthSize := GetMonthSize(AContentParams, AHeaderParams); - Result := FMonthSize; - Inc(Result.cy, 2 * RowHeight); - CreateItems; - AdjustItemsVertical; - SetViewParams(AContentParams, AHeaderParams); -end; - -class function TcxSchedulerReportDateNavigatorCell.MeasureDateNavigatorHeight( - const AContentParams, AHeaderParams: TcxViewParams): Integer; -var - AColWidth, ARowHeight, ADayCaptionsHeight, AHeaderHeight: Integer; -begin - GetContentPartSizes(AContentParams.Font, AColWidth, ARowHeight, ADayCaptionsHeight); - GetHeaderPartSizes(AHeaderParams.Font, AHeaderHeight); - Result := GetMonthHeight(AHeaderHeight, ADayCaptionsHeight, ARowHeight) + 2 * ARowHeight; -end; - -procedure TcxSchedulerReportDateNavigatorCell.AdjustItemsVertical; -var - I: Integer; -begin - if FVertOffset < 0 then FVertOffset := RowHeight; - for I := 0 to DataItemCount - 1 do - with DataItems[I] do Top := Top + FVertOffset; -end; - -function TcxSchedulerReportDateNavigatorCell.ColOfDate(ADate: TDateTime): Integer; -begin - Result := DayOfWeek(ADate) - Byte(StartOfWeek) - 1; - if Result < 0 then Inc(Result, 7); -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateDayCaptions; -var - R: TRect; - I, ADayOfWeek: Integer; - ACaption: TcxSchedulerReportDateNavigatorDayCaption; -begin - R.Top := HeaderHeight; - R.Bottom := R.Top + DayCaptionsHeight - 2; - R.Right := ColWidth; - FDayCaptionCount := 7; - for I := 0 to FDayCaptionCount - 1 do - begin - ADayOfWeek := I + Byte(StartOfWeek); - if ADayOfWeek > 6 then Dec(ADayOfWeek, 7); - ACaption := TcxSchedulerReportDateNavigatorDayCaption.CreateEx(Self, TDay(ADayOfWeek), I); - with ACaption do - begin - R.Left := R.Right; - R.Right := R.Left + ColWidth; - BoundsRect := R; - end; - end; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateDay(const ABounds: TRect; - ADate: TDateTime; ACol, ARow: Integer); -var - ADay: TcxSchedulerReportDateNavigatorDay; -begin - ADay := TcxSchedulerReportDateNavigatorDay.CreateEx(Self, DayOf(ADate), - ACol, ARow, GetDayIsBold(ADate)); - ADay.BoundsRect := ABounds; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateItems; -begin - CreateMonthHeader; - CreateDayCaptions; - CreateMonth; - CreateLines; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateLines; -var - R: TRect; -begin - R := GetHeaderBounds; - R.Top := R.Bottom + DayCaptionsHeight; - R.Bottom := R.Top + WeekNumberCount * RowHeight; - with TdxReportCellBox.Create(Self) do - begin - if ShowWeekNumbers then CellSides := [csTop, csLeft] else CellSides := [csTop]; - BoundsRect := R; - end; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateMonth; -var - R: TRect; - I, J, ADayBase, ADaysPerMonth: Integer; - ADate, ADateBase: TDateTime; - AHasDate: Boolean; - - function GetDate(out ADate: TDateTime): Boolean; - begin - ADate := ADateBase + ADayBase + J * 7 + I; - Result := (ADate > ADateBase) and (ADate <= ADateBase + ADaysPerMonth); - end; - -begin - FDayCount := 0; - FWeekNumberCount := 0; - ADateBase := EncodeDate(FYear, FMonth, 1) - 1; - ADayBase := 1 - ColOfDate(ADateBase + 1); - ADaysPerMonth := DaysPerMonth(FYear, FMonth); - //loop has been split into two loops for the correct order of the DataItems - for I := 0 to 6 do - for J := 0 to 5 do - if GetDate(ADate) then - begin - CreateDay(GetDayBoundsFromColAndRow(I, J), ADate, I, J); - Inc(FDayCount); - end; - for I := 0 to 6 do - for J := 0 to 5 do - begin - AHasDate := GetDate(ADate); - if ShowWeekNumbers and (I = 0) and not ((J = 5) and not AHasDate) then - begin - R := cxRectOffset(GetDayBoundsFromColAndRow(I, J), -ColWidth, 0); - Dec(R.Right, ColWidth div 8); - CreateWeekNumber(R, ADate, J); - Inc(FWeekNumberCount); - end; - end; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateMonthHeader; -begin - TcxSchedulerReportDateNavigatorHeader.CreateEx(Self, Year, Month).BoundsRect := GetHeaderBounds; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateWeekNumber( - const ABounds: TRect; ADate: TDateTime; ARow: Integer); -var - AWeekNumber: TcxSchedulerReportDateNavigatorWeekNumber; -begin - AWeekNumber := TcxSchedulerReportDateNavigatorWeekNumber.CreateEx(Self, - cxDateUtils.GetWeekNumber(ADate, StartOfWeek, FirstWeekOfYear), ARow); - AWeekNumber.BoundsRect := ABounds; -end; - -class procedure TcxSchedulerReportDateNavigatorCell.GetContentPartSizes( - AFont: TFont; var AColWidth, ARowHeight, ADayCaptionsHeight: Integer; - AFontSize: Integer = 0); -var - ASymbolSize: TSize; -begin - ASymbolSize := cxTextExtent(AFont, '0', AFontSize); - AColWidth := 3 * ASymbolSize.cx; - ADayCaptionsHeight := ASymbolSize.cy + 1; - ARowHeight := ASymbolSize.cy; -end; - -function TcxSchedulerReportDateNavigatorCell.GetDayBoundsFromColAndRow( - ACol, ARow: Integer): TRect; -begin - with Result do - begin - Left := Succ(ACol) * ColWidth; - Top := HeaderHeight + DayCaptionsHeight + ARow * RowHeight; - Right := Left + ColWidth; - Bottom := Top + RowHeight; - end; -end; - -function TcxSchedulerReportDateNavigatorCell.GetDayIsBold( - ADate: TDateTime): Boolean; -begin - Result := FBoldedDays.IndexOf(ADate) <> -1; -end; - -function TcxSchedulerReportDateNavigatorCell.GetHeaderBounds: TRect; -begin - Result := cxRect(ColWidth, 0, MonthSize.cx - MulDiv(ColWidth, 2, 3), HeaderHeight); -end; - -class procedure TcxSchedulerReportDateNavigatorCell.GetHeaderPartSizes( - AFont: TFont; var AHeaderHeight: Integer; AFontSize: Integer = 0); -begin - AHeaderHeight := MulDiv(cxTextHeight(AFont, 'Wg', AFontSize), 3 , 2); -end; - -function TcxSchedulerReportDateNavigatorCell.GetMonthSize( - const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; -begin - GetContentPartSizes(AContentParams.NativeParams.Font, FColWidth, FRowHeight, - FDayCaptionsHeight, AContentParams.FontSize); - GetHeaderPartSizes(AHeaderParams.NativeParams.Font, FHeaderHeight, - AHeaderParams.FontSize); - Result.cx := 9 * FColWidth; - Result.cy := FHeaderHeight + FDayCaptionsHeight + 6 * FRowHeight + 1; -end; - -function TcxSchedulerReportDateNavigatorCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srDateNavigator; -end; - -procedure TcxSchedulerReportDateNavigatorCell.SetViewParams( - const AContentParams, AHeaderParams: TdxReportItemViewParams); -var - I: Integer; - AParams: TdxReportItemViewParams; -begin - FContentParams := AContentParams; - FHeaderParams := AHeaderParams; - SetCellViewParams(Self, AContentParams); - SetCellViewParams(Header, AHeaderParams); - for I := 0 to DayCount - 1 do - begin - AParams := AContentParams; - if Days[I].Bold then - Include(AParams.FontStyle, fsBold); - SetCellViewParams(Days[I], AParams); - end; - for I := 0 to DayCaptionCount - 1 do - SetCellViewParams(DayCaptions[I], AContentParams); - AParams := AContentParams; - if AParams.FontSize <> 0 then - AParams.FontSize := MulDiv(AParams.FontSize, 2, 3) - else - AParams.FontSize := MulDiv(AParams.NativeParams.Font.Size, 2, 3); - for I := 0 to WeekNumberCount - 1 do - SetCellViewParams(WeekNumbers[I], AParams); -end; - -procedure TcxSchedulerReportDateNavigatorCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - AReader.Read(FFirstWeekOfYear, SizeOf(FFirstWeekOfYear)); - FMonth := AReader.ReadInteger; - FYear := AReader.ReadInteger; - FShowDatesContainingEventsInBold := AReader.ReadBoolean; - FShowWeekNumbers := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportDateNavigatorCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.Write(FFirstWeekOfYear, SizeOf(FFirstWeekOfYear)); - AWriter.WriteInteger(FMonth); - AWriter.WriteInteger(FYear); - AWriter.WriteBoolean(FShowDatesContainingEventsInBold); - AWriter.WriteBoolean(FShowWeekNumbers); -end; - -class function TcxSchedulerReportDateNavigatorCell.GetMonthHeight( - AHeaderHeight, ADayCaptionsHeight, ARowHeight: Integer): Integer; -begin - Result := (AHeaderHeight + ADayCaptionsHeight + 6 * ARowHeight); -end; - -function TcxSchedulerReportDateNavigatorCell.GetDay( - Index: Integer): TcxSchedulerReportDateNavigatorDay; -begin - Result := DataItems[Index + 1 + 7] as TcxSchedulerReportDateNavigatorDay; -end; - -function TcxSchedulerReportDateNavigatorCell.GetDayCaption( - Index: Integer): TcxSchedulerReportDateNavigatorDayCaption; -begin - Result := DataItems[Index + 1] as TcxSchedulerReportDateNavigatorDayCaption; -end; - -function TcxSchedulerReportDateNavigatorCell.GetHeader: TcxSchedulerReportDateNavigatorHeader; -begin - Result := DataItems[0] as TcxSchedulerReportDateNavigatorHeader; -end; - -function TcxSchedulerReportDateNavigatorCell.GetWeekNumber( - Index: Integer): TcxSchedulerReportDateNavigatorWeekNumber; -begin - Result := DataItems[Index + 1 + 7 + FDayCount] as TcxSchedulerReportDateNavigatorWeekNumber; -end; - -{ TcxSchedulerReportSchedulingAreaCell } - -constructor TcxSchedulerReportSchedulingAreaCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - FVisibleDays := TcxSchedulerDateList.Create; - FDaysList := TStringList.Create; - CellSides := [csLeft, csTop]; -end; - -destructor TcxSchedulerReportSchedulingAreaCell.Destroy; -begin - FDaysList.Free; - FVisibleDays.Free; - inherited Destroy; -end; - -procedure TcxSchedulerReportSchedulingAreaCell.DrawContent( - DC: HDC; DrawRect: TRect; const OriginRect: TRect; AStage: TdxPSRenderStages); -begin - inherited DrawContent(DC, DrawRect, OriginRect, AStage); - if rsFirstPass in AStage then - DrawBorders(DC); -end; - -procedure TcxSchedulerReportSchedulingAreaCell.DrawItself( - DC: HDC; AStage: TdxPSRenderStages); -begin - if rsFirstPass in AStage then - begin - if IsBackgroundBitmapDrawn then - DrawBackgroundBitmap(DC) - else - if IsBackgroundDrawn then - DrawBackground(DC); - end; -end; - -function TcxSchedulerReportSchedulingAreaCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srSchedulingArea; -end; - -{ TcxSchedulerReportCustomCell } - -constructor TcxSchedulerReportCustomCell.CreateFrom(AParent: TdxReportCell; - AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited Create(AParent); - Transparent := False; - BoundsRect := AViewInfo.Bounds; - CellSides := TdxCellSides(AViewInfo.Borders); -end; - -procedure TcxSchedulerReportCustomCell.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - inherited; - //Renderer.ExcludeClipRect(GetFixupRect(DC, BoundsRect)); -end; - -class procedure TcxSchedulerReportCustomCell.RegisterMirrorClass; -begin - MirrorClasses.Add(Self); -end; - -class function TcxSchedulerReportCustomCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := nil; -end; - -procedure TcxSchedulerReportCustomCell.SuppressColoration; -begin - FDayBorderColor := clBlack; - Color := dxPSCore.dxDefaultContentColor; -end; - -procedure TcxSchedulerReportCustomCell.DrawCellFrame(DC: HDC; const ARect: TRect; - ABorders: TcxBorders = []; ABorderColor: TColor = clDefault; ALineWidth: Integer = 1); -begin - Renderer.FrameRect(DC, GetFixupRect(DC, ARect), - ABorderColor, TdxCellSides(ABorders), ALineWidth); -end; - -procedure TcxSchedulerReportCustomCell.DrawCellRect(DC: HDC; const ARect: TRect; - ABorders: TcxBorders = []; ABorderColor: TColor = clDefault; ALineWidth: Integer = 1; - AColor: TColor = clDefault); -var - R: TRect; -begin - if Transparent then - DrawCellFrame(DC, ARect, ABorders, ABorderColor, ALineWidth) - else - begin - R := GetFixupRect(DC, ARect); - if AColor = clDefault then - AColor := Color; - Renderer.FillRect(DC, R, AColor); - Renderer.FrameRect(DC, R, ABorderColor, TdxCellSides(ABorders), ALineWidth); - end; -end; - -procedure TcxSchedulerReportCustomCell.DrawCellText(DC: HDC; const ARect: TRect; - const AText: string; AlignHorz: TcxTextAlignX; AlignVert: TcxTextAlignY; - AFont: TFont = nil; AColor: TColor = clDefault; AMultiLine: Boolean = False); -const - Horz: array[TcxTextAlignX] of Integer = - (CXTO_LEFT, CXTO_CENTER_HORIZONTALLY, CXTO_RIGHT, CXTO_LEFT, CXTO_LEFT); - Vert: array[TcxTextAlignY] of Integer = - (CXTO_TOP, CXTO_CENTER_VERTICALLY, CXTO_BOTTOM, CXTO_TOP); -var - R: TRect; - AMode: Integer; - Flags: Integer; -begin - if Length(AText) = 0 then Exit; - R := GetFixupRect(DC, ARect); - Flags := Renderer.MakeTextFormat(AlignHorz, AlignVert, AMultiLine, False, True, True, False); - if FNoClip then - Flags := Flags or CXTO_NOCLIP; -{ Flags := CXTO_PREVENT_LEFT_EXCEED or CXTO_PREVENT_TOP_EXCEED or CXTO_NOCLIP or - Horz[AlignHorz] or Vert[AlignVert] or CXTO_SINGLELINE;} - if AFont = nil then - AFont := Font; - AMode := SetBkMode(DC, Windows.TRANSPARENT); - Renderer.DrawTextEx(DC, R, -1, cxTextOffset, - cxTextOffset, AText, AFont, Flags); - SetBkMode(DC, AMode); -end; - -procedure TcxSchedulerReportCustomCell.DrawCellTextVert(DC: HDC; const ARect: TRect; - const AText: string; AlignHorz: TcxTextAlignX; AlignVert: TcxTextAlignY; - AFont: TFont = nil; AMultiLine: Boolean = True); -begin - cxRotatedTextOut(DC, ARect, AText, AFont, AlignHorz, AlignVert, AMultiLine); -end; - -procedure TcxSchedulerReportCustomCell.DrawCellState(DC: HDC; R: TRect; - AState: Integer; ABorders: TcxBorders = []; ABorderColor: TColor = clBlack); -var - ABrushHandle: HBrush; - APenHandle: HPen; - Points: array[0..2] of TPoint; -begin - FixupRect(DC, R); - if R.Top = R.Bottom then - begin - R := ExcludeBorders(R, ABorders); - ABrushHandle := SelectObject(DC, StateBrushes[AState].Handle); - APenHandle := SelectObject(DC, GetStockObject(BLACK_PEN)); - Points[0] := Point(R.Left, R.Top); - Points[1] := Point(R.Right, R.Top); - Points[2] := Point(R.Right, R.Top + R.Right - R.Left); - Windows.Polygon(DC, Points, 3); - SelectObject(DC, APenHandle); - SelectObject(DC, ABrushHandle); - end - else - begin - DrawCellFrame(DC, R, ABorders, ABorderColor, 1); - FillRect(DC, ExcludeBorders(R, ABorders), StateBrushes[AState].Handle); - end; -end; - -function TcxSchedulerReportCustomCell.AdjustTextRect(const ARect: TRect): TRect; -var - L: Integer; -begin - L := FixupWidth(cxTextOffset); - Result := ARect; - InflateRect(Result, -L, -L); -end; - -function TcxSchedulerReportCustomCell.ExcludeBorders(const ARect: TRect; - ABorders: TcxBorders; ABorderWidth: Integer = 1): TRect; -begin - Result := ARect; - with Result do - begin - if bLeft in ABorders then - Inc(Left, ABorderWidth * LineThickness); - if bRight in ABorders then - Dec(Right, ABorderWidth * LineThickness); - if bTop in ABorders then - Inc(Top, ABorderWidth * LineThickness); - if bBottom in ABorders then - Dec(Bottom, ABorderWidth * LineThickness); - end; -end; - -function TcxSchedulerReportCustomCell.FixupWidth(AWidth: Integer): Integer; -begin - if not Renderer.IsPrinting then - Result := MulDiv(AWidth * Renderer.UnitsPerPixel, Renderer.ZoomFactor, 100) - else - Result := MulDiv(AWidth * Renderer.UnitsPerPixel, Renderer.PPI * 5, 72 * 7); -end; - -function TcxSchedulerReportCustomCell.GetFixupRect(DC: HDC; const ARect: TRect): TRect; -begin - Result := ARect; - FixupRect(DC, Result); -end; - -function TcxSchedulerReportCustomCell.InflateRect(const ARect: TRect; dX, dY: Integer): TRect; -begin - Result := ARect; -end; - -function TcxSchedulerReportCustomCell.GetReportLink: TcxSchedulerReportLink; -begin - Result := TcxSchedulerReportLink(Renderer.ReportLink); -end; - -{ TcxSchedulerReportContentCell } - -constructor TcxSchedulerReportContentCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - Data := cdidSchedulerContent; - if AViewInfo is TcxSchedulerContentCellViewInfo then - with TcxSchedulerContentCellViewInfo(AViewInfo) do - begin - Self.BoundsRect := Bounds; - Self.FBorderColor := BorderColor; - Self.FShowTimeLine := ShowTimeLine; - Self.FTimeLineBorders := TimeLineBorders; - if TimeEvent <> nil then - Self.FState := TimeEvent.Event.State - else - Self.FState := -1; - if ShowTimeLine then - begin - CellSideColors[csRight] := clBlack; - CellSideColors[csbottom] := FBorderColor; - end; - CellSides := csAll; - end; -end; - -procedure TcxSchedulerReportContentCell.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportContentCell then - with TcxSchedulerReportContentCell(Source) do - begin - Self.FBorderColor := FBorderColor; - Self.FShowTimeLine := FShowTimeLine; - Self.FState := FState; - Self.FTimeLineBorders := FTimeLineBorders; - end; - inherited Assign(Source); -end; - -procedure TcxSchedulerReportContentCell.DrawContent(DC: HDC; - AStage: TdxPSRenderStages); -var - R: TRect; -begin - inherited DrawContent(DC, AStage); - R := BoundsRect; - if FShowTimeLine then - begin - R.Right := R.Left + FixupWidth(cxTimeLineWidth); - if FState = -1 then - DrawCellRect(DC, R, FTimeLineBorders - [bLeft], clBlack, 1, clWhite) - else - DrawCellState(DC, R, FState, FTimeLineBorders, clBlack); - end -end; - -class function TcxSchedulerReportContentCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerContentCellViewInfo; -end; - -procedure TcxSchedulerReportContentCell.SuppressColoration; -var - I: TdxCellSide; -begin - for I := csLeft to csBottom do - CellSideColors[I] := clBlack; - FBorderColor := clBlack; - if FState <> -1 then - Inc(FState, 4); - inherited SuppressColoration; -end; - -function TcxSchedulerReportContentCell.HasBorderColoration: Boolean; -begin - Result := True; -end; - -{ TcxSchedulerReportHeaderItemCell } - -constructor TcxSchedulerReportHeaderItemCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); - - function GetConvertedRect(ARotateHeader, ARotateText: Boolean; const R: TRect): TRect; - begin - if ARotateHeader then - begin - with R do - if ARotateText then - Result := cxRectBounds(BoundsRect.Left + Top, BoundsRect.Bottom - Right, - Bottom - Top, Right - Left) - else - Result := cxRectBounds(BoundsRect.Left + Left, BoundsRect.Top + Top, - Right - Left, Bottom - Top); - end - else - Result := R; - end; - -begin - inherited CreateFrom(AParent, AViewInfo); - Data := cdidSchedulerHeader; - if AViewInfo is TcxSchedulerHeaderCellViewInfo then - with TcxSchedulerHeaderCellViewInfo(AViewInfo) do - begin - CalculateImageLayout; - Self.TextAlignX := TextAlignXMap[AlignHorz]; - Self.Multiline := AutoHeight; - Self.TextAlignY := TextAlignYMap[AlignVert]; - Self.FRotateText := RotateText; - Self.FCaption := DisplayText; - Self.FIsResourceHeader := IsResourceHeader; - Self.FResourceID := ResourceID; - //image support - Self.FImages := Images; - Self.FImageIndex := ImageIndex; - Self.FTextRect := GetConvertedRect(RotateHeader, RotateText, TextRect); - Self.FImageRect := GetConvertedRect(RotateHeader, RotateText, ImageRect); - end; - CellSides := csAll; - ReportLink.RegisterLookAndFeelItem(Self, cesRaised); - FNoClip := True; -end; - -procedure TcxSchedulerReportHeaderItemCell.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportHeaderItemCell then - with TcxSchedulerReportHeaderItemCell(Source) do - begin - Self.FCaption := FCaption; - Self.FDate := FDate; - Self.FResourceID := FResourceID; - Self.FRotateText := FRotateText; - //image support - Self.FTextRect := FTextRect; - Self.FImages := FImages; - Self.FImageIndex := FImageIndex; - Self.FImageRect := FImageRect; - end; - inherited Assign(Source); -end; - -procedure TcxSchedulerReportHeaderItemCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - R: TRect; -begin - inherited DrawContent(DC, AStage); - if ReportLink.SupportImages then - R := GetFixupRect(DC, FTextRect) - else - R := BoundsRect; - if FRotateText then - DrawCellTextVert(DC, R, FCaption, TextAlignX, TextAlignY, Font, Multiline) - else - DrawCellText(DC, R, FCaption, TextAlignX, TextAlignY, Font, clDefault, Multiline); - if HasImage then - DrawImage(DC); -end; - -procedure TcxSchedulerReportHeaderItemCell.DrawImage(DC: HDC); -var - R: TRect; -begin - R := GetFixupRect(DC, FImageRect); - Renderer.DrawGraphicEx(DC, R, R, Images, ImageIndex, nil, True, True, Color, - ContentBkColor, ContentPattern, cibAlways); -end; - -class function TcxSchedulerReportHeaderItemCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerHeaderCellViewInfo; -end; - -procedure TcxSchedulerReportHeaderItemCell.ConvertCoords( - APixelsNumerator, APixelsDenominator: Integer); - - procedure ConvertRect(var R: TRect); - begin - with R do - begin - Left := MulDiv(Left, APixelsNumerator, APixelsDenominator); - Right := MulDiv(Right, APixelsNumerator, APixelsDenominator); - Top := MulDiv(Top, APixelsNumerator, APixelsDenominator); - Bottom := MulDiv(Bottom, APixelsNumerator, APixelsDenominator); - end; - end; - -begin - inherited ConvertCoords(APixelsNumerator, APixelsDenominator); - ConvertRect(FTextRect); - ConvertRect(FImageRect); -end; - -function TcxSchedulerReportHeaderItemCell.HasImage: Boolean; -begin - Result := (Images <> nil) and (ImageIndex > -1) and (ImageIndex < Images.Count); -end; - -procedure TcxSchedulerReportHeaderItemCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FRotateText := AReader.ReadBoolean; - FCaption := AReader.ReadString; - if ReportLink.SupportImages then - begin - FTextRect := AReader.ReadRect; - if AReader.ReadBoolean then // HasImage - begin - FImageRect := AReader.ReadRect; - FImages := ReportCells.ImageLists[AReader.ReadInteger]; - FImageIndex := AReader.ReadInteger; - end - else - FImages := nil; - end; -end; - -procedure TcxSchedulerReportHeaderItemCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteBoolean(FRotateText); - AWriter.WriteString(FCaption); - if ReportLink.SupportImages then - begin - AWriter.WriteRect(FTextRect); - AWriter.WriteBoolean(HasImage); - if HasImage then - begin - AWriter.WriteRect(FImageRect); - AWriter.WriteInteger(ReportCells.IndexOfImageList(Images)); - AWriter.WriteInteger(ImageIndex); - end; - end; -end; - -function TcxSchedulerReportHeaderItemCell.GetTextAlignX: TcxTextAlignX; -begin - Result := inherited TextAlignX; -end; - -function TcxSchedulerReportHeaderItemCell.GetTextAlignY: TcxTextAlignY; -begin - Result := inherited TextAlignY; -end; - -procedure TcxSchedulerReportHeaderItemCell.SetTextAlignX( - Value: TcxTextAlignX); -begin - inherited TextAlignX := Value; -end; - -procedure TcxSchedulerReportHeaderItemCell.SetTextAlignY( - Value: TcxTextAlignY); -begin - inherited TextAlignY := Value; -end; - -{ TcxSchedulerReportGroupSeparatorCell } - -constructor TcxSchedulerReportGroupSeparatorCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - CellSides := csAll; - ReportLink.RegisterLookAndFeelItem(Self, cesRaised); -end; - -class function TcxSchedulerReportGroupSeparatorCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerGroupSeparatorCellViewInfo; -end; - -{ TcxSchedulerReportContainerCell } - -class function TcxSchedulerReportContainerCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerContainerCellViewInfo; -end; - -{ TcxSchedulerReportBackgroundSlotCell } - -constructor TcxSchedulerReportBackgroundSlotCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - if AViewInfo is TcxSchedulerBackgroundSlotCellViewInfo then - with TcxSchedulerBackgroundSlotCellViewInfo(AViewInfo) do - Self.FDisplayText := DisplayText; -end; - -procedure TcxSchedulerReportBackgroundSlotCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -begin - DrawCellRect(DC, BoundsRect, TcxBorders(CellSides), clWindowText); - DrawCellText(DC, BoundsRect, DisplayText, taLeft, taTop); -end; - -class function TcxSchedulerReportBackgroundSlotCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerBackgroundSlotCellViewInfo; -end; - -procedure TcxSchedulerReportBackgroundSlotCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FDisplayText := AReader.ReadString; -end; - -procedure TcxSchedulerReportBackgroundSlotCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FDisplayText); -end; - -{ TcxSchedulerReportDailyTimeRulerCellsSite } - -constructor TcxSchedulerReportDailyTimeRulerCellsSite.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - FLargeFont := TFont.Create; - FontIndex := ReportCells.ReportLink.AddFontToPool(Font); - CellSides := []; -end; - -destructor TcxSchedulerReportDailyTimeRulerCellsSite.Destroy; -begin - FLargeFont.Free; - inherited Destroy; -end; - -procedure TcxSchedulerReportDailyTimeRulerCellsSite.SetFontIndex(Index: Integer); -begin - inherited SetFontIndex(Index); - if Font <> nil then - begin - FLargeFont.Assign(Font); - FLargeFont.Size := Font.Size * 2; - FLargeFontIndex := ReportCells.ReportLink.AddFontToPool(FLargeFont); - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCellsSite.ReadProperties( - AReader: TdxPSDataReader); -begin - inherited ReadProperties(AReader); - FLargeFontIndex := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportDailyTimeRulerCellsSite.WriteProperties( - AWriter: TdxPSDataWriter); -begin - inherited WriteProperties(AWriter); - AWriter.WriteInteger(FLargeFontIndex); -end; - -function TcxSchedulerReportDailyTimeRulerCellsSite.GetLargeFont: TFont; -begin - if (FLargeFontIndex <> -1) and (ReportCells <> nil) then - Result := ReportCells.GetFontByIndex(FLargeFontIndex) - else - Result := nil; -end; - -{ TcxSchedulerReportDailyTimeRulerCell } - -constructor TcxSchedulerReportDailyTimeRulerCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -var - I: Boolean; -begin - inherited CreateFrom(AParent, AViewInfo); - CellSides := [csRight]; - Data := cdidSchedulerTimeRuler; - FLineColor := clBtnShadow; - TimeRulerSite.Width := Max(TimeRulerSite.Width, Width); - if AViewInfo is TcxSchedulerTimeRulerCellViewInfo then - with TcxSchedulerTimeRulerCellViewInfo(AViewInfo) do - begin - TimeRulerSite.Height := Max(TimeRulerSite.Height, ClipRect.Bottom); - Self.FHour := Hour; - Self.FShowMinutes := ShowMinutes; - Self.FHasAdditionalTimeZone := HasAdditionalTimeZone; - Self.FLineCount:= LineCount; - for I := False to True do - begin - Self.FBounds[I] := Bounds[I]; - Self.FDisplayTexts[I] := DisplayTexts[I]; - end; - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportDailyTimeRulerCell then - with TcxSchedulerReportDailyTimeRulerCell(Source) do - begin - Self.FHasAdditionalTimeZone := FHasAdditionalTimeZone; - Self.FLineCount := FLineCount; - Self.FBounds[False] := FBounds[False]; - Self.FBounds[True] := FBounds[True]; - Self.FDisplayTexts[False] := FDisplayTexts[False]; - Self.FDisplayTexts[True] := FDisplayTexts[True]; - Self.FHour := FHour; - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - I: Boolean; -const - ABorders: array[Boolean] of TcxBorders = ([bBottom], [bBottom, bRight]); -begin - if Index = 0 then - CellSides := CellSides + [csBottom]; - inherited; - CalculateDisplayInfo; - for I := not HasAdditionalTimeZone to True do - begin - if Hour >= 0 then - DrawTimeZone(DC, Bounds[I], DisplayTexts[I], I) - else - DrawTimeZoneLabel(DC, Bounds[I], DisplayTexts[I], ABorders[I]); - end; -end; - -class function TcxSchedulerReportDailyTimeRulerCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerTimeRulerCellViewInfo; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.SuppressColoration; -begin - inherited SuppressColoration; - FLineColor := clBlack; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.CalculateDisplayInfo; -begin - FBounds[True] := BoundsRect; - FBounds[False] := BoundsRect; - if HasAdditionalTimeZone then - begin - FBounds[True].Left := cxRectCenter(BoundsRect).X; - FBounds[False].Right := FBounds[True].Left; - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.DrawTimeZone(DC: HDC; - const ABounds: TRect; const AText: string; AIsCurrent: Boolean); -var - S: string; - J, LH: Integer; - R1, R, TextR: TRect; -begin - LH := cxRectHeight(BoundsRect) div LineCount; - R := BoundsRect; - Dec(R.Right, FixupWidth(6)); - if not IsLastItem then - DrawCellFrame(DC, R, [bBottom], FLineColor); - - R := cxRectSetHeight(ABounds, LH); - R.Left := (R.Left + R.Right) div 2 + FixupWidth(cxTextOffset * 2); - Dec(R.Right, FixupWidth(6)); - for J := 0 to LineCount - 2 do - begin - DrawCellFrame(DC, R, [bBottom], FLineColor, 1); - OffsetRect(R, 0, LH); - end; - TextR := cxRectInflate(ExcludeBorders(ABounds, - [bRight, bBottom]), -FixupWidth(5), -FixupWidth(cxTextOffset)); - FNoClip := True; - if LineCount > 1 then - begin - J := Length(AText); - - DrawCellText(DC, Rect(TextR.Left, TextR.Top, R.Left - FixupWidth(cxTextOffset), TextR.Bottom), - Copy(AText, 1, J - 3), taRight, taTop, LargeFont, LargeFont.Color); - R1 := Rect(R.Left, TextR.Top, TextR.Right, TextR.Top + LH - FixupWidth(3)); - DrawCellText(DC, R1, Copy(AText, J - 1, 2), taCenterX, taTop, Font); - if ShowMinutes and AIsCurrent then - for J := 1 to LineCount - 1 do - begin - OffsetRect(R1, 0, LH); - S := IntToStr(MulDiv(60, J, LineCount)); - if Length(S) < 2 then - S := '0' + S; - DrawCellText(DC, R1, S, taCenterX, taTop, Font); - end; - end - else - DrawCellText(DC, TextR, AText, taRight, taCenterY, Font); - R.Left := ABounds.Left + FixupWidth(5); - if not IsLastItem then - begin - if Hour <> 23 then - DrawCellFrame(DC, R, [bBottom], FLineColor) - else - DrawCellFrame(DC, ABounds, [bBottom], FLineColor); - end; - if HasAdditionalTimeZone then - begin - R := GetInnerBounds(DC); - R.Left := (R.Left + R.Right) div 2; - R.Right := R.Left + LineThickness; - Renderer.FillRect(DC, R, clBlack); - end; - FNoClip := False; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FHasAdditionalTimeZone := AReader.ReadBoolean; - FLineCount := AReader.ReadInteger; - FBounds[False] := AReader.ReadRect; - FBounds[True] := AReader.ReadRect; - FDisplayTexts[False] := AReader.ReadString; - FDisplayTexts[True] := AReader.ReadString; - FHour := AReader.ReadInteger; - FLineColor := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteBoolean(FHasAdditionalTimeZone); - AWriter.WriteInteger(FLineCount); - AWriter.WriteRect(FBounds[False]); - AWriter.WriteRect(FBounds[True]); - AWriter.WriteString(FDisplayTexts[False]); - AWriter.WriteString(FDisplayTexts[True]); - AWriter.WriteInteger(FHour); - AWriter.WriteInteger(FLineColor); -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.DrawTimeZoneLabel(DC: HDC; - const ABounds: TRect; const AText: string; ABorders: TcxBorders); -begin - DrawCellText(DC, AdjustTextRect(ABounds), AText, taLeft, taBottom, Font, Font.Color); -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetBoundsRect(AType: Boolean): TRect; -begin - Result := FBounds[AType]; -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetDisplayText(AType: Boolean): string; -begin - Result := FDisplayTexts[AType]; -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetLargeFont: TFont; -begin - Result := TimeRulerSite.LargeFont; -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; -begin - Result := TcxSchedulerReportDailyTimeRulerCellsSite(Parent); -end; - -{ TcxSchedulerReportMonthDayCell } - -constructor TcxSchedulerReportMonthDayCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - if AViewInfo is TcxSchedulerMonthDayContentCellViewInfo then - begin - FSmallFont := TcxSchedulerMonthDayContentCellViewInfo(AViewInfo).SmallFont; - FDontPrint := TcxSchedulerMonthDayContentCellViewInfo(AViewInfo).DontPrint; - if FDontPrint then - begin - Transparent := True; - FDisplayText := ''; - end - else - FDisplayText := TcxSchedulerMonthDayContentCellViewInfo(AViewInfo).DisplayText; - end; -end; - -procedure TcxSchedulerReportMonthDayCell.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportMonthDayCell then - begin - FDontPrint := TcxSchedulerReportMonthDayCell(Source).FDontPrint; - FDisplayText := TcxSchedulerReportMonthDayCell(Source).FDisplayText; - end; -end; - -procedure TcxSchedulerReportMonthDayCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - R: TRect; - F: TFont; -begin - inherited DrawContent(DC, AStage); - if FDontPrint then Exit; - if FDisplayText <> '' then - begin - R := ExcludeBorders(BoundsRect, TcxBorders(CellSides)); - F := TFont.Create; - try - F.Assign(Font); - if SmallFont then - F.Size := MulDiv(F.Size, 2, 3); - DrawCellText(DC, R, FDisplayText, taRight, taTop, F); - finally - F.Free; - end; - end; -end; - -class function TcxSchedulerReportMonthDayCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerMonthDayContentCellViewInfo; -end; - -procedure TcxSchedulerReportMonthDayCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FDisplayText := AReader.ReadString; - FDontPrint := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportMonthDayCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FDisplayText); - AWriter.WriteBoolean(FDontPrint); -end; - -{ TcxSchedulerReportTimeLinePart } - -constructor TcxSchedulerReportTimeLinePart.CreateEx(AParent: TdxReportCell; - ATriangle: Boolean; AState: Integer); -begin - inherited Create(AParent); - Transparent := False; - FTriangle := ATriangle; - FState := AState; - Data := cdidSchedulerEventTimeLine; -end; - -procedure TcxSchedulerReportTimeLinePart.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportTimeLinePart then - begin - FState := TcxSchedulerReportTimeLinePart(Source).FState; - FTriangle := TcxSchedulerReportTimeLinePart(Source).FTriangle; - end; -end; - -procedure TcxSchedulerReportTimeLinePart.DrawContent(DC: HDC; - AStage: TdxPSRenderStages); -var - R: TRect; - ABrushHandle: HBrush; - APenHandle: HPen; - Points: array[0..2] of TPoint; -begin - R := GetOuterBounds(DC); - if FTriangle then - begin - Renderer.FillRect(DC, R, clWhite); - ABrushHandle := SelectObject(DC, StateBrushes[FState].Handle); - APenHandle := SelectObject(DC, GetStockObject(NULL_PEN)); - Points[0] := R.TopLeft; - Points[1] := Point(R.Right, R.Top); - Points[2] := Point(R.Right, R.Top + R.Right - R.Left); - Windows.Polygon(DC, Points, 3); - SelectObject(DC, GetStockObject(BLACK_PEN)); - Windows.MoveToEx(DC, R.Left, R.Top, nil); - Windows.LineTo(DC, R.Right, R.Top + R.Right - R.Left); - SelectObject(DC, APenHandle); - SelectObject(DC, ABrushHandle); - end - else - Windows.FillRect(DC, R, StateBrushes[FState].Handle); - DrawBorders(DC); -end; - -procedure TcxSchedulerReportTimeLinePart.ReadData( - AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FTriangle := AReader.ReadBoolean; - FState := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportTimeLinePart.WriteData( - AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteBoolean(FTriangle); - AWriter.WriteInteger(FState); -end; - -{ TcxSchedulerReportTimeLineCell } - -constructor TcxSchedulerReportTimeLineCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - Transparent := False; - Color := clWhite; -end; - -procedure TcxSchedulerReportTimeLineCell.SetTimeRect(const ABounds: TRect; AState: Integer); -var - ATriangle: Boolean; -begin - ATriangle := cxRectIsEmpty(ABounds); - FCurrentValue := TcxSchedulerReportTimeLinePart.CreateEx(Self, ATriangle, AState); - if ATriangle then - FCurrentValue.BoundsRect := BoundsRect - else - FCurrentValue.BoundsRect := ABounds; -end; - -{ TcxSchedulerReportCellString } - -function TcxSchedulerReportCellString.GetDefaultDTFormat: DWORD; -begin - Result := inherited GetDefaultDTFormat and not CXTO_EDITCONTROL; -end; - -{ TcxSchedulerReportCustomEventCell } - -function TcxSchedulerReportCustomEventCell.CreateStringCell( - const AText: string; AMultiline: Boolean = True; AData: Integer = 0): TdxReportCellString; -begin - Result := TcxSchedulerReportCellString.Create(Self); - Result.CellSides := []; - Result.Multiline := AMultiline; - Result.Text := AText; - Result.Data := AData; -end; - -procedure TcxSchedulerReportCustomEventCell.SetViewParams(const AViewParams: TcxViewParams); -var - I: Integer; -begin - ReportLink.SetCellViewParams(Self, AViewParams); - for I := 0 to DataItemCount - 1 do - ReportLink.SetCellViewParams(DataItems[I], AViewParams); -end; - -function TcxSchedulerReportCustomEventCell.GetPrintStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := ReportLink.PrintStyles.ActiveStyle; -end; - -function TcxSchedulerReportCustomEventCell.GetReportLink: TcxSchedulerReportLink; -begin - Result := ReportCells.ReportLink as TcxSchedulerReportLink; -end; - -function TcxSchedulerReportCustomEventCell.GetSuppressColoration: Boolean; -begin - Result := ReportLink.OptionsFormatting.SuppressContentColoration; -end; - -{ TcxSchedulerReportEventCell } - -constructor TcxSchedulerReportEventCell.CreateFrom(AParent: TdxReportCell; - AEventViewInfo: TcxSchedulerEventCellViewInfo); -begin - inherited Create(AParent); - ClipChildren := True; - Transparent := False; - InitializeFromViewInfo(AEventViewInfo); - CreateDataItems; - SetViewParams(AEventViewInfo.ViewParams); - CalculateLayout; -end; - -procedure TcxSchedulerReportEventCell.AdjustItemsHeight(DC: HDC); - - procedure CheckItem(AItem: TAbstractdxReportCellData); - var - R: TRect; - begin - if Assigned(AItem) then - begin - R := AItem.BoundsRect; - if HasMessage then - R.Bottom := MessageCell.Top - else - R.Bottom := ContentBounds.Bottom; - AItem.BoundsRect := R; - end; - end; - -begin - CheckItem(CaptionCell); - CheckItem(StartCell); - CheckItem(FinishCell); -end; - -procedure TcxSchedulerReportEventCell.CalculateLayout; -var - DC: HDC; - I, W, H, AHalfWidth: Integer; -begin - DC := GetDC(0); - try - FContentBounds := GetContentBounds(DC); - if Assigned(FTimeLineCell) then - CalculateTimeLine(DC); - FCaptionLeft := FContentBounds.Left; - if IsNeedCreateTimeCells then - begin - H := Renderer.CalcTextHeight(DC, '0', False, CaptionCell.Font); - W := Renderer.CalcTextWidth(DC, '00:00', CaptionCell.Font); - AHalfWidth := cxRectWidth(ContentBounds) div 2; - if W < AHalfWidth then - begin - StartCell.BoundsRect := cxRectBounds(FCaptionLeft, 0, W, H); - if W * 2 < AHalfWidth then - begin - FinishCell.BoundsRect := cxRectBounds(StartCell.BoundsRect.Right, 0, W, H); - FCaptionLeft := FinishCell.BoundsRect.Right + 2; - end - else - begin - FCaptionLeft := StartCell.BoundsRect.Right + 2; - FreeAndNil(FFinishCell); - end; - end - else - FreeAndNil(FStartCell); - for I := 0 to DataItemCount - 1 do - if DataItems[I].Data = cdidSchedulerEventIcons then - begin - DataItems[I].Left := FCaptionLeft; - Inc(FCaptionLeft, DataItems[I].Width + 2); - end; - end; - CaptionCell.BoundsRect := GetCaptionRect(DC); - if Assigned(MessageCell) then - begin - MessageCell.BoundsRect := GetMessageRect(DC); - MessageCell.AdjustContent(DC); - end; - AdjustItemsHeight(DC); - finally - ReleaseDC(0, DC); - end; -end; - -procedure TcxSchedulerReportEventCell.CalculateTimeLine(DC: HDC); - - function GetTimeRectBrushIndex: Integer; - begin - Result := Event.State; - if SuppressColoration then - Inc(Result, 4); - end; - - function GetActualTimeRect: TRect; - begin - Result := GetRelativeRect(EventViewInfo.EventTimeRect); - if not cxRectIsEmpty(Result) then - Result := cxRectInflate(Result, 0, 1); - end; - -begin - if FTimeLineCell = nil then Exit; - FTimeLineCell.BoundsRect := GetTimeLineRect(DC); - FTimeLineCell.SetTimeRect(GetActualTimeRect, GetTimeRectBrushIndex); -end; - -function TcxSchedulerReportEventCell.CreateCaptionCell: TdxReportCellString; -begin - Result := CreateStringCell(EventViewInfo.Caption, - FHasDetailInfo and not IsHeaderEvent, cdidSchedulerEventCaption); - with Result do - begin - if HasDetailInfo then TextAlignY := taTop; - if IsHeaderEvent and not HasImages then TextAlignX := taCenterX; - end; -end; - -procedure TcxSchedulerReportEventCell.CreateDataItems; -begin - if HasDetailInfo and not IsHeaderEvent then - FTimeLineCell := CreateTimeLineCell; - if IsNeedCreateTimeCells then - begin - FStartCell := CreateTimeTextCell(EventViewInfo.StartText, cdidSchedulerEventStart); - FFinishCell := CreateTimeTextCell(EventViewInfo.FinishText, cdidSchedulerEventFinish); - end; - CreateEventImageCells; - FCaptionCell := CreateCaptionCell; - if HasMessage then - CreateMessageCell(Event.Message, EventViewInfo.EventViewData.EditProperties, - EventViewInfo.ViewParams); -end; - -procedure TcxSchedulerReportEventCell.CreateEventImageCells; -var - I: Integer; - AImageCell: TdxReportCellImage; - AImage: TcxSchedulerEventImageItem; -begin - if not HasImages then Exit; - for I := 0 to EventViewInfo.Images.Count - 1 do - begin - AImage := EventViewInfo.Images[I]; - AImageCell := AddDataItem(TdxReportCellImage) as TdxReportCellImage; - AImageCell.CellSides := []; - AImageCell.Data := cdidSchedulerEventIcons; - if AImage.ImageType = eitCustom then - begin - AImageCell.ImageList := AImage.Images; - AImageCell.ImageIndex := AImage.ImageIndex; - AImageCell.BoundsRect := GetRelativeRect(AImage.Bounds); - end - else - begin - AImageCell.TextAlignX := taCenterX; - AImageCell.TextAlignY := taBottom; - case AImage.ImageType of - eitReminder: - AImageCell.Text := 'A'; - eitRecurrence: - AImageCell.Text := 'B'; - eitCustomOccurrence: - AImageCell.Text := 'C'; - end; - AImageCell.BoundsRect := GetRelativeRect(AImage.Bounds); - end; - end; -end; - -procedure TcxSchedulerReportEventCell.CreateMessageCell(AMessage: Variant; - AProperties: TcxCustomEditProperties; AViewParams: TcxViewParams); -var - AParams: TdxReportItemViewParams; -begin - if AProperties = nil then - FMessageCell := nil - else - begin - FMessageCell := AddDataItem(GetMessageClass(AProperties)); - FillChar(AViewParams, SizeOf(AViewParams), 0); - AParams.NativeParams := AViewParams; - dxPScxCommon.dxPSDataMaps.InitializeItem(FMessageCell, AProperties, AMessage, - PrintStyle, AParams); - if not SuppressColoration then - MessageCell.BorderColor := EventViewInfo.SeparatorColor; - FMessageCell.CellSides := [csTop]; - FMessageCell.Data := cdidSchedulerEventMessage - end; -end; - -function TcxSchedulerReportEventCell.CreateTimeTextCell( - const ATimeText: string; AData: Integer = 0): TdxReportCellString; -begin - Result := CreateStringCell(ATimeText, False, AData); - Result.TextAlignX := taRight; -end; - -function TcxSchedulerReportEventCell.CreateTimeLineCell: TcxSchedulerReportTimeLineCell; -begin - Result := TcxSchedulerReportTimeLineCell.Create(Self); -end; - -function TcxSchedulerReportEventCell.GetCaptionRect(DC: HDC): TRect; -begin - if HasImages then - Result := GetRelativeRect(EventViewInfo.CaptionRect) - else - Result := FContentBounds; - if IsNeedCreateTimeCells then - Result.Left:= FCaptionLeft; - if HasMessage then - begin - Result.Bottom := Result.Top + CaptionCell.MeasureFontHeight(DC); - Renderer.CalcTextRect(DC, CaptionCell.Text, Result, True, Font); - Result.Right := ContentBounds.Right; - CheckBounds(Result); - end; -end; - -function TcxSchedulerReportEventCell.GetContentBounds(DC: HDC): TRect; -begin - Result := GetRelativeRect(EventViewInfo.Bounds); - Dec(Result.Right); - Dec(Result.Bottom); -end; - -function TcxSchedulerReportEventCell.GetHasImages: Boolean; -begin - Result := PrintStyle.ShowEventImages and (FEventViewInfo.Images.Count > 0); -end; - -function TcxSchedulerReportEventCell.GetHasMessage: Boolean; -begin - Result := PrintStyle.SupportMessage and HasDetailInfo; -end; - -function TcxSchedulerReportEventCell.GetMessageClass(AProperties: TcxCustomEditProperties): TdxReportCellDataClass; -begin - Result := dxPScxCommon.dxPSDataMaps.ItemClass(AProperties); -end; - -function TcxSchedulerReportEventCell.GetMessageRect(DC: HDC): TRect; -begin - if HasImages then - Result := GetRelativeRect(EventViewInfo.MessageRect) - else - Result := ContentBounds; - if CaptionCell.BoundsRect.Bottom > Result.Top then - Result.Top := CaptionCell.BoundsRect.Bottom; -end; - -function TcxSchedulerReportEventCell.GetRelativeRect(const R: TRect): TRect; -begin - Result := cxRectOffset(R, cxPointInvert(BoundsRect.TopLeft)); -end; - -function TcxSchedulerReportEventCell.GetTimeLineRect(DC: HDC): TRect; -begin - Result := cxRect(0, 0, ContentBounds.Left, Height); -end; - -procedure TcxSchedulerReportEventCell.InitializeFromViewInfo( - AEventViewInfo: TcxSchedulerEventCellViewInfo); -begin - FEventViewInfo := AEventViewInfo; - FEditViewInfo := AEventViewInfo.EditViewInfo; - BoundsRect := AEventViewInfo.EventViewData.Bounds; //include timeline - CellSides := TdxCellSides(AEventViewInfo.Borders); - FIsHeaderEvent := Event.AllDayEvent or (Event.Duration > 1); - FHasDetailInfo := AEventViewInfo.IsDetailInfo; - FIsNeedCreateTimeCells := not (FIsHeaderEvent or FHasDetailInfo) and - AEventViewInfo.ShowStartTime; - FHasImages := GetHasImages; - FHasMessage := GetHasMessage and AEventViewInfo.ShowMessage; - FMessage := AEventViewInfo.Message; -end; - -procedure TcxSchedulerReportEventCell.SetViewParams(const AViewParams: TcxViewParams); -var - I, AFontIndex: Integer; -begin - inherited SetViewParams(AViewParams); - if HasImages then - begin - SpecialSymbolFont.Size := AViewParams.Font.Size; - AFontIndex := Renderer.ReportLink.AddFontToPool(SpecialSymbolFont); - for I := 0 to DataItemCount - 1 do - if DataItems[I].Data = cdidSchedulerEventIcons then - DataItems[I].FontIndex := AFontIndex; - end; -end; - -procedure TcxSchedulerReportEventCell.CheckBounds(var ABounds: TRect); -begin - cxRectIntersect(ABounds, ABounds, ContentBounds); -end; - -function TcxSchedulerReportEventCell.GetEvent: TcxSchedulerControlEvent; -begin - Result := EventViewInfo.Event; -end; - -{ TcxSchedulerReportDetailsEventCell } - -constructor TcxSchedulerReportDetailsEventCell.CreateEx(AParent: TdxReportCell; - AEvent: TcxSchedulerEvent; ADate: TDateTime; const AParams: TcxViewParams; - AContinued: Boolean = False); -begin - inherited Create(AParent); - CellSides := []; - FContinued := AContinued; - FDate := ADate; - FEvent := AEvent; - CreateDataItems; - SetViewParams(AParams); -end; - -procedure TcxSchedulerReportDetailsEventCell.CalculateLayout(AWidth, ATimeWidth: Integer); -var - DC: HDC; - ATop: Integer; -begin - FCaptionCell.BoundsRect := MakeRect(ATimeWidth, 0, AWidth, 0); - DC := GetDC(0); - try - FLineHeight := FCaptionCell.MeasureFontHeight(DC); - FStartCell.BoundsRect := MakeRect(0, 0, ATimeWidth, FLineHeight); - ATop := FCaptionCell.MeasureContentHeight(DC); - FCaptionCell.Height := ATop; - FMessageCell.BoundsRect := MakeRect(ATimeWidth, ATop, AWidth, ATop); - ATop := FMessageCell.MeasureContentHeight(DC); - FMessageCell.Height := Max(ATop, FLineHeight); - finally - ReleaseDC(0, DC); - end; -end; - -function TcxSchedulerReportDetailsEventCell.CalculateHeight: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to DataItemCount - 1 do - with DataItems[I] do - if Visible then Result := Max(Result, BoundsRect.Bottom); -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateCaptionCell; -begin - FCaptionCell := CreateStringCell(GetCaptionCellText, True, - cdidSchedulerEventCaption); -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateDataItems; -begin - CreateCaptionCell; - CreateTimeCell; - CreateMessageCell; -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateMessageCell; -begin - FMessageCell := CreateStringCell(GetMessageCellText, True, - cdidSchedulerEventMessage); -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateTimeCell; -begin - FStartCell := CreateStringCell(GetTimeCellText, False, cdidSchedulerEventStart); -end; - -function TcxSchedulerReportDetailsEventCell.GetCaptionCellText: string; -begin - Result := Event.Caption; - if Trim(Event.Location) <> '' then - Result := Result + ' -- ' + Event.Location; -end; - -function TcxSchedulerReportDetailsEventCell.GetMessageCellText: string; -begin - if Continued then - Result := cxGetResourceString(@sdxSeeAboveMessage) - else - Result := Event.Message; -end; - -function TcxSchedulerReportDetailsEventCell.GetTimeCellText: string; -begin - if Event.AllDayEvent or ((DateOf(Event.Start) < Date) and (DateOf(Event.Finish) > Date)) then - Result := cxGetResourceString(@sdxAllDayMessage) - else - Result := DateTimeHelper.TimeToStr(Max(Event.Start, Date)) + ' - ' + - DateTimeHelper.TimeToStr(Min(Event.Finish, Date + 1)); -end; - -procedure TcxSchedulerReportDetailsEventCell.SetViewParams( - const AViewParams: TcxViewParams); -var - AParams: TdxReportItemViewParams; -begin - inherited SetViewParams(AViewParams); - FillChar(AParams, SizeOf(AParams), 0); - AParams.NativeParams := AViewParams; - Include(AParams.FontStyle, fsBold); - ReportLink.SetCellViewParams(CaptionCell, AParams); - ReportLink.SetCellViewParams(StartCell, AParams); -end; - -{ TcxSchedulerReportMemoEventCell } - -procedure TcxSchedulerReportMemoEventCell.CalculateLayout(AWidth, - ATimeWidth: Integer); -var - ATop, ASpace: Integer; - DC: HDC; -begin - DC := GetDC(0); - try - FLineHeight := Renderer.CalcTextHeight(DC, 'Wg', False, Font); - ASpace := FLineHeight div 2; - ATop := FLineHeight * 2; - HeaderCell.BoundsRect := MakeRect(0, 0, AWidth, ATop); - Inc(ATop, ASpace); - CalculateLabelAndData(CaptionLabelCell, CaptionCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(LocationLabelCell, LocationCell, DC, ATimeWidth, AWidth, ATop); - if Assigned(CaptionLabelCell) or Assigned(LocationLabelCell) then Inc(ATop, ASpace); - CalculateLabelAndData(StartLabelCell, StartCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(FinishLabelCell, FinishCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(ShowTimeAsLabelCell, ShowTimeAsCell, DC, ATimeWidth, AWidth, ATop); - Inc(ATop, ASpace); - CalculateLabelAndData(RecurrenceLabelCell, RecurrenceCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(RecurrencePatternLabelCell, RecurrencePatternCell, DC, ATimeWidth, AWidth, ATop); - if Assigned(MessageCell) then - begin - Inc(ATop, ASpace); - MessageCell.BoundsRect := MakeRect(0, ATop, AWidth, ATop); - MessageCell.Height := MessageCell.MeasureContentHeight(DC); - end; - finally - ReleaseDC(0, DC); - end; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateDataItems; -begin - CreateHeader; - CreateSubject; - CreateLocation; - CreateStart; - CreateFinish; - CreateShowTimeAs; - CreateRecurrence; - CreateRecurrencePattern; - CreateMessage; -end; - -function TcxSchedulerReportMemoEventCell.GetCaptionCellText: string; -begin - Result := Event.Caption; -end; - -function TcxSchedulerReportMemoEventCell.GetMessageCellText: string; -begin - Result := Event.Message; -end; - -function TcxSchedulerReportMemoEventCell.GetTimeCellText: string; -begin - Result := FormatDateTime('ddd ddddd t', Event.Start); -end; - -procedure TcxSchedulerReportMemoEventCell.SetViewParams( - const AViewParams: TcxViewParams); -var - AParams: TdxReportItemViewParams; -begin - ReportLink.SetCellViewParams(Self, AViewParams); - ReportLink.SetCellViewParams(CaptionCell, AViewParams); - ReportLink.SetCellViewParams(LocationCell, AViewParams); - ReportLink.SetCellViewParams(StartCell, AViewParams); - ReportLink.SetCellViewParams(FinishCell, AViewParams); - ReportLink.SetCellViewParams(ShowTimeAsCell, AViewParams); - ReportLink.SetCellViewParams(RecurrenceCell, AViewParams); - ReportLink.SetCellViewParams(RecurrencePatternCell, AViewParams); - ReportLink.SetCellViewParams(MessageCell, AViewParams); - - FillChar(AParams, SizeOf(AParams), 0); - AParams.NativeParams := AViewParams; - Include(AParams.FontStyle, fsBold); - ReportLink.SetCellViewParams(CaptionLabelCell, AParams); - ReportLink.SetCellViewParams(LocationLabelCell, AParams); - ReportLink.SetCellViewParams(StartLabelCell, AParams); - ReportLink.SetCellViewParams(FinishLabelCell, AParams); - ReportLink.SetCellViewParams(ShowTimeAsLabelCell, AParams); - ReportLink.SetCellViewParams(RecurrenceLabelCell, AParams); - ReportLink.SetCellViewParams(RecurrencePatternLabelCell, AParams); - - AParams.FontSize := MulDiv(AViewParams.Font.Size, 3, 2); - ReportLink.SetCellViewParams(HeaderCell, AParams); -end; - -procedure TcxSchedulerReportMemoEventCell.CalculateLabelAndData( - ALabelCell, ADataCell: TAbstractdxReportCellData; DC: HDC; - ATimeWidth, AWidth: Integer; var ATop: Integer); -begin - if Assigned(ALabelCell) then - begin - ALabelCell.BoundsRect := MakeBounds(0, ATop, ATimeWidth, FLineHeight); - ADataCell.BoundsRect := MakeRect(ATimeWidth, ATop, AWidth, ATop); - ADataCell.Height := ADataCell.MeasureContentHeight(DC); - Inc(ATop, Max(ADataCell.Height, FLineHeight)); - end; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateHeader; -begin - FHeaderCell := CreateStringCell(GetHeaderCellText); - FHeaderCell.BorderClass := TdxPSCellBoldFlatBorder; - FHeaderCell.CellSides := [csBottom]; - FHeaderCell.TextAlignY := taBottom; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateFinish; -begin - CreateFinishLabelCell; - CreateFinishCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateFinishCell; -begin - FFinishCell := CreateStringCell(FormatDateTime('ddd ddddd t', Event.Finish)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateFinishLabelCell; -begin - FFinishLabelCell := CreateStringCell( - cxGetResourceString(@sdxFinishLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateLocation; -begin - if Event.Location = '' then Exit; - CreateLocationLabelCell; - CreateLocationCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateLocationCell; -begin - FLocationCell := CreateStringCell(Event.Location); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateLocationLabelCell; -begin - FLocationLabelCell := CreateStringCell( - cxGetResourceString(@sdxLocationLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateMessage; -begin - if GetMessageCellText = '' then Exit; - CreateMessageCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrence; -begin - CreateRecurrenceLabelCell; - CreateRecurrenceCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrenceCell; -begin - FRecurrenceCell := CreateStringCell(GetRecurrenceCellText); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrenceLabelCell; -begin - FRecurrenceLabelCell := CreateStringCell( - cxGetResourceString(@sdxRecurrenceLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrencePattern; -begin - if not Event.IsRecurring then Exit; - CreateRecurrencePatternLabelCell; - CreateRecurrencePatternCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrencePatternCell; -begin - FRecurrencePatternCell := CreateStringCell(GetRecurrencePatternCellText); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrencePatternLabelCell; -begin - FRecurrencePatternLabelCell := CreateStringCell( - cxGetResourceString(@sdxRecurrencePatternLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateShowTimeAs; -begin - if GetShowTimeAsCellText = '' then Exit; - CreateShowTimeAsLabelCell; - CreateShowTimeAsCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateShowTimeAsCell; -begin - FShowTimeAsCell := CreateStringCell(GetShowTimeAsCellText); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateShowTimeAsLabelCell; -begin - FShowTimeAsLabelCell := CreateStringCell( - cxGetResourceString(@sdxShowTimeAsLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateStart; -begin - CreateStartLabelCell; - CreateTimeCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateStartLabelCell; -begin - FStartLabelCell := CreateStringCell( - cxGetResourceString(@sdxStartLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateSubject; -begin - if GetCaptionCellText = '' then Exit; - CreateSubjectLabelCell; - CreateCaptionCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateSubjectLabelCell; -begin - FCaptionLabelCell := CreateStringCell( - cxGetResourceString(@sdxSubjectLabelCaption)); -end; - -function TcxSchedulerReportMemoEventCell.GetHeaderCellText: string; -var - AResource: TcxSchedulerStorageResourceItem; -begin - AResource := Event.GetResourceItem; - if AResource <> nil then - Result := AResource.Name - else - Result := dxPSUtl.GetUserName; -end; - -function TcxSchedulerReportMemoEventCell.GetRecurrenceCellText: string; -begin - if Event.IsRecurring then - case Event.RecurrenceInfo.Recurrence of - cxreDaily: - Result := cxGetResourceString(@scxRecurrenceDailyMessage); - cxreWeekly: - Result := cxGetResourceString(@scxRecurrenceWeeklyMessage); - cxreMonthly: - Result := cxGetResourceString(@scxRecurrenceMonthlyMessage); - cxreYearly: - Result := cxGetResourceString(@scxRecurrenceYearlyMessage); - else - Result := ''; - end - else - Result := cxGetResourceString(@sdxRecurrenceNoneMessage); -end; - -function TcxSchedulerReportMemoEventCell.GetRecurrencePatternCellText: string; -begin - if Event.IsRecurring and Assigned(cxGetRecurrenceDescriptionStringProc) then - Result := cxGetRecurrenceDescriptionStringProc(Event.RecurrenceInfo) - else - Result := ''; -end; - -function TcxSchedulerReportMemoEventCell.GetShowTimeAsCellText: string; -begin - case Event.State of - tlsFree: - Result := cxGetResourceString(@sdxShowTimeAsFreeMessage); - tlsTentative: - Result := cxGetResourceString(@sdxShowTimeAsTentativeMessage); - tlsOutOfOffice: - Result := cxGetResourceString(@sdxShowTimeAsOutOfOfficeMessage); - else - Result := ''; - end; -end; - -{ TcxSchedulerReportCommonCellsProducer } - -constructor TcxSchedulerReportCommonCellsProducer.CreateEx( - AStyle: TcxCustomSchedulerReportLinkPrintStyle; - ASite: TcxSchedulerReportSchedulingAreaCell); -begin - inherited Create(AStyle.GetCorrespondedView); - FStyle := AStyle; - FSite := ASite; -end; - -procedure TcxSchedulerReportCommonCellsProducer.GetPageResources( - AResources: TcxObjectList); -var - ResPerPage, APageIndex, I, J: Integer; -begin - ResPerPage := Style.ResourceCountPerPage; - if Resources = nil then Exit; - if (ResPerPage <= 0) or (ResPerPage >= Resources.VisibleResourceCount) then - begin - for I := 0 to Resources.VisibleResourceCount - 1 do - begin - AResources.Add(TcxSchedulerResourceViewInfo.Create( - Resources.VisibleResources[I])); - end; - Exit; - end; - APageIndex := (Site.PageIndex div PagesPerWeek) mod Style.GetResourcePageCount; - I := ResPerPage * APageIndex; - J := Min(ResPerPage * (APageIndex + 1), Resources.VisibleResourceCount); - while I < J do - begin - AResources.Add(TcxSchedulerResourceViewInfo.Create( - Resources.VisibleResources[I])); - I := I + 1; - end; -end; - -procedure TcxSchedulerReportCommonCellsProducer.Produce; -begin - Calculate; -end; - -procedure TcxSchedulerReportCommonCellsProducer.AfterCalculatePage; -var - I, J: Integer; - ASubList: TcxSchedulerViewInfoCellList; - AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass; - AEventCell: TcxSchedulerReportEventCell; -begin - for I := 0 to Cells.Count - 1 do - begin - ASubList := TcxSchedulerViewInfoCellList(Cells[I]); - for J := 0 to ASubList.Count - 1 do - begin - AItem := ASubList[J]; - if AItem.Visible then - begin - if AItem is TcxSchedulerEventCellViewInfo then - begin - AEventCell := CreateEventCell(TcxSchedulerEventCellViewInfo(AItem)); - Style.ReportLink.DoInitializeEventCell(AEventCell); - end - else - if FindMirorClassForItem(AItem, AReportItemClass) then - ConvertSchedulerCellToPSCells(AItem, AReportItemClass); - end; - end; - end; -end; - -function TcxSchedulerReportCommonCellsProducer.CanCalculate: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportCommonCellsProducer.CreateEventCell( - AEventViewInfo: TcxSchedulerEventCellViewInfo): TcxSchedulerReportEventCell; -begin - Result := TcxSchedulerReportEventCell.CreateFrom(Site, AEventViewInfo); -end; - -procedure TcxSchedulerReportCommonCellsProducer.ConvertSchedulerCellToPSCells( - AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); -var - APSItem: TcxSchedulerReportCustomCell; -begin - APSItem := AReportItemClass.CreateFrom(FSite, AItem); - SetCellViewParams(APSItem, AItem.ViewParams); -end; - -procedure TcxSchedulerReportCommonCellsProducer.DoInitialize( - var ASelectedDays: TcxSchedulerDateList; var AEvents: TcxSchedulerCachedEventList); -begin - ASelectedDays := Site.VisibleDays; - AEvents := Style.Events; -end; - -function TcxSchedulerReportCommonCellsProducer.GetCompressWeekends: Boolean; -begin - Result := Style.CompressWeekends; -end; - -function TcxSchedulerReportCommonCellsProducer.GetDontPrintWeekEnds: Boolean; -begin - Result := Style.DontPrintWeekends; -end; - -function TcxSchedulerReportCommonCellsProducer.GetHideSelection: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPageBounds: TRect; -begin - Result := Site.GetInnerBounds(0); -end; - -function TcxSchedulerReportCommonCellsProducer.GetPagesPerWeek: Byte; -begin - Result := Integer(Style.Layout) + 1; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPrintExactlyOneMonth: Boolean; -begin - Result := (Style is TcxSchedulerReportLinkMonthlyPrintStyle) and - TcxSchedulerReportLinkMonthlyPrintStyle(Style).PrintExactlyOneMonthPerPage; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPrintRange( - Index: Integer): TDateTime; -begin - if Index = 0 then - Result := Style.TimePrintFrom - else - Result := Style.TimePrintTo; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPrimaryPage: Boolean; -begin - Result := Site.PrimaryPage; -end; - -function TcxSchedulerReportCommonCellsProducer.GetStylesAdapter: IcxSchedulerStylesAdapter; -begin - Result := Styles; -end; - -procedure TcxSchedulerReportCommonCellsProducer.SetCellViewParams( - ACell: TdxReportVisualItem; const AParams: TcxViewParams); -begin - Site.SetCellViewParams(ACell, AParams); - if Style.ReportLink.OptionsFormatting.SuppressContentColoration then - if ACell is TcxSchedulerReportCustomCell then - TcxSchedulerReportCustomCell(ACell).SuppressColoration; -end; - -function TcxSchedulerReportCommonCellsProducer.GetStyles: TcxSchedulerReportLinkStyles; -begin - Result := Style.VisualStyles; -end; - -{ TcxSchedulerReportDailyCellsProducer } - -procedure TcxSchedulerReportDailyCellsProducer.AfterCalculatePage; -begin - FRulerSite := CreateTimeRulerSite; - SetCellViewParams(FRulerSite, Styles.GetTimeRulerParams); -{ FRulerSite.Transparent := - Style.ReportLink.OptionsFormatting.SuppressContentColoration;} - inherited AfterCalculatePage; -end; - -procedure TcxSchedulerReportDailyCellsProducer.BeforeCalculatePage; -begin - Site.CellSides := csAll; - inherited BeforeCalculatePage; -end; - -procedure TcxSchedulerReportDailyCellsProducer.ConvertSchedulerCellToPSCells( - AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); -begin - if AReportItemClass = TcxSchedulerReportDailyTimeRulerCell then - SetCellViewParams(AReportItemClass.CreateFrom(FRulerSite, AItem), AItem.ViewParams) - else - inherited ConvertSchedulerCellToPSCells(AItem, AReportItemClass); -end; - -function TcxSchedulerReportDailyCellsProducer.CreateTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; -begin - Result := TcxSchedulerReportDailyTimeRulerCellsSite.Create(FSite); - Result.Transparent := True; - Result.ClipChildren := True; -end; - -{ TcxSchedulerReportYearlyCellsProducer } - -procedure TcxSchedulerReportYearlyCellsProducer.Produce; -var - AIndex: Integer; -begin - AIndex := Site.PageIndex; - if Style.MonthCountPerPage <> 12 then - begin - AIndex := AIndex div (Byte(Style.Layout) + 1); - FFirstMonth := (AIndex * Style.MonthCountPerPage) mod 12 + 1 - end - else - FFirstMonth := 1; - inherited Produce; -end; - -function TcxSchedulerReportYearlyCellsProducer.GetDayCountPerPage: Integer; -begin - Result := MaxYearViewWeekDays; - if Style.Layout = pslTwoPages then - begin - if IsPrimaryPage then - Result := cxYearStyleDaysOnPrimaryPage - else - Result := Result - cxYearStyleDaysOnPrimaryPage; - end; -end; - -function TcxSchedulerReportYearlyCellsProducer.GetMonthCount: Integer; -begin - Result := Style.MonthCountPerPage; -end; - -function TcxSchedulerReportYearlyCellsProducer.GetFirstMonth: Integer; -begin - Result := FFirstMonth; -end; - -function TcxSchedulerReportYearlyCellsProducer.GetShowMonthHeaders: Boolean; -const - Dividers: array[TcxSchedulerReportLinkPeriodicPrintStyleLayout] of Integer = (1, 2); -begin - Result := not Style.PrimaryPageHeadersOnly or - (Site.PageIndex mod Style.PeriodPageCount mod Dividers[Style.Layout] = 0); -end; - -function TcxSchedulerReportYearlyCellsProducer.GetShowWeekDayHeaders: Boolean; -const - Indexes: array[TcxSchedulerReportLinkPeriodicPrintStyleLayout] of Integer = (0, 1); -begin - Result := not Style.PrimaryPageHeadersOnly or - (Site.PageIndex mod Style.PeriodPageCount <= Indexes[Style.Layout]) -end; - -function TcxSchedulerReportYearlyCellsProducer.GetStartDayIndex: Integer; -begin - Result := 0; - if (Style.Layout = pslTwoPages) and not IsPrimaryPage then - Result := cxYearStyleDaysOnPrimaryPage -end; - -function TcxSchedulerReportYearlyCellsProducer.QueryInterface( - const IID: TGUID; out Obj): HResult; stdcall; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TcxSchedulerReportYearlyCellsProducer._AddRef: Integer; -begin - Result := -1; -end; - -function TcxSchedulerReportYearlyCellsProducer._Release: Integer; -begin - Result := -1; -end; - -function TcxSchedulerReportYearlyCellsProducer.GetIsPrimaryPage: Boolean; -begin - Result := Site.PageIndex mod 2 = 0; -end; - -function TcxSchedulerReportYearlyCellsProducer.GetStyle: TcxSchedulerReportLinkYearlyPrintStyle; -begin - Result := TcxSchedulerReportLinkYearlyPrintStyle(inherited Style); -end; - -// registration unit part - -procedure RegisterMirrorClasses; -begin - MirrorClasses := TList.Create; - TcxSchedulerReportContentCell.RegisterMirrorClass; - TcxSchedulerReportHeaderItemCell.RegisterMirrorClass; - TcxSchedulerReportGroupSeparatorCell.RegisterMirrorClass; - TcxSchedulerReportContainerCell.RegisterMirrorClass; - TcxSchedulerReportDailyTimeRulerCell.RegisterMirrorClass; -// TcxSchedulerReportEventCell.RegisterMirrorClass; - TcxSchedulerReportMonthDayCell.RegisterMirrorClass; - TcxSchedulerReportBackgroundSlotCell.RegisterMirrorClass; -end; - -procedure UnRegisterMirrorClasses; -begin - MirrorClasses.Free; -end; - -function GetFontFolder : string; -var - APIDL: PItemIDList; - APath: array[0..MAX_PATH] of Char; - AMalloc: IMalloc; -begin - Result := ''; - if ShGetSpecialFolderLocation(Application.Handle, CSIDL_FONTS, APIDL) = S_OK then - begin - if ShGetPathFromIDList(APIDL, APath) then - Result := APath; - if Succeeded(SHGetMalloc(AMalloc)) then - AMalloc.Free(APIDL); - end; -end; - -procedure RegisterReportLinkClasses; -begin - RegisterClasses([TcxSchedulerReportLinkStyles]); - - TcxSchedulerReportSchedulingAreaCell.Register; - TcxSchedulerReportNotesAreaCell.Register; - TcxSchedulerReportTaskPadCell.Register; - TcxSchedulerReportSchedulerHeaderCell.Register; - TcxSchedulerReportSchedulerHeaderDataCell.Register; - - //datenavigator - TcxSchedulerReportDateNavigatorCell.Register; - TcxSchedulerReportDateNavigatorHeader.Register; - TcxSchedulerReportDateNavigatorDay.Register; - TcxSchedulerReportDateNavigatorDayCaption.Register; - TcxSchedulerReportDateNavigatorWeekNumber.Register; - - //scheduling area items - TcxSchedulerReportContentCell.Register; - TcxSchedulerReportHeaderItemCell.Register; - TcxSchedulerReportGroupSeparatorCell.Register; - TcxSchedulerReportContainerCell.Register; - TcxSchedulerReportBackgroundSlotCell.Register; - TcxSchedulerReportDailyTimeRulerCellsSite.Register; - TcxSchedulerReportDailyTimeRulerCell.Register; - TcxSchedulerReportMonthDayCell.Register; - - TcxSchedulerReportCellString.Register; - TcxSchedulerReportEventCell.Register; - TcxSchedulerReportDetailsEventCell.Register; - TcxSchedulerReportMemoEventCell.Register; - - TcxSchedulerReportTimeLineCell.Register; - TcxSchedulerReportTimeLinePart.Register; - - TcxSchedulerReportPageSite.Register; - - dxPSRegisterReportLink(TcxSchedulerReportLink, - TcxScheduler, TcxfmSchedulerReportLinkDesignWindow); -end; - -type - TAddFontMemResource = function (p1: Pointer; p2: DWORD; p3: PDesignVector; p4: LPDWORD): THandle; stdcall; - TRemoveFontMemResource = function (p1: THandle): BOOL; stdcall; - -var - GDI32Lib: HMODULE; - AddFontMemResource: TAddFontMemResource; - RemoveFontMemResource: TRemoveFontMemResource; - -procedure InitializeSchedulerLink; - - function LoadImagesFromResource(AWidth, AHeight: Integer; - const AResourceName: string): TImageList; - begin - Result := TImageList.Create(nil); - Result.Width := AWidth; - Result.Height := AHeight; - Result.Handle := ImageList_LoadImage(HInstance, PAnsiChar(AResourceName), AWidth, - AHeight, CLR_DEFAULT, IMAGE_BITMAP, LR_DEFAULTCOLOR); - end; - -var - Res : TResourceStream; - Count: DWORD; -begin - RegisterMirrorClasses; - // images loading - StyleImages := LoadImagesFromResource(58, 31, IDB_DXPSSCHEDULER_SMALLDESIGNPREVIEW); - StylePreviewImages := LoadImagesFromResource(128, 76, IDB_DXPSSCHEDULER_STYLEDESIGNPREVIEW); - - // font loading - GDI32Lib := LoadLibrary(gdi32); - AddFontMemResource := GetProcAddress(GDI32Lib, 'AddFontMemResourceEx'); - RemoveFontMemResource := GetProcAddress(GDI32Lib, 'RemoveFontMemResourceEx'); - Res := TResourceStream.Create(hInstance, 'SCHEDULERFONT', 'PSSCHEDULERFONT'); - try - if IsWin2KOrLater then - SchedulerFontHandle := AddFontMemResource(Res.Memory, Res.Size, nil, @Count) - else - begin - SchedulerFontFileName := GetFontFolder + '\' + 'dxPScxSchedulerLnk.ttf'; - if not FileExists(SchedulerFontFileName) then - Res.SavetoFile(SchedulerFontFileName); - AddFontResource(PChar(SchedulerFontFileName)); - end; - finally - Res.Free; - end; - SpecialSymbolFont := TFont.Create; - SpecialSymbolFont.Name := 'dxPScxScheduler'; - RegisterReportLinkClasses; -end; - -procedure UnregisterReportLinkClasses; -begin - TcxSchedulerReportSchedulingAreaCell.Unregister; - TcxSchedulerReportNotesAreaCell.Unregister; - TcxSchedulerReportTaskPadCell.Unregister; - TcxSchedulerReportSchedulerHeaderCell.Unregister; - TcxSchedulerReportSchedulerHeaderDataCell.Unregister; - //datenavigator - TcxSchedulerReportDateNavigatorCell.Unregister; - TcxSchedulerReportDateNavigatorHeader.Unregister; - TcxSchedulerReportDateNavigatorDay.Unregister; - TcxSchedulerReportDateNavigatorDayCaption.Unregister; - TcxSchedulerReportDateNavigatorWeekNumber.Unregister; - - //scheduling area items - TcxSchedulerReportContentCell.Unregister; - TcxSchedulerReportHeaderItemCell.Unregister; - TcxSchedulerReportGroupSeparatorCell.Unregister; - TcxSchedulerReportContainerCell.Unregister; - TcxSchedulerReportBackgroundSlotCell.Unregister; - TcxSchedulerReportDailyTimeRulerCellsSite.Unregister; - TcxSchedulerReportDailyTimeRulerCell.Unregister; - TcxSchedulerReportMonthDayCell.Unregister; - - TcxSchedulerReportCellString.Unregister; - TcxSchedulerReportEventCell.Unregister; - TcxSchedulerReportDetailsEventCell.Unregister; - TcxSchedulerReportMemoEventCell.Unregister; - - TcxSchedulerReportTimeLineCell.Unregister; - TcxSchedulerReportTimeLinePart.Unregister; - - TcxSchedulerReportPageSite.Unregister; - - dxPSUnregisterReportLink(TcxSchedulerReportLink, - TcxScheduler, TcxfmSchedulerReportLinkDesignWindow); - UnRegisterClasses([TcxSchedulerReportLinkStyles]); - UnRegisterMirrorClasses; -end; - -procedure FinalizeSchedulerLink; -begin - // images removing - FreeAndNil(StyleImages); - FreeAndNil(StylePreviewImages); - - // font removing - if IsWin2KOrLater then - begin - if SchedulerFontHandle <> 0 then - RemoveFontMemResource(SchedulerFontHandle); - end - else - begin - if RemoveFontResource(PChar(SchedulerFontFileName)) then - DeleteFile(PChar(SchedulerFontFileName)); - end; - - SpecialSymbolFont.Free; - FreeLibrary(GDI32Lib); - - UnregisterReportLinkClasses; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrimaryPageHeadersOnlyClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - TcxSchedulerReportLinkYearlyPrintStyle(ActivePrintStyle). - PrimaryPageHeadersOnly := TcxCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleShowResourceImagesClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ActivePrintStyle.ShowResourceImages := TcxCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleShowEventImagesClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ActivePrintStyle.ShowEventImages := TcxCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -initialization - InitializeSchedulerLink; - -finalization - FinalizeSchedulerLink; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler2LnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler2LnkReg.pas deleted file mode 100644 index 614d491f..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler2LnkReg.pas +++ /dev/null @@ -1,165 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxScheduler2LnkReg; - -interface - -{$I cxVer.Inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes, TypInfo, cxStyles, cxStyleSheetEditor, dxPSCore, dxPScxScheduler2Lnk; - -const - sdxAllResources = '(All resources)'; - sdxAuto = 'Auto'; - sdxDefault = 'Default'; - sdxTypeDefault = '(Type "Default" to restore original Caption)'; - -{ TcxSchedulerReportLinkActiveStylePropertyEditor } - -type - - TcxSchedulerReportLinkResourceCountPerPagePropertyEditor = class(TIntegerProperty) - public - function GetValue: string; override; - end; - - { TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor } - - TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor = class(TComponentProperty) - private - FComponents: TStringList; - function GetReportLink: TBasedxReportLink; - protected - procedure AddComponent(const AName: string); - procedure GetComponents; virtual; - function IsComponentValid(AComponent: TComponent): Boolean; virtual; - public - destructor Destroy; override; - procedure Initialize; override; - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - property ReportLink: TBasedxReportLink read GetReportLink; - end; - -{ TcxSchedulerReportLinkResourceCountPerPagePropertyEditor } - -function TcxSchedulerReportLinkResourceCountPerPagePropertyEditor.GetValue: string; -begin - Result := inherited GetValue; - if GetOrdValue = 0 then - Result := Result + ' ' + sdxAllResources; -end; - -{ TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor } - -destructor TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.Destroy; -begin - FComponents.Free; - inherited Destroy; -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.Initialize; -begin - inherited; - FComponents := TStringList.Create; -end; - -function TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes - [paMultiSelect]; -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - GetComponents; - for I := 0 to FComponents.Count - 1 do - Proc(FComponents[I]); -end; - -function TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetReportLink: TBasedxReportLink; -begin - Result := TBasedxReportLink(GetComponent(0)); -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.AddComponent(const AName: string); -begin - if IsComponentValid(Designer.GetComponent(AName)) then FComponents.Add(AName); -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetComponents; -begin - FComponents.Clear; - Designer.GetComponentNames(GetTypeData(PTypeInfo(TBasedxReportLink.ClassInfo)), AddComponent); -end; - -function TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.IsComponentValid(AComponent: TComponent): Boolean; -begin - Result := (AComponent <> GetComponent(0)) and TBasedxReportLink(AComponent).Aggregable; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterNoIcon([TcxSchedulerReportLink, TcxSchedulerReportLinkStyleSheet]); - - RegisterPropertyEditor(TypeInfo(Integer), TcxCustomSchedulerReportLinkPrintStyle, - 'ResourceCountPerPage', TcxSchedulerReportLinkResourceCountPerPagePropertyEditor); - RegisterPropertyEditor(TypeInfo(TBasedxReportLink), TcxSchedulerReportLink, - 'TaskPadReportLink', TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor); -end; - -initialization - cxStyles.RegisterStyleSheetClass(TcxSchedulerReportLinkStyleSheet); - -finalization - cxStyles.UnregisterStyleSheetClass(TcxSchedulerReportLinkStyleSheet); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3Lnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3Lnk.dfm deleted file mode 100644 index 664ea869..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3Lnk.dfm +++ /dev/null @@ -1,1884 +0,0 @@ -object cxfmSchedulerReportLinkDesignWindow: TcxfmSchedulerReportLinkDesignWindow - Left = 349 - Top = 267 - BorderStyle = bsDialog - Caption = 'cxfmSchedulerReportLinkDesignWindow' - ClientHeight = 487 - ClientWidth = 618 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 610 - Height = 445 - ActivePage = tshPrintStyles - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - OnChange = PageControl1Change - object tshPrintRange: TTabSheet - Caption = 'Print Range' - ImageIndex = 3 - object lblPrintRangeStart: TLabel - Left = 17 - Top = 22 - Width = 28 - Height = 13 - Caption = '&Start:' - end - object lblPrintRangeEnd: TLabel - Left = 18 - Top = 54 - Width = 22 - Height = 13 - Caption = '&End:' - end - object lblPrintRangesMiscellaneous: TLabel - Left = 5 - Top = 91 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - Visible = False - end - object Bevel1: TBevel - Left = 80 - Top = 95 - Width = 231 - Height = 4 - Shape = bsBottomLine - Visible = False - end - object dePrintRangeStart: TcxDateEdit - Left = 70 - Top = 18 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeStartEditValueChanged - TabOrder = 0 - Width = 235 - end - object dePrintRangeEnd: TcxDateEdit - Left = 70 - Top = 50 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeEndEditValueChanged - TabOrder = 1 - Width = 235 - end - object chbxHideDetailsOfPrivateAppointments: TcxCheckBox - Left = 66 - Top = 113 - Caption = 'Hide Details of Private Appointments' - TabOrder = 2 - Visible = False - Width = 236 - end - end - object tshPrintStyles: TTabSheet - Caption = 'Print Styles' - object lblPrintStylesOptions: TLabel - Left = 5 - Top = 48 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPrintStyleOptions: TBevel - Left = 50 - Top = 52 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewWindow: TStaticText - Left = 324 - Top = 0 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 0 - end - object cbxPrintStyles: TcxImageComboBox - Left = 6 - Top = 7 - Properties.Alignment.Vert = taVCenter - Properties.Items = <> - TabOrder = 1 - OnClick = cbxPrintStylesClick - Width = 303 - end - object pcPrintStyleOptions: TPageControl - Left = 4 - Top = 64 - Width = 314 - Height = 348 - ActivePage = tshTimeLine - Style = tsButtons - TabOrder = 2 - TabStop = False - object tshDaily: TTabSheet - Caption = 'Daily' - TabVisible = False - object lblPrintStyleDailyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleDailyLayout - end - object lblPrintStyleDailyInclude: TLabel - Left = 14 - Top = 64 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleDailyPrintFrom: TLabel - Left = 14 - Top = 136 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleDailyPrintFrom - end - object lblPrintStyleDailyPrintTo: TLabel - Left = 14 - Top = 165 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleDailyPrintTo - end - object lblPrintStyleDailyResourceCountPerPage: TLabel - Left = 14 - Top = 34 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleDailyResourceCountPerPage - end - object Bevel2: TBevel - Left = 32 - Top = 194 - Width = 274 - Height = 4 - Shape = bsBottomLine - end - object lbViewDaily: TLabel - Left = 1 - Top = 190 - Width = 22 - Height = 13 - Caption = 'View' - end - object Bevel7: TBevel - Left = 48 - Top = 237 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object lbImagesDaily: TLabel - Left = 3 - Top = 232 - Width = 38 - Height = 13 - Caption = 'Images ' - end - object cbxPrintStyleDailyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 0 - OnClick = cbxPrintStyleDailyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleDailyTaskPad: TcxCheckBox - Left = 111 - Top = 61 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleDailyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 82 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleDailyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 103 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object tePrintStyleDailyPrintFrom: TcxTimeEdit - Left = 114 - Top = 132 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 5 - Width = 100 - end - object tePrintStyleDailyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 161 - EditValue = 0.000000000000000000 - Properties.ImmediatePost = True - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 6 - Width = 100 - end - object sePrintStyleDailyResourceCountPerPage: TcxSpinEdit - Left = 115 - Top = 30 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - Width = 100 - end - object chbxPrintStyleDailyShowResourceImages: TcxCheckBox - Left = 15 - Top = 206 - Caption = 'Show resource images' - TabOrder = 7 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - object chbxPrintStyleDailyShowEventImages: TcxCheckBox - Left = 15 - Top = 251 - Caption = 'Show event images' - TabOrder = 8 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - end - object tshWeekly: TTabSheet - Caption = 'Weekly' - ImageIndex = 1 - TabVisible = False - object lblPrintStyleWeeklyPrintTo: TLabel - Left = 14 - Top = 218 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleWeeklyPrintTo - end - object lblPrintStyleWeeklyPrintFrom: TLabel - Left = 14 - Top = 189 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleWeeklyPrintFrom - end - object lblPrintStyleWeeklyInclude: TLabel - Left = 14 - Top = 119 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleWeeklyLayout: TLabel - Left = 14 - Top = 33 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleWeeklyLayout - end - object lblPrintStyleWeeklyArrange: TLabel - Left = 14 - Top = 4 - Width = 43 - Height = 13 - Caption = '&Arrange:' - FocusControl = cbxPrintStyleWeeklyArrange - end - object lblPrintStyleWeeklyResourceCountPerPage: TLabel - Left = 14 - Top = 94 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleWeeklyResourceCountPerPage - end - object lblPrintStyleWeeklyDaysLayout: TLabel - Left = 14 - Top = 63 - Width = 61 - Height = 13 - Caption = '&Days layout:' - FocusControl = cbxPrintStyleWeeklyDaysLayout - end - object Bevel3: TBevel - Left = 32 - Top = 245 - Width = 274 - Height = 4 - Shape = bsBottomLine - end - object Label5: TLabel - Left = 1 - Top = 241 - Width = 22 - Height = 13 - Caption = 'View' - end - object Bevel8: TBevel - Left = 48 - Top = 287 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object Label6: TLabel - Left = 3 - Top = 282 - Width = 38 - Height = 13 - Caption = 'Images ' - end - object tePrintStyleWeeklyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 213 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 8 - Width = 100 - end - object tePrintStyleWeeklyPrintFrom: TcxTimeEdit - Left = 114 - Top = 184 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 7 - Width = 100 - end - object chbxPrintStyleWeeklyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 158 - Caption = 'Notes Area (&Lined)' - TabOrder = 6 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleWeeklyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 137 - Caption = 'Notes Area (&Blank)' - TabOrder = 5 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object cbxPrintStyleWeeklyArrange: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Top to Bottom' - 'Left to Right') - TabOrder = 0 - OnClick = cbxPrintStyleWeeklyArrangeClick - Height = 23 - Width = 186 - end - object cbxPrintStyleWeeklyLayout: TcxComboBox - Left = 115 - Top = 29 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 1 - OnClick = cbxPrintStyleWeeklyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleWeeklyTaskPad: TcxCheckBox - Left = 111 - Top = 116 - Caption = 'TaskPad' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleWeeklyDontPrintWeekends: TcxCheckBox - Left = 15 - Top = 257 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 9 - OnClick = chbxPrintStyleWeeklyDontPrintWeekendsClick - Width = 285 - end - object sePrintStyleWeeklyResourceCountPerPage: TcxSpinEdit - Tag = 1 - Left = 115 - Top = 90 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 3 - Width = 100 - end - object cbxPrintStyleWeeklyDaysLayout: TcxComboBox - Left = 115 - Top = 59 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Two columns' - 'One column') - TabOrder = 2 - OnClick = cbxPrintStyleWeeklyDaysLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleWeeklyShowEventImages: TcxCheckBox - Left = 15 - Top = 320 - Caption = 'Show Event Images' - TabOrder = 11 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - object chbxPrintStyleWeeklyShowResourceImages: TcxCheckBox - Left = 15 - Top = 299 - Caption = 'Show Resource Images' - TabOrder = 10 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - end - object tshMonthly: TTabSheet - Caption = 'Monthly' - ImageIndex = 2 - TabVisible = False - object lblPrintStyleMonthlyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleMonthlyLayout - end - object lblPrintStyleMonthlyInclude: TLabel - Left = 14 - Top = 62 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleMonthlyResourceCountPerPage: TLabel - Left = 14 - Top = 34 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleMonthlyResourceCountPerPage - end - object Bevel9: TBevel - Left = 32 - Top = 129 - Width = 274 - Height = 4 - Shape = bsBottomLine - end - object Label7: TLabel - Left = 1 - Top = 125 - Width = 22 - Height = 13 - Caption = 'View' - end - object Bevel10: TBevel - Left = 48 - Top = 191 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object Label8: TLabel - Left = 3 - Top = 186 - Width = 38 - Height = 13 - Caption = 'Images ' - end - object cbxPrintStyleMonthlyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/month' - '2 pages/month') - TabOrder = 0 - OnClick = cbxPrintStyleMonthlyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleMonthlyTaskPad: TcxCheckBox - Left = 111 - Top = 59 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 80 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 101 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyDontPrintWeekends: TcxCheckBox - Left = 15 - Top = 141 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 5 - OnClick = chbxPrintStyleDontPrintWeekEndsClick - Width = 285 - end - object chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage: TcxCheckBox - Left = 15 - Top = 162 - Caption = 'Print Exactly One Month Per Page' - TabOrder = 6 - OnClick = chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick - Width = 285 - end - object sePrintStyleMonthlyResourceCountPerPage: TcxSpinEdit - Tag = 2 - Left = 115 - Top = 29 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - Width = 100 - end - object chbxPrintStyleMonthlyShowEventImages: TcxCheckBox - Left = 15 - Top = 224 - Caption = 'Show Event Images' - TabOrder = 7 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - object chbxPrintStyleMonthlyShowResourceImages: TcxCheckBox - Left = 15 - Top = 203 - Caption = 'Show Resource Images' - TabOrder = 8 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - end - object tshTrifold: TTabSheet - Caption = 'Tri-fold' - ImageIndex = 3 - TabVisible = False - object lblPrintStyleTrifoldSectionLeft: TLabel - Left = 14 - Top = 4 - Width = 61 - Height = 13 - Caption = '&Left Section:' - FocusControl = cbxPrintStyleTrifoldSectionLeft - end - object lblPrintStyleTrifoldSectionMiddle: TLabel - Left = 14 - Top = 38 - Width = 72 - Height = 13 - Caption = '&Middle Section:' - FocusControl = cbxPrintStyleTrifoldSectionMiddle - end - object lblPrintStyleTrifoldSectionRight: TLabel - Left = 14 - Top = 71 - Width = 67 - Height = 13 - Caption = '&Right Section:' - FocusControl = cbxPrintStyleTrifoldSectionRight - end - object cbxPrintStyleTrifoldSectionLeft: TcxComboBox - Left = 100 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 0 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - object cbxPrintStyleTrifoldSectionMiddle: TcxComboBox - Tag = 1 - Left = 100 - Top = 33 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 1 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - object cbxPrintStyleTrifoldSectionRight: TcxComboBox - Tag = 2 - Left = 100 - Top = 66 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 2 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - end - object tshDetails: TTabSheet - Caption = 'Details' - ImageIndex = 4 - TabVisible = False - object chbxPrintStyleDetailsUsePagination: TcxCheckBox - Left = 14 - Top = 0 - Caption = 'Start a New Page Each:' - TabOrder = 0 - OnClick = chbxPrintStyleDetailsUsePaginationClick - Width = 187 - end - object cbxPrintStyleDetailsPagination: TcxComboBox - Left = 203 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Day' - 'Week' - 'Month') - TabOrder = 1 - OnClick = cbxPrintStyleDetailsPaginationClick - Height = 23 - Width = 98 - end - end - object tshMemo: TTabSheet - Caption = 'Memo' - ImageIndex = 5 - TabVisible = False - object chbxPrintStyleMemoStartEachItemOnNewPage: TcxCheckBox - Left = 14 - Top = 0 - Caption = 'Start Each Item On New Page' - TabOrder = 0 - OnClick = chbxPrintStyleMemoStartEachItemOnNewPageClick - Width = 187 - end - object chbxPrintStyleMemoPrintOnlySelectedEvents: TcxCheckBox - Left = 14 - Top = 22 - Caption = 'Print Only Selected Events' - State = cbsChecked - TabOrder = 1 - OnClick = chbxPrintStyleMemoPrintOnlySelectedEventsClick - Width = 187 - end - end - object tshYearly: TTabSheet - Caption = 'Yearly' - ImageIndex = 6 - TabVisible = False - object lblPrintStyleYearlyMonthPerPage: TLabel - Left = 14 - Top = 38 - Width = 67 - Height = 13 - Caption = '&Months/Page:' - FocusControl = cbxPrintStyleYearlyMonthPerPage - end - object lblPrintStyleYearlyResourceCountPerPage: TLabel - Left = 14 - Top = 72 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleYearlyResourceCountPerPage - Visible = False - end - object lblPrintStyleYearlyInclude: TLabel - Left = 14 - Top = 102 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleYearlyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleYearlyLayout - end - object Bevel4: TBevel - Left = 32 - Top = 171 - Width = 274 - Height = 4 - Shape = bsBottomLine - end - object Label9: TLabel - Left = 1 - Top = 167 - Width = 22 - Height = 13 - Caption = 'View' - end - object Bevel5: TBevel - Left = 48 - Top = 216 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object Label10: TLabel - Left = 3 - Top = 211 - Width = 38 - Height = 13 - Caption = 'Images ' - end - object cbxPrintStyleYearlyMonthPerPage: TcxComboBox - Left = 115 - Top = 33 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/year' - '2 pages/year' - '3 pages/year' - '4 pages/year' - '6 pages/year' - '12 pages/year') - TabOrder = 1 - Text = '12 pages/year' - OnClick = cbxPrintStyleYearlyMonthPagesPerYearClick - Height = 23 - Width = 186 - end - object sePrintStyleYearlyResourceCountPerPage: TcxSpinEdit - Tag = 3 - Left = 115 - Top = 68 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 2 - Visible = False - Width = 100 - end - object chbxPrintStyleYearlyTaskPad: TcxCheckBox - Left = 111 - Top = 99 - Caption = 'Task&Pad' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleYearlyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 120 - Caption = 'Notes Area (&Blank)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleYearlyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 141 - Caption = 'Notes Area (&Lined)' - TabOrder = 5 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object cbxPrintStyleYearlyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/month' - '2 pages/month') - TabOrder = 0 - Text = '1 page/month' - OnClick = cbxPrintStyleYearlyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrimaryPageHeadersOnly: TcxCheckBox - Left = 15 - Top = 184 - Caption = 'Primary Page Headers Only' - TabOrder = 6 - OnClick = chbxPrimaryPageHeadersOnlyClick - Width = 153 - end - object chbxPrintStyleYearlyShowEventImages: TcxCheckBox - Left = 15 - Top = 230 - Caption = 'Show Event Images' - TabOrder = 7 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - end - object tshTimeLine: TTabSheet - Caption = 'TimeLine' - ImageIndex = 7 - TabVisible = False - object lblPrintStyleTimeLineResourceCountPerPage: TLabel - Left = 14 - Top = 3 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleTimeLineResourceCountPerPage - end - object lblPrintStyleTimeLineInclude: TLabel - Left = 14 - Top = 33 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleTimeLinePrintFrom: TLabel - Left = 14 - Top = 106 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleTimeLinePrintFrom - end - object lblPrintStyleTimeLinePrintTo: TLabel - Left = 14 - Top = 135 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleTimeLinePrintTo - end - object Bevel6: TBevel - Left = 32 - Top = 165 - Width = 274 - Height = 4 - Shape = bsBottomLine - end - object bvlTimeLineImages: TBevel - Left = 48 - Top = 274 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object Label2: TLabel - Left = 1 - Top = 161 - Width = 22 - Height = 13 - Caption = 'View' - end - object lbTimeLineImages: TLabel - Left = 3 - Top = 269 - Width = 38 - Height = 13 - Caption = 'Images ' - end - object sePrintStyleTimeLineResourceCountPerPage: TcxSpinEdit - Tag = 4 - Left = 115 - Top = -1 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 0 - Width = 100 - end - object chbxPrintStyleTimeLineTaskPad: TcxCheckBox - Left = 111 - Top = 30 - Caption = 'Task&Pad' - TabOrder = 1 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleTimeLineNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 51 - Caption = 'Notes Area (&Blank)' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleTimeLineNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 72 - Caption = 'Notes Area (&Lined)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object tePrintStyleTimeLinePrintFrom: TcxTimeEdit - Left = 114 - Top = 101 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 4 - Width = 100 - end - object tePrintStyleTimeLinePrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 130 - EditValue = 0.000000000000000000 - Properties.ImmediatePost = True - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 5 - Width = 100 - end - object chbxPrintStyleTimeLineShowResourceImages: TcxCheckBox - Left = 15 - Top = 288 - Caption = 'Show Resource Images' - TabOrder = 10 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - object chbxPrintStyleTimeLineShowEventImages: TcxCheckBox - Left = 15 - Top = 309 - Caption = 'Show Event Images' - TabOrder = 11 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - object chbxPrintStyleTimeLinePrimaryPageHeadersOnly: TcxCheckBox - Left = 15 - Top = 201 - Caption = 'Primary Page Headers Only' - TabOrder = 7 - OnClick = chbxPrimaryPageHeadersOnlyClick - Width = 170 - end - object chbxPrintStyleTimeLinePrimaryPageScalesOnly: TcxCheckBox - Left = 15 - Top = 180 - Caption = 'Primary Page Scales Only' - TabOrder = 6 - OnClick = chbxPrimaryPageScalesOnlyClick - Width = 162 - end - object chbxPrintStyleTimeLineDontPrintWeekends: TcxCheckBox - Left = 15 - Top = 222 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 8 - OnClick = chbxPrintStyleDontPrintWeekEndsClick - Width = 194 - end - object chbxPrintStyleTimeLineWorkTimeOnly: TcxCheckBox - Left = 15 - Top = 243 - Caption = 'W&ork Time Only' - TabOrder = 9 - OnClick = chbxPrintStyleWorkTimeOnlyClick - Width = 194 - end - end - end - object pnlPrintStylesPreview: TPanel - Left = 323 - Top = 17 - Width = 275 - Height = 356 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 3 - object pbxPrintStylesPreview: TPaintBox - Left = 1 - Top = 1 - Width = 273 - Height = 354 - Align = alClient - OnPaint = pbxPrintStylesPreviewPaint - end - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 2 - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF78888877787807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0888877787878888877787807DDDDDDDDDDDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF0DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 75 - Top = 82 - Width = 236 - Height = 4 - Shape = bsBottomLine - end - object imgRefinements: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FAFAFAFAFA788888777CC807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0AFAFAFAFAF78888888888807DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0AFAFAFAFAF7FAFAFAFAFAF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FEFEFEFEFE7EFEFEFEFEFE07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0EFEFEFEFEF7FEFEFEFEFEF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0EFEFEFEFEF7FEFEFEFEFEF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FEFEFEFEFE7EFEFEFEFEFE07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FBFBFBFBFB7BFBFBFBFBFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FBFBFBFBFB7BFBFBFBFBFB07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDDDDDDDDDDD088887778787888887778 - 7807D088888888887888888888880DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TcxComboBox - Left = 90 - Top = 37 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.OnChange = cbxLookAndFeelPropertiesChange - TabOrder = 0 - OnClick = LookAndFeelChange - Height = 23 - Width = 215 - end - object chbxSuppressBackgroundBitmaps: TcxCheckBox - Tag = 1 - Left = 90 - Top = 104 - Caption = 'Suppress Background Textures' - TabOrder = 1 - OnClick = OptionsFormattingClick - Width = 200 - end - object chbxSuppressContentColoration: TcxCheckBox - Tag = 2 - Left = 90 - Top = 130 - Caption = 'Suppress Content Coloration' - TabOrder = 2 - OnClick = OptionsFormattingClick - Width = 200 - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 1 - object bvlStyles: TBevel - Left = 118 - Top = 13 - Width = 193 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 302 - Width = 239 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 298 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 222 - end - object Label1: TLabel - Left = 85 - Top = 140 - Width = 64 - Height = 13 - Caption = '[ Styles Site ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 0 - OnClick = btnStyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = btnStyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 2 - OnClick = btnStyleBackgroundBitmapClick - end - object cbxStyleSheets: TcxComboBox - Left = 6 - Top = 318 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 20 - Properties.OnDrawItem = cbxStyleSheetsPropertiesDrawItem - TabOrder = 3 - OnClick = cbxStyleSheetsClick - OnKeyDown = cbxStyleSheetsKeyDown - Height = 24 - Width = 305 - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 350 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 4 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 84 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 5 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 162 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 6 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 7 - OnClick = btnStylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 240 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 8 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 9 - OnClick = btnStyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 10 - OnClick = btnStyleRestoreDefaultsClick - end - object chbxUseNativeStyles: TcxCheckBox - Left = 3 - Top = 6 - TabOrder = 11 - OnClick = OptionsFormattingClick - Width = 22 - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 46 - Width = 275 - Height = 395 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object Panel1: TPanel - Left = 1 - Top = 1 - Width = 273 - Height = 393 - Align = alClient - Color = clWindow - TabOrder = 0 - object pbPreview: TPaintBox - Left = 1 - Top = 1 - Width = 271 - Height = 391 - Align = alClient - OnPaint = pbPreviewPaint - end - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 6 - Top = 441 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = btnStyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = btnStyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = btnStyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = btnStyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = btnStyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = btnStylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 34 - Top = 441 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxEditStyleController1: TcxEditStyleController - OnStyleChanged = StyleController1StyleChanged - Left = 64 - Top = 440 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3Lnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3Lnk.pas deleted file mode 100644 index 775441c2..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3Lnk.pas +++ /dev/null @@ -1,11963 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxScheduler3Lnk; - -{$I cxVer.Inc} - -interface - -uses - Windows, Classes, SysUtils, Forms, Graphics, Controls, StdCtrls, ExtCtrls, ComCtrls, - ImgList, Menus, cxGraphics, cxClasses, cxControls, cxStyles, cxLookAndFeels, cxLookAndFeelPainters, - cxScheduler, cxEdit, cxContainer, cxTextEdit, cxMaskEdit, cxDropDownEdit, - cxCalendar, cxCheckBox, cxImageComboBox, cxTimeEdit, cxSpinEdit, cxDateUtils, - dxPSCore, dxPSGlbl, dxExtCtrls, dxPScxCommon, dxPrevw, dxPgsdlg, dxPrnPg, cxSchedulerUtils, - cxSchedulerStorage, cxSchedulerCustomControls, cxSchedulerCustomResourceView, - cxSchedulerDayView, cxSchedulerDateNavigator, cxSchedulerWeekView, cxSchedulerTimeGridView, - cxSchedulerYearView, cxSchedulerGanttView, cxGeometry, cxDrawTextUtils; - -const - // visual print style indexes - - vspsSchedulerFirst = 0; - - vspsSchedulerControlFirst = vspsSchedulerFirst + 0; - vspsSchedulerContent = vspsSchedulerControlFirst + 0; - vspsSchedulerDayHeader = vspsSchedulerControlFirst + 1; - vspsSchedulerEvent = vspsSchedulerControlFirst + 2; - vspsSchedulerResourceHeader = vspsSchedulerControlFirst + 3; - vspsSchedulerControlLast = vspsSchedulerControlFirst + 3; - - vspsSchedulerViewDayFirst = vspsSchedulerControlLast + 1; - vspsSchedulerTimeRuler = vspsSchedulerViewDayFirst + 0; - vspsSchedulerViewDayLast = vspsSchedulerViewDayFirst + 0; - - vspsSchedulerDateNavigatorFirst = vspsSchedulerViewDayLast + 1; - vspsSchedulerDateNavigatorContent = vspsSchedulerDateNavigatorFirst + 0; - vspsSchedulerDateNavigatorHeader = vspsSchedulerDateNavigatorFirst + 1; - vspsSchedulerDateNavigatorLast = vspsSchedulerDateNavigatorFirst + 1; - - vspsSchedulerNativeFirst = vspsSchedulerDateNavigatorLast + 1; - vspsSchedulerSchedulerHeader = vspsSchedulerNativeFirst + 0; - vspsSchedulerNotesAreaBlank = vspsSchedulerNativeFirst + 1; - vspsSchedulerNotesAreaLined = vspsSchedulerNativeFirst + 2; - vspsSchedulerTaskPad = vspsSchedulerNativeFirst + 3; - vspsSchedulerNativeLast = vspsSchedulerNativeFirst + 3; - - vspsSchedulerLast = vspsSchedulerNativeLast; - - // custom draw ID's - cdidSchedulerFirst = 1; - cdidSchedulerSchedulerHeader = cdidSchedulerFirst + 0; - cdidSchedulerDateNavigatorHeader = cdidSchedulerFirst + 1; - cdidSchedulerDateNavigatorDay = cdidSchedulerFirst + 2; - cdidSchedulerDateNavigatorDayCaption = cdidSchedulerFirst + 3; - cdidSchedulerDateNavigatorWeekNumber = cdidSchedulerFirst + 4; - cdidSchedulerTimeRuler = cdidSchedulerFirst + 5; - cdidSchedulerNotesArea = cdidSchedulerFirst + 6; - cdidSchedulerTaskPad = cdidSchedulerFirst + 7; - cdidSchedulerContent = cdidSchedulerFirst + 8; - cdidSchedulerHeader = cdidSchedulerFirst + 9; - // keep order - cdidSchedulerEventCaption = cdidSchedulerFirst + 10; - cdidSchedulerEventStart = cdidSchedulerFirst + 11; - cdidSchedulerEventFinish = cdidSchedulerFirst + 12; - cdidSchedulerEventIcons = cdidSchedulerFirst + 13; - cdidSchedulerEventMessage = cdidSchedulerFirst + 14; - cdidSchedulerEventTimeLine = cdidSchedulerFirst + 15; - - InterAreaSpace = 5; - NotesAreaWidth = 1 / 3; - SchedulerHeaderMinHeight = 1 / 10; - SchedulerHeaderMaxHeight = 1 / 4; - SchedulerHeaderSmallHeight = 1 / 18; - -type - TcxSchedulerReportItemsType = (srSchedulingArea, srHeader, srDateNavigator, - srNotesBlank, srNotesLined, srTaskPad, srUnknownItem); - TcxSchedulerReportEventPartType = (epCaption, epStart, epFinish, epIcons, - epMessage, epTimeLine); - - TcxfmSchedulerReportLinkDesignWindow = class; - - TcxSchedulerReportLink = class; - TcxCustomSchedulerReportLinkPrintStyle = class; - TcxCustomSchedulerReportLinkPrintStyleClass = class of TcxCustomSchedulerReportLinkPrintStyle; - - TcxSchedulerReportLinkPrintStyles = class; - TcxSchedulerReportPageItemCell = class; - TcxSchedulerReportPageSite = class; - TcxSchedulerReportSchedulingAreaCell = class; - TcxSchedulerReportSchedulerHeaderCell = class; - TcxSchedulerReportDateNavigatorCell = class; - TcxSchedulerReportNotesAreaCell = class; - TcxSchedulerReportTaskPadCell = class; - - TcxSchedulerReportCustomCell = class; - TcxSchedulerReportCustomCellClass = class of TcxSchedulerReportCustomCell; - TcxSchedulerReportCommonCellsProducer = class; - - // for options - TcxCustomSchedulerReportLinkOptions = class; - TcxSchedulerReportDateNavigatorHeader = class; - TcxSchedulerReportDateNavigatorDay = class; - TcxSchedulerReportDateNavigatorDayCaption = class; - TcxSchedulerReportDateNavigatorWeekNumber = class; - TcxSchedulerReportDailyTimeRulerCell = class; - TcxSchedulerReportContentCell = class; - TcxSchedulerReportCustomEventCell = class; - TcxSchedulerReportSchedulerHeaderDataCell = class; - TcxSchedulerReportNotesDataCell = class; - TcxSchedulerReportHeaderItemCell = class; - TcxSchedulerReportDetailsEventCell = class; - TcxSchedulerReportDetailsEventCellClass = class of TcxSchedulerReportDetailsEventCell; - - TcxSchedulerReportTimeLineLayoutBuilder = class; - - - { TcxCustomSchedulerReportLinkOptions } - - TcxCustomSchedulerReportLinkOptions = class(TdxCustomReportLinkOptions) - private - function GetReportLink: TcxSchedulerReportLink; - function GetScheduler: TcxScheduler; - public - property ReportLink: TcxSchedulerReportLink read GetReportLink; - property Scheduler: TcxScheduler read GetScheduler; - end; - - { TcxSchedulerReportLinkPrintRange } - - TcxSchedulerReportLinkPrintRange = class(TcxCustomSchedulerReportLinkOptions) - private - FDatePrint: array[0..1] of TDate; - FTimePrint: array[0..1] of TTime; - function GetActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetDayCount: Integer; - function GetMonthCount: Integer; - function GetPrintDate(AIndex: Integer): TDate; - function GetPrintTime(AIndex: Integer): TTime; - function GetWeekCount: Integer; - function GetYearCount: Integer; - procedure SetPrintDate(AIndex: Integer; const Value: TDate); - procedure SetPrintTime(AIndex: Integer; const Value: TTime); - - function IsDateStored(AIndex: Integer): Boolean; - function IsTimeStored(AIndex: Integer): Boolean; - protected - procedure CheckTimeRange; virtual; - function GetDateTimeIF(const AValue, ADefaultValue: TDateTime): TDateTime; - - function DesignerTabIndex: Integer; override; - property ActiveStyle: TcxCustomSchedulerReportLinkPrintStyle read GetActiveStyle; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function DefaultDatePrintFrom: TDate; virtual; - function DefaultDatePrintTo: TDate; virtual; - function DefaultTimePrintFrom: TTime; virtual; - function DefaultTimePrintTo: TTime; virtual; - - property DayCount: Integer read GetDayCount; - property MonthCount: Integer read GetMonthCount; - property WeekCount: Integer read GetWeekCount; - property YearCount: Integer read GetYearCount; - published - property PrintFrom: TDate index 0 read GetPrintDate write SetPrintDate stored IsDateStored; - property PrintTo: TDate index 1 read GetPrintDate write SetPrintDate stored IsDateStored; - property TimePrintFrom: TTime index 0 read GetPrintTime write SetPrintTime stored IsTimeStored; - property TimePrintTo: TTime index 1 read GetPrintTime write SetPrintTime stored IsTimeStored; - end; - - { TcxSchedulerReportLinkOptionsFormatting } - - TcxSchedulerReportLinkOptionsFormatting = class(TdxCustomReportLinkOptionsFormatting) - private - FSuppressContentColoration: Boolean; - function GetReportLink: TcxSchedulerReportLink; - procedure SetSuppressContentColoration(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - property ReportLink: TcxSchedulerReportLink read GetReportLink; - published - property SuppressContentColoration: Boolean read FSuppressContentColoration write SetSuppressContentColoration default False; - property UseLookAndFeelColors; - end; - - { TcxSchedulerReportLinkStyles } - - TcxSchedulerReportLinkStyles = class(TdxCustomReportLinkStyles, IcxSchedulerStylesAdapter, IcxSchedulerTimeRulerParams) - private - function GetExtStyles: TcxSchedulerStyles; - function GetReportLink: TcxSchedulerReportLink; - function GetUseSchedulerStyles: Boolean; - protected - FReportLink: TcxSchedulerReportLink; - function DesignerTabIndex: Integer; override; - - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - class function GetStyleCaption(AnIndex: Integer): string; override; - function GetStyleIndexByCaption(const Caption: string): Integer; override; - - // IcxSchedulerStylesAdapter - function GetDayHeaderStyle: TcxStyle; - function GetResourceHeaderStyle: TcxStyle; - - property ExtStyles: TcxSchedulerStyles read GetExtStyles; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - - function GetSchedulerHeaderParams: TcxViewParams; virtual; - function GetContentParams(const ADateTime: TDateTime; - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; overload; virtual; - function GetContentParams(const ADateTime: TDateTime; ALightColor: Boolean; - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; overload; virtual; - function GetDateNavigatorContentParams: TcxViewParams; virtual; - function GetDateNavigatorHeaderParams: TcxViewParams; virtual; - function GetDayHeaderParams(const ADateTime: TDateTime): TcxViewParams; virtual; - function GetEventParams(AEvent: TcxSchedulerEvent): TcxViewParams; virtual; - function GetNotesAreaBlankParams: TcxViewParams; virtual; - function GetNotesAreaLinedParams: TcxViewParams; virtual; - function GetResourceHeaderParams(AResource: TcxSchedulerStorageResourceItem): TcxViewParams; virtual; - function GetTaskPadParams: TcxViewParams; virtual; - function GetTimeRulerParams: TcxViewParams; virtual; - - property UseSchedulerStyles: Boolean read GetUseSchedulerStyles; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - published - property SchedulerHeader: TcxStyle Index vspsSchedulerSchedulerHeader read GetValue write SetValue; - property Content: TcxStyle Index vspsSchedulerContent read GetValue write SetValue; - property DateNavigatorContent: TcxStyle Index vspsSchedulerDateNavigatorContent read GetValue write SetValue; - property DateNavigatorHeader: TcxStyle Index vspsSchedulerDateNavigatorHeader read GetValue write SetValue; - property DayHeader: TcxStyle Index vspsSchedulerDayHeader read GetValue write SetValue; - property Event: TcxStyle Index vspsSchedulerEvent read GetValue write SetValue; - property ResourceHeader: TcxStyle Index vspsSchedulerResourceHeader read GetValue write SetValue; - property NotesAreaBlank: TcxStyle Index vspsSchedulerNotesAreaBlank read GetValue write SetValue; - property NotesAreaLined: TcxStyle Index vspsSchedulerNotesAreaLined read GetValue write SetValue; - property TaskPad: TcxStyle Index vspsSchedulerTaskPad read GetValue write SetValue; - property TimeRuler: TcxStyle Index vspsSchedulerTimeRuler read GetValue write SetValue; - property StyleSheet; - end; - - TcxSchedulerReportLinkStyleSheet = class(TdxCustomReportLinkStyleSheet) - private - function GetStylesValue: TcxSchedulerReportLinkStyles; - procedure SetStylesValue(Value: TcxSchedulerReportLinkStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TcxSchedulerReportLinkStyles read GetStylesValue write SetStylesValue; - end; - - { TcxSchedulerReportLinkRenderInfo } - - TcxSchedulerReportLinkRenderInfo = class(TdxPSReportRenderInfo) - private - function GetReportLink: TcxSchedulerReportLink; - protected - Rendering: Boolean; - FPageColCount: Integer; - FPageRowCount: Integer; - procedure DoCalculate; override; - function GetPageColCount: Integer; override; - function GetPageRowCount: Integer; override; - function IsLoading: Boolean; - public - function IsDrawPageTitleOnPage(APageIndex: Integer): Boolean; override; - function IsDrawReportTitleOnPage(APageIndex: Integer): Boolean; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - end; - - { TcxSchedulerReportRenderer } - - TcxSchedulerReportRenderer = class(TdxPSReportRenderer) - public - procedure PrepareRenderPage; override; - procedure UnprepareRenderPage; override; - end; - - { TcxSchedulerReportLink } - TcxSchedulerReportLinkCanPrintEventEvent = procedure(Sender: TcxSchedulerReportLink; - AEvent: TcxSchedulerEvent; var AllowPrint: Boolean) of object; - - { Initilization Events } - - TcxSchedulerReportLinkInitializeSchedulerHeaderEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportSchedulerHeaderCell) of object; - TcxSchedulerReportLinkInitializeSchedulingAreaEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportSchedulingAreaCell) of object; - TcxSchedulerReportLinkInitializeNotesEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportNotesAreaCell) of object; - TcxSchedulerReportLinkInitializeTaskPadEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportTaskPadCell) of object; - TcxSchedulerReportLinkInitializeEventCellEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportCustomEventCell) of object; - - { CustomDraw Events } - - TcxSchedulerReportLinkCustomDrawSchedulerHeaderCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportSchedulerHeaderDataCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorHeaderCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorHeader; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorDayCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDay; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorDayCaptionCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDayCaption; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorWeekNumberCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorWeekNumber; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawTimeRulerCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDailyTimeRulerCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawNotesCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawContentCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportContentCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawHeaderCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportHeaderItemCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawEventPartCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TAbstractdxReportCellData; - APart: TcxSchedulerReportEventPartType; var ADone: Boolean) of object; - - TcxSchedulerReportLink = class(TdxCustomcxControlReportLink, IdxReportLinkController) - private - FLinkInPreviewMode: Boolean; - FLookAndFeelItems: TList; - FPageSites: TList; - FPrintRange: TcxSchedulerReportLinkPrintRange; - FPrintStyles: TcxSchedulerReportLinkPrintStyles; - FTaskPadReportLink: TBasedxReportLink; - FSupportImages: Boolean; - FOnActivePrintStyleChanged: TNotifyEvent; - FOnCanPrintEvent: TcxSchedulerReportLinkCanPrintEventEvent; - - FOnCustomDrawSchedulerHeaderCell: TcxSchedulerReportLinkCustomDrawSchedulerHeaderCellEvent; - FOnCustomDrawDateNavigatorHeaderCell: TcxSchedulerReportLinkCustomDrawDateNavigatorHeaderCellEvent; - FOnCustomDrawDateNavigatorDayCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCellEvent; - FOnCustomDrawDateNavigatorDayCaptionCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCaptionCellEvent; - FOnCustomDrawDateNavigatorWeekNumberCell: TcxSchedulerReportLinkCustomDrawDateNavigatorWeekNumberCellEvent; - FOnCustomDrawTimeRulerCell: TcxSchedulerReportLinkCustomDrawTimeRulerCellEvent; - FOnCustomDrawContentCell: TcxSchedulerReportLinkCustomDrawContentCellEvent; - FOnCustomDrawHeaderCell: TcxSchedulerReportLinkCustomDrawHeaderCellEvent; - FOnCustomDrawEventPartCell: TcxSchedulerReportLinkCustomDrawEventPartCellEvent; - FOnCustomDrawNotesCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent; - FOnCustomDrawTaskPadCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent; - - FOnInitializeSchedulingAreaCell: TcxSchedulerReportLinkInitializeSchedulingAreaEvent; - FOnInitializeEventCell: TcxSchedulerReportLinkInitializeEventCellEvent; - FOnInitializeHeaderPrimaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent; - FOnInitializeHeaderSecondaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent; - FOnInitializeNotesAreaCell: TcxSchedulerReportLinkInitializeNotesEvent; - FOnInitializeTaskPadCell: TcxSchedulerReportLinkInitializeTaskPadEvent; - function GetActiveStyles: TcxSchedulerReportLinkStyles; - function GetDesignWindow: TcxfmSchedulerReportLinkDesignWindow; - function GetEdgeMode: TdxCellEdgeMode; - function GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; - function GetLookAndFeelItemCount: Integer; - function GetOptionsFormatting: TcxSchedulerReportLinkOptionsFormatting; - function GetPrintStyles: TcxSchedulerReportLinkPrintStyles; - function GetRenderInfo: TcxSchedulerReportLinkRenderInfo; - function GetScheduler: TcxScheduler; - function GetStyles: TcxSchedulerReportLinkStyles; - procedure SetOptionsFormatting(Value: TcxSchedulerReportLinkOptionsFormatting); - procedure SetPrintRange(Value: TcxSchedulerReportLinkPrintRange); - procedure SetPrintStyles(Value: TcxSchedulerReportLinkPrintStyles); - procedure SetStyles(Value: TcxSchedulerReportLinkStyles); - procedure SetTaskPadReportLink(Value: TBasedxReportLink); - - protected - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - { IdxReportLinkController } - function GetControlSiteBounds(AControl: TControl): TRect; virtual; - - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure DoCreateReport; override; - - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - - procedure DoCanPrintEvent(AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); virtual; - - procedure DoCustomDrawSchedulerHeaderCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportSchedulerHeaderDataCell; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorHeaderCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorHeader; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorDayCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorDay; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorDayCaptionCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorDayCaption; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorWeekNumberCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorWeekNumber; var ADone: Boolean); virtual; - procedure DoCustomDrawTimeRulerCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDailyTimeRulerCell; var ADone: Boolean); virtual; - procedure DoCustomDrawContentCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportContentCell; var ADone: Boolean); virtual; - procedure DoCustomDrawHeaderCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportHeaderItemCell; var ADone: Boolean); virtual; - procedure DoCustomDrawEventPartCell(ACanvas: TCanvas; - AItem: TAbstractdxReportCellData; var ADone: Boolean); virtual; - procedure DoCustomDrawNotesCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); virtual; - procedure DoCustomDrawTaskPadCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); virtual; - - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - function GetRealScaleFactor: Integer; override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - function GetRendererClass: TdxPSReportRendererClass; override; - function GetRenderInfoClass: TdxPSReportRenderInfoClass; override; - procedure InternalRestoreDefaults; override; - procedure PrepareConstruct; override; - procedure UnprepareConstruct; override; - - procedure CreateOptions; override; - procedure DestroyOptions; override; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; override; - - function CreatePrintRange: TcxSchedulerReportLinkPrintRange; virtual; - function CreatePrintStyles: TcxSchedulerReportLinkPrintStyles; virtual; - function HasEventImages: Boolean; - function HasResourceImages: Boolean; - - function GetAreNativeStylesAvailable: Boolean; override; - function GetStylesClass: TdxCustomReportLinkStylesClass; override; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; override; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; override; - - procedure ActivePrintStyleChanged; virtual; - procedure DoActivePrintStyleChanged; virtual; - - procedure FormatLookAndFeelItems; - procedure RegisterLookAndFeelItem(AItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); - - procedure DoInitializeSchedulingAreaCell(AItem: TcxSchedulerReportSchedulingAreaCell); virtual; - procedure DoInitializeEventCell(AItem: TcxSchedulerReportCustomEventCell); virtual; - procedure DoInitializeHeaderPrimaryCell(AItem: TcxSchedulerReportSchedulerHeaderCell); virtual; - procedure DoInitializeHeaderSecondaryCell(AItem: TcxSchedulerReportSchedulerHeaderCell); virtual; - procedure DoInitializeNotesAreaCell(AItem: TcxSchedulerReportNotesAreaCell); virtual; - procedure DoInitializeTaskPadCell(AItem: TcxSchedulerReportTaskPadCell); virtual; - - procedure AssignTaskPadData(ATaskPad: TcxSchedulerReportTaskPadCell); - procedure InitializeTaskPadCell(ATaskPad: TcxSchedulerReportTaskPadCell); virtual; - - procedure SetCellViewParams(ACell: TdxReportVisualItem; const AParams: TcxViewParams); overload; - procedure SetCellViewParams(ACell: TdxReportVisualItem; const AParams: TdxReportItemViewParams); overload; - - function AddPageSite(const ABounds: TRect): TcxSchedulerReportPageSite; - procedure BuildStyle; virtual; - - property ActiveStyles: TcxSchedulerReportLinkStyles read GetActiveStyles; - - property EdgeMode: TdxCellEdgeMode read GetEdgeMode; - property LinkInPreviewMode: Boolean read FLinkInPreviewMode write FLinkInPreviewMode; - property LookAndFeelItemCount: Integer read GetLookAndFeelItemCount; - property LookAndFeelItems[Index: Integer]: TdxReportVisualItem read GetLookAndFeelItem; - property PageSites: TList read FPageSites; - property RenderInfo: TcxSchedulerReportLinkRenderInfo read GetRenderInfo; - property SupportImages: Boolean read FSupportImages; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - class function Aggregable: Boolean; override; - procedure LoadDataFromStream(AStream: TStream); override; - procedure RebuildReport; override; - - property DesignWindow: TcxfmSchedulerReportLinkDesignWindow read GetDesignWindow; - property Scheduler: TcxScheduler read GetScheduler; - - published - property Color; - property Font; - - property OptionsFormatting: TcxSchedulerReportLinkOptionsFormatting read GetOptionsFormatting write SetOptionsFormatting; - property PrintRange: TcxSchedulerReportLinkPrintRange read FPrintRange write SetPrintRange; - property PrintStyles: TcxSchedulerReportLinkPrintStyles read GetPrintStyles write SetPrintStyles; - property ScaleFonts; - property StyleRepository; - property Styles: TcxSchedulerReportLinkStyles read GetStyles write SetStyles; - property SupportedCustomDraw; - property TaskPadReportLink: TBasedxReportLink read FTaskPadReportLink write SetTaskPadReportLink; - - property OnActivePrintStyleChanged: TNotifyEvent read FOnActivePrintStyleChanged write FOnActivePrintStyleChanged; - property OnCanPrintEvent: TcxSchedulerReportLinkCanPrintEventEvent read FOnCanPrintEvent write FOnCanPrintEvent; - - property OnCustomDrawSchedulerHeaderCell: TcxSchedulerReportLinkCustomDrawSchedulerHeaderCellEvent - read FOnCustomDrawSchedulerHeaderCell write FOnCustomDrawSchedulerHeaderCell; - property OnCustomDrawDateNavigatorHeaderCell: TcxSchedulerReportLinkCustomDrawDateNavigatorHeaderCellEvent - read FOnCustomDrawDateNavigatorHeaderCell write FOnCustomDrawDateNavigatorHeaderCell; - property OnCustomDrawDateNavigatorDayCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCellEvent - read FOnCustomDrawDateNavigatorDayCell write FOnCustomDrawDateNavigatorDayCell; - property OnCustomDrawDateNavigatorDayCaptionCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCaptionCellEvent - read FOnCustomDrawDateNavigatorDayCaptionCell write FOnCustomDrawDateNavigatorDayCaptionCell; - property OnCustomDrawDateNavigatorWeekNumberCell: TcxSchedulerReportLinkCustomDrawDateNavigatorWeekNumberCellEvent - read FOnCustomDrawDateNavigatorWeekNumberCell write FOnCustomDrawDateNavigatorWeekNumberCell; - property OnCustomDrawTimeRulerCell: TcxSchedulerReportLinkCustomDrawTimeRulerCellEvent - read FOnCustomDrawTimeRulerCell write FOnCustomDrawTimeRulerCell; - property OnCustomDrawContentCell: TcxSchedulerReportLinkCustomDrawContentCellEvent - read FOnCustomDrawContentCell write FOnCustomDrawContentCell; - property OnCustomDrawHeaderCell: TcxSchedulerReportLinkCustomDrawHeaderCellEvent - read FOnCustomDrawHeaderCell write FOnCustomDrawHeaderCell; - property OnCustomDrawEventPartCell: TcxSchedulerReportLinkCustomDrawEventPartCellEvent - read FOnCustomDrawEventPartCell write FOnCustomDrawEventPartCell; - property OnCustomDrawNotesCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent - read FOnCustomDrawNotesCell write FOnCustomDrawNotesCell; - property OnCustomDrawTaskPadCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent - read FOnCustomDrawTaskPadCell write FOnCustomDrawTaskPadCell; - - property OnInitializeSchedulingAreaCell: TcxSchedulerReportLinkInitializeSchedulingAreaEvent - read FOnInitializeSchedulingAreaCell write FOnInitializeSchedulingAreaCell; - property OnInitializeEventCell: TcxSchedulerReportLinkInitializeEventCellEvent - read FOnInitializeEventCell write FOnInitializeEventCell; - property OnInitializeHeaderPrimaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent - read FOnInitializeHeaderPrimaryCell write FOnInitializeHeaderPrimaryCell; - property OnInitializeHeaderSecondaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent - read FOnInitializeHeaderSecondaryCell write FOnInitializeHeaderSecondaryCell; - property OnInitializeNotesAreaCell: TcxSchedulerReportLinkInitializeNotesEvent - read FOnInitializeNotesAreaCell write FOnInitializeNotesAreaCell; - property OnInitializeTaskPadCell: TcxSchedulerReportLinkInitializeTaskPadEvent - read FOnInitializeTaskPadCell write FOnInitializeTaskPadCell; - end; - - { TcxCustomSchedulerReportLinkPrintStyle } - - TcxSchedulerReportLinkPeriodicPrintStyleLayout = (pslOnePage, pslTwoPages); - - TcxCustomSchedulerReportLinkPrintStyle = class(TPersistent, - IUnknown, IdxPSCellParams, IdxPSCellParams2) - private - FBoldedDays: TcxSchedulerDateList; - FCaption: string; - FCompressWeekends: Boolean; - FDontPrintWeekends: Boolean; - FEvents: TcxSchedulerCachedEventList; - FLayout: TcxSchedulerReportLinkPeriodicPrintStyleLayout; - FPagesPerPeriod: Integer; - FResourceCountPerPage: Integer; - FShowNotesAreaBlank: Boolean; - FShowNotesAreaLined: Boolean; - FShowTaskPad: Boolean; - FStyles: TcxSchedulerReportLinkPrintStyles; - FUsedDays: TcxSchedulerDateList; - FShowEventImages: Boolean; - FShowResourceImages: Boolean; - function GetActive: Boolean; - function GetHasAdditionalArea: Boolean; - function GetIndex: Integer; - function GetPageSite(AIndex: Integer): TcxSchedulerReportPageSite; - function GetPeriodCount: Integer; - function GetPrintRange: TcxSchedulerReportLinkPrintRange; - function GetReportLink: TcxSchedulerReportLink; - function GetResourceCount: Integer; - function GetScheduler: TcxScheduler; - function GetStorage: TcxCustomSchedulerStorage; - function GetTimePrintFrom: TTime; - function GetTimePrintTo: TTime; - function GetVisualStyles: TcxSchedulerReportLinkStyles; - function IsCaptionStored: Boolean; - function IsLayoutStored: Boolean; - function IsShowNotesAreaBlankStored: Boolean; - function IsActiveStored: Boolean; - procedure SetActive(Value: Boolean); - procedure SetCaption(const Value: string); - procedure SetCompressWeekends(Value: Boolean); - procedure SetDontPrintWeekends(Value: Boolean); - procedure SetLayout(Value: TcxSchedulerReportLinkPeriodicPrintStyleLayout); - procedure SetResourceCountPerPage(Value: Integer); - procedure SetShowEventImages(Value: Boolean); - procedure SetShowNotesAreaBlank(Value: Boolean); - procedure SetShowNotesAreaLined(Value: Boolean); - procedure SetShowResourceImages(Value: Boolean); - procedure SetShowTaskPad(Value: Boolean); - procedure SetTimePrintFrom(Value: TTime); - procedure SetTimePrintTo(Value: TTime); - protected - CurrentDate: TDateTime; - { IUnknown } - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - { IdxReportLinkController } - function GetControlSiteBounds(AControl: TControl): TRect; virtual; - { IdxPSCellParams } - function IdxPSCellParams.GetAutoHeight = IdxPSCellParams_GetAutoHeight; - function IdxPSCellParams.GetDC = IdxPSCellParams_GetDC; - function IdxPSCellParams.GetDisplayGraphicsAsText = IdxPSCellParams_GetDisplayGraphicsAsText; - function IdxPSCellParams.GetEndEllipsis = IdxPSCellParams_GetEndEllipsis; - function IdxPSCellParams.GetFlatCheckMarks = IdxPSCellParams_GetFlatCheckMarks; - function IdxPSCellParams.GetGraphicsText = IdxPSCellParams_GetGraphicsText; - function IdxPSCellParams.GetMultiline = IdxPSCellParams_GetMultiline; - function IdxPSCellParams.GetTransparentGraphics = IdxPSCellParams_GetTransparentGraphics; - function IdxPSCellParams_GetAutoHeight: Boolean; virtual; - function IdxPSCellParams_GetDC: HDC; virtual; - function IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; virtual; - function IdxPSCellParams_GetEndEllipsis: Boolean; virtual; - function IdxPSCellParams_GetFlatCheckMarks: Boolean; virtual; - function IdxPSCellParams_GetGraphicsText: string; virtual; - function IdxPSCellParams_GetMultiline: Boolean; virtual; - function IdxPSCellParams_GetTransparentGraphics: Boolean; virtual; - { IdxPSCellParams2 } - function IdxPSCellParams2.GetPreviewMarginLeft = IdxPSCellParams2_GetPreviewMarginLeft; - function IdxPSCellParams2.GetPreviewMarginRight = IdxPSCellParams2_GetPreviewMarginRight; - function IdxPSCellParams2.GetPreviewMaxHeight = IdxPSCellParams2_GetPreviewMaxHeight; - function IdxPSCellParams2.GetPreviewMaxLineCount = IdxPSCellParams2_GetPreviewMaxLineCount; - function IdxPSCellParams2.GetRichEditGraphicClass = IdxPSCellParams2_GetRichEditGraphicClass; - function IdxPSCellParams2.GetRichEditTransparent = IdxPSCellParams2_GetRichEditTransparent; - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; virtual; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; virtual; - function IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; virtual; - function IdxPSCellParams2_GetRichEditTransparent: Boolean; virtual; - // - procedure ActiveStyleChanged; virtual; - function AddPageSite(const ABounds: TRect): TcxSchedulerReportPageSite; virtual; - - procedure AfterBuild; virtual; - procedure BeforeBuild; virtual; - procedure Build; virtual; - procedure BuildPages; virtual; - procedure BuildSchedulerCells(ASite: TcxSchedulerReportSchedulingAreaCell); virtual; - procedure Progress(APercentDone: Double); virtual; - - procedure PrepareEvents; virtual; - procedure DoCanPrintEvent(AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); virtual; - - procedure Changed; virtual; - procedure CreateObjects; virtual; - procedure DestroyObjects; virtual; - function GetPageCount: Integer; virtual; - - function GetRebuildOnPageParamsChange(AnUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; virtual; - - function CheckPrintRangeDate(const ADate: TDateTime; AIndex: Integer): TDateTime; virtual; - function CheckPrintRangeTime(const ATime: TDateTime; AIndex: Integer): TDateTime; virtual; - function GetActualDatePrintFrom: TDate; virtual; - function GetActualDatePrintTo: TDate; virtual; - function GetCorrespondedView: TcxSchedulerCustomResourceView; virtual; - function GetPagesPerPeriod: Integer; virtual; - - function GetGlyphIndex: Integer; virtual; - function GetPreviewGlyphIndex: Integer; virtual; - function GetSchedulerHeaderParams: TdxReportItemViewParams; virtual; - - procedure DrawDesignWindowPreview(ACanvas: TCanvas; const ABounds: TRect); - // actually option state - function GetResourcePageCount: Integer; virtual; - function GetShowDateNavigator(APageIndex: Integer): Boolean; virtual; - function GetShowNotesAreaBlank: Boolean; virtual; - - procedure SetBoolOption(var AOption: Boolean; Value: Boolean); - function SupportTimeRange: Boolean; virtual; - function SupportMessage: Boolean; virtual; - function SupportMessageEditProperties: Boolean; virtual; - - // report cells creation - function CreateDateNavigatorCell(ASite: TdxReportCell; AYear, AMonth: Word): TcxSchedulerReportDateNavigatorCell; virtual; - function CreateHeaderCell(ASite: TdxReportCell): TcxSchedulerReportSchedulerHeaderCell; virtual; - function CreateNotesCell(ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; virtual; - function CreateNotesLinedCell(ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; virtual; - function CreateSchedulingAreaCell(ASite: TdxReportCell): TcxSchedulerReportSchedulingAreaCell; virtual; - function CreateSchedulingCellsProducer(ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; virtual; - function CreateTaskPadCell(ASite: TdxReportCell): TcxSchedulerReportTaskPadCell; virtual; - - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); virtual; - function InitReportCell(ACell: TdxReportCell; const ABounds: TRect): TdxReportCell; - - procedure CorrectBoundsWithHeader(AHeader: TcxSchedulerReportSchedulerHeaderCell; var ABounds: TRect); - procedure CreateAdditionalControls(ASite: TdxReportCell; AHasCalendar, - AHasTaskPad, AHasNotes, AHasNotesLined, ARightSide: Boolean; var ABounds: TRect); virtual; - - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); virtual; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); virtual; - procedure CreateHeaderDateNavigator(AHeader: TcxSchedulerReportSchedulerHeaderCell; APageIndex: Integer; out ABounds: TRect); virtual; - procedure CreateLayoutForPeriod(APeriodIndex: Integer); virtual; - procedure CreatePageSiteWithHeader(APageIndex: Integer; - out ASite: TcxSchedulerReportPageSite; out AHeader: TcxSchedulerReportSchedulerHeaderCell; - out ABounds: TRect; AIsPrimary: Boolean = True); - // items visibility - function CanSplitSchedulingOnTwoPages: Boolean; virtual; - function GetHasPageHeader(APageIndex: Integer): Boolean; virtual; - function GetHasPageReportTitle(APageIndex: Integer): Boolean; virtual; - function GetPageHeaderHeight(const ASiteBounds: TRect; APageIndex: Integer): Integer; - function GetPageIndex(APeriodIndex, AIndex: Integer): Integer; - procedure GetPagePeriodAndIndex(APageIndex: Integer; var APeriodIndex, ASubIndex: Integer); - function GetPageSiteBounds(APageIndex: Integer): TRect; virtual; - function GetStartOfWeekOffset: Integer; virtual; - // extracting events and dates for period - procedure GetPageDateNavigatorInfo( - APageIndex: Integer; out AYear, AMonth: Word); virtual; - function GetDaysPerPeriod: Integer; virtual; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); virtual; - - property CompressWeekends: Boolean read FCompressWeekends write SetCompressWeekends default True; - property DontPrintWeekends: Boolean read FDontPrintWeekends write SetDontPrintWeekends default False; - property Events: TcxSchedulerCachedEventList read FEvents; - property GlyphIndex: Integer read GetGlyphIndex; - property Layout: TcxSchedulerReportLinkPeriodicPrintStyleLayout read FLayout write SetLayout stored IsLayoutStored; - property PagesPerPeriod: Integer read FPagesPerPeriod; - property PageSites[Index: Integer]: TcxSchedulerReportPageSite read GetPageSite; - property PreviewGlyphIndex: Integer read GetPreviewGlyphIndex; - property PrintRange: TcxSchedulerReportLinkPrintRange read GetPrintRange; - property ResourceCount: Integer read GetResourceCount; - property ResourceCountPerPage: Integer read FResourceCountPerPage write SetResourceCountPerPage default 0; - property ShowEventImages: Boolean read FShowEventImages write SetShowEventImages; - property ShowNotesAreaBlank: Boolean read GetShowNotesAreaBlank write SetShowNotesAreaBlank stored IsShowNotesAreaBlankStored; - property ShowNotesAreaLined: Boolean read FShowNotesAreaLined write SetShowNotesAreaLined default False; - property ShowResourceImages: Boolean read FShowResourceImages write SetShowResourceImages; - property ShowTaskPad: Boolean read FShowTaskPad write SetShowTaskPad default False; - property StartOfWeekOffset: Integer read GetStartOfWeekOffset; - property Storage: TcxCustomSchedulerStorage read GetStorage; - property TimePrintFrom: TTime read GetTimePrintFrom write SetTimePrintFrom stored False; - property TimePrintTo: TTime read GetTimePrintTo write SetTimePrintTo stored False; - property UsedDays: TcxSchedulerDateList read FUsedDays; - public - constructor Create(AStyles: TcxSchedulerReportLinkPrintStyles); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function DefaultCaption: string; virtual; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; virtual; - procedure RestoreDefaults; virtual; - - property ActualDatePrintFrom: TDate read GetActualDatePrintFrom; - property ActualDatePrintTo: TDate read GetActualDatePrintTo; - property CorrespondedView: TcxSchedulerCustomResourceView read GetCorrespondedView; - property HasAdditionalArea: Boolean read GetHasAdditionalArea; - property Index: Integer read GetIndex; - property PageCount: Integer read GetPageCount; - property PeriodCount: Integer read GetPeriodCount; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - property Scheduler: TcxScheduler read GetScheduler; - property Styles: TcxSchedulerReportLinkPrintStyles read FStyles; - property VisualStyles: TcxSchedulerReportLinkStyles read GetVisualStyles; - published - property Active: Boolean read GetActive write SetActive stored IsActiveStored; - property Caption: string read FCaption write SetCaption stored IsCaptionStored; - end; - - { TcxSchedulerReportLinkDailyPrintStyle } - - TcxSchedulerReportLinkDailyPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FCurrentPagePerDate: Integer; - protected - procedure BeforeBuild; override; - function CanSplitSchedulingOnTwoPages: Boolean; override; - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - function CreateSchedulingCellsProducer(ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetGlyphIndex: Integer; override; - function GetPageCount: Integer; override; - function GetPagesPerPeriod: Integer; override; - function GetShowNotesAreaBlank: Boolean; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - function SupportMessage: Boolean; override; - function SupportTimeRange: Boolean; override; - public - constructor Create(AStyles: TcxSchedulerReportLinkPrintStyles); override; - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - published - property Active; - property Caption; - property Layout; - property ResourceCountPerPage; - property ShowEventImages default True; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowResourceImages default True; - property ShowTaskPad; - end; - - { TcxSchedulerReportLinkCustomDetailsPrintStyle } - - TcxSchedulerReportLinkCustomDetailsPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FTimeWidth: Integer; - function GetPageWidth: Integer; - protected - BuildedPageCount: Integer; - CellsOnPage: Integer; - CurrentPage: TcxSchedulerReportPageSite; - function AddPageSite(const ABounds: TRect): TcxSchedulerReportPageSite; override; - procedure BeforeBuild; override; - function GetNextPage(APrevPage: TcxSchedulerReportPageSite; out ABounds: TRect): TcxSchedulerReportPageSite; - function GetPageCount: Integer; override; - function MeasureTimeWidth: Integer; virtual; - function SupportMessage: Boolean; override; - - property PageWidth: Integer read GetPageWidth; - property TimeWidth: Integer read FTimeWidth; - end; - - { TcxSchedulerReportLinkDetailsPrintStyle } - - TcxSchedulerReportLinkDetailsPrintStylePaginationMode = (dpmByDay, dpmByWeek, dpmByMonth); - - TcxSchedulerReportLinkDetailsPrintStyle = class(TcxSchedulerReportLinkCustomDetailsPrintStyle) - private - FPaginationMode: TcxSchedulerReportLinkDetailsPrintStylePaginationMode; - FUsePagination: Boolean; - procedure SetPaginationMode(Value: TcxSchedulerReportLinkDetailsPrintStylePaginationMode); - procedure SetUsePagination(Value: Boolean); - protected - EventIndex, DayIndex: Integer; - CurrentCell: TcxSchedulerReportDetailsEventCell; - CurrentPageBounds: TRect; - PreviousHeader: TcxSchedulerReportSchedulerHeaderCell; - Site: TcxSchedulerReportPageSite; - function AddDayHeader(ADate: TDateTime; AContinue: Boolean; - var ABounds: TRect): TcxSchedulerReportSchedulerHeaderCell; - procedure BeforeBuild; override; - procedure BuildPages; override; - function GetDayHeaderHeight: Integer; virtual; - function GetDayHeaderText(AContinue: Boolean): string; virtual; - function GetGlyphIndex: Integer; override; - function GetPreviewGlyphIndex: Integer; override; - function GetSchedulerHeaderParams: TdxReportItemViewParams; override; - - // layout calculation - function AddEventCell(AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; virtual; - procedure CheckPagination; - procedure HeaderNeeded; virtual; - function NeedAddDayHeader: Boolean; - function MeasureCellBounds: TRect; virtual; - procedure PrepareNextPage; - procedure SetCellPlace; - - property DayHeaderHeight: Integer read GetDayHeaderHeight; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property PaginationMode: TcxSchedulerReportLinkDetailsPrintStylePaginationMode read FPaginationMode write SetPaginationMode default dpmByDay; - property UsePagination: Boolean read FUsePagination write SetUsePagination default False; - end; - - { TcxSchedulerReportLinkMemoPrintStyle } - - TcxSchedulerReportLinkMemoPrintStyle = class(TcxSchedulerReportLinkCustomDetailsPrintStyle) - private - FSelectedEventsOnly: Boolean; - FStartEachItemOnNewPage: Boolean; - protected - Site: TdxReportCell; - function AddEventCell(AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; virtual; - procedure BuildPages; override; - procedure DoCanPrintEvent(AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); override; - function GetGlyphIndex: Integer; override; - function GetPreviewGlyphIndex: Integer; override; - function MeasureTimeWidth: Integer; override; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property SelectedEventsOnly: Boolean read FSelectedEventsOnly write FSelectedEventsOnly default True; - property StartEachItemOnNewPage: Boolean read FStartEachItemOnNewPage write FStartEachItemOnNewPage default True; - end; - - { TcxSchedulerReportLinkMonthlyPrintStyle } - - TcxSchedulerReportLinkMonthlyPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FPrintExactlyOneMonthPerPage: Boolean; - procedure SetPrintExactlyOneMonthPerPage(Value: Boolean); - protected - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetDateForPage(APageIndex: Integer): TDateTime; - function GetDaysPerPeriod: Integer; override; - function GetGlyphIndex: Integer; override; - function GetPageCount: Integer; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - public - constructor Create(AStyles: TcxSchedulerReportLinkPrintStyles); override; - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property DontPrintWeekends; - property Layout; - property PrintExactlyOneMonthPerPage: Boolean read FPrintExactlyOneMonthPerPage write SetPrintExactlyOneMonthPerPage default False; - property ResourceCountPerPage; - property ShowEventImages default False; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowResourceImages default True; - property ShowTaskPad; - end; - - { TcxSchedulerReportLinkTimeLinePrintStyle } - - TcxSchedulerReportLinkTimeLinePrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FLayoutBuilder: TcxSchedulerReportTimeLineLayoutBuilder; - FPrimaryPageScalesOnly: Boolean; - FPrimaryPageHeadersOnly: Boolean; - FShowLinks: Boolean; - FStoredResPerPage: Integer; - FStoredTopIndex: Integer; - FWorkTimeOnly: Boolean; - function GetPageHeight: Integer; - function GetPageWidth(AColumn: Integer): Integer; - function GetPanelWidth: Integer; - function GetPrintFrom: TDateTime; - function GetPrintTo: TDateTime; - function GetTimeGridView: TcxSchedulerTimeGridView; - procedure SetPrimaryPageHeadersOnly(AValue: Boolean); - procedure SetPrimaryPageScalesOnly(AValue: Boolean); - procedure SetShowLinks(AValue: Boolean); - procedure SetWorkTimeOnly(AValue: Boolean); - protected - procedure AfterBuild; override; - procedure BeforeBuild; override; - procedure BuildSchedulerCells(ASite: TcxSchedulerReportSchedulingAreaCell); override; - function CanDontPrintWeekends: Boolean; virtual; - function CheckPrintRangeDate(const ADate: TDateTime; AIndex: Integer): TDateTime; override; - function CheckPrintRangeTime(const ATime: TDateTime; AIndex: Integer): TDateTime; override; - function CreateSchedulingCellsProducer(ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure CreateControlsOnFirstPage(APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetGlyphIndex: Integer; override; - function GetHasPageHeader(APageIndex: Integer): Boolean; override; - function GetPageCount: Integer; override; - function GetPreviewGlyphIndex: Integer; override; - procedure RestoreLayout; - procedure SaveLayout; - function SupportMessage: Boolean; override; - - property LayoutBuilder: TcxSchedulerReportTimeLineLayoutBuilder read FLayoutBuilder; - property PageHeight: Integer read GetPageHeight; - property PageWidth[Column: Integer]: Integer read GetPageWidth; - property PanelWidth: Integer read GetPanelWidth; - property PrintFrom: TDateTime read GetPrintFrom; - property PrintTo: TDateTime read GetPrintTo; - public - constructor Create(AStyles: TcxSchedulerReportLinkPrintStyles); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - procedure RestoreDefaults; override; - - property CorrespondedView: TcxSchedulerTimeGridView read GetTimeGridView; - published - property Active; - property DontPrintWeekends; - property PrimaryPageScalesOnly: Boolean read FPrimaryPageScalesOnly write SetPrimaryPageScalesOnly default False; - property PrimaryPageHeadersOnly: Boolean read FPrimaryPageHeadersOnly write SetPrimaryPageHeadersOnly default False; - property ResourceCountPerPage; - property ShowEventImages default True; - property ShowLinks: Boolean read FShowLinks write SetShowLinks default True; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowResourceImages default True; - property ShowTaskPad; - property WorkTimeOnly: Boolean read FWorkTimeOnly write SetWorkTimeOnly default False; - end; - - { TcxSchedulerReportLinkTrifoldPrintStyle } - - TcxSchedulerReportLinkTrifoldPrintStyleSectionMode = (smDailyCalendar, smWeeklyCalendar, - smMonthlyCalendar, smTaskPad, smNotesAreaBlank, smNotesAreaLined); - - TcxSchedulerReportLinkTrifoldPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FSections: array[0..2] of TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; - function GetHasDailySection: Boolean; - function GetSection(Index: Integer): TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; - procedure SetSection(Index: Integer; AValue: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); - function IsSectionStored(Index: Integer): Boolean; - protected - FCurrentSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; - FCurrentSchedulingArea: TcxSchedulerReportSchedulingAreaCell; - FPageRange: Byte; - procedure CreateLayoutForPeriod(APeriodIndex: Integer); override; - procedure CreateLayoutForSection(ASite: TdxReportCell; APeriodIndex: Integer; const ABounds: TRect; - ASection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); virtual; - procedure CreateSchedulingAreaWithHeader(ASite: TdxReportCell; ABounds: TRect); virtual; - function CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetGlyphIndex: Integer; override; - function GetPageCount: Integer; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - - property HasDailySection: Boolean read GetHasDailySection; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property LeftSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode index 0 read GetSection write SetSection stored IsSectionStored; - property MiddleSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode index 1 read GetSection write SetSection stored IsSectionStored; - property RightSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode index 2 read GetSection write SetSection stored IsSectionStored; - end; - - { TcxSchedulerReportLinkWeeklyPrintStyle } - - TcxSchedulerReportLinkWeeklyPrintStyleArrange = (wsaTopToBottom, wsaLeftToRight); - - TcxSchedulerReportLinkWeeklyPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FArrange: TcxSchedulerReportLinkWeeklyPrintStyleArrange; - FDaysLayout: TcxSchedulerWeekViewDaysLayout; - FDaysLayoutAssigned: Boolean; - - function GetDaysLayout: TcxSchedulerWeekViewDaysLayout; - - function IsArrangeStored: Boolean; - function IsDaysLayoutStored: Boolean; - - procedure SetArrange(Value: TcxSchedulerReportLinkWeeklyPrintStyleArrange); - procedure SetDaysLayout(Value: TcxSchedulerWeekViewDaysLayout); - protected - procedure Build; override; - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - function CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetGlyphIndex: Integer; override; - function GetDateForPage(APageIndex: Integer): TDateTime; - function GetDaysPerPeriod: Integer; override; - function GetPageCount: Integer; override; - function GetPreviewGlyphIndex: Integer; override; - function GetStartOfWeekOffset: Integer; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - function CanDontPrintWeekends: Boolean; virtual; - function SupportMessage: Boolean; override; - function SupportTimeRange: Boolean; override; - public - constructor Create(AStyles: TcxSchedulerReportLinkPrintStyles); override; - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - procedure RestoreDefaults; override; - - property DaysLayoutAssigned: Boolean read FDaysLayoutAssigned write FDaysLayoutAssigned; - published - property Active; - property Arrange: TcxSchedulerReportLinkWeeklyPrintStyleArrange read FArrange write SetArrange stored IsArrangeStored; - property Caption; - property DaysLayout: TcxSchedulerWeekViewDaysLayout read GetDaysLayout write SetDaysLayout stored IsDaysLayoutStored; - property DontPrintWeekends; - property Layout; - property ResourceCountPerPage; - property ShowEventImages default False; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowResourceImages default True; - property ShowTaskPad; - end; - - { TcxSchedulerReportLinkYearlyPrintStyle } - - TcxSchedulerReportLinkYearlyPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FMonthCountPerPage: Integer; - FPrimaryPageHeadersOnly: Boolean; - function GetPeriodPageCount: Integer; - procedure SetMonthCountPerPage(AValue: Integer); - procedure SetPrimaryPageHeadersOnly(AValue: Boolean); - protected - procedure BuildSchedulerCells(ASite: TcxSchedulerReportSchedulingAreaCell); override; - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - function CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetHasPageHeader(APageIndex: Integer): Boolean; override; - function GetGlyphIndex: Integer; override; - function GetPreviewGlyphIndex: Integer; override; - function GetPageCount: Integer; override; - function GetShowDateNavigator(APageIndex: Integer): Boolean; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - - property PeriodPageCount: Integer read GetPeriodPageCount; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property Layout; - property MonthCountPerPage: Integer read FMonthCountPerPage write SetMonthCountPerPage default 12; - property PrimaryPageHeadersOnly: Boolean read FPrimaryPageHeadersOnly write SetPrimaryPageHeadersOnly default False; - property ShowEventImages default False; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowTaskPad; - end; - - { TcxSchedulerReportLinkPrintStyles } - - TcxSchedulerReportLinkPrintStyles = class(TcxCustomSchedulerReportLinkOptions) - private - FActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; - FActiveStyleAssigned: Boolean; - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxCustomSchedulerReportLinkPrintStyle; - function GetStyleDaily: TcxSchedulerReportLinkDailyPrintStyle; - function GetStyleDetails: TcxSchedulerReportLinkDetailsPrintStyle; - function GetStyleMemo: TcxSchedulerReportLinkMemoPrintStyle; - function GetStyleMonthly: TcxSchedulerReportLinkMonthlyPrintStyle; - function GetStyleTimeLine: TcxSchedulerReportLinkTimeLinePrintStyle; - function GetStyleTrifold: TcxSchedulerReportLinkTrifoldPrintStyle; - function GetStyleWeekly: TcxSchedulerReportLinkWeeklyPrintStyle; - function GetStyleYearly: TcxSchedulerReportLinkYearlyPrintStyle; - procedure SetActiveStyle(Value: TcxCustomSchedulerReportLinkPrintStyle); - procedure SetActiveStyleAssigned(Value: Boolean); - procedure SetItem(Index: Integer; Value: TcxCustomSchedulerReportLinkPrintStyle); - procedure SetStyleDaily(Value: TcxSchedulerReportLinkDailyPrintStyle); - procedure SetStyleDetails(Value: TcxSchedulerReportLinkDetailsPrintStyle); - procedure SetStyleMemo(Value: TcxSchedulerReportLinkMemoPrintStyle); - procedure SetStyleMonthly(Value: TcxSchedulerReportLinkMonthlyPrintStyle); - procedure SetStyleTimeLine(Value: TcxSchedulerReportLinkTimeLinePrintStyle); - procedure SetStyleTrifold(Value: TcxSchedulerReportLinkTrifoldPrintStyle); - procedure SetStyleWeekly(Value: TcxSchedulerReportLinkWeeklyPrintStyle); - procedure SetStyleYearly(Value: TcxSchedulerReportLinkYearlyPrintStyle); - protected - procedure CreateObjects; override; - procedure DestroyObjects; override; - - { IdxReportLinkOptionsDesignerSupport } - - function DesignerTabIndex: Integer; override; - - procedure ActiveStyleChanged; virtual; - function CreateStyle(AStyleClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; virtual; - procedure CreateStyles; virtual; - procedure DestroyStyles; virtual; - procedure GetStyleByClassEx(AClass: TcxCustomSchedulerReportLinkPrintStyleClass; var AInstance); - procedure SetActiveStyleEx(Value: TcxCustomSchedulerReportLinkPrintStyle); - procedure StyleChanged(AStyle: TcxCustomSchedulerReportLinkPrintStyle); virtual; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function GetCorrespondingStyle: TcxCustomSchedulerReportLinkPrintStyle; virtual; - function GetStyleByClass(AClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; - function GetStyleByName(const Name: string): TcxCustomSchedulerReportLinkPrintStyle; - function GetStyleByView(View: TcxSchedulerCustomView): TcxCustomSchedulerReportLinkPrintStyle; - - function IndexOf(AItem: TcxCustomSchedulerReportLinkPrintStyle): Integer; - - property ActiveStyle: TcxCustomSchedulerReportLinkPrintStyle read FActiveStyle write SetActiveStyle stored False; - property ActiveStyleAssigned: Boolean read FActiveStyleAssigned write SetActiveStyleAssigned; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxCustomSchedulerReportLinkPrintStyle read GetItem write SetItem; default; - published - property Daily: TcxSchedulerReportLinkDailyPrintStyle read GetStyleDaily write SetStyleDaily; - property Details: TcxSchedulerReportLinkDetailsPrintStyle read GetStyleDetails write SetStyleDetails; - property Memo: TcxSchedulerReportLinkMemoPrintStyle read GetStyleMemo write SetStyleMemo; - property Monthly: TcxSchedulerReportLinkMonthlyPrintStyle read GetStyleMonthly write SetStyleMonthly; - property Trifold: TcxSchedulerReportLinkTrifoldPrintStyle read GetStyleTrifold write SetStyleTrifold; - property TimeLine: TcxSchedulerReportLinkTimeLinePrintStyle read GetStyleTimeLine write SetStyleTimeLine; - property Weekly: TcxSchedulerReportLinkWeeklyPrintStyle read GetStyleWeekly write SetStyleWeekly; - property Yearly: TcxSchedulerReportLinkYearlyPrintStyle read GetStyleYearly write SetStyleYearly; - end; - - { DesignWindow } - - TcxfmSchedulerReportLinkDesignWindow = class(TdxfmCustomcxControlReportLinkDesignWindow) - PageControl1: TPageControl; - tshPrintStyles: TTabSheet; - tshStyles: TTabSheet; - bvlStyles: TBevel; - bvlStyleSheets: TBevel; - lblStyleSheets: TLabel; - bvlStylesHost: TBevel; - Label1: TLabel; - lblUseNativeStyles: TLabel; - btnStyleColor: TButton; - btnStyleFont: TButton; - btnStyleBackgroundBitmap: TButton; - cbxStyleSheets: TcxComboBox; - btnStyleSheetNew: TButton; - btnStyleSheetCopy: TButton; - btnStyleSheetDelete: TButton; - btnStylesSaveAs: TButton; - btnStyleSheetRename: TButton; - btnStyleBackgroundBitmapClear: TButton; - btnStyleRestoreDefaults: TButton; - chbxUseNativeStyles: TcxCheckBox; - pmStyles: TPopupMenu; - miStyleFont: TMenuItem; - miStyleColor: TMenuItem; - miLine3: TMenuItem; - miStyleBackgroundBitmap: TMenuItem; - miStyleBackgroundBitmapClear: TMenuItem; - miLine2: TMenuItem; - miStyleRestoreDefaults: TMenuItem; - milLine: TMenuItem; - miStylesSelectAll: TMenuItem; - miLine4: TMenuItem; - miStylesSaveAs: TMenuItem; - ilStylesPopup: TImageList; - lblPreviewWindow: TStaticText; - Panel1: TPanel; - pnlPreview: TPanel; - cbxPrintStyles: TcxImageComboBox; - lblPrintStylesOptions: TLabel; - bvlPrintStyleOptions: TBevel; - pcPrintStyleOptions: TPageControl; - tshWeekly: TTabSheet; - tshMonthly: TTabSheet; - tshTrifold: TTabSheet; - tshDetails: TTabSheet; - tshMemo: TTabSheet; - lblPrintStyleTrifoldSectionLeft: TLabel; - lblPrintStyleTrifoldSectionMiddle: TLabel; - lblPrintStyleTrifoldSectionRight: TLabel; - lblPrintStyleWeeklyPrintTo: TLabel; - lblPrintStyleWeeklyPrintFrom: TLabel; - chbxPrintStyleWeeklyNotesAreaLined: TcxCheckBox; - chbxPrintStyleWeeklyNotesAreaBlank: TcxCheckBox; - lblPrintStyleWeeklyInclude: TLabel; - lblPrintStyleWeeklyLayout: TLabel; - lblPrintStyleWeeklyArrange: TLabel; - cbxPrintStyleWeeklyArrange: TcxComboBox; - cbxPrintStyleWeeklyLayout: TcxComboBox; - chbxPrintStyleWeeklyTaskPad: TcxCheckBox; - tePrintStyleWeeklyPrintFrom: TcxTimeEdit; - tePrintStyleWeeklyPrintTo: TcxTimeEdit; - cbxPrintStyleMonthlyLayout: TcxComboBox; - lblPrintStyleMonthlyLayout: TLabel; - lblPrintStyleMonthlyInclude: TLabel; - chbxPrintStyleMonthlyTaskPad: TcxCheckBox; - chbxPrintStyleMonthlyNotesAreaBlank: TcxCheckBox; - chbxPrintStyleMonthlyNotesAreaLined: TcxCheckBox; - chbxPrintStyleMonthlyDontPrintWeekends: TcxCheckBox; - chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage: TcxCheckBox; - chbxPrintStyleWeeklyDontPrintWeekends: TcxCheckBox; - pnlPrintStylesPreview: TPanel; - pbxPrintStylesPreview: TPaintBox; - chbxPrintStyleDetailsUsePagination: TcxCheckBox; - cbxPrintStyleDetailsPagination: TcxComboBox; - tshFormatting: TTabSheet; - bvlLookAndFeel: TBevel; - lblLookAndFeel: TLabel; - imgLookAndFeel: TImage; - cbxLookAndFeel: TcxComboBox; - lblRefinements: TLabel; - bvlRefinements: TBevel; - imgRefinements: TImage; - chbxSuppressBackgroundBitmaps: TcxCheckBox; - tshPrintRange: TTabSheet; - lblPrintRangeStart: TLabel; - lblPrintRangeEnd: TLabel; - lblPrintRangesMiscellaneous: TLabel; - Bevel1: TBevel; - dePrintRangeStart: TcxDateEdit; - dePrintRangeEnd: TcxDateEdit; - chbxHideDetailsOfPrivateAppointments: TcxCheckBox; - cbxPrintStyleTrifoldSectionLeft: TcxComboBox; - cbxPrintStyleTrifoldSectionMiddle: TcxComboBox; - cbxPrintStyleTrifoldSectionRight: TcxComboBox; - sePrintStyleMonthlyResourceCountPerPage: TcxSpinEdit; - lblPrintStyleMonthlyResourceCountPerPage: TLabel; - lblPrintStyleWeeklyResourceCountPerPage: TLabel; - sePrintStyleWeeklyResourceCountPerPage: TcxSpinEdit; - tshDaily: TTabSheet; - lblPrintStyleDailyLayout: TLabel; - lblPrintStyleDailyInclude: TLabel; - lblPrintStyleDailyPrintFrom: TLabel; - lblPrintStyleDailyPrintTo: TLabel; - lblPrintStyleDailyResourceCountPerPage: TLabel; - cbxPrintStyleDailyLayout: TcxComboBox; - chbxPrintStyleDailyTaskPad: TcxCheckBox; - chbxPrintStyleDailyNotesAreaBlank: TcxCheckBox; - chbxPrintStyleDailyNotesAreaLined: TcxCheckBox; - tePrintStyleDailyPrintFrom: TcxTimeEdit; - tePrintStyleDailyPrintTo: TcxTimeEdit; - sePrintStyleDailyResourceCountPerPage: TcxSpinEdit; - cxEditStyleController1: TcxEditStyleController; - pbPreview: TPaintBox; - chbxPrintStyleMemoStartEachItemOnNewPage: TcxCheckBox; - chbxPrintStyleMemoPrintOnlySelectedEvents: TcxCheckBox; - cbxPrintStyleWeeklyDaysLayout: TcxComboBox; - lblPrintStyleWeeklyDaysLayout: TLabel; - tshYearly: TTabSheet; - cbxPrintStyleYearlyMonthPerPage: TcxComboBox; - lblPrintStyleYearlyMonthPerPage: TLabel; - lblPrintStyleYearlyResourceCountPerPage: TLabel; - sePrintStyleYearlyResourceCountPerPage: TcxSpinEdit; - chbxPrintStyleYearlyTaskPad: TcxCheckBox; - chbxPrintStyleYearlyNotesAreaBlank: TcxCheckBox; - chbxPrintStyleYearlyNotesAreaLined: TcxCheckBox; - lblPrintStyleYearlyInclude: TLabel; - cbxPrintStyleYearlyLayout: TcxComboBox; - lblPrintStyleYearlyLayout: TLabel; - chbxPrimaryPageHeadersOnly: TcxCheckBox; - chbxPrintStyleDailyShowResourceImages: TcxCheckBox; - chbxPrintStyleDailyShowEventImages: TcxCheckBox; - chbxPrintStyleWeeklyShowEventImages: TcxCheckBox; - chbxPrintStyleWeeklyShowResourceImages: TcxCheckBox; - chbxPrintStyleMonthlyShowEventImages: TcxCheckBox; - chbxPrintStyleMonthlyShowResourceImages: TcxCheckBox; - chbxPrintStyleYearlyShowEventImages: TcxCheckBox; - tshTimeLine: TTabSheet; - lblPrintStyleTimeLineResourceCountPerPage: TLabel; - sePrintStyleTimeLineResourceCountPerPage: TcxSpinEdit; - chbxPrintStyleTimeLineTaskPad: TcxCheckBox; - lblPrintStyleTimeLineInclude: TLabel; - chbxPrintStyleTimeLineNotesAreaBlank: TcxCheckBox; - chbxPrintStyleTimeLineNotesAreaLined: TcxCheckBox; - tePrintStyleTimeLinePrintFrom: TcxTimeEdit; - lblPrintStyleTimeLinePrintFrom: TLabel; - lblPrintStyleTimeLinePrintTo: TLabel; - tePrintStyleTimeLinePrintTo: TcxTimeEdit; - chbxPrintStyleTimeLineShowEventImages: TcxCheckBox; - Bevel6: TBevel; - chbxPrintStyleTimeLinePrimaryPageScalesOnly: TcxCheckBox; - chbxPrintStyleTimeLineDontPrintWeekends: TcxCheckBox; - bvlTimeLineImages: TBevel; - Label2: TLabel; - lbTimeLineImages: TLabel; - Bevel2: TBevel; - lbViewDaily: TLabel; - Bevel7: TBevel; - lbImagesDaily: TLabel; - Bevel3: TBevel; - Label5: TLabel; - Bevel8: TBevel; - Label6: TLabel; - Bevel9: TBevel; - Label7: TLabel; - Bevel10: TBevel; - Label8: TLabel; - Bevel4: TBevel; - Label9: TLabel; - Bevel5: TBevel; - Label10: TLabel; - chbxPrintStyleTimeLineWorkTimeOnly: TcxCheckBox; - chbxPrintStyleTimeLineShowResourceImages: TcxCheckBox; - chbxPrintStyleTimeLinePrimaryPageHeadersOnly: TcxCheckBox; - chbxSuppressContentColoration: TcxCheckBox; - procedure PageControl1Change(Sender: TObject); - procedure lbxStylesClick(Sender: TObject); - procedure btnStyleFontClick(Sender: TObject); - procedure btnStyleColorClick(Sender: TObject); - procedure btnStyleBackgroundBitmapClick(Sender: TObject); - procedure btnStyleBackgroundBitmapClearClick(Sender: TObject); - procedure btnStyleRestoreDefaultsClick(Sender: TObject); - procedure btnStylesSaveAsClick(Sender: TObject); - procedure cbxStyleSheetsClick(Sender: TObject); - procedure miStylesSelectAllClick(Sender: TObject); - procedure cbxStyleSheetsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure btnStyleSheetNewClick(Sender: TObject); - procedure btnStyleSheetCopyClick(Sender: TObject); - procedure btnStyleSheetDeleteClick(Sender: TObject); - procedure btnStyleSheetRenameClick(Sender: TObject); - procedure lblUseNativeStylesClick(Sender: TObject); - procedure OptionsFormattingClick(Sender: TObject); - procedure pmStylesPopup(Sender: TObject); - procedure cbxPrintStylesClick(Sender: TObject); - procedure pbxPrintStylesPreviewPaint(Sender: TObject); - procedure cbxPrintStyleDailyLayoutClick(Sender: TObject); - procedure chbxPrintStyleOptionsViewClick(Sender: TObject); - procedure cbxPrintStyleWeeklyArrangeClick(Sender: TObject); - procedure chbxPrintStyleWeeklyDontPrintWeekendsClick(Sender: TObject); - procedure chbxPrintStyleDontPrintWeekEndsClick(Sender: TObject); - procedure chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick( - Sender: TObject); - procedure cbxPrintStyleTrifoldSectionModeClick(Sender: TObject); - procedure chbxPrintStyleDetailsUsePaginationClick(Sender: TObject); - procedure cbxPrintStyleDetailsPaginationClick(Sender: TObject); - procedure cbxPrintStyleWeeklyLayoutClick(Sender: TObject); - procedure cbxPrintStyleMonthlyLayoutClick(Sender: TObject); - procedure dePrintRangeStartEditValueChanged(Sender: TObject); - procedure dePrintRangeEndEditValueChanged(Sender: TObject); - procedure cbxStyleSheetsPropertiesDrawItem(AControl: TcxCustomComboBox; - ACanvas: TcxCanvas; AIndex: Integer; const ARect: TRect; - AState: TOwnerDrawState); - procedure tePrintStylePrintRangePropertiesEditValueChanged( - Sender: TObject); - procedure LookAndFeelChange(Sender: TObject); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure sePrintStyleResourceCountPerPagePropertiesEditValueChanged( - Sender: TObject); - procedure tePrintStylePrintRangePropertiesChange(Sender: TObject); - procedure sePrintStyleResourceCountPerPagePropertiesChanged( - Sender: TObject); - procedure StyleController1StyleChanged(Sender: TObject); - procedure pbPreviewPaint(Sender: TObject); - procedure cbxLookAndFeelPropertiesChange(Sender: TObject); - procedure chbxPrintStyleMemoStartEachItemOnNewPageClick( - Sender: TObject); - procedure chbxPrintStyleMemoPrintOnlySelectedEventsClick( - Sender: TObject); - procedure cbxPrintStyleWeeklyDaysLayoutClick(Sender: TObject); - procedure cbxPrintStyleYearlyLayoutClick(Sender: TObject); - procedure cbxPrintStyleYearlyMonthPagesPerYearClick(Sender: TObject); - procedure chbxPrimaryPageHeadersOnlyClick(Sender: TObject); - procedure chbxPrintStyleShowResourceImagesClick(Sender: TObject); - procedure chbxPrintStyleShowEventImagesClick(Sender: TObject); - procedure chbxPrimaryPageScalesOnlyClick(Sender: TObject); - procedure chbxPrintStyleWorkTimeOnlyClick(Sender: TObject); - private - FActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; - FActiveStyleAssigned: Boolean; - FIsFormClosing: Boolean; - lbxStyles: TdxStylesListBox; - wpPrintStyles: TList; - - function GetActivePrintStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetActiveStyle: TcxStyle; - function GetComponent: TcxScheduler; - function GetHasSelectedStyles: Boolean; - function GetHasSelectedStylesWithAssignedBitmap: Boolean; - function GetReportLink: TcxSchedulerReportLink; - - function CanSelectAllStyles: Boolean; - procedure CreateControls; - - procedure RecreateStylesListBox; - procedure RestoreSelectedStyles(AList: TList); - procedure SaveSelectedStyles(AList: TList); - procedure SetActivePage; - - procedure SetOptionsFormattingByIndex(AnIndex: Integer; AValue: Boolean); - procedure SetPrintStyleOptionsViewByIndex(AnIndex: Integer; AValue: Boolean); - procedure SetPrintStyleRangeByIndex(AnIndex: Integer; const ATime: TDateTime); - procedure SetPrintStyleResourceCountPerPageByIndex(AnIndex: Integer; AValue: TcxEditValue); - procedure SetShowImagesCheckBoxes(AEventImages, AResourceImages: TcxCheckBox; - APrintStyle: TcxCustomSchedulerReportLinkPrintStyle); - protected - procedure AssignDailyTabObjects; virtual; - procedure AssignDetailsTabObjects; virtual; - procedure AssignMemoTabObjects; virtual; - procedure AssignMonthlyTabObjects; virtual; - procedure AssignTimeLineTabObjects; virtual; - procedure AssignTrifoldTabObjects; virtual; - procedure AssignWeeklyTabObjects; virtual; - procedure AssignYearlyTabObjects; virtual; - - function CanApply: Boolean; override; - procedure DoApply; override; - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - - function CheckPrintRange: Boolean; virtual; - function CheckPrintStyleSettings: Boolean; virtual; - function IsValidConditions: Boolean; virtual; - procedure HideOptionsButtons; - procedure LoadCaption(AControl: TControl; StrPtr: Pointer); overload; - procedure LoadCaption(AItem: TMenuItem; StrPtr: Pointer); overload; - procedure LoadStrings; override; - procedure LoadStringsCombo(ACombo: TcxComboBox; ACaptions: array of Pointer); - procedure LoadStringsDaily; virtual; - procedure LoadStringsDetails; virtual; - procedure LoadStringsMemo; virtual; - procedure LoadStringsMonthly; virtual; - procedure LoadStringsOther; virtual; - procedure LoadStringsTimeLineStyle; virtual; - procedure LoadStringsTrifold; virtual; - procedure LoadStringsWeekly; virtual; - procedure LoadStringsYearly; virtual; - - procedure PreviewDrawPageContent(ACanvas: TCanvas; ABounds: TRect); virtual; - - procedure UpdateControlsState; override; - procedure UpdateEnabled(AControl: TControl; AEnabled: Boolean); overload; - procedure UpdateEnabled(AItem: TMenuItem; AEnabled: Boolean); overload; - procedure UpdateEnabledControls(AControls: array of TControl; AEnabled: Boolean); - procedure UpdatePreview; override; - - function GetDesignerTabIndex: Integer; override; - procedure SetDesignerTabIndex(Value: Integer); override; - - procedure DoActiveStyleSheetChanged; override; - procedure DoFormActivated(AnActive: Boolean); override; - procedure DoRefreshStylesList; override; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); override; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); override; - - procedure GetSelectedStyleNames(AStrings: TStrings); override; - procedure GetStyleNames(out AStrings: TStrings); override; - procedure GetStyleSheetNames(out AStrings: TStrings); override; - - procedure ActivatePrintStyleTab; virtual; - procedure AssignTabSheetObjects; virtual; - function FindTabIndexByPrintStyle(APrintStyle: TcxCustomSchedulerReportLinkPrintStyle): Integer; virtual; - procedure RefreshPrintStyles; virtual; - - property ActivePrintStyle: TcxCustomSchedulerReportLinkPrintStyle read GetActivePrintStyle; - property ActiveStyle: TcxStyle read GetActiveStyle; - property HasSelectedStyles: Boolean read GetHasSelectedStyles; - property HasSelectedStylesWithAssignedBitmap: Boolean read GetHasSelectedStylesWithAssignedBitmap; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; override; - - property Component: TcxScheduler read GetComponent; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - end; - - // cells - - { TcxSchedulerReportPageSite } - - TcxSchedulerReportPageSite = class(TdxReportCell) - protected - FPageIndex: Integer; - FPrimaryPage: Boolean; - - procedure ReadProperties(AReader: TdxPSDataReader); override; - procedure WriteProperties(AWriter: TdxPSDataWriter); override; - public - property PageIndex: Integer read FPageIndex; - property PrimaryPage: Boolean read FPrimaryPage; - end; - - { TcxSchedulerReportPageItemCell } - - TcxSchedulerReportPageItemCell = class(TdxReportCell) - private - function GetPageIndex: Integer; - function GetPageSite: TcxSchedulerReportPageSite; - function GetPrimaryPage: Boolean; - function GetReportLink: TcxSchedulerReportLink; - protected - function GetType: TcxSchedulerReportItemsType; virtual; - - procedure SetCellViewParams(AItem: TdxReportVisualItem; const AParams: TcxViewParams); overload; - procedure SetCellViewParams(AItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); overload; - - property ReportLink: TcxSchedulerReportLink read GetReportLink; - public - constructor Create(AParent: TdxReportCell); override; - property PageSite: TcxSchedulerReportPageSite read GetPageSite; - property PrimaryPage: Boolean read GetPrimaryPage; - property PageIndex: Integer read GetPageIndex; - end; - - { TcxSchedulerReportNotesDataCell } - - TcxSchedulerReportNotesDataCell = class(TAbstractdxReportCellData) - private - FCaption: string; - FCaptionHeight: Integer; - FLined: Boolean; - function GetMultiLine: Boolean; - function GetTextAlignX: TcxTextAlignX; - function GetTextAlignY: TcxTextAlignY; - procedure SetMultiLine(Value: Boolean); - procedure SetTextAlignX(Value: TcxTextAlignX); - procedure SetTextAlignY(Value: TcxTextAlignY); - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor Create(AParent: TdxReportCell); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - - property Caption: string read FCaption write FCaption; - property CaptionHeight: Integer read FCaptionHeight write FCaptionHeight; - property Lined: Boolean read FLined write FLined; - property MultiLine: Boolean read GetMultiLine write SetMultiLine; - property TextAlignX: TcxTextAlignX read GetTextAlignX write SetTextAlignX; - property TextAlignY: TcxTextAlignY read GetTextAlignY write SetTextAlignY; - end; - - TcxSchedulerReportNotesDataCellClass = class of TcxSchedulerReportNotesDataCell; - - { TcxSchedulerReportNotesAreaCell } - - TcxSchedulerReportNotesAreaCell = class(TcxSchedulerReportPageItemCell) - private - FLined: Boolean; - function GetDataCell: TcxSchedulerReportNotesDataCell; - protected - procedure BoundsChanged; override; - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - function GetType: TcxSchedulerReportItemsType; override; - function GetDataCellClass: TcxSchedulerReportNotesDataCellClass; virtual; - procedure SetFontIndex(Value: Integer); override; - public - constructor Create(AParent: TdxReportCell); override; - constructor CreateEx(AParent: TdxReportCell; ALined: Boolean); virtual; - property DataCell: TcxSchedulerReportNotesDataCell read GetDataCell; - property Lined: Boolean read FLined; - end; - - { TcxSchedulerReportTaskPadCell } - - TcxSchedulerReportTaskPadCell = class(TcxSchedulerReportNotesAreaCell) - private - function GetTaskPadDataSite: TdxReportCell; - protected - procedure BoundsChanged; override; - function CalculateTaskPadDataSiteBounds: TRect; virtual; - function GetType: TcxSchedulerReportItemsType; override; - public - constructor CreateEx(AParent: TdxReportCell; ALined: Boolean); override; - - property TaskPadDataSite: TdxReportCell read GetTaskPadDataSite; - end; - - { TcxSchedulerReportSchedulerHeaderDataCell } - - TcxSchedulerReportSchedulerHeaderDataCell = class(TAbstractdxReportCellData) - public - constructor Create(AParent: TdxReportCell); override; - end; - - { TcxSchedulerReportSchedulerHeaderCell } - - TcxSchedulerReportSchedulerHeaderCell = class(TcxSchedulerReportPageItemCell) - private - FContent: TcxSchedulerReportSchedulerHeaderDataCell; - FDate: TDateTime; - FPrimaryText: string; //todo: remove - FSecondaryText: string; //todo: remove - FPrimaryTextCell: TdxReportCellString; - FSecondaryTextCell: TdxReportCellString; - protected - function AddContentCell: TcxSchedulerReportSchedulerHeaderDataCell; virtual; - function AddTextCell(AText: string; const ABounds: TRect; AMultiLine: Boolean): TdxReportCellString; - function GetType: TcxSchedulerReportItemsType; override; - - property Date: TDateTime read FDate write FDate; - property PrimaryText: string read FPrimaryText write FPrimaryText; //todo: remove - property SecondaryText: string read FSecondaryText write FSecondaryText; //todo: remove - public - constructor Create(AParent: TdxReportCell); override; - procedure AdjustTextSize; - - property Content: TcxSchedulerReportSchedulerHeaderDataCell read FContent; - property PrimaryTextCell: TdxReportCellString read FPrimaryTextCell; - property SecondaryTextCell: TdxReportCellString read FSecondaryTextCell; - end; - - { TcxSchedulerReportDateNavigatorItem } - - TcxSchedulerReportDateNavigatorItem = class(TdxReportCellPreviewText) - private - function GetDateNavigator: TcxSchedulerReportDateNavigatorCell; - protected - function GetDefaultDTFormat: DWORD; override; - procedure SetText(const Value: string); override; - public - constructor Create(AParent: TdxReportCell); override; - - property DateNavigator: TcxSchedulerReportDateNavigatorCell read GetDateNavigator; - end; - - { TcxSchedulerReportDateNavigatorHeader } - - TcxSchedulerReportDateNavigatorHeader = class(TcxSchedulerReportDateNavigatorItem) - private - FMonth: Word; - FYear: Word; - protected - function GetText: string; override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; AYear, AMonth: Word); - procedure Assign(Source: TPersistent); override; - - property Month: Word read FMonth; - property Year: Word read FYear; - end; - - { TcxSchedulerReportDateNavigatorDay } - - TcxSchedulerReportDateNavigatorDay = class(TcxSchedulerReportDateNavigatorItem) - private - FDay: Integer; - FCol: Integer; - FRow: Integer; - function GetBold: Boolean; - function GetDate: TDate; - function GetMonth: Word; - function GetYear: Word; - procedure SetBold(Value: Boolean); - protected - function GetText: string; override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; - ADay, ACol, ARow: Integer; ABold: Boolean); virtual; - procedure Assign(Source: TPersistent); override; - - property Col: Integer read FCol; - property Date: TDate read GetDate; - property Day: Integer read FDay write FDay; - property Bold: Boolean read GetBold write SetBold; - property Month: Word read GetMonth; - property Row: Integer read FRow; - property Year: Word read GetYear; - end; - - { TcxSchedulerReportDateNavigatorDayCaption } - - TcxSchedulerReportDateNavigatorDayCaption = class(TcxSchedulerReportDateNavigatorItem) - private - FCol: Integer; - FDayOfWeek: TDay; - FDayText: string; - protected - function GetText: string; override; - function GetDayText: string; virtual; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; ADayOfWeek: TDay; ACol: Integer); virtual; - procedure Assign(Source: TPersistent); override; - - property Col: Integer read FCol; - property DayOfWeek: TDay read FDayOfWeek; - end; - - { TcxSchedulerReportDateNavigatorWeekNumber } - - TcxSchedulerReportDateNavigatorWeekNumber = class(TcxSchedulerReportDateNavigatorItem) - private - FWeekNumber: Integer; - FRow: Integer; - protected - function GetText: string; override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; AWeekNumber, ARow: Integer); virtual; - procedure Assign(Source: TPersistent); override; - - property Row: Integer read FRow; - property WeekNumber: Integer read FWeekNumber write FWeekNumber; - end; - - { TcxSchedulerReportDateNavigatorCell } - - TcxSchedulerReportDateNavigatorCell = class(TcxSchedulerReportPageItemCell) - private - FBoldedDays: TcxSchedulerDateList; - FFirstWeekOfYear: TcxFirstWeekOfYear; - FMonth: Word; - FShowDatesContainingEventsInBold: Boolean; - FShowWeekNumbers: Boolean; - FStartOfWeek: TDay; - FYear: Word; - - FColWidth: Integer; - FDayCaptionsHeight: Integer; - FHeaderHeight: Integer; - FMonthSize: TSize; - FRowHeight: Integer; - FVertOffset: Integer; - FContentParams: TdxReportItemViewParams; - FHeaderParams: TdxReportItemViewParams; - - FDayCaptionCount: Integer; - FDayCount: Integer; - FWeekNumberCount: Integer; - - class function GetMonthHeight(AHeaderHeight, ADayCaptionsHeight, ARowHeight: Integer): Integer; - function GetDay(Index: Integer): TcxSchedulerReportDateNavigatorDay; - function GetDayCaption(Index: Integer): TcxSchedulerReportDateNavigatorDayCaption; - function GetHeader: TcxSchedulerReportDateNavigatorHeader; - function GetWeekNumber(Index: Integer): TcxSchedulerReportDateNavigatorWeekNumber; - protected - procedure AdjustItemsVertical; - function ColOfDate(ADate: TDateTime): Integer; - procedure CreateDayCaptions; virtual; - procedure CreateDay(const ABounds: TRect; ADate: TDateTime; ACol, ARow: Integer); virtual; - procedure CreateItems; - procedure CreateLines; virtual; - procedure CreateMonth; virtual; - procedure CreateMonthHeader; virtual; - procedure CreateWeekNumber(const ABounds: TRect; ADate: TDateTime; ARow: Integer); virtual; - class procedure GetContentPartSizes(AFont: TFont; var AColWidth, ARowHeight, - ADayCaptionsHeight: Integer; AFontSize: Integer = 0); virtual; - function GetDayBoundsFromColAndRow(ACol, ARow: Integer): TRect; virtual; - function GetDayIsBold(ADate: TDateTime): Boolean; virtual; - function GetHeaderBounds: TRect; virtual; - class procedure GetHeaderPartSizes(AFont: TFont; var AHeaderHeight: Integer; - AFontSize: Integer = 0); virtual; - function GetMonthSize(const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; - function GetType: TcxSchedulerReportItemsType; override; - procedure SetViewParams(const AContentParams, AHeaderParams: TdxReportItemViewParams); virtual; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property ColWidth: Integer read FColWidth; - property DayCaptionsHeight: Integer read FDayCaptionsHeight; - property HeaderHeight: Integer read FHeaderHeight; - property MonthSize: TSize read FMonthSize; - property RowHeight: Integer read FRowHeight; - property ContentParams: TdxReportItemViewParams read FContentParams; - property HeaderParams: TdxReportItemViewParams read FHeaderParams; - public - constructor Create(AParent: TdxReportCell); override; - constructor CreateEx(AParent: TdxReportCell; AFirstWeekOfYear: TcxFirstWeekOfYear; - AYear, AMonth: Word; AShowDatesContainingEventsInBold, AShowWeekNumbers: Boolean); virtual; - - procedure AdjustSize(var AContentParams, AHeaderParams: TdxReportItemViewParams; AHeight, AMaxHeight: Integer); virtual; - function CalculateSize(const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; - class function MeasureDateNavigatorHeight(const AContentParams, AHeaderParams: TcxViewParams): Integer; virtual; - - property FirstWeekOfYear: TcxFirstWeekOfYear read FFirstWeekOfYear write FFirstWeekOfYear; - property Month: Word read FMonth write FMonth; - property ShowDatesContainingEventsInBold: Boolean read FShowDatesContainingEventsInBold write FShowDatesContainingEventsInBold; - property ShowWeekNumbers: Boolean read FShowWeekNumbers write FShowWeekNumbers; - property StartOfWeek: TDay read FStartOfWeek; - property Year: Word read FYear write FYear; - - // Helpers - property DayCaptionCount: Integer read FDayCaptionCount; - property DayCaptions[Index: Integer]: TcxSchedulerReportDateNavigatorDayCaption read GetDayCaption; - property DayCount: Integer read FDayCount; - property Days[Index: Integer]: TcxSchedulerReportDateNavigatorDay read GetDay; - property Header: TcxSchedulerReportDateNavigatorHeader read GetHeader; - property WeekNumberCount: Integer read FWeekNumberCount; - property WeekNumbers[Index: Integer]: TcxSchedulerReportDateNavigatorWeekNumber read GetWeekNumber; - end; - - { TcxSchedulerReportSchedulingAreaCell } - - TcxSchedulerReportSchedulingAreaCell = class(TcxSchedulerReportPageItemCell) - private - FVisibleDays: TcxSchedulerDateList; - FDaysList: TStringList; - protected - function GetType: TcxSchedulerReportItemsType; override; - property VisibleDays: TcxSchedulerDateList read FVisibleDays; - public - constructor Create(AParent: TdxReportCell); override; - destructor Destroy; override; - procedure DrawContent(DC: HDC; DrawRect: TRect; const OriginRect: TRect; AStage: TdxPSRenderStages); override; - procedure DrawItself(DC: HDC; AStage: TdxPSRenderStages); override; - end; - - TcxSchedulerReportCustomCell = class(TAbstractdxReportCellData) - private - function GetReportLink: TcxSchedulerReportLink; - protected - FDateTime: TDateTime; - FDayBorderColor: TColor; - FNoClip: Boolean; - procedure DrawCellFrame(DC: HDC; const ARect: TRect; ABorders: TcxBorders = []; - ABorderColor: TColor = clDefault; ALineWidth: Integer = 1); - procedure DrawCellRect(DC: HDC; const ARect: TRect; ABorders: TcxBorders = []; - ABorderColor: TColor = clDefault; ALineWidth: Integer = 1; AColor: TColor = clDefault); - procedure DrawCellText(DC: HDC; const ARect: TRect; const AText: string; AlignHorz: TcxTextAlignX; - AlignVert: TcxTextAlignY; AFont: TFont = nil; AColor: TColor = clDefault; AMultiLine: Boolean = False); - procedure DrawCellTextVert(DC: HDC; const ARect: TRect; const AText: string; - AlignHorz: TcxTextAlignX; AlignVert: TcxTextAlignY; AFont: TFont = nil; AMultiLine: Boolean = True); - procedure DrawCellState(DC: HDC; R: TRect; - AState: Integer; ABorders: TcxBorders = []; ABorderColor: TColor = clBlack); - - function AdjustTextRect(const ARect: TRect): TRect; - function ExcludeBorders(const ARect: TRect; ABorders: TcxBorders; ABorderWidth: Integer = 1): TRect; - function FixupWidth(AWidth: Integer): Integer; - function GetFixupRect(DC: HDC; const ARect: TRect): TRect; - function InflateRect(const ARect: TRect; dX, dY: Integer): TRect; - - property ReportLink: TcxSchedulerReportLink read GetReportLink; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); virtual; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class procedure RegisterMirrorClass; virtual; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; virtual; - procedure SuppressColoration; virtual; - end; - - { TcxSchedulerReportContentCell } - - TcxSchedulerReportContentCell = class(TcxSchedulerReportCustomCell) - protected - FBorderColor: TColor; - FShowTimeLine: Boolean; -// FSmallFont: Boolean; - FState: Integer; - FTimeLineBorders: TcxBorders; - function HasBorderColoration: Boolean; override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - procedure SuppressColoration; override; - end; - - { TcxSchedulerReportHeaderItemCell } - - TcxSchedulerReportHeaderItemCell = class(TcxSchedulerReportCustomCell) - private - FCaption: string; - FDate: TDateTime; - FIsResourceHeader: Boolean; - FResourceID: Variant; - FRotateText: Boolean; - //support images - FImageIndex: Integer; - FImages: TCustomImageList; - FImageRect: TRect; - FTextRect: TRect; - function GetTextAlignX: TcxTextAlignX; - function GetTextAlignY: TcxTextAlignY; - procedure SetTextAlignX(Value: TcxTextAlignX); - procedure SetTextAlignY(Value: TcxTextAlignY); - protected - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - function HasImage: Boolean; virtual; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - procedure DrawImage(DC: HDC); - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - property TextAlignX: TcxTextAlignX read GetTextAlignX write SetTextAlignX; - property TextAlignY: TcxTextAlignY read GetTextAlignY write SetTextAlignY; - - property TextRect: TRect read FTextRect; - property Caption: string read FCaption write FCaption; - property Date: TDateTime read FDate; - property ImageIndex: Integer read FImageIndex; - property ImageRect: TRect read FImageRect; - property Images: TCustomImageList read FImages; - property IsResourceHeader: Boolean read FIsResourceHeader; - property ResourceID: Variant read FResourceID; - property RotateText: Boolean read FRotateText; - end; - - { TcxSchedulerReportGroupSeparatorCell } - - TcxSchedulerReportGroupSeparatorCell = class(TcxSchedulerReportCustomCell) - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - end; - - { TcxSchedulerReportContainerCell } - - TcxSchedulerReportContainerCell = class(TcxSchedulerReportCustomCell) - public - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - end; - - { TcxSchedulerReportTextCell } - - TcxSchedulerReportTextCell = class(TcxSchedulerReportCustomCell) - protected - FDisplayText: string; - FTextRect: TRect; - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - - property DisplayText: string read FDisplayText write FDisplayText; - property TextRect: TRect read FTextRect write FTextRect; - end; - - { TcxSchedulerReportBackgroundSlotCell } - - TcxSchedulerReportBackgroundSlotCell = class(TcxSchedulerReportTextCell) - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - end; - - { TcxSchedulerReportTimeLineMinorScaleCell } - - TcxSchedulerReportTimeLineMinorScaleCell = class(TcxSchedulerReportBackgroundSlotCell) - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - end; - - { TcxSchedulerReportTimeLineMajorScaleCell } - - TcxSchedulerReportTimeLineMajorScaleCell = class(TcxSchedulerReportBackgroundSlotCell) - public - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - end; - - { TcxSchedulerReportDailyTimeRulerCellsSite } - - TcxSchedulerReportDailyTimeRulerCellsSite = class(TdxReportCell) - private - FLargeFont: TFont; - FLargeFontIndex: Integer; - function GetLargeFont: TFont; - protected - procedure SetFontIndex(Index: Integer); override; - procedure ReadProperties(AReader: TdxPSDataReader); override; - procedure WriteProperties(AWriter: TdxPSDataWriter); override; - public - constructor Create(AParent: TdxReportCell); override; - destructor Destroy; override; - property LargeFont: TFont read GetLargeFont; - end; - - { TcxSchedulerReportDailyTimeRulerCell } - - TcxSchedulerReportDailyTimeRulerCell = class(TcxSchedulerReportCustomCell) - private - function GetBoundsRect(AType: Boolean): TRect; - function GetDisplayText(AType: Boolean): string; - function GetLargeFont: TFont; - function GetTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; - protected - FBounds: array[Boolean] of TRect; - FDisplayTexts: array[Boolean] of string; - FHasAdditionalTimeZone: Boolean; - FHour: Integer; - FLineColor: TColor; - FLineCount: Integer; - FShowMinutes: Boolean; - procedure CalculateDisplayInfo; - procedure DrawTimeZone(DC: HDC; const ABounds: TRect; const AText: string; AIsCurrent: Boolean); virtual; - procedure DrawTimeZoneLabel(DC: HDC; const ABounds: TRect; const AText: string; ABorders: TcxBorders); virtual; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property LargeFont: TFont read GetLargeFont; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - procedure SuppressColoration; override; - - property Bounds[ACurrentTimeZone: Boolean]: TRect read GetBoundsRect; - property DisplayTexts[ACurrentTimeZone: Boolean]: string read GetDisplayText; - property HasAdditionalTimeZone: Boolean read FHasAdditionalTimeZone; - property Hour: Integer read FHour; - property LineCount: Integer read FLineCount; - property ShowMinutes: Boolean read FShowMinutes; - property TimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite read GetTimeRulerSite; - end; - - { TcxSchedulerReportMonthDayCell } - - TcxSchedulerReportMonthDayCell = class(TcxSchedulerReportContentCell) - private - FSmallFont: Boolean; - FDisplayText: string; - FDontPrint: Boolean; - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - property DisplayText: string read FDisplayText write FDisplayText; - property SmallFont: Boolean read FSmallFont write FSmallFont; - end; - - { TcxSchedulerReportTimeLinePart} - - TcxSchedulerReportTimeLinePart = class(TdxReportCellBox) - private - FState: Integer; - FTriangle: Boolean; - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - property State: Integer read FState write FState; - public - constructor CreateEx(AParent: TdxReportCell; ATriangle: Boolean; AState: Integer); - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - end; - - { TcxSchedulerReportTimeLineCell } - - TcxSchedulerReportTimeLineCell = class(TdxReportCell) - private - FCurrentValue: TAbstractdxReportCellData; - public - constructor Create(AParent: TdxReportCell); override; - procedure SetTimeRect(const ABounds: TRect; AState: Integer); - end; - - TcxSchedulerReportCellString = class(TdxReportCellString) - protected - function GetDefaultDTFormat: DWORD; override; - end; - - { TcxSchedulerReportCustomEventCell } - - TcxSchedulerReportCustomEventCell = class(TdxReportCell) - private - function GetPrintStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetReportLink: TcxSchedulerReportLink; - function GetSuppressColoration: Boolean; - protected - FCaptionCell: TdxReportCellString; - FMessageCell: TAbstractdxReportCellData; - FStartCell: TdxReportCellString; - FFinishCell: TdxReportCellString; - FTimeLineCell: TcxSchedulerReportTimeLineCell; - procedure CreateMessageCell(AProperties: TcxCustomEditProperties); virtual; - function GetMessage: Variant; virtual; - function GetMessageClass(AProperties: TcxCustomEditProperties): TdxReportCellDataClass; virtual; - function GetValidMessage(const AMessage: Variant; AProperties: TcxCustomEditProperties): Variant; virtual; - procedure InitializeMessageCell(AProperties: TcxCustomEditProperties; - const AViewParams: TcxViewParams); virtual; - function NeedExtractPlainTextForMessage(AProperties: TcxCustomEditProperties): Boolean; virtual; - procedure SetViewParams(const AViewParams: TcxViewParams); virtual; - public - function CreateStringCell(const AText: string; AMultiline: Boolean = True; AData: Integer = 0): TdxReportCellString; virtual; - - property CaptionCell: TdxReportCellString read FCaptionCell; - property StartCell: TdxReportCellString read FStartCell; - property FinishCell: TdxReportCellString read FFinishCell; - property MessageCell: TAbstractdxReportCellData read FMessageCell; - property PrintStyle: TcxCustomSchedulerReportLinkPrintStyle read GetPrintStyle; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - property TimeLineCell: TcxSchedulerReportTimeLineCell read FTimeLineCell; - property SuppressColoration: Boolean read GetSuppressColoration; - end; - - { TcxSchedulerReportEventCell } - - TcxSchedulerReportEventCell = class(TcxSchedulerReportCustomEventCell) - private - FCaptionLeft: Integer; - FContentBounds: TRect; - FEditProperties: TcxCustomEditProperties; - FEditViewInfo: TcxCustomEditViewInfo; - FEventViewInfo: TcxSchedulerEventCellViewInfo; - FHasDetailInfo: Boolean; - FHasImages: Boolean; - FHasMessage: Boolean; - FIsHeaderEvent: Boolean; - FIsNeedCreateTimeCells: Boolean; - FOrigin: TPoint; - procedure CheckBounds(var ABounds: TRect); - function GetEvent: TcxSchedulerControlEvent; - protected - procedure AdjustItemsHeight(DC: HDC); virtual; - procedure CalculateLayout; virtual; - procedure CalculateTimeLine(DC: HDC); virtual; - function CreateCaptionCell: TdxReportCellString; virtual; - procedure CreateDataItems; virtual; - procedure CreateEventImageCells; virtual; - function CreateTimeLineCell: TcxSchedulerReportTimeLineCell; virtual; - function CreateTimeTextCell(const ATimeText: string; AData: Integer = 0): TdxReportCellString; virtual; - function GetCaptionRect(DC: HDC): TRect; virtual; - function GetContentBounds(DC: HDC): TRect; virtual; - function GetHasImages: Boolean; virtual; - function GetHasMessage: Boolean; virtual; - function GetMessage: Variant; override; - function GetMessageRect(DC: HDC): TRect; virtual; - function GetRelativeRect(const R: TRect): TRect; - function GetTimeLineRect(DC: HDC): TRect; virtual; - procedure InitializeFromViewInfo(AEventViewInfo: TcxSchedulerEventCellViewInfo); - procedure InitializeMessageCell(AProperties: TcxCustomEditProperties; - const AViewParams: TcxViewParams); override; - procedure SetViewParams(const AViewParams: TcxViewParams); override; - - property ContentBounds: TRect read FContentBounds; - property EditProperties: TcxCustomEditProperties read FEditProperties; - property Event: TcxSchedulerControlEvent read GetEvent; - property EventViewInfo: TcxSchedulerEventCellViewInfo read FEventViewInfo; - property HasDetailInfo: Boolean read FHasDetailInfo; - property HasImages: Boolean read FHasImages; - property IsHeaderEvent: Boolean read FIsHeaderEvent; - property IsNeedCreateTimeCells: Boolean read FIsNeedCreateTimeCells; - public - constructor CreateFrom(AParent: TdxReportCell; AEventViewInfo: TcxSchedulerEventCellViewInfo); virtual; - - property CaptionCell: TdxReportCellString read FCaptionCell; - property HasMessage: Boolean read FHasMessage; - property Message: Variant read GetMessage; - property MessageCell; - property TimeLineCell; - property StartCell; - property FinishCell; - end; - - { TcxSchedulerReportDetailsEventCell } - - TcxSchedulerReportDetailsEventCell = class(TcxSchedulerReportCustomEventCell) - protected - FContinued: Boolean; - FDate: TDateTime; - FEditProperties: TcxCustomEditProperties; - FEvent: TcxSchedulerEvent; - FLineHeight: Integer; - FViewParams: TcxViewParams; - procedure CreateCaptionCell; virtual; - procedure CreateDataItems; virtual; - procedure CreateMessageCell(AProperties: TcxCustomEditProperties); override; - procedure CreateTimeCell; virtual; - function GetCaptionCellText: string; virtual; - function GetEditProperties: TcxCustomEditProperties; virtual; - function GetMessage: Variant; override; - function GetTimeCellText: string; virtual; - procedure SetViewParams(const AViewParams: TcxViewParams); override; - - property EditProperties: TcxCustomEditProperties read FEditProperties; - property ViewParams: TcxViewParams read FViewParams; - public - constructor CreateEx(AParent: TdxReportCell; AEvent: TcxSchedulerEvent; - ADate: TDateTime; const AParams: TcxViewParams; AContinued: Boolean = False); - function CalculateHeight: Integer; virtual; - procedure CalculateLayout(AWidth, ATimeWidth: Integer); virtual; - - property Date: TDateTime read FDate; - property Event: TcxSchedulerEvent read FEvent; - property Continued: Boolean read FContinued; - end; - - { TcxSchedulerReportMemoEventCell } - - TcxSchedulerReportMemoEventCell = class(TcxSchedulerReportDetailsEventCell) - protected - FCaptionLabelCell: TdxReportCellString; - FHeaderCell: TdxReportCellString; - FLocationCell: TdxReportCellString; - FLocationLabelCell: TdxReportCellString; - FShowTimeAsCell: TdxReportCellString; - FShowTimeAsLabelCell: TdxReportCellString; - FStartLabelCell: TdxReportCellString; - FFinishLabelCell: TdxReportCellString; - FRecurrenceCell: TdxReportCellString; - FRecurrenceLabelCell: TdxReportCellString; - FRecurrencePatternCell: TdxReportCellString; - FRecurrencePatternLabelCell: TdxReportCellString; - procedure CreateDataItems; override; - function GetCaptionCellText: string; override; - function GetTimeCellText: string; override; - procedure SetViewParams(const AViewParams: TcxViewParams); override; - - procedure CalculateLabelAndData(ALabelCell, ADataCell: TAbstractdxReportCellData; - DC: HDC; ATimeWidth, AWidth: Integer; var ATop: Integer); virtual; - procedure CreateHeader; virtual; - procedure CreateFinish; virtual; - procedure CreateFinishCell; virtual; - procedure CreateFinishLabelCell; virtual; - procedure CreateLocation; virtual; - procedure CreateLocationCell; virtual; - procedure CreateLocationLabelCell; virtual; - procedure CreateMessage; virtual; - procedure CreateRecurrence; virtual; - procedure CreateRecurrenceCell; virtual; - procedure CreateRecurrenceLabelCell; virtual; - procedure CreateRecurrencePattern; virtual; - procedure CreateRecurrencePatternCell; virtual; - procedure CreateRecurrencePatternLabelCell; virtual; - procedure CreateShowTimeAs; virtual; - procedure CreateShowTimeAsCell; virtual; - procedure CreateShowTimeAsLabelCell; virtual; - procedure CreateStart; virtual; - procedure CreateStartLabelCell; virtual; - procedure CreateSubject; virtual; - procedure CreateSubjectLabelCell; virtual; - function GetHeaderCellText: string; virtual; - function GetRecurrenceCellText: string; virtual; - function GetRecurrencePatternCellText: string; virtual; - function GetShowTimeAsCellText: string; virtual; - public - procedure CalculateLayout(AWidth, ATimeWidth: Integer); override; - - property CaptionLabelCell: TdxReportCellString read FCaptionLabelCell; - property HeaderCell: TdxReportCellString read FHeaderCell; - property LocationCell: TdxReportCellString read FLocationCell; - property LocationLabelCell: TdxReportCellString read FLocationLabelCell; - property ShowTimeAsCell: TdxReportCellString read FShowTimeAsCell; - property ShowTimeAsLabelCell: TdxReportCellString read FShowTimeAsLabelCell; - property StartLabelCell: TdxReportCellString read FStartLabelCell; - property FinishLabelCell: TdxReportCellString read FFinishLabelCell; - property RecurrenceCell: TdxReportCellString read FRecurrenceCell; - property RecurrenceLabelCell: TdxReportCellString read FRecurrenceLabelCell; - property RecurrencePatternCell: TdxReportCellString read FRecurrencePatternCell; - property RecurrencePatternLabelCell: TdxReportCellString read FRecurrencePatternLabelCell; - end; - - { TcxSchedulerReportGanttLinkCell } - - TcxSchedulerReportGanttLinkCell = class(TcxSchedulerReportCustomCell) - protected - FArrowDirection: TcxArrowDirection; - FArrowRect: TRect; - FLines: TcxSchedulerGanttViewLinkLines; - procedure AssignInfo(const ALines: TcxSchedulerGanttViewLinkLines; - AArrowDirection: TcxArrowDirection; const AArrowRect: TRect); - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawArrow(DC: HDC; const ABounds: TRect); - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - - property ArrowDirection: TcxArrowDirection read FArrowDirection; - property ArrowRect: TRect read FArrowRect; - property Lines: TcxSchedulerGanttViewLinkLines read FLines; - end; - - { TcxSchedulerReportCommonCellsProducer } - - TcxSchedulerReportCommonCellsProducer = class(TcxCustomResourceViewAdapter) - private - FSite: TcxSchedulerReportSchedulingAreaCell; - FStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetStyles: TcxSchedulerReportLinkStyles; - protected - FBounds: TRect; - - procedure AfterCalculatePage; override; - function CanCalculate: Boolean; override; - procedure ConvertSchedulerCellToPSCells(AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); virtual; - function CreateEventCell(AEventViewInfo: TcxSchedulerEventCellViewInfo): TcxSchedulerReportEventCell; virtual; - procedure DoInitialize( - var ASelectedDays: TcxSchedulerDateList; var AEvents: TcxSchedulerCachedEventList); override; - // layout settings - function GetCompressWeekends: Boolean; override; - function GetDontPrintWeekEnds: Boolean; override; - function GetHideSelection: Boolean; override; - function GetIsPrinting: Boolean; override; - function GetPageBounds: TRect; override; - function GetPagesPerWeek: Byte; override; - function GetPrintExactlyOneMonth: Boolean; override; - function GetPrintRange(Index: Integer): TDateTime; override; - function GetPrimaryPage: Boolean; override; - function GetStylesAdapter: IcxSchedulerStylesAdapter; override; - // styles - procedure SetCellViewParams(ACell: TdxReportVisualItem; const AParams: TcxViewParams); virtual; - public - constructor CreateEx(AStyle: TcxCustomSchedulerReportLinkPrintStyle; - ASite: TcxSchedulerReportSchedulingAreaCell); virtual; - procedure GetPageResources(AResources: TcxObjectList); override; - procedure Produce; virtual; - property Site: TcxSchedulerReportSchedulingAreaCell read FSite; - property Style: TcxCustomSchedulerReportLinkPrintStyle read FStyle; - property Styles: TcxSchedulerReportLinkStyles read GetStyles; - end; - - TcxSchedulerReportCommonCellsProducerClass = class of TcxSchedulerReportCommonCellsProducer; - - { TcxSchedulerReportWeeksCellsProducer } - - TcxSchedulerReportWeeksCellsProducer = class(TcxSchedulerReportCommonCellsProducer) - - end; - - { TcxSchedulerReportDailyCellsProducer } - - TcxSchedulerReportDailyCellsProducer = class(TcxSchedulerReportCommonCellsProducer) - private - FRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; - protected - procedure AfterCalculatePage; override; - procedure BeforeCalculatePage; override; - - function CreateTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; virtual; - procedure ConvertSchedulerCellToPSCells(AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); override; - end; - - { TcxSchedulerReportYearlyCellsProducer } - - TcxSchedulerReportYearlyCellsProducer = class(TcxSchedulerReportCommonCellsProducer, IcxSchedulerYearViewAdapter) - private - function GetIsPrimaryPage: Boolean; - function GetStyle: TcxSchedulerReportLinkYearlyPrintStyle; - protected - FFirstMonth: Integer; - { IcxSchedulerYearViewAdapter } - function GetDayCountPerPage: Integer; virtual; - function GetMonthCount: Integer; virtual; - function GetFirstMonth: Integer; virtual; - function GetShowMonthHeaders: Boolean; virtual; - function GetShowWeekDayHeaders: Boolean; virtual; - function GetStartDayIndex: Integer; virtual; - - property IsPrimaryPage: Boolean read GetIsPrimaryPage; - property Style: TcxSchedulerReportLinkYearlyPrintStyle read GetStyle; - public - procedure Produce; override; - end; - - { TcxSchedulerReportTimeLineLayoutBuilder } - - TcxTimeLinePageInfo = class - public - PageResources: TList; - ContentBounds: TRect; - Finish: TDateTime; - Headers: Boolean; - LineStart: Integer; - PageBounds: TRect; - Scales: Boolean; - Start: TDateTime; - - constructor Create; virtual; - destructor Destroy; override; - end; - - TcxSchedulerReportTimeLineLayoutBuilder = class(TcxSchedulerTimeGridViewAdapter) - private - FColCount: Integer; - FCurrentPageIndex: Integer; - FPagesInfo: TcxObjectList; - FRowCount: Integer; - FStyle: TcxSchedulerReportLinkTimeLinePrintStyle; - function GetPageCount: Integer; - function GetPageInfo(Index: Integer): TcxTimeLinePageInfo; - function GetViewInfo: TcxSchedulerTimeGridViewViewInfo; - public - function AddPageInfo(ARow, AColumn: Integer; const AStart, AFinish: TDateTime): TcxTimeLinePageInfo; - procedure AddRow(AStartIndex, AFinishIndex, AStartLine: Integer); - procedure AfterCalculatePage; override; - procedure CalculateTimeRanges; - procedure CalculatePagination; - function CanCalculate: Boolean; override; - // layout settings - function GetActualStart: TDateTime; override; - function GetActualFinish: TDateTime; override; - function GetDontPrintWeekEnds: Boolean; override; - function GetHideSelection: Boolean; override; - function GetIsPrinting: Boolean; override; - function GetPageBounds: TRect; override; - function GetPageContentBounds(ARow, AColumn: Integer): TRect; - function GetPageLineCount(ARow: Integer): Integer; - function GetPrintRange(Index: Integer): TDateTime; override; - function GetStylesAdapter: IcxSchedulerStylesAdapter; override; - public - constructor CreateEx(AStyle: TcxSchedulerReportLinkTimeLinePrintStyle); virtual; - destructor Destroy; override; - procedure CalculateLayout; - procedure GetPageResources(AResources: TcxObjectList); override; - - property ColCount: Integer read FColCount; - property PageCount: Integer read GetPageCount; - property PageInfo[Index: Integer]: TcxTimeLinePageInfo read GetPageInfo; - property RowCount: Integer read FRowCount; - property Style: TcxSchedulerReportLinkTimeLinePrintStyle read FStyle; - property ViewInfo: TcxSchedulerTimeGridViewViewInfo read GetViewInfo; - end; - - { TcxSchedulerReportTimeLineCellsProducer } - - TcxSchedulerReportTimeLineCellsProducer = class(TcxSchedulerReportCommonCellsProducer, IcxSchedulerTimeGridViewAdapter) - private - function GetPageIndex: Integer; - function GetPageInfo: TcxTimeLinePageInfo; - function GetStyle: TcxSchedulerReportLinkTimeLinePrintStyle; - protected - function CreateEventCell(AEventViewInfo: TcxSchedulerEventCellViewInfo): TcxSchedulerReportEventCell; override; - function GetActualStart: TDateTime; override; - function GetActualFinish: TDateTime; override; - function GetLineOffset: Integer; virtual; - function GetPrintRange(Index: Integer): TDateTime; override; - function GetShowLinks: Boolean; - function GetShowResourceHeaders: Boolean; - function GetShowScales: Boolean; - function GetWorkDaysOnly: Boolean; - function GetWorkTimeOnly: Boolean; - public - procedure GetPageResources(AResources: TcxObjectList); override; - - property PageIndex: Integer read GetPageIndex; - property PageInfo: TcxTimeLinePageInfo read GetPageInfo; - property Style: TcxSchedulerReportLinkTimeLinePrintStyle read GetStyle; - end; - -var - SpecialSymbolFont: TFont; - -implementation - -{$R *.dfm} -{$R dxPScxScheduler3Lnk.res} - -uses - Messages, ShlObj, dxPSUtl, dxPSRes, dxPSPopupMan, Math, dxCore, -{$IFDEF DELPHI6} - DateUtils, Types, -{$ENDIF} - ActiveX, CommCtrl; - -const - IDB_DXPSSCHEDULER_STYLEDESIGNPREVIEW = 'IDB_DXPSSCHEDULER_STYLEDESIGNPREVIEW'; - IDB_DXPSSCHEDULER_SMALLDESIGNPREVIEW = 'IDB_DXPSSCHEDULER_SMALLDESIGNPREVIEW'; - dxFormatShowDaysWithEventsInBold = dxPSGlbl.dxFormatCheckEnabled; - dxFormatDayIsBold = dxPSGlbl.dxFormatCheckChecked; - - cxYearStyleDaysOnPrimaryPage = 18; - -type - TLongRec = packed record - Bytes: array [0..3] of Byte; - end; - - TControlAccess = class(TControl); - TcxSchedulerCachedEventListAccess = class(TcxSchedulerCachedEventList); - TcxSchedulerTimeGridViewAccess = class(TcxSchedulerTimeGridView); - -var - MirrorClasses: TList; - StyleImages: TImageList; - SchedulerFontHandle: THandle; - SchedulerFontFileName: string; - StylePreviewImages: TImageList; - StyleSheetPrototype: TcxSchedulerReportLinkStyleSheet; - -procedure ConvertRect(var R: TRect; APixelsNumerator, APixelsDenominator: Integer); -begin - with R do - begin - Left := MulDiv(Left, APixelsNumerator, APixelsDenominator); - Right := MulDiv(Right, APixelsNumerator, APixelsDenominator); - Top := MulDiv(Top, APixelsNumerator, APixelsDenominator); - Bottom := MulDiv(Bottom, APixelsNumerator, APixelsDenominator); - end; -end; - -function cxCompareEventsOrder( - AEvent1, AEvent2: TcxSchedulerControlEvent): Integer; -var - AAllDay1, AAllDay2: Boolean; -begin - Result := 0; - AAllDay1 := AEvent1.AllDayEvent or (AEvent1.Duration >= 1); - AAllDay2 := AEvent2.AllDayEvent or (AEvent2.Duration >= 1); - if DateOf(AEvent1.Start) = DateOf(AEvent2.Start) then - Result := Byte(AAllDay2) - Byte(AAllDay1); - if Result <> 0 then Exit; - if AEvent1.Start < AEvent2.Start then - Result := -1 - else - if AEvent1.Start > AEvent2.Start then - Result := 1 - else - if AEvent1.Finish > AEvent2.Finish then - Result := -1 - else - if AEvent1.Finish < AEvent2.Finish then - Result := 1 - else - if AEvent1.RecordIndex < AEvent2.RecordIndex then - Result := -1 - else - if AEvent1.RecordIndex > AEvent2.RecordIndex then - Result := 1 - else - Result := 0; -end; - -{$IFNDEF DELPHI6} -function StartOfTheDay(const AValue: TDateTime): TDateTime; -begin - Result := Trunc(AValue); -end; - -function EndOfTheDay(const AValue: TDateTime): TDateTime; -begin - Result := Trunc(AValue) + EncodeTime(23, 59, 59, 999); -end; - -function StartOfTheWeek(const AValue: TDateTime): TDateTime; -begin - Result := Trunc(AValue) - (DayOfTheWeek(AValue) - 1); -end; - -function EndOfTheWeek(const AValue: TDateTime): TDateTime; -begin - Result := EndOfTheDay(StartOfTheWeek(AValue) + 6); -end; - -{$ENDIF} - -procedure Rect2RectsVert(const ASource: TRect; var R1, R2: TRect); overload; -begin - R1 := ASource; - R2 := ASource; - R1.Bottom := (ASource.Bottom + ASource.Top - InterAreaSpace) div 2; - R2.Top := R1.Bottom + InterAreaSpace; -end; - -procedure Rect2RectsVert(const ASource: TRect; var R1, R2, R3: TRect); overload; -var - H: Integer; -begin - R1 := ASource; - R2 := ASource; - R3 := ASource; - H := ASource.Bottom - ASource.Top; - R1.Bottom := ASource.Top + MulDiv(H, 1, 3); - R2.Top := R1.Bottom + InterAreaSpace; - R2.Bottom := ASource.Top + MulDiv(H, 2, 3); - R3.Top := R2.Bottom + InterAreaSpace; -end; - -procedure Rect2RectsHorz(const ASource: TRect; var R1, R2: TRect); overload; -begin - R1 := ASource; - R2 := ASource; - R1.Right := (ASource.Left + ASource.Right - InterAreaSpace) div 2; - R2.Left := R1.Right + InterAreaSpace; -end; - -procedure Rect2RectsHorz(const ASource: TRect; var R1, R2, R3: TRect); overload; -var - W: Integer; -begin - R1 := ASource; - R2 := ASource; - R3 := ASource; - W := ASource.Right - ASource.Left; - R1.Right := ASource.Left + MulDiv(W, 1, 3); - R2.Left := R1.Right + InterAreaSpace; - R2.Right := ASource.Left + MulDiv(W, 2, 3); - R3.Left := R2.Right + InterAreaSpace; -end; - -function AdditionalWidth(const ABounds: TRect): Integer; -begin - with ABounds do - Result := Round((Right - Left) * NotesAreaWidth) - InterAreaSpace div 2; -end; - -procedure SplitToRects(const ASource: TRect; AShowCalendar, - AIsRightArea: Boolean; out R1, R2: TRect); -begin - R1 := ASource; - R2 := ASource; - if AShowCalendar then - begin - if AIsRightArea then - begin - R2.Left := R2.Right - AdditionalWidth(R1); - R1.Right := R2.Left - InterAreaSpace; - end - else - begin - R2.Right := R2.Left + AdditionalWidth(R1); - R1.Left := R2.Right + InterAreaSpace; - end; - end; -end; - -function SchedulerLinkStyleSheetPrototype: TcxSchedulerReportLinkStyleSheet; - - function CreateStyle(AColor, AFontColor: TColor): TcxStyle; - begin - Result := TcxStyle.Create(StyleSheetPrototype); - with Result do - begin - Color := AColor; - Font.Name := dxPSCore.dxPSDefaultFontName; - Font.Color := AFontColor; - end; - end; - -begin - if StyleSheetPrototype = nil then - begin - StyleSheetPrototype := TcxSchedulerReportLinkStyleSheet.Create(nil); - with StyleSheetPrototype.Styles as TcxSchedulerReportLinkStyles do - begin - SchedulerHeader := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - Content := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - DateNavigatorContent := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - DateNavigatorHeader := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - DayHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Event := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ResourceHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - NotesAreaBlank := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - NotesAreaLined := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - TaskPad := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - TimeRuler := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - end; - end; - Result := StyleSheetPrototype; -end; - -function FindMirorClassForItem(AItem: TObject; - var APSItemClass: TcxSchedulerReportCustomCellClass): Boolean; -var - I: Integer; -begin - APSItemClass := nil; - Result := False; - for I := MirrorClasses.Count - 1 downto 0 do - begin - APSItemClass := MirrorClasses[I]; -// 'TcxSchedulerTimeGridMinorScaleCell' - if AItem.InheritsFrom(APSItemClass.SchedulerCellClass) then - begin - Result := True; - Break; - end; - end; -end; - -{ TcxSchedulerReportLinkRenderInfo } - -procedure TcxSchedulerReportLinkRenderInfo.DoCalculate; -var - I: Integer; -begin - if not IsLoading then - begin - if (ReportLink <> nil) and (ReportLink.PrintStyles.ActiveStyle <> nil) then - begin - FPageColCount := Byte(ReportLink.PrintStyles.ActiveStyle.Layout) + 1; - FPageRowCount := ReportLink.PageSites.Count; - end - else - begin - FPageColCount := 1; - FPageRowCount := 1; - end; - end; - if (ReportLink = nil) or (ReportLink.ReportCells <> nil) and (ReportLink.ReportCells.Count > 0) then - begin - inherited DoCalculate; - for I := 0 to PageRenderInfoCount - 1 do - with PageRenderInfos[I] do - TitleOffset := DataOffset; - end; -end; - -function TcxSchedulerReportLinkRenderInfo.GetPageColCount: Integer; -begin - if not IsLoading then - Result := 1//FPageColCount - else - Result := inherited GetPageColCount; -end; - -function TcxSchedulerReportLinkRenderInfo.GetPageRowCount: Integer; -begin - if not IsLoading then - Result := FPageRowCount - else - Result := inherited GetPageRowCount; -end; - -function TcxSchedulerReportLinkRenderInfo.IsLoading: Boolean; -begin - Result := ReportLink.DataSource = rldsExternalStorage; -end; - -function TcxSchedulerReportLinkRenderInfo.IsDrawPageTitleOnPage( - APageIndex: Integer): Boolean; -begin - Result := Rendering and IsDrawReportTitleOnPage(APageIndex); -end; - -function TcxSchedulerReportLinkRenderInfo.IsDrawReportTitleOnPage( - APageIndex: Integer): Boolean; -begin - case ReportLink.ReportTitleMode of - tmNone: - Result := False; - tmOnFirstPage: - Result := APageIndex = 0; - else - Result := APageIndex mod FPageColCount = 0; - end; -end; - -function TcxSchedulerReportLinkRenderInfo.GetReportLink: TcxSchedulerReportLink; -begin - Result := TcxSchedulerReportLink(inherited ReportLink); -end; - -{ TcxSchedulerReportRenderer } - -procedure TcxSchedulerReportRenderer.PrepareRenderPage; -begin - inherited PrepareRenderPage; - TcxSchedulerReportLinkRenderInfo(RenderInfo).Rendering := True; -end; - -procedure TcxSchedulerReportRenderer.UnprepareRenderPage; -begin - TcxSchedulerReportLinkRenderInfo(RenderInfo).Rendering := False; - inherited UnprepareRenderPage; -end; - -{ TcxSchedulerReportLink } - -constructor TcxSchedulerReportLink.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FPageSites := TList.Create; - FLookAndFeelItems := TList.Create; - FSupportImages := True; -end; - -destructor TcxSchedulerReportLink.Destroy; -begin - FreeAndNil(FPageSites); - FreeAndNil(FLookAndFeelItems); - inherited Destroy; -end; - -procedure TcxSchedulerReportLink.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLink then - with TcxSchedulerReportLink(Source) do - begin - Self.PrintRange := PrintRange; - Self.PrintStyles := PrintStyles; - end; - inherited; -end; - -class function TcxSchedulerReportLink.Aggregable: Boolean; -begin - Result := False; -end; - -procedure TcxSchedulerReportLink.LoadDataFromStream(AStream: TStream); -const - SupportImagesVersion: TdxPSVersion = (Major: 3; Minor: 5; SubMinor: 5); -var - AStorageInfo: TdxPSDataStorageInfo; -begin - if PossibleDataStorage(AStream, True) then - begin - CopyDataStreamFrom(AStream); - AStorageInfo := ExtractStorageInfo(DataStream); - if AStorageInfo <> nil then - begin - FSupportImages := ComparePSVersions(AStorageInfo.PrintingSystemVersion, SupportImagesVersion) >= 0; - AStorageInfo.Free; - end; - DataStream.Position := 0; - if DataSource <> rldsExternalStorage then - DataSource := rldsExternalStorage - else - if IsRebuildNeededAndAllowed(True) then - RebuildReport; - end; -end; - -procedure TcxSchedulerReportLink.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited; - if (TaskPadReportLink = AComponent) and (Operation = opRemove) then - TaskPadReportLink := nil; -end; - -// IdxReportLinkController -function TcxSchedulerReportLink.GetControlSiteBounds(AControl: TControl): TRect; -begin - if PrintStyles.ActiveStyle <> nil then - Result := PrintStyles.ActiveStyle.GetControlSiteBounds(AControl) - else - Result := NullRect; -end; - -procedure TcxSchedulerReportLink.ConstructReport(AReportCells: TdxReportCells); - - procedure CalculateSizes; - - procedure CalculateReportPartSizes(ACell: TdxReportCell); - var - Width, I, V: Integer; - begin - if ACell.CellCount > 0 then - begin - Width := 0; - for I := 0 to ACell.CellCount - 1 do - begin - V := ACell.Cells[I].Width; - if Width < V then Width := V; - end; - ACell.BoundsRect := MakeRect(0, 0, Width, ACell.LastCell.BoundsRect.Bottom); - end; - end; - - begin - with AReportCells do - begin - CalculateReportPartSizes(Cells); - if AreFooterCellsAllocated then CalculateReportPartSizes(FooterCells); - if AreHeaderCellsAllocated then CalculateReportPartSizes(HeaderCells); - end; - end; - -begin - if Scheduler = nil then Exit; - inherited; - - if PrintStyles.ActiveStyle = nil then - Exit; - - PrepareConstruct; - try - BuildStyle; - if not AbortBuilding then CalculateSizes; - finally - UnprepareConstruct; - end; -end; - -procedure TcxSchedulerReportLink.DoCreateReport; -begin - if (PrintStyles.ActiveStyle = nil) or not PrintStyles.ActiveStyleAssigned then - PrintStyles.SetActiveStyleEx(PrintStyles.GetCorrespondingStyle); - inherited DoCreateReport; -end; - -procedure TcxSchedulerReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - if HasEventImages then - AProc(Scheduler.EventImages); - if HasResourceImages then - AProc(Scheduler.Storage.Resources.Images); -end; - -function TcxSchedulerReportLink.GetRealScaleFactor: Integer; -begin - Result := 100; -end; - -procedure TcxSchedulerReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -begin - case AItem.GetCustomDrawID of - cdidSchedulerContent: - DoCustomDrawContentCell(ACanvas, TcxSchedulerReportContentCell(AItem), ADone); - cdidSchedulerSchedulerHeader: - DoCustomDrawSchedulerHeaderCell(ACanvas, TcxSchedulerReportSchedulerHeaderDataCell(AItem), ADone); - cdidSchedulerDateNavigatorHeader: - DoCustomDrawDateNavigatorHeaderCell(ACanvas, TcxSchedulerReportDateNavigatorHeader(AItem), ADone); - cdidSchedulerDateNavigatorDay: - DoCustomDrawDateNavigatorDayCell(ACanvas, TcxSchedulerReportDateNavigatorDay(AItem), ADone); - cdidSchedulerDateNavigatorDayCaption: - DoCustomDrawDateNavigatorDayCaptionCell(ACanvas, TcxSchedulerReportDateNavigatorDayCaption(AItem), ADone); - cdidSchedulerDateNavigatorWeekNumber: - DoCustomDrawDateNavigatorWeekNumberCell(ACanvas, TcxSchedulerReportDateNavigatorWeekNumber(AItem), ADone); - cdidSchedulerTimeRuler: - DoCustomDrawTimeRulerCell(ACanvas, TcxSchedulerReportDailyTimeRulerCell(AItem), ADone); - cdidSchedulerEventCaption..cdidSchedulerEventTimeLine: - DoCustomDrawEventPartCell(ACanvas, AItem, ADone); - cdidSchedulerNotesArea: - DoCustomDrawNotesCell(ACanvas, TcxSchedulerReportNotesDataCell(AItem), ADone); - cdidSchedulerTaskPad: - DoCustomDrawTaskPadCell(ACanvas, TcxSchedulerReportNotesDataCell(AItem), ADone); - cdidSchedulerHeader: - DoCustomDrawHeaderCell(ACanvas, TcxSchedulerReportHeaderItemCell(AItem), ADone); - end; -end; - -procedure TcxSchedulerReportLink.DoCanPrintEvent(AEvent: TcxSchedulerEvent; - var AllowPrint: Boolean); -begin - if Assigned(FOnCanPrintEvent) then - FOnCanPrintEvent(Self, AEvent, AllowPrint); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawSchedulerHeaderCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportSchedulerHeaderDataCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawSchedulerHeaderCell) then - FOnCustomDrawSchedulerHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorHeaderCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorHeader; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorHeaderCell) then - FOnCustomDrawDateNavigatorHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorDayCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDay; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorDayCell) then - FOnCustomDrawDateNavigatorDayCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorDayCaptionCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDayCaption; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorDayCaptionCell) then - FOnCustomDrawDateNavigatorDayCaptionCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorWeekNumberCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorWeekNumber; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorWeekNumberCell) then - FOnCustomDrawDateNavigatorWeekNumberCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawTimeRulerCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDailyTimeRulerCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawTimeRulerCell) then - FOnCustomDrawTimeRulerCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawContentCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportContentCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawContentCell) then - FOnCustomDrawContentCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawHeaderCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportHeaderItemCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeaderCell) then - FOnCustomDrawHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawEventPartCell( - ACanvas: TCanvas; AItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawEventPartCell) then - FOnCustomDrawEventPartCell(Self, ACanvas, AItem, - TcxSchedulerReportEventPartType(AItem.GetCustomDrawID - cdidSchedulerEventCaption), - ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawNotesCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawNotesCell) then - FOnCustomDrawNotesCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawTaskPadCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawTaskPadCell) then - FOnCustomDrawTaskPadCell(Self, ACanvas, AItem, ADone); -end; - -function TcxSchedulerReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - if PrintStyles.ActiveStyle <> nil then - Result := PrintStyles.ActiveStyle.GetRebuildOnPageParamsChange(AUpdateCodes) - else - Result := inherited GetRebuildOnPageParamsChange(AUpdateCodes); -end; - -function TcxSchedulerReportLink.GetRendererClass: TdxPSReportRendererClass; -begin - Result := TcxSchedulerReportRenderer; -end; - -function TcxSchedulerReportLink.GetRenderInfoClass: TdxPSReportRenderInfoClass; -begin - Result := TcxSchedulerReportLinkRenderInfo; -end; - -procedure TcxSchedulerReportLink.InternalRestoreDefaults; -begin - inherited; - PrintRange.RestoreDefaults; - PrintStyles.RestoreDefaults; -end; - -procedure TcxSchedulerReportLink.RebuildReport; -begin - inherited RebuildReport; - if DesignWindow <> nil then - DesignWindow.UpdatePreview; -end; - -procedure TcxSchedulerReportLink.PrepareConstruct; -begin - FLookAndFeelItems.Clear; - inherited PrepareConstruct; -end; - -procedure TcxSchedulerReportLink.UnprepareConstruct; -begin - FormatLookAndFeelItems; - inherited UnprepareConstruct; -end; - -procedure TcxSchedulerReportLink.CreateOptions; -begin - inherited CreateOptions; - FPrintRange := CreatePrintRange; - FPrintStyles := CreatePrintStyles; -end; - -procedure TcxSchedulerReportLink.DestroyOptions; -begin - FreeAndNil(FPrintStyles); - FreeAndNil(FPrintRange); - inherited DestroyOptions; -end; - -function TcxSchedulerReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TcxSchedulerReportLinkOptionsFormatting; -end; - -function TcxSchedulerReportLink.CreatePrintRange: TcxSchedulerReportLinkPrintRange; -begin - Result := TcxSchedulerReportLinkPrintRange.Create(Self); -end; - -function TcxSchedulerReportLink.CreatePrintStyles: TcxSchedulerReportLinkPrintStyles; -begin - Result := TcxSchedulerReportLinkPrintStyles.Create(Self); -end; - -function TcxSchedulerReportLink.HasEventImages: Boolean; -begin - Result := Assigned(Scheduler) and Assigned(Scheduler.EventImages); -end; - -function TcxSchedulerReportLink.HasResourceImages: Boolean; -begin - Result := Assigned(Scheduler) and Assigned(Scheduler.Storage) and Assigned(Scheduler.Storage.Resources.Images) ; -end; - -function TcxSchedulerReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := OptionsFormatting.UseNativeStyles; -end; - -function TcxSchedulerReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TcxSchedulerReportLinkStyles; -end; - -function TcxSchedulerReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TcxSchedulerReportLinkStyleSheet; -end; - -function TcxSchedulerReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := SchedulerLinkStyleSheetPrototype; -end; - -procedure TcxSchedulerReportLink.ActivePrintStyleChanged; -begin - if not IsDestroying and not IsLoading then - begin - if Active then - begin - FreeRenderInfos; - FreeRenderer; - RebuildReport; - end; - DoActivePrintStyleChanged; - end; -end; - -procedure TcxSchedulerReportLink.DoActivePrintStyleChanged; -begin - if Assigned(FOnActivePrintStyleChanged) then FOnActivePrintStyleChanged(Self); -end; - -procedure TcxSchedulerReportLink.FormatLookAndFeelItems; -const - Borders3D: array[Boolean] of TdxPSCellBorderClass = - (TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder); -var - I: Integer; -begin - for I := 0 to LookAndFeelItemCount - 1 do - with LookAndFeelItems[I] do - if Effects3D then - BorderClass := Borders3D[Soft3D] - else - BorderClass := TdxPSCellUltraFlatBorder; -end; - -procedure TcxSchedulerReportLink.RegisterLookAndFeelItem(AItem: TdxReportVisualItem; - AEdgeStyle: TdxCellEdgeStyle); -begin - AItem.EdgeMode := Self.EdgeMode; - AItem.Edge3DStyle := AEdgeStyle; - FLookAndFeelItems.Add(AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeSchedulingAreaCell( - AItem: TcxSchedulerReportSchedulingAreaCell); -begin - if Assigned(FOnInitializeSchedulingAreaCell) then - FOnInitializeSchedulingAreaCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeEventCell(AItem: TcxSchedulerReportCustomEventCell); -begin - if Assigned(FOnInitializeEventCell) then - FOnInitializeEventCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeHeaderPrimaryCell( - AItem: TcxSchedulerReportSchedulerHeaderCell); -begin - if Assigned(FOnInitializeHeaderPrimaryCell) then - FOnInitializeHeaderPrimaryCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeHeaderSecondaryCell( - AItem: TcxSchedulerReportSchedulerHeaderCell); -begin - if Assigned(FOnInitializeHeaderSecondaryCell) then - FOnInitializeHeaderSecondaryCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeNotesAreaCell( - AItem: TcxSchedulerReportNotesAreaCell); -begin - if Assigned(FOnInitializeNotesAreaCell) then - FOnInitializeNotesAreaCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeTaskPadCell( - AItem: TcxSchedulerReportTaskPadCell); -begin - if Assigned(FOnInitializeTaskPadCell) then - FOnInitializeTaskPadCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.AssignTaskPadData(ATaskPad: TcxSchedulerReportTaskPadCell); - - procedure CropData(ASite: TdxReportCell); - var - CropBounds, R: TRect; - I: Integer; - Cell: TdxReportCell; - begin - CropBounds := ASite.AbsoluteRect; - for I := ASite.CellCount - 1 downto 0 do - begin - Cell := ASite.Cells[I]; - if not IntersectRect(R, Cell.AbsoluteRect, CropBounds) then - Cell.Free; - end; - end; - -begin - if (TaskPadReportLink <> nil) and TaskPadReportLink.DataProviderPresent then - begin - TaskPadReportLink.Controller := Renderer.ReportLink; - try - TaskPadReportLink.RebuildReport; - ATaskPad.TaskPadDataSite.Assign(TaskPadReportLink.ReportCells.Cells); - CropData(ATaskPad.TaskPadDataSite); - ATaskPad.TaskPadDataSite.ClipChildren := True; - finally - TaskPadReportLink.Controller := nil; - end; - end; -end; - -procedure TcxSchedulerReportLink.InitializeTaskPadCell(ATaskPad: TcxSchedulerReportTaskPadCell); -begin - AssignTaskPadData(ATaskPad); - DoInitializeTaskPadCell(ATaskPad); -end; - -procedure TcxSchedulerReportLink.SetCellViewParams( - ACell: TdxReportVisualItem; const AParams: TcxViewParams); -var - AdxPSViewParams: TdxReportItemViewParams; -begin - if not Assigned(ACell) then Exit; - FillChar(AdxPSViewParams, SizeOf(AdxPSViewParams), 0); - AdxPSViewParams.NativeParams := AParams; - SetCellViewParams(ACell, AdxPSViewParams); -end; - -procedure TcxSchedulerReportLink.SetCellViewParams( - ACell: TdxReportVisualItem; const AParams: TdxReportItemViewParams); -var - AFont: TFont; - AHasBitmap: Boolean; -begin - if not Assigned(ACell) then Exit; - AFont := TFont.Create; - try - AFont.Assign(AParams.NativeParams.Font); - if not dxPSUtl.dxIsTrueTypeFont(AFont) then - AFont.Name := Font.Name; - AFont.Color := ColorToRGB(AParams.NativeParams.TextColor); - if AParams.FontSize <> 0 then - AFont.Size := AParams.FontSize; - AFont.Style := AFont.Style + AParams.FontStyle; - ACell.FontIndex := AddFontToPool(AFont); - ACell.Transparent := ACell.Transparent or AParams.Transparent; - with AParams.NativeParams do - begin - AHasBitmap := not OptionsFormatting.SuppressBackgroundBitmaps and - (Bitmap <> nil) and not Bitmap.Empty; - if AHasBitmap then - ACell.BackgroundBitmapIndex := AddBackgroundBitmapToPool(Bitmap); - end; - if OptionsFormatting.SuppressContentColoration and (ACell.BorderColor <> clDefault) then - ACell.BorderColor := clBlack; - if OptionsFormatting.SuppressContentColoration and not AHasBitmap then - ACell.Color := clWhite - else - ACell.Color := ColorToRGB(AParams.NativeParams.Color); - finally - AFont.Free; - end; -end; - -function TcxSchedulerReportLink.AddPageSite( - const ABounds: TRect): TcxSchedulerReportPageSite; -begin - Result := TcxSchedulerReportPageSite.Create(ReportCells.Cells); - Result.BoundsRect := ABounds; - Result.CellSides := []; - Result.Transparent := True; - FPageSites.Add(Result); - AddVerticalDelimiter(Result); - AddHorizontalDelimiter(Result); -end; - -procedure TcxSchedulerReportLink.BuildStyle; -var - AImages: TCustomImageList; -begin - FPageSites.Clear; - if PrintStyles.ActiveStyle <> nil then - begin - AImages := nil; - with PrintStyles.ActiveStyle do - begin - try - if not ShowResourceImages and HasResourceImages then - begin - AImages := Scheduler.Storage.Resources.Images; - Scheduler.Storage.Resources.Images := nil; - end; - BeforeBuild; - RenderInfo.FPageColCount := Byte(PrintStyles.ActiveStyle.Layout) + 1; - try - Build; - finally - AfterBuild; - end; - finally - if AImages <> nil then - Scheduler.Storage.Resources.Images := AImages; - end; - end; - end; -end; - -function TcxSchedulerReportLink.GetActiveStyles: TcxSchedulerReportLinkStyles; -begin - Result := inherited ActiveStyles as TcxSchedulerReportLinkStyles; -end; - -function TcxSchedulerReportLink.GetDesignWindow: TcxfmSchedulerReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TcxfmSchedulerReportLinkDesignWindow; -end; - -function TcxSchedulerReportLink.GetEdgeMode: TdxCellEdgeMode; -const - EdgeModeMap: array[Boolean] of TdxCellEdgeMode = (cemPattern, cem3DEffects); -begin - Result := EdgeModeMap[OptionsFormatting.LookAndFeelKind <> lfUltraFlat]; -end; - -function TcxSchedulerReportLink.GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; -begin - Result := TdxReportVisualItem(FLookAndFeelItems[Index]); -end; - -function TcxSchedulerReportLink.GetLookAndFeelItemCount: Integer; -begin - Result := FLookAndFeelItems.Count; -end; - -function TcxSchedulerReportLink.GetOptionsFormatting: TcxSchedulerReportLinkOptionsFormatting; -begin - Result := inherited OptionsFormatting as TcxSchedulerReportLinkOptionsFormatting; -end; - -function TcxSchedulerReportLink.GetPrintStyles: TcxSchedulerReportLinkPrintStyles; -begin - Result := FPrintStyles; -end; - -function TcxSchedulerReportLink.GetRenderInfo: TcxSchedulerReportLinkRenderInfo; -begin - Result := TcxSchedulerReportLinkRenderInfo(inherited RenderInfo); -end; - -function TcxSchedulerReportLink.GetScheduler: TcxScheduler; -begin - Result := Component as TcxScheduler; -end; - -function TcxSchedulerReportLink.GetStyles: TcxSchedulerReportLinkStyles; -begin - Result := inherited Styles as TcxSchedulerReportLinkStyles; -end; - -procedure TcxSchedulerReportLink.SetOptionsFormatting(Value: TcxSchedulerReportLinkOptionsFormatting); -begin - inherited OptionsFormatting := Value; -end; - -procedure TcxSchedulerReportLink.SetPrintRange(Value: TcxSchedulerReportLinkPrintRange); -begin - PrintRange.Assign(Value); -end; - -procedure TcxSchedulerReportLink.SetPrintStyles(Value: TcxSchedulerReportLinkPrintStyles); -begin - FPrintStyles.Assign(Value); -end; - -procedure TcxSchedulerReportLink.SetStyles(Value: TcxSchedulerReportLinkStyles); -begin - inherited Styles := Value; -end; - -procedure TcxSchedulerReportLink.SetTaskPadReportLink(Value: TBasedxReportLink); -begin - if (Value <> Self) and (FTaskPadReportLink <> Value) then - begin - FTaskPadReportLink := Value; - if FTaskPadReportLink <> nil then - FTaskPadReportLink.FreeNotification(Self); - LinkModified(True); - end; -end; - -{ TcxSchedulerReportLinkPrintRange } - -procedure TcxSchedulerReportLinkPrintRange.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkPrintRange then - with TcxSchedulerReportLinkPrintRange(Source) do - begin - Move(FDatePrint, Self.FDatePrint[0], SizeOf(FDatePrint)); - Move(FTimePrint, Self.FTimePrint[0], SizeOf(FTimePrint)); - end; - inherited Assign(Source); -end; - -procedure TcxSchedulerReportLinkPrintRange.RestoreDefaults; -begin - inherited RestoreDefaults; - FDatePrint[0] := NullDate; - FDatePrint[1] := NullDate; - FTimePrint[0] := NullDate; - FTimePrint[1] := NullDate; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultDatePrintFrom: TDate; -begin - if Scheduler <> nil then - Result := Scheduler.CurrentView.FirstVisibleDate - else - Result := Date; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultDatePrintTo: TDate; -begin - if Scheduler <> nil then - Result := Scheduler.CurrentView.LastVisibleDate - else - Result := Date; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultTimePrintFrom: TTime; -begin - if Scheduler <> nil then - Result := Scheduler.OptionsView.WorkStart - else - Result := 0; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultTimePrintTo: TTime; -begin - if Scheduler <> nil then - Result := Scheduler.OptionsView.WorkFinish - else - Result := 0; -end; - -procedure TcxSchedulerReportLinkPrintRange.CheckTimeRange; -begin -{ if (PrintTo - PrintFrom) < 0 then - FPrintTo := DateOf(PrintFrom) + TimeOf(FPrintTo);} -end; - -function TcxSchedulerReportLinkPrintRange.GetDateTimeIF( - const AValue, ADefaultValue: TDateTime): TDateTime; -begin - Result := AValue; - if Trunc(Result) = NullDate then - Result := ADefaultValue; -end; - -function TcxSchedulerReportLinkPrintRange.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TcxSchedulerReportLinkPrintRange.GetActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := ReportLink.PrintStyles.ActiveStyle; -end; - -function TcxSchedulerReportLinkPrintRange.GetDayCount: Integer; -begin - Result := Trunc(PrintTo) - Trunc(PrintFrom) + 1; - if Result < 1 then - Result := 1; -end; - -function TcxSchedulerReportLinkPrintRange.GetMonthCount: Integer; - - function MonthOfDate(const ADate: TDateTime): Integer; - var - Y, M, D: Word; - begin - DecodeDate(ADate, Y, M, D); - Result := Y * 12 + M; - end; - -begin - Result := MonthOfDate(PrintTo) - MonthOfDate(PrintFrom) + 1; -end; - - -function TcxSchedulerReportLinkPrintRange.GetPrintDate(AIndex: Integer): TDate; -var - DefaultDate: TTime; -begin - if ReportLink.IsDestroying then - begin - Result := NullDate; - Exit; - end; - if AIndex = 0 then - DefaultDate := DefaultDatePrintFrom - else - DefaultDate := DefaultDatePrintTo; - if ActiveStyle <> nil then - Result := GetDateTimeIF(ActiveStyle.CheckPrintRangeDate( - DateOf(FDatePrint[AIndex]), AIndex), DefaultDate) - else - Result := GetDateTimeIF(DateOf(FDatePrint[AIndex]), DefaultDate); -end; - -function TcxSchedulerReportLinkPrintRange.GetPrintTime(AIndex: Integer): TTime; -var - DefaultTime: TTime; -begin - if AIndex = 0 then - DefaultTime := DefaultTimePrintFrom - else - DefaultTime := DefaultTimePrintTo; - if ActiveStyle <> nil then - Result := TimeOf(GetDateTimeIF(ActiveStyle.CheckPrintRangeTime( - FTimePrint[AIndex], AIndex), DefaultTime)) - else - Result := TimeOf(GetDateTimeIF(FTimePrint[AIndex], DefaultTime)); -end; - -function TcxSchedulerReportLinkPrintRange.GetWeekCount: Integer; -begin - Result := WeeksBetween(StartOfTheWeek(PrintFrom), IncDay(EndOfTheWeek(PrintTo))); - if Result < 1 then - Result := 1; -end; - -function TcxSchedulerReportLinkPrintRange.GetYearCount: Integer; -begin - Result := YearOf(PrintTo) - YearOf(PrintFrom) + 1; - if Result < 1 then - Result := 1; -end; - -procedure TcxSchedulerReportLinkPrintRange.SetPrintDate( - AIndex: Integer; const Value: TDate); -begin - if FDatePrint[AIndex] <> Value then - begin - FDatePrint[AIndex] := Value; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkPrintRange.SetPrintTime( - AIndex: Integer; const Value: TTime); -begin - if FTimePrint[AIndex] <> Value then - begin - FTimePrint[AIndex] := Value; - Changed; - end; -end; - -function TcxSchedulerReportLinkPrintRange.IsDateStored( - AIndex: Integer): Boolean; -begin - Result := FDatePrint[AIndex] <> NullDate; -end; - -function TcxSchedulerReportLinkPrintRange.IsTimeStored( - AIndex: Integer): Boolean; -begin - Result := FTimePrint[AIndex] <> NullDate; -end; - -{ TcxSchedulerReportLinkOptionsFormatting } - -procedure TcxSchedulerReportLinkOptionsFormatting.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxSchedulerReportLinkOptionsFormatting then - with TcxSchedulerReportLinkOptionsFormatting(Source) do - begin - Self.SuppressContentColoration := SuppressContentColoration; - end; -end; - -procedure TcxSchedulerReportLinkOptionsFormatting.RestoreDefaults; -begin - inherited; - SuppressContentColoration := False; -end; - -function TcxSchedulerReportLinkOptionsFormatting.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TcxSchedulerReportLinkOptionsFormatting.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; -end; - -procedure TcxSchedulerReportLinkOptionsFormatting.SetSuppressContentColoration(Value: Boolean); -begin - if FSuppressContentColoration <> Value then - begin - FSuppressContentColoration := Value; - Changed; - end; -end; - -{ TcxCustomSchedulerReportLinkOptions } - -function TcxCustomSchedulerReportLinkOptions.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; -end; - -function TcxCustomSchedulerReportLinkOptions.GetScheduler: TcxScheduler; -begin - if ReportLink <> nil then - Result := ReportLink.Scheduler - else - Result := nil; -end; - -{ TcxSchedulerReportLinkStyles } - -constructor TcxSchedulerReportLinkStyles.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - BitmapInViewParams := True; -end; - -procedure TcxSchedulerReportLinkStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxSchedulerReportLinkStyles then - with TcxSchedulerReportLinkStyles(Source) do - begin - Self.SchedulerHeader := SchedulerHeader; - Self.Content := Content; - Self.DateNavigatorContent := DateNavigatorContent; - Self.DateNavigatorHeader := DateNavigatorHeader; - Self.DayHeader := DayHeader; - Self.Event := Event; - Self.ResourceHeader := ResourceHeader; - Self.NotesAreaBlank := NotesAreaBlank; - Self.NotesAreaLined := NotesAreaLined; - Self.TaskPad := TaskPad; - Self.TimeRuler := TimeRuler; - end; -end; - -function TcxSchedulerReportLinkStyles.GetSchedulerHeaderParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerSchedulerHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetContentParams(const ADateTime: TDateTime; - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetContentParams(ADateTime, AResource) - else - GetViewParams(vspsSchedulerContent, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetContentParams(const ADateTime: TDateTime; - ALightColor: Boolean; AResource: TcxSchedulerStorageResourceItem): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetContentParams(ADateTime, ALightColor, AResource) - else - GetViewParams(vspsSchedulerContent, nil, nil, Result) -end; - -function TcxSchedulerReportLinkStyles.GetDateNavigatorContentParams: TcxViewParams; -begin - if UseSchedulerStyles then - begin - Result := TcxSchedulerDateNavigator( - ExtStyles.Scheduler.DateNavigator).Styles.GetContentParams - end - else - GetViewParams(vspsSchedulerDateNavigatorContent, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetDateNavigatorHeaderParams: TcxViewParams; -begin - if UseSchedulerStyles then - begin - Result := TcxSchedulerDateNavigator( - ExtStyles.Scheduler.DateNavigator).Styles.GetHeaderParams - end - else - GetViewParams(vspsSchedulerDateNavigatorHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetDayHeaderParams( - const ADateTime: TDateTime): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetDayHeaderParams(ADateTime) - else - GetViewParams(vspsSchedulerDayHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetEventParams( - AEvent: TcxSchedulerEvent): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetEventContentParams(AEvent) - else - GetViewParams(vspsSchedulerEvent, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetNotesAreaBlankParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerNotesAreaBlank, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetNotesAreaLinedParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerNotesAreaLined, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetResourceHeaderParams( - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetResourceHeaderParams(AResource) - else - GetViewParams(vspsSchedulerResourceHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetTaskPadParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerTaskPad, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetTimeRulerParams: TcxViewParams; -begin - if UseSchedulerStyles then - Result := ReportLink.Scheduler.ViewDay.Styles.GetTimeRulerParams - else - GetViewParams(vspsSchedulerTimeRuler, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 3; -end; - -procedure TcxSchedulerReportLinkStyles.GetDefaultViewParams(Index: Integer; - AData: TObject; out AParams: TcxViewParams); -const - FixedParts = [vspsSchedulerDayHeader, vspsSchedulerResourceHeader, vspsSchedulerTimeRuler]; -begin - inherited; - if ReportLink <> nil then - with AParams do - begin - if Index in FixedParts then - Color := dxPSCore.dxDefaultFixedColor - else - Color := dxDefaultContentColor; - Font := ReportLink.Font; - TextColor := Font.Color; - end; -end; - -class function TcxSchedulerReportLinkStyles.GetStyleCaption(AnIndex: Integer): string; -begin - case AnIndex of - vspsSchedulerSchedulerHeader: - Result := cxGetResourceString(@sdxSchedulerSchedulerHeader); - vspsSchedulerContent: - Result := cxGetResourceString(@sdxSchedulerContent); - vspsSchedulerDateNavigatorContent: - Result := cxGetResourceString(@sdxSchedulerDateNavigatorContent); - vspsSchedulerDateNavigatorHeader: - Result := cxGetResourceString(@sdxSchedulerDateNavigatorHeader); - vspsSchedulerDayHeader: - Result := cxGetResourceString(@sdxSchedulerDayHeader); - vspsSchedulerEvent: - Result := cxGetResourceString(@sdxSchedulerEvent); - vspsSchedulerResourceHeader: - Result := cxGetResourceString(@sdxSchedulerResourceHeader); - vspsSchedulerNotesAreaBlank: - Result := cxGetResourceString(@sdxSchedulerNotesAreaBlank); - vspsSchedulerNotesAreaLined: - Result := cxGetResourceString(@sdxSchedulerNotesAreaLined); - vspsSchedulerTaskPad: - Result := cxGetResourceString(@sdxSchedulerTaskPad); - else {vspsSchedulerTimeRuler} - Result := cxGetResourceString(@sdxSchedulerTimeRuler); - end; -end; - -function TcxSchedulerReportLinkStyles.GetStyleIndexByCaption(const Caption: string): Integer; -begin - for Result := vspsSchedulerFirst to vspsSchedulerLast do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Result)) then - Exit; - Result := -1; -end; - -// IcxSchedulerStylesAdapter -function TcxSchedulerReportLinkStyles.GetDayHeaderStyle: TcxStyle; -begin - if UseSchedulerStyles then - Result := ExtStyles.DayHeader - else - Result := DayHeader; -end; - -function TcxSchedulerReportLinkStyles.GetResourceHeaderStyle: TcxStyle; -begin - if UseSchedulerStyles then - Result := ExtStyles.ResourceHeader - else - Result := ResourceHeader; -end; - -function TcxSchedulerReportLinkStyles.GetExtStyles: TcxSchedulerStyles; -begin - Result := ReportLink.Scheduler.Styles; -end; - -function TcxSchedulerReportLinkStyles.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; - if Result = nil then - Result := FReportLink; -end; - -function TcxSchedulerReportLinkStyles.GetUseSchedulerStyles: Boolean; -begin - if ReportLink = nil then - begin - Result := False; - Exit; - end; - Result := not ReportLink.OptionsFormatting.UseNativeStyles; - if not Result then - Result := (ReportLink = nil) or (ReportLink.Scheduler = nil); -end; - -{ TcxSchedulerReportLinkStyleSheet } - -class function TcxSchedulerReportLinkStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxSchedulerReportLinkStyles; -end; - -function TcxSchedulerReportLinkStyleSheet.GetStylesValue: TcxSchedulerReportLinkStyles; -begin - if GetStyles is TcxSchedulerReportLinkStyles then - Result := TcxSchedulerReportLinkStyles(GetStyles) - else - Result := nil; -end; - -procedure TcxSchedulerReportLinkStyleSheet.SetStylesValue(Value: TcxSchedulerReportLinkStyles); -begin - SetStyles(Value); -end; - -{ TcxSchedulerReportLinkPrintStyles } - -procedure TcxSchedulerReportLinkPrintStyles.Assign(Source: TPersistent); -var - I: Integer; -begin - if Source is TcxSchedulerReportLinkPrintStyles then - for I := 0 to Count - 1 do - Items[I] := TcxSchedulerReportLinkPrintStyles(Source).Items[I]; - inherited; -end; - -procedure TcxSchedulerReportLinkPrintStyles.RestoreDefaults; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].RestoreDefaults; - inherited; -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleByClass( - AClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.ClassType = AClass then Exit; - end; - Result := nil; -end; - -function TcxSchedulerReportLinkPrintStyles.GetCorrespondingStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := nil; - if Scheduler = nil then Exit; - Result := GetStyleByView(Scheduler.CurrentView) -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleByName( - const Name: string): TcxCustomSchedulerReportLinkPrintStyle; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if CompareText(Result.Caption, Name) = 0 then Exit; - end; - Result := nil; -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleByView( - View: TcxSchedulerCustomView): TcxCustomSchedulerReportLinkPrintStyle; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.IsCompatibleWith(View) then Exit; - end; - Result := nil; -end; - -function TcxSchedulerReportLinkPrintStyles.IndexOf(AItem: TcxCustomSchedulerReportLinkPrintStyle): Integer; -begin - Result := FItems.IndexOf(AItem); -end; - -procedure TcxSchedulerReportLinkPrintStyles.CreateObjects; -begin - inherited CreateObjects; - FItems := TList.Create; - CreateStyles; -end; - -procedure TcxSchedulerReportLinkPrintStyles.DestroyObjects; -begin - DestroyStyles; - FreeAndNil(FItems); - inherited DestroyObjects; -end; - -function TcxSchedulerReportLinkPrintStyles.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -procedure TcxSchedulerReportLinkPrintStyles.ActiveStyleChanged; -begin - if ReportLink <> nil then - ReportLink.ActivePrintStyleChanged; -end; - -function TcxSchedulerReportLinkPrintStyles.CreateStyle( - AStyleClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := AStyleClass.Create(Self); - FItems.Add(Result); -end; - -procedure TcxSchedulerReportLinkPrintStyles.CreateStyles; -begin - CreateStyle(TcxSchedulerReportLinkDailyPrintStyle); - CreateStyle(TcxSchedulerReportLinkWeeklyPrintStyle); - CreateStyle(TcxSchedulerReportLinkMonthlyPrintStyle); - CreateStyle(TcxSchedulerReportLinkTimeLinePrintStyle); - CreateStyle(TcxSchedulerReportLinkTrifoldPrintStyle); - CreateStyle(TcxSchedulerReportLinkDetailsPrintStyle); - CreateStyle(TcxSchedulerReportLinkMemoPrintStyle); - CreateStyle(TcxSchedulerReportLinkYearlyPrintStyle); -end; - -procedure TcxSchedulerReportLinkPrintStyles.DestroyStyles; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Items[I].Free; - FItems.Clear; -end; - -procedure TcxSchedulerReportLinkPrintStyles.GetStyleByClassEx( - AClass: TcxCustomSchedulerReportLinkPrintStyleClass; var AInstance); -begin - TPersistent(AInstance) := GetStyleByClass(AClass); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetActiveStyleEx( - Value: TcxCustomSchedulerReportLinkPrintStyle); -begin - if (ActiveStyle <> Value) or ActiveStyleAssigned then - begin - FActiveStyle := Value; - ActiveStyleAssigned := False; - end; -end; - -procedure TcxSchedulerReportLinkPrintStyles.StyleChanged(AStyle: TcxCustomSchedulerReportLinkPrintStyle); -begin - Changed; -end; - -function TcxSchedulerReportLinkPrintStyles.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxSchedulerReportLinkPrintStyles.GetItem( - Index: Integer): TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := TcxCustomSchedulerReportLinkPrintStyle(FItems[Index]); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleDaily: TcxSchedulerReportLinkDailyPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkDailyPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleDetails: TcxSchedulerReportLinkDetailsPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkDetailsPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleMemo: TcxSchedulerReportLinkMemoPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkMemoPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleMonthly: TcxSchedulerReportLinkMonthlyPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkMonthlyPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleTimeLine: TcxSchedulerReportLinkTimeLinePrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkTimeLinePrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleTrifold: TcxSchedulerReportLinkTrifoldPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkTrifoldPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleWeekly: TcxSchedulerReportLinkWeeklyPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkWeeklyPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleYearly: TcxSchedulerReportLinkYearlyPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkYearlyPrintStyle, Result); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetActiveStyle( - Value: TcxCustomSchedulerReportLinkPrintStyle); -var - APrevActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - if (FActiveStyle <> Value) or not FActiveStyleAssigned then - begin - APrevActiveStyle := FActiveStyle; - FActiveStyle := Value; - FActiveStyleAssigned := Value <> nil; - if APrevActiveStyle <> nil then - APrevActiveStyle.ActiveStyleChanged; - if Value <> nil then - Value.ActiveStyleChanged; - ActiveStyleChanged; - DesignerModified; - end; -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetActiveStyleAssigned( - Value: Boolean); -begin - if FActiveStyleAssigned <> Value then - begin - FActiveStyleAssigned := Value; - DesignerModified; - end; -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetItem(Index: Integer; - Value: TcxCustomSchedulerReportLinkPrintStyle); -begin - Items[Index].Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleDaily( - Value: TcxSchedulerReportLinkDailyPrintStyle); -begin - Daily.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleDetails( - Value: TcxSchedulerReportLinkDetailsPrintStyle); -begin - GetStyleDetails.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleMemo( - Value: TcxSchedulerReportLinkMemoPrintStyle); -begin - GetStyleMemo.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleMonthly( - Value: TcxSchedulerReportLinkMonthlyPrintStyle); -begin - Monthly.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleTimeLine( - Value: TcxSchedulerReportLinkTimeLinePrintStyle); -begin - GetStyleTimeLine.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleTrifold( - Value: TcxSchedulerReportLinkTrifoldPrintStyle); -begin - GetStyleTrifold.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleWeekly( - Value: TcxSchedulerReportLinkWeeklyPrintStyle); -begin - Weekly.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleYearly( - Value: TcxSchedulerReportLinkYearlyPrintStyle); -begin - Yearly.Assign(Value); -end; - -{ TcxCustomSchedulerReportLinkPrintStyle } - -constructor TcxCustomSchedulerReportLinkPrintStyle.Create(AStyles: TcxSchedulerReportLinkPrintStyles); -begin - inherited Create; - FStyles := AStyles; - FCaption := DefaultCaption; - CreateObjects; - RestoreDefaults; -end; - -destructor TcxCustomSchedulerReportLinkPrintStyle.Destroy; -begin - Active := False; - DestroyObjects; - inherited Destroy; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Assign(Source: TPersistent); -var - ASource: TcxCustomSchedulerReportLinkPrintStyle; -begin - if Source is TcxCustomSchedulerReportLinkPrintStyle then - begin - ASource := TcxCustomSchedulerReportLinkPrintStyle(Source); - Caption := ASource.Caption; - CompressWeekends := ASource.CompressWeekends; - DontPrintWeekends := ASource.DontPrintWeekends; - Layout := ASource.Layout; - ResourceCountPerPage := ASource.ResourceCountPerPage; - ShowNotesAreaBlank := ASource.ShowNotesAreaBlank; - ShowNotesAreaLined := ASource.ShowNotesAreaLined; - ShowTaskPad := ASource.ShowTaskPad; - if SupportTimeRange then - begin - TimePrintFrom := ASource.TimePrintFrom; - TimePrintTo := ASource.TimePrintTo; - end; - ShowEventImages := ASource.ShowEventImages; - end - else - inherited; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.DefaultCaption: string; -begin - Result := ''; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; -begin - Result := False; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.RestoreDefaults; -begin - FCaption := DefaultCaption; - FCompressWeekends := True; - FDontPrintWeekends := False; - FLayout := pslOnePage; - ResourceCountPerPage := 0; - ShowNotesAreaBlank := False; - ShowNotesAreaLined := False; - ShowTaskPad := False; - if SupportTimeRange and (Scheduler <> nil) then - begin - TimePrintFrom := TimeOf(Scheduler.OptionsView.WorkStart); - TimePrintTo := TimeOf(Scheduler.OptionsView.WorkFinish); - end; -end; - -// IdxReportLinkController -function TcxCustomSchedulerReportLinkPrintStyle.GetControlSiteBounds(AControl: TControl): TRect; -begin - Result := NullRect; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Build; -begin - FBoldedDays := TcxSchedulerDateList.Create; - try - if Storage <> nil then - begin - Events.SelStart := PrintRange.PrintFrom - 30; - Events.SelFinish := PrintRange.PrintTo + 30; - Storage.GetEvents(Events, Events.SelStart, Events.SelFinish); - end; - Events.ExtractUsedDays(FBoldedDays); - PrepareEvents; - BuildPages; - Events.Clear; - UsedDays.Clear; - finally - FreeAndNil(FBoldedDays); - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.BuildPages; -var - I: Integer; -begin - for I := 0 to PeriodCount - 1 do - begin - CreateLayoutForPeriod(I); - Progress(100 * (I + 1) / PeriodCount); - if ReportLink.AbortBuilding or ReportLink.LinkInPreviewMode then Break; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.BuildSchedulerCells( - ASite: TcxSchedulerReportSchedulingAreaCell); -var - APageIndex, APeriodIndex, ASubIndex: Integer; -begin - APageIndex := ASite.PageIndex; - GetPagePeriodAndIndex(APageIndex, APeriodIndex, ASubIndex); - FillDatesForPage(ASite.VisibleDays, APageIndex, APeriodIndex, ASubIndex); - with CreateSchedulingCellsProducer(ASite) do - try - Produce; - finally - Free; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.PrepareEvents; -var - I: Integer; - AEvent: TcxSchedulerEvent; - AllowPrint: Boolean; -begin - for I := 0 to FEvents.AbsoluteCount - 1 do - begin - AEvent := FEvents.AbsoluteItems[I]; - AllowPrint := True; - DoCanPrintEvent(AEvent, AllowPrint); - if not AllowPrint then - FEvents.Remove(AEvent); - end; - FEvents.Sort(TcxCompareEventsProc(@cxCompareEventsOrder)); - TcxSchedulerCachedEventListAccess(FEvents).Changed; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.DoCanPrintEvent( - AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); -begin - ReportLink.DoCanPrintEvent(AEvent, AllowPrint); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Progress(APercentDone: Double); -begin - if ReportLink <> nil then - ReportLink.DoProgress(APercentDone); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.AfterBuild; -begin - VisualStyles.FReportLink := nil; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.BeforeBuild; -begin - VisualStyles.FReportLink := ReportLink; - CurrentDate := PrintRange.PrintFrom; - FPagesPerPeriod := GetPagesPerPeriod; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TcxCustomSchedulerReportLinkPrintStyle._AddRef: Integer; -begin - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle._Release: Integer; -begin - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetDC: HDC; -begin - Result := 0; //don't use ReportLink.Renderer.DC -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; -begin - Result := ReportLink.OptionsRefinements.DisplayGraphicsAsText; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetEndEllipsis: Boolean; -begin - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetFlatCheckMarks: Boolean; -begin - Result := ReportLink.OptionsRefinements.FlatCheckMarks; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetGraphicsText: string; -begin - Result := ReportLink.OptionsRefinements.GraphicsText; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetMultiline: Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetTransparentGraphics: Boolean; -begin - Result := ReportLink.OptionsRefinements.TransparentGraphics; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := 2; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := 2; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; -const - GraphicClasses: array[Boolean] of TGraphicClass = (TMetafile, TBitmap); -begin - Result := GraphicClasses[IdxPSCellParams2_GetRichEditTransparent]; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetRichEditTransparent: Boolean; -begin - {$IFDEF DXVER500} - Result := ReportLink.OptionsRefinements.TransparentRichEdits; - {$ELSE} - Result := False; - {$ENDIF} -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.ActiveStyleChanged; -begin -end; - -function TcxCustomSchedulerReportLinkPrintStyle.AddPageSite( - const ABounds: TRect): TcxSchedulerReportPageSite; -begin - Result := ReportLink.AddPageSite(ABounds); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Changed; -begin - if Styles <> nil then Styles.StyleChanged(Self); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateObjects; -begin - FUsedDays := TcxSchedulerDateList.Create; - FEvents := TcxSchedulerCachedEventList.Create; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.DestroyObjects; -begin - FEvents.Free; - FUsedDays.Free; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageCount: Integer; -begin - Result := 0; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetRebuildOnPageParamsChange( - AnUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CheckPrintRangeDate( - const ADate: TDateTime; AIndex: Integer): TDateTime; -begin - Result := ADate; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CheckPrintRangeTime( - const ATime: TDateTime; AIndex: Integer): TDateTime; -begin - Result := ATime; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetActualDatePrintFrom: TDate; -begin - if PrintRange <> nil then - Result := PrintRange.PrintFrom - else - Result := 0; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetActualDatePrintTo: TDate; -begin - if PrintRange <> nil then - Result := PrintRange.PrintTo - else - Result := 0; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPagesPerPeriod: Integer; -begin - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetGlyphIndex: Integer; -begin - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := GetGlyphIndex; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetSchedulerHeaderParams: TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - Result.NativeParams := VisualStyles.GetSchedulerHeaderParams; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.DrawDesignWindowPreview(ACanvas: TCanvas; const ABounds: TRect); -var - ALeft, ATop: Integer; -begin - with ABounds do - begin - ALeft := (Left + Right - StylePreviewImages.Width) div 2; - ATop := (Top + Bottom - StylePreviewImages.Height) div 2; - end; - StylePreviewImages.Draw(ACanvas, ALeft, ATop, PreviewGlyphIndex); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetResourcePageCount: Integer; -begin - Result := ResourceCountPerPage; - if Result = 0 then - Result := 1 - else - if ResourceCount > 0 then - begin - Result := ResourceCount div ResourceCountPerPage + - Byte(ResourceCount mod ResourceCountPerPage > 0); - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetShowDateNavigator( - APageIndex: Integer): Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetShowNotesAreaBlank: Boolean; -begin - Result := FShowNotesAreaBlank; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetBoolOption( - var AOption: Boolean; Value: Boolean); -begin - if AOption <> Value then - begin - AOption := Value; - Changed; - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.SupportTimeRange: Boolean; -begin - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.SupportMessage: Boolean; -begin - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.SupportMessageEditProperties: Boolean; -begin - Result := SupportMessage; -end; - -// report cells creation - -function TcxCustomSchedulerReportLinkPrintStyle.CreateSchedulingAreaCell( - ASite: TdxReportCell): TcxSchedulerReportSchedulingAreaCell; -begin - Result := TcxSchedulerReportSchedulingAreaCell.Create(ASite); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - Result := TcxSchedulerReportCommonCellsProducer.CreateEx(Self, ASite); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateDateNavigatorCell( - ASite: TdxReportCell; AYear, AMonth: Word): TcxSchedulerReportDateNavigatorCell; -begin - with Scheduler.DateNavigator do - begin - Result := TcxSchedulerReportDateNavigatorCell.CreateEx(ASite, - ActualFirstWeekOfYear, AYear, AMonth, ShowDatesContainingEventsInBold, ShowWeekNumbers); - Result.FBoldedDays := Self.FBoldedDays; - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateHeaderCell( - ASite: TdxReportCell): TcxSchedulerReportSchedulerHeaderCell; -begin - Result := TcxSchedulerReportSchedulerHeaderCell.Create(ASite); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateNotesCell( - ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; -begin - Result := TcxSchedulerReportNotesAreaCell.CreateEx(ASite, False); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateNotesLinedCell( - ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; -begin - Result := TcxSchedulerReportNotesAreaCell.CreateEx(ASite, True); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateTaskPadCell( - ASite: TdxReportCell): TcxSchedulerReportTaskPadCell; -begin - Result := TcxSchedulerReportTaskPadCell.CreateEx(ASite, False); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); -begin - ReportLink.SetCellViewParams(ACell, GetSchedulerHeaderParams); - ReportLink.SetCellViewParams(ACell.Content, GetSchedulerHeaderParams); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.InitReportCell( - ACell: TdxReportCell; const ABounds: TRect): TdxReportCell; - - procedure InitAdditionalAreaCell(const AViewParams: TcxViewParams); - begin - ReportLink.SetCellViewParams(ACell, AViewParams); - ReportLink.SetCellViewParams(TcxSchedulerReportNotesAreaCell( - ACell).DataCell, AViewParams); - end; - -begin - ACell.BoundsRect := ABounds; - Result := ACell; - if ReportLink = nil then Exit; - ACell.Transparent := not ReportLink.OptionsFormatting.UseNativeStyles; - if ACell is TcxSchedulerReportPageItemCell then - begin - case TcxSchedulerReportPageItemCell(ACell).GetType of - srSchedulingArea: - begin - BuildSchedulerCells(TcxSchedulerReportSchedulingAreaCell(ACell)); - ReportLink.DoInitializeSchedulingAreaCell( - TcxSchedulerReportSchedulingAreaCell(ACell)); - end; - srHeader: - InitHeaderCell(TcxSchedulerReportSchedulerHeaderCell(ACell)); - srNotesBlank: - begin - InitAdditionalAreaCell(VisualStyles.GetNotesAreaBlankParams); - ReportLink.DoInitializeNotesAreaCell( - TcxSchedulerReportNotesAreaCell(ACell)); - end; - srNotesLined: - begin - InitAdditionalAreaCell(VisualStyles.GetNotesAreaLinedParams); - ReportLink.DoInitializeNotesAreaCell( - TcxSchedulerReportNotesAreaCell(ACell)); - end; - srTaskPad: - begin - InitAdditionalAreaCell(VisualStyles.GetTaskPadParams); - ReportLink.InitializeTaskPadCell( - TcxSchedulerReportTaskPadCell(ACell)); - end; - end; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CorrectBoundsWithHeader( - AHeader: TcxSchedulerReportSchedulerHeaderCell; var ABounds: TRect); -begin - if (AHeader = nil) or not AHeader.Visible then - ABounds.Top := 0 - else - ABounds.Top := AHeader.BoundsRect.Bottom + InterAreaSpace; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateAdditionalControls( - ASite: TdxReportCell; AHasCalendar, AHasTaskPad, AHasNotes, - AHasNotesLined, ARightSide: Boolean; var ABounds: TRect); -var - R: array[0..2] of TRect; - C: Integer; - - function GetAreaBounds(AllowShow: Boolean; - var ABounds: TRect; var AIndex: Integer): Boolean; - begin - Result := AllowShow; - if not Result then Exit; - ABounds := R[AIndex]; - Inc(AIndex); - end; - - procedure CreateCells; - var - AIndex: Integer; - ABounds: TRect; - begin - AIndex := 0; - if GetAreaBounds(AHasTaskPad, ABounds, AIndex) then - InitReportCell(CreateTaskPadCell(ASite), ABounds); - if GetAreaBounds(AHasNotes, ABounds, AIndex) then - InitReportCell(CreateNotesCell(ASite), ABounds); - if GetAreaBounds(AHasNotesLined, ABounds, AIndex) then - InitReportCell(CreateNotesLinedCell(ASite), ABounds); - end; - -begin - C := Byte(AHasTaskPad) + Byte(AHasNotes) + Byte(AHasNotesLined); - if C = 0 then Exit; - SplitToRects(ABounds, AHasCalendar, ARightSide, ABounds, R[0]); - if C = 2 then - Rect2RectsVert(R[0], R[0], R[1]) - else - if C = 3 then - begin - if AHasCalendar then - Rect2RectsVert(R[0], R[0], R[1], R[2]) - else - begin - Rect2RectsVert(R[0], R[1], R[0]); - Rect2RectsHorz(R[1], R[1], R[2]); - end; - end; - CreateCells; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateHeaderDateNavigator( - AHeader: TcxSchedulerReportSchedulerHeaderCell; APageIndex: Integer; out ABounds: TRect); -var - R: TRect; - Y, M, D: Word; - AHeight, H, ALeft: Integer; - CP, HP: TdxReportItemViewParams; - ACell: TcxSchedulerReportDateNavigatorCell; -begin - FillChar(CP, SizeOf(CP), 0); - FillChar(HP, SizeOf(HP), 0); - AHeight := ABounds.Bottom - ABounds.Top; - CP.NativeParams := VisualStyles.GetDateNavigatorContentParams; - HP.NativeParams := VisualStyles.GetDateNavigatorHeaderParams; - HP.Transparent := not ReportLink.OptionsFormatting.UseNativeStyles; - GetPageDateNavigatorInfo(APageIndex, Y, M); - ACell := CreateDateNavigatorCell(AHeader, Y, M); - H := ACell.MeasureDateNavigatorHeight(CP.NativeParams, HP.NativeParams); - if H > AHeight then - ACell.AdjustSize(CP, HP, H, AHeight); - R.TopLeft := Point(0, 0); - R.BottomRight := TPoint(ACell.CalculateSize(CP, HP)); - OffsetRect(R, ABounds.Right - ABounds.Left - R.Right, 0); - InflateRect(R, 0, -3); - ACell.BoundsRect := R; - ALeft := R.Left; - if PrintRange.MonthCount > 1 then - begin - IncAMonth(Y, M, D); - ACell.BoundsRect := cxRectSetRight(R, R.Left); - ALeft := R.Left - (R.Right - R.Left); - ACell := CreateDateNavigatorCell(AHeader, Y, M); - if H > AHeight then - ACell.AdjustSize(CP, HP, H, AHeight); - ACell.CalculateSize(CP, HP); - ACell.BoundsRect := R; - end; - AHeader.Content.BoundsRect := MakeRect(ABounds.Left + cxTextOffset, - ABounds.Top + cxTextOffset, ALeft, ABounds.Bottom - cxTextOffset); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateLayoutForPeriod( - APeriodIndex: Integer); -var - APageIndex: Integer; - R: TRect; - APage: TcxSchedulerReportPageSite; - AHeader: TcxSchedulerReportSchedulerHeaderCell; -begin - APageIndex := GetPageIndex(APeriodIndex, 0); - CreatePageSiteWithHeader(APageIndex, APage, AHeader, R); - CorrectBoundsWithHeader(AHeader, R); - CreateControlsOnFirstPage(APageIndex, APage, AHeader, R); - if Layout = pslTwoPages then - begin - CreatePageSiteWithHeader(APageIndex + 1, APage, AHeader, R, False); - CorrectBoundsWithHeader(AHeader, R); - CreateControlsOnSecondPage(APageIndex + 1, APage, AHeader, R); - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreatePageSiteWithHeader( - APageIndex: Integer; out ASite: TcxSchedulerReportPageSite; - out AHeader: TcxSchedulerReportSchedulerHeaderCell; - out ABounds: TRect; AIsPrimary: Boolean = True); -var - R: TRect; -begin - ABounds := GetPageSiteBounds(APageIndex); - ASite := AddPageSite(ABounds); - ASite.FPageIndex := APageIndex; - ASite.FPrimaryPage := AIsPrimary; - ABounds := ASite.GetInnerBounds(0); - if GetHasPageReportTitle(APageIndex) then - Inc(ABounds.Top, ReportLink.RenderInfo.CalculateTitleHeight); - if GetHasPageHeader(APageIndex) then - begin - R := ABounds; - R.Bottom := R.Top + GetPageHeaderHeight(R, APageIndex); - ABounds.Top := R.Bottom + InterAreaSpace; - AHeader := CreateHeaderCell(ASite); - Inc(R.Bottom, AHeader.BorderEdgeThicknesses[csBottom]); - InitReportCell(AHeader, R); - if GetShowDateNavigator(APageIndex) then - begin - R := AHeader.GetInnerBounds(0); - CreateHeaderDateNavigator(TcxSchedulerReportSchedulerHeaderCell(AHeader), APageIndex, R); - end; - AHeader.AdjustTextSize; - if AIsPrimary then - ReportLink.DoInitializeHeaderPrimaryCell(AHeader) - else - ReportLink.DoInitializeHeaderSecondaryCell(AHeader); - end - else - AHeader := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CanSplitSchedulingOnTwoPages: Boolean; -begin - Result := Layout = pslTwoPages; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetHasPageHeader( - APageIndex: Integer): Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetHasPageReportTitle( - APageIndex: Integer): Boolean; -begin - case ReportLink.ReportTitleMode of - tmNone: - Result := False; - tmOnFirstPage: - Result := APageIndex div (Byte(Layout) + 1) = 0; - else - Result := True; - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageHeaderHeight( - const ASiteBounds: TRect; APageIndex: Integer): Integer; -var - AMin, AMax: Integer; -begin - Result := 0; - AMin := Round((ASiteBounds.Bottom - ASiteBounds.Top) * SchedulerHeaderMinHeight); - AMax := Round((ASiteBounds.Bottom - ASiteBounds.Top) * SchedulerHeaderMaxHeight); - if GetShowDateNavigator(APageIndex) and (ReportLink <> nil) then - begin - with VisualStyles do - Result := TcxSchedulerReportDateNavigatorCell.MeasureDateNavigatorHeight( - GetDateNavigatorContentParams, GetDateNavigatorHeaderParams); - end; - Result := Max(Min(AMax, Result), AMin); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageIndex( - APeriodIndex, AIndex: Integer): Integer; -begin - Result := (APeriodIndex * (Byte(Layout) + 1) + AIndex); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.GetPagePeriodAndIndex( - APageIndex: Integer; var APeriodIndex, ASubIndex: Integer); -begin - ASubIndex := 0; - if Layout = pslTwoPages then - begin - APeriodIndex := APageIndex div 2; - ASubIndex := APageIndex mod 2; - end - else - APeriodIndex := APageIndex; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageSiteBounds( - APageIndex: Integer): TRect; -begin - Result := MakeBounds(0, 0, ReportLink.PageWidth, ReportLink.PageHeight); - OffsetRect(Result, 0, APageIndex * ReportLink.PageHeight); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetStartOfWeekOffset: Integer; -begin - Result := 0; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.GetPageDateNavigatorInfo( - APageIndex: Integer; out AYear, AMonth: Word); -var - ADate: TDateTime; - ADayCount: Integer; -begin - ADayCount := APageIndex * GetDaysPerPeriod div - ((Byte(Layout) + 1) * GetResourcePageCount); - ADate := PrintRange.PrintFrom + ADayCount; - AYear := YearOf(ADate); - AMonth := MonthOf(ADate); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetDaysPerPeriod: Integer; -begin - Result := 1; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -begin -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetActive: Boolean; -begin - if Styles <> nil then - Result := (Styles.ActiveStyle = Self) and Styles.ActiveStyleAssigned - else - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetHasAdditionalArea: Boolean; -begin - Result := ShowNotesAreaBlank or ShowNotesAreaLined or ShowTaskPad; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetIndex: Integer; -begin - if Styles <> nil then - Result := Styles.IndexOf(Self) - else - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageSite( - AIndex: Integer): TcxSchedulerReportPageSite; -begin - if ReportLink <> nil then - Result := TcxSchedulerReportPageSite(ReportLink.PageSites[AIndex]) - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPeriodCount: Integer; -begin - Result := PageCount; - if Layout = pslTwoPages then - Result := Result div 2; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPrintRange: TcxSchedulerReportLinkPrintRange; -begin - if ReportLink <> nil then - Result := ReportLink.PrintRange - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetReportLink: TcxSchedulerReportLink; -begin - if Styles <> nil then - Result := Styles.ReportLink - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetResourceCount: Integer; -begin - if (Scheduler <> nil) and (Scheduler.Storage <> nil) and - (Scheduler.Storage.Resources.ResourceItems.VisibleResourceCount > 0) then - Result := Scheduler.Storage.Resources.ResourceItems.VisibleResourceCount - else - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetScheduler: TcxScheduler; -begin - if ReportLink <> nil then - Result := ReportLink.Scheduler - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetStorage: TcxCustomSchedulerStorage; -begin - if Scheduler <> nil then - Result := Scheduler.Storage - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetTimePrintFrom: TTime; -begin - Result := TimeOf(PrintRange.TimePrintFrom); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetTimePrintTo: TTime; -begin - Result := TimeOf(PrintRange.TimePrintTo); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetVisualStyles: TcxSchedulerReportLinkStyles; -begin - if ReportLink <> nil then - Result := ReportLink.ActiveStyles - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsCaptionStored: Boolean; -begin - Result := (FCaption <> DefaultCaption); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsLayoutStored: Boolean; -begin - Result := Layout <> pslOnePage; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsShowNotesAreaBlankStored: Boolean; -begin - Result := FShowNotesAreaBlank <> False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsActiveStored: Boolean; -begin - Result := Active and Styles.ActiveStyleAssigned; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetActive(Value: Boolean); -begin - if Styles <> nil then - begin - if Value then - Styles.ActiveStyle := Self - else - Styles.ActiveStyle := nil; - Styles.ActiveStyleAssigned := Value; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetCaption(const Value: string); -begin - if Caption <> Value then - begin - FCaption := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetCompressWeekends( - Value: Boolean); -begin - SetBoolOption(FCompressWeekends, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetDontPrintWeekends( - Value: Boolean); -begin - SetBoolOption(FDontPrintWeekEnds, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetLayout( - Value: TcxSchedulerReportLinkPeriodicPrintStyleLayout); -begin - if FLayout <> Value then - begin - FLayout := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetResourceCountPerPage( - Value: Integer); -begin - if FResourceCountPerPage <> Value then - begin - FResourceCountPerPage := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowEventImages(Value: Boolean); -begin - if FShowEventImages <> Value then - begin - FShowEventImages := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowNotesAreaBlank( - Value: Boolean); -begin - SetBoolOption(FShowNotesAreaBlank, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowNotesAreaLined( - Value: Boolean); -begin - SetBoolOption(FShowNotesAreaLined, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowResourceImages(Value: Boolean); -begin - if FShowResourceImages <> Value then - begin - FShowResourceImages := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowTaskPad(Value: Boolean); -begin - SetBoolOption(FShowTaskPad, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetTimePrintFrom(Value: TTime); -begin - PrintRange.TimePrintFrom := Value; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetTimePrintTo(Value: TTime); -begin - PrintRange.TimePrintTo := Value; -end; - -{ TcxSchedulerReportLinkDailyPrintStyle } - -constructor TcxSchedulerReportLinkDailyPrintStyle.Create( - AStyles: TcxSchedulerReportLinkPrintStyles); -begin - inherited Create(AStyles); - FShowEventImages := True; - FShowResourceImages := True; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionDaily); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := AView is TcxSchedulerDayView; -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.BeforeBuild; -begin - inherited BeforeBuild; - FCurrentPagePerDate := PagesPerPeriod; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.CanSplitSchedulingOnTwoPages: Boolean; -begin - Result := False; -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - if Layout = pslOnePage then - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - CreateAdditionalControls(ASite, False, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - Result := TcxSchedulerReportDailyCellsProducer.CreateEx(Self, ASite); -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -begin - APageIndex := APageIndex div (Byte(Layout) + 1) div GetResourcePageCount; - ADateList.Add(PrintRange.PrintFrom + APageIndex); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - Result := Scheduler.ViewDay - else - Result := inherited GetCorrespondedView; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetGlyphIndex: Integer; -begin - Result := Byte(HasAdditionalArea); - if Layout = pslTwoPages then - Result := 2; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetPageCount: Integer; -begin - Result := GetResourcePageCount * PrintRange.DayCount * (Byte(Layout) + 1); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetPagesPerPeriod: Integer; -var - I, J: Integer; -begin - if (ResourceCountPerPage = 0) or (ResourceCount < 2) then - Result := Byte(Layout) + 1 - else - begin - I := Min(ResourceCount, ResourceCountPerPage); - J := ResourceCount div I; - if J * I < ResourceCount then Inc(J); - Result := J * (Byte(Layout) + 1); - end; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetShowNotesAreaBlank: Boolean; -begin - Result := inherited GetShowNotesAreaBlank; - if not Result and (Layout <> pslOnePage) then - Result := not (ShowTaskPad or ShowNotesAreaLined); -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); -begin - ReportLink.SetCellViewParams(ACell, VisualStyles.GetSchedulerHeaderParams); - ACell.PrimaryText := DateTimeHelper.DateToLongDateStr(CurrentDate); - ACell.SecondaryText := LongDayNames[DayOfWeek(CurrentDate)]; - inherited InitHeaderCell(ACell); - Dec(FCurrentPagePerDate); - if FCurrentPagePerDate = 0 then - begin - CurrentDate := CurrentDate + 1; - FCurrentPagePerDate := PagesPerPeriod; - end; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.SupportMessage: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.SupportTimeRange: Boolean; -begin - Result := True; -end; - -{ TcxSchedulerReportLinkCustomDetailsPrintStyle } - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.AddPageSite( - const ABounds: TRect): TcxSchedulerReportPageSite; -begin - Inc(BuildedPageCount); - Result := inherited AddPageSite(ABounds); -end; - -procedure TcxSchedulerReportLinkCustomDetailsPrintStyle.BeforeBuild; -begin - CurrentPage := nil; - CellsOnPage := 0; - BuildedPageCount := 0; - FTimeWidth := MeasureTimeWidth; - inherited BeforeBuild; -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.GetNextPage( - APrevPage: TcxSchedulerReportPageSite; out ABounds: TRect): TcxSchedulerReportPageSite; -begin - CellsOnPage := 0; - if APrevPage = nil then - Result := PageSites[0] - else - Result := AddPageSite(GetPageSiteBounds(BuildedPageCount)); - ABounds := Result.GetInnerBounds(0); - if GetHasPageReportTitle(BuildedPageCount - 1) then - Inc(ABounds.Top, ReportLink.RenderInfo.CalculateTitleHeight); -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.GetPageCount: Integer; -begin - Result := Max(1, BuildedPageCount); -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.MeasureTimeWidth: Integer; -var - AFont: TFont; -begin - AFont := ReportLink.Font; - if (VisualStyles.Event <> nil) and (cxStyles.svFont in VisualStyles.Event.AssignedValues) then - AFont := VisualStyles.Event.Font; - Result := cxTextWidth(AFont, '00:00 - 00:00') * 2; -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.SupportMessage: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.GetPageWidth: Integer; -begin - Result := ReportLink.PageWidth; -end; - -{ TcxSchedulerReportLinkDetailsPrintStyle } - -procedure TcxSchedulerReportLinkDetailsPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkDetailsPrintStyle then - begin - PaginationMode := TcxSchedulerReportLinkDetailsPrintStyle(Source).PaginationMode; - UsePagination := TcxSchedulerReportLinkDetailsPrintStyle(Source).UsePagination; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionDetails); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.RestoreDefaults; -begin - PaginationMode := dpmByDay; - UsePagination := False; - inherited RestoreDefaults; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.AddDayHeader(ADate: TDateTime; - AContinue: Boolean; var ABounds: TRect): TcxSchedulerReportSchedulerHeaderCell; -var - R: TRect; -begin - Result := TcxSchedulerReportSchedulerHeaderCell.Create(CurrentPage); - Result.Date := ADate; - R := cxRectSetHeight(ABounds, DayHeaderHeight); - ABounds.Top := R.Bottom + InterAreaSpace; - Result.Transparent := False; - Result.PrimaryText := GetDayHeaderText(AContinue); - InitReportCell(Result, R); - Result.Content.BoundsRect := Result.GetInnerBounds(0); - Result.AdjustTextSize; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.BeforeBuild; -begin - PreviousHeader := nil; - CellsOnPage := 0; - inherited BeforeBuild; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.BuildPages; -var - ADayEvents: TcxSchedulerEventList; -begin - ADayEvents := TcxSchedulerEventList.Create; - try - CellsOnPage := 0; - Site := nil; - DayIndex := 0; - while DayIndex < PrintRange.DayCount do - begin - ADayEvents.Clear; - Events.ExtractEvents(CurrentDate, ADayEvents); - Events.Sort(@cxCompareEventsOrder); - if (ADayEvents.Count > 0) and (Site = nil) then - begin - Site := AddPageSite(GetPageSiteBounds(0)); - PrepareNextPage; - end; - if (CellsOnPage > 0) and (ADayEvents.Count > 0) then - CheckPagination; - EventIndex := 0; - while EventIndex < ADayEvents.Count do - begin - CurrentCell := AddEventCell(ADayEvents[EventIndex]); - ReportLink.DoInitializeEventCell(CurrentCell); - if (CellsOnPage > 0) and (MeasureCellBounds.Bottom > CurrentPageBounds.Bottom) then - PrepareNextPage; - HeaderNeeded; - SetCellPlace; - Inc(EventIndex); - end; - CurrentDate := CurrentDate + 1; - Inc(DayIndex); - end; - finally - ADayEvents.Free; - end; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetDayHeaderHeight: Integer; -var - DC: HDC; -begin - DC := GetDC(0); - try - Result := ReportLink.Renderer.CalcTextHeight(DC, 'Wg', False, GetSchedulerHeaderParams.NativeParams.Font) * 2; - finally - ReleaseDC(0, DC); - end -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetDayHeaderText(AContinue: Boolean): string; -begin - Result := DateTimeHelper.DateToLongDateStr(CurrentDate); - if AContinue then - Result := Result + ' ' + cxGetResourceString(@sdxContinuedMessage); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetGlyphIndex: Integer; -begin - Result := 22; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := 16; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetSchedulerHeaderParams: TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - Result.NativeParams := VisualStyles.GetDayHeaderParams(CurrentDate); - Include(Result.FontStyle, fsBold); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.AddEventCell( - AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; -begin - Result := TcxSchedulerReportDetailsEventCell.CreateEx(Site, AEvent, - CurrentDate, VisualStyles.GetEventParams(AEvent), - (AEvent.Start < CurrentDate) and (CurrentDate > PrintRange.PrintFrom)); - Result.CalculateLayout(PageWidth, TimeWidth); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.CheckPagination; -begin - if not UsePagination then Exit; - case PaginationMode of - dpmByDay: - PrepareNextPage; - dpmByWeek: - if GetWeekNumber(CurrentDate, dSunday, fwySystem) <> - GetWeekNumber(PreviousHeader.Date, dSunday, fwySystem) then - PrepareNextPage; - dpmByMonth: - if MonthOf(CurrentDate) <> MonthOf(PreviousHeader.Date) then - PrepareNextPage; - end; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.HeaderNeeded; -begin - if NeedAddDayHeader then - PreviousHeader := AddDayHeader(CurrentDate, EventIndex > 0, CurrentPageBounds); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.NeedAddDayHeader: Boolean; -begin - Result := (CellsOnPage = 0) or (PreviousHeader = nil) or (PreviousHeader.Date <> CurrentDate); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.MeasureCellBounds: TRect; -begin - Result := CurrentPageBounds; - Result.Bottom := Result.Top + CurrentCell.CalculateHeight; - if NeedAddDayHeader then - Inc(Result.Bottom, DayHeaderHeight); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.PrepareNextPage; -begin - CurrentPage := GetNextPage(CurrentPage, CurrentPageBounds); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.SetCellPlace; -begin - Inc(CellsOnPage); - CurrentCell.BoundsRect := MeasureCellBounds; - CurrentCell.Parent := CurrentPage; - CurrentPageBounds.Top := CurrentCell.BoundsRect.Bottom + InterAreaSpace; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.SetPaginationMode( - Value: TcxSchedulerReportLinkDetailsPrintStylePaginationMode); -begin - if FPaginationMode <> Value then - begin - FPaginationMode := Value; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.SetUsePagination( - Value: Boolean); -begin - SetBoolOption(FUsePagination, Value); -end; - -{ TcxSchedulerReportLinkMemoPrintStyle } - -procedure TcxSchedulerReportLinkMemoPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkMemoPrintStyle then - with TcxSchedulerReportLinkMemoPrintStyle(Source) do - begin - Self.FSelectedEventsOnly := FSelectedEventsOnly; - Self.FStartEachItemOnNewPage := FStartEachItemOnNewPage; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkMemoPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionMemo); -end; - -procedure TcxSchedulerReportLinkMemoPrintStyle.RestoreDefaults; -begin - FSelectedEventsOnly := True; - FStartEachItemOnNewPage := True; - inherited RestoreDefaults; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.AddEventCell( - AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; -begin - Result := TcxSchedulerReportMemoEventCell.CreateEx(CurrentPage, AEvent, - NullDate, VisualStyles.GetEventParams(AEvent)); - Result.CalculateLayout(PageWidth, TimeWidth); -end; - -procedure TcxSchedulerReportLinkMemoPrintStyle.BuildPages; -var - I: Integer; - APageBounds: TRect; - ACell: TcxSchedulerReportDetailsEventCell; - - function GetCellBounds: TRect; - begin - Result := APageBounds; - Result.Bottom := Result.Top + ACell.CalculateHeight; - end; - -begin - Site := nil; - if Events.Count = 0 then Exit; - Site := AddPageSite(GetPageSiteBounds(0)); - CurrentPage := GetNextPage(CurrentPage, APageBounds); - Events.Sort(@cxCompareEventsOrder); - for I := 0 to Events.AbsoluteCount - 1 do - begin - ACell := AddEventCell(Events[I]); - ReportLink.DoInitializeEventCell(ACell); - if (CellsOnPage > 0) and (StartEachItemOnNewPage or - (GetCellBounds.Bottom > APageBounds.Bottom)) then - CurrentPage := GetNextPage(CurrentPage, APageBounds); - ACell.Parent := CurrentPage; - ACell.BoundsRect := GetCellBounds; - APageBounds.Top := ACell.BoundsRect.Bottom + InterAreaSpace; - Inc(CellsOnPage); - end; -end; - -procedure TcxSchedulerReportLinkMemoPrintStyle.DoCanPrintEvent( - AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); -var - I: Integer; - AUseEvent: Boolean; -begin - if SelectedEventsOnly and (Scheduler <> nil) then - begin - AllowPrint := False; - for I := 0 to Scheduler.SelectedEventCount - 1 do - begin - AllowPrint := Scheduler.SelectedEvents[I].Source = TcxSchedulerControlEvent(AEvent).Source; - if AllowPrint then Break; - end; - end; - AUseEvent := False; - for I := 0 to PrintRange.DayCount - 1 do - if AEvent.IsDayEvent(PrintRange.PrintFrom + I) then - begin - AUseEvent := True; - Break; - end; - if AUseEvent then - inherited DoCanPrintEvent(AEvent, AllowPrint) - else - AllowPrint := False; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.GetGlyphIndex: Integer; -begin - Result := 20; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := 17; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.MeasureTimeWidth: Integer; -var - AFont: TFont; -begin - AFont := ReportLink.Font; - if (VisualStyles.Event <> nil) and (cxStyles.svFont in VisualStyles.Event.AssignedValues) then - AFont := VisualStyles.Event.Font; - Result := 0; - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxSubjectLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxLocationLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxStartLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxFinishLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxShowTimeAsLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxRecurrenceLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxRecurrencePatternLabelCaption))); - if Result = 0 then - Result := inherited MeasureTimeWidth - else - Inc(Result, cxTextWidth(AFont, '0000 - 0000')); - Result := Min(PageWidth div 3, Result); -end; - -{ TcxSchedulerReportLinkMonthlyPrintStyle } - -constructor TcxSchedulerReportLinkMonthlyPrintStyle.Create( - AStyles: TcxSchedulerReportLinkPrintStyles); -begin - inherited Create(AStyles); - FShowResourceImages := True; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkMonthlyPrintStyle then - PrintExactlyOneMonthPerPage := - TcxSchedulerReportLinkMonthlyPrintStyle(Source).PrintExactlyOneMonthPerPage; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionMonthly); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := AView is TcxSchedulerWeeksView; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.RestoreDefaults; -begin - PrintExactlyOneMonthPerPage := False; - inherited RestoreDefaults; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - if Layout = pslTwoPages then - CreateAdditionalControls(ASite, True, ShowTaskPad and - (ShowNotesAreaLined or ShowNotesAreaBlank), False, False, False, ABounds) - else - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -var - HasTaskPad: Boolean; -begin - HasTaskPad := ShowTaskPad and not (ShowNotesAreaBlank or ShowNotesAreaLined); - CreateAdditionalControls(ASite, True, HasTaskPad, ShowNotesAreaBlank, - ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - Result := Scheduler.ViewWeeks - else - Result := inherited GetCorrespondedView; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -var - I: Integer; - Y, M, D: Word; - AStart: TDateTime; -begin - AStart := GetDateForPage(APageIndex); - DecodeDate(AStart, Y, M, D); - for I := 0 to DaysInAMonth(Y, M) - 1 do - ADateList.Add(AStart + I); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetDaysPerPeriod: Integer; -begin - Result := 30; -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetDateForPage( - APageIndex: Integer): TDateTime; -var - Y, M, D: Word; - APeriodIndex: Integer; -begin - APeriodIndex := APageIndex div (Byte(Layout) + 1) div GetResourcePageCount; - DecodeDate(PrintRange.PrintFrom, Y, M, D); - D := 1; - IncAMonth(Y, M, D, APeriodIndex); - Result := EncodeDate(Y, M, D); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetGlyphIndex: Integer; -begin - Result := 11 + Byte(HasAdditionalArea); - if Layout = pslTwoPages then - Inc(Result, 2); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetPageCount: Integer; -begin - Result := PrintRange.MonthCount * (Byte(Layout) + 1) * GetResourcePageCount; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); - - function GetMonthText(ADate: TDateTime): string; - begin - Result := FormatDateTime('mmmm', ADate) + ' ' + IntToStr(YearOf(ADate)); - end; - -var - ADate: TDateTime; -begin - ADate := GetDateForPage(ACell.PageIndex); - if PrintExactlyOneMonthPerPage then - ACell.PrimaryText := GetMonthText(ADate) - else - ACell.PrimaryText := GetMonthText(ADate) + ' - ' + GetMonthText(ADate + 32); - inherited InitHeaderCell(ACell); -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.SetPrintExactlyOneMonthPerPage( - Value: Boolean); -begin - SetBoolOption(FPrintExactlyOneMonthPerPage, Value); -end; - -{ TcxSchedulerReportLinkTimeLinePrintStyle } - -constructor TcxSchedulerReportLinkTimeLinePrintStyle.Create( - AStyles: TcxSchedulerReportLinkPrintStyles); -begin - inherited Create(AStyles); - FShowLinks := True; - FShowEventImages := True; - FShowLinks := True; - FShowResourceImages := True; - FLayoutBuilder := TcxSchedulerReportTimeLineLayoutBuilder.CreateEx(Self); -end; - -destructor TcxSchedulerReportLinkTimeLinePrintStyle.Destroy; -begin - FLayoutBuilder.Free; - inherited Destroy; -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkTimeLinePrintStyle then - FShowLinks := True; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionTimeLine); -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := AView is TcxSchedulerTimeGridView; -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.RestoreDefaults; -begin - FShowLinks := True; - inherited RestoreDefaults; -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.AfterBuild; -begin - inherited AfterBuild; - RestoreLayout; -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.BeforeBuild; -begin - SaveLayout; - FLayoutBuilder.CalculateLayout; - inherited BeforeBuild; -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.BuildSchedulerCells( - ASite: TcxSchedulerReportSchedulingAreaCell); -begin - ASite.CellSides := ASite.CellSides + csAll; - inherited BuildSchedulerCells(ASite); -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.CanDontPrintWeekends: Boolean; -begin - Result := GetCorrespondedView is TcxSchedulerTimeGridView; - if Result then - Result := CorrespondedView.Scales.MinorUnit <= suDay; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.CheckPrintRangeDate( - const ADate: TDateTime; AIndex: Integer): TDateTime; -begin - Result := inherited CheckPrintRangeDate(ADate, AIndex); - if Result = NullDate then - begin - if AIndex = 0 then - Result := CorrespondedView.VisibleStart - else - Result := CorrespondedView.VisibleFinish; - Result := DateOf(Result); - end; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.CheckPrintRangeTime( - const ATime: TDateTime; AIndex: Integer): TDateTime; -begin - Result := inherited CheckPrintRangeDate(ATime, AIndex); - if Result = NullDate then - begin - if AIndex = 0 then - Result := CorrespondedView.VisibleStart - else - Result := CorrespondedView.VisibleFinish; - Result := TimeOf(Result); - end; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - Result := TcxSchedulerReportTimeLineCellsProducer.CreateEx(Self, ASite); -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, False, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - begin - if Scheduler.CurrentView is TcxSchedulerTimeGridView then - Result := Scheduler.CurrentView as TcxSchedulerTimeGridView - else - Result := Scheduler.ViewTimeGrid - end - else - Result := inherited GetCorrespondedView; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.GetGlyphIndex: Integer; -begin - Result := 28; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.GetHasPageHeader( - APageIndex: Integer): Boolean; -begin - Result := False; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.GetPageCount: Integer; -begin - Result := LayoutBuilder.PageCount; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := 23; -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.RestoreLayout; -begin - Scheduler.OptionsView.ResourcesPerPage := FStoredResPerPage; - Scheduler.FirstVisibleResourceIndex := FStoredTopIndex; -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.SaveLayout; -begin - FStoredResPerPage := Scheduler.OptionsView.ResourcesPerPage; - FStoredTopIndex := Scheduler.FirstVisibleResourceIndex; - Scheduler.OptionsView.ResourcesPerPage := 0; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.SupportMessage: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.GetPageHeight: Integer; -begin - Result := ReportLink.PageHeight; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.GetPageWidth(AColumn: Integer): Integer; -begin - Result := ReportLink.PageWidth; - if AColumn = 0 then - Dec(Result, GetPanelWidth); -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.GetPanelWidth: Integer; -begin - Result := 0; - if ShowTaskPad or ShowNotesAreaBlank or ShowNotesAreaLined then - Result := AdditionalWidth(Rect(0, 0, ReportLink.PageWidth, 0)) + InterAreaSpace; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.GetPrintFrom: TDateTime; -begin - Result := PrintRange.PrintFrom + PrintRange.TimePrintFrom; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.GetPrintTo: TDateTime; -begin - Result := PrintRange.PrintTo + PrintRange.TimePrintTo; -end; - -function TcxSchedulerReportLinkTimeLinePrintStyle.GetTimeGridView: TcxSchedulerTimeGridView; -begin - Result := inherited CorrespondedView as TcxSchedulerTimeGridView; -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.SetPrimaryPageHeadersOnly( - AValue: Boolean); -begin - if AValue <> FPrimaryPageHeadersOnly then - begin - FPrimaryPageHeadersOnly := AValue; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.SetPrimaryPageScalesOnly( - AValue: Boolean); -begin - if AValue <> FPrimaryPageScalesOnly then - begin - FPrimaryPageScalesOnly := AValue; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.SetShowLinks(AValue: Boolean); -begin - if AValue <> FShowLinks then - begin - FShowLinks := AValue; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkTimeLinePrintStyle.SetWorkTimeOnly(AValue: Boolean); -begin - if AValue <> FWorkTimeOnly then - begin - FWorkTimeOnly := AValue; - Changed; - end; -end; - -{ TcxSchedulerReportLinkTrifoldPrintStyle } - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportLinkTrifoldPrintStyle then - with TcxSchedulerReportLinkTrifoldPrintStyle(Source) do - begin - Self.LeftSection := LeftSection; - Self.MiddleSection := MiddleSection; - Self.RightSection := RightSection; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionTrifold); -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.RestoreDefaults; -begin - inherited RestoreDefaults; - FSections[0] := smDailyCalendar; - FSections[1] := smTaskPad; - FSections[2] := smWeeklyCalendar; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.CreateLayoutForPeriod( - APeriodIndex: Integer); -var - I: Integer; - R: array[0..2] of TRect; - ABounds: TRect; - ASite: TcxSchedulerReportPageSite; -begin - ABounds := GetPageSiteBounds(APeriodIndex); - ASite := AddPageSite(ABounds); - ASite.FPageIndex := APeriodIndex; - ASite.FPrimaryPage := True; - ABounds := ASite.GetInnerBounds(0); - if GetHasPageReportTitle(APeriodIndex) then - Inc(ABounds.Top, ReportLink.RenderInfo.CalculateTitleHeight); - Rect2RectsHorz(ABounds, R[0], R[1], R[2]); - for I := 0 to 2 do - CreateLayoutForSection(ASite, APeriodIndex, R[I], FSections[I]); -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.CreateLayoutForSection( - ASite: TdxReportCell; APeriodIndex: Integer; const ABounds: TRect; - ASection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); -begin - FCurrentSection := ASection; - case ASection of - smDailyCalendar: - CreateSchedulingAreaWithHeader(ASite, ABounds); - smWeeklyCalendar: - CreateSchedulingAreaWithHeader(ASite, ABounds); - smMonthlyCalendar: - CreateSchedulingAreaWithHeader(ASite, ABounds); - smTaskPad: - InitReportCell(CreateTaskPadCell(ASite), ABounds); - smNotesAreaBlank: - InitReportCell(CreateNotesCell(ASite), ABounds); - smNotesAreaLined: - InitReportCell(CreateNotesLinedCell(ASite), ABounds); - end; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.CreateSchedulingAreaWithHeader( - ASite: TdxReportCell; ABounds: TRect); -var - R: TRect; - AHeader: TcxSchedulerReportSchedulerHeaderCell; -begin - R := ABounds; - R.Bottom := R.Top + Round((R.Bottom - R.Top) * SchedulerHeaderSmallHeight); - ABounds.Top := R.Bottom + InterAreaSpace; - FCurrentSchedulingArea := CreateSchedulingAreaCell(ASite); - InitReportCell(FCurrentSchedulingArea, ABounds); - AHeader := CreateHeaderCell(ASite); - InitReportCell(AHeader, R); - AHeader.Content.BoundsRect := AHeader.GetInnerBounds(0); - AHeader.AdjustTextSize; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - case FCurrentSection of - smDailyCalendar: - Result := TcxSchedulerReportDailyCellsProducer.CreateEx(Self, ASite); - smWeeklyCalendar, smMonthlyCalendar: - Result := TcxSchedulerReportWeeksCellsProducer.CreateEx(Self, ASite); - else - Result := nil; - end; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -var - I: Integer; - ADate: TDateTime; -begin - ADateList.Clear; - case FCurrentSection of - smDailyCalendar: - ADateList.Add(APageIndex + PrintRange.PrintFrom); - smWeeklyCalendar: - begin - if HasDailySection then - ADate := StartOfTheWeek(APageIndex + PrintRange.PrintFrom) - else - ADate := StartOfTheWeek(PrintRange.PrintFrom + - MulDiv(APageIndex * 7, PrintRange.WeekCount, PageCount)); - for I := 0 to 7 do - ADateList.Add(ADate + I); - end; - smMonthlyCalendar: - begin - ADate := StartOfTheMonth(PrintRange.PrintFrom + APageIndex * FPageRange); - for I := 0 to DaysInMonth(ADate) do - ADateList.Add(ADate + I); - end; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - case FCurrentSection of - smDailyCalendar: - Result := Scheduler.ViewDay; - smWeeklyCalendar: - Result := Scheduler.ViewWeek; - smMonthlyCalendar: - Result := Scheduler.ViewWeeks; - else - Result := inherited GetCorrespondedView; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetGlyphIndex: Integer; -begin - Result := 15; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetPageCount: Integer; -var - I: Integer; -begin - Result := 1; - FPageRange := 30; - for I := 0 to 2 do - begin - case FSections[I] of - smDailyCalendar: - begin - Result := Max(Result, PrintRange.DayCount); - FPageRange := 1; - end; - smWeeklyCalendar: - begin - Result := Max(Result, PrintRange.WeekCount); - FPageRange := Min(FPageRange, 7); - end; - smMonthlyCalendar: - begin - Result := Max(Result, PrintRange.MonthCount); - FPageRange := Min(FPageRange, 30); - end; - end; - end; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); -var - AText: string; - ADate1, ADate2: TDateTime; -begin - with FCurrentSchedulingArea.VisibleDays do - begin - ADate1 := Items[0]; - ADate2 := Items[Count - 1]; - end; - case FCurrentSection of - smDailyCalendar: - AText := DateTimeHelper.DateToLongDateStr(ADate1); - smWeeklyCalendar: - AText := DateTimeHelper.DayToStr(ADate1, 0, False) + ' - ' + - DateTimeHelper.DayToStr(ADate2 - 1, 0, False); - smMonthlyCalendar: - if not cxGetDateFormat(ADate1, AText, DATE_YEARMONTH) then - AText := FormatDateTime('mmmm', ADate1) + ' ' + IntToStr(YearOf(ADate1)) - end; - ACell.PrimaryText := AText; - inherited InitHeaderCell(ACell); -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetSection( - Index: Integer): TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; -begin - Result := FSections[Index]; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetHasDailySection: Boolean; -begin - Result := smDailyCalendar in [FSections[0], FSections[1], FSections[2]] -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.SetSection( - Index: Integer; AValue: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); -begin - if AValue <> FSections[Index] then - begin - FSections[Index] := AValue; - Changed; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.IsSectionStored( - Index: Integer): Boolean; -const - Sections: array[0..2] of TcxSchedulerReportLinkTrifoldPrintStyleSectionMode = - (smDailyCalendar, smTaskPad, smWeeklyCalendar); -begin - Result := FSections[Index] <> Sections[Index]; -end; - -{ TcxSchedulerReportLinkWeeklyPrintStyle } - -constructor TcxSchedulerReportLinkWeeklyPrintStyle.Create( - AStyles: TcxSchedulerReportLinkPrintStyles); -begin - inherited Create(AStyles); - FShowResourceImages := True; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkWeeklyPrintStyle then - begin - Arrange := TcxSchedulerReportLinkWeeklyPrintStyle(Source).Arrange; - DaysLayout := TcxSchedulerReportLinkWeeklyPrintStyle(Source).DaysLayout; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionWeekly); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := AView is TcxSchedulerWeekView; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.RestoreDefaults; -begin - Arrange := wsaTopToBottom; - inherited RestoreDefaults; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.Build; -var - APrevLayout: TcxSchedulerWeekViewDaysLayout; -begin - APrevLayout := Scheduler.ViewWeek.DaysLayout; - Scheduler.ViewWeek.DaysLayout := DaysLayout; - try - inherited Build; - finally - Scheduler.ViewWeek.DaysLayout := APrevLayout; - end; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - if Layout = pslTwoPages then - CreateAdditionalControls(ASite, True, ShowTaskPad and - (ShowNotesAreaLined or ShowNotesAreaBlank), False, False, False, ABounds) - else - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -var - HasTaskPad: Boolean; -begin - HasTaskPad := ShowTaskPad and not (ShowNotesAreaBlank or ShowNotesAreaLined); - CreateAdditionalControls(ASite, True, HasTaskPad, ShowNotesAreaBlank, - ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -const - CellsProducers: array[Boolean] of TcxSchedulerReportCommonCellsProducerClass = - (TcxSchedulerReportDailyCellsProducer, TcxSchedulerReportWeeksCellsProducer); -begin - Result := CellsProducers[Arrange = wsaTopToBottom].CreateEx(Self, ASite); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - begin - if Arrange = wsaTopToBottom then - Result := Scheduler.ViewWeek - else - Result := Scheduler.ViewDay; - end - else - Result := inherited GetCorrespondedView; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetGlyphIndex: Integer; -begin - if (DaysLayout = wdlOneColumn) and (Layout = pslOnePage) then - Result := 27 - else - Result := 3 + Byte(Arrange) + Byte(HasAdditionalArea) * 4 + - Byte(Layout = pslTwoPages) * 2 -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetDateForPage( - APageIndex: Integer): TDateTime; -begin - Result := StartOfTheWeek(PrintRange.PrintFrom + (APageIndex div GetResourcePageCount div (Byte(Layout) + 1)) * 7); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetDaysPerPeriod: Integer; -begin - Result := 7; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetPageCount: Integer; -begin - Result := PrintRange.WeekCount * (Byte(Layout) + 1) * GetResourcePageCount; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetPreviewGlyphIndex: Integer; -begin - if (DaysLayout = wdlOneColumn) and (Layout = pslOnePage) then - Result := 22 - else - Result := inherited GetPreviewGlyphIndex; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetStartOfWeekOffset: Integer; -begin - Result := -DayOfWeek(PrintRange.PrintFrom) + 2; // -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -const - DayCount: array[TcxSchedulerReportLinkPeriodicPrintStyleLayout, Boolean] of Integer = - ((7, 7), (3, 4)); -var - I: Integer; - AStart, ADate: TDateTime; -begin - AStart := GetDateForPage(APageIndex); - if Arrange = wsaLeftToRight then - for I := 0 to DayCount[Layout, ASubIndex <> 0] - 1 do - begin - ADate := AStart + ASubIndex * 3 + I; - if not DontPrintWeekEnds or not (DayOfWeek(ADate) in [1, 7]) then - ADateList.Add(ADate); - end - else - begin - AStart := AStart + Byte(Scheduler.OptionsView.ActualStartOfWeek); - for I := 0 to 6 do - ADateList.Add(AStart + I); - end; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); - - function GetWeekDayText(ADate: TDateTime): string; - begin - Result := DateTimeHelper.DayToStr(ADate, 0, False); - end; - -var - AWeekDate: TDateTime; -begin - AWeekDate := GetDateForPage(ACell.PageIndex); - ACell.PrimaryText := GetWeekDayText(AWeekDate) + ' - ' + - GetWeekDayText(AWeekDate + 6); - inherited InitHeaderCell(ACell); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.CanDontPrintWeekends: Boolean; -begin - Result := SupportTimeRange; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.SupportMessage: Boolean; -begin - Result := Arrange = wsaLeftToRight; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.SupportTimeRange: Boolean; -begin - Result := Arrange = wsaLeftToRight; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.IsDaysLayoutStored: Boolean; -begin - Result := FDaysLayoutAssigned and (DaysLayout <> wdlTwoColumns); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetDaysLayout: TcxSchedulerWeekViewDaysLayout; -begin - if DaysLayoutAssigned or (Scheduler = nil) then - Result := FDaysLayout - else - Result := Scheduler.ViewWeek.DaysLayout; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.IsArrangeStored: Boolean; -begin - Result := Arrange <> wsaTopToBottom; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.SetArrange( - Value: TcxSchedulerReportLinkWeeklyPrintStyleArrange); -begin - if Arrange <> Value then - begin - FArrange := Value; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.SetDaysLayout( - Value: TcxSchedulerWeekViewDaysLayout); -begin - FDaysLayout := Value; - FDaysLayoutAssigned := True; - Changed; -end; - -{ TcxSchedulerReportLinkYearlyPrintStyle } - -procedure TcxSchedulerReportLinkYearlyPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkYearlyPrintStyle then - with TcxSchedulerReportLinkYearlyPrintStyle(Source) do - begin - Self.FMonthCountPerPage := FMonthCountPerPage; - Self.FPrimaryPageHeadersOnly := FPrimaryPageHeadersOnly; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionYearly); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := AView is TcxSchedulerYearView; -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.RestoreDefaults; -begin - FMonthCountPerPage := 12; - FPrimaryPageHeadersOnly := False; - inherited RestoreDefaults; -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.BuildSchedulerCells( - ASite: TcxSchedulerReportSchedulingAreaCell); -begin - ASite.CellSides := ASite.CellSides + [csRight]; - inherited BuildSchedulerCells(ASite); -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - if (Layout = pslTwoPages) and (APageIndex mod 2 = 0) then - CreateAdditionalControls(ASite, True, ShowTaskPad and - (ShowNotesAreaLined or ShowNotesAreaBlank), False, False, False, ABounds) - else - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); -var - HasTaskPad: Boolean; -begin - HasTaskPad := ShowTaskPad and not (ShowNotesAreaBlank or ShowNotesAreaLined); - CreateAdditionalControls(ASite, True, HasTaskPad, ShowNotesAreaBlank, - ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - Result := TcxSchedulerReportYearlyCellsProducer.CreateEx(Self, ASite); -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -begin - ADateList.Clear; - APageIndex := APageIndex div PeriodPageCount; - ADateList.Add(EncodeDate(YearOf(PrintRange.PrintFrom) + APageIndex, 1, 1)) -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - Result := Scheduler.ViewYear - else - Result := inherited GetCorrespondedView; -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetHasPageHeader( - APageIndex: Integer): Boolean; -const - Indexes: array[TcxSchedulerReportLinkPeriodicPrintStyleLayout] of Integer = (0, 1); -begin - APageIndex := APageIndex mod PeriodPageCount; - Result := not PrimaryPageHeadersOnly or (APageIndex <= Indexes[Layout]); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetGlyphIndex: Integer; -begin - Result := 23 + Byte(HasAdditionalArea); - if Layout = pslTwoPages then - Inc(Result, 2); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := 18 + Byte(HasAdditionalArea); - if Layout = pslTwoPages then - Inc(Result, 2); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetPageCount: Integer; -begin - Result := PrintRange.YearCount * GetResourcePageCount * - (12 div FMonthCountPerPage) * (Byte(Layout) + 1); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetShowDateNavigator( - APageIndex: Integer): Boolean; -begin - Result := False; -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); - - function GetYearText(AYear: Word): string; - var - ADate: TDateTime; - S, S1: string; - begin - ADate := EncodeDate(AYear, 1, 1); - if not cxGetDateFormat(ADate, S, DATE_YEARMONTH) then - S := FormatDateTime('dddddd', ADate); - ADate := EncodeDate(AYear, 12, 31); - if not cxGetDateFormat(ADate, S1, DATE_YEARMONTH) then - S1 := FormatDateTime('dddddd', ADate); - Result := S + ' - ' + S1; - end; - -var - AIndex: Integer; -begin - if ACell.PageSite.PageIndex mod PeriodPageCount <> 0 then Exit; - AIndex := ACell.PageSite.PageIndex div PeriodPageCount; - ACell.Content.BoundsRect := ACell.GetInnerBounds(0); - ACell.PrimaryText := GetYearText(YearOf(PrintRange.PrintFrom) + AIndex); - inherited InitHeaderCell(ACell); -end; - -function TcxSchedulerReportLinkYearlyPrintStyle.GetPeriodPageCount: Integer; -begin - Result := (Byte(Layout) + 1) * 12 div MonthCountPerPage; -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.SetMonthCountPerPage( - AValue: Integer); -begin - AValue := Max(1, Min(12, AValue)); - while 12 mod AValue <> 0 do - Inc(AValue); - if AValue <> FMonthCountPerPage then - begin - FMonthCountPerPage := AValue; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkYearlyPrintStyle.SetPrimaryPageHeadersOnly( - AValue: Boolean); -begin - if AValue <> FPrimaryPageHeadersOnly then - begin - FPrimaryPageHeadersOnly := AValue; - Changed; - end; -end; - -{ TdxfmSchedulerReportLinkDesignWindow } - -constructor TcxfmSchedulerReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhccxSchedulerReportLinkDesigner; - inherited; - wpPrintStyles := TList.Create; - CreateControls; - SetActivePage; -end; - -destructor TcxfmSchedulerReportLinkDesignWindow.Destroy; -begin - FreeAndNil(wpPrintStyles); - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(lbxStyles); - inherited; -end; - -function TcxfmSchedulerReportLinkDesignWindow.Execute: Boolean; -begin - Self.FActiveStyle := ReportLink.PrintStyles.FActiveStyle; - Self.FActiveStyleAssigned := ReportLink.PrintStyles.FActiveStyleAssigned; - if (ReportLink.PrintStyles.ActiveStyle = nil) or not FActiveStyleAssigned then - with ReportLink.PrintStyles do SetActiveStyleEx(GetCorrespondingStyle); - Result := inherited Execute; - if Result then - ReportLink.PrintStyles.ActiveStyle := ActivePrintStyle - else - begin - ReportLink.PrintStyles.FActiveStyleAssigned := FActiveStyleAssigned; - ReportLink.PrintStyles.FActiveStyle := FActiveStyle; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignDailyTabObjects; -var - ADailyStyle: TcxSchedulerReportLinkDailyPrintStyle; -begin - ADailyStyle := ReportLink.PrintStyles.Daily; - cbxPrintStyleDailyLayout.ItemIndex := Integer(ADailyStyle.Layout); - sePrintStyleDailyResourceCountPerPage.Properties.MaxValue := ADailyStyle.ResourceCount; - sePrintStyleDailyResourceCountPerPage.Value := ADailyStyle.ResourceCountPerPage; - chbxPrintStyleDailyTaskPad.Checked := ADailyStyle.ShowTaskPad; - chbxPrintStyleDailyNotesAreaBlank.Checked := ADailyStyle.ShowNotesAreaBlank; - chbxPrintStyleDailyNotesAreaLined.Checked := ADailyStyle.ShowNotesAreaLined; - tePrintStyleDailyPrintFrom.Time := ADailyStyle.TimePrintFrom; - tePrintStyleDailyPrintTo.Time := ADailyStyle.TimePrintTo; - SetShowImagesCheckBoxes(chbxPrintStyleDailyShowEventImages, - chbxPrintStyleDailyShowResourceImages, ADailyStyle); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignDetailsTabObjects; -var - ADetailsStyle: TcxSchedulerReportLinkDetailsPrintStyle; -begin - ADetailsStyle := ReportLink.PrintStyles.Details; - chbxPrintStyleDetailsUsePagination.Checked := ADetailsStyle.UsePagination; - cbxPrintStyleDetailsPagination.ItemIndex := Integer(ADetailsStyle.PaginationMode); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignMemoTabObjects; -var - AMemoStyle: TcxSchedulerReportLinkMemoPrintStyle; -begin - AMemoStyle := ReportLink.PrintStyles.Memo; - chbxPrintStyleMemoStartEachItemOnNewPage.Checked := AMemoStyle.StartEachItemOnNewPage; - chbxPrintStyleMemoPrintOnlySelectedEvents.Checked := AMemoStyle.SelectedEventsOnly; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignTimeLineTabObjects; -var - ATimeLineStyle: TcxSchedulerReportLinkTimeLinePrintStyle; -begin - ATimeLineStyle := ReportLink.PrintStyles.TimeLine; - - sePrintStyleTimeLineResourceCountPerPage.Properties.MaxValue := ATimeLineStyle.ResourceCount; - sePrintStyleTimeLineResourceCountPerPage.Value := ATimeLineStyle.ResourceCountPerPage; - - chbxPrintStyleTimeLineTaskPad.Checked := ATimeLineStyle.ShowTaskPad; - chbxPrintStyleTimeLineNotesAreaBlank.Checked := ATimeLineStyle.ShowNotesAreaBlank; - chbxPrintStyleTimeLineNotesAreaLined.Checked := ATimeLineStyle.ShowNotesAreaLined; - - tePrintStyleTimeLinePrintFrom.Time := ATimeLineStyle.TimePrintFrom; - tePrintStyleTimeLinePrintTo.Time := ATimeLineStyle.TimePrintTo; - - chbxPrintStyleTimeLinePrimaryPageScalesOnly.Checked := ATimeLineStyle.PrimaryPageScalesOnly; - chbxPrintStyleTimeLinePrimaryPageHeadersOnly.Checked := ATimeLineStyle.PrimaryPageHeadersOnly; - chbxPrintStyleTimeLineDontPrintWeekends.Checked := ATimeLineStyle.DontPrintWeekends; - chbxPrintStyleTimeLineWorkTimeOnly.Checked := ATimeLineStyle.WorkTimeOnly; - - SetShowImagesCheckBoxes(chbxPrintStyleTimeLineShowEventImages, - chbxPrintStyleTimeLineShowResourceImages, ATimeLineStyle); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignMonthlyTabObjects; -var - AMonthlyStyle: TcxSchedulerReportLinkMonthlyPrintStyle; -begin - AMonthlyStyle := ReportLink.PrintStyles.Monthly; - cbxPrintStyleMonthlyLayout.ItemIndex := Integer(AMonthlyStyle.Layout); - sePrintStyleMonthlyResourceCountPerPage.Properties.MaxValue := AMonthlyStyle.ResourceCount; - sePrintStyleMonthlyResourceCountPerPage.Value := AMonthlyStyle.ResourceCountPerPage; - chbxPrintStyleMonthlyTaskPad.Checked := AMonthlyStyle.ShowTaskPad; - chbxPrintStyleMonthlyNotesAreaBlank.Checked := AMonthlyStyle.ShowNotesAreaBlank; - chbxPrintStyleMonthlyNotesAreaLined.Checked := AMonthlyStyle.ShowNotesAreaLined; - chbxPrintStyleMonthlyDontPrintWeekends.Checked := AMonthlyStyle.DontPrintWeekends; - chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage.Checked := AMonthlyStyle.PrintExactlyOneMonthPerPage; - SetShowImagesCheckBoxes(chbxPrintStyleMonthlyShowEventImages, - chbxPrintStyleMonthlyShowResourceImages, AMonthlyStyle); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignTrifoldTabObjects; -var - ATrifoldStyle: TcxSchedulerReportLinkTrifoldPrintStyle; -begin - ATrifoldStyle := ReportLink.PrintStyles.Trifold; - cbxPrintStyleTrifoldSectionLeft.ItemIndex := Byte(ATrifoldStyle.LeftSection); - cbxPrintStyleTrifoldSectionMiddle.ItemIndex := Byte(ATrifoldStyle.MiddleSection); - cbxPrintStyleTrifoldSectionRight.ItemIndex := Byte(ATrifoldStyle.RightSection); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignWeeklyTabObjects; -var - AWeeklyStyle: TcxSchedulerReportLinkWeeklyPrintStyle; -begin - AWeeklyStyle := ReportLink.PrintStyles.Weekly; - cbxPrintStyleWeeklyArrange.ItemIndex := Integer(AWeeklyStyle.Arrange); - cbxPrintStyleWeeklyDaysLayout.ItemIndex := Integer(AWeeklyStyle.DaysLayout); - cbxPrintStyleWeeklyLayout.ItemIndex := Integer(AWeeklyStyle.Layout); - sePrintStyleWeeklyResourceCountPerPage.Properties.MaxValue := AWeeklyStyle.ResourceCount; - sePrintStyleWeeklyResourceCountPerPage.Value := AWeeklyStyle.ResourceCountPerPage; - chbxPrintStyleWeeklyTaskPad.Checked := AWeeklyStyle.ShowTaskPad; - chbxPrintStyleWeeklyNotesAreaBlank.Checked := AWeeklyStyle.ShowNotesAreaBlank; - chbxPrintStyleWeeklyNotesAreaLined.Checked := AWeeklyStyle.ShowNotesAreaLined; - chbxPrintStyleWeeklyDontPrintWeekends.Checked := AWeeklyStyle.DontPrintWeekends; - tePrintStyleWeeklyPrintFrom.Time := AWeeklyStyle.TimePrintFrom; - tePrintStyleWeeklyPrintTo.Time := AWeeklyStyle.TimePrintTo; - SetShowImagesCheckBoxes(chbxPrintStyleWeeklyShowEventImages, - chbxPrintStyleWeeklyShowResourceImages, AWeeklyStyle); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignYearlyTabObjects; -const - MontPerPageIndexes: array[0..11] of Integer = - (0, 1, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5); -var - AYearlyStyle: TcxSchedulerReportLinkYearlyPrintStyle; -begin - AYearlyStyle := ReportLink.PrintStyles.Yearly; - cbxPrintStyleYearlyLayout.ItemIndex := Integer(AYearlyStyle.Layout); - cbxPrintStyleYearlyMonthPerPage.ItemIndex := MontPerPageIndexes[AYearlyStyle.MonthCountPerPage - 1]; - sePrintStyleYearlyResourceCountPerPage.Properties.MaxValue := AYearlyStyle.ResourceCount; - sePrintStyleYearlyResourceCountPerPage.Value := AYearlyStyle.ResourceCountPerPage; - chbxPrintStyleYearlyTaskPad.Checked := AYearlyStyle.ShowTaskPad; - chbxPrintStyleYearlyNotesAreaBlank.Checked := AYearlyStyle.ShowNotesAreaBlank; - chbxPrintStyleYearlyNotesAreaLined.Checked := AYearlyStyle.ShowNotesAreaLined; - chbxPrimaryPageHeadersOnly.Checked := AYearlyStyle.PrimaryPageHeadersOnly; - SetShowImagesCheckBoxes(chbxPrintStyleYearlyShowEventImages, nil, AYearlyStyle); -end; - -function TcxfmSchedulerReportLinkDesignWindow.CanApply: Boolean; -begin - Result := inherited CanApply;// and not ReportLink.IsInconsistentState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoApply; -begin - if not IsValidConditions then Exit; - ReportLink.PrintStyles.ActiveStyle := ActivePrintStyle; - FActiveStyle := ReportLink.PrintStyles.FActiveStyle; - FActiveStyleAssigned := ReportLink.PrintStyles.FActiveStyleAssigned; - inherited DoApply; - ReportLink.RebuildReport; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoInitialize; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - HideOptionsButtons; - - inherited DoInitialize; - - with ReportLink.PrintRange do - begin - dePrintRangeStart.Date := PrintFrom; - dePrintRangeEnd.Date := PrintTo; - end; - - AssignTabSheetObjects; - RefreshPrintStyles; - ActivatePrintStyleTab; - - AssignDailyTabObjects; - AssignDetailsTabObjects; - AssignMemoTabObjects; - AssignMonthlyTabObjects; - AssignTimeLineTabObjects; - AssignTrifoldTabObjects; - AssignWeeklyTabObjects; - AssignYearlyTabObjects; - - // Formatting - with ReportLink.OptionsFormatting do - begin - cbxLookAndFeel.ItemIndex := Min(2, Integer(LookAndFeelKind)); - chbxSuppressBackgroundBitmaps.Checked := SuppressBackgroundBitmaps; - chbxSuppressContentColoration.Checked := SuppressContentColoration; - chbxUseNativeStyles.Checked := UseNativeStyles; - end; - - PageControl1Change(nil); -end; - -{$IFDEF DELPHI7} -function TcxfmSchedulerReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -function TcxfmSchedulerReportLinkDesignWindow.CheckPrintRange: Boolean; -begin - Result := dePrintRangeEnd.Date >= dePrintRangeStart.Date; - if not Result then - begin - MessageBox(0, - PChar(cxGetResourceString(@sdxBadDatePrintRange)), - PChar(cxGetResourceString(@sdxReportDesignerCaption)), - MB_ICONINFORMATION or MB_OK); - PageControl1.ActivePage := tshPrintRange; - ActiveControl := dePrintRangeEnd; - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.CheckPrintStyleSettings: Boolean; - - procedure ShowWarning; - begin - MessageBox(0, - PChar(cxGetResourceString(@sdxBadTimePrintRange)), - PChar(cxGetResourceString(@sdxReportDesignerCaption)), - MB_ICONINFORMATION or MB_OK); - end; - -begin - if pcPrintStyleOptions.ActivePage = tshDaily then - begin - Result := TimeOf(tePrintStyleDailyPrintFrom.Time) <= TimeOf(tePrintStyleDailyPrintTo.Time); - if not Result then - begin - ShowWarning; - PageControl1.ActivePage := tshPrintStyles; - pcPrintStyleOptions.ActivePage := tshDaily; - ActiveControl := tePrintStyleDailyPrintTo; - end; - end - else - if pcPrintStyleOptions.ActivePage = tshWeekly then - begin - Result := TimeOf(tePrintStyleWeeklyPrintFrom.Time) <= TimeOf(tePrintStyleWeeklyPrintTo.Time); - if not Result then - begin - ShowWarning; - PageControl1.ActivePage := tshPrintStyles; - pcPrintStyleOptions.ActivePage := tshWeekly; - ActiveControl := tePrintStyleWeeklyPrintTo; - end; - end - else - Result := True; -end; - -function TcxfmSchedulerReportLinkDesignWindow.IsValidConditions: Boolean; -begin - Result := CheckPrintRange and CheckPrintStyleSettings; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.HideOptionsButtons; -var - I: Integer; -begin - for I := 0 to pcPrintStyleOptions.PageCount - 1 do - pcPrintStyleOptions.Pages[I].TabVisible := False; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadCaption( - AControl: TControl; StrPtr: Pointer); -begin - TControlAccess(AControl).Caption := cxGetResourceString(StrPtr); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadCaption( - AItem: TMenuItem; StrPtr: Pointer); -begin - AItem.Caption := cxGetResourceString(StrPtr); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStrings; -begin - inherited LoadStrings; - LoadStringsDaily; - LoadStringsMonthly; - LoadStringsWeekly; - LoadStringsTrifold; - LoadStringsDetails; - LoadStringsMemo; - LoadStringsOther; - LoadStringsYearly; - LoadStringsTimeLineStyle; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsCombo( - ACombo: TcxComboBox; ACaptions: array of Pointer); -var - I: Integer; -begin - with ACombo.Properties.Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to High(ACaptions) do - if ACaptions[I] <> nil then Add(cxGetResourceString(ACaptions[I])); - finally - EndUpdate; - end; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsDaily; -begin - LoadCaption(lblPrintStyleDailyLayout, @sdxPrintStyleLayout); - LoadStringsCombo(cbxPrintStyleDailyLayout, - [@sdxPrintStyleDailyLayout1PPD, - @sdxPrintStyleDailyLayout2PPD]); - LoadCaption(lblPrintStyleDailyResourceCountPerPage, - @sdxResourceCountPerPage); - LoadCaption(lblPrintStyleDailyInclude, - @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleDailyTaskPad, - @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleDailyNotesAreaBlank, - @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleDailyNotesAreaLined, - @sdxPrintStyleIncludeNotesAreaLined); - LoadCaption(lblPrintStyleDailyPrintFrom, @sdxPrintStylePrintFrom); - LoadCaption(lblPrintStyleDailyPrintTo, @sdxPrintStylePrintTo); - LoadCaption(chbxPrintStyleDailyShowEventImages, @sdxPrintStyleShowEventImages); - LoadCaption(chbxPrintStyleDailyShowResourceImages, @sdxPrintStyleShowResourceImages); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsDetails; -begin - LoadCaption(chbxPrintStyleDetailsUsePagination, - @sdxPrintStyleDetailsStartNewPageEach); - LoadStringsCombo(cbxPrintStyleDetailsPagination, - [@sdxDay, @sdxWeek, @sdxMonth]); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsMemo; -begin - LoadCaption(chbxPrintStyleMemoStartEachItemOnNewPage, - @sdxPrintStyleMemoStartEachItemOnNewPage); - LoadCaption(chbxPrintStyleMemoPrintOnlySelectedEvents, - @sdxPrintStyleMemoPrintOnlySelectedEvents); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsMonthly; -begin - LoadCaption(lblPrintStyleMonthlyLayout, @sdxPrintStyleLayout); - LoadStringsCombo(cbxPrintStyleMonthlyLayout, - [@sdxPrintStyleMonthlyLayout1PPM, @sdxPrintStyleMonthlyLayout2PPM]); - LoadCaption(lblPrintStyleMonthlyResourceCountPerPage, @sdxResourceCountPerPage); - LoadCaption(lblPrintStyleMonthlyInclude, @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleMonthlyTaskPad, @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleMonthlyNotesAreaBlank, @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleMonthlyNotesAreaLined, @sdxPrintStyleIncludeNotesAreaLined); - - LoadCaption(chbxPrintStyleMonthlyDontPrintWeekends, @sdxPrintStyleDontPrintWeekEnds); - LoadCaption(chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage, @sdxPrintStyleMonthlyPrintExactly1MPP); - LoadCaption(chbxPrintStyleMonthlyShowEventImages, @sdxPrintStyleShowEventImages); - LoadCaption(chbxPrintStyleMonthlyShowResourceImages, @sdxPrintStyleShowResourceImages); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsOther; - - procedure AdjustBevelSize(ABevel: TBevel; AControl: TControl); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := AControl.Left + AControl.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - lblPreviewWindow.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - // Misc - LoadCaption(tshPrintRange, @sdxPrintRanges); - LoadCaption(lblPrintRangeStart, @sdxPrintRangeStart); - LoadCaption(lblPrintRangeEnd, @sdxPrintRangeEnd); - LoadCaption(lblPrintRangesMiscellaneous, @sdxMiscellaneous); - LoadCaption(chbxHideDetailsOfPrivateAppointments, - @sdxHideDetailsOfPrivateAppointments); - LoadCaption(tshPrintStyles, @sdxTabPrintStyles); - LoadCaption(lblPrintStylesOptions, @sdxOptions); - AdjustBevelSize(bvlPrintStyleOptions, lblPrintStylesOptions); - // Formatting - LoadCaption(tshFormatting, @sdxFormatting); - LoadCaption(lblLookAndFeel, @sdxLookAndFeel); - AdjustBevelSize(bvlLookAndFeel, lblLookAndFeel); - LoadStringsCombo(cbxLookAndFeel, [@sdxLookAndFeelFlat, - @sdxLookAndFeelStandard, @sdxLookAndFeelUltraFlat]); - LoadCaption(lblRefinements, @sdxRefinements); - AdjustBevelSize(bvlRefinements, lblRefinements); - LoadCaption(chbxSuppressBackgroundBitmaps, @sdxSuppressBackgroundBitmaps); - LoadCaption(chbxSuppressContentColoration, @sdxSuppressContentColoration); - // Styles - LoadCaption(tshStyles, @sdxStyles); - LoadCaption(lblUseNativeStyles, @sdxUseNativeStyles); - AdjustBevelSize(bvlStyles, lblUseNativeStyles); - LoadCaption(btnStyleColor, @sdxBtnColor); - LoadCaption(btnStyleFont, @sdxBtnFont); - LoadCaption(btnStyleBackgroundBitmap, @sdxBtnTexture); - LoadCaption(btnStyleBackgroundBitmapClear, @sdxBtnTextureClear); - LoadCaption(btnStyleRestoreDefaults, @sdxBtnRestoreDefaults); - LoadCaption(btnStylesSaveAs, @sdxBtnSaveAs); - LoadCaption(miStyleColor, @sdxBtnColor); - LoadCaption(miStyleFont, @sdxBtnFont); - LoadCaption(miStyleBackgroundBitmap, @sdxBtnTexture); - LoadCaption(miStyleBackgroundBitmapClear, @sdxBtnTextureClear); - LoadCaption(miStyleRestoreDefaults, @sdxBtnRestoreDefaults); - LoadCaption(miStylesSelectAll, @sdxSelectAll); - LoadCaption(miStylesSaveAs, @sdxBtnSaveAs); - LoadCaption(lblStyleSheets, @sdxStyleSheets); - AdjustBevelSize(bvlStyleSheets, lblStyleSheets); - LoadCaption(btnStyleSheetNew, @sdxBtnNew); - LoadCaption(btnStyleSheetCopy, @sdxBtnCopy); - LoadCaption(btnStyleSheetDelete, @sdxBtnDelete); - LoadCaption(btnStyleSheetRename, @sdxBtnRename); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsTimeLineStyle; -begin - LoadCaption(lblPrintStyleTimeLineResourceCountPerPage, @sdxResourceCountPerPage); - - LoadCaption(lblPrintStyleTimeLineInclude, @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleTimeLineTaskPad, @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleTimeLineNotesAreaBlank, @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleTimeLineNotesAreaLined, @sdxPrintStyleIncludeNotesAreaLined); - - LoadCaption(lblPrintStyleTimeLinePrintFrom, @sdxPrintStylePrintFrom); - LoadCaption(lblPrintStyleTimeLinePrintTo, @sdxPrintStylePrintTo); - - LoadCaption(chbxPrintStyleTimeLineDontPrintWeekends, @sdxPrintStyleDontPrintWeekEnds); - LoadCaption(chbxPrintStyleTimeLineWorkTimeOnly, @sdxPrintStyleWorkTimeOnly); - - LoadCaption(chbxPrintStyleTimeLineShowEventImages, @sdxPrintStyleShowEventImages); - LoadCaption(chbxPrintStyleTimeLineShowResourceImages, @sdxPrintStyleShowResourceImages); - - LoadCaption(chbxPrintStyleTimeLinePrimaryPageScalesOnly, @sdxPrintStylePrimaryPageScalesOnly); - LoadCaption(chbxPrintStyleTimeLinePrimaryPageHeadersOnly, @sdxPrintStylePrimaryPageHeadersOnly); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsTrifold; - - procedure FillTrifoldSectionStrings(ACombobox: TcxCombobox); - begin - LoadStringsCombo(ACombobox, - [@sdxPrintStyleTrifoldSectionModeDailyCalendar, - @sdxPrintStyleTrifoldSectionModeWeeklyCalendar, - @sdxPrintStyleTrifoldSectionModeMonthlyCalendar, - @sdxPrintStyleTrifoldSectionModeTaskPad, - @sdxPrintStyleTrifoldSectionModeNotesBlank, - @sdxPrintStyleTrifoldSectionModeNotesLined]); - end; - -begin - LoadCaption(lblPrintStyleTrifoldSectionLeft, @sdxPrintStyleTrifoldSectionLeft); - FillTrifoldSectionStrings(cbxPrintStyleTrifoldSectionLeft); - LoadCaption(lblPrintStyleTrifoldSectionMiddle, @sdxPrintStyleTrifoldSectionMiddle); - FillTrifoldSectionStrings(cbxPrintStyleTrifoldSectionMiddle); - LoadCaption(lblPrintStyleTrifoldSectionRight, @sdxPrintStyleTrifoldSectionRight); - FillTrifoldSectionStrings(cbxPrintStyleTrifoldSectionRight); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsWeekly; -begin - LoadCaption(lblPrintStyleWeeklyArrange, @sdxPrintStyleWeeklyArrange); - LoadCaption(lblPrintStyleWeeklyDaysLayout, @sdxPrintStyleWeeklyDaysLayout); - LoadStringsCombo(cbxPrintStyleWeeklyArrange, - [@sdxPrintStyleWeeklyArrangeT2B, @sdxPrintStyleWeeklyArrangeL2R]); - LoadStringsCombo(cbxPrintStyleWeeklyDaysLayout, - [@sdxPrintStyleWeeklyDaysLayoutTC, @sdxPrintStyleWeeklyDaysLayoutOC]); - - LoadCaption(lblPrintStyleWeeklyLayout, @sdxPrintStyleLayout); - LoadStringsCombo(cbxPrintStyleWeeklyLayout, - [@sdxPrintStyleWeeklyLayout1PPW, @sdxPrintStyleWeeklyLayout2PPW]); - LoadCaption(lblPrintStyleWeeklyResourceCountPerPage, @sdxResourceCountPerPage); - LoadCaption(lblPrintStyleWeeklyInclude, @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleWeeklyTaskPad, @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleWeeklyNotesAreaBlank, @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleWeeklyNotesAreaLined, @sdxPrintStyleIncludeNotesAreaLined); - - LoadCaption(lblPrintStyleWeeklyPrintFrom, @sdxPrintStylePrintFrom); - LoadCaption(lblPrintStyleWeeklyPrintTo, @sdxPrintStylePrintTo); - - LoadCaption(chbxPrintStyleWeeklyDontPrintWeekends, @sdxPrintStyleDontPrintWeekEnds); - LoadCaption(chbxPrintStyleWeeklyShowEventImages, @sdxPrintStyleShowEventImages); - LoadCaption(chbxPrintStyleWeeklyShowResourceImages, @sdxPrintStyleShowResourceImages); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsYearly; -begin - LoadCaption(lblPrintStyleYearlyLayout, @sdxPrintStyleLayout); - LoadCaption(lblPrintStyleYearlyMonthPerPage, @ sdxPrintStyleMonthPerPage); - LoadStringsCombo(cbxPrintStyleYearlyLayout, - [@sdxPrintStyleMonthlyLayout1PPM, @sdxPrintStyleMonthlyLayout2PPM]); - - LoadStringsCombo(cbxPrintStyleYearlyMonthPerPage, - [@sdxPrintStyleYearly1MPP, @sdxPrintStyleYearly2MPP, - @sdxPrintStyleYearly3MPP, @sdxPrintStyleYearly4MPP, - @sdxPrintStyleYearly6MPP, @sdxPrintStyleYearly12MPP]); - - LoadCaption(lblPrintStyleYearlyResourceCountPerPage, @sdxResourceCountPerPage); - - LoadCaption(lblPrintStyleYearlyInclude, @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleYearlyTaskPad, @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleYearlyNotesAreaBlank, @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleYearlyNotesAreaLined, @sdxPrintStyleIncludeNotesAreaLined); - LoadCaption(chbxPrimaryPageHeadersOnly, @sdxPrintStylePrimaryPageHeadersOnly); - LoadCaption(chbxPrintStyleYearlyShowEventImages, @sdxPrintStyleShowEventImages); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.PreviewDrawPageContent( - ACanvas: TCanvas; ABounds: TRect); -const - AMessageFlags = CXTO_CENTER_HORIZONTALLY or CXTO_CENTER_VERTICALLY or CXTO_WORDBREAK; -var - AMsg: PChar; - R, R1: TRect; - APrinter: TdxComponentPrinter; - ALink: TcxSchedulerReportLink; - ASource, ADest: TBitmap; -begin - if ReportLink.Component = nil then - begin - ACanvas.Brush.Color := clWindow; - ACanvas.FillRect(ABounds); - Exit; - end; - APrinter := TdxComponentPrinter.Create(nil); - try - ALink := TcxSchedulerReportLink.Create(APrinter); - ALink.LinkInPreviewMode := True; - try - ALink.Assign(ReportLink); - ALink.PrinterPage.RestoreDefaults; - ALink.Component := ReportLink.Component; - ALink.ComponentPrinter := APrinter; - AMsg := nil; - with ALink do - R1 := MakeBounds(0, 0, PageWidth, PageHeight); - ASource := cxCreateBitmap(cxSize(R1.Right, R1.Bottom)); - ASource.Canvas.Lock; - try - R := cxRectOffset(ABounds, -ABounds.Left, -ABounds.Top); - ALink.PrintStyles.ActiveStyle := ALink.PrintStyles[ - ReportLink.PrintStyles.IndexOf(ReportLink.PrintStyles.ActiveStyle)]; - ALink.RebuildReport; - FillRect(ASource.Canvas.Handle, R1, GetSysColorBrush(COLOR_WINDOW)); - if ALink.PageCount > 0 then - APrinter.PaintPage(ASource.Canvas, 0, R1, R1, ALink) - else - with ReportLink.PrintStyles do - begin - if (FActiveStyle = Memo) and Memo.SelectedEventsOnly then - AMsg := PChar(cxGetResourceString(@sdxCannotPrintNoSelectedItems)) - else - AMsg := PChar(cxGetResourceString(@sdxCannotPrintNoItemsAvailable)); - end; - ADest := cxCreateBitmap(cxSize(R.Right, R.Bottom)); - ADest.Canvas.Lock; - try - cxSmoothResizeBitmap(ASource, ADest); - if AMsg <> nil then - cxTextOut(ADest.Canvas.Handle, AMsg, R, AMessageFlags); - ACanvas.Draw(0, 0, ADest); - finally - ADest.Canvas.UnLock; - ADest.Free; - end; - finally - ASource.Canvas.Unlock; - ASource.Free; - end; - finally - ALink.Free; - end; - finally - APrinter.Free; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateControlsState; -begin - inherited UpdateControlsState; - - UpdateEnabledControls([lblPrintStyleDailyPrintFrom, tePrintStyleDailyPrintFrom, - lblPrintStyleDailyPrintTo, tePrintStyleDailyPrintTo], - ReportLink.PrintStyles.Daily.SupportTimeRange); - UpdateEnabledControls([lblPrintStyleWeeklyPrintFrom, tePrintStyleWeeklyPrintFrom, - lblPrintStyleWeeklyPrintTo, tePrintStyleWeeklyPrintTo], - ReportLink.PrintStyles.Weekly.SupportTimeRange); - - chbxPrintStyleWeeklyDontPrintWeekends.Enabled := - ReportLink.PrintStyles.Weekly.CanDontPrintWeekends; - - UpdateEnabled(lbxStyles, AreNativeStylesAvailable); - UpdateEnabled(btnStyleColor, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleFont, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleBackgroundBitmap, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleBackgroundBitmapClear, AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap); - UpdateEnabled(btnStyleRestoreDefaults, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStylesSaveAs, CanSaveStyles); - - UpdateEnabled(lblStyleSheets, AreNativeStylesAvailable); - UpdateEnabled(cbxStyleSheets, AreNativeStylesAvailable); - UpdateEnabled(btnStyleSheetNew, CanCreateStyleSheet); - UpdateEnabled(btnStyleSheetCopy, CanCopyStyleSheet); - UpdateEnabled(btnStyleSheetDelete, CanDeleteStyleSheet); - UpdateEnabled(btnStyleSheetRename, CanRenameStyleSheet); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateEnabled( - AControl: TControl; AEnabled: Boolean); -begin - TControlAccess(AControl).Enabled := AEnabled; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateEnabled( - AItem: TMenuItem; AEnabled: Boolean); -begin - AItem.Enabled := AEnabled; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateEnabledControls( - AControls: array of TControl; AEnabled: Boolean); -var - I: Integer; -begin - for I := 0 to High(AControls) do - UpdateEnabled(AControls[I], AEnabled); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdatePreview; -begin - if Visible then - begin - RefreshPrintStyles; - pbxPrintStylesPreview.Refresh; - pbPreview.Refresh; - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetDesignerTabIndex: Integer; -begin - Result := PageControl1.ActivePage.TabIndex; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetDesignerTabIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > PageControl1.PageCount - 1 then - Value := PageControl1.PageCount - 1; - PageControl1.ActivePage := PageControl1.Pages[Value]; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - inherited; - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - with cbxStyleSheets do - ItemIndex := Properties.Items.IndexOfObject(ActiveStyleSheet); - - if not LockControlsUpdate then - begin - Modified := True; - UpdatePreview; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin - inherited; - if not AnActive then lbxStyles.HideToolTips; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoRefreshStylesList; -var - Styles: TcxSchedulerReportLinkStyles; - List: TList; -begin - Styles := ReportLink.ActiveStyles; - with lbxStyles.Items do - begin - BeginUpdate; - try - List := TList.Create; - try - SaveSelectedStyles(List); - try - Clear; - AddObject(cxGetResourceString(@sdxSchedulerSchedulerHeader), Styles.SchedulerHeader); - AddObject(cxGetResourceString(@sdxSchedulerContent), Styles.Content); - AddObject(cxGetResourceString(@sdxSchedulerDateNavigatorContent), Styles.DateNavigatorContent); - AddObject(cxGetResourceString(@sdxSchedulerDateNavigatorHeader), Styles.DateNavigatorHeader); - AddObject(cxGetResourceString(@sdxSchedulerDayHeader), Styles.DayHeader); - AddObject(cxGetResourceString(@sdxSchedulerEvent), Styles.Event); - AddObject(cxGetResourceString(@sdxSchedulerResourceHeader), Styles.ResourceHeader); - AddObject(cxGetResourceString(@sdxSchedulerNotesAreaBlank), Styles.NotesAreaBlank); - AddObject(cxGetResourceString(@sdxSchedulerNotesAreaLined), Styles.NotesAreaLined); - AddObject(cxGetResourceString(@sdxSchedulerTaskPad), Styles.TaskPad); - AddObject(cxGetResourceString(@sdxSchedulerTimeRuler), Styles.TimeRuler); - finally - RestoreSelectedStyles(List); - end; - finally - List.Free; - end; - finally - EndUpdate; - end; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - inherited; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin - if ARecreate then - RecreateStylesListBox - else - lbxStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - with lbxStyles do - for I := 0 to Items.Count - 1 do - if Selected[I] then - AStrings.AddObject(Items[I], Items.Objects[I]); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := lbxStyles.Items; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := cbxStyleSheets.Properties.Items; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.ActivatePrintStyleTab; -begin - pcPrintStyleOptions.ActivePageIndex := FindTabIndexByPrintStyle(ActivePrintStyle); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignTabSheetObjects; -begin - with ReportLink.PrintStyles do - begin - tshDaily.Tag := MakeTTag(Daily); - tshWeekly.Tag := MakeTTag(Weekly); - tshMonthly.Tag := MakeTTag(Monthly); - tshTrifold.Tag := MakeTTag(Trifold); - tshDetails.Tag := MakeTTag(Details); - tshMemo.Tag := MakeTTag(Memo); - tshYearly.Tag := MakeTTag(Yearly); - tshTimeLine.Tag := MakeTTag(TimeLine); - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.FindTabIndexByPrintStyle(APrintStyle: TcxCustomSchedulerReportLinkPrintStyle): Integer; -begin - for Result := 0 to pcPrintStyleOptions.PageCount - 1 do - if pcPrintStyleOptions.Pages[Result].Tag = MakeTTag(APrintStyle) then Exit; - Result := -1; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.RefreshPrintStyles; -var - AItems: TcxImageComboBoxItems; - ActiveStyleIndex, I: Integer; - - procedure CheckAndAddPrintStyle(APrintStyle: TcxCustomSchedulerReportLinkPrintStyle); - begin - with TcxImageComboBoxItem(AItems.Add) do - begin - ImageIndex := APrintStyle.GlyphIndex; - Description := APrintStyle.Caption; - Value := Index; - Tag := Integer(APrintStyle); - end; - if (ActiveStyleIndex = -1) and (APrintStyle = ReportLink.PrintStyles.ActiveStyle) then - ActiveStyleIndex := AItems.Count - 1; - end; - -begin - ActiveStyleIndex := cbxPrintStyles.ItemIndex; - cbxPrintStyles.Properties.Images := StyleImages; - AItems := cbxPrintStyles.Properties.Items; - AItems.BeginUpdate; - try - AItems.Clear; - for I := 0 to ReportLink.PrintStyles.Count - 1 do - CheckAndAddPrintStyle(ReportLink.PrintStyles.Items[I]); - cbxPrintStyles.ItemIndex := ActiveStyleIndex; - finally - AItems.EndUpdate; - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetActivePrintStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - if cbxPrintStyles.ItemIndex <> -1 then - begin - with cbxPrintStyles.Properties.Items[cbxPrintStyles.ItemIndex] do - Result := TcxCustomSchedulerReportLinkPrintStyle(Tag) - end - else - Result := nil; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetActiveStyle: TcxStyle; -begin - with lbxStyles do - if ItemIndex <> -1 then - Result := TcxStyle(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetComponent: TcxScheduler; -begin - Result := inherited Component as TcxScheduler; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetHasSelectedStyles: Boolean; -begin - Result := lbxStyles.SelCount <> 0; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetHasSelectedStylesWithAssignedBitmap: Boolean; -var - Strings: TStrings; - I: Integer; - cxStyle: TcxStyle; -begin - Result := True; - Strings := TStringList.Create; - try - GetSelectedStyleNames(Strings); - for I := 0 to Strings.Count - 1 do - begin - cxStyle := TcxStyle(Strings.Objects[I]); - if (cxStyle <> nil) and (cxStyle.Bitmap <> nil) and not cxStyle.Bitmap.Empty then - Exit; - end; - finally - Strings.Free; - end; - Result := False; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; -end; - -function TcxfmSchedulerReportLinkDesignWindow.CanSelectAllStyles: Boolean; -var - I: Integer; -begin - Result := AreNativeStylesAvailable; - if Result then - begin - for I := 0 to lbxStyles.Items.Count - 1 do - if not lbxStyles.Selected[I] then Exit; - Result := False; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.CreateControls; - - procedure CreateStylesListBox; - begin - lbxStyles := TdxStylesListBox.Create(Self); - lbxStyles.Parent := tshStyles; - lbxStyles.BoundsRect := bvlStylesHost.BoundsRect; - lbxStyles.PopupMenu := pmStyles; - lbxStyles.TabOrder := chbxUseNativeStyles.TabOrder + 1; - lbxStyles.OnClick := lbxStylesClick; - bvlStylesHost.Visible := False; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(lbxStyles); - end; - -begin - CreateStylesListBox; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.RecreateStylesListBox; -var - List: TList; -begin - List := TList.Create; - try - SaveSelectedStyles(List); - dxPSUtl.dxRecreateWnd(lbxStyles); - RestoreSelectedStyles(List); - finally - List.Free; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.RestoreSelectedStyles(AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - lbxStyles.Selected[Integer(AList[I])] := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SaveSelectedStyles(AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to lbxStyles.Items.Count - 1 do - if lbxStyles.Selected[I] then AList.Add(TObject(I)); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetActivePage; -begin - PageControl1.ActivePage := PageControl1.Pages[DesignerTabIndex]; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetOptionsFormattingByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsFormatting do - case AnIndex of - 0: - begin - UseNativeStyles := AValue; - RecreateStylesListBox; - end; - 1: SuppressBackgroundBitmaps := AValue; - 2: SuppressContentColoration := AValue; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetPrintStyleOptionsViewByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if not LockControlsUpdate then - begin - case AnIndex of - 0: - ActivePrintStyle.ShowTaskPad := AValue; - 1: - ActivePrintStyle.ShowNotesAreaBlank := AValue; - 2: - ActivePrintStyle.ShowNotesAreaLined := AValue; - end; - Modified := True; - UpdatePreview; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetPrintStyleRangeByIndex(AnIndex: Integer; - const ATime: TDateTime); -begin - if not LockControlsUpdate then - begin - case AnIndex of - 0: - ActivePrintStyle.TimePrintFrom := ATime; - 1: - ActivePrintStyle.TimePrintTo := ATime; - end; - Modified := True; - UpdatePreview; - UpdateControlsState; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetPrintStyleResourceCountPerPageByIndex(AnIndex: Integer; - AValue: TcxEditValue); -begin - if LockControlsUpdate then Exit; - with ReportLink.PrintStyles do - case AnIndex of - 0: - Daily.ResourceCountPerPage := AValue; - 1: - Weekly.ResourceCountPerPage := AValue; - 2: - Monthly.ResourceCountPerPage := AValue; - 3: - Yearly.ResourceCountPerPage := AValue; - 4: - TimeLine.ResourceCountPerPage := AValue; - end; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetShowImagesCheckBoxes( - AEventImages, AResourceImages: TcxCheckBox; - APrintStyle: TcxCustomSchedulerReportLinkPrintStyle); -begin - if AEventImages <> nil then - begin - AEventImages.Enabled := ReportLink.HasEventImages; - AEventImages.Checked := AEventImages.Enabled and APrintStyle.ShowEventImages; - end; - if AResourceImages <> nil then - begin - AResourceImages.Enabled := ReportLink.HasResourceImages; - AResourceImages.Checked := AResourceImages.Enabled and APrintStyle.ShowResourceImages; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.FormCloseQuery(Sender: TObject; - var CanClose: Boolean); - - procedure ValidateEditors; - begin - FIsFormClosing := True; - try - dePrintRangeStart.ValidateEdit(False); - dePrintRangeEnd.ValidateEdit(False); - - tePrintStyleDailyPrintFrom.ValidateEdit(False); - tePrintStyleDailyPrintTo.ValidateEdit(False); - tePrintStyleWeeklyPrintFrom.ValidateEdit(False); - tePrintStyleWeeklyPrintTo.ValidateEdit(False); - finally - FisFormClosing := False; - end; - end; - -begin - if ModalResult = mrOK then - begin - ValidateEditors; - CanClose := IsValidConditions; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - pnlPrintStylesPreview.Visible := PageControl1.ActivePage = tshPrintStyles; - pnlPreview.Visible := PageControl1.ActivePage <> tshPrintStyles; - lblPreviewWindow.Parent := PageControl1.ActivePage; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.lbxStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleFontClick(Sender: TObject); -begin - PerformStylesChangeFont; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleColorClick(Sender: TObject); -begin - PerformStylesChangeColor; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleBackgroundBitmapClick(Sender: TObject); -begin - PerformStylesChangeBitmap; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleBackgroundBitmapClearClick(Sender: TObject); -begin - PerformStylesClearBitmap; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.miStylesSelectAllClick(Sender: TObject); -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - with lbxStyles do - begin - {$IFDEF DELPHI6} - SelectAll; - {$ELSE} - Items.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - Selected[I] := True; - finally - Items.EndUpdate; - end; - {$ENDIF} - end; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleRestoreDefaultsClick(Sender: TObject); -begin - PerformStylesRestoreDefaults; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStylesSaveAsClick(Sender: TObject); -begin - PerformStylesSaveAsStyleSheet; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxStyleSheetsClick(Sender: TObject); -begin - with TcxComboBox(Sender) do - ActiveStyleSheet := TcxCustomStyleSheet(Properties.Items.Objects[ItemIndex]); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxStyleSheetsPropertiesDrawItem( - AControl: TcxCustomComboBox; ACanvas: TcxCanvas; AIndex: Integer; - const ARect: TRect; AState: TOwnerDrawState); -begin - PerformStyleSheetDrawItem(ACanvas.Canvas, AIndex, ARect, AState, AControl.Enabled); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxStyleSheetsKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - PerformStyleSheetKeyDown(Sender, Key, Shift); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetNewClick(Sender: TObject); -begin - PerformStyleSheetNew; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetCopyClick(Sender: TObject); -begin - PerformStyleSheetCopy; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetDeleteClick(Sender: TObject); -begin - PerformStyleSheetDelete; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetRenameClick(Sender: TObject); -begin - PerformStyleSheetRename; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.lblUseNativeStylesClick(Sender: TObject); -begin - if chbxUseNativeStyles.CanFocus then ActiveControl := chbxUseNativeStyles; - chbxUseNativeStyles.Checked := not chbxUseNativeStyles.Checked; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.OptionsFormattingClick(Sender: TObject); -begin - with TcxCheckBox(Sender) do - SetOptionsFormattingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LookAndFeelChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TcxComboBox(Sender) do - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(Properties.Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.pmStylesPopup(Sender: TObject); -begin - lbxStyles.HideToolTips; - UpdateEnabled(miStyleColor, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleFont, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleBackgroundBitmap, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleBackgroundBitmapClear, AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap); - UpdateEnabled(miStyleRestoreDefaults, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStylesSelectAll, CanSelectAllStyles); - UpdateEnabled(miStylesSaveAs, CanSaveStyles); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleYearlyLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Yearly.Layout := - TcxSchedulerReportLinkPeriodicPrintStyleLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleYearlyMonthPagesPerYearClick( - Sender: TObject); -const - MonthsPerPage: array[0..5] of Integer = (1, 2, 3, 4, 6, 12); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Yearly.MonthCountPerPage := - MonthsPerPage[TcxComboBox(Sender).ItemIndex]; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.dePrintRangeStartEditValueChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintRange.PrintFrom := TcxDateEdit(Sender).Date; - Modified := True; - UpdatePreview; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.dePrintRangeEndEditValueChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintRange.PrintTo := TcxDateEdit(Sender).Date; - Modified := True; - UpdatePreview; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with ReportLink.PrintStyles do - FActiveStyle := Items[TcxComboBox(Sender).ItemIndex]; - ActivatePrintStyleTab; - Modified := True; - UpdatePreview; - UpdateControlsState; -end; - -// Daily -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleDailyLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Daily.Layout := - TcxSchedulerReportLinkPeriodicPrintStyleLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.sePrintStyleResourceCountPerPagePropertiesChanged( - Sender: TObject); -begin - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.sePrintStyleResourceCountPerPagePropertiesEditValueChanged( - Sender: TObject); -begin - with TcxSpinEdit(Sender) do - SetPrintStyleResourceCountPerPageByIndex(TTagToInt(Tag), Value); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleOptionsViewClick( - Sender: TObject); -begin - with TcxCheckBox(Sender) do - SetPrintStyleOptionsViewByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.tePrintStylePrintRangePropertiesEditValueChanged( - Sender: TObject); -begin - with TcxTimeEdit(Sender) do - SetPrintStyleRangeByIndex(TTagToInt(Tag), Time); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.tePrintStylePrintRangePropertiesChange( - Sender: TObject); -begin - Modified := True; -end; - -// Weekly -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleWeeklyArrangeClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Weekly.Arrange := - TcxSchedulerReportLinkWeeklyPrintStyleArrange(TcxComboBox(Sender).ItemIndex); - cbxPrintStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleWeeklyLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Weekly.Layout := - TcxSchedulerReportLinkPeriodicPrintStyleLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleWeeklyDaysLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Weekly.DaysLayout := - TcxSchedulerWeekViewDaysLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleWeeklyDontPrintWeekendsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Weekly.DontPrintWeekends := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -// Monthly -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleMonthlyLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Monthly.Layout := - TcxSchedulerReportLinkPeriodicPrintStyleLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleDontPrintWeekEndsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - if ActivePrintStyle is TcxSchedulerReportLinkMonthlyPrintStyle then - ReportLink.PrintStyles.Monthly.DontPrintWeekends := TcxCheckBox(Sender).Checked - else - if ActivePrintStyle is TcxSchedulerReportLinkTimeLinePrintStyle then - ReportLink.PrintStyles.TimeLine.DontPrintWeekends := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Monthly.PrintExactlyOneMonthPerPage := - TcxCheckBox(Sender).Checked; - Modified := True; -end; - -// Tri-fold -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleTrifoldSectionModeClick( - Sender: TObject); -begin - if LockControlsUpdate or not (ActivePrintStyle is TcxSchedulerReportLinkTrifoldPrintStyle) then Exit; - with TcxSchedulerReportLinkTrifoldPrintStyle(ActivePrintStyle) do - FSections[TTagToInt(TcxComboBox(Sender).Tag)] := TcxSchedulerReportLinkTrifoldPrintStyleSectionMode(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdateControlsState; -end; - -// Details -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleDetailsUsePaginationClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Details.UsePagination := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleDetailsPaginationClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Details.PaginationMode := - TcxSchedulerReportLinkDetailsPrintStylePaginationMode(TcxComboBox(Sender).ItemIndex); - Modified := True; -end; - -// Memo -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleMemoStartEachItemOnNewPageClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Memo.StartEachItemOnNewPage := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleMemoPrintOnlySelectedEventsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Memo.SelectedEventsOnly := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.pbxPrintStylesPreviewPaint(Sender: TObject); -begin - with TPaintBox(Sender) do - if ActivePrintStyle <> nil then - ActivePrintStyle.DrawDesignWindowPreview(Canvas, ClientRect); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.StyleController1StyleChanged( - Sender: TObject); -begin -// -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.pbPreviewPaint( - Sender: TObject); -begin - PreviewDrawPageContent(pbPreview.Canvas, pbPreview.ClientRect); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxLookAndFeelPropertiesChange( - Sender: TObject); -begin - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(cbxLookAndFeel.ItemIndex); -end; - -{ TcxSchedulerReportPageSite } - -procedure TcxSchedulerReportPageSite.ReadProperties(AReader: TdxPSDataReader); -begin - inherited ReadProperties(AReader); - FPageIndex := AReader.ReadInteger; - FPrimaryPage := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportPageSite.WriteProperties(AWriter: TdxPSDataWriter); -begin - inherited WriteProperties(AWriter); - AWriter.WriteInteger(FPageIndex); - AWriter.WriteBoolean(FPrimaryPage); -end; - -{ TcxSchedulerReportPageItemCell } - -constructor TcxSchedulerReportPageItemCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - BorderClass := TdxPSCellUltraFlatBorder; - ClipChildren := True; -end; - -function TcxSchedulerReportPageItemCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srUnknownItem; -end; - -procedure TcxSchedulerReportPageItemCell.SetCellViewParams( - AItem: TdxReportVisualItem; const AParams: TcxViewParams); -begin - ReportLink.SetCellViewParams(AItem, AParams); -end; - -procedure TcxSchedulerReportPageItemCell.SetCellViewParams( - AItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); -begin - ReportLink.SetCellViewParams(AItem, AParams); -end; - -function TcxSchedulerReportPageItemCell.GetPageIndex: Integer; -begin - Result := PageSite.PageIndex; -end; - -function TcxSchedulerReportPageItemCell.GetPageSite: TcxSchedulerReportPageSite; -var - AParent: TdxReportCell; -begin - AParent := inherited Parent; - while (AParent <> nil) and not (AParent is TcxSchedulerReportPageSite) do - AParent := AParent.Parent; - Result := AParent as TcxSchedulerReportPageSite; -end; - -function TcxSchedulerReportPageItemCell.GetPrimaryPage: Boolean; -begin - Result := PageSite.PrimaryPage; -end; - -function TcxSchedulerReportPageItemCell.GetReportLink: TcxSchedulerReportLink; -begin - Result := TcxSchedulerReportLink(Renderer.ReportLink); -end; - -{ TcxSchedulerReportNotesDataCell } - -constructor TcxSchedulerReportNotesDataCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - TextAlignX := taCenterX; - TextAlignY := taCenterY; - CaptionHeight := 16; - Data := cdidSchedulerNotesArea; -end; - -procedure TcxSchedulerReportNotesDataCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - R: TRect; - C, I: Integer; -begin - inherited DrawContent(DC, AStage); - if CaptionHeight <= 0 then Exit; - R := GetInnerBounds(DC); - FixupRect(DC, R); - C := R.Bottom - R. Top; - R.Bottom := R.Top + CaptionHeight; - // - if Caption <> '' then - begin - Renderer.DrawText(DC, R, -1, cxTextOffset, cxTextOffset, Caption, Font, - Color, TextAlignX, TextAlignY, False, MultiLine, False); - end; - // - Inc(R.Bottom, Max(1, Renderer.LineThickness div 2)); - if Lined then - C := (C - Renderer.LineThickness) div CaptionHeight - else - C := 1; - R.Top := R.Bottom - Renderer.LineThickness; - for I := 0 to C - 1 do - begin - FixupRect(DC, R); - Renderer.FillRect(DC, R, clBlack); - OffsetRect(R, 0, CaptionHeight); - end; -end; - -procedure TcxSchedulerReportNotesDataCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FCaption := AReader.ReadString; - FCaptionHeight := AReader.ReadInteger; - FLined := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportNotesDataCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FCaption); - AWriter.WriteInteger(FCaptionHeight); - AWriter.WriteBoolean(FLined); -end; - -function TcxSchedulerReportNotesDataCell.GetMultiLine: Boolean; -begin - Result := inherited MultiLine; -end; - -function TcxSchedulerReportNotesDataCell.GetTextAlignX: TcxTextAlignX; -begin - Result := inherited TextAlignX; -end; - -function TcxSchedulerReportNotesDataCell.GetTextAlignY: TcxTextAlignY; -begin - Result := inherited TextAlignY; -end; - -procedure TcxSchedulerReportNotesDataCell.SetMultiLine(Value: Boolean); -begin - inherited MultiLine := Value; -end; - -procedure TcxSchedulerReportNotesDataCell.SetTextAlignX( - Value: TcxTextAlignX); -begin - inherited TextAlignX := Value; -end; - -procedure TcxSchedulerReportNotesDataCell.SetTextAlignY( - Value: TcxTextAlignY); -begin - inherited TextAlignY := Value; -end; - -{ TcxSchedulerReportNotesAreaCell } - -constructor TcxSchedulerReportNotesAreaCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - AddDataItem(GetDataCellClass) -end; - -constructor TcxSchedulerReportNotesAreaCell.CreateEx(AParent: TdxReportCell; ALined: Boolean); -begin - Create(AParent); - FLined := ALined; - DataCell.CellSides := []; - DataCell.Caption := cxGetResourceString(@sdxNotes); - DataCell.Lined := ALined; - ClipChildren := True; -end; - -procedure TcxSchedulerReportNotesAreaCell.BoundsChanged; -begin - inherited BoundsChanged; - DataCell.BoundsRect := GetInnerBounds(0); -end; - -procedure TcxSchedulerReportNotesAreaCell.ConvertCoords( - APixelsNumerator, APixelsDenominator: Integer); -begin - inherited ConvertCoords(APixelsNumerator, APixelsDenominator); - DataCell.CaptionHeight := MulDiv(DataCell.CaptionHeight, APixelsNumerator, APixelsDenominator); -end; - -function TcxSchedulerReportNotesAreaCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srNotesBlank; - if DataCell.Lined then - Result := srNotesLined; -end; - -function TcxSchedulerReportNotesAreaCell.GetDataCellClass: TcxSchedulerReportNotesDataCellClass; -begin - Result := TcxSchedulerReportNotesDataCell; -end; - -procedure TcxSchedulerReportNotesAreaCell.SetFontIndex(Value: Integer); -begin - inherited SetFontIndex(Value); - if Font <> nil then - DataCell.CaptionHeight := cxTextHeight(Font) + cxTextOffset * 2; -end; - -function TcxSchedulerReportNotesAreaCell.GetDataCell: TcxSchedulerReportNotesDataCell; -begin - if (DataItemCount > 0) and (DataItems[0] is TcxSchedulerReportNotesDataCell) then - Result := TcxSchedulerReportNotesDataCell(DataItems[0]) - else - Result := nil; -end; - -{ TcxSchedulerReportTaskPadCell } - -constructor TcxSchedulerReportTaskPadCell.CreateEx( - AParent: TdxReportCell; ALined: Boolean); -begin - inherited CreateEx(AParent, ALined); - DataCell.Caption := cxGetResourceString(@sdxTaskPad); - DataCell.Data := cdidSchedulerTaskPad; -end; - -procedure TcxSchedulerReportTaskPadCell.BoundsChanged; -begin - inherited; - TaskPadDataSite.BoundsRect := CalculateTaskPadDataSiteBounds; -end; - -function TcxSchedulerReportTaskPadCell.CalculateTaskPadDataSiteBounds: TRect; -begin - Result := GetInnerBounds(NullDC); - Inc(Result.Top, DataCell.CaptionHeight); -end; - -function TcxSchedulerReportTaskPadCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srTaskPad; -end; - -function TcxSchedulerReportTaskPadCell.GetTaskPadDataSite: TdxReportCell; -begin - if CellCount = 0 then AddCell; - Result := Cells[0]; - Result.CellSides := []; - Result.BoundsRect := CalculateTaskPadDataSiteBounds; -end; - -{ TcxSchedulerReportSchedulerHeaderDataCell } - -constructor TcxSchedulerReportSchedulerHeaderDataCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - CellSides := []; - Transparent := True; - Data := cdidSchedulerSchedulerHeader; -end; - -{ TcxSchedulerReportSchedulerHeaderCell } - -constructor TcxSchedulerReportSchedulerHeaderCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - FContent := AddContentCell; -end; - -procedure TcxSchedulerReportSchedulerHeaderCell.AdjustTextSize; -var - R1, R2: TRect; -begin - R1 := Content.BoundsRect; - R2 := R1; - if (SecondaryText <> '') and (PrimaryText <> '') then - begin - with R1 do - Bottom := Bottom - (Bottom - Top) div 4; - R2.Top := R1.Bottom; - end; - FPrimaryTextCell := AddTextCell(PrimaryText, R1, True); - FSecondaryTextCell := AddTextCell(SecondaryText, R2, False); - FContent.Index := MaxInt; //send to back -end; - -function TcxSchedulerReportSchedulerHeaderCell.AddContentCell: TcxSchedulerReportSchedulerHeaderDataCell; -begin - Result := TcxSchedulerReportSchedulerHeaderDataCell(AddDataItem(TcxSchedulerReportSchedulerHeaderDataCell)); -end; - -function TcxSchedulerReportSchedulerHeaderCell.AddTextCell(AText: string; - const ABounds: TRect; AMultiLine: Boolean): TdxReportCellString; -var - AFontH, ABoundsH: Integer; - AParams: TdxReportItemViewParams; -begin - if PrimaryText = '' then - begin - Result := nil; - Exit; - end; - Result := AddDataItem(TdxReportCellString) as TdxReportCellString; - Result.BoundsRect := ABounds; - Result.Text := AText; - Result.CellSides := []; - Result.Transparent := True; - Result.TextAlignY := taTop; - Result.TextAlignX := taLeft; - Result.Multiline := AMultiLine; - if AMultiLine and (Pos('#13', AText) <> 0) then - AText := Copy(AText, 1, Pos('#13', AText)); - AFontH := cxTextHeight(Font); - ABoundsH := (ABounds.Bottom - ABounds.Top) - cxTextOffset * 2; - if AMultiLine then - ABoundsH := ABoundsH div 2; - FillChar(AParams, SizeOf(AParams), 0); - AParams.FontStyle := []; - AParams.FontSize := MulDiv(Font.Size, ABoundsH, AFontH); - while (AParams.FontSize > 3) and (cxTextWidth(Font, AText, AParams.FontSize) > - ((ABounds.Right - ABounds.Left) - cxTextOffset * 2)) do Dec(AParams.FontSize, 2); - AParams.Transparent := True; - AParams.NativeParams.Font := Font; - AParams.NativeParams.TextColor := Font.Color; - ReportLink.SetCellViewParams(Result, AParams); -end; - -function TcxSchedulerReportSchedulerHeaderCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srHeader; -end; - -{ TcxSchedulerReportDateNavigatorItem } - -constructor TcxSchedulerReportDateNavigatorItem.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - CellSides := []; -end; - -function TcxSchedulerReportDateNavigatorItem.GetDefaultDTFormat: DWORD; -begin - Result := CXTO_PATTERNEDTEXT or CXTO_SINGLELINE; -end; - -procedure TcxSchedulerReportDateNavigatorItem.SetText(const Value: string); -begin -end; - -function TcxSchedulerReportDateNavigatorItem.GetDateNavigator: TcxSchedulerReportDateNavigatorCell; -begin - Result := Parent as TcxSchedulerReportDateNavigatorCell; -end; - -{ TcxSchedulerReportDateNavigatorHeader } - -constructor TcxSchedulerReportDateNavigatorHeader.CreateEx(AParent: TdxReportCell; AYear, AMonth: Word); -begin - Create(AParent); - Transparent := False; - TextAlignX := taCenterX; - Data := cdidSchedulerDateNavigatorHeader; - FMonth := AMonth; - FYear := AYear; -end; - -procedure TcxSchedulerReportDateNavigatorHeader.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportDateNavigatorHeader then - with TcxSchedulerReportDateNavigatorHeader(Source) do - begin - Self.FMonth := Month; - Self.FYear := Year; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportDateNavigatorHeader.GetText: string; -begin - Result := LongMonthNames[Month] + ' ' + IntToStr(Year); -end; - -procedure TcxSchedulerReportDateNavigatorHeader.ReadData( - AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FMonth := AReader.ReadInteger; - FYear := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportDateNavigatorHeader.WriteData( - AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteInteger(FMonth); - AWriter.WriteInteger(FYear); -end; - -{ TcxSchedulerReportDateNavigatorDay } - -constructor TcxSchedulerReportDateNavigatorDay.CreateEx(AParent: TdxReportCell; - ADay, ACol, ARow: Integer; ABold: Boolean); -begin - Create(AParent); - RightIndent := 2; - TextAlignX := taRight; - TextAlignY := taCenterY; - Data := cdidSchedulerDateNavigatorDay; - FDay := ADay; - FCol := ACol; - FRow := ARow; - Bold := ABold; -end; - -procedure TcxSchedulerReportDateNavigatorDay.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportDateNavigatorDay then - with TcxSchedulerReportDateNavigatorDay(Source) do - begin - Self.FDay := Day; - Self.FCol := Col; - Self.FRow := Row; - end; -end; - -function TcxSchedulerReportDateNavigatorDay.GetText: string; -begin - Result := IntToStr(Day); -end; - -procedure TcxSchedulerReportDateNavigatorDay.ReadData(AReader: TdxPSDataReader); -var - Value: Integer; -begin - inherited ReadData(AReader); - Value := AReader.ReadInteger; - FDay := TLongRec(Value).Bytes[0]; - FCol := TLongRec(Value).Bytes[1]; - FRow := TLongRec(Value).Bytes[2]; -end; - -procedure TcxSchedulerReportDateNavigatorDay.WriteData(AWriter: TdxPSDataWriter); -var - Value: Integer; -begin - inherited WriteData(AWriter); - TLongRec(Value).Bytes[0] := Day; - TLongRec(Value).Bytes[1] := Col; - TLongRec(Value).Bytes[2] := Row; - AWriter.WriteInteger(Value); -end; - -function TcxSchedulerReportDateNavigatorDay.GetDate: TDate; -begin - Result := EncodeDate(Year, Month, Day); -end; - -function TcxSchedulerReportDateNavigatorDay.GetBold: Boolean; -begin - Result := GetFormatBit(dxFormatDayIsBold); -end; - -function TcxSchedulerReportDateNavigatorDay.GetMonth: Word; -begin - if DateNavigator <> nil then - Result := DateNavigator.Month - else - Result := 1; -end; - -function TcxSchedulerReportDateNavigatorDay.GetYear: Word; -begin - if DateNavigator <> nil then - Result := DateNavigator.Year - else - Result := 1; -end; - -procedure TcxSchedulerReportDateNavigatorDay.SetBold(Value: Boolean); -begin - SetFormatBit(dxFormatDayIsBold, Value); -end; - -{ TcxSchedulerReportDateNavigatorDayCaption } - -constructor TcxSchedulerReportDateNavigatorDayCaption.CreateEx(AParent: TdxReportCell; - ADayOfWeek: TDay; ACol: Integer); -begin - inherited Create(AParent); - RightIndent := 2; - TextAlignX := taRight; - TextAlignY := taCenterY; - Data := cdidSchedulerDateNavigatorDayCaption; - FCol := ACol; - FDayOfWeek := ADayOfWeek; - FDayText := GetDayText; -end; - -procedure TcxSchedulerReportDateNavigatorDayCaption.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportDateNavigatorDayCaption then - with TcxSchedulerReportDateNavigatorDayCaption(Source) do - begin - Self.FDayOfWeek := DayOfWeek; - Self.FCol := Col; - Self.FDayText := FDayText; - end; -end; - -function TcxSchedulerReportDateNavigatorDayCaption.GetText: string; -begin - Result := FDayText; -end; - -function TcxSchedulerReportDateNavigatorDayCaption.GetDayText: string; -var - FDayIndex: Integer; -begin - FDayIndex := Byte(DateNavigator.StartOfWeek) + 1 + Col; - if FDayIndex > 7 then Dec(FDayIndex, 7); - - if Font.Charset in [ARABIC_CHARSET, CHINESEBIG5_CHARSET, GB2312_CHARSET] then - Result := AnsiLastChar(ShortDayNames[FDayIndex]) - else - Result := WideString(ShortDayNames[FDayIndex])[1]; -end; - -procedure TcxSchedulerReportDateNavigatorDayCaption.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FDayText := AReader.ReadString; -end; - -procedure TcxSchedulerReportDateNavigatorDayCaption.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FDayText); -end; - -{ TcxSchedulerReportDateNavigatorWeekNumber } - -constructor TcxSchedulerReportDateNavigatorWeekNumber.CreateEx(AParent: TdxReportCell; - AWeekNumber, ARow: Integer); -begin - Create(AParent); - RightIndent := 4; - TextAlignX := taRight; - TextAlignY := taCenterY; - Data := cdidSchedulerDateNavigatorWeekNumber; - FRow := ARow; - FWeekNumber := AWeekNumber; -end; - -procedure TcxSchedulerReportDateNavigatorWeekNumber.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxSchedulerReportDateNavigatorWeekNumber then - with TcxSchedulerReportDateNavigatorWeekNumber(Source) do - begin - Self.FWeekNumber := WeekNumber; - Self.FRow := Row; - end; -end; - -function TcxSchedulerReportDateNavigatorWeekNumber.GetText: string; -begin - Result := IntToStr(WeekNumber); -end; - -procedure TcxSchedulerReportDateNavigatorWeekNumber.ReadData(AReader: TdxPSDataReader); -var - Value: Integer; -begin - inherited ReadData(AReader); - Value := AReader.ReadInteger; - FWeekNumber := TLongRec(Value).Bytes[0]; - FRow := TLongRec(Value).Bytes[1]; -end; - -procedure TcxSchedulerReportDateNavigatorWeekNumber.WriteData(AWriter: TdxPSDataWriter); -var - Value: Integer; -begin - inherited WriteData(AWriter); - TLongRec(Value).Bytes[0] := WeekNumber; - TLongRec(Value).Bytes[1] := Row; - AWriter.WriteInteger(Value); -end; - -{ TcxSchedulerReportDateNavigatorCell } - -constructor TcxSchedulerReportDateNavigatorCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - CellSides := []; - Transparent := False; - FStartOfWeek := TDay(DateTimeHelper.StartOfWeek); -end; - -constructor TcxSchedulerReportDateNavigatorCell.CreateEx(AParent: TdxReportCell; - AFirstWeekOfYear: TcxFirstWeekOfYear; AYear, AMonth: Word; - AShowDatesContainingEventsInBold, AShowWeekNumbers: Boolean); -begin - Create(AParent); - FYear := AYear; - FMonth := AMonth; - FVertOffset := -1; - FFirstWeekOfYear := AFirstWeekOfYear; - FShowWeekNumbers := AShowWeekNumbers; - FShowDatesContainingEventsInBold := AShowDatesContainingEventsInBold; -end; - -procedure TcxSchedulerReportDateNavigatorCell.AdjustSize(var AContentParams, - AHeaderParams: TdxReportItemViewParams; AHeight, AMaxHeight: Integer); - - function TestSize: Boolean; - var - ATestHeight: Integer; - begin - ATestHeight := GetMonthSize(AContentParams, AHeaderParams).cy; - if AMaxHeight > (ATestHeight + RowHeight) then - begin - FVertOffset := (AMaxHeight - ATestHeight) div 2; - Result := True; - end - else - Result := False; - end; - -begin - if TestSize then Exit; - AContentParams.FontSize := Abs(AContentParams.NativeParams.Font.Size); - AHeaderParams.FontSize := Abs(AHeaderParams.NativeParams.Font.Size); - repeat - if AContentParams.FontSize > AHeaderParams.FontSize then - Dec(AContentParams.FontSize) - else - if AContentParams.FontSize < AHeaderParams.FontSize then - Dec(AHeaderParams.FontSize) - else - begin - Dec(AContentParams.FontSize); - Dec(AHeaderParams.FontSize); - end; - until TestSize; -end; - -function TcxSchedulerReportDateNavigatorCell.CalculateSize( - const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; -begin - FMonthSize := GetMonthSize(AContentParams, AHeaderParams); - Result := FMonthSize; - Inc(Result.cy, 2 * RowHeight); - CreateItems; - AdjustItemsVertical; - SetViewParams(AContentParams, AHeaderParams); -end; - -class function TcxSchedulerReportDateNavigatorCell.MeasureDateNavigatorHeight( - const AContentParams, AHeaderParams: TcxViewParams): Integer; -var - AColWidth, ARowHeight, ADayCaptionsHeight, AHeaderHeight: Integer; -begin - GetContentPartSizes(AContentParams.Font, AColWidth, ARowHeight, ADayCaptionsHeight); - GetHeaderPartSizes(AHeaderParams.Font, AHeaderHeight); - Result := GetMonthHeight(AHeaderHeight, ADayCaptionsHeight, ARowHeight) + 2 * ARowHeight; -end; - -procedure TcxSchedulerReportDateNavigatorCell.AdjustItemsVertical; -var - I: Integer; -begin - if FVertOffset < 0 then FVertOffset := RowHeight; - for I := 0 to DataItemCount - 1 do - with DataItems[I] do Top := Top + FVertOffset; -end; - -function TcxSchedulerReportDateNavigatorCell.ColOfDate(ADate: TDateTime): Integer; -begin - Result := DayOfWeek(ADate) - Byte(StartOfWeek) - 1; - if Result < 0 then Inc(Result, 7); -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateDayCaptions; -var - R: TRect; - I, ADayOfWeek: Integer; - ACaption: TcxSchedulerReportDateNavigatorDayCaption; -begin - R.Top := HeaderHeight; - R.Bottom := R.Top + DayCaptionsHeight - 2; - R.Right := ColWidth; - FDayCaptionCount := 7; - for I := 0 to FDayCaptionCount - 1 do - begin - ADayOfWeek := I + Byte(StartOfWeek); - if ADayOfWeek > 6 then Dec(ADayOfWeek, 7); - ACaption := TcxSchedulerReportDateNavigatorDayCaption.CreateEx(Self, TDay(ADayOfWeek), I); - with ACaption do - begin - R.Left := R.Right; - R.Right := R.Left + ColWidth; - BoundsRect := R; - end; - end; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateDay(const ABounds: TRect; - ADate: TDateTime; ACol, ARow: Integer); -var - ADay: TcxSchedulerReportDateNavigatorDay; -begin - ADay := TcxSchedulerReportDateNavigatorDay.CreateEx(Self, DayOf(ADate), - ACol, ARow, GetDayIsBold(ADate)); - ADay.BoundsRect := ABounds; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateItems; -begin - CreateMonthHeader; - CreateDayCaptions; - CreateMonth; - CreateLines; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateLines; -var - R: TRect; -begin - R := GetHeaderBounds; - R.Top := R.Bottom + DayCaptionsHeight; - R.Bottom := R.Top + WeekNumberCount * RowHeight; - with TdxReportCellBox.Create(Self) do - begin - if ShowWeekNumbers then CellSides := [csTop, csLeft] else CellSides := [csTop]; - BoundsRect := R; - end; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateMonth; -var - R: TRect; - I, J, ADayBase, ADaysPerMonth: Integer; - ADate, ADateBase: TDateTime; - AHasDate: Boolean; - - function GetDate(out ADate: TDateTime): Boolean; - begin - ADate := ADateBase + ADayBase + J * 7 + I; - Result := (ADate > ADateBase) and (ADate <= ADateBase + ADaysPerMonth); - end; - -begin - FDayCount := 0; - FWeekNumberCount := 0; - ADateBase := EncodeDate(FYear, FMonth, 1) - 1; - ADayBase := 1 - ColOfDate(ADateBase + 1); - ADaysPerMonth := DaysPerMonth(FYear, FMonth); - //loop has been split into two loops for the correct order of the DataItems - for I := 0 to 6 do - for J := 0 to 5 do - if GetDate(ADate) then - begin - CreateDay(GetDayBoundsFromColAndRow(I, J), ADate, I, J); - Inc(FDayCount); - end; - for I := 0 to 6 do - for J := 0 to 5 do - begin - AHasDate := GetDate(ADate); - if ShowWeekNumbers and (I = 0) and not ((J = 5) and not AHasDate) then - begin - R := cxRectOffset(GetDayBoundsFromColAndRow(I, J), -ColWidth, 0); - Dec(R.Right, ColWidth div 8); - CreateWeekNumber(R, ADate, J); - Inc(FWeekNumberCount); - end; - end; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateMonthHeader; -begin - TcxSchedulerReportDateNavigatorHeader.CreateEx(Self, Year, Month).BoundsRect := GetHeaderBounds; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateWeekNumber( - const ABounds: TRect; ADate: TDateTime; ARow: Integer); -var - AWeekNumber: TcxSchedulerReportDateNavigatorWeekNumber; -begin - AWeekNumber := TcxSchedulerReportDateNavigatorWeekNumber.CreateEx(Self, - cxDateUtils.GetWeekNumber(ADate, StartOfWeek, FirstWeekOfYear), ARow); - AWeekNumber.BoundsRect := ABounds; -end; - -class procedure TcxSchedulerReportDateNavigatorCell.GetContentPartSizes( - AFont: TFont; var AColWidth, ARowHeight, ADayCaptionsHeight: Integer; - AFontSize: Integer = 0); -var - ASymbolSize: TSize; -begin - ASymbolSize := cxTextExtent(AFont, '0', AFontSize); - AColWidth := 3 * ASymbolSize.cx; - ADayCaptionsHeight := ASymbolSize.cy + 1; - ARowHeight := ASymbolSize.cy; -end; - -function TcxSchedulerReportDateNavigatorCell.GetDayBoundsFromColAndRow( - ACol, ARow: Integer): TRect; -begin - with Result do - begin - Left := Succ(ACol) * ColWidth; - Top := HeaderHeight + DayCaptionsHeight + ARow * RowHeight; - Right := Left + ColWidth; - Bottom := Top + RowHeight; - end; -end; - -function TcxSchedulerReportDateNavigatorCell.GetDayIsBold( - ADate: TDateTime): Boolean; -begin - Result := FBoldedDays.IndexOf(ADate) <> -1; -end; - -function TcxSchedulerReportDateNavigatorCell.GetHeaderBounds: TRect; -begin - Result := cxRect(ColWidth, 0, MonthSize.cx - MulDiv(ColWidth, 2, 3), HeaderHeight); -end; - -class procedure TcxSchedulerReportDateNavigatorCell.GetHeaderPartSizes( - AFont: TFont; var AHeaderHeight: Integer; AFontSize: Integer = 0); -begin - AHeaderHeight := MulDiv(cxTextHeight(AFont, 'Wg', AFontSize), 3 , 2); -end; - -function TcxSchedulerReportDateNavigatorCell.GetMonthSize( - const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; -begin - GetContentPartSizes(AContentParams.NativeParams.Font, FColWidth, FRowHeight, - FDayCaptionsHeight, AContentParams.FontSize); - GetHeaderPartSizes(AHeaderParams.NativeParams.Font, FHeaderHeight, - AHeaderParams.FontSize); - Result.cx := 9 * FColWidth; - Result.cy := FHeaderHeight + FDayCaptionsHeight + 6 * FRowHeight + 1; -end; - -function TcxSchedulerReportDateNavigatorCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srDateNavigator; -end; - -procedure TcxSchedulerReportDateNavigatorCell.SetViewParams( - const AContentParams, AHeaderParams: TdxReportItemViewParams); -var - I: Integer; - AParams: TdxReportItemViewParams; -begin - FContentParams := AContentParams; - FHeaderParams := AHeaderParams; - SetCellViewParams(Self, AContentParams); - SetCellViewParams(Header, AHeaderParams); - for I := 0 to DayCount - 1 do - begin - AParams := AContentParams; - if Days[I].Bold then - Include(AParams.FontStyle, fsBold); - SetCellViewParams(Days[I], AParams); - end; - for I := 0 to DayCaptionCount - 1 do - SetCellViewParams(DayCaptions[I], AContentParams); - AParams := AContentParams; - if AParams.FontSize <> 0 then - AParams.FontSize := MulDiv(AParams.FontSize, 2, 3) - else - AParams.FontSize := MulDiv(AParams.NativeParams.Font.Size, 2, 3); - for I := 0 to WeekNumberCount - 1 do - SetCellViewParams(WeekNumbers[I], AParams); -end; - -procedure TcxSchedulerReportDateNavigatorCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - AReader.Read(FFirstWeekOfYear, SizeOf(FFirstWeekOfYear)); - FMonth := AReader.ReadInteger; - FYear := AReader.ReadInteger; - FShowDatesContainingEventsInBold := AReader.ReadBoolean; - FShowWeekNumbers := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportDateNavigatorCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.Write(FFirstWeekOfYear, SizeOf(FFirstWeekOfYear)); - AWriter.WriteInteger(FMonth); - AWriter.WriteInteger(FYear); - AWriter.WriteBoolean(FShowDatesContainingEventsInBold); - AWriter.WriteBoolean(FShowWeekNumbers); -end; - -class function TcxSchedulerReportDateNavigatorCell.GetMonthHeight( - AHeaderHeight, ADayCaptionsHeight, ARowHeight: Integer): Integer; -begin - Result := (AHeaderHeight + ADayCaptionsHeight + 6 * ARowHeight); -end; - -function TcxSchedulerReportDateNavigatorCell.GetDay( - Index: Integer): TcxSchedulerReportDateNavigatorDay; -begin - Result := DataItems[Index + 1 + 7] as TcxSchedulerReportDateNavigatorDay; -end; - -function TcxSchedulerReportDateNavigatorCell.GetDayCaption( - Index: Integer): TcxSchedulerReportDateNavigatorDayCaption; -begin - Result := DataItems[Index + 1] as TcxSchedulerReportDateNavigatorDayCaption; -end; - -function TcxSchedulerReportDateNavigatorCell.GetHeader: TcxSchedulerReportDateNavigatorHeader; -begin - Result := DataItems[0] as TcxSchedulerReportDateNavigatorHeader; -end; - -function TcxSchedulerReportDateNavigatorCell.GetWeekNumber( - Index: Integer): TcxSchedulerReportDateNavigatorWeekNumber; -begin - Result := DataItems[Index + 1 + 7 + FDayCount] as TcxSchedulerReportDateNavigatorWeekNumber; -end; - -{ TcxSchedulerReportSchedulingAreaCell } - -constructor TcxSchedulerReportSchedulingAreaCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - FVisibleDays := TcxSchedulerDateList.Create; - FDaysList := TStringList.Create; - CellSides := [csLeft, csTop]; -end; - -destructor TcxSchedulerReportSchedulingAreaCell.Destroy; -begin - FDaysList.Free; - FVisibleDays.Free; - inherited Destroy; -end; - -procedure TcxSchedulerReportSchedulingAreaCell.DrawContent( - DC: HDC; DrawRect: TRect; const OriginRect: TRect; AStage: TdxPSRenderStages); -begin - inherited DrawContent(DC, DrawRect, OriginRect, AStage); - if rsFirstPass in AStage then - DrawBorders(DC); -end; - -procedure TcxSchedulerReportSchedulingAreaCell.DrawItself( - DC: HDC; AStage: TdxPSRenderStages); -begin - if rsFirstPass in AStage then - begin - if IsBackgroundBitmapDrawn then - DrawBackgroundBitmap(DC) - else - if IsBackgroundDrawn then - DrawBackground(DC); - end; -end; - -function TcxSchedulerReportSchedulingAreaCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srSchedulingArea; -end; - -{ TcxSchedulerReportCustomCell } - -constructor TcxSchedulerReportCustomCell.CreateFrom(AParent: TdxReportCell; - AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited Create(AParent); - Transparent := False; - BoundsRect := AViewInfo.Bounds; - CellSides := TdxCellSides(AViewInfo.Borders); -end; - -procedure TcxSchedulerReportCustomCell.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - inherited; - //Renderer.ExcludeClipRect(GetFixupRect(DC, BoundsRect)); -end; - -class procedure TcxSchedulerReportCustomCell.RegisterMirrorClass; -begin - MirrorClasses.Add(Self); -end; - -class function TcxSchedulerReportCustomCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := nil; -end; - -procedure TcxSchedulerReportCustomCell.SuppressColoration; -begin - FDayBorderColor := clBlack; - Color := dxPSCore.dxDefaultContentColor; -end; - -procedure TcxSchedulerReportCustomCell.DrawCellFrame(DC: HDC; const ARect: TRect; - ABorders: TcxBorders = []; ABorderColor: TColor = clDefault; ALineWidth: Integer = 1); -begin - Renderer.FrameRect(DC, GetFixupRect(DC, ARect), - ABorderColor, TdxCellSides(ABorders), ALineWidth); -end; - -procedure TcxSchedulerReportCustomCell.DrawCellRect(DC: HDC; const ARect: TRect; - ABorders: TcxBorders = []; ABorderColor: TColor = clDefault; ALineWidth: Integer = 1; - AColor: TColor = clDefault); -var - R: TRect; -begin - if Transparent then - DrawCellFrame(DC, ARect, ABorders, ABorderColor, ALineWidth) - else - begin - R := GetFixupRect(DC, ARect); - if AColor = clDefault then - AColor := Color; - Renderer.FillRect(DC, R, AColor); - Renderer.FrameRect(DC, R, ABorderColor, TdxCellSides(ABorders), ALineWidth); - end; -end; - -procedure TcxSchedulerReportCustomCell.DrawCellText(DC: HDC; const ARect: TRect; - const AText: string; AlignHorz: TcxTextAlignX; AlignVert: TcxTextAlignY; - AFont: TFont = nil; AColor: TColor = clDefault; AMultiLine: Boolean = False); -const - Horz: array[TcxTextAlignX] of Integer = - (CXTO_LEFT, CXTO_CENTER_HORIZONTALLY, CXTO_RIGHT, CXTO_LEFT, CXTO_LEFT); - Vert: array[TcxTextAlignY] of Integer = - (CXTO_TOP, CXTO_CENTER_VERTICALLY, CXTO_BOTTOM, CXTO_TOP); -var - R: TRect; - AMode: Integer; - Flags: Integer; -begin - if Length(AText) = 0 then Exit; - R := GetFixupRect(DC, ARect); - Flags := Renderer.MakeTextFormat(AlignHorz, AlignVert, AMultiLine, False, True, True, False); - if FNoClip then - Flags := Flags or CXTO_NOCLIP; -{ Flags := CXTO_PREVENT_LEFT_EXCEED or CXTO_PREVENT_TOP_EXCEED or CXTO_NOCLIP or - Horz[AlignHorz] or Vert[AlignVert] or CXTO_SINGLELINE;} - if AFont = nil then - AFont := Font; - AMode := SetBkMode(DC, Windows.TRANSPARENT); - Renderer.DrawTextEx(DC, R, -1, cxTextOffset, - cxTextOffset, AText, AFont, Flags); - SetBkMode(DC, AMode); -end; - -procedure TcxSchedulerReportCustomCell.DrawCellTextVert(DC: HDC; const ARect: TRect; - const AText: string; AlignHorz: TcxTextAlignX; AlignVert: TcxTextAlignY; - AFont: TFont = nil; AMultiLine: Boolean = True); -begin - cxRotatedTextOut(DC, ARect, AText, AFont, AlignHorz, AlignVert, AMultiLine); -end; - -procedure TcxSchedulerReportCustomCell.DrawCellState(DC: HDC; R: TRect; - AState: Integer; ABorders: TcxBorders = []; ABorderColor: TColor = clBlack); -var - ABrushHandle: HBrush; - APenHandle: HPen; - Points: array[0..2] of TPoint; -begin - FixupRect(DC, R); - if R.Top = R.Bottom then - begin - R := ExcludeBorders(R, ABorders); - ABrushHandle := SelectObject(DC, StateBrushes[AState].Handle); - APenHandle := SelectObject(DC, GetStockObject(BLACK_PEN)); - Points[0] := Point(R.Left, R.Top); - Points[1] := Point(R.Right, R.Top); - Points[2] := Point(R.Right, R.Top + R.Right - R.Left); - Windows.Polygon(DC, Points, 3); - SelectObject(DC, APenHandle); - SelectObject(DC, ABrushHandle); - end - else - begin - DrawCellFrame(DC, R, ABorders, ABorderColor, 1); - FillRect(DC, ExcludeBorders(R, ABorders), StateBrushes[AState].Handle); - end; -end; - -function TcxSchedulerReportCustomCell.AdjustTextRect(const ARect: TRect): TRect; -var - L: Integer; -begin - L := FixupWidth(cxTextOffset); - Result := ARect; - InflateRect(Result, -L, -L); -end; - -function TcxSchedulerReportCustomCell.ExcludeBorders(const ARect: TRect; - ABorders: TcxBorders; ABorderWidth: Integer = 1): TRect; -begin - Result := ARect; - with Result do - begin - if bLeft in ABorders then - Inc(Left, ABorderWidth * LineThickness); - if bRight in ABorders then - Dec(Right, ABorderWidth * LineThickness); - if bTop in ABorders then - Inc(Top, ABorderWidth * LineThickness); - if bBottom in ABorders then - Dec(Bottom, ABorderWidth * LineThickness); - end; -end; - -function TcxSchedulerReportCustomCell.FixupWidth(AWidth: Integer): Integer; -begin - if not Renderer.IsPrinting then - Result := MulDiv(AWidth * Renderer.UnitsPerPixel, Renderer.ZoomFactor, 100) - else - Result := MulDiv(AWidth * Renderer.UnitsPerPixel, Renderer.PPI * 5, 72 * 7); -end; - -function TcxSchedulerReportCustomCell.GetFixupRect(DC: HDC; const ARect: TRect): TRect; -begin - Result := ARect; - FixupRect(DC, Result); -end; - -function TcxSchedulerReportCustomCell.InflateRect(const ARect: TRect; dX, dY: Integer): TRect; -begin - Result := ARect; -end; - -function TcxSchedulerReportCustomCell.GetReportLink: TcxSchedulerReportLink; -begin - Result := TcxSchedulerReportLink(Renderer.ReportLink); -end; - -{ TcxSchedulerReportContentCell } - -constructor TcxSchedulerReportContentCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - Data := cdidSchedulerContent; - if AViewInfo is TcxSchedulerContentCellViewInfo then - with TcxSchedulerContentCellViewInfo(AViewInfo) do - begin - Self.BoundsRect := Bounds; - Self.FBorderColor := BorderColor; - Self.FShowTimeLine := ShowTimeLine; - Self.FTimeLineBorders := TimeLineBorders; - if TimeEvent <> nil then - Self.FState := TimeEvent.Event.State - else - Self.FState := -1; - if ShowTimeLine then - begin - CellSideColors[csRight] := clBlack; - CellSideColors[csbottom] := FBorderColor; - end; - CellSides := csAll; - end; -end; - -procedure TcxSchedulerReportContentCell.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportContentCell then - with TcxSchedulerReportContentCell(Source) do - begin - Self.FBorderColor := FBorderColor; - Self.FShowTimeLine := FShowTimeLine; - Self.FState := FState; - Self.FTimeLineBorders := FTimeLineBorders; - end; - inherited Assign(Source); -end; - -procedure TcxSchedulerReportContentCell.DrawContent(DC: HDC; - AStage: TdxPSRenderStages); -var - R: TRect; -begin - inherited DrawContent(DC, AStage); - R := BoundsRect; - if FShowTimeLine then - begin - R.Right := R.Left + FixupWidth(cxTimeLineWidth); - if FState = -1 then - DrawCellRect(DC, R, FTimeLineBorders - [bLeft], clBlack, 1, clWhite) - else - DrawCellState(DC, R, FState, FTimeLineBorders, clBlack); - end -end; - -class function TcxSchedulerReportContentCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerContentCellViewInfo; -end; - -procedure TcxSchedulerReportContentCell.SuppressColoration; -var - I: TdxCellSide; -begin - for I := csLeft to csBottom do - CellSideColors[I] := clBlack; - FBorderColor := clBlack; - if FState <> -1 then - Inc(FState, 4); - inherited SuppressColoration; -end; - -function TcxSchedulerReportContentCell.HasBorderColoration: Boolean; -begin - Result := True; -end; - -{ TcxSchedulerReportHeaderItemCell } - -constructor TcxSchedulerReportHeaderItemCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); - - function GetConvertedRect(ARotateHeader, ARotateText: Boolean; const R: TRect): TRect; - begin - if ARotateHeader then - begin - with R do - if ARotateText then - Result := cxRectBounds(BoundsRect.Left + Top, BoundsRect.Bottom - Right, - Bottom - Top, Right - Left) - else - Result := cxRectBounds(BoundsRect.Left + Left, BoundsRect.Top + Top, - Right - Left, Bottom - Top); - end - else - Result := R; - end; - -begin - inherited CreateFrom(AParent, AViewInfo); - Data := cdidSchedulerHeader; - if AViewInfo is TcxSchedulerHeaderCellViewInfo then - with TcxSchedulerHeaderCellViewInfo(AViewInfo) do - begin - CalculateImageLayout; - Self.TextAlignX := TextAlignXMap[AlignHorz]; - Self.Multiline := AutoHeight; - Self.TextAlignY := TextAlignYMap[AlignVert]; - Self.FRotateText := RotateText; - Self.FCaption := DisplayText; - Self.FIsResourceHeader := IsResourceHeader; - if IsResourceHeader and (Resource <> nil) then - Self.FResourceID := Resource.ResourceID; - //image support - Self.FImages := Images; - Self.FImageIndex := ImageIndex; - Self.FTextRect := GetConvertedRect(RotateHeader, RotateText, TextRect); - Self.FImageRect := GetConvertedRect(RotateHeader, RotateText, ImageRect); - self.FDate := DateTime; - end; - CellSides := csAll; - ReportLink.RegisterLookAndFeelItem(Self, cesRaised); - FNoClip := True; -end; - -procedure TcxSchedulerReportHeaderItemCell.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportHeaderItemCell then - with TcxSchedulerReportHeaderItemCell(Source) do - begin - Self.FCaption := FCaption; - Self.FDate := FDate; - Self.FResourceID := FResourceID; - Self.FRotateText := FRotateText; - //image support - Self.FTextRect := FTextRect; - Self.FImages := FImages; - Self.FImageIndex := FImageIndex; - Self.FImageRect := FImageRect; - end; - inherited Assign(Source); -end; - -procedure TcxSchedulerReportHeaderItemCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - R: TRect; -begin - inherited DrawContent(DC, AStage); - if ReportLink.SupportImages then - R := GetFixupRect(DC, FTextRect) - else - R := BoundsRect; - if FRotateText then - DrawCellTextVert(DC, R, FCaption, TextAlignX, TextAlignY, Font, Multiline) - else - DrawCellText(DC, R, FCaption, TextAlignX, TextAlignY, Font, clDefault, Multiline); - if HasImage then - DrawImage(DC); -end; - -procedure TcxSchedulerReportHeaderItemCell.DrawImage(DC: HDC); -var - R: TRect; -begin - R := GetFixupRect(DC, FImageRect); - Renderer.DrawGraphicEx(DC, R, R, Images, ImageIndex, nil, True, True, Color, - ContentBkColor, ContentPattern, cibAlways); -end; - -class function TcxSchedulerReportHeaderItemCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerHeaderCellViewInfo; -end; - -procedure TcxSchedulerReportHeaderItemCell.ConvertCoords( - APixelsNumerator, APixelsDenominator: Integer); -begin - inherited ConvertCoords(APixelsNumerator, APixelsDenominator); - ConvertRect(FTextRect, APixelsNumerator, APixelsDenominator); - ConvertRect(FImageRect, APixelsNumerator, APixelsDenominator); -end; - -function TcxSchedulerReportHeaderItemCell.HasImage: Boolean; -begin - Result := (Images <> nil) and (ImageIndex > -1) and (ImageIndex < Images.Count); -end; - -procedure TcxSchedulerReportHeaderItemCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FRotateText := AReader.ReadBoolean; - FCaption := AReader.ReadString; - if ReportLink.SupportImages then - begin - FTextRect := AReader.ReadRect; - if AReader.ReadBoolean then // HasImage - begin - FImageRect := AReader.ReadRect; - FImages := ReportCells.ImageLists[AReader.ReadInteger]; - FImageIndex := AReader.ReadInteger; - end - else - FImages := nil; - end; -end; - -procedure TcxSchedulerReportHeaderItemCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteBoolean(FRotateText); - AWriter.WriteString(FCaption); - if ReportLink.SupportImages then - begin - AWriter.WriteRect(FTextRect); - AWriter.WriteBoolean(HasImage); - if HasImage then - begin - AWriter.WriteRect(FImageRect); - AWriter.WriteInteger(ReportCells.IndexOfImageList(Images)); - AWriter.WriteInteger(ImageIndex); - end; - end; -end; - -function TcxSchedulerReportHeaderItemCell.GetTextAlignX: TcxTextAlignX; -begin - Result := inherited TextAlignX; -end; - -function TcxSchedulerReportHeaderItemCell.GetTextAlignY: TcxTextAlignY; -begin - Result := inherited TextAlignY; -end; - -procedure TcxSchedulerReportHeaderItemCell.SetTextAlignX( - Value: TcxTextAlignX); -begin - inherited TextAlignX := Value; -end; - -procedure TcxSchedulerReportHeaderItemCell.SetTextAlignY( - Value: TcxTextAlignY); -begin - inherited TextAlignY := Value; -end; - -{ TcxSchedulerReportGroupSeparatorCell } - -constructor TcxSchedulerReportGroupSeparatorCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - CellSides := csAll; - ReportLink.RegisterLookAndFeelItem(Self, cesRaised); -end; - -class function TcxSchedulerReportGroupSeparatorCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerGroupSeparatorCellViewInfo; -end; - -{ TcxSchedulerReportContainerCell } - -class function TcxSchedulerReportContainerCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerContainerCellViewInfo; -end; - -{ TcxSchedulerReportTextCell } - -constructor TcxSchedulerReportTextCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - FTextRect := BoundsRect; -end; - -procedure TcxSchedulerReportTextCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -begin - DrawCellRect(DC, BoundsRect, TcxBorders(CellSides), clWindowText); - DrawCellText(DC, TextRect, DisplayText, taLeft, taTop); -end; - -procedure TcxSchedulerReportTextCell.ConvertCoords( - APixelsNumerator, APixelsDenominator: Integer); -begin - inherited ConvertCoords(APixelsNumerator, APixelsDenominator); - ConvertRect(FTextRect, APixelsNumerator, APixelsDenominator); -end; - -procedure TcxSchedulerReportTextCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FDisplayText := AReader.ReadString; - FTextRect := AReader.ReadRect; -end; - -procedure TcxSchedulerReportTextCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FDisplayText); - AWriter.WriteRect(FTextRect); -end; - - -{ TcxSchedulerReportBackgroundSlotCell } - -constructor TcxSchedulerReportBackgroundSlotCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - if AViewInfo is TcxSchedulerBackgroundSlotCellViewInfo then - with TcxSchedulerBackgroundSlotCellViewInfo(AViewInfo) do - Self.FDisplayText := DisplayText; -end; - -class function TcxSchedulerReportBackgroundSlotCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerBackgroundSlotCellViewInfo; -end; - - { TcxSchedulerReportTimeLineMinorScaleCell } - -constructor TcxSchedulerReportTimeLineMinorScaleCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - if AViewInfo is TcxSchedulerTimeGridMinorScaleCell then - begin - Self.DisplayText := TcxSchedulerTimeGridMinorScaleCell(AViewInfo).DisplayText; - Self.FTextRect := TcxSchedulerTimeGridMinorScaleCell(AViewInfo).TextBounds; - end; -end; - -class function TcxSchedulerReportTimeLineMinorScaleCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerTimeGridMinorScaleCell; -end; - -{ TcxSchedulerReportTimeLineMajorScaleCell } - -class function TcxSchedulerReportTimeLineMajorScaleCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerTimeGridMajorScaleCell; -end; - -{ TcxSchedulerReportDailyTimeRulerCellsSite } - -constructor TcxSchedulerReportDailyTimeRulerCellsSite.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - FLargeFont := TFont.Create; - FontIndex := ReportCells.ReportLink.AddFontToPool(Font); - CellSides := []; -end; - -destructor TcxSchedulerReportDailyTimeRulerCellsSite.Destroy; -begin - FLargeFont.Free; - inherited Destroy; -end; - -procedure TcxSchedulerReportDailyTimeRulerCellsSite.SetFontIndex(Index: Integer); -begin - inherited SetFontIndex(Index); - if Font <> nil then - begin - FLargeFont.Assign(Font); - FLargeFont.Size := Font.Size * 2; - FLargeFontIndex := ReportCells.ReportLink.AddFontToPool(FLargeFont); - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCellsSite.ReadProperties( - AReader: TdxPSDataReader); -begin - inherited ReadProperties(AReader); - FLargeFontIndex := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportDailyTimeRulerCellsSite.WriteProperties( - AWriter: TdxPSDataWriter); -begin - inherited WriteProperties(AWriter); - AWriter.WriteInteger(FLargeFontIndex); -end; - -function TcxSchedulerReportDailyTimeRulerCellsSite.GetLargeFont: TFont; -begin - if (FLargeFontIndex <> -1) and (ReportCells <> nil) then - Result := ReportCells.GetFontByIndex(FLargeFontIndex) - else - Result := nil; -end; - -{ TcxSchedulerReportDailyTimeRulerCell } - -constructor TcxSchedulerReportDailyTimeRulerCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -var - I: Boolean; -begin - inherited CreateFrom(AParent, AViewInfo); - CellSides := [csRight]; - Data := cdidSchedulerTimeRuler; - FLineColor := clBtnShadow; - TimeRulerSite.Width := Max(TimeRulerSite.Width, Width); - if AViewInfo is TcxSchedulerTimeRulerCellViewInfo then - with TcxSchedulerTimeRulerCellViewInfo(AViewInfo) do - begin - TimeRulerSite.Height := Max(TimeRulerSite.Height, ClipRect.Bottom); - Self.FHour := Hour; - Self.FShowMinutes := ShowMinutes; - Self.FHasAdditionalTimeZone := HasAdditionalTimeZone; - Self.FLineCount:= LineCount; - for I := False to True do - begin - Self.FBounds[I] := Bounds[I]; - Self.FDisplayTexts[I] := DisplayTexts[I]; - end; - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportDailyTimeRulerCell then - with TcxSchedulerReportDailyTimeRulerCell(Source) do - begin - Self.FHasAdditionalTimeZone := FHasAdditionalTimeZone; - Self.FLineCount := FLineCount; - Self.FBounds[False] := FBounds[False]; - Self.FBounds[True] := FBounds[True]; - Self.FDisplayTexts[False] := FDisplayTexts[False]; - Self.FDisplayTexts[True] := FDisplayTexts[True]; - Self.FHour := FHour; - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - I: Boolean; -const - ABorders: array[Boolean] of TcxBorders = ([bBottom], [bBottom, bRight]); -begin - if Index = 0 then - CellSides := CellSides + [csBottom]; - inherited; - CalculateDisplayInfo; - for I := not HasAdditionalTimeZone to True do - begin - if Hour >= 0 then - DrawTimeZone(DC, Bounds[I], DisplayTexts[I], I) - else - DrawTimeZoneLabel(DC, Bounds[I], DisplayTexts[I], ABorders[I]); - end; -end; - -class function TcxSchedulerReportDailyTimeRulerCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerTimeRulerCellViewInfo; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.SuppressColoration; -begin - inherited SuppressColoration; - FLineColor := clBlack; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.CalculateDisplayInfo; -begin - FBounds[True] := BoundsRect; - FBounds[False] := BoundsRect; - if HasAdditionalTimeZone then - begin - FBounds[True].Left := cxRectCenter(BoundsRect).X; - FBounds[False].Right := FBounds[True].Left; - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.DrawTimeZone(DC: HDC; - const ABounds: TRect; const AText: string; AIsCurrent: Boolean); -var - S: string; - J, LH: Integer; - R1, R, TextR: TRect; -begin - LH := cxRectHeight(BoundsRect) div LineCount; - R := BoundsRect; - Dec(R.Right, FixupWidth(6)); - if not IsLastItem then - DrawCellFrame(DC, R, [bBottom], FLineColor); - - R := cxRectSetHeight(ABounds, LH); - R.Left := (R.Left + R.Right) div 2 + FixupWidth(cxTextOffset * 2); - Dec(R.Right, FixupWidth(6)); - for J := 0 to LineCount - 2 do - begin - DrawCellFrame(DC, R, [bBottom], FLineColor, 1); - OffsetRect(R, 0, LH); - end; - TextR := cxRectInflate(ExcludeBorders(ABounds, - [bRight, bBottom]), -FixupWidth(5), -FixupWidth(cxTextOffset)); - FNoClip := True; - if LineCount > 1 then - begin - J := Length(AText); - - DrawCellText(DC, Rect(TextR.Left, TextR.Top, R.Left - FixupWidth(cxTextOffset), TextR.Bottom), - Copy(AText, 1, J - 3), taRight, taTop, LargeFont, LargeFont.Color); - R1 := Rect(R.Left, TextR.Top, TextR.Right, TextR.Top + LH - FixupWidth(3)); - DrawCellText(DC, R1, Copy(AText, J - 1, 2), taCenterX, taTop, Font); - if ShowMinutes and AIsCurrent then - for J := 1 to LineCount - 1 do - begin - OffsetRect(R1, 0, LH); - S := IntToStr(MulDiv(60, J, LineCount)); - if Length(S) < 2 then - S := '0' + S; - DrawCellText(DC, R1, S, taCenterX, taTop, Font); - end; - end - else - DrawCellText(DC, TextR, AText, taRight, taCenterY, Font); - R.Left := ABounds.Left + FixupWidth(5); - if not IsLastItem then - begin - if Hour <> 23 then - DrawCellFrame(DC, R, [bBottom], FLineColor) - else - DrawCellFrame(DC, ABounds, [bBottom], FLineColor); - end; - if HasAdditionalTimeZone then - begin - R := GetInnerBounds(DC); - R.Left := (R.Left + R.Right) div 2; - R.Right := R.Left + LineThickness; - Renderer.FillRect(DC, R, clBlack); - end; - FNoClip := False; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FHasAdditionalTimeZone := AReader.ReadBoolean; - FLineCount := AReader.ReadInteger; - FBounds[False] := AReader.ReadRect; - FBounds[True] := AReader.ReadRect; - FDisplayTexts[False] := AReader.ReadString; - FDisplayTexts[True] := AReader.ReadString; - FHour := AReader.ReadInteger; - FLineColor := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteBoolean(FHasAdditionalTimeZone); - AWriter.WriteInteger(FLineCount); - AWriter.WriteRect(FBounds[False]); - AWriter.WriteRect(FBounds[True]); - AWriter.WriteString(FDisplayTexts[False]); - AWriter.WriteString(FDisplayTexts[True]); - AWriter.WriteInteger(FHour); - AWriter.WriteInteger(FLineColor); -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.DrawTimeZoneLabel(DC: HDC; - const ABounds: TRect; const AText: string; ABorders: TcxBorders); -begin - DrawCellText(DC, AdjustTextRect(ABounds), AText, taLeft, taBottom, Font, Font.Color); -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetBoundsRect(AType: Boolean): TRect; -begin - Result := FBounds[AType]; -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetDisplayText(AType: Boolean): string; -begin - Result := FDisplayTexts[AType]; -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetLargeFont: TFont; -begin - Result := TimeRulerSite.LargeFont; -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; -begin - Result := TcxSchedulerReportDailyTimeRulerCellsSite(Parent); -end; - -{ TcxSchedulerReportMonthDayCell } - -constructor TcxSchedulerReportMonthDayCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - if AViewInfo is TcxSchedulerMonthDayContentCellViewInfo then - begin - FSmallFont := TcxSchedulerMonthDayContentCellViewInfo(AViewInfo).SmallFont; - FDontPrint := TcxSchedulerMonthDayContentCellViewInfo(AViewInfo).DontPrint; - if FDontPrint then - begin - Transparent := True; - FDisplayText := ''; - end - else - FDisplayText := TcxSchedulerMonthDayContentCellViewInfo(AViewInfo).DisplayText; - end; -end; - -procedure TcxSchedulerReportMonthDayCell.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportMonthDayCell then - begin - FDontPrint := TcxSchedulerReportMonthDayCell(Source).FDontPrint; - FDisplayText := TcxSchedulerReportMonthDayCell(Source).FDisplayText; - end; -end; - -procedure TcxSchedulerReportMonthDayCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - R: TRect; - F: TFont; -begin - inherited DrawContent(DC, AStage); - if FDontPrint then Exit; - if FDisplayText <> '' then - begin - R := ExcludeBorders(BoundsRect, TcxBorders(CellSides)); - F := TFont.Create; - try - F.Assign(Font); - if SmallFont then - F.Size := MulDiv(F.Size, 2, 3); - DrawCellText(DC, R, FDisplayText, taRight, taTop, F); - finally - F.Free; - end; - end; -end; - -class function TcxSchedulerReportMonthDayCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerMonthDayContentCellViewInfo; -end; - -procedure TcxSchedulerReportMonthDayCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FDisplayText := AReader.ReadString; - FDontPrint := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportMonthDayCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FDisplayText); - AWriter.WriteBoolean(FDontPrint); -end; - -{ TcxSchedulerReportTimeLinePart } - -constructor TcxSchedulerReportTimeLinePart.CreateEx(AParent: TdxReportCell; - ATriangle: Boolean; AState: Integer); -begin - inherited Create(AParent); - Transparent := False; - FTriangle := ATriangle; - FState := AState; - Data := cdidSchedulerEventTimeLine; -end; - -procedure TcxSchedulerReportTimeLinePart.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportTimeLinePart then - begin - FState := TcxSchedulerReportTimeLinePart(Source).FState; - FTriangle := TcxSchedulerReportTimeLinePart(Source).FTriangle; - end; -end; - -procedure TcxSchedulerReportTimeLinePart.DrawContent(DC: HDC; - AStage: TdxPSRenderStages); -var - R: TRect; - ABrushHandle: HBrush; - APenHandle: HPen; - Points: array[0..2] of TPoint; -begin - R := GetOuterBounds(DC); - if FTriangle then - begin - Renderer.FillRect(DC, R, clWhite); - ABrushHandle := SelectObject(DC, StateBrushes[FState].Handle); - APenHandle := SelectObject(DC, GetStockObject(NULL_PEN)); - Points[0] := R.TopLeft; - Points[1] := Point(R.Right, R.Top); - Points[2] := Point(R.Right, R.Top + R.Right - R.Left); - Windows.Polygon(DC, Points, 3); - SelectObject(DC, GetStockObject(BLACK_PEN)); - Windows.MoveToEx(DC, R.Left, R.Top, nil); - Windows.LineTo(DC, R.Right, R.Top + R.Right - R.Left); - SelectObject(DC, APenHandle); - SelectObject(DC, ABrushHandle); - end - else - Windows.FillRect(DC, R, StateBrushes[FState].Handle); - DrawBorders(DC); -end; - -procedure TcxSchedulerReportTimeLinePart.ReadData( - AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FTriangle := AReader.ReadBoolean; - FState := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportTimeLinePart.WriteData( - AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteBoolean(FTriangle); - AWriter.WriteInteger(FState); -end; - -{ TcxSchedulerReportTimeLineCell } - -constructor TcxSchedulerReportTimeLineCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - Transparent := False; - Color := clWhite; -end; - -procedure TcxSchedulerReportTimeLineCell.SetTimeRect(const ABounds: TRect; AState: Integer); -var - ATriangle: Boolean; -begin - ATriangle := cxRectIsEmpty(ABounds); - FCurrentValue := TcxSchedulerReportTimeLinePart.CreateEx(Self, ATriangle, AState); - if ATriangle then - FCurrentValue.BoundsRect := BoundsRect - else - FCurrentValue.BoundsRect := ABounds; -end; - -{ TcxSchedulerReportCellString } - -function TcxSchedulerReportCellString.GetDefaultDTFormat: DWORD; -begin - Result := inherited GetDefaultDTFormat and not CXTO_EDITCONTROL; -end; - -{ TcxSchedulerReportCustomEventCell } - -function TcxSchedulerReportCustomEventCell.CreateStringCell( - const AText: string; AMultiline: Boolean = True; AData: Integer = 0): TdxReportCellString; -begin - Result := TcxSchedulerReportCellString.Create(Self); - Result.CellSides := []; - Result.Multiline := AMultiline; - Result.Text := AText; - Result.Data := AData; -end; - -function TcxSchedulerReportCustomEventCell.NeedExtractPlainTextForMessage( - AProperties: TcxCustomEditProperties): Boolean; -begin - Result := (AProperties <> nil) and not PrintStyle.SupportMessageEditProperties; -end; - -procedure TcxSchedulerReportCustomEventCell.SetViewParams(const AViewParams: TcxViewParams); -var - I: Integer; -begin - ReportLink.SetCellViewParams(Self, AViewParams); - for I := 0 to DataItemCount - 1 do - ReportLink.SetCellViewParams(DataItems[I], AViewParams); -end; - -procedure TcxSchedulerReportCustomEventCell.CreateMessageCell(AProperties: TcxCustomEditProperties); -begin - if AProperties = nil then - FMessageCell := nil - else - begin - FMessageCell := AddDataItem(GetMessageClass(AProperties)); - FMessageCell.Data := cdidSchedulerEventMessage; - MessageCell.CellSides := []; - end; -end; - -function TcxSchedulerReportCustomEventCell.GetMessage: Variant; -begin - Result := ''; -end; - -function TcxSchedulerReportCustomEventCell.GetMessageClass( - AProperties: TcxCustomEditProperties): TdxReportCellDataClass; -begin - Result := dxPScxCommon.dxPSDataMaps.ItemClass(AProperties); -end; - -function TcxSchedulerReportCustomEventCell.GetValidMessage( - const AMessage: Variant; AProperties: TcxCustomEditProperties): Variant; -begin - Result := AMessage; - if NeedExtractPlainTextForMessage(AProperties) then - Result := AProperties.GetDisplayText(Result, True); -end; - -function TcxSchedulerReportCustomEventCell.GetPrintStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := ReportLink.PrintStyles.ActiveStyle; -end; - -function TcxSchedulerReportCustomEventCell.GetReportLink: TcxSchedulerReportLink; -begin - Result := ReportCells.ReportLink as TcxSchedulerReportLink; -end; - -function TcxSchedulerReportCustomEventCell.GetSuppressColoration: Boolean; -begin - Result := ReportLink.OptionsFormatting.SuppressContentColoration; -end; - -procedure TcxSchedulerReportCustomEventCell.InitializeMessageCell( - AProperties: TcxCustomEditProperties; const AViewParams: TcxViewParams); -var - AParams: TdxReportItemViewParams; -begin - if (MessageCell = nil) or (AProperties = nil) then Exit; - FillChar(AParams, SizeOf(AParams), 0); - AParams.NativeParams := AViewParams; - dxPScxCommon.dxPSDataMaps.InitializeItem(MessageCell, AProperties, - GetMessage, PrintStyle, AParams); -end; - -{ TcxSchedulerReportEventCell } - -constructor TcxSchedulerReportEventCell.CreateFrom(AParent: TdxReportCell; - AEventViewInfo: TcxSchedulerEventCellViewInfo); -begin - inherited Create(AParent); - ClipChildren := True; - Transparent := False; - InitializeFromViewInfo(AEventViewInfo); - CreateDataItems; - SetViewParams(AEventViewInfo.ViewParams); - CalculateLayout; - InitializeMessageCell(EditProperties, AEventViewInfo.ViewParams); -end; - -procedure TcxSchedulerReportEventCell.AdjustItemsHeight(DC: HDC); - - procedure CheckItem(AItem: TAbstractdxReportCellData); - var - R: TRect; - begin - if Assigned(AItem) then - begin - R := AItem.BoundsRect; - if HasMessage then - R.Bottom := MessageCell.Top - else - R.Bottom := ContentBounds.Bottom; - AItem.BoundsRect := R; - end; - end; - -begin - CheckItem(CaptionCell); - CheckItem(StartCell); - CheckItem(FinishCell); -end; - -procedure TcxSchedulerReportEventCell.CalculateLayout; -var - DC: HDC; - I, W, H, AHalfWidth: Integer; -begin - DC := GetDC(0); - try - FContentBounds := GetContentBounds(DC); - if Assigned(FTimeLineCell) then - CalculateTimeLine(DC); - FCaptionLeft := FContentBounds.Left; - if IsNeedCreateTimeCells then - begin - H := Renderer.CalcTextHeight(DC, '0', False, CaptionCell.Font); - W := Renderer.CalcTextWidth(DC, '00:00', CaptionCell.Font); - AHalfWidth := cxRectWidth(ContentBounds) div 2; - if W < AHalfWidth then - begin - StartCell.BoundsRect := cxRectBounds(FCaptionLeft, 0, W, H); - if W * 2 < AHalfWidth then - begin - FinishCell.BoundsRect := cxRectBounds(StartCell.BoundsRect.Right, 0, W, H); - FCaptionLeft := FinishCell.BoundsRect.Right + 2; - end - else - begin - FCaptionLeft := StartCell.BoundsRect.Right + 2; - FreeAndNil(FFinishCell); - end; - end - else - FreeAndNil(FStartCell); - for I := 0 to DataItemCount - 1 do - if DataItems[I].Data = cdidSchedulerEventIcons then - begin - DataItems[I].Left := FCaptionLeft; - Inc(FCaptionLeft, DataItems[I].Width + 2); - end; - end; - CaptionCell.BoundsRect := GetCaptionRect(DC); - if Assigned(MessageCell) then - begin - MessageCell.BoundsRect := GetMessageRect(DC); - MessageCell.AdjustContent(DC); - end; - AdjustItemsHeight(DC); - finally - ReleaseDC(0, DC); - end; -end; - -procedure TcxSchedulerReportEventCell.CalculateTimeLine(DC: HDC); - - function GetTimeRectBrushIndex: Integer; - begin - Result := Event.State; - if SuppressColoration then - Inc(Result, 4); - end; - - function GetActualTimeRect: TRect; - begin - Result := GetRelativeRect(EventViewInfo.EventTimeRect); - if not cxRectIsEmpty(Result) then - Result := cxRectInflate(Result, 0, 1); - end; - -begin - if FTimeLineCell = nil then Exit; - FTimeLineCell.BoundsRect := GetTimeLineRect(DC); - FTimeLineCell.SetTimeRect(GetActualTimeRect, GetTimeRectBrushIndex); -end; - -function TcxSchedulerReportEventCell.CreateCaptionCell: TdxReportCellString; -begin - Result := CreateStringCell(EventViewInfo.Caption, - FHasDetailInfo and not IsHeaderEvent, cdidSchedulerEventCaption); - with Result do - begin - if HasDetailInfo then TextAlignY := taTop; - if IsHeaderEvent and not HasImages then TextAlignX := taCenterX; - end; -end; - -procedure TcxSchedulerReportEventCell.CreateDataItems; -begin - {and (EventViewInfo is TcxSchedulerDayViewEventCellViewInfo)} - if HasDetailInfo and not IsHeaderEvent then - FTimeLineCell := CreateTimeLineCell; - if IsNeedCreateTimeCells then - begin - FStartCell := CreateTimeTextCell(EventViewInfo.StartText, cdidSchedulerEventStart); - FFinishCell := CreateTimeTextCell(EventViewInfo.FinishText, cdidSchedulerEventFinish); - end; - CreateEventImageCells; - FCaptionCell := CreateCaptionCell; - if HasMessage then - CreateMessageCell(EditProperties); -end; - -procedure TcxSchedulerReportEventCell.CreateEventImageCells; -var - I: Integer; - AImageCell: TdxReportCellImage; - AImage: TcxSchedulerEventImageItem; -begin - if not HasImages then Exit; - for I := 0 to EventViewInfo.Images.Count - 1 do - begin - AImage := EventViewInfo.Images[I]; - AImageCell := AddDataItem(TdxReportCellImage) as TdxReportCellImage; - AImageCell.CellSides := []; - AImageCell.Data := cdidSchedulerEventIcons; - if AImage.ImageType = eitCustom then - begin - AImageCell.ImageList := AImage.Images; - AImageCell.ImageIndex := AImage.ImageIndex; - AImageCell.BoundsRect := GetRelativeRect(AImage.Bounds); - end - else - begin - AImageCell.TextAlignX := taCenterX; - AImageCell.TextAlignY := taBottom; - case AImage.ImageType of - eitReminder: - AImageCell.Text := 'A'; - eitRecurrence: - AImageCell.Text := 'B'; - eitCustomOccurrence: - AImageCell.Text := 'C'; - end; - AImageCell.BoundsRect := GetRelativeRect(AImage.Bounds); - end; - end; -end; - -function TcxSchedulerReportEventCell.CreateTimeTextCell( - const ATimeText: string; AData: Integer = 0): TdxReportCellString; -begin - Result := CreateStringCell(ATimeText, False, AData); - Result.TextAlignX := taRight; -end; - -function TcxSchedulerReportEventCell.CreateTimeLineCell: TcxSchedulerReportTimeLineCell; -begin - Result := TcxSchedulerReportTimeLineCell.Create(Self); -end; - -function TcxSchedulerReportEventCell.GetCaptionRect(DC: HDC): TRect; -begin - if HasImages then - Result := GetRelativeRect(EventViewInfo.CaptionRect) - else - Result := FContentBounds; - if IsNeedCreateTimeCells then - Result.Left:= FCaptionLeft; - if HasMessage then - begin - Result.Bottom := Result.Top + CaptionCell.MeasureFontHeight(DC); - Renderer.CalcTextRect(DC, CaptionCell.Text, Result, True, Font); - Result.Right := ContentBounds.Right; - CheckBounds(Result); - end; -end; - -function TcxSchedulerReportEventCell.GetContentBounds(DC: HDC): TRect; -begin - Result := GetRelativeRect(EventViewInfo.Bounds); - Dec(Result.Right); - Dec(Result.Bottom); -end; - -function TcxSchedulerReportEventCell.GetHasImages: Boolean; -begin - Result := PrintStyle.ShowEventImages and (FEventViewInfo.Images.Count > 0); -end; - -function TcxSchedulerReportEventCell.GetHasMessage: Boolean; -begin - Result := PrintStyle.SupportMessage and HasDetailInfo; -end; - -function TcxSchedulerReportEventCell.GetMessage: Variant; -begin - Result := GetValidMessage(EventViewInfo.Message, EditProperties); -end; - -function TcxSchedulerReportEventCell.GetMessageRect(DC: HDC): TRect; -begin - if HasImages then - Result := GetRelativeRect(EventViewInfo.MessageRect) - else - Result := ContentBounds; - Dec(Result.Bottom); // don't redraw the bottom line - if CaptionCell.BoundsRect.Bottom > Result.Top then - Result.Top := CaptionCell.BoundsRect.Bottom; -end; - -function TcxSchedulerReportEventCell.GetRelativeRect(const R: TRect): TRect; -begin - Result := cxRectOffset(R, FOrigin); -end; - -function TcxSchedulerReportEventCell.GetTimeLineRect(DC: HDC): TRect; -begin - Result := cxRect(0, 0, ContentBounds.Left, Height); -end; - -procedure TcxSchedulerReportEventCell.InitializeFromViewInfo( - AEventViewInfo: TcxSchedulerEventCellViewInfo); -var - R: TRect; -begin - FEventViewInfo := AEventViewInfo; - FEditViewInfo := AEventViewInfo.EditViewInfo; - FEditProperties := AEventViewInfo.EventViewData.EditProperties; - R := AEventViewInfo.EventViewData.Bounds; - FOrigin := cxPointInvert(R.TopLeft); - if not (Parent is TcxSchedulerReportSchedulingAreaCell) then - OffsetRect(R, -Parent.Left, -Parent.Top); - BoundsRect := R; - CellSides := TdxCellSides(AEventViewInfo.Borders); - FIsHeaderEvent := Event.AllDayEvent or (Event.Duration > 1); - FHasDetailInfo := AEventViewInfo.IsDetailInfo; - FIsNeedCreateTimeCells := not (FIsHeaderEvent or FHasDetailInfo) and - AEventViewInfo.ShowStartTime; - FHasImages := GetHasImages; - FHasMessage := GetHasMessage and AEventViewInfo.ShowMessage; -end; - -procedure TcxSchedulerReportEventCell.InitializeMessageCell( - AProperties: TcxCustomEditProperties; const AViewParams: TcxViewParams); -begin - if Assigned(MessageCell) then - begin - MessageCell.CellSides := [csTop]; - if not SuppressColoration then - MessageCell.BorderColor := EventViewInfo.SeparatorColor; - inherited InitializeMessageCell(AProperties, AViewParams); - end; -end; - -procedure TcxSchedulerReportEventCell.SetViewParams(const AViewParams: TcxViewParams); -var - I, AFontIndex: Integer; -begin - inherited SetViewParams(AViewParams); - if HasImages then - begin - SpecialSymbolFont.Size := AViewParams.Font.Size; - AFontIndex := Renderer.ReportLink.AddFontToPool(SpecialSymbolFont); - for I := 0 to DataItemCount - 1 do - if DataItems[I].Data = cdidSchedulerEventIcons then - DataItems[I].FontIndex := AFontIndex; - end; -end; - -procedure TcxSchedulerReportEventCell.CheckBounds(var ABounds: TRect); -begin - cxRectIntersect(ABounds, ABounds, ContentBounds); -end; - -function TcxSchedulerReportEventCell.GetEvent: TcxSchedulerControlEvent; -begin - Result := EventViewInfo.Event; -end; - -{ TcxSchedulerReportDetailsEventCell } - -constructor TcxSchedulerReportDetailsEventCell.CreateEx(AParent: TdxReportCell; - AEvent: TcxSchedulerEvent; ADate: TDateTime; const AParams: TcxViewParams; - AContinued: Boolean = False); -begin - inherited Create(AParent); - CellSides := []; - FContinued := AContinued; - FDate := ADate; - FEvent := AEvent; - FViewParams := AParams; - FEditProperties := GetEditProperties; - CreateDataItems; - SetViewParams(AParams); -end; - -procedure TcxSchedulerReportDetailsEventCell.CalculateLayout(AWidth, ATimeWidth: Integer); -var - DC: HDC; - ATop: Integer; -begin - FCaptionCell.BoundsRect := MakeRect(ATimeWidth, 0, AWidth, 0); - DC := GetDC(0); - try - FLineHeight := FCaptionCell.MeasureFontHeight(DC); - FStartCell.BoundsRect := MakeRect(0, 0, ATimeWidth, FLineHeight); - ATop := FCaptionCell.MeasureContentHeight(DC); - FCaptionCell.Height := ATop; - FMessageCell.BoundsRect := MakeRect(ATimeWidth, ATop, AWidth, ATop); - InitializeMessageCell(EditProperties, ViewParams); - ATop := FMessageCell.MeasureContentHeight(DC); - FMessageCell.Height := Max(ATop, FLineHeight); - finally - ReleaseDC(0, DC); - end; -end; - -function TcxSchedulerReportDetailsEventCell.CalculateHeight: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to DataItemCount - 1 do - with DataItems[I] do - if Visible then Result := Max(Result, BoundsRect.Bottom); -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateCaptionCell; -begin - FCaptionCell := CreateStringCell(GetCaptionCellText, True, - cdidSchedulerEventCaption); -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateDataItems; -begin - CreateCaptionCell; - CreateTimeCell; - CreateMessageCell(EditProperties); -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateMessageCell( - AProperties: TcxCustomEditProperties); -begin - if Continued or (AProperties = nil) then - FMessageCell := CreateStringCell(GetMessage, True, cdidSchedulerEventMessage) - else - inherited CreateMessageCell(AProperties); -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateTimeCell; -begin - FStartCell := CreateStringCell(GetTimeCellText, False, cdidSchedulerEventStart); -end; - -function TcxSchedulerReportDetailsEventCell.GetCaptionCellText: string; -begin - Result := Event.Caption; - if Trim(Event.Location) <> '' then - Result := Result + ' -- ' + Event.Location; -end; - -function TcxSchedulerReportDetailsEventCell.GetEditProperties: TcxCustomEditProperties; -begin - Result := nil; - if not Continued and Assigned(ReportLink.Scheduler.OnGetEventEditProperties) then - ReportLink.Scheduler.OnGetEventEditProperties(nil, nil, Result); -end; - -function TcxSchedulerReportDetailsEventCell.GetMessage: Variant; -begin - if Continued then - Result := cxGetResourceString(@sdxSeeAboveMessage) - else - Result := GetValidMessage(Event.Message, EditProperties); -end; - -function TcxSchedulerReportDetailsEventCell.GetTimeCellText: string; -begin - if Event.AllDayEvent or ((DateOf(Event.Start) < Date) and (DateOf(Event.Finish) > Date)) then - Result := cxGetResourceString(@sdxAllDayMessage) - else - Result := DateTimeHelper.TimeToStr(Max(Event.Start, Date)) + ' - ' + - DateTimeHelper.TimeToStr(Min(Event.Finish, Date + 1)); -end; - -procedure TcxSchedulerReportDetailsEventCell.SetViewParams( - const AViewParams: TcxViewParams); -var - AParams: TdxReportItemViewParams; -begin - inherited SetViewParams(AViewParams); - FillChar(AParams, SizeOf(AParams), 0); - AParams.NativeParams := AViewParams; - Include(AParams.FontStyle, fsBold); - ReportLink.SetCellViewParams(CaptionCell, AParams); - ReportLink.SetCellViewParams(StartCell, AParams); -end; - -{ TcxSchedulerReportMemoEventCell } - -procedure TcxSchedulerReportMemoEventCell.CalculateLayout(AWidth, - ATimeWidth: Integer); -var - ATop, ASpace: Integer; - DC: HDC; -begin - DC := GetDC(0); - try - FLineHeight := Renderer.CalcTextHeight(DC, 'Wg', False, Font); - ASpace := FLineHeight div 2; - ATop := FLineHeight * 2; - HeaderCell.BoundsRect := MakeRect(0, 0, AWidth, ATop); - Inc(ATop, ASpace); - CalculateLabelAndData(CaptionLabelCell, CaptionCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(LocationLabelCell, LocationCell, DC, ATimeWidth, AWidth, ATop); - if Assigned(CaptionLabelCell) or Assigned(LocationLabelCell) then Inc(ATop, ASpace); - CalculateLabelAndData(StartLabelCell, StartCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(FinishLabelCell, FinishCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(ShowTimeAsLabelCell, ShowTimeAsCell, DC, ATimeWidth, AWidth, ATop); - Inc(ATop, ASpace); - CalculateLabelAndData(RecurrenceLabelCell, RecurrenceCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(RecurrencePatternLabelCell, RecurrencePatternCell, DC, ATimeWidth, AWidth, ATop); - if Assigned(MessageCell) then - begin - Inc(ATop, ASpace); - MessageCell.BoundsRect := MakeRect(0, ATop, AWidth, ATop); - InitializeMessageCell(EditProperties, ViewParams); - MessageCell.Height := MessageCell.MeasureContentHeight(DC); - end; - finally - ReleaseDC(0, DC); - end; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateDataItems; -begin - CreateHeader; - CreateSubject; - CreateLocation; - CreateStart; - CreateFinish; - CreateShowTimeAs; - CreateRecurrence; - CreateRecurrencePattern; - CreateMessage; -end; - -function TcxSchedulerReportMemoEventCell.GetCaptionCellText: string; -begin - Result := Event.Caption; -end; - -function TcxSchedulerReportMemoEventCell.GetTimeCellText: string; -begin - Result := FormatDateTime('ddd ddddd t', Event.Start); -end; - -procedure TcxSchedulerReportMemoEventCell.SetViewParams( - const AViewParams: TcxViewParams); -var - AParams: TdxReportItemViewParams; -begin - ReportLink.SetCellViewParams(Self, AViewParams); - ReportLink.SetCellViewParams(CaptionCell, AViewParams); - ReportLink.SetCellViewParams(LocationCell, AViewParams); - ReportLink.SetCellViewParams(StartCell, AViewParams); - ReportLink.SetCellViewParams(FinishCell, AViewParams); - ReportLink.SetCellViewParams(ShowTimeAsCell, AViewParams); - ReportLink.SetCellViewParams(RecurrenceCell, AViewParams); - ReportLink.SetCellViewParams(RecurrencePatternCell, AViewParams); - ReportLink.SetCellViewParams(MessageCell, AViewParams); - - FillChar(AParams, SizeOf(AParams), 0); - AParams.NativeParams := AViewParams; - Include(AParams.FontStyle, fsBold); - ReportLink.SetCellViewParams(CaptionLabelCell, AParams); - ReportLink.SetCellViewParams(LocationLabelCell, AParams); - ReportLink.SetCellViewParams(StartLabelCell, AParams); - ReportLink.SetCellViewParams(FinishLabelCell, AParams); - ReportLink.SetCellViewParams(ShowTimeAsLabelCell, AParams); - ReportLink.SetCellViewParams(RecurrenceLabelCell, AParams); - ReportLink.SetCellViewParams(RecurrencePatternLabelCell, AParams); - - AParams.FontSize := MulDiv(AViewParams.Font.Size, 3, 2); - ReportLink.SetCellViewParams(HeaderCell, AParams); -end; - -procedure TcxSchedulerReportMemoEventCell.CalculateLabelAndData( - ALabelCell, ADataCell: TAbstractdxReportCellData; DC: HDC; - ATimeWidth, AWidth: Integer; var ATop: Integer); -begin - if Assigned(ALabelCell) then - begin - ALabelCell.BoundsRect := MakeBounds(0, ATop, ATimeWidth, FLineHeight); - ADataCell.BoundsRect := MakeRect(ATimeWidth, ATop, AWidth, ATop); - ADataCell.Height := ADataCell.MeasureContentHeight(DC); - Inc(ATop, Max(ADataCell.Height, FLineHeight)); - end; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateHeader; -begin - FHeaderCell := CreateStringCell(GetHeaderCellText); - FHeaderCell.BorderClass := TdxPSCellBoldFlatBorder; - FHeaderCell.CellSides := [csBottom]; - FHeaderCell.TextAlignY := taBottom; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateFinish; -begin - CreateFinishLabelCell; - CreateFinishCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateFinishCell; -begin - FFinishCell := CreateStringCell(FormatDateTime('ddd ddddd t', Event.Finish)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateFinishLabelCell; -begin - FFinishLabelCell := CreateStringCell( - cxGetResourceString(@sdxFinishLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateLocation; -begin - if Event.Location = '' then Exit; - CreateLocationLabelCell; - CreateLocationCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateLocationCell; -begin - FLocationCell := CreateStringCell(Event.Location); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateLocationLabelCell; -begin - FLocationLabelCell := CreateStringCell( - cxGetResourceString(@sdxLocationLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateMessage; -begin - if GetMessage = '' then Exit; - CreateMessageCell(EditProperties); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrence; -begin - CreateRecurrenceLabelCell; - CreateRecurrenceCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrenceCell; -begin - FRecurrenceCell := CreateStringCell(GetRecurrenceCellText); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrenceLabelCell; -begin - FRecurrenceLabelCell := CreateStringCell( - cxGetResourceString(@sdxRecurrenceLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrencePattern; -begin - if not Event.IsRecurring then Exit; - CreateRecurrencePatternLabelCell; - CreateRecurrencePatternCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrencePatternCell; -begin - FRecurrencePatternCell := CreateStringCell(GetRecurrencePatternCellText); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrencePatternLabelCell; -begin - FRecurrencePatternLabelCell := CreateStringCell( - cxGetResourceString(@sdxRecurrencePatternLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateShowTimeAs; -begin - if GetShowTimeAsCellText = '' then Exit; - CreateShowTimeAsLabelCell; - CreateShowTimeAsCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateShowTimeAsCell; -begin - FShowTimeAsCell := CreateStringCell(GetShowTimeAsCellText); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateShowTimeAsLabelCell; -begin - FShowTimeAsLabelCell := CreateStringCell( - cxGetResourceString(@sdxShowTimeAsLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateStart; -begin - CreateStartLabelCell; - CreateTimeCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateStartLabelCell; -begin - FStartLabelCell := CreateStringCell( - cxGetResourceString(@sdxStartLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateSubject; -begin - if GetCaptionCellText = '' then Exit; - CreateSubjectLabelCell; - CreateCaptionCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateSubjectLabelCell; -begin - FCaptionLabelCell := CreateStringCell( - cxGetResourceString(@sdxSubjectLabelCaption)); -end; - -function TcxSchedulerReportMemoEventCell.GetHeaderCellText: string; -var - AResource: TcxSchedulerStorageResourceItem; -begin - AResource := Event.GetResourceItem; - if AResource <> nil then - Result := AResource.Name - else - Result := dxPSUtl.GetUserName; -end; - -function TcxSchedulerReportMemoEventCell.GetRecurrenceCellText: string; -begin - if Event.IsRecurring then - case Event.RecurrenceInfo.Recurrence of - cxreDaily: - Result := cxGetResourceString(@scxRecurrenceDailyMessage); - cxreWeekly: - Result := cxGetResourceString(@scxRecurrenceWeeklyMessage); - cxreMonthly: - Result := cxGetResourceString(@scxRecurrenceMonthlyMessage); - cxreYearly: - Result := cxGetResourceString(@scxRecurrenceYearlyMessage); - else - Result := ''; - end - else - Result := cxGetResourceString(@sdxRecurrenceNoneMessage); -end; - -function TcxSchedulerReportMemoEventCell.GetRecurrencePatternCellText: string; -begin - if Event.IsRecurring and Assigned(cxGetRecurrenceDescriptionStringProc) then - Result := cxGetRecurrenceDescriptionStringProc(Event.RecurrenceInfo) - else - Result := ''; -end; - -function TcxSchedulerReportMemoEventCell.GetShowTimeAsCellText: string; -begin - case Event.State of - tlsFree: - Result := cxGetResourceString(@sdxShowTimeAsFreeMessage); - tlsTentative: - Result := cxGetResourceString(@sdxShowTimeAsTentativeMessage); - tlsOutOfOffice: - Result := cxGetResourceString(@sdxShowTimeAsOutOfOfficeMessage); - else - Result := ''; - end; -end; - -{ TcxSchedulerReportGanttLinkCell } - -constructor TcxSchedulerReportGanttLinkCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -var - R: TRect; - I: Integer; - ALinkInfo: TcxSchedulerGanttViewLinkViewInfo; -begin - inherited CreateFrom(AParent, AViewInfo); - if AViewInfo is TcxSchedulerGanttViewLinkViewInfo then - begin - ALinkInfo := TcxSchedulerGanttViewLinkViewInfo(AViewInfo); - BorderColor := ColorToRgb(ALinkInfo.Color); - AssignInfo(ALinkInfo.Lines, ALinkInfo.ArrowDirection, ALinkInfo.ArrowRect); - R := ArrowRect; - for I := 0 to Length(Lines) - 1 do - R := cxRectUnion(R, Lines[I]); - BoundsRect := R; - end; - Index := 0; -end; - -procedure TcxSchedulerReportGanttLinkCell.Assign(Source: TPersistent); -var - ACell: TcxSchedulerReportGanttLinkCell; -begin - if Source is TcxSchedulerReportGanttLinkCell then - begin - ACell := TcxSchedulerReportGanttLinkCell(Source); - AssignInfo(ACell.Lines, ACell.ArrowDirection, ACell.ArrowRect); - end; - inherited Assign(Source); -end; - -procedure TcxSchedulerReportGanttLinkCell.DrawArrow( - DC: HDC; const ABounds: TRect); -var - ARgn: HRGN; - APoints: TcxArrowPoints; -begin - case ArrowDirection of - adUp: - begin - APoints[0] := Point((ABounds.Right + ABounds.Left) div 2, ABounds.Top); - APoints[1] := Point(ABounds.Left, ABounds.Bottom); - APoints[2] := Point(ABounds.Right, ABounds.Bottom); - end; - adDown: - begin - APoints[0] := Point(ABounds.Right, ABounds.Top); - APoints[1] := Point((ABounds.Right + ABounds.Left) div 2, ABounds.Bottom); - APoints[2] := Point(ABounds.Left, ABounds.Top); - end; - adLeft: - begin - APoints[0] := Point(ABounds.Left, (ABounds.Top + ABounds.Bottom) div 2); - APoints[1] := Point(ABounds.Right, ABounds.Top); - APoints[2] := Point(ABounds.Right, ABounds.Bottom); - end; - adRight: - begin - APoints[0] := Point(ABounds.Right, (ABounds.Top + ABounds.Bottom) div 2); - APoints[1] := Point(ABounds.Left, ABounds.Top); - APoints[2] := Point(ABounds.Left, ABounds.Bottom); - end; - end; - ARgn := CreatePolygonRgn(APoints, 3, ALTERNATE); - Renderer.FillRgn(DC, ARgn, BorderColor); - DeleteObject(ARgn); -end; - -procedure TcxSchedulerReportGanttLinkCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - R: TRect; - I: Integer; -begin - for I := 0 to Length(FLines) - 1 do - begin - R := GetFixupRect(DC, FLines[I]); - if cxRectWidth(R) > cxRectHeight(R) then - R := cxRectSetHeight(R, Renderer.LineThickness) - else - R := cxRectSetWidth(R, Renderer.LineThickness); - Renderer.FillRect(DC, R, BorderColor); - end; - DrawArrow(DC, ArrowRect); -end; - -class function TcxSchedulerReportGanttLinkCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerGanttViewLinkViewInfo; -end; - -procedure TcxSchedulerReportGanttLinkCell.AssignInfo( - const ALines: TcxSchedulerGanttViewLinkLines; - AArrowDirection: TcxArrowDirection; const AArrowRect: TRect); -begin - FArrowDirection := AArrowDirection; - FArrowRect := AArrowRect; - SetLength(Self.FLines, Length(ALines)); - Move(ALines[0], FLines[0], SizeOf(TRect) * Length(ALines)); -end; - -procedure TcxSchedulerReportGanttLinkCell.ConvertCoords( - APixelsNumerator, APixelsDenominator: Integer); -var - I: Integer; -begin - inherited ConvertCoords(APixelsNumerator, APixelsDenominator); - for I := 0 to Length(FLines) - 1 do - ConvertRect(FLines[I], APixelsNumerator, APixelsDenominator); - ConvertRect(FArrowRect, APixelsNumerator, APixelsDenominator); -end; - -procedure TcxSchedulerReportGanttLinkCell.ReadData(AReader: TdxPSDataReader); -var - I: Integer; -begin - inherited ReadData(AReader); - FArrowDirection := TcxArrowDirection(AReader.ReadInteger); - FArrowRect := AReader.ReadRect; - SetLength(FLines, AReader.ReadInteger); - for I := 0 to Length(FLines) - 1 do - FLines[I] := AReader.ReadRect; -end; - -procedure TcxSchedulerReportGanttLinkCell.WriteData(AWriter: TdxPSDataWriter); -var - I: Integer; -begin - inherited WriteData(AWriter); - AWriter.WriteInteger(Integer(ArrowDirection)); - AWriter.WriteRect(FArrowRect); - AWriter.WriteInteger(Length(FLines)); - for I := 0 to Length(FLines) - 1 do - AWriter.WriteRect(FLines[I]); -end; - -{ TcxSchedulerReportCommonCellsProducer } - -constructor TcxSchedulerReportCommonCellsProducer.CreateEx( - AStyle: TcxCustomSchedulerReportLinkPrintStyle; - ASite: TcxSchedulerReportSchedulingAreaCell); -begin - inherited Create(AStyle.GetCorrespondedView); - FStyle := AStyle; - FSite := ASite; -end; - -procedure TcxSchedulerReportCommonCellsProducer.GetPageResources( - AResources: TcxObjectList); -var - ResPerPage, APageIndex, I, J: Integer; -begin - ResPerPage := Style.ResourceCountPerPage; - if Resources = nil then Exit; - if (ResPerPage <= 0) or (ResPerPage >= Resources.VisibleResourceCount) then - begin - for I := 0 to Resources.VisibleResourceCount - 1 do - begin - AResources.Add(TcxSchedulerResourceViewInfo.Create( - Resources.VisibleResources[I])); - end; - Exit; - end; - APageIndex := (Site.PageIndex div PagesPerWeek) mod Style.GetResourcePageCount; - I := ResPerPage * APageIndex; - J := Min(ResPerPage * (APageIndex + 1), Resources.VisibleResourceCount); - while I < J do - begin - AResources.Add(TcxSchedulerResourceViewInfo.Create( - Resources.VisibleResources[I])); - I := I + 1; - end; -end; - -procedure TcxSchedulerReportCommonCellsProducer.Produce; -begin - Calculate; -end; - -procedure TcxSchedulerReportCommonCellsProducer.AfterCalculatePage; -var - I, J: Integer; - ASubList: TcxSchedulerViewInfoCellList; - AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass; - AEventCell: TcxSchedulerReportEventCell; -begin - for I := 0 to Cells.Count - 1 do - begin - ASubList := TcxSchedulerViewInfoCellList(Cells[I]); - for J := 0 to ASubList.Count - 1 do - begin - AItem := ASubList[J]; - if AItem.Visible then - begin - if AItem is TcxSchedulerEventCellViewInfo then - begin - AEventCell := CreateEventCell(TcxSchedulerEventCellViewInfo(AItem)); - Style.ReportLink.DoInitializeEventCell(AEventCell); - end - else - if FindMirorClassForItem(AItem, AReportItemClass) then - ConvertSchedulerCellToPSCells(AItem, AReportItemClass); - end; - end; - end; -end; - -function TcxSchedulerReportCommonCellsProducer.CanCalculate: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportCommonCellsProducer.CreateEventCell( - AEventViewInfo: TcxSchedulerEventCellViewInfo): TcxSchedulerReportEventCell; -begin - Result := TcxSchedulerReportEventCell.CreateFrom(Site, AEventViewInfo); -end; - -procedure TcxSchedulerReportCommonCellsProducer.ConvertSchedulerCellToPSCells( - AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); -var - APSItem: TcxSchedulerReportCustomCell; -begin - APSItem := AReportItemClass.CreateFrom(FSite, AItem); - SetCellViewParams(APSItem, AItem.ViewParams); -end; - -procedure TcxSchedulerReportCommonCellsProducer.DoInitialize( - var ASelectedDays: TcxSchedulerDateList; var AEvents: TcxSchedulerCachedEventList); -begin - ASelectedDays := Site.VisibleDays; - AEvents := Style.Events; -end; - -function TcxSchedulerReportCommonCellsProducer.GetCompressWeekends: Boolean; -begin - Result := Style.CompressWeekends; -end; - -function TcxSchedulerReportCommonCellsProducer.GetDontPrintWeekEnds: Boolean; -begin - Result := Style.DontPrintWeekends; -end; - -function TcxSchedulerReportCommonCellsProducer.GetHideSelection: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportCommonCellsProducer.GetIsPrinting: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPageBounds: TRect; -begin - Result := Site.GetInnerBounds(0); -end; - -function TcxSchedulerReportCommonCellsProducer.GetPagesPerWeek: Byte; -begin - Result := Integer(Style.Layout) + 1; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPrintExactlyOneMonth: Boolean; -begin - Result := (Style is TcxSchedulerReportLinkMonthlyPrintStyle) and - TcxSchedulerReportLinkMonthlyPrintStyle(Style).PrintExactlyOneMonthPerPage; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPrintRange( - Index: Integer): TDateTime; -begin - if Index = 0 then - Result := Style.TimePrintFrom - else - Result := Style.TimePrintTo; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPrimaryPage: Boolean; -begin - Result := Site.PrimaryPage; -end; - -function TcxSchedulerReportCommonCellsProducer.GetStylesAdapter: IcxSchedulerStylesAdapter; -begin - Result := Styles; -end; - -procedure TcxSchedulerReportCommonCellsProducer.SetCellViewParams( - ACell: TdxReportVisualItem; const AParams: TcxViewParams); -begin - Site.SetCellViewParams(ACell, AParams); - if Style.ReportLink.OptionsFormatting.SuppressContentColoration then - if ACell is TcxSchedulerReportCustomCell then - TcxSchedulerReportCustomCell(ACell).SuppressColoration; -end; - -function TcxSchedulerReportCommonCellsProducer.GetStyles: TcxSchedulerReportLinkStyles; -begin - Result := Style.VisualStyles; -end; - -{ TcxSchedulerReportDailyCellsProducer } - -procedure TcxSchedulerReportDailyCellsProducer.AfterCalculatePage; -begin - FRulerSite := CreateTimeRulerSite; - SetCellViewParams(FRulerSite, Styles.GetTimeRulerParams); -{ FRulerSite.Transparent := - Style.ReportLink.OptionsFormatting.SuppressContentColoration;} - inherited AfterCalculatePage; -end; - -procedure TcxSchedulerReportDailyCellsProducer.BeforeCalculatePage; -begin - Site.CellSides := csAll; - inherited BeforeCalculatePage; -end; - -procedure TcxSchedulerReportDailyCellsProducer.ConvertSchedulerCellToPSCells( - AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); -begin - if AReportItemClass = TcxSchedulerReportDailyTimeRulerCell then - SetCellViewParams(AReportItemClass.CreateFrom(FRulerSite, AItem), AItem.ViewParams) - else - inherited ConvertSchedulerCellToPSCells(AItem, AReportItemClass); -end; - -function TcxSchedulerReportDailyCellsProducer.CreateTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; -begin - Result := TcxSchedulerReportDailyTimeRulerCellsSite.Create(FSite); - Result.Transparent := True; - Result.ClipChildren := True; -end; - -{ TcxSchedulerReportYearlyCellsProducer } - -procedure TcxSchedulerReportYearlyCellsProducer.Produce; -var - AIndex: Integer; -begin - AIndex := Site.PageIndex; - if Style.MonthCountPerPage <> 12 then - begin - AIndex := AIndex div (Byte(Style.Layout) + 1); - FFirstMonth := (AIndex * Style.MonthCountPerPage) mod 12 + 1 - end - else - FFirstMonth := 1; - inherited Produce; -end; - -function TcxSchedulerReportYearlyCellsProducer.GetDayCountPerPage: Integer; -begin - Result := MaxYearViewWeekDays; - if Style.Layout = pslTwoPages then - begin - if IsPrimaryPage then - Result := cxYearStyleDaysOnPrimaryPage - else - Result := Result - cxYearStyleDaysOnPrimaryPage; - end; -end; - -function TcxSchedulerReportYearlyCellsProducer.GetMonthCount: Integer; -begin - Result := Style.MonthCountPerPage; -end; - -function TcxSchedulerReportYearlyCellsProducer.GetFirstMonth: Integer; -begin - Result := FFirstMonth; -end; - -function TcxSchedulerReportYearlyCellsProducer.GetShowMonthHeaders: Boolean; -const - Dividers: array[TcxSchedulerReportLinkPeriodicPrintStyleLayout] of Integer = (1, 2); -begin - Result := not Style.PrimaryPageHeadersOnly or - (Site.PageIndex mod Style.PeriodPageCount mod Dividers[Style.Layout] = 0); -end; - -function TcxSchedulerReportYearlyCellsProducer.GetShowWeekDayHeaders: Boolean; -const - Indexes: array[TcxSchedulerReportLinkPeriodicPrintStyleLayout] of Integer = (0, 1); -begin - Result := not Style.PrimaryPageHeadersOnly or - (Site.PageIndex mod Style.PeriodPageCount <= Indexes[Style.Layout]) -end; - -function TcxSchedulerReportYearlyCellsProducer.GetStartDayIndex: Integer; -begin - Result := 0; - if (Style.Layout = pslTwoPages) and not IsPrimaryPage then - Result := cxYearStyleDaysOnPrimaryPage -end; - -function TcxSchedulerReportYearlyCellsProducer.GetIsPrimaryPage: Boolean; -begin - Result := Site.PageIndex mod 2 = 0; -end; - -function TcxSchedulerReportYearlyCellsProducer.GetStyle: TcxSchedulerReportLinkYearlyPrintStyle; -begin - Result := TcxSchedulerReportLinkYearlyPrintStyle(inherited Style); -end; - -{ TcxTimeLinePageInfo } - -constructor TcxTimeLinePageInfo.Create; -begin - PageResources := TList.Create; -end; - -destructor TcxTimeLinePageInfo.Destroy; -begin - PageResources.Free; - inherited Destroy; -end; - -{ TcxSchedulerReportTimeLineLayoutBuilder } - -constructor TcxSchedulerReportTimeLineLayoutBuilder.CreateEx( - AStyle: TcxSchedulerReportLinkTimeLinePrintStyle); -begin - inherited Create(AStyle.GetCorrespondedView); - FPagesInfo := TcxObjectList.Create; - FStyle := AStyle; -end; - -destructor TcxSchedulerReportTimeLineLayoutBuilder.Destroy; -begin - FreeAndNil(FPagesInfo); - inherited Destroy; -end; - -procedure TcxSchedulerReportTimeLineLayoutBuilder.CalculateLayout; -begin - FColCount := 0; - FRowCount := 0; - FPagesInfo.Clear; - View := Style.CorrespondedView; - CalculateTimeRanges; - Calculate; - CalculatePagination; -end; - -procedure TcxSchedulerReportTimeLineLayoutBuilder.GetPageResources( - AResources: TcxObjectList); -var - I: Integer; -begin - AResources.Clear; - if Style.ResourceCountPerPage = 0 then Exit; - for I := 0 to Resources.VisibleResourceCount - 1 do - AResources.Add(TcxSchedulerResourceViewInfo.Create(Resources.VisibleResources[I])); -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.AddPageInfo( - ARow, AColumn: Integer; const AStart, AFinish: TDateTime): TcxTimeLinePageInfo; -begin - Result := TcxTimeLinePageInfo.Create; - FCurrentPageIndex := FPagesInfo.Add(Result); - Result.PageBounds := cxRectOffset(GetPageBounds, 0, FCurrentPageIndex * Style.PageHeight); - Result.Headers := not Style.PrimaryPageHeadersOnly or (AColumn = 0); - Result.Scales := not Style.PrimaryPageScalesOnly or (ARow = 0); - Result.ContentBounds := GetPageContentBounds(ARow, AColumn); - Result.Start := AStart; - Result.Finish := AFinish; -end; - -procedure TcxSchedulerReportTimeLineLayoutBuilder.AddRow( - AStartIndex, AFinishIndex, AStartLine: Integer); -var - ACol, I: Integer; - AInfo: TcxTimeLinePageInfo; -begin - for ACol := 0 to ColCount - 1 do - begin - AInfo := PageInfo[ACol]; - if RowCount <> 0 then - AInfo := AddPageInfo(FRowCount, ACol, AInfo.Start, AInfo.Finish); - for I := AStartIndex to AFinishIndex do - begin - if I < Resources.VisibleResourceCount then - AInfo.PageResources.Add(Resources.VisibleResources[I]); - AInfo.LineStart := AStartLine; - end; - end; - Inc(FRowCount); -end; - -procedure TcxSchedulerReportTimeLineLayoutBuilder.AfterCalculatePage; -begin - inherited AfterCalculatePage; -end; - -procedure TcxSchedulerReportTimeLineLayoutBuilder.CalculatePagination; - - procedure PrepareIndexes(var AStart, AFinish: Integer; APageLineCount: Integer); - var - I, AMaxCount: Integer; - begin - while AStart <> AFinish do - begin - AMaxCount := 0; - for I := AStart to AFinish do - AMaxCount := Max(AMaxCount, ViewInfo.GroupLineCount[I]); - if AMaxCount * (AFinish - AStart + 1) > APageLineCount then - Dec(AFinish) - else - Break; - end; - end; - -var - AStartGroup, AFinishGroup, ATotalCount, AResPerPage: Integer; -begin - AStartGroup := 0; - AResPerPage := Style.ResourceCountPerPage; - if AResPerPage = 0 then - AResPerPage := ViewInfo.GroupCount; - while AStartGroup < ViewInfo.GroupCount do - begin - AFinishGroup := Min(ViewInfo.GroupCount - 1, AStartGroup + AResPerPage - 1); - ATotalCount := GetPageLineCount(RowCount); - PrepareIndexes(AStartGroup, AFinishGroup, GetPageLineCount(RowCount)); - if (AStartGroup = AFinishGroup) and (ViewInfo.GroupLineCount[AStartGroup] > ATotalCount) then - begin - ATotalCount := 0; - while ATotalCount < ViewInfo.GroupLineCount[AStartGroup] do - begin - AddRow(AStartGroup, AStartGroup, ATotalCount); - Inc(ATotalCount, GetPageLineCount(RowCount - 1)); - end; - end - else - AddRow(AStartGroup, AFinishGroup, 0); - AStartGroup := AFinishGroup + 1; - end; -end; - -procedure TcxSchedulerReportTimeLineLayoutBuilder.CalculateTimeRanges; -var - AStart, ARangeStart, AFinish: TDateTime; - ATimeBuilder: TcxSchedulerTimeBuilder; - AFullWidth, APageWidth, AColWidth: Integer; -begin - AStart := Style.PrintFrom; - ATimeBuilder := TcxSchedulerTimeBuilder.Create; - try - ATimeBuilder.Initialize(Style.GetCorrespondedView as TcxSchedulertimeGridView, - Style.WorkTimeOnly, Style.DontPrintWeekends); - ATimeBuilder.ValidateVisibleStart(AStart); - AColWidth := ViewInfo.ColumnWidth; - ARangeStart := AStart; - AFullWidth := 0; - APageWidth := cxRectWidth(GetPageContentBounds(0, PageCount)); - repeat - AFinish := ATimeBuilder.Inc(AStart); - Inc(AFullWidth, AColWidth); - if AFullWidth > APageWidth then - begin - AddPageInfo(0, PageCount, ARangeStart, AStart); - ARangeStart := AStart; - AFullWidth := AColWidth; - APageWidth := cxRectWidth(GetPageContentBounds(0, PageCount)); - end; - AStart := AFinish; - until AFinish >= Style.PrintTo; - if (AFullWidth > 0) or (PageCount = 0) then - AddPageInfo(0, PageCount, ARangeStart, AFinish); - finally - ATimeBuilder.Free; - FColCount := FPagesInfo.Count; - end; -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.CanCalculate: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetActualStart: TDateTime; -begin - Result := PageInfo[0].Start; -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetActualFinish: TDateTime; -begin - Result := PageInfo[PageCount - 1].Finish; -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetDontPrintWeekEnds: Boolean; -begin - Result := Style.DontPrintWeekends and Style.CanDontPrintWeekends; -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetHideSelection: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetIsPrinting: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetPageBounds: TRect; -begin - Result := Rect(0, 0, Style.PageWidth[FCurrentPageIndex], Style.PageHeight); -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetPageContentBounds( - ARow, AColumn: Integer): TRect; -begin - Result := Rect(0, 0, Style.PageWidth[AColumn], Style.PageHeight); - if not Style.PrimaryPageScalesOnly or (ARow = 0) then - begin - Result.Top := Min(Result.Bottom - 1, Result.Top + ViewInfo.ScalesHeight); - end; - if not Style.PrimaryPageHeadersOnly or (AColumn = 0) then - begin - Result.Left := Min(Result.Bottom - 1, Result.Left + ViewInfo.ResourceHeaderWidth); - end; -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetPageLineCount( - ARow: Integer): Integer; -begin - Result := Max(1, cxRectHeight(GetPageContentBounds(ARow, 0)) div - (ViewInfo.ContentLineHeight + ViewInfo.IndentBetweenLines)); -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetPrintRange(Index: Integer): TDateTime; -begin - Result := 0; //todo: -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetStylesAdapter: IcxSchedulerStylesAdapter; -begin - Result := Style.VisualStyles; -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetPageCount: Integer; -begin - Result := FPagesInfo.Count; -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetPageInfo( - Index: Integer): TcxTimeLinePageInfo; -begin - Result := TcxTimeLinePageInfo(FPagesInfo[Index]); -end; - -function TcxSchedulerReportTimeLineLayoutBuilder.GetViewInfo: TcxSchedulerTimeGridViewViewInfo; -begin - Result := TcxSchedulerTimeGridViewAccess(View).ViewInfo; -end; - -{ TcxSchedulerReportTimeLineCellsProducer } - -procedure TcxSchedulerReportTimeLineCellsProducer.GetPageResources( - AResources: TcxObjectList); -var - I: Integer; -begin - AResources.Clear; - if Resources = nil then Exit; - for I := 0 to PageInfo.PageResources.Count - 1 do - AResources.Add(TcxSchedulerResourceViewInfo.Create(PageInfo.PageResources[I])); -end; - -function TcxSchedulerReportTimeLineCellsProducer.CreateEventCell( - AEventViewInfo: TcxSchedulerEventCellViewInfo): TcxSchedulerReportEventCell; -var - R: TRect; - AHost: TdxReportCell; -begin - AHost := TdxReportCell.Create(Site); - R := AEventViewInfo.ClipRect; - if R.Left <> AEventViewInfo.Bounds.Left then - OffsetRect(R, 1, 0); - AHost.BoundsRect := R; - AHost.Transparent := True; - AHost.CellSides := []; - AHost.ClipChildren := True; - Result := TcxSchedulerReportEventCell.CreateFrom(AHost, AEventViewInfo); -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetActualStart: TDateTime; -begin - Result := Style.LayoutBuilder.ActualStart; -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetActualFinish: TDateTime; -begin - Result := Style.LayoutBuilder.ActualFinish; -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetLineOffset: Integer; -begin - Result := PageInfo.LineStart; -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetPrintRange( - Index: Integer): TDateTime; -begin - if Index = 0 then - Result := PageInfo.Start - else - Result := PageInfo.Finish; -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetShowLinks: Boolean; -begin - Result := Style.ShowLinks; -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetShowResourceHeaders: Boolean; -begin - Result := PageInfo.Headers; -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetShowScales: Boolean; -begin - Result := PageInfo.Scales; -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetWorkDaysOnly: Boolean; -begin - Result := Style.DontPrintWeekends; -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetWorkTimeOnly: Boolean; -begin - Result := Style.WorkTimeOnly; -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetPageIndex: Integer; -begin - Result := Site.PageSite.PageIndex; -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetPageInfo: TcxTimeLinePageInfo; -begin - Result := Style.LayoutBuilder.PageInfo[PageIndex]; -end; - -function TcxSchedulerReportTimeLineCellsProducer.GetStyle: TcxSchedulerReportLinkTimeLinePrintStyle; -begin - Result := TcxSchedulerReportLinkTimeLinePrintStyle(inherited Style); -end; - -// registration unit part - -procedure RegisterMirrorClasses; -begin - MirrorClasses := TList.Create; - TcxSchedulerReportContentCell.RegisterMirrorClass; - TcxSchedulerReportHeaderItemCell.RegisterMirrorClass; - TcxSchedulerReportGroupSeparatorCell.RegisterMirrorClass; - TcxSchedulerReportContainerCell.RegisterMirrorClass; - TcxSchedulerReportDailyTimeRulerCell.RegisterMirrorClass; -// TcxSchedulerReportEventCell.RegisterMirrorClass; - TcxSchedulerReportMonthDayCell.RegisterMirrorClass; - TcxSchedulerReportBackgroundSlotCell.RegisterMirrorClass; - TcxSchedulerReportGanttLinkCell.RegisterMirrorClass; - // - TcxSchedulerReportTimeLineMajorScaleCell.RegisterMirrorClass; - TcxSchedulerReportTimeLineMinorScaleCell.RegisterMirrorClass; -end; - -procedure UnRegisterMirrorClasses; -begin - MirrorClasses.Free; -end; - -function GetFontFolder : string; -var - APIDL: PItemIDList; - APath: array[0..MAX_PATH] of Char; - AMalloc: IMalloc; -begin - Result := ''; - if ShGetSpecialFolderLocation(Application.Handle, CSIDL_FONTS, APIDL) = S_OK then - begin - if ShGetPathFromIDList(APIDL, APath) then - Result := APath; - if Succeeded(SHGetMalloc(AMalloc)) then - AMalloc.Free(APIDL); - end; -end; - -procedure RegisterReportLinkClasses; -begin - RegisterClasses([TcxSchedulerReportLinkStyles]); - - TcxSchedulerReportSchedulingAreaCell.Register; - TcxSchedulerReportNotesAreaCell.Register; - TcxSchedulerReportTaskPadCell.Register; - TcxSchedulerReportSchedulerHeaderCell.Register; - TcxSchedulerReportSchedulerHeaderDataCell.Register; - - //datenavigator - TcxSchedulerReportDateNavigatorCell.Register; - TcxSchedulerReportDateNavigatorHeader.Register; - TcxSchedulerReportDateNavigatorDay.Register; - TcxSchedulerReportDateNavigatorDayCaption.Register; - TcxSchedulerReportDateNavigatorWeekNumber.Register; - - //scheduling area items - TcxSchedulerReportContentCell.Register; - TcxSchedulerReportHeaderItemCell.Register; - TcxSchedulerReportGroupSeparatorCell.Register; - TcxSchedulerReportContainerCell.Register; - TcxSchedulerReportBackgroundSlotCell.Register; - TcxSchedulerReportDailyTimeRulerCellsSite.Register; - TcxSchedulerReportDailyTimeRulerCell.Register; - TcxSchedulerReportMonthDayCell.Register; - - TcxSchedulerReportCellString.Register; - TcxSchedulerReportEventCell.Register; - TcxSchedulerReportDetailsEventCell.Register; - TcxSchedulerReportMemoEventCell.Register; - - TcxSchedulerReportTimeLineCell.Register; - TcxSchedulerReportTimeLinePart.Register; - - TcxSchedulerReportTimeLineMajorScaleCell.Register; - TcxSchedulerReportTimeLineMinorScaleCell.Register; - - TcxSchedulerReportGanttLinkCell.Register; - - TcxSchedulerReportPageSite.Register; - - dxPSRegisterReportLink(TcxSchedulerReportLink, - TcxScheduler, TcxfmSchedulerReportLinkDesignWindow); -end; - -type - TAddFontMemResource = function (p1: Pointer; p2: DWORD; p3: PDesignVector; p4: LPDWORD): THandle; stdcall; - TRemoveFontMemResource = function (p1: THandle): BOOL; stdcall; - -var - GDI32Lib: HMODULE; - AddFontMemResource: TAddFontMemResource; - RemoveFontMemResource: TRemoveFontMemResource; - -procedure InitializeSchedulerLink; - - function LoadImagesFromResource(AWidth, AHeight: Integer; - const AResourceName: string): TImageList; - begin - Result := TImageList.Create(nil); - Result.Width := AWidth; - Result.Height := AHeight; - Result.Handle := ImageList_LoadImage(HInstance, PChar(AResourceName), AWidth, - AHeight, CLR_DEFAULT, IMAGE_BITMAP, LR_DEFAULTCOLOR); - end; - -var - Res : TResourceStream; - Count: DWORD; -begin - RegisterMirrorClasses; - // images loading - StyleImages := LoadImagesFromResource(58, 31, IDB_DXPSSCHEDULER_SMALLDESIGNPREVIEW); - StylePreviewImages := LoadImagesFromResource(128, 76, IDB_DXPSSCHEDULER_STYLEDESIGNPREVIEW); - - // font loading - GDI32Lib := LoadLibrary(gdi32); - AddFontMemResource := GetProcAddress(GDI32Lib, 'AddFontMemResourceEx'); - RemoveFontMemResource := GetProcAddress(GDI32Lib, 'RemoveFontMemResourceEx'); - Res := TResourceStream.Create(hInstance, 'SCHEDULERFONT', 'PSSCHEDULERFONT'); - try - if IsWin2KOrLater then - SchedulerFontHandle := AddFontMemResource(Res.Memory, Res.Size, nil, @Count) - else - begin - SchedulerFontFileName := GetFontFolder + '\' + 'dxPScxSchedulerLnk.ttf'; - if not FileExists(SchedulerFontFileName) then - Res.SavetoFile(SchedulerFontFileName); - AddFontResource(PChar(SchedulerFontFileName)); - end; - finally - Res.Free; - end; - SpecialSymbolFont := TFont.Create; - SpecialSymbolFont.Name := 'dxPScxScheduler'; - RegisterReportLinkClasses; -end; - -procedure UnregisterReportLinkClasses; -begin - TcxSchedulerReportSchedulingAreaCell.Unregister; - TcxSchedulerReportNotesAreaCell.Unregister; - TcxSchedulerReportTaskPadCell.Unregister; - TcxSchedulerReportSchedulerHeaderCell.Unregister; - TcxSchedulerReportSchedulerHeaderDataCell.Unregister; - //datenavigator - TcxSchedulerReportDateNavigatorCell.Unregister; - TcxSchedulerReportDateNavigatorHeader.Unregister; - TcxSchedulerReportDateNavigatorDay.Unregister; - TcxSchedulerReportDateNavigatorDayCaption.Unregister; - TcxSchedulerReportDateNavigatorWeekNumber.Unregister; - - //scheduling area items - TcxSchedulerReportContentCell.Unregister; - TcxSchedulerReportHeaderItemCell.Unregister; - TcxSchedulerReportGroupSeparatorCell.Unregister; - TcxSchedulerReportContainerCell.Unregister; - TcxSchedulerReportBackgroundSlotCell.Unregister; - TcxSchedulerReportDailyTimeRulerCellsSite.Unregister; - TcxSchedulerReportDailyTimeRulerCell.Unregister; - TcxSchedulerReportMonthDayCell.Unregister; - - TcxSchedulerReportCellString.Unregister; - TcxSchedulerReportEventCell.Unregister; - TcxSchedulerReportDetailsEventCell.Unregister; - TcxSchedulerReportMemoEventCell.Unregister; - - TcxSchedulerReportTimeLineCell.Unregister; - TcxSchedulerReportTimeLinePart.Unregister; - - TcxSchedulerReportTimeLineMajorScaleCell.Unregister; - TcxSchedulerReportTimeLineMinorScaleCell.Unregister; - - TcxSchedulerReportGanttLinkCell.Unregister; - - TcxSchedulerReportPageSite.Unregister; - - dxPSUnregisterReportLink(TcxSchedulerReportLink, - TcxScheduler, TcxfmSchedulerReportLinkDesignWindow); - UnRegisterClasses([TcxSchedulerReportLinkStyles]); - UnRegisterMirrorClasses; -end; - -procedure FinalizeSchedulerLink; -begin - // images removing - FreeAndNil(StyleImages); - FreeAndNil(StylePreviewImages); - - // font removing - if IsWin2KOrLater then - begin - if SchedulerFontHandle <> 0 then - RemoveFontMemResource(SchedulerFontHandle); - end - else - begin - if RemoveFontResource(PChar(SchedulerFontFileName)) then - DeleteFile(PChar(SchedulerFontFileName)); - end; - - SpecialSymbolFont.Free; - FreeLibrary(GDI32Lib); - - UnregisterReportLinkClasses; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrimaryPageHeadersOnlyClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TcxCheckBox(Sender) do - if ActivePrintStyle is TcxSchedulerReportLinkYearlyPrintStyle then - TcxSchedulerReportLinkYearlyPrintStyle(ActivePrintStyle).PrimaryPageHeadersOnly := Checked - else - if ActivePrintStyle is TcxSchedulerReportLinkTimeLinePrintStyle then - TcxSchedulerReportLinkTimeLinePrintStyle(ActivePrintStyle).PrimaryPageHeadersOnly := Checked; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrimaryPageScalesOnlyClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - TcxSchedulerReportLinkTimeLinePrintStyle(ActivePrintStyle). - PrimaryPageScalesOnly := TcxCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleWorkTimeOnlyClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - TcxSchedulerReportLinkTimeLinePrintStyle(ActivePrintStyle). - WorkTimeOnly := TcxCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleShowResourceImagesClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ActivePrintStyle.ShowResourceImages := TcxCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleShowEventImagesClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ActivePrintStyle.ShowEventImages := TcxCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -initialization - InitializeSchedulerLink; - -finalization - FinalizeSchedulerLink; - -end. - - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3Lnk.res b/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3Lnk.res deleted file mode 100644 index 3008a815..00000000 Binary files a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3Lnk.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3LnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3LnkReg.pas deleted file mode 100644 index 48394b31..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxScheduler3LnkReg.pas +++ /dev/null @@ -1,165 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxScheduler3LnkReg; - -interface - -{$I cxVer.Inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes, TypInfo, cxStyles, cxStyleSheetEditor, dxPSCore, dxPScxScheduler3Lnk; - -const - sdxAllResources = '(All resources)'; - sdxAuto = 'Auto'; - sdxDefault = 'Default'; - sdxTypeDefault = '(Type "Default" to restore original Caption)'; - -{ TcxSchedulerReportLinkActiveStylePropertyEditor } - -type - - TcxSchedulerReportLinkResourceCountPerPagePropertyEditor = class(TIntegerProperty) - public - function GetValue: string; override; - end; - - { TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor } - - TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor = class(TComponentProperty) - private - FComponents: TStringList; - function GetReportLink: TBasedxReportLink; - protected - procedure AddComponent(const AName: string); - procedure GetComponents; virtual; - function IsComponentValid(AComponent: TComponent): Boolean; virtual; - public - destructor Destroy; override; - procedure Initialize; override; - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - property ReportLink: TBasedxReportLink read GetReportLink; - end; - -{ TcxSchedulerReportLinkResourceCountPerPagePropertyEditor } - -function TcxSchedulerReportLinkResourceCountPerPagePropertyEditor.GetValue: string; -begin - Result := inherited GetValue; - if GetOrdValue = 0 then - Result := Result + ' ' + sdxAllResources; -end; - -{ TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor } - -destructor TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.Destroy; -begin - FComponents.Free; - inherited Destroy; -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.Initialize; -begin - inherited; - FComponents := TStringList.Create; -end; - -function TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes - [paMultiSelect]; -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - GetComponents; - for I := 0 to FComponents.Count - 1 do - Proc(FComponents[I]); -end; - -function TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetReportLink: TBasedxReportLink; -begin - Result := TBasedxReportLink(GetComponent(0)); -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.AddComponent(const AName: string); -begin - if IsComponentValid(Designer.GetComponent(AName)) then FComponents.Add(AName); -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetComponents; -begin - FComponents.Clear; - Designer.GetComponentNames(GetTypeData(PTypeInfo(TBasedxReportLink.ClassInfo)), AddComponent); -end; - -function TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.IsComponentValid(AComponent: TComponent): Boolean; -begin - Result := (AComponent <> GetComponent(0)) and TBasedxReportLink(AComponent).Aggregable; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterNoIcon([TcxSchedulerReportLink, TcxSchedulerReportLinkStyleSheet]); - - RegisterPropertyEditor(TypeInfo(Integer), TcxCustomSchedulerReportLinkPrintStyle, - 'ResourceCountPerPage', TcxSchedulerReportLinkResourceCountPerPagePropertyEditor); - RegisterPropertyEditor(TypeInfo(TBasedxReportLink), TcxSchedulerReportLink, - 'TaskPadReportLink', TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor); -end; - -initialization - cxStyles.RegisterStyleSheetClass(TcxSchedulerReportLinkStyleSheet); - -finalization - cxStyles.UnregisterStyleSheetClass(TcxSchedulerReportLinkStyleSheet); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnk.dfm deleted file mode 100644 index 7c04f6f1..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnk.dfm +++ /dev/null @@ -1,1429 +0,0 @@ -object cxfmSchedulerReportLinkDesignWindow: TcxfmSchedulerReportLinkDesignWindow - Left = 138 - Top = 193 - BorderStyle = bsDialog - Caption = 'cxfmSchedulerReportLinkDesignWindow' - ClientHeight = 446 - ClientWidth = 618 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 610 - Height = 404 - ActivePage = tshPrintStyles - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - OnChange = PageControl1Change - object tshPrintRange: TTabSheet - Caption = 'Print Range' - ImageIndex = 3 - object lblPrintRangeStart: TLabel - Left = 17 - Top = 22 - Width = 28 - Height = 13 - Caption = '&Start:' - end - object lblPrintRangeEnd: TLabel - Left = 18 - Top = 54 - Width = 22 - Height = 13 - Caption = '&End:' - end - object lblPrintRangesMiscellaneous: TLabel - Left = 5 - Top = 91 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - Visible = False - end - object Bevel1: TBevel - Left = 80 - Top = 95 - Width = 231 - Height = 4 - Shape = bsBottomLine - Visible = False - end - object dePrintRangeStart: TcxDateEdit - Left = 70 - Top = 18 - Width = 235 - Height = 21 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeStartEditValueChanged - TabOrder = 0 - end - object dePrintRangeEnd: TcxDateEdit - Left = 70 - Top = 50 - Width = 235 - Height = 21 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeEndEditValueChanged - TabOrder = 1 - end - object chbxHideDetailsOfPrivateAppointments: TcxCheckBox - Left = 66 - Top = 113 - Width = 236 - Height = 21 - Caption = 'Hide Details of Private Appointments' - TabOrder = 2 - Visible = False - end - end - object tshPrintStyles: TTabSheet - Caption = 'Print Styles' - object lblPrintStylesOptions: TLabel - Left = 5 - Top = 72 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPrintStyleOptions: TBevel - Left = 50 - Top = 76 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewWindow: TStaticText - Left = 324 - Top = 0 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 0 - end - object cbxPrintStyles: TcxImageComboBox - Left = 6 - Top = 18 - Width = 299 - Height = 21 - Properties.Alignment.Vert = taVCenter - Properties.Items = <> - TabOrder = 1 - OnClick = cbxPrintStylesClick - end - object pcPrintStyleOptions: TPageControl - Left = 4 - Top = 90 - Width = 314 - Height = 284 - ActivePage = tshWeekly - Style = tsButtons - TabOrder = 2 - object tshDaily: TTabSheet - Caption = 'Daily' - TabVisible = False - object lblPrintStyleDailyLayout: TLabel - Left = 14 - Top = 7 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleDailyLayout - end - object lblPrintStyleDailyInclude: TLabel - Left = 14 - Top = 67 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleDailyPrintFrom: TLabel - Left = 14 - Top = 139 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleDailyPrintFrom - end - object lblPrintStyleDailyPrintTo: TLabel - Left = 14 - Top = 168 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleDailyPrintTo - end - object lblPrintStyleDailyResourceCountPerPage: TLabel - Left = 14 - Top = 37 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleDailyResourceCountPerPage - end - object cbxPrintStyleDailyLayout: TcxComboBox - Left = 115 - Top = 2 - Width = 186 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 0 - OnClick = cbxPrintStyleDailyLayoutClick - end - object chbxPrintStyleDailyTaskPad: TcxCheckBox - Left = 111 - Top = 64 - Width = 190 - Height = 21 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleDailyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 85 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleDailyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 106 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - end - object tePrintStyleDailyPrintFrom: TcxTimeEdit - Left = 114 - Top = 135 - Width = 100 - Height = 21 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 5 - end - object tePrintStyleDailyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 164 - Width = 100 - Height = 21 - EditValue = 0.000000000000000000 - Properties.ImmediatePost = True - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 6 - end - object sePrintStyleDailyResourceCountPerPage: TcxSpinEdit - Left = 115 - Top = 33 - Width = 100 - Height = 21 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - end - end - object tshWeekly: TTabSheet - Caption = 'Weekly' - ImageIndex = 1 - TabVisible = False - object lblPrintStyleWeeklyPrintTo: TLabel - Left = 14 - Top = 199 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleWeeklyPrintTo - end - object lblPrintStyleWeeklyPrintFrom: TLabel - Left = 14 - Top = 170 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleWeeklyPrintFrom - end - object lblPrintStyleWeeklyInclude: TLabel - Left = 14 - Top = 97 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleWeeklyLayout: TLabel - Left = 14 - Top = 36 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleWeeklyLayout - end - object lblPrintStyleWeeklyArrange: TLabel - Left = 14 - Top = 7 - Width = 43 - Height = 13 - Caption = '&Arrange:' - FocusControl = cbxPrintStyleWeeklyArrange - end - object lblPrintStyleWeeklyResourceCountPerPage: TLabel - Left = 14 - Top = 67 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleWeeklyResourceCountPerPage - end - object tePrintStyleWeeklyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 194 - Width = 100 - Height = 21 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 7 - end - object tePrintStyleWeeklyPrintFrom: TcxTimeEdit - Left = 114 - Top = 165 - Width = 100 - Height = 21 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 6 - end - object chbxPrintStyleWeeklyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 136 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Lined)' - TabOrder = 5 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleWeeklyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 115 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Blank)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - end - object cbxPrintStyleWeeklyArrange: TcxComboBox - Left = 115 - Top = 2 - Width = 186 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Top to Bottom' - 'Left to Right') - TabOrder = 0 - OnClick = cbxPrintStyleWeeklyArrangeClick - end - object cbxPrintStyleWeeklyLayout: TcxComboBox - Left = 115 - Top = 32 - Width = 186 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 1 - OnClick = cbxPrintStyleWeeklyLayoutClick - end - object chbxPrintStyleWeeklyTaskPad: TcxCheckBox - Left = 111 - Top = 94 - Width = 190 - Height = 21 - Caption = 'TaskPad' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleWeeklyDontPrintWeekends: TcxCheckBox - Left = 9 - Top = 223 - Width = 285 - Height = 21 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 8 - OnClick = chbxPrintStyleWeeklyDontPrintWeekendsClick - end - object sePrintStyleWeeklyResourceCountPerPage: TcxSpinEdit - Tag = 1 - Left = 115 - Top = 63 - Width = 100 - Height = 21 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 2 - end - end - object tshMonthly: TTabSheet - Caption = 'Monthly' - ImageIndex = 2 - TabVisible = False - object lblPrintStyleMonthlyLayout: TLabel - Left = 14 - Top = 7 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleMonthlyLayout - end - object lblPrintStyleMonthlyInclude: TLabel - Left = 14 - Top = 67 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleMonthlyResourceCountPerPage: TLabel - Left = 14 - Top = 37 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleMonthlyResourceCountPerPage - end - object cbxPrintStyleMonthlyLayout: TcxComboBox - Left = 115 - Top = 2 - Width = 186 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/month' - '2 pages/month') - TabOrder = 0 - OnClick = cbxPrintStyleMonthlyLayoutClick - end - object chbxPrintStyleMonthlyTaskPad: TcxCheckBox - Left = 111 - Top = 64 - Width = 190 - Height = 21 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleMonthlyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 85 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleMonthlyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 106 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleMonthlyDontPrintWeekends: TcxCheckBox - Left = 9 - Top = 144 - Width = 285 - Height = 21 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 5 - OnClick = chbxPrintStyleMonthlyDontPrintWeekendsClick - end - object chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage: TcxCheckBox - Left = 9 - Top = 167 - Width = 285 - Height = 21 - Caption = 'Print Exactly One Month Per Page' - TabOrder = 6 - OnClick = chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick - end - object sePrintStyleMonthlyResourceCountPerPage: TcxSpinEdit - Tag = 2 - Left = 115 - Top = 33 - Width = 100 - Height = 21 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - end - end - object tshTrifold: TTabSheet - Caption = 'Tri-fold' - ImageIndex = 3 - TabVisible = False - object lblPrintStyleTrifoldSectionLeft: TLabel - Left = 14 - Top = 7 - Width = 61 - Height = 13 - Caption = '&Left Section:' - FocusControl = cbxPrintStyleTrifoldSectionLeft - end - object lblPrintStyleTrifoldSectionMiddle: TLabel - Left = 14 - Top = 41 - Width = 72 - Height = 13 - Caption = '&Middle Section:' - FocusControl = cbxPrintStyleTrifoldSectionMiddle - end - object lblPrintStyleTrifoldSectionRight: TLabel - Left = 14 - Top = 74 - Width = 67 - Height = 13 - Caption = '&Right Section:' - FocusControl = cbxPrintStyleTrifoldSectionRight - end - object cbxPrintStyleTrifoldSectionLeft: TcxComboBox - Left = 100 - Top = 2 - Width = 200 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 0 - OnClick = cbxPrintStyleTrifoldSectionModeClick - end - object cbxPrintStyleTrifoldSectionMiddle: TcxComboBox - Tag = 1 - Left = 100 - Top = 36 - Width = 200 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 1 - OnClick = cbxPrintStyleTrifoldSectionModeClick - end - object cbxPrintStyleTrifoldSectionRight: TcxComboBox - Tag = 2 - Left = 100 - Top = 69 - Width = 200 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 2 - OnClick = cbxPrintStyleTrifoldSectionModeClick - end - end - object tshDetails: TTabSheet - Caption = 'Details' - ImageIndex = 4 - TabVisible = False - object chbxPrintStyleDetailsUsePagination: TcxCheckBox - Left = 14 - Top = 3 - Width = 187 - Height = 21 - Caption = 'Start a New Page Each:' - TabOrder = 0 - OnClick = chbxPrintStyleDetailsUsePaginationClick - end - object cbxPrintStyleDetailsPagination: TcxComboBox - Left = 203 - Top = 2 - Width = 97 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Day' - 'Week' - 'Month') - TabOrder = 1 - OnClick = cbxPrintStyleDetailsPaginationClick - end - end - object tshMemo: TTabSheet - Caption = 'Memo' - ImageIndex = 5 - TabVisible = False - object chbxPrintStyleMemoStartEachItemOnNewPage: TcxCheckBox - Left = 14 - Top = 3 - Width = 187 - Height = 21 - Caption = 'Start Each Item On New Page' - TabOrder = 0 - OnClick = chbxPrintStyleMemoStartEachItemOnNewPageClick - end - object chbxPrintStyleMemoPrintOnlySelectedEvents: TcxCheckBox - Left = 14 - Top = 27 - Width = 187 - Height = 21 - Caption = 'Print Only Selected Events' - State = cbsChecked - TabOrder = 1 - OnClick = chbxPrintStyleMemoPrintOnlySelectedEventsClick - end - end - end - object pnlPrintStylesPreview: TPanel - Left = 323 - Top = 17 - Width = 275 - Height = 356 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 3 - object pbxPrintStylesPreview: TPaintBox - Left = 1 - Top = 1 - Width = 273 - Height = 354 - Align = alClient - OnPaint = pbxPrintStylesPreviewPaint - end - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 2 - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF78888877787807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0888877787878888877787807DDDDDDDDDDDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF0DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 75 - Top = 82 - Width = 236 - Height = 4 - Shape = bsBottomLine - end - object imgRefinements: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FAFAFAFAFA788888777CC807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0AFAFAFAFAF78888888888807DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0AFAFAFAFAF7FAFAFAFAFAF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FEFEFEFEFE7EFEFEFEFEFE07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0EFEFEFEFEF7FEFEFEFEFEF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0EFEFEFEFEF7FEFEFEFEFEF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FEFEFEFEFE7EFEFEFEFEFE07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FBFBFBFBFB7BFBFBFBFBFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FBFBFBFBFB7BFBFBFBFBFB07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDDDDDDDDDDD088887778787888887778 - 7807D088888888887888888888880DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TcxComboBox - Left = 90 - Top = 37 - Width = 215 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.OnChange = cbxLookAndFeelPropertiesChange - TabOrder = 0 - OnClick = LookAndFeelChange - end - object chbxSuppressBackgroundBitmaps: TcxCheckBox - Tag = 1 - Left = 90 - Top = 104 - Width = 200 - Height = 21 - Caption = 'Suppress Background Textures' - TabOrder = 1 - OnClick = OptionsFormattingClick - end - object chbxSuppressContentColoration: TcxCheckBox - Tag = 2 - Left = 90 - Top = 130 - Width = 200 - Height = 21 - Caption = 'Suppress Content Coloration' - TabOrder = 2 - OnClick = OptionsFormattingClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 1 - object bvlStyles: TBevel - Left = 118 - Top = 13 - Width = 193 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 302 - Width = 239 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 298 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 222 - end - object Label1: TLabel - Left = 85 - Top = 140 - Width = 64 - Height = 13 - Caption = '[ Styles Site ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 0 - OnClick = btnStyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = btnStyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 2 - OnClick = btnStyleBackgroundBitmapClick - end - object cbxStyleSheets: TcxComboBox - Left = 6 - Top = 318 - Width = 305 - Height = 24 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 20 - Properties.OnDrawItem = cbxStyleSheetsPropertiesDrawItem - TabOrder = 3 - OnClick = cbxStyleSheetsClick - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 350 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 4 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 84 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 5 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 162 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 6 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 7 - OnClick = btnStylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 240 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 8 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 9 - OnClick = btnStyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 10 - OnClick = btnStyleRestoreDefaultsClick - end - object chbxUseNativeStyles: TcxCheckBox - Left = 3 - Top = 6 - Width = 22 - Height = 21 - TabOrder = 11 - OnClick = OptionsFormattingClick - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 46 - Width = 275 - Height = 356 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object pbPreview: TPaintBox - Left = 1 - Top = 1 - Width = 273 - Height = 354 - Align = alClient - OnPaint = pbPreviewPaint - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 6 - Top = 417 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = btnStyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = btnStyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = btnStyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = btnStyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = btnStyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = btnStylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 34 - Top = 417 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxEditStyleController1: TcxEditStyleController - OnStyleChanged = StyleController1StyleChanged - Left = 64 - Top = 416 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnk.pas deleted file mode 100644 index 23c3f115..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnk.pas +++ /dev/null @@ -1,9871 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxSchedulerLnk; - -{$I cxVer.Inc} - -interface - -uses - Windows, Classes, SysUtils, Forms, Graphics, Controls, StdCtrls, ExtCtrls, ComCtrls, - ImgList, Menus, cxGraphics, cxClasses, cxControls, cxStyles, cxLookAndFeels, cxLookAndFeelPainters, - cxScheduler, cxEdit, cxContainer, cxTextEdit, cxMaskEdit, cxDropDownEdit, - cxCalendar, cxCheckBox, cxImageComboBox, cxTimeEdit, cxSpinEdit, cxDateUtils, - dxPSCore, dxPSGlbl, dxExtCtrls, dxPScxCommon, dxPrevw, dxPgsdlg, dxPrnPg, cxSchedulerUtils, - cxSchedulerStorage, cxSchedulerCustomControls, cxSchedulerCustomResourceView, - cxSchedulerDayView, cxSchedulerDateNavigator, cxSchedulerWeekView, cxGeometry, - dxCore, cxDrawTextUtils; - -const - // visual print style indexes - - vspsSchedulerFirst = 0; - - vspsSchedulerControlFirst = vspsSchedulerFirst + 0; - vspsSchedulerContent = vspsSchedulerControlFirst + 0; - vspsSchedulerDayHeader = vspsSchedulerControlFirst + 1; - vspsSchedulerEvent = vspsSchedulerControlFirst + 2; - vspsSchedulerResourceHeader = vspsSchedulerControlFirst + 3; - vspsSchedulerControlLast = vspsSchedulerControlFirst + 3; - - vspsSchedulerViewDayFirst = vspsSchedulerControlLast + 1; - vspsSchedulerTimeRuler = vspsSchedulerViewDayFirst + 0; - vspsSchedulerViewDayLast = vspsSchedulerViewDayFirst + 0; - - vspsSchedulerDateNavigatorFirst = vspsSchedulerViewDayLast + 1; - vspsSchedulerDateNavigatorContent = vspsSchedulerDateNavigatorFirst + 0; - vspsSchedulerDateNavigatorHeader = vspsSchedulerDateNavigatorFirst + 1; - vspsSchedulerDateNavigatorLast = vspsSchedulerDateNavigatorFirst + 1; - - vspsSchedulerNativeFirst = vspsSchedulerDateNavigatorLast + 1; - vspsSchedulerSchedulerHeader = vspsSchedulerNativeFirst + 0; - vspsSchedulerNotesAreaBlank = vspsSchedulerNativeFirst + 1; - vspsSchedulerNotesAreaLined = vspsSchedulerNativeFirst + 2; - vspsSchedulerTaskPad = vspsSchedulerNativeFirst + 3; - vspsSchedulerNativeLast = vspsSchedulerNativeFirst + 3; - - vspsSchedulerLast = vspsSchedulerNativeLast; - - // custom draw ID's - cdidSchedulerFirst = 1; - cdidSchedulerSchedulerHeader = cdidSchedulerFirst + 0; - cdidSchedulerDateNavigatorHeader = cdidSchedulerFirst + 1; - cdidSchedulerDateNavigatorDay = cdidSchedulerFirst + 2; - cdidSchedulerDateNavigatorDayCaption = cdidSchedulerFirst + 3; - cdidSchedulerDateNavigatorWeekNumber = cdidSchedulerFirst + 4; - cdidSchedulerTimeRuler = cdidSchedulerFirst + 5; - cdidSchedulerNotesArea = cdidSchedulerFirst + 6; - cdidSchedulerTaskPad = cdidSchedulerFirst + 7; - cdidSchedulerContent = cdidSchedulerFirst + 8; - cdidSchedulerHeader = cdidSchedulerFirst + 9; - // keep order - cdidSchedulerEventCaption = cdidSchedulerFirst + 10; - cdidSchedulerEventStart = cdidSchedulerFirst + 11; - cdidSchedulerEventFinish = cdidSchedulerFirst + 12; - cdidSchedulerEventIcons = cdidSchedulerFirst + 13; - cdidSchedulerEventMessage = cdidSchedulerFirst + 14; - cdidSchedulerEventTimeLine = cdidSchedulerFirst + 15; - - InterAreaSpace = 5; - NotesAreaWidth = 1 / 3; - SchedulerHeaderMinHeight = 1 / 10; - SchedulerHeaderMaxHeight = 1 / 4; - SchedulerHeaderSmallHeight = 1 / 18; - -type - TcxSchedulerReportItemsType = (srSchedulingArea, srHeader, srDateNavigator, - srNotesBlank, srNotesLined, srTaskPad, srUnknownItem); - TcxSchedulerReportEventPartType = (epCaption, epStart, epFinish, epIcons, - epMessage, epTimeLine); - - TcxfmSchedulerReportLinkDesignWindow = class; - - TcxSchedulerReportLink = class; - TcxCustomSchedulerReportLinkPrintStyle = class; - TcxCustomSchedulerReportLinkPrintStyleClass = class of TcxCustomSchedulerReportLinkPrintStyle; - - TcxSchedulerReportLinkPrintStyles = class; - TcxSchedulerReportPageItemCell = class; - TcxSchedulerReportPageSite = class; - TcxSchedulerReportSchedulingAreaCell = class; - TcxSchedulerReportSchedulerHeaderCell = class; - TcxSchedulerReportDateNavigatorCell = class; - TcxSchedulerReportNotesAreaCell = class; - TcxSchedulerReportTaskPadCell = class; - - TcxSchedulerReportCustomCell = class; - TcxSchedulerReportCustomCellClass = class of TcxSchedulerReportCustomCell; - TcxSchedulerReportCommonCellsProducer = class; - - // for options - TcxCustomSchedulerReportLinkOptions = class; - TcxSchedulerReportDateNavigatorHeader = class; - TcxSchedulerReportDateNavigatorDay = class; - TcxSchedulerReportDateNavigatorDayCaption = class; - TcxSchedulerReportDateNavigatorWeekNumber = class; - TcxSchedulerReportDailyTimeRulerCell = class; - TcxSchedulerReportContentCell = class; - TcxSchedulerReportCustomEventCell = class; - TcxSchedulerReportSchedulerHeaderDataCell = class; - TcxSchedulerReportNotesDataCell = class; - TcxSchedulerReportHeaderItemCell = class; - TcxSchedulerReportDetailsEventCell = class; - TcxSchedulerReportDetailsEventCellClass = class of TcxSchedulerReportDetailsEventCell; - - { TcxCustomSchedulerReportLinkOptions } - - TcxCustomSchedulerReportLinkOptions = class(TdxCustomReportLinkOptions) - private - function GetReportLink: TcxSchedulerReportLink; - function GetScheduler: TcxScheduler; - public - property ReportLink: TcxSchedulerReportLink read GetReportLink; - property Scheduler: TcxScheduler read GetScheduler; - end; - - { TcxSchedulerReportLinkPrintRange } - - TcxSchedulerReportLinkPrintRange = class(TcxCustomSchedulerReportLinkOptions) - private - FDatePrint: array[0..1] of TDate; - FTimePrint: array[0..1] of TTime; - function GetActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetDayCount: Integer; - function GetMonthCount: Integer; - function GetPrintDate(AIndex: Integer): TDate; - function GetPrintTime(AIndex: Integer): TTime; - function GetWeekCount: Integer; - procedure SetPrintDate(AIndex: Integer; const Value: TDate); - procedure SetPrintTime(AIndex: Integer; const Value: TTime); - - function IsDateStored(AIndex: Integer): Boolean; - function IsTimeStored(AIndex: Integer): Boolean; - protected - procedure CheckTimeRange; virtual; - function GetDateTimeIF(const AValue, ADefaultValue: TDateTime): TDateTime; - - function DesignerTabIndex: Integer; override; - property ActiveStyle: TcxCustomSchedulerReportLinkPrintStyle read GetActiveStyle; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function DefaultDatePrintFrom: TDate; virtual; - function DefaultDatePrintTo: TDate; virtual; - function DefaultTimePrintFrom: TTime; virtual; - function DefaultTimePrintTo: TTime; virtual; - - property DayCount: Integer read GetDayCount; - property MonthCount: Integer read GetMonthCount; - property WeekCount: Integer read GetWeekCount; - published - property PrintFrom: TDate index 0 read GetPrintDate write SetPrintDate stored IsDateStored; - property PrintTo: TDate index 1 read GetPrintDate write SetPrintDate stored IsDateStored; - property TimePrintFrom: TTime index 0 read GetPrintTime write SetPrintTime stored IsTimeStored; - property TimePrintTo: TTime index 1 read GetPrintTime write SetPrintTime stored IsTimeStored; - end; - - { TcxSchedulerReportLinkOptionsFormatting } - - TcxSchedulerReportLinkOptionsFormatting = class(TdxCustomReportLinkOptionsFormatting) - private - FSuppressContentColoration: Boolean; - function GetReportLink: TcxSchedulerReportLink; - procedure SetSuppressContentColoration(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - property ReportLink: TcxSchedulerReportLink read GetReportLink; - published - property SuppressContentColoration: Boolean read FSuppressContentColoration write SetSuppressContentColoration default False; - property UseLookAndFeelColors; - end; - - { TcxSchedulerReportLinkStyles } - - TcxSchedulerReportLinkStyles = class(TdxCustomReportLinkStyles, IcxSchedulerStylesAdapter, IcxSchedulerTimeRulerParams) - private - function GetExtStyles: TcxSchedulerStyles; - function GetReportLink: TcxSchedulerReportLink; - function GetUseSchedulerStyles: Boolean; - protected - FReportLink: TcxSchedulerReportLink; - function DesignerTabIndex: Integer; override; - - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - class function GetStyleCaption(AnIndex: Integer): string; override; - function GetStyleIndexByCaption(const Caption: string): Integer; override; - - // IcxSchedulerStylesAdapter - function GetDayHeaderStyle: TcxStyle; - function GetResourceHeaderStyle: TcxStyle; - - property ExtStyles: TcxSchedulerStyles read GetExtStyles; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - - function GetSchedulerHeaderParams: TcxViewParams; virtual; - function GetContentParams(const ADateTime: TDateTime; - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; overload; virtual; - function GetContentParams(const ADateTime: TDateTime; ALightColor: Boolean; - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; overload; virtual; - function GetDateNavigatorContentParams: TcxViewParams; virtual; - function GetDateNavigatorHeaderParams: TcxViewParams; virtual; - function GetDayHeaderParams(const ADateTime: TDateTime): TcxViewParams; virtual; - function GetEventParams(AEvent: TcxSchedulerEvent): TcxViewParams; virtual; - function GetNotesAreaBlankParams: TcxViewParams; virtual; - function GetNotesAreaLinedParams: TcxViewParams; virtual; - function GetResourceHeaderParams(AResource: TcxSchedulerStorageResourceItem): TcxViewParams; virtual; - function GetTaskPadParams: TcxViewParams; virtual; - function GetTimeRulerParams: TcxViewParams; virtual; - - property UseSchedulerStyles: Boolean read GetUseSchedulerStyles; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - published - property SchedulerHeader: TcxStyle Index vspsSchedulerSchedulerHeader read GetValue write SetValue; - property Content: TcxStyle Index vspsSchedulerContent read GetValue write SetValue; - property DateNavigatorContent: TcxStyle Index vspsSchedulerDateNavigatorContent read GetValue write SetValue; - property DateNavigatorHeader: TcxStyle Index vspsSchedulerDateNavigatorHeader read GetValue write SetValue; - property DayHeader: TcxStyle Index vspsSchedulerDayHeader read GetValue write SetValue; - property Event: TcxStyle Index vspsSchedulerEvent read GetValue write SetValue; - property ResourceHeader: TcxStyle Index vspsSchedulerResourceHeader read GetValue write SetValue; - property NotesAreaBlank: TcxStyle Index vspsSchedulerNotesAreaBlank read GetValue write SetValue; - property NotesAreaLined: TcxStyle Index vspsSchedulerNotesAreaLined read GetValue write SetValue; - property TaskPad: TcxStyle Index vspsSchedulerTaskPad read GetValue write SetValue; - property TimeRuler: TcxStyle Index vspsSchedulerTimeRuler read GetValue write SetValue; - - property StyleSheet; - end; - - TcxSchedulerReportLinkStyleSheet = class(TdxCustomReportLinkStyleSheet) - private - function GetStylesValue: TcxSchedulerReportLinkStyles; - procedure SetStylesValue(Value: TcxSchedulerReportLinkStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TcxSchedulerReportLinkStyles read GetStylesValue write SetStylesValue; - end; - - { TcxSchedulerReportLinkRenderInfo } - - TcxSchedulerReportLinkRenderInfo = class(TdxPSReportRenderInfo) - private - function GetReportLink: TcxSchedulerReportLink; - protected - Rendering: Boolean; - FPageColCount: Integer; - FPageRowCount: Integer; - procedure DoCalculate; override; - function GetPageColCount: Integer; override; - function GetPageRowCount: Integer; override; - function IsLoading: Boolean; - public - function IsDrawPageTitleOnPage(APageIndex: Integer): Boolean; override; - function IsDrawReportTitleOnPage(APageIndex: Integer): Boolean; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - end; - - { TcxSchedulerReportRenderer } - - TcxSchedulerReportRenderer = class(TdxPSReportRenderer) - public - procedure PrepareRenderPage; override; - procedure UnprepareRenderPage; override; - end; - - { TcxSchedulerReportLink } - TcxSchedulerReportLinkCanPrintEventEvent = procedure(Sender: TcxSchedulerReportLink; - AEvent: TcxSchedulerEvent; var AllowPrint: Boolean) of object; - - { Initilization Events } - - TcxSchedulerReportLinkInitializeSchedulerHeaderEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportSchedulerHeaderCell) of object; - TcxSchedulerReportLinkInitializeSchedulingAreaEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportSchedulingAreaCell) of object; - TcxSchedulerReportLinkInitializeNotesEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportNotesAreaCell) of object; - TcxSchedulerReportLinkInitializeTaskPadEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportTaskPadCell) of object; - TcxSchedulerReportLinkInitializeEventCellEvent = procedure( - Sender: TcxSchedulerReportLink; AItem: TcxSchedulerReportCustomEventCell) of object; - - { CustomDraw Events } - - TcxSchedulerReportLinkCustomDrawSchedulerHeaderCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportSchedulerHeaderDataCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorHeaderCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorHeader; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorDayCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDay; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorDayCaptionCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDayCaption; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawDateNavigatorWeekNumberCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorWeekNumber; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawTimeRulerCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportDailyTimeRulerCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawNotesCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawContentCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportContentCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawHeaderCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TcxSchedulerReportHeaderItemCell; var ADone: Boolean) of object; - TcxSchedulerReportLinkCustomDrawEventPartCellEvent = procedure(Sender: TcxSchedulerReportLink; - ACanvas: TCanvas; AItem: TAbstractdxReportCellData; - APart: TcxSchedulerReportEventPartType; var ADone: Boolean) of object; - - TcxSchedulerReportLink = class(TdxCustomcxControlReportLink, IdxReportLinkController) - private - FLinkInPreviewMode: Boolean; - FLookAndFeelItems: TList; - FPageSites: TList; - FPrintRange: TcxSchedulerReportLinkPrintRange; - FPrintStyles: TcxSchedulerReportLinkPrintStyles; - FTaskPadReportLink: TBasedxReportLink; - FOnActivePrintStyleChanged: TNotifyEvent; - FOnCanPrintEvent: TcxSchedulerReportLinkCanPrintEventEvent; - - FOnCustomDrawSchedulerHeaderCell: TcxSchedulerReportLinkCustomDrawSchedulerHeaderCellEvent; - FOnCustomDrawDateNavigatorHeaderCell: TcxSchedulerReportLinkCustomDrawDateNavigatorHeaderCellEvent; - FOnCustomDrawDateNavigatorDayCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCellEvent; - FOnCustomDrawDateNavigatorDayCaptionCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCaptionCellEvent; - FOnCustomDrawDateNavigatorWeekNumberCell: TcxSchedulerReportLinkCustomDrawDateNavigatorWeekNumberCellEvent; - FOnCustomDrawTimeRulerCell: TcxSchedulerReportLinkCustomDrawTimeRulerCellEvent; - FOnCustomDrawContentCell: TcxSchedulerReportLinkCustomDrawContentCellEvent; - FOnCustomDrawHeaderCell: TcxSchedulerReportLinkCustomDrawHeaderCellEvent; - FOnCustomDrawEventPartCell: TcxSchedulerReportLinkCustomDrawEventPartCellEvent; - FOnCustomDrawNotesCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent; - FOnCustomDrawTaskPadCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent; - - FOnInitializeSchedulingAreaCell: TcxSchedulerReportLinkInitializeSchedulingAreaEvent; - FOnInitializeEventCell: TcxSchedulerReportLinkInitializeEventCellEvent; - FOnInitializeHeaderPrimaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent; - FOnInitializeHeaderSecondaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent; - FOnInitializeNotesAreaCell: TcxSchedulerReportLinkInitializeNotesEvent; - FOnInitializeTaskPadCell: TcxSchedulerReportLinkInitializeTaskPadEvent; - function GetActiveStyles: TcxSchedulerReportLinkStyles; - function GetDesignWindow: TcxfmSchedulerReportLinkDesignWindow; - function GetEdgeMode: TdxCellEdgeMode; - function GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; - function GetLookAndFeelItemCount: Integer; - function GetOptionsFormatting: TcxSchedulerReportLinkOptionsFormatting; - function GetPrintStyles: TcxSchedulerReportLinkPrintStyles; - function GetRenderInfo: TcxSchedulerReportLinkRenderInfo; - function GetScheduler: TcxScheduler; - function GetStyles: TcxSchedulerReportLinkStyles; - procedure SetOptionsFormatting(Value: TcxSchedulerReportLinkOptionsFormatting); - procedure SetPrintRange(Value: TcxSchedulerReportLinkPrintRange); - procedure SetPrintStyles(Value: TcxSchedulerReportLinkPrintStyles); - procedure SetStyles(Value: TcxSchedulerReportLinkStyles); - procedure SetTaskPadReportLink(Value: TBasedxReportLink); - - protected - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - { IdxReportLinkController } - function GetControlSiteBounds(AControl: TControl): TRect; virtual; - - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure DoCreateReport; override; - - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - - procedure DoCanPrintEvent(AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); virtual; - - procedure DoCustomDrawSchedulerHeaderCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportSchedulerHeaderDataCell; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorHeaderCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorHeader; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorDayCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorDay; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorDayCaptionCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorDayCaption; var ADone: Boolean); virtual; - procedure DoCustomDrawDateNavigatorWeekNumberCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDateNavigatorWeekNumber; var ADone: Boolean); virtual; - procedure DoCustomDrawTimeRulerCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportDailyTimeRulerCell; var ADone: Boolean); virtual; - procedure DoCustomDrawContentCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportContentCell; var ADone: Boolean); virtual; - procedure DoCustomDrawHeaderCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportHeaderItemCell; var ADone: Boolean); virtual; - procedure DoCustomDrawEventPartCell(ACanvas: TCanvas; - AItem: TAbstractdxReportCellData; var ADone: Boolean); virtual; - procedure DoCustomDrawNotesCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); virtual; - procedure DoCustomDrawTaskPadCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); virtual; - - function GetRealScaleFactor: Integer; override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - function GetRendererClass: TdxPSReportRendererClass; override; - function GetRenderInfoClass: TdxPSReportRenderInfoClass; override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - procedure PrepareConstruct; override; - procedure UnprepareConstruct; override; - - procedure CreateOptions; override; - procedure DestroyOptions; override; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; override; - - function CreatePrintRange: TcxSchedulerReportLinkPrintRange; virtual; - function CreatePrintStyles: TcxSchedulerReportLinkPrintStyles; virtual; - - function GetAreNativeStylesAvailable: Boolean; override; - function GetStylesClass: TdxCustomReportLinkStylesClass; override; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; override; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; override; - - procedure ActivePrintStyleChanged; virtual; - procedure DoActivePrintStyleChanged; virtual; - - procedure FormatLookAndFeelItems; - procedure RegisterLookAndFeelItem(AItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); - - procedure DoInitializeSchedulingAreaCell(AItem: TcxSchedulerReportSchedulingAreaCell); virtual; - procedure DoInitializeEventCell(AItem: TcxSchedulerReportCustomEventCell); virtual; - procedure DoInitializeHeaderPrimaryCell(AItem: TcxSchedulerReportSchedulerHeaderCell); virtual; - procedure DoInitializeHeaderSecondaryCell(AItem: TcxSchedulerReportSchedulerHeaderCell); virtual; - procedure DoInitializeNotesAreaCell(AItem: TcxSchedulerReportNotesAreaCell); virtual; - procedure DoInitializeTaskPadCell(AItem: TcxSchedulerReportTaskPadCell); virtual; - - procedure AssignTaskPadData(ATaskPad: TcxSchedulerReportTaskPadCell); - procedure InitializeTaskPadCell(ATaskPad: TcxSchedulerReportTaskPadCell); virtual; - - procedure SetCellViewParams(ACell: TdxReportVisualItem; const AParams: TcxViewParams); overload; - procedure SetCellViewParams(ACell: TdxReportVisualItem; const AParams: TdxReportItemViewParams); overload; - - function AddPageSite(const ABounds: TRect): TcxSchedulerReportPageSite; - procedure BuildStyle; virtual; - - property ActiveStyles: TcxSchedulerReportLinkStyles read GetActiveStyles; - - property EdgeMode: TdxCellEdgeMode read GetEdgeMode; - property LinkInPreviewMode: Boolean read FLinkInPreviewMode write FLinkInPreviewMode; - property LookAndFeelItemCount: Integer read GetLookAndFeelItemCount; - property LookAndFeelItems[Index: Integer]: TdxReportVisualItem read GetLookAndFeelItem; - property PageSites: TList read FPageSites; - property RenderInfo: TcxSchedulerReportLinkRenderInfo read GetRenderInfo; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - class function Aggregable: Boolean; override; - procedure RebuildReport; override; - - property DesignWindow: TcxfmSchedulerReportLinkDesignWindow read GetDesignWindow; - property Scheduler: TcxScheduler read GetScheduler; - - published - property Color; - property Font; - - property OptionsFormatting: TcxSchedulerReportLinkOptionsFormatting read GetOptionsFormatting write SetOptionsFormatting; - property PrintRange: TcxSchedulerReportLinkPrintRange read FPrintRange write SetPrintRange; - property PrintStyles: TcxSchedulerReportLinkPrintStyles read GetPrintStyles write SetPrintStyles; - property ScaleFonts; - property StyleRepository; - property Styles: TcxSchedulerReportLinkStyles read GetStyles write SetStyles; - property SupportedCustomDraw; - property TaskPadReportLink: TBasedxReportLink read FTaskPadReportLink write SetTaskPadReportLink; - - property OnActivePrintStyleChanged: TNotifyEvent read FOnActivePrintStyleChanged write FOnActivePrintStyleChanged; - property OnCanPrintEvent: TcxSchedulerReportLinkCanPrintEventEvent read FOnCanPrintEvent write FOnCanPrintEvent; - - property OnCustomDrawSchedulerHeaderCell: TcxSchedulerReportLinkCustomDrawSchedulerHeaderCellEvent - read FOnCustomDrawSchedulerHeaderCell write FOnCustomDrawSchedulerHeaderCell; - property OnCustomDrawDateNavigatorHeaderCell: TcxSchedulerReportLinkCustomDrawDateNavigatorHeaderCellEvent - read FOnCustomDrawDateNavigatorHeaderCell write FOnCustomDrawDateNavigatorHeaderCell; - property OnCustomDrawDateNavigatorDayCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCellEvent - read FOnCustomDrawDateNavigatorDayCell write FOnCustomDrawDateNavigatorDayCell; - property OnCustomDrawDateNavigatorDayCaptionCell: TcxSchedulerReportLinkCustomDrawDateNavigatorDayCaptionCellEvent - read FOnCustomDrawDateNavigatorDayCaptionCell write FOnCustomDrawDateNavigatorDayCaptionCell; - property OnCustomDrawDateNavigatorWeekNumberCell: TcxSchedulerReportLinkCustomDrawDateNavigatorWeekNumberCellEvent - read FOnCustomDrawDateNavigatorWeekNumberCell write FOnCustomDrawDateNavigatorWeekNumberCell; - property OnCustomDrawTimeRulerCell: TcxSchedulerReportLinkCustomDrawTimeRulerCellEvent - read FOnCustomDrawTimeRulerCell write FOnCustomDrawTimeRulerCell; - property OnCustomDrawContentCell: TcxSchedulerReportLinkCustomDrawContentCellEvent - read FOnCustomDrawContentCell write FOnCustomDrawContentCell; - property OnCustomDrawHeaderCell: TcxSchedulerReportLinkCustomDrawHeaderCellEvent - read FOnCustomDrawHeaderCell write FOnCustomDrawHeaderCell; - property OnCustomDrawEventPartCell: TcxSchedulerReportLinkCustomDrawEventPartCellEvent - read FOnCustomDrawEventPartCell write FOnCustomDrawEventPartCell; - property OnCustomDrawNotesCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent - read FOnCustomDrawNotesCell write FOnCustomDrawNotesCell; - property OnCustomDrawTaskPadCell: TcxSchedulerReportLinkCustomDrawNotesCellEvent - read FOnCustomDrawTaskPadCell write FOnCustomDrawTaskPadCell; - - property OnInitializeSchedulingAreaCell: TcxSchedulerReportLinkInitializeSchedulingAreaEvent - read FOnInitializeSchedulingAreaCell write FOnInitializeSchedulingAreaCell; - property OnInitializeEventCell: TcxSchedulerReportLinkInitializeEventCellEvent - read FOnInitializeEventCell write FOnInitializeEventCell; - property OnInitializeHeaderPrimaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent - read FOnInitializeHeaderPrimaryCell write FOnInitializeHeaderPrimaryCell; - property OnInitializeHeaderSecondaryCell: TcxSchedulerReportLinkInitializeSchedulerHeaderEvent - read FOnInitializeHeaderSecondaryCell write FOnInitializeHeaderSecondaryCell; - property OnInitializeNotesAreaCell: TcxSchedulerReportLinkInitializeNotesEvent - read FOnInitializeNotesAreaCell write FOnInitializeNotesAreaCell; - property OnInitializeTaskPadCell: TcxSchedulerReportLinkInitializeTaskPadEvent - read FOnInitializeTaskPadCell write FOnInitializeTaskPadCell; - end; - - { TcxCustomSchedulerReportLinkPrintStyle } - - TcxSchedulerReportLinkPeriodicPrintStyleLayout = (pslOnePage, pslTwoPages); - - TcxCustomSchedulerReportLinkPrintStyle = class(TPersistent, - IUnknown, IdxPSCellParams, IdxPSCellParams2) - private - FBoldedDays: TcxSchedulerDateList; - FCaption: string; - FCompressWeekends: Boolean; - FDontPrintWeekends: Boolean; - FEvents: TcxSchedulerCachedEventList; - FLayout: TcxSchedulerReportLinkPeriodicPrintStyleLayout; - FPagesPerPeriod: Integer; - FResourceCountPerPage: Integer; - FShowNotesAreaBlank: Boolean; - FShowNotesAreaLined: Boolean; - FShowTaskPad: Boolean; - FStyles: TcxSchedulerReportLinkPrintStyles; - FUsedDays: TcxSchedulerDateList; - function GetActive: Boolean; - function GetHasAdditionalArea: Boolean; - function GetIndex: Integer; - function GetPageSite(AIndex: Integer): TcxSchedulerReportPageSite; - function GetPeriodCount: Integer; - function GetPrintRange: TcxSchedulerReportLinkPrintRange; - function GetReportLink: TcxSchedulerReportLink; - function GetResourceCount: Integer; - function GetScheduler: TcxScheduler; - function GetStorage: TcxCustomSchedulerStorage; - function GetTimePrintFrom: TTime; - function GetTimePrintTo: TTime; - function GetVisualStyles: TcxSchedulerReportLinkStyles; - function IsCaptionStored: Boolean; - function IsLayoutStored: Boolean; - function IsShowNotesAreaBlankStored: Boolean; - function IsActiveStored: Boolean; - procedure SetActive(Value: Boolean); - procedure SetCaption(const Value: string); - procedure SetCompressWeekends(Value: Boolean); - procedure SetDontPrintWeekends(Value: Boolean); - procedure SetLayout(Value: TcxSchedulerReportLinkPeriodicPrintStyleLayout); - procedure SetResourceCountPerPage(Value: Integer); - procedure SetShowNotesAreaBlank(Value: Boolean); - procedure SetShowNotesAreaLined(Value: Boolean); - procedure SetShowTaskPad(Value: Boolean); - procedure SetTimePrintFrom(Value: TTime); - procedure SetTimePrintTo(Value: TTime); - protected - CurrentDate: TDateTime; - { IUnknown } - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - { IdxReportLinkController } - function GetControlSiteBounds(AControl: TControl): TRect; virtual; - { IdxPSCellParams } - function IdxPSCellParams.GetAutoHeight = IdxPSCellParams_GetAutoHeight; - function IdxPSCellParams.GetDC = IdxPSCellParams_GetDC; - function IdxPSCellParams.GetDisplayGraphicsAsText = IdxPSCellParams_GetDisplayGraphicsAsText; - function IdxPSCellParams.GetEndEllipsis = IdxPSCellParams_GetEndEllipsis; - function IdxPSCellParams.GetFlatCheckMarks = IdxPSCellParams_GetFlatCheckMarks; - function IdxPSCellParams.GetGraphicsText = IdxPSCellParams_GetGraphicsText; - function IdxPSCellParams.GetMultiline = IdxPSCellParams_GetMultiline; - function IdxPSCellParams.GetTransparentGraphics = IdxPSCellParams_GetTransparentGraphics; - function IdxPSCellParams_GetAutoHeight: Boolean; virtual; - function IdxPSCellParams_GetDC: HDC; virtual; - function IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; virtual; - function IdxPSCellParams_GetEndEllipsis: Boolean; virtual; - function IdxPSCellParams_GetFlatCheckMarks: Boolean; virtual; - function IdxPSCellParams_GetGraphicsText: string; virtual; - function IdxPSCellParams_GetMultiline: Boolean; virtual; - function IdxPSCellParams_GetTransparentGraphics: Boolean; virtual; - { IdxPSCellParams2 } - function IdxPSCellParams2.GetPreviewMarginLeft = IdxPSCellParams2_GetPreviewMarginLeft; - function IdxPSCellParams2.GetPreviewMarginRight = IdxPSCellParams2_GetPreviewMarginRight; - function IdxPSCellParams2.GetPreviewMaxHeight = IdxPSCellParams2_GetPreviewMaxHeight; - function IdxPSCellParams2.GetPreviewMaxLineCount = IdxPSCellParams2_GetPreviewMaxLineCount; - function IdxPSCellParams2.GetRichEditGraphicClass = IdxPSCellParams2_GetRichEditGraphicClass; - function IdxPSCellParams2.GetRichEditTransparent = IdxPSCellParams2_GetRichEditTransparent; - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; virtual; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; virtual; - function IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; virtual; - function IdxPSCellParams2_GetRichEditTransparent: Boolean; virtual; - - // - function AddPageSite(const ABounds: TRect): TcxSchedulerReportPageSite; virtual; - - procedure AfterBuild; virtual; - procedure BeforeBuild; virtual; - procedure Build; virtual; - procedure BuildPages; virtual; - procedure BuildSchedulerCells(ASite: TcxSchedulerReportSchedulingAreaCell); virtual; - procedure Progress(APercentDone: Double); virtual; - - procedure PrepareEvents; virtual; - procedure DoCanPrintEvent(AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); virtual; - - procedure Changed; virtual; - procedure CreateObjects; virtual; - procedure DestroyObjects; virtual; - function GetPageCount: Integer; virtual; - - function GetRebuildOnPageParamsChange(AnUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; virtual; - - function GetActualDatePrintFrom: TDate; virtual; - function GetActualDatePrintTo: TDate; virtual; - function GetCorrespondedView: TcxSchedulerCustomResourceView; virtual; - function GetPagesPerPeriod: Integer; virtual; - - function GetGlyphIndex: Integer; virtual; - function GetPreviewGlyphIndex: Integer; virtual; - function GetSchedulerHeaderParams: TdxReportItemViewParams; virtual; - - procedure DrawDesignWindowPreview(ACanvas: TCanvas; const ABounds: TRect); - // actually option state - function GetResourcePageCount: Integer; virtual; - function GetShowDateNavigator(APageIndex: Integer): Boolean; virtual; - function GetShowNotesAreaBlank: Boolean; virtual; - - procedure SetBoolOption(var AOption: Boolean; Value: Boolean); - function SupportTimeRange: Boolean; virtual; - // draw options - function SupportIcons: Boolean; virtual; - function SupportMessage: Boolean; virtual; - - // report cells creation - function CreateDateNavigatorCell(ASite: TdxReportCell; AYear, AMonth: Word): TcxSchedulerReportDateNavigatorCell; virtual; - function CreateHeaderCell(ASite: TdxReportCell): TcxSchedulerReportSchedulerHeaderCell; virtual; - function CreateNotesCell(ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; virtual; - function CreateNotesLinedCell(ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; virtual; - function CreateSchedulingAreaCell(ASite: TdxReportCell): TcxSchedulerReportSchedulingAreaCell; virtual; - function CreateSchedulingCellsProducer(ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; virtual; - function CreateTaskPadCell(ASite: TdxReportCell): TcxSchedulerReportTaskPadCell; virtual; - - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); virtual; - function InitReportCell(ACell: TdxReportCell; const ABounds: TRect): TdxReportCell; - - procedure CorrectBoundsWithHeader(AHeader: TcxSchedulerReportSchedulerHeaderCell; var ABounds: TRect); - procedure CreateAdditionalControls(ASite: TdxReportCell; AHasCalendar, - AHasTaskPad, AHasNotes, AHasNotesLined, ARightSide: Boolean; var ABounds: TRect); virtual; - - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); virtual; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); virtual; - procedure CreateHeaderDateNavigator(AHeader: TcxSchedulerReportSchedulerHeaderCell; APageIndex: Integer; out ABounds: TRect); virtual; - procedure CreateLayoutForPeriod(APeriodIndex: Integer); virtual; - procedure CreatePageSiteWithHeader(APageIndex: Integer; - out ASite: TcxSchedulerReportPageSite; out AHeader: TcxSchedulerReportSchedulerHeaderCell; - out ABounds: TRect; AIsPrimary: Boolean = True); - // items visibility - function CanSplitSchedulingOnTwoPages: Boolean; virtual; - function GetHasPageHeader(APageIndex: Integer): Boolean; virtual; - function GetHasPageReportTitle(APageIndex: Integer): Boolean; virtual; - function GetPageHeaderHeight(const ASiteBounds: TRect; APageIndex: Integer): Integer; - function GetPageIndex(APeriodIndex, AIndex: Integer): Integer; - procedure GetPagePeriodAndIndex(APageIndex: Integer; var APeriodIndex, ASubIndex: Integer); - function GetPageSiteBounds(APageIndex: Integer): TRect; virtual; - function GetStartOfWeekOffset: Integer; virtual; - // extracting events and dates for period - procedure GetPageDateNavigatorInfo( - APageIndex: Integer; out AYear, AMonth: Word); virtual; - function GetDaysPerPeriod: Integer; virtual; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); virtual; - - property CompressWeekends: Boolean read FCompressWeekends write SetCompressWeekends default True; - property DontPrintWeekends: Boolean read FDontPrintWeekends write SetDontPrintWeekends default False; - property Events: TcxSchedulerCachedEventList read FEvents; - property GlyphIndex: Integer read GetGlyphIndex; - property Layout: TcxSchedulerReportLinkPeriodicPrintStyleLayout read FLayout write SetLayout stored IsLayoutStored; - property PagesPerPeriod: Integer read FPagesPerPeriod; - property PageSites[Index: Integer]: TcxSchedulerReportPageSite read GetPageSite; - property PreviewGlyphIndex: Integer read GetPreviewGlyphIndex; - property PrintRange: TcxSchedulerReportLinkPrintRange read GetPrintRange; - property ResourceCount: Integer read GetResourceCount; - property ResourceCountPerPage: Integer read FResourceCountPerPage write SetResourceCountPerPage default 0; - property ShowNotesAreaBlank: Boolean read GetShowNotesAreaBlank write SetShowNotesAreaBlank stored IsShowNotesAreaBlankStored; - property ShowNotesAreaLined: Boolean read FShowNotesAreaLined write SetShowNotesAreaLined default False; - property ShowTaskPad: Boolean read FShowTaskPad write SetShowTaskPad default False; - property StartOfWeekOffset: Integer read GetStartOfWeekOffset; - property Storage: TcxCustomSchedulerStorage read GetStorage; - property TimePrintFrom: TTime read GetTimePrintFrom write SetTimePrintFrom stored False; - property TimePrintTo: TTime read GetTimePrintTo write SetTimePrintTo stored False; - property UsedDays: TcxSchedulerDateList read FUsedDays; - public - constructor Create(AStyles: TcxSchedulerReportLinkPrintStyles); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function DefaultCaption: string; virtual; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; virtual; - procedure RestoreDefaults; virtual; - - property ActualDatePrintFrom: TDate read GetActualDatePrintFrom; - property ActualDatePrintTo: TDate read GetActualDatePrintTo; - property CorrespondedView: TcxSchedulerCustomResourceView read GetCorrespondedView; - property HasAdditionalArea: Boolean read GetHasAdditionalArea; - property Index: Integer read GetIndex; - property PageCount: Integer read GetPageCount; - property PeriodCount: Integer read GetPeriodCount; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - property Scheduler: TcxScheduler read GetScheduler; - property Styles: TcxSchedulerReportLinkPrintStyles read FStyles; - property VisualStyles: TcxSchedulerReportLinkStyles read GetVisualStyles; - published - property Active: Boolean read GetActive write SetActive stored IsActiveStored; - property Caption: string read FCaption write SetCaption stored IsCaptionStored; - end; - - { TcxSchedulerReportLinkDailyPrintStyle } - - TcxSchedulerReportLinkDailyPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FCurrentPagePerDate: Integer; - protected - procedure BeforeBuild; override; - function CanSplitSchedulingOnTwoPages: Boolean; override; - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - function CreateSchedulingCellsProducer(ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetGlyphIndex: Integer; override; - function GetPageCount: Integer; override; - function GetPagesPerPeriod: Integer; override; - function GetShowNotesAreaBlank: Boolean; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - function SupportIcons: Boolean; override; - function SupportMessage: Boolean; override; - function SupportTimeRange: Boolean; override; - public - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - published - property Active; - property Caption; - property Layout; - property ResourceCountPerPage; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowTaskPad; - end; - - { TcxSchedulerReportLinkCustomDetailsPrintStyle } - - TcxSchedulerReportLinkCustomDetailsPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FTimeWidth: Integer; - function GetPageWidth: Integer; - protected - BuildedPageCount: Integer; - CellsOnPage: Integer; - CurrentPage: TcxSchedulerReportPageSite; - function AddPageSite(const ABounds: TRect): TcxSchedulerReportPageSite; override; - procedure BeforeBuild; override; - function GetNextPage(APrevPage: TcxSchedulerReportPageSite; out ABounds: TRect): TcxSchedulerReportPageSite; - function GetPageCount: Integer; override; - function MeasureTimeWidth: Integer; virtual; - - property PageWidth: Integer read GetPageWidth; - property TimeWidth: Integer read FTimeWidth; - end; - - { TcxSchedulerReportLinkDetailsPrintStyle } - - TcxSchedulerReportLinkDetailsPrintStylePaginationMode = (dpmByDay, dpmByWeek, dpmByMonth); - - TcxSchedulerReportLinkDetailsPrintStyle = class(TcxSchedulerReportLinkCustomDetailsPrintStyle) - private - FPaginationMode: TcxSchedulerReportLinkDetailsPrintStylePaginationMode; - FUsePagination: Boolean; - procedure SetPaginationMode(Value: TcxSchedulerReportLinkDetailsPrintStylePaginationMode); - procedure SetUsePagination(Value: Boolean); - protected - EventIndex, DayIndex: Integer; - CurrentCell: TcxSchedulerReportDetailsEventCell; - CurrentPageBounds: TRect; - PreviousHeader: TcxSchedulerReportSchedulerHeaderCell; - Site: TcxSchedulerReportPageSite; - function AddDayHeader(ADate: TDateTime; AContinue: Boolean; - var ABounds: TRect): TcxSchedulerReportSchedulerHeaderCell; - procedure BeforeBuild; override; - procedure BuildPages; override; - function GetDayHeaderHeight: Integer; virtual; - function GetDayHeaderText(AContinue: Boolean): string; virtual; - function GetGlyphIndex: Integer; override; - function GetPreviewGlyphIndex: Integer; override; - function GetSchedulerHeaderParams: TdxReportItemViewParams; override; - - // layout calculation - function AddEventCell(AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; virtual; - procedure CheckPagination; - procedure HeaderNeeded; virtual; - function NeedAddDayHeader: Boolean; - function MeasureCellBounds: TRect; virtual; - procedure PrepareNextPage; - procedure SetCellPlace; - - property DayHeaderHeight: Integer read GetDayHeaderHeight; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property PaginationMode: TcxSchedulerReportLinkDetailsPrintStylePaginationMode read FPaginationMode write SetPaginationMode default dpmByDay; - property UsePagination: Boolean read FUsePagination write SetUsePagination default False; - end; - - { TcxSchedulerReportLinkMemoPrintStyle } - - TcxSchedulerReportLinkMemoPrintStyle = class(TcxSchedulerReportLinkCustomDetailsPrintStyle) - private - FSelectedEventsOnly: Boolean; - FStartEachItemOnNewPage: Boolean; - protected - Site: TdxReportCell; - function AddEventCell(AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; virtual; - procedure BuildPages; override; - procedure DoCanPrintEvent(AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); override; - function GetGlyphIndex: Integer; override; - function GetPreviewGlyphIndex: Integer; override; - function MeasureTimeWidth: Integer; override; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property SelectedEventsOnly: Boolean read FSelectedEventsOnly write FSelectedEventsOnly default True; - property StartEachItemOnNewPage: Boolean read FStartEachItemOnNewPage write FStartEachItemOnNewPage default True; - end; - - { TcxSchedulerReportLinkMonthlyPrintStyle } - - TcxSchedulerReportLinkMonthlyPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FPrintExactlyOneMonthPerPage: Boolean; - procedure SetPrintExactlyOneMonthPerPage(Value: Boolean); - protected - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetDateForPage(APageIndex: Integer): TDateTime; - function GetDaysPerPeriod: Integer; override; - function GetGlyphIndex: Integer; override; - function GetPageCount: Integer; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property DontPrintWeekends; - property Layout; - property PrintExactlyOneMonthPerPage: Boolean read FPrintExactlyOneMonthPerPage write SetPrintExactlyOneMonthPerPage default False; - property ResourceCountPerPage; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowTaskPad; - end; - - { TcxSchedulerReportLinkTrifoldPrintStyle } - - TcxSchedulerReportLinkTrifoldPrintStyleSectionMode = (smDailyCalendar, smWeeklyCalendar, - smMonthlyCalendar, smTaskPad, smNotesAreaBlank, smNotesAreaLined); - - TcxSchedulerReportLinkTrifoldPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FSections: array[0..2] of TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; - function GetSection(Index: Integer): TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; - procedure SetSection(Index: Integer; AValue: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); - function IsSectionStored(Index: Integer): Boolean; - protected - FCurrentSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; - FCurrentSchedulingArea: TcxSchedulerReportSchedulingAreaCell; - FPageRange: Byte; - procedure CreateLayoutForPeriod(APeriodIndex: Integer); override; - procedure CreateLayoutForSection(ASite: TdxReportCell; APeriodIndex: Integer; const ABounds: TRect; - ASection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); virtual; - procedure CreateSchedulingAreaWithHeader(ASite: TdxReportCell; ABounds: TRect); virtual; - function CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetGlyphIndex: Integer; override; - function GetPageCount: Integer; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - procedure RestoreDefaults; override; - published - property Active; - property Caption; - property LeftSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode index 0 read GetSection write SetSection stored IsSectionStored; - property MiddleSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode index 1 read GetSection write SetSection stored IsSectionStored; - property RightSection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode index 2 read GetSection write SetSection stored IsSectionStored; - end; - - { TcxSchedulerReportLinkWeeklyPrintStyle } - - TcxSchedulerReportLinkWeeklyPrintStyleArrange = (wsaTopToBottom, wsaLeftToRight); - - TcxSchedulerReportLinkWeeklyPrintStyle = class(TcxCustomSchedulerReportLinkPrintStyle) - private - FArrange: TcxSchedulerReportLinkWeeklyPrintStyleArrange; - function IsArrangeStored: Boolean; - procedure SetArrange(Value: TcxSchedulerReportLinkWeeklyPrintStyleArrange); - protected - procedure CreateControlsOnFirstPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - procedure CreateControlsOnSecondPage(APageIndex: Integer; - ASite, AHeader: TdxReportCell; ABounds: TRect); override; - function CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; override; - procedure FillDatesForPage(ADateList: TcxSchedulerDateList; - APageIndex, APeriodIndex, ASubIndex: Integer); override; - function GetCorrespondedView: TcxSchedulerCustomResourceView; override; - function GetGlyphIndex: Integer; override; - function GetDateForPage(APageIndex: Integer): TDateTime; - function GetDaysPerPeriod: Integer; override; - function GetPageCount: Integer; override; - function GetStartOfWeekOffset: Integer; override; - procedure InitHeaderCell(ACell: TcxSchedulerReportSchedulerHeaderCell); override; - function CanDontPrintWeekends: Boolean; virtual; - function SupportTimeRange: Boolean; override; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - function IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; override; - procedure RestoreDefaults; override; - published - property Active; - property Arrange: TcxSchedulerReportLinkWeeklyPrintStyleArrange read FArrange write SetArrange stored IsArrangeStored; - property Caption; - property DontPrintWeekends; - property Layout; - property ResourceCountPerPage; - property ShowNotesAreaBlank; - property ShowNotesAreaLined; - property ShowTaskPad; - end; - - { TcxSchedulerReportLinkPrintStyles } - - TcxSchedulerReportLinkPrintStyles = class(TcxCustomSchedulerReportLinkOptions) - private - FActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; - FActiveStyleAssigned: Boolean; - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxCustomSchedulerReportLinkPrintStyle; - function GetStyleDaily: TcxSchedulerReportLinkDailyPrintStyle; - function GetStyleDetails: TcxSchedulerReportLinkDetailsPrintStyle; - function GetStyleMemo: TcxSchedulerReportLinkMemoPrintStyle; - function GetStyleMonthly: TcxSchedulerReportLinkMonthlyPrintStyle; - function GetStyleTrifold: TcxSchedulerReportLinkTrifoldPrintStyle; - function GetStyleWeekly: TcxSchedulerReportLinkWeeklyPrintStyle; - procedure SetActiveStyle(Value: TcxCustomSchedulerReportLinkPrintStyle); - procedure SetActiveStyleAssigned(Value: Boolean); - procedure SetItem(Index: Integer; Value: TcxCustomSchedulerReportLinkPrintStyle); - procedure SetStyleDaily(Value: TcxSchedulerReportLinkDailyPrintStyle); - procedure SetStyleDetails(Value: TcxSchedulerReportLinkDetailsPrintStyle); - procedure SetStyleMemo(Value: TcxSchedulerReportLinkMemoPrintStyle); - procedure SetStyleMonthly(Value: TcxSchedulerReportLinkMonthlyPrintStyle); - procedure SetStyleTrifold(Value: TcxSchedulerReportLinkTrifoldPrintStyle); - procedure SetStyleWeekly(Value: TcxSchedulerReportLinkWeeklyPrintStyle); - protected - procedure CreateObjects; override; - procedure DestroyObjects; override; - - { IdxReportLinkOptionsDesignerSupport } - - function DesignerTabIndex: Integer; override; - - function CreateStyle(AStyleClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; virtual; - procedure CreateStyles; virtual; - procedure DestroyStyles; virtual; - procedure GetStyleByClassEx(AClass: TcxCustomSchedulerReportLinkPrintStyleClass; var AInstance); - procedure SetActiveStyleEx(Value: TcxCustomSchedulerReportLinkPrintStyle); - - procedure ActiveStyleChanged; virtual; - procedure StyleChanged(AStyle: TcxCustomSchedulerReportLinkPrintStyle); virtual; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - function GetCorrespondingStyle: TcxCustomSchedulerReportLinkPrintStyle; virtual; - function GetStyleByClass(AClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; - function GetStyleByName(const Name: string): TcxCustomSchedulerReportLinkPrintStyle; - function GetStyleByView(View: TcxSchedulerCustomView): TcxCustomSchedulerReportLinkPrintStyle; - - function IndexOf(AItem: TcxCustomSchedulerReportLinkPrintStyle): Integer; - - property ActiveStyle: TcxCustomSchedulerReportLinkPrintStyle read FActiveStyle write SetActiveStyle stored False; - property ActiveStyleAssigned: Boolean read FActiveStyleAssigned write SetActiveStyleAssigned; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxCustomSchedulerReportLinkPrintStyle read GetItem write SetItem; default; - published - property Daily: TcxSchedulerReportLinkDailyPrintStyle read GetStyleDaily write SetStyleDaily; - property Details: TcxSchedulerReportLinkDetailsPrintStyle read GetStyleDetails write SetStyleDetails; - property Memo: TcxSchedulerReportLinkMemoPrintStyle read GetStyleMemo write SetStyleMemo; - property Monthly: TcxSchedulerReportLinkMonthlyPrintStyle read GetStyleMonthly write SetStyleMonthly; - property Trifold: TcxSchedulerReportLinkTrifoldPrintStyle read GetStyleTrifold write SetStyleTrifold; - property Weekly: TcxSchedulerReportLinkWeeklyPrintStyle read GetStyleWeekly write SetStyleWeekly; - end; - - { DesignWindow } - - TcxfmSchedulerReportLinkDesignWindow = class(TdxfmCustomcxControlReportLinkDesignWindow) - PageControl1: TPageControl; - tshPrintStyles: TTabSheet; - tshStyles: TTabSheet; - bvlStyles: TBevel; - bvlStyleSheets: TBevel; - lblStyleSheets: TLabel; - bvlStylesHost: TBevel; - Label1: TLabel; - lblUseNativeStyles: TLabel; - btnStyleColor: TButton; - btnStyleFont: TButton; - btnStyleBackgroundBitmap: TButton; - cbxStyleSheets: TcxComboBox; - btnStyleSheetNew: TButton; - btnStyleSheetCopy: TButton; - btnStyleSheetDelete: TButton; - btnStylesSaveAs: TButton; - btnStyleSheetRename: TButton; - btnStyleBackgroundBitmapClear: TButton; - btnStyleRestoreDefaults: TButton; - chbxUseNativeStyles: TcxCheckBox; - pmStyles: TPopupMenu; - miStyleFont: TMenuItem; - miStyleColor: TMenuItem; - miLine3: TMenuItem; - miStyleBackgroundBitmap: TMenuItem; - miStyleBackgroundBitmapClear: TMenuItem; - miLine2: TMenuItem; - miStyleRestoreDefaults: TMenuItem; - milLine: TMenuItem; - miStylesSelectAll: TMenuItem; - miLine4: TMenuItem; - miStylesSaveAs: TMenuItem; - ilStylesPopup: TImageList; - lblPreviewWindow: TStaticText; - pnlPreview: TPanel; - cbxPrintStyles: TcxImageComboBox; - lblPrintStylesOptions: TLabel; - bvlPrintStyleOptions: TBevel; - pcPrintStyleOptions: TPageControl; - tshWeekly: TTabSheet; - tshMonthly: TTabSheet; - tshTrifold: TTabSheet; - tshDetails: TTabSheet; - tshMemo: TTabSheet; - lblPrintStyleTrifoldSectionLeft: TLabel; - lblPrintStyleTrifoldSectionMiddle: TLabel; - lblPrintStyleTrifoldSectionRight: TLabel; - lblPrintStyleWeeklyPrintTo: TLabel; - lblPrintStyleWeeklyPrintFrom: TLabel; - chbxPrintStyleWeeklyNotesAreaLined: TcxCheckBox; - chbxPrintStyleWeeklyNotesAreaBlank: TcxCheckBox; - lblPrintStyleWeeklyInclude: TLabel; - lblPrintStyleWeeklyLayout: TLabel; - lblPrintStyleWeeklyArrange: TLabel; - cbxPrintStyleWeeklyArrange: TcxComboBox; - cbxPrintStyleWeeklyLayout: TcxComboBox; - chbxPrintStyleWeeklyTaskPad: TcxCheckBox; - tePrintStyleWeeklyPrintFrom: TcxTimeEdit; - tePrintStyleWeeklyPrintTo: TcxTimeEdit; - cbxPrintStyleMonthlyLayout: TcxComboBox; - lblPrintStyleMonthlyLayout: TLabel; - lblPrintStyleMonthlyInclude: TLabel; - chbxPrintStyleMonthlyTaskPad: TcxCheckBox; - chbxPrintStyleMonthlyNotesAreaBlank: TcxCheckBox; - chbxPrintStyleMonthlyNotesAreaLined: TcxCheckBox; - chbxPrintStyleMonthlyDontPrintWeekends: TcxCheckBox; - chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage: TcxCheckBox; - chbxPrintStyleWeeklyDontPrintWeekends: TcxCheckBox; - pnlPrintStylesPreview: TPanel; - pbxPrintStylesPreview: TPaintBox; - chbxPrintStyleDetailsUsePagination: TcxCheckBox; - cbxPrintStyleDetailsPagination: TcxComboBox; - tshFormatting: TTabSheet; - bvlLookAndFeel: TBevel; - lblLookAndFeel: TLabel; - imgLookAndFeel: TImage; - cbxLookAndFeel: TcxComboBox; - lblRefinements: TLabel; - bvlRefinements: TBevel; - imgRefinements: TImage; - chbxSuppressBackgroundBitmaps: TcxCheckBox; - tshPrintRange: TTabSheet; - lblPrintRangeStart: TLabel; - lblPrintRangeEnd: TLabel; - lblPrintRangesMiscellaneous: TLabel; - Bevel1: TBevel; - dePrintRangeStart: TcxDateEdit; - dePrintRangeEnd: TcxDateEdit; - chbxHideDetailsOfPrivateAppointments: TcxCheckBox; - cbxPrintStyleTrifoldSectionLeft: TcxComboBox; - cbxPrintStyleTrifoldSectionMiddle: TcxComboBox; - cbxPrintStyleTrifoldSectionRight: TcxComboBox; - chbxSuppressContentColoration: TcxCheckBox; - sePrintStyleMonthlyResourceCountPerPage: TcxSpinEdit; - lblPrintStyleMonthlyResourceCountPerPage: TLabel; - lblPrintStyleWeeklyResourceCountPerPage: TLabel; - sePrintStyleWeeklyResourceCountPerPage: TcxSpinEdit; - tshDaily: TTabSheet; - lblPrintStyleDailyLayout: TLabel; - lblPrintStyleDailyInclude: TLabel; - lblPrintStyleDailyPrintFrom: TLabel; - lblPrintStyleDailyPrintTo: TLabel; - lblPrintStyleDailyResourceCountPerPage: TLabel; - cbxPrintStyleDailyLayout: TcxComboBox; - chbxPrintStyleDailyTaskPad: TcxCheckBox; - chbxPrintStyleDailyNotesAreaBlank: TcxCheckBox; - chbxPrintStyleDailyNotesAreaLined: TcxCheckBox; - tePrintStyleDailyPrintFrom: TcxTimeEdit; - tePrintStyleDailyPrintTo: TcxTimeEdit; - sePrintStyleDailyResourceCountPerPage: TcxSpinEdit; - cxEditStyleController1: TcxEditStyleController; - pbPreview: TPaintBox; - chbxPrintStyleMemoStartEachItemOnNewPage: TcxCheckBox; - chbxPrintStyleMemoPrintOnlySelectedEvents: TcxCheckBox; - procedure PageControl1Change(Sender: TObject); - procedure lbxStylesClick(Sender: TObject); - procedure btnStyleFontClick(Sender: TObject); - procedure btnStyleColorClick(Sender: TObject); - procedure btnStyleBackgroundBitmapClick(Sender: TObject); - procedure btnStyleBackgroundBitmapClearClick(Sender: TObject); - procedure btnStyleRestoreDefaultsClick(Sender: TObject); - procedure btnStylesSaveAsClick(Sender: TObject); - procedure cbxStyleSheetsClick(Sender: TObject); - procedure miStylesSelectAllClick(Sender: TObject); - procedure cbxStyleSheetsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure btnStyleSheetNewClick(Sender: TObject); - procedure btnStyleSheetCopyClick(Sender: TObject); - procedure btnStyleSheetDeleteClick(Sender: TObject); - procedure btnStyleSheetRenameClick(Sender: TObject); - procedure lblUseNativeStylesClick(Sender: TObject); - procedure OptionsFormattingClick(Sender: TObject); - procedure pmStylesPopup(Sender: TObject); - procedure cbxPrintStylesClick(Sender: TObject); - procedure pbxPrintStylesPreviewPaint(Sender: TObject); - procedure cbxPrintStyleDailyLayoutClick(Sender: TObject); - procedure chbxPrintStyleOptionsViewClick(Sender: TObject); - procedure cbxPrintStyleWeeklyArrangeClick(Sender: TObject); - procedure chbxPrintStyleWeeklyDontPrintWeekendsClick(Sender: TObject); - procedure chbxPrintStyleMonthlyDontPrintWeekendsClick(Sender: TObject); - procedure chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick( - Sender: TObject); - procedure cbxPrintStyleTrifoldSectionModeClick(Sender: TObject); - procedure chbxPrintStyleDetailsUsePaginationClick(Sender: TObject); - procedure cbxPrintStyleDetailsPaginationClick(Sender: TObject); - procedure cbxPrintStyleWeeklyLayoutClick(Sender: TObject); - procedure cbxPrintStyleMonthlyLayoutClick(Sender: TObject); - procedure dePrintRangeStartEditValueChanged(Sender: TObject); - procedure dePrintRangeEndEditValueChanged(Sender: TObject); - procedure cbxStyleSheetsPropertiesDrawItem(AControl: TcxCustomComboBox; - ACanvas: TcxCanvas; AIndex: Integer; const ARect: TRect; - AState: TOwnerDrawState); - procedure tePrintStylePrintRangePropertiesEditValueChanged( - Sender: TObject); - procedure LookAndFeelChange(Sender: TObject); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure sePrintStyleResourceCountPerPagePropertiesEditValueChanged( - Sender: TObject); - procedure tePrintStylePrintRangePropertiesChange(Sender: TObject); - procedure sePrintStyleResourceCountPerPagePropertiesChanged( - Sender: TObject); - procedure StyleController1StyleChanged(Sender: TObject); - procedure pbPreviewPaint(Sender: TObject); - procedure cbxLookAndFeelPropertiesChange(Sender: TObject); - procedure chbxPrintStyleMemoStartEachItemOnNewPageClick( - Sender: TObject); - procedure chbxPrintStyleMemoPrintOnlySelectedEventsClick( - Sender: TObject); - private - FActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; - FActiveStyleAssigned: Boolean; - FIsFormClosing: Boolean; - lbxStyles: TdxStylesListBox; - wpPrintStyles: TList; - - function GetActivePrintStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetActiveStyle: TcxStyle; - function GetComponent: TcxScheduler; - function GetHasSelectedStyles: Boolean; - function GetHasSelectedStylesWithAssignedBitmap: Boolean; - function GetReportLink: TcxSchedulerReportLink; - - function CanSelectAllStyles: Boolean; - procedure CreateControls; - - procedure RecreateStylesListBox; - procedure RestoreSelectedStyles(AList: TList); - procedure SaveSelectedStyles(AList: TList); - procedure SetActivePage; - - procedure SetOptionsFormattingByIndex(AnIndex: Integer; AValue: Boolean); - procedure SetPrintStyleOptionsViewByIndex(AnIndex: Integer; AValue: Boolean); - procedure SetPrintStyleRangeByIndex(AnIndex: Integer; const ATime: TDateTime); - procedure SetPrintStyleResourceCountPerPageByIndex(AnIndex: Integer; AValue: TcxEditValue); - - protected - procedure AssignDailyTabObjects; virtual; - procedure AssignDetailsTabObjects; virtual; - procedure AssignMemoTabObjects; virtual; - procedure AssignMonthlyTabObjects; virtual; - procedure AssignTrifoldTabObjects; virtual; - procedure AssignWeeklyTabObjects; virtual; - - function CanApply: Boolean; override; - procedure DoApply; override; - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - - function CheckPrintRange: Boolean; virtual; - function CheckPrintStyleSettings: Boolean; virtual; - function IsValidConditions: Boolean; virtual; - procedure LoadCaption(AControl: TControl; StrPtr: Pointer); overload; - procedure LoadCaption(AItem: TMenuItem; StrPtr: Pointer); overload; - procedure LoadStrings; override; - procedure LoadStringsCombo(ACombo: TcxComboBox; ACaptions: array of Pointer); - procedure LoadStringsDaily; virtual; - procedure LoadStringsDetails; virtual; - procedure LoadStringsMemo; virtual; - procedure LoadStringsMonthly; virtual; - procedure LoadStringsOther; virtual; - procedure LoadStringsTrifold; virtual; - procedure LoadStringsWeekly; virtual; - - procedure PreviewDrawPageContent(ACanvas: TCanvas; ABounds: TRect); virtual; - - procedure UpdateControlsState; override; - procedure UpdateEnabled(AControl: TControl; AEnabled: Boolean); overload; - procedure UpdateEnabled(AItem: TMenuItem; AEnabled: Boolean); overload; - procedure UpdateEnabledControls(AControls: array of TControl; AEnabled: Boolean); - procedure UpdatePreview; override; - - function GetDesignerTabIndex: Integer; override; - procedure SetDesignerTabIndex(Value: Integer); override; - - procedure DoActiveStyleSheetChanged; override; - procedure DoFormActivated(AnActive: Boolean); override; - procedure DoRefreshStylesList; override; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); override; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); override; - - procedure GetSelectedStyleNames(AStrings: TStrings); override; - procedure GetStyleNames(out AStrings: TStrings); override; - procedure GetStyleSheetNames(out AStrings: TStrings); override; - - procedure ActivatePrintStyleTab; virtual; - procedure AssignTabSheetObjects; virtual; - function FindTabIndexByPrintStyle(APrintStyle: TcxCustomSchedulerReportLinkPrintStyle): Integer; virtual; - procedure RefreshPrintStyles; virtual; - - property ActivePrintStyle: TcxCustomSchedulerReportLinkPrintStyle read GetActivePrintStyle; - property ActiveStyle: TcxStyle read GetActiveStyle; - property HasSelectedStyles: Boolean read GetHasSelectedStyles; - property HasSelectedStylesWithAssignedBitmap: Boolean read GetHasSelectedStylesWithAssignedBitmap; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; override; - - property Component: TcxScheduler read GetComponent; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - end; - - // cells - - { TcxSchedulerReportPageSite } - - TcxSchedulerReportPageSite = class(TdxReportCell) - protected - FPageIndex: Integer; - FPrimaryPage: Boolean; - - procedure ReadProperties(AReader: TdxPSDataReader); override; - procedure WriteProperties(AWriter: TdxPSDataWriter); override; - public - property PageIndex: Integer read FPageIndex; - property PrimaryPage: Boolean read FPrimaryPage; - end; - - { TcxSchedulerReportPageItemCell } - - TcxSchedulerReportPageItemCell = class(TdxReportCell) - private - function GetPageIndex: Integer; - function GetPageSite: TcxSchedulerReportPageSite; - function GetPrimaryPage: Boolean; - function GetReportLink: TcxSchedulerReportLink; - protected - function GetType: TcxSchedulerReportItemsType; virtual; - - procedure SetCellViewParams(AItem: TdxReportVisualItem; const AParams: TcxViewParams); overload; - procedure SetCellViewParams(AItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); overload; - - property ReportLink: TcxSchedulerReportLink read GetReportLink; - public - constructor Create(AParent: TdxReportCell); override; - property PageSite: TcxSchedulerReportPageSite read GetPageSite; - property PrimaryPage: Boolean read GetPrimaryPage; - property PageIndex: Integer read GetPageIndex; - end; - - { TcxSchedulerReportNotesDataCell } - - TcxSchedulerReportNotesDataCell = class(TAbstractdxReportCellData) - private - FCaption: string; - FCaptionHeight: Integer; - FLined: Boolean; - function GetMultiLine: Boolean; - function GetTextAlignX: TcxTextAlignX; - function GetTextAlignY: TcxTextAlignY; - procedure SetMultiLine(Value: Boolean); - procedure SetTextAlignX(Value: TcxTextAlignX); - procedure SetTextAlignY(Value: TcxTextAlignY); - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor Create(AParent: TdxReportCell); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - - property Caption: string read FCaption write FCaption; - property CaptionHeight: Integer read FCaptionHeight write FCaptionHeight; - property Lined: Boolean read FLined write FLined; - property MultiLine: Boolean read GetMultiLine write SetMultiLine; - property TextAlignX: TcxTextAlignX read GetTextAlignX write SetTextAlignX; - property TextAlignY: TcxTextAlignY read GetTextAlignY write SetTextAlignY; - end; - - TcxSchedulerReportNotesDataCellClass = class of TcxSchedulerReportNotesDataCell; - - { TcxSchedulerReportNotesAreaCell } - - TcxSchedulerReportNotesAreaCell = class(TcxSchedulerReportPageItemCell) - private - FLined: Boolean; - function GetDataCell: TcxSchedulerReportNotesDataCell; - protected - procedure BoundsChanged; override; - procedure ConvertCoords(APixelsNumerator, APixelsDenominator: Integer); override; - function GetType: TcxSchedulerReportItemsType; override; - function GetDataCellClass: TcxSchedulerReportNotesDataCellClass; virtual; - procedure SetFontIndex(Value: Integer); override; - public - constructor Create(AParent: TdxReportCell); override; - constructor CreateEx(AParent: TdxReportCell; ALined: Boolean); virtual; - property DataCell: TcxSchedulerReportNotesDataCell read GetDataCell; - property Lined: Boolean read FLined; - end; - - { TcxSchedulerReportTaskPadCell } - - TcxSchedulerReportTaskPadCell = class(TcxSchedulerReportNotesAreaCell) - private - function GetTaskPadDataSite: TdxReportCell; - protected - procedure BoundsChanged; override; - function CalculateTaskPadDataSiteBounds: TRect; virtual; - function GetType: TcxSchedulerReportItemsType; override; - public - constructor CreateEx(AParent: TdxReportCell; ALined: Boolean); override; - - property TaskPadDataSite: TdxReportCell read GetTaskPadDataSite; - end; - - { TcxSchedulerReportSchedulerHeaderDataCell } - - TcxSchedulerReportSchedulerHeaderDataCell = class(TAbstractdxReportCellData) - public - constructor Create(AParent: TdxReportCell); override; - end; - - { TcxSchedulerReportSchedulerHeaderCell } - - TcxSchedulerReportSchedulerHeaderCell = class(TcxSchedulerReportPageItemCell) - private - FContent: TcxSchedulerReportSchedulerHeaderDataCell; - FDate: TDateTime; - FPrimaryText: string; //todo: remove - FSecondaryText: string; //todo: remove - FPrimaryTextCell: TdxReportCellString; - FSecondaryTextCell: TdxReportCellString; - protected - function AddContentCell: TcxSchedulerReportSchedulerHeaderDataCell; virtual; - function AddTextCell(AText: string; const ABounds: TRect; AMultiLine: Boolean): TdxReportCellString; - function GetType: TcxSchedulerReportItemsType; override; - - property Date: TDateTime read FDate write FDate; - property PrimaryText: string read FPrimaryText write FPrimaryText; //todo: remove - property SecondaryText: string read FSecondaryText write FSecondaryText; //todo: remove - public - constructor Create(AParent: TdxReportCell); override; - procedure AdjustTextSize; - - property Content: TcxSchedulerReportSchedulerHeaderDataCell read FContent; - property PrimaryTextCell: TdxReportCellString read FPrimaryTextCell; - property SecondaryTextCell: TdxReportCellString read FSecondaryTextCell; - end; - - { TcxSchedulerReportDateNavigatorItem } - - TcxSchedulerReportDateNavigatorItem = class(TdxReportCellPreviewText) - private - function GetDateNavigator: TcxSchedulerReportDateNavigatorCell; - protected - function GetDefaultDTFormat: DWORD; override; - procedure SetText(const Value: string); override; - public - constructor Create(AParent: TdxReportCell); override; - - property DateNavigator: TcxSchedulerReportDateNavigatorCell read GetDateNavigator; - end; - - { TcxSchedulerReportDateNavigatorHeader } - - TcxSchedulerReportDateNavigatorHeader = class(TcxSchedulerReportDateNavigatorItem) - private - FMonth: Word; - FYear: Word; - protected - function GetText: string; override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; AYear, AMonth: Word); - procedure Assign(Source: TPersistent); override; - - property Month: Word read FMonth; - property Year: Word read FYear; - end; - - { TcxSchedulerReportDateNavigatorDay } - - TcxSchedulerReportDateNavigatorDay = class(TcxSchedulerReportDateNavigatorItem) - private - FDay: Integer; - FCol: Integer; - FRow: Integer; - function GetBold: Boolean; - function GetDate: TDate; - function GetMonth: Word; - function GetYear: Word; - procedure SetBold(Value: Boolean); - protected - function GetText: string; override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; - ADay, ACol, ARow: Integer; ABold: Boolean); virtual; - procedure Assign(Source: TPersistent); override; - - property Col: Integer read FCol; - property Date: TDate read GetDate; - property Day: Integer read FDay write FDay; - property Bold: Boolean read GetBold write SetBold; - property Month: Word read GetMonth; - property Row: Integer read FRow; - property Year: Word read GetYear; - end; - - { TcxSchedulerReportDateNavigatorDayCaption } - - TcxSchedulerReportDateNavigatorDayCaption = class(TcxSchedulerReportDateNavigatorItem) - private - FCol: Integer; - FDayOfWeek: TDay; - FDayText: string; - protected - function GetText: string; override; - function GetDayText: string; virtual; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; ADayOfWeek: TDay; ACol: Integer); virtual; - procedure Assign(Source: TPersistent); override; - - property Col: Integer read FCol; - property DayOfWeek: TDay read FDayOfWeek; - end; - - { TcxSchedulerReportDateNavigatorWeekNumber } - - TcxSchedulerReportDateNavigatorWeekNumber = class(TcxSchedulerReportDateNavigatorItem) - private - FWeekNumber: Integer; - FRow: Integer; - protected - function GetText: string; override; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateEx(AParent: TdxReportCell; AWeekNumber, ARow: Integer); virtual; - procedure Assign(Source: TPersistent); override; - - property Row: Integer read FRow; - property WeekNumber: Integer read FWeekNumber write FWeekNumber; - end; - - { TcxSchedulerReportDateNavigatorCell } - - TcxSchedulerReportDateNavigatorCell = class(TcxSchedulerReportPageItemCell) - private - FBoldedDays: TcxSchedulerDateList; - FFirstWeekOfYear: TcxFirstWeekOfYear; - FMonth: Word; - FShowDatesContainingEventsInBold: Boolean; - FShowWeekNumbers: Boolean; - FStartOfWeek: TDay; - FYear: Word; - - FColWidth: Integer; - FDayCaptionsHeight: Integer; - FHeaderHeight: Integer; - FMonthSize: TSize; - FRowHeight: Integer; - FVertOffset: Integer; - FContentParams: TdxReportItemViewParams; - FHeaderParams: TdxReportItemViewParams; - - FDayCaptionCount: Integer; - FDayCount: Integer; - FWeekNumberCount: Integer; - - class function GetMonthHeight(AHeaderHeight, ADayCaptionsHeight, ARowHeight: Integer): Integer; - function GetDay(Index: Integer): TcxSchedulerReportDateNavigatorDay; - function GetDayCaption(Index: Integer): TcxSchedulerReportDateNavigatorDayCaption; - function GetHeader: TcxSchedulerReportDateNavigatorHeader; - function GetWeekNumber(Index: Integer): TcxSchedulerReportDateNavigatorWeekNumber; - protected - procedure AdjustItemsVertical; - function ColOfDate(ADate: TDateTime): Integer; - procedure CreateDayCaptions; virtual; - procedure CreateDay(const ABounds: TRect; ADate: TDateTime; ACol, ARow: Integer); virtual; - procedure CreateItems; - procedure CreateLines; virtual; - procedure CreateMonth; virtual; - procedure CreateMonthHeader; virtual; - procedure CreateWeekNumber(const ABounds: TRect; ADate: TDateTime; ARow: Integer); virtual; - class procedure GetContentPartSizes(AFont: TFont; var AColWidth, ARowHeight, - ADayCaptionsHeight: Integer; AFontSize: Integer = 0); virtual; - function GetDayBoundsFromColAndRow(ACol, ARow: Integer): TRect; virtual; - function GetDayIsBold(ADate: TDateTime): Boolean; virtual; - function GetHeaderBounds: TRect; virtual; - class procedure GetHeaderPartSizes(AFont: TFont; var AHeaderHeight: Integer; - AFontSize: Integer = 0); virtual; - function GetMonthSize(const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; - function GetType: TcxSchedulerReportItemsType; override; - procedure SetViewParams(const AContentParams, AHeaderParams: TdxReportItemViewParams); virtual; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property ColWidth: Integer read FColWidth; - property DayCaptionsHeight: Integer read FDayCaptionsHeight; - property HeaderHeight: Integer read FHeaderHeight; - property MonthSize: TSize read FMonthSize; - property RowHeight: Integer read FRowHeight; - property ContentParams: TdxReportItemViewParams read FContentParams; - property HeaderParams: TdxReportItemViewParams read FHeaderParams; - public - constructor Create(AParent: TdxReportCell); override; - constructor CreateEx(AParent: TdxReportCell; AFirstWeekOfYear: TcxFirstWeekOfYear; - AYear, AMonth: Word; AShowDatesContainingEventsInBold, AShowWeekNumbers: Boolean); virtual; - - procedure AdjustSize(var AContentParams, AHeaderParams: TdxReportItemViewParams; AHeight, AMaxHeight: Integer); virtual; - function CalculateSize(const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; - class function MeasureDateNavigatorHeight(const AContentParams, AHeaderParams: TcxViewParams): Integer; virtual; - - property FirstWeekOfYear: TcxFirstWeekOfYear read FFirstWeekOfYear write FFirstWeekOfYear; - property Month: Word read FMonth write FMonth; - property ShowDatesContainingEventsInBold: Boolean read FShowDatesContainingEventsInBold write FShowDatesContainingEventsInBold; - property ShowWeekNumbers: Boolean read FShowWeekNumbers write FShowWeekNumbers; - property StartOfWeek: TDay read FStartOfWeek; - property Year: Word read FYear write FYear; - - // Helpers - property DayCaptionCount: Integer read FDayCaptionCount; - property DayCaptions[Index: Integer]: TcxSchedulerReportDateNavigatorDayCaption read GetDayCaption; - property DayCount: Integer read FDayCount; - property Days[Index: Integer]: TcxSchedulerReportDateNavigatorDay read GetDay; - property Header: TcxSchedulerReportDateNavigatorHeader read GetHeader; - property WeekNumberCount: Integer read FWeekNumberCount; - property WeekNumbers[Index: Integer]: TcxSchedulerReportDateNavigatorWeekNumber read GetWeekNumber; - end; - - { TcxSchedulerReportSchedulingAreaCell } - - TcxSchedulerReportSchedulingAreaCell = class(TcxSchedulerReportPageItemCell) - private - FVisibleDays: TcxSchedulerDateList; - FDaysList: TStringList; - protected - function GetType: TcxSchedulerReportItemsType; override; - property VisibleDays: TcxSchedulerDateList read FVisibleDays; - public - constructor Create(AParent: TdxReportCell); override; - destructor Destroy; override; - procedure DrawContent(DC: HDC; DrawRect: TRect; const OriginRect: TRect; AStage: TdxPSRenderStages); override; - procedure DrawItself(DC: HDC; AStage: TdxPSRenderStages); override; - end; - - TcxSchedulerReportCustomCell = class(TAbstractdxReportCellData) - private - function GetReportLink: TcxSchedulerReportLink; - protected - FDateTime: TDateTime; - FDayBorderColor: TColor; - procedure DrawCellFrame(DC: HDC; const ARect: TRect; ABorders: TcxBorders = []; - ABorderColor: TColor = clDefault; ALineWidth: Integer = 1); - procedure DrawCellRect(DC: HDC; const ARect: TRect; ABorders: TcxBorders = []; - ABorderColor: TColor = clDefault; ALineWidth: Integer = 1; AColor: TColor = clDefault); - procedure DrawCellText(DC: HDC; const ARect: TRect; const AText: string; - AlignHorz: TcxTextAlignX; AlignVert: TcxTextAlignY; AFont: TFont = nil; AColor: TColor = clDefault); - procedure DrawCellTextVert(DC: HDC; const ARect: TRect; const AText: string); - procedure DrawCellState(DC: HDC; R: TRect; - AState: Integer; ABorders: TcxBorders = []; ABorderColor: TColor = clBlack); - - function ExcludeBorders(const ARect: TRect; ABorders: TcxBorders; ABorderWidth: Integer = 1): TRect; - function FixupWidth(AWidth: Integer): Integer; - function GetFixupRect(DC: HDC; const ARect: TRect): TRect; - function InflateRect(const ARect: TRect; dX, dY: Integer): TRect; - function TextRect(const ARect: TRect): TRect; - - property ReportLink: TcxSchedulerReportLink read GetReportLink; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); virtual; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class procedure RegisterMirrorClass; virtual; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; virtual; - procedure SuppressColoration; virtual; - end; - - { TcxSchedulerReportContentCell } - - TcxSchedulerReportContentCell = class(TcxSchedulerReportCustomCell) - protected - FBorderColor: TColor; - FShowTimeLine: Boolean; - FState: Integer; - FTimeLineBorders: TcxBorders; - function HasBorderColoration: Boolean; override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - procedure SuppressColoration; override; - end; - - { TcxSchedulerReportHeaderItemCell } - - TcxSchedulerReportHeaderItemCell = class(TcxSchedulerReportCustomCell) - private - FCaption: string; - FDate: TDateTime; - FIsResourceHeader: Boolean; - FResourceID: Variant; - FRotateText: Boolean; - function GetTextAlignX: TcxTextAlignX; - function GetTextAlignY: TcxTextAlignY; - procedure SetTextAlignX(Value: TcxTextAlignX); - procedure SetTextAlignY(Value: TcxTextAlignY); - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - property TextAlignX: TcxTextAlignX read GetTextAlignX write SetTextAlignX; - property TextAlignY: TcxTextAlignY read GetTextAlignY write SetTextAlignY; - property Caption: string read FCaption write FCaption; - property Date: TDateTime read FDate; - property IsResourceHeader: Boolean read FIsResourceHeader; - property ResourceID: Variant read FResourceID; - property RotateText: Boolean read FRotateText; - end; - - { TcxSchedulerReportGroupSeparatorCell } - - TcxSchedulerReportGroupSeparatorCell = class(TcxSchedulerReportCustomCell) - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - end; - - { TcxSchedulerReportContainerCell } - - TcxSchedulerReportContainerCell = class(TcxSchedulerReportCustomCell) - public - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - end; - - { TcxSchedulerReportBackgroundSlotCell } - - TcxSchedulerReportBackgroundSlotCell = class(TcxSchedulerReportCustomCell) - protected - FDisplayText: string; - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - property DisplayText: string read FDisplayText write FDisplayText; - end; - - { TcxSchedulerReportDailyTimeRulerCellsSite } - - TcxSchedulerReportDailyTimeRulerCellsSite = class(TdxReportCell) - private - FLargeFont: TFont; - FLargeFontIndex: Integer; - function GetLargeFont: TFont; - protected - procedure SetFontIndex(Index: Integer); override; - procedure ReadProperties(AReader: TdxPSDataReader); override; - procedure WriteProperties(AWriter: TdxPSDataWriter); override; - public - constructor Create(AParent: TdxReportCell); override; - destructor Destroy; override; - property LargeFont: TFont read GetLargeFont; - end; - - { TcxSchedulerReportDailyTimeRulerCell } - - TcxSchedulerReportDailyTimeRulerCell = class(TcxSchedulerReportCustomCell) - private - function GetBoundsRect(AType: Boolean): TRect; - function GetDisplayText(AType: Boolean): string; - function GetLargeFont: TFont; - function GetTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; - protected - FHasAdditionalTimeZone: Boolean; - FLineCount: Integer; - FLineColor: TColor; - FBounds: array[Boolean] of TRect; - FDisplayTexts: array[Boolean] of string; - FHour: Integer; - procedure CalculateDisplayInfo; - procedure DrawTimeZone(DC: HDC; const ABounds: TRect; const AText: string; AIsCurrent: Boolean); virtual; - procedure DrawTimeZoneLabel(DC: HDC; const ABounds: TRect; const AText: string; ABorders: TcxBorders); virtual; - - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - - property LargeFont: TFont read GetLargeFont; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - procedure SuppressColoration; override; - - property Bounds[ACurrentTimeZone: Boolean]: TRect read GetBoundsRect; - property DisplayTexts[ACurrentTimeZone: Boolean]: string read GetDisplayText; - property HasAdditionalTimeZone: Boolean read FHasAdditionalTimeZone; - property Hour: Integer read FHour; - property LineCount: Integer read FLineCount; - property TimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite read GetTimeRulerSite; - end; - - { TcxSchedulerReportMonthDayCell } - - TcxSchedulerReportMonthDayCell = class(TcxSchedulerReportContentCell) - private - FDisplayText: string; - FDontPrint: Boolean; - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - public - constructor CreateFrom(AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); override; - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - class function SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; override; - property DisplayText: string read FDisplayText write FDisplayText; - end; - - { TcxSchedulerReportTimeLinePart} - - TcxSchedulerReportTimeLinePart = class(TdxReportCellBox) - private - FState: Integer; - FTriangle: Boolean; - protected - procedure ReadData(AReader: TdxPSDataReader); override; - procedure WriteData(AWriter: TdxPSDataWriter); override; - property State: Integer read FState write FState; - public - constructor CreateEx(AParent: TdxReportCell; ATriangle: Boolean; AState: Integer); - procedure Assign(Source: TPersistent); override; - procedure DrawContent(DC: HDC; AStage: TdxPSRenderStages); override; - end; - - { TcxSchedulerReportTimeLineCell } - - TcxSchedulerReportTimeLineCell = class(TdxReportCell) - private - FCurrentValue: TAbstractdxReportCellData; - public - constructor Create(AParent: TdxReportCell); override; - procedure SetTimeRect(const ABounds: TRect; AState: Integer); - end; - - { TcxSchedulerReportCustomEventCell } - - TcxSchedulerReportCustomEventCell = class(TdxReportCell) - private - function GetPrintStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetReportLink: TcxSchedulerReportLink; - function GetSuppressColoration: Boolean; - protected - FCaptionCell: TdxReportCellString; - FIconsCell: TdxReportCellString; - FMessageCell: TAbstractdxReportCellData; - FStartCell: TdxReportCellString; - FFinishCell: TdxReportCellString; - FTimeLineCell: TcxSchedulerReportTimeLineCell; - procedure SetViewParams(const AViewParams: TcxViewParams); virtual; - public - function CreateStringCell(const AText: string; AData: Integer = 0): TdxReportCellString; virtual; - - property CaptionCell: TdxReportCellString read FCaptionCell; - property IconsCell: TdxReportCellString read FIconsCell; - property StartCell: TdxReportCellString read FStartCell; - property FinishCell: TdxReportCellString read FFinishCell; - property MessageCell: TAbstractdxReportCellData read FMessageCell; - property PrintStyle: TcxCustomSchedulerReportLinkPrintStyle read GetPrintStyle; - property ReportLink: TcxSchedulerReportLink read GetReportLink; - property TimeLineCell: TcxSchedulerReportTimeLineCell read FTimeLineCell; - property SuppressColoration: Boolean read GetSuppressColoration; - end; - - { TcxSchedulerReportEventCell } - - TcxSchedulerReportEventCell = class(TcxSchedulerReportCustomEventCell) - private - FContentBounds: TRect; - FEditViewInfo: TcxCustomEditViewInfo; - FEventViewInfo: TcxSchedulerEventCellViewInfo; - FHasDetailInfo: Boolean; - FHasIcons: Boolean; - FHasMessage: Boolean; - FIconsString: string; - FIsHeaderEvent: Boolean; - FIsNeedCreateTimeCells: Boolean; - FMessage: Variant; - procedure CheckBounds(var ABounds: TRect); - function GetEvent: TcxSchedulerControlEvent; - protected - procedure AdjustItemsHeight; virtual; - procedure CalculateLayout; virtual; - procedure CalculateTimeLine(DC: HDC); virtual; - function CreateCaptionCell: TdxReportCellString; virtual; - procedure CreateDataItems; virtual; - function CreateIconCells: TdxReportCellString; virtual; - procedure CreateMessageCell(AMessage: Variant; - AProperties: TcxCustomEditProperties; AViewParams: TcxViewParams); - function CreateTimeLineCell: TcxSchedulerReportTimeLineCell; virtual; - function CreateTimeTextCell(const ATimeText: string): TdxReportCellString; virtual; - function GetCaptionRect(DC: HDC): TRect; virtual; - function GetContentBounds(DC: HDC): TRect; virtual; - function GetHasIcons: Boolean; virtual; - function GetHasMessage: Boolean; virtual; - function GetIconsRect(DC: HDC): TRect; virtual; - function GetIconsString: string; virtual; - function GetMessageClass(AProperties: TcxCustomEditProperties): TdxReportCellDataClass; virtual; - function GetMessageRect(DC: HDC): TRect; virtual; - function GetRelativeRect(const R: TRect): TRect; - function GetTimeLineRect(DC: HDC): TRect; virtual; - procedure InitializeFromViewInfo(AEventViewInfo: TcxSchedulerEventCellViewInfo); - procedure SetViewParams(const AViewParams: TcxViewParams); override; - - property ContentBounds: TRect read FContentBounds; - property Event: TcxSchedulerControlEvent read GetEvent; - property EventViewInfo: TcxSchedulerEventCellViewInfo read FEventViewInfo; - property HasDetailInfo: Boolean read FHasDetailInfo; - property HasIcons: Boolean read FHasIcons; - property IsHeaderEvent: Boolean read FIsHeaderEvent; - property IsNeedCreateTimeCells: Boolean read FIsNeedCreateTimeCells; - public - constructor CreateFrom(AParent: TdxReportCell; AEventViewInfo: TcxSchedulerEventCellViewInfo); virtual; - - property CaptionCell: TdxReportCellString read FCaptionCell; - property HasMessage: Boolean read FHasMessage; - property Message: Variant read FMessage; - property MessageCell; - property TimeLineCell; - property IconsCell; - property IconsString: string read FIconsString; - property StartCell; - property FinishCell; - end; - - { TcxSchedulerReportDetailsEventCell } - - TcxSchedulerReportDetailsEventCell = class(TcxSchedulerReportCustomEventCell) - protected - FContinued: Boolean; - FDate: TDateTime; - - FEvent: TcxSchedulerEvent; - FLineHeight: Integer; - procedure CreateCaptionCell; virtual; - procedure CreateDataItems; virtual; - procedure CreateMessageCell; virtual; - procedure CreateTimeCell; virtual; - function GetCaptionCellText: string; virtual; - function GetMessageCellText: string; virtual; - function GetTimeCellText: string; virtual; - procedure SetViewParams(const AViewParams: TcxViewParams); override; - public - constructor CreateEx(AParent: TdxReportCell; AEvent: TcxSchedulerEvent; - ADate: TDateTime; const AParams: TcxViewParams; AContinued: Boolean = False); - function CalculateHeight: Integer; virtual; - procedure CalculateLayout(AWidth, ATimeWidth: Integer); virtual; - - property Date: TDateTime read FDate; - property Event: TcxSchedulerEvent read FEvent; - property Continued: Boolean read FContinued; - end; - - { TcxSchedulerReportMemoEventCell } - - TcxSchedulerReportMemoEventCell = class(TcxSchedulerReportDetailsEventCell) - protected - FCaptionLabelCell: TdxReportCellString; - FHeaderCell: TdxReportCellString; - FLocationCell: TdxReportCellString; - FLocationLabelCell: TdxReportCellString; - FShowTimeAsCell: TdxReportCellString; - FShowTimeAsLabelCell: TdxReportCellString; - FStartLabelCell: TdxReportCellString; - FFinishLabelCell: TdxReportCellString; - FRecurrenceCell: TdxReportCellString; - FRecurrenceLabelCell: TdxReportCellString; - FRecurrencePatternCell: TdxReportCellString; - FRecurrencePatternLabelCell: TdxReportCellString; - procedure CreateDataItems; override; - function GetCaptionCellText: string; override; - function GetMessageCellText: string; override; - function GetTimeCellText: string; override; - procedure SetViewParams(const AViewParams: TcxViewParams); override; - - procedure CalculateLabelAndData(ALabelCell, ADataCell: TAbstractdxReportCellData; - DC: HDC; ATimeWidth, AWidth: Integer; var ATop: Integer); virtual; - procedure CreateHeader; virtual; - procedure CreateFinish; virtual; - procedure CreateFinishCell; virtual; - procedure CreateFinishLabelCell; virtual; - procedure CreateLocation; virtual; - procedure CreateLocationCell; virtual; - procedure CreateLocationLabelCell; virtual; - procedure CreateMessage; virtual; - procedure CreateRecurrence; virtual; - procedure CreateRecurrenceCell; virtual; - procedure CreateRecurrenceLabelCell; virtual; - procedure CreateRecurrencePattern; virtual; - procedure CreateRecurrencePatternCell; virtual; - procedure CreateRecurrencePatternLabelCell; virtual; - procedure CreateShowTimeAs; virtual; - procedure CreateShowTimeAsCell; virtual; - procedure CreateShowTimeAsLabelCell; virtual; - procedure CreateStart; virtual; - procedure CreateStartLabelCell; virtual; - procedure CreateSubject; virtual; - procedure CreateSubjectLabelCell; virtual; - function GetHeaderCellText: string; virtual; - function GetRecurrenceCellText: string; virtual; - function GetRecurrencePatternCellText: string; virtual; - function GetShowTimeAsCellText: string; virtual; - public - procedure CalculateLayout(AWidth, ATimeWidth: Integer); override; - - property CaptionLabelCell: TdxReportCellString read FCaptionLabelCell; - property HeaderCell: TdxReportCellString read FHeaderCell; - property LocationCell: TdxReportCellString read FLocationCell; - property LocationLabelCell: TdxReportCellString read FLocationLabelCell; - property ShowTimeAsCell: TdxReportCellString read FShowTimeAsCell; - property ShowTimeAsLabelCell: TdxReportCellString read FShowTimeAsLabelCell; - property StartLabelCell: TdxReportCellString read FStartLabelCell; - property FinishLabelCell: TdxReportCellString read FFinishLabelCell; - property RecurrenceCell: TdxReportCellString read FRecurrenceCell; - property RecurrenceLabelCell: TdxReportCellString read FRecurrenceLabelCell; - property RecurrencePatternCell: TdxReportCellString read FRecurrencePatternCell; - property RecurrencePatternLabelCell: TdxReportCellString read FRecurrencePatternLabelCell; - end; - - { TcxSchedulerReportCommonCellsProducer } - - TcxSchedulerReportCommonCellsProducer = class(TcxCustomResourceViewAdapter) - private - FSite: TcxSchedulerReportSchedulingAreaCell; - FStyle: TcxCustomSchedulerReportLinkPrintStyle; - function GetStyles: TcxSchedulerReportLinkStyles; - protected - FBounds: TRect; - - procedure AfterCalculatePage; override; - - function CanCalculate: Boolean; override; - - procedure ConvertSchedulerCellToPSCells(AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); virtual; - function CreateEventCell(AEventViewInfo: TcxSchedulerEventCellViewInfo): TcxSchedulerReportEventCell; virtual; - - procedure DoInitialize( - var ASelectedDays: TcxSchedulerDateList; var AEvents: TcxSchedulerCachedEventList); override; - // layout settings - function GetCompressWeekends: Boolean; override; - function GetDontPrintWeekEnds: Boolean; override; - function GetHideSelection: Boolean; override; - function GetPageBounds: TRect; override; - function GetPagesPerWeek: Byte; override; - function GetPrintExactlyOneMonth: Boolean; override; - function GetPrintRange(Index: Integer): TDateTime; override; - function GetPrimaryPage: Boolean; override; - function GetStylesAdapter: IcxSchedulerStylesAdapter; override; - // styles - procedure SetCellViewParams(ACell: TdxReportVisualItem; const AParams: TcxViewParams); virtual; - public - constructor CreateEx(AStyle: TcxCustomSchedulerReportLinkPrintStyle; - ASite: TcxSchedulerReportSchedulingAreaCell); virtual; - procedure GetPageResources(AResources: TcxObjectList); override; - procedure Produce; virtual; - property Site: TcxSchedulerReportSchedulingAreaCell read FSite; - property Style: TcxCustomSchedulerReportLinkPrintStyle read FStyle; - property Styles: TcxSchedulerReportLinkStyles read GetStyles; - end; - - TcxSchedulerReportCommonCellsProducerClass = class of TcxSchedulerReportCommonCellsProducer; - - { TcxSchedulerReportWeeksCellsProducer } - - TcxSchedulerReportWeeksCellsProducer = class(TcxSchedulerReportCommonCellsProducer) - end; - - { TcxSchedulerReportDailyCellsProducer } - - TcxSchedulerReportDailyCellsProducer = class(TcxSchedulerReportCommonCellsProducer) - private - FRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; - protected - procedure AfterCalculatePage; override; - procedure BeforeCalculatePage; override; - - function CreateTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; virtual; - procedure ConvertSchedulerCellToPSCells(AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); override; - end; - -var - SpecialSymbolFont: TFont; - -implementation - -{$R *.dfm} -{$R dxPScxSchedulerLnk.res} - -uses - Messages, ShlObj, dxPSUtl, dxPSRes, dxPSPopupMan, Math, -{$IFDEF DELPHI6} - DateUtils, Types, -{$ENDIF} - ActiveX, CommCtrl; - -const - IDB_DXPSSCHEDULER_STYLEDESIGNPREVIEW = 'IDB_DXPSSCHEDULER_STYLEDESIGNPREVIEW'; - IDB_DXPSSCHEDULER_SMALLDESIGNPREVIEW = 'IDB_DXPSSCHEDULER_SMALLDESIGNPREVIEW'; - dxFormatShowDaysWithEventsInBold = dxPSGlbl.dxFormatCheckEnabled; - dxFormatDayIsBold = dxPSGlbl.dxFormatCheckChecked; - -type - TLongRec = packed record - Bytes: array [0..3] of Byte; - end; - - TControlAccess = class(TControl); - TcxSchedulerCachedEventListAccess = class(TcxSchedulerCachedEventList); - -var - MirrorClasses: TList; - StyleImages: TImageList; - SchedulerFontHandle: THandle; - SchedulerFontFileName: string; - StylePreviewImages: TImageList; - StyleSheetPrototype: TcxSchedulerReportLinkStyleSheet; - -{$IFNDEF DELPHI6} -function StartOfTheDay(const AValue: TDateTime): TDateTime; -begin - Result := Trunc(AValue); -end; - -function EndOfTheDay(const AValue: TDateTime): TDateTime; -begin - Result := Trunc(AValue) + EncodeTime(23, 59, 59, 999); -end; - -function StartOfTheWeek(const AValue: TDateTime): TDateTime; -begin - Result := Trunc(AValue) - (DayOfTheWeek(AValue) - 1); -end; - -function EndOfTheWeek(const AValue: TDateTime): TDateTime; -begin - Result := EndOfTheDay(StartOfTheWeek(AValue) + 6); -end; - -{$ENDIF} - -procedure Rect2RectsVert(const ASource: TRect; var R1, R2: TRect); overload; -begin - R1 := ASource; - R2 := ASource; - R1.Bottom := (ASource.Bottom + ASource.Top - InterAreaSpace) div 2; - R2.Top := R1.Bottom + InterAreaSpace; -end; - -procedure Rect2RectsVert(const ASource: TRect; var R1, R2, R3: TRect); overload; -var - H: Integer; -begin - R1 := ASource; - R2 := ASource; - R3 := ASource; - H := ASource.Bottom - ASource.Top; - R1.Bottom := ASource.Top + MulDiv(H, 1, 3); - R2.Top := R1.Bottom + InterAreaSpace; - R2.Bottom := ASource.Top + MulDiv(H, 2, 3); - R3.Top := R2.Bottom + InterAreaSpace; -end; - -procedure Rect2RectsHorz(const ASource: TRect; var R1, R2: TRect); overload; -begin - R1 := ASource; - R2 := ASource; - R1.Right := (ASource.Left + ASource.Right - InterAreaSpace) div 2; - R2.Left := R1.Right + InterAreaSpace; -end; - -procedure Rect2RectsHorz(const ASource: TRect; var R1, R2, R3: TRect); overload; -var - W: Integer; -begin - R1 := ASource; - R2 := ASource; - R3 := ASource; - W := ASource.Right - ASource.Left; - R1.Right := ASource.Left + MulDiv(W, 1, 3); - R2.Left := R1.Right + InterAreaSpace; - R2.Right := ASource.Left + MulDiv(W, 2, 3); - R3.Left := R2.Right + InterAreaSpace; -end; - -function AdditionalWidth(const ABounds: TRect): Integer; -begin - with ABounds do - Result := Round((Right - Left) * NotesAreaWidth) - InterAreaSpace div 2; -end; - -procedure SplitToRects(const ASource: TRect; AShowCalendar, - AIsRightArea: Boolean; out R1, R2: TRect); -begin - R1 := ASource; - R2 := ASource; - if AShowCalendar then - begin - if AIsRightArea then - begin - R2.Left := R2.Right - AdditionalWidth(R1); - R1.Right := R2.Left - InterAreaSpace; - end - else - begin - R2.Right := R2.Left + AdditionalWidth(R1); - R1.Left := R2.Right + InterAreaSpace; - end; - end; -end; - -function SchedulerLinkStyleSheetPrototype: TcxSchedulerReportLinkStyleSheet; - - function CreateStyle(AColor, AFontColor: TColor): TcxStyle; - begin - Result := TcxStyle.Create(StyleSheetPrototype); - with Result do - begin - Color := AColor; - Font.Name := dxPSCore.dxPSDefaultFontName; - Font.Color := AFontColor; - end; - end; - -begin - if StyleSheetPrototype = nil then - begin - StyleSheetPrototype := TcxSchedulerReportLinkStyleSheet.Create(nil); - with StyleSheetPrototype.Styles as TcxSchedulerReportLinkStyles do - begin - SchedulerHeader := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - Content := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - DateNavigatorContent := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - DateNavigatorHeader := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - DayHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Event := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ResourceHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - NotesAreaBlank := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - NotesAreaLined := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - TaskPad := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - TimeRuler := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - end; - end; - Result := StyleSheetPrototype; -end; - -function FindMirorClassForItem(AItem: TObject; - var APSItemClass: TcxSchedulerReportCustomCellClass): Boolean; -var - I: Integer; -begin - APSItemClass := nil; - Result := False; - for I := MirrorClasses.Count - 1 downto 0 do - begin - APSItemClass := MirrorClasses[I]; - if AItem.InheritsFrom(APSItemClass.SchedulerCellClass) then - begin - Result := True; - Break; - end; - end; -end; - -{ TcxSchedulerReportLinkRenderInfo } - -procedure TcxSchedulerReportLinkRenderInfo.DoCalculate; -var - I: Integer; -begin - if not IsLoading then - begin - if (ReportLink <> nil) and (ReportLink.PrintStyles.ActiveStyle <> nil) then - begin - FPageColCount := Byte(ReportLink.PrintStyles.ActiveStyle.Layout) + 1; - FPageRowCount := ReportLink.PageSites.Count; - end - else - begin - FPageColCount := 1; - FPageRowCount := 1; - end; - end; - inherited DoCalculate; - for I := 0 to PageRenderInfoCount - 1 do - with PageRenderInfos[I] do - TitleOffset := DataOffset; -end; - -function TcxSchedulerReportLinkRenderInfo.GetPageColCount: Integer; -begin - if not IsLoading then - Result := 1//FPageColCount - else - Result := inherited GetPageColCount; -end; - -function TcxSchedulerReportLinkRenderInfo.GetPageRowCount: Integer; -begin - if not IsLoading then - Result := FPageRowCount - else - Result := inherited GetPageColCount; -end; - -function TcxSchedulerReportLinkRenderInfo.IsLoading: Boolean; -begin - Result := ReportLink.DataSource = rldsExternalStorage; -end; - -function TcxSchedulerReportLinkRenderInfo.IsDrawPageTitleOnPage( - APageIndex: Integer): Boolean; -begin - Result := Rendering and IsDrawReportTitleOnPage(APageIndex); -end; - -function TcxSchedulerReportLinkRenderInfo.IsDrawReportTitleOnPage( - APageIndex: Integer): Boolean; -begin - case ReportLink.ReportTitleMode of - tmNone: - Result := False; - tmOnFirstPage: - Result := APageIndex = 0; - else - Result := APageIndex mod FPageColCount = 0; - end; -end; - -function TcxSchedulerReportLinkRenderInfo.GetReportLink: TcxSchedulerReportLink; -begin - Result := TcxSchedulerReportLink(inherited ReportLink); -end; - -{ TcxSchedulerReportRenderer } - -procedure TcxSchedulerReportRenderer.PrepareRenderPage; -begin - inherited PrepareRenderPage; - TcxSchedulerReportLinkRenderInfo(RenderInfo).Rendering := True; -end; - -procedure TcxSchedulerReportRenderer.UnprepareRenderPage; -begin - TcxSchedulerReportLinkRenderInfo(RenderInfo).Rendering := False; - inherited UnprepareRenderPage; -end; - -{ TcxSchedulerReportLink } - -constructor TcxSchedulerReportLink.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FPageSites := TList.Create; - FLookAndFeelItems := TList.Create; -end; - -destructor TcxSchedulerReportLink.Destroy; -begin - FreeAndNil(FPageSites); - FreeAndNil(FLookAndFeelItems); - inherited Destroy; -end; - -procedure TcxSchedulerReportLink.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLink then - with TcxSchedulerReportLink(Source) do - begin - Self.PrintRange := PrintRange; - Self.PrintStyles := PrintStyles; - end; - inherited; -end; - -class function TcxSchedulerReportLink.Aggregable: Boolean; -begin - Result := False; -end; - -procedure TcxSchedulerReportLink.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited; - if (TaskPadReportLink = AComponent) and (Operation = opRemove) then - TaskPadReportLink := nil; -end; - -// IdxReportLinkController -function TcxSchedulerReportLink.GetControlSiteBounds(AControl: TControl): TRect; -begin - if PrintStyles.ActiveStyle <> nil then - Result := PrintStyles.ActiveStyle.GetControlSiteBounds(AControl) - else - Result := NullRect; -end; - -procedure TcxSchedulerReportLink.ConstructReport(AReportCells: TdxReportCells); - - procedure CalculateSizes; - - procedure CalculateReportPartSizes(ACell: TdxReportCell); - var - Width, I, V: Integer; - begin - if ACell.CellCount > 0 then - begin - Width := 0; - for I := 0 to ACell.CellCount - 1 do - begin - V := ACell.Cells[I].Width; - if Width < V then Width := V; - end; - ACell.BoundsRect := MakeRect(0, 0, Width, ACell.LastCell.BoundsRect.Bottom); - end; - end; - - begin - with AReportCells do - begin - CalculateReportPartSizes(Cells); - if AreFooterCellsAllocated then CalculateReportPartSizes(FooterCells); - if AreHeaderCellsAllocated then CalculateReportPartSizes(HeaderCells); - end; - end; - -begin - if Scheduler = nil then Exit; - inherited; - - if PrintStyles.ActiveStyle = nil then - Exit; - - PrepareConstruct; - try - BuildStyle; - if not AbortBuilding then CalculateSizes; - finally - UnprepareConstruct; - end; -end; - -procedure TcxSchedulerReportLink.DoCreateReport; -begin - if (PrintStyles.ActiveStyle = nil) or not PrintStyles.ActiveStyleAssigned then - PrintStyles.SetActiveStyleEx(PrintStyles.GetCorrespondingStyle); - inherited DoCreateReport; -end; - -function TcxSchedulerReportLink.GetRealScaleFactor: Integer; -begin - Result := 100; -end; - -procedure TcxSchedulerReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -begin - case AItem.GetCustomDrawID of - cdidSchedulerContent: - DoCustomDrawContentCell(ACanvas, TcxSchedulerReportContentCell(AItem), ADone); - cdidSchedulerSchedulerHeader: - DoCustomDrawSchedulerHeaderCell(ACanvas, TcxSchedulerReportSchedulerHeaderDataCell(AItem), ADone); - cdidSchedulerDateNavigatorHeader: - DoCustomDrawDateNavigatorHeaderCell(ACanvas, TcxSchedulerReportDateNavigatorHeader(AItem), ADone); - cdidSchedulerDateNavigatorDay: - DoCustomDrawDateNavigatorDayCell(ACanvas, TcxSchedulerReportDateNavigatorDay(AItem), ADone); - cdidSchedulerDateNavigatorDayCaption: - DoCustomDrawDateNavigatorDayCaptionCell(ACanvas, TcxSchedulerReportDateNavigatorDayCaption(AItem), ADone); - cdidSchedulerDateNavigatorWeekNumber: - DoCustomDrawDateNavigatorWeekNumberCell(ACanvas, TcxSchedulerReportDateNavigatorWeekNumber(AItem), ADone); - cdidSchedulerTimeRuler: - DoCustomDrawTimeRulerCell(ACanvas, TcxSchedulerReportDailyTimeRulerCell(AItem), ADone); - cdidSchedulerEventCaption..cdidSchedulerEventTimeLine: - DoCustomDrawEventPartCell(ACanvas, AItem, ADone); - cdidSchedulerNotesArea: - DoCustomDrawNotesCell(ACanvas, TcxSchedulerReportNotesDataCell(AItem), ADone); - cdidSchedulerTaskPad: - DoCustomDrawTaskPadCell(ACanvas, TcxSchedulerReportNotesDataCell(AItem), ADone); - cdidSchedulerHeader: - DoCustomDrawHeaderCell(ACanvas, TcxSchedulerReportHeaderItemCell(AItem), ADone); - end; -end; - -procedure TcxSchedulerReportLink.DoCanPrintEvent(AEvent: TcxSchedulerEvent; - var AllowPrint: Boolean); -begin - if Assigned(FOnCanPrintEvent) then - FOnCanPrintEvent(Self, AEvent, AllowPrint); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawSchedulerHeaderCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportSchedulerHeaderDataCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawSchedulerHeaderCell) then - FOnCustomDrawSchedulerHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorHeaderCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorHeader; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorHeaderCell) then - FOnCustomDrawDateNavigatorHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorDayCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDay; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorDayCell) then - FOnCustomDrawDateNavigatorDayCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorDayCaptionCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorDayCaption; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorDayCaptionCell) then - FOnCustomDrawDateNavigatorDayCaptionCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawDateNavigatorWeekNumberCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDateNavigatorWeekNumber; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawDateNavigatorWeekNumberCell) then - FOnCustomDrawDateNavigatorWeekNumberCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawTimeRulerCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportDailyTimeRulerCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawTimeRulerCell) then - FOnCustomDrawTimeRulerCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawContentCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportContentCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawContentCell) then - FOnCustomDrawContentCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawHeaderCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportHeaderItemCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeaderCell) then - FOnCustomDrawHeaderCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawEventPartCell( - ACanvas: TCanvas; AItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawEventPartCell) then - FOnCustomDrawEventPartCell(Self, ACanvas, AItem, - TcxSchedulerReportEventPartType(AItem.GetCustomDrawID - cdidSchedulerEventCaption), - ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawNotesCell(ACanvas: TCanvas; - AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawNotesCell) then - FOnCustomDrawNotesCell(Self, ACanvas, AItem, ADone); -end; - -procedure TcxSchedulerReportLink.DoCustomDrawTaskPadCell( - ACanvas: TCanvas; AItem: TcxSchedulerReportNotesDataCell; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawTaskPadCell) then - FOnCustomDrawTaskPadCell(Self, ACanvas, AItem, ADone); -end; - -function TcxSchedulerReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - if PrintStyles.ActiveStyle <> nil then - Result := PrintStyles.ActiveStyle.GetRebuildOnPageParamsChange(AUpdateCodes) - else - Result := inherited GetRebuildOnPageParamsChange(AUpdateCodes); -end; - -function TcxSchedulerReportLink.GetRendererClass: TdxPSReportRendererClass; -begin - Result := TcxSchedulerReportRenderer; -end; - -function TcxSchedulerReportLink.GetRenderInfoClass: TdxPSReportRenderInfoClass; -begin - Result := TcxSchedulerReportLinkRenderInfo; -end; - -procedure TcxSchedulerReportLink.InternalRestoreDefaults; -begin - inherited; - PrintRange.RestoreDefaults; - PrintStyles.RestoreDefaults; -end; - -procedure TcxSchedulerReportLink.InternalRestoreFromOriginal; -begin - inherited; -end; - -procedure TcxSchedulerReportLink.RebuildReport; -begin - inherited RebuildReport; - if DesignWindow <> nil then - DesignWindow.UpdatePreview; -end; - -procedure TcxSchedulerReportLink.PrepareConstruct; -begin - FLookAndFeelItems.Clear; - inherited PrepareConstruct; -end; - -procedure TcxSchedulerReportLink.UnprepareConstruct; -begin - FormatLookAndFeelItems; - inherited UnprepareConstruct; -end; - -procedure TcxSchedulerReportLink.CreateOptions; -begin - inherited CreateOptions; - FPrintRange := CreatePrintRange; - FPrintStyles := CreatePrintStyles; -end; - -procedure TcxSchedulerReportLink.DestroyOptions; -begin - FreeAndNil(FPrintStyles); - FreeAndNil(FPrintRange); - inherited DestroyOptions; -end; - -function TcxSchedulerReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TcxSchedulerReportLinkOptionsFormatting; -end; - -function TcxSchedulerReportLink.CreatePrintRange: TcxSchedulerReportLinkPrintRange; -begin - Result := TcxSchedulerReportLinkPrintRange.Create(Self); -end; - -function TcxSchedulerReportLink.CreatePrintStyles: TcxSchedulerReportLinkPrintStyles; -begin - Result := TcxSchedulerReportLinkPrintStyles.Create(Self); -end; - -function TcxSchedulerReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := OptionsFormatting.UseNativeStyles; -end; - -function TcxSchedulerReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TcxSchedulerReportLinkStyles; -end; - -function TcxSchedulerReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TcxSchedulerReportLinkStyleSheet; -end; - -function TcxSchedulerReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := SchedulerLinkStyleSheetPrototype; -end; - -procedure TcxSchedulerReportLink.ActivePrintStyleChanged; -begin - if not IsDestroying and not IsLoading then - begin - if Active then - begin - FreeRenderInfos; - FreeRenderer; - RebuildReport; - end; - DoActivePrintStyleChanged; - end; -end; - -procedure TcxSchedulerReportLink.DoActivePrintStyleChanged; -begin - if Assigned(FOnActivePrintStyleChanged) then FOnActivePrintStyleChanged(Self); -end; - -procedure TcxSchedulerReportLink.FormatLookAndFeelItems; -const - Borders3D: array[Boolean] of TdxPSCellBorderClass = - (TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder); -var - I: Integer; -begin - for I := 0 to LookAndFeelItemCount - 1 do - with LookAndFeelItems[I] do - if Effects3D then - BorderClass := Borders3D[Soft3D] - else - BorderClass := TdxPSCellUltraFlatBorder; -end; - -procedure TcxSchedulerReportLink.RegisterLookAndFeelItem(AItem: TdxReportVisualItem; - AEdgeStyle: TdxCellEdgeStyle); -begin - AItem.EdgeMode := Self.EdgeMode; - AItem.Edge3DStyle := AEdgeStyle; - FLookAndFeelItems.Add(AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeSchedulingAreaCell( - AItem: TcxSchedulerReportSchedulingAreaCell); -begin - if Assigned(FOnInitializeSchedulingAreaCell) then - FOnInitializeSchedulingAreaCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeEventCell(AItem: TcxSchedulerReportCustomEventCell); -begin - if Assigned(FOnInitializeEventCell) then - FOnInitializeEventCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeHeaderPrimaryCell( - AItem: TcxSchedulerReportSchedulerHeaderCell); -begin - if Assigned(FOnInitializeHeaderPrimaryCell) then - FOnInitializeHeaderPrimaryCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeHeaderSecondaryCell( - AItem: TcxSchedulerReportSchedulerHeaderCell); -begin - if Assigned(FOnInitializeHeaderSecondaryCell) then - FOnInitializeHeaderSecondaryCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeNotesAreaCell( - AItem: TcxSchedulerReportNotesAreaCell); -begin - if Assigned(FOnInitializeNotesAreaCell) then - FOnInitializeNotesAreaCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.DoInitializeTaskPadCell( - AItem: TcxSchedulerReportTaskPadCell); -begin - if Assigned(FOnInitializeTaskPadCell) then - FOnInitializeTaskPadCell(Self, AItem); -end; - -procedure TcxSchedulerReportLink.AssignTaskPadData(ATaskPad: TcxSchedulerReportTaskPadCell); - - procedure CropData(ASite: TdxReportCell); - var - CropBounds, R: TRect; - I: Integer; - Cell: TdxReportCell; - begin - CropBounds := ASite.AbsoluteRect; - for I := ASite.CellCount - 1 downto 0 do - begin - Cell := ASite.Cells[I]; - if not IntersectRect(R, Cell.AbsoluteRect, CropBounds) then - Cell.Free; - end; - end; - -begin - if (TaskPadReportLink <> nil) and TaskPadReportLink.DataProviderPresent then - begin - TaskPadReportLink.Controller := Renderer.ReportLink; - try - TaskPadReportLink.RebuildReport; - ATaskPad.TaskPadDataSite.Assign(TaskPadReportLink.ReportCells.Cells); - CropData(ATaskPad.TaskPadDataSite); - ATaskPad.TaskPadDataSite.ClipChildren := True; - finally - TaskPadReportLink.Controller := nil; - end; - end; -end; - -procedure TcxSchedulerReportLink.InitializeTaskPadCell(ATaskPad: TcxSchedulerReportTaskPadCell); -begin - AssignTaskPadData(ATaskPad); - DoInitializeTaskPadCell(ATaskPad); -end; - -procedure TcxSchedulerReportLink.SetCellViewParams( - ACell: TdxReportVisualItem; const AParams: TcxViewParams); -var - AdxPSViewParams: TdxReportItemViewParams; -begin - if not Assigned(ACell) then Exit; - FillChar(AdxPSViewParams, SizeOf(AdxPSViewParams), 0); - AdxPSViewParams.NativeParams := AParams; - SetCellViewParams(ACell, AdxPSViewParams); -end; - -procedure TcxSchedulerReportLink.SetCellViewParams( - ACell: TdxReportVisualItem; const AParams: TdxReportItemViewParams); -var - AFont: TFont; - AHasBitmap: Boolean; -begin - if not Assigned(ACell) then Exit; - AFont := TFont.Create; - try - AFont.Assign(AParams.NativeParams.Font); - if not dxPSUtl.dxIsTrueTypeFont(AFont) then - AFont.Name := Font.Name; - AFont.Color := ColorToRGB(AParams.NativeParams.TextColor); - if AParams.FontSize <> 0 then - AFont.Size := AParams.FontSize; - AFont.Style := AFont.Style + AParams.FontStyle; - ACell.FontIndex := AddFontToPool(AFont); - ACell.Transparent := ACell.Transparent or AParams.Transparent; - with AParams.NativeParams do - begin - AHasBitmap := not OptionsFormatting.SuppressBackgroundBitmaps and - (Bitmap <> nil) and not Bitmap.Empty; - if AHasBitmap then - ACell.BackgroundBitmapIndex := AddBackgroundBitmapToPool(Bitmap); - end; - if OptionsFormatting.SuppressContentColoration and not AHasBitmap then - ACell.Color := clWhite - else - ACell.Color := ColorToRGB(AParams.NativeParams.Color); - finally - AFont.Free; - end; -end; - -function TcxSchedulerReportLink.AddPageSite( - const ABounds: TRect): TcxSchedulerReportPageSite; -begin - Result := TcxSchedulerReportPageSite.Create(ReportCells.Cells); - Result.BoundsRect := ABounds; - Result.CellSides := []; - Result.Transparent := True; - FPageSites.Add(Result); - AddVerticalDelimiter(Result); - AddHorizontalDelimiter(Result); -end; - -procedure TcxSchedulerReportLink.BuildStyle; -begin - FPageSites.Clear; - if PrintStyles.ActiveStyle <> nil then - with PrintStyles.ActiveStyle do - begin - BeforeBuild; - RenderInfo.FPageColCount := Byte(PrintStyles.ActiveStyle.Layout) + 1; - try - Build; - finally - AfterBuild; - end; - end; -end; - -function TcxSchedulerReportLink.GetActiveStyles: TcxSchedulerReportLinkStyles; -begin - Result := inherited ActiveStyles as TcxSchedulerReportLinkStyles; -end; - -function TcxSchedulerReportLink.GetDesignWindow: TcxfmSchedulerReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TcxfmSchedulerReportLinkDesignWindow; -end; - -function TcxSchedulerReportLink.GetEdgeMode: TdxCellEdgeMode; -const - EdgeModeMap: array[Boolean] of TdxCellEdgeMode = (cemPattern, cem3DEffects); -begin - Result := EdgeModeMap[OptionsFormatting.LookAndFeelKind <> lfUltraFlat]; -end; - -function TcxSchedulerReportLink.GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; -begin - Result := TdxReportVisualItem(FLookAndFeelItems[Index]); -end; - -function TcxSchedulerReportLink.GetLookAndFeelItemCount: Integer; -begin - Result := FLookAndFeelItems.Count; -end; - -function TcxSchedulerReportLink.GetOptionsFormatting: TcxSchedulerReportLinkOptionsFormatting; -begin - Result := inherited OptionsFormatting as TcxSchedulerReportLinkOptionsFormatting; -end; - -function TcxSchedulerReportLink.GetPrintStyles: TcxSchedulerReportLinkPrintStyles; -begin - Result := FPrintStyles; -end; - -function TcxSchedulerReportLink.GetRenderInfo: TcxSchedulerReportLinkRenderInfo; -begin - Result := TcxSchedulerReportLinkRenderInfo(inherited RenderInfo); -end; - -function TcxSchedulerReportLink.GetScheduler: TcxScheduler; -begin - Result := Component as TcxScheduler; -end; - -function TcxSchedulerReportLink.GetStyles: TcxSchedulerReportLinkStyles; -begin - Result := inherited Styles as TcxSchedulerReportLinkStyles; -end; - -procedure TcxSchedulerReportLink.SetOptionsFormatting(Value: TcxSchedulerReportLinkOptionsFormatting); -begin - inherited OptionsFormatting := Value; -end; - -procedure TcxSchedulerReportLink.SetPrintRange(Value: TcxSchedulerReportLinkPrintRange); -begin - PrintRange.Assign(Value); -end; - -procedure TcxSchedulerReportLink.SetPrintStyles(Value: TcxSchedulerReportLinkPrintStyles); -begin - FPrintStyles.Assign(Value); -end; - -procedure TcxSchedulerReportLink.SetStyles(Value: TcxSchedulerReportLinkStyles); -begin - inherited Styles := Value; -end; - -procedure TcxSchedulerReportLink.SetTaskPadReportLink(Value: TBasedxReportLink); -begin - if (Value <> Self) and (FTaskPadReportLink <> Value) then - begin - FTaskPadReportLink := Value; - if FTaskPadReportLink <> nil then - FTaskPadReportLink.FreeNotification(Self); - LinkModified(True); - end; -end; - -{ TcxSchedulerReportLinkPrintRange } - -procedure TcxSchedulerReportLinkPrintRange.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkPrintRange then - with TcxSchedulerReportLinkPrintRange(Source) do - begin - Move(FDatePrint, Self.FDatePrint[0], SizeOf(FDatePrint)); - Move(FTimePrint, Self.FTimePrint[0], SizeOf(FTimePrint)); - end; - inherited Assign(Source); -end; - -procedure TcxSchedulerReportLinkPrintRange.RestoreDefaults; -begin - inherited RestoreDefaults; - FDatePrint[0] := NullDate; - FDatePrint[1] := NullDate; - FTimePrint[0] := NullDate; - FTimePrint[1] := NullDate; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultDatePrintFrom: TDate; -begin - if Scheduler <> nil then - Result := Scheduler.CurrentView.FirstVisibleDate - else - Result := Date; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultDatePrintTo: TDate; -begin - if Scheduler <> nil then - Result := Scheduler.CurrentView.LastVisibleDate - else - Result := Date; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultTimePrintFrom: TTime; -begin - if Scheduler <> nil then - Result := Scheduler.OptionsView.WorkStart - else - Result := 0; -end; - -function TcxSchedulerReportLinkPrintRange.DefaultTimePrintTo: TTime; -begin - if Scheduler <> nil then - Result := Scheduler.OptionsView.WorkFinish - else - Result := 0; -end; - -procedure TcxSchedulerReportLinkPrintRange.CheckTimeRange; -begin -{ if (PrintTo - PrintFrom) < 0 then - FPrintTo := DateOf(PrintFrom) + TimeOf(FPrintTo);} -end; - -function TcxSchedulerReportLinkPrintRange.GetDateTimeIF( - const AValue, ADefaultValue: TDateTime): TDateTime; -begin - Result := AValue; - if Trunc(Result) = NullDate then - Result := ADefaultValue; -end; - -function TcxSchedulerReportLinkPrintRange.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TcxSchedulerReportLinkPrintRange.GetActiveStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := ReportLink.PrintStyles.ActiveStyle; -end; - -function TcxSchedulerReportLinkPrintRange.GetDayCount: Integer; -begin - Result := Trunc(PrintTo) - Trunc(PrintFrom) + 1; - if Result < 1 then - Result := 1; -end; - -function TcxSchedulerReportLinkPrintRange.GetMonthCount: Integer; - - function MonthOfDate(const ADate: TDateTime): Integer; - var - Y, M, D: Word; - begin - DecodeDate(ADate, Y, M, D); - Result := Y * 12 + M; - end; - -begin - Result := MonthOfDate(PrintTo) - MonthOfDate(PrintFrom) + 1; -end; - -function TcxSchedulerReportLinkPrintRange.GetPrintDate(AIndex: Integer): TDate; -var - DefaultDate: TTime; -begin - if AIndex = 0 then - DefaultDate := DefaultDatePrintFrom - else - DefaultDate := DefaultDatePrintTo; - Result := GetDateTimeIF(DateOf(FDatePrint[AIndex]), DefaultDate); -end; - -function TcxSchedulerReportLinkPrintRange.GetPrintTime(AIndex: Integer): TTime; -var - DefaultTime: TTime; -begin - if AIndex = 0 then - DefaultTime := DefaultTimePrintFrom - else - DefaultTime := DefaultTimePrintTo; - Result := TimeOf(GetDateTimeIF(FTimePrint[AIndex], DefaultTime)); -end; - -function TcxSchedulerReportLinkPrintRange.GetWeekCount: Integer; -begin - Result := WeeksBetween(StartOfTheWeek(PrintFrom), IncDay(EndOfTheWeek(PrintTo))); - if Result < 1 then Result := 1; -end; - -procedure TcxSchedulerReportLinkPrintRange.SetPrintDate( - AIndex: Integer; const Value: TDate); -begin - if FDatePrint[AIndex] <> Value then - begin - FDatePrint[AIndex] := Value; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkPrintRange.SetPrintTime( - AIndex: Integer; const Value: TTime); -begin - if FTimePrint[AIndex] <> Value then - begin - FTimePrint[AIndex] := Value; - Changed; - end; -end; - -function TcxSchedulerReportLinkPrintRange.IsDateStored( - AIndex: Integer): Boolean; -begin - Result := FDatePrint[AIndex] <> NullDate; -end; - -function TcxSchedulerReportLinkPrintRange.IsTimeStored( - AIndex: Integer): Boolean; -begin - Result := FTimePrint[AIndex] <> NullDate; -end; - -{ TcxSchedulerReportLinkOptionsFormatting } - -procedure TcxSchedulerReportLinkOptionsFormatting.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxSchedulerReportLinkOptionsFormatting then - with TcxSchedulerReportLinkOptionsFormatting(Source) do - begin - Self.SuppressContentColoration := SuppressContentColoration; - end; -end; - -procedure TcxSchedulerReportLinkOptionsFormatting.RestoreDefaults; -begin - inherited; - SuppressContentColoration := False; -end; - -function TcxSchedulerReportLinkOptionsFormatting.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TcxSchedulerReportLinkOptionsFormatting.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; -end; - -procedure TcxSchedulerReportLinkOptionsFormatting.SetSuppressContentColoration(Value: Boolean); -begin - if FSuppressContentColoration <> Value then - begin - FSuppressContentColoration := Value; - Changed; - end; -end; - -{ TcxCustomSchedulerReportLinkOptions } - -function TcxCustomSchedulerReportLinkOptions.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; -end; - -function TcxCustomSchedulerReportLinkOptions.GetScheduler: TcxScheduler; -begin - if ReportLink <> nil then - Result := ReportLink.Scheduler - else - Result := nil; -end; - -{ TcxSchedulerReportLinkStyles } - -constructor TcxSchedulerReportLinkStyles.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - BitmapInViewParams := True; -end; - -procedure TcxSchedulerReportLinkStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxSchedulerReportLinkStyles then - with TcxSchedulerReportLinkStyles(Source) do - begin - Self.SchedulerHeader := SchedulerHeader; - Self.Content := Content; - Self.DateNavigatorContent := DateNavigatorContent; - Self.DateNavigatorHeader := DateNavigatorHeader; - Self.DayHeader := DayHeader; - Self.Event := Event; - Self.ResourceHeader := ResourceHeader; - Self.NotesAreaBlank := NotesAreaBlank; - Self.NotesAreaLined := NotesAreaLined; - Self.TaskPad := TaskPad; - Self.TimeRuler := TimeRuler; - end; -end; - -function TcxSchedulerReportLinkStyles.GetSchedulerHeaderParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerSchedulerHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetContentParams(const ADateTime: TDateTime; - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetContentParams(ADateTime, AResource) - else - GetViewParams(vspsSchedulerContent, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetContentParams(const ADateTime: TDateTime; - ALightColor: Boolean; AResource: TcxSchedulerStorageResourceItem): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetContentParams(ADateTime, ALightColor, AResource) - else - GetViewParams(vspsSchedulerContent, nil, nil, Result) -end; - -function TcxSchedulerReportLinkStyles.GetDateNavigatorContentParams: TcxViewParams; -begin - if UseSchedulerStyles then - begin - Result := TcxSchedulerDateNavigator( - ExtStyles.Scheduler.DateNavigator).Styles.GetContentParams - end - else - GetViewParams(vspsSchedulerDateNavigatorContent, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetDateNavigatorHeaderParams: TcxViewParams; -begin - if UseSchedulerStyles then - begin - Result := TcxSchedulerDateNavigator( - ExtStyles.Scheduler.DateNavigator).Styles.GetHeaderParams - end - else - GetViewParams(vspsSchedulerDateNavigatorHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetDayHeaderParams( - const ADateTime: TDateTime): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetDayHeaderParams(ADateTime) - else - GetViewParams(vspsSchedulerDayHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetEventParams( - AEvent: TcxSchedulerEvent): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetEventContentParams(AEvent) - else - GetViewParams(vspsSchedulerEvent, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetNotesAreaBlankParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerNotesAreaBlank, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetNotesAreaLinedParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerNotesAreaLined, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetResourceHeaderParams( - AResource: TcxSchedulerStorageResourceItem): TcxViewParams; -begin - if UseSchedulerStyles then - Result := ExtStyles.GetResourceHeaderParams(AResource) - else - GetViewParams(vspsSchedulerResourceHeader, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetTaskPadParams: TcxViewParams; -begin - GetViewParams(vspsSchedulerTaskPad, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.GetTimeRulerParams: TcxViewParams; -begin - if UseSchedulerStyles then - Result := ReportLink.Scheduler.ViewDay.Styles.GetTimeRulerParams - else - GetViewParams(vspsSchedulerTimeRuler, nil, nil, Result); -end; - -function TcxSchedulerReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 3; -end; - -procedure TcxSchedulerReportLinkStyles.GetDefaultViewParams(Index: Integer; - AData: TObject; out AParams: TcxViewParams); -const - FixedParts = [vspsSchedulerDayHeader, vspsSchedulerResourceHeader, vspsSchedulerTimeRuler]; -begin - inherited; - if ReportLink <> nil then - with AParams do - begin - if Index in FixedParts then - Color := dxPSCore.dxDefaultFixedColor - else - Color := dxDefaultContentColor; - Font := ReportLink.Font; - TextColor := Font.Color; - end; -end; - -class function TcxSchedulerReportLinkStyles.GetStyleCaption(AnIndex: Integer): string; -begin - case AnIndex of - vspsSchedulerSchedulerHeader: - Result := cxGetResourceString(@sdxSchedulerSchedulerHeader); - vspsSchedulerContent: - Result := cxGetResourceString(@sdxSchedulerContent); - vspsSchedulerDateNavigatorContent: - Result := cxGetResourceString(@sdxSchedulerDateNavigatorContent); - vspsSchedulerDateNavigatorHeader: - Result := cxGetResourceString(@sdxSchedulerDateNavigatorHeader); - vspsSchedulerDayHeader: - Result := cxGetResourceString(@sdxSchedulerDayHeader); - vspsSchedulerEvent: - Result := cxGetResourceString(@sdxSchedulerEvent); - vspsSchedulerResourceHeader: - Result := cxGetResourceString(@sdxSchedulerResourceHeader); - vspsSchedulerNotesAreaBlank: - Result := cxGetResourceString(@sdxSchedulerNotesAreaBlank); - vspsSchedulerNotesAreaLined: - Result := cxGetResourceString(@sdxSchedulerNotesAreaLined); - vspsSchedulerTaskPad: - Result := cxGetResourceString(@sdxSchedulerTaskPad); - else {vspsSchedulerTimeRuler} - Result := cxGetResourceString(@sdxSchedulerTimeRuler); - end; -end; - -function TcxSchedulerReportLinkStyles.GetStyleIndexByCaption(const Caption: string): Integer; -begin - for Result := vspsSchedulerFirst to vspsSchedulerLast do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Result)) then - Exit; - Result := -1; -end; - -// IcxSchedulerStylesAdapter -function TcxSchedulerReportLinkStyles.GetDayHeaderStyle: TcxStyle; -begin - if UseSchedulerStyles then - Result := ExtStyles.DayHeader - else - Result := DayHeader; -end; - -function TcxSchedulerReportLinkStyles.GetResourceHeaderStyle: TcxStyle; -begin - if UseSchedulerStyles then - Result := ExtStyles.ResourceHeader - else - Result := ResourceHeader; -end; - -function TcxSchedulerReportLinkStyles.GetExtStyles: TcxSchedulerStyles; -begin - Result := ReportLink.Scheduler.Styles; -end; - -function TcxSchedulerReportLinkStyles.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; - if Result = nil then - Result := FReportLink; -end; - -function TcxSchedulerReportLinkStyles.GetUseSchedulerStyles: Boolean; -begin - if ReportLink = nil then - begin - Result := False; - Exit; - end; - Result := not ReportLink.OptionsFormatting.UseNativeStyles; - if not Result then - Result := (ReportLink = nil) or (ReportLink.Scheduler = nil); -end; - -{ TcxSchedulerReportLinkStyleSheet } - -class function TcxSchedulerReportLinkStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxSchedulerReportLinkStyles; -end; - -function TcxSchedulerReportLinkStyleSheet.GetStylesValue: TcxSchedulerReportLinkStyles; -begin - if GetStyles is TcxSchedulerReportLinkStyles then - Result := TcxSchedulerReportLinkStyles(GetStyles) - else - Result := nil; -end; - -procedure TcxSchedulerReportLinkStyleSheet.SetStylesValue(Value: TcxSchedulerReportLinkStyles); -begin - SetStyles(Value); -end; - -{ TcxSchedulerReportLinkPrintStyles } - -procedure TcxSchedulerReportLinkPrintStyles.Assign(Source: TPersistent); -var - I: Integer; -begin - if Source is TcxSchedulerReportLinkPrintStyles then - for I := 0 to Count - 1 do - Items[I] := TcxSchedulerReportLinkPrintStyles(Source).Items[I]; - inherited; -end; - -procedure TcxSchedulerReportLinkPrintStyles.RestoreDefaults; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].RestoreDefaults; - inherited; -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleByClass( - AClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.ClassType = AClass then Exit; - end; - Result := nil; -end; - -function TcxSchedulerReportLinkPrintStyles.GetCorrespondingStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := nil; - if Scheduler = nil then Exit; - Result := GetStyleByView(Scheduler.CurrentView) -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleByName( - const Name: string): TcxCustomSchedulerReportLinkPrintStyle; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if CompareText(Result.Caption, Name) = 0 then Exit; - end; - Result := nil; -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleByView( - View: TcxSchedulerCustomView): TcxCustomSchedulerReportLinkPrintStyle; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.IsCompatibleWith(View) then Exit; - end; - Result := nil; -end; - -function TcxSchedulerReportLinkPrintStyles.IndexOf(AItem: TcxCustomSchedulerReportLinkPrintStyle): Integer; -begin - Result := FItems.IndexOf(AItem); -end; - -procedure TcxSchedulerReportLinkPrintStyles.CreateObjects; -begin - inherited CreateObjects; - FItems := TList.Create; - CreateStyles; -end; - -procedure TcxSchedulerReportLinkPrintStyles.DestroyObjects; -begin - DestroyStyles; - FreeAndNil(FItems); - inherited DestroyObjects; -end; - -function TcxSchedulerReportLinkPrintStyles.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TcxSchedulerReportLinkPrintStyles.CreateStyle( - AStyleClass: TcxCustomSchedulerReportLinkPrintStyleClass): TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := AStyleClass.Create(Self); - FItems.Add(Result); -end; - -procedure TcxSchedulerReportLinkPrintStyles.CreateStyles; -begin - CreateStyle(TcxSchedulerReportLinkDailyPrintStyle); - CreateStyle(TcxSchedulerReportLinkWeeklyPrintStyle); - CreateStyle(TcxSchedulerReportLinkMonthlyPrintStyle); - CreateStyle(TcxSchedulerReportLinkTrifoldPrintStyle); - CreateStyle(TcxSchedulerReportLinkDetailsPrintStyle); - CreateStyle(TcxSchedulerReportLinkMemoPrintStyle); -end; - -procedure TcxSchedulerReportLinkPrintStyles.DestroyStyles; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Items[I].Free; - FItems.Clear; -end; - -procedure TcxSchedulerReportLinkPrintStyles.GetStyleByClassEx( - AClass: TcxCustomSchedulerReportLinkPrintStyleClass; var AInstance); -begin - TPersistent(AInstance) := GetStyleByClass(AClass); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetActiveStyleEx( - Value: TcxCustomSchedulerReportLinkPrintStyle); -begin - if (ActiveStyle <> Value) or ActiveStyleAssigned then - begin - FActiveStyle := Value; - ActiveStyleAssigned := False; - end; -end; - -procedure TcxSchedulerReportLinkPrintStyles.ActiveStyleChanged; -begin - if ReportLink <> nil then - ReportLink.ActivePrintStyleChanged; -end; - -procedure TcxSchedulerReportLinkPrintStyles.StyleChanged(AStyle: TcxCustomSchedulerReportLinkPrintStyle); -begin - Changed; -end; - -function TcxSchedulerReportLinkPrintStyles.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxSchedulerReportLinkPrintStyles.GetItem( - Index: Integer): TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := TcxCustomSchedulerReportLinkPrintStyle(FItems[Index]); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleDaily: TcxSchedulerReportLinkDailyPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkDailyPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleDetails: TcxSchedulerReportLinkDetailsPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkDetailsPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleMemo: TcxSchedulerReportLinkMemoPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkMemoPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleMonthly: TcxSchedulerReportLinkMonthlyPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkMonthlyPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleTrifold: TcxSchedulerReportLinkTrifoldPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkTrifoldPrintStyle, Result); -end; - -function TcxSchedulerReportLinkPrintStyles.GetStyleWeekly: TcxSchedulerReportLinkWeeklyPrintStyle; -begin - GetStyleByClassEx(TcxSchedulerReportLinkWeeklyPrintStyle, Result); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetActiveStyle( - Value: TcxCustomSchedulerReportLinkPrintStyle); -begin - if (FActiveStyle <> Value) or not FActiveStyleAssigned then - begin - FActiveStyle := Value; - FActiveStyleAssigned := Value <> nil; - ActiveStyleChanged; - DesignerModified; - end; -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetActiveStyleAssigned( - Value: Boolean); -begin - if FActiveStyleAssigned <> Value then - begin - FActiveStyleAssigned := Value; - DesignerModified; - end; -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetItem(Index: Integer; - Value: TcxCustomSchedulerReportLinkPrintStyle); -begin - Items[Index].Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleDaily( - Value: TcxSchedulerReportLinkDailyPrintStyle); -begin - Daily.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleDetails( - Value: TcxSchedulerReportLinkDetailsPrintStyle); -begin - GetStyleDetails.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleMemo( - Value: TcxSchedulerReportLinkMemoPrintStyle); -begin - GetStyleMemo.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleMonthly( - Value: TcxSchedulerReportLinkMonthlyPrintStyle); -begin - Monthly.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleTrifold( - Value: TcxSchedulerReportLinkTrifoldPrintStyle); -begin - GetStyleTrifold.Assign(Value); -end; - -procedure TcxSchedulerReportLinkPrintStyles.SetStyleWeekly( - Value: TcxSchedulerReportLinkWeeklyPrintStyle); -begin - Weekly.Assign(Value); -end; - -{ TcxCustomSchedulerReportLinkPrintStyle } - -constructor TcxCustomSchedulerReportLinkPrintStyle.Create(AStyles: TcxSchedulerReportLinkPrintStyles); -begin - inherited Create; - FStyles := AStyles; - FCaption := DefaultCaption; - CreateObjects; - RestoreDefaults; -end; - -destructor TcxCustomSchedulerReportLinkPrintStyle.Destroy; -begin - Active := False; - DestroyObjects; - inherited Destroy; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Assign(Source: TPersistent); -var - ASource: TcxCustomSchedulerReportLinkPrintStyle; -begin - if Source is TcxCustomSchedulerReportLinkPrintStyle then - begin - ASource := TcxCustomSchedulerReportLinkPrintStyle(Source); - Caption := ASource.Caption; - CompressWeekends := ASource.CompressWeekends; - DontPrintWeekends := ASource.DontPrintWeekends; - Layout := ASource.Layout; - ResourceCountPerPage := ASource.ResourceCountPerPage; - ShowNotesAreaBlank := ASource.ShowNotesAreaBlank; - ShowNotesAreaLined := ASource.ShowNotesAreaLined; - ShowTaskPad := ASource.ShowTaskPad; - if SupportTimeRange then - begin - TimePrintFrom := ASource.TimePrintFrom; - TimePrintTo := ASource.TimePrintTo; - end; - end - else - inherited; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.DefaultCaption: string; -begin - Result := ''; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsCompatibleWith(AView: TcxSchedulerCustomView): Boolean; -begin - Result := False; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.RestoreDefaults; -begin - FCaption := DefaultCaption; - FCompressWeekends := True; - FDontPrintWeekends := False; - FLayout := pslOnePage; - ResourceCountPerPage := 0; - ShowNotesAreaBlank := False; - ShowNotesAreaLined := False; - ShowTaskPad := False; - if SupportTimeRange and (Scheduler <> nil) then - begin - TimePrintFrom := TimeOf(Scheduler.OptionsView.WorkStart); - TimePrintTo := TimeOf(Scheduler.OptionsView.WorkFinish); - end; -end; - -// IdxReportLinkController -function TcxCustomSchedulerReportLinkPrintStyle.GetControlSiteBounds(AControl: TControl): TRect; -begin - Result := NullRect; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Build; -begin - FBoldedDays := TcxSchedulerDateList.Create; - try - if Storage <> nil then - begin - Events.SelStart := PrintRange.PrintFrom - 30; - Events.SelFinish := PrintRange.PrintTo + 30; - Storage.GetEvents(Events, Events.SelStart, Events.SelFinish); - end; - Events.ExtractUsedDays(FBoldedDays); - PrepareEvents; - BuildPages; - Events.Clear; - UsedDays.Clear; - finally - FreeAndNil(FBoldedDays); - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.BuildPages; -var - I: Integer; -begin - for I := 0 to PeriodCount - 1 do - begin - CreateLayoutForPeriod(I); - Progress(100 * (I + 1) / PeriodCount); - if ReportLink.AbortBuilding or ReportLink.LinkInPreviewMode then Break; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.BuildSchedulerCells( - ASite: TcxSchedulerReportSchedulingAreaCell); -var - APageIndex, APeriodIndex, ASubIndex: Integer; -begin - APageIndex := ASite.PageIndex; - GetPagePeriodAndIndex(APageIndex, APeriodIndex, ASubIndex); - FillDatesForPage(ASite.VisibleDays, APageIndex, APeriodIndex, ASubIndex); - with CreateSchedulingCellsProducer(ASite) do - try - Produce; - finally - Free; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.PrepareEvents; -var - I: Integer; - AEvent: TcxSchedulerEvent; - AllowPrint: Boolean; -begin - for I := 0 to FEvents.AbsoluteCount - 1 do - begin - AEvent := FEvents.AbsoluteItems[I]; - AllowPrint := True; - DoCanPrintEvent(AEvent, AllowPrint); - if not AllowPrint then - FEvents.Remove(AEvent); - end; - FEvents.Sort(TcxCompareEventsProc(@cxCompareSchedulerControlEvents)); - TcxSchedulerCachedEventListAccess(FEvents).Changed; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.DoCanPrintEvent( - AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); -begin - ReportLink.DoCanPrintEvent(AEvent, AllowPrint); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Progress(APercentDone: Double); -begin - if ReportLink <> nil then - ReportLink.DoProgress(APercentDone); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.AfterBuild; -begin - VisualStyles.FReportLink := nil; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.BeforeBuild; -begin - VisualStyles.FReportLink := ReportLink; - CurrentDate := PrintRange.PrintFrom; - FPagesPerPeriod := GetPagesPerPeriod; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TcxCustomSchedulerReportLinkPrintStyle._AddRef: Integer; -begin - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle._Release: Integer; -begin - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetDC: HDC; -begin - Result := ReportLink.Renderer.DC; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; -begin - Result := ReportLink.OptionsRefinements.DisplayGraphicsAsText; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetEndEllipsis: Boolean; -begin - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetFlatCheckMarks: Boolean; -begin - Result := ReportLink.OptionsRefinements.FlatCheckMarks; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetGraphicsText: string; -begin - Result := ReportLink.OptionsRefinements.GraphicsText; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetMultiline: Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams_GetTransparentGraphics: Boolean; -begin - Result := ReportLink.OptionsRefinements.TransparentGraphics; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := 2; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := 2; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; -const - GraphicClasses: array[Boolean] of TGraphicClass = (TMetafile, TBitmap); -begin - Result := GraphicClasses[IdxPSCellParams2_GetRichEditTransparent]; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IdxPSCellParams2_GetRichEditTransparent: Boolean; -begin - {$IFDEF DXVER500} - Result := ReportLink.OptionsRefinements.TransparentRichEdits; - {$ELSE} - Result := False; - {$ENDIF} -end; - -function TcxCustomSchedulerReportLinkPrintStyle.AddPageSite( - const ABounds: TRect): TcxSchedulerReportPageSite; -begin - Result := ReportLink.AddPageSite(ABounds); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.Changed; -begin - if Styles <> nil then Styles.StyleChanged(Self); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateObjects; -begin - FUsedDays := TcxSchedulerDateList.Create; - FEvents := TcxSchedulerCachedEventList.Create; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.DestroyObjects; -begin - FEvents.Free; - FUsedDays.Free; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageCount: Integer; -begin - Result := 0; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetRebuildOnPageParamsChange( - AnUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetActualDatePrintFrom: TDate; -begin - if PrintRange <> nil then - Result := PrintRange.PrintFrom - else - Result := 0; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetActualDatePrintTo: TDate; -begin - if PrintRange <> nil then - Result := PrintRange.PrintTo - else - Result := 0; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPagesPerPeriod: Integer; -begin - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetGlyphIndex: Integer; -begin - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := GetGlyphIndex; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetSchedulerHeaderParams: TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - Result.NativeParams := VisualStyles.GetSchedulerHeaderParams; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.DrawDesignWindowPreview(ACanvas: TCanvas; const ABounds: TRect); -var - ALeft, ATop: Integer; -begin - with ABounds do - begin - ALeft := (Left + Right - StylePreviewImages.Width) div 2; - ATop := (Top + Bottom - StylePreviewImages.Height) div 2; - end; - StylePreviewImages.Draw(ACanvas, ALeft, ATop, PreviewGlyphIndex); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetResourcePageCount: Integer; -begin - Result := ResourceCountPerPage; - if Result = 0 then - Result := 1 - else - if ResourceCount > 0 then - begin - Result := ResourceCount div ResourceCountPerPage + - Byte(ResourceCount mod ResourceCountPerPage > 0); - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetShowDateNavigator( - APageIndex: Integer): Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetShowNotesAreaBlank: Boolean; -begin - Result := FShowNotesAreaBlank; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetBoolOption( - var AOption: Boolean; Value: Boolean); -begin - if AOption <> Value then - begin - AOption := Value; - Changed; - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.SupportTimeRange: Boolean; -begin - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.SupportIcons: Boolean; -begin - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.SupportMessage: Boolean; -begin - Result := False; -end; - -// report cells creation - -function TcxCustomSchedulerReportLinkPrintStyle.CreateSchedulingAreaCell( - ASite: TdxReportCell): TcxSchedulerReportSchedulingAreaCell; -begin - Result := TcxSchedulerReportSchedulingAreaCell.Create(ASite); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - Result := TcxSchedulerReportCommonCellsProducer.CreateEx(Self, ASite); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateDateNavigatorCell( - ASite: TdxReportCell; AYear, AMonth: Word): TcxSchedulerReportDateNavigatorCell; -begin - with Scheduler.DateNavigator do - begin - Result := TcxSchedulerReportDateNavigatorCell.CreateEx(ASite, - ActualFirstWeekOfYear, AYear, AMonth, ShowDatesContainingEventsInBold, ShowWeekNumbers); - Result.FBoldedDays := Self.FBoldedDays; - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateHeaderCell( - ASite: TdxReportCell): TcxSchedulerReportSchedulerHeaderCell; -begin - Result := TcxSchedulerReportSchedulerHeaderCell.Create(ASite); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateNotesCell( - ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; -begin - Result := TcxSchedulerReportNotesAreaCell.CreateEx(ASite, False); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateNotesLinedCell( - ASite: TdxReportCell): TcxSchedulerReportNotesAreaCell; -begin - Result := TcxSchedulerReportNotesAreaCell.CreateEx(ASite, True); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CreateTaskPadCell( - ASite: TdxReportCell): TcxSchedulerReportTaskPadCell; -begin - Result := TcxSchedulerReportTaskPadCell.CreateEx(ASite, False); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); -begin - ReportLink.SetCellViewParams(ACell, GetSchedulerHeaderParams); - ReportLink.SetCellViewParams(ACell.Content, GetSchedulerHeaderParams); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.InitReportCell( - ACell: TdxReportCell; const ABounds: TRect): TdxReportCell; - - procedure InitAdditionalAreaCell(const AViewParams: TcxViewParams); - begin - ReportLink.SetCellViewParams(ACell, AViewParams); - ReportLink.SetCellViewParams(TcxSchedulerReportNotesAreaCell( - ACell).DataCell, AViewParams); - end; - -begin - ACell.BoundsRect := ABounds; - Result := ACell; - if ReportLink = nil then Exit; - ACell.Transparent := not ReportLink.OptionsFormatting.UseNativeStyles; - if ACell is TcxSchedulerReportPageItemCell then - begin - case TcxSchedulerReportPageItemCell(ACell).GetType of - srSchedulingArea: - begin - BuildSchedulerCells(TcxSchedulerReportSchedulingAreaCell(ACell)); - ReportLink.DoInitializeSchedulingAreaCell( - TcxSchedulerReportSchedulingAreaCell(ACell)); - end; - srHeader: - InitHeaderCell(TcxSchedulerReportSchedulerHeaderCell(ACell)); - srNotesBlank: - begin - InitAdditionalAreaCell(VisualStyles.GetNotesAreaBlankParams); - ReportLink.DoInitializeNotesAreaCell( - TcxSchedulerReportNotesAreaCell(ACell)); - end; - srNotesLined: - begin - InitAdditionalAreaCell(VisualStyles.GetNotesAreaLinedParams); - ReportLink.DoInitializeNotesAreaCell( - TcxSchedulerReportNotesAreaCell(ACell)); - end; - srTaskPad: - begin - InitAdditionalAreaCell(VisualStyles.GetTaskPadParams); - ReportLink.InitializeTaskPadCell( - TcxSchedulerReportTaskPadCell(ACell)); - end; - end; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CorrectBoundsWithHeader( - AHeader: TcxSchedulerReportSchedulerHeaderCell; var ABounds: TRect); -begin - if not AHeader.Visible then - ABounds.Top := 0 - else - ABounds.Top := AHeader.BoundsRect.Bottom + InterAreaSpace; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateAdditionalControls( - ASite: TdxReportCell; AHasCalendar, AHasTaskPad, AHasNotes, - AHasNotesLined, ARightSide: Boolean; var ABounds: TRect); -var - R: array[0..2] of TRect; - C: Integer; - - function GetAreaBounds(AllowShow: Boolean; - var ABounds: TRect; var AIndex: Integer): Boolean; - begin - Result := AllowShow; - if not Result then Exit; - ABounds := R[AIndex]; - Inc(AIndex); - end; - - procedure CreateCells; - var - AIndex: Integer; - ABounds: TRect; - begin - AIndex := 0; - if GetAreaBounds(AHasTaskPad, ABounds, AIndex) then - InitReportCell(CreateTaskPadCell(ASite), ABounds); - if GetAreaBounds(AHasNotes, ABounds, AIndex) then - InitReportCell(CreateNotesCell(ASite), ABounds); - if GetAreaBounds(AHasNotesLined, ABounds, AIndex) then - InitReportCell(CreateNotesLinedCell(ASite), ABounds); - end; - -begin - C := Byte(AHasTaskPad) + Byte(AHasNotes) + Byte(AHasNotesLined); - if C = 0 then Exit; - SplitToRects(ABounds, AHasCalendar, ARightSide, ABounds, R[0]); - if C = 2 then - Rect2RectsVert(R[0], R[0], R[1]) - else - if C = 3 then - begin - if AHasCalendar then - Rect2RectsVert(R[0], R[0], R[1], R[2]) - else - begin - Rect2RectsVert(R[0], R[1], R[0]); - Rect2RectsHorz(R[1], R[1], R[2]); - end; - end; - CreateCells; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateHeaderDateNavigator( - AHeader: TcxSchedulerReportSchedulerHeaderCell; APageIndex: Integer; out ABounds: TRect); -var - R: TRect; - Y, M, D: Word; - AHeight, H, ALeft: Integer; - CP, HP: TdxReportItemViewParams; - ACell: TcxSchedulerReportDateNavigatorCell; -begin - FillChar(CP, SizeOf(CP), 0); - FillChar(HP, SizeOf(HP), 0); - AHeight := ABounds.Bottom - ABounds.Top; - CP.NativeParams := VisualStyles.GetDateNavigatorContentParams; - HP.NativeParams := VisualStyles.GetDateNavigatorHeaderParams; - HP.Transparent := not ReportLink.OptionsFormatting.UseNativeStyles; - GetPageDateNavigatorInfo(APageIndex, Y, M); - ACell := CreateDateNavigatorCell(AHeader, Y, M); - H := ACell.MeasureDateNavigatorHeight(CP.NativeParams, HP.NativeParams); - if H > AHeight then - ACell.AdjustSize(CP, HP, H, AHeight); - R.TopLeft := Point(0, 0); - R.BottomRight := TPoint(ACell.CalculateSize(CP, HP)); - OffsetRect(R, ABounds.Right - ABounds.Left - R.Right, 0); - InflateRect(R, 0, -3); - ACell.BoundsRect := R; - ALeft := R.Left; - if PrintRange.MonthCount > 1 then - begin - IncAMonth(Y, M, D); - ACell.BoundsRect := cxRectSetRight(R, R.Left); - ALeft := R.Left - (R.Right - R.Left); - ACell := CreateDateNavigatorCell(AHeader, Y, M); - if H > AHeight then - ACell.AdjustSize(CP, HP, H, AHeight); - ACell.CalculateSize(CP, HP); - ACell.BoundsRect := R; - end; - AHeader.Content.BoundsRect := MakeRect(ABounds.Left + cxTextOffset, - ABounds.Top + cxTextOffset, ALeft, ABounds.Bottom - cxTextOffset); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreateLayoutForPeriod( - APeriodIndex: Integer); -var - APageIndex: Integer; - R: TRect; - APage: TcxSchedulerReportPageSite; - AHeader: TcxSchedulerReportSchedulerHeaderCell; -begin - APageIndex := GetPageIndex(APeriodIndex, 0); - CreatePageSiteWithHeader(APageIndex, APage, AHeader, R); - CorrectBoundsWithHeader(AHeader, R); - CreateControlsOnFirstPage(APageIndex, APage, AHeader, R); - if Layout = pslTwoPages then - begin - CreatePageSiteWithHeader(APageIndex + 1, APage, AHeader, R, False); - CorrectBoundsWithHeader(AHeader, R); - CreateControlsOnSecondPage(APageIndex + 1, APage, AHeader, R); - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.CreatePageSiteWithHeader( - APageIndex: Integer; out ASite: TcxSchedulerReportPageSite; - out AHeader: TcxSchedulerReportSchedulerHeaderCell; - out ABounds: TRect; AIsPrimary: Boolean = True); -var - R: TRect; -begin - ABounds := GetPageSiteBounds(APageIndex); - ASite := AddPageSite(ABounds); - ASite.FPageIndex := APageIndex; - ASite.FPrimaryPage := AIsPrimary; - ABounds := ASite.GetInnerBounds(0); - if GetHasPageReportTitle(APageIndex) then - Inc(ABounds.Top, ReportLink.RenderInfo.CalculateTitleHeight); - if GetHasPageHeader(APageIndex) then - begin - R := ABounds; - R.Bottom := R.Top + GetPageHeaderHeight(R, APageIndex); - ABounds.Top := R.Bottom + InterAreaSpace; - AHeader := CreateHeaderCell(ASite); - Inc(R.Bottom, AHeader.BorderEdgeThicknesses[csBottom]); - InitReportCell(AHeader, R); - if GetShowDateNavigator(APageIndex) then - begin - R := AHeader.GetInnerBounds(0); - CreateHeaderDateNavigator(TcxSchedulerReportSchedulerHeaderCell(AHeader), APageIndex, R); - end; - AHeader.AdjustTextSize; - if AIsPrimary then - ReportLink.DoInitializeHeaderPrimaryCell(AHeader) - else - ReportLink.DoInitializeHeaderSecondaryCell(AHeader); - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.CanSplitSchedulingOnTwoPages: Boolean; -begin - Result := Layout = pslTwoPages; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetHasPageHeader( - APageIndex: Integer): Boolean; -begin - Result := True; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetHasPageReportTitle( - APageIndex: Integer): Boolean; -begin - case ReportLink.ReportTitleMode of - tmNone: - Result := False; - tmOnFirstPage: - Result := APageIndex div (Byte(Layout) + 1) = 0; - else - Result := True; - end; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageHeaderHeight( - const ASiteBounds: TRect; APageIndex: Integer): Integer; -var - AMin, AMax: Integer; -begin - Result := 0; - AMin := Round((ASiteBounds.Bottom - ASiteBounds.Top) * SchedulerHeaderMinHeight); - AMax := Round((ASiteBounds.Bottom - ASiteBounds.Top) * SchedulerHeaderMaxHeight); - if GetShowDateNavigator(APageIndex) and (ReportLink <> nil) then - begin - with VisualStyles do - Result := TcxSchedulerReportDateNavigatorCell.MeasureDateNavigatorHeight( - GetDateNavigatorContentParams, GetDateNavigatorHeaderParams); - end; - Result := Max(Min(AMax, Result), AMin); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageIndex( - APeriodIndex, AIndex: Integer): Integer; -begin - Result := (APeriodIndex * (Byte(Layout) + 1) + AIndex); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.GetPagePeriodAndIndex( - APageIndex: Integer; var APeriodIndex, ASubIndex: Integer); -begin - ASubIndex := 0; - if Layout = pslTwoPages then - begin - APeriodIndex := APageIndex div 2; - ASubIndex := APageIndex mod 2; - end - else - APeriodIndex := APageIndex; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageSiteBounds( - APageIndex: Integer): TRect; -begin - Result := MakeBounds(0, 0, ReportLink.PageWidth, ReportLink.PageHeight); - OffsetRect(Result, 0, APageIndex * ReportLink.PageHeight); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetStartOfWeekOffset: Integer; -begin - Result := 0; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.GetPageDateNavigatorInfo( - APageIndex: Integer; out AYear, AMonth: Word); -var - ADate: TDateTime; - ADayCount: Integer; -begin - ADayCount := APageIndex * GetDaysPerPeriod div - ((Byte(Layout) + 1) * GetResourcePageCount); - ADate := PrintRange.PrintFrom + ADayCount; - AYear := YearOf(ADate); - AMonth := MonthOf(ADate); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetDaysPerPeriod: Integer; -begin - Result := 1; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -begin -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetActive: Boolean; -begin - if Styles <> nil then - Result := (Styles.ActiveStyle = Self) and Styles.ActiveStyleAssigned - else - Result := False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetHasAdditionalArea: Boolean; -begin - Result := ShowNotesAreaBlank or ShowNotesAreaLined or ShowTaskPad; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetIndex: Integer; -begin - if Styles <> nil then - Result := Styles.IndexOf(Self) - else - Result := -1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPageSite( - AIndex: Integer): TcxSchedulerReportPageSite; -begin - if ReportLink <> nil then - Result := TcxSchedulerReportPageSite(ReportLink.PageSites[AIndex]) - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPeriodCount: Integer; -begin - Result := PageCount; - if Layout = pslTwoPages then - Result := Result div 2; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetPrintRange: TcxSchedulerReportLinkPrintRange; -begin - if ReportLink <> nil then - Result := ReportLink.PrintRange - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetReportLink: TcxSchedulerReportLink; -begin - if Styles <> nil then - Result := Styles.ReportLink - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetResourceCount: Integer; -begin - if (Scheduler <> nil) and (Scheduler.Storage <> nil) and - (Scheduler.Storage.Resources.ResourceItems.VisibleResourceCount > 0) then - Result := Scheduler.Storage.Resources.ResourceItems.VisibleResourceCount - else - Result := 1; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetScheduler: TcxScheduler; -begin - if ReportLink <> nil then - Result := ReportLink.Scheduler - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetStorage: TcxCustomSchedulerStorage; -begin - if Scheduler <> nil then - Result := Scheduler.Storage - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetTimePrintFrom: TTime; -begin - Result := TimeOf(PrintRange.TimePrintFrom); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetTimePrintTo: TTime; -begin - Result := TimeOf(PrintRange.TimePrintTo); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.GetVisualStyles: TcxSchedulerReportLinkStyles; -begin - if ReportLink <> nil then - Result := ReportLink.ActiveStyles - else - Result := nil; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsCaptionStored: Boolean; -begin - Result := (FCaption <> DefaultCaption); -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsLayoutStored: Boolean; -begin - Result := Layout <> pslOnePage; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsShowNotesAreaBlankStored: Boolean; -begin - Result := FShowNotesAreaBlank <> False; -end; - -function TcxCustomSchedulerReportLinkPrintStyle.IsActiveStored: Boolean; -begin - Result := Active and Styles.ActiveStyleAssigned; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetActive(Value: Boolean); -begin - if Styles <> nil then - begin - if Value then - Styles.ActiveStyle := Self - else - Styles.ActiveStyle := nil; - Styles.ActiveStyleAssigned := Value; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetCaption(const Value: string); -begin - if Caption <> Value then - begin - FCaption := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetCompressWeekends( - Value: Boolean); -begin - SetBoolOption(FCompressWeekends, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetDontPrintWeekends( - Value: Boolean); -begin - SetBoolOption(FDontPrintWeekEnds, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetLayout( - Value: TcxSchedulerReportLinkPeriodicPrintStyleLayout); -begin - if FLayout <> Value then - begin - FLayout := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetResourceCountPerPage( - Value: Integer); -begin - if FResourceCountPerPage <> Value then - begin - FResourceCountPerPage := Value; - Changed; - end; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowNotesAreaBlank( - Value: Boolean); -begin - SetBoolOption(FShowNotesAreaBlank, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowNotesAreaLined( - Value: Boolean); -begin - SetBoolOption(FShowNotesAreaLined, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetShowTaskPad(Value: Boolean); -begin - SetBoolOption(FShowTaskPad, Value); -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetTimePrintFrom(Value: TTime); -begin - PrintRange.TimePrintFrom := Value; -end; - -procedure TcxCustomSchedulerReportLinkPrintStyle.SetTimePrintTo(Value: TTime); -begin - PrintRange.TimePrintTo := Value; -end; - -{ TcxSchedulerReportLinkDailyPrintStyle } - -function TcxSchedulerReportLinkDailyPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionDaily); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := AView is TcxSchedulerDayView; -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.BeforeBuild; -begin - inherited BeforeBuild; - FCurrentPagePerDate := PagesPerPeriod; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.CanSplitSchedulingOnTwoPages: Boolean; -begin - Result := False; -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - if Layout = pslOnePage then - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - CreateAdditionalControls(ASite, False, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - Result := TcxSchedulerReportDailyCellsProducer.CreateEx(Self, ASite); -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -begin - APageIndex := APageIndex div GetResourcePageCount; - ADateList.Add(PrintRange.PrintFrom + APageIndex); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - Result := Scheduler.ViewDay - else - Result := inherited GetCorrespondedView; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetGlyphIndex: Integer; -begin - Result := Byte(HasAdditionalArea); - if Layout = pslTwoPages then - Result := 2; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetPageCount: Integer; -begin - Result := GetResourcePageCount * PrintRange.DayCount * (Byte(Layout) + 1); -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetPagesPerPeriod: Integer; -var - I, J: Integer; -begin - if (ResourceCountPerPage = 0) or (ResourceCount < 2) then - Result := Byte(Layout) + 1 - else - begin - I := Min(ResourceCount, ResourceCountPerPage); - J := ResourceCount div I; - if J * I < ResourceCount then Inc(J); - Result := J * (Byte(Layout) + 1); - end; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.GetShowNotesAreaBlank: Boolean; -begin - Result := inherited GetShowNotesAreaBlank; - if not Result and (Layout <> pslOnePage) then - Result := not (ShowTaskPad or ShowNotesAreaLined); -end; - -procedure TcxSchedulerReportLinkDailyPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); -begin - ReportLink.SetCellViewParams(ACell, VisualStyles.GetSchedulerHeaderParams); - ACell.PrimaryText := DateTimeHelper.DateToLongDateStr(CurrentDate); - ACell.SecondaryText := LongDayNames[DayOfWeek(CurrentDate)]; - inherited InitHeaderCell(ACell); - Dec(FCurrentPagePerDate); - if FCurrentPagePerDate = 0 then - begin - CurrentDate := CurrentDate + 1; - FCurrentPagePerDate := PagesPerPeriod; - end; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.SupportIcons: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.SupportMessage: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportLinkDailyPrintStyle.SupportTimeRange: Boolean; -begin - Result := True; -end; - -{ TcxSchedulerReportLinkCustomDetailsPrintStyle } - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.AddPageSite( - const ABounds: TRect): TcxSchedulerReportPageSite; -begin - Inc(BuildedPageCount); - Result := inherited AddPageSite(ABounds); -end; - -procedure TcxSchedulerReportLinkCustomDetailsPrintStyle.BeforeBuild; -begin - CurrentPage := nil; - CellsOnPage := 0; - BuildedPageCount := 0; - FTimeWidth := MeasureTimeWidth; - inherited BeforeBuild; -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.GetNextPage( - APrevPage: TcxSchedulerReportPageSite; out ABounds: TRect): TcxSchedulerReportPageSite; -begin - CellsOnPage := 0; - if APrevPage = nil then - Result := PageSites[0] - else - Result := AddPageSite(GetPageSiteBounds(BuildedPageCount)); - ABounds := Result.GetInnerBounds(0); - if GetHasPageReportTitle(BuildedPageCount - 1) then - Inc(ABounds.Top, ReportLink.RenderInfo.CalculateTitleHeight); -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.GetPageCount: Integer; -begin - Result := Max(1, BuildedPageCount); -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.MeasureTimeWidth: Integer; -var - AFont: TFont; -begin - AFont := ReportLink.Font; - if (VisualStyles.Event <> nil) and (cxStyles.svFont in VisualStyles.Event.AssignedValues) then - AFont := VisualStyles.Event.Font; - Result := cxTextWidth(AFont, '00:00 - 00:00') * 2; -end; - -function TcxSchedulerReportLinkCustomDetailsPrintStyle.GetPageWidth: Integer; -begin - Result := ReportLink.PageWidth; -end; - -{ TcxSchedulerReportLinkDetailsPrintStyle } - -procedure TcxSchedulerReportLinkDetailsPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkDetailsPrintStyle then - begin - PaginationMode := TcxSchedulerReportLinkDetailsPrintStyle(Source).PaginationMode; - UsePagination := TcxSchedulerReportLinkDetailsPrintStyle(Source).UsePagination; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionDetails); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.RestoreDefaults; -begin - PaginationMode := dpmByDay; - UsePagination := False; - inherited RestoreDefaults; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.AddDayHeader(ADate: TDateTime; - AContinue: Boolean; var ABounds: TRect): TcxSchedulerReportSchedulerHeaderCell; -var - R: TRect; -begin - Result := TcxSchedulerReportSchedulerHeaderCell.Create(CurrentPage); - Result.Date := ADate; - R := cxRectSetHeight(ABounds, DayHeaderHeight); - ABounds.Top := R.Bottom + InterAreaSpace; - Result.Transparent := False; - Result.PrimaryText := GetDayHeaderText(AContinue); - InitReportCell(Result, R); - Result.Content.BoundsRect := Result.GetInnerBounds(0); - Result.AdjustTextSize; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.BeforeBuild; -begin - PreviousHeader := nil; - CellsOnPage := 0; - inherited BeforeBuild; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.BuildPages; -var - ADayEvents: TcxSchedulerEventList; -begin - ADayEvents := TcxSchedulerEventList.Create; - try - CellsOnPage := 0; - Site := nil; - DayIndex := 0; - while DayIndex < PrintRange.DayCount do - begin - ADayEvents.Clear; - Events.ExtractEvents(CurrentDate, ADayEvents); - Events.Sort(TcxCompareEventsProc(@cxCompareSchedulerControlEvents)); - if (ADayEvents.Count > 0) and (Site = nil) then - begin - Site := AddPageSite(GetPageSiteBounds(0)); - PrepareNextPage; - end; - if (CellsOnPage > 0) and (ADayEvents.Count > 0) then - CheckPagination; - EventIndex := 0; - while EventIndex < ADayEvents.Count do - begin - CurrentCell := AddEventCell(ADayEvents[EventIndex]); - ReportLink.DoInitializeEventCell(CurrentCell); - if (CellsOnPage > 0) and (MeasureCellBounds.Bottom > CurrentPageBounds.Bottom) then - PrepareNextPage; - HeaderNeeded; - SetCellPlace; - Inc(EventIndex); - end; - CurrentDate := CurrentDate + 1; - Inc(DayIndex); - end; - finally - ADayEvents.Free; - end; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetDayHeaderHeight: Integer; -var - DC: HDC; -begin - DC := GetDC(0); - try - Result := ReportLink.Renderer.CalcTextHeight(DC, 'Wg', False, GetSchedulerHeaderParams.NativeParams.Font) * 2; - finally - ReleaseDC(0, DC); - end -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetDayHeaderText(AContinue: Boolean): string; -begin - Result := DateTimeHelper.DateToLongDateStr(CurrentDate); - if AContinue then - Result := Result + ' ' + cxGetResourceString(@sdxContinuedMessage); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetGlyphIndex: Integer; -begin - Result := 22; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := 16; -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.GetSchedulerHeaderParams: TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - Result.NativeParams := VisualStyles.GetDayHeaderParams(CurrentDate); - Include(Result.FontStyle, fsBold); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.AddEventCell( - AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; -begin - Result := TcxSchedulerReportDetailsEventCell.CreateEx(Site, AEvent, - CurrentDate, VisualStyles.GetEventParams(AEvent), - (AEvent.Start < CurrentDate) and (CurrentDate > PrintRange.PrintFrom)); - Result.CalculateLayout(PageWidth, TimeWidth); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.CheckPagination; -begin - if not UsePagination then Exit; - case PaginationMode of - dpmByDay: - PrepareNextPage; - dpmByWeek: - if GetWeekNumber(CurrentDate, dSunday, fwySystem) <> - GetWeekNumber(PreviousHeader.Date, dSunday, fwySystem) then - PrepareNextPage; - dpmByMonth: - if MonthOf(CurrentDate) <> MonthOf(PreviousHeader.Date) then - PrepareNextPage; - end; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.HeaderNeeded; -begin - if NeedAddDayHeader then - PreviousHeader := AddDayHeader(CurrentDate, EventIndex > 0, CurrentPageBounds); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.NeedAddDayHeader: Boolean; -begin - Result := (CellsOnPage = 0) or (PreviousHeader = nil) or (PreviousHeader.Date <> CurrentDate); -end; - -function TcxSchedulerReportLinkDetailsPrintStyle.MeasureCellBounds: TRect; -begin - Result := CurrentPageBounds; - Result.Bottom := Result.Top + CurrentCell.CalculateHeight; - if NeedAddDayHeader then - Inc(Result.Bottom, DayHeaderHeight); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.PrepareNextPage; -begin - CurrentPage := GetNextPage(CurrentPage, CurrentPageBounds); -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.SetCellPlace; -begin - Inc(CellsOnPage); - CurrentCell.BoundsRect := MeasureCellBounds; - CurrentCell.Parent := CurrentPage; - CurrentPageBounds.Top := CurrentCell.BoundsRect.Bottom + InterAreaSpace; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.SetPaginationMode( - Value: TcxSchedulerReportLinkDetailsPrintStylePaginationMode); -begin - if FPaginationMode <> Value then - begin - FPaginationMode := Value; - Changed; - end; -end; - -procedure TcxSchedulerReportLinkDetailsPrintStyle.SetUsePagination( - Value: Boolean); -begin - SetBoolOption(FUsePagination, Value); -end; - -{ TcxSchedulerReportLinkMemoPrintStyle } - -procedure TcxSchedulerReportLinkMemoPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkMemoPrintStyle then - with TcxSchedulerReportLinkMemoPrintStyle(Source) do - begin - Self.FSelectedEventsOnly := FSelectedEventsOnly; - Self.FStartEachItemOnNewPage := FStartEachItemOnNewPage; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkMemoPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionMemo); -end; - -procedure TcxSchedulerReportLinkMemoPrintStyle.RestoreDefaults; -begin - FSelectedEventsOnly := True; - FStartEachItemOnNewPage := True; - inherited RestoreDefaults; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.AddEventCell( - AEvent: TcxSchedulerEvent): TcxSchedulerReportDetailsEventCell; -begin - Result := TcxSchedulerReportMemoEventCell.CreateEx(CurrentPage, AEvent, - NullDate, VisualStyles.GetEventParams(AEvent)); - Result.CalculateLayout(PageWidth, TimeWidth); -end; - -procedure TcxSchedulerReportLinkMemoPrintStyle.BuildPages; -var - I: Integer; - APageBounds: TRect; - ACell: TcxSchedulerReportDetailsEventCell; - - function GetCellBounds: TRect; - begin - Result := APageBounds; - Result.Bottom := Result.Top + ACell.CalculateHeight; - end; - -begin - Site := nil; - if Events.Count = 0 then Exit; - Site := AddPageSite(GetPageSiteBounds(0)); - CurrentPage := GetNextPage(CurrentPage, APageBounds); - for I := 0 to Events.AbsoluteCount - 1 do - begin - ACell := AddEventCell(Events[I]); - ReportLink.DoInitializeEventCell(ACell); - if (CellsOnPage > 0) and (StartEachItemOnNewPage or - (GetCellBounds.Bottom > APageBounds.Bottom)) then - CurrentPage := GetNextPage(CurrentPage, APageBounds); - ACell.Parent := CurrentPage; - ACell.BoundsRect := GetCellBounds; - APageBounds.Top := ACell.BoundsRect.Bottom + InterAreaSpace; - Inc(CellsOnPage); - end; -end; - -procedure TcxSchedulerReportLinkMemoPrintStyle.DoCanPrintEvent( - AEvent: TcxSchedulerEvent; var AllowPrint: Boolean); -var - I: Integer; - AUseEvent: Boolean; -begin - if SelectedEventsOnly and (Scheduler <> nil) then - begin - AllowPrint := False; - for I := 0 to Scheduler.SelectedEventCount - 1 do - begin - AllowPrint := Scheduler.SelectedEvents[I].Source = TcxSchedulerControlEvent(AEvent).Source; - if AllowPrint then Break; - end; - end; - AUseEvent := False; - for I := 0 to PrintRange.DayCount - 1 do - if AEvent.IsDayEvent(PrintRange.PrintFrom + I) then - begin - AUseEvent := True; - Break; - end; - if AUseEvent then - inherited DoCanPrintEvent(AEvent, AllowPrint) - else - AllowPrint := False; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.GetGlyphIndex: Integer; -begin - Result := 20; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.GetPreviewGlyphIndex: Integer; -begin - Result := 17; -end; - -function TcxSchedulerReportLinkMemoPrintStyle.MeasureTimeWidth: Integer; -var - AFont: TFont; -begin - AFont := ReportLink.Font; - if (VisualStyles.Event <> nil) and (cxStyles.svFont in VisualStyles.Event.AssignedValues) then - AFont := VisualStyles.Event.Font; - Result := 0; - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxSubjectLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxLocationLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxStartLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxFinishLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxShowTimeAsLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxRecurrenceLabelCaption))); - Result := Max(Result, cxTextWidth(AFont, cxGetResourceString(@sdxRecurrencePatternLabelCaption))); - if Result = 0 then - Result := inherited MeasureTimeWidth - else - Inc(Result, cxTextWidth(AFont, '0000 - 0000')); - Result := Min(PageWidth div 3, Result); -end; - -{ TcxSchedulerReportLinkMonthlyPrintStyle } - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkMonthlyPrintStyle then - PrintExactlyOneMonthPerPage := - TcxSchedulerReportLinkMonthlyPrintStyle(Source).PrintExactlyOneMonthPerPage; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionMonthly); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := AView is TcxSchedulerWeeksView; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.RestoreDefaults; -begin - PrintExactlyOneMonthPerPage := False; - inherited RestoreDefaults; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - if Layout = pslTwoPages then - CreateAdditionalControls(ASite, True, ShowTaskPad and - (ShowNotesAreaLined or ShowNotesAreaBlank), False, False, False, ABounds) - else - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -var - HasTaskPad: Boolean; -begin - HasTaskPad := ShowTaskPad and not (ShowNotesAreaBlank or ShowNotesAreaLined); - CreateAdditionalControls(ASite, True, HasTaskPad, ShowNotesAreaBlank, - ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - Result := Scheduler.ViewWeeks - else - Result := inherited GetCorrespondedView; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -var - I: Integer; - Y, M, D: Word; - AStart: TDateTime; -begin - AStart := GetDateForPage(APageIndex); - DecodeDate(AStart, Y, M, D); - for I := 0 to DaysInAMonth(Y, M) - 1 do - ADateList.Add(AStart + I); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetDaysPerPeriod: Integer; -begin - Result := 30; -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetDateForPage( - APageIndex: Integer): TDateTime; -var - Y, M, D: Word; - APeriodIndex: Integer; -begin - APeriodIndex := APageIndex div (Byte(Layout) + 1) div GetResourcePageCount; - DecodeDate(PrintRange.PrintFrom, Y, M, D); - D := 1; - IncAMonth(Y, M, D, APeriodIndex); - Result := EncodeDate(Y, M, D); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetGlyphIndex: Integer; -begin - Result := 11 + Byte(HasAdditionalArea); - if Layout = pslTwoPages then - Inc(Result, 2); -end; - -function TcxSchedulerReportLinkMonthlyPrintStyle.GetPageCount: Integer; -begin - Result := PrintRange.MonthCount * (Byte(Layout) + 1) * GetResourcePageCount; -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); - - function GetMonthText(ADate: TDateTime): string; - begin - Result := FormatDateTime('mmmm', ADate) + ' ' + IntToStr(YearOf(ADate)); - end; - -var - ADate: TDateTime; -begin - ADate := GetDateForPage(ACell.PageIndex); - if PrintExactlyOneMonthPerPage then - ACell.PrimaryText := GetMonthText(ADate) - else - ACell.PrimaryText := GetMonthText(ADate) + ' - ' + GetMonthText(ADate + 32); - inherited InitHeaderCell(ACell); -end; - -procedure TcxSchedulerReportLinkMonthlyPrintStyle.SetPrintExactlyOneMonthPerPage( - Value: Boolean); -begin - SetBoolOption(FPrintExactlyOneMonthPerPage, Value); -end; - -{ TcxSchedulerReportLinkTrifoldPrintStyle } - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportLinkTrifoldPrintStyle then - with TcxSchedulerReportLinkTrifoldPrintStyle(Source) do - begin - Self.LeftSection := LeftSection; - Self.MiddleSection := MiddleSection; - Self.RightSection := RightSection; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionTrifold); -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.RestoreDefaults; -begin - inherited RestoreDefaults; - FSections[0] := smDailyCalendar; - FSections[1] := smTaskPad; - FSections[2] := smWeeklyCalendar; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.CreateLayoutForPeriod( - APeriodIndex: Integer); -var - I: Integer; - R: array[0..2] of TRect; - ABounds: TRect; - ASite: TcxSchedulerReportPageSite; -begin - ABounds := GetPageSiteBounds(APeriodIndex); - ASite := AddPageSite(ABounds); - ASite.FPageIndex := APeriodIndex; - ASite.FPrimaryPage := True; - ABounds := ASite.GetInnerBounds(0); - Rect2RectsHorz(ABounds, R[0], R[1], R[2]); - for I := 0 to 2 do - CreateLayoutForSection(ASite, APeriodIndex, R[I], FSections[I]); -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.CreateLayoutForSection( - ASite: TdxReportCell; APeriodIndex: Integer; const ABounds: TRect; - ASection: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); -begin - FCurrentSection := ASection; - case ASection of - smDailyCalendar: - CreateSchedulingAreaWithHeader(ASite, ABounds); - smWeeklyCalendar: - CreateSchedulingAreaWithHeader(ASite, ABounds); - smMonthlyCalendar: - CreateSchedulingAreaWithHeader(ASite, ABounds); - smTaskPad: - InitReportCell(CreateTaskPadCell(ASite), ABounds); - smNotesAreaBlank: - InitReportCell(CreateNotesCell(ASite), ABounds); - smNotesAreaLined: - InitReportCell(CreateNotesLinedCell(ASite), ABounds); - end; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.CreateSchedulingAreaWithHeader( - ASite: TdxReportCell; ABounds: TRect); -var - R: TRect; - AHeader: TcxSchedulerReportSchedulerHeaderCell; -begin - R := ABounds; - R.Bottom := R.Top + Round((R.Bottom - R.Top) * SchedulerHeaderSmallHeight); - ABounds.Top := R.Bottom + InterAreaSpace; - FCurrentSchedulingArea := CreateSchedulingAreaCell(ASite); - InitReportCell(FCurrentSchedulingArea, ABounds); - AHeader := CreateHeaderCell(ASite); - InitReportCell(AHeader, R); - AHeader.Content.BoundsRect := AHeader.GetInnerBounds(0); - AHeader.AdjustTextSize; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -begin - case FCurrentSection of - smDailyCalendar: - Result := TcxSchedulerReportDailyCellsProducer.CreateEx(Self, ASite); - smWeeklyCalendar, smMonthlyCalendar: - Result := TcxSchedulerReportWeeksCellsProducer.CreateEx(Self, ASite); - else - Result := nil; - end; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -var - I: Integer; - ADate: TDateTime; -begin - ADateList.Clear; - case FCurrentSection of - smDailyCalendar: - ADateList.Add(APageIndex + PrintRange.PrintFrom); - smWeeklyCalendar: - begin - ADate := StartOfTheWeek(PrintRange.PrintFrom + - MulDiv(APageIndex * 7, PrintRange.WeekCount, PageCount)); - for I := 0 to 7 do - ADateList.Add(ADate + I); - end; - smMonthlyCalendar: - begin - ADate := StartOfTheMonth(PrintRange.PrintFrom + APageIndex * FPageRange); - for I := 0 to DaysInMonth(ADate) do - ADateList.Add(ADate + I); - end; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - case FCurrentSection of - smDailyCalendar: - Result := Scheduler.ViewDay; - smWeeklyCalendar: - Result := Scheduler.ViewWeek; - smMonthlyCalendar: - Result := Scheduler.ViewWeeks; - else - Result := inherited GetCorrespondedView; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetGlyphIndex: Integer; -begin - Result := 15; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetPageCount: Integer; -var - I: Integer; -begin - Result := 1; - FPageRange := 30; - for I := 0 to 2 do - begin - case FSections[I] of - smDailyCalendar: - begin - Result := Max(Result, PrintRange.DayCount); - FPageRange := 1; - end; - smWeeklyCalendar: - begin - Result := Max(Result, PrintRange.WeekCount); - FPageRange := Min(FPageRange, 7); - end; - smMonthlyCalendar: - begin - Result := Max(Result, PrintRange.MonthCount); - FPageRange := Min(FPageRange, 30); - end; - end; - end; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); -var - AText: string; - ADate1, ADate2: TDateTime; -begin - with FCurrentSchedulingArea.VisibleDays do - begin - ADate1 := Items[0]; - ADate2 := Items[Count - 1]; - end; - case FCurrentSection of - smDailyCalendar: - AText := DateTimeHelper.DateToLongDateStr(ADate1); - smWeeklyCalendar: - AText := DateTimeHelper.DayToStr(ADate1, 0, False) + ' - ' + - DateTimeHelper.DayToStr(ADate2 - 1, 0, False); - smMonthlyCalendar: - if not cxGetDateFormat(ADate1, AText, DATE_YEARMONTH) then - AText := FormatDateTime('mmmm', ADate1) + ' ' + IntToStr(YearOf(ADate1)) - end; - ACell.PrimaryText := AText; - inherited InitHeaderCell(ACell); -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.GetSection( - Index: Integer): TcxSchedulerReportLinkTrifoldPrintStyleSectionMode; -begin - Result := FSections[Index]; -end; - -procedure TcxSchedulerReportLinkTrifoldPrintStyle.SetSection( - Index: Integer; AValue: TcxSchedulerReportLinkTrifoldPrintStyleSectionMode); -begin - if AValue <> FSections[Index] then - begin - FSections[Index] := AValue; - Changed; - end; -end; - -function TcxSchedulerReportLinkTrifoldPrintStyle.IsSectionStored( - Index: Integer): Boolean; -const - Sections: array[0..2] of TcxSchedulerReportLinkTrifoldPrintStyleSectionMode = - (smDailyCalendar, smTaskPad, smWeeklyCalendar); -begin - Result := FSections[Index] <> Sections[Index]; -end; - -{ TcxSchedulerReportLinkWeeklyPrintStyle } - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportLinkWeeklyPrintStyle then - Arrange := TcxSchedulerReportLinkWeeklyPrintStyle(Source).Arrange; - inherited Assign(Source); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxPrintStyleCaptionWeekly); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.IsCompatibleWith( - AView: TcxSchedulerCustomView): Boolean; -begin - Result := AView is TcxSchedulerWeekView; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.RestoreDefaults; -begin - Arrange := wsaTopToBottom; - inherited RestoreDefaults; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.CreateControlsOnFirstPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -begin - if Layout = pslTwoPages then - CreateAdditionalControls(ASite, True, ShowTaskPad and - (ShowNotesAreaLined or ShowNotesAreaBlank), False, False, False, ABounds) - else - CreateAdditionalControls(ASite, True, ShowTaskPad, - ShowNotesAreaBlank, ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.CreateControlsOnSecondPage( - APageIndex: Integer; ASite, AHeader: TdxReportCell; ABounds: TRect); -var - HasTaskPad: Boolean; -begin - HasTaskPad := ShowTaskPad and not (ShowNotesAreaBlank or ShowNotesAreaLined); - CreateAdditionalControls(ASite, True, HasTaskPad, ShowNotesAreaBlank, - ShowNotesAreaLined, True, ABounds); - InitReportCell(CreateSchedulingAreaCell(ASite), ABounds); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.CreateSchedulingCellsProducer( - ASite: TcxSchedulerReportSchedulingAreaCell): TcxSchedulerReportCommonCellsProducer; -const - CellsProducers: array[Boolean] of TcxSchedulerReportCommonCellsProducerClass = - (TcxSchedulerReportDailyCellsProducer, TcxSchedulerReportWeeksCellsProducer); -begin - Result := CellsProducers[Arrange = wsaTopToBottom].CreateEx(Self, ASite); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetCorrespondedView: TcxSchedulerCustomResourceView; -begin - if Scheduler <> nil then - begin - if Arrange = wsaTopToBottom then - Result := Scheduler.ViewWeek - else - Result := Scheduler.ViewDay; - end - else - Result := inherited GetCorrespondedView; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetGlyphIndex: Integer; -begin - Result := 3 + Byte(Arrange) + Byte(HasAdditionalArea) * 4 + - Byte(Layout = pslTwoPages) * 2 -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetDateForPage( - APageIndex: Integer): TDateTime; -begin - Result := PrintRange.PrintFrom + (APageIndex div GetResourcePageCount div - (Byte(Layout) + 1)) * 7 + GetStartOfWeekOffset; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetDaysPerPeriod: Integer; -begin - Result := 7; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetPageCount: Integer; -begin - Result := PrintRange.WeekCount * (Byte(Layout) + 1) * GetResourcePageCount; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.GetStartOfWeekOffset: Integer; -begin - Result := -DayOfWeek(PrintRange.PrintFrom) + 2; // -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.FillDatesForPage( - ADateList: TcxSchedulerDateList; APageIndex, APeriodIndex, ASubIndex: Integer); -const - DayCount: array[TcxSchedulerReportLinkPeriodicPrintStyleLayout, Boolean] of Integer = - ((7, 7), (3, 4)); -var - I: Integer; - AStart, ADate: TDateTime; -begin - AStart := GetDateForPage(APageIndex); - if Arrange = wsaLeftToRight then - for I := 0 to DayCount[Layout, ASubIndex <> 0] - 1 do - begin - ADate := AStart + ASubIndex * 3 + I; - if not DontPrintWeekEnds or not (DayOfWeek(ADate) in [1, 7]) then - ADateList.Add(ADate); - end - else - begin - AStart := AStart + Byte(Scheduler.OptionsView.ActualStartOfWeek); - for I := 0 to 6 do - ADateList.Add(AStart + I); - end; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.InitHeaderCell( - ACell: TcxSchedulerReportSchedulerHeaderCell); - - function GetWeekDayText(ADate: TDateTime): string; - begin - Result := DateTimeHelper.DayToStr(ADate, 0, False); - end; - -var - AWeekDate: TDateTime; -begin - AWeekDate := GetDateForPage(ACell.PageIndex); - ACell.PrimaryText := GetWeekDayText(AWeekDate) + ' - ' + - GetWeekDayText(AWeekDate + 6); - inherited InitHeaderCell(ACell); -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.CanDontPrintWeekends: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.SupportTimeRange: Boolean; -begin - Result := Arrange = wsaLeftToRight; -end; - -function TcxSchedulerReportLinkWeeklyPrintStyle.IsArrangeStored: Boolean; -begin - Result := Arrange <> wsaTopToBottom; -end; - -procedure TcxSchedulerReportLinkWeeklyPrintStyle.SetArrange( - Value: TcxSchedulerReportLinkWeeklyPrintStyleArrange); -begin - if Arrange <> Value then - begin - FArrange := Value; - Changed; - end; -end; - -{ TdxfmSchedulerReportLinkDesignWindow } - -constructor TcxfmSchedulerReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhccxSchedulerReportLinkDesigner; - inherited; - wpPrintStyles := TList.Create; - CreateControls; - SetActivePage; -end; - -destructor TcxfmSchedulerReportLinkDesignWindow.Destroy; -begin - FreeAndNil(wpPrintStyles); - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(lbxStyles); - inherited; -end; - -function TcxfmSchedulerReportLinkDesignWindow.Execute: Boolean; -begin - Self.FActiveStyle := ReportLink.PrintStyles.FActiveStyle; - Self.FActiveStyleAssigned := ReportLink.PrintStyles.FActiveStyleAssigned; - if (ReportLink.PrintStyles.ActiveStyle = nil) or not FActiveStyleAssigned then - with ReportLink.PrintStyles do SetActiveStyleEx(GetCorrespondingStyle); - Result := inherited Execute; - if Result then - ReportLink.PrintStyles.ActiveStyle := ActivePrintStyle - else - begin - ReportLink.PrintStyles.FActiveStyleAssigned := FActiveStyleAssigned; - ReportLink.PrintStyles.FActiveStyle := FActiveStyle; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignDailyTabObjects; -var - ADailyStyle: TcxSchedulerReportLinkDailyPrintStyle; -begin - ADailyStyle := ReportLink.PrintStyles.Daily; - cbxPrintStyleDailyLayout.ItemIndex := Integer(ADailyStyle.Layout); - sePrintStyleDailyResourceCountPerPage.Properties.MaxValue := ADailyStyle.ResourceCount; - sePrintStyleDailyResourceCountPerPage.Value := ADailyStyle.ResourceCountPerPage; - chbxPrintStyleDailyTaskPad.Checked := ADailyStyle.ShowTaskPad; - chbxPrintStyleDailyNotesAreaBlank.Checked := ADailyStyle.ShowNotesAreaBlank; - chbxPrintStyleDailyNotesAreaLined.Checked := ADailyStyle.ShowNotesAreaLined; - tePrintStyleDailyPrintFrom.Time := ADailyStyle.TimePrintFrom; - tePrintStyleDailyPrintTo.Time := ADailyStyle.TimePrintTo; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignDetailsTabObjects; -var - ADetailsStyle: TcxSchedulerReportLinkDetailsPrintStyle; -begin - ADetailsStyle := ReportLink.PrintStyles.Details; - chbxPrintStyleDetailsUsePagination.Checked := ADetailsStyle.UsePagination; - cbxPrintStyleDetailsPagination.ItemIndex := Integer(ADetailsStyle.PaginationMode); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignMemoTabObjects; -var - AMemoStyle: TcxSchedulerReportLinkMemoPrintStyle; -begin - AMemoStyle := ReportLink.PrintStyles.Memo; - chbxPrintStyleMemoStartEachItemOnNewPage.Checked := AMemoStyle.StartEachItemOnNewPage; - chbxPrintStyleMemoPrintOnlySelectedEvents.Checked := AMemoStyle.SelectedEventsOnly; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignMonthlyTabObjects; -var - AMonthlyStyle: TcxSchedulerReportLinkMonthlyPrintStyle; -begin - AMonthlyStyle := ReportLink.PrintStyles.Monthly; - cbxPrintStyleMonthlyLayout.ItemIndex := Integer(AMonthlyStyle.Layout); - sePrintStyleMonthlyResourceCountPerPage.Properties.MaxValue := AMonthlyStyle.ResourceCount; - sePrintStyleMonthlyResourceCountPerPage.Value := AMonthlyStyle.ResourceCountPerPage; - chbxPrintStyleMonthlyTaskPad.Checked := AMonthlyStyle.ShowTaskPad; - chbxPrintStyleMonthlyNotesAreaBlank.Checked := AMonthlyStyle.ShowNotesAreaBlank; - chbxPrintStyleMonthlyNotesAreaLined.Checked := AMonthlyStyle.ShowNotesAreaLined; - chbxPrintStyleMonthlyDontPrintWeekends.Checked := AMonthlyStyle.DontPrintWeekends; - chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage.Checked := AMonthlyStyle.PrintExactlyOneMonthPerPage; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignTrifoldTabObjects; -var - ATrifoldStyle: TcxSchedulerReportLinkTrifoldPrintStyle; -begin - ATrifoldStyle := ReportLink.PrintStyles.Trifold; - cbxPrintStyleTrifoldSectionLeft.ItemIndex := Byte(ATrifoldStyle.LeftSection); - cbxPrintStyleTrifoldSectionMiddle.ItemIndex := Byte(ATrifoldStyle.MiddleSection); - cbxPrintStyleTrifoldSectionRight.ItemIndex := Byte(ATrifoldStyle.RightSection); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignWeeklyTabObjects; -var - AWeeklyStyle: TcxSchedulerReportLinkWeeklyPrintStyle; -begin - AWeeklyStyle := ReportLink.PrintStyles.Weekly; - cbxPrintStyleWeeklyArrange.ItemIndex := Integer(AWeeklyStyle.Arrange); - cbxPrintStyleWeeklyLayout.ItemIndex := Integer(AWeeklyStyle.Layout); - sePrintStyleWeeklyResourceCountPerPage.Properties.MaxValue := AWeeklyStyle.ResourceCount; - sePrintStyleWeeklyResourceCountPerPage.Value := AWeeklyStyle.ResourceCountPerPage; - chbxPrintStyleWeeklyTaskPad.Checked := AWeeklyStyle.ShowTaskPad; - chbxPrintStyleWeeklyNotesAreaBlank.Checked := AWeeklyStyle.ShowNotesAreaBlank; - chbxPrintStyleWeeklyNotesAreaLined.Checked := AWeeklyStyle.ShowNotesAreaLined; - chbxPrintStyleWeeklyDontPrintWeekends.Checked := AWeeklyStyle.DontPrintWeekends; - tePrintStyleWeeklyPrintFrom.Time := AWeeklyStyle.TimePrintFrom; - tePrintStyleWeeklyPrintTo.Time := AWeeklyStyle.TimePrintTo; -end; - -function TcxfmSchedulerReportLinkDesignWindow.CanApply: Boolean; -begin - Result := inherited CanApply;// and not ReportLink.IsInconsistentState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoApply; -begin - if not IsValidConditions then Exit; - ReportLink.PrintStyles.ActiveStyle := ActivePrintStyle; - FActiveStyle := ReportLink.PrintStyles.FActiveStyle; - FActiveStyleAssigned := ReportLink.PrintStyles.FActiveStyleAssigned; - inherited DoApply; - ReportLink.RebuildReport; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoInitialize; -begin - - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited DoInitialize; - - with ReportLink.PrintRange do - begin - dePrintRangeStart.Date := PrintFrom; - dePrintRangeEnd.Date := PrintTo; - end; - - AssignTabSheetObjects; - RefreshPrintStyles; - ActivatePrintStyleTab; - - AssignDailyTabObjects; - AssignDetailsTabObjects; - AssignMemoTabObjects; - AssignMonthlyTabObjects; - AssignTrifoldTabObjects; - AssignWeeklyTabObjects; - - // Formatting - with ReportLink.OptionsFormatting do - begin - cbxLookAndFeel.ItemIndex := Min(2, Integer(LookAndFeelKind)); - chbxSuppressBackgroundBitmaps.Checked := SuppressBackgroundBitmaps; - chbxSuppressContentColoration.Checked := SuppressContentColoration; - chbxUseNativeStyles.Checked := UseNativeStyles; - end; - - PageControl1Change(nil); -end; - -{$IFDEF DELPHI7} -function TcxfmSchedulerReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -function TcxfmSchedulerReportLinkDesignWindow.CheckPrintRange: Boolean; -begin - Result := dePrintRangeEnd.Date >= dePrintRangeStart.Date; - if not Result then - begin - MessageBox(0, - PChar(cxGetResourceString(@sdxBadDatePrintRange)), - PChar(cxGetResourceString(@sdxReportDesignerCaption)), - MB_ICONINFORMATION or MB_OK); - PageControl1.ActivePage := tshPrintRange; - ActiveControl := dePrintRangeEnd; - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.CheckPrintStyleSettings: Boolean; - - procedure ShowWarning; - begin - MessageBox(0, - PChar(cxGetResourceString(@sdxBadTimePrintRange)), - PChar(cxGetResourceString(@sdxReportDesignerCaption)), - MB_ICONINFORMATION or MB_OK); - end; - -begin - if pcPrintStyleOptions.ActivePage = tshDaily then - begin - Result := TimeOf(tePrintStyleDailyPrintFrom.Time) <= TimeOf(tePrintStyleDailyPrintTo.Time); - if not Result then - begin - ShowWarning; - PageControl1.ActivePage := tshPrintStyles; - pcPrintStyleOptions.ActivePage := tshDaily; - ActiveControl := tePrintStyleDailyPrintTo; - end; - end - else - if pcPrintStyleOptions.ActivePage = tshWeekly then - begin - Result := TimeOf(tePrintStyleWeeklyPrintFrom.Time) <= TimeOf(tePrintStyleWeeklyPrintTo.Time); - if not Result then - begin - ShowWarning; - PageControl1.ActivePage := tshPrintStyles; - pcPrintStyleOptions.ActivePage := tshWeekly; - ActiveControl := tePrintStyleWeeklyPrintTo; - end; - end - else - Result := True; -end; - -function TcxfmSchedulerReportLinkDesignWindow.IsValidConditions: Boolean; -begin - Result := CheckPrintRange and CheckPrintStyleSettings; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadCaption( - AControl: TControl; StrPtr: Pointer); -begin - TControlAccess(AControl).Caption := cxGetResourceString(StrPtr); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadCaption( - AItem: TMenuItem; StrPtr: Pointer); -begin - AItem.Caption := cxGetResourceString(StrPtr); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStrings; -begin - inherited LoadStrings; - LoadStringsDaily; - LoadStringsMonthly; - LoadStringsWeekly; - LoadStringsTrifold; - LoadStringsDetails; - LoadStringsMemo; - LoadStringsOther; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsCombo( - ACombo: TcxComboBox; ACaptions: array of Pointer); -var - I: Integer; -begin - with ACombo.Properties.Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to High(ACaptions) do - if ACaptions[I] <> nil then Add(cxGetResourceString(ACaptions[I])); - finally - EndUpdate; - end; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsDaily; -begin - LoadCaption(lblPrintStyleDailyLayout, @sdxPrintStyleLayout); - LoadStringsCombo(cbxPrintStyleDailyLayout, - [@sdxPrintStyleDailyLayout1PPD, - @sdxPrintStyleDailyLayout2PPD]); - LoadCaption(lblPrintStyleDailyResourceCountPerPage, - @sdxResourceCountPerPage); - LoadCaption(lblPrintStyleDailyInclude, - @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleDailyTaskPad, - @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleDailyNotesAreaBlank, - @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleDailyNotesAreaLined, - @sdxPrintStyleIncludeNotesAreaLined); - LoadCaption(lblPrintStyleDailyPrintFrom, @sdxPrintStylePrintFrom); - LoadCaption(lblPrintStyleDailyPrintTo, @sdxPrintStylePrintTo); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsDetails; -begin - LoadCaption(chbxPrintStyleDetailsUsePagination, - @sdxPrintStyleDetailsStartNewPageEach); - LoadStringsCombo(cbxPrintStyleDetailsPagination, - [@sdxDay, @sdxWeek, @sdxMonth]); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsMemo; -begin - LoadCaption(chbxPrintStyleMemoStartEachItemOnNewPage, - @sdxPrintStyleMemoStartEachItemOnNewPage); - LoadCaption(chbxPrintStyleMemoPrintOnlySelectedEvents, - @sdxPrintStyleMemoPrintOnlySelectedEvents); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsMonthly; -begin - LoadCaption(lblPrintStyleMonthlyLayout, @sdxPrintStyleLayout); - LoadStringsCombo(cbxPrintStyleMonthlyLayout, - [@sdxPrintStyleMonthlyLayout1PPM, @sdxPrintStyleMonthlyLayout2PPM]); - LoadCaption(lblPrintStyleMonthlyResourceCountPerPage, @sdxResourceCountPerPage); - LoadCaption(lblPrintStyleMonthlyInclude, @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleMonthlyTaskPad, @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleMonthlyNotesAreaBlank, @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleMonthlyNotesAreaLined, @sdxPrintStyleIncludeNotesAreaLined); - - LoadCaption(chbxPrintStyleMonthlyDontPrintWeekends, @sdxPrintStyleDontPrintWeekEnds); - LoadCaption(chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage, @sdxPrintStyleMonthlyPrintExactly1MPP); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsOther; - - procedure AdjustBevelSize(ABevel: TBevel; AControl: TControl); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := AControl.Left + AControl.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - lblPreviewWindow.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - // Misc - LoadCaption(tshPrintRange, @sdxPrintRanges); - LoadCaption(lblPrintRangeStart, @sdxPrintRangeStart); - LoadCaption(lblPrintRangeEnd, @sdxPrintRangeEnd); - LoadCaption(lblPrintRangesMiscellaneous, @sdxMiscellaneous); - LoadCaption(chbxHideDetailsOfPrivateAppointments, - @sdxHideDetailsOfPrivateAppointments); - LoadCaption(tshPrintStyles, @sdxTabPrintStyles); - LoadCaption(lblPrintStylesOptions, @sdxOptions); - AdjustBevelSize(bvlPrintStyleOptions, lblPrintStylesOptions); - // Formatting - LoadCaption(tshFormatting, @sdxFormatting); - LoadCaption(lblLookAndFeel, @sdxLookAndFeel); - AdjustBevelSize(bvlLookAndFeel, lblLookAndFeel); - LoadStringsCombo(cbxLookAndFeel, [@sdxLookAndFeelFlat, - @sdxLookAndFeelStandard, @sdxLookAndFeelUltraFlat]); - LoadCaption(lblRefinements, @sdxRefinements); - AdjustBevelSize(bvlRefinements, lblRefinements); - LoadCaption(chbxSuppressBackgroundBitmaps, @sdxSuppressBackgroundBitmaps); - LoadCaption(chbxSuppressContentColoration, @sdxSuppressContentColoration); - // Styles - LoadCaption(tshStyles, @sdxStyles); - LoadCaption(lblUseNativeStyles, @sdxUseNativeStyles); - AdjustBevelSize(bvlStyles, lblUseNativeStyles); - LoadCaption(btnStyleColor, @sdxBtnColor); - LoadCaption(btnStyleFont, @sdxBtnFont); - LoadCaption(btnStyleBackgroundBitmap, @sdxBtnTexture); - LoadCaption(btnStyleBackgroundBitmapClear, @sdxBtnTextureClear); - LoadCaption(btnStyleRestoreDefaults, @sdxBtnRestoreDefaults); - LoadCaption(btnStylesSaveAs, @sdxBtnSaveAs); - LoadCaption(miStyleColor, @sdxBtnColor); - LoadCaption(miStyleFont, @sdxBtnFont); - LoadCaption(miStyleBackgroundBitmap, @sdxBtnTexture); - LoadCaption(miStyleBackgroundBitmapClear, @sdxBtnTextureClear); - LoadCaption(miStyleRestoreDefaults, @sdxBtnRestoreDefaults); - LoadCaption(miStylesSelectAll, @sdxSelectAll); - LoadCaption(miStylesSaveAs, @sdxBtnSaveAs); - LoadCaption(lblStyleSheets, @sdxStyleSheets); - AdjustBevelSize(bvlStyleSheets, lblStyleSheets); - LoadCaption(btnStyleSheetNew, @sdxBtnNew); - LoadCaption(btnStyleSheetCopy, @sdxBtnCopy); - LoadCaption(btnStyleSheetDelete, @sdxBtnDelete); - LoadCaption(btnStyleSheetRename, @sdxBtnRename); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsTrifold; - - procedure FillTrifoldSectionStrings(ACombobox: TcxCombobox); - begin - LoadStringsCombo(ACombobox, - [@sdxPrintStyleTrifoldSectionModeDailyCalendar, - @sdxPrintStyleTrifoldSectionModeWeeklyCalendar, - @sdxPrintStyleTrifoldSectionModeMonthlyCalendar, - @sdxPrintStyleTrifoldSectionModeTaskPad, - @sdxPrintStyleTrifoldSectionModeNotesBlank, - @sdxPrintStyleTrifoldSectionModeNotesLined]); - end; - -begin - LoadCaption(lblPrintStyleTrifoldSectionLeft, @sdxPrintStyleTrifoldSectionLeft); - FillTrifoldSectionStrings(cbxPrintStyleTrifoldSectionLeft); - LoadCaption(lblPrintStyleTrifoldSectionMiddle, @sdxPrintStyleTrifoldSectionMiddle); - FillTrifoldSectionStrings(cbxPrintStyleTrifoldSectionMiddle); - LoadCaption(lblPrintStyleTrifoldSectionRight, @sdxPrintStyleTrifoldSectionRight); - FillTrifoldSectionStrings(cbxPrintStyleTrifoldSectionRight); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LoadStringsWeekly; -begin - LoadCaption(lblPrintStyleWeeklyArrange, @sdxPrintStyleWeeklyArrange); - LoadStringsCombo(cbxPrintStyleWeeklyArrange, - [@sdxPrintStyleWeeklyArrangeT2B, @sdxPrintStyleWeeklyArrangeL2R]); - - LoadCaption(lblPrintStyleWeeklyLayout, @sdxPrintStyleLayout); - LoadStringsCombo(cbxPrintStyleWeeklyLayout, - [@sdxPrintStyleWeeklyLayout1PPW, @sdxPrintStyleWeeklyLayout2PPW]); - LoadCaption(lblPrintStyleWeeklyResourceCountPerPage, @sdxResourceCountPerPage); - LoadCaption(lblPrintStyleWeeklyInclude, @sdxPrintStyleInclude); - LoadCaption(chbxPrintStyleWeeklyTaskPad, @sdxPrintStyleIncludeTaskPad); - LoadCaption(chbxPrintStyleWeeklyNotesAreaBlank, @sdxPrintStyleIncludeNotesAreaBlank); - LoadCaption(chbxPrintStyleWeeklyNotesAreaLined, @sdxPrintStyleIncludeNotesAreaLined); - - LoadCaption(lblPrintStyleWeeklyPrintFrom, @sdxPrintStylePrintFrom); - LoadCaption(lblPrintStyleWeeklyPrintTo, @sdxPrintStylePrintTo); - - LoadCaption(chbxPrintStyleWeeklyDontPrintWeekends, @sdxPrintStyleDontPrintWeekEnds); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.PreviewDrawPageContent( - ACanvas: TCanvas; ABounds: TRect); -const - AMessageFlags = CXTO_CENTER_HORIZONTALLY or CXTO_CENTER_VERTICALLY or CXTO_WORDBREAK; -var - AMsg: PChar; - R, R1: TRect; - APrinter: TdxComponentPrinter; - ALink: TcxSchedulerReportLink; - ASource, ADest: TBitmap; -begin - if ReportLink.Component = nil then - begin - ACanvas.Brush.Color := clWindow; - ACanvas.FillRect(ABounds); - Exit; - end; - APrinter := TdxComponentPrinter.Create(nil); - try - ALink := TcxSchedulerReportLink.Create(APrinter); - ALink.LinkInPreviewMode := True; - try - ALink.Assign(ReportLink); - ALink.PrinterPage.RestoreDefaults; - ALink.Component := ReportLink.Component; - ALink.ComponentPrinter := APrinter; - AMsg := nil; - with ALink do - R1 := MakeBounds(0, 0, PageWidth, PageHeight); - ASource := cxCreateBitmap(cxSize(R1.Right, R1.Bottom)); - ASource.Canvas.Lock; - try - R := cxRectOffset(ABounds, -ABounds.Left, -ABounds.Top); - ALink.PrintStyles.ActiveStyle := ALink.PrintStyles[ - ReportLink.PrintStyles.IndexOf(ReportLink.PrintStyles.ActiveStyle)]; - ALink.RebuildReport; - FillRect(ASource.Canvas.Handle, R1, GetSysColorBrush(COLOR_WINDOW)); - if ALink.PageCount > 0 then - APrinter.PaintPage(ASource.Canvas, 0, R1, R1, ALink) - else - with ReportLink.PrintStyles do - begin - if (FActiveStyle = Memo) and Memo.SelectedEventsOnly then - AMsg := PChar(cxGetResourceString(@sdxCannotPrintNoSelectedItems)) - else - AMsg := PChar(cxGetResourceString(@sdxCannotPrintNoItemsAvailable)); - end; - ADest := cxCreateBitmap(cxSize(R.Right, R.Bottom)); - ADest.Canvas.Lock; - try - cxSmoothResizeBitmap(ASource, ADest); - if AMsg <> nil then - cxTextOut(ADest.Canvas.Handle, AMsg, R, AMessageFlags); - ACanvas.Draw(0, 0, ADest); - finally - ADest.Canvas.UnLock; - ADest.Free; - end; - finally - ASource.Canvas.Unlock; - ASource.Free; - end; - finally - ALink.Free; - end; - finally - APrinter.Free; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateControlsState; -begin - inherited UpdateControlsState; - - UpdateEnabledControls([lblPrintStyleDailyPrintFrom, tePrintStyleDailyPrintFrom, - lblPrintStyleDailyPrintTo, tePrintStyleDailyPrintTo], - ReportLink.PrintStyles.Daily.SupportTimeRange); - UpdateEnabledControls([lblPrintStyleWeeklyPrintFrom, tePrintStyleWeeklyPrintFrom, - lblPrintStyleWeeklyPrintTo, tePrintStyleWeeklyPrintTo], - ReportLink.PrintStyles.Weekly.SupportTimeRange); - - chbxPrintStyleWeeklyDontPrintWeekends.Enabled := - ReportLink.PrintStyles.Weekly.CanDontPrintWeekends; - - UpdateEnabled(lbxStyles, AreNativeStylesAvailable); - UpdateEnabled(btnStyleColor, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleFont, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleBackgroundBitmap, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStyleBackgroundBitmapClear, AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap); - UpdateEnabled(btnStyleRestoreDefaults, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(btnStylesSaveAs, CanSaveStyles); - - UpdateEnabled(lblStyleSheets, AreNativeStylesAvailable); - UpdateEnabled(cbxStyleSheets, AreNativeStylesAvailable); - UpdateEnabled(btnStyleSheetNew, CanCreateStyleSheet); - UpdateEnabled(btnStyleSheetCopy, CanCopyStyleSheet); - UpdateEnabled(btnStyleSheetDelete, CanDeleteStyleSheet); - UpdateEnabled(btnStyleSheetRename, CanRenameStyleSheet); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateEnabled( - AControl: TControl; AEnabled: Boolean); -begin - TControlAccess(AControl).Enabled := AEnabled; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateEnabled( - AItem: TMenuItem; AEnabled: Boolean); -begin - AItem.Enabled := AEnabled; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdateEnabledControls( - AControls: array of TControl; AEnabled: Boolean); -var - I: Integer; -begin - for I := 0 to High(AControls) do - UpdateEnabled(AControls[I], AEnabled); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.UpdatePreview; -begin - if Visible then - begin - RefreshPrintStyles; - pbxPrintStylesPreview.Refresh; - pbPreview.Refresh; - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetDesignerTabIndex: Integer; -begin - Result := PageControl1.ActivePage.TabIndex; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetDesignerTabIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > PageControl1.PageCount - 1 then - Value := PageControl1.PageCount - 1; - PageControl1.ActivePage := PageControl1.Pages[Value]; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - inherited; - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - with cbxStyleSheets do - ItemIndex := Properties.Items.IndexOfObject(ActiveStyleSheet); - - if not LockControlsUpdate then - begin - Modified := True; - UpdatePreview; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin - inherited; - if not AnActive then lbxStyles.HideToolTips; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoRefreshStylesList; -var - Styles: TcxSchedulerReportLinkStyles; - List: TList; -begin - Styles := ReportLink.ActiveStyles; - with lbxStyles.Items do - begin - BeginUpdate; - try - List := TList.Create; - try - SaveSelectedStyles(List); - try - Clear; - AddObject(cxGetResourceString(@sdxSchedulerSchedulerHeader), Styles.SchedulerHeader); - AddObject(cxGetResourceString(@sdxSchedulerContent), Styles.Content); - AddObject(cxGetResourceString(@sdxSchedulerDateNavigatorContent), Styles.DateNavigatorContent); - AddObject(cxGetResourceString(@sdxSchedulerDateNavigatorHeader), Styles.DateNavigatorHeader); - AddObject(cxGetResourceString(@sdxSchedulerDayHeader), Styles.DayHeader); - AddObject(cxGetResourceString(@sdxSchedulerEvent), Styles.Event); - AddObject(cxGetResourceString(@sdxSchedulerResourceHeader), Styles.ResourceHeader); - AddObject(cxGetResourceString(@sdxSchedulerNotesAreaBlank), Styles.NotesAreaBlank); - AddObject(cxGetResourceString(@sdxSchedulerNotesAreaLined), Styles.NotesAreaLined); - AddObject(cxGetResourceString(@sdxSchedulerTaskPad), Styles.TaskPad); - AddObject(cxGetResourceString(@sdxSchedulerTimeRuler), Styles.TimeRuler); - finally - RestoreSelectedStyles(List); - end; - finally - List.Free; - end; - finally - EndUpdate; - end; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - inherited; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin - if ARecreate then - RecreateStylesListBox - else - lbxStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - with lbxStyles do - for I := 0 to Items.Count - 1 do - if Selected[I] then - AStrings.AddObject(Items[I], Items.Objects[I]); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := lbxStyles.Items; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := cbxStyleSheets.Properties.Items; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.ActivatePrintStyleTab; -begin - pcPrintStyleOptions.ActivePageIndex := FindTabIndexByPrintStyle(ActivePrintStyle); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.AssignTabSheetObjects; -begin - with ReportLink.PrintStyles do - begin - tshDaily.Tag := MakeTTag(Daily); - tshWeekly.Tag := MakeTTag(Weekly); - tshMonthly.Tag := MakeTTag(Monthly); - tshTrifold.Tag := MakeTTag(Trifold); - tshDetails.Tag := MakeTTag(Details); - tshMemo.Tag := MakeTTag(Memo); - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.FindTabIndexByPrintStyle(APrintStyle: TcxCustomSchedulerReportLinkPrintStyle): Integer; -begin - for Result := 0 to pcPrintStyleOptions.PageCount - 1 do - if pcPrintStyleOptions.Pages[Result].Tag = MakeTTag(APrintStyle) then Exit; - Result := -1; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.RefreshPrintStyles; -var - AItems: TcxImageComboBoxItems; - ActiveStyleIndex, I: Integer; - - procedure CheckAndAddPrintStyle(APrintStyle: TcxCustomSchedulerReportLinkPrintStyle); - begin - with TcxImageComboBoxItem(AItems.Add) do - begin - ImageIndex := APrintStyle.GlyphIndex; - Description := APrintStyle.Caption; - Value := Index; - Tag := Integer(APrintStyle); - end; - if (ActiveStyleIndex = -1) and (APrintStyle = ReportLink.PrintStyles.ActiveStyle) then - ActiveStyleIndex := AItems.Count - 1; - end; - -begin - ActiveStyleIndex := cbxPrintStyles.ItemIndex; - cbxPrintStyles.Properties.Images := StyleImages; - AItems := cbxPrintStyles.Properties.Items; - AItems.BeginUpdate; - try - AItems.Clear; - for I := 0 to ReportLink.PrintStyles.Count - 1 do - CheckAndAddPrintStyle(ReportLink.PrintStyles.Items[I]); - cbxPrintStyles.ItemIndex := ActiveStyleIndex; - finally - AItems.EndUpdate; - end; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetActivePrintStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - if cbxPrintStyles.ItemIndex <> -1 then - begin - with cbxPrintStyles.Properties.Items[cbxPrintStyles.ItemIndex] do - Result := TcxCustomSchedulerReportLinkPrintStyle(Tag) - end - else - Result := nil; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetActiveStyle: TcxStyle; -begin - with lbxStyles do - if ItemIndex <> -1 then - Result := TcxStyle(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetComponent: TcxScheduler; -begin - Result := inherited Component as TcxScheduler; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetHasSelectedStyles: Boolean; -begin - Result := lbxStyles.SelCount <> 0; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetHasSelectedStylesWithAssignedBitmap: Boolean; -var - Strings: TStrings; - I: Integer; - cxStyle: TcxStyle; -begin - Result := True; - Strings := TStringList.Create; - try - GetSelectedStyleNames(Strings); - for I := 0 to Strings.Count - 1 do - begin - cxStyle := TcxStyle(Strings.Objects[I]); - if (cxStyle <> nil) and (cxStyle.Bitmap <> nil) and not cxStyle.Bitmap.Empty then - Exit; - end; - finally - Strings.Free; - end; - Result := False; -end; - -function TcxfmSchedulerReportLinkDesignWindow.GetReportLink: TcxSchedulerReportLink; -begin - Result := inherited ReportLink as TcxSchedulerReportLink; -end; - -function TcxfmSchedulerReportLinkDesignWindow.CanSelectAllStyles: Boolean; -var - I: Integer; -begin - Result := AreNativeStylesAvailable; - if Result then - begin - for I := 0 to lbxStyles.Items.Count - 1 do - if not lbxStyles.Selected[I] then Exit; - Result := False; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.CreateControls; - - procedure CreateStylesListBox; - begin - lbxStyles := TdxStylesListBox.Create(Self); - lbxStyles.Parent := tshStyles; - lbxStyles.BoundsRect := bvlStylesHost.BoundsRect; - lbxStyles.PopupMenu := pmStyles; - lbxStyles.TabOrder := chbxUseNativeStyles.TabOrder + 1; - lbxStyles.OnClick := lbxStylesClick; - bvlStylesHost.Visible := False; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(lbxStyles); - end; - -begin - CreateStylesListBox; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.RecreateStylesListBox; -var - List: TList; -begin - List := TList.Create; - try - SaveSelectedStyles(List); - dxPSUtl.dxRecreateWnd(lbxStyles); - RestoreSelectedStyles(List); - finally - List.Free; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.RestoreSelectedStyles(AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - lbxStyles.Selected[Integer(AList[I])] := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SaveSelectedStyles(AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to lbxStyles.Items.Count - 1 do - if lbxStyles.Selected[I] then AList.Add(TObject(I)); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetActivePage; -begin - PageControl1.ActivePage := PageControl1.Pages[DesignerTabIndex]; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetOptionsFormattingByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if LockControlsUpdate then Exit; - - with ReportLink.OptionsFormatting do - case AnIndex of - 0: - begin - UseNativeStyles := AValue; - RecreateStylesListBox; - end; - 1: SuppressBackgroundBitmaps := AValue; - 2: SuppressContentColoration := AValue; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetPrintStyleOptionsViewByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if not LockControlsUpdate then - begin - case AnIndex of - 0: - ActivePrintStyle.ShowTaskPad := AValue; - 1: - ActivePrintStyle.ShowNotesAreaBlank := AValue; - 2: - ActivePrintStyle.ShowNotesAreaLined := AValue; - end; - Modified := True; - UpdatePreview; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetPrintStyleRangeByIndex(AnIndex: Integer; - const ATime: TDateTime); -begin - if not LockControlsUpdate then - begin - case AnIndex of - 0: - ActivePrintStyle.TimePrintFrom := ATime; - 1: - ActivePrintStyle.TimePrintTo := ATime; - end; - Modified := True; - UpdatePreview; - UpdateControlsState; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.SetPrintStyleResourceCountPerPageByIndex(AnIndex: Integer; - AValue: TcxEditValue); -begin - if LockControlsUpdate then Exit; - with ReportLink.PrintStyles do - case AnIndex of - 0: Daily.ResourceCountPerPage := AValue; - 1: Weekly.ResourceCountPerPage := AValue; - 2: Monthly.ResourceCountPerPage := AValue; - end; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.FormCloseQuery(Sender: TObject; - var CanClose: Boolean); - - procedure ValidateEditors; - begin - FIsFormClosing := True; - try - dePrintRangeStart.ValidateEdit(False); - dePrintRangeEnd.ValidateEdit(False); - - tePrintStyleDailyPrintFrom.ValidateEdit(False); - tePrintStyleDailyPrintTo.ValidateEdit(False); - tePrintStyleWeeklyPrintFrom.ValidateEdit(False); - tePrintStyleWeeklyPrintTo.ValidateEdit(False); - finally - FisFormClosing := False; - end; - end; - -begin - if ModalResult = mrOK then - begin - ValidateEditors; - CanClose := IsValidConditions; - end; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - pnlPrintStylesPreview.Visible := PageControl1.ActivePage = tshPrintStyles; - pnlPreview.Visible := PageControl1.ActivePage <> tshPrintStyles; - lblPreviewWindow.Parent := PageControl1.ActivePage; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.lbxStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleFontClick(Sender: TObject); -begin - PerformStylesChangeFont; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleColorClick(Sender: TObject); -begin - PerformStylesChangeColor; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleBackgroundBitmapClick(Sender: TObject); -begin - PerformStylesChangeBitmap; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleBackgroundBitmapClearClick(Sender: TObject); -begin - PerformStylesClearBitmap; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.miStylesSelectAllClick(Sender: TObject); -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - with lbxStyles do - begin - {$IFDEF DELPHI6} - SelectAll; - {$ELSE} - Items.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - Selected[I] := True; - finally - Items.EndUpdate; - end; - {$ENDIF} - end; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleRestoreDefaultsClick(Sender: TObject); -begin - PerformStylesRestoreDefaults; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStylesSaveAsClick(Sender: TObject); -begin - PerformStylesSaveAsStyleSheet; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxStyleSheetsClick(Sender: TObject); -begin - with TcxComboBox(Sender) do - ActiveStyleSheet := TcxCustomStyleSheet(Properties.Items.Objects[ItemIndex]); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxStyleSheetsPropertiesDrawItem( - AControl: TcxCustomComboBox; ACanvas: TcxCanvas; AIndex: Integer; - const ARect: TRect; AState: TOwnerDrawState); -begin - PerformStyleSheetDrawItem(ACanvas.Canvas, AIndex, ARect, AState, AControl.Enabled); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxStyleSheetsKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - PerformStyleSheetKeyDown(Sender, Key, Shift); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetNewClick(Sender: TObject); -begin - PerformStyleSheetNew; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetCopyClick(Sender: TObject); -begin - PerformStyleSheetCopy; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetDeleteClick(Sender: TObject); -begin - PerformStyleSheetDelete; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.btnStyleSheetRenameClick(Sender: TObject); -begin - PerformStyleSheetRename; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.lblUseNativeStylesClick(Sender: TObject); -begin - if chbxUseNativeStyles.CanFocus then ActiveControl := chbxUseNativeStyles; - chbxUseNativeStyles.Checked := not chbxUseNativeStyles.Checked; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.OptionsFormattingClick(Sender: TObject); -begin - with TcxCheckBox(Sender) do - SetOptionsFormattingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.LookAndFeelChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TcxComboBox(Sender) do - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(Properties.Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.pmStylesPopup(Sender: TObject); -begin - lbxStyles.HideToolTips; - UpdateEnabled(miStyleColor, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleFont, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleBackgroundBitmap, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStyleBackgroundBitmapClear, AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap); - UpdateEnabled(miStyleRestoreDefaults, AreNativeStylesAvailable and HasSelectedStyles); - UpdateEnabled(miStylesSelectAll, CanSelectAllStyles); - UpdateEnabled(miStylesSaveAs, CanSaveStyles); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.dePrintRangeStartEditValueChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintRange.PrintFrom := TcxDateEdit(Sender).Date; - Modified := True; - UpdatePreview; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.dePrintRangeEndEditValueChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintRange.PrintTo := TcxDateEdit(Sender).Date; - Modified := True; - UpdatePreview; - UpdateControlsState; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with ReportLink.PrintStyles do - FActiveStyle := Items[TcxComboBox(Sender).ItemIndex]; - ActivatePrintStyleTab; - Modified := True; - UpdatePreview; - UpdateControlsState; -end; - -// Daily -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleDailyLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Daily.Layout := - TcxSchedulerReportLinkPeriodicPrintStyleLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.sePrintStyleResourceCountPerPagePropertiesChanged( - Sender: TObject); -begin - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.sePrintStyleResourceCountPerPagePropertiesEditValueChanged( - Sender: TObject); -begin - with TcxSpinEdit(Sender) do - SetPrintStyleResourceCountPerPageByIndex(TTagToInt(Tag), Value); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleOptionsViewClick( - Sender: TObject); -begin - with TcxCheckBox(Sender) do - SetPrintStyleOptionsViewByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.tePrintStylePrintRangePropertiesEditValueChanged( - Sender: TObject); -begin - with TcxTimeEdit(Sender) do - SetPrintStyleRangeByIndex(TTagToInt(Tag), Time); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.tePrintStylePrintRangePropertiesChange( - Sender: TObject); -begin - Modified := True; -end; - -// Weekly -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleWeeklyArrangeClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Weekly.Arrange := - TcxSchedulerReportLinkWeeklyPrintStyleArrange(TcxComboBox(Sender).ItemIndex); - cbxPrintStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleWeeklyLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Weekly.Layout := - TcxSchedulerReportLinkPeriodicPrintStyleLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleWeeklyDontPrintWeekendsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Weekly.DontPrintWeekends := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -// Monthly -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleMonthlyLayoutClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Monthly.Layout := - TcxSchedulerReportLinkPeriodicPrintStyleLayout(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleMonthlyDontPrintWeekendsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Monthly.DontPrintWeekends := - TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Monthly.PrintExactlyOneMonthPerPage := - TcxCheckBox(Sender).Checked; - Modified := True; -end; - -// Tri-fold -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleTrifoldSectionModeClick( - Sender: TObject); -begin - if LockControlsUpdate or not (ActivePrintStyle is TcxSchedulerReportLinkTrifoldPrintStyle) then Exit; - with TcxSchedulerReportLinkTrifoldPrintStyle(ActivePrintStyle) do - FSections[TTagToInt(TcxComboBox(Sender).Tag)] := TcxSchedulerReportLinkTrifoldPrintStyleSectionMode(TcxComboBox(Sender).ItemIndex); - Modified := True; - UpdateControlsState; -end; - -// Details -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleDetailsUsePaginationClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Details.UsePagination := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxPrintStyleDetailsPaginationClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Details.PaginationMode := - TcxSchedulerReportLinkDetailsPrintStylePaginationMode(TcxComboBox(Sender).ItemIndex); - Modified := True; -end; - -// Memo -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleMemoStartEachItemOnNewPageClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Memo.StartEachItemOnNewPage := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.chbxPrintStyleMemoPrintOnlySelectedEventsClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PrintStyles.Memo.SelectedEventsOnly := TcxCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.pbxPrintStylesPreviewPaint(Sender: TObject); -begin - with TPaintBox(Sender) do - if ActivePrintStyle <> nil then - ActivePrintStyle.DrawDesignWindowPreview(Canvas, ClientRect); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.StyleController1StyleChanged( - Sender: TObject); -begin -// -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.pbPreviewPaint( - Sender: TObject); -begin - PreviewDrawPageContent(pbPreview.Canvas, pbPreview.ClientRect); -end; - -procedure TcxfmSchedulerReportLinkDesignWindow.cbxLookAndFeelPropertiesChange( - Sender: TObject); -begin - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(cbxLookAndFeel.ItemIndex); -end; - -{ TcxSchedulerReportPageSite } - -procedure TcxSchedulerReportPageSite.ReadProperties(AReader: TdxPSDataReader); -begin - inherited ReadProperties(AReader); - FPageIndex := AReader.ReadInteger; - FPrimaryPage := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportPageSite.WriteProperties(AWriter: TdxPSDataWriter); -begin - inherited WriteProperties(AWriter); - AWriter.WriteInteger(FPageIndex); - AWriter.WriteBoolean(FPrimaryPage); -end; - -{ TcxSchedulerReportPageItemCell } - -constructor TcxSchedulerReportPageItemCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - BorderClass := TdxPSCellUltraFlatBorder; - ClipChildren := True; -end; - -function TcxSchedulerReportPageItemCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srUnknownItem; -end; - -procedure TcxSchedulerReportPageItemCell.SetCellViewParams( - AItem: TdxReportVisualItem; const AParams: TcxViewParams); -begin - ReportLink.SetCellViewParams(AItem, AParams); -end; - -procedure TcxSchedulerReportPageItemCell.SetCellViewParams( - AItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); -begin - ReportLink.SetCellViewParams(AItem, AParams); -end; - -function TcxSchedulerReportPageItemCell.GetPageIndex: Integer; -begin - Result := PageSite.PageIndex; -end; - -function TcxSchedulerReportPageItemCell.GetPageSite: TcxSchedulerReportPageSite; -var - AParent: TdxReportCell; -begin - AParent := inherited Parent; - while (AParent <> nil) and not (AParent is TcxSchedulerReportPageSite) do - AParent := AParent.Parent; - Result := AParent as TcxSchedulerReportPageSite; -end; - -function TcxSchedulerReportPageItemCell.GetPrimaryPage: Boolean; -begin - Result := PageSite.PrimaryPage; -end; - -function TcxSchedulerReportPageItemCell.GetReportLink: TcxSchedulerReportLink; -begin - Result := TcxSchedulerReportLink(Renderer.ReportLink); -end; - -{ TcxSchedulerReportNotesDataCell } - -constructor TcxSchedulerReportNotesDataCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - TextAlignX := taCenterX; - TextAlignY := taCenterY; - CaptionHeight := 16; - Data := cdidSchedulerNotesArea; -end; - -procedure TcxSchedulerReportNotesDataCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - R: TRect; - C, I: Integer; -begin - inherited DrawContent(DC, AStage); - if CaptionHeight <= 0 then Exit; - R := GetInnerBounds(DC); - FixupRect(DC, R); - C := R.Bottom - R. Top; - R.Bottom := R.Top + CaptionHeight; - // - if Caption <> '' then - begin - Renderer.DrawText(DC, R, -1, cxTextOffset, cxTextOffset, Caption, Font, - Color, TextAlignX, TextAlignY, False, MultiLine, False); - end; - // - Inc(R.Bottom, Max(1, Renderer.LineThickness div 2)); - if Lined then - C := (C - Renderer.LineThickness) div CaptionHeight - else - C := 1; - R.Top := R.Bottom - Renderer.LineThickness; - for I := 0 to C - 1 do - begin - FixupRect(DC, R); - Renderer.FillRect(DC, R, clBlack); - OffsetRect(R, 0, CaptionHeight); - end; -end; - -procedure TcxSchedulerReportNotesDataCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FCaption := AReader.ReadString; - FCaptionHeight := AReader.ReadInteger; - FLined := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportNotesDataCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FCaption); - AWriter.WriteInteger(FCaptionHeight); - AWriter.WriteBoolean(FLined); -end; - -function TcxSchedulerReportNotesDataCell.GetMultiLine: Boolean; -begin - Result := inherited MultiLine; -end; - -function TcxSchedulerReportNotesDataCell.GetTextAlignX: TcxTextAlignX; -begin - Result := inherited TextAlignX; -end; - -function TcxSchedulerReportNotesDataCell.GetTextAlignY: TcxTextAlignY; -begin - Result := inherited TextAlignY; -end; - -procedure TcxSchedulerReportNotesDataCell.SetMultiLine(Value: Boolean); -begin - inherited MultiLine := Value; -end; - -procedure TcxSchedulerReportNotesDataCell.SetTextAlignX( - Value: TcxTextAlignX); -begin - inherited TextAlignX := Value; -end; - -procedure TcxSchedulerReportNotesDataCell.SetTextAlignY( - Value: TcxTextAlignY); -begin - inherited TextAlignY := Value; -end; - -{ TcxSchedulerReportNotesAreaCell } - -constructor TcxSchedulerReportNotesAreaCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - AddDataItem(GetDataCellClass) -end; - -constructor TcxSchedulerReportNotesAreaCell.CreateEx(AParent: TdxReportCell; ALined: Boolean); -begin - Create(AParent); - FLined := ALined; - DataCell.CellSides := []; - DataCell.Caption := cxGetResourceString(@sdxNotes); - DataCell.Lined := ALined; - ClipChildren := True; -end; - -procedure TcxSchedulerReportNotesAreaCell.BoundsChanged; -begin - inherited BoundsChanged; - DataCell.BoundsRect := GetInnerBounds(0); -end; - -procedure TcxSchedulerReportNotesAreaCell.ConvertCoords( - APixelsNumerator, APixelsDenominator: Integer); -begin - inherited ConvertCoords(APixelsNumerator, APixelsDenominator); - DataCell.CaptionHeight := MulDiv(DataCell.CaptionHeight, APixelsNumerator, APixelsDenominator); -end; - -function TcxSchedulerReportNotesAreaCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srNotesBlank; - if DataCell.Lined then - Result := srNotesLined; -end; - -function TcxSchedulerReportNotesAreaCell.GetDataCellClass: TcxSchedulerReportNotesDataCellClass; -begin - Result := TcxSchedulerReportNotesDataCell; -end; - -procedure TcxSchedulerReportNotesAreaCell.SetFontIndex(Value: Integer); -begin - inherited SetFontIndex(Value); - if Font <> nil then - DataCell.CaptionHeight := cxTextHeight(Font) + cxTextOffset * 2; -end; - -function TcxSchedulerReportNotesAreaCell.GetDataCell: TcxSchedulerReportNotesDataCell; -begin - if (DataItemCount > 0) and (DataItems[0] is TcxSchedulerReportNotesDataCell) then - Result := TcxSchedulerReportNotesDataCell(DataItems[0]) - else - Result := nil; -end; - -{ TcxSchedulerReportTaskPadCell } - -constructor TcxSchedulerReportTaskPadCell.CreateEx( - AParent: TdxReportCell; ALined: Boolean); -begin - inherited CreateEx(AParent, ALined); - DataCell.Caption := cxGetResourceString(@sdxTaskPad); - DataCell.Data := cdidSchedulerTaskPad; -end; - -procedure TcxSchedulerReportTaskPadCell.BoundsChanged; -begin - inherited; - TaskPadDataSite.BoundsRect := CalculateTaskPadDataSiteBounds; -end; - -function TcxSchedulerReportTaskPadCell.CalculateTaskPadDataSiteBounds: TRect; -begin - Result := GetInnerBounds(NullDC); - Inc(Result.Top, DataCell.CaptionHeight); -end; - -function TcxSchedulerReportTaskPadCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srTaskPad; -end; - -function TcxSchedulerReportTaskPadCell.GetTaskPadDataSite: TdxReportCell; -begin - if CellCount = 0 then AddCell; - Result := Cells[0]; - Result.CellSides := []; - Result.BoundsRect := CalculateTaskPadDataSiteBounds; -end; - -{ TcxSchedulerReportSchedulerHeaderDataCell } - -constructor TcxSchedulerReportSchedulerHeaderDataCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - CellSides := []; - Transparent := True; - Data := cdidSchedulerSchedulerHeader; -end; - -{ TcxSchedulerReportSchedulerHeaderCell } - -constructor TcxSchedulerReportSchedulerHeaderCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - FContent := AddContentCell; -end; - -procedure TcxSchedulerReportSchedulerHeaderCell.AdjustTextSize; -var - R1, R2: TRect; -begin - R1 := Content.BoundsRect; - R2 := R1; - if (SecondaryText <> '') and (PrimaryText <> '') then - begin - with R1 do - Bottom := Bottom - (Bottom - Top) div 4; - R2.Top := R1.Bottom; - end; - FPrimaryTextCell := AddTextCell(PrimaryText, R1, True); - FSecondaryTextCell := AddTextCell(SecondaryText, R2, False); - FContent.Index := MaxInt; //send to back -end; - -function TcxSchedulerReportSchedulerHeaderCell.AddContentCell: TcxSchedulerReportSchedulerHeaderDataCell; -begin - Result := TcxSchedulerReportSchedulerHeaderDataCell(AddDataItem(TcxSchedulerReportSchedulerHeaderDataCell)); -end; - -function TcxSchedulerReportSchedulerHeaderCell.AddTextCell(AText: string; - const ABounds: TRect; AMultiLine: Boolean): TdxReportCellString; -var - AFontH, ABoundsH: Integer; - AParams: TdxReportItemViewParams; -begin - if PrimaryText = '' then - begin - Result := nil; - Exit; - end; - Result := AddDataItem(TdxReportCellString) as TdxReportCellString; - Result.BoundsRect := ABounds; - Result.Text := AText; - Result.CellSides := []; - Result.Transparent := True; - Result.TextAlignY := taTop; - Result.TextAlignX := taLeft; - Result.Multiline := AMultiLine; - if AMultiLine and (Pos('#13', AText) <> 0) then - AText := Copy(AText, 1, Pos('#13', AText)); - AFontH := cxTextHeight(Font); - ABoundsH := (ABounds.Bottom - ABounds.Top) - cxTextOffset * 2; - if AMultiLine then - ABoundsH := ABoundsH div 2; - FillChar(AParams, SizeOf(AParams), 0); - AParams.FontStyle := []; - AParams.FontSize := MulDiv(Font.Size, ABoundsH, AFontH); - while (AParams.FontSize > 3) and (cxTextWidth(Font, AText, AParams.FontSize) > - ((ABounds.Right - ABounds.Left) - cxTextOffset * 2)) do Dec(AParams.FontSize, 2); - AParams.Transparent := True; - AParams.NativeParams.Font := Font; - AParams.NativeParams.TextColor := Font.Color; - ReportLink.SetCellViewParams(Result, AParams); -end; - -function TcxSchedulerReportSchedulerHeaderCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srHeader; -end; - -{ TcxSchedulerReportDateNavigatorItem } - -constructor TcxSchedulerReportDateNavigatorItem.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - CellSides := []; -end; - -function TcxSchedulerReportDateNavigatorItem.GetDefaultDTFormat: DWORD; -begin - Result := CXTO_PATTERNEDTEXT or CXTO_SINGLELINE; -end; - -procedure TcxSchedulerReportDateNavigatorItem.SetText(const Value: string); -begin -end; - -function TcxSchedulerReportDateNavigatorItem.GetDateNavigator: TcxSchedulerReportDateNavigatorCell; -begin - Result := Parent as TcxSchedulerReportDateNavigatorCell; -end; - -{ TcxSchedulerReportDateNavigatorHeader } - -constructor TcxSchedulerReportDateNavigatorHeader.CreateEx(AParent: TdxReportCell; AYear, AMonth: Word); -begin - Create(AParent); - Transparent := False; - TextAlignX := taCenterX; - Data := cdidSchedulerDateNavigatorHeader; - FMonth := AMonth; - FYear := AYear; -end; - -procedure TcxSchedulerReportDateNavigatorHeader.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportDateNavigatorHeader then - with TcxSchedulerReportDateNavigatorHeader(Source) do - begin - Self.FMonth := Month; - Self.FYear := Year; - end; - inherited Assign(Source); -end; - -function TcxSchedulerReportDateNavigatorHeader.GetText: string; -begin - Result := LongMonthNames[Month] + ' ' + IntToStr(Year); -end; - -procedure TcxSchedulerReportDateNavigatorHeader.ReadData( - AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FMonth := AReader.ReadInteger; - FYear := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportDateNavigatorHeader.WriteData( - AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteInteger(FMonth); - AWriter.WriteInteger(FYear); -end; - -{ TcxSchedulerReportDateNavigatorDay } - -constructor TcxSchedulerReportDateNavigatorDay.CreateEx(AParent: TdxReportCell; - ADay, ACol, ARow: Integer; ABold: Boolean); -begin - Create(AParent); - RightIndent := 2; - TextAlignX := taRight; - TextAlignY := taCenterY; - Data := cdidSchedulerDateNavigatorDay; - FDay := ADay; - FCol := ACol; - FRow := ARow; - Bold := ABold; -end; - -procedure TcxSchedulerReportDateNavigatorDay.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportDateNavigatorDay then - with TcxSchedulerReportDateNavigatorDay(Source) do - begin - Self.FDay := Day; - Self.FCol := Col; - Self.FRow := Row; - end; -end; - -function TcxSchedulerReportDateNavigatorDay.GetText: string; -begin - Result := IntToStr(Day); -end; - -procedure TcxSchedulerReportDateNavigatorDay.ReadData(AReader: TdxPSDataReader); -var - Value: Integer; -begin - inherited ReadData(AReader); - Value := AReader.ReadInteger; - FDay := TLongRec(Value).Bytes[0]; - FCol := TLongRec(Value).Bytes[1]; - FRow := TLongRec(Value).Bytes[2]; -end; - -procedure TcxSchedulerReportDateNavigatorDay.WriteData(AWriter: TdxPSDataWriter); -var - Value: Integer; -begin - inherited WriteData(AWriter); - TLongRec(Value).Bytes[0] := Day; - TLongRec(Value).Bytes[1] := Col; - TLongRec(Value).Bytes[2] := Row; - AWriter.WriteInteger(Value); -end; - -function TcxSchedulerReportDateNavigatorDay.GetDate: TDate; -begin - Result := EncodeDate(Year, Month, Day); -end; - -function TcxSchedulerReportDateNavigatorDay.GetBold: Boolean; -begin - Result := GetFormatBit(dxFormatDayIsBold); -end; - -function TcxSchedulerReportDateNavigatorDay.GetMonth: Word; -begin - if DateNavigator <> nil then - Result := DateNavigator.Month - else - Result := 1; -end; - -function TcxSchedulerReportDateNavigatorDay.GetYear: Word; -begin - if DateNavigator <> nil then - Result := DateNavigator.Year - else - Result := 1; -end; - -procedure TcxSchedulerReportDateNavigatorDay.SetBold(Value: Boolean); -begin - SetFormatBit(dxFormatDayIsBold, Value); -end; - -{ TcxSchedulerReportDateNavigatorDayCaption } - -constructor TcxSchedulerReportDateNavigatorDayCaption.CreateEx(AParent: TdxReportCell; - ADayOfWeek: TDay; ACol: Integer); -begin - inherited Create(AParent); - RightIndent := 2; - TextAlignX := taRight; - TextAlignY := taCenterY; - Data := cdidSchedulerDateNavigatorDayCaption; - FCol := ACol; - FDayOfWeek := ADayOfWeek; - FDayText := GetDayText; -end; - -procedure TcxSchedulerReportDateNavigatorDayCaption.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportDateNavigatorDayCaption then - with TcxSchedulerReportDateNavigatorDayCaption(Source) do - begin - Self.FDayOfWeek := DayOfWeek; - Self.FCol := Col; - Self.FDayText := FDayText; - end; -end; - -function TcxSchedulerReportDateNavigatorDayCaption.GetText: string; -begin - Result := FDayText; -end; - -function TcxSchedulerReportDateNavigatorDayCaption.GetDayText: string; -var - FDayIndex: Integer; -begin - FDayIndex := Byte(DateNavigator.StartOfWeek) + 1 + Col; - if FDayIndex > 7 then Dec(FDayIndex, 7); - - if Font.Charset in [ARABIC_CHARSET, CHINESEBIG5_CHARSET, GB2312_CHARSET] then - Result := AnsiLastChar(ShortDayNames[FDayIndex]) - else - Result := WideString(ShortDayNames[FDayIndex])[1]; -end; - -procedure TcxSchedulerReportDateNavigatorDayCaption.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FDayText := AReader.ReadString; -end; - -procedure TcxSchedulerReportDateNavigatorDayCaption.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FDayText); -end; - -{ TcxSchedulerReportDateNavigatorWeekNumber } - -constructor TcxSchedulerReportDateNavigatorWeekNumber.CreateEx(AParent: TdxReportCell; - AWeekNumber, ARow: Integer); -begin - Create(AParent); - RightIndent := 4; - TextAlignX := taRight; - TextAlignY := taCenterY; - Data := cdidSchedulerDateNavigatorWeekNumber; - FRow := ARow; - FWeekNumber := AWeekNumber; -end; - -procedure TcxSchedulerReportDateNavigatorWeekNumber.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxSchedulerReportDateNavigatorWeekNumber then - with TcxSchedulerReportDateNavigatorWeekNumber(Source) do - begin - Self.FWeekNumber := WeekNumber; - Self.FRow := Row; - end; -end; - -function TcxSchedulerReportDateNavigatorWeekNumber.GetText: string; -begin - Result := IntToStr(WeekNumber); -end; - -procedure TcxSchedulerReportDateNavigatorWeekNumber.ReadData(AReader: TdxPSDataReader); -var - Value: Integer; -begin - inherited ReadData(AReader); - Value := AReader.ReadInteger; - FWeekNumber := TLongRec(Value).Bytes[0]; - FRow := TLongRec(Value).Bytes[1]; -end; - -procedure TcxSchedulerReportDateNavigatorWeekNumber.WriteData(AWriter: TdxPSDataWriter); -var - Value: Integer; -begin - inherited WriteData(AWriter); - TLongRec(Value).Bytes[0] := WeekNumber; - TLongRec(Value).Bytes[1] := Row; - AWriter.WriteInteger(Value); -end; - -{ TcxSchedulerReportDateNavigatorCell } - -constructor TcxSchedulerReportDateNavigatorCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - CellSides := []; - Transparent := False; - FStartOfWeek := TDay(DateTimeHelper.StartOfWeek); -end; - -constructor TcxSchedulerReportDateNavigatorCell.CreateEx(AParent: TdxReportCell; - AFirstWeekOfYear: TcxFirstWeekOfYear; AYear, AMonth: Word; - AShowDatesContainingEventsInBold, AShowWeekNumbers: Boolean); -begin - Create(AParent); - FYear := AYear; - FMonth := AMonth; - FVertOffset := -1; - FFirstWeekOfYear := AFirstWeekOfYear; - FShowWeekNumbers := AShowWeekNumbers; - FShowDatesContainingEventsInBold := AShowDatesContainingEventsInBold; -end; - -procedure TcxSchedulerReportDateNavigatorCell.AdjustSize(var AContentParams, - AHeaderParams: TdxReportItemViewParams; AHeight, AMaxHeight: Integer); - - function TestSize: Boolean; - var - ATestHeight: Integer; - begin - ATestHeight := GetMonthSize(AContentParams, AHeaderParams).cy; - if AMaxHeight > (ATestHeight + RowHeight) then - begin - FVertOffset := (AMaxHeight - ATestHeight) div 2; - Result := True; - end - else - Result := False; - end; - -begin - if TestSize then Exit; - AContentParams.FontSize := Abs(AContentParams.NativeParams.Font.Size); - AHeaderParams.FontSize := Abs(AHeaderParams.NativeParams.Font.Size); - repeat - if AContentParams.FontSize > AHeaderParams.FontSize then - Dec(AContentParams.FontSize) - else - if AContentParams.FontSize < AHeaderParams.FontSize then - Dec(AHeaderParams.FontSize) - else - begin - Dec(AContentParams.FontSize); - Dec(AHeaderParams.FontSize); - end; - until TestSize; -end; - -function TcxSchedulerReportDateNavigatorCell.CalculateSize( - const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; -begin - FMonthSize := GetMonthSize(AContentParams, AHeaderParams); - Result := FMonthSize; - Inc(Result.cy, 2 * RowHeight); - CreateItems; - AdjustItemsVertical; - SetViewParams(AContentParams, AHeaderParams); -end; - -class function TcxSchedulerReportDateNavigatorCell.MeasureDateNavigatorHeight( - const AContentParams, AHeaderParams: TcxViewParams): Integer; -var - AColWidth, ARowHeight, ADayCaptionsHeight, AHeaderHeight: Integer; -begin - GetContentPartSizes(AContentParams.Font, AColWidth, ARowHeight, ADayCaptionsHeight); - GetHeaderPartSizes(AHeaderParams.Font, AHeaderHeight); - Result := GetMonthHeight(AHeaderHeight, ADayCaptionsHeight, ARowHeight) + 2 * ARowHeight; -end; - -procedure TcxSchedulerReportDateNavigatorCell.AdjustItemsVertical; -var - I: Integer; -begin - if FVertOffset < 0 then FVertOffset := RowHeight; - for I := 0 to DataItemCount - 1 do - with DataItems[I] do Top := Top + FVertOffset; -end; - -function TcxSchedulerReportDateNavigatorCell.ColOfDate(ADate: TDateTime): Integer; -begin - Result := DayOfWeek(ADate) - Byte(StartOfWeek) - 1; - if Result < 0 then Inc(Result, 7); -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateDayCaptions; -var - R: TRect; - I, ADayOfWeek: Integer; - ACaption: TcxSchedulerReportDateNavigatorDayCaption; -begin - R.Top := HeaderHeight; - R.Bottom := R.Top + DayCaptionsHeight - 2; - R.Right := ColWidth; - FDayCaptionCount := 7; - for I := 0 to FDayCaptionCount - 1 do - begin - ADayOfWeek := I + Byte(StartOfWeek); - if ADayOfWeek > 6 then Dec(ADayOfWeek, 7); - ACaption := TcxSchedulerReportDateNavigatorDayCaption.CreateEx(Self, TDay(ADayOfWeek), I); - with ACaption do - begin - R.Left := R.Right; - R.Right := R.Left + ColWidth; - BoundsRect := R; - end; - end; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateDay(const ABounds: TRect; - ADate: TDateTime; ACol, ARow: Integer); -var - ADay: TcxSchedulerReportDateNavigatorDay; -begin - ADay := TcxSchedulerReportDateNavigatorDay.CreateEx(Self, DayOf(ADate), - ACol, ARow, GetDayIsBold(ADate)); - ADay.BoundsRect := ABounds; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateItems; -begin - CreateMonthHeader; - CreateDayCaptions; - CreateMonth; - CreateLines; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateLines; -var - R: TRect; -begin - R := GetHeaderBounds; - R.Top := R.Bottom + DayCaptionsHeight; - R.Bottom := R.Top + WeekNumberCount * RowHeight; - with TdxReportCellBox.Create(Self) do - begin - if ShowWeekNumbers then CellSides := [csTop, csLeft] else CellSides := [csTop]; - BoundsRect := R; - end; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateMonth; -var - R: TRect; - I, J, ADayBase, ADaysPerMonth: Integer; - ADate, ADateBase: TDateTime; - AHasDate: Boolean; - - function GetDate(out ADate: TDateTime): Boolean; - begin - ADate := ADateBase + ADayBase + J * 7 + I; - Result := (ADate > ADateBase) and (ADate <= ADateBase + ADaysPerMonth); - end; - -begin - FDayCount := 0; - FWeekNumberCount := 0; - ADateBase := EncodeDate(FYear, FMonth, 1) - 1; - ADayBase := 1 - ColOfDate(ADateBase + 1); - ADaysPerMonth := DaysPerMonth(FYear, FMonth); - //loop has been split into two loops for the correct order of the DataItems - for I := 0 to 6 do - for J := 0 to 5 do - if GetDate(ADate) then - begin - CreateDay(GetDayBoundsFromColAndRow(I, J), ADate, I, J); - Inc(FDayCount); - end; - for I := 0 to 6 do - for J := 0 to 5 do - begin - AHasDate := GetDate(ADate); - if ShowWeekNumbers and (I = 0) and not ((J = 5) and not AHasDate) then - begin - R := cxRectOffset(GetDayBoundsFromColAndRow(I, J), -ColWidth, 0); - Dec(R.Right, ColWidth div 8); - CreateWeekNumber(R, ADate, J); - Inc(FWeekNumberCount); - end; - end; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateMonthHeader; -begin - TcxSchedulerReportDateNavigatorHeader.CreateEx(Self, Year, Month).BoundsRect := GetHeaderBounds; -end; - -procedure TcxSchedulerReportDateNavigatorCell.CreateWeekNumber( - const ABounds: TRect; ADate: TDateTime; ARow: Integer); -var - AWeekNumber: TcxSchedulerReportDateNavigatorWeekNumber; -begin - AWeekNumber := TcxSchedulerReportDateNavigatorWeekNumber.CreateEx(Self, - cxDateUtils.GetWeekNumber(ADate, StartOfWeek, FirstWeekOfYear), ARow); - AWeekNumber.BoundsRect := ABounds; -end; - -class procedure TcxSchedulerReportDateNavigatorCell.GetContentPartSizes( - AFont: TFont; var AColWidth, ARowHeight, ADayCaptionsHeight: Integer; - AFontSize: Integer = 0); -var - ASymbolSize: TSize; -begin - ASymbolSize := cxTextExtent(AFont, '0', AFontSize); - AColWidth := 3 * ASymbolSize.cx; - ADayCaptionsHeight := ASymbolSize.cy + 1; - ARowHeight := ASymbolSize.cy; -end; - -function TcxSchedulerReportDateNavigatorCell.GetDayBoundsFromColAndRow( - ACol, ARow: Integer): TRect; -begin - with Result do - begin - Left := Succ(ACol) * ColWidth; - Top := HeaderHeight + DayCaptionsHeight + ARow * RowHeight; - Right := Left + ColWidth; - Bottom := Top + RowHeight; - end; -end; - -function TcxSchedulerReportDateNavigatorCell.GetDayIsBold( - ADate: TDateTime): Boolean; -begin - Result := FBoldedDays.IndexOf(ADate) <> -1; -end; - -function TcxSchedulerReportDateNavigatorCell.GetHeaderBounds: TRect; -begin - Result := cxRect(ColWidth, 0, MonthSize.cx - MulDiv(ColWidth, 2, 3), HeaderHeight); -end; - -class procedure TcxSchedulerReportDateNavigatorCell.GetHeaderPartSizes( - AFont: TFont; var AHeaderHeight: Integer; AFontSize: Integer = 0); -begin - AHeaderHeight := MulDiv(cxTextHeight(AFont, 'Wg', AFontSize), 3 , 2); -end; - -function TcxSchedulerReportDateNavigatorCell.GetMonthSize( - const AContentParams, AHeaderParams: TdxReportItemViewParams): TSize; -begin - GetContentPartSizes(AContentParams.NativeParams.Font, FColWidth, FRowHeight, - FDayCaptionsHeight, AContentParams.FontSize); - GetHeaderPartSizes(AHeaderParams.NativeParams.Font, FHeaderHeight, - AHeaderParams.FontSize); - Result.cx := 9 * FColWidth; - Result.cy := FHeaderHeight + FDayCaptionsHeight + 6 * FRowHeight + 1; -end; - -function TcxSchedulerReportDateNavigatorCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srDateNavigator; -end; - -procedure TcxSchedulerReportDateNavigatorCell.SetViewParams( - const AContentParams, AHeaderParams: TdxReportItemViewParams); -var - I: Integer; - AParams: TdxReportItemViewParams; -begin - FContentParams := AContentParams; - FHeaderParams := AHeaderParams; - SetCellViewParams(Self, AContentParams); - SetCellViewParams(Header, AHeaderParams); - for I := 0 to DayCount - 1 do - begin - AParams := AContentParams; - if Days[I].Bold then - Include(AParams.FontStyle, fsBold); - SetCellViewParams(Days[I], AParams); - end; - for I := 0 to DayCaptionCount - 1 do - SetCellViewParams(DayCaptions[I], AContentParams); - AParams := AContentParams; - if AParams.FontSize <> 0 then - AParams.FontSize := MulDiv(AParams.FontSize, 2, 3) - else - AParams.FontSize := MulDiv(AParams.NativeParams.Font.Size, 2, 3); - for I := 0 to WeekNumberCount - 1 do - SetCellViewParams(WeekNumbers[I], AParams); -end; - -procedure TcxSchedulerReportDateNavigatorCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - AReader.Read(FFirstWeekOfYear, SizeOf(FFirstWeekOfYear)); - FMonth := AReader.ReadInteger; - FYear := AReader.ReadInteger; - FShowDatesContainingEventsInBold := AReader.ReadBoolean; - FShowWeekNumbers := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportDateNavigatorCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.Write(FFirstWeekOfYear, SizeOf(FFirstWeekOfYear)); - AWriter.WriteInteger(FMonth); - AWriter.WriteInteger(FYear); - AWriter.WriteBoolean(FShowDatesContainingEventsInBold); - AWriter.WriteBoolean(FShowWeekNumbers); -end; - -class function TcxSchedulerReportDateNavigatorCell.GetMonthHeight( - AHeaderHeight, ADayCaptionsHeight, ARowHeight: Integer): Integer; -begin - Result := (AHeaderHeight + ADayCaptionsHeight + 6 * ARowHeight); -end; - -function TcxSchedulerReportDateNavigatorCell.GetDay( - Index: Integer): TcxSchedulerReportDateNavigatorDay; -begin - Result := DataItems[Index + 1 + 7] as TcxSchedulerReportDateNavigatorDay; -end; - -function TcxSchedulerReportDateNavigatorCell.GetDayCaption( - Index: Integer): TcxSchedulerReportDateNavigatorDayCaption; -begin - Result := DataItems[Index + 1] as TcxSchedulerReportDateNavigatorDayCaption; -end; - -function TcxSchedulerReportDateNavigatorCell.GetHeader: TcxSchedulerReportDateNavigatorHeader; -begin - Result := DataItems[0] as TcxSchedulerReportDateNavigatorHeader; -end; - -function TcxSchedulerReportDateNavigatorCell.GetWeekNumber( - Index: Integer): TcxSchedulerReportDateNavigatorWeekNumber; -begin - Result := DataItems[Index + 1 + 7 + FDayCount] as TcxSchedulerReportDateNavigatorWeekNumber; -end; - -{ TcxSchedulerReportSchedulingAreaCell } - -constructor TcxSchedulerReportSchedulingAreaCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - FVisibleDays := TcxSchedulerDateList.Create; - FDaysList := TStringList.Create; - CellSides := [csLeft, csTop]; -end; - -destructor TcxSchedulerReportSchedulingAreaCell.Destroy; -begin - FDaysList.Free; - FVisibleDays.Free; - inherited Destroy; -end; - -procedure TcxSchedulerReportSchedulingAreaCell.DrawContent( - DC: HDC; DrawRect: TRect; const OriginRect: TRect; AStage: TdxPSRenderStages); -begin - inherited DrawContent(DC, DrawRect, OriginRect, AStage); - if rsFirstPass in AStage then - DrawBorders(DC); -end; - -procedure TcxSchedulerReportSchedulingAreaCell.DrawItself( - DC: HDC; AStage: TdxPSRenderStages); -begin - if rsFirstPass in AStage then - begin - if IsBackgroundBitmapDrawn then - DrawBackgroundBitmap(DC) - else - if IsBackgroundDrawn then - DrawBackground(DC); - end; -end; - -function TcxSchedulerReportSchedulingAreaCell.GetType: TcxSchedulerReportItemsType; -begin - Result := srSchedulingArea; -end; - -{ TcxSchedulerReportCustomCell } - -constructor TcxSchedulerReportCustomCell.CreateFrom(AParent: TdxReportCell; - AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited Create(AParent); - Transparent := False; - BoundsRect := AViewInfo.Bounds; - CellSides := TdxCellSides(AViewInfo.Borders); -end; - -procedure TcxSchedulerReportCustomCell.DrawContent(DC: HDC; AStage: TdxPSRenderStages); -begin - inherited; - //Renderer.ExcludeClipRect(GetFixupRect(DC, BoundsRect)); -end; - -class procedure TcxSchedulerReportCustomCell.RegisterMirrorClass; -begin - MirrorClasses.Add(Self); -end; - -class function TcxSchedulerReportCustomCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := nil; -end; - -procedure TcxSchedulerReportCustomCell.SuppressColoration; -begin - FDayBorderColor := clBlack; - Color := dxPSCore.dxDefaultContentColor; -end; - -procedure TcxSchedulerReportCustomCell.DrawCellFrame(DC: HDC; const ARect: TRect; - ABorders: TcxBorders = []; ABorderColor: TColor = clDefault; ALineWidth: Integer = 1); -begin - Renderer.FrameRect(DC, GetFixupRect(DC, ARect), - ABorderColor, TdxCellSides(ABorders), ALineWidth); -end; - -procedure TcxSchedulerReportCustomCell.DrawCellRect(DC: HDC; const ARect: TRect; - ABorders: TcxBorders = []; ABorderColor: TColor = clDefault; ALineWidth: Integer = 1; - AColor: TColor = clDefault); -var - R: TRect; -begin - if Transparent then - DrawCellFrame(DC, ARect, ABorders, ABorderColor, ALineWidth) - else - begin - R := GetFixupRect(DC, ARect); - if AColor = clDefault then - AColor := Color; - Renderer.FillRect(DC, R, AColor); - Renderer.FrameRect(DC, R, ABorderColor, TdxCellSides(ABorders), ALineWidth); - end; -end; - -procedure TcxSchedulerReportCustomCell.DrawCellText(DC: HDC; const ARect: TRect; - const AText: string; AlignHorz: TcxTextAlignX; AlignVert: TcxTextAlignY; - AFont: TFont = nil; AColor: TColor = clDefault); -const - Horz: array[TcxTextAlignX] of Integer = - (CXTO_LEFT, CXTO_CENTER_HORIZONTALLY, CXTO_RIGHT, CXTO_LEFT, CXTO_LEFT); - Vert: array[TcxTextAlignY] of Integer = - (CXTO_TOP, CXTO_CENTER_VERTICALLY, CXTO_BOTTOM, CXTO_TOP); -var - R: TRect; - AMode: Integer; - Flags: Integer; -begin - if Length(AText) = 0 then Exit; - R := GetFixupRect(DC, ARect); - Flags := CXTO_PREVENT_LEFT_EXCEED or CXTO_PREVENT_TOP_EXCEED or CXTO_NOCLIP or - Horz[AlignHorz] or Vert[AlignVert] + CXTO_SINGLELINE; - if AFont = nil then - AFont := Font; - AMode := SetBkMode(DC, Windows.TRANSPARENT); - Renderer.DrawTextEx(DC, R, -1, cxTextOffset, - cxTextOffset, AText, AFont, Flags); - SetBkMode(DC, AMode); -end; - -procedure TcxSchedulerReportCustomCell.DrawCellTextVert(DC: HDC; const ARect: TRect; - const AText: string); - - function CreateRotatedFont: HFONT; - var - ALogFont: TLogFont; - begin - FillChar(ALogFont, SizeOf(ALogFont), 0); - with ALogFont do - begin - lfHeight := Font.Height; - lfEscapement := 900; - if fsBold in Font.Style then - lfWeight := FW_BOLD - else - lfWeight := FW_NORMAL; - lfItalic := Byte(fsItalic in Font.Style); - lfUnderline := Byte(fsUnderline in Font.Style); - lfStrikeOut := Byte(fsStrikeOut in Font.Style); - lfCharSet := Byte(Font.Charset); - StrPCopy(lfFaceName, Font.Name); - case Font.Pitch of - fpVariable: lfPitchAndFamily := VARIABLE_PITCH; - fpFixed: lfPitchAndFamily := FIXED_PITCH; - else - lfPitchAndFamily := DEFAULT_PITCH; - end; - end; - Result := CreateFontIndirect(ALogFont); - end; - -var - R: TRect; - AFont: THandle; - ASavedDC: Integer; - ASize: TSize; -begin - if Length(AText) = 0 then Exit; - ASavedDC := SaveDC(DC); - AFont := CreateRotatedFont; - SelectObject(DC, AFont); - SetTextAlign(DC, TA_LEFT or TA_TOP or TA_NOUPDATECP); - GetTextExtentPoint(DC, PChar(AText), Length(AText), ASize); - R.Bottom := ARect.Bottom - ((ARect.Bottom - ARect.Top - ASize.cx) div 2); - R.Top := R.Bottom - ASize.cx; - R.Left := ARect.Left + ((ARect.Right - ARect.Left - ASize.cy) div 2); - R.Right := R.Left + ASize.cy; - if R.Left < ARect.Left then R := cxRectOffset(R, ARect.Left - R.Left, 0); - if R.Top < ARect.Top then R := cxRectOffset(R, 0, ARect.Top - R.Top); - R := GetFixupRect(DC, R); - TextOut(DC, R.Left, R.Bottom, PChar(AText), Length(AText)); - RestoreDC(DC, ASavedDC); - DeleteObject(AFont); -end; - -procedure TcxSchedulerReportCustomCell.DrawCellState(DC: HDC; R: TRect; - AState: Integer; ABorders: TcxBorders = []; ABorderColor: TColor = clBlack); -var - ABrushHandle: HBrush; - APenHandle: HPen; - Points: array[0..2] of TPoint; -begin - FixupRect(DC, R); - if R.Top = R.Bottom then - begin - R := ExcludeBorders(R, ABorders); - ABrushHandle := SelectObject(DC, StateBrushes[AState].Handle); - APenHandle := SelectObject(DC, GetStockObject(BLACK_PEN)); - Points[0] := Point(R.Left, R.Top); - Points[1] := Point(R.Right, R.Top); - Points[2] := Point(R.Right, R.Top + R.Right - R.Left); - Windows.Polygon(DC, Points, 3); - SelectObject(DC, APenHandle); - SelectObject(DC, ABrushHandle); - end - else - begin - DrawCellFrame(DC, R, ABorders, ABorderColor, 1); - FillRect(DC, ExcludeBorders(R, ABorders), StateBrushes[AState].Handle); - end; -end; - -function TcxSchedulerReportCustomCell.ExcludeBorders(const ARect: TRect; - ABorders: TcxBorders; ABorderWidth: Integer = 1): TRect; -begin - Result := ARect; - with Result do - begin - if bLeft in ABorders then - Inc(Left, ABorderWidth * LineThickness); - if bRight in ABorders then - Dec(Right, ABorderWidth * LineThickness); - if bTop in ABorders then - Inc(Top, ABorderWidth * LineThickness); - if bBottom in ABorders then - Dec(Bottom, ABorderWidth * LineThickness); - end; -end; - -function TcxSchedulerReportCustomCell.FixupWidth(AWidth: Integer): Integer; -begin - if not Renderer.IsPrinting then - Result := MulDiv(AWidth * Renderer.UnitsPerPixel, Renderer.ZoomFactor, 100) - else - Result := MulDiv(AWidth * Renderer.UnitsPerPixel, Renderer.PPI * 5, 72 * 7); -end; - -function TcxSchedulerReportCustomCell.GetFixupRect(DC: HDC; const ARect: TRect): TRect; -begin - Result := ARect; - FixupRect(DC, Result); -end; - -function TcxSchedulerReportCustomCell.InflateRect(const ARect: TRect; dX, dY: Integer): TRect; -begin - Result := ARect; -end; - -function TcxSchedulerReportCustomCell.TextRect(const ARect: TRect): TRect; -var - L: Integer; -begin - L := FixupWidth(cxTextOffset); - Result := ARect; - InflateRect(Result, -L, -L); -end; - -function TcxSchedulerReportCustomCell.GetReportLink: TcxSchedulerReportLink; -begin - Result := TcxSchedulerReportLink(Renderer.ReportLink); -end; - -{ TcxSchedulerReportContentCell } - -constructor TcxSchedulerReportContentCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -var - R: TRect; -begin - inherited CreateFrom(AParent, AViewInfo); - Data := cdidSchedulerContent; - if AViewInfo is TcxSchedulerContentCellViewInfo then - with TcxSchedulerContentCellViewInfo(AViewInfo) do - begin - R := Bounds; - //Self.FDontPrint := DontPrint; - Self.BoundsRect := R; - Self.FBorderColor := BorderColor; - Self.FShowTimeLine := ShowTimeLine; - Self.FTimeLineBorders := TimeLineBorders; - if TimeEvent <> nil then - Self.FState := TimeEvent.Event.State - else - Self.FState := -1; - if ShowTimeLine then - begin - CellSideColors[csRight] := clBlack; - CellSideColors[csbottom] := FBorderColor; - end; - CellSides := csAll; - end; -end; - -procedure TcxSchedulerReportContentCell.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportContentCell then - with TcxSchedulerReportContentCell(Source) do - begin - Self.FBorderColor := FBorderColor; - Self.FShowTimeLine := FShowTimeLine; - Self.FState := FState; - Self.FTimeLineBorders := FTimeLineBorders; - end; - inherited Assign(Source); -end; - -procedure TcxSchedulerReportContentCell.DrawContent(DC: HDC; - AStage: TdxPSRenderStages); -var - R: TRect; -begin - inherited DrawContent(DC, AStage); - R := BoundsRect; - if FShowTimeLine then - begin - R.Right := R.Left + FixupWidth(cxTimeLineWidth); - if FState = -1 then - DrawCellRect(DC, R, FTimeLineBorders - [bLeft], clBlack, 1, clWhite) - else - DrawCellState(DC, R, FState, FTimeLineBorders, clBlack); - end -end; - -class function TcxSchedulerReportContentCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerContentCellViewInfo; -end; - -procedure TcxSchedulerReportContentCell.SuppressColoration; -var - I: TdxCellSide; -begin - for I := csLeft to csBottom do - CellSideColors[I] := clBlack; - FBorderColor := clBlack; - if FState <> -1 then - Inc(FState, 4); - inherited SuppressColoration; -end; - -function TcxSchedulerReportContentCell.HasBorderColoration: Boolean; -begin - Result := True; -end; - -{ TcxSchedulerReportHeaderItemCell } - -constructor TcxSchedulerReportHeaderItemCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - Data := cdidSchedulerHeader; - if AViewInfo is TcxSchedulerHeaderCellViewInfo then - with TcxSchedulerHeaderCellViewInfo(AViewInfo) do - begin - Self.TextAlignX := TextAlignXMap[AlignHorz]; - Self.TextAlignY := TextAlignYMap[AlignVert]; - Self.FRotateText := RotateText; - Self.FCaption := DisplayText; - Self.FIsResourceHeader := IsResourceHeader; - Self.FResourceID := ResourceID; - end; - CellSides := csAll; - ReportLink.RegisterLookAndFeelItem(Self, cesRaised); -end; - -procedure TcxSchedulerReportHeaderItemCell.Assign(Source: TPersistent); -begin - if Source is TcxSchedulerReportHeaderItemCell then - with TcxSchedulerReportHeaderItemCell(Source) do - begin - Self.FCaption := FCaption; - Self.FDate := FDate; - Self.FResourceID := FResourceID; - Self.FRotateText := FRotateText; - end; - inherited Assign(Source); -end; - -procedure TcxSchedulerReportHeaderItemCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -begin - inherited DrawContent(DC, AStage); - if FRotateText then - DrawCellTextVert(DC, BoundsRect, FCaption) - else - DrawCellText(DC, BoundsRect, FCaption, TextAlignX, TextAlignY, Font); -end; - -class function TcxSchedulerReportHeaderItemCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerHeaderCellViewInfo; -end; - -procedure TcxSchedulerReportHeaderItemCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FRotateText := AReader.ReadBoolean; - FCaption := AReader.ReadString; -end; - -procedure TcxSchedulerReportHeaderItemCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteBoolean(FRotateText); - AWriter.WriteString(FCaption); -end; - -function TcxSchedulerReportHeaderItemCell.GetTextAlignX: TcxTextAlignX; -begin - Result := inherited TextAlignX; -end; - -function TcxSchedulerReportHeaderItemCell.GetTextAlignY: TcxTextAlignY; -begin - Result := inherited TextAlignY; -end; - -procedure TcxSchedulerReportHeaderItemCell.SetTextAlignX( - Value: TcxTextAlignX); -begin - inherited TextAlignX := Value; -end; - -procedure TcxSchedulerReportHeaderItemCell.SetTextAlignY( - Value: TcxTextAlignY); -begin - inherited TextAlignY := Value; -end; - -{ TcxSchedulerReportGroupSeparatorCell } - -constructor TcxSchedulerReportGroupSeparatorCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - CellSides := csAll; - ReportLink.RegisterLookAndFeelItem(Self, cesRaised); -end; - -class function TcxSchedulerReportGroupSeparatorCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerGroupSeparatorCellViewInfo; -end; - -{ TcxSchedulerReportContainerCell } - -class function TcxSchedulerReportContainerCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerContainerCellViewInfo; -end; - -{ TcxSchedulerReportBackgroundSlotCell } - -constructor TcxSchedulerReportBackgroundSlotCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - if AViewInfo is TcxSchedulerBackgroundSlotCellViewInfo then - with TcxSchedulerBackgroundSlotCellViewInfo(AViewInfo) do - Self.FDisplayText := DisplayText; -end; - -procedure TcxSchedulerReportBackgroundSlotCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -begin - DrawCellRect(DC, BoundsRect, TcxBorders(CellSides), clWindowText); - DrawCellText(DC, BoundsRect, DisplayText, taLeft, taTop); -end; - -class function TcxSchedulerReportBackgroundSlotCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerBackgroundSlotCellViewInfo; -end; - -procedure TcxSchedulerReportBackgroundSlotCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FDisplayText := AReader.ReadString; -end; - -procedure TcxSchedulerReportBackgroundSlotCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FDisplayText); -end; - -{ TcxSchedulerReportDailyTimeRulerCellsSite } - -constructor TcxSchedulerReportDailyTimeRulerCellsSite.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - FLargeFont := TFont.Create; - FontIndex := ReportCells.ReportLink.AddFontToPool(Font); - CellSides := []; -end; - -destructor TcxSchedulerReportDailyTimeRulerCellsSite.Destroy; -begin - FLargeFont.Free; - inherited Destroy; -end; - -procedure TcxSchedulerReportDailyTimeRulerCellsSite.SetFontIndex(Index: Integer); -begin - inherited SetFontIndex(Index); - if Font <> nil then - begin - FLargeFont.Assign(Font); - FLargeFont.Size := Font.Size * 2; - FLargeFontIndex := ReportCells.ReportLink.AddFontToPool(FLargeFont); - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCellsSite.ReadProperties( - AReader: TdxPSDataReader); -begin - inherited ReadProperties(AReader); - FLargeFontIndex := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportDailyTimeRulerCellsSite.WriteProperties( - AWriter: TdxPSDataWriter); -begin - inherited WriteProperties(AWriter); - AWriter.WriteInteger(FLargeFontIndex); -end; - -function TcxSchedulerReportDailyTimeRulerCellsSite.GetLargeFont: TFont; -begin - if (FLargeFontIndex <> -1) and (ReportCells <> nil) then - Result := ReportCells.GetFontByIndex(FLargeFontIndex) - else - Result := nil; -end; - -{ TcxSchedulerReportDailyTimeRulerCell } - -constructor TcxSchedulerReportDailyTimeRulerCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -var - I: Boolean; -begin - inherited CreateFrom(AParent, AViewInfo); - CellSides := [csRight]; - Data := cdidSchedulerTimeRuler; - FLineColor := clBtnShadow; - TimeRulerSite.Width := Max(TimeRulerSite.Width, Width); - if AViewInfo is TcxSchedulerTimeRulerCellViewInfo then - with TcxSchedulerTimeRulerCellViewInfo(AViewInfo) do - begin - TimeRulerSite.Height := Max(TimeRulerSite.Height, ClipRect.Bottom); - Self.FHour := Hour; - Self.FHasAdditionalTimeZone := HasAdditionalTimeZone; - Self.FLineCount:= LineCount; - for I := False to True do - begin - Self.FBounds[I] := Bounds[I]; - Self.FDisplayTexts[I] := DisplayTexts[I]; - end; - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportDailyTimeRulerCell then - with TcxSchedulerReportDailyTimeRulerCell(Source) do - begin - Self.FHasAdditionalTimeZone := FHasAdditionalTimeZone; - Self.FLineCount := FLineCount; - Self.FBounds[False] := FBounds[False]; - Self.FBounds[True] := FBounds[True]; - Self.FDisplayTexts[False] := FDisplayTexts[False]; - Self.FDisplayTexts[True] := FDisplayTexts[True]; - Self.FHour := FHour; - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - I: Boolean; -const - ABorders: array[Boolean] of TcxBorders = ([bBottom], [bBottom, bRight]); -begin - if Index = 0 then - CellSides := CellSides + [csBottom]; - inherited; - CalculateDisplayInfo; - for I := not HasAdditionalTimeZone to True do - begin - if Hour >= 0 then - DrawTimeZone(DC, Bounds[I], DisplayTexts[I], I) - else - DrawTimeZoneLabel(DC, Bounds[I], DisplayTexts[I], ABorders[I]); - end; -end; - -class function TcxSchedulerReportDailyTimeRulerCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerTimeRulerCellViewInfo; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.SuppressColoration; -begin - inherited SuppressColoration; - FLineColor := clBlack; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.CalculateDisplayInfo; -begin - FBounds[True] := BoundsRect; - FBounds[False] := BoundsRect; - if HasAdditionalTimeZone then - begin - FBounds[True].Left := cxRectCenter(BoundsRect).X; - FBounds[False].Right := FBounds[True].Left; - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.DrawTimeZone(DC: HDC; - const ABounds: TRect; const AText: string; AIsCurrent: Boolean); -var - J, LH: Integer; - R, TextR: TRect; -begin - LH := cxRectHeight(BoundsRect) div LineCount; - R := BoundsRect; - Dec(R.Right, FixupWidth(6)); - if not IsLastItem then - DrawCellFrame(DC, R, [bBottom], FLineColor); - - R := cxRectSetHeight(ABounds, LH); - R.Left := (R.Left + R.Right) div 2 + FixupWidth(cxTextOffset * 2); - Dec(R.Right, FixupWidth(6)); - for J := 0 to LineCount - 2 do - begin - DrawCellFrame(DC, R, [bBottom], FLineColor, 1); - OffsetRect(R, 0, LH); - end; - TextR := cxRectInflate(ExcludeBorders(ABounds, - [bRight, bBottom]), -FixupWidth(5), -FixupWidth(cxTextOffset)); - - if LineCount > 1 then - begin - J := Length(AText); - DrawCellText(DC, Rect(TextR.Left, TextR.Top, R.Left - FixupWidth(cxTextOffset), TextR.Bottom), - Copy(AText, 1, J - 3), taRight, taTop, LargeFont, LargeFont.Color); - DrawCellText(DC, Rect(R.Left, TextR.Top, TextR.Right, TextR.Top + LH - FixupWidth(3)), - Copy(AText, J - 1, 2), taCenterX, taTop, Font); - end - else - DrawCellText(DC, TextR, AText, taRight, taCenterY, Font); - R.Left := ABounds.Left + FixupWidth(5); - if not IsLastItem then - begin - if Hour <> 23 then - DrawCellFrame(DC, R, [bBottom], FLineColor) - else - DrawCellFrame(DC, ABounds, [bBottom], FLineColor); - end; - if HasAdditionalTimeZone then - begin - R := GetInnerBounds(DC); - R.Left := (R.Left + R.Right) div 2; - R.Right := R.Left + LineThickness; - Renderer.FillRect(DC, R, clBlack); - end; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FHasAdditionalTimeZone := AReader.ReadBoolean; - FLineCount := AReader.ReadInteger; - FBounds[False] := AReader.ReadRect; - FBounds[True] := AReader.ReadRect; - FDisplayTexts[False] := AReader.ReadString; - FDisplayTexts[True] := AReader.ReadString; - FHour := AReader.ReadInteger; - FLineColor := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteBoolean(FHasAdditionalTimeZone); - AWriter.WriteInteger(FLineCount); - AWriter.WriteRect(FBounds[False]); - AWriter.WriteRect(FBounds[True]); - AWriter.WriteString(FDisplayTexts[False]); - AWriter.WriteString(FDisplayTexts[True]); - AWriter.WriteInteger(FHour); - AWriter.WriteInteger(FLineColor); -end; - -procedure TcxSchedulerReportDailyTimeRulerCell.DrawTimeZoneLabel(DC: HDC; - const ABounds: TRect; const AText: string; ABorders: TcxBorders); -begin - DrawCellText(DC, TextRect(ABounds), AText, taLeft, taBottom, Font, Font.Color); -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetBoundsRect(AType: Boolean): TRect; -begin - Result := FBounds[AType]; -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetDisplayText(AType: Boolean): string; -begin - Result := FDisplayTexts[AType]; -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetLargeFont: TFont; -begin - Result := TimeRulerSite.LargeFont; -end; - -function TcxSchedulerReportDailyTimeRulerCell.GetTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; -begin - Result := TcxSchedulerReportDailyTimeRulerCellsSite(Parent); -end; - -{ TcxSchedulerReportMonthDayCell } - -constructor TcxSchedulerReportMonthDayCell.CreateFrom( - AParent: TdxReportCell; AViewInfo: TcxSchedulerCustomViewInfoItem); -begin - inherited CreateFrom(AParent, AViewInfo); - if AViewInfo is TcxSchedulerMonthDayContentCellViewInfo then - begin - FDontPrint := TcxSchedulerMonthDayContentCellViewInfo(AViewInfo).DontPrint; - if FDontPrint then - begin - Transparent := True; - FDisplayText := ''; - end - else - FDisplayText := TcxSchedulerMonthDayContentCellViewInfo(AViewInfo).DisplayText; - end; -end; - -procedure TcxSchedulerReportMonthDayCell.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportMonthDayCell then - begin - FDontPrint := TcxSchedulerReportMonthDayCell(Source).FDontPrint; - FDisplayText := TcxSchedulerReportMonthDayCell(Source).FDisplayText; - end; -end; - -procedure TcxSchedulerReportMonthDayCell.DrawContent( - DC: HDC; AStage: TdxPSRenderStages); -var - R: TRect; -begin - inherited DrawContent(DC, AStage); - if FDontPrint then Exit; - if FDisplayText <> '' then - begin - R := ExcludeBorders(BoundsRect, TcxBorders(CellSides)); - DrawCellText(DC, R, FDisplayText, taRight, taTop); - end; -end; - -class function TcxSchedulerReportMonthDayCell.SchedulerCellClass: TcxSchedulerCustomViewInfoItemClass; -begin - Result := TcxSchedulerMonthDayContentCellViewInfo; -end; - -procedure TcxSchedulerReportMonthDayCell.ReadData(AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FDisplayText := AReader.ReadString; - FDontPrint := AReader.ReadBoolean; -end; - -procedure TcxSchedulerReportMonthDayCell.WriteData(AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteString(FDisplayText); - AWriter.WriteBoolean(FDontPrint); -end; - -{ TcxSchedulerReportTimeLinePart } - -constructor TcxSchedulerReportTimeLinePart.CreateEx(AParent: TdxReportCell; - ATriangle: Boolean; AState: Integer); -begin - inherited Create(AParent); - Transparent := False; - FTriangle := ATriangle; - FState := AState; - Data := cdidSchedulerEventTimeLine; -end; - -procedure TcxSchedulerReportTimeLinePart.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TcxSchedulerReportTimeLinePart then - begin - FState := TcxSchedulerReportTimeLinePart(Source).FState; - FTriangle := TcxSchedulerReportTimeLinePart(Source).FTriangle; - end; -end; - -procedure TcxSchedulerReportTimeLinePart.DrawContent(DC: HDC; - AStage: TdxPSRenderStages); -var - R: TRect; - ABrushHandle: HBrush; - APenHandle: HPen; - Points: array[0..2] of TPoint; -begin - R := GetOuterBounds(DC); - if FTriangle then - begin - Renderer.FillRect(DC, R, clWhite); - ABrushHandle := SelectObject(DC, StateBrushes[FState].Handle); - APenHandle := SelectObject(DC, GetStockObject(NULL_PEN)); - Points[0] := R.TopLeft; - Points[1] := Point(R.Right, R.Top); - Points[2] := Point(R.Right, R.Top + R.Right - R.Left); - Windows.Polygon(DC, Points, 3); - SelectObject(DC, GetStockObject(BLACK_PEN)); - Windows.MoveToEx(DC, R.Left, R.Top, nil); - Windows.LineTo(DC, R.Right, R.Top + R.Right - R.Left); - SelectObject(DC, APenHandle); - SelectObject(DC, ABrushHandle); - end - else - Windows.FillRect(DC, R, StateBrushes[FState].Handle); - DrawBorders(DC); -end; - -procedure TcxSchedulerReportTimeLinePart.ReadData( - AReader: TdxPSDataReader); -begin - inherited ReadData(AReader); - FTriangle := AReader.ReadBoolean; - FState := AReader.ReadInteger; -end; - -procedure TcxSchedulerReportTimeLinePart.WriteData( - AWriter: TdxPSDataWriter); -begin - inherited WriteData(AWriter); - AWriter.WriteBoolean(FTriangle); - AWriter.WriteInteger(FState); -end; - -{ TcxSchedulerReportTimeLineCell } - -constructor TcxSchedulerReportTimeLineCell.Create(AParent: TdxReportCell); -begin - inherited Create(AParent); - Transparent := False; - Color := clWhite; -end; - -procedure TcxSchedulerReportTimeLineCell.SetTimeRect(const ABounds: TRect; AState: Integer); -var - ATriangle: Boolean; -begin - ATriangle := cxRectIsEmpty(ABounds); - FCurrentValue := TcxSchedulerReportTimeLinePart.CreateEx(Self, ATriangle, AState); - if ATriangle then - FCurrentValue.BoundsRect := BoundsRect - else - FCurrentValue.BoundsRect := ABounds; -end; - -{ TcxSchedulerReportCustomEventCell } - -function TcxSchedulerReportCustomEventCell.CreateStringCell( - const AText: string; AData: Integer = 0): TdxReportCellString; -begin - Result := TdxReportCellString.Create(Self); - Result.CellSides := []; - Result.Multiline := True; - Result.Text := AText; - Result.Data := AData; -end; - -procedure TcxSchedulerReportCustomEventCell.SetViewParams(const AViewParams: TcxViewParams); -var - I: Integer; -begin - ReportLink.SetCellViewParams(Self, AViewParams); - for I := 0 to DataItemCount - 1 do - ReportLink.SetCellViewParams(DataItems[I], AViewParams); -end; - -function TcxSchedulerReportCustomEventCell.GetPrintStyle: TcxCustomSchedulerReportLinkPrintStyle; -begin - Result := ReportLink.PrintStyles.ActiveStyle; -end; - -function TcxSchedulerReportCustomEventCell.GetReportLink: TcxSchedulerReportLink; -begin - Result := ReportCells.ReportLink as TcxSchedulerReportLink; -end; - -function TcxSchedulerReportCustomEventCell.GetSuppressColoration: Boolean; -begin - Result := ReportLink.OptionsFormatting.SuppressContentColoration; -end; - -{ TcxSchedulerReportEventCell } - -constructor TcxSchedulerReportEventCell.CreateFrom(AParent: TdxReportCell; - AEventViewInfo: TcxSchedulerEventCellViewInfo); -begin - inherited Create(AParent); - ClipChildren := True; - Transparent := False; - InitializeFromViewInfo(AEventViewInfo); - CreateDataItems; - SetViewParams(AEventViewInfo.ViewParams); - CalculateLayout; -end; - -procedure TcxSchedulerReportEventCell.AdjustItemsHeight; - - procedure CheckItem(AItem: TAbstractdxReportCellData); - var - R: TRect; - begin - if Assigned(AItem) then - begin - R := AItem.BoundsRect; - if HasMessage then - R.Bottom := MessageCell.Top - else - R.Bottom := ContentBounds.Bottom; - AItem.BoundsRect := R; - end; - end; - -begin - CheckItem(CaptionCell); - CheckItem(IconsCell); - CheckItem(StartCell); - CheckItem(FinishCell); -end; - -procedure TcxSchedulerReportEventCell.CalculateLayout; -var - DC: HDC; - W, H, ALeft, AHalfWidth: Integer; -begin - DC := GetDC(0); - try - FContentBounds := GetContentBounds(DC); - if Assigned(FTimeLineCell) then - CalculateTimeLine(DC); - if Assigned(IconsCell) then - begin - IconsCell.BoundsRect := GetIconsRect(DC); - ALeft := IconsCell.BoundsRect.Right; - end - else ALeft := 0; - if IsNeedCreateTimeCells then - begin - H := Renderer.CalcTextHeight(DC, '0', False, CaptionCell.Font); - W := Renderer.CalcTextWidth(DC, '00:00', CaptionCell.Font); - AHalfWidth := cxRectWidth(ContentBounds) div 2; - if W < AHalfWidth then - begin - StartCell.BoundsRect := cxRectBounds(ALeft, 0, W, H); - if W * 2 < AHalfWidth then - FinishCell.BoundsRect := cxRectBounds(StartCell.BoundsRect.Right, 0, W, H) - else - FreeAndNil(FFinishCell); - end - else - FreeAndNil(FStartCell); - end; - CaptionCell.BoundsRect := GetCaptionRect(DC); - if Assigned(MessageCell) then - begin - MessageCell.BoundsRect := GetMessageRect(DC); - MessageCell.AdjustContent(DC); - end; - AdjustItemsHeight; - finally - ReleaseDC(0, DC); - end; -end; - -procedure TcxSchedulerReportEventCell.CalculateTimeLine(DC: HDC); - - function GetTimeRectBrushIndex: Integer; - begin - Result := Event.State; - if SuppressColoration then - Inc(Result, 4); - end; - - function GetActualTimeRect: TRect; - begin - Result := GetRelativeRect(EventViewInfo.EventTimeRect); - if not cxRectIsEmpty(Result) then - Result := cxRectInflate(Result, 0, 1); - end; - -begin - if FTimeLineCell = nil then Exit; - FTimeLineCell.BoundsRect := GetTimeLineRect(DC); - FTimeLineCell.SetTimeRect(GetActualTimeRect, GetTimeRectBrushIndex); -end; - -function TcxSchedulerReportEventCell.CreateCaptionCell: TdxReportCellString; -begin - Result := AddDataItem(TdxReportCellString) as TdxReportCellString; - with Result do - begin - Text := EventViewInfo.Caption; - CellSides := []; - Multiline := FHasDetailInfo and not IsHeaderEvent; - if HasDetailInfo then TextAlignY := taTop; - if IsHeaderEvent then TextAlignX := taCenterX; - end; -end; - -procedure TcxSchedulerReportEventCell.CreateDataItems; -begin - if HasDetailInfo and not IsHeaderEvent then - FTimeLineCell := CreateTimeLineCell; - if HasIcons then - begin - FIconsCell := CreateIconCells; - FIconsCell.Data := cdidSchedulerEventIcons; - end; - if IsNeedCreateTimeCells then - begin - FStartCell := CreateTimeTextCell(EventViewInfo.StartText); - FStartCell.Data := cdidSchedulerEventStart; - FFinishCell := CreateTimeTextCell(EventViewInfo.FinishText); - FFinishCell.Data := cdidSchedulerEventFinish; - end; - FCaptionCell := CreateCaptionCell; - FCaptionCell.Data := cdidSchedulerEventCaption; - if HasMessage then - begin - CreateMessageCell(Event.Message, EventViewInfo.EventViewData.EditProperties, - EventViewInfo.ViewParams); - FMessageCell.Data := cdidSchedulerEventMessage; - end; -end; - -procedure TcxSchedulerReportEventCell.CreateMessageCell(AMessage: Variant; - AProperties: TcxCustomEditProperties; AViewParams: TcxViewParams); -var - AParams: TdxReportItemViewParams; -begin - if AProperties = nil then - FMessageCell := nil - else - begin - FMessageCell := AddDataItem(GetMessageClass(AProperties)); - FillChar(AViewParams, SizeOf(AViewParams), 0); - AParams.NativeParams := AViewParams; - dxPScxCommon.dxPSDataMaps.InitializeItem(FMessageCell, AProperties, AMessage, - PrintStyle, AParams); - if not SuppressColoration then - MessageCell.BorderColor := EventViewInfo.SeparatorColor; - FMessageCell.CellSides := [csTop]; - end; -end; - -function TcxSchedulerReportEventCell.CreateTimeTextCell( - const ATimeText: string): TdxReportCellString; -begin - Result := TdxReportCellString.Create(Self); - Result.Text := ATimeText; - Result.TextAlignX := taRight; - Result.CellSides := []; -end; - -function TcxSchedulerReportEventCell.CreateTimeLineCell: TcxSchedulerReportTimeLineCell; -begin - Result := TcxSchedulerReportTimeLineCell.Create(Self); -end; - -function TcxSchedulerReportEventCell.CreateIconCells: TdxReportCellString; -begin - Result := AddDataItem(TdxReportCellString) as TdxReportCellString; - with Result do - begin - CellSides := []; - if HasDetailInfo then TextAlignY := taTop; - FontIndex := Self.Parent.FontIndex; - Text := IconsString; - end; -end; - -function TcxSchedulerReportEventCell.GetCaptionRect(DC: HDC): TRect; -begin - Result := FContentBounds; - if Assigned(FinishCell) then - Result.Left := FinishCell.BoundsRect.Right - else - if Assigned(StartCell) then - Result.Left := StartCell.BoundsRect.Right - else - if HasIcons then - Result.Left := IconsCell.BoundsRect.Right; - if HasMessage then - begin - Result.Bottom := Result.Top + CaptionCell.MeasureFontHeight(DC); - Renderer.CalcTextRect(DC, CaptionCell.Text, Result, True, Font); - Result.Right := ContentBounds.Right; - CheckBounds(Result); - end; -end; - -function TcxSchedulerReportEventCell.GetContentBounds(DC: HDC): TRect; -begin - Result := GetRelativeRect(EventViewInfo.Bounds); - Dec(Result.Right); - Dec(Result.Bottom); -end; - -function TcxSchedulerReportEventCell.GetHasIcons: Boolean; -begin - Result := PrintStyle.SupportIcons and (Event.IsRecurring {or Event.Remainder}); -end; - -function TcxSchedulerReportEventCell.GetHasMessage: Boolean; -begin - Result := PrintStyle.SupportMessage and HasDetailInfo; -end; - -function TcxSchedulerReportEventCell.GetIconsRect(DC: HDC): TRect; -begin - Result := ContentBounds; - Renderer.CalcTextRect(DC, IconsString, Result, False, IconsCell.Font); - Result.Right := Result.Left + Renderer.CalcTextWidth(DC, IconsString, IconsCell.Font); - if not HasDetailInfo then Result.Bottom := ContentBounds.Bottom; - CheckBounds(Result); -end; - -function TcxSchedulerReportEventCell.GetIconsString: string; -const - //etNone, etPattern, etOccurrence, etException, etCustom - IconChars: array[TcxEventType] of Char = (' ', ' ', 'B', ' ', 'C'); -begin - Result := ''; - if not HasIcons then Exit; - with Event do - begin - //if Reminder then Result := 'A'; - if IsRecurring then Result := Result + IconChars[EventType]; - end; -end; - -function TcxSchedulerReportEventCell.GetMessageClass(AProperties: TcxCustomEditProperties): TdxReportCellDataClass; -begin - Result := dxPScxCommon.dxPSDataMaps.ItemClass(AProperties); -end; - -function TcxSchedulerReportEventCell.GetMessageRect(DC: HDC): TRect; -begin - Result := ContentBounds; - if HasIcons then - Result.Top := IconsCell.BoundsRect.Bottom; - if CaptionCell.BoundsRect.Bottom > Result.Top then - Result.Top := CaptionCell.BoundsRect.Bottom; -end; - -function TcxSchedulerReportEventCell.GetRelativeRect(const R: TRect): TRect; -begin - Result := cxRectOffset(R, cxPointInvert(BoundsRect.TopLeft)); -end; - -function TcxSchedulerReportEventCell.GetTimeLineRect(DC: HDC): TRect; -begin - Result := cxRect(0, 0, ContentBounds.Left, Height); -end; - -procedure TcxSchedulerReportEventCell.InitializeFromViewInfo( - AEventViewInfo: TcxSchedulerEventCellViewInfo); -begin - FEventViewInfo := AEventViewInfo; - FEditViewInfo := AEventViewInfo.EditViewInfo; - BoundsRect := AEventViewInfo.EventViewData.Bounds; //include timeline - CellSides := TdxCellSides(AEventViewInfo.Borders); - FIsHeaderEvent := Event.AllDayEvent or (Event.Duration > 1); - FHasDetailInfo := AEventViewInfo.IsDetailInfo; - FIsNeedCreateTimeCells := not (FIsHeaderEvent or FHasDetailInfo) and - AEventViewInfo.ShowStartTime; - FHasIcons := GetHasIcons; - FHasMessage := GetHasMessage and AEventViewInfo.ShowMessage; - FIconsString := GetIconsString; - FMessage := AEventViewInfo.Message; -end; - -procedure TcxSchedulerReportEventCell.SetViewParams(const AViewParams: TcxViewParams); -begin - inherited SetViewParams(AViewParams); - if HasIcons then - begin - SpecialSymbolFont.Size := AViewParams.Font.Size; - IconsCell.FontIndex := Renderer.ReportLink.AddFontToPool(SpecialSymbolFont); - end; -end; - -procedure TcxSchedulerReportEventCell.CheckBounds(var ABounds: TRect); -begin - cxRectIntersect(ABounds, ABounds, ContentBounds); -end; - -function TcxSchedulerReportEventCell.GetEvent: TcxSchedulerControlEvent; -begin - Result := EventViewInfo.Event; -end; - -{ TcxSchedulerReportDetailsEventCell } - -constructor TcxSchedulerReportDetailsEventCell.CreateEx(AParent: TdxReportCell; - AEvent: TcxSchedulerEvent; ADate: TDateTime; const AParams: TcxViewParams; - AContinued: Boolean = False); -begin - inherited Create(AParent); - CellSides := []; - FContinued := AContinued; - FDate := ADate; - FEvent := AEvent; - CreateDataItems; - SetViewParams(AParams); -end; - -procedure TcxSchedulerReportDetailsEventCell.CalculateLayout(AWidth, ATimeWidth: Integer); -var - DC: HDC; - ATop: Integer; -begin - FCaptionCell.BoundsRect := MakeRect(ATimeWidth, 0, AWidth, 0); - DC := GetDC(0); - try - FLineHeight := FCaptionCell.MeasureFontHeight(DC); - FStartCell.BoundsRect := MakeRect(0, 0, ATimeWidth, FLineHeight); - ATop := FCaptionCell.MeasureContentHeight(DC); - FCaptionCell.Height := ATop; - FMessageCell.BoundsRect := MakeRect(ATimeWidth, ATop, AWidth, ATop); - ATop := FMessageCell.MeasureContentHeight(DC); - FMessageCell.Height := Max(ATop, FLineHeight); - finally - ReleaseDC(0, DC); - end; -end; - -function TcxSchedulerReportDetailsEventCell.CalculateHeight: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to DataItemCount - 1 do - with DataItems[I] do - if Visible then Result := Max(Result, BoundsRect.Bottom); -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateCaptionCell; -begin - FCaptionCell := CreateStringCell(GetCaptionCellText, - cdidSchedulerEventCaption); -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateDataItems; -begin - CreateCaptionCell; - CreateTimeCell; - CreateMessageCell; -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateMessageCell; -begin - FMessageCell := CreateStringCell(GetMessageCellText, cdidSchedulerEventMessage); -end; - -procedure TcxSchedulerReportDetailsEventCell.CreateTimeCell; -begin - FStartCell := CreateStringCell(GetTimeCellText, cdidSchedulerEventStart); -end; - -function TcxSchedulerReportDetailsEventCell.GetCaptionCellText: string; -begin - Result := Event.Caption; - if Trim(Event.Location) <> '' then - Result := Result + ' -- ' + Event.Location; -end; - -function TcxSchedulerReportDetailsEventCell.GetMessageCellText: string; -begin - if Continued then - Result := cxGetResourceString(@sdxSeeAboveMessage) - else - Result := Event.Message; -end; - -function TcxSchedulerReportDetailsEventCell.GetTimeCellText: string; -begin - if Event.AllDayEvent or ((DateOf(Event.Start) < Date) and (DateOf(Event.Finish) > Date)) then - Result := cxGetResourceString(@sdxAllDayMessage) - else - Result := DateTimeHelper.TimeToStr(Max(Event.Start, Date)) + ' - ' + - DateTimeHelper.TimeToStr(Min(Event.Finish, Date + 1)); -end; - -procedure TcxSchedulerReportDetailsEventCell.SetViewParams( - const AViewParams: TcxViewParams); -var - AParams: TdxReportItemViewParams; -begin - inherited SetViewParams(AViewParams); - FillChar(AParams, SizeOf(AParams), 0); - AParams.NativeParams := AViewParams; - Include(AParams.FontStyle, fsBold); - ReportLink.SetCellViewParams(CaptionCell, AParams); - ReportLink.SetCellViewParams(StartCell, AParams); -end; - -{ TcxSchedulerReportMemoEventCell } - -procedure TcxSchedulerReportMemoEventCell.CalculateLayout(AWidth, - ATimeWidth: Integer); -var - ATop, ASpace: Integer; - DC: HDC; -begin - DC := GetDC(0); - try - FLineHeight := Renderer.CalcTextHeight(DC, 'Wg', False, Font); - ASpace := FLineHeight div 2; - ATop := FLineHeight * 2; - HeaderCell.BoundsRect := MakeRect(0, 0, AWidth, ATop); - Inc(ATop, ASpace); - CalculateLabelAndData(CaptionLabelCell, CaptionCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(LocationLabelCell, LocationCell, DC, ATimeWidth, AWidth, ATop); - if Assigned(CaptionLabelCell) or Assigned(LocationLabelCell) then Inc(ATop, ASpace); - CalculateLabelAndData(StartLabelCell, StartCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(FinishLabelCell, FinishCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(ShowTimeAsLabelCell, ShowTimeAsCell, DC, ATimeWidth, AWidth, ATop); - Inc(ATop, ASpace); - CalculateLabelAndData(RecurrenceLabelCell, RecurrenceCell, DC, ATimeWidth, AWidth, ATop); - CalculateLabelAndData(RecurrencePatternLabelCell, RecurrencePatternCell, DC, ATimeWidth, AWidth, ATop); - if Assigned(MessageCell) then - begin - Inc(ATop, ASpace); - MessageCell.BoundsRect := MakeRect(0, ATop, AWidth, ATop); - MessageCell.Height := MessageCell.MeasureContentHeight(DC); - end; - finally - ReleaseDC(0, DC); - end; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateDataItems; -begin - CreateHeader; - CreateSubject; - CreateLocation; - CreateStart; - CreateFinish; - CreateShowTimeAs; - CreateRecurrence; - CreateRecurrencePattern; - CreateMessage; -end; - -function TcxSchedulerReportMemoEventCell.GetCaptionCellText: string; -begin - Result := Event.Caption; -end; - -function TcxSchedulerReportMemoEventCell.GetMessageCellText: string; -begin - Result := Event.Message; -end; - -function TcxSchedulerReportMemoEventCell.GetTimeCellText: string; -begin - Result := FormatDateTime('ddd ddddd t', Event.Start); -end; - -procedure TcxSchedulerReportMemoEventCell.SetViewParams( - const AViewParams: TcxViewParams); -var - AParams: TdxReportItemViewParams; -begin - ReportLink.SetCellViewParams(Self, AViewParams); - ReportLink.SetCellViewParams(CaptionCell, AViewParams); - ReportLink.SetCellViewParams(LocationCell, AViewParams); - ReportLink.SetCellViewParams(StartCell, AViewParams); - ReportLink.SetCellViewParams(FinishCell, AViewParams); - ReportLink.SetCellViewParams(ShowTimeAsCell, AViewParams); - ReportLink.SetCellViewParams(RecurrenceCell, AViewParams); - ReportLink.SetCellViewParams(RecurrencePatternCell, AViewParams); - ReportLink.SetCellViewParams(MessageCell, AViewParams); - - FillChar(AParams, SizeOf(AParams), 0); - AParams.NativeParams := AViewParams; - Include(AParams.FontStyle, fsBold); - ReportLink.SetCellViewParams(CaptionLabelCell, AParams); - ReportLink.SetCellViewParams(LocationLabelCell, AParams); - ReportLink.SetCellViewParams(StartLabelCell, AParams); - ReportLink.SetCellViewParams(FinishLabelCell, AParams); - ReportLink.SetCellViewParams(ShowTimeAsLabelCell, AParams); - ReportLink.SetCellViewParams(RecurrenceLabelCell, AParams); - ReportLink.SetCellViewParams(RecurrencePatternLabelCell, AParams); - - AParams.FontSize := MulDiv(AViewParams.Font.Size, 3, 2); - ReportLink.SetCellViewParams(HeaderCell, AParams); -end; - -procedure TcxSchedulerReportMemoEventCell.CalculateLabelAndData( - ALabelCell, ADataCell: TAbstractdxReportCellData; DC: HDC; - ATimeWidth, AWidth: Integer; var ATop: Integer); -begin - if Assigned(ALabelCell) then - begin - ALabelCell.BoundsRect := MakeBounds(0, ATop, ATimeWidth, FLineHeight); - ADataCell.BoundsRect := MakeRect(ATimeWidth, ATop, AWidth, ATop); - ADataCell.Height := ADataCell.MeasureContentHeight(DC); - Inc(ATop, Max(ADataCell.Height, FLineHeight)); - end; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateHeader; -begin - FHeaderCell := CreateStringCell(GetHeaderCellText); - FHeaderCell.BorderClass := TdxPSCellBoldFlatBorder; - FHeaderCell.CellSides := [csBottom]; - FHeaderCell.TextAlignY := taBottom; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateFinish; -begin - CreateFinishLabelCell; - CreateFinishCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateFinishCell; -begin - FFinishCell := CreateStringCell(FormatDateTime('ddd ddddd t', Event.Finish)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateFinishLabelCell; -begin - FFinishLabelCell := CreateStringCell( - cxGetResourceString(@sdxFinishLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateLocation; -begin - if Event.Location = '' then Exit; - CreateLocationLabelCell; - CreateLocationCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateLocationCell; -begin - FLocationCell := CreateStringCell(Event.Location); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateLocationLabelCell; -begin - FLocationLabelCell := CreateStringCell( - cxGetResourceString(@sdxLocationLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateMessage; -begin - if GetMessageCellText = '' then Exit; - CreateMessageCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrence; -begin - CreateRecurrenceLabelCell; - CreateRecurrenceCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrenceCell; -begin - FRecurrenceCell := CreateStringCell(GetRecurrenceCellText); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrenceLabelCell; -begin - FRecurrenceLabelCell := CreateStringCell( - cxGetResourceString(@sdxRecurrenceLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrencePattern; -begin - if not Event.IsRecurring then Exit; - CreateRecurrencePatternLabelCell; - CreateRecurrencePatternCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrencePatternCell; -begin - FRecurrencePatternCell := CreateStringCell(GetRecurrencePatternCellText); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateRecurrencePatternLabelCell; -begin - FRecurrencePatternLabelCell := CreateStringCell( - cxGetResourceString(@sdxRecurrencePatternLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateShowTimeAs; -begin - if GetShowTimeAsCellText = '' then Exit; - CreateShowTimeAsLabelCell; - CreateShowTimeAsCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateShowTimeAsCell; -begin - FShowTimeAsCell := CreateStringCell(GetShowTimeAsCellText); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateShowTimeAsLabelCell; -begin - FShowTimeAsLabelCell := CreateStringCell( - cxGetResourceString(@sdxShowTimeAsLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateStart; -begin - CreateStartLabelCell; - CreateTimeCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateStartLabelCell; -begin - FStartLabelCell := CreateStringCell( - cxGetResourceString(@sdxStartLabelCaption)); -end; - -procedure TcxSchedulerReportMemoEventCell.CreateSubject; -begin - if GetCaptionCellText = '' then Exit; - CreateSubjectLabelCell; - CreateCaptionCell; -end; - -procedure TcxSchedulerReportMemoEventCell.CreateSubjectLabelCell; -begin - FCaptionLabelCell := CreateStringCell( - cxGetResourceString(@sdxSubjectLabelCaption)); -end; - -function TcxSchedulerReportMemoEventCell.GetHeaderCellText: string; -var - AResource: TcxSchedulerStorageResourceItem; -begin - AResource := Event.GetResourceItem; - if AResource <> nil then - Result := AResource.Name - else - Result := dxPSUtl.GetUserName; -end; - -function TcxSchedulerReportMemoEventCell.GetRecurrenceCellText: string; -begin - if Event.IsRecurring then - case Event.RecurrenceInfo.Recurrence of - cxreDaily: - Result := cxGetResourceString(@scxRecurrenceDailyMessage); - cxreWeekly: - Result := cxGetResourceString(@scxRecurrenceWeeklyMessage); - cxreMonthly: - Result := cxGetResourceString(@scxRecurrenceMonthlyMessage); - cxreYearly: - Result := cxGetResourceString(@scxRecurrenceYearlyMessage); - else - Result := ''; - end - else - Result := cxGetResourceString(@sdxRecurrenceNoneMessage); -end; - -function TcxSchedulerReportMemoEventCell.GetRecurrencePatternCellText: string; -begin - if Event.IsRecurring and Assigned(cxGetRecurrenceDescriptionStringProc) then - Result := cxGetRecurrenceDescriptionStringProc(Event.RecurrenceInfo) - else - Result := ''; -end; - -function TcxSchedulerReportMemoEventCell.GetShowTimeAsCellText: string; -begin - case Event.State of - tlsFree: - Result := cxGetResourceString(@sdxShowTimeAsFreeMessage); - tlsTentative: - Result := cxGetResourceString(@sdxShowTimeAsTentativeMessage); - tlsOutOfOffice: - Result := cxGetResourceString(@sdxShowTimeAsOutOfOfficeMessage); - else - Result := ''; - end; -end; - -{ TcxSchedulerReportCommonCellsProducer } - -constructor TcxSchedulerReportCommonCellsProducer.CreateEx( - AStyle: TcxCustomSchedulerReportLinkPrintStyle; - ASite: TcxSchedulerReportSchedulingAreaCell); -begin - inherited Create(AStyle.GetCorrespondedView); - FStyle := AStyle; - FSite := ASite; -end; - -procedure TcxSchedulerReportCommonCellsProducer.GetPageResources( - AResources: TcxObjectList); -var - ResPerPage, APageIndex, I, J: Integer; -begin - ResPerPage := Style.ResourceCountPerPage; - if (Resources = nil) or (ResPerPage <= 0) or - (ResPerPage >= Resources.VisibleResourceCount) then - begin - inherited GetPageResources(AResources); - Exit; - end; - APageIndex := (Site.PageIndex div PagesPerWeek) mod Style.GetResourcePageCount; - I := ResPerPage * APageIndex; - J := Min(ResPerPage * (APageIndex + 1), Resources.VisibleResourceCount); - while I < J do - begin - AResources.Add(TcxSchedulerResourceViewInfo.Create( - Resources.VisibleResources[I])); - I := I + 1; - end; -end; - -procedure TcxSchedulerReportCommonCellsProducer.Produce; -begin - Calculate; -end; - -procedure TcxSchedulerReportCommonCellsProducer.AfterCalculatePage; -var - I, J: Integer; - ASubList: TcxSchedulerViewInfoCellList; - AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass; - AEventCell: TcxSchedulerReportEventCell; -begin - for I := 0 to Cells.Count - 1 do - begin - ASubList := TcxSchedulerViewInfoCellList(Cells[I]); - for J := 0 to ASubList.Count - 1 do - begin - AItem := ASubList[J]; - if AItem.Visible then - begin - if AItem is TcxSchedulerEventCellViewInfo then - begin - AEventCell := CreateEventCell(TcxSchedulerEventCellViewInfo(AItem)); - Style.ReportLink.DoInitializeEventCell(AEventCell); - end - else - if FindMirorClassForItem(AItem, AReportItemClass) then - ConvertSchedulerCellToPSCells(AItem, AReportItemClass); - end; - end; - end; -end; - -function TcxSchedulerReportCommonCellsProducer.CanCalculate: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportCommonCellsProducer.CreateEventCell( - AEventViewInfo: TcxSchedulerEventCellViewInfo): TcxSchedulerReportEventCell; -begin - Result := TcxSchedulerReportEventCell.CreateFrom(Site, AEventViewInfo); -end; - -procedure TcxSchedulerReportCommonCellsProducer.ConvertSchedulerCellToPSCells( - AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); -var - APSItem: TcxSchedulerReportCustomCell; -begin - APSItem := AReportItemClass.CreateFrom(FSite, AItem); - SetCellViewParams(APSItem, AItem.ViewParams); -end; - -procedure TcxSchedulerReportCommonCellsProducer.DoInitialize( - var ASelectedDays: TcxSchedulerDateList; var AEvents: TcxSchedulerCachedEventList); -begin - ASelectedDays := Site.VisibleDays; - AEvents := Style.Events; -end; - -function TcxSchedulerReportCommonCellsProducer.GetCompressWeekends: Boolean; -begin - Result := Style.CompressWeekends; -end; - -function TcxSchedulerReportCommonCellsProducer.GetDontPrintWeekEnds: Boolean; -begin - Result := Style.DontPrintWeekends; -end; - -function TcxSchedulerReportCommonCellsProducer.GetHideSelection: Boolean; -begin - Result := True; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPageBounds: TRect; -begin - Result := Site.GetInnerBounds(0); -end; - -function TcxSchedulerReportCommonCellsProducer.GetPagesPerWeek: Byte; -begin - Result := Integer(Style.Layout) + 1; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPrintExactlyOneMonth: Boolean; -begin - Result := (Style is TcxSchedulerReportLinkMonthlyPrintStyle) and - TcxSchedulerReportLinkMonthlyPrintStyle(Style).PrintExactlyOneMonthPerPage; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPrintRange( - Index: Integer): TDateTime; -begin - if Index = 0 then - Result := Style.TimePrintFrom - else - Result := Style.TimePrintTo; -end; - -function TcxSchedulerReportCommonCellsProducer.GetPrimaryPage: Boolean; -begin - Result := Site.PrimaryPage; -end; - -function TcxSchedulerReportCommonCellsProducer.GetStylesAdapter: IcxSchedulerStylesAdapter; -begin - Result := Styles; -end; - -procedure TcxSchedulerReportCommonCellsProducer.SetCellViewParams( - ACell: TdxReportVisualItem; const AParams: TcxViewParams); -begin - Site.SetCellViewParams(ACell, AParams); - if Style.ReportLink.OptionsFormatting.SuppressContentColoration then - if ACell is TcxSchedulerReportCustomCell then - TcxSchedulerReportCustomCell(ACell).SuppressColoration; -end; - -function TcxSchedulerReportCommonCellsProducer.GetStyles: TcxSchedulerReportLinkStyles; -begin - Result := Style.VisualStyles; -end; - -{ TcxSchedulerReportDailyCellsProducer } - -procedure TcxSchedulerReportDailyCellsProducer.AfterCalculatePage; -begin - FRulerSite := CreateTimeRulerSite; - SetCellViewParams(FRulerSite, Styles.GetTimeRulerParams); -{ FRulerSite.Transparent := - Style.ReportLink.OptionsFormatting.SuppressContentColoration;} - inherited AfterCalculatePage; -end; - -procedure TcxSchedulerReportDailyCellsProducer.BeforeCalculatePage; -begin - Site.CellSides := csAll; - inherited BeforeCalculatePage; -end; - -procedure TcxSchedulerReportDailyCellsProducer.ConvertSchedulerCellToPSCells( - AItem: TcxSchedulerCustomViewInfoItem; - AReportItemClass: TcxSchedulerReportCustomCellClass); -begin - if AReportItemClass = TcxSchedulerReportDailyTimeRulerCell then - SetCellViewParams(AReportItemClass.CreateFrom(FRulerSite, AItem), AItem.ViewParams) - else - inherited ConvertSchedulerCellToPSCells(AItem, AReportItemClass); -end; - -function TcxSchedulerReportDailyCellsProducer.CreateTimeRulerSite: TcxSchedulerReportDailyTimeRulerCellsSite; -begin - Result := TcxSchedulerReportDailyTimeRulerCellsSite.Create(FSite); - Result.Transparent := True; - Result.ClipChildren := True; -end; - -// registration unit part - -procedure RegisterMirrorClasses; -begin - MirrorClasses := TList.Create; - TcxSchedulerReportContentCell.RegisterMirrorClass; - TcxSchedulerReportHeaderItemCell.RegisterMirrorClass; - TcxSchedulerReportGroupSeparatorCell.RegisterMirrorClass; - TcxSchedulerReportContainerCell.RegisterMirrorClass; - TcxSchedulerReportDailyTimeRulerCell.RegisterMirrorClass; -// TcxSchedulerReportEventCell.RegisterMirrorClass; - TcxSchedulerReportMonthDayCell.RegisterMirrorClass; - TcxSchedulerReportBackgroundSlotCell.RegisterMirrorClass; -end; - -procedure UnRegisterMirrorClasses; -begin - MirrorClasses.Free; -end; - -function GetFontFolder : string; -var - APIDL: PItemIDList; - APath: array[0..MAX_PATH] of Char; - AMalloc: IMalloc; -begin - Result := ''; - if ShGetSpecialFolderLocation(Application.Handle, CSIDL_FONTS, APIDL) = S_OK then - begin - if ShGetPathFromIDList(APIDL, APath) then - Result := APath; - if Succeeded(SHGetMalloc(AMalloc)) then - AMalloc.Free(APIDL); - end; -end; - -procedure RegisterReportLinkClasses; -begin - RegisterClasses([TcxSchedulerReportLinkStyles]); - - TcxSchedulerReportSchedulingAreaCell.Register; - TcxSchedulerReportNotesAreaCell.Register; - TcxSchedulerReportTaskPadCell.Register; - TcxSchedulerReportSchedulerHeaderCell.Register; - TcxSchedulerReportSchedulerHeaderDataCell.Register; - - //datenavigator - TcxSchedulerReportDateNavigatorCell.Register; - TcxSchedulerReportDateNavigatorHeader.Register; - TcxSchedulerReportDateNavigatorDay.Register; - TcxSchedulerReportDateNavigatorDayCaption.Register; - TcxSchedulerReportDateNavigatorWeekNumber.Register; - - //scheduling area items - TcxSchedulerReportContentCell.Register; - TcxSchedulerReportHeaderItemCell.Register; - TcxSchedulerReportGroupSeparatorCell.Register; - TcxSchedulerReportContainerCell.Register; - TcxSchedulerReportBackgroundSlotCell.Register; - TcxSchedulerReportDailyTimeRulerCellsSite.Register; - TcxSchedulerReportDailyTimeRulerCell.Register; - TcxSchedulerReportMonthDayCell.Register; - - TcxSchedulerReportEventCell.Register; - TcxSchedulerReportDetailsEventCell.Register; - TcxSchedulerReportMemoEventCell.Register; - - TcxSchedulerReportTimeLineCell.Register; - TcxSchedulerReportTimeLinePart.Register; - - TcxSchedulerReportPageSite.Register; - - dxPSRegisterReportLink(TcxSchedulerReportLink, - TcxScheduler, TcxfmSchedulerReportLinkDesignWindow); -end; - -type - TAddFontMemResource = function (p1: Pointer; p2: DWORD; p3: PDesignVector; p4: LPDWORD): THandle; stdcall; - TRemoveFontMemResource = function (p1: THandle): BOOL; stdcall; - -var - GDI32Lib: HMODULE; - AddFontMemResource: TAddFontMemResource; - RemoveFontMemResource: TRemoveFontMemResource; - -procedure InitializeSchedulerLink; - - function LoadImagesFromResource(AWidth, AHeight: Integer; - const AResourceName: string): TImageList; - begin - Result := TImageList.Create(nil); - Result.Width := AWidth; - Result.Height := AHeight; - Result.Handle := ImageList_LoadImage(HInstance, PAnsiChar(AResourceName), AWidth, - AHeight, CLR_DEFAULT, IMAGE_BITMAP, LR_DEFAULTCOLOR); - end; - -var - Res : TResourceStream; - Count: DWORD; -begin - RegisterMirrorClasses; - // images loading - StyleImages := LoadImagesFromResource(58, 31, IDB_DXPSSCHEDULER_SMALLDESIGNPREVIEW); - StylePreviewImages := LoadImagesFromResource(128, 76, IDB_DXPSSCHEDULER_STYLEDESIGNPREVIEW); - - // font loading - GDI32Lib := LoadLibrary(gdi32); - AddFontMemResource := GetProcAddress(GDI32Lib, 'AddFontMemResourceEx'); - RemoveFontMemResource := GetProcAddress(GDI32Lib, 'RemoveFontMemResourceEx'); - Res := TResourceStream.Create(hInstance, 'SCHEDULERFONT', 'PSSCHEDULERFONT'); - try - if IsWin2KOrLater then - SchedulerFontHandle := AddFontMemResource(Res.Memory, Res.Size, nil, @Count) - else - begin - SchedulerFontFileName := GetFontFolder + '\' + 'dxPScxSchedulerLnk.ttf'; - Res.SavetoFile(SchedulerFontFileName); - AddFontResource(PChar(SchedulerFontFileName)); - end; - finally - Res.Free; - end; - SpecialSymbolFont := TFont.Create; - SpecialSymbolFont.Name := 'dxPScxScheduler'; - RegisterReportLinkClasses; -end; - -procedure UnregisterReportLinkClasses; -begin - TcxSchedulerReportSchedulingAreaCell.Unregister; - TcxSchedulerReportNotesAreaCell.Unregister; - TcxSchedulerReportTaskPadCell.Unregister; - TcxSchedulerReportSchedulerHeaderCell.Unregister; - TcxSchedulerReportSchedulerHeaderDataCell.Unregister; - //datenavigator - TcxSchedulerReportDateNavigatorCell.Unregister; - TcxSchedulerReportDateNavigatorHeader.Unregister; - TcxSchedulerReportDateNavigatorDay.Unregister; - TcxSchedulerReportDateNavigatorDayCaption.Unregister; - TcxSchedulerReportDateNavigatorWeekNumber.Unregister; - - //scheduling area items - TcxSchedulerReportContentCell.Unregister; - TcxSchedulerReportHeaderItemCell.Unregister; - TcxSchedulerReportGroupSeparatorCell.Unregister; - TcxSchedulerReportContainerCell.Unregister; - TcxSchedulerReportBackgroundSlotCell.Unregister; - TcxSchedulerReportDailyTimeRulerCellsSite.Unregister; - TcxSchedulerReportDailyTimeRulerCell.Unregister; - TcxSchedulerReportMonthDayCell.Unregister; - - TcxSchedulerReportEventCell.Unregister; - TcxSchedulerReportDetailsEventCell.Unregister; - TcxSchedulerReportMemoEventCell.Unregister; - - TcxSchedulerReportTimeLineCell.Unregister; - TcxSchedulerReportTimeLinePart.Unregister; - - TcxSchedulerReportPageSite.Unregister; - - dxPSUnregisterReportLink(TcxSchedulerReportLink, - TcxScheduler, TcxfmSchedulerReportLinkDesignWindow); - UnRegisterClasses([TcxSchedulerReportLinkStyles]); - UnRegisterMirrorClasses; -end; - -procedure FinalizeSchedulerLink; -begin - // images removing - FreeAndNil(StyleImages); - FreeAndNil(StylePreviewImages); - - // font removing - if IsWin2KOrLater then - begin - if SchedulerFontHandle <> 0 then - RemoveFontMemResource(SchedulerFontHandle); - end - else - begin - RemoveFontResource(PChar(SchedulerFontFileName)); - DeleteFile(PChar(SchedulerFontFileName)); - end; - - SpecialSymbolFont.Free; - FreeLibrary(GDI32Lib); - - UnregisterReportLinkClasses; -end; - -initialization - InitializeSchedulerLink; - -finalization - FinalizeSchedulerLink; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnk.res b/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnk.res deleted file mode 100644 index 574c0437..00000000 Binary files a/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnk.res and /dev/null differ diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnkReg.pas deleted file mode 100644 index 5f3e9069..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxSchedulerLnkReg.pas +++ /dev/null @@ -1,165 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxSchedulerLnkReg; - -interface - -{$I cxVer.Inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes, TypInfo, cxStyles, cxStyleSheetEditor, dxPSCore, dxPScxSchedulerLnk; - -const - sdxAllResources = '(All resources)'; - sdxAuto = 'Auto'; - sdxDefault = 'Default'; - sdxTypeDefault = '(Type "Default" to restore original Caption)'; - -{ TcxSchedulerReportLinkActiveStylePropertyEditor } - -type - - TcxSchedulerReportLinkResourceCountPerPagePropertyEditor = class(TIntegerProperty) - public - function GetValue: string; override; - end; - - { TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor } - - TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor = class(TComponentProperty) - private - FComponents: TStringList; - function GetReportLink: TBasedxReportLink; - protected - procedure AddComponent(const AName: string); - procedure GetComponents; virtual; - function IsComponentValid(AComponent: TComponent): Boolean; virtual; - public - destructor Destroy; override; - procedure Initialize; override; - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - property ReportLink: TBasedxReportLink read GetReportLink; - end; - -{ TcxSchedulerReportLinkResourceCountPerPagePropertyEditor } - -function TcxSchedulerReportLinkResourceCountPerPagePropertyEditor.GetValue: string; -begin - Result := inherited GetValue; - if GetOrdValue = 0 then - Result := Result + ' ' + sdxAllResources; -end; - -{ TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor } - -destructor TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.Destroy; -begin - FComponents.Free; - inherited Destroy; -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.Initialize; -begin - inherited; - FComponents := TStringList.Create; -end; - -function TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes - [paMultiSelect]; -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - GetComponents; - for I := 0 to FComponents.Count - 1 do - Proc(FComponents[I]); -end; - -function TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetReportLink: TBasedxReportLink; -begin - Result := TBasedxReportLink(GetComponent(0)); -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.AddComponent(const AName: string); -begin - if IsComponentValid(Designer.GetComponent(AName)) then FComponents.Add(AName); -end; - -procedure TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.GetComponents; -begin - FComponents.Clear; - Designer.GetComponentNames(GetTypeData(PTypeInfo(TBasedxReportLink.ClassInfo)), AddComponent); -end; - -function TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor.IsComponentValid(AComponent: TComponent): Boolean; -begin - Result := (AComponent <> GetComponent(0)) and TBasedxReportLink(AComponent).Aggregable; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterNoIcon([TcxSchedulerReportLink, TcxSchedulerReportLinkStyleSheet]); - - RegisterPropertyEditor(TypeInfo(Integer), TcxCustomSchedulerReportLinkPrintStyle, - 'ResourceCountPerPage', TcxSchedulerReportLinkResourceCountPerPagePropertyEditor); - RegisterPropertyEditor(TypeInfo(TBasedxReportLink), TcxSchedulerReportLink, - 'TaskPadReportLink', TcxSchedulerReportLinkTaskPadReportLinkPropertyEditor); -end; - -initialization - cxStyles.RegisterStyleSheetClass(TcxSchedulerReportLinkStyleSheet); - -finalization - cxStyles.UnregisterStyleSheetClass(TcxSchedulerReportLinkStyleSheet); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5Lnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5Lnk.dfm deleted file mode 100644 index 33fc186c..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5Lnk.dfm +++ /dev/null @@ -1,1587 +0,0 @@ -object dxfmTreeListReportLinkDesignWindow: TdxfmTreeListReportLinkDesignWindow - Left = 426 - Top = 272 - BorderStyle = bsDialog - Caption = 'Property Sheets' - ClientHeight = 391 - ClientWidth = 624 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 618 - Height = 353 - ActivePage = tshStyles - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 8 - Top = 34 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 12 - Width = 253 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 166 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object imgOnEveryPage: TImage - Left = 8 - Top = 192 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlOnEveryPage: TBevel - Left = 90 - Top = 171 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object bvlWarningHost: TBevel - Left = 5 - Top = 251 - Width = 293 - Height = 70 - Visible = False - end - object Bevel2: TBevel - Left = 90 - Top = 91 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object chbxShowBands: TCheckBox - Left = 90 - Top = 26 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowHeaders: TCheckBox - Tag = 1 - Left = 90 - Top = 47 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 1 - OnClick = OptionsViewClick - end - object chbxShowFooters: TCheckBox - Tag = 2 - Left = 90 - Top = 68 - Width = 200 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 3 - Left = 90 - Top = 124 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 4 - OnClick = OptionsViewClick - end - object chbxBandsOnEveryPage: TCheckBox - Left = 90 - Top = 184 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 6 - OnClick = OptionsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Tag = 1 - Left = 90 - Top = 205 - Width = 200 - Height = 17 - Caption = 'Headers' - TabOrder = 7 - OnClick = OptionsOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Tag = 2 - Left = 90 - Top = 226 - Width = 200 - Height = 17 - Caption = 'Footers' - TabOrder = 8 - OnClick = OptionsOnEveryPageClick - end - object chbxShowTreeLines: TCheckBox - Tag = 4 - Left = 90 - Top = 145 - Width = 200 - Height = 17 - Caption = 'TreeLines' - TabOrder = 5 - OnClick = OptionsViewClick - end - object chbxShowBorders: TCheckBox - Tag = 5 - Left = 90 - Top = 103 - Width = 200 - Height = 17 - Caption = 'Borders' - TabOrder = 3 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 305 - Top = 0 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 9 - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object pnlBehaviors: TPanel - Left = 0 - Top = 0 - Width = 299 - Height = 325 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object pnlSelection: TPanel - Left = 0 - Top = 0 - Width = 299 - Height = 75 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblSelection: TLabel - Left = 5 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object imgSelection: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlSelection: TBevel - Left = 57 - Top = 12 - Width = 239 - Height = 4 - Shape = bsBottomLine - end - object chbxProcessSelection: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = 'Process Selection' - TabOrder = 0 - OnClick = OptionsSelectionClick - end - object chbxProcessExactSelection: TCheckBox - Tag = 1 - Left = 90 - Top = 51 - Width = 205 - Height = 17 - Caption = 'Process Exact Selection' - TabOrder = 1 - OnClick = OptionsSelectionClick - end - end - object pnlExpanding: TPanel - Left = 0 - Top = 75 - Width = 299 - Height = 70 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblExpanding: TLabel - Left = 5 - Top = 8 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 13 - Width = 234 - Height = 4 - Shape = bsBottomLine - end - object chbxExpandNodes: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = 'Nodes' - TabOrder = 0 - OnClick = OptionsExpandingClick - end - object chbxExplicitlyExpandNodes: TCheckBox - Tag = 1 - Left = 90 - Top = 51 - Width = 205 - Height = 17 - Caption = 'Explicitly Expand Nodes' - TabOrder = 1 - OnClick = OptionsExpandingClick - end - end - object pnlSize: TPanel - Left = 0 - Top = 145 - Width = 299 - Height = 68 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object lblSize: TLabel - Left = 5 - Top = 8 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlSize: TBevel - Left = 33 - Top = 13 - Width = 262 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = '&Auto Width' - TabOrder = 0 - OnClick = OptionsSizeClick - end - end - object pnlSeparators: TPanel - Left = 0 - Top = 213 - Width = 299 - Height = 94 - Align = alTop - BevelOuter = bvNone - TabOrder = 3 - object lblSeparators: TLabel - Left = 5 - Top = 8 - Width = 53 - Height = 13 - Caption = 'Separators' - end - object bvlSeparator: TBevel - Left = 68 - Top = 13 - Width = 229 - Height = 4 - Shape = bsBottomLine - end - object lblSeparatorsThickness: TLabel - Left = 90 - Top = 38 - Width = 50 - Height = 13 - Caption = 'Thickness:' - end - object lblSeparatorsColor: TLabel - Left = 90 - Top = 67 - Width = 29 - Height = 13 - Caption = 'Color:' - end - object bvlSeparatorThicknessHost: TBevel - Left = 152 - Top = 34 - Width = 80 - Height = 21 - end - object bvlSeparatorColorHost: TBevel - Left = 152 - Top = 62 - Width = 143 - Height = 21 - end - object imgSeparators: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000000000F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0F77FFF8F777F8F777F0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F00FFF8F00FF8F000F0 - F07DD0F08888888888888888880F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F0000F8F000F8F000F0 - F07DD0F0F00FFF8F00FF8F00FF0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCDCCDDD0F00000000000000000000 - F07DD0F08888888888888888880F07DDCCCCCCCCDD0F00000000000000000000 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8F000F8F000F0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F000FF8F000F8F00FF0 - F07DD0F0F00FFF8F000F8F000F0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCDDDDCDDDD0F00000000000000000000 - F07DD0F08888888888888888880F07DDCCCCDCCDDD0F00000000000000000000 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8F0FFF8F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00FFF8F000F8F000F0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F07777777777777777770F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F888887F88887F88880F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F800087F80087F80080F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFFFF7FFFFF7FFFFF0F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000000000807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - end - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 12 - Width = 211 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 7 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 83 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 37 - Width = 202 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnChange = LookAndFeelChange - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 145 - Width = 210 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementsClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 122 - Width = 210 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementsClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 100 - Width = 210 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementsClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 210 - Height = 17 - Caption = 'Suppress Background Textures' - TabOrder = 4 - OnClick = OptionsFormattingClick - end - object chbxConsumeSelectionStyle: TCheckBox - Tag = 2 - Left = 90 - Top = 204 - Width = 210 - Height = 17 - Caption = 'Consume Selection Style' - TabOrder = 5 - OnClick = OptionsFormattingClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 4 - object bvlStyles: TBevel - Left = 115 - Top = 13 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 249 - Width = 224 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 246 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 214 - Height = 173 - end - object Label1: TLabel - Left = 79 - Top = 110 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 229 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 229 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 229 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Texture...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = OptionsFormattingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 265 - Width = 288 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 297 - Width = 68 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 79 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 153 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 116 - Top = 213 - Width = 104 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 226 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 229 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Clear' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 213 - Width = 105 - Height = 23 - Caption = 'Restore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 2 - object lblPreviewOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPreviewOptions: TBevel - Left = 54 - Top = 12 - Width = 242 - Height = 5 - Shape = bsBottomLine - end - object lblPreviewMaxLineCount: TLabel - Left = 90 - Top = 75 - Width = 78 - Height = 13 - Caption = 'Max Line Count:' - end - object bvlPreviewMaxLineCountHost: TBevel - Left = 215 - Top = 71 - Width = 68 - Height = 21 - Visible = False - end - object imgPreview: TImage - Left = 8 - Top = 33 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F07DDDDDD0F7FC9F77777777777777F7F0 - 7DDDDDD0F7F9CF77777777777777F7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FC9F77777777777777F7F07DDDDDD0F7F9CF77777777777777F7F0 - 7DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxPreviewVisible: TCheckBox - Left = 90 - Top = 30 - Width = 207 - Height = 17 - Caption = 'Visible' - TabOrder = 0 - OnClick = PreviewVisibleClick - end - object chbxPreviewAutoHeight: TCheckBox - Left = 90 - Top = 51 - Width = 207 - Height = 17 - Caption = 'Auto Height' - TabOrder = 1 - OnClick = PreviewAutoHeightClick - end - end - end - object pnlPreview: TPanel - Left = 313 - Top = 44 - Width = 300 - Height = 304 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewTreeList: TcxTreeList - Left = 5 - Top = 5 - Width = 291 - Height = 294 - Bands = < - item - Caption.Text = 'Manufacturer Data' - Width = 173 - end - item - Caption.Text = 'Car Data' - Width = 116 - end> - DefaultRowHeight = 17 - Enabled = False - OptionsView.CellAutoHeight = True - OptionsView.ScrollBars = ssNone - OptionsView.Bands = True - OptionsView.ColumnAutoWidth = True - OptionsView.GridLines = tlglBoth - OptionsView.UseNodeColorForIndent = False - Preview.Column = colManufacturerCountry - TabOrder = 0 - OnCustomDrawBandHeaderCell = PreviewTreeListCustomDrawBandHeaderCell - OnCustomDrawDataCell = PreviewTreeListCustomDrawDataCell - OnCustomDrawFooterCell = PreviewTreeListCustomDrawFooterCell - OnCustomDrawHeaderCell = PreviewTreeListCustomDrawHeaderCell - object colManufacturerName: TcxTreeListColumn - Caption.Text = 'Name' - DataBinding.ValueType = 'String' - Width = 113 - Position.ColIndex = 0 - Position.RowIndex = 0 - Position.BandIndex = 0 - Summary.FooterSummaryItems = <> - Summary.GroupFooterSummaryItems = <> - end - object colManufacturerLogo: TcxTreeListColumn - Caption.Text = 'Logo' - DataBinding.ValueType = 'String' - Width = 60 - Position.ColIndex = 1 - Position.RowIndex = 0 - Position.BandIndex = 0 - Summary.FooterSummaryItems = <> - Summary.GroupFooterSummaryItems = <> - end - object colManufacturerCountry: TcxTreeListColumn - Caption.Text = 'Country' - DataBinding.ValueType = 'String' - Width = 167 - Position.ColIndex = 2 - Position.RowIndex = 0 - Position.BandIndex = 0 - Summary.FooterSummaryItems = <> - Summary.GroupFooterSummaryItems = <> - end - object colCarModel: TcxTreeListColumn - Caption.Text = 'Model' - DataBinding.ValueType = 'String' - Width = 86 - Position.ColIndex = 0 - Position.RowIndex = 0 - Position.BandIndex = 1 - Summary.FooterSummaryItems = <> - Summary.GroupFooterSummaryItems = <> - end - object colCarIsSUV: TcxTreeListColumn - Caption.Text = 'SUV' - DataBinding.ValueType = 'String' - Width = 30 - Position.ColIndex = 1 - Position.RowIndex = 0 - Position.BandIndex = 1 - Summary.FooterSummaryItems = <> - Summary.GroupFooterSummaryItems = <> - end - end - end - object cxStyleRepository1: TcxStyleRepository - Left = 4 - Top = 362 - PixelsPerInch = 96 - object styleBandHeaders: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - end - object styleStandard: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object stylePreview: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlue - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object styleCardShadow: TcxStyle - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 32 - Top = 362 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - ShortCut = 16454 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Texture...' - ImageIndex = 1 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 60 - Top = 362 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5Lnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5Lnk.pas deleted file mode 100644 index 41f3a162..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5Lnk.pas +++ /dev/null @@ -1,9144 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxTL5Lnk; - -interface - -{$I cxVer.inc} - -uses - Windows, SysUtils, Messages, Classes, Graphics, Controls, StdCtrls, ComCtrls, - ExtCtrls, ImgList, Menus, Dialogs, ExtDlgs, Contnrs, Types, cxClasses, cxControls, - cxGraphics, cxGeometry, cxStyles, cxLookAndFeels, cxLookAndFeelPainters, cxEdit, - cxTextEdit, cxInplaceContainer, cxTL, cxDBTL, cxTLData, cxCustomData, dxExtCtrls, - dxBase, dxPSSngltn, dxPrnPg, dxPSCore, dxPScxCommon; - -const - vspsTreeListFirst = 0; - vspsTreeListBandHeader = vspsTreeListFirst + 0; - vspsTreeListContent = vspsTreeListFirst + 1; - vspsTreeListContentEven = vspsTreeListFirst + 2; - vspsTreeListContentOdd = vspsTreeListFirst + 3; - vspsTreeListFooter = vspsTreeListFirst + 4; - vspsTreeListFooterRow = vspsTreeListFirst + 5; - vspsTreeListHeader = vspsTreeListFirst + 6; - vspsTreeListIndent = vspsTreeListFirst + 7; - vspsTreeListPreview = vspsTreeListFirst + 8; - vspsTreeListSelection = vspsTreeListFirst + 9; - vspsTreeListBandBackground = vspsTreeListFirst + 10; - vspsTreeListLast = vspsTreeListBandBackground; - - cxTreeListAttributeIDBase = 0; - cxTreeListUndefinedID = cxTreeListAttributeIDBase + 0; - cxTreeListBandID = cxTreeListAttributeIDBase + 1; - cxTreeListFooterID = cxTreeListAttributeIDBase + 2; - cxTreeListHeaderID = cxTreeListAttributeIDBase + 3; - cxTreeListIndentID = cxTreeListAttributeIDBase + 4; - cxTreeListNodeID = cxTreeListAttributeIDBase + 5; - -type - TcxTreeListNodeClass = class of TcxTreeListNode; - - TcxTreeListCustomReportLink = class; - TdxfmTreeListReportLinkDesignWindow = class; - - TcxTreeListAttributeHostInfo = class; - TcxTreeListAdapterClass = class of TcxTreeListAdapter; - TcxTreeListAdapter = class; - TcxTreeListReportLinkFormatterClass = class of TcxTreeListReportLinkFormatter; - TcxTreeListReportLinkFormatter = class; - TcxTreeListReportLinkBuilderClass = class of TcxTreeListReportLinkBuilder; - TcxTreeListReportLinkBuilder = class; - - TcxTreeListAttributeClass = class of TcxTreeListAttribute; - TcxTreeListAttribute = class end; - TcxTreeListBandAttribute = class(TcxTreeListAttribute); - TcxTreeListNodeAttribute = class(TcxTreeListAttribute); - TcxTreeListFooterAttribute = class(TcxTreeListAttribute); - TcxTreeListHeaderAttribute = class(TcxTreeListAttribute); - TcxTreeListIndentsRowAttribute = class(TcxTreeListAttribute); - - TcxTreeListColumnPlace = class; - TcxTreeListCustomBandPlace = class; - TcxTreeListBandPlace = class; - TcxTreeListItemPlaceController = class; - - TcxTreeListAttributeID = type Integer; - - TcxTreeListCellCustomDrawInfo = record - AttributeID: TcxTreeListAttributeID; - Band: TcxTreeListBand; - Column: TcxTreeListColumn; - Node: TcxTreeListNode; - Index: Integer; - end; - - { producers } - - TcxTreeListReportLinkRowProducerClass = class of TcxTreeListReportLinkRowProducer; - - TcxTreeListReportLinkRowProducer = class - private - FBuilder: TcxTreeListReportLinkBuilder; - FHost: TdxReportCell; - FRow: TdxReportCell; - FRowHeight: Integer; - function GetDC: HDC; - function GetIndentWidth: Integer; - function GetRowWidth: Integer; - protected - procedure AfterCalculateRowHeight; virtual; - procedure CalculateRowAutoHeight; virtual; - procedure CalculateRowHeight; virtual; - procedure CreateRow; virtual; - procedure CreateRowHost(const AHostInfo: TcxTreeListAttributeHostInfo); virtual; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; virtual; - procedure FixupRowDataHeight; virtual; - procedure FixupRowHeight; virtual; - procedure FixupRowItselfHeight; virtual; - procedure InitializeRow; virtual; - - function GetAutoHeight: Boolean; virtual; - function GetLineCount: Integer; virtual; - function GetLineHeight: Integer; virtual; - - property DC: HDC read GetDC; - public - constructor Create(ABuilder: TcxTreeListReportLinkBuilder); virtual; - - function Adapter: TcxTreeListAdapter; overload; virtual; - function Builder: TcxTreeListReportLinkBuilder; overload; virtual; - function Formatter: TcxTreeListReportLinkFormatter; overload; virtual; - - function Produce(AHostInfo: TcxTreeListAttributeHostInfo): TdxReportCell; virtual; - - property AutoHeight: Boolean read GetAutoHeight; - property Host: TdxReportCell read FHost; - property IndentWidth: Integer read GetIndentWidth; - property LineCount: Integer read GetLineCount; - property LineHeight: Integer read GetLineHeight; - property Row: TdxReportCell read FRow; - property RowHeight: Integer read FRowHeight write FRowHeight; - property RowWidth: Integer read GetRowWidth; - end; - - TcxTreeListReportLinkNodeSeparatorProducerClass = class of TcxTreeListReportLinkNodeSeparatorProducer; - - TcxTreeListReportLinkNodeSeparatorProducer = class(TcxTreeListReportLinkRowProducer) - private - FItem: TAbstractdxReportCellData; - protected - procedure InitializeItem; virtual; - procedure InitializeRow; override; - - function GetAutoHeight: Boolean; override; - function GetItemClass: TdxReportCellDataClass; virtual; - function GetLineHeight: Integer; override; - public - function Produce(AHostInfo: TcxTreeListAttributeHostInfo): TdxReportCell; override; - end; - - TcxTreeListReportLinkRowSubItemsProducerClass = class of TcxTreeListReportLinkRowSubItemsProducer; - - TcxTreeListReportLinkRowSubItemsProducer = class(TcxTreeListReportLinkRowProducer) - private - function GetColumn(Index: Integer): TcxTreeListColumn; - protected - procedure CreateDataItems(AParent: TdxReportCell); virtual; - procedure CreateRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - - function GetHasSubItem(Index: Integer): Boolean; virtual; - function GetSubItemBound(Index: Integer): TRect; virtual; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; virtual; abstract; - function GetSubItemCount: Integer; virtual; - public - property Columns[Index: Integer]: TcxTreeListColumn read GetColumn; - property HasSubItem[Index: Integer]: Boolean read GetHasSubItem; - property SubItemBounds[Index: Integer]: TRect read GetSubItemBound; - property SubItemClasses[Index: Integer]: TdxReportCellDataClass read GetSubItemClass; - property SubItemCount: Integer read GetSubItemCount; - end; - - TcxTreeListReportLinkBandsProducerClass = class of TcxTreeListReportLinkBandsProducer; - - TcxTreeListReportLinkBandsProducer = class(TcxTreeListReportLinkRowSubItemsProducer) - protected - procedure CalculateRowHeight; override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AnIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - function GetSubItemCount: Integer; override; - end; - - TcxTreeListReportLinkFootersProducerClass = class of TcxTreeListReportLinkFootersProducer; - - TcxTreeListReportLinkBandedRowProducer = class(TcxTreeListReportLinkRowProducer) - private - FIndents: TList; - function GetIndent(Index: Integer): TdxReportCellExpandButton; - protected - procedure AfterCalculateRowHeight; override; - procedure CreateBandedDataItems(AParent: TdxReportCell); virtual; - procedure CreateBandedRows(AParent: TdxReportCell); virtual; - procedure CreateIndents(AParent: TdxReportCell); virtual; - procedure CreateIndentsRow(AParent: TdxReportCell); virtual; - procedure CreateRow; override; - - function GetBandedDataItemBounds(AItem: TAbstractdxReportCellData): TRect; virtual; - function GetBandedDataItemClass(AColumn: TcxTreeListColumn): TdxReportCellDataClass; virtual; - function GetBandedRowIndent: Integer; virtual; - - function GetIndentArea: Integer; virtual; - function GetIndentBound(AIndex: Integer): TRect; virtual; - function GetIndentCount: Integer; virtual; - - procedure InitializeBandedDataItem(AItem: TAbstractdxReportCellData); virtual; - procedure InitializeBandedRow(ARow: TdxReportCell); virtual; - procedure InitializeIndent(AnIndent: TdxReportCellExpandButton; AnIndex: Integer); virtual; - - property IndentArea: Integer read GetIndentArea; - property IndentBounds[Index: Integer]: TRect read GetIndentBound; - property IndentCount: Integer read GetIndentCount; - property Indents[Index: Integer]: TdxReportCellExpandButton read GetIndent; - public - constructor Create(ABuilder: TcxTreeListReportLinkBuilder); override; - destructor Destroy; override; - function Produce(AHostInfo: TcxTreeListAttributeHostInfo): TdxReportCell; override; - end; - - TcxTreeListReportLinkFootersProducer = class(TcxTreeListReportLinkBandedRowProducer) - private - FAttachedNode: TcxTreeListNode; - FDataNode: TcxTreeListNode; - protected - procedure CreateBandedDataItems(AParent: TdxReportCell); override; - function GetAutoHeight: Boolean; override; - function GetBandedRowIndent: Integer; override; - function GetIndentCount: Integer; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - procedure InitializeBandedRow(ARow: TdxReportCell); override; - procedure InitializeIndent(AnIndent: TdxReportCellExpandButton; AnIndex: Integer); override; - procedure InitializeRow; override; - public - function Produce(AHostInfo: TcxTreeListAttributeHostInfo; AAttachedNode, - ADataNode: TcxTreeListNode): TdxReportCell; reintroduce; virtual; - end; - - TcxTreeListReportLinkHeadersProducerClass = class of TcxTreeListReportLinkHeadersProducer; - - TcxTreeListReportLinkHeadersProducer = class(TcxTreeListReportLinkRowSubItemsProducer) - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AnIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - end; - - TcxTreeListReportLinkNodeProducerClass = class of TcxTreeListReportLinkNodeProducer; - - TcxTreeListReportLinkNodeProducer = class(TcxTreeListReportLinkBandedRowProducer) - private - FCheck: TdxCustomReportCellCheck; - FImage: TdxReportCellGraphic; - FNode: TcxTreeListNode; - FPreviewItem: TAbstractdxReportCellData; - FStateImage: TdxReportCellGraphic; - function GetCheckIndentIndex: Integer; - function GetImageIndentIndex: Integer; - function GetPreviewColumn: TcxTreeListColumn; - function GetPreviewPlace: TcxTreeListPreviewPlace; - function GetStateImageIndentIndex: Integer; - protected - procedure CalculateRowAutoHeight; override; - procedure CreateChecks(AParent: TdxReportCell); virtual; - procedure CreateIcons(AParent: TdxReportCell); virtual; - procedure CreateImages(AParent: TdxReportCell); virtual; - procedure CreateIndents(AParent: TdxReportCell); override; - procedure CreatePreview(AParent: TdxReportCell); virtual; - procedure CreateRow; override; - procedure CreateStateImages(AParent: TdxReportCell); virtual; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; override; - procedure FixupRowDataHeight; override; - procedure InitializeBandedDataItem(AItem: TAbstractdxReportCellData); override; - procedure InitializeBandedRow(ARow: TdxReportCell); override; - procedure InitializeCheck; virtual; - procedure InitializeImage(AnIndex: Integer); virtual; - procedure InitializeIndent(AnIndent: TdxReportCellExpandButton; AnIndex: Integer); override; - procedure InitializeRow; override; - procedure InitializeStateImage(AnIndex: Integer); virtual; - function IsItemIndent(AnItem: TdxReportVisualItem): Boolean; - - function GetAutoHeight: Boolean; override; - function GetBandedDataItemBounds(AItem: TAbstractdxReportCellData): TRect; override; - function GetBandedDataItemClass(AColumn: TcxTreeListColumn): TdxReportCellDataClass; override; - function GetBandedRowIndent: Integer; override; - function GetCellAutoHeight: Boolean; virtual; - function GetCheckRect: TRect; virtual; - function GetHasPreview: Boolean; virtual; - function GetImageRect: TRect; virtual; - function GetIndentCount: Integer; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetPreviewHeight: Integer; virtual; - function GetPreviewIndent: Integer; virtual; - function GetPreviewLineCount: Integer; virtual; - function GetPreviewLineHeight: Integer; virtual; - function GetStateImageRect: TRect; virtual; - public - function Produce(AHostInfo: TcxTreeListAttributeHostInfo; - ANode: TcxTreeListNode): TdxReportCell; reintroduce; virtual; - - property CellAutoHeight: Boolean read GetCellAutoHeight; - property CheckIndentIndex: Integer read GetCheckIndentIndex; - property CheckRect: TRect read GetCheckRect; - property HasPreview: Boolean read GetHasPreview; - property Image: TdxReportCellGraphic read FImage; - property ImageIndentIndex: Integer read GetImageIndentIndex; - property ImageRect: TRect read GetImageRect; - property PreviewColumn: TcxTreeListColumn read GetPreviewColumn; - property PreviewHeight: Integer read GetPreviewHeight; - property PreviewIndent: Integer read GetPreviewIndent; - property PreviewItem: TAbstractdxReportCellData read FPreviewItem; - property PreviewLineCount: Integer read GetPreviewLineCount; - property PreviewLineHeight: Integer read GetPreviewLineHeight; - property PreviewPlace: TcxTreeListPreviewPlace read GetPreviewPlace; - property StateImage: TdxReportCellGraphic read FStateImage; - property StateImageIndentIndex: Integer read GetStateImageIndentIndex; - property StateImageRect: TRect read GetStateImageRect; - end; - - TcxTreeListReportLinkCategorizedNodeProducer = class(TcxTreeListReportLinkNodeProducer) - protected - procedure CreateBandedRows(AParent: TdxReportCell); override; - end; - - { helpers } - - TcxTreeListNodeHelperClass = class of TcxTreeListNodeHelper; - - TcxTreeListNodeHelper = class(TdxCustomClassMapItem) - private - FAdapter: TcxTreeListAdapter; - FNode: TcxTreeListNode; - protected - function Adapter: TcxTreeListAdapter; overload; virtual; - class function NodeClass: TcxTreeListNodeClass; virtual; - - function GetHasSelectedChildren: Boolean; virtual; - function GetHasSelectedParents: Boolean; virtual; - public - constructor Create(AnAdapter: TcxTreeListAdapter); virtual; - - class function PairClass: TClass; override; - class function ProducerClass: TcxTreeListReportLinkNodeProducerClass; virtual; - class procedure Register; - class procedure Unregister; - - property HasSelectedChildren: Boolean read GetHasSelectedChildren; - property HasSelectedParents: Boolean read GetHasSelectedParents; - property Node: TcxTreeListNode read FNode write FNode; - end; - - TcxTreeListNodeHelperCache = class(TdxCustomCache) - private - FAdapter: TcxTreeListAdapter; - function GetHelper(Node: TcxTreeListNode): TcxTreeListNodeHelper; - function GetItem(Index: Integer): TcxTreeListNodeHelper; - protected - function IndexOf(Node: TcxTreeListNode): Integer; - property Items[Index: Integer]: TcxTreeListNodeHelper read GetItem; - public - constructor Create(AnAdapter: TcxTreeListAdapter); - - property Adapter: TcxTreeListAdapter read FAdapter; - property Helpers[Node: TcxTreeListNode]: TcxTreeListNodeHelper read GetHelper; default; - end; - - TcxTreeListReportLinkProducerCache = class(TdxCustomCache) - private - FBuilder: TcxTreeListReportLinkBuilder; - function GetItem(Index: Integer): TcxTreeListReportLinkRowProducer; - function GetProducer(ProducerClass: TcxTreeListReportLinkRowProducerClass): TcxTreeListReportLinkRowProducer; - protected - function IndexOf(AProducerClass: TcxTreeListReportLinkRowProducerClass): Integer; - property Items[Index: Integer]: TcxTreeListReportLinkRowProducer read GetItem; - public - constructor Create(ABuilder: TcxTreeListReportLinkBuilder); - property Builder: TcxTreeListReportLinkBuilder read FBuilder; - property Producers[ProducerClass: TcxTreeListReportLinkRowProducerClass]: TcxTreeListReportLinkRowProducer read GetProducer; default; - end; - - TcxTreeListReportLinkBuilder = class - private - FAdapter: TcxTreeListAdapter; - FFormatter: TcxTreeListReportLinkFormatter; - FProducerCache: TcxTreeListReportLinkProducerCache; - FReportLink: TcxTreeListCustomReportLink; - FReportRows: TList; - function GetHost: TdxReportCell; - function GetReportCells: TdxReportCells; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowCount: Integer; - function GetTreeList: TcxCustomTreeList; - protected - procedure AddReportRow(ARow: TdxReportCell); - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - { bands } - procedure CreateBands; virtual; - function GetBandsProducer: TcxTreeListReportLinkBandsProducer; - function GetBandsProducerClass: TcxTreeListReportLinkBandsProducerClass; virtual; - { footers } - procedure CreateFooters(AHostInfo: TcxTreeListAttributeHostInfo; - AAttachedNode, ADataNode: TcxTreeListNode); virtual; - function GetFootersProducer: TcxTreeListReportLinkFootersProducer; - function GetFootersProducerClass: TcxTreeListReportLinkFootersProducerClass; virtual; - { headers } - procedure CreateHeaders; virtual; - function GetHeadersProducer: TcxTreeListReportLinkHeadersProducer; - function GetHeadersProducerClass: TcxTreeListReportLinkHeadersProducerClass; virtual; - { nodes } - procedure CreateNode(ANode: TcxTreeListNode); virtual; - procedure CreateNodes; virtual; - function GetNodeProducer(ANode: TcxTreeListNode): TcxTreeListReportLinkNodeProducer; - function GetNodeProducerClass(ANode: TcxTreeListNode): TcxTreeListReportLinkNodeProducerClass; virtual; - { separators } - procedure CreateNodeSeparator(ANode: TcxTreeListNode); virtual; - function GetNodeSeparatorProducer: TcxTreeListReportLinkNodeSeparatorProducer; - function GetNodeSeparatorProducerClass: TcxTreeListReportLinkNodeSeparatorProducerClass; virtual; - - procedure DoBuild; virtual; - function IsAborted: Boolean; - - property ProducerCache: TcxTreeListReportLinkProducerCache read FProducerCache; - property ReportLink: TcxTreeListCustomReportLink read FReportLink; - public - constructor Create(AReportLink: TcxTreeListCustomReportLink); virtual; - destructor Destroy; override; - - procedure Build; virtual; - procedure Progress(const APercentDone: Double); - - function Adapter: TcxTreeListAdapter; overload; virtual; - class function AdapterClass: TcxTreeListAdapterClass; virtual; - function Formatter: TcxTreeListReportLinkFormatter; overload; virtual; - class function FormatterClass: TcxTreeListReportLinkFormatterClass; virtual; - - property Host: TdxReportCell read GetHost; - property ReportCells: TdxReportCells read GetReportCells; - property ReportRowCount: Integer read GetReportRowCount; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property TreeList: TcxCustomTreeList read GetTreeList; - end; - - TcxTreeListReportLinkBuilderHandler = class - private - FBuilder: TcxTreeListReportLinkBuilder; - function GetReportLink: TcxTreeListCustomReportLink; - public - constructor Create(ABuilder: TcxTreeListReportLinkBuilder); virtual; - function Builder: TcxTreeListReportLinkBuilder; overload; virtual; - - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - end; - - TcxTreeListAdapter = class(TcxTreeListReportLinkBuilderHandler) - private - FDetailsLineCount: Integer; - FFooterLineCount: Integer; - FGroupFooterLineCount: Integer; - FHelperCache: TcxTreeListNodeHelperCache; - FMultiRows: Boolean; - function GetAutoWidth: Boolean; - function GetBand(Index: Integer): TcxTreeListBand; - function GetBandCount: Integer; - function GetBottomBand(Index: Integer): TcxTreeListBand; - function GetBottomBandCount: Integer; - function GetCanUseLookAndFeelColors: Boolean; - function GetCategorizedColumn: TcxTreeListColumn; - function GetCellAutoHeight: Boolean; - function GetCellEndEllipsis: Boolean; - function GetCellMultiline: Boolean; - function GetColumn(Index: Integer): TcxTreeListColumn; - function GetColumnCount: Integer; - function GetDefaultRowHeight: Integer; - function GetFooterLineCount(ANode: TcxTreeListNode): Integer; - function GetGridLines: TcxTreeListGridLines; - function GetGridLinesColor: TColor; - function GetHasPreview: Boolean; - function GetHeaderAutoHeight: Boolean; - function GetHelper(Node: TcxTreeListNode): TcxTreeListNodeHelper; - function GetImages: TCustomImageList; - function GetIndentWidth: Integer; - function GetIsDefaultRowHeightAssigned: Boolean; - function GetIsNodeColorUsedForIndents: Boolean; - function GetLookAndFeelKind: TcxLookAndFeelKind; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetMultiSelection: Boolean; - function GetNode(Index: Integer): TcxTreeListNode; - function GetNodeCount: Integer; - function GetOptionsView: TcxTreeListOptionsView; - function GetPaintStyle: TcxTreeListPaintStyle; - function GetPreviewColumn: TcxTreeListColumn; - function GetPreviewLeftIndent: Integer; - function GetPreviewPlace: TcxTreeListPreviewPlace; - function GetPreviewRightIndent: Integer; - function GetRootBand(Index: Integer): TcxTreeListBand; - function GetRootBandCount: Integer; - function GetShowRoot: Boolean; - function GetShowHorzGridLines: Boolean; - function GetShowTreeLines: Boolean; - function GetShowVertGridLines: Boolean; - function GetStateImages: TCustomImageList; - function GetStyles: TcxTreeListStyles; - function GetThemedBandHeaderItemColor: TColor; - function GetThemedBandHeaderItemTextColor: TColor; - function GetThemedFooterItemColor: TColor; - function GetThemedFooterItemTextColor: TColor; - function GetThemedHeaderItemColor: TColor; - function GetThemedHeaderItemTextColor: TColor; - function GetThemedHeaderRowColor: TColor; - function GetTreeLinesColor: TColor; - function GetTreeLinesStyle: TcxTreeListTreeLineStyle; - function GetTreeList: TcxCustomTreeList; - function GetUseStylesForIndents: Boolean; - protected - function CalculateDetailsLineCount: Integer; virtual; - procedure Calculate; - { properties } - class function GetProperties(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TcxCustomEditProperties; - class function GetPropertiesClass(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TcxCustomEditPropertiesClass; - class function GetRepositoryItem(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TcxEditRepositoryItem; - { styles } - function GetBackgroundViewParams: TcxViewParams; virtual; - function GetBandBackgroundViewParams: TcxViewParams; virtual; - function GetBandHeaderViewParams(ABand: TcxTreeListBand): TcxViewParams; virtual; - function GetColumnFooterViewParams(AColumn: TcxTreeListColumn): TcxViewParams; virtual; - function GetColumnHeaderViewParams(AColumn: TcxTreeListColumn): TcxViewParams; virtual; - function GetContentViewParams(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn): TcxViewParams; virtual; - function GetIndentViewParams(ANode: TcxTreeListNode; AnIndent: Integer): TcxViewParams; virtual; - function GetPreviewViewParams(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn): TcxViewParams; virtual; - function GetFooterRowViewParams: TcxViewParams; virtual; - function GetSelectionViewParams: TcxViewParams; virtual; - function HasSelectionStyle: Boolean; - { Backgrounds } - function GetBackgroundBitmap(Index: Integer): TBitmap; - function HasBackgroundBitmap(Index: Integer): Boolean; - - procedure DoGetLevelImages(ALevel: Integer; var AImages, AStateImages: TCustomImageList); - function GetCheckWidth(ANode: TcxTreeListNode): Integer; - function HasCheck(ANode: TcxTreeListNode): Boolean; - function IsGroupNode(ANode: TcxTreeListNode): Boolean; - function HasNodeAttachedFooter(ANode, ASummaryNode: TcxTreeListNode): Boolean; - function HasNodeSummary(ANode: TcxTreeListNode): Boolean; - - property Helpers[Node: TcxTreeListNode]: TcxTreeListNodeHelper read GetHelper; - property LookAndFeelKind: TcxLookAndFeelKind read GetLookAndFeelKind; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property OptionsView: TcxTreeListOptionsView read GetOptionsView; - property Styles: TcxTreeListStyles read GetStyles; - property TreeList: TcxCustomTreeList read GetTreeList; - public - constructor Create(ABuilder: TcxTreeListReportLinkBuilder); override; - destructor Destroy; override; - - property AutoWidth: Boolean read GetAutoWidth; - property BandCount: Integer read GetBandCount; - property Bands[Index: Integer]: TcxTreeListBand read GetBand; - property BottomBandCount: Integer read GetBottomBandCount; - property BottomBands[Index: Integer]: TcxTreeListBand read GetBottomBand; - property CanUseLookAndFeelColors: Boolean read GetCanUseLookAndFeelColors; - property CategorizedColumn: TcxTreeListColumn read GetCategorizedColumn; - property CellAutoHeight: Boolean read GetCellAutoHeight; - property CellEndEllipsis: Boolean read GetCellEndEllipsis; - property CellMultiline: Boolean read GetCellMultiline; - property ColumnCount: Integer read GetColumnCount; - property Columns[Index: Integer]: TcxTreeListColumn read GetColumn; - property DefaultRowHeight: Integer read GetDefaultRowHeight; - property DetailsLineCount: Integer read FDetailsLineCount; - property FooterLineCount[ANode: TcxTreeListNode]: Integer read GetFooterLineCount; - property GridLines: TcxTreeListGridLines read GetGridLines; - property GridLinesColor: TColor read GetGridLinesColor; - property HasPreview: Boolean read GetHasPreview; - property HeaderAutoHeight: Boolean read GetHeaderAutoHeight; - property Images: TCustomImageList read GetImages; - property IndentWidth: Integer read GetIndentWidth; - property IsDefaultRowHeightAssigned: Boolean read GetIsDefaultRowHeightAssigned; - property IsNodeColorUsedForIndents: Boolean read GetIsNodeColorUsedForIndents; - property MultiSelection: Boolean read GetMultiSelection; - property PaintStyle: TcxTreeListPaintStyle read GetPaintStyle; - property PreviewColumn: TcxTreeListColumn read GetPreviewColumn; - property PreviewLeftIndent: Integer read GetPreviewLeftIndent; - property PreviewPlace: TcxTreeListPreviewPlace read GetPreviewPlace; - property PreviewRightIndent: Integer read GetPreviewRightIndent; - property NodeCount: Integer read GetNodeCount; - property Nodes[Index: Integer]: TcxTreeListNode read GetNode; - property RootBandCount: Integer read GetRootBandCount; - property RootBands[Index: Integer]: TcxTreeListBand read GetRootBand; - property ShowRoot: Boolean read GetShowRoot; - property ShowHorzGridLines: Boolean read GetShowHorzGridLines; - property ShowTreeLines: Boolean read GetShowTreeLines; - property ShowVertGridLines: Boolean read GetShowVertGridLines; - property StateImages: TCustomImageList read GetStateImages; - property ThemedBandHeaderItemColor: TColor read GetThemedBandHeaderItemColor; - property ThemedBandHeaderItemTextColor: TColor read GetThemedBandHeaderItemTextColor; - property ThemedFooterItemColor: TColor read GetThemedFooterItemColor; - property ThemedFooterItemTextColor: TColor read GetThemedFooterItemTextColor; - property ThemedHeaderItemColor: TColor read GetThemedHeaderItemColor; - property ThemedHeaderItemTextColor: TColor read GetThemedHeaderItemTextColor; - property ThemedHeaderRowColor: TColor read GetThemedHeaderRowColor; - property TreeLinesColor: TColor read GetTreeLinesColor; - property TreeLinesStyle: TcxTreeListTreeLineStyle read GetTreeLinesStyle; - property UseStylesForIndents: Boolean read GetUseStylesForIndents; - end; - - TcxTreeListCustomItemPlaceController = class - private - FFormatter: TcxTreeListReportLinkFormatter; - FHeaderLineCount: Integer; - FWidth: Integer; - function GetAdapter: TcxTreeListAdapter; - function GetHeaderLineCount: Integer; - function GetWidth: Integer; - procedure SetWidth(Value: Integer); - protected - function CalculateWidth: Integer; virtual; - function CalculateHeaderLineCount: Integer; virtual; - function GetItemByColumn(Column: TcxTreeListColumn): TcxTreeListColumnPlace; virtual; - procedure WidthChanged; virtual; - public - constructor Create(AFormatter: TcxTreeListReportLinkFormatter); virtual; - procedure Calculate; virtual; - procedure Refresh; virtual; - - property Adapter: TcxTreeListAdapter read GetAdapter; - property Formatter: TcxTreeListReportLinkFormatter read FFormatter; - property HeaderLineCount: Integer read GetHeaderLineCount; - property ItemsByColumn[Column: TcxTreeListColumn]: TcxTreeListColumnPlace read GetItemByColumn; default; - property Width: Integer read GetWidth write SetWidth; - end; - - TcxTreeListColumnPlace = class - private - FColumn: TcxTreeListColumn; - FController: TcxTreeListCustomBandPlace; - FLeftBound: Integer; - FWidth: Integer; - function GetAdapter: TcxTreeListAdapter; - function GetCellBounds(ANode: TcxTreeListNode): TRect; - function GetCellHeight(ANode: TcxTreeListNode): Integer; - function GetFooterCellBounds(AIndex: Integer): TRect; - function GetFooterLineHeight: Integer; - function GetFormatter: TcxTreeListReportLinkFormatter; - function GetHeaderCellBounds: TRect; - function GetHeaderLineHeight: Integer; - function GetIndex: Integer; - function GetIsFixed: Boolean; - function GetLeftBound: Integer; - function GetMinWidth: Integer; - function GetOriginalWidth: Integer; - function GetWidth: Integer; - protected - function CalculateLeftBound: Integer; virtual; - function GetLineCount: Integer; virtual; - function GetRowIndex: Integer; virtual; - procedure InitAutoWidthItem(AnItem: TcxAutoWidthItem); virtual; - - property Adapter: TcxTreeListAdapter read GetAdapter; - property Formatter: TcxTreeListReportLinkFormatter read GetFormatter; - property IsFixed: Boolean read GetIsFixed; - property LineCount: Integer read GetLineCount; - property MinWidth: Integer read GetMinWidth; - property OriginalWidth: Integer read GetOriginalWidth; - property RowIndex: Integer read GetRowIndex; - public - constructor Create(AController: TcxTreeListCustomBandPlace; AColumn: TcxTreeListColumn); virtual; - procedure Calculate(ALeftBound: Integer); virtual; - - property CellBounds[ANode: TcxTreeListNode]: TRect read GetCellBounds; - property CellHeights[ANode: TcxTreeListNode]: Integer read GetCellHeight; - property Column: TcxTreeListColumn read FColumn; - property Controller: TcxTreeListCustomBandPlace read FController; - property FooterCellBounds[AIndex: Integer]: TRect read GetFooterCellBounds; - property FooterLineHeight: Integer read GetFooterLineHeight; - property HeaderCellBounds: TRect read GetHeaderCellBounds; - property HeaderLineHeight: Integer read GetHeaderLineHeight; - property Index: Integer read GetIndex; - property LeftBound: Integer read GetLeftBound write FLeftBound; - property Width: Integer read GetWidth write FWidth; - end; - - TcxTreeListCustomBandPlace = class(TcxTreeListCustomItemPlaceController) - private - FBand: TcxTreeListBand; - FColumnIndexes: TList; - FController: TcxTreeListItemPlaceController; - FHeight: Integer; - FItems: TObjectList; - FLeftBound: Integer; - FMinWidth: Integer; - FParent: TcxTreeListBandPlace; - FTopBound: Integer; - function GetColumnIndex(AColumn: TcxTreeListColumn): Integer; - function GetBounds: TRect; - function GetExpandable: Boolean; - function GetHeight: Integer; - function GetIndex: Integer; - function GetIsFixed: Boolean; - function GetItem(AIndex: Integer): TcxTreeListColumnPlace; - function GetItemCount: Integer; - function GetLeftBound: Integer; - function GetLevelIndex: Integer; - function GetMinWidth: Integer; - function GetTopBound: Integer; - function GetViewParams: TdxReportItemViewParams; - protected - function CalculateHeaderLineCount: Integer; override; - function CalculateWidth: Integer; override; - function GetItemByColumn(Column: TcxTreeListColumn): TcxTreeListColumnPlace; override; - - procedure AddItems; virtual; - procedure AssignWidth; - function CalculateHeight: Integer; virtual; - function CalculateItemLeftBound(AnItem: TcxTreeListColumnPlace): Integer; virtual; - procedure CalculateItemsWidth; virtual; - function CalculateLeftBound: Integer; virtual; - function CalculateLevelHeight: Integer; virtual; - function CalculateLineHeight: Integer; virtual; - function CalculateMinWidth: Integer; virtual; - function CalculateTopBound: Integer; virtual; - function CreateItem(AColumn: TcxTreeListColumn): TcxTreeListColumnPlace; virtual; - procedure InitAutoWidthItem(AnItem: TcxAutoWidthItem); virtual; - - function GetRowCount: Integer; virtual; - function GetItemsAutoWidth: Boolean; virtual; - function GetItemsAvailableWidth: Integer; virtual; - function InternalCalculateMinWidth: Integer; virtual; - function InternalCalculateWidth: Integer; virtual; - - property Band: TcxTreeListBand read FBand; - property IsFixed: Boolean read GetIsFixed; - property ItemsAutoWidth: Boolean read GetItemsAutoWidth; - property ItemsAvailableWidth: Integer read GetItemsAvailableWidth; - property LevelIndex: Integer read GetLevelIndex; - property MinWidth: Integer read GetMinWidth; - property RowCount: Integer read GetRowCount; - property ViewParams: TdxReportItemViewParams read GetViewParams; - public - constructor Create(AController: TcxTreeListItemPlaceController; - AParent: TcxTreeListBandPlace; ABand: TcxTreeListBand); reintroduce; virtual; - destructor Destroy; override; - procedure Calculate; override; - function IndexOf(AnItem: TcxTreeListColumnPlace): Integer; overload; - function IndexOf(AColumn: TcxTreeListColumn): Integer; overload; - procedure Refresh; override; - - property Bounds: TRect read GetBounds; - property ColumnIndexes[Column: TcxTreeListColumn]: Integer read GetColumnIndex; - property Controller: TcxTreeListItemPlaceController read FController; - property Expandable: Boolean read GetExpandable; - property Height: Integer read GetHeight write FHeight; - property Index: Integer read GetIndex; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TcxTreeListColumnPlace read GetItem; default; - property LeftBound: Integer read GetLeftBound write FLeftBound; - property Parent: TcxTreeListBandPlace read FParent; - property TopBound: Integer read GetTopBound write FTopBound; - end; - - TcxTreeListCustomBandPlaceClass = class of TcxTreeListCustomBandPlace; - - TcxTreeListBandPlace = class(TcxTreeListCustomBandPlace) - private - FChildItems: TList; - function GetChildItem(Index: Integer): TcxTreeListCustomBandPlace; - function GetChildItemCount: Integer; - protected - function GetRowCount: Integer; override; - function InternalCalculateMinWidth: Integer; override; - function InternalCalculateWidth: Integer; override; - procedure WidthChanged; override; - - procedure CalculateChildItemWidths; - procedure RefreshChildItems; - public - constructor Create(AnOwner: TcxTreeListItemPlaceController; - AParent: TcxTreeListBandPlace; ABand: TcxTreeListBand); override; - destructor Destroy; override; - - function IndexOf(AnItem: TcxTreeListCustomBandPlace): Integer; - procedure Refresh; override; - - property ChildItemCount: Integer read GetChildItemCount; - property ChildItems[Index: Integer]: TcxTreeListCustomBandPlace read GetChildItem; - end; - - TcxTreeListBottomBandPlace = class(TcxTreeListCustomBandPlace) - protected - procedure AddItems; override; - function CalculateItemLeftBound(AnItem: TcxTreeListColumnPlace): Integer; override; - procedure CalculateItemsWidth; override; - function GetItemsAutoWidth: Boolean; override; - function GetItemsAvailableWidth: Integer; override; - - function GetRowCount: Integer; override; - function InternalCalculateMinWidth: Integer; override; - function InternalCalculateWidth: Integer; override; - procedure WidthChanged; override; - end; - - TcxTreeListItemPlaceController = class(TcxTreeListCustomItemPlaceController) - private - FBottomItems: TList; - FHeight: Integer; - FItems: TObjectList; - FLevelCount: Integer; - FLevelHeights: TList; - FRootItems: TList; - function GetAutoWidth: Boolean; - function GetAvailableWidth: Integer; - function GetBottomItem(AIndex: Integer): TcxTreeListCustomBandPlace; - function GetBottomItemCount: Integer; - function GetHeight: Integer; - function GetItem(AIndex: Integer): TcxTreeListCustomBandPlace; - function GetItemByBand(ABand: TcxTreeListBand): TcxTreeListCustomBandPlace; - function GetItemCount: Integer; - function GetLevelCount: Integer; - function GetLevelHeight(AIndex: Integer): Integer; - function GetRootItem(AIndex: Integer): TcxTreeListCustomBandPlace; - function GetRootItemCount: Integer; - procedure SetLevelHeight(AIndex: Integer; AValue: Integer); - protected - function CalculateHeaderLineCount: Integer; override; - function CalculateWidth: Integer; override; - function GetItemByColumn(AColumn: TcxTreeListColumn): TcxTreeListColumnPlace; override; - - procedure AddItems; virtual; - function CreateItem(ABand: TcxTreeListBand): TcxTreeListCustomBandPlace; virtual; - function GetItemClass(ABand: TcxTreeListBand): TcxTreeListCustomBandPlaceClass; virtual; - procedure RefreshBottomItems; - procedure RefreshItems; - procedure RefreshRootItems; - - function CalculateHeight: Integer; virtual; - function CalculateItemHeight(AnItem: TcxTreeListCustomBandPlace): Integer; virtual; - function CalculateItemLeftBound(AnItem: TcxTreeListCustomBandPlace): Integer; virtual; - function CalculateItemTopBound(AnItem: TcxTreeListCustomBandPlace): Integer; virtual; - function CalculateLevelCount: Integer; virtual; - - procedure CalculateItemWidths; - procedure CalculateLevelHeights; - - property AutoWidth: Boolean read GetAutoWidth; - property AvailableWidth: Integer read GetAvailableWidth; - public - constructor Create(AFormatter: TcxTreeListReportLinkFormatter); override; - destructor Destroy; override; - - procedure Calculate; override; - procedure Refresh; override; - - function BottomIndexOf(AnItem: TcxTreeListCustomBandPlace): Integer; - function IndexOf(AnItem: TcxTreeListCustomBandPlace): Integer; overload; - function IndexOf(ABand: TcxTreeListBand): Integer; overload; - function RootIndexOf(AnItem: TcxTreeListCustomBandPlace): Integer; overload; - function RootIndexOf(ABand: TcxTreeListBand): Integer; overload; - - property BottomItemCount: Integer read GetBottomItemCount; - property BottomItems[Index: Integer]: TcxTreeListCustomBandPlace read GetBottomItem; - property Height: Integer read GetHeight; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TcxTreeListCustomBandPlace read GetItem; default; - property ItemsByBand[Band: TcxTreeListBand]: TcxTreeListCustomBandPlace read GetItemByBand; - property LevelCount: Integer read GetLevelCount; - property LevelHeights[Index: Integer]: Integer read GetLevelHeight write SetLevelHeight; - property RootItemCount: Integer read GetRootItemCount; - property RootItems[Index: Integer]: TcxTreeListCustomBandPlace read GetRootItem; - end; - - TcxTreeListReportLinkSummaryItems = array of array of TcxTreeListSummaryItem; - - TcxTreeListReportLinkLevelInfo = class - private - FImages: TCustomImageList; - FStateImages: TCustomImageList; - end; - - TcxTreeListReportLinkFormatter = class(TcxTreeListReportLinkBuilderHandler, - IUnknown, IdxPSCellParams, IdxPSCellParams2) - private - FBands: TList; - FBandLineHeight: Integer; - FColumns: TList; - FDetailsLineHeight: Integer; - FGroupFooterSummaryItems: TcxTreeListReportLinkSummaryItems; - FItemPlaceController: TcxTreeListItemPlaceController; - FFont: TFont; - FFooterLineHeight: Integer; - FHeaderLineHeight: Integer; - FLevelInfos: TObjectList; - FLookAndFeelItems: TList; - FExpansionLevel: Integer; - FMaxNodeImageHeight: Integer; - FNodes: TList; - FPreviewLineHeight: Integer; - FFooterSummaryItems: TcxTreeListReportLinkSummaryItems; - FTransparentColor: TColor; - function GetAutoWidth: Boolean; - function GetAvailableWidth: Integer; - function GetBandCount: Integer; - function GetBands(AIndex: Integer): TcxTreeListBand; - function GetColumnCount: Integer; - function GetColumns(AIndex: Integer): TcxTreeListColumn; - function GetDC: HDC; - function GetExpandButtonColor: TColor; - function GetExpandButtonSize: Integer; - function GetGridLinesColor: TColor; - function GetHasNodeSeparator: Boolean; - function GetHasPreview: Boolean; - function GetIndentCount(Node: TcxTreeListNode): Integer; - function GetImages(ALevel: Integer): TCustomImageList; - function GetImagesWidth(ANode: TcxTreeListNode): Integer; - function GetIsNodeColorUsedForIndents: Boolean; - function GetLevelInfos(ALevel: Integer): TcxTreeListReportLinkLevelInfo; - function GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; - function GetLookAndFeelItemCount: Integer; - function GetNode(Index: Integer): TcxTreeListNode; - function GetNodeCount: Integer; - function GetNodeSeparatorColor: TColor; - function GetNodeSeparatorThickness: Integer; - function GetPreviewAutoHeight: Boolean; - function GetPreviewColumn: TcxTreeListColumn; - function GetPreviewMaxLineCount: Integer; - function GetRenderer: TdxPSReportRenderer; - function GetShowBandHeaders: Boolean; - function GetShowFooters: Boolean; - function GetShowHeaders: Boolean; - function GetShowPreview: Boolean; - function GetStateImages(ALevel: Integer): TCustomImageList; - function GetUseLookAndFeelColors: Boolean; - function GetViewWidth: Integer; - function GetTreeLinesColor: TColor; - function GetTreeLinesStyle: TcxTreeListTreeLineStyle; - function GetStateImagesWidth(ANode: TcxTreeListNode): Integer; - function HasImages(ANode: TcxTreeListNode): Boolean; - function HasStateImages(ANode: TcxTreeListNode): Boolean; - - procedure FormatLookAndFeelItems; - protected - { IUnknown } - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - { IdxPSCellParams } - function IdxPSCellParams.GetAutoHeight = IdxPSCellParams_GetAutoHeight; - function IdxPSCellParams.GetDC = IdxPSCellParams_GetDC; - function IdxPSCellParams.GetDisplayGraphicsAsText = IdxPSCellParams_GetDisplayGraphicsAsText; - function IdxPSCellParams.GetEndEllipsis = IdxPSCellParams_GetEndEllipsis; - function IdxPSCellParams.GetFlatCheckMarks = IdxPSCellParams_GetFlatCheckMarks; - function IdxPSCellParams.GetGraphicsText = IdxPSCellParams_GetGraphicsText; - function IdxPSCellParams.GetMultiline = IdxPSCellParams_GetMultiline; - function IdxPSCellParams.GetTransparentGraphics = IdxPSCellParams_GetTransparentGraphics; - function IdxPSCellParams_GetAutoHeight: Boolean; virtual; - function IdxPSCellParams_GetDC: HDC; virtual; - function IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; virtual; - function IdxPSCellParams_GetEndEllipsis: Boolean; virtual; - function IdxPSCellParams_GetFlatCheckMarks: Boolean; virtual; - function IdxPSCellParams_GetGraphicsText: string; virtual; - function IdxPSCellParams_GetMultiline: Boolean; virtual; - function IdxPSCellParams_GetTransparentGraphics: Boolean; virtual; - { IdxPSCellParams2 } - function IdxPSCellParams2.GetPreviewMarginLeft = IdxPSCellParams2_GetPreviewMarginLeft; - function IdxPSCellParams2.GetPreviewMarginRight = IdxPSCellParams2_GetPreviewMarginRight; - function IdxPSCellParams2.GetPreviewMaxHeight = IdxPSCellParams2_GetPreviewMaxHeight; - function IdxPSCellParams2.GetPreviewMaxLineCount = IdxPSCellParams2_GetPreviewMaxLineCount; - function IdxPSCellParams2.GetRichEditGraphicClass = IdxPSCellParams2_GetRichEditGraphicClass; - function IdxPSCellParams2.GetRichEditTransparent = IdxPSCellParams2_GetRichEditTransparent; - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; virtual; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; virtual; - function IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; virtual; - function IdxPSCellParams2_GetRichEditTransparent: Boolean; virtual; - - procedure AddDelimiters; virtual; - procedure AddHorizontalDelimiters; virtual; - procedure AddVerticalDelimiters; virtual; - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - procedure CalculateLineHeights; virtual; - function CanProcessSelectionStyle(ANode: TcxTreeListNode): Boolean; - procedure CreateLevelInfos; - procedure CreateNodeList; virtual; - function IsSelectedNode(ANode: TcxTreeListNode): Boolean; virtual; - - function GetBackgroundBitmap(Index: Integer): TBitmap; - function GetBackgroundBitmapIndex(Index: Integer): Integer; - function HasBackgroundBitmap(Index: Integer): Boolean; - function MapStyleBackgroundBitmapIndex(ATreeListBackgroundBitmapIndex: Integer): Integer; - - procedure CalculateHeight(const AParams: TdxReportItemViewParams; var AHeight: Integer); - function CalculatePatternHeight(const AParams: TdxReportItemViewParams): Integer; - procedure CreateBands; - procedure CreateColumns; - procedure CreateItems; - procedure CreateSummaryItems; - function GetFooterCellCount(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): Integer; - function GetNodeIndent(ANode: TcxTreeListNode): Integer; - function GetNodeParent(ANode: TcxTreeListNode; ALevel: Integer): TcxTreeListNode; - function GetNextNode(ANode: TcxTreeListNode): TcxTreeListNode; - function GetPrevNode(ANode: TcxTreeListNode): TcxTreeListNode; - function GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; - function GetSummaryItems(ANode: TcxTreeListNode): TcxTreeListReportLinkSummaryItems; - function HasFooterCell(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): Boolean; - function HasParent(ANode: TcxTreeListNode): Boolean; - function IndexOfNode(ANode: TcxTreeListNode): Integer; - function IsColorTransparent(AColor: TColor): Boolean; - function IsFirstNode(ANode: TcxTreeListNode): Boolean; - function IsLastNode(ANode: TcxTreeListNode): Boolean; - function IsNodeExpanded(ANode: TcxTreeListNode): Boolean; - function IsNodeFirstChild(ANode: TcxTreeListNode): Boolean; - function IsNodeLastChild(ANode: TcxTreeListNode): Boolean; - function IsOddNode(ANode: TcxTreeListNode): Boolean; - function IsNodeSelected(ANode: TcxTreeListNode): Boolean; - procedure RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); - procedure SetViewParams(AnItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); - - function MakeIndentIndex(AnIndex: Integer): DWORD; - - property DC: HDC read GetDC; - property ItemPlaceController: TcxTreeListItemPlaceController read FItemPlaceController; - property LevelInfos[ALevel: Integer]: TcxTreeListReportLinkLevelInfo read GetLevelInfos; - property LookAndFeelItemCount: Integer read GetLookAndFeelItemCount; - property LookAndFeelItems[Index: Integer]: TdxReportVisualItem read GetLookAndFeelItem; - property Renderer: TdxPSReportRenderer read GetRenderer; - property ViewWidth: Integer read GetViewWidth; - public - constructor Create(ABuilder: TcxTreeListReportLinkBuilder); override; - destructor Destroy; override; - function Adapter: TcxTreeListAdapter; overload; virtual; - - procedure DoInitializeHost(AHost: TdxReportCell); virtual; - { Bands } - procedure DoInitializeBandItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeBandRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeBandItem(AnItem: TAbstractdxReportCellData; AIndex: Integer); virtual; - function GetBandBackgroundViewParams: TdxReportItemViewParams; virtual; - function GetBandItemClass(Index: Integer): TdxReportCellTextClass; virtual; - function GetBandItemBounds(Index: Integer): TRect; - function GetBandItemViewParams(ABand: TcxTreeListBand): TdxReportItemViewParams; virtual; - { Checks } - procedure DoInitializeNodeCheck(AnItem: TdxCustomReportCellCheck; - ANode: TcxTreeListNode; AnIndex: Integer); virtual; - function GetNodeCheckCellSides(ANode: TcxTreeListNode; AnIndex: Integer): TdxCellSides; virtual; - function GetNodeCheckClass(ANode: TcxTreeListNode): TdxCustomReportCellCheckClass; virtual; - function GetNodeCheckViewParams(ANode: TcxTreeListNode; AnIndex: Integer): TdxReportItemViewParams; virtual; - { Footers } - procedure DoInitializeFooterCell(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ACellIndex: Integer; ANode: TcxTreeListNode); virtual; - procedure DoInitializeFooterIndent(AnItem: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); - procedure DoInitializeFooterBandedRow(ARow: TdxReportCell; AIndentCount: Integer); virtual; - procedure DoInitializeFooterRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeFooterCell(AnItem: TAbstractdxReportCellData; - AColumnIndex, ACellIndex: Integer); virtual; - function GetFooterCellBounds(AColumn: TcxTreeListColumn; ACellIndex, AIndent: Integer): TRect; virtual; - function GetFooterCellClass: TdxReportCellTextClass; virtual; - function GetFooterCellViewParams(AColumn: TcxTreeListColumn): TdxReportItemViewParams; virtual; - function GetNodeFooterIndentTreeLineMode(AnIndex, AnIndentCount: Integer; - ANode: TcxTreeListNode): TdxPSTreeLineMode; - function GetFooterRowViewParams: TdxReportItemViewParams; virtual; - { Headers } - procedure DoInitializeHeaderItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeHeaderRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeHeaderItem(AnItem: TAbstractdxReportCellData; AIndex: Integer); virtual; - function GetHeaderItemBounds(AnIndex: Integer): TRect; virtual; - function GetHeaderItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetHeaderItemViewParams(AColumn: TcxTreeListColumn): TdxReportItemViewParams; virtual; - { Images } - procedure DoInitializeNodeImage(AnItem: TdxReportCellGraphic; ANode: TcxTreeListNode; AnIndex: Integer); virtual; - procedure DoReportLinkInitializeNodeImage(AnItem: TAbstractdxReportCellData; ANode: TcxTreeListNode; AnIndex: Integer); virtual; - function GetNodeImageCellSides(ANode: TcxTreeListNode; AnIndex: Integer): TdxCellSides; - function GetNodeImageClass: TdxReportCellGraphicClass; virtual; - function GetNodeImageViewParams(ANode: TcxTreeListNode; AnIndex: Integer): TdxReportItemViewParams; virtual; - { Indents and Expand Buttons } - procedure DoInitializeNodeIndent(AnItem: TdxReportCellExpandButton; AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); virtual; - procedure DoInitializeExpandButton(AnItem: TdxReportCellExpandButton; AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); virtual; - procedure DoReportLinkInitializeNodeIndent(AnItem: TAbstractdxReportCellData; AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); virtual; - function GetNodeIndentCellSides(ANode: TcxTreeListNode; AnIndex, AnIndentCount: Integer): TdxCellSides; virtual; - function GetNodeIndentClass: TdxReportCellExpandButtonClass; virtual; - function GetNodeIndentTreeLineMode(AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode): TdxPSTreeLineMode; - function GetNodeIndentViewParams(ANode: TcxTreeListNode; AnIndex, AnIndentCount: Integer): TdxReportItemViewParams; virtual; - { Nodes } - procedure DoInitializeNodeBandedRow(ARow: TdxReportCell); virtual; - procedure DoInitializeNodeRow(ARow: TdxReportCell; ANode: TcxTreeListNode); virtual; - procedure DoInitializeNodeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode; AnIsPreview: Boolean = False); virtual; - procedure DoReportLinkInitializeNodeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode); virtual; - function GetCellValue(AProperties: TcxCustomEditProperties; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TcxEditValue; virtual; - function GetNodeBackgroundBitmapStyleIndex(ANode: TcxTreeListNode): Integer; - function GetNodeItemBounds(ANode: TcxTreeListNode; AIndex: Integer): TRect; virtual; - function GetNodeItemCellSides(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TdxCellSides; - function GetNodeItemClass(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode; - AnIsPreview: Boolean = False): TdxReportCellDataClass; virtual; - function GetNodeItemViewParams(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TdxReportItemViewParams; virtual; - { Preview } - procedure DoInitializePreview(AnItem: TAbstractdxReportCellData; AColumn: TcxTreeListColumn; ANode: TcxTreeListNode); virtual; - function GetPreviewCellSides(ANode: TcxTreeListNode): TdxCellSides; virtual; - function GetPreviewClass(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TdxReportCellDataClass; virtual; - function GetPreviewViewParams(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TdxReportItemViewParams; virtual; - { Separators } - procedure DoInitializeNodeSeparator(AnItem: TAbstractdxReportCellData); virtual; - procedure DoInitializeNodeSeparatorRow(ARow: TdxReportCell); virtual; - function GetNodeSeparatorClass: TdxReportCellBoxClass; virtual; - { State images } - procedure DoInitializeNodeStateImage(AnItem: TdxReportCellGraphic; ANode: TcxTreeListNode; AnIndex: Integer); virtual; - procedure DoReportLinkInitializeNodeStateImage(AnItem: TAbstractdxReportCellData; ANode: TcxTreeListNode; AnIndex: Integer); virtual; - function GetNodeStateImageCellSides(ANode: TcxTreeListNode; AnIndex: Integer): TdxCellSides; virtual; - function GetNodeStateImageClass: TdxReportCellGraphicClass; virtual; - function GetNodeStateImageViewParams(ANode: TcxTreeListNode; AnIndex: Integer): TdxReportItemViewParams; virtual; - - property AutoWidth: Boolean read GetAutoWidth; - property AvailableWidth: Integer read GetAvailableWidth; - property BandLineHeight: Integer read FBandLineHeight write FBandLineHeight; - property BandCount: Integer read GetBandCount; - property Bands[Index: Integer]: TcxTreeListBand read GetBands; - property ColumnCount: Integer read GetColumnCount; - property Columns[Index: Integer]: TcxTreeListColumn read GetColumns; - property DetailsLineHeight: Integer read FDetailsLineHeight write FDetailsLineHeight; - property ExpandButtonColor: TColor read GetExpandButtonColor; - property ExpandButtonSize: Integer read GetExpandButtonSize; - property FooterLineHeight: Integer read FFooterLineHeight write FFooterLineHeight; - property GridLinesColor: TColor read GetGridLinesColor; - property HasNodeSeparator: Boolean read GetHasNodeSeparator; - property HasPreview: Boolean read GetHasPreview; - property HeaderLineHeight: Integer read FHeaderLineHeight write FHeaderLineHeight; - property Images[ALevel: Integer]: TCustomImageList read GetImages; - property IndentCounts[Node: TcxTreeListNode]: Integer read GetIndentCount; - property IsNodeColorUsedForIndents: Boolean read GetIsNodeColorUsedForIndents; - property NodeCount: Integer read GetNodeCount; - property Nodes[Index: Integer]: TcxTreeListNode read GetNode; - property NodeSeparatorColor: TColor read GetNodeSeparatorColor; - property NodeSeparatorThickness: Integer read GetNodeSeparatorThickness; - property PreviewAutoHeight: Boolean read GetPreviewAutoHeight; - property PreviewColumn: TcxTreeListColumn read GetPreviewColumn; - property PreviewLineHeight: Integer read FPreviewLineHeight write FPreviewLineHeight; - property PreviewMaxLineCount: Integer read GetPreviewMaxLineCount; - property ShowBandHeaders: Boolean read GetShowBandHeaders; - property ShowFooters: Boolean read GetShowFooters; - property ShowHeaders: Boolean read GetShowHeaders; - property ShowPreview: Boolean read GetShowPreview; - property StateImages[ALevel: Integer]: TCustomImageList read GetStateImages; - property UseLookAndFeelColors: Boolean read GetUseLookAndFeelColors; - property TransparentColor: TColor read FTransparentColor write FTransparentColor default clWindow; - property TreeLinesColor: TColor read GetTreeLinesColor; - property TreeLinesStyle: TcxTreeListTreeLineStyle read GetTreeLinesStyle; - end; - - { Options } - - TcxTreeListReportLinkOptionsExpanding = class(TdxCustomReportLinkOptionsExpanding) - private - FAutoExpandNodes: Boolean; - FExplicitlyExpandNodes: Boolean; - function GetReportLink: TcxTreeListCustomReportLink; - procedure SetAutoExpandNodes(Value: Boolean); - procedure SetExplicitlyExpandNodes(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - published - property AutoExpandNodes: Boolean read FAutoExpandNodes write SetAutoExpandNodes default False; - property ExplicitlyExpandNodes: Boolean read FExplicitlyExpandNodes write SetExplicitlyExpandNodes default False; - end; - - TcxTreeListReportLinkOptionsFormatting = class(TdxCustomReportLinkOptionsFormatting) - private - FConsumeSelectionStyle: Boolean; - FNodeSeparatorColor: TColor; - FNodeSeparatorThickness: Integer; - function GetActualNodeSeparatorColor: TColor; - function GetReportLink: TcxTreeListCustomReportLink; - procedure SetConsumeSelectionStyle(Value: Boolean); - procedure SetNodeSeparatorColor(Value: TColor); - procedure SetNodeSeparatorThickness(Value: Integer); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - property ActualNodeSeparatorColor: TColor read GetActualNodeSeparatorColor; - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - published - property ConsumeSelectionStyle: Boolean read FConsumeSelectionStyle write SetConsumeSelectionStyle default False; - property NodeSeparatorColor: TColor read FNodeSeparatorColor write SetNodeSeparatorColor default clDefault; - property NodeSeparatorThickness: Integer read FNodeSeparatorThickness write SetNodeSeparatorThickness default 0; - property UseLookAndFeelColors; - end; - - TcxTreeListReportLinkOptionsOnEveryPage = class(TdxCustomTableControlReportLinkOptionsOnEveryPage) - private - function GetReportLink: TcxTreeListCustomReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - published - property BandHeaders; - property Footers; - property Headers; - end; - - TcxTreeListReportLinkOptionsPagination = class(TdxCustomTableControlReportLinkOptionsPagination) - private - function GetNode: Boolean; - function GetReportLink: TcxTreeListCustomReportLink; - procedure SetNode(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - published - property Band; - property Column; - property Custom; - property Node: Boolean read GetNode write SetNode default True; - end; - - TcxTreeListReportLinkOptionsPreview = class(TdxCustomTableControlReportLinkOptionsPreview) - private - function GetReportLink: TcxTreeListCustomReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - end; - - TcxTreeListReportLinkOptionsRefinements = class(TdxCustomReportLinkOptionsRefinements) - private - function GetReportLink: TcxTreeListCustomReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - end; - - TcxTreeListReportLinkOptionsSelection = class(TdxCustomTableControlReportLinkOptionsSelection) - private - function GetReportLink: TcxTreeListCustomReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - end; - - TcxTreeListReportLinkOptionsSize = class(TdxCustomReportLinkOptionsSize) - private - function GetReportLink: TcxTreeListCustomReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - published - property AutoWidth; - end; - - TcxTreeListReportLinkOptionsView = class(TdxCustomTableControlReportLinkOptionsView) - private - FBorders: Boolean; - FTreeLines: Boolean; - function GetReportLink: TcxTreeListCustomReportLink; - procedure SetBorders(Value: Boolean); - procedure SetTreeLines(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - published - property BandHeaders; - property Borders: Boolean read FBorders write SetBorders default True; - property ExpandButtons; - property Footers; - property Headers; - property TreeLines: Boolean read FTreeLines write SetTreeLines default True; - end; - - { TcxTreeListReportLinkStyles } - - TcxTreeListReportLinkStylesClass = class of TcxTreeListReportLinkStyles; - - TcxTreeListReportLinkStyles = class(TdxCustomReportLinkStyles) - private - FOnGetNodeIndentStyle: TcxTreeListGetNodeIndentStyleEvent; - function GetReportLink: TcxTreeListCustomReportLink; - protected - function DesignerTabIndex: Integer; override; - - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - class function GetStyleCaption(AnIndex: Integer): string; override; - function GetStyleIndexByCaption(const Caption: string): Integer; override; - public - procedure Assign(Source: TPersistent); override; - - procedure GetBandHeaderParams(ABand: TcxTreeListBand; out AParams: TcxViewParams); virtual; - procedure GetColumnFooterParams(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; - out AParams: TcxViewParams); virtual; - procedure GetColumnHeaderParams(AColumn: TcxTreeListColumn; out AParams: TcxViewParams); virtual; - procedure GetContentParams(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; - out AParams: TcxViewParams); virtual; - procedure GetFooterRowParams(out AParams: TcxViewParams); virtual; - procedure GetImagesParams(ANode: TcxTreeListNode; out AParams: TcxViewParams); virtual; - procedure GetIndentParams(ANode: TcxTreeListNode; AnIndent: Integer; out AParams: TcxViewParams); virtual; - procedure GetPreviewParams(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; - out AParams: TcxViewParams); virtual; - procedure GetSelectionParams(out AParams: TcxViewParams); virtual; - - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - published - property BandBackground: TcxStyle Index vspsTreeListBandBackground read GetValue write SetValue; - property BandHeader: TcxStyle Index vspsTreeListBandHeader read GetValue write SetValue; - property Content: TcxStyle Index vspsTreeListContent read GetValue write SetValue; - property ContentEven: TcxStyle Index vspsTreeListContentEven read GetValue write SetValue; - property ContentOdd: TcxStyle Index vspsTreeListContentOdd read GetValue write SetValue; - property Footer: TcxStyle Index vspsTreeListFooter read GetValue write SetValue; - property FooterRow: TcxStyle Index vspsTreeListFooterRow read GetValue write SetValue; - property Header: TcxStyle Index vspsTreeListHeader read GetValue write SetValue; - property Preview: TcxStyle Index vspsTreeListPreview read GetValue write SetValue; - property Selection: TcxStyle Index vspsTreeListSelection read GetValue write SetValue; - property StyleSheet; - property OnGetNodeIndentStyle: TcxTreeListGetNodeIndentStyleEvent read FOnGetNodeIndentStyle write FOnGetNodeIndentStyle; - end; - - TcxTreeListReportLinkStyleSheet = class(TdxCustomReportLinkStyleSheet) - private - function GetStylesValue: TcxTreeListReportLinkStyles; - procedure SetStylesValue(Value: TcxTreeListReportLinkStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TcxTreeListReportLinkStyles read GetStylesValue write SetStylesValue; - end; - - { Host Services } - - TcxTreeListAttributeHostInfo = class - private - FParent: TdxReportCell; - public - Origin: TPoint; - procedure Initialize(AParent: TdxReportCell); - property Parent: TdxReportCell read FParent; - end; - - TcxTreeListAttributeHostInfoServicesClass = class of TcxTreeListAttributeHostInfoServices; - - TcxTreeListAttributeHostInfoServices = class - private - FPageDetailsHostInfo: TcxTreeListAttributeHostInfo; - FPageFootersHostInfo: TcxTreeListAttributeHostInfo; - FPageHeadersHostInfo: TcxTreeListAttributeHostInfo; - FReportLink: TcxTreeListCustomReportLink; - function GetArePageFootersAssigned: Boolean; - function GetArePageHeadersAssigned: Boolean; - function GetCanUseBandHeadersOnEveyPage: Boolean; - function GetCanUseFootersOnEveryPage: Boolean; - function GetCanUseHeadersOnEveryPage: Boolean; - function GetIsInconsistentHeadersState: Boolean; - function GetOptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage; - function GetOptionsView: TcxTreeListReportLinkOptionsView; - function GetPageDetails: TdxReportCell; - function GetPageFooters: TdxReportCell; - function GetPageHeaders: TdxReportCell; - protected - procedure CreateHostInfos; - procedure DestroyHostInfos; - - function GetBandHeadersHostInfo: TcxTreeListAttributeHostInfo; virtual; - function GetFootersHostInfo: TcxTreeListAttributeHostInfo; virtual; - function GetHeadersHostInfo: TcxTreeListAttributeHostInfo; virtual; - function GetInconsistentStateText: string; virtual; - function GetIsInconsistentState: Boolean; virtual; - function HasCells: Boolean; - - property OptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage read GetOptionsOnEveryPage; - property OptionsView: TcxTreeListReportLinkOptionsView read GetOptionsView; - property PageDetails: TdxReportCell read GetPageDetails; - property PageFooters: TdxReportCell read GetPageFooters; - property PageHeaders: TdxReportCell read GetPageHeaders; - public - constructor Create(AReportLink: TcxTreeListCustomReportLink); virtual; - destructor Destroy; override; - procedure InitializeHostInfos; - - property ArePageFootersAssigned: Boolean read GetArePageFootersAssigned; - property ArePageHeadersAssigned: Boolean read GetArePageHeadersAssigned; - property BandHeadersHostInfo: TcxTreeListAttributeHostInfo read GetBandHeadersHostInfo; - property CanUseBandHeadersOnEveyPage: Boolean read GetCanUseBandHeadersOnEveyPage; - property CanUseFootersOnEveryPage: Boolean read GetCanUseFootersOnEveryPage; - property CanUseHeadersOnEveryPage: Boolean read GetCanUseHeadersOnEveryPage; - property FootersHostInfo: TcxTreeListAttributeHostInfo read GetFootersHostInfo; - property HeadersHostInfo: TcxTreeListAttributeHostInfo read GetHeadersHostInfo; - property InconsistentStateText: string read GetInconsistentStateText; - property IsInconsistentHeadersState: Boolean read GetIsInconsistentHeadersState; - property IsInconsistentState: Boolean read GetIsInconsistentState; - property PageDetailsHostInfo: TcxTreeListAttributeHostInfo read FPageDetailsHostInfo; - property PageFootersHostInfo: TcxTreeListAttributeHostInfo read FPageFootersHostInfo; - property PageHeadersHostInfo: TcxTreeListAttributeHostInfo read FPageHeadersHostInfo; - property ReportLink: TcxTreeListCustomReportLink read FReportLink; - end; - - { TcxTreeListCustomReportLink } - - TcxTreeListNodeArray = array of TcxTreeListNode; - - TcxTreeListReportLinkGetCustomPageBreaksEvent = procedure(Sender: TcxTreeListCustomReportLink) of object; - - TcxTreeListReportLinkCustomDrawBandCellEvent = procedure(Sender: TcxTreeListCustomReportLink; - ACanvas: TCanvas; ABand: TcxTreeListBand; AnItem: TdxReportCellImage; - var ADone: Boolean) of object; - - TcxTreeListReportLinkCustomDrawCellEvent = procedure(Sender: TcxTreeListCustomReportLink; - ACanvas: TCanvas; ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; - AnItem: TAbstractdxReportCellData; var ADone: Boolean) of object; - - TcxTreeListReportLinkCustomDrawFooterCellEvent = procedure(Sender: TcxTreeListCustomReportLink; - ACanvas: TCanvas; AColumn: TcxTreeListColumn; AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TcxTreeListReportLinkCustomDrawHeaderCellEvent = procedure(Sender: TcxTreeListCustomReportLink; - ACanvas: TCanvas; AColumn: TcxTreeListColumn; AnItem: TdxReportCellImage; var ADone: Boolean) of object; - - TcxTreeListReportLinkCustomDrawIndentCellEvent = procedure(Sender: TcxTreeListCustomReportLink; - ACanvas: TCanvas; ANode: TcxTreeListNode; AnIndex: Integer; AnItem: TAbstractdxReportCellData; - var ADone: Boolean) of object; - - TcxTreeListReportLinkInitializeBandCellEvent = procedure(Sender: TcxTreeListCustomReportLink; - ABand: TcxTreeListBand; AnItem: TdxReportCellImage) of object; - - TcxTreeListReportLinkInitializeCellEvent = procedure(Sender: TcxTreeListCustomReportLink; - ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; AnItem: TAbstractdxReportCellData) of object; - - TcxTreeListReportLinkInitializeFooterCellEvent = procedure(Sender: TcxTreeListCustomReportLink; - ASummaryCellIndex: Integer; AColumn: TcxTreeListColumn; AnItem: TdxReportCellString) of object; - - TcxTreeListReportLinkInitializeHeaderCellEvent = procedure(Sender: TcxTreeListCustomReportLink; - AColumn: TcxTreeListColumn; AnItem: TdxReportCellImage) of object; - - TcxTreeListReportLinkInitializeIndentCellEvent = procedure(Sender: TcxTreeListCustomReportLink; - ANode: TcxTreeListNode; AnIndex: Integer; AnItem: TAbstractdxReportCellData) of object; - - TcxTreeListCustomReportLink = class(TdxCustomTableControlReportLink) - private - FBuilder: TcxTreeListReportLinkBuilder; - FDelimitersHardVert: TList; - FHostInfoServices: TcxTreeListAttributeHostInfoServices; - FReportRows: TList; - FOnCustomDrawBandCell: TcxTreeListReportLinkCustomDrawBandCellEvent; - FOnCustomDrawCell: TcxTreeListReportLinkCustomDrawCellEvent; - FOnCustomDrawFooterCell: TcxTreeListReportLinkCustomDrawFooterCellEvent; - FOnCustomDrawHeaderCell: TcxTreeListReportLinkCustomDrawHeaderCellEvent; - FOnCustomDrawIndentCell: TcxTreeListReportLinkCustomDrawIndentCellEvent; - FOnGetCustomPageBreaks: TcxTreeListReportLinkGetCustomPageBreaksEvent; - FOnInitializeBandCell: TcxTreeListReportLinkInitializeBandCellEvent; - FOnInitializeCell: TcxTreeListReportLinkInitializeCellEvent; - FOnInitializeFooterCell: TcxTreeListReportLinkInitializeFooterCellEvent; - FOnInitializeHeaderCell: TcxTreeListReportLinkInitializeHeaderCellEvent; - FOnInitializeIndentCell: TcxTreeListReportLinkInitializeIndentCellEvent; - function GetActiveStyles: TcxTreeListReportLinkStyles; - function GetDesignWindow: TdxfmTreeListReportLinkDesignWindow; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowByNode(Node: TcxTreeListNode): TdxReportCell; - function GetReportRowCount: Integer; - function GetOptionsExpanding: TcxTreeListReportLinkOptionsExpanding; - function GetOptionsFormatting: TcxTreeListReportLinkOptionsFormatting; - function GetOptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage; - function GetOptionsPagination: TcxTreeListReportLinkOptionsPagination; - function GetOptionsPreview: TcxTreeListReportLinkOptionsPreview; - function GetOptionsRefinements: TcxTreeListReportLinkOptionsRefinements; - function GetOptionsSelection: TcxTreeListReportLinkOptionsSelection; - function GetOptionsSize: TcxTreeListReportLinkOptionsSize; - function GetOptionsView: TcxTreeListReportLinkOptionsView; - function GetStyles: TcxTreeListReportLinkStyles; - function GetTreeList: TcxCustomTreeList; - procedure SetOnCustomDrawBandCell(Value: TcxTreeListReportLinkCustomDrawBandCellEvent); - procedure SetOnCustomDrawCell(Value: TcxTreeListReportLinkCustomDrawCellEvent); - procedure SetOnCustomDrawFooterCell(Value: TcxTreeListReportLinkCustomDrawFooterCellEvent); - procedure SetOnCustomDrawHeaderCell(Value: TcxTreeListReportLinkCustomDrawHeaderCellEvent); - procedure SetOnCustomDrawIndentCell(Value: TcxTreeListReportLinkCustomDrawIndentCellEvent); - procedure SetOptionsExpanding(Value: TcxTreeListReportLinkOptionsExpanding); - procedure SetOptionsFormatting(Value: TcxTreeListReportLinkOptionsFormatting); - procedure SetOptionsOnEveryPage(Value: TcxTreeListReportLinkOptionsOnEveryPage); - procedure SetOptionsPagination(Value: TcxTreeListReportLinkOptionsPagination); - procedure SetOptionsPreview(Value: TcxTreeListReportLinkOptionsPreview); - procedure SetOptionsRefinements(Value: TcxTreeListReportLinkOptionsRefinements); - procedure SetOptionsSelection(Value: TcxTreeListReportLinkOptionsSelection); - procedure SetOptionsSize(Value: TcxTreeListReportLinkOptionsSize); - procedure SetOptionsView(Value: TcxTreeListReportLinkOptionsView); - procedure SetStyles(Value: TcxTreeListReportLinkStyles); - protected - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure ConvertCoords; override; - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - function GetBreakPagesByHardDelimiters: Boolean; override; - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - function GetUseHardVertDelimiters: Boolean; override; - procedure InternalRestoreFromOriginal; override; - function IsDrawFootersOnEveryPage: Boolean; override; - function IsDrawHeadersOnEveryPage: Boolean; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - procedure MakeHardDelimiters(AReportCells: TdxReportCells; AVertDelimiters: TList); override; - - function GetAreNativeStylesAvailable: Boolean; override; - function GetStylesClass: TdxCustomReportLinkStylesClass; override; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; override; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; override; - procedure PrepareConstruct; override; - - procedure DoCustomDrawBandCell(ACanvas: TCanvas; ABand: TcxTreeListBand; - AnItem: TdxReportCellImage; var ADone: Boolean); dynamic; - procedure DoCustomDrawCell(ACanvas: TCanvas; ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn; AnItem: TAbstractdxReportCellData; - var ADone: Boolean); dynamic; - procedure DoCustomDrawFooterCell(ACanvas: TCanvas; AColumn: TcxTreeListColumn; - AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawHeaderCell(ACanvas: TCanvas; AColumn: TcxTreeListColumn; - AnItem: TdxReportCellImage; var ADone: Boolean); dynamic; - procedure DoCustomDrawIndentCell(ACanvas: TCanvas; ANode: TcxTreeListNode; - AnIndex: Integer; AnItem: TAbstractdxReportCellData; var ADone: Boolean); dynamic; - procedure DoGetCustomPageBreaks; dynamic; - procedure DoInitializeBandCell(ABand: TcxTreeListBand; AnItem: TdxReportCellImage); dynamic; - procedure DoInitializeCell(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; AnItem: TAbstractdxReportCellData); dynamic; - procedure DoInitializeFooterCell( AColumn: TcxTreeListColumn; ASummaryCellIndex: Integer; AnItem: TdxReportCellString); dynamic; - procedure DoInitializeHeaderCell(AColumn: TcxTreeListColumn; AnItem: TdxReportCellImage); dynamic; - procedure DoInitializeIndentCell(ANode: TcxTreeListNode; AnIndex: Integer; AnItem: TAbstractdxReportCellData); dynamic; - - function GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; override; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; override; - function GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; override; - function GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; override; - function GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; override; - function GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; override; - function GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; override; - function GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; override; - function GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; override; - - procedure AddReportRow(AReportRow: TdxReportCell); - procedure AddVerticalHardDelimiter(ADelimiter: TdxReportCell); overload; - procedure AddVerticalHardDelimiter(ADelimiter: Integer); overload; - - function CreateBuilder: TcxTreeListReportLinkBuilder; virtual; - class function GetBuilderClass: TcxTreeListReportLinkBuilderClass; virtual; - - function ExtractIndentIndex(AData: Integer): Integer; - function GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; - out ADrawInfo: TcxTreeListCellCustomDrawInfo): TcxTreeListAttributeID; virtual; - function IsCustomDrawn(AnAttributeID: TcxTreeListAttributeID): Boolean; virtual; - function MakeIndentIndex(AnIndex: Integer): DWORD; - - property ActiveStyles: TcxTreeListReportLinkStyles read GetActiveStyles; - property Builder: TcxTreeListReportLinkBuilder read FBuilder; - property DelimitersHardVert: TList read FDelimitersHardVert; - property HostInfoServices: TcxTreeListAttributeHostInfoServices read FHostInfoServices; - property TreeList: TcxCustomTreeList read GetTreeList; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - procedure AddPageBreak(ANode: TcxTreeListNode); overload; - procedure AddPageBreak(const ANodes: array of TcxTreeListNode); overload; - procedure AddPageBreak(const ANodes: TcxTreeListNodeArray); overload; - procedure AddPageBreak(ANodes: TList); overload; // List of TcxCustomGridRecord - - property DesignWindow: TdxfmTreeListReportLinkDesignWindow read GetDesignWindow; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property ReportRowsByNode[Node: TcxTreeListNode]: TdxReportCell read GetReportRowByNode; - property ReportRowCount: Integer read GetReportRowCount; - published - property Color; - property Font; - property OptionsExpanding: TcxTreeListReportLinkOptionsExpanding read GetOptionsExpanding write SetOptionsExpanding; - property OptionsFormatting: TcxTreeListReportLinkOptionsFormatting read GetOptionsFormatting write SetOptionsFormatting; - property OptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage read GetOptionsOnEveryPage write SetOptionsOnEveryPage; - property OptionsPagination: TcxTreeListReportLinkOptionsPagination read GetOptionsPagination write SetOptionsPagination; - property OptionsPreview: TcxTreeListReportLinkOptionsPreview read GetOptionsPreview write SetOptionsPreview; - property OptionsRefinements: TcxTreeListReportLinkOptionsRefinements read GetOptionsRefinements write SetOptionsRefinements; - property OptionsSelection: TcxTreeListReportLinkOptionsSelection read GetOptionsSelection write SetOptionsSelection; - property OptionsSize: TcxTreeListReportLinkOptionsSize read GetOptionsSize write SetOptionsSize; - property OptionsView: TcxTreeListReportLinkOptionsView read GetOptionsView write SetOptionsView; - property ScaleFonts; - property StyleRepository; - property Styles: TcxTreeListReportLinkStyles read GetStyles write SetStyles; - property SupportedCustomDraw; - - property OnCustomDrawBandCell: TcxTreeListReportLinkCustomDrawBandCellEvent read FOnCustomDrawBandCell - write SetOnCustomDrawBandCell; - property OnCustomDrawCell: TcxTreeListReportLinkCustomDrawCellEvent read FOnCustomDrawCell - write SetOnCustomDrawCell; - property OnCustomDrawFooterCell: TcxTreeListReportLinkCustomDrawFooterCellEvent read FOnCustomDrawFooterCell - write SetOnCustomDrawFooterCell; - property OnCustomDrawHeaderCell: TcxTreeListReportLinkCustomDrawHeaderCellEvent read FOnCustomDrawHeaderCell - write SetOnCustomDrawHeaderCell; - property OnCustomDrawIndentCell: TcxTreeListReportLinkCustomDrawIndentCellEvent read FOnCustomDrawIndentCell - write SetOnCustomDrawIndentCell; - property OnGetCustomPageBreaks: TcxTreeListReportLinkGetCustomPageBreaksEvent read FOnGetCustomPageBreaks write FOnGetCustomPageBreaks; - property OnInitializeBandCell: TcxTreeListReportLinkInitializeBandCellEvent read FOnInitializeBandCell - write FOnInitializeBandCell; - property OnInitializeCell: TcxTreeListReportLinkInitializeCellEvent read FOnInitializeCell - write FOnInitializeCell; - property OnInitializeFooterCell: TcxTreeListReportLinkInitializeFooterCellEvent read FOnInitializeFooterCell - write FOnInitializeFooterCell; - property OnInitializeHeaderCell: TcxTreeListReportLinkInitializeHeaderCellEvent read FOnInitializeHeaderCell - write FOnInitializeHeaderCell; - property OnInitializeIndentCell: TcxTreeListReportLinkInitializeIndentCellEvent read FOnInitializeIndentCell - Write FOnInitializeIndentCell; - end; - - TcxTreeListReportLink = class(TcxTreeListCustomReportLink) - private - function GetTreeList: TcxTreeList; - public - property TreeList: TcxTreeList read GetTreeList; - end; - - TcxDBTreeListReportLink = class(TcxTreeListCustomReportLink) - private - function GetDBTreeList: TcxDBTreeList; - public - property DBTreeList: TcxDBTreeList read GetDBTreeList; - end; - - TcxVirtualTreeListReportLink = class(TcxTreeListCustomReportLink) - private - function GetVirtualTreeList: TcxVirtualTreeList; - public - property VirtualTreeList: TcxVirtualTreeList read GetVirtualTreeList; - end; - - TdxfmTreeListReportLinkDesignWindow = class(TdxfmCustomcxControlReportLinkDesignWindow) - PageControl1: TPageControl; - tshView: TTabSheet; - lblShow: TLabel; - imgShow: TImage; - bvlShow: TBevel; - lblOnEveryPage: TLabel; - imgOnEveryPage: TImage; - bvlOnEveryPage: TBevel; - bvlWarningHost: TBevel; - chbxShowBands: TCheckBox; - chbxShowHeaders: TCheckBox; - chbxShowFooters: TCheckBox; - chbxShowExpandButtons: TCheckBox; - chbxBandsOnEveryPage: TCheckBox; - chbxHeadersOnEveryPage: TCheckBox; - chbxFootersOnEveryPage: TCheckBox; - chbxShowTreeLines: TCheckBox; - tshBehaviors: TTabSheet; - tshFormatting: TTabSheet; - lblLookAndFeel: TLabel; - bvlLookAndFeel: TBevel; - imgLookAndFeel: TImage; - imgRefinements: TImage; - lblRefinements: TLabel; - bvlRefinements: TBevel; - cbxLookAndFeel: TComboBox; - chbxFlatCheckMarks: TCheckBox; - chbxDisplayGraphicsAsText: TCheckBox; - chbxTransparentGraphics: TCheckBox; - tshPreview: TTabSheet; - lblPreviewOptions: TLabel; - bvlPreviewOptions: TBevel; - lblPreviewMaxLineCount: TLabel; - bvlPreviewMaxLineCountHost: TBevel; - imgPreview: TImage; - chbxPreviewVisible: TCheckBox; - chbxPreviewAutoHeight: TCheckBox; - pnlPreview: TPanel; - cxStyleRepository1: TcxStyleRepository; - styleBandHeaders: TcxStyle; - styleStandard: TcxStyle; - stylePreview: TcxStyle; - styleCardShadow: TcxStyle; - chbxSuppressBackgroundBitmaps: TCheckBox; - tshStyles: TTabSheet; - bvlStyles: TBevel; - bvlStyleSheets: TBevel; - lblStyleSheets: TLabel; - btnStyleColor: TButton; - btnStyleFont: TButton; - btnStyleBackgroundBitmap: TButton; - chbxUseNativeStyles: TCheckBox; - cbxStyleSheets: TComboBox; - btnStyleSheetNew: TButton; - btnStyleSheetCopy: TButton; - btnStyleSheetDelete: TButton; - btnStylesSaveAs: TButton; - btnStyleSheetRename: TButton; - pmStyles: TPopupMenu; - miStyleFont: TMenuItem; - miStyleColor: TMenuItem; - miStyleBackgroundBitmap: TMenuItem; - milLine: TMenuItem; - miStylesSaveAs: TMenuItem; - btnStyleBackgroundBitmapClear: TButton; - btnStyleRestoreDefaults: TButton; - miLine2: TMenuItem; - miLine3: TMenuItem; - miStyleBackgroundBitmapClear: TMenuItem; - miStyleRestoreDefaults: TMenuItem; - bvlStylesHost: TBevel; - ilStylesPopup: TImageList; - PreviewTreeList: TcxTreeList; - colManufacturerName: TcxTreeListColumn; - colManufacturerLogo: TcxTreeListColumn; - colManufacturerCountry: TcxTreeListColumn; - colCarModel: TcxTreeListColumn; - colCarIsSUV: TcxTreeListColumn; - chbxShowBorders: TCheckBox; - miStylesSelectAll: TMenuItem; - miLine4: TMenuItem; - chbxConsumeSelectionStyle: TCheckBox; - bvlRefinementsSeparator: TBevel; - Bevel2: TBevel; - pnlBehaviors: TPanel; - pnlSelection: TPanel; - lblSelection: TLabel; - imgSelection: TImage; - bvlSelection: TBevel; - chbxProcessSelection: TCheckBox; - chbxProcessExactSelection: TCheckBox; - pnlExpanding: TPanel; - lblExpanding: TLabel; - imgExpanding: TImage; - bvlExpanding: TBevel; - chbxExpandNodes: TCheckBox; - pnlSize: TPanel; - lblSize: TLabel; - bvlSize: TBevel; - imgGridSize: TImage; - chbxAutoWidth: TCheckBox; - pnlSeparators: TPanel; - lblSeparators: TLabel; - bvlSeparator: TBevel; - lblSeparatorsThickness: TLabel; - lblSeparatorsColor: TLabel; - bvlSeparatorThicknessHost: TBevel; - bvlSeparatorColorHost: TBevel; - imgSeparators: TImage; - chbxExplicitlyExpandNodes: TCheckBox; - lblPreviewWindow: TStaticText; - Label1: TLabel; - lblUseNativeStyles: TLabel; - procedure LookAndFeelChange(Sender: TObject); - procedure OptionsRefinementsClick(Sender: TObject); - procedure PreviewVisibleClick(Sender: TObject); - procedure PreviewAutoHeightClick(Sender: TObject); - procedure OptionsSelectionClick(Sender: TObject); - procedure OptionsExpandingClick(Sender: TObject); - procedure OptionsViewClick(Sender: TObject); - procedure OptionsOnEveryPageClick(Sender: TObject); - procedure OptionsSizeClick(Sender: TObject); - procedure OptionsFormattingClick(Sender: TObject); - procedure pmStylesPopup(Sender: TObject); - procedure StyleColorClick(Sender: TObject); - procedure StyleFontClick(Sender: TObject); - procedure StyleBackgroundBitmapClick(Sender: TObject); - procedure cbxStyleSheetsClick(Sender: TObject); - procedure btnStyleSheetNewClick(Sender: TObject); - procedure btnStyleSheetCopyClick(Sender: TObject); - procedure btnStyleSheetDeleteClick(Sender: TObject); - procedure btnStyleSheetRenameClick(Sender: TObject); - procedure StylesSaveAsClick(Sender: TObject); - procedure cbxStyleSheetsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure lbxStylesClick(Sender: TObject); - procedure StyleBackgroundBitmapClearClick(Sender: TObject); - procedure StyleRestoreDefaultsClick(Sender: TObject); - procedure miStylesSelectAllClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure cbxStyleSheetsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure lblUseNativeStylesClick(Sender: TObject); - procedure PreviewTreeListCustomDrawBandHeaderCell( - Sender: TcxCustomTreeList; ACanvas: TcxCanvas; - AViewInfo: TcxTreeListHeaderCellViewInfo; var ADone: Boolean); - procedure PreviewTreeListCustomDrawDataCell(Sender: TcxCustomTreeList; - ACanvas: TcxCanvas; AViewInfo: TcxTreeListEditCellViewInfo; - var ADone: Boolean); - procedure PreviewTreeListCustomDrawFooterCell( - Sender: TcxCustomTreeList; ACanvas: TcxCanvas; - AViewInfo: TcxTreeListFooterCellViewInfo; var ADone: Boolean); - procedure PreviewTreeListCustomDrawHeaderCell( - Sender: TcxCustomTreeList; ACanvas: TcxCanvas; - AViewInfo: TcxTreeListHeaderCellViewInfo; var ADone: Boolean); - private - lbxStyles: TdxStylesListBox; - sePreviewMaxLineCount: TdxPSSpinEdit; - seSeparatorThickness: TdxPSSpinEdit; - ccbxSeparatorColor: TdxPSColorCombo; - wpIncorrectOnEveryPageState: TdxPSWarningPane; - - function GetActiveStyle: TcxStyle; - function GetHasSelectedStyles: Boolean; - function GetHasSelectedStylesWithAssignedBitmap: Boolean; - function GetReportLink: TcxTreeListCustomReportLink; - - procedure PreviewMaxLineCountChanged(Sender: TObject); - procedure SeparatorColorChanged(Sender: TObject); - procedure SeparatorThicknessChanged(Sender: TObject); - - function CanSelectAllStyles: Boolean; - procedure CreateControls; - procedure CustomDrawBorders(ACanvas: TcxCanvas; const R: TRect); - procedure CustomDrawCheckMark(ACanvas: TcxCanvas; AViewInfo: TcxTreeListEditCellViewInfo); - procedure CustomDrawFooter(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxTreeListFooterCellViewInfo); - procedure CustomDrawHeader(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxTreeListHeaderCellViewInfo); - procedure CustomDrawTextRect(ACanvas: TcxCanvas; R: TRect; const AText: string; - AnAlignmentHorz: TAlignment; AnAlignmentVert: TcxAlignmentVert; AParams: TcxViewParams); - function ExtractAlignmentHorz(AViewInfo: TcxTreeListEditCellViewInfo): TAlignment; - function ExtractAlignmentVert(AViewInfo: TcxTreeListEditCellViewInfo): TcxAlignmentVert; - procedure InitializePreviewTreeList; - procedure InitializePreviewTreeListStyles; - procedure LoadDataIntoPreviewTreeList; - procedure RecreateStylesListBox; - procedure RestoreSelectedStyles(AList: TList); - procedure SaveSelectedStyles(AList: TList); - procedure SetActivePage; - procedure UpdatePreviewTreeListStyles(const ACaption: string; AStyle: TcxStyle); - procedure WarningPaneUpdate; - - procedure SetOptionsExpandingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsFormattingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsOnEveryPageByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsRefinementsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsSelectionByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsSizeByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsViewByIndex(Index: Integer; Value: Boolean); - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - - function GetDesignerTabIndex: Integer; override; - procedure SetDesignerTabIndex(Value: Integer); override; - - procedure DoActiveStyleSheetChanged; override; - procedure DoFormActivated(AnActive: Boolean); override; - procedure DoRefreshStylesList; override; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); override; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); override; - - procedure GetSelectedStyleNames(AStrings: TStrings); override; - procedure GetStyleNames(out AStrings: TStrings); override; - procedure GetStyleSheetNames(out AStrings: TStrings); override; - - property ActiveStyle: TcxStyle read GetActiveStyle; - property HasSelectedStyles: Boolean read GetHasSelectedStyles; - property HasSelectedStylesWithAssignedBitmap: Boolean read GetHasSelectedStylesWithAssignedBitmap; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property ReportLink: TcxTreeListCustomReportLink read GetReportLink; - end; - -const - dxPSDefaultTreeListNodeSeparatorColor: TColor = clBtnShadow; - -implementation - -{$R *.dfm} - -{ 634x420 - DesignWindow } -{.3 - chbxTransparentRichEdits } - -uses - {$IFDEF DELPHI6} - Variants, - {$ENDIF} Forms, Registry, dxThemeManager, cxDataStorage, cxDataUtils, - cxImage, cxCheckBox, dxPSGlbl, dxPSRes, dxPSImgs, cxDrawTextUtils, dxPSPopupMan, - dxPSUtl, dxBkgnd, Math; - -const - CellSidesMap: array[TcxTreeListGridLines] of TdxCellSides = ([], csTopBottom, csLeftRight, csAll); - SortOrderMap: array[TcxDataSortOrder] of TdxCellSortOrder = (csoNone, csoUp, csoDown); - TreeLinesStyleMap: array[TcxTreeListTreeLineStyle] of TdxPSTreeLineStyle = (tlsDot, tlsDot, tlsSolid); - - DefaultDataRowLineHeight = 19; - DefaultExpandButtonSize = 9; - DefaultIndentWidth = 15; - ExpandButtonInteriorColors: array[Boolean] of TColor = (clWindow, clBtnShadow); - FooterItemInflateHorz = 2; - FooterItemInflateVert = 3; - - NodeIndentMask = $00000FF0; - NodeIndentOffset = $00000004; - -var - FDefaultdxPScxTreeListLinkStyleSheet: TcxTreeListReportLinkStyleSheet; - -type - TcxTreeListNodeHelperFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(Node: TcxTreeListNode): TcxTreeListNodeHelperClass; - public - class function Instance: TcxTreeListNodeHelperFactory; reintroduce; overload; - property HelperClasses[Node: TcxTreeListNode]: TcxTreeListNodeHelperClass read GetHelperClass; default; - end; - - - TcxCustomTreeListAccess = class(TcxCustomTreeList); - TcxTreeListColumnAccess = class(TcxTreeListColumn); - TcxTreeListBandAccess = class(TcxTreeListBand); - -{ Helpers } - -{ CustomTreeList Helpers } - -procedure CustomTreeList_DoGetLevelImages(AInstance: TcxCustomTreeList; - ALevel: Integer; var AImages, AStateImages: TCustomImageList); -begin - if Assigned(TcxCustomTreeListAccess(AInstance).OnGetLevelImages) then - TcxCustomTreeListAccess(AInstance).OnGetLevelImages(AInstance, ALevel, AImages, - AStateImages); -end; - -function CustomTreeList_DoIsGroupNode(AInstance: TcxCustomTreeList; ANode: TcxTreeListNode): Boolean; -begin - Result := TcxCustomTreeListAccess(AInstance).DoIsGroupNode(ANode); -end; - -function CustomTreeList_GetImages(AInstance: TcxCustomTreeList): TCustomImageList; -begin - Result := TcxCustomTreeListAccess(AInstance).Images; -end; - -function CustomTreeList_GetLookAndFeel(AInstance: TcxCustomTreeList): TcxLookAndFeel; -begin - Result := TcxCustomTreeListAccess(AInstance).LookAndFeel; -end; - -function CustomTreeList_GetLookAndFeelPainter(AInstance: TcxCustomTreeList): TcxCustomLookAndFeelPainterClass; -begin - Result := TcxCustomTreeListAccess(AInstance).LookAndFeelPainter; -end; - -function CustomTreeList_GetOptionsSelection(AInstance: TcxCustomTreeList): TcxTreeListOptionsSelection; -begin - Result := TcxCustomTreeListAccess(AInstance).OptionsSelection; -end; - -function CustomTreeList_GetOptionsView(AInstance: TcxCustomTreeList): TcxTreeListOptionsView; -begin - Result := TcxCustomTreeListAccess(AInstance).OptionsView; -end; - -function CustomTreeList_GetPreview(AInstance: TcxCustomTreeList): TcxTreeListPreview; -begin - Result := TcxCustomTreeListAccess(AInstance).Preview; -end; - -function CustomTreeList_GetStateImages(AInstance: TcxCustomTreeList): TCustomImageList; -begin - Result := TcxCustomTreeListAccess(AInstance).StateImages; -end; - -function CustomTreeList_GetStyles(AInstance: TcxCustomTreeList): TcxTreeListStyles; -begin - Result := TcxCustomTreeListAccess(AInstance).Styles; -end; - -function CustomTreeList_GetVisibleBand(AInstance: TcxCustomTreeList; - Index: Integer): TcxTreeListBand; -begin - Result := TcxCustomTreeListAccess(AInstance).Bands.VisibleItems[Index]; -end; - -function CustomTreeList_GetVisibleBandCount(AInstance: TcxCustomTreeList): Integer; -begin - Result := TcxCustomTreeListAccess(AInstance).Bands.VisibleItemCount; -end; - -function CustomTreeList_GetVisibleColumn(AInstance: TcxCustomTreeList; - Index: Integer): TcxTreeListColumn; -begin - Result := TcxCustomTreeListAccess(AInstance).VisibleColumns[Index]; -end; - -function CustomTreeList_GetVisibleColumnCount(AInstance: TcxCustomTreeList): Integer; -begin - Result := TcxCustomTreeListAccess(AInstance).VisibleColumnCount; -end; - -{ TreeListColumn Helpers } - -function TreeListColumn_DoGetEditProperties(AInstance: TcxTreeListColumn; - ANode: TcxTreeListNode): TcxCustomEditProperties; -begin - Result := TcxTreeListColumnAccess(AInstance).DoGetEditProperties(ANode); -end; - -{ Utilities } - -function DefaultdxPScxTreeListLinkStyleSheet: TcxTreeListReportLinkStyleSheet; - - function CreateStyle(AColor: TColor; AFontColor: TColor): TcxStyle; - begin - Result := TcxStyle.Create(DefaultdxPScxTreeListLinkStyleSheet); - with Result do - begin - Color := AColor; - Font.Name := dxPSCore.dxPSDefaultFontName; - Font.Color := AFontColor; - end; - end; - -begin - if FDefaultdxPScxTreeListLinkStyleSheet = nil then - begin - FDefaultdxPScxTreeListLinkStyleSheet := TcxTreeListReportLinkStyleSheet.Create(nil); - with FDefaultdxPScxTreeListLinkStyleSheet.Styles as TcxTreeListReportLinkStyles do - begin - BandHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Content := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ContentEven := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ContentOdd := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - Footer := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - FooterRow := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Header := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Preview := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - Selection := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - end; - end; - Result := FDefaultdxPScxTreeListLinkStyleSheet; -end; - -function IsValidPointer(const AData: Integer): Boolean; -begin - //Result := (HInstance = 0) or (FindHInstance(Pointer(AData)) = HInstance); - Result := DWORD(AData) > HInstance; -end; - -{ TcxTreeListNodeHelperFactory } - -function cxTreeListNodeHelperFactory: TcxTreeListNodeHelperFactory; -begin - Result := TcxTreeListNodeHelperFactory.Instance; -end; - -class function TcxTreeListNodeHelperFactory.Instance: TcxTreeListNodeHelperFactory; -begin - Result := inherited Instance as TcxTreeListNodeHelperFactory; -end; - -function TcxTreeListNodeHelperFactory.GetHelperClass(Node: TcxTreeListNode): TcxTreeListNodeHelperClass; -begin - Result := TcxTreeListNodeHelperClass(PairClasses[Node.ClassType]); -end; - -{ CLR Accessors } - - -{ TcxTreeListReportLinkRowProducer } - -constructor TcxTreeListReportLinkRowProducer.Create(ABuilder: TcxTreeListReportLinkBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TcxTreeListReportLinkRowProducer.Adapter: TcxTreeListAdapter; -begin - Result := Builder.Adapter; -end; - -function TcxTreeListReportLinkRowProducer.Builder: TcxTreeListReportLinkBuilder; -begin - Result := FBuilder; -end; - -function TcxTreeListReportLinkRowProducer.Formatter: TcxTreeListReportLinkFormatter; -begin - Result := Builder.Formatter; -end; - -function TcxTreeListReportLinkRowProducer.Produce(AHostInfo: TcxTreeListAttributeHostInfo): TdxReportCell; -begin - CalculateRowHeight; - - CreateRowHost(AHostInfo); - CreateRow; - - if AutoHeight then - begin - CalculateRowAutoHeight; - FixupRowHeight; - end; - AfterCalculateRowHeight; - - Inc(AHostInfo.Origin.Y, RowHeight); - Result := Host; -end; - -procedure TcxTreeListReportLinkRowProducer.AfterCalculateRowHeight; -begin -end; - -procedure TcxTreeListReportLinkRowProducer.CalculateRowAutoHeight; -var - DC: HDC; - MaxRowHeight, I, V: Integer; - Item: TdxReportVisualItem; -begin - DC := Self.DC; - MaxRowHeight := 0; - for I := 0 to Row.DataItemCount - 1 do - begin - Item := Row.DataItems[I]; - if DoesItemParticipateInRowAutoHeightCalculation(Item) then - begin - V := Item.MeasureContentHeight(DC); - if MaxRowHeight < V then MaxRowHeight := V; - end; - end; - // v3.1 - for I := 0 to Row.CellCount - 1 do - begin - Item := Row.Cells[I]; - if DoesItemParticipateInRowAutoHeightCalculation(Item) then - begin - V := Item.MeasureContentHeight(DC); - if MaxRowHeight < V then MaxRowHeight := V; - end; - end; - if RowHeight < MaxRowHeight then - RowHeight := MaxRowHeight; -end; - -procedure TcxTreeListReportLinkRowProducer.CalculateRowHeight; -begin - FRowHeight := LineCount * LineHeight; -end; - -procedure TcxTreeListReportLinkRowProducer.CreateRow; -begin - FRow := TdxReportCell.Create(Host); - FRow.BoundsRect := MakeBounds(0, 0, RowWidth, RowHeight); - InitializeRow; -end; - -procedure TcxTreeListReportLinkRowProducer.CreateRowHost(const AHostInfo: TcxTreeListAttributeHostInfo); -begin - FHost := TdxReportCell.Create(AHostInfo.Parent); - FHost.BoundsRect := MakeBounds(AHostInfo.Origin.X, AHostInfo.Origin.Y, RowWidth, RowHeight); - Formatter.DoInitializeHost(Host); -end; - -function TcxTreeListReportLinkRowProducer.DoesItemParticipateInRowAutoHeightCalculation( - AnItem: TdxReportVisualItem): Boolean; -begin - Result := True; -end; - -procedure TcxTreeListReportLinkRowProducer.FixupRowDataHeight; -var - I: Integer; -begin - for I := 0 to Row.DataItemCount - 1 do - Row.DataItems[I].Height := RowHeight; - // v3.1 - for I := 0 to Row.CellCount - 1 do - Row.Cells[I].Height := RowHeight; -end; - -procedure TcxTreeListReportLinkRowProducer.FixupRowHeight; -begin - FixupRowItselfHeight; - FixupRowDataHeight; -end; - -procedure TcxTreeListReportLinkRowProducer.FixupRowItselfHeight; -begin - Host.Height := RowHeight; - Row.Height := RowHeight; -end; - -procedure TcxTreeListReportLinkRowProducer.InitializeRow; -begin -end; - -function TcxTreeListReportLinkRowProducer.GetAutoHeight: Boolean; -begin - Result := LineCount = 1; -end; - -function TcxTreeListReportLinkRowProducer.GetLineCount: Integer; -begin - Result := 1; -end; - -function TcxTreeListReportLinkRowProducer.GetLineHeight: Integer; -begin - Result := 20; -end; - -function TcxTreeListReportLinkRowProducer.GetDC: HDC; -begin - Result := Formatter.DC; -end; - -function TcxTreeListReportLinkRowProducer.GetIndentWidth: Integer; -begin - Result := Adapter.IndentWidth; -end; - -function TcxTreeListReportLinkRowProducer.GetRowWidth: Integer; -begin - Result := Formatter.ViewWidth; -end; - -{ TcxTreeListReportLinkNodeSeparatorProducer } - -function TcxTreeListReportLinkNodeSeparatorProducer.Produce(AHostInfo: TcxTreeListAttributeHostInfo): TdxReportCell; -begin - Result := inherited Produce(AHostInfo); - FItem := GetItemClass.Create(Row); - FItem.BoundsRect := MakeRect(0, 0, RowWidth, RowHeight); - InitializeItem; -end; - -procedure TcxTreeListReportLinkNodeSeparatorProducer.InitializeItem; -begin - Formatter.DoInitializeNodeSeparator(FItem); -end; - -procedure TcxTreeListReportLinkNodeSeparatorProducer.InitializeRow; -begin - Formatter.DoInitializeNodeSeparatorRow(Row); -end; - -function TcxTreeListReportLinkNodeSeparatorProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxTreeListReportLinkNodeSeparatorProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetNodeSeparatorClass; -end; - -function TcxTreeListReportLinkNodeSeparatorProducer.GetLineHeight: Integer; -begin - Result := Formatter.NodeSeparatorThickness; -end; - -{ TcxTreeListReportLinkRowSubItemsProducer } - -procedure TcxTreeListReportLinkRowSubItemsProducer.CreateDataItems(AParent: TdxReportCell); -var - I: Integer; - AItem: TAbstractdxReportCellData; -begin - for I := 0 to SubItemCount - 1 do - if HasSubItem[I] then - begin - AItem := SubItemClasses[I].Create(AParent); - AItem.BoundsRect := SubItemBounds[I]; - InitializeSubItem(AItem, I); - end; -end; - -procedure TcxTreeListReportLinkRowSubItemsProducer.CreateRow; -begin - inherited CreateRow; - CreateDataItems(Row); -end; - -procedure TcxTreeListReportLinkRowSubItemsProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin -end; - -function TcxTreeListReportLinkRowSubItemsProducer.GetHasSubItem(Index: Integer): Boolean; -begin - Result := True; -end; - -function TcxTreeListReportLinkRowSubItemsProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := MakeRect(0, 0, -1, -1); -end; - -function TcxTreeListReportLinkRowSubItemsProducer.GetSubItemCount: Integer; -begin - Result := Formatter.ColumnCount; -end; - -function TcxTreeListReportLinkRowSubItemsProducer.GetColumn(Index: Integer): TcxTreeListColumn; -begin - Result := Formatter.Columns[Index]; -end; - -{ TcxTreeListReportLinkBandsProducer } - -function TcxTreeListReportLinkBandsProducer.GetSubItemCount: Integer; -begin - Result := Formatter.BandCount; -end; - -procedure TcxTreeListReportLinkBandsProducer.CalculateRowHeight; -begin - FRowHeight := Formatter.ItemPlaceController.Height; -end; - -procedure TcxTreeListReportLinkBandsProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeBandRow(Row); -end; - -procedure TcxTreeListReportLinkBandsProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - inherited; - Formatter.DoInitializeBandItem(ASubItem, AnIndex); - Formatter.DoReportLinkInitializeBandItem(ASubItem, AnIndex); -end; - -function TcxTreeListReportLinkBandsProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxTreeListReportLinkBandsProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetBandItemBounds(Index); -end; - -function TcxTreeListReportLinkBandsProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetBandItemClass(Index); -end; - -{ TcxTreeListReportLinkBandedProducer } - -constructor TcxTreeListReportLinkBandedRowProducer.Create(ABuilder: TcxTreeListReportLinkBuilder); -begin - inherited Create(ABuilder); - FIndents := TList.Create; -end; - -destructor TcxTreeListReportLinkBandedRowProducer.Destroy; -begin - FIndents.Free; - inherited Destroy; -end; - -function TcxTreeListReportLinkBandedRowProducer.Produce(AHostInfo: TcxTreeListAttributeHostInfo): TdxReportCell; -begin - FIndents.Clear; - Result := inherited Produce(AHostInfo); -end; - -procedure TcxTreeListReportLinkBandedRowProducer.AfterCalculateRowHeight; -begin - CreateIndentsRow(Row); -end; - -procedure TcxTreeListReportLinkBandedRowProducer.CreateBandedDataItems(AParent: TdxReportCell); -var - I: Integer; - ABandPlace: TcxTreeListCustomBandPlace; - AColumnPlace: TcxTreeListColumnPlace; - AItem: TAbstractdxReportCellData; -begin - ABandPlace := Formatter.ItemPlaceController.GetItemByBand(TcxTreeListBand(AParent.Data)); - for I := 0 to ABandPlace.ItemCount - 1 do - begin - AColumnPlace := ABandPlace.Items[I]; - AItem := GetBandedDataItemClass(AColumnPlace.Column).Create(AParent); - AItem.Data := Integer(AColumnPlace.Column); - AItem.BoundsRect := GetBandedDataItemBounds(AItem); - InitializeBandedDataItem(AItem); - end; -end; - -procedure TcxTreeListReportLinkBandedRowProducer.CreateBandedRows(AParent: TdxReportCell); -var - I: Integer; - ABandPlace: TcxTreeListCustomBandPlace; - ARow: TdxReportCell; - ABandRowBounds: TRect; -begin - for I := 0 to Formatter.ItemPlaceController.BottomItemCount - 1 do - begin - ABandPlace := Formatter.ItemPlaceController.BottomItems[I]; - ARow := TdxReportCell.Create(AParent); - ARow.Data := Integer(ABandPlace.Band); - ABandRowBounds := MakeBounds(ABandPlace.LeftBound, 0, ABandPlace.Width, RowHeight); - if ABandPlace.Band.ActuallyExpandable then - Inc(ABandRowBounds.Left, GetBandedRowIndent); - ARow.BoundsRect := ABandRowBounds; - InitializeBandedRow(ARow); - CreateBandedDataItems(ARow); - end; -end; - -procedure TcxTreeListReportLinkBandedRowProducer.CreateIndents(AParent: TdxReportCell); -var - I: Integer; - AIndentCell: TdxReportCellExpandButton; -begin - for I := 0 to IndentCount - 1 do - begin - AIndentCell := Formatter.GetNodeIndentClass.Create(AParent); - AIndentCell.BoundsRect := IndentBounds[I]; - InitializeIndent(AIndentCell, I); - FIndents.Add(AIndentCell); - end; -end; - -procedure TcxTreeListReportLinkBandedRowProducer.CreateIndentsRow(AParent: TdxReportCell); -var - AIndentsRow: TdxReportCell; - ABandPlace: TcxTreeListCustomBandPlace; -begin - ABandPlace := Formatter.ItemPlaceController.ItemsByBand[Adapter.TreeList.Bands.ExpandableBand]; - AIndentsRow := TdxReportCell.Create(AParent); - AIndentsRow.CellSides := []; - AIndentsRow.Data := Integer(TcxTreeListIndentsRowAttribute); - AIndentsRow.BoundsRect := MakeBounds(ABandPlace.LeftBound, 0, GetBandedRowIndent, RowHeight); - CreateIndents(AIndentsRow); -end; - -procedure TcxTreeListReportLinkBandedRowProducer.CreateRow; -begin - inherited CreateRow; - CreateBandedRows(Row); -end; - -function TcxTreeListReportLinkBandedRowProducer.GetBandedDataItemBounds( - AItem: TAbstractdxReportCellData): TRect; -begin - Result := dxPSGlbl.NullRect; -end; - -function TcxTreeListReportLinkBandedRowProducer.GetBandedDataItemClass( - AColumn: TcxTreeListColumn): TdxReportCellDataClass; -begin - Result := nil; -end; - -function TcxTreeListReportLinkBandedRowProducer.GetBandedRowIndent: Integer; -begin - Result := 0; -end; - -function TcxTreeListReportLinkBandedRowProducer.GetIndentArea: Integer; -begin - Result := IndentCount * IndentWidth; -end; - -function TcxTreeListReportLinkBandedRowProducer.GetIndentBound(AIndex: Integer): TRect; -begin - Result := MakeBounds(IndentWidth * AIndex, 0, IndentWidth, RowHeight); -end; - -function TcxTreeListReportLinkBandedRowProducer.GetIndentCount: Integer; -begin - Result := 0; -end; - -procedure TcxTreeListReportLinkBandedRowProducer.InitializeBandedDataItem( - AItem: TAbstractdxReportCellData); -begin -end; - -procedure TcxTreeListReportLinkBandedRowProducer.InitializeBandedRow( - ARow: TdxReportCell); -begin -end; - -procedure TcxTreeListReportLinkBandedRowProducer.InitializeIndent(AnIndent: TdxReportCellExpandButton; AnIndex: Integer); -begin -end; - -function TcxTreeListReportLinkBandedRowProducer.GetIndent(Index: Integer): TdxReportCellExpandButton; -begin - Result := FIndents[Index]; -end; - -{ TcxTreeListReportLinkFootersProducer } - -function TcxTreeListReportLinkFootersProducer.Produce(AHostInfo: TcxTreeListAttributeHostInfo; - AAttachedNode, ADataNode: TcxTreeListNode): TdxReportCell; -begin - FAttachedNode := AAttachedNode; - FDataNode := ADataNode; - Result := inherited Produce(AHostInfo); - FDataNode := nil; - FAttachedNode := nil; -end; - -procedure TcxTreeListReportLinkFootersProducer.CreateBandedDataItems(AParent: TdxReportCell); -var - I, ACellIndex: Integer; - AItem: TAbstractdxReportCellData; - AColumnPlace: TcxTreeListColumnPlace; - ABandPlace: TcxTreeListCustomBandPlace; -begin - ABandPlace := Formatter.ItemPlaceController.GetItemByBand(TcxTreeListBand(AParent.Data)); - for I := 0 to ABandPlace.ItemCount - 1 do - begin - AColumnPlace := ABandPlace.Items[I]; - for ACellIndex := 0 to Formatter.GetFooterCellCount(AColumnPlace.Column, FDataNode) - 1 do - begin - AItem := TdxReportCellString.Create(AParent); - AItem.BoundsRect := cxRectOffset(Formatter.GetFooterCellBounds(AColumnPlace.Column, - ACellIndex, IndentArea), -AParent.Left, 0); - Formatter.DoInitializeFooterCell(AItem, AColumnPlace.Column, ACellIndex, FDataNode); - end; - end; -end; - -function TcxTreeListReportLinkFootersProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxTreeListReportLinkFootersProducer.GetBandedRowIndent: Integer; -begin - Result := IndentArea; -end; - -function TcxTreeListReportLinkFootersProducer.GetIndentCount: Integer; -begin - if FAttachedNode <> nil then - begin - Result := Formatter.IndentCounts[FDataNode]; - if Adapter.OptionsView.GroupFooters = tlgfVisibleWhenExpanded then - Inc(Result); - end - else - Result := 0; -end; - -function TcxTreeListReportLinkFootersProducer.GetLineCount: Integer; -begin - Result := Adapter.FooterLineCount[FDataNode]; -end; - -function TcxTreeListReportLinkFootersProducer.GetLineHeight: Integer; -begin - Result := Formatter.FooterLineHeight; -end; - -procedure TcxTreeListReportLinkFootersProducer.InitializeBandedRow(ARow: TdxReportCell); -begin - inherited InitializeBandedRow(ARow); - Formatter.DoInitializeFooterBandedRow(ARow, IndentCount); -end; - -procedure TcxTreeListReportLinkFootersProducer.InitializeIndent( - AnIndent: TdxReportCellExpandButton; AnIndex: Integer); -begin - Formatter.DoInitializeFooterIndent(AnIndent, AnIndex, IndentCount, FAttachedNode); - Formatter.DoReportLinkInitializeNodeIndent(AnIndent, AnIndex, IndentCount, FAttachedNode); // TODO FooterIndentinitialize -end; - -procedure TcxTreeListReportLinkFootersProducer.InitializeRow; -begin - inherited InitializeRow; - Formatter.DoInitializeFooterRow(Row); -end; - -{ TcxTreeListReportLinkHeadersProducer } - -procedure TcxTreeListReportLinkHeadersProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeHeaderRow(Row); -end; - -procedure TcxTreeListReportLinkHeadersProducer.InitializeSubItem( - ASubItem: TAbstractdxReportCellData; AnIndex: Integer); -begin - inherited; - Formatter.DoInitializeHeaderItem(ASubItem, AnIndex); - Formatter.DoReportLinkInitializeHeaderItem(ASubItem, AnIndex); -end; - -function TcxTreeListReportLinkHeadersProducer.GetAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.HeaderAutoHeight; -end; - -function TcxTreeListReportLinkHeadersProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TcxTreeListReportLinkHeadersProducer.GetLineHeight: Integer; -begin - Result := Formatter.HeaderLineHeight; -end; - -function TcxTreeListReportLinkHeadersProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetHeaderItemBounds(Index); -end; - -function TcxTreeListReportLinkHeadersProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetHeaderItemClass(Index); -end; - -{ TcxTreeListReportLinkNodeProducer } - -function TcxTreeListReportLinkNodeProducer.Produce(AHostInfo: TcxTreeListAttributeHostInfo; - ANode: TcxTreeListNode): TdxReportCell; -begin - FNode := ANode; - Result := inherited Produce(AHostInfo); - FNode := nil; -end; - -procedure TcxTreeListReportLinkNodeProducer.CalculateRowAutoHeight; -var - AMaxRowHeight, ACurrentItemHeight: Integer; - I, J: Integer; - ACell: TdxReportCell; - AItem: TdxReportVisualItem; -begin - if CellAutoHeight then - begin - AMaxRowHeight := 0; - for I := 0 to Row.CellCount - 1 do - begin - ACell := Row.Cells[I]; - for J := 0 to ACell.DataItemCount - 1 do - begin - AItem := ACell.DataItems[J]; - if DoesItemParticipateInRowAutoHeightCalculation(AItem) then - begin - ACurrentItemHeight := AItem.MeasureContentHeight(Self.DC); - if AMaxRowHeight < ACurrentItemHeight then - AMaxRowHeight := ACurrentItemHeight; - end; - end; - end; - if RowHeight < AMaxRowHeight then - RowHeight := AMaxRowHeight; - end; - if HasPreview then - RowHeight := RowHeight + PreviewItem.Height; -end; - -procedure TcxTreeListReportLinkNodeProducer.CreateChecks(AParent: TdxReportCell); -begin - FCheck := Formatter.GetNodeCheckClass(FNode).Create(AParent); - FCheck.BoundsRect := CheckRect; - InitializeCheck; -end; - -procedure TcxTreeListReportLinkNodeProducer.CreateIcons(AParent: TdxReportCell); -begin - if Adapter.HasCheck(FNode) then CreateChecks(AParent); - if Formatter.HasStateImages(FNode) then CreateStateImages(AParent); - if Formatter.HasImages(FNode) then CreateImages(AParent); -end; - -procedure TcxTreeListReportLinkNodeProducer.CreateImages(AParent: TdxReportCell); -begin - FImage := Formatter.GetNodeImageClass.Create(AParent); - FImage.BoundsRect := ImageRect; - InitializeImage(ImageIndentIndex); -end; - -procedure TcxTreeListReportLinkNodeProducer.CreateIndents(AParent: TdxReportCell); -begin - inherited CreateIndents(AParent); - CreateIcons(AParent); -end; - -procedure TcxTreeListReportLinkNodeProducer.CreatePreview(AParent: TdxReportCell); -begin - FPreviewItem := Formatter.GetPreviewClass(PreviewColumn, FNode).Create(AParent); - PreviewItem.Left := PreviewIndent; - // We have to set Width before because we use this value for PreviewHeight calculation - PreviewItem.Width := RowWidth - PreviewItem.Left; - Formatter.DoInitializePreview(FPreviewItem, PreviewColumn, FNode); // v3.1 because cxRichEdit - PreviewItem.Height := PreviewHeight; - PreviewItem.AdjustContent(Formatter.DC); // v3.1 -end; - -procedure TcxTreeListReportLinkNodeProducer.CreateRow; -begin - inherited CreateRow; - if HasPreview then CreatePreview(Row); -end; - -procedure TcxTreeListReportLinkNodeProducer.CreateStateImages(AParent: TdxReportCell); -begin - FStateImage := Formatter.GetNodeStateImageClass.Create(AParent); - FStateImage.BoundsRect := StateImageRect; - InitializeStateImage(StateImageIndentIndex); -end; - -function TcxTreeListReportLinkNodeProducer.DoesItemParticipateInRowAutoHeightCalculation( - AnItem: TdxReportVisualItem): Boolean; -var - AColumn: TcxTreeListColumn; - AProperties: TcxCustomEditProperties; -begin - Result := AnItem <> FPreviewItem; - if Result and not IsItemIndent(AnItem) and IsDelphiObject(AnItem.Data) then - begin - AColumn := TcxTreeListColumn(AnItem.Data); - AProperties := Adapter.GetProperties(AColumn, FNode); - Result := dxPScxCommon.dxPSDataMaps.DoesItemParticipateInAutoHeightCalculation(AProperties); - end; -end; - -procedure TcxTreeListReportLinkNodeProducer.FixupRowDataHeight; -var - ANewHeight, I, J: Integer; - AItem: TdxReportVisualItem; - ACell: TdxReportCell; -begin - ANewHeight := RowHeight; - if PreviewItem <> nil then - begin - Dec(ANewHeight, PreviewItem.Height); - if PreviewPlace = tlppTop then - PreviewItem.Top := 0 - else - PreviewItem.Top := ANewHeight; - end; - - for I := 0 to Row.DataItemCount - 1 do - begin - if Row.DataItems[I] <> PreviewItem then - begin - Row.DataItems[I].Height := ANewHeight; - if HasPreview and (PreviewPlace = tlppTop) then - Row.DataItems[I].Top := Row.DataItems[I].Top + PreviewItem.Height; - end; - end; - - for I := 0 to Row.CellCount - 1 do - begin - ACell := Row.Cells[I]; - if HasPreview and (PreviewPlace = tlppTop) then - ACell.Top := ACell.Top + PreviewItem.Height; - if CellAutoHeight then - begin - ACell.Height := ANewHeight; - for J := 0 to ACell.DataItemCount - 1 do - begin - AItem := ACell.DataItems[J]; - AItem.Height := ANewHeight; - end; - end; - end; -end; - -procedure TcxTreeListReportLinkNodeProducer.InitializeBandedDataItem( - AItem: TAbstractdxReportCellData); -begin - inherited InitializeBandedDataItem(AItem); - Formatter.DoInitializeNodeItem(AItem, TcxTreeListColumn(AItem.Data), FNode, False); - Formatter.DoReportLinkInitializeNodeItem(AItem, TcxTreeListColumn(AItem.Data), FNode); -end; - -procedure TcxTreeListReportLinkNodeProducer.InitializeBandedRow(ARow: TdxReportCell); -begin - inherited InitializeBandedRow(ARow); - Formatter.DoInitializeNodeBandedRow(ARow); -end; - -procedure TcxTreeListReportLinkNodeProducer.InitializeCheck; -begin - Formatter.DoInitializeNodeCheck(FCheck, FNode, CheckIndentIndex); -end; - -procedure TcxTreeListReportLinkNodeProducer.InitializeImage(AnIndex: Integer); -begin - Formatter.DoInitializeNodeImage(Image, FNode, AnIndex); -end; - -procedure TcxTreeListReportLinkNodeProducer.InitializeIndent(AnIndent: TdxReportCellExpandButton; - AnIndex: Integer); -begin - Formatter.DoInitializeNodeIndent(AnIndent, AnIndex, IndentCount, FNode); - Formatter.DoReportLinkInitializeNodeIndent(AnIndent, AnIndex, IndentCount, FNode); -end; - -procedure TcxTreeListReportLinkNodeProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeNodeRow(Row, FNode); -end; - -procedure TcxTreeListReportLinkNodeProducer.InitializeStateImage(AnIndex: Integer); -begin - Formatter.DoInitializeNodeStateImage(StateImage, FNode, AnIndex); - Formatter.DoReportLinkInitializeNodeStateImage(StateImage, FNode, AnIndex); -end; - -function TcxTreeListReportLinkNodeProducer.IsItemIndent(AnItem: TdxReportVisualItem): Boolean; -begin - Result := FIndents.IndexOf(AnItem) <> -1; -end; - -function TcxTreeListReportLinkNodeProducer.GetAutoHeight: Boolean; -begin - Result := CellAutoHeight or HasPreview; -end; - -function TcxTreeListReportLinkNodeProducer.GetBandedDataItemBounds( - AItem: TAbstractdxReportCellData): TRect; -var - AColumnPlace: TcxTreeListColumnPlace; -begin - AColumnPlace := Formatter.ItemPlaceController.GetItemByColumn(TcxTreeListColumn(AItem.Data)); - Result := cxRectOffset(AColumnPlace.CellBounds[FNode], -AItem.Parent.Left, 0); -end; - -function TcxTreeListReportLinkNodeProducer.GetBandedDataItemClass( - AColumn: TcxTreeListColumn): TdxReportCellDataClass; -begin - Result := Formatter.GetNodeItemClass(AColumn, FNode, False); -end; - -function TcxTreeListReportLinkNodeProducer.GetBandedRowIndent: Integer; -begin - Result := PreviewIndent; -end; - -function TcxTreeListReportLinkNodeProducer.GetCellAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.CellAutoHeight; -end; - -function TcxTreeListReportLinkNodeProducer.GetCheckRect: TRect; -begin - Result := MakeBounds(IndentWidth * IndentCount, 0, Adapter.GetCheckWidth(FNode), RowHeight); -end; - -function TcxTreeListReportLinkNodeProducer.GetHasPreview: Boolean; -begin - Result := Formatter.HasPreview; -end; - -function TcxTreeListReportLinkNodeProducer.GetImageRect: TRect; -begin - Result := MakeBounds(IndentWidth * IndentCount, 0, Formatter.GetImagesWidth(FNode), RowHeight); - OffsetRect(Result, Formatter.GetStateImagesWidth(FNode) + Adapter.GetCheckWidth(FNode), 0); -end; - -function TcxTreeListReportLinkNodeProducer.GetIndentCount: Integer; -begin - Result := Formatter.IndentCounts[FNode]; -end; - -function TcxTreeListReportLinkNodeProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TcxTreeListReportLinkNodeProducer.GetLineHeight: Integer; -begin - Result := Formatter.DetailsLineHeight; -end; - -function TcxTreeListReportLinkNodeProducer.GetPreviewHeight: Integer; -begin - Result := PreviewLineCount * PreviewLineHeight; - if not (Formatter.PreviewAutoHeight and (Formatter.PreviewMaxLineCount = 0)) then - Inc(Result, 2 * dxTextSpace); -end; - -function TcxTreeListReportLinkNodeProducer.GetPreviewIndent: Integer; -begin - Result := Formatter.GetNodeIndent(FNode); -end; - -function TcxTreeListReportLinkNodeProducer.GetPreviewLineCount: Integer; -begin - if FPreviewItem <> nil then - if not Formatter.PreviewAutoHeight then - begin - Result := PreviewItem.CalculateLineCount(Formatter.DC); - if Result <> Formatter.PreviewMaxLineCount then - Result := Formatter.PreviewMaxLineCount; - end - else - Result := 1 - else - Result := 0; -end; - -function TcxTreeListReportLinkNodeProducer.GetPreviewLineHeight: Integer; -var - LineHeight: Integer; -begin - if FPreviewItem <> nil then - if Formatter.PreviewAutoHeight then - begin - Result := PreviewItem.MeasureContentHeight(Formatter.DC); - if Formatter.PreviewMaxLineCount <> 0 then - begin - LineHeight := PreviewItem.MeasureFontHeight(Formatter.DC) - 2 * dxTextSpace; - if Result > LineHeight * Formatter.PreviewMaxLineCount then - Result := LineHeight * Formatter.PreviewMaxLineCount; - end; - end - else - Result := PreviewItem.MeasureFontHeight(Formatter.DC) - 2 * dxTextSpace - else - Result := 0; -end; - -function TcxTreeListReportLinkNodeProducer.GetStateImageRect: TRect; -begin - Result := MakeBounds(IndentWidth * IndentCount + Adapter.GetCheckWidth(FNode), 0, - Formatter.GetStateImagesWidth(FNode), RowHeight); -end; - -function TcxTreeListReportLinkNodeProducer.GetCheckIndentIndex: Integer; -begin - Result := IndentCount; -end; - -function TcxTreeListReportLinkNodeProducer.GetImageIndentIndex: Integer; -begin - Result := StateImageIndentIndex; - if Formatter.HasStateImages(FNode) then - Inc(Result); -end; - -function TcxTreeListReportLinkNodeProducer.GetPreviewColumn: TcxTreeListColumn; -begin - Result := Adapter.PreviewColumn; -end; - -function TcxTreeListReportLinkNodeProducer.GetPreviewPlace: TcxTreeListPreviewPlace; -begin - Result := Adapter.PreviewPlace; -end; - -function TcxTreeListReportLinkNodeProducer.GetStateImageIndentIndex: Integer; -begin - Result := CheckIndentIndex; - if Adapter.HasCheck(FNode) then - Inc(Result); -end; - -{ TcxTreeListReportLinkCategorizedNodeProducer } - -procedure TcxTreeListReportLinkCategorizedNodeProducer.CreateBandedRows(AParent: TdxReportCell); -var - AItem: TAbstractdxReportCellData; -begin - AItem := Formatter.GetNodeItemClass(Adapter.CategorizedColumn, FNode, False).Create(Row); - AItem.BoundsRect := MakeRect(PreviewIndent, 0, RowWidth, RowHeight); - Formatter.DoInitializeNodeItem(AItem, Adapter.CategorizedColumn, FNode, False); - Formatter.DoReportLinkInitializeNodeItem(AItem, Adapter.CategorizedColumn, FNode); -end; - -{ TcxTreeListNodeHelper } - -constructor TcxTreeListNodeHelper.Create(AnAdapter: TcxTreeListAdapter); -begin - inherited Create; - FAdapter := AnAdapter; -end; - -class function TcxTreeListNodeHelper.PairClass: TClass; -begin - Result := NodeClass; -end; - -class function TcxTreeListNodeHelper.ProducerClass: TcxTreeListReportLinkNodeProducerClass; -begin - Result := TcxTreeListReportLinkNodeProducer; -end; - -class procedure TcxTreeListNodeHelper.Register; -begin - cxTreeListNodeHelperFactory.Register(Self); -end; - -class procedure TcxTreeListNodeHelper.Unregister; -begin - cxTreeListNodeHelperFactory.Unregister(Self); -end; - -function TcxTreeListNodeHelper.Adapter: TcxTreeListAdapter; -begin - Result := FAdapter; -end; - -function TcxTreeListNodeHelper.GetHasSelectedChildren: Boolean; -var - SaveNode: TcxTreeListNode; - I: Integer; -begin - Result := True; - SaveNode := Node; - try - with Node do - for I := 0 to Count - 1 do - begin - Node := Items[I]; - if Node.Selected or Adapter.Helpers[Node].HasSelectedChildren then Exit; - end; - finally - Node := SaveNode; - end; - Result := False; -end; - -function TcxTreeListNodeHelper.GetHasSelectedParents: Boolean; -var - Parent: TcxTreeListNode; -begin - Parent := Node; - while (Parent <> nil) and not Parent.Selected do - Parent := Parent.Parent; - Result := Parent <> nil; -end; - -class function TcxTreeListNodeHelper.NodeClass: TcxTreeListNodeClass; -begin - Result := TcxTreeListNode; -end; - -{ TcxTreeListNodeHelperCache } - -constructor TcxTreeListNodeHelperCache.Create(AnAdapter: TcxTreeListAdapter); -begin - inherited Create; - FAdapter := AnAdapter; -end; - -function TcxTreeListNodeHelperCache.IndexOf(Node: TcxTreeListNode): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].NodeClass = Node.ClassType then Exit; - - Result := Add(cxTreeListNodeHelperFactory.HelperClasses[Node].Create(Adapter)); -end; - -function TcxTreeListNodeHelperCache.GetHelper(Node: TcxTreeListNode): TcxTreeListNodeHelper; -begin - Result := Items[IndexOf(Node)]; - Result.Node := Node; -end; - -function TcxTreeListNodeHelperCache.GetItem(Index: Integer): TcxTreeListNodeHelper; -begin - Result := TcxTreeListNodeHelper(inherited Items[Index]); -end; - -{ TcxTreeListReportLinkProducerCache } - -constructor TcxTreeListReportLinkProducerCache.Create(ABuilder: TcxTreeListReportLinkBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TcxTreeListReportLinkProducerCache.IndexOf(AProducerClass: TcxTreeListReportLinkRowProducerClass): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].ClassType = AProducerClass then Exit; - - Result := Add(AProducerClass.Create(Builder)); -end; - -function TcxTreeListReportLinkProducerCache.GetProducer(ProducerClass: TcxTreeListReportLinkRowProducerClass): TcxTreeListReportLinkRowProducer; -begin - Result := Items[IndexOf(ProducerClass)]; -end; - -function TcxTreeListReportLinkProducerCache.GetItem(Index: Integer): TcxTreeListReportLinkRowProducer; -begin - Result := TcxTreeListReportLinkRowProducer(inherited Items[Index]); -end; - -{ TcxTreeListReportLinkBuilder } - -constructor TcxTreeListReportLinkBuilder.Create(AReportLink: TcxTreeListCustomReportLink); -begin - inherited Create; - FReportLink := AReportLink; - FAdapter := AdapterClass.Create(Self); - FFormatter := FormatterClass.Create(Self); - FProducerCache := TcxTreeListReportLinkProducerCache.Create(Self); - FReportRows := TList.Create; -end; - -destructor TcxTreeListReportLinkBuilder.Destroy; -begin - FreeAndNil(FReportRows); - FreeAndNil(FProducerCache); - FreeAndNil(FFormatter); - FreeAndNil(FAdapter); - inherited; -end; - -procedure TcxTreeListReportLinkBuilder.Build; -begin - BeforeBuilding; - try - DoBuild; - finally - AfterBuilding; - end; -end; - -procedure TcxTreeListReportLinkBuilder.Progress(const APercentDone: Double); -begin - ReportLink.DoProgress(APercentDone); -end; - -function TcxTreeListReportLinkBuilder.Adapter: TcxTreeListAdapter; -begin - Result := FAdapter; -end; - -class function TcxTreeListReportLinkBuilder.AdapterClass: TcxTreeListAdapterClass; -begin - Result := TcxTreeListAdapter; -end; - -function TcxTreeListReportLinkBuilder.Formatter: TcxTreeListReportLinkFormatter; -begin - Result := FFormatter; -end; - -class function TcxTreeListReportLinkBuilder.FormatterClass: TcxTreeListReportLinkFormatterClass; -begin - Result := TcxTreeListReportLinkFormatter; -end; - -procedure TcxTreeListReportLinkBuilder.AddReportRow(ARow: TdxReportCell); -begin - if ARow.Parent = ReportLink.ReportCells.Cells then - FReportRows.Add(ARow); -end; - -procedure TcxTreeListReportLinkBuilder.AfterBuilding; -begin - Formatter.AfterBuilding; -end; - -procedure TcxTreeListReportLinkBuilder.BeforeBuilding; -begin - Formatter.BeforeBuilding; -end; - -procedure TcxTreeListReportLinkBuilder.CreateBands; -begin - AddReportRow(GetBandsProducer.Produce(ReportLink.HostInfoServices.BandHeadersHostInfo)); -end; - -function TcxTreeListReportLinkBuilder.GetBandsProducer: TcxTreeListReportLinkBandsProducer; -begin - Result := ProducerCache[GetBandsProducerClass] as TcxTreeListReportLinkBandsProducer; -end; - -function TcxTreeListReportLinkBuilder.GetBandsProducerClass: TcxTreeListReportLinkBandsProducerClass; -begin - Result := TcxTreeListReportLinkBandsProducer; -end; - -procedure TcxTreeListReportLinkBuilder.CreateFooters(AHostInfo: TcxTreeListAttributeHostInfo; - AAttachedNode, ADataNode: TcxTreeListNode); -begin - AddReportRow(GetFootersProducer.Produce(AHostInfo, AAttachedNode, ADataNode)); -end; - -function TcxTreeListReportLinkBuilder.GetFootersProducer: TcxTreeListReportLinkFootersProducer; -begin - Result := ProducerCache[GetFootersProducerClass] as TcxTreeListReportLinkFootersProducer; -end; - -function TcxTreeListReportLinkBuilder.GetFootersProducerClass: TcxTreeListReportLinkFootersProducerClass; -begin - Result := TcxTreeListReportLinkFootersProducer; -end; - -procedure TcxTreeListReportLinkBuilder.CreateHeaders; -begin - AddReportRow(GetHeadersProducer.Produce(ReportLink.HostInfoServices.HeadersHostInfo)); -end; - -function TcxTreeListReportLinkBuilder.GetHeadersProducer: TcxTreeListReportLinkHeadersProducer; -begin - Result := ProducerCache[GetHeadersProducerClass] as TcxTreeListReportLinkHeadersProducer; -end; - -function TcxTreeListReportLinkBuilder.GetHeadersProducerClass: TcxTreeListReportLinkHeadersProducerClass; -begin - Result := TcxTreeListReportLinkHeadersProducer; -end; - -procedure TcxTreeListReportLinkBuilder.CreateNode(ANode: TcxTreeListNode); -begin - AddReportRow(GetNodeProducer(ANode).Produce(ReportLink.HostInfoServices.PageDetailsHostInfo, ANode)); -end; - -procedure TcxTreeListReportLinkBuilder.CreateNodes; -var - AHasNodeSeparator, AHasGroupFooters: Boolean; - I: Integer; - ANode: TcxTreeListNode; - ASummaryNodes: TObjectStack; -begin - AHasNodeSeparator := Formatter.HasNodeSeparator; - AHasGroupFooters := Adapter.OptionsView.GroupFooters <> tlgfInvisible; - ASummaryNodes := TObjectStack.Create; - try - for I := 0 to Formatter.NodeCount - 1 do - begin - ANode := Formatter.Nodes[I]; - CreateNode(ANode); - if AHasGroupFooters then - begin - if Adapter.HasNodeSummary(ANode) then - ASummaryNodes.Push(ANode); - while (ASummaryNodes.Count > 0) and - Adapter.HasNodeAttachedFooter(ANode, TcxTreeListNode(ASummaryNodes.Peek)) do - CreateFooters(ReportLink.HostInfoServices.PageDetailsHostInfo, ANode, - TcxTreeListNode(ASummaryNodes.Pop)); - end; - if AHasNodeSeparator and (I < Formatter.NodeCount - 1) then - CreateNodeSeparator(ANode); - - Progress(100 * (I + 1) / Formatter.NodeCount); - if IsAborted then Break; - end; - finally - ASummaryNodes.Free; - end; -end; - -function TcxTreeListReportLinkBuilder.GetNodeProducer(ANode: TcxTreeListNode): TcxTreeListReportLinkNodeProducer; -begin - Result := ProducerCache[GetNodeProducerClass(ANode)] as TcxTreeListReportLinkNodeProducer; -end; - -function TcxTreeListReportLinkBuilder.GetNodeProducerClass(ANode: TcxTreeListNode): TcxTreeListReportLinkNodeProducerClass; -begin - if Adapter.IsGroupNode(ANode) then - Result := TcxTreeListReportLinkCategorizedNodeProducer - else - Result := Adapter.Helpers[ANode].ProducerClass; -end; - -procedure TcxTreeListReportLinkBuilder.CreateNodeSeparator(ANode: TcxTreeListNode); -begin - AddReportRow(GetNodeSeparatorProducer.Produce(ReportLink.HostInfoServices.PageDetailsHostInfo)); -end; - -function TcxTreeListReportLinkBuilder.GetNodeSeparatorProducer: TcxTreeListReportLinkNodeSeparatorProducer; -begin - Result := ProducerCache[GetNodeSeparatorProducerClass] as TcxTreeListReportLinkNodeSeparatorProducer; -end; - -function TcxTreeListReportLinkBuilder.GetNodeSeparatorProducerClass: TcxTreeListReportLinkNodeSeparatorProducerClass; -begin - Result := TcxTreeListReportLinkNodeSeparatorProducer; -end; - -procedure TcxTreeListReportLinkBuilder.DoBuild; -begin - if Formatter.ShowBandHeaders then CreateBands; - if Formatter.ShowHeaders then CreateHeaders; - CreateNodes; - - if not IsAborted and Formatter.ShowFooters then - CreateFooters(ReportLink.HostInfoServices.FootersHostInfo, nil, TreeList.Root); -end; - -function TcxTreeListReportLinkBuilder.IsAborted: Boolean; -begin - Result := ReportLink.AbortBuilding; -end; - -function TcxTreeListReportLinkBuilder.GetHost: TdxReportCell; -begin - Result := ReportLink.ReportCells.Cells; -end; - -function TcxTreeListReportLinkBuilder.GetReportCells: TdxReportCells; -begin - Result := ReportLink.ReportCells; -end; - -function TcxTreeListReportLinkBuilder.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := TdxReportCell(FReportRows[Index]); -end; - -function TcxTreeListReportLinkBuilder.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TcxTreeListReportLinkBuilder.GetTreeList: TcxCustomTreeList; -begin - Result := ReportLink.TreeList; -end; - -{ TcxTreeListReportLinkBuilderHandler } - -constructor TcxTreeListReportLinkBuilderHandler.Create(ABuilder: TcxTreeListReportLinkBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TcxTreeListReportLinkBuilderHandler.Builder: TcxTreeListReportLinkBuilder; -begin - Result := FBuilder; -end; - -function TcxTreeListReportLinkBuilderHandler.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := Builder.ReportLink; -end; - -{ TcxTreeListAdapter } - -constructor TcxTreeListAdapter.Create(ABuilder: TcxTreeListReportLinkBuilder); -begin - inherited; - FHelperCache := TcxTreeListNodeHelperCache.Create(Self); - FDetailsLineCount := -1; - FFooterLineCount := -1; - FMultiRows := False; -end; - -destructor TcxTreeListAdapter.Destroy; -begin - FreeAndNil(FHelperCache); - inherited; -end; - -function TcxTreeListAdapter.CalculateDetailsLineCount: Integer; -var - I, J, V: Integer; - ABandRows: TcxTreeListBandRows; -begin - Result := 0; - for I := 0 to BottomBandCount - 1 do - begin - ABandRows := BottomBands[I].BandRows; - FMultiRows := FMultiRows or (ABandRows.VisibleItemCount > 1); - V := 0; - for J := 0 to ABandRows.VisibleItemCount - 1 do - Inc(V, ABandRows[J].LineCount); - if Result < V then Result := V; - end; -end; - -procedure TcxTreeListAdapter.Calculate; -begin - FDetailsLineCount := CalculateDetailsLineCount; - if not FMultiRows then - begin - FFooterLineCount := Max(1, TreeList.Summary.FooterSummaryRowCount); - FGroupFooterLineCount := Max(1, TreeList.Summary.GroupFooterSummaryRowCount); - end - else - begin - FFooterLineCount := Max(1, TreeList.Bands.ColumnsLineCount); - FGroupFooterLineCount := FFooterLineCount; - end; -end; - -class function TcxTreeListAdapter.GetProperties(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TcxCustomEditProperties; -begin - Result := TreeListColumn_DoGetEditProperties(AColumn, ANode); - if Result = nil then - Result := GetRepositoryItem(AColumn, ANode).Properties; -end; - -class function TcxTreeListAdapter.GetPropertiesClass(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TcxCustomEditPropertiesClass; -begin - Result := TcxCustomEditPropertiesClass(GetProperties(AColumn, ANode).ClassType); -end; - -class function TcxTreeListAdapter.GetRepositoryItem(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TcxEditRepositoryItem; -begin - Result := AColumn.RepositoryItem; -end; - -function TcxTreeListAdapter.GetBackgroundViewParams: TcxViewParams; -begin - Result := Styles.GetBackgroundParams; -end; - -function TcxTreeListAdapter.GetBandBackgroundViewParams: TcxViewParams; -begin - Result := Styles.GetBandBackgroundParams(nil); -end; - -function TcxTreeListAdapter.GetBandHeaderViewParams(ABand: TcxTreeListBand): TcxViewParams; -begin - Result := Styles.GetBandHeaderParams(ABand); - if ABand = nil then - Result.Color := LookAndFeelPainter.DefaultHeaderBackgroundColor -end; - -function TcxTreeListAdapter.GetContentViewParams(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn): TcxViewParams; -begin - Result := Styles.GetContentParams(ANode, AColumn); - // v3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TcxTreeListAdapter.GetColumnFooterViewParams(AColumn: TcxTreeListColumn): TcxViewParams; -begin - Result := Styles.GetColumnFooterParams(AColumn, nil); - Result.Color := LookAndFeelPainter.DefaultHeaderColor -end; - -function TcxTreeListAdapter.GetColumnHeaderViewParams(AColumn: TcxTreeListColumn): TcxViewParams; -begin - if AColumn = nil then - begin - // FillChar(Result, SizeOf(Result), 0); - // Result.Color := LookAndFeelPainter.DefaultHeaderBackgroundColor; - Result := Styles.GetBandBackgroundParams(Bands[0]) - end - else - Result := Styles.GetColumnHeaderParams(AColumn); -end; - -function TcxTreeListAdapter.GetIndentViewParams(ANode: TcxTreeListNode; - AnIndent: Integer): TcxViewParams; -begin - Result := Styles.GetIndentParams(ANode, AnIndent); - // v3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TcxTreeListAdapter.GetPreviewViewParams(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn): TcxViewParams; -begin - Result := Styles.GetPreviewParams(ANode); - // v3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TcxTreeListAdapter.GetFooterRowViewParams: TcxViewParams; -begin - Result := Styles.GetFooterParams; -end; - -function TcxTreeListAdapter.GetSelectionViewParams: TcxViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - with Styles.Selection do - begin - Result.Bitmap := nil; - Result.Color := Color; - Result.Font := Font; - Result.TextColor := TextColor; - end; -end; - -function TcxTreeListAdapter.HasSelectionStyle: Boolean; -begin - Result := Styles.Selection <> nil; -end; - -function TcxTreeListAdapter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - Result := Styles.GetBitmap(Index); -end; - -function TcxTreeListAdapter.HasBackgroundBitmap(Index: Integer): Boolean; -begin - Result := GetBackgroundBitmap(Index) <> nil; -end; - -procedure TcxTreeListAdapter.DoGetLevelImages(ALevel: Integer; - var AImages, AStateImages: TCustomImageList); -begin - AImages := Images; - AStateImages := StateImages; - CustomTreeList_DoGetLevelImages(TreeList, ALevel, AImages, AStateImages); -end; - -function TcxTreeListAdapter.GetCheckWidth(ANode: TcxTreeListNode): Integer; -begin - if HasCheck(ANode) then - Result := DefaultIndentWidth - else - Result := 0; -end; - -function TcxTreeListAdapter.HasCheck(ANode: TcxTreeListNode): Boolean; -begin - Result := TreeList.OptionsView.CheckGroups and (ANode.Parent <> nil) and - (ANode.Parent.CheckGroupType <> ncgNone); -end; - -function TcxTreeListAdapter.IsGroupNode(ANode: TcxTreeListNode): Boolean; -begin - Result := CustomTreeList_DoIsGroupNode(TreeList, ANode); -end; - -function TcxTreeListAdapter.HasNodeAttachedFooter(ANode, ASummaryNode: TcxTreeListNode): Boolean; -begin - Result := not ANode.Expanded and ((ANode = ASummaryNode) or - (ANode = ASummaryNode.GetLastChildVisible) or - ANode.HasAsParent(ASummaryNode.GetLastChildVisible)); -end; - -function TcxTreeListAdapter.HasNodeSummary(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode.HasChildren and ((OptionsView.GroupFooters = tlgfAlwaysVisible) or - (OptionsView.GroupFooters = tlgfVisibleWhenExpanded) and ANode.Expanded); -end; - -function TcxTreeListAdapter.GetAutoWidth: Boolean; -begin - Result := OptionsView.ColumnAutoWidth; -end; - -function TcxTreeListAdapter.GetBand(Index: Integer): TcxTreeListBand; -begin - Result := CustomTreeList_GetVisibleBand(TreeList, Index); -end; - -function TcxTreeListAdapter.GetBandCount: Integer; -begin - Result := CustomTreeList_GetVisibleBandCount(TreeList); -end; - -function TcxTreeListAdapter.GetBottomBand(Index: Integer): TcxTreeListBand; -begin - Result := TreeList.Bands.BottomItems[Index]; -end; - -function TcxTreeListAdapter.GetBottomBandCount: Integer; -begin - Result := TreeList.Bands.BottomItemCount; -end; - -function TcxTreeListAdapter.GetCanUseLookAndFeelColors: Boolean; -begin - Result := CustomTreeList_GetLookAndFeel(TreeList).NativeStyle and - dxThemeManager.AreVisualStylesAvailable; -end; - -function TcxTreeListAdapter.GetCategorizedColumn: TcxTreeListColumn; -begin - Result := OptionsView.GetCategorizedColumn; -end; - -function TcxTreeListAdapter.GetColumnCount: Integer; -begin - Result := CustomTreeList_GetVisibleColumnCount(TreeList); -end; - -function TcxTreeListAdapter.GetCellAutoHeight: Boolean; -begin - Result := OptionsView.CellAutoHeight and (DetailsLineCount = 1); -end; - -function TcxTreeListAdapter.GetCellEndEllipsis: Boolean; -begin - Result := OptionsView.CellEndEllipsis; -end; - -function TcxTreeListAdapter.GetCellMultiline: Boolean; -begin - Result := OptionsView.CellAutoHeight and (DetailsLineCount = 1); -end; - -function TcxTreeListAdapter.GetColumn(Index: Integer): TcxTreeListColumn; -begin - Result := CustomTreeList_GetVisibleColumn(TreeList, Index); -end; - -function TcxTreeListAdapter.GetDefaultRowHeight: Integer; -begin - Result := TreeList.DefaultRowHeight; -end; - -function TcxTreeListAdapter.GetFooterLineCount(ANode: TcxTreeListNode): Integer; -begin - if ANode = TreeList.Root then - Result := FFooterLineCount - else - Result := FGroupFooterLineCount; -end; - -function TcxTreeListAdapter.GetGridLines: TcxTreeListGridLines; -begin - Result := OptionsView.GridLines; -end; - -function TcxTreeListAdapter.GetGridLinesColor: TColor; -begin - Result := OptionsView.GridLineColor; - if Result = clDefault then - Result := LookAndFeelPainter.DefaultGridLineColor; -end; - -function TcxTreeListAdapter.GetHasPreview: Boolean; -begin - Result := TreeList.Preview.Active; -end; - -function TcxTreeListAdapter.GetHeaderAutoHeight: Boolean; -begin - Result := (DetailsLineCount = 1) and OptionsView.CellAutoHeight; -end; - -function TcxTreeListAdapter.GetHelper(Node: TcxTreeListNode): TcxTreeListNodeHelper; -begin - Result := FHelperCache.Helpers[Node]; -end; - -function TcxTreeListAdapter.GetIndentWidth: Integer; -begin - Result := DefaultIndentWidth; -end; - -function TcxTreeListAdapter.GetIsDefaultRowHeightAssigned: Boolean; -begin - Result := DefaultRowHeight <> 0; -end; - -function TcxTreeListAdapter.GetImages: TCustomImageList; -begin - Result := CustomTreeList_GetImages(TreeList); -end; - -function TcxTreeListAdapter.GetIsNodeColorUsedForIndents: Boolean; -begin - Result := OptionsView.UseNodeColorForIndent; -end; - -function TcxTreeListAdapter.GetLookAndFeelKind: TcxLookAndFeelKind; -begin - Result := CustomTreeList_GetLookAndFeel(TreeList).Kind; -end; - -function TcxTreeListAdapter.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := CustomTreeList_GetLookAndFeelPainter(TreeList); -end; - -function TcxTreeListAdapter.GetMultiSelection: Boolean; -begin - Result := CustomTreeList_GetOptionsSelection(TreeList).MultiSelect; -end; - -function TcxTreeListAdapter.GetNode(Index: Integer): TcxTreeListNode; -begin - Result := TreeList.Root[Index]; -end; - -function TcxTreeListAdapter.GetNodeCount: Integer; -begin - Result := TreeList.Root.Count; -end; - -function TcxTreeListAdapter.GetOptionsView: TcxTreeListOptionsView; -begin - Result := CustomTreeList_GetOptionsView(TreeList); -end; - -function TcxTreeListAdapter.GetPaintStyle: TcxTreeListPaintStyle; -begin - Result := OptionsView.PaintStyle; -end; - -function TcxTreeListAdapter.GetPreviewColumn: TcxTreeListColumn; -begin - Result := CustomTreeList_GetPreview(TreeList).Column; -end; - -function TcxTreeListAdapter.GetPreviewLeftIndent: Integer; -begin - Result := CustomTreeList_GetPreview(TreeList).LeftIndent; -end; - -function TcxTreeListAdapter.GetPreviewPlace: TcxTreeListPreviewPlace; -begin - Result := CustomTreeList_GetPreview(TreeList).Place; -end; - -function TcxTreeListAdapter.GetPreviewRightIndent: Integer; -begin - Result := CustomTreeList_GetPreview(TreeList).RightIndent; -end; - -function TcxTreeListAdapter.GetRootBand(Index: Integer): TcxTreeListBand; -begin - Result := TreeList.Bands.VisibleRootItems[Index]; -end; - -function TcxTreeListAdapter.GetRootBandCount: Integer; -begin - Result := TreeList.Bands.visibleRootItemCount; -end; - -function TcxTreeListAdapter.GetShowRoot: Boolean; -begin - Result := OptionsView.ShowRoot; -end; - -function TcxTreeListAdapter.GetShowHorzGridLines: Boolean; -begin - Result := GridLines in [tlglHorz, tlglBoth]; -end; - -function TcxTreeListAdapter.GetShowTreeLines: Boolean; -begin - Result := OptionsView.TreeLineStyle <> tllsNone; -end; - -function TcxTreeListAdapter.GetShowVertGridLines: Boolean; -begin - Result := GridLines in [tlglVert, tlglBoth]; -end; - -function TcxTreeListAdapter.GetStateImages: TCustomImageList; -begin - Result := CustomTreeList_GetStateImages(TreeList); -end; - -function TcxTreeListAdapter.GetStyles: TcxTreeListStyles; -begin - Result := CustomTreeList_GetStyles(TreeList); -end; - -function TcxTreeListAdapter.GetThemedBandHeaderItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderColor; -end; - -function TcxTreeListAdapter.GetThemedBandHeaderItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderTextColor; -end; - -function TcxTreeListAdapter.GetThemedFooterItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFooterColor; -end; - -function TcxTreeListAdapter.GetThemedFooterItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFooterTextColor; -end; - -function TcxTreeListAdapter.GetThemedHeaderItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderColor; -end; - -function TcxTreeListAdapter.GetThemedHeaderItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderTextColor; -end; - -function TcxTreeListAdapter.GetThemedHeaderRowColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderBackgroundColor; -end; - -function TcxTreeListAdapter.GetTreeLinesColor: TColor; -begin - Result := OptionsView.TreeLineColor; -end; - -function TcxTreeListAdapter.GetTreeLinesStyle: TcxTreeListTreeLineStyle; -begin - Result := OptionsView.TreeLineStyle; -end; - -function TcxTreeListAdapter.GetTreeList: TcxCustomTreeList; -begin - Result := Builder.TreeList; -end; - -function TcxTreeListAdapter.GetUseStylesForIndents: Boolean; -begin - Result := OptionsView.UseNodeColorForIndent; -end; - -{ TcxTreeListCustomItemPlaceController } - -constructor TcxTreeListCustomItemPlaceController.Create( - AFormatter: TcxTreeListReportLinkFormatter); -begin - inherited Create; - FFormatter := AFormatter; - FHeaderLineCount := -1; - FWidth := -1; -end; - -procedure TcxTreeListCustomItemPlaceController.Calculate; -begin -end; - -procedure TcxTreeListCustomItemPlaceController.Refresh; -begin -end; - -function TcxTreeListCustomItemPlaceController.CalculateWidth: Integer; -begin - Result := 0; -end; - -function TcxTreeListCustomItemPlaceController.CalculateHeaderLineCount: Integer; -begin - Result := 1; -end; - -function TcxTreeListCustomItemPlaceController.GetItemByColumn( - Column: TcxTreeListColumn): TcxTreeListColumnPlace; -begin - Result := nil; -end; - -procedure TcxTreeListCustomItemPlaceController.WidthChanged; -begin -end; - -function TcxTreeListCustomItemPlaceController.GetAdapter: TcxTreeListAdapter; -begin - Result := Formatter.Adapter; -end; - -function TcxTreeListCustomItemPlaceController.GetHeaderLineCount: Integer; -begin - if FHeaderLineCount = -1 then - FHeaderLineCount := CalculateHeaderLineCount; - Result := FHeaderLineCount; -end; - -function TcxTreeListCustomItemPlaceController.GetWidth: Integer; -begin - if FWidth = -1 then - FWidth := CalculateWidth; - Result := FWidth; -end; - -procedure TcxTreeListCustomItemPlaceController.SetWidth(Value: Integer); -begin - FWidth := Value; - WidthChanged; -end; - -{ TcxTreeListColumnPlace } - -constructor TcxTreeListColumnPlace.Create( - AController: TcxTreeListCustomBandPlace; AColumn: TcxTreeListColumn); -begin - inherited Create; - FController := AController; - FColumn := AColumn; - - FLeftBound := -1; - FWidth := -1; -end; - -procedure TcxTreeListColumnPlace.Calculate(ALeftBound: Integer); -begin - FLeftBound := ALeftBound; -end; - -function TcxTreeListColumnPlace.CalculateLeftBound: Integer; -begin - Result := Controller.CalculateItemLeftBound(Self); -end; - -function TcxTreeListColumnPlace.GetLineCount: Integer; -begin - Result := Column.Position.LineCount; -end; - -function TcxTreeListColumnPlace.GetRowIndex: Integer; -begin - Result := Column.Position.Row.LineOffset; -end; - -procedure TcxTreeListColumnPlace.InitAutoWidthItem( - AnItem: TcxAutoWidthItem); -begin - AnItem.Fixed := IsFixed; - AnItem.MinWidth := MinWidth; - AnItem.Width := Width; -end; - -function TcxTreeListColumnPlace.GetAdapter: TcxTreeListAdapter; -begin - Result := Formatter.Adapter; -end; - -function TcxTreeListColumnPlace.GetCellBounds(ANode: TcxTreeListNode): TRect; -var - ACellHeight: Integer; - AColumnAccess: TcxTreeListColumnAccess; -begin - ACellHeight := CellHeights[ANode]; - Result := cxRectBounds(LeftBound, RowIndex * ACellHeight, Width, LineCount * ACellHeight); - AColumnAccess := TcxTreeListColumnAccess(Column); - if AColumnAccess.HasIndent then - Inc(Result.Left, Formatter.GetNodeIndent(ANode)); -end; - -function TcxTreeListColumnPlace.GetCellHeight(ANode: TcxTreeListNode): Integer; -begin - Result := Formatter.DetailsLineHeight; -end; - -function TcxTreeListColumnPlace.GetFooterCellBounds(AIndex: Integer): TRect; -begin - Result := Bounds(LeftBound, (RowIndex + AIndex * LineCount) * FooterLineHeight, - Width, LineCount * FooterLineHeight); - InflateRect(Result, -FooterItemInflateHorz, -FooterItemInflateVert); -end; - -function TcxTreeListColumnPlace.GetFooterLineHeight: Integer; -begin - Result := Formatter.FooterLineHeight; -end; - -function TcxTreeListColumnPlace.GetFormatter: TcxTreeListReportLinkFormatter; -begin - Result := Controller.Formatter; -end; - -function TcxTreeListColumnPlace.GetHeaderCellBounds: TRect; -begin - Result := cxRectBounds(LeftBound, RowIndex * HeaderLineHeight, Width, - LineCount * HeaderLineHeight); -end; - -function TcxTreeListColumnPlace.GetHeaderLineHeight: Integer; -begin - Result := Formatter.HeaderLineHeight; -end; - -function TcxTreeListColumnPlace.GetIndex: Integer; -begin - Result := Controller.IndexOf(Self); -end; - -function TcxTreeListColumnPlace.GetIsFixed: Boolean; -var - AColumnAccess: TcxTreeListColumnAccess; -begin - AColumnAccess := TcxTreeListColumnAccess(Column); - Result := AColumnAccess.IsFixed; -end; - -function TcxTreeListColumnPlace.GetLeftBound: Integer; -begin - if FLeftBound = -1 then - FLeftBound := CalculateLeftBound; - Result := FLeftBound; -end; - -function TcxTreeListColumnPlace.GetMinWidth: Integer; -begin - Result := Column.MinWidth + Column.IndentWidth; -end; - -function TcxTreeListColumnPlace.GetOriginalWidth: Integer; -begin - Result := Column.DisplayWidth; -end; - -function TcxTreeListColumnPlace.GetWidth: Integer; -begin - Result := FWidth; - if Result = -1 then - Result := OriginalWidth; -end; - -{ TcxTreeListCustomBandPlace } - -constructor TcxTreeListCustomBandPlace.Create( - AController: TcxTreeListItemPlaceController; - AParent: TcxTreeListBandPlace; ABand: TcxTreeListBand); -begin - inherited Create(AController.Formatter); - FColumnIndexes := TList.Create; - FItems := TObjectList.Create; - FController := AController; - FParent := AParent; - FBand := ABand; - FHeight := -1; - FLeftBound := -1; - FMinWidth := -1; - FTopBound := -1; -end; - -destructor TcxTreeListCustomBandPlace.Destroy; -begin - FreeAndNil(FItems); - FreeAndNil(FColumnIndexes); - inherited Destroy; -end; - -procedure TcxTreeListCustomBandPlace.Calculate; -begin - if ItemsAutoWidth then CalculateItemsWidth; -end; - -function TcxTreeListCustomBandPlace.IndexOf( - AnItem: TcxTreeListColumnPlace): Integer; -begin - Result := FItems.IndexOf(AnItem); -end; - -function TcxTreeListCustomBandPlace.IndexOf( - AColumn: TcxTreeListColumn): Integer; -begin - for Result := 0 to ItemCount - 1 do - if Items[Result].Column = AColumn then - Exit; - Result := -1; -end; - -procedure TcxTreeListCustomBandPlace.Refresh; -begin - FColumnIndexes.Clear; - FItems.Clear; - AddItems; -end; - -function TcxTreeListCustomBandPlace.CalculateHeaderLineCount: Integer; -var - I: Integer; -begin - Result := 0; - with Band.BandRows do - for I := 0 to VisibleItemCount - 1 do - Inc(Result, VisibleItems[I].LineCount); -end; - -function TcxTreeListCustomBandPlace.CalculateWidth: Integer; - - function FixedSize: Boolean; - var - I: Integer; - begin - Result := False; - for I := 0 to Band.ColumnCount - 1 do - Result := Result or not Band.Columns[I].Options.Sizing; - end; - -begin - if FixedSize then - Result := Max(Band.Width, InternalCalculateWidth) - else - begin - Result := Band.Width; - if Result = 0 then - Result := InternalCalculateWidth - end; - if Result = 0 then - Result := cxTreeListDefWidth; - if Result < InternalCalculateMinWidth then - Result := InternalCalculateMinWidth; -end; - -function TcxTreeListCustomBandPlace.GetItemByColumn( - Column: TcxTreeListColumn): TcxTreeListColumnPlace; -var - Index: Integer; -begin - Index := ColumnIndexes[Column]; - //Index := IndexOf(Column); - if Index <> -1 then // might be -1 when we are in loading stage (Building report while loading form) - Result := Items[Index] - else - Result := nil; -end; - -procedure TcxTreeListCustomBandPlace.AddItems; -var - I: Integer; -begin - for I := 0 to Formatter.ColumnCount - 1 do - CreateItem(Formatter.Columns[I]); -end; - -procedure TcxTreeListCustomBandPlace.AssignWidth; -begin - Width := Width; -end; - -function TcxTreeListCustomBandPlace.CalculateHeight: Integer; -begin - Result := Controller.CalculateItemHeight(Self); -end; - -function TcxTreeListCustomBandPlace.CalculateItemLeftBound( - AnItem: TcxTreeListColumnPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AnItem.Index - 1 do - Inc(Result, Items[I].Width); -end; - -procedure TcxTreeListCustomBandPlace.CalculateItemsWidth; -var - AAutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AAutoWidthObject := TcxAutoWidthObject.Create(ItemCount); - try - for I := 0 to ItemCount - 1 do - Items[I].InitAutoWidthItem(AAutoWidthObject.AddItem); - AAutoWidthObject.AvailableWidth := ItemsAvailableWidth; - AAutoWidthObject.Calculate; - - for I := 0 to ItemCount - 1 do - Items[I].Width := AAutoWidthObject[I].AutoWidth; - finally - AAutoWidthObject.Free; - end; -end; - -function TcxTreeListCustomBandPlace.CalculateLeftBound: Integer; -begin - Result := Controller.CalculateItemLeftBound(Self); -end; - -function TcxTreeListCustomBandPlace.CalculateLevelHeight: Integer; -begin - if Adapter.OptionsView.BandLineHeight > 0 then - Result := Adapter.OptionsView.BandLineHeight - else - Result := CalculateLineHeight;// * BandLineCount; -end; - -function TcxTreeListCustomBandPlace.CalculateLineHeight: Integer; -begin - Result := 0; - Formatter.CalculateHeight(ViewParams, Result); -end; - -function TcxTreeListCustomBandPlace.CalculateMinWidth: Integer; -begin - Result := Max(InternalCalculateMinWidth, Band.MinWidth); -end; - -function TcxTreeListCustomBandPlace.CalculateTopBound: Integer; -begin - Result := Controller.CalculateItemTopBound(Self); -end; - -function TcxTreeListCustomBandPlace.CreateItem( - AColumn: TcxTreeListColumn): TcxTreeListColumnPlace; -begin - Result := TcxTreeListColumnPlace.Create(Self, AColumn); - FItems.Add(Result); -end; - -procedure TcxTreeListCustomBandPlace.InitAutoWidthItem( - AnItem: TcxAutoWidthItem); -begin - AnItem.Fixed := IsFixed; - AnItem.MinWidth := MinWidth; - AnItem.Width := Width; -end; - -function TcxTreeListCustomBandPlace.GetRowCount: Integer; -begin - Result := 0; -end; - -function TcxTreeListCustomBandPlace.GetItemsAutoWidth: Boolean; -begin - Result := Formatter.AutoWidth; -end; - -function TcxTreeListCustomBandPlace.GetItemsAvailableWidth: Integer; -begin - Result := Formatter.AvailableWidth; -end; - -function TcxTreeListCustomBandPlace.InternalCalculateMinWidth: Integer; -begin - Result := 0; -end; - -function TcxTreeListCustomBandPlace.InternalCalculateWidth: Integer; -begin - Result := 0; -end; - -function TcxTreeListCustomBandPlace.GetColumnIndex( - AColumn: TcxTreeListColumn): Integer; -var - AColumnIndex, AIndexCount, I: Integer; -begin - AColumnIndex := AColumn.ItemIndex; - AIndexCount := FColumnIndexes.Count; - if AColumnIndex > AIndexCount - 1 then - begin - FColumnIndexes.Count := AColumnIndex + 1; - for I := AIndexCount to FColumnIndexes.Count - 1 do - FColumnIndexes[I] := TObject(-1); - end; - Result := Integer(FColumnIndexes[AColumnIndex]); - if Result = -1 then - begin - FColumnIndexes[AColumnIndex] := TObject(IndexOf(AColumn)); - Result := Integer(FColumnIndexes[AColumnIndex]); - end; -end; - -function TcxTreeListCustomBandPlace.GetBounds: TRect; -begin - Result := MakeBounds(LeftBound, TopBound, Width, Height); -end; - -function TcxTreeListCustomBandPlace.GetExpandable: Boolean; -begin - Result := Band.ActuallyExpandable; -end; - -function TcxTreeListCustomBandPlace.GetHeight: Integer; -begin - if FHeight = -1 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TcxTreeListCustomBandPlace.GetIndex: Integer; -begin - if Parent <> nil then - Result := Parent.IndexOf(Self) - else - Result := Controller.RootIndexOf(Self); -end; - -function TcxTreeListCustomBandPlace.GetIsFixed: Boolean; -begin - Result := not Band.Options.Sizing; -end; - -function TcxTreeListCustomBandPlace.GetItem(AIndex: Integer): TcxTreeListColumnPlace; -begin - Result := TcxTreeListColumnPlace(FItems[AIndex]); -end; - -function TcxTreeListCustomBandPlace.GetItemCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxTreeListCustomBandPlace.GetLeftBound: Integer; -begin - if FLeftBound = -1 then - FLeftBound := CalculateLeftBound; - Result := FLeftBound; -end; - -function TcxTreeListCustomBandPlace.GetLevelIndex: Integer; -begin - Result := Band.Level; -end; - -function TcxTreeListCustomBandPlace.GetMinWidth: Integer; -begin - if FMinWidth = -1 then - FMinWidth := CalculateMinWidth; - Result := FMinWidth; -end; - -function TcxTreeListCustomBandPlace.GetTopBound: Integer; -begin - if FTopBound = -1 then - FTopBound := CalculateTopBound; - Result := FTopBound; -end; - -function TcxTreeListCustomBandPlace.GetViewParams: TdxReportItemViewParams; -begin - Result := Formatter.GetBandItemViewParams(Band); -end; - -{ TcxTreeListBandPlace } - -constructor TcxTreeListBandPlace.Create(AnOwner: TcxTreeListItemPlaceController; - AParent: TcxTreeListBandPlace; ABand: TcxTreeListBand); -begin - inherited; - FChildItems := TList.Create; -end; - -destructor TcxTreeListBandPlace.Destroy; -begin - FreeAndNil(FChildItems); - inherited; -end; - -function TcxTreeListBandPlace.IndexOf( - AnItem: TcxTreeListCustomBandPlace): Integer; -begin - Result := FChildItems.IndexOf(AnItem); -end; - -procedure TcxTreeListBandPlace.Refresh; -begin - inherited Refresh; - RefreshChildItems; -end; - -function TcxTreeListBandPlace.GetRowCount: Integer; -begin - Result := 1; -end; - -function TcxTreeListBandPlace.InternalCalculateMinWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ChildItemCount - 1 do - Inc(Result, ChildItems[I].MinWidth); -end; - -function TcxTreeListBandPlace.InternalCalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ChildItemCount - 1 do - Inc(Result, ChildItems[I].Width); -end; - -procedure TcxTreeListBandPlace.WidthChanged; -begin - inherited WidthChanged; - CalculateChildItemWidths; -end; - -procedure TcxTreeListBandPlace.CalculateChildItemWidths; -var - AAutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AAutoWidthObject := TcxAutoWidthObject.Create(ChildItemCount); - try - for I := 0 to ChildItemCount - 1 do - ChildItems[I].InitAutoWidthItem(AAutoWidthObject.AddItem); - AAutoWidthObject.AvailableWidth := Width; - AAutoWidthObject.Calculate; - - for I := 0 to ChildItemCount - 1 do - ChildItems[I].Width := AAutoWidthObject[I].AutoWidth; - finally - AAutoWidthObject.Free; - end; -end; - -procedure TcxTreeListBandPlace.RefreshChildItems; -var - I: Integer; - ABandAccess: TcxTreeListBandAccess; -begin - ABandAccess := TcxTreeListBandAccess(Band); - FChildItems.Count := ABandAccess.ChildVisibleBands.Count; - for I := 0 to FChildItems.Count - 1 do - begin - FChildItems[I] := Controller.ItemsByBand[ABandAccess.ChildVisibleBands[I]]; - ChildItems[I].FParent := Self; - end; -end; - -function TcxTreeListBandPlace.GetChildItem( - Index: Integer): TcxTreeListCustomBandPlace; -begin - Result := TcxTreeListCustomBandPlace(FChildItems[Index]); -end; - -function TcxTreeListBandPlace.GetChildItemCount: Integer; -begin - Result := FChildItems.Count; -end; - -{ TcxTreeListBottomBandPlace } - -procedure TcxTreeListBottomBandPlace.AddItems; -var - I, J: Integer; - ARow: TcxTreeListBandRow; -begin - for I := 0 to Band.BandRows.VisibleItemCount - 1 do - begin - ARow := Band.BandRows.VisibleItems[I]; - for J := 0 to ARow.VisibleItemCount - 1 do - CreateItem(ARow.VisibleItems[J]); - end; -end; - -function TcxTreeListBottomBandPlace.CalculateItemLeftBound( - AnItem: TcxTreeListColumnPlace): Integer; -var - ARow: TcxTreeListBandRow; - I: Integer; - ACurrentItem: TcxTreeListColumnPlace; -begin - Result := LeftBound; - ARow := AnItem.Column.Position.Row; - for I := 0 to AnItem.Column.Position.VisibleColIndex - 1 do - begin - ACurrentItem := ItemsByColumn[ARow.VisibleItems[I]]; - Inc(Result, ACurrentItem.Width); - end; -end; - -procedure TcxTreeListBottomBandPlace.CalculateItemsWidth; -var - I, J: Integer; - ARow: TcxTreeListBandRow; - AAutoWidthObject: TcxAutoWidthObject; - AColumn: TcxTreeListColumn; -begin - for I := 0 to Band.BandRows.VisibleItemCount - 1 do - begin - ARow := Band.BandRows.VisibleItems[I]; - AAutoWidthObject := TcxAutoWidthObject.Create(ARow.VisibleItemCount); - try - for J := 0 to ARow.VisibleItemCount - 1 do - ItemsByColumn[ARow.VisibleItems[J]].InitAutoWidthItem(AAutoWidthObject.AddItem); - AAutoWidthObject.AvailableWidth := ItemsAvailableWidth; - AAutoWidthObject.Calculate; - - for J := 0 to ARow.VisibleItemCount - 1 do - begin - AColumn := ARow.VisibleItems[J]; - ItemsByColumn[AColumn].Width := AAutoWidthObject[J].AutoWidth; - end; - finally - AAutoWidthObject.Free; - end; - end; -end; - -function TcxTreeListBottomBandPlace.GetItemsAutoWidth: Boolean; -begin - Result := True; -end; - -function TcxTreeListBottomBandPlace.GetItemsAvailableWidth: Integer; -begin - Result := Width; -end; - -function TcxTreeListBottomBandPlace.GetRowCount: Integer; -begin - Result := Controller.LevelCount - LevelIndex; -end; - -function TcxTreeListBottomBandPlace.InternalCalculateMinWidth: Integer; -var - I, V, J: Integer; - ARow: TcxTreeListBandRow; - AColumn: TcxTreeListColumn; -begin - Result := 0; - for I := 0 to Band.BandRows.VisibleItemCount - 1 do - begin - V := 0; - ARow := Band.BandRows.VisibleItems[I]; - for J := 0 to ARow.VisibleItemCount - 1 do - begin - AColumn := ARow.VisibleItems[J]; - Inc(V, AColumn.MinWidth); - end; - if Result < V then Result := V; - end; -end; - -function TcxTreeListBottomBandPlace.InternalCalculateWidth: Integer; -var - I, V, J: Integer; - ARow: TcxTreeListBandRow; - AColumn: TcxTreeListColumn; -begin - Result := 0; - for I := 0 to Band.BandRows.VisibleItemCount - 1 do - begin - V := 0; - ARow := Band.BandRows.VisibleItems[I]; - for J := 0 to ARow.VisibleItemCount - 1 do - begin - AColumn := ARow.VisibleItems[J]; - Inc(V, AColumn.Width); - end; - if Result < V then Result := V; - end; -end; - -procedure TcxTreeListBottomBandPlace.WidthChanged; -begin - inherited; - CalculateItemsWidth; -end; - -{ TcxTreeListItemPlaceController } - -constructor TcxTreeListItemPlaceController.Create( - AFormatter: TcxTreeListReportLinkFormatter); -begin - inherited Create(AFormatter); - FBottomItems := TList.Create; - FItems := TObjectList.Create; - FRootItems := TList.Create; - FLevelHeights := TList.Create; - - FHeight := -1; - FLevelCount := -1; -end; - -destructor TcxTreeListItemPlaceController.Destroy; -begin - FreeAndNil(FLevelHeights); - FreeAndNil(FRootItems); - FreeAndNil(FItems); - FreeAndNil(FBottomItems); - inherited; -end; - -procedure TcxTreeListItemPlaceController.Calculate; -begin - CalculateLevelHeights; - CalculateItemWidths; -end; - -procedure TcxTreeListItemPlaceController.Refresh; -begin - FItems.Clear; - AddItems; - RefreshRootItems; - RefreshBottomItems; - RefreshItems; -end; - -function TcxTreeListItemPlaceController.BottomIndexOf(AnItem: TcxTreeListCustomBandPlace): Integer; -begin - Result := FBottomItems.IndexOf(AnItem); -end; - -function TcxTreeListItemPlaceController.IndexOf( - AnItem: TcxTreeListCustomBandPlace): Integer; -begin - Result := FItems.IndexOf(AnItem); -end; - -function TcxTreeListItemPlaceController.IndexOf( - ABand: TcxTreeListBand): Integer; -begin - for Result := 0 to ItemCount - 1 do - if Items[Result].Band = ABand then - Exit; - Result := -1; -end; - -function TcxTreeListItemPlaceController.RootIndexOf( - ABand: TcxTreeListBand): Integer; -begin - for Result := 0 to RootItemCount - 1 do - if RootItems[Result].Band = ABand then - Exit; - Result := -1; -end; - -function TcxTreeListItemPlaceController.RootIndexOf( - AnItem: TcxTreeListCustomBandPlace): Integer; -begin - Result := FRootItems.IndexOf(AnItem); -end; - -function TcxTreeListItemPlaceController.CalculateHeaderLineCount: Integer; -var - I, V: Integer; -begin - Result := -1; - for I := 0 to BottomItemCount - 1 do - begin - V := BottomItems[I].HeaderLineCount; - if Result < V then Result := V; - end; -end; - -function TcxTreeListItemPlaceController.CalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RootItemCount - 1 do - Inc(Result, RootItems[I].Width); -end; - -function TcxTreeListItemPlaceController.GetItemByColumn( - AColumn: TcxTreeListColumn): TcxTreeListColumnPlace; -var - ABandPlace: TcxTreeListCustomBandPlace; -begin - ABandPlace := ItemsByBand[TcxTreeListColumn(AColumn).Position.Band]; - if ABandPlace <> nil then - Result := ABandPlace.ItemsByColumn[AColumn] - else - Result := nil; -end; - -procedure TcxTreeListItemPlaceController.AddItems; -var - I: Integer; -begin - FItems.Count := Formatter.BandCount; - for I := 0 to ItemCount - 1 do - FItems[I] := CreateItem(Formatter.Bands[I]); -end; - -function TcxTreeListItemPlaceController.CreateItem( - ABand: TcxTreeListBand): TcxTreeListCustomBandPlace; -begin - Result := GetItemClass(ABand).Create(Self, nil, ABand); -end; - -function TcxTreeListItemPlaceController.GetItemClass( - ABand: TcxTreeListBand): TcxTreeListCustomBandPlaceClass; -begin - if ABand.IsBottom then - Result := TcxTreeListBottomBandPlace - else - Result := TcxTreeListBandPlace; -end; - -procedure TcxTreeListItemPlaceController.RefreshBottomItems; -var - I: Integer; -begin - FBottomItems.Count := Adapter.BottomBandCount; - for I := 0 to BottomItemCount - 1 do - FBottomItems[I] := ItemsByBand[Adapter.BottomBands[I]]; -end; - -procedure TcxTreeListItemPlaceController.RefreshItems; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].Refresh; -end; - -procedure TcxTreeListItemPlaceController.RefreshRootItems; -var - I: Integer; -begin - FRootItems.Count := Adapter.RootBandCount; - for I := 0 to RootItemCount - 1 do - FRootItems[I] := ItemsByBand[Adapter.RootBands[I]]; -end; - -function TcxTreeListItemPlaceController.CalculateHeight: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to LevelCount - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TcxTreeListItemPlaceController.CalculateItemHeight( - AnItem: TcxTreeListCustomBandPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := AnItem.LevelIndex to AnItem.LevelIndex + AnItem.RowCount - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TcxTreeListItemPlaceController.CalculateItemLeftBound( - AnItem: TcxTreeListCustomBandPlace): Integer; -var - I: Integer; -begin - if AnItem.Parent <> nil then - begin - Result := AnItem.Parent.LeftBound; - for I := 0 to AnItem.Index - 1 do - Inc(Result, AnItem.Parent.ChildItems[I].Width); - end - else - begin - Result := 0; - for I := 0 to AnItem.Index - 1 do - Inc(Result, RootItems[I].Width); - end; -end; - -function TcxTreeListItemPlaceController.CalculateItemTopBound( - AnItem: TcxTreeListCustomBandPlace): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AnItem.LevelIndex - 1 do - Inc(Result, LevelHeights[I]); -end; - -function TcxTreeListItemPlaceController.CalculateLevelCount: Integer; -var - I, V: Integer; -begin - Result := 0; - if ItemCount <> 0 then - begin - for I := 0 to ItemCount - 1 do - begin - V := Items[I].LevelIndex; - if Result < V then Result := V; - end; - Inc(Result); - end; -end; - -procedure TcxTreeListItemPlaceController.CalculateItemWidths; -var - I: Integer; - AutoWidthObject: TcxAutoWidthObject; -begin - for I := 0 to RootItemCount - 1 do - RootItems[I].AssignWidth; - - if AutoWidth then - begin - AutoWidthObject := TcxAutoWidthObject.Create(RootItemCount); - try - for I := 0 to RootItemCount - 1 do - RootItems[I].InitAutoWidthItem(AutoWidthObject.AddItem); - AutoWidthObject.AvailableWidth := AvailableWidth; - AutoWidthObject.Calculate; - - for I := 0 to RootItemCount - 1 do - RootItems[I].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; - end; -end; - -procedure TcxTreeListItemPlaceController.CalculateLevelHeights; -var - I, V: Integer; - AItem: TcxTreeListCustomBandPlace; -begin - FLevelHeights.Count := LevelCount; - for I := 0 to ItemCount - 1 do - begin - AItem := Items[I]; - V := AItem.CalculateLevelHeight; - if LevelHeights[AItem.LevelIndex] < V then - LevelHeights[AItem.LevelIndex] := V; - end; -end; - -function TcxTreeListItemPlaceController.GetAutoWidth: Boolean; -begin - Result := Formatter.AutoWidth or Adapter.AutoWidth; -end; - -function TcxTreeListItemPlaceController.GetAvailableWidth: Integer; -begin - Result := Formatter.AvailableWidth; -end; - -function TcxTreeListItemPlaceController.GetBottomItem( - AIndex: Integer): TcxTreeListCustomBandPlace; -begin - Result := TcxTreeListCustomBandPlace(FBottomItems[AIndex]); -end; - -function TcxTreeListItemPlaceController.GetBottomItemCount: Integer; -begin - Result := FBottomItems.Count; -end; - -function TcxTreeListItemPlaceController.GetHeight: Integer; -begin - if FHeight = -1 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TcxTreeListItemPlaceController.GetItem( - AIndex: Integer): TcxTreeListCustomBandPlace; -begin - Result := TcxTreeListCustomBandPlace(FItems[AIndex]); -end; - -function TcxTreeListItemPlaceController.GetItemByBand( - ABand: TcxTreeListBand): TcxTreeListCustomBandPlace; -var - AIndex: Integer; -begin - AIndex := IndexOf(ABand); - if AIndex <> -1 then - Result := Items[IndexOf(ABand)] - else - Result := nil; -end; - -function TcxTreeListItemPlaceController.GetItemCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxTreeListItemPlaceController.GetLevelCount: Integer; -begin - if FLevelCount = -1 then - FLevelCount := CalculateLevelCount; - Result := FLevelCount; -end; - -function TcxTreeListItemPlaceController.GetLevelHeight( - AIndex: Integer): Integer; -begin - Result := Integer(FLevelHeights[AIndex]); -end; - -function TcxTreeListItemPlaceController.GetRootItem( - AIndex: Integer): TcxTreeListCustomBandPlace; -begin - Result := TcxTreeListCustomBandPlace(FRootItems[AIndex]); -end; - -function TcxTreeListItemPlaceController.GetRootItemCount: Integer; -begin - Result := FRootItems.Count; -end; - -procedure TcxTreeListItemPlaceController.SetLevelHeight(AIndex, - AValue: Integer); -begin - FLevelHeights[AIndex] := TObject(AValue); -end; - -{ TcxTreeListReportLinkFormatter } - -constructor TcxTreeListReportLinkFormatter.Create(ABuilder: TcxTreeListReportLinkBuilder); -begin - inherited; - FFont := TFont.Create; - FLookAndFeelItems := TList.Create; - FLevelInfos := TObjectList.Create; - FNodes := TList.Create; - FColumns := TList.Create; - FBands := TList.Create; - CreateNodeList; - CreateLevelInfos; - FTransparentColor := dxPSCore.dxDefaultContentColor; - FItemPlaceController := TcxTreeListItemPlaceController.Create(Self); -end; - -destructor TcxTreeListReportLinkFormatter.Destroy; -begin - FreeAndNil(FItemPlaceController); - FreeAndNil(FBands); - FreeAndNil(FColumns); - FreeAndNil(FNodes); - FreeAndNil(FLevelInfos); - FreeAndNil(FLookAndFeelItems); - FreeAndNil(FFont); - inherited; -end; - -function TcxTreeListReportLinkFormatter.Adapter: TcxTreeListAdapter; -begin - Result := Builder.Adapter; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeHost(AHost: TdxReportCell); -begin - AHost.CellSides := []; - AHost.Transparent := True; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeBandItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Band: TcxTreeListBand; -begin - Band := Bands[AnIndex]; - SetViewParams(AnItem, GetBandItemViewParams(Band)); - RegisterLookAndFeelItem(AnItem, cesRaised); - if HasBackgroundBitmap(tlsv_BandHeader) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_BandHeader); - - with AnItem as TdxReportCellImage do - begin - Data := Integer(Band); - EndEllipsis := Band.Caption.ShowEndEllipsis; - if not Band.Caption.Glyph.Empty then - begin - Image := Band.Caption.Glyph; - ImageLayout := HeaderImageLayoutMap[Band.Caption.GlyphAlignHorz, Band.Caption.GlyphAlignVert]; - ImageTransparent := True; - IsTextDrawnForCenteredImage := True; - IsTextShiftedForHorizontallyCenteredImage := not (ImageLayout in [ilImageTopCenter, ilImageCenterCenter, ilImageBottomCenter]); - end; - Multiline := Band.Caption.Multiline; - Text := Band.Caption.Text; - TextAlignX := TextAlignXMap[Band.Caption.AlignHorz]; - TextAlignY := TextAlignYMap[Band.Caption.AlignVert]; - end; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeBandRow(ARow: TdxReportCell); -begin - //SetViewParams(ARow, GetBandBackgroundViewParams); - ARow.Transparent := True; //??? - ARow.Data := Integer(TcxTreeListBandAttribute); -end; - -procedure TcxTreeListReportLinkFormatter.DoReportLinkInitializeBandItem(AnItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - ReportLink.DoInitializeBandCell(Bands[AIndex], TdxReportCellImage(AnItem)); -end; - -function TcxTreeListReportLinkFormatter.GetBandBackgroundViewParams: TdxReportItemViewParams; -begin - Result.NativeParams := Adapter.GetBandBackgroundViewParams; - Result.CellSides := []; - Result.FontStyle := []; - Result.Transparent := True; -end; - -function TcxTreeListReportLinkFormatter.GetBandItemBounds(Index: Integer): TRect; -var - Item: TcxTreeListCustomBandPlace; -begin - Item := ItemPlaceController.ItemsByBand[Bands[Index]]; - if Item <> nil then - Result := Item.Bounds - else - Result := dxPSGlbl.NullRect; -end; - -function TcxTreeListReportLinkFormatter.GetBandItemClass(Index: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellImage; -end; - -function TcxTreeListReportLinkFormatter.GetBandItemViewParams(ABand: TcxTreeListBand): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetBandHeaderParams(ABand, Result.NativeParams) - else - Result.NativeParams := Adapter.GetBandHeaderViewParams(ABand); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if ABand <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedBandHeaderItemColor; - Result.NativeParams.TextColor := Adapter.ThemedBandHeaderItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeNodeCheck(AnItem: TdxCustomReportCellCheck; - ANode: TcxTreeListNode; AnIndex: Integer); -begin - SetViewParams(AnItem, GetNodeCheckViewParams(ANode, AnIndex)); - if HasBackgroundBitmap(tlsv_Content) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_Content); - AnItem.Checked := ANode.CheckState <> cbsUnchecked; - AnItem.Enabled := ANode.CheckState <> cbsGrayed; - AnItem.Data := MakeIndentIndex(AnIndex); - TdxReportCellCheck(AnItem).FlatBorder := ReportLink.OptionsRefinements.FlatCheckMarks; -end; - -function TcxTreeListReportLinkFormatter.GetNodeCheckCellSides(ANode: TcxTreeListNode; - AnIndex: Integer): TdxCellSides; -begin - Result := []; - if ReportLink.OptionsView.Borders and not HasStateImages(ANode) and - not HasImages(ANode) then - Result := [csRight]; -end; - -function TcxTreeListReportLinkFormatter.GetNodeCheckClass(ANode: TcxTreeListNode): TdxCustomReportCellCheckClass; -begin - case ANode.Parent.CheckGroupType of - ncgCheckGroup: - Result := TdxReportCellCheck - else {ncgRadioGroup} - Result := TdxReportCellRadio; - end; -end; - -function TcxTreeListReportLinkFormatter.GetNodeCheckViewParams(ANode: TcxTreeListNode; - AnIndex: Integer): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ANode) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetImagesParams(ANode, Result.NativeParams) - else - if CanProcessSelectionStyle(ANode) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetIndentViewParams(ANode, AnIndex); - - Result.CellSides := GetNodeCheckCellSides(ANode, AnIndex); - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeFooterCell(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ACellIndex: Integer; ANode: TcxTreeListNode); -var - ASummaryItem: TcxTreeListSummaryItem; - I, AColumnIndex: Integer; -begin - AColumnIndex := FColumns.IndexOf(AColumn); - SetViewParams(AnItem, GetFooterCellViewParams(AColumn)); - RegisterLookAndFeelItem(AnItem, cesSunken); - if HasBackgroundBitmap(tlsv_ColumnFooter) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_ColumnFooter); - - ASummaryItem := GetSummaryItems(ANode)[AColumnIndex, ACellIndex]; - - with AnItem as TdxReportCellString do - begin - Data := Integer(AColumn); - Multiline := AColumn.Position.LineCount > 1; - TextAlignX := TextAlignXMap[ASummaryItem.AlignHorz]; - TextAlignY := TextAlignYMap[ASummaryItem.AlignVert]; - if (GetFooterCellCount(AColumn, ANode) <> 1) or - (Length(GetSummaryItems(ANode)[AColumnIndex]) = 1) then - Text := ANode.FooterSummaryTexts[ASummaryItem.AbsoluteIndex] - else - for I := 0 to High(GetSummaryItems(ANode)[AColumnIndex]) do - begin - if Text <> '' then - Text := Text + ';'; - Text := Text + ANode.FooterSummaryTexts[GetSummaryItems(ANode)[AColumnIndex, I].AbsoluteIndex]; - end; - end; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeFooterIndent(AnItem: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); -begin - SetViewParams(AnItem, GetNodeIndentViewParams(ANode, AnIndex, AnIndentCount)); - if HasBackgroundBitmap(tlsv_Content) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_Content); - AnItem.Data := MakeIndentIndex(AnIndex); - AnItem.ShowButton := False; - if ReportLink.OptionsView.Borders and (AnIndex = AnIndentCount - 1) then - AnItem.CellSides := [csRight] - else - AnItem.CellSides := []; - if ReportLink.OptionsView.TreeLines then - AnItem.TreeLineMode := GetNodeFooterIndentTreeLineMode(AnIndex, AnIndentCount, ANode); -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeFooterBandedRow( - ARow: TdxReportCell; AIndentCount: Integer); -var - ABandPlace: TcxTreeListCustomBandPlace; - AIndex, ALastIndex: Integer; -begin - SetViewParams(ARow, GetFooterRowViewParams); - RegisterLookAndFeelItem(ARow, cesRaised); - ABandPlace := ItemPlaceController.GetItemByBand(TcxTreeListBand(ARow.Data)); - ARow.CellSides := csTopBottom; - AIndex := ABandPlace.Controller.BottomIndexOf(ABandPlace); - ALastIndex := ABandPlace.Controller.BottomItemCount - 1; - if (AIndex = 0) or ABandPlace.Expandable and (AIndentCount > 0) then - ARow.CellSides := ARow.CellSides + [csLeft]; - if (AIndex = ALastIndex) or - ABandPlace.Controller.BottomItems[AIndex + 1].Expandable and (AIndentCount > 0) then - ARow.CellSides := ARow.CellSides + [csRight]; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeFooterRow(ARow: TdxReportCell); -begin - ARow.Transparent := True; - ARow.Data := Integer(TcxTreeListFooterAttribute); - ARow.CellSides := csLeftRight; -end; - -procedure TcxTreeListReportLinkFormatter.DoReportLinkInitializeFooterCell(AnItem: TAbstractdxReportCellData; - AColumnIndex, ACellIndex: Integer); -begin - ReportLink.DoInitializeFooterCell(Columns[AColumnIndex], ACellIndex, - TdxReportCellString(AnItem)); -end; - -function TcxTreeListReportLinkFormatter.GetFooterCellBounds(AColumn: TcxTreeListColumn; - ACellIndex, AIndent: Integer): TRect; -var - AItem: TcxTreeListColumnPlace; - AColumnAccess: TcxTreeListColumnAccess; -begin - AItem := ItemPlaceController.ItemsByColumn[AColumn]; - if AItem <> nil then - begin - Result := AItem.FooterCellBounds[ACellIndex]; - AColumnAccess := TcxTreeListColumnAccess(AColumn); - if AColumnAccess.HasIndent then - Inc(Result.Left, AIndent); - end - else - Result := dxPSGlbl.NullRect; -end; - -function TcxTreeListReportLinkFormatter.GetFooterCellClass: TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TcxTreeListReportLinkFormatter.GetFooterCellViewParams(AColumn: TcxTreeListColumn): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetColumnFooterParams(nil, AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetColumnFooterViewParams(AColumn); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedFooterItemColor; - Result.NativeParams.TextColor := Adapter.ThemedFooterItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); -end; - -function TcxTreeListReportLinkFormatter.GetNodeFooterIndentTreeLineMode(AnIndex, AnIndentCount: Integer; - ANode: TcxTreeListNode): TdxPSTreeLineMode; - - function GetParentWithCertainLevel(ALevel: Integer): TcxTreeListNode; - begin - Result := ANode; - while Result.Level > ALevel do - Result := Result.Parent; - end; - -begin - if not Adapter.ShowRoot then - Inc(AnIndex); - if IsNodeLastChild(GetParentWithCertainLevel(AnIndex)) then - Result := tlmNone - else - Result := tlmVertical -end; - -function TcxTreeListReportLinkFormatter.GetFooterRowViewParams: TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetFooterRowParams(Result.NativeParams) - else - Result.NativeParams := Adapter.GetFooterRowViewParams; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeHeaderItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - AColumn: TcxTreeListColumn; -begin - AColumn := Columns[AnIndex]; - SetViewParams(AnItem, GetHeaderItemViewParams(AColumn)); - RegisterLookAndFeelItem(AnItem, cesRaised); - if HasBackgroundBitmap(tlsv_ColumnHeader) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_ColumnHeader); - - with AnItem as TdxReportCellImage do - begin - Data := Integer(AColumn); - EndEllipsis := AColumn.Caption.ShowEndEllipsis; - if not AColumn.Caption.Glyph.Empty then - begin - Image := AColumn.Caption.Glyph; - ImageLayout := HeaderImageLayoutMap[AColumn.Caption.GlyphAlignHorz, AColumn.Caption.GlyphAlignVert]; - IsTextDrawnForCenteredImage := True; - IsTextShiftedForHorizontallyCenteredImage := not (ImageLayout in [ilImageTopCenter, ilImageCenterCenter, ilImageBottomCenter]); - end; - Multiline := AColumn.Caption.MultiLine; - SortOrder := SortOrderMap[AColumn.SortOrder]; - Text := AColumn.Caption.Text; - TextAlignX := TextAlignXMap[AColumn.Caption.AlignHorz]; - TextAlignY := TextAlignYMap[AColumn.Caption.AlignVert]; - end; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeHeaderRow(ARow: TdxReportCell); -begin - SetViewParams(ARow, GetHeaderItemViewParams(nil)); - ARow.Data := Integer(TcxTreeListHeaderAttribute); -end; - -procedure TcxTreeListReportLinkFormatter.DoReportLinkInitializeHeaderItem(AnItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - ReportLink.DoInitializeHeaderCell(Columns[AIndex], TdxReportCellImage(AnItem)); -end; - -function TcxTreeListReportLinkFormatter.GetHeaderItemBounds(AnIndex: Integer): TRect; -var - AItem: TcxTreeListColumnPlace; -begin - AItem := ItemPlaceController.ItemsByColumn[Columns[AnIndex]]; - if AItem <> nil then - Result := AItem.HeaderCellBounds - else - Result := dxPSGlbl.NullRect; -end; - -function TcxTreeListReportLinkFormatter.GetHeaderItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellImage; -end; - -function TcxTreeListReportLinkFormatter.GetHeaderItemViewParams(AColumn: TcxTreeListColumn): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetColumnHeaderParams(AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetColumnHeaderViewParams(AColumn); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedHeaderItemColor; - Result.NativeParams.TextColor := Adapter.ThemedHeaderItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeNodeImage(AnItem: TdxReportCellGraphic; - ANode: TcxTreeListNode; AnIndex: Integer); -begin - SetViewParams(AnItem, GetNodeImageViewParams(ANode, AnIndex)); - if HasBackgroundBitmap(tlsv_Content) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_Content); - - AnItem.Data := MakeIndentIndex(AnIndex); - AnItem.DrawMode := gdmCenter; - AnItem.ImageIndex := ANode.ImageIndex; - AnItem.OverlayImageIndex := ANode.OverlayIndex; - AnItem.ImageList := Images[ANode.Level]; - AnItem.ImageTransparent := True; -end; - -procedure TcxTreeListReportLinkFormatter.DoReportLinkInitializeNodeImage(AnItem: TAbstractdxReportCellData; - ANode: TcxTreeListNode; AnIndex: Integer); -begin - ReportLink.DoInitializeIndentCell(ANode, AnIndex, AnItem); -end; - -function TcxTreeListReportLinkFormatter.GetNodeImageCellSides(ANode: TcxTreeListNode; - AnIndex: Integer): TdxCellSides; -begin - Result := []; - if ReportLink.OptionsView.Borders then - Result := [csRight]; -end; - -function TcxTreeListReportLinkFormatter.GetNodeImageClass: TdxReportCellGraphicClass; -begin - Result := TdxReportCellGraphic; -end; - -function TcxTreeListReportLinkFormatter.GetNodeImageViewParams(ANode: TcxTreeListNode; - AnIndex: Integer): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ANode) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetImagesParams(ANode, Result.NativeParams) - else - if CanProcessSelectionStyle(ANode) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetIndentViewParams(ANode, AnIndex); - - Result.CellSides := GetNodeImageCellSides(ANode, AnIndex); - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeNodeIndent(AnItem: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); -begin - SetViewParams(AnItem, GetNodeIndentViewParams(ANode, AnIndex, AnIndentCount)); - if HasBackgroundBitmap(tlsv_Content) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_Content); - - AnItem.Data := MakeIndentIndex(AnIndex); - AnItem.ShowButton := (AnIndex = AnIndentCount - 1) and ANode.HasChildren and ReportLink.OptionsView.ExpandButtons; - if AnItem.ShowButton then - DoInitializeExpandButton(AnItem, AnIndex, AnIndentCount, ANode); - if ReportLink.OptionsView.TreeLines then - AnItem.TreeLineMode := GetNodeIndentTreeLineMode(AnIndex, AnIndentCount, ANode); -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeExpandButton(AnItem: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); -begin - with AnItem do - begin - ButtonExpanded := IsNodeExpanded(ANode); - ButtonSize := ExpandButtonSize; - ButtonInteriorColor := ExpandButtonColor; - ButtonTransparent := IsColorTransparent(ButtonInteriorColor); - end; -end; - -procedure TcxTreeListReportLinkFormatter.DoReportLinkInitializeNodeIndent(AnItem: TAbstractdxReportCellData; - AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); -begin - ReportLink.DoInitializeIndentCell(ANode, AnIndex, AnItem); -end; - -function TcxTreeListReportLinkFormatter.GetNodeIndentCellSides(ANode: TcxTreeListNode; - AnIndex, AnIndentCount: Integer): TdxCellSides; -begin - Result := []; - if ReportLink.OptionsView.Borders and (AnIndex = AnIndentCount - 1) and - not HasStateImages(ANode) and not HasImages(ANode) and not - Adapter.HasCheck(ANode) then - Result := [csRight]; -end; - -function TcxTreeListReportLinkFormatter.GetNodeIndentClass: TdxReportCellExpandButtonClass; -begin - Result := TdxReportCellExpandButton; -end; - -function TcxTreeListReportLinkFormatter.GetNodeIndentTreeLineMode(AnIndex, - AnIndentCount: Integer; ANode: TcxTreeListNode): TdxPSTreeLineMode; -var - Level: Integer; - Parent: TcxTreeListNode; -begin - Level := AnIndentCount - AnIndex - 1; - Parent := GetNodeParent(ANode, Level); - - if Parent = ANode then - if IsNodeLastChild(ANode) then - Result := tlmBottomRightCorner - else - if not HasParent(ANode) and IsNodeFirstChild(ANode) then - Result := tlmTopRightCorner - else - Result := tlmCross - else - if IsNodeLastChild(Parent) then - Result := tlmNone - else - Result := tlmVertical; -end; - -function TcxTreeListReportLinkFormatter.GetNodeIndentViewParams(ANode: TcxTreeListNode; - AnIndex, AnIndentCount: Integer): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ANode) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetIndentParams(ANode, AnIndex, Result.NativeParams) - else - if CanProcessSelectionStyle(ANode) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetIndentViewParams(ANode, AnIndex); - -// if not CanProcessSelectionStyle(ANode) and not IsNodeColorUsedForIndents then -// Result.Color := ReportLink.Color; - - Result.CellSides := GetNodeIndentCellSides(ANode, AnIndex, AnIndentCount); - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeNodeBandedRow(ARow: TdxReportCell); -const - CellSidesMap: array[Boolean] of TdxCellSides = ([], csAll); -begin - ARow.CellSides := CellSidesMap[ReportLink.OptionsView.Borders]; - ARow.Transparent := True; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeNodeRow(ARow: TdxReportCell; - ANode: TcxTreeListNode); -const - CellSidesMap: array[Boolean] of TdxCellSides = ([], csLeftRight); -begin - ARow.CellSides := CellSidesMap[ReportLink.OptionsView.Borders]; - ARow.Data := Integer(ANode); - ARow.Transparent := True; - - ReportLink.AddReportRow(ARow); -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeNodeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode; AnIsPreview: Boolean = False); - - function GetViewParams: TdxReportItemViewParams; - begin - if AnIsPreview then - Result := GetPreviewViewParams(AColumn, ANode) - else - Result := GetNodeItemViewParams(AColumn, ANode); - end; - -var - Properties: TcxCustomEditProperties; - ViewParams: TdxReportItemViewParams; - CellValue: TcxEditValue; -begin - Properties := Adapter.GetProperties(AColumn, ANode); - ViewParams := GetViewParams; - CellValue := GetCellValue(Properties, AColumn, ANode); - dxPScxCommon.dxPSDataMaps.InitializeItem(AnItem, Properties, CellValue, Self, ViewParams, AnIsPreview{, ANode.RecordIndex}); - dxPScxCommon.dxPSDataMaps.GetImageLists(Properties, ReportLink.AppendImageList); - SetViewParams(AnItem, ViewParams); - - with ViewParams, NativeParams do - if (Bitmap <> nil) and not Bitmap.Empty then - AnItem.BackgroundBitmapIndex := ReportLink.AddBackgroundBitmapToPool(Bitmap); - - AnItem.Data := Integer(AColumn); -end; - -procedure TcxTreeListReportLinkFormatter.DoReportLinkInitializeNodeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode); -begin - ReportLink.DoInitializeCell(ANode, AColumn, AnItem); -end; - -function TcxTreeListReportLinkFormatter.GetCellValue(AProperties: TcxCustomEditProperties; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TcxEditValue; -begin - if AProperties.GetEditValueSource(False) = evsValue then - Result := ANode.Values[AColumn.ItemIndex] - else - Result := ANode.Texts[AColumn.ItemIndex]; -end; - -function TcxTreeListReportLinkFormatter.GetNodeBackgroundBitmapStyleIndex(ANode: TcxTreeListNode): Integer; - - function HasBackgroundBitmap(AStyle: TcxStyle): Boolean; - begin - Result := (AStyle <> nil) and (svBitmap in AStyle.AssignedValues); - end; - -begin - Result := tlsv_Content; - if IsOddNode(ANode) and HasBackgroundBitmap(ReportLink.Styles.StylesByCaption[cxGetResourceString(@sdxContentOddStyle)]) then - Result := tlsv_ContentOdd - else - if not IsOddNode(ANode) and HasBackgroundBitmap(ReportLink.Styles.StylesByCaption[cxGetResourceString(@sdxContentEvenStyle)]) then - Result := tlsv_ContentEven -end; - -function TcxTreeListReportLinkFormatter.GetNodeItemBounds(ANode: TcxTreeListNode; - AIndex: Integer): TRect; -var - AItem: TcxTreeListColumnPlace; -begin - AItem := ItemPlaceController.ItemsByColumn[Columns[AIndex]]; - if AItem <> nil then - Result := AItem.CellBounds[ANode] - else - Result := dxPSGlbl.NullRect; -end; - -function TcxTreeListReportLinkFormatter.GetNodeItemCellSides(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TdxCellSides; -begin - if ReportLink.OptionsView.Borders then - Result := csAll - else - Result := []; -end; - -function TcxTreeListReportLinkFormatter.GetNodeItemClass(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode; AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := dxPSDataMaps.ItemClass(Adapter.GetProperties(AColumn, ANode), AnIsPreview); -end; - -function TcxTreeListReportLinkFormatter.GetNodeItemViewParams(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ANode) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetContentParams(ANode, AColumn, Result.NativeParams) - else - if CanProcessSelectionStyle(ANode) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetContentViewParams(ANode, AColumn); - - Result.CellSides := GetNodeItemCellSides(AColumn, ANode); - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; - -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializePreview(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode); -begin - DoInitializeNodeItem(AnItem, AColumn, ANode, True); -end; - -function TcxTreeListReportLinkFormatter.GetPreviewCellSides(ANode: TcxTreeListNode): TdxCellSides; -const - CellSidesMap: array[Boolean] of TdxCellSides = ([], csAll); -begin - Result := CellSidesMap[ReportLink.OptionsView.Borders]; -end; - -function TcxTreeListReportLinkFormatter.GetPreviewClass(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TdxReportCellDataClass; -begin - Result := GetNodeItemClass(AColumn, ANode, True); -end; - -function TcxTreeListReportLinkFormatter.GetPreviewViewParams(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ANode) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetPreviewParams(ANode, AColumn, Result.NativeParams) - else - if CanProcessSelectionStyle(ANode) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetPreviewViewParams(ANode, AColumn); - - Result.CellSides := GetPreviewCellSides(ANode); - Result.FontStyle := []; - Result.Transparent := {True;//}IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeNodeSeparator(AnItem: TAbstractdxReportCellData); -begin - with TdxReportCellBox(AnItem) do - begin - CellSides := csAll; - Color := NodeSeparatorColor; - Transparent := False; - end; -end; - -procedure TcxTreeListReportLinkFormatter.DoInitializeNodeSeparatorRow(ARow: TdxReportCell); -begin -end; - -function TcxTreeListReportLinkFormatter.GetNodeSeparatorClass: TdxReportCellBoxClass; -begin - Result := TdxReportCellBox; -end; - -{ state images } - -procedure TcxTreeListReportLinkFormatter.DoInitializeNodeStateImage(AnItem: TdxReportCellGraphic; - ANode: TcxTreeListNode; AnIndex: Integer); -begin - SetViewParams(AnItem, GetNodeStateImageViewParams(ANode, AnIndex)); - if HasBackgroundBitmap(tlsv_Content) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_Content); - - AnItem.Data := MakeIndentIndex(AnIndex); - AnItem.DrawMode := gdmCenter; - AnItem.ImageIndex := ANode.StateIndex; - AnItem.OverlayImageIndex := ANode.OverlayStateIndex; - AnItem.ImageList := StateImages[ANode.Level]; - AnItem.ImageTransparent := True; -end; - -procedure TcxTreeListReportLinkFormatter.DoReportLinkInitializeNodeStateImage(AnItem: TAbstractdxReportCellData; - ANode: TcxTreeListNode; AnIndex: Integer); -begin - ReportLink.DoInitializeIndentCell(ANode, AnIndex, AnItem); -end; - -function TcxTreeListReportLinkFormatter.GetNodeStateImageCellSides(ANode: TcxTreeListNode; - AnIndex: Integer): TdxCellSides; -begin - Result := []; - if ReportLink.OptionsView.Borders and not HasImages(ANode) then - Result := [csRight]; -end; - -function TcxTreeListReportLinkFormatter.GetNodeStateImageClass: TdxReportCellGraphicClass; -begin - Result := TdxReportCellGraphic; -end; - -function TcxTreeListReportLinkFormatter.GetNodeStateImageViewParams(ANode: TcxTreeListNode; - AnIndex: Integer): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ANode) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetImagesParams(ANode, Result.NativeParams) - else - if CanProcessSelectionStyle(ANode) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetIndentViewParams(ANode, AnIndex); - - Result.CellSides := GetNodeStateImageCellSides(ANode, AnIndex); - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent; -end; - -function TcxTreeListReportLinkFormatter.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TcxTreeListReportLinkFormatter._AddRef: Integer; -begin - Result := 1; -end; - -function TcxTreeListReportLinkFormatter._Release: Integer; -begin - Result := 1; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams_GetAutoHeight: Boolean; -begin - Result := Adapter.CellAutoHeight; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams_GetDC: HDC; -begin - Result := Self.DC; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; -begin - Result := ReportLink.OptionsRefinements.DisplayGraphicsAsText; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams_GetEndEllipsis: Boolean; -begin - Result := Adapter.CellEndEllipsis; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams_GetFlatCheckMarks: Boolean; -begin - Result := ReportLink.OptionsRefinements.FlatCheckMarks; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams_GetGraphicsText: string; -begin - Result := ReportLink.OptionsRefinements.GraphicsText; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams_GetMultiline: Boolean; -begin - Result := Adapter.CellMultiline; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams_GetTransparentGraphics: Boolean; -begin - Result := ReportLink.OptionsRefinements.TransparentGraphics; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := Adapter.PreviewLeftIndent; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := Adapter.PreviewRightIndent; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - if PreviewAutoHeight then - Result := -1 - else - Result := PreviewLineHeight * PreviewMaxLineCount; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := PreviewMaxLineCount; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; -const - GraphicClasses: array[Boolean] of TGraphicClass = (TMetafile, TBitmap); -begin - Result := GraphicClasses[IdxPSCellParams2_GetRichEditTransparent]; -end; - -function TcxTreeListReportLinkFormatter.IdxPSCellParams2_GetRichEditTransparent: Boolean; -begin - {$IFDEF DXVER500} - Result := ReportLink.OptionsRefinements.TransparentRichEdits; - {$ELSE} - Result := False; - {$ENDIF} -end; - -procedure TcxTreeListReportLinkFormatter.AddDelimiters; -begin - with ReportLink.OptionsPagination do - begin - if Band or Column then AddHorizontalDelimiters; - if Node then AddVerticalDelimiters; - end; -end; - -procedure TcxTreeListReportLinkFormatter.AddHorizontalDelimiters; -var - I: Integer; - R: TRect; - AColumnPlace: TcxTreeListColumnPlace; - ABandPlace: TcxTreeListCustomBandPlace; -begin - if ReportLink.OptionsPagination.Band then - begin - for I := 0 to BandCount - 1 do - begin - ABandPlace := ItemPlaceController.ItemsByBand[Bands[I]]; - if ABandPlace <> nil then - begin - R := ABandPlace.Bounds; - ReportLink.AddHorizontalDelimiter(R.Left); - ReportLink.AddHorizontalDelimiter(R.Right); - end; - end; - end - else - for I := 0 to ColumnCount - 1 do - begin - AColumnPlace := ItemPlaceController.ItemsByColumn[Columns[I]]; - if AColumnPlace <> nil then - begin - R := AColumnPlace.HeaderCellBounds; - ReportLink.AddHorizontalDelimiter(R.Left); - ReportLink.AddHorizontalDelimiter(R.Right); - end; - end; -end; - -procedure TcxTreeListReportLinkFormatter.AddVerticalDelimiters; -var - I: Integer; -begin - for I := 0 to Builder.ReportRowCount - 1 do - ReportLink.AddVerticalDelimiter(Builder.ReportRows[I]); -end; - -procedure TcxTreeListReportLinkFormatter.AfterBuilding; -begin - if not Builder.IsAborted then - begin - FormatLookAndFeelItems; - AddDelimiters; - Builder.ReportCells.BorderColor := GridLinesColor; - Builder.ReportCells.TreeLineColor := Adapter.TreeLinesColor; - Builder.ReportCells.TreeLineStyle := TreeLinesStyleMap[Adapter.TreeLinesStyle]; - end; -end; - -procedure TcxTreeListReportLinkFormatter.BeforeBuilding; -begin - CreateItems; - Adapter.Calculate; - CalculateLineHeights; - ItemPlaceController.Refresh; - ItemPlaceController.Calculate; -end; - -procedure TcxTreeListReportLinkFormatter.CalculateLineHeights; -var - I: Integer; - AColumn: TcxTreeListColumn; -begin - FBandLineHeight := 0; - if Adapter.IsDefaultRowHeightAssigned then - FDetailsLineHeight := Adapter.DefaultRowHeight - else - FDetailsLineHeight := Max(FMaxNodeImageHeight, DefaultDataRowLineHeight); - FFooterLineHeight := 0; - FHeaderLineHeight := 0; - - for I := 0 to ColumnCount - 1 do - begin - AColumn := Columns[I]; - CalculateHeight(GetFooterCellViewParams(AColumn), FFooterLineHeight); - CalculateHeight(GetHeaderItemViewParams(AColumn), FHeaderLineHeight); - if not Adapter.IsDefaultRowHeightAssigned and not AColumn.IsPreview then - CalculateHeight(GetNodeItemViewParams(AColumn, Nodes[0]), FDetailsLineHeight); - end; - Inc(FFooterLineHeight, 2 * FooterItemInflateVert); - - FPreviewLineHeight := Adapter.DefaultRowHeight; - if PreviewColumn <> nil then - CalculateHeight(GetPreviewViewParams(PreviewColumn, Nodes[0]), FPreviewLineHeight); - - for I := 0 to BandCount - 1 do - CalculateHeight(GetBandItemViewParams(Bands[I]), FBandLineHeight); -end; - -function TcxTreeListReportLinkFormatter.CanProcessSelectionStyle(ANode: TcxTreeListNode): Boolean; -begin - Result := (ANode <> nil) and ReportLink.OptionsFormatting.ConsumeSelectionStyle and IsSelectedNode(ANode); - if Result and not ReportLink.OptionsFormatting.UseNativeStyles then - Result := Adapter.HasSelectionStyle; -end; - -procedure TcxTreeListReportLinkFormatter.CreateLevelInfos; -var - I: Integer; - ALevelInfo: TcxTreeListReportLinkLevelInfo; -begin - FMaxNodeImageHeight := 0; - FLevelInfos.Clear; - FLevelInfos.Capacity := FExpansionLevel + 1; - for I := 0 to FExpansionLevel do - begin - ALevelInfo := TcxTreeListReportLinkLevelInfo.Create; - FLevelInfos.Add(ALevelInfo); - Adapter.DoGetLevelImages(I, ALevelInfo.FImages, ALevelInfo.FStateImages); - if ALevelInfo.FImages <> nil then - FMaxNodeImageHeight := Max(FMaxNodeImageHeight, ALevelInfo.FImages.Height); - if ALevelInfo.FStateImages <> nil then - FMaxNodeImageHeight := Max(FMaxNodeImageHeight, ALevelInfo.FStateImages.Height); - end; -end; - -procedure TcxTreeListReportLinkFormatter.CreateNodeList; - - function IsNodeProcessed(ANode: TcxTreeListNode): Boolean; - var - Helper: TcxTreeListNodeHelper; - begin - Helper := Adapter.Helpers[ANode]; - Result := not Adapter.MultiSelection or not ReportLink.OptionsSelection.ProcessSelection or - (ANode.Selected or Helper.HasSelectedChildren or - (not ReportLink.OptionsSelection.ProcessExactSelection and Helper.HasSelectedParents)); - end; - - procedure ProcessNode(ANode: TcxTreeListNode); - var - I: Integer; - Node: TcxTreeListNode; - begin - if not ANode.Visible then - Exit; - FNodes.Add(ANode); - FExpansionLevel := Max(FExpansionLevel, ANode.Level); - if (ANode.Count > 0) and (ReportLink.OptionsExpanding.ExplicitlyExpandNodes or - (ANode.Expanded or (ReportLink.OptionsExpanding.AutoExpandNodes and ANode.CanExpand))) then - for I := 0 to ANode.Count - 1 do - begin - Node := ANode[I]; - if IsNodeProcessed(Node) then ProcessNode(Node); - end; - end; - -var - I: Integer; - ANode: TcxTreeListNode; -begin - FNodes.Clear; - FExpansionLevel := -1; - for I := 0 to Adapter.NodeCount - 1 do - begin - ANode := Adapter.Nodes[I]; - if IsNodeProcessed(ANode) then ProcessNode(ANode); - end; -end; - -function TcxTreeListReportLinkFormatter.IsSelectedNode(ANode: TcxTreeListNode): Boolean; -begin - Result := ReportLink.OptionsSelection.ProcessSelection or ANode.Selected; -end; - -function TcxTreeListReportLinkFormatter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - Result := ReportLink.Styles.GetBitmap(MapStyleBackgroundBitmapIndex(Index)) - else - Result := Adapter.GetBackgroundBitmap(Index); -end; - -function TcxTreeListReportLinkFormatter.GetBackgroundBitmapIndex(Index: Integer): Integer; -begin - Result := ReportLink.AddBackgroundBitmapToPool(GetBackgroundBitmap(Index)); -end; - -function TcxTreeListReportLinkFormatter.HasBackgroundBitmap(Index: Integer): Boolean; -var - Bitmap: TBitmap; -begin - if not ReportLink.OptionsFormatting.SuppressBackgroundBitmaps then - begin - Bitmap := GetBackgroundBitmap(Index); - Result := (Bitmap <> nil) and not Bitmap.Empty; - end - else - Result := False; -end; - -function TcxTreeListReportLinkFormatter.MapStyleBackgroundBitmapIndex(ATreeListBackgroundBitmapIndex: Integer): Integer; -begin - case ATreeListBackgroundBitmapIndex of - tlsv_BandBackground: - Result := vspsTreeListBandBackground; - tlsv_BandHeader: - Result := vspsTreeListBandHeader; - tlsv_Content: - Result := vspsTreeListContent; - tlsv_ContentOdd: - Result := vspsTreeListContentOdd; - tlsv_ContentEven: - Result := vspsTreeListContentEven; - tlsv_ColumnFooter: - Result := vspsTreeListFooter; - tlsv_ColumnHeader: - Result := vspsTreeListHeader; - tlsv_Footer: - Result := vspsTreeListFooterRow; - tlsv_Preview: - Result := vspsTreeListPreview; - else - Result := 0; - end; -end; - -procedure TcxTreeListReportLinkFormatter.CalculateHeight(const AParams: TdxReportItemViewParams; - var AHeight: Integer); -begin - AHeight := Max(AHeight, CalculatePatternHeight(AParams)); -end; - -function TcxTreeListReportLinkFormatter.CalculatePatternHeight(const AParams: TdxReportItemViewParams): Integer; -begin - Result := Renderer.CalcTextPatternHeight(DC, AParams.NativeParams.Font); -end; - -procedure TcxTreeListReportLinkFormatter.CreateBands; -var - I: Integer; - Band: TcxTreeListBand; -begin - FBands.Clear; - for I := 0 to Adapter.BandCount - 1 do - begin - Band := Adapter.Bands[I]; - if Band.ActuallyVisible then FBands.Add(Band); - end; -end; - -procedure TcxTreeListReportLinkFormatter.CreateColumns; -var - I: Integer; - AColumn: TcxTreeListColumn; -begin - FColumns.Clear; - for I := 0 to Adapter.ColumnCount - 1 do - begin - AColumn := Adapter.Columns[I]; - if AColumn.ActuallyVisible then FColumns.Add(AColumn); - end; -end; - -procedure TcxTreeListReportLinkFormatter.CreateItems; -begin - CreateColumns; - CreateBands; - CreateSummaryItems; -end; - -procedure TcxTreeListReportLinkFormatter.CreateSummaryItems; - - procedure InternalCreateSummaryItems(AColumnIndex: Integer; - AVisibleSummaryItems: TcxTreeListReportLinkSummaryItems; ASummaryItems: TcxTreeListSummaryItems); - var - ASummaryIndex, AVisibleIndex: Integer; - begin - AVisibleIndex := 0; - SetLength(AVisibleSummaryItems[AColumnIndex], ASummaryItems.VisibleCount); - for ASummaryIndex := 0 to ASummaryItems.Count - 1 do - if ASummaryItems[ASummaryIndex].Visible and (ASummaryItems[ASummaryIndex].Kind <> skNone) then - begin - AVisibleSummaryItems[AColumnIndex, AVisibleIndex] := ASummaryItems[ASummaryIndex]; - Inc(AVisibleIndex); - end; - end; - -var - I: Integer; -begin - SetLength(FGroupFooterSummaryItems, ColumnCount); - SetLength(FFooterSummaryItems, ColumnCount); - for I := 0 to ColumnCount - 1 do - begin - InternalCreateSummaryItems(I, FFooterSummaryItems, - Columns[I].Summary.FooterSummaryItems); - InternalCreateSummaryItems(I, FGroupFooterSummaryItems, - Columns[I].Summary.GroupFooterSummaryItems); - end; -end; - -function TcxTreeListReportLinkFormatter.GetFooterCellCount(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): Integer; -begin - if HasFooterCell(AColumn, ANode) then - Result := IfThen(Adapter.FMultiRows, 1, Length(GetSummaryItems(ANode)[FColumns.IndexOf(AColumn)])) - else - Result := 0; -end; - -function TcxTreeListReportLinkFormatter.GetNodeIndent(ANode: TcxTreeListNode): Integer; -begin - Result := Adapter.IndentWidth * IndentCounts[ANode] + GetImagesWidth(ANode) + - GetStateImagesWidth(ANode) + Adapter.GetCheckWidth(ANode); -end; - -function TcxTreeListReportLinkFormatter.GetNodeParent(ANode: TcxTreeListNode; - ALevel: Integer): TcxTreeListNode; -begin - Result := ANode; - while ALevel > 0 do - begin - Result := Result.Parent; - Dec(ALevel); - end; -end; - -function TcxTreeListReportLinkFormatter.GetNextNode(ANode: TcxTreeListNode): TcxTreeListNode; -var - Index: Integer; -begin - Index := IndexOfNode(ANode); - if Index < NodeCount - 1 then - Result := Nodes[Index + 1] - else - Result := nil; -end; - -function TcxTreeListReportLinkFormatter.GetPrevNode(ANode: TcxTreeListNode): TcxTreeListNode; -var - Index: Integer; -begin - Index := IndexOfNode(ANode); - if Index > 0 then - Result := Nodes[Index - 1] - else - Result := nil; -end; - -function TcxTreeListReportLinkFormatter.GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; -begin - if AParams.NativeParams.Font <> nil then - begin - FFont.Assign(AParams.NativeParams.Font); - if not dxPSUtl.dxIsTrueTypeFont(FFont) then - FFont.Name := ReportLink.Font.Name; - FFont.Color := ColorToRGB(AParams.NativeParams.TextColor); - FFont.Style := FFont.Style + AParams.FontStyle; - Result := ReportLink.AddFontToPool(FFont); - end - else - Result := 0; -end; - -function TcxTreeListReportLinkFormatter.GetSummaryItems(ANode: TcxTreeListNode): TcxTreeListReportLinkSummaryItems; -begin - if ANode = Adapter.TreeList.Root then - Result := FFooterSummaryItems - else - Result := FGroupFooterSummaryItems; -end; - -function TcxTreeListReportLinkFormatter.HasFooterCell(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): Boolean; -begin - if ANode = Adapter.TreeList.Root then - Result := AColumn.Options.Footer - else - Result := AColumn.Options.GroupFooter; - Result := Result and (Length(GetSummaryItems(ANode)[FColumns.IndexOf(AColumn)]) > 0); -end; - -function TcxTreeListReportLinkFormatter.HasImages( - ANode: TcxTreeListNode): Boolean; -begin - Result := Images[ANode.Level] <> nil; - if Result then - Result := (ANode.ImageIndex > -1) and (ANode.ImageIndex < Images[ANode.Level].Count); -end; - -function TcxTreeListReportLinkFormatter.HasParent(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode.Level > 0; -end; - -function TcxTreeListReportLinkFormatter.HasStateImages( - ANode: TcxTreeListNode): Boolean; -begin - Result := StateImages[ANode.Level] <> nil; - if Result then - Result := (ANode.StateIndex > -1) and (ANode.StateIndex < StateImages[ANode.Level].Count); -end; - -function TcxTreeListReportLinkFormatter.IndexOfNode(ANode: TcxTreeListNode): Integer; -begin - Result := FNodes.IndexOf(ANode); -end; - -function TcxTreeListReportLinkFormatter.IsColorTransparent(AColor: TColor): Boolean; -begin - Result := ColorToRGB(AColor) = ColorToRGB(TransparentColor); -end; - -function TcxTreeListReportLinkFormatter.IsFirstNode(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode = FNodes.First; -end; - -function TcxTreeListReportLinkFormatter.IsLastNode(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode = FNodes.Last; -end; - -function TcxTreeListReportLinkFormatter.IsNodeExpanded(ANode: TcxTreeListNode): Boolean; -var - NextNode: TcxTreeListNode; -begin - Result := ANode.Expanded; - if not Result then - begin - NextNode := GetNextNode(ANode); - Result := (NextNode <> nil) and (NextNode.Level > ANode.Level); - end; -end; - -function TcxTreeListReportLinkFormatter.IsNodeFirstChild(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode.GetPrevSiblingVisible = nil; -end; - -function TcxTreeListReportLinkFormatter.IsNodeLastChild(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode.GetNextSiblingVisible = nil; -end; - -function TcxTreeListReportLinkFormatter.IsOddNode(ANode: TcxTreeListNode): Boolean; -begin - Result := Odd(FNodes.IndexOf(ANode)); -end; - -function TcxTreeListReportLinkFormatter.IsNodeSelected(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode.Selected; -end; - -procedure TcxTreeListReportLinkFormatter.RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; - AEdgeStyle: TdxCellEdgeStyle); -begin - AnItem.EdgeMode := cem3DEffects; - AnItem.Edge3DStyle := AEdgeStyle; - FLookAndFeelItems.Add(AnItem); -end; - -procedure TcxTreeListReportLinkFormatter.SetViewParams(AnItem: TdxReportVisualItem; - const AParams: TdxReportItemViewParams); -begin - with AnItem do - begin - CellSides := AParams.CellSides; - Color := ColorToRGB(AParams.NativeParams.Color); - FontIndex := GetStyleFontIndex(AParams); - Transparent := AParams.Transparent; - end; -end; - -function TcxTreeListReportLinkFormatter.MakeIndentIndex(AnIndex: Integer): DWORD; -begin - Result := ReportLink.MakeIndentIndex(AnIndex); -end; - -function TcxTreeListReportLinkFormatter.GetAutoWidth: Boolean; -begin - Result := ReportLink.OptionsSize.AutoWidth; -end; - -function TcxTreeListReportLinkFormatter.GetAvailableWidth: Integer; -var - AControllerIntf: IdxReportLinkController; - R: TRect; -begin - if AutoWidth then - if ReportLink.IsAggregated and - Supports(TObject(ReportLink.Controller), IdxReportLinkController, AControllerIntf) then - R := AControllerIntf.GetControlSiteBounds(ReportLink.TreeList) - else - R := ReportLink.RealPrinterPage.PaintRectPixels - else - R := Adapter.TreeList.ClientBounds; - - Result := R.Right - R.Left - 1; -end; - -function TcxTreeListReportLinkFormatter.GetBandCount: Integer; -begin - Result := FBands.Count; -end; - -function TcxTreeListReportLinkFormatter.GetBands(AIndex: Integer): TcxTreeListBand; -begin - Result := FBands[AIndex]; -end; - -function TcxTreeListReportLinkFormatter.GetColumnCount: Integer; -begin - Result := FColumns.Count; -end; - -function TcxTreeListReportLinkFormatter.GetColumns(AIndex: Integer): TcxTreeListColumn; -begin - Result := FColumns[AIndex]; -end; - -function TcxTreeListReportLinkFormatter.GetDC: HDC; -begin - Result := ReportLink.ScreenDC; -end; - -function TcxTreeListReportLinkFormatter.GetExpandButtonColor: TColor; -begin - Result := ExpandButtonInteriorColors[Adapter.TreeLinesStyle = tllsSolid]; -end; - -function TcxTreeListReportLinkFormatter.GetExpandButtonSize: Integer; -begin - Result := DefaultExpandButtonSize; -end; - -function TcxTreeListReportLinkFormatter.GetGridLinesColor: TColor; -begin - Result := ReportLink.OptionsFormatting.GridLineColor; - if Result = clDefault then - Result := Adapter.GridLinesColor; -end; - -function TcxTreeListReportLinkFormatter.GetHasNodeSeparator: Boolean; -begin - Result := NodeSeparatorThickness > 0; -end; - -function TcxTreeListReportLinkFormatter.GetHasPreview: Boolean; -begin - Result := Adapter.HasPreview and ShowPreview and (PreviewAutoHeight or (PreviewMaxLineCount > 0)); -end; - -function TcxTreeListReportLinkFormatter.GetIndentCount(Node: TcxTreeListNode): Integer; -begin - Result := Node.Level; - if Adapter.ShowRoot then Inc(Result); -end; - -function TcxTreeListReportLinkFormatter.GetImages(ALevel: Integer): TCustomImageList; -begin - Result := LevelInfos[ALevel].FImages; -end; - -function TcxTreeListReportLinkFormatter.GetImagesWidth( - ANode: TcxTreeListNode): Integer; -begin - if HasImages(ANode) then - Result := 1 + Images[ANode.Level].Width + 1 - else - Result := 0; -end; - -function TcxTreeListReportLinkFormatter.GetIsNodeColorUsedForIndents: Boolean; -begin - Result := Adapter.IsNodeColorUsedForIndents; -end; - -function TcxTreeListReportLinkFormatter.GetLevelInfos(ALevel: Integer): TcxTreeListReportLinkLevelInfo; -begin - Result := TcxTreeListReportLinkLevelInfo(FLevelInfos[ALevel]); -end; - -function TcxTreeListReportLinkFormatter.GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; -begin - Result := TdxReportVisualItem(FLookAndFeelItems[Index]); -end; - -function TcxTreeListReportLinkFormatter.GetLookAndFeelItemCount: Integer; -begin - Result := FLookAndFeelItems.Count; -end; - -function TcxTreeListReportLinkFormatter.GetNode(Index: Integer): TcxTreeListNode; -begin - Result := TcxTreeListNode(FNodes[Index]); -end; - -function TcxTreeListReportLinkFormatter.GetNodeCount: Integer; -begin - Result := FNodes.Count; -end; - -function TcxTreeListReportLinkFormatter.GetNodeSeparatorColor: TColor; -begin - Result := ReportLink.OptionsFormatting.ActualNodeSeparatorColor; -end; - -function TcxTreeListReportLinkFormatter.GetNodeSeparatorThickness: Integer; -begin - Result := ReportLink.OptionsFormatting.NodeSeparatorThickness; -end; - -function TcxTreeListReportLinkFormatter.GetPreviewAutoHeight: Boolean; -begin - Result := ReportLink.OptionsPreview.AutoHeight; -end; - -function TcxTreeListReportLinkFormatter.GetPreviewColumn: TcxTreeListColumn; -begin - Result := Adapter.PreviewColumn; -end; - -function TcxTreeListReportLinkFormatter.GetPreviewMaxLineCount: Integer; -begin - Result := ReportLink.OptionsPreview.MaxLineCount; -end; - -function TcxTreeListReportLinkFormatter.GetRenderer: TdxPSReportRenderer; -begin - Result := ReportLink.Renderer; -end; - -function TcxTreeListReportLinkFormatter.GetShowBandHeaders: Boolean; -begin - Result := ReportLink.OptionsView.BandHeaders; -end; - -function TcxTreeListReportLinkFormatter.GetShowFooters: Boolean; -begin - Result := ReportLink.OptionsView.Footers; -end; - -function TcxTreeListReportLinkFormatter.GetShowHeaders: Boolean; -begin - Result := ReportLink.OptionsView.Headers; -end; - -function TcxTreeListReportLinkFormatter.GetShowPreview: Boolean; -begin - Result := ReportLink.OptionsPreview.Visible; -end; - -function TcxTreeListReportLinkFormatter.GetStateImages(ALevel: Integer): TCustomImageList; -begin - Result := LevelInfos[ALevel].FStateImages; -end; - -function TcxTreeListReportLinkFormatter.GetStateImagesWidth( - ANode: TcxTreeListNode): Integer; -begin - if HasStateImages(ANode) then - Result := 1 + StateImages[ANode.Level].Width + 1 - else - Result := 0; -end; - -function TcxTreeListReportLinkFormatter.GetUseLookAndFeelColors: Boolean; -begin - Result := ReportLink.OptionsFormatting.UseLookAndFeelColors; -end; - -function TcxTreeListReportLinkFormatter.GetViewWidth: Integer; -begin - Result := ItemPlaceController.Width; -end; - -function TcxTreeListReportLinkFormatter.GetTreeLinesColor: TColor; -begin - Result := Adapter.TreeLinesColor; -end; - -function TcxTreeListReportLinkFormatter.GetTreeLinesStyle: TcxTreeListTreeLineStyle; -begin - Result := Adapter.TreeLinesStyle; -end; - -procedure TcxTreeListReportLinkFormatter.FormatLookAndFeelItems; -const - Borders3D: array[TdxCellEdgeStyle, Boolean] of TdxPSCellBorderClass = - ((TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder), - (TdxPSCellSunkenBorder, TdxPSCellSunkenSoftBorder)); -var - I: Integer; -begin - for I := 0 to LookAndFeelItemCount - 1 do - with LookAndFeelItems[I] do - if ReportLink.Effects3D then - BorderClass := Borders3D[Edge3DStyle, ReportLink.Soft3D] - else - BorderClass := TdxPSCellUltraFlatBorder; -end; - -{ TcxTreeListReportLinkOptionsExpanding } - -procedure TcxTreeListReportLinkOptionsExpanding.Assign(Source: TPersistent); -begin - if Source is TcxTreeListReportLinkOptionsExpanding then - with TcxTreeListReportLinkOptionsExpanding(Source) do - begin - Self.AutoExpandNodes := AutoExpandNodes; - Self.ExplicitlyExpandNodes := ExplicitlyExpandNodes; - end; - inherited; -end; - -procedure TcxTreeListReportLinkOptionsExpanding.RestoreDefaults; -begin - inherited; - AutoExpandNodes := False; - ExplicitlyExpandNodes := False; -end; - -function TcxTreeListReportLinkOptionsExpanding.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TcxTreeListReportLinkOptionsExpanding.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := inherited ReportLink as TcxTreeListCustomReportLink; -end; - -procedure TcxTreeListReportLinkOptionsExpanding.SetAutoExpandNodes(Value: Boolean); -begin - if FAutoExpandNodes <> Value then - begin - FAutoExpandNodes := Value; - Changed; - end; -end; - -procedure TcxTreeListReportLinkOptionsExpanding.SetExplicitlyExpandNodes(Value: Boolean); -begin - if FExplicitlyExpandNodes <> Value then - begin - FExplicitlyExpandNodes := Value; - Changed; - end; -end; - -{ TcxTreeListReportLinkOptionsFormatting } - -procedure TcxTreeListReportLinkOptionsFormatting.Assign(Source: TPersistent); -begin - if Source is TcxTreeListReportLinkOptionsFormatting then - with TcxTreeListReportLinkOptionsFormatting(Source) do - begin - Self.ConsumeSelectionStyle := ConsumeSelectionStyle; - Self.NodeSeparatorColor := NodeSeparatorColor; - Self.NodeSeparatorThickness := NodeSeparatorThickness; - end; - inherited; -end; - -procedure TcxTreeListReportLinkOptionsFormatting.RestoreDefaults; -begin - inherited; - ConsumeSelectionStyle := False; - NodeSeparatorColor := clDefault; - NodeSeparatorThickness := 0; -end; - -function TcxTreeListReportLinkOptionsFormatting.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TcxTreeListReportLinkOptionsFormatting.GetActualNodeSeparatorColor: TColor; -begin - Result := NodeSeparatorColor; - if Result = clDefault then - Result := dxPSDefaultTreeListNodeSeparatorColor; -end; - -function TcxTreeListReportLinkOptionsFormatting.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := inherited ReportLink as TcxTreeListCustomReportLink; -end; - -procedure TcxTreeListReportLinkOptionsFormatting.SetConsumeSelectionStyle(Value: Boolean); -begin - if FConsumeSelectionStyle <> Value then - begin - FConsumeSelectionStyle := Value; - Changed; - end; -end; - -procedure TcxTreeListReportLinkOptionsFormatting.SetNodeSeparatorColor(Value: TColor); -begin - if FNodeSeparatorColor <> Value then - begin - FNodeSeparatorColor := Value; - if NodeSeparatorThickness <> 0 then Changed; - end; -end; - -procedure TcxTreeListReportLinkOptionsFormatting.SetNodeSeparatorThickness(Value: Integer); -begin - if Value < 0 then Value := 0; - if FNodeSeparatorThickness <> Value then - begin - FNodeSeparatorThickness := Value; - Changed; - end; -end; - -{ TcxTreeListReportLinkOptionsOnEveryPage } - -function TcxTreeListReportLinkOptionsOnEveryPage.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TcxTreeListReportLinkOptionsOnEveryPage.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := inherited ReportLink as TcxTreeListCustomReportLink; -end; - -{ TcxTreeListReportLinkOptionsPagination } - -function TcxTreeListReportLinkOptionsPagination.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TcxTreeListReportLinkOptionsPagination.GetNode: Boolean; -begin - Result := inherited Row; -end; - -function TcxTreeListReportLinkOptionsPagination.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := inherited ReportLink as TcxTreeListCustomReportLink; -end; - -procedure TcxTreeListReportLinkOptionsPagination.SetNode(Value: Boolean); -begin - inherited Row := Value; -end; - -{ TcxTreeListReportLinkOptionsPreview } - -function TcxTreeListReportLinkOptionsPreview.DesignerTabIndex: Integer; -begin - Result := 4; -end; - -function TcxTreeListReportLinkOptionsPreview.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := inherited ReportLink as TcxTreeListCustomReportLink; -end; - -{ TcxTreeListReportLinkOptionsRefinements } - -function TcxTreeListReportLinkOptionsRefinements.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TcxTreeListReportLinkOptionsRefinements.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := inherited ReportLink as TcxTreeListCustomReportLink; -end; - -{ TcxTreeListReportLinkOptionsSelection } - -function TcxTreeListReportLinkOptionsSelection.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TcxTreeListReportLinkOptionsSelection.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := inherited ReportLink as TcxTreeListCustomReportLink; -end; - -{ TcxTreeListReportLinkOptionsSize } - -function TcxTreeListReportLinkOptionsSize.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TcxTreeListReportLinkOptionsSize.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := inherited ReportLink as TcxTreeListCustomReportLink; -end; - -{ TcxTreeListReportLinkOptionsView } - -procedure TcxTreeListReportLinkOptionsView.Assign(Source: TPersistent); -begin - if Source is TcxTreeListReportLinkOptionsView then - with TcxTreeListReportLinkOptionsView(Source) do - begin - Self.Borders := Borders; - Self.TreeLines := TreeLines; - end; - inherited; -end; - -procedure TcxTreeListReportLinkOptionsView.RestoreDefaults; -begin - inherited; - Borders := True; - TreeLines := True; -end; - -function TcxTreeListReportLinkOptionsView.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TcxTreeListReportLinkOptionsView.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := inherited ReportLink as TcxTreeListCustomReportLink; -end; - -procedure TcxTreeListReportLinkOptionsView.SetBorders(Value: Boolean); -begin - if FBorders <> Value then - begin - FBorders := Value; - Changed; - end; -end; - -procedure TcxTreeListReportLinkOptionsView.SetTreeLines(Value: Boolean); -begin - if FTreeLines <> Value then - begin - FTreeLines := Value; - Changed; - end; -end; - -{ TcxTreeListReportLinkStyles } - -procedure TcxTreeListReportLinkStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxTreeListReportLinkStyles then - with TcxTreeListReportLinkStyles(Source) do - begin - Self.BandHeader := BandHeader; - Self.Content := Content; - Self.ContentEven := ContentEven; - Self.ContentOdd := ContentOdd; - Self.Footer := Footer; - Self.FooterRow := FooterRow; - Self.Header := Header; - Self.Preview := Preview; - end; -end; - -procedure TcxTreeListReportLinkStyles.GetBandHeaderParams(ABand: TcxTreeListBand; - out AParams: TcxViewParams); -begin - GetViewParams(vspsTreeListBandHeader, ABand, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetColumnFooterParams(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn; out AParams: TcxViewParams); -begin - GetViewParams(vspsTreeListFooter, ANode, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetColumnHeaderParams(AColumn: TcxTreeListColumn; - out AParams: TcxViewParams); -begin - if AColumn <> nil then - GetViewParams(vspsTreeListHeader, nil, nil, AParams) - else - GetViewParams(vspsTreeListBandBackground, nil, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetContentParams(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn; out AParams: TcxViewParams); - - function IsOddNode(ANode: TcxTreeListNode): Boolean; - var - Builder: TcxTreeListReportLinkBuilder; - begin - Builder := ReportLink.Builder; - if Builder <> nil then - Result := Builder.Formatter.IsOddNode(ANode) - else - Result := Odd(ANode.VisibleIndex); - end; - -const - StyleIndexes: array[Boolean] of Integer = (vspsTreeListContentEven, vspsTreeListContentOdd); -begin - if (ANode <> nil) and (GetValue(StyleIndexes[IsOddNode(ANode)]) <> nil) then - GetViewParams(StyleIndexes[IsOddNode(ANode)], ANode, nil, AParams) - else - GetViewParams(vspsTreeListContent, ANode, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetFooterRowParams(out AParams: TcxViewParams); -begin - GetViewParams(vspsTreeListFooterRow, nil, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetImagesParams(ANode: TcxTreeListNode; - out AParams: TcxViewParams); -begin - GetContentParams(ANode, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetIndentParams(ANode: TcxTreeListNode; - AnIndent: Integer; out AParams: TcxViewParams); - - function IsNodeColorUsedForIndents: Boolean; - var - Builder: TcxTreeListReportLinkBuilder; - begin - Builder := ReportLink.Builder; - Result := (Builder <> nil) and Builder.Formatter.IsNodeColorUsedForIndents; - end; - -begin - if IsNodeColorUsedForIndents then - GetContentParams(ANode, nil, AParams) - else - GetViewParams(vspsTreeListIndent, ANode, nil{AnIndent}, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetPreviewParams(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn; out AParams: TcxViewParams); -begin - GetViewParams(vspsTreeListPreview, ANode, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetSelectionParams(out AParams: TcxViewParams); -begin - GetViewParams(vspsTreeListSelection, nil, nil, AParams); -end; - -function TcxTreeListReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 3; -end; - -procedure TcxTreeListReportLinkStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -const - FixedParts = [vspsTreeListBandHeader, vspsTreeListFooter, vspsTreeListFooterRow, - vspsTreeListHeader, vspsTreeListSelection]; -begin - inherited; - if ReportLink <> nil then - with AParams do - begin - if Index in FixedParts then - Color := dxPSCore.dxDefaultFixedColor - else - Color := dxPSCore.dxDefaultContentColor; //TreeListReportLink.Color; // ??? - - Font := ReportLink.Font; - TextColor := Font.Color; - end; -end; - -class function TcxTreeListReportLinkStyles.GetStyleCaption(AnIndex: Integer): string; -begin - case AnIndex of - vspsTreeListBandBackground: - Result := cxGetResourceString(@sdxBandBackgroundStyle); - vspsTreeListBandHeader: - Result := cxGetResourceString(@sdxBandHeaderStyle); - vspsTreeListContent: - Result := cxGetResourceString(@sdxContentStyle); - vspsTreeListContentEven: - Result := cxGetResourceString(@sdxContentEvenStyle); - vspsTreeListContentOdd: - Result := cxGetResourceString(@sdxContentOddStyle); - vspsTreeListFooter: - Result := cxGetResourceString(@sdxFooterStyle); - vspsTreeListFooterRow: - Result := cxGetResourceString(@sdxFooterRowStyle); - vspsTreeListHeader: - Result := cxGetResourceString(@sdxHeaderStyle); - vspsTreeListIndent: - Result := cxGetResourceString(@sdxIndentStyle); - vspsTreeListPreview: - Result := cxGetResourceString(@sdxPreviewStyle); - else - Result := cxGetResourceString(@sdxSelectionStyle); - end; -end; - -function TcxTreeListReportLinkStyles.GetStyleIndexByCaption(const Caption: string): Integer; -begin - for Result := vspsTreeListFirst to vspsTreeListLast do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Result)) then - Exit; - Result := -1; -end; - -function TcxTreeListReportLinkStyles.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := inherited ReportLink as TcxTreeListCustomReportLink; -end; - -{ TcxTreeListReportLinkStyleSheet } - -class function TcxTreeListReportLinkStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxTreeListReportLinkStyles; -end; - -function TcxTreeListReportLinkStyleSheet.GetStylesValue: TcxTreeListReportLinkStyles; -begin - if GetStyles is TcxTreeListReportLinkStyles then - Result := TcxTreeListReportLinkStyles(GetStyles) - else - Result := nil; -end; - -procedure TcxTreeListReportLinkStyleSheet.SetStylesValue(Value: TcxTreeListReportLinkStyles); -begin - SetStyles(Value); -end; - -{ TcxTreeListAttributeHostInfo } - -procedure TcxTreeListAttributeHostInfo.Initialize(AParent: TdxReportCell); -begin - Origin := NullPoint; - FParent := AParent; -end; - -{ TcxTreeListAttributeHostInfoServices } - -constructor TcxTreeListAttributeHostInfoServices.Create(AReportLink: TcxTreeListCustomReportLink); -begin - inherited Create; - FReportLink := AReportLink; - CreateHostInfos; -end; - -destructor TcxTreeListAttributeHostInfoServices.Destroy; -begin - DestroyHostInfos; - inherited; -end; - -procedure TcxTreeListAttributeHostInfoServices.InitializeHostInfos; -begin - PageDetailsHostInfo.Initialize(PageDetails); - PageFootersHostInfo.Initialize(PageFooters); - PageHeadersHostInfo.Initialize(PageHeaders); -end; - -procedure TcxTreeListAttributeHostInfoServices.CreateHostInfos; -begin - FPageDetailsHostInfo := TcxTreeListAttributeHostInfo.Create; - FPageFootersHostInfo := TcxTreeListAttributeHostInfo.Create; - FPageHeadersHostInfo := TcxTreeListAttributeHostInfo.Create; -end; - -procedure TcxTreeListAttributeHostInfoServices.DestroyHostInfos; -begin - FreeAndNil(FPageHeadersHostInfo); - FreeAndNil(FPageFootersHostInfo); - FreeAndNil(FPageDetailsHostInfo); -end; - -function TcxTreeListAttributeHostInfoServices.GetBandHeadersHostInfo: TcxTreeListAttributeHostInfo; -begin - if CanUseBandHeadersOnEveyPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TcxTreeListAttributeHostInfoServices.GetFootersHostInfo: TcxTreeListAttributeHostInfo; -begin - if CanUseFootersOnEveryPage then - Result := PageFootersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TcxTreeListAttributeHostInfoServices.GetHeadersHostInfo: TcxTreeListAttributeHostInfo; -begin - if CanUseHeadersOnEveryPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TcxTreeListAttributeHostInfoServices.GetInconsistentStateText: string; -begin - if ReportLink.IsAggregated then - Result := cxGetResourceString(@sdxCannotUseOnEveryPageModeInAggregatedState) - else - if IsInconsistentHeadersState then - Result := cxGetResourceString(@sdxTLIncorrectHeadersState) - else - Result := ''; -end; - -function TcxTreeListAttributeHostInfoServices.GetIsInconsistentState: Boolean; -begin - Result := ReportLink.IsAggregated or IsInconsistentHeadersState; -end; - -function TcxTreeListAttributeHostInfoServices.HasCells: Boolean; -begin - Result := ReportLink.ReportCells <> nil; -end; - -function TcxTreeListAttributeHostInfoServices.GetArePageFootersAssigned: Boolean; -begin - Result := FootersHostInfo.Parent = ReportLink.ReportCells.FooterCells; -end; - -function TcxTreeListAttributeHostInfoServices.GetArePageHeadersAssigned: Boolean; -begin - with ReportLink.ReportCells do - Result := (BandHeadersHostInfo.Parent = HeaderCells) or (HeadersHostInfo.Parent = HeaderCells); -end; - -function TcxTreeListAttributeHostInfoServices.GetCanUseBandHeadersOnEveyPage: Boolean; -begin - Result := not ReportLink.IsAggregated and OptionsOnEveryPage.BandHeaders; -end; - -function TcxTreeListAttributeHostInfoServices.GetCanUseFootersOnEveryPage: Boolean; -begin - Result := not ReportLink.IsAggregated and OptionsOnEveryPage.Footers; -end; - -function TcxTreeListAttributeHostInfoServices.GetCanUseHeadersOnEveryPage: Boolean; -begin - Result := not ReportLink.IsAggregated and OptionsOnEveryPage.Headers and - ((BandHeadersHostInfo = PageHeadersHostInfo) or not OptionsView.BandHeaders); -end; - -function TcxTreeListAttributeHostInfoServices.GetIsInconsistentHeadersState: Boolean; -begin - Result := OptionsOnEveryPage.Headers and OptionsView.Headers and OptionsView.BandHeaders and not OptionsOnEveryPage.BandHeaders; -end; - -function TcxTreeListAttributeHostInfoServices.GetOptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage; -begin - Result := ReportLink.OptionsOnEveryPage; -end; - -function TcxTreeListAttributeHostInfoServices.GetOptionsView: TcxTreeListReportLinkOptionsView; -begin - Result := ReportLink.OptionsView; -end; - -function TcxTreeListAttributeHostInfoServices.GetPageDetails: TdxReportCell; -begin - if HasCells then - Result := ReportLink.ReportCells.Cells - else - Result := nil; -end; - -function TcxTreeListAttributeHostInfoServices.GetPageFooters: TdxReportCell; -begin - if HasCells then - Result := ReportLink.ReportCells.FooterCells - else - Result := PageDetails; -end; - -function TcxTreeListAttributeHostInfoServices.GetPageHeaders: TdxReportCell; -begin - if HasCells then - Result := ReportLink.ReportCells.HeaderCells - else - Result := PageDetails; -end; - -{ TcxTreeListCustomReportLink } - -constructor TcxTreeListCustomReportLink.Create(AOwner: TComponent); -begin - inherited; - FDelimitersHardVert := TList.Create; - FHostInfoServices := TcxTreeListAttributeHostInfoServices.Create(Self); - FReportRows := TList.Create; - InternalRestoreDefaults; - LinkModified(False); -end; - -destructor TcxTreeListCustomReportLink.Destroy; -begin - FreeAndNil(FReportRows); - FreeAndNil(FHostInfoServices); - FreeAndNil(FDelimitersHardVert); - inherited; -end; - -procedure TcxTreeListCustomReportLink.AddPageBreak(ANode: TcxTreeListNode); -var - ReportRow: TdxReportCell; -begin - ReportRow := ReportRowsByNode[ANode]; - if ReportRow <> nil then - AddVerticalHardDelimiter(ReportRow); -end; - -procedure TcxTreeListCustomReportLink.AddPageBreak(const ANodes: array of TcxTreeListNode); -var - I: Integer; -begin - for I := Low(ANodes) to High(ANodes) do - AddPageBreak(ANodes[I]); -end; - -procedure TcxTreeListCustomReportLink.AddPageBreak(const ANodes: TcxTreeListNodeArray); -var - I: Integer; -begin - for I := 0 to Length(ANodes) - 1 do - AddPageBreak(ANodes[I]); -end; - -procedure TcxTreeListCustomReportLink.AddPageBreak(ANodes: TList); -var - I: Integer; - P: Pointer ; -begin - for I := 0 to ANodes.Count - 1 do - begin - P := ANodes[I]; - if TObject(P) is TcxTreeListNode then - AddPageBreak(TcxTreeListNode(P)); - end; -end; - -procedure TcxTreeListCustomReportLink.ConstructReport(AReportCells: TdxReportCells); - - function HasData: Boolean; - begin - Result := (CustomTreeList_GetVisibleColumnCount(TreeList) <> 0) and - (TreeList.Count <> 0); - end; - - procedure Build; - begin - FBuilder := CreateBuilder; - try - FBuilder.Build; - finally - FreeAndNil(FBuilder); - end; - end; - - procedure CalculateSizes; - - procedure CalculateReportPartSizes(ACell: TdxReportCell); - var - Width, I, V: Integer; - begin - if ACell.CellCount > 0 then - begin - Width := 0; - for I := 0 to ACell.CellCount - 1 do - begin - V := ACell.Cells[I].Width; - if Width < V then Width := V; - end; - ACell.BoundsRect := MakeRect(0, 0, Width, ACell[ACell.CellCount - 1].BoundsRect.Bottom); - end; - end; - - begin - with AReportCells do - begin - CalculateReportPartSizes(Cells); - if AreFooterCellsAllocated then CalculateReportPartSizes(FooterCells); - if AreHeaderCellsAllocated then CalculateReportPartSizes(HeaderCells); - end; - end; - -begin - if TreeList = nil then Exit; - inherited; - if not HasData then Exit; - - PrepareConstruct; - try - Build; - if not AbortBuilding then CalculateSizes; - finally - UnprepareConstruct; - end; -end; - -procedure TcxTreeListCustomReportLink.ConvertCoords; -begin - inherited; - ConvertDelimiters(DelimitersHardVert); -end; - -procedure TcxTreeListCustomReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - DrawInfo: TcxTreeListCellCustomDrawInfo; -begin - GetItemCustomDrawInfo(AItem, DrawInfo); - with DrawInfo do - case AttributeID of - cxTreeListBandID: - DoCustomDrawBandCell(ACanvas, Band, TdxReportCellImage(AItem), ADone); - cxTreeListFooterID: - DoCustomDrawFooterCell(ACanvas, Column, TdxReportCellString(AItem), ADone); - cxTreeListHeaderID: - DoCustomDrawHeaderCell(ACanvas, Column, TdxReportCellImage(AItem), ADone); - cxTreeListIndentID: - DoCustomDrawIndentCell(ACanvas, Node, Index, AItem, ADone); - cxTreeListNodeID: - DoCustomDrawCell(ACanvas, Node, Column, AItem, ADone); - end; -end; - -function TcxTreeListCustomReportLink.GetBreakPagesByHardDelimiters: Boolean; -begin - Result := OptionsPagination.Custom; -end; - -procedure TcxTreeListCustomReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(CustomTreeList_GetImages(TreeList)); - AProc(CustomTreeList_GetStateImages(TreeList)); -end; - -function TcxTreeListCustomReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := (AUpdateCodes * uaMarginsVert <> []) and OptionsSize.AutoWidth; -end; - -function TcxTreeListCustomReportLink.GetUseHardVertDelimiters: Boolean; -begin - Result := OptionsPagination.Custom; -end; - -procedure TcxTreeListCustomReportLink.InternalRestoreFromOriginal; -var - TreeListOptionsView: TcxTreeListOptionsView; - TreeListPreview: TcxTreeListPreview; -begin - inherited; - if TreeList <> nil then - begin - OptionsFormatting.LookAndFeelKind := CustomTreeList_GetLookAndFeel(TreeList).Kind; - - TreeListPreview := CustomTreeList_GetPreview(TreeList); - with OptionsPreview do - begin - AutoHeight := TreeListPreview.AutoHeight; - MaxLineCount := TreeListPreview.MaxLineCount; - Visible := TreeListPreview.Visible; - end; - - TreeListOptionsView := CustomTreeList_GetOptionsView(TreeList); - with OptionsView do - begin - BandHeaders := TreeListOptionsView.Bands; - ExpandButtons := TreeListOptionsView.Buttons; - Footers := TreeListOptionsView.Footer; - Headers := TreeListOptionsView.Headers; - TreeLines := TreeListOptionsView.TreeLineStyle <> tllsNone; - end; - OptionsSize.AutoWidth := TreeListOptionsView.ColumnAutoWidth; - end; -end; - -function TcxTreeListCustomReportLink.IsDrawFootersOnEveryPage: Boolean; -begin - Result := HostInfoServices.ArePageFootersAssigned; -end; - -function TcxTreeListCustomReportLink.IsDrawHeadersOnEveryPage: Boolean; -begin - Result := HostInfoServices.ArePageHeadersAssigned; -end; - -function TcxTreeListCustomReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -var - DrawInfo: TcxTreeListCellCustomDrawInfo; -begin - Result := inherited IsSupportedCustomDraw(Item) and - (Item <> nil) and IsCustomDrawn(GetItemCustomDrawInfo(Item, DrawInfo)); -end; - -procedure TcxTreeListCustomReportLink.MakeHardDelimiters(AReportCells: TdxReportCells; - AVertDelimiters: TList); -begin - inherited; - - if OptionsPagination.Custom then - try - DoGetCustomPageBreaks; - except - Application.HandleException(Self); - end; - dxPSUtl.dxCopyList(DelimitersHardVert, AVertDelimiters); -end; - -function TcxTreeListCustomReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := OptionsFormatting.UseNativeStyles; -end; - -function TcxTreeListCustomReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TcxTreeListReportLinkStyles; -end; - -function TcxTreeListCustomReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TcxTreeListReportLinkStyleSheet; -end; - -function TcxTreeListCustomReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := DefaultdxPScxTreeListLinkStyleSheet; -end; - -procedure TcxTreeListCustomReportLink.PrepareConstruct; -begin - inherited; - DelimitersHardVert.Clear; - FReportRows.Clear; - - ReportCells.LookAndFeel := nil;//CreateGroupLookAndFeel(TdxPSReportGroupNullLookAndFeel); - - HostInfoServices.InitializeHostInfos; - if OptionsExpanding.ExplicitlyExpandNodes then - TreeList.FullExpand; -end; - -procedure TcxTreeListCustomReportLink.DoCustomDrawBandCell(ACanvas: TCanvas; - ABand: TcxTreeListBand; AnItem: TdxReportCellImage; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawBandCell) then - FOnCustomDrawBandCell(Self, ACanvas, ABand, AnItem, ADone); -end; - -procedure TcxTreeListCustomReportLink.DoCustomDrawCell(ACanvas: TCanvas; - ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; - AnItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCell) then - FOnCustomDrawCell(Self, ACanvas, ANode, AColumn, AnItem, ADone); -end; - -procedure TcxTreeListCustomReportLink.DoCustomDrawFooterCell(ACanvas: TCanvas; - AColumn: TcxTreeListColumn; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFooterCell) then - FOnCustomDrawFooterCell(Self, ACanvas, AColumn, AnItem, ADone); -end; - -procedure TcxTreeListCustomReportLink.DoCustomDrawHeaderCell(ACanvas: TCanvas; - AColumn: TcxTreeListColumn; AnItem: TdxReportCellImage; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeaderCell) then - FOnCustomDrawHeaderCell(Self, ACanvas, AColumn, AnItem, ADone); -end; - -procedure TcxTreeListCustomReportLink.DoCustomDrawIndentCell(ACanvas: TCanvas; - ANode: TcxTreeListNode; AnIndex: Integer; AnItem: TAbstractdxReportCellData; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawIndentCell) then - FOnCustomDrawIndentCell(Self, ACanvas, ANode, AnIndex, AnItem, ADone); -end; - -procedure TcxTreeListCustomReportLink.DoGetCustomPageBreaks; -begin - if Assigned(FOnGetCustomPageBreaks) then FOnGetCustomPageBreaks(Self); -end; - -procedure TcxTreeListCustomReportLink.DoInitializeBandCell(ABand: TcxTreeListBand; - AnItem: TdxReportCellImage); -begin - if Assigned(FOnInitializeBandCell) then - FOnInitializeBandCell(Self, ABand, AnItem); -end; - -procedure TcxTreeListCustomReportLink.DoInitializeCell(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn; AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeCell) then - FOnInitializeCell(Self, ANode, AColumn, AnItem); -end; - -procedure TcxTreeListCustomReportLink.DoInitializeFooterCell(AColumn: TcxTreeListColumn; - ASummaryCellIndex: Integer; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeFooterCell) then - FOnInitializeFooterCell(Self, ASummaryCellIndex, AColumn, AnItem); -end; - -procedure TcxTreeListCustomReportLink.DoInitializeHeaderCell(AColumn: TcxTreeListColumn; - AnItem: TdxReportCellImage); -begin - if Assigned(FOnInitializeHeaderCell) then - FOnInitializeHeaderCell(Self, AColumn, AnItem); -end; - -procedure TcxTreeListCustomReportLink.DoInitializeIndentCell(ANode: TcxTreeListNode; - AnIndex: Integer; AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeIndentCell) then - FOnInitializeIndentCell(Self, ANode, AnIndex, AnItem); -end; - -function TcxTreeListCustomReportLink.GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; -begin - Result := TcxTreeListReportLinkOptionsExpanding; -end; - -function TcxTreeListCustomReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TcxTreeListReportLinkOptionsFormatting; -end; - -function TcxTreeListCustomReportLink.GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; -begin - Result := TcxTreeListReportLinkOptionsOnEveryPage; -end; - -function TcxTreeListCustomReportLink.GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; -begin - Result := TcxTreeListReportLinkOptionsPagination; -end; - -function TcxTreeListCustomReportLink.GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; -begin - Result := TcxTreeListReportLinkOptionsPreview; -end; - -function TcxTreeListCustomReportLink.GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; -begin - Result := TcxTreeListReportLinkOptionsRefinements; -end; - -function TcxTreeListCustomReportLink.GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; -begin - Result := TcxTreeListReportLinkOptionsSelection; -end; - -function TcxTreeListCustomReportLink.GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; -begin - Result := TcxTreeListReportLinkOptionsSize; -end; - -function TcxTreeListCustomReportLink.GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; -begin - Result := TcxTreeListReportLinkOptionsView; -end; - -procedure TcxTreeListCustomReportLink.AddReportRow(AReportRow: TdxReportCell); -begin - FReportRows.Add(AReportRow); -end; - -procedure TcxTreeListCustomReportLink.AddVerticalHardDelimiter(ADelimiter: TdxReportCell); -begin - AddVerticalHardDelimiter(ADelimiter.AbsoluteRect.Top); -end; - -procedure TcxTreeListCustomReportLink.AddVerticalHardDelimiter(ADelimiter: Integer); -begin - FDelimitersHardVert.Add(TObject(ADelimiter)); -end; - -function TcxTreeListCustomReportLink.CreateBuilder: TcxTreeListReportLinkBuilder; -begin - Result := GetBuilderClass.Create(Self); -end; - -class function TcxTreeListCustomReportLink.GetBuilderClass: TcxTreeListReportLinkBuilderClass; -begin - Result := TcxTreeListReportLinkBuilder; -end; - -function TcxTreeListCustomReportLink.ExtractIndentIndex(AData: Integer): Integer; -begin - Result := (AData and NodeIndentMask) shr NodeIndentOffset; -end; - -function TcxTreeListCustomReportLink.GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; - out ADrawInfo: TcxTreeListCellCustomDrawInfo): TcxTreeListAttributeID; - - function IsAttributedRow(AData: DWORD; AAttributeClass: TcxTreeListAttributeClass): Boolean; - begin - try - Result := TClass(AData) = AAttributeClass; - except - Result := False; - end; - end; - - function IsBandRow(AData: DWORD): Boolean; - begin - Result := IsAttributedRow(AData, TcxTreeListBandAttribute); - end; - - function IsHeaderRow(AData: DWORD): Boolean; - begin - Result := IsAttributedRow(AData, TcxTreeListHeaderAttribute); - end; - - function IsFooterRow(AData: DWORD): Boolean; - begin - Result := IsAttributedRow(AData, TcxTreeListFooterAttribute); - end; - - function IsIndentRow(AData: DWORD): Boolean; - begin - Result := IsAttributedRow(AData, TcxTreeListIndentsRowAttribute); - end; - - function CheckBand(AData: DWORD): Boolean; - begin - try - Result := IsDelphiObject(AData) and (TObject(AData) is TcxTreeListBand); - except - Result := False; - end; - if Result then - ADrawInfo.Band := TcxTreeListBand(AData); - end; - - function CheckColumn(AData: DWORD): Boolean; - begin - try - Result := IsDelphiObject(AData) and (TObject(AData) is TcxTreeListColumn); - except - Result := False; - end; - if Result then - ADrawInfo.Column := TcxTreeListColumn(AData); - end; - - function CheckNode(AData: DWORD): Boolean; - begin - try - Result := IsDelphiObject(AData) and (TObject(AData) is TcxTreeListNode); - except - Result := False; - end; - if Result then - ADrawInfo.Node := TcxTreeListNode(AData); - end; - - function IsBandCell(AData: DWORD): Boolean; - begin - Result := CheckBand(AData); - if Result then - ADrawInfo.AttributeID := cxTreeListBandID; - end; - - function IsFooterCell(AData: DWORD): Boolean; - begin - Result := IsFooterRow(AData); - if Result then - ADrawInfo.AttributeID := cxTreeListFooterID; - end; - - function IsHeaderCell(AData: Integer): Boolean; - begin - Result := IsHeaderRow(AData); - if Result then - ADrawInfo.AttributeID := cxTreeListHeaderID; - end; - - function IsNode(AData: DWORD): Boolean; - begin - Result := CheckNode(AData); - if Result then - ADrawInfo.AttributeID := cxTreeListNodeID; - end; - - function IsCustomizableCell(AData: DWORD): Boolean; - begin - Result := not IsBandRow(AData) and not IsHeaderRow(AData) and - not IsFooterRow(AData) and not IsIndentRow(AData); - end; - - function IsIndentCell(AData: DWORD): Boolean; - begin - Result := (AnItem.Parent <> nil) and IsIndentRow(AnItem.Parent.Data); - if Result then - begin - ADrawInfo.Index := ExtractIndentIndex(AData); - ADrawInfo.AttributeID := cxTreeListIndentID; - if AnItem.Parent.Parent <> nil then - begin - AData := AnItem.Parent.Parent.Data; - if not IsFooterRow(AData) then - CheckNode(AData); - end; - end; - end; - -var - AData: DWORD; -begin - FillChar(ADrawInfo, SizeOf(ADrawInfo), 0); - try - try - AData := AnItem.Data; - if IsCustomizableCell(AData) and not IsIndentCell(AData) then - if CheckColumn(AData) then - begin - if AnItem.Parent <> nil then - begin - AData := AnItem.Parent.Data; - if not IsHeaderCell(AData) then - if CheckBand(AData) then - begin - if AnItem.Parent.Parent <> nil then - begin - AData := AnItem.Parent.Parent.Data; - if not IsFooterCell(AData) then - IsNode(AData); - end; - end - else - IsNode(AData); - end; - end - else - IsBandCell(AData); - except - FillChar(ADrawInfo, SizeOf(ADrawInfo), 0); - end; - finally - Result := ADrawInfo.AttributeID; - end; -end; - -function TcxTreeListCustomReportLink.IsCustomDrawn(AnAttributeID: TcxTreeListAttributeID): Boolean; -begin - Result := False; - case AnAttributeID of - cxTreeListBandID: - Result := Assigned(FOnCustomDrawBandCell); - cxTreeListFooterID: - Result := Assigned(FOnCustomDrawFooterCell); - cxTreeListHeaderID: - Result := Assigned(FOnCustomDrawHeaderCell); - cxTreeListIndentID: - Result := Assigned(FOnCustomDrawIndentCell); - cxTreeListNodeID: - Result := Assigned(FOnCustomDrawCell); - end; -end; - -function TcxTreeListCustomReportLink.MakeIndentIndex(AnIndex: Integer): DWORD; -begin - Result := AnIndex shl NodeIndentOffset; -end; - -function TcxTreeListCustomReportLink.GetActiveStyles: TcxTreeListReportLinkStyles; -begin - Result := inherited ActiveStyles as TcxTreeListReportLinkStyles; -end; - -function TcxTreeListCustomReportLink.GetDesignWindow: TdxfmTreeListReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TdxfmTreeListReportLinkDesignWindow; -end; - -function TcxTreeListCustomReportLink.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := FReportRows[Index]; -end; - -function TcxTreeListCustomReportLink.GetReportRowByNode(Node: TcxTreeListNode): TdxReportCell; -var - I: Integer; -begin - if (Node <> nil) and not Node.IsFirstVisible then - for I := 0 to ReportRowCount - 1 do - begin - Result := ReportRows[I]; - if Result.Data = Integer(Node) then Exit; - end; - Result := nil; -end; - -function TcxTreeListCustomReportLink.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TcxTreeListCustomReportLink.GetOptionsExpanding: TcxTreeListReportLinkOptionsExpanding; -begin - Result := inherited OptionsExpanding as TcxTreeListReportLinkOptionsExpanding; -end; - -function TcxTreeListCustomReportLink.GetOptionsFormatting: TcxTreeListReportLinkOptionsFormatting; -begin - Result := inherited OptionsFormatting as TcxTreeListReportLinkOptionsFormatting; -end; - -function TcxTreeListCustomReportLink.GetOptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage; -begin - Result := inherited OptionsOnEveryPage as TcxTreeListReportLinkOptionsOnEveryPage; -end; - -function TcxTreeListCustomReportLink.GetOptionsPagination: TcxTreeListReportLinkOptionsPagination; -begin - Result := inherited OptionsPagination as TcxTreeListReportLinkOptionsPagination; -end; - -function TcxTreeListCustomReportLink.GetOptionsPreview: TcxTreeListReportLinkOptionsPreview; -begin - Result := inherited OptionsPreview as TcxTreeListReportLinkOptionsPreview; -end; - -function TcxTreeListCustomReportLink.GetOptionsRefinements: TcxTreeListReportLinkOptionsRefinements; -begin - Result := inherited OptionsRefinements as TcxTreeListReportLinkOptionsRefinements; -end; - -function TcxTreeListCustomReportLink.GetOptionsSelection: TcxTreeListReportLinkOptionsSelection; -begin - Result := inherited OptionsSelection as TcxTreeListReportLinkOptionsSelection; -end; - -function TcxTreeListCustomReportLink.GetOptionsSize: TcxTreeListReportLinkOptionsSize; -begin - Result := inherited OptionsSize as TcxTreeListReportLinkOptionsSize; -end; - -function TcxTreeListCustomReportLink.GetOptionsView: TcxTreeListReportLinkOptionsView; -begin - Result := inherited OptionsView as TcxTreeListReportLinkOptionsView; -end; - -function TcxTreeListCustomReportLink.GetStyles: TcxTreeListReportLinkStyles; -begin - Result := inherited Styles as TcxTreeListReportLinkStyles; -end; - -function TcxTreeListCustomReportLink.GetTreeList: TcxCustomTreeList; -begin - Result := TcxCustomTreeList(Component); -end; - -procedure TcxTreeListCustomReportLink.SetOnCustomDrawBandCell(Value: TcxTreeListReportLinkCustomDrawBandCellEvent); -begin - if @FOnCustomDrawBandCell <> @Value then - begin - FOnCustomDrawBandCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxTreeListCustomReportLink.SetOnCustomDrawCell(Value: TcxTreeListReportLinkCustomDrawCellEvent); -begin - if @FOnCustomDrawCell <> @Value then - begin - FOnCustomDrawCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxTreeListCustomReportLink.SetOnCustomDrawFooterCell(Value: TcxTreeListReportLinkCustomDrawFooterCellEvent); -begin - if @FOnCustomDrawFooterCell <> @Value then - begin - FOnCustomDrawFooterCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxTreeListCustomReportLink.SetOnCustomDrawHeaderCell(Value: TcxTreeListReportLinkCustomDrawHeaderCellEvent); -begin - if @FOnCustomDrawHeaderCell <> @Value then - begin - FOnCustomDrawHeaderCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxTreeListCustomReportLink.SetOnCustomDrawIndentCell(Value: TcxTreeListReportLinkCustomDrawIndentCellEvent); -begin - if @FOnCustomDrawIndentCell <> @Value then - begin - FOnCustomDrawIndentCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxTreeListCustomReportLink.SetOptionsExpanding(Value: TcxTreeListReportLinkOptionsExpanding); -begin - inherited OptionsExpanding := Value; -end; - -procedure TcxTreeListCustomReportLink.SetOptionsFormatting(Value: TcxTreeListReportLinkOptionsFormatting); -begin - inherited OptionsFormatting := Value; -end; - -procedure TcxTreeListCustomReportLink.SetOptionsOnEveryPage(Value: TcxTreeListReportLinkOptionsOnEveryPage); -begin - inherited OptionsOnEveryPage := Value; -end; - -procedure TcxTreeListCustomReportLink.SetOptionsPagination(Value: TcxTreeListReportLinkOptionsPagination); -begin - inherited OptionsPagination := Value; -end; - -procedure TcxTreeListCustomReportLink.SetOptionsPreview(Value: TcxTreeListReportLinkOptionsPreview); -begin - inherited OptionsPreview := Value; -end; - -procedure TcxTreeListCustomReportLink.SetOptionsRefinements(Value: TcxTreeListReportLinkOptionsRefinements); -begin - inherited OptionsRefinements := Value; -end; - -procedure TcxTreeListCustomReportLink.SetOptionsSelection(Value: TcxTreeListReportLinkOptionsSelection); -begin - inherited OptionsSelection := Value; -end; - -procedure TcxTreeListCustomReportLink.SetOptionsSize(Value: TcxTreeListReportLinkOptionsSize); -begin - inherited OptionsSize := Value; -end; - -procedure TcxTreeListCustomReportLink.SetOptionsView(Value: TcxTreeListReportLinkOptionsView); -begin - inherited OptionsView := Value; -end; - -procedure TcxTreeListCustomReportLink.SetStyles(Value: TcxTreeListReportLinkStyles); -begin - inherited Styles := Value; -end; - -{ TcxTreeListReportLink } - -function TcxTreeListReportLink.GetTreeList: TcxTreeList; -begin - Result := TcxTreeList(Component); -end; - -{ TcxDBTreeListReportLink } - -function TcxDBTreeListReportLink.GetDBTreeList: TcxDBTreeList; -begin - Result := TcxDBTreeList(Component); -end; - -{ TcxVirtualTreeListReportLink } - -function TcxVirtualTreeListReportLink.GetVirtualTreeList: TcxVirtualTreeList; -begin - Result := TcxVirtualTreeList(Component); -end; - -{ TdxfmTreeListReportLinkDesignWindow } - -constructor TdxfmTreeListReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxPSGlbl .dxhccxTreeListReportLinkDesigner; - inherited; - CreateControls; - SetActivePage; -end; - -destructor TdxfmTreeListReportLinkDesignWindow.Destroy; -begin - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(lbxStyles); - inherited; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoInitialize; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited DoInitialize; - RefreshStylesList; - - InitializePreviewTreeList; - InitializePreviewTreeListStyles; - LoadDataIntoPreviewTreeList; - - (*{$IFNDEF DXVER500} {.3} - chbxTransparentRichEdits.Visible := False; - bvlRefinementsSeparator.Top := bvlRefinementsSeparator.Top - 15; - chbxSuppressBackgroundBitmaps.Top := chbxSuppressBackgroundBitmaps.Top - 15; - chbxConsumeSelectionStyle.Top := chbxConsumeSelectionStyle.Top - 15; - {$ENDIF} *) - - with ReportLink.OptionsView do - begin - chbxShowBands.Checked := BandHeaders; - chbxShowBorders.Checked := Borders; - chbxShowExpandButtons.Checked := ExpandButtons; - chbxShowFooters.Checked := Footers; - chbxShowHeaders.Checked := Headers; - chbxShowTreeLines.Checked := TreeLines; - end; - - with ReportLink.OptionsOnEveryPage do - begin - chbxBandsOnEveryPage.Checked := BandHeaders; - chbxFootersOnEveryPage.Checked := Footers; - chbxHeadersOnEveryPage.Checked := Headers; - end; - - with cbxLookAndFeel do - begin - Items.Clear; - Items.AddObject(cxGetResourceString(@sdxLookAndFeelFlat), TObject(lfFlat)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelStandard), TObject(lfStandard)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelUltraFlat), TObject(lfUltraFlat)); - - ItemIndex := Items.IndexOfObject(TObject(ReportLink.OptionsFormatting.LookAndFeelKind)); - end; - - with ReportLink.OptionsFormatting do - begin - ccbxSeparatorColor.ColorValue := ActualNodeSeparatorColor; - seSeparatorThickness.AsInteger := NodeSeparatorThickness; - chbxConsumeSelectionStyle.Checked := ConsumeSelectionStyle; - chbxSuppressBackgroundBitmaps.Checked := SuppressBackgroundBitmaps; - chbxUseNativeStyles.Checked := UseNativeStyles; - end; - - with ReportLink.OptionsSelection do - begin - chbxProcessSelection.Checked := ProcessSelection; - chbxProcessExactSelection.Checked := ProcessExactSelection; - end; - - with ReportLink.OptionsExpanding do - begin - chbxExpandNodes.Checked := AutoExpandNodes; - chbxExplicitlyExpandNodes.Checked := ExplicitlyExpandNodes; - end; - - with ReportLink.OptionsSize do - begin - chbxAutoWidth.Checked := AutoWidth; - end; - - with ReportLink.OptionsRefinements do - begin - chbxTransparentGraphics.Checked := TransparentGraphics; - chbxDisplayGraphicsAsText.Checked := DisplayGraphicsAsText; - chbxFlatCheckMarks.Checked := FlatCheckMarks; - (*{$IFDEF DXVER500} {.3} - chbxTransparentRichEdits.Checked := TransparentRichEdits; - {$ENDIF} *) - end; - - with ReportLink.OptionsPreview do - begin - chbxPreviewVisible.Checked := Visible; - chbxPreviewAutoHeight.Checked := AutoHeight; - sePreviewMaxLineCount.AsInteger := MaxLineCount; - end; -end; - -{$IFDEF DELPHI7} -function TdxfmTreeListReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxfmTreeListReportLinkDesignWindow.LoadStrings; - - procedure AdjustBevelSize(ABevel: TBevel; ALabel: TControl); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := ALabel.Left + ALabel.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - inherited; - - lblPreviewWindow.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - tshView.Caption := cxGetResourceString(@sdxViewTab); - - lblShow.Caption := cxGetResourceString(@sdxShow); - AdjustBevelSize(bvlShow, lblShow); - chbxShowBands.Caption := cxGetResourceString(@sdxBands); - chbxShowHeaders.Caption := cxGetResourceString(@sdxHeaders); - chbxShowFooters.Caption := cxGetResourceString(@sdxFooters); - Bevel2.Width := bvlShow.Width - (Bevel2.Left - bvlShow.Left); - chbxShowBorders.Caption := cxGetResourceString(@sdxBorders); - chbxShowExpandButtons.Caption := cxGetResourceString(@sdxExpandButtons); - chbxShowTreeLines.Caption := cxGetResourceString(@sdxTreeLines); - - lblOnEveryPage.Caption := cxGetResourceString(@sdxOnEveryPage); - AdjustBevelSize(bvlOnEveryPage, lblOnEveryPage); - chbxBandsOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxBands)); - chbxHeadersOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxHeaders)); - chbxFootersOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxFooters)); - - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviorsTab); - - lblSelection.Caption := cxGetResourceString(@sdxSelection); - AdjustBevelSize(bvlSelection, lblSelection); - chbxProcessSelection.Caption := cxGetResourceString(@sdxProcessSelection); - chbxProcessExactSelection.Caption := cxGetResourceString(@sdxProcessExactSelection); - - lblExpanding.Caption := cxGetResourceString(@sdxExpanding); - AdjustBevelSize(bvlExpanding, lblExpanding); - chbxExpandNodes.Caption := cxGetResourceString(@sdxNodes); - chbxExplicitlyExpandNodes.Caption := cxGetResourceString(@sdxExplicitlyExpandNodes); - - lblSize.Caption := cxGetResourceString(@sdxSize); - AdjustBevelSize(bvlSize, lblSize); - chbxAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - - tshFormatting.Caption := cxGetResourceString(@sdxFormatting); - lblLookAndFeel.Caption := cxGetResourceString(@sdxLookAndFeel); - AdjustBevelSize(bvlLookAndFeel, lblLookAndFeel); - - lblRefinements.Caption := cxGetResourceString(@sdxRefinements); - AdjustBevelSize(bvlRefinements, lblRefinements); - chbxTransparentGraphics.Caption := cxGetResourceString(@sdxTransparentGraphics); - chbxDisplayGraphicsAsText.Caption := DropAmpersand(cxGetResourceString(@sdxDisplayGraphicsAsText)); - chbxFlatCheckMarks.Caption := cxGetResourceString(@sdxFlatCheckMarks); - //chbxTransparentRichEdits.Caption := cxGetResourceString(@sdxTransparentRichEdits); {.3} - chbxSuppressBackgroundBitmaps.Caption := cxGetResourceString(@sdxSuppressBackgroundBitmaps); - chbxConsumeSelectionStyle.Caption := cxGetResourceString(@sdxConsumeSelectionStyle); - - lblSeparators.Caption := cxGetResourceString(@sdxSeparators); - AdjustBevelSize(bvlSeparator, lblSeparators); - lblSeparatorsColor.Caption := cxGetResourceString(@sdxColor); - lblSeparatorsThickness.Caption := cxGetResourceString(@sdxThickness); - - tshStyles.Caption := cxGetResourceString(@sdxStyles); - lblUseNativeStyles.Caption := cxGetResourceString(@sdxUseNativeStyles); - AdjustBevelSize(bvlStyles, lblUseNativeStyles); - btnStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - btnStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - btnStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - btnStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - btnStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - btnStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); - - btnStyleSheetNew.Caption := cxGetResourceString(@sdxBtnNew); - btnStyleSheetCopy.Caption := cxGetResourceString(@sdxBtnCopy); - btnStyleSheetDelete.Caption := cxGetResourceString(@sdxBtnDelete); - btnStyleSheetRename.Caption := cxGetResourceString(@sdxBtnRename); - - miStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - miStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - miStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - miStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - miStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - miStylesSelectAll.Caption := cxGetResourceString(@sdxSelectAll); - miStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); - - tshPreview.Caption := cxGetResourceString(@sdxPreviewTab); - lblPreviewOptions.Caption := cxGetResourceString(@sdxOptions); - AdjustBevelSize(bvlPreviewOptions, lblPreviewOptions); - chbxPreviewVisible.Caption := cxGetResourceString(@sdxVisible); - chbxPreviewAutoHeight.Caption := cxGetResourceString(@sdxPreviewAutoHeight); - lblPreviewMaxLineCount.Caption := cxGetResourceString(@sdxPreviewMaxLineCount); - lblStyleSheets.Caption := cxGetResourceString(@sdxStyleSheets); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.UpdateControlsState; -begin - inherited; - chbxProcessExactSelection.Enabled := chbxProcessSelection.Checked; - chbxExplicitlyExpandNodes.Enabled := chbxExpandNodes.Checked; - - lbxStyles.Enabled := AreNativeStylesAvailable; - btnStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - btnStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStylesSaveAs.Enabled := CanSaveStyles; - - lblStyleSheets.Enabled := AreNativeStylesAvailable; - cbxStyleSheets.Enabled := AreNativeStylesAvailable; - btnStyleSheetNew.Enabled := CanCreateStyleSheet; - btnStyleSheetCopy.Enabled := CanCopyStyleSheet; - btnStyleSheetDelete.Enabled := CanDeleteStyleSheet; - btnStyleSheetRename.Enabled := CanRenameStyleSheet; - - WarningPaneUpdate; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.UpdatePreview; -const - TransparentsMap: array[Boolean] of TcxImageTransparency = (gtOpaque, gtTransparent); - TreeLineStylesMap: array[Boolean] of TcxTreeListTreeLineStyle = (tllsNone, tllsDot); -begin - PreviewTreeList.Enabled := False; - PreviewTreeList.LookAndFeel.Kind := ReportLink.OptionsFormatting.LookAndFeelKind; - PreviewTreeList.LookAndFeel.NativeStyle := False; - PreviewTreeList.Font := ReportLink.Font; - - chbxBandsOnEveryPage.Enabled := not ReportLink.IsAggregated; - chbxHeadersOnEveryPage.Enabled := not ReportLink.IsAggregated; - chbxFootersOnEveryPage.Enabled := not ReportLink.IsAggregated; - - TcxImageProperties(colManufacturerLogo.Properties).GraphicTransparency := - TransparentsMap[ReportLink.OptionsRefinements.TransparentGraphics]; - - PreviewTreeList.OptionsView.Bands := ReportLink.OptionsView.BandHeaders; - PreviewTreeList.OptionsView.Footer := ReportLink.OptionsView.Footers; - PreviewTreeList.OptionsView.Headers := ReportLink.OptionsView.Headers; - PreviewTreeList.OptionsView.Buttons := ReportLink.OptionsView.ExpandButtons; - PreviewTreeList.OptionsView.TreeLineStyle := TreeLineStylesMap[ReportLink.OptionsView.TreeLines]; - PreviewTreeList.OptionsView.ShowRoot := (ReportLink.TreeList <> nil) and - CustomTreeList_GetOptionsView(ReportLink.TreeList).ShowRoot; - PreviewTreeList.Preview.Visible := ReportLink.OptionsPreview.Visible; - - if ReportLink.TreeList <> nil then - PreviewTreeList.OptionsView.UseNodeColorForIndent := - CustomTreeList_GetOptionsView(ReportLink.TreeList).UseNodeColorForIndent; - - PreviewTreeList.Invalidate; -end; - -function TdxfmTreeListReportLinkDesignWindow.GetDesignerTabIndex: Integer; -begin - Result := PageControl1.ActivePage.TabIndex; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetDesignerTabIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > PageControl1.PageCount - 1 then - Value := PageControl1.PageCount - 1; - PageControl1.ActivePage := PageControl1.Pages[Value]; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited; - with cbxStyleSheets do - ItemIndex := Items.IndexOfObject(ActiveStyleSheet); - - if not LockControlsUpdate then - begin - Modified := True; - UpdatePreview; - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin - inherited; - if not AnActive then lbxStyles.HideToolTips; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoRefreshStylesList; -var - Styles: TcxTreeListReportLinkStyles; - List: TList; -begin - Styles := ReportLink.ActiveStyles; - with lbxStyles.Items do - begin - BeginUpdate; - try - List := TList.Create; - try - SaveSelectedStyles(List); - try - Clear; - AddObject(cxGetResourceString(@sdxBandBackgroundStyle), Styles.BandBackground); - AddObject(cxGetResourceString(@sdxBandHeaderStyle), Styles.BandHeader); - AddObject(cxGetResourceString(@sdxContentStyle), Styles.Content); - AddObject(cxGetResourceString(@sdxContentEvenStyle), Styles.ContentEven); - AddObject(cxGetResourceString(@sdxContentOddStyle), Styles.ContentOdd); - AddObject(cxGetResourceString(@sdxFooterStyle), Styles.Footer); - AddObject(cxGetResourceString(@sdxFooterRowStyle), Styles.FooterRow); - AddObject(cxGetResourceString(@sdxHeaderStyle), Styles.Header); - AddObject(cxGetResourceString(@sdxPreviewStyle), Styles.Preview); - AddObject(cxGetResourceString(@sdxSelectionStyle), Styles.Selection); - finally - RestoreSelectedStyles(List); - end; - finally - List.Free; - end; - finally - EndUpdate; - end; - end; - InitializePreviewTreeListStyles; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - inherited; - UpdatePreviewTreeListStyles(ACaption, AStyle); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin - if ARecreate then - RecreateStylesListBox - else - lbxStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - with lbxStyles do - for I := 0 to Items.Count - 1 do - if Selected[I] then - AStrings.AddObject(Items[I], Items.Objects[I]); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := lbxStyles.Items; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := cbxStyleSheets.Items; -end; - -function TdxfmTreeListReportLinkDesignWindow.GetActiveStyle: TcxStyle; -begin - with lbxStyles do - if ItemIndex <> -1 then - Result := TcxStyle(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -function TdxfmTreeListReportLinkDesignWindow.GetHasSelectedStyles: Boolean; -begin - Result := lbxStyles.SelCount <> 0; -end; - -function TdxfmTreeListReportLinkDesignWindow.GetHasSelectedStylesWithAssignedBitmap: Boolean; -var - Styles: TStrings; - I: Integer; - Style: TcxStyle; -begin - Result := True; - Styles := TStringList.Create; - try - GetSelectedStyleNames(Styles); - for I := 0 to Styles.Count - 1 do - begin - Style := TcxStyle(Styles.Objects[I]); - if (Style <> nil) and (Style.Bitmap <> nil) and not Style.Bitmap.Empty then - Exit; - end; - finally - Styles.Free; - end; - Result := False; -end; - -function TdxfmTreeListReportLinkDesignWindow.GetReportLink: TcxTreeListCustomReportLink; -begin - Result := inherited ReportLink as TcxTreeListCustomReportLink; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewMaxLineCountChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.MaxLineCount := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SeparatorColorChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - if TdxPSColorCombo(Sender).IsAutoColorSelected then - ReportLink.OptionsFormatting.NodeSeparatorColor := clDefault - else - ReportLink.OptionsFormatting.NodeSeparatorColor := TdxPSColorCombo(Sender).ColorValue; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SeparatorThicknessChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsFormatting.NodeSeparatorThickness := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -function TdxfmTreeListReportLinkDesignWindow.CanSelectAllStyles: Boolean; -var - I: Integer; -begin - Result := AreNativeStylesAvailable; - if Result then - begin - for I := 0 to lbxStyles.Items.Count - 1 do - if not lbxStyles.Selected[I] then Exit; - Result := False; - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CreateControls; - - function CreateSpin(AHost: TControl; ALabel: TLabel; ATabOrder: TTabOrder; - AMinValue, AMaxValue, AValue: Integer): TdxPSSpinEdit; - begin - Result := TdxPSSpinEdit.Create(Self); - with Result do - begin - Parent := AHost.Parent; - BoundsRect := AHost.BoundsRect; - TabOrder := ATabOrder; - - MinValue := AMinValue; - MaxValue := AMaxValue; - Value := AValue; - DefaultValue := AValue; - end; - ALabel.FocusControl := Result; - end; - - function CreateColorCombo(AHost: TControl; ALabel: TLabel; ATabOrder: TTabOrder; - ATag: Integer; AAutoColor: TColor): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(Result) do - begin - BoundsRect := AHost.BoundsRect; - Tag := MakeTTag(ATag); - Parent := AHost.Parent; - TabOrder := ATabOrder; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - - procedure CreateWarningPane; - begin - wpIncorrectOnEveryPageState := TdxPSWarningPane.Create(Self); - wpIncorrectOnEveryPageState.Parent := tshView; - wpIncorrectOnEveryPageState.BoundsRect := bvlWarningHost.BoundsRect; - bvlWarningHost.Visible := False; - end; - - procedure CreateStylesListBox; - begin - lbxStyles := TdxStylesListBox.Create(Self); - lbxStyles.Parent := tshStyles; - lbxStyles.BoundsRect := bvlStylesHost.BoundsRect; - lbxStyles.PopupMenu := pmStyles; - lbxStyles.TabOrder := chbxUseNativeStyles.TabOrder + 1; - lbxStyles.OnClick := lbxStylesClick; - bvlStylesHost.Visible := False; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(lbxStyles); - end; - -begin - sePreviewMaxLineCount := CreateSpin(bvlPreviewMaxLineCountHost, lblPreviewMaxLineCount, - chbxPreviewAutoHeight.TabOrder + 1, 0, 1000, 0); - sePreviewMaxLineCount.OnChange := PreviewMaxLineCountChanged; - - seSeparatorThickness := CreateSpin(bvlSeparatorThicknessHost, lblSeparatorsThickness, - chbxConsumeSelectionStyle.TabOrder + 1, 0, 16, 0); - seSeparatorThickness.OnChange := SeparatorThicknessChanged; - - ccbxSeparatorColor := CreateColorCombo(bvlSeparatorColorHost, lblSeparatorsColor, - seSeparatorThickness.TabOrder + 1, 0, dxPSDefaultTreeListNodeSeparatorColor); - ccbxSeparatorColor.OnChange := SeparatorColorChanged; - - CreateWarningPane; - CreateStylesListBox; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CustomDrawBorders(ACanvas: TcxCanvas; - const R: TRect); -var - GridLinesColor: TColor; -begin - with ReportLink do - begin - GridLinesColor := PreviewTreeList.OptionsView.GridLineColor; - {if TreeList <> nil then - GridLinesColor := CustomTreeList_GetOptionsView(TreeList).GridLineColor - else - GridLinesColor := PreviewTreeList.OptionsView.GridLineColor;//clWindowText;} - if GridLinesColor = clDefault then - GridLinesColor := CustomTreeList_GetLookAndFeelPainter(PreviewTreeList).DefaultGridLineColor; - end; - ACanvas.DrawComplexFrame(R, GridLinesColor, GridLinesColor, [bLeft, bBottom, bRight]); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CustomDrawCheckMark(ACanvas: TcxCanvas; - AViewInfo: TcxTreeListEditCellViewInfo); -const - Painters: array[Boolean] of TcxCustomLookAndFeelPainterClass = - (TcxStandardLookAndFeelPainter, TcxUltraFlatLookAndFeelPainter); -var - PrevColor: TColor; - R: TRect; - Params: TcxViewParams; - X, Y: Integer; - CheckValue: Variant; -begin - PrevColor := ACanvas.Brush.Color; - R := AViewInfo.BoundsRect; - Params := PreviewTreeList.Styles.GetContentParams(AViewInfo.Node, AViewInfo.Column); - - if Params.Bitmap = nil then - begin - ACanvas.Brush.Color := Params.Color; - ACanvas.FillRect(R); - end - else - dxBkgnd.DrawPicture(Params.Bitmap, ACanvas.Canvas, R, ppmTile, 1, 1, -R.Left, -R.Top); - - X := R.Left + (R.Right - R.Left - CheckWidth) div 2; - Y := R.Top + (R.Bottom - R.Top - CheckWidth) div 2; - R := MakeBounds(X, Y, CheckWidth, CheckWidth); - CheckValue := cbsChecked; - if AViewInfo.Node.Index = 0 then - CheckValue := cbsUnchecked; - with Painters[ReportLink.OptionsRefinements.FlatCheckMarks] do - DrawCheckButton(ACanvas, R, cxbsDefault, CheckValue = cbsChecked); - ACanvas.Brush.Color := PrevColor; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CustomDrawFooter(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxTreeListFooterCellViewInfo); -begin - if AViewInfo.Hidden then Exit; - case ReportLink.OptionsFormatting.LookAndFeelKind of - lfStandard, - lfFlat: - ACanvas.DrawComplexFrame(R, AViewInfo.ViewParams.TextColor, clBtnHighlight); - lfUltraFlat: - ACanvas.FrameRect(R, AViewInfo.ViewParams.TextColor); - end; - - InflateRect(R, -1, -1); - with AViewInfo do - CustomDrawTextRect(ACanvas, R, Text, AlignHorz, AlignVert, ViewParams); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CustomDrawHeader(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxTreeListHeaderCellViewInfo); -const - BottomRightColors: array[Boolean] of TColor = (clBtnFace, clBtnShadow); -begin - ACanvas.FrameRect(R, clWindowText);//AViewInfo.ViewParams.TextColor); - if ReportLink.OptionsFormatting.LookAndFeelKind <> lfUltraFlat then - begin - InflateRect(R, -1, -1); - ACanvas.DrawComplexFrame(R, clBtnHighlight, - BottomRightColors[ReportLink.OptionsFormatting.LookAndFeelKind = lfStandard]); - end; - - InflateRect(R, -1, -1); - with AViewInfo do - CustomDrawTextRect(ACanvas, R, Text, AlignHorz, AlignVert, ViewParams); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CustomDrawTextRect(ACanvas: TcxCanvas; - R: TRect; const AText: string; AnAlignmentHorz: TAlignment; AnAlignmentVert: TcxAlignmentVert; - AParams: TcxViewParams); -const - AlignmentHorzMap: array[TAlignment] of Integer = (cxAlignLeft, cxAlignRight, cxAlignCenter); - AlignmentVertMap: array[TcxAlignmentVert] of Integer = (cxAlignTop, cxAlignBottom, cxAlignVCenter); -begin - if AParams.Bitmap = nil then - begin - ACanvas.Brush.Color := AParams.Color; - ACanvas.FillRect(R); - end - else - dxBkgnd.DrawPicture(AParams.Bitmap, ACanvas.Canvas, R, ppmTile, 1, 1, - R.Left - 0, - R.Top - 0); - - InflateRect(R, -2, -1); - if AParams.Font <> nil then - ACanvas.Font := AParams.Font; - ACanvas.Font.Color := AParams.TextColor; - ACanvas.Brush.Style := bsClear; - ACanvas.DrawText(AText, R, - AlignmentHorzMap[AnAlignmentHorz] or AlignmentVertMap[AnAlignmentVert] or cxSingleLine); - ACanvas.Brush.Style := bsSolid; -end; - -function TdxfmTreeListReportLinkDesignWindow.ExtractAlignmentHorz( - AViewInfo: TcxTreeListEditCellViewInfo): TAlignment; -begin - with AViewInfo.Column do - if Properties <> nil then - Result := cxEditProperties_GetAlignment(Properties).Horz - else - Result := taLeftJustify; -end; - -function TdxfmTreeListReportLinkDesignWindow.ExtractAlignmentVert( - AViewInfo: TcxTreeListEditCellViewInfo): TcxAlignmentVert; -const - EditAlignmentVertMap: array[TcxEditVertAlignment] of TcxAlignmentVert = - (vaTop, vaBottom, vaCenter); -begin - with AViewInfo.Column do - if Properties <> nil then - Result := EditAlignmentVertMap[cxEditProperties_GetAlignment(Properties).Vert] - else - Result := vaCenter; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.InitializePreviewTreeList; - - procedure SetupDataBindings; - - function GetColumnCaption(AnIndex: Integer): string; - begin - case AnIndex of - 0: Result := cxGetResourceString(@sdxManufacturerNameColumnCaption); - 1: Result := cxGetResourceString(@sdxManufacturerLogoColumnCaption); - 2: Result := cxGetResourceString(@sdxManufacturerCountryColumnCaption); - 3: Result := cxGetResourceString(@sdxCarModelColumnCaption); - else - Result := cxGetResourceString(@sdxCarIsSUVColumnCaption); - end; - end; - - const - ColumnProperties: array[0..4] of string = - ('TcxTextEditProperties', 'TcxImageProperties', 'TcxTextEditProperties', - 'TcxTextEditProperties', 'TcxCheckBoxProperties'); - var - I: Integer; - begin - for I := 0 to PreviewTreeList.ColumnCount - 1 do - with PreviewTreeList.Columns[I] do - begin - PropertiesClassName := ColumnProperties[I]; - Caption.Text := GetColumnCaption(I); - end; - end; - -var - ASummaryItems: TcxTreeListSummaryItems; -begin - SetupDataBindings; - //TcxImageProperties(colManufacturerLogo.Properties).Stretch := True; - PreviewTreeList.Bands[0].Caption.Text := cxGetResourceString(@sdxManufacturerBandCaption); - PreviewTreeList.Bands[1].Caption.Text := cxGetResourceString(@sdxModelBandCaption); - PreviewTreeList.OptionsView.Footer := True; - ASummaryItems :=PreviewTreeList.Columns[0].Summary.FooterSummaryItems; - if ASummaryItems.Count = 0 then - ASummaryItems.Add; - ASummaryItems[0].Kind := skCount; - ASummaryItems[0].Format := cxGetResourceString(@sdxSummaryFormat); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.InitializePreviewTreeListStyles; - - procedure ResetEvents(AStyles: TcxTreeListStyles); - begin - with AStyles do - begin - OnGetBandBackgroundStyle := nil; - OnGetBandContentStyle := nil; - OnGetBandHeaderStyle := nil; - OnGetBandFooterStyle := nil; - OnGetColumnFooterStyle := nil; - OnGetColumnHeaderStyle := nil; - OnGetContentStyle := nil; - OnGetNodeIndentStyle := nil; - OnGetPreviewStyle := nil; - end; - end; - -var - Styles: TcxTreeListReportLinkStyles; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - begin - Styles := ReportLink.ActiveStyles; - dxPSResetStyles(PreviewTreeList.Styles); - with PreviewTreeList.Styles do - begin - BandBackground := Styles.BandBackground; - BandHeader := Styles.BandHeader; - Content := Styles.Content; - ContentEven := Styles.ContentEven; - ContentOdd := Styles.ContentOdd; - ColumnFooter := Styles.Footer; - ColumnHeader := Styles.Header; - Footer := Styles.FooterRow; - Preview := Styles.Preview; - end; - end - else - if ReportLink.TreeList <> nil then - PreviewTreeList.Styles := CustomTreeList_GetStyles(ReportLink.TreeList) - else - dxPScxCommon.dxPSResetStyles(PreviewTreeList.Styles); - - ResetEvents(PreviewTreeList.Styles); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.LoadDataIntoPreviewTreeList; - - function GetManufacturerName(AnIndex: Integer): string; - begin - case AnIndex of - 0: Result := cxGetResourceString(@sdxCarManufacturerName5); - 1: Result := cxGetResourceString(@sdxCarManufacturerName1); - 2: Result := cxGetResourceString(@sdxCarManufacturerName2); - else - Result := cxGetResourceString(@sdxCarManufacturerName4); - end; - end; - - function GetManufacturerCountry(AnIndex: Integer): string; - begin - case AnIndex of - 0: Result := cxGetResourceString(@sdxCarManufacturerCountry5); - 1: Result := cxGetResourceString(@sdxCarManufacturerCountry1); - 2: Result := cxGetResourceString(@sdxCarManufacturerCountry2); - else - Result := cxGetResourceString(@sdxCarManufacturerCountry4); - end; - end; - - function GetCarModel(AnIndex: Integer): string; - begin - case AnIndex of - 0: Result := cxGetResourceString(@sdxCarModel5); - 1: Result := cxGetResourceString(@sdxCarModel1); - 2: Result := cxGetResourceString(@sdxCarModel2); - else - Result := cxGetResourceString(@sdxCarModel4); - end; - end; - -const - RecordCount = 4; - CarLogosIndexes: array[0..RecordCount - 1] of Integer = (4, 0, 1, 3); - AreCarsSUV: array[0..RecordCount - 1] of string = ('False', 'True', 'True', 'True'); -var - I: Integer; -begin - PreviewTreeList.Clear; - for I := 0 to RecordCount - 1 do - with PreviewTreeList.Add do - begin - Values[0] := GetManufacturerName(I); - Values[1] := dxPScxCommon.dxPSPreviewCarLogosAsString(CarLogosIndexes[I]); - Values[2] := GetManufacturerCountry(I); - Values[3] := GetCarModel(I); - Values[4] := AreCarsSUV[I]; - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.RecreateStylesListBox; -var - List: TList; -begin - List := TList.Create; - try - SaveSelectedStyles(List); - dxPSUtl.dxRecreateWnd(lbxStyles); - RestoreSelectedStyles(List); - finally - List.Free; - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.RestoreSelectedStyles(AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - lbxStyles.Selected[Integer(AList[I])] := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SaveSelectedStyles(AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to lbxStyles.Items.Count - 1 do - if lbxStyles.Selected[I] then AList.Add(TObject(I)); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetActivePage; -begin - PageControl1.ActivePage := PageControl1.Pages[DesignerTabIndex]; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.UpdatePreviewTreeListStyles(const ACaption: string; - AStyle: TcxStyle); -begin - with PreviewTreeList.Styles do - begin - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxBandBackgroundStyle)) then - BandBackground := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxBandHeaderStyle)) then - BandHeader := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentStyle)) then - Content := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentEvenStyle)) then - ContentEven := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentOddStyle)) then - ContentOdd := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxFooterStyle)) then - ColumnFooter := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxHeaderStyle)) then - ColumnHeader := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxFooterRowStyle)) then - Footer := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxPreviewStyle)) then - Preview := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxSelectionStyle)) then - Selection := AStyle - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.WarningPaneUpdate; -begin - with ReportLink.HostInfoServices do - wpIncorrectOnEveryPageState.SetStateAndHint(IsInconsistentState, InconsistentStateText); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsExpandingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsExpanding do - case Index of - 0: AutoExpandNodes := Value; - 1: ExplicitlyExpandNodes := Value; - end; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsFormattingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsFormatting do - case Index of - 0: - begin - UseNativeStyles := Value; - InitializePreviewTreeListStyles; - end; - 1: SuppressBackgroundBitmaps := Value; - 2: ConsumeSelectionStyle := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsOnEveryPageByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsOnEveryPage do - case Index of - 0: BandHeaders := Value; - 1: Headers := Value; - 2: Footers := Value; - end; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsRefinementsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsRefinements do - case Index of - 0: TransparentGraphics := Value; - 1: DisplayGraphicsAsText := Value; - 2: FlatCheckMarks := Value; - {$IFDEF DXVER500} - 3: TransparentRichEdits := Value; - {$ENDIF} - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsSelectionByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsSelection do - case Index of - 0: ProcessSelection := Value; - 1: ProcessExactSelection := Value; - end; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsSizeByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsSize do - case Index of - 0: AutoWidth := Value; - end; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsViewByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsView do - case Index of - 0: BandHeaders := Value; - 1: Headers := Value; - 2: Footers := Value; - 3: ExpandButtons := Value; - 4: TreeLines := Value; - 5: Borders := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.LookAndFeelChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TComboBox(Sender) do - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsRefinementsClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsRefinementsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewVisibleClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.Visible := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewAutoHeightClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.AutoHeight := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsSelectionClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSelectionByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsExpandingClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsExpandingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsSizeClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSizeByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsViewClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsViewByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsOnEveryPageClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsOnEveryPageByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsFormattingClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsFormattingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.lblUseNativeStylesClick( - Sender: TObject); -begin - if chbxUseNativeStyles.CanFocus then ActiveControl := chbxUseNativeStyles; - chbxUseNativeStyles.Checked := not chbxUseNativeStyles.Checked; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.pmStylesPopup(Sender: TObject); -begin - lbxStyles.HideToolTips; - miStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - miStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStylesSelectAll.Enabled := CanSelectAllStyles; - miStylesSaveAs.Enabled := CanSaveStyles; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StyleColorClick(Sender: TObject); -begin - PerformStylesChangeColor; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StyleFontClick(Sender: TObject); -begin - PerformStylesChangeFont; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StyleBackgroundBitmapClick( - Sender: TObject); -begin - PerformStylesChangeBitmap; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StyleBackgroundBitmapClearClick( - Sender: TObject); -begin - PerformStylesClearBitmap; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StyleRestoreDefaultsClick( - Sender: TObject); -begin - PerformStylesRestoreDefaults; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.cbxStyleSheetsClick(Sender: TObject); -begin - with TComboBox(Sender) do - ActiveStyleSheet := TcxCustomStyleSheet(Items.Objects[ItemIndex]); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.btnStyleSheetNewClick(Sender: TObject); -begin - PerformStyleSheetNew; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.btnStyleSheetCopyClick(Sender: TObject); -begin - PerformStyleSheetCopy; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.btnStyleSheetDeleteClick(Sender: TObject); -begin - PerformStyleSheetDelete; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.btnStyleSheetRenameClick(Sender: TObject); -begin - PerformStyleSheetRename; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.miStylesSelectAllClick(Sender: TObject); -begin - lbxStyles.SelectAll; - UpdateControlsState; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StylesSaveAsClick(Sender: TObject); -begin - PerformStylesSaveAsStyleSheet; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.cbxStyleSheetsKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - PerformStyleSheetKeyDown(Sender, Key, Shift); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.cbxStyleSheetsDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -begin - PerformStyleSheetDrawItem(TComboBox(Control).Canvas, Index, Rect, State, Control.Enabled); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.lbxStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - UpdateControlsState; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreviewWindow.Parent := TPageControl(Sender).ActivePage; -end; - -procedure RegisterAssistants; -begin - TcxTreeListNodeHelper.Register; - TcxTreeListReportLinkStyleSheet.Register; -end; - -procedure UnregisterAssistants; -begin - TcxTreeListReportLinkStyleSheet.Unregister; - TcxTreeListNodeHelperFactory.ReleaseInstance; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewTreeListCustomDrawBandHeaderCell( - Sender: TcxCustomTreeList; ACanvas: TcxCanvas; - AViewInfo: TcxTreeListHeaderCellViewInfo; var ADone: Boolean); -var - R: TRect; -begin - R := AViewInfo.BoundsRect; - Dec(R.Top); - Dec(R.Left); - CustomDrawHeader(ACanvas, R, AViewInfo); - - ADone := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewTreeListCustomDrawDataCell( - Sender: TcxCustomTreeList; ACanvas: TcxCanvas; - AViewInfo: TcxTreeListEditCellViewInfo; var ADone: Boolean); -begin - if AViewInfo.Column = colManufacturerLogo then - if ReportLink.OptionsRefinements.DisplayGraphicsAsText then - begin - CustomDrawTextRect(ACanvas, AViewInfo.BoundsRect, ReportLink.OptionsRefinements.GraphicsText, - ExtractAlignmentHorz(AViewInfo), ExtractAlignmentVert(AViewInfo), AViewInfo.ViewParams); - CustomDrawBorders(ACanvas, AViewInfo.BoundsRect); - ADone := True; - end; - - if AViewInfo.Column = colCarIsSUV then - begin - CustomDrawCheckMark(ACanvas, AViewInfo); - CustomDrawBorders(ACanvas, AViewInfo.BoundsRect); - ADone := True; - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewTreeListCustomDrawFooterCell( - Sender: TcxCustomTreeList; ACanvas: TcxCanvas; - AViewInfo: TcxTreeListFooterCellViewInfo; var ADone: Boolean); -begin - CustomDrawFooter(ACanvas, AViewInfo.BoundsRect, TcxTreeListFooterCellViewInfo(AViewInfo)); - ADone := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewTreeListCustomDrawHeaderCell( - Sender: TcxCustomTreeList; ACanvas: TcxCanvas; - AViewInfo: TcxTreeListHeaderCellViewInfo; var ADone: Boolean); -var - R: TRect; -begin - R := AViewInfo.BoundsRect; - Dec(R.Top); - Dec(R.Left); - CustomDrawHeader(ACanvas, R, AViewInfo); - - ADone := True; -end; - -initialization - RegisterAssistants; - - dxPSRegisterReportLink(TcxTreeListReportLink, TcxTreeList, TdxfmTreeListReportLinkDesignWindow); - dxPSRegisterReportLink(TcxDBTreeListReportLink, TcxDBTreeList, TdxfmTreeListReportLinkDesignWindow); - dxPSRegisterReportLink(TcxVirtualTreeListReportLink, TcxVirtualTreeList, TdxfmTreeListReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TcxVirtualTreeListReportLink, TcxVirtualTreeList, TdxfmTreeListReportLinkDesignWindow); - dxPSUnregisterReportLink(TcxDBTreeListReportLink, TcxDBTreeList, TdxfmTreeListReportLinkDesignWindow); - dxPSUnregisterReportLink(TcxTreeListReportLink, TcxTreeList, TdxfmTreeListReportLinkDesignWindow); - - UnregisterAssistants; - - FreeAndNil(FDefaultdxPScxTreeListLinkStyleSheet); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5LnkPredefinedStyleSheets.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5LnkPredefinedStyleSheets.dfm deleted file mode 100644 index 03ee2d9d..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5LnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,299 +0,0 @@ -object dxdmPScxTreeListLnkPredefinedStyles: TdxdmPScxTreeListLnkPredefinedStyles - OldCreateOrder = False - Left = 483 - Top = 307 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 37 - Top = 12 - PixelsPerInch = 96 - object styleProfessionalFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3355443 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6582120 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalCaptionRow: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 536870912 - end - object styleProfessionalPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14541789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGreenFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGreenFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12778719 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14154698 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenSelected: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6005301 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenGroup: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentBandHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFooterRow: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsItalic] - TextColor = clBlack - end - object styleTransparentSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13816275 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TcxTreeListReportLinkStyleSheet - Caption = 'Professional' - Styles.BandHeader = styleProfessionalFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleProfessionalContentEven - Styles.ContentOdd = styleProfessionalContentOdd - Styles.Footer = styleProfessionalFixed - Styles.FooterRow = styleProfessionalFixed - Styles.Header = styleProfessionalFixed - Styles.Preview = styleProfessionalPreview - Styles.Selection = styleProfessionalSelection - BuiltIn = True - end - object ssGreen: TcxTreeListReportLinkStyleSheet - Caption = 'Green' - Styles.BandHeader = styleGreenFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleGreenLightContent - Styles.ContentOdd = styleNoneContent - Styles.Footer = styleGreenFixed - Styles.FooterRow = styleGreenFixed - Styles.Header = styleGreenFixed - Styles.Preview = styleGreenLightPreview - Styles.Selection = styleGreenSelected - BuiltIn = True - end - object ssTransparent: TcxTreeListReportLinkStyleSheet - Caption = 'Transparent' - Styles.BandHeader = styleTransparentBandHeader - Styles.Content = styleTransparentContent - Styles.ContentEven = styleTransparentContentEven - Styles.ContentOdd = styleTransparentContentOdd - Styles.Footer = styleTransparentFooter - Styles.FooterRow = styleTransparentFooterRow - Styles.Header = styleTransparentHeader - Styles.Preview = styleTransparentPreview - Styles.Selection = styleTransparentSelection - BuiltIn = True - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5LnkPredefinedStyleSheets.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5LnkPredefinedStyleSheets.pas deleted file mode 100644 index a4eb4fb6..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5LnkPredefinedStyleSheets.pas +++ /dev/null @@ -1,140 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxTL5LnkPredefinedStyleSheets; - -interface - -{$I cxVer.inc} - -uses - Classes, cxClasses, cxStyles, dxPScxTL5Lnk, - dxPScxCommon; - -type - TdxdmPScxTreeListLnkPredefinedStyles = class(TDataModule) - StyleRepository: TcxStyleRepository; - styleProfessionalFixed: TcxStyle; - styleProfessionalGroup: TcxStyle; - styleProfessionalRowCaption: TcxStyle; - styleProfessionalCaptionRow: TcxStyle; - styleProfessionalContentOdd: TcxStyle; - styleProfessionalContentEven: TcxStyle; - styleProfessionalPreview: TcxStyle; - styleProfessionalSelection: TcxStyle; - styleGreenFixed: TcxStyle; - styleGreenFooter: TcxStyle; - styleGreenLightContent: TcxStyle; - styleGreenLightPreview: TcxStyle; - styleGreenSelected: TcxStyle; - styleGreenGroup: TcxStyle; - styleNoneContent: TcxStyle; - styleNoneFixed: TcxStyle; - ssProfessional: TcxTreeListReportLinkStyleSheet; - ssGreen: TcxTreeListReportLinkStyleSheet; - ssTransparent: TcxTreeListReportLinkStyleSheet; - styleTransparentBandHeader: TcxStyle; - styleTransparentContent: TcxStyle; - styleTransparentContentEven: TcxStyle; - styleTransparentContentOdd: TcxStyle; - styleTransparentFooter: TcxStyle; - styleTransparentFooterRow: TcxStyle; - styleTransparentHeader: TcxStyle; - styleTransparentPreview: TcxStyle; - styleTransparentSelection: TcxStyle; - end; - -implementation - -{$R *.dfm} - -uses - cxStyleSheetsLoad; - -type - TdxPScxGridLnkPredefinedStyleSheets = class(TcxPredefinedStyleSheets) - private - FDataModule: TdxdmPScxTreeListLnkPredefinedStyles; - protected - procedure AddStyleSheets; override; - property DataModule: TdxdmPScxTreeListLnkPredefinedStyles read FDataModule; - public - constructor Create; override; - destructor Destroy; override; - - class procedure Register; - class procedure Unregister; - end; - -constructor TdxPScxGridLnkPredefinedStyleSheets.Create; -begin - inherited; - FDataModule := TdxdmPScxTreeListLnkPredefinedStyles.Create(nil); - AddStyleSheets; -end; - -destructor TdxPScxGridLnkPredefinedStyleSheets.Destroy; -begin - FDataModule.Free; - inherited; -end; - -class procedure TdxPScxGridLnkPredefinedStyleSheets.Register; -begin - cxStyleSheetsLoad.RegisterPredefinedStyleSheets(Self); -end; - -class procedure TdxPScxGridLnkPredefinedStyleSheets.Unregister; -begin - cxStyleSheetsLoad.UnregisterPredefinedStyleSheets(Self); -end; - -procedure TdxPScxGridLnkPredefinedStyleSheets.AddStyleSheets; -var - I: Integer; -begin - with DataModule.StyleRepository do - for I := 0 to StyleSheetCount - 1 do - AddStyleSheet(StyleSheets[I]); -end; - -initialization - TdxPScxGridLnkPredefinedStyleSheets.Register; - -finalization - TdxPScxGridLnkPredefinedStyleSheets.Unregister; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5LnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5LnkReg.pas deleted file mode 100644 index ce39ac87..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxTL5LnkReg.pas +++ /dev/null @@ -1,260 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxTL5LnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - DesignIntf, DesignEditors, - Classes, Controls, StdCtrls, cxStyles, cxStyleSheetEditor, cxCustomData, cxTL, - cxImage, dxPSRes, dxPScxTL5Lnk, dxPScxCommon; - -type - TcxTreeListReportLinkStyleSheetEditorPreview = class(TcxStyleSheetEditorPreview) - private - FTreeList: TcxTreeList; - protected - procedure Initialize; virtual; - property TreeList: TcxTreeList read FTreeList; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - class function GetStyleSheetClass: TcxCustomStyleSheetClass; override; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); override; - - function Control: TWinControl; override; - - class procedure Register; - class procedure Unregister; - end; - - TcxCustomTreeListAccess = class(TcxCustomTreeList); - -constructor TcxTreeListReportLinkStyleSheetEditorPreview.Create(AOwner: TComponent); -begin -// inherited; cannot call ancestor method if it's an abstract method in Delphi4(5) !!!! - FTreeList := TcxTreeList.Create(AOwner); - Initialize; -end; - -destructor TcxTreeListReportLinkStyleSheetEditorPreview.Destroy; -begin - FTreeList.Free; - inherited; -end; - -class function TcxTreeListReportLinkStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := TcxTreeListReportLinkStyleSheet; -end; - -procedure TcxTreeListReportLinkStyleSheetEditorPreview.SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); -var - TreeListStyles: TcxTreeListStyles; -begin - if AStyleSheet is TcxTreeListReportLinkStyleSheet then - begin - TreeListStyles := TcxCustomTreeListAccess(TreeList).Styles; - with TcxTreeListReportLinkStyleSheet(AStyleSheet).Styles do - begin - TreeListStyles.BandHeader := BandHeader; - TreeListStyles.ColumnFooter := Footer; - TreeListStyles.ColumnHeader := Header; - TreeListStyles.Content := Content; - TreeListStyles.ContentEven := ContentEven; - TreeListStyles.ContentOdd := ContentOdd; - TreeListStyles.Footer := FooterRow; - TreeListStyles.Preview := Preview; - end; - end - else - TreeList.Styles.ResetStyles; -end; - -function TcxTreeListReportLinkStyleSheetEditorPreview.Control: TWinControl; -begin - Result := TreeList; -end; - -class procedure TcxTreeListReportLinkStyleSheetEditorPreview.Register; -begin - cxStyleSheetEditor.RegisterStyleSheetEditorPreview(Self); -end; - -class procedure TcxTreeListReportLinkStyleSheetEditorPreview.Unregister; -begin - cxStyleSheetEditor.UnregisterStyleSheetEditorPreview(Self); -end; - -procedure TcxTreeListReportLinkStyleSheetEditorPreview.Initialize; -const - cBandCount = 2; - cColumnCount = 5; - cNodeCount = 4; - - procedure InitializeBands; - const - BandCaptions: array[0..cBandCount - 1] of string = (sdxManufacturerBandCaption, sdxModelBandCaption); - BandWidths: array[0..cBandCount - 1] of Integer = (300, 200); - var - I: Integer; - begin - for I := 0 to cBandCount - 1 do - with TcxCustomTreeListAccess(TreeList).Bands.Add do - begin - Caption.Text := BandCaptions[I]; - Width := BandWidths[I]; - end; - end; - - procedure InitializeColumns; - const - ColumnBandIndexes: array[0..cColumnCount - 1] of Integer = (0, 0, 1, 1, 1); - ColumnCaptions: array[0..cColumnCount - 1] of string = - (sdxManufacturerNameColumnCaption, sdxManufacturerLogoColumnCaption, sdxManufacturerCountryColumnCaption, - sdxCarModelColumnCaption, sdxCarIsSUVColumnCaption); - ColumnProperties: array[0..cColumnCount - 1] of string = - ('TcxTextEditProperties', 'TcxImageProperties', 'TcxTextEditProperties', - 'TcxTextEditProperties', 'TcxCheckBoxProperties'); - ColumnWidths: array[0..cColumnCount - 1] of Integer = (150, 150, 0, 120, 80); - var - I: Integer; - begin - with TcxCustomTreeListAccess(TreeList) do - begin - for I := 0 to cColumnCount - 1 do - with CreateColumn do - begin - Caption.Text := ColumnCaptions[I]; - Position.BandIndex := ColumnBandIndexes[I]; - Position.ColIndex := Bands[ColumnBandIndexes[I]].ColumnCount - 1; - PropertiesClassName := ColumnProperties[I]; - Width := ColumnWidths[I]; - end; - - with Columns[0].Summary.FooterSummaryItems.Add do - begin - Kind := skCount; - Format := sdxSummaryFormat; - end; - - TcxImageProperties(Columns[1].Properties).GraphicTransparency := gtTransparent; - - Preview.Column := Columns[2]; - Preview.Visible := True; - end; - end; - - procedure InitializeData; - const - ManufacturerNames: array[0..cNodeCount - 1] of string = - (sdxCarManufacturerName5, sdxCarManufacturerName1, sdxCarManufacturerName2, sdxCarManufacturerName4); - ManufacturerCountries: array[0..cNodeCount - 1] of string = - (sdxCarManufacturerCountry5, sdxCarManufacturerCountry1, sdxCarManufacturerCountry2, sdxCarManufacturerCountry4); - CarLogosIndexes: array[0..cNodeCount - 1] of Integer = - (4, 0, 1, 3); - CarModels: array[0..cNodeCount - 1] of string = - (sdxCarModel5, sdxCarModel1, sdxCarModel2, sdxCarModel4); - AreCarsSUV: array[0..cNodeCount - 1] of string = ('False', 'True', 'True', 'True'); - var - I: Integer; - begin - for I := 0 to cNodeCount - 1 do - with TreeList.Add do - begin - Values[0] := ManufacturerNames[I]; - Values[1] := dxPScxCommon.dxPSPreviewCarLogosAsString(CarLogosIndexes[I]); - Values[2] := ManufacturerCountries[I]; - Values[3] := CarModels[I]; - Values[4] := AreCarsSUV[I]; - end; - end; - - procedure InitializeOptions; - begin - with TcxCustomTreeListAccess(TreeList) do - begin - OptionsView.Bands := True; - OptionsView.CellAutoHeight := True; - OptionsView.ColumnAutoWidth := True; - OptionsView.Footer := True; - OptionsView.UseNodeColorForIndent := False; - - OptionsData.Editing := False; - end; - end; - -begin - InitializeBands; - InitializeColumns; - InitializeData; - InitializeOptions; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TcxTreeListReportLink, TcxDBTreeListReportLink, TcxVirtualTreeListReportLink, TcxTreeListReportLinkStyleSheet]); -end; - -procedure RegisterStyleSheetAssistants; -begin - cxStyles.RegisterStyleSheetClass(TcxTreeListReportLinkStyleSheet); - TcxTreeListReportLinkStyleSheetEditorPreview.Register; -end; - -procedure UnregisterStyleSheetAssistants; -begin - TcxTreeListReportLinkStyleSheetEditorPreview.Unregister; - cxStyles.UnregisterStyleSheetClass(TcxTreeListReportLinkStyleSheet); -end; - -initialization - RegisterStyleSheetAssistants; - -finalization - UnregisterStyleSheetAssistants; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnk.dfm deleted file mode 100644 index 9c1251f2..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnk.dfm +++ /dev/null @@ -1,1579 +0,0 @@ -object dxfmTreeListReportLinkDesignWindow: TdxfmTreeListReportLinkDesignWindow - Left = 426 - Top = 272 - BorderStyle = bsDialog - Caption = 'Property Sheets' - ClientHeight = 391 - ClientWidth = 624 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 618 - Height = 353 - ActivePage = tshStyles - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 8 - Top = 34 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 12 - Width = 253 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 166 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object imgOnEveryPage: TImage - Left = 8 - Top = 192 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlOnEveryPage: TBevel - Left = 90 - Top = 171 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object bvlWarningHost: TBevel - Left = 5 - Top = 251 - Width = 293 - Height = 70 - Visible = False - end - object Bevel2: TBevel - Left = 90 - Top = 91 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object chbxShowBands: TCheckBox - Left = 90 - Top = 26 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowHeaders: TCheckBox - Tag = 1 - Left = 90 - Top = 47 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 1 - OnClick = OptionsViewClick - end - object chbxShowFooters: TCheckBox - Tag = 2 - Left = 90 - Top = 68 - Width = 200 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 3 - Left = 90 - Top = 124 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 4 - OnClick = OptionsViewClick - end - object chbxBandsOnEveryPage: TCheckBox - Left = 90 - Top = 184 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 6 - OnClick = OptionsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Tag = 1 - Left = 90 - Top = 205 - Width = 200 - Height = 17 - Caption = 'Headers' - TabOrder = 7 - OnClick = OptionsOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Tag = 2 - Left = 90 - Top = 226 - Width = 200 - Height = 17 - Caption = 'Footers' - TabOrder = 8 - OnClick = OptionsOnEveryPageClick - end - object chbxShowTreeLines: TCheckBox - Tag = 4 - Left = 90 - Top = 145 - Width = 200 - Height = 17 - Caption = 'TreeLines' - TabOrder = 5 - OnClick = OptionsViewClick - end - object chbxShowBorders: TCheckBox - Tag = 5 - Left = 90 - Top = 103 - Width = 200 - Height = 17 - Caption = 'Borders' - TabOrder = 3 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 305 - Top = 0 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 9 - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object pnlBehaviors: TPanel - Left = 0 - Top = 0 - Width = 299 - Height = 325 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object pnlSelection: TPanel - Left = 0 - Top = 0 - Width = 299 - Height = 75 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblSelection: TLabel - Left = 5 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object imgSelection: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlSelection: TBevel - Left = 57 - Top = 12 - Width = 239 - Height = 4 - Shape = bsBottomLine - end - object chbxProcessSelection: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = 'Process Selection' - TabOrder = 0 - OnClick = OptionsSelectionClick - end - object chbxProcessExactSelection: TCheckBox - Tag = 1 - Left = 90 - Top = 51 - Width = 205 - Height = 17 - Caption = 'Process Exact Selection' - TabOrder = 1 - OnClick = OptionsSelectionClick - end - end - object pnlExpanding: TPanel - Left = 0 - Top = 75 - Width = 299 - Height = 70 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblExpanding: TLabel - Left = 5 - Top = 8 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 13 - Width = 234 - Height = 4 - Shape = bsBottomLine - end - object chbxExpandNodes: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = 'Nodes' - TabOrder = 0 - OnClick = OptionsExpandingClick - end - object chbxExplicitlyExpandNodes: TCheckBox - Tag = 1 - Left = 90 - Top = 51 - Width = 205 - Height = 17 - Caption = 'Explicitly Expand Nodes' - TabOrder = 1 - OnClick = OptionsExpandingClick - end - end - object pnlSize: TPanel - Left = 0 - Top = 145 - Width = 299 - Height = 68 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object lblSize: TLabel - Left = 5 - Top = 8 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlSize: TBevel - Left = 33 - Top = 13 - Width = 262 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = '&Auto Width' - TabOrder = 0 - OnClick = OptionsSizeClick - end - end - object pnlSeparators: TPanel - Left = 0 - Top = 213 - Width = 299 - Height = 94 - Align = alTop - BevelOuter = bvNone - TabOrder = 3 - object lblSeparators: TLabel - Left = 5 - Top = 8 - Width = 53 - Height = 13 - Caption = 'Separators' - end - object bvlSeparator: TBevel - Left = 68 - Top = 13 - Width = 229 - Height = 4 - Shape = bsBottomLine - end - object lblSeparatorsThickness: TLabel - Left = 90 - Top = 38 - Width = 50 - Height = 13 - Caption = 'Thickness:' - end - object lblSeparatorsColor: TLabel - Left = 90 - Top = 67 - Width = 29 - Height = 13 - Caption = 'Color:' - end - object bvlSeparatorThicknessHost: TBevel - Left = 152 - Top = 34 - Width = 80 - Height = 21 - end - object bvlSeparatorColorHost: TBevel - Left = 152 - Top = 62 - Width = 143 - Height = 21 - end - object imgSeparators: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000000000F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0F77FFF8F777F8F777F0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F00FFF8F00FF8F000F0 - F07DD0F08888888888888888880F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F0000F8F000F8F000F0 - F07DD0F0F00FFF8F00FF8F00FF0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCDCCDDD0F00000000000000000000 - F07DD0F08888888888888888880F07DDCCCCCCCCDD0F00000000000000000000 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8F000F8F000F0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F000FF8F000F8F00FF0 - F07DD0F0F00FFF8F000F8F000F0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCDDDDCDDDD0F00000000000000000000 - F07DD0F08888888888888888880F07DDCCCCDCCDDD0F00000000000000000000 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8F0FFF8F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00FFF8F000F8F000F0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F07777777777777777770F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F888887F88887F88880F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F800087F80087F80080F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFFFF7FFFFF7FFFFF0F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000000000807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - end - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 12 - Width = 211 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 7 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 83 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 37 - Width = 202 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnChange = LookAndFeelChange - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 145 - Width = 210 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementsClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 122 - Width = 210 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementsClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 100 - Width = 210 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementsClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 210 - Height = 17 - Caption = 'Suppress Background Textures' - TabOrder = 4 - OnClick = OptionsFormattingClick - end - object chbxConsumeSelectionStyle: TCheckBox - Tag = 2 - Left = 90 - Top = 204 - Width = 210 - Height = 17 - Caption = 'Consume Selection Style' - TabOrder = 5 - OnClick = OptionsFormattingClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 4 - object bvlStyles: TBevel - Left = 115 - Top = 13 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 249 - Width = 224 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 246 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 214 - Height = 173 - end - object Label1: TLabel - Left = 79 - Top = 110 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 229 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 229 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 229 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Texture...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = OptionsFormattingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 265 - Width = 288 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 297 - Width = 68 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 79 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 153 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 116 - Top = 213 - Width = 104 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 226 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 229 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Clear' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 213 - Width = 105 - Height = 23 - Caption = 'Restore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 2 - object lblPreviewOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPreviewOptions: TBevel - Left = 54 - Top = 12 - Width = 242 - Height = 5 - Shape = bsBottomLine - end - object lblPreviewMaxLineCount: TLabel - Left = 90 - Top = 75 - Width = 78 - Height = 13 - Caption = 'Max Line Count:' - end - object bvlPreviewMaxLineCountHost: TBevel - Left = 215 - Top = 71 - Width = 68 - Height = 21 - Visible = False - end - object imgPreview: TImage - Left = 8 - Top = 33 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F07DDDDDD0F7FC9F77777777777777F7F0 - 7DDDDDD0F7F9CF77777777777777F7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FC9F77777777777777F7F07DDDDDD0F7F9CF77777777777777F7F0 - 7DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxPreviewVisible: TCheckBox - Left = 90 - Top = 30 - Width = 207 - Height = 17 - Caption = 'Visible' - TabOrder = 0 - OnClick = PreviewVisibleClick - end - object chbxPreviewAutoHeight: TCheckBox - Left = 90 - Top = 51 - Width = 207 - Height = 17 - Caption = 'Auto Height' - TabOrder = 1 - OnClick = PreviewAutoHeightClick - end - end - end - object pnlPreview: TPanel - Left = 313 - Top = 44 - Width = 300 - Height = 304 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewTreeList: TcxTreeList - Left = 5 - Top = 5 - Width = 291 - Height = 294 - Bands = < - item - Caption.Text = 'Manufacturer Data' - Width = 173 - end - item - Caption.Text = 'Car Data' - Width = 116 - end> - BufferedPaint = False - DefaultRowHeight = 17 - Enabled = False - OptionsBehavior.AutomateLeftMostIndent = False - OptionsView.CellAutoHeight = True - OptionsView.ScrollBars = ssNone - OptionsView.Bands = True - OptionsView.ColumnAutoWidth = True - OptionsView.GridLines = tlglBoth - OptionsView.UseNodeColorForIndent = False - Preview.Column = colManufacturerCountry - TabOrder = 0 - OnCustomDrawBandHeader = PreviewTreeListCustomDrawBandHeader - OnCustomDrawCell = PreviewTreeListCustomDrawCell - OnCustomDrawFooterCell = PreviewTreeListCustomDrawFooterCell - OnCustomDrawHeaderCell = PreviewTreeListCustomDrawHeader - object colManufacturerName: TcxTreeListColumn - Caption.Text = 'Name' - DataBinding.ValueType = 'String' - Width = 113 - Position.ColIndex = 0 - Position.RowIndex = 0 - Position.BandIndex = 0 - end - object colManufacturerLogo: TcxTreeListColumn - Caption.Text = 'Logo' - DataBinding.ValueType = 'String' - Width = 60 - Position.ColIndex = 1 - Position.RowIndex = 0 - Position.BandIndex = 0 - end - object colManufacturerCountry: TcxTreeListColumn - Caption.Text = 'Country' - DataBinding.ValueType = 'String' - Width = 167 - Position.ColIndex = 2 - Position.RowIndex = 0 - Position.BandIndex = 0 - end - object colCarModel: TcxTreeListColumn - Caption.Text = 'Model' - DataBinding.ValueType = 'String' - Width = 86 - Position.ColIndex = 0 - Position.RowIndex = 0 - Position.BandIndex = 1 - end - object colCarIsSUV: TcxTreeListColumn - Caption.Text = 'SUV' - DataBinding.ValueType = 'String' - Width = 30 - Position.ColIndex = 1 - Position.RowIndex = 0 - Position.BandIndex = 1 - end - end - end - object cxStyleRepository1: TcxStyleRepository - Left = 4 - Top = 362 - PixelsPerInch = 96 - object styleBandHeaders: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - end - object styleStandard: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object stylePreview: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlue - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object styleCardShadow: TcxStyle - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 32 - Top = 362 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - ShortCut = 16454 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Texture...' - ImageIndex = 1 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 60 - Top = 362 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnk.pas deleted file mode 100644 index 52a43dd6..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnk.pas +++ /dev/null @@ -1,7519 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxTLLnk; - -interface - -{$I cxVer.inc} - -uses - Windows, SysUtils, Messages, Classes, Graphics, Controls, StdCtrls, ComCtrls, - ExtCtrls, ImgList, dxExtCtrls, Menus, Dialogs, ExtDlgs, cxClasses, cxControls, - cxGraphics, cxStyles, cxLookAndFeels, cxLookAndFeelPainters, cxEdit, cxTextEdit, - cxInplaceContainer, cxTL, cxDBTL, cxTLData, cxCustomData, dxBase, dxPSSngltn, - dxPrnPg, dxPSCore, dxPScxCommon; - -const - vspsTreeListFirst = 0; - vspsTreeListBandHeader = vspsTreeListFirst + 0; - vspsTreeListContent = vspsTreeListFirst + 1; - vspsTreeListContentEven = vspsTreeListFirst + 2; - vspsTreeListContentOdd = vspsTreeListFirst + 3; - vspsTreeListFooter = vspsTreeListFirst + 4; - vspsTreeListFooterRow = vspsTreeListFirst + 5; - vspsTreeListHeader = vspsTreeListFirst + 6; - vspsTreeListIndent = vspsTreeListFirst + 7; - vspsTreeListPreview = vspsTreeListFirst + 8; - vspsTreeListSelection = vspsTreeListFirst + 9; - vspsTreeListLast = vspsTreeListSelection; - - cxTreeListAttributeIDBase = 0; - cxTreeListUndefinedID = cxTreeListAttributeIDBase + 0; - cxTreeListBandID = cxTreeListAttributeIDBase + 1; - cxTreeListFooterID = cxTreeListAttributeIDBase + 2; - cxTreeListHeaderID = cxTreeListAttributeIDBase + 3; - cxTreeListIndentID = cxTreeListAttributeIDBase + 4; - cxTreeListNodeID = cxTreeListAttributeIDBase + 5; - -type - TcxTreeListNodeClass = class of TcxTreeListNode; - - TcxTreeListControlReportLink = class; - TdxfmTreeListReportLinkDesignWindow = class; - - TcxTreeListControlAttributeHostInfo = class; - TcxTreeListControlAdapterClass = class of TcxTreeListControlAdapter; - TcxTreeListControlAdapter = class; - TcxTreeListControlReportLinkFormatterClass = class of TcxTreeListControlReportLinkFormatter; - TcxTreeListControlReportLinkFormatter = class; - TcxTreeListControlReportLinkBuilderClass = class of TcxTreeListControlReportLinkBuilder; - TcxTreeListControlReportLinkBuilder = class; - - TcxTreeListAttributeClass = class of TcxTreeListAttribute; - TcxTreeListAttribute = class end; - TcxTreeListBandAttribute = class(TcxTreeListAttribute); - TcxTreeListNodeAttribute = class(TcxTreeListAttribute); - TcxTreeListFooterAttribute = class(TcxTreeListAttribute); - TcxTreeListHeaderAttribute = class(TcxTreeListAttribute); - - TcxTreeListAttributeID = type Integer; - - TcxTreeListCellCustomDrawInfo = record - AttributeID: TcxTreeListAttributeID; - Band: TcxTreeListBand; - Column: TcxTreeListColumn; - Node: TcxTreeListNode; - Index: Integer; - end; - - TdxTLColumnPlace = record - Left: Integer; - Right: Integer; - RowIndex: Integer; - LineCount: Integer; - end; - - { producers } - - TcxTreeListControlReportLinkRowProducerClass = class of TcxTreeListControlReportLinkRowProducer; - - TcxTreeListControlReportLinkRowProducer = class - private - FBuilder: TcxTreeListControlReportLinkBuilder; - FHost: TdxReportCell; - FRow: TdxReportCell; - FRowHeight: Integer; - function GetDC: HDC; - function GetIndentWidth: Integer; - function GetRowWidth: Integer; - protected - procedure CalculateRowAutoHeight; virtual; - procedure CalculateRowHeight; virtual; - procedure CreateRow; virtual; - procedure CreateRowHost(const AHostInfo: TcxTreeListControlAttributeHostInfo); virtual; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; virtual; - procedure FixupRowDataHeight; virtual; - procedure FixupRowHeight; virtual; - procedure FixupRowItselfHeight; virtual; - procedure InitializeRow; virtual; - - function GetAutoHeight: Boolean; virtual; - function GetLineCount: Integer; virtual; - function GetLineHeight: Integer; virtual; - - property DC: HDC read GetDC; - public - constructor Create(ABuilder: TcxTreeListControlReportLinkBuilder); virtual; - - function Adapter: TcxTreeListControlAdapter; overload; virtual; - function Builder: TcxTreeListControlReportLinkBuilder; overload; virtual; - function Formatter: TcxTreeListControlReportLinkFormatter; overload; virtual; - - function Produce(AHostInfo: TcxTreeListControlAttributeHostInfo): TdxReportCell; virtual; - - property AutoHeight: Boolean read GetAutoHeight; - property Host: TdxReportCell read FHost; - property IndentWidth: Integer read GetIndentWidth; - property LineCount: Integer read GetLineCount; - property LineHeight: Integer read GetLineHeight; - property Row: TdxReportCell read FRow; - property RowHeight: Integer read FRowHeight write FRowHeight; - property RowWidth: Integer read GetRowWidth; - end; - - TcxTreeListControlReportLinkCustomRowProducerClass = class of TcxTreeListControlReportLinkCustomRowProducer; - - TcxTreeListControlReportLinkCustomRowProducer = class(TcxTreeListControlReportLinkRowProducer) - private - FItem: TAbstractdxReportCellData; - protected - procedure CreateItem; virtual; - procedure InitializeItem; virtual; - - function GetAutoHeight: Boolean; override; - function GetItemClass: TdxReportCellDataClass; virtual; - - property Item: TAbstractdxReportCellData read FItem; - public - function Produce(AHostInfo: TcxTreeListControlAttributeHostInfo): TdxReportCell; override; - end; - - TcxTreeListControlReportLinkNodeSeparatorProducerClass = class of TcxTreeListControlReportLinkNodeSeparatorProducer; - - TcxTreeListControlReportLinkNodeSeparatorProducer = class(TcxTreeListControlReportLinkCustomRowProducer) - private - function GetItem: TdxReportCellBox; - protected - procedure InitializeItem; override; - procedure InitializeRow; override; - - function GetItemClass: TdxReportCellDataClass; override; - function GetLineHeight: Integer; override; - public - property Item: TdxReportCellBox read GetItem; - end; - - TcxTreeListControlReportLinkRowSubItemsProducerClass = class of TcxTreeListControlReportLinkRowSubItemsProducer; - - TcxTreeListControlReportLinkRowSubItemsProducer = class(TcxTreeListControlReportLinkRowProducer) - private - function GetColumn(Index: Integer): TcxTreeListColumn; - protected - procedure CreateDataItems(AParent: TdxReportCell); virtual; - procedure CreateIcons(AParent: TdxReportCell); virtual; - procedure CreateIndents(AParent: TdxReportCell); virtual; - procedure CreateRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - - function GetHasSubItem(Index: Integer): Boolean; virtual; - function GetSubItemBound(Index: Integer): TRect; virtual; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; virtual; abstract; - function GetSubItemCount: Integer; virtual; - public - property Columns[Index: Integer]: TcxTreeListColumn read GetColumn; - property HasSubItem[Index: Integer]: Boolean read GetHasSubItem; - property SubItemBounds[Index: Integer]: TRect read GetSubItemBound; - property SubItemClasses[Index: Integer]: TdxReportCellDataClass read GetSubItemClass; - property SubItemCount: Integer read GetSubItemCount; - end; - - TcxTreeListControlReportLinkBandsProducerClass = class of TcxTreeListControlReportLinkBandsProducer; - - TcxTreeListControlReportLinkBandsProducer = class(TcxTreeListControlReportLinkRowSubItemsProducer) - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AnIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - function GetSubItemCount: Integer; override; - end; - - TcxTreeListControlReportLinkFootersProducerClass = class of TcxTreeListControlReportLinkFootersProducer; - - TcxTreeListControlReportLinkFootersProducer = class(TcxTreeListControlReportLinkRowSubItemsProducer) - protected - procedure CalculateRowHeight; override; - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AnIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetHasSubItem(Index: Integer): Boolean; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - end; - - TcxTreeListControlReportLinkHeadersProducerClass = class of TcxTreeListControlReportLinkHeadersProducer; - - TcxTreeListControlReportLinkHeadersProducer = class(TcxTreeListControlReportLinkRowSubItemsProducer) - protected - procedure InitializeRow; override; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AnIndex: Integer); override; - - function GetAutoHeight: Boolean; override; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - end; - - TcxTreeListControlReportLinkNodeProducerClass = class of TcxTreeListControlReportLinkNodeProducer; - - TcxTreeListControlReportLinkNodeProducer = class(TcxTreeListControlReportLinkRowSubItemsProducer) - private - FImage: TdxReportCellGraphic; - FIndents: TList; - FNode: TcxTreeListNode; - FPreviewItem: TAbstractdxReportCellData; - FStateImage: TdxReportCellGraphic; - function GetImageIndentIndex: Integer; - function GetIndent(Index: Integer): TdxReportCellExpandButton; - function GetIndentArea: Integer; - function GetIndentBound(Index: Integer): TRect; - function GetPreviewColumn: TcxTreeListColumn; - function GetPreviewPlace: TcxTreeListPreviewPlace; - function GetStateImageIndentIndex: Integer; - protected - procedure CalculateRowAutoHeight; override; - procedure CreateDataItems(AParent: TdxReportCell); override; - procedure CreateIcons(AParent: TdxReportCell); override; - procedure CreateImages(AParent: TdxReportCell); virtual; - procedure CreateIndents(AParent: TdxReportCell); override; - procedure CreatePreview(AParent: TdxReportCell); virtual; - procedure CreateStateImages(AParent: TdxReportCell); virtual; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TdxReportVisualItem): Boolean; override; - procedure FixupRowDataHeight; override; - procedure InitializeImage(AnIndex: Integer); virtual; - procedure InitializeIndent(AnIndent: TdxReportCellExpandButton; AnIndex: Integer); virtual; - procedure InitializeRow; override; - procedure InitializeStateImage(AnIndex: Integer); virtual; - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AnIndex: Integer); override; - function IsItemIndent(AnItem: TdxReportVisualItem): Boolean; - - function GetAutoHeight: Boolean; override; - function GetCellAutoHeight: Boolean; virtual; - function GetHasPreview: Boolean; virtual; - function GetImageRect: TRect; virtual; - function GetIndentCount: Integer; virtual; - function GetLineCount: Integer; override; - function GetLineHeight: Integer; override; - function GetPreviewHeight: Integer; virtual; - function GetPreviewIndent: Integer; virtual; - function GetPreviewLineCount: Integer; virtual; - function GetPreviewLineHeight: Integer; virtual; - function GetStateImageRect: TRect; virtual; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemClass(Index: Integer): TdxReportCellDataClass; override; - public - constructor Create(ABuilder: TcxTreeListControlReportLinkBuilder); override; - destructor Destroy; override; - - function Node: TcxTreeListNode; overload; virtual; - function Produce(AHostInfo: TcxTreeListControlAttributeHostInfo; ANode: TcxTreeListNode): TdxReportCell; reintroduce; virtual; - - property CellAutoHeight: Boolean read GetCellAutoHeight; - property HasPreview: Boolean read GetHasPreview; - property Image: TdxReportCellGraphic read FImage; - property ImageIndentIndex: Integer read GetImageIndentIndex; - property ImageRect: TRect read GetImageRect; - property IndentArea: Integer read GetIndentArea; - property IndentBounds[Index: Integer]: TRect read GetIndentBound; - property IndentCount: Integer read GetIndentCount; - property Indents[Index: Integer]: TdxReportCellExpandButton read GetIndent; - property PreviewColumn: TcxTreeListColumn read GetPreviewColumn; - property PreviewHeight: Integer read GetPreviewHeight; - property PreviewIndent: Integer read GetPreviewIndent; - property PreviewItem: TAbstractdxReportCellData read FPreviewItem; - property PreviewLineCount: Integer read GetPreviewLineCount; - property PreviewLineHeight: Integer read GetPreviewLineHeight; - property PreviewPlace: TcxTreeListPreviewPlace read GetPreviewPlace; - property StateImage: TdxReportCellGraphic read FStateImage; - property StateImageIndentIndex: Integer read GetStateImageIndentIndex; - property StateImageRect: TRect read GetStateImageRect; - end; - - TcxTreeListControlReportLinkCategorizedNodeProducer = class(TcxTreeListControlReportLinkNodeProducer) - protected - procedure InitializeSubItem(ASubItem: TAbstractdxReportCellData; AnIndex: Integer); override; - function GetSubItemBound(Index: Integer): TRect; override; - function GetSubItemCount: Integer; override; - end; - - { helpers } - - TcxTreeListNodeHelperClass = class of TcxTreeListNodeHelper; - - TcxTreeListNodeHelper = class(TdxCustomClassMapItem) - private - FAdapter: TcxTreeListControlAdapter; - FNode: TcxTreeListNode; - protected - function Adapter: TcxTreeListControlAdapter; overload; virtual; - class function NodeClass: TcxTreeListNodeClass; virtual; - - function GetHasSelectedChildren: Boolean; virtual; - function GetHasSelectedParents: Boolean; virtual; - public - constructor Create(AnAdapter: TcxTreeListControlAdapter); virtual; - - class function PairClass: TClass; override; - class function ProducerClass: TcxTreeListControlReportLinkNodeProducerClass; virtual; - class procedure Register; - class procedure Unregister; - - property HasSelectedChildren: Boolean read GetHasSelectedChildren; - property HasSelectedParents: Boolean read GetHasSelectedParents; - property Node: TcxTreeListNode read FNode write FNode; - end; - - TcxTreeListNodeHelperCache = class(TdxCustomCache) - private - FAdapter: TcxTreeListControlAdapter; - function GetHelper(Node: TcxTreeListNode): TcxTreeListNodeHelper; - function GetItem(Index: Integer): TcxTreeListNodeHelper; - protected - function IndexOf(Node: TcxTreeListNode): Integer; - property Items[Index: Integer]: TcxTreeListNodeHelper read GetItem; - public - constructor Create(AnAdapter: TcxTreeListControlAdapter); - - property Adapter: TcxTreeListControlAdapter read FAdapter; - property Helpers[Node: TcxTreeListNode]: TcxTreeListNodeHelper read GetHelper; default; - end; - - TcxTreeListControlReportLinkProducerCache = class(TdxCustomCache) - private - FBuilder: TcxTreeListControlReportLinkBuilder; - function GetItem(Index: Integer): TcxTreeListControlReportLinkRowProducer; - function GetProducer(ProducerClass: TcxTreeListControlReportLinkRowProducerClass): TcxTreeListControlReportLinkRowProducer; - protected - function IndexOf(AProducerClass: TcxTreeListControlReportLinkRowProducerClass): Integer; - property Items[Index: Integer]: TcxTreeListControlReportLinkRowProducer read GetItem; - public - constructor Create(ABuilder: TcxTreeListControlReportLinkBuilder); - property Builder: TcxTreeListControlReportLinkBuilder read FBuilder; - property Producers[ProducerClass: TcxTreeListControlReportLinkRowProducerClass]: TcxTreeListControlReportLinkRowProducer read GetProducer; default; - end; - - TcxTreeListControlReportLinkBuilder = class - private - FAdapter: TcxTreeListControlAdapter; - FFormatter: TcxTreeListControlReportLinkFormatter; - FProducerCache: TcxTreeListControlReportLinkProducerCache; - FReportLink: TcxTreeListControlReportLink; - FReportRows: TList; - function GetAutoWidth: Boolean; - function GetAvailableWidth: Integer; - function GetHost: TdxReportCell; - function GetReportCells: TdxReportCells; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowCount: Integer; - function GetTreeListControl: TcxCustomTreeListControl; - protected - procedure AddReportRow(ARow: TdxReportCell); - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - { bands } - procedure CreateBands; virtual; - function GetBandsProducer: TcxTreeListControlReportLinkBandsProducer; - function GetBandsProducerClass: TcxTreeListControlReportLinkBandsProducerClass; virtual; - { footers } - procedure CreateFooters; virtual; - function GetFootersProducer: TcxTreeListControlReportLinkFootersProducer; - function GetFootersProducerClass: TcxTreeListControlReportLinkFootersProducerClass; virtual; - { headers } - procedure CreateHeaders; virtual; - function GetHeadersProducer: TcxTreeListControlReportLinkHeadersProducer; - function GetHeadersProducerClass: TcxTreeListControlReportLinkHeadersProducerClass; virtual; - { nodes } - procedure CreateNode(ANode: TcxTreeListNode); virtual; - procedure CreateNodes; virtual; - function GetNodeProducer(ANode: TcxTreeListNode): TcxTreeListControlReportLinkNodeProducer; - function GetNodeProducerClass(ANode: TcxTreeListNode): TcxTreeListControlReportLinkNodeProducerClass; virtual; - { separators } - procedure CreateNodeSeparator(ANode: TcxTreeListNode); virtual; - function GetNodeSeparatorProducer: TcxTreeListControlReportLinkNodeSeparatorProducer; - function GetNodeSeparatorProducerClass: TcxTreeListControlReportLinkNodeSeparatorProducerClass; virtual; - - procedure DoBuild; virtual; - function IsAborted: Boolean; - - property ProducerCache: TcxTreeListControlReportLinkProducerCache read FProducerCache; - property ReportLink: TcxTreeListControlReportLink read FReportLink; - public - constructor Create(AReportLink: TcxTreeListControlReportLink); virtual; - destructor Destroy; override; - - procedure Build; virtual; - procedure Progress(const APercentDone: Double); - - function Adapter: TcxTreeListControlAdapter; overload; virtual; - class function AdapterClass: TcxTreeListControlAdapterClass; virtual; - function Formatter: TcxTreeListControlReportLinkFormatter; overload; virtual; - class function FormatterClass: TcxTreeListControlReportLinkFormatterClass; virtual; - - property AutoWidth: Boolean read GetAutoWidth; - property AvailableWidth: Integer read GetAvailableWidth; - property Host: TdxReportCell read GetHost; - property ReportCells: TdxReportCells read GetReportCells; - property ReportRowCount: Integer read GetReportRowCount; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property TreeListControl: TcxCustomTreeListControl read GetTreeListControl; - end; - - TcxTreeListReportLinkBuilderHandler = class - private - FBuilder: TcxTreeListControlReportLinkBuilder; - function GetReportLink: TcxTreeListControlReportLink; - public - constructor Create(ABuilder: TcxTreeListControlReportLinkBuilder); virtual; - function Builder: TcxTreeListControlReportLinkBuilder; overload; virtual; - - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - end; - - TcxTreeListControlAdapter = class(TcxTreeListReportLinkBuilderHandler) - private - FAutoWidth: Boolean; - FAvailableWidth: Integer; - FBandLineCount: Integer; - FBandPlaces: array of TRect; - FBandWidths: array of Integer; - FColumnPlaces: array of TdxTLColumnPlace; - FColumnWidths: array of Integer; - FDetailsLineCount: Integer; - FFooterLineCount: Integer; - FHelperCache: TcxTreeListNodeHelperCache; - function GetBand(Index: Integer): TcxTreeListBand; - function GetBandCount: Integer; - function GetBandOrigin(Index: Integer): Integer; - function GetBandPlace(Index: Integer): TRect; - function GetBandWidth(Index: Integer): Integer; - function GetCanUseLookAndFeelColors: Boolean; - function GetCategorizedColumn: TcxTreeListColumn; - function GetCellAutoHeight: Boolean; - function GetCellEndEllipsis: Boolean; - function GetCellMultiline: Boolean; - function GetColumn(Index: Integer): TcxTreeListColumn; - function GetColumnCount: Integer; - function GetColumnPlace(Index: Integer): TdxTLColumnPlace; - function GetColumnWidth(Index: Integer): Integer; - function GetDefaultRowHeight: Integer; - function GetFooterItemText(Index: Integer): string; - function GetGridLines: TcxTreeListGridLines; - function GetGridLinesColor: TColor; - function GetHasFooterItem(Index: Integer): Boolean; - function GetHasPreview: Boolean; - function GetHeaderAutoHeight: Boolean; - function GetHelper(Node: TcxTreeListNode): TcxTreeListNodeHelper; - function GetImages: TCustomImageList; - function GetIndentWidth: Integer; - function GetIsDefaultRowHeightAssigned: Boolean; - function GetIsNodeColorUsedForIndents: Boolean; - function GetLookAndFeelKind: TcxLookAndFeelKind; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetMultiSelection: Boolean; - function GetNode(Index: Integer): TcxTreeListNode; - function GetNodeCount: Integer; - function GetOptionsView: TcxTreeListOptionsView; - function GetPaintStyle: TcxTreeListPaintStyle; - function GetPreviewColumn: TcxTreeListColumn; - function GetPreviewLeftIndent: Integer; - function GetPreviewPlace: TcxTreeListPreviewPlace; - function GetPreviewRightIndent: Integer; - function GetShowRoot: Boolean; - function GetShowHorzGridLines: Boolean; - function GetShowTreeLines: Boolean; - function GetShowVertGridLines: Boolean; - function GetStateImages: TCustomImageList; - function GetStyles: TcxTreeListStyles; - function GetThemedBandHeaderItemColor: TColor; - function GetThemedBandHeaderItemTextColor: TColor; - function GetThemedFooterItemColor: TColor; - function GetThemedFooterItemTextColor: TColor; - function GetThemedHeaderItemColor: TColor; - function GetThemedHeaderItemTextColor: TColor; - function GetThemedHeaderRowColor: TColor; - function GetTreeLinesColor: TColor; - function GetTreeLinesStyle: TcxTreeListTreeLineStyle; - function GetTreeListControl: TcxCustomTreeListControl; - function GetUseStylesForIndents: Boolean; - function GetViewWidth: Integer; - protected - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - - procedure AfterCalculate; virtual; - procedure BeforeCalculate; virtual; - procedure Calculate(AAvailableWidth: Integer; AnAutoWidth: Boolean); virtual; - procedure CalculateBandPlaces; virtual; - procedure CalculateBandWidths; virtual; - procedure CalculateColumnPlaces; virtual; - procedure CalculateColumnWidths; virtual; - procedure CalculateLineCounts; virtual; - procedure DoCalculate; virtual; - { properties } - class function GetProperties(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TcxCustomEditProperties; - class function GetPropertiesClass(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TcxCustomEditPropertiesClass; - class function GetRepositoryItem(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TcxEditRepositoryItem; - { styles } - function GetBackgroundViewParams: TcxViewParams; virtual; - function GetBandBackgroundViewParams: TcxViewParams; virtual; - function GetBandHeaderViewParams(ABand: TcxTreeListBand): TcxViewParams; virtual; - function GetColumnFooterViewParams(AColumn: TcxTreeListColumn): TcxViewParams; virtual; - function GetColumnHeaderViewParams(AColumn: TcxTreeListColumn): TcxViewParams; virtual; - function GetContentViewParams(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn): TcxViewParams; virtual; - function GetIndentViewParams(ANode: TcxTreeListNode; AnIndent: Integer): TcxViewParams; virtual; - function GetPreviewViewParams(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn): TcxViewParams; virtual; - function GetFooterRowViewParams: TcxViewParams; virtual; - function GetSelectionViewParams: TcxViewParams; virtual; - function HasSelectionStyle: Boolean; - { Backgrounds } - function GetBackgroundBitmap(Index: Integer): TBitmap; - function HasBackgroundBitmap(Index: Integer): Boolean; - - function GetImagesHeight(ANode: TcxTreeListNode): Integer; - function GetImagesWidth(ANode: TcxTreeListNode): Integer; - function GetStateImagesHeight(ANode: TcxTreeListNode): Integer; - function GetStateImagesWidth(ANode: TcxTreeListNode): Integer; - function HasImages(ANode: TcxTreeListNode): Boolean; - function HasStateImages(ANode: TcxTreeListNode): Boolean; - function IsGroupNode(ANode: TcxTreeListNode): Boolean; - - property AutoWidth: Boolean read FAutoWidth write FAutoWidth; - property Helpers[Node: TcxTreeListNode]: TcxTreeListNodeHelper read GetHelper; - property LookAndFeelKind: TcxLookAndFeelKind read GetLookAndFeelKind; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property OptionsView: TcxTreeListOptionsView read GetOptionsView; - property Styles: TcxTreeListStyles read GetStyles; - property TreeListControl: TcxCustomTreeListControl read GetTreeListControl; - property ViewWidth: Integer read GetViewWidth; - public - constructor Create(ABuilder: TcxTreeListControlReportLinkBuilder); override; - destructor Destroy; override; - - property AvailableWidth: Integer read FAvailableWidth write FAvailableWidth; - property BandCount: Integer read GetBandCount; - property BandLineCount: Integer read FBandLineCount write FBandLineCount; - property BandOrigins[Index: Integer]: Integer read GetBandOrigin; - property BandPlaces[Index: Integer]: TRect read GetBandPlace; - property Bands[Index: Integer]: TcxTreeListBand read GetBand; - property BandWidths[Index: Integer]: Integer read GetBandWidth; - property CanUseLookAndFeelColors: Boolean read GetCanUseLookAndFeelColors; - property CategorizedColumn: TcxTreeListColumn read GetCategorizedColumn; - property CellAutoHeight: Boolean read GetCellAutoHeight; - property CellEndEllipsis: Boolean read GetCellEndEllipsis; - property CellMultiline: Boolean read GetCellMultiline; - property ColumnCount: Integer read GetColumnCount; - property ColumnPlaces[Index: Integer]: TdxTLColumnPlace read GetColumnPlace; - property Columns[Index: Integer]: TcxTreeListColumn read GetColumn; - property ColumnWidths[Index: Integer]: Integer read GetColumnWidth; - property DefaultRowHeight: Integer read GetDefaultRowHeight; - property DetailsLineCount: Integer read FDetailsLineCount write FDetailsLineCount; - property FooterItemTexts[Index: Integer]: string read GetFooterItemText; - property FooterLineCount: Integer read FFooterLineCount write FFooterLineCount; - property GridLines: TcxTreeListGridLines read GetGridLines; - property GridLinesColor: TColor read GetGridLinesColor; - property HasFooterItem[Index: Integer]: Boolean read GetHasFooterItem; - property HasPreview: Boolean read GetHasPreview; - property HeaderAutoHeight: Boolean read GetHeaderAutoHeight; - property Images: TCustomImageList read GetImages; - property IndentWidth: Integer read GetIndentWidth; - property IsDefaultRowHeightAssigned: Boolean read GetIsDefaultRowHeightAssigned; - property IsNodeColorUsedForIndents: Boolean read GetIsNodeColorUsedForIndents; - property MultiSelection: Boolean read GetMultiSelection; - property PaintStyle: TcxTreeListPaintStyle read GetPaintStyle; - property PreviewColumn: TcxTreeListColumn read GetPreviewColumn; - property PreviewLeftIndent: Integer read GetPreviewLeftIndent; - property PreviewPlace: TcxTreeListPreviewPlace read GetPreviewPlace; - property PreviewRightIndent: Integer read GetPreviewRightIndent; - property NodeCount: Integer read GetNodeCount; - property Nodes[Index: Integer]: TcxTreeListNode read GetNode; - property ShowRoot: Boolean read GetShowRoot; - property ShowHorzGridLines: Boolean read GetShowHorzGridLines; - property ShowTreeLines: Boolean read GetShowTreeLines; - property ShowVertGridLines: Boolean read GetShowVertGridLines; - property StateImages: TCustomImageList read GetStateImages; - property ThemedBandHeaderItemColor: TColor read GetThemedBandHeaderItemColor; - property ThemedBandHeaderItemTextColor: TColor read GetThemedBandHeaderItemTextColor; - property ThemedFooterItemColor: TColor read GetThemedFooterItemColor; - property ThemedFooterItemTextColor: TColor read GetThemedFooterItemTextColor; - property ThemedHeaderItemColor: TColor read GetThemedHeaderItemColor; - property ThemedHeaderItemTextColor: TColor read GetThemedHeaderItemTextColor; - property ThemedHeaderRowColor: TColor read GetThemedHeaderRowColor; - property TreeLinesColor: TColor read GetTreeLinesColor; - property TreeLinesStyle: TcxTreeListTreeLineStyle read GetTreeLinesStyle; - property UseStylesForIndents: Boolean read GetUseStylesForIndents; - end; - - TcxTreeListControlReportLinkFormatter = class(TcxTreeListReportLinkBuilderHandler, - IUnknown, IdxPSCellParams, IdxPSCellParams2) - private - FBandLineHeight: Integer; - FDetailsLineHeight: Integer; - FFont: TFont; - FFooterLineHeight: Integer; - FHeaderLineHeight: Integer; - FLookAndFeelItems: TList; - FNodes: TList; - FPreviewLineHeight: Integer; - FTransparentColor: TColor; - function GetAutoWidth: Boolean; - function GetDC: HDC; - function GetExpandButtonColor: TColor; - function GetExpandButtonSize: Integer; - function GetGridLinesColor: TColor; - function GetHasNodeSeparator: Boolean; - function GetHasPreview: Boolean; - function GetIndentCount(Node: TcxTreeListNode): Integer; - function GetIsNodeColorUsedForIndents: Boolean; - function GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; - function GetLookAndFeelItemCount: Integer; - function GetNode(Index: Integer): TcxTreeListNode; - function GetNodeCount: Integer; - function GetNodeSeparatorColor: TColor; - function GetNodeSeparatorThickness: Integer; - function GetPreviewAutoHeight: Boolean; - function GetPreviewColumn: TcxTreeListColumn; - function GetPreviewMaxLineCount: Integer; - function GetRenderer: TdxPSReportRenderer; - function GetShowBandHeaders: Boolean; - function GetShowFooters: Boolean; - function GetShowHeaders: Boolean; - function GetShowPreview: Boolean; - function GetUseLookAndFeelColors: Boolean; - function GetViewWidth: Integer; - function GetTreeLinesColor: TColor; - function GetTreeLinesStyle: TcxTreeListTreeLineStyle; - - procedure FormatLookAndFeelItems; - protected - { IUnknown } - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - { IdxPSCellParams } - function IdxPSCellParams.GetAutoHeight = IdxPSCellParams_GetAutoHeight; - function IdxPSCellParams.GetDC = IdxPSCellParams_GetDC; - function IdxPSCellParams.GetDisplayGraphicsAsText = IdxPSCellParams_GetDisplayGraphicsAsText; - function IdxPSCellParams.GetEndEllipsis = IdxPSCellParams_GetEndEllipsis; - function IdxPSCellParams.GetFlatCheckMarks = IdxPSCellParams_GetFlatCheckMarks; - function IdxPSCellParams.GetGraphicsText = IdxPSCellParams_GetGraphicsText; - function IdxPSCellParams.GetMultiline = IdxPSCellParams_GetMultiline; - function IdxPSCellParams.GetTransparentGraphics = IdxPSCellParams_GetTransparentGraphics; - function IdxPSCellParams_GetAutoHeight: Boolean; virtual; - function IdxPSCellParams_GetDC: HDC; virtual; - function IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; virtual; - function IdxPSCellParams_GetEndEllipsis: Boolean; virtual; - function IdxPSCellParams_GetFlatCheckMarks: Boolean; virtual; - function IdxPSCellParams_GetGraphicsText: string; virtual; - function IdxPSCellParams_GetMultiline: Boolean; virtual; - function IdxPSCellParams_GetTransparentGraphics: Boolean; virtual; - { IdxPSCellParams2 } - function IdxPSCellParams2.GetPreviewMarginLeft = IdxPSCellParams2_GetPreviewMarginLeft; - function IdxPSCellParams2.GetPreviewMarginRight = IdxPSCellParams2_GetPreviewMarginRight; - function IdxPSCellParams2.GetPreviewMaxHeight = IdxPSCellParams2_GetPreviewMaxHeight; - function IdxPSCellParams2.GetPreviewMaxLineCount = IdxPSCellParams2_GetPreviewMaxLineCount; - function IdxPSCellParams2.GetRichEditGraphicClass = IdxPSCellParams2_GetRichEditGraphicClass; - function IdxPSCellParams2.GetRichEditTransparent = IdxPSCellParams2_GetRichEditTransparent; - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; virtual; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; virtual; - function IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; virtual; - function IdxPSCellParams2_GetRichEditTransparent: Boolean; virtual; - - procedure AddDelimiters; virtual; - procedure AddHorizontalDelimiters; virtual; - procedure AddVerticalDelimiters; virtual; - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - procedure CalculateLineHeights; virtual; - function CanProcessSelectionStyle(ANode: TcxTreeListNode): Boolean; - procedure CreateNodeList; virtual; - function IsSelectedNode(ANode: TcxTreeListNode): Boolean; virtual; - - function GetBackgroundBitmap(Index: Integer): TBitmap; - function GetBackgroundBitmapIndex(Index: Integer): Integer; - function HasBackgroundBitmap(Index: Integer): Boolean; - function MapStyleBackgroundBitmapIndex(ATreeListBackgroundBitmapIndex: Integer): Integer; - - procedure CalculateHeight(const AParams: TdxReportItemViewParams; var AHeight: Integer); - function CalculatePatternHeight(const AParams: TdxReportItemViewParams): Integer; - function GetNodeParent(ANode: TcxTreeListNode; ALevel: Integer): TcxTreeListNode; - function GetNextNode(ANode: TcxTreeListNode): TcxTreeListNode; - function GetPrevNode(ANode: TcxTreeListNode): TcxTreeListNode; - function GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; - function HasParent(ANode: TcxTreeListNode): Boolean; - function IndexOfNode(ANode: TcxTreeListNode): Integer; - function IsColorTransparent(AColor: TColor): Boolean; - function IsFirstNode(ANode: TcxTreeListNode): Boolean; - function IsLastNode(ANode: TcxTreeListNode): Boolean; - function IsNodeExpanded(ANode: TcxTreeListNode): Boolean; - function IsNodeFirstChild(ANode: TcxTreeListNode): Boolean; - function IsNodeLastChild(ANode: TcxTreeListNode): Boolean; - function IsOddNode(ANode: TcxTreeListNode): Boolean; - function IsNodeSelected(ANode: TcxTreeListNode): Boolean; - procedure RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); - procedure SetViewParams(AnItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); - - function MakeIndentIndex(AnIndex: Integer): DWORD; - - property DC: HDC read GetDC; - property LookAndFeelItemCount: Integer read GetLookAndFeelItemCount; - property LookAndFeelItems[Index: Integer]: TdxReportVisualItem read GetLookAndFeelItem; - property Renderer: TdxPSReportRenderer read GetRenderer; - property ViewWidth: Integer read GetViewWidth; - public - constructor Create(ABuilder: TcxTreeListControlReportLinkBuilder); override; - destructor Destroy; override; - - function Adapter: TcxTreeListControlAdapter; overload; virtual; - - procedure DoInitializeHost(AHost: TdxReportCell); virtual; - { Bands } - procedure DoInitializeBandItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeBandRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeBandItem(AnItem: TAbstractdxReportCellData; AIndex: Integer); virtual; - function GetBandBackgroundViewParams: TdxReportItemViewParams; virtual; - function GetBandItemClass(Index: Integer): TdxReportCellTextClass; virtual; - function GetBandItemBounds(Index: Integer): TRect; - function GetBandItemViewParams(ABand: TcxTreeListBand): TdxReportItemViewParams; virtual; - { Footers } - procedure DoInitializeFooterItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeFooterRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeFooterItem(AnItem: TAbstractdxReportCellData; AIndex: Integer); virtual; - function GetFooterItemBounds(Index: Integer): TRect; virtual; - function GetFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetFooterItemViewParams(AColumn: TcxTreeListColumn): TdxReportItemViewParams; virtual; - function GetFooterRowViewParams: TdxReportItemViewParams; virtual; - { Headers } - procedure DoInitializeHeaderItem(AnItem: TAbstractdxReportCellData; AnIndex: Integer); virtual; - procedure DoInitializeHeaderRow(ARow: TdxReportCell); virtual; - procedure DoReportLinkInitializeHeaderItem(AnItem: TAbstractdxReportCellData; AIndex: Integer); virtual; - function GetHeaderItemBounds(Index: Integer): TRect; virtual; - function GetHeaderItemClass(AnIndex: Integer): TdxReportCellTextClass; virtual; - function GetHeaderItemViewParams(AColumn: TcxTreeListColumn): TdxReportItemViewParams; virtual; - { Images } - procedure DoInitializeNodeImage(AnItem: TdxReportCellGraphic; ANode: TcxTreeListNode; AnIndex: Integer); virtual; - procedure DoReportLinkInitializeNodeImage(AnItem: TAbstractdxReportCellData; ANode: TcxTreeListNode; AnIndex: Integer); virtual; - function GetNodeImageCellSides(ANode: TcxTreeListNode; AnIndex: Integer): TdxCellSides; - function GetNodeImageClass: TdxReportCellGraphicClass; virtual; - function GetNodeImageViewParams(ANode: TcxTreeListNode; AnIndex: Integer): TdxReportItemViewParams; virtual; - { Indents and Expand Buttons } - procedure DoInitializeNodeIndent(AnItem: TdxReportCellExpandButton; AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); virtual; - procedure DoInitializeExpandButton(AnItem: TdxReportCellExpandButton; AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); virtual; - procedure DoReportLinkInitializeNodeIndent(AnItem: TAbstractdxReportCellData; AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); virtual; - function GetNodeIndentCellSides(ANode: TcxTreeListNode; AnIndex, AnIndentCount: Integer): TdxCellSides; virtual; - function GetNodeIndentClass: TdxReportCellExpandButtonClass; virtual; - function GetNodeIndentTreeLineMode(AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode): TdxPSTreeLineMode; - function GetNodeIndentViewParams(ANode: TcxTreeListNode; AnIndex, AnIndentCount: Integer): TdxReportItemViewParams; virtual; - { Nodes } - procedure DoInitializeNodeRow(ARow: TdxReportCell; ANode: TcxTreeListNode); virtual; - procedure DoInitializeNodeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode; AnIsPreview: Boolean = False); virtual; - procedure DoReportLinkInitializeNodeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode); virtual; - function GetCellValue(AProperties: TcxCustomEditProperties; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TcxEditValue; virtual; - function GetNodeBackgroundBitmapStyleIndex(ANode: TcxTreeListNode): Integer; - function GetNodeItemBounds(ANode: TcxTreeListNode; Index, IndentCount: Integer): TRect; virtual; - function GetNodeItemCellSides(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TdxCellSides; - function GetNodeItemClass(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode; - AnIsPreview: Boolean = False): TdxReportCellDataClass; virtual; - function GetNodeItemViewParams(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TdxReportItemViewParams; virtual; - { Preview } - procedure DoInitializePreview(AnItem: TAbstractdxReportCellData; AColumn: TcxTreeListColumn; ANode: TcxTreeListNode); virtual; - function GetPreviewCellSides(ANode: TcxTreeListNode): TdxCellSides; virtual; - function GetPreviewClass(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TdxReportCellDataClass; virtual; - function GetPreviewViewParams(AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TdxReportItemViewParams; virtual; - { Separators } - procedure DoInitializeNodeSeparator(AnItem: TdxReportCellBox); virtual; - procedure DoInitializeNodeSeparatorRow(ARow: TdxReportCell); virtual; - function GetNodeSeparatorClass: TdxReportCellBoxClass; virtual; - { State images } - procedure DoInitializeNodeStateImage(AnItem: TdxReportCellGraphic; ANode: TcxTreeListNode; AnIndex: Integer); virtual; - procedure DoReportLinkInitializeNodeStateImage(AnItem: TAbstractdxReportCellData; ANode: TcxTreeListNode; AnIndex: Integer); virtual; - function GetNodeStateImageCellSides(ANode: TcxTreeListNode; AnIndex: Integer): TdxCellSides; virtual; - function GetNodeStateImageClass: TdxReportCellGraphicClass; virtual; - function GetNodeStateImageViewParams(ANode: TcxTreeListNode; AnIndex: Integer): TdxReportItemViewParams; virtual; - - property AutoWidth: Boolean read GetAutoWidth; - property BandLineHeight: Integer read FBandLineHeight write FBandLineHeight; - property DetailsLineHeight: Integer read FDetailsLineHeight write FDetailsLineHeight; - property ExpandButtonColor: TColor read GetExpandButtonColor; - property ExpandButtonSize: Integer read GetExpandButtonSize; - property FooterLineHeight: Integer read FFooterLineHeight write FFooterLineHeight; - property GridLinesColor: TColor read GetGridLinesColor; - property HasNodeSeparator: Boolean read GetHasNodeSeparator; - property HasPreview: Boolean read GetHasPreview; - property HeaderLineHeight: Integer read FHeaderLineHeight write FHeaderLineHeight; - property IndentCounts[Node: TcxTreeListNode]: Integer read GetIndentCount; - property IsNodeColorUsedForIndents: Boolean read GetIsNodeColorUsedForIndents; - property NodeCount: Integer read GetNodeCount; - property Nodes[Index: Integer]: TcxTreeListNode read GetNode; - property NodeSeparatorColor: TColor read GetNodeSeparatorColor; - property NodeSeparatorThickness: Integer read GetNodeSeparatorThickness; - property PreviewAutoHeight: Boolean read GetPreviewAutoHeight; - property PreviewColumn: TcxTreeListColumn read GetPreviewColumn; - property PreviewLineHeight: Integer read FPreviewLineHeight write FPreviewLineHeight; - property PreviewMaxLineCount: Integer read GetPreviewMaxLineCount; - property ShowBandHeaders: Boolean read GetShowBandHeaders; - property ShowFooters: Boolean read GetShowFooters; - property ShowHeaders: Boolean read GetShowHeaders; - property ShowPreview: Boolean read GetShowPreview; - property UseLookAndFeelColors: Boolean read GetUseLookAndFeelColors; - property TransparentColor: TColor read FTransparentColor write FTransparentColor default clWindow; - property TreeLinesColor: TColor read GetTreeLinesColor; - property TreeLinesStyle: TcxTreeListTreeLineStyle read GetTreeLinesStyle; - end; - - { Options } - - TcxTreeListReportLinkOptionsExpanding = class(TdxCustomReportLinkOptionsExpanding) - private - FAutoExpandNodes: Boolean; - FExplicitlyExpandNodes: Boolean; - function GetReportLink: TcxTreeListControlReportLink; - procedure SetAutoExpandNodes(Value: Boolean); - procedure SetExplicitlyExpandNodes(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - published - property AutoExpandNodes: Boolean read FAutoExpandNodes write SetAutoExpandNodes default False; - property ExplicitlyExpandNodes: Boolean read FExplicitlyExpandNodes write SetExplicitlyExpandNodes default False; - end; - - TcxTreeListReportLinkOptionsFormatting = class(TdxCustomReportLinkOptionsFormatting) - private - FConsumeSelectionStyle: Boolean; - FNodeSeparatorColor: TColor; - FNodeSeparatorThickness: Integer; - function GetActualNodeSeparatorColor: TColor; - function GetReportLink: TcxTreeListControlReportLink; - procedure SetConsumeSelectionStyle(Value: Boolean); - procedure SetNodeSeparatorColor(Value: TColor); - procedure SetNodeSeparatorThickness(Value: Integer); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - - property ActualNodeSeparatorColor: TColor read GetActualNodeSeparatorColor; - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - published - property ConsumeSelectionStyle: Boolean read FConsumeSelectionStyle write SetConsumeSelectionStyle default False; - property NodeSeparatorColor: TColor read FNodeSeparatorColor write SetNodeSeparatorColor default clDefault; - property NodeSeparatorThickness: Integer read FNodeSeparatorThickness write SetNodeSeparatorThickness default 0; - property UseLookAndFeelColors; - end; - - TcxTreeListReportLinkOptionsOnEveryPage = class(TdxCustomTableControlReportLinkOptionsOnEveryPage) - private - function GetReportLink: TcxTreeListControlReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - published - property BandHeaders; - property Footers; - property Headers; - end; - - TcxTreeListReportLinkOptionsPagination = class(TdxCustomTableControlReportLinkOptionsPagination) - private - function GetNode: Boolean; - function GetReportLink: TcxTreeListControlReportLink; - procedure SetNode(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - published - property Band; - property Column; - property Custom; - property Node: Boolean read GetNode write SetNode default True; - end; - - TcxTreeListReportLinkOptionsPreview = class(TdxCustomTableControlReportLinkOptionsPreview) - private - function GetReportLink: TcxTreeListControlReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - end; - - TcxTreeListReportLinkOptionsRefinements = class(TdxCustomReportLinkOptionsRefinements) - private - function GetReportLink: TcxTreeListControlReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - end; - - TcxTreeListReportLinkOptionsSelection = class(TdxCustomTableControlReportLinkOptionsSelection) - private - function GetReportLink: TcxTreeListControlReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - end; - - TcxTreeListReportLinkOptionsSize = class(TdxCustomReportLinkOptionsSize) - private - function GetReportLink: TcxTreeListControlReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - published - property AutoWidth; - end; - - TcxTreeListReportLinkOptionsView = class(TdxCustomTableControlReportLinkOptionsView) - private - FBorders: Boolean; - FTreeLines: Boolean; - function GetReportLink: TcxTreeListControlReportLink; - procedure SetBorders(Value: Boolean); - procedure SetTreeLines(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - published - property BandHeaders; - property Borders: Boolean read FBorders write SetBorders default True; - property ExpandButtons; - property Footers; - property Headers; - property TreeLines: Boolean read FTreeLines write SetTreeLines default True; - end; - - { TcxTreeListReportLinkStyles } - - TcxTreeListReportLinkStylesClass = class of TcxTreeListReportLinkStyles; - - TcxTreeListReportLinkStyles = class(TdxCustomReportLinkStyles) - private - FOnGetNodeIndentStyle: TcxtlOnGetNodeIndentStyleEvent; - function GetReportLink: TcxTreeListControlReportLink; - protected - function DesignerTabIndex: Integer; override; - - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - class function GetStyleCaption(AnIndex: Integer): string; override; - function GetStyleIndexByCaption(const Caption: string): Integer; override; - public - procedure Assign(Source: TPersistent); override; - - procedure GetBandHeaderParams(ABand: TcxTreeListBand; out AParams: TcxViewParams); virtual; - procedure GetColumnFooterParams(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; - out AParams: TcxViewParams); virtual; - procedure GetColumnHeaderParams(AColumn: TcxTreeListColumn; out AParams: TcxViewParams); virtual; - procedure GetContentParams(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; - out AParams: TcxViewParams); virtual; - procedure GetFooterRowParams(out AParams: TcxViewParams); virtual; - procedure GetImagesParams(ANode: TcxTreeListNode; out AParams: TcxViewParams); virtual; - procedure GetIndentParams(ANode: TcxTreeListNode; AnIndent: Integer; out AParams: TcxViewParams); virtual; - procedure GetPreviewParams(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; - out AParams: TcxViewParams); virtual; - procedure GetSelectionParams(out AParams: TcxViewParams); virtual; - - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - published - property BandHeader: TcxStyle Index vspsTreeListBandHeader read GetValue write SetValue; - property Content: TcxStyle Index vspsTreeListContent read GetValue write SetValue; - property ContentEven: TcxStyle Index vspsTreeListContentEven read GetValue write SetValue; - property ContentOdd: TcxStyle Index vspsTreeListContentOdd read GetValue write SetValue; - property Footer: TcxStyle Index vspsTreeListFooter read GetValue write SetValue; - property FooterRow: TcxStyle Index vspsTreeListFooterRow read GetValue write SetValue; - property Header: TcxStyle Index vspsTreeListHeader read GetValue write SetValue; - property Preview: TcxStyle Index vspsTreeListPreview read GetValue write SetValue; - property Selection: TcxStyle Index vspsTreeListSelection read GetValue write SetValue; - property StyleSheet; - property OnGetNodeIndentStyle: TcxtlOnGetNodeIndentStyleEvent read FOnGetNodeIndentStyle write FOnGetNodeIndentStyle; - end; - - TcxTreeListReportLinkStyleSheet = class(TdxCustomReportLinkStyleSheet) - private - function GetStylesValue: TcxTreeListReportLinkStyles; - procedure SetStylesValue(Value: TcxTreeListReportLinkStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TcxTreeListReportLinkStyles read GetStylesValue write SetStylesValue; - end; - - { Host Services } - - TcxTreeListControlAttributeHostInfo = class - private - FParent: TdxReportCell; - public - Origin: TPoint; - procedure Initialize(AParent: TdxReportCell); - property Parent: TdxReportCell read FParent; - end; - - TcxTreeListAttributeHostInfoServicesClass = class of TcxTreeListAttributeHostInfoServices; - - TcxTreeListAttributeHostInfoServices = class - private - FPageDetailsHostInfo: TcxTreeListControlAttributeHostInfo; - FPageFootersHostInfo: TcxTreeListControlAttributeHostInfo; - FPageHeadersHostInfo: TcxTreeListControlAttributeHostInfo; - FReportLink: TcxTreeListControlReportLink; - function GetArePageFootersAssigned: Boolean; - function GetArePageHeadersAssigned: Boolean; - function GetCanUseBandHeadersOnEveyPage: Boolean; - function GetCanUseFootersOnEveryPage: Boolean; - function GetCanUseHeadersOnEveryPage: Boolean; - function GetIsInconsistentHeadersState: Boolean; - function GetOptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage; - function GetOptionsView: TcxTreeListReportLinkOptionsView; - function GetPageDetails: TdxReportCell; - function GetPageFooters: TdxReportCell; - function GetPageHeaders: TdxReportCell; - protected - procedure CreateHostInfos; - procedure DestroyHostInfos; - - function GetBandHeadersHostInfo: TcxTreeListControlAttributeHostInfo; virtual; - function GetFootersHostInfo: TcxTreeListControlAttributeHostInfo; virtual; - function GetHeadersHostInfo: TcxTreeListControlAttributeHostInfo; virtual; - function GetInconsistentStateText: string; virtual; - function GetIsInconsistentState: Boolean; virtual; - function HasCells: Boolean; - - property OptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage read GetOptionsOnEveryPage; - property OptionsView: TcxTreeListReportLinkOptionsView read GetOptionsView; - property PageDetails: TdxReportCell read GetPageDetails; - property PageFooters: TdxReportCell read GetPageFooters; - property PageHeaders: TdxReportCell read GetPageHeaders; - public - constructor Create(AReportLink: TcxTreeListControlReportLink); virtual; - destructor Destroy; override; - procedure InitializeHostInfos; - - property ArePageFootersAssigned: Boolean read GetArePageFootersAssigned; - property ArePageHeadersAssigned: Boolean read GetArePageHeadersAssigned; - property BandHeadersHostInfo: TcxTreeListControlAttributeHostInfo read GetBandHeadersHostInfo; - property CanUseBandHeadersOnEveyPage: Boolean read GetCanUseBandHeadersOnEveyPage; - property CanUseFootersOnEveryPage: Boolean read GetCanUseFootersOnEveryPage; - property CanUseHeadersOnEveryPage: Boolean read GetCanUseHeadersOnEveryPage; - property FootersHostInfo: TcxTreeListControlAttributeHostInfo read GetFootersHostInfo; - property HeadersHostInfo: TcxTreeListControlAttributeHostInfo read GetHeadersHostInfo; - property InconsistentStateText: string read GetInconsistentStateText; - property IsInconsistentHeadersState: Boolean read GetIsInconsistentHeadersState; - property IsInconsistentState: Boolean read GetIsInconsistentState; - property PageDetailsHostInfo: TcxTreeListControlAttributeHostInfo read FPageDetailsHostInfo; - property PageFootersHostInfo: TcxTreeListControlAttributeHostInfo read FPageFootersHostInfo; - property PageHeadersHostInfo: TcxTreeListControlAttributeHostInfo read FPageHeadersHostInfo; - property ReportLink: TcxTreeListControlReportLink read FReportLink; - end; - - { TcxTreeListControlReportLink } - - TcxTreeListNodeArray = array of TcxTreeListNode; - - TcxTreeListReportLinkGetCustomPageBreaksEvent = procedure(Sender: TcxTreeListControlReportLink) of object; - - TcxTreeListReportLinkCustomDrawBandCellEvent = procedure(Sender: TcxTreeListControlReportLink; - ACanvas: TCanvas; ABand: TcxTreeListBand; AnItem: TdxReportCellImage; - var ADone: Boolean) of object; - - TcxTreeListReportLinkCustomDrawCellEvent = procedure(Sender: TcxTreeListControlReportLink; - ACanvas: TCanvas; ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; - AnItem: TAbstractdxReportCellData; var ADone: Boolean) of object; - - TcxTreeListReportLinkCustomDrawFooterCellEvent = procedure(Sender: TcxTreeListControlReportLink; - ACanvas: TCanvas; AColumn: TcxTreeListColumn; AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TcxTreeListReportLinkCustomDrawHeaderCellEvent = procedure(Sender: TcxTreeListControlReportLink; - ACanvas: TCanvas; AColumn: TcxTreeListColumn; AnItem: TdxReportCellImage; var ADone: Boolean) of object; - - TcxTreeListReportLinkCustomDrawIndentCellEvent = procedure(Sender: TcxTreeListControlReportLink; - ACanvas: TCanvas; ANode: TcxTreeListNode; AnIndex: Integer; AnItem: TAbstractdxReportCellData; - var ADone: Boolean) of object; - - TcxTreeListReportLinkInitializeBandCellEvent = procedure(Sender: TcxTreeListControlReportLink; - ABand: TcxTreeListBand; AnItem: TdxReportCellImage) of object; - - TcxTreeListReportLinkInitializeCellEvent = procedure(Sender: TcxTreeListControlReportLink; - ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; AnItem: TAbstractdxReportCellData) of object; - - TcxTreeListReportLinkInitializeFooterCellEvent = procedure(Sender: TcxTreeListControlReportLink; - AColumn: TcxTreeListColumn; AnItem: TdxReportCellString) of object; - - TcxTreeListReportLinkInitializeHeaderCellEvent = procedure(Sender: TcxTreeListControlReportLink; - AColumn: TcxTreeListColumn; AnItem: TdxReportCellImage) of object; - - TcxTreeListReportLinkInitializeIndentCellEvent = procedure(Sender: TcxTreeListControlReportLink; - ANode: TcxTreeListNode; AnIndex: Integer; AnItem: TAbstractdxReportCellData) of object; - - TcxTreeListControlReportLink = class(TdxCustomTableControlReportLink) - private - FBuilder: TcxTreeListControlReportLinkBuilder; - FDelimitersHardVert: TList; - FHostInfoServices: TcxTreeListAttributeHostInfoServices; - FReportRows: TList; - FOnCustomDrawBandCell: TcxTreeListReportLinkCustomDrawBandCellEvent; - FOnCustomDrawCell: TcxTreeListReportLinkCustomDrawCellEvent; - FOnCustomDrawFooterCell: TcxTreeListReportLinkCustomDrawFooterCellEvent; - FOnCustomDrawHeaderCell: TcxTreeListReportLinkCustomDrawHeaderCellEvent; - FOnCustomDrawIndentCell: TcxTreeListReportLinkCustomDrawIndentCellEvent; - FOnGetCustomPageBreaks: TcxTreeListReportLinkGetCustomPageBreaksEvent; - FOnInitializeBandCell: TcxTreeListReportLinkInitializeBandCellEvent; - FOnInitializeCell: TcxTreeListReportLinkInitializeCellEvent; - FOnInitializeFooterCell: TcxTreeListReportLinkInitializeFooterCellEvent; - FOnInitializeHeaderCell: TcxTreeListReportLinkInitializeHeaderCellEvent; - FOnInitializeIndentCell: TcxTreeListReportLinkInitializeIndentCellEvent; - function GetActiveStyles: TcxTreeListReportLinkStyles; - function GetDesignWindow: TdxfmTreeListReportLinkDesignWindow; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowByNode(Node: TcxTreeListNode): TdxReportCell; - function GetReportRowCount: Integer; - function GetOptionsExpanding: TcxTreeListReportLinkOptionsExpanding; - function GetOptionsFormatting: TcxTreeListReportLinkOptionsFormatting; - function GetOptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage; - function GetOptionsPagination: TcxTreeListReportLinkOptionsPagination; - function GetOptionsPreview: TcxTreeListReportLinkOptionsPreview; - function GetOptionsRefinements: TcxTreeListReportLinkOptionsRefinements; - function GetOptionsSelection: TcxTreeListReportLinkOptionsSelection; - function GetOptionsSize: TcxTreeListReportLinkOptionsSize; - function GetOptionsView: TcxTreeListReportLinkOptionsView; - function GetStyles: TcxTreeListReportLinkStyles; - function GetTreeListControl: TcxCustomTreeListControl; - procedure SetOnCustomDrawBandCell(Value: TcxTreeListReportLinkCustomDrawBandCellEvent); - procedure SetOnCustomDrawCell(Value: TcxTreeListReportLinkCustomDrawCellEvent); - procedure SetOnCustomDrawFooterCell(Value: TcxTreeListReportLinkCustomDrawFooterCellEvent); - procedure SetOnCustomDrawHeaderCell(Value: TcxTreeListReportLinkCustomDrawHeaderCellEvent); - procedure SetOnCustomDrawIndentCell(Value: TcxTreeListReportLinkCustomDrawIndentCellEvent); - procedure SetOptionsExpanding(Value: TcxTreeListReportLinkOptionsExpanding); - procedure SetOptionsFormatting(Value: TcxTreeListReportLinkOptionsFormatting); - procedure SetOptionsOnEveryPage(Value: TcxTreeListReportLinkOptionsOnEveryPage); - procedure SetOptionsPagination(Value: TcxTreeListReportLinkOptionsPagination); - procedure SetOptionsPreview(Value: TcxTreeListReportLinkOptionsPreview); - procedure SetOptionsRefinements(Value: TcxTreeListReportLinkOptionsRefinements); - procedure SetOptionsSelection(Value: TcxTreeListReportLinkOptionsSelection); - procedure SetOptionsSize(Value: TcxTreeListReportLinkOptionsSize); - procedure SetOptionsView(Value: TcxTreeListReportLinkOptionsView); - procedure SetStyles(Value: TcxTreeListReportLinkStyles); - protected - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure ConvertCoords; override; - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - function GetBreakPagesByHardDelimiters: Boolean; override; - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - function GetUseHardVertDelimiters: Boolean; override; - procedure InternalRestoreFromOriginal; override; - function IsDrawFootersOnEveryPage: Boolean; override; - function IsDrawHeadersOnEveryPage: Boolean; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - procedure MakeHardDelimiters(AReportCells: TdxReportCells; AVertDelimiters: TList); override; - - function GetAreNativeStylesAvailable: Boolean; override; - function GetStylesClass: TdxCustomReportLinkStylesClass; override; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; override; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; override; - procedure PrepareConstruct; override; - - procedure DoCustomDrawBandCell(ACanvas: TCanvas; ABand: TcxTreeListBand; - AnItem: TdxReportCellImage; var ADone: Boolean); dynamic; - procedure DoCustomDrawCell(ACanvas: TCanvas; ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn; AnItem: TAbstractdxReportCellData; - var ADone: Boolean); dynamic; - procedure DoCustomDrawFooterCell(ACanvas: TCanvas; AColumn: TcxTreeListColumn; - AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawHeaderCell(ACanvas: TCanvas; AColumn: TcxTreeListColumn; - AnItem: TdxReportCellImage; var ADone: Boolean); dynamic; - procedure DoCustomDrawIndentCell(ACanvas: TCanvas; ANode: TcxTreeListNode; - AnIndex: Integer; AnItem: TAbstractdxReportCellData; var ADone: Boolean); dynamic; - procedure DoGetCustomPageBreaks; dynamic; - procedure DoInitializeBandCell(ABand: TcxTreeListBand; AnItem: TdxReportCellImage); dynamic; - procedure DoInitializeCell(ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; AnItem: TAbstractdxReportCellData); dynamic; - procedure DoInitializeFooterCell(AColumn: TcxTreeListColumn; AnItem: TdxReportCellString); dynamic; - procedure DoInitializeHeaderCell(AColumn: TcxTreeListColumn; AnItem: TdxReportCellImage); dynamic; - procedure DoInitializeIndentCell(ANode: TcxTreeListNode; AnIndex: Integer; AnItem: TAbstractdxReportCellData); dynamic; - - function GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; override; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; override; - function GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; override; - function GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; override; - function GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; override; - function GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; override; - function GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; override; - function GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; override; - function GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; override; - - procedure AddReportRow(AReportRow: TdxReportCell); - procedure AddVerticalHardDelimiter(ADelimiter: TdxReportCell); overload; - procedure AddVerticalHardDelimiter(ADelimiter: Integer); overload; - - function CreateBuilder: TcxTreeListControlReportLinkBuilder; virtual; - class function GetBuilderClass: TcxTreeListControlReportLinkBuilderClass; virtual; - - function ExtractIndentIndex(AData: Integer): Integer; - function GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; - out ADrawInfo: TcxTreeListCellCustomDrawInfo): TcxTreeListAttributeID; virtual; - function IsCustomDrawn(AnAttributeID: TcxTreeListAttributeID): Boolean; virtual; - function MakeIndentIndex(AnIndex: Integer): DWORD; - - property ActiveStyles: TcxTreeListReportLinkStyles read GetActiveStyles; - property Builder: TcxTreeListControlReportLinkBuilder read FBuilder; - property DelimitersHardVert: TList read FDelimitersHardVert; - property HostInfoServices: TcxTreeListAttributeHostInfoServices read FHostInfoServices; - property TreeListControl: TcxCustomTreeListControl read GetTreeListControl; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - procedure AddPageBreak(ANode: TcxTreeListNode); overload; - procedure AddPageBreak(const ANodes: array of TcxTreeListNode); overload; - procedure AddPageBreak(const ANodes: TcxTreeListNodeArray); overload; - procedure AddPageBreak(ANodes: TList); overload; // List of TcxCustomGridRecord - - property DesignWindow: TdxfmTreeListReportLinkDesignWindow read GetDesignWindow; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property ReportRowsByNode[Node: TcxTreeListNode]: TdxReportCell read GetReportRowByNode; - property ReportRowCount: Integer read GetReportRowCount; - published - property Color; - property Font; - property OptionsExpanding: TcxTreeListReportLinkOptionsExpanding read GetOptionsExpanding write SetOptionsExpanding; - property OptionsFormatting: TcxTreeListReportLinkOptionsFormatting read GetOptionsFormatting write SetOptionsFormatting; - property OptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage read GetOptionsOnEveryPage write SetOptionsOnEveryPage; - property OptionsPagination: TcxTreeListReportLinkOptionsPagination read GetOptionsPagination write SetOptionsPagination; - property OptionsPreview: TcxTreeListReportLinkOptionsPreview read GetOptionsPreview write SetOptionsPreview; - property OptionsRefinements: TcxTreeListReportLinkOptionsRefinements read GetOptionsRefinements write SetOptionsRefinements; - property OptionsSelection: TcxTreeListReportLinkOptionsSelection read GetOptionsSelection write SetOptionsSelection; - property OptionsSize: TcxTreeListReportLinkOptionsSize read GetOptionsSize write SetOptionsSize; - property OptionsView: TcxTreeListReportLinkOptionsView read GetOptionsView write SetOptionsView; - property ScaleFonts; - property StyleRepository; - property Styles: TcxTreeListReportLinkStyles read GetStyles write SetStyles; - property SupportedCustomDraw; - - property OnCustomDrawBandCell: TcxTreeListReportLinkCustomDrawBandCellEvent read FOnCustomDrawBandCell - write SetOnCustomDrawBandCell; - property OnCustomDrawCell: TcxTreeListReportLinkCustomDrawCellEvent read FOnCustomDrawCell - write SetOnCustomDrawCell; - property OnCustomDrawFooterCell: TcxTreeListReportLinkCustomDrawFooterCellEvent read FOnCustomDrawFooterCell - write SetOnCustomDrawFooterCell; - property OnCustomDrawHeaderCell: TcxTreeListReportLinkCustomDrawHeaderCellEvent read FOnCustomDrawHeaderCell - write SetOnCustomDrawHeaderCell; - property OnCustomDrawIndentCell: TcxTreeListReportLinkCustomDrawIndentCellEvent read FOnCustomDrawIndentCell - write SetOnCustomDrawIndentCell; - property OnGetCustomPageBreaks: TcxTreeListReportLinkGetCustomPageBreaksEvent read FOnGetCustomPageBreaks write FOnGetCustomPageBreaks; - property OnInitializeBandCell: TcxTreeListReportLinkInitializeBandCellEvent read FOnInitializeBandCell - write FOnInitializeBandCell; - property OnInitializeCell: TcxTreeListReportLinkInitializeCellEvent read FOnInitializeCell - write FOnInitializeCell; - property OnInitializeFooterCell: TcxTreeListReportLinkInitializeFooterCellEvent read FOnInitializeFooterCell - write FOnInitializeFooterCell; - property OnInitializeHeaderCell: TcxTreeListReportLinkInitializeHeaderCellEvent read FOnInitializeHeaderCell - write FOnInitializeHeaderCell; - property OnInitializeIndentCell: TcxTreeListReportLinkInitializeIndentCellEvent read FOnInitializeIndentCell - Write FOnInitializeIndentCell; - end; - - TcxTreeListReportLink = class(TcxTreeListControlReportLink) - private - function GetTreeList: TcxTreeList; - public - property TreeList: TcxTreeList read GetTreeList; - end; - - TcxDBTreeListReportLink = class(TcxTreeListControlReportLink) - private - function GetDBTreeList: TcxDBTreeList; - public - property DBTreeList: TcxDBTreeList read GetDBTreeList; - end; - - TcxVirtualTreeListReportLink = class(TcxTreeListControlReportLink) - private - function GetVirtualTreeList: TcxVirtualTreeList; - public - property VirtualTreeList: TcxVirtualTreeList read GetVirtualTreeList; - end; - - TdxfmTreeListReportLinkDesignWindow = class(TdxfmCustomcxControlReportLinkDesignWindow) - PageControl1: TPageControl; - tshView: TTabSheet; - lblShow: TLabel; - imgShow: TImage; - bvlShow: TBevel; - lblOnEveryPage: TLabel; - imgOnEveryPage: TImage; - bvlOnEveryPage: TBevel; - bvlWarningHost: TBevel; - chbxShowBands: TCheckBox; - chbxShowHeaders: TCheckBox; - chbxShowFooters: TCheckBox; - chbxShowExpandButtons: TCheckBox; - chbxBandsOnEveryPage: TCheckBox; - chbxHeadersOnEveryPage: TCheckBox; - chbxFootersOnEveryPage: TCheckBox; - chbxShowTreeLines: TCheckBox; - tshBehaviors: TTabSheet; - tshFormatting: TTabSheet; - lblLookAndFeel: TLabel; - bvlLookAndFeel: TBevel; - imgLookAndFeel: TImage; - imgRefinements: TImage; - lblRefinements: TLabel; - bvlRefinements: TBevel; - cbxLookAndFeel: TComboBox; - chbxFlatCheckMarks: TCheckBox; - chbxDisplayGraphicsAsText: TCheckBox; - chbxTransparentGraphics: TCheckBox; - tshPreview: TTabSheet; - lblPreviewOptions: TLabel; - bvlPreviewOptions: TBevel; - lblPreviewMaxLineCount: TLabel; - bvlPreviewMaxLineCountHost: TBevel; - imgPreview: TImage; - chbxPreviewVisible: TCheckBox; - chbxPreviewAutoHeight: TCheckBox; - pnlPreview: TPanel; - cxStyleRepository1: TcxStyleRepository; - styleBandHeaders: TcxStyle; - styleStandard: TcxStyle; - stylePreview: TcxStyle; - styleCardShadow: TcxStyle; - chbxSuppressBackgroundBitmaps: TCheckBox; - tshStyles: TTabSheet; - bvlStyles: TBevel; - bvlStyleSheets: TBevel; - lblStyleSheets: TLabel; - btnStyleColor: TButton; - btnStyleFont: TButton; - btnStyleBackgroundBitmap: TButton; - chbxUseNativeStyles: TCheckBox; - cbxStyleSheets: TComboBox; - btnStyleSheetNew: TButton; - btnStyleSheetCopy: TButton; - btnStyleSheetDelete: TButton; - btnStylesSaveAs: TButton; - btnStyleSheetRename: TButton; - pmStyles: TPopupMenu; - miStyleFont: TMenuItem; - miStyleColor: TMenuItem; - miStyleBackgroundBitmap: TMenuItem; - milLine: TMenuItem; - miStylesSaveAs: TMenuItem; - btnStyleBackgroundBitmapClear: TButton; - btnStyleRestoreDefaults: TButton; - miLine2: TMenuItem; - miLine3: TMenuItem; - miStyleBackgroundBitmapClear: TMenuItem; - miStyleRestoreDefaults: TMenuItem; - bvlStylesHost: TBevel; - ilStylesPopup: TImageList; - PreviewTreeList: TcxTreeList; - colManufacturerName: TcxTreeListColumn; - colManufacturerLogo: TcxTreeListColumn; - colManufacturerCountry: TcxTreeListColumn; - colCarModel: TcxTreeListColumn; - colCarIsSUV: TcxTreeListColumn; - chbxShowBorders: TCheckBox; - miStylesSelectAll: TMenuItem; - miLine4: TMenuItem; - chbxConsumeSelectionStyle: TCheckBox; - bvlRefinementsSeparator: TBevel; - Bevel2: TBevel; - pnlBehaviors: TPanel; - pnlSelection: TPanel; - lblSelection: TLabel; - imgSelection: TImage; - bvlSelection: TBevel; - chbxProcessSelection: TCheckBox; - chbxProcessExactSelection: TCheckBox; - pnlExpanding: TPanel; - lblExpanding: TLabel; - imgExpanding: TImage; - bvlExpanding: TBevel; - chbxExpandNodes: TCheckBox; - pnlSize: TPanel; - lblSize: TLabel; - bvlSize: TBevel; - imgGridSize: TImage; - chbxAutoWidth: TCheckBox; - pnlSeparators: TPanel; - lblSeparators: TLabel; - bvlSeparator: TBevel; - lblSeparatorsThickness: TLabel; - lblSeparatorsColor: TLabel; - bvlSeparatorThicknessHost: TBevel; - bvlSeparatorColorHost: TBevel; - imgSeparators: TImage; - chbxExplicitlyExpandNodes: TCheckBox; - lblPreviewWindow: TStaticText; - Label1: TLabel; - lblUseNativeStyles: TLabel; - procedure LookAndFeelChange(Sender: TObject); - procedure OptionsRefinementsClick(Sender: TObject); - procedure PreviewVisibleClick(Sender: TObject); - procedure PreviewAutoHeightClick(Sender: TObject); - procedure OptionsSelectionClick(Sender: TObject); - procedure OptionsExpandingClick(Sender: TObject); - procedure OptionsViewClick(Sender: TObject); - procedure OptionsOnEveryPageClick(Sender: TObject); - procedure OptionsSizeClick(Sender: TObject); - procedure OptionsFormattingClick(Sender: TObject); - procedure pmStylesPopup(Sender: TObject); - procedure StyleColorClick(Sender: TObject); - procedure StyleFontClick(Sender: TObject); - procedure StyleBackgroundBitmapClick(Sender: TObject); - procedure cbxStyleSheetsClick(Sender: TObject); - procedure btnStyleSheetNewClick(Sender: TObject); - procedure btnStyleSheetCopyClick(Sender: TObject); - procedure btnStyleSheetDeleteClick(Sender: TObject); - procedure btnStyleSheetRenameClick(Sender: TObject); - procedure StylesSaveAsClick(Sender: TObject); - procedure cbxStyleSheetsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure lbxStylesClick(Sender: TObject); - procedure StyleBackgroundBitmapClearClick(Sender: TObject); - procedure StyleRestoreDefaultsClick(Sender: TObject); - procedure PreviewTreeListCustomDrawCell(Sender: TObject; - Canvas: TcxCanvas; AViewInfo: TcxTreeListEditCellViewInfo; - var ADone: Boolean); - procedure PreviewTreeListCustomDrawHeader(Sender: TObject; - ACanvas: TcxCanvas; AViewInfo: TcxTreeListHeaderViewInfo; - var ADone: Boolean); - procedure PreviewTreeListCustomDrawFooterCell(Sender: TObject; - Canvas: TcxCanvas; AViewInfo: TcxTreeListFooterItemViewInfo; - var ADone: Boolean); - procedure miStylesSelectAllClick(Sender: TObject); - procedure PreviewTreeListCustomDrawBandHeader(Sender: TObject; - ACanvas: TcxCanvas; AViewInfo: TcxTreeListHeaderViewInfo; - var ADone: Boolean); - procedure PageControl1Change(Sender: TObject); - procedure cbxStyleSheetsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure lblUseNativeStylesClick(Sender: TObject); - private - lbxStyles: TdxStylesListBox; - sePreviewMaxLineCount: TdxPSSpinEdit; - seSeparatorThickness: TdxPSSpinEdit; - ccbxSeparatorColor: TdxPSColorCombo; - wpIncorrectOnEveryPageState: TdxPSWarningPane; - - function GetActiveStyle: TcxStyle; - function GetHasSelectedStyles: Boolean; - function GetHasSelectedStylesWithAssignedBitmap: Boolean; - function GetReportLink: TcxTreeListControlReportLink; - - procedure PreviewMaxLineCountChanged(Sender: TObject); - procedure SeparatorColorChanged(Sender: TObject); - procedure SeparatorThicknessChanged(Sender: TObject); - - function CanSelectAllStyles: Boolean; - procedure CreateControls; - procedure CustomDrawBorders(ACanvas: TcxCanvas; const R: TRect); - procedure CustomDrawCheckMark(ACanvas: TcxCanvas; AViewInfo: TcxTreeListEditCellViewInfo); - procedure CustomDrawFooter(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxTreeListFooterItemViewInfo); - procedure CustomDrawHeader(ACanvas: TcxCanvas; R: TRect; AViewInfo: TcxTreeListHeaderViewInfo); - procedure CustomDrawTextRect(ACanvas: TcxCanvas; R: TRect; const AText: string; - AnAlignmentHorz: TAlignment; AnAlignmentVert: TcxAlignmentVert; AParams: TcxViewParams); - function ExtractAlignmentHorz(AViewInfo: TcxTreeListEditCellViewInfo): TAlignment; - function ExtractAlignmentVert(AViewInfo: TcxTreeListEditCellViewInfo): TcxAlignmentVert; - procedure InitializePreviewTreeList; - procedure InitializePreviewTreeListStyles; - procedure LoadDataIntoPreviewTreeList; - procedure RecreateStylesListBox; - procedure RestoreSelectedStyles(AList: TList); - procedure SaveSelectedStyles(AList: TList); - procedure SetActivePage; - procedure UpdatePreviewTreeListStyles(const ACaption: string; AStyle: TcxStyle); - procedure WarningPaneUpdate; - - procedure SetOptionsExpandingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsFormattingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsOnEveryPageByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsRefinementsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsSelectionByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsSizeByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsViewByIndex(Index: Integer; Value: Boolean); - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - - function GetDesignerTabIndex: Integer; override; - procedure SetDesignerTabIndex(Value: Integer); override; - - procedure DoActiveStyleSheetChanged; override; - procedure DoFormActivated(AnActive: Boolean); override; - procedure DoRefreshStylesList; override; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); override; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); override; - - procedure GetSelectedStyleNames(AStrings: TStrings); override; - procedure GetStyleNames(out AStrings: TStrings); override; - procedure GetStyleSheetNames(out AStrings: TStrings); override; - - property ActiveStyle: TcxStyle read GetActiveStyle; - property HasSelectedStyles: Boolean read GetHasSelectedStyles; - property HasSelectedStylesWithAssignedBitmap: Boolean read GetHasSelectedStylesWithAssignedBitmap; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property ReportLink: TcxTreeListControlReportLink read GetReportLink; - end; - -const - dxPSDefaultTreeListNodeSeparatorColor: TColor = clBtnShadow; - -implementation - -{$R *.dfm} - -{ 634x420 - DesignWindow } -{.3 - chbxTransparentRichEdits } - -uses - {$IFDEF DELPHI6} - Variants, - {$ENDIF} Forms, Registry, dxThemeManager, cxDataStorage, cxDataUtils, cxTLIntf, - cxImage, cxCheckBox, dxPSGlbl, dxPSRes, dxPSImgs, cxDrawTextUtils, dxPSPopupMan, - dxPSUtl, dxBkgnd; - -const - CellSidesMap: array[TcxTreeListGridLines] of TdxCellSides = ([], csTopBottom, csLeftRight, csAll); - SortOrderMap: array[TcxDataSortOrder] of TdxCellSortOrder = (csoNone, csoUp, csoDown); - TreeLinesStyleMap: array[TcxTreeListTreeLineStyle] of TdxPSTreeLineStyle = (tlsDot, tlsDot, tlsSolid); - - DefaultExpandButtonSize = 9; - DefaultIndentWidth = 15; - ExpandButtonInteriorColors: array[Boolean] of TColor = (clWindow, clBtnShadow); - FooterItemInflateHorz = 2; - FooterItemInflateVert = 3; - - NodeIndentMask = $00000FF0; - NodeIndentOffset = $00000004; - -var - FDefaultdxPScxTreeListLinkStyleSheet: TcxTreeListReportLinkStyleSheet; - -type - TcxTreeListNodeHelperFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(Node: TcxTreeListNode): TcxTreeListNodeHelperClass; - public - class function Instance: TcxTreeListNodeHelperFactory; reintroduce; overload; - property HelperClasses[Node: TcxTreeListNode]: TcxTreeListNodeHelperClass read GetHelperClass; default; - end; - - - TcxCustomTreeListControlAccess = class(TcxCustomTreeListControl); - TcxTreeListColumnAccess = class(TcxTreeListColumn); - -{ Helpers } - -{ CustomTreeListControl Helpers } - -function CustomTreeListControl_DoIsGroupNode(AInstance: TcxCustomTreeListControl; ANode: TcxTreeListNode): Boolean; -begin - Result := TcxCustomTreeListControlAccess(AInstance).DoIsGroupNode(ANode); -end; - -function CustomTreeListControl_GetHeaderLineCount(AInstance: TcxCustomTreeListControl): Integer; -begin - Result := TcxCustomTreeListControlAccess(AInstance).HeaderLineCount; -end; - -function CustomTreeListControl_GetImages(AInstance: TcxCustomTreeListControl): TCustomImageList; -begin - Result := TcxCustomTreeListControlAccess(AInstance).Images; -end; - -function CustomTreeListControl_GetLookAndFeel(AInstance: TcxCustomTreeListControl): TcxLookAndFeel; -begin - Result := TcxCustomTreeListControlAccess(AInstance).LookAndFeel; -end; - -function CustomTreeListControl_GetLookAndFeelPainter(AInstance: TcxCustomTreeListControl): TcxCustomLookAndFeelPainterClass; -begin - Result := TcxCustomTreeListControlAccess(AInstance).LookAndFeelPainter; -end; - -function CustomTreeListControl_GetNodes(AInstance: TcxCustomTreeListControl): TcxTreeListNodes; -begin - Result := TcxCustomTreeListControlAccess(AInstance).Nodes; -end; - -function CustomTreeListControl_GetOptionsSelection(AInstance: TcxCustomTreeListControl): TcxTreeListOptionsSelection; -begin - Result := TcxCustomTreeListControlAccess(AInstance).OptionsSelection; -end; - -function CustomTreeListControl_GetOptionsView(AInstance: TcxCustomTreeListControl): TcxTreeListOptionsView; -begin - Result := TcxCustomTreeListControlAccess(AInstance).OptionsView; -end; - -function CustomTreeListControl_GetPreview(AInstance: TcxCustomTreeListControl): TcxTreeListPreview; -begin - Result := TcxCustomTreeListControlAccess(AInstance).Preview; -end; - -function CustomTreeListControl_GetStateImages(AInstance: TcxCustomTreeListControl): TCustomImageList; -begin - Result := TcxCustomTreeListControlAccess(AInstance).StateImages; -end; - -function CustomTreeListControl_GetStyles(AInstance: TcxCustomTreeListControl): TcxTreeListStyles; -begin - Result := TcxCustomTreeListControlAccess(AInstance).Styles; -end; - -function CustomTreeListControl_GetVisibleBand(AInstance: TcxCustomTreeListControl; - Index: Integer): TcxTreeListBand; -begin - Result := TcxCustomTreeListControlAccess(AInstance).VisibleBands[Index]; -end; - -function CustomTreeListControl_GetVisibleBandCount(AInstance: TcxCustomTreeListControl): Integer; -begin - Result := TcxCustomTreeListControlAccess(AInstance).VisibleBandCount; -end; - -function CustomTreeListControl_GetVisibleColumn(AInstance: TcxCustomTreeListControl; - Index: Integer): TcxTreeListColumn; -begin - Result := TcxCustomTreeListControlAccess(AInstance).VisibleColumns[Index]; -end; - -function CustomTreeListControl_GetVisibleColumnCount(AInstance: TcxCustomTreeListControl): Integer; -begin - Result := TcxCustomTreeListControlAccess(AInstance).VisibleColumnCount; -end; - -{ TreeListColumn Helpers } - -function TreeListColumn_DoGetEditProperties(AInstance: TcxTreeListColumn; - ANode: TcxTreeListNode): TcxCustomEditProperties; -begin - Result := TcxTreeListColumnAccess(AInstance).DoGetEditProperties(ANode); -end; - -{ Utilities } - -function DefaultdxPScxTreeListLinkStyleSheet: TcxTreeListReportLinkStyleSheet; - - function CreateStyle(AColor: TColor; AFontColor: TColor): TcxStyle; - begin - Result := TcxStyle.Create(DefaultdxPScxTreeListLinkStyleSheet); - with Result do - begin - Color := AColor; - Font.Name := dxPSCore.dxPSDefaultFontName; - Font.Color := AFontColor; - end; - end; - -begin - if FDefaultdxPScxTreeListLinkStyleSheet = nil then - begin - FDefaultdxPScxTreeListLinkStyleSheet := TcxTreeListReportLinkStyleSheet.Create(nil); - with FDefaultdxPScxTreeListLinkStyleSheet.Styles as TcxTreeListReportLinkStyles do - begin - BandHeader := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Content := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ContentEven := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - ContentOdd := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - Footer := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - FooterRow := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Header := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Preview := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - Selection := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - end; - end; - Result := FDefaultdxPScxTreeListLinkStyleSheet; -end; - -function IsValidPointer(const AData: Integer): Boolean; -begin - //Result := (HInstance = 0) or (FindHInstance(Pointer(AData)) = HInstance); - Result := DWORD(AData) > HInstance; -end; - -function ColumnIndex(AColumn: TcxTreeListColumn): Integer; -var - IndexedItem: IcxTreeListIndexedItem; -begin - if Supports(TObject(AColumn), IcxTreeListIndexedItem, IndexedItem) then - Result := IndexedItem.ItemIndex - else - Result := -1; -end; - -{ TcxTreeListNodeHelperFactory } - -function cxTreeListNodeHelperFactory: TcxTreeListNodeHelperFactory; -begin - Result := TcxTreeListNodeHelperFactory.Instance; -end; - -class function TcxTreeListNodeHelperFactory.Instance: TcxTreeListNodeHelperFactory; -begin - Result := inherited Instance as TcxTreeListNodeHelperFactory; -end; - -function TcxTreeListNodeHelperFactory.GetHelperClass(Node: TcxTreeListNode): TcxTreeListNodeHelperClass; -begin - Result := TcxTreeListNodeHelperClass(PairClasses[Node.ClassType]); -end; - -{ CLR Accessors } - - -{ TcxTreeListControlReportLinkRowProducer } - -constructor TcxTreeListControlReportLinkRowProducer.Create(ABuilder: TcxTreeListControlReportLinkBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TcxTreeListControlReportLinkRowProducer.Adapter: TcxTreeListControlAdapter; -begin - Result := Builder.Adapter; -end; - -function TcxTreeListControlReportLinkRowProducer.Builder: TcxTreeListControlReportLinkBuilder; -begin - Result := FBuilder; -end; - -function TcxTreeListControlReportLinkRowProducer.Formatter: TcxTreeListControlReportLinkFormatter; -begin - Result := Builder.Formatter; -end; - -function TcxTreeListControlReportLinkRowProducer.Produce(AHostInfo: TcxTreeListControlAttributeHostInfo): TdxReportCell; -begin - CalculateRowHeight; - - CreateRowHost(AHostInfo); - CreateRow; - if AutoHeight then - begin - CalculateRowAutoHeight; - FixupRowHeight; - end; - - Inc(AHostInfo.Origin.Y, RowHeight); - Result := Host; -end; - -procedure TcxTreeListControlReportLinkRowProducer.CalculateRowAutoHeight; -var - DC: HDC; - MaxRowHeight, I, V: Integer; - Item: TdxReportVisualItem; -begin - DC := Self.DC; - MaxRowHeight := 0; - for I := 0 to Row.DataItemCount - 1 do - begin - Item := Row.DataItems[I]; - if DoesItemParticipateInRowAutoHeightCalculation(Item) then - begin - V := Item.MeasureContentHeight(DC); - if MaxRowHeight < V then MaxRowHeight := V; - end; - end; - // v3.1 - for I := 0 to Row.CellCount - 1 do - begin - Item := Row.Cells[I]; - if DoesItemParticipateInRowAutoHeightCalculation(Item) then - begin - V := Item.MeasureContentHeight(DC); - if MaxRowHeight < V then MaxRowHeight := V; - end; - end; - if RowHeight < MaxRowHeight then - RowHeight := MaxRowHeight; -end; - -procedure TcxTreeListControlReportLinkRowProducer.CalculateRowHeight; -begin - FRowHeight := LineCount * LineHeight; -end; - -procedure TcxTreeListControlReportLinkRowProducer.CreateRow; -begin - FRow := TdxReportCell.Create(Host); - FRow.BoundsRect := MakeBounds(0, 0, RowWidth, RowHeight); - InitializeRow; -end; - -procedure TcxTreeListControlReportLinkRowProducer.CreateRowHost(const AHostInfo: TcxTreeListControlAttributeHostInfo); -begin - FHost := TdxReportCell.Create(AHostInfo.Parent); - FHost.BoundsRect := MakeBounds(AHostInfo.Origin.X, AHostInfo.Origin.Y, RowWidth, RowHeight); - Formatter.DoInitializeHost(Host); -end; - -function TcxTreeListControlReportLinkRowProducer.DoesItemParticipateInRowAutoHeightCalculation( - AnItem: TdxReportVisualItem): Boolean; -begin - Result := True; -end; - -procedure TcxTreeListControlReportLinkRowProducer.FixupRowDataHeight; -var - I: Integer; -begin - for I := 0 to Row.DataItemCount - 1 do - Row.DataItems[I].Height := RowHeight; - // v3.1 - for I := 0 to Row.CellCount - 1 do - Row.Cells[I].Height := RowHeight; -end; - -procedure TcxTreeListControlReportLinkRowProducer.FixupRowHeight; -begin - FixupRowItselfHeight; - FixupRowDataHeight; -end; - -procedure TcxTreeListControlReportLinkRowProducer.FixupRowItselfHeight; -begin - Host.Height := RowHeight; - Row.Height := RowHeight; -end; - -procedure TcxTreeListControlReportLinkRowProducer.InitializeRow; -begin -end; - -function TcxTreeListControlReportLinkRowProducer.GetAutoHeight: Boolean; -begin - Result := LineCount = 1; -end; - -function TcxTreeListControlReportLinkRowProducer.GetLineCount: Integer; -begin - Result := 1; -end; - -function TcxTreeListControlReportLinkRowProducer.GetLineHeight: Integer; -begin - Result := 20; -end; - -function TcxTreeListControlReportLinkRowProducer.GetDC: HDC; -begin - Result := Formatter.DC; -end; - -function TcxTreeListControlReportLinkRowProducer.GetIndentWidth: Integer; -begin - Result := Adapter.IndentWidth; -end; - -function TcxTreeListControlReportLinkRowProducer.GetRowWidth: Integer; -begin - Result := Formatter.ViewWidth; -end; - -{ TcxTreeListControlReportLinkCustomRowProducer } - -function TcxTreeListControlReportLinkCustomRowProducer.Produce(AHostInfo: TcxTreeListControlAttributeHostInfo): TdxReportCell; -begin - Result := inherited Produce(AHostInfo); - CreateItem; -end; - -procedure TcxTreeListControlReportLinkCustomRowProducer.CreateItem; -begin - FItem := GetItemClass.Create(Row); - FItem.BoundsRect := MakeRect(0, 0, RowWidth, RowHeight); - InitializeItem; -end; - -procedure TcxTreeListControlReportLinkCustomRowProducer.InitializeItem; -begin -end; - -function TcxTreeListControlReportLinkCustomRowProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxTreeListControlReportLinkCustomRowProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := TAbstractdxReportCellData; -end; - -{ TcxTreeListControlReportLinkNodeSeparatorProducer } - -procedure TcxTreeListControlReportLinkNodeSeparatorProducer.InitializeItem; -begin - inherited; - Formatter.DoInitializeNodeSeparator(Item); -end; - -procedure TcxTreeListControlReportLinkNodeSeparatorProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeNodeSeparatorRow(Row); -end; - -function TcxTreeListControlReportLinkNodeSeparatorProducer.GetItemClass: TdxReportCellDataClass; -begin - Result := Formatter.GetNodeSeparatorClass; -end; - -function TcxTreeListControlReportLinkNodeSeparatorProducer.GetLineHeight: Integer; -begin - Result := Formatter.NodeSeparatorThickness; -end; - -function TcxTreeListControlReportLinkNodeSeparatorProducer.GetItem: TdxReportCellBox; -begin - Result := TdxReportCellBox(inherited Item); -end; - -{ TcxTreeListControlReportLinkRowSubItemsProducer } - -procedure TcxTreeListControlReportLinkRowSubItemsProducer.CreateDataItems(AParent: TdxReportCell); -var - I: Integer; - Item: TAbstractdxReportCellData; -begin - for I := 0 to SubItemCount - 1 do - if HasSubItem[I] then - begin - Item := SubItemClasses[I].Create(AParent); - Item.BoundsRect := SubItemBounds[I]; - InitializeSubItem(Item, I); - end; -end; - -procedure TcxTreeListControlReportLinkRowSubItemsProducer.CreateIcons(AParent: TdxReportCell); -begin -end; - -procedure TcxTreeListControlReportLinkRowSubItemsProducer.CreateIndents(AParent: TdxReportCell); -begin -end; - -procedure TcxTreeListControlReportLinkRowSubItemsProducer.CreateRow; -begin - inherited; - CreateIndents(Row); - CreateIcons(Row); - CreateDataItems(Row); -end; - -procedure TcxTreeListControlReportLinkRowSubItemsProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin -end; - -function TcxTreeListControlReportLinkRowSubItemsProducer.GetHasSubItem(Index: Integer): Boolean; -begin - Result := True; -end; - -function TcxTreeListControlReportLinkRowSubItemsProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := MakeRect(0, 0, -1, -1); -end; - -function TcxTreeListControlReportLinkRowSubItemsProducer.GetSubItemCount: Integer; -begin - Result := Adapter.ColumnCount; -end; - -function TcxTreeListControlReportLinkRowSubItemsProducer.GetColumn(Index: Integer): TcxTreeListColumn; -begin - Result := Adapter.Columns[Index]; -end; - -{ TcxTreeListControlReportLinkBandsProducer } - -function TcxTreeListControlReportLinkBandsProducer.GetSubItemCount: Integer; -begin - Result := Adapter.BandCount; -end; - -procedure TcxTreeListControlReportLinkBandsProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeBandRow(Row); -end; - -procedure TcxTreeListControlReportLinkBandsProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - inherited; - Formatter.DoInitializeBandItem(ASubItem, AnIndex); - Formatter.DoReportLinkInitializeBandItem(ASubItem, AnIndex); -end; - -function TcxTreeListControlReportLinkBandsProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxTreeListControlReportLinkBandsProducer.GetLineCount: Integer; -begin - Result := Adapter.BandLineCount; -end; - -function TcxTreeListControlReportLinkBandsProducer.GetLineHeight: Integer; -begin - Result := Formatter.BandLineHeight; -end; - -function TcxTreeListControlReportLinkBandsProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetBandItemBounds(Index); -end; - -function TcxTreeListControlReportLinkBandsProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetBandItemClass(Index); -end; - -{ TcxTreeListControlReportLinkFootersProducer } - -procedure TcxTreeListControlReportLinkFootersProducer.CalculateRowHeight; -begin - if AutoHeight then - inherited - else - RowHeight := LineCount * LineHeight; -end; - -procedure TcxTreeListControlReportLinkFootersProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeFooterRow(Row); -end; - -procedure TcxTreeListControlReportLinkFootersProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - inherited; - Formatter.DoInitializeFooterItem(ASubItem, AnIndex); - Formatter.DoReportLinkInitializeFooterItem(ASubItem, AnIndex); -end; - -function TcxTreeListControlReportLinkFootersProducer.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxTreeListControlReportLinkFootersProducer.GetHasSubItem(Index: Integer): Boolean; -begin - Result := Adapter.HasFooterItem[Index]; -end; - -function TcxTreeListControlReportLinkFootersProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TcxTreeListControlReportLinkFootersProducer.GetLineHeight: Integer; -begin - Result := Formatter.FooterLineHeight; -end; - -function TcxTreeListControlReportLinkFootersProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetFooterItemBounds(Index); -end; - -function TcxTreeListControlReportLinkFootersProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetFooterItemClass(Index); -end; - -{ TcxTreeListControlReportLinkHeadersProducer } - -procedure TcxTreeListControlReportLinkHeadersProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeHeaderRow(Row); -end; - -procedure TcxTreeListControlReportLinkHeadersProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - inherited; - Formatter.DoInitializeHeaderItem(ASubItem, AnIndex); - Formatter.DoReportLinkInitializeHeaderItem(ASubItem, AnIndex); -end; - -function TcxTreeListControlReportLinkHeadersProducer.GetAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.HeaderAutoHeight; -end; - -function TcxTreeListControlReportLinkHeadersProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TcxTreeListControlReportLinkHeadersProducer.GetLineHeight: Integer; -begin - Result := Formatter.HeaderLineHeight; -end; - -function TcxTreeListControlReportLinkHeadersProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetHeaderItemBounds(Index); -end; - -function TcxTreeListControlReportLinkHeadersProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetHeaderItemClass(Index); -end; - -{ TcxTreeListControlReportLinkNodeProducer } - -constructor TcxTreeListControlReportLinkNodeProducer.Create(ABuilder: TcxTreeListControlReportLinkBuilder); -begin - inherited; - FIndents := TList.Create; -end; - -destructor TcxTreeListControlReportLinkNodeProducer.Destroy; -begin - FIndents.Free; - inherited; -end; - -function TcxTreeListControlReportLinkNodeProducer.Produce(AHostInfo: TcxTreeListControlAttributeHostInfo; - ANode: TcxTreeListNode): TdxReportCell; -begin - FIndents.Clear; - FNode := ANode; - Result := inherited Produce(AHostInfo); - FNode := nil; -end; - -function TcxTreeListControlReportLinkNodeProducer.Node: TcxTreeListNode; -begin - Result := FNode; -end; - -procedure TcxTreeListControlReportLinkNodeProducer.CalculateRowAutoHeight; -begin - if CellAutoHeight then - inherited CalculateRowAutoHeight; - if PreviewItem <> nil then - RowHeight := RowHeight + PreviewItem.Height; -end; - -procedure TcxTreeListControlReportLinkNodeProducer.CreateDataItems(AParent: TdxReportCell); -begin - inherited; - if HasPreview then CreatePreview(AParent); -end; - -procedure TcxTreeListControlReportLinkNodeProducer.CreateIcons(AParent: TdxReportCell); -begin - if Adapter.HasStateImages(Node) then CreateStateImages(AParent); - if Adapter.HasImages(Node) then CreateImages(AParent); -end; - -procedure TcxTreeListControlReportLinkNodeProducer.CreateImages(AParent: TdxReportCell); -begin - FImage := Formatter.GetNodeImageClass.Create(AParent); - FImage.BoundsRect := ImageRect; - InitializeImage(ImageIndentIndex); -end; - -procedure TcxTreeListControlReportLinkNodeProducer.CreateIndents(AParent: TdxReportCell); -var - I: Integer; - Indent: TdxReportCellExpandButton; -begin - inherited; - for I := 0 to IndentCount - 1 do - begin - Indent := Formatter.GetNodeIndentClass.Create(AParent); - Indent.BoundsRect := IndentBounds[I]; - InitializeIndent(Indent, I); - FIndents.Add(Indent); - end; -end; - -procedure TcxTreeListControlReportLinkNodeProducer.CreatePreview(AParent: TdxReportCell); -begin - FPreviewItem := Formatter.GetPreviewClass(PreviewColumn, Node).Create(AParent); - PreviewItem.Left := PreviewIndent; - // We have to set Width before because we use this value for PreviewHeight calculation - PreviewItem.Width := RowWidth - PreviewItem.Left; - Formatter.DoInitializePreview(FPreviewItem, PreviewColumn, Node); // v3.1 because cxRichEdit - PreviewItem.Height := PreviewHeight; - PreviewItem.AdjustContent(Formatter.DC); // v3.1 -end; - -procedure TcxTreeListControlReportLinkNodeProducer.CreateStateImages(AParent: TdxReportCell); -begin - FStateImage := Formatter.GetNodeStateImageClass.Create(AParent); - FStateImage.BoundsRect := StateImageRect; - InitializeStateImage(StateImageIndentIndex); -end; - -function TcxTreeListControlReportLinkNodeProducer.DoesItemParticipateInRowAutoHeightCalculation( - AnItem: TdxReportVisualItem): Boolean; -var - Column: TcxTreeListColumn; - Properties: TcxCustomEditProperties; -begin - Result := AnItem <> FPreviewItem; - // v3.2 - if Result and not IsItemIndent(AnItem) and IsDelphiObject(AnItem.Data) then - begin - Column := TcxTreeListColumn(AnItem.Data); - Properties := Adapter.GetProperties(Column, Node); - Result := dxPScxCommon.dxPSDataMaps.DoesItemParticipateInAutoHeightCalculation(Properties); - end; -end; - -procedure TcxTreeListControlReportLinkNodeProducer.FixupRowDataHeight; -var - NewHeight, I: Integer; - Item: TdxReportVisualItem; -begin - NewHeight := RowHeight; - if PreviewItem <> nil then - Dec(NewHeight, PreviewItem.Height); - - for I := 0 to Row.DataItemCount - 1 do - begin - Item := Row.DataItems[I]; - if Item = PreviewItem then - if PreviewPlace = tlppTop then - Item.Top := 0 - else - Item.Top := NewHeight - else - if IsItemIndent(Item) or (Item = StateImage) or (Item = Image) then - begin - Item.Top := 0; - Item.Height := RowHeight; - end - else - begin - if CellAutoHeight then - Item.Height := NewHeight; - if HasPreview and (PreviewPlace = tlppTop) then - Item.Top := Item.Top + PreviewItem.Height; - end; - end; - // v3.1 - for I := 0 to Row.CellCount - 1 do - begin - Item := Row.Cells[I]; - if Item = PreviewItem then - if PreviewPlace = tlppTop then - Item.Top := 0 - else - Item.Top := NewHeight - else - begin - if CellAutoHeight then - Item.Height := NewHeight; - if HasPreview and (PreviewPlace = tlppTop) then - Item.Top := Item.Top + PreviewItem.Height; - end; - end; -end; - -procedure TcxTreeListControlReportLinkNodeProducer.InitializeImage(AnIndex: Integer); -begin - Formatter.DoInitializeNodeImage(Image, Node, AnIndex); -end; - -procedure TcxTreeListControlReportLinkNodeProducer.InitializeIndent(AnIndent: TdxReportCellExpandButton; - AnIndex: Integer); -begin - Formatter.DoInitializeNodeIndent(AnIndent, AnIndex, IndentCount, Node); - Formatter.DoReportLinkInitializeNodeIndent(AnIndent, AnIndex, IndentCount, Node); -end; - -procedure TcxTreeListControlReportLinkNodeProducer.InitializeRow; -begin - inherited; - Formatter.DoInitializeNodeRow(Row, FNode); -end; - -procedure TcxTreeListControlReportLinkNodeProducer.InitializeStateImage(AnIndex: Integer); -begin - Formatter.DoInitializeNodeStateImage(StateImage, Node, AnIndex); - Formatter.DoReportLinkInitializeNodeStateImage(StateImage, Node, AnIndex); -end; - -procedure TcxTreeListControlReportLinkNodeProducer.InitializeSubItem(ASubItem: TAbstractdxReportCellData; - AnIndex: Integer); -begin - inherited; - Formatter.DoInitializeNodeItem(ASubItem, Columns[AnIndex], Node, False); - Formatter.DoReportLinkInitializeNodeItem(ASubItem, Columns[AnIndex], Node); -end; - -function TcxTreeListControlReportLinkNodeProducer.IsItemIndent(AnItem: TdxReportVisualItem): Boolean; -begin - Result := FIndents.IndexOf(AnItem) <> -1; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetAutoHeight: Boolean; -begin - Result := CellAutoHeight or HasPreview; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetCellAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and Adapter.CellAutoHeight; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetHasPreview: Boolean; -begin - Result := Formatter.HasPreview; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetImageRect: TRect; -begin - Result := MakeBounds(IndentWidth * IndentCount, 0, Adapter.GetImagesWidth(Node), RowHeight); - OffsetRect(Result, Adapter.GetStateImagesWidth(Node), 0); -end; - -function TcxTreeListControlReportLinkNodeProducer.GetIndentCount: Integer; -begin - Result := Formatter.IndentCounts[Node]; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetLineCount: Integer; -begin - Result := Adapter.DetailsLineCount; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetLineHeight: Integer; -begin - Result := Formatter.DetailsLineHeight; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetPreviewHeight: Integer; -begin - Result := PreviewLineCount * PreviewLineHeight; - if not (Formatter.PreviewAutoHeight and (Formatter.PreviewMaxLineCount = 0)) then - Inc(Result, 2 * dxTextSpace); -end; - -function TcxTreeListControlReportLinkNodeProducer.GetPreviewIndent: Integer; -begin - Result := IndentArea + Adapter.GetStateImagesWidth(Node) + Adapter.GetImagesWidth(Node); -end; - -function TcxTreeListControlReportLinkNodeProducer.GetPreviewLineCount: Integer; -begin - if FPreviewItem <> nil then - if not Formatter.PreviewAutoHeight then - begin - Result := PreviewItem.CalculateLineCount(Formatter.DC); - if Result <> Formatter.PreviewMaxLineCount then - Result := Formatter.PreviewMaxLineCount; - end - else - Result := 1 - else - Result := 0; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetPreviewLineHeight: Integer; -var - LineHeight: Integer; -begin - if FPreviewItem <> nil then - if Formatter.PreviewAutoHeight then - begin - Result := PreviewItem.MeasureContentHeight(Formatter.DC); - if Formatter.PreviewMaxLineCount <> 0 then - begin - LineHeight := PreviewItem.MeasureFontHeight(Formatter.DC) - 2 * dxTextSpace; - if Result > LineHeight * Formatter.PreviewMaxLineCount then - Result := LineHeight * Formatter.PreviewMaxLineCount; - end; - end - else - Result := PreviewItem.MeasureFontHeight(Formatter.DC) - 2 * dxTextSpace - else - Result := 0; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetStateImageRect: TRect; -begin - Result := MakeBounds(IndentWidth * IndentCount, 0, Adapter.GetStateImagesWidth(Node), RowHeight); -end; - -function TcxTreeListControlReportLinkNodeProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := Formatter.GetNodeItemBounds(Node, Index, IndentCount); -end; - -function TcxTreeListControlReportLinkNodeProducer.GetSubItemClass(Index: Integer): TdxReportCellDataClass; -begin - Result := Formatter.GetNodeItemClass(Columns[Index], Node, False); -end; - -function TcxTreeListControlReportLinkNodeProducer.GetImageIndentIndex: Integer; -begin - Result := IndentCount; - if Adapter.HasStateImages(Node) then Inc(Result); -end; - -function TcxTreeListControlReportLinkNodeProducer.GetIndent(Index: Integer): TdxReportCellExpandButton; -begin - Result := FIndents[Index]; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetIndentArea: Integer; -begin - Result := IndentCount * IndentWidth; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetIndentBound(Index: Integer): TRect; -begin - Result := MakeBounds(IndentWidth * Index, 0, IndentWidth, RowHeight); -end; - -function TcxTreeListControlReportLinkNodeProducer.GetPreviewColumn: TcxTreeListColumn; -begin - Result := Adapter.PreviewColumn; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetPreviewPlace: TcxTreeListPreviewPlace; -begin - Result := Adapter.PreviewPlace; -end; - -function TcxTreeListControlReportLinkNodeProducer.GetStateImageIndentIndex: Integer; -begin - Result := IndentCount; -end; - -{ TcxTreeListControlReportLinkCategorizedNodeProducer } - -function TcxTreeListControlReportLinkCategorizedNodeProducer.GetSubItemBound(Index: Integer): TRect; -begin - Result := MakeRect(IndentWidth * IndentCount + Adapter.GetImagesWidth(Node) + - Adapter.GetStateImagesWidth(Node), 0, RowWidth, RowHeight); -end; - -function TcxTreeListControlReportLinkCategorizedNodeProducer.GetSubItemCount: Integer; -begin - Result := 1; -end; - -procedure TcxTreeListControlReportLinkCategorizedNodeProducer.InitializeSubItem( - ASubItem: TAbstractdxReportCellData; AnIndex: Integer); -begin - AnIndex := Adapter.CategorizedColumn.VisibleIndex; - inherited InitializeSubItem(ASubItem, AnIndex); -end; - -{ TcxTreeListNodeHelper } - -constructor TcxTreeListNodeHelper.Create(AnAdapter: TcxTreeListControlAdapter); -begin - inherited Create; - FAdapter := AnAdapter; -end; - -class function TcxTreeListNodeHelper.PairClass: TClass; -begin - Result := NodeClass; -end; - -class function TcxTreeListNodeHelper.ProducerClass: TcxTreeListControlReportLinkNodeProducerClass; -begin - Result := TcxTreeListControlReportLinkNodeProducer; -end; - -class procedure TcxTreeListNodeHelper.Register; -begin - cxTreeListNodeHelperFactory.Register(Self); -end; - -class procedure TcxTreeListNodeHelper.Unregister; -begin - cxTreeListNodeHelperFactory.Unregister(Self); -end; - -function TcxTreeListNodeHelper.Adapter: TcxTreeListControlAdapter; -begin - Result := FAdapter; -end; - -function TcxTreeListNodeHelper.GetHasSelectedChildren: Boolean; -var - SaveNode: TcxTreeListNode; - I: Integer; -begin - Result := True; - SaveNode := Node; - try - with Node do - for I := 0 to Count - 1 do - begin - Node := Items[I]; - if Node.Selected or Adapter.Helpers[Node].HasSelectedChildren then Exit; - end; - finally - Node := SaveNode; - end; - Result := False; -end; - -function TcxTreeListNodeHelper.GetHasSelectedParents: Boolean; -var - Parent: TcxTreeListNode; -begin - Parent := Node; - while (Parent <> nil) and not Parent.Selected do - Parent := Parent.Parent; - Result := Parent <> nil; -end; - -class function TcxTreeListNodeHelper.NodeClass: TcxTreeListNodeClass; -begin - Result := TcxTreeListNode; -end; - -{ TcxTreeListNodeHelperCache } - -constructor TcxTreeListNodeHelperCache.Create(AnAdapter: TcxTreeListControlAdapter); -begin - inherited Create; - FAdapter := AnAdapter; -end; - -function TcxTreeListNodeHelperCache.IndexOf(Node: TcxTreeListNode): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].NodeClass = Node.ClassType then Exit; - - Result := Add(cxTreeListNodeHelperFactory.HelperClasses[Node].Create(Adapter)); -end; - -function TcxTreeListNodeHelperCache.GetHelper(Node: TcxTreeListNode): TcxTreeListNodeHelper; -begin - Result := Items[IndexOf(Node)]; - Result.Node := Node; -end; - -function TcxTreeListNodeHelperCache.GetItem(Index: Integer): TcxTreeListNodeHelper; -begin - Result := TcxTreeListNodeHelper(inherited Items[Index]); -end; - -{ TcxTreeListControlReportLinkProducerCache } - -constructor TcxTreeListControlReportLinkProducerCache.Create(ABuilder: TcxTreeListControlReportLinkBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TcxTreeListControlReportLinkProducerCache.IndexOf(AProducerClass: TcxTreeListControlReportLinkRowProducerClass): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].ClassType = AProducerClass then Exit; - - Result := Add(AProducerClass.Create(Builder)); -end; - -function TcxTreeListControlReportLinkProducerCache.GetProducer(ProducerClass: TcxTreeListControlReportLinkRowProducerClass): TcxTreeListControlReportLinkRowProducer; -begin - Result := Items[IndexOf(ProducerClass)]; -end; - -function TcxTreeListControlReportLinkProducerCache.GetItem(Index: Integer): TcxTreeListControlReportLinkRowProducer; -begin - Result := TcxTreeListControlReportLinkRowProducer(inherited Items[Index]); -end; - -{ TcxTreeListControlReportLinkBuilder } - -constructor TcxTreeListControlReportLinkBuilder.Create(AReportLink: TcxTreeListControlReportLink); -begin - inherited Create; - FReportLink := AReportLink; - FAdapter := AdapterClass.Create(Self); - FFormatter := FormatterClass.Create(Self); - FProducerCache := TcxTreeListControlReportLinkProducerCache.Create(Self); - FReportRows := TList.Create; - Adapter.Calculate(AvailableWidth, AutoWidth); -end; - -destructor TcxTreeListControlReportLinkBuilder.Destroy; -begin - FreeAndNil(FReportRows); - FreeAndNil(FProducerCache); - FreeAndNil(FFormatter); - FreeAndNil(FAdapter); - inherited; -end; - -procedure TcxTreeListControlReportLinkBuilder.Build; -begin - BeforeBuilding; - try - DoBuild; - finally - AfterBuilding; - end; -end; - -procedure TcxTreeListControlReportLinkBuilder.Progress(const APercentDone: Double); -begin - ReportLink.DoProgress(APercentDone); -end; - -function TcxTreeListControlReportLinkBuilder.Adapter: TcxTreeListControlAdapter; -begin - Result := FAdapter; -end; - -class function TcxTreeListControlReportLinkBuilder.AdapterClass: TcxTreeListControlAdapterClass; -begin - Result := TcxTreeListControlAdapter; -end; - -function TcxTreeListControlReportLinkBuilder.Formatter: TcxTreeListControlReportLinkFormatter; -begin - Result := FFormatter; -end; - -class function TcxTreeListControlReportLinkBuilder.FormatterClass: TcxTreeListControlReportLinkFormatterClass; -begin - Result := TcxTreeListControlReportLinkFormatter; -end; - -procedure TcxTreeListControlReportLinkBuilder.AddReportRow(ARow: TdxReportCell); -begin - if ARow.Parent = ReportLink.ReportCells.Cells then - FReportRows.Add(ARow); -end; - -procedure TcxTreeListControlReportLinkBuilder.AfterBuilding; -begin - Formatter.AfterBuilding; - Adapter.AfterBuilding; -end; - -procedure TcxTreeListControlReportLinkBuilder.BeforeBuilding; -begin - Adapter.BeforeBuilding; - Formatter.BeforeBuilding; -end; - -procedure TcxTreeListControlReportLinkBuilder.CreateBands; -begin - AddReportRow(GetBandsProducer.Produce(ReportLink.HostInfoServices.BandHeadersHostInfo)); -end; - -function TcxTreeListControlReportLinkBuilder.GetBandsProducer: TcxTreeListControlReportLinkBandsProducer; -begin - Result := ProducerCache[GetBandsProducerClass] as TcxTreeListControlReportLinkBandsProducer; -end; - -function TcxTreeListControlReportLinkBuilder.GetBandsProducerClass: TcxTreeListControlReportLinkBandsProducerClass; -begin - Result := TcxTreeListControlReportLinkBandsProducer; -end; - -procedure TcxTreeListControlReportLinkBuilder.CreateFooters; -begin - AddReportRow(GetFootersProducer.Produce(ReportLink.HostInfoServices.FootersHostInfo)); -end; - -function TcxTreeListControlReportLinkBuilder.GetFootersProducer: TcxTreeListControlReportLinkFootersProducer; -begin - Result := ProducerCache[GetFootersProducerClass] as TcxTreeListControlReportLinkFootersProducer; -end; - -function TcxTreeListControlReportLinkBuilder.GetFootersProducerClass: TcxTreeListControlReportLinkFootersProducerClass; -begin - Result := TcxTreeListControlReportLinkFootersProducer; -end; - -procedure TcxTreeListControlReportLinkBuilder.CreateHeaders; -begin - AddReportRow(GetHeadersProducer.Produce(ReportLink.HostInfoServices.HeadersHostInfo)); -end; - -function TcxTreeListControlReportLinkBuilder.GetHeadersProducer: TcxTreeListControlReportLinkHeadersProducer; -begin - Result := ProducerCache[GetHeadersProducerClass] as TcxTreeListControlReportLinkHeadersProducer; -end; - -function TcxTreeListControlReportLinkBuilder.GetHeadersProducerClass: TcxTreeListControlReportLinkHeadersProducerClass; -begin - Result := TcxTreeListControlReportLinkHeadersProducer; -end; - -procedure TcxTreeListControlReportLinkBuilder.CreateNode(ANode: TcxTreeListNode); -begin - AddReportRow(GetNodeProducer(ANode).Produce(ReportLink.HostInfoServices.PageDetailsHostInfo, ANode)); -end; - -procedure TcxTreeListControlReportLinkBuilder.CreateNodes; -var - HasNodeSeparator: Boolean; - I: Integer; - Node: TcxTreeListNode; -begin - HasNodeSeparator := Formatter.HasNodeSeparator; - for I := 0 to Formatter.NodeCount - 1 do - begin - Node := Formatter.Nodes[I]; - CreateNode(Node); - if HasNodeSeparator and (I < Formatter.NodeCount - 1) then - CreateNodeSeparator(Node); - - Progress(100 * (I + 1) / Formatter.NodeCount); - if IsAborted then Break; - end; -end; - -function TcxTreeListControlReportLinkBuilder.GetNodeProducer(ANode: TcxTreeListNode): TcxTreeListControlReportLinkNodeProducer; -begin - Result := ProducerCache[GetNodeProducerClass(ANode)] as TcxTreeListControlReportLinkNodeProducer; -end; - -function TcxTreeListControlReportLinkBuilder.GetNodeProducerClass(ANode: TcxTreeListNode): TcxTreeListControlReportLinkNodeProducerClass; -begin - if Adapter.IsGroupNode(ANode) then - Result := TcxTreeListControlReportLinkCategorizedNodeProducer - else - Result := Adapter.Helpers[ANode].ProducerClass; -end; - -procedure TcxTreeListControlReportLinkBuilder.CreateNodeSeparator(ANode: TcxTreeListNode); -begin - AddReportRow(GetNodeSeparatorProducer.Produce(ReportLink.HostInfoServices.PageDetailsHostInfo)); -end; - -function TcxTreeListControlReportLinkBuilder.GetNodeSeparatorProducer: TcxTreeListControlReportLinkNodeSeparatorProducer; -begin - Result := ProducerCache[GetNodeSeparatorProducerClass] as TcxTreeListControlReportLinkNodeSeparatorProducer; -end; - -function TcxTreeListControlReportLinkBuilder.GetNodeSeparatorProducerClass: TcxTreeListControlReportLinkNodeSeparatorProducerClass; -begin - Result := TcxTreeListControlReportLinkNodeSeparatorProducer; -end; - -procedure TcxTreeListControlReportLinkBuilder.DoBuild; -begin - if Formatter.ShowBandHeaders then CreateBands; - if Formatter.ShowHeaders then CreateHeaders; - CreateNodes; - - if not IsAborted and Formatter.ShowFooters then - CreateFooters; -end; - -function TcxTreeListControlReportLinkBuilder.IsAborted: Boolean; -begin - Result := ReportLink.AbortBuilding; -end; - -function TcxTreeListControlReportLinkBuilder.GetAutoWidth: Boolean; -begin - Result := ReportLink.OptionsSize.AutoWidth; -end; - -function TcxTreeListControlReportLinkBuilder.GetAvailableWidth: Integer; -var - ControllerIntf: IdxReportLinkController; - R: TRect; -begin - if Formatter.AutoWidth then - if ReportLink.IsAggregated and - Supports(TObject(ReportLink.Controller), IdxReportLinkController, ControllerIntf) then - R := ControllerIntf.GetControlSiteBounds(ReportLink.TreeListControl) - else - R := ReportLink.RealPrinterPage.PaintRectPixels - else - R := TreeListControl.ClientBounds; - - Result := R.Right - R.Left - 1; -end; - -function TcxTreeListControlReportLinkBuilder.GetHost: TdxReportCell; -begin - Result := ReportLink.ReportCells.Cells; -end; - -function TcxTreeListControlReportLinkBuilder.GetReportCells: TdxReportCells; -begin - Result := ReportLink.ReportCells; -end; - -function TcxTreeListControlReportLinkBuilder.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := TdxReportCell(FReportRows[Index]); -end; - -function TcxTreeListControlReportLinkBuilder.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TcxTreeListControlReportLinkBuilder.GetTreeListControl: TcxCustomTreeListControl; -begin - Result := ReportLink.TreeListControl; -end; - -{ TcxTreeListReportLinkBuilderHandler } - -constructor TcxTreeListReportLinkBuilderHandler.Create(ABuilder: TcxTreeListControlReportLinkBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TcxTreeListReportLinkBuilderHandler.Builder: TcxTreeListControlReportLinkBuilder; -begin - Result := FBuilder; -end; - -function TcxTreeListReportLinkBuilderHandler.GetReportLink: TcxTreeListControlReportLink; -begin - Result := Builder.ReportLink; -end; - -{ TcxTreeListControlAdapter } - -constructor TcxTreeListControlAdapter.Create(ABuilder: TcxTreeListControlReportLinkBuilder); -begin - inherited; - FHelperCache := TcxTreeListNodeHelperCache.Create(Self); - FBandLineCount := 1; - FDetailsLineCount := 1; - FFooterLineCount := 1; -end; - -destructor TcxTreeListControlAdapter.Destroy; -begin - FreeAndNil(FHelperCache); - inherited; -end; - -procedure TcxTreeListControlAdapter.AfterBuilding; -begin -end; - -procedure TcxTreeListControlAdapter.BeforeBuilding; -begin -end; - -procedure TcxTreeListControlAdapter.AfterCalculate; -begin -end; - -procedure TcxTreeListControlAdapter.BeforeCalculate; -begin - SetLength(FBandPlaces, 0); - SetLength(FBandWidths, 0); - SetLength(FColumnPlaces, 0); - SetLength(FColumnWidths, 0); -end; - -procedure TcxTreeListControlAdapter.Calculate(AAvailableWidth: Integer; AnAutoWidth: Boolean); -begin - AvailableWidth := AAvailableWidth; - AutoWidth := AnAutoWidth; - - BeforeCalculate; - try - DoCalculate; - finally - AfterCalculate; - end; -end; - -procedure TcxTreeListControlAdapter.CalculateBandPlaces; -var - I, Origin: Integer; -begin - SetLength(FBandPlaces, BandCount); - - Origin := 0; - for I := 0 to BandCount - 1 do - begin - FBandPlaces[I] := MakeRect(Origin, 0, BandWidths[I], 0); - Inc(Origin, BandWidths[I]); - end -end; - -procedure TcxTreeListControlAdapter.CalculateBandWidths; -var - I: Integer; -begin - SetLength(FBandWidths, BandCount); - - for I := 0 to BandCount - 1 do - if AutoWidth then - FBandWidths[I] := Bands[I].DisplayWidth - else - FBandWidths[I] := Bands[I].Width; -end; - -procedure TcxTreeListControlAdapter.CalculateColumnPlaces; -var - BandIndex, RowIndex, ColIndex, BandOrigin, ColumnOrigin, ColumnWidth: Integer; - BandRows: TcxTreeListBandRows; - BandRow: TcxTreeListBandRow; - Column: TcxTreeListColumn; -begin - SetLength(FColumnPlaces, ColumnCount); - SetLength(FBandPlaces, BandCount); - - for BandIndex := 0 to BandCount - 1 do - begin - BandOrigin := BandOrigins[BandIndex]; - BandRows := Bands[BandIndex].BandRows; - for RowIndex := 0 to BandRows.Count - 1 do - begin - ColumnOrigin := BandOrigin; - BandRow := BandRows.Items[RowIndex]; - for ColIndex := 0 to BandRow.Count - 1 do - begin - Column := BandRow.Items[ColIndex]; - ColumnWidth := ColumnWidths[Column.VisibleIndex]; - with FColumnPlaces[Column.VisibleIndex] do - begin - Left := ColumnOrigin; - Right := ColumnOrigin + ColumnWidth; - RowIndex := BandRow.LineOffset;//Index; //TODO: BandRow.VisibleIndex; - LineCount := Column.Position.LineCount; - end; - Inc(ColumnOrigin, ColumnWidth); - end; - end; - FBandPlaces[BandIndex] := MakeBounds(BandOrigin, 0, BandWidths[BandIndex], 0); - end; -end; - -procedure TcxTreeListControlAdapter.CalculateColumnWidths; - - procedure CalculateBandWidths; - - procedure CalculateBandWidths(ABand: TcxTreeListBand; var AMinWidth, AWidth: Integer); - var - RowMinWidth, RowWidth, RowIndex, ColIndex: Integer; - NeedCalculateWidth: Boolean; - Row: TcxTreeListBandRow; - Column: TcxTreeListColumn; - begin - AMinWidth := 0; - AWidth := ABand.Width; - NeedCalculateWidth := AWidth = 0;//cxTL.cxTreeListDefWidth; //TODO: CalculateBandWidths !? - - if ABand.BandRows.Count <> 0 then - begin - for RowIndex := 0 to ABand.BandRows.Count - 1 do - begin - Row := ABand.BandRows.Items[RowIndex]; - - RowMinWidth := 0; - RowWidth := 0; - for ColIndex := 0 to Row.Count - 1 do - begin - Column := Row.Items[ColIndex]; - //Inc(RowMinWidth, Column.MinWidth); - //if Column.IsLeftMost then - // Inc(RowMinWidth, IndentWidth); - Inc(RowMinWidth, Column.RealMinWidth); - if NeedCalculateWidth then - Inc(RowWidth, Column.DisplayWidth); // TODO: GetColumnWidth - end; - - if RowMinWidth > AMinWidth then AMinWidth := RowMinWidth; - if RowWidth > AWidth then AWidth := RowWidth; - end; - if AWidth < AMinWidth then AWidth := AMinWidth; - end - else - if NeedCalculateWidth then AWidth := cxTL.cxTreeListDefWidth; - end; - - procedure AssignBandWidths; - var - I, MinWidth, Width: Integer; - begin - for I := 0 to BandCount - 1 do - begin - CalculateBandWidths(Bands[I], MinWidth, Width); - FBandWidths[I] := Width; - end; - end; - - procedure CalculateBandAutoWidths; - var - AutoWidthObject: cxClasses.TcxAutoWidthObject; - I, MinWidthValue, WidthValue: Integer; - Band: TcxTreeListBand; - AutoWidthItem: cxClasses.TcxAutoWidthItem; - begin - AutoWidthObject := cxClasses.TcxAutoWidthObject.Create(BandCount); - try - for I := 0 to BandCount - 1 do - begin - Band := Bands[I]; - CalculateBandWidths(Band, MinWidthValue, WidthValue); - AutoWidthItem := AutoWidthObject.AddItem; - with AutoWidthItem do - begin - Width := WidthValue; - MinWidth := MinWidthValue; - Fixed := not Band.Options.Sizing; - end; - end; - AutoWidthObject.AvailableWidth := AvailableWidth; - AutoWidthObject.Calculate; - for I := 0 to BandCount - 1 do - FBandWidths[I]:= AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; - end; - - begin - if AutoWidth or OptionsView.ColumnAutoWidth then - CalculateBandAutoWidths - else - AssignBandWidths; - end; - - procedure CalculateBandColumnWidths; - - procedure CalculateBandRowColumnWidths(ABand: TcxTreeListBand; ABandWidth: Integer; - ABandRow: TcxTreeListBandRow); - var - AutoWidthObject: cxClasses.TcxAutoWidthObject; - I, ColumnIndex: Integer; - AutoWidthItem: cxClasses.TcxAutoWidthItem; - begin - AutoWidthObject := cxClasses.TcxAutoWidthObject.Create(ABandRow.Count); - try - for I := 0 to ABandRow.Count - 1 do - begin - AutoWidthItem := AutoWidthObject.AddItem; - with ABandRow.Items[I] do - begin - AutoWidthItem.Width := ABandRow.Items[I].DisplayWidth; - AutoWidthItem.MinWidth := ABandRow.Items[I].RealMinWidth; - AutoWidthItem.Fixed := ABand.FixedKind <> tlbfNone; - end; - end; - AutoWidthObject.AvailableWidth := ABandWidth; - AutoWidthObject.Calculate; - - for I := 0 to ABandRow.Count - 1 do - begin - ColumnIndex := ABandRow.Items[I].VisibleIndex; - FColumnWidths[ColumnIndex]:= AutoWidthObject[I].AutoWidth; - end; - finally - AutoWidthObject.Free; - end; - end; - - var - BandIndex, RowIndex, BandWidth: Integer; - Band: TcxTreeListBand; - begin - for BandIndex := 0 to BandCount - 1 do - begin - BandWidth := BandWidths[BandIndex]; - Band := Bands[BandIndex]; - for RowIndex := 0 to Band.BandRows.Count - 1 do - CalculateBandRowColumnWidths(Band, BandWidth, Band.BandRows.Items[RowIndex]); - end; - end; - -begin - SetLength(FBandWidths, BandCount); - SetLength(FColumnWidths, ColumnCount); - - CalculateBandWidths; - CalculateBandColumnWidths; -end; - -procedure TcxTreeListControlAdapter.CalculateLineCounts; -begin - BandLineCount := OptionsView.BandLineCount; - DetailsLineCount := CustomTreeListControl_GetHeaderLineCount(TreeListControl); - FooterLineCount := CustomTreeListControl_GetHeaderLineCount(TreeListControl); -end; - -procedure TcxTreeListControlAdapter.DoCalculate; -begin - CalculateLineCounts; - CalculateBandWidths; - CalculateBandPlaces; - CalculateColumnWidths; - CalculateColumnPlaces; -end; - -class function TcxTreeListControlAdapter.GetProperties(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TcxCustomEditProperties; -begin - Result := TreeListColumn_DoGetEditProperties(AColumn, ANode); - if Result = nil then - Result := GetRepositoryItem(AColumn, ANode).Properties; -end; - -class function TcxTreeListControlAdapter.GetPropertiesClass(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TcxCustomEditPropertiesClass; -begin - Result := TcxCustomEditPropertiesClass(GetProperties(AColumn, ANode).ClassType); -end; - -class function TcxTreeListControlAdapter.GetRepositoryItem(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TcxEditRepositoryItem; -begin - Result := AColumn.RepositoryItem; -end; - -function TcxTreeListControlAdapter.GetBackgroundViewParams: TcxViewParams; -begin - Result := Styles.GetBackgroundParams; -end; - -function TcxTreeListControlAdapter.GetBandBackgroundViewParams: TcxViewParams; -begin - Result := Styles.GetBandBackgroundParams(nil); -end; - -function TcxTreeListControlAdapter.GetBandHeaderViewParams(ABand: TcxTreeListBand): TcxViewParams; -begin - Result := Styles.GetBandHeaderParams(ABand); - if ABand = nil then - Result.Color := LookAndFeelPainter.DefaultHeaderBackgroundColor -end; - -function TcxTreeListControlAdapter.GetContentViewParams(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn): TcxViewParams; -begin - Result := Styles.GetContentParams(ANode, AColumn); - // v3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TcxTreeListControlAdapter.GetColumnFooterViewParams(AColumn: TcxTreeListColumn): TcxViewParams; -begin - Result := Styles.GetColumnFooterParams(AColumn); - Result.Color := LookAndFeelPainter.DefaultHeaderColor -end; - -function TcxTreeListControlAdapter.GetColumnHeaderViewParams(AColumn: TcxTreeListColumn): TcxViewParams; -begin - if AColumn = nil then - begin - FillChar(Result, SizeOf(Result), 0); - Result.Color := LookAndFeelPainter.DefaultHeaderBackgroundColor; - end - else - Result := Styles.GetColumnHeaderParams(AColumn); -end; - -function TcxTreeListControlAdapter.GetIndentViewParams(ANode: TcxTreeListNode; - AnIndent: Integer): TcxViewParams; -begin - Result := Styles.GetIndentParams(ANode, AnIndent); - // v3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TcxTreeListControlAdapter.GetPreviewViewParams(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn): TcxViewParams; -begin - Result := Styles.GetPreviewParams(ANode); - // v3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TcxTreeListControlAdapter.GetFooterRowViewParams: TcxViewParams; -begin - Result := Styles.GetFooterParams; -end; - -function TcxTreeListControlAdapter.GetSelectionViewParams: TcxViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - with Styles.Selection do - begin - Result.Bitmap := nil; - Result.Color := Color; - Result.Font := Font; - Result.TextColor := TextColor; - end; -end; - -function TcxTreeListControlAdapter.HasSelectionStyle: Boolean; -begin - Result := Styles.Selection <> nil; -end; - -function TcxTreeListControlAdapter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - Result := Styles.GetBitmap(Index); -end; - -function TcxTreeListControlAdapter.HasBackgroundBitmap(Index: Integer): Boolean; -begin - Result := GetBackgroundBitmap(Index) <> nil; -end; - -function TcxTreeListControlAdapter.GetImagesHeight(ANode: TcxTreeListNode): Integer; -begin - if HasImages(ANode) then - Result := 1 + Images.Height + 1 - else - Result := 0; -end; - -function TcxTreeListControlAdapter.GetImagesWidth(ANode: TcxTreeListNode): Integer; -begin - if HasImages(ANode) then - Result := 1 + Images.Width + 1 - else - Result := 0; -end; - -function TcxTreeListControlAdapter.GetStateImagesHeight(ANode: TcxTreeListNode): Integer; -begin - if HasStateImages(ANode) then - Result := 1 + StateImages.Height + 1 - else - Result := 0; -end; - -function TcxTreeListControlAdapter.GetStateImagesWidth(ANode: TcxTreeListNode): Integer; -begin - if HasStateImages(ANode) then - Result := 1 + StateImages.Width + 1 - else - Result := 0; -end; - -function TcxTreeListControlAdapter.HasImages(ANode: TcxTreeListNode): Boolean; -begin - Result := Images <> nil; - if Result and (ANode <> nil) then - Result := (ANode.ImageIndex > -1) and (ANode.ImageIndex < Images.Count); -end; - -function TcxTreeListControlAdapter.HasStateImages(ANode: TcxTreeListNode): Boolean; -begin - Result := StateImages <> nil; - if Result and (ANode <> nil) then - Result := (ANode.StateIndex > -1) and (ANode.StateIndex < StateImages.Count); -end; - -function TcxTreeListControlAdapter.IsGroupNode(ANode: TcxTreeListNode): Boolean; -begin - Result := CustomTreeListControl_DoIsGroupNode(TreeListControl, ANode); -end; - -function TcxTreeListControlAdapter.GetBand(Index: Integer): TcxTreeListBand; -begin - Result := CustomTreeListControl_GetVisibleBand(TreeListControl, Index); -end; - -function TcxTreeListControlAdapter.GetBandCount: Integer; -begin - Result := CustomTreeListControl_GetVisibleBandCount(TreeListControl); -end; - -function TcxTreeListControlAdapter.GetBandOrigin(Index: Integer): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Index - 1 do - Inc(Result, BandWidths[I]); -end; - -function TcxTreeListControlAdapter.GetBandPlace(Index: Integer): TRect; -begin - Result := FBandPlaces[Index]; -end; - -function TcxTreeListControlAdapter.GetBandWidth(Index: Integer): Integer; -begin - Result := FBandWidths[Index]; -end; - -function TcxTreeListControlAdapter.GetCanUseLookAndFeelColors: Boolean; -begin - Result := CustomTreeListControl_GetLookAndFeel(TreeListControl).NativeStyle and - dxThemeManager.AreVisualStylesAvailable; -end; - -function TcxTreeListControlAdapter.GetCategorizedColumn: TcxTreeListColumn; -begin - Result := OptionsView.GetCategorizedColumn; -end; - -function TcxTreeListControlAdapter.GetColumnCount: Integer; -begin - Result := CustomTreeListControl_GetVisibleColumnCount(TreeListControl); -end; - -function TcxTreeListControlAdapter.GetCellAutoHeight: Boolean; -begin - Result := OptionsView.CellAutoHeight and (DetailsLineCount = 1); -end; - -function TcxTreeListControlAdapter.GetCellEndEllipsis: Boolean; -begin - Result := OptionsView.CellEndEllipsis; -end; - -function TcxTreeListControlAdapter.GetCellMultiline: Boolean; -begin - Result := OptionsView.CellAutoHeight and (DetailsLineCount = 1); -end; - -function TcxTreeListControlAdapter.GetColumn(Index: Integer): TcxTreeListColumn; -begin - Result := CustomTreeListControl_GetVisibleColumn(TreeListControl, Index); -end; - -function TcxTreeListControlAdapter.GetColumnPlace(Index: Integer): TdxTLColumnPlace; -begin - Result := FColumnPlaces[Index]; -end; - -function TcxTreeListControlAdapter.GetColumnWidth(Index: Integer): Integer; -begin - Result := FColumnWidths[Index]; -end; - -function TcxTreeListControlAdapter.GetDefaultRowHeight: Integer; -begin - Result := TreeListControl.DefaultRowHeight; -end; - -function TcxTreeListControlAdapter.GetFooterItemText(Index: Integer): string; -begin - Result := Columns[Index].SummaryFooter.SummaryText; -end; - -function TcxTreeListControlAdapter.GetGridLines: TcxTreeListGridLines; -begin - Result := OptionsView.GridLines; -end; - -function TcxTreeListControlAdapter.GetGridLinesColor: TColor; -begin - Result := OptionsView.GridLineColor; -end; - -function TcxTreeListControlAdapter.GetHasFooterItem(Index: Integer): Boolean; -begin - Result := Columns[Index].Options.Footer; -end; - -function TcxTreeListControlAdapter.GetHasPreview: Boolean; -begin - Result := PreviewColumn <> nil; -end; - -function TcxTreeListControlAdapter.GetHeaderAutoHeight: Boolean; -begin - Result := (DetailsLineCount = 1) and OptionsView.CellAutoHeight; -end; - -function TcxTreeListControlAdapter.GetHelper(Node: TcxTreeListNode): TcxTreeListNodeHelper; -begin - Result := FHelperCache.Helpers[Node]; -end; - -function TcxTreeListControlAdapter.GetIndentWidth: Integer; -begin - Result := GetStateImagesWidth(nil); - if GetImagesWidth(nil) > GetStateImagesWidth(nil) then - Result := GetImagesWidth(nil); - if Result = 0 then - Result := DefaultIndentWidth; -end; - -function TcxTreeListControlAdapter.GetIsDefaultRowHeightAssigned: Boolean; -begin - Result := DefaultRowHeight <> 0; -end; - -function TcxTreeListControlAdapter.GetImages: TCustomImageList; -begin - Result := CustomTreeListControl_GetImages(TreeListControl); -end; - -function TcxTreeListControlAdapter.GetIsNodeColorUsedForIndents: Boolean; -begin - Result := OptionsView.UseNodeColorForIndent; -end; - -function TcxTreeListControlAdapter.GetLookAndFeelKind: TcxLookAndFeelKind; -begin - Result := CustomTreeListControl_GetLookAndFeel(TreeListControl).Kind; -end; - -function TcxTreeListControlAdapter.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := CustomTreeListControl_GetLookAndFeelPainter(TreeListControl); -end; - -function TcxTreeListControlAdapter.GetMultiSelection: Boolean; -begin - Result := CustomTreeListControl_GetOptionsSelection(TreeListControl).MultiSelect; -end; - -function TcxTreeListControlAdapter.GetNode(Index: Integer): TcxTreeListNode; -begin - Result := CustomTreeListControl_GetNodes(TreeListControl).Root[Index]; -end; - -function TcxTreeListControlAdapter.GetNodeCount: Integer; -begin - Result := CustomTreeListControl_GetNodes(TreeListControl).Root.Count; -end; - -function TcxTreeListControlAdapter.GetOptionsView: TcxTreeListOptionsView; -begin - Result := CustomTreeListControl_GetOptionsView(TreeListControl); -end; - -function TcxTreeListControlAdapter.GetPaintStyle: TcxTreeListPaintStyle; -begin - Result := OptionsView.PaintStyle; -end; - -function TcxTreeListControlAdapter.GetPreviewColumn: TcxTreeListColumn; -begin - Result := CustomTreeListControl_GetPreview(TreeListControl).Column; -end; - -function TcxTreeListControlAdapter.GetPreviewLeftIndent: Integer; -begin - Result := CustomTreeListControl_GetPreview(TreeListControl).LeftIndent; -end; - -function TcxTreeListControlAdapter.GetPreviewPlace: TcxTreeListPreviewPlace; -begin - Result := CustomTreeListControl_GetPreview(TreeListControl).Place; -end; - -function TcxTreeListControlAdapter.GetPreviewRightIndent: Integer; -begin - Result := CustomTreeListControl_GetPreview(TreeListControl).RightIndent; -end; - -function TcxTreeListControlAdapter.GetShowRoot: Boolean; -begin - Result := OptionsView.ShowRoot; -end; - -function TcxTreeListControlAdapter.GetShowHorzGridLines: Boolean; -begin - Result := GridLines in [tlglHorz, tlglBoth]; -end; - -function TcxTreeListControlAdapter.GetShowTreeLines: Boolean; -begin - Result := OptionsView.TreeLineStyle <> tllsNone; -end; - -function TcxTreeListControlAdapter.GetShowVertGridLines: Boolean; -begin - Result := GridLines in [tlglVert, tlglBoth]; -end; - -function TcxTreeListControlAdapter.GetStateImages: TCustomImageList; -begin - Result := CustomTreeListControl_GetStateImages(TreeListControl); -end; - -function TcxTreeListControlAdapter.GetStyles: TcxTreeListStyles; -begin - Result := CustomTreeListControl_GetStyles(TreeListControl); -end; - -function TcxTreeListControlAdapter.GetThemedBandHeaderItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderColor; -end; - -function TcxTreeListControlAdapter.GetThemedBandHeaderItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderTextColor; -end; - -function TcxTreeListControlAdapter.GetThemedFooterItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFooterColor; -end; - -function TcxTreeListControlAdapter.GetThemedFooterItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultFooterTextColor; -end; - -function TcxTreeListControlAdapter.GetThemedHeaderItemColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderColor; -end; - -function TcxTreeListControlAdapter.GetThemedHeaderItemTextColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderTextColor; -end; - -function TcxTreeListControlAdapter.GetThemedHeaderRowColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderBackgroundColor; -end; - -function TcxTreeListControlAdapter.GetTreeLinesColor: TColor; -begin - Result := OptionsView.TreeLineColor; -end; - -function TcxTreeListControlAdapter.GetTreeLinesStyle: TcxTreeListTreeLineStyle; -begin - Result := OptionsView.TreeLineStyle; -end; - -function TcxTreeListControlAdapter.GetTreeListControl: TcxCustomTreeListControl; -begin - Result := Builder.TreeListControl; -end; - -function TcxTreeListControlAdapter.GetUseStylesForIndents: Boolean; -begin - Result := OptionsView.UseNodeColorForIndent; -end; - -function TcxTreeListControlAdapter.GetViewWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to BandCount - 1 do - Inc(Result, BandWidths[I]); -end; - -{ TcxTreeListControlReportLinkFormatter } - -constructor TcxTreeListControlReportLinkFormatter.Create(ABuilder: TcxTreeListControlReportLinkBuilder); -begin - inherited; - FFont := TFont.Create; - FLookAndFeelItems := TList.Create; - FNodes := TList.Create; - CreateNodeList; - FTransparentColor := dxPSCore.dxDefaultContentColor; -end; - -destructor TcxTreeListControlReportLinkFormatter.Destroy; -begin - FreeAndNil(FNodes); - FreeAndNil(FLookAndFeelItems); - FreeAndNil(FFont); - inherited; -end; - -function TcxTreeListControlReportLinkFormatter.Adapter: TcxTreeListControlAdapter; -begin - Result := Builder.Adapter; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeHost(AHost: TdxReportCell); -begin - AHost.CellSides := []; - AHost.Transparent := True; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeBandItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Band: TcxTreeListBand; -begin - Band := Adapter.Bands[AnIndex]; - SetViewParams(AnItem, GetBandItemViewParams(Band)); - RegisterLookAndFeelItem(AnItem, cesRaised); - if HasBackgroundBitmap(tlsv_BandHeader) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_BandHeader); - - with AnItem as TdxReportCellImage do - begin - Data := Integer(Band); - EndEllipsis := Band.Caption.ShowEndEllipsis; - if not Band.Caption.Glyph.Empty then - begin - Image := Band.Caption.Glyph; - ImageLayout := HeaderImageLayoutMap[Band.Caption.GlyphAlignHorz, Band.Caption.GlyphAlignVert]; - ImageTransparent := True; - IsTextDrawnForCenteredImage := True; - IsTextShiftedForHorizontallyCenteredImage := not (ImageLayout in [ilImageTopCenter, ilImageCenterCenter, ilImageBottomCenter]); - end; - Multiline := Band.Caption.Multiline; - Text := Band.Caption.Text; - TextAlignX := TextAlignXMap[Band.Caption.AlignHorz]; - TextAlignY := TextAlignYMap[Band.Caption.AlignVert]; - end; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeBandRow(ARow: TdxReportCell); -begin - //SetViewParams(ARow, GetBandBackgroundViewParams); - ARow.Transparent := True; //??? - ARow.Data := Integer(TcxTreeListBandAttribute); -end; - -procedure TcxTreeListControlReportLinkFormatter.DoReportLinkInitializeBandItem(AnItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - ReportLink.DoInitializeBandCell(Adapter.Bands[AIndex], TdxReportCellImage(AnItem)); -end; - -function TcxTreeListControlReportLinkFormatter.GetBandBackgroundViewParams: TdxReportItemViewParams; -begin - Result.NativeParams := Adapter.GetBandBackgroundViewParams; - Result.CellSides := []; - Result.FontStyle := []; - Result.Transparent := True; -end; - -function TcxTreeListControlReportLinkFormatter.GetBandItemBounds(Index: Integer): TRect; -begin - Result := Adapter.BandPlaces[Index]; - Result.Bottom := Result.Top + BandLineHeight * Adapter.BandLineCount; -end; - -function TcxTreeListControlReportLinkFormatter.GetBandItemClass(Index: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellImage; -end; - -function TcxTreeListControlReportLinkFormatter.GetBandItemViewParams(ABand: TcxTreeListBand): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetBandHeaderParams(ABand, Result.NativeParams) - else - Result.NativeParams := Adapter.GetBandHeaderViewParams(ABand); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if ABand <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedBandHeaderItemColor; - Result.NativeParams.TextColor := Adapter.ThemedBandHeaderItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeFooterItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Column: TcxTreeListColumn; -begin - Column := Adapter.Columns[AnIndex]; - SetViewParams(AnItem, GetFooterItemViewParams(Column)); - RegisterLookAndFeelItem(AnItem, cesSunken); - if HasBackgroundBitmap(tlsv_ColumnFooter) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_ColumnFooter); - - with AnItem as TdxReportCellString do - begin - Data := Integer(Column); - //ExcludeFromClipRgn := True; - Multiline := Column.SummaryFooter.MultiLine; - Text := Adapter.FooterItemTexts[AnIndex]; - TextAlignX := TextAlignXMap[Column.SummaryFooter.AlignHorz]; - TextAlignY := TextAlignYMap[Column.SummaryFooter.AlignVert]; - end; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeFooterRow(ARow: TdxReportCell); -begin - SetViewParams(ARow, GetFooterRowViewParams); - RegisterLookAndFeelItem(ARow, cesRaised); - ARow.Data := Integer(TcxTreeListFooterAttribute); -end; - -procedure TcxTreeListControlReportLinkFormatter.DoReportLinkInitializeFooterItem(AnItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - ReportLink.DoInitializeFooterCell(Adapter.Columns[AIndex], TdxReportCellString(AnItem)); -end; - -function TcxTreeListControlReportLinkFormatter.GetFooterItemBounds(Index: Integer): TRect; -begin - with Adapter.ColumnPlaces[Index] do - Result := MakeRect(Left, RowIndex * FooterLineHeight, Right, (RowIndex + LineCount) * FooterLineHeight); - - InflateRect(Result, -FooterItemInflateHorz, -FooterItemInflateVert); - if Adapter.Columns[Index].IsLeftMost then - Inc(Result.Left, 2); -end; - -function TcxTreeListControlReportLinkFormatter.GetFooterItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellString; -end; - -function TcxTreeListControlReportLinkFormatter.GetFooterItemViewParams(AColumn: TcxTreeListColumn): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetColumnFooterParams(nil, AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetColumnFooterViewParams(AColumn); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedFooterItemColor; - Result.NativeParams.TextColor := Adapter.ThemedFooterItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); -end; - -function TcxTreeListControlReportLinkFormatter.GetFooterRowViewParams: TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetFooterRowParams(Result.NativeParams) - else - Result.NativeParams := Adapter.GetFooterRowViewParams; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeHeaderItem(AnItem: TAbstractdxReportCellData; - AnIndex: Integer); -var - Column: TcxTreeListColumn; -begin - Column := Adapter.Columns[AnIndex]; - SetViewParams(AnItem, GetHeaderItemViewParams(Column)); - RegisterLookAndFeelItem(AnItem, cesRaised); - if HasBackgroundBitmap(tlsv_ColumnHeader) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_ColumnHeader); - - with AnItem as TdxReportCellImage do - begin - Data := Integer(Column); - EndEllipsis := Column.Caption.ShowEndEllipsis; - if not Column.Caption.Glyph.Empty then - begin - Image := Column.Caption.Glyph; - ImageLayout := HeaderImageLayoutMap[Column.Caption.GlyphAlignHorz, Column.Caption.GlyphAlignVert]; - IsTextDrawnForCenteredImage := True; - IsTextShiftedForHorizontallyCenteredImage := not (ImageLayout in [ilImageTopCenter, ilImageCenterCenter, ilImageBottomCenter]); - end; - Multiline := Column.Caption.MultiLine; - SortOrder := SortOrderMap[Column.SortOrder]; - Text := Column.Caption.Text; - TextAlignX := TextAlignXMap[Column.Caption.AlignHorz]; - TextAlignY := TextAlignYMap[Column.Caption.AlignVert]; - end; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeHeaderRow(ARow: TdxReportCell); -begin -// SetViewParams(ARow, GetHeaderItemViewParams(Adapter.Columns[0])); - SetViewParams(ARow, GetHeaderItemViewParams(nil)); - ARow.Data := Integer(TcxTreeListHeaderAttribute); -end; - -procedure TcxTreeListControlReportLinkFormatter.DoReportLinkInitializeHeaderItem(AnItem: TAbstractdxReportCellData; - AIndex: Integer); -begin - ReportLink.DoInitializeHeaderCell(Adapter.Columns[AIndex], TdxReportCellImage(AnItem)); -end; - -function TcxTreeListControlReportLinkFormatter.GetHeaderItemBounds(Index: Integer): TRect; -begin - with Adapter.ColumnPlaces[Index] do - Result := MakeRect(Left, RowIndex * HeaderLineHeight, Right, (RowIndex + LineCount) * HeaderLineHeight); -end; - -function TcxTreeListControlReportLinkFormatter.GetHeaderItemClass(AnIndex: Integer): TdxReportCellTextClass; -begin - Result := TdxReportCellImage; -end; - -function TcxTreeListControlReportLinkFormatter.GetHeaderItemViewParams(AColumn: TcxTreeListColumn): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetColumnHeaderParams(AColumn, Result.NativeParams) - else - Result.NativeParams := Adapter.GetColumnHeaderViewParams(AColumn); - - if UseLookAndFeelColors and Adapter.CanUseLookAndFeelColors then - if AColumn <> nil then - begin - Result.NativeParams.Color := Adapter.ThemedHeaderItemColor; - Result.NativeParams.TextColor := Adapter.ThemedHeaderItemTextColor; - end; - - Result.CellSides := csAll; - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeNodeImage(AnItem: TdxReportCellGraphic; - ANode: TcxTreeListNode; AnIndex: Integer); -begin - SetViewParams(AnItem, GetNodeImageViewParams(ANode, AnIndex)); - if HasBackgroundBitmap(tlsv_Content) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_Content); - - AnItem.Data := MakeIndentIndex(AnIndex); - AnItem.DrawMode := gdmCenter; - AnItem.ImageIndex := ANode.ImageIndex; - AnItem.ImageList := Adapter.Images; - AnItem.ImageTransparent := True; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoReportLinkInitializeNodeImage(AnItem: TAbstractdxReportCellData; - ANode: TcxTreeListNode; AnIndex: Integer); -begin - ReportLink.DoInitializeIndentCell(ANode, AnIndex, AnItem); -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeImageCellSides(ANode: TcxTreeListNode; - AnIndex: Integer): TdxCellSides; -begin - Result := []; - if ((AnIndex <> 0) and Adapter.ShowVertGridLines and not Adapter.HasStateImages(ANode)) or - ((AnIndex = 0) and ReportLink.OptionsView.Borders) then - Include(Result, csLeft); - if Adapter.ShowHorzGridLines then - begin - if not IsFirstNode(ANode) then Include(Result, csTop); - if not IsLastNode(ANode) then Include(Result, csBottom); - end; - if ReportLink.OptionsView.Borders then - begin - if IsFirstNode(ANode) then Include(Result, csTop); - if IsLastNode(ANode) then Include(Result, csBottom); - end; -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeImageClass: TdxReportCellGraphicClass; -begin - Result := TdxReportCellGraphic; -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeImageViewParams(ANode: TcxTreeListNode; - AnIndex: Integer): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ANode) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetImagesParams(ANode, Result.NativeParams) - else - if CanProcessSelectionStyle(ANode) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetIndentViewParams(ANode, AnIndex); - - Result.CellSides := GetNodeImageCellSides(ANode, AnIndex); - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeNodeIndent(AnItem: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); -begin - SetViewParams(AnItem, GetNodeIndentViewParams(ANode, AnIndex, AnIndentCount)); - if HasBackgroundBitmap(tlsv_Content) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_Content); - - AnItem.Data := MakeIndentIndex(AnIndex); - AnItem.ShowButton := (AnIndex = AnIndentCount - 1) and ANode.HasChildren and ReportLink.OptionsView.ExpandButtons; - if AnItem.ShowButton then - DoInitializeExpandButton(AnItem, AnIndex, AnIndentCount, ANode); - if ReportLink.OptionsView.TreeLines then - AnItem.TreeLineMode := GetNodeIndentTreeLineMode(AnIndex, AnIndentCount, ANode); -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeExpandButton(AnItem: TdxReportCellExpandButton; - AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); -begin - with AnItem do - begin - ButtonExpanded := IsNodeExpanded(ANode); - ButtonSize := ExpandButtonSize; - ButtonInteriorColor := ExpandButtonColor; - ButtonTransparent := IsColorTransparent(ButtonInteriorColor); - end; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoReportLinkInitializeNodeIndent(AnItem: TAbstractdxReportCellData; - AnIndex, AnIndentCount: Integer; ANode: TcxTreeListNode); -begin - ReportLink.DoInitializeIndentCell(ANode, AnIndex, AnItem); -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeIndentCellSides(ANode: TcxTreeListNode; - AnIndex, AnIndentCount: Integer): TdxCellSides; -var - Level: Integer; - NextNode: TcxTreeListNode; -begin - Result := []; - if not ReportLink.OptionsView.Borders then Exit; - if Adapter.ShowVertGridLines then - Result := csLeftRight; - if (AnIndex = 0) and not ReportLink.OptionsView.Borders then - Exclude(Result, csLeft); - - if Adapter.ShowHorzGridLines then - begin - if not IsFirstNode(ANode) and (AnIndex = ANode.Level) then - Include(Result, csTop); - if not IsLastNode(ANode) then - begin - Level := 0; - NextNode := GetNextNode(ANode); - if NextNode <> nil then - Level := NextNode.Level; - if (ANode.Level > Level) and (AnIndex >= Level) then - Include(Result, csBottom); - end; - end; - if ReportLink.OptionsView.Borders then - begin - if IsFirstNode(ANode) then Include(Result, csTop); - if IsLastNode(ANode) then Include(Result, csBottom); - end; -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeIndentClass: TdxReportCellExpandButtonClass; -begin - Result := TdxReportCellExpandButton; -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeIndentTreeLineMode(AnIndex, - AnIndentCount: Integer; ANode: TcxTreeListNode): TdxPSTreeLineMode; -var - Level: Integer; - Parent: TcxTreeListNode; -begin - Level := AnIndentCount - AnIndex - 1; -// if Adapter.ShowRoot then Dec(Level); - Parent := GetNodeParent(ANode, Level); - - if Parent = ANode then - if IsNodeLastChild(ANode) then - Result := tlmBottomRightCorner - else - if not HasParent(ANode) and IsNodeFirstChild(ANode) then - Result := tlmTopRightCorner - else - Result := tlmCross - else - if IsNodeLastChild(Parent) then - Result := tlmNone - else - Result := tlmVertical; -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeIndentViewParams(ANode: TcxTreeListNode; - AnIndex, AnIndentCount: Integer): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ANode) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetIndentParams(ANode, AnIndex, Result.NativeParams) - else - if CanProcessSelectionStyle(ANode) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetIndentViewParams(ANode, AnIndex); - -// if not CanProcessSelectionStyle(ANode) and not IsNodeColorUsedForIndents then -// Result.Color := ReportLink.Color; - - Result.CellSides := GetNodeIndentCellSides(ANode, AnIndex, AnIndentCount); - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeNodeRow(ARow: TdxReportCell; - ANode: TcxTreeListNode); -const - CellSidesMap: array[Boolean] of TdxCellSides = ([], csLeftRight); -begin - ARow.CellSides := CellSidesMap[ReportLink.OptionsView.Borders]; - ARow.Data := Integer(ANode); - ARow.Transparent := True; - - ReportLink.AddReportRow(ARow); -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeNodeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode; AnIsPreview: Boolean = False); - - function GetViewParams: TdxReportItemViewParams; - begin - if AnIsPreview then - Result := GetPreviewViewParams(AColumn, ANode) - else - Result := GetNodeItemViewParams(AColumn, ANode); - end; - -var - Properties: TcxCustomEditProperties; - ViewParams: TdxReportItemViewParams; - CellValue: TcxEditValue; -begin - Properties := Adapter.GetProperties(AColumn, ANode); - ViewParams := GetViewParams; - CellValue := GetCellValue(Properties, AColumn, ANode); - dxPScxCommon.dxPSDataMaps.InitializeItem(AnItem, Properties, CellValue, Self, ViewParams, AnIsPreview, ANode.RecordIndex); - dxPScxCommon.dxPSDataMaps.GetImageLists(Properties, ReportLink.AppendImageList); - SetViewParams(AnItem, ViewParams); - - with ViewParams, NativeParams do - if (Bitmap <> nil) and not Bitmap.Empty then - AnItem.BackgroundBitmapIndex := ReportLink.AddBackgroundBitmapToPool(Bitmap); - - AnItem.Data := Integer(AColumn); -end; - -procedure TcxTreeListControlReportLinkFormatter.DoReportLinkInitializeNodeItem(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode); -begin - ReportLink.DoInitializeCell(ANode, AColumn, AnItem); -end; - -function TcxTreeListControlReportLinkFormatter.GetCellValue(AProperties: TcxCustomEditProperties; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode): TcxEditValue; -begin - if AProperties.GetEditValueSource(False) = evsValue then - Result := ANode.Values[ColumnIndex(AColumn)] - else - Result := ANode.Texts[ColumnIndex(AColumn)]; -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeBackgroundBitmapStyleIndex(ANode: TcxTreeListNode): Integer; - - function HasBackgroundBitmap(AStyle: TcxStyle): Boolean; - begin - Result := (AStyle <> nil) and (svBitmap in AStyle.AssignedValues); - end; - -begin - Result := tlsv_Content; - if IsOddNode(ANode) and HasBackgroundBitmap(ReportLink.Styles.StylesByCaption[cxGetResourceString(@sdxContentOddStyle)]) then - Result := tlsv_ContentOdd - else - if not IsOddNode(ANode) and HasBackgroundBitmap(ReportLink.Styles.StylesByCaption[cxGetResourceString(@sdxContentEvenStyle)]) then - Result := tlsv_ContentEven -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeItemBounds(ANode: TcxTreeListNode; - Index, IndentCount: Integer): TRect; -begin - with Adapter.ColumnPlaces[Index] do - Result := MakeRect(Left, RowIndex * DetailsLineHeight, Right, (RowIndex + LineCount) * DetailsLineHeight); - - if Adapter.Columns[Index].IsLeftMost then - Inc(Result.Left, (Adapter.IndentWidth * IndentCount) + Adapter.GetImagesWidth(ANode) + Adapter.GetStateImagesWidth(ANode)); -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeItemCellSides(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TdxCellSides; -begin - if ReportLink.OptionsView.Borders then - begin - Result := csAll; - if AColumn.IsLeftMost and ((IndentCounts[ANode] <> 0) or Adapter.HasImages(nil) or Adapter.HasStateImages(nil)) then - Exclude(Result, csLeft); - end - else - Result := []; -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeItemClass(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode; AnIsPreview: Boolean = False): TdxReportCellDataClass; -begin - Result := dxPSDataMaps.ItemClass(Adapter.GetProperties(AColumn, ANode), AnIsPreview); -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeItemViewParams(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ANode) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetContentParams(ANode, AColumn, Result.NativeParams) - else - if CanProcessSelectionStyle(ANode) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetContentViewParams(ANode, AColumn); - - Result.CellSides := GetNodeItemCellSides(AColumn, ANode); - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; - -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializePreview(AnItem: TAbstractdxReportCellData; - AColumn: TcxTreeListColumn; ANode: TcxTreeListNode); -begin - DoInitializeNodeItem(AnItem, AColumn, ANode, True); -end; - -function TcxTreeListControlReportLinkFormatter.GetPreviewCellSides(ANode: TcxTreeListNode): TdxCellSides; -begin - Result := CellSidesMap[Adapter.GridLines]; - if (IndentCounts[ANode] <> 0) or Adapter.HasImages(nil) or Adapter.HasStateImages(nil) then - Exclude(Result, csLeft); - if ReportLink.OptionsView.Borders then - begin - Include(Result, csRight); - if IsLastNode(ANode) then - Include(Result, csBottom); - end - else - Exclude(Result, csRight); -end; - -function TcxTreeListControlReportLinkFormatter.GetPreviewClass(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TdxReportCellDataClass; -begin - Result := GetNodeItemClass(AColumn, ANode, True); -end; - -function TcxTreeListControlReportLinkFormatter.GetPreviewViewParams(AColumn: TcxTreeListColumn; - ANode: TcxTreeListNode): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ANode) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetPreviewParams(ANode, AColumn, Result.NativeParams) - else - if CanProcessSelectionStyle(ANode) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetPreviewViewParams(ANode, AColumn); - - Result.CellSides := GetPreviewCellSides(ANode); - Result.FontStyle := []; - Result.Transparent := {True;//}IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeNodeSeparator(AnItem: TdxReportCellBox); -begin - with AnItem do - begin - CellSides := csAll; - Color := NodeSeparatorColor; - Transparent := False; - end; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeNodeSeparatorRow(ARow: TdxReportCell); -begin -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeSeparatorClass: TdxReportCellBoxClass; -begin - Result := TdxReportCellBox; -end; - -{ state images } - -procedure TcxTreeListControlReportLinkFormatter.DoInitializeNodeStateImage(AnItem: TdxReportCellGraphic; - ANode: TcxTreeListNode; AnIndex: Integer); -begin - SetViewParams(AnItem, GetNodeStateImageViewParams(ANode, AnIndex)); - if HasBackgroundBitmap(tlsv_Content) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(tlsv_Content); - - AnItem.Data := MakeIndentIndex(AnIndex); - AnItem.DrawMode := gdmCenter; - AnItem.ImageIndex := ANode.StateIndex; - AnItem.ImageList := Adapter.StateImages; - AnItem.ImageTransparent := True; -end; - -procedure TcxTreeListControlReportLinkFormatter.DoReportLinkInitializeNodeStateImage(AnItem: TAbstractdxReportCellData; - ANode: TcxTreeListNode; AnIndex: Integer); -begin - ReportLink.DoInitializeIndentCell(ANode, AnIndex, AnItem); -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeStateImageCellSides(ANode: TcxTreeListNode; - AnIndex: Integer): TdxCellSides; -begin - Result := []; - if ((AnIndex <> 0) and Adapter.ShowVertGridLines) or ((AnIndex = 0) and ReportLink.OptionsView.Borders) then - Include(Result, csLeft); - - if Adapter.ShowHorzGridLines then - begin - if not IsFirstNode(ANode) then Include(Result, csTop); - if not IsLastNode(ANode) then Include(Result, csBottom); - end; - if ReportLink.OptionsView.Borders then - begin - if IsFirstNode(ANode) then Include(Result, csTop); - if IsLastNode(ANode) then Include(Result, csBottom); - end; -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeStateImageClass: TdxReportCellGraphicClass; -begin - Result := TdxReportCellGraphic; -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeStateImageViewParams(ANode: TcxTreeListNode; - AnIndex: Integer): TdxReportItemViewParams; -begin - FillChar(Result, SizeOf(Result), 0); - if ReportLink.OptionsFormatting.UseNativeStyles then - if CanProcessSelectionStyle(ANode) then - ReportLink.Styles.GetSelectionParams(Result.NativeParams) - else - ReportLink.Styles.GetImagesParams(ANode, Result.NativeParams) - else - if CanProcessSelectionStyle(ANode) then - Result.NativeParams := Adapter.GetSelectionViewParams - else - Result.NativeParams := Adapter.GetIndentViewParams(ANode, AnIndex); - - Result.CellSides := GetNodeStateImageCellSides(ANode, AnIndex); - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent; -end; - -function TcxTreeListControlReportLinkFormatter.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TcxTreeListControlReportLinkFormatter._AddRef: Integer; -begin - Result := 1; -end; - -function TcxTreeListControlReportLinkFormatter._Release: Integer; -begin - Result := 1; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams_GetAutoHeight: Boolean; -begin - Result := Adapter.CellAutoHeight; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams_GetDC: HDC; -begin - Result := Self.DC; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; -begin - Result := ReportLink.OptionsRefinements.DisplayGraphicsAsText; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams_GetEndEllipsis: Boolean; -begin - Result := Adapter.CellEndEllipsis; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams_GetFlatCheckMarks: Boolean; -begin - Result := ReportLink.OptionsRefinements.FlatCheckMarks; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams_GetGraphicsText: string; -begin - Result := ReportLink.OptionsRefinements.GraphicsText; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams_GetMultiline: Boolean; -begin - Result := Adapter.CellMultiline; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams_GetTransparentGraphics: Boolean; -begin - Result := ReportLink.OptionsRefinements.TransparentGraphics; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := Adapter.PreviewLeftIndent; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := Adapter.PreviewRightIndent; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - if PreviewAutoHeight then - Result := -1 - else - Result := PreviewLineHeight * PreviewMaxLineCount; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := PreviewMaxLineCount; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; -const - GraphicClasses: array[Boolean] of TGraphicClass = (TMetafile, TBitmap); -begin - Result := GraphicClasses[IdxPSCellParams2_GetRichEditTransparent]; -end; - -function TcxTreeListControlReportLinkFormatter.IdxPSCellParams2_GetRichEditTransparent: Boolean; -begin - {$IFDEF DXVER500} - Result := ReportLink.OptionsRefinements.TransparentRichEdits; - {$ELSE} - Result := False; - {$ENDIF} -end; - -procedure TcxTreeListControlReportLinkFormatter.AddDelimiters; -begin - with ReportLink.OptionsPagination do - begin - if Band or Column then AddHorizontalDelimiters; - if Node then AddVerticalDelimiters; - end; -end; - -procedure TcxTreeListControlReportLinkFormatter.AddHorizontalDelimiters; -var - X, I: Integer; -begin - if ReportLink.OptionsPagination.Band then - begin - X := 0; - for I := 0 to Adapter.BandCount - 1 do - begin - ReportLink.AddHorizontalDelimiter(X); - Inc(X, Adapter.BandWidths[I]); - end; - end - else - for I := 0 to Adapter.ColumnCount - 1 do - with Adapter.ColumnPlaces[I] do - begin - ReportLink.AddHorizontalDelimiter(Left); - ReportLink.AddHorizontalDelimiter(Right); - end; -end; - -procedure TcxTreeListControlReportLinkFormatter.AddVerticalDelimiters; -var - I: Integer; -begin - for I := 0 to Builder.ReportRowCount - 1 do - ReportLink.AddVerticalDelimiter(Builder.ReportRows[I]); -end; - -procedure TcxTreeListControlReportLinkFormatter.AfterBuilding; -begin - if not Builder.IsAborted then - begin - FormatLookAndFeelItems; - AddDelimiters; - Builder.ReportCells.BorderColor := GridLinesColor; - Builder.ReportCells.TreeLineColor := Adapter.TreeLinesColor; - Builder.ReportCells.TreeLineStyle := TreeLinesStyleMap[Adapter.TreeLinesStyle]; - end; -end; - -procedure TcxTreeListControlReportLinkFormatter.BeforeBuilding; -begin - CalculateLineHeights; -end; - -procedure TcxTreeListControlReportLinkFormatter.CalculateLineHeights; -var - I: Integer; - Column: TcxTreeListColumn; -begin - FBandLineHeight := 0; - FDetailsLineHeight := Adapter.DefaultRowHeight; - FFooterLineHeight := 0; - FHeaderLineHeight := 0; - - for I := 0 to Adapter.ColumnCount - 1 do - begin - Column := Adapter.Columns[I]; - CalculateHeight(GetFooterItemViewParams(Column), FFooterLineHeight); - CalculateHeight(GetHeaderItemViewParams(Column), FHeaderLineHeight); - if not Adapter.IsDefaultRowHeightAssigned and Column.IsPreview then - CalculateHeight(GetNodeItemViewParams(Column, Nodes[0]), FDetailsLineHeight); - end; - //if FDetailsLineHeight - Inc(FFooterLineHeight, 2 * FooterItemInflateVert); - - FPreviewLineHeight := Adapter.DefaultRowHeight; - if PreviewColumn <> nil then - CalculateHeight(GetPreviewViewParams(PreviewColumn, Nodes[0]), FPreviewLineHeight); - - for I := 0 to Adapter.BandCount - 1 do - CalculateHeight(GetBandItemViewParams(Adapter.Bands[I]), FBandLineHeight); -end; - -function TcxTreeListControlReportLinkFormatter.CanProcessSelectionStyle(ANode: TcxTreeListNode): Boolean; -begin - Result := (ANode <> nil) and ReportLink.OptionsFormatting.ConsumeSelectionStyle and IsSelectedNode(ANode); - if Result and not ReportLink.OptionsFormatting.UseNativeStyles then - Result := Adapter.HasSelectionStyle; -end; - -procedure TcxTreeListControlReportLinkFormatter.CreateNodeList; - - function IsNodeProcessed(ANode: TcxTreeListNode): Boolean; - var - Helper: TcxTreeListNodeHelper; - begin - Helper := Adapter.Helpers[ANode]; - Result := not Adapter.MultiSelection or not ReportLink.OptionsSelection.ProcessSelection or - (ANode.Selected or Helper.HasSelectedChildren or - (not ReportLink.OptionsSelection.ProcessExactSelection and Helper.HasSelectedParents)); - end; - - procedure ProcessNode(ANode: TcxTreeListNode); - var - I: Integer; - Node: TcxTreeListNode; - begin - FNodes.Add(ANode); - if (ANode.Count > 0) and (ReportLink.OptionsExpanding.ExplicitlyExpandNodes or - (ANode.Expanded or (ReportLink.OptionsExpanding.AutoExpandNodes and ANode.CanExpand))) then - for I := 0 to ANode.Count - 1 do - begin - Node := ANode[I]; - if IsNodeProcessed(Node) then ProcessNode(Node); - end; - end; - -var - I: Integer; - Node: TcxTreeListNode; -begin - FNodes.Clear; - for I := 0 to Adapter.NodeCount - 1 do - begin - Node := Adapter.Nodes[I]; - if IsNodeProcessed(Node) then ProcessNode(Node); - end; -end; - -function TcxTreeListControlReportLinkFormatter.IsSelectedNode(ANode: TcxTreeListNode): Boolean; -begin - Result := ReportLink.OptionsSelection.ProcessSelection or ANode.Selected; -end; - -function TcxTreeListControlReportLinkFormatter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - Result := ReportLink.Styles.GetBitmap(MapStyleBackgroundBitmapIndex(Index)) - else - Result := Adapter.GetBackgroundBitmap(Index); -end; - -function TcxTreeListControlReportLinkFormatter.GetBackgroundBitmapIndex(Index: Integer): Integer; -begin - Result := ReportLink.AddBackgroundBitmapToPool(GetBackgroundBitmap(Index)); -end; - -function TcxTreeListControlReportLinkFormatter.HasBackgroundBitmap(Index: Integer): Boolean; -var - Bitmap: TBitmap; -begin - if not ReportLink.OptionsFormatting.SuppressBackgroundBitmaps then - begin - Bitmap := GetBackgroundBitmap(Index); - Result := (Bitmap <> nil) and not Bitmap.Empty; - end - else - Result := False; -end; - -function TcxTreeListControlReportLinkFormatter.MapStyleBackgroundBitmapIndex(ATreeListBackgroundBitmapIndex: Integer): Integer; -begin - case ATreeListBackgroundBitmapIndex of - tlsv_BandHeader: - Result := vspsTreeListBandHeader; - tlsv_Content: - Result := vspsTreeListContent; - tlsv_ContentOdd: - Result := vspsTreeListContentOdd; - tlsv_ContentEven: - Result := vspsTreeListContentEven; - tlsv_ColumnFooter: - Result := vspsTreeListFooter; - tlsv_ColumnHeader: - Result := vspsTreeListHeader; - tlsv_Footer: - Result := vspsTreeListFooterRow; - tlsv_Preview: - Result := vspsTreeListPreview; - else - Result := 0; - end; -end; - -procedure TcxTreeListControlReportLinkFormatter.CalculateHeight(const AParams: TdxReportItemViewParams; - var AHeight: Integer); -var - Value: Integer; -begin - Value := CalculatePatternHeight(AParams); - if Value > AHeight then AHeight := Value; -end; - -function TcxTreeListControlReportLinkFormatter.CalculatePatternHeight(const AParams: TdxReportItemViewParams): Integer; -begin - Result := Renderer.CalcTextPatternHeight(DC, AParams.NativeParams.Font); -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeParent(ANode: TcxTreeListNode; - ALevel: Integer): TcxTreeListNode; -begin - Result := ANode; - while ALevel > 0 do - begin - Result := Result.Parent; - Dec(ALevel); - end; -end; - -function TcxTreeListControlReportLinkFormatter.GetNextNode(ANode: TcxTreeListNode): TcxTreeListNode; -var - Index: Integer; -begin - Index := IndexOfNode(ANode); - if Index < NodeCount - 1 then - Result := Nodes[Index + 1] - else - Result := nil; -end; - -function TcxTreeListControlReportLinkFormatter.GetPrevNode(ANode: TcxTreeListNode): TcxTreeListNode; -var - Index: Integer; -begin - Index := IndexOfNode(ANode); - if Index > 0 then - Result := Nodes[Index - 1] - else - Result := nil; -end; - -function TcxTreeListControlReportLinkFormatter.GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; -begin - if AParams.NativeParams.Font <> nil then - begin - FFont.Assign(AParams.NativeParams.Font); - if not dxPSUtl.dxIsTrueTypeFont(FFont) then - FFont.Name := ReportLink.Font.Name; - FFont.Color := ColorToRGB(AParams.NativeParams.TextColor); - FFont.Style := FFont.Style + AParams.FontStyle; - Result := ReportLink.AddFontToPool(FFont); - end - else - Result := 0; -end; - -function TcxTreeListControlReportLinkFormatter.HasParent(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode.Level > 0; -end; - -function TcxTreeListControlReportLinkFormatter.IndexOfNode(ANode: TcxTreeListNode): Integer; -begin - Result := FNodes.IndexOf(ANode); -end; - -function TcxTreeListControlReportLinkFormatter.IsColorTransparent(AColor: TColor): Boolean; -begin - Result := ColorToRGB(AColor) = ColorToRGB(TransparentColor); -end; - -function TcxTreeListControlReportLinkFormatter.IsFirstNode(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode = FNodes.First; -end; - -function TcxTreeListControlReportLinkFormatter.IsLastNode(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode = FNodes.Last; -end; - -function TcxTreeListControlReportLinkFormatter.IsNodeExpanded(ANode: TcxTreeListNode): Boolean; -var - NextNode: TcxTreeListNode; -begin - Result := ANode.Expanded; - if not Result then - begin - NextNode := GetNextNode(ANode); - Result := (NextNode <> nil) and (NextNode.Level > ANode.Level); - end; -end; - -function TcxTreeListControlReportLinkFormatter.IsNodeFirstChild(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode.IsFirst; -end; - -function TcxTreeListControlReportLinkFormatter.IsNodeLastChild(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode.IsLast; -end; - -function TcxTreeListControlReportLinkFormatter.IsOddNode(ANode: TcxTreeListNode): Boolean; -begin - Result := Odd(FNodes.IndexOf(ANode)); -end; - -function TcxTreeListControlReportLinkFormatter.IsNodeSelected(ANode: TcxTreeListNode): Boolean; -begin - Result := ANode.Selected; -end; - -procedure TcxTreeListControlReportLinkFormatter.RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; - AEdgeStyle: TdxCellEdgeStyle); -begin - AnItem.EdgeMode := cem3DEffects; - AnItem.Edge3DStyle := AEdgeStyle; - FLookAndFeelItems.Add(AnItem); -end; - -procedure TcxTreeListControlReportLinkFormatter.SetViewParams(AnItem: TdxReportVisualItem; - const AParams: TdxReportItemViewParams); -begin - with AnItem do - begin - CellSides := AParams.CellSides; - Color := ColorToRGB(AParams.NativeParams.Color); - FontIndex := GetStyleFontIndex(AParams); - Transparent := AParams.Transparent; - end; -end; - -function TcxTreeListControlReportLinkFormatter.MakeIndentIndex(AnIndex: Integer): DWORD; -begin - Result := ReportLink.MakeIndentIndex(AnIndex); -end; - -function TcxTreeListControlReportLinkFormatter.GetAutoWidth: Boolean; -begin - Result := ReportLink.OptionsSize.AutoWidth; -end; - -function TcxTreeListControlReportLinkFormatter.GetDC: HDC; -begin - Result := ReportLink.ScreenDC; -end; - -function TcxTreeListControlReportLinkFormatter.GetExpandButtonColor: TColor; -begin - Result := ExpandButtonInteriorColors[Adapter.TreeLinesStyle = tllsSolid]; -end; - -function TcxTreeListControlReportLinkFormatter.GetExpandButtonSize: Integer; -begin - Result := DefaultExpandButtonSize; -end; - -function TcxTreeListControlReportLinkFormatter.GetGridLinesColor: TColor; -begin - Result := ReportLink.OptionsFormatting.GridLineColor; - if Result = clDefault then - Result := Adapter.GridLinesColor; -end; - -function TcxTreeListControlReportLinkFormatter.GetHasNodeSeparator: Boolean; -begin - Result := NodeSeparatorThickness > 0; -end; - -function TcxTreeListControlReportLinkFormatter.GetHasPreview: Boolean; -begin - Result := Adapter.HasPreview and ShowPreview and (PreviewAutoHeight or (PreviewMaxLineCount > 0)); -end; - -function TcxTreeListControlReportLinkFormatter.GetIndentCount(Node: TcxTreeListNode): Integer; -begin - Result := Node.Level; - if Adapter.ShowRoot then Inc(Result); -end; - -function TcxTreeListControlReportLinkFormatter.GetIsNodeColorUsedForIndents: Boolean; -begin - Result := Adapter.IsNodeColorUsedForIndents; -end; - -function TcxTreeListControlReportLinkFormatter.GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; -begin - Result := TdxReportVisualItem(FLookAndFeelItems[Index]); -end; - -function TcxTreeListControlReportLinkFormatter.GetLookAndFeelItemCount: Integer; -begin - Result := FLookAndFeelItems.Count; -end; - -function TcxTreeListControlReportLinkFormatter.GetNode(Index: Integer): TcxTreeListNode; -begin - Result := TcxTreeListNode(FNodes[Index]); -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeCount: Integer; -begin - Result := FNodes.Count; -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeSeparatorColor: TColor; -begin - Result := ReportLink.OptionsFormatting.ActualNodeSeparatorColor; -end; - -function TcxTreeListControlReportLinkFormatter.GetNodeSeparatorThickness: Integer; -begin - Result := ReportLink.OptionsFormatting.NodeSeparatorThickness; -end; - -function TcxTreeListControlReportLinkFormatter.GetPreviewAutoHeight: Boolean; -begin - Result := ReportLink.OptionsPreview.AutoHeight; -end; - -function TcxTreeListControlReportLinkFormatter.GetPreviewColumn: TcxTreeListColumn; -begin - Result := Adapter.PreviewColumn; -end; - -function TcxTreeListControlReportLinkFormatter.GetPreviewMaxLineCount: Integer; -begin - Result := ReportLink.OptionsPreview.MaxLineCount; -end; - -function TcxTreeListControlReportLinkFormatter.GetRenderer: TdxPSReportRenderer; -begin - Result := ReportLink.Renderer; -end; - -function TcxTreeListControlReportLinkFormatter.GetShowBandHeaders: Boolean; -begin - Result := ReportLink.OptionsView.BandHeaders; -end; - -function TcxTreeListControlReportLinkFormatter.GetShowFooters: Boolean; -begin - Result := ReportLink.OptionsView.Footers; -end; - -function TcxTreeListControlReportLinkFormatter.GetShowHeaders: Boolean; -begin - Result := ReportLink.OptionsView.Headers; -end; - -function TcxTreeListControlReportLinkFormatter.GetShowPreview: Boolean; -begin - Result := ReportLink.OptionsPreview.Visible; -end; - -function TcxTreeListControlReportLinkFormatter.GetUseLookAndFeelColors: Boolean; -begin - Result := ReportLink.OptionsFormatting.UseLookAndFeelColors; -end; - -function TcxTreeListControlReportLinkFormatter.GetViewWidth: Integer; -begin - Result := Adapter.ViewWidth; -end; - -function TcxTreeListControlReportLinkFormatter.GetTreeLinesColor: TColor; -begin - Result := Adapter.TreeLinesColor; -end; - -function TcxTreeListControlReportLinkFormatter.GetTreeLinesStyle: TcxTreeListTreeLineStyle; -begin - Result := Adapter.TreeLinesStyle; -end; - -procedure TcxTreeListControlReportLinkFormatter.FormatLookAndFeelItems; -const - Borders3D: array[TdxCellEdgeStyle, Boolean] of TdxPSCellBorderClass = - ((TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder), - (TdxPSCellSunkenBorder, TdxPSCellSunkenSoftBorder)); -var - I: Integer; -begin - for I := 0 to LookAndFeelItemCount - 1 do - with LookAndFeelItems[I] do - if ReportLink.Effects3D then - BorderClass := Borders3D[Edge3DStyle, ReportLink.Soft3D] - else - BorderClass := TdxPSCellUltraFlatBorder; -end; - -{ TcxTreeListReportLinkOptionsExpanding } - -procedure TcxTreeListReportLinkOptionsExpanding.Assign(Source: TPersistent); -begin - if Source is TcxTreeListReportLinkOptionsExpanding then - with TcxTreeListReportLinkOptionsExpanding(Source) do - begin - Self.AutoExpandNodes := AutoExpandNodes; - Self.ExplicitlyExpandNodes := ExplicitlyExpandNodes; - end; - inherited; -end; - -procedure TcxTreeListReportLinkOptionsExpanding.RestoreDefaults; -begin - inherited; - AutoExpandNodes := False; - ExplicitlyExpandNodes := False; -end; - -function TcxTreeListReportLinkOptionsExpanding.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TcxTreeListReportLinkOptionsExpanding.GetReportLink: TcxTreeListControlReportLink; -begin - Result := inherited ReportLink as TcxTreeListControlReportLink; -end; - -procedure TcxTreeListReportLinkOptionsExpanding.SetAutoExpandNodes(Value: Boolean); -begin - if FAutoExpandNodes <> Value then - begin - FAutoExpandNodes := Value; - Changed; - end; -end; - -procedure TcxTreeListReportLinkOptionsExpanding.SetExplicitlyExpandNodes(Value: Boolean); -begin - if FExplicitlyExpandNodes <> Value then - begin - FExplicitlyExpandNodes := Value; - Changed; - end; -end; - -{ TcxTreeListReportLinkOptionsFormatting } - -procedure TcxTreeListReportLinkOptionsFormatting.Assign(Source: TPersistent); -begin - if Source is TcxTreeListReportLinkOptionsFormatting then - with TcxTreeListReportLinkOptionsFormatting(Source) do - begin - Self.ConsumeSelectionStyle := ConsumeSelectionStyle; - Self.NodeSeparatorColor := NodeSeparatorColor; - Self.NodeSeparatorThickness := NodeSeparatorThickness; - end; - inherited; -end; - -procedure TcxTreeListReportLinkOptionsFormatting.RestoreDefaults; -begin - inherited; - ConsumeSelectionStyle := False; - NodeSeparatorColor := clDefault; - NodeSeparatorThickness := 0; -end; - -function TcxTreeListReportLinkOptionsFormatting.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TcxTreeListReportLinkOptionsFormatting.GetActualNodeSeparatorColor: TColor; -begin - Result := NodeSeparatorColor; - if Result = clDefault then - Result := dxPSDefaultTreeListNodeSeparatorColor; -end; - -function TcxTreeListReportLinkOptionsFormatting.GetReportLink: TcxTreeListControlReportLink; -begin - Result := inherited ReportLink as TcxTreeListControlReportLink; -end; - -procedure TcxTreeListReportLinkOptionsFormatting.SetConsumeSelectionStyle(Value: Boolean); -begin - if FConsumeSelectionStyle <> Value then - begin - FConsumeSelectionStyle := Value; - Changed; - end; -end; - -procedure TcxTreeListReportLinkOptionsFormatting.SetNodeSeparatorColor(Value: TColor); -begin - if FNodeSeparatorColor <> Value then - begin - FNodeSeparatorColor := Value; - if NodeSeparatorThickness <> 0 then Changed; - end; -end; - -procedure TcxTreeListReportLinkOptionsFormatting.SetNodeSeparatorThickness(Value: Integer); -begin - if Value < 0 then Value := 0; - if FNodeSeparatorThickness <> Value then - begin - FNodeSeparatorThickness := Value; - Changed; - end; -end; - -{ TcxTreeListReportLinkOptionsOnEveryPage } - -function TcxTreeListReportLinkOptionsOnEveryPage.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TcxTreeListReportLinkOptionsOnEveryPage.GetReportLink: TcxTreeListControlReportLink; -begin - Result := inherited ReportLink as TcxTreeListControlReportLink; -end; - -{ TcxTreeListReportLinkOptionsPagination } - -function TcxTreeListReportLinkOptionsPagination.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TcxTreeListReportLinkOptionsPagination.GetNode: Boolean; -begin - Result := inherited Row; -end; - -function TcxTreeListReportLinkOptionsPagination.GetReportLink: TcxTreeListControlReportLink; -begin - Result := inherited ReportLink as TcxTreeListControlReportLink; -end; - -procedure TcxTreeListReportLinkOptionsPagination.SetNode(Value: Boolean); -begin - inherited Row := Value; -end; - -{ TcxTreeListReportLinkOptionsPreview } - -function TcxTreeListReportLinkOptionsPreview.DesignerTabIndex: Integer; -begin - Result := 4; -end; - -function TcxTreeListReportLinkOptionsPreview.GetReportLink: TcxTreeListControlReportLink; -begin - Result := inherited ReportLink as TcxTreeListControlReportLink; -end; - -{ TcxTreeListReportLinkOptionsRefinements } - -function TcxTreeListReportLinkOptionsRefinements.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TcxTreeListReportLinkOptionsRefinements.GetReportLink: TcxTreeListControlReportLink; -begin - Result := inherited ReportLink as TcxTreeListControlReportLink; -end; - -{ TcxTreeListReportLinkOptionsSelection } - -function TcxTreeListReportLinkOptionsSelection.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TcxTreeListReportLinkOptionsSelection.GetReportLink: TcxTreeListControlReportLink; -begin - Result := inherited ReportLink as TcxTreeListControlReportLink; -end; - -{ TcxTreeListReportLinkOptionsSize } - -function TcxTreeListReportLinkOptionsSize.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TcxTreeListReportLinkOptionsSize.GetReportLink: TcxTreeListControlReportLink; -begin - Result := inherited ReportLink as TcxTreeListControlReportLink; -end; - -{ TcxTreeListReportLinkOptionsView } - -procedure TcxTreeListReportLinkOptionsView.Assign(Source: TPersistent); -begin - if Source is TcxTreeListReportLinkOptionsView then - with TcxTreeListReportLinkOptionsView(Source) do - begin - Self.Borders := Borders; - Self.TreeLines := TreeLines; - end; - inherited; -end; - -procedure TcxTreeListReportLinkOptionsView.RestoreDefaults; -begin - inherited; - Borders := True; - TreeLines := True; -end; - -function TcxTreeListReportLinkOptionsView.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TcxTreeListReportLinkOptionsView.GetReportLink: TcxTreeListControlReportLink; -begin - Result := inherited ReportLink as TcxTreeListControlReportLink; -end; - -procedure TcxTreeListReportLinkOptionsView.SetBorders(Value: Boolean); -begin - if FBorders <> Value then - begin - FBorders := Value; - Changed; - end; -end; - -procedure TcxTreeListReportLinkOptionsView.SetTreeLines(Value: Boolean); -begin - if FTreeLines <> Value then - begin - FTreeLines := Value; - Changed; - end; -end; - -{ TcxTreeListReportLinkStyles } - -procedure TcxTreeListReportLinkStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxTreeListReportLinkStyles then - with TcxTreeListReportLinkStyles(Source) do - begin - Self.BandHeader := BandHeader; - Self.Content := Content; - Self.ContentEven := ContentEven; - Self.ContentOdd := ContentOdd; - Self.Footer := Footer; - Self.FooterRow := FooterRow; - Self.Header := Header; - Self.Preview := Preview; - end; -end; - -procedure TcxTreeListReportLinkStyles.GetBandHeaderParams(ABand: TcxTreeListBand; - out AParams: TcxViewParams); -begin - GetViewParams(vspsTreeListBandHeader, ABand, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetColumnFooterParams(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn; out AParams: TcxViewParams); -begin - GetViewParams(vspsTreeListFooter, ANode, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetColumnHeaderParams(AColumn: TcxTreeListColumn; - out AParams: TcxViewParams); -begin - GetViewParams(vspsTreeListHeader, nil, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetContentParams(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn; out AParams: TcxViewParams); - - function IsOddNode(ANode: TcxTreeListNode): Boolean; - var - Builder: TcxTreeListControlReportLinkBuilder; - begin - Builder := ReportLink.Builder; - if Builder <> nil then - Result := Builder.Formatter.IsOddNode(ANode) - else - Result := Odd(ANode.VisibleIndex); - end; - -const - StyleIndexes: array[Boolean] of Integer = (vspsTreeListContentEven, vspsTreeListContentOdd); -begin - if (ANode <> nil) and (GetValue(StyleIndexes[IsOddNode(ANode)]) <> nil) then - GetViewParams(StyleIndexes[IsOddNode(ANode)], ANode, nil, AParams) - else - GetViewParams(vspsTreeListContent, ANode, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetFooterRowParams(out AParams: TcxViewParams); -begin - GetViewParams(vspsTreeListFooterRow, nil, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetImagesParams(ANode: TcxTreeListNode; - out AParams: TcxViewParams); -begin - GetContentParams(ANode, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetIndentParams(ANode: TcxTreeListNode; - AnIndent: Integer; out AParams: TcxViewParams); - - function IsNodeColorUsedForIndents: Boolean; - var - Builder: TcxTreeListControlReportLinkBuilder; - begin - Builder := ReportLink.Builder; - Result := (Builder <> nil) and Builder.Formatter.IsNodeColorUsedForIndents; - end; - -begin - if IsNodeColorUsedForIndents then - GetContentParams(ANode, nil, AParams) - else - GetViewParams(vspsTreeListIndent, ANode, nil{AnIndent}, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetPreviewParams(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn; out AParams: TcxViewParams); -begin - GetViewParams(vspsTreeListPreview, ANode, nil, AParams); -end; - -procedure TcxTreeListReportLinkStyles.GetSelectionParams(out AParams: TcxViewParams); -begin - GetViewParams(vspsTreeListSelection, nil, nil, AParams); -end; - -function TcxTreeListReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 3; -end; - -procedure TcxTreeListReportLinkStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -const - FixedParts = [vspsTreeListBandHeader, vspsTreeListFooter, vspsTreeListFooterRow, - vspsTreeListHeader, vspsTreeListSelection]; -begin - inherited; - if ReportLink <> nil then - with AParams do - begin - if Index in FixedParts then - Color := dxPSCore.dxDefaultFixedColor - else - Color := dxPSCore.dxDefaultContentColor; //TreeListReportLink.Color; // ??? - - Font := ReportLink.Font; - TextColor := Font.Color; - end; -end; - -class function TcxTreeListReportLinkStyles.GetStyleCaption(AnIndex: Integer): string; -begin - case AnIndex of - vspsTreeListBandHeader: - Result := cxGetResourceString(@sdxBandHeaderStyle); - vspsTreeListContent: - Result := cxGetResourceString(@sdxContentStyle); - vspsTreeListContentEven: - Result := cxGetResourceString(@sdxContentEvenStyle); - vspsTreeListContentOdd: - Result := cxGetResourceString(@sdxContentOddStyle); - vspsTreeListFooter: - Result := cxGetResourceString(@sdxFooterStyle); - vspsTreeListFooterRow: - Result := cxGetResourceString(@sdxFooterRowStyle); - vspsTreeListHeader: - Result := cxGetResourceString(@sdxHeaderStyle); - vspsTreeListIndent: - Result := cxGetResourceString(@sdxIndentStyle); - vspsTreeListPreview: - Result := cxGetResourceString(@sdxPreviewStyle); - else - Result := cxGetResourceString(@sdxSelectionStyle); - end; -end; - -function TcxTreeListReportLinkStyles.GetStyleIndexByCaption(const Caption: string): Integer; -begin - for Result := vspsTreeListFirst to vspsTreeListLast do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Result)) then - Exit; - Result := -1; -end; - -function TcxTreeListReportLinkStyles.GetReportLink: TcxTreeListControlReportLink; -begin - Result := inherited ReportLink as TcxTreeListControlReportLink; -end; - -{ TcxTreeListReportLinkStyleSheet } - -class function TcxTreeListReportLinkStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxTreeListReportLinkStyles; -end; - -function TcxTreeListReportLinkStyleSheet.GetStylesValue: TcxTreeListReportLinkStyles; -begin - if GetStyles is TcxTreeListReportLinkStyles then - Result := TcxTreeListReportLinkStyles(GetStyles) - else - Result := nil; -end; - -procedure TcxTreeListReportLinkStyleSheet.SetStylesValue(Value: TcxTreeListReportLinkStyles); -begin - SetStyles(Value); -end; - -{ TcxTreeListControlAttributeHostInfo } - -procedure TcxTreeListControlAttributeHostInfo.Initialize(AParent: TdxReportCell); -begin - Origin := NullPoint; - FParent := AParent; -end; - -{ TcxTreeListControlAttributeHostInfoServices } - -constructor TcxTreeListAttributeHostInfoServices.Create(AReportLink: TcxTreeListControlReportLink); -begin - inherited Create; - FReportLink := AReportLink; - CreateHostInfos; -end; - -destructor TcxTreeListAttributeHostInfoServices.Destroy; -begin - DestroyHostInfos; - inherited; -end; - -procedure TcxTreeListAttributeHostInfoServices.InitializeHostInfos; -begin - PageDetailsHostInfo.Initialize(PageDetails); - PageFootersHostInfo.Initialize(PageFooters); - PageHeadersHostInfo.Initialize(PageHeaders); -end; - -procedure TcxTreeListAttributeHostInfoServices.CreateHostInfos; -begin - FPageDetailsHostInfo := TcxTreeListControlAttributeHostInfo.Create; - FPageFootersHostInfo := TcxTreeListControlAttributeHostInfo.Create; - FPageHeadersHostInfo := TcxTreeListControlAttributeHostInfo.Create; -end; - -procedure TcxTreeListAttributeHostInfoServices.DestroyHostInfos; -begin - FreeAndNil(FPageHeadersHostInfo); - FreeAndNil(FPageFootersHostInfo); - FreeAndNil(FPageDetailsHostInfo); -end; - -function TcxTreeListAttributeHostInfoServices.GetBandHeadersHostInfo: TcxTreeListControlAttributeHostInfo; -begin - if CanUseBandHeadersOnEveyPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TcxTreeListAttributeHostInfoServices.GetFootersHostInfo: TcxTreeListControlAttributeHostInfo; -begin - if CanUseFootersOnEveryPage then - Result := PageFootersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TcxTreeListAttributeHostInfoServices.GetHeadersHostInfo: TcxTreeListControlAttributeHostInfo; -begin - if CanUseHeadersOnEveryPage then - Result := PageHeadersHostInfo - else - Result := PageDetailsHostInfo; -end; - -function TcxTreeListAttributeHostInfoServices.GetInconsistentStateText: string; -begin - if ReportLink.IsAggregated then - Result := cxGetResourceString(@sdxCannotUseOnEveryPageModeInAggregatedState) - else - if IsInconsistentHeadersState then - Result := cxGetResourceString(@sdxTLIncorrectHeadersState) - else - Result := ''; -end; - -function TcxTreeListAttributeHostInfoServices.GetIsInconsistentState: Boolean; -begin - Result := ReportLink.IsAggregated or IsInconsistentHeadersState; -end; - -function TcxTreeListAttributeHostInfoServices.HasCells: Boolean; -begin - Result := ReportLink.ReportCells <> nil; -end; - -function TcxTreeListAttributeHostInfoServices.GetArePageFootersAssigned: Boolean; -begin - Result := FootersHostInfo.Parent = ReportLink.ReportCells.FooterCells; -end; - -function TcxTreeListAttributeHostInfoServices.GetArePageHeadersAssigned: Boolean; -begin - with ReportLink.ReportCells do - Result := (BandHeadersHostInfo.Parent = HeaderCells) or (HeadersHostInfo.Parent = HeaderCells); -end; - -function TcxTreeListAttributeHostInfoServices.GetCanUseBandHeadersOnEveyPage: Boolean; -begin - Result := not ReportLink.IsAggregated and OptionsOnEveryPage.BandHeaders; -end; - -function TcxTreeListAttributeHostInfoServices.GetCanUseFootersOnEveryPage: Boolean; -begin - Result := not ReportLink.IsAggregated and OptionsOnEveryPage.Footers; -end; - -function TcxTreeListAttributeHostInfoServices.GetCanUseHeadersOnEveryPage: Boolean; -begin - Result := not ReportLink.IsAggregated and OptionsOnEveryPage.Headers and - ((BandHeadersHostInfo = PageHeadersHostInfo) or not OptionsView.BandHeaders); -end; - -function TcxTreeListAttributeHostInfoServices.GetIsInconsistentHeadersState: Boolean; -begin - Result := OptionsOnEveryPage.Headers and OptionsView.Headers and OptionsView.BandHeaders and not OptionsOnEveryPage.BandHeaders; -end; - -function TcxTreeListAttributeHostInfoServices.GetOptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage; -begin - Result := ReportLink.OptionsOnEveryPage; -end; - -function TcxTreeListAttributeHostInfoServices.GetOptionsView: TcxTreeListReportLinkOptionsView; -begin - Result := ReportLink.OptionsView; -end; - -function TcxTreeListAttributeHostInfoServices.GetPageDetails: TdxReportCell; -begin - if HasCells then - Result := ReportLink.ReportCells.Cells - else - Result := nil; -end; - -function TcxTreeListAttributeHostInfoServices.GetPageFooters: TdxReportCell; -begin - if HasCells then - Result := ReportLink.ReportCells.FooterCells - else - Result := PageDetails; -end; - -function TcxTreeListAttributeHostInfoServices.GetPageHeaders: TdxReportCell; -begin - if HasCells then - Result := ReportLink.ReportCells.HeaderCells - else - Result := PageDetails; -end; - -{ TcxTreeListControlReportLink } - -constructor TcxTreeListControlReportLink.Create(AOwner: TComponent); -begin - inherited; - FDelimitersHardVert := TList.Create; - FHostInfoServices := TcxTreeListAttributeHostInfoServices.Create(Self); - FReportRows := TList.Create; - InternalRestoreDefaults; - LinkModified(False); -end; - -destructor TcxTreeListControlReportLink.Destroy; -begin - FreeAndNil(FReportRows); - FreeAndNil(FHostInfoServices); - FreeAndNil(FDelimitersHardVert); - inherited; -end; - -procedure TcxTreeListControlReportLink.AddPageBreak(ANode: TcxTreeListNode); -var - ReportRow: TdxReportCell; -begin - ReportRow := ReportRowsByNode[ANode]; - if ReportRow <> nil then - AddVerticalHardDelimiter(ReportRow); -end; - -procedure TcxTreeListControlReportLink.AddPageBreak(const ANodes: array of TcxTreeListNode); -var - I: Integer; -begin - for I := Low(ANodes) to High(ANodes) do - AddPageBreak(ANodes[I]); -end; - -procedure TcxTreeListControlReportLink.AddPageBreak(const ANodes: TcxTreeListNodeArray); -var - I: Integer; -begin - for I := 0 to Length(ANodes) - 1 do - AddPageBreak(ANodes[I]); -end; - -procedure TcxTreeListControlReportLink.AddPageBreak(ANodes: TList); -var - I: Integer; - P: Pointer ; -begin - for I := 0 to ANodes.Count - 1 do - begin - P := ANodes[I]; - if TObject(P) is TcxTreeListNode then - AddPageBreak(TcxTreeListNode(P)); - end; -end; - -procedure TcxTreeListControlReportLink.ConstructReport(AReportCells: TdxReportCells); - - function HasData: Boolean; - begin - Result := (CustomTreeListControl_GetVisibleColumnCount(TreeListControl) <> 0) and - (CustomTreeListControl_GetNodes(TreeListControl).Count <> 0); - end; - - procedure Build; - begin - FBuilder := CreateBuilder; - try - FBuilder.Build; - finally - FreeAndNil(FBuilder); - end; - end; - - procedure CalculateSizes; - - procedure CalculateReportPartSizes(ACell: TdxReportCell); - var - Width, I, V: Integer; - begin - if ACell.CellCount > 0 then - begin - Width := 0; - for I := 0 to ACell.CellCount - 1 do - begin - V := ACell.Cells[I].Width; - if Width < V then Width := V; - end; - ACell.BoundsRect := MakeRect(0, 0, Width, ACell[ACell.CellCount - 1].BoundsRect.Bottom); - end; - end; - - begin - with AReportCells do - begin - CalculateReportPartSizes(Cells); - if AreFooterCellsAllocated then CalculateReportPartSizes(FooterCells); - if AreHeaderCellsAllocated then CalculateReportPartSizes(HeaderCells); - end; - end; - -begin - if TreeListControl = nil then Exit; - inherited; - if not HasData then Exit; - - PrepareConstruct; - try - Build; - if not AbortBuilding then CalculateSizes; - finally - UnprepareConstruct; - end; -end; - -procedure TcxTreeListControlReportLink.ConvertCoords; -begin - inherited; - ConvertDelimiters(DelimitersHardVert); -end; - -procedure TcxTreeListControlReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - DrawInfo: TcxTreeListCellCustomDrawInfo; -begin - GetItemCustomDrawInfo(AItem, DrawInfo); - with DrawInfo do - case AttributeID of - cxTreeListBandID: - DoCustomDrawBandCell(ACanvas, Band, TdxReportCellImage(AItem), ADone); - cxTreeListFooterID: - DoCustomDrawFooterCell(ACanvas, Column, TdxReportCellString(AItem), ADone); - cxTreeListHeaderID: - DoCustomDrawHeaderCell(ACanvas, Column, TdxReportCellImage(AItem), ADone); - cxTreeListIndentID: - DoCustomDrawIndentCell(ACanvas, Node, Index, AItem, ADone); - cxTreeListNodeID: - DoCustomDrawCell(ACanvas, Node, Column, AItem, ADone); - end; -end; - -function TcxTreeListControlReportLink.GetBreakPagesByHardDelimiters: Boolean; -begin - Result := OptionsPagination.Custom; -end; - -procedure TcxTreeListControlReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(CustomTreeListControl_GetImages(TreeListControl)); - AProc(CustomTreeListControl_GetStateImages(TreeListControl)); -end; - -function TcxTreeListControlReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := (AUpdateCodes * uaMarginsVert <> []) and OptionsSize.AutoWidth; -end; - -function TcxTreeListControlReportLink.GetUseHardVertDelimiters: Boolean; -begin - Result := OptionsPagination.Custom; -end; - -procedure TcxTreeListControlReportLink.InternalRestoreFromOriginal; -var - TreeListOptionsView: TcxTreeListOptionsView; - TreeListPreview: TcxTreeListPreview; -begin - inherited; - if TreeListControl <> nil then - begin - OptionsFormatting.LookAndFeelKind := CustomTreeListControl_GetLookAndFeel(TreeListControl).Kind; - - TreeListPreview := CustomTreeListControl_GetPreview(TreeListControl); - with OptionsPreview do - begin - AutoHeight := TreeListPreview.AutoHeight; - MaxLineCount := TreeListPreview.MaxLineCount; - Visible := TreeListPreview.Visible; - end; - - TreeListOptionsView := CustomTreeListControl_GetOptionsView(TreeListControl); - with OptionsView do - begin - BandHeaders := TreeListOptionsView.Bands; - ExpandButtons := TreeListOptionsView.Buttons; - Footers := TreeListOptionsView.Footer; - Headers := TreeListOptionsView.Headers; - TreeLines := TreeListOptionsView.TreeLineStyle <> tllsNone; - end; - OptionsSize.AutoWidth := TreeListOptionsView.ColumnAutoWidth; - end; -end; - -function TcxTreeListControlReportLink.IsDrawFootersOnEveryPage: Boolean; -begin - Result := HostInfoServices.ArePageFootersAssigned; -end; - -function TcxTreeListControlReportLink.IsDrawHeadersOnEveryPage: Boolean; -begin - Result := HostInfoServices.ArePageHeadersAssigned; -end; - -function TcxTreeListControlReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -var - DrawInfo: TcxTreeListCellCustomDrawInfo; -begin - Result := inherited IsSupportedCustomDraw(Item) and - (Item <> nil) and IsCustomDrawn(GetItemCustomDrawInfo(Item, DrawInfo)); -end; - -procedure TcxTreeListControlReportLink.MakeHardDelimiters(AReportCells: TdxReportCells; - AVertDelimiters: TList); -begin - inherited; - - if OptionsPagination.Custom then - try - DoGetCustomPageBreaks; - except - Application.HandleException(Self); - end; - dxPSUtl.dxCopyList(DelimitersHardVert, AVertDelimiters); -end; - -function TcxTreeListControlReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := OptionsFormatting.UseNativeStyles; -end; - -function TcxTreeListControlReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TcxTreeListReportLinkStyles; -end; - -function TcxTreeListControlReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TcxTreeListReportLinkStyleSheet; -end; - -function TcxTreeListControlReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := DefaultdxPScxTreeListLinkStyleSheet; -end; - -procedure TcxTreeListControlReportLink.PrepareConstruct; -begin - inherited; - DelimitersHardVert.Clear; - FReportRows.Clear; - - ReportCells.LookAndFeel := nil;//CreateGroupLookAndFeel(TdxPSReportGroupNullLookAndFeel); - - HostInfoServices.InitializeHostInfos; - if OptionsExpanding.ExplicitlyExpandNodes then - TreeListControl.FullExpand; -end; - -procedure TcxTreeListControlReportLink.DoCustomDrawBandCell(ACanvas: TCanvas; - ABand: TcxTreeListBand; AnItem: TdxReportCellImage; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawBandCell) then - FOnCustomDrawBandCell(Self, ACanvas, ABand, AnItem, ADone); -end; - -procedure TcxTreeListControlReportLink.DoCustomDrawCell(ACanvas: TCanvas; - ANode: TcxTreeListNode; AColumn: TcxTreeListColumn; - AnItem: TAbstractdxReportCellData; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCell) then - FOnCustomDrawCell(Self, ACanvas, ANode, AColumn, AnItem, ADone); -end; - -procedure TcxTreeListControlReportLink.DoCustomDrawFooterCell(ACanvas: TCanvas; - AColumn: TcxTreeListColumn; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFooterCell) then - FOnCustomDrawFooterCell(Self, ACanvas, AColumn, AnItem, ADone); -end; - -procedure TcxTreeListControlReportLink.DoCustomDrawHeaderCell(ACanvas: TCanvas; - AColumn: TcxTreeListColumn; AnItem: TdxReportCellImage; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeaderCell) then - FOnCustomDrawHeaderCell(Self, ACanvas, AColumn, AnItem, ADone); -end; - -procedure TcxTreeListControlReportLink.DoCustomDrawIndentCell(ACanvas: TCanvas; - ANode: TcxTreeListNode; AnIndex: Integer; AnItem: TAbstractdxReportCellData; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawIndentCell) then - FOnCustomDrawIndentCell(Self, ACanvas, ANode, AnIndex, AnItem, ADone); -end; - -procedure TcxTreeListControlReportLink.DoGetCustomPageBreaks; -begin - if Assigned(FOnGetCustomPageBreaks) then FOnGetCustomPageBreaks(Self); -end; - -procedure TcxTreeListControlReportLink.DoInitializeBandCell(ABand: TcxTreeListBand; - AnItem: TdxReportCellImage); -begin - if Assigned(FOnInitializeBandCell) then - FOnInitializeBandCell(Self, ABand, AnItem); -end; - -procedure TcxTreeListControlReportLink.DoInitializeCell(ANode: TcxTreeListNode; - AColumn: TcxTreeListColumn; AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeCell) then - FOnInitializeCell(Self, ANode, AColumn, AnItem); -end; - -procedure TcxTreeListControlReportLink.DoInitializeFooterCell(AColumn: TcxTreeListColumn; - AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeFooterCell) then - FOnInitializeFooterCell(Self, AColumn, AnItem); -end; - -procedure TcxTreeListControlReportLink.DoInitializeHeaderCell(AColumn: TcxTreeListColumn; - AnItem: TdxReportCellImage); -begin - if Assigned(FOnInitializeHeaderCell) then - FOnInitializeHeaderCell(Self, AColumn, AnItem); -end; - -procedure TcxTreeListControlReportLink.DoInitializeIndentCell(ANode: TcxTreeListNode; - AnIndex: Integer; AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeIndentCell) then - FOnInitializeIndentCell(Self, ANode, AnIndex, AnItem); -end; - -function TcxTreeListControlReportLink.GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; -begin - Result := TcxTreeListReportLinkOptionsExpanding; -end; - -function TcxTreeListControlReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TcxTreeListReportLinkOptionsFormatting; -end; - -function TcxTreeListControlReportLink.GetOptionsOnEveryPageClass: TdxCustomTableControlReportLinkOptionsOnEveryPageClass; -begin - Result := TcxTreeListReportLinkOptionsOnEveryPage; -end; - -function TcxTreeListControlReportLink.GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; -begin - Result := TcxTreeListReportLinkOptionsPagination; -end; - -function TcxTreeListControlReportLink.GetOptionsPreviewClass: TdxCustomTableControlReportLinkOptionsPreviewClass; -begin - Result := TcxTreeListReportLinkOptionsPreview; -end; - -function TcxTreeListControlReportLink.GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; -begin - Result := TcxTreeListReportLinkOptionsRefinements; -end; - -function TcxTreeListControlReportLink.GetOptionsSelectionClass: TdxCustomTableControlReportLinkOptionsSelectionClass; -begin - Result := TcxTreeListReportLinkOptionsSelection; -end; - -function TcxTreeListControlReportLink.GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; -begin - Result := TcxTreeListReportLinkOptionsSize; -end; - -function TcxTreeListControlReportLink.GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; -begin - Result := TcxTreeListReportLinkOptionsView; -end; - -procedure TcxTreeListControlReportLink.AddReportRow(AReportRow: TdxReportCell); -begin - FReportRows.Add(AReportRow); -end; - -procedure TcxTreeListControlReportLink.AddVerticalHardDelimiter(ADelimiter: TdxReportCell); -begin - AddVerticalHardDelimiter(ADelimiter.AbsoluteRect.Top); -end; - -procedure TcxTreeListControlReportLink.AddVerticalHardDelimiter(ADelimiter: Integer); -begin - FDelimitersHardVert.Add(TObject(ADelimiter)); -end; - -function TcxTreeListControlReportLink.CreateBuilder: TcxTreeListControlReportLinkBuilder; -begin - Result := GetBuilderClass.Create(Self); -end; - -class function TcxTreeListControlReportLink.GetBuilderClass: TcxTreeListControlReportLinkBuilderClass; -begin - Result := TcxTreeListControlReportLinkBuilder; -end; - -function TcxTreeListControlReportLink.ExtractIndentIndex(AData: Integer): Integer; -begin - Result := (AData and NodeIndentMask) shr NodeIndentOffset; -end; - -function TcxTreeListControlReportLink.GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; - out ADrawInfo: TcxTreeListCellCustomDrawInfo): TcxTreeListAttributeID; - - function IsBand(AData: DWORD): Boolean; - begin - try - Result := IsDelphiObject(AData) and (TObject(AData) is TcxTreeListBand); - except - Result := False; - end; - if Result then - begin - ADrawInfo.Band := TcxTreeListBand(AData); - ADrawInfo.AttributeID := cxTreeListBandID; - end; - end; - - function IsColumn(AData: DWORD): Boolean; - begin - try - Result := IsDelphiObject(AData) and (TObject(AData) is TcxTreeListColumn); - except - Result := False; - end; - if Result then - ADrawInfo.Column := TcxTreeListColumn(AData); - end; - - function IsFooter(AData: DWORD): Boolean; - begin - try - Result := TClass(AData) = TcxTreeListFooterAttribute; - except - Result := False; - end; - if Result then - ADrawInfo.AttributeID := cxTreeListFooterID; - end; - - function IsHeader(AData: Integer): Boolean; - begin - try - Result := IsDelphiObject(AData) and TClass(AData).InheritsFrom(TcxTreeListHeaderAttribute); - except - Result := False; - end; - if Result then - ADrawInfo.AttributeID := cxTreeListHeaderID; - end; - - function IsIndent(AData: DWORD): Boolean; - begin - Result := True; - ADrawInfo.Index := ExtractIndentIndex(AData); - ADrawInfo.AttributeID := cxTreeListIndentID; - end; - - function IsNode(AData: DWORD): Boolean; - begin - try - Result := IsDelphiObject(AData) and (TObject(AData) is TcxTreeListNode); - except - Result := False; - end; - if Result then - begin - ADrawInfo.Node := TcxTreeListNode(AData); - ADrawInfo.AttributeID := cxTreeListNodeID; - end; - end; - -var - Data: DWORD; -begin - FillChar(ADrawInfo, SizeOf(ADrawInfo), 0); - try - try - Data := AnItem.Data; - if IsColumn(Data) then - begin - if AnItem.Parent <> nil then - begin - Data := AnItem.Parent.Data; - if not IsNode(Data) then - if not IsHeader(Data) then IsFooter(Data); - end; - end - else - if not IsBand(Data) then IsIndent(Data); - except - FillChar(ADrawInfo, SizeOf(ADrawInfo), 0); - end; - finally - Result := ADrawInfo.AttributeID; - end; -end; - -function TcxTreeListControlReportLink.IsCustomDrawn(AnAttributeID: TcxTreeListAttributeID): Boolean; -begin - Result := False; - case AnAttributeID of - cxTreeListBandID: - Result := Assigned(FOnCustomDrawBandCell); - cxTreeListFooterID: - Result := Assigned(FOnCustomDrawFooterCell); - cxTreeListHeaderID: - Result := Assigned(FOnCustomDrawHeaderCell); - cxTreeListIndentID: - Result := Assigned(FOnCustomDrawIndentCell); - cxTreeListNodeID: - Result := Assigned(FOnCustomDrawCell); - end; -end; - -function TcxTreeListControlReportLink.MakeIndentIndex(AnIndex: Integer): DWORD; -begin - Result := AnIndex shl NodeIndentOffset; -end; - -function TcxTreeListControlReportLink.GetActiveStyles: TcxTreeListReportLinkStyles; -begin - Result := inherited ActiveStyles as TcxTreeListReportLinkStyles; -end; - -function TcxTreeListControlReportLink.GetDesignWindow: TdxfmTreeListReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TdxfmTreeListReportLinkDesignWindow; -end; - -function TcxTreeListControlReportLink.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := FReportRows[Index]; -end; - -function TcxTreeListControlReportLink.GetReportRowByNode(Node: TcxTreeListNode): TdxReportCell; -var - I: Integer; -begin - if (Node <> nil) and not Node.IsFirstVisible then - for I := 0 to ReportRowCount - 1 do - begin - Result := ReportRows[I]; - if Result.Data = Integer(Node) then Exit; - end; - Result := nil; -end; - -function TcxTreeListControlReportLink.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TcxTreeListControlReportLink.GetOptionsExpanding: TcxTreeListReportLinkOptionsExpanding; -begin - Result := inherited OptionsExpanding as TcxTreeListReportLinkOptionsExpanding; -end; - -function TcxTreeListControlReportLink.GetOptionsFormatting: TcxTreeListReportLinkOptionsFormatting; -begin - Result := inherited OptionsFormatting as TcxTreeListReportLinkOptionsFormatting; -end; - -function TcxTreeListControlReportLink.GetOptionsOnEveryPage: TcxTreeListReportLinkOptionsOnEveryPage; -begin - Result := inherited OptionsOnEveryPage as TcxTreeListReportLinkOptionsOnEveryPage; -end; - -function TcxTreeListControlReportLink.GetOptionsPagination: TcxTreeListReportLinkOptionsPagination; -begin - Result := inherited OptionsPagination as TcxTreeListReportLinkOptionsPagination; -end; - -function TcxTreeListControlReportLink.GetOptionsPreview: TcxTreeListReportLinkOptionsPreview; -begin - Result := inherited OptionsPreview as TcxTreeListReportLinkOptionsPreview; -end; - -function TcxTreeListControlReportLink.GetOptionsRefinements: TcxTreeListReportLinkOptionsRefinements; -begin - Result := inherited OptionsRefinements as TcxTreeListReportLinkOptionsRefinements; -end; - -function TcxTreeListControlReportLink.GetOptionsSelection: TcxTreeListReportLinkOptionsSelection; -begin - Result := inherited OptionsSelection as TcxTreeListReportLinkOptionsSelection; -end; - -function TcxTreeListControlReportLink.GetOptionsSize: TcxTreeListReportLinkOptionsSize; -begin - Result := inherited OptionsSize as TcxTreeListReportLinkOptionsSize; -end; - -function TcxTreeListControlReportLink.GetOptionsView: TcxTreeListReportLinkOptionsView; -begin - Result := inherited OptionsView as TcxTreeListReportLinkOptionsView; -end; - -function TcxTreeListControlReportLink.GetStyles: TcxTreeListReportLinkStyles; -begin - Result := inherited Styles as TcxTreeListReportLinkStyles; -end; - -function TcxTreeListControlReportLink.GetTreeListControl: TcxCustomTreeListControl; -begin - Result := TcxCustomTreeListControl(Component); -end; - -procedure TcxTreeListControlReportLink.SetOnCustomDrawBandCell(Value: TcxTreeListReportLinkCustomDrawBandCellEvent); -begin - if @FOnCustomDrawBandCell <> @Value then - begin - FOnCustomDrawBandCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxTreeListControlReportLink.SetOnCustomDrawCell(Value: TcxTreeListReportLinkCustomDrawCellEvent); -begin - if @FOnCustomDrawCell <> @Value then - begin - FOnCustomDrawCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxTreeListControlReportLink.SetOnCustomDrawFooterCell(Value: TcxTreeListReportLinkCustomDrawFooterCellEvent); -begin - if @FOnCustomDrawFooterCell <> @Value then - begin - FOnCustomDrawFooterCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxTreeListControlReportLink.SetOnCustomDrawHeaderCell(Value: TcxTreeListReportLinkCustomDrawHeaderCellEvent); -begin - if @FOnCustomDrawHeaderCell <> @Value then - begin - FOnCustomDrawHeaderCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxTreeListControlReportLink.SetOnCustomDrawIndentCell(Value: TcxTreeListReportLinkCustomDrawIndentCellEvent); -begin - if @FOnCustomDrawIndentCell <> @Value then - begin - FOnCustomDrawIndentCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxTreeListControlReportLink.SetOptionsExpanding(Value: TcxTreeListReportLinkOptionsExpanding); -begin - inherited OptionsExpanding := Value; -end; - -procedure TcxTreeListControlReportLink.SetOptionsFormatting(Value: TcxTreeListReportLinkOptionsFormatting); -begin - inherited OptionsFormatting := Value; -end; - -procedure TcxTreeListControlReportLink.SetOptionsOnEveryPage(Value: TcxTreeListReportLinkOptionsOnEveryPage); -begin - inherited OptionsOnEveryPage := Value; -end; - -procedure TcxTreeListControlReportLink.SetOptionsPagination(Value: TcxTreeListReportLinkOptionsPagination); -begin - inherited OptionsPagination := Value; -end; - -procedure TcxTreeListControlReportLink.SetOptionsPreview(Value: TcxTreeListReportLinkOptionsPreview); -begin - inherited OptionsPreview := Value; -end; - -procedure TcxTreeListControlReportLink.SetOptionsRefinements(Value: TcxTreeListReportLinkOptionsRefinements); -begin - inherited OptionsRefinements := Value; -end; - -procedure TcxTreeListControlReportLink.SetOptionsSelection(Value: TcxTreeListReportLinkOptionsSelection); -begin - inherited OptionsSelection := Value; -end; - -procedure TcxTreeListControlReportLink.SetOptionsSize(Value: TcxTreeListReportLinkOptionsSize); -begin - inherited OptionsSize := Value; -end; - -procedure TcxTreeListControlReportLink.SetOptionsView(Value: TcxTreeListReportLinkOptionsView); -begin - inherited OptionsView := Value; -end; - -procedure TcxTreeListControlReportLink.SetStyles(Value: TcxTreeListReportLinkStyles); -begin - inherited Styles := Value; -end; - -{ TcxTreeListReportLink } - -function TcxTreeListReportLink.GetTreeList: TcxTreeList; -begin - Result := TcxTreeList(Component); -end; - -{ TcxDBTreeListReportLink } - -function TcxDBTreeListReportLink.GetDBTreeList: TcxDBTreeList; -begin - Result := TcxDBTreeList(Component); -end; - -{ TcxVirtualTreeListReportLink } - -function TcxVirtualTreeListReportLink.GetVirtualTreeList: TcxVirtualTreeList; -begin - Result := TcxVirtualTreeList(Component); -end; - -{ TdxfmTreeListReportLinkDesignWindow } - -constructor TdxfmTreeListReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxPSGlbl .dxhccxTreeListReportLinkDesigner; - inherited; - CreateControls; - SetActivePage; -end; - -destructor TdxfmTreeListReportLinkDesignWindow.Destroy; -begin - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(lbxStyles); - inherited; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoInitialize; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited; - RefreshStylesList; - - InitializePreviewTreeList; - InitializePreviewTreeListStyles; - LoadDataIntoPreviewTreeList; - - (*{$IFNDEF DXVER500} {.3} - chbxTransparentRichEdits.Visible := False; - bvlRefinementsSeparator.Top := bvlRefinementsSeparator.Top - 15; - chbxSuppressBackgroundBitmaps.Top := chbxSuppressBackgroundBitmaps.Top - 15; - chbxConsumeSelectionStyle.Top := chbxConsumeSelectionStyle.Top - 15; - {$ENDIF} *) - - with ReportLink.OptionsView do - begin - chbxShowBands.Checked := BandHeaders; - chbxShowBorders.Checked := Borders; - chbxShowExpandButtons.Checked := ExpandButtons; - chbxShowFooters.Checked := Footers; - chbxShowHeaders.Checked := Headers; - chbxShowTreeLines.Checked := TreeLines; - end; - - with ReportLink.OptionsOnEveryPage do - begin - chbxBandsOnEveryPage.Checked := BandHeaders; - chbxFootersOnEveryPage.Checked := Footers; - chbxHeadersOnEveryPage.Checked := Headers; - end; - - with cbxLookAndFeel do - begin - Items.Clear; - Items.AddObject(cxGetResourceString(@sdxLookAndFeelFlat), TObject(lfFlat)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelStandard), TObject(lfStandard)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelUltraFlat), TObject(lfUltraFlat)); - - ItemIndex := Items.IndexOfObject(TObject(ReportLink.OptionsFormatting.LookAndFeelKind)); - end; - - with ReportLink.OptionsFormatting do - begin - ccbxSeparatorColor.ColorValue := ActualNodeSeparatorColor; - seSeparatorThickness.AsInteger := NodeSeparatorThickness; - chbxConsumeSelectionStyle.Checked := ConsumeSelectionStyle; - chbxSuppressBackgroundBitmaps.Checked := SuppressBackgroundBitmaps; - chbxUseNativeStyles.Checked := UseNativeStyles; - end; - - with ReportLink.OptionsSelection do - begin - chbxProcessSelection.Checked := ProcessSelection; - chbxProcessExactSelection.Checked := ProcessExactSelection; - end; - - with ReportLink.OptionsExpanding do - begin - chbxExpandNodes.Checked := AutoExpandNodes; - chbxExplicitlyExpandNodes.Checked := ExplicitlyExpandNodes; - end; - - with ReportLink.OptionsSize do - begin - chbxAutoWidth.Checked := AutoWidth; - end; - - with ReportLink.OptionsRefinements do - begin - chbxTransparentGraphics.Checked := TransparentGraphics; - chbxDisplayGraphicsAsText.Checked := DisplayGraphicsAsText; - chbxFlatCheckMarks.Checked := FlatCheckMarks; - (*{$IFDEF DXVER500} {.3} - chbxTransparentRichEdits.Checked := TransparentRichEdits; - {$ENDIF} *) - end; - - with ReportLink.OptionsPreview do - begin - chbxPreviewVisible.Checked := Visible; - chbxPreviewAutoHeight.Checked := AutoHeight; - sePreviewMaxLineCount.AsInteger := MaxLineCount; - end; -end; - -{$IFDEF DELPHI7} -function TdxfmTreeListReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxfmTreeListReportLinkDesignWindow.LoadStrings; - - procedure AdjustBevelSize(ABevel: TBevel; ALabel: TControl); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := ALabel.Left + ALabel.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - inherited; - - lblPreviewWindow.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - tshView.Caption := cxGetResourceString(@sdxViewTab); - - lblShow.Caption := cxGetResourceString(@sdxShow); - AdjustBevelSize(bvlShow, lblShow); - chbxShowBands.Caption := cxGetResourceString(@sdxBands); - chbxShowHeaders.Caption := cxGetResourceString(@sdxHeaders); - chbxShowFooters.Caption := cxGetResourceString(@sdxFooters); - Bevel2.Width := bvlShow.Width - (Bevel2.Left - bvlShow.Left); - chbxShowBorders.Caption := cxGetResourceString(@sdxBorders); - chbxShowExpandButtons.Caption := cxGetResourceString(@sdxExpandButtons); - chbxShowTreeLines.Caption := cxGetResourceString(@sdxTreeLines); - - lblOnEveryPage.Caption := cxGetResourceString(@sdxOnEveryPage); - AdjustBevelSize(bvlOnEveryPage, lblOnEveryPage); - chbxBandsOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxBands)); - chbxHeadersOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxHeaders)); - chbxFootersOnEveryPage.Caption := DropAmpersand(cxGetResourceString(@sdxFooters)); - - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviorsTab); - - lblSelection.Caption := cxGetResourceString(@sdxSelection); - AdjustBevelSize(bvlSelection, lblSelection); - chbxProcessSelection.Caption := cxGetResourceString(@sdxProcessSelection); - chbxProcessExactSelection.Caption := cxGetResourceString(@sdxProcessExactSelection); - - lblExpanding.Caption := cxGetResourceString(@sdxExpanding); - AdjustBevelSize(bvlExpanding, lblExpanding); - chbxExpandNodes.Caption := cxGetResourceString(@sdxNodes); - chbxExplicitlyExpandNodes.Caption := cxGetResourceString(@sdxExplicitlyExpandNodes); - - lblSize.Caption := cxGetResourceString(@sdxSize); - AdjustBevelSize(bvlSize, lblSize); - chbxAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - - tshFormatting.Caption := cxGetResourceString(@sdxFormatting); - lblLookAndFeel.Caption := cxGetResourceString(@sdxLookAndFeel); - AdjustBevelSize(bvlLookAndFeel, lblLookAndFeel); - - lblRefinements.Caption := cxGetResourceString(@sdxRefinements); - AdjustBevelSize(bvlRefinements, lblRefinements); - chbxTransparentGraphics.Caption := cxGetResourceString(@sdxTransparentGraphics); - chbxDisplayGraphicsAsText.Caption := DropAmpersand(cxGetResourceString(@sdxDisplayGraphicsAsText)); - chbxFlatCheckMarks.Caption := cxGetResourceString(@sdxFlatCheckMarks); - //chbxTransparentRichEdits.Caption := cxGetResourceString(@sdxTransparentRichEdits); {.3} - chbxSuppressBackgroundBitmaps.Caption := cxGetResourceString(@sdxSuppressBackgroundBitmaps); - chbxConsumeSelectionStyle.Caption := cxGetResourceString(@sdxConsumeSelectionStyle); - - lblSeparators.Caption := cxGetResourceString(@sdxSeparators); - AdjustBevelSize(bvlSeparator, lblSeparators); - lblSeparatorsColor.Caption := cxGetResourceString(@sdxColor); - lblSeparatorsThickness.Caption := cxGetResourceString(@sdxThickness); - - tshStyles.Caption := cxGetResourceString(@sdxStyles); - lblUseNativeStyles.Caption := cxGetResourceString(@sdxUseNativeStyles); - AdjustBevelSize(bvlStyles, lblUseNativeStyles); - btnStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - btnStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - btnStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - btnStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - btnStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - btnStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); - - btnStyleSheetNew.Caption := cxGetResourceString(@sdxBtnNew); - btnStyleSheetCopy.Caption := cxGetResourceString(@sdxBtnCopy); - btnStyleSheetDelete.Caption := cxGetResourceString(@sdxBtnDelete); - btnStyleSheetRename.Caption := cxGetResourceString(@sdxBtnRename); - - miStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - miStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - miStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - miStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - miStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - miStylesSelectAll.Caption := cxGetResourceString(@sdxSelectAll); - miStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); - - tshPreview.Caption := cxGetResourceString(@sdxPreviewTab); - lblPreviewOptions.Caption := cxGetResourceString(@sdxOptions); - AdjustBevelSize(bvlPreviewOptions, lblPreviewOptions); - chbxPreviewVisible.Caption := cxGetResourceString(@sdxVisible); - chbxPreviewAutoHeight.Caption := cxGetResourceString(@sdxPreviewAutoHeight); - lblPreviewMaxLineCount.Caption := cxGetResourceString(@sdxPreviewMaxLineCount); - lblStyleSheets.Caption := cxGetResourceString(@sdxStyleSheets); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.UpdateControlsState; -begin - inherited; - chbxProcessExactSelection.Enabled := chbxProcessSelection.Checked; - chbxExplicitlyExpandNodes.Enabled := chbxExpandNodes.Checked; - - lbxStyles.Enabled := AreNativeStylesAvailable; - btnStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - btnStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStylesSaveAs.Enabled := CanSaveStyles; - - lblStyleSheets.Enabled := AreNativeStylesAvailable; - cbxStyleSheets.Enabled := AreNativeStylesAvailable; - btnStyleSheetNew.Enabled := CanCreateStyleSheet; - btnStyleSheetCopy.Enabled := CanCopyStyleSheet; - btnStyleSheetDelete.Enabled := CanDeleteStyleSheet; - btnStyleSheetRename.Enabled := CanRenameStyleSheet; - - WarningPaneUpdate; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.UpdatePreview; -const - TransparentsMap: array[Boolean] of TcxImageTransparency = (gtOpaque, gtTransparent); - TreeLineStylesMap: array[Boolean] of TcxTreeListTreeLineStyle = (tllsNone, tllsDot); -begin - PreviewTreeList.Enabled := False; - PreviewTreeList.LookAndFeel.Kind := ReportLink.OptionsFormatting.LookAndFeelKind; - PreviewTreeList.LookAndFeel.NativeStyle := False; - PreviewTreeList.Font := ReportLink.Font; - - chbxBandsOnEveryPage.Enabled := not ReportLink.IsAggregated; - chbxHeadersOnEveryPage.Enabled := not ReportLink.IsAggregated; - chbxFootersOnEveryPage.Enabled := not ReportLink.IsAggregated; - - TcxImageProperties(colManufacturerLogo.Properties).GraphicTransparency := - TransparentsMap[ReportLink.OptionsRefinements.TransparentGraphics]; - - PreviewTreeList.OptionsView.Bands := ReportLink.OptionsView.BandHeaders; - PreviewTreeList.OptionsView.Footer := ReportLink.OptionsView.Footers; - PreviewTreeList.OptionsView.Headers := ReportLink.OptionsView.Headers; - PreviewTreeList.OptionsView.Buttons := ReportLink.OptionsView.ExpandButtons; - PreviewTreeList.OptionsView.TreeLineStyle := TreeLineStylesMap[ReportLink.OptionsView.TreeLines]; - PreviewTreeList.OptionsView.ShowRoot := (ReportLink.TreeListControl <> nil) and - CustomTreeListControl_GetOptionsView(ReportLink.TreeListControl).ShowRoot; - PreviewTreeList.Preview.Visible := ReportLink.OptionsPreview.Visible; - - if ReportLink.TreeListControl <> nil then - PreviewTreeList.OptionsView.UseNodeColorForIndent := - CustomTreeListControl_GetOptionsView(ReportLink.TreeListControl).UseNodeColorForIndent; - - PreviewTreeList.Invalidate; -end; - -function TdxfmTreeListReportLinkDesignWindow.GetDesignerTabIndex: Integer; -begin - Result := PageControl1.ActivePage.TabIndex; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetDesignerTabIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > PageControl1.PageCount - 1 then - Value := PageControl1.PageCount - 1; - PageControl1.ActivePage := PageControl1.Pages[Value]; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited; - with cbxStyleSheets do - ItemIndex := Items.IndexOfObject(ActiveStyleSheet); - - if not LockControlsUpdate then - begin - Modified := True; - UpdatePreview; - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin - inherited; - if not AnActive then lbxStyles.HideToolTips; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoRefreshStylesList; -var - Styles: TcxTreeListReportLinkStyles; - List: TList; -begin - Styles := ReportLink.ActiveStyles; - with lbxStyles.Items do - begin - BeginUpdate; - try - List := TList.Create; - try - SaveSelectedStyles(List); - try - Clear; - AddObject(cxGetResourceString(@sdxBandHeaderStyle), Styles.BandHeader); - AddObject(cxGetResourceString(@sdxContentStyle), Styles.Content); - AddObject(cxGetResourceString(@sdxContentEvenStyle), Styles.ContentEven); - AddObject(cxGetResourceString(@sdxContentOddStyle), Styles.ContentOdd); - AddObject(cxGetResourceString(@sdxFooterStyle), Styles.Footer); - AddObject(cxGetResourceString(@sdxFooterRowStyle), Styles.FooterRow); - AddObject(cxGetResourceString(@sdxHeaderStyle), Styles.Header); - AddObject(cxGetResourceString(@sdxPreviewStyle), Styles.Preview); - AddObject(cxGetResourceString(@sdxSelectionStyle), Styles.Selection); - finally - RestoreSelectedStyles(List); - end; - finally - List.Free; - end; - finally - EndUpdate; - end; - end; - InitializePreviewTreeListStyles; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - inherited; - UpdatePreviewTreeListStyles(ACaption, AStyle); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin - if ARecreate then - RecreateStylesListBox - else - lbxStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - with lbxStyles do - for I := 0 to Items.Count - 1 do - if Selected[I] then - AStrings.AddObject(Items[I], Items.Objects[I]); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := lbxStyles.Items; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := cbxStyleSheets.Items; -end; - -function TdxfmTreeListReportLinkDesignWindow.GetActiveStyle: TcxStyle; -begin - with lbxStyles do - if ItemIndex <> -1 then - Result := TcxStyle(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -function TdxfmTreeListReportLinkDesignWindow.GetHasSelectedStyles: Boolean; -begin - Result := lbxStyles.SelCount <> 0; -end; - -function TdxfmTreeListReportLinkDesignWindow.GetHasSelectedStylesWithAssignedBitmap: Boolean; -var - Styles: TStrings; - I: Integer; - Style: TcxStyle; -begin - Result := True; - Styles := TStringList.Create; - try - GetSelectedStyleNames(Styles); - for I := 0 to Styles.Count - 1 do - begin - Style := TcxStyle(Styles.Objects[I]); - if (Style <> nil) and (Style.Bitmap <> nil) and not Style.Bitmap.Empty then - Exit; - end; - finally - Styles.Free; - end; - Result := False; -end; - -function TdxfmTreeListReportLinkDesignWindow.GetReportLink: TcxTreeListControlReportLink; -begin - Result := inherited ReportLink as TcxTreeListControlReportLink; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewMaxLineCountChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.MaxLineCount := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SeparatorColorChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - if TdxPSColorCombo(Sender).IsAutoColorSelected then - ReportLink.OptionsFormatting.NodeSeparatorColor := clDefault - else - ReportLink.OptionsFormatting.NodeSeparatorColor := TdxPSColorCombo(Sender).ColorValue; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SeparatorThicknessChanged(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsFormatting.NodeSeparatorThickness := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -function TdxfmTreeListReportLinkDesignWindow.CanSelectAllStyles: Boolean; -var - I: Integer; -begin - Result := AreNativeStylesAvailable; - if Result then - begin - for I := 0 to lbxStyles.Items.Count - 1 do - if not lbxStyles.Selected[I] then Exit; - Result := False; - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CreateControls; - - function CreateSpin(AHost: TControl; ALabel: TLabel; ATabOrder: TTabOrder; - AMinValue, AMaxValue, AValue: Integer): TdxPSSpinEdit; - begin - Result := TdxPSSpinEdit.Create(Self); - with Result do - begin - Parent := AHost.Parent; - BoundsRect := AHost.BoundsRect; - TabOrder := ATabOrder; - - MinValue := AMinValue; - MaxValue := AMaxValue; - Value := AValue; - DefaultValue := AValue; - end; - ALabel.FocusControl := Result; - end; - - function CreateColorCombo(AHost: TControl; ALabel: TLabel; ATabOrder: TTabOrder; - ATag: Integer; AAutoColor: TColor): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(Result) do - begin - BoundsRect := AHost.BoundsRect; - Tag := MakeTTag(ATag); - Parent := AHost.Parent; - TabOrder := ATabOrder; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - - procedure CreateWarningPane; - begin - wpIncorrectOnEveryPageState := TdxPSWarningPane.Create(Self); - wpIncorrectOnEveryPageState.Parent := tshView; - wpIncorrectOnEveryPageState.BoundsRect := bvlWarningHost.BoundsRect; - bvlWarningHost.Visible := False; - end; - - procedure CreateStylesListBox; - begin - lbxStyles := TdxStylesListBox.Create(Self); - lbxStyles.Parent := tshStyles; - lbxStyles.BoundsRect := bvlStylesHost.BoundsRect; - lbxStyles.PopupMenu := pmStyles; - lbxStyles.TabOrder := chbxUseNativeStyles.TabOrder + 1; - lbxStyles.OnClick := lbxStylesClick; - bvlStylesHost.Visible := False; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(lbxStyles); - end; - -begin - sePreviewMaxLineCount := CreateSpin(bvlPreviewMaxLineCountHost, lblPreviewMaxLineCount, - chbxPreviewAutoHeight.TabOrder + 1, 0, 1000, 0); - sePreviewMaxLineCount.OnChange := PreviewMaxLineCountChanged; - - seSeparatorThickness := CreateSpin(bvlSeparatorThicknessHost, lblSeparatorsThickness, - chbxConsumeSelectionStyle.TabOrder + 1, 0, 16, 0); - seSeparatorThickness.OnChange := SeparatorThicknessChanged; - - ccbxSeparatorColor := CreateColorCombo(bvlSeparatorColorHost, lblSeparatorsColor, - seSeparatorThickness.TabOrder + 1, 0, dxPSDefaultTreeListNodeSeparatorColor); - ccbxSeparatorColor.OnChange := SeparatorColorChanged; - - CreateWarningPane; - CreateStylesListBox; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CustomDrawBorders(ACanvas: TcxCanvas; - const R: TRect); -var - GridLinesColor: TColor; -begin - with ReportLink do - begin - GridLinesColor := PreviewTreeList.OptionsView.GridLineColor; - {if TreeListControl <> nil then - GridLinesColor := CustomTreeListControl_GetOptionsView(TreeListControl).GridLineColor - else - GridLinesColor := PreviewTreeList.OptionsView.GridLineColor;//clWindowText;} - if GridLinesColor = clDefault then - GridLinesColor := CustomTreeListControl_GetLookAndFeelPainter(PreviewTreeList).DefaultGridLineColor; - end; - ACanvas.DrawComplexFrame(R, GridLinesColor, GridLinesColor, [bLeft, bBottom, bRight]); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CustomDrawCheckMark(ACanvas: TcxCanvas; - AViewInfo: TcxTreeListEditCellViewInfo); -const - Painters: array[Boolean] of TcxCustomLookAndFeelPainterClass = - (TcxStandardLookAndFeelPainter, TcxUltraFlatLookAndFeelPainter); -var - PrevColor: TColor; - R: TRect; - Params: TcxViewParams; - X, Y: Integer; - CheckValue: Variant; -begin - PrevColor := ACanvas.Brush.Color; - R := AViewInfo.BoundsRect; - Params := PreviewTreeList.Styles.GetContentParams(AViewInfo.Node, AViewInfo.Column); - - if Params.Bitmap = nil then - begin - ACanvas.Brush.Color := Params.Color; - ACanvas.FillRect(R); - end - else - dxBkgnd.DrawPicture(Params.Bitmap, ACanvas.Canvas, R, ppmTile, 1, 1, -R.Left, -R.Top); - - X := R.Left + (R.Right - R.Left - CheckWidth) div 2; - Y := R.Top + (R.Bottom - R.Top - CheckWidth) div 2; - R := MakeBounds(X, Y, CheckWidth, CheckWidth); - CheckValue := cbsChecked; - if AViewInfo.Node.Index = 0 then - CheckValue := cbsUnchecked; - with Painters[ReportLink.OptionsRefinements.FlatCheckMarks] do - DrawCheckButton(ACanvas, R, cxbsDefault, CheckValue = cbsChecked); - ACanvas.Brush.Color := PrevColor; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CustomDrawFooter(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxTreeListFooterItemViewInfo); -begin - case ReportLink.OptionsFormatting.LookAndFeelKind of - lfStandard, - lfFlat: - ACanvas.DrawComplexFrame(R, AViewInfo.ViewParams.TextColor, clBtnHighlight); - lfUltraFlat: - ACanvas.FrameRect(R, AViewInfo.ViewParams.TextColor); - end; - - InflateRect(R, -1, -1); - with AViewInfo do - CustomDrawTextRect(ACanvas, R, Text, AlignHorz, AlignVert, ViewParams); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CustomDrawHeader(ACanvas: TcxCanvas; - R: TRect; AViewInfo: TcxTreeListHeaderViewInfo); -const - BottomRightColors: array[Boolean] of TColor = (clBtnFace, clBtnShadow); -begin - ACanvas.FrameRect(R, clWindowText);//AViewInfo.ViewParams.TextColor); - if ReportLink.OptionsFormatting.LookAndFeelKind <> lfUltraFlat then - begin - InflateRect(R, -1, -1); - ACanvas.DrawComplexFrame(R, clBtnHighlight, - BottomRightColors[ReportLink.OptionsFormatting.LookAndFeelKind = lfStandard]); - end; - - InflateRect(R, -1, -1); - with AViewInfo do - CustomDrawTextRect(ACanvas, R, Text, AlignHorz, AlignVert, ViewParams); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.CustomDrawTextRect(ACanvas: TcxCanvas; - R: TRect; const AText: string; AnAlignmentHorz: TAlignment; AnAlignmentVert: TcxAlignmentVert; - AParams: TcxViewParams); -const - AlignmentHorzMap: array[TAlignment] of Integer = (cxAlignLeft, cxAlignRight, cxAlignCenter); - AlignmentVertMap: array[TcxAlignmentVert] of Integer = (cxAlignTop, cxAlignBottom, cxAlignVCenter); -begin - if AParams.Bitmap = nil then - begin - ACanvas.Brush.Color := AParams.Color; - ACanvas.FillRect(R); - end - else - dxBkgnd.DrawPicture(AParams.Bitmap, ACanvas.Canvas, R, ppmTile, 1, 1, - R.Left - 0, - R.Top - 0); - - InflateRect(R, -2, -1); - if AParams.Font <> nil then - ACanvas.Font := AParams.Font; - ACanvas.Font.Color := AParams.TextColor; - ACanvas.Brush.Style := bsClear; - ACanvas.DrawText(AText, R, - AlignmentHorzMap[AnAlignmentHorz] or AlignmentVertMap[AnAlignmentVert] or cxSingleLine); - ACanvas.Brush.Style := bsSolid; -end; - -function TdxfmTreeListReportLinkDesignWindow.ExtractAlignmentHorz( - AViewInfo: TcxTreeListEditCellViewInfo): TAlignment; -begin - with AViewInfo.Column do - if Properties <> nil then - Result := cxEditProperties_GetAlignment(Properties).Horz - else - Result := taLeftJustify; -end; - -function TdxfmTreeListReportLinkDesignWindow.ExtractAlignmentVert( - AViewInfo: TcxTreeListEditCellViewInfo): TcxAlignmentVert; -const - EditAlignmentVertMap: array[TcxEditVertAlignment] of TcxAlignmentVert = - (vaTop, vaBottom, vaCenter); -begin - with AViewInfo.Column do - if Properties <> nil then - Result := EditAlignmentVertMap[cxEditProperties_GetAlignment(Properties).Vert] - else - Result := vaCenter; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.InitializePreviewTreeList; - - procedure SetupDataBindings; - - function GetColumnCaption(AnIndex: Integer): string; - begin - case AnIndex of - 0: Result := cxGetResourceString(@sdxManufacturerNameColumnCaption); - 1: Result := cxGetResourceString(@sdxManufacturerLogoColumnCaption); - 2: Result := cxGetResourceString(@sdxManufacturerCountryColumnCaption); - 3: Result := cxGetResourceString(@sdxCarModelColumnCaption); - else - Result := cxGetResourceString(@sdxCarIsSUVColumnCaption); - end; - end; - - const - ColumnProperties: array[0..4] of string = - ('TcxTextEditProperties', 'TcxImageProperties', 'TcxTextEditProperties', - 'TcxTextEditProperties', 'TcxCheckBoxProperties'); - var - I: Integer; - begin - for I := 0 to PreviewTreeList.ColumnCount - 1 do - with PreviewTreeList.Columns[I] do - begin - PropertiesClassName := ColumnProperties[I]; - Caption.Text := GetColumnCaption(I); - end; - end; - -begin - SetupDataBindings; - //TcxImageProperties(colManufacturerLogo.Properties).Stretch := True; - PreviewTreeList.Bands[0].Caption.Text := cxGetResourceString(@sdxManufacturerBandCaption); - PreviewTreeList.Bands[1].Caption.Text := cxGetResourceString(@sdxModelBandCaption); - PreviewTreeList.OptionsView.Footer := True; - PreviewTreeList.Columns[0].Options.Footer := True; - PreviewTreeList.Columns[0].SummaryFooter.Kind := skCount; - PreviewTreeList.Columns[0].SummaryFooter.Format := cxGetResourceString(@sdxSummaryFormat); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.InitializePreviewTreeListStyles; - - procedure ResetEvents(AStyles: TcxTreeListStyles); - begin - with AStyles do - begin - OnGetBandBackgroundStyle := nil; - OnGetBandContentStyle := nil; - OnGetBandHeaderStyle := nil; - OnGetBandFooterStyle := nil; - OnGetColumnFooterStyle := nil; - OnGetColumnHeaderStyle := nil; - OnGetContentStyle := nil; - OnGetNodeIndentStyle := nil; - OnGetPreviewStyle := nil; - end; - end; - -var - Styles: TcxTreeListReportLinkStyles; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - begin - Styles := ReportLink.ActiveStyles; - dxPSResetStyles(PreviewTreeList.Styles); - with PreviewTreeList.Styles do - begin - BandHeader := Styles.BandHeader; - Content := Styles.Content; - ContentEven := Styles.ContentEven; - ContentOdd := Styles.ContentOdd; - ColumnFooter := Styles.Footer; - ColumnHeader := Styles.Header; - Footer := Styles.FooterRow; - Preview := Styles.Preview; - end; - end - else - if ReportLink.TreeListControl <> nil then - PreviewTreeList.Styles := CustomTreeListControl_GetStyles(ReportLink.TreeListControl) - else - dxPScxCommon.dxPSResetStyles(PreviewTreeList.Styles); - - ResetEvents(PreviewTreeList.Styles); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.LoadDataIntoPreviewTreeList; - - function GetManufacturerName(AnIndex: Integer): string; - begin - case AnIndex of - 0: Result := cxGetResourceString(@sdxCarManufacturerName5); - 1: Result := cxGetResourceString(@sdxCarManufacturerName1); - 2: Result := cxGetResourceString(@sdxCarManufacturerName2); - else - Result := cxGetResourceString(@sdxCarManufacturerName4); - end; - end; - - function GetManufacturerCountry(AnIndex: Integer): string; - begin - case AnIndex of - 0: Result := cxGetResourceString(@sdxCarManufacturerCountry5); - 1: Result := cxGetResourceString(@sdxCarManufacturerCountry1); - 2: Result := cxGetResourceString(@sdxCarManufacturerCountry2); - else - Result := cxGetResourceString(@sdxCarManufacturerCountry4); - end; - end; - - function GetCarModel(AnIndex: Integer): string; - begin - case AnIndex of - 0: Result := cxGetResourceString(@sdxCarModel5); - 1: Result := cxGetResourceString(@sdxCarModel1); - 2: Result := cxGetResourceString(@sdxCarModel2); - else - Result := cxGetResourceString(@sdxCarModel4); - end; - end; - -const - RecordCount = 4; - CarLogosIndexes: array[0..RecordCount - 1] of Integer = (4, 0, 1, 3); - AreCarsSUV: array[0..RecordCount - 1] of string = ('False', 'True', 'True', 'True'); -var - I: Integer; -begin - PreviewTreeList.Clear; - for I := 0 to RecordCount - 1 do - with PreviewTreeList.Add do - begin - Values[0] := GetManufacturerName(I); - Values[1] := dxPScxCommon.dxPSPreviewCarLogosAsString(CarLogosIndexes[I]); - Values[2] := GetManufacturerCountry(I); - Values[3] := GetCarModel(I); - Values[4] := AreCarsSUV[I]; - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.RecreateStylesListBox; -var - List: TList; -begin - List := TList.Create; - try - SaveSelectedStyles(List); - dxPSUtl.dxRecreateWnd(lbxStyles); - RestoreSelectedStyles(List); - finally - List.Free; - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.RestoreSelectedStyles(AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - lbxStyles.Selected[Integer(AList[I])] := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SaveSelectedStyles(AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to lbxStyles.Items.Count - 1 do - if lbxStyles.Selected[I] then AList.Add(TObject(I)); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetActivePage; -begin - PageControl1.ActivePage := PageControl1.Pages[DesignerTabIndex]; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.UpdatePreviewTreeListStyles(const ACaption: string; - AStyle: TcxStyle); -begin - with PreviewTreeList.Styles do - begin - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxBandHeaderStyle)) then - BandHeader := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentStyle)) then - Content := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentEvenStyle)) then - ContentEven := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentOddStyle)) then - ContentOdd := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxFooterStyle)) then - ColumnFooter := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxHeaderStyle)) then - ColumnHeader := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxFooterRowStyle)) then - Footer := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxPreviewStyle)) then - Preview := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxSelectionStyle)) then - Selection := AStyle - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.WarningPaneUpdate; -begin - with ReportLink.HostInfoServices do - wpIncorrectOnEveryPageState.SetStateAndHint(IsInconsistentState, InconsistentStateText); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsExpandingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsExpanding do - case Index of - 0: AutoExpandNodes := Value; - 1: ExplicitlyExpandNodes := Value; - end; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsFormattingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsFormatting do - case Index of - 0: - begin - UseNativeStyles := Value; - InitializePreviewTreeListStyles; - end; - 1: SuppressBackgroundBitmaps := Value; - 2: ConsumeSelectionStyle := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsOnEveryPageByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsOnEveryPage do - case Index of - 0: BandHeaders := Value; - 1: Headers := Value; - 2: Footers := Value; - end; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsRefinementsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsRefinements do - case Index of - 0: TransparentGraphics := Value; - 1: DisplayGraphicsAsText := Value; - 2: FlatCheckMarks := Value; - {$IFDEF DXVER500} - 3: TransparentRichEdits := Value; - {$ENDIF} - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsSelectionByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsSelection do - case Index of - 0: ProcessSelection := Value; - 1: ProcessExactSelection := Value; - end; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsSizeByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsSize do - case Index of - 0: AutoWidth := Value; - end; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.SetOptionsViewByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsView do - case Index of - 0: BandHeaders := Value; - 1: Headers := Value; - 2: Footers := Value; - 3: ExpandButtons := Value; - 4: TreeLines := Value; - 5: Borders := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewTreeListCustomDrawCell( - Sender: TObject; Canvas: TcxCanvas; AViewInfo: TcxTreeListEditCellViewInfo; - var ADone: Boolean); -var - ViewInfo: TcxTreeListEditCellViewInfo; -begin - ViewInfo := TcxTreeListEditCellViewInfo(AViewInfo); - if ViewInfo.Column = colManufacturerLogo then - if ReportLink.OptionsRefinements.DisplayGraphicsAsText then - begin - CustomDrawTextRect(Canvas, ViewInfo.BoundsRect, ReportLink.OptionsRefinements.GraphicsText, - ExtractAlignmentHorz(ViewInfo), ExtractAlignmentVert(ViewInfo), ViewInfo.ViewParams); - CustomDrawBorders(Canvas, ViewInfo.BoundsRect); - ADone := True; - end; - - if ViewInfo.Column = colCarIsSUV then - begin - CustomDrawCheckMark(Canvas, ViewInfo); - CustomDrawBorders(Canvas, AViewInfo.BoundsRect); - ADone := True; - end; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewTreeListCustomDrawBandHeader( - Sender: TObject; ACanvas: TcxCanvas; AViewInfo: TcxTreeListHeaderViewInfo; - var ADone: Boolean); -var - R: TRect; -begin - R := AViewInfo.BoundsRect; - Dec(R.Top); - Dec(R.Left); - CustomDrawHeader(ACanvas, R, AViewInfo); - - ADone := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewTreeListCustomDrawHeader( - Sender: TObject; ACanvas: TcxCanvas; AViewInfo: TcxTreeListHeaderViewInfo; - var ADone: Boolean); -var - R: TRect; -begin - R := AViewInfo.BoundsRect; - Dec(R.Top); - Dec(R.Left); - CustomDrawHeader(ACanvas, R, AViewInfo); - - ADone := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewTreeListCustomDrawFooterCell( - Sender: TObject; Canvas: TcxCanvas; AViewInfo: TcxTreeListFooterItemViewInfo; - var ADone: Boolean); -begin - CustomDrawFooter(Canvas, AViewInfo.BoundsRect, TcxTreeListFooterItemViewInfo(AViewInfo)); - ADone := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.LookAndFeelChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TComboBox(Sender) do - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsRefinementsClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsRefinementsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewVisibleClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.Visible := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PreviewAutoHeightClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OptionsPreview.AutoHeight := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsSelectionClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSelectionByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsExpandingClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsExpandingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsSizeClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSizeByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsViewClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsViewByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsOnEveryPageClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsOnEveryPageByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.OptionsFormattingClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsFormattingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.lblUseNativeStylesClick( - Sender: TObject); -begin - if chbxUseNativeStyles.CanFocus then ActiveControl := chbxUseNativeStyles; - chbxUseNativeStyles.Checked := not chbxUseNativeStyles.Checked; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.pmStylesPopup(Sender: TObject); -begin - lbxStyles.HideToolTips; - miStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - miStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStylesSelectAll.Enabled := CanSelectAllStyles; - miStylesSaveAs.Enabled := CanSaveStyles; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StyleColorClick(Sender: TObject); -begin - PerformStylesChangeColor; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StyleFontClick(Sender: TObject); -begin - PerformStylesChangeFont; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StyleBackgroundBitmapClick( - Sender: TObject); -begin - PerformStylesChangeBitmap; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StyleBackgroundBitmapClearClick( - Sender: TObject); -begin - PerformStylesClearBitmap; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StyleRestoreDefaultsClick( - Sender: TObject); -begin - PerformStylesRestoreDefaults; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.cbxStyleSheetsClick(Sender: TObject); -begin - with TComboBox(Sender) do - ActiveStyleSheet := TcxCustomStyleSheet(Items.Objects[ItemIndex]); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.btnStyleSheetNewClick(Sender: TObject); -begin - PerformStyleSheetNew; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.btnStyleSheetCopyClick(Sender: TObject); -begin - PerformStyleSheetCopy; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.btnStyleSheetDeleteClick(Sender: TObject); -begin - PerformStyleSheetDelete; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.btnStyleSheetRenameClick(Sender: TObject); -begin - PerformStyleSheetRename; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.miStylesSelectAllClick(Sender: TObject); -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - with lbxStyles do - begin - {$IFDEF DELPHI6} - SelectAll; - {$ELSE} - Items.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - Selected[I] := True; - finally - Items.EndUpdate; - end; - {$ENDIF} - end; - UpdateControlsState; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.StylesSaveAsClick(Sender: TObject); -begin - PerformStylesSaveAsStyleSheet; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.cbxStyleSheetsKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - PerformStyleSheetKeyDown(Sender, Key, Shift); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.cbxStyleSheetsDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -begin - PerformStyleSheetDrawItem(TComboBox(Control).Canvas, Index, Rect, State, Control.Enabled); -end; - -procedure TdxfmTreeListReportLinkDesignWindow.lbxStylesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - UpdateControlsState; -end; - -procedure TdxfmTreeListReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreviewWindow.Parent := TPageControl(Sender).ActivePage; -end; - -procedure RegisterAssistants; -begin - TcxTreeListNodeHelper.Register; - TcxTreeListReportLinkStyleSheet.Register; -end; - -procedure UnregisterAssistants; -begin - TcxTreeListReportLinkStyleSheet.Unregister; - TcxTreeListNodeHelperFactory.ReleaseInstance; -end; - -initialization - RegisterAssistants; - - dxPSRegisterReportLink(TcxTreeListReportLink, TcxTreeList, TdxfmTreeListReportLinkDesignWindow); - dxPSRegisterReportLink(TcxDBTreeListReportLink, TcxDBTreeList, TdxfmTreeListReportLinkDesignWindow); - dxPSRegisterReportLink(TcxVirtualTreeListReportLink, TcxVirtualTreeList, TdxfmTreeListReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TcxVirtualTreeListReportLink, TcxVirtualTreeList, TdxfmTreeListReportLinkDesignWindow); - dxPSUnregisterReportLink(TcxDBTreeListReportLink, TcxDBTreeList, TdxfmTreeListReportLinkDesignWindow); - dxPSUnregisterReportLink(TcxTreeListReportLink, TcxTreeList, TdxfmTreeListReportLinkDesignWindow); - - UnregisterAssistants; - - FreeAndNil(FDefaultdxPScxTreeListLinkStyleSheet); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnkPredefinedStyleSheets.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnkPredefinedStyleSheets.dfm deleted file mode 100644 index 350de1af..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,298 +0,0 @@ -object dxdmPScxTreeListLnkPredefinedStyles: TdxdmPScxTreeListLnkPredefinedStyles - OldCreateOrder = False - Left = 483 - Top = 307 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 37 - Top = 12 - object styleProfessionalFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3355443 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6582120 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalCaptionRow: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 536870912 - end - object styleProfessionalPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14541789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGreenFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGreenFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12778719 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14154698 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenSelected: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6005301 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenGroup: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentBandHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFooterRow: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsItalic] - TextColor = clBlack - end - object styleTransparentSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13816275 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TcxTreeListReportLinkStyleSheet - Caption = 'Professional' - Styles.BandHeader = styleProfessionalFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleProfessionalContentEven - Styles.ContentOdd = styleProfessionalContentOdd - Styles.Footer = styleProfessionalFixed - Styles.FooterRow = styleProfessionalFixed - Styles.Header = styleProfessionalFixed - Styles.Preview = styleProfessionalPreview - Styles.Selection = styleProfessionalSelection - BuiltIn = True - end - object ssGreen: TcxTreeListReportLinkStyleSheet - Caption = 'Green' - Styles.BandHeader = styleGreenFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleGreenLightContent - Styles.ContentOdd = styleNoneContent - Styles.Footer = styleGreenFixed - Styles.FooterRow = styleGreenFixed - Styles.Header = styleGreenFixed - Styles.Preview = styleGreenLightPreview - Styles.Selection = styleGreenSelected - BuiltIn = True - end - object ssTransparent: TcxTreeListReportLinkStyleSheet - Caption = 'Transparent' - Styles.BandHeader = styleTransparentBandHeader - Styles.Content = styleTransparentContent - Styles.ContentEven = styleTransparentContentEven - Styles.ContentOdd = styleTransparentContentOdd - Styles.Footer = styleTransparentFooter - Styles.FooterRow = styleTransparentFooterRow - Styles.Header = styleTransparentHeader - Styles.Preview = styleTransparentPreview - Styles.Selection = styleTransparentSelection - BuiltIn = True - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnkPredefinedStyleSheets.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnkPredefinedStyleSheets.pas deleted file mode 100644 index 6f21a968..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnkPredefinedStyleSheets.pas +++ /dev/null @@ -1,140 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxTLLnkPredefinedStyleSheets; - -interface - -{$I cxVer.inc} - -uses - Classes, {$IFNDEF DELPHI6} Forms, {$ENDIF} cxClasses, cxStyles, dxPScxTLLnk, - dxPScxCommon; - -type - TdxdmPScxTreeListLnkPredefinedStyles = class(TDataModule) - StyleRepository: TcxStyleRepository; - styleProfessionalFixed: TcxStyle; - styleProfessionalGroup: TcxStyle; - styleProfessionalRowCaption: TcxStyle; - styleProfessionalCaptionRow: TcxStyle; - styleProfessionalContentOdd: TcxStyle; - styleProfessionalContentEven: TcxStyle; - styleProfessionalPreview: TcxStyle; - styleProfessionalSelection: TcxStyle; - styleGreenFixed: TcxStyle; - styleGreenFooter: TcxStyle; - styleGreenLightContent: TcxStyle; - styleGreenLightPreview: TcxStyle; - styleGreenSelected: TcxStyle; - styleGreenGroup: TcxStyle; - styleNoneContent: TcxStyle; - styleNoneFixed: TcxStyle; - ssProfessional: TcxTreeListReportLinkStyleSheet; - ssGreen: TcxTreeListReportLinkStyleSheet; - ssTransparent: TcxTreeListReportLinkStyleSheet; - styleTransparentBandHeader: TcxStyle; - styleTransparentContent: TcxStyle; - styleTransparentContentEven: TcxStyle; - styleTransparentContentOdd: TcxStyle; - styleTransparentFooter: TcxStyle; - styleTransparentFooterRow: TcxStyle; - styleTransparentHeader: TcxStyle; - styleTransparentPreview: TcxStyle; - styleTransparentSelection: TcxStyle; - end; - -implementation - -{$R *.dfm} - -uses - cxStyleSheetsLoad; - -type - TdxPScxGridLnkPredefinedStyleSheets = class(TcxPredefinedStyleSheets) - private - FDataModule: TdxdmPScxTreeListLnkPredefinedStyles; - protected - procedure AddStyleSheets; override; - property DataModule: TdxdmPScxTreeListLnkPredefinedStyles read FDataModule; - public - constructor Create; override; - destructor Destroy; override; - - class procedure Register; - class procedure Unregister; - end; - -constructor TdxPScxGridLnkPredefinedStyleSheets.Create; -begin - inherited; - FDataModule := TdxdmPScxTreeListLnkPredefinedStyles.Create(nil); - AddStyleSheets; -end; - -destructor TdxPScxGridLnkPredefinedStyleSheets.Destroy; -begin - FDataModule.Free; - inherited; -end; - -class procedure TdxPScxGridLnkPredefinedStyleSheets.Register; -begin - cxStyleSheetsLoad.RegisterPredefinedStyleSheets(Self); -end; - -class procedure TdxPScxGridLnkPredefinedStyleSheets.Unregister; -begin - cxStyleSheetsLoad.UnregisterPredefinedStyleSheets(Self); -end; - -procedure TdxPScxGridLnkPredefinedStyleSheets.AddStyleSheets; -var - I: Integer; -begin - with DataModule.StyleRepository do - for I := 0 to StyleSheetCount - 1 do - AddStyleSheet(StyleSheets[I]); -end; - -initialization - TdxPScxGridLnkPredefinedStyleSheets.Register; - -finalization - TdxPScxGridLnkPredefinedStyleSheets.Unregister; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnkReg.pas deleted file mode 100644 index a81d858a..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxTLLnkReg.pas +++ /dev/null @@ -1,262 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxTLLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes, Controls, StdCtrls, cxStyles, cxStyleSheetEditor, cxCustomData, cxTL, - cxImage, dxPSRes, dxPScxTLLnk, dxPScxCommon; - -type - TcxTreeListReportLinkStyleSheetEditorPreview = class(TcxStyleSheetEditorPreview) - private - FTreeList: TcxTreeList; - protected - procedure Initialize; virtual; - property TreeList: TcxTreeList read FTreeList; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - class function GetStyleSheetClass: TcxCustomStyleSheetClass; override; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); override; - - function Control: TWinControl; override; - - class procedure Register; - class procedure Unregister; - end; - - TcxCustomTreeListControlAccess = class(TcxCustomTreeListControl); - -constructor TcxTreeListReportLinkStyleSheetEditorPreview.Create(AOwner: TComponent); -begin -// inherited; cannot call ancestor method if it's an abstract method in Delphi4(5) !!!! - FTreeList := TcxTreeList.Create(AOwner); - Initialize; -end; - -destructor TcxTreeListReportLinkStyleSheetEditorPreview.Destroy; -begin - FTreeList.Free; - inherited; -end; - -class function TcxTreeListReportLinkStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := TcxTreeListReportLinkStyleSheet; -end; - -procedure TcxTreeListReportLinkStyleSheetEditorPreview.SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); -var - TreeListStyles: TcxTreeListStyles; -begin - if AStyleSheet is TcxTreeListReportLinkStyleSheet then - begin - TreeListStyles := TcxCustomTreeListControlAccess(TreeList).Styles; - with TcxTreeListReportLinkStyleSheet(AStyleSheet).Styles do - begin - TreeListStyles.BandHeader := BandHeader; - TreeListStyles.ColumnFooter := Footer; - TreeListStyles.ColumnHeader := Header; - TreeListStyles.Content := Content; - TreeListStyles.ContentEven := ContentEven; - TreeListStyles.ContentOdd := ContentOdd; - TreeListStyles.Footer := FooterRow; - TreeListStyles.Preview := Preview; - end; - end - else - TreeList.Styles.ResetStyles; -end; - -function TcxTreeListReportLinkStyleSheetEditorPreview.Control: TWinControl; -begin - Result := TreeList; -end; - -class procedure TcxTreeListReportLinkStyleSheetEditorPreview.Register; -begin - cxStyleSheetEditor.RegisterStyleSheetEditorPreview(Self); -end; - -class procedure TcxTreeListReportLinkStyleSheetEditorPreview.Unregister; -begin - cxStyleSheetEditor.UnregisterStyleSheetEditorPreview(Self); -end; - -procedure TcxTreeListReportLinkStyleSheetEditorPreview.Initialize; -const - cBandCount = 2; - cColumnCount = 5; - cNodeCount = 4; - - procedure InitializeBands; - const - BandCaptions: array[0..cBandCount - 1] of string = (sdxManufacturerBandCaption, sdxModelBandCaption); - BandWidths: array[0..cBandCount - 1] of Integer = (300, 200); - var - I: Integer; - begin - for I := 0 to cBandCount - 1 do - with TcxCustomTreeListControlAccess(TreeList).Bands.Add do - begin - Caption.Text := BandCaptions[I]; - Width := BandWidths[I]; - end; - end; - - procedure InitializeColumns; - const - ColumnBandIndexes: array[0..cColumnCount - 1] of Integer = (0, 0, 1, 1, 1); - ColumnCaptions: array[0..cColumnCount - 1] of string = - (sdxManufacturerNameColumnCaption, sdxManufacturerLogoColumnCaption, sdxManufacturerCountryColumnCaption, - sdxCarModelColumnCaption, sdxCarIsSUVColumnCaption); - ColumnProperties: array[0..cColumnCount - 1] of string = - ('TcxTextEditProperties', 'TcxImageProperties', 'TcxTextEditProperties', - 'TcxTextEditProperties', 'TcxCheckBoxProperties'); - ColumnWidths: array[0..cColumnCount - 1] of Integer = (150, 150, 0, 120, 80); - var - I: Integer; - begin - with TcxCustomTreeListControlAccess(TreeList) do - begin - for I := 0 to cColumnCount - 1 do - with CreateColumn do - begin - Caption.Text := ColumnCaptions[I]; - Position.BandIndex := ColumnBandIndexes[I]; - Position.ColIndex := Bands[ColumnBandIndexes[I]].ColumnCount - 1; - PropertiesClassName := ColumnProperties[I]; - Width := ColumnWidths[I]; - end; - - Columns[0].Options.Footer := True; - Columns[0].SummaryFooter.Kind := skCount; - Columns[0].SummaryFooter.Format := sdxSummaryFormat; - - TcxImageProperties(Columns[1].Properties).GraphicTransparency := gtTransparent; - - Preview.Column := Columns[2]; - Preview.Visible := True; - end; - end; - - procedure InitializeData; - const - ManufacturerNames: array[0..cNodeCount - 1] of string = - (sdxCarManufacturerName5, sdxCarManufacturerName1, sdxCarManufacturerName2, sdxCarManufacturerName4); - ManufacturerCountries: array[0..cNodeCount - 1] of string = - (sdxCarManufacturerCountry5, sdxCarManufacturerCountry1, sdxCarManufacturerCountry2, sdxCarManufacturerCountry4); - CarLogosIndexes: array[0..cNodeCount - 1] of Integer = - (4, 0, 1, 3); - CarModels: array[0..cNodeCount - 1] of string = - (sdxCarModel5, sdxCarModel1, sdxCarModel2, sdxCarModel4); - AreCarsSUV: array[0..cNodeCount - 1] of string = ('False', 'True', 'True', 'True'); - var - I: Integer; - begin - for I := 0 to cNodeCount - 1 do - with TreeList.Add do - begin - Values[0] := ManufacturerNames[I]; - Values[1] := dxPScxCommon.dxPSPreviewCarLogosAsString(CarLogosIndexes[I]); - Values[2] := ManufacturerCountries[I]; - Values[3] := CarModels[I]; - Values[4] := AreCarsSUV[I]; - end; - end; - - procedure InitializeOptions; - begin - with TcxCustomTreeListControlAccess(TreeList) do - begin - OptionsView.Bands := True; - OptionsView.CellAutoHeight := True; - OptionsView.ColumnAutoWidth := True; - OptionsView.Footer := True; - OptionsView.UseNodeColorForIndent := False; - - OptionsData.Editing := False; - end; - end; - -begin - InitializeBands; - InitializeColumns; - InitializeData; - InitializeOptions; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TcxTreeListReportLink, TcxDBTreeListReportLink, TcxVirtualTreeListReportLink, TcxTreeListReportLinkStyleSheet]); -end; - -procedure RegisterStyleSheetAssistants; -begin - cxStyles.RegisterStyleSheetClass(TcxTreeListReportLinkStyleSheet); - TcxTreeListReportLinkStyleSheetEditorPreview.Register; -end; - -procedure UnregisterStyleSheetAssistants; -begin - TcxTreeListReportLinkStyleSheetEditorPreview.Unregister; - cxStyles.UnregisterStyleSheetClass(TcxTreeListReportLinkStyleSheet); -end; - -initialization - RegisterStyleSheetAssistants; - -finalization - UnregisterStyleSheetAssistants; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnk.dfm deleted file mode 100644 index 7dc1dc4e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnk.dfm +++ /dev/null @@ -1,1293 +0,0 @@ -object cxfmVerticalGridReportLinkDesignWindow: TcxfmVerticalGridReportLinkDesignWindow - Left = 397 - Top = 325 - BorderStyle = bsDialog - Caption = 'cxfmVerticalGridReportLinkDesignWindow' - ClientHeight = 405 - ClientWidth = 644 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 636 - Height = 363 - ActivePage = tshView - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 8 - Top = 34 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDCDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDCCCDDDDDDDDDDDDDDDDDDDDDDDDDDDDCCCCCDDDDDDDDDDDDDDDDDD - DDDDD00000CCC0000000000000000000000DD08888CCC8888887FFFFFFFFFFFF - FF0DD08007CCC7000887F000000000000F0DD088888888888887FFFFFFFFFFFF - FF0DD077777777777777777777777777770DD088888888888887FFFFFFFFFFFF - FF0DD088888888888887FFFFFFFFFFFFFF0DD080000880000887F00000FF0000 - FF0DD088888888888887FFFFFFFFFFFFFF0DD077777777777777777777777777 - 770DD088888888888887FFFFFFFFFFFFFF0DD088888888888887F88888888FFF - FF0DD080000000008887F00000000000FF0DD088888888888887FFFFFFFFFFFF - FF0DD077777777777777777777777777770DD088888888888887FFFFFFFFFFFF - FF0DD088888888888887F88888FFFFFFFF0DD080000000008887F00000000000 - FF0DD088888888888887FFFFFFFFFFFFFF0DD077777777777777777777777777 - 770DD088888888888887FFFFFFFFFFFFFF0DD087777777788887F888888FFFFF - FF0DD08007CCC7000087F0000000F888FF0DD08888CCC8888887FFFFFFFFFFFF - FF0DD00000CCC0000000000000000000000DDDDDDCCCCCDDDDDDDDDDDDDDDDDD - DDDDDDDDDDCCCDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDCDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 13 - Width = 253 - Height = 4 - Shape = bsBottomLine - end - object bvlMultipleRecords: TBevel - Left = 89 - Top = 101 - Width = 208 - Height = 4 - Shape = bsBottomLine - end - object lblPrintMode: TLabel - Left = 91 - Top = 117 - Width = 33 - Height = 13 - Caption = 'Mode: ' - FocusControl = cbxPrintMode - end - object chbxShowHeaders: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 1 - Left = 90 - Top = 75 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowBorders: TCheckBox - Tag = 2 - Left = 90 - Top = 52 - Width = 200 - Height = 17 - Caption = 'Borders' - TabOrder = 1 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 306 - Top = 0 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 3 - end - object cbxPrintMode: TComboBox - Left = 156 - Top = 114 - Width = 140 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 4 - OnChange = cbxPrintModeChange - Items.Strings = ( - 'Current Record' - 'Loaded Records' - 'All Recods') - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblExpanding: TLabel - Left = 5 - Top = 8 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0888777777777777777777707DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD08887888887FFFFFFFFFFFF07DDDDDDDDDDDD0F77777777777777777777 - F07DD08887800087F00000000FFF07DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD08887888887FFFFFFFFFFFF07DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD0888777777777777777777707DDDDDDDDDDDD0F78887800087F00000FF7 - F07DD08887888887FFFFFFFFFFFF07DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD08887800087F0000000000F07DDDDDDDDDDDD0F78887777777777777777 - F07DD08887888887FFFFFFFFFFFF07DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD0888777777777777777777707DDDDDDDDDDDD0F78887800087F000000F7 - F07DD0888888888888888888888807DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD0808887777777777778888807DDDDDDDDDDDD0F78887777777777777777 - F07DD0888888888888888888888807DDDDDDDDDDDD0F78888888888888888887 - F07DD0777777777777777777777707DDCDDDDCDDDD0F78089C80000000088887 - F07DD0888888888888888888888807DDCCCCDCCDDD0F78888888888888888887 - F07DD0808998000000000008888807DDCCCCCCCCDD0F77777777777777777777 - F07DD0888888888888888888888807DDCCCCDCCDDD0F78887888887FFFFFFFF7 - F07DD0777777777777777777777707DDCDDDDCDDDD0F78887800087F000000F7 - F07DD0888888888888888888888807DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD08089C8000000000088888807DDDDDDDDDDDD0F78887777777777777777 - F07DD0888888888888888888888807DDCDDDDCDDDD0F78887888887FFFFFFFF7 - F07DD0777777777777777777777707DDCCCCDCCDDD0F78887800087F00000FF7 - F07DD0888888888888888888888807DDCCCCCCCCDD0F78887888887FFFFFFFF7 - F07DD0808998000000888888888807DDCCCCDCCDDD0F78887777777777777777 - F07DD0888888888888888888888807DDCDDDDCDDDD0F78888888888888888887 - F07DD0777777777777777777777707DDDDDDDDDDDD0F78089980000008888887 - F07DD08888888887FFFFFFFFFFFF07DDDDDDDDDDDD0F78888888888888888887 - F07DD08800008887FF000000000F07DDDDDDDDDDDD0F77777777777777777777 - F07DD08888888887FFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 13 - Width = 234 - Height = 4 - Shape = bsBottomLine - end - object lblSize: TLabel - Left = 5 - Top = 78 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlSize: TBevel - Left = 33 - Top = 82 - Width = 263 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F088887FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F08778887F777F7F777F0 - F07DD0F088887FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0F080087F00F8F00F0FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F088887FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0F0777777777777770FFF0F07DDCDDDDCDDDD0F08008887F00FF7F00FF0 - F07DD0F088887FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F08888887FFFFF7FFFFF0 - F07DD0F088887F00F8F00F0FFF0F07DDCCCCCCCCDD0F07777777777777777770 - F07DD0F088887FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F08888887FFFFF7FFFFF0 - F07DD0F088887F00F8F00F0FFF0F07DDCDDDDCDDDD0F08888887F000F7F000F0 - F07DD0F088887FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0F080087F00F8F00F0FFF0F07DDDDDDDDDDDD0F08008887F000F7F000F0 - F07DD0F088887FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F08888887FFFFF7FFFFF0 - F07DD0F0777777777777770FFF0F07DDCCCCDCCDDD0F07777777777777777770 - F07DD0F088887FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F08888887FFFFF7FFFFF0 - F07DD0F088887F00F8F00F0FFF0F07DDCCCCDCCDDD0F08888887F0FFF7F0FFF0 - F07DD0F088887FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F08888887FFFFF7FFFFF0 - F07DD0F080087F00F8F00F0FFF0F07DDDDDDDDDDDD0F08008887F000F7F000F0 - F07DD0F088887FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F088887FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0F080087F00F7F00F0FFF0F07DDDDDDDDDDDD0F08008887F00FF7F00FF0 - F07DD0F088887FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxExpandRows: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = 'Rows' - TabOrder = 0 - OnClick = OptionsExpandingClick - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 100 - Width = 200 - Height = 17 - Caption = '&Auto Width' - TabOrder = 1 - OnClick = OptionsSizeClick - end - object chbxBestFit: TCheckBox - Tag = 1 - Left = 90 - Top = 123 - Width = 200 - Height = 17 - Caption = 'BestFit' - TabOrder = 2 - OnClick = OptionsSizeClick - end - object chbxWrapRecords: TCheckBox - Tag = 3 - Left = 90 - Top = 169 - Width = 200 - Height = 17 - Caption = '&Wrap Records' - TabOrder = 4 - OnClick = OptionsSizeClick - end - object chbxKeepSameRecordWidths: TCheckBox - Tag = 2 - Left = 90 - Top = 146 - Width = 200 - Height = 17 - Caption = 'Keep Equal Record Widths' - TabOrder = 3 - OnClick = OptionsSizeClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 211 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D0887777787787FFFFFFFFFFF07DDDDDDDDDDD0F87777787787FFFFFFFFF - FF07D0888888888887F000FF0000F07DDDDDDDDDDD0F88888888887F000FF000 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000080087F00000000FF07DDDDDDDDDDD0F80000080087F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000000F07DCCCCDCCDDD0F80000000887F00000000 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000F00F07DDDDDDDDDDD0F80000000887F000000F0 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000008887F00000FF00F07DCCCCDCCDDD0F80000008887F00000FF0 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F00000000FF07DDDDDDDDDDD0F80000000887F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF7FFFFFFF07DDCCCCDCCDDD0888888888887FF777777F - F07DD0888888888887FF70888FFF07DDCCCCCCCCDD0888888888887FF7FFFF7F - F07DD0880000000887FF70FF8FFF07DDCCCCDCCDDD0880000000887FF7F00F7F - F07DD0888888888887FF70FF8FFF07DDCDDDDCDDDD0888888888887FF7F00F7F - F07DD0880008888887FF70000FFF07DDDDDDDDDDDD0880008888887FF7FFFF7F - F07DD0888888888887FF777777FF07DDDDDDDDDDDD0888888888887FF777777F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCCCCCCCCDD0888888888887FFFFFFFFF - F07DD0880000000887FCCCCCCCFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0880000000887F9999999FF07DDDDDDDDDDDD0880000000887F88888FFF - F07DD0888888888887FF99999FFF07DDDDDDDDDDDD0888888888887F888888FF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF888FFFFF07DDDDDDDDDDDD0888888888887FF888FFFF - F07DD0880000888887FFFFFFFFFF07DDDDDDDDDDDD0880000888887FFFFFFFFF - F07DD0880000000087FF888888FF07DDDDDDDDDDDD0880000000087FF888888F - F07DD0888888888887FF888888FF07DDDDDDDDDDDD0888888888887FF888888F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 82 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object lblPagination: TLabel - Left = 5 - Top = 190 - Width = 50 - Height = 13 - Caption = 'Pagination' - end - object bvlPagination: TBevel - Left = 64 - Top = 195 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object imgPagination: TImage - Left = 8 - Top = 212 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD0000000000000000000000007DDDDDDDDDDDD77777777777777770DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7F7777777777777F0DDDDD - DDDDD0888000000000000000088F07DDDDDDDDDDDD7F78887F88F7FF7F07770D - DDDDD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78887FFFF7FF7F0FFF0D - DDDDD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7F7777777777777F077F0D - DDDDD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78887F88F7FF7F0F7F07 - 770DD098F0000000000000000F8907DDDDDDDDDDDD7F78887FFFF7FF7F0F7F0F - FF0DD099FFFFFFFFFFFFFFFFFF9907DDCDDDDCDDDD7F7777777777777F0F7F07 - 7F0DD0999999999999999999999907DDCCCCDCCDDD7F78887FFFF7FF7F0F7F0F - 7F0DD099F0000000000000000F9907DDCCCCCCCCDD7F78787F88F7FF7F0F7F0F - 7F0DD098F088887FFFF8FFFF0F8907DDCCCCDCCDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887F88F8F88F0F8F07DDCDDDDCDDDD7F7777777777777F0F7F0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78787F88F7FF7F0F7F0F - 7F0DD098F0000000000000000F8907DDCDDDDCDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD099FFFFFFFFFFFFFFFFFF9907DDCCCCDCCDDD7F7777777777777F0F7F0F - 7F0DD0999999999999999999999907DDCCCCCCCCDD7F78887FFFF7FF7F0F7F0F - 7F0DD099F0000000000000000F9907DDCCCCDCCDDD7F78787F88F7FF7F0F7F0F - 7F0DD098F088887FFFF8FFFF0F8907DDCDDDDCDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887F88F8F88F0F8F07DDDDDDDDDDDD7F7777777777777F0F7F0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0F7F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD00000000000000000F7F0F - 7F0DD0F8F0777778888888880F8F07DDDDDDDDDDDDDDDD7F7777777777777F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDDDDDD7FFFFFFFFFFFFFFF0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDDDDDD00000000000000000F - 7F0DD0F8F088887FFFF8FFFF0F8807DDDDDDDDDDDDDDDDDDDD7F777777777777 - 7F0DD0888000000000000000088F07DDDDDDDDDDDDDDDDDDDD7FFFFFFFFFFFFF - FF0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD00000000000000 - 000DD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 37 - Width = 202 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnChange = LookAndFeelChange - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 146 - Width = 200 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementsClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 123 - Width = 200 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementsClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 100 - Width = 200 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementsClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 169 - Width = 200 - Height = 17 - Caption = 'Suppress Background Textures' - TabOrder = 4 - OnClick = OptionsFormattingClick - end - object chbxPaginateByRows: TCheckBox - Left = 90 - Top = 213 - Width = 200 - Height = 17 - Caption = 'By Rows' - TabOrder = 5 - OnClick = OptionsPaginationClick - end - object chbxPaginateByWrapping: TCheckBox - Tag = 1 - Left = 90 - Top = 236 - Width = 200 - Height = 17 - Caption = 'By Wrapping' - TabOrder = 6 - OnClick = OptionsPaginationClick - end - object chbxOneWrappingPerPage: TCheckBox - Tag = 2 - Left = 90 - Top = 259 - Width = 200 - Height = 17 - Caption = 'One Wrapping Per Page' - TabOrder = 7 - OnClick = OptionsPaginationClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 4 - object bvlStyles: TBevel - Left = 115 - Top = 13 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 259 - Width = 224 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 255 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 214 - Height = 183 - end - object Label1: TLabel - Left = 77 - Top = 118 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 23 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 228 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 228 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 228 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 15 - Height = 17 - Caption = '&Use Native Styles' - TabOrder = 0 - OnClick = OptionsFormattingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 275 - Width = 288 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 307 - Width = 68 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 79 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 153 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 116 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 226 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 228 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Clear' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Restore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - end - object pnlPreview: TPanel - Left = 313 - Top = 44 - Width = 318 - Height = 315 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewVGrid: TcxVerticalGrid - Left = 6 - Top = 8 - Width = 307 - Height = 303 - BorderStyle = cxcbsNone - OptionsView.ScrollBars = ssNone - OptionsView.RowHeaderWidth = 112 - OptionsView.ValueWidth = 150 - TabOrder = 0 - OnDrawValue = PreviewVGridDrawValue - object rowLuxurySedan: TcxCategoryRow - Properties.Caption = 'Luxury sedans' - Properties.HeaderAlignmentVert = vaCenter - object rowManufacturer: TcxEditorRow - Properties.Caption = 'Manufacturer' - Properties.HeaderAlignmentVert = vaCenter - Properties.EditPropertiesClassName = 'TcxTextEditProperties' - Properties.EditProperties.MaxLength = 0 - Properties.DataBinding.ValueType = 'String' - Properties.Value = 'BMW' - end - object rowModel: TcxEditorRow - Properties.Caption = 'Model' - Properties.HeaderAlignmentVert = vaCenter - Properties.EditPropertiesClassName = 'TcxTextEditProperties' - Properties.EditProperties.MaxLength = 0 - Properties.DataBinding.ValueType = 'String' - Properties.Value = '760 Li V12' - end - object rowPicture: TcxEditorRow - Height = 116 - Properties.Caption = 'Picture' - Properties.HeaderAlignmentVert = vaCenter - Properties.EditPropertiesClassName = 'TcxImageProperties' - Properties.DataBinding.ValueType = 'String' - Properties.Value = Null - end - object rowEngine: TcxEditorRow - Height = 57 - Properties.Caption = 'Engine' - Properties.EditPropertiesClassName = 'TcxMemoProperties' - Properties.EditProperties.MaxLength = 0 - Properties.DataBinding.ValueType = 'String' - Properties.Value = - '6.0L DOHC V12 438 HP 48V DI Valvetronic 12-cylinder engine with ' + - '6.0-liter displacement, dual overhead cam valvetrain' - end - object rowTransmission: TcxEditorRow - Height = 17 - Properties.Caption = 'Transmission' - Properties.DataBinding.ValueType = 'String' - Properties.Value = 'Elec 6-Speed Automatic w/Steptronic' - end - object rowTires: TcxEditorRow - Height = 44 - Properties.Caption = 'Tires' - Properties.EditPropertiesClassName = 'TcxMemoProperties' - Properties.EditProperties.MaxLength = 0 - Properties.DataBinding.ValueType = 'String' - Properties.Value = - 'P245/45R19 Fr - P275/40R19 Rr Performance. Low Profile tires wit' + - 'h 245mm width, 19.0" rim' - end - end - end - end - object cxStyleRepository1: TcxStyleRepository - Left = 4 - Top = 373 - object styleCategory: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWindowText - end - object styleHeader: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - object styleContent: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 32 - Top = 373 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - ShortCut = 16454 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - ShortCut = 16451 - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 60 - Top = 373 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnk.pas deleted file mode 100644 index e1dda642..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnk.pas +++ /dev/null @@ -1,8038 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxVGridLnk; - -interface - -{$I cxVer.inc} - -uses - Windows, SysUtils, Classes, Graphics, Controls, StdCtrls, ExtCtrls, ComCtrls, - Menus, ImgList, cxClasses, cxControls, cxGraphics, cxLookAndFeels, cxStyles, - cxCustomData, cxInplaceContainer, cxVGrid, cxDBVGrid, cxOI, cxEdit, cxTextEdit, - cxMemo, cxImage, dxBase, dxPSSngltn, dxPSGlbl, dxPScxCommon, dxPSCore, dxPrnPg, - dxExtCtrls, cxDrawTextUtils; - -const - vspsVGridFirst = 0; - vspsVGridContent = vspsVGridFirst + 0; - vspsVGridHeader = vspsVGridFirst + 1; - vspsVGridCategory = vspsVGridFirst + 2; - vspsVGridLast = vspsVGridFirst + 2; - - cxVerticalGridBaseAttributeID = 0; - cxVerticalGridUndefinedID = cxVerticalGridBaseAttributeID + 0; - cxVerticalGridCategoryRowID = cxVerticalGridBaseAttributeID + 1; - cxVerticalGridRowHeaderID = cxVerticalGridBaseAttributeID + 2; - cxVerticalGridRowHeaderSeparatorID = cxVerticalGridBaseAttributeID + 3; - cxVerticalGridRowValueID = cxVerticalGridBaseAttributeID + 4; - cxVerticalGridRowValueSeparatorID = cxVerticalGridBaseAttributeID + 5; - cxVerticalGridRowIndentID = cxVerticalGridBaseAttributeID + 6; - -type - TcxCustomVerticalGridReportLink = class; - TcxfmVerticalGridReportLinkDesignWindow = class; - TcxVerticalGridReportLinkOptionsView = class; - - TcxCustomVerticalGridAdapterClass = class of TcxCustomVerticalGridAdapter; - TcxCustomVerticalGridAdapter = class; - TcxCustomVerticalGridReportLinkBuilderClass = class of TcxCustomVerticalGridReportLinkBuilder; - TcxCustomVerticalGridReportLinkBuilder = class; - TcxCustomVerticalGridReportLinkFormatterClass = class of TcxCustomVerticalGridReportLinkFormatter; - TcxCustomVerticalGridReportLinkFormatter = class; - - TcxVerticalGridCustomRowHelperClass = class of TcxVerticalGridCustomRowHelper; - TcxVerticalGridCustomRowHelper = class; - TcxVerticalGridCategoryRowHelper = class; - TcxVerticalGridCustomEditorRowHelper = class; - TcxVerticalGridCustomMultiEditorRowHelper = class; - - TcxVerticalGridHostInfo = class; - - TcxVerticalGridAttributeID = type Integer; - - TcxVerticalGridCellCustomDrawInfo = record - AttributeID: TcxVerticalGridAttributeID; - Row: TcxCustomRow; - CellIndex: Integer; - RecordIndex: Integer; - end; - - { Row Places } - - TcxVerticalGridRowElementPlace = class - public - Offset: Integer; - Width: Integer; - procedure Clear; - end; - - TcxVerticalGridCustomRowPlaceClass = class of TcxVerticalGridCustomRowPlace; - - TcxVerticalGridCustomRowPlace = class - private - FFormatter: TcxCustomVerticalGridReportLinkFormatter; - FRow: TcxCustomRow; - FWrapIndex: Integer; - function GetDC: HDC; - function GetHasHeader: Boolean; - function GetIndentArea: Integer; - function GetInterRecordsSpace: Integer; - function GetItemCount: Integer; - function GetRecordCount: Integer; - function GetRecordWidth(RecordIndex: Integer): Integer; - function GetStartRecordIndex: Integer; - function GetStopRecordIndex: Integer; - protected - procedure AddDelimiters(AReportLink: TcxCustomVerticalGridReportLink); virtual; - - procedure Calculate; virtual; - function CalculatedHeaderWidth: Integer; virtual; - function CalculatedMinHeight: Integer; virtual; - function CalculatedMinWidth: Integer; virtual; - function CalculatedRecordWidth(ARecordIndex: Integer): Integer; virtual; - function CalculatedTextPatternHeight(AFont: HFONT): Integer; - function CalculatedTextWidth(const AText: string; AFont: HFONT): Integer; - procedure Clear; virtual; - - function GetHeaderAvailableWidth: Integer; virtual; - function GetValueAvailableWidth(RecordIndex: Integer): Integer; virtual; - - function Row: TcxCustomRow; overload; virtual; - function RowHelper: TcxVerticalGridCustomRowHelper; overload; virtual; - - property DC: HDC read GetDC; - property Formatter: TcxCustomVerticalGridReportLinkFormatter read FFormatter; - property HasHeader: Boolean read GetHasHeader; - property HeaderAvailableWidth: Integer read GetHeaderAvailableWidth; - property InterRecordsSpace: Integer read GetInterRecordsSpace; - property ItemCount: Integer read GetItemCount; - property RecordCount: Integer read GetRecordCount; - property RecordWidths[RecordIndex: Integer]: Integer read GetRecordWidth; - property StartRecordIndex: Integer read GetStartRecordIndex; - property StopRecordIndex: Integer read GetStopRecordIndex; - property ValueAvailableWidths[RecordIndex: Integer]: Integer read GetValueAvailableWidth; - public - constructor Create(AFormatter: TcxCustomVerticalGridReportLinkFormatter; ARow: TcxCustomRow; AWrapIndex: Integer); virtual; - - property IndentArea: Integer read GetIndentArea; - property WrapIndex: Integer read FWrapIndex; - end; - - TcxVerticalGridCategoryRowPlace = class(TcxVerticalGridCustomRowPlace) - private - FPlace: TcxVerticalGridRowElementPlace; - function GetCaption: string; - function GetFont: TFont; - function GetOffset: Integer; - function GetWidth: Integer; - protected - procedure Calculate; override; - function CalculatedHeaderWidth: Integer; override; - function CalculatedMinHeight: Integer; override; - function CalculatedMinWidth: Integer; override; - - function Row: TcxCategoryRow; reintroduce; overload; - function RowHelper: TcxVerticalGridCategoryRowHelper; reintroduce; overload; - - property Caption: string read GetCaption; - property Font: TFont read GetFont; - public - constructor Create(AFormatter: TcxCustomVerticalGridReportLinkFormatter; ARow: TcxCustomRow; AWrapIndex: Integer); override; - destructor Destroy; override; - - property Offset: Integer read GetOffset; - property Width: Integer read GetWidth; - end; - - TcxVerticalGridCustomEditorRowPlace = class(TcxVerticalGridCustomRowPlace) - private - FHeaderPlace: TcxVerticalGridRowElementPlace; - FValuePlaces: TList; - function GetHeaderFont: TFont; - function GetProperty(RecordIndex: Integer): TcxCustomEditProperties; - function GetValueFont(RecordIndex: Integer): TFont; - function GetValuePlace(RecordIndex: Integer): TcxVerticalGridRowElementPlace; - function GetValuePlaceCount: Integer; - function GetValue(RecordIndex: Integer): TcxEditValue; - function GetValuesOffset: Integer; - protected - procedure AddDelimiters(AReportLink: TcxCustomVerticalGridReportLink); override; - - procedure Calculate; override; - function CalculatedHeaderWidth: Integer; override; - function CalculatedMinHeight: Integer; override; - function CalculatedRecordWidth(ARecordIndex: Integer): Integer; override; - procedure CalculateHeaderPlace; virtual; - procedure CalculateValuePlaces; virtual; - procedure Clear; override; - - procedure ClearValuePlaces; - procedure CreateValuePlaces; - procedure FreeAndNilValuePlaces; - - function DoesItemParticipateInBestFitCalculation(ARecordIndex: Integer): Boolean; - function MeasureWidth(ARecordIndex: Integer): Integer; - - function Row: TcxCustomEditorRow; reintroduce; overload; - function RowHelper: TcxVerticalGridCustomEditorRowHelper; reintroduce; overload; - - property HeaderFont: TFont read GetHeaderFont; - property Properties[RecordIndex: Integer]: TcxCustomEditProperties read GetProperty; - property ValueFonts[RecordIndex: Integer]: TFont read GetValueFont; - property Values[RecordIndex: Integer]: TcxEditValue read GetValue; - property ValuesOffset: Integer read GetValuesOffset; - public - constructor Create(AFormatter: TcxCustomVerticalGridReportLinkFormatter; ARow: TcxCustomRow; AWrapIndex: Integer); override; - destructor Destroy; override; - - property HeaderPlace: TcxVerticalGridRowElementPlace read FHeaderPlace; - property ValuePlaceCount: Integer read GetValuePlaceCount; - property ValuePlaces[RecordIndex: Integer]: TcxVerticalGridRowElementPlace read GetValuePlace; - end; - - TcxVerticalGridCustomMultiEditorRowPlace = class(TcxVerticalGridCustomRowPlace) - private - FHeaderPlaces: TList; - FHeaderSeparatorPlaces: TList; - FValuePlaces: TList; - FValueSeparatorPlaces: TList; - function GetHasHeaderSeparators: Boolean; - function GetHasValueSeparators: Boolean; - function GetHeaderFont(CellIndex: Integer): TFont; - function GetHeaderPlace(CellIndex: Integer): TcxVerticalGridRowElementPlace; - function GetHeaderPlaceCount: Integer; - function GetHeaderSeparatorCount: Integer; - function GetHeaderSeparatorPlace(CellIndex: Integer): TcxVerticalGridRowElementPlace; - function GetHeaderSeparatorPlaceCount: Integer; - function GetHeaderSeparatorsArea: Integer; - function GetHeaderSeparatorsFont(CellIndex: Integer): TFont; - function GetProperty(CellIndex, RecordIndex: Integer): TcxCustomEditProperties; - function GetValue(CellIndex, RecordIndex: Integer): TcxEditValue; - function GetValueFlatIndex(CellIndex, RecordIndex: Integer): Integer; - function GetValueFont(CellIndex, RecordIndex: Integer): TFont; - function GetValuePlace(CellIndex, RecordIndex: Integer): TcxVerticalGridRowElementPlace; - function GetValuePlaceCount: Integer; - function GetValueSeparatorCount: Integer; - function GetValueSeparatorFlatIndex(CellIndex, RecordIndex: Integer): Integer; - function GetValueSeparatorPlace(CellIndex, RecordIndex: Integer): TcxVerticalGridRowElementPlace; - function GetValueSeparatorPlaceCount: Integer; - function GetValueSeparatorsArea(RecordIndex: Integer): Integer; - function GetValueSeparatorsFont(CellIndex, RecordIndex: Integer): TFont; - function GetValuesOffset: Integer; - protected - procedure AddDelimiters(AReportLink: TcxCustomVerticalGridReportLink); override; - - procedure Calculate; override; - function CalculatedHeaderWidth: Integer; override; - function CalculatedMinHeight: Integer; override; - function CalculatedRecordWidth(ARecordIndex: Integer): Integer; override; - procedure CalculateHeaderPartWidths; - procedure CalculateHeaderPlaces; virtual; - procedure CalculateHeaderSeparatorPlaces; virtual; - procedure CalculateHeaderSeparatorWidths; virtual; - procedure CalculatePartWidths(AnAutoWidthObject: TcxAutoWidthObject; AnAvailableWidth: Integer); - procedure CalculateValuePartWidths; - procedure CalculateValuePlaces; virtual; - procedure CalculateValueSeparatorPlaces; virtual; - procedure CalculateValueSeparatorWidths; virtual; - procedure Clear; override; - - function GetHeaderAvailableWidth: Integer; override; - function GetValueAvailableWidth(RecordIndex: Integer): Integer; override; - - procedure ClearPlaces; - procedure CreatePlaces; - procedure FreeAndNilPlaces; - - function DoesItemParticipateInBestFitCalculation(ACellIndex, ARecordIndex: Integer): Boolean; - function MeasureWidth(ACellIndex, ARecordIndex: Integer): Integer; - - function Row: TcxCustomMultiEditorRow; reintroduce; overload; - function RowHelper: TcxVerticalGridCustomMultiEditorRowHelper; reintroduce; overload; - - property HasHeaderSeparators: Boolean read GetHasHeaderSeparators; - property HasValueSeparators: Boolean read GetHasValueSeparators; - property HeaderFonts[CellIndex: Integer]: TFont read GetHeaderFont; - property HeaderSeparatorCount: Integer read GetHeaderSeparatorCount; - property HeaderSeparatorsArea: Integer read GetHeaderSeparatorsArea; - property HeaderSeparatorsFonts[Index: Integer]: TFont read GetHeaderSeparatorsFont; - property Properties[CellIndex, RecordIndex: Integer]: TcxCustomEditProperties read GetProperty; - property ValueFlatIndexes[CellIndex, RecordIndex: Integer]: Integer read GetValueFlatIndex; - property ValueFonts[CellIndex, RecordIndex: Integer]: TFont read GetValueFont; - property Values[CellIndex, RecordIndex: Integer]: TcxEditValue read GetValue; - property ValueSeparatorCount: Integer read GetValueSeparatorCount; - property ValueSeparatorFlatIndexes[CellIndex, RecordIndex: Integer]: Integer read GetValueSeparatorFlatIndex; - property ValueSeparatorsAreas[RecordIndex: Integer]: Integer read GetValueSeparatorsArea; - property ValueSeparatorsFonts[CellIndex, RecordIndex: Integer]: TFont read GetValueSeparatorsFont; - property ValuesOffset: Integer read GetValuesOffset; - public - constructor Create(AFormatter: TcxCustomVerticalGridReportLinkFormatter; ARow: TcxCustomRow; AWrapIndex: Integer); override; - destructor Destroy; override; - - property HeaderPlaceCount: Integer read GetHeaderPlaceCount; - property HeaderPlaces[CellIndex: Integer]: TcxVerticalGridRowElementPlace read GetHeaderPlace; - property HeaderSeparatorPlaceCount: Integer read GetHeaderSeparatorPlaceCount; - property HeaderSeparatorPlaces[CellIndex: Integer]: TcxVerticalGridRowElementPlace read GetHeaderSeparatorPlace; - property ValuePlaceCount: Integer read GetValuePlaceCount; - property ValuePlaces[CellIndex, RecordIndex: Integer]: TcxVerticalGridRowElementPlace read GetValuePlace; - property ValueSeparatorPlaceCount: Integer read GetValueSeparatorPlaceCount; - property ValueSeparatorPlaces[CellIndex, RecordIndex: Integer]: TcxVerticalGridRowElementPlace read GetValueSeparatorPlace; - end; - - { Row Producers } - - TcxVerticalGridReportLinkCustomElementProducerClass = class of TcxVerticalGridReportLinkCustomElementProducer; - - TcxVerticalGridReportLinkCustomElementProducer = class - private - FBuilder: TcxCustomVerticalGridReportLinkBuilder; - FHost: TdxReportCell; - FRow: TdxReportCell; - FRowHeight: Integer; - FWrapIndex: Integer; - function GetDC: HDC; - function GetRowWidth: Integer; - protected - procedure CalculateRowHeight; virtual; - procedure CreateRow; virtual; - procedure CreateRowHost(AHostInfo: TcxVerticalGridHostInfo); virtual; - procedure InitializeRow; virtual; - - property DC: HDC read GetDC; - property WrapIndex: Integer read FWrapIndex; - public - constructor Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); virtual; - - function Adapter: TcxCustomVerticalGridAdapter; overload; virtual; - function Builder: TcxCustomVerticalGridReportLinkBuilder; overload; virtual; - function Formatter: TcxCustomVerticalGridReportLinkFormatter; overload; virtual; - - function Produce(AHostInfo: TcxVerticalGridHostInfo; AWrapIndex: Integer): TdxReportCell; virtual; - - property Host: TdxReportCell read FHost; - property Row: TdxReportCell read FRow; - property RowHeight: Integer read FRowHeight write FRowHeight; - property RowWidth: Integer read GetRowWidth; - end; - - TcxVerticalGridReportLinkWrapSeparatorProducerClass = class of TcxVerticalGridReportLinkWrapSeparatorProducer; - - TcxVerticalGridReportLinkWrapSeparatorProducer = class(TcxVerticalGridReportLinkCustomElementProducer) - private - FSeparator: TdxReportCellString; - function GetSeparatorBounds: TRect; - protected - procedure CreateRow; override; - procedure CreateSeparator(AParent: TdxReportCell); virtual; - procedure InitializeRow; override; - procedure InitializeSeparator; virtual; - public - property Separator: TdxReportCellString read FSeparator; - property SeparatorBounds: TRect read GetSeparatorBounds; - end; - - TcxVerticalGridReportLinkCustomRowProducerClass = class of TcxVerticalGridReportLinkCustomRowProducer; - - TcxVerticalGridReportLinkCustomRowProducer = class(TcxVerticalGridReportLinkCustomElementProducer) - private - FGridRow: TcxCustomRow; - FIndents: TList; - function GetIndent(Index: Integer): TdxReportCellExpandButton; - function GetIndentBounds(Index: Integer): TRect; - function GetIndentCount: Integer; - function GetIndentWidth: Integer; - function GetItemCount: Integer; - function GetRecordCount: Integer; - function GetStartRecordIndex: Integer; - function GetStopRecordIndex: Integer; - protected - procedure CalculateRowAutoHeight; virtual; - procedure CalculateRowHeight; override; - procedure ClearItems; virtual; - procedure CreateRow; override; - function CreateRowIndent(AParent: TdxReportCell): TdxReportCellExpandButton; - procedure CreateRowIndents(AParent: TdxReportCell); virtual; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TAbstractdxReportCellData): Boolean; virtual; - procedure FixupRowDataHeight; virtual; - procedure FixupRowHeight; virtual; - procedure FixupRowItselfHeight; virtual; - procedure InitializeRow; override; - procedure InitializeRowIndent(AnItem: TdxReportCellExpandButton; AnIndex: Integer); virtual; - - function GetAutoHeight: Boolean; virtual; - function GetHasIndents: Boolean; virtual; - function GetLineHeight: Integer; virtual; - - property ItemCount: Integer read GetItemCount; - property RecordCount: Integer read GetRecordCount; - public - constructor Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); override; - destructor Destroy; override; - - function GridRow: TcxCustomRow; overload; virtual; - function GridRowHelper: TcxVerticalGridCustomRowHelper; overload; virtual; - function GridRowPlace: TcxVerticalGridCustomRowPlace; overload; virtual; - - function Produce(AHostInfo: TcxVerticalGridHostInfo; AGridRow: TcxCustomRow; - AWrapIndex: Integer): TdxReportCell; reintroduce; overload; - - property AutoHeight: Boolean read GetAutoHeight; - property HasIndents: Boolean read GetHasIndents; - property IndentBounds[Index: Integer]: TRect read GetIndentBounds; - property IndentCount: Integer read GetIndentCount; - property Indents[Index: Integer]: TdxReportCellExpandButton read GetIndent; - property IndentWidth: Integer read GetIndentWidth; - property LineHeight: Integer read GetLineHeight; - property StartRecordIndex: Integer read GetStartRecordIndex; - property StopRecordIndex: Integer read GetStopRecordIndex; - end; - - TcxVerticalGridReportLinkCategoryRowProducer = class(TcxVerticalGridReportLinkCustomRowProducer) - private - function GetCategoryBounds: TRect; - protected - procedure CreateCategoryRow(AParent: TdxReportCell); virtual; - procedure CreateRow; override; - public - function GridRow: TcxCategoryRow; reintroduce; overload; - function GridRowHelper: TcxVerticalGridCategoryRowHelper; reintroduce; overload; - function GridRowPlace: TcxVerticalGridCategoryRowPlace; reintroduce; overload; - - property CategoryBounds: TRect read GetCategoryBounds; - end; - - TcxVerticalGridReportLinkCustomEditableRowProducer = class(TcxVerticalGridReportLinkCustomRowProducer) - private - FHeaders: TList; - FValues: TList; - function GetHeader(Index: Integer): TdxReportCellImage; - function GetHeaderCount: Integer; - function GetValue(Index: Integer): TAbstractdxReportCellData; - function GetValueCount: Integer; - protected - procedure ClearItems; override; - function CreateHeaderItem(AParent: TdxReportCell; ACellIndex: Integer): TdxReportCellImage; - function CreateValueItem(AParent: TdxReportCell; ACellIndex, ARecordIndex: Integer): TAbstractdxReportCellData; - procedure DoInitializeHeader(AnItem: TdxReportCellImage; AnIndex: Integer); virtual; - procedure DoInitializeValue(AnItem: TAbstractdxReportCellData; ACellIndex, ARecordIndex: Integer); virtual; - function DoesItemParticipateInRowAutoHeightCalculation(AnItem: TAbstractdxReportCellData): Boolean; override; - - property HeaderCount: Integer read GetHeaderCount; - property Headers[Index: Integer]: TdxReportCellImage read GetHeader; - property ValueCount: Integer read GetValueCount; - property Values[Index: Integer]: TAbstractdxReportCellData read GetValue; - public - constructor Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); override; - destructor Destroy; override; - - property RecordCount; - end; - - TcxVerticalGridReportLinkCustomEditorRowProducer = class(TcxVerticalGridReportLinkCustomEditableRowProducer) - private - function GetHasHeader: Boolean; - function GetHeader: TdxReportCellImage; - function GetHeaderBounds: TRect; - function GetValueBounds(Index: Integer): TRect; - protected - procedure CreateHeader(AParent: TdxReportCell); virtual; - procedure CreateRow; override; - procedure CreateValues(AParent: TdxReportCell); virtual; - - property HasHeader: Boolean read GetHasHeader; - property HeaderBounds: TRect read GetHeaderBounds; - property ValueBounds[Index: Integer]: TRect read GetValueBounds; - public - function GridRow: TcxCustomEditorRow; reintroduce; overload; - function GridRowHelper: TcxVerticalGridCustomEditorRowHelper; reintroduce; overload; - function GridRowPlace: TcxVerticalGridCustomEditorRowPlace; reintroduce; overload; - - property Header: TdxReportCellImage read GetHeader; - property ValueCount; - property Values; - end; - - TcxVerticalGridReportLinkCustomMultiEditorRowProducer = class(TcxVerticalGridReportLinkCustomEditableRowProducer) - private - FHeaderSeparators: TList; - FValueSeparators: TList; - function GetHasHeaderSeparators: Boolean; - function GetHasValueSeparators: Boolean; - function GetHeaderBounds(Index: Integer): TRect; - function GetHeaderSeparator(Index: Integer): TdxReportCellString; - function GetHeaderSeparatorBounds(Index: Integer): TRect; - function GetHeaderSeparatorCount: Integer; - function GetHeaderSeparatorText(Index: Integer): string; - function GetValue(CellIndex, RecordIndex: Integer): TAbstractdxReportCellData; - function GetValueBounds(CellIndex, RecordIndex: Integer): TRect; - function GetValueSeparator(Index: Integer): TdxReportCellString; - function GetValueSeparatorBounds(Index, RecordIndex: Integer): TRect; - function GetValueSeparatorCount: Integer; - function GetValueSeparatorText(Index: Integer): string; - protected - procedure ClearItems; override; - procedure CreateRow; override; - - procedure CreateHeaders(AParent: TdxReportCell); virtual; - function CreateHeaderSeparator(AParent: TdxReportCell): TdxReportCellString; - procedure CreateHeaderSeparators(AParent: TdxReportCell); virtual; - procedure CreateValues(AParent: TdxReportCell); virtual; - function CreateValueSeparator(AParent: TdxReportCell): TdxReportCellString; - procedure CreateValueSeparators(AParent: TdxReportCell); virtual; - procedure DoInitializeHeaderSeparator(AnItem: TdxReportCellString; AnIndex: Integer); virtual; - procedure DoInitializeValueSeparator(AnItem: TdxReportCellString; AnIndex, ARecordIndex: Integer); virtual; - - property HasHeaderSeparators: Boolean read GetHasHeaderSeparators; - property HasValueSeparators: Boolean read GetHasValueSeparators; - property HeaderBounds[Index: Integer]: TRect read GetHeaderBounds; - property HeaderSeparatorBounds[Index: Integer]: TRect read GetHeaderSeparatorBounds; - property HeaderSeparatorTexts[Index: Integer]: string read GetHeaderSeparatorText; - property ValueSeparatorBounds[Index, RecordIndex: Integer]: TRect read GetValueSeparatorBounds; - property ValueBounds[CellIndex, RecordIndex: Integer]: TRect read GetValueBounds; - property ValueSeparatorTexts[Index: Integer]: string read GetValueSeparatorText; - public - constructor Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); override; - destructor Destroy; override; - - function GridRow: TcxCustomMultiEditorRow; reintroduce; overload; - function GridRowHelper: TcxVerticalGridCustomMultiEditorRowHelper; reintroduce; overload; - function GridRowPlace: TcxVerticalGridCustomMultiEditorRowPlace; reintroduce; overload; - - property HeaderCount; - property Headers; - property HeaderSeparatorCount: Integer read GetHeaderSeparatorCount; - property HeaderSeparators[Index: Integer]: TdxReportCellString read GetHeaderSeparator; - property ValueCount; - property Values[CellIndex, RecordIndex: Integer]: TAbstractdxReportCellData read GetValue; - property ValueSeparatorCount: Integer read GetValueSeparatorCount; - property ValueSeparators[Index: Integer]: TdxReportCellString read GetValueSeparator; - end; - - { Row Helpers } - - TcxVerticalGridCustomRowHelper = class(TdxCustomClassMapItem) - private - FAdapter: TcxCustomVerticalGridAdapter; - FRow: TcxCustomRow; - protected - function Adapter: TcxCustomVerticalGridAdapter; overload; virtual; - - function GetDisplayText(Index, RecordIndex: Integer): string; virtual; - function GetEditProperties(Index, RecordIndex: Integer): TcxCustomEditProperties; virtual; - function GetHasHeaderImage(Index: Integer): Boolean; virtual; - function GetHasHeaderSeparators: Boolean; virtual; - function GetHasValueSeparators: Boolean; virtual; - function GetHeaderAlignmentHorz(Index: Integer): TcxTextAlignX; virtual; - function GetHeaderAlignmentVert(Index: Integer): TcxTextAlignY; virtual; - function GetHeaderCaption(Index: Integer): string; virtual; - function GetImageIndex(Index: Integer): Integer; virtual; - function GetIndentCount: Integer; virtual; - function GetItemCount: Integer; virtual; - function GetRecordMinWidth: Integer; virtual; - function GetRowProperties(Index: Integer): TcxCustomRowProperties; virtual; - function GetSeparatorsAlignmentVert: TcxAlignmentVert; virtual; - function GetValue(Index, RecordIndex: Integer): TcxEditValue; virtual; - - property HasHeaderSeparators: Boolean read GetHasHeaderSeparators; - property HasValueSeparators: Boolean read GetHasValueSeparators; - property ItemCount: Integer read GetItemCount; - property RecordMinWidth: Integer read GetRecordMinWidth; - property SeparatorsAlignmentVert: TcxAlignmentVert read GetSeparatorsAlignmentVert; - public - constructor Create(AnAdapter: TcxCustomVerticalGridAdapter); virtual; - procedure Initialize(ARow: TcxCustomRow); virtual; - - class function PairClass: TClass; override; - class procedure Register; - class procedure Unregister; - - class function ProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass; virtual; - function Properties(Index: Integer): TcxCustomRowProperties; overload; virtual; - function Row: TcxCustomRow; overload; virtual; - class function RowClass: TcxCustomRowClass; virtual; - class function RowPlaceClass: TcxVerticalGridCustomRowPlaceClass; virtual; - - property DisplayTexts[Index, RecordIndex: Integer]: string read GetDisplayText; - property EditProperties[Index, RecordIndex: Integer]: TcxCustomEditProperties read GetEditProperties; - property HasHeaderImages[Index: Integer]: Boolean read GetHasHeaderImage; - property HeaderAlignmentHorzs[Index: Integer]: TcxTextAlignX read GetHeaderAlignmentHorz; - property HeaderAlignmentVerts[Index: Integer]: TcxTextAlignY read GetHeaderAlignmentVert; - property HeaderCaptions[Index: Integer]: string read GetHeaderCaption; - property ImageIndexes[Index: Integer]: Integer read GetImageIndex; - property IndentCount: Integer read GetIndentCount; - property Values[Index, RecordIndex: Integer]: TcxEditValue read GetValue; - end; - - TcxVerticalGridCategoryRowHelper = class(TcxVerticalGridCustomRowHelper) - protected - function GetCaption: string; - function GetHeaderAlignmentHorz(Index: Integer): TcxTextAlignX; override; - function GetHeaderAlignmentVert(Index: Integer): TcxTextAlignY; override; - function GetHeaderCaption(Index: Integer): string; override; - function GetImageIndex(Index: Integer): Integer; override; - public - class function ProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass; override; - function Properties(Index: Integer): TcxCaptionRowProperties; reintroduce; overload; - function Row: TcxCategoryRow; reintroduce; overload; - class function RowClass: TcxCustomRowClass; override; - class function RowPlaceClass: TcxVerticalGridCustomRowPlaceClass; override; - - property Caption: string read GetCaption; - end; - - TcxVerticalGridCustomEditorRowHelper = class(TcxVerticalGridCustomRowHelper) - protected - function GetDisplayText(Index, RecordIndex: Integer): string; override; - function GetEditProperties(Index, RecordIndex: Integer): TcxCustomEditProperties; override; - function GetHeaderAlignmentHorz(Index: Integer): TcxTextAlignX; override; - function GetHeaderAlignmentVert(Index: Integer): TcxTextAlignY; override; - function GetHeaderCaption(Index: Integer): string; override; - function GetImageIndex(Index: Integer): Integer; override; - function GetRecordMinWidth: Integer; override; - function GetValue(Index, RecordIndex: Integer): TcxEditValue; override; - public - class function ProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass; override; - function Properties(Index: Integer): TcxCustomEditorRowProperties; reintroduce; overload; - function Row: TcxCustomEditorRow; reintroduce; overload; - class function RowClass: TcxCustomRowClass; override; - class function RowPlaceClass: TcxVerticalGridCustomRowPlaceClass; override; - - property RecordMinWidth; - end; - - TcxVerticalGridEditorRowHelper = class(TcxVerticalGridCustomEditorRowHelper) - public - function Properties(Index: Integer): TcxEditorRowProperties; reintroduce; overload; - function Row: TcxEditorRow; reintroduce; overload; - class function RowClass: TcxCustomRowClass; override; - end; - - TcxVerticalGridDBEditorRowHelper = class(TcxVerticalGridCustomEditorRowHelper) - public - function Properties(Index: Integer): TcxDBEditorRowProperties; reintroduce; overload; - function Row: TcxDBEditorRow; reintroduce; overload; - class function RowClass: TcxCustomRowClass; override; - end; - - TcxVerticalGridCustomMultiEditorRowHelper = class(TcxVerticalGridCustomRowHelper) - private - function GetHeaderSeparatorCount: Integer; - function GetHeaderSeparatorText(Index: Integer): string; - function GetValueSeparatorCount: Integer; - function GetValueSeparatorText(Index: Integer): string; - protected - function GetDisplayText(Index, RecordIndex: Integer): string; override; - function GetEditProperties(Index, RecordIndex: Integer): TcxCustomEditProperties; override; - function GetHasHeaderSeparators: Boolean; override; - function GetHasValueSeparators: Boolean; override; - function GetHeaderAlignmentHorz(Index: Integer): TcxTextAlignX; override; - function GetHeaderAlignmentVert(Index: Integer): TcxTextAlignY; override; - function GetHeaderCaption(Index: Integer): string; override; - function GetImageIndex(Index: Integer): Integer; override; - function GetItemCount: Integer; override; - function GetRecordMinWidth: Integer; override; - function GetRowProperties(Index: Integer): TcxCustomRowProperties; override; - function GetSeparatorsAlignmentVert: TcxAlignmentVert; override; - function GetValue(Index, RecordIndex: Integer): TcxEditValue; override; - public - class function ProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass; override; - function Properties(Index: Integer): TcxEditorRowItemProperties; reintroduce; overload; - function RootProperties: TcxMultiEditorRowProperties; overload; virtual; - function Row: TcxCustomMultiEditorRow; reintroduce; overload; - class function RowClass: TcxCustomRowClass; override; - class function RowPlaceClass: TcxVerticalGridCustomRowPlaceClass; override; - - property HasHeaderSeparators; - property HasValueSeparators; - property HeaderSeparatorCount: Integer read GetHeaderSeparatorCount; - property HeaderSeparatorTexts[Index: Integer]: string read GetHeaderSeparatorText; - property ItemCount; - property RecordMinWidth; - property SeparatorsAlignmentVert; - property ValueSeparatorCount: Integer read GetValueSeparatorCount; - property ValueSeparatorTexts[Index: Integer]: string read GetValueSeparatorText; - end; - - { Caches } - - TcxVerticalGridRowHelperCache = class(TdxCustomCache) - private - FAdapter: TcxCustomVerticalGridAdapter; - function GetHelper(Row: TcxCustomRow): TcxVerticalGridCustomRowHelper; - function GetItem(Index: Integer): TcxVerticalGridCustomRowHelper; - protected - function IndexOf(Row: TcxCustomRow): Integer; - property Items[Index: Integer]: TcxVerticalGridCustomRowHelper read GetItem; - public - constructor Create(AnAdapter: TcxCustomVerticalGridAdapter); - - property Adapter: TcxCustomVerticalGridAdapter read FAdapter; - property Helpers[Row: TcxCustomRow]: TcxVerticalGridCustomRowHelper read GetHelper; default; - end; - - TcxVerticalGridReportLinkProducerCache = class(TdxCustomCache) - private - FBuilder: TcxCustomVerticalGridReportLinkBuilder; - function GetItem(Index: Integer): TcxVerticalGridReportLinkCustomRowProducer; - function GetProducer(ProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass): TcxVerticalGridReportLinkCustomRowProducer; - protected - function IndexOf(AProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass): Integer; - property Items[Index: Integer]: TcxVerticalGridReportLinkCustomRowProducer read GetItem; - public - constructor Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); - property Builder: TcxCustomVerticalGridReportLinkBuilder read FBuilder; - property Producers[ProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass]: TcxVerticalGridReportLinkCustomRowProducer read GetProducer; default; - end; - - TcxCustomVerticalGridReportLinkBuilder = class - private - FAdapter: TcxCustomVerticalGridAdapter; - FFormatter: TcxCustomVerticalGridReportLinkFormatter; - FProducerCache: TcxVerticalGridReportLinkProducerCache; - FReportLink: TcxCustomVerticalGridReportLink; - FReportRows: TList; - FWrapSeparatorProducer: TcxVerticalGridReportLinkWrapSeparatorProducer; - function GetAvailableSiteWidth: Integer; - function GetAvailableWidth: Integer; - function GetHost: TdxReportCell; - function GetReportCells: TdxReportCells; - function GetReportRow(Index: Integer): TdxReportCell; - function GetReportRowCount: Integer; - function GetVerticalGrid: TcxCustomVerticalGrid; - protected - procedure AddReportRow(ARow: TdxReportCell); - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - - procedure CreateRow(ARow: TcxCustomRow; AWrapIndex: Integer); virtual; - procedure CreateRows; virtual; - procedure CreateWrapSeparator(AWrapIndex: Integer); virtual; - function GetRowProducer(ARow: TcxCustomRow): TcxVerticalGridReportLinkCustomRowProducer; - function GetRowProducerClass(ARow: TcxCustomRow): TcxVerticalGridReportLinkCustomRowProducerClass; virtual; - function GetWrapSeparatorProducer(AWrapIndex: Integer): TcxVerticalGridReportLinkWrapSeparatorProducer; - function GetWrapSeparatorProducerClass: TcxVerticalGridReportLinkWrapSeparatorProducerClass; virtual; - - function AreWrapSeparatorsNeeded: Boolean; - procedure DoBuild; virtual; - function IsAborted: Boolean; - - property ProducerCache: TcxVerticalGridReportLinkProducerCache read FProducerCache; - property ReportLink: TcxCustomVerticalGridReportLink read FReportLink; - public - constructor Create(AReportLink: TcxCustomVerticalGridReportLink); virtual; - destructor Destroy; override; - - procedure Build; virtual; - procedure Progress(const APercentDone: Double); - - function Adapter: TcxCustomVerticalGridAdapter; overload; virtual; - class function AdapterClass: TcxCustomVerticalGridAdapterClass; virtual; - function Formatter: TcxCustomVerticalGridReportLinkFormatter; overload; virtual; - class function FormatterClass: TcxCustomVerticalGridReportLinkFormatterClass; virtual; - - property AvailableSiteWidth: Integer read GetAvailableSiteWidth; - property AvailableWidth: Integer read GetAvailableWidth; - property Host: TdxReportCell read GetHost; - property ReportCells: TdxReportCells read GetReportCells; - property ReportRowCount: Integer read GetReportRowCount; - property ReportRows[Index: Integer]: TdxReportCell read GetReportRow; - property VerticalGrid: TcxCustomVerticalGrid read GetVerticalGrid; - end; - - TcxVerticalGridReportLinkBuilderHandler = class - private - FBuilder: TcxCustomVerticalGridReportLinkBuilder; - function GetReportLink: TcxCustomVerticalGridReportLink; - public - constructor Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); virtual; - function Builder: TcxCustomVerticalGridReportLinkBuilder; overload; virtual; - - property ReportLink: TcxCustomVerticalGridReportLink read GetReportLink; - end; - - TcxCustomVerticalGridAdapter = class(TcxVerticalGridReportLinkBuilderHandler) - private - FHelperCache: TcxVerticalGridRowHelperCache; - function GetCellAutoHeight: Boolean; - function GetCellEndEllipsis: Boolean; - function GetCellMultiline: Boolean; - function GetDataController: TcxCustomDataController; - function GetDefaultRowHeight: Integer; - function GetFirstRecordIndex: Integer; - function GetGridLinesColor: TColor; - function GetHeaderAvailableWidth(Row: TcxCustomRow): Integer; - function GetHeaderMinWidth: Integer; - function GetHeaderWidth: Integer; - function GetHelper(Row: TcxCustomRow): TcxVerticalGridCustomRowHelper; - function GetImages: TCustomImageList; - function GetIndentArea(Row: TcxCustomRow): Integer; - function GetIndentCount(Row: TcxCustomRow): Integer; - function GetIndentWidth: Integer; - function GetMakeSpaceForEmptyImage: Boolean; - function GetOptionsView: TcxvgOptionsView; - function GetPaintStyle: TcxvgPaintStyle; - function GetRecordCount: Integer; - function GetRecordMinWidth(RecordIndex: Integer): Integer; - function GetRecordWidth(RecordCount: Integer): Integer; - function GetRow(Index: Integer): TcxCustomRow; - function GetRowCount: Integer; - function GetRowHeight(Row: TcxCustomRow): Integer; - function GetShowHeaders: Boolean; - function GetShowHorzGridLines: Boolean; - function GetShowVertGridLines: Boolean; - function GetStyles: TcxVerticalGridStyles; - function GetValueMinWidth: Integer; - function GetVerticalGrid: TcxCustomVerticalGrid; - protected - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - - function GetInterRecordsSpace: Integer; virtual; - function GetLayoutStyle: TcxvgLayoutStyle; virtual; abstract; - { properties } - function GetProperties(ARow: TcxCustomRow; AnIndex, ARecordIndex: Integer): TcxCustomEditProperties; - function GetPropertiesClass(ARow: TcxCustomRow; AnIndex, ARecordIndex: Integer): TcxCustomEditPropertiesClass; - { styles } - function GetCategoryViewParams(ARow: TcxCustomRow): TcxViewParams; virtual; - function GetContentViewParams(ARow: TcxCustomRow; AnIndex, ARecordIndex: Integer): TcxViewParams; virtual; - function GetHeaderViewParams(ARow: TcxCustomRow): TcxViewParams; virtual; - function GetImageViewParams(ARow: TcxCustomRow): TcxViewParams; virtual; - function GetIndentViewParams(ARow: TcxCustomRow): TcxViewParams; virtual; - { backgrounds } - function GetBackgroundBitmap(Index: Integer): TBitmap; - function GetRowIndentBackgroundBitmapIndex(ARow: TcxCustomRow; Alevel: Integer): Integer; - function HasBackgroundBitmap(Index: Integer): Boolean; - - procedure FullExpand; - function GetImageHeight(ARow: TcxCustomRow; AnIndex: Integer): Integer; - function GetImageWidth(ARow: TcxCustomRow; AnIndex: Integer): Integer; - function GetRowParentAtLevel(ARow: TcxCustomRow; ALevel: Integer): TcxCustomRow; - function HasCategoryRowAsParentAtLevel(ARow: TcxCustomRow; ALevel: Integer; ACheckFollow: Boolean): Boolean; - function HasRowImage(ARow: TcxCustomRow; AnIndex: Integer): Boolean; - function IsRowLastChildAtLevel(ARow: TcxCustomRow; ALevel: Integer): Boolean; - function IsRowVisible(ARow: TcxCustomRow): Boolean; - - property Helpers[Row: TcxCustomRow]: TcxVerticalGridCustomRowHelper read GetHelper; - property OptionsView: TcxvgOptionsView read GetOptionsView; - property Styles: TcxVerticalGridStyles read GetStyles; - property VerticalGrid: TcxCustomVerticalGrid read GetVerticalGrid; - public - constructor Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); override; - destructor Destroy; override; - - property DataController: TcxCustomDataController read GetDataController; - property CellAutoHeight: Boolean read GetCellAutoHeight; - property CellEndEllipsis: Boolean read GetCellEndEllipsis; - property CellMultiline: Boolean read GetCellMultiline; - property DefaultRowHeight: Integer read GetDefaultRowHeight; - property FirstRecordIndex: Integer read GetFirstRecordIndex; - property GridLinesColor: TColor read GetGridLinesColor; - property HeaderAvailableWidths[Row: TcxCustomRow]: Integer read GetHeaderAvailableWidth; - property HeaderMinWidth: Integer read GetHeaderMinWidth; - property HeaderWidth: Integer read GetHeaderWidth; - property Images: TCustomImageList read GetImages; - property IndentAreas[Row: TcxCustomRow]: Integer read GetIndentArea; - property IndentCounts[Row: TcxCustomRow]: Integer read GetIndentCount; - property IndentWidth: Integer read GetIndentWidth; - property InterRecordsSpace: Integer read GetInterRecordsSpace; - property LayoutStyle: TcxvgLayoutStyle read GetLayoutStyle; - property MakeSpaceForEmptyImage: Boolean read GetMakeSpaceForEmptyImage; - property PaintStyle: TcxvgPaintStyle read GetPaintStyle; - property RecordCount: Integer read GetRecordCount; - property RecordMinWidths[RecordIndex: Integer]: Integer read GetRecordMinWidth; - property RecordWidth[RecordCount: Integer]: Integer read GetRecordWidth; - property RowCount: Integer read GetRowCount; - property RowHeights[Row: TcxCustomRow]: Integer read GetRowHeight; - property Rows[Index: Integer]: TcxCustomRow read GetRow; - property ShowHeaders: Boolean read GetShowHeaders; - property ShowHorzGridLines: Boolean read GetShowHorzGridLines; - property ShowVertGridLines: Boolean read GetShowVertGridLines; - property ValueMinWidth: Integer read GetValueMinWidth; - end; - - TcxCustomVerticalGridReportLinkFormatter = class(TcxVerticalGridReportLinkBuilderHandler, - IUnknown, IdxPSCellParams, IdxPSCellParams2) - private - FFont: TFont; - FHeaderWidth: Integer; - FInterRecordsSpace: Integer; - FIsPrevGridMode: Boolean; - FLookAndFeelItems: TList; - FRecordWidths: TList; - FRowHeights: TList; - FRowPlaces: TList; - FRows: TList; - FTransparentColor: TColor; - FViewWidths: TList; - FWrappedRecordStartIndexes: TList; - function GetAutoWidth: Boolean; - function GetDataController: TcxCustomDataController; - function GetDC: HDC; - function GetExpandButtonColor(Row: TcxCustomRow): TColor; - function GetExpandButtonSize: Integer; - function GetGridLinesColor: TColor; - function GetHeaderAvailableWidth(Row: TcxCustomRow): Integer; - function GetHeaderMinWidth: Integer; - function GetHeaderWidth: Integer; - function GetIndentArea(Row: TcxCustomRow): Integer; - function GetInternalIndexByRecordIndex(RecordIndex: Integer): Integer; - function GetInternalRecordWidth: Integer; - function GetInterRecordsSpace: Integer; - function GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; - function GetLookAndFeelItemCount: Integer; - function GetOptionsView: TcxVerticalGridReportLinkOptionsView; - function GetRecordCount(Index: Integer): Integer; - function GetRecordMinWidth(RecordIndex: Integer): Integer; - function GetRecordWidth(RecordIndex: Integer): Integer; - function GetRow(Index: Integer): TcxCustomRow; - function GetRowCount: Integer; - function GetRowHeight(Row: TcxCustomRow): Integer; - function GetRowHelper(Row: TcxCustomRow): TcxVerticalGridCustomRowHelper; - function GetRowPlace(WrapIndex, Index: Integer): TcxVerticalGridCustomRowPlace; - function GetRowPlaceByRow(Row: TcxCustomRow; WrapIndex: Integer): TcxVerticalGridCustomRowPlace; - function GetRowPlaceFlatIndex(WrapIndex, Index: Integer): Integer; - function GetRowPlaceCount: Integer; - function GetRenderer: TdxPSReportRenderer; - function GetShowBorders: Boolean; - function GetShowHeaders: Boolean; - function GetShowHorzGridLines: Boolean; - function GetShowVertGridLines: Boolean; - function GetViewMaxWidth: Integer; - function GetViewWidth(WrapIndex: Integer): Integer; - function GetWrapCount: Integer; - function GetWrappedRecordStartIndex(Index: Integer): Integer; - function GetWrappedRecordStopIndex(Index: Integer): Integer; - function GetWrapSeparatorHeight: Integer; - procedure SetInterRecordsSpace(Value: Integer); - procedure SetRecordWidth(RecordIndex: Integer; Value: Integer); - procedure SetRowHeight(Row: TcxCustomRow; Value: Integer); - procedure SetViewWidth(WrapIndex: Integer; Value: Integer); - - procedure FormatLookAndFeelItems; - protected - { IUnknown } - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - { IdxPSCellParams } - function IdxPSCellParams.GetAutoHeight = IdxPSCellParams_GetAutoHeight; - function IdxPSCellParams.GetDC = IdxPSCellParams_GetDC; - function IdxPSCellParams.GetDisplayGraphicsAsText = IdxPSCellParams_GetDisplayGraphicsAsText; - function IdxPSCellParams.GetEndEllipsis = IdxPSCellParams_GetEndEllipsis; - function IdxPSCellParams.GetFlatCheckMarks = IdxPSCellParams_GetFlatCheckMarks; - function IdxPSCellParams.GetGraphicsText = IdxPSCellParams_GetGraphicsText; - function IdxPSCellParams.GetMultiline = IdxPSCellParams_GetMultiline; - function IdxPSCellParams.GetTransparentGraphics = IdxPSCellParams_GetTransparentGraphics; - function IdxPSCellParams_GetAutoHeight: Boolean; virtual; - function IdxPSCellParams_GetDC: HDC; virtual; - function IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; virtual; - function IdxPSCellParams_GetEndEllipsis: Boolean; virtual; - function IdxPSCellParams_GetFlatCheckMarks: Boolean; virtual; - function IdxPSCellParams_GetGraphicsText: string; virtual; - function IdxPSCellParams_GetMultiline: Boolean; virtual; - function IdxPSCellParams_GetTransparentGraphics: Boolean; virtual; - { IdxPSCellParams2 } - function IdxPSCellParams2.GetPreviewMarginLeft = IdxPSCellParams2_GetPreviewMarginLeft; - function IdxPSCellParams2.GetPreviewMarginRight = IdxPSCellParams2_GetPreviewMarginRight; - function IdxPSCellParams2.GetPreviewMaxHeight = IdxPSCellParams2_GetPreviewMaxHeight; - function IdxPSCellParams2.GetPreviewMaxLineCount = IdxPSCellParams2_GetPreviewMaxLineCount; - function IdxPSCellParams2.GetRichEditGraphicClass = IdxPSCellParams2_GetRichEditGraphicClass; - function IdxPSCellParams2.GetRichEditTransparent = IdxPSCellParams2_GetRichEditTransparent; - function IdxPSCellParams2_GetPreviewMarginLeft: Integer; virtual; - function IdxPSCellParams2_GetPreviewMarginRight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxHeight: Integer; virtual; - function IdxPSCellParams2_GetPreviewMaxLineCount: Integer; virtual; - function IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; virtual; - function IdxPSCellParams2_GetRichEditTransparent: Boolean; virtual; - - procedure AddDelimiters; virtual; - procedure AddHorizontalDelimiters; virtual; - procedure AddVerticalDelimiters; virtual; - procedure AfterBuilding; virtual; - procedure BeforeBuilding; virtual; - - function GetAreRecordsNeededLoading: Boolean; virtual; - function GetAreRecordsNeededUnloading: Boolean; virtual; - function GetFirstInternalRecordIndex: Integer; virtual; - function GetInternalRecordCount: Integer; virtual; - procedure LoadRecords; virtual; - procedure UnloadRecords; virtual; - - procedure AddWrappedRecordStartIndex(Value: Integer); - procedure Calculate; virtual; - procedure CalculateBestFit; virtual; - procedure CalculateHeight(const AParams: TdxReportItemViewParams; var AHeight: Integer); - function CalculatedMinWidth: Integer; virtual; - procedure CalculateRecordAutoWidths; - procedure CalculateRecordCounts; - procedure CalculateRowHeights; - procedure CalculateRowPlaces; - procedure CalculateViewWidths; - procedure CreateRowList; virtual; - procedure CreateRowPlaces; - function CreateRowPlace(ARow: TcxCustomRow; AWrapIndex: Integer): TcxVerticalGridCustomRowPlace; virtual; - procedure InitializeRecordWidths; virtual; - procedure InitializeRowHeights; virtual; - procedure InitializeWrappedRecordIndexes; virtual; - - function GetBackgroundBitmap(Index: Integer): TBitmap; - function GetBackgroundBitmapIndex(Index: Integer): Integer; - function HasBackgroundBitmap(Index: Integer): Boolean; - function MapStyleBackgroundBitmapIndex(AVerticalGridBackgroundBitmapIndex: Integer): Integer; - - function GetCategoryRowFont(ARow: TcxCustomRow): TFont; - function GetRowHeaderFont(ARow: TcxCustomRow; AnIndex: Integer): TFont; - function GetRowHeaderSeparatorsFont(ARow: TcxCustomRow; AnIndex: Integer): TFont; - function GetRowValueFont(ARow: TcxCustomRow; AnIndex, ARecordIndex: Integer): TFont; - function GetRowValueSeparatorsFont(ARow: TcxCustomRow; AnIndex, ARecordIndex: Integer): TFont; - - procedure ClearRowPlaces; - function FixupHorzCellSides(ARow: TcxCustomRow; ACellSides: TdxCellSides): TdxCellSides; - procedure FreeAndNilRowPlaces; - function GetImageHeight(ARow: TcxCustomRow; ACellIndex: Integer): Integer; - function GetImageWidth(ARow: TcxCustomRow; ACellIndex: Integer): Integer; - function GetNextRow(ARow: TcxCustomRow): TcxCustomRow; - function GetPrevRow(ARow: TcxCustomRow): TcxCustomRow; - function GetRowByReportRow(ARow: TdxReportCell): TcxCustomRow; - function GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; - function IndexOfRow(ARow: TcxCustomRow): Integer; - function IsColorTransparent(AColor: TColor): Boolean; - function IsFirstRow(ARow: TcxCustomRow): Boolean; - function IsLastRow(ARow: TcxCustomRow): Boolean; - function MakeCustomDrawCodeData(AnAttribute: TcxVerticalGridAttributeID; ACellIndex, ARecordIndex: Integer): Integer; - procedure RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; AEdgeStyle: TdxCellEdgeStyle); - procedure SetViewParams(AnItem: TdxReportVisualItem; const AParams: TdxReportItemViewParams); - - property AreRecordsNeededLoading: Boolean read GetAreRecordsNeededLoading; - property AreRecordsNeededUnloading: Boolean read GetAreRecordsNeededUnloading; - property DataController: TcxCustomDataController read GetDataController; - property DC: HDC read GetDC; - property FirstInternalRecordIndex: Integer read GetFirstInternalRecordIndex; - property HeaderAvailableWidths[Row: TcxCustomRow]: Integer read GetHeaderAvailableWidth; - property IndentAreas[Row: TcxCustomRow]: Integer read GetIndentArea; - property InternalIndexesByRecordIndex[RecordIndex: Integer]: Integer read GetInternalIndexByRecordIndex; - property InternalRecordCount: Integer read GetInternalRecordCount; - property InternalRecordWidth: Integer read GetInternalRecordWidth; - property IsPrevGridMode: Boolean read FIsPrevGridMode; - property LookAndFeelItemCount: Integer read GetLookAndFeelItemCount; - property LookAndFeelItems[Index: Integer]: TdxReportVisualItem read GetLookAndFeelItem; - property Renderer: TdxPSReportRenderer read GetRenderer; - property RowHelpers[Row: TcxCustomRow]: TcxVerticalGridCustomRowHelper read GetRowHelper; - property RowPlaceCount: Integer read GetRowPlaceCount; - property RowPlaceFlatIndexes[WrapIndex, Index: Integer]: Integer read GetRowPlaceFlatIndex; - property RowPlaces[WrapIndex, Index: Integer]: TcxVerticalGridCustomRowPlace read GetRowPlace; - property RowPlacesByRow[Row: TcxCustomRow; WrapIndex: Integer]: TcxVerticalGridCustomRowPlace read GetRowPlaceByRow; - property ViewWidths[WrapIndex: Integer]: Integer read GetViewWidth write SetViewWidth; - property WrappedRecordStartIndexes[Index: Integer]: Integer read GetWrappedRecordStartIndex; - property WrappedRecordStopIndexes[Index: Integer]: Integer read GetWrappedRecordStopIndex; - public - constructor Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); override; - destructor Destroy; override; - - function Adapter: TcxCustomVerticalGridAdapter; overload; virtual; - - procedure DoInitializeHost(AHost: TdxReportCell); virtual; - { Images } - procedure DoInitializeRowImage(ARow: TcxCustomRow; AnItem: TdxReportCellGraphic; AnIndex: Integer); virtual; - function GetRowImageCellSides(ARow: TcxCustomRow): TdxCellSides; virtual; - function GetRowImageClass: TdxReportCellGraphicClass; virtual; - function GetRowImageViewParams(ARow: TcxCustomRow; AnIndex: Integer): TdxReportItemViewParams; virtual; - { Indents and Expand Buttons } - procedure DoInitializeRowIndent(ARow: TcxCustomRow; AnItem: TdxReportCellExpandButton; AnIndex, AnIndentCount: Integer); virtual; - procedure DoInitializeExpandButton(ARow: TcxCustomRow; AnItem: TdxReportCellExpandButton; AnIndex, AnIndentCount: Integer); virtual; - procedure DoReportLinkInitializeRowIndent(ARow: TcxCustomRow; AnItem: TdxReportCellExpandButton; AnIndex: Integer); virtual; - function GetRowIndentCellSides(ARow: TcxCustomRow; AnIndex, AnIndentCount: Integer): TdxCellSides; virtual; - function GetRowIndentClass: TdxReportCellExpandButtonClass; virtual; - function GetRowIndentViewParams(ARow: TcxCustomRow; AnIndex, AnIndentCount: Integer): TdxReportItemViewParams; virtual; - { Rows } - procedure DoInitializeCategoryRow(ARow: TcxCategoryRow; AnItem: TdxReportCellImage); virtual; - procedure DoInitializeRowReportRow(ARow: TcxCustomRow; AReportRow: TdxReportCell); virtual; - procedure DoInitializeRowHeader(ARow: TcxCustomRow; AnItem: TdxReportCellImage; AnIndex: Integer); virtual; - procedure DoInitializeRowValue(ARow: TcxCustomRow; AnItem: TAbstractdxReportCellData; AnIndex, ARecordIndex: Integer); virtual; - procedure DoReportLinkInitializeRowHeader(ARow: TcxCustomRow; AnItem: TdxReportCellImage; AnIndex: Integer); virtual; - procedure DoReportLinkInitializeRowValue(ARow: TcxCustomRow; AnItem: TAbstractdxReportCellData; AnIndex, ARecordIndex: Integer); virtual; - function GetCategoryRowCellSides(ARow: TcxCustomRow): TdxCellSides; virtual; - function GetCategoryRowClass(ARow: TcxCustomRow): TdxReportCellImageClass; virtual; - function GetCategoryRowViewParams(ARow: TcxCustomRow): TdxReportItemViewParams; virtual; - function GetCellValue(ARow: TcxCustomRow; AProperties: TcxCustomEditProperties; AnIndex, ARecordIndex: Integer): TcxEditValue; virtual; - function GetRowHeaderCellSides(ARow: TcxCustomRow; AnIndex: Integer): TdxCellSides; virtual; - function GetRowHeaderClass(ARow: TcxCustomRow): TdxReportCellImageClass; virtual; - function GetRowHeaderViewParams(ARow: TcxCustomRow; AnIndex: Integer): TdxReportItemViewParams; virtual; - function GetRowValueCellSides(ARow: TcxCustomRow; AnIndex, ARecordIndex: Integer): TdxCellSides; virtual; - function GetRowValueClass(ARow: TcxCustomRow; AnIndex, ARecordIndex: Integer): TdxReportCellDataClass; virtual; - function GetRowValueViewParams(ARow: TcxCustomRow; AnIndex, ARecordIndex: Integer): TdxReportItemViewParams; virtual; - { Value and Header Separators } - procedure DoInitializeRowHeaderSeparator(ARow: TcxCustomMultiEditorRow; AnItem: TdxReportCellString; AnIndex: Integer); virtual; - procedure DoInitializeRowValueSeparator(ARow: TcxCustomMultiEditorRow; AnItem: TdxReportCellString; AnIndex, ARecordIndex: Integer); virtual; - procedure DoReportLinkInitializeRowHeaderSeparator(ARow: TcxCustomMultiEditorRow; AnItem: TdxReportCellString; AnIndex: Integer); virtual; - procedure DoReportLinkInitializeRowValueSeparator(ARow: TcxCustomMultiEditorRow; AnItem: TdxReportCellString; AnIndex, ARecordIndex: Integer); virtual; - function GetRowHeaderSeparatorCellSides(ARow: TcxCustomMultiEditorRow): TdxCellSides; - function GetRowHeaderSeparatorClass(ARow: TcxCustomMultiEditorRow): TdxReportCellStringClass; virtual; - function GetRowHeaderSeparatorViewParams(ARow: TcxCustomMultiEditorRow; AnIndex: Integer): TdxReportItemViewParams; virtual; - function GetRowValueSeparatorCellSides(ARow: TcxCustomMultiEditorRow): TdxCellSides; - function GetRowValueSeparatorClass(ARow: TcxCustomMultiEditorRow): TdxReportCellStringClass; virtual; - function GetRowValueSeparatorViewParams(ARow: TcxCustomMultiEditorRow; AnIndex, ARecordIndex: Integer): TdxReportItemViewParams; virtual; - { Wrap Separators} - procedure DoInitializeWrapSeparatorItem(AnItem: TdxReportCellString; AWrapIndex: Integer); virtual; - procedure DoInitializeWrapSeparatorRow(ARow: TdxReportCell); virtual; - function GetWrapSeparatorClass: TdxReportCellStringClass; virtual; - - property AutoWidth: Boolean read GetAutoWidth; - property ExpandButtonColors[Row: TcxCustomRow]: TColor read GetExpandButtonColor; - property ExpandButtonSize: Integer read GetExpandButtonSize; - property GridLinesColor: TColor read GetGridLinesColor; - property HeaderMinWidth: Integer read GetHeaderMinWidth; - property HeaderWidth: Integer read GetHeaderWidth write FHeaderWidth; - property InterRecordsSpace: Integer read GetInterRecordsSpace write SetInterRecordsSpace; - property OptionsView: TcxVerticalGridReportLinkOptionsView read GetOptionsView; - property RecordCounts[Index: Integer]: Integer read GetRecordCount; - property RecordMinWidths[RecordIndex: Integer]: Integer read GetRecordMinWidth; - property RecordWidths[RecordIndex: Integer]: Integer read GetRecordWidth write SetRecordWidth; - property RowCount: Integer read GetRowCount; - property RowHeights[Row: TcxCustomRow]: Integer read GetRowHeight write SetRowHeight; - property Rows[Index: Integer]: TcxCustomRow read GetRow; - property ShowBorders: Boolean read GetShowBorders; - property ShowHeaders: Boolean read GetShowHeaders; - property ShowHorzGridLines: Boolean read GetShowHorzGridLines; - property ShowVertGridLines: Boolean read GetShowVertGridLines; - property TransparentColor: TColor read FTransparentColor write FTransparentColor default clWindow; - property ViewMaxWidth: Integer read GetViewMaxWidth; - property WrapCount: Integer read GetWrapCount; - property WrapSeparatorHeight: Integer read GetWrapSeparatorHeight; - end; - - { Options } - - TcxVerticalGridReportLinkOptionsExpanding = class(TdxCustomReportLinkOptionsExpanding) - private - FAutoExpandRows: Boolean; - function GetReportLink: TcxCustomVerticalGridReportLink; - procedure SetAutoExpandRows(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TcxCustomVerticalGridReportLink read GetReportLink; - published - property AutoExpandRows: Boolean read FAutoExpandRows write SetAutoExpandRows default False; - end; - - TcxVerticalGridReportLinkOptionsFormatting = class(TdxCustomReportLinkOptionsFormatting) - private - function GetReportLink: TcxCustomVerticalGridReportLink; - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxCustomVerticalGridReportLink read GetReportLink; - end; - - TcxVerticalGridReportLinkOptionsPagination = class(TdxCustomReportLinkOptionsPagination) - private - FByRows: Boolean; - FByWrapping: Boolean; - FOneWrappingPerPage: Boolean; - function GetReportLink: TcxCustomVerticalGridReportLink; - procedure SetByRows(Value: Boolean); - procedure SetByWrapping(Value: Boolean); - procedure SetOneWrappingPerPage(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TcxCustomVerticalGridReportLink read GetReportLink; - published - property ByRows: Boolean read FByRows write SetByRows default True; - property ByWrapping: Boolean read FByWrapping write SetByWrapping default True; - property OneWrappingPerPage: Boolean read FOneWrappingPerPage write SetOneWrappingPerPage default False; - end; - - TcxVerticalGridReportLinkOptionsRefinements = class(TdxCustomReportLinkOptionsRefinements) - private - function GetReportLink: TcxCustomVerticalGridReportLink; - function GetSuppressBackgroundBitmaps: Boolean; - procedure SetSuppressBackgroundBitmaps(Value: Boolean); - protected - function DesignerTabIndex: Integer; override; - public - property ReportLink: TcxCustomVerticalGridReportLink read GetReportLink; - published - // for backward compatibility only -> now is moved to OptionsFormatting - property SuppressBackgroundBitmaps: Boolean read GetSuppressBackgroundBitmaps write SetSuppressBackgroundBitmaps stored False; - end; - - TcxVerticalGridReportLinkOptionsSize = class(TdxCustomReportLinkOptionsSize) - private - FBestFit: Boolean; - FKeepSameRecordWidths: Boolean; - FWrapRecords: Boolean; - FWrapSeparatorHeight: Integer; - function GetReportLink: TcxCustomVerticalGridReportLink; - procedure SetBestFit(Value: Boolean); - procedure SetKeepSameRecordWidths(Value: Boolean); - procedure SetWrapRecords(Value: Boolean); - procedure SetWrapSeparatorHeight(Value: Integer); - protected - function DesignerTabIndex: Integer; override; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ReportLink: TcxCustomVerticalGridReportLink read GetReportLink; - published - property AutoWidth; - property BestFit: Boolean read FBestFit write SetBestFit default False; - property KeepSameRecordWidths: Boolean read FKeepSameRecordWidths write SetKeepSameRecordWidths default True; - property WrapRecords: Boolean read FWrapRecords write SetWrapRecords default True; - property WrapSeparatorHeight: Integer read FWrapSeparatorHeight write SetWrapSeparatorHeight default 20; - end; - - TcxVerticalGridReportLinkPrintMode = (vpmLoadedRecords, vpmAllRecords); - - TcxVerticalGridReportLinkOptionsView = class(TdxCustomReportLinkOptionsView) - private - FBorders: Boolean; - FExpandButtons: Boolean; - FHeaders: Boolean; - FMode: TcxVerticalGridReportLinkPrintMode; - function GetReportLink: TcxCustomVerticalGridReportLink; - procedure SetBorders(Value: Boolean); - procedure SetExpandButtons(Value: Boolean); - procedure SetHeaders(Value: Boolean); - procedure SetMode(Value: TcxVerticalGridReportLinkPrintMode); - protected - function DesignerTabIndex: Integer; override; - function GetActualMode: TcxVerticalGridReportLinkPrintMode; virtual; - property Mode: TcxVerticalGridReportLinkPrintMode read FMode write SetMode default vpmLoadedRecords; - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - property ActualMode: TcxVerticalGridReportLinkPrintMode read GetActualMode; - property ReportLink: TcxCustomVerticalGridReportLink read GetReportLink; - published - property Borders: Boolean read FBorders write SetBorders default True; - property ExpandButtons: Boolean read FExpandButtons write SetExpandButtons default True; - property Headers: Boolean read FHeaders write SetHeaders default True; - end; - - { Styles } - - TcxVerticalGridReportLinkStylesClass = class of TcxVerticalGridReportLinkStyles; - - TcxVerticalGridReportLinkStyles = class(TdxCustomReportLinkStyles) - private - function GetReportLink: TcxCustomVerticalGridReportLink; - protected - function DesignerTabIndex: Integer; override; - - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - class function GetStyleCaption(AnIndex: Integer): string; override; - function GetStyleIndexByCaption(const Caption: string): Integer; override; - public - procedure Assign(Source: TPersistent); override; - - procedure GetCategoryParams(ARow: TcxCustomRow; out AParams: TcxViewParams); virtual; - procedure GetContentParams(ARow: TcxCustomRow; AnIndex, ARecordIndex: Integer; out AParams: TcxViewParams); virtual; - procedure GetHeaderParams(ARow: TcxCustomRow; out AParams: TcxViewParams); virtual; - procedure GetIndentParams(ARow: TcxCustomRow; out AParams: TcxViewParams); virtual; - - property ReportLink: TcxCustomVerticalGridReportLink read GetReportLink; - published - property Category: TcxStyle Index vspsVGridCategory read GetValue write SetValue; - property Content: TcxStyle Index vspsVGridContent read GetValue write SetValue; - property Header: TcxStyle Index vspsVGridHeader read GetValue write SetValue; - property StyleSheet; - end; - - TcxVerticalGridReportLinkStyleSheet = class(TdxCustomReportLinkStyleSheet) - private - function GetStylesValue: TcxVerticalGridReportLinkStyles; - procedure SetStylesValue(Value: TcxVerticalGridReportLinkStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TcxVerticalGridReportLinkStyles read GetStylesValue write SetStylesValue; - end; - - { HostInfo } - - TcxVerticalGridHostInfo = class - private - FParent: TdxReportCell; - public - Origin: TPoint; - procedure Initialize(AParent: TdxReportCell); - property Parent: TdxReportCell read FParent; - end; - - { TcxCustomVerticalGridReportLink } - - { CustomDraw Events } - - TcxVerticalGridReportLinkCustomDrawRowHeaderCellEvent = procedure(Sender: TcxCustomVerticalGridReportLink; - ACanvas: TCanvas; ARow: TcxCustomRow; ACellIndex: Integer; - AnItem: TdxReportCellImage; var ADone: Boolean) of object; - - TcxVerticalGridReportLinkCustomDrawRowHeaderSeparatorCellEvent = procedure(Sender: TcxCustomVerticalGridReportLink; - ACanvas: TCanvas; ARow: TcxCustomRow; AnIndex: Integer; - AnItem: TdxReportCellString; var ADone: Boolean) of object; - - TcxVerticalGridReportLinkCustomDrawRowIndentCellEvent = procedure(Sender: TcxCustomVerticalGridReportLink; - ACanvas: TCanvas; ARow: TcxCustomRow; AnIndex: Integer; - AnItem: TdxReportCellExpandButton; var ADone: Boolean) of object; - - TcxVerticalGridReportLinkCustomDrawRowValueCellEvent = procedure(Sender: TcxCustomVerticalGridReportLink; - ACanvas: TCanvas; ARow: TcxCustomRow; ACellIndex, ARecordIndex: Integer; - AnItem: TAbstractdxReportCellData; var ADone: Boolean) of object; - - TcxVerticalGridReportLinkCustomDrawRowValueSeparatorCellEvent = procedure(Sender: TcxCustomVerticalGridReportLink; - ACanvas: TCanvas; ARow: TcxCustomRow; ACellIndex, ARecordIndex: Integer; - AnItem: TdxReportCellString; var ADone: Boolean) of object; - - { Initialiazation Events } - - TcxVerticalGridReportLinkInitializeRowHeaderCellEvent = procedure(Sender: TcxCustomVerticalGridReportLink; - ARow: TcxCustomRow; ACellIndex: Integer; AnItem: TdxReportCellImage) of object; - - TcxVerticalGridReportLinkInitializeRowHeaderSeparatorCellEvent = procedure(Sender: TcxCustomVerticalGridReportLink; - ARow: TcxCustomRow; AnIndex: Integer; AnItem: TdxReportCellString) of object; - - TcxVerticalGridReportLinkInitializeRowIndentCellEvent = procedure(Sender: TcxCustomVerticalGridReportLink; - ARow: TcxCustomRow; AnIndex: Integer; AnItem: TdxReportCellExpandButton) of object; - - TcxVerticalGridReportLinkInitializeRowValueCellEvent = procedure(Sender: TcxCustomVerticalGridReportLink; - ARow: TcxCustomRow; ACellIndex, ARecordIndex: Integer; - AnItem: TAbstractdxReportCellData) of object; - - TcxVerticalGridReportLinkInitializeRowValueSeparatorCellEvent = procedure(Sender: TcxCustomVerticalGridReportLink; - ARow: TcxCustomRow; ACellIndex, ARecordIndex: Integer; - AnItem: TdxReportCellString) of object; - - TcxCustomVerticalGridReportLink = class(TdxCustomcxControlReportLink) - private - FBuilder: TcxCustomVerticalGridReportLinkBuilder; - FCategoryFont: TFont; - FDelimitersHardVert: TList; - FHostInfo: TcxVerticalGridHostInfo; - FOnCustomDrawRowHeaderCell: TcxVerticalGridReportLinkCustomDrawRowHeaderCellEvent; - FOnCustomDrawRowHeaderSeparatorCell: TcxVerticalGridReportLinkCustomDrawRowHeaderSeparatorCellEvent; - FOnCustomDrawRowIndentCell: TcxVerticalGridReportLinkCustomDrawRowIndentCellEvent; - FOnCustomDrawRowValueCell: TcxVerticalGridReportLinkCustomDrawRowValueCellEvent; - FOnCustomDrawRowValueSeparatorCell: TcxVerticalGridReportLinkCustomDrawRowValueSeparatorCellEvent; - FOnInitializeRowHeaderCell: TcxVerticalGridReportLinkInitializeRowHeaderCellEvent; - FOnInitializeRowHeaderSeparatorCell: TcxVerticalGridReportLinkInitializeRowHeaderSeparatorCellEvent; - FOnInitializeRowIndentCell: TcxVerticalGridReportLinkInitializeRowIndentCellEvent; - FOnInitializeRowValueCell: TcxVerticalGridReportLinkInitializeRowValueCellEvent; - FOnInitializeRowValueSeparatorCell: TcxVerticalGridReportLinkInitializeRowValueSeparatorCellEvent; - function GetActiveStyles: TcxVerticalGridReportLinkStyles; - function GetDesignWindow: TcxfmVerticalGridReportLinkDesignWindow; - function GetOptionsExpanding: TcxVerticalGridReportLinkOptionsExpanding; - function GetOptionsFormatting: TcxVerticalGridReportLinkOptionsFormatting; - function GetOptionsPagination: TcxVerticalGridReportLinkOptionsPagination; - function GetOptionsRefinements: TcxVerticalGridReportLinkOptionsRefinements; - function GetOptionsSize: TcxVerticalGridReportLinkOptionsSize; - function GetOptionsView: TcxVerticalGridReportLinkOptionsView; - function GetStyles: TcxVerticalGridReportLinkStyles; - function GetVerticalGrid: TcxCustomVerticalGrid; - procedure SetCategoryFont(Value: TFont); - procedure SetOnCustomDrawRowHeaderCell(Value: TcxVerticalGridReportLinkCustomDrawRowHeaderCellEvent); - procedure SetOnCustomDrawRowHeaderSeparatorCell(Value: TcxVerticalGridReportLinkCustomDrawRowHeaderSeparatorCellEvent); - procedure SetOnCustomDrawRowIndentCell(Value: TcxVerticalGridReportLinkCustomDrawRowIndentCellEvent); - procedure SetOnCustomDrawRowValueCell(Value: TcxVerticalGridReportLinkCustomDrawRowValueCellEvent); - procedure SetOnCustomDrawRowValueSeparatorCell(Value: TcxVerticalGridReportLinkCustomDrawRowValueSeparatorCellEvent); - procedure SetOptionsExpanding(Value: TcxVerticalGridReportLinkOptionsExpanding); - procedure SetOptionsFormatting(Value: TcxVerticalGridReportLinkOptionsFormatting); - procedure SetOptionsPagination(Value: TcxVerticalGridReportLinkOptionsPagination); - procedure SetOptionsRefinements(Value: TcxVerticalGridReportLinkOptionsRefinements); - procedure SetOptionsSize(Value: TcxVerticalGridReportLinkOptionsSize); - procedure SetOptionsView(Value: TcxVerticalGridReportLinkOptionsView); - procedure SetStyles(Value: TcxVerticalGridReportLinkStyles); - protected - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure ConvertCoords; override; - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - procedure FontChanged(Sender: TObject); override; - function GetBreakPagesByHardDelimiters: Boolean; override; - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - function GetUseHardVertDelimiters: Boolean; override; - procedure InternalRestoreFromOriginal; override; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - procedure MakeHardDelimiters(AReportCells: TdxReportCells; AVertDelimiters: TList); override; - - procedure DoCustomDrawRowHeaderCell(ACanvas: TCanvas; ARow: TcxCustomRow; - AnIndex: Integer; AnItem: TdxReportCellImage; var ADone: Boolean); dynamic; - procedure DoCustomDrawRowHeaderSeparatorCell(ACanvas: TCanvas; ARow: TcxCustomRow; - AnIndex: Integer; AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoCustomDrawRowIndentCell(ACanvas: TCanvas; ARow: TcxCustomRow; - AnIndex: Integer; AnItem: TdxReportCellExpandButton; var ADone: Boolean); dynamic; - procedure DoCustomDrawRowValueCell(ACanvas: TCanvas; ARow: TcxCustomRow; - ACellIndex, ARecordIndex: Integer; AnItem: TAbstractdxReportCellData; var ADone: Boolean); dynamic; - procedure DoCustomDrawRowValueSeparatorCell(ACanvas: TCanvas; ARow: TcxCustomRow; - ACellIndex, ARecordIndex: Integer; AnItem: TdxReportCellString; var ADone: Boolean); dynamic; - procedure DoInitializeRowHeaderCell(ARow: TcxCustomRow; ACellIndex: Integer; - AnItem: TdxReportCellImage); dynamic; - procedure DoInitializeRowHeaderSeparatorCell(ARow: TcxCustomRow; AnIndex: Integer; - AnItem: TdxReportCellString); dynamic; - procedure DoInitializeRowIndentCell(ARow: TcxCustomRow; AnIndex: Integer; - AnItem: TdxReportCellExpandButton); dynamic; - procedure DoInitializeRowValueCell(ARow: TcxCustomRow; ACellIndex, ARecordIndex: Integer; - AnItem: TAbstractdxReportCellData); dynamic; - procedure DoInitializeRowValueSeparatorCell(ARow: TcxCustomRow; - ACellIndex, ARecordIndex: Integer; AnItem: TdxReportCellString); dynamic; - - function GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; override; - function GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; override; - function GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; override; - function GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; override; - function GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; override; - function GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; override; - - function GetAreNativeStylesAvailable: Boolean; override; - function GetStylesClass: TdxCustomReportLinkStylesClass; override; - function GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; override; - function GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; override; - procedure PrepareConstruct; override; - procedure UnprepareConstruct; override; - - procedure AddVerticalHardDelimiter(ADelimiter: TdxReportCell); overload; - procedure AddVerticalHardDelimiter(ADelimiter: Integer); overload; - - // Builder - function CreateBuilder: TcxCustomVerticalGridReportLinkBuilder; virtual; - class function GetBuilderClass: TcxCustomVerticalGridReportLinkBuilderClass; virtual; - - // CustomDraw - procedure ExtractCustomDrawCodeDataValues(ACode: Integer; - var AnAttribute: TcxVerticalGridAttributeID; var ACellIndex, ARecordIndex: Integer); - function GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; - out ADrawInfo: TcxVerticalGridCellCustomDrawInfo): TcxVerticalGridAttributeID; virtual; - function IsCustomDrawn(AnAttributeID: TcxVerticalGridAttributeID): Boolean; virtual; - function MakeCustomDrawCodeData(AnAttribute: TcxVerticalGridAttributeID; - ACellIndex, ARecordIndex: Integer): Integer; - - // DesignWindow - procedure InitializePrintModeControl(AControl: TComboBox); virtual; - procedure UpdateStatePrintModeControl(AControl: TComboBox); virtual; - - property ActiveStyles: TcxVerticalGridReportLinkStyles read GetActiveStyles; - property Builder: TcxCustomVerticalGridReportLinkBuilder read FBuilder; - property CategoryFont: TFont read FCategoryFont write SetCategoryFont; - property DelimitersHardVert: TList read FDelimitersHardVert; - property HostInfo: TcxVerticalGridHostInfo read FHostInfo; - property VerticalGrid: TcxCustomVerticalGrid read GetVerticalGrid; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property DesignWindow: TcxfmVerticalGridReportLinkDesignWindow read GetDesignWindow; - published - property Color; - property Font; - property OptionsExpanding: TcxVerticalGridReportLinkOptionsExpanding read GetOptionsExpanding write SetOptionsExpanding; - property OptionsFormatting: TcxVerticalGridReportLinkOptionsFormatting read GetOptionsFormatting write SetOptionsFormatting; - property OptionsPagination: TcxVerticalGridReportLinkOptionsPagination read GetOptionsPagination write SetOptionsPagination; - property OptionsRefinements: TcxVerticalGridReportLinkOptionsRefinements read GetOptionsRefinements write SetOptionsRefinements; - property OptionsSize: TcxVerticalGridReportLinkOptionsSize read GetOptionsSize write SetOptionsSize; - property OptionsView: TcxVerticalGridReportLinkOptionsView read GetOptionsView write SetOptionsView; - property ScaleFonts; - property StyleRepository; - property Styles: TcxVerticalGridReportLinkStyles read GetStyles write SetStyles; - property SupportedCustomDraw; - - property OnCustomDrawRowHeaderCell: TcxVerticalGridReportLinkCustomDrawRowHeaderCellEvent - read FOnCustomDrawRowHeaderCell write SetOnCustomDrawRowHeaderCell; - property OnCustomDrawRowHeaderSeparatorCell: TcxVerticalGridReportLinkCustomDrawRowHeaderSeparatorCellEvent - read FOnCustomDrawRowHeaderSeparatorCell write SetOnCustomDrawRowHeaderSeparatorCell; - property OnCustomDrawRowIndentCell: TcxVerticalGridReportLinkCustomDrawRowIndentCellEvent - read FOnCustomDrawRowIndentCell write SetOnCustomDrawRowIndentCell; - property OnCustomDrawRowValueCell: TcxVerticalGridReportLinkCustomDrawRowValueCellEvent - read FOnCustomDrawRowValueCell write SetOnCustomDrawRowValueCell; - property OnCustomDrawRowValueSeparatorCell: TcxVerticalGridReportLinkCustomDrawRowValueSeparatorCellEvent - read FOnCustomDrawRowValueSeparatorCell write SetOnCustomDrawRowValueSeparatorCell; - property OnInitializeRowHeaderCell: TcxVerticalGridReportLinkInitializeRowHeaderCellEvent - read FOnInitializeRowHeaderCell write FOnInitializeRowHeaderCell; - property OnInitializeRowHeaderSeparatorCell: TcxVerticalGridReportLinkInitializeRowHeaderSeparatorCellEvent - read FOnInitializeRowHeaderSeparatorCell write FOnInitializeRowHeaderSeparatorCell; - property OnInitializeRowIndentCell: TcxVerticalGridReportLinkInitializeRowIndentCellEvent - read FOnInitializeRowIndentCell write FOnInitializeRowIndentCell; - property OnInitializeRowValueCell: TcxVerticalGridReportLinkInitializeRowValueCellEvent - read FOnInitializeRowValueCell write FOnInitializeRowValueCell; - property OnInitializeRowValueSeparatorCell: TcxVerticalGridReportLinkInitializeRowValueSeparatorCellEvent - read FOnInitializeRowValueSeparatorCell write FOnInitializeRowValueSeparatorCell; - end; - - TcxUnboundVerticalGridReportLinkBuilder = class(TcxCustomVerticalGridReportLinkBuilder) - public - class function AdapterClass: TcxCustomVerticalGridAdapterClass; override; - end; - - TcxUnboundVerticalGridAdapter = class(TcxCustomVerticalGridAdapter) - private - function GetVerticalGrid: TcxUnboundVerticalGrid; - protected - function GetLayoutStyle: TcxvgLayoutStyle; override; - property VerticalGrid: TcxUnboundVerticalGrid read GetVerticalGrid; - end; - - TcxUnboundVerticalGridReportLink = class(TcxCustomVerticalGridReportLink) - protected - class function GetBuilderClass: TcxCustomVerticalGridReportLinkBuilderClass; override; - end; - - TcxVerticalGridReportLink = class(TcxUnboundVerticalGridReportLink) - private - function GetVerticalGrid: TcxVerticalGrid; - public - property VerticalGrid: TcxVerticalGrid read GetVerticalGrid; - end; - - { RTTI Inspector } - - TcxRTTIInspectorReportLink = class(TcxUnboundVerticalGridReportLink) - private - function GetRTTIInspector: TcxRTTIInspector; - public - property RTTIInspector: TcxRTTIInspector read GetRTTIInspector; - end; - - { VirtualVerticalGrid } - - TcxVirtualVerticalGridReportLinkBuilder = class(TcxCustomVerticalGridReportLinkBuilder) - public - class function AdapterClass: TcxCustomVerticalGridAdapterClass; override; - class function FormatterClass: TcxCustomVerticalGridReportLinkFormatterClass; override; - end; - - TcxVirtualVerticalGridAdapter = class(TcxCustomVerticalGridAdapter) - private - function GetOptionsView: TcxvgMultiRecordsOptionsView; - function GetVerticalGrid: TcxVirtualVerticalGrid; - protected - function GetInterRecordsSpace: Integer; override; - function GetLayoutStyle: TcxvgLayoutStyle; override; - public - property OptionsView: TcxvgMultiRecordsOptionsView read GetOptionsView; - property VerticalGrid: TcxVirtualVerticalGrid read GetVerticalGrid; - end; - - TcxVirtualVerticalGridReportLinkFormatter = class(TcxCustomVerticalGridReportLinkFormatter) - protected - function GetFirstInternalRecordIndex: Integer; override; - function GetInternalRecordCount: Integer; override; - end; - - TcxVirtualVerticalGridReportLink = class; - - TcxVirtualVerticalGridReportLinkOptionsView = class(TcxVerticalGridReportLinkOptionsView) - private - function GetReportLink: TcxVirtualVerticalGridReportLink; - protected - function GetActualMode: TcxVerticalGridReportLinkPrintMode; override; - public - property ReportLink: TcxVirtualVerticalGridReportLink read GetReportLink; - published - property Mode; - end; - - TcxVirtualVerticalGridReportLink = class(TcxCustomVerticalGridReportLink) - private - function GetOptionsView: TcxVirtualVerticalGridReportLinkOptionsView; - function GetVirtualVerticalGrid: TcxVirtualVerticalGrid; - procedure SetOptionsView(Value: TcxVirtualVerticalGridReportLinkOptionsView); - protected - procedure InternalRestoreFromOriginal; override; - - class function GetBuilderClass: TcxCustomVerticalGridReportLinkBuilderClass; override; - function GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; override; - - procedure InitializePrintModeControl(AControl: TComboBox); override; - procedure UpdateStatePrintModeControl(AControl: TComboBox); override; - public - property VirtualVerticalGrid: TcxVirtualVerticalGrid read GetVirtualVerticalGrid; - published - property OptionsView: TcxVirtualVerticalGridReportLinkOptionsView read GetOptionsView write SetOptionsView; - end; - - { DBVericalGrid } - - TcxDBVerticalGridReportLinkBuilder = class(TcxVirtualVerticalGridReportLinkBuilder) - public - class function FormatterClass: TcxCustomVerticalGridReportLinkFormatterClass; override; - end; - - TcxDBVerticalGridReportLinkFormatter = class(TcxVirtualVerticalGridReportLinkFormatter) - private - function GetDataController: TcxDBVerticalGridDataController; - protected - function GetAreRecordsNeededLoading: Boolean; override; - function GetAreRecordsNeededUnloading: Boolean; override; - procedure LoadRecords; override; - procedure UnloadRecords; override; - public - property DataController: TcxDBVerticalGridDataController read GetDataController; - end; - - TcxDBVerticalGridReportLink = class(TcxVirtualVerticalGridReportLink) - private - function GetDBVerticalGrid: TcxDBVerticalGrid; - protected - class function GetBuilderClass: TcxCustomVerticalGridReportLinkBuilderClass; override; - public - property DBVerticalGrid: TcxDBVerticalGrid read GetDBVerticalGrid; - end; - - TcxfmVerticalGridReportLinkDesignWindow = class(TdxfmCustomcxControlReportLinkDesignWindow) - PageControl1: TPageControl; - tshView: TTabSheet; - lblShow: TLabel; - imgShow: TImage; - bvlShow: TBevel; - chbxShowHeaders: TCheckBox; - chbxShowExpandButtons: TCheckBox; - chbxShowBorders: TCheckBox; - tshBehaviors: TTabSheet; - lblExpanding: TLabel; - imgExpanding: TImage; - bvlExpanding: TBevel; - lblSize: TLabel; - bvlSize: TBevel; - imgGridSize: TImage; - chbxExpandRows: TCheckBox; - chbxAutoWidth: TCheckBox; - tshFormatting: TTabSheet; - lblLookAndFeel: TLabel; - bvlLookAndFeel: TBevel; - imgLookAndFeel: TImage; - imgRefinements: TImage; - lblRefinements: TLabel; - bvlRefinements: TBevel; - cbxLookAndFeel: TComboBox; - chbxFlatCheckMarks: TCheckBox; - chbxDisplayGraphicsAsText: TCheckBox; - chbxTransparentGraphics: TCheckBox; - chbxSuppressBackgroundBitmaps: TCheckBox; - tshStyles: TTabSheet; - bvlStyles: TBevel; - bvlStyleSheets: TBevel; - lblStyleSheets: TLabel; - bvlStylesHost: TBevel; - btnStyleColor: TButton; - btnStyleFont: TButton; - btnStyleBackgroundBitmap: TButton; - chbxUseNativeStyles: TCheckBox; - cbxStyleSheets: TComboBox; - btnStyleSheetNew: TButton; - btnStyleSheetCopy: TButton; - btnStyleSheetDelete: TButton; - btnStylesSaveAs: TButton; - btnStyleSheetRename: TButton; - btnStyleBackgroundBitmapClear: TButton; - btnStyleRestoreDefaults: TButton; - cxStyleRepository1: TcxStyleRepository; - styleCategory: TcxStyle; - pmStyles: TPopupMenu; - miStyleFont: TMenuItem; - miStyleColor: TMenuItem; - miLine3: TMenuItem; - miStyleBackgroundBitmap: TMenuItem; - miStyleBackgroundBitmapClear: TMenuItem; - milLine: TMenuItem; - miStylesSelectAll: TMenuItem; - miLine2: TMenuItem; - miStyleRestoreDefaults: TMenuItem; - miLine4: TMenuItem; - miStylesSaveAs: TMenuItem; - ilStylesPopup: TImageList; - pnlPreview: TPanel; - chbxBestFit: TCheckBox; - PreviewVGrid: TcxVerticalGrid; - chbxWrapRecords: TCheckBox; - chbxKeepSameRecordWidths: TCheckBox; - lblPagination: TLabel; - bvlPagination: TBevel; - chbxPaginateByRows: TCheckBox; - chbxPaginateByWrapping: TCheckBox; - chbxOneWrappingPerPage: TCheckBox; - imgPagination: TImage; - rowLuxurySedan: TcxCategoryRow; - rowManufacturer: TcxEditorRow; - rowModel: TcxEditorRow; - rowPicture: TcxEditorRow; - rowEngine: TcxEditorRow; - rowTransmission: TcxEditorRow; - rowTires: TcxEditorRow; - styleHeader: TcxStyle; - styleContent: TcxStyle; - lblPreviewWindow: TStaticText; - bvlMultipleRecords: TBevel; - cbxPrintMode: TComboBox; - lblPrintMode: TLabel; - Label1: TLabel; - lblUseNativeStyles: TLabel; - procedure LookAndFeelChange(Sender: TObject); - procedure OptionsExpandingClick(Sender: TObject); - procedure OptionsFormattingClick(Sender: TObject); - procedure OptionsPaginationClick(Sender: TObject); - procedure OptionsRefinementsClick(Sender: TObject); - procedure OptionsSizeClick(Sender: TObject); - procedure OptionsViewClick(Sender: TObject); - procedure pmStylesPopup(Sender: TObject); - procedure StyleColorClick(Sender: TObject); - procedure StyleFontClick(Sender: TObject); - procedure StyleBackgroundBitmapClick(Sender: TObject); - procedure cbxStyleSheetsClick(Sender: TObject); - procedure btnStyleSheetNewClick(Sender: TObject); - procedure btnStyleSheetCopyClick(Sender: TObject); - procedure btnStyleSheetDeleteClick(Sender: TObject); - procedure btnStyleSheetRenameClick(Sender: TObject); - procedure StylesSaveAsClick(Sender: TObject); - procedure cbxStyleSheetsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure lbxStylesClick(Sender: TObject); - procedure StyleBackgroundBitmapClearClick(Sender: TObject); - procedure StyleRestoreDefaultsClick(Sender: TObject); - procedure miStylesSelectAllClick(Sender: TObject); - procedure PreviewVGridDrawValue(Sender: TObject; ACanvas: TcxCanvas; - APainter: TcxvgPainter; AValueInfo: TcxRowValueInfo; - var Done: Boolean); - procedure PageControl1Change(Sender: TObject); - procedure cbxPrintModeChange(Sender: TObject); - procedure cbxStyleSheetsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure lblUseNativeStylesClick(Sender: TObject); - private - lbxStyles: TdxStylesListBox; - - function GetActiveStyle: TcxStyle; - function GetComponent: TcxCustomVerticalGrid; - function GetHasSelectedStyles: Boolean; - function GetHasSelectedStylesWithAssignedBitmap: Boolean; - function GetReportLink: TcxCustomVerticalGridReportLink; - - function CanSelectAllStyles: Boolean; - procedure CreateControls; - procedure CustomDrawTextRect(ACanvas: TcxCanvas; AViewInfo: TcxRowValueInfo; const AText: string); - procedure InitializePreviewVerticalGridStyles; - procedure LoadDataIntoPreviewVerticalGrid; - procedure RecreateStylesListBox; - procedure RestoreSelectedStyles(AList: TList); - procedure SaveSelectedStyles(AList: TList); - procedure SetActivePage; - procedure UpdatePreviewVerticalGridStyles(const ACaption: string; AStyle: TcxStyle); - - procedure SetOptionsExpandingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsFormattingByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsPaginationByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsRefinementsByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsSizeByIndex(Index: Integer; Value: Boolean); - procedure SetOptionsViewByIndex(Index: Integer; Value: Boolean); - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - - function GetDesignerTabIndex: Integer; override; - procedure SetDesignerTabIndex(Value: Integer); override; - - procedure DoActiveStyleSheetChanged; override; - procedure DoFormActivated(AnActive: Boolean); override; - procedure DoRefreshStylesList; override; - procedure DoStyleChanged(const ACaption: string; AStyle: TcxStyle); override; - procedure DoStylesChanged(AStrings: TStrings; ARecreate: Boolean); override; - - procedure GetSelectedStyleNames(AStrings: TStrings); override; - procedure GetStyleSheetNames(out AStrings: TStrings); override; - procedure GetStyleNames(out AStrings: TStrings); override; - - property ActiveStyle: TcxStyle read GetActiveStyle; - property Component: TcxCustomVerticalGrid read GetComponent; - property HasSelectedStyles: Boolean read GetHasSelectedStyles; - property HasSelectedStylesWithAssignedBitmap: Boolean read GetHasSelectedStylesWithAssignedBitmap; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property ReportLink: TcxCustomVerticalGridReportLink read GetReportLink; - end; - -function PreviewImage: TPicture; -function PreviewImageAsString: AnsiString; - -implementation - -{$R *.dfm} - -{ 652 x 432 - DesignWindow } -{.3 - chbxTransparentRichEdits} - -uses - {$IFDEF DELPHI6} - Variants, - {$ENDIF} - Math, Forms, Registry, cxLookAndFeelPainters, cxDataUtils, cxDataStorage, - dxPSRes, dxPSImgs, dxPSUtl, dxBkgnd, dxPSPopupMan; - -const - DefaultExpandButtonSize = 11; - DefaultIndentWidth = 20; - DefaultRowMinHeight = 20; - ExpandButtonInteriorColor: TColor = clWindow; - - // ------------------------------------------------------------------ // - // Cell.Data = 0000.0000.0000.0000.0000.0000.0000.0000 = DWORD, 32b // - // | | | | // - // | | | | // - // |ID,4| Index,8b| RecordIndex,20b | // - // ------------------------------------------------------------------ // - // ^ ^ ^ - // | | | - // | | ---- - // | ---------------- | - // --------------------- | | - // | | | - // | | | - CodeAttributeMask = $0000000F; // -- | | - CodeAttributeOffset = $0000001C; // | | - CodeIndexMask = $000000FF; //------ | - CodeIndexOffset = $00000014; // | - CodeRecordIndexMask = $000FFFFF; //--------- - CodeRecordIndexOffset = $00000000; - -var - FBMW760Li: TPicture; - FDefaultdxPScxVerticalGridLinkStyleSheet: TcxVerticalGridReportLinkStyleSheet; - -type - TcxVerticalGridRowHelperFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(Row: TcxCustomRow): TcxVerticalGridCustomRowHelperClass; - public - class function Instance: TcxVerticalGridRowHelperFactory; reintroduce; overload; - property HelperClasses[Row: TcxCustomRow]: TcxVerticalGridCustomRowHelperClass read GetHelperClass; default; - end; - - - TcxCustomMultiEditorRowAccess = class(TcxCustomMultiEditorRow); - TcxCustomRowAccess = class(TcxCustomRow); - TcxCustomVerticalGridAccess = class(TcxCustomVerticalGrid); - TcxUnboundVerticalGridAccess = class(TcxUnboundVerticalGrid); - -{ Helpers } - -{ CustomMultiEditorRow Helpers } - -function CustomMultiEditorRow_GetProperties(AInstance: TcxCustomMultiEditorRow): TcxMultiEditorRowProperties; -begin - Result := TcxCustomMultiEditorRowAccess(AInstance).Properties; -end; - -{ CustomRow Helpers } - -function CustomRow_GetProperties(AInstance: TcxCustomRow): TcxCustomRowProperties; -begin - Result := TcxCustomRowAccess(AInstance).FProperties; -end; - -function CustomRow_IsHeightAssigned(AInstance: TcxCustomRow): Boolean; -begin - Result := TcxCustomRowAccess(AInstance).IsHeightAssigned; -end; - -{ CustomVerticalGrid Helpers } - -function CustomVerticalGrid_GetCategoryFont(AInstance: TcxCustomVerticalGrid): TFont; -begin - Result := TcxCustomVerticalGridAccess(AInstance).CategoryFont; -end; - -function CustomVerticalGrid_GetDataController(AInstance: TcxCustomVerticalGrid): TcxCustomDataController; -begin - Result := TcxCustomVerticalGridAccess(AInstance).DataController; -end; - -function CustomVerticalGrid_GetRecordCount(AInstance: TcxCustomVerticalGrid): Integer; -begin - Result := TcxCustomVerticalGridAccess(AInstance).RecordCount; -end; - -{ UnboundVerticalGrid Helpers } - -function UnboundVerticalGrid_GetLayoutStyle(AInstance: TcxUnboundVerticalGrid): TcxvgUnboundLayoutStyle; -begin - Result := TcxUnboundVerticalGridAccess(AInstance).LayoutStyle; -end; - -{ Utilities } - -function PreviewImage: TPicture; -begin - if FBMW760Li = nil then - begin - FBMW760Li := TPicture.Create; - Bitmap_LoadFromResourceName(FBMW760Li.Bitmap, IDB_DXPSCARBMW760LI); - end; - Result := FBMW760Li; -end; - -function PreviewImageAsString: AnsiString; -begin - cxImage.SavePicture(PreviewImage, Result); -end; - -function DefaultdxPScxVerticalGridLinkStyleSheet: TcxVerticalGridReportLinkStyleSheet; - - function CreateStyle(AColor: TColor; AFontColor: TColor): TcxStyle; - begin - Result := TcxStyle.Create(DefaultdxPScxVerticalGridLinkStyleSheet); - with Result do - begin - Color := AColor; - Font.Name := dxPSCore.dxPSDefaultFontName; - Font.Color := AFontColor; - end; - end; - -begin - if FDefaultdxPScxVerticalGridLinkStyleSheet = nil then - begin - FDefaultdxPScxVerticalGridLinkStyleSheet := TcxVerticalGridReportLinkStyleSheet.Create(nil); - with FDefaultdxPScxVerticalGridLinkStyleSheet.Styles as TcxVerticalGridReportLinkStyles do - begin - Category := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - Content := CreateStyle(dxPSCore.dxDefaultContentColor, dxPSCore.dxPSDefaultFontColor); - Header := CreateStyle(dxPSCore.dxDefaultFixedColor, dxPSCore.dxPSDefaultFontColor); - end; - end; - Result := FDefaultdxPScxVerticalGridLinkStyleSheet; -end; - -{ PlaceList Helpers } - -procedure ClearPlaceList(AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - TObject(AList[I]).Free; - AList.Clear; -end; - -function CreatePlaceList(ACount: Integer): TList; -var - I: Integer; -begin - Result := TList.Create; - Result.Capacity := ACount; - for I := 0 to ACount - 1 do - Result.Add(TcxVerticalGridRowElementPlace.Create); -end; - -{ TcxVerticalGridRowHelperFactory } - -function dxVerticalGridRowHelperFactory: TcxVerticalGridRowHelperFactory; -begin - Result := TcxVerticalGridRowHelperFactory.Instance; -end; - -class function TcxVerticalGridRowHelperFactory.Instance: TcxVerticalGridRowHelperFactory; -begin - Result := inherited Instance as TcxVerticalGridRowHelperFactory; -end; - -function TcxVerticalGridRowHelperFactory.GetHelperClass(Row: TcxCustomRow): TcxVerticalGridCustomRowHelperClass; -begin - Result := TcxVerticalGridCustomRowHelperClass(PairClasses[Row.ClassType]); -end; - -{ CLR Accessors } - - -{ TcxVerticalGridRowElementPlace } - -procedure TcxVerticalGridRowElementPlace.Clear; -begin - Offset := 0; - Width := 0; -end; - -{ TcxVerticalGridCustomRowPlace } - -constructor TcxVerticalGridCustomRowPlace.Create(AFormatter: TcxCustomVerticalGridReportLinkFormatter; - ARow: TcxCustomRow; AWrapIndex: Integer); -begin - inherited Create; - FFormatter := AFormatter; - FRow := ARow; - FWrapIndex := AWrapIndex; -end; - -procedure TcxVerticalGridCustomRowPlace.AddDelimiters(AReportLink: TcxCustomVerticalGridReportLink); -begin -end; - -procedure TcxVerticalGridCustomRowPlace.Calculate; -begin -end; - -function TcxVerticalGridCustomRowPlace.CalculatedHeaderWidth: Integer; -begin - Result := CalculatedMinWidth; -end; - -function TcxVerticalGridCustomRowPlace.CalculatedMinHeight: Integer; -begin - Result := Formatter.GetImageHeight(Row, 0); - if Result = 0 then - Result := DefaultRowMinHeight; -end; - -function TcxVerticalGridCustomRowPlace.CalculatedMinWidth: Integer; -begin - Result := IndentArea; -end; - -function TcxVerticalGridCustomRowPlace.CalculatedRecordWidth(ARecordIndex: Integer): Integer; -begin - Result := 0; -end; - -function TcxVerticalGridCustomRowPlace.CalculatedTextPatternHeight(AFont: HFONT): Integer; -var - Size: TSize; -begin - SelectObject(DC, AFont); - GetTextExtentPoint(DC, 'Wg', 2, Size); - Result := 2 + Size.cy + 2; -end; - -function TcxVerticalGridCustomRowPlace.CalculatedTextWidth(const AText: string; - AFont: HFONT): Integer; -var - Size: TSize; -begin - SelectObject(DC, AFont); - GetTextExtentPoint(DC, PChar(AText), Length(AText), Size); - Result := 3 + Size.cx + 3; -end; - -procedure TcxVerticalGridCustomRowPlace.Clear; -begin -end; - -function TcxVerticalGridCustomRowPlace.GetHeaderAvailableWidth: Integer; -begin - Result := Formatter.HeaderAvailableWidths[Row]; -end; - -function TcxVerticalGridCustomRowPlace.GetValueAvailableWidth(RecordIndex: Integer): Integer; -begin - Result := Formatter.RecordWidths[RecordIndex]; -end; - -function TcxVerticalGridCustomRowPlace.Row: TcxCustomRow; -begin - Result := FRow; -end; - -function TcxVerticalGridCustomRowPlace.RowHelper: TcxVerticalGridCustomRowHelper; -begin - Result := Formatter.RowHelpers[Row]; -end; - -function TcxVerticalGridCustomRowPlace.GetDC: HDC; -begin - Result := Formatter.DC; -end; - -function TcxVerticalGridCustomRowPlace.GetHasHeader: Boolean; -begin - Result := Formatter.ShowHeaders; -end; - -function TcxVerticalGridCustomRowPlace.GetIndentArea: Integer; -begin - Result := Formatter.IndentAreas[Row]; -end; - -function TcxVerticalGridCustomRowPlace.GetInterRecordsSpace: Integer; -begin - Result := Formatter.InterRecordsSpace; -end; - -function TcxVerticalGridCustomRowPlace.GetItemCount: Integer; -begin - Result := RowHelper.ItemCount; -end; - -function TcxVerticalGridCustomRowPlace.GetRecordCount: Integer; -begin - Result := Formatter.RecordCounts[WrapIndex]; -end; - -function TcxVerticalGridCustomRowPlace.GetRecordWidth(RecordIndex: Integer): Integer; -begin - Result := Formatter.RecordWidths[RecordIndex]; -end; - -function TcxVerticalGridCustomRowPlace.GetStartRecordIndex: Integer; -begin - Result := Formatter.WrappedRecordStartIndexes[WrapIndex]; -end; - -function TcxVerticalGridCustomRowPlace.GetStopRecordIndex: Integer; -begin - Result := Formatter.WrappedRecordStopIndexes[WrapIndex]; -end; - -{ TcxVerticalGridCategoryRowPlace } - -constructor TcxVerticalGridCategoryRowPlace.Create(AFormatter: TcxCustomVerticalGridReportLinkFormatter; - ARow: TcxCustomRow; AWrapIndex: Integer); -begin - inherited; - FPlace := TcxVerticalGridRowElementPlace.Create; -end; - -destructor TcxVerticalGridCategoryRowPlace.Destroy; -begin - FreeAndNil(FPlace); - inherited; -end; - -procedure TcxVerticalGridCategoryRowPlace.Calculate; -begin - inherited; - FPlace.Offset := IndentArea; - FPlace.Width := Formatter.ViewWidths[WrapIndex] - IndentArea; -end; - -function TcxVerticalGridCategoryRowPlace.CalculatedHeaderWidth: Integer; -begin - Result := IndentArea; -end; - -function TcxVerticalGridCategoryRowPlace.CalculatedMinHeight: Integer; -var - F: HFONT; - V: Integer; -begin - Result := inherited CalculatedMinHeight; - F := Windows.GetCurrentObject(DC, OBJ_FONT); - V := CalculatedTextPatternHeight(Font.Handle); - Windows.SelectObject(DC, F); - if Result < V then - Result := V; -end; - -function TcxVerticalGridCategoryRowPlace.CalculatedMinWidth: Integer; -var - F: HFONT; -begin - Result := inherited CalculatedMinWidth; - - F := Windows.GetCurrentObject(DC, OBJ_FONT); - Inc(Result, CalculatedTextWidth(Caption, Font.Handle)); - Windows.SelectObject(DC, F); - - Inc(Result, Formatter.GetImageWidth(Row, 0)); -end; - -function TcxVerticalGridCategoryRowPlace.Row: TcxCategoryRow; -begin - Result := inherited Row as TcxCategoryRow; -end; - -function TcxVerticalGridCategoryRowPlace.RowHelper: TcxVerticalGridCategoryRowHelper; -begin - Result := inherited RowHelper as TcxVerticalGridCategoryRowHelper; -end; - -function TcxVerticalGridCategoryRowPlace.GetCaption: string; -begin - Result := RowHelper.Caption; -end; - -function TcxVerticalGridCategoryRowPlace.GetFont: TFont; -begin - Result := Formatter.GetCategoryRowFont(Row); -end; - -function TcxVerticalGridCategoryRowPlace.GetOffset: Integer; -begin - Result := FPlace.Offset; -end; - -function TcxVerticalGridCategoryRowPlace.GetWidth: Integer; -begin - Result := FPlace.Width; -end; - -{ TcxVerticalGridCustomEditorRowPlace } - -constructor TcxVerticalGridCustomEditorRowPlace.Create(AFormatter: TcxCustomVerticalGridReportLinkFormatter; - ARow: TcxCustomRow; AWrapIndex: Integer); -begin - inherited; - FHeaderPlace := TcxVerticalGridRowElementPlace.Create; - CreateValuePlaces; -end; - -destructor TcxVerticalGridCustomEditorRowPlace.Destroy; -begin - FreeAndNilValuePlaces; - FreeAndNil(FHeaderPlace); - inherited; -end; - -procedure TcxVerticalGridCustomEditorRowPlace.AddDelimiters(AReportLink: TcxCustomVerticalGridReportLink); -var - I: Integer; -begin - inherited; - if HasHeader then - begin - AReportLink.AddHorizontalDelimiter(HeaderPlace.Offset); - AReportLink.AddHorizontalDelimiter(HeaderPlace.Offset + HeaderPlace.Width); - end; - for I := StartRecordIndex to StartRecordIndex + ValuePlaceCount - 1 do - begin - AReportLink.AddHorizontalDelimiter(ValuePlaces[I].Offset); - AReportLink.AddHorizontalDelimiter(ValuePlaces[I].Offset + ValuePlaces[I].Width); - end; -end; - -procedure TcxVerticalGridCustomEditorRowPlace.Calculate; -begin - inherited; - CalculateHeaderPlace; - CalculateValuePlaces; -end; - -function TcxVerticalGridCustomEditorRowPlace.CalculatedHeaderWidth: Integer; -var - F: HFONT; -begin - Result := inherited CalculatedHeaderWidth; - - F := Windows.GetCurrentObject(DC, OBJ_FONT); - Inc(Result, CalculatedTextWidth(RowHelper.HeaderCaptions[0], HeaderFont.Handle)); - SelectObject(DC, F); - - Inc(Result, Formatter.GetImageWidth(Row, 0)); - if Result <> 0 then - Inc(Result, 1 + 1); // Borders -end; - -function TcxVerticalGridCustomEditorRowPlace.CalculatedMinHeight: Integer; -var - I, HeaderMinHeight, V, RowMinHeight: Integer; -begin - Result := inherited CalculatedMinHeight; - HeaderMinHeight := CalculatedTextPatternHeight(HeaderFont.Handle); - RowMinHeight := 0; - for I := 0 to RecordCount - 1 do - begin - V := CalculatedTextPatternHeight(ValueFonts[I].Handle); - if RowMinHeight < V then - RowMinHeight := V; - end; - Result := Round(Math.MaxValue([Result, HeaderMinHeight, RowMinHeight])); -end; - -function TcxVerticalGridCustomEditorRowPlace.CalculatedRecordWidth(ARecordIndex: Integer): Integer; -begin - if DoesItemParticipateInBestFitCalculation(ARecordIndex) then - begin - Result := MeasureWidth(ARecordIndex); - if Result <> 0 then - Inc(Result, 1 + 1); // Borders - end - else - Result := 0; -end; - -procedure TcxVerticalGridCustomEditorRowPlace.CalculateHeaderPlace; -begin - HeaderPlace.Offset := IndentArea; - if HasHeader then - HeaderPlace.Width := HeaderAvailableWidth; -end; - -procedure TcxVerticalGridCustomEditorRowPlace.CalculateValuePlaces; -var - CurrentOffset, I: Integer; -begin - CurrentOffset := ValuesOffset; - for I := StartRecordIndex to StopRecordIndex do - begin - with ValuePlaces[I] do - begin - Offset := CurrentOffset; - Width := RecordWidths[I]; - end; - Inc(CurrentOffset, ValuePlaces[I].Width + InterRecordsSpace); - end; -end; - -procedure TcxVerticalGridCustomEditorRowPlace.Clear; -begin - inherited; - HeaderPlace.Clear; - ClearValuePlaces; -end; - -procedure TcxVerticalGridCustomEditorRowPlace.ClearValuePlaces; -begin - ClearPlaceList(FValuePlaces); -end; - -procedure TcxVerticalGridCustomEditorRowPlace.CreateValuePlaces; -begin - FValuePlaces := CreatePlaceList(RecordCount); -end; - -procedure TcxVerticalGridCustomEditorRowPlace.FreeAndNilValuePlaces; -begin - ClearValuePlaces; - FreeAndNil(FValuePlaces); -end; - -function TcxVerticalGridCustomEditorRowPlace.DoesItemParticipateInBestFitCalculation(ARecordIndex: Integer): Boolean; -begin - Result := dxPScxCommon.dxPSDataMaps.DoesItemParticipateInBestFitCalculation(Properties[ARecordIndex]); -end; - -function TcxVerticalGridCustomEditorRowPlace.MeasureWidth(ARecordIndex: Integer): Integer; -begin - Result := dxPScxCommon.dxPSDataMaps.MeasureWidth(Properties[ARecordIndex], - Values[ARecordIndex], Formatter, ValueFonts[ARecordIndex], ARecordIndex); -end; - -function TcxVerticalGridCustomEditorRowPlace.Row: TcxCustomEditorRow; -begin - Result := inherited Row as TcxCustomEditorRow; -end; - -function TcxVerticalGridCustomEditorRowPlace.RowHelper: TcxVerticalGridCustomEditorRowHelper; -begin - Result := inherited RowHelper as TcxVerticalGridCustomEditorRowHelper; -end; - -function TcxVerticalGridCustomEditorRowPlace.GetHeaderFont: TFont; -begin - Result := Formatter.GetRowHeaderFont(Row, 0); -end; - -function TcxVerticalGridCustomEditorRowPlace.GetProperty(RecordIndex: Integer): TcxCustomEditProperties; -begin - Result := RowHelper.EditProperties[0, RecordIndex]; -end; - -function TcxVerticalGridCustomEditorRowPlace.GetValueFont(RecordIndex: Integer): TFont; -begin - Result := Formatter.GetRowValueFont(Row, 0, RecordIndex); -end; - -function TcxVerticalGridCustomEditorRowPlace.GetValuePlace(RecordIndex: Integer): TcxVerticalGridRowElementPlace; -begin - Result := FValuePlaces[RecordIndex - StartRecordIndex]; -end; - -function TcxVerticalGridCustomEditorRowPlace.GetValuePlaceCount: Integer; -begin - Result := FValuePlaces.Count; -end; - -function TcxVerticalGridCustomEditorRowPlace.GetValue(RecordIndex: Integer): TcxEditValue; -begin - Result := RowHelper.Values[0, RecordIndex]; -end; - -function TcxVerticalGridCustomEditorRowPlace.GetValuesOffset: Integer; -begin - Result := HeaderPlace.Offset + HeaderPlace.Width; -end; - -{ TcxVerticalGridCustomMultiEditorRowPlace } - -constructor TcxVerticalGridCustomMultiEditorRowPlace.Create(AFormatter: TcxCustomVerticalGridReportLinkFormatter; - ARow: TcxCustomRow; AWrapIndex: Integer); -begin - inherited; - CreatePlaces; -end; - -destructor TcxVerticalGridCustomMultiEditorRowPlace.Destroy; -begin - FreeAndNilPlaces; - inherited; -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.AddDelimiters(AReportLink: TcxCustomVerticalGridReportLink); -begin - inherited; - AReportLink.AddHorizontalDelimiter(ValuesOffset); -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.Calculate; -begin - inherited; - if HasHeaderSeparators then CalculateHeaderSeparatorWidths; - if HasValueSeparators then CalculateValueSeparatorWidths; - CalculateHeaderPlaces; - CalculateValuePlaces; - if HasHeaderSeparators then CalculateHeaderSeparatorPlaces; - if HasValueSeparators then CalculateValueSeparatorPlaces; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.CalculatedHeaderWidth: Integer; -var - I: Integer; -begin - Result := inherited CalculatedHeaderWidth; - - for I := 0 to ItemCount - 1 do - begin - Inc(Result, Formatter.GetImageWidth(Row, I)); - Inc(Result, CalculatedTextWidth(RowHelper.HeaderCaptions[I], HeaderFonts[I].Handle)); - end; - - if HasHeaderSeparators then - begin - CalculateHeaderSeparatorWidths; - Inc(Result, HeaderSeparatorsArea); - end; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.CalculatedMinHeight: Integer; -var - I, J, V, RowMinHeight, ImageHeight, RowHeaderMinHeight, ValueSeparatorMinHeight: Integer; -begin - RowHeaderMinHeight := 0; - ImageHeight := 0; - - for I := 0 to ItemCount - 1 do - begin - V := CalculatedTextPatternHeight(HeaderFonts[I].Handle); - if RowHeaderMinHeight < V then - RowHeaderMinHeight := V; - - V := Formatter.GetImageHeight(Row, I); - if ImageHeight < V then - ImageHeight := V; - end; - - RowMinHeight := 0; - ValueSeparatorMinHeight := 0; - for I := 0 to RecordCount - 1 do - for J := 0 to ItemCount - 1 do - begin - V := CalculatedTextPatternHeight(ValueFonts[J, I].Handle); - if RowMinHeight < V then - RowMinHeight := V; - - V := CalculatedTextPatternHeight(ValueSeparatorsFonts[J, I].Handle); - if ValueSeparatorMinHeight < V then - ValueSeparatorMinHeight := V; - end; - - Result := Round(Math.MaxValue([RowHeaderMinHeight, RowMinHeight, ValueSeparatorMinHeight, ImageHeight, DefaultRowMinHeight])); -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.CalculatedRecordWidth(ARecordIndex: Integer): Integer; -var - I, W: Integer; -begin - Result := 0; - - for I := 0 to ItemCount - 1 do - if DoesItemParticipateInBestFitCalculation(I, ARecordIndex) then - begin - W := MeasureWidth(I, ARecordIndex); - if W <> 0 then Inc(W, 1 + 1); // borders - Inc(Result, W); - end; - if HasValueSeparators then - begin - CalculateValueSeparatorWidths; - Inc(Result, ValueSeparatorsAreas[ARecordIndex]); - end; - - if Result <> 0 then - Inc(Result, 1 + 1); // Borders -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.CalculateHeaderPartWidths; -var - AutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AutoWidthObject := TcxAutoWidthObject.Create(RowHelper.ItemCount); - try - CalculatePartWidths(AutoWidthObject, HeaderAvailableWidth); - for I := 0 to AutoWidthObject.Count - 1 do - HeaderPlaces[I].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.CalculateHeaderPlaces; -var - CurrentOffset, I: Integer; -begin - if HasHeader then CalculateHeaderPartWidths; - - CurrentOffset := IndentArea; - for I := 0 to ItemCount - 1 do - begin - HeaderPlaces[I].Offset := CurrentOffset; - Inc(CurrentOffset, HeaderPlaces[I].Width); - if HasHeaderSeparators and (I < ItemCount - 1) then - Inc(CurrentOffset, HeaderSeparatorPlaces[I].Width); - end; -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.CalculateHeaderSeparatorPlaces; -var - CurrentOffset, I: Integer; -begin - CurrentOffset := IndentArea; - for I := 0 to HeaderSeparatorCount - 1 do - begin - Inc(CurrentOffset, HeaderPlaces[I].Width); - HeaderSeparatorPlaces[I].Offset := CurrentOffset; - Inc(CurrentOffset, HeaderSeparatorPlaces[I].Width); - end; -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.CalculateHeaderSeparatorWidths; -var - F: HFONT; - I: Integer; -begin - F := Windows.GetCurrentObject(DC, OBJ_FONT); - for I := 0 to HeaderSeparatorCount - 1 do - HeaderSeparatorPlaces[I].Width := CalculatedTextWidth(RowHelper.HeaderSeparatorTexts[I], HeaderSeparatorsFonts[I].Handle); - Windows.SelectObject(DC, F); -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.CalculatePartWidths(AnAutoWidthObject: TcxAutoWidthObject; - AnAvailableWidth: Integer); - - procedure AssignAutoWidthItem(AnItem: TcxAutoWidthItem; AProperties: TcxEditorRowItemProperties); - begin - AnItem.MinWidth := 0; - AnItem.Width := AProperties.Width; - end; - -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - AssignAutoWidthItem(AnAutoWidthObject.AddItem, RowHelper.Properties(I)); - AnAutoWidthObject.AvailableWidth := AnAvailableWidth; - AnAutoWidthObject.Calculate; -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.CalculateValuePartWidths; - - procedure CalculateValueRecordPartWidths(ARecordIndex: Integer); - var - AutoWidthObject: TcxAutoWidthObject; - I: Integer; - begin - AutoWidthObject := TcxAutoWidthObject.Create(RowHelper.ItemCount); - try - CalculatePartWidths(AutoWidthObject, ValueAvailableWidths[ARecordIndex]); - for I := 0 to AutoWidthObject.Count - 1 do - ValuePlaces[I, ARecordIndex].Width := AutoWidthObject[I].AutoWidth; - finally - AutoWidthObject.Free; - end; - end; - -var - I: Integer; -begin - for I := StartRecordIndex to StopRecordIndex do - CalculateValueRecordPartWidths(I); -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.CalculateValuePlaces; -var - CurrentOffset, I, J: Integer; -begin - CalculateValuePartWidths; - - CurrentOffset := ValuesOffset; - for I := StartRecordIndex to StopRecordIndex do - begin - for J := 0 to ItemCount - 1 do - begin - ValuePlaces[J, I].Offset := CurrentOffset; - Inc(CurrentOffset, ValuePlaces[J, I].Width); - if HasValueSeparators and (J < ItemCount - 1) then - Inc(CurrentOffset, ValueSeparatorPlaces[J, I].Width); - end; - Inc(CurrentOffset, InterRecordsSpace); - end; -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.CalculateValueSeparatorPlaces; -var - CurrentOffset, I, J: Integer; -begin - CurrentOffset := ValuesOffset; - for I := StartRecordIndex to StopRecordIndex do - begin - Inc(CurrentOffset, ValuePlaces[0, I].Width); - for J := 0 to ValueSeparatorCount - 1 do - begin - ValueSeparatorPlaces[J, I].Offset := CurrentOffset; - Inc(CurrentOffset, ValuePlaces[J + 1, I].Width + ValueSeparatorPlaces[J, I].Width); - end; - Inc(CurrentOffset, InterRecordsSpace); - end; -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.CalculateValueSeparatorWidths; -var - F: HFONT; - I, J: Integer; -begin - F := Windows.GetCurrentObject(DC, OBJ_FONT); - for I := StartRecordIndex to StopRecordIndex do - for J := 0 to ValueSeparatorCount - 1 do - ValueSeparatorPlaces[J, I].Width := CalculatedTextWidth(RowHelper.ValueSeparatorTexts[J], ValueSeparatorsFonts[J, I].Handle); - Windows.SelectObject(DC, F); -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.Clear; -begin - inherited; - ClearPlaces; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetHeaderAvailableWidth: Integer; -begin - Result := inherited GetHeaderAvailableWidth - HeaderSeparatorsArea; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValueAvailableWidth(RecordIndex: Integer): Integer; -begin - Result := inherited GetValueAvailableWidth(RecordIndex) - ValueSeparatorsAreas[RecordIndex]; -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.ClearPlaces; -begin - ClearPlaceList(FHeaderPlaces); - ClearPlaceList(FHeaderSeparatorPlaces); - ClearPlaceList(FValuePlaces); - ClearPlaceList(FValueSeparatorPlaces); -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.CreatePlaces; -begin - FHeaderPlaces := CreatePlaceList(ItemCount); - FHeaderSeparatorPlaces := CreatePlaceList(HeaderSeparatorCount); - FValuePlaces := CreatePlaceList(RecordCount * ItemCount); - FValueSeparatorPlaces := CreatePlaceList(RecordCount * ValueSeparatorCount); -end; - -procedure TcxVerticalGridCustomMultiEditorRowPlace.FreeAndNilPlaces; -begin - ClearPlaces; - FreeAndNil(FHeaderPlaces); - FreeAndNil(FHeaderSeparatorPlaces); - FreeAndNil(FValuePlaces); - FreeAndNil(FValueSeparatorPlaces); -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.DoesItemParticipateInBestFitCalculation(ACellIndex, - ARecordIndex: Integer): Boolean; -begin - Result := dxPScxCommon.dxPSDataMaps.DoesItemParticipateInBestFitCalculation(Properties[ACellIndex, ARecordIndex]); -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.MeasureWidth(ACellIndex, - ARecordIndex: Integer): Integer; -begin - Result := dxPScxCommon.dxPSDataMaps.MeasureWidth(Properties[ACellIndex, ARecordIndex], - Values[ACellIndex, ARecordIndex], Formatter, ValueFonts[ACellIndex, ARecordIndex], ARecordIndex); -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.Row: TcxCustomMultiEditorRow; -begin - Result := inherited Row as TcxCustomMultiEditorRow; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.RowHelper: TcxVerticalGridCustomMultiEditorRowHelper; -begin - Result := inherited RowHelper as TcxVerticalGridCustomMultiEditorRowHelper; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetHasHeaderSeparators: Boolean; -begin - Result := HasHeader and RowHelper.HasHeaderSeparators; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetHasValueSeparators: Boolean; -begin - Result := RowHelper.HasValueSeparators; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetHeaderFont(CellIndex: Integer): TFont; -begin - Result := Formatter.GetRowHeaderFont(Row, CellIndex); -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetHeaderPlace(CellIndex: Integer): TcxVerticalGridRowElementPlace; -begin - Result := FHeaderPlaces[CellIndex]; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetHeaderPlaceCount: Integer; -begin - Result := FHeaderPlaces.Count; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetHeaderSeparatorCount: Integer; -begin - Result := RowHelper.HeaderSeparatorCount; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetHeaderSeparatorPlace(CellIndex: Integer): TcxVerticalGridRowElementPlace; -begin - Result := FHeaderSeparatorPlaces[CellIndex]; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetHeaderSeparatorPlaceCount: Integer; -begin - Result := FHeaderSeparatorPlaces.Count; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetHeaderSeparatorsArea: Integer; -var - I: Integer; -begin - if HasHeaderSeparators then - begin - Result := 0; - for I := 0 to HeaderSeparatorCount - 1 do - Inc(Result, HeaderSeparatorPlaces[I].Width); - end - else - Result := 0; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetHeaderSeparatorsFont(CellIndex: Integer): TFont; -begin - Result := Formatter.GetRowHeaderSeparatorsFont(Row, CellIndex); -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetProperty(CellIndex, RecordIndex: Integer): TcxCustomEditProperties; -begin - Result := RowHelper.EditProperties[CellIndex, RecordIndex]; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValue(CellIndex, RecordIndex: Integer): TcxEditValue; -begin - Result := RowHelper.Values[CellIndex, RecordIndex]; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValueFlatIndex(CellIndex, RecordIndex: Integer): Integer; -begin - Result := RecordIndex * ItemCount + CellIndex; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValueFont(CellIndex, RecordIndex: Integer): TFont; -begin - Result := Formatter.GetRowValueFont(Row, CellIndex, RecordIndex); -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValuePlace(CellIndex, RecordIndex: Integer): TcxVerticalGridRowElementPlace; -begin - Result := FValuePlaces[ValueFlatIndexes[CellIndex, RecordIndex - StartRecordIndex]]; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValuePlaceCount: Integer; -begin - Result := FValuePlaces.Count; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValueSeparatorsArea(RecordIndex: Integer): Integer; -var - I: Integer; -begin - if HasValueSeparators then - begin - Result := 0; - for I := 0 to RowHelper.ValueSeparatorCount - 1 do - Inc(Result, ValueSeparatorPlaces[I, RecordIndex].Width); - end - else - Result := 0; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValueSeparatorCount: Integer; -begin - Result := RowHelper.ValueSeparatorCount; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValueSeparatorFlatIndex(CellIndex, RecordIndex: Integer): Integer; -begin - Result := RecordIndex * ValueSeparatorCount + CellIndex; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValueSeparatorPlace(CellIndex, RecordIndex: Integer): TcxVerticalGridRowElementPlace; -begin - Result := FValueSeparatorPlaces[ValueSeparatorFlatIndexes[CellIndex, RecordIndex - StartRecordIndex]]; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValueSeparatorPlaceCount: Integer; -begin - Result := FValueSeparatorPlaces.Count; -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValueSeparatorsFont(CellIndex, RecordIndex: Integer): TFont; -begin - Result := Formatter.GetRowValueSeparatorsFont(Row, CellIndex, RecordIndex); -end; - -function TcxVerticalGridCustomMultiEditorRowPlace.GetValuesOffset: Integer; -begin - with HeaderPlaces[RowHelper.ItemCount - 1] do - Result := Offset + Width; -end; - -{ TcxVerticalGridReportLinkCustomElementProducer } - -constructor TcxVerticalGridReportLinkCustomElementProducer.Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TcxVerticalGridReportLinkCustomElementProducer.Adapter: TcxCustomVerticalGridAdapter; -begin - Result := Builder.Adapter; -end; - -function TcxVerticalGridReportLinkCustomElementProducer.Builder: TcxCustomVerticalGridReportLinkBuilder; -begin - Result := FBuilder; -end; - -function TcxVerticalGridReportLinkCustomElementProducer.Formatter: TcxCustomVerticalGridReportLinkFormatter; -begin - Result := Builder.Formatter; -end; - -function TcxVerticalGridReportLinkCustomElementProducer.Produce(AHostInfo: TcxVerticalGridHostInfo; - AWrapIndex: Integer): TdxReportCell; -begin - FWrapIndex := AWrapIndex; - CalculateRowHeight; - CreateRowHost(AHostInfo); - CreateRow; - Inc(AHostInfo.Origin.Y, RowHeight); - Result := Host; -end; - -procedure TcxVerticalGridReportLinkCustomElementProducer.CalculateRowHeight; -begin - FRowHeight := Formatter.WrapSeparatorHeight; -end; - -procedure TcxVerticalGridReportLinkCustomElementProducer.CreateRow; -begin - FRow := TdxReportCell.Create(Host); - FRow.BoundsRect := MakeBounds(0, 0, RowWidth, RowHeight); - InitializeRow; -end; - -procedure TcxVerticalGridReportLinkCustomElementProducer.CreateRowHost(AHostInfo: TcxVerticalGridHostInfo); -begin - FHost := TdxReportCell.Create(AHostInfo.Parent); - FHost.BoundsRect := MakeBounds(AHostInfo.Origin.X, AHostInfo.Origin.Y, RowWidth, RowHeight); - Formatter.DoInitializeHost(Host); -end; - -procedure TcxVerticalGridReportLinkCustomElementProducer.InitializeRow; -begin - -end; - -function TcxVerticalGridReportLinkCustomElementProducer.GetDC: HDC; -begin - Result := Formatter.DC; -end; - -function TcxVerticalGridReportLinkCustomElementProducer.GetRowWidth: Integer; -begin - Result := Formatter.ViewWidths[WrapIndex]; -end; - -{ TcxVerticalGridReportLinkWrapSeparatorProducer } - -procedure TcxVerticalGridReportLinkWrapSeparatorProducer.CreateRow; -begin - inherited; - CreateSeparator(Row); -end; - -procedure TcxVerticalGridReportLinkWrapSeparatorProducer.CreateSeparator(AParent: TdxReportCell); -begin - FSeparator := Formatter.GetWrapSeparatorClass.Create(AParent); - FSeparator.BoundsRect := SeparatorBounds; - InitializeSeparator; -end; - -procedure TcxVerticalGridReportLinkWrapSeparatorProducer.InitializeRow; -begin - Formatter.DoInitializeWrapSeparatorRow(Row); -end; - -procedure TcxVerticalGridReportLinkWrapSeparatorProducer.InitializeSeparator; -begin - Formatter.DoInitializeWrapSeparatorItem(Separator, WrapIndex); -end; - -function TcxVerticalGridReportLinkWrapSeparatorProducer.GetSeparatorBounds: TRect; -begin - Result := Row.BoundsRect; - OffsetRect(Result, -Result.Left, -Result.Top); -end; - -{ TcxVerticalGridReportLinkCustomRowProducer } - -constructor TcxVerticalGridReportLinkCustomRowProducer.Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); -begin - inherited; - FIndents := TList.Create; -end; - -destructor TcxVerticalGridReportLinkCustomRowProducer.Destroy; -begin - FreeAndNil(FIndents); - inherited; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GridRow: TcxCustomRow; -begin - Result := FGridRow; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GridRowHelper: TcxVerticalGridCustomRowHelper; -begin - Result := Formatter.RowHelpers[GridRow]; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GridRowPlace: TcxVerticalGridCustomRowPlace; -begin - Result := Formatter.RowPlacesByRow[GridRow, WrapIndex]; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.Produce(AHostInfo: TcxVerticalGridHostInfo; - AGridRow: TcxCustomRow; AWrapIndex: Integer): TdxReportCell; -begin - ClearItems; - - FWrapIndex := AWrapIndex; - FGridRow := AGridRow; - try - CalculateRowHeight; - - CreateRowHost(AHostInfo); - CreateRow; - if AutoHeight then - begin - CalculateRowAutoHeight; - FixupRowHeight; - end; - - Inc(AHostInfo.Origin.Y, RowHeight); - Result := Host; - finally - FGridRow := nil; - end; -end; - -procedure TcxVerticalGridReportLinkCustomRowProducer.CalculateRowAutoHeight; -var - DC: HDC; - MaxRowHeight, I, V: Integer; - Item: TAbstractdxReportCellData; -begin - DC := Self.DC; - MaxRowHeight := 0; - for I := 0 to Row.DataItemCount - 1 do - begin - Item := Row.DataItems[I]; - if DoesItemParticipateInRowAutoHeightCalculation(Item) then - begin - V := Item.MeasureContentHeight(DC); - if MaxRowHeight < V then MaxRowHeight := V; - end; - end; - RowHeight := MaxRowHeight; -end; - -procedure TcxVerticalGridReportLinkCustomRowProducer.CalculateRowHeight; -begin - FRowHeight := Formatter.RowHeights[GridRow]; - Inc(FRowHeight, 1 + 1); -end; - -procedure TcxVerticalGridReportLinkCustomRowProducer.ClearItems; -begin - FIndents.Clear; -end; - -procedure TcxVerticalGridReportLinkCustomRowProducer.CreateRow; -begin - inherited; - if HasIndents then CreateRowIndents(Row); -end; - -function TcxVerticalGridReportLinkCustomRowProducer.CreateRowIndent(AParent: TdxReportCell): TdxReportCellExpandButton; -begin - Result := Formatter.GetRowIndentClass.Create(AParent); - FIndents.Add(Result); -end; - -procedure TcxVerticalGridReportLinkCustomRowProducer.CreateRowIndents(AParent: TdxReportCell); -var - I: Integer; - Indent: TdxReportCellExpandButton; -begin - for I := 0 to IndentCount - 1 do - begin - Indent := CreateRowIndent(AParent); - Indent.BoundsRect := IndentBounds[I]; - InitializeRowIndent(Indent, I); - end; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.DoesItemParticipateInRowAutoHeightCalculation(AnItem: TAbstractdxReportCellData): Boolean; -begin - Result := True; -end; - -procedure TcxVerticalGridReportLinkCustomRowProducer.FixupRowDataHeight; -var - I: Integer; -begin - for I := 0 to Row.DataItemCount - 1 do - Row.DataItems[I].Height := RowHeight; -end; - -procedure TcxVerticalGridReportLinkCustomRowProducer.FixupRowHeight; -begin - FixupRowItselfHeight; - FixupRowDataHeight; -end; - -procedure TcxVerticalGridReportLinkCustomRowProducer.FixupRowItselfHeight; -begin - Host.Height := RowHeight; - Row.Height := RowHeight; -end; - -procedure TcxVerticalGridReportLinkCustomRowProducer.InitializeRow; -begin - Formatter.DoInitializeRowReportRow(GridRow, Row); -end; - -procedure TcxVerticalGridReportLinkCustomRowProducer.InitializeRowIndent(AnItem: TdxReportCellExpandButton; - AnIndex: Integer); -begin - Formatter.DoInitializeRowIndent(GridRow, AnItem, AnIndex, IndentCount); - Formatter.DoReportLinkInitializeRowIndent(GridRow, AnItem, AnIndex); -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GetAutoHeight: Boolean; -begin - Result := Adapter.CellAutoHeight and GridRow.Options.CanAutoHeight and - not CustomRow_IsHeightAssigned(GridRow); -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GetLineHeight: Integer; -begin - if not CustomRow_IsHeightAssigned(GridRow) then - Result := GridRow.Height - else - Result := Row.Height; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GetHasIndents: Boolean; -begin - Result := IndentCount <> 0; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GetIndent(Index: Integer): TdxReportCellExpandButton; -begin - Result := TdxReportCellExpandButton(FIndents[Index]); -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GetIndentBounds(Index: Integer): TRect; -begin - Result := MakeBounds(IndentWidth * Index, 0, IndentWidth, RowHeight); -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GetIndentCount: Integer; -begin - if Formatter.ShowHeaders then - Result := Adapter.IndentCounts[GridRow] - else - Result := 0; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GetIndentWidth: Integer; -begin - Result := Adapter.IndentWidth; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GetItemCount: Integer; -begin - Result := GridRowHelper.ItemCount; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GetRecordCount: Integer; -begin - Result := Formatter.RecordCounts[WrapIndex]; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GetStartRecordIndex: Integer; -begin - Result := Formatter.WrappedRecordStartIndexes[WrapIndex]; -end; - -function TcxVerticalGridReportLinkCustomRowProducer.GetStopRecordIndex: Integer; -begin - Result := Formatter.WrappedRecordStopIndexes[WrapIndex]; -end; - -{ TcxVerticalGridReportLinkCategoryRowProducer } - -function TcxVerticalGridReportLinkCategoryRowProducer.GridRow: TcxCategoryRow; -begin - Result := inherited GridRow as TcxCategoryRow; -end; - -function TcxVerticalGridReportLinkCategoryRowProducer.GridRowHelper: TcxVerticalGridCategoryRowHelper; -begin - Result := inherited GridRowHelper as TcxVerticalGridCategoryRowHelper; -end; - -function TcxVerticalGridReportLinkCategoryRowProducer.GridRowPlace: TcxVerticalGridCategoryRowPlace; -begin - Result := inherited GridRowPlace as TcxVerticalGridCategoryRowPlace; -end; - -procedure TcxVerticalGridReportLinkCategoryRowProducer.CreateCategoryRow(AParent: TdxReportCell); -var - Item: TdxReportCellImage; -begin - Item := Formatter.GetCategoryRowClass(GridRow).Create(Row); - Item.BoundsRect := CategoryBounds; - Formatter.DoInitializeCategoryRow(GridRow, Item); -end; - -procedure TcxVerticalGridReportLinkCategoryRowProducer.CreateRow; -begin - inherited; - CreateCategoryRow(Row); -end; - -function TcxVerticalGridReportLinkCategoryRowProducer.GetCategoryBounds: TRect; -begin - Result := MakeBounds(GridRowPlace.Offset, 0, GridRowPlace.Width, RowHeight); -end; - -{ TcxVerticalGridReportLinkCustomEditableRowProducer } - -constructor TcxVerticalGridReportLinkCustomEditableRowProducer.Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); -begin - inherited; - FHeaders := TList.Create; - FValues := TList.Create; -end; - -destructor TcxVerticalGridReportLinkCustomEditableRowProducer.Destroy; -begin - FreeAndNil(FValues); - FreeAndNil(FHeaders); - inherited; -end; - -procedure TcxVerticalGridReportLinkCustomEditableRowProducer.ClearItems; -begin - inherited; - FHeaders.Clear; - FValues.Clear; -end; - -function TcxVerticalGridReportLinkCustomEditableRowProducer.CreateHeaderItem(AParent: TdxReportCell; - ACellIndex: Integer): TdxReportCellImage; -begin - Result := Formatter.GetRowHeaderClass(GridRow).Create(AParent); - FHeaders.Add(Result); -end; - -function TcxVerticalGridReportLinkCustomEditableRowProducer.CreateValueItem(AParent: TdxReportCell; - ACellIndex, ARecordIndex: Integer): TAbstractdxReportCellData; -begin - Result := Formatter.GetRowValueClass(GridRow, ACellIndex, ARecordIndex).Create(AParent); - FValues.Add(Result); -end; - -procedure TcxVerticalGridReportLinkCustomEditableRowProducer.DoInitializeHeader(AnItem: TdxReportCellImage; - AnIndex: Integer); -begin - Formatter.DoInitializeRowHeader(GridRow, AnItem, AnIndex); - Formatter.DoReportLinkInitializeRowHeader(GridRow, AnItem, AnIndex); -end; - -procedure TcxVerticalGridReportLinkCustomEditableRowProducer.DoInitializeValue(AnItem: TAbstractdxReportCellData; - ACellIndex, ARecordIndex: Integer); -begin - Formatter.DoInitializeRowValue(GridRow, AnItem, ACellIndex, ARecordIndex); - Formatter.DoReportLinkInitializeRowValue(GridRow, AnItem, ACellIndex, ARecordIndex); -end; - -function TcxVerticalGridReportLinkCustomEditableRowProducer.DoesItemParticipateInRowAutoHeightCalculation( - AnItem: TAbstractdxReportCellData): Boolean; -begin - Result := True; -end; - -function TcxVerticalGridReportLinkCustomEditableRowProducer.GetHeader(Index: Integer): TdxReportCellImage; -begin - Result := TdxReportCellImage(FHeaders[Index]); -end; - -function TcxVerticalGridReportLinkCustomEditableRowProducer.GetHeaderCount: Integer; -begin - Result := FHeaders.Count; -end; - -function TcxVerticalGridReportLinkCustomEditableRowProducer.GetValue(Index: Integer): TAbstractdxReportCellData; -begin - Result := TAbstractdxReportCellData(FValues[Index]); -end; - -function TcxVerticalGridReportLinkCustomEditableRowProducer.GetValueCount: Integer; -begin - Result := FValues.Count; -end; - -{ TcxVerticalGridReportLinkCustomEditorRowProducer } - -function TcxVerticalGridReportLinkCustomEditorRowProducer.GridRow: TcxCustomEditorRow; -begin - Result := inherited GridRow as TcxCustomEditorRow; -end; - -function TcxVerticalGridReportLinkCustomEditorRowProducer.GridRowHelper: TcxVerticalGridCustomEditorRowHelper; -begin - Result := inherited GridRowHelper as TcxVerticalGridCustomEditorRowHelper; -end; - -function TcxVerticalGridReportLinkCustomEditorRowProducer.GridRowPlace: TcxVerticalGridCustomEditorRowPlace; -begin - Result := inherited GridRowPlace as TcxVerticalGridCustomEditorRowPlace; -end; - -procedure TcxVerticalGridReportLinkCustomEditorRowProducer.CreateRow; -begin - inherited; - if HasHeader then CreateHeader(Row); - CreateValues(Row); -end; - -procedure TcxVerticalGridReportLinkCustomEditorRowProducer.CreateHeader(AParent: TdxReportCell); -var - Header: TdxReportCellImage; -begin - Header := CreateHeaderItem(AParent, 0); - Header.BoundsRect := HeaderBounds; - DoInitializeHeader(Header, 0); -end; - -procedure TcxVerticalGridReportLinkCustomEditorRowProducer.CreateValues(AParent: TdxReportCell); -var - I: Integer; - Value: TAbstractdxReportCellData; -begin - for I := StartRecordIndex to StopRecordIndex do - begin - Value := CreateValueItem(AParent, 0, I); - Value.BoundsRect := ValueBounds[I]; - DoInitializeValue(Value, 0, I); - end; -end; - -function TcxVerticalGridReportLinkCustomEditorRowProducer.GetHasHeader: Boolean; -begin - Result := Formatter.ShowHeaders; -end; - -function TcxVerticalGridReportLinkCustomEditorRowProducer.GetHeader: TdxReportCellImage; -begin - Result := Headers[0]; -end; - -function TcxVerticalGridReportLinkCustomEditorRowProducer.GetHeaderBounds: TRect; -begin - with GridRowPlace.HeaderPlace do - Result := MakeBounds(Offset, 0, Width, RowHeight); -end; - -function TcxVerticalGridReportLinkCustomEditorRowProducer.GetValueBounds(Index: Integer): TRect; -begin - with GridRowPlace do - Result := MakeBounds(ValuePlaces[Index].Offset, 0, ValuePlaces[Index].Width, RowHeight); -end; - -{ TcxVerticalGridReportLinkCustomMultiEditorRowProducer } - -constructor TcxVerticalGridReportLinkCustomMultiEditorRowProducer.Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); -begin - inherited; - FHeaderSeparators := TList.Create; - FValueSeparators := TList.Create; -end; - -destructor TcxVerticalGridReportLinkCustomMultiEditorRowProducer.Destroy; -begin - FreeAndNil(FValueSeparators); - FreeAndNil(FHeaderSeparators); - inherited; -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GridRow: TcxCustomMultiEditorRow; -begin - Result := inherited GridRow as TcxCustomMultiEditorRow; -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GridRowHelper: TcxVerticalGridCustomMultiEditorRowHelper; -begin - Result := inherited GridRowHelper as TcxVerticalGridCustomMultiEditorRowHelper; -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GridRowPlace: TcxVerticalGridCustomMultiEditorRowPlace; -begin - Result := inherited GridRowPlace as TcxVerticalGridCustomMultiEditorRowPlace; -end; - -procedure TcxVerticalGridReportLinkCustomMultiEditorRowProducer.ClearItems; -begin - inherited; - FHeaderSeparators.Clear; - FValueSeparators.Clear; -end; - -procedure TcxVerticalGridReportLinkCustomMultiEditorRowProducer.CreateRow; -begin - inherited; - CreateHeaders(Row); - CreateValues(Row); - if HasHeaderSeparators then CreateHeaderSeparators(Row); - if HasValueSeparators then CreateValueSeparators(Row); -end; - -procedure TcxVerticalGridReportLinkCustomMultiEditorRowProducer.CreateHeaders(AParent: TdxReportCell); -var - I: Integer; - Header: TdxReportCellImage; -begin - for I := 0 to GridRowHelper.ItemCount - 1 do - begin - Header := CreateHeaderItem(AParent, I); - Header.BoundsRect := HeaderBounds[I]; - DoInitializeHeader(Header, I); - end; -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.CreateHeaderSeparator(AParent: TdxReportCell): TdxReportCellString; -begin - Result := Formatter.GetRowHeaderSeparatorClass(GridRow).Create(AParent); - FValueSeparators.Add(Result); -end; - -procedure TcxVerticalGridReportLinkCustomMultiEditorRowProducer.CreateHeaderSeparators(AParent: TdxReportCell); -var - I: Integer; - Separator: TdxReportCellString; -begin - for I := 0 to HeaderSeparatorCount - 1 do - begin - Separator := CreateHeaderSeparator(AParent); - Separator.BoundsRect := HeaderSeparatorBounds[I]; - Separator.Text := HeaderSeparatorTexts[I]; - DoInitializeHeaderSeparator(Separator, I); - end; -end; - -procedure TcxVerticalGridReportLinkCustomMultiEditorRowProducer.CreateValues(AParent: TdxReportCell); -var - I, J: Integer; - Item: TAbstractdxReportCellData; -begin - for I := StartRecordIndex to StopRecordIndex do - for J := 0 to ItemCount - 1 do - begin - Item := CreateValueItem(AParent, J, I); - Item.BoundsRect := ValueBounds[J, I]; - DoInitializeValue(Item, J, I); - end; -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.CreateValueSeparator(AParent: TdxReportCell): TdxReportCellString; -begin - Result := Formatter.GetRowValueSeparatorClass(GridRow).Create(AParent); - FValueSeparators.Add(Result); -end; - -procedure TcxVerticalGridReportLinkCustomMultiEditorRowProducer.CreateValueSeparators(AParent: TdxReportCell); -var - I, J: Integer; - Separator: TdxReportCellString; -begin - for I := StartRecordIndex to StopRecordIndex do - for J := 0 to ValueSeparatorCount - 1 do - begin - Separator := CreateValueSeparator(AParent); - Separator.BoundsRect := ValueSeparatorBounds[J, I]; - Separator.Text := ValueSeparatorTexts[J]; - DoInitializeValueSeparator(Separator, J, I); - end; -end; - -procedure TcxVerticalGridReportLinkCustomMultiEditorRowProducer.DoInitializeHeaderSeparator(AnItem: TdxReportCellString; - AnIndex: Integer); -begin - Formatter.DoInitializeRowHeaderSeparator(GridRow, AnItem, AnIndex); - Formatter.DoReportLinkInitializeRowHeaderSeparator(GridRow, AnItem, AnIndex); -end; - -procedure TcxVerticalGridReportLinkCustomMultiEditorRowProducer.DoInitializeValueSeparator(AnItem: TdxReportCellString; - AnIndex, ARecordIndex: Integer); -begin - Formatter.DoInitializeRowValueSeparator(GridRow, AnItem, AnIndex, ARecordIndex); - Formatter.DoReportLinkInitializeRowValueSeparator(GridRow, AnItem, AnIndex, ARecordIndex); -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetHasHeaderSeparators: Boolean; -begin - Result := GridRowHelper.HasHeaderSeparators; -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetHasValueSeparators: Boolean; -begin - Result := GridRowHelper.HasValueSeparators; -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetHeaderBounds(Index: Integer): TRect; -begin - with GridRowPlace.HeaderPlaces[Index] do - Result := MakeBounds(Offset, 0, Width, RowHeight); -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetHeaderSeparator(Index: Integer): TdxReportCellString; -begin - Result := TdxReportCellString(FHeaderSeparators[Index]); -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetHeaderSeparatorBounds(Index: Integer): TRect; -begin - with GridRowPlace do - Result := MakeBounds(HeaderSeparatorPlaces[Index].Offset, 0, HeaderSeparatorPlaces[Index].Width, RowHeight); -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetHeaderSeparatorCount: Integer; -begin - Result := GridRowHelper.HeaderSeparatorCount; -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetHeaderSeparatorText(Index: Integer): string; -begin - Result := GridRowHelper.HeaderSeparatorTexts[Index]; -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetValue(CellIndex, RecordIndex: Integer): TAbstractdxReportCellData; -begin - Result := FValues[RecordIndex * GridRowHelper.ItemCount + CellIndex]; -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetValueBounds(CellIndex, RecordIndex: Integer): TRect; -begin - with GridRowPlace do - Result := MakeBounds(ValuePlaces[CellIndex, RecordIndex].Offset, 0, ValuePlaces[CellIndex, RecordIndex].Width, RowHeight); -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetValueSeparator(Index: Integer): TdxReportCellString; -begin - Result := TdxReportCellString(FValueSeparators[Index]); -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetValueSeparatorBounds(Index, RecordIndex: Integer): TRect; -begin - with GridRowPlace do - Result := MakeBounds(ValueSeparatorPlaces[Index, RecordIndex].Offset, 0, ValueSeparatorPlaces[Index, RecordIndex].Width, RowHeight); -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetValueSeparatorCount: Integer; -begin - Result := GridRowHelper.ValueSeparatorCount; -end; - -function TcxVerticalGridReportLinkCustomMultiEditorRowProducer.GetValueSeparatorText(Index: Integer): string; -begin - Result := GridRowHelper.ValueSeparatorTexts[Index]; -end; - -{ TcxVerticalGridCustomRowHelper } - -constructor TcxVerticalGridCustomRowHelper.Create(AnAdapter: TcxCustomVerticalGridAdapter); -begin - inherited Create; - FAdapter := AnAdapter; -end; - -procedure TcxVerticalGridCustomRowHelper.Initialize(ARow: TcxCustomRow); -begin - FRow := ARow; -end; - -class function TcxVerticalGridCustomRowHelper.PairClass: TClass; -begin - Result := RowClass; -end; - -class function TcxVerticalGridCustomRowHelper.ProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass; -begin - Result := TcxVerticalGridReportLinkCustomRowProducer; -end; - -class procedure TcxVerticalGridCustomRowHelper.Register; -begin - dxVerticalGridRowHelperFactory.Register(Self); -end; - -class procedure TcxVerticalGridCustomRowHelper.Unregister; -begin - dxVerticalGridRowHelperFactory.Unregister(Self); -end; - -function TcxVerticalGridCustomRowHelper.Properties(Index: Integer): TcxCustomRowProperties; -begin - Result := GetRowProperties(Index); -end; - -function TcxVerticalGridCustomRowHelper.Row: TcxCustomRow; -begin - Result := FRow; -end; - -class function TcxVerticalGridCustomRowHelper.RowClass: TcxCustomRowClass; -begin - Result := TcxCustomRow; -end; - -class function TcxVerticalGridCustomRowHelper.RowPlaceClass: TcxVerticalGridCustomRowPlaceClass; -begin - Result := TcxVerticalGridCustomRowPlace; -end; - -function TcxVerticalGridCustomRowHelper.Adapter: TcxCustomVerticalGridAdapter; -begin - Result := FAdapter; -end; - -function TcxVerticalGridCustomRowHelper.GetEditProperties(Index, RecordIndex: Integer): TcxCustomEditProperties; -begin - Result := nil; -end; - -function TcxVerticalGridCustomRowHelper.GetHasHeaderImage(Index: Integer): Boolean; -begin - Result := (Adapter.Images <> nil) and (ImageIndexes[Index] > -1) and (ImageIndexes[Index] < Adapter.Images.Count); -end; - -function TcxVerticalGridCustomRowHelper.GetHasHeaderSeparators: Boolean; -begin - Result := False; -end; - -function TcxVerticalGridCustomRowHelper.GetHasValueSeparators: Boolean; -begin - Result := False; -end; - -function TcxVerticalGridCustomRowHelper.GetHeaderAlignmentHorz(Index: Integer): TcxTextAlignX; -begin - Result := taLeft; -end; - -function TcxVerticalGridCustomRowHelper.GetHeaderAlignmentVert(Index: Integer): TcxTextAlignY; -begin - Result := taCenterY; -end; - -function TcxVerticalGridCustomRowHelper.GetHeaderCaption(Index: Integer): string; -begin - Result := ''; -end; - -function TcxVerticalGridCustomRowHelper.GetImageIndex(Index: Integer): Integer; -begin - Result := -1; -end; - -function TcxVerticalGridCustomRowHelper.GetIndentCount: Integer; -begin - Result := Row.Level + 1; -end; - -function TcxVerticalGridCustomRowHelper.GetItemCount: Integer; -begin - Result := 1; -end; - -function TcxVerticalGridCustomRowHelper.GetRecordMinWidth: Integer; -begin - Result := DefaultIndentWidth; -end; - -function TcxVerticalGridCustomRowHelper.GetRowProperties(Index: Integer): TcxCustomRowProperties; -begin - Result := CustomRow_GetProperties(Row); -end; - -function TcxVerticalGridCustomRowHelper.GetDisplayText(Index, RecordIndex: Integer): string; -begin - Result := ''; -end; - -function TcxVerticalGridCustomRowHelper.GetSeparatorsAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxVerticalGridCustomRowHelper.GetValue(Index, RecordIndex: Integer): TcxEditValue; -begin - Result := ''; -end; - -{ TcxVerticalGridCategoryRowHelper } - -class function TcxVerticalGridCategoryRowHelper.ProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass; -begin - Result := TcxVerticalGridReportLinkCategoryRowProducer; -end; - -function TcxVerticalGridCategoryRowHelper.Properties(Index: Integer): TcxCaptionRowProperties; -begin - Result := Row.Properties; -end; - -function TcxVerticalGridCategoryRowHelper.Row: TcxCategoryRow; -begin - Result := inherited Row as TcxCategoryRow; -end; - -class function TcxVerticalGridCategoryRowHelper.RowClass: TcxCustomRowClass; -begin - Result := TcxCategoryRow; -end; - -class function TcxVerticalGridCategoryRowHelper.RowPlaceClass: TcxVerticalGridCustomRowPlaceClass; -begin - Result := TcxVerticalGridCategoryRowPlace; -end; - -function TcxVerticalGridCategoryRowHelper.GetCaption: string; -begin - Result := HeaderCaptions[0]; -end; - -function TcxVerticalGridCategoryRowHelper.GetHeaderAlignmentHorz(Index: Integer): TcxTextAlignX; -begin - Result := TextAlignXMap[Properties(Index).HeaderAlignmentHorz]; -end; - -function TcxVerticalGridCategoryRowHelper.GetHeaderAlignmentVert(Index: Integer): TcxTextAlignY; -begin - Result := TextAlignYMap[Properties(Index).HeaderAlignmentVert]; -end; - -function TcxVerticalGridCategoryRowHelper.GetHeaderCaption(Index: Integer): string; -begin - Result := Properties(Index).Caption; -end; - -function TcxVerticalGridCategoryRowHelper.GetImageIndex(Index: Integer): Integer; -begin - Result := Properties(Index).ImageIndex; -end; - -{ TcxVerticalGridCustomEditorRowHelper } - -class function TcxVerticalGridCustomEditorRowHelper.ProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass; -begin - Result := TcxVerticalGridReportLinkCustomEditorRowProducer; -end; - -function TcxVerticalGridCustomEditorRowHelper.Properties(Index: Integer): TcxCustomEditorRowProperties; -begin - Result := TcxCustomEditorRowProperties(inherited Properties(Index)); -end; - -function TcxVerticalGridCustomEditorRowHelper.Row: TcxCustomEditorRow; -begin - Result := inherited Row as TcxCustomEditorRow; -end; - -class function TcxVerticalGridCustomEditorRowHelper.RowClass: TcxCustomRowClass; -begin - Result := TcxCustomEditorRow; -end; - -class function TcxVerticalGridCustomEditorRowHelper.RowPlaceClass: TcxVerticalGridCustomRowPlaceClass; -begin - Result := TcxVerticalGridCustomEditorRowPlace; -end; - -function TcxVerticalGridCustomEditorRowHelper.GetEditProperties(Index, RecordIndex: Integer): TcxCustomEditProperties; -begin - Result := TcxCustomEditorRowProperties(Properties(Index)).DisplayEditProperties[RecordIndex]; -end; - -function TcxVerticalGridCustomEditorRowHelper.GetHeaderAlignmentHorz(Index: Integer): TcxTextAlignX; -begin - Result := TextAlignXMap[Properties(Index).HeaderAlignmentHorz]; -end; - -function TcxVerticalGridCustomEditorRowHelper.GetHeaderAlignmentVert(Index: Integer): TcxTextAlignY; -begin - Result := TextAlignYMap[Properties(Index).HeaderAlignmentVert]; -end; - -function TcxVerticalGridCustomEditorRowHelper.GetHeaderCaption(Index: Integer): string; -begin - Result := Properties(Index).Caption; -end; - -function TcxVerticalGridCustomEditorRowHelper.GetImageIndex(Index: Integer): Integer; -begin - Result := Properties(Index).ImageIndex; -end; - -function TcxVerticalGridCustomEditorRowHelper.GetDisplayText(Index, RecordIndex: Integer): string; -begin - Result := Properties(Index).DisplayTexts[RecordIndex]; -end; - -function TcxVerticalGridCustomEditorRowHelper.GetRecordMinWidth: Integer; -begin - Result := Adapter.ValueMinWidth; -end; - -function TcxVerticalGridCustomEditorRowHelper.GetValue(Index, RecordIndex: Integer): TcxEditValue; -begin - Result := Properties(Index).Values[RecordIndex]; -end; - -{ TcxVerticalGridEditorRowHelper } - -function TcxVerticalGridEditorRowHelper.Properties(Index: Integer): TcxEditorRowProperties; -begin - Result := Row.Properties; -end; - -function TcxVerticalGridEditorRowHelper.Row: TcxEditorRow; -begin - Result := inherited Row as TcxEditorRow; -end; - -class function TcxVerticalGridEditorRowHelper.RowClass: TcxCustomRowClass; -begin - Result := TcxEditorRow; -end; - -{ TcxVerticalGridDBEditorRowHelper } - -function TcxVerticalGridDBEditorRowHelper.Properties(Index: Integer): TcxDBEditorRowProperties; -begin - Result := Row.Properties; -end; - -function TcxVerticalGridDBEditorRowHelper.Row: TcxDBEditorRow; -begin - Result := inherited Row as TcxDBEditorRow; -end; - -class function TcxVerticalGridDBEditorRowHelper.RowClass: TcxCustomRowClass; -begin - Result := TcxDBEditorRow; -end; - -{ TcxVerticalGridCustomMultiEditorRowHelper } - -class function TcxVerticalGridCustomMultiEditorRowHelper.ProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass; -begin - Result := TcxVerticalGridReportLinkCustomMultiEditorRowProducer; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.Properties(Index: Integer): TcxEditorRowItemProperties; -begin - Result := TcxEditorRowItemProperties(GetRowProperties(Index)); -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.RootProperties: TcxMultiEditorRowProperties; -begin - Result := CustomMultiEditorRow_GetProperties(Row); -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.Row: TcxCustomMultiEditorRow; -begin - Result := inherited Row as TcxCustomMultiEditorRow; -end; - -class function TcxVerticalGridCustomMultiEditorRowHelper.RowClass: TcxCustomRowClass; -begin - Result := TcxCustomMultiEditorRow; -end; - -class function TcxVerticalGridCustomMultiEditorRowHelper.RowPlaceClass: TcxVerticalGridCustomRowPlaceClass; -begin - Result := TcxVerticalGridCustomMultiEditorRowPlace; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetEditProperties(Index, RecordIndex: Integer): TcxCustomEditProperties; -begin - Result := TcxCustomEditorRowProperties(Properties(Index)).DisplayEditProperties[RecordIndex]; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetHasHeaderSeparators: Boolean; -begin - Result := RootProperties.SeparatorKind = skString; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetHasValueSeparators: Boolean; -begin - Result := RootProperties.SeparatorKind = skString; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetHeaderAlignmentHorz(Index: Integer): TcxTextAlignX; -begin - Result := TextAlignXMap[Properties(Index).HeaderAlignmentHorz]; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetHeaderAlignmentVert(Index: Integer): TcxTextAlignY; -begin - Result := TextAlignYMap[Properties(Index).HeaderAlignmentVert]; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetHeaderCaption(Index: Integer): string; -begin - Result := Properties(Index).Caption; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetImageIndex(Index: Integer): Integer; -begin - Result := Properties(Index).ImageIndex; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetItemCount: Integer; -begin - Result := RootProperties.Editors.Count; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetRecordMinWidth: Integer; -begin - Result := Adapter.ValueMinWidth * ItemCount; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetRowProperties(Index: Integer): TcxCustomRowProperties; -begin - Result := RootProperties.Editors[Index]; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetDisplayText(Index, RecordIndex: Integer): string; -begin - Result := Properties(Index).DisplayTexts[RecordIndex]; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetHeaderSeparatorCount: Integer; -begin - if HasValueSeparators then - Result := ItemCount - 1 - else - Result := 0; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetHeaderSeparatorText(Index: Integer): string; -begin - Result := RootProperties.SeparatorString; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetSeparatorsAlignmentVert: TcxAlignmentVert; -begin - Result := RootProperties.SeparatorAlignmentVert; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetValue(Index, RecordIndex: Integer): TcxEditValue; -begin - Result := Properties(Index).Values[RecordIndex]; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetValueSeparatorCount: Integer; -begin - if HasValueSeparators then - Result := ItemCount - 1 - else - Result := 0; -end; - -function TcxVerticalGridCustomMultiEditorRowHelper.GetValueSeparatorText(Index: Integer): string; -begin - Result := RootProperties.SeparatorString; -end; - -{ TcxVerticalGridRowHelperCache } - -constructor TcxVerticalGridRowHelperCache.Create(AnAdapter: TcxCustomVerticalGridAdapter); -begin - inherited Create; - FAdapter := AnAdapter; -end; - -function TcxVerticalGridRowHelperCache.IndexOf(Row: TcxCustomRow): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].RowClass = Row.ClassType then Exit; - - Result := Add(dxVerticalGridRowHelperFactory.HelperClasses[Row].Create(Adapter)); -end; - -function TcxVerticalGridRowHelperCache.GetHelper(Row: TcxCustomRow): TcxVerticalGridCustomRowHelper; -begin - Result := Items[IndexOf(Row)]; - Result.Initialize(Row); -end; - -function TcxVerticalGridRowHelperCache.GetItem(Index: Integer): TcxVerticalGridCustomRowHelper; -begin - Result := TcxVerticalGridCustomRowHelper(inherited Items[Index]); -end; - -{ TcxVerticalGridReportLinkProducerCache } - -constructor TcxVerticalGridReportLinkProducerCache.Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TcxVerticalGridReportLinkProducerCache.IndexOf(AProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass): Integer; -begin - for Result := 0 to Count - 1 do - if Items[Result].ClassType = AProducerClass then Exit; - - Result := Add(AProducerClass.Create(Builder)); -end; - -function TcxVerticalGridReportLinkProducerCache.GetProducer(ProducerClass: TcxVerticalGridReportLinkCustomRowProducerClass): TcxVerticalGridReportLinkCustomRowProducer; -begin - Result := Items[IndexOf(ProducerClass)]; -end; - -function TcxVerticalGridReportLinkProducerCache.GetItem(Index: Integer): TcxVerticalGridReportLinkCustomRowProducer; -begin - Result := TcxVerticalGridReportLinkCustomRowProducer(inherited Items[Index]); -end; - -{ TcxCustomVerticalGridReportLinkBuilder } - -constructor TcxCustomVerticalGridReportLinkBuilder.Create(AReportLink: TcxCustomVerticalGridReportLink); -begin - inherited Create; - FReportLink := AReportLink; - FAdapter := AdapterClass.Create(Self); - FFormatter := FormatterClass.Create(Self); - FProducerCache := TcxVerticalGridReportLinkProducerCache.Create(Self); - FReportRows := TList.Create; -end; - -destructor TcxCustomVerticalGridReportLinkBuilder.Destroy; -begin - FreeAndNil(FWrapSeparatorProducer); - FreeAndNil(FReportRows); - FreeAndNil(FProducerCache); - FreeAndNil(FFormatter); - FreeAndNil(FAdapter); - inherited; -end; - -procedure TcxCustomVerticalGridReportLinkBuilder.Build; -begin - BeforeBuilding; - try - DoBuild; - finally - AfterBuilding; - end; -end; - -procedure TcxCustomVerticalGridReportLinkBuilder.Progress(const APercentDone: Double); -begin - ReportLink.DoProgress(APercentDone); -end; - -function TcxCustomVerticalGridReportLinkBuilder.Adapter: TcxCustomVerticalGridAdapter; -begin - Result := FAdapter; -end; - -class function TcxCustomVerticalGridReportLinkBuilder.AdapterClass: TcxCustomVerticalGridAdapterClass; -begin - Result := TcxCustomVerticalGridAdapter; -end; - -function TcxCustomVerticalGridReportLinkBuilder.Formatter: TcxCustomVerticalGridReportLinkFormatter; -begin - Result := FFormatter; -end; - -class function TcxCustomVerticalGridReportLinkBuilder.FormatterClass: TcxCustomVerticalGridReportLinkFormatterClass; -begin - Result := TcxCustomVerticalGridReportLinkFormatter; -end; - -procedure TcxCustomVerticalGridReportLinkBuilder.AddReportRow(ARow: TdxReportCell); -begin - if ARow.Parent = ReportLink.ReportCells.Cells then - FReportRows.Add(ARow); -end; - -procedure TcxCustomVerticalGridReportLinkBuilder.AfterBuilding; -begin - Formatter.AfterBuilding; - Adapter.AfterBuilding; -end; - -procedure TcxCustomVerticalGridReportLinkBuilder.BeforeBuilding; -begin - Adapter.BeforeBuilding; - Formatter.BeforeBuilding; -end; - -procedure TcxCustomVerticalGridReportLinkBuilder.CreateRow(ARow: TcxCustomRow; AWrapIndex: Integer); -var - ReportRow: TdxReportCell; -begin - ReportRow := GetRowProducer(ARow).Produce(ReportLink.HostInfo, ARow, AWrapIndex); - AddReportRow(ReportRow); -end; - -procedure TcxCustomVerticalGridReportLinkBuilder.CreateRows; -var - I, J: Integer; - Row: TcxCustomRow; -begin - for I := 0 to Formatter.WrapCount - 1 do - begin - for J := 0 to Formatter.RowCount - 1 do - begin - Row := Formatter.Rows[J]; - CreateRow(Row, I); - Progress(100 * (I * Formatter.RowCount + J) / (Formatter.WrapCount * Formatter.RowCount)); - if IsAborted then Break; - end; - if IsAborted then Break; - if AreWrapSeparatorsNeeded and (I < Formatter.WrapCount - 1) then - CreateWrapSeparator(I); - end; -end; - -procedure TcxCustomVerticalGridReportLinkBuilder.CreateWrapSeparator(AWrapIndex: Integer); -var - ReportRow: TdxReportCell; -begin - ReportRow := GetWrapSeparatorProducer(AWrapIndex).Produce(ReportLink.HostInfo, AWrapIndex); - AddReportRow(ReportRow); -end; - -function TcxCustomVerticalGridReportLinkBuilder.GetRowProducer(ARow: TcxCustomRow): TcxVerticalGridReportLinkCustomRowProducer; -begin - Result := ProducerCache[GetRowProducerClass(ARow)] as TcxVerticalGridReportLinkCustomRowProducer; -end; - -function TcxCustomVerticalGridReportLinkBuilder.GetRowProducerClass(ARow: TcxCustomRow): TcxVerticalGridReportLinkCustomRowProducerClass; -begin - Result := Formatter.RowHelpers[ARow].ProducerClass; -end; - -function TcxCustomVerticalGridReportLinkBuilder.GetWrapSeparatorProducer(AWrapIndex: Integer): TcxVerticalGridReportLinkWrapSeparatorProducer; -begin - if FWrapSeparatorProducer = nil then - FWrapSeparatorProducer := GetWrapSeparatorProducerClass.Create(Self); - Result := FWrapSeparatorProducer; -end; - -function TcxCustomVerticalGridReportLinkBuilder.GetWrapSeparatorProducerClass: TcxVerticalGridReportLinkWrapSeparatorProducerClass; -begin - Result := TcxVerticalGridReportLinkWrapSeparatorProducer; -end; - -function TcxCustomVerticalGridReportLinkBuilder.AreWrapSeparatorsNeeded: Boolean; -begin - with ReportLink.OptionsPagination do - Result := ByRows or (ByWrapping and not OneWrappingPerPage); -end; - -procedure TcxCustomVerticalGridReportLinkBuilder.DoBuild; -begin - CreateRows; -end; - -function TcxCustomVerticalGridReportLinkBuilder.IsAborted: Boolean; -begin - Result := ReportLink.AbortBuilding; -end; - -function TcxCustomVerticalGridReportLinkBuilder.GetAvailableSiteWidth: Integer; -var - ControllerIntf: IdxReportLinkController; -begin - if ReportLink.IsAggregated and - Supports(TObject(ReportLink.Controller), IdxReportLinkController, ControllerIntf) then - with ControllerIntf.GetControlSiteBounds(ReportLink.VerticalGrid) do - Result := Bottom - Top - 1 - else - with ReportLink.RealPrinterPage.PaintRectPixels do - Result := Right - Left - 1; - Result := MulDiv(Result, 100, ReportLink.GetRealScaleFactor); -end; - -function TcxCustomVerticalGridReportLinkBuilder.GetAvailableWidth: Integer; -begin - if Formatter.AutoWidth then - Result := GetAvailableSiteWidth - else - with VerticalGrid.ClientBounds do - Result := Right - Left; -end; - -function TcxCustomVerticalGridReportLinkBuilder.GetHost: TdxReportCell; -begin - Result := ReportLink.ReportCells.Cells; -end; - -function TcxCustomVerticalGridReportLinkBuilder.GetReportCells: TdxReportCells; -begin - Result := ReportLink.ReportCells; -end; - -function TcxCustomVerticalGridReportLinkBuilder.GetReportRow(Index: Integer): TdxReportCell; -begin - Result := TdxReportCell(FReportRows[Index]); -end; - -function TcxCustomVerticalGridReportLinkBuilder.GetReportRowCount: Integer; -begin - Result := FReportRows.Count; -end; - -function TcxCustomVerticalGridReportLinkBuilder.GetVerticalGrid: TcxCustomVerticalGrid; -begin - Result := ReportLink.VerticalGrid; -end; - -{ TcxVerticalGridReportLinkBuilderHandler } - -constructor TcxVerticalGridReportLinkBuilderHandler.Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); -begin - inherited Create; - FBuilder := ABuilder; -end; - -function TcxVerticalGridReportLinkBuilderHandler.Builder: TcxCustomVerticalGridReportLinkBuilder; -begin - Result := FBuilder; -end; - -function TcxVerticalGridReportLinkBuilderHandler.GetReportLink: TcxCustomVerticalGridReportLink; -begin - Result := Builder.ReportLink; -end; - -{ TcxCustomVerticalGridAdapter } - -constructor TcxCustomVerticalGridAdapter.Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); -begin - inherited; - FHelperCache := TcxVerticalGridRowHelperCache.Create(Self); -end; - -destructor TcxCustomVerticalGridAdapter.Destroy; -begin - FreeAndNil(FHelperCache); - inherited; -end; - -procedure TcxCustomVerticalGridAdapter.AfterBuilding; -begin -end; - -procedure TcxCustomVerticalGridAdapter.BeforeBuilding; -begin -end; - -function TcxCustomVerticalGridAdapter.GetInterRecordsSpace: Integer; -begin - Result := 0; -end; - -function TcxCustomVerticalGridAdapter.GetProperties(ARow: TcxCustomRow; - AnIndex, ARecordIndex: Integer): TcxCustomEditProperties; -begin - Result := Helpers[ARow].GetEditProperties(AnIndex, ARecordIndex); -end; - -function TcxCustomVerticalGridAdapter.GetPropertiesClass(ARow: TcxCustomRow; - AnIndex, ARecordIndex: Integer): TcxCustomEditPropertiesClass; -begin - Result := TcxCustomEditPropertiesClass(GetProperties(ARow, AnIndex, ARecordIndex).ClassType); -end; - -function TcxCustomVerticalGridAdapter.GetCategoryViewParams(ARow: TcxCustomRow): TcxViewParams; -begin - Result := Styles.GetCategoryParams(ARow); - // v3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TcxCustomVerticalGridAdapter.GetContentViewParams(ARow: TcxCustomRow; - AnIndex, ARecordIndex: Integer): TcxViewParams; -var - Properties: TcxCustomEditorRowProperties; -begin - Properties := TcxCustomEditorRowProperties(Helpers[ARow].GetRowProperties(AnIndex)); - Result := Styles.GetContentParams(Properties, False, ARecordIndex); - // v3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TcxCustomVerticalGridAdapter.GetHeaderViewParams(ARow: TcxCustomRow): TcxViewParams; -begin - Result := Styles.GetHeaderParams(ARow); - // v3.2 - if Result.Color = clWindow then - Result.Color := dxPSCore.dxDefaultContentColor; -end; - -function TcxCustomVerticalGridAdapter.GetImageViewParams(ARow: TcxCustomRow): TcxViewParams; -begin - Result := GetHeaderViewParams(ARow); -end; - -function TcxCustomVerticalGridAdapter.GetIndentViewParams(ARow: TcxCustomRow): TcxViewParams; -begin - if ARow is TcxCategoryRow then - Result := GetCategoryViewParams(ARow) - else - Result := GetHeaderViewParams(ARow); -end; - -function TcxCustomVerticalGridAdapter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - Result := Styles.GetBitmap(Index); -end; - -function TcxCustomVerticalGridAdapter.GetRowIndentBackgroundBitmapIndex(ARow: TcxCustomRow; - ALevel: Integer): Integer; -const - BackgroundBitmapIndexes: array[Boolean] of Integer = (vgs_Header, vgs_Category); -begin - Result := BackgroundBitmapIndexes[GetRowParentAtLevel(ARow, ALevel) is TcxCategoryRow]; -end; - -function TcxCustomVerticalGridAdapter.HasBackgroundBitmap(Index: Integer): Boolean; -begin - Result := GetBackgroundBitmap(Index) <> nil; -end; - -procedure TcxCustomVerticalGridAdapter.FullExpand; -begin - VerticalGrid.FullExpand; -end; - -function TcxCustomVerticalGridAdapter.GetImageHeight(ARow: TcxCustomRow; AnIndex: Integer): Integer; -begin - if HasRowImage(ARow, AnIndex) then - Result := 1 + Images.Height + 1 - else - Result := 0; -end; - -function TcxCustomVerticalGridAdapter.GetImageWidth(ARow: TcxCustomRow; AnIndex: Integer): Integer; -begin - if HasRowImage(ARow, AnIndex) then - Result := 1 + Images.Width + 1 - else - Result := 0; -end; - -function TcxCustomVerticalGridAdapter.GetRowParentAtLevel(ARow: TcxCustomRow; - ALevel: Integer): TcxCustomRow; -begin - Result := ARow; - while ALevel > 0 do - begin - Result := Result.Parent; - Dec(ALevel); - end; -end; - -function TcxCustomVerticalGridAdapter.HasCategoryRowAsParentAtLevel(ARow: TcxCustomRow; - ALevel: Integer; ACheckFollow: Boolean): Boolean; -begin - while ALevel > 0 do - begin - ARow := ARow.Parent; - if ACheckFollow and (ARow is TcxCategoryRow) then - Break; - Dec(ALevel); - end; - Result := ARow is TcxCategoryRow; -end; - -function TcxCustomVerticalGridAdapter.HasRowImage(ARow: TcxCustomRow; AnIndex: Integer): Boolean; -var - Helper: TcxVerticalGridCustomRowHelper; -begin - Result := Images <> nil; - if Result and (ARow <> nil) and not MakeSpaceForEmptyImage then - begin - Helper := Helpers[ARow]; - Result := (Helper.ImageIndexes[AnIndex] > -1) and (Helper.ImageIndexes[AnIndex] < Images.Count); - end; -end; - -function TcxCustomVerticalGridAdapter.IsRowLastChildAtLevel(ARow: TcxCustomRow; ALevel: Integer): Boolean; -begin - while (ALevel > 0) and ARow.IsLastVisible do - begin - ARow := ARow.Parent; - Dec(ALevel); - end; - Result := ARow.IsLastVisible; -end; - -function TcxCustomVerticalGridAdapter.IsRowVisible(ARow: TcxCustomRow): Boolean; -begin - Result := VerticalGrid.IsRowVisible(ARow); -end; - -function TcxCustomVerticalGridAdapter.GetCellAutoHeight: Boolean; -begin - Result := OptionsView.CellAutoHeight; -end; - -function TcxCustomVerticalGridAdapter.GetCellEndEllipsis: Boolean; -begin - Result := OptionsView.CellEndEllipsis; -end; - -function TcxCustomVerticalGridAdapter.GetCellMultiline: Boolean; -begin - Result := OptionsView.CellAutoHeight; -end; - -function TcxCustomVerticalGridAdapter.GetDataController: TcxCustomDataController; -begin - Result := CustomVerticalGrid_GetDataController(VerticalGrid); -end; - -function TcxCustomVerticalGridAdapter.GetDefaultRowHeight: Integer; -begin - Result := OptionsView.RowHeight; -end; - -function TcxCustomVerticalGridAdapter.GetFirstRecordIndex: Integer; -begin - if VerticalGrid.ViewInfo <> nil then - Result := VerticalGrid.ViewInfo.FirstVisibleRecordIndex - else - Result := 0; -end; - -function TcxCustomVerticalGridAdapter.GetGridLinesColor: TColor; -begin - Result := OptionsView.GridLineColor; -end; - -function TcxCustomVerticalGridAdapter.GetHeaderAvailableWidth(Row: TcxCustomRow): Integer; -begin - Result := HeaderWidth - IndentAreas[Row]; -end; - -function TcxCustomVerticalGridAdapter.GetHeaderMinWidth: Integer; -begin - Result := OptionsView.RowHeaderMinWidth; -end; - -function TcxCustomVerticalGridAdapter.GetHeaderWidth: Integer; -begin - Result := OptionsView.RowHeaderWidth; -end; - -function TcxCustomVerticalGridAdapter.GetHelper(Row: TcxCustomRow): TcxVerticalGridCustomRowHelper; -begin - Result := FHelperCache[Row]; -end; - -function TcxCustomVerticalGridAdapter.GetImages: TCustomImageList; -begin - Result := VerticalGrid.Images; -end; - -function TcxCustomVerticalGridAdapter.GetIndentArea(Row: TcxCustomRow): Integer; -begin - Result := IndentCounts[Row] * IndentWidth; -end; - -function TcxCustomVerticalGridAdapter.GetIndentCount(Row: TcxCustomRow): Integer; -begin - Result := Helpers[Row].IndentCount; -end; - -function TcxCustomVerticalGridAdapter.GetIndentWidth: Integer; -begin - Result := GetImageWidth(nil, 0); - if Result = 0 then - Result := DefaultIndentWidth; -end; - -function TcxCustomVerticalGridAdapter.GetMakeSpaceForEmptyImage: Boolean; -begin - Result := OptionsView.ShowEmptyRowImage; -end; - -function TcxCustomVerticalGridAdapter.GetOptionsView: TcxvgOptionsView; -begin - Result := VerticalGrid.OptionsView; -end; - -function TcxCustomVerticalGridAdapter.GetPaintStyle: TcxvgPaintStyle; -begin - Result := OptionsView.PaintStyle; -end; - -function TcxCustomVerticalGridAdapter.GetRecordCount: Integer; -begin - Result := CustomVerticalGrid_GetRecordCount(VerticalGrid); -end; - -function TcxCustomVerticalGridAdapter.GetRecordMinWidth(RecordIndex: Integer): Integer; -var - I, V: Integer; - Row: TcxCustomRow; -begin - Result := 0; - for I := 0 to RowCount - 1 do - begin - Row := Rows[I]; - if IsRowVisible(Row) then - begin - V := Helpers[Row].RecordMinWidth; - if Result < V then Result := V; - end; - end; -end; - -function TcxCustomVerticalGridAdapter.GetRecordWidth(RecordCount: Integer): Integer; -begin - // v3.1 - if LayoutStyle in [lsMultiRecordView, lsBandsView] then - //if RecordCount <> 1 then - Result := OptionsView.ValueWidth - else - Result := VerticalGrid.ClientWidth - HeaderWidth; -end; - -function TcxCustomVerticalGridAdapter.GetRow(Index: Integer): TcxCustomRow; -begin - Result := VerticalGrid.Rows[Index]; -end; - -function TcxCustomVerticalGridAdapter.GetRowCount: Integer; -begin - Result := VerticalGrid.Rows.Count; -end; - -function TcxCustomVerticalGridAdapter.GetRowHeight(Row: TcxCustomRow): Integer; -begin - Result := VerticalGrid.ViewInfo.CalcRowHeight(Row); -end; - -function TcxCustomVerticalGridAdapter.GetShowHeaders: Boolean; -begin - Result := OptionsView.ShowHeaders; -end; - -function TcxCustomVerticalGridAdapter.GetShowHorzGridLines: Boolean; -begin - Result := OptionsView.GridLines in [vglBoth, vglHorizontal]; -end; - -function TcxCustomVerticalGridAdapter.GetShowVertGridLines: Boolean; -begin - Result := OptionsView.GridLines in [vglBoth, vglVertical]; -end; - -function TcxCustomVerticalGridAdapter.GetStyles: TcxVerticalGridStyles; -begin - Result := VerticalGrid.Styles; -end; - -function TcxCustomVerticalGridAdapter.GetValueMinWidth: Integer; -begin - Result := OptionsView.ValueMinWidth; -end; - -function TcxCustomVerticalGridAdapter.GetVerticalGrid: TcxCustomVerticalGrid; -begin - Result := Builder.VerticalGrid; -end; - -{ TcxCustomVerticalGridReportLinkFormatter } - -constructor TcxCustomVerticalGridReportLinkFormatter.Create(ABuilder: TcxCustomVerticalGridReportLinkBuilder); -begin - inherited; - FFont := TFont.Create; - FHeaderWidth := -1; - FInterRecordsSpace := -1; - FLookAndFeelItems := TList.Create; - FRecordWidths := TList.Create; - FRowHeights := TList.Create; - FRowPlaces := TList.Create; - FRows := TList.Create; - FTransparentColor := dxPSCore.dxDefaultContentColor; - FViewWidths := TList.Create; - FWrappedRecordStartIndexes := TList.Create; -end; - -destructor TcxCustomVerticalGridReportLinkFormatter.Destroy; -begin - FreeAndNilRowPlaces; - FreeAndNil(FViewWidths); - FreeAndNil(FWrappedRecordStartIndexes); - FreeAndNil(FRows); - FreeAndNil(FRowHeights); - FreeAndNil(FRecordWidths); - FreeAndNil(FLookAndFeelItems); - FreeAndNil(FFont); - inherited; -end; - -function TcxCustomVerticalGridReportLinkFormatter.Adapter: TcxCustomVerticalGridAdapter; -begin - Result := Builder.Adapter; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeHost(AHost: TdxReportCell); -begin - AHost.CellSides := []; - AHost.Transparent := True; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeRowImage(ARow: TcxCustomRow; - AnItem: TdxReportCellGraphic; AnIndex: Integer); -begin - SetViewParams(AnItem, GetRowImageViewParams(ARow, AnIndex)); - if HasBackgroundBitmap(vgs_Content) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(vgs_Content); - - AnItem.DrawMode := gdmCenter; - AnItem.ImageIndex := RowHelpers[ARow].ImageIndexes[AnIndex]; - AnItem.ImageList := Adapter.Images; - AnItem.ImageTransparent := True; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowImageCellSides(ARow: TcxCustomRow): TdxCellSides; -begin - Result := csTopBottom; - Result := FixupHorzCellSides(ARow, Result); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowImageClass: TdxReportCellGraphicClass; -begin - Result := TdxReportCellGraphic; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowImageViewParams(ARow: TcxCustomRow; - AnIndex: Integer): TdxReportItemViewParams; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetHeaderParams(ARow, Result.NativeParams) - else - Result.NativeParams := Adapter.GetImageViewParams(ARow); - - Result.CellSides := GetRowImageCellSides(ARow); - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); // ReportLink.FixedTransparent; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeRowIndent(ARow: TcxCustomRow; - AnItem: TdxReportCellExpandButton; AnIndex, AnIndentCount: Integer); -var - BackgroundBitmapIndex: Integer; -begin - SetViewParams(AnItem, GetRowIndentViewParams(ARow, AnIndex, AnIndentCount)); - BackgroundBitmapIndex := Adapter.GetRowIndentBackgroundBitmapIndex(ARow, AnIndentCount - AnIndex - 1); - if HasBackgroundBitmap(BackgroundBitmapIndex) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(BackgroundBitmapIndex); - - AnItem.Data := MakeCustomDrawCodeData(cxVerticalGridRowIndentID, AnIndex, 0); - AnItem.ShowButton := (AnIndex = AnIndentCount - 1) and OptionsView.ExpandButtons and ARow.HasChildren; - if AnItem.ShowButton then - DoInitializeExpandButton(ARow, AnItem, AnIndex, AnIndentCount); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeExpandButton(ARow: TcxCustomRow; - AnItem: TdxReportCellExpandButton; AnIndex, AnIndentCount: Integer); -begin - with AnItem do - begin - ButtonBorder3D := ReportLink.Effects3D; - ButtonBorder3DSoft := ReportLink.Soft3D; - ButtonExpanded := ARow.Expanded; - ButtonInteriorColor := ExpandButtonColors[ARow]; - ButtonSize := ExpandButtonSize; - ButtonTransparent := False;//IsColorTransparent(ButtonInteriorColor); - end; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoReportLinkInitializeRowIndent(ARow: TcxCustomRow; - AnItem: TdxReportCellExpandButton; AnIndex: Integer); -begin - ReportLink.DoInitializeRowIndentCell(ARow, AnIndex, AnItem); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowIndentCellSides(ARow: TcxCustomRow; - AnIndex, AnIndentCount: Integer): TdxCellSides; -var - Level: Integer; - NextRow: TcxCustomRow; -begin - if Adapter.PaintStyle = psdotNet then - begin - Result := []; - Level := AnIndentCount - AnIndex - 1; - - if (ARow is TcxCategoryRow) and ((AnIndex = AnIndentCount - 1) or - ((AnIndex = AnIndentCount - 2) and not Adapter.HasCategoryRowAsParentAtLevel(ARow, Level, False))) then - Include(Result, csTop); - if not (ARow is TcxCategoryRow) and not Adapter.HasCategoryRowAsParentAtLevel(ARow, Level, True) then - Result := Result + csTopBottom; - if not (ARow is TcxCategoryRow) and Adapter.IsRowLastChildAtLevel(ARow, Level) and - Adapter.HasCategoryRowAsParentAtLevel(ARow, Level, False) then - Include(Result, csBottom); - if IsLastRow(ARow) then - Include(Result, csBottom); - - if (AnIndex = 0) or ((ARow is TcxCategoryRow) and (AnIndex = AnIndentCount - 1)) then - Include(Result, csLeft); - if (AnIndex <> AnIndentCount - 1) and Adapter.HasCategoryRowAsParentAtLevel(ARow, Level, False) then - Result := Result + csLeftRight; - if AnIndex = AnIndentCount - 1 then - begin - if (ARow is TcxCategoryRow) and ARow.HasChildren then - begin - NextRow := GetNextRow(ARow); - if (NextRow <> nil) and (NextRow.Level > ARow.Level) then - Result := Result - [csBottom, csRight]; - end; - if not (ARow is TcxCategoryRow) then - Include(Result, csLeft); - end; - end - else - begin - Result := csTopBottom; - if AnIndex = 0 then Include(Result, csLeft); - end; - - Result := FixupHorzCellSides(ARow, Result); - if not ShowVertGridLines then - begin - Exclude(Result, csRight); - if AnIndex <> 0 then Exclude(Result, csLeft); - end; - if (AnIndex = 0) and not ShowBorders then - Exclude(Result, csLeft); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowIndentClass: TdxReportCellExpandButtonClass; -begin - Result := TdxReportCellExpandButton; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowIndentViewParams(ARow: TcxCustomRow; - AnIndex, AnIndentCount: Integer): TdxReportItemViewParams; -var - ParentRow: TcxCustomRow; -begin - ParentRow := Adapter.GetRowParentAtLevel(ARow, AnIndentCount - AnIndex - 1); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetIndentParams(ParentRow, Result.NativeParams) - else - Result.NativeParams := Adapter.GetIndentViewParams(ParentRow); - - Result.CellSides := GetRowIndentCellSides(ARow, AnIndex, AnIndentCount); - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.FixedTransparent -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeCategoryRow(ARow: TcxCategoryRow; - AnItem: TdxReportCellImage); -var - Helper: TcxVerticalGridCustomRowHelper; -begin - SetViewParams(AnItem, GetCategoryRowViewParams(ARow)); - if HasBackgroundBitmap(vgs_Category) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(vgs_Category); - - Helper := RowHelpers[ARow]; - with AnItem as TdxReportCellImage do - begin - Data := MakeCustomDrawCodeData(cxVerticalGridCategoryRowID, 0, 0); - EndEllipsis := Adapter.CellEndEllipsis and not ReportLink.OptionsSize.BestFit; - if Helper.HasHeaderImages[0] then - begin - ImageIndex := Helper.ImageIndexes[0]; - ImageList := Adapter.Images; - ImageLayout := ilImageCenterLeft; - end; - Multiline := False; - Text := Helper.HeaderCaptions[0]; - TextAlignX := Helper.HeaderAlignmentHorzs[0]; - TextAlignY := Helper.HeaderAlignmentVerts[0]; - end; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeRowReportRow(ARow: TcxCustomRow; - AReportRow: TdxReportCell); -begin - AReportRow.CellSides := []; - AReportRow.Data := Integer(ARow); - AReportRow.Transparent := True; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeRowHeader(ARow: TcxCustomRow; - AnItem: TdxReportCellImage; AnIndex: Integer); -var - Helper: TcxVerticalGridCustomRowHelper; -begin - SetViewParams(AnItem, GetRowHeaderViewParams(ARow, AnIndex)); - if HasBackgroundBitmap(vgs_Header) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(vgs_Header); - - Helper := RowHelpers[ARow]; - with AnItem as TdxReportCellImage do - begin - Data := MakeCustomDrawCodeData(cxVerticalGridRowHeaderID, AnIndex, 0); - EndEllipsis := Adapter.CellEndEllipsis and not ReportLink.OptionsSize.BestFit; - ImageIndex := Helper.ImageIndexes[AnIndex]; - ImageList := Adapter.Images; - ImageLayout := ilImageCenterLeft; - MakeSpaceForEmptyImage := Adapter.MakeSpaceForEmptyImage; - Multiline := False; - Text := Helper.HeaderCaptions[AnIndex]; - TextAlignX := Helper.HeaderAlignmentHorzs[AnIndex]; - TextAlignY := Helper.HeaderAlignmentVerts[AnIndex]; - end; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeRowValue(ARow: TcxCustomRow; - AnItem: TAbstractdxReportCellData; AnIndex, ARecordIndex: Integer); -var - Properties: TcxCustomEditProperties; - ViewParams: TdxReportItemViewParams; - CellValue: TcxEditValue; -begin - Properties := Adapter.GetProperties(ARow, AnIndex, ARecordIndex); - ViewParams := GetRowValueViewParams(ARow, AnIndex, ARecordIndex); - CellValue := GetCellValue(ARow, Properties, AnIndex, ARecordIndex); - dxPScxCommon.dxPSDataMaps.InitializeItem(AnItem, Properties, CellValue, Self, ViewParams, False, ARecordIndex, - TcxCustomRowAccess(ARow).GetEditContainer(AnIndex)); - dxPScxCommon.dxPSDataMaps.GetImageLists(Properties, ReportLink.AppendImageList); - - SetViewParams(AnItem, ViewParams); - if HasBackgroundBitmap(vgs_Content) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(vgs_Content); - - AnItem.Data := MakeCustomDrawCodeData(cxVerticalGridRowValueID, AnIndex, ARecordIndex); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoReportLinkInitializeRowHeader(ARow: TcxCustomRow; - AnItem: TdxReportCellImage; AnIndex: Integer); -begin - ReportLink.DoInitializeRowHeaderCell(ARow, AnIndex, AnItem); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoReportLinkInitializeRowValue(ARow: TcxCustomRow; - AnItem: TAbstractdxReportCellData; AnIndex, ARecordIndex: Integer); -begin - ReportLink.DoInitializeRowValueCell(ARow, AnIndex, ARecordIndex, AnItem); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetCategoryRowCellSides(ARow: TcxCustomRow): TdxCellSides; -begin - Result := [csTop, csRight, csBottom]; - if not ShowHeaders then - Include(Result, csLeft); - if not ShowBorders then - Exclude(Result, csRight); - Result := FixupHorzCellSides(ARow, Result); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetCategoryRowClass(ARow: TcxCustomRow): TdxReportCellImageClass; -begin - Result := TdxReportCellImage; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetCategoryRowViewParams(ARow: TcxCustomRow): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetCategoryParams(ARow, Result.NativeParams) - else - Result.NativeParams := Adapter.GetCategoryViewParams(ARow); - - Result.CellSides := GetCategoryRowCellSides(ARow); - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetCellValue(ARow: TcxCustomRow; - AProperties: TcxCustomEditProperties; AnIndex, ARecordIndex: Integer): TcxEditValue; -var - Helper: TcxVerticalGridCustomRowHelper; -begin - Helper := RowHelpers[ARow]; - if AProperties.GetEditValueSource(False) = evsValue then - Result := Helper.Values[AnIndex, ARecordIndex] - else - Result := Helper.DisplayTexts[AnIndex, ARecordIndex]; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowHeaderCellSides(ARow: TcxCustomRow; - AnIndex: Integer): TdxCellSides; -var - Helper: TcxVerticalGridCustomRowHelper; -begin - Helper := RowHelpers[ARow]; - - Result := csAll; - if Helper.HasHeaderSeparators and (Helper.ItemCount <> 1) then - begin - if AnIndex <> 0 then - Exclude(Result, csLeft); - if AnIndex <> Helper.ItemCount - 1 then - Exclude(Result, csRight); - end; - if AnIndex = 0 then - Exclude(Result, csLeft); - if not ShowVertGridLines then - Result := Result - csLeftRight; - Result := FixupHorzCellSides(ARow, Result); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowHeaderClass(ARow: TcxCustomRow): TdxReportCellImageClass; -begin - Result := TdxReportCellImage; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowHeaderViewParams(ARow: TcxCustomRow; - AnIndex: Integer): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetHeaderParams(ARow, Result.NativeParams) - else - Result.NativeParams := Adapter.GetHeaderViewParams(ARow); - - Result.CellSides := GetRowHeaderCellSides(ARow, AnIndex); - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowValueCellSides(ARow: TcxCustomRow; - AnIndex, ARecordIndex: Integer): TdxCellSides; -var - Helper: TcxVerticalGridCustomRowHelper; -begin - Helper := RowHelpers[ARow]; - - Result := csAll; - if Helper.HasValueSeparators and (Helper.ItemCount <> 1) then - begin - if AnIndex <> 0 then - Exclude(Result, csLeft); - if AnIndex <> Helper.ItemCount - 1 then - Exclude(Result, csRight); - end; - if not ShowVertGridLines then - begin - Exclude(Result, csLeft); - if AnIndex <> Helper.ItemCount - 1 then - Exclude(Result, csRight); - end; - if not ShowBorders and (AnIndex = Helper.ItemCount - 1) then - Exclude(Result, csRight); - Result := FixupHorzCellSides(ARow, Result); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowValueClass(ARow: TcxCustomRow; - AnIndex, ARecordIndex: Integer): TdxReportCellDataClass; -begin - Result := dxPScxCommon.dxPSDataMaps.ItemClass(Adapter.GetProperties(ARow, AnIndex, ARecordIndex)); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowValueViewParams(ARow: TcxCustomRow; - AnIndex, ARecordIndex: Integer): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetContentParams(ARow, AnIndex, ARecordIndex, Result.NativeParams) - else - Result.NativeParams := Adapter.GetContentViewParams(ARow, AnIndex, ARecordIndex); - - Result.CellSides := GetRowValueCellSides(ARow, AnIndex, ARecordIndex); - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeRowHeaderSeparator(ARow: TcxCustomMultiEditorRow; - AnItem: TdxReportCellString; AnIndex: Integer); -begin - SetViewParams(AnItem, GetRowHeaderSeparatorViewParams(ARow, AnIndex)); - if HasBackgroundBitmap(vgs_Header) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(vgs_Header); - - with TdxReportCellString(AnItem) do - begin - Data := MakeCustomDrawCodeData(cxVerticalGridRowHeaderSeparatorID, AnIndex, 0); - EndEllipsis := False; - Multiline := False; - TextAlignX := taLeft; - TextAlignY := dxPScxCommon.TextAlignYMap[RowHelpers[ARow].SeparatorsAlignmentVert]; - end; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeRowValueSeparator(ARow: TcxCustomMultiEditorRow; - AnItem: TdxReportCellString; AnIndex, ARecordIndex: Integer); -begin - SetViewParams(AnItem, GetRowValueSeparatorViewParams(ARow, AnIndex, ARecordIndex)); - if HasBackgroundBitmap(vgs_Content) then - AnItem.BackgroundBitmapIndex := GetBackgroundBitmapIndex(vgs_Content); - - with TdxReportCellString(AnItem) do - begin - Data := MakeCustomDrawCodeData(cxVerticalGridRowValueSeparatorID, AnIndex, ARecordIndex); - EndEllipsis := False; - Multiline := False; - TextAlignX := taLeft; - TextAlignY := dxPScxCommon.TextAlignYMap[RowHelpers[ARow].SeparatorsAlignmentVert]; - end; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoReportLinkInitializeRowHeaderSeparator(ARow: TcxCustomMultiEditorRow; - AnItem: TdxReportCellString; AnIndex: Integer); -begin - ReportLink.DoInitializeRowHeaderSeparatorCell(ARow, AnIndex, AnItem); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoReportLinkInitializeRowValueSeparator(ARow: TcxCustomMultiEditorRow; - AnItem: TdxReportCellString; AnIndex, ARecordIndex: Integer); -begin - ReportLink.DoInitializeRowValueSeparatorCell(ARow, AnIndex, ARecordIndex, AnItem); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowHeaderSeparatorCellSides(ARow: TcxCustomMultiEditorRow): TdxCellSides; -begin - Result := FixupHorzCellSides(ARow, csTopBottom); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowHeaderSeparatorClass(ARow: TcxCustomMultiEditorRow): TdxReportCellStringClass; -begin - Result := TdxReportCellString; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowHeaderSeparatorViewParams(ARow: TcxCustomMultiEditorRow; - AnIndex: Integer): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetHeaderParams(ARow, Result.NativeParams) - else - Result.NativeParams := Adapter.GetHeaderViewParams(ARow); - - Result.CellSides := GetRowHeaderSeparatorCellSides(ARow); - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowValueSeparatorCellSides(ARow: TcxCustomMultiEditorRow): TdxCellSides; -begin - Result := FixupHorzCellSides(ARow, csTopBottom); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowValueSeparatorClass(ARow: TcxCustomMultiEditorRow): TdxReportCellStringClass; -begin - Result := TdxReportCellString; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowValueSeparatorViewParams(ARow: TcxCustomMultiEditorRow; - AnIndex, ARecordIndex: Integer): TdxReportItemViewParams; -begin - FillChar(Result, 0, SizeOf(Result)); - if ReportLink.OptionsFormatting.UseNativeStyles then - ReportLink.Styles.GetContentParams(ARow, AnIndex, ARecordIndex, Result.NativeParams) - else - Result.NativeParams := Adapter.GetContentViewParams(ARow, AnIndex, ARecordIndex); - - Result.CellSides := GetRowValueSeparatorCellSides(ARow); - Result.FontStyle := []; - Result.Transparent := IsColorTransparent(Result.NativeParams.Color); //ReportLink.Transparent; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeWrapSeparatorItem(AnItem: TdxReportCellString; - AWrapIndex: Integer); -begin - AnItem.CellSides := []; - AnItem.Data := AWrapIndex; - AnItem.Transparent := True; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.DoInitializeWrapSeparatorRow(ARow: TdxReportCell); -begin - ARow.CellSides := []; - ARow.Transparent := True; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetWrapSeparatorClass: TdxReportCellStringClass; -begin - Result := TdxReportCellString; -end; - -function TcxCustomVerticalGridReportLinkFormatter.QueryInterface(const IID: TGUID; out Obj): HResult; -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TcxCustomVerticalGridReportLinkFormatter._AddRef: Integer; -begin - Result := 1; -end; - -function TcxCustomVerticalGridReportLinkFormatter._Release: Integer; -begin - Result := 1; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams_GetAutoHeight: Boolean; -begin - Result := Adapter.CellAutoHeight; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams_GetDC: HDC; -begin - Result := Self.DC; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams_GetDisplayGraphicsAsText: Boolean; -begin - Result := ReportLink.OptionsRefinements.DisplayGraphicsAsText; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams_GetEndEllipsis: Boolean; -begin - Result := Adapter.CellEndEllipsis and not ReportLink.OptionsSize.BestFit; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams_GetFlatCheckMarks: Boolean; -begin - Result := ReportLink.OptionsRefinements.FlatCheckMarks; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams_GetGraphicsText: string; -begin - Result := ReportLink.OptionsRefinements.GraphicsText; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams_GetMultiline: Boolean; -begin - Result := Adapter.CellMultiline; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams_GetTransparentGraphics: Boolean; -begin - Result := ReportLink.OptionsRefinements.TransparentGraphics; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams2_GetPreviewMarginLeft: Integer; -begin - Result := 2; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams2_GetPreviewMarginRight: Integer; -begin - Result := 2; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams2_GetPreviewMaxHeight: Integer; -begin - Result := -1; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams2_GetPreviewMaxLineCount: Integer; -begin - Result := -1; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams2_GetRichEditGraphicClass: TGraphicClass; -const - GraphicClasses: array[Boolean] of TGraphicClass = (TMetafile, TBitmap); -begin - Result := GraphicClasses[IdxPSCellParams2_GetRichEditTransparent]; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IdxPSCellParams2_GetRichEditTransparent: Boolean; -begin - {$IFDEF DXVER500} - Result := ReportLink.OptionsRefinements.TransparentRichEdits; - {$ELSE} - Result := False; - {$ENDIF} -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.AddDelimiters; -begin - AddHorizontalDelimiters; - AddVerticalDelimiters; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.AddHorizontalDelimiters; -var - I, J: Integer; -begin - for I := 0 to WrapCount - 1 do - for J := 0 to RowCount - 1 do - RowPlaces[I, J].AddDelimiters(ReportLink); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.AddVerticalDelimiters; -var - I: Integer; - Row: TdxReportCell; -begin - for I := 0 to Builder.ReportRowCount - 1 do - begin - Row := Builder.ReportRows[I]; - ReportLink.AddVerticalDelimiter(Row); - if ReportLink.OptionsPagination.ByWrapping and IsLastRow(GetRowByReportRow(Row)) then - ReportLink.AddVerticalHardDelimiter(Row); - end; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.AfterBuilding; -begin - if not Builder.IsAborted then - begin - FormatLookAndFeelItems; - AddDelimiters; - Builder.ReportCells.BorderColor := GridLinesColor; - end; - - if AreRecordsNeededUnloading then - UnloadRecords; - FIsPrevGridMode := False; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.BeforeBuilding; -begin - FIsPrevGridMode := DataController.IsGridMode; - if AreRecordsNeededLoading then - LoadRecords; - if ReportLink.OptionsExpanding.AutoExpandRows then - Adapter.FullExpand; - CreateRowList; - InitializeWrappedRecordIndexes; - InitializeRecordWidths; - InitializeRowHeights; - Calculate; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetAreRecordsNeededLoading: Boolean; -begin - Result := False; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetAreRecordsNeededUnloading: Boolean; -begin - Result := False; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetFirstInternalRecordIndex: Integer; -begin - Result := 0; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetInternalRecordCount: Integer; -begin - Result := Adapter.RecordCount; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.LoadRecords; -begin -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.UnloadRecords; -begin -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.AddWrappedRecordStartIndex(Value: Integer); -begin - FWrappedRecordStartIndexes.Add(TObject(Value)); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.Calculate; -begin - CreateRowPlaces; - - if ReportLink.OptionsSize.BestFit and not ReportLink.OptionsSize.AutoWidth then - CalculateBestFit; - if ReportLink.OptionsSize.WrapRecords and (InternalRecordCount > 1) then - begin - CalculateRecordCounts; - CreateRowPlaces; - end; - if ReportLink.OptionsSize.AutoWidth then - CalculateRecordAutoWidths; - - CalculateViewWidths; - CalculateRowHeights; - CalculateRowPlaces; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.CalculateBestFit; -var - RecordMinWidth, I, V, J, RecordMaxWidth: Integer; -begin - RecordMinWidth := CalculatedMinWidth; - - if ShowHeaders then - begin - for I := 0 to RowCount - 1 do - begin - V := RowPlaces[0, I].CalculatedHeaderWidth; - if HeaderWidth < V then HeaderWidth := V; - end; - Dec(RecordMinWidth, HeaderWidth); - end; - - RecordMaxWidth := 0; - for I := WrappedRecordStartIndexes[0] to WrappedRecordStopIndexes[WrapCount - 1] do // v3.03 {0 to InternalRecordCount - 1} - begin - for J := 0 to RowCount - 1 do - begin - V := RowPlaces[0, J].CalculatedRecordWidth(I); - if RecordWidths[I] < V then RecordWidths[I] := V; - end; - if RecordWidths[I] < RecordMinWidth then - RecordWidths[I] := RecordMinWidth; - if RecordMaxWidth < RecordWidths[I] then - RecordMaxWidth := RecordWidths[I]; - end; - - if ReportLink.OptionsSize.KeepSameRecordWidths then - for I := WrappedRecordStartIndexes[0] to WrappedRecordStopIndexes[WrapCount - 1] do // v3.03 {0 to InternalRecordCount - 1} - RecordWidths[I] := RecordMaxWidth; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.CalculateHeight(const AParams: TdxReportItemViewParams; - var AHeight: Integer); - - function CalculatedPatternHeight: Integer; - begin - Result := Renderer.CalcTextPatternHeight(DC, AParams.NativeParams.Font); - end; - -var - Value: Integer; -begin - Value := CalculatedPatternHeight; - if Value > AHeight then AHeight := Value; -end; - -function TcxCustomVerticalGridReportLinkFormatter.CalculatedMinWidth: Integer; -var - I, V: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - begin - V := RowPlaces[0, I].CalculatedMinWidth; - if Result < V then Result := V; - end; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.CalculateRecordCounts; -var - V, RecordIndex, RecordCount: Integer; -begin - V := Builder.AvailableSiteWidth - HeaderWidth; - if V > 0 then - begin - RecordIndex := 0; - repeat - RecordCount := 0; - while (V > 0) and (RecordIndex < InternalRecordCount) do - begin - Dec(V, RecordWidths[RecordIndex]); - Inc(RecordIndex); - Inc(RecordCount); - if V > 0 then - begin - Dec(V, InterRecordsSpace); - if (V < 0) and (RecordCount <> 1) then - Inc(RecordIndex); - end; - end; - if V <= 0 then - begin - if RecordCount > 1 then Dec(RecordIndex); - AddWrappedRecordStartIndex(RecordIndex); - V := Builder.AvailableSiteWidth - HeaderWidth; - end; - until RecordIndex > InternalRecordCount - 1; - end - else - for RecordIndex := 1 to InternalRecordCount - 1 do - AddWrappedRecordStartIndex(RecordIndex); - AddWrappedRecordStartIndex(InternalRecordCount); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.CalculateRowHeights; -var - I, RowHeight: Integer; - Row: TcxCustomRow; -begin - for I := 0 to RowCount - 1 do - begin - Row := Rows[I]; - RowHeight := Adapter.RowHeights[Row]; - if RowHeight = -1 then - RowHeight := RowPlaces[0, IndexOfRow(Row)].CalculatedMinHeight; - RowHeights[Row] := RowHeight; - end; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.CalculateRecordAutoWidths; - - procedure AssignAutoWidthItem(AnItem: TcxAutoWidthItem; AMinWidth, AWidth: Integer); - begin - AnItem.MinWidth := AMinWidth; - AnItem.Width := AWidth; - end; - - function GetAvailableSiteWidth(ARecordCount: Integer): Integer; - begin - Result := Builder.AvailableSiteWidth - InterRecordsSpace * (ARecordCount - 1) - HeaderWidth; - end; - -var - I, J: Integer; - AutoWidthObject: TcxAutoWidthObject; -begin - if InternalRecordCount <> 1 then - for I := 0 to WrapCount - 1 do - begin - AutoWidthObject := TcxAutoWidthObject.Create(RecordCounts[I]); - try - for J := WrappedRecordStartIndexes[I] to WrappedRecordStopIndexes[I] do - AssignAutoWidthItem(AutoWidthObject.AddItem, RecordMinWidths[J], RecordWidths[J]); - - AutoWidthObject.AvailableWidth := GetAvailableSiteWidth(RecordCounts[I]); - AutoWidthObject.Calculate; - - for J := WrappedRecordStartIndexes[I] to WrappedRecordStopIndexes[I] do - RecordWidths[J] := AutoWidthObject[J - WrappedRecordStartIndexes[I]].AutoWidth; - finally - AutoWidthObject.Free; - end; - end - else - for I := WrappedRecordStartIndexes[0] to WrappedRecordStopIndexes[WrapCount - 1] do // v3.03 {0 to InternalRecordCount - 1} - RecordWidths[I] := GetAvailableSiteWidth(InternalRecordCount); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.CalculateRowPlaces; -var - I, J: Integer; -begin - for I := 0 to WrapCount - 1 do - for J := 0 to RowCount - 1 do - RowPlaces[I, J].Calculate; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.CalculateViewWidths; -var - I, J, V: Integer; -begin - FViewWidths.Count := WrapCount; - for I := 0 to WrapCount - 1 do - begin - V := HeaderWidth; - for J := WrappedRecordStartIndexes[I] to WrappedRecordStopIndexes[I] do - begin - Inc(V, RecordWidths[J]); - if J < WrappedRecordStopIndexes[I] then - Inc(V, InterRecordsSpace); - end; - ViewWidths[I] := V; - end; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.CreateRowList; -var - I: Integer; - Row: TcxCustomRow; -begin - FRows.Clear; - for I := 0 to Adapter.RowCount - 1 do - begin - Row := Adapter.Rows[I]; - if Adapter.IsRowVisible(Row) then FRows.Add(Row); - end; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.CreateRowPlaces; -var - I, J: Integer; - Place: TcxVerticalGridCustomRowPlace; -begin - ClearRowPlaces; - for I := 0 to WrapCount - 1 do - for J := 0 to RowCount - 1 do - begin - Place := CreateRowPlace(Rows[J], I); - FRowPlaces.Add(Place); - end; -end; - -function TcxCustomVerticalGridReportLinkFormatter.CreateRowPlace(ARow: TcxCustomRow; - AWrapIndex: Integer): TcxVerticalGridCustomRowPlace; -begin - Result := RowHelpers[ARow].RowPlaceClass.Create(Self, ARow, AWrapIndex); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.InitializeRecordWidths; -var - I: Integer; -begin - FRecordWidths.Count := InternalRecordCount; - for I := WrappedRecordStartIndexes[0] to WrappedRecordStopIndexes[WrapCount - 1] do // v3.03 {0 to InternalRecordCount - 1} - RecordWidths[I] := -1; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.InitializeRowHeights; -var - I: Integer; -begin - FRowHeights.Count := RowCount; - for I := 0 to RowCount - 1 do - RowHeights[Rows[I]] := -1; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.InitializeWrappedRecordIndexes; -begin - AddWrappedRecordStartIndex(FirstInternalRecordIndex); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetBackgroundBitmap(Index: Integer): TBitmap; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - Result := ReportLink.Styles.GetBitmap(MapStyleBackgroundBitmapIndex(Index)) - else - Result := Adapter.GetBackgroundBitmap(Index); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetBackgroundBitmapIndex(Index: Integer): Integer; -begin - Result := ReportLink.AddBackgroundBitmapToPool(GetBackgroundBitmap(Index)); -end; - -function TcxCustomVerticalGridReportLinkFormatter.HasBackgroundBitmap(Index: Integer): Boolean; -var - Bitmap: TBitmap; -begin - if not ReportLink.OptionsFormatting.SuppressBackgroundBitmaps then - begin - Bitmap := GetBackgroundBitmap(Index); - Result := (Bitmap <> nil) and not Bitmap.Empty; - end - else - Result := False; -end; - -function TcxCustomVerticalGridReportLinkFormatter.MapStyleBackgroundBitmapIndex(AVerticalGridBackgroundBitmapIndex: Integer): Integer; -begin - case AVerticalGridBackgroundBitmapIndex of - vgs_Category: - Result := vspsVGridCategory; - vgs_Content: - Result := vspsVGridContent; - vgs_Header: - Result := vspsVGridHeader; - else - Result := 0; - end; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetCategoryRowFont(ARow: TcxCustomRow): TFont; -begin - Result := GetCategoryRowViewParams(ARow).NativeParams.Font; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowHeaderFont(ARow: TcxCustomRow; - AnIndex: Integer): TFont; -begin - Result := GetRowHeaderViewParams(ARow, AnIndex).NativeParams.Font; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowHeaderSeparatorsFont(ARow: TcxCustomRow; - AnIndex: Integer): TFont; -begin - Result := GetRowHeaderViewParams(ARow, AnIndex).NativeParams.Font; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowValueFont(ARow: TcxCustomRow; - AnIndex, ARecordIndex: Integer): TFont; -begin - Result := GetRowValueViewParams(ARow, AnIndex, ARecordIndex).NativeParams.Font; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowValueSeparatorsFont(ARow: TcxCustomRow; - AnIndex, ARecordIndex: Integer): TFont; -begin - Result := GetRowValueViewParams(ARow, AnIndex, ARecordIndex).NativeParams.Font; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.ClearRowPlaces; -var - I: Integer; -begin - for I := 0 to FRowPlaces.Count - 1 do - TObject(FRowPlaces[I]).Free; - FRowPlaces.Clear; -end; - -function TcxCustomVerticalGridReportLinkFormatter.FixupHorzCellSides(ARow: TcxCustomRow; - ACellSides: TdxCellSides): TdxCellSides; -begin - Result := ACellSides; - if not ShowHorzGridLines then - begin - if not IsFirstRow(ARow) then Exclude(Result, csTop); - if not IsLastRow(ARow) then Exclude(Result, csBottom); - end; - if not ShowBorders then - begin - if IsFirstRow(ARow) then Exclude(Result, csTop); - if IsLastRow(ARow) then Exclude(Result, csBottom); - end; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.FreeAndNilRowPlaces; -begin - ClearRowPlaces; - FreeAndNil(FRowPlaces); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetImageHeight(ARow: TcxCustomRow; - ACellIndex: Integer): Integer; -begin - Result := Adapter.GetImageHeight(ARow, ACellIndex); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetImageWidth(ARow: TcxCustomRow; - ACellIndex: Integer): Integer; -begin - Result := Adapter.GetImageWidth(ARow, ACellIndex); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetNextRow(ARow: TcxCustomRow): TcxCustomRow; -var - Index: Integer; -begin - Index := IndexOfRow(ARow); - if Index < RowCount - 1 then - Result := Rows[Index + 1] - else - Result := nil; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowByReportRow(ARow: TdxReportCell): TcxCustomRow; -begin - Result := TcxCustomRow(ARow.Cells[0].Data); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetPrevRow(ARow: TcxCustomRow): TcxCustomRow; -var - Index: Integer; -begin - Index := IndexOfRow(ARow); - if Index > 0 then - Result := Rows[Index - 1] - else - Result := nil; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetStyleFontIndex(const AParams: TdxReportItemViewParams): Integer; -begin - if AParams.NativeParams.Font <> nil then - begin - FFont.Assign(AParams.NativeParams.Font); - if not dxPSUtl.dxIsTrueTypeFont(FFont) then - FFont.Name := ReportLink.Font.Name; - FFont.Color := ColorToRGB(AParams.NativeParams.TextColor); - FFont.Style := FFont.Style + AParams.FontStyle; - Result := ReportLink.AddFontToPool(FFont); - end - else - Result := 0; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IndexOfRow(ARow: TcxCustomRow): Integer; -begin - Result := FRows.IndexOf(ARow); -end; - -function TcxCustomVerticalGridReportLinkFormatter.IsColorTransparent(AColor: TColor): Boolean; -begin - Result := ColorToRGB(AColor) = ColorToRGB(TransparentColor); -end; - -function TcxCustomVerticalGridReportLinkFormatter.IsFirstRow(ARow: TcxCustomRow): Boolean; -begin - Result := ARow = FRows.First; -end; - -function TcxCustomVerticalGridReportLinkFormatter.IsLastRow(ARow: TcxCustomRow): Boolean; -begin - Result := ARow = FRows.Last; -end; - -function TcxCustomVerticalGridReportLinkFormatter.MakeCustomDrawCodeData(AnAttribute: TcxVerticalGridAttributeID; - ACellIndex, ARecordIndex: Integer): Integer; -begin - Result := ReportLink.MakeCustomDrawCodeData(AnAttribute, ACellIndex, ARecordIndex); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.RegisterLookAndFeelItem(AnItem: TdxReportVisualItem; - AEdgeStyle: TdxCellEdgeStyle); -begin - AnItem.EdgeMode := cem3DEffects; - AnItem.Edge3DStyle := AEdgeStyle; - FLookAndFeelItems.Add(AnItem); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.SetViewParams(AnItem: TdxReportVisualItem; - const AParams: TdxReportItemViewParams); -begin - with AnItem do - begin - CellSides := AParams.CellSides; - Color := ColorToRGB(AParams.NativeParams.Color); - FontIndex := GetStyleFontIndex(AParams); - Transparent := AParams.Transparent; - end; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetAutoWidth: Boolean; -begin - Result := ReportLink.OptionsSize.AutoWidth; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetDataController: TcxCustomDataController; -begin - Result := Adapter.DataController; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetDC: HDC; -begin - Result := ReportLink.ScreenDC; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetExpandButtonColor(Row: TcxCustomRow): TColor; -begin - if Row is TcxCategoryRow then - Result := GetCategoryRowViewParams(Row).NativeParams.Color - else - Result := ExpandButtonInteriorColor; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetExpandButtonSize: Integer; -begin - Result := DefaultExpandButtonSize; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetGridLinesColor: TColor; -begin - Result := ReportLink.OptionsFormatting.GridLineColor; - if Result = clDefault then - Result := Adapter.GridLinesColor; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetHeaderAvailableWidth(Row: TcxCustomRow): Integer; -begin - if ShowHeaders then - if HeaderWidth <> -1 then - begin - Result := HeaderWidth - IndentAreas[Row]; - if Result < 0 then Result := 0; - end - else - Result := Adapter.HeaderAvailableWidths[Row] - else - Result := 0; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetHeaderMinWidth: Integer; -begin - Result := Adapter.HeaderMinWidth; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetHeaderWidth: Integer; -begin - if ShowHeaders then - if FHeaderWidth = -1 then - Result := Adapter.HeaderWidth - else - Result := FHeaderWidth - else - Result := 0; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetIndentArea(Row: TcxCustomRow): Integer; -begin - if ShowHeaders then - Result := Adapter.IndentAreas[Row] - else - Result := 0; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetInternalRecordWidth: Integer; -begin - Result := Adapter.RecordWidth[InternalRecordCount]; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetInterRecordsSpace: Integer; -begin - if FInterRecordsSpace = -1 then - Result := Adapter.InterRecordsSpace - else - Result := FInterRecordsSpace; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetLookAndFeelItem(Index: Integer): TdxReportVisualItem; -begin - Result := TdxReportVisualItem(FLookAndFeelItems[Index]); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetLookAndFeelItemCount: Integer; -begin - Result := FLookAndFeelItems.Count; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetOptionsView: TcxVerticalGridReportLinkOptionsView; -begin - Result := ReportLink.OptionsView; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRecordCount(Index: Integer): Integer; -begin - Result := WrappedRecordStopIndexes[Index] - WrappedRecordStartIndexes[Index] + 1; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetInternalIndexByRecordIndex(RecordIndex: Integer): Integer; -begin - Result := RecordIndex - FirstInternalRecordIndex; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRecordMinWidth(RecordIndex: Integer): Integer; -begin - Result := Adapter.RecordMinWidths[RecordIndex]; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRecordWidth(RecordIndex: Integer): Integer; -begin - Result := Integer(FRecordWidths[InternalIndexesByRecordIndex[RecordIndex]]); - if Result = -1 then - Result := InternalRecordWidth; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRow(Index: Integer): TcxCustomRow; -begin - Result := TcxCustomRow(FRows[Index]); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowCount: Integer; -begin - Result := FRows.Count; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowHeight(Row: TcxCustomRow): Integer; -begin - Result := Integer(FRowHeights[IndexOfRow(Row)]); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowHelper(Row: TcxCustomRow): TcxVerticalGridCustomRowHelper; -begin - Result := Adapter.Helpers[Row]; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowPlace(WrapIndex, Index: Integer): TcxVerticalGridCustomRowPlace; -begin - Result := FRowPlaces[RowPlaceFlatIndexes[WrapIndex, Index]]; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowPlaceByRow(Row: TcxCustomRow; WrapIndex: Integer): TcxVerticalGridCustomRowPlace; -begin - Result := RowPlaces[WrapIndex, IndexOfRow(Row)]; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowPlaceFlatIndex(WrapIndex, Index: Integer): Integer; -begin - Result := WrapIndex * RowCount + Index; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRowPlaceCount: Integer; -begin - Result := FRowPlaces.Count; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetRenderer: TdxPSReportRenderer; -begin - Result := ReportLink.Renderer; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetShowBorders: Boolean; -begin - Result := OptionsView.Borders; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetShowHeaders: Boolean; -begin - Result := OptionsView.Headers; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetShowHorzGridLines: Boolean; -begin - Result := Adapter.ShowHorzGridLines; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetShowVertGridLines: Boolean; -begin - Result := Adapter.ShowVertGridLines; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetViewMaxWidth: Integer; -var - I, V: Integer; -begin - Result := 0; - for I := 0 to WrapCount - 1 do - begin - V := ViewWidths[I]; - if Result < V then Result := V; - end; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetViewWidth(WrapIndex: Integer): Integer; -begin - Result := Integer(FViewWidths[WrapIndex]); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetWrapCount: Integer; -begin - Result := Max(1, FWrappedRecordStartIndexes.Count - 1); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetWrappedRecordStartIndex(Index: Integer): Integer; -begin - Result := Integer(FWrappedRecordStartIndexes[Index]); -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetWrappedRecordStopIndex(Index: Integer): Integer; -begin - if Index < WrapCount - 1 then - Result := WrappedRecordStartIndexes[Index + 1] - 1 - else - Result := WrappedRecordStartIndexes[0] + InternalRecordCount - 1; -end; - -function TcxCustomVerticalGridReportLinkFormatter.GetWrapSeparatorHeight: Integer; -begin - Result := ReportLink.OptionsSize.WrapSeparatorHeight; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.SetInterRecordsSpace(Value: Integer); -begin - if Value < 0 then Value := 0; - FInterRecordsSpace := Value; -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.SetRecordWidth(RecordIndex: Integer; Value: Integer); -begin - FRecordWidths[InternalIndexesByRecordIndex[RecordIndex]] := TObject(Value); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.SetRowHeight(Row: TcxCustomRow; Value: Integer); -begin - FRowHeights[IndexOfRow(Row)] := TObject(Value); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.SetViewWidth(WrapIndex: Integer; Value: Integer); -begin - FViewWidths[WrapIndex] := TObject(Value); -end; - -procedure TcxCustomVerticalGridReportLinkFormatter.FormatLookAndFeelItems; -const - Borders3D: array[TdxCellEdgeStyle, Boolean] of TdxPSCellBorderClass = - ((TdxPSCellRaisedBorder, TdxPSCellRaisedSoftBorder), - (TdxPSCellSunkenBorder, TdxPSCellSunkenSoftBorder)); -var - I: Integer; -begin - for I := 0 to LookAndFeelItemCount - 1 do - with LookAndFeelItems[I] do - if ReportLink.Effects3D then - BorderClass := Borders3D[Edge3DStyle, ReportLink.Soft3D] - else - BorderClass := TdxPSCellUltraFlatBorder; -end; - -{ TcxVerticalGridReportLinkOptionsExpanding } - -procedure TcxVerticalGridReportLinkOptionsExpanding.Assign(Source: TPersistent); -begin - if Source is TcxVerticalGridReportLinkOptionsExpanding then - with TcxVerticalGridReportLinkOptionsExpanding(Source) do - begin - Self.AutoExpandRows := AutoExpandRows; - end; - inherited; -end; - -procedure TcxVerticalGridReportLinkOptionsExpanding.RestoreDefaults; -begin - inherited; - AutoExpandRows := False; -end; - -function TcxVerticalGridReportLinkOptionsExpanding.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TcxVerticalGridReportLinkOptionsExpanding.GetReportLink: TcxCustomVerticalGridReportLink; -begin - Result := inherited ReportLink as TcxCustomVerticalGridReportLink; -end; - -procedure TcxVerticalGridReportLinkOptionsExpanding.SetAutoExpandRows(Value: Boolean); -begin - if FAutoExpandRows <> Value then - begin - FAutoExpandRows := Value; - Changed; - end; -end; - -{ TcxVerticalGridReportLinkOptionsFormatting } - -function TcxVerticalGridReportLinkOptionsFormatting.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TcxVerticalGridReportLinkOptionsFormatting.GetReportLink: TcxCustomVerticalGridReportLink; -begin - Result := inherited ReportLink as TcxCustomVerticalGridReportLink; -end; - -{ TcxVerticalGridReportLinkOptionsPagination } - -procedure TcxVerticalGridReportLinkOptionsPagination.Assign(Source: TPersistent); -begin - if Source is TcxVerticalGridReportLinkOptionsPagination then - with TcxVerticalGridReportLinkOptionsPagination(Source) do - begin - Self.ByRows := ByRows; - Self.ByWrapping := ByWrapping; - Self.OneWrappingPerPage := OneWrappingPerPage; - end; - inherited; -end; - -procedure TcxVerticalGridReportLinkOptionsPagination.RestoreDefaults; -begin - inherited; - ByRows := True; - ByWrapping := True; - OneWrappingPerPage := False; -end; - -function TcxVerticalGridReportLinkOptionsPagination.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TcxVerticalGridReportLinkOptionsPagination.GetReportLink: TcxCustomVerticalGridReportLink; -begin - Result := inherited ReportLink as TcxCustomVerticalGridReportLink; -end; - -procedure TcxVerticalGridReportLinkOptionsPagination.SetByRows(Value: Boolean); -begin - if FByRows <> Value then - begin - FByRows := Value; - Changed; - end; -end; - -procedure TcxVerticalGridReportLinkOptionsPagination.SetByWrapping(Value: Boolean); -begin - if FByWrapping <> Value then - begin - FByWrapping := Value; - Changed; - end; -end; - -procedure TcxVerticalGridReportLinkOptionsPagination.SetOneWrappingPerPage(Value: Boolean); -begin - if FOneWrappingPerPage <> Value then - begin - FOneWrappingPerPage := Value; - if ByWrapping then Changed; - end; -end; - -{ TcxVerticalGridReportLinkOptionsRefinements } - -function TcxVerticalGridReportLinkOptionsRefinements.DesignerTabIndex: Integer; -begin - Result := 2; -end; - -function TcxVerticalGridReportLinkOptionsRefinements.GetReportLink: TcxCustomVerticalGridReportLink; -begin - Result := inherited ReportLink as TcxCustomVerticalGridReportLink; -end; - -function TcxVerticalGridReportLinkOptionsRefinements.GetSuppressBackgroundBitmaps: Boolean; -begin - Result := ReportLink.OptionsFormatting.SuppressBackgroundBitmaps; -end; - -procedure TcxVerticalGridReportLinkOptionsRefinements.SetSuppressBackgroundBitmaps(Value: Boolean); -begin - ReportLink.OptionsFormatting.SuppressBackgroundBitmaps := Value; -end; - -{ TcxVerticalGridReportLinkOptionsSize } - -procedure TcxVerticalGridReportLinkOptionsSize.Assign(Source: TPersistent); -begin - if Source is TcxVerticalGridReportLinkOptionsSize then - with TcxVerticalGridReportLinkOptionsSize(Source) do - begin - Self.BestFit := BestFit; - Self.KeepSameRecordWidths := KeepSameRecordWidths; - Self.WrapRecords := WrapRecords; - Self.WrapSeparatorHeight := WrapSeparatorHeight; - end; - inherited; -end; - -procedure TcxVerticalGridReportLinkOptionsSize.RestoreDefaults; -begin - inherited; - BestFit := False; - KeepSameRecordWidths := True; - WrapRecords := True; - WrapSeparatorHeight := 20; -end; - -function TcxVerticalGridReportLinkOptionsSize.DesignerTabIndex: Integer; -begin - Result := 1; -end; - -function TcxVerticalGridReportLinkOptionsSize.GetReportLink: TcxCustomVerticalGridReportLink; -begin - Result := inherited ReportLink as TcxCustomVerticalGridReportLink; -end; - -procedure TcxVerticalGridReportLinkOptionsSize.SetBestFit(Value: Boolean); -begin - if FBestFit <> Value then - begin - FBestFit := Value; - Changed; - end; -end; - -procedure TcxVerticalGridReportLinkOptionsSize.SetKeepSameRecordWidths(Value: Boolean); -begin - if FKeepSameRecordWidths <> Value then - begin - FKeepSameRecordWidths := Value; - if BestFit then Changed; - end; -end; - -procedure TcxVerticalGridReportLinkOptionsSize.SetWrapRecords(Value: Boolean); -begin - if FWrapRecords <> Value then - begin - FWrapRecords := Value; - Changed; - end; -end; - -procedure TcxVerticalGridReportLinkOptionsSize.SetWrapSeparatorHeight(Value: Integer); -begin - if Value < 0 then Value := 0; - if FWrapSeparatorHeight <> Value then - begin - FWrapSeparatorHeight := Value; - Changed; - end; -end; - -{ TcxVerticalGridReportLinkOptionsView } - -procedure TcxVerticalGridReportLinkOptionsView.Assign(Source: TPersistent); -begin - if Source is TcxVerticalGridReportLinkOptionsView then - with TcxVerticalGridReportLinkOptionsView(Source) do - begin - Self.Borders := Borders; - Self.ExpandButtons := ExpandButtons; - Self.Headers := Headers; - Self.Mode := Mode; - end; - inherited; -end; - -procedure TcxVerticalGridReportLinkOptionsView.RestoreDefaults; -begin - inherited; - Borders := True; - ExpandButtons := True; - Headers := True; - Mode := vpmLoadedRecords; -end; - -function TcxVerticalGridReportLinkOptionsView.DesignerTabIndex: Integer; -begin - Result := 0; -end; - -function TcxVerticalGridReportLinkOptionsView.GetActualMode: TcxVerticalGridReportLinkPrintMode; -begin - Result := vpmLoadedRecords; // i.e. always equals 1 record for non Virtual(DB)VerticalGrid -end; - -function TcxVerticalGridReportLinkOptionsView.GetReportLink: TcxCustomVerticalGridReportLink; -begin - Result := inherited ReportLink as TcxCustomVerticalGridReportLink; -end; - -procedure TcxVerticalGridReportLinkOptionsView.SetBorders(Value: Boolean); -begin - if FBorders <> Value then - begin - FBorders := Value; - Changed; - end; -end; - -procedure TcxVerticalGridReportLinkOptionsView.SetExpandButtons(Value: Boolean); -begin - if FExpandButtons <> Value then - begin - FExpandButtons := Value; - Changed; - end; -end; - -procedure TcxVerticalGridReportLinkOptionsView.SetHeaders(Value: Boolean); -begin - if FHeaders <> Value then - begin - FHeaders := Value; - Changed; - end; -end; - -procedure TcxVerticalGridReportLinkOptionsView.SetMode(Value: TcxVerticalGridReportLinkPrintMode); -begin - if FMode <> Value then - begin - FMode := Value; - Changed; - end; -end; - -{ TcxVerticalGridReportLinkStyles } - -procedure TcxVerticalGridReportLinkStyles.Assign(Source: TPersistent); -begin - if Source is TcxVerticalGridReportLinkStyles then - with TcxVerticalGridReportLinkStyles(Source) do - begin - Self.Category := Category; - Self.Content := Content; - Self.Header := Header; - end; - inherited; -end; - -procedure TcxVerticalGridReportLinkStyles.GetCategoryParams(ARow: TcxCustomRow; - out AParams: TcxViewParams); -begin - GetViewParams(vspsVGridCategory, ARow, nil, AParams); -end; - -procedure TcxVerticalGridReportLinkStyles.GetContentParams(ARow: TcxCustomRow; - AnIndex, ARecordIndex: Integer; out AParams: TcxViewParams); -begin - GetViewParams(vspsVGridContent, ARow, nil, AParams); -end; - -procedure TcxVerticalGridReportLinkStyles.GetHeaderParams(ARow: TcxCustomRow; - out AParams: TcxViewParams); -begin - GetViewParams(vspsVGridHeader, nil, nil, AParams); -end; - -procedure TcxVerticalGridReportLinkStyles.GetIndentParams(ARow: TcxCustomRow; - out AParams: TcxViewParams); -const - StyleIndexes: array[Boolean] of Integer = (vspsVGridHeader, vspsVGridCategory); -begin - GetViewParams(StyleIndexes[ARow is TcxCategoryRow], ARow, nil, AParams) -end; - -function TcxVerticalGridReportLinkStyles.DesignerTabIndex: Integer; -begin - Result := 3; -end; - -procedure TcxVerticalGridReportLinkStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -const - FixedParts = [vspsVGridCategory, vspsVGridHeader]; -begin - inherited; - if ReportLink <> nil then - with AParams do - begin - if Index in FixedParts then - Color := dxPSCore.dxDefaultFixedColor - else - Color := dxPSCore.dxDefaultContentColor; - - if Index = vspsVGridCategory then - Font := ReportLink.CategoryFont - else - Font := ReportLink.Font; - - TextColor := Font.Color; - end; -end; - -class function TcxVerticalGridReportLinkStyles.GetStyleCaption(AnIndex: Integer): string; -begin - case AnIndex of - vspsVGridContent: - Result := cxGetResourceString(@sdxContentStyle); - vspsVGridHeader: - Result := cxGetResourceString(@sdxHeaderStyle); - else - Result := cxGetResourceString(@sdxCategoryStyle); - end; -end; - -function TcxVerticalGridReportLinkStyles.GetStyleIndexByCaption(const Caption: string): Integer; -begin - for Result := vspsVGridFirst to vspsVGridLast do - if dxPSUtl.dxSameText(Caption, GetStyleCaption(Result)) then - Exit; - Result := -1; -end; - -function TcxVerticalGridReportLinkStyles.GetReportLink: TcxCustomVerticalGridReportLink; -begin - Result := inherited ReportLink as TcxCustomVerticalGridReportLink; -end; - -{ TcxVerticalGridReportLinkStyleSheet } - -class function TcxVerticalGridReportLinkStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxVerticalGridReportLinkStyles; -end; - -function TcxVerticalGridReportLinkStyleSheet.GetStylesValue: TcxVerticalGridReportLinkStyles; -begin - if GetStyles is TcxVerticalGridReportLinkStyles then - Result := TcxVerticalGridReportLinkStyles(GetStyles) - else - Result := nil; -end; - -procedure TcxVerticalGridReportLinkStyleSheet.SetStylesValue(Value: TcxVerticalGridReportLinkStyles); -begin - SetStyles(Value); -end; - -{ TcxVerticalGridHostInfo } - -procedure TcxVerticalGridHostInfo.Initialize(AParent: TdxReportCell); -begin - FParent := AParent; -end; - -{ TcxCustomVerticalGridReportLink } - -constructor TcxCustomVerticalGridReportLink.Create(AOwner: TComponent); -begin - inherited; - FCategoryFont := TFont.Create; - CategoryFont := Font; - FDelimitersHardVert := TList.Create; - InternalRestoreDefaults; - LinkModified(False); -end; - -destructor TcxCustomVerticalGridReportLink.Destroy; -begin - FreeAndNil(FDelimitersHardVert); - FreeAndNil(FCategoryFont); - inherited; -end; - -procedure TcxCustomVerticalGridReportLink.ConstructReport(AReportCells: TdxReportCells); - - function HasData: Boolean; - begin - Result := VerticalGrid.HasVisibleRows; - end; - - procedure Build; - begin - FBuilder := CreateBuilder; - try - FBuilder.Build; - finally - FreeAndNil(FBuilder); - end; - end; - - procedure CalculateSizes; - - procedure CalculateReportPartSizes(ACell: TdxReportCell); - var - Width, I, V: Integer; - begin - if ACell.CellCount > 0 then - begin - Width := 0; - for I := 0 to ACell.CellCount - 1 do - begin - V := ACell.Cells[I].Width; - if Width < V then Width := V; - end; - ACell.BoundsRect := MakeRect(0, 0, Width, ACell[ACell.CellCount - 1].BoundsRect.Bottom); - end; - end; - - begin - CalculateReportPartSizes(AReportCells.Cells); - end; - -begin - if VerticalGrid = nil then Exit; - inherited; - if not HasData then Exit; - - PrepareConstruct; - try - Build; - if not AbortBuilding then CalculateSizes; - finally - UnprepareConstruct; - end; -end; - -procedure TcxCustomVerticalGridReportLink.ConvertCoords; -begin - inherited; - ConvertDelimiters(DelimitersHardVert); -end; - -procedure TcxCustomVerticalGridReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - DrawInfo: TcxVerticalGridCellCustomDrawInfo; -begin - GetItemCustomDrawInfo(AItem, DrawInfo); - with DrawInfo do - case AttributeID of - cxVerticalGridCategoryRowID: - DoCustomDrawRowHeaderCell(ACanvas, Row, CellIndex, TdxReportCellImage(AItem), ADone); - cxVerticalGridRowHeaderID: - DoCustomDrawRowHeaderCell(ACanvas, Row, CellIndex, TdxReportCellImage(AItem), ADone); - cxVerticalGridRowHeaderSeparatorID: - DoCustomDrawRowHeaderSeparatorCell(ACanvas, Row, CellIndex, TdxReportCellString(AItem), ADone); - cxVerticalGridRowValueID: - DoCustomDrawRowValueCell(ACanvas, Row, CellIndex, RecordIndex, AItem, ADone); - cxVerticalGridRowValueSeparatorID: - DoCustomDrawRowValueSeparatorCell(ACanvas, Row, CellIndex, RecordIndex, TdxReportCellString(AItem), ADone); - cxVerticalGridRowIndentID: - DoCustomDrawRowIndentCell(ACanvas, Row, CellIndex, TdxReportCellExpandButton(AItem), ADone); - end; -end; - -procedure TcxCustomVerticalGridReportLink.FontChanged(Sender: TObject); -begin - if CategoryFont <> nil then CategoryFont := Font; - inherited; -end; - -function TcxCustomVerticalGridReportLink.GetBreakPagesByHardDelimiters: Boolean; -begin - Result := OptionsPagination.OneWrappingPerPage; -end; - -procedure TcxCustomVerticalGridReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(VerticalGrid.Images); -end; - -function TcxCustomVerticalGridReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := (AUpdateCodes * uaMarginsVert <> []) and (OptionsSize.AutoWidth or OptionsSize.WrapRecords); -end; - -function TcxCustomVerticalGridReportLink.GetUseHardVertDelimiters: Boolean; -begin - Result := OptionsPagination.ByWrapping; -end; - -procedure TcxCustomVerticalGridReportLink.InternalRestoreFromOriginal; -begin - inherited; - if VerticalGrid <> nil then - begin - OptionsFormatting.LookAndFeelKind := VerticalGrid.LookAndFeel.Kind; - OptionsSize.AutoWidth := VerticalGrid.OptionsView.AutoScaleBands; - OptionsView.ExpandButtons := VerticalGrid.OptionsView.ShowButtons; - OptionsView.Headers := VerticalGrid.OptionsView.ShowHeaders; - end; -end; - -function TcxCustomVerticalGridReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -var - DrawInfo: TcxVerticalGridCellCustomDrawInfo; -begin - Result := inherited IsSupportedCustomDraw(Item) and - (Item <> nil) and IsCustomDrawn(GetItemCustomDrawInfo(Item, DrawInfo)); -end; - -procedure TcxCustomVerticalGridReportLink.MakeHardDelimiters(AReportCells: TdxReportCells; - AVertDelimiters: TList); -begin - inherited; - dxPSUtl.dxCopyList(DelimitersHardVert, AVertDelimiters); -end; - -procedure TcxCustomVerticalGridReportLink.DoCustomDrawRowHeaderCell(ACanvas: TCanvas; - ARow: TcxCustomRow; AnIndex: Integer; AnItem: TdxReportCellImage; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawRowHeaderCell) then - FOnCustomDrawRowHeaderCell(Self, ACanvas, ARow, AnIndex, AnItem, ADone); -end; - -procedure TcxCustomVerticalGridReportLink.DoCustomDrawRowHeaderSeparatorCell(ACanvas: TCanvas; - ARow: TcxCustomRow; AnIndex: Integer; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawRowHeaderSeparatorCell) then - FOnCustomDrawRowHeaderSeparatorCell(Self, ACanvas, ARow, AnIndex, AnItem, ADone); -end; - -procedure TcxCustomVerticalGridReportLink.DoCustomDrawRowIndentCell(ACanvas: TCanvas; - ARow: TcxCustomRow; AnIndex: Integer; AnItem: TdxReportCellExpandButton; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawRowIndentCell) then - FOnCustomDrawRowIndentCell(Self, ACanvas, ARow, AnIndex, AnItem, ADone); -end; - -procedure TcxCustomVerticalGridReportLink.DoCustomDrawRowValueCell(ACanvas: TCanvas; - ARow: TcxCustomRow; ACellIndex, ARecordIndex: Integer; AnItem: TAbstractdxReportCellData; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawRowValueCell) then - FOnCustomDrawRowValueCell(Self, ACanvas, ARow, ACellIndex, ARecordIndex, AnItem, ADone); -end; - -procedure TcxCustomVerticalGridReportLink.DoCustomDrawRowValueSeparatorCell(ACanvas: TCanvas; - ARow: TcxCustomRow; ACellIndex, ARecordIndex: Integer; AnItem: TdxReportCellString; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawRowValueSeparatorCell) then - FOnCustomDrawRowValueSeparatorCell(Self, ACanvas, ARow, ACellIndex, ARecordIndex, AnItem, ADone); -end; - -procedure TcxCustomVerticalGridReportLink.DoInitializeRowHeaderCell(ARow: TcxCustomRow; - ACellIndex: Integer; AnItem: TdxReportCellImage); -begin - if Assigned(FOnInitializeRowHeaderCell) then - FOnInitializeRowHeaderCell(Self, ARow, ACellIndex, AnItem); -end; - -procedure TcxCustomVerticalGridReportLink.DoInitializeRowHeaderSeparatorCell(ARow: TcxCustomRow; - AnIndex: Integer; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeRowHeaderSeparatorCell) then - FOnInitializeRowHeaderSeparatorCell(Self, ARow, AnIndex, AnItem); -end; - -procedure TcxCustomVerticalGridReportLink.DoInitializeRowIndentCell(ARow: TcxCustomRow; - AnIndex: Integer; AnItem: TdxReportCellExpandButton); -begin - if Assigned(FOnInitializeRowIndentCell) then - FOnInitializeRowIndentCell(Self, ARow, AnIndex, AnItem); -end; - -procedure TcxCustomVerticalGridReportLink.DoInitializeRowValueCell(ARow: TcxCustomRow; - ACellIndex, ARecordIndex: Integer; AnItem: TAbstractdxReportCellData); -begin - if Assigned(FOnInitializeRowValueCell) then - FOnInitializeRowValueCell(Self, ARow, ACellIndex, ARecordIndex, AnItem); -end; - -procedure TcxCustomVerticalGridReportLink.DoInitializeRowValueSeparatorCell(ARow: TcxCustomRow; - ACellIndex, ARecordIndex: Integer; AnItem: TdxReportCellString); -begin - if Assigned(FOnInitializeRowValueSeparatorCell) then - FOnInitializeRowValueSeparatorCell(Self, ARow, ACellIndex, ARecordIndex, AnItem); -end; - -function TcxCustomVerticalGridReportLink.GetOptionsExpandingClass: TdxCustomReportLinkOptionsExpandingClass; -begin - Result := TcxVerticalGridReportLinkOptionsExpanding; -end; - -function TcxCustomVerticalGridReportLink.GetOptionsFormattingClass: TdxCustomReportLinkOptionsFormattingClass; -begin - Result := TcxVerticalGridReportLinkOptionsFormatting; -end; - -function TcxCustomVerticalGridReportLink.GetOptionsPaginationClass: TdxCustomReportLinkOptionsPaginationClass; -begin - Result := TcxVerticalGridReportLinkOptionsPagination; -end; - -function TcxCustomVerticalGridReportLink.GetOptionsRefinementsClass: TdxCustomReportLinkOptionsRefinementsClass; -begin - Result := TcxVerticalGridReportLinkOptionsRefinements; -end; - -function TcxCustomVerticalGridReportLink.GetOptionsSizeClass: TdxCustomReportLinkOptionsSizeClass; -begin - Result := TcxVerticalGridReportLinkOptionsSize; -end; - -function TcxCustomVerticalGridReportLink.GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; -begin - Result := TcxVerticalGridReportLinkOptionsView; -end; - -function TcxCustomVerticalGridReportLink.GetAreNativeStylesAvailable: Boolean; -begin - Result := OptionsFormatting.UseNativeStyles; -end; - -function TcxCustomVerticalGridReportLink.GetStylesClass: TdxCustomReportLinkStylesClass; -begin - Result := TcxVerticalGridReportLinkStyles; -end; - -function TcxCustomVerticalGridReportLink.GetStyleSheetClass: TdxCustomReportLinkStyleSheetClass; -begin - Result := TcxVerticalGridReportLinkStyleSheet; -end; - -function TcxCustomVerticalGridReportLink.GetStyleSheetPrototype: TdxCustomReportLinkStyleSheet; -begin - Result := DefaultdxPScxVerticalGridLinkStyleSheet; -end; - -procedure TcxCustomVerticalGridReportLink.PrepareConstruct; -begin - inherited; - DelimitersHardVert.Clear; - ReportCells.LookAndFeel := nil;//CreateGroupLookAndFeel(TdxPSReportGroupNullLookAndFeel); - FHostInfo := TcxVerticalGridHostInfo.Create; - FHostInfo.Initialize(ReportCells.Cells); -end; - -procedure TcxCustomVerticalGridReportLink.UnprepareConstruct; -begin - FreeAndNil(FHostInfo); - inherited; -end; - -procedure TcxCustomVerticalGridReportLink.AddVerticalHardDelimiter(ADelimiter: TdxReportCell); -begin - AddVerticalHardDelimiter(ADelimiter.AbsoluteRect.Bottom); -end; - -procedure TcxCustomVerticalGridReportLink.AddVerticalHardDelimiter(ADelimiter: Integer); -begin - FDelimitersHardVert.Add(TObject(ADelimiter)); -end; - -function TcxCustomVerticalGridReportLink.CreateBuilder: TcxCustomVerticalGridReportLinkBuilder; -begin - Result := GetBuilderClass.Create(Self); -end; - -class function TcxCustomVerticalGridReportLink.GetBuilderClass: TcxCustomVerticalGridReportLinkBuilderClass; -begin - Result := TcxCustomVerticalGridReportLinkBuilder; -end; - -procedure TcxCustomVerticalGridReportLink.ExtractCustomDrawCodeDataValues(ACode: Integer; - var AnAttribute: TcxVerticalGridAttributeID; var ACellIndex, ARecordIndex: Integer); -begin - AnAttribute := (ACode shr CodeAttributeOffset) and CodeAttributeMask; - ACellIndex := (ACode shr CodeIndexOffset) and CodeIndexMask; - ARecordIndex := (ACode shr CodeRecordIndexOffset) and CodeRecordIndexMask; -end; - -function TcxCustomVerticalGridReportLink.GetItemCustomDrawInfo(AnItem: TdxReportVisualItem; - out ADrawInfo: TcxVerticalGridCellCustomDrawInfo): TcxVerticalGridAttributeID; -begin - FillChar(ADrawInfo, SizeOf(ADrawInfo), 0); - try - try - with ADrawInfo do - begin - Row := TcxCustomRow(AnItem.Parent.Data); - ExtractCustomDrawCodeDataValues(AnItem.Data, AttributeID, CellIndex, RecordIndex); - end; - except - FillChar(ADrawInfo, SizeOf(ADrawInfo), 0); - end; - finally - Result := ADrawInfo.AttributeID; - end; -end; - -function TcxCustomVerticalGridReportLink.IsCustomDrawn(AnAttributeID: TcxVerticalGridAttributeID): Boolean; -begin - Result := False; - case AnAttributeID of - cxVerticalGridCategoryRowID: - Result := Assigned(FOnCustomDrawRowHeaderCell); - cxVerticalGridRowHeaderID: - Result := Assigned(FOnCustomDrawRowHeaderCell); - cxVerticalGridRowHeaderSeparatorID: - Result := Assigned(FOnCustomDrawRowHeaderSeparatorCell); - cxVerticalGridRowValueID: - Result := Assigned(FOnCustomDrawRowValueCell); - cxVerticalGridRowValueSeparatorID: - Result := Assigned(FOnCustomDrawRowValueSeparatorCell); - cxVerticalGridRowIndentID: - Result := Assigned(FOnCustomDrawRowIndentCell); - end; -end; - -function TcxCustomVerticalGridReportLink.MakeCustomDrawCodeData(AnAttribute: TcxVerticalGridAttributeID; - ACellIndex, ARecordIndex: Integer): Integer; -begin - Result := ((AnAttribute and CodeAttributeMask) shl CodeAttributeOffset) or - ((ACellIndex and CodeIndexMask) shl CodeIndexOffset) or - ((ARecordIndex and CodeRecordIndexMask) shl CodeRecordIndexOffset); -end; - -procedure TcxCustomVerticalGridReportLink.InitializePrintModeControl(AControl: TComboBox); -begin -end; - -procedure TcxCustomVerticalGridReportLink.UpdateStatePrintModeControl(AControl: TComboBox); -begin - AControl.Enabled := False; - AControl.Visible := False; -end; - -function TcxCustomVerticalGridReportLink.GetActiveStyles: TcxVerticalGridReportLinkStyles; -begin - Result := inherited ActiveStyles as TcxVerticalGridReportLinkStyles; -end; - -function TcxCustomVerticalGridReportLink.GetDesignWindow: TcxfmVerticalGridReportLinkDesignWindow; -begin - Result := inherited DesignWindow as TcxfmVerticalGridReportLinkDesignWindow; -end; - -function TcxCustomVerticalGridReportLink.GetOptionsExpanding: TcxVerticalGridReportLinkOptionsExpanding; -begin - Result := inherited OptionsExpanding as TcxVerticalGridReportLinkOptionsExpanding; -end; - -function TcxCustomVerticalGridReportLink.GetOptionsFormatting: TcxVerticalGridReportLinkOptionsFormatting; -begin - Result := inherited OptionsFormatting as TcxVerticalGridReportLinkOptionsFormatting; -end; - -function TcxCustomVerticalGridReportLink.GetOptionsPagination: TcxVerticalGridReportLinkOptionsPagination; -begin - Result := inherited OptionsPagination as TcxVerticalGridReportLinkOptionsPagination; -end; - -function TcxCustomVerticalGridReportLink.GetOptionsRefinements: TcxVerticalGridReportLinkOptionsRefinements; -begin - Result := inherited OptionsRefinements as TcxVerticalGridReportLinkOptionsRefinements; -end; - -function TcxCustomVerticalGridReportLink.GetOptionsSize: TcxVerticalGridReportLinkOptionsSize; -begin - Result := inherited OptionsSize as TcxVerticalGridReportLinkOptionsSize; -end; - -function TcxCustomVerticalGridReportLink.GetOptionsView: TcxVerticalGridReportLinkOptionsView; -begin - Result := inherited OptionsView as TcxVerticalGridReportLinkOptionsView; -end; - -function TcxCustomVerticalGridReportLink.GetStyles: TcxVerticalGridReportLinkStyles; -begin - Result := inherited Styles as TcxVerticalGridReportLinkStyles; -end; - -function TcxCustomVerticalGridReportLink.GetVerticalGrid: TcxCustomVerticalGrid; -begin - Result := TcxCustomVerticalGrid(Component); -end; - -procedure TcxCustomVerticalGridReportLink.SetOnCustomDrawRowHeaderCell( - Value: TcxVerticalGridReportLinkCustomDrawRowHeaderCellEvent); -begin - if @FOnCustomDrawRowHeaderCell <> @Value then - begin - FOnCustomDrawRowHeaderCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxCustomVerticalGridReportLink.SetCategoryFont(Value: TFont); -begin - CategoryFont.Assign(Value); - CategoryFont.Style := CategoryFont.Style + [fsBold]; -end; - -procedure TcxCustomVerticalGridReportLink.SetOnCustomDrawRowHeaderSeparatorCell( - Value: TcxVerticalGridReportLinkCustomDrawRowHeaderSeparatorCellEvent); -begin - if @FOnCustomDrawRowHeaderSeparatorCell <> @Value then - begin - FOnCustomDrawRowHeaderSeparatorCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxCustomVerticalGridReportLink.SetOnCustomDrawRowIndentCell( - Value: TcxVerticalGridReportLinkCustomDrawRowIndentCellEvent); -begin - if @FOnCustomDrawRowIndentCell <> @Value then - begin - FOnCustomDrawRowIndentCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxCustomVerticalGridReportLink.SetOnCustomDrawRowValueCell( - Value: TcxVerticalGridReportLinkCustomDrawRowValueCellEvent); -begin - if @FOnCustomDrawRowValueCell <> @Value then - begin - FOnCustomDrawRowValueCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxCustomVerticalGridReportLink.SetOnCustomDrawRowValueSeparatorCell( - Value: TcxVerticalGridReportLinkCustomDrawRowValueSeparatorCellEvent); -begin - if @FOnCustomDrawRowValueSeparatorCell <> @Value then - begin - FOnCustomDrawRowValueSeparatorCell := Value; - if SupportedCustomDraw then LinkModified(True); - end; -end; - -procedure TcxCustomVerticalGridReportLink.SetOptionsExpanding(Value: TcxVerticalGridReportLinkOptionsExpanding); -begin - inherited OptionsExpanding := Value; -end; - -procedure TcxCustomVerticalGridReportLink.SetOptionsFormatting(Value: TcxVerticalGridReportLinkOptionsFormatting); -begin - inherited OptionsFormatting := Value; -end; - -procedure TcxCustomVerticalGridReportLink.SetOptionsPagination(Value: TcxVerticalGridReportLinkOptionsPagination); -begin - inherited OptionsPagination := Value; -end; - -procedure TcxCustomVerticalGridReportLink.SetOptionsRefinements(Value: TcxVerticalGridReportLinkOptionsRefinements); -begin - inherited OptionsRefinements := Value; -end; - -procedure TcxCustomVerticalGridReportLink.SetOptionsSize(Value: TcxVerticalGridReportLinkOptionsSize); -begin - inherited OptionsSize := Value; -end; - -procedure TcxCustomVerticalGridReportLink.SetOptionsView(Value: TcxVerticalGridReportLinkOptionsView); -begin - inherited OptionsView := Value; -end; - -procedure TcxCustomVerticalGridReportLink.SetStyles(Value: TcxVerticalGridReportLinkStyles); -begin - inherited Styles := Value; -end; - -{ TcxUnboundVerticalGridReportLinkBuilder } - -class function TcxUnboundVerticalGridReportLinkBuilder.AdapterClass: TcxCustomVerticalGridAdapterClass; -begin - Result := TcxUnboundVerticalGridAdapter; -end; - -{ TcxUnboundVerticalGridAdapter } - -function TcxUnboundVerticalGridAdapter.GetLayoutStyle: TcxvgLayoutStyle; -begin - Result := TcxvgLayoutStyle(UnboundVerticalGrid_GetLayoutStyle(VerticalGrid)); -end; - -function TcxUnboundVerticalGridAdapter.GetVerticalGrid: TcxUnboundVerticalGrid; -begin - Result := inherited VerticalGrid as TcxUnboundVerticalGrid; -end; - -{ TcxUnboundVerticalGridReportLink } - -class function TcxUnboundVerticalGridReportLink.GetBuilderClass: TcxCustomVerticalGridReportLinkBuilderClass; -begin - Result := TcxUnboundVerticalGridReportLinkBuilder; -end; - -{ TcxVerticalGridReportLink } - -function TcxVerticalGridReportLink.GetVerticalGrid: TcxVerticalGrid; -begin - Result := TcxVerticalGrid(Component); -end; - -{ TcxRTTIInspectorReportLink } - -function TcxRTTIInspectorReportLink.GetRTTIInspector: TcxRTTIInspector; -begin - Result := TcxRTTIInspector(Component); -end; - -{ TcxVirtualVerticalGridReportLinkBuilder } - -class function TcxVirtualVerticalGridReportLinkBuilder.AdapterClass: TcxCustomVerticalGridAdapterClass; -begin - Result := TcxVirtualVerticalGridAdapter; -end; - -class function TcxVirtualVerticalGridReportLinkBuilder.FormatterClass: TcxCustomVerticalGridReportLinkFormatterClass; -begin - Result := TcxVirtualVerticalGridReportLinkFormatter; -end; - -{ TcxVirtualVerticalGridAdapter } - -function TcxVirtualVerticalGridAdapter.GetInterRecordsSpace: Integer; -begin - Result := OptionsView.RecordsInterval; -end; - -function TcxVirtualVerticalGridAdapter.GetLayoutStyle: TcxvgLayoutStyle; -begin - Result := VerticalGrid.LayoutStyle; -end; - -function TcxVirtualVerticalGridAdapter.GetOptionsView: TcxvgMultiRecordsOptionsView; -begin - Result := inherited OptionsView as TcxvgMultiRecordsOptionsView; -end; - -function TcxVirtualVerticalGridAdapter.GetVerticalGrid: TcxVirtualVerticalGrid; -begin - Result := inherited VerticalGrid as TcxVirtualVerticalGrid; -end; - -{ TcxVirtualVerticalGridReportLinkFormatter } - -function TcxVirtualVerticalGridReportLinkFormatter.GetFirstInternalRecordIndex: Integer; -begin - Result := inherited GetFirstInternalRecordIndex; - if (Adapter.LayoutStyle <> lsMultiRecordView) and (InternalRecordCount = 1) and - (ReportLink.OptionsView.ActualMode = vpmLoadedRecords) then - Result := Adapter.FirstRecordIndex; -end; - -function TcxVirtualVerticalGridReportLinkFormatter.GetInternalRecordCount: Integer; -begin - Result := inherited GetInternalRecordCount; - if (Adapter.LayoutStyle <> lsMultiRecordView) and (Result <> 0) and - (ReportLink.OptionsView.ActualMode = vpmLoadedRecords) then - Result := 1; -end; - -{ TcxVirtualVerticalGridReportLinkOptionsView } - -function TcxVirtualVerticalGridReportLinkOptionsView.GetActualMode: TcxVerticalGridReportLinkPrintMode; -begin - Result := Mode; - if ReportLink.VirtualVerticalGrid <> nil then - with ReportLink.VirtualVerticalGrid do - if not DataController.IsGridMode and (LayoutStyle = lsMultiRecordView) then - Result := vpmAllRecords; -end; - -function TcxVirtualVerticalGridReportLinkOptionsView.GetReportLink: TcxVirtualVerticalGridReportLink; -begin - Result := inherited ReportLink as TcxVirtualVerticalGridReportLink; -end; - -{ TcxVirtualVerticalGridReportLink } - -procedure TcxVirtualVerticalGridReportLink.InternalRestoreFromOriginal; -begin - inherited; - if VirtualVerticalGrid <> nil then - if VirtualVerticalGrid.DataController.IsGridMode then - OptionsView.Mode := vpmLoadedRecords - else - if VirtualVerticalGrid.LayoutStyle = lsMultiRecordView then - OptionsView.Mode := vpmAllRecords - else - OptionsView.Mode := vpmLoadedRecords; -end; - -class function TcxVirtualVerticalGridReportLink.GetBuilderClass: TcxCustomVerticalGridReportLinkBuilderClass; -begin - Result := TcxVirtualVerticalGridReportLinkBuilder; -end; - -function TcxVirtualVerticalGridReportLink.GetOptionsViewClass: TdxCustomReportLinkOptionsViewClass; -begin - Result := TcxVirtualVerticalGridReportLinkOptionsView; -end; - -procedure TcxVirtualVerticalGridReportLink.InitializePrintModeControl(AControl: TComboBox); - - function IsModeAccepted(AMode: TcxVerticalGridReportLinkPrintMode): Boolean; - begin - if VirtualVerticalGrid <> nil then - if VirtualVerticalGrid.DataController.IsGridMode then - Result := True - else - if VirtualVerticalGrid.LayoutStyle = lsMultiRecordView then - Result := AMode = vpmAllRecords - else - Result := True - else - Result := True; - end; - - function PrintModeString(AMode: TcxVerticalGridReportLinkPrintMode): string; - begin - if (VirtualVerticalGrid = nil) or (VirtualVerticalGrid.LayoutStyle = lsMultiRecordView) then - if AMode = vpmLoadedRecords then - Result := cxGetResourceString(@sdxLoadedRecords) - else - Result := cxGetResourceString(@sdxAllRecords) - else - if AMode = vpmLoadedRecords then - Result := cxGetResourceString(@sdxCurrentRecord) - else - Result := cxGetResourceString(@sdxAllRecords); - end; - -var - I: TcxVerticalGridReportLinkPrintMode; -begin - with AControl do - begin - Items.BeginUpdate; - try - Clear; - for I := Low(TcxVerticalGridReportLinkPrintMode) to High(TcxVerticalGridReportLinkPrintMode) do - if IsModeAccepted(I) then - Items.AddObject(PrintModeString(I), TObject(I)); - - ItemIndex := Items.IndexOfObject(TObject(OptionsView.ActualMode)); - finally - Items.EndUpdate; - end; - end; -end; - -procedure TcxVirtualVerticalGridReportLink.UpdateStatePrintModeControl(AControl: TComboBox); -begin - AControl.Enabled := AControl.Items.Count > 1; - AControl.Visible := True; -end; - -function TcxVirtualVerticalGridReportLink.GetOptionsView: TcxVirtualVerticalGridReportLinkOptionsView; -begin - Result := inherited OptionsView as TcxVirtualVerticalGridReportLinkOptionsView; -end; - -function TcxVirtualVerticalGridReportLink.GetVirtualVerticalGrid: TcxVirtualVerticalGrid; -begin - Result := Component as TcxVirtualVerticalGrid; -end; - -procedure TcxVirtualVerticalGridReportLink.SetOptionsView(Value: TcxVirtualVerticalGridReportLinkOptionsView); -begin - inherited OptionsView := Value; -end; - -{ TcxDBVerticalGridReportLinkBuilder } - -class function TcxDBVerticalGridReportLinkBuilder.FormatterClass: TcxCustomVerticalGridReportLinkFormatterClass; -begin - Result := TcxDBVerticalGridReportLinkFormatter; -end; - -{ TcxDBVerticalGridReportLinkFormatter } - -function TcxDBVerticalGridReportLinkFormatter.GetAreRecordsNeededLoading: Boolean; -begin - Result := DataController.IsGridMode and (OptionsView.Mode = vpmAllRecords); -end; - -function TcxDBVerticalGridReportLinkFormatter.GetAreRecordsNeededUnloading: Boolean; -begin - Result := IsPrevGridMode and (OptionsView.Mode = vpmAllRecords); -end; - -procedure TcxDBVerticalGridReportLinkFormatter.LoadRecords; -begin - DataController.GridMode := False; -end; - -procedure TcxDBVerticalGridReportLinkFormatter.UnloadRecords; -begin - DataController.GridMode := True; -end; - -function TcxDBVerticalGridReportLinkFormatter.GetDataController: TcxDBVerticalGridDataController; -begin - Result := inherited DataController as TcxDBVerticalGridDataController; -end; - -{ TcxDBVerticalGridReportLink } - -class function TcxDBVerticalGridReportLink.GetBuilderClass: TcxCustomVerticalGridReportLinkBuilderClass; -begin - Result := TcxDBVerticalGridReportLinkBuilder; -end; - -function TcxDBVerticalGridReportLink.GetDBVerticalGrid: TcxDBVerticalGrid; -begin - Result := Component as TcxDBVerticalGrid; -end; - -{ TcxfmVerticalGridReportLinkDesignWindow } - -constructor TcxfmVerticalGridReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxPSGlbl.dxhccxVerticalGridReportLinkDesigner; - inherited; - CreateControls; - SetActivePage; -end; - -destructor TcxfmVerticalGridReportLinkDesignWindow.Destroy; -begin - dxPSPopupMan.dxPSPopupMenuController.UnregisterControl(lbxStyles); - inherited; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.LookAndFeelChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TComboBox(Sender) do - ReportLink.OptionsFormatting.LookAndFeelKind := TcxLookAndFeelKind(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.OptionsExpandingClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsExpandingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.OptionsFormattingClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsFormattingByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.OptionsRefinementsClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsRefinementsByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.OptionsPaginationClick( - Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsPaginationByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.OptionsSizeClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsSizeByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.OptionsViewClick(Sender: TObject); -begin - with TCheckBox(Sender) do - SetOptionsViewByIndex(TTagToInt(Tag), Checked); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.cbxPrintModeChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TComboBox(Sender) do - ReportLink.OptionsView.Mode := TcxVerticalGridReportLinkPrintMode(Items.Objects[ItemIndex]); - Modified := True; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.pmStylesPopup(Sender: TObject); -begin - lbxStyles.HideToolTips; - miStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - miStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - miStylesSelectAll.Enabled := CanSelectAllStyles; - miStylesSaveAs.Enabled := CanSaveStyles; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.lblUseNativeStylesClick( - Sender: TObject); -begin - if chbxUseNativeStyles.CanFocus then ActiveControl := chbxUseNativeStyles; - chbxUseNativeStyles.Checked := not chbxUseNativeStyles.Checked; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.StyleColorClick(Sender: TObject); -begin - PerformStylesChangeColor; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.StyleFontClick(Sender: TObject); -begin - PerformStylesChangeFont; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.StyleBackgroundBitmapClick( - Sender: TObject); -begin - PerformStylesChangeBitmap; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.StyleBackgroundBitmapClearClick( - Sender: TObject); -begin - PerformStylesClearBitmap; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.StyleRestoreDefaultsClick( - Sender: TObject); -begin - PerformStylesRestoreDefaults; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.DoInitialize; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited; - RefreshStylesList; - - LoadDataIntoPreviewVerticalGrid; - InitializePreviewVerticalGridStyles; - - (*{$IFNDEF DXVER500} {.3} - chbxTransparentRichEdits.Visible := False; - {$ENDIF} *) - - with ReportLink.OptionsView do - begin - chbxShowBorders.Checked := Borders; - chbxShowExpandButtons.Checked := ExpandButtons; - chbxShowHeaders.Checked := Headers; - end; - ReportLink.InitializePrintModeControl(cbxPrintMode); - - with cbxLookAndFeel do - begin - Items.Clear; - Items.AddObject(cxGetResourceString(@sdxLookAndFeelFlat), TObject(lfFlat)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelStandard), TObject(lfStandard)); - Items.AddObject(cxGetResourceString(@sdxLookAndFeelUltraFlat), TObject(lfUltraFlat)); - - ItemIndex := Items.IndexOfObject(TObject(ReportLink.OptionsFormatting.LookAndFeelKind)); - end; - - with ReportLink.OptionsFormatting do - begin - chbxSuppressBackgroundBitmaps.Checked := SuppressBackgroundBitmaps; - chbxUseNativeStyles.Checked := UseNativeStyles; - end; - - with ReportLink.OptionsExpanding do - begin - chbxExpandRows.Checked := AutoExpandRows; - end; - - with ReportLink.OptionsSize do - begin - chbxAutoWidth.Checked := AutoWidth; - chbxBestFit.Checked := BestFit; - chbxKeepSameRecordWidths.Checked := KeepSameRecordWidths; - chbxWrapRecords.Checked := WrapRecords; - end; - - with ReportLink.OptionsRefinements do - begin - chbxTransparentGraphics.Checked := TransparentGraphics; - chbxDisplayGraphicsAsText.Checked := DisplayGraphicsAsText; - chbxFlatCheckMarks.Checked := FlatCheckMarks; - (*{$IFDEF DXVER500} {.3} - chbxTransparentRichEdits.Checked := TransparentRichEdits; - {$ENDIF}*) - end; - - with ReportLink.OptionsPagination do - begin - chbxPaginateByRows.Checked := ByRows; - chbxPaginateByWrapping.Checked := ByWrapping; - chbxOneWrappingPerPage.Checked := OneWrappingPerPage; - end; -end; - -{$IFDEF DELPHI7} -function TcxfmVerticalGridReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TcxfmVerticalGridReportLinkDesignWindow.LoadStrings; - - procedure AdjustBevelSize(ABevel: TBevel; ALabel: TControl); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := ALabel.Left + ALabel.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - inherited; - - lblPreviewWindow.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - tshView.Caption := cxGetResourceString(@sdxViewTab); - - lblShow.Caption := cxGetResourceString(@sdxShow); - AdjustBevelSize(bvlShow, lblShow); - chbxShowHeaders.Caption := cxGetResourceString(@sdxHeaders); - chbxShowBorders.Caption := cxGetResourceString(@sdxBorders); - chbxShowExpandButtons.Caption := cxGetResourceString(@sdxExpandButtons); - lblPrintMode.Caption := cxGetResourceString(@sdxMode); - - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviorsTab); - - lblExpanding.Caption := cxGetResourceString(@sdxExpanding); - AdjustBevelSize(bvlExpanding, lblExpanding); - chbxExpandRows.Caption := cxGetResourceString(@sdxRows); - - lblSize.Caption := cxGetResourceString(@sdxSize); - AdjustBevelSize(bvlSize, lblSize); - chbxAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - chbxBestFit.Caption := cxGetResourceString(@sdxBestFit); - chbxKeepSameRecordWidths.Caption := cxGetResourceString(@sdxKeepSameRecordWidths); - chbxWrapRecords.Caption := cxGetResourceString(@sdxWrapRecords); - - tshFormatting.Caption := cxGetResourceString(@sdxFormatting); - lblLookAndFeel.Caption := cxGetResourceString(@sdxLookAndFeel); - AdjustBevelSize(bvlLookAndFeel, lblLookAndFeel); - - lblRefinements.Caption := cxGetResourceString(@sdxRefinements); - AdjustBevelSize(bvlRefinements, lblRefinements); - chbxTransparentGraphics.Caption := cxGetResourceString(@sdxTransparentGraphics); - chbxDisplayGraphicsAsText.Caption := DropAmpersand(cxGetResourceString(@sdxDisplayGraphicsAsText)); - chbxFlatCheckMarks.Caption := cxGetResourceString(@sdxFlatCheckMarks); - //chbxTransparentRichEdits.Caption := cxGetResourceString(@sdxTransparentRichEdits); {.3} - chbxSuppressBackgroundBitmaps.Caption := cxGetResourceString(@sdxSuppressBackgroundBitmaps); - - lblPagination.Caption := cxGetResourceString(@sdxPagination); - AdjustBevelSize(bvlPagination, lblPagination); - chbxPaginateByRows.Caption := cxGetResourceString(@sdxByRows); - chbxPaginateByWrapping.Caption := cxGetResourceString(@sdxByWrapping); - chbxOneWrappingPerPage.Caption := cxGetResourceString(@sdxOneWrappingPerPage); - - tshStyles.Caption := cxGetResourceString(@sdxStyles); - lblStyleSheets.Caption := cxGetResourceString(@sdxStyleSheets); - lblUseNativeStyles.Caption := cxGetResourceString(@sdxUseNativeStyles); - AdjustBevelSize(bvlStyles, lblUseNativeStyles); - btnStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - btnStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - btnStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - btnStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - btnStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - btnStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); - btnStyleSheetNew.Caption := cxGetResourceString(@sdxBtnNew); - btnStyleSheetCopy.Caption := cxGetResourceString(@sdxBtnCopy); - btnStyleSheetDelete.Caption := cxGetResourceString(@sdxBtnDelete); - btnStyleSheetRename.Caption := cxGetResourceString(@sdxBtnRename); - - miStyleColor.Caption := cxGetResourceString(@sdxBtnColor); - miStyleFont.Caption := cxGetResourceString(@sdxBtnFont); - miStyleBackgroundBitmap.Caption := cxGetResourceString(@sdxBtnTexture); - miStyleBackgroundBitmapClear.Caption := cxGetResourceString(@sdxBtnTextureClear); - miStyleRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - miStylesSelectAll.Caption := cxGetResourceString(@sdxSelectAll); - miStylesSaveAs.Caption := cxGetResourceString(@sdxBtnSaveAs); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.UpdateControlsState; -begin - inherited; - ReportLink.UpdateStatePrintModeControl(cbxPrintMode); - lblPrintMode.Visible := cbxPrintMode.Visible; - bvlMultipleRecords.Visible := cbxPrintMode.Visible; - - chbxBestFit.Enabled := not chbxAutoWidth.Checked; - chbxKeepSameRecordWidths.Enabled := chbxBestFit.Enabled and chbxBestFit.Checked; - chbxOneWrappingPerPage.Enabled := chbxPaginateByWrapping.Checked; - - lbxStyles.Enabled := AreNativeStylesAvailable; - btnStyleColor.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleFont.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmap.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStyleBackgroundBitmapClear.Enabled := AreNativeStylesAvailable and HasSelectedStylesWithAssignedBitmap; - btnStyleRestoreDefaults.Enabled := AreNativeStylesAvailable and HasSelectedStyles; - btnStylesSaveAs.Enabled := CanSaveStyles; - - lblStyleSheets.Enabled := AreNativeStylesAvailable; - cbxStyleSheets.Enabled := AreNativeStylesAvailable; - btnStyleSheetNew.Enabled := CanCreateStyleSheet; - btnStyleSheetCopy.Enabled := CanCopyStyleSheet; - btnStyleSheetDelete.Enabled := CanDeleteStyleSheet; - btnStyleSheetRename.Enabled := CanRenameStyleSheet; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.UpdatePreview; -const - TransparentsMap: array[Boolean] of TcxImageTransparency = (gtOpaque, gtTransparent); -begin - PreviewVGrid.Enabled := False; - PreviewVGrid.Font := ReportLink.Font; - CustomVerticalGrid_GetCategoryFont(PreviewVGrid).Assign(ReportLink.CategoryFont); - - TcxImageProperties(rowPicture.Properties.EditProperties).GraphicTransparency := - TransparentsMap[ReportLink.OptionsRefinements.TransparentGraphics]; - - PreviewVGrid.OptionsView.ShowHeaders := ReportLink.OptionsView.Headers; - PreviewVGrid.OptionsView.ShowButtons := ReportLink.OptionsView.ExpandButtons; - PreviewVGrid.Invalidate; -end; - -function TcxfmVerticalGridReportLinkDesignWindow.GetDesignerTabIndex: Integer; -begin - Result := PageControl1.ActivePage.TabIndex; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.SetDesignerTabIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > PageControl1.PageCount - 1 then - Value := PageControl1.PageCount - 1; - PageControl1.ActivePage := PageControl1.Pages[Value]; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.DoActiveStyleSheetChanged; -begin - lbxStyles.ReportLinkStyles := ReportLink.ActiveStyles; - inherited; - with cbxStyleSheets do - ItemIndex := Items.IndexOfObject(ActiveStyleSheet); - - if not LockControlsUpdate then - begin - Modified := True; - UpdatePreview; - end; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.DoFormActivated(AnActive: Boolean); -begin - inherited; - if not AnActive then lbxStyles.HideToolTips; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.DoRefreshStylesList; -var - Styles: TcxVerticalGridReportLinkStyles; - List: TList; -begin - Styles := ReportLink.ActiveStyles; - with lbxStyles.Items do - begin - BeginUpdate; - try - List := TList.Create; - try - SaveSelectedStyles(List); - try - Clear; - AddObject(cxGetResourceString(@sdxCategoryStyle), Styles.Category); - AddObject(cxGetResourceString(@sdxContentStyle), Styles.Content); - AddObject(cxGetResourceString(@sdxHeaderStyle), Styles.Header); - finally - RestoreSelectedStyles(List); - end; - finally - List.Free; - end; - finally - EndUpdate; - end; - end; - InitializePreviewVerticalGridStyles; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.DoStyleChanged(const ACaption: string; - AStyle: TcxStyle); -begin - inherited; - UpdatePreviewVerticalGridStyles(ACaption, AStyle); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.DoStylesChanged(AStrings: TStrings; - ARecreate: Boolean); -begin - if ARecreate then - RecreateStylesListBox - else - lbxStyles.Invalidate; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.GetSelectedStyleNames(AStrings: TStrings); -var - I: Integer; -begin - AStrings.Clear; - with lbxStyles do - for I := 0 to Items.Count - 1 do - if Selected[I] then - AStrings.AddObject(Items[I], Items.Objects[I]); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.GetStyleSheetNames(out AStrings: TStrings); -begin - AStrings := cbxStyleSheets.Items; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.GetStyleNames(out AStrings: TStrings); -begin - AStrings := lbxStyles.Items; -end; - -function TcxfmVerticalGridReportLinkDesignWindow.GetActiveStyle: TcxStyle; -begin - with lbxStyles do - if ItemIndex <> -1 then - Result := TcxStyle(Items.Objects[ItemIndex]) - else - Result := nil; -end; - -function TcxfmVerticalGridReportLinkDesignWindow.GetComponent: TcxCustomVerticalGrid; -begin - Result := inherited Component as TcxCustomVerticalGrid; -end; - -function TcxfmVerticalGridReportLinkDesignWindow.GetHasSelectedStyles: Boolean; -begin - Result := lbxStyles.SelCount <> 0; -end; - -function TcxfmVerticalGridReportLinkDesignWindow.GetHasSelectedStylesWithAssignedBitmap: Boolean; -var - Styles: TStrings; - I: Integer; - cxStyle: TcxStyle; -begin - Result := True; - Styles := TStringList.Create; - try - GetSelectedStyleNames(Styles); - for I := 0 to Styles.Count - 1 do - begin - cxStyle := TcxStyle(Styles.Objects[I]); - if (cxStyle <> nil) and (cxStyle.Bitmap <> nil) and not cxStyle.Bitmap.Empty then - Exit; - end; - finally - Styles.Free; - end; - Result := False; -end; - -function TcxfmVerticalGridReportLinkDesignWindow.GetReportLink: TcxCustomVerticalGridReportLink; -begin - Result := inherited ReportLink as TcxCustomVerticalGridReportLink; -end; - -function TcxfmVerticalGridReportLinkDesignWindow.CanSelectAllStyles: Boolean; -var - I: Integer; -begin - Result := AreNativeStylesAvailable; - if Result then - begin - for I := 0 to lbxStyles.Items.Count - 1 do - if not lbxStyles.Selected[I] then Exit; - Result := False; - end; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.CreateControls; - - procedure CreateStylesListBox; - begin - lbxStyles := TdxStylesListBox.Create(Self); - lbxStyles.Parent := tshStyles; - lbxStyles.BoundsRect := bvlStylesHost.BoundsRect; - lbxStyles.PopupMenu := pmStyles; - lbxStyles.TabOrder := chbxUseNativeStyles.TabOrder + 1; - lbxStyles.OnClick := lbxStylesClick; - bvlStylesHost.Visible := False; - - dxPSPopupMan.dxPSPopupMenuController.RegisterControl(lbxStyles); - end; - -begin - CreateStylesListBox; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.CustomDrawTextRect(ACanvas: TcxCanvas; - AViewInfo: TcxRowValueInfo; const AText: string); -const - AlignmentHorz = cxAlignLeft; - AlignmentVert = cxAlignTop; -var - R: TRect; -begin - with AViewInfo do - begin - R := BoundsRect; - - if ViewParams.Bitmap = nil then - begin - ACanvas.Brush.Color := ViewParams.Color; - ACanvas.FillRect(R); - end - else - dxBkgnd.DrawPicture(ViewParams.Bitmap, ACanvas.Canvas, R, ppmTile, 1, 1, -R.Left, -R.Top); - - InflateRect(R, -2, -1); - if ViewParams.Font <> nil then - ACanvas.Font := ViewParams.Font; - ACanvas.Font.Color := ViewParams.TextColor; - ACanvas.Brush.Style := bsClear; - ACanvas.DrawText(AText, R, AlignmentHorz or AlignmentVert or cxSingleLine); - ACanvas.Brush.Style := bsSolid; - end; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.InitializePreviewVerticalGridStyles; - - procedure ResetEvents(AStyles: TcxVerticalGridStyles); - begin - with AStyles do - begin - OnGetCategoryStyle := nil; - OnGetHeaderStyle := nil; - OnGetContentStyle := nil; - end; - end; - -var - Styles: TcxVerticalGridReportLinkStyles; -begin - if ReportLink.OptionsFormatting.UseNativeStyles then - begin - dxPScxCommon.dxPSResetStyles(PreviewVGrid.Styles); - - Styles := ReportLink.ActiveStyles; - with PreviewVGrid.Styles do - begin - Category := Styles.Category; - Content := Styles.Content; - Header := Styles.Header; - end; - end - else - if Component <> nil then - PreviewVGrid.Styles := Component.Styles - else - dxPScxCommon.dxPSResetStyles(PreviewVGrid.Styles); - - ResetEvents(PreviewVGrid.Styles); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.LoadDataIntoPreviewVerticalGrid; -const - RowCount = 6; - RowEditProperties: array[0..RowCount - 1] of TcxCustomEditPropertiesClass = - (TcxTextEditProperties, TcxTextEditProperties, TcxImageProperties, - TcxMemoProperties, TcxTextEditProperties, TcxMemoProperties); - RowHeights: array[0..RowCount - 1] of Integer = - (-1, -1, 116, 57, -1, 44); - - function RowCaptionString(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdxCarManufacturer); - 1: Result := cxGetResourceString(@sdxCarModel); - 2: Result := cxGetResourceString(@sdxPicture); - 3: Result := cxGetResourceString(@sdxCarEngine); - 4: Result := cxGetResourceString(@sdxCarTransmission); - else - Result := cxGetResourceString(@sdxCarTires); - end; - end; - - function RowValueString(Index: Integer): string; - begin - case Index of - 0: Result := cxGetResourceString(@sdx760V12Manufacturer); - 1: Result := cxGetResourceString(@sdx760V12Model); - 2: Result := ''; - 3: Result := cxGetResourceString(@sdx760V12Engine); - 4: Result := cxGetResourceString(@sdx760V12Transmission); - else - Result := cxGetResourceString(@sdx760V12Tires); - end; - end; - -var - I: Integer; - S: AnsiString; -begin - rowLuxurySedan.Properties.Caption := cxGetResourceString(@sdxLuxurySedans); - for I := 0 to rowLuxurySedan.Count - 1 do - with TcxEditorRow(rowLuxurySedan.Rows[I]) do - begin - Properties.Caption := DropAmpersand(RowCaptionString(I)); - Properties.EditPropertiesClass := RowEditProperties[I]; - if RowValueString(I) <> '' then - Properties.Value := RowValueString(I); - if RowHeights[I] <> -1 then - Height := RowHeights[I]; - end; - cxImage.SavePicture(PreviewImage, S); - rowPicture.Properties.Value := S; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.RecreateStylesListBox; -var - List: TList; -begin - List := TList.Create; - try - SaveSelectedStyles(List); - dxPSUtl.dxRecreateWnd(lbxStyles); - RestoreSelectedStyles(List); - finally - List.Free; - end; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.RestoreSelectedStyles(AList: TList); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - lbxStyles.Selected[Integer(AList[I])] := True; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.SaveSelectedStyles(AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to lbxStyles.Items.Count - 1 do - if lbxStyles.Selected[I] then AList.Add(TObject(I)); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.SetActivePage; -begin - PageControl1.ActivePage := PageControl1.Pages[DesignerTabIndex]; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.UpdatePreviewVerticalGridStyles(const ACaption: string; - AStyle: TcxStyle); -begin - with PreviewVGrid.Styles do - begin - if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxCategoryStyle)) then - Category := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxContentStyle)) then - Content := AStyle - else if dxPSUtl.dxSameText(ACaption, cxGetResourceString(@sdxHeaderStyle)) then - Header := AStyle; - end; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.SetOptionsExpandingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsExpanding do - case Index of - 0: AutoExpandRows := Value; - end; - Modified := True; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.SetOptionsFormattingByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsFormatting do - case Index of - 0: - begin - UseNativeStyles := Value; - InitializePreviewVerticalGridStyles; - end; - 1: SuppressBackgroundBitmaps := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.SetOptionsPaginationByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsPagination do - case Index of - 0: ByRows := Value; - 1: ByWrapping := Value; - 2: OneWrappingPerPage := Value; - end; - Modified := True; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.SetOptionsRefinementsByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsRefinements do - case Index of - 0: TransparentGraphics := Value; - 1: DisplayGraphicsAsText := Value; - 2: FlatCheckMarks := Value; - {$IFDEF DXVER500} - 3: TransparentRichEdits := Value; - {$ENDIF} - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.SetOptionsSizeByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsSize do - case Index of - 0: AutoWidth := Value; - 1: BestFit := Value; - 2: KeepSameRecordWidths := Value; - 3: WrapRecords := Value; - end; - Modified := True; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.SetOptionsViewByIndex(Index: Integer; - Value: Boolean); -begin - if LockControlsUpdate then Exit; - with ReportLink.OptionsView do - case Index of - 0: Headers := Value; - 1: ExpandButtons := Value; - 2: Borders := Value; - end; - Modified := True; - UpdatePreview; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.PreviewVGridDrawValue( - Sender: TObject; ACanvas: TcxCanvas; APainter: TcxvgPainter; - AValueInfo: TcxRowValueInfo; var Done: Boolean); -begin - if AValueInfo.Row = rowPicture then - with ReportLink.OptionsRefinements do - if DisplayGraphicsAsText then - begin - CustomDrawTextRect(ACanvas, AValueInfo, GraphicsText); - Done := True; - end; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.cbxStyleSheetsClick(Sender: TObject); -begin - with TComboBox(Sender) do - ActiveStyleSheet := TcxCustomStyleSheet(Items.Objects[ItemIndex]); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.btnStyleSheetNewClick(Sender: TObject); -begin - PerformStyleSheetNew; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.btnStyleSheetCopyClick( - Sender: TObject); -begin - PerformStyleSheetCopy; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.btnStyleSheetDeleteClick(Sender: TObject); -begin - PerformStyleSheetDelete; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.btnStyleSheetRenameClick(Sender: TObject); -begin - PerformStyleSheetRename; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.miStylesSelectAllClick(Sender: TObject); -{$IFNDEF DELPHI6} -var - I: Integer; -{$ENDIF} -begin - with lbxStyles do - begin - {$IFDEF DELPHI6} - SelectAll; - {$ELSE} - Items.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - Selected[I] := True; - finally - Items.EndUpdate; - end; - {$ENDIF} - end; - UpdateControlsState; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.StylesSaveAsClick(Sender: TObject); -begin - PerformStylesSaveAsStyleSheet; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.cbxStyleSheetsKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - PerformStyleSheetKeyDown(Sender, Key, Shift); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.cbxStyleSheetsDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -begin - PerformStyleSheetDrawItem(TComboBox(Control).Canvas, Index, Rect, State, Control.Enabled); -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.lbxStylesClick(Sender: TObject); -begin - if not LockControlsUpdate then - UpdateControlsState; -end; - -procedure TcxfmVerticalGridReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreviewWindow.Parent := TPageControl(Sender).ActivePage; -end; - -procedure RegisterAssistants; -begin - TcxVerticalGridCustomRowHelper.Register; - TcxVerticalGridCategoryRowHelper.Register; - TcxVerticalGridCustomEditorRowHelper.Register; - TcxVerticalGridEditorRowHelper.Register; - TcxVerticalGridDBEditorRowHelper.Register; - TcxVerticalGridCustomMultiEditorRowHelper.Register; - - TcxVerticalGridReportLinkStyleSheet.Register; -end; - -procedure UnregisterAssistants; -begin - TcxVerticalGridReportLinkStyleSheet.Unregister; - - TcxVerticalGridCustomMultiEditorRowHelper.Unregister; - TcxVerticalGridDBEditorRowHelper.Unregister; - TcxVerticalGridEditorRowHelper.Unregister; - TcxVerticalGridCustomEditorRowHelper.Unregister; - TcxVerticalGridCategoryRowHelper.Unregister; - TcxVerticalGridCustomRowHelper.Unregister; - - TcxVerticalGridRowHelperFactory.ReleaseInstance; -end; - -procedure RegisterVGridReportLink(AReportLinkClass: TdxReportLinkClass; AVGridClass: TComponentClass); -begin - dxPSRegisterReportLink(AReportLinkClass, AVGridClass, TcxfmVerticalGridReportLinkDesignWindow); -end; - -procedure UnregisterVGridReportLink(AReportLinkClass: TdxReportLinkClass; AVGridClass: TComponentClass); -begin - dxPSUnregisterReportLink(AReportLinkClass, AVGridClass, TcxfmVerticalGridReportLinkDesignWindow); -end; - -initialization - RegisterAssistants; - - RegisterVGridReportLink(TcxVerticalGridReportLink, TcxVerticalGrid); - RegisterVGridReportLink(TcxRTTIInspectorReportLink, TcxRTTIInspector); - RegisterVGridReportLink(TcxDBVerticalGridReportLink, TcxDBVerticalGrid); - RegisterVGridReportLink(TcxVirtualVerticalGridReportLink, TcxVirtualVerticalGrid); - -finalization - UnregisterVGridReportLink(TcxVirtualVerticalGridReportLink, TcxVirtualVerticalGrid); - UnregisterVGridReportLink(TcxDBVerticalGridReportLink, TcxDBVerticalGrid); - UnregisterVGridReportLink(TcxRTTIInspectorReportLink, TcxRTTIInspector); - UnregisterVGridReportLink(TcxVerticalGridReportLink, TcxVerticalGrid); - - UnregisterAssistants; - FreeAndNil(FDefaultdxPScxVerticalGridLinkStyleSheet); - FreeAndNil(FBMW760Li); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnkPredefinedStyleSheets.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnkPredefinedStyleSheets.dfm deleted file mode 100644 index 864f94ce..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,113 +0,0 @@ -object cxdmPScxVGridLnkPredefinedStyles: TcxdmPScxVGridLnkPredefinedStyles - OldCreateOrder = False - Left = 435 - Top = 202 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 63 - Top = 28 - object styleProfessionalCategory: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 7566195 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGrayCategory: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6579300 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGrayHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8559005 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentCategory: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TcxVerticalGridReportLinkStyleSheet - Caption = 'Professional' - Styles.Category = styleProfessionalCategory - Styles.Content = styleNoneContent - Styles.Header = styleProfessionalHeader - BuiltIn = True - end - object ssGray: TcxVerticalGridReportLinkStyleSheet - Caption = 'Gray' - Styles.Category = styleGrayCategory - Styles.Content = styleNoneContent - Styles.Header = styleGrayHeader - BuiltIn = True - end - object ssTransparent: TcxVerticalGridReportLinkStyleSheet - Caption = 'Transparent' - Styles.Category = styleTransparentCategory - Styles.Content = styleTransparentContent - Styles.Header = styleTransparentHeader - BuiltIn = True - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnkPredefinedStyleSheets.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnkPredefinedStyleSheets.pas deleted file mode 100644 index 8b52c4b3..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnkPredefinedStyleSheets.pas +++ /dev/null @@ -1,122 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxVGridLnkPredefinedStyleSheets; - -interface - -{$I cxVer.inc} - -uses - Classes, {$IFNDEF DELPHI6} Forms, {$ENDIF} cxClasses, cxStyles, dxPScxVGridLnk, - dxPScxCommon; - -type - TcxdmPScxVGridLnkPredefinedStyles = class(TDataModule) - StyleRepository: TcxStyleRepository; - styleGrayCategory: TcxStyle; - styleProfessionalCategory: TcxStyle; - styleGrayHeader: TcxStyle; - styleProfessionalHeader: TcxStyle; - styleNoneContent: TcxStyle; - ssProfessional: TcxVerticalGridReportLinkStyleSheet; - ssGray: TcxVerticalGridReportLinkStyleSheet; - ssTransparent: TcxVerticalGridReportLinkStyleSheet; - styleTransparentCategory: TcxStyle; - styleTransparentHeader: TcxStyle; - styleTransparentContent: TcxStyle; - end; - -implementation - -{$R *.dfm} - -uses - cxStyleSheetsLoad; - -type - TcxPScxVGridLnkPredefinedStyleSheets = class(TcxPredefinedStyleSheets) - private - FDataModule: TcxdmPScxVGridLnkPredefinedStyles; - protected - procedure AddStyleSheets; override; - property DataModule: TcxdmPScxVGridLnkPredefinedStyles read FDataModule; - public - constructor Create; override; - destructor Destroy; override; - - class procedure Register; - class procedure Unregister; - end; - -constructor TcxPScxVGridLnkPredefinedStyleSheets.Create; -begin - inherited; - FDataModule := TcxdmPScxVGridLnkPredefinedStyles.Create(nil); - AddStyleSheets; -end; - -destructor TcxPScxVGridLnkPredefinedStyleSheets.Destroy; -begin - FDataModule.Free; - inherited; -end; - -class procedure TcxPScxVGridLnkPredefinedStyleSheets.Register; -begin - cxStyleSheetsLoad.RegisterPredefinedStyleSheets(Self); -end; - -class procedure TcxPScxVGridLnkPredefinedStyleSheets.Unregister; -begin - cxStyleSheetsLoad.UnregisterPredefinedStyleSheets(Self); -end; - -procedure TcxPScxVGridLnkPredefinedStyleSheets.AddStyleSheets; -var - I: Integer; -begin - with DataModule.StyleRepository do - for I := 0 to StyleSheetCount - 1 do - AddStyleSheet(StyleSheets[I]); -end; - -initialization - TcxPScxVGridLnkPredefinedStyleSheets.Register; - -finalization - TcxPScxVGridLnkPredefinedStyleSheets.Unregister; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnkReg.pas deleted file mode 100644 index 8a08fc62..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPScxVGridLnkReg.pas +++ /dev/null @@ -1,215 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPScxVGridLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Windows, Classes, Controls, StdCtrls, cxStyles, cxStyleSheetEditor, - cxCustomData, cxVGrid, cxEdit, cxTextEdit, cxMemo, cxImage, dxPSRes, dxPSUtl, - dxPScxCommon, dxPScxVGridLnk; - -type - TcxVerticalGridReportLinkStyleSheetEditorPreview = class(TcxStyleSheetEditorPreview) - private - FVerticalGrid: TcxVerticalGrid; - protected - procedure Initialize; virtual; - property VerticalGrid: TcxVerticalGrid read FVerticalGrid; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - class function GetStyleSheetClass: TcxCustomStyleSheetClass; override; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); override; - - function Control: TWinControl; override; - function GetSize: TPoint; override; - - class procedure Register; - class procedure Unregister; - end; - -constructor TcxVerticalGridReportLinkStyleSheetEditorPreview.Create(AOwner: TComponent); -begin -// inherited; cannot call ancestor method if it's an abstract method in Delphi4(5) !!!! - FVerticalGrid := TcxVerticalGrid.Create(AOwner); - Initialize; -end; - -destructor TcxVerticalGridReportLinkStyleSheetEditorPreview.Destroy; -begin - FVerticalGrid.Free; - inherited; -end; - -class function TcxVerticalGridReportLinkStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := TcxVerticalGridReportLinkStyleSheet; -end; - -procedure TcxVerticalGridReportLinkStyleSheetEditorPreview.SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); -var - VGridStyles: TcxVerticalGridStyles; -begin - if AStyleSheet is TcxVerticalGridReportLinkStyleSheet then - begin - VGridStyles := VerticalGrid.Styles; - with TcxVerticalGridReportLinkStyleSheet(AStyleSheet).Styles do - begin - VGridStyles.Category := Category; - VGridStyles.Content := Content; - VGridStyles.Header := Header; - end; - end - else - VerticalGrid.Styles.ResetStyles; -end; - -function TcxVerticalGridReportLinkStyleSheetEditorPreview.Control: TWinControl; -begin - Result := VerticalGrid; -end; - -function TcxVerticalGridReportLinkStyleSheetEditorPreview.GetSize: TPoint; -var - I: Integer; -begin - Result := inherited GetSize; - with VerticalGrid.FirstRow do - begin - Result.Y := Height; - for I := 0 to Count - 1 do - Inc(Result.Y, Height); - end; -end; - -class procedure TcxVerticalGridReportLinkStyleSheetEditorPreview.Register; -begin - RegisterStyleSheetEditorPreview(Self); -end; - -class procedure TcxVerticalGridReportLinkStyleSheetEditorPreview.Unregister; -begin - UnregisterStyleSheetEditorPreview(Self); -end; - -procedure TcxVerticalGridReportLinkStyleSheetEditorPreview.Initialize; -const - RowCount = 7; - RowCaptions: array[0..RowCount - 1] of string = - (sdxLuxurySedans, sdxCarManufacturer, sdxCarModel, sdxPicture, sdxCarEngine, - sdxCarTransmission, sdxCarTires); - RowClasses: array[0..RowCount - 1] of TcxCustomRowClass = - (TcxCategoryRow, TcxEditorRow, TcxEditorRow, TcxEditorRow, TcxEditorRow, - TcxEditorRow, TcxEditorRow); - RowEditProperties: array[0..RowCount - 1] of TcxCustomEditPropertiesClass = - (nil, TcxTextEditProperties, TcxTextEditProperties, TcxImageProperties, - TcxMemoProperties, TcxTextEditProperties, TcxMemoProperties); - RowHeights: array[0..RowCount - 1] of Integer = - (-1, -1, -1, 116, 57, -1, 44); - RowValues: array[0..RowCount - 1] of string = - ('', sdx760V12Manufacturer, sdx760V12Model, '', sdx760V12Engine, - sdx760V12Transmission, sdx760V12Tires); -var - I: Integer; - Row: TcxCustomRow; -begin - VerticalGrid.ClearRows; - for I := 0 to RowCount - 1 do - begin - Row := VerticalGrid.Add(RowClasses[I]); - if Row is TcxEditorRow then - with TcxEditorRow(Row) do - begin - Properties.Caption := DropAmpersand(RowCaptions[I]); - Properties.EditPropertiesClass := RowEditProperties[I]; - Properties.Value := RowValues[I]; - if Properties.EditPropertiesClass.InheritsFrom(TcxImageProperties) then - Properties.Value := PreviewImageAsString; - if RowHeights[I] <> -1 then Height := RowHeights[I]; - Parent := VerticalGrid.FirstRow; - end - else - TcxCategoryRow(Row).Properties.Caption := DropAmpersand(RowCaptions[I]); - end; - VerticalGrid.OptionsData.Editing := False; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterNoIcon([TcxVerticalGridReportLink, TcxVirtualVerticalGridReportLink, - TcxRTTIInspectorReportLink, TcxDBVerticalGridReportLink, - TcxVerticalGridReportLinkStyleSheet]); - // Hide moved property - RegisterPropertyEditor(TypeInfo(Boolean), TcxVerticalGridReportLinkOptionsRefinements, - 'SuppressBackgroundBitmaps', nil); -end; - -procedure RegisterStyleSheetAssistants; -begin - cxStyles.RegisterStyleSheetClass(TcxVerticalGridReportLinkStyleSheet); - TcxVerticalGridReportLinkStyleSheetEditorPreview.Register; -end; - -procedure UnregisterStyleSheetAssistants; -begin - TcxVerticalGridReportLinkStyleSheetEditorPreview.Unregister; - cxStyles.UnregisterStyleSheetClass(TcxVerticalGridReportLinkStyleSheet); -end; - -initialization - RegisterStyleSheetAssistants; - -finalization - UnregisterStyleSheetAssistants; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBCtrlLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBCtrlLnk.pas deleted file mode 100644 index ce1baeaa..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBCtrlLnk.pas +++ /dev/null @@ -1,427 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxDBCtrlLnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Graphics, DB, dxTL, dxDBCtrl, dxPSCore, dxPSdxTLLnk; - -type - TdxDBTreeListImageColumnHelper = class(TdxTreeListColumnHelper) - protected - class procedure GetImageLists(AColumn: TdxTreeListColumn; AProc: TdxPSGetImageListProc); override; - public - class function ColumnClass: TdxTreeListColumnClass; override; - end; - - TdxDBTreeListControlReportLink = class(TCustomdxTreeListReportLink) - private - FBookmark: TBookmark; - FPrevGridMode: Boolean; - FPrevLockRefresh: Boolean; - FTopIndex: Integer; - function GetDBTreeListControl: TCustomdxDBTreeListControl; - protected - procedure AssignValues(ADataItem: TAbstractdxReportCellData; - ANode: TdxTreeListNode; AColumn, AReferenceColumn: TdxTreeListColumn); override; - function GetDataClass(AColumn: TdxTreeListColumn; - ANode: TdxTreeListNode): TdxReportCellDataClass; override; - function GetReferenceColumn(AColumn: TdxTreeListColumn; - ANode: TdxTreeListNode): TdxTreeListColumn; override; - function GetCheckColumnGlyph(AColumn: TdxTreeListColumn): TBitmap; override; - function IsCheckColumn(AColumn: TdxTreeListColumn): Boolean; override; - function IsGraphicColumn(AColumn: TdxTreeListColumn): Boolean; override; - function IsHyperLinkColumn(AColumn: TdxTreeListColumn): Boolean; override; - procedure PrepareConstruct(AReportCells: TdxReportCells); override; - procedure UnprepareConstruct(AReportCells: TdxReportCells); override; - - function GetPrevGridMode: Boolean; virtual; - function NeedLoadAllRecords: Boolean; virtual; - procedure SaveOptionsDB; virtual; - procedure TryLoadAllRecords; virtual; - procedure UnloadAllRecords; virtual; - - property DBTreeListControl: TCustomdxDBTreeListControl read GetDBTreeListControl; - public - function IsTreeListLink: Boolean; override; - end; - -var - FdxDBTreeListControlAssignDataProc: TdxTreeListAssignDataProc; - FdxDBTreeListControlColumnMapperProc: TdxTreeListColumnMapperProc; - -function DefaultdxDBTreeListControlColumnMapperProc(AColumn: TdxTreeListColumn; - AReportLink: TCustomdxTreeListReportLink; ANode: TdxTreeListNode): TdxReportCellDataClass; -procedure DefaultdxDBTreeListControlAssignDataProc(AReportLink: TCustomdxTreeListReportLink; - ADataItem: TAbstractdxReportCellData; TreeList: TCustomdxTreeList; - ANode: TdxTreeListNode; AColumn, AReferenceColumn: TdxTreeListColumn); - -implementation - -uses - StdCtrls, dxExEdtr, dxDBTLCL, dxPSGlbl, cxDrawTextUtils; - -type - TCustomdxDBTreeListControlAccess = class(TCustomdxDBTreeListControl); - TdxDBTreeListGraphicColumnAccess = class(TdxDBTreeListGraphicColumn); - TCustomdxTreeListControlAccess = class(TCustomdxTreeListControl); - TdxDBTreeListWrapperColumnAccess = class(TdxDBTreeListWrapperColumn); - -{ - generic text columns - - TdxDBTreeListColumn, TdxDBTreeListMaskColumn, TdxDBTreeListButtonColumn, - TdxDBTreeListDateColumn, TdxDBTreeListSpinColumn, TdxDBTreeListExtLookupColumn, - TdxDBTreeListPickColumn, TdxDBTreeListCalcColumn, TdxDBTreeListHyperLinkColumn, - TdxDBTreeListTimeColumn, TdxDBTreeListCurrencyColumn, TdxDBTreeListMemoColumn, - TdxDBTreeListPopupColumn, TdxDBTreeListExtLookupColumn} - -function DefaultdxDBTreeListControlColumnMapperProc(AColumn: TdxTreeListColumn; - AReportLink: TCustomdxTreeListReportLink; ANode: TdxTreeListNode): TdxReportCellDataClass; -const - CheckClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellCheckImage, TdxReportCellString); - ImageClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellGraphic, TdxReportCellImage); - GraphicClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellString, TdxReportCellGraphic); -begin - if AColumn is TdxDBTreeListCheckColumn then - Result := CheckClasses[tlpoCheckMarksAsText in AReportLink.Options] - else - if AColumn is TdxDBTreeListImageColumn then - Result := ImageClasses[TdxDBTreeListImageColumn(AColumn).ShowDescription] - else - Result := GraphicClasses[(AColumn is TdxDBTreeListGraphicColumn) and not (tlpoGraphicAsText in AReportLink.Options)]; -end; - -procedure DefaultdxDBTreeListControlAssignDataProc(AReportLink: TCustomdxTreeListReportLink; - ADataItem: TAbstractdxReportCellData; TreeList: TCustomdxTreeList; - ANode: TdxTreeListNode; AColumn, AReferenceColumn: TdxTreeListColumn); -var - ATreeList: TCustomdxTreeListControlAccess; - GraphicClass: TGraphicClass; - Stub, AImageIndex: Integer; - AState: TCheckBoxState; - NullStyle: TdxShowNullFieldStyle; - S: string; -begin - ATreeList := TCustomdxTreeListControlAccess(TreeList); - - if ADataItem is TdxReportCellCheck then - begin - with TdxReportCellCheckImage(ADataItem) do - begin - S := ATreeList.GetNodeString(ANode, AColumn.Index); - AState := TCheckBoxState(TdxDBTreeListCheckColumn(AReferenceColumn).GetCheckBoxState(S)); - NullStyle := TdxDBTreeListCheckColumn(AReferenceColumn).ShowNullFieldStyle; - Enabled := (AState <> cbGrayed) or (NullStyle = nsUnchecked); - Checked := (AState = cbChecked) or ((AState = cbGrayed) and (NullStyle = nsGrayedChecked)); - FlatBorder := TdxDBTreeListControlReportLink(AReportLink).FlatCheckMarks; - if not TdxDBTreeListCheckColumn(AReferenceColumn).Glyph.Empty then - begin - Glyph := TdxDBTreeListCheckColumn(AReferenceColumn).Glyph; - GlyphCount := TdxDBTreeListCheckColumn(AReferenceColumn).GlyphCount; - end; - end; - Exit; - end; - - if AColumn is TdxDBTreeListMemoColumn then - begin - with TdxReportCellString(ADataItem) do - begin - Text := ATreeList.GetDisplayValue(ANode, AColumn.Index); - EndEllipsis := aoDrawEndEllipsis in TreeList.Options; - Multiline := True; - TextAlignX := dxTextAlignX[ATreeList.GetCellAlignment(ANode, AColumn.Index)]; - TextAlignY := taTop; - end; - Exit; - end; - - if ADataItem is TdxReportCellImage then - begin - with TdxReportCellImage(ADataItem) do - begin - S := ATreeList.GetDisplayValue(ANode, AColumn.Index); - Text := AReferenceColumn.GetDisplayValue(ANode, S); - EndEllipsis := True; - Multiline := TdxDBTreeListImageColumn(AReferenceColumn).MultilineText; - TextAlignX := dxTextAlignX[ATreeList.GetCellAlignment(ANode, {AReferenceColumn ?}AColumn.Index)]; - if Multiline then - TextAlignY := dxMultilineTextAlignY[Multiline] - else - TextAlignY := dxTextAlignY[AReferenceColumn.VertAlignment]; - S := ATreeList.GetCellText(ANode, AColumn.Index); - TdxDBTreeListImageColumn(AColumn).GetIndexes(S, AImageIndex, Stub); - ImageList := TdxDBTreeListImageColumn(AReferenceColumn).Images; - ImageIndex := AImageIndex; - MakeSpaceForEmptyImage := True; - end; - Exit; - end; - - if ADataItem is TdxReportCellGraphic then - begin - if AColumn is TdxDBTreeListGraphicColumn then - begin - GraphicClass := TdxDBTreeListGraphicColumnAccess(AReferenceColumn).GetGraphicClass(ANode); - LoadPicture(FPicture, GraphicClass, ANode.Values[AColumn.Index]); - if GraphicClass = nil then GraphicClass := TBitmap; - with TdxReportCellGraphic(ADataItem) do - begin - Image := FPicture.Graphic; - ImageTransparent := (tlpoTransparentColumnGraphic in AReportLink.Options) or GraphicClass.InheritsFrom(TIcon); - if not GraphicClass.InheritsFrom(TIcon) and TdxDBTreeListGraphicColumn(AReferenceColumn).Stretch then - DrawMode := gdmStretchProportional - else - begin - if TdxDBTreeListGraphicColumn(AReferenceColumn).Center then - DrawMode := gdmCenter - else - DrawMode := gdmNone; - end; - end; - end - else - begin - with TdxReportCellGraphic(ADataItem) do - begin - ImageTransparent := True; - ImageList := TdxDBTreeListImageColumn(AReferenceColumn).Images; - S := ATreeList.GetCellText(ANode, AColumn.Index); - TdxDBTreeListImageColumn(AReferenceColumn).GetIndexes(S, AImageIndex, Stub); - ImageIndex := AImageIndex; - DrawMode := gdmCenter; - end - end; - Exit; - end; - - with TdxReportCellString(ADataItem) do - begin - if AColumn is TdxDBTreeListGraphicColumn then - begin - Text := AReportLink.GraphicAsTextValue; - Multiline := False; - end - else - begin - Text := ATreeList.GetDisplayValue(ANode, AColumn.Index); - Multiline := TdxDBTreeListGraphicColumnAccess(AReferenceColumn).IsColumnMultiline or - ((ATreeList.GetHeaderMaxRowCount = 1) and (aoRowAutoHeight in ATreeList.OptionsEx)); - //(ATreeList.GetRowLineCount(ANode, Stub) > 1) or (aoRowAutoHeight in ATreeList.OptionsEx); - //AColumn.HeaderMaxLineCount = 0; - end; - EndEllipsis := ATreeList.IsDrawEndEllipsis; - TextAlignX := dxTextAlignX[ATreeList.GetCellAlignment(ANode, AColumn.Index)]; - if Multiline then - TextAlignY := dxMultilineTextAlignY[Multiline] - else - if AReferenceColumn.VertAlignment in [tlTop, tlCenter] then - TextAlignY := taCenterY - else - TextAlignY := taBottom; -// TextAlignY := dxTextAlignY[AReferenceColumn.VertAlignment]; - end; -end; - -{ TdxDBTreeListImageColumnHelper } - -class function TdxDBTreeListImageColumnHelper.ColumnClass: TdxTreeListColumnClass; -begin - Result := TdxDBTreeListImageColumn; -end; - -class procedure TdxDBTreeListImageColumnHelper.GetImageLists(AColumn: TdxTreeListColumn; - AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(TdxDBTreeListImageColumn(AColumn).Images); -end; - -{ TdxDBTreeListControlReportLink } - -procedure TdxDBTreeListControlReportLink.AssignValues(ADataItem: TAbstractdxReportCellData; - ANode: TdxTreeListNode; AColumn, AReferenceColumn: TdxTreeListColumn); -begin - if Assigned(FdxDBTreeListControlAssignDataProc) then - FdxDBTreeListControlAssignDataProc(Self, ADataItem, DBTreeListControl, ANode, - AColumn, AReferenceColumn); -end; - -function TdxDBTreeListControlReportLink.GetDataClass(AColumn: TdxTreeListColumn; - ANode: TdxTreeListNode): TdxReportCellDataClass; -begin - if Assigned(FdxDBTreeListControlColumnMapperProc) then - Result := FdxDBTreeListControlColumnMapperProc(AColumn, Self, ANode) - else - Result := nil; -end; - -function TdxDBTreeListControlReportLink.GetDBTreeListControl: TCustomdxDBTreeListControl; -begin - Result := TCustomdxDBTreeListControl(Component); -end; - -function TdxDBTreeListControlReportLink.GetReferenceColumn(AColumn: TdxTreeListColumn; - ANode: TdxTreeListNode): TdxTreeListColumn; -begin - if AColumn is TdxDBTreeListWrapperColumn then - begin - Result := TdxDBTreeListWrapperColumnAccess(AColumn).ReferenceColumn(ANode); - if Result = nil then Result := AColumn; - end - else - Result := AColumn; -end; - -function TdxDBTreeListControlReportLink.GetCheckColumnGlyph(AColumn: TdxTreeListColumn): TBitmap; -begin - Result := TdxDBTreeListCheckColumn(AColumn).Glyph; - if (Result <> nil) and Result.Empty then - Result := nil; -end; - -function TdxDBTreeListControlReportLink.IsCheckColumn(AColumn: TdxTreeListColumn): Boolean; -begin - Result := AColumn is TdxDBTreeListCheckColumn; -end; - -function TdxDBTreeListControlReportLink.IsGraphicColumn(AColumn: TdxTreeListColumn): Boolean; -begin - Result := AColumn is TdxDBTreeListGraphicColumn; -end; - -function TdxDBTreeListControlReportLink.IsHyperLinkColumn(AColumn: TdxTreeListColumn): Boolean; -begin - Result := AColumn is TdxDBTreeListHyperLinkColumn; -end; - -function TdxDBTreeListControlReportLink.IsTreeListLink: Boolean; -begin - Result := False; -end; - -procedure TdxDBTreeListControlReportLink.PrepareConstruct(AReportCells: TdxReportCells); -var - DataSet: TDataSet; -begin - if DBTreeListControl.DataSource <> nil then - begin - DataSet := DBTreeListControl.DataSource.DataSet; - if DataSet <> nil then - begin - FPrevLockRefresh := TCustomdxDBTreeListControlAccess(DBTreeListControl).LockRefresh; - TCustomdxDBTreeListControlAccess(DBTreeListControl).LockRefresh := True; - DataSet.DisableControls; - if DataSet.Active and (DataSet.RecordCount > 0) then - FBookmark := DataSet.GetBookmark; - FTopIndex := TCustomdxTreeListControlAccess(DBTreeListControl).TopIndex; - FPrevGridMode := GetPrevGridMode; - SaveOptionsDB; - if FPrevGridMode and NeedLoadAllRecords then - try - TryLoadAllRecords; - except - UnloadAllRecords; - FPrevGridMode := False; - raise; - end; - end; - end; - inherited; -end; - -function TdxDBTreeListControlReportLink.GetPrevGridMode: Boolean; -begin - Result := False; -end; - -function TdxDBTreeListControlReportLink.NeedLoadAllRecords: Boolean; -begin - Result := not (csDesigning in Component.ComponentState); //True; -end; - -procedure TdxDBTreeListControlReportLink.SaveOptionsDB; -begin -end; - -procedure TdxDBTreeListControlReportLink.TryLoadAllRecords; -begin -end; - -procedure TdxDBTreeListControlReportLink.UnloadAllRecords; -begin -end; - -procedure TdxDBTreeListControlReportLink.UnprepareConstruct(AReportCells: TdxReportCells); -var - DataSet: TDataSet; -begin - if DBTreeListControl.DataSource <> nil then - begin - DataSet := DBTreeListControl.DataSource.DataSet; - if DataSet <> nil then - begin - //if AutoNodesExpand or{and} FPrevGridMode then - if FPrevGridMode and NeedLoadAllRecords then - UnloadAllRecords; - if (FBookmark <> nil) and DataSet.Active then - DataSet.GotoBookmark(FBookmark); - DataSet.FreeBookmark(FBookmark); - FBookmark := nil; - TCustomdxTreeListControlAccess(DBTreeListControl).TopIndex := FTopIndex; - DataSet.EnableControls; - TCustomdxDBTreeListControlAccess(DBTreeListControl).LockRefresh := FPrevLockRefresh; - end; - end; - inherited; -end; - -procedure RegisterHelpers; -begin - TdxDBTreeListImageColumnHelper.Register; -end; - -initialization - RegisterHelpers; - - if @FdxDBTreeListControlAssignDataProc = nil then - FdxDBTreeListControlAssignDataProc := DefaultdxDBTreeListControlAssignDataProc; - if @FdxDBTreeListControlColumnMapperProc = nil then - FdxDBTreeListControlColumnMapperProc := DefaultdxDBTreeListControlColumnMapperProc; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBGrLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBGrLnk.pas deleted file mode 100644 index 71a74722..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBGrLnk.pas +++ /dev/null @@ -1,143 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxDBGrLnk; - -interface - -{$I cxVer.inc} - -uses - dxTL, dxDBGrid, dxPSdxTLLnk, dxPSdxDBCtrlLnk; - -type - TdxDBGridReportLink = class(TdxDBTreeListControlReportLink) - private - FSaveOptionsDB: TdxDBGridOptionsDB; - function GetDBGrid: TdxDBGrid; - protected - function GetGroupColumnIndex(ANode: TdxTreeListNode): Integer; override; - function GetPrevGridMode: Boolean; override; - procedure InternalRestoreDefaults; override; - procedure SaveOptionsDB; override; - procedure TryLoadAllRecords; override; - procedure UnloadAllRecords; override; - public - function IsDBGridLink: Boolean; override; - function IsDBTreeListLink: Boolean; override; - - property DBGrid: TdxDBGrid read GetDBGrid; - published - property Options default [tlpoBands, tlpoHeaders, tlpoFooters, tlpoRowFooters, tlpoPreview, - tlpoPreviewGrid, tlpoGrid, tlpoFlatCheckMarks, tlpoSoft3D, tlpoRowFooterGrid, - tlpoExpandButtons]; - property OnCustomDrawBandCell; - property OnCustomDrawCell; - property OnCustomDrawFooterCell; - property OnCustomDrawHeaderCell; - property OnCustomDrawPreviewCell; - property OnCustomDrawRowFooterCell; - end; - -const - dxDefaultDBGridPaintOptions: TdxTreeListPaintOptions = - [tlpoBands, tlpoHeaders, tlpoFooters, tlpoRowFooters, tlpoPreview, - tlpoPreviewGrid, tlpoGrid, tlpoFlatCheckMarks, tlpoSoft3D, tlpoRowFooterGrid, - tlpoExpandButtons]; - -implementation - -uses - dxPSCore; - -{ TdxDBGridReportLink } - -function TdxDBGridReportLink.IsDBGridLink: Boolean; -begin - Result := True; -end; - -function TdxDBGridReportLink.IsDBTreeListLink: Boolean; -begin - Result := False; -end; - -function TdxDBGridReportLink.GetDBGrid: TdxDBGrid; -begin - Result := TdxDBGrid(Component) -end; - -procedure TdxDBGridReportLink.InternalRestoreDefaults; -begin - inherited InternalRestoreDefaults; - Options := dxDefaultDBGridPaintOptions; -end; - -function TdxDBGridReportLink.GetPrevGridMode: Boolean; -begin - Result := not (edgoLoadAllRecords in DBGrid.OptionsDB); -end; - -procedure TdxDBGridReportLink.SaveOptionsDB; -begin - FSaveOptionsDB := DBGrid.OptionsDB; -end; - -procedure TdxDBGridReportLink.TryLoadAllRecords; -begin - DBGrid.OptionsDB := DBGrid.OptionsDB + [edgoLoadAllRecords] - [edgoCanNavigation]; -end; - -procedure TdxDBGridReportLink.UnloadAllRecords; -begin - DBGrid.OptionsDB := FSaveOptionsDB; -end; - -function TdxDBGridReportLink.GetGroupColumnIndex(ANode: TdxTreeListNode): Integer; -begin - if ANode.HasChildren then - Result := DBGrid.GroupColumns[ANode.Level].Index - else - Result := inherited GetGroupColumnIndex(ANode); -end; - -initialization - dxPSRegisterReportLink(TdxDBGridReportLink, TdxDBGrid, TdxTLReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxDBGridReportLink, TdxDBGrid, TdxTLReportLinkDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBGrLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBGrLnkReg.pas deleted file mode 100644 index 02aec302..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBGrLnkReg.pas +++ /dev/null @@ -1,87 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxDBGrLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes, dxPSdxTLLnk, dxPSdxDBGrLnk; - -type - TdxDBGridOptionsPropertyEditor = class(TSetProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - -function TdxDBGridOptionsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -procedure TdxDBGridOptionsPropertyEditor.Edit; -var - I: Integer; -begin - inherited; - if TdxDBGridReportLink(GetComponent(0)).DesignReport() then - begin - Designer.Modified; - if PropCount > 1 then - for I := 1 to PropCount - 1 do - GetComponent(I).Assign(GetComponent(0)); - end; -end; - -procedure Register; -begin - RegisterNoIcon([TdxDBGridReportLink]); - RegisterPropertyEditor(TypeInfo(TdxTreeListPaintOptions), TdxDBGridReportLink, 'Options', TdxDBGridOptionsPropertyEditor); -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBInsLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBInsLnk.pas deleted file mode 100644 index ec25eed7..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBInsLnk.pas +++ /dev/null @@ -1,70 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxDBInsLnk; - -interface - -{$I cxVer.inc} - -uses - dxDBInsp, dxPSdxInsLnk; - -type - TdxDBInspectorReportLink = class(TCustomdxInspectorReportLink) - private - function GetDBInspector: TdxDBInspector; - public - property DBInspector: TdxDBInspector read GetDBInspector; - end; - -implementation - -uses - dxPSCore; - -function TdxDBInspectorReportLink.GetDBInspector: TdxDBInspector; -begin - Result := TdxDBInspector(Component); -end; - -initialization - dxPSRegisterReportLink(TdxDBInspectorReportLink, TdxDBInspector, TdxInspectorDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxDBInspectorReportLink, TdxDBInspector, TdxInspectorDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBOCLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBOCLnk.pas deleted file mode 100644 index 518fdf9f..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBOCLnk.pas +++ /dev/null @@ -1,77 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxDBOCLnk; - -interface - -{$I cxVer.inc} - -uses - dxDBOrgC, dxPSdxOCLnk; - -type - TdxDBOrgChartReportLink = class(TCustomdxOrgChartReportLink) - private - function GetDBOrgChart: TdxDBOrgChart; - public - property DBOrgChart: TdxDBOrgChart read GetDBOrgChart; - published - property BorderColor; - property Color; - property DrawBorder; - property FullExpand; - property Transparent; - property TransparentColor; - property UseMetafile; - end; - -implementation - -uses - dxPSCore; - -function TdxDBOrgChartReportLink.GetDBOrgChart: TdxDBOrgChart; -begin - Result := TdxDBOrgChart(Component); -end; - -initialization - dxPSRegisterReportLink(TdxDBOrgChartReportLink, TdxDBOrgChart, TdxOCReportLinkDesignWindow); - -finalization - dxPSUnRegisterReportLink(TdxDBOrgChartReportLink, TdxDBOrgChart, TdxOCReportLinkDesignWindow); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBOCLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBOCLnkReg.pas deleted file mode 100644 index 4fbe9570..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBOCLnkReg.pas +++ /dev/null @@ -1,61 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxDBOCLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI9} - DesignIntf, -{$ENDIF} - Classes, dxPSdxDBOCLnk; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TdxDBOrgChartReportLink]) -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTLLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTLLnk.pas deleted file mode 100644 index 51b6ffef..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTLLnk.pas +++ /dev/null @@ -1,150 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxDBTLLnk; - -interface - -{$I cxVer.inc} - -uses - dxDBTL, dxPSCore, dxPSdxTLLnk, dxPSdxDBCtrlLnk; - -type - TdxDBTreeListReportLink = class(TdxDBTreeListControlReportLink) - private - function GetDBTreeList: TdxDBTreeList; - function GetHasCollapsedNodes: Boolean; - protected - procedure GetOwnedImageLists(AProc: TdxPSGetImageListProc); override; - procedure InternalRestoreDefaults; override; - - function GetPrevGridMode: Boolean; override; - function NeedLoadAllRecords: Boolean; override; - procedure TryLoadAllRecords; override; - procedure UnloadAllRecords; override; - - property HasCollapsedNodes: Boolean read GetHasCollapsedNodes; - public - function IsDBGridLink: Boolean; override; - function IsDBTreeListLink: Boolean; override; - - property DBTreeList: TdxDBTreeList read GetDBTreeList; - published - property Options default [tlpoBands, tlpoHeaders, tlpoFooters, tlpoRowFooters, - tlpoPreview, tlpoPreviewGrid, tlpoGrid, tlpoFlatCheckmarks, tlpoSoft3D, - tlpoRowFooterGrid, tlpoTreeLines, tlpoExpandButtons]; - property OnCustomDrawBandCell; - property OnCustomDrawCell; - property OnCustomDrawFooterCell; - property OnCustomDrawHeaderCell; - property OnCustomDrawPreviewCell; - property OnCustomDrawRowFooterCell; - end; - -const - dxDefaultDBTreeListPaintOptions: TdxTreeListPaintOptions = - [tlpoBands, tlpoHeaders, tlpoFooters, tlpoRowFooters, tlpoPreview, tlpoPreviewGrid, - tlpoGrid, tlpoFlatCheckmarks, tlpoSoft3D, tlpoRowFooterGrid, tlpoTreeLines, tlpoExpandButtons]; - -implementation - -function TdxDBTreeListReportLink.IsDBGridLink: Boolean; -begin - Result := False; -end; - -function TdxDBTreeListReportLink.IsDBTreeListLink: Boolean; -begin - Result := True; -end; - -procedure TdxDBTreeListReportLink.GetOwnedImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(DBTreeList.Images); - AProc(DBTreeList.StateImages); -end; - -procedure TdxDBTreeListReportLink.InternalRestoreDefaults; -begin - inherited; - Options := dxDefaultDBTreeListPaintOptions; -end; - -function TdxDBTreeListReportLink.GetPrevGridMode: Boolean; -begin - Result := not (etoLoadAllRecords in DBTreeList.OptionsDB); -end; - -function TdxDBTreeListReportLink.NeedLoadAllRecords: Boolean; -begin - Result := inherited NeedLoadAllRecords and AutoNodesExpand and HasCollapsedNodes; -end; - -procedure TdxDBTreeListReportLink.TryLoadAllRecords; -begin - DBTreeList.OptionsDB := DBTreeList.OptionsDB + [etoLoadAllRecords]; -end; - -procedure TdxDBTreeListReportLink.UnloadAllRecords; -begin - DBTreeList.OptionsDB := DBTreeList.OptionsDB - [etoLoadAllRecords]; -end; - -function TdxDBTreeListReportLink.GetDBTreeList: TdxDBTreeList; -begin - Result := TdxDBTreeList(Component); -end; - -function TdxDBTreeListReportLink.GetHasCollapsedNodes: Boolean; -var - I: Integer; -begin - Result := True; - for I := 0 to DBTreeList.Count - 1 do - if DBTreeList.Items[I].Count <> 0 then - Exit; - Result := False; -end; - -initialization - dxPSCore.dxPSRegisterReportLink(TdxDBTreeListReportLink, TdxDBTreeList, TdxTLReportLinkDesignWindow); - -finalization - dxPSCore.dxPSUnregisterReportLink(TdxDBTreeListReportLink, TdxDBTreeList, TdxTLReportLinkDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTLLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTLLnkReg.pas deleted file mode 100644 index b4c18ffe..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTLLnkReg.pas +++ /dev/null @@ -1,88 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxDBTLLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes, dxPSdxTLLnk, dxPSdxDBTLLnk; - -type - TdxDBTreeListOptionsPropertyEditor = class(TSetProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - -function TdxDBTreeListOptionsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -procedure TdxDBTreeListOptionsPropertyEditor.Edit; -var - I: Integer; -begin - inherited; - if TdxDBTreeListReportLink(GetComponent(0)).DesignReport then - begin - Designer.Modified; - if PropCount > 1 then - for I := 1 to PropCount - 1 do - GetComponent(I).Assign(GetComponent(0)); - end; -end; - -procedure Register; -begin - RegisterNoIcon([TdxDBTreeListReportLink]); - RegisterPropertyEditor(TypeInfo(TdxTreeListPaintOptions), - TdxDBTreeListReportLink, 'Options', TdxDBTreeListOptionsPropertyEditor); -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTVLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTVLnk.pas deleted file mode 100644 index 5757deef..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTVLnk.pas +++ /dev/null @@ -1,158 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxDBTVLnk; - -interface - -{$I cxVer.inc} - -uses - DB, dxTree, dxDBTree, dxPSTVLnk; - -type - TdxTreeViewExReportLink = class(TCustomdxTreeViewReportLink) - private - function GetdxTreeView: TdxTreeView; - protected - procedure InternalRestoreFromOriginal; override; - public - property dxTreeView: TdxTreeView read GetdxTreeView; - published - property AutoNodesExpand; - property AutoWidth; - property Color; - property ExpandLevel; - property ExplicitTreeViewExpand; - property Font; - property GridLineColor; - property Options; - property ScaleFonts; - property SupportedCustomDraw; - property Transparent; - property TreeLineColor; - property UseVertDelimiters; - property Width; - - property OnCustomDrawNode; - property OnInitializeNode; - end; - - TdxDBTreeViewReportLink = class(TdxTreeViewExReportLink) - private - FBookmark: TBookmark; - function GetDBTreeView: TdxDBTreeView; - protected - procedure PrepareContruct; override; - procedure UnprepareContruct; override; - public - property DBTreeView: TdxDBTreeView read GetDBTreeView; - end; - -implementation - -uses - dxPSCore; - -{ TdxTreeViewExReportLink } - -function TdxTreeViewExReportLink.GetdxTreeView: TdxTreeView; -begin - Result := TdxTreeView(Component); -end; - -procedure TdxTreeViewExReportLink.InternalRestoreFromOriginal; -begin - inherited; - SupportedCustomDraw := dxTreeView.IsCustomDraw; -end; - -{ TdxDBTreeViewReportLink } - -function TdxDBTreeViewReportLink.GetDBTreeView: TdxDBTreeView; -begin - Result := TdxDBTreeView(Component); -end; - -procedure TdxDBTreeViewReportLink.PrepareContruct; -var - DataSet: TDataSet; -begin - inherited; - - if DBTreeView.DataSource <> nil then - DataSet := DBTreeView.DataSource.DataSet - else - DataSet := nil; - if DataSet <> nil then - begin - FBookmark := DataSet.GetBookmark; - DataSet.DisableControls; - end; -end; - -procedure TdxDBTreeViewReportLink.UnprepareContruct; -var - DataSet: TDataSet; -begin - if DBTreeView.DataSource <> nil then - DataSet := DBTreeView.DataSource.DataSet - else - DataSet := nil; - - if DataSet <> nil then - begin - if FBookmark <> nil then - begin - DataSet.GotoBookmark(FBookmark); - DataSet.FreeBookmark(FBookmark); - FBookmark := nil; - end; - DataSet.EnableControls; - end; - - inherited; -end; - -initialization - dxPSRegisterReportLink(TdxTreeViewExReportLink, TdxTreeView, TdxfmTVReportLinkDesignWindow); - dxPSRegisterReportLink(TdxDBTreeViewReportLink, TdxDBTreeView, TdxfmTVReportLinkDesignWindow); - -finalization - dxPSUnRegisterReportLink(TdxTreeViewReportLink, TdxDBTreeView, TdxfmTVReportLinkDesignWindow); - dxPSUnRegisterReportLink(TdxTreeViewExReportLink, TdxTreeView, TdxfmTVReportLinkDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTVLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTVLnkReg.pas deleted file mode 100644 index aa1ae018..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxDBTVLnkReg.pas +++ /dev/null @@ -1,61 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxDBTVLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI9} - DesignIntf, -{$ENDIF} - Classes, dxPSdxDBTVLnk; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TdxTreeViewExReportLink, TdxDBTreeViewReportLink]); -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxFCLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSdxFCLnk.dfm deleted file mode 100644 index 34784412..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxFCLnk.dfm +++ /dev/null @@ -1,410 +0,0 @@ -object dxFCReportLinkDesignWindow: TdxFCReportLinkDesignWindow - Left = 372 - Top = 310 - ActiveControl = chbxTransparent - BorderStyle = bsDialog - Caption = 'Report Designer' - ClientHeight = 319 - ClientWidth = 552 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 3 - Width = 544 - Height = 280 - ActivePage = tshOptions - MultiLine = True - TabOrder = 0 - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 536 - Height = 252 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblPreview: TLabel - Left = 242 - Top = 2 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 14 - Width = 226 - Height = 51 - Caption = ' ' - TabOrder = 1 - object lblColor: TLabel - Left = 7 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblColorClick - end - object bvlColorHolder: TBevel - Left = 86 - Top = 20 - Width = 132 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 17 - Top = 12 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = chbxTransparentClick - end - object gbxBorder: TGroupBox - Left = 5 - Top = 75 - Width = 226 - Height = 51 - Caption = ' ' - TabOrder = 3 - object lblGridLinesColor: TLabel - Left = 7 - Top = 24 - Width = 67 - Height = 13 - Caption = '&Border Color: ' - OnClick = lblColorClick - end - object bvlLineColorHolder: TBevel - Left = 86 - Top = 20 - Width = 132 - Height = 21 - Visible = False - end - end - object chbxDrawBorder: TCheckBox - Left = 17 - Top = 73 - Width = 15 - Height = 17 - TabOrder = 2 - OnClick = chbxDrawBorderClick - end - object stTransparent: TStaticText - Left = 32 - Top = 13 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 4 - OnClick = stTransparentClick - end - object stDrawBorder: TStaticText - Left = 32 - Top = 74 - Width = 70 - Height = 17 - Caption = ' Draw Border ' - FocusControl = chbxDrawBorder - TabOrder = 5 - OnClick = stDrawBorderClick - end - end - end - end - object pnlPreview: TPanel - Left = 250 - Top = 46 - Width = 288 - Height = 226 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 1 - end - object ilFlowChart: TImageList - Left = 36 - Top = 197 - Bitmap = { - 494C010101000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484008484840084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000FF00000000000000FF000000FF000000FF0000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000FFFF0000840000000084000000000000840000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000084000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000084000000000084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000008400000000000000000000848484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000FF000000FFFF0000FF000000840000000000000084 - 0000008400008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FF00000084 - 000000FF000000FF000000FF000000FF0000008400000084000000FF000000FF - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FF000000FF - 000000FF000000FF000000FF000000FF000000FF00000084000000FF000000FF - FF00008400008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000000FF - 0000000000000084000000FF000000FF000000FF000000FF000000FF00000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000FF000000FF00000084000000FF000000FF000000FF000000FF000000FF - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000008484840000FFFF000084000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000FF000000840000848484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFF000000000000FC3F000000000000 - F00F000000000000F00F000000000000FE7F000000000000FF7F000000000000 - FC3F000000000000F81F000000000000C0030000000000008003000000000000 - 8003000000000000C007000000000000F007000000000000F01F000000000000 - FE1F000000000000FFFF00000000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxFCLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxFCLnk.pas deleted file mode 100644 index e9b5f7eb..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxFCLnk.pas +++ /dev/null @@ -1,564 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxFCLnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, Graphics, Controls, Forms, StdCtrls, ComCtrls, ExtCtrls, - dxFlChrt, dxPSGraphicLnk, dxPSCore, ImgList; - -type - TdxFlowChartReportLink = class(TCustomdxGraphicReportLink) - private - FUseMetafile: Boolean; - function GetFlowChart: TdxCustomFlowChart; - protected - function GetGraphic: TGraphic; override; - function GetGraphicClass: TGraphicClass; override; - procedure InitializeGraphicItem(AnItem: TdxReportCellGraphic); override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - public - constructor Create(AOwner: TComponent); override; - procedure Assign(Source: TPersistent); override; - property FlowChart: TdxCustomFlowChart read GetFlowChart; - published - property BorderColor; - property Color; - property DrawBorder; - property Transparent; - property TransparentColor; - property UseMetafile: Boolean read FUseMetafile write FUseMetafile default True; - end; - - TdxFCReportLinkDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshOptions: TTabSheet; - pnlOptions: TPanel; - gbxTransparent: TGroupBox; - lblColor: TLabel; - bvlColorHolder: TBevel; - chbxTransparent: TCheckBox; - gbxBorder: TGroupBox; - lblGridLinesColor: TLabel; - bvlLineColorHolder: TBevel; - chbxDrawBorder: TCheckBox; - pnlPreview: TPanel; - ilFlowChart: TImageList; - lblPreview: TLabel; - stTransparent: TStaticText; - stDrawBorder: TStaticText; - procedure lblColorClick(Sender: TObject); - procedure chbxDrawBorderClick(Sender: TObject); - procedure chbxTransparentClick(Sender: TObject); - procedure stTransparentClick(Sender: TObject); - procedure stDrawBorderClick(Sender: TObject); - private - procedure ccbxColorChange(Sender: TObject); - procedure CreateControls; - function GetReportLink: TdxFlowChartReportLink; - procedure pbxPreviewPaint(Sender: TObject); - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdatePreview; override; - procedure UpdateControlsState; override; - public - ccbxColor: TCustomComboBox; - ccbxGridLineColor: TCustomComboBox; - FPreviewBox: TCustomControl; - constructor Create(AOwner: TComponent); override; - property ReportLink: TdxFlowChartReportLink read GetReportLink; - end; - - PdxFlowChartGetAsGraphicData = ^TdxFlowChartGetAsGraphicData; - TdxFlowChartGetAsGraphicData = record - FlowChart: TdxCustomFlowChart; - GraphicClass: TGraphicClass; - Transparent: Boolean; - TransparentColor: TColor; - Enhanced: Boolean; - end; - -function dxGetFlowChartAsGraphic(const AData: PdxFlowChartGetAsGraphicData): TGraphic; - -implementation - -{$R *.DFM} - -uses - SysUtils, cxClasses, dxPSUtl, dxExtCtrls, dxPSRes, dxPSGlbl; - -type - TdxFlowChartAccess = class(TdxCustomFlowChart); - -function dxGetFlowChartAsGraphic(const AData: PdxFlowChartGetAsGraphicData): TGraphic; - - procedure SaveSelection(AFlowChart: TdxCustomFlowChart; ASelections: TList); - var - I: Integer; - Item: TdxFcItem; - begin - for I := 0 to AFlowChart.SelectedObjectCount - 1 do - begin - Item := AFlowChart.SelectedObjects[I]; - ASelections.Add(Item); - Item.Selected := False; - end; - for I := 0 to AFlowChart.SelectedConnectionCount - 1 do - begin - Item := AFlowChart.SelectedConnections[I]; - ASelections.Add(Item); - Item.Selected := False; - end; - end; - - procedure RestoreSelection(ASelections: TList); - var - I: Integer; - begin - for I := 0 to ASelections.Count - 1 do - TdxFCItem(ASelections[I]).Selected := True; - ASelections.Free; - end; - -var - Graphic: TGraphic; - Canvas: TCanvas; - DC: HDC; - IsBitmap: Boolean; - IsMetafile: Boolean; - Selections: TList; - SaveTopEdge, SaveLeftEdge: Integer; -begin - Result := nil; - if (AData = nil) or (AData^.FlowChart = nil) or (AData^.GraphicClass = nil) then Exit; - IsBitmap := AData^.GraphicClass.InheritsFrom(TBitmap); - IsMetafile := AData^.GraphicClass.InheritsFrom(TMetafile); - try - if IsMetafile then - Graphic := TMetafile.Create - else - Graphic := TBitmap.Create; - try - Graphic.Width := TdxFlowChartAccess(AData^.FlowChart).ChartWidth; - Graphic.Height := TdxFlowChartAccess(AData^.FlowChart).ChartHeight; - if IsMetafile then - begin - TMetafile(Graphic).Enhanced := AData^.Enhanced; - Canvas := TMetafileCanvas.Create(TMetafile(Graphic), 0) - end - else - Canvas := TBitmap(Graphic).Canvas; - - try - if not IsMetafile and AData^.Transparent then - begin - Canvas.Brush.Color := ColorToRGB(AData^.TransparentColor); - Canvas.FillRect(Rect(0, 0, Graphic.Width, Graphic.Height)); - end; - DC := Canvas.Handle; - with TdxFlowChartAccess(AData^.FlowChart) do - begin - BeginUpdate; - try - ControlState := ControlState + [csPaintCopy]; - SaveTopEdge := TopEdge; - SaveLeftEdge := LeftEdge; - Selections := TList.Create; - try - SaveSelection(AData^.FlowChart, Selections); - TopEdge := 0; - LeftEdge := 0; - PaintWindow(DC); - finally - TopEdge := SaveTopEdge; - LeftEdge := SaveLeftEdge; - RestoreSelection(Selections); - end; - ControlState := ControlState - [csPaintCopy]; - finally - CancelUpdate; - end; - end; - - if IsBitmap and AData^.Transparent then - TBitmap(Graphic).TransparentColor := AData^.TransparentColor; - - if not IsMetafile and not IsBitmap then - begin - Result := dxPSUtl.CreateGraphic(AData^.GraphicClass); - Result.Assign(Graphic); - end - else - Result := Graphic; - finally - if IsMetafile then Canvas.Free; - end; - finally - if not IsMetafile and not IsBitmap then Graphic.Free; - end; - except - if Result <> nil then Result.Free; - raise; - end; -end; - -{ TdxFlowChartReportLink } - -constructor TdxFlowChartReportLink.Create(AOwner: TComponent); -begin - inherited; - FUseMetafile := True; -end; - -procedure TdxFlowChartReportLink.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxFlowChartReportLink then - UseMetafile := TdxFlowChartReportLink(Source).UseMetafile; -end; - -function TdxFlowChartReportLink.GetGraphic: TGraphic; -var - Data: TdxFlowChartGetAsGraphicData; -begin - Result := nil; - if (FlowChart = nil) or (FlowChart.ObjectCount = 0) then - Exit; - - FillChar(Data, SizeOf(TdxFlowChartGetAsGraphicData), 0); - Data.FlowChart := FlowChart; - Data.GraphicClass := GetGraphicClass; - Data.Transparent := Transparent; - Data.TransparentColor := TransparentColor; - Data.Enhanced := True; - Result := dxGetFlowChartAsGraphic(@Data); -end; - -function TdxFlowChartReportLink.GetGraphicClass: TGraphicClass; -const - GraphicClasses: array[Boolean] of TGraphicClass = (TBitmap, TMetafile); -begin - Result := GraphicClasses[UseMetafile]; -end; - -procedure TdxFlowChartReportLink.InitializeGraphicItem( - AnItem: TdxReportCellGraphic); -begin - inherited InitializeGraphicItem(AnItem); - AnItem.ImageTransparent := UseMetafile; - AnItem.Transparent := Transparent; - AnItem.Color := Color; -end; - -procedure TdxFlowChartReportLink.InternalRestoreDefaults; -begin - inherited; - UseMetafile := True; -end; - -procedure TdxFlowChartReportLink.InternalRestoreFromOriginal; -begin - inherited; - if FlowChart <> nil then - TransparentColor := dxPSUtl.Control_GetColor(FlowChart); -end; - -function TdxFlowChartReportLink.GetFlowChart: TdxCustomFlowChart; -begin - Result := TdxCustomFlowChart(Component); -end; - -{ TdxFCReportLinkDesignWindow } - -constructor TdxFCReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhcFlowChartReportLinkDesigner; - inherited; - CreateControls; - PageControl1.ActivePage := PageControl1.Pages[0]; -end; - -procedure TdxFCReportLinkDesignWindow.CreateControls; -var - R: TRect; -begin - ccbxColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(ccbxColor) do - begin - BoundsRect := bvlColorHolder.BoundsRect; - Tag := 0; - Parent := gbxTransparent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := dxDefaultColor; -// DropDownCount := Items.Count; - OnChange := ccbxColorChange; - end; - lblColor.FocusControl := ccbxColor; - - ccbxGridLineColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(ccbxGridLineColor) do - begin - BoundsRect := bvlLineColorHolder.BoundsRect; - Tag := 1; - Parent := gbxBorder; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := dxDefaultGridLineColor; -// DropDownCount := Items.Count; - OnChange := ccbxColorChange; - end; - lblGridLinesColor.FocusControl := ccbxGridLineColor; - FPreviewBox := TdxPSPaintPanel.Create(Self); - with TdxPSPaintPanel(FPreviewBox) do - begin - Parent := pnlPreview; - R := pnlPreview.BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - InflateRect(R, -4, -4); - BoundsRect := R; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := pbxPreviewPaint; - end; -end; - -{$IFDEF DELPHI7} -function TdxFCReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxFCReportLinkDesignWindow.LoadStrings; -begin - inherited; - tshOptions.Caption := cxGetResourceString(@sdxOptions); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - stDrawBorder.Caption := ' ' + cxGetResourceString(@sdxBorderLines) + ' '; - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - lblGridLinesColor.Caption := cxGetResourceString(@sdxGridLinesColor); -end; - -procedure TdxFCReportLinkDesignWindow.DoInitialize; -begin - inherited; - chbxDrawBorder.Checked := ReportLink.DrawBorder; - chbxTransparent.Checked := ReportLink.Transparent; - TdxPSColorCombo(ccbxColor).ColorValue := ReportLink.Color; - TdxPSColorCombo(ccbxGridLineColor).ColorValue := ReportLink.BorderColor; - lblPreview.ParentFont := True; -end; - -procedure TdxFCReportLinkDesignWindow.UpdateControlsState; -begin - inherited; - ccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := not chbxTransparent.Checked; - ccbxGridLineColor.Enabled := chbxDrawBorder.Checked; - lblGridLinesColor.Enabled := chbxDrawBorder.Checked; -end; - -procedure TdxFCReportLinkDesignWindow.pbxPreviewPaint(Sender: TObject); -begin - with TdxPSPaintPanel(Sender) do - PaintPreview(Canvas, ClientRect); -end; - -procedure TdxFCReportLinkDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); - - procedure DrawText(ACanvas: TCanvas; const R: TRect; const S: string); - const - uFormat: UINT = DT_CENTER or DT_VCENTER or DT_SINGLELINE; - begin - ACanvas.Brush.Style := bsClear; - Windows.DrawText(ACanvas.Handle, PChar(S), Length(S), PRect(@R)^, uFormat); - end; - -var - R2: TRect; - W, H: Integer; -begin - inherited; - OffsetRect(R, -R.Left, -R.Top); - InflateRect(R, -4, -4); - - ACanvas.Brush.Style := bsSolid; - ACanvas.Pen.Color := clWindowText; - { Border } - if ReportLink.DrawBorder then - begin - InflateRect(R, 1, 1); - ACanvas.Brush.Color := ReportLink.BorderColor; - ACanvas.FrameRect(R); - InflateRect(R, -1, -1); - end; - - { Interior } - if not ReportLink.Transparent then - begin - ACanvas.Brush.Color := ReportLink.Color; - ACanvas.FillRect(R); - end; - - { Charts } - W := R.Right - R.Left; - H := R.Bottom - R.Top; - - { Plan } - R2 := Bounds(R.Left + 2, 4, R.Right, 12); - ACanvas.Font.Style := [fsBold]; - DrawText(ACanvas, R2, cxGetResourceString(@sdxPlan)); - R2 := Rect(R.Left + 30, R2.Bottom + 2, R.Right - 30, R2.Bottom + 3); - ACanvas.Brush.Style := bsSolid; - ACanvas.Brush.Color := clWindowText; - ACanvas.FillRect(R2); - - ACanvas.Brush.Style := bsClear; - { Swimming-pool } - R2 := Bounds(R.Left + 2, 27, R.Left + W div 2 - 22, H div 4); - ACanvas.RoundRect(R2.Left, R2.Top, R2.Right, R2.Bottom, 10, 10); - DrawText(ACanvas, R2, cxGetResourceString(@sdxSwimmingPool)); - - { Administration } - OffsetRect(R2, R2.Right - R2.Left + 30, 0); - ACanvas.Rectangle(R2.Left, R2.Top, R2.Right, R2.Bottom); - DrawText(ACanvas, R2, cxGetResourceString(@sdxAdministration)); - - { Park } - OffsetRect(R2, 0, R2.Bottom - R2.Top + 30); - Inc(R2.Bottom, R2.Bottom - R2.Top); - ACanvas.Ellipse(R2.Left, R2.Top, R2.Right, R2.Bottom); - ilFlowChart.Draw(ACanvas, R2.Left + (R2.Right - R2.Left) div 2 - 1 * ilFlowChart.Width div 2, R2.Top + 10, 0); - ilFlowChart.Draw(ACanvas, R2.Left + (R2.Right - R2.Left) div 2 - 2 * ilFlowChart.Width, R2.Top + ilFlowChart.Height + 20, 0); - ilFlowChart.Draw(ACanvas, R2.Left + (R2.Right - R2.Left) div 2 + 1 * ilFlowChart.Width, R2.Top + ilFlowChart.Height + 20, 0); - DrawText(ACanvas, R2, cxGetResourceString(@sdxPark)); - - { Car-parking } - OffsetRect(R2, -R2.Right + R2.Left - 30, 0); - ACanvas.Rectangle(R2.Left, R2.Top, R2.Right, R2.Bottom); - DrawText(ACanvas, R2, cxGetResourceString(@sdxCarParking)); - - { Crosses } - ACanvas.Brush.Style := bsSolid; - ACanvas.Brush.Color := clBtnShadow; - R2 := Rect(R.Left + W div 2 - 10, 27, R.Left + W div 2 + 8, R.Bottom - 2); - ACanvas.FillRect(R2); - R2 := Rect(R.Left + 2, R.Top + 28 + H div 4, R.Right - 2, R.Top + 27 + H div 4 + 20); - ACanvas.FillRect(R2); - - ACanvas.Font.Style := []; -end; - -function TdxFCReportLinkDesignWindow.GetReportLink: TdxFlowChartReportLink; -begin - Result := inherited ReportLink as TdxFlowChartReportLink; -end; - -procedure TdxFCReportLinkDesignWindow.ccbxColorChange(Sender: TObject); -var - Color: TColor; -begin - if LockControlsUpdate then Exit; - Color := TdxPSColorCombo(Sender).ColorValue; - case TdxPSColorCombo(Sender).Tag of - 0: ReportLink.Color := Color; - 1: ReportLink.BorderColor := Color; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxFCReportLinkDesignWindow.UpdatePreview; -begin - FPreviewBox.Invalidate; -end; - -procedure TdxFCReportLinkDesignWindow.chbxTransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Transparent := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxFCReportLinkDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TdxFCReportLinkDesignWindow.chbxDrawBorderClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.DrawBorder := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxFCReportLinkDesignWindow.stDrawBorderClick(Sender: TObject); -begin - if chbxDrawBorder.CanFocus then ActiveControl := chbxDrawBorder; - chbxDrawBorder.Checked := not chbxDrawBorder.Checked; -end; - -procedure TdxFCReportLinkDesignWindow.lblColorClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TCustomComboBox(ActiveControl).DroppedDown := True; -end; - -initialization - dxPSRegisterReportLink(TdxFlowChartReportLink, TdxCustomFlowChart, TdxFCReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxFlowChartReportLink, TdxCustomFlowChart, TdxFCReportLinkDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxFCLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxFCLnkReg.pas deleted file mode 100644 index 7bf6b096..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxFCLnkReg.pas +++ /dev/null @@ -1,61 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxFCLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI9} - DesignIntf, -{$ENDIF} - Classes, dxPSdxFCLnk; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TdxFlowChartReportLink]) -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxInsLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSdxInsLnk.dfm deleted file mode 100644 index ede334e4..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxInsLnk.dfm +++ /dev/null @@ -1,2318 +0,0 @@ -object dxInspectorDesignWindow: TdxInspectorDesignWindow - Left = 353 - Top = 289 - BorderStyle = bsDialog - Caption = 'dxInspectorDesignWindow' - ClientHeight = 341 - ClientWidth = 585 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 577 - Height = 300 - ActivePage = tshOptions - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object lblShow: TLabel - Left = 6 - Top = 6 - Width = 26 - Height = 13 - Caption = 'Show' - end - object bvlShow: TBevel - Left = 40 - Top = 10 - Width = 222 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 6 - Top = 32 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblBehaviors: TLabel - Left = 6 - Top = 142 - Width = 47 - Height = 13 - Caption = 'Behaviors' - end - object bvlBehaviors: TBevel - Left = 66 - Top = 147 - Width = 196 - Height = 4 - Shape = bsBottomLine - end - object Image4: TImage - Left = 6 - Top = 166 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F877778880F87777777778078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object chbxShowBorders: TCheckBox - Left = 90 - Top = 29 - Width = 169 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxOptionsClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 90 - Top = 51 - Width = 169 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxOptionsClick - end - object chbxShowVertLines: TCheckBox - Tag = 2 - Left = 90 - Top = 73 - Width = 169 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 2 - OnClick = chbxOptionsClick - end - object chbxShowImages: TCheckBox - Tag = 5 - Left = 90 - Top = 117 - Width = 169 - Height = 17 - Caption = 'Images' - TabOrder = 4 - OnClick = chbxOptionsClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 8 - Left = 90 - Top = 95 - Width = 169 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 3 - OnClick = chbxOptionsClick - end - object chbxAutoNodesExpand: TCheckBox - Left = 90 - Top = 167 - Width = 169 - Height = 17 - Caption = '&Auto Node Expand' - TabOrder = 5 - OnClick = chbxAutoNodesExpandClick - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 189 - Width = 169 - Height = 17 - Caption = '&Auto &Width' - TabOrder = 6 - OnClick = chbxAutoWidthClick - end - object lblPreview: TStaticText - Left = 275 - Top = 3 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 7 - end - end - object tshColors: TTabSheet - Caption = '&Color' - object lblGridLinesColor: TLabel - Left = 10 - Top = 219 - Width = 79 - Height = 13 - Caption = '&Grid lines color : ' - end - object bvlGridLineColorHolder: TBevel - Left = 91 - Top = 215 - Width = 168 - Height = 21 - Visible = False - end - object gbxCaptionTransparent: TGroupBox - Left = 5 - Top = 73 - Width = 262 - Height = 61 - Caption = ' ' - TabOrder = 3 - object lblCaptionColor: TLabel - Left = 6 - Top = 29 - Width = 72 - Height = 13 - Caption = 'Caption Color: ' - end - object bvlFixedColorHolder: TBevel - Left = 86 - Top = 25 - Width = 168 - Height = 21 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 7 - Width = 262 - Height = 60 - Caption = ' ' - TabOrder = 1 - object lblColor: TLabel - Left = 6 - Top = 29 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - end - object bvlColorHolder: TBevel - Left = 86 - Top = 25 - Width = 168 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 5 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = chbxTransparentClick - end - object chbxCaptionTransparent: TCheckBox - Tag = 1 - Left = 18 - Top = 70 - Width = 15 - Height = 17 - TabOrder = 2 - OnClick = chbxTransparentClick - end - object gbxGroupTransparent: TGroupBox - Left = 5 - Top = 141 - Width = 262 - Height = 61 - Caption = ' ' - TabOrder = 5 - object lblGroupColor: TLabel - Left = 6 - Top = 29 - Width = 64 - Height = 13 - Caption = '&Group Color: ' - end - object bvlGroupColorHolder: TBevel - Left = 86 - Top = 25 - Width = 168 - Height = 21 - Visible = False - end - end - object chbxGroupTransparent: TCheckBox - Tag = 2 - Left = 18 - Top = 139 - Width = 15 - Height = 17 - TabOrder = 4 - OnClick = chbxTransparentClick - end - object stTransparent: TStaticText - Left = 33 - Top = 6 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 6 - OnClick = stTransparentClick - end - object stCaptionTransparent: TStaticText - Left = 33 - Top = 71 - Width = 109 - Height = 17 - Caption = ' Caption Transparent ' - FocusControl = chbxCaptionTransparent - TabOrder = 7 - OnClick = stCaptionTransparentClick - end - object stGroupTransparent: TStaticText - Left = 33 - Top = 140 - Width = 101 - Height = 17 - Caption = ' Group Transparent ' - FocusControl = chbxGroupTransparent - TabOrder = 8 - OnClick = stGroupTransparentClick - end - end - object tshFonts: TTabSheet - Caption = '&Font' - object btnFont: TButton - Left = 8 - Top = 14 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 42 - Width = 256 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnGroupFont: TButton - Tag = 2 - Left = 8 - Top = 130 - Width = 110 - Height = 23 - Caption = 'Grou&p Font ...' - TabOrder = 4 - OnClick = btnFontClick - end - object edGroupFont: TEdit - Left = 9 - Top = 158 - Width = 256 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 5 - end - object btnFixedFont: TButton - Tag = 1 - Left = 8 - Top = 72 - Width = 110 - Height = 23 - Caption = 'Fi&xed Font ...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnFontClick - end - object edFixedFont: TEdit - Left = 8 - Top = 100 - Width = 256 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblRefinements: TLabel - Left = 6 - Top = 6 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlAppearance: TBevel - Left = 79 - Top = 10 - Width = 183 - Height = 4 - Shape = bsBottomLine - end - object imgGraphics: TImage - Left = 6 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxFlatCheckMarks: TCheckBox - Tag = 3 - Left = 90 - Top = 29 - Width = 169 - Height = 17 - Caption = 'Flat CheckMarks' - TabOrder = 0 - OnClick = chbxOptionsClick - end - object chbxCheckMarksAsText: TCheckBox - Tag = 4 - Left = 90 - Top = 51 - Width = 169 - Height = 17 - Caption = 'Display Check Marks as Text' - TabOrder = 1 - OnClick = chbxOptionsClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 7 - Left = 90 - Top = 73 - Width = 171 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = chbxOptionsClick - end - object chbxTransparentColumnGraphics: TCheckBox - Tag = 6 - Left = 90 - Top = 95 - Width = 171 - Height = 17 - Caption = 'Transparent Column &Graphics' - TabOrder = 3 - OnClick = chbxOptionsClick - end - end - end - object pnlPreview: TPanel - Left = 283 - Top = 50 - Width = 290 - Height = 246 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object pnlPreviewHost: TPanel - Left = 5 - Top = 5 - Width = 279 - Height = 234 - BevelOuter = bvNone - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object insPreview: TdxInspector - Left = 0 - Top = 0 - Width = 279 - Height = 234 - BorderStyle = bsNone - Color = clWindow - Ctl3D = False - Enabled = False - ParentCtl3D = False - TabOrder = 0 - DividerPos = 133 - GridColor = clBtnFace - Flat = True - Images = ilVendorLogos - PaintStyle = ipsNET - Data = { - DB0000000200000008000000030000000E00000069724D657273656465734265 - 6E7A08000000000000000900000069724D424D6F64656C080000000000000007 - 00000069724D4253555608000000000000000900000069724D4250686F746F08 - 00000003000000050000006972424D5708000000000000000A0000006972424D - 574D6F64656C0800000000000000080000006972424D57535556080000000000 - 00000A0000006972424D5750686F746F02000000080000006C46080A0E000000 - 69724D6572736564657342656E7A08000000FCF9080A050000006972424D57} - object irMersedesBenz: TdxInspectorTextRow - Caption = 'Mersedes-Benz' - ImageIndex = 0 - IsCategory = True - RowHeight = 22 - OnDrawCaption = InspectorDrawCaption - end - object irMBPhoto: TdxInspectorTextGraphicRow - Caption = 'Photo' - RowHeight = 44 - OnDrawCaption = InspectorDrawCaption - OnDrawValue = irMBPhotoDrawValue - end - object irMBSUV: TdxInspectorTextCheckRow - Caption = 'SUV' - OnDrawCaption = InspectorDrawCaption - OnDrawValue = irMBSUVDrawValue - ValueChecked = 'True' - ValueUnchecked = 'False' - Text = 'False' - end - object irMBModel: TdxInspectorTextRow - Caption = 'Model' - OnDrawCaption = InspectorDrawCaption - OnDrawValue = InspectorDrawValue - Text = 'S600' - end - object irBMW: TdxInspectorTextRow - Caption = 'BMW' - ImageIndex = 1 - IsCategory = True - RowHeight = 22 - OnDrawCaption = InspectorDrawCaption - end - object irBMWModel: TdxInspectorTextRow - Caption = 'Model' - OnDrawCaption = InspectorDrawCaption - OnDrawValue = InspectorDrawValue - Text = 'X5 4WD' - end - object irBMWSUV: TdxInspectorTextCheckRow - Caption = 'SUV' - OnDrawCaption = InspectorDrawCaption - OnDrawValue = irMBSUVDrawValue - ValueChecked = 'True' - ValueUnchecked = 'False' - Text = 'True' - end - object irBMWPhoto: TdxInspectorTextGraphicRow - Caption = 'Photo' - RowHeight = 44 - OnDrawCaption = InspectorDrawCaption - OnDrawValue = irMBPhotoDrawValue - end - end - end - end - object ilVendorLogos: TImageList - AllocBy = 2 - Height = 21 - Width = 22 - Left = 4 - Top = 310 - Bitmap = { - 494C010102000400040016001500FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 000000000000360000002800000058000000150000000100180000000000A815 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000C0C0C0A6C4A5737273615F5FA2A9A2D2BCD10000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000C2C5C27B7C795D595B696165746C716359 - 6065676693969600000000000000000000000000000000000000000000000000 - 00000000000000000000000000008D6A8D366A35000000000000000000000000 - 0000000000001C441C7BB07B0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000D6D4D55F6560989394E3E3E4FFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFC9C5C6424848A1A1A10000000000000000000000 - 00000000000000000000000000000000A18EA1384538000D0000000003020702 - 0000000000000000000000000000000000000000282E26A69FA5000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000B4B3B54D4248EAE9E7FF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9B9799656A69 - 00000000000000000000000000000000000000000091AA91000D000000000706 - 040808060000000302001F1F1C25242E23262A04070D00000002020000000000 - 0E00647063000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000C7C9C85B58 - 5BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFB7B2B8676C6B000000000000000000000000000000C0C0C0161C16 - 0000001C1C1A1616120000001F1F1E93908D808080DFC285C5C1C07D81871115 - 2200000003030800000008180BAEBAAF00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - C0C0C0695F65FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF928B8FBBB9BA00000000000000000000 - 00008190800403042A2928262425000000637362D6D6D5F6F4F1808080BE9B37 - B18414C09F4AA1947F2F31390000000706040000005A62590000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000ACA0A595A096A1A0A1E7E3E6FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2EEEFA1A0A1CCD4CF433E400000 - 00000000000000E0DBE12329202022203E3C3D141112668164FFFFFFFDFAFEF4 - F7EE808080C5A336B98F00BE9500C69B20A69777181F2F000000000000121513 - B1DCB10000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000737172FFFFFFC6C2C3655C63828983CD - C8C9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCDCDCC757577616866D2D2CF - FFFFFF9E9D9DC5C8C5000000000000A2AEA113131248494A272627384736FFFF - FFFFFFFFECF9ECF5F1EC808080CFA93AC49D00C5A100BB9400C7A1247B7C7C00 - 000D0000000000006C8F6B000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000C0C0C0959192FFFFFFFFFF - FFE3EBE7A5A2A27472773831377D7A7DE3E1E3E8E3E68E8E8C443E44575A5CAA - ABAAEEF1EEFFFFFFFFFFFFEAEBE9877D82000000C0C0C0767D772E312B5B5A59 - 383738959495FFFFFFF9FFFBF4FFF6FFFFFF808080D8AD37CDA200D0A700C8A1 - 00C59900BEA46424273A0000000000003C3F3CC0C0C000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000CDD0CE - B5B1B5FFFFFFFFFFFFFFFFFFEBECECB6BCB8C2BCBD2F3C38000000332C344849 - 4DBDB6BABBB9B9F1EEEEFFFFFFFFFFFFFFFFFFFCFFFF716C6F000000C0C0C06A - 74695050506362626D6A6BCAC9CAF3F5F3EDEEF0ECEFF0F6EEF2808080D2B54E - C59F18CBA728C5A327C29D1FCFAD60454D6503090E000000292929C0C0C00000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000BEB8BEC5C6C4FFFFFFFFFFFFFFFFFFFFFFFFF8F8F7A9A5A9EAE7E6 - 969496969196E0E0DEABAEAAF5F7F4FFFFFFFFFFFFFFFFFFFFFFFFFCFFFF776E - 74000000C0C0C076817467656479797A827F7BC8B78FDCC487D1BA7FD0B574D6 - BB63B8A351D7D5C9DADCD1D9D8D4D5D4D1D8D6D2E1DFDA43464B060607000000 - 242524C0C0C00000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000C5BFC4B9C2BBFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFA0A1A0E6ECE83A3639A2A4A2FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFF9F9F7767F78000000C0C0C0969D957A7873989792818388B2A383F2D3 - 7BE1C26ADFBA5CE2B642B9AB00808080FDFFFFF8FAFFF1F3FAFFFFFFE3E5E812 - 110E080908000000333232C0C0C0000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000C0C0C093898FFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFD4CED1CECACC222022DEDBDBFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFDEDEDE908D8D000000C0C0C0B9C2B6898782A5A29F - 8D8E95918F8DEDD498EBCC87E0C581E8C471BCC233808080FCFFFFF5FAF4F4FC - F2FFFFFF90918D000000000000000000546A54C0C0C000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 5E585CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE3E1E1B9B7B72F443FF2EE - F0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF999D98C1BDC0000000000000E2 - E2E192918BA5A19F808080808080A8A18EFBE69DEBD18AEDCC84C2C94B808080 - FFFFFFFFFFFFFFFFFF8080804954478080807574750E0C0D8EBB8DC0C0C00000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000676766E6E5E4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3F0F1 - A0989D575658FAFBFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFD545A550000 - 00000000000000F9C8F9BCC4B9D7D4D48080808080809FA0A6B0AB99F2DEA5FF - E39DCEDA5F808080FFFFFFFFFFFF808080707A707A637A808080808080818C80 - D7CDD70000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000C0C0C0444749FFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFF98A49B70666CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - 8E8C8CB6AFB5000000000000000000000000E2FFE1C6C4C48080808080808080 - 8084868D929290E0DAB5CAD876808080808080AB8FAB2945248A878880808080 - 808080808088A988808080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000ACABA97D87 - 85FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF958F93878787FFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFBEB5BC585256000000000000000000000000000000000000C5F0C3 - DBDADB808080808080808080A0A1A17F90888DA68D55695980A07B474644625E - 5E373937808080B1B3B1728672C0C0C000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008F858C797A78FFFFFFFFFFFFFFFFFFFFFFFFA9A7A99E9F9EFFFF - FFFFFFFFFFFFFFFFFFFFABADAA5C605D00000000000000000000000000000000 - 0000000000000000C3D6C0A8AFA2ABA8A2B8B5B4B1AAAA808080808080472F3F - 8080805E825D646263423F3F192318A0AC9EC6D3C50000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000B7B8B7424645BFBBBDFFFFFFFFFFFF - CFCCCBC5C3C4FFFFFFFFFFFFD8D8D77875768B898A0000000000000000000000 - 00000000000000000000000000000000000000C0C0C0B7D0B3A1B29B8E9087D3 - C8CFAE9EAFC0C0C08080802237233345323C553CC0C0C0C0C0C0000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000009B - A09D525052706B6E7C75798C89888782836E6D6D8E898BC0C0C0000000000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C0C0C0C0A8D5A6AECBAB718670534951B8B7B7527450808080D88CD800000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C00000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000424D3E000000 - 000000003E0000002800000058000000150000000100010000000000FC000000 - 0000000000000000000000000000000000000000FFFFFF00FF87FFFC0FF00000 - 00000000FE01FFF003F0000000000000F8007FC000F0000000000000F0003F80 - 0070000000000000E0001F000030000000000000C0000F000030000000000000 - C0000E000010000000000000C000060000100000000000008000040000000000 - 0000000080000400000000000000000080000400000000000000000080000400 - 0000000000000000800004000000000000000000C00006000000000000000000 - C0000E000010000000000000C0000F000010000000000000E0001F8000300000 - 00000000F0003FC00070000000000000F8007FE000F0000000000000FE00FFF0 - 03F0000000000000FF83FFFC0FF0000000000000000000000000000000000000 - 00000000000000000000} - end - object ilCarPhotos: TImageList - AllocBy = 2 - Height = 44 - Width = 87 - Left = 32 - Top = 310 - Bitmap = { - 494C010102000400040057002C00FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 00000000000036000000280000005C0100002C000000010018000000000070B3 - 000000000000000000000000000000000000000000FDCBFF6D5D8FA47AD38A6D - BD8A6AC18B72C07D62B2665B9B6C5BA26E609B654E9767599369549565579664 - 559362538F655C92695B9469589567559360579262599564548C6254895F528C - 5E4E895D4A885B50885954875D54895D5489555483584F7E5F477C5A457A554A - 7B5850774B4D642E3B481F2A2E1D261B1F271C2229231E29201B281D1A261D1C - 241E1A231D16221D19231E18241B18221A19221A1129150F2A1415281915301A - 162F181C261D1E2325192420152B16182F18152B19152C1A162F1B192A1B0F30 - 181B2A1B253027222A20242F1426321A24320E142508333F18111E1D24351F33 - 3E32332B293333302526022E40302435193F402C07080B000000727689656C7D - 666C80646A7C666A7D6A6D81696C7F65687C6C6F83686E7E6B717E6E75836E72 - 7C6F727F72778371768270737E69707C68727D68727F6A71816B7484686F8068 - 6D7E666B7C6C717B6B6E7C6D737E73747F7674807374807475826F717D747681 - 70727E71737C6F737D6E747E73737E74758074758074768176768275747F7775 - 8173747F7576817476806F707B6E6F7A6D717B65737B69767E6C737C69707A69 - 707C6C7180686C7D696F7F6C6E816E6D7E686F7869707B6B717C6E737D6B707A - 6F747D70757F71757F73737E73758074758172748173757F72717C73737E7475 - 7E75777F76778076748074737E72727C73727D75737F85838E4A4C4E00000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000007000EFCC8FF53466C8764BB785C9E7A5FAB6C5F9E57427C6751 - 93644A8E574783584687584E855540825F4E8C5A458562508863508B594E8753 - 4A865C4F855C4B845C4C7F57477D56458250407D55467C594A7E55447D503D79 - 523D79503F734B3F6C463F6B49436A4A446C403E5A2622221316001E26111920 - 2C09161C0B180E111D18142219111E19081F120C2C0D142C140D1C150D1C1616 - 221A16231B111F160F1F120F22140C23160B20140C1F151A251D20241F132018 - 1C2F1F1B271F15251912261914231A18261B13231B0D1E0E2938251B240E1628 - 0E202C1A19251116270D1D2C181929141A20142E3F271E1F201829113C393906 - 2A0000120033301E1B180F687382B7C5E4A7B5CFABBBD3AABAD1AABCD3A6BAD1 - AABBD3AFBCD4AFBDD4AFBCD6AFBBD6B0BDD7B3BBD5B5BED8B1BBD4B5C0D7B9C4 - DBBEC6DBBEC4D8BFC5D9BEC1D6BFC3D7B9C1D5B9C1D6B3BCD1B0BCD7B2BCD6B3 - BFD7B8C0D8BBC2D9BCC2D8BFC4DABEC3D9BEC2D9BDC3D9C6C7DCBABDD3BFC5D9 - C5C6DCC5C6DAC2C9DDBFC5D8C0C5D9C3C7DBC2C6DBC5CADFC3C5DAC7CAE0C2C3 - DAC3C5DAC2C4D8C4C5DABFBFD4BBBDD4BEC0D5BFC3D7B9C1D5BAC1D4BDC4D9B7 - BFD7B1BBD2B5BDD9B4BDD8B2BCD5B3BED5B2BDD5BABED7B9BED6B9BDD5BCBFD6 - C0C3DBB8BFD6B7C3D7BDC5DBC3C5D9C3C8DDC9C6DAC7C6DACBC7DCC6C5DAC7C5 - DCC5C2D8C9C3DBC6C1D7D6D1E57F7F8500000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000009150FEBADFF - 524873805EAC765DA16C549C59468D665088664F95543E815E52875942855944 - 855C448864558F645289594582614F8C62528A5B4C855545825B477D594F7A55 - 497E55438053437A55457B55487C5044794D42735043735044744C406D493C6A - 48406C4437532F31442E5591465EC03A315B1E1F00192519181C240E1614091C - 130F20131D2A1D152E1D0B2518132218121E13141F1619261E13221B18231A19 - 2016121D1512221F11201B1B261C2327201A231F2329220E201819231F202625 - 1E251F23291F2024261A241F192B0F1928181B2C1F242F1C1C2F20272F201A2A - 2013240F162812222E222F361C021F201D2400464B2C0622004B394A00060861 - 6A75A5AFCD9AA4BB97A2BA97A1BB9BA8C399A7C197A3BD9EA7C09CA5C09BA4BC - 9CA7BE9DA9C1A0A8C0A1ACC2A0AAC1A1AAC39A9FB795A0B897A1B99AA3BC9FA7 - BCA1AAC0A7AEC2ABB2C4ABADC3AAAFC3B0B5C8AAB1C6A3ABBFA8AFC3A4ABBDA1 - A8BAA8AFC1A9AEC1ADB2C5B1B5C5A8ADBDA9AFBEACAEBFADAFBFADB3C3AEB4C4 - B2B5C5B1B7C5A4AAB9B6BAC9B2B1C2B0B0C2AEB3C2ABAFBEAFB0C1B8B5C8B9B6 - C8B7B6C5B6B4C4B4B2C2B3B2C4B1AEBFB1AFC1B1B1C4B5B6C7B2B2C5ACB0C4A7 - ADC0AAB1C3A8B0C3ADB0C3ACB0C2AAAFC2A7AEC0A5AABEA7AFC2A8ADC2A8ACC0 - B0B4C2AFB3C3AEAEC0B4B3C5B0B1C2B2B5C5B3B7C6B6B6C6B9B5C5B4B0C1C5C1 - D0706E7700000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000001509D097FF52476F7F65A36A4E986D5E8F - 634D8C573C8F57447E5B4E85573C7E5C468958438761548B5940845A4C895943 - 845D4B885D4D815E477E5C4A815848845246794C407657467B55467C5347794A - 40704A3C6F4F42715046734E44734C406F483E6D403557302B52313C877A76B9 - C5C6EF84A6F00728620F0C00232012031115001400031600001B0B001F150725 - 1D18291C0E1B07001502031C0E02190B00180900190B021A06001208000C0202 - 1600001904001404061F08001200000F080B1A0B02190300140200130D152511 - 001E001329141A23131B2A1218250F19291E2731280015041622082A2E1B031E - 0B1B3A00392C3B3A254B3D33397D7A7C000406616572A0A6C4969FB497A2BA9B - A6BD9DA8BF96A1B997A2BA9EA8C09CA6BE98A6BD96A8BD8DA4BBA0A7BF9DA8C1 - 95A6B9A9B1C2A9A5B99AA3BA98A3BC99A5BC9AA6BE96A1BB94A2B794A0B5A2A6 - BD9DA5BB9DA5BBA5A8BBA6A9BAAAAFC1B0B2C5ADACC1ABAFC3AAAFC4A8ADC1A9 - AEBFAEB2C4B0B5C6A9B2C1ABB4C3A8ABBCADB3C5ACAFC0B0B0C3B2B0C4B5B3C5 - B9B4C6B5B0C4B7B5C5C0BECFC0BED0B8B6C7B5B5C7B4B0C0C1BDCDC0BCCCC1BE - CEB9B6C7B7B6C5B9B8C8B2B1C2ACABBCAEB1C2B3B0C2BFB7C8B8B3C5B5B5C6B1 - B0C1B3B3C5B1B2C3A9AABCAAADC2AFB2C7B9B5C9ADAEBFB2B3C4B5B7C8BDBDCD - B3B4C5B6B7C8B3B4C5B6B5C5B5B0C2B7B3C5CFC9D97C79860000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000012D5B0FF4B3B696D57987251995C548C644F8A543E87624F7F5F4E87 - 5440845E468A6250835C5C88513D845645885B51835850825E4B7E5E4A7C5047 - 7458487E5A4C80554777514873544977534574534472494073404572484B6F46 - 456E44477046496536324D1E2865616DACDED4DEFFFFFCECEFFF6E7CB5000B27 - 0012000C2E09433D54724C8364436A54395A55385E583E5B513F4F4438443F31 - 434A344A543E4C594551574553563D47574B5F605276664D6E634B665E496262 - 4C655F4B635F496961566C615463564057453D4C36373D3E3746453520082222 - 0D3202241D00002B18082E11031D001F3427543D5B3E4C404D455E6B506E3831 - 47AAA0BD1D00126C707DB5BED8A4A9C0A1A6BF9EA5BEA1A4B9A6A9BDA0A3BA9D - A5B8A0A6BCA7ACC4A9ADC7A9B2CAA1ADC6A6B3CBA5AFC69FABC19BABC3A0ACC5 - A2ADC4A0ABC29DA9C19CA7BF9EACC49CAAC29FABC29CA9BF9AA7BFA3B0C89CA9 - C4A1ADC7A3AEC1ABB5C6A9B0C4ABB2C6AEB5C9B2B5C7B4B6C8B5B7C9B9BACCB9 - B9CAB6BCCFADB5C6AFB4C8ACB3C7A8AFC5A6AFC2A6B0BFAAB2C3ABB3C3A1A7B7 - 9EA0AFA5A4B49FA2B0B8B3C1B6B1C0B0AEBDB6B5C5B9B7C8C0BECFBFBACBC5BF - D0C8C5D4C3C1D0BEBBCAC0B9C8C2BAC8C5BDCCC6BECEC4BDCCC3BECEC5C1CFC1 - C1D0B9B8C6C0BECEBDBBCCBCBBCBBEB9CBB6B2C5B8B6C7BFBCCDBDBBCCBEBBCC - BFBBCEBAB6C9CBC6D97973810000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000060813C197FF46355B65 - 5098705592584284655890543E886754875B44865B478B5F4E8C5F5082604B8A - 5949855E4784574B7B5C4A7E58427B55457A55487653467B55447B5142774D43 - 6F4E45734F44744E4073483F7147406C453E68453F66454460353E4815284932 - 3F81B0B0C8EADAEBA594D6B9B1EEC4C7EE3A40690000001A2023836EA7B387D2 - 9A72AC9269A19266A08D6294895781844870814B6D784D657549606A42575627 - 3F995D76CD8DB3AD78AC735677483C483A2C3B45324747384B45364A483A4E46 - 394C433C4B4436434931455C4E5D5C43596743606E546A583D504A4348381F39 - 00220000000059646E745C84603E686855643C2940B387B1150E0B636A78A3B1 - C997A4BA96A2B99DA5BD9DA2B69FA6B8929CAF8A95A7939CB28189A060667947 - 4B604F5257595B675258675057664E54664552683E4F644C586F555F73586075 - 5460754B596E4F5E72566175626E805F6880626D865C6880526078555F795560 - 79515D7557647D4D596F50607449586D4651674753694B566C485166444E643C - 485F3A496137445A36425835475C2E3B51161D2B0C14260D13281113262B2A34 - 292936282836303347282C4632374D3D46583D455845475C50546A575D705962 - 716164746A6A7970717F7C7B8A7D7D8F9090A1A09DACA6A2B0ABA9B7B8AEBDBA - B1C0BDB4C2B5B5C2ADA8B5B0ADBDB2AEBFAFABBDB2AEC0B4B0C2C8C5D878737E - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000081109BD87FF362A5B6B4D926B508D6B5B9158428A4C - 38836F5E935E448A5D4688614E8A58497F654D845B467B5844785C457D5A4878 - 52437B59437B5848765042765342795140745047725243724C3D714C39704B3E - 6B453B644337623F39593B37492E2B3A00004543428BE0D4E3CFC3EB9296D8D3 - D2F8DBD3FF64688E000000322739AD93D0BCA3E59B88C2977EB89971AE97619A - 9352828D4E73653D571C1B1B001400000D00000000492F3F8E577A7D4868361F - 2E14120D1B1D141F180F201D0D1A151814160C091F00001300000D0000180000 - 190000000013000C061E0B3434446E4C5A7B43659058867E5D5E111312242044 - 7C586F7B4E6945394EB586AE150018676C78AEB5CD9CA5BA99A1B8A1A4BE9CA2 - B89AA6B8919FB398A0B593A1B2141F33242736333444030B1300000804001800 - 000C000000313340616B824D5A6F3A44542E354A161F370B1830020F2800031E - 00031E00001600001800001D000820141C3300031E0000150000160000180000 - 1800041E0C122F00021D00001606091F070C24090E270D1A3012182E282A3F00 - 001918152B4E5360868893464B5800041400001600001300000C00000031394B - 3A3E50353E4E3B43533A43563843563D42553E44543E4857424958424B58474E - 5D606676444A59131423222230262732312F3935334337343E4A4D55968B9680 - 7987817A89827C888A86908D8793A196A3605A63000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000E11 - 0DB27FF446345C7960A06035865E50845B4E8B654F8758518A633E856A528C68 - 4C885B437B5B44766643805E477D5644735E47795A4876574375554074534071 - 5642734E3F7146466D4B3E704B386C493866473E60463C5738324C2C2942332C - 3E292E3C0003465A5293F0EAF6E0DFFACFD7F0EBF3FFD1CDFF726FA10000003A - 2F46B09BE0B49DDD9678B28C67A5885C93814B7A7543666F425C523346220F1F - 1902152919253C3745423A4A40293C53304C633E5C623F595F445A5D38535E3C - 5964445C64465C5C3F5E5B3C635D3E5561405062354B503F4F4B3238533E4326 - 1A19000000544755AD6EAF251C006A484D63376455605185386F4F324AAC92B0 - 19001272737DC3C4D8B1B0C4B7B6CBAFACC1B1B0C5B0B2C5AAACC1C8C5D62F33 - 40565D6BC7C5CFE5DAE2B3ABB22B354200001D09081F03090C0000008D919CB2 - B6CCA1A7BEA1A6BD9AA1B4979EB09199AD8C92A9878DA57F889F717C8E6F7B8D - 7D8795191E2B02000F0E07150B06140B04151106160703123642517E8B9F7881 - 9769798E6C7A8D6A78896E788A8188994F5261001220BDBBC7F9EBEF948E97C7 - BFC998979B00001A03081B0C0D1A06021227263A959BA7878F9B8089938C8897 - 8C8B988B8B988C8E9B838A988A8C9B8C8B9BA8A6B577707803000606001C0003 - 1F00001A03001D03001E00001B000007504F59B0ABBA9C97A59D97A6A5A0ADA3 - 9CA7B4AAB76B656F000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000110706BF8BFF523562665F946243 - 845C45826F5F8D5E4282594D836C4686613E8162487E64487C5843795A47775E - 48765748765C467A5944785542765A3F74524473503B724C3F6D4A476A43396A - 453A5E403A54362F4C2C2E42292C3C2F2A3F2F2E39111A230000397472A3FBF7 - FFEDE9FAE0E1EFEAF5FFDCDEFF7E7DA80000004F455FBDA9F5B095DB9774B192 - 6AA98962998558857A486A6E395B703860743E657242647444667845697B3D66 - 793B6373446871486B6E3F6574426979456D76496B72426A6E376070405F784C - 657344676C45656A396468486663465C6645576F405E543E563B334F78516B00 - 1A000000009D5A775F5E727A4B6F502C48C78FB70B0C0E726F7ABDB5CBACA8B9 - ABA9BBACABBCAEABBAAEABBBC3BDD0887F8D293440E3D7E3DCC7D23E2F3D524F - 5DADA9AE1E1F31000013070B11020203020406BDBBCDA19EB6A2A5BAA0A2B59B - A1B1A1A6B89BA0B5A3AABDA3A2B9AAACBEB6B7C644445000000D0F0F1E0C0B1C - 0606190808120306120C0B14000000323A4A9CA4B88A96AA8B92A88F97AC8393 - A88B96AA1415278C8D97C5B5B4483844CBB7C99A8B98928E9A6C697400000309 - 0B19090916020211767786B1B3C8A0A1B5A1A4BAA0A2B8A5A8BEA0A3B8A7A8BD - A1A3BAB2B1C585839100000003061D0D081D0B061B0D0C19040615060B1A0B09 - 1F0D0E260000085A5D6FBBBBCDA9A8BDA6A9BCA8A8B9B9BBCC6C727D00000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000F041AC797EE4B3C6C633A876D5C866A52896850885D43826648 - 7A65458161407C5F4782654B7B5B4B785B49775B4277573D7C604E7856427757 - 3E775B4B75493F6C493E6B4B3B674D3F643E375739314B362F4429263B232636 - 2A283C1D20260C1A0606081F0C07508B90A7FFFFFFE1E1F9D4D2EDF2F8FEE5E8 - FF7776A0000009685F84CBBDFFAD9BE69E87C7A18CC6977AB893619C8C4F7E80 - 466B7E45687F446D7F4472834871874D7B804B7E794D7F85558A87588B80528B - 89578F8D5F958D64968D62938D60968C6295886095885D938A5A8E905E868356 - 858B527C824A7181527581517C73405F71545F6D40713E2733504860000000AD - 7F93844075D698BD1A09127B737FCDC4D8BCB4C6BFB5C6B9B0C2BCB0C3B7ABC0 - D6C9D93C3A4887969FD5BCC5F5E9F15E5F69282630C6B6BE3C3D4E00000F090B - 110C070C000000878490D3CADEBAB8C9BCBBCDB8B6C9B9B8CABCB8C9BBB9CAB5 - AFC3C7C4D68C89950C090902071208091A0706160E0B1B0E0C1604040F090914 - 0F0D1C000000898D9FBDB9CAACAEBEA9AEBEB3B6C5797C8C353942E1CAD45855 - 5A000000F1ECF284818A000000C1B4BB00000806091A0B0B0F0403131D1D2C68 - 68777C7D8C787B9082869888879C8F8B9F938FA29397A89B9BA827273200000B - 0D0E1D090D19000000685F6A4F505900000E080818090E24060B2911162BA7A1 - B5BFB7CBB5B2C2B4ADBBC5BFD076717E00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000070D19CC87E3 - 423C6673458C6C5982654E7F6138825F4D7E694C7D6847806746805E457C624B - 77634B7B5540735E467A5F467D57426E4F3D6F523E704D3966534570473B6640 - 345640324C372C4730273C2E293622232C13201E000800040606574A6E855EB8 - 3D287B7B808BFDFFF9BABEEE9596CFEFF1F6EBF2FF5A6398000028847CA6D9D1 - FFC8C0F1C5BDE9B2A4E59884D59880C49B76A79C64909B608F9B67959B6E9F9D - 79AFA083BAA98BC2AC91C6A891C7AA98CAAF9BCAAB87BCAF91C5B79CCFB99AD0 - B497CEAF96CCA893C9A88AC7B08FC7A888BAA58EBFA987C1A180B89C76AC9672 - 9E985D88955A878C5881955B7D945E7E55495D691E4D987776EA94CC1A06147D - 737DD2C5DAC0B6C8BAB1C3BFB6C7C4B7C8C5B4C6C8BACB222532DCD0D9472E37 - 969E9FF1EFF2B6ABB5EDDCE686808A0000150B090E0E0E0400000038354C8F87 - 986A6670635B6C5A5164544E5E534E5D514C594C495953515E29273702000F09 - 09190B09190806180B081A070713040311060613060B1C00000D231F369F9BAA - 787687706E836E6B7D32354064626CC3ABB5E1D4DCA39FA4D8D4DB8E89916B67 - 7BC5AFB5191E3002031806080707071103001600000E00001100000900000F02 - 000F0B07110C0913080B0F0F111303000B07081307081208091302030C272426 - 2C2E320603140706160B071B08041F000019756F83C0BACCB0A7B5B0A5B2BFB4 - C4756C7700000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000200F19C587E54B326B7A58875D3C6463437C - 6848836B5182663D79724B8768467D604C786A4C6E563D7959477F5C46725D47 - 735240694E406B4C3E674D3C61503D574C3D4E362B3B2A2C2E222623201B241C - 1D1300110000000023133C784CA3B086D39A85BB2C2555525666F7F9F3D8DDF6 - A7B2D8EEF4FADEE0FC46458311073BB0AAC6FFFFFF9293D70003B16174D4F6FD - FEF9F8FFD0B2D0C47E98BC788EBE8299BE7E96BA7993B97E92BC818FBB788DB7 - 6C85C06C84BD7181C46E84CF6B88D37389D17A8DD2758AD77A8ADD8190DB7E93 - DC7F97D48099CB839EC5819BC786A5C591B4CFACD4AA93C0BA95C1A56292A774 - 989A578EBE6A87575A59500230FFC7EA280318777681C9C3DDB4AEC3B6B1C2B6 - B1C3B5AEBFD2C3D5C7C2D031313EDDCBD7534E59ABA1ABB4A0A7ACA1A7635C63 - 73707706061A0303080E0C0908061800001202030D00001200000D00000F0000 - 0F00001100001100000B00000E0000110906160B081607021503001304021400 - 001202001202001202061500001800001807070900000C00000300000600000E - 7C7484BFB3BCCFC1C5FFE0E8897E84837A82FFEAF9493D454B4D58000012030B - 0D0B081808041F0406190006190D0B180B091807041404031606001406040E06 - 060F0809140708120808130909140B0B1504030D02001408041A07041609071B - 0D041E040B2212112C5A5A71A69FAE98919FB5ABBA69646E0000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000015D29EE54D3855664078704F80674A7F775D84654F7B7A568A6A3F80 - 5F3D7262517660437E5D486B52366D5E397C54446E583F6C533D684838573B3A - 392B3333282730201C1F0C0B0D070B1300180703110035163F744C9AA282CEB1 - A1D4D1D6F6C8C8F5342B5E1E202BD7D8DBFFFFFFF3F9FBEDEFFFA8A8E226245B - 383C64E6E9EEE8ECFE5C6BCE737CD0EFEAF6F4DBE1C6879DC05D73C56279C468 - 7ABD6675BB687CC57285C77587C57389BB6A83C1747FD18895C67A9AB77196AD - 78919E71919F66879A718E86668A825D85845B86906686996984A76F7AAF7090 - BC6C8DBA6176BC5C77DD889FAA616CD2B2D6C5A4BEC38EA7A9809FE57CB03B11 - 1BF6B8F92F0D2367646AB4A8BCA4A0B39B98ABA3A2B3AAA4B57B7C8D4E4A5D32 - 3848D3C5CFFFEDF7CBAEBCB5A5B0A79EA711141980797C09090F0707120B0611 - 110D25070B1503031904031F02021A00021A00021B02031C03021C080B1E0B0D - 1B0B0D1E0B0B1D09091D0F12220E0D1E0D0D1E120F22130F220F11220C122212 - 142914192E12182F151A30292B400002140B0B1F8E7D8D726871151C2CB0A8B4 - AF9EA2C4B1B5887980C7B9C140394200001208081408041B07091B0304130607 - 160B070F0907110706140708160704150909110908120708120B091309091308 - 09120909130708120906190906150907150808190C041C070C24000222000000 - D1D0DEB5B3C0C6C2D273737C0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000080213CD8ED947294E76 - 5188744F7C7555856E4C81755281644677643A776A507B5A4970563C6F5D3D6B - 573E67543D6B50485A43344E4230462F1F36231C1D1A18150D12160F0C16090D - 030000023522446F43888E69B6AC9ED2BBBAE0C5CAF2CDC9FFA08FD42015360F - 1316ACABCDF9F4FFE1E3F8D3D8FF8488C2020048605E84F4F7F9FFFFFFFFFFFD - FDFCFEF1EDF8E4D4E6DDABC1CE809BB36379A4657CB78AA7B690A9B08099C99E - B4CCB2C8B399B6B297ACAA839FA87DA9A18EB79D86AC937695938FA6A5A3B9B3 - A4B99685A1B7AEC5A29DB98777979C80A291809BAC94B4C7A0C97D465DC29BBD - DEBBD7A36480BC7B98CE98B8CCA9D8D57F814F1E3AFFCAFF2A152366636EA8A7 - B79796A7928CA1ADA3B56C667600192F060E20201E38D4C9D38175795C59647A - 7F8BC5B5C1968F9DA798A004020E0800120F1223242639232A3C383D4F393F4F - 3C3F503C3F513A3D4F333D4F333C4D30394B30394D343C4E3C4253343F523A44 - 563942543740533842533842523742533842543B46573F4556444658383D4F3E - 4A5A0000020F0F236D66766E7279524E5E848293787F8778747E0000003C4249 - 3C3A4900001407041402092007091D0906190D0B1C04030F0603130404130404 - 130604130708140708160806140E09160F09150907160606130403110B041308 - 000E08061604021508081506091E0D0E270000076D6D78B5B5C6C2C0D36F7279 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000161213CA82D7472C4D825E9377547D7552826C467B67 - 3E736E56816742766956755B43715B2E6F5B49725C4B704B39531C1E2012040F - 110C00140808140026001100000B000000001C12286A4687805CAA9487C5C6CC - F3CFD1F8ABA1DB9E8ED6B3A1EE9F8DC92F274900001B586187C8D0EEEEEEFFCE - CCF747477E00002CA4A2B3FFFFFFFEFFFEEBEDF1E9F0F3FEFFFFE2D5E3B490B5 - AE6F90C17F92D9C1D2D5DEF6CAC2E2C7A1BEAB8294C5A1B3E6BAD0C496B5AC87 - AECD96B7A388947D797C7B6D77726175716C777A797F545A5DA99FAF6E556D6F - 6D6E826F876B7076807C867A6575D4B4D1874E86C8B0E7CDBBCEC2A5C1935484 - C486A6C56D6F484B71FFDBFF29041B7B717DC5BDD0B1AABCB3A8BDC5B6C73C3E - 4F1622390D0F23131327A59DAA34343F5558658E898F595363DECED7796A7A00 - 0D190E001400021C0B1129585E707278867278867377857678867679876F7886 - 6D7685727B87737D89767D8A767A887A818E79838E79818E7B84907C85917C84 - 917C84927D84917C84927F82908083908487946069780000030B0D1F464653B2 - AEB6D2C2CC81757D4C4F59A8A7B434384D7F7A8303060F0E0E230402120B1125 - 11152B1113290308230E08190B081D0B071A0B061A0C0318070B1D121B29090D - 1E09091C08091C08061A00021609061602031400021302001500001400001300 - 001409092306082000000E585B6FCFC8DD767680000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000E00 - 00DC98F25F4260705487764F84745A846442747151816C43766550815B3F725E - 38676A58850F181D14000000000000000012130C35303E29293C131E2732182A - 3000407350949778C6A49AD2CCCDEFD6D8FFAA9EE0917EC8988ACEADA3E2CCC5 - FFB1A8D6392F4E0000282024546A6E88B2B3E06C6FA0000023474767E8E6EDFF - FFFFE6E6F0F2F4FAFFFFFED9C9D6C4ACC9D2C6ECC1A6D4A96287B16880C2819A - BB7F9DAB819EA2738FB96D83BD7786B084A3DD9DC0CB8CA07A6B787666777568 - 6F726A6B796A727A6576534B5AA598AA857F867B72838D8088676157A1749903 - 1502C3BFC7C97AA3D7D9FF730748A68193F8EEFFEDB2A66F225C877395FFC9F2 - 31092A827783DCCADECFB8C9D1C0D23133451E2E3C242A3E00000E2C32434443 - 53ACA7B8DFD0E094878D08090BB1ABB1363A5307142004000E000219666B7C8C - 909F8083908184927F84937F84927E82917B808D787D8B7F8390818392828591 - 7E83907E84927F83908185938084928084927F83907E828F7F85927F85918282 - 917F818E8184917079850000000C0F20151B279C919EBEB4B93530304C4A4EBF - B8C0C5B9C249444608111E00081508091D00001100091D00061C000007000008 - 00000700000F00000E07041D06061C0F12270606190B081B0404180F0D1D6C34 - 428784886B666A7268736A616C635D676B676F4C47530000150B0C2700002232 - 3444C7C3D37A7882000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000001C0D0EDC9AEE5029577561877148 - 766643786F517F724D775F407662517D4E4075704367352F755E83B800000024 - 1A000000000207004636555C477F4D33666F4889856AAEAEA1D9C4C4ECCACCF7 - B2A7E89686D09C8ED4AC9FE1B2A5E3BCB4E5D4D5FFC0C0ED433E4D00000B3D3C - 8225245B0000300F09591C14578E8CA1FBFBFBFFFFFFFEFDFCFFFFFFEFF5F2D6 - D0DFCAA2C3C596B4CDA7C0E1BACAD3A4B7BD839ED8B5C6FFF9FFF0D5E5B17792 - 9A6783D69AB5E9A3BA846173594A56735A67755F6E6F6073775E727358675F52 - 5FB387A266666E756774746176775C72A299A1433B3DA7A2B3D8A4CFD4B5D19B - 6AA0BA89A1D0D5FFFF96A82A495DA34A89F5CAF92402187A737ED1C2D4C2B8C8 - 8A8795878796B1B1BE51525E00000F070F25333748827A87AE9AA7CBBDC42C2E - 376D6A75222C3F00000D0000155154649597A3838693888A9887889685869584 - 8596848596848692848794878796878795878795878995878895868894878896 - 878795878996878996878996888A978688958787948787968787967579890000 - 000C0D231216292A2A39C5B4C13A3F48777075A198A25857600B131F1F243009 - 0D180000006666785C5C6753505F57505E4044503D3F4B3E3A483B34451E2C36 - 07041B00001408021A06041B02001A001923B53249747C81AC9AA6877B7CB2A7 - AA998E929C949780767C0000120800200E1323A19DA6DDD0E06D6B7300000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000160011DAA1DF593362675475714A76704A7B714E7C6043775F45 - 7C5C457D5B4072602E5B3E3FAAFFFFFF524D610000000013000200025533717A - 4F9F785BA7A29ACBCACDF3C3C4F2ABA1DCA08DD49C8DD4ABA0DCB5AFE6B5AEE8 - B4ABDFBFBBDFD7DEFACFD4FB62617B0000002423455C5EAD5657A11812502F2E - 51CFCFD4FFFFFFFAF9FAFCFAFAFCFFFFDDE6F4C4A1C1BD5E78D59DA4EEE3EEC8 - A7C5A07598AB84A0E1B7C8F9DCEAB18BA8925173BA7C92F6A6C0C5879760565C - 5B505B6C4F5D6A5A625F5C676A5A673E4652454E5B9662764459624444505246 - 553C5B567C6E7E2025377B898DFFDBF8AF5D9675505AC088BDFBE6FFC387A059 - 4368995C84FCD4FF2E09207A7480CDC1D4A9A0AF9E94A3AB9EAEBBABB8777282 - 0000190402153235443134464848578480895655621C24351F1D32000007242E - 439293A1898A9887879687889584849186839387859586859583829084859287 - 869385859184859184859283859283849181839081829080828F828491828491 - 85859187879480818E8483908F8F9F85879800000408031E1D23351C222C241E - 31646676706E7D504E590D0B1928394B07072000000C060618F9EFFFC9C0CDC5 - B8C5B8A7B8B5A5B1B5A6B5786B71B8A1ACC8B6C1726B7816152400061B00001B - 00001900091C51182E72697660556163576871606B65565E72686F4F46510003 - 1A060B1A7D707AB4AAB5D5CCDC7D747E00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000001B0E1AD38DCD - 4B3155734C7E724C6D714F79673E7A684C7C5E3B7A744D7D96608D994F83263B - A9FFFFFF8E93C2000000140D18B886F06C559E9C96C5D2DAF9D4CFFDA598DB96 - 83CFA991D4B1A5DFB8B3E9BCB5EDB7B8E7C2C6E6DBDAEBDADEEED4D8F9DFDFFF - A0A1BF151A1F04000031253D0E09380C0D259D9DA3FFFFFFFEFAFEF7F2F9FFFF - FFF6F8F9C5C1D6C7ACCDDCBAD1CFB4D2C49EC8AF7090B3677BBA8597B2839BA5 - 5D76AE5C70D691A1DD92A7BB718AB7758DCF899ED48FA0CA8C9CD190A0D195A8 - D593A4C7939DC88C95D7879ABB8C97C88894C58794C08D98CF8E9EA28783D697 - ADBA5A7EBFC0E8C87F8EAA4668FFB39D6F4278A588BF6D4D75EDBFFF1F0D207B - 727ED2C5D7B1A2B3A79BA8AB9BACB0A2B2A197A714132402071F090B1E303244 - 2E334623253823293929293D090218000008777D8B928F9D8A88968C8B998F8E - 9D8E8D9C938D9B948E9C948E9C95909E9993A19993A19794A29996A39C99A59D - 9BA7A19CA9A19AA7A29EABA8A0AEA8A0AEA8A1AEADA5B0B0A3B0AEA4B2ABA3B2 - BBB1BEC5BCC600000806022502021C2324392B30431D22371B1F321B26352E35 - 4809182803001A0000079491A1DECAD9C8BDC8C5B8C3B1A1AEAC96A3B29DA940 - 3E473B424DAD9EA9A4969F8D8489666169504D5A4C485740444F3C4252343740 - 3C3744373443342F3B33333D31354031304020263966697589797FAC9CAAD4C6 - D677717B00000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000001B1113C288BC563054835587754A72655175 - 673A7774447A8163909A6091B47A9FA0498B376FB9FFFFFF929ED8000000764F - AFDAD0FFC0C9DED4D6FFAB99E18A76BF9D88CFABA1E1B6B4E7B5B5E8B6B5E6C9 - D0EAE2E6F3E9ECFAD4D9F4C0C5EEC0C5EFDEE4FFE7EEFC74738D000000000000 - 04040E838196FFFDFFFDF8FDF4EDF6F9F4FAFFFCFFF3F3F7C7BBD8AC7FAC8F46 - 6CA14F6DBD75859F616D8B5367985A6FAB566BCB6980E191A6CF879AC76F7CC7 - 6978BF6A84BF6B88BD6E88B96886B86983BF7286BD7B8FBB7A93C57A95BA718A - C58093C18092CD809CC48293C27799D2818DB57FAADE949A871227FFE9FFB898 - AEFFB4C54F356D9885AD463B6DF2CDFF090C1D686470B8AEC0B5A9B8AE9FB1A6 - 98AAAA9DABBEB1BE333544000011040D2500061E0F14291C20350E1E2F02091E - 00000081808DE0CFDBD4C5D0D6C7D2DBCBD5E1CDDBE1CFDCE1D1DCE5D4E0E7D6 - E1E6D4E0E5D6E1EAD5E1EBD6E1EAD5E1ECD6E2EDD7E1ECD8E4EADAE5EDDBE5ED - DDE6EBDCE6EBDCE6EDD7E4EED6E4EDD5E1E5D3DFD4C5D2E9DEE343404A000003 - 09092503021F0F152E22293C2B37481D2B3C0214280E081E00000058626FF9F3 - FCE7D5DEE3CAD2DBBAC4C6A4AFBE9099BC979FB58C95A5808AC2909DBC919BB9 - 939BBD97A1C6A0A8B08E98B3919BB591A1B5949BB08B97B18C97AE8B94B39099 - B18C959F8A909D8A8EAD8E997B646D9D8E9BDBCCDE7F79840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000070E00ED93E0623E5B7C4681664A77765478875786875C8E95618DA26D95 - AA75977B1973749FD5FFFFFFB5BBDE000000FFFFFFD8E1FEA699E09587CE9488 - CCAB98DBB1A6E5BBB5E6BFBEE6CCD1ECEAF0F8E9EBF4D4D6F4C3CEF2B8BBEEBA - B8ECC3C7F0CAD5F7EFF8FFF4F5F377748C2F2B52ABA9BAFFFCFFF5E2F5E8D9EC - F6F0F8F2ECF6F5EEFCF8EFFFCAA3C09245668D4054A26570BB707CCE6F7FD372 - 85D57487DA8093DA899ECF7C8FC5697CC86B7CCD7082CD7182CB6C7ECD6C83CD - 6982CB6E7BCD6F81D1697CBE627DC1687BCA6B7ECF6E84C86F81C76C7DCE6E80 - C66F7FCA7281DA93A6C5668BE8877A884B6FFFEFFFAC869F775088888DA65749 - 77E1E9FF00061C6B6973B0A6B9AEA5B3FEFAF9F8EEF0F3E4EEE7D8E2C6BFC809 - 0E2600061B00092003091F00081F000019000C1E797789FFEEFAE9D4E0EADCE5 - F4E2ECF4E4EEF2E5EEF3E5F0F3E7F0F2E6EFF3E6EFF8E9F3F4E6F0F3E6EFF2E6 - F0F3E6EFF2E7EFF4EAF0F8EBF2F9E8F0F9E9F2F9E8F1F8E9F1F5E7F0F1E8F3F3 - E5F1EFE7F1F2E6EEF3E4EEEEDFE5D3CCD2060C2000001500001C000019000018 - 00001200001A00001A02081C6C7881F2EDF3EDE0E8E9D6DDE1D0D2C8B3B5B093 - 98AE8D90A58C90AC8B8DB5969996858A8B7378A78A8D9B7E848D727C97888C85 - 777A83727882787895888C877D7F86797A8E7C7F937B80BF8A91CB8C94CA8C95 - EFB7C3CEBBC5CBC2D1716D770000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000D0E02FFA0F94D2B5072 - 5278845584895885875686925F919D65929E6C98AC6E9677125A6F98D2FFFFFF - A6B5D4000000FFFFFF9186D99782CBAEA5E1B3AAE3A3A0E1B9BDE7DFE1F4ECED - F7E8ECF9D4D7F0C7CAF0BABDF0B4B5ECB9BBE7C2C5EDC9D2F6CDD8F7DBE3F4F1 - F7F8FEFFFEFFFFFFF9EFF9E8D4E9E7D7E7F3ECF5F3EFFBEDE6F9E4D3E8D8A4BB - CE7C91CA8596CF92A5D98599D97687D37888D47E91D58294D17F90CE7386CC6C - 80CE7082CF7687CD7687CD7687CB7484CE7387D07387CE7885D57889CB677CC4 - 879FCD8899D07887D18193D27D93D78094D27F8FE08A9AD0A1AECD7C96C17D88 - F2AEC2F06065A05F7F5281AA6F74A0568A9B534F8095EDFF00021E6A646DAAA0 - B0887F86AC9ABAD0BBCBD3C1C8D9CAD5F8E7F1D2C7D368727D3E46583542573C - 4D61666773B5AEBCF9E8F4F0E1EBF7EAF4F7EBF7F9EAF7FAECF7F9EBF5F8E9F4 - F6E6F3F1E2EEF5E5F1F3E4F0F1E4F0F4E2EEF3E0EEF5E1EEF1E1EBF1E1EAEEE0 - E7E9DDE6E9DEE5ECDEE6EADDE5E4D7E1E7D7E1E6D7E1DFD2DCE6DAE4E9DBE6F9 - EBF6FAEEF8B9B5BC444652161F330D182B121C301F293C303C4C515F69AAABB7 - FFFFFFFFF7FBFFF2FAF9F0F9C7C2D2C5B4C0CDB6C57E6A77625864342A397E71 - 8268666E03091C322F3C5C4C5AA69BA4605F643E3A4047454B494B50968B9248 - 484F463D425A4E54A1929E998C948D828787777AB4ADBCB6A7BACEBCCD766E79 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000C110EE98BE0523258886A868C5986794873865F8A91 - 66909A64959C6592AE6A9397357B004A7CFFFFFF7F8EC7000029FEE1FF9EA0DF - B6AFE7ADA5E1B4B3DAE1E7F6F3F9FBE2E8F7D3DBF6C3C6EEB7BCF0B9BAEEBEBC - EEBBC0EFBFC2EEC8CEF1D1DAF9D4DEF8E0E7F5F6F9FAFFFFFBFAF5F7EEE1F0EA - DFEFF2EAF7F1EDFBE9DDF3DEB6CBCF869ACB7689D48D9CD997A5D97E93D37288 - D08490D48897CF7B91CE7489D37687D17786D07887D2798BD2798AD07A8AD27D - 8BD07A8BD47C8DD47B8DD48091D7778DD4798BCB94ADD594AAD48193D6899CD8 - 8D9EDA8A9BDF9CACD2A4B5C77F98DE929CF892A9E5797E57789F6477A83580A3 - 5E819F268BA21F437A7AF4FF11091466626BA197ACB0A5893831D79387DFFAED - E7F9EFFDF9F3FDFFF8FFFBF2F9E9E1EAE5DDE5EAE3ECF2E3EAFFF4FAF8ECF5F9 - EDF7FAEFF9FCF1FCF5E7F3EADAE5E4D5E0DFD2DCDDCED9DECDD9DCCCDAD7C8D4 - D6C7D4D7C6D3D8C8D4D6C5D2D4C5D0D4C4CFD2C4CED0C3CED0C2CCD3C2CED1C0 - CDD0C1CDD1C3CDCFC1CBD3C4CDD9C8D4D8C8D4E1D3DDFAF0F9FCF4FAE9E5ECC0 - BEC8B0B5B9B5BABFC6CACFDCDFE1EFF2F1FFFFFFFAF2F9F9ECF8FFFCFEC5C3CC - 9793B2C5B8C8C5B6C46A676D59555E201622838293A197952B2B380307127D67 - 71BEAFB53A3E3E635C60766B71534E53A190966461676865665F6265AA95A1AB - 9DA3AA929BAF9397AEA2AFAFA4B4C5B7C8716A75000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000C00 - 12CFA1D06435588F59877448748D61898E5E8D9563868D5B8E996491AA5D80BA - 95E500001DFFFFFF8C91BE130064FFFFFF958ED4B4B2E1DBE0F2F9FFFCE5E8F9 - CBCEF2BCC5EEB8BBEBB8BAECBABBEEBDC2EEBFC6EFC3C7F0C6CCF2CBD3F7D3DD - F7DFE9F2F2F8F7FCFEFAFAF8F9F9F2F9F8F0FAF1EFFDEBE5F7E2C1D8D592A6CF - 798AD48294D78D9FD28594D17D8CD08392D08796D27D91CF7286CE7586CF7889 - D27A8CD57B8FD47C8ED47E8ED47D90D67C8ED48091D48595D48394D38591D985 - 98D78C99DB8A99D3899BD38797D98CA1D68F9EE19AA8E4AFC0D2ACBAD88D96FB - 96ABD78FA59C6B950074A44A899E427EA3557596457DA3357BA136547185E6FF - 181414665E66A399ACA1978E4B3AC8B9B8FDFFFCF6FDEFFEF9EFF9FBF2FDFFF5 - FEFFFAFFFEF8FFFCF4FCF5F1F9F9F2FBFDF2FAF9F5F9FFF6FCEFE0EBD6C5D1CE - BECACEC0CBCFC1CCCAC0CBCCC3CECABFCBCDBCC9CDBDCAD3C3D0D0C3CDD3C3CF - D0C3CFD2C5D1D3C4D0D5C5D3D7C8D5DBC8D4DAC9D4DAC6D4DEC7D5DEC8D6E2CC - D7E7D6E1E3D4DEF2E3F0F2E4F0FBF0FAFFF7FEFFFCFFFFFDFFFFFDFFFFFCFFFF - FAFFFBF5F9F6EEF5F5EEF2F9F2F9FDF6FDE1DCE3A4A6B99890A1927781514749 - 4F3E444533395D51549E787F46313691767BD7A8B0BF9EA20B120F3B47461B38 - 3957575AC9A0A648484643464D33353EBC97A5BE9EA6AF8A8FC9A2ADA69DAAAD - A3B4C5B7C6736A74000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000190013D89BCD623D6481578D924F - 7D996E99985D8E996593A66D969D5C86BA689CA3A4F7000000FFFFFFA9A3CE3A - 2393F9F5FFDBDFEBF9FEFDDEE6F3C3C8F2B7BEEFB8BBEEB9BAEBBCBDEABCBCEE - BFC4EEC4CBF0C6CAF3C8CFF5C9D4F4D4DBF2EEF1F6FEFFFAFFFDF9FAF5F9F6F0 - F9F4EEFDEEE6F9E0C7DDD799AFD28093D08592D48996D48597D5869AD4879BD1 - 8395CD7A8BCB7588D0768CD67D90D58091D37C8ED37C8DD57F90D68193D68696 - D88696D78695D68796D58897D68997D98C9ADD91A2DC94A5D48F9CDC90A1DA97 - A3D89DA6E1ABBAE5B6CED6A4BAE28FAADB86A340869F1983AB2083A43472A55D - 7F97337F9D4B76A24A7D9C5093AC31566F7EE5FF0608136A5F6BA9A0B3989687 - A28BE0C7C5FBFFFFFDFAEEFBFAF1F9EFF1F2EDEAEEF5F1F6FFFBFFF9F3F9FEFD - FFFFFBFFFEFFFFFFFAFFF1DEE9DAC8D4E0CDD9E1D0DCE0CCD8DFCCD8DFCBD8E1 - CCD8E0CBD7E1CFDAE0D0DCE3D2DFDDC8D5DFCCD8DCCCD8E0CFDCDDCDD9DECEDA - DBCCD6D6CBD5D5CAD4D2C6D1CEC2CECBC1CBCEC1CCC9C3CCCAC3CDCCC2CAD9D0 - D7FAF4FBFBF8FBFCF7FAFAF3F9F9F4F9F9F2F8F8F0F8F9F1F8FAF5F9FFFDFFFC - FBFFFBF6FAFDF9FDFAE8EDE6BFC4E1AAB0ECB4BDEDB7BEEEB9C1E7B0B9D8AAB1 - F4BCC5E6AEB6CA919BD39AA3D9A0ABCE909BC5929BE098A3C58D95B88A92B480 - 89C89197DE97A0D89194D9949DB899A4A399A6AB9FAEB6A9BA6F667000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000EA9FE067305E7C4C78AB76A6A26794A56997A05F93A76C - 94AD6B8AAF68A0B1B8FF000000253288868ED6ECE8F5FFFFFFCCD3EDC2C0EFB7 - BAF1B1B9EEBBB9EEBFBEEFC0C4EEC0C6F0C4C9F1C5CAF2C8CEF0CED7F4DEE6F9 - EEF3F9F9FAF9FFFEFBFBF8FAF9F2FAF7F2FDEAE2F5DEC5DDD8A1B5D47F92D07D - 90D3879AD9879CD8879BD38599CF7E94CE778CD1788CD57D91D68094D78596D7 - 8799D78799D68799D88A9BD98A9ADA8A9ADA8E9ED88F9EDB909DDC919FD993A1 - DB96A2E096A5DE9FADDB99A7D6A0B1E1ADBFEBBACDE8B4C5D994ADB88AAA997D - A3537CA3007BA14B7FAE4D84A944839A587FA9207B9E5E82A8558AA42B739237 - 77A633526953CBFF1207006A5F69AFA1B49E9197AF9DC4F2F3FFFFFDFFFDF3FF - FDF3FCF0E5EFF2E7F1ECE5ECF1EFF1F1EDF1EEEBEDE8E5E7E1DBE3D9C6D4D2C1 - CED5C7D4D4C5D3D2C4D0D6C5D2D4C4D0D0C5D1D0C5CFCDC1CDCBC3CEBEB3BEB0 - A9B4A8A1ADC5BFC9D1C7D1D4C7D3D4CAD4D4CAD4D8CED9D9CFDAD9D0DAD8CDD7 - D9CAD6D5C7D3E4D6E1E5DDE6E7E0E8F3ECF1FAF6FAFBF7FBFBFBFBF9F9FAFCF7 - FCFEFCFFFFFDFFFEFEFFFCF9FEF7F4F5EDE3E8E4D5DADAC1C5C79CA4C38E96C0 - 8892BD8893BF8B90BD8A90BA8B90C08C92C49197C6929ACB8F97CC929CCD949D - C89099CD949CC5989CBB878CD4919DDC939FE69DA1E8A4A8E4A8AFD9A3AFC4A2 - AFA49EAAA59AA7A599A9B8AABB6D646F00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000070F00E48EDD - 68254EA17199A777A1AB709FA2638EA8759CAA6895A15A789F76BECEDDFF0000 - 00000050817CC9FFFFFFB0B3E9A6A7EBBBC0EEBABBECBAB9EEBEBFF0C1C5EFC3 - C8F1BEC5EFC3C9F0D5DBF6E8ECF9F6FAF9FFFFF9FEFCF9F9F9F9F9F8FCF3F4FF - EDE8FBE5CBE1D5A0B8CD899CD28A96D78A9AD5879AD68596D58395D38294D481 - 94D48194D58294D88495D88696D78795DA8C99DC8F9ED9909DD98E9ADC8E9EDB - 929FDC909DDE8D9FDD93A0DD99A4DE9AA8DD9BADDB9FB2D7A4B7DAA9BBE7C7D5 - F9D0E1EAADC2CA8EA6AB6C9465749B487CA01885A24585A74881A55A85A5457B - A33F759A36779B306F993971953D69982A697F236B9011507568D0FF190C0870 - 636EBAA8BAA293A4AD9EA8EAE2E6DED4DCDDD6DFDCD4DDD3CAD4DDD4DED4CAD4 - D8CFD8D6CDD5DFD0DBD3C7D1B0A6B3A39AA5DED2DEDED1DEDED1E0E0D4E1E2D7 - E1E4D7E2E9DCE6EDDFE9EEE1ECEEE1EDECE0E8B9B0B7E1D6E0F9F2FAFBF0FAFC - F3FBFEF5FDFFFAFFFFFDFFFFFFFFFFFFFFFFFFFFF0DAE5EDD8E2FFF5FBFEF9FC - F7F1F6FAFFFFFCFFFFFFFFFFFFFFFFFEFFFFFAF8FCF0EBEDE7DADEE5CED3D8BF - C5D7A8B2D099A2CB919BC68B94CE8A95CE929CC9929BC7919BC9939DCE919DD4 - 919BD8949CDA919AD6939BD8929CD7929AD48D96D58F98E0959BE5999EECA0A3 - F5A3AAEAA5B0D4A8AEC3A4ACB09EAAA99BADA89CACA59DADA196A5A397A7B5A8 - B76A646E00000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000F0000D58DCA935887C395C4AE748B9E6091 - AE7B9DAA7295AA75A3A35E798367C7FFFFFF14130B000000E1DCFAFFFFFF8487 - E1C5C9EEBCBCEEBBBEEFC0C4EDBFC5F0C5CCF7C5C9F6D4D9F3F5F8F9FFFFFBFE - FEFAFDFFFAFEFEFFE8E6FBD1CAEDE2D3E7EDCCDCDBA6BBCF8EA2CD8597D58797 - D6899CD4869AD58497D98798DD8D9CDD91A1E096A5E39BA8E19DACE2A1B1E2A4 - B3E1A4B5E3A6B7E3AAB7E2ADB8E6B0BEE8B0C3E4B4C5E2B9CAE3BBCEE5C0D1E4 - C6D6E6CCE1E7CCDFE6CBDFEBD4EDF8E6F9F3ACC8AA628D6C628A3E769B1A86A7 - 3885A74A82A13B789F2B719B4478A1266A8E2F6F9A2E6C8C1560863B72922C69 - 842F79A11D72965484AA454C6D4AD2FF130D0F70626EB7A3B59D90A1A89CADFF - FEFEF8F4F8F8F6F8F9F7F9F0EAF3E5DFE9EEE2EDFEF1FCF9E9F6FFFAFFFFFCFF - E8E4EBF9F2F9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFCF7FAF8F1F5EFE9ECE1DCE1CBCBD2C0 - C3C6B5B8BC9F9FA64B4758656172DCD6DCFFFEFFF7F3F8FBEFF3F5DCE2E2CFD4 - DBBEC3D5B3B9D9A6AFD49BA6D49BA6CC959DD4929ED499A1DBA0A7DFA1A8E5A5 - ACD4969DD3979FD998A1DC969FE2949FE196A1E29AA4E09DA4E0A1A6DE9CA2E1 - A0A6E9A7ADF5B4B8F8AFB6F4B2B7E6B2B9D6AAB7AB97A19D96A59F92A49F92A3 - 9E91A3A89BABA69BACA7A0AFAAA0AFA49BAABAACBD6C66700000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000FFB1FF976482995D89A76697A46B889D5F96A86B97AE7696720963 - CED1F6FFFFFF8A80E41A1200FFFFFFC7CCFC9FA1E0CACDF1BFBEEEC1C5F0CAD1 - F7D4D8F9DAE0EDF2F1F3FFFFFFFFFFFFFFFFFFFFFFFFFDFBFEC6BCE38975BDB2 - 95C5DAB9D3D59AABC67A8BCC7A94DA849CDC889DDE90A1DF95A1DF94A1DA8999 - D48191D17C8ECB778CC8768BC9758ACB7387CB7288CC778FCE7F93D08396D182 - 98CF7D95C97E92C6798EC7728CC67A92C78799B86F85AE6282C382A1B9788FD5 - 7886A14C7A184E810E76A21875A41F6F9B5379AD3875A63C729C196FA1326A97 - 3E709E356FA81D6B99396E9B3E749D27749B3D73A62B6AA11A6F95457EA2253C - 7278DFFF0007196B636DB7A4B6A192A1938A98FFFFFFFBF2FAFAF1FCFCF3FDF4 - F2F4F1EDF0E8E4E8E4DEE3E1D9E0DBD3D8DDD8DBDBD7D7D1CBCECBC6CCC5BFC3 - BEB8BDBDB7BAB7ADB2AFA6A9A8A1A4A1999C928A8C6360695C5A616862656C66 - 686A6465625F58625F595C5C536864669D91A3736D7F847D8D6F667600000B00 - 0000595964FFFFFFFBE7EEE8BBC4C3969FC89BA3C796A1C996A1CC99A1D49CA3 - D59B9FD99CA5DE9CA2C79698B48788A77C7FAE7E84CA949BE7ACB3EAAFB5EAA5 - ADE8B0B4E2B5B4D0A1A1C6979CC999A1E6B5BFE4B5BCD8A9B6C5A0ACB09CA4A5 - 95A19C91A18B88989A90A29D93A39D92A2A29AA99E97A4A69CABA89FAEA69DAC - A89EADAEA0AFBAAEBC6F67710000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000020611FFB1FF643F4A94 - 5D8C8E5D818F57789F679FA269A08A5D786A1E54B5AECBB6B8FF9881DFFFFFFF - F6FCFCB2ADE4C5C4F2BEBEEECDD2F2DEE3F8F7FFFEFDFBF9C5B5D0BAA4CCFFFF - FFF4F3F1CEC5CBC5BBCAA794B76E4B8F8871B0E3E5FFF1D8F0B66C7F69253263 - 3445854C5888545E8A56628650587C464D7B3F497A39467B38487E3E4A773E42 - 703D497540627236536B343B70464B78545A775255673D4552262E4F201E5E29 - 3272333D85565C6D3C5099475DB16F855F48556F1622425F8B118CC23378A946 - 6CA5366FA81E79A7276DA14674A73974B0336DA2356AA24774B1356DA131679B - 507CAC1E6BA13273A34A70A02A70A1427EAE2F4F7966C9FF000D1E68616AAFA1 - B29E91A18C8492ECE6EDFFFDFFFFFDFFD4CBD382797EA2999C8E87878F898980 - 79775A56635E59647A7477878483868182706B6C837B7E8881838E83868A7F83 - 8885858B8989807B7E4A4C5C4042526F73718184808386838B88858986837F7F - 788C8E8FFFF9FFDCB4BCDAB1B9E3B7BFA1848E4B4454888C96FFFFFFD7BFC56A - 5B5D332E2C372E323028302A262F35333F3D3037523E406F585C7B5D638C6869 - 8E6A6D8B6A6C8363657A5A5B826064805F6494676C916A6D8D686B9964669A73 - 779C909AA694A3A0909F9B8F9F998EA0908D9B968EA09A8EA19E91A1A092A39C - 91A1A195A6A196A6A397A8A398A9A497A8A59CABA69DACA397A8B0A5B66A646E - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000080D14E292C0563C3D7E4480814A67865E739249A184 - 4C4C50355AA77FB89775BA767DE1E9D8F6EEEAEEC5CEF2B5B0EECDDBEDF2EEFB - F4F9F9FAFEFBFDFFF9FDFDFAE4E1F6EEE1F9F8F1F5615189130040673869784D - 83A1648EB87787D4B0C6F1C4E2984D5D11000000030006080406040604000200 - 0000090B0D26282E1D221F090802180E0D0F0C06000007201C3F342C4E2A191E - 290E0F2913242B1D2A3C2F2C451F2850193266364E64526455485B9E5C7AF38C - A83E363F653B37D13A46475F931484BA337FAC3474AA2971AA2972A63974AA43 - 70AB3375AE2E71AB4C78AA3770A10D699B4871A1336A98257195556FAA377EA5 - 2B7FB54080B633618272D4FF00041169616BA8A0B19D94A4938A9CADA5B3FAFA - FBFFFFFFB5B0B5756A71B7A9A7B6ABA5B1A9A2B7ADA467677864636F756E7997 - 8E958F8989827B7D8D87898E878893878A92888B8E8A8A8C898A8B87886A616C - 665D697F7C7C7B7A777876747A78737876726F6B68898C8EE4DBDEDDB1B8D5AE - B5E1BFC4C8B4BA80788CE9EDEFEBD1D2523F403E34354D3A3F473A3B4A38384E - 3D3E5A53595F565A6E626393897F7E726B6C5456765F607C686678645F886D6A - 9A867F91807888655FA06B69B46666AD6B6EC794A19990A49A8D9F9A91A19B91 - A1998F9D928F9B9991A1988E9F9A91A19890A09F90A19F93A4A195A7A196A59E - 92A3A093A4A69AABA199A89C98A8B1AABA686670000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 06C588A1502A435B4254834E72703D74573E376D3860B29DE08B78A960357893 - 93E6E7E2FFC2ABE7D5E9F4E1E5EAF5E2F2FFFFFFF7FCF7FBF9FBFFF9FDF7EBF6 - E9DBECD9CADFD9DAE8DFCFE8C06F94B85676C27787B13F55A81F46D49DBEEABC - D36E24320000000B1E192F18242C0E1D29161E2715192C181E34233034253129 - 19202718182E231D2C141D230011260D16381D224422284C293B502E44572B37 - 7040507D5E7672697C5D54678F5E7BE693B16C4F515D313BE46379FF8191487E - AB0073AE297AAD3684B22684B2397FB24280B12B71A92876A63976A934739F3E - 769F3A71A13C7A9A4C7CAA2A71AB458BA82875AB5583B0066FA73D547565D9FF - 200F1669616BB2A4B69F95A49B92A19A8B9EC3BBC5FFFFFFCBC8CC6B626E9D93 - 909B8D909F9395A397908C8A8979728350515DB8B0B6A79F9E948A8D90878F99 - 8E8E95908F9891908E898A8780838781826969737A7C877E7878837B7A8F8887 - 9F9792A7A3A3C5C1C2CBC5C4C0B7BAB9B5B9B7B8B8E0D8D4B2A5A8AFB0BAFFFF - FF53394032242554454538383F4A3F465645455D484C513F40736D6C857B817E - 6D6C86776776615F8A74728F78749B847EB9A397AA958796716BBB7F7FB96762 - 7A666CA993A6A491A2958D9A968D9E998E9F9A8F9E988E9C988F9D988A9A998A - 9BA293A39B8F9FA092A39F94A2988F9E9A91A19E96A5A49AA9A298A7A39AA6A7 - 99A7B1A3B56C606B000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000070213BC819D542A466145549C5F - 804A15306E5468BFA0E0A788CC6860872E0022A193F6E5E8FFE9F2EEFFFFFFDD - D5E79582ADFFFFFFF9EEF9F3E1F1E5D2E4E0CCE1D9D9E2D9DFE7DCE6E8F1E6EB - CC7C93BD5974CB7F8DCD9FA7D9D5E2EFDAF3CD7A96440009000000161A162F16 - 222A131E29161B2813162A1522311F302F1F2928141C281519281B14280F112A - 0D1B2C1C28382430422029441D274E263F583D5862536D645F7857556D805874 - D28AA4AF5E616F3E4B526A95507CB21878AD167DB03981B7347BB33180B23182 - B61674A61F73A53C7EA94276AA3974A32F6D9C35709D4273A33D799D3C76A13C - 7DB5237CA94D7BA818689C397EA33552676AC9FF030C0B6B636DB0A2B49991A0 - A098A7A696A8968796C8BFC7FFFFFF928E929F939CC0B3B3BCB2B0C1B4B6C3BF - BF988D9A938D9F8B8790E8D8DDB5A7AFB7AEBBC9BDC2CBBFC4D1C4CAC9BEC5C0 - B6BDCABDC59594A988889DC6BFC3D3CACCD0C6C9C6BFC1BAB4B3D3C8C5AAA0A1 - 9792969A9096938C8CC5B5B4ACABB0FFFFFF8E686B0000003F313C42353C4543 - 4454464A5243454F393E523F3E928875988C7C8D80758F7D7BA39382AA9586B0 - 9B8FB5A197A07E79926462B5797199555D716F819A94A4958C9B96909D998D9B - 968B9B988D9F9A8F9F958D9A998F9E988D9D968A9C958B99948D9D968F9F9990 - A09F94A39E95A39D98A7A397A9A59AA8A096A59A8D9CACA1B26C626D00000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000D0C0EBA7C97672F5B87566F915D7A380700C69CE7B59AD78C73 - A03F304E3B00169479D4FFFFFFFAFFF8FFFDF9F8F4F9EADEF1FDF2F9D6CBDFE0 - D8E8E9E4EBF8F8F6FBFFFFE4EAF2D4D0DBF7F6F2FFFEFFF0ECF3F2EEF6F0F4FB - F5FEFFF2D2EAB5506B3000000004001F18152B1416240D0D200F091C0F0C180F - 0F1B1216361D313F2334200C0F1A0B1E36184C3F1B4B37222F3B28273D161F40 - 192C57455C67597560587650566B755573CD84A6C0666C7B474E456C993171B0 - 2E6A9F366EA2277BB01E7EB4327EB52873AD3777AF3B7DAD2A70A33C76A72C73 - A33968A144709F3A719D27649439689E2A6695325E8746678C3C6A8F34748A4F - 7E9A3B526C42C4FF1E141666626CB1A3B5A096A5A196A5A296A6A797A89E8C9C - D2C7D1FFFFFF9B959DCCC4C5DED2D0D2C5C7D3C6C7AFAAB1978B9E8E8897B5AB - B1BBB2B4ACA5A8C5BAB6BEB2B1BAAFAEB8ADADB4A8A8B5AAA98F8694746C7FA4 - 9B9EAFA2A6B0A3A8A79EA0B8ACA9D0C1BFB7ABAEAFA9ABB2A9AAB3A7A3A29B9D - E6E1E6C3A4AC1815195B4E4D514445352C35453B3B4437394F40425342457563 - 5FA08E8397877C9A8B81A18D83A59185AD998CAF93889A746C9B625FAC706F91 - 64658779909D99A898909C978C99978A99978C9B968C9B998E9F998E9D9D91A0 - 958B9998909F968E9E958E9D97909F9F97A79B93A29F97A6A098A6A097A7A094 - A49E92A198919E9E91A1B4A7B6695F6A00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000001C0712EA9BBA - 945B7EA355824C2330653456B6A2E7A791B24D2B69513B4056223D1A0046FFFF - FFFFFFFFFFF9FFF8EDF8C5BCC7BABBCBFFFFFFEDEAEEFFFFFFF9FBFBFFFFFEE7 - E4F2C3BED3E6E1E3FFFFFFEEE9F6EAE3F3E5DDEEF0E4F9E9B7D597394F150000 - 0011071F110E1A00001F0C00200712200F261E1D131D140D29122F2B1A1E1B13 - 002C1B45492A7947275F3E273A3B26243912184C293D62536B615B7653536C6F - 5775C17E97C46264894E5E377AAD1383C33771AC3B6C9D3A69A23377AB296DA4 - 3D75A9357FAE237BB53480AF377DA9407AA72B77A34374A63A73A6286E9D3E69 - 971D678D487F9E34607B436580295B81535F7B3D5D8B1B5C616FB3FF1D132B69 - 626BB6A2B5A398A6A397A7A196A6A495A6A594A7998799CDC8CEF8F8F9A3A0A3 - BCB2B5E5D2D2D4C8C8D4CACCAB9FAA91889CA496A2CCC3C5AAA1A6CFC1C0C3B6 - B7C5B8B8C3B6B7C5B8BBBDB0AF9E94A17E7788B3AEAEBDB4B5C5B9BBD6CBC8DC - CCCBDECDCCC8BBBABFB3B4CDBFC3B1A8AAC7C6CEDFC3C9473B3B867C7191867A - 695C582C1F225443455C474F664F5265494F907B779B8A7F9F8D7DA48E84AE98 - 8DB49D93A18178996963A45D5DA065618C6C75998C9F9A909E958B9894899894 - 8B9A958A9A928899978D9A968F9C978D9A9A8C9D92889897909F9A93A3948E9C - 9B92A09E95A29C93A4A29AAB9F96A6A295A69D93A29E93A1998E9D9E92A0B6A5 - B46E5F6C00000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000001B0D1BFFB1D587557AAC77995A081E92566F - AF9FF1B383BE3022286B3B3E705A75400018593D87FFFFFFF5EFF7FFFFFFD4D4 - DB818AA2FFFFFFE1DCE3FFFFFFF7F0F4FBF9FCEAE9F5C7BFD6D8CDDCFCF9FFE9 - DFF1E3D4E9E6D3EAECDDF2E1A6C382293C0300000007002F2920544759624D6C - 4D39582F1F3A1A11081A13040E16290B1924231A163B244E482E7B4731684434 - 4A351F22381512583740604F68544E6F6C5272B97289D1657292576F3582B509 - 8FC52678AB3969A3366A99355E913D66973A659C2C6193386C953A70A11F79A9 - 3481B15082B02777A93D85B12681B72A79B0487395376D9827648950697E1F64 - 9562558D445C89346D913125477195ED07091B6C6670B5A4B6A196A5A69DADA6 - 9BABA398A8A498A8A499A9928795CDC0C8FAF9FBACA8ACAEA1A3EBD7D7E7D5D0 - DBC7CC968C9E918694BEB3B9A498A1DECECED4C7C8D6C7C8D5C7C8D8CACAD9C9 - C9B8AEB9857B8D9E979AB9AFB0B2A6A7C5B6B6D4C2C1CFC0BEB5A6A4A2939491 - 8486BDBDC6F6E3EE644946827460948774998D7E968A786E5E575E43506B5156 - 70535978565D816669A4908AAD9E91B5A195B494889A6D6BAA6362AB635F8B55 - 538076879693A2978E9B958C97958C9A918996948A9A988D9E948B9C988E9B98 - 8E9B948A999A91A18F8A989891A19893A295909E9C91A09B92A19C90A1A194A5 - A396A69D91A3988FA1988A9BA494A3A18FA0B5A4B36D606D0000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000019030DFFB1DA794259AF77A9994F606D273ED8BCEDF6D8FF71588A300000 - 7F4B7576535F52344E000000470057D1C6DCFFFFFFD2CFDFC5C4D3F6F2F5FFFF - FFF2EBF4F6F1FBF5ECF8C6B7D3B8A6C3FCF0FDF5E4F9DDC4DBDFC9DEECD2EAD8 - 8BAA520F1F0000001D1C0D4A31455E4E79655482463F6526224425162932242F - 3C273C42203A4926355235404D3254401E4B3F18313C1A204B2C3463485D614B - 6C754A70BD6E85D46F7680637F3477B51384C31B80B23277AA2C70A622639533 - 547E4950723858782C51814458873C52834458872A568B3A5F98305A88345C85 - 3B639048678E3C4E7E3B4475404D7D4E488648659C37508E556392473F742832 - 5B5B72B51103116C6771B9A8BAA297A6A397A8A095A59C91A1A195A5A398A7A5 - 9BA9918695D2C7D1FFFFFFD1D2D3948791B1A0ABD0C2BEBBAEB894869B918893 - A0979EBFB3B6D1BEBEC8B7B8C5B6B9C7B7BBC8B9BBB5A7B19A899A8C8384C2B6 - B6BAAAAAB5A9A6B2ACAABEB1AFB7AFAE969498BEB6C0F8D7E14B2B3203040729 - 24293325284034374B40425A4A4C6B4F5573585F70595D826B678C786F93746D - 8C6664874E5288524AA05C5D9A56607F6A768D8F9D9B94A6908794958C999A90 - A1978B9B9C8FA0998D9D978A9B968999938A9A8F8998928C9C9B92A29891A19A - 91A19A8F9F988F9E9C93A19F96A49C93A19B8F9FA395A39B92A19F93A2A396A6 - 9B8E9D9F93A1ADA4B4645F680000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000191213D07FB062364593 - 5574A3718B772C60522E2EA78CBFB299DB705978452044614055654E4E6C4F69 - 52305C350047A9A3BCFFFFFFD9D2DEC5BECFF4EAF9FFFEFFEADFEEF3E9F8DAC6 - DDAF97B3DCCBDCF5E1F5DAB5CAE5C8DAEEC8E5C3718E340003000B08392E333B - 2732403B4E594C734C436827283F29193B421F4C4B26404E2C3355373754373B - 462E3C391D34361524391C28503049623D617A4060B05C68C268777A50792F4A - 8A3A569B35568E37558C3E5D933B5D9232457C453F673D536C3B53844A50733B - 3B531C233B39334C3C395939396531355A393951302E4F3B39622F4D81424278 - 4D4A7B5F4C8B39458233447740457A4B508318354E7582C00700166C6670B8A9 - B9A195A4A195A5A195A7A197A7A195A6A095A5A095A49B93A1A591A0C3A6B3E1 - C9D6ECD7DFCFBBC6B49DA9B5A4ABAC9FA4AC9AA5A3979EADA1A7BFAEB6B6A6AF - B8A7ACB8A9ADB7A8ACAFA2A7958A957C717AA5989F9D8E96A0969EA59DA3AA9D - A3AB99A1D8BDC6F1BFC9B17C838C65698B5C6A7D505F724F5475555A7E5C6088 - 5E6387595E8E5D6297646A9B6269996068995D65A4686EB1737AB17D81AF8194 - 8687939694A2958D9C938C9B928998938997958D9A948B9B968C9D928A998C87 - 95938C9B998D9E948E9F9791A19A92A19790A09A94A39992A19F97A79E94A39A - 91A09991A09F94A3A293A2A395A5A198A79E98A4A399A89A92A0ACA3B3615D67 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000060008B272974C304866393D6E466C885B745E3A5A36 - 191A6D496F7C609A67598767496F5E475967465F674A695F435B360032AD96BA - FFFFFFDED4E1A38CA9FFFFFFE7DCEFEADCF0EBD4EEB899B5B398AFEDD1E4E1B5 - C5E1C0D2EEC4E1A5556A1600000609122E242C0C1D0E0E190D261F29181E1F00 - 150B030C0F0406080000000B00070B001300070B00070012040732091E421528 - 5B2A318F474BBB5F6FB06182605080283A793A2E712A315D2F3E684F46874947 - 8540386E4D3B724346873D4673424B6E38435227323E303544282F3F4A446244 - 4272493F673C3D632936483A3F5837405E3B38733642705053803E38854C647C - 4042754653850818368387BF03001268646EB7A7B8A49AA79D93A3A195A5A59A - A9A397A8A599A9A298A59D92A19B91A1948B9A8F87959E8898A691A1B59DACAF - 979DB69FA6B7A0ACBDA8B0BBA3ABB0939CCAAFB5CDB1B7D0B4BACCAFB7D2B1B8 - D4B2BBD6B4BADAB6BDD1ACB5D8AEB7C99FA8B99AA1B99BA1D09BA1DC9BA4E4A1 - A8F2ACB2F5B2B7F6B3B8F1B4B9EBAEB5E5AAB2D8A4ABD7A3ACD1A1A7C79EA1B5 - 9099B5959BB7969FB99FA9AE9CABA39BAC9491A1928B9A948A98948B9A988D9E - 978E9D958C9A9289978C87969189998F8B9A8788968C8D9B988E9E9691A19994 - A29C93A39790A09893A19994A39B95A59E94A29A909F9A8E9E9D93A2A093A3A3 - 94A39F98A695919E9E97A49A94A2ACA3B465616B000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000180C - 15995C6F3F324D714751592C3C58384E643E636F4A615F3A424C354952235361 - 3C6F70596967476367486D705F7A5944571D00296A4F71FFFFFFF5F1F8B79FC1 - F0DFEFEDD6EBF1D6EED4B3CB9D788FC598ADE6BCD1DCC4DFDCADC78C35423100 - 002E161C441C25360E1D3307183111183D16204A091E4A0614520B195F192F67 - 313D75393C8A38469B455AA95F6FBF7887D38B98E09AA8CB97B57D77AA2E4C8D - 22366C2E33602C39623B466A474876393469383061473F73544B8545517C2335 - 541D2239263436151F372B2B442F3A5F38466F394270241F2B28323E4451583D - 44664245664D4A7F455476364C74464F8E495787405A8C4B5C870D24458691C0 - 00000D6C646FB3A5B6A49AA9A59AA9A69DABA497A7A195A5A195A49F92A29B8F - 9E9D91A19D91A19F93A39187999A8EA09990A19991A09C909D9E8EA0968B9B90 - 8993847B87988D99968692978693998994928992988B95988992968B929D9099 - 9E8F988A848C8F8A92979199A496A1A4929E9387918D858E887D878279857E78 - 8377747E73747E70727D7D7E8885808C88808D7A76838B8491938A9F928A9D8F - 8A998E8796958D9C958D9B948D9B978D98A08C9B9589978F8998878390888496 - 8C88998B89999193A190909F938F9F9893A29692A19B92A19B94A39D95A49D95 - A496909F9A91A0A193A2A491A3A495A69A96A59994A29993A197909F9F98A59E - 97A3AFA4B46A656F000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000D0000A775873C1D35604946552B - 3F52334352314B58434D57373D52385351404D573F37582F535B3B574F385A59 - 4A6A694F856A537D3E1B4D2F0442E6E6EEFFFFFFC9B5D1D3B7D0E0C2D8D9BBD3 - C194B5BD9BB8EBD8ECDDAFC8BE6783C55A74D9788DD6758CD66F86DB758AD97C - 8FDC7F8FDF8294E189A3E495ADE79EB1E6A2B1E29FB0E19EB7D8A2C1C99AB6B8 - 8DA6A281957762803D3C7A1C32842F3A834D3E7E463F732F3C663036623B3873 - 2C34612E2E3F3E344330313D242B4C3449533342552B2C5551506A191B2F0000 - 00000E07000000242F2B14231D253850473C67383D5F2C42543D4A724A4F763E - 5B782E53763F4C77405E7B266287433D625E9AC90C00096E6670BAACBDA197A5 - A399A9A195A6A29AA8A39BAB9D95A59B93A3A196A89D94A69E95A8958CA0A29A - A99D95A4A196A9A499AB9F99A7A196ACA399AE9D97A9A79FB4A195AAA89DB1A1 - 97AAA19AADA895AB9D93A89E96AA9E96AE9D96ABA097AAA69BAFA494A7A69AA9 - 9B94A59690A39595A79392A49C8EA19992A79A92A4908B9F938D9F9D8D9E9C8B - 9BA194A59B92A39791A1968E9F948D9C978F9D968D9C958D9C938A99938A9994 - 8B9A9286968C8794938FA19190A29495A79791A28E8C9D908D9D8E89989791A2 - 9B95A59690A0948F9F9A93A29890A0978D9E9B91A19F92A3A395A39C95A19B92 - A29891A19D96A59893A19E97A59C95A3A199A79D97A4B3A9B868636C00000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000180025B186C3403244643A695F455E593B4C57385758354B5038 - 4053344E4832444E324B50384A4934404A3C474E3D4C4F36315440555B4B6452 - 34592000315A4B70C2C0CBD4C1D6D5B5D3D1C0D4D3C5DDCBB2CEC5A1BAC7A6BB - CEB7C9C6BACEBAAEC7B8A7C7B5ADCBAFACC9ABA3C1AAA1C1A49CBE9A8DAC8C80 - 9F76739C4E5797253D8506284E00090B00000000082500071D000006221C373B - 2F4431222F28274B3136632932552E306039366A20223C1D192F23303C1E3625 - 3639443F4871454E8B35476E152E321A20241D20221D2A253543464A49635E52 - 85524C814342734F4F6F424F5F5D4E814C49823A4982504D74454F5600365248 - 56711F285A5D859B09110B6D636DB5A6B8A59BA9A397A6A299A79B94A6A19BAC - A29CADA19BAD9C96A8A196ABA199AD9E95AA9F99A6A19AA9A197AAA59EAE9996 - A5A29AA99C96A39A96A39993A7A299ACA497ADA496ADA193A99C97A39E98A69A - 92A39E95A69B92A3A39BA9948F9F9694A19A95A29D94A3958D9C948E9C948F9C - 938F9E91909C8F89978C87948D8996918B9890909D8F8C97948B98918C999B90 - A2958F9B958F9B948A99988E9C968D9A988F9C968FA0918EA58A8BA08788998A - 8D9D8B90A0938E9D918E9C948F9E938D9B9892A1968F9E9A94A39A94A2948F9D - 958F9D9B909D9F91A0A193A19A909E9D95A1918E9C9792A19C95A39C94A29C95 - A2A19AA79C95A19D95A2B3A8B76A616C00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000070B09936CC5 - 493C586246816757936B4A8B66598D6A4290625A7B5E477F5B457B5F4B785B4E - 715846685C44685848685C4B6352455B583D5761435B614A624B28523C183F53 - 3B585F49655C4A60594B62594A62574D655851695148604A3D5A513F65503E67 - 493B5B4A39584B38614B3B684C345D572F515E39583B3D620C3B6A1F49813251 - 73202F3C2C29443A4667243337030B00020D0E0C1F0D041600080C0E12020D1B - 091335304F2837572536403232472E2E452F344B4744775052933E4F7F3F3660 - 142923153B3038425D504A7B5A5A8D4F4A80404E6E45466F4948854B52875454 - 8A4E4B7F535F84333C6D4A447049467527546D42446B164467727E9611091B76 - 6D7AC5B8CDB3A5B9B3A5B9ADA6B9AEA8BCB2ABBEAFA9BDAEA7BCAEA8BCB5AABF - B1A7BDB3A8BDAFA9BCB0A8BEADA7BAB2ABBDAEA7BAB0A7BBB1A7BCB0A7BBB0A7 - BDB3A9BFB0A5BBADA2B8B2A7BDB0A5B7ADA6B8ACA4B8AFA7B9A8A2B4ADA3B8AA - A1B5ABA2B6A9A1B4ABA1B6A6A1B0A49DADA59EAEA19EAD9C96A59992A19D96A6 - 9991A19F95A69B95A69F98AAA398ADA196ABA396A9A299AC9993A69694A39997 - A79E99AA9A98A89E9BADA09DB3A5A1B6A09EB1A1A0B19F9DAFA6A0B0A29CADA9 - A2B4A59DAEA8A2B1A59DADA49EAEA49BABAA9DAFA69AAAA299A8A59BA9A8A0AD - A19DADA8A1B2A8A2B3AEA9B8ADA8B7ACA4B5AFA8B9B3AAB9B3A8B6B0A5B5C5B8 - C579717A00000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000030202493F4F00001342360640004B152F31 - 1837453318652A2B472F2C553027593228582C4053322C523B24572C2E4F2C2F - 45312A502A2C453032452E2A443A31493E344E342F472B203730243730283331 - 252F3A2334311D3519223226273629222B2B1E2638252F2A2731332739432640 - 382C3B292A33302B3830304315263919263A2B314C272B42232B45253151201D - 281E09031D07121A061B220C1A22150B0413000612182A234631395525315C23 - 2F531E2529241F2F180C3C25132A2B28300026300F29311D1B372B2748383259 - 282A461D252C1B253F292A2C202840112047333E4D2C325E15264E080D002614 - 193231481B24522B283E352C3B2B426E1B0D1C433F45726C7869636E6A657066 - 667166656D66636C68666F67627167647169646F69636E6A636E67646D67636E - 69667068626F65636F68616D65606A66606C6A667169636F66636D64616D6560 - 6B69606B67636E696470635D68645D6967616D645E6A68636C615C68635D6A5F - 5A64645D67635D685F5D665C576354545D56555D55565F52586157535B5C5662 - 5856625B58635D575F54545A56575F5A57615E5B665C59605F5C645A58625C5B - 685A5D68605E6A62606B5D5C685D5B63605C65615C66645F6766626B625E675D - 58625E5962625D675E5A645D5A635F5961635F67665F6A656069615D6764626B - 68656F69636D67626B69646C6C646B69646A7771794644480000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000424D3E000000000000003E000000280000005C0100002C00000001000100 - 00000000900700000000000000000000000000000000000000000000FFFFFF00 - 8000000000000000000001000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxInsLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxInsLnk.pas deleted file mode 100644 index ba01d526..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxInsLnk.pas +++ /dev/null @@ -1,2997 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxInsLnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, Graphics, ExtCtrls, StdCtrls, Controls, ComCtrls, Dialogs, - ImgList, Forms, dxInspct, dxExEdtr, dxInspRw, dxCntner, dxPSGlbl, dxPSCore, - dxBase, cxDrawTextUtils; - -type - TdxInspectorPaintOption = (ipoBorder, ipoHorzLines, ipoVertLines, - ipoFlatCheckMarks, ipoCheckMarksAsText, - ipoImages, ipoTransparentRowGraphic, ipoGraphicAsText, - ipoExpandButtons); - TdxInspectorPaintOptions = set of TdxInspectorPaintOption; - - TdxInspectorRowHelperClass = class of TdxInspectorRowHelper; - - TdxInspectorRowHelper = class(TdxCustomClassMapItem) - protected - class procedure GetImageLists(ARow: TdxInspectorRow; AProc: TdxPSGetImageListProc); virtual; - public - class function PairClass: TClass; override; - class procedure Register; - class function RowClass: TdxInspectorRowClass; virtual; - end; - - TdxInspectorImageRowHelper = class(TdxInspectorRowHelper) - protected - class procedure GetImageLists(ARow: TdxInspectorRow; AProc: TdxPSGetImageListProc); override; - public - class function RowClass: TdxInspectorRowClass; override; - end; - - TdxInspectorReportLinkCustomEvent = procedure(Sender: TBasedxReportLink; - ARow: TdxInspectorRow; ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; - var AText: string; var AColor: TColor; AFont: TFont; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean) of object; - - TCustomdxInspectorReportLink = class(TBasedxReportLink) - private - FAutoNodesExpand: Boolean; - FAutoWidth: Boolean; - FDefaultGroupFont: TFont; - FFixedTransparent: Boolean; - FFixedColor: TColor; - FFixedFont: TFont; - FGraphicAsTextText: string; - FGridLineColor: TColor; - FGroupColor: TColor; - FGroupFont: TFont; - FGroupTransparent: Boolean; - FIsGraphicAsTextAssigned: Boolean; - FOddFont: TFont; - FOptions: TdxInspectorPaintOptions; - FSupportedCustomDraw: Boolean; - FOnCustomDrawCaption: TdxInspectorReportLinkCustomEvent; - FOnCustomDrawValue: TdxInspectorReportLinkCustomEvent; - FOnCustomDrawCaptionSeparator: TdxInspectorReportLinkCustomEvent; - FOnCustomDrawValueSeparator: TdxInspectorReportLinkCustomEvent; - FCustomDrawFontChanged: Boolean; - FFixedFontIndex: Integer; - FGroupFontIndex: Integer; - FSaveFont: TFont; - // Layout fields - FCaptionWidth: Integer; - FBandCount: Integer; - FBands: TList; - FBandWidth: Integer; - FFullWidth: Integer; - FIndent: Integer; - FMaxBandHeight: Integer; - FRowHeight: Integer; - FRowHeights: TList; - FRows: TList; - FValueWidth: Integer; - function GetCustomInspector: TCustomdxInspectorControl; - function GetGraphicAsTextText: string; - function GetOddColor: TColor; - function GetOptions: TdxInspectorPaintOptions; - function IsGraphicAsTextTextStored: Boolean; - function IsGroupFontStored: Boolean; - procedure SetAutoNodesExpand(Value: Boolean); - procedure SetAutoWidth(Value: Boolean); - procedure SetFixedColor(Value: TColor); - procedure SetFixedFont(Value: TFont); - procedure SetFixedTransparent(Value: Boolean); - procedure SetGraphicAsTextText(const Value: string); - procedure SetGridLineColor(Value: TColor); - procedure SetGroupFont(Value: TFont); - procedure SetGroupNodeColor(Value: TColor); - procedure SetGroupTransparent(Value: Boolean); - procedure SetOddFont(Value: TFont); - procedure SetOddColor(Value: TColor); - procedure SetOnCustomDrawCaption(Value: TdxInspectorReportLinkCustomEvent); - procedure SetOnCustomDrawValue(Value: TdxInspectorReportLinkCustomEvent); - procedure SetOnCustomDrawCaptionSeparator(Value: TdxInspectorReportLinkCustomEvent); - procedure SetOnCustomDrawValueSeparator(Value: TdxInspectorReportLinkCustomEvent); - procedure SetOptions(Value: TdxInspectorPaintOptions); - procedure SetSupportCustomDraw(Value: Boolean); - - procedure CalcAutoWidths; - procedure CalcLayout; - procedure CalcMaxBandHeight; - procedure CalcRowHeights; - procedure CalcStandardRowHeight; - procedure CustomDrawFontChanged(Sender: TObject); - function GetRow(AIndex: Integer): TdxInspectorRow; - function GetRowCellSides(ARow: TdxInspectorRow): TdxCellSides; - function GetRowCaptionColor(ARow: TdxInspectorRow): TColor; - function GetRowCaptionCellSides(ARow: TdxInspectorRow): TdxCellSides; - function GetRowCaptionTransparency(ARow: TdxInspectorRow): Boolean; - function GetRowHeight(ARowIndex: Integer): Integer; - function GetRowIndentCellSides(ARow: TdxInspectorRow; ALevelIndex: Integer): TdxCellSides; - function GetRowIndentColor(ARow: TdxInspectorRow; ALevelIndex: Integer): TColor; - function GetRowIndentCount(ARow: TdxInspectorRow): Integer; - function GetRowIndentTransparency(ARow: TdxInspectorRow; ALevelIndex: Integer): Boolean; - function GetRowSeparatorCellSides(ARow: TdxInspectorRow): TdxCellSides; - function GetRowTextIndent(ARow: TdxInspectorRow; AIncludeImageWidth: Boolean): Integer; - function GetRowValueCellSides(ARow: TdxInspectorRow): TdxCellSides; - function GetRowValueText(ARow: TdxInspectorRow): string; - procedure PlaceRow(ARow: TdxInspectorRow; ARowIndex: Integer; ACell: TdxReportCell); - - function IsCheckMarksAsText: Boolean; - function IsDisplayGraphicsAsText: Boolean; - function IsDrawAnyLines: Boolean; - function IsDrawBorder: Boolean; - function IsDrawEndEllipsis: Boolean; - function IsDrawExpandButtons: Boolean; - function IsDrawHorzLines: Boolean; - function IsDrawVertLines: Boolean; - function IsFlatCheckMarks: Boolean; - function IsShowExpandButtons: Boolean; - function IsShowImages: Boolean; - function IsTransparentColumnGraphics: Boolean; - - function IsAutoBandCount: Boolean; - function IsBottomRow(ARow: TdxInspectorRow): Boolean; - function IsRowAutoHeight: Boolean; - function IsRowCaptionMultilined(ARow: TdxInspectorRow): Boolean; - function IsRowValueMultilined(ARow: TdxInspectorRow): Boolean; - function IsTopRow(ARow: TdxInspectorRow): Boolean; - - procedure InsertRowCaption(ACell: TdxReportCell; ARow: TdxInspectorRow; ARowIndex: Integer); - procedure InsertRowImage(ACell: TdxReportCell; ARow: TdxInspectorRow); - procedure InsertRowIndent(ACell: TdxReportCell; ARow: TdxInspectorRow); - procedure InsertRowValue(ACell: TdxReportCell; ARow: TdxInspectorRow; ARowIndex: Integer); - - procedure CalcComplexRowItemsWidths; - function CanDrawRowImage(ARow: TdxInspectorRow): Boolean; - function ComplexRowByRow(ARow: TdxInspectorRow): TdxInspectorComplexRow; - function GetComplexRowSeparatorText(ARow: TdxInspectorRow): string; - function GetRowImageCellSides(ARow: TdxInspectorRow): TdxCellSides; - function GetRowItemByRow(ARow: TdxInspectorRow): Pointer; - function GetUltimateParentRow(ARow: TdxInspectorRow): TdxInspectorRow; - function IsComplexRowSeparator(ARow: TdxInspectorComplexRow; AIndex: Integer): Boolean; - function IsNetCategoryRow(ARow: TdxInspectorRow): Boolean; - function IsNetMode: Boolean; - function IsNetUltimateLastRowInParent(ARow: TdxInspectorRow): Boolean; - - procedure AddRows; - procedure ClearRows; - procedure DistributeRowsByBands; - procedure FreeAndNilRows; - - procedure ClearBands; - procedure FreeAndNilBands; - - procedure ReadIsGraphicAsTextValueAssigned(AReader: TReader); - procedure WriteIsGraphicAsTextValueAssigned(AWriter: TWriter); - protected - procedure DefineProperties(Filer: TFiler); override; - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - procedure MakeDelimiters(AReportCells: TdxReportCells; AHorzDelimiters, - AVertDelimiters: TList); override; - - procedure AssignValues(ADataItem: TAbstractdxReportCellData; - ARow: TdxInspectorRow); virtual; - function GetDataClass(ARow: TdxInspectorRow): TdxReportCellDataClass; virtual; - procedure GetImageListsFromRows(AProc: TdxPSGetImageListProc); virtual; - function GetRowFontIndex(ARow: TdxInspectorRow): Integer; virtual; - procedure PrepareConstruct(AReportCells: TdxReportCells); virtual; - procedure UnprepareConstruct(AReportCells: TdxReportCells); virtual; - - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - procedure DoCustomDrawCaption(ARow: TdxInspectorRow; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); virtual; - procedure DoCustomDrawValue(ARow: TdxInspectorRow; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); virtual; - procedure DoCustomDrawCaptionSeparator(ARow: TdxInspectorRow; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); virtual; - procedure DoCustomDrawValueSeparator(ARow: TdxInspectorRow; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); virtual; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - - procedure InitializeDefaultGroupFont(AFont: TFont); - - property CustomInspector: TCustomdxInspectorControl read GetCustomInspector; - published - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function DefaultGraphicAsTextText: string; virtual; - function DefaultGroupFont: TFont; virtual; - - property AutoNodesExpand: Boolean read FAutoNodesExpand write SetAutoNodesExpand default False; - property AutoWidth: Boolean read FAutoWidth write SetAutoWidth default False; - property Color; - property FixedTransparent: Boolean read FFixedTransparent write SetFixedTransparent default False; - property FixedColor: TColor read FFixedColor write SetFixedColor default clBtnFace; {dxDefaultFixedColor} - property FixedFont: TFont read FFixedFont write SetFixedFont stored IsFontStored; - property Font; - property GraphicAsTextText: string read GetGraphicAsTextText write SetGraphicAsTextText stored IsGraphicAsTextTextStored; - property GridLineColor: TColor read FGridLineColor write SetGridLineColor default clBlack; {dxDefaultGridLineColor} - property GroupColor: TColor read FGroupColor write SetGroupNodeColor default clBtnFace; {dxDefaultFixedColor} - property GroupFont: TFont read FGroupFont write SetGroupFont stored IsGroupFontStored; - property GroupTransparent: Boolean read FGroupTransparent write SetGroupTransparent default False; - property OddColor: TColor read GetOddColor write SetOddColor default clWhite; {clDefaultColor} - property OddFont: TFont read FOddFont write SetOddFont stored IsFontStored; - property Options: TdxInspectorPaintOptions read GetOptions write SetOptions - default [ipoBorder..ipoFlatCheckMarks , - ipoImages , ipoExpandButtons]; {dxDefaultInspectorPaintOptions} - property ScaleFonts; - property SupportedCustomDraw: Boolean read FSupportedCustomDraw write SetSupportCustomDraw default False; - property Transparent; - property UseHorzDelimiters; - property UseVertDelimiters; - - property OnCustomDrawCaption: TdxInspectorReportLinkCustomEvent read FOnCustomDrawCaption write SetOnCustomDrawCaption; - property OnCustomDrawValue: TdxInspectorReportLinkCustomEvent read FOnCustomDrawValue write SetOnCustomDrawValue; - property OnCustomDrawCaptionSeparator: TdxInspectorReportLinkCustomEvent read FOnCustomDrawCaptionSeparator write SetOnCustomDrawCaptionSeparator; - property OnCustomDrawValueSeparator: TdxInspectorReportLinkCustomEvent read FOnCustomDrawValueSeparator write SetOnCustomDrawValueSeparator; - end; - - TdxInspectorReportLink = class(TCustomdxInspectorReportLink) - private - function GetInspector: TdxInspector; - public - property Inspector: TdxInspector read GetInspector; - end; - - TdxInspectorDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshOptions: TTabSheet; - tshColors: TTabSheet; - tshFonts: TTabSheet; - pnlPreview: TPanel; - chbxTransparent: TCheckBox; - gbxTransparent: TGroupBox; - lblColor: TLabel; - bvlColorHolder: TBevel; - chbxCaptionTransparent: TCheckBox; - gbxCaptionTransparent: TGroupBox; - lblCaptionColor: TLabel; - bvlFixedColorHolder: TBevel; - lblGridLinesColor: TLabel; - bvlGridLineColorHolder: TBevel; - lblShow: TLabel; - bvlShow: TBevel; - chbxShowBorders: TCheckBox; - chbxShowHorzLines: TCheckBox; - chbxShowVertLines: TCheckBox; - btnFont: TButton; - edFont: TEdit; - btnGroupFont: TButton; - edGroupFont: TEdit; - btnFixedFont: TButton; - edFixedFont: TEdit; - chbxShowImages: TCheckBox; - gbxGroupTransparent: TGroupBox; - chbxGroupTransparent: TCheckBox; - lblGroupColor: TLabel; - bvlGroupColorHolder: TBevel; - imgGrid: TImage; - chbxShowExpandButtons: TCheckBox; - ilVendorLogos: TImageList; - ilCarPhotos: TImageList; - tshFormatting: TTabSheet; - lblRefinements: TLabel; - bvlAppearance: TBevel; - chbxFlatCheckMarks: TCheckBox; - chbxCheckMarksAsText: TCheckBox; - imgGraphics: TImage; - chbxDisplayGraphicsAsText: TCheckBox; - chbxTransparentColumnGraphics: TCheckBox; - lblBehaviors: TLabel; - chbxAutoNodesExpand: TCheckBox; - chbxAutoWidth: TCheckBox; - bvlBehaviors: TBevel; - Image4: TImage; - lblPreview: TStaticText; - pnlPreviewHost: TPanel; - insPreview: TdxInspector; - irMersedesBenz: TdxInspectorTextRow; - irMBPhoto: TdxInspectorTextGraphicRow; - irMBSUV: TdxInspectorTextCheckRow; - irMBModel: TdxInspectorTextRow; - irBMW: TdxInspectorTextRow; - irBMWModel: TdxInspectorTextRow; - irBMWSUV: TdxInspectorTextCheckRow; - irBMWPhoto: TdxInspectorTextGraphicRow; - stTransparent: TStaticText; - stCaptionTransparent: TStaticText; - stGroupTransparent: TStaticText; - procedure chbxAutoNodesExpandClick(Sender: TObject); - procedure chbxTransparentClick(Sender: TObject); - procedure chbxAutoWidthClick(Sender: TObject); - procedure btnFontClick(Sender: TObject); - procedure chbxOptionsClick(Sender: TObject); - procedure irMBSUVDrawValue(Sender: TdxInspectorRow; - ACanvas: TCanvas; ARect: TRect; var AText: String; AFont: TFont; - var AColor: TColor; var ADone: Boolean); - procedure InspectorDrawValue(Sender: TdxInspectorRow; ACanvas: TCanvas; - ARect: TRect; var AText: String; AFont: TFont; var AColor: TColor; - var ADone: Boolean); - procedure irMBPhotoDrawValue(Sender: TdxInspectorRow; ACanvas: TCanvas; - ARect: TRect; var AText: String; AFont: TFont; var AColor: TColor; - var ADone: Boolean); - procedure InspectorDrawCaption(Sender: TdxInspectorRow; - ACanvas: TCanvas; ARect: TRect; var AText: String; AFont: TFont; - var AColor: TColor; var ADone: Boolean); - procedure PageControl1Change(Sender: TObject); - procedure stTransparentClick(Sender: TObject); - procedure stCaptionTransparentClick(Sender: TObject); - procedure stGroupTransparentClick(Sender: TObject); - private - FccbxColor: TCustomComboBox; - FccbxCaptionColor: TCustomComboBox; - FccbxGroupColor: TCustomComboBox; - FccbxGridLineColor: TCustomComboBox; - - procedure ccbxColorChange(Sender: TObject); - procedure CreateControls; - function GetReportLink: TCustomdxInspectorReportLink; - procedure LoadDataToInspector; - function CaptionColor: TColor; - function GroupColor: TColor; - function ValueColor: TColor; - - procedure CMDialogChar(var message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - public - constructor Create(AOwner: TComponent); override; - property ReportLink: TCustomdxInspectorReportLink read GetReportLink; - end; - - TdxInspectorColumnMapperProc = function(ARow: TdxInspectorRow; - AReportLink: TCustomdxInspectorReportLink): TdxReportCellDataClass; - TdxInspectorAssignDataProc = procedure(AReportLink: TCustomdxInspectorReportLink; - ADataItem: TAbstractdxReportCellData; AInspector: TCustomdxInspector; - ARow: TdxInspectorRow); - -function DefaultdxInspectorMapperProc(ARow: TdxInspectorRow; - AReportLink: TCustomdxInspectorReportLink): TdxReportCellDataClass; -procedure DefaultdxInspectorAssignDataProc(AReportLink: TCustomdxInspectorReportLink; - ADataItem: TAbstractdxReportCellData; AInspector: TCustomdxInspector; - ARow: TdxInspectorRow); - -const - FdxInspectorAssignDataProc: TdxInspectorAssignDataProc = DefaultdxInspectorAssignDataProc; - FdxInspectorColumnMapperProc: TdxInspectorColumnMapperProc = DefaultdxInspectorMapperProc; - - dxDefaultInspectorPaintOptions: TdxInspectorPaintOptions = - [ipoBorder..ipoFlatCheckMarks , ipoImages , - ipoExpandButtons]; - -implementation - -{$R *.DFM} - -uses - SysUtils, Math, cxClasses, dxExtCtrls, dxPSRes, dxPrnDev, dxPSUtl; - -var - FPicture: TPicture; - -type - TCustomdxInspectorControlAccess = class(TCustomdxInspectorControl); - TdxInspectorRowAccess = class(TdxInspectorRow); - TdxInspectorGraphicRowAccess = class(TdxInspectorGraphicRow); - TdxInspectorMemoRowAccess = class(TdxInspectorMemoRow); - - TdxInspectorCellType = (ictNone, ictCaption, ictValue, ictCaptionSeparator, ictValueSeparator); - - PdxRowItem = ^TdxRowItem; - TdxRowItem = record - Row: TdxInspectorRow; - CaptionWidths: TList; - ValueWidths: TList; - end; - - PdxBandItem = ^TdxBandItem; - TdxBandItem = record - Rows: TList; - end; - -function GetTextWidth(ADC: HDC; AFont: HFONT; const S: string): Integer; -var - TextSize: TSize; -begin - if S <> '' then - begin - SelectObject(ADC, AFont); - GetTextExtentPoint32(ADC, PChar(S), Length(S), TextSize); - Result := 3 + TextSize.cX + 3; - end - else - Result := 0; -end; - - {TdxInspectorRow, TdxInspectorMaskRow, TdxInspectorMemoRow, - TdxInspectorDateRow, TdxInspectorButtonRow,TdxInspectorCheckRow, - TdxInspectorImageRow, TdxInspectorSpinRow, TdxInspectorPickRow, - TdxInspectorHyperLinkRow, TdxInspectorTimeRow, TdxInspectorCurrencyRow, - TdxInspectorGraphicRow, TdxInspectorBlobRow, TdxInspectorMRURow, - TdxInspectorPopupRow, TdxInspectorLookupRow, TdxInspectorCalcRow, - TdxInspectorExtLookupRow} - -function DefaultdxInspectorMapperProc(ARow: TdxInspectorRow; - AReportLink: TCustomdxInspectorReportLink): TdxReportCellDataClass; -const - CheckClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellCheckImage, TdxReportCellString); - ImageClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellGraphic, TdxReportCellImage); - GraphicClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellString, TdxReportCellGraphic); -begin - if ARow is TdxInspectorCheckRow then - Result := CheckClasses[ipoCheckMarksAsText in AReportLink.Options] - else - if ARow is TdxInspectorImageRow then - Result := ImageClasses[TdxInspectorImageRow(ARow).ShowDescription] - else - Result := GraphicClasses[(ARow is TdxInspectorGraphicRow) and not (ipoGraphicAsText in AReportLink.Options)]; -end; - -procedure DefaultdxInspectorAssignDataProc(AReportLink: TCustomdxInspectorReportLink; - ADataItem: TAbstractdxReportCellData; AInspector: TCustomdxInspector; - ARow: TdxInspectorRow); -var - AState: TCheckBoxState; - ANullStyle: TdxShowNullFieldStyle; - AImageIndex, ATextIndex: Integer; - S: string; - GraphicClass: TGraphicClass; - BaseRow: TdxInspectorRow; - ComplexRow: TdxInspectorComplexRow; -begin - case TdxInspectorCellType(ADataItem.Data) of - ictCaptionSeparator: - with TdxReportCellString(ADataItem) do - begin - CellSides := AReportLink.GetRowSeparatorCellSides(ARow); - EndEllipsis := AReportLink.IsDrawEndEllipsis; - FontIndex := AReportLink.GetRowFontIndex(ARow); - Indent := 0; - Text := AReportLink.GetComplexRowSeparatorText(ARow); - TextAlignX := taCenterX; - TextAlignY := taCenterY; - Transparent := AReportLink.GetRowCaptionTransparency(ARow); - if not Transparent then - Color := AReportLink.GetRowCaptionColor(ARow); - end; - ictValueSeparator: - with TdxReportCellString(ADataItem) do - begin - CellSides := AReportLink.GetRowSeparatorCellSides(ARow); - EndEllipsis := AReportLink.IsDrawEndEllipsis; - FontIndex := 0; - Indent := 0; - Text := AReportLink.GetComplexRowSeparatorText(ARow); - TextAlignX := taCenterX; - TextAlignY := taCenterY; - Transparent := AReportLink.Transparent; - if not Transparent then - Color := AReportLink.Color; - end; - ictCaption: - with TdxReportCellString(ADataItem) do - begin - CellSides := AReportLink.GetRowCaptionCellSides(ARow); - EndEllipsis := AReportLink.IsDrawEndEllipsis; - FontIndex := AReportLink.GetRowFontIndex(ARow); - Indent := 2; - BaseRow := ARow; - ComplexRow := AReportLink.ComplexRowByRow(ARow); - if ComplexRow <> nil then BaseRow := ComplexRow; - Multiline := AReportLink.IsRowCaptionMultilined(BaseRow); - Text := ARow.Caption; - TextAlignY := dxMultilineTextAlignY[Multiline]; - Transparent := AReportLink.GetRowCaptionTransparency(ARow); - if not Transparent then - Color := AReportLink.GetRowCaptionColor(ARow); - end; - ictValue: - if TdxInspectorCellType(ADataItem.Data) = ictValue then - begin - TdxReportVisualItem(ADataItem).CellSides := AReportLink.GetRowValueCellSides(ARow); - TdxReportVisualItem(ADataItem).Transparent := AReportLink.Transparent; - if not TdxReportVisualItem(ADataItem).Transparent then - TdxReportVisualItem(ADataItem).Color := AReportLink.Color; - if ADataItem is TdxReportCellCheck then - with TdxReportCellCheck(ADataItem) do - - begin - AState := TCheckBoxState(TdxInspectorCheckRow(ARow).GetCheckBoxState(AReportLink.GetRowValueText(ARow))); - ANullStyle := TdxInspectorCheckRow(ARow).ShowNullFieldStyle; - Enabled := not ((AState = cbGrayed) and (ANullStyle > nsUnchecked)); - Checked := (AState = cbChecked) or - ((AState = cbGrayed) and (ANullStyle = nsGrayedChecked)); - FlatBorder := AReportLink.IsFlatCheckMarks; - end - else - if ADataItem is TdxReportCellImage then - with TdxReportCellImage(ADataItem) do - begin - S := AReportLink.GetRowValueText(ARow); - TdxInspectorImageRow(ARow).GetIndexes(S, AImageIndex, ATextIndex); - if ATextIndex <> -1 then - Text := TdxInspectorImageRow(ARow).Descriptions[ATextIndex]; - ImageList := TdxInspectorImageRow(ARow).Images; - ImageIndex := AImageIndex; - MakeSpaceForEmptyImage := True; - EndEllipsis := True; - Multiline := TdxInspectorImageRow(ARow).MultilineText; - TextAlignX := dxTextAlignX[ARow.Alignment]; - TextAlignY := dxMultilineTextAlignY[Multiline]; - end - else - if ADataItem is TdxReportCellGraphic then - if ARow is TdxInspectorGraphicRow then - begin - GraphicClass := TdxInspectorGraphicRowAccess(ARow).GetGraphicClass; - LoadPicture(FPicture, GraphicClass, TdxInspectorGraphicRowAccess(ARow).GetGraphicValue); - if GraphicClass = nil then GraphicClass := TBitmap; - with TdxReportCellGraphic(ADataItem) do - begin - Image := FPicture.Graphic; - ImageTransparent := - (ipoTransparentRowGraphic in AReportLink.Options) or GraphicClass.InheritsFrom(TIcon); - if not GraphicClass.InheritsFrom(TIcon) and TdxInspectorGraphicRow(ARow).Stretch then - DrawMode := gdmStretchProportional - else - if TdxInspectorGraphicRow(ARow).Center then - DrawMode := gdmCenter - else - DrawMode := gdmNone; - end - end - else - with TdxReportCellGraphic(ADataItem) do - begin - S := AReportLink.GetRowValueText(ARow); - TdxInspectorImageRow(ARow).GetIndexes(S, AImageIndex, ATextIndex); - ImageList := TdxInspectorImageRow(ARow).Images; - ImageIndex := AImageIndex; - DrawMode := gdmCenter; - end - else - { TdxInspectorTextRow, TdxInspectorMaskRow, TdxInspectorDateRow - TdxInspectorCalcRow, TdxInspectorButtonRow, TdxInspectorSpinRow, - TdxInspectorPickRow, TdxInspectorTimeRow, TdxInspectorCurrencyRow, - TdxInspectorHyperLinkRow } - with TdxReportCellString(ADataItem) do - begin - Text := AReportLink.GetRowValueText(ARow); - EndEllipsis := ioDrawEndEllipsis in TCustomdxInspectorControlAccess(AInspector).Options; - Multiline := AReportLink.IsRowValueMultilined(ARow); - TextAlignX := dxTextAlignX[ARow.Alignment]; - TextAlignY := dxMultilineTextAlignY[Multiline]; - end; - end; - end; -end; - -{ TdxRowHelpersFactory } - -type - TdxRowHelpersFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(Row: TdxInspectorRow): TdxInspectorRowHelperClass; - public - class function Instance: TdxRowHelpersFactory; reintroduce; overload; - property HelperClasses[Row: TdxInspectorRow]: TdxInspectorRowHelperClass read GetHelperClass; default; - end; - -function dxRowHelpersFactory: TdxRowHelpersFactory; -begin - Result := TdxRowHelpersFactory.Instance; -end; - -class function TdxRowHelpersFactory.Instance: TdxRowHelpersFactory; -begin - Result := inherited Instance as TdxRowHelpersFactory; -end; - -function TdxRowHelpersFactory.GetHelperClass(Row: TdxInspectorRow): TdxInspectorRowHelperClass; -begin - Result := TdxInspectorRowHelperClass(PairClasses[Row.ClassType]); -end; - -{ TdxInspectorRowHelper } - -class function TdxInspectorRowHelper.PairClass: TClass; -begin - Result := RowClass; -end; - -class procedure TdxInspectorRowHelper.Register; -begin - dxRowHelpersFactory.Register(Self); -end; - -class function TdxInspectorRowHelper.RowClass: TdxInspectorRowClass; -begin - Result := TdxInspectorRow; -end; - -class procedure TdxInspectorRowHelper.GetImageLists(ARow: TdxInspectorRow; - AProc: TdxPSGetImageListProc); -begin -end; - -{ TdxInspectorImageRowHelper } - -class function TdxInspectorImageRowHelper.RowClass: TdxInspectorRowClass; -begin - Result := TdxInspectorImageRow; -end; - -class procedure TdxInspectorImageRowHelper.GetImageLists(ARow: TdxInspectorRow; - AProc: TdxPSGetImageListProc); -begin - AProc(TdxInspectorImageRow(ARow).Images); -end; - -{ TCustomdxInspectorReportLink } - -constructor TCustomdxInspectorReportLink.Create(AOwner: TComponent); -begin - inherited; - FFixedFont := TFont.Create; - FOddFont := TFont.Create; - FGroupFont := TFont.Create; - - InternalRestoreDefaults; - LinkModified(False); - - FFixedFont.OnChange := FontChanged; - FOddFont.OnChange := FontChanged; - FGroupFont.OnChange := FontChanged; - FSaveFont := TFont.Create; - FSaveFont.OnChange := CustomDrawFontChanged; - - FRows := TList.Create; - FBands := TList.Create; - FRowHeights := TList.Create; -end; - -destructor TCustomdxInspectorReportLink.Destroy; -begin - FreeAndNil(FDefaultGroupFont); - FreeAndNil(FRowHeights); - FreeAndNilRows; - FreeAndNilBands; - FreeAndNil(FSaveFont); - FreeAndNil(FGroupFont); - FreeAndNil(FOddFont); - FreeAndNil(FFixedFont); - inherited; -end; - -procedure TCustomdxInspectorReportLink.Assign(Source: TPersistent); -begin - if Source is TCustomdxInspectorReportLink then - with TCustomdxInspectorReportLink(Source) do - begin - Self.FIsGraphicAsTextAssigned := FIsGraphicAsTextAssigned; - Self.AutoNodesExpand := AutoNodesExpand; - Self.AutoWidth := AutoWidth; - Self.FixedTransparent := FixedTransparent; - Self.GroupTransparent := GroupTransparent; - Self.FixedColor := FixedColor; - Self.FixedFont := FixedFont; - Self.GridLineColor := GridLineColor; - Self.GroupFont := GroupFont; - Self.GroupColor := GroupColor; - Self.OddFont := OddFont; - Self.Options := Options; - Self.SupportedCustomDraw := SupportedCustomDraw; - end; - inherited; -end; - -function TCustomdxInspectorReportLink.DefaultGraphicAsTextText: string; -begin - Result := cxGetResourceString(@sdxGraphicAsTextValue); -end; - -function TCustomdxInspectorReportLink.DefaultGroupFont: TFont; -begin - if FDefaultGroupFont = nil then - begin - FDefaultGroupFont := TFont.Create; - InitializeDefaultGroupFont(FDefaultGroupFont); - end; - Result := FDefaultGroupFont; -end; - -procedure TCustomdxInspectorReportLink.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('IsGraphicAsTextValueAssigned', ReadIsGraphicAsTextValueAssigned, - WriteIsGraphicAsTextValueAssigned, - FIsGraphicAsTextAssigned and (GraphicAsTextText = '')); -end; - -procedure TCustomdxInspectorReportLink.ConstructReport(AReportCells: TdxReportCells); -var - I: Integer; - ParentCell, Cell: TdxReportCell; - CurrentRow: TdxInspectorRow; -begin - if CustomInspector = nil then Exit; - inherited; - if CustomInspector.TotalRowCount = 0 then Exit; - - PrepareConstruct(AReportCells); - try - AReportCells.BorderColor := GridLineColor; - AReportCells.Cells.FontIndex := FFontIndex; - AReportCells.Cells.Color := Color; - - if IsAutoBandCount then - begin - ParentCell := TdxReportCell.Create(AReportCells.Cells); - ParentCell.CellSides := []; - ParentCell.Transparent := True; - end - else - ParentCell := AReportCells.Cells; - - for I := 0 to FRows.Count - 1 do - begin - CurrentRow := GetRow(I); - - Cell := TdxReportCell.Create(ParentCell); - Cell.CellSides := GetRowCellSides(CurrentRow); - Cell.Data := Integer(CurrentRow); - PlaceRow(CurrentRow, I, Cell); - - InsertRowIndent(Cell, CurrentRow); - if CanDrawRowImage(CurrentRow) then - InsertRowImage(Cell, CurrentRow); - InsertRowCaption(Cell, CurrentRow, I); - if not CurrentRow.IsCategory then - InsertRowValue(Cell, CurrentRow, I); - - AReportCells.DoProgress(MulDiv(I, 100, FRows.Count)); - if AbortBuilding then Break; - end; - - if not AbortBuilding then - begin - ParentCell.BoundsRect := Rect(0, 0, FBandCount * FBandWidth, FMaxBandHeight); - AReportCells.Cells.BoundsRect := ParentCell.BoundsRect; - end; - finally - UnprepareConstruct(AReportCells); - end; -end; - -procedure TCustomdxInspectorReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited; - AProc(TCustomdxInspectorControlAccess(CustomInspector).Images); - GetImageListsFromRows(AProc); -end; - -procedure TCustomdxInspectorReportLink.InternalRestoreDefaults; -begin - inherited; - FAutoNodesExpand := False; - FAutoWidth := False; - FFixedTransparent := False; - FGroupTransparent := False; - FFixedColor := dxDefaultFixedColor; - GridLineColor := dxDefaultGridLineColor; - FGroupColor := FixedColor; - FOptions := dxDefaultInspectorPaintOptions; - SupportedCustomDraw := False; - - FixedFont := DefaultFont; - GroupFont := DefaultGroupFont; - OddFont := DefaultFont; - - FIsGraphicAsTextAssigned := False; -end; - -procedure TCustomdxInspectorReportLink.InternalRestoreFromOriginal; -begin - inherited; - FixedTransparent := - TCustomdxInspectorControlAccess(CustomInspector).PaintStyle = ipsSimple; - FixedTransparent := - FixedTransparent or (TCustomdxInspectorControlAccess(CustomInspector).PaintStyle = ipsNET); - if TCustomdxInspectorControlAccess(CustomInspector).PaintStyle = ipsCategorized then - begin - GroupColor := clBtnShadow; - GridLineColor := dxDefaultFixedColor; - end; -end; - -procedure TCustomdxInspectorReportLink.MakeDelimiters(AReportCells: TdxReportCells; - AHorzDelimiters, AVertDelimiters: TList); -var - I, RowIndex: Integer; - Cell: TdxReportCell; -begin - inherited; - if IsAutoBandCount then - Cell := AReportCells.Cells[0] - else - Cell := AReportCells.Cells; - - { horz. } - if Cell.CellCount > 0 then - begin - RowIndex := 0; - while (RowIndex < Cell.CellCount) and GetRow(RowIndex).IsCategory do - Inc(RowIndex); - if RowIndex = Cell.CellCount then RowIndex := 0; - for I := 0 to Cell[RowIndex].DataItemCount - 1 do - AHorzDelimiters.Add(Pointer(Cell[RowIndex].DataItems[I].BoundsRect.Right)); - end; - - { vert. } - if UseVertDelimiters then - for I := 0 to Cell.CellCount - 1 do - AVertDelimiters.Add(Pointer(Cell[I].BoundsRect.Bottom)); -end; - -procedure TCustomdxInspectorReportLink.CalcLayout; -begin - case TCustomdxInspectorControlAccess(CustomInspector).PaintStyle of - ipsSimple , ipsNET : - FIndent := dxInspectorButtonSize + 6; - ipsCategorized: - FIndent := dxInspectorButtonSize + 5 - else - FIndent := dxInspectorButtonExSize + 4; - end; - - with TCustomdxInspectorControlAccess(CustomInspector) do - begin - FBandCount := GetBandIndexByNode(LastNode) + 1; - if FBandCount = 0 then FBandCount := 1; - if IsAutoBandCount then - FBandWidth := BandWidth - else - FBandWidth := ClientWidth; - end; - FCaptionWidth := TCustomdxInspectorControlAccess(CustomInspector).DividerPos; - FValueWidth := FBandWidth - FCaptionWidth; - CalcStandardRowHeight; - CalcComplexRowItemsWidths; - if AutoWidth then CalcAutoWidths; - FFullWidth := FBandWidth * FBandCount; - CalcRowHeights; - DistributeRowsByBands; - CalcMaxBandHeight; -end; - -procedure TCustomdxInspectorReportLink.CalcMaxBandHeight; -var - I, J, V: Integer; - Rows: TList; -begin - FMaxBandHeight := 0; - for I := 0 to FBands.Count - 1 do - begin - Rows := PdxBandItem(FBands.List[I])^.Rows; - V := 0; - for J := 0 to Rows.Count - 1 do - Inc(V, GetRowHeight(J)); - if FMaxBandHeight < V then - FMaxBandHeight := V; - end; -end; - -procedure TCustomdxInspectorReportLink.PrepareConstruct(AReportCells: TdxReportCells); -begin - AddRows; - CalcLayout; - FFixedFontIndex := AddFontToPool(FixedFont); - FGroupFontIndex := AddFontToPool(GroupFont); -end; - -procedure TCustomdxInspectorReportLink.UnprepareConstruct(AReportCells: TdxReportCells); -begin -end; - -procedure TCustomdxInspectorReportLink.AssignValues(ADataItem: TAbstractdxReportCellData; - ARow: TdxInspectorRow); -begin - if Assigned(FdxInspectorAssignDataProc) then - FdxInspectorAssignDataProc(Self, ADataItem, CustomInspector, ARow); -end; - -function TCustomdxInspectorReportLink.GetDataClass(ARow: TdxInspectorRow): TdxReportCellDataClass; -begin - if Assigned(FdxInspectorColumnMapperProc) then - Result := FdxInspectorColumnMapperProc(ARow, Self) - else - Result := nil; -end; - -procedure TCustomdxInspectorReportLink.GetImageListsFromRows(AProc: TdxPSGetImageListProc); -var - I: Integer; - Row: TdxInspectorRow; -begin - for I := 0 to CustomInspector.Count - 1 do - begin - Row := CustomInspector.Rows[I]; - dxRowHelpersFactory[Row].GetImageLists(Row, AProc); - end; -end; - -function TCustomdxInspectorReportLink.GetRowFontIndex(ARow: TdxInspectorRow): Integer; -begin - if ARow.IsCategory then - Result := FGroupFontIndex - else - Result := FFixedFontIndex; -end; - -procedure TCustomdxInspectorReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - AColor: TColor; - AText: string; - ATextAlignX: TcxTextAlignX; - ATextAlignY: TcxTextAlignY; - ARow: TdxInspectorRow; -begin - if AItem.Data = 0 then Exit; - with TdxReportCellString(AItem) do - begin - //!!! - //ParentColor := False; - AColor := ColorToRGB(Color); - if Transparent then AColor := clNone; - FSaveFont.Assign(Font); - FCustomDrawFontChanged := False; - AText := Text; - ATextAlignX := TextAlignX; - ATextAlignY := TextAlignY; - ARow := TdxInspectorRow(AItem.Parent.Data); - case TdxInspectorCellType(AItem.Data) of - ictCaption: - DoCustomDrawCaption(ARow, ACanvas, ABoundsRect, AClientRect, AText, AColor, - FSaveFont, ATextAlignX, ATextAlignY, ADone); - ictValue: - DoCustomDrawValue(ARow, ACanvas, ABoundsRect, AClientRect, AText, AColor, - FSaveFont, ATextAlignX, ATextAlignY, ADone); - ictCaptionSeparator: - DoCustomDrawCaptionSeparator(ARow, ACanvas, ABoundsRect, AClientRect, AText, AColor, - FSaveFont, ATextAlignX, ATextAlignY, ADone); - ictValueSeparator: - DoCustomDrawValueSeparator(ARow, ACanvas, ABoundsRect, AClientRect, AText, AColor, - FSaveFont, ATextAlignX, ATextAlignY, ADone); - end; - if not ADone then - begin - if FCustomDrawFontChanged then - begin - SelectObject(ACanvas.Handle, FSaveFont.Handle); - SetTextColor(ACanvas.Handle, ColorToRGB(FSaveFont.Color)); - FontIndex := -1; - end; - if (AColor <> clNone) then - begin - Color := AColor; - Transparent := False; - end; - Text := AText; - TextAlignX := ATextAlignX; - TextAlignY := ATextAlignY; - end; - end; -end; - -procedure TCustomdxInspectorReportLink.DoCustomDrawCaption(ARow: TdxInspectorRow; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCaption) then - FOnCustomDrawCaption(Self, ARow, ACanvas, ABoundsRect, AClientRect, AText, - AColor, AFont, ATextAlignX, ATextAlignY, ADone) -end; - -procedure TCustomdxInspectorReportLink.DoCustomDrawValue(ARow: TdxInspectorRow; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawValue) then - FOnCustomDrawValue(Self, ARow, ACanvas, ABoundsRect, AClientRect, AText, - AColor, AFont, ATextAlignX, ATextAlignY, ADone) -end; - -procedure TCustomdxInspectorReportLink.DoCustomDrawCaptionSeparator(ARow: TdxInspectorRow; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCaptionSeparator) then - FOnCustomDrawCaptionSeparator(Self, ARow, ACanvas, ABoundsRect, AClientRect, - AText, AColor, AFont, ATextAlignX, ATextAlignY, ADone) -end; -procedure TCustomdxInspectorReportLink.DoCustomDrawValueSeparator(ARow: TdxInspectorRow; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawValueSeparator) then - FOnCustomDrawValueSeparator(Self, ARow, ACanvas, ABoundsRect, AClientRect, - AText, AColor, AFont, ATextAlignX, ATextAlignY, ADone) -end; - -function TCustomdxInspectorReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -begin - Result := SupportedCustomDraw; - if Result and (Item <> nil) then - case TdxInspectorCellType(Item.Data) of - ictCaption: - Result := Assigned(FOnCustomDrawCaption); - ictValue: - Result := Assigned(FOnCustomDrawValue); - ictCaptionSeparator: - Result := Assigned(FOnCustomDrawCaptionSeparator); - ictValueSeparator: - Result := Assigned(FOnCustomDrawValueSeparator); - else - Result := False; - end; -end; - -procedure TCustomdxInspectorReportLink.InitializeDefaultGroupFont(AFont: TFont); -begin - AFont.Assign(DefaultFont); - AFont.Style := AFont.Style + [fsBold]; -end; - -function TCustomdxInspectorReportLink.GetCustomInspector: TCustomdxInspectorControl; -begin - Result := TCustomdxInspectorControl(Component); -end; - -function TCustomdxInspectorReportLink.GetGraphicAsTextText: string; -begin - if FIsGraphicAsTextAssigned then - Result := FGraphicAsTextText - else - Result := DefaultGraphicAsTextText; -end; - -function TCustomdxInspectorReportLink.GetOddColor: TColor; -begin - Result := inherited Color; -end; - -function TCustomdxInspectorReportLink.GetOptions: TdxInspectorPaintOptions; -begin - Result := FOptions; -end; - -function TCustomdxInspectorReportLink.IsGraphicAsTextTextStored: Boolean; -begin - Result := FIsGraphicAsTextAssigned and (FGraphicAsTextText <> DefaultGraphicAsTextText); -end; - -function TCustomdxInspectorReportLink.IsGroupFontStored: Boolean; -begin - Result := not dxPSUtl.dxAreFontsEqual(GroupFont, DefaultGroupFont); -end; - -procedure TCustomdxInspectorReportLink.SetAutoNodesExpand(Value: Boolean); -begin - if FAutoNodesExpand <> Value then - begin - FAutoNodesExpand := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetAutoWidth(Value: Boolean); -begin - if FAutoWidth <> Value then - begin - FAutoWidth := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetFixedColor(Value: TColor); -begin - if FFixedColor <> Value then - begin - FFixedColor := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetFixedFont(Value: TFont); -begin - FFixedFont.Assign(Value); - LinkModified(True); -end; - -procedure TCustomdxInspectorReportLink.SetFixedTransparent(Value: Boolean); -begin - if FFixedTransparent <> Value then - begin - FFixedTransparent := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetGraphicAsTextText(const Value: string); -begin - if GraphicAsTextText <> Value then - begin - FGraphicAsTextText := Value; - FIsGraphicAsTextAssigned := True; - if ipoGraphicAsText in Options then LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetGridLineColor(Value: TColor); -begin - if FGridLineColor <> Value then - begin - FGridLineColor := Value; - if IsDrawAnyLines then LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetGroupFont(Value: TFont); -begin - GroupFont.Assign(Value); -end; - -procedure TCustomdxInspectorReportLink.SetGroupNodeColor(Value: TColor); -begin - if FGroupColor <> Value then - begin - FGroupColor := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetGroupTransparent(Value: Boolean); -begin - if FGroupTransparent <> Value then - begin - FGroupTransparent := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetOddColor(Value: TColor); -begin - inherited Color := Value; -end; - -procedure TCustomdxInspectorReportLink.SetOddFont(Value: TFont); -begin - OddFont.Assign(Value); -end; - -procedure TCustomdxInspectorReportLink.SetOnCustomDrawCaption(Value: TdxInspectorReportLinkCustomEvent); -begin - if @FOnCustomDrawCaption <> @Value then - begin - FOnCustomDrawCaption := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetOnCustomDrawValue(Value: TdxInspectorReportLinkCustomEvent); -begin - if @FOnCustomDrawValue <> @Value then - begin - FOnCustomDrawValue := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetOnCustomDrawCaptionSeparator(Value: TdxInspectorReportLinkCustomEvent); -begin - if @FOnCustomDrawCaptionSeparator <> @Value then - begin - FOnCustomDrawCaptionSeparator := Value; - LinkModified(True); - end; -end; -procedure TCustomdxInspectorReportLink.SetOnCustomDrawValueSeparator(Value: TdxInspectorReportLinkCustomEvent); -begin - if @FOnCustomDrawValueSeparator <> @Value then - begin - FOnCustomDrawValueSeparator := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetOptions(Value: TdxInspectorPaintOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.SetSupportCustomDraw(Value: Boolean); -begin - if FSupportedCustomDraw <> Value then - begin - FSupportedCustomDraw := Value; - if Assigned(FOnCustomDrawCaption) or Assigned(FOnCustomDrawValue) then - LinkModified(True); - end; -end; - -procedure TCustomdxInspectorReportLink.CalcAutoWidths; - - function CalcSum(AData: TList): Integer; - var - I: Integer; - begin - Result := 0; - for I := 0 to AData.Count - 1 do - Inc(Result, Integer(AData.List^[I])); - end; - - function GetFont(ARow: TdxInspectorRow; AIsCaption: Boolean): HFONT; - begin - if ARow.IsCategory then - Result := GroupFont.Handle - else - if AIsCaption then - Result := FixedFont.Handle - else - Result := Font.Handle; - end; - - procedure GetRowWidths(ADC: HDC; ARow: TdxInspectorRow; ARowIndex: Integer; - var ACaptionWidth, AValueWidth: Integer); - var - I, V: Integer; - RowItem: PdxRowItem; - ChildRow: TdxInspectorRowAccess; - Separator: Boolean; - S: string; - begin - if ARow is TdxInspectorComplexRow then - begin - RowItem := PdxRowItem(FRows.List^[ARowIndex]); - for I := 0 to RowItem.CaptionWidths.Count - 1 do - begin - Separator := IsComplexRowSeparator(TdxInspectorComplexRow(ARow), I); - ChildRow := TdxInspectorRowAccess(TdxInspectorComplexRow(ARow).Items[I div 2].Row); - if not IsRowCaptionMultilined(ARow) then - begin - if Separator then - S := GetComplexRowSeparatorText(ARow) - else - S := ChildRow.Caption; - V := GetTextWidth(ADC, GetFont(ChildRow, True), S); - if Integer(RowItem^.CaptionWidths.List^[I]) < V then - RowItem^.CaptionWidths[I] := Pointer(V); - end; - if not IsRowValueMultilined(ChildRow) then - begin - if Separator then - S := GetComplexRowSeparatorText(ARow) - else - S := GetRowValueText(ChildRow); - V := GetTextWidth(ADC, GetFont(ChildRow, False), S); - if Integer(RowItem^.ValueWidths.List^[I]) < V then - RowItem^.ValueWidths[I] := Pointer(V); - end; - end; - ACaptionWidth := CalcSum(RowItem^.CaptionWidths); - AValueWidth := CalcSum(RowItem^.ValueWidths); - Exit; - end - else - begin - if not IsRowCaptionMultilined(ARow) then - ACaptionWidth := GetTextWidth(ADC, GetFont(ARow, True), ARow.Caption); - if not IsRowValueMultilined(ARow) and not ARow.IsCategory then - AValueWidth := GetTextWidth(ADC, GetFont(ARow, False), GetRowValueText(ARow)); - end; - end; - -var - DC: HDC; - PrevFont: HFONT; - I: Integer; - Row: TdxInspectorRow; - CW, VW: Integer; -begin - DC := GetDC(0); - try - PrevFont := GetCurrentObject(DC, OBJ_FONT); - for I := 0 to FRows.Count - 1 do - begin - CW := FCaptionWidth; - VW := FValueWidth; - Row := GetRow(I); - GetRowWidths(DC, Row, I, CW, VW); - Inc(CW, GetRowTextIndent(Row, True)); - if FCaptionWidth < CW then FCaptionWidth := CW; - if FValueWidth < VW then FValueWidth := VW; - end; - SelectObject(DC, PrevFont); - FBandWidth := FCaptionWidth + FValueWidth; - finally - ReleaseDC(0, DC) - end; -end; - -procedure TCustomdxInspectorReportLink.CalcRowHeights; - - function CalcHeight(ADC: HDC; AFont: TFont; const S: string; AMultiline: Boolean; - ABaseWidth: Integer): Integer; - var - R: TRect; - Size: TSize; - begin - SelectObject(ADC, AFont.Handle); - if AMultiline and IsRowAutoHeight then - if S <> '' then - begin - R := Rect(0, 0, ABaseWidth - 4, 0); - if R.Right < R.Left then R.Right := R.Left; - Result := Windows.DrawText(ADC, PChar(S), Length(S), R, - DT_CALCRECT or DT_EDITCONTROL or DT_LEFT or DT_WORDBREAK) + 2; - end - else - Result := 0 - else - begin - GetTextExtentPoint32(ADC, 'Wg', 2, Size); - Result := Size.cY; - end; - end; - -var - DC: HDC; - PrevFont: HFONT; - I, V, RowHeight, OriginalRowHeight: Integer; - RowItem: PdxRowItem; - Row: TdxInspectorRow; - J: Integer; - ChildRow: TdxInspectorRow; -begin - FRowHeights.Clear; - DC := GetDC(0); - try - PrevFont := GetCurrentObject(DC, OBJ_FONT); - for I := 0 to FRows.Count - 1 do - begin - RowItem := PdxRowItem(FRows.List^[I]); - Row := RowItem^.Row; - RowHeight := FRowHeight; - if Row.IsCategory then - RowHeight := CalcHeight(DC, GroupFont, Row.Caption, False, FBandWidth) - else - begin - if Row is TdxInspectorComplexRow then - for J := 0 to TdxInspectorComplexRow(Row).Items.Count - 1 do - begin - ChildRow := TdxInspectorComplexRow(Row).Items[J].Row; - V := CalcHeight(DC, FixedFont, ChildRow.Caption, IsRowCaptionMultilined(Row), Integer(RowItem^.CaptionWidths.List^[2 * J])); - if RowHeight < V then RowHeight := V; - V := CalcHeight(DC, Font, GetRowValueText(ChildRow), IsRowValueMultilined(Row), Integer(RowItem^.ValueWidths.List^[2 * J])); - if RowHeight < V then - RowHeight := V; - end - else - begin - V := CalcHeight(DC, FixedFont, Row.Caption, IsRowCaptionMultilined(Row), FCaptionWidth); - if RowHeight < V then RowHeight := V; - V := CalcHeight(DC, Font, GetRowValueText(Row), IsRowValueMultilined(Row), FValueWidth); - if RowHeight < V then - RowHeight := V; - end; - end; - OriginalRowHeight := TCustomdxInspectorControlAccess(CustomInspector).GetRowHeight(Row); - if RowHeight < OriginalRowHeight then - RowHeight := OriginalRowHeight; - - Inc(RowHeight, 1 + 1); - if IsRowCaptionMultilined(Row) then - Inc(RowHeight, 1 + 1); - - FRowHeights.Add(Pointer(RowHeight)); - end; - SelectObject(DC, PrevFont); - finally - ReleaseDC(0, DC); - end; -end; - -procedure TCustomdxInspectorReportLink.CalcStandardRowHeight; - - function GetHeight(ADC: HDC; AFont: TFont): Integer; - var - TextSize: TSize; - begin - SelectObject(ADC, AFont.Handle); - GetTextExtentPoint32(ADC, 'Wg', 2, TextSize); - Result := TextSize.cy; - end; - -var - DC: HDC; - PrevFont: HFONT; -begin - DC := GetDC(0); - try - PrevFont := GetCurrentObject(DC, OBJ_FONT); - FRowHeight := MaxIntValue([GetHeight(DC, Font), GetHeight(DC, GroupFont), GetHeight(DC, FixedFont)]); - SelectObject(DC, PrevFont); - finally - ReleaseDC(0, DC); - end; -end; - -procedure TCustomdxInspectorReportLink.CustomDrawFontChanged(Sender: TObject); -begin - FCustomDrawFontChanged := True; -end; - -function TCustomdxInspectorReportLink.GetRow(AIndex: Integer): TdxInspectorRow; -begin - Result := PdxRowItem(FRows.List^[AIndex])^.Row; -end; - -function TCustomdxInspectorReportLink.GetRowCellSides(ARow: TdxInspectorRow): TdxCellSides; -begin - if IsDrawBorder then - begin - Result := [csLeft, csRight]; - if IsTopRow(ARow) then Result := Result + [csTop]; - if IsBottomRow(ARow) then Result := Result + [csBottom]; - end - else - Result := []; -end; - -function TCustomdxInspectorReportLink.GetRowIndentCellSides(ARow: TdxInspectorRow; - ALevelIndex: Integer): TdxCellSides; -begin - if (ALevelIndex = 0) and IsNetMode then - begin - Result := [csLeft]; - if not IsNetCategoryRow(ARow) or (ARow.Node.Level > 0) then - Include(Result, csRight); -// if (ARow.Node.Level = 0) and (ARow.Node.Count > 0) then - if IsNetCategoryRow(ARow) then - Include(Result, csTop); - {ver. 2.31 - if ARow.Node <> nil then - begin - if (ARow.Node.Level = 0) and (ARow.Node.Count > 0) and not ARow.Node.Expanded and not AutoNodesExpand then - Include(Result, csBottom); - end;} - if IsNetUltimateLastRowInParent(ARow) then - Include(Result, csBottom); - end - else - Result := [csTop, csBottom]; - - if (ALevelIndex = 1) and (ARow.Node <> nil) and (ARow.Node.Level = 0) and ARow.IsCategory then - Include(Result, csLeft); - - if not IsDrawBorder then - begin - if IsTopRow(ARow) then Exclude(Result, csTop); - if IsBottomRow(ARow) then Exclude(Result, csBottom); - if ALevelIndex = 0 then - begin - Exclude(Result, csLeft); - Exclude(Result, csRight); - end; - - if ALevelIndex = 1 then - Exclude(Result, csRight); - - if IsNetMode then - begin - if IsNetCategoryRow(ARow) then - begin - Exclude(Result, csTop); - Exclude(Result, csBottom); - end; - if IsNetUltimateLastRowInParent(ARow) then - Exclude(Result, csBottom); - if (ARow.Node <> nil) and (ARow.Node.Level = 1) and (ARow.Node.Index = 0) and - TdxInspectorRowNode(ARow.Node.Parent).Row.IsCategory then - Exclude(Result, csTop); - end; - end; - - if not IsDrawHorzLines then - begin - if IsNetMode then - begin - case ALevelIndex of - 0: if IsNetCategoryRow(ARow) then Exclude(Result, csTop); - 1: if not ((ARow.Node <> nil) and (ARow.Node.Level = 1) and (ARow.Node.Index = 0) and - TdxInspectorRowNode(ARow.Node.Parent).Row.IsCategory) then - Exclude(Result, csTop); - else - Exclude(Result, csTop); - end; - if not IsNetUltimateLastRowInParent(ARow) then - Exclude(Result, csBottom); - end - else - begin - if not IsTopRow(ARow) then Exclude(Result, csTop); - if not IsBottomRow(ARow) then Exclude(Result, csBottom); - end; - end; - - if not IsDrawVertLines and IsNetMode then - if not GetUltimateParentRow(ARow).IsCategory then - begin - if ALevelIndex = 0 then Exclude(Result, csRight); - if ALevelIndex = 1 then Exclude(Result, csLeft); - end; -end; - -function TCustomdxInspectorReportLink.GetRowIndentColor(ARow: TdxInspectorRow; - ALevelIndex: Integer): TColor; -begin - if IsNetMode and (ALevelIndex = 0) and GetUltimateParentRow(ARow).IsCategory then - Result := GroupColor - else - Result := GetRowCaptionColor(ARow); -end; - -function TCustomdxInspectorReportLink.GetRowIndentCount(ARow: TdxInspectorRow): Integer; -begin - Result := ARow.Node.Level; - with TCustomdxInspectorControlAccess(CustomInspector) do - if PaintStyle in [ipsStandard, ipsSimple, ipsExtended, ipsNet] then - Inc(Result); -end; - -function TCustomdxInspectorReportLink.GetRowIndentTransparency(ARow: TdxInspectorRow; - ALevelIndex: Integer): Boolean; -begin - if IsNetMode and (ALevelIndex = 0) and GetUltimateParentRow(ARow).IsCategory then - Result := GroupTransparent - else - Result := GetRowCaptionTransparency(ARow); -end; - -function TCustomdxInspectorReportLink.GetRowSeparatorCellSides(ARow: TdxInspectorRow): TdxCellSides; -begin - Result := [csTop, csBottom]; - if not IsDrawBorder then - begin - if IsTopRow(ARow) then Exclude(Result, csTop); - if IsBottomRow(ARow) then Exclude(Result, csBottom); - end; - if not IsDrawHorzLines then - begin - if not IsTopRow(ARow) then Exclude(Result, csTop); - if not IsBottomRow(ARow) then Exclude(Result, csBottom); - end; -end; - -function TCustomdxInspectorReportLink.GetRowTextIndent(ARow: TdxInspectorRow; - AIncludeImageWidth: Boolean): Integer; -begin - Result := FIndent * GetRowIndentCount(ARow); - if AIncludeImageWidth and CanDrawRowImage(ARow) then - Inc(Result, TCustomdxInspectorControlAccess(CustomInspector).Images.Width); -end; - -function TCustomdxInspectorReportLink.GetRowCaptionColor(ARow: TdxInspectorRow): TColor; -begin - if ARow.IsCategory then - Result := GroupColor - else - Result := FixedColor; -end; - -function TCustomdxInspectorReportLink.GetRowCaptionCellSides(ARow: TdxInspectorRow): TdxCellSides; -var - ComplexRow: TdxInspectorComplexRow; - Index: Integer; -begin - Result := csAll; - ComplexRow := ComplexRowByRow(ARow); - Index := 0; - if ComplexRow <> nil then - Index := ComplexRow.Items.IndexOfRow(ARow); - if (ComplexRow = nil) or (Index = 0) then - Exclude(Result, csLeft); - if (ComplexRow <> nil) and (GetComplexRowSeparatorText(ARow) <> '') then - begin - Exclude(Result, csLeft); - if Index < ComplexRow.Items.Count - 1 then - Exclude(Result, csRight); - end; - if ComplexRow <> nil then ARow := ComplexRow; - - if not IsDrawBorder then - begin - if ARow.IsCategory then Exclude(Result, csRight); - if IsTopRow(ARow) then Exclude(Result, csTop); - if IsBottomRow(ARow) then Exclude(Result, csBottom); - if IsNetMode then - begin - if IsNetCategoryRow(ARow) then - begin - Exclude(Result, csTop); - Exclude(Result, csBottom); - end; - if IsNetUltimateLastRowInParent(ARow) then - Exclude(Result, csBottom); - end; - end; - -// not IsNetCategoryRow(ARow) and not (IsNetUltimateLastRowInParent(ARow) - if not IsDrawHorzLines then - if not IsNetMode or not IsNetCategoryRow(ARow) then - begin - if not IsTopRow(ARow) then Exclude(Result, csTop); - if not IsBottomRow(ARow) and not IsNetUltimateLastRowInParent(ARow) then - Exclude(Result, csBottom); - end; - - if not IsDrawVertLines then - begin - if not ARow.IsCategory then Exclude(Result, csRight); - if ComplexRow <> nil then - begin - if Index < ComplexRow.Items.Count - 1 then Exclude(Result, csRight); - if Index > 0 then Exclude(Result, csLeft); - end; - end; -end; - -function TCustomdxInspectorReportLink.GetRowCaptionTransparency(ARow: TdxInspectorRow): Boolean; -begin - if IsNetMode then - if IsNetCategoryRow(ARow) then - Result := GroupTransparent - else - Result := FixedTransparent - else - if ARow.IsCategory then - Result := GroupTransparent - else - Result := FixedTransparent -end; - -function TCustomdxInspectorReportLink.GetRowHeight(ARowIndex: Integer): Integer; -begin - Result := Integer(FRowHeights.List^[ARowIndex]); -end; - -function TCustomdxInspectorReportLink.GetRowValueCellSides(ARow: TdxInspectorRow): TdxCellSides; -var - ComplexRow: TdxInspectorComplexRow; - Index: Integer; -begin - Result := csAll; - ComplexRow := ComplexRowByRow(ARow); - Index := 0; - if ComplexRow <> nil then - Index := ComplexRow.Items.IndexOfRow(ARow); - if (ComplexRow = nil) or (Index = 0) then - Exclude(Result, csLeft); - if (ComplexRow <> nil) and (GetComplexRowSeparatorText(ARow) <> '') then - begin - Exclude(Result, csLeft); - if Index < ComplexRow.Items.Count - 1 then - Exclude(Result, csRight); - end; - - if not IsDrawBorder then - begin - if ComplexRow = nil then - Exclude(Result, csRight) - else - if Index = ComplexRow.Items.Count - 1 then - Exclude(Result, csRight); - Exclude(Result, csRight); - if IsTopRow(ARow) then Exclude(Result, csTop); - if IsBottomRow(ARow) then Exclude(Result, csBottom); - if IsNetMode and IsNetUltimateLastRowInParent(ARow) then - Exclude(Result, csBottom); - end; - - if not IsDrawHorzLines then - begin - if not IsTopRow(ARow) then Exclude(Result, csTop); - if not IsBottomRow(ARow) and not IsNetUltimateLastRowInParent(ARow) then - Exclude(Result, csBottom); - end; - - if not IsDrawVertLines then - begin - if not ARow.IsCategory then Exclude(Result, csLeft); - if ComplexRow <> nil then - begin - if Index < ComplexRow.Items.Count - 1 then Exclude(Result, csRight); - if Index > 0 then Exclude(Result, csLeft); - end; - end; -end; - -function TCustomdxInspectorReportLink.GetRowValueText(ARow: TdxInspectorRow): string; -begin - if ARow is TdxInspectorMemoRow then - Result := TdxInspectorMemoRowAccess(ARow).GetMemoText - else - if (ARow is TdxInspectorTextRow) and (TdxInspectorTextRow(ARow).PasswordChar <> #0) then - Result := ReplicateChar(TdxInspectorTextRow(ARow).PasswordChar, Length(TdxInspectorRowAccess(ARow).GetDisplayText)) - else - if ARow is TdxInspectorGraphicRow then - Result := GraphicAsTextText - else - Result := TdxInspectorRowAccess(ARow).GetDisplayText; -end; - -procedure TCustomdxInspectorReportLink.PlaceRow(ARow: TdxInspectorRow; - ARowIndex: Integer; ACell: TdxReportCell); -var - PrevSibl: TdxReportItem; - BandIndex, PrevBandIndex: Integer; -begin - ACell.BoundsRect := Rect(0, 0, FBandWidth, GetRowHeight(ARowIndex)); - BandIndex := 0; - PrevSibl := ACell.GetPrevSibling; - if PrevSibl <> nil then - begin - if IsAutoBandCount then - begin - BandIndex := - TCustomdxInspectorControlAccess(CustomInspector).GetBandIndexByNode(ARow.Node); - PrevBandIndex := - TCustomdxInspectorControlAccess(CustomInspector).GetBandIndexByNode(TdxInspectorRow(PrevSibl.Data).Node); - end - else - PrevBandIndex := 0; - if BandIndex <> PrevBandIndex then - ACell.Left := TdxReportVisualItem(PrevSibl).BoundsRect.Right - else - begin - ACell.Top := TdxReportVisualItem(PrevSibl).BoundsRect.Bottom; - ACell.Left := TdxReportVisualItem(PrevSibl).Left; - end; - end; -end; - -function TCustomdxInspectorReportLink.IsDisplayGraphicsAsText: Boolean; -begin - Result := ipoGraphicAsText in Options; -end; - -function TCustomdxInspectorReportLink.IsCheckMarksAsText: Boolean; -begin - Result := ipoCheckMarksAsText in Options; -end; - -function TCustomdxInspectorReportLink.IsDrawAnyLines: Boolean; -begin - Result := Options * [ipoBorder..ipoVertLines] <> []; -end; - -function TCustomdxInspectorReportLink.IsDrawBorder: Boolean; -begin - Result := ipoBorder in Options; -end; - -function TCustomdxInspectorReportLink.IsDrawEndEllipsis: Boolean; -begin - Result := ioDrawEndEllipsis in TCustomdxInspectorControlAccess(CustomInspector).Options; -end; - -function TCustomdxInspectorReportLink.IsDrawExpandButtons: Boolean; -begin - Result := ipoExpandButtons in Options; -end; - -function TCustomdxInspectorReportLink.IsDrawHorzLines: Boolean; -begin - Result := ipoHorzLines in Options; -end; - -function TCustomdxInspectorReportLink.IsDrawVertLines: Boolean; -begin - Result := ipoVertLines in Options; -end; - -function TCustomdxInspectorReportLink.IsFlatCheckMarks: Boolean; -begin - Result := ipoFlatCheckMarks in Options; -end; - -function TCustomdxInspectorReportLink.IsShowExpandButtons: Boolean; -begin - Result := ipoExpandButtons in Options; -end; - -function TCustomdxInspectorReportLink.IsShowImages: Boolean; -begin - Result := ipoImages in Options; -end; - -function TCustomdxInspectorReportLink.IsTransparentColumnGraphics: Boolean; -begin - Result := ipoTransparentRowGraphic in Options; -end; - -function TCustomdxInspectorReportLink.IsAutoBandCount: Boolean; -begin - Result := (CustomInspector <> nil) and - (ioAutoBandCount in TCustomdxInspectorControlAccess(CustomInspector).Options); -end; - -function TCustomdxInspectorReportLink.IsRowAutoHeight: Boolean; -begin - Result := (CustomInspector <> nil) and - (ioRowAutoHeight in TCustomdxInspectorControlAccess(CustomInspector).Options); -end; - -function TCustomdxInspectorReportLink.IsRowCaptionMultilined(ARow: TdxInspectorRow): Boolean; -begin - Result := (rvRowHeight in ARow.AssignedValues) or IsRowValueMultilined(ARow); -end; - -function TCustomdxInspectorReportLink.IsRowValueMultilined(ARow: TdxInspectorRow): Boolean; -begin - Result := (ARow is TdxInspectorMemoRow) or ((ARow is TdxInspectorCustomBlobRow) and (TdxInspectorCustomBlobRow(ARow).BlobPaintStyle = bpsText)); -end; - -function TCustomdxInspectorReportLink.IsBottomRow(ARow: TdxInspectorRow): Boolean; -var - I: Integer; -begin - for I := 0 to FBands.Count - 1 do - begin - Result := PdxBandItem(FBands.List^[I]).Rows.Last = ARow; - if Result then Exit; - end; - Result := False; -end; - -function TCustomdxInspectorReportLink.IsTopRow(ARow: TdxInspectorRow): Boolean; -var - I: Integer; -begin - for I := 0 to FBands.Count - 1 do - begin - Result := PdxBandItem(FBands.List^[I]).Rows.First = ARow; - if Result then Exit; - end; - Result := False; -end; - -procedure TCustomdxInspectorReportLink.InsertRowCaption(ACell: TdxReportCell; - ARow: TdxInspectorRow; ARowIndex: Integer); - - procedure PlaceRowCaptionPart(ADataItem: TdxReportVisualItem; - ARow: TdxInspectorRow; AItemIndex: Integer); - var - PrevSibl: TdxReportItem; - V: Integer; - ComplexRow: TdxInspectorComplexRow; - W: Integer; - begin - V := 0; - PrevSibl := ADataItem.GetPrevSibling; - if PrevSibl <> nil then - V := TdxReportVisualItem(PrevSibl).BoundsRect.Right; - ComplexRow := ComplexRowByRow(ARow); - if ComplexRow <> nil then - begin - if ARow = ComplexRow.Items[ComplexRow.Items.Count - 1].Row then - W := FCaptionWidth - V - else - W := Integer(PdxRowItem(GetRowItemByRow(ComplexRow)).CaptionWidths.List^[AItemIndex]); - ADataItem.BoundsRect := Rect(V, 0, V + W, ADataItem.Parent.Height); - end - else - if ARow.IsCategory then - ADataItem.BoundsRect := Rect(V, 0, ADataItem.Parent.Width, ADataItem.Parent.Height) - else - ADataItem.BoundsRect := Rect(V, 0, FCaptionWidth, ADataItem.Parent.Height); - end; - - procedure InsertRowCaptionPart(ARow: TdxInspectorRow; AItemIndex: Integer; - AIsRowSeparator: Boolean); - var - DataItem: TdxReportCellString; - Separator: Boolean; - I: Integer; - ChildRow: TdxInspectorRow; - begin - if not AIsRowSeparator and (ARow is TdxInspectorComplexRow) and not ARow.IsCategory then - begin - for I := 0 to PdxRowItem(FRows.List^[ARowIndex]).CaptionWidths.Count - 1 do - begin - if (GetComplexRowSeparatorText(ARow) = '') and Odd(I) then - Continue; - Separator := IsComplexRowSeparator(TdxInspectorComplexRow(ARow), I); - ChildRow := TdxInspectorComplexRow(ARow).Items[I div 2].Row; - InsertRowCaptionPart(ChildRow, I, Separator); - end; - Exit; - end - else - begin - DataItem := TdxReportCellString.Create(ACell); - if AIsRowSeparator then - DataItem.Data := Integer(ictCaptionSeparator) - else - DataItem.Data := Integer(ictCaption); - - PlaceRowCaptionPart(DataItem, ARow, AItemIndex); - AssignValues(DataItem, ARow); - end; - end; - -begin - InsertRowCaptionPart(ARow, 0, False); -end; - -procedure TCustomdxInspectorReportLink.InsertRowIndent(ACell: TdxReportCell; ARow: TdxInspectorRow); - - function GetButtonSize: Integer; - begin - with TCustomdxInspectorControlAccess(CustomInspector) do - if PaintStyle in [ipsSimple , ipsNET, ipsCategorized ] then - Result := dxInspectorButtonSize - else - Result := dxInspectorButtonExSize + 1; - end; - - procedure InsertRowIndentPart(ALevelIndex, AMaxLevel: Integer); - var - IndentBox: TdxReportCellExpandButton; - V: Integer; - PrevSibl: TdxReportItem; - begin - IndentBox := TdxReportCellExpandButton.Create(ACell); - with IndentBox do - begin - V := 0; - PrevSibl := GetPrevSibling; - if PrevSibl <> nil then - V := TdxReportVisualItem(PrevSibl).BoundsRect.Right; - BoundsRect := Rect(V, 0, V + FIndent, ACell.Height); - Transparent := GetRowIndentTransparency(ARow, ALevelIndex); - if not Transparent then - Color := GetRowIndentColor(ARow, ALevelIndex); - CellSides := GetRowIndentCellSides(ARow, ALevelIndex); - - { 2.3 } - ShowButton := IsShowExpandButtons and (ALevelIndex = AMaxLevel) and - (ARow.Node <> nil) and (ARow.Node.Count <> 0); - if ShowButton then - begin - ButtonExpanded := (ARow.Node <> nil) and ARow.Node.Expanded or AutoNodesExpand; - ShowButtonBorder := TCustomdxInspectorControlAccess(CustomInspector).PaintStyle <> ipsStandard; - if ShowButtonBorder then - begin - ButtonBorder3D := TCustomdxInspectorControlAccess(CustomInspector).PaintStyle = ipsExtended; - ButtonSize := GetButtonSize; - end; - end; - end; - end; - - function IndentExists(ARow: TdxInspectorRow): Boolean; - begin - Result := (ComplexRowByRow(ARow) = nil) and - not ((TCustomdxInspectorControlAccess(CustomInspector).PaintStyle = ipsCategorized) and - ARow.IsCategory and (ARow.Node.Level = 0)); - end; - -var - I, MaxLevel: Integer; -begin - if IndentExists(ARow) then - begin - MaxLevel := GetRowIndentCount(ARow) - 1; - for I := 0 to MaxLevel do - InsertRowIndentPart(I, MaxLevel); - end; -end; - -procedure TCustomdxInspectorReportLink.InsertRowValue(ACell: TdxReportCell; ARow: TdxInspectorRow; - ARowIndex: Integer); - - procedure PlaceRowValuePart(ADataItem: TdxReportVisualItem; ARow: TdxInspectorRow; - AItemIndex: Integer); - var - PrevSibl: TdxReportItem; - V: Integer; - ComplexRow: TdxInspectorComplexRow; - W: Integer; - begin - V := 0; - PrevSibl := ADataItem.GetPrevSibling; - if PrevSibl <> nil then - V := TdxReportVisualItem(PrevSibl).BoundsRect.Right; - ComplexRow := ComplexRowByRow(ARow); - if ComplexRow <> nil then - begin - if ARow = ComplexRow.Items[ComplexRow.Items.Count - 1].Row then - W := FBandWidth - V - else - W := Integer(PdxRowItem(GetRowItemByRow(ComplexRow)).ValueWidths.List^[AItemIndex]); - ADataItem.BoundsRect := Rect(V, 0, V + W, ADataItem.Parent.Height); - end - else - ADataItem.BoundsRect := Rect(V, 0, V + FValueWidth, ADataItem.Parent.Height); - end; - - procedure InsertRowValuePart(ARow: TdxInspectorRow; AItemIndex: Integer; - AIsRowSeparator: Boolean); - var - DataClass: TdxReportCellDataClass; - DataItem: TAbstractdxReportCellData; - Separator: Boolean; - I: Integer; - ChildRow: TdxInspectorRow; - begin - if ARow is TdxInspectorComplexRow then - begin - for I := 0 to PdxRowItem(FRows.List^[ARowIndex]).CaptionWidths.Count - 1 do - begin - if (GetComplexRowSeparatorText(ARow) = '') and Odd(I) then - Continue; - Separator := IsComplexRowSeparator(TdxInspectorComplexRow(ARow), I); - ChildRow := TdxInspectorComplexRow(ARow).Items[I div 2].Row; - InsertRowValuePart(ChildRow, I, Separator); - end; - Exit; - end - else - begin - if AIsRowSeparator then - begin - DataItem := TdxReportCellString.Create(ACell); - DataItem.Data := Integer(ictValueSeparator) - end - else - begin - DataClass := GetDataClass(ARow); - DataItem := DataClass.Create(ACell); - DataItem.Data := Integer(ictValue); - end; - PlaceRowValuePart(DataItem, ARow, AItemIndex); - AssignValues(DataItem, ARow); - end; - end; - -begin - InsertRowValuePart(ARow, 0, False); -end; - -procedure TCustomdxInspectorReportLink.CalcComplexRowItemsWidths; -var - DC: HDC; - I, J: Integer; - RowItem: PdxRowItem; - Row: TdxInspectorRow; - S: string; - CaptionSeparatorWidth, ValueSeparatorWidth: Integer; - CaptionViewInfo, ValueViewInfo: TdxInspectorComplexRowViewInfo; -begin - DC := GetDC(0); - try - for I := 0 to FRows.Count - 1 do - begin - RowItem := PdxRowItem(FRows.List^[I]); - Row := RowItem^.Row; - if (Row is TdxInspectorComplexRow) and not Row.IsCategory then - begin - if GetComplexRowSeparatorText(Row) <> '' then - begin - S := GetComplexRowSeparatorText(Row) + '_'; - CaptionSeparatorWidth := GetTextWidth(DC, FixedFont.Handle, S); - if TCustomdxInspectorControlAccess(CustomInspector).PaintStyle = ipsCategorized then - ValueSeparatorWidth := 4 - else - ValueSeparatorWidth := GetTextWidth(DC, Font.Handle, S); - end - else - begin - ValueSeparatorWidth := 4; - CaptionSeparatorWidth := 4; - end; - CaptionViewInfo := TdxInspectorComplexRowViewInfo.Create(TdxInspectorComplexRow(Row), CaptionSeparatorWidth); - ValueViewInfo := TdxInspectorComplexRowViewInfo.Create(TdxInspectorComplexRow(Row), ValueSeparatorWidth); - try - RowItem^.CaptionWidths := TList.Create; - RowItem^.ValueWidths := TList.Create; - CaptionViewInfo.Calculate(Rect(0, 0, FCaptionWidth - GetRowTextIndent(Row, True), 0)); - ValueViewInfo.Calculate(Rect(0, 0, FValueWidth, 0)); - RowItem^.CaptionWidths.Count := ValueViewInfo.Count; - RowItem^.ValueWidths.Count := ValueViewInfo.Count; - for J := 0 to RowItem^.CaptionWidths.Count - 1 do - begin - with CaptionViewInfo[J].Bounds do - RowItem^.CaptionWidths[J] := Pointer(Right - Left); - with ValueViewInfo[J].Bounds do - RowItem^.ValueWidths[J] := Pointer(Right - Left); - end; - finally - ValueViewInfo.Free; - CaptionViewInfo.Free; - end; - end; - end; - finally - ReleaseDC(0, DC); - end; -end; -function TCustomdxInspectorReportLink.CanDrawRowImage(ARow: TdxInspectorRow): Boolean; -begin - Result := IsShowImages and (TCustomdxInspectorControlAccess(CustomInspector).Images <> nil) and - (ComplexRowByRow(ARow) = nil) and - (ARow.ImageIndex > -1) and (ARow.ImageIndex < TCustomdxInspectorControlAccess(CustomInspector).Images.Count); -end; -function TCustomdxInspectorReportLink.ComplexRowByRow(ARow: TdxInspectorRow): TdxInspectorComplexRow; -begin - Result := TCustomdxInspectorControl(CustomInspector).ComplexRowByRow(ARow); -end; -function TCustomdxInspectorReportLink.GetComplexRowSeparatorText(ARow: TdxInspectorRow): string; -begin - Result := TCustomdxInspectorControlAccess(CustomInspector).ComplexRowSeparator; -end; -function TCustomdxInspectorReportLink.GetRowImageCellSides(ARow: TdxInspectorRow): TdxCellSides; -begin - Result := []; - if IsDrawHorzLines then - Result := Result + [csTop, csBottom]; -end; -function TCustomdxInspectorReportLink.GetRowItemByRow(ARow: TdxInspectorRow): Pointer; -var - I: Integer; -begin - for I := 0 to FRows.Count - 1 do - begin - Result := FRows[I]; - if PdxRowItem(Result)^.Row = ARow then Exit; - end; - Result := nil; -end; -function TCustomdxInspectorReportLink.GetUltimateParentRow(ARow: TdxInspectorRow): TdxInspectorRow; -var - Node: TdxInspectorNode; -begin - Node := ARow.Node; - while Node.Level <> 0 do Node := Node.Parent; - Result := TdxInspectorRowNode(Node).Row; -end; -function TCustomdxInspectorReportLink.IsComplexRowSeparator(ARow: TdxInspectorComplexRow; - AIndex: Integer): Boolean; -begin - Result := (GetComplexRowSeparatorText(ARow) <> '') and Odd(AIndex); -end; -procedure TCustomdxInspectorReportLink.InsertRowImage(ACell: TdxReportCell; ARow: TdxInspectorRow); -var - PrevSibl: TdxReportItem; - DataItem: TdxReportCellImage; -begin - DataItem := TdxReportCellImage.Create(ACell); - with DataItem do - begin - BoundsRect := - Bounds(1, 0, TCustomdxInspectorControlAccess(CustomInspector).Images.Width + 1, DataItem.Parent.Height); - PrevSibl := DataItem.GetPrevSibling; - if PrevSibl <> nil then - Left := TdxReportVisualItem(PrevSibl).BoundsRect.Right; - ImageList := TCustomdxInspectorControlAccess(CustomInspector).Images; - ImageIndex := ARow.ImageIndex; - CellSides := GetRowImageCellSides(ARow); - ImageTransparent := True; - Transparent := FixedTransparent; - Color := GetRowCaptionColor(ARow); - end; -end; - -function TCustomdxInspectorReportLink.IsNetCategoryRow(ARow: TdxInspectorRow): Boolean; -begin - Result := IsNetMode and (ARow.Node <> nil) and (ARow.Node.Level = 0) and ARow.IsCategory; -end; - -function TCustomdxInspectorReportLink.IsNetMode: Boolean; -begin - Result := TCustomdxInspectorControlAccess(CustomInspector).PaintStyle = ipsNET; -end; - -function TCustomdxInspectorReportLink.IsNetUltimateLastRowInParent(ARow: TdxInspectorRow): Boolean; -var - Node: TdxInspectorRowNode; -begin - Node := ARow.Node; - if Node <> nil then - begin - while (Node.Level <> 0) and Node.IsLast do - Node := TdxInspectorRowNode(Node.Parent); - Result := - (Node.Level = 0) and ((ARow.Node.Count = 0) or (not ARow.Node.Expanded and not AutoNodesExpand)) and - (Node.Row.IsCategory or IsBottomRow(ARow)); - end - else - Result := IsBottomRow(ARow); -end; - -procedure TCustomdxInspectorReportLink.AddRows; - - procedure AddRow(ANode: TdxInspectorRowNode); - var - I: Integer; - RowItem: PdxRowItem; - begin - New(RowItem); - FillChar(RowItem^, SizeOf(TdxRowItem), 0); - RowItem^.Row := ANode.Row; - FRows.Add(RowItem); - - if ANode.Expanded or AutoNodesExpand then - for I := 0 to ANode.Count - 1 do - AddRow(TdxInspectorRowNode(ANode[I])); - end; - -var - I: Integer; -begin - ClearRows; - if CustomInspector.TotalRowCount > 0 then - begin - if not AutoNodesExpand then - FRows.Capacity := TCustomdxInspectorControlAccess(CustomInspector).GetAbsoluteCount; - for I := 0 to CustomInspector.Count - 1 do - AddRow(TdxInspectorRowNode(CustomInspector.Items[I])); - end; -end; - -procedure TCustomdxInspectorReportLink.ClearRows; -var - I: Integer; - RowItem: PdxRowItem; -begin - for I := 0 to FRows.Count - 1 do - begin - RowItem := FRows.List^[I]; - if RowItem^.CaptionWidths <> nil then RowItem^.CaptionWidths.Free; - if RowItem^.ValueWidths <> nil then RowItem^.ValueWidths.Free; - Dispose(PdxRowItem(RowItem)); - end; - FRows.Clear; -end; - -procedure TCustomdxInspectorReportLink.DistributeRowsByBands; -var - I, BandIndex: Integer; - BandItem: PdxBandItem; -begin - ClearBands; - if TCustomdxInspectorControlAccess(CustomInspector).IsAutoBandCount then - begin - CustomInspector.HandleNeeded; - for I := 0 to FRows.Count - 1 do - begin - BandIndex := TCustomdxInspectorControlAccess(CustomInspector).GetBandIndexByNode(GetRow(I).Node); - if BandIndex > FBands.Count - 1 then - FBands.Count := 1 + BandIndex; - if FBands.List^[BandIndex] = nil then - begin - New(BandItem); - FillChar(BandItem^, SizeOf(TdxBandItem), 0); - BandItem^.Rows := TList.Create; - FBands[BandIndex] := BandItem; - end; - PdxBandItem(FBands.List^[BandIndex])^.Rows.Add(GetRow(I)); - end; - Exit; - end - else - begin - New(BandItem); - FillChar(BandItem^, SizeOf(TdxBandItem), 0); - BandItem^.Rows := TList.Create; - FBands.Add(BandItem); - for I := 0 to FRows.Count - 1 do - BandItem^.Rows.Add(GetRow(I)); - end; -end; - -procedure TCustomdxInspectorReportLink.FreeAndNilRows; -begin - ClearRows; - FreeAndNil(FRows); -end; - -procedure TCustomdxInspectorReportLink.ClearBands; -var - I: Integer; - BandItem: PdxBandItem; -begin - for I := 0 to FBands.Count - 1 do - begin - BandItem := FBands.List^[I]; - BandItem^.Rows.Free; - Dispose(PdxBandItem(BandItem)); - end; - FBands.Clear; -end; - -procedure TCustomdxInspectorReportLink.FreeAndNilBands; -begin - ClearBands; - FreeAndNil(FBands); -end; - -procedure TCustomdxInspectorReportLink.ReadIsGraphicAsTextValueAssigned(AReader: TReader); -begin - FIsGraphicAsTextAssigned := AReader.ReadBoolean; -end; -procedure TCustomdxInspectorReportLink.WriteIsGraphicAsTextValueAssigned(AWriter: TWriter); -begin - AWriter.WriteBoolean(FIsGraphicAsTextAssigned); -end; - -{ TdxInspectorReportLink } - -function TdxInspectorReportLink.GetInspector: TdxInspector; -begin - Result := TdxInspector(Component); -end; - -{ TdxInspectorDesignWindow } - -constructor TdxInspectorDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhcInspectorGridReportLinkDesigner; - inherited; - CreateControls; - PageControl1.ActivePage := PageControl1.Pages[0]; -end; - -function TdxInspectorDesignWindow.GetReportLink: TCustomdxInspectorReportLink; -begin - Result := inherited ReportLink as TCustomdxInspectorReportLink; -end; - -procedure TdxInspectorDesignWindow.LoadDataToInspector; - - function BitmapToText(AImageIndex: Integer): string; - var - Picture: TPicture; - begin - Picture := TPicture.Create; - try - Picture.Bitmap.Width := ilCarPhotos.Width; - Picture.Bitmap.Height := ilCarPhotos.Height; - ilCarPhotos.Draw(Picture.Bitmap.Canvas, 0, 0, AImageIndex); - dxExEdtr.SavePicture(Picture, Result); - finally - Picture.Free; - end; - end; - -begin - irMBPhoto.Text := BitmapToText(0); - irBMWPhoto.Text := BitmapToText(1); -end; - -procedure TdxInspectorDesignWindow.CMDialogChar(var message: TCMDialogChar); -var - I: Integer; -begin - inherited; - with PageControl1 do - for I := 0 to PageCount - 1 do - if IsAccel(message.CharCode, Pages[I].Caption) then - begin - message.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TdxInspectorDesignWindow.CreateControls; - - function CreateColorCombo(AParent: TWinControl; AHost: TControl; - ATag: Integer; AAutoColor: TColor; ALabel: TLabel): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(Result) do - begin - BoundsRect := AHost.BoundsRect; - Tag := ATag; - Parent := AParent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - OnChange := ccbxColorChange; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - -begin - FccbxColor := - CreateColorCombo(gbxTransparent, bvlColorHolder, 0, dxDefaultColor, lblColor); - FccbxCaptionColor := - CreateColorCombo(gbxCaptionTransparent, bvlFixedColorHolder, 1, dxDefaultFixedColor, lblCaptionColor); - FccbxGroupColor := - CreateColorCombo(gbxGroupTransparent, bvlGroupColorHolder, 2, dxDefaultFixedColor, lblGroupColor); - FccbxGridLineColor := - CreateColorCombo(tshColors, bvlGridLineColorHolder, 3, dxDefaultGridLineColor, lblGridLinesColor); -end; - -procedure TdxInspectorDesignWindow.DoInitialize; -begin - inherited DoInitialize; - LoadDataToInspector; - TCustomdxInspectorControlAccess(insPreview).SetFocusedNode(nil); - - chbxShowBorders.Checked := ReportLink.IsDrawBorder; - chbxShowHorzLines.Checked := ReportLink.IsDrawHorzLines; - chbxShowVertLines.Checked := ReportLink.IsDrawVertLines; - chbxShowExpandButtons.Checked := ReportLink.IsShowExpandButtons; - chbxFlatCheckMarks.Checked := ReportLink.IsFlatCheckMarks; - chbxShowImages.Checked := ReportLink.IsShowImages; - chbxCheckMarksAsText.Checked := ReportLink.IsCheckMarksAsText; - chbxDisplayGraphicsAsText.Checked := ReportLink.IsDisplayGraphicsAsText; - chbxTransparentColumnGraphics.Checked := ReportLink.IsTransparentColumnGraphics; - chbxAutoWidth.Checked := ReportLink.AutoWidth; - - chbxTransparent.Checked := ReportLink.Transparent; - TdxPSColorCombo(FccbxColor).ColorValue := ColorToRGB(ReportLink.Color); - chbxCaptionTransparent.Checked := ReportLink.FixedTransparent; - chbxGroupTransparent.Checked := ReportLink.GroupTransparent; - - TdxPSColorCombo(FccbxCaptionColor).ColorValue := ReportLink.FixedColor; - TdxPSColorCombo(FccbxGroupColor).ColorValue := ReportLink.GroupColor; - TdxPSColorCombo(FccbxGridLineColor).ColorValue := ReportLink.GridLineColor; - - FontInfoToText(ReportLink.Font, edFont); - FontInfoToText(ReportLink.FixedFont, edFixedFont); - FontInfoToText(ReportLink.GroupFont, edGroupFont); - - chbxAutoNodesExpand.Checked := ReportLink.AutoNodesExpand; -end; - -procedure TdxInspectorDesignWindow.UpdateControlsState; -begin - inherited UpdateControlsState; - FccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := FccbxColor.Enabled; - FccbxCaptionColor.Enabled := not chbxCaptionTransparent.Checked; - lblCaptionColor.Enabled := FccbxCaptionColor.Enabled; - FccbxGroupColor.Enabled := not chbxGroupTransparent.Checked; - lblGroupColor.Enabled := FccbxGroupColor.Enabled; - - UpdatePreview; -end; - -{$IFDEF DELPHI7} -function TdxInspectorDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxInspectorDesignWindow.LoadStrings; - - procedure AdjustBevelSize(ABevel: TBevel; ALabel: TLabel); - var - Right: Integer; - begin - Right := ABevel.BoundsRect.Right; - ABevel.Left := ALabel.Left + ALabel.Width + 10; - ABevel.Width := Right - ABevel.Left; - end; - -begin - inherited; - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - irMBModel.Caption := cxGetResourceString(@sdxCarModelColumnCaption); - irMBSUV.Caption := cxGetResourceString(@sdxCarIsSUVColumnCaption); - irMBPhoto.Caption := cxGetResourceString(@sdxCarPhotoColumnCaption); - - irBMWModel.Caption := cxGetResourceString(@sdxCarModelColumnCaption); - irBMWSUV.Caption := cxGetResourceString(@sdxCarIsSUVColumnCaption); - irBMWPhoto.Caption := cxGetResourceString(@sdxCarPhotoColumnCaption); - - tshOptions.Caption := cxGetResourceString(@sdxOptions); - lblShow.Caption := cxGetResourceString(@sdxShow); - AdjustBevelSize(bvlShow, lblShow); - chbxShowBorders.Caption := cxGetResourceString(@sdxBorderLines); - chbxShowHorzLines.Caption := cxGetResourceString(@sdxHorzLines); - chbxShowVertLines.Caption := cxGetResourceString(@sdxVertLines); - chbxShowExpandButtons.Caption := cxGetResourceString(@sdxExpandButtons); - chbxShowImages.Caption := cxGetResourceString(@sdxImages); - - lblBehaviors.Caption := cxGetResourceString(@sdxBehaviors); - AdjustBevelSize(bvlBehaviors, lblBehaviors); - chbxAutoNodesExpand.Caption := cxGetResourceString(@sdxAutoNodesExpand); - chbxAutoWidth.Caption := cxGetResourceString(@sdxAutoWidth); - - tshColors.Caption := cxGetResourceString(@sdxColors); - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - stCaptionTransparent.Caption := ' ' + cxGetResourceString(@sdxCaptionTransparent) + ' '; - lblCaptionColor.Caption := cxGetResourceString(@sdxCaptionColor); - stGroupTransparent.Caption := ' ' + cxGetResourceString(@sdxGroupTransparent) + ' '; - lblGroupColor.Caption := cxGetResourceString(@sdxGroupColor); - lblGridLinesColor.Caption := cxGetResourceString(@sdxGridLinesColor); - - tshFonts.Caption := cxGetResourceString(@sdxFonts); - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - btnFixedFont.Caption := cxGetResourceString(@sdxBtnFixedFont); - btnGroupFont.Caption := cxGetResourceString(@sdxBtnGroupFont); - - tshFormatting.Caption := cxGetResourceString(@sdxFormatting); - lblRefinements.Caption := cxGetResourceString(@sdxRefinements); - AdjustBevelSize(bvlAppearance, lblRefinements); - chbxFlatCheckMarks.Caption := cxGetResourceString(@sdxFlatCheckMarks); - chbxCheckMarksAsText.Caption := cxGetResourceString(@sdxCheckMarksAsText); - chbxDisplayGraphicsAsText.Caption := cxGetResourceString(@sdxDisplayGraphicsAsText); - chbxTransparentColumnGraphics.Caption := cxGetResourceString(@sdxTransparentColumnGraphics); -end; - -procedure TdxInspectorDesignWindow.ccbxColorChange(Sender: TObject); -var - AColor: TColor; -begin - if LockControlsUpdate then Exit; - AColor := TdxPSColorCombo(Sender).ColorValue; - case TdxPSColorCombo(Sender).Tag of - 0: ReportLink.Color := AColor; - 1: ReportLink.FixedColor := AColor; - 2: ReportLink.GroupColor := AColor; - 3: ReportLink.GridLineColor := AColor; - end; - Modified := True; -end; - -procedure TdxInspectorDesignWindow.chbxAutoNodesExpandClick( - Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoNodesExpand := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxInspectorDesignWindow.UpdatePreview; -const - BorderStyleMap: array[Boolean] of TBorderStyle = (bsNone, bsSingle); - MBImageIndexes: array[Boolean] of Integer = (-1, 0); - BMWImageIndexes: array[Boolean] of Integer = (-1, 1); -begin - if ReportLink.CustomInspector <> nil then - insPreview.PaintStyle := TCustomdxInspectorControlAccess(ReportLink.CustomInspector).PaintStyle; - insPreview.GridColor := ReportLink.GridLineColor; - irMersedesBenz.ImageIndex := MBImageIndexes[ReportLink.IsShowImages]; - irBMW.ImageIndex := BMWImageIndexes[ReportLink.IsShowImages]; - irMBSUV.Border3D := not ReportLink.IsFlatCheckMarks; - irBMWSUV.Border3D := not ReportLink.IsFlatCheckMarks; - - insPreview.Invalidate; - pnlPreviewHost.BorderStyle := BorderStyleMap[ReportLink.IsDrawBorder]; - //shPreviewFrame.Pen.Color := ReportLink.GridLineColor; -end; - -procedure TdxInspectorDesignWindow.chbxTransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - case TCheckBox(Sender).Tag of - 0: ReportLink.Transparent := TCheckBox(Sender).Checked; - 1: ReportLink.FixedTransparent := TCheckBox(Sender).Checked; - 2: ReportLink.GroupTransparent := TCheckBox(Sender).Checked; - end; - Modified := True; -end; - -procedure TdxInspectorDesignWindow.stCaptionTransparentClick(Sender: TObject); -begin - if chbxCaptionTransparent.CanFocus then ActiveControl := chbxCaptionTransparent; - chbxCaptionTransparent.Checked := not chbxCaptionTransparent.Checked; -end; - -procedure TdxInspectorDesignWindow.stGroupTransparentClick(Sender: TObject); -begin - if chbxGroupTransparent.CanFocus then ActiveControl := chbxGroupTransparent; - chbxGroupTransparent.Checked := not chbxGroupTransparent.Checked; -end; - -procedure TdxInspectorDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TdxInspectorDesignWindow.chbxAutoWidthClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoWidth := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxInspectorDesignWindow.btnFontClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with dxPSGlbl.FontDialog do - begin - case TButton(Sender).Tag of - 0: Font := ReportLink.Font; - 1: Font := ReportLink.FixedFont; - 2: Font := ReportLink.GroupFont; - end; - - if Execute then - begin - case TButton(Sender).Tag of - 0: - begin - ReportLink.Font := Font; - FontInfoToText(ReportLink.Font, edFont); - end; - 1: - begin - ReportLink.FixedFont := Font; - FontInfoToText(ReportLink.FixedFont, edFixedFont); - end; - 2: - begin - ReportLink.GroupFont := Font; - FontInfoToText(ReportLink.GroupFont, edGroupFont); - end; - end; - Modified := True; - end; - end; -end; - -procedure TdxInspectorDesignWindow.chbxOptionsClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TCheckBox(Sender) do - if Checked then - ReportLink.Options := ReportLink.Options + [TdxInspectorPaintOption(Tag)] - else - ReportLink.Options := ReportLink.Options - [TdxInspectorPaintOption(Tag)]; - Modified := True; -end; - -function TdxInspectorDesignWindow.CaptionColor: TColor; -begin - if ReportLink.FixedTransparent then - Result := clWindow - else - Result := ReportLink.FixedColor; -end; - -function TdxInspectorDesignWindow.GroupColor: TColor; -begin - if ReportLink.GroupTransparent then - Result := clWindow - else - Result := ReportLink.GroupColor; -end; - -function TdxInspectorDesignWindow.ValueColor: TColor; -begin - if ReportLink.Transparent then - Result := clWindow - else - Result := ReportLink.Color; -end; - -{ custom draw helpers } - -procedure FillRectColor(ACanvas: TCanvas; const R: TRect; AColor: TColor); -begin - ACanvas.Brush.Color := AColor; - ACanvas.FillRect(R); -end; - -procedure DrawTextRect(ACanvas: TCanvas; R: TRect; const AText: string; - AFont: TFont; AColor: TColor; ATextAlignY: TcxTextAlignY); -var - X, Y: Integer; -begin - FillRectColor(ACanvas, R, AColor); - InflateRect(R, -2, 0); - ACanvas.Font := AFont; - ACanvas.Brush.Style := bsClear; - X := R.Left + 2; - if ATextAlignY = taTop then - Y := R.Top + 2 - else - Y := R.Top + (R.Bottom - R.Top - ACanvas.TextHeight(AText)) div 2; - ACanvas.TextRect(R, X, Y, AText); -end; - -procedure DrawExpandButton(ACanvas: TCanvas; R: TRect; AColor: TColor; - APaintStyle: TdxInspectorPaintStyle); -const - AreDrawBorders: array[TdxInspectorPaintStyle] of Boolean = - (False, True, True, True, False); - IsDrawSign: array[TdxInspectorPaintStyle] of Boolean = - (True, True, True, True, False); - Borders3D: array[TdxInspectorPaintStyle] of Boolean = - (False, False, True, False, False); - ButtonSizes: array[TdxInspectorPaintStyle] of Integer = - (dxInspectorButtonSize, dxInspectorButtonSize, dxInspectorButtonExSize, - dxInspectorButtonSize, dxInspectorButtonSize); -var - ButtonSize: Integer; -begin - ACanvas.Brush.Color := AColor; - ACanvas.FillRect(R); - - ButtonSize := ButtonSizes[APaintStyle]; - with R do - R := Bounds(Left + (Right - Left - ButtonSize) div 2, - Top + (Bottom - Top - ButtonSize) div 2, ButtonSize, ButtonSize); - if AreDrawBorders[APaintStyle] then - begin - if Borders3D[APaintStyle] then - begin - DrawEdge(ACanvas.Handle, R, EDGE_RAISED, BF_RECT or BF_SOFT); - InflateRect(R, -1, -1); - Dec(R.Right); - Dec(R.Bottom); - end - else - begin - ACanvas.Brush.Color := clWindowText; - ACanvas.FrameRect(R); - InflateRect(R, -1, -1); - end; - end - else - begin - InflateRect(R, -1, -2); - OffsetRect(R, 1, 0); - end; - - if IsDrawSign[APaintStyle] then - begin - with R do - R := Rect(Left + 1, Top + (Bottom - Top) div 2, Right - 1, Top + (Bottom - Top) div 2 + 1); - ACanvas.Brush.Color := clWindowText; - ACanvas.FillRect(R); - end; -end; - -procedure TdxInspectorDesignWindow.irMBSUVDrawValue( - Sender: TdxInspectorRow; ACanvas: TCanvas; ARect: TRect; - var AText: String; AFont: TFont; var AColor: TColor; var ADone: Boolean); -begin - AFont := ReportLink.Font; - AColor := ValueColor; - if ReportLink.IsCheckMarksAsText then - begin - DrawTextRect(ACanvas, ARect, AText, AFont, AColor, taCenterY); - ADone := True; - end; -end; - -procedure TdxInspectorDesignWindow.InspectorDrawValue( - Sender: TdxInspectorRow; ACanvas: TCanvas; ARect: TRect; - var AText: String; AFont: TFont; var AColor: TColor; var ADone: Boolean); -begin - DrawTextRect(ACanvas, ARect, AText, ReportLink.Font, ValueColor, taCenterY); - ADone := True; -end; - -procedure TdxInspectorDesignWindow.irMBPhotoDrawValue( - Sender: TdxInspectorRow; ACanvas: TCanvas; ARect: TRect; - var AText: String; AFont: TFont; var AColor: TColor; var ADone: Boolean); -begin - AFont := ReportLink.Font; - AColor := ValueColor; - if ReportLink.IsDisplayGraphicsAsText then - begin - DrawTextRect(ACanvas, ARect, ReportLink.GraphicAsTextText, AFont, AColor, taTop); - ADone := True; - end; -end; - -procedure TdxInspectorDesignWindow.InspectorDrawCaption( - Sender: TdxInspectorRow; ACanvas: TCanvas; ARect: TRect; - var AText: string; AFont: TFont; var AColor: TColor; var ADone: Boolean); -type - TdxInspectorCaptionIndentDrawInfo = record - CategoryIndentRect: TRect; - ImageRect: TRect; - IndentRect: TRect; - end; - - procedure CalcDrawInfo(var ADrawInfo: TdxInspectorCaptionIndentDrawInfo); - const - IndentWidth = 14; - begin - FillChar(ADrawInfo, SizeOf(TdxInspectorCaptionIndentDrawInfo), 0); - - with ADrawInfo do - begin - ImageRect := ARect; - CategoryIndentRect := ARect; - IndentRect := ARect; - - ImageRect.Right := ImageRect.Left; - IndentRect.Right := IndentRect.Left; - CategoryIndentRect.Right := CategoryIndentRect.Left; - - if Sender.IsCategory then - begin - if Sender.ImageIndex <> -1 then - Dec(ImageRect.Left, ilVendorLogos.Width); - CategoryIndentRect.Right := ImageRect.Left; - CategoryIndentRect.Left := 0; - end - else - begin - IndentRect.Left := IndentRect.Right - IndentWidth; - if insPreview.PaintStyle = ipsNet then - begin - CategoryIndentRect.Right := IndentRect.Left; - CategoryIndentRect.Left := 0; - end - else - IndentRect.Left := 0; - end; - if (insPreview.PaintStyle = ipsNet) and ((Sender <> irMBPhoto) and (Sender <> irBMWPhoto)) then - Inc(CategoryIndentRect.Bottom); - end; - end; - - procedure DrawImage(const R: TRect); - begin - FillRectColor(ACanvas, R, GroupColor); - ilVendorLogos.Draw(ACanvas, R.Left, R.Top, Sender.ImageIndex); - end; - -const - TextAligns: array[Boolean] of TcxTextAlignY = (taCenterY, taTop); -var - DrawInfo: TdxInspectorCaptionIndentDrawInfo; -begin - if Sender.IsCategory then - begin - AColor := GroupColor; - AFont := ReportLink.GroupFont; - end - else - begin - AColor := CaptionColor; - AFont := ReportLink.FixedFont; - end; - - DrawTextRect(ACanvas, ARect, AText, AFont, AColor, TextAligns[Sender is TdxInspectorTextGraphicRow]); - CalcDrawInfo(DrawInfo); - with DrawInfo do - begin - if not IsRectEmpty(ImageRect) then - DrawImage(ImageRect); - if not IsRectEmpty(IndentRect) then - FillRectColor(ACanvas, IndentRect, AColor); - if not IsRectEmpty(CategoryIndentRect) then - begin - if Sender.IsCategory and ReportLink.IsDrawExpandButtons then - DrawExpandButton(ACanvas, CategoryIndentRect, GroupColor, insPreview.PaintStyle) - else - FillRectColor(ACanvas, CategoryIndentRect, GroupColor); - if not Sender.IsCategory then - begin - CategoryIndentRect.Left := CategoryIndentRect.Right - 1; - FillRectColor(ACanvas, CategoryIndentRect, ReportLink.GridLineColor); - end; - end; - end; - ADone := True; -end; - -procedure TdxInspectorDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreview.Parent := TPageControl(Sender).ActivePage; -end; - -procedure RegisterHelpers; -begin - TdxInspectorRowHelper.Register; - TdxInspectorImageRowHelper.Register; -end; - -procedure UnregisterHelpers; -begin - TdxRowHelpersFactory.ReleaseInstance; -end; - -initialization - RegisterHelpers; - - dxPSRegisterReportLink(TdxInspectorReportLink, TdxInspector, TdxInspectorDesignWindow); - FPicture := TPicture.Create; - -finalization - FPicture.Free; - dxPSUnregisterReportLink(TdxInspectorReportLink, TdxInspector, TdxInspectorDesignWindow); - UnregisterHelpers; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxInsLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxInsLnkReg.pas deleted file mode 100644 index f9db61c8..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxInsLnkReg.pas +++ /dev/null @@ -1,88 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxInsLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes, dxPSdxInsLnk, dxPSdxDBInsLnk; - -type - TdxInspectorOptionsPropertyEditor = class(TSetProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - -function TdxInspectorOptionsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -procedure TdxInspectorOptionsPropertyEditor.Edit; -var - I: Integer; -begin - inherited; - if TCustomdxInspectorReportLink(GetComponent(0)).DesignReport then - begin - Designer.Modified; - if PropCount > 1 then - for I := 1 to PropCount - 1 do - GetComponent(I).Assign(GetComponent(0)); - end; -end; - -procedure Register; -begin - RegisterNoIcon([TdxInspectorReportLink, TdxDBInspectorReportLink]); - RegisterPropertyEditor(TypeInfo(TdxInspectorPaintOptions), - TCustomdxInspectorReportLink, 'Options', TdxInspectorOptionsPropertyEditor); -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxLCLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxLCLnk.pas deleted file mode 100644 index 486664a6..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxLCLnk.pas +++ /dev/null @@ -1,2454 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxLCLnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, Graphics, Controls, ComCtrls, dxLayoutLookAndFeels, - dxLayoutControl, dxBase, dxPrnPg, dxPSCore, dxPSContainerLnk, cxDrawTextUtils; - -type - TdxLayoutControlReportLink = class; - TdxLayoutControlReportLinkOptionsPagination = class; - TdxLayoutControlReportLinkOptionsTransparent = class; - - { Report Items} - - TdxLCCacheItemKind = (ikLayoutItem, ikLayoutGroup, ikLayoutItemCaption, ikControl); - - TdxLCBoundsCacheItem = class - public - Component: TComponent; // nil if ItemKind = ikItemCaption - Bounds: TRect; - EmbeddedLink: Boolean; - end; - - TdxReportLayoutControlHost = class(TdxReportWinControlHost) - protected - function GetControlItem: TdxReportVisualItem; override; - end; - - TdxCustomReportLayoutItem = class(TdxReportGroup) - private - function GetLayoutItemBounds: TRect; - protected - procedure AdjustBounds(DC: HDC); virtual; - property LayoutItemBounds: TRect read GetLayoutItemBounds; - public - function LayoutItem: TdxCustomLayoutItem; overload; virtual; - end; - - TdxReportLayoutGroup = class(TdxCustomReportLayoutItem) - public - function LayoutItem: TdxLayoutGroup; reintroduce; overload; - end; - - TdxReportLayoutItem = class(TdxCustomReportLayoutItem) - private - function GetAdapter: TdxCustomLayoutControlAdapter; - function GetCaptionBounds: TRect; - function GetCaptionItem: TdxReportCellString; - function GetControl: TControl; - function GetControlBounds: TRect; - function GetControlItem: TdxReportVisualItem; - function GetHasCaptionItem: Boolean; - function GetHasControlItem: Boolean; - function GetIsControlAccessible: Boolean; - protected - procedure AdjustBounds(DC: HDC); override; - function CreateCaption(AReportLink: TdxLayoutControlReportLink): TdxReportCellString; virtual; - function CreateControl(AReportLink: TdxLayoutControlReportLink): TdxReportVisualItem; virtual; - procedure CreateNestedItems(AReportLink: TdxLayoutControlReportLink); virtual; - function IsCreateCaption(AReportLink: TdxLayoutControlReportLink): Boolean; virtual; - function IsCreateControl(AReportLink: TdxLayoutControlReportLink): Boolean; virtual; - - property Adapter: TdxCustomLayoutControlAdapter read GetAdapter; - property CaptionBounds: TRect read GetCaptionBounds; - property ControlBounds: TRect read GetControlBounds; - property IsControlAccessible: Boolean read GetIsControlAccessible; - public - function LayoutItem: TdxLayoutItem; reintroduce; overload; - - property CaptionItem: TdxReportCellString read GetCaptionItem; - property Control: TControl read GetControl; - property ControlItem: TdxReportVisualItem read GetControlItem; - property HasCaptionItem: Boolean read GetHasCaptionItem; - property HasControlItem: Boolean read GetHasControlItem; - end; - - { Definitions } - - TdxPSCustomLayoutItemDefinition = class(TdxPSCustomContainerItemDefinition) - private - function GetLayoutItem: TdxCustomLayoutItem; - function GetReportItem: TdxCustomReportLayoutItem; - procedure SetLayoutItem(Value: TdxCustomLayoutItem); - protected - procedure AdjustBounds(DC: HDC); virtual; - procedure SaveOriginalItemSize; virtual; - procedure SetupOriginalControlSize; virtual; - public - function OptionsPagination: TdxLayoutControlReportLinkOptionsPagination; reintroduce; overload; - property LayoutItem: TdxCustomLayoutItem read GetLayoutItem write SetLayoutItem; - property ReportItem: TdxCustomReportLayoutItem read GetReportItem; - end; - - TdxPSLayoutGroupDefinition = class(TdxPSCustomLayoutItemDefinition) - private - function GetLayoutItem: TdxLayoutGroup; - protected - procedure AddDelimitersHorz(AList: TList); override; - procedure AddDelimitersVert(AList: TList); override; - public - property LayoutItem: TdxLayoutGroup read GetLayoutItem; - end; - - TdxPSLayoutItemDefinition = class(TdxPSCustomLayoutItemDefinition) - private - function GetLayoutItem: TdxLayoutItem; - function GetReportItem: TdxReportLayoutItem; - protected - procedure AddDelimitersHorz(AList: TList); override; - procedure AddDelimitersVert(AList: TList); override; - procedure SaveOriginalItemSize; override; - procedure SetupOriginalControlSize; override; - public - property LayoutItem: TdxLayoutItem read GetLayoutItem; - property ReportItem: TdxReportLayoutItem read GetReportItem; - end; - - { Producers } - - TdxPSLayoutControlObjectProducer = class(TdxPSCustomProducer) - public - function ReportLink: TdxLayoutControlReportLink; reintroduce; overload; - function RootContainer: TdxLayoutControl; reintroduce; overload; - end; - - TdxPSLayoutLookAndFeelProducerClass = class of TdxPSLayoutLookAndFeelProducer; - - TdxPSLayoutLookAndFeelProducer = class(TdxPSLayoutControlObjectProducer) - protected - function GetContentColor: TColor; virtual; - function GetGroupCaptionColor: TColor; virtual; - function GetIsContentTransparent: Boolean; virtual; - function GetIsGroupCaptionTransparent: Boolean; virtual; - function GetTransparentColor: TColor; virtual; - - procedure InitializeReportLookAndFeel(ALookAndFeel: TdxPSReportGroupLookAndFeel); virtual; - class function ReportLookAndFeelClass: TdxPSReportGroupLookAndFeelClass; virtual; - - property GroupCaptionColor: TColor read GetGroupCaptionColor; - property IsGroupCaptionTransparent: Boolean read GetIsGroupCaptionTransparent; - public - function LayoutLookAndFeel: TdxCustomLayoutLookAndFeel; overload; virtual; - class function LayoutLookAndFeelClass: TdxCustomLayoutLookAndFeelClass; virtual; - - class function PairClass: TClass; override; - class procedure Register; override; - class procedure Unregister; override; - - property ContentColor: TColor read GetContentColor; - property IsContentTransparent: Boolean read GetIsContentTransparent; - property TransparentColor: TColor read GetTransparentColor; - end; - - TdxPSLayoutStandardLookAndFeelProducer = class(TdxPSLayoutLookAndFeelProducer) - protected - function GetTransparentColor: TColor; override; - class function ReportLookAndFeelClass: TdxPSReportGroupLookAndFeelClass; override; - public - function LayoutLookAndFeel: TdxLayoutStandardLookAndFeel; reintroduce; overload; - class function LayoutLookAndFeelClass: TdxCustomLayoutLookAndFeelClass; override; - end; - - TdxPSLayoutOfficeLookAndFeelProducer = class(TdxPSLayoutStandardLookAndFeelProducer) - protected - class function ReportLookAndFeelClass: TdxPSReportGroupLookAndFeelClass; override; - public - function LayoutLookAndFeel: TdxLayoutOfficeLookAndFeel; reintroduce; overload; - class function LayoutLookAndFeelClass: TdxCustomLayoutLookAndFeelClass; override; - end; - - TdxPSLayoutWebLookAndFeelProducer = class(TdxPSLayoutLookAndFeelProducer) - protected - function GetGroupCaptionColor: TColor; override; - function GetTransparentColor: TColor; override; - procedure InitializeReportLookAndFeel(ALookAndFeel: TdxPSReportGroupLookAndFeel); override; - class function ReportLookAndFeelClass: TdxPSReportGroupLookAndFeelClass; override; - public - function LayoutLookAndFeel: TdxLayoutWebLookAndFeel; reintroduce; overload; - class function LayoutLookAndFeelClass: TdxCustomLayoutLookAndFeelClass; override; - - property GroupCaptionColor; - property IsGroupCaptionTransparent; - end; - - TdxPSCustomLayoutItemProducerClass = class of TdxPSCustomLayoutItemProducer; - - TdxPSCustomLayoutItemProducer = class(TdxPSLayoutControlObjectProducer) - private - function GetLayoutItemBounds: TRect; - protected - function GetContentColor: TColor; virtual; - function GetIsContentTransparent: Boolean; virtual; - function GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; virtual; - function GetLayoutLookAndFeelProducer: TdxPSLayoutLookAndFeelProducer; - - procedure InitializeReportItem(AnItem: TdxReportCell); virtual; - class function ReportItemClass: TdxReportCellClass; virtual; - - function OptionsTransparent: TdxLayoutControlReportLinkOptionsTransparent; reintroduce; overload; - - procedure AdjustBounds; virtual; - procedure SaveOriginalItemSize; - public - function Definition: TdxPSCustomLayoutItemDefinition; reintroduce; overload; - class function DefinitionClass: TdxPSCustomContainerItemDefinitionClass; override; - - function LayoutItem: TdxCustomLayoutItem; overload; virtual; - class function LayoutItemClass: TdxCustomLayoutItemClass; virtual; - - class function PairClass: TClass; override; - function ProducingObjectFriendlyName: string; override; - procedure Reposition; override; - - class procedure Register; override; - class procedure Unregister; override; - - property ContentColor: TColor read GetContentColor; - property IsContentTransparent: Boolean read GetIsContentTransparent; - property LayoutItemBounds: TRect read GetLayoutItemBounds; - property LayoutLookAndFeel: TdxCustomLayoutLookAndFeel read GetLayoutLookAndFeel; - property LayoutLookAndFeelProducer: TdxPSLayoutLookAndFeelProducer read GetLayoutLookAndFeelProducer; - end; - - TdxPSLayoutGroupProducer = class(TdxPSCustomLayoutItemProducer) - protected - function GetGroupCaptionContentColor: TColor; virtual; - function GetIsGroupCaptionTransparent: Boolean; virtual; - procedure InitializeReportItem(AnItem: TdxReportCell); override; - class function ReportItemClass: TdxReportCellClass; override; - public - function Definition: TdxPSLayoutGroupDefinition; reintroduce; overload; - class function DefinitionClass: TdxPSCustomContainerItemDefinitionClass; override; - - function LayoutItem: TdxLayoutGroup; reintroduce; overload; - class function LayoutItemClass: TdxCustomLayoutItemClass; override; - - function ProducingObjectFriendlyName: string; override; - procedure Reposition; override; - - property GroupCaptionContentColor: TColor read GetGroupCaptionContentColor; - property IsGroupCaptionTransparent: Boolean read GetIsGroupCaptionTransparent; - end; - - TdxPSLayoutItemProducer = class(TdxPSCustomLayoutItemProducer) - private - function GetControl: TControl; - function GetHasControl: Boolean; - protected - function GetContentColor: TColor; override; - procedure InitializeReportItem(AnItem: TdxReportCell); override; - class function ReportItemClass: TdxReportCellClass; override; - public - function Definition: TdxPSLayoutItemDefinition; reintroduce; overload; - class function DefinitionClass: TdxPSCustomContainerItemDefinitionClass; override; - - function LayoutItem: TdxLayoutItem; reintroduce; overload; - class function LayoutItemClass: TdxCustomLayoutItemClass; override; - - function ProducingObjectFriendlyName: string; override; - procedure Reposition; override; - - property Control: TControl read GetControl; - property HasControl: Boolean read GetHasControl; - end; - - { Caches } - - TdxPSCustomLayoutObjectProducerCache = class(TdxPSContainerReportLinkCustomCache) - public - function ReportLink: TdxLayoutControlReportLink; reintroduce; overload; - end; - - TdxPSLayoutItemProducerCache = class(TdxPSCustomLayoutObjectProducerCache) - private - function GetItem(Index: Integer): TdxPSCustomLayoutItemProducer; - function GetProducer(AProducerClass: TdxPSCustomLayoutItemProducerClass; - ALayoutItem: TdxCustomLayoutItem): TdxPSCustomLayoutItemProducer; - protected - property Items[Index: Integer]: TdxPSCustomLayoutItemProducer read GetItem; - public - property Producers[AProducerClass: TdxPSCustomLayoutItemProducerClass; - ALayoutItem: TdxCustomLayoutItem]: TdxPSCustomLayoutItemProducer read GetProducer; default; - end; - - TdxPSLayoutLookAndFeelProducerCache = class(TdxPSCustomLayoutObjectProducerCache) - private - function GetItem(Index: Integer): TdxPSLayoutLookAndFeelProducer; - function GetProducer(AProducerClass: TdxPSLayoutLookAndFeelProducerClass; - ALayoutLookAndFeel: TdxCustomLayoutLookAndFeel): TdxPSLayoutLookAndFeelProducer; - protected - property Items[Index: Integer]: TdxPSLayoutLookAndFeelProducer read GetItem; - public - property Producers[AProducerClass: TdxPSLayoutLookAndFeelProducerClass; - ALayoutLookAndFeel: TdxCustomLayoutLookAndFeel]: TdxPSLayoutLookAndFeelProducer read GetProducer; default; - end; - - TdxPSNativeLayoutControlProducer = class(TdxPSNativePrintableControlProducer) - public - function Control: TdxCustomLayoutControl; reintroduce; overload; - class function ControlClass: TControlClass; override; - - class function HasNativeSupportForBorders: Boolean; override; - - function ObjectExpandHeight: Boolean; override; - function ObjectExpandWidth: Boolean; override; - end; - - TdxPSLayoutControlProducer = class(TdxPSRootContainerProducer) - private - function GetAvailableBounds: TRect; - function GetProducer(LayoutItem: TdxCustomLayoutItem): TdxPSCustomLayoutItemProducer; - protected - procedure CreateLayoutItems(AnItem: TdxReportVisualItem); virtual; - procedure GetLayoutItemList(AnItems: TList); - function HostClass: TdxReportCellClass; override; - procedure InitializeHost(ACell: TdxReportCell); override; - procedure InitializeItem(AnItem: TdxReportVisualItem); override; - function ItemClass: TdxReportVisualItemClass; override; - procedure ReportLinkInitializeItem(AnItem: TdxReportVisualItem); - - property AvailableBounds: TRect read GetAvailableBounds; - property Producers[LayoutItem: TdxCustomLayoutItem]: TdxPSCustomLayoutItemProducer read GetProducer; - public - class function CanHasAvailableChildren: Boolean; override; - class function Reenterable: Boolean; override; - - function Control: TdxLayoutControl; reintroduce; overload; - class function ControlClass: TControlClass; override; - - class function HasNativeSupportForBorders: Boolean; override; - - function ObjectExpandHeight: Boolean; override; - function ObjectExpandWidth: Boolean; override; - - function ReportLink: TdxLayoutControlReportLink; reintroduce; overload; - procedure Reposition; override; - end; - - PdxPSLayoutCacheFontItem = ^TdxPSLayoutCacheFontItem; - TdxPSLayoutCacheFontItem = record - CaptionOptions: TdxLayoutLookAndFeelCaptionOptions; - FontIndex: Integer; - end; - - { Options } - - TdxLayoutControlReportLinkOptionsPaginationClass = class of TdxLayoutControlReportLinkOptionsPagination; - - TdxLayoutControlReportLinkOptionsPagination = class(TdxCustomContainerReportLinkOptionsPagination) - private - FGroups: Boolean; - FItems: Boolean; - procedure SetGroups(Value: Boolean); - procedure SetItems(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property Groups: Boolean read FGroups write SetGroups default True; - property Items: Boolean read FItems write SetItems default True; - end; - - TdxLayoutControlReportLinkOptionsSizeClass = class of TdxLayoutControlReportLinkOptionsSize; - - TdxLayoutControlReportLinkOptionsSize = class(TdxCustomContainerReportLinkOptions) - private - FAutoWidth: Boolean; - procedure SetAutoWidth(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property AutoWidth: Boolean read FAutoWidth write SetAutoWidth default True; - end; - - TdxLayoutControlReportLinkOptionsTransparent = class(TdxCustomContainerReportLinkOptionsTransparent) - private - FGroups: Boolean; - FItems: Boolean; - procedure SetGroups(Value: Boolean); - procedure SetItems(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; override; - published - property Groups: Boolean read FGroups write SetGroups default True; - property Items: Boolean read FItems write SetItems default True; - end; - - { Report Link } - - TdxLayoutControlReportLink = class(TdxCustomContainerReportLink, IUnknown, IdxReportLinkController) - private - FCachedBounds: TList; - FCachedFonts: TList; - FCurrentLayoutItem: TdxCustomLayoutItem; - FLayoutItemProducerCache: TdxPSLayoutItemProducerCache; - FLayoutLookAndFeelProducerCache: TdxPSLayoutLookAndFeelProducerCache; - FOptionsSize: TdxLayoutControlReportLinkOptionsSize; - function GetAvailableBounds: TRect; - function GetCachedBoundsCount: Integer; - function GetCachedBoundsItem(Index: Integer): TdxLCBoundsCacheItem; - function GetCachedFontItem(Index: Integer): PdxPSLayoutCacheFontItem; - function GetCachedFontItemCount: Integer; - function GetCurrentHost: TdxReportCell; - function GetLayoutControl: TdxLayoutControl; - function GetLayoutItemProducer(LayoutItem: TdxCustomLayoutItem): TdxPSCustomLayoutItemProducer; - function GetLayoutLookAndFeelProducer(LayoutLookAndFeel: TdxCustomLayoutLookAndFeel): TdxPSLayoutLookAndFeelProducer; - function GetOptionsPagination: TdxLayoutControlReportLinkOptionsPagination; - function GetOptionsTransparent: TdxLayoutControlReportLinkOptionsTransparent; - function GetRootLayoutGroup: TdxLayoutGroup; - procedure SetOptionsPagination(Value: TdxLayoutControlReportLinkOptionsPagination); - procedure SetOptionsSize(Value: TdxLayoutControlReportLinkOptionsSize); - procedure SetOptionsTransparent(Value: TdxLayoutControlReportLinkOptionsTransparent); - protected - function GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; override; - procedure InternalRestoreDefaults; override; - - procedure CacheControlsBounds; - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure PostCheckEmbeddedControls; - procedure PrepareConstruct; override; - procedure PrepareLookAndFeels; - procedure RepositionControls; override; - - procedure AddHiddenItem(ATreeView: TTreeView; AParent: TTreeNode; AnItem: TdxCustomLayoutItem); - procedure AddItem(ATreeView: TTreeView; AParent: TTreeNode; AnItem: TdxCustomLayoutItem); - function IsComponentEditable(AComponent: TComponent): Boolean; override; - procedure LoadControlsTree(ATreeView: TTreeView); override; - procedure LoadHiddenControlsTree(ATreeView: TTreeView); override; - function AddBoundsToCache(AComponent: TComponent; const ABounds: TRect): Integer; - function AddCaptionOptionsFontToCache(ACaptionOptions: TdxLayoutLookAndFeelCaptionOptions): Integer; - procedure ClearCachedBounds; - procedure ClearCachedFonts; - function FindBoundsByComponent(AComponent: TComponent; var ABounds: TRect; ASetEmbedded: Boolean): Boolean; - function FindFontIndexByCaptionOptions(ACaptionOptions: TdxLayoutLookAndFeelCaptionOptions): Integer; - procedure FreeAndNilCachedBounds; - procedure FreeAndNilCachedFonts; - - procedure CreateOptions; override; - procedure DestroyOptions; override; - function GetOptionsPaginationClass: TdxCustomContainerReportLinkOptionsPaginationClass; override; - function GetOptionsSizeClass: TdxLayoutControlReportLinkOptionsSizeClass; virtual; - function GetOptionsTransparentClass: TdxCustomContainerReportLinkOptionsTransparentClass; override; - - function FindReportGroupLookAndFeel(ALayoutLookAndFeel: TdxCustomLayoutLookAndFeel): TdxPSReportGroupLookAndFeel; - function FindReportItemByLayoutItem(ALayoutItem: TdxCustomLayoutItem): TdxReportCell; - procedure GetLayoutItemList(AControl: TdxLayoutControl; AnItems: TList); - function GetPreparedFontIndex(ACaptionOptions: TdxLayoutLookAndFeelCaptionOptions): Integer; overload; - // IdxReportLinkController - function GetControlSiteBounds(AControl: TControl): TRect; virtual; - - property AvailableBounds: TRect read GetAvailableBounds; - property CachedBoundsCount: Integer read GetCachedBoundsCount; - property CachedBoundsItem[Index: Integer]: TdxLCBoundsCacheItem read GetCachedBoundsItem; - property CachedBounds: TList read FCachedBounds; - - property CachedFontItemCount: Integer read GetCachedFontItemCount; - property CachedFontItems[Index: Integer]: PdxPSLayoutCacheFontItem read GetCachedFontItem; - property CachedFonts: TList read FCachedFonts; - - property CurrentHost: TdxReportCell read GetCurrentHost; - property CurrentLayoutItem: TdxCustomLayoutItem read FCurrentLayoutItem Write FCurrentLayoutItem; - property LayoutItemProducerCache: TdxPSLayoutItemProducerCache read FLayoutItemProducerCache; - property LayoutItemProducers[LayoutItem: TdxCustomLayoutItem]: TdxPSCustomLayoutItemProducer read GetLayoutItemProducer; - property LayoutLookAndFeelProducerCache: TdxPSLayoutLookAndFeelProducerCache read FLayoutLookAndFeelProducerCache; - property LayoutLookAndFeelProducers[LayoutLookAndFeel: TdxCustomLayoutLookAndFeel]: TdxPSLayoutLookAndFeelProducer read GetLayoutLookAndFeelProducer; - property RootLayoutGroup: TdxLayoutGroup read GetRootLayoutGroup; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - class function Aggregable: Boolean; override; - - property LayoutControl: TdxLayoutControl read GetLayoutControl; - published - property OptionsPagination: TdxLayoutControlReportLinkOptionsPagination read GetOptionsPagination write SetOptionsPagination; - property OptionsSize: TdxLayoutControlReportLinkOptionsSize read FOptionsSize write SetOptionsSize; - property OptionsTransparent: TdxLayoutControlReportLinkOptionsTransparent read GetOptionsTransparent write SetOptionsTransparent; - end; - - { Design Window } - - TdxPSLayoutControlDesignWindow = class(TdxfmCustomContainerDesignWindow) - private - function GetLayoutReportLink: TdxLayoutControlReportLink; - protected - procedure DoInitialize; override; - - procedure SetOptionsPaginationByIndex(AnIndex: Integer; AValue: Boolean); override; - procedure SetOptionsSizeByIndex(AnIndex: Integer; AValue: Boolean); override; - procedure SetOptionsTransparentByIndex(AnIndex: Integer; AValue: Boolean); override; - - procedure InitializeControlsTree; override; - procedure InitializeHiddenControlsTree; override; - function IsBoldNode(ANode: TTreeNode): Boolean; override; - public - property LayoutReportLink: TdxLayoutControlReportLink read GetLayoutReportLink; - end; - -implementation - -uses - {$IFDEF DELPHI6} Variants, {$ENDIF} SysUtils, StdCtrls, Forms, cxClasses, - dxPSGlbl, dxPSRes, dxPSUtl, dxLayoutControlAdapters, cxControls; - -const - LayoutBorderStyleMap: array[TdxLayoutBorderStyle] of TdxPSCellBorderClass = - (TdxPSCellNullBorder, TdxPSCellUltraFlatBorder, TdxPSCellSunkenSoftBorder, TdxPSCellSunkenBorder); - LayoutCaptionAlignHorzMap: array[TAlignment] of TcxTextAlignX = (taLeft, taRight, taCenterX); - LayoutCaptionAlignVertMap: array[TdxAlignmentVert] of TcxTextAlignY = (taTop, taCenterY, taBottom); - LayoutGroupCaptionAlignHorzMap: array[TAlignment] of TcxTextAlignX = (taLeft, taRight, taCenterX); - -type - TcxControlAccess = class(TcxControl); - TdxCustomContainerReportLinkAccess = class(TdxCustomContainerReportLink); - TdxCustomLayoutControlAccess = class(TdxCustomLayoutControl); - TdxCustomLayoutItemAccess = class(TdxCustomLayoutItem); - TdxCustomLayoutLookAndFeelAccess = class(TdxCustomLayoutLookAndFeel); - TdxLayoutControlViewInfoAccess = class(TdxLayoutControlViewInfo); - TdxLayoutItemAccess = class(TdxLayoutItem); - -{ Helpers } - -function GetLayoutItemRelativeBounds(ALayoutItem: TdxCustomLayoutItem): TRect; - - function LayoutControl: TdxCustomLayoutControlAccess; - begin - Result := TdxCustomLayoutControlAccess(ALayoutItem.Container); - end; - - function ScrollLeft: Integer; - begin - Result := LayoutControl.HScrollBar.Position; - end; - - function ScrollTop: Integer; - begin - Result := LayoutControl.VScrollBar.Position; - end; - - function ParentLeft: Integer; - begin - Result := ALayoutItem.Parent.ViewInfo.Bounds.Left; - end; - - function ParentTop: Integer; - begin - Result := ALayoutItem.Parent.ViewInfo.Bounds.Top; - end; - -begin - if ALayoutItem.ViewInfo <> nil then - begin - Result := ALayoutItem.ViewInfo.Bounds; - if ALayoutItem.IsRoot or ALayoutItem.Parent.IsRoot then - OffsetRect(Result, ScrollLeft, ScrollTop) - else - OffsetRect(Result, -ParentLeft, -ParentTop); - end - else - Result := NullRect; -end; - -{ Factories } - -type - TdxPSLayoutItemProducerFactory = class(TdxCustomClassMaps) - private - function GetProducerClass(LayoutItem: TdxCustomLayoutItem): TdxPSCustomLayoutItemProducerClass; - public - class function Instance: TdxPSLayoutItemProducerFactory; reintroduce; overload; - property ProducerClasses[LayoutItem: TdxCustomLayoutItem]: TdxPSCustomLayoutItemProducerClass read GetProducerClass; default; - end; - - TdxPSLayoutLookAndFeelProducerFactory = class(TdxCustomClassMaps) - private - function GetProducerClass(LayoutLookAndFeel: TdxCustomLayoutLookAndFeel): TdxPSLayoutLookAndFeelProducerClass; - public - class function Instance: TdxPSLayoutLookAndFeelProducerFactory; reintroduce; overload; - property ProducerClasses[LayoutLookAndFeel: TdxCustomLayoutLookAndFeel]: TdxPSLayoutLookAndFeelProducerClass read GetProducerClass; default; - end; - -{ TdxPSLayoutItemProducerFactory } - -function dxPSLayoutItemProducerFactory: TdxPSLayoutItemProducerFactory; -begin - Result := TdxPSLayoutItemProducerFactory.Instance; -end; - -class function TdxPSLayoutItemProducerFactory.Instance: TdxPSLayoutItemProducerFactory; -begin - Result := inherited Instance as TdxPSLayoutItemProducerFactory; -end; - -function TdxPSLayoutItemProducerFactory.GetProducerClass(LayoutItem: TdxCustomLayoutItem): TdxPSCustomLayoutItemProducerClass; -begin - Result := TdxPSCustomLayoutItemProducerClass(PairClasses[LayoutItem.ClassType]); -end; - -{ TdxPSLayoutLookAndFeelProducerFactory } - -function dxPSLayoutLookAndFeelProducerFactory: TdxPSLayoutLookAndFeelProducerFactory; -begin - Result := TdxPSLayoutLookAndFeelProducerFactory.Instance; -end; - -class function TdxPSLayoutLookAndFeelProducerFactory.Instance: TdxPSLayoutLookAndFeelProducerFactory; -begin - Result := inherited Instance as TdxPSLayoutLookAndFeelProducerFactory; -end; - -function TdxPSLayoutLookAndFeelProducerFactory.GetProducerClass(LayoutLookAndFeel: TdxCustomLayoutLookAndFeel): TdxPSLayoutLookAndFeelProducerClass; -begin - Result := TdxPSLayoutLookAndFeelProducerClass(PairClasses[LayoutLookAndFeel.ClassType]); -end; - -{ TdxReportLayoutControlHost } - -function TdxReportLayoutControlHost.GetControlItem: TdxReportVisualItem; -begin - if CellCount <> 0 then - Result := Cells[0] - else - Result := nil; -end; - -{ TdxCustomReportLayoutItem } - -function TdxCustomReportLayoutItem.LayoutItem: TdxCustomLayoutItem; -begin - Result := TdxCustomLayoutItem(Data); -end; - -procedure TdxCustomReportLayoutItem.AdjustBounds(DC: HDC); -begin - BoundsRect := LayoutItemBounds; -end; - -function TdxCustomReportLayoutItem.GetLayoutItemBounds: TRect; -begin - Result := GetLayoutItemRelativeBounds(LayoutItem); -end; - -{ TdxReportLayoutGroup } - -function TdxReportLayoutGroup.LayoutItem: TdxLayoutGroup; -begin - Result := inherited LayoutItem as TdxLayoutGroup; -end; - -{ TdxReportLayoutItem } - -function TdxReportLayoutItem.LayoutItem: TdxLayoutItem; -begin - Result := inherited LayoutItem as TdxLayoutItem; -end; - -procedure TdxReportLayoutItem.AdjustBounds(DC: HDC); -begin - inherited; - if HasControlItem then - ControlItem.BoundsRect := ControlBounds; - if HasCaptionItem then - with CaptionItem do - begin - BoundsRect := CaptionBounds; - Width := MeasureWidth(DC); - Height := MeasureHeight(DC); - end; -end; - -function TdxReportLayoutItem.CreateCaption(AReportLink: TdxLayoutControlReportLink): TdxReportCellString; -begin - Result := TdxReportCellString.Create(Self); - with Result do - begin - BoundsRect := CaptionBounds; - CellSides := {csAll;//}[]; - with AReportLink.LayoutItemProducers[LayoutItem].LayoutLookAndFeel.ItemOptions do - FontIndex := AReportLink.FindFontIndexByCaptionOptions(CaptionOptions); - HidePrefix := True; - Multiline := LayoutItem.CaptionOptions.Width <> 0; - Text := LayoutItem.Caption; - TextAlignX := LayoutCaptionAlignHorzMap[LayoutItem.CaptionOptions.AlignHorz]; - TextAlignY := LayoutCaptionAlignVertMap[LayoutItem.CaptionOptions.AlignVert]; - Transparent := True; - AdjustFont := True; - end; -end; - -function TdxReportLayoutItem.CreateControl(AReportLink: TdxLayoutControlReportLink): TdxReportVisualItem; - - function LayoutItemProducer: TdxPSCustomLayoutItemProducer; - begin - Result := AReportLink.LayoutItemProducers[LayoutItem]; - end; - - function HasBorder(AControl: TWinControl): Boolean; - var - V: Variant; - begin - Result := csFramed in Control.ControlStyle; - if not Result and AControl.HandleAllocated then - Result := (GetWindowLong(AControl.Handle, GWL_STYLE) and WS_BORDER = WS_BORDER) or - (GetWindowLong(AControl.Handle, GWL_EXSTYLE) and WS_EX_CLIENTEDGE = WS_EX_CLIENTEDGE); - if not Result and dxPSUtl.HasProperty(AControl, 'BorderStyle') then - begin - V := dxPSUtl.GetProperty(AControl, 'BorderStyle'); - Result := not VarIsNull(V) and (V <> Forms.bsNone); - end; - end; - -const - CellSidesMap: array[Boolean] of TdxCellSides = ([], csAll); -begin - if Control is TWinControl then - begin - Result := AReportLink.ActiveBuilder.BuildNestedContainer(TWinControl(Control), Self); - if not AReportLink.Producers[Control].HasNativeSupportForBorders then - with LayoutItemProducer.LayoutLookAndFeel.ItemOptions do - begin - TdxReportWinControlHost(Result).ControlItem.BorderClass := LayoutBorderStyleMap[ControlBorderStyle]; - TdxReportWinControlHost(Result).ControlItem.BorderColor := ControlBorderColor; - TdxReportWinControlHost(Result).ControlItem.CellSides := CellSidesMap[LayoutItem.ControlOptions.ShowBorder or HasBorder(TWinControl(Control))]; - end; - end - else - Result := AReportLink.ActiveBuilder.BuildControl(Control, Self); - - Result.BoundsRect := ControlBounds; - Result.CellSides := []; -end; - -procedure TdxReportLayoutItem.CreateNestedItems(AReportLink: TdxLayoutControlReportLink); -begin - if IsCreateCaption(AReportLink) then CreateCaption(AReportLink); - if IsCreateControl(AReportLink) then CreateControl(AReportLink); -end; - -function TdxReportLayoutItem.IsCreateCaption(AReportLink: TdxLayoutControlReportLink): Boolean; -begin - with TdxLayoutItemAccess(LayoutItem) do - Result := ShowCaption and (not HasControl or AReportLink.DoIsComponentProcessed(Control)); -end; - -function TdxReportLayoutItem.IsCreateControl(AReportLink: TdxLayoutControlReportLink): Boolean; -begin - Result := TdxLayoutItemAccess(LayoutItem).HasControl and AReportLink.DoIsComponentProcessed(Control); -end; - -function TdxReportLayoutItem.GetAdapter: TdxCustomLayoutControlAdapter; -begin - Result := TdxLayoutItemAccess(LayoutItem).ControlAdapter; -end; - -function TdxReportLayoutItem.GetCaptionBounds: TRect; -const - DeltaX = 1; - DeltaY = 4; -begin - with LayoutItem do - begin - Result := ViewInfo.CaptionViewInfo.Bounds; - with ViewInfo.Bounds do - OffsetRect(Result, -Left, -Top); - if CaptionOptions.Width <> 0 then - Result.Right := Result.Left + CaptionOptions.Width; - OffsetRect(Result, -DeltaX, -DeltaY); - //Inc(Result.Left, DeltaX); - Inc(Result.Bottom, DeltaY); // multiline captions - end; -end; - -function TdxReportLayoutItem.GetCaptionItem: TdxReportCellString; -begin - if (DataItemCount <> 0) and (DataItems[0].Data = 0) then - Result := TdxReportCellString(DataItems[0]) - else - Result := nil; -end; - -function TdxReportLayoutItem.GetControl: TControl; -begin - Result := LayoutItem.Control; -end; - -function TdxReportLayoutItem.GetControlBounds: TRect; -begin - with LayoutItem do - begin - Result := ViewInfo.ControlViewInfo.ControlBounds; - with ViewInfo.Bounds do - OffsetRect(Result, -Left, -Top); - end; -end; - -function TdxReportLayoutItem.GetControlItem: TdxReportVisualItem; -const - Indexes: array[Boolean] of Integer = (0, 1); -var - Index: Integer; -begin - if CellCount = 0 then - begin - Index := Indexes[HasCaptionItem]; - if (DataItemCount > Index) and (DataItems[Index].Data <> 0) then - Result := DataItems[Index] - else - Result := nil; - end - else - Result := Cells[0]; -end; - -function TdxReportLayoutItem.GetHasCaptionItem: Boolean; -begin - Result := CaptionItem <> nil; -end; - -function TdxReportLayoutItem.GetHasControlItem: Boolean; -begin - Result := ControlItem <> nil; -end; - -function TdxReportLayoutItem.GetIsControlAccessible: Boolean; -begin - Result := (LayoutItem.Control <> nil) and LayoutItem.Control.Visible; -end; - -{ TdxPSCustomLayoutItemDefinition } - -function TdxPSCustomLayoutItemDefinition.OptionsPagination: TdxLayoutControlReportLinkOptionsPagination; -begin - Result := inherited OptionsPagination as TdxLayoutControlReportLinkOptionsPagination; -end; - -procedure TdxPSCustomLayoutItemDefinition.AdjustBounds(DC: HDC); -begin - ReportItem.AdjustBounds(DC); -end; - -procedure TdxPSCustomLayoutItemDefinition.SaveOriginalItemSize; -begin -end; - -procedure TdxPSCustomLayoutItemDefinition.SetupOriginalControlSize; -begin -end; - -function TdxPSCustomLayoutItemDefinition.GetLayoutItem: TdxCustomLayoutItem; -begin - Result := TdxCustomLayoutItem(Component); -end; - -function TdxPSCustomLayoutItemDefinition.GetReportItem: TdxCustomReportLayoutItem; -begin - Result := inherited ReportItem as TdxCustomReportLayoutItem; -end; - -procedure TdxPSCustomLayoutItemDefinition.SetLayoutItem(Value: TdxCustomLayoutItem); -begin - Component := Value; -end; - -{ TdxPSLayoutGroupDefinition } - -procedure TdxPSLayoutGroupDefinition.AddDelimitersHorz(AList: TList); -begin - inherited; - if OptionsPagination.Groups then AddReportItemToDelimitersHorz(AList); -end; - -procedure TdxPSLayoutGroupDefinition.AddDelimitersVert(AList: TList); -begin - inherited; - if OptionsPagination.Groups then AddReportItemToDelimitersVert(AList); -end; - -function TdxPSLayoutGroupDefinition.GetLayoutItem: TdxLayoutGroup; -begin - Result := inherited LayoutItem as TdxLayoutGroup; -end; - -{ TdxPSLayoutItemDefinition } - -procedure TdxPSLayoutItemDefinition.AddDelimitersHorz(AList: TList); -begin - inherited; - if OptionsPagination.Items then AddReportItemToDelimitersHorz(AList); -end; - -procedure TdxPSLayoutItemDefinition.AddDelimitersVert(AList: TList); -begin - inherited; - if OptionsPagination.Items then AddReportItemToDelimitersVert(AList); -end; - -procedure TdxPSLayoutItemDefinition.SaveOriginalItemSize; -begin - with TdxLayoutItemAccess(LayoutItem) do - if Control <> nil then SaveOriginalControlSize; -end; - -procedure TdxPSLayoutItemDefinition.SetupOriginalControlSize; -begin - with ReportItem do - if HasControlItem then - LayoutItem.OriginalControlSize := Point(ControlItem.Width, ControlItem.Height); -end; - -function TdxPSLayoutItemDefinition.GetLayoutItem: TdxLayoutItem; -begin - Result := inherited LayoutItem as TdxLayoutItem; -end; - -function TdxPSLayoutItemDefinition.GetReportItem: TdxReportLayoutItem; -begin - Result := inherited ReportItem as TdxReportLayoutItem; -end; - -{ TdxPSLayoutControlObjectProducer } - -function TdxPSLayoutControlObjectProducer.ReportLink: TdxLayoutControlReportLink; -begin - Result := inherited ReportLink as TdxLayoutControlReportLink; -end; - -function TdxPSLayoutControlObjectProducer.RootContainer: TdxLayoutControl; -begin - Result := inherited RootContainer as TdxLayoutControl; -end; - -{ TdxPSLayoutLookAndFeelProducer } - -function TdxPSLayoutLookAndFeelProducer.LayoutLookAndFeel: TdxCustomLayoutLookAndFeel; -begin - Result := inherited ProducingObject as TdxCustomLayoutLookAndFeel; -end; - -class function TdxPSLayoutLookAndFeelProducer.LayoutLookAndFeelClass: TdxCustomLayoutLookAndFeelClass; -begin - Result := TdxCustomLayoutLookAndFeel; -end; - -class function TdxPSLayoutLookAndFeelProducer.PairClass: TClass; -begin - Result := LayoutLookAndFeelClass; -end; - -class procedure TdxPSLayoutLookAndFeelProducer.Register; -begin - dxPSLayoutLookAndFeelProducerFactory.Register(Self); -end; - -class procedure TdxPSLayoutLookAndFeelProducer.Unregister; -begin - dxPSLayoutLookAndFeelProducerFactory.Unregister(Self); -end; - -function TdxPSLayoutLookAndFeelProducer.GetContentColor: TColor; -begin - Result := LayoutLookAndFeel.GroupOptions.GetColor; -end; - -function TdxPSLayoutLookAndFeelProducer.GetGroupCaptionColor: TColor; -begin - Result := LayoutLookAndFeel.GroupOptions.GetColor; -end; - -function TdxPSLayoutLookAndFeelProducer.GetIsContentTransparent: Boolean; -begin - Result := ColorToRGB(ContentColor) = ColorToRGB(TransparentColor); -end; - -function TdxPSLayoutLookAndFeelProducer.GetIsGroupCaptionTransparent: Boolean; -begin - Result := ColorToRGB(GroupCaptionColor) = ColorToRGB(TransparentColor); -end; - -function TdxPSLayoutLookAndFeelProducer.GetTransparentColor: TColor; -begin - Result := clDefault; -end; - -procedure TdxPSLayoutLookAndFeelProducer.InitializeReportLookAndFeel(ALookAndFeel: TdxPSReportGroupLookAndFeel); -begin - ALookAndFeel.Color := LayoutLookAndFeel.GroupOptions.GetColor; - ALookAndFeel.Data := LayoutLookAndFeel; - ALookAndFeel.FontIndex := ReportLink.FindFontIndexByCaptionOptions(LayoutLookAndFeel.GroupOptions.CaptionOptions); - ALookAndFeel.CaptionFontIndex := ALookAndFeel.FontIndex; -end; - -class function TdxPSLayoutLookAndFeelProducer.ReportLookAndFeelClass: TdxPSReportGroupLookAndFeelClass; -begin - Result := TdxPSReportGroupLookAndFeel; -end; - -{ TdxPSLayoutStandardLookAndFeelProducer } - -function TdxPSLayoutStandardLookAndFeelProducer.LayoutLookAndFeel: TdxLayoutStandardLookAndFeel; -begin - Result := inherited LayoutLookAndFeel as TdxLayoutStandardLookAndFeel; -end; - -class function TdxPSLayoutStandardLookAndFeelProducer.LayoutLookAndFeelClass: TdxCustomLayoutLookAndFeelClass; -begin - Result := TdxLayoutStandardLookAndFeel; -end; - -function TdxPSLayoutStandardLookAndFeelProducer.GetTransparentColor: TColor; -begin - Result := clBtnFace; -end; - -class function TdxPSLayoutStandardLookAndFeelProducer.ReportLookAndFeelClass: TdxPSReportGroupLookAndFeelClass; -begin - Result := TdxPSReportGroupStandardLookAndFeel; -end; - -{ TdxPSLayoutOfficeLookAndFeelProducer } - -function TdxPSLayoutOfficeLookAndFeelProducer.LayoutLookAndFeel: TdxLayoutOfficeLookAndFeel; -begin - Result := inherited LayoutLookAndFeel as TdxLayoutOfficeLookAndFeel; -end; - -class function TdxPSLayoutOfficeLookAndFeelProducer.LayoutLookAndFeelClass: TdxCustomLayoutLookAndFeelClass; -begin - Result := TdxLayoutOfficeLookAndFeel; -end; - -class function TdxPSLayoutOfficeLookAndFeelProducer.ReportLookAndFeelClass: TdxPSReportGroupLookAndFeelClass; -begin - Result := TdxPSReportGroupOfficeLookAndFeel; -end; - -{ TdxPSLayoutWebLookAndFeelProducer } - -function TdxPSLayoutWebLookAndFeelProducer.LayoutLookAndFeel: TdxLayoutWebLookAndFeel; -begin - Result := inherited LayoutLookAndFeel as TdxLayoutWebLookAndFeel; -end; - -class function TdxPSLayoutWebLookAndFeelProducer.LayoutLookAndFeelClass: TdxCustomLayoutLookAndFeelClass; -begin - Result := TdxLayoutWebLookAndFeel; -end; - -function TdxPSLayoutWebLookAndFeelProducer.GetGroupCaptionColor: TColor; -begin - Result := LayoutLookAndFeel.GroupOptions.CaptionOptions.GetColor; -end; - -function TdxPSLayoutWebLookAndFeelProducer.GetTransparentColor: TColor; -begin - Result := clWindow; -end; - -procedure TdxPSLayoutWebLookAndFeelProducer.InitializeReportLookAndFeel(ALookAndFeel: TdxPSReportGroupLookAndFeel); -begin - inherited; - with TdxPSReportGroupWebLookAndFeel(ALookAndFeel) do - begin - BorderThickness := LayoutLookAndFeel.GroupOptions.FrameWidth; - BorderColor := LayoutLookAndFeel.GroupOptions.GetFrameColor; - CaptionColor := LayoutLookAndFeel.GroupOptions.CaptionOptions.GetColor; - CaptionSeparatorColor := LayoutLookAndFeel.GroupOptions.GetFrameColor; - CaptionSeparatorThickness := LayoutLookAndFeel.GroupOptions.CaptionOptions.SeparatorWidth; - end; -end; - -class function TdxPSLayoutWebLookAndFeelProducer.ReportLookAndFeelClass: TdxPSReportGroupLookAndFeelClass; -begin - Result := TdxPSReportGroupWebLookAndFeel; -end; - -{ TdxPSCustomLayoutItemProducer } - -function TdxPSCustomLayoutItemProducer.Definition: TdxPSCustomLayoutItemDefinition; -begin - Result := inherited Definition as TdxPSCustomLayoutItemDefinition; -end; - -class function TdxPSCustomLayoutItemProducer.DefinitionClass: TdxPSCustomContainerItemDefinitionClass; -begin - Result := TdxPSCustomLayoutItemDefinition; -end; - -function TdxPSCustomLayoutItemProducer.LayoutItem: TdxCustomLayoutItem; -begin - Result := inherited ProducingObject as TdxCustomLayoutItem; -end; - -class function TdxPSCustomLayoutItemProducer.LayoutItemClass: TdxCustomLayoutItemClass; -begin - Result := TdxCustomLayoutItem; -end; - -class function TdxPSCustomLayoutItemProducer.PairClass: TClass; -begin - Result := LayoutItemClass; -end; - -function TdxPSCustomLayoutItemProducer.ProducingObjectFriendlyName: string; -begin - Result := ''; - if not IsDesigning then - Result := LayoutItem.Caption; - if Result = '' then - Result := inherited ProducingObjectFriendlyName; -end; - -procedure TdxPSCustomLayoutItemProducer.Reposition; -begin -end; - -class procedure TdxPSCustomLayoutItemProducer.Register; -begin - inherited; - dxPSLayoutItemProducerFactory.Register(Self); -end; - -class procedure TdxPSCustomLayoutItemProducer.Unregister; -begin - if Self <> TdxPSCustomLayoutItemProducer then - dxPSLayoutItemProducerFactory.Unregister(Self); - inherited; -end; - -function TdxPSCustomLayoutItemProducer.GetContentColor: TColor; -begin - Result := LayoutLookAndFeelProducer.ContentColor; -end; - -function TdxPSCustomLayoutItemProducer.GetIsContentTransparent: Boolean; -begin - Result := LayoutLookAndFeelProducer.IsContentTransparent; -end; - -function TdxPSCustomLayoutItemProducer.GetLayoutLookAndFeel: TdxCustomLayoutLookAndFeel; -begin - Result := TdxCustomLayoutItemAccess(LayoutItem).GetLookAndFeel; -end; - -function TdxPSCustomLayoutItemProducer.GetLayoutLookAndFeelProducer: TdxPSLayoutLookAndFeelProducer; -begin - Result := ReportLink.LayoutLookAndFeelProducers[LayoutLookAndFeel]; -end; - -procedure TdxPSCustomLayoutItemProducer.InitializeReportItem(AnItem: TdxReportCell); -begin - AnItem.BoundsRect := LayoutItemBounds; - AnItem.CellSides := csAll; - AnItem.Color := ContentColor; - AnItem.Data := Integer(LayoutItem); - //AnItem.ExcludeFromClipRgn := True; - AnItem.Transparent := False; - ReportLink.CreateItemDefinition(LayoutItem, AnItem); -end; - -class function TdxPSCustomLayoutItemProducer.ReportItemClass: TdxReportCellClass; -begin - Result := TdxCustomReportLayoutItem; -end; - -function TdxPSCustomLayoutItemProducer.OptionsTransparent: TdxLayoutControlReportLinkOptionsTransparent; -begin - Result := inherited OptionsTransparent as TdxLayoutControlReportLinkOptionsTransparent; -end; - -procedure TdxPSCustomLayoutItemProducer.AdjustBounds; -begin - Definition.AdjustBounds(DC); -end; - -procedure TdxPSCustomLayoutItemProducer.SaveOriginalItemSize; -begin - Definition.SaveOriginalItemSize; -end; - -function TdxPSCustomLayoutItemProducer.GetLayoutItemBounds: TRect; -begin - Result := GetLayoutItemRelativeBounds(LayoutItem); -end; - -{ TdxPSLayoutGroupProducer } - -function TdxPSLayoutGroupProducer.Definition: TdxPSLayoutGroupDefinition; -begin - Result := inherited Definition as TdxPSLayoutGroupDefinition; -end; - -class function TdxPSLayoutGroupProducer.DefinitionClass: TdxPSCustomContainerItemDefinitionClass; -begin - Result := TdxPSLayoutGroupDefinition; -end; - -function TdxPSLayoutGroupProducer.ProducingObjectFriendlyName: string; -begin - Result := ''; - if not IsDesigning then - Result := LayoutItem.Caption; - if Result = '' then - Result := cxGetResourceString(@sdxLayoutGroupDefaultCaption); -end; - -procedure TdxPSLayoutGroupProducer.Reposition; -begin -end; - -function TdxPSLayoutGroupProducer.LayoutItem: TdxLayoutGroup; -begin - Result := inherited LayoutItem as TdxLayoutGroup; -end; - -class function TdxPSLayoutGroupProducer.LayoutItemClass: TdxCustomLayoutItemClass; -begin - Result := TdxLayoutGroup; -end; - -function TdxPSLayoutGroupProducer.GetGroupCaptionContentColor: TColor; -begin - Result := LayoutLookAndFeelProducer.GroupCaptionColor; -end; - -function TdxPSLayoutGroupProducer.GetIsGroupCaptionTransparent: Boolean; -begin - Result := LayoutLookAndFeelProducer.IsGroupCaptionTransparent; -end; - -procedure TdxPSLayoutGroupProducer.InitializeReportItem(AnItem: TdxReportCell); -begin - inherited; - with TdxReportGroup(AnItem) do - begin - CaptionAlignment := LayoutGroupCaptionAlignHorzMap[LayoutItem.CaptionOptions.AlignHorz]; - CaptionText := LayoutItem.Caption; - CaptionTransparent := OptionsTransparent.Groups; - //HidePrefix := True; - LookAndFeel := ReportLink.FindReportGroupLookAndFeel(LayoutLookAndFeel); - ShowCaption := LayoutItem.ShowCaption; - Transparent := OptionsTransparent.Groups; - - CellSides := []; - if LayoutItem.ShowBorder then - CellSides := LookAndFeel.DefaultBorderSides; - - CalculateCaptionTextWidth(DC); - end; -end; - -class function TdxPSLayoutGroupProducer.ReportItemClass: TdxReportCellClass; -begin - Result := TdxReportLayoutGroup; -end; - -{ TdxPSLayoutItemProducer } - -function TdxPSLayoutItemProducer.Definition: TdxPSLayoutItemDefinition; -begin - Result := inherited Definition as TdxPSLayoutItemDefinition; -end; - -class function TdxPSLayoutItemProducer.DefinitionClass: TdxPSCustomContainerItemDefinitionClass; -begin - Result := TdxPSLayoutItemDefinition; -end; - -function TdxPSLayoutItemProducer.LayoutItem: TdxLayoutItem; -begin - Result := inherited LayoutItem as TdxLayoutItem; -end; - -class function TdxPSLayoutItemProducer.LayoutItemClass: TdxCustomLayoutItemClass; -begin - Result := TdxLayoutItem; -end; - -function TdxPSLayoutItemProducer.ProducingObjectFriendlyName: string; -begin - Result := ''; - if not IsDesigning then - Result := LayoutItem.Caption; - if Result = '' then - Result := cxGetResourceString(@sdxLayoutItemDefaultCaption); - Result := dxPSUtl.DropColon(Result); -end; - -procedure TdxPSLayoutItemProducer.Reposition; -begin - if HasControl then - begin - ReportLink.Producers[Control].Reposition; - Definition.SetupOriginalControlSize; - end; -end; - -function TdxPSLayoutItemProducer.GetContentColor: TColor; -begin - Result := ReportLink.LayoutLookAndFeelProducers[TdxCustomLayoutItemAccess(LayoutItem.Parent).GetLookAndFeel].ContentColor; -end; - -procedure TdxPSLayoutItemProducer.InitializeReportItem(AnItem: TdxReportCell); -//var -// AControl: TControl; -// ALayoutItem: TdxCustomLayoutItem; -begin - inherited; - AnItem.CellSides := []; - AnItem.Transparent := OptionsTransparent.Items; -// ALayoutItem := TdxLayoutControlReportLink(ReportLink).CurrentLayoutItem; - -// AControl := TdxReportLayoutItem(AnItem).Control; - TdxReportLayoutItem(AnItem).CreateNestedItems(ReportLink); -end; - -class function TdxPSLayoutItemProducer.ReportItemClass: TdxReportCellClass; -begin - Result := TdxReportLayoutItem; -end; - -function TdxPSLayoutItemProducer.GetControl: TControl; -begin - Result := LayoutItem.Control; -end; - -function TdxPSLayoutItemProducer.GetHasControl: Boolean; -begin - Result := (Control <> nil) and Control.Visible; -end; - -{ TdxPSCustomLayoutObjectProducerCache } - -function TdxPSCustomLayoutObjectProducerCache.ReportLink: TdxLayoutControlReportLink; -begin - Result := inherited ReportLink as TdxLayoutControlReportLink; -end; - -{ TdxPSLayoutItemProducerCache } - -function TdxPSLayoutItemProducerCache.GetItem(Index: Integer): TdxPSCustomLayoutItemProducer; -begin - Result := TdxPSCustomLayoutItemProducer(inherited Items[Index]); -end; - -function TdxPSLayoutItemProducerCache.GetProducer(AProducerClass: TdxPSCustomLayoutItemProducerClass; - ALayoutItem: TdxCustomLayoutItem): TdxPSCustomLayoutItemProducer; -var - Index: Integer; -begin - Index := IndexOfByClass(AProducerClass); - if Index = -1 then - Index := Add(AProducerClass.Create(ReportLink, ALayoutItem)); - Result := Items[Index]; - Result.Initialize(ALayoutItem); -end; - -{ TdxPSLayoutLookAndFeelProducerCache } - -function TdxPSLayoutLookAndFeelProducerCache.GetItem(Index: Integer): TdxPSLayoutLookAndFeelProducer; -begin - Result := TdxPSLayoutLookAndFeelProducer(inherited Items[Index]); -end; - -function TdxPSLayoutLookAndFeelProducerCache.GetProducer(AProducerClass: TdxPSLayoutLookAndFeelProducerClass; - ALayoutLookAndFeel: TdxCustomLayoutLookAndFeel): TdxPSLayoutLookAndFeelProducer; -var - Index: Integer; -begin - Index := IndexOfByClass(AProducerClass); - if Index = -1 then - Index := Add(AProducerClass.Create(ReportLink, ALayoutLookAndFeel)); - Result := Items[Index]; - Result.Initialize(ALayoutLookAndFeel); -end; - -{ TdxPSNativeLayoutControlProducer } - -class function TdxPSNativeLayoutControlProducer.HasNativeSupportForBorders: Boolean; -begin - Result := True; -end; - -function TdxPSNativeLayoutControlProducer.ObjectExpandHeight: Boolean; -begin - Result := True; -end; - -function TdxPSNativeLayoutControlProducer.ObjectExpandWidth: Boolean; -begin - Result := True; -end; - -function TdxPSNativeLayoutControlProducer.Control: TdxCustomLayoutControl; -begin - Result := inherited Control as TdxCustomLayoutControl; -end; - -class function TdxPSNativeLayoutControlProducer.ControlClass: TControlClass; -begin - Result := TdxCustomLayoutControl; -end; - -{ TdxPSLayoutControlProducer } - -class function TdxPSLayoutControlProducer.CanHasAvailableChildren: Boolean; -begin - Result := False; -end; - -class function TdxPSLayoutControlProducer.Reenterable: Boolean; -begin - Result := False; -end; - -function TdxPSLayoutControlProducer.Control: TdxLayoutControl; -begin - Result := inherited Control as TdxLayoutControl; -end; - -class function TdxPSLayoutControlProducer.ControlClass: TControlClass; -begin - Result := TdxCustomLayoutControl; -end; - -class function TdxPSLayoutControlProducer.HasNativeSupportForBorders: Boolean; -begin - Result := False; -end; - -function TdxPSLayoutControlProducer.ObjectExpandHeight: Boolean; -begin - Result := True; -end; - -function TdxPSLayoutControlProducer.ObjectExpandWidth: Boolean; -begin - Result := True; -end; - -function TdxPSLayoutControlProducer.ReportLink: TdxLayoutControlReportLink; -begin - Result := inherited ReportLink as TdxLayoutControlReportLink; -end; - -procedure TdxPSLayoutControlProducer.Reposition; - - procedure CalculateViewInfo; - begin - Control.ViewInfo.Calculate; - end; - - procedure SetupOriginalControlSize(AnItems: TList); - var - I, Index: Integer; - Item: TdxCustomLayoutItem; - begin - for I := 0 to AnItems.Count - 1 do - begin - Item := AnItems[I]; - if ReportLink.IsComponentProcessed(Item) then - if (Item is TdxLayoutGroup) or ReportLink.FindDefinition(TdxLayoutItem(Item).Control, Index) then - Producers[Item].Reposition - else - else - Item.Visible := False; - end; - CalculateViewInfo; - end; - - procedure UpdateItemsBounds(AnItems: TList); - var - I, Index: Integer; - Item: TdxCustomLayoutItem; - begin - for I := 0 to AnItems.Count - 1 do - begin - Item := AnItems[I]; - if ReportLink.IsComponentProcessed(Item) and - ((Item is TdxLayoutGroup) or ReportLink.FindDefinition(TdxLayoutItem(Item).Control, Index)) then - Producers[Item].AdjustBounds; - end; - end; - - procedure RestoreOriginalControlSize(AnItems: TList); - var - I: Integer; - Item: TdxCustomLayoutItem; - begin - for I := 0 to AnItems.Count - 1 do - begin - Item := AnItems[I]; - Item.Visible := True; - if ReportLink.IsComponentProcessed(Item) then - Producers[Item].SaveOriginalItemSize; - end; - CalculateViewInfo; - end; - -var - Items: TList; - Cell: TdxReportCell; -begin - Control.BeginUpdate; - try - TcxControlAccess(Control).FBounds := AvailableBounds; - Items := TList.Create; - try - GetLayoutItemList(Items); - SetupOriginalControlSize(Items); - try - UpdateItemsBounds(Items); - finally - RestoreOriginalControlSize(Items); - end; - finally - Items.Free; - end; - finally - TdxLayoutControlViewInfoAccess(Control.ViewInfo).DestroyViewInfos; - TcxControlAccess(Control).FBounds := dxPSGlbl.NullRect; - Control.EndUpdate; - end; - - with TdxReportCell(Definition.SizeChangeReportItem) do - begin - Cell := Cells[0].Cells[0]; - - Cells[0].Height := Cell.Height; - Cells[0].Width := Cell.Width; - - Height := Cell.Height; - Width := Cell.Width; - end; -end; - -procedure TdxPSLayoutControlProducer.CreateLayoutItems(AnItem: TdxReportVisualItem); - - function CreateReportItem(AParent: TdxReportCell; ALayoutItem: TdxCustomLayoutItem): TdxReportCell; - begin - ReportLink.CurrentLayoutItem := ALayoutItem; - try - with Producers[ALayoutItem] do - begin - Result := ReportItemClass.Create(AParent); - InitializeReportItem(Result); - end; - ReportLinkInitializeItem(Result); - finally - ReportLink.CurrentLayoutItem := nil; - end; - end; - - procedure ProduceItem(AParent: TdxReportCell; ALayoutItem: TdxCustomLayoutItem); - var - I: Integer; - LayoutItem: TdxCustomLayoutItem; - begin - AParent := CreateReportItem(AParent, ALayoutItem); - if ALayoutItem is TdxLayoutGroup then - with TdxLayoutGroup(ALayoutItem) do - for I := 0 to VisibleCount - 1 do - begin - LayoutItem := VisibleItems[I]; - if ReportLink.DoIsComponentProcessed(LayoutItem) then - ProduceItem(AParent, LayoutItem); - end; - end; - -begin - ProduceItem(TdxReportCell(AnItem), Control.Items); // Root is always processed -end; - -procedure TdxPSLayoutControlProducer.GetLayoutItemList(AnItems: TList); -begin - ReportLink.GetLayoutItemList(Control, AnItems); -end; - -function TdxPSLayoutControlProducer.HostClass: TdxReportCellClass; -begin - Result := TdxReportLayoutControlHost; -end; - -procedure TdxPSLayoutControlProducer.InitializeHost(ACell: TdxReportCell); -begin - inherited; - ACell.Height := Control.ViewInfo.ContentHeight; - ACell.Width := Control.ViewInfo.ContentWidth; -end; - -procedure TdxPSLayoutControlProducer.InitializeItem(AnItem: TdxReportVisualItem); -begin - inherited; - AnItem.BorderClass := TdxPSCellNullBorder; - AnItem.Height := Control.ViewInfo.ContentHeight; - AnItem.Width := Control.ViewInfo.ContentWidth; - AnItem.CellSides := []; - AnItem.Transparent := True; - - CreateLayoutItems(AnItem); -end; - -function TdxPSLayoutControlProducer.ItemClass: TdxReportVisualItemClass; -begin - Result := TdxReportCell; -end; - -procedure TdxPSLayoutControlProducer.ReportLinkInitializeItem(AnItem: TdxReportVisualItem); -begin - ReportLink.DoInitializeItem(AnItem); - ReportLink.DoInitializeItemOptionsPlace(AnItem); -end; - -function TdxPSLayoutControlProducer.GetAvailableBounds: TRect; -begin - Result := ReportLink.AvailableBounds; -end; - -function TdxPSLayoutControlProducer.GetProducer(LayoutItem: TdxCustomLayoutItem): TdxPSCustomLayoutItemProducer; -begin - Result := ReportLink.LayoutItemProducers[LayoutItem]; -end; - -{ TdxLayoutControlReportLinkOptionsPagination } - -procedure TdxLayoutControlReportLinkOptionsPagination.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxLayoutControlReportLinkOptionsPagination then - with TdxLayoutControlReportLinkOptionsPagination(Source) do - begin - Self.Groups := Groups; - Self.Items := Items; - end; -end; - -procedure TdxLayoutControlReportLinkOptionsPagination.RestoreDefaults; -begin - inherited; - Controls := False; - Groups := True; - Items := True; -end; - -procedure TdxLayoutControlReportLinkOptionsPagination.SetGroups(Value: Boolean); -begin - if FGroups <> Value then - begin - FGroups := Value; - Changed; - end; -end; - -procedure TdxLayoutControlReportLinkOptionsPagination.SetItems(Value: Boolean); -begin - if FItems <> Value then - begin - FItems := Value; - Changed; - end; -end; - -{ TdxLayoutControlReportLinkOptionsSize } - -procedure TdxLayoutControlReportLinkOptionsSize.Assign(Source: TPersistent); -begin - if Source is TdxLayoutControlReportLinkOptionsSize then - AutoWidth := TdxLayoutControlReportLinkOptionsSize(Source).AutoWidth; - inherited; -end; - -procedure TdxLayoutControlReportLinkOptionsSize.RestoreDefaults; -begin - inherited; - AutoWidth := True; -end; - -procedure TdxLayoutControlReportLinkOptionsSize.SetAutoWidth(Value: Boolean); -begin - if FAutoWidth <> Value then - begin - FAutoWidth := Value; - Changed; - end; -end; - -{ TdxLayoutControlReportLinkOptionsTransparent } - -procedure TdxLayoutControlReportLinkOptionsTransparent.Assign(Source: TPersistent); -begin - inherited; - if Source is TdxLayoutControlReportLinkOptionsTransparent then - with TdxLayoutControlReportLinkOptionsTransparent(Source) do - begin - Self.Groups := Groups; - Self.Items := Items; - end; -end; - -procedure TdxLayoutControlReportLinkOptionsTransparent.RestoreDefaults; -begin - Groups := True; - Items := True; - inherited; -end; - -procedure TdxLayoutControlReportLinkOptionsTransparent.SetGroups(Value: Boolean); -begin - if FGroups <> Value then - begin - FGroups := Value; - Changed; - end; -end; - -procedure TdxLayoutControlReportLinkOptionsTransparent.SetItems(Value: Boolean); -begin - if FItems <> Value then - begin - FItems := Value; - Changed; - end; -end; - -{ TdxLayoutControlReportLink } - -constructor TdxLayoutControlReportLink.Create(AOwner: TComponent); -begin - inherited; - FCachedFonts := TList.Create; - FCachedBounds := TList.Create; - FLayoutItemProducerCache := TdxPSLayoutItemProducerCache.Create(Self); - FLayoutLookAndFeelProducerCache := TdxPSLayoutLookAndFeelProducerCache.Create(Self); -end; - -destructor TdxLayoutControlReportLink.Destroy; -begin - FreeAndNil(FLayoutLookAndFeelProducerCache); - FreeAndNil(FLayoutItemProducerCache); - FreeAndNilCachedFonts; - FreeAndNilCachedBounds; - inherited; -end; - -class function TdxLayoutControlReportLink.Aggregable: Boolean; -begin - Result := True; -end; - -function TdxLayoutControlReportLink.GetRebuildOnPageParamsChange(AUpdateCodes: TdxPrinterPageUpdateCodes): Boolean; -begin - Result := ([ucMarginLeft, ucMarginRight] * AUpdateCodes <> []) and OptionsSize.AutoWidth; -end; - -procedure TdxLayoutControlReportLink.InternalRestoreDefaults; -begin - inherited; - OptionsSize.RestoreDefaults; -end; - -procedure TdxLayoutControlReportLink.CacheControlsBounds; - - procedure EnumItems(AGroup: TdxLayoutGroupViewInfo); - var - I: Integer; - ControlViewInfo: TdxLayoutItemControlViewInfo; - begin - for I := 0 to AGroup.ItemViewInfoCount - 1 do - if AGroup.ItemViewInfos[I] is TdxLayoutItemViewInfo then - begin - ControlViewInfo := TdxLayoutItemViewInfo(AGroup.ItemViewInfos[I]).ControlViewInfo; - if ControlViewInfo <> nil then - AddBoundsToCache(ControlViewInfo.Control, ControlViewInfo.ControlBounds); - end - else - if AGroup.ItemViewInfos[I] is TdxLayoutGroupViewInfo then - EnumItems(TdxLayoutGroupViewInfo(AGroup.ItemViewInfos[I])) - end; - -begin - try - TcxControlAccess(LayoutControl).FBounds := AvailableBounds; - LayoutControl.ViewInfo.Calculate; - EnumItems(LayoutControl.ViewInfo.ItemsViewInfo); - finally - TcxControlAccess(LayoutControl).FBounds := NullRect; - LayoutControl.ViewInfo.Calculate; - end; -end; - -procedure TdxLayoutControlReportLink.ConstructReport(AReportCells: TdxReportCells); -begin - inherited ConstructReport(AReportCells); - PostCheckEmbeddedControls; -end; - -procedure TdxLayoutControlReportLink.PostCheckEmbeddedControls; -var - I: Integer; - LayoutItem: TdxLayoutItem; - ReportItem: TdxReportCell; - ADataItem: TdxReportVisualItem; - BottomPosition: Integer; - NeedAddBorder: Boolean; - - procedure DoCheckBounds(ACell: TdxReportCell; ATopOffset: Integer); - var - I: Integer; - begin - for I := 0 to ACell.CellCount - 1 do - DoCheckBounds(ACell.Cells[I], ATopOffset + ACell.Cells[I].Top); - for I := 0 to ACell.DataItemCount - 1 do - begin - if ADataItem = nil then - ADataItem := ACell.DataItems[I]; - NeedAddBorder := NeedAddBorder or - (ACell.DataItems[I].BoundsRect.Bottom + ATopOffset > BottomPosition); - end; - end; - -begin - for I := 0 to CachedBoundsCount - 1 do - begin - ADataItem := nil; - NeedAddBorder := False; - if not CachedBoundsItem[I].EmbeddedLink then Continue; - LayoutItem := LayoutControl.FindItem(TControl(CachedBoundsItem[I].Component)); - Assert(LayoutItem <> nil); - ReportItem := FindReportItemByLayoutItem(LayoutItem); - Assert(ReportItem <> nil); - BottomPosition := ReportItem.Cells[0].Height; - DoCheckBounds(ReportItem.Cells[0], 0); - if (ADataItem <> nil) and NeedAddBorder then - with TdxReportCellString(ReportItem.AddDataItem(TdxReportCellString)) do - begin - BoundsRect := ReportItem.Cells[0].BoundsRect; - Width := Width - 1; - CellSides := [csBottom]; - BorderClass := ADataItem.BorderClass; - BorderColor := ADataItem.BorderColor; - end; - end; -end; - -procedure TdxLayoutControlReportLink.PrepareConstruct; -begin - ClearCachedBounds; - LayoutControl.ViewInfo.Calculate; - CacheControlsBounds; - inherited; - ClearCachedFonts; - PrepareLookAndFeels; -end; - -procedure TdxLayoutControlReportLink.PrepareLookAndFeels; - - procedure CreateReportLookAndFeel(ALayoutLookAndFeel: TdxCustomLayoutLookAndFeel); - var - ReportLookAndFeel: TdxPSReportGroupLookAndFeel; - begin - if ALayoutLookAndFeel = nil then Exit; - - AddCaptionOptionsFontToCache(ALayoutLookAndFeel.GroupOptions.CaptionOptions); - AddCaptionOptionsFontToCache(ALayoutLookAndFeel.ItemOptions.CaptionOptions); - - with LayoutLookAndFeelProducers[ALayoutLookAndFeel] do - begin - ReportLookAndFeel := CreateGroupLookAndFeel(ReportLookAndFeelClass, False); - InitializeReportLookAndFeel(ReportLookAndFeel); - ReportLookAndFeel.Prepare(ScreenDC); - end; - end; - - procedure CreateReportLookAndFeels(ALookAndFeels: TList); - var - I: Integer; - begin - for I := 0 to ALookAndFeels.Count - 1 do - CreateReportLookAndFeel(TdxCustomLayoutLookAndFeel(ALookAndFeels[I])); - end; - - procedure EnumerateLayoutGroup(AGroup: TdxLayoutGroup; ALookAndFeels: TList); - var - I: Integer; - Child: TdxCustomLayoutItem; - LookAndFeel: TdxCustomLayoutLookAndFeel; - begin - for I := 0 to AGroup.Count - 1 do - begin - Child := AGroup.Items[I]; - if Child.Visible then - begin - LookAndFeel := Child.LookAndFeel; - if ALookAndFeels.IndexOf(LookAndFeel) = -1 then - ALookAndFeels.Add(LookAndFeel); - if Child is TdxLayoutGroup then - EnumerateLayoutGroup(TdxLayoutGroup(Child), ALookAndFeels); - end; - end; - end; - -var - LookAndFeels: TList; -begin - LookAndFeels := TList.Create; - try - LookAndFeels.Add(LayoutControl.LookAndFeel); - LookAndFeels.Add(LayoutControl.Items.LookAndFeel); - EnumerateLayoutGroup(LayoutControl.Items, LookAndFeels); - - CreateReportLookAndFeels(LookAndFeels); - finally - LookAndFeels.Free; - end; -end; - -procedure TdxLayoutControlReportLink.RepositionControls; -begin - Producers[LayoutControl].Reposition; -end; - -procedure TdxLayoutControlReportLink.AddHiddenItem(ATreeView: TTreeView; - AParent: TTreeNode; AnItem: TdxCustomLayoutItem); -var - Index, I: Integer; -begin - AParent := AddNode(ATreeView, AParent, AnItem, not FindHiddenComponent(AnItem, Index)); - if AnItem is TdxLayoutGroup then - for I := 0 to TdxLayoutGroup(AnItem).VisibleCount - 1 do - AddHiddenItem(ATreeView, AParent, TdxLayoutGroup(AnItem).VisibleItems[I]); -end; - -procedure TdxLayoutControlReportLink.AddItem(ATreeView: TTreeView; - AParent: TTreeNode; AnItem: TdxCustomLayoutItem); -var - Index, I: Integer; -begin - if not FindHiddenComponent(AnItem, Index) then - begin - AParent := AddNode(ATreeView, AParent, AnItem, not FindExcludedComponent(AnItem, Index)); - if AnItem is TdxLayoutGroup then - for I := 0 to TdxLayoutGroup(AnItem).VisibleCount - 1 do - AddItem(ATreeView, AParent, TdxLayoutGroup(AnItem).VisibleItems[I]); - end; -end; - -function TdxLayoutControlReportLink.IsComponentEditable(AComponent: TComponent): Boolean; -begin - Result := inherited IsComponentEditable(AComponent) and (AComponent <> LayoutControl.Items); -end; - -procedure TdxLayoutControlReportLink.LoadControlsTree(ATreeView: TTreeView); -begin - ATreeView.Items.Clear; - if Container <> nil then - AddItem(ATreeView, AddNode(ATreeView, nil, Container, True), RootLayoutGroup); -end; - -procedure TdxLayoutControlReportLink.LoadHiddenControlsTree(ATreeView: TTreeView); -begin - ATreeView.Items.Clear; - if Container <> nil then - AddHiddenItem(ATreeView, AddNode(ATreeView, nil, Container, True), RootLayoutGroup); -end; - -function TdxLayoutControlReportLink.AddBoundsToCache( - AComponent: TComponent; const ABounds: TRect): Integer; -var - AItem: TdxLCBoundsCacheItem; -begin - AItem := TdxLCBoundsCacheItem.Create; - AItem.Component := AComponent; - AItem.Bounds := ABounds; - Result := CachedBounds.Add(AItem); -end; - -function TdxLayoutControlReportLink.AddCaptionOptionsFontToCache(ACaptionOptions: TdxLayoutLookAndFeelCaptionOptions): Integer; -var - Item: PdxPSLayoutCacheFontItem; -begin - New(Item); - Item^.CaptionOptions := ACaptionOptions; - Item^.FontIndex := GetPreparedFontIndex(ACaptionOptions); - CachedFonts.Add(Item); - - Result := Item^.FontIndex; -end; - -procedure TdxLayoutControlReportLink.ClearCachedBounds; -var - I: Integer; -begin - for I := 0 to CachedBoundsCount - 1 do - CachedBoundsItem[I].Free; - CachedBounds.Clear; -end; - -procedure TdxLayoutControlReportLink.ClearCachedFonts; -var - I: Integer; -begin - for I := 0 to CachedFontItemCount - 1 do - Dispose(PdxPSLayoutCacheFontItem(CachedFontItems[I])); - CachedFonts.Clear; -end; - -function TdxLayoutControlReportLink.FindBoundsByComponent( - AComponent: TComponent; var ABounds: TRect; ASetEmbedded: Boolean): Boolean; -var - I: Integer; -begin - Result := AComponent <> nil; - if not Result then Exit; - for I := 0 to CachedBoundsCount - 1 do - if AComponent = CachedBoundsItem[I].Component then - begin - ABounds := CachedBoundsItem[I].Bounds; - CachedBoundsItem[I].EmbeddedLink := ASetEmbedded; - Exit; - end; - Result := False; -end; - -function TdxLayoutControlReportLink.FindFontIndexByCaptionOptions(ACaptionOptions: TdxLayoutLookAndFeelCaptionOptions): Integer; -var - I: Integer; - Item: PdxPSLayoutCacheFontItem; -begin - for I := 0 to CachedFontItemCount - 1 do - begin - Item := CachedFontItems[I]; - if Item^.CaptionOptions = ACaptionOptions then - begin - Result := Item^.FontIndex; - Exit; - end; - end; - Result := 0; -end; - -procedure TdxLayoutControlReportLink.FreeAndNilCachedBounds; -begin - ClearCachedBounds; - FreeAndNil(FCachedBounds) -end; - -procedure TdxLayoutControlReportLink.FreeAndNilCachedFonts; -begin - ClearCachedFonts; - FreeAndNil(FCachedFonts); -end; - -procedure TdxLayoutControlReportLink.CreateOptions; -begin - inherited; - FOptionsSize := GetOptionsSizeClass.Create(Self); -end; - -procedure TdxLayoutControlReportLink.DestroyOptions; -begin - FreeAndNil(FOptionsSize); - inherited; -end; - -function TdxLayoutControlReportLink.GetOptionsPaginationClass: TdxCustomContainerReportLinkOptionsPaginationClass; -begin - Result := TdxLayoutControlReportLinkOptionsPagination; -end; - -function TdxLayoutControlReportLink.GetOptionsSizeClass: TdxLayoutControlReportLinkOptionsSizeClass; -begin - Result := TdxLayoutControlReportLinkOptionsSize; -end; - -function TdxLayoutControlReportLink.GetOptionsTransparentClass: TdxCustomContainerReportLinkOptionsTransparentClass; -begin - Result := TdxLayoutControlReportLinkOptionsTransparent; -end; - -function TdxLayoutControlReportLink.FindReportGroupLookAndFeel(ALayoutLookAndFeel: TdxCustomLayoutLookAndFeel): TdxPSReportGroupLookAndFeel; -begin - Result := ReportCells.FindGroupLookAndFeelByData(ALayoutLookAndFeel) -end; - -function TdxLayoutControlReportLink.FindReportItemByLayoutItem(ALayoutItem: TdxCustomLayoutItem): TdxReportCell; - - function SearchCell(ACell: TdxReportCell): TdxReportCell; - var - I: Integer; - begin - Result := ACell; - if TObject(Result.Data) = ALayoutItem then Exit; - - for I := 0 to ACell.CellCount - 1 do - begin - Result := SearchCell(ACell[I]); - if Result <> nil then Exit; - end; - Result := nil; - end; - -begin - Result := SearchCell(RootCell); -end; - -procedure TdxLayoutControlReportLink.GetLayoutItemList(AControl: TdxLayoutControl; - AnItems: TList); - - procedure EnumerateLayoutGroup(AGroup: TdxLayoutGroup); - var - I: Integer; - Item: TdxCustomLayoutItem; - begin - for I := 0 to AGroup.VisibleCount - 1 do - begin - Item := AGroup.VisibleItems[I]; -// if IsComponentProcessed(Item) then - begin - AnItems.Add(Item); - if Item is TdxLayoutGroup then - EnumerateLayoutGroup(TdxLayoutGroup(Item)); - end; - end; - end; - -begin - if IsComponentProcessed(AControl.Items) then - begin - AnItems.Add(AControl.Items); - EnumerateLayoutGroup(AControl.Items); - end; -end; - -function TdxLayoutControlReportLink.GetPreparedFontIndex(ACaptionOptions: TdxLayoutLookAndFeelCaptionOptions): Integer; -begin - with PreparationFont do - begin - Assign(ACaptionOptions.GetFont(LayoutControl)); - Color := ACaptionOptions.GetTextColor; - if ACaptionOptions.HotTrack and (htsUnderlineCold in ACaptionOptions.HotTrackStyles) then - Style := Style + [fsUnderline]; - if not dxIsTrueTypeFont(PreparationFont) then - Name := Font.Name; - end; - Result := AddFontToPool(PreparationFont); -end; - -// IdxReportLinkController - -function TdxLayoutControlReportLink.GetControlSiteBounds(AControl: TControl): TRect; -var - LayoutItem: TdxLayoutItem; - ReportItem: TdxReportCell; -begin - if not FindBoundsByComponent(AControl, Result, True) then - begin - LayoutItem := LayoutControl.FindItem(AControl); - Assert(LayoutItem <> nil); - ReportItem := FindReportItemByLayoutItem(LayoutItem); - Assert(ReportItem <> nil); - Result := (ReportItem as TdxReportLayoutItem).ControlBounds; - end; -end; - -function TdxLayoutControlReportLink.GetAvailableBounds: TRect; -begin - Result := LayoutControl.ClientBounds; - if OptionsSize.AutoWidth then - with RealPrinterPage.PaintRectPixels do - begin - Result.Left := 0; - Result.Right := Right - Left - 1; - end; -end; - -function TdxLayoutControlReportLink.GetCachedBoundsCount: Integer; -begin - Result := CachedBounds.Count; -end; - -function TdxLayoutControlReportLink.GetCachedBoundsItem(Index: Integer): TdxLCBoundsCacheItem; -begin - Result := TdxLCBoundsCacheItem(CachedBounds[Index]); -end; - -function TdxLayoutControlReportLink.GetCachedFontItem(Index: Integer): PdxPSLayoutCacheFontItem; -begin - Result := FCachedFonts[Index]; -end; - -function TdxLayoutControlReportLink.GetCachedFontItemCount: Integer; -begin - Result := FCachedFonts.Count; -end; - -function TdxLayoutControlReportLink.GetCurrentHost: TdxReportCell; -begin - Result := FindReportItemByLayoutItem(CurrentLayoutItem); -end; - -function TdxLayoutControlReportLink.GetLayoutControl: TdxLayoutControl; -begin - Result := TdxLayoutControl(Container); -end; - -function TdxLayoutControlReportLink.GetLayoutItemProducer(LayoutItem: TdxCustomLayoutItem): TdxPSCustomLayoutItemProducer; -begin - Result := LayoutItemProducerCache[dxPSLayoutItemProducerFactory[LayoutItem], LayoutItem]; -end; - -function TdxLayoutControlReportLink.GetLayoutLookAndFeelProducer(LayoutLookAndFeel: TdxCustomLayoutLookAndFeel): TdxPSLayoutLookAndFeelProducer; -begin - Result := LayoutLookAndFeelProducerCache[dxPSLayoutLookAndFeelProducerFactory[LayoutLookAndFeel], LayoutLookAndFeel]; -end; - -function TdxLayoutControlReportLink.GetOptionsPagination: TdxLayoutControlReportLinkOptionsPagination; -begin - Result := inherited OptionsPagination as TdxLayoutControlReportLinkOptionsPagination; -end; - -function TdxLayoutControlReportLink.GetOptionsTransparent: TdxLayoutControlReportLinkOptionsTransparent; -begin - Result := inherited OptionsTransparent as TdxLayoutControlReportLinkOptionsTransparent; -end; - -function TdxLayoutControlReportLink.GetRootLayoutGroup: TdxLayoutGroup; -begin - Result := LayoutControl.Items; -end; - -procedure TdxLayoutControlReportLink.SetOptionsPagination(Value: TdxLayoutControlReportLinkOptionsPagination); -begin - inherited OptionsPagination := Value; -end; - -procedure TdxLayoutControlReportLink.SetOptionsSize(Value: TdxLayoutControlReportLinkOptionsSize); -begin - OptionsSize.Assign(Value); -end; - -procedure TdxLayoutControlReportLink.SetOptionsTransparent(Value: TdxLayoutControlReportLinkOptionsTransparent); -begin - inherited OptionsTransparent := Value; -end; - -{ TdxPSLayoutControlDesignWindow } - -procedure TdxPSLayoutControlDesignWindow.DoInitialize; -begin - inherited; - - with LayoutReportLink.OptionsPagination do - begin - chbxPaginateByGroups.Checked := Groups; - chbxPaginateByItems.Checked := Items; - end; - chbxPaginateByGroups.Visible := True; - chbxPaginateByItems.Visible := True; - - with LayoutReportLink.OptionsTransparent do - begin - chbxTransparentGroups.Checked := Groups; - chbxTransparentItems.Checked := Items; - end; - chbxTransparentGroups.Visible := True; - chbxTransparentItems.Visible := True; - - chbxAutoWidth.Checked := LayoutReportLink.OptionsSize.AutoWidth; - chbxAutoWidth.Visible := True; - lblSize.Visible := True; - bvlSize.Visible := True; - imgSize.Visible := True; -end; - -procedure TdxPSLayoutControlDesignWindow.SetOptionsPaginationByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if LockControlsUpdate then Exit; - - if AnIndex > 1 then - begin - case AnIndex of - 2: LayoutReportLink.OptionsPagination.Groups := AValue; - 3: LayoutReportLink.OptionsPagination.Items := AValue; - end; - Modified := True; - end - else - inherited; -end; - -procedure TdxPSLayoutControlDesignWindow.SetOptionsSizeByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if LockControlsUpdate then Exit; - - inherited; - if AnIndex = 0 then - begin - LayoutReportLink.OptionsSize.AutoWidth := AValue; - Modified := True; - end; -end; - -procedure TdxPSLayoutControlDesignWindow.SetOptionsTransparentByIndex(AnIndex: Integer; - AValue: Boolean); -begin - if LockControlsUpdate then Exit; - - if AnIndex > 3 then - begin - case AnIndex of - 4: LayoutReportLink.OptionsTransparent.Groups := AValue; - 5: LayoutReportLink.OptionsTransparent.Items := AValue; - end; - Modified := True; - end - else - inherited; -end; - -procedure TdxPSLayoutControlDesignWindow.InitializeControlsTree; -var - Root: TTreeNode; -begin - inherited; - Root := TreeView_GetRoot(tvControls); - if (Root <> nil) and (Root.Count <> 0) then - Root[0].Expand(False); -end; - -procedure TdxPSLayoutControlDesignWindow.InitializeHiddenControlsTree; -var - Root: TTreeNode; -begin - inherited; - Root := TreeView_GetRoot(tvHiddenControls); - if (Root <> nil) and (Root.Count <> 0) then - Root[0].Expand(False); -end; - -function TdxPSLayoutControlDesignWindow.IsBoldNode(ANode: TTreeNode): Boolean; -begin - Result := inherited IsBoldNode(ANode) or (TreeView_GetNodeObject(ANode).Component is TdxLayoutGroup); -end; - -function TdxPSLayoutControlDesignWindow.GetLayoutReportLink: TdxLayoutControlReportLink; -begin - Result := TdxLayoutControlReportLink(ReportLink); -end; - -procedure RegisterAssistants; -begin - TdxPSLayoutLookAndFeelProducer.Register; - TdxPSLayoutStandardLookAndFeelProducer.Register; - TdxPSLayoutOfficeLookAndFeelProducer.Register; - TdxPSLayoutWebLookAndFeelProducer.Register; - - TdxPSCustomLayoutItemProducer.Register; - TdxPSLayoutGroupProducer.Register; - TdxPSLayoutItemProducer.Register; - - TdxPSLayoutControlProducer.Register; - - TdxPSNativeLayoutControlProducer.Register; -end; - -procedure RegisterItems; -begin - TdxReportLayoutControlHost.Register; - TdxCustomReportLayoutItem.Register; - TdxReportLayoutGroup.Register; - TdxReportLayoutItem.Register; -end; - -procedure UnregisterAssistants; -begin - TdxPSNativeLayoutControlProducer.Unregister; - - TdxPSLayoutControlProducer.Unregister; - - TdxPSLayoutItemProducer.Unregister; - TdxPSLayoutGroupProducer.Unregister; - TdxPSCustomLayoutItemProducer.Unregister; - - TdxPSLayoutWebLookAndFeelProducer.Unregister; - TdxPSLayoutOfficeLookAndFeelProducer.Unregister; - TdxPSLayoutStandardLookAndFeelProducer.Unregister; - TdxPSLayoutLookAndFeelProducer.Unregister; - - TdxPSLayoutItemProducerFactory.ReleaseInstance; - TdxPSLayoutLookAndFeelProducerFactory.ReleaseInstance; -end; - -procedure UnregisterItems; -begin - TdxReportLayoutItem.Unregister; - TdxReportLayoutGroup.Unregister; - TdxCustomReportLayoutItem.Unregister; - TdxReportLayoutControlHost.Unregister; -end; - -initialization - RegisterAssistants; - RegisterItems; - - dxPSRegisterReportLink(TdxLayoutControlReportLink, TdxLayoutControl, TdxPSLayoutControlDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxLayoutControlReportLink, TdxLayoutControl, TdxPSLayoutControlDesignWindow); - - UnregisterItems; - UnregisterAssistants; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxLCLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxLCLnkReg.pas deleted file mode 100644 index ee8097d9..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxLCLnkReg.pas +++ /dev/null @@ -1,61 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxLCLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI9} - DesignIntf, -{$ENDIF} - Classes, dxPSdxLCLnk; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterNoIcon([TdxLayoutControlReportLink]); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxMVLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSdxMVLnk.dfm deleted file mode 100644 index a7f199f9..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxMVLnk.dfm +++ /dev/null @@ -1,828 +0,0 @@ -object dxMVReportLinkDesignWindow: TdxMVReportLinkDesignWindow - Left = 386 - Top = 219 - BorderStyle = bsDialog - Caption = 'dxMVReportLinkDesignWindow' - ClientHeight = 414 - ClientWidth = 597 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 589 - Height = 373 - ActivePage = tshColors - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object Bevel11: TBevel - Left = 40 - Top = 13 - Width = 242 - Height = 4 - Shape = bsBottomLine - end - object imgShow: TImage - Left = 9 - Top = 34 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblShow: TLabel - Left = 6 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel16: TBevel - Left = 90 - Top = 102 - Width = 193 - Height = 4 - Shape = bsBottomLine - end - object chbxShowGrid: TCheckBox - Tag = 3 - Left = 90 - Top = 119 - Width = 173 - Height = 17 - Caption = '&Grid' - TabOrder = 3 - OnClick = ShowClick - end - object chbxShowGroupFooterGrid: TCheckBox - Tag = 5 - Left = 90 - Top = 163 - Width = 173 - Height = 17 - Caption = 'Group Footers Grid' - TabOrder = 5 - OnClick = ShowClick - end - object chbxShowHeaders: TCheckBox - Left = 90 - Top = 31 - Width = 173 - Height = 17 - Caption = '&Headers' - TabOrder = 0 - OnClick = ShowClick - end - object chbxShowFooters: TCheckBox - Tag = 1 - Left = 90 - Top = 53 - Width = 173 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 1 - OnClick = ShowClick - end - object chbxShowPreviewGrid: TCheckBox - Tag = 4 - Left = 90 - Top = 141 - Width = 173 - Height = 17 - Caption = 'Nodes Grid' - TabOrder = 4 - OnClick = ShowClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 12 - Left = 90 - Top = 75 - Width = 173 - Height = 17 - Caption = 'ExpandButtons' - TabOrder = 2 - OnClick = ShowClick - end - object lblPreviewWindow: TStaticText - Left = 295 - Top = 0 - Width = 88 - Height = 12 - AutoSize = False - Caption = 'Preview' - TabOrder = 6 - end - end - object tshColors: TTabSheet - Caption = '&Color' - object lblGridLineColor: TLabel - Left = 11 - Top = 304 - Width = 74 - Height = 13 - Caption = '&Grid Line color :' - end - object bvlGridLineColorHolder: TBevel - Left = 129 - Top = 299 - Width = 152 - Height = 22 - Visible = False - end - object lblDrawMode: TLabel - Left = 8 - Top = 21 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - end - object gbxFixedTransparent: TGroupBox - Left = 6 - Top = 164 - Width = 283 - Height = 126 - Caption = ' ' - TabOrder = 4 - object lblHeaderColor: TLabel - Left = 5 - Top = 49 - Width = 71 - Height = 13 - Caption = '&Header color : ' - end - object lblFooterColor: TLabel - Left = 5 - Top = 75 - Width = 65 - Height = 13 - Caption = 'Footer color :' - end - object bvlHeaderColorHolder: TBevel - Left = 123 - Top = 44 - Width = 152 - Height = 22 - Visible = False - end - object bvlFooterColorHolder: TBevel - Left = 123 - Top = 70 - Width = 152 - Height = 22 - Visible = False - end - object lblGroupNodeColor: TLabel - Left = 5 - Top = 101 - Width = 87 - Height = 13 - Caption = 'Group&Node color :' - end - object bvlGroupNodeColorHolder: TBevel - Left = 123 - Top = 96 - Width = 152 - Height = 22 - Visible = False - end - object lblLevelCaptionColor: TLabel - Left = 5 - Top = 23 - Width = 100 - Height = 13 - Caption = 'CaptionNode Color : ' - end - object bvlCaptionColorHolder: TBevel - Left = 123 - Top = 18 - Width = 152 - Height = 22 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 6 - Top = 53 - Width = 283 - Height = 104 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 5 - Top = 23 - Width = 29 - Height = 13 - Caption = 'C&olor:' - end - object bvlColorHolder: TBevel - Left = 123 - Top = 18 - Width = 152 - Height = 22 - Visible = False - end - object lblPreviewColor: TLabel - Left = 5 - Top = 77 - Width = 71 - Height = 13 - Caption = '&Preview color :' - end - object bvlPreviewColorHolder: TBevel - Tag = 1 - Left = 123 - Top = 72 - Width = 152 - Height = 22 - Visible = False - end - object lblEvenColor: TLabel - Left = 5 - Top = 47 - Width = 59 - Height = 13 - Caption = 'Even Color :' - end - object bvlEvenColorHolder: TBevel - Left = 123 - Top = 43 - Width = 152 - Height = 22 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 17 - Top = 51 - Width = 15 - Height = 17 - Caption = ' Tr&ansparent ' - TabOrder = 1 - OnClick = chbxTransparentClick - end - object chbxFixedTransparent: TCheckBox - Tag = 1 - Left = 17 - Top = 163 - Width = 15 - Height = 17 - Caption = ' Fi&xed transparent ' - TabOrder = 3 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 89 - Top = 15 - Width = 193 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 32 - Top = 52 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stFixedTransparent: TStaticText - Left = 32 - Top = 164 - Width = 98 - Height = 17 - Caption = ' Fixed Transparent ' - FocusControl = chbxFixedTransparent - TabOrder = 6 - OnClick = stFixedTransparentClick - end - end - object tshFonts: TTabSheet - Caption = '&Font' - object btnChangeFont: TButton - Left = 6 - Top = 170 - Width = 116 - Height = 23 - Caption = 'Change Fo&nt ...' - TabOrder = 1 - OnClick = btnChangeFontClick - end - object lbxFonts: TListBox - Left = 6 - Top = 15 - Width = 282 - Height = 148 - Style = lbOwnerDrawFixed - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ItemHeight = 16 - MultiSelect = True - ParentFont = False - ParentShowHint = False - PopupMenu = pmChangeFont - ShowHint = True - TabOrder = 0 - OnClick = lbxFontsClick - OnDblClick = lbxFontsDblClick - OnDrawItem = lbxFontsDrawItem - OnKeyDown = lbxFontsKeyDown - OnMouseMove = lbxFontsMouseMove - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Bevel12: TBevel - Left = 57 - Top = 12 - Width = 228 - Height = 4 - Shape = bsBottomLine - end - object Bevel13: TBevel - Left = 92 - Top = 83 - Width = 192 - Height = 4 - Shape = bsBottomLine - end - object imgSelection: TImage - Left = 9 - Top = 30 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object imgNodeExpanding: TImage - Left = 9 - Top = 104 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F877778880F87777777778078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblSelection: TLabel - Left = 6 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object lblExpanding: TLabel - Left = 6 - Top = 79 - Width = 78 - Height = 13 - Caption = 'Node Expanding' - end - object lblRefinements: TLabel - Left = 7 - Top = 215 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlGraphic: TBevel - Left = 76 - Top = 220 - Width = 208 - Height = 4 - Shape = bsBottomLine - end - object imgGraphics: TImage - Left = 9 - Top = 241 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblLookAndFeel: TLabel - Left = 6 - Top = 148 - Width = 67 - Height = 13 - Caption = 'Look And Feel' - end - object img3DEffects: TImage - Left = 9 - Top = 172 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel15: TBevel - Left = 83 - Top = 152 - Width = 200 - Height = 4 - Shape = bsBottomLine - end - object chbxTransparentColumnGraphic: TCheckBox - Tag = 7 - Left = 90 - Top = 239 - Width = 188 - Height = 17 - Caption = 'Transparent Column &Graphics' - TabOrder = 5 - OnClick = ShowClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 8 - Left = 90 - Top = 261 - Width = 188 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 6 - OnClick = ShowClick - end - object chbxOnlySelected: TCheckBox - Left = 90 - Top = 31 - Width = 188 - Height = 17 - Caption = 'Only &selected' - TabOrder = 0 - OnClick = chbxOnlySelectedClick - end - object chbxExtendedSelect: TCheckBox - Left = 90 - Top = 53 - Width = 188 - Height = 17 - Caption = '&Extended select' - TabOrder = 1 - OnClick = chbxExtendedSelectClick - end - object chbxAutoNodesExpand: TCheckBox - Left = 90 - Top = 102 - Width = 188 - Height = 17 - Caption = '&Auto Node Expanded' - TabOrder = 2 - OnClick = chbxAutoNodesExpandClick - end - object chbxUse3DEffects: TCheckBox - Tag = 9 - Left = 90 - Top = 171 - Width = 188 - Height = 17 - Caption = '&Use 3D Effects' - TabOrder = 3 - OnClick = ShowClick - end - object chbxUseSoft3D: TCheckBox - Tag = 10 - Left = 90 - Top = 193 - Width = 188 - Height = 17 - Caption = 'Soft &3D' - TabOrder = 4 - OnClick = ShowClick - end - object chbxCheckMarksAsText: TCheckBox - Tag = 11 - Left = 90 - Top = 305 - Width = 173 - Height = 17 - Caption = 'Display CheckMarks as Text' - TabOrder = 8 - OnClick = ShowClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 6 - Left = 90 - Top = 283 - Width = 173 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 7 - OnClick = ShowClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 4 - object lblPreviewLineCount: TLabel - Left = 90 - Top = 82 - Width = 99 - Height = 13 - Caption = 'Preview &Line Count: ' - end - object bvlPreviewLineCountHolder: TBevel - Left = 193 - Top = 78 - Width = 81 - Height = 21 - Visible = False - end - object lblPreview: TLabel - Left = 6 - Top = 8 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object Bevel1: TBevel - Left = 52 - Top = 13 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object imgPreview: TImage - Left = 9 - Top = 30 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F888F7FF888F7F8888F7F07DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7F888F7FF888F7FF888F7F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxShowPreview: TCheckBox - Tag = 2 - Left = 90 - Top = 31 - Width = 97 - Height = 17 - Caption = 'Pre&view' - TabOrder = 0 - OnClick = ShowClick - end - object chbxAutoCalcPreviewLines: TCheckBox - Left = 90 - Top = 53 - Width = 169 - Height = 17 - Caption = '&Auto Calc Preview Lines' - TabOrder = 1 - OnClick = chbxAutoCalcPreviewLinesClick - end - end - end - object pnlPreview: TPanel - Left = 303 - Top = 44 - Width = 281 - Height = 324 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 1 - object dxMVPreview: TdxMasterView - Left = 5 - Top = 5 - Width = 271 - Height = 313 - Enabled = False - TabOrder = 0 - Visible = False - OptionsView = [movAutoColumnWidth, movHideFocusRect, movHideSelection, movKeepColumnWidths, movTransparentDragAndDrop, movUseBitmap, movUseBitmapToDrawPreview] - ScrollBars = sbNone - object mvsCaptionStyle: TdxMasterViewStyle - end - object mvsContentStyle: TdxMasterViewStyle - end - object mvsFooterStyle: TdxMasterViewStyle - end - object mvsGroupStyle: TdxMasterViewStyle - end - object mvsHeaderStyle: TdxMasterViewStyle - end - object mvsPreviewStyle: TdxMasterViewStyle - end - object mvsAnotherContentStyle: TdxMasterViewStyle - end - end - end - object pmChangeFont: TPopupMenu - OnPopup = pmChangeFontPopup - Left = 4 - Top = 383 - object miChangeFont: TMenuItem - Caption = 'Change Fo&nt ...' - Default = True - ShortCut = 16454 - OnClick = btnChangeFontClick - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxMVLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxMVLnk.pas deleted file mode 100644 index 88d37210..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxMVLnk.pas +++ /dev/null @@ -1,3618 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxMVLnk; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, ExtCtrls, ComCtrls, Menus, Db, dxMasterView, dxMasterViewColumns, - dxBase, dxPSCore, dxPSGlbl, dxPSMD, cxDrawTextUtils; - -type - TdxMasterViewPaintOption = - (mvpoHeaders, mvpoFooters, mvpoPreview, mvpoGrid, mvpoPreviewGrid, - mvpoGroupFooterGrid, mvpoFlatCheckMarks, mvpoTransparentColumnGraphic, - mvpoGraphicAsText, mvpo3DEffects, mvpoSoft3D, mvpoCheckMarksAsText, mvpoExpandButtons); - TdxMasterViewPaintOptions = set of TdxMasterViewPaintOption; - TdxMasterViewLinkCellType = (mvctUnknown, mvctCell, mvctFooter, mvctHeader, mvctPreview); - TdxMasterViewDrawMode = (mvdmStrict, mvdmOddEven, mvdmBorrowSource); - - PdxMasterViewLevel = ^TdxMasterViewLevel; - PdxMasterViewColumn = ^TdxMasterViewColumn; - PdxMasterViewNode = ^TdxMasterViewNode; - - TdxMasterViewColumnHelperClass = class of TdxMasterViewColumnHelper; - - TdxMasterViewColumnHelper = class(TdxCustomClassMapItem) - protected - class procedure GetImageLists(AColumn: TdxMasterViewColumn; AProc: TdxPSGetImageListProc); virtual; - public - class function ColumnClass: TdxMasterViewColumnClass; virtual; - class function PairClass: TClass; override; - class procedure Register; - end; - - TdxMasterViewImageColumnHelper = class(TdxMasterViewColumnHelper) - protected - class procedure GetImageLists(AColumn: TdxMasterViewColumn; AProc: TdxPSGetImageListProc); override; - public - class function ColumnClass: TdxMasterViewColumnClass; override; - end; - - TdxMVReportLinkCustomDrawCellEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; ANode: TdxMasterViewNode; - AColumn: TdxMasterViewColumn; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean) of object; - - TdxMVReportLinkCustomDrawFooterCellEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; ANode: TdxMasterViewNode; - AColumn: TdxMasterViewColumn; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean) of object; - - TdxMVReportLinkCustomDrawHeaderCellEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; AColumn: TdxMasterViewColumn; - var AText: string; var AColor: TColor; AFont: TFont; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ASorted: TdxCellSortOrder; var ADone: Boolean) of object; - - TdxMVReportLinkCustomDrawPreviewCellEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; ANode: TdxMasterViewNode; - var AText: string; var AColor: TColor; AFont: TFont; - var ADone: Boolean) of object; - - TdxMasterViewReportLink = class(TBasedxReportLink) - private - FAutoNodesExpand: Boolean; - FCaptionColor: TColor; - FCaptionNodeFont: TFont; - FDrawMode: TdxMasterViewDrawMode; - FEvenColor: TColor; - FEvenFont: TFont; - FExtendedSelect: Boolean; - FFixedTransparent: Boolean; - FFooterColor: TColor; - FFooterFont: TFont; - FGridLineColor: TColor; - FGroupNodeFont: TFont; - FGroupNodeColor: TColor; - FHeaderColor: TColor; - FHeaderFont: TFont; - FOddFont: TFont; - FOnlySelected: Boolean; - FOptions: TdxMasterViewPaintOptions; - FPreviewColor: TColor; - FPreviewFont: TFont; - FPreviewLineCount: Integer; - FSupportedCustomDraw: Boolean; - - FOnCustomDrawCell: TdxMVReportLinkCustomDrawCellEvent; - FOnCustomDrawFooterCell: TdxMVReportLinkCustomDrawFooterCellEvent; - FOnCustomDrawHeaderCell: TdxMVReportLinkCustomDrawHeaderCellEvent; - FOnCustomDrawPreviewCell: TdxMVReportLinkCustomDrawPreviewCellEvent; - - FColumnPlaces: TList; - FCustomDrawFontChanged: Boolean; - FDelimitersCells: TList; - FFontIndexes: TList; - FFonts: TList; - FIndent: Integer; - FLevels: TList; - FNodes: TList; - FSaveFont: TFont; - FSelectedNodes: TList; - - FFooterLineHeight: Integer; - FGroupNodeHeight: Integer; - FHeaderLineHeight: Integer; - FLevelCaptionHeight: Integer; - FLineHeight: Integer; - FPreviewFullHeight: Integer; - FPreviewLineHeight: Integer; - function GetOddColor: TColor; - function GetOptions: TdxMasterViewPaintOptions; - procedure SetAutoNodesExpand(Value: Boolean); - procedure SetCaptionColor(Value: TColor); - procedure SetCaptionNodeFont(Value: TFont); - procedure SetDrawMode(Value: TdxMasterViewDrawMode); - procedure SetEvenColor(Value: TColor); - procedure SetEvenFont(Value: TFont); - procedure SetExtendedSelect(Value: Boolean); - procedure SetFixedTransparent(Value: Boolean); - procedure SetFooterFont(Value: TFont); - procedure SetGridLineColor(Value: TColor); - procedure SetFooterColor(Value: TColor); - procedure SetGroupNodeFont(Value: TFont); - procedure SetGroupNodeColor(Value: TColor); - procedure SetHeaderColor(Value: TColor); - procedure SetHeaderFont(Value: TFont); - function GetMasterView: TdxMasterView; - procedure SetOddColor(Value: TColor); - procedure SetOddFont(Value: TFont); - procedure SetOnCustomDrawCell(Value: TdxMVReportLinkCustomDrawCellEvent); - procedure SetOnCustomDrawFooterCell(Value: TdxMVReportLinkCustomDrawFooterCellEvent); - procedure SetOnCustomDrawHeaderCell(Value: TdxMVReportLinkCustomDrawHeaderCellEvent); - procedure SetOnCustomDrawPreviewCell(Value: TdxMVReportLinkCustomDrawPreviewCellEvent); - procedure SetOnlySelected(Value: Boolean); - procedure SetOptions(Value: TdxMasterViewPaintOptions); - procedure SetPreviewColor(Value: TColor); - procedure SetPreviewFont(Value: TFont); - procedure SetPreviewLineCount(Value: Integer); - procedure SetSupportCustomDraw(Value: Boolean); - - procedure AddNodes; - procedure BuildSelectedNodeList; - procedure CalcFontIndexes(AReportCells: TdxReportCells); - procedure CustomDrawFontChanged(Sender: TObject); - procedure FreeColumnPlaces; - procedure FreeFontIndexes; - function GetCellCustomDrawInfo(AItem: TdxReportVisualItem; - ANode: PdxMasterViewNode; AColumn: PdxMasterViewColumn): TdxMasterViewLinkCellType; - function IsExtendedSelect: Boolean; - function IsExistSelectedNodes: Boolean; - function IsSelectedNode(ANode: TdxMasterViewNode): Boolean; - procedure LoadColumnPlaces; - procedure LoadFontIndexes(AReportCells: TdxReportCells); - function NodeExpanded(ANode: TdxMasterViewNode): Boolean; - procedure PrepareData(Value: Boolean); - protected - FCaptionNodeFontIndex: Integer; - FEvenFontIndex: Integer; - FGroupNodeFontIndex: Integer; - FFooterFontIndex: Integer; - FHeaderFontIndex: Integer; - FOddFontIndex: Integer; - FPreviewFontIndex: Integer; - procedure ConstructReport(AReportCells: TdxReportCells); override; - function GetEmptyPagesCanExist: Boolean; override; - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - procedure MakeDelimiters(AReportCells: TdxReportCells; - AHorzDelimiters, AVertDelimiters: TList); override; - procedure PrepareConstruct(AReportCells: TdxReportCells); virtual; - procedure UnprepareConstruct(AReportCells: TdxReportCells); virtual; - - procedure AssignValues(ADataItem: TAbstractdxReportCellData; - ANode: TdxMasterViewNode; AColumn: TdxMasterViewColumn; - ACellType: TdxMasterViewLinkCellType); virtual; - function GetDataClass(ANode: TdxMasterViewNode; AColumn: TdxMasterViewColumn; - ACellType: TdxMasterViewLinkCellType): TdxReportCellDataClass; virtual; - { custom draw support } - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - procedure DoCustomDrawCell(ACanvas: TCanvas; ABoundsRect, - AClientRect: TRect; ANode: TdxMasterViewNode; AColumn: TdxMasterViewColumn; - var AText: string; var AColor: TColor; AFont: TFont; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); virtual; - procedure DoCustomDrawFooterCell(ACanvas: TCanvas; ABoundsRect, - AClientRect: TRect; ANode: TdxMasterViewNode; AColumn: TdxMasterViewColumn; - var AText: string; var AColor: TColor; AFont: TFont; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); virtual; - procedure DoCustomDrawHeaderCell(ACanvas: TCanvas; ABoundsRect, - AClientRect: TRect; AColumn: TdxMasterViewColumn; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ASorted: TdxCellSortOrder; - var ADone: Boolean); virtual; - procedure DoCustomDrawPreviewCell(ACanvas: TCanvas; ABoundsRect, - AClientRect: TRect; ANode: TdxMasterViewNode; var AText: string; - var AColor: TColor; AFont: TFont; var ADone: Boolean); virtual; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - { options access } - function AutoCalcPreviewLines: Boolean; - function FlatCheckMarks: Boolean; - function GraphicsAsText: Boolean; - function OddEvenMode: Boolean; - function ShowExpandButtons: Boolean; - function ShowFooters(ANode: TdxMasterViewNode): Boolean; - function ShowGrid(ANode: TdxMasterViewNode): Boolean; - function ShowHeaders(ANode: TdxMasterViewNode): Boolean; - function ShowPreview(ANode: TdxMasterViewNode): Boolean; - function ShowPreviewGrid(ANode: TdxMasterViewNode): Boolean; - function ShowGroupFooterGrid: Boolean; - function TransparentColumnGraphics: Boolean; - function Use3DEffects: Boolean; - function UseSoft3D: Boolean; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - property MasterView: TdxMasterView read GetMasterView; - published - property AutoNodesExpand: Boolean read FAutoNodesExpand write SetAutoNodesExpand default False; - property CaptionColor: TColor read FCaptionColor write SetCaptionColor default clBtnFace; - property CaptionNodeFont: TFont read FCaptionNodeFont write SetCaptionNodeFont stored IsFontStored; - property Color; - property DrawMode: TdxMasterViewDrawMode read FDrawMode write SetDrawMode default mvdmStrict; - property EvenColor: TColor read FEvenColor write SetEvenColor default clWhite; - property EvenFont: TFont read FEvenFont write SetEvenFont stored IsFontStored; - property ExtendedSelect: Boolean read FExtendedSelect write SetExtendedSelect default True; - property FixedTransparent: Boolean read FFixedTransparent write SetFixedTransparent default False; - property Font; - property FooterColor: TColor read FFooterColor write SetFooterColor default clBtnFace; - property FooterFont: TFont read FFooterFont write SetFooterFont stored IsFontStored; - property GridLineColor: TColor read FGridLineColor write SetGridLineColor default clBlack; - property GroupNodeFont: TFont read FGroupNodeFont write SetGroupNodeFont stored IsFontStored; - property GroupNodeColor: TColor read FGroupNodeColor write SetGroupNodeColor default clBtnFace; - property HeaderColor: TColor read FHeaderColor write SetHeaderColor default clBtnFace; - property HeaderFont: TFont read FHeaderFont write SetHeaderFont stored IsFontStored; - property OddColor: TColor read GetOddColor write SetOddColor default clWhite; - property OddFont: TFont read FOddFont write SetOddFont stored IsFontStored; - property OnlySelected: Boolean read FOnlySelected write SetOnlySelected default False; - property Options: TdxMasterViewPaintOptions read GetOptions write SetOptions - default [mvpoHeaders, mvpoFooters, mvpoPreview, mvpoGrid, mvpoPreviewGrid, - mvpoGroupFooterGrid, mvpoFlatCheckMarks, mvpo3DEffects, mvpoSoft3D, mvpoExpandButtons]; - property PreviewColor: TColor read FPreviewColor write SetPreviewColor default clWhite; - property PreviewFont: TFont read FPreviewFont write SetPreviewFont stored IsFontStored; - property PreviewLineCount: Integer read FPreviewLineCount write SetPreviewLineCount default -1; - property ScaleFonts; - property ShowEmptyPages; - property SupportedCustomDraw: Boolean read FSupportedCustomDraw write SetSupportCustomDraw default False; - property Transparent; - property UseHorzDelimiters; - property UseVertDelimiters; - property OnCustomDrawCell: TdxMVReportLinkCustomDrawCellEvent - read FOnCustomDrawCell write SetOnCustomDrawCell; - property OnCustomDrawFooterCell: TdxMVReportLinkCustomDrawFooterCellEvent - read FOnCustomDrawFooterCell write SetOnCustomDrawFooterCell; - property OnCustomDrawHeaderCell: TdxMVReportLinkCustomDrawHeaderCellEvent - read FOnCustomDrawHeaderCell write SetOnCustomDrawHeaderCell; - property OnCustomDrawPreviewCell: TdxMVReportLinkCustomDrawPreviewCellEvent - read FOnCustomDrawPreviewCell write SetOnCustomDrawPreviewCell; - end; - - TdxMVReportLinkDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshOptions: TTabSheet; - Bevel11: TBevel; - imgShow: TImage; - lblShow: TLabel; - Bevel16: TBevel; - chbxShowGrid: TCheckBox; - chbxShowGroupFooterGrid: TCheckBox; - chbxShowHeaders: TCheckBox; - chbxShowFooters: TCheckBox; - tshColors: TTabSheet; - lblGridLineColor: TLabel; - bvlGridLineColorHolder: TBevel; - gbxFixedTransparent: TGroupBox; - lblHeaderColor: TLabel; - lblFooterColor: TLabel; - bvlHeaderColorHolder: TBevel; - bvlFooterColorHolder: TBevel; - lblGroupNodeColor: TLabel; - bvlGroupNodeColorHolder: TBevel; - gbxTransparent: TGroupBox; - lblColor: TLabel; - bvlColorHolder: TBevel; - lblPreviewColor: TLabel; - bvlPreviewColorHolder: TBevel; - lblEvenColor: TLabel; - bvlEvenColorHolder: TBevel; - chbxTransparent: TCheckBox; - chbxFixedTransparent: TCheckBox; - tshFonts: TTabSheet; - btnChangeFont: TButton; - lbxFonts: TListBox; - tshBehaviors: TTabSheet; - Bevel12: TBevel; - Bevel13: TBevel; - imgSelection: TImage; - imgNodeExpanding: TImage; - lblSelection: TLabel; - lblExpanding: TLabel; - lblRefinements: TLabel; - bvlGraphic: TBevel; - imgGraphics: TImage; - lblLookAndFeel: TLabel; - img3DEffects: TImage; - Bevel15: TBevel; - chbxTransparentColumnGraphic: TCheckBox; - chbxDisplayGraphicsAsText: TCheckBox; - chbxOnlySelected: TCheckBox; - chbxExtendedSelect: TCheckBox; - chbxAutoNodesExpand: TCheckBox; - chbxUse3DEffects: TCheckBox; - chbxUseSoft3D: TCheckBox; - pnlPreview: TPanel; - pmChangeFont: TPopupMenu; - miChangeFont: TMenuItem; - lblLevelCaptionColor: TLabel; - bvlCaptionColorHolder: TBevel; - chbxShowPreviewGrid: TCheckBox; - dxMVPreview: TdxMasterView; - mvsCaptionStyle: TdxMasterViewStyle; - mvsContentStyle: TdxMasterViewStyle; - mvsFooterStyle: TdxMasterViewStyle; - mvsGroupStyle: TdxMasterViewStyle; - mvsHeaderStyle: TdxMasterViewStyle; - mvsPreviewStyle: TdxMasterViewStyle; - mvsAnotherContentStyle: TdxMasterViewStyle; - tshPreview: TTabSheet; - chbxCheckMarksAsText: TCheckBox; - chbxFlatCheckMarks: TCheckBox; - chbxShowExpandButtons: TCheckBox; - lblPreviewLineCount: TLabel; - bvlPreviewLineCountHolder: TBevel; - lblPreview: TLabel; - Bevel1: TBevel; - imgPreview: TImage; - chbxShowPreview: TCheckBox; - chbxAutoCalcPreviewLines: TCheckBox; - lblDrawMode: TLabel; - cbxDrawMode: TComboBox; - lblPreviewWindow: TStaticText; - stTransparent: TStaticText; - stFixedTransparent: TStaticText; - procedure ShowClick(Sender: TObject); - procedure chbxAutoNodesExpandClick(Sender: TObject); - procedure chbxOnlySelectedClick(Sender: TObject); - procedure chbxExtendedSelectClick(Sender: TObject); - procedure chbxAutoCalcPreviewLinesClick(Sender: TObject); - procedure chbxTransparentClick(Sender: TObject); - procedure btnChangeFontClick(Sender: TObject); - procedure lbxFontsMouseMove(Sender: TObject; Shift: TShiftState; X, - Y: Integer); - procedure lbxFontsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure lbxFontsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure lbxFontsClick(Sender: TObject); - procedure cbxDrawModeClick(Sender: TObject); - procedure pmChangeFontPopup(Sender: TObject); - procedure lbxFontsDblClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure cbxDrawModeDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure stTransparentClick(Sender: TObject); - procedure stFixedTransparentClick(Sender: TObject); - private - FccbxColor: TCustomComboBox; - FccbxEvenColor: TCustomComboBox; - FccbxCaptionColor: TCustomComboBox; - FccbxHeaderColor: TCustomComboBox; - FccbxGroupNodeColor: TCustomComboBox; - FccbxPreviewColor: TCustomComboBox; - FccbxFooterColor: TCustomComboBox; - FccbxGridLineColor: TCustomComboBox; - FPreviewBox: TCustomControl; - FsePreviewLineCount: TCustomEdit; - - FMVDetailLevel: TdxMasterViewLevel; - FMVMasterLevel: TdxMasterViewLevel; - FMVColumnAddress: TdxMasterViewColumn; - FMVColumnName: TdxMasterViewColumn; - FMVColumnCash: TdxMasterViewCheckColumn; - FMVColumnCount: TdxMasterViewColumn; - FMVColumnPrice: TdxMasterViewColumn; - FdsDetail: TDataSource; - FdsMaster: TDataSource; - FmdDetail: TdxEasyMemData; - FmdMaster: TdxEasyMemData; - - FLastIndex: Integer; - procedure ccbxColorChange(Sender: TObject); - procedure CreateControls; - procedure CreateDataSets; - procedure DoChangeFont(Index: Integer); - procedure dxMVPreviewGetContentStyle(Sender: TdxMasterViewLevel; - Node: TdxMasterViewNode; Column: TdxMasterViewColumn; - var NewStyle: TdxMasterViewStyle); - function GetFontByIndex(AIndex: Integer): TFont; - function GetFontInfoText(AIndex: Integer): string; - function GetReportLink: TdxMasterViewReportLink; - function GetMaxWidth: Integer; - procedure InitializeMasterView; - function IsChangeFontEnabled: Boolean; - function IsDisableIndex(AIndex: Integer): Boolean; - procedure LoadMemData; - procedure pbxPreviewPaint(Sender: TObject); - procedure PreviewLineCountChange(Sender: TObject); - procedure CMDialogChar(var Msg: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property ReportLink: TdxMasterViewReportLink read GetReportLink; - end; - -const - dxDefaultMasterViewPaintOptions: TdxMasterViewPaintOptions = - [mvpoHeaders, mvpoFooters, mvpoPreview, mvpoGrid, mvpoPreviewGrid, - mvpoGroupFooterGrid, mvpoFlatCheckMarks, mvpo3DEffects, mvpoSoft3D, mvpoExpandButtons]; - -implementation - -{$R *.DFM} - -uses - cxClasses, dxExtCtrls, dxPSRes, dxPSPopupMan, dxPrnDev, dxPSUtl; - -type - PColumnPlace = ^TColumnPlace; - TColumnPlace = record - Column: TdxMasterViewColumn; - RowIndex, ColIndex, RowCount: Integer; - end; - - TdxMasterViewColumnAccess = class(TdxMasterViewColumn); - TdxMasterViewLevelAccess = class(TdxMasterViewLevel); - TdxMasterViewNodeAccess = class(TdxMasterViewNode); - TdxMasterViewCheckColumnAccess = class(TdxMasterViewCheckColumn); - TdxMasterViewImageColumnAccess = class(TdxMasterViewImageColumn); - TdxMasterViewGraphicColumnAccess = class(TdxMasterViewGraphicColumn); - -function ExposeLevel(ALevel: TdxMasterViewLevel): TdxMasterViewLevelAccess; -begin - Result := TdxMasterViewLevelAccess(ALevel); -end; - -function ExposeNode(ANode: TdxMasterViewNode): TdxMasterViewNodeAccess; -begin - Result := TdxMasterViewNodeAccess(ANode); -end; - -function ExposeColumn(AColumn: TdxMasterViewColumn): TdxMasterViewColumnAccess; -begin - Result := TdxMasterViewColumnAccess(AColumn); -end; - -{ TdxColumnHelpersFactory } - -type - TdxColumnHelpersFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(Column: TdxMasterViewColumn): TdxMasterViewColumnHelperClass; - public - class function Instance: TdxColumnHelpersFactory; reintroduce; overload; - property HelperClasses[Column: TdxMasterViewColumn]: TdxMasterViewColumnHelperClass read GetHelperClass; default; - end; - -function dxColumnHelpersFactory: TdxColumnHelpersFactory; -begin - Result := TdxColumnHelpersFactory.Instance; -end; - -class function TdxColumnHelpersFactory.Instance: TdxColumnHelpersFactory; -begin - Result := inherited Instance as TdxColumnHelpersFactory; -end; - -function TdxColumnHelpersFactory.GetHelperClass(Column: TdxMasterViewColumn): TdxMasterViewColumnHelperClass; -begin - Result := TdxMasterViewColumnHelperClass(PairClasses[Column.ClassType]); -end; - -{ TdxMasterViewColumnHelper } - -class function TdxMasterViewColumnHelper.ColumnClass: TdxMasterViewColumnClass; -begin - Result := TdxMasterViewColumn; -end; - -class function TdxMasterViewColumnHelper.PairClass: TClass; -begin - Result := ColumnClass; -end; - -class procedure TdxMasterViewColumnHelper.Register; -begin - dxColumnHelpersFactory.Register(Self); -end; - -class procedure TdxMasterViewColumnHelper.GetImageLists(AColumn: TdxMasterViewColumn; - AProc: TdxPSGetImageListProc); -begin -end; - -{ TdxMasterViewImageColumnHelper } - -class function TdxMasterViewImageColumnHelper.ColumnClass: TdxMasterViewColumnClass; -begin - Result := TdxMasterViewImageColumn; -end; - -class procedure TdxMasterViewImageColumnHelper.GetImageLists(AColumn: TdxMasterViewColumn; - AProc: TdxPSGetImageListProc); -begin - inherited GetImageLists(AColumn, AProc); - AProc(TdxMasterViewImageColumn(AColumn).Images); -end; - -{ TdxMasterViewReportLink } - -constructor TdxMasterViewReportLink.Create(AOwner: TComponent); - - function CreateFont: TFont; - begin - Result := TFont.Create; - Result.OnChange := FontChanged - end; - -begin - inherited Create(AOwner); - FCaptionNodeFont := CreateFont; - FEvenFont := CreateFont; - FFooterFont := CreateFont; - FGroupNodeFont := CreateFont; - FHeaderFont := CreateFont; - FOddFont := CreateFont; - FPreviewFont := CreateFont; - - FNodes := TList.Create; - FDelimitersCells := TList.Create; - FSaveFont := TFont.Create; - FSaveFont.OnChange := CustomDrawFontChanged; - - InternalRestoreDefaults; - LinkModified(False); -end; - -destructor TdxMasterViewReportLink.Destroy; -begin - FSaveFont.Free; - FDelimitersCells.Free; - FNodes.Free; - FPreviewFont.Free; - FOddFont.Free; - FHeaderFont.Free; - FGroupNodeFont.Free; - FFooterFont.Free; - FEvenFont.Free; - FCaptionNodeFont.Free; - inherited Destroy; -end; - -procedure TdxMasterViewReportLink.Assign(Source: TPersistent); -begin - inherited Assign(Source); - if Source is TdxMasterViewReportLink then - begin - AutoNodesExpand := TdxMasterViewReportLink(Source).AutoNodesExpand; - DrawMode := TdxMasterViewReportLink(Source).DrawMode; - ExtendedSelect := TdxMasterViewReportLink(Source).ExtendedSelect; - FixedTransparent := TdxMasterViewReportLink(Source).FixedTransparent; - OnlySelected := TdxMasterViewReportLink(Source).OnlySelected; - Options := TdxMasterViewReportLink(Source).Options; - PreviewLineCount := TdxMasterViewReportLink(Source).PreviewLineCount; - SupportedCustomDraw := TdxMasterViewReportLink(Source).SupportedCustomDraw; - - EvenColor := TdxMasterViewReportLink(Source).EvenColor; - GroupNodeColor := TdxMasterViewReportLink(Source).GroupNodeColor; - GridLineColor := TdxMasterViewReportLink(Source).GridLineColor; - HeaderColor := TdxMasterViewReportLink(Source).HeaderColor; - PreviewColor := TdxMasterViewReportLink(Source).PreviewColor; - FooterColor := TdxMasterViewReportLink(Source).FooterColor; - - CaptionNodeFont := TdxMasterViewReportLink(Source).CaptionNodeFont; - EvenFont := TdxMasterViewReportLink(Source).EvenFont; - HeaderFont := TdxMasterViewReportLink(Source).HeaderFont; - OddFont := TdxMasterViewReportLink(Source).OddFont; - PreviewFont := TdxMasterViewReportLink(Source).PreviewFont; - FooterFont := TdxMasterViewReportLink(Source).FooterFont; - GroupNodeFont := TdxMasterViewReportLink(Source).GroupNodeFont; - end; -end; - -function TdxMasterViewReportLink.GetMasterView: TdxMasterView; -begin - Result := TdxMasterView(Component); -end; - -procedure TdxMasterViewReportLink.CustomDrawFontChanged(Sender: TObject); -begin - FCustomDrawFontChanged := True; -end; - -function TdxMasterViewReportLink.GetCellCustomDrawInfo(AItem: TdxReportVisualItem; - ANode: PdxMasterViewNode; AColumn: PdxMasterViewColumn): TdxMasterViewLinkCellType; -var - Parent: TdxReportCell; -begin - Result := mvctUnknown; - try - if AItem.Data <> 0 then - begin - if TObject(AItem.Data) is TdxMasterViewColumn then - begin - Parent := AItem.Parent; - if Parent <> nil then - begin - if Parent.Data = 0 then - Result := mvctHeader - else - if TObject(Parent.Data) is TdxMasterViewNode then - begin - Parent := Parent.Parent; - if Parent <> nil then - begin - if Parent = AItem.ReportCells.Cells then - Result := mvctCell - else - Result := mvctFooter - end; - end; - end; - end - else - if TObject(AItem.Data) is TdxMasterViewNode then // Caption Node - Result := mvctCell - end - else - begin - Parent := AItem.Parent; - if (Parent <> nil) and (Parent.Data <> 0) and - (TObject(Parent.Data) is TdxMasterViewNode) then - Result := mvctPreview; - end; - except - // eat exception if any Node or Column have been deleted already - end; - - if Result <> mvctUnknown then - begin - if (AColumn <> nil) and (Result <> mvctPreview) then - AColumn^ := TdxMasterViewColumn(AItem.Data); - if (ANode <> nil) and (Result <> mvctHeader) then - ANode^ := TdxMasterViewNode(AItem.Parent.Data); - end; -end; - -procedure TdxMasterViewReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - AColumn: TdxMasterViewColumn; - ANode: TdxMasterViewNode; - AColor: TColor; - ASorted: TdxCellSortOrder; - AText: string; - ATextAlignX: TcxTextAlignX; - ATextAlignY: TcxTextAlignY; - ACellType: TdxMasterViewLinkCellType; -begin - if AItem.Data = 0 then Exit; - ACellType := GetCellCustomDrawInfo(AItem, @ANode, @AColumn); - if ACellType = mvctUnknown then Exit; - with TdxReportCellString(AItem) do - begin - AColor := ColorToRGB(Color); - if Transparent then AColor := clNone; - FSaveFont.Assign(Font); - FCustomDrawFontChanged := False; - AText := Text; - if ACellType = mvctHeader then ASorted := SortOrder; - if ACellType <> mvctPreview then - begin - ATextAlignX := TextAlignX; - ATextAlignY := TextAlignY; - end; - case ACellType of - mvctCell: - DoCustomDrawCell(ACanvas, ABoundsRect, AClientRect, ANode, AColumn, - AText, AColor, FSaveFont, ATextAlignX, ATextAlignY, ADone); - mvctFooter: - DoCustomDrawFooterCell(ACanvas, ABoundsRect, AClientRect, ANode, AColumn, - AText, AColor, FSaveFont, ATextAlignX, ATextAlignY, ADone); - mvctHeader: - DoCustomDrawHeaderCell(ACanvas, ABoundsRect, AClientRect, AColumn, AText, - AColor, FSaveFont, ATextAlignX, ATextAlignY, ASorted, ADone); - mvctPreview: - DoCustomDrawPreviewCell(ACanvas, ABoundsRect, AClientRect, ANode, AText, - AColor, FSaveFont, ADone); - end; - if not ADone then - begin - if FCustomDrawFontChanged then - begin - SelectObject(ACanvas.Handle, FSaveFont.Handle); - SetTextColor(ACanvas.Handle, ColorToRGB(FSaveFont.Color)); - FontIndex := -1; - end; - if AColor <> clNone then - begin - Color := AColor; - Transparent := False; - end; - Text := AText; - if ACellType = mvctHeader then - SortOrder := ASorted; - if ACellType <> mvctPreview then - begin - TextAlignX := ATextAlignX; - TextAlignY := ATextAlignY; - end; - end; - end; -end; - -procedure TdxMasterViewReportLink.SetSupportCustomDraw(Value: Boolean); -begin - if FSupportedCustomDraw <> Value then - begin - FSupportedCustomDraw := Value; - LinkModified(True); - end; -end; - -function TdxMasterViewReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -begin - Result := SupportedCustomDraw; - if Result and (Item <> nil) {and (Item.Data <> 0)} then - case GetCellCustomDrawInfo(Item, nil, nil) of - mvctCell: - Result := Assigned(FOnCustomDrawCell); - mvctFooter: - Result := Assigned(FOnCustomDrawFooterCell); - mvctHeader: - Result := Assigned(FOnCustomDrawHeaderCell); - mvctPreview: - Result := Assigned(FOnCustomDrawPreviewCell); - else - Result := False; - end; -end; - -procedure TdxMasterViewReportLink.DoCustomDrawCell(ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; ANode: TdxMasterViewNode; - AColumn: TdxMasterViewColumn; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCell) then - FOnCustomDrawCell(Self, ACanvas, ABoundsRect, AClientRect, ANode, AColumn, - AText, AColor, AFont, ATextAlignX, ATextAlignY, ADone); -end; - -procedure TdxMasterViewReportLink.DoCustomDrawFooterCell(ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; ANode: TdxMasterViewNode; - AColumn: TdxMasterViewColumn; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFooterCell) then - FOnCustomDrawFooterCell(Self, ACanvas, ABoundsRect, AClientRect, ANode, - AColumn, AText, AColor, AFont, ATextAlignX, ATextAlignY, ADone); -end; - -procedure TdxMasterViewReportLink.DoCustomDrawHeaderCell(ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; AColumn: TdxMasterViewColumn; - var AText: string; var AColor: TColor; AFont: TFont; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ASorted: TdxCellSortOrder; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeaderCell) then - FOnCustomDrawHeaderCell(Self, ACanvas, ABoundsRect, AClientRect, AColumn, - AText, AColor, AFont, ATextAlignX, ATextAlignY, ASorted, ADone); -end; - -procedure TdxMasterViewReportLink.DoCustomDrawPreviewCell(ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; ANode: TdxMasterViewNode; var AText: string; - var AColor: TColor; AFont: TFont; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawPreviewCell) then - FOnCustomDrawPreviewCell(Self, ACanvas, ABoundsRect, AClientRect, ANode, - AText, AColor, AFont, ADone); -end; - -function TdxMasterViewReportLink.AutoCalcPreviewLines: Boolean; -begin - Result := PreviewLineCount = -1; -end; - -function TdxMasterViewReportLink.FlatCheckMarks: Boolean; -begin - Result := mvpoFlatCheckMarks in Options; -end; - -function TdxMasterViewReportLink.GraphicsAsText: Boolean; -begin - Result := mvpoGraphicAsText in Options; -end; - -function TdxMasterViewReportLink.ShowExpandButtons: Boolean; -begin - Result := mvpoExpandButtons in Options; -end; - -function TdxMasterViewReportLink.ShowFooters(ANode: TdxMasterViewNode): Boolean; -begin - if (DrawMode = mvdmBorrowSource) and (ANode <> nil) then - Result := lovFooter in ANode.Level.OptionsView - else - Result := mvpoFooters in Options; -end; - -function TdxMasterViewReportLink.ShowGrid(ANode: TdxMasterViewNode): Boolean; -begin - if (DrawMode = mvdmBorrowSource) and (ANode <> nil) then - Result := lovGrid in ANode.Level.OptionsView - else - Result := mvpoGrid in Options; -end; - -function TdxMasterViewReportLink.ShowGroupFooterGrid: Boolean; -begin - Result := mvpoGroupFooterGrid in Options; -end; - -function TdxMasterViewReportLink.ShowHeaders(ANode: TdxMasterViewNode): Boolean; -begin - if (DrawMode = mvdmBorrowSource) and (ANode <> nil) then - Result := lovHeader in ANode.Level.OptionsView - else - Result := mvpoHeaders in Options; -end; - -function TdxMasterViewReportLink.ShowPreviewGrid(ANode: TdxMasterViewNode): Boolean; -begin - if (DrawMode = mvdmBorrowSource) and (ANode <> nil) then - Result := lovGridWithPreview in ANode.Level.OptionsView - else - Result := mvpoPreviewGrid in Options; -end; - -function TdxMasterViewReportLink.ShowPreview(ANode: TdxMasterViewNode): Boolean; -begin - if (DrawMode = mvdmBorrowSource) and (ANode <> nil) then - Result := lovPreview in ANode.Level.OptionsView - else - Result := mvpoPreview in Options; -end; - -function TdxMasterViewReportLink.IsExtendedSelect: Boolean; -begin - Result := IsExistSelectedNodes and ExtendedSelect; -end; - -function TdxMasterViewReportLink.IsExistSelectedNodes: Boolean; -begin - Result := OnlySelected and (MasterView.SelectedItemCount > 0); -end; - -function TdxMasterViewReportLink.IsSelectedNode(ANode: TdxMasterViewNode): Boolean; - - function IsExistSelectedChild(ANode: TdxMasterViewNode): Boolean; - var - I, J: Integer; - begin - Result := False; - with MasterView do - for I := 0 to ANode.Count - 1 do - begin - for J := 0 to SelectedItemCount - 1 do - begin - Result := (ANode[I] = SelectedItems[J]); - if Result then Exit; - end; - if (ANode[I].Count > 0) then - begin - Result := IsExistSelectedChild(ANode[I]); - if Result then Exit; - end; - end; - end; - - function FindInOriginal(ANode: TdxMasterViewNode): Boolean; - var - I: Integer; - begin - Result := False; - with MasterView do - for I := 0 to SelectedItemCount - 1 do - begin - Result := ANode = SelectedItems[I]; - if Result then Exit; - end; - end; - - function FindInChildren(ANode: TdxMasterViewNode): Boolean; - var - I: Integer; - begin - Result := False; - for I := 0 to ANode.Count - 1 do - begin - Result := FindInOriginal(ANode[I]); - if Result then - Break - else - if ANode[I].Count > 0 then - Result := FindInChildren(ANode[I]); - if Result then Break; - end; - end; - - function FindInParent(ANode: TdxMasterViewNode): Boolean; - begin - Result := False; - ANode := ANode.ParentNode; - while Assigned(ANode) do - begin - Result := FindInOriginal(ANode); - if Result then Break; - ANode := ANode.ParentNode; - end; - end; - -begin - Result := FindInOriginal(ANode); - if not Result and (ANode.Count > 0) then - Result := FindInChildren(ANode); - if not Result and not IsExtendedSelect then - Result := FindInParent(ANode); -end; - -function TdxMasterViewReportLink.TransparentColumnGraphics: Boolean; -begin - Result := mvpoTransparentColumnGraphic in Options; -end; - -function TdxMasterViewReportLink.OddEvenMode: Boolean; -begin - Result := DrawMode = mvdmOddEven; -end; - -function TdxMasterViewReportLink.Use3DEffects: Boolean; -begin - Result := mvpo3DEffects in Options; -end; - -function TdxMasterViewReportLink.UseSoft3D: Boolean; -begin - Result := mvpoSoft3D in Options; -end; - -procedure TdxMasterViewReportLink.SetExtendedSelect(Value: Boolean); -begin - if FExtendedSelect <> Value then - begin - FExtendedSelect := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetOnlySelected(Value: Boolean); -begin - if FOnlySelected <> Value then - begin - FOnlySelected := Value; -// if OnlySelected then FAutoNodesExpand := False; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetAutoNodesExpand(Value: Boolean); -begin - if FAutoNodesExpand <> Value then - begin - FAutoNodesExpand := Value; - //if AutoNodesExpand then FOnlySelected := False; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetDrawMode(Value: TdxMasterViewDrawMode); -begin - if FDrawMode <> Value then - begin - FDrawMode := Value; - LinkModified(True); - end; -end; - -function TdxMasterViewReportLink.GetOptions: TdxMasterViewPaintOptions; -begin - Result := FOptions; -end; - -procedure TdxMasterViewReportLink.SetOptions(Value: TdxMasterViewPaintOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetOddFont(Value: TFont); -begin - FOddFont.Assign(Value); -end; - -procedure TdxMasterViewReportLink.SetEvenFont(Value: TFont); -begin - FEvenFont.Assign(Value); -end; - -procedure TdxMasterViewReportLink.SetHeaderFont(Value: TFont); -begin - FHeaderFont.Assign(Value); -end; - -procedure TdxMasterViewReportLink.SetCaptionNodeFont(Value: TFont); -begin - FCaptionNodeFont.Assign(Value); -end; - -procedure TdxMasterViewReportLink.SetGroupNodeFont(Value: TFont); -begin - FGroupNodeFont.Assign(Value); -end; - -procedure TdxMasterViewReportLink.SetPreviewFont(Value: TFont); -begin - FPreviewFont.Assign(Value); -end; - -procedure TdxMasterViewReportLink.SetFooterFont(Value: TFont); -begin - FFooterFont.Assign(Value); -end; - -procedure TdxMasterViewReportLink.SetEvenColor(Value: TColor); -begin - if FEvenColor <> Value then - begin - FEvenColor := Value; - if OddEvenMode then LinkModified(True); - end; -end; - -function TdxMasterViewReportLink.GetOddColor: TColor; -begin - Result := Color; -end; - -procedure TdxMasterViewReportLink.SetOddColor(Value: TColor); -begin - inherited Color := Value; -end; - -procedure TdxMasterViewReportLink.SetGroupNodeColor(Value: TColor); -begin - if FGroupNodeColor <> Value then - begin - FGroupNodeColor := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetCaptionColor(Value: TColor); -begin - if FCaptionColor <> Value then - begin - FCaptionColor := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetGridLineColor(Value: TColor); -begin - if FGridLineColor <> Value then - begin - FGridLineColor := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetHeaderColor(Value: TColor); -begin - if FHeaderColor <> Value then - begin - FHeaderColor := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetPreviewColor(Value: TColor); -begin - if FPreviewColor <> Value then - begin - FPreviewColor := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetFooterColor(Value: TColor); -begin - if FFooterColor <> Value then - begin - FFooterColor := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetFixedTransparent(Value: Boolean); -begin - if FFixedTransparent <> Value then - begin - FFixedTransparent := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetPreviewLineCount(Value: Integer); -begin - if FPreviewLineCount < -1 then FPreviewLineCount := -1; - if FPreviewLineCount <> Value then - begin - FPreviewLineCount := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetOnCustomDrawCell(Value: TdxMVReportLinkCustomDrawCellEvent); -begin - if @FOnCustomDrawCell <> @Value then - begin - FOnCustomDrawCell := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetOnCustomDrawFooterCell(Value: TdxMVReportLinkCustomDrawFooterCellEvent); -begin - if @FOnCustomDrawFooterCell <> @Value then - begin - FOnCustomDrawFooterCell := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetOnCustomDrawHeaderCell(Value: TdxMVReportLinkCustomDrawHeaderCellEvent); -begin - if @FOnCustomDrawHeaderCell <> @Value then - begin - FOnCustomDrawHeaderCell := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.SetOnCustomDrawPreviewCell(Value: TdxMVReportLinkCustomDrawPreviewCellEvent); -begin - if @FOnCustomDrawPreviewCell <> @Value then - begin - FOnCustomDrawPreviewCell := Value; - LinkModified(True); - end; -end; - -procedure TdxMasterViewReportLink.InternalRestoreFromOriginal; - - procedure XorOption(var AOptions: TdxMasterViewPaintOptions; - AItem: TdxMasterViewPaintOption; AValue: Boolean); - begin - if AValue then - Include(AOptions, AItem) - else - Exclude(AOptions, AItem); - end; - - procedure SetColorAndFont(AStyle: TdxMasterViewStyle; AFont: TFont; var AColor: TColor); - begin - if AStyle <> nil then - begin - if svFont in AStyle.AssignedValues then AFont.Assign(AStyle.Font); - if svColor in AStyle.AssignedValues then AColor := AStyle.Color; - end; - end; - -var - Level: TdxMasterViewLevel; -begin - inherited; - - if (MasterView = nil) or (MasterView.Levels.Count = 0) then Exit; - - Level := MasterView.Levels[0]; - PreviewLineCount := Level.PreviewLineCount; - FGridLineColor := Level.GridLinesColor; - - Font := MasterView.Font; - - SetColorAndFont(Level.ContentStyle, Font, FColor); - SetColorAndFont(Level.HeaderStyle, HeaderFont, FHeaderColor); - SetColorAndFont(Level.PreviewStyle, PreviewFont, FPreviewColor); - SetColorAndFont(Level.GroupStyle, GroupNodeFont, FGroupNodeColor); - SetColorAndFont(Level.FooterStyle, FooterFont, FFooterColor); - SetColorAndFont(Level.CaptionStyle, CaptionNodeFont, FCaptionColor); - - XorOption(FOptions, mvpoHeaders, lovHeader in Level.OptionsView); - XorOption(FOptions, mvpoFooters, lovFooter in Level.OptionsView); - XorOption(FOptions, mvpoPreview, lovPreview in Level.OptionsView); - XorOption(FOptions, mvpoGrid, lovGrid in Level.OptionsView); - XorOption(FOptions, mvpoPreviewGrid, lovGridWithPreview in Level.OptionsView); -end; - -procedure TdxMasterViewReportLink.InternalRestoreDefaults; -begin - inherited; - - FAutoNodesExpand := False; - DrawMode := mvdmStrict; - FixedTransparent := False; - FOnlySelected := False; - Options := dxDefaultMasterViewPaintOptions; - FPreviewLineCount := -1; - FSupportedCustomDraw := False; - - FEvenColor := Color; - FGridLineColor := dxDefaultGridLineColor; - FGroupNodeColor := dxDefaultFixedColor; - FCaptionColor := dxDefaultFixedColor; - FHeaderColor := dxDefaultFixedColor; - FFooterColor := dxDefaultFixedColor; - FPreviewColor := Color; - - CaptionNodeFont := DefaultFont; - EvenFont := DefaultFont; - FooterFont := DefaultFont; - GroupNodeFont := DefaultFont; - HeaderFont := DefaultFont; - OddFont := DefaultFont; - PreviewFont := DefaultFont; - - FExtendedSelect := True; -end; - -function TdxMasterViewReportLink.GetEmptyPagesCanExist: Boolean; -begin - Result := True; -end; - -procedure TdxMasterViewReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -var - I, J: Integer; - Level: TdxMasterViewLevel; - Column: TdxMasterViewColumn; -begin - inherited; - - for I := 0 to MasterView.AbsoluteLevelCount - 1 do - begin - Level := MasterView.AbsoluteLevels[I]; - for J := 0 to Level.ColumnCount - 1 do - begin - Column := Level.Columns[J]; - dxColumnHelpersFactory[Column].GetImageLists(Column, AProc); - end; - end; -end; - -procedure TdxMasterViewReportLink.MakeDelimiters(AReportCells: TdxReportCells; - AHorzDelimiters, AVertDelimiters: TList); - - procedure IterateChildrens(ACell: TdxReportCell); - var - I: Integer; - Cell: TdxReportCell; - begin - for I := 0 to ACell.CellCount - 1 do - begin - Cell := ACell[I]; - AVertDelimiters.Add(Pointer(Cell.AbsoluteOrigin.Y)); - if Cell.HasChildren then IterateChildrens(Cell); - end; - end; - -var - I, J: Integer; - Cell: TdxReportCell; -begin - inherited MakeDelimiters(AReportCells, AHorzDelimiters, AVertDelimiters); - if AReportCells.Cells.CellCount = 0 then Exit; - - // horizontally - if UseHorzDelimiters then - for I := 0 to FDelimitersCells.Count - 1 do - begin - Cell := TdxReportCell(FDelimitersCells.List^[I]); - for J := 0 to Cell.DataItemCount - 1 do - with Cell.DataItems[J] do - begin - AHorzDelimiters.Add(Pointer(AbsoluteOrigin.X)); - AHorzDelimiters.Add(Pointer(AbsoluteOrigin.X + Width)); - end; - end; - - //vertically - if UseVertDelimiters then - IterateChildrens(AReportCells.Cells); -end; - -function TdxMasterViewReportLink.GetDataClass(ANode: TdxMasterViewNode; - AColumn: TdxMasterViewColumn; ACellType: TdxMasterViewLinkCellType): TdxReportCellDataClass; -const - CheckClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellCheckImage, TdxReportCellString); - ImageClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellGraphic, TdxReportCellImage); - GraphicClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellString, TdxReportCellGraphic); -begin - case ACellType of - mvctCell: - if ANode.NodeType in [ntCaption, ntGroup] then - Result := TdxReportCellString - else - if AColumn is TdxMasterViewCheckColumn then - Result := CheckClasses[mvpoCheckMarksAsText in Options] - else - if AColumn is TdxMasterViewImageColumn then - Result := ImageClasses[TdxMasterViewImageColumn(AColumn).ShowDescription] - else - Result := GraphicClasses[(AColumn is TdxMasterViewGraphicColumn) and not (mvpoGraphicAsText in Options)]; - mvctFooter, - mvctPreview: - Result := TdxReportCellString; - mvctHeader: - Result := TdxReportCellImage; - else - Result := TdxReportCellString; - end; -end; - -procedure TdxMasterViewReportLink.AssignValues(ADataItem: TAbstractdxReportCellData; - ANode: TdxMasterViewNode; AColumn: TdxMasterViewColumn; ACellType: TdxMasterViewLinkCellType); -const - SortOrderMap: array[TdxMasterViewSortOrder] of TdxCellSortOrder = (csoNone, csoUp, csoDown); -var - AState: TdxMVCheckState; - ANullStyle: TdxMVShowNullFieldStyle; - AGraphicClass: TGraphicClass; -begin - if ADataItem is TdxReportCellCheck then - begin - with TdxMasterViewCheckColumnAccess(AColumn) do - begin - AState := GetCheckState(ANode.Strings[Index]); - ANullStyle := ShowNullFieldStyle; - end; - with TdxReportCellCheck(ADataItem) do - begin - Enabled := not ((AState = csInactive) and (ANullStyle > nfsUnchecked)); - Checked := (AState = csChecked) or - ((AState = csInactive) and (ANullStyle = nfsGrayedChecked)); - FlatBorder := FlatCheckMarks; - end; - Exit; - end; - - if ADataItem is TdxReportCellImage then - begin - with TdxReportCellImage(ADataItem) do - begin - if ACellType = mvctCell then - begin - ImageIndex := TdxMasterViewImageColumnAccess(AColumn).GetItemIndex(ANode); - ImageList := TdxMasterViewImageColumn(AColumn).Images; - Multiline := AColumn.Multiline; - if (ImageIndex > -1) and (ImageIndex < TdxMasterViewImageColumn(AColumn).Items.Count) then - Text := TdxMasterViewImageColumn(AColumn).Items.Descriptions[ImageIndex]; - TextAlignX := dxTextAlignX[AColumn.Alignment]; - end - else - begin - if not AColumn.HeaderGlyph.Empty then - begin - Image := AColumn.HeaderGlyph; - ImageLayout := dxImageLayout[AColumn.HeaderGlyphAlignment] - end; - Multiline := False; - Text := AColumn.Caption; - SortOrder := SortOrderMap[AColumn.SortOrder]; - TextAlignX := dxTextAlignX[AColumn.HeaderAlignment]; - end; - EndEllipsis := movDrawEndEllipsis in MasterView.OptionsView; - ImageTransparent := True; - MakeSpaceForEmptyImage := ACellType = mvctCell; - TextAlignY := dxMultilineTextAlignY[Multiline]; - end; - Exit; - end; - - if ADataItem is TdxReportCellGraphic then - begin - if AColumn is TdxMasterViewImageColumn then {ShowDescription} - with TdxReportCellGraphic(ADataItem) do - begin - DrawMode := gdmCenter; - ImageIndex := TdxMasterViewImageColumnAccess(AColumn).GetItemIndex(ANode); - ImageList := TdxMasterViewImageColumn(AColumn).Images; - end - else - begin - AGraphicClass := TdxMasterViewGraphicColumnAccess(AColumn).GetGraphicClass(ANode); - TdxMasterViewGraphicColumnAccess(AColumn).LoadPicture(AGraphicClass, ANode.Values[AColumn.Index]); - with TdxReportCellGraphic(ADataItem) do - begin - Image := TdxMasterViewGraphicColumn(AColumn).Picture.Graphic; - ImageTransparent := TransparentColumnGraphics; - if AGraphicClass = nil then AGraphicClass := TBitmap; - if not AGraphicClass.InheritsFrom(TIcon) and TdxMasterViewGraphicColumn(AColumn).Stretch then - DrawMode := gdmStretchProportional - else - DrawMode := gdmNone; - end - end; - Exit; - end; - - if ADataItem is TdxReportCellString then - begin - with TdxReportCellString(ADataItem) do - begin - if ACellType = mvctFooter then - begin - Multiline := False; - Text := ExposeColumn(AColumn).GetFooterText(ANode); - TextAlignX := dxTextAlignX[AColumn.FooterAlignment]; - end - else - begin - if AColumn is TdxMasterViewGraphicColumn then - Text := cxGetResourceString(@sdxGraphicAsTextValue) - else - begin - Multiline := AColumn.Multiline; - if Multiline then - Text := ANode.Values[AColumn.Index] - else - Text := ANode.Strings[AColumn.Index]; - end; - TextAlignX := dxTextAlignX[AColumn.Alignment]; - end; - EndEllipsis := movDrawEndEllipsis in MasterView.OptionsView; - TextAlignY := dxMultilineTextAlignY[Multiline]; - end; - Exit; - end -end; - -procedure TdxMasterViewReportLink.PrepareData(Value: Boolean); -begin - if Value and AutoNodesExpand then - MasterView.Items.LoadChildren(True); -end; - -procedure TdxMasterViewReportLink.PrepareConstruct(AReportCells: TdxReportCells); -var - DC: HDC; -begin - DC := GetDC(0); - try - FLineHeight := Renderer.CalcTextPatternHeight(DC, Font); - FHeaderLineHeight := Renderer.CalcTextPatternHeight(DC, HeaderFont); - FFooterLineHeight := Renderer.CalcTextPatternHeight(DC, FooterFont) + 2 * Byte(ShowGroupFooterGrid); - FLevelCaptionHeight := Renderer.CalcTextPatternHeight(DC, CaptionNodeFont); - FGroupNodeHeight := Renderer.CalcTextPatternHeight(DC, GroupNodeFont); - FPreviewLineHeight := Renderer.CalcTextPatternHeight(DC, PreviewFont); - finally - ReleaseDC(0, DC); - end; - - FIndent := 19; - - PrepareData(True); - CalcFontIndexes(AReportCells); - LoadColumnPlaces; - AddNodes; - FDelimitersCells.Clear; - if IsExistSelectedNodes then - begin - FSelectedNodes := TList.Create; - BuildSelectedNodeList; - end; -end; - -procedure TdxMasterViewReportLink.UnprepareConstruct(AReportCells: TdxReportCells); -begin - FreeAndNil(FSelectedNodes); - FreeFontIndexes; - FreeColumnPlaces; - PrepareData(False); -end; - -procedure TdxMasterViewReportLink.CalcFontIndexes(AReportCells: TdxReportCells); -begin - FCaptionNodeFontIndex := AddFontToPool(CaptionNodeFont); - FEvenFontIndex := AddFontToPool(EvenFont); - FGroupNodeFontIndex := AddFontToPool(GroupNodeFont); - FFooterFontIndex := AddFontToPool(FooterFont); - FHeaderFontIndex := AddFontToPool(HeaderFont); - FOddFontIndex := AddFontToPool(OddFont); - FPreviewFontIndex := AddFontToPool(PreviewFont); - - if DrawMode = mvdmBorrowSource then - LoadFontIndexes(AReportCells); -end; - -procedure TdxMasterViewReportLink.LoadFontIndexes(AReportCells: TdxReportCells); -var - I, Index: Integer; - F: TFont; - Style: TdxMasterViewStyle; -begin - FFonts := TList.Create; - FFonts.Capacity := 1 + MasterView.StyleCount; - - FFontIndexes := TList.Create; - FFontIndexes.Capacity := 1 + MasterView.StyleCount; - - F := MasterView.Font; - FFonts.Add(F); - Index := AddFontToPool(F); - FFontIndexes.Add(Pointer(Index)); - - for I := 0 to MasterView.StyleCount - 1 do - begin - Style := MasterView.Styles[I]; - if svFont in Style.AssignedValues then - begin - F := Style.Font; - FFonts.Add(F); - Index := AddFontToPool(F); - FFontIndexes.Add(Pointer(Index)); - end; - end; -end; - -procedure TdxMasterViewReportLink.FreeFontIndexes; -begin - FreeAndNil(FFontIndexes); - FreeAndNil(FFonts); -end; - -procedure TdxMasterViewReportLink.LoadColumnPlaces; -var - I: Integer; - List: TList; - Level: TdxMasterViewLevelAccess; -begin - FLevels := TList.Create; - FLevels.Capacity := MasterView.AbsoluteLevelCount; - FColumnPlaces := TList.Create; - FColumnPlaces.Capacity := FLevels.Capacity; - for I := 0 to MasterView.AbsoluteLevelCount - 1 do - begin - Level := ExposeLevel(MasterView.AbsoluteLevels[I]); - FLevels.Add(Level); - Level.SaveVisibleColumnsPlaces(List); - FColumnPlaces.Add(List); - end; -end; - -procedure TdxMasterViewReportLink.FreeColumnPlaces; -var - I: Integer; - Level: TdxMasterViewLevelAccess; - ColumnPlace: TList; -begin - if FColumnPlaces <> nil then - begin - for I := 0 to FColumnPlaces.Count - 1 do - begin - Level := FLevels.List^[I]; - ColumnPlace := FColumnPlaces.List^[I]; - Level.FreeVisibleColumnsPlaces(ColumnPlace); - end; - FreeAndNil(FColumnPlaces); - end; - FreeAndNil(FLevels); -end; - -function TdxMasterViewReportLink.NodeExpanded(ANode: TdxMasterViewNode): Boolean; -begin - Result := ANode.Expanded or (AutoNodesExpand and ExposeNode(ANode).CanExpand); -end; - -procedure TdxMasterViewReportLink.AddNodes; - - procedure AddNode(ANode: TdxMasterViewNode); - var - I: Integer; - Node: TdxMasterViewNode; - begin - for I := 0 to ANode.Count - 1 do - begin - Node := ANode[I]; - if not IsExistSelectedNodes or IsSelectedNode(Node) then - FNodes.Add(Node); - if NodeExpanded(Node) then - AddNode(Node); - end; - end; - -begin - FNodes.Clear; - if not AutoNodesExpand then - if OnlySelected then - FNodes.Capacity := MasterView.SelectedItemCount - else - FNodes.Capacity := MasterView.AbsoluteItemCount; - AddNode(MasterView.Items); -end; - -function SortFunc(AItem1, AItem2: Pointer): Integer; -begin - Result := Integer(TdxMasterViewNode(AItem1).ParentNode) - Integer(TdxMasterViewNode(AItem2).ParentNode); - if Result = 0 then - Result := TdxMasterViewNode(AItem1).Index - TdxMasterViewNode(AItem2).Index; -end; - -procedure TdxMasterViewReportLink.BuildSelectedNodeList; -var - I: Integer; - Node, TestNode: TdxMasterViewNode; -begin - for I := 0 to MasterView.SelectedItemCount - 1 do - FSelectedNodes.Add(MasterView.SelectedItems[I]); - FSelectedNodes.Sort(SortFunc); - Node := nil; - for I := 0 to FSelectedNodes.Count - 1 do - begin - TestNode := FSelectedNodes.List^[I]; - if (Node <> nil) and (TestNode.ParentNode = Node.ParentNode) then - FSelectedNodes[I] := nil - else - Node := TestNode; - end; - FSelectedNodes.Pack; -end; - -procedure TdxMasterViewReportLink.ConstructReport(AReportCells: TdxReportCells); - - function CalcPreviewHeight(const S: string; AWidth: Integer): Integer; - var - DC: hDC; - //PrevFont: HFONT; - R: TRect; - begin - R := Rect(0, 0, AWidth, 0); - DC := GetDC(0); - Result := Renderer.CalcTextRect(DC, S, R, True, PreviewFont); - {PrevFont := SelectObject(DC, PreviewFont.Handle); - Result := 2 + Windows.DrawText(DC, PChar(S), Length(S), R, CalcFormat); - SelectObject(DC, PrevFont);} - ReleaseDC(0, DC); - end; - - function GetPreviewHeight(const S: string; AWidth: Integer): Integer; - begin - if AutoCalcPreviewLines then - if S <> '' then - Result := CalcPreviewHeight(S, AWidth) - else - Result := 0 - else - Result := PreviewLineCount * FPreviewLineHeight; - end; - - function GetItemHeight(ANode: TdxMasterViewNode; ACellType: TdxMasterViewLinkCellType; - AFullHeight: Boolean; AWidth: Integer; APreviewHeight: PInteger): Integer; - var - ALineHeight: Integer; - begin - case ANode.NodeType of - ntData: - begin - case ACellType of - mvctCell: - ALineHeight := FLineHeight; - mvctFooter: - ALineHeight := FFooterLineHeight; - mvctHeader: - ALineHeight := FHeaderLineHeight; - else - ALineHeight := FLineHeight; - end; - if AFullHeight then - Result := ANode.Level.Layout.RowCount * ALineHeight - else - Result := ALineHeight; - if APreviewHeight <> nil then - begin - APreviewHeight^ := GetPreviewHeight(ANode.PreviewText, - AWidth - ANode.Level.PreviewLeftIndent); - if AFullHeight then Inc(Result, APreviewHeight^); - end; - end; - ntCaption: - Result := FLevelCaptionHeight; - ntGroup: - Result := FGroupNodeHeight; - else - Result := FLevelCaptionHeight; - end; - end; - - function IsGridExists(ANode: TdxMasterViewNode): Boolean; - begin - Result := ((ANode.PreviewText <> '') and (lovGridWithPreview in ANode.Level.OptionsView)) or - (lovGrid in ANode.Level.OptionsView) - end; - - function GetParentLevelsSeparatorWidth(ALevel: TdxMasterViewLevel): Integer; - begin - Result := 0; - while ALevel <> nil do - begin - Inc(Result, ALevel.LevelSeparatorWidth); - ALevel := ALevel.Parent; - end; - end; - - function GetLevelWidth(ALevel: TdxMasterViewLevel): Integer; - var - {Decrease, }Increase: Integer; - begin - {ver 2.3} -// Decrease := -2; - Result := ALevel.Layout.VisibleWidth + {ver 2.3} GetParentLevelsSeparatorWidth(ALevel.Parent); - repeat - Increase := ALevel.GroupColumnCount; - if lovCaption in ALevel.OptionsView then - Inc(Increase); - if ALevel.Parent <> MasterView.Levels then - Inc(Increase); - Inc(Result, FIndent * Increase); -// if not (lovGrid in ALevel.Parent.OptionsView) then Dec(Result); - {ver 2.3} -// Inc(Decrease); - ALevel := ALevel.Parent; - until ALevel = MasterView.Levels; - {ver 2.3} - {if Decrease > 0 then - Dec(Result, Decrease) - else - Inc(Result, Decrease);} - end; - - function CanShowPreviewGrid(ANode: TdxMasterViewNode): Boolean; - begin - Result := ShowGrid(ANode) and ShowPreviewGrid(ANode); - end; - - function CanShowGroupFooterGrid(ANode: TdxMasterViewNode): Boolean; - begin - Result := ShowGrid(ANode) and ShowGroupFooterGrid; - end; - - function GetDataItemSides(ANode: TdxMasterViewNode; AColumnPlace: PColumnPlace; - ACellType: TdxMasterViewLinkCellType): TdxCellSides; - begin - Result := []; - case ACellType of - mvctCell: - case ANode.NodeType of - ntData: - if CanShowPreviewGrid(ANode) then - begin - Result := csAll; - if AColumnPlace^.ColIndex = 0 then Result := Result - [csLeft]; - end - else - begin - if ANode.Level.Layout.IsColumnLast(AColumnPlace^.Column) or (ANode.Level.ViewMode = vmVertical) then - Result := Result + [csRight]; - if ShowGrid(ANode) then - begin - if AColumnPlace^.RowIndex = 0 then - Result := Result + [csTop]; - if (not ShowPreview(ANode) or (FPreviewLineCount = 0) or (ANode.Level.ViewMode = vmVertical)) and - // (ANode.Count > 0) and - ((AColumnPlace^.RowIndex + AColumnPlace^.RowCount) = ANode.Level.Layout.RowCount) then - Result := Result + [csBottom]; - end; - end; - ntGroup, - ntCaption: - if CanShowPreviewGrid(ANode) then Result := csAll - [csLeft]; - end; - - mvctPreview: - begin - Result := [csRight]; - if ShowGrid(nil) then - begin - Result := Result + [csBottom]; - if ShowPreviewGrid(ANode) then Result := Result + [csTop]; - end; - end; - - mvctHeader: - Result := csAll; - - mvctFooter: - if CanShowGroupFooterGrid(ANode) then Result := csAll; - end; - end; - - function GetDataItemRect(ANode: TdxMasterViewNode; AColumnPlace: PColumnPlace; - ACell: TdxReportCell; ACellType: TdxMasterViewLinkCellType): TRect; - var - AColumn: TdxMasterViewColumnAccess; - ALineHeight, ANodeLevelIndex, ColIndex: Integer; - Layout: TdxMasterViewLayout; - begin - AColumn := nil; - ColIndex := 0; - if AColumnPlace <> nil then - begin - AColumn := ExposeColumn(AColumnPlace^.Column); - ColIndex := AColumnPlace^.ColIndex; - end; - ANodeLevelIndex := ExposeNode(ANode).GetLevelIndex; - ALineHeight := GetItemHeight(ANode, ACellType, False, 0, nil); - Result := Rect(0, 0, 0, 0); - with Result do - begin - if AColumn <> nil then - begin - Left := AColumn.Offset + MasterView.LeftPos - GetParentLevelsSeparatorWidth(ANode.Level.Parent); - //Inc(Left, ANodeLevelIndex); - - // v 2.3 - //if (ACellType in [mvctCell, mvctHeader]) and (ANode.Level.ViewMode = vmVertical) then - // Inc(Left, 1 + ANodeLevelIndex); - - if not IsGridExists(ANode) then - Inc(Left); - - if (ACellType = mvctCell) and (ANode.NodeType = ntData) and - (ANode.Level.ViewMode = vmHorizontal) and (ColIndex = 0) and - ExposeNode(ANode).HasExpandButton then - Inc(Left, FIndent); - - Top := AColumnPlace^.RowIndex * ALineHeight; - Bottom := Top + AColumnPlace^.RowCount * ALineHeight; - if ANode.Level.ViewMode = vmHorizontal then - begin - Right := Left + AColumn.VisibleWidth; - if (ACellType = mvctCell) and (ANode.NodeType = ntData) and - ExposeNode(ANode).HasExpandButton and (ColIndex = 0) then - Dec(Right, FIndent); - if AColumn.Level.Layout.IsColumnLast(AColumn) then - Right := ACell.BoundsRect.Right; - end - else - begin - Layout := ANode.Level.Layout; - if ACellType in [mvctCell, mvctFooter] then - begin - if ShowHeaders(ANode) then - Inc(Left, Layout.HeaderWidths[ColIndex]); - Right := Left + Layout.ContentWidths[ColIndex]; - if not ShowHeaders(ANode) then - Inc(Right, Layout.HeaderWidths[ColIndex]); - end - else - Right := Left + Layout.HeaderWidths[ColIndex]; - end - end - else - begin - Right := Left + GetLevelWidth(ANode.Level); - Bottom := Top + ACell.Height; - end; - if ANode.NodeType > ntData then - Inc(Left, FIndent * (ANodeLevelIndex + 1)); - end; - - if ACellType = mvctFooter then - begin - OffsetRect(Result, -ACell.Left, 0); - InflateRect(Result, -2, -2); - //if Use3DEffects then OffsetRect(Result, 0, -1); - end; - - if Use3DEffects and (ACellType in [mvctFooter{, mvctHeader}]) then //2.3 - begin - Inc(Result.Left); - Inc(Result.Top); - end; - end; - - function GetPreviewRect(ANode: TdxMasterViewNode; ACell: TdxReportCell): TRect; - begin - with Result do - begin - Left := FIndent * ExposeNode(ANode).GetLevelIndex; - if (ANode.NodeType = ntData) and ExposeNode(ANode).HasExpandButton then - Inc(Left, FIndent); - Top := ACell.Height - FPreviewFullHeight; - Right := ACell.Width; - Bottom := ACell.Height; - end; - end; - - function GetNodeFontIndex(ANode: TdxMasterViewNode; AIsOdd, ADirect: Boolean): Integer; - begin - case ANode.NodeType of - ntData: - if ADirect then - Result := FFontIndex - else - if AIsOdd then - Result := FOddFontIndex - else - Result := FEvenFontIndex; - ntCaption: - Result := FCaptionNodeFontIndex; - else {ntGroup} - Result := FGroupNodeFontIndex; - end; - end; - - function GetFontIndex(AFont: TFont): Integer; - var - Index: Integer; - begin - Index := FFonts.IndexOf(AFont); - if Index > -1 then - Result := Integer(FFontIndexes.List^[Index]) - else - Result := FFontIndex; - end; - - function GetCellFontIndex(ANode: TdxMasterViewNode; AColumn: TdxMasterViewColumn; - ACellType: TdxMasterViewLinkCellType; AIsOdd: Boolean): Integer; - begin - case ACellType of - mvctCell, - mvctPreview: - case DrawMode of - mvdmStrict: - if ACellType = mvctPreview then - Result := FPreviewFontIndex - else - Result := GetNodeFontIndex(ANode, AIsOdd, True); - mvdmOddEven: - if ACellType = mvctPreview then - Result := FPreviewFontIndex - else - Result := GetNodeFontIndex(ANode, AIsOdd, False); - else {mvdmBorrowSource} - if ACellType = mvctPreview then - Result := GetFontIndex(ExposeLevel(ANode.Level).PreviewFont) - else - if AColumn <> nil then - Result := GetFontIndex(ExposeColumn(AColumn).ContentFont) - else - case ANode.NodeType of - ntData: - Result := GetFontIndex(ExposeLevel(ANode.Level).ContentFont); - ntCaption: - Result := GetFontIndex(ExposeLevel(ANode.Level).CaptionFont); - else {ntGroup} - Result := GetFontIndex(ExposeLevel(ANode.Level).GroupFont); - end; - end; - mvctHeader: - if DrawMode < mvdmBorrowSource then - Result := FHeaderFontIndex - else - if AColumn <> nil then - Result := GetFontIndex(ExposeColumn(AColumn).HeaderFont) - else - Result := GetFontIndex(ExposeLevel(ANode.Level).HeaderFont); - mvctFooter: - if DrawMode < mvdmBorrowSource then - Result := FFooterFontIndex - else - if AColumn <> nil then - Result := GetFontIndex(ExposeColumn(AColumn).FooterFont) - else - Result := GetFontIndex(ExposeLevel(ANode.Level).FooterFont); - else - Result := 0; - end; - end; - - function GetNodeColor(ANode: TdxMasterViewNode; AIsOdd, ADirect: Boolean): TColor; - begin - case ANode.NodeType of - ntData: - if ADirect then - Result := Color - else - if AIsOdd then - Result := OddColor - else - Result := EvenColor; - ntCaption: - Result := CaptionColor; - else {ntGroup} - Result := GroupNodeColor; - end; - end; - - function GetCellColor(ANode: TdxMasterViewNode; AColumn: TdxMasterViewColumn; - ACellType: TdxMasterViewLinkCellType; AIsOdd: Boolean): TColor; - var - IsOdd: Boolean; - begin - case ACellType of - mvctCell, - mvctPreview: - case DrawMode of - mvdmStrict: - if ACellType = mvctPreview then - Result := PreviewColor - else - Result := GetNodeColor(ANode, AIsOdd, True); - mvdmOddEven: - Result := GetNodeColor(ANode, AIsOdd, False); - - else {mvdmBorrowSource} - begin - IsOdd := Odd(ANode.Index) and (ANode.NodeType = ntData); - if ACellType = mvctPreview then - begin - if IsOdd then - begin - Result := ExposeLevel(ANode.Level).PreviewAnotherColor; - if Result = clNone then - Result := ExposeLevel(ANode.Level).PreviewColor; - end - else - Result := ExposeLevel(ANode.Level).PreviewColor - end - else - begin - if AColumn <> nil then - begin - if IsOdd then - begin - Result := ExposeColumn(AColumn).ContentAnotherColor; - if Result = clNone then - Result := ExposeLevel(ANode.Level).ContentColor; - end - else - Result := ExposeColumn(AColumn).ContentColor - end - else - begin - case ANode.NodeType of - ntData: - if IsOdd then - begin - Result := ExposeLevel(ANode.Level).ContentAnotherColor; - if Result = clNone then - Result := ExposeLevel(ANode.Level).ContentColor; - end - else - Result := ExposeLevel(ANode.Level).ContentColor; - ntCaption: - Result := ExposeLevel(ANode.Level).CaptionColor; - else {ntGroup} - Result := ExposeLevel(ANode.Level).GroupColor; - end; - end; - end; - end; - end; - - mvctHeader: - if DrawMode < mvdmBorrowSource then - Result := HeaderColor - else - if AColumn <> nil then - Result := ExposeColumn(AColumn).HeaderColor - else - Result := ExposeLevel(ANode.Level).HeaderColor; - - mvctFooter: - if DrawMode < mvdmBorrowSource then - Result := FooterColor - else - if AColumn <> nil then - Result := ExposeColumn(AColumn).FooterColor - else - Result := ExposeLevel(ANode.Level).FooterColor; - else - Result := Color; - end; - Result := ColorToRGB(Result); - end; - - function IsCellTransparent(ANode: TdxMasterViewNode; AColumn: TdxMasterViewColumn; - ACellType: TdxMasterViewLinkCellType; AIsOdd: Boolean): Boolean; - begin - if DrawMode < mvdmBorrowSource then - if (ANode.NodeType = ntData) and (ACellType in [mvctCell, mvctPreview]) then - Result := Transparent - else - Result := FixedTransparent - else - Result := ColorToRGB(GetCellColor(ANode, AColumn, ACellType, AIsOdd)) = ColorToRGB(Color); - end; - - function FirstInSelection(ANode: TdxMasterViewNode): Boolean; - begin - Result := FSelectedNodes.IndexOf(ANode) <> -1; - end; - - function CanDrawHeaders(ANode: TdxMasterViewNode): Boolean; - begin - with ANode do - Result := ShowHeaders(ANode) and (NodeType = ntData) and (ANode.Level.ViewMode = vmHorizontal) and - ( - (([lohForFirstNode, lohForFirstVisibleNode] * Level.OptionsHeader <> []) and - (IsFirstInLevel or (IsExistSelectedNodes and FirstInSelection(ANode))) - ) - or - (([lohAfterExpandedNode] * Level.OptionsHeader <> []) and - (IsFirstInLevel or NodeExpanded(ParentNode[Index - 1]))) - ); - end; - - function CanDrawFooters(ANode: TdxMasterViewNode): Boolean; - begin - with ExposeNode(ANode) do - Result := ShowFooters(ANode) and (NodeType in [ntData, ntCaption]) and IsLastInLevel and - (not Expanded and (not AutoNodesExpand or not CanExpand)); - end; - - function GetNodeFooterCount(ANode: TdxMasterViewNode): Integer; - var - FooterSize, EndLevelCount, EndLevelData, I: Integer; - - function HasFooter(AParentIndex: Integer): Boolean; - var - Level: TdxMasterViewLevelAccess; - begin - Result := (FooterSize <> 0) and ((AParentIndex <> 0) or (ANode.NodeType = ntData)); - if Result and (AParentIndex <> -1) then - begin - Level := ExposeLevel(ANode.Level); - with ExposeLevel(Level.Parents[AParentIndex]) do - Result := ShowFooter and (AParentIndex < EndLevelCount); - end; - end; - - begin - ExposeNode(ANode).EndLevel(FooterSize, EndLevelCount, EndLevelData); - Result := 0; - for I := 0 to EndLevelCount - 1 do - if HasFooter(I) then Inc(Result); - end; - - function GetIndentCellSides(ANode: TdxMasterViewNode; - ACellType: TdxMasterViewLinkCellType; ALevelIndex, ACurrentIndex: Integer): TdxCellSides; - var - ParentNode: TdxMasterViewNode; - begin - Result := []; - if ShowGrid(nil) then - begin - Result := [csLeft]; - if (ACurrentIndex < ALevelIndex) or (ANode.NodeType = ntData) then - Result := Result + [csRight]; - - if (ACellType = mvctCell) and (ACurrentIndex = ALevelIndex) and - (ANode.NodeType in [ntCaption, ntGroup]) then - Result := Result + [csTop]; - - ParentNode := ANode.ParentNodes[ALevelIndex - ACurrentIndex - Byte(ANode.NodeType <> ntData)]; - if ACellType = mvctCell then - begin - if not NodeExpanded(ParentNode) then - if ANode.NodeType = ntData then - begin - if ParentNode.IsLast and (not CanDrawFooters(ANode) or (GetNodeFooterCount(ANode) = 0)) then - Result := Result + [csBottom] - end - else - if (ACurrentIndex = ALevelIndex) or ParentNode.IsLast then - Result := Result + [csBottom] - end - else - if (ACellType = mvctFooter) and (ACurrentIndex = ALevelIndex) and ANode.Level.IsLast then - Result := Result + [csBottom]; - end - else - if ACurrentIndex = 0 then Result := [csLeft]; - end; - - procedure SetupExpandButtons(ANode: TdxMasterViewNode; AItem: TdxReportCellExpandButton; AShowButton: Boolean); - begin - with AItem do - begin - ShowButton := AShowButton; - if ShowButton then - begin - ButtonBorder3D := Use3DEffects; - ButtonBorder3DSoft := Use3DEffects and UseSoft3D; - ButtonTransparent := False; - ButtonInteriorColor := clBtnFace; - ButtonExpanded := NodeExpanded(ANode); - if ButtonBorder3D then - if ButtonBorder3DSoft then - ButtonSize := 11 - else - ButtonSize := 12 - else - ButtonSize := 11; - end; - end; - end; - - function DrawIndent(ANode: TdxMasterViewNode; ACell: TdxReportCell; - ACellType: TdxMasterViewLinkCellType; AIsOdd: Boolean): Integer; - var - I, L, LevelIndex: Integer; - Item: TdxReportCellExpandButton; - B, IsOdd: Boolean; - PrevSibl: TdxReportItem; - ParentNode: TdxMasterViewNode; - begin - LevelIndex := ExposeNode(ANode).GetLevelIndex; - if ANode.NodeType = ntData then - Dec(LevelIndex); - - for I := 0 to LevelIndex do - begin - Item := TdxReportCellExpandButton.Create(ACell); - with Item do - begin - L := 0; - PrevSibl := GetPrevSibling; - if PrevSibl <> nil then - L := TdxReportVisualItem(PrevSibl).BoundsRect.Right; - BoundsRect := Rect(L, 0, L + FIndent, ACell.Height); - ParentNode := ANode.ParentNodes[LevelIndex - I + Byte(ANode.NodeType = ntData)]; - IsOdd := Odd(ParentNode.Index) and (ParentNode.NodeType = ntData); - Transparent := IsCellTransparent(ParentNode, nil, mvctCell, IsOdd); - Color := GetCellColor(ParentNode, nil, mvctCell, IsOdd); - CellSides := GetIndentCellSides(ANode, ACellType, LevelIndex, I); - - // 2.3 expand buttons - B := ShowExpandButtons and (I = LevelIndex) and - (ANode.NodeType in [ntCaption, ntGroup]) and - ExposeNode(ANode).HasExpandButton and ExposeNode(ANode).ShowExpandButton; - SetupExpandButtons(ANode, Item, B); - end; - end; - - if (ACellType = mvctCell) and (ANode.NodeType = ntData) and - (ExposeNode(ANode).HasExpandButton or NodeExpanded(ANode)) then - begin - Item := TdxReportCellExpandButton.Create(ACell); - with Item do - begin - L := 0; - PrevSibl := GetPrevSibling; - if PrevSibl <> nil then - L := TdxReportVisualItem(PrevSibl).BoundsRect.Right; - BoundsRect := - Rect(L, 0, L + FIndent, ACell.Height); - CellSides := [csLeft]; - if ShowGrid(ANode) then - begin - CellSides := CellSides + [csTop]; - if {ANode.IsLast or }not NodeExpanded(ANode) then - CellSides := CellSides + [csBottom]; - if ANode.Level.ViewMode = vmVertical then - CellSides := CellSides + [csRight]; - end; - Transparent := IsCellTransparent(ANode, nil, mvctCell, AIsOdd); - Color := GetCellColor(ANode, nil, mvctCell, AIsOdd); - - // 2.3 expand buttons - B := ShowExpandButtons and ExposeNode(ANode).HasExpandButton and ExposeNode(ANode).ShowExpandButton; - SetupExpandButtons(ANode, Item, B); - end; - end; - - Result := FIndent * (LevelIndex + Byte(ANode.NodeType = ntData)); - end; - - procedure Setup3DEffects(AItem: TdxReportVisualItem; ACellType: TdxMasterViewLinkCellType); - begin - with AItem do - if Use3DEffects then - begin - EdgeMode := cem3DEffects; - case ACellType of - mvctFooter: - if AItem is TdxReportCell then - begin - Edge3DStyle := cesRaised; - Edge3DSoft := UseSoft3D; - end - else - begin - Edge3DStyle := cesSunken; - Edge3DSoft := True; - end; - mvctHeader: - begin - Edge3DStyle := cesRaised; - Edge3DSoft := UseSoft3D; - end - end; - end - else - EdgeMode := cemPattern; - end; - - procedure ProcessCells(ANode: TdxMasterViewNode; AParent: TdxReportCell; - ACellType: TdxMasterViewLinkCellType; AIsOdd: Boolean); - var - I, L, ACellHeight: Integer; - R: TRect; - ADataClass: TdxReportCellDataClass; - ADataItem: TAbstractdxReportCellData; - ACell: TdxReportCell; - APrevSibl: TdxReportItem; - AColumn, AGroupColumn: TdxMasterViewColumn; - AColumnPlaces: TList; - AColumnPlace: PColumnPlace; - begin - if ShowPreview(ANode) and (ACellType = mvctCell) and (ANode.NodeType = ntData) then - begin - L := GetLevelWidth(ANode.Level); - ACellHeight := GetItemHeight(ANode, ACellType, True, L, @FPreviewFullHeight); - end - else - begin - ACellHeight := GetItemHeight(ANode, ACellType, True, 0, nil); - FPreviewFullHeight := 0; - end; - - ACell := TdxReportCell.Create(AParent); - with ACell do - begin - BoundsRect := Rect(0, 0, GetLevelWidth(ANode.Level), ACellHeight); - APrevSibl := GetPrevSibling; - if APrevSibl <> nil then - Top := TdxReportCell(APrevSibl).BoundsRect.Bottom; - CellSides := [csLeft, csRight]; - if ANode = FNodes.List^[0] then - CellSides := CellSides + [csTop]; - Transparent := {False;//} True; //??? rest spaces in column and data areas if ones exist must be drawn with special colors - if IsSupportedCustomDraw(nil) and ((ACellType <> mvctHeader) or (ANode.Level.ViewMode = vmVertical)) then - Data := Integer(ANode); - end; - - L := DrawIndent(ANode, ACell, ACellType, AIsOdd); - - if ACellType = mvctFooter then - begin - ACell := TdxReportCell.Create(ACell); - with ACell do - begin - R := Rect(L, 0, Parent.BoundsRect.Right, ACellHeight); - { 2.3 - if Use3DEffects then - begin - Inc(R.Left); - Inc(R.Top); - end;} - BoundsRect := R; - APrevSibl := GetPrevSibling; - if APrevSibl <> nil then - Top := TdxReportCell(APrevSibl).BoundsRect.Bottom; - CellSides := csAll; - Transparent := FixedTransparent; - if not Transparent then - Color := GetCellColor(ANode, nil, mvctFooter, False); - if Use3DEffects then - Setup3DEffects(ACell, ACellType); - if IsSupportedCustomDraw(nil) then - Data := Integer(ANode); - end; - end; - - case ANode.NodeType of - ntData: - begin - if (ACellType = mvctHeader) or (ANode.Level.ViewMode = vmVertical) or - (not ShowHeaders(ANode) and ANode.IsFirstinLevel) then - FDelimitersCells.Add(ACell); - - AColumnPlaces := FColumnPlaces.List^[FLevels.IndexOf(ANode.Level)]; - - for I := 0 to AColumnPlaces.Count - 1 do - begin - AColumnPlace := AColumnPlaces.List^[I]; - AColumn := AColumnPlace^.Column; - if (ACellType = mvctFooter) and (AColumn.SummaryType = dxMasterView.stNone) then - Continue; - ADataClass := GetDataClass(ANode, AColumn, ACellType); - if ADataClass = nil then Continue; - - ADataItem := ADataClass.Create(ACell); - AssignValues(ADataItem, ANode, AColumn, ACellType); - ADataItem.CellSides := - GetDataItemSides(ANode, AColumnPlace, ACellType); - ADataItem.BoundsRect := - GetDataItemRect(ANode, AColumnPlace, ACell, ACellType); - ADataItem.Transparent := - IsCellTransparent(ANode, AColumn, ACellType, AIsOdd); - if not ADataItem.Transparent then - ADataItem.Color := GetCellColor(ANode, AColumn, ACellType, AIsOdd); - ADataItem.FontIndex := - GetCellFontIndex(ANode, AColumn, ACellType, AIsOdd); - if Use3DEffects and (ACellType in [mvctFooter, mvctHeader]) then - Setup3DEffects(ADataItem, ACellType); - if IsSupportedCustomDraw(nil) then - ADataItem.Data := Integer(AColumn); - - if (ANode.Level.ViewMode = vmVertical) and (ACellType <> mvctFooter) and ShowHeaders(ANode) then - begin - ADataClass := GetDataClass(ANode, AColumn, mvctHeader); - ADataItem := ADataClass.Create(ACell); - with ADataItem do - begin - AssignValues(ADataItem, ANode, AColumn, mvctHeader); - CellSides := - GetDataItemSides(ANode, AColumnPlace, mvctHeader); - BoundsRect := - GetDataItemRect(ANode, AColumnPlace, ACell, mvctHeader); - Transparent := - IsCellTransparent(ANode, nil, mvctHeader, AIsOdd); - if not Transparent then - Color := GetCellColor(ANode, AColumn, mvctHeader, AIsOdd); - FontIndex := - GetCellFontIndex(ANode, AColumn, mvctHeader, AIsOdd); - if Use3DEffects then - Setup3DEffects(ADataItem, mvctHeader); - if IsSupportedCustomDraw(nil) then - Data := Integer(AColumn); - end; - end; - end; - if ShowPreview(ANode) and (FPreviewFullHeight > 0) then - begin - ADataItem := TdxReportCellString.Create(ACell); - with TdxReportCellString(ADataItem) do - begin - Text := ANode.PreviewText; - Indent := ANode.Level.PreviewLeftIndent; - Multiline := True; - CellSides := - GetDataItemSides(ANode, nil, mvctPreview); - BoundsRect := - GetPreviewRect(ANode, ACell); - Transparent := - IsCellTransparent(ANode, nil, mvctPreview, AIsOdd); - if not Transparent then - Color := GetCellColor(ANode, nil, mvctPreview, AIsOdd); - FontIndex := - GetCellFontIndex(ANode, nil, mvctPreview, AIsOdd); - end; - end; - end; - ntCaption: - begin - ADataItem := TdxReportCellString.Create(ACell); - with TdxReportCellString(ADataItem) do - begin - Text := ANode.Level.Caption; - CellSides := - GetDataItemSides(ANode, nil, ACellType); - BoundsRect := - GetDataItemRect(ANode, nil, ACell, mvctCell); - Transparent := - IsCellTransparent(ANode, nil, ACellType, AIsOdd); - if not Transparent then - Color := GetCellColor(ANode, nil, ACellType, AIsOdd); - FontIndex := - GetCellFontIndex(ANode, nil, ACellType, AIsOdd); - if IsSupportedCustomDraw(nil) then - Data := Integer(ANode); - end; - end; - ntGroup: - begin - ADataItem := TdxReportCellString.Create(ACell); - with TdxReportCellString(ADataItem) do - begin - AGroupColumn := ANode.Level.GroupColumns[ANode.GroupIndex]; - Text := AGroupColumn.Caption + ' : ' + - ExposeColumn(AGroupColumn).GetGroupDisplayText(ANode); - CellSides := - GetDataItemSides(ANode, nil, ACellType); - BoundsRect := - GetDataItemRect(ANode, nil, ACell, mvctCell); - Transparent := - IsCellTransparent(ANode, nil, ACellType, AIsOdd); - if not Transparent then - Color := GetCellColor(ANode, nil, ACellType, AIsOdd); - FontIndex := - GetCellFontIndex(ANode, nil, ACellType, AIsOdd); - if IsSupportedCustomDraw(nil) then - Data := Integer(AGroupColumn); - end; - end; - end; - end; - - procedure IterateNodes; - var - I, J, FooterCount: Integer; - Node, FooterNode: TdxMasterViewNode; - IsOdd: Boolean; - begin - for I := 0 to FNodes.Count - 1 do - begin - Node := TdxMasterViewNode(FNodes.List^[I]); - IsOdd := not (Odd(Node.Index) and (Node.NodeType = ntData)); - - if CanDrawHeaders(Node) then - ProcessCells(Node, AReportCells.Cells, mvctHeader, IsOdd); - - ProcessCells(Node, AReportCells.Cells, mvctCell, IsOdd); - - if CanDrawFooters(Node) then - begin - FooterCount := GetNodeFooterCount(Node); - if FooterCount > 0 then - begin - FooterNode := Node; - if FooterNode.NodeType = ntCaption then - FooterNode := FooterNode.ParentNodeWithData; - J := 0; - while J < FooterCount do - begin - if lovFooter in FooterNode.Level.OptionsView then - begin - ProcessCells(FooterNode, AReportCells.Cells, mvctFooter, True); - Inc(J); - end; - FooterNode := FooterNode.ParentNodeWithData; - end; - end; - end; - AReportCells.DoProgress(MulDiv(I, 100, FNodes.Count)); - if AbortBuilding then Break; - end; - end; - -var - I, Width, Height: Integer; - Cell: TdxReportCell; -begin - if Component = nil then Exit; - inherited ConstructReport(AReportCells); - - PrepareConstruct(AReportCells); - try - AReportCells.BorderColor := GridLineColor; - with AReportCells.Cells do - begin - Color := dxDefaultColor; - CellSides := []; - Transparent := True; - FontIndex := 0; - end; - - if FNodes.Count > 0 then IterateNodes; - - if not AbortBuilding then - begin - Width := 0; - for I := 0 to AReportCells.Cells.CellCount - 1 do - begin - Cell := AReportCells.Cells[I]; - if Cell.Width > Width then Width := Cell.Width; - end; - Height := 0; - Cell := AReportCells.Cells.LastCell; - if Cell <> nil then Height := Cell.BoundsRect.Bottom; - AReportCells.Cells.BoundsRect := Rect(0, 0, Width, Height); - end; - finally - UnprepareConstruct(AReportCells); - end; -end; - -{ TdxMVReportLinkDesignWindow } - -constructor TdxMVReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhcMasterViewReportLinkDesigner; - inherited Create(AOwner); - CreateControls; - - LoadMemData; - PageControl1.ActivePage := PageControl1.Pages[0]; - FLastIndex := -1; - dxPSPopupMenuController.RegisterControl(lbxFonts); -end; - -destructor TdxMVReportLinkDesignWindow.Destroy; -begin - dxPSPopupMenuController.UnregisterControl(lbxFonts); - inherited Destroy; -end; - -const - sdxOrderNo = 'OrderNo'; - sdxName = 'Name'; - sdxCount = 'Count'; - sdxCompany = 'Company'; - sdxAddress = 'Address'; - sdxPrice = 'Price'; - sdxCash = 'Cash'; - -procedure TdxMVReportLinkDesignWindow.CreateDataSets; - - procedure AddField(AFieldClass: TFieldClass; ADataSet: TDataSet; - const AFieldName: string; ASize: Integer; ARequired: Boolean); - begin - with AFieldClass.Create(Self) do - begin - FieldName := AFieldName; - DataSet := ADataSet; - Size := ASize; - Required := ARequired; - end; - end; - -begin - FmdMaster := TdxEasyMemData.Create(Self); - AddField(TIntegerField, FmdMaster, sdxOrderNo, 0, True); - AddField(TStringField, FmdMaster, sdxName, 30, False); - AddField(TStringField, FmdMaster, sdxCompany, 30, False); - AddField(TStringField, FmdMaster, sdxAddress, 50, False); - - FmdDetail := TdxEasyMemData.Create(Self); - AddField(TIntegerField, FmdDetail, sdxOrderNo, 0, True); - AddField(TIntegerField, FmdDetail, sdxCount, 0, False); - AddField(TCurrencyField, FmdDetail, sdxPrice, 0, False); - AddField(TBooleanField, FmdDetail, sdxCash, 0, False); - - FmdMaster.Open; - FmdMaster.InsertRecord([1, sdxName1, sdxCompany1, sdxAddress1]); - FmdMaster.InsertRecord([2, sdxName2, sdxCompany2, sdxAddress2]); - - FmdDetail.Open; - FmdDetail.InsertRecord([1, 100, 9.00, True]); - FmdDetail.InsertRecord([1, 120, 19.00, False]); - FmdDetail.InsertRecord([2, 110, 21.00, True]); - FmdDetail.InsertRecord([2, 90, 100.00, True]); - FmdDetail.InsertRecord([2, 140, 111.00, False]); - FmdDetail.InsertRecord([2, 100, 112.00, False]); - - FdsMaster := TDataSource.Create(Self); - FdsMaster.DataSet := FmdMaster; - - FdsDetail := TDataSource.Create(Self); - FdsDetail.DataSet := FmdDetail; -end; - -procedure TdxMVReportLinkDesignWindow.InitializeMasterView; - - function CreateColumn(ALevel: TdxMasterViewLevel; AColumnClass: TdxMasterViewColumnClass; - const AFieldName: string; const ACaption: string; AMinWidth: Integer): TdxMasterViewColumn; - begin - Result := ALevel.CreateColumn(AColumnClass); - with Result do - begin - FieldName := AFieldName; - MinWidth := AMinWidth; - Caption := ACaption; - end; - end; - - function CreateLevel(AParent: TdxMasterViewLevel; ADataSource: TDataSource): TdxMasterViewLevel; - begin - Result := AParent.Add; - with Result do - begin - CaptionStyle := mvsCaptionStyle; - ContentStyle := mvsContentStyle; - FooterStyle := mvsFooterStyle; - GroupStyle := mvsGroupStyle; - HeaderStyle := mvsHeaderStyle; - PreviewStyle := mvsPreviewStyle; - - OnGetContentStyle := dxMVPreviewGetContentStyle; - OnGetPreviewStyle := dxMVPreviewGetContentStyle; - - DataSource := ADataSource; - ID := sdxOrderNo; - end; - end; - -begin - FMVMasterLevel := CreateLevel(dxMVPreview.Levels, FdsMaster); - with FMVMasterLevel do - begin - OptionsView := FMVMasterLevel.OptionsView + [lovPreview]; - PreviewFieldName := sdxAddress; - end; - FMVColumnName := CreateColumn(FMVMasterLevel, TdxMasterViewColumn, sdxName, sdxNameCaption, 80); - FMVColumnAddress := CreateColumn(FMVMasterLevel, TdxMasterViewColumn, sdxCompany, sdxCompanyCaption, 154); - - FMVDetailLevel := CreateLevel(FMVMasterLevel, FdsDetail); - with FMVDetailLevel do - begin - DetailKey := sdxOrderNo; - MasterKey := sdxOrderNo; - end; - FMVColumnCount := CreateColumn(FMVDetailLevel, TdxMasterViewColumn, sdxCount, - sdxCountCaption, 83); - with FMVColumnCount do - begin - SummaryType := stAverage; - SummaryFieldName := sdxCount; - end; - FMVColumnPrice := CreateColumn(FMVDetailLevel, TdxMasterViewColumn, sdxPrice, - sdxPriceCaption, 100); - with FMVColumnPrice do - begin - SummaryType := stAverage; - SummaryFieldName := sdxPrice; - end; - - FMVColumnCash := TdxMasterViewCheckColumn(CreateColumn(FMVDetailLevel, - TdxMasterViewCheckColumn, sdxCash, sdxCashCaption, 50)); - with FMVColumnCash do - begin - ValueChecked := 'True'; - ValueUnchecked := 'False'; - end; -end; - -procedure TdxMVReportLinkDesignWindow.LoadMemData; -begin - CreateDataSets; - InitializeMasterView; - dxMVPreview.ApplyBestFit(nil, nil); -end; - -{ - dxMVMasterLevelName.Width := 80; - dxMVMasterLevelOrderNo.Width := 50; - dxMVMasterLevelAddress.Width := 104; - - dxMVDetailLevelOrderNo.Width := 50; - dxMVDetailLevelCount.Width := 83; - dxMVDetailLevelPrice.Width := 100; -} - -procedure TdxMVReportLinkDesignWindow.pbxPreviewPaint(Sender: TObject); -begin - with TdxPSPaintPanel(Sender) do - PaintPreview(Canvas, ClientRect); -end; - -procedure FrameRectColor(DC: hDC; const R: TRect; AColor: TColor); -var - Brush: HBRUSH; -begin - Brush := CreateSolidBrush(ColorToRGB(AColor)); - FrameRect(DC, R, Brush); - DeleteObject(Brush); -end; - -procedure TdxMVReportLinkDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -var - DC: HDC; -begin - inherited; - DC := ACanvas.Handle; - dxMVPreview.PaintTo(DC, R.Left, R.Top); - Dec(R.Right, 2); - Dec(R.Bottom); - FrameRectColor(DC, R, ReportLink.GridLineColor); -end; - -procedure TdxMVReportLinkDesignWindow.CreateControls; - - function CreateColorCombo(AParent: TWinControl; AHost: TControl; - ATag: Integer; AAutoColor: TColor; ALabel: TLabel): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(Result) do - begin - BoundsRect := AHost.BoundsRect; - Tag := ATag; - Parent := AParent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - OnChange := ccbxColorChange; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - -begin - FccbxColor := - CreateColorCombo(gbxTransparent, bvlColorHolder, 0, dxDefaultColor, lblColor); - FccbxEvenColor := - CreateColorCombo(gbxTransparent, bvlEvenColorHolder, 1, dxDefaultColor, lblEvenColor); - FccbxPreviewColor := - CreateColorCombo(gbxTransparent, bvlPreviewColorHolder, 2, dxDefaultColor, lblPreviewColor); - - FccbxCaptionColor := - CreateColorCombo(gbxFixedTransparent, bvlCaptionColorHolder, 3, dxDefaultFixedColor, lblLevelCaptionColor); - FccbxHeaderColor := - CreateColorCombo(gbxFixedTransparent, bvlHeaderColorHolder, 5, dxDefaultFixedColor, lblHeaderColor); - FccbxFooterColor := - CreateColorCombo(gbxFixedTransparent, bvlFooterColorHolder, 6, dxDefaultFixedColor, lblFooterColor); - FccbxGroupNodeColor := - CreateColorCombo(gbxFixedTransparent, bvlGroupNodeColorHolder, 4, dxDefaultFixedColor, lblGroupNodeColor); - - FccbxGridLineColor := - CreateColorCombo(tshColors, bvlGridLineColorHolder, 7, dxDefaultGridLineColor, lblGridLineColor); - FccbxGridLineColor.TabOrder := FccbxGridLineColor.Parent.ControlCount - 1; - - FsePreviewLineCount := TdxPSSpinEdit.Create(Self); - with TdxPSSpinEdit(FsePreviewLineCount) do - begin - BoundsRect := bvlPreviewLineCountHolder.BoundsRect; - MinValue := 0; - MaxValue := 100; - Flat := False; - Parent := tshPreview; - TabOrder := chbxAutoCalcPreviewLines.TabOrder + 1; - OnChange := PreviewLineCountChange; - end; - lblPreviewLineCount.FocusControl := FsePreviewLineCount; - - FPreviewBox := TdxPSPaintPanel.Create(Self); - with TdxPSPaintPanel(FPreviewBox) do - begin - Parent := pnlPreview; - Height := dxMVPreview.Height; - Width := dxMVPreview.Width; - Left := (Parent.Width - Width) div 2; - Top := (Parent.Height - Height) div 2; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := pbxPreviewPaint; - end; -end; - -{$IFDEF DELPHI7} -function TdxMVReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxMVReportLinkDesignWindow.LoadStrings; -begin - inherited LoadStrings; - lblPreviewWindow.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - tshOptions.Caption := cxGetResourceString(@sdxOptions); - tshFonts.Caption := cxGetResourceString(@sdxFonts); - tshColors.Caption := cxGetResourceString(@sdxColors); - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviors); - tshPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblShow.Caption := cxGetResourceString(@sdxShow); - chbxShowHeaders.Caption := cxGetResourceString(@sdxHeaders); - chbxShowFooters.Caption := cxGetResourceString(@sdxFooters); - chbxShowExpandButtons.Caption := cxGetResourceString(@sdxExpandButtons); - chbxShowGrid.Caption := cxGetResourceString(@sdxGrid); - chbxShowPreviewGrid.Caption := cxGetResourceString(@sdxNodesGrid); - chbxShowGroupFooterGrid.Caption := cxGetResourceString(@sdxGroupFooterGrid); - - lblDrawMode.Caption := cxGetResourceString(@sdxDrawMode); - with cbxDrawMode.Items do - begin - BeginUpdate; - try - Clear; - AddObject(cxGetResourceString(@sdxDrawModeStrict), TObject(mvdmStrict)); - AddObject(cxGetResourceString(@sdxDrawModeOddEven), TObject(mvdmOddEven)); - AddObject(cxGetResourceString(@sdxDrawModeBorrow), TObject(mvdmBorrowSource)); - finally - EndUpdate; - end; - end; - - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - lblEvenColor.Caption := cxGetResourceString(@sdxEvenColor); - lblPreviewColor.Caption := cxGetResourceString(@sdxPreviewColor); - - stFixedTransparent.Caption := ' ' + cxGetResourceString(@sdxFixedTransparent) + ' '; - lblLevelCaptionColor.Caption := cxGetResourceString(@sdxLevelCaptionColor); - lblHeaderColor.Caption := cxGetResourceString(@sdxHeaderColor); - lblFooterColor.Caption := cxGetResourceString(@sdxFooterColor); - lblGroupNodeColor.Caption := cxGetResourceString(@sdxGroupNodeColor); - lblGridLineColor.Caption := cxGetResourceString(@sdxGridLinesColor); - - with lbxFonts.Items do - begin - BeginUpdate; - try - Clear; - Add(cxGetResourceString(@sdxFont)); - Add(cxGetResourceString(@sdxOddFont)); - Add(cxGetResourceString(@sdxEvenFont)); - Add(cxGetResourceString(@sdxCaptionNodeFont)); - Add(cxGetResourceString(@sdxGroupNodeFont)); - Add(cxGetResourceString(@sdxFooterFont)); - Add(cxGetResourceString(@sdxHeaderFont)); - Add(cxGetResourceString(@sdxPreviewFont)); - finally - EndUpdate; - end; - end; - - btnChangeFont.Caption := cxGetResourceString(@sdxBtnChangeFont); - miChangeFont.Caption := cxGetResourceString(@sdxBtnChangeFont); - - chbxAutoNodesExpand.Caption := cxGetResourceString(@sdxAutoNodesExpand); - chbxOnlySelected.Caption := cxGetResourceString(@sdxOnlySelected); - chbxExtendedSelect.Caption := cxGetResourceString(@sdxExtendedSelect); - - lblSelection.Caption := cxGetResourceString(@sdxSelection); - lblExpanding.Caption := cxGetResourceString(@sdxNodeExpanding); - lblLookAndFeel.Caption := cxGetResourceString(@sdxLookAndFeel); - lblRefinements.Caption := cxGetResourceString(@sdxRefinements); - - chbxUse3DEffects.Caption := cxGetResourceString(@sdxUse3DEffects); - chbxUseSoft3D.Caption := cxGetResourceString(@sdxSoft3D); - - chbxTransparentColumnGraphic.Caption := cxGetResourceString(@sdxTransparentColumnGraphics); - chbxDisplayGraphicsAsText.Caption := cxGetResourceString(@sdxDisplayGraphicsAsText); - chbxFlatCheckMarks.Caption := cxGetResourceString(@sdxFlatCheckMarks); - chbxCheckMarksAsText.Caption := cxGetResourceString(@sdxCheckMarksAsText); - - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - chbxShowPreview.Caption := DropAmpersand(cxGetResourceString(@sdxVisible)); - chbxAutoCalcPreviewLines.Caption := cxGetResourceString(@sdxAutoCalcPreviewLineCount); - lblPreviewLineCount.Caption := cxGetResourceString(@sdxPreviewLineCount); -end; - -procedure TdxMVReportLinkDesignWindow.CMDialogChar(var Msg: TCMDialogChar); -var - I: Integer; -begin - inherited; - with PageControl1 do - for I := 0 to PageCount - 1 do - if IsAccel(Msg.CharCode, Pages[I].Caption) then - begin - Msg.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TdxMVReportLinkDesignWindow.UpdateControlsState; -begin - inherited UpdateControlsState; - - if ReportLink.OddEvenMode then - lblColor.Caption := cxGetResourceString(@sdxOddColor) - else - lblColor.Caption := cxGetResourceString(@sdxColor); - - chbxOnlySelected.Checked := ReportLink.OnlySelected; - chbxExtendedSelect.Enabled := chbxOnlySelected.Checked; - - chbxAutoNodesExpand.Checked := ReportLink.AutoNodesExpand; - - chbxAutoCalcPreviewLines.Enabled := ReportLink.ShowPreview(nil); - FsePreviewLineCount.Enabled := ReportLink.ShowPreview(nil) and - not ReportLink.AutoCalcPreviewLines; - lblPreviewLineCount.Enabled := FsePreviewLineCount.Enabled; - - chbxShowPreviewGrid.Enabled := chbxShowGrid.Checked; - chbxShowGroupFooterGrid.Enabled := chbxShowGrid.Checked; - - chbxUseSoft3D.Enabled := chbxUse3DEffects.Checked; - - FccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := FccbxColor.Enabled; - FccbxEvenColor.Enabled := not chbxTransparent.Checked and ReportLink.OddEvenMode; - lblEvenColor.Enabled := FccbxEvenColor.Enabled; - FccbxPreviewColor.Enabled := not chbxTransparent.Checked and not ReportLink.OddEvenMode; - lblPreviewColor.Enabled := FccbxPreviewColor.Enabled; - - FccbxCaptionColor.Enabled := not chbxFixedTransparent.Checked; - lblLevelCaptionColor.Enabled := FccbxCaptionColor.Enabled; - FccbxGroupNodeColor.Enabled := not chbxFixedTransparent.Checked; - lblGroupNodeColor.Enabled := FccbxGroupNodeColor.Enabled; - FccbxHeaderColor.Enabled := not chbxFixedTransparent.Checked; - lblHeaderColor.Enabled := FccbxHeaderColor.Enabled; - FccbxFooterColor.Enabled := not chbxFixedTransparent.Checked; - lblFooterColor.Enabled := FccbxFooterColor.Enabled; - - btnChangeFont.Enabled := IsChangeFontEnabled; - lbxFonts.Perform(LB_SETHORIZONTALEXTENT, GetMaxWidth, 0); -end; - -function TdxMVReportLinkDesignWindow.IsChangeFontEnabled: Boolean; -var - I: Integer; -begin - if ReportLink.OddEvenMode then - Result := lbxFonts.SelCount > 0 - else - begin - Result := True; - for I := 0 to lbxFonts.Items.Count - 1 do - if lbxFonts.Selected[I] and not (I in [1, 2]) then Exit; - Result := False; - end; -end; - -function TdxMVReportLinkDesignWindow.IsDisableIndex(AIndex: Integer): Boolean; -begin - Result := not ReportLink.OddEvenMode and (AIndex in [1, 2]); -end; - -procedure TdxMVReportLinkDesignWindow.DoInitialize; -begin - inherited; - - with lbxFonts do - begin - Canvas.Font := Font; - ItemHeight := 1 + lbxFonts.Canvas.TextHeight('Wg') + 2; - Height := 4{border} + GetSystemMetrics(SM_CYHSCROLL) + Items.Count * ItemHeight; - end; - btnChangeFont.Top := lbxFonts.Top + lbxFonts.Height + 6; - - with ReportLink do - begin - chbxShowHeaders.Checked := ShowHeaders(nil); - chbxShowFooters.Checked := ShowFooters(nil); - chbxShowPreview.Checked := ShowPreview(nil); - chbxAutoCalcPreviewLines.Checked := AutoCalcPreviewLines; - TdxPSSpinEdit(FsePreviewLineCount).Enabled := ShowPreview(nil) and not AutoCalcPreviewLines; - TdxPSSpinEdit(FsePreviewLineCount).MinValue := -Byte(AutoCalcPreviewLines); - TdxPSSpinEdit(FsePreviewLineCount).Value := PreviewLineCount; - - chbxShowGrid.Checked := ShowGrid(nil); - chbxShowPreviewGrid.Checked := ShowPreviewGrid(nil); - chbxShowGroupFooterGrid.Checked := ShowGroupFooterGrid; - - chbxFlatCheckMarks.Checked := FlatCheckMarks; - chbxShowExpandButtons.Checked := ShowExpandButtons; - - if OddEvenMode then lblColor.Caption := cxGetResourceString(@sdxOddColor); - - chbxTransparent.Checked := Transparent; - chbxFixedTransparent.Checked := FixedTransparent; - cbxDrawMode.ItemIndex := cbxDrawMode.Items.IndexOfObject(TObject(DrawMode)); - - TdxPSColorCombo(FccbxColor).ColorValue := ReportLink.Color; - TdxPSColorCombo(FccbxEvenColor).ColorValue := EvenColor; - TdxPSColorCombo(FccbxPreviewColor).ColorValue := PreviewColor; - TdxPSColorCombo(FccbxCaptionColor).ColorValue := CaptionColor; - TdxPSColorCombo(FccbxFooterColor).ColorValue := FooterColor; - TdxPSColorCombo(FccbxGridLineColor).ColorValue := GridLineColor; - TdxPSColorCombo(FccbxGroupNodeColor).ColorValue := GroupNodeColor; - TdxPSColorCombo(FccbxHeaderColor).ColorValue := HeaderColor; - - chbxOnlySelected.Checked := OnlySelected; - chbxExtendedSelect.Checked := ExtendedSelect; - - chbxUse3DEffects.Checked := Use3DEffects; - chbxUseSoft3D.Checked := UseSoft3D; - - chbxTransparentColumnGraphic.Checked := TransparentColumnGraphics; - chbxDisplayGraphicsAsText.Checked := GraphicsAsText; - end; - dxMVPreview.FullExpand; - UpdatePreview; - lbxFonts.Invalidate; -end; - -procedure TdxMVReportLinkDesignWindow.PreviewLineCountChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PreviewLineCount := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -procedure TdxMVReportLinkDesignWindow.UpdatePreview; - - procedure XorOption(var AOptions: TdxMasterViewLevelOptionsView; - AElement: TdxMasterViewLevelOptionView; Value: Boolean); - begin - if Value then - AOptions := AOptions + [AElement] - else - AOptions := AOptions - [AElement]; - end; - -var - I: Integer; - OV: TdxMasterViewLevelOptionsView; -begin - inherited UpdatePreview; - OV := FMVMasterLevel.OptionsView; - with ReportLink do - begin - XorOption(OV, lovHeader, ShowHeaders(nil)); - XorOption(OV, lovPreview, ShowPreview(nil)); - XorOption(OV, lovGrid, ShowGrid(nil)); - XorOption(OV, lovGridWithPreview, ShowPreviewGrid(nil)); - end; - FMVMasterLevel.OptionsView := OV; - - FMVColumnCash.Border3D := not ReportLink.FlatCheckMarks; - - OV := FMVDetailLevel.OptionsView; - with ReportLink do - begin - XorOption(OV, lovHeader, ShowHeaders(nil)); - XorOption(OV, lovFooter, ShowFooters(nil)); - XorOption(OV, lovGrid, ShowGrid(nil)); - XorOption(OV, lovGridWithPreview, ShowPreviewGrid(nil)); - end; - FMVDetailLevel.OptionsView := OV; - - FMVMasterLevel.GridLinesColor := ReportLink.GridLineColor; - FMVDetailLevel.GridLinesColor := FMVMasterLevel.GridLinesColor; - - with ReportLink do - begin - if FixedTransparent then - begin - mvsCaptionStyle.Color := clWindow; - mvsHeaderStyle.Color := clWindow; - mvsFooterStyle.Color := clWindow; - mvsGroupStyle.Color := clWindow; - end - else - begin - mvsCaptionStyle.Color := CaptionColor; - mvsHeaderStyle.Color := HeaderColor; - mvsFooterStyle.Color := FooterColor; - mvsGroupStyle.Color := GroupNodeColor; - end; - - if Transparent then - begin - mvsContentStyle.Color := clWindow; - mvsContentStyle.AnotherColor := clWindow; - mvsPreviewStyle.Color := clWindow; - mvsPreviewStyle.AnotherColor := clWindow; - end - else - begin - if DrawMode = mvdmOddEven then - begin - mvsContentStyle.Color := OddColor; - mvsContentStyle.AnotherColor := OddColor; - mvsPreviewStyle.Color := OddColor; - mvsPreviewStyle.AnotherColor := EvenColor; - end - else - begin - mvsContentStyle.Color := Color; - mvsContentStyle.AnotherColor := Color; - mvsPreviewStyle.Color := PreviewColor; - mvsPreviewStyle.AnotherColor := PreviewColor; - end; - end; - - with mvsPreviewStyle do - AssignedValues := AssignedValues + [svAnotherColor]; - - if DrawMode = mvdmOddEven then - begin - mvsAnotherContentStyle.Color := EvenColor; - mvsAnotherContentStyle.Font := EvenFont; - end; - - mvsCaptionStyle.Font := CaptionNodeFont; - mvsHeaderStyle.Font := HeaderFont; - mvsFooterStyle.Font := FooterFont; - mvsGroupStyle.Font := GroupNodeFont; - - if DrawMode = mvdmOddEven then - begin - mvsContentStyle.Font := OddFont; - mvsPreviewStyle.Font := OddFont; - end - else - begin - mvsContentStyle.Font := Font; - mvsPreviewStyle.Font := PreviewFont; - end; - - for I := 0 to dxMVPreview.StyleCount - 1 do - dxMVPreview.Styles[I].Font.Size := dxMVPreview.Font.Size; - end; - FPreviewBox.HandleNeeded; - FPreviewBox.Invalidate; -end; - -function TdxMVReportLinkDesignWindow.GetReportLink: TdxMasterViewReportLink; -begin - Result := inherited ReportLink as TdxMasterViewReportLink; -end; - -procedure TdxMVReportLinkDesignWindow.ShowClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - if Sender <> nil then - begin - with ReportLink do - if TCheckBox(Sender).Checked then - Options := Options + [TdxMasterViewPaintOption(TCheckBox(Sender).Tag)] - else - Options := Options - [TdxMasterViewPaintOption(TCheckBox(Sender).Tag)]; - Modified := True; - end; - UpdatePreview; -end; - -procedure TdxMVReportLinkDesignWindow.cbxDrawModeClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TComboBox(Sender) do - ReportLink.DrawMode := TdxMasterViewDrawMode(Items.Objects[ItemIndex]); - Modified := True; - UpdatePreview; -end; - -procedure TdxMVReportLinkDesignWindow.cbxDrawModeDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -const - ImageIndexMap: array[TdxMasterViewDrawMode] of Integer = (0, 1, 3); -begin - with TComboBox(Control) do - dxPSUtl.dxDrawComboBoxItem(Canvas, Rect, Items[Index], dxPSUtl.dxPSDrawModeImages, - ImageIndexMap[TdxMasterViewDrawMode(Items.Objects[Index])], State); -end; - -procedure TdxMVReportLinkDesignWindow.chbxAutoNodesExpandClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoNodesExpand := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxMVReportLinkDesignWindow.chbxOnlySelectedClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OnlySelected := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxMVReportLinkDesignWindow.chbxExtendedSelectClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.ExtendedSelect := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxMVReportLinkDesignWindow.chbxAutoCalcPreviewLinesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PreviewLineCount := -Byte(TCheckBox(Sender).Checked); - TdxPSSpinEdit(FsePreviewLineCount).MinValue := -Byte(ReportLink.AutoCalcPreviewLines); - TdxPSSpinEdit(FsePreviewLineCount).Value := -Byte(ReportLink.AutoCalcPreviewLines); - Modified := True; -end; - -procedure TdxMVReportLinkDesignWindow.chbxTransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - case TCheckBox(Sender).Tag of - 0: ReportLink.Transparent := TCheckBox(Sender).Checked; - 1: ReportLink.FixedTransparent := TCheckBox(Sender).Checked; - end; - UpdatePreview; - Modified := True; -end; - -procedure TdxMVReportLinkDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TdxMVReportLinkDesignWindow.stFixedTransparentClick(Sender: TObject); -begin - if chbxFixedTransparent.CanFocus then ActiveControl := chbxFixedTransparent; - chbxFixedTransparent.Checked := not chbxFixedTransparent.Checked; -end; - -procedure TdxMVReportLinkDesignWindow.ccbxColorChange(Sender: TObject); -var - AColor: TColor; -begin - if LockControlsUpdate then Exit; - AColor := TdxPSColorCombo(Sender).ColorValue; - case TdxPSColorCombo(Sender).Tag of - 0: ReportLink.Color := AColor; - 1: ReportLink.EvenColor := AColor; - 2: ReportLink.PreviewColor := AColor; - 3: ReportLink.CaptionColor := AColor; - 4: ReportLink.GroupNodeColor := AColor; - 5: ReportLink.HeaderColor := AColor; - 6: ReportLink.FooterColor := AColor; - 7: ReportLink.GridLineColor := AColor; - end; - UpdatePreview; - Modified := True; -end; - -procedure TdxMVReportLinkDesignWindow.btnChangeFontClick(Sender: TObject); -begin - DoChangeFont(lbxFonts.ItemIndex); -end; - -procedure TdxMVReportLinkDesignWindow.lbxFontsMouseMove(Sender: TObject; - Shift: TShiftState; X, Y: Integer); -var - W: Integer; - S: string; - AIndex: Integer; -begin - AIndex := lbxFonts.ItemAtPos(Point(X, Y), True); - if (AIndex = -1) or (AIndex = FLastIndex ) then Exit; - lbxFonts.Hint := ''; - Application.CancelHint; - S := GetFontInfoText(AIndex); - W := lbxFonts.Canvas.TextWidth(S); - if W > lbxFonts.Width - lbxFonts.Canvas.TextWidth(lbxFonts.Items[AIndex]) then - begin - lbxFonts.Hint := S; - FLastIndex := AIndex; - end; -end; - -procedure TdxMVReportLinkDesignWindow.lbxFontsKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -var - ItemIndex: Integer; -begin - if (ReportLink.DrawMode <> mvdmOddEven) and (Key in [VK_UP, VK_DOWN]) then - begin - ItemIndex := TListBox(Sender).ItemIndex; - case Key of - VK_UP: - if IsDisableIndex(ItemIndex - 1) then - while IsDisableIndex(ItemIndex - 1) do Dec(ItemIndex); - VK_DOWN: - if IsDisableIndex(ItemIndex + 1) then - while IsDisableIndex(ItemIndex + 1) do Inc(ItemIndex); - end; - TListBox(Sender).ItemIndex := ItemIndex; - end; - if (Key = VK_RETURN) and (ssCtrl in Shift) then - btnChangeFont.Click; -end; - -procedure TdxMVReportLinkDesignWindow.lbxFontsDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); - - function GetMaxLength: Integer; - var - V, I: Integer; - begin - Result := 0; - with TListBox(Control) do - for I := 0 to Items.Count - 1 do - begin - V := Canvas.TextWidth(Items[I]); - if (V > Result) then Result := V; - end; - Inc(Result, 8); - end; - - function GetFontColor(AIndex: Integer): TColor; - begin - if IsDisableIndex(AIndex) then - Result := ColorToRGB(clBtnFace) - else - Result := ColorToRGB(clWindowText);//GetFontByIndex(AIndex).Color; - end; - -const - FirstEntries: Boolean = True; - MaxLength: Integer = 0; -var - R: TRect; - BrushColor, FontColor: TColor; - S: string; -begin - if FirstEntries then - begin - MaxLength := GetMaxLength; - FirstEntries := False; - end; - - with TListBox(Control) do - begin - BrushColor := Canvas.Brush.Color; - if IsDisableIndex(Index) then - Canvas.Brush.Color := ColorToRGB(clWindow); - with Rect do - R := Classes.Rect(Left, Top, Left + MaxLength, Bottom); - FontColor := Canvas.Font.Color; - if not (odSelected in State) or IsDisableIndex(Index) then - Canvas.Font.Color := GetFontColor(Index); - Canvas.TextRect(R, R.Left + 2, R.Top + 2, Items[Index]); - R.Left := R.Right; - Inc(R.Right); - Canvas.Brush.Color := ColorToRGB(clBtnShadow); - Canvas.FrameRect(R); - if IsDisableIndex(Index) then - Canvas.Brush.Color := ColorToRGB(clWindow) - else - Canvas.Brush.Color := BrushColor; - R.Left := R.Right; - R.Right := Rect.Right; - S := GetFontInfoText(Index); - Canvas.TextRect(R, R.Left + 2, R.Top + 2, S); - if not (odSelected in State) or IsDisableIndex(Index) then - Canvas.Font.Color := FontColor; - if (odFocused in State) and IsDisableIndex(Index) then - Canvas.DrawFocusRect(Rect); - Canvas.Brush.Color := BrushColor; - end -end; - -function TdxMVReportLinkDesignWindow.GetFontInfoText(AIndex: Integer): string; -begin - Result := FormatFontInfo(GetFontByIndex(AIndex)); -end; - -function TdxMVReportLinkDesignWindow.GetMaxWidth: Integer; -var - I, L, W: Integer; -begin - with lbxFonts do - begin - W := Canvas.TextWidth(Items[0] + 'X'); - for I := 1 to Items.Count - 1 do - begin - L := Canvas.TextWidth(Items[I] + 'X'); - if L > W then W := L; - end; - - Result := W; - W := Canvas.TextWidth(GetFontInfoText(0) + 'X'); - for I := 1 to Items.Count - 1 do - begin - L := Canvas.TextWidth(GetFontInfoText(I) + 'X'); - if L > W then W := L; - end; - end; - Inc(Result, W + 2 + 8 + 3); -end; - -procedure TdxMVReportLinkDesignWindow.lbxFontsClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - UpdateControlsState; -end; - -procedure TdxMVReportLinkDesignWindow.pmChangeFontPopup(Sender: TObject); -begin - miChangeFont.Enabled := btnChangeFont.Enabled; -end; - -procedure TdxMVReportLinkDesignWindow.lbxFontsDblClick(Sender: TObject); -begin - if btnChangeFont.Enabled then btnChangeFont.Click; -end; - -function TdxMVReportLinkDesignWindow.GetFontByIndex(AIndex: Integer): TFont; -begin - with ReportLink do - case AIndex of - 0: Result := Font; - 1: Result := OddFont; - 2: Result := EvenFont; - 3: Result := CaptionNodeFont; - 4: Result := GroupNodeFont; - 5: Result := FooterFont; - 6: Result := HeaderFont; - else - Result := ReportLink.PreviewFont; - end; -end; - -procedure TdxMVReportLinkDesignWindow.DoChangeFont(Index: Integer); -var - I: Integer; -begin - with dxPSGlbl.FontDialog do - begin - Font := GetFontByIndex(Index); - if Execute then - begin - with lbxFonts do - begin - for I := 0 to Items.Count - 1 do - if Selected[I] then GetFontByIndex(I).Assign(Font); - end; - lbxFonts.Refresh; - UpdatePreview; - Modified := True; - end; - end; -end; - -procedure TdxMVReportLinkDesignWindow.dxMVPreviewGetContentStyle( - Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; - Column: TdxMasterViewColumn; var NewStyle: TdxMasterViewStyle); -begin - if (ReportLink.DrawMode = mvdmOddEven) and not ReportLink.Transparent and Odd(Node.Index) then - NewStyle := mvsAnotherContentStyle; -end; - -procedure TdxMVReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreviewWindow.Parent := TPageControl(Sender).ActivePage; -end; - -procedure RegisterHelpers; -begin - TdxMasterViewColumnHelper.Register; - TdxMasterViewImageColumnHelper.Register; -end; - -procedure UnregisterHelpers; -begin - TdxColumnHelpersFactory.ReleaseInstance; -end; - -initialization - RegisterHelpers; - dxPSRegisterReportLink(TdxMasterViewReportLink, TdxMasterView, TdxMVReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxMasterViewReportLink, TdxMasterView, TdxMVReportLinkDesignWindow); - UnregisterHelpers; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxMVLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxMVLnkReg.pas deleted file mode 100644 index b5375cc3..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxMVLnkReg.pas +++ /dev/null @@ -1,89 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxMVLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes, dxPSdxMVLnk; - -type - TdxMasterViewOptionsPropertyEditor = class(TSetProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - -function TdxMasterViewOptionsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -procedure TdxMasterViewOptionsPropertyEditor.Edit; -var - I: Integer; -begin - inherited; - if TdxMasterViewReportLink(GetComponent(0)).DesignReport then - begin - Designer.Modified; - if PropCount > 1 then - for I := 1 to PropCount - 1 do - GetComponent(I).Assign(GetComponent(0)); - end; -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TdxMasterViewReportLink]); - RegisterPropertyEditor(TypeInfo(TdxMasterViewPaintOptions), TdxMasterViewReportLink, 'Options', TdxMasterViewOptionsPropertyEditor); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxOCLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSdxOCLnk.dfm deleted file mode 100644 index 39cc1458..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxOCLnk.dfm +++ /dev/null @@ -1,166 +0,0 @@ -object dxOCReportLinkDesignWindow: TdxOCReportLinkDesignWindow - Left = 518 - Top = 415 - ActiveControl = chbxFullExpand - BorderStyle = bsDialog - Caption = 'Report Designer' - ClientHeight = 293 - ClientWidth = 552 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 544 - Height = 254 - ActivePage = tshOptions - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 536 - Height = 226 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblPreview: TLabel - Left = 241 - Top = 2 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object chbxFullExpand: TCheckBox - Left = 17 - Top = 10 - Width = 216 - Height = 17 - Caption = 'Full &Expand' - TabOrder = 0 - OnClick = chbxFullExpandClick - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 43 - Width = 231 - Height = 56 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 7 - Top = 26 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblColorClick - end - object bvlColorHolder: TBevel - Left = 86 - Top = 22 - Width = 138 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 17 - Top = 41 - Width = 15 - Height = 17 - TabOrder = 1 - OnClick = chbxTransparentClick - end - object gbxBorder: TGroupBox - Left = 5 - Top = 109 - Width = 231 - Height = 56 - Caption = ' ' - TabOrder = 4 - object lblGridLinesColor: TLabel - Left = 7 - Top = 26 - Width = 67 - Height = 13 - Caption = '&Border Color: ' - OnClick = lblColorClick - end - object bvlLineColorHolder: TBevel - Left = 86 - Top = 22 - Width = 138 - Height = 21 - Visible = False - end - end - object chbxDrawBorder: TCheckBox - Left = 17 - Top = 107 - Width = 15 - Height = 17 - TabOrder = 3 - OnClick = chbxDrawBorderClick - end - object stTransparent: TStaticText - Left = 32 - Top = 42 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stDrawBorder: TStaticText - Left = 32 - Top = 108 - Width = 70 - Height = 17 - Caption = ' Draw Border ' - FocusControl = chbxDrawBorder - TabOrder = 6 - OnClick = stDrawBorderClick - end - end - end - end - object pnlPreview: TPanel - Left = 250 - Top = 46 - Width = 290 - Height = 201 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 1 - object ocPreview: TdxOrgChart - Left = 6 - Top = 5 - Width = 279 - Height = 192 - DefaultImageAlign = iaLT - BorderStyle = bsNone - Options = [ocDblClick, ocEdit, ocCanDrag, ocShowDrag, ocRect3D] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - Visible = False - Items = { - 000001005A000000FFFFFF1F01000200011600436F72706F7261746520486561 - 647175617274657273020050000000FFFFFF1F0100010001130053616C657320 - 616E64204D61726B6574696E67010050000000FFFFFF1F010003000117004669 - 656C64204F66666963653A2043616E6164610D0A09000050000000FFFFFF1F01 - 000000010B00456E67696E656572696E670000} - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxOCLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxOCLnk.pas deleted file mode 100644 index 5a96f08e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxOCLnk.pas +++ /dev/null @@ -1,598 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxOCLnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, Graphics, Controls, Forms, StdCtrls, ExtCtrls, ComCtrls, - dxOrgChr, dxPSCore, dxPSGraphicLnk; - -type - TCustomdxOrgChartReportLink = class(TCustomdxGraphicReportLink) - private - FFullExpand: Boolean; - FUseMetafile: Boolean; - function GetOrgChart: TdxOrgChart; - procedure SetFullExpand(Value: Boolean); - protected - function GetGraphic: TGraphic; override; - function GetGraphicClass: TGraphicClass; override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - property OrgChart: TdxOrgChart read GetOrgChart; - public - constructor Create(AOwner: TComponent); override; - procedure Assign(Source: TPersistent); override; - property Color; - property FullExpand: Boolean read FFullExpand write SetFullExpand default False; - property Transparent; - property UseMetafile: Boolean read FUseMetafile write FUseMetafile default True; - end; - - TdxOrgChartReportLink = class(TCustomdxOrgChartReportLink) - public - property OrgChart; - published - property BorderColor; - property Color; - property DrawBorder; - property FullExpand; - property Transparent; - property TransparentColor; - property UseMetafile; - end; - - TdxOCReportLinkDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshOptions: TTabSheet; - pnlOptions: TPanel; - chbxFullExpand: TCheckBox; - pnlPreview: TPanel; - chbxDrawBorder: TCheckBox; - gbxTransparent: TGroupBox; - lblColor: TLabel; - bvlColorHolder: TBevel; - chbxTransparent: TCheckBox; - gbxBorder: TGroupBox; - lblGridLinesColor: TLabel; - bvlLineColorHolder: TBevel; - ocPreview: TdxOrgChart; - lblPreview: TLabel; - stTransparent: TStaticText; - stDrawBorder: TStaticText; - procedure lblColorClick(Sender: TObject); - procedure chbxFullExpandClick(Sender: TObject); - procedure chbxDrawBorderClick(Sender: TObject); - procedure chbxTransparentClick(Sender: TObject); - procedure PageControl1Change(Sender: TObject); - procedure stTransparentClick(Sender: TObject); - procedure stDrawBorderClick(Sender: TObject); - private - FOCBmp: TBitmap; - procedure ccbxColorChange(Sender: TObject); - procedure CreateControls; - function GetReportLink: TCustomdxOrgChartReportLink; - procedure pbxPreviewPaint(Sender: TObject); - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - protected - ccbxColor: TCustomComboBox; - ccbxGridLineColor: TCustomComboBox; - FPreviewBox: TCustomControl; - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdatePreview; override; - procedure UpdateControlsState; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property ReportLink: TCustomdxOrgChartReportLink read GetReportLink; - end; - - PdxOrgChartGetAsGraphicData = ^TdxOrgChartGetAsGraphicData; - TdxOrgChartGetAsGraphicData = record - OrgChart: TdxCustomOrgChart; - GraphicClass: TGraphicClass; - FullExpand: Boolean; - Transparent: Boolean; - TransparentColor: TColor; - Enhanced: Boolean; - end; - -function dxGetOrgChartAsGraphic(const AData: TdxOrgChartGetAsGraphicData): TGraphic; - -implementation - -{$R *.DFM} - -uses - SysUtils, Messages, cxClasses, dxPSRes, dxPSUtl, dxPSGlbl, dxExtCtrls; - -type - TdxOrgChartAccess = class(TdxCustomOrgChart); - -function dxGetOrgChartAsGraphic(const AData: TdxOrgChartGetAsGraphicData): TGraphic; - - procedure ProcessPaintMessages; - var - Msg: TMsg; - begin - while PeekMessage(Msg, 0, WM_PAINT, WM_PAINT, PM_NOREMOVE) do - begin - case Integer(GetMessage(Msg, 0, WM_PAINT, WM_PAINT)) of - -1: Break; - 0: begin - PostQuitMessage(Msg.wParam); - Break; - end; - end; - DispatchMessage(Msg); - end; - end; - -var - Graphic: TGraphic; - Canvas: TCanvas; - DC: HDC; - IsBitmap, IsMetafile: Boolean; - SaveLeftEdge, SaveTopEdge: Integer; - SaveSelected: TdxOcNode; - SaveAnimated: Boolean; -begin - Result := nil; - if (AData.OrgChart = nil) or (AData.GraphicClass = nil) then - Exit; - - if AData.FullExpand then - begin - AData.OrgChart.FullExpand; - ProcessPaintMessages; - end; - - IsBitmap := AData.GraphicClass.InheritsFrom(TBitmap); - IsMetafile := AData.GraphicClass.InheritsFrom(TMetafile); - try - if IsMetafile then - Graphic := TMetafile.Create - else - Graphic := TBitmap.Create; - Graphic.Width := AData.OrgChart.FullWidth; - Graphic.Height := AData.OrgChart.FullHeight; - try - if IsMetafile then - begin - TMetafile(Graphic).Enhanced := AData.Enhanced; - Canvas := TMetafileCanvas.Create(TMetafile(Graphic), 0); - end - else - Canvas := TBitmap(Graphic).Canvas; - - try - if not IsMetafile and AData.Transparent then - begin - Canvas.Brush.Color := AData.TransparentColor; - Canvas.FillRect(MakeRect(0, 0, Graphic.Width, Graphic.Height)); - end; - DC := Canvas.Handle; - with TdxOrgChartAccess(AData.OrgChart) do - begin - SaveSelected := Selected; - SaveAnimated := ocAnimate in Options; - SaveLeftEdge := LeftEdge; - SaveTopEdge := TopEdge; - LeftEdge := 0; - TopEdge := 0; - MoveWindowOrg(DC, LeftEdge, TopEdge); - ControlState := ControlState + [csPaintCopy]; - try - Selected := nil; - if SaveAnimated then Options := Options - [ocAnimate]; - PaintWindow(DC); - finally - ControlState := ControlState - [csPaintCopy]; - MoveWindowOrg(DC, -LeftEdge, -TopEdge); - LeftEdge := SaveLeftEdge; - TopEdge := SaveTopEdge; - if SaveAnimated then Options := Options + [ocAnimate]; - Selected := SaveSelected; - end; - end; - if IsBitmap and AData.Transparent then - TBitmap(Graphic).TransparentColor := AData.TransparentColor; - if not IsMetafile and not IsBitmap then - begin - Result := dxPSUtl.CreateGraphic(AData.GraphicClass); - Result.Assign(Graphic); - end - else - Result := Graphic; - finally - if IsMetafile then Canvas.Free; - end; - finally - if not IsMetafile and not IsBitmap then Graphic.Free; - end; - except - if Result <> nil then Result.Free; - raise; - end; -end; - -{ TCustomdxOrgChartReportLink } - -constructor TCustomdxOrgChartReportLink.Create(AOwner: TComponent); -begin - inherited; - FFullExpand := False; - FUseMetafile := True; -end; - -procedure TCustomdxOrgChartReportLink.Assign(Source: TPersistent); -begin - inherited; - if Source is TCustomdxOrgChartReportLink then - with TCustomdxOrgChartReportLink(Source) do - begin - Self.FullExpand := FullExpand; - Self.UseMetafile := UseMetafile; - end; -end; - -function TCustomdxOrgChartReportLink.GetGraphic: TGraphic; -var - Data: TdxOrgChartGetAsGraphicData; -begin - Result := nil; - if (OrgChart = nil) or (OrgChart.Count = 0) then Exit; - FillChar(Data, SizeOf(TdxOrgChartGetAsGraphicData), 0); - Data.OrgChart := OrgChart; - Data.GraphicClass := GetGraphicClass; - Data.FullExpand := FullExpand; - Data.Transparent := Transparent; - Data.TransparentColor := TransparentColor; - Data.Enhanced := True; - Result := dxGetOrgChartAsGraphic(Data); -end; - -function TCustomdxOrgChartReportLink.GetGraphicClass: TGraphicClass; -const - GraphicClasses: array[Boolean] of TGraphicClass = (TBitmap, TMetafile); -begin - Result := GraphicClasses[UseMetafile]; -end; - -procedure TCustomdxOrgChartReportLink.InternalRestoreDefaults; -begin - inherited; - FullExpand := False; - UseMetafile := True; -end; - -procedure TCustomdxOrgChartReportLink.InternalRestoreFromOriginal; -begin - inherited; - if OrgChart <> nil then TransparentColor := OrgChart.Color; -end; - -procedure TCustomdxOrgChartReportLink.SetFullExpand(Value: Boolean); -begin - if FFullExpand <> Value then - begin - FFullExpand := Value; - LinkModified(True); - end; -end; - -function TCustomdxOrgChartReportLink.GetOrgChart: TdxOrgChart; -begin - Result := TdxOrgChart(Component); -end; - -{ TdxOCReportLinkDesignWindow } - -constructor TdxOCReportLinkDesignWindow.Create(AOwner: TComponent); - - function CreatePreviewBitmap: TBitmap; - begin - Result := TBitmap.Create; - try - ocPreview.FullExpand; - Result.Width := ocPreview.FullWidth + 1; - Result.Height := ocPreview.FullHeight + 1; - Control_PaintWindow(ocPreview, Result.Canvas.Handle); - except - FreeAndNil(Result); - raise; - end; - end; - -begin - HelpContext := dxhcOrgChartReportLinkDesigner; - inherited; - CreateControls; - PageControl1.ActivePage := PageControl1.Pages[0]; - - FOCBmp := CreatePreviewBitmap; -end; - -destructor TdxOCReportLinkDesignWindow.Destroy; -begin - FreeAndNil(FOCBmp); - inherited; -end; - -procedure TdxOCReportLinkDesignWindow.CreateControls; -var - R: TRect; -begin - ccbxColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(ccbxColor) do - begin - BoundsRect := bvlColorHolder.BoundsRect; - Tag := MakeTTag(0); - Parent := gbxTransparent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := dxDefaultColor; -// DropDownCount := Items.Count; - OnChange := ccbxColorChange; - end; - lblColor.FocusControl := ccbxColor; - - ccbxGridLineColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(ccbxGridLineColor) do - begin - BoundsRect := bvlLineColorHolder.BoundsRect; - Tag := MakeTTag(1); - Parent := gbxBorder; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := dxDefaultGridLineColor; -// DropDownCount := Items.Count; - OnChange := ccbxColorChange; - end; - lblGridLinesColor.FocusControl := ccbxGridLineColor; - FPreviewBox := TdxPSPaintPanel.Create(Self); - with TdxPSPaintPanel(FPreviewBox) do - begin - Parent := pnlPreview; - R := pnlPreview.BoundsRect; - OffsetRect(R, -R.Left, -R.Top); - InflateRect(R, -4, -4); - BoundsRect := R; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := pbxPreviewPaint; - end; -end; - -{$IFDEF DELPHI7} -function TdxOCReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxOCReportLinkDesignWindow.LoadStrings; -var - Item: TdxOcNode; -begin - inherited; - tshOptions.Caption := cxGetResourceString(@sdxOptions); - - Item := ocPreview.Items[0]; - Item.Text := cxGetResourceString(@sdxCorporateHeadquarters); - Item[0].Text := cxGetResourceString(@sdxSalesAndMarketing); - Item[0].Items[0].Text := cxGetResourceString(@sdxFieldOfficeCanada); - Item[1].Text := cxGetResourceString(@sdxEngineering); - - stDrawBorder.Caption := ' ' + cxGetResourceString(@sdxBorderLines) + ' '; - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - lblColor.Caption := cxGetResourceString(@sdxColor); - lblGridLinesColor.Caption := cxGetResourceString(@sdxGridLinesColor); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); -end; - -procedure TdxOCReportLinkDesignWindow.DoInitialize; -begin - inherited; - gbxTransparent.Visible := not ReportLink.UseMetafile; - chbxTransparent.Visible := not ReportLink.UseMetafile; - stTransparent.Visible := not ReportLink.UseMetafile; - if ReportLink.UseMetafile then - begin - stDrawBorder.BoundsRect := stTransparent.BoundsRect; - chbxDrawBorder.BoundsRect := chbxTransparent.BoundsRect; - gbxBorder.BoundsRect := gbxTransparent.BoundsRect; - end; - - chbxFullExpand.Checked := ReportLink.FullExpand; - chbxDrawBorder.Checked := ReportLink.DrawBorder; - chbxTransparent.Checked := ReportLink.Transparent; - TdxPSColorCombo(ccbxColor).ColorValue := ReportLink.Color; - TdxPSColorCombo(ccbxGridLineColor).ColorValue := ReportLink.BorderColor; -end; - -procedure TdxOCReportLinkDesignWindow.UpdateControlsState; -begin - inherited; - ccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := not chbxTransparent.Checked; - ccbxGridLineColor.Enabled := chbxDrawBorder.Checked; - lblGridLinesColor.Enabled := chbxDrawBorder.Checked; -end; - -procedure TdxOCReportLinkDesignWindow.pbxPreviewPaint(Sender: TObject); -begin - with TdxPSPaintPanel(Sender) do - PaintPreview(Canvas, ClientRect); -end; - -procedure TdxOCReportLinkDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -var - OffsetX, OffsetY: Integer; -begin - inherited; - OffsetRect(R, -R.Left, -R.Top); - InflateRect(R, -4, -4); - - ACanvas.Brush.Style := bsSolid; - { border } - if ReportLink.DrawBorder then - begin - InflateRect(R, 1, 1); - ACanvas.Brush.Color := ReportLink.BorderColor; - ACanvas.FrameRect(R); - InflateRect(R, -1, -1); - end; - { interior } - if not ReportLink.Transparent then - begin - ACanvas.Brush.Color := ReportLink.Color; - ACanvas.FillRect(R); - end; - { charts } - OffsetX := R.Left + (R.Right - R.Left - FOCBmp.Width) div 2; - OffsetY := R.Top + (R.Bottom - R.Top - FOCBmp.Height) div 2; - ACanvas.Brush.Style := bsClear; - ACanvas.BrushCopy(Bounds(OffsetX, OffsetY, FOCBmp.Width, FOCBmp.Height), - FOCBmp, Rect(0, 0, FOCBmp.Width, FOCBmp.Height), - FOCBmp.Canvas.Pixels[0, FOCBmp.Height - 1]); -end; - -function TdxOCReportLinkDesignWindow.GetReportLink: TCustomdxOrgChartReportLink; -begin - Result := inherited ReportLink as TCustomdxOrgChartReportLink; -end; - -procedure TdxOCReportLinkDesignWindow.ccbxColorChange(Sender: TObject); -var - AColor: TColor; -begin - if LockControlsUpdate then Exit; - AColor := TdxPSColorCombo(Sender).ColorValue; - case TTagToInt(TdxPSColorCombo(Sender).Tag) of - 0: ReportLink.Color := AColor; - 1: ReportLink.BorderColor := AColor; - end; - Modified := True; - UpdatePreview; -end; - -procedure TdxOCReportLinkDesignWindow.UpdatePreview; -begin - FPreviewBox.Invalidate; -end; - -procedure TdxOCReportLinkDesignWindow.lblColorClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TCustomComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxOCReportLinkDesignWindow.chbxFullExpandClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.FullExpand := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxOCReportLinkDesignWindow.chbxDrawBorderClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.DrawBorder := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxOCReportLinkDesignWindow.chbxTransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.Transparent := TCheckBox(Sender).Checked; - Modified := True; - UpdatePreview; -end; - -procedure TdxOCReportLinkDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TdxOCReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreview.Parent := TPageControl(Sender).ActivePage; -end; - -procedure TdxOCReportLinkDesignWindow.stDrawBorderClick(Sender: TObject); -begin - if chbxDrawBorder.CanFocus then ActiveControl := chbxDrawBorder; - chbxDrawBorder.Checked := not chbxDrawBorder.Checked; -end; - -procedure TdxOCReportLinkDesignWindow.CMDialogChar(var Message: TCMDialogChar); -var - I: Integer; -begin - inherited; - with PageControl1 do - for I := 0 to PageCount - 1 do - if IsAccel(Message.CharCode, Pages[I].Caption) then - begin - Message.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -initialization - dxPSRegisterReportLink(TdxOrgChartReportLink, TdxOrgChart, TdxOCReportLinkDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxOrgChartReportLink, TdxOrgChart, TdxOCReportLinkDesignWindow); - -end. - - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxOCLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxOCLnkReg.pas deleted file mode 100644 index 56269d50..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxOCLnkReg.pas +++ /dev/null @@ -1,60 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxOCLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI9} - DesignIntf, -{$ENDIF} - Classes, dxPSdxOCLnk; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - RegisterNoIcon([TdxOrgChartReportLink]) -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxOILnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxOILnk.pas deleted file mode 100644 index 96f8af20..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxOILnk.pas +++ /dev/null @@ -1,70 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxOILnk; - -interface - -{$I cxVer.inc} - -uses - dxOI, dxPSdxInsLnk; - -type - TdxRTTIInspectorReportLink = class(TCustomdxInspectorReportLink) - private - function GetRTTIInspector: TdxRTTIInspector; - public - property RTTIInspector: TdxRTTIInspector read GetRTTIInspector; - end; - -implementation - -uses - dxPSCore; - -function TdxRTTIInspectorReportLink.GetRTTIInspector: TdxRTTIInspector; -begin - Result := TdxRTTIInspector(Component); -end; - -initialization - dxPSRegisterReportLink(TdxRTTIInspectorReportLink, TdxRTTIInspector, TdxInspectorDesignWindow); - -finalization - dxPSUnregisterReportLink(TdxRTTIInspectorReportLink, TdxRTTIInspector, TdxInspectorDesignWindow); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxOILnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxOILnkReg.pas deleted file mode 100644 index 72e768d1..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxOILnkReg.pas +++ /dev/null @@ -1,54 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxOILnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - Classes, dxPSdxOILnk; - -procedure Register; -begin - RegisterNoIcon([TdxRTTIInspectorReportLink]); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxPageControlProducer.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxPageControlProducer.pas deleted file mode 100644 index f9eeacf9..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxPageControlProducer.pas +++ /dev/null @@ -1,145 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxPageControlProducer; - -interface - -{$I cxVer.inc} - -uses - Classes, Controls, dxPSContainerLnk, dxPageControl; - -type - TdxPSdxPageControlIterator = class(TdxPSWinControlIterator) - private - function GetPageControl: TdxPageControl; - protected - function GetControl(Index: Integer): TControl; override; - function GetControlCount: Integer; override; - public - property PageControl: TdxPageControl read GetPageControl; - end; - - TdxPSdxTabSheetProducer = class(TdxPSRootContainerProducer) - public - function Control: TdxTabSheet; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - - TdxPSdxPageControlProducer = class(TdxPSRootContainerProducer) - protected - function CanProcessChild(AChildControl: TControl): Boolean; override; - class function IteratorClass: TdxPSWinControlIteratorClass; override; - public - function Control: TdxPageControl; reintroduce; overload; - class function ControlClass: TControlClass; override; - end; - -implementation - -{ TdxPSdxPageControlIterator } - -function TdxPSdxPageControlIterator.GetControl(Index: Integer): TControl; -begin - Result := PageControl.ActivePage; -end; - -function TdxPSdxPageControlIterator.GetControlCount: Integer; -begin - Result := Ord(PageControl.PageCount > 0); -end; - -function TdxPSdxPageControlIterator.GetPageControl: TdxPageControl; -begin - Result := TdxPageControl(Control); -end; - -{ TdxPSdxTabSheetProducer } - -function TdxPSdxTabSheetProducer.Control: TdxTabSheet; -begin - Result := inherited Control as TdxTabSheet; -end; - -class function TdxPSdxTabSheetProducer.ControlClass: TControlClass; -begin - Result := TdxTabSheet; -end; - -{ TdxPSdxPageControlProducer } - -function TdxPSdxPageControlProducer.Control: TdxPageControl; -begin - Result := inherited Control as TdxPageControl; -end; - -class function TdxPSdxPageControlProducer.ControlClass: TControlClass; -begin - Result := TdxPageControl; -end; - -function TdxPSdxPageControlProducer.CanProcessChild(AChildControl: TControl): Boolean; -begin - Result := AChildControl = Control.ActivePage; -end; - -class function TdxPSdxPageControlProducer.IteratorClass: TdxPSWinControlIteratorClass; -begin - Result := TdxPSdxPageControlIterator; -end; - -procedure RegisterAssistants; -begin - TdxPSdxTabSheetProducer.Register; - TdxPSdxPageControlProducer.Register; -end; - -procedure UnregisterAssistants; -begin - TdxPSdxPageControlProducer.Unregister; - TdxPSdxTabSheetProducer.Unregister; -end; - -initialization - RegisterAssistants; - dxPSContainerLnk.dxPSRegisterContainers([TdxTabSheet, TdxPageControl]); - -finalization - dxPSContainerLnk.dxPSUnregisterContainers([TdxTabSheet, TdxPageControl]); - UnregisterAssistants; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxTLLnk.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSdxTLLnk.dfm deleted file mode 100644 index 22eddc6d..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxTLLnk.dfm +++ /dev/null @@ -1,1464 +0,0 @@ -object dxTLReportLinkDesignWindow: TdxTLReportLinkDesignWindow - Left = 485 - Top = 220 - BorderStyle = bsDialog - Caption = 'dxTLReportLinkDesigner' - ClientHeight = 434 - ClientWidth = 582 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 574 - Height = 395 - ActivePage = tshColors - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object Bevel11: TBevel - Left = 46 - Top = 13 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object imgShow: TImage - Left = 9 - Top = 35 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblShow: TLabel - Left = 6 - Top = 9 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel16: TBevel - Left = 89 - Top = 107 - Width = 178 - Height = 4 - Shape = bsBottomLine - end - object bvlShowImages: TBevel - Left = 89 - Top = 223 - Width = 178 - Height = 4 - Shape = bsBottomLine - end - object Bevel2: TBevel - Left = 89 - Top = 164 - Width = 178 - Height = 3 - Shape = bsBottomLine - end - object Bevel10: TBevel - Left = 90 - Top = 282 - Width = 177 - Height = 4 - Shape = bsBottomLine - end - object Image1: TImage - Left = 9 - Top = 303 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblOnEveryPage: TLabel - Left = 8 - Top = 278 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object chbxShowGrid: TCheckBox - Tag = 6 - Left = 90 - Top = 177 - Width = 165 - Height = 17 - Caption = '&Grid Lines' - TabOrder = 6 - OnClick = chbxShowClick - end - object chbxShowNodeGrid: TCheckBox - Tag = 5 - Left = 90 - Top = 198 - Width = 165 - Height = 17 - Caption = 'Node Grid Lines' - TabOrder = 7 - OnClick = chbxShowClick - end - object chbxShowBands: TCheckBox - Left = 90 - Top = 23 - Width = 165 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 0 - OnClick = chbxShowClick - end - object chbxShowHeaders: TCheckBox - Tag = 1 - Left = 90 - Top = 43 - Width = 165 - Height = 17 - Caption = '&Headers' - TabOrder = 1 - OnClick = chbxShowClick - end - object chbxShowFooters: TCheckBox - Tag = 2 - Left = 90 - Top = 64 - Width = 165 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 2 - OnClick = chbxShowClick - end - object chbxShowGroupFooters: TCheckBox - Tag = 3 - Left = 90 - Top = 84 - Width = 165 - Height = 17 - Caption = 'G&roup Footers' - TabOrder = 3 - OnClick = chbxShowClick - end - object chbxShowStateImages: TCheckBox - Tag = 9 - Left = 90 - Top = 236 - Width = 165 - Height = 17 - Caption = 'State Images' - TabOrder = 8 - OnClick = chbxShowClick - end - object chbxShowImages: TCheckBox - Tag = 8 - Left = 90 - Top = 256 - Width = 165 - Height = 17 - Caption = 'Images' - TabOrder = 9 - OnClick = chbxShowClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 17 - Left = 90 - Top = 119 - Width = 165 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 4 - OnClick = chbxShowClick - end - object chbxShowTreeLines: TCheckBox - Tag = 16 - Left = 90 - Top = 140 - Width = 165 - Height = 17 - Caption = 'TreeLines' - TabOrder = 5 - OnClick = chbxShowClick - end - object chbxBandsOnEveryPage: TCheckBox - Left = 90 - Top = 300 - Width = 165 - Height = 17 - Caption = 'Ba&nds On Every Page' - TabOrder = 10 - OnClick = chbxBandsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Left = 90 - Top = 322 - Width = 165 - Height = 17 - Caption = 'Headers On Every &Page' - TabOrder = 11 - OnClick = chbxHeadersOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Left = 90 - Top = 344 - Width = 165 - Height = 17 - Caption = 'Footers On E&very Page' - TabOrder = 12 - OnClick = chbxFootersOnEveryPageClick - end - object lblPreviewWindow: TStaticText - Left = 279 - Top = 0 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 13 - end - end - object tshColors: TTabSheet - Caption = '&Color' - object lblGridlineColor: TLabel - Left = 9 - Top = 296 - Width = 74 - Height = 13 - Caption = '&Grid Line color :' - OnClick = lblColorClick - end - object bvlGridLineColorHolder: TBevel - Left = 122 - Top = 291 - Width = 145 - Height = 22 - Visible = False - end - object bvlTreeLineColorHolder: TBevel - Left = 122 - Top = 320 - Width = 145 - Height = 22 - end - object lblTreeLineColor: TLabel - Left = 9 - Top = 325 - Width = 78 - Height = 13 - Caption = 'TreeLines Color:' - end - object lblDrawMode: TLabel - Left = 7 - Top = 21 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - OnClick = lblDrawModeClick - end - object gbxFixedTransparent: TGroupBox - Left = 4 - Top = 162 - Width = 269 - Height = 121 - Caption = ' ' - TabOrder = 4 - object lblBandColor: TLabel - Left = 5 - Top = 23 - Width = 60 - Height = 13 - Caption = '&Band color : ' - OnClick = lblColorClick - end - object lblHeaderColor: TLabel - Left = 5 - Top = 47 - Width = 71 - Height = 13 - Caption = '&Header color : ' - OnClick = lblColorClick - end - object lblRowFooterColor: TLabel - Left = 5 - Top = 96 - Width = 94 - Height = 13 - Caption = 'Gro&upFooter color :' - OnClick = lblColorClick - end - object bvlBandColorHolder: TBevel - Tag = 2 - Left = 118 - Top = 17 - Width = 145 - Height = 22 - Visible = False - end - object bvlHeaderColorHolder: TBevel - Left = 118 - Top = 42 - Width = 145 - Height = 22 - Visible = False - end - object bvlRowFooterColorHolder: TBevel - Left = 118 - Top = 92 - Width = 145 - Height = 22 - Visible = False - end - object lblGroupNodeColor: TLabel - Left = 5 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Group&Node color :' - OnClick = lblColorClick - end - object bvlGroupNodeColorHolder: TBevel - Left = 118 - Top = 67 - Width = 145 - Height = 22 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 4 - Top = 51 - Width = 269 - Height = 104 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 5 - Top = 23 - Width = 29 - Height = 13 - Caption = 'C&olor:' - OnClick = lblColorClick - end - object bvlColorHolder: TBevel - Left = 118 - Top = 18 - Width = 145 - Height = 22 - Visible = False - end - object lblPreviewColor: TLabel - Left = 5 - Top = 77 - Width = 71 - Height = 13 - Caption = '&Preview color :' - OnClick = lblColorClick - end - object bvlPreviewColorHolder: TBevel - Tag = 1 - Left = 118 - Top = 72 - Width = 145 - Height = 22 - Visible = False - end - object lblEvenColor: TLabel - Left = 5 - Top = 47 - Width = 59 - Height = 13 - Caption = 'Even Color :' - OnClick = lblColorClick - end - object bvlEvenColorHolder: TBevel - Left = 118 - Top = 43 - Width = 145 - Height = 22 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 15 - Top = 49 - Width = 15 - Height = 17 - Caption = ' Tr&ansparent ' - TabOrder = 1 - OnClick = chbxTransparentClick - end - object chbxFixedTransparent: TCheckBox - Tag = 1 - Left = 15 - Top = 160 - Width = 15 - Height = 17 - TabOrder = 3 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 104 - Top = 15 - Width = 169 - Height = 25 - Style = csOwnerDrawFixed - ItemHeight = 19 - TabOrder = 0 - OnChange = cbxDrawModeChange - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 30 - Top = 50 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stFixedTransparent: TStaticText - Left = 30 - Top = 161 - Width = 98 - Height = 17 - Caption = ' Fixed Transparent ' - FocusControl = chbxFixedTransparent - TabOrder = 6 - OnClick = stFixedTransparentClick - end - end - object tshFonts: TTabSheet - Caption = '&Font' - object btnChangeFont: TButton - Left = 6 - Top = 189 - Width = 116 - Height = 23 - Caption = 'Change Fo&nt ...' - TabOrder = 0 - OnClick = btnChangeFontClick - end - object lbxFonts: TListBox - Left = 6 - Top = 16 - Width = 268 - Height = 167 - Style = lbOwnerDrawFixed - ItemHeight = 16 - MultiSelect = True - ParentShowHint = False - PopupMenu = pmChangeFont - ShowHint = True - TabOrder = 1 - OnClick = lbxFontsClick - OnDblClick = lbxFontsDblClick - OnDrawItem = lbxFontsDrawItem - OnKeyDown = FontsKeyDown - OnMouseMove = FontsMouseMove - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Bevel12: TBevel - Left = 57 - Top = 13 - Width = 210 - Height = 4 - Shape = bsBottomLine - end - object Bevel13: TBevel - Left = 63 - Top = 85 - Width = 204 - Height = 4 - Shape = bsBottomLine - end - object Image3: TImage - Left = 9 - Top = 33 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Image4: TImage - Left = 9 - Top = 104 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblExpandLevel: TLabel - Left = 90 - Top = 124 - Width = 68 - Height = 13 - Caption = 'Expand &level: ' - OnClick = lblExpandLevelClick - end - object bvlExpandLevelHolder: TBevel - Left = 210 - Top = 122 - Width = 58 - Height = 21 - Visible = False - end - object lblSelection: TLabel - Left = 6 - Top = 9 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object lblExpanding: TLabel - Left = 6 - Top = 81 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object lblRefinements: TLabel - Left = 7 - Top = 225 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 73 - Top = 230 - Width = 194 - Height = 4 - Shape = bsBottomLine - end - object imgRefinements: TImage - Left = 9 - Top = 248 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFF99999FF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F77777777FF7FCC99999FF07DDCCCCCCCCDD0F77777777FF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCC99999FF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777FFFF7FCC99999FF07DDCDDDDCDDDD0F777777FFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCC99999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F77777777FF7FCCCCCFFFF07DDDDDDDDDDDD0F77777777FF7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCCCF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FF9999999F07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFF99999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FFFFFFFFFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblLookAndFeel: TLabel - Left = 6 - Top = 152 - Width = 67 - Height = 13 - Caption = 'Look And Feel' - end - object Image8: TImage - Left = 9 - Top = 174 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel15: TBevel - Left = 82 - Top = 156 - Width = 185 - Height = 4 - Shape = bsBottomLine - end - object chbxTransparentColumnGraphic: TCheckBox - Tag = 10 - Left = 90 - Top = 246 - Width = 179 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 5 - OnClick = chbxShowClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 11 - Left = 90 - Top = 268 - Width = 179 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 6 - OnClick = chbxShowClick - end - object chbxOnlySelected: TCheckBox - Left = 90 - Top = 31 - Width = 179 - Height = 17 - Caption = 'Only &selected' - TabOrder = 0 - OnClick = chbxOnlySelectedClick - end - object chbxExtendedSelect: TCheckBox - Left = 90 - Top = 53 - Width = 179 - Height = 17 - Caption = '&Extended select' - TabOrder = 1 - OnClick = chbxExtendedSelectClick - end - object chbxAutoNodesExpand: TCheckBox - Left = 90 - Top = 98 - Width = 179 - Height = 17 - Caption = '&Auto Node Expanded' - TabOrder = 2 - OnClick = chbxAutoNodesExpandClick - end - object chbxUse3DEffects: TCheckBox - Tag = 12 - Left = 90 - Top = 172 - Width = 179 - Height = 17 - Caption = '&Use 3D Effects' - TabOrder = 3 - OnClick = chbxShowClick - end - object chbxUseSoft3D: TCheckBox - Tag = 13 - Left = 90 - Top = 194 - Width = 179 - Height = 17 - Caption = 'Soft &3D' - TabOrder = 4 - OnClick = chbxShowClick - end - object chbxCheckMarksAsText: TCheckBox - Tag = 15 - Left = 90 - Top = 312 - Width = 179 - Height = 17 - Caption = 'Display Check Marks as Text' - TabOrder = 8 - OnClick = chbxShowClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 7 - Left = 90 - Top = 290 - Width = 179 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 7 - OnClick = chbxShowClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - object Bevel9: TBevel - Left = 54 - Top = 13 - Width = 213 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewLineCount: TLabel - Left = 90 - Top = 69 - Width = 99 - Height = 13 - Caption = 'Preview &Line Count: ' - OnClick = lblExpandLevelClick - end - object bvlPreviewLineCountHolder: TBevel - Left = 196 - Top = 66 - Width = 67 - Height = 21 - Visible = False - end - object lblPreview: TLabel - Left = 6 - Top = 9 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object imgPreview: TImage - Left = 9 - Top = 33 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F888F7FF888F7F8888F7F07DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7F888F7FF888F7FF888F7F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxShowPreview: TCheckBox - Tag = 4 - Left = 90 - Top = 23 - Width = 169 - Height = 17 - Caption = 'Pre&view' - TabOrder = 0 - OnClick = chbxShowClick - end - object chbxAutoCalcPreviewLines: TCheckBox - Left = 90 - Top = 43 - Width = 169 - Height = 17 - Caption = '&Auto Calc Preview Lines' - TabOrder = 1 - OnClick = chbxAutoCalcPreviewLinesClick - end - end - end - object pnlPreview: TPanel - Left = 287 - Top = 44 - Width = 282 - Height = 343 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - object dxTLPreview: TdxTreeList - Left = 7 - Top = 4 - Width = 268 - Height = 330 - Bands = < - item - Caption = 'Item Data' - Width = 201 - end> - DefaultLayout = False - HeaderPanelRowCount = 1 - BorderStyle = bsNone - Ctl3D = True - Enabled = False - ParentCtl3D = False - TabOrder = 0 - Visible = False - Images = ilTLImages - LookAndFeel = lfFlat - Options = [aoColumnSizing, aoColumnMoving, aoEditing, aoTabThrough, aoRowSelect, aoPreview, aoAutoWidth] - OptionsEx = [aoBandHeaderWidth, aoAutoCalcPreviewLines, aoBandSizing, aoBandMoving, aoDragScroll, aoDragExpand] - PaintStyle = psOutlook - StateImages = ilTLImages - TreeLineColor = clGrayText - ScrollBars = ssNone - ShowBands = True - ShowButtons = False - ShowGrid = True - ShowRowFooter = True - ShowFooter = True - OnCustomDrawBand = dxTLPreviewCustomDrawBand - OnCustomDrawColumnHeader = dxTLPreviewCustomDrawColumnHeader - OnCustomDrawCell = dxTLPreviewCustomDrawCell - OnCustomDrawFooterNode = dxTLPreviewCustomDrawFooterNode - OnCustomDrawFooter = dxTLPreviewCustomDrawFooter - OnCustomDrawPreviewCell = dxTLPreviewCustomDrawPreviewCell - OnGetFooterCellText = dxTLPreviewGetFooterCellText - OnGetPreviewLineCount = dxTLPreviewGetPreviewLineCount - OnGetPreviewText = dxTLPreviewGetPreviewText - OnIsExistRowFooterCell = dxTLPreviewIsExistRowFooterCell - OnIsExistFooterCell = dxTLPreviewIsExistFooterCell - OnIsLevelFooter = dxTLPreviewIsLevelFooter - Data = { - FFFFFFFF03000000180000000000000000000000010000000000000000000000 - 020000000D0000004E6F6465203120436F6C2023310D0000004E6F6465203120 - 436F6C2023331800000000000000000000000100000000000000020000000200 - 00000D0000004E6F6465203220436F6C20233104000000547275651800000000 - 0000000000000001000000000000000000000002000000090000005375624E6F - 6465203100000000180000000000000000000000010000000000000000000000 - 01000000090000005375624E6F64652032180000000000000000000000010000 - 000000000001000000020000000D0000004E6F6465203320436F6C2023310400 - 0000547275651800000000000000000000000100000000000000000000000200 - 0000090000005375624E6F64652033090000005375624E6F64652033} - object dxTLPreviewColumn1: TdxTreeListColumn - Alignment = taLeftJustify - Width = 117 - BandIndex = 0 - RowIndex = 0 - end - object dxTLPreviewColumn3: TdxTreeListCheckColumn - Caption = 'Axisymmetric' - Width = 83 - BandIndex = 0 - RowIndex = 0 - OnCustomDrawCell = dxTLPreviewColumn3CustomDrawCell - AllowGrayed = True - ShowNullFieldStyle = nsInactive - ValueChecked = 'True' - ValueUnchecked = 'False' - end - object dxTLPreviewColumn4: TdxTreeListImageColumn - Alignment = taLeftJustify - Caption = 'Shape' - MinWidth = 16 - Width = 68 - BandIndex = 0 - RowIndex = 0 - OnCustomDrawCell = dxTLPreviewColumn4CustomDrawCell - Images = ilTLImages - ImageIndexes.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6') - Values.Strings = ( - '' - '' - '2' - '3' - '4' - '5' - '6') - end - end - end - object ilTLImages: TImageList - Left = 5 - Top = 404 - Bitmap = { - 494C010107000A00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000000000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FF000000FF000000000000008400000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000000000008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000FF0000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000000000008400000084000000840000008400 - 0000840000008400000000000000000000000000000000000000FF000000FF00 - 0000FF00000000000000FF000000FF000000FF00000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000FF000000FF00 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000000000008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000FF000000FF00 - 0000FF00000000000000FF000000FF000000FF00000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000FF000000FF00 - 0000FF0000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000000000008400000084000000840000008400 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000000084000000000000008400FF000000FF000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000FF000000FF00 - 0000FF000000FF00000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000000000008400000084000000840000008400 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000000084000000840000000000000084000000840000008400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF0000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FF000000FF000000000000008400000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000000000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000000000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000840000008400000084000000000000008400000084000000 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FF000000FF000000FF000000FF00000084000000840000000000 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000000000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000008400000084000000840000000000000084000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF000000FF00000084000000840000008400 - 0000000000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000000000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000FF0000008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FF0000008400000084000000840000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000084000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF00000084000000FF00000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF00000084000000FF000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000840000008400000084000000FF000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000848484008484840084848400C6C6C60084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF0000008400000084000000000000008400 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000840000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 840084848400FFFFFF00C6C6C600FFFFFF00C6C6C60084848400848484000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF0000008400000084000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF0000FF0000FFFFFF0000FF000000FF000000840000008400000084 - 000000000000000000000000000000000000000000000000000084848400C6C6 - C600FFFFFF00C6C6C600FFFFFF00C6C6C600C6C6C60084848400848484008484 - 840000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF00000084000000FF0000008400000084000000840000008400 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF0000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000084 - 000000840000000000000000000000000000000000000000000084848400FFFF - FF00C6C6C600FFFFFF00C6C6C600FFFFFF00C6C6C60084848400848484008484 - 840084848400000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF0000008400000084000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF00FFFFFF0000FF000000FF000000FF000000840000008400000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600FFFFFF00FFFFFF00C6C6C600C6C6C600C6C6C60084848400848484008484 - 840084848400000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF0000008400000084000000000000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF000000FF000000FF000000FF000000FF000000FF0000008400000084 - 000000840000000000000000000000000000000000000000000084848400FFFF - FF00C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600848484008484 - 840084848400000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FF000000FF000000FF0000008400000000000000840000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6008484 - 840084848400000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF00000084000000FF0000008400000084000000840000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF0000008400000084000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6008484 - 840084848400000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF0000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF - 0000008400000084000000000000000000000000000000000000000000008484 - 8400C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6 - C60084848400848484000000000000000000000000000000000000000000FF00 - 0000FF0000000000000000000000000000000000000000000000000000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000FF0000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000084000000FF000000FF000000FF000000FF000000FF0000008400000084 - 0000000000000000000000000000000000000000000000000000000000000000 - 000084848400C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF000000FF000000FF000000FF0000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000FF0000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000084000000FF000000FF00000084000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000084848400C6C6C600C6C6C6008484840084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF0000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000840000008400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF000000FF000000FF000000FF0000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFF0000FC7F003FFFFF0000 - F01F7FDF803F0000C0077FEF801F000000010077800F00000001003B80070000 - 8003003D80030000C007400180010000C007401D80010000E00F600DC0010000 - F01F7001E0010000F01FB805F0010000F83FDC0DF8010000FC7FEDFDFC010000 - FC7FF5FDFE010000FEFFF801FFFF0000FFFFFFFFFFFFFFFFFFFFFFFFF81FF83F - FF3FFF3FE007E00FF81FF81FC003C007E00FE00FC003C007C007C007C003C007 - C003C003C003C007C003C003C003E00FC003C003C003E00FC003C003C003F01F - C003C003C003F01FE003E003C003F83FF00FF00FC003F83FF83FF83FC003FC7F - FCFFFCFFE007FC7FFFFFFFFFF81FFEFF00000000000000000000000000000000 - 000000000000} - end - object pmChangeFont: TPopupMenu - OnPopup = pmChangeFontPopup - Left = 33 - Top = 404 - object miChangeFont: TMenuItem - Caption = 'Change Fo&nt ...' - Default = True - ShortCut = 16454 - OnClick = btnChangeFontClick - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxTLLnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxTLLnk.pas deleted file mode 100644 index ee5d4f8e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxTLLnk.pas +++ /dev/null @@ -1,5176 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxTLLnk; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - Menus, StdCtrls, ExtCtrls, ComCtrls, ImgList, dxCntner, dxTL, dxTLClms, - dxExEdtr, dxPSGlbl, dxBase, dxPSCore, cxDrawTextUtils; - -type - TdxTreeListPaintOption = - (tlpoBands, tlpoHeaders, tlpoFooters, tlpoRowFooters, tlpoPreview, - tlpoPreviewGrid, tlpoGrid, tlpoFlatCheckMarks, tlpoImages, - tlpoStateImages, tlpoTransparentColumnGraphic, tlpoGraphicAsText, - tlpo3DEffects, tlpoSoft3D, tlpoRowFooterGrid, tlpoCheckMarksAsText, - tlpoTreeLines, tlpoExpandButtons); - TdxTreeListPaintOptions = set of TdxTreeListPaintOption; - - TdxTreeListLinkCellType = - (tlctUnknown, tlstBand, tlstCell, tlstFooter, tlstGroupFooter, tlstHeader, tlstPreview); - - TdxTreeListDrawMode = (tldmStrict, tldmOddEven, tldmBorrowSource); - - PdxTreeListBand = ^TdxTreeListBand; - PdxTreeListColumn = ^TdxTreeListColumn; - PdxTreeListNode = ^TdxTreeListNode; - - TdxTreeListColumnHelperClass = class of TdxTreeListColumnHelper; - - TdxTreeListColumnHelper = class(TdxCustomClassMapItem) - protected - class procedure GetImageLists(AColumn: TdxTreeListColumn; AProc: TdxPSGetImageListProc); virtual; - public - class function ColumnClass: TdxTreeListColumnClass; virtual; - class function PairClass: TClass; override; - class procedure Register; - end; - - TdxTreeListImageColumnHelper = class(TdxTreeListColumnHelper) - protected - class procedure GetImageLists(AColumn: TdxTreeListColumn; AProc: TdxPSGetImageListProc); override; - public - class function ColumnClass: TdxTreeListColumnClass; override; - end; - - TdxTLReportLinkCustomDrawBandCellEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; ABand: TdxTreeListBand; - var AText: string; var AColor: TColor; AFont: TFont; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean) of object; - - TdxTLReportLinkCustomDrawCellEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean) of object; - - TdxTLReportLinkCustomDrawFooterCellEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean) of object; - - TdxTLReportLinkCustomDrawHeaderCellEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; AColumn: TdxTreeListColumn; - var AText: string; var AColor: TColor; AFont: TFont; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ASorted: TdxCellSortOrder; var ADone: Boolean) of object; - - TdxTLReportLinkCustomDrawPreviewCellEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; ANode: TdxTreeListNode; - var AText: string; var AColor, ATextColor: TColor; AFont: TFont; - var ADone: Boolean) of object; - - TdxTLReportLinkCustomDrawRowFooterCellEvent = procedure(Sender: TBasedxReportLink; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; AFooterIndex: Integer; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean) of object; - - TCustomdxTreeListReportLink = class(TBasedxReportLink) - private - FAutoNodesExpand: Boolean; - FBandColor: TColor; - FBandFont: TFont; - FBandsOnEveryPage: Boolean; - FDrawMode: TdxTreeListDrawMode; - FEvenColor: TColor; - FEvenFont: TFont; - FExpandLevel: Integer; - FExtendedSelect: Boolean; - FFixedTransparent: Boolean; - FFooterFont: TFont; - FGraphicAsTextValue: string; - FGridLineColor: TColor; - FGroupNodeColor: TColor; - FGroupNodeFont: TFont; - FHeaderColor: TColor; - FHeaderFont: TFont; - FHorzDelimitByBands: Boolean; - FIsGraphicAsTextValueAssigned: Boolean; - FOddFont: TFont; - FOnlySelected: Boolean; - FOptions: TdxTreeListPaintOptions; - FPreviewColor: TColor; - FPreviewFont: TFont; - FPreviewLineCount: Integer; - FRowFooterColor: TColor; - FRowFooterFont: TFont; - FSupportedCustomDraw: Boolean; - FTreeLineColor: TColor; - - FOnCustomDrawBandCell: TdxTLReportLinkCustomDrawBandCellEvent; - FOnCustomDrawCell: TdxTLReportLinkCustomDrawCellEvent; - FOnCustomDrawFooterCell: TdxTLReportLinkCustomDrawFooterCellEvent; - FOnCustomDrawHeaderCell: TdxTLReportLinkCustomDrawHeaderCellEvent; - FOnCustomDrawPreviewCell: TdxTLReportLinkCustomDrawPreviewCellEvent; - FOnCustomDrawRowFooterCell: TdxTLReportLinkCustomDrawRowFooterCellEvent; - - FAbsoluteIndexes: TList; - FColumnInfos: TList; - FNodes: TList; - - FBandFontIndex: Integer; - FBandHeight: Integer; - FCustomDrawFontChanged: Boolean; - FEvenFontIndex: Integer; - FEvenHyperLinkFontIndex: Integer; - FFooterPanelHeight: Integer; - FFooterRowHeight: Integer; - FFullWidth: Integer; - FGroupNodeFontIndex: Integer; - FGroupRowHeight: Integer; - FGroupFooterRowHeight: Integer; - FFooterFontIndex: Integer; - FHeaderFontIndex: Integer; - FHeaderRowHeight: Integer; - FHorzDelimiterCell: TdxReportCell; - FHyperLinkFontIndex: Integer; - FOddHyperLinkFontIndex: Integer; - FOddFontIndex: Integer; - FPaintStyle: TdxTreeListPaintStyle; - FPreviewFontIndex: Integer; - FPreviewHeight: Integer; - FPreviewLineHeight: Integer; - FRowFooterFontIndex: Integer; - FRowHeight: Integer; - FSaveFont: TFont; - FShowRoot: Boolean; - - function GetCustomTreeList: TCustomdxTreeListControl; - function GetExpandLevel: Integer; - function GetExtendedColorManage: Boolean; - function GetGraphicAsTextValue: string; - function GetOddColor: TColor; - function GetOptions: TdxTreeListPaintOptions; - function GetUseColumnFont: Boolean; - function IsGraphicAsTextValueStored: Boolean; - procedure SetAutoNodesExpand(Value: Boolean); - procedure SetBandFont(Value: TFont); - procedure SetBandColor(Value: TColor); - procedure SetBandsOnEveryPage(Value: Boolean); - procedure SetDrawMode(Value: TdxTreeListDrawMode); - procedure SetEvenColor(Value: TColor); - procedure SetEvenFont(Value: TFont); - procedure SetExpandLevel(Value: Integer); - procedure SetExtendedColorManage(Value: Boolean); - procedure SetExtendedSelect(Value: Boolean); - procedure SetFixedTransparent(Value: Boolean); - procedure SetFooterFont(Value: TFont); - procedure SetGraphicAsTextValue(const Value: string); - procedure SetGridLineColor(Value: TColor); - procedure SetGroupNodeColor(Value: TColor); - procedure SetGroupNodeFont(Value: TFont); - procedure SetHeaderColor(Value: TColor); - procedure SetHeaderFont(Value: TFont); - procedure SetHorzDelimitByBands(Value: Boolean); - procedure SetOddFont(Value: TFont); - procedure SetOddColor(Value: TColor); - procedure SetPreviewLineCount(Value: Integer); - procedure SetOnCustomDrawBandCell(Value: TdxTLReportLinkCustomDrawBandCellEvent); - procedure SetOnCustomDrawCell(Value: TdxTLReportLinkCustomDrawCellEvent); - procedure SetOnCustomDrawFooterCell(Value: TdxTLReportLinkCustomDrawFooterCellEvent); - procedure SetOnCustomDrawHeaderCell(Value: TdxTLReportLinkCustomDrawHeaderCellEvent); - procedure SetOnCustomDrawPreviewCell(Value: TdxTLReportLinkCustomDrawPreviewCellEvent); - procedure SetOnCustomDrawRowFooterCell(Value: TdxTLReportLinkCustomDrawRowFooterCellEvent); - procedure SetOnlySelected(Value: Boolean); - procedure SetOptions(Value: TdxTreeListPaintOptions); - procedure SetPreviewColor(Value: TColor); - procedure SetPreviewFont(Value: TFont); - procedure SetRowFooterColor(Value: TColor); - procedure SetRowFooterFont(Value: TFont); - procedure SetSupportCustomDraw(Value: Boolean); - procedure SetTreeLineColor(Value: TColor); - procedure SetUseColumnFont(Value: Boolean); - - procedure AddNodes; - procedure CalcAbsoluteIndexes; - procedure CalcColumnInfos(AReportCells: TdxReportCells); - procedure CalcDelimiterCell(AReportCells: TdxReportCells); - procedure CalcFontIndexes(AReportCells: TdxReportCells); - procedure FreeHeaderInfos; - - function CanDrawImages(ANode: TdxTreeListNode): Boolean; - function CanDrawStateImages(ANode: TdxTreeListNode): Boolean; - function CanUseOddEvenMode(ANode: TdxTreeListNode; ANodeIndex: Integer): Boolean; - procedure CustomDrawFontChanged(Sender: TObject); - function GetBandLeft(AVisibleIndex: Integer): Integer; - function GetBandRect(AVisibleIndex: Integer): TRect; - function GetBandRegionHeight: Integer; - function GetBandWidth(AVisibleIndex: Integer): Integer; - function GetCellColor(ANode: TdxTreeListNode; AColumnIndex, ANodeIndex: Integer): TColor; - function GetCellCustomDrawInfo(AItem: TdxReportVisualItem; ANode: PdxTreeListNode; - AColumn: PdxTreeListColumn; ABand: PdxTreeListBand; - AFooterIndex: PInteger): TdxTreeListLinkCellType; - function GetEvenNodeFontIndex(AColumn: TdxTreeListColumn): Integer; - function GetOddEvenModeCellColor(ANodeIndex: Integer): TColor; - function GetOddEvenModeFontIndex(AColumn: TdxTreeListColumn; ANodeIndex: Integer): Integer; - function GetOddNodeFontIndex(AColumn: TdxTreeListColumn): Integer; - function GetCellFontIndex(ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; - ANodeIndex: Integer): Integer; - procedure GetCellRect(AAbsoluteIndex: Integer; ACellType: TdxTreeListLinkCellType; - var R: TRect); - procedure GetColumnInfos(AAbsoluteIndex: Integer; ABandIndex, ARowIndex, - AColIndex, ARowCount, AColCount: PInteger; AIsFirstColumn, AIsLastColumn: PBoolean); - function GetLevelColor(ANode: TdxTreeListNode; ANodeIndex: Integer): TColor; - function GetPreviewColor(ANodeIndex: Integer): TColor; - function GetPreviewFontIndex(ANode: TdxTreeListNode; ANodeIndex: Integer): Integer; - function AreSelectedNodesExist: Boolean; - function IsCellTransparent(ANode: TdxTreeListNode): Boolean; - function IsLevelTransparent(ANode: TdxTreeListNode): Boolean; - function IsExtendedSelect: Boolean; - function IsHyperLinkColumnsExists: Boolean; - function IsPreviewTransparent(ANode: TdxTreeListNode): Boolean; - function IsSelectedNode(ANode: TdxTreeListNode): Boolean; - function MakeLookAndFeel: TdxLookAndFeel; - function NeedGroupNodeFontIndex(ANode: TdxTreeListNode; AFontIndex: Integer): Boolean; - - procedure ReadIsGraphicAsTextValueAssigned(AReader: TReader); - procedure WriteIsGraphicAsTextValueAssigned(AWriter: TWriter); - protected - FIndent: Integer; - procedure DefineProperties(Filer: TFiler); override; - - procedure ConstructReport(AReportCells: TdxReportCells); override; - procedure GetImageLists(AProc: TdxPSGetImageListProc); override; - procedure InternalRestoreDefaults; override; - procedure InternalRestoreFromOriginal; override; - function IsDrawFootersOnEveryPage: Boolean; override; - function IsDrawHeadersOnEveryPage: Boolean; override; - procedure MakeDelimiters(AReportCells: TdxReportCells; - AHorzDelimiters, AVertDelimiters: TList); override; - - procedure AssignValues(ADataItem: TAbstractdxReportCellData; - ANode: TdxTreeListNode; AColumn, AReferenceColumn: TdxTreeListColumn); virtual; abstract; - function GetDataClass(AColumn: TdxTreeListColumn; - ANode: TdxTreeListNode): TdxReportCellDataClass; virtual; - function GetGroupColumnIndex(ANode: TdxTreeListNode): Integer; virtual; - procedure GetImageListsFromColumns(AProc: TdxPSGetImageListProc); virtual; - procedure GetOwnedImageLists(AProc: TdxPSGetImageListProc); virtual; - function GetReferenceColumn(AColumn: TdxTreeListColumn; - ANode: TdxTreeListNode): TdxTreeListColumn; virtual; - function GetCheckColumnGlyph(AColumn: TdxTreeListColumn): TBitmap; virtual; - function IsCheckColumn(AColumn: TdxTreeListColumn): Boolean; virtual; - function IsGraphicColumn(AColumn: TdxTreeListColumn): Boolean; virtual; - function IsHyperLinkColumn(AColumn: TdxTreeListColumn): Boolean; virtual; - procedure PrepareConstruct(AReportCells: TdxReportCells); virtual; - procedure UnprepareConstruct(AReportCells: TdxReportCells); virtual; - - { custom draw support } - procedure CustomDraw(AItem: TAbstractdxReportCellData; ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; var ADone: Boolean); override; - procedure DoCustomDrawBandCell(ACanvas: TCanvas; ABoundsRect, - AClientRect: TRect; ABand: TdxTreeListBand; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean); virtual; - procedure DoCustomDrawCell(ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; - ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean); virtual; - procedure DoCustomDrawFooterCell(ACanvas: TCanvas; ABoundsRect, - AClientRect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; - var AText: string; var AColor: TColor; AFont: TFont; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); virtual; - procedure DoCustomDrawHeaderCell(ACanvas: TCanvas; ABoundsRect, - AClientRect: TRect; AColumn: TdxTreeListColumn; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ASorted: TdxCellSortOrder; - var ADone: Boolean); virtual; - procedure DoCustomDrawPreviewCell(ACanvas: TCanvas; ABoundsRect, - AClientRect: TRect; ANode: TdxTreeListNode; var AText: string; - var AColor: TColor; AFont: TFont; var ADone: Boolean); virtual; - procedure DoCustomDrawRowFooterCell(ACanvas: TCanvas; ABoundsRect, - AClientRect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; - AFooterIndex: Integer; var AText: string; var AColor: TColor; AFont: TFont; - var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); virtual; - function IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; override; - - { options access } - function AutoCalcPreviewLines: Boolean; - function CheckMarksAsText: Boolean; - function FlatCheckMarks: Boolean; - function GraphicsAsText: Boolean; - function OddEvenMode: Boolean; - function ShowBands: Boolean; - function ShowExpandButtons: Boolean; - function ShowFooters: Boolean; - function ShowGrid: Boolean; - function ShowHeaders: Boolean; - function ShowImages: Boolean; - function ShowPreview: Boolean; - function ShowPreviewGrid: Boolean; - function ShowRowFooterGrid: Boolean; - function ShowRowFooters: Boolean; - function ShowStateImages: Boolean; - function ShowTreeLines: Boolean; - function TransparentColumnGraphics: Boolean; - function Use3DEffects: Boolean; - function UseSoft3D: Boolean; - - property CustomTreeList: TCustomdxTreeListControl read GetCustomTreeList; - property OnCustomDrawBandCell: TdxTLReportLinkCustomDrawBandCellEvent - read FOnCustomDrawBandCell write SetOnCustomDrawBandCell; - property OnCustomDrawCell: TdxTLReportLinkCustomDrawCellEvent - read FOnCustomDrawCell write SetOnCustomDrawCell; - property OnCustomDrawFooterCell: TdxTLReportLinkCustomDrawFooterCellEvent - read FOnCustomDrawFooterCell write SetOnCustomDrawFooterCell; - property OnCustomDrawHeaderCell: TdxTLReportLinkCustomDrawHeaderCellEvent - read FOnCustomDrawHeaderCell write SetOnCustomDrawHeaderCell; - property OnCustomDrawPreviewCell: TdxTLReportLinkCustomDrawPreviewCellEvent - read FOnCustomDrawPreviewCell write SetOnCustomDrawPreviewCell; - property OnCustomDrawRowFooterCell: TdxTLReportLinkCustomDrawRowFooterCellEvent - read FOnCustomDrawRowFooterCell write SetOnCustomDrawRowFooterCell; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function DefaultGraphicAsTextValue: string; virtual; - - function IsDBGridLink: Boolean; virtual; - function IsDBTreeListLink: Boolean; virtual; - function IsTreeListLink: Boolean; virtual; - published - property AutoNodesExpand: Boolean read FAutoNodesExpand write SetAutoNodesExpand default False; - property BandColor: TColor read FBandColor write SetBandColor default dxDefaultFixedColor;//clSilver; - property BandFont: TFont read FBandFont write SetBandFont stored IsFontStored; - property BandsOnEveryPage: Boolean read FBandsOnEveryPage write SetBandsOnEveryPage default True; - property Color; - property DrawMode: TdxTreeListDrawMode read FDrawMode write SetDrawMode default tldmStrict; - property ExpandLevel: Integer read GetExpandLevel write SetExpandLevel default -1; {full expand} - {obsolete - use instead: DrawMode = tldmBorrowSource} - property ExtendedColorManage: Boolean read GetExtendedColorManage write SetExtendedColorManage default False; - property ExtendedSelect: Boolean read FExtendedSelect write SetExtendedSelect default True; - property EvenColor: TColor read FEvenColor write SetEvenColor default clWhite; - property EvenFont: TFont read FEvenFont write SetEvenFont stored IsFontStored; - property FixedTransparent: Boolean read FFixedTransparent write SetFixedTransparent default False; - property Font; - property FooterFont: TFont read FFooterFont write SetFooterFont stored IsFontStored; - property GraphicAsTextValue: string read GetGraphicAsTextValue write SetGraphicAsTextValue stored IsGraphicAsTextValueStored; - property GridLineColor: TColor read FGridLineColor write SetGridLineColor default clBlack; - property GroupNodeFont: TFont read FGroupNodeFont write SetGroupNodeFont stored IsFontStored; - property GroupNodeColor: TColor read FGroupNodeColor write SetGroupNodeColor default dxDefaultFixedColor;//clSilver; - property HeaderColor: TColor read FHeaderColor write SetHeaderColor default dxDefaultFixedColor;//clSilver; - property HeaderFont: TFont read FHeaderFont write SetHeaderFont stored IsFontStored; - property HorzDelimitByBands: Boolean read FHorzDelimitByBands write SetHorzDelimitByBands default False; - property OddColor: TColor read GetOddColor write SetOddColor default clWhite; - property OddFont: TFont read FOddFont write SetOddFont stored IsFontStored; - property OnlySelected: Boolean read FOnlySelected write SetOnlySelected default False; - property Options: TdxTreeListPaintOptions read GetOptions write SetOptions - default [tlpoBands..tlpoStateImages, tlpoSoft3D, tlpoRowFooterGrid, tlpoTreeLines, tlpoExpandButtons]; - property FootersOnEveryPage; - property HeadersOnEveryPage default True; - property PreviewColor: TColor read FPreviewColor write SetPreviewColor default clWhite; - property PreviewFont: TFont read FPreviewFont write SetPreviewFont stored IsFontStored; - property PreviewLineCount: Integer read FPreviewLineCount write SetPreviewLineCount default -1; - property RowFooterColor: TColor read FRowFooterColor write SetRowFooterColor default dxDefaultFixedColor;//clSilver; - property RowFooterFont: TFont read FRowFooterFont write SetRowFooterFont stored IsFontStored; - property ScaleFonts; - property SupportedCustomDraw: Boolean read FSupportedCustomDraw write SetSupportCustomDraw default False; - property Transparent; - property TreeLineColor: TColor read FTreeLineColor write SetTreeLineColor default clGray; - property UseHorzDelimiters; - property UseVertDelimiters; - {obsolete -> you should use DrawMode = tldmBorrowSource} - property UseColumnFont: Boolean read GetUseColumnFont write SetUseColumnFont default False; - end; - - TdxTreeListReportLink = class(TCustomdxTreeListReportLink) - private - function GetTreeList: TdxTreeList; - protected - procedure AssignValues(ADataItem: TAbstractdxReportCellData; - ANode: TdxTreeListNode; AColumn, AReferenceColumn: TdxTreeListColumn); override; - function GetDataClass(AColumn: TdxTreeListColumn; - ANode: TdxTreeListNode): TdxReportCellDataClass; override; - procedure GetOwnedImageLists(AProc: TdxPSGetImageListProc); override; - public - property TreeList: TdxTreeList read GetTreeList; - published - property OnCustomDrawBandCell; - property OnCustomDrawCell; - property OnCustomDrawFooterCell; - property OnCustomDrawHeaderCell; - property OnCustomDrawPreviewCell; - property OnCustomDrawRowFooterCell; - end; - - TdxTLReportLinkDesignWindow = class(TStandarddxReportLinkDesignWindow) - PageControl1: TPageControl; - tshColors: TTabSheet; - tshFonts: TTabSheet; - pnlPreview: TPanel; - chbxTransparent: TCheckBox; - chbxFixedTransparent: TCheckBox; - gbxTransparent: TGroupBox; - lblColor: TLabel; - bvlColorHolder: TBevel; - gbxFixedTransparent: TGroupBox; - lblBandColor: TLabel; - lblHeaderColor: TLabel; - lblRowFooterColor: TLabel; - bvlBandColorHolder: TBevel; - bvlHeaderColorHolder: TBevel; - bvlRowFooterColorHolder: TBevel; - lblGridLineColor: TLabel; - bvlGridLineColorHolder: TBevel; - dxTLPreview: TdxTreeList; - dxTLPreviewColumn1: TdxTreeListColumn; - ilTLImages: TImageList; - btnChangeFont: TButton; - lblGroupNodeColor: TLabel; - bvlGroupNodeColorHolder: TBevel; - lblPreviewColor: TLabel; - bvlPreviewColorHolder: TBevel; - dxTLPreviewColumn3: TdxTreeListCheckColumn; - lbxFonts: TListBox; - dxTLPreviewColumn4: TdxTreeListImageColumn; - tshBehaviors: TTabSheet; - lblEvenColor: TLabel; - bvlEvenColorHolder: TBevel; - tshOptions: TTabSheet; - Bevel11: TBevel; - chbxShowGrid: TCheckBox; - chbxShowNodeGrid: TCheckBox; - chbxShowBands: TCheckBox; - chbxShowHeaders: TCheckBox; - chbxShowFooters: TCheckBox; - chbxShowGroupFooters: TCheckBox; - imgShow: TImage; - lblShow: TLabel; - chbxTransparentColumnGraphic: TCheckBox; - chbxDisplayGraphicsAsText: TCheckBox; - chbxShowStateImages: TCheckBox; - chbxShowImages: TCheckBox; - Bevel12: TBevel; - Bevel13: TBevel; - Image3: TImage; - chbxOnlySelected: TCheckBox; - chbxExtendedSelect: TCheckBox; - chbxAutoNodesExpand: TCheckBox; - Image4: TImage; - lblExpandLevel: TLabel; - bvlExpandLevelHolder: TBevel; - lblSelection: TLabel; - lblExpanding: TLabel; - lblRefinements: TLabel; - bvlRefinements: TBevel; - imgRefinements: TImage; - lblLookAndFeel: TLabel; - Image8: TImage; - Bevel15: TBevel; - chbxUse3DEffects: TCheckBox; - chbxUseSoft3D: TCheckBox; - Bevel16: TBevel; - bvlShowImages: TBevel; - pmChangeFont: TPopupMenu; - miChangeFont: TMenuItem; - bvlTreeLineColorHolder: TBevel; - lblTreeLineColor: TLabel; - tshPreview: TTabSheet; - Bevel9: TBevel; - lblPreviewLineCount: TLabel; - bvlPreviewLineCountHolder: TBevel; - lblPreview: TLabel; - imgPreview: TImage; - chbxShowPreview: TCheckBox; - chbxAutoCalcPreviewLines: TCheckBox; - chbxShowExpandButtons: TCheckBox; - chbxShowTreeLines: TCheckBox; - Bevel2: TBevel; - lblDrawMode: TLabel; - cbxDrawMode: TComboBox; - Bevel10: TBevel; - Image1: TImage; - lblOnEveryPage: TLabel; - chbxBandsOnEveryPage: TCheckBox; - chbxHeadersOnEveryPage: TCheckBox; - chbxFootersOnEveryPage: TCheckBox; - chbxCheckMarksAsText: TCheckBox; - chbxFlatCheckMarks: TCheckBox; - lblPreviewWindow: TStaticText; - stTransparent: TStaticText; - stFixedTransparent: TStaticText; - procedure FontClick(Sender: TObject); - procedure chbxTransparentClick(Sender: TObject); - procedure lblColorClick(Sender: TObject); - procedure lblExpandLevelClick(Sender: TObject); - procedure chbxOnlySelectedClick(Sender: TObject); - procedure chbxExtendedSelectClick(Sender: TObject); - procedure dxTLPreviewGetFooterCellText(Sender: TObject; - ANode: TdxTreeListNode; AColumn, AFooterIndex: Integer; - var AText: string); - procedure dxTLPreviewGetPreviewText(Sender: TObject; - ANode: TdxTreeListNode; var AText: string); - procedure dxTLPreviewIsExistFooterCell(Sender: TObject; - AColumn: Integer; var AExist: Boolean); - procedure dxTLPreviewIsExistRowFooterCell(Sender: TObject; - ANode: TdxTreeListNode; AColumn, AFooterIndex: Integer; - var AExist: Boolean); - procedure dxTLPreviewIsLevelFooter(Sender: TObject; ALevel: Integer; - var AExist: Boolean); - procedure dxTLPreviewCustomDrawFooterNode(Sender: TObject; - ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; AFooterIndex: Integer; var AText: string; - var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; - var ADone: Boolean); - procedure dxTLPreviewCustomDrawFooter(Sender: TObject; - ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; var AText: string; var AColor: TColor; - AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean); - procedure btnChangeFontClick(Sender: TObject); - procedure FontsMouseMove(Sender: TObject; Shift: TShiftState; X, - Y: Integer); - procedure dxTLPreviewCustomDrawPreviewCell(Sender: TObject; - ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; - ASelected: Boolean; var AText: string; var AColor, - ATextColor: TColor; AFont: TFont; var ADone: Boolean); - procedure FontsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure lbxFontsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure lbxFontsClick(Sender: TObject); - procedure dxTLPreviewColumn4CustomDrawCell(Sender: TObject; - ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; ASelected, AFocused, - ANewItemRow: Boolean; var AText: string; var AColor: TColor; - AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean); - procedure chbxAutoNodesExpandClick(Sender: TObject); - procedure chbxHeadersOnEveryPageClick(Sender: TObject); - procedure chbxBandsOnEveryPageClick(Sender: TObject); - procedure chbxFootersOnEveryPageClick(Sender: TObject); - procedure dxTLPreviewCustomDrawColumnHeader(Sender: TObject; - AColumn: TdxTreeListColumn; ACanvas: TCanvas; ARect: TRect; - var AText: string; var AColor: TColor; AFont: TFont; - var AAlignment: TAlignment; var ASorted: TdxTreeListColumnSort; - var ADone: Boolean); - procedure dxTLPreviewCustomDrawBand(Sender: TObject; - ABand: TdxTreeListBand; ACanvas: TCanvas; ARect: TRect; - var AText: string; var AColor: TColor; AFont: TFont; - var AAlignment: TAlignment; var ADone: Boolean); - procedure chbxAutoCalcPreviewLinesClick(Sender: TObject); - procedure dxTLPreviewCustomDrawCell(Sender: TObject; ACanvas: TCanvas; - ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; - ASelected, AFocused, ANewItemRow: Boolean; var AText: string; - var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; - var ADone: Boolean); - procedure dxTLPreviewGetPreviewLineCount(Sender: TObject; - ANode: TdxTreeListNode; var LCount: Integer); - procedure chbxShowClick(Sender: TObject); - procedure cbxDrawModeChange(Sender: TObject); - procedure lblDrawModeClick(Sender: TObject); - procedure pmChangeFontPopup(Sender: TObject); - procedure lbxFontsDblClick(Sender: TObject); - procedure dxTLPreviewColumn3CustomDrawCell(Sender: TObject; - ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; ASelected, AFocused, - ANewItemRow: Boolean; var AText: String; var AColor: TColor; - AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean); - procedure PageControl1Change(Sender: TObject); - procedure cbxDrawModeDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure stTransparentClick(Sender: TObject); - procedure stFixedTransparentClick(Sender: TObject); - private - ccbxColor: TCustomComboBox; - ccbxEvenColor: TCustomComboBox; - ccbxBandColor: TCustomComboBox; - ccbxHeaderColor: TCustomComboBox; - ccbxGroupNodeColor: TCustomComboBox; - ccbxPreviewColor: TCustomComboBox; - ccbxRowFooterColor: TCustomComboBox; - ccbxGridLineColor: TCustomComboBox; - ccbxTreeLineColor: TCustomComboBox; - seExpandLevel: TCustomEdit; - sePreviewLineCount: TCustomEdit; - FPreviewBox: TCustomControl; - procedure ccbxColorChange(Sender: TObject); - procedure CreateControls; - procedure DoChangeFont(AIndex: Integer); - procedure ExpandLevelChange(Sender: TObject); - procedure FillTreeListData; - function GetFontByIndex(AIndex: Integer): TFont; - function GetFontInfoText(AIndex: Integer): string; - function GetMaxWidth: Integer; - function GetNodeFont(ANode: TdxTreeListNode; ANodeIndex: Integer): TFont; - function GetNodeIndex(ANode: TdxTreeListNode): Integer; - function GetPreviewFont(ANode: TdxTreeListNode; ANodeIndex: Integer): TFont; - function GetReportLink: TCustomdxTreeListReportLink; - function IsChangeFontEnabled: Boolean; - function IsDisableIndex(AIndex: Integer): Boolean; - procedure pbxPreviewPaint(Sender: TObject); - procedure PreviewLineCountChange(Sender: TObject); - procedure SetColorByTag(ATag: Integer; AColor: TColor); - procedure SetupPreview; - procedure CMDialogChar(var Msg: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure DoInitialize; override; - {$IFDEF DELPHI7} - function GetPreviewHost: TCustomPanel; override; - {$ENDIF} - procedure LoadStrings; override; - procedure PaintPreview(ACanvas: TCanvas; R: TRect); override; - procedure UpdateControlsState; override; - procedure UpdatePreview; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property ReportLink: TCustomdxTreeListReportLink read GetReportLink; - end; - - TdxTreeListColumnMapperProc = function(AColumn: TdxTreeListColumn; - AReportLink: TCustomdxTreeListReportLink; ANode: TdxTreeListNode): TdxReportCellDataClass; - - TdxTreeListAssignDataProc = procedure(AReportLink: TCustomdxTreeListReportLink; - ADataItem: TAbstractdxReportCellData; TreeList: TCustomdxTreeList; - ANode: TdxTreeListNode; AColumn, AReferenceColumn: TdxTreeListColumn); - -function DefaultdxTreeListMapperProc(AColumn: TdxTreeListColumn; - AReportLink: TCustomdxTreeListReportLink; ANode: TdxTreeListNode): TdxReportCellDataClass; -procedure DefaultdxTreeListAssignDataProc(AReportLink: TCustomdxTreeListReportLink; - ADataItem: TAbstractdxReportCellData; TreeList: TCustomdxTreeList; - ANode: TdxTreeListNode; AColumn, AReferenceColumn: TdxTreeListColumn); - -var - FdxTreeListAssignDataProc: TdxTreeListAssignDataProc = nil; - FdxTreeListColumnMapperProc: TdxTreeListColumnMapperProc = nil; - FPicture: TPicture; - -const - dxDefaultTreeListPaintOptions: TdxTreeListPaintOptions = - [tlpoBands, tlpoHeaders, tlpoFooters, tlpoRowFooters, tlpoPreview, - tlpoPreviewGrid, tlpoGrid, tlpoFlatCheckMarks, tlpoImages, tlpoStateImages, - tlpoSoft3D, tlpoRowFooterGrid, tlpoTreeLines, tlpoExpandButtons]; - -implementation - -{$R *.DFM} - -uses - Math, {$IFDEF DELPHI7} Themes, UxTheme, {$ENDIF} cxClasses, dxExtCtrls, - dxPSRes, dxPSPopupMan, dxPrnDev, dxPSUtl; - -const - SortOrderMap: array[TdxTreeListColumnSort] of TdxCellSortOrder = (csoNone, csoDown, csoUp); - TreeLineStylesMap: array[TdxTreeLineStyle] of TdxPSTreeLineStyle = (tlsSolid, tlsDot); - -function GetDesignerString(AnIndex: Integer): string; -begin - case AnIndex of - 0: Result := cxGetResourceString(@sdxItem1Description); - 1: Result := cxGetResourceString(@sdxItem2Description); - 2: Result := cxGetResourceString(@sdxItem3Description); - 3: Result := cxGetResourceString(@sdxItem4Description); - 4: Result := cxGetResourceString(@sdxItem5Description); - 5: Result := cxGetResourceString(@sdxItem6Description); - else - Result := cxGetResourceString(@sdxItem7Description); - end; -end; - -type - TdxTreeListAccess = class(TCustomdxTreeListControl); - TdxTreeListColumnAccess = class(TdxTreeListColumn); - TdxTreeListGraphicColumnAccess = class(TdxTreeListGraphicColumn); - TdxTreeListWrapperColumnAccess = class(TdxTreeListWrapperColumn); - - PdxColumnInfo = ^TdxColumnInfo; - TdxColumnInfo = record - BandIndex: Integer; - ColIndex: Integer; - ColCount: Integer; - RowIndex: Integer; - RowCount: Integer; - ColumnLeft: Integer; - ColumnRight: Integer; - CellTop: Integer; - CellBottom: Integer; - FooterTop: Integer; - FooterBottom: Integer; - HeaderTop: Integer; - HeaderBottom: Integer; - NodeFooterTop: Integer; - NodeFooterBottom: Integer; - IsFirstColumn: Boolean; - IsLastColumn: Boolean; - IsHeaderMultiline: Boolean; - IsMultiline: Boolean; - FontIndex: Integer; - end; - - TdxColumnHelpersFactory = class(TdxCustomClassMaps) - private - function GetHelperClass(Column: TdxTreeListColumn): TdxTreeListColumnHelperClass; - public - class function Instance: TdxColumnHelpersFactory; reintroduce; overload; - property HelperClasses[Column: TdxTreeListColumn]: TdxTreeListColumnHelperClass read GetHelperClass; default; - end; - -function dxColumnHelpersFactory: TdxColumnHelpersFactory; -begin - Result := TdxColumnHelpersFactory.Instance; -end; - -class function TdxColumnHelpersFactory.Instance: TdxColumnHelpersFactory; -begin - Result := inherited Instance as TdxColumnHelpersFactory; -end; - -function TdxColumnHelpersFactory.GetHelperClass(Column: TdxTreeListColumn): TdxTreeListColumnHelperClass; -begin - Result := TdxTreeListColumnHelperClass(PairClasses[Column.ClassType]); -end; - -{ TdxTreeListColumnHelper } - -class function TdxTreeListColumnHelper.ColumnClass: TdxTreeListColumnClass; -begin - Result := TdxTreeListColumn; -end; - -class function TdxTreeListColumnHelper.PairClass: TClass; -begin - Result := ColumnClass; -end; - -class procedure TdxTreeListColumnHelper.Register; -begin - dxColumnHelpersFactory.Register(Self); -end; - -class procedure TdxTreeListColumnHelper.GetImageLists(AColumn: TdxTreeListColumn; - AProc: TdxPSGetImageListProc); -begin -end; - -{ TdxTreeListImageColumnHelper } - -class function TdxTreeListImageColumnHelper.ColumnClass: TdxTreeListColumnClass; -begin - Result := TdxTreeListImageColumn; -end; - -class procedure TdxTreeListImageColumnHelper.GetImageLists(AColumn: TdxTreeListColumn; - AProc: TdxPSGetImageListProc); -begin - inherited GetImageLists(AColumn, AProc); - AProc(TdxTreeListImageColumn(AColumn).Images); -end; - -{ Utility routines } - -function IsValidPointer(const AData: Integer): Boolean; -begin - Result := DWORD(AData) > SysInit.HInstance; -end; - -function ExposeTreeList(ATreeList: TCustomdxTreeListControl): TdxTreeListAccess; -begin - Result := TdxTreeListAccess(ATreeList); -end; - -{ - generic text columns - - TdxTreeListColumn, TdxTreeListMaskColumn, TdxTreeListButtonColumn, - TdxTreeListDateColumn, TdxTreeListSpinColumn, TdxTreeListPickColumn, - TdxTreeListCalcColumn, TdxTreeListHyperLinkColumn, TdxTreeListTimeColumn, - TdxTreeListCurrencyColumn, TdxTreeListMemoColumn, TdxTreeListMRUColumn, - TdxTreeListBlobColumn, TdxTreeListWrapperColumn, TdxTreeListPopupColumn } - -function DefaultdxTreeListMapperProc(AColumn: TdxTreeListColumn; - AReportLink: TCustomdxTreeListReportLink; ANode: TdxTreeListNode): TdxReportCellDataClass; -const - CheckClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellCheckImage, TdxReportCellString); - ImageClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellGraphic, TdxReportCellImage); - GraphicClasses: array[Boolean] of TdxReportCellDataClass = (TdxReportCellString, TdxReportCellGraphic); -begin - if AColumn is TdxTreeListCheckColumn then - Result := CheckClasses[tlpoCheckMarksAsText in AReportLink.Options] - else - if AColumn is TdxTreeListImageColumn then - Result := ImageClasses[TdxTreeListImageColumn(AColumn).ShowDescription] - else - Result := GraphicClasses[(AColumn is TdxTreeListGraphicColumn) and not (tlpoGraphicAsText in AReportLink.Options)]; -end; - -procedure DefaultdxTreeListAssignDataProc(AReportLink: TCustomdxTreeListReportLink; - ADataItem: TAbstractdxReportCellData; TreeList: TCustomdxTreeList; - ANode: TdxTreeListNode; AColumn, AReferenceColumn: TdxTreeListColumn); -var - ATreeList: TdxTreeListAccess; - S: string; - AImageIndex, Stub: Integer; - AState: TCheckBoxState; - NullStyle: TdxShowNullFieldStyle; - GraphicClass: TGraphicClass; -begin - ATreeList := TdxTreeListAccess(TreeList); - - if ADataItem is TdxReportCellCheck then - begin - with TdxReportCellCheckImage(ADataItem) do - begin - S := ATreeList.GetNodeString(ANode, AColumn.Index); - AState := TCheckBoxState(TdxTreeListCheckColumn(AReferenceColumn).GetCheckBoxState(S)); - NullStyle := TdxTreeListCheckColumn(AReferenceColumn).ShowNullFieldStyle; - Enabled := not ((AState = cbGrayed) and (NullStyle > nsUnchecked)); - Checked := (AState = cbChecked) or - ((AState = cbGrayed) and (NullStyle = nsGrayedChecked)); - FlatBorder := AReportLink.FlatCheckMarks; - if not TdxTreeListCheckColumn(AReferenceColumn).Glyph.Empty then - begin - Glyph := TdxTreeListCheckColumn(AReferenceColumn).Glyph; - GlyphCount := TdxTreeListCheckColumn(AReferenceColumn).GlyphCount; - end; - end; - Exit; - end; - - if AReferenceColumn is TdxTreeListMemoColumn then - begin - with TdxReportCellString(ADataItem) do - begin - Text := ATreeList.GetDisplayValue(ANode, AColumn.Index); - EndEllipsis := (aoDrawEndEllipsis in TreeList.Options); - Multiline := True; - TextAlignX := dxTextAlignX[ATreeList.GetCellAlignment(ANode, AColumn.Index)]; - TextAlignY := taTop; - end; - Exit; - end; - - if ADataItem is TdxReportCellImage then - begin - with TdxReportCellImage(ADataItem) do - begin - S := ATreeList.GetDisplayValue(ANode, AColumn.Index); - Text := AReferenceColumn.GetDisplayValue(ANode, S); - EndEllipsis := True; - Multiline := TdxTreeListImageColumn(AReferenceColumn).MultilineText; - TextAlignX := dxTextAlignX[ATreeList.GetCellAlignment(ANode, {AReferenceColumn ?}AColumn.Index)]; - if Multiline then - TextAlignY := dxMultilineTextAlignY[Multiline] - else - TextAlignY := dxTextAlignY[AReferenceColumn.VertAlignment]; - S := ATreeList.GetCellText(ANode, AColumn.Index); - TdxTreeListImageColumn(AReferenceColumn).GetIndexes(S, AImageIndex, Stub); - ImageList := TdxTreeListImageColumn(AReferenceColumn).Images; - ImageIndex := AImageIndex; - MakeSpaceForEmptyImage := True; - end; - Exit; - end; - - if ADataItem is TdxReportCellGraphic then - begin - if AReferenceColumn is TdxTreeListGraphicColumn then - begin - GraphicClass := TdxTreeListGraphicColumnAccess(AReferenceColumn).GetGraphicClass(ANode); - LoadPicture(FPicture, GraphicClass, ANode.Values[AColumn.Index]); - if GraphicClass = nil then GraphicClass := TBitmap; - with TdxReportCellGraphic(ADataItem) do - begin - Image := FPicture.Graphic; - ImageTransparent := - (tlpoTransparentColumnGraphic in AReportLink.Options) or GraphicClass.InheritsFrom(TIcon); - if not GraphicClass.InheritsFrom(TIcon) and TdxTreeListGraphicColumn(AReferenceColumn).Stretch then - DrawMode := gdmStretchProportional - else - if TdxTreeListGraphicColumn(AReferenceColumn).Center then - DrawMode := gdmCenter - else - DrawMode := gdmNone; - end - end - else // AColumn is TdxTreeListImageColumn - begin - with TdxReportCellGraphic(ADataItem) do - begin - ImageTransparent := True; - ImageList := TdxTreeListImageColumn(AReferenceColumn).Images; - S := ATreeList.GetCellText(ANode, AColumn.Index); - TdxTreeListImageColumn(AReferenceColumn).GetIndexes(S, AImageIndex, Stub); - ImageIndex := AImageIndex; - DrawMode := gdmCenter; - end - end; - Exit; - end; - - with TdxReportCellString(ADataItem) do - begin - if (AReferenceColumn is TdxTreeListGraphicColumn) then - begin - Text := AReportLink.GraphicAsTextValue; - Multiline := False; - end - else - begin - Text := ATreeList.GetDisplayValue(ANode, AColumn.Index); - Multiline := TdxTreeListGraphicColumnAccess(AReferenceColumn).IsColumnMultiline or - ((ATreeList.GetHeaderMaxRowCount = 1) and (aoRowAutoHeight in ATreeList.OptionsEx)); - end; - EndEllipsis := ATreeList.IsDrawEndEllipsis; - TextAlignX := dxTextAlignX[ATreeList.GetCellAlignment(ANode, {AReferenceColumn ?}AColumn.Index)]; - if Multiline then - TextAlignY := dxMultilineTextAlignY[Multiline] - else - if AReferenceColumn.VertAlignment in [tlTop, tlCenter] then - TextAlignY := taCenterY - else - TextAlignY := taBottom; - //TextAlignY := dxTextAlignY[AReferenceColumn.VertAlignment]; - end; -end; - -{ TCustomdxTreeListReportLink } - -constructor TCustomdxTreeListReportLink.Create(AOwner: TComponent); - - function CreateFont: TFont; - begin - Result := TFont.Create; - Result.OnChange := FontChanged; - end; - -begin - inherited; - FBandFont := CreateFont; - FEvenFont := CreateFont; - FFooterFont := CreateFont; - FGroupNodeFont := CreateFont; - FHeaderFont := CreateFont; - FOddFont := CreateFont; - FPreviewFont := CreateFont; - FRowFooterFont := CreateFont; - InternalRestoreDefaults; - LinkModified(False); - FNodes := TList.Create; - - FSaveFont := TFont.Create; - FSaveFont.OnChange := CustomDrawFontChanged; -end; - -destructor TCustomdxTreeListReportLink.Destroy; -begin - FreeAndNil(FSaveFont); - FreeAndNil(FNodes); - FreeAndNil(FRowFooterFont); - FreeAndNil(FPreviewFont); - FreeAndNil(FOddFont); - FreeAndNil(FHeaderFont); - FreeAndNil(FGroupNodeFont); - FreeAndNil(FFooterFont); - FreeAndNil(FEvenFont); - FreeAndNil(FBandFont); - inherited; -end; - -procedure TCustomdxTreeListReportLink.Assign(Source: TPersistent); -begin - inherited; - if Source is TCustomdxTreeListReportLink then - with TCustomdxTreeListReportLink(Source) do - begin - Self.FIsGraphicAsTextValueAssigned := FIsGraphicAsTextValueAssigned; - - Self.AutoNodesExpand := AutoNodesExpand; - Self.BandsOnEveryPage := BandsOnEveryPage; - Self.DrawMode := DrawMode; - Self.ExpandLevel := ExpandLevel; - Self.ExtendedSelect := ExtendedSelect; - Self.FixedTransparent := FixedTransparent; - Self.OnlySelected := OnlySelected; - Self.Options := Options; - Self.PreviewLineCount := PreviewLineCount; - Self.SupportedCustomDraw := SupportedCustomDraw; - - Self.BandColor := BandColor; - Self.EvenColor := EvenColor; - Self.GroupNodeColor := GroupNodeColor; - Self.GridLineColor := GridLineColor; - Self.HeaderColor := HeaderColor; - Self.PreviewColor := PreviewColor; - Self.RowFooterColor := RowFooterColor; - - Self.BandFont := BandFont; - Self.EvenFont := EvenFont; - Self.HeaderFont := HeaderFont; - Self.OddFont := OddFont; - Self.PreviewFont := PreviewFont; - Self.FooterFont := FooterFont; - Self.GroupNodeFont := GroupNodeFont; - Self.RowFooterFont := RowFooterFont; - end; -end; - -function TCustomdxTreeListReportLink.DefaultGraphicAsTextValue: string; -begin - Result := cxGetResourceString(@sdxGraphicAsTextValue); -end; - -function TCustomdxTreeListReportLink.IsDBTreeListLink: Boolean; -begin - Result := False; -end; - -function TCustomdxTreeListReportLink.IsDBGridLink: Boolean; -begin - Result := False; -end; - -function TCustomdxTreeListReportLink.IsTreeListLink: Boolean; -begin - Result := True; -end; - -procedure TCustomdxTreeListReportLink.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('IsGraphicAsTextValueAssigned', ReadIsGraphicAsTextValueAssigned, - WriteIsGraphicAsTextValueAssigned, - FIsGraphicAsTextValueAssigned and (GraphicAsTextValue = '')); -end; - -function TCustomdxTreeListReportLink.GetCustomTreeList: TCustomdxTreeListControl; -begin - Result := TCustomdxTreeListControl(Component); -end; - -function TCustomdxTreeListReportLink.GetCellCustomDrawInfo(AItem: TdxReportVisualItem; - ANode: PdxTreeListNode; AColumn: PdxTreeListColumn; ABand: PdxTreeListBand; - AFooterIndex: PInteger): TdxTreeListLinkCellType; -begin - Result := tlctUnknown; - with AItem do - begin - try - if IsValidPointer(Data) and (Data <> 0) and (TObject(Data) is TClass) then - if TObject(Data) is TdxTreeListBand then - Result := tlstBand - else - if TObject(Data) is TdxTreeListColumn then - begin - if Parent <> nil then - if Parent.Data = 0 then - Result := tlstFooter - else - if TClass(Parent.Data) = TdxTreeListColumn then - Result := tlstHeader - else - if IsValidPointer(Parent.Data) and (TObject(Parent.Data) is TdxTreeListNode) then - if (Parent.Parent <> nil) and (Parent.Parent.Data <> 0) then - Result := tlstGroupFooter - else - Result := tlstCell; - end - else - if TObject(Data) is TdxTreeListNode then Result := tlstPreview; - except - // eat exception if any Node or Column already deleted - end; - - if Result <> tlctUnknown then - begin - if (ABand <> nil) and (Result = tlstBand) then - ABand^ := TdxTreeListBand(Data); - if (AColumn <> nil) and (Result in [tlstCell, tlstFooter, tlstHeader, tlstGroupFooter]) then - AColumn^ := TdxTreeListColumn(Data); - if (ANode <> nil) and (Result in [tlstCell, tlstHeader, tlstPreview, tlstGroupFooter]) then - ANode^ := TdxTreeListNode(Parent.Data); - if (AFooterIndex <> nil) and (Result = tlstGroupFooter) then - AFooterIndex^ := Parent.Parent.Data - 1; - end; - end; -end; - -procedure TCustomdxTreeListReportLink.CustomDrawFontChanged(Sender: TObject); -begin - FCustomDrawFontChanged := True; -end; - -procedure TCustomdxTreeListReportLink.CustomDraw(AItem: TAbstractdxReportCellData; - ACanvas: TCanvas; ABoundsRect, AClientRect: TRect; var ADone: Boolean); -var - ABand: TdxTreeListBand; - AColumn: TdxTreeListColumn; - ANode: TdxTreeListNode; - AFooterIndex: Integer; - AColor: TColor; - ASorted: TdxCellSortOrder; - AText: string; - ATextAlignX: TcxTextAlignX; - ATextAlignY: TcxTextAlignY; - AType: TdxTreeListLinkCellType; -begin - if AItem.Data = 0 then Exit; - AType := GetCellCustomDrawInfo(AItem, @ANode, @AColumn, @ABand, @AFooterIndex); - if AType = tlctUnknown then Exit; - - with TdxReportCellString(AItem) do - begin - AColor := ColorToRGB(Color); - if Transparent then AColor := clNone; - FSaveFont.Assign(Font); - FCustomDrawFontChanged := False; - AText := Text; - if AType = tlstHeader then ASorted := SortOrder; - if AType <> tlstPreview then - begin - ATextAlignX := TextAlignX; - ATextAlignY := TextAlignY; - end; - case AType of - tlstBand: - DoCustomDrawBandCell(ACanvas, ABoundsRect, AClientRect, ABand, AText, - AColor, FSaveFont, ATextAlignX, ATextAlignY, ADone); - tlstCell: - DoCustomDrawCell(ACanvas, ABoundsRect, AClientRect, ANode, AColumn, AText, - AColor, FSaveFont, ATextAlignX, ATextAlignY, ADone); - tlstFooter: - DoCustomDrawFooterCell(ACanvas, ABoundsRect, AClientRect, ANode, AColumn, - AText, AColor, FSaveFont, ATextAlignX, ATextAlignY, ADone); - tlstGroupFooter: - DoCustomDrawRowFooterCell(ACanvas, ABoundsRect, AClientRect, ANode, AColumn, - AFooterIndex, AText, AColor, FSaveFont, ATextAlignX, ATextAlignY, ADone); - tlstHeader: - DoCustomDrawHeaderCell(ACanvas, ABoundsRect, AClientRect, AColumn, AText, - AColor, FSaveFont, ATextAlignX, ATextAlignY, ASorted, ADone); - tlstPreview: - DoCustomDrawPreviewCell(ACanvas, ABoundsRect, AClientRect, ANode, AText, - AColor, FSaveFont, ADone); - end; - if not ADone then - begin - if FCustomDrawFontChanged then - begin - SelectObject(ACanvas.Handle, FSaveFont.Handle); - SetTextColor(ACanvas.Handle, ColorToRGB(FSaveFont.Color)); - FontIndex := -1; - end; - if AColor <> clNone then - begin - Color := AColor; - Transparent := False; - end; - Text := AText; - if AType = tlstHeader then SortOrder := ASorted; - if AType <> tlstPreview then - begin - TextAlignX := ATextAlignX; - TextAlignY := ATextAlignY; - end; - end; - end; -end; - -procedure TCustomdxTreeListReportLink.SetSupportCustomDraw(Value: Boolean); -begin - if FSupportedCustomDraw <> Value then - begin - FSupportedCustomDraw := Value; - LinkModified(True); - end; -end; - -function TCustomdxTreeListReportLink.IsSupportedCustomDraw(Item: TAbstractdxReportCellData): Boolean; -begin - Result := SupportedCustomDraw; - if Result and (Item <> nil) then - if Item.Data = 0 then - Result := False - else - case GetCellCustomDrawInfo(Item, nil, nil, nil, nil) of - tlstBand: - Result := Assigned(FOnCustomDrawBandCell); - tlstCell: - Result := Assigned(FOnCustomDrawCell); - tlstFooter: - Result := Assigned(FOnCustomDrawFooterCell); - tlstGroupFooter: - Result := Assigned(FOnCustomDrawRowFooterCell); - tlstHeader: - Result := Assigned(FOnCustomDrawHeaderCell); - tlstPreview: - Result := Assigned(FOnCustomDrawPreviewCell); - end; -end; - -function TCustomdxTreeListReportLink.TransparentColumnGraphics: Boolean; -begin - Result := (tlpoTransparentColumnGraphic in Options); -end; - -function TCustomdxTreeListReportLink.IsDrawFootersOnEveryPage: Boolean; -begin - Result := not IsAggregated and FootersOnEveryPage and ShowFooters and - (CustomTreeList <> nil) and (CustomTreeList.Count > 0); -end; - -function TCustomdxTreeListReportLink.IsDrawHeadersOnEveryPage: Boolean; -begin - Result := not IsAggregated and BandsOnEveryPage and - (ShowBands or (HeadersOnEveryPage and ShowHeaders)) and - (CustomTreeList <> nil) and (CustomTreeList.Count > 0); -end; - -function TCustomdxTreeListReportLink.GetCheckColumnGlyph(AColumn: TdxTreeListColumn): TBitmap; -begin - Result := TdxTreeListCheckColumn(AColumn).Glyph; - if (Result <> nil) and Result.Empty then - Result := nil; -end; - -function TCustomdxTreeListReportLink.IsCheckColumn(AColumn: TdxTreeListColumn): Boolean; -begin - Result := AColumn is TdxTreeListCheckColumn; -end; - -function TCustomdxTreeListReportLink.IsGraphicColumn(AColumn: TdxTreeListColumn): Boolean; -begin - Result := AColumn is TdxTreeListGraphicColumn; -end; - -function TCustomdxTreeListReportLink.IsHyperLinkColumn(AColumn: TdxTreeListColumn): Boolean; -begin - Result := AColumn is TdxTreeListHyperLinkColumn; -end; - -function TCustomdxTreeListReportLink.IsHyperLinkColumnsExists: Boolean; -var - I, AbsoluteIndex: Integer; -begin - with FAbsoluteIndexes do - for I := 0 to Count - 1 do - begin - AbsoluteIndex := Integer(List^[I]); - if IsHyperLinkColumn(CustomTreeList.Columns[AbsoluteIndex]) then - begin - Result := True; - Exit; - end; - end; - Result := False; -end; - -function TCustomdxTreeListReportLink.GetExpandLevel: Integer; -begin - if IsDBGridLink or IsDBTreeListLink then - Result := -1 - else - Result := FExpandLevel; -end; - -procedure TCustomdxTreeListReportLink.GetImageLists(AProc: TdxPSGetImageListProc); -begin - inherited GetImageLists(AProc); - GetOwnedImageLists(AProc); - GetImageListsFromColumns(AProc); -end; - -procedure TCustomdxTreeListReportLink.InternalRestoreFromOriginal; - - procedure XorOption(var AOptions: TdxTreeListPaintOptions; AItem: TdxTreeListPaintOption; AValue: Boolean); - begin - if AValue then - Include(AOptions, AItem) - else - Exclude(AOptions, AItem); - end; - -begin - inherited; - - with ExposeTreeList(CustomTreeList) do - begin - PreviewLineCount := PreviewLines; - if aoAutoCalcPreviewLines in OptionsEx then - PreviewLineCount := -1; - - Self.BandFont := BandFont; - Self.Font := Font; - Self.HeaderFont := HeaderFont; - Self.PreviewFont := PreviewFont; - Self.GroupNodeFont := Font; - Self.GroupNodeFont.Color := GroupNodeTextColor; - Self.FooterFont := Font; - Self.RowFooterFont := FooterFont; - - FBandColor := BandColor; - FGroupNodeColor := GroupNodeColor; - FGridLineColor := GetGridColor(Color); - FHeaderColor := HeaderColor; - FRowFooterColor := RowFooterColor; - FTreeLineColor := TreeLineColor; - - XorOption(FOptions, tlpoBands, ShowBands); - XorOption(FOptions, tlpoHeaders, ShowHeader); - XorOption(FOptions, tlpoFooters, ShowFooter); - XorOption(FOptions, tlpoRowFooters, ShowRowFooter); - XorOption(FOptions, tlpoGrid, ShowGrid); - XorOption(FOptions, tlpoPreviewGrid, ShowPreviewGrid); - XorOption(FOptions, tlpoPreview, aoPreview in CustomTreeList.Options); - XorOption(FOptions, tlpoImages, Images <> nil); - XorOption(FOptions, tlpoStateImages, StateImages <> nil); - XorOption(FOptions, tlpo3DEffects, LookAndFeel in [lfStandard, lfFlat]); - XorOption(FOptions, tlpoSoft3D, LookAndFeel = lfFlat); - XorOption(FOptions, tlpoTreeLines, (PaintStyle = psStandard) and ShowLines); - XorOption(FOptions, tlpoExpandButtons, ShowButtons); - end; -end; - -procedure TCustomdxTreeListReportLink.InternalRestoreDefaults; -begin - inherited; - FAutoNodesExpand := False; - BandsOnEveryPage := True; - DrawMode := tldmStrict; - FixedTransparent := False; - FOnlySelected := False; - HeadersOnEveryPage := True; - Options := dxDefaultTreeListPaintOptions; - FPreviewLineCount := -1; - FSupportedCustomDraw := False; - - FBandColor := dxDefaultFixedColor; - FEvenColor := Color; - FGridLineColor := dxDefaultGridLineColor; - FGroupNodeColor := dxDefaultFixedColor; - FHeaderColor := dxDefaultFixedColor; - FRowFooterColor := dxDefaultFixedColor; - FPreviewColor := Color; - FTreeLineColor := dxDefaultTreeLineColor; - - BandFont := DefaultFont; - EvenFont := DefaultFont; - FooterFont := DefaultFont; - GroupNodeFont := DefaultFont; - HeaderFont := DefaultFont; - OddFont := DefaultFont; - PreviewFont := DefaultFont; - RowFooterFont := FooterFont; - - FExpandLevel := -1; - FExtendedSelect := True; - FIsGraphicAsTextValueAssigned := False; -end; - -function TCustomdxTreeListReportLink.AutoCalcPreviewLines: Boolean; -begin - Result := PreviewLineCount = -1; -end; - -function TCustomdxTreeListReportLink.CheckMarksAsText: Boolean; -begin - Result := tlpoCheckMarksAsText in Options; -end; - -function TCustomdxTreeListReportLink.FlatCheckMarks: Boolean; -begin - Result := tlpoFlatCheckMarks in Options; -end; - -function TCustomdxTreeListReportLink.ShowBands: Boolean; -begin - Result := tlpoBands in Options; -end; - -function TCustomdxTreeListReportLink.GraphicsAsText: Boolean; -begin - Result := (tlpoGraphicAsText in Options); -end; - -function TCustomdxTreeListReportLink.ShowGrid: Boolean; -begin - Result := ((DrawMode < tldmBorrowSource) and (tlpoGrid in Options)) or - ((DrawMode = tldmBorrowSource) and - ((CustomTreeList = nil) or ExposeTreeList(CustomTreeList).ShowGrid)); -end; - -function TCustomdxTreeListReportLink.ShowHeaders: Boolean; -begin - Result := tlpoHeaders in Options; -end; - -function TCustomdxTreeListReportLink.ShowExpandButtons: Boolean; -begin - Result := tlpoExpandButtons in Options; -end; - -function TCustomdxTreeListReportLink.ShowFooters: Boolean; -begin - Result := tlpoFooters in Options; -end; - -function TCustomdxTreeListReportLink.ShowPreview: Boolean; -begin - Result := tlpoPreview in Options; -end; - -function TCustomdxTreeListReportLink.ShowPreviewGrid: Boolean; -begin - Result := ((DrawMode < tldmBorrowSource) and (tlpoPreviewGrid in Options)) or - ((DrawMode = tldmBorrowSource) and - ((CustomTreeList = nil) or ExposeTreeList(CustomTreeList).ShowPreviewGrid)); -end; - -function TCustomdxTreeListReportLink.ShowRowFooterGrid: Boolean; -begin - Result := tlpoRowFooterGrid in Options; -end; - -function TCustomdxTreeListReportLink.IsExtendedSelect: Boolean; -begin - Result := AreSelectedNodesExist and ExtendedSelect; -end; - -function TCustomdxTreeListReportLink.ShowRowFooters: Boolean; -begin - Result := tlpoRowFooters in Options; -end; - -function TCustomdxTreeListReportLink.ShowImages: Boolean; -begin - Result := tlpoImages in Options; -end; - -function TCustomdxTreeListReportLink.ShowStateImages: Boolean; -begin - Result := tlpoStateImages in Options; -end; - -function TCustomdxTreeListReportLink.ShowTreeLines: Boolean; -begin - Result := tlpoTreeLines in Options; -end; - -function TCustomdxTreeListReportLink.CanDrawImages(ANode: TdxTreeListNode): Boolean; -begin - with ExposeTreeList(CustomTreeList) do - Result := ShowImages and Assigned(Images) and - (ANode.ImageIndex > -1) and (ANode.ImageIndex < Images.Count); -end; - -function TCustomdxTreeListReportLink.CanDrawStateImages(ANode: TdxTreeListNode): Boolean; -begin - with ExposeTreeList(CustomTreeList) do - Result := ShowStateImages and Assigned(StateImages) and - (ANode.StateIndex > -1) and (ANode.StateIndex < StateImages.Count); -end; - -function TCustomdxTreeListReportLink.OddEvenMode: Boolean; -begin - Result := DrawMode = tldmOddEven; -end; - -function TCustomdxTreeListReportLink.Use3DEffects: Boolean; -begin - Result := tlpo3DEffects in Options; -end; - -function TCustomdxTreeListReportLink.UseSoft3D: Boolean; -begin - Result := tlpoSoft3D in Options; -end; - -procedure TCustomdxTreeListReportLink.SetExtendedSelect(Value: Boolean); -begin - if FExtendedSelect <> Value then - begin - FExtendedSelect := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetOnlySelected(Value: Boolean); -begin - if FOnlySelected <> Value then - begin - FOnlySelected := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetAutoNodesExpand(Value: Boolean); -begin - if FAutoNodesExpand <> Value then - begin - FAutoNodesExpand := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetDrawMode(Value: TdxTreeListDrawMode); -begin - if FDrawMode <> Value then - begin - FDrawMode := Value; - LinkModified(True); - end; -end; - -function TCustomdxTreeListReportLink.GetOptions: TdxTreeListPaintOptions; -begin - Result := FOptions; -end; - -procedure TCustomdxTreeListReportLink.SetOptions(Value: TdxTreeListPaintOptions); -begin - if FOptions <> Value then - begin - FOptions := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetBandsOnEveryPage(Value: Boolean); -begin - if not IsAggregated then - if FBandsOnEveryPage <> Value then - begin - FBandsOnEveryPage := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetBandFont(Value: TFont); -begin - BandFont.Assign(Value); -end; - -procedure TCustomdxTreeListReportLink.SetOddFont(Value: TFont); -begin - OddFont.Assign(Value); -end; - -procedure TCustomdxTreeListReportLink.SetEvenFont(Value: TFont); -begin - EvenFont.Assign(Value); -end; - -procedure TCustomdxTreeListReportLink.SetHeaderFont(Value: TFont); -begin - HeaderFont.Assign(Value); -end; - -procedure TCustomdxTreeListReportLink.SetGroupNodeFont(Value: TFont); -begin - GroupNodeFont.Assign(Value); -end; - -procedure TCustomdxTreeListReportLink.SetPreviewFont(Value: TFont); -begin - PreviewFont.Assign(Value); -end; - -procedure TCustomdxTreeListReportLink.SetFooterFont(Value: TFont); -begin - FFooterFont.Assign(Value); -end; - -procedure TCustomdxTreeListReportLink.SetRowFooterFont(Value: TFont); -begin - FRowFooterFont.Assign(Value); -end; - -procedure TCustomdxTreeListReportLink.SetBandColor(Value: TColor); -begin - if FBandColor <> Value then - begin - FBandColor := Value; - if tlpoBands in Options then - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetEvenColor(Value: TColor); -begin - if FEvenColor <> Value then - begin - FEvenColor := Value; - if OddEvenMode then - LinkModified(True); - end; -end; - -function TCustomdxTreeListReportLink.GetOddColor: TColor; -begin - Result := Color; -end; - -procedure TCustomdxTreeListReportLink.SetOddColor(Value: TColor); -begin - inherited Color := Value; -end; - -procedure TCustomdxTreeListReportLink.SetGroupNodeColor(Value: TColor); -begin - if FGroupNodeColor <> Value then - begin - FGroupNodeColor := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetGridLineColor(Value: TColor); -begin - if FGridLineColor <> Value then - begin - FGridLineColor := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetHeaderColor(Value: TColor); -begin - if FHeaderColor <> Value then - begin - FHeaderColor := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetPreviewColor(Value: TColor); -begin - if FPreviewColor <> Value then - begin - FPreviewColor := Value; - if tlpoPreview in Options then - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetRowFooterColor(Value: TColor); -begin - if FRowFooterColor <> Value then - begin - FRowFooterColor := Value; - if tlpoRowFooters in Options then - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetHorzDelimitByBands(Value: Boolean); -begin - if FHorzDelimitByBands <> Value then - begin - FHorzDelimitByBands := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetFixedTransparent(Value: Boolean); -begin - if FFixedTransparent <> Value then - begin - FFixedTransparent := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetExpandLevel(Value: Integer); -begin - if Value < -1 then - Value := -1; - if FExpandLevel <> Value then - begin - FExpandLevel := Value; - if AutoNodesExpand then LinkModified(True); - end; -end; - -function TCustomdxTreeListReportLink.GetExtendedColorManage: Boolean; -begin - Result := DrawMode = tldmBorrowSource; -end; - -function TCustomdxTreeListReportLink.GetGraphicAsTextValue: string; -begin - if FIsGraphicAsTextValueAssigned then - Result := FGraphicAsTextValue - else - Result := DefaultGraphicAsTextValue; -end; - -procedure TCustomdxTreeListReportLink.SetExtendedColorManage(Value: Boolean); -begin - DrawMode := tldmBorrowSource; -end; - -function TCustomdxTreeListReportLink.GetUseColumnFont: Boolean; -begin - Result := DrawMode = tldmBorrowSource; -end; - -procedure TCustomdxTreeListReportLink.SetTreeLineColor(Value: TColor); -begin - if FTreeLineColor <> Value then - begin - FTreeLineColor := Value; - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetUseColumnFont(Value: Boolean); -begin - DrawMode := tldmBorrowSource; -end; - -procedure TCustomdxTreeListReportLink.SetPreviewLineCount(Value: Integer); -begin - if Value < -1 then - Value := -1; - if FPreviewLineCount <> Value then - begin - FPreviewLineCount := Value; - if tlpoPreview in Options then LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetOnCustomDrawBandCell - (Value: TdxTLReportLinkCustomDrawBandCellEvent); -begin - if @FOnCustomDrawBandCell <> @Value then - begin - FOnCustomDrawBandCell := Value; - if IsSupportedCustomDraw(nil) then - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetOnCustomDrawCell - (Value: TdxTLReportLinkCustomDrawCellEvent); -begin - if @FOnCustomDrawCell <> @Value then - begin - FOnCustomDrawCell := Value; - if IsSupportedCustomDraw(nil) then - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetOnCustomDrawFooterCell - (Value: TdxTLReportLinkCustomDrawFooterCellEvent); -begin - if @FOnCustomDrawFooterCell <> @Value then - begin - FOnCustomDrawFooterCell := Value; - if IsSupportedCustomDraw(nil) then - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetOnCustomDrawHeaderCell - (Value: TdxTLReportLinkCustomDrawHeaderCellEvent); -begin - if @FOnCustomDrawHeaderCell <> @Value then - begin - FOnCustomDrawHeaderCell := Value; - if IsSupportedCustomDraw(nil) then - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetOnCustomDrawPreviewCell - (Value: TdxTLReportLinkCustomDrawPreviewCellEvent); -begin - if @FOnCustomDrawPreviewCell <> @Value then - begin - FOnCustomDrawPreviewCell := Value; - if IsSupportedCustomDraw(nil) then - LinkModified(True); - end; -end; - -procedure TCustomdxTreeListReportLink.SetOnCustomDrawRowFooterCell - (Value: TdxTLReportLinkCustomDrawRowFooterCellEvent); -begin - if @FOnCustomDrawRowFooterCell <> @Value then - begin - FOnCustomDrawRowFooterCell := Value; - if IsSupportedCustomDraw(nil) then - LinkModified(True); - end; -end; - -function TCustomdxTreeListReportLink.GetDataClass(AColumn: TdxTreeListColumn; - ANode: TdxTreeListNode): TdxReportCellDataClass; -begin - Result := nil; -end; - -function TCustomdxTreeListReportLink.GetGroupColumnIndex( - ANode: TdxTreeListNode): Integer; -begin - Result := 0; -end; - -procedure TCustomdxTreeListReportLink.GetOwnedImageLists(AProc: TdxPSGetImageListProc); -begin -end; - -procedure TCustomdxTreeListReportLink.GetImageListsFromColumns(AProc: TdxPSGetImageListProc); -var - I: Integer; - Column: TdxTreeListColumn; -begin - for I := 0 to CustomTreeList.ColumnCount - 1 do - begin - Column := CustomTreeList.Columns[I]; - dxColumnHelpersFactory[Column].GetImageLists(Column, AProc); - end; -end; - -function TCustomdxTreeListReportLink.IsGraphicAsTextValueStored: Boolean; -begin - Result := FIsGraphicAsTextValueAssigned and (GraphicAsTextValue <> DefaultGraphicAsTextValue); -end; - -procedure TCustomdxTreeListReportLink.SetGraphicAsTextValue(const Value: string); -begin - if GraphicAsTextValue <> Value then - begin - FGraphicAsTextValue := Value; - FIsGraphicAsTextValueAssigned := True; - if tlpoGraphicAsText in Options then LinkModified(True); - end; -end; - -function TCustomdxTreeListReportLink.GetReferenceColumn(AColumn: TdxTreeListColumn; - ANode: TdxTreeListNode): TdxTreeListColumn; -begin - if AColumn is TdxTreeListWrapperColumn then - begin - Result := TdxTreeListWrapperColumnAccess(AColumn).ReferenceColumn(ANode); - if Result = nil then - Result := AColumn; - end - else - Result := AColumn; -end; - -procedure TCustomdxTreeListReportLink.PrepareConstruct(AReportCells: TdxReportCells); - - function CalcRowHeight(DC: HDC; AFont: TFont; AMinHeight: Integer; AKeepParity: Boolean): Integer; - begin - Result := Renderer.CalcTextPatternHeight(DC, AFont); - if Result < AMinHeight then - Result := AMinHeight; - if AKeepParity and Odd(Result) then - Inc(Result); - end; - -var - DC: HDC; -begin - DC := GetDC(0); - try - FRowHeight := CalcRowHeight(DC, Font, CustomTreeList.RowHeight, True); - FHeaderRowHeight := 3 + CalcRowHeight(DC, HeaderFont, CustomTreeList.HeaderRowHeight, False); - FFooterRowHeight := CalcRowHeight(DC, FooterFont, 4 + CustomTreeList.FooterRowHeight, False); - FGroupRowHeight := CalcRowHeight(DC, GroupNodeFont, CustomTreeList.RowHeight, False); - FGroupFooterRowHeight := 2 + CalcRowHeight(DC, RowFooterFont, CustomTreeList.FooterRowHeight, True); - FBandHeight := CalcRowHeight(DC, BandFont, CustomTreeList.BandPanelHeight, False); - FPreviewLineHeight := CalcRowHeight(DC, PreviewFont, CustomTreeList.DescTextHeight, True); - finally - ReleaseDC(0, DC); - end; - - FFooterPanelHeight := FFooterRowHeight * - ExposeTreeList(CustomTreeList).GetHeaderMaxRowCount + Byte(Use3DEffects); - - FFullWidth := GetBandRect(ExposeTreeList(CustomTreeList).GetBandCount - 1).Right; - FIndent := ExposeTreeList(CustomTreeList).Indent; - FPaintStyle := ExposeTreeList(CustomTreeList).PaintStyle; - FShowRoot := ExposeTreeList(CustomTreeList).ShowRoot; - - FAbsoluteIndexes := TList.Create; - CalcAbsoluteIndexes; - CalcColumnInfos(AReportCells); - CalcFontIndexes(AReportCells); - AddNodes; -end; - -procedure TCustomdxTreeListReportLink.UnprepareConstruct(AReportCells: TdxReportCells); -begin - FreeHeaderInfos; - FreeAndNil(FAbsoluteIndexes); -end; - -function TCustomdxTreeListReportLink.GetBandRegionHeight: Integer; -begin - Result := Byte(ShowBands) * Self.FBandHeight -end; - -function TCustomdxTreeListReportLink.GetBandRect(AVisibleIndex: Integer): TRect; -begin - with Result do - begin - Left := GetBandLeft(AVisibleIndex); - Top := 0; - Right := Left + GetBandWidth(AVisibleIndex); - Bottom := Top + GetBandRegionHeight; -// ver 2.3 -// Inc(Left, Byte(Use3DEffects)); -// Inc(Top, Byte(Use3DEffects)); - end; -end; - -procedure TCustomdxTreeListReportLink.ConstructReport(AReportCells: TdxReportCells); -var - ATreeList: TdxTreeListAccess; - - function GetHeaderRegionHeight: Integer; - begin - if ShowHeaders then - Result := 0 + ATreeList.GetHeaderMaxRowCount * FHeaderRowHeight - else - Result := 0; - end; - - function IsNodeImagesExists(ANode: TdxTreeListNode): Boolean; - begin - Result := CanDrawImages(ANode) or CanDrawStateImages(ANode); - end; - - function GetColumnFont(AIndex: Integer): TFont; - begin - Result := ATreeList.GetColumnFont(AIndex); - end; - - function GetTextIndent(ANode: TdxTreeListNode): Integer; - begin - Result := ANode.Level * (FIndent + 0); - if ((FPaintStyle = psStandard) and FShowRoot) or - ((FPaintStyle = psOutlook) and (ANode.Count > 0)) then - Inc(Result, FIndent); - if CanDrawStateImages(ANode) then Inc(Result, ATreeList.StateImages.Width); - if CanDrawImages(ANode) then Inc(Result, ATreeList.Images.Width); - end; - - function GetDataItemSides(ANode: TdxTreeListNode; AAbsoluteIndex: Integer): TdxCellSides; - var - RowIndex: Integer; - IsFirstColumn, IsLastColumn: Boolean; - begin - Result := []; - GetColumnInfos(AAbsoluteIndex, nil, @RowIndex, nil, nil, nil, @IsFirstColumn, @IsLastColumn); - if ShowGrid then - begin - if (RowIndex = 0) or (ShowPreviewGrid) then {!}//} or (ANode = FNodes.List^[0])) then - Include(Result, csTop); - if ShowPreviewGrid then - Include(Result, csBottom); - if ShowPreviewGrid or IsLastColumn then - Include(Result, csRight); - if IsFirstColumn then - begin - if ExposeTreeList(CustomTreeList).IsRowGroup(ANode) or not IsNodeImagesExists(ANode) then - Include(Result, csLeft) - end - else - if ShowPreviewGrid then Include(Result, csLeft) - end - else - begin - if (ANode = FNodes.List^[0]) and (RowIndex = 0) then - Include(Result, csTop); - if IsLastColumn then - Include(Result, csRight); - end; - end; - - function CalcColumnHeight(DC: HDC; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; - AnAbsoluteIndex, APreviewHeight, ARowHeight: Integer): Integer; - var - Glyph: TBitmap; - S: string; - R: TRect; - begin - if IsGraphicColumn(AColumn) then - Result := ATreeList.GetRowHeight(ANode, ARowHeight, True) - APreviewHeight - else - if IsCheckColumn(AColumn) then - begin - Glyph := GetCheckColumnGlyph(AColumn); - if Glyph <> nil then - Result := Glyph.Height - else - Result := dxPSGlbl.CheckHeight; - end - else - begin - if UseColumnFont and ATreeList.IsExistColumnFont(AnAbsoluteIndex) then - SelectObject(DC, ATreeList.GetColumnFont(AnAbsoluteIndex).Handle); - S := ATreeList.GetDisplayValue(ANode, AnAbsoluteIndex); - if S <> '' then - begin - R := Rect(0, 0, ATreeList.GetHeaderBoundsWidth(AnAbsoluteIndex), 0); - Result := Renderer.CalcTextRect(DC, S, R, True, nil); - end - else - Result := FRowHeight; - end; - end; - - function CalcRowAutoHeight(DC: HDC; ANode: TdxTreeListNode; APreviewHeight: Integer): Integer; - var - PrevFont: HFONT; - I, AbsoluteIndex, V: Integer; - Column: TdxTreeListColumn; - begin - Result := 0; - PrevFont := SelectObject(DC, Font.Handle); - for I := 0 to FAbsoluteIndexes.Count - 1 do - begin - AbsoluteIndex := Integer(FAbsoluteIndexes.List[I]); - Column := ATreeList.Columns[AbsoluteIndex]; - Column := GetReferenceColumn(Column, ANode); - V := CalcColumnHeight(DC, ANode, Column, AbsoluteIndex, APreviewHeight, FRowHeight); - if Result < V then - Result := V; - end; - SelectObject(DC, PrevFont); - end; - - function CalcPreviewHeight(DC: hDC; const S: string; AWidth: Integer): Integer; - var - R: TRect; - begin - R := Rect(0, 0, AWidth, 0); - Result := Renderer.CalcTextRect(DC, S, R, True, PreviewFont); - end; - - function GetPreviewHeight(DC: hDC; ANode: TdxTreeListNode; AWidth: Integer): Integer; - var - S: string; - begin - if AutoCalcPreviewLines then - begin - S := ATreeList.GetPreviewText(ANode); - if S <> '' then - Result := CalcPreviewHeight(DC, S, AWidth - ATreeList.IndentDesc) - else - Result := 0; - end - else - Result := PreviewLineCount * FPreviewLineHeight; - end; - - function GetNodeHeight(ANode: TdxTreeListNode; AWidth: Integer; - APreviewHeight: PInteger): Integer; - var - NeedAllocateDC: Boolean; - DC: HDC; - V: Integer; - begin - with ExposeTreeList(CustomTreeList) do - if IsRowGroup(ANode) then - if FRowHeight < FGroupRowHeight then - Result := FGroupRowHeight - else - Result := FRowHeight - else - begin - NeedAllocateDC := - ((aoPreview in CustomTreeList.Options) and AutoCalcPreviewLines) or - (IsRowAutoHeight and (GetHeaderMaxRowCount = 1)); - DC := 0; - if NeedAllocateDC then DC := GetDC(0); - try - if (aoPreview in CustomTreeList.Options) then - V := GetPreviewHeight(DC, ANode, AWidth) - else - V := 0; - - if IsRowAutoHeight and (GetHeaderMaxRowCount = 1) then - Result := CalcRowAutoHeight(DC, ANode, V) - else - Result := GetHeaderMaxRowCount * FRowHeight; - finally - if NeedAllocateDC then ReleaseDC(0, DC); - end; - - if (APreviewHeight <> nil) and ShowPreview then - begin - APreviewHeight^ := V; - Inc(Result, V); - end; - end - end; - - function GetCellHeight(ANode: TdxTreeListNode; AAbsoluteIndex: PInteger; - ACellType: TdxTreeListLinkCellType; AParent: TdxReportCell): Integer; - var - BandIndex, RowIndex, ColIndex: Integer; - UseParentHeight: Boolean; - begin - if AParent <> nil then - begin - UseParentHeight := ATreeList.IsRowAutoHeight and (ATreeList.GetHeaderMaxRowCount = 1); - if UseParentHeight and (ACellType = tlstCell) then - UseParentHeight := UseParentHeight or ATreeList.IsRowGroup(ANode); // and (GetPreviewLineCount(ANode) = 0) - end - else - UseParentHeight := False; - - if UseParentHeight then - Result := AParent.Height - FPreviewHeight - else - begin - if AAbsoluteIndex <> nil then - begin - GetColumnInfos(AAbsoluteIndex^, @BandIndex, @RowIndex, @ColIndex, nil, nil, nil, nil); - Result := ATreeList.GetHeaderLineCount(ATreeList.GetVisibleBandIndex(BandIndex), RowIndex, ColIndex); - end - else - Result := ATreeList.GetHeaderMaxRowCount; - - case ACellType of - tlstCell: - Result := Result * FRowHeight; - tlstFooter: - Result := Result * FFooterRowHeight + 3; - tlstGroupFooter: - Result := Result * FGroupFooterRowHeight + 3; - tlstHeader: - Result := 0 + Result * FHeaderRowHeight; - end; - end; - end; - - function GetDataItemRect(ANode: TdxTreeListNode; AAbsoluteIndex: Integer; - AParent: TdxReportCell): TRect; - var - IsFirstColumn, IsLastColumn: Boolean; - begin - GetCellRect(AAbsoluteIndex, tlstCell, Result); - if ExposeTreeList(CustomTreeList).IsRowAutoHeight and (ExposeTreeList(CustomTreeList).GetHeaderMaxRowCount = 1) then - Result.Bottom := AParent.Height - FPreviewHeight; - GetColumnInfos(AAbsoluteIndex, nil, nil, nil, nil, nil, @IsFirstColumn, @IsLastColumn); - if IsLastColumn then - Result.Right := FFullWidth; - if IsFirstColumn then - Result.Left := GetTextIndent(ANode); - end; - - { Bands } - procedure InsertBandItem(AVisibleIndex: Integer; AParent: TdxReportCell); - var - DataItem: TAbstractdxReportCellData; - begin - DataItem := TdxReportCellString.Create(AParent); - with TdxReportCellString(DataItem) do - begin - FontIndex := FBandFontIndex; - Text := ATreeList.GetBandText(AVisibleIndex); - Multiline := ATreeList.BandRowCount > 1; - EndEllipsis := not Multiline; - CellSides := csAll; - Transparent := True; - TextAlignX := dxTextAlignX[ATreeList.GetBandAlignment(AVisibleIndex)]; - TextAlignY := taTop; - - if Use3DEffects then - begin - EdgeMode := cem3DEffects; - Edge3DStyle := cesRaised; - Edge3DSoft := UseSoft3D; - end - else - EdgeMode := cemPattern; - - BoundsRect := GetBandRect(AVisibleIndex); - if IsSupportedCustomDraw(nil) then - Data := Integer(ATreeList.Bands[AVisibleIndex]); - end; - end; - - procedure InsertBands; - var - CellParent, Cell: TdxReportCell; - I: Integer; - begin - if not IsAggregated and BandsOnEveryPage and (CustomTreeList.Count > 0) then - CellParent := AReportCells.HeaderCells - else - CellParent := AReportCells.Cells; - Cell := TdxReportCell.Create(CellParent); - with Cell do - begin - CellSides := csAll; - Transparent := FixedTransparent; - if not Transparent then Color := BandColor; - BoundsRect := Rect(0, 0, FFullWidth, GetBandRegionHeight); - end; - for I := 0 to ExposeTreeList(CustomTreeList).GetBandCount - 1 do - InsertBandItem(I, Cell); - end; - - { Headers } - function GetHeaderRect(AAbsoluteIndex: Integer; AParent: TdxReportCell): TRect; - begin - GetCellRect(AAbsoluteIndex, tlstHeader, Result); - end; - - procedure InsertHeaderItem(AAbsoluteIndex: Integer; AParent: TdxReportCell); - var - IsMultilined: Boolean; - DataItem: TdxReportCellImage; - begin - IsMultilined := PdxColumnInfo(FColumnInfos.List^[AAbsoluteIndex])^.IsHeaderMultiline; - DataItem := TdxReportCellImage.Create(AParent); - with DataItem do - begin - FontIndex := FHeaderFontIndex; - Transparent := True; - CellSides := csAll; - BoundsRect := GetHeaderRect(AAbsoluteIndex, AParent); - Text := ATreeList.GetHeaderText(AAbsoluteIndex); - EndEllipsis := not IsMultilined; - Multiline := IsMultilined; - TextAlignX := dxTextAlignX[ATreeList.GetHeaderAlignment(AAbsoluteIndex)]; - TextAlignY := dxMultilineTextAlignY[Multiline]; - SortOrder := SortOrderMap[ATreeList.GetHeaderSorted(AAbsoluteIndex)]; - MakeSpaceForEmptyImage := False; - - if Use3DEffects then - begin - EdgeMode := cem3DEffects; - Edge3DStyle := cesRaised; - Edge3DSoft := UseSoft3D; - end - else - EdgeMode := cemPattern; - - if ATreeList.IsExistHeaderGlyph(AAbsoluteIndex) then - Image := ATreeList.GetHeaderGlyph(AAbsoluteIndex); - if IsSupportedCustomDraw(nil) then - Data := Integer(ATreeList.Columns[AAbsoluteIndex]); - end; - end; - - procedure InsertHeaders; - var - CellParent, Cell: TdxReportCell; - PrevSibl: TdxReportItem; - I: Integer; - begin - if not IsAggregated and BandsOnEveryPage and HeadersOnEveryPage and (CustomTreeList.Count > 0) then - CellParent := AReportCells.HeaderCells - else - CellParent := AReportCells.Cells; - Cell := TdxReportCell.Create(CellParent); - with Cell do - begin - CellSides := csAll; - Transparent := FixedTransparent; - if not Transparent then Color := HeaderColor; - BoundsRect := Bounds(GetBandLeft(0), 0, FFullWidth, GetHeaderRegionHeight); - PrevSibl := GetPrevSibling; - if PrevSibl <> nil then - Top := TdxReportVisualItem(PrevSibl).BoundsRect.Bottom; - if IsSupportedCustomDraw(nil) then - Data := Integer(TdxTreeListColumn); - end; - for I := 0 to FAbsoluteIndexes.Count - 1 do - InsertHeaderItem(Integer(FAbsoluteIndexes.List^[I]), Cell); - end; - - { Footers } - function GetFooterRect(AAbsoluteIndex: Integer; AParent: TdxReportCell): TRect; - var - IsFirstColumn, IsLastColumn: Boolean; - begin - GetCellRect(AAbsoluteIndex, tlstFooter, Result); - InflateRect(Result, -1, -3); - Inc(Result.Left); - Inc(Result.Top); - with Result do - begin - GetColumnInfos(AAbsoluteIndex, nil, nil, nil, nil, nil, @IsFirstColumn, @IsLastColumn); - if IsLastColumn then Dec(Right, 2); - if IsFirstColumn then Inc(Left, 2); - end; - end; - - procedure InsertFooterItem(AAbsoluteIndex: Integer; AParent: TdxReportCell); - var - DataItem: TAbstractdxReportCellData; - begin - DataItem := TdxReportCellString.Create(AParent); - with TdxReportCellString(DataItem) do - begin - FontIndex := FFooterFontIndex; - Text := ATreeList.GetFooterCellText(nil, AAbsoluteIndex, -1); - Transparent := True; - BoundsRect := GetFooterRect(AAbsoluteIndex, AParent); - if Use3DEffects then - begin - EdgeMode := cem3DEffects; - Edge3DStyle := cesSunken; - Edge3DSoft := True; - end - else - EdgeMode := cemPattern; - - CellSides := csAll; - TextAlignX := dxTextAlignX[ATreeList.GetFooterCellAlignment(nil, AAbsoluteIndex, -1)]; - TextAlignY := taCenterY; - if IsSupportedCustomDraw(nil) then - Data := Integer(ATreeList.Columns[AAbsoluteIndex]); - end; - end; - - procedure InsertFooters; - var - CellParent, Cell: TdxReportCell; -// R: TRect; - PrevSibl: TdxReportItem; - I, AbsoluteIndex: Integer; - begin - if not IsAggregated and FootersOnEveryPage and (ATreeList.Count > 0) then - CellParent := AReportCells.FooterCells - else - CellParent := AReportCells.Cells; - Cell := TdxReportCell.Create(CellParent); - with Cell do - begin - CellSides := csAll; - Transparent := FixedTransparent; - if not Transparent then - Color := HeaderColor; - if Use3DEffects then - begin - EdgeMode := cem3DEffects; - Edge3DStyle := cesRaised; - Edge3DSoft := UseSoft3D; - end - else - EdgeMode := cemPattern; - - { 2.3 } - BoundsRect := Rect(0, 0, FFullWidth, GetCellHeight(nil, nil, tlstFooter, nil)); - PrevSibl := GetPrevSibling; - if PrevSibl <> nil then - Top := TdxReportCell(PrevSibl).BoundsRect.Bottom; - end; - for I := 0 to FAbsoluteIndexes.Count - 1 do - begin - AbsoluteIndex := Integer(FAbsoluteIndexes.List^[I]); - if ATreeList.IsExistFooterCell(AbsoluteIndex) then - InsertFooterItem(AbsoluteIndex, Cell); - end; - end; - - procedure InsertStub; - var - Last: TdxReportCell; - begin - Last := AReportCells.Cells.LastCell; - if Last <> nil then - with TdxReportCell.Create(AReportCells.Cells) do - begin - BoundsRect := Bounds(0, Last.BoundsRect.Bottom, FFullWidth, 1); - CellSides := [csTop]; - Transparent := True; - end; - end; - - function GetNodeParentAtLevel(ANode: TdxTreeListNode; AtLevel: Integer): TdxTreeListNode; - begin - Result := ANode; - if (FPaintStyle = psOutlook) and (ANode.Count = 0) then - Result := Result.Parent; - - while AtLevel > 0 do - begin - Result := Result.Parent; - Dec(AtLevel); - end; - end; - - { RowFooters } - function GetRowFooterCount(Node: TdxTreeListNode): Integer; - var - ANode: TdxTreeListNode; - begin - Result := 0; - if (Node = nil) or (Node.Count <> 0) or not Node.IsLast then Exit; -// if (Node <> nil) and (Node.Count = 0) and Node.IsLast then - ANode := Node.Parent; - while (Node <> nil) and Node.IsLast do - begin - if ExposeTreeList(CustomTreeList).IsLevelFooter(ANode.Level) then - Inc(Result); - Node := ANode; - ANode := ANode.Parent; - end - end; - - function GetRowFooterItemIndent(ANode: TdxTreeListNode): Integer; - begin - Result := (FIndent + 0) * (ANode.Level + Ord(FShowRoot and (FPaintStyle = psStandard))); - if CanDrawStateImages(ANode) then - Inc(Result, ATreeList.StateImages.Width) - else - if CanDrawImages(ANode) then - Inc(Result, ATreeList.Images.Width); - end; - - function GetRowFooterRect(ANode: TdxTreeListNode; AAbsoluteIndex: Integer; - AParent: TdxReportCell): TRect; - var - Level: Integer; - IsFirstColumn, IsLastColumn: Boolean; - begin - GetCellRect(AAbsoluteIndex, tlstGroupFooter, Result); - Level := ANode.Level - Ord(not FShowRoot and (FPaintStyle = psStandard)); - OffsetRect(Result, -Level * (FIndent + 0), 0); - - GetColumnInfos(AAbsoluteIndex, nil, nil, nil, nil, nil, @IsFirstColumn, @IsLastColumn); - if IsFirstColumn then - Inc(Result.Left, GetRowFooterItemIndent(ANode) + 1); - InflateRect(Result, -2, -3); - Inc(Result.Right); - if IsLastColumn then Dec(Result.Right, 2); - end; - - procedure InsertRowFooterItem(ANode, AFooterNode: TdxTreeListNode; - AAbsoluteIndex: Integer; AFooterIndex: Integer; AParent: TdxReportCell); - var - DataItem: TAbstractdxReportCellData; - begin - DataItem := TdxReportCellString.Create(AParent); - with TdxReportCellString(DataItem) do - begin - FontIndex := FRowFooterFontIndex; - Text := ATreeList.GetFooterCellText(AFooterNode, AAbsoluteIndex, AFooterIndex); - Transparent := True; - CellSides := []; - if ShowGrid and ShowRowFooterGrid then - CellSides := csAll; - BoundsRect := GetRowFooterRect(ANode, AAbsoluteIndex, AParent); - TextAlignX := dxTextAlignX[ATreeList.GetFooterCellAlignment(AFooterNode, AAbsoluteIndex, AFooterIndex)]; - TextAlignY := taCenterY; - MultiLine := False; - if Use3DEffects then - begin - EdgeMode := cem3DEffects; - Edge3DStyle := cesSunken; - Edge3DSoft := True; - end - else - EdgeMode := cemPattern; - - if IsSupportedCustomDraw(nil) then - Data := Integer(CustomTreeList.Columns[AAbsoluteIndex]); - end; - end; - - procedure SetupExpandButtonAndTreeLines(AItem: TdxReportCellExpandButton; AIndex: Integer; - ANode: TdxTreeListNode; AGroupFooter: Boolean); - - function GetExpandButtonSize: Integer; - begin - if FPaintStyle = psStandard then - Result := 9 - else - if Use3dEffects then - if UseSoft3D then - Result := 11 - else - Result := 12 - else - Result := 12; - end; - - function GetIndentShowButton(AtLevel: Integer; ANode: TdxTreeListNode): Boolean; - begin - Result := ShowExpandButtons and ((FPaintStyle = psStandard) or (ANode.Count <> 0)) and - (GetNodeParentAtLevel(ANode, AtLevel) = ANode) and ANode.HasChildren; - end; - - function GetIndentButtonExpanded(ANode: TdxTreeListNode): Boolean; - begin - if AutoNodesExpand then - Result := ANode.Expanded or ((ANode.Count <> 0) and ((ExpandLevel = -1) or (ExpandLevel > ANode.Level))) - else - Result := ANode.Expanded; - end; - - function GetIndentTreeLineMode(AtLevel: Integer; ANode: TdxTreeListNode): TdxPSTreeLineMode; - var - Parent: TdxTreeListNode; - begin - if ShowTreeLines and (FPaintStyle = psStandard) then - begin - Parent := GetNodeParentAtLevel(ANode, AtLevel); - if Parent = ANode then - if ANode.IsLast then - Result := tlmBottomRightCorner - else - if (ANode.Level = 0) and (ANode.Index = 0) then - Result := tlmTopRightCorner - else - Result := tlmCross - else - if (Parent <> nil) and Parent.IsLast then - Result := tlmNone - else - Result := tlmVertical; - end - else - Result := tlmNone - end; - - function GetIndentTreeLineModeInFooter(AtLevel: Integer; ANode: TdxTreeListNode): TdxPSTreeLineMode; - var - Parent: TdxTreeListNode; - begin - if ShowTreeLines and (FPaintStyle = psStandard) then - begin - Parent := GetNodeParentAtLevel(ANode, AtLevel); - if (Parent = nil) or Parent.IsLast then - Result := tlmNone - else - Result := tlmVertical; - end - else - Result := tlmNone - end; - - begin - with AItem do - begin - ShowButton := not AGroupFooter and GetIndentShowButton(AIndex, ANode); - if ShowButton then - begin - ButtonBorder3D := Use3DEffects and (FPaintStyle = psOutlook); - ButtonBorder3DSoft := UseSoft3D and (FPaintStyle = psOutlook); - ButtonBorderShadow := not ButtonBorder3D and (FPaintStyle = psOutlook); - ButtonExpanded := GetIndentButtonExpanded(ANode); - ButtonSize := GetExpandButtonSize; - end; - if AGroupFooter then - TreeLineMode := GetIndentTreeLineModeInFooter(AIndex, ANode) - else - TreeLineMode := GetIndentTreeLineMode(AIndex, ANode); - end; - end; - - procedure InsertRowFooters(ANode, AFooterNode: TdxTreeListNode; - AParent: TdxReportCell; AFooterIndex: Integer); - var - I, J, AAbsoluteIndex, ALevel, RowFooterHeight: Integer; - ACell: TdxReportCell; - APrevSibl: TdxReportItem; - ADataItem: TAbstractdxReportCellData; - Node: TdxTreeListNode; - begin - if FPaintStyle = psStandard then - ALevel := ANode.Level - 1 - Ord(not FShowRoot) - else - ALevel := ANode.Level - 1; //Byte(ANode.Count = 0); - - RowFooterHeight := GetCellHeight(ANode, nil, tlstGroupFooter, nil); - ACell := TdxReportCell.Create(AParent); - with ACell do - begin - Transparent := True;//(ALevel > -1) or FixedTransparent; - if not Transparent then Color := RowFooterColor; - CellSides := [csLeft, csRight]; - if not Transparent and ShowGrid then - CellSides := CellSides + [csTop, csBottom]; - BoundsRect := Rect(0, 0, FFullWidth, RowFooterHeight); - APrevSibl := GetPrevSibling; - if Assigned(APrevSibl) then - Top := TdxReportCell(APrevSibl).BoundsRect.Bottom; - if IsSupportedCustomDraw(nil) then - Data := 1 + AFooterIndex; - end; - - ADataItem := nil; - Node := AFooterNode; - for I := 0 to ALevel do - begin - ADataItem := TdxReportCellExpandButton.Create(ACell); - with TdxReportCellExpandButton(ADataItem) do - begin - BoundsRect := Rect(0, 0, FIndent + 0, RowFooterHeight); - APrevSibl := GetPrevSibling; - if APrevSibl <> nil then - Left := TdxReportVisualItem(APrevSibl).BoundsRect.Right; - CellSides := []; - if ShowGrid then - begin - CellSides := CellSides + [csLeft, csRight]; - if I = ALevel then CellSides := CellSides + [csBottom]; - end - else - if I = 0 then - CellSides := CellSides + [csLeft]; - Node := AFooterNode; - for J := AFooterNode.Level - 1 downto I + Byte(FPaintStyle = psStandard) do - Node := Node.Parent; - Transparent := IsLevelTransparent(Node); - if OddEvenMode and (FPaintStyle = psStandard) then - Transparent := FixedTransparent; - if not Transparent then - Color := GetLevelColor(Node, -1); - - // 2.3 ExpandButtons and TreeLines - SetupExpandButtonAndTreeLines(TdxReportCellExpandButton(ADataItem), ALevel - I, ANode.Parent, True); - end; - end; - - ACell := TdxReportCell.Create(ACell); - with ACell do - begin - CellSides := [csRight]; - if ShowGrid then - CellSides := CellSides + [csLeft, csTop, csBottom]; - Transparent := FixedTransparent; - if not Transparent then - {2.0} if DrawMode = tldmBorrowSource then - Color := GetLevelColor(Node, -1) - else - Color := RowFooterColor; - I := 0; - if Assigned(ADataItem) then - I := ADataItem.BoundsRect.Right; - BoundsRect := Rect(I, 0, FFullWidth, RowFooterHeight); - if IsSupportedCustomDraw(nil) then - Data := Integer(AFooterNode); - end; - - for I := 0 to FAbsoluteIndexes.Count - 1 do - begin - AAbsoluteIndex := Integer(FAbsoluteIndexes.List^[I]); - if ATreeList.IsExistRowFooterCell(AFooterNode, AAbsoluteIndex, AFooterIndex) then - InsertRowFooterItem(ANode, AFooterNode, AAbsoluteIndex, AFooterIndex, ACell); - end; - end; - -{Preview} - function GetPreviewCellSides(ANode: TdxTreeListNode): TdxCellSides; - begin - Result := [csRight]; - if ShowGrid then - begin - Include(Result, csBottom); - if (FPaintStyle = psOutlook) and not IsNodeImagesExists(ANode) then - Include(Result, csLeft); - if ShowPreviewGrid then - Include(Result, csTop); - end; - end; - -{Nodes} - function IsLastNodeEx(Node, ANode: TdxTreeListNode): Boolean; - begin - repeat - Result := ANode.IsLast; - ANode := ANode.Parent; - until not Result or (ANode = nil) or (ANode = Node); - end; - - procedure ProcessCells(ANode: TdxTreeListNode; AParent: TdxReportCell; ANodeIndex: Integer); - var - I, AAbsoluteIndex, ACellHeight, ALevel: Integer; - ADataClass: TdxReportCellDataClass; - ADataItem: TAbstractdxReportCellData; - ACell: TdxReportCell; - APrevSibl: TdxReportItem; - ParentNode: TdxTreeListNode; - Column, ReferenceColumn: TdxTreeListColumn; - begin - if not ATreeList.IsRowGroup(ANode) and ShowPreview then - ACellHeight := GetNodeHeight(ANode, FFullWidth - GetTextIndent(ANode), @FPreviewHeight) - else - begin - ACellHeight := GetNodeHeight(ANode, 0, nil); - FPreviewHeight := 0; - end; - - ACell := TdxReportCell.Create(AParent); - with ACell do - begin - BoundsRect := Rect(0, 0, FFullWidth, ACellHeight); - APrevSibl := GetPrevSibling; - if Assigned(APrevSibl) then - Top := TdxReportCell(APrevSibl).BoundsRect.Bottom; - CellSides := [csLeft, csRight]; - if (ANode = FNodes.List^[0]) then - CellSides := CellSides + [csTop]; - Transparent := IsLevelTransparent(ANode); - if not Transparent then - Color := GetLevelColor(ANode, ANodeIndex); - if IsSupportedCustomDraw(nil) then - Data := Integer(ANode); - end; - - if FPaintStyle = psStandard then - ALevel := ANode.Level - Ord(not FShowRoot) - else - ALevel := ANode.Level - 1 + Ord(ANode.Count <> 0); - - for I := 0 to ALevel do - begin - ParentNode := GetNodeParentAtLevel(ANode, ALevel - I);// + Ord(FPaintStyle = psOutlook)); - //for J := ANode.Level - 1 downto I + Byte(FPaintStyle = psStandard) do - // ParentNode := ParentNode.Parent; - ADataItem := TdxReportCellExpandButton.Create(ACell); - with TdxReportCellExpandButton(ADataItem) do - begin - BoundsRect := Bounds(0, 0, FIndent + 0, ACellHeight); - APrevSibl := GetPrevSibling; - if APrevSibl <> nil then - Left := TdxReportVisualItem(APrevSibl).BoundsRect.Right; - CellSides := []; - - if ShowGrid then - begin - CellSides := CellSides + [csLeft]; - if ANode.Parent = nil then - CellSides := CellSides + [csTop]; - if not ((FPaintStyle = psOutlook) and (I = ALevel) and (ANode.Count <> 0)) then - CellSides := CellSides + [csRight]; - if FPaintStyle = psStandard then - begin - if I = ALevel then - begin - CellSides := CellSides + [csTop]; - if ANode.Count = 0 then CellSides := CellSides + [csBottom]; - end; - end - else - if (I = ALevel) and (ANode.Count > 0) then - CellSides := CellSides + [csTop]; - - if ((ANode.Count = 0) or (not ANode.Expanded and not AutoNodesExpand)) and - (not ShowRowFooters or (ATreeList.GetRowFooterCount(ANode) = 0)) and - IsLastNodeEx(ParentNode, ANode) then - CellSides := CellSides + [csBottom]; - end - else - begin - if I = 0 then - CellSides := CellSides + [csLeft]; - if ANode = FNodes.List^[0] then - CellSides := CellSides + [csTop]; - if ANode = FNodes.Last then - CellSides := CellSides + [csBottom]; - end; - - Transparent := IsLevelTransparent(ParentNode); - if not Transparent then - Color := GetLevelColor(ParentNode, ANodeIndex); - - // 2.3 ExpandButtons and TreeLines - SetupExpandButtonAndTreeLines(TdxReportCellExpandButton(ADataItem), ALevel - I, ANode, False) - end; - end; - - if IsTreeListLink or IsDBTreeListLink then - begin - { state images } - if CanDrawStateImages(ANode) then - begin - ADataItem := TdxReportCellGraphic.Create(ACell); - with TdxReportCellGraphic(ADataItem) do - begin - CellSides := []; - if {ShowPreviewGrid and }ShowGrid then - begin - CellSides := [csTop, csBottom]; - if (ANode.Count = 0) or (not ANode.Expanded and not AutoNodesExpand) then - CellSides := CellSides + [csLeft]; - end; - DrawMode := gdmCenter; - Transparent := True; - if OddEvenMode and not Self.Transparent and (FPaintStyle = psOutlook) and (ANode.Count = 0) then - begin - Transparent := False; - if Odd(ANodeIndex) then - Color := OddColor - else - Color := EvenColor; - end; - ImageList := ATreeList.StateImages; - ImageIndex := ANode.StateIndex; - BoundsRect := Bounds(0, 0, ImageList.Width, Parent.Height); - APrevSibl := GetPrevSibling; - if APrevSibl <> nil then - Left := TdxReportCell(APrevSibl).BoundsRect.Right; - end; - end; - - { images } - if CanDrawImages(ANode) then - begin - ADataItem := TdxReportCellGraphic.Create(ACell); - with TdxReportCellGraphic(ADataItem) do - begin - CellSides := []; - if {ShowPreviewGrid and }ShowGrid then - begin - CellSides := [csTop, csBottom]; - if not CanDrawStateImages(ANode) and (ANode.Count = 0) or (not ANode.Expanded and not AutoNodesExpand) then - CellSides := CellSides + [csLeft]; - end; - DrawMode := gdmCenter; - Transparent := True; - if OddEvenMode and not Self.Transparent and (FPaintStyle = psOutlook) and (ANode.Count = 0) then - begin - Transparent := False; - if Odd(ANodeIndex) then - Color := OddColor - else - Color := EvenColor; - end; - ImageList := ATreeList.Images; - ImageIndex := ANode.ImageIndex; - BoundsRect := Bounds(0, 0, ImageList.Width, Parent.Height); - APrevSibl := GetPrevSibling; - if APrevSibl <> nil then - Left := TdxReportCell(APrevSibl).BoundsRect.Right; - end; - end; - end; - - if not ATreeList.IsRowGroup(ANode) then - begin - for I := 0 to FAbsoluteIndexes.Count - 1 do - begin - AAbsoluteIndex := Integer(FAbsoluteIndexes.List^[I]); - Column := ATreeList.Columns[AAbsoluteIndex]; - ReferenceColumn := GetReferenceColumn(Column, ANode); - ADataClass := GetDataClass(ReferenceColumn, ANode); - if (ADataClass <> nil) then - begin - ADataItem := ADataClass.Create(ACell); - AssignValues(ADataItem, ANode, Column, ReferenceColumn); - with ADataItem do - begin - CellSides := GetDataItemSides(ANode, AAbsoluteIndex); - BoundsRect := GetDataItemRect(ANode, AAbsoluteIndex, ACell); - Transparent := IsCellTransparent(ANode); - if not Transparent then - Color := GetCellColor(ANode, AAbsoluteIndex, ANodeIndex); - FontIndex := GetCellFontIndex(ANode, Column, ANodeIndex); - if IsSupportedCustomDraw(nil) then - Data := Integer(Column); - end; - end; - end - end - else - begin - ADataItem := TdxReportCellString.Create(ACell); - with TdxReportCellString(ADataItem) do - begin - Column := ATreeList.Columns[GetGroupColumnIndex(ANode)]; - Text := ATreeList.GetNodeString(ANode, Column.Index); - TextAlignY := taCenterY; - Transparent := IsCellTransparent(ANode); - if not Transparent then - Color := GetCellColor(ANode, 0, -1); - FontIndex := FGroupNodeFontIndex; - BoundsRect := Rect(GetTextIndent(ANode), 0, FFullWidth, ACellHeight); - if ShowGrid then - CellSides := [csTop..csBottom] - else // ver. 2.3 - CellSides := [csRight]; - if IsSupportedCustomDraw(nil) then - Data := Integer(Column); - end; - end; - -{preview} - if not ATreeList.IsRowGroup(ANode) and ShowPreview and (FPreviewHeight <> 0) then - begin - ADataItem := TdxReportCellString.Create(ACell); - with TdxReportCellString(ADataItem) do - begin - CellSides := GetPreviewCellSides(ANode); - Multiline := True; - Text := ATreeList.GetPreviewText(ANode); - TextAlignY := dxMultilineTextAlignY[Multiline]; - Transparent := IsPreviewTransparent(ANode); - if not Transparent then - Color := GetPreviewColor(ANodeIndex); - FontIndex := GetPreviewFontIndex(ANode, ANodeIndex); - Indent := ATreeList.IndentDesc; - BoundsRect := - Rect(GetTextIndent(ANode), ACellHeight - FPreviewHeight, FFullWidth, ACellHeight); - if IsSupportedCustomDraw(nil) then - ADataItem.Data := Integer(ANode); - end; - end; - -{row footers} - if ShowRowFooters and ANode.IsLast and (ANode.Count = 0) then - begin - ParentNode := ANode; - for I := 0 to ATreeList.GetRowFooterCount(ANode) - 1 do - begin - InsertRowFooters(ParentNode, ANode, AParent, I); - ParentNode := ParentNode.Parent; - end; - end; - end; - - procedure IterateNodes; - var - I, M: Integer; - Node: TdxTreeListNode; - begin - M := 0; - for I := 0 to FNodes.Count - 1 do - begin - Inc(M); - Node := TdxTreeListNode(FNodes.List^[I]); - if ATreeList.IsRowGroup(Node) or ((ATreeList.PaintStyle = psOutlook) and (Node.Count > 0)) then - M := 0; - ProcessCells(Node, AReportCells.Cells, M); - AReportCells.DoProgress(MulDiv(I, 100, FNodes.Count)); - if AbortBuilding then Break; - end; - end; - -begin - if Component = nil then Exit; - inherited ConstructReport(AReportCells); - PrepareConstruct(AReportCells); - try - if (FAbsoluteIndexes.Count > 0) then - begin - ATreeList := ExposeTreeList(CustomTreeList); - - AReportCells.BorderColor := GridLineColor; - AReportCells.TreeLineColor := TreeLineColor; - if ATreeList.PaintStyle = psStandard then - AReportCells.ExpandButtonBorderColor := clBtnShadow - else - AReportCells.ExpandButtonBorderColor := clBlack; - AReportCells.TreeLineStyle := TreeLineStylesMap[ATreeList.TreeLineStyle]; - - with AReportCells.Cells do - begin - Color := dxDefaultColor; - CellSides := []; - Transparent := True; - FontIndex := 0; - end; - if IsDrawHeadersOnEveryPage then - with AReportCells.HeaderCells do - begin - Color := dxDefaultFixedColor; - CellSides := []; - Transparent := False; - FontIndex := FHeaderFontIndex; - end; - if IsDrawFootersOnEveryPage then - with AReportCells.FooterCells do - begin - Color := dxDefaultFixedColor; - CellSides := []; - Transparent := False; - FontIndex := FFooterFontIndex; - end; - - if ShowBands then InsertBands; - if ShowHeaders then InsertHeaders; - if (FNodes <> nil) and (FNodes.Count > 0) then - IterateNodes; - - if not AbortBuilding then - if ShowFooters then - InsertFooters - else - InsertStub; - - if not AbortBuilding then - begin - with AReportCells do - begin - if Cells.CellCount > 0 then - Cells.BoundsRect := Rect(0, 0, FFullWidth, Cells.LastCell.BoundsRect.Bottom); - if IsDrawHeadersOnEveryPage and (HeaderCells.CellCount > 0) then - HeaderCells.BoundsRect := Rect(0, 0, FFullWidth, HeaderCells.LastCell.BoundsRect.Bottom); - if IsDrawFootersOnEveryPage and (FooterCells.CellCount > 0) then - FooterCells.BoundsRect := Rect(0, 0, FFullWidth, FooterCells.LastCell.BoundsRect.Bottom); - end; - CalcDelimiterCell(AReportCells); - end; - end; - finally - UnprepareConstruct(AReportCells); - end; -end; - -function TCustomdxTreeListReportLink.GetBandLeft(AVisibleIndex: Integer): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AVisibleIndex - 1 do - Inc(Result, GetBandWidth(I)); -end; - -function TCustomdxTreeListReportLink.GetBandWidth(AVisibleIndex: Integer): Integer; -begin - Result := ExposeTreeList(CustomTreeList).GetBandWidth(AVisibleIndex); - if (AVisibleIndex = 0) then - Inc(Result, ExposeTreeList(CustomTreeList).GetIndentWidth); -end; - -function TCustomdxTreeListReportLink.GetPreviewColor(ANodeIndex: Integer): TColor; -begin - case DrawMode of - tldmStrict: - Result := PreviewColor; - tldmOddEven: - if Odd(ANodeIndex) then - Result := OddColor - else - Result := EvenColor - else - Result := PreviewColor; - end; -end; - -function TCustomdxTreeListReportLink.CanUseOddEvenMode(ANode: TdxTreeListNode; - ANodeIndex: Integer): Boolean; -begin - Result := (DrawMode = tldmOddEven) and (ANodeIndex <> -1) and - ((FPaintStyle <> psOutlook) or (ANode.Count = 0)) -end; - -function TCustomdxTreeListReportLink.GetOddEvenModeCellColor(ANodeIndex: Integer): TColor; -begin - if Odd(ANodeIndex) then - Result := OddColor - else - Result := EvenColor; -end; - -function TCustomdxTreeListReportLink.GetCellColor(ANode: TdxTreeListNode; - AColumnIndex: Integer; ANodeIndex: Integer): TColor; -begin - if CanUseOddEvenMode(ANode, ANodeIndex) then - Result := GetOddEvenModeCellColor(ANodeIndex) - else - if DrawMode = tldmBorrowSource then - if (FPaintStyle = psOutlook) and (ANode.Count > 0) then - begin - Result := GroupNodeColor; - ExposeTreeList(CustomTreeList).DoGetLevelColor(ANode.Level, Result); - end - else - begin - Result := ExposeTreeList(CustomTreeList).GetColumnColor(AColumnIndex); - if (Result = ExposeTreeList(CustomTreeList).Color) then - Result := Color; - end - else - if (FPaintStyle = psOutlook) and (ANode.Count > 0) then - Result := GroupNodeColor - else - Result := Color; -end; - -function TCustomdxTreeListReportLink.IsPreviewTransparent(ANode: TdxTreeListNode): Boolean; -begin - if (FPaintStyle = psStandard) or (ANode.Count = 0) then - Result := Transparent - else - Result := True; -end; - -function TCustomdxTreeListReportLink.IsCellTransparent(ANode: TdxTreeListNode): Boolean; -begin - if (FPaintStyle = psStandard) or (ANode.Count = 0) then - Result := Transparent - else - Result := FixedTransparent; -end; - -function TCustomdxTreeListReportLink.GetLevelColor(ANode: TdxTreeListNode; - ANodeIndex: Integer): TColor; -begin - if FPaintStyle = psStandard then - begin - case DrawMode of - tldmStrict: - Result := Color; - tldmOddEven: - if ANodeIndex = -1 then - Result := RowFooterColor - else - if Odd(ANodeIndex) then - Result := OddColor - else - Result := EvenColor; - else {tldmBorrowSource} - Result := ExposeTreeList(CustomTreeList).Color - end - end - else - begin - if (ANode = nil) or (ANode.Count = 0) then - Result := ColorToRGB(Color) - else - Result := ColorToRGB(GroupNodeColor); - - if (DrawMode = tldmBorrowSource) and (ANode <> nil) and (ANode.Count <> 0) then - ExposeTreeList(CustomTreeList).DoGetLevelColor(ANode.Level, Result) - end; -end; - -function TCustomdxTreeListReportLink.IsLevelTransparent(ANode: TdxTreeListNode): Boolean; -begin - if (FPaintStyle = psStandard) or (ANode.Count = 0) then - Result := Transparent - else - Result := FixedTransparent; -end; - -function TCustomdxTreeListReportLink.GetOddNodeFontIndex(AColumn: TdxTreeListColumn): Integer; -begin - if IsHyperLinkColumn(AColumn) then - Result := FOddHyperLinkFontIndex - else - Result := FOddFontIndex; -end; - -function TCustomdxTreeListReportLink.GetEvenNodeFontIndex(AColumn: TdxTreeListColumn): Integer; -begin - if IsHyperLinkColumn(AColumn) then - Result := FEvenHyperLinkFontIndex - else - Result := FEvenFontIndex; -end; - -function TCustomdxTreeListReportLink.GetOddEvenModeFontIndex(AColumn: TdxTreeListColumn; - ANodeIndex: Integer): Integer; -begin - if Odd(ANodeIndex) then - Result := GetOddNodeFontIndex(AColumn) - else - Result := GetEvenNodeFontIndex(AColumn); -end; - -function TCustomdxTreeListReportLink.MakeLookAndFeel: TdxLookAndFeel; -begin - if Use3DEffects then - begin - if UseSoft3D then - Result := lfFlat - else - Result := lfStandard; - end - else - Result := lfUltraFlat; -end; - -function TCustomdxTreeListReportLink.NeedGroupNodeFontIndex(ANode: TdxTreeListNode; - AFontIndex: Integer): Boolean; -begin - Result := (AFontIndex = FFontIndex) and ((FPaintStyle = psOutLook) and (ANode.Count > 0)); -end; - -function TCustomdxTreeListReportLink.AreSelectedNodesExist: Boolean; -begin - Result := OnlySelected and (ExposeTreeList(CustomTreeList).SelectedCount > 0); -end; - -function TCustomdxTreeListReportLink.GetCellFontIndex(ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; ANodeIndex: Integer): Integer; -begin - if CanUseOddEvenMode(ANode, ANodeIndex) then - Result := GetOddEvenModeFontIndex(AColumn, ANodeIndex) - else - begin - if ExposeTreeList(CustomTreeList).IsRowGroup(ANode) then - Result := FGroupNodeFontIndex - else - begin - if DrawMode = tldmBorrowSource then - begin - Result := PdxColumnInfo(FColumnInfos.List^[AColumn.Index]).FontIndex; - if NeedGroupNodeFontIndex(ANode, Result) then - Result := FGroupNodeFontIndex; - end - else - begin - if IsHyperLinkColumn(AColumn) then - Result := FHyperLinkFontIndex - else - Result := FFontIndex; - end; - end; - end; -end; - -function TCustomdxTreeListReportLink.GetPreviewFontIndex(ANode: TdxTreeListNode; - ANodeIndex: Integer): Integer; -begin - if CanUseOddEvenMode(ANode, ANodeIndex) then - begin - if Odd(ANodeIndex) then - Result := FOddFontIndex - else - Result := FEvenFontIndex - end - else - Result := FPreviewFontIndex; -end; - -function TCustomdxTreeListReportLink.IsSelectedNode(ANode: TdxTreeListNode): Boolean; - - function IsExistSelectedChild(ANode: TdxTreeListNode): Boolean; - var - I, J: Integer; - begin - Result := False; - with ExposeTreeList(CustomTreeList) do - for I := 0 to ANode.Count - 1 do - begin - for J := 0 to SelectedCount - 1 do - begin - Result := ANode[I] = SelectedNodes[J]; - if Result then Exit; - end; - if ANode[I].Count > 0 then - begin - Result := IsExistSelectedChild(ANode[I]); - if Result then Exit; - end; - end; - end; - - function FindInOriginal(ANode: TdxTreeListNode): Boolean; - var - I: Integer; - begin - Result := False; - with ExposeTreeList(CustomTreeList) do - for I := 0 to SelectedCount - 1 do - begin - Result := ANode = SelectedNodes[I]; - //Result := ANode.Selected; - if Result then Exit; - end; - end; - - function FindInChildren(ANode: TdxTreeListNode): Boolean; - var - I: Integer; - begin - Result := False; - for I := 0 to ANode.Count - 1 do - begin - Result := FindInOriginal(ANode[I]); - if Result then - Break - else - if ANode[I].Count > 0 then - Result := FindInChildren(ANode[I]); - if Result then Break; - end; - end; - - function FindInParent(ANode: TdxTreeListNode): Boolean; - begin - Result := False; - ANode := ANode.Parent; - while Assigned(ANode) do - begin - Result := FindInOriginal(ANode); - //if not Result then Result := FindInChildren(ANode); - if Result then Break; - ANode := ANode.Parent; - end; - end; - -begin - Result := FindInOriginal(ANode); - if not Result and (ANode.Count > 0) then - Result := FindInChildren(ANode); - if not Result and not IsExtendedSelect then - Result := FindInParent(ANode); -end; - -procedure TCustomdxTreeListReportLink.AddNodes; - - procedure AddNode(ANode: TdxTreeListNode); - var - I: Integer; - Node: TdxTreeListNode; - begin - FNodes.Add(ANode); - if ANode.Expanded or (AutoNodesExpand and ((ExpandLevel = -1) or (ExpandLevel > ANode.Level))) then - for I := 0 to ANode.Count - 1 do - begin - Node := ANode[I]; - if not AreSelectedNodesExist or IsSelectedNode(Node) then - AddNode(Node); - end; - end; - -var - I: Integer; - Node: TdxTreeListNode; -begin - FNodes.Clear; - if CustomTreeList.Count > 0 then - begin - if not AutoNodesExpand then - begin - if OnlySelected then - FNodes.Capacity := ExposeTreeList(CustomTreeList).SelectedCount - else - FNodes.Capacity := ExposeTreeList(CustomTreeList).GetAbsoluteCount; - end; - - for I := 0 to CustomTreeList.Count - 1 do - begin - Node := CustomTreeList.Items[I]; - if not AreSelectedNodesExist or IsSelectedNode(Node) then - AddNode(Node); - end; - end; -end; - -procedure TCustomdxTreeListReportLink.CalcColumnInfos(AReportCells: TdxReportCells); -type - PIntArray = ^TIntArray; - TIntArray = array[0..0] of Integer; -var - ATreeList: TdxTreeListAccess; - Column: TdxTreeListColumnAccess; - I, J, LineCount, HeaderWidth, AbsoluteIndex: Integer; - HeaderInfo: PdxColumnInfo; - F: TFont; - HyperLinkColumn: Boolean; -begin - if FAbsoluteIndexes.Count = 0 then Exit; - - ATreeList := ExposeTreeList(CustomTreeList); - - FColumnInfos := TList.Create; - -{$IFOPT R+}{$DEFINE PREVRANGECHECK}{$R-}{$ENDIF} - FColumnInfos.Count := - 1 + Math.MaxIntValue(Slice(PIntArray(FAbsoluteIndexes.List)^, FAbsoluteIndexes.Count)); -{$IFDEF SAVERANGECHECK}{$UNDEF PREVRANGECHECK}{$R+}{$ENDIF} - - F := TFont.Create; - try - with FAbsoluteIndexes do - for I := 0 to Count - 1 do - begin - AbsoluteIndex := Integer(List^[I]); - Column := TdxTreeListColumnAccess(ATreeList.Columns[AbsoluteIndex]); - New(HeaderInfo); - with HeaderInfo^ do - begin - HyperLinkColumn := IsHyperLinkColumn(Column); - if UseColumnFont and (ATreeList.IsExistColumnFont(AbsoluteIndex) or HyperLinkColumn) then - begin - F.Assign(ATreeList.GetColumnFont(AbsoluteIndex)); - if HyperLinkColumn then - begin - //F.Color := clBlue; // TODO: HyperLinkColumn Font Color - F.Style := [fsUnderline]; - end; - FontIndex := AddFontToPool(F); - end - else - FontIndex := FFontIndex; - - BandIndex := ATreeList.GetVisibleBandIndex(ATreeList.GetHeaderBandIndex(AbsoluteIndex)); - RowIndex := ATreeList.GetHeaderRowIndex(AbsoluteIndex); - RowCount := ATreeList.GetHeaderRowCount(BandIndex); - ColIndex := ATreeList.GetHeaderColIndex(AbsoluteIndex); - ColCount := ATreeList.GetHeaderColCount(BandIndex, RowIndex); - - ColumnLeft := GetBandLeft(BandIndex); - for J := 0 to ColIndex - 1 do - begin - HeaderWidth := ATreeList.GetHeaderBoundsWidth(ATreeList.GetHeaderAbsoluteIndex(BandIndex, RowIndex, J)); - Inc(ColumnLeft, HeaderWidth); - end; - ColumnRight := ColumnLeft + ATreeList.GetHeaderBoundsWidth(AbsoluteIndex); - CellTop := 0; - FooterTop := 0; - HeaderTop := 0; - NodeFooterTop := 0; - for J := 0 to RowIndex - 1 do - begin - LineCount := ATreeList.GetHeaderLineCount(BandIndex, J, ColIndex); - Inc(CellTop, LineCount * FRowHeight); - Inc(FooterTop, LineCount * FFooterRowHeight); - Inc(HeaderTop, LineCount * FHeaderRowHeight); - Inc(NodeFooterTop, LineCount * FGroupFooterRowHeight); - end; - LineCount := ATreeList.GetHeaderLineCount(BandIndex, RowIndex, ColIndex); - CellBottom := CellTop + LineCount * FRowHeight; - FooterBottom := FooterTop + LineCount * FFooterRowHeight + 3; - HeaderBottom := HeaderTop + LineCount * FHeaderRowHeight + 0; - NodeFooterBottom := NodeFooterTop + LineCount * FGroupFooterRowHeight + 3; - IsFirstColumn := (BandIndex = 0) and (ColIndex = 0); - IsLastColumn := (BandIndex = ATreeList.GetBandCount - 1) and (ColIndex = ColCount - 1); - - IsHeaderMultiline := (ATreeList.GetHeaderLineCount(BandIndex, RowIndex, ColIndex) > 1) or - (ATreeList.GetHeaderLineRowCount > 1); - - IsMultiline := (ATreeList.GetHeaderLineCount(BandIndex, RowIndex, ColIndex) > 1) or - ((ATreeList.GetHeaderLineRowCount > 1) and Column.IsColumnMultiline); - - //IsMultiline := (ATreeList.GetHeaderLineCount(ATreeList.GetVisibleBandIndex(BandIndex), RowIndex, ColIndex) > 1) or - // ((ATreeList.GetHeaderLineRowCount > 1) and Column.IsColumnMultiline); - end; - FColumnInfos.List^[AbsoluteIndex] := HeaderInfo; - end; - finally - F.Free; - end; -end; - -procedure TCustomdxTreeListReportLink.CalcDelimiterCell(AReportCells: TdxReportCells); -var - TreeList: TdxTreeListAccess; - I: Integer; -begin - TreeList := ExposeTreeList(CustomTreeList); - FHorzDelimiterCell := nil; - if UseHorzDelimiters then - begin - if ShowBands and HorzDelimitByBands then - if not IsAggregated and BandsOnEveryPage and (CustomTreeList.Count > 0) then - FHorzDelimiterCell := AReportCells.HeaderCells[0] - else - FHorzDelimiterCell := AReportCells.Cells[0] - else - if ShowHeaders then - if not IsAggregated and BandsOnEveryPage and HeadersOnEveryPage and (CustomTreeList.Count > 0)then - FHorzDelimiterCell := AReportCells.HeaderCells[Byte(ShowBands)] - else - FHorzDelimiterCell := AReportCells.Cells[Byte(ShowBands)] - else - if ShowBands then - FHorzDelimiterCell := AReportCells.Cells[Byte(IsAggregated or not BandsOnEveryPage)] - else - if AReportCells.Cells.CellCount > 0 then - FHorzDelimiterCell := AReportCells.Cells[0] - end; - - if FHorzDelimiterCell <> nil then - if not ShowBands and not ShowHeaders and (CustomTreeList.Count > 0) and - (AReportCells.Cells.CellCount > 0) and - TreeList.IsRowGroup(TdxTreeListNode(FNodes.List[0])) then - begin - I := 0; - while (I < FNodes.Count) and TreeList.IsRowGroup(TdxTreeListNode(FNodes.List[I])) do - Inc(I); - if I < FNodes.Count then - FHorzDelimiterCell := FHorzDelimiterCell.Parent.Cells[I] - else - FHorzDelimiterCell := nil; - end; -end; - -procedure TCustomdxTreeListReportLink.FreeHeaderInfos; -var - I: Integer; -begin - if FColumnInfos = nil then Exit; - with FColumnInfos do - begin - for I := 0 to Count - 1 do - if List^[I] <> nil then - Dispose(PdxColumnInfo(List^[I])); - end; - FColumnInfos.Free; - FColumnInfos := nil; -end; - -procedure TCustomdxTreeListReportLink.CalcFontIndexes(AReportCells: TdxReportCells); -var - F: TFont; -begin - if FAbsoluteIndexes.Count = 0 then Exit; - - FBandFontIndex := AddFontToPool(BandFont); - FEvenFontIndex := AddFontToPool(EvenFont); - FGroupNodeFontIndex := AddFontToPool(GroupNodeFont); - FFooterFontIndex := AddFontToPool(FooterFont); - FHeaderFontIndex := AddFontToPool(HeaderFont); - FOddFontIndex := AddFontToPool(OddFont); - FPreviewFontIndex := AddFontToPool(PreviewFont); - FRowFooterFontIndex := AddFontToPool(RowFooterFont); - if IsHyperLinkColumnsExists then - begin - F := TFont.Create; - try - F.Assign(Self.Font); - F.Style := F.Style + [fsUnderline]; - FHyperLinkFontIndex := AddFontToPool(F); - if (DrawMode = tldmOddEven) then - begin - F.Assign(Self.OddFont); - F.Style := F.Style + [fsUnderline]; - FOddHyperLinkFontIndex := AddFontToPool(F); - F.Assign(Self.EvenFont); - F.Style := F.Style + [fsUnderline]; - FEvenHyperLinkFontIndex := AddFontToPool(F); - end; - finally - F.Free; - end; - end; -end; - -procedure TCustomdxTreeListReportLink.GetColumnInfos(AAbsoluteIndex: Integer; - ABandIndex, ARowIndex, AColIndex, ARowCount, AColCount: PInteger; - AIsFirstColumn, AIsLastColumn: PBoolean); -begin - with PdxColumnInfo(FColumnInfos.List^[AAbsoluteIndex])^ do - begin - if ABandIndex <> nil then ABandIndex^ := BandIndex; - if AColIndex <> nil then AColIndex^ := ColIndex; - if AColCount <> nil then AColCount^ := ColCount; - if ARowIndex <> nil then ARowIndex^ := RowIndex; - if ARowCount <> nil then ARowCount^ := RowCount; - if AIsFirstColumn <> nil then AIsFirstColumn^ := IsFirstColumn; - if AIsLastColumn <> nil then AIsLastColumn^ := IsLastColumn; - end; -end; - -procedure TCustomdxTreeListReportLink.GetCellRect(AAbsoluteIndex: Integer; - ACellType: TdxTreeListLinkCellType; var R: TRect); -begin - with PdxColumnInfo(FColumnInfos.List^[AAbsoluteIndex])^ do - begin - R.Left := ColumnLeft; - R.Right := ColumnRight; - case ACellType of - tlstCell: - begin - R.Top := CellTop; - R.Bottom := CellBottom; - end; - tlstFooter: - begin - R.Top := FooterTop; - R.Bottom := FooterBottom; - end; - tlstGroupFooter: - begin - R.Top := NodeFooterTop; - R.Bottom := NodeFooterBottom; - end; - tlstHeader: - begin - R.Top := HeaderTop; - R.Bottom := HeaderBottom; - end; - else - R.Top := 0; - R.Bottom := 0; - end; - end; -end; - -procedure TCustomdxTreeListReportLink.CalcAbsoluteIndexes; -var - I, J, K, Ind: Integer; -begin - with ExposeTreeList(CustomTreeList) do - begin - for I := 0 to GetBandCount - 1 do - for J := 0 to GetHeaderRowCount(I) - 1 do - for K := 0 to GetHeaderColCount(I, J) - 1 do - begin - Ind := GetHeaderAbsoluteIndex(I, J, K); - FAbsoluteIndexes.Add(Pointer(Ind)); - end; - end; -end; - -procedure TCustomdxTreeListReportLink.MakeDelimiters(AReportCells: TdxReportCells; - AHorzDelimiters, AVertDelimiters: TList); - - procedure IterateChildrens(ACell: TdxReportCell); - var - I: Integer; - Cell: TdxReportCell; - begin - for I := 0 to ACell.CellCount - 1 do - begin - Cell := ACell[I]; - AVertDelimiters.Add(Pointer(Cell.AbsoluteOrigin.Y)); - if Cell.HasChildren then - IterateChildrens(Cell); - end; - end; - -var - I: Integer; -begin - inherited MakeDelimiters(AReportCells, AHorzDelimiters, AVertDelimiters); - - if (AReportCells.Cells.CellCount > 0) or - (IsDrawHeadersOnEveryPage and (AReportCells.HeaderCells.CellCount > 0)) or - (IsDrawFootersOnEveryPage and (AReportCells.FooterCells.CellCount > 0)) then - begin - {horz.} - if UseHorzDelimiters and (FHorzDelimiterCell <> nil) then - for I := 0 to FHorzDelimiterCell.DataItemCount - 1 do - with FHorzDelimiterCell.DataItems[I] do - begin - AHorzDelimiters.Add(Pointer(AbsoluteOrigin.X)); - AHorzDelimiters.Add(Pointer(AbsoluteOrigin.X + Width)); - end; - - {vert.} - if UseVertDelimiters then - begin - if AReportCells.Cells.CellCount > 0 then - IterateChildrens(AReportCells.Cells); - //if (IsDrawHeadersOnEveryPage and (AReportCells.HeaderCells.CellCount > 0)) then - if not IsDrawHeadersOnEveryPage then - IterateChildrens(AReportCells.HeaderCells); - //if (IsDrawFootersOnEveryPage and (AReportCells.FooterCells.CellCount > 0)) then - if not IsDrawFootersOnEveryPage then - IterateChildrens(AReportCells.FooterCells); - end; - end - else - begin - AHorzDelimiters.Add(Pointer(1)); - AVertDelimiters.Add(Pointer(1)); - end; -end; - -procedure TCustomdxTreeListReportLink.DoCustomDrawBandCell(ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; ABand: TdxTreeListBand; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawBandCell) then - FOnCustomDrawBandCell(Self, ACanvas, ABoundsRect, AClientRect, ABand, AText, - AColor, AFont, ATextAlignX, ATextAlignY, ADone); -end; - -procedure TCustomdxTreeListReportLink.DoCustomDrawCell(ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawCell) then - FOnCustomDrawCell(Self, ACanvas, ABoundsRect, AClientRect, ANode, AColumn, - AText, AColor, AFont, ATextAlignX, ATextAlignY, ADone); -end; - -procedure TCustomdxTreeListReportLink.DoCustomDrawFooterCell(ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; var AText: string; var AColor: TColor; - AFont: TFont; var ATextAlignX: TcxTextAlignX; var ATextAlignY: TcxTextAlignY; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawFooterCell) then - FOnCustomDrawFooterCell(Self, ACanvas, ABoundsRect, AClientRect, ANode, - AColumn, AText, AColor, AFont, ATextAlignX, ATextAlignY, ADone); -end; - -procedure TCustomdxTreeListReportLink.DoCustomDrawHeaderCell(ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; AColumn: TdxTreeListColumn; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ASorted: TdxCellSortOrder; - var ADone: Boolean); -begin - if Assigned(FOnCustomDrawHeaderCell) then - FOnCustomDrawHeaderCell(Self, ACanvas, ABoundsRect, AClientRect, AColumn, - AText, AColor, AFont, ATextAlignX, ATextAlignY, ASorted, ADone); -end; - -procedure TCustomdxTreeListReportLink.DoCustomDrawPreviewCell(ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; ANode: TdxTreeListNode; var AText: string; - var AColor: TColor; AFont: TFont; var ADone: Boolean); -var - ATextColor, C: TColor; -begin - if Assigned(FOnCustomDrawPreviewCell) then - begin - ATextColor := AFont.Color; - C := ATextColor; - FOnCustomDrawPreviewCell(Self, ACanvas, ABoundsRect, AClientRect, ANode, AText, - AColor, ATextColor, AFont, ADone); - if C <> ATextColor then AFont.Color := ATextColor; - end; -end; - -procedure TCustomdxTreeListReportLink.DoCustomDrawRowFooterCell(ACanvas: TCanvas; - ABoundsRect, AClientRect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; AFooterIndex: Integer; var AText: string; - var AColor: TColor; AFont: TFont; var ATextAlignX: TcxTextAlignX; - var ATextAlignY: TcxTextAlignY; var ADone: Boolean); -begin - if Assigned(FOnCustomDrawRowFooterCell) then - FOnCustomDrawRowFooterCell(Self, ACanvas, ABoundsRect, AClientRect, ANode, - AColumn, AFooterIndex, AText, AColor, AFont, ATextAlignX, ATextAlignY, ADone); -end; - -procedure TCustomdxTreeListReportLink.ReadIsGraphicAsTextValueAssigned(AReader: TReader); -begin - FIsGraphicAsTextValueAssigned := AReader.ReadBoolean; -end; - -procedure TCustomdxTreeListReportLink.WriteIsGraphicAsTextValueAssigned(AWriter: TWriter); -begin - AWriter.WriteBoolean(FIsGraphicAsTextValueAssigned); -end; - -{ TdxTreeListReportLink } - -procedure TdxTreeListReportLink.AssignValues(ADataItem: TAbstractdxReportCellData; - ANode: TdxTreeListNode; AColumn, AReferenceColumn: TdxTreeListColumn); -begin - if Assigned(FdxTreeListAssignDataProc) then - FdxTreeListAssignDataProc(Self, ADataItem, TreeList, ANode, AColumn, AReferenceColumn); -end; - -function TdxTreeListReportLink.GetDataClass(AColumn: TdxTreeListColumn; - ANode: TdxTreeListNode): TdxReportCellDataClass; -begin - if Assigned(FdxTreeListColumnMapperProc) then - Result := FdxTreeListColumnMapperProc(AColumn, Self, ANode) - else - Result := nil; -end; - -procedure TdxTreeListReportLink.GetOwnedImageLists(AProc: TdxPSGetImageListProc); -begin - inherited GetOwnedImageLists(AProc); - AProc(TreeList.Images); - AProc(TreeList.StateImages); -end; - -function TdxTreeListReportLink.GetTreeList: TdxTreeList; -begin - Result := TdxTreeList(Component) -end; - -{ TdxTLReportLinkDesignWindow } - -constructor TdxTLReportLinkDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhcTreeListReportLinkDesigner; - inherited Create(AOwner); - CreateControls; - FillTreeListData; - dxTLPreview.FullExpand; - PageControl1.ActivePage := PageControl1.Pages[0]; - dxPSPopupMenuController.RegisterControl(lbxFonts); -end; - -destructor TdxTLReportLinkDesignWindow.Destroy; -begin - dxPSPopupMenuController.UnregisterControl(lbxFonts); - inherited Destroy; -end; - -procedure TdxTLReportLinkDesignWindow.FillTreeListData; - - procedure AddNodeData(ANode: TdxTreeListNode; const AText1, AText2, AText3: string; - AValue: Integer; AData: Integer); - begin - with ANode do - begin - Strings[0] := AText1; - Strings[1] := AText2; - Strings[2] := AText3; - Values[2] := IntToStr(AValue); - Data := Pointer(AData); - StateIndex := 1; - ImageIndex := 0; - SelectedIndex := 0; - end; - end; - -var - Node: TdxTreeListNode; -begin - dxTLPreview.Bands[0].Caption := cxGetResourceString(@sdxTLBand); - dxTLPreview.Columns[0].Caption := cxGetResourceString(@sdxTLColumnName); - dxTLPreview.Columns[1].Caption := cxGetResourceString(@sdxTLColumnAxisymmetric); - dxTLPreview.Columns[2].Caption := cxGetResourceString(@sdxTLColumnItemShape); - - dxTLPreview.ClearNodes; - Node := dxTLPreview.Add; - AddNodeData(Node, sdxRegular, dxBoolToStr(True), cxGetResourceString(@sdxItemShapeAsText), -1, 0); - AddNodeData(Node.AddChild, cxGetResourceString(@sdxItem1Name), dxBoolToStr(True), cxGetResourceString(@sdxItemShapeAsText), 2, 1); - AddNodeData(Node.AddChild, cxGetResourceString(@sdxItem2Name), dxBoolToStr(True), cxGetResourceString(@sdxItemShapeAsText), 3, 2); - AddNodeData(Node.AddChild, cxGetResourceString(@sdxItem3Name), dxBoolToStr(True), cxGetResourceString(@sdxItemShapeAsText), 4, 3); - AddNodeData(Node.AddChild, cxGetResourceString(@sdxItem4Name), dxBoolToStr(False), cxGetResourceString(@sdxItemShapeAsText), 6, 4); - - Node := dxTLPreview.Add; - AddNodeData(Node, cxGetResourceString(@sdxIrregular), dxBoolToStr(False), cxGetResourceString(@sdxItemShapeAsText), -1, 5); - AddNodeData(Node.AddChild, cxGetResourceString(@sdxItem5Name), dxBoolToStr(False), cxGetResourceString(@sdxItemShapeAsText), 5, 6); -end; - -function TdxTLReportLinkDesignWindow.GetReportLink: TCustomdxTreeListReportLink; -begin - Result := inherited ReportLink as TCustomdxTreeListReportLink; -end; - -procedure TdxTLReportLinkDesignWindow.pbxPreviewPaint(Sender: TObject); -begin - with TdxPSPaintPanel(Sender) do - PaintPreview(Canvas, ClientRect); -end; - -procedure FrameRectColor(DC: HDC; const R: TRect; AColor: TColor); -var - Brush: HBRUSH; -begin - Brush := CreateSolidBrush(ColorToRGB(AColor)); - FrameRect(DC, R, Brush); - DeleteObject(Brush); -end; - -procedure FillRectColor(DC: HDC; const R: TRect; AColor: TColor); -var - Brush: HBRUSH; -begin - Brush := CreateSolidBrush(ColorToRGB(AColor)); - FillRect(DC, R, Brush); - DeleteObject(Brush); -end; - -const - Alignments: array[TAlignment] of UINT = (DT_LEFT, DT_RIGHT, DT_CENTER); - -procedure DrawTextRect(ACanvas: TCanvas; R: TRect; const AText: string; - AAlignment: TAlignment; AColor: TColor); -var - DC: HDC; -begin - DC := ACanvas.Handle; - FillRectColor(DC, R, AColor); - InflateRect(R, -2, 0); - SetBkMode(DC, Windows.TRANSPARENT); - DrawText(DC, PChar(AText), Length(AText), R, DT_SINGLELINE or DT_VCENTER or Alignments[AAlignment]); -end; - -procedure DrawFooterRect(ACanvas: TCanvas; R: TRect; const AText: string; - AAlignment: TAlignment; ALookAndFeel: TdxLookAndFeel; ABorderColor, AColor: TColor); -var - DC: HDC; -begin - DC := ACanvas.Handle; - case ALookAndFeel of - lfStandard, lfFlat: - DrawEdge(DC, R, BDR_SUNKENOUTER, BF_RECT or BF_SOFT); - lfUltraFlat: - FrameRectColor(DC, R, ABorderColor); - end; - InflateRect(R, -1, -1); - DrawTextRect(ACanvas, R, AText, AAlignment, AColor); -end; - -procedure DrawHeaderRect(ACanvas: TCanvas; R: TRect; const AText: string; - AAlignment: TAlignment; ALookAndFeel: TdxLookAndFeel; ABorderColor, AColor: TColor); -var - DC: HDC; -begin - DC := ACanvas.Handle; - case ALookAndFeel of - lfStandard: - begin - DrawEdge(DC, R, BDR_RAISEDINNER, BF_LEFT or BF_TOP); - DrawEdge(DC, R, BDR_RAISEDOUTER, BF_RIGHT or BF_BOTTOM); - Dec(R.Right); Dec(R.Bottom); - DrawEdge(DC, R, BDR_RAISEDINNER, BF_RIGHT or BF_BOTTOM); - end; - lfFlat: - begin - DrawEdge(DC, R, BDR_RAISEDINNER, BF_LEFT or BF_TOP); - DrawEdge(DC, R, BDR_RAISEDOUTER, BF_RIGHT or BF_BOTTOM); - end; - lfUltraFlat: - begin - Dec(R.Left); Dec(R.Top); - FrameRectColor(DC, R, ABorderColor); - end; - end; - InflateRect(R, -1, -1); - DrawTextRect(ACanvas, R, AText, AAlignment, AColor); -end; - -procedure TdxTLReportLinkDesignWindow.PaintPreview(ACanvas: TCanvas; R: TRect); -var - DC: HDC; - R2: TRect; - DrawInfo: TdxGridDrawInfo; -begin - inherited; - DC := ACanvas.Handle; - Inc(R.Left); - Inc(R.Top); - dxTLPreview.PaintTo(DC, R.Left, R.Top); - - dxTLPreview.CalcDrawInfo(DrawInfo); - try - R2 := DrawInfo.EmptyRectBottom; - if not IsRectEmpty(R2) then - begin - OffsetRect(R2, R.Left, R.Top); - FillRectColor(DC, R2, clWindow); - end; - finally - dxTLPreview.FreeDrawInfo(DrawInfo); - end; - - Dec(R.Left); - Dec(R.Top); - FrameRectColor(DC, R, ReportLink.GridLineColor); -end; - -procedure TdxTLReportLinkDesignWindow.SetupPreview; -begin - if ReportLink.Component <> nil then - with dxTLPreview do - begin - if ReportLink.IsDBGridLink then - begin - Images := nil; - StateImages := nil; - end; - PaintStyle := ReportLink.FPaintStyle; - FullExpand; - end; -end; - -procedure TdxTLReportLinkDesignWindow.CreateControls; - - function CreateColorCombo(AParent: TWinControl; AHost: TControl; - ATag: Integer; AAutoColor: TColor; ALabel: TLabel): TdxPSColorCombo; - begin - Result := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(Result) do - begin - BoundsRect := AHost.BoundsRect; - Tag := ATag; - Parent := AParent; - ColorTypes := [ctPure]; - ShowColorName := True; - ShowAutoColor := True; - AutoColor := AAutoColor; - OnChange := ccbxColorChange; - end; - ALabel.FocusControl := Result; - AHost.Visible := False; - end; - -begin - ccbxColor := - CreateColorCombo(gbxTransparent, bvlColorHolder, 0, dxDefaultColor, lblColor); - ccbxEvenColor := - CreateColorCombo(gbxTransparent, bvlEvenColorHolder, 1, dxDefaultColor, lblEvenColor); - ccbxPreviewColor := - CreateColorCombo(gbxTransparent, bvlPreviewColorHolder, 2, dxDefaultColor, lblPreviewColor); - ccbxBandColor := - CreateColorCombo(gbxFixedTransparent, bvlBandColorHolder, 3, dxDefaultFixedColor, lblBandColor); - - ccbxHeaderColor := - CreateColorCombo(gbxFixedTransparent, bvlHeaderColorHolder, 5, dxDefaultFixedColor, lblHeaderColor); - ccbxGroupNodeColor := - CreateColorCombo(gbxFixedTransparent, bvlGroupNodeColorHolder, 4, dxDefaultFixedColor, lblGroupNodeColor); - ccbxRowFooterColor := - CreateColorCombo(gbxFixedTransparent, bvlRowFooterColorHolder, 6, dxDefaultFixedColor, lblRowFooterColor); - - ccbxGridLineColor := - CreateColorCombo(tshColors, bvlGridLineColorHolder, 7, dxDefaultGridLineColor, lblGridLineColor); - ccbxGridLineColor.TabOrder := ccbxGridLineColor.Parent.ControlCount - 1; - - ccbxTreeLineColor := - CreateColorCombo(tshColors, bvlTreeLineColorHolder, 8, dxDefaultTreeLineColor, lblTreeLineColor); - ccbxTreeLineColor.TabOrder := ccbxTreeLineColor.Parent.ControlCount - 1; - - seExpandLevel := TdxPSSpinEdit.Create(Self); - with TdxPSSpinEdit(seExpandLevel) do - begin - BoundsRect := bvlExpandLevelHolder.BoundsRect; - MinValue := -1; - MaxValue := 100; - Flat := False; - Parent := tshBehaviors; - TabOrder := chbxAutoNodesExpand.TabOrder + 1; - OnChange := ExpandLevelChange; - end; - lblExpandLevel.FocusControl := seExpandLevel; - - sePreviewLineCount := TdxPSSpinEdit.Create(Self); - with TdxPSSpinEdit(sePreviewLineCount) do - begin - BoundsRect := bvlPreviewLineCountHolder.BoundsRect; - MinValue := 0; - MaxValue := 100; - Flat := False; - Parent := tshPreview; - TabOrder := chbxAutoCalcPreviewLines.TabOrder + 1; - OnChange := PreviewLineCountChange; - end; - lblPreviewLineCount.FocusControl := sePreviewLineCount; - - FPreviewBox := TdxPSPaintPanel.Create(Self); - with TdxPSPaintPanel(FPreviewBox) do - begin - Parent := pnlPreview; - Height := dxTLPreview.Height + 1; - Width := dxTLPreview.Width + 1; - Left := (Parent.Width - Width) div 2; - Top := (Parent.Height - Height) div 2; - EdgeInner := esNone; - EdgeOuter := esNone; - OnPaint := pbxPreviewPaint; - end; -end; - -{$IFDEF DELPHI7} -function TdxTLReportLinkDesignWindow.GetPreviewHost: TCustomPanel; -begin - Result := pnlPreview; -end; -{$ENDIF} - -procedure TdxTLReportLinkDesignWindow.LoadStrings; -begin - inherited LoadStrings; - tshOptions.Caption := cxGetResourceString(@sdxOptions); - tshFonts.Caption := cxGetResourceString(@sdxFonts); - tshColors.Caption := cxGetResourceString(@sdxColors); - tshBehaviors.Caption := cxGetResourceString(@sdxBehaviors); - tshPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblPreviewWindow.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblDrawMode.Caption := cxGetResourceString(@sdxDrawMode); - with cbxDrawMode.Items do - begin - BeginUpdate; - try - Clear; - AddObject(cxGetResourceString(@sdxDrawModeStrict), TObject(tldmStrict)); - AddObject(cxGetResourceString(@sdxDrawModeOddEven), TObject(tldmOddEven)); - AddObject(cxGetResourceString(@sdxDrawModeBorrow), TObject(tldmBorrowSource)); - finally - EndUpdate; - end; - end; - - lblShow.Caption := cxGetResourceString(@sdxShow); - - chbxShowExpandButtons.Caption := cxGetResourceString(@sdxExpandButtons); - chbxShowTreeLines.Caption := cxGetResourceString(@sdxTreeLines); - - chbxShowGrid.Caption := cxGetResourceString(@sdxGrid); - chbxShowNodeGrid.Caption := cxGetResourceString(@sdxNodesGrid); -// chbxShowGroupFooterGrid.Caption := cxGetResourceString(@sdxGroupFooterGrid); - - chbxShowImages.Caption := cxGetResourceString(@sdxImages); - chbxShowStateImages.Caption := cxGetResourceString(@sdxStateImages); - - chbxBandsOnEveryPage.Caption := cxGetResourceString(@sdxBandsOnEveryPage); - chbxHeadersOnEveryPage.Caption := cxGetResourceString(@sdxHeadersOnEveryPage); - chbxFootersOnEveryPage.Caption := cxGetResourceString(@sdxFootersOnEveryPage); - chbxAutoNodesExpand.Caption := cxGetResourceString(@sdxAutoNodesExpand); - chbxOnlySelected.Caption := cxGetResourceString(@sdxOnlySelected); - chbxExtendedSelect.Caption := cxGetResourceString(@sdxExtendedSelect); - lblExpandLevel.Caption := cxGetResourceString(@sdxExpandLevel); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - stTransparent.Caption := ' ' + cxGetResourceString(@sdxTransparent) + ' '; - stFixedTransparent.Caption := ' ' + cxGetResourceString(@sdxFixedTransparent) + ' '; - - lblColor.Caption := cxGetResourceString(@sdxColor); - lblEvenColor.Caption := cxGetResourceString(@sdxEvenColor); - lblPreviewColor.Caption := cxGetResourceString(@sdxPreviewColor); - - lblBandColor.Caption := cxGetResourceString(@sdxBandColor); - lblHeaderColor.Caption := cxGetResourceString(@sdxHeaderColor); - lblRowFooterColor.Caption := cxGetResourceString(@sdxGroupFooterColor); - lblGroupNodeColor.Caption := cxGetResourceString(@sdxGroupNodeColor); - lblGridLineColor.Caption := cxGetResourceString(@sdxGridLinesColor); - lblTreeLineColor.Caption := cxGetResourceString(@sdxTreeLinesColor); - - with lbxFonts.Items do - begin - BeginUpdate; - try - Clear; - Add(cxGetResourceString(@sdxBandFont)); - Add(cxGetResourceString(@sdxFont)); - Add(cxGetResourceString(@sdxOddFont)); - Add(cxGetResourceString(@sdxEvenFont)); - Add(cxGetResourceString(@sdxGroupNodeFont)); - Add(cxGetResourceString(@sdxFooterFont)); - Add(cxGetResourceString(@sdxHeaderFont)); - Add(cxGetResourceString(@sdxPreviewFont)); - Add(cxGetResourceString(@sdxGroupFooterFont)); - finally - EndUpdate; - end; - end; - - btnChangeFont.Caption := cxGetResourceString(@sdxBtnChangeFont); - miChangeFont.Caption := cxGetResourceString(@sdxBtnChangeFont); - - chbxShowBands.Caption := cxGetResourceString(@sdxBands); - chbxShowHeaders.Caption := cxGetResourceString(@sdxHeaders); - chbxShowFooters.Caption := cxGetResourceString(@sdxFooters); - chbxShowGroupFooters.Caption := cxGetResourceString(@sdxGroupFooters); - chbxShowPreview.Caption := DropAmpersand(cxGetResourceString(@sdxVisible)); - chbxAutoCalcPreviewLines.Caption := cxGetResourceString(@sdxAutoCalcPreviewLineCount); - lblPreviewLineCount.Caption := cxGetResourceString(@sdxPreviewLineCount); - - lblOnEveryPage.Caption := cxGetResourceString(@sdxOnEveryPage); - lblSelection.Caption := cxGetResourceString(@sdxSelection); - lblExpanding.Caption := cxGetResourceString(@sdxExpanding); - lblLookAndFeel.Caption := cxGetResourceString(@sdxLookAndFeel); - lblRefinements.Caption := cxGetResourceString(@sdxRefinements); - - chbxUse3DEffects.Caption := cxGetResourceString(@sdxUse3DEffects); - chbxUseSoft3D.Caption := cxGetResourceString(@sdxSoft3D); - - chbxTransparentColumnGraphic.Caption := cxGetResourceString(@sdxTransparentColumnGraphics); - chbxDisplayGraphicsAsText.Caption := cxGetResourceString(@sdxDisplayGraphicsAsText); - chbxFlatCheckMarks.Caption := cxGetResourceString(@sdxFlatCheckMarks); - chbxCheckMarksAsText.Caption := cxGetResourceString(@sdxCheckMarksAsText); -end; - -procedure TdxTLReportLinkDesignWindow.CMDialogChar(var Msg: TCMDialogChar); -var - I: Integer; -begin - inherited; - with PageControl1 do - for I := 0 to PageCount - 1 do - if IsAccel(Msg.CharCode, Pages[I].Caption) then - begin - Msg.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TdxTLReportLinkDesignWindow.UpdateControlsState; -begin - inherited; - - if ReportLink.OddEvenMode then - lblColor.Caption := cxGetResourceString(@sdxOddColor) - else - lblColor.Caption := cxGetResourceString(@sdxColor); - - chbxBandsOnEveryPage.Checked := ReportLink.BandsOnEveryPage; - chbxBandsOnEveryPage.Enabled := not ReportLink.IsAggregated; - - chbxHeadersOnEveryPage.Enabled := not ReportLink.IsAggregated and chbxBandsOnEveryPage.Checked; - chbxHeadersOnEveryPage.Checked := ReportLink.HeadersOnEveryPage; - - chbxFootersOnEveryPage.Enabled := not ReportLink.IsAggregated; - chbxFootersOnEveryPage.Checked := ReportLink.FootersOnEveryPage; - -// chbxShowTreeLines.Enabled := not ReportLink.IsDBGridLink; - if ReportLink.CustomTreeList <> nil then - with ExposeTreeList(ReportLink.CustomTreeList) do - begin - lblTreeLineColor.Visible := PaintStyle = psStandard; - ccbxTreeLineColor.Visible := PaintStyle = psStandard; - chbxShowTreeLines.Enabled := PaintStyle = psStandard; - end; - - chbxOnlySelected.Checked := ReportLink.OnlySelected; - chbxAutoNodesExpand.Checked := ReportLink.AutoNodesExpand; - - chbxExtendedSelect.Enabled := chbxOnlySelected.Checked; - seExpandLevel.Visible := ReportLink.IsTreeListLink; - lblExpandLevel.Visible := seExpandLevel.Visible; - if seExpandLevel.Visible then - begin - seExpandLevel.Enabled := chbxAutoNodesExpand.Checked and not chbxOnlySelected.Checked; - lblExpandLevel.Enabled := seExpandLevel.Enabled; - end; - - //bvlShowImages.Visible := not ReportLink.IsDBGridLink; - chbxShowStateImages.Enabled := not ReportLink.IsDBGridLink; - chbxShowImages.Enabled := not ReportLink.IsDBGridLink; - - chbxAutoCalcPreviewLines.Enabled := ReportLink.ShowPreview; - sePreviewLineCount.Enabled := ReportLink.ShowPreview and not ReportLink.AutoCalcPreviewLines; - lblPreviewLineCount.Enabled := sePreviewLineCount.Enabled; - - chbxShowNodeGrid.Enabled := chbxShowGrid.Checked; - //chbxShowGroupFooterGrid.Enabled := chbxShowGrid.Checked; - - chbxUseSoft3D.Enabled := chbxUse3DEffects.Checked; - - ccbxColor.Enabled := not chbxTransparent.Checked; - lblColor.Enabled := ccbxColor.Enabled; - ccbxEvenColor.Enabled := not chbxTransparent.Checked and ReportLink.OddEvenMode; - lblEvenColor.Enabled := ccbxEvenColor.Enabled; - ccbxPreviewColor.Enabled := not chbxTransparent.Checked and not ReportLink.OddEvenMode; - lblPreviewColor.Enabled := ccbxPreviewColor.Enabled; - - ccbxBandColor.Enabled := not chbxFixedTransparent.Checked; - lblBandColor.Enabled := ccbxBandColor.Enabled; - ccbxGroupNodeColor.Enabled := not chbxFixedTransparent.Checked; - lblGroupNodeColor.Enabled := ccbxGroupNodeColor.Enabled; - - ccbxHeaderColor.Enabled := not chbxFixedTransparent.Checked; - lblHeaderColor.Enabled := ccbxHeaderColor.Enabled; - ccbxRowFooterColor.Enabled := not chbxFixedTransparent.Checked; - lblRowFooterColor.Enabled := ccbxRowFooterColor.Enabled; - - if ReportLink.Use3DEffects then - dxTLPreview.LookAndFeel := TdxLookAndFeel(ReportLink.UseSoft3D) - else - dxTLPreview.LookAndFeel := lfFlat; - - - dxTLPreview.HandleNeeded; - btnChangeFont.Enabled := IsChangeFontEnabled; - lbxFonts.Perform(LB_SETHORIZONTALEXTENT, GetMaxWidth, 0); -end; - -function TdxTLReportLinkDesignWindow.IsChangeFontEnabled: Boolean; -var - I: Integer; -begin - if ReportLink.OddEvenMode then - Result := lbxFonts.SelCount > 0 - else - begin - Result := True; - for I := 0 to lbxFonts.Items.Count - 1 do - if lbxFonts.Selected[I] and not (I in [2, 3]) then Exit; - Result := False; - end; -end; - -function TdxTLReportLinkDesignWindow.IsDisableIndex(AIndex: Integer): Boolean; -begin - Result := not ReportLink.OddEvenMode and (AIndex in [2, 3]); -end; - -procedure TdxTLReportLinkDesignWindow.DoInitialize; -begin - inherited; - with lbxFonts do - begin - Canvas.Font := Font; - ItemHeight := 1 + lbxFonts.Canvas.TextHeight('Wg') + 2; - Height := 4{border} + GetSystemMetrics(SM_CYHSCROLL) + Items.Count * ItemHeight; - end; - btnChangeFont.Top := lbxFonts.Top + lbxFonts.Height + 6; - - with ReportLink do - begin - chbxShowBands.Checked := ShowBands; - chbxShowHeaders.Checked := ShowHeaders; - chbxShowFooters.Checked := ShowFooters; - chbxShowGroupFooters.Checked := ShowRowFooters; - chbxShowPreview.Checked := ShowPreview; - chbxAutoCalcPreviewLines.Checked := AutoCalcPreviewLines; - TdxPSSpinEdit(sePreviewLineCount).Enabled := ShowPreview and not AutoCalcPreviewLines; - TdxPSSpinEdit(sePreviewLineCount).MinValue := -Byte(AutoCalcPreviewLines); - TdxPSSpinEdit(sePreviewLineCount).Value := PreviewLineCount; - - chbxShowGrid.Checked := ShowGrid; - chbxShowNodeGrid.Checked := ShowPreviewGrid; - //chbxShowGroupFooterGrid.Checked := ShowRowFooterGrid; - - chbxShowImages.Checked := ShowImages; - chbxShowStateImages.Checked := ShowStateImages; - - cbxDrawMode.ItemIndex := Integer(DrawMode); - - if OddEvenMode then - lblColor.Caption := cxGetResourceString(@sdxOddColor); - - chbxTransparent.Checked := Transparent; - chbxFixedTransparent.Checked := FixedTransparent; - - TdxPSColorCombo(ccbxColor).ColorValue := ReportLink.Color; - TdxPSColorCombo(ccbxEvenColor).ColorValue := EvenColor; - TdxPSColorCombo(ccbxPreviewColor).ColorValue := PreviewColor; - TdxPSColorCombo(ccbxBandColor).ColorValue := BandColor; - TdxPSColorCombo(ccbxHeaderColor).ColorValue := HeaderColor; - TdxPSColorCombo(ccbxGridLineColor).ColorValue := GridLineColor; - TdxPSColorCombo(ccbxGroupNodeColor).ColorValue := GroupNodeColor; - TdxPSColorCombo(ccbxRowFooterColor).ColorValue := RowFooterColor; - - TdxPSSpinEdit(seExpandLevel).Enabled := not chbxOnlySelected.Checked; - TdxPSSpinEdit(seExpandLevel).Value := ExpandLevel; - - chbxOnlySelected.Checked := OnlySelected; - chbxExtendedSelect.Checked := ExtendedSelect; - - chbxUse3DEffects.Checked := Use3DEffects; - chbxUseSoft3D.Checked := UseSoft3D; - - chbxTransparentColumnGraphic.Checked := TransparentColumnGraphics; - chbxDisplayGraphicsAsText.Checked := GraphicsAsText; - - chbxFlatCheckMarks.Checked := FlatCheckMarks; - chbxCheckMarksAsText.Checked := CheckMarksAsText; - - chbxShowExpandButtons.Checked := ShowExpandButtons; - chbxShowTreeLines.Checked := ShowTreeLines; - end; - SetupPreview; - UpdatePreview; - - lbxFonts.Invalidate; -end; - -procedure TdxTLReportLinkDesignWindow.ExpandLevelChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.ExpandLevel := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -procedure TdxTLReportLinkDesignWindow.PreviewLineCountChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PreviewLineCount := TdxPSSpinEdit(Sender).AsInteger; - Modified := True; -end; - -procedure TdxTLReportLinkDesignWindow.UpdatePreview; -var - R: TRect; -begin - inherited; - R := dxTLPreview.BoundsRect; - InflateRect(R, 1, 1); - Dec(R.Right); - if ReportLink.Use3DEffects and not ReportLink.UseSoft3D then - Dec(R.Bottom); - - dxTLPreview.BeginUpdate; - try - if ReportLink.FixedTransparent then - begin - dxTLPreview.BandColor := clWindow; - dxTLPreview.HeaderColor := clWindow; - dxTLPreview.RowFooterColor := clWindow; - dxTLPreview.GroupNodeColor := clWindow; - end - else - begin - dxTLPreview.BandColor := ReportLink.BandColor; - dxTLPreview.GroupNodeColor := ReportLink.GroupNodeColor; - dxTLPreview.HeaderColor := ReportLink.HeaderColor; - dxTLPreview.RowFooterColor := ReportLink.RowFooterColor; - end; - - if ReportLink.Transparent then - dxTLPreview.Color := clWindow - else - dxTLPreview.Color := ReportLink.Color; - - dxTLPreview.GridLineColor := ReportLink.GridLineColor; - dxTLPreview.TreeLineColor := ReportLink.TreeLineColor; - - dxTLPreview.BandFont := ReportLink.BandFont; - dxTLPreview.BandFont.Size := 8; - dxTLPreview.HeaderFont := ReportLink.HeaderFont; - dxTLPreview.HeaderFont.Size := 8; - dxTLPreview.Font := ReportLink.Font; - dxTLPreview.Font.Size := 8; - dxTLPreview.PreviewFont := ReportLink.PreviewFont; - dxTLPreview.PreviewFont.Size := 8; - - dxTLPreview.ShowGrid := ReportLink.ShowGrid; - dxTLPreview.ShowPreviewGrid := ReportLink.ShowPreviewGrid; - dxTLPreview.ShowBands := ReportLink.ShowBands; - dxTLPreview.ShowHeader := ReportLink.ShowHeaders; - dxTLPreview.ShowFooter := ReportLink.ShowFooters; - dxTLPreview.ShowRowFooter := ReportLink.ShowRowFooters; - - dxTLPreview.ShowButtons := ReportLink.ShowExpandButtons; - dxTLPreview.ShowLines := ReportLink.ShowTreeLines; - if dxTLPreview.PaintStyle = psOutlook then - begin - if ReportLink.Use3DEffects then - begin - if ReportLink.UseSoft3D then - dxTLPreview.LookAndFeel := lfFlat - else - dxTLPreview.LookAndFeel := lfStandard - end - else - dxTLPreview.LookAndFeel := lfUltraFlat;//ExposeTreeList(ReportLink.CustomTreeList).LookAndFeel; - end; - - - if ReportLink.ShowPreview then - dxTLPreview.Options := dxTLPreview.Options + [aoPreview] - else - dxTLPreview.Options := dxTLPreview.Options - [aoPreview]; - - if tlpoImages in ReportLink.Options then - dxTLPreview.Images := ilTLImages - else - dxTLPreview.Images := nil; - - if tlpoStateImages in ReportLink.Options then - dxTLPreview.StateImages := ilTLImages - else - dxTLPreview.StateImages := nil; - - dxTLPreviewColumn3.Border3D := not ReportLink.FlatCheckMarks; - finally - dxTLPreview.EndUpdate; - end; - FPreviewBox.Invalidate; -end; - -procedure TdxTLReportLinkDesignWindow.SetColorByTag(ATag: Integer; AColor: TColor); -begin - with ReportLink do - case ATag of - 0: Color := AColor; - 1: EvenColor := AColor; - 2: PreviewColor := AColor; - 3: BandColor := AColor; - 4: GroupNodeColor := AColor; - 5: HeaderColor := AColor; - 6: RowFooterColor := AColor; - 7: GridLineColor := AColor; - 8: TreeLineColor := AColor; - end; -end; - -procedure TdxTLReportLinkDesignWindow.ccbxColorChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with TdxPSColorCombo(Sender) do - SetColorByTag(Tag, ColorValue); - UpdatePreview; - Modified := True; -end; - -procedure TdxTLReportLinkDesignWindow.FontClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - if ReportLink.OddEvenMode or (lbxFonts.ItemIndex <> 2) then - DoChangeFont(lbxFonts.ItemIndex); -end; - -procedure TdxTLReportLinkDesignWindow.DoChangeFont(AIndex: Integer); -var - I: Integer; -begin - with dxPSGlbl.FontDialog do - begin - Font := GetFontByIndex(AIndex); - if Execute then - begin - for I := 0 to lbxFonts.Items.Count - 1 do - if lbxFonts.Selected[I] then - GetFontByIndex(I).Assign(Font); - - lbxFonts.Refresh; - UpdatePreview; - Modified := True; - end; - end; -end; - -procedure TdxTLReportLinkDesignWindow.btnChangeFontClick(Sender: TObject); -begin - if lbxFonts.SelCount > 0 then DoChangeFont(lbxFonts.ItemIndex); -end; - -procedure TdxTLReportLinkDesignWindow.pmChangeFontPopup(Sender: TObject); -begin - miChangeFont.Enabled := btnChangeFont.Enabled; -end; - -procedure TdxTLReportLinkDesignWindow.chbxTransparentClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - - case TCheckBox(Sender).Tag of - 0: ReportLink.Transparent := TCheckBox(Sender).checked; - 1: ReportLink.FixedTransparent := TCheckBox(Sender).checked; - end; - UpdatePreview; - Modified := True; -end; - -procedure TdxTLReportLinkDesignWindow.stTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TdxTLReportLinkDesignWindow.stFixedTransparentClick(Sender: TObject); -begin - if chbxFixedTransparent.CanFocus then ActiveControl := chbxFixedTransparent; - chbxFixedTransparent.Checked := not chbxFixedTransparent.Checked; -end; - -procedure TdxTLReportLinkDesignWindow.chbxHeadersOnEveryPageClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.HeadersOnEveryPage := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxTLReportLinkDesignWindow.chbxBandsOnEveryPageClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.BandsOnEveryPage := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxTLReportLinkDesignWindow.chbxFootersOnEveryPageClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.FootersOnEveryPage := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxTLReportLinkDesignWindow.chbxAutoNodesExpandClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.AutoNodesExpand := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxTLReportLinkDesignWindow.chbxOnlySelectedClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.OnlySelected := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxTLReportLinkDesignWindow.chbxExtendedSelectClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.ExtendedSelect := TCheckBox(Sender).Checked; - Modified := True; -end; - -procedure TdxTLReportLinkDesignWindow.lblColorClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TCustomComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxTLReportLinkDesignWindow.lblExpandLevelClick(Sender: TObject); -begin - if TLabel(Sender).FocusControl <> nil then - ActiveControl := TLabel(Sender).FocusControl; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewGetFooterCellText( - Sender: TObject; ANode: TdxTreeListNode; AColumn, AFooterIndex: Integer; - var AText: string); -begin - if AFooterIndex = -1 then - AText := Format(cxGetResourceString(@sdxCountIs), [6]) - else - AText := Format(cxGetResourceString(@sdxCountIs), [ANode.Parent.Count]); -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewGetPreviewText( - Sender: TObject; ANode: TdxTreeListNode; var AText: string); -begin - AText := GetDesignerString(Integer(ANode.Data)); -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewIsExistFooterCell( - Sender: TObject; AColumn: Integer; var AExist: Boolean); -begin - AExist := AColumn = 0; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewIsExistRowFooterCell( - Sender: TObject; ANode: TdxTreeListNode; AColumn, AFooterIndex: Integer; - var AExist: Boolean); -begin - AExist := AColumn = 0; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewIsLevelFooter(Sender: TObject; - ALevel: Integer; var AExist: Boolean); -begin - AExist := True; -end; - -procedure TdxTLReportLinkDesignWindow.FontsMouseMove(Sender: TObject; - Shift: TShiftState; X, Y: Integer); -const - FLastIndex: Integer = -1; -var - W: Integer; - S: string; - AIndex: Integer; -begin - AIndex := lbxFonts.ItemAtPos(Point(X, Y), True); - if (AIndex = -1) or (AIndex = FLastIndex) then Exit; - lbxFonts.Hint := ''; - Application.CancelHint; - S := GetFontInfoText(AIndex); - W := lbxFonts.Canvas.TextWidth(S); - if W > lbxFonts.Width - lbxFonts.Canvas.TextWidth(lbxFonts.Items[AIndex]) then - begin - lbxFonts.Hint := S; - FLastIndex := AIndex; - end; -end; - -procedure TdxTLReportLinkDesignWindow.FontsKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -var - ItemIndex: Integer; -begin - if (ReportLink.DrawMode <> tldmOddEven) and (Key in [VK_UP, VK_DOWN]) then - begin - ItemIndex := TListBox(Sender).ItemIndex; - case Key of - VK_UP: - if IsDisableIndex(ItemIndex - 1) then - while IsDisableIndex(ItemIndex - 1) do Dec(ItemIndex); - VK_DOWN: - if IsDisableIndex(ItemIndex + 1) then - while IsDisableIndex(ItemIndex + 1) do Inc(ItemIndex); - end; - TListBox(Sender).ItemIndex := ItemIndex; - end; - if (Key = VK_RETURN) and (ssCtrl in Shift) then - btnChangeFont.Click; -end; - -function TdxTLReportLinkDesignWindow.GetFontByIndex(AIndex: Integer): TFont; -begin - Result := nil; - with ReportLink do - case AIndex of - 0: Result := BandFont; - 1: Result := Font; - 2: Result := OddFont; - 3: Result := EvenFont; - 4: Result := GroupNodeFont; - 5: Result := FooterFont; - 6: Result := HeaderFont; - 7: Result := PreviewFont; - 8: Result := RowFooterFont; - end; -end; - -procedure TdxTLReportLinkDesignWindow.lbxFontsDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); - - function GetMaxLength: Integer; - var - I, V: Integer; - begin - Result := 0; - with TListBox(Control) do - for I := 0 to Items.Count - 1 do - begin - V := Canvas.TextWidth(Items[I]); - if V > Result then Result := V; - end; - Inc(Result, 8); - end; - - function GetFontColor(AIndex: Integer): TColor; - begin - if IsDisableIndex(AIndex) then - Result := ColorToRGB(clBtnFace) - else - Result := ColorToRGB(clWindowText);//GetFontByIndex(AIndex).Color; - end; - -const - FirstEntry: Boolean = True; - MaxLength: Integer = 0; -var - R: TRect; - BrushColor, FontColor: TColor; - S: string; -begin - if FirstEntry then - begin - MaxLength := GetMaxLength; - FirstEntry := False; - end; - - with TListBox(Control) do - begin - BrushColor := Canvas.Brush.Color; - if IsDisableIndex(Index) then - Canvas.Brush.Color := ColorToRGB(clWindow); - - with Rect do - R := Classes.Rect(Left, Top, Left + MaxLength, Bottom); - - FontColor := Canvas.Font.Color; - if not (odSelected in State) or IsDisableIndex(Index) then - Canvas.Font.Color := GetFontColor(Index); - - Canvas.TextRect(R, R.Left + 2, R.Top + 2, Items[Index]); - R.Left := R.Right; - Inc(R.Right); - Canvas.Brush.Color := ColorToRGB(clBtnShadow); - Canvas.FrameRect(R); - if IsDisableIndex(Index) then - Canvas.Brush.Color := ColorToRGB(clWindow) - else - Canvas.Brush.Color := BrushColor; - R.Left := R.Right; - R.Right := Rect.Right; - S := GetFontInfoText(Index); - Canvas.TextRect(R, R.Left + 2, R.Top + 2, S); - if not (odSelected in State) or IsDisableIndex(Index) then - Canvas.Font.Color := FontColor; - if (odFocused in State) and IsDisableIndex(Index) then - Canvas.DrawFocusRect(Rect); - Canvas.Brush.Color := BrushColor; - end -end; - -function TdxTLReportLinkDesignWindow.GetFontInfoText(AIndex: Integer): string; -begin - Result := FormatFontInfo(GetFontByIndex(AIndex)); -end; - -function TdxTLReportLinkDesignWindow.GetMaxWidth: Integer; -var - I, L, L2, W, W2: Integer; -begin - with lbxFonts do - begin - W := Canvas.TextWidth(Items[0] + 'X'); - for I := 1 to Items.Count - 1 do - begin - L := Canvas.TextWidth(Items[I] + 'X'); - if L > W then W := L; - end; - - W2 := Canvas.TextWidth(GetFontInfoText(0) + 'X'); - for I := 1 to Items.Count - 1 do - begin - L2 := Canvas.TextWidth(GetFontInfoText(I) + 'X'); - if L2 > W2 then W2 := L2; - end; - end; - Result := W + W2 + 2 + 8 + 3; -end; - -procedure TdxTLReportLinkDesignWindow.lbxFontsClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - UpdateControlsState; -end; - -procedure TdxTLReportLinkDesignWindow.lbxFontsDblClick(Sender: TObject); -begin - if btnChangeFont.Enabled then btnChangeFont.Click; -end; - -function TdxTLReportLinkDesignWindow.GetNodeIndex(ANode: TdxTreeListNode): Integer; -begin - if TdxTreeListAccess(ANode.Owner).PaintStyle = psOutlook then - begin - if ANode.Count > 0 then - Result := -1 - else - Result := ANode.Index - end - else - Result := ANode.AbsoluteIndex; - Inc(Result); -end; - -function TdxTLReportLinkDesignWindow.GetNodeFont(ANode: TdxTreeListNode; - ANodeIndex: Integer): TFont; -var - TreeList: TdxTreeListAccess; -begin - TreeList := TdxTreeListAccess(ANode.Owner); - with ReportLink do - if TreeList.IsRowGroup(ANode) or ((FPaintStyle = psOutLook) and (ANode.Count > 0)) then - Result := GroupNodeFont - else - if (DrawMode = tldmOddEven) and ((TreeList.PaintStyle = psStandard) or (ANode.Count = 0)) then - begin - if Odd(ANodeIndex) then - Result := OddFont - else - Result := EvenFont - end - else - Result := Font; -end; - -function TdxTLReportLinkDesignWindow.GetPreviewFont(ANode: TdxTreeListNode; - ANodeIndex: Integer): TFont; -var - TreeList: TdxTreeListAccess; -begin - TreeList := TdxTreeListAccess(ANode.Owner); - with ReportLink do - if (DrawMode = tldmOddEven) and ((TreeList.PaintStyle = psStandard) or (ANode.Count = 0)) then - begin - if Odd(ANodeIndex) then - Result := OddFont - else - Result := EvenFont - end - else - Result := PreviewFont; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewCustomDrawPreviewCell( - Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; - ASelected: Boolean; var AText: string; var AColor, ATextColor: TColor; - AFont: TFont; var ADone: Boolean); -var - AIndex: Integer; -begin - with ReportLink do - begin - AIndex := GetNodeIndex(ANode); - if not IsPreviewTransparent(ANode) then AColor := GetPreviewColor(AIndex); - AFont.Assign(GetPreviewFont(ANode, AIndex)); - AFont.Size := 8; - ATextColor := AFont.Color; - end; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewCustomDrawCell( - Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; - var AText: string; var AColor: TColor; AFont: TFont; - var AAlignment: TAlignment; var ADone: Boolean); -var - AIndex: Integer; -begin - AIndex := GetNodeIndex(ANode); - with ReportLink do - begin - if not IsCellTransparent(ANode) then - AColor := GetCellColor(ANode, AColumn.Index, AIndex); - AFont.Assign(GetNodeFont(ANode, AIndex)); - AFont.Size := 8; - end; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewColumn4CustomDrawCell( - Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; - var AText: string; var AColor: TColor; AFont: TFont; - var AAlignment: TAlignment; var ADone: Boolean); - - function GetText: string; - begin - if ANode.Values[AColumn.Index] <> -1 then - Result := ReportLink.GraphicAsTextValue - else - Result := ''; - end; - - procedure DrawImages(AImages: TCustomImageList); - var - Index: Integer; - begin - FillRectColor(ACanvas.Handle, ARect, AColor); - Index := ANode.Values[AColumn.Index]; - if Index <> -1 then - with ARect do - AImages.Draw(ACanvas, Left + (Right - Left - AImages.Width) div 2, Top + 1, Index); - end; - -begin - if ReportLink.GraphicsAsText then - DrawTextRect(ACanvas, ARect, GetText, taCenter, AColor) - else - DrawImages(TdxTreeListImageColumn(AColumn).Images); - ADone := True; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewColumn3CustomDrawCell( - Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; - var AText: string; var AColor: TColor; AFont: TFont; - var AAlignment: TAlignment; var ADone: Boolean); -begin - if ReportLink.CheckMarksAsText then - begin - DrawTextRect(ACanvas, ARect, AText, taCenter, AColor); - ADone := True; - end; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewCustomDrawColumnHeader( - Sender: TObject; AColumn: TdxTreeListColumn; ACanvas: TCanvas; - ARect: TRect; var AText: string; var AColor: TColor; AFont: TFont; - var AAlignment: TAlignment; var ASorted: TdxTreeListColumnSort; - var ADone: Boolean); -begin - DrawHeaderRect(ACanvas, ARect, AText, AAlignment, ReportLink.MakeLookAndFeel, - ReportLink.GridLineColor, AColor); - ADone := True; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewCustomDrawBand( - Sender: TObject; ABand: TdxTreeListBand; ACanvas: TCanvas; ARect: TRect; - var AText: string; var AColor: TColor; AFont: TFont; - var AAlignment: TAlignment; var ADone: Boolean); -begin - DrawHeaderRect(ACanvas, ARect, AText, AAlignment, ReportLink.MakeLookAndFeel, - ReportLink.GridLineColor, AColor); - ADone := True; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewCustomDrawFooter( - Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; var AText: string; var AColor: TColor; - AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean); - - function GetInteriorColor: TColor; - begin - with ReportLink do - if FixedTransparent then - Result := clWindow - else - Result := HeaderColor; - end; - - function GetBorderColor: TColor; - begin - with ReportLink do - if ShowGrid and ShowRowFooterGrid and not Use3DEffects then - Result := GridLineColor - else - Result := GetInteriorColor; - end; - - procedure DrawFooterFrame(ACanvas: TCanvas); - var - DrawInfo: TdxGridDrawInfo; - begin - TdxTreeList(Sender).CalcDrawInfo(DrawInfo); - try - Inc(DrawInfo.FooterRect.Top); - FillRectColor(ACanvas.Handle, DrawInfo.FooterRect, AColor); - finally - TdxTreeList(Sender).FreeDrawInfo(DrawInfo); - end; - end; - -begin - AFont.Assign(ReportLink.FooterFont); - AFont.Size := 8; - - if not ReportLink.Use3DEffects and (AColumn.Index = 0) then - DrawFooterFrame(ACanvas); - - InflateRect(ARect, 1, 1); - DrawFooterRect(ACanvas, ARect, AText, AAlignment, ReportLink.MakeLookAndFeel, - GetBorderColor, GetInteriorColor); - - ADone := True; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewCustomDrawFooterNode( - Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; - AColumn: TdxTreeListColumn; AFooterIndex: Integer; var AText: string; - var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; - var ADone: Boolean); - - function GetInteriorColor: TColor; - begin - with ReportLink do - if FixedTransparent then - Result := clWindow - else - Result := RowFooterColor; - end; - - function GetBorderColor: TColor; - begin - with ReportLink do - if ShowGrid and ShowRowFooterGrid and not Use3DEffects then - Result := GridLineColor - else - Result := GetInteriorColor; - end; - -begin - AFont.Assign(ReportLink.RowFooterFont); - AFont.Size := 8; - - InflateRect(ARect, 1, 1); - DrawFooterRect(ACanvas, ARect, AText, AAlignment, ReportLink.MakeLookAndFeel, - GetBorderColor, GetInteriorColor); - - ADone := True; -end; - -procedure TdxTLReportLinkDesignWindow.dxTLPreviewGetPreviewLineCount( - Sender: TObject; ANode: TdxTreeListNode; var LCount: Integer); -begin - if ReportLink <> nil then - if ReportLink.IsDBGridLink and (ANode.Count > 0) then - LCount := 0; -end; - -procedure TdxTLReportLinkDesignWindow.chbxShowClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - with ReportLink do - if TCheckBox(Sender).Checked then - Options := Options + [TdxTreeListPaintOption(TCheckBox(Sender).Tag)] - else - Options := Options - [TdxTreeListPaintOption(TCheckBox(Sender).Tag)]; - Modified := True; - UpdatePreview; -end; - -procedure TdxTLReportLinkDesignWindow.chbxAutoCalcPreviewLinesClick(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.PreviewLineCount := -Byte(TCheckBox(Sender).Checked); - TdxPSSpinEdit(sePreviewLineCount).MinValue := -Byte(ReportLink.AutoCalcPreviewLines); - TdxPSSpinEdit(sePreviewLineCount).Value := -Byte(ReportLink.AutoCalcPreviewLines); - Modified := True; -end; - -procedure TdxTLReportLinkDesignWindow.cbxDrawModeChange(Sender: TObject); -begin - if LockControlsUpdate then Exit; - ReportLink.DrawMode := TdxTreeListDrawMode(TComboBox(Sender).ItemIndex); - Modified := True; - UpdatePreview; -end; - -procedure TdxTLReportLinkDesignWindow.lblDrawModeClick(Sender: TObject); -begin - if TLabel(Sender).FocusControl <> nil then - begin - ActiveControl := TLabel(Sender).FocusControl; - if ActiveControl is TComboBox then - TComboBox(ActiveControl).DroppedDown := True; - end; -end; - -procedure TdxTLReportLinkDesignWindow.PageControl1Change(Sender: TObject); -begin - lblPreviewWindow.Parent := TPageControl(Sender).ActivePage; -end; - -procedure TdxTLReportLinkDesignWindow.cbxDrawModeDrawItem( - Control: TWinControl; Index: Integer; Rect: TRect; - State: TOwnerDrawState); -const - ImageIndexMap: array[TdxTreeListDrawMode] of Integer = (0, 1, 3); -begin - with TComboBox(Control) do - dxPSUtl.dxDrawComboBoxItem(Canvas, Rect, Items[Index], dxPSUtl.dxPSDrawModeImages, - ImageIndexMap[TdxTreeListDrawMode(Items.Objects[Index])], State); -end; - -procedure RegisterHelpers; -begin - TdxTreeListColumnHelper.Register; - TdxTreeListImageColumnHelper.Register; -end; - -procedure UnregisterHelpers; -begin - TdxColumnHelpersFactory.ReleaseInstance; -end; - -initialization - if not Assigned(FdxTreeListAssignDataProc) then - FdxTreeListAssignDataProc := DefaultdxTreeListAssignDataProc; - if not Assigned(FdxTreeListColumnMapperProc) then - FdxTreeListColumnMapperProc := DefaultdxTreeListMapperProc; - - RegisterHelpers; - dxPSCore.dxPSRegisterReportLink(TdxTreeListReportLink, TdxTreeList, TdxTLReportLinkDesignWindow); - FPicture := TPicture.Create; - -finalization - FreeAndNil(FPicture); - dxPSCore.dxPSUnregisterReportLink(TdxTreeListReportLink, TdxTreeList, TdxTLReportLinkDesignWindow); - UnregisterHelpers; - - @FdxTreeListAssignDataProc := nil; - @FdxTreeListColumnMapperProc := nil; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSdxTLLnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSdxTLLnkReg.pas deleted file mode 100644 index b8b6d852..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSdxTLLnkReg.pas +++ /dev/null @@ -1,87 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSdxTLLnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignEditors, - {$ELSE} - DsgnIntf, - {$ENDIF} - Classes, dxPSdxTLLnk; - -type - TdxTreeListOptionsPropertyEditor = class(TSetProperty) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - end; - -function TdxTreeListOptionsPropertyEditor.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes + [paDialog]; -end; - -procedure TdxTreeListOptionsPropertyEditor.Edit; -var - I: Integer; -begin - inherited; - if TCustomdxTreeListReportLink(GetComponent(0)).DesignReport then - begin - Designer.Modified; - if PropCount > 1 then - for I := 1 to PropCount - 1 do - GetComponent(I).Assign(GetComponent(0)); - end; -end; - -procedure Register; -begin - RegisterNoIcon([TdxTreeListReportLink]); - RegisterPropertyEditor(TypeInfo(TdxTreeListPaintOptions), TdxTreeListReportLink, 'Options', TdxTreeListOptionsPropertyEditor); -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmAutoHFTextFmt.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSfmAutoHFTextFmt.dfm deleted file mode 100644 index 41ca70e3..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmAutoHFTextFmt.dfm +++ /dev/null @@ -1,124 +0,0 @@ -object dxfmAutoText: TdxfmAutoText - Left = 467 - Top = 306 - BorderStyle = bsDialog - Caption = 'AutoText' - ClientHeight = 358 - ClientWidth = 394 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object gbxEnterAutoTextEntriesHere: TGroupBox - Left = 4 - Top = 4 - Width = 387 - Height = 317 - Caption = ' Enter A&utoText Entries Here: ' - TabOrder = 0 - object lblPreview: TLabel - Left = 9 - Top = 215 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object ToolBar: TToolBar - Left = 9 - Top = 176 - Width = 275 - Height = 30 - Align = alNone - ButtonHeight = 24 - ButtonWidth = 25 - EdgeBorders = [ebLeft, ebTop, ebRight, ebBottom] - EdgeInner = esLowered - ParentShowHint = False - ShowHint = True - TabOrder = 3 - end - object btnAdd: TButton - Left = 289 - Top = 20 - Width = 90 - Height = 23 - Caption = '&Add' - Default = True - TabOrder = 1 - OnClick = btnAddClick - end - object btnDelete: TButton - Left = 289 - Top = 47 - Width = 90 - Height = 23 - Caption = '&Delete' - TabOrder = 2 - OnClick = btnDeleteClick - end - object cbxAutoEntries: TComboBox - Left = 9 - Top = 20 - Width = 274 - Height = 154 - Style = csSimple - ItemHeight = 13 - Sorted = True - TabOrder = 0 - OnChange = NewAutoTextChange - OnClick = AutoEntriesClick - OnEnter = cbxAutoEntriesEnter - OnExit = cbxAutoEntriesExit - OnKeyDown = NewAutoTextKeyDown - end - object Panel1: TPanel - Left = 9 - Top = 231 - Width = 370 - Height = 76 - BevelOuter = bvNone - Color = clWindow - TabOrder = 4 - object pbxPreview: TPaintBox - Left = 0 - Top = 0 - Width = 370 - Height = 76 - Align = alClient - Color = clBtnFace - ParentColor = False - OnPaint = pbxPreviewPaint - end - end - end - object btnOK: TButton - Left = 146 - Top = 329 - Width = 79 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 229 - Top = 329 - Width = 79 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 312 - Top = 329 - Width = 79 - Height = 23 - Caption = '&Help' - TabOrder = 3 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmAutoHFTextFmt.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSfmAutoHFTextFmt.pas deleted file mode 100644 index da698ded..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmAutoHFTextFmt.pas +++ /dev/null @@ -1,335 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSfmAutoHFTextFmt; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - ExtCtrls, StdCtrls, ComCtrls, ToolWin, dxPSForm; - -type - TdxfmAutoText = class(TCustomdxPSForm) - gbxEnterAutoTextEntriesHere: TGroupBox; - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - ToolBar: TToolBar; - lblPreview: TLabel; - btnAdd: TButton; - btnDelete: TButton; - cbxAutoEntries: TComboBox; - Panel1: TPanel; - pbxPreview: TPaintBox; - procedure pbxPreviewPaint(Sender: TObject); - procedure AutoEntriesClick(Sender: TObject); - procedure NewAutoTextChange(Sender: TObject); - procedure NewAutoTextKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure btnAddClick(Sender: TObject); - procedure btnDeleteClick(Sender: TObject); - procedure cbxAutoEntriesExit(Sender: TObject); - procedure cbxAutoEntriesEnter(Sender: TObject); - private - FHFFunctionList: TStringList; - FilToolBar: TImageList; - function GetEntries: TStrings; - procedure SetEntries(Value: TStrings); - - procedure EnableToolbar(Value: Boolean); - procedure LoadStrings; - procedure ToolButtonClick(Sender: TObject); - procedure UpdateControlsState; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; - property Entries: TStrings read GetEntries write SetEntries; - end; - -function dxShowAutoTextDlg(AStrings: TStrings): Boolean; - -implementation - -{$R *.DFM} - -uses - {$IFDEF DELPHI7} UxTheme, Themes, {$ENDIF} Registry, cxClasses, dxPSCore, - dxPSRes, dxPSUtl, dxPsGlbl, dxPgSDlg, dxPSESys, dxPSEvnt, dxPSHFToolBarBld; - -function dxShowAutoTextDlg(AStrings: TStrings): Boolean; -var - Dialog: TdxfmAutoText; -begin - Result := False; - if AStrings = nil then Exit; - - Dialog := TdxfmAutoText.Create(nil); - with Dialog do - try - Entries := AStrings; - Result := Execute; - if Result then - AStrings.Assign(Entries); - finally - Free; - end; -end; - -{ TdxfmAutoText } - -constructor TdxfmAutoText.Create(AOwner: TComponent); -begin - HelpContext := dxhcAutoHFTextEntriesDlg; - inherited; - btnHelp.Visible := HelpContext <> 0; - if not btnHelp.Visible then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - end; - - FHFFunctionList := TStringList.Create; - dxGetHFFunctionsList(FHFFunctionList); - - FilToolBar := TImageList.Create(Self); - FilToolBar.AllocBy := FHFFunctionList.Count; - TdxPSHFToolBarBuilder.Build(ToolBar, FilToolBar, False, FHFFunctionList, nil, ToolButtonClick, nil, False); - ToolBar.Top := ((cbxAutoEntries.Top + cbxAutoEntries.Height) + - lblPreview.Top - ToolBar.Height) div 2; - ToolBar.Left := cbxAutoEntries.Left; - LoadStrings; -end; - -destructor TdxfmAutoText.Destroy; -begin - FreeAndNil(FHFFunctionList); - inherited; -end; - -function TdxfmAutoText.Execute: Boolean; -begin - UpdateControlsState; - Result := ShowModal = mrOK; -end; - -procedure TdxfmAutoText.pbxPreviewPaint(Sender: TObject); - - procedure PaintPart(ACanvas: TCanvas; const S: string; var ARect: TRect; AFormat: UINT); - begin - DrawText(ACanvas.Handle, PChar(S), Length(S), ARect, - DT_TOP or DT_NOPREFIX or AFormat); - end; - - function GetBorderColor: TColor; - {$IFDEF DELPHI7} - var - Theme: HTHEME; - C: COLORREF; - {$ENDIF} - begin - {$IFDEF DELPHI7} - if ThemeServices.ThemesEnabled then - begin - Theme := ThemeServices.Theme[teEdit]; - if Failed(UxTheme.GetThemeColor(Theme, 0, 0, TMT_BORDERCOLOR, C)) then - Result := clWindowText - else - Result := C; - end - else - Result := C; - {$ELSE} - Result := clWindowText; - {$ENDIF} - end; - -var - R, R2: TRect; - S, Part1, Part2, Part3: string; - Index: Integer; -begin - with TPaintBox(Sender) do - begin - R := ClientRect; - Canvas.Brush.Color := GetBorderColor; - Canvas.FrameRect(R); - - InflateRect(R, -1, -1); - Canvas.Brush.Color := clWindow; - Canvas.FillRect(R); - - Canvas.Brush.Style := bsClear; - Index := cbxAutoEntries.ItemIndex; - if Index > -1 then - begin - InflateRect(R, -2, -2); - - S := cbxAutoEntries.Items[Index]; - dxPgsDlg.dxPSSplitAutoHFTextEntry(S, Part1, Part2, Part3); - R2 := R; - if Part1 <> '' then - PaintPart(Canvas, dxProcessHFString(Part1), R2, DT_LEFT); - Inc(R2.Left, (R.Right - R.Left) div 3); - Dec(R2.Right, (R.Right - R.Left) div 3); - if Part2 <> '' then - PaintPart(Canvas, dxProcessHFString(Part2), R2, DT_CENTER); - OffsetRect(R2, (R.Right - R.Left) div 3, 0); - if Part3 <> '' then - PaintPart(Canvas, dxProcessHFString(Part3), R2, DT_RIGHT); - end; - end; -end; - -procedure TdxfmAutoText.AutoEntriesClick(Sender: TObject); -begin - UpdateControlState; - pbxPreview.Invalidate; -end; - -procedure TdxfmAutoText.NewAutoTextChange(Sender: TObject); -var - Index: Integer; -begin - UpdateControlsState; - Index := cbxAutoEntries.Items.IndexOf(cbxAutoEntries.Text); - if Index <> -1 then - cbxAutoEntries.ItemIndex := Index; -end; - -procedure TdxfmAutoText.NewAutoTextKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - case Key of - VK_RETURN: - begin - btnAdd.Click; - Key := 0; - end; - VK_ESCAPE: - ModalResult := mrCancel; - end; -end; - -procedure TdxfmAutoText.btnAddClick(Sender: TObject); -begin - with cbxAutoEntries do - Items.Add(Text); - cbxAutoEntries.Text := ''; - UpdateControlsState; - ActiveControl := cbxAutoEntries; -end; - -procedure TdxfmAutoText.btnDeleteClick(Sender: TObject); -var - Index: Integer; -begin - with cbxAutoEntries do - begin - Index := ItemIndex; - if Index > -1 then - begin - Items.Delete(Index); - if Index > Items.Count - 1 then - Index := Items.Count - 1; - if Index > -1 then - ItemIndex := Index; - UpdateControlsState; - end; - end; -end; - -procedure TdxfmAutoText.cbxAutoEntriesEnter(Sender: TObject); -begin - EnableToolbar(True); -end; - -procedure TdxfmAutoText.cbxAutoEntriesExit(Sender: TObject); -begin - EnableToolbar(False); -end; - -procedure TdxfmAutoText.ToolButtonClick(Sender: TObject); -begin - if ActiveControl = cbxAutoEntries then - cbxAutoEntries.SelText := FHFFunctionList[TTagToInt(TComponent(Sender).Tag)]; -end; - -function TdxfmAutoText.GetEntries: TStrings; -begin - Result := cbxAutoEntries.Items; -end; - -procedure TdxfmAutoText.SetEntries(Value: TStrings); -begin - cbxAutoEntries.Items := Value; -end; - -procedure TdxfmAutoText.EnableToolbar(Value: Boolean); -var - I: Integer; -begin - for I := 0 to ToolBar.ButtonCount - 1 do - ToolBar.Buttons[I].Enabled := Value; - ToolBar.Enabled := Value; -end; - -procedure TdxfmAutoText.LoadStrings; -begin - Caption := cxGetResourceString(@sdxAutoTextDialogCaption); - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - btnAdd.Caption := cxGetResourceString(@sdxBtnAdd); - btnDelete.Caption := cxGetResourceString(@sdxBtnDelete); - gbxEnterAutoTextEntriesHere.Caption := cxGetResourceString(@sdxEnterAutoTextEntriesHere); - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); -end; - -procedure TdxfmAutoText.UpdateControlsState; -var - S: string; - Index: Integer; -begin - S := cbxAutoEntries.Text; - Index := cbxAutoEntries.Items.IndexOf(S); - btnAdd.Enabled := (S <> '') and (Index = -1); - btnDelete.Enabled := Index > -1; -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionAdd.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionAdd.dfm deleted file mode 100644 index a2aa78c2..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionAdd.dfm +++ /dev/null @@ -1,106 +0,0 @@ -object dxfmCompositionAddItems: TdxfmCompositionAddItems - Left = 426 - Top = 382 - ActiveControl = lvItems - BorderStyle = bsDialog - Caption = 'Add Items to Composition' - ClientHeight = 381 - ClientWidth = 329 - Color = clBtnFace - Constraints.MinHeight = 250 - Constraints.MinWidth = 337 - OldCreateOrder = True - Position = poScreenCenter - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 87 - Top = 352 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 168 - Top = 352 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 249 - Top = 352 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = '&Help' - TabOrder = 3 - end - object pgctrlItems: TPageControl - Left = 5 - Top = 7 - Width = 319 - Height = 339 - ActivePage = tshItems - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - TabStop = False - object tshItems: TTabSheet - Caption = 'Available Items' - object lvItems: TListView - Left = 0 - Top = 0 - Width = 311 - Height = 280 - Align = alTop - Anchors = [akLeft, akTop, akRight, akBottom] - Columns = <> - ColumnClick = False - MultiSelect = True - ReadOnly = True - TabOrder = 0 - OnDblClick = lvItemsDblClick - end - object pnlNoItems: TPanel - Tag = 20 - Left = 19 - Top = 33 - Width = 277 - Height = 22 - BevelOuter = bvNone - Caption = 'There are no Items do Display' - Color = clWindow - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnShadow - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - TabOrder = 1 - end - object chbxHideIncludedItems: TCheckBox - Left = 2 - Top = 287 - Width = 303 - Height = 17 - Anchors = [akLeft, akRight, akBottom] - Caption = 'Hide Already Included Items' - Checked = True - State = cbChecked - TabOrder = 2 - OnClick = chbxHideIncludedItemsClick - end - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionAdd.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionAdd.pas deleted file mode 100644 index 75677a5a..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionAdd.pas +++ /dev/null @@ -1,398 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSfmCompositionAdd; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, Messages, Controls, Forms, StdCtrls, ExtCtrls, ComCtrls, - dxPSForm, dxPSCore; - -type - TdxCompositionAddItemsDlgOption = (caiShowDescription); - TdxCompositionAddItemsDlgOptions = set of TdxCompositionAddItemsDlgOption; - - TdxfmCompositionAddItems = class(TCustomdxPSForm) - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - pgctrlItems: TPageControl; - tshItems: TTabSheet; - lvItems: TListView; - pnlNoItems: TPanel; - chbxHideIncludedItems: TCheckBox; - procedure chbxHideIncludedItemsClick(Sender: TObject); - procedure lvItemsDblClick(Sender: TObject); - procedure FormResize(Sender: TObject); - private - FComposition: TdxCompositionReportLink; - FOptions: TdxCompositionAddItemsDlgOptions; - FNoItemsState: Boolean; - FSavedHideIncludedItems: Boolean; - - function GetActiveItem: TBasedxReportLink; - function GetItem(Index: Integer): TBasedxReportLink; - function GetItemCount: Integer; - function GetSelected(Index: Integer): Boolean; - function GetSelectedCount: Integer; - procedure SetSelected(Index: Integer; Value: Boolean); - - procedure GetSelection(AList: TList); - procedure Initialize; - procedure LoadStrings; - procedure RefreshColumns; - procedure RefreshList; - procedure UpdateNoItems; - - procedure CMDialogChar(var Msg: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure BeforeConstruction; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; - procedure LoadFromRegistry(const APath: string); override; - procedure SaveToRegistry(const APath: string); override; - - property ActiveItem: TBasedxReportLink read GetActiveItem; - property Composition: TdxCompositionReportLink read FComposition write FComposition; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TBasedxReportLink read GetItem; - property Selected[Index: Integer]: Boolean read GetSelected write SetSelected; - property SelectedCount: Integer read GetSelectedCount; - end; - - PdxAddItemsToCompositionDlgData = ^TdxAddItemsToCompositionDlgData; - TdxAddItemsToCompositionDlgData = record - Composition: TdxCompositionReportLink; - Items: TList; - Options: TdxCompositionAddItemsDlgOptions; - end; - -function dxShowAddItemsToCompositionDlg(var AData: TdxAddItemsToCompositionDlgData): Boolean; - -implementation - -{$R *.DFM} - -uses - Graphics, Registry, cxClasses, dxPSGlbl, dxPSUtl, dxPSRes, dxPSPopupMan; - -const - sdxHideIncludedItems = 'HideIncludedItems'; // Don't Localize - -function dxShowAddItemsToCompositionDlg(var AData: TdxAddItemsToCompositionDlgData): Boolean; -var - Dialog: TdxfmCompositionAddItems; -begin - Result := False; - if (AData.Composition = nil) or (AData.Items = nil) then Exit; - - Dialog := TdxfmCompositionAddItems.Create(nil); - try - Dialog.Composition := AData.Composition; - Dialog.FOptions := AData.Options; - Result := Dialog.Execute; - if Result then - Dialog.GetSelection(AData.Items); - finally - Dialog.Free; - end; -end; - -{ TdxfmCompositionAddItems } - -procedure TdxfmCompositionAddItems.chbxHideIncludedItemsClick(Sender: TObject); -begin - RefreshList; -end; - -procedure TdxfmCompositionAddItems.lvItemsDblClick(Sender: TObject); -begin - if SelectedCount = 1 then ModalResult := mrOK; -end; - -procedure TdxfmCompositionAddItems.FormResize(Sender: TObject); -begin - UpdateNoItems; -end; - -constructor TdxfmCompositionAddItems.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - HelpContext := dxPSGlbl.dxhcAddItemsToCompositionDlg; - RefreshColumns; - dxPSPopupMenuController.RegisterControl(lvItems); -end; - -destructor TdxfmCompositionAddItems.Destroy; -begin - dxPSPopupMenuController.UnregisterControl(lvItems); - inherited Destroy; -end; - -function TdxfmCompositionAddItems.Execute: Boolean; -begin - Initialize; - Result := (ShowModal = mrOk) and (SelectedCount <> 0); -end; - -procedure TdxfmCompositionAddItems.LoadFromRegistry(const APath: string); -begin - inherited LoadFromRegistry(APath); - dxLoadListViewColumnsFromRegistry(lvItems, APath); - with TRegistry.Create do - try - if OpenKey(APath, False) then - try - if ValueExists(sdxHideIncludedItems) then - FSavedHideIncludedItems := ReadBool(sdxHideIncludedItems); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Free; - end; -end; - -procedure TdxfmCompositionAddItems.SaveToRegistry(const APath: string); -begin - inherited SaveToRegistry(APath); - dxSaveListViewColumnsToRegistry(lvItems, APath); - with TRegistry.Create do - try - if OpenKey(APath, True) then - try - WriteBool(sdxHideIncludedItems, chbxHideIncludedItems.Checked); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Free; - end; -end; - -procedure TdxfmCompositionAddItems.BeforeConstruction; -begin - inherited BeforeConstruction; - Options := Options + [foSizeableDialog]; -end; - -function TdxfmCompositionAddItems.GetActiveItem: TBasedxReportLink; -begin - if SelectedCount = 1 then - Result := TBasedxReportLink(lvItems.Selected.Data) - else - Result := nil; -end; - -function TdxfmCompositionAddItems.GetItem(Index: Integer): TBasedxReportLink; -begin - Result := TBasedxReportLink(lvItems.Items[Index].Data); -end; - -function TdxfmCompositionAddItems.GetItemCount: Integer; -begin - Result := lvItems.Items.Count; -end; - -function TdxfmCompositionAddItems.GetSelected(Index: Integer): Boolean; -begin - Result := lvItems.Items[Index].Selected; -end; - -function TdxfmCompositionAddItems.GetSelectedCount: Integer; -begin - Result := lvItems.SelCount; -end; - -procedure TdxfmCompositionAddItems.SetSelected(Index: Integer; Value: Boolean); -begin - lvItems.Items[Index].Selected := Value; -end; - -procedure TdxfmCompositionAddItems.GetSelection(AList: TList); -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - if Selected[I] then AList.Add(Items[I]); -end; - -procedure TdxfmCompositionAddItems.Initialize; -begin - btnHelp.Visible := HelpContext <> 0; - if not btnHelp.Visible then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - end - else - BorderIcons := BorderIcons + [biHelp]; - - pnlNoItems.Parent := lvItems; - chbxHideIncludedItems.Checked := FSavedHideIncludedItems; - LoadStrings; - RefreshColumns; - RefreshList; - - FormResize(nil); -end; - -procedure TdxfmCompositionAddItems.LoadStrings; -begin - Caption := cxGetResourceString(@sdxAddItemsToComposition); - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - tshItems.Caption := cxGetResourceString(@sdxAvailableItems); - pnlNoItems.Caption := cxGetResourceString(@sdxThereAreNowItemsForShow); - chbxHideIncludedItems.Caption := cxGetResourceString(@sdxHideAlreadyIncludedItems); -end; - -procedure TdxfmCompositionAddItems.RefreshColumns; -var - ColumnWidths: array of Integer; - I: Integer; -begin - lvItems.Columns.BeginUpdate; - try - SetLength(ColumnWidths, lvItems.Columns.Count); - for I := 0 to lvItems.Columns.Count - 1 do - ColumnWidths[I] := lvItems.Columns[I].Width; - - lvItems.Columns.Clear; - with lvItems.Columns.Add do - begin - Width := 2 * (lvItems.Width - GetSystemMetrics(SM_CXHSCROLL) - 2) div 3; - Caption := cxGetResourceString(@sdxItemName); - end; - - if caiShowDescription in FOptions then - with lvItems.Columns.Add do - begin - Width := (lvItems.Width - GetSystemMetrics(SM_CXHSCROLL) - 2) div 3; - Caption := cxGetResourceString(@sdxItemDescription); - end; - - for I := 0 to Min(lvItems.Columns.Count - 1, Length(ColumnWidths) - 1) do - lvItems.Columns[I].Width := ColumnWidths[I]; - finally - lvItems.Columns.EndUpdate; - end; -end; - -procedure TdxfmCompositionAddItems.RefreshList; -const - Styles: array[Boolean] of TViewStyle = (vsReport, vsList); -var - Selection: TList; - Strings: TStrings; - I, J: Integer; -begin - Selection := TList.Create; - try - GetSelection(Selection); - lvItems.Items.BeginUpdate; - try - Strings := TStringList.Create; - try - lvItems.Items.Clear; - if (Composition <> nil) and (Composition.ComponentPrinter <> nil) then - Composition.ComponentPrinter.GetItems(Composition, Strings, chbxHideIncludedItems.Checked); - for I := 0 to Strings.Count - 1 do - with lvItems.Items.Add do - begin - Caption := Strings[I]; - Data := Strings.Objects[I]; - SubItems.Add(TBasedxReportLink(Data).Description); - end; - - for I := 0 to Selection.Count - 1 do - for J := 0 to lvItems.Items.Count - 1 do - if lvItems.Items[J].Data = Selection[I] then - begin - lvItems.Items[J].Selected := True; - Break; - end; - finally - Strings.Free; - end; - - FNoItemsState := lvItems.Items.Count = 0; - lvItems.ViewStyle := Styles[FNoItemsState]; - lvItems.Enabled := not FNoItemsState; - lvItems.HideSelection := FNoItemsState; - if (lvItems.SelCount = 0) and (lvItems.Items.Count <> 0) then - lvItems.Selected := lvItems.Items[0]; - finally - lvItems.Items.EndUpdate; - end; - finally - Selection.Free; - end; - UpdateNoItems; -end; - -procedure TdxfmCompositionAddItems.UpdateNoItems; -begin - with pnlNoItems do - begin - SetBounds(3, Height, lvItems.ClientWidth - 2 * 3, Height); - Visible := FNoItemsState; - end; -end; - -procedure TdxfmCompositionAddItems.CMDialogChar(var Msg: TCMDialogChar); -begin - inherited; - if IsAccel(Msg.CharCode, tshItems.Caption) then - begin - Msg.Result := 1; - if lvItems.CanFocus then - ActiveControl := lvItems; - end; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionDsg.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionDsg.dfm deleted file mode 100644 index f827aaac..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionDsg.dfm +++ /dev/null @@ -1,610 +0,0 @@ -object dxfmCompositionDesignWindow: TdxfmCompositionDesignWindow - Left = 380 - Top = 267 - ActiveControl = lvItems - BorderStyle = bsDialog - Caption = 'Composition Designer' - ClientHeight = 279 - ClientWidth = 454 - Color = clBtnFace - Constraints.MinHeight = 278 - Constraints.MinWidth = 462 - KeyPreview = True - OldCreateOrder = True - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - OnKeyDown = FormKeyDown - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnClose: TButton - Left = 271 - Top = 251 - Width = 86 - Height = 23 - Caption = 'Close' - ModalResult = 1 - TabOrder = 1 - end - object pcItems: TPageControl - Left = 5 - Top = 7 - Width = 444 - Height = 237 - ActivePage = tbsItems - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - TabStop = False - object tbsItems: TTabSheet - Caption = 'Items' - OnResize = tbsItemsResize - object lvItems: TListView - Left = 0 - Top = 0 - Width = 347 - Height = 209 - Align = alLeft - Anchors = [akLeft, akTop, akRight, akBottom] - Columns = <> - ColumnClick = False - DragMode = dmAutomatic - MultiSelect = True - RowSelect = True - PopupMenu = pmItems - TabOrder = 0 - ViewStyle = vsReport - OnChange = lvItemsChange - OnDblClick = DesignerClick - OnEdited = lvItemsEdited - OnEditing = lvItemsEditing - OnDragDrop = lvItemsDragDrop - OnDragOver = lvItemsDragOver - OnStartDrag = lvItemsStartDrag - end - object btnMoveDown: TButton - Left = 353 - Top = 134 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = 'Move Down' - TabOrder = 5 - OnClick = MoveDownClick - end - object btnMoveUp: TButton - Left = 353 - Top = 106 - Width = 79 - Height = 23 - Anchors = [akTop, akRight] - Caption = 'Move Up' - TabOrder = 4 - OnClick = MoveUpClick - end - object btnDesign: TButton - Left = 353 - Top = 69 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = 'Desi&gn...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = DesignerClick - end - object btnDelete: TButton - Left = 353 - Top = 32 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Delete...' - TabOrder = 2 - OnClick = DeleteClick - end - object btnAdd: TButton - Left = 353 - Top = 5 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Add...' - TabOrder = 1 - OnClick = AddClick - end - object pnlNoItems: TPanel - Left = 60 - Top = 99 - Width = 248 - Height = 23 - BevelOuter = bvNone - Caption = 'There are no Items to dispay' - Color = clWindow - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnShadow - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - TabOrder = 6 - end - end - end - object btnHelp: TButton - Left = 363 - Top = 251 - Width = 86 - Height = 23 - Caption = '&Help' - TabOrder = 2 - end - object pmItems: TPopupMenu - Images = ilItems - OnPopup = pmItemsPopup - Left = 4 - Top = 248 - object miAdd: TMenuItem - Caption = '&Add...' - ImageIndex = 1 - ShortCut = 45 - OnClick = AddClick - end - object miDelete: TMenuItem - Caption = '&Delete' - ImageIndex = 2 - ShortCut = 46 - OnClick = DeleteClick - end - object N1: TMenuItem - Caption = '-' - end - object miRename: TMenuItem - Caption = 'Rena&me' - ShortCut = 113 - OnClick = RenameClick - end - object miSelectAll: TMenuItem - Caption = 'Select All' - ShortCut = 16449 - OnClick = SelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miDesign: TMenuItem - Caption = 'Desi&gn...' - Default = True - ImageIndex = 0 - ShortCut = 16397 - OnClick = DesignerClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miMoveUp: TMenuItem - Caption = 'Move &Up' - ImageIndex = 3 - ShortCut = 16422 - OnClick = MoveUpClick - end - object miMoveDown: TMenuItem - Caption = 'Move &Down' - ImageIndex = 4 - ShortCut = 16424 - OnClick = MoveDownClick - end - end - object ilItems: TImageList - Left = 32 - Top = 248 - Bitmap = { - 494C010105000A00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000808000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080000080800000808000008080000080800000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000808000008080000080800000808000008080000080800000808000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F00000000007F7F - 7F007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F00000000000000000000000000000000000000000000000000000000000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00000000000000000000BFBFBF00BFBFBF00BFBFBF0000000000000000000000 - 000000000000000000007F7F7F0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF00BFBFBF00000000007F7F7F00BFBF - BF0000000000000000007F7F7F0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00BFBFBF007F7F7F0000000000BFBFBF007F7F7F007F7F - 7F007F7F7F007F7F7F007F7F7F0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00BFBFBF0000000000FFFFFF00FFFFFF0000000000BFBFBF000000 - 00000000000000000000000000007F7F7F00000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF000000 - 0000BFBFBF0000000000BFBFBF00BFBFBF00BFBFBF00FFFFFF007F7F7F000000 - 0000BFBFBF00BFBFBF00000000007F7F7F00000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF00BFBF - BF00FFFFFF00000000007F7F7F0000000000BFBFBF00FFFFFF007F7F7F00BFBF - BF00BFBFBF00BFBFBF00000000007F7F7F00000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000000000000000 - 0000FFFFFF00000000007F7F7F007F7F7F00BFBFBF0000000000BFBFBF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000808000008080000080800000808000008080000080800000808000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00FFFFFF00000000000000000000000000BFBFBF00BFBFBF000000 - 0000000000007F7F7F000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080000080800000808000008080000080800000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00FFFFFF00FFFFFF00BFBFBF00BFBFBF007F7F7F007F7F - 7F007F7F7F00000000007F7F7F0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF000000000000000000BFBFBF00BFBF - BF00000000007F7F7F000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000808000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00007F7F7F0000000000BFBFBF00BFBFBF00BFBFBF00000000007F7F7F000000 - 00007F7F7F00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F0000000000000000000000000000000000000000007F7F7F00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFF000000000000FFFF000000000000 - FFFF000000000000FFFF000000000000FEFF000000000000FC7F000000000000 - F83F000000000000F01F000000000000E00F000000000000C007000000000000 - F83F000000000000F83F000000000000F83F000000000000F83F000000000000 - FFFF000000000000FFFF000000000000FC7FFFFFFFFFFFFFFC27FFFFFFFFFFFF - EC23C007FFF9FFFFC401C007E7FFFFFF8001C007C3F3F83FC001C007C3E7F83F - E000C007E1C7F83F0000C007F08FF83F0000C007F81FC0070003C007FC3FE00F - E003C007F81FF01FC001C007F09FF83F8003C00FC1C7FC7FC407C01F83E3FEFF - EC3FC03F8FF1FFFFFC7FFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionDsg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionDsg.pas deleted file mode 100644 index 6f4432f9..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmCompositionDsg.pas +++ /dev/null @@ -1,735 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSfmCompositionDsg; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, Classes, Graphics, Controls, Forms, StdCtrls, ImgList, - Menus, ExtCtrls, ComCtrls, dxPSCore; - -type - TdxfmCompositionDesignWindow = class(TAbstractdxReportLinkDesignWindow) - pmItems: TPopupMenu; - miAdd: TMenuItem; - miDelete: TMenuItem; - miLine1: TMenuItem; - miMoveUp: TMenuItem; - miMoveDown: TMenuItem; - miLine2: TMenuItem; - miDesign: TMenuItem; - ilItems: TImageList; - btnClose: TButton; - pcItems: TPageControl; - tbsItems: TTabSheet; - lvItems: TListView; - btnHelp: TButton; - miRename: TMenuItem; - miSelectAll: TMenuItem; - N1: TMenuItem; - btnMoveDown: TButton; - btnMoveUp: TButton; - btnDesign: TButton; - btnDelete: TButton; - btnAdd: TButton; - pnlNoItems: TPanel; - procedure MoveUpClick(Sender: TObject); - procedure MoveDownClick(Sender: TObject); - procedure DeleteClick(Sender: TObject); - procedure DesignerClick(Sender: TObject); - procedure AddClick(Sender: TObject); - procedure pmItemsPopup(Sender: TObject); - procedure lvItemsDragDrop(Sender, Source: TObject; X, Y: Integer); - procedure lvItemsDragOver(Sender, Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); - procedure lvItemsStartDrag(Sender: TObject; var DragObject: TDragObject); - procedure lvItemsChange(Sender: TObject; Item: TListItem; Change: TItemChange); - procedure lvItemsEdited(Sender: TObject; Item: TListItem; var S: String); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure lvItemsEditing(Sender: TObject; Item: TListItem; - var AllowEdit: Boolean); - procedure RenameClick(Sender: TObject); - procedure SelectAllClick(Sender: TObject); - procedure tbsItemsResize(Sender: TObject); - procedure FormResize(Sender: TObject); - private - FIsRefreshing: Boolean; - FListViewWndProc: TWndMethod; - FSaveDragIndex: Integer; - - function GetActiveItem: TdxCompositionLinkItem; - function GetComposition: TdxCompositionReportLink; - function GetHasOnlyBuiltInsAreInSelection: Boolean; - function GetIsSelected(Index: Integer): Boolean; - function GetItem(Index: Integer): TdxCompositionLinkItem; - function GetItemCount: Integer; - function GetSelectedCount: Integer; - function GetShowDescription: Boolean; - procedure SetActiveItem(Value: TdxCompositionLinkItem); - procedure SetIsSelected(Index: Integer; Value: Boolean); - - function CanAdd: Boolean; - function CanDelete: Boolean; - function CanDesign: Boolean; - function CanEdit: Boolean; - function CanMoveDown: Boolean; - function CanMoveUp: Boolean; - function CanRename: Boolean; - function CanSelectAll: Boolean; - - procedure DeleteSelection; - function GetSelectedItemsAsString: string; - procedure MoveSelection(ADelta: Integer); - procedure RefreshColumns; - procedure RefreshList; - - procedure ListViewWndProc(var Message: TMessage); - procedure SubClassListView; - procedure UnsubClassListView; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure BeforeConstruction; override; - procedure Initialize; override; - procedure LoadStrings; override; - procedure UpdateControlsState; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure LoadFromRegistry(const APath: string); override; - procedure SaveToRegistry(const APath: string); override; - - property ActiveItem: TdxCompositionLinkItem read GetActiveItem write SetActiveItem; - property Composition: TdxCompositionReportLink read GetComposition; - property HasOnlyBuiltInsAreInSelection: Boolean read GetHasOnlyBuiltInsAreInSelection; - property IsSelected[Index: Integer]: Boolean read GetIsSelected write SetIsSelected; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TdxCompositionLinkItem read GetItem; - property SelectedCount: Integer read GetSelectedCount; - property ShowDescription: Boolean read GetShowDescription; - end; - -implementation - -{$R *.DFM} - -uses - SysUtils, CommCtrl, cxClasses, dxPSRes, dxPSGlbl, dxPSUtl, dxPSForm, - dxPSPopupMan, dxPSfmCompositionAdd; - -constructor TdxfmCompositionDesignWindow.Create(AOwner: TComponent); -begin - HelpContext := dxhcCompositionReportLinkDesigner; - inherited; - dxPSPopupMenuController.RegisterControl(lvItems); - SubClassListView; -end; - -destructor TdxfmCompositionDesignWindow.Destroy; -begin - UnsubClassListView; - dxPSPopupMenuController.UnregisterControl(lvItems); - inherited; -end; - -procedure TdxfmCompositionDesignWindow.LoadFromRegistry(const APath: string); -begin - inherited; - dxLoadListViewColumnsFromRegistry(lvItems, APath); -end; - -procedure TdxfmCompositionDesignWindow.SaveToRegistry(const APath: string); -begin - inherited; - dxSaveListViewColumnsToRegistry(lvItems, APath); -end; - -procedure TdxfmCompositionDesignWindow.FormResize(Sender: TObject); -const - BtnOffsetY = 6; -var - BtnOffsetX, RightOrigin, TopOrigin: Integer; -begin - BtnOffsetX := pcItems.Left; - RightOrigin := BtnOffsetX + pcItems.Width; - TopOrigin := pcItems.Top + pcItems.Height + BtnOffsetY; - - dxPSUtl.PlaceButtons([btnHelp, btnClose], BtnOffsetX, RightOrigin, TopOrigin); -end; - -procedure TdxfmCompositionDesignWindow.tbsItemsResize(Sender: TObject); -var - R: TRect; -begin - R := lvItems.ClientRect; - InflateRect(R, -3, -3); - with R do - begin - Top := (Bottom - Top - pnlNoItems.Height) div 2; - Bottom := Top + pnlNoItems.Height; - end; - pnlNoItems.BoundsRect := R; -end; - -procedure TdxfmCompositionDesignWindow.MoveUpClick(Sender: TObject); -begin - MoveSelection(-1); -end; - -procedure TdxfmCompositionDesignWindow.MoveDownClick(Sender: TObject); -begin - MoveSelection(1); -end; - -procedure TdxfmCompositionDesignWindow.lvItemsChange(Sender: TObject; - Item: TListItem; Change: TItemChange); -begin - if (Change = ctState) and not FIsRefreshing then - UpdateControlsState; -end; - -procedure TdxfmCompositionDesignWindow.DesignerClick(Sender: TObject); -begin - if CanDesign then - if ActiveItem.ReportLink.DesignReport then - Modified := True - else - UpdateControlsState; -end; - -procedure TdxfmCompositionDesignWindow.AddClick(Sender: TObject); -var - Data: TdxAddItemsToCompositionDlgData; - I: Integer; -begin - FillChar(Data, SizeOf(TdxAddItemsToCompositionDlgData), 0); - Data.Composition := Composition; - if ShowDescription then - Data.Options := [caiShowDescription]; - Data.Items := TList.Create; - try - if dxShowAddItemsToCompositionDlg(Data) then - begin - Modified := True; - if Data.Items.Count > 1 then Composition.Items.BeginUpdate; - try - for I := 0 to Data.Items.Count - 1 do - Composition.Items.AddLink(TBasedxReportLink(Data.Items[I])); - finally - if Data.Items.Count > 1 then Composition.Items.EndUpdate; - end; - RefreshList; - end; - finally - Data.Items.Free; - end; -end; - -procedure TdxfmCompositionDesignWindow.DeleteClick(Sender: TObject); -begin - if not lvItems.IsEditing and - MessageQuestion(Format(cxGetResourceString(@sdxConfirmDeleteItem), [GetSelectedItemsAsString])) then - DeleteSelection; -end; - -procedure TdxfmCompositionDesignWindow.RenameClick(Sender: TObject); -begin - if SelectedCount = 1 then - lvItems.Selected.EditCaption; -end; - -procedure TdxfmCompositionDesignWindow.SelectAllClick(Sender: TObject); -var - I: Integer; -begin - lvItems.Items.BeginUpdate; - try - for I := 0 to lvItems.Items.Count - 1 do - lvItems.Items[I].Selected := True; - finally - lvItems.Items.EndUpdate; - end; -end; - -procedure TdxfmCompositionDesignWindow.pmItemsPopup(Sender: TObject); -begin - miDesign.Enabled := CanDesign; - miAdd.Enabled := CanAdd; - miDelete.Enabled := CanDelete; - miRename.Enabled := CanRename; - miSelectAll.Enabled := CanSelectAll; - miMoveUp.Enabled := CanMoveUp; - miMoveDown.Enabled := CanMoveDown; -end; - -procedure TdxfmCompositionDesignWindow.lvItemsEditing(Sender: TObject; - Item: TListItem; var AllowEdit: Boolean); -begin - AllowEdit := IsDesigning or not Items[Item.Index].BuiltIn; - if AllowEdit then - lvItems.PopupMenu := nil; -end; - -procedure TdxfmCompositionDesignWindow.lvItemsEdited(Sender: TObject; - Item: TListItem; var S: string); -begin - Items[Item.Index].ReportLink.Caption := S; -end; - -procedure TdxfmCompositionDesignWindow.FormCloseQuery(Sender: TObject; - var CanClose: Boolean); -begin - CanClose := not lvItems.IsEditing; -end; - -procedure TdxfmCompositionDesignWindow.FormKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if (Key = VK_ESCAPE) or (Key = VK_RETURN) then - Close; -end; - -procedure TdxfmCompositionDesignWindow.lvItemsDragDrop(Sender, - Source: TObject; X, Y: Integer); -begin - MoveSelection(FSaveDragIndex - TListView(Sender).ItemFocused.Index); -end; - -procedure TdxfmCompositionDesignWindow.lvItemsDragOver(Sender, - Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); -var - Item: TListItem; -begin - Accept := Sender = Source; - if Accept then - begin - Item := TListView(Sender).GetItemAt(X, Y); - Accept := (Item <> nil) and (FSaveDragIndex <> TListView(Sender).ItemFocused.Index); - if Item <> nil then - FSaveDragIndex := Item.Index - else - FSaveDragIndex := -1; - end; -end; - -procedure TdxfmCompositionDesignWindow.lvItemsStartDrag(Sender: TObject; - var DragObject: TDragObject); -begin - FSaveDragIndex := -1; -end; - -procedure TdxfmCompositionDesignWindow.BeforeConstruction; -begin - inherited; - Options := Options + [foSizeableDialog]; -end; - -procedure TdxfmCompositionDesignWindow.Initialize; -begin - inherited; - btnHelp.Visible := HelpContext <> 0; - if not btnHelp.Visible then - btnClose.BoundsRect := btnHelp.BoundsRect - else - BorderIcons := BorderIcons + [biHelp]; - - RefreshColumns; - RefreshList; - pnlNoItems.Parent := lvItems; - FormResize(nil); - tbsItemsResize(nil); -end; - -procedure TdxfmCompositionDesignWindow.LoadStrings; -begin - inherited; - tbsItems.Caption := cxGetResourceString(@sdxItems); - pnlNoItems.Caption := cxGetResourceString(@sdxThereAreNowItemsForShow); - - btnDesign.Caption := cxGetResourceString(@sdxBtnDesign); - btnAdd.Caption := AddEndEllipsis(cxGetResourceString(@sdxBtnAdd)); - btnDelete.Caption := cxGetResourceString(@sdxBtnDelete); - btnMoveUp.Caption := cxGetResourceString(@sdxBtnMoveUp); - btnMoveDown.Caption := cxGetResourceString(@sdxBtnMoveDown); - btnClose.Caption := cxGetResourceString(@sdxBtnClose); - - miDesign.Caption := cxGetResourceString(@sdxBtnDesign); - miAdd.Caption := AddEndEllipsis(cxGetResourceString(@sdxBtnAdd)); - miDelete.Caption := cxGetResourceString(@sdxBtnDelete); - miRename.Caption := cxGetResourceString(@sdxRename); - miSelectAll.Caption := cxGetResourceString(@sdxSelectAll); - miMoveUp.Caption := cxGetResourceString(@sdxBtnMoveUp); - miMoveDown.Caption := cxGetResourceString(@sdxBtnMoveDown); -end; - -procedure TdxfmCompositionDesignWindow.UpdateControlsState; -begin - pnlNoItems.Visible := ItemCount = 0; - btnDesign.Enabled := CanDesign; - btnAdd.Enabled := CanAdd; - btnDelete.Enabled := CanDelete; - btnMoveUp.Enabled := CanMoveUp; - btnMoveDown.Enabled := CanMoveDown; -end; - -function TdxfmCompositionDesignWindow.GetActiveItem: TdxCompositionLinkItem; -begin - if SelectedCount = 1 then - Result := TdxCompositionLinkItem(lvItems.Selected.Data) - else - Result := nil; -end; - -function TdxfmCompositionDesignWindow.GetComposition: TdxCompositionReportLink; -begin - Result := TdxCompositionReportLink(ReportLink); -end; - -function TdxfmCompositionDesignWindow.GetHasOnlyBuiltInsAreInSelection: Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to ItemCount - 1 do - if IsSelected[I] and not Items[I].BuiltIn then - Exit; - Result := True; -end; - -function TdxfmCompositionDesignWindow.GetIsSelected(Index: Integer): Boolean; -begin - Result := lvItems.Items[Index].Selected; -end; - -function TdxfmCompositionDesignWindow.GetItem(Index: Integer): TdxCompositionLinkItem; -begin - Result := TdxCompositionLinkItem(lvItems.Items[Index].Data); -end; - -function TdxfmCompositionDesignWindow.GetItemCount: Integer; -begin - Result := lvItems.Items.Count; -end; - -function TdxfmCompositionDesignWindow.GetSelectedCount: Integer; -begin - Result := lvItems.SelCount; -end; - -function TdxfmCompositionDesignWindow.GetShowDescription: Boolean; -begin - Result := (Composition <> nil) and (coShowDescription in Composition.DesignerOptions); -end; - -procedure TdxfmCompositionDesignWindow.SetActiveItem(Value: TdxCompositionLinkItem); -var - I: Integer; - Item: TListItem; -begin - for I := 0 to lvItems.Items.Count - 1 do - begin - Item := lvItems.Items[I]; - if Item.Selected then Item.Selected := False; - end; - - Item := lvItems.FindData(0, Value, True, True); - if Item <> nil then - begin - Item.Selected := True; - Item.Focused := True; - end; -end; - -procedure TdxfmCompositionDesignWindow.SetIsSelected(Index: Integer; Value: Boolean); -begin - lvItems.Items[Index].Selected := Value; -end; - -function TdxfmCompositionDesignWindow.CanAdd: Boolean; -begin - Result := CanEdit; -end; - -function TdxfmCompositionDesignWindow.CanDelete: Boolean; -begin - Result := not lvItems.IsEditing and CanEdit and (SelectedCount <> 0) and - (IsDesigning or not HasOnlyBuiltInsAreInSelection); -end; - -function TdxfmCompositionDesignWindow.CanDesign: Boolean; -begin - Result := (SelectedCount = 1) and ActiveItem.ReportLink.CheckToDesign; -end; - -function TdxfmCompositionDesignWindow.CanEdit: Boolean; -begin - Result := (Composition <> nil) and (coCanEdit in Composition.DesignerOptions); -end; - -function TdxfmCompositionDesignWindow.CanMoveDown: Boolean; -var - I, Counter: Integer; -begin - if CanEdit then - begin - Counter := 0; - for I := ItemCount - 1 downto 0 do - begin - if not IsSelected[I] then - begin - Result := Counter < SelectedCount; - Exit; - end; - Inc(Counter); - end; - end; - Result := False; -end; - -function TdxfmCompositionDesignWindow.CanMoveUp: Boolean; -var - I: Integer; -begin - if CanEdit then - for I := 0 to ItemCount - 1 do - if not IsSelected[I] then - begin - Result := I < SelectedCount; - Exit; - end; - Result := False; -end; - -function TdxfmCompositionDesignWindow.CanRename: Boolean; -begin - Result := (SelectedCount = 1) and (IsDesigning or not ActiveItem.BuiltIn); -end; - -function TdxfmCompositionDesignWindow.CanSelectAll: Boolean; -begin - Result := (ItemCount <> 0) and (SelectedCount <> ItemCount); -end; - -procedure TdxfmCompositionDesignWindow.DeleteSelection; -var - SelCount, I: Integer; -begin - SelCount := SelectedCount; - if SelCount > 1 then Composition.Items.BeginUpdate; - try - for I := 0 to ItemCount - 1 do - if IsSelected[I] and (IsDesigning or not Items[I].BuiltIn) then - TObject(lvItems.Items[I].Data).Free; - finally - if SelCount > 1 then Composition.Items.EndUpdate; - end; - RefreshList; - Modified := True; -end; - -function TdxfmCompositionDesignWindow.GetSelectedItemsAsString: string; -var - I: Integer; -begin - Result := ''; - for I := 0 to ItemCount - 1 do - if IsSelected[I] and (IsDesigning or not Items[I].BuiltIn) then - begin - if Result <> '' then - Result := Result + ', '; - Result := Result + '"' + lvItems.Items[I].Caption + '"'; - end; -end; - -procedure TdxfmCompositionDesignWindow.MoveSelection(ADelta: Integer); - - procedure MoveDown(ADelta: Integer); - var - I, Index: Integer; - begin - for I := ItemCount - 1 downto 0 do - if IsSelected[I] then - begin - Index := Items[I].Index; - Inc(Index, ADelta); - if Index > ItemCount - 1 then Index := ItemCount - 1; -// while (Index < ItemCount) and IsSelected[Index] do Inc(Index); - Items[I].Index := Index; - end; - end; - - procedure MoveUp(ADelta: Integer); - var - I, Index: Integer; - begin - for I := 0 to ItemCount - 1 do - if IsSelected[I] then - begin - Index := Items[I].Index; - Inc(Index, ADelta); - if Index < 0 then Index := 0; -// while (Index > -1) and IsSelected[Index] do Dec(Index); - Items[I].Index := Index; - end; - end; - -begin - Composition.Items.BeginUpdate; - try - if ADelta > 0 then - MoveDown(ADelta) - else - MoveUp(ADelta); - finally - Composition.Items.EndUpdate; - end; - RefreshList; -end; - -procedure TdxfmCompositionDesignWindow.RefreshColumns; -var - ColumnWidths: array of Integer; - I: Integer; -begin - lvItems.Columns.BeginUpdate; - try - SetLength(ColumnWidths, lvItems.Columns.Count); - for I := 0 to lvItems.Columns.Count - 1 do - ColumnWidths[I] := lvItems.Columns[I].Width; - - lvItems.Columns.Clear; - with lvItems.Columns.Add do - begin - Width := 2 * //+ Ord(not(coShowDescription in Composition.DesignerOptions))) * - (lvItems.Width - GetSystemMetrics(SM_CXHSCROLL)) div 3 - 3; - Caption := cxGetResourceString(@sdxItemName); - end; - - if coShowDescription in Composition.DesignerOptions then - with lvItems.Columns.Add do - begin - Width := (lvItems.Width - GetSystemMetrics(SM_CXHSCROLL)) div 3 - 3; - Caption := cxGetResourceString(@sdxItemDescription); - end; - - for I := 0 to Min(lvItems.Columns.Count - 1, Length(ColumnWidths) - 1) do - lvItems.Columns[I].Width := ColumnWidths[I]; - finally - lvItems.Columns.EndUpdate; - end; -end; - -procedure TdxfmCompositionDesignWindow.RefreshList; -const - Styles: array[Boolean] of TViewStyle = (vsReport, vsList); -var - Selection: TList; - I: Integer; - Strings: TStrings; -begin - lvItems.Items.BeginUpdate; - FIsRefreshing := True; - try - Selection := TList.Create; - try - dxSaveListViewSelection(lvItems, Selection); - Strings := TStringList.Create; - try - lvItems.Items.Clear; - if Composition <> nil then - Composition.GetItems(Strings, True); - - for I := 0 to Strings.Count - 1 do - with lvItems.Items.Add do - begin - Caption := Strings[I]; - Data := Strings.Objects[I]; - SubItems.Add(TdxCompositionLinkItem(Data).ReportLink.Description); - end; - finally - Strings.Free; - end; - dxRestoreListViewSelection(lvItems, Selection); - finally - Selection.Free; - end; - - lvItems.ViewStyle := Styles[ItemCount = 0]; -// lvItems.Enabled := not FNoItemsState; - lvItems.HideSelection := ItemCount = 0; - if (lvItems.SelCount = 0) and (ItemCount <> 0) then - lvItems.Selected := lvItems.Items[0]; - finally - FIsRefreshing := False; - lvItems.Items.EndUpdate; - end; - UpdateControlsState; - lvItems.Refresh; -end; - -procedure TdxfmCompositionDesignWindow.ListViewWndProc(var Message: TMessage); -begin - FListViewWndProc(Message); - if Message.Msg = CN_NOTIFY then - if TWMNotify(Message).NMHdr^.Code = LVN_ENDLABELEDIT then - lvItems.PopupMenu := pmItems; -end; - -procedure TdxfmCompositionDesignWindow.SubClassListView; -begin - lvItems.HandleNeeded; - FListViewWndProc := lvItems.WindowProc; - lvItems.WindowProc := ListViewWndProc; -end; - -procedure TdxfmCompositionDesignWindow.UnsubClassListView; -begin - lvItems.WindowProc := FListViewWndProc; -end; - -procedure TdxfmCompositionDesignWindow.CMDialogChar(var Message: TCMDialogChar); -begin - inherited; - if IsAccel(Message.CharCode, tbsItems.Caption) then - begin - Message.Result := 1; - if lvItems.Enabled then ActiveControl := lvItems; - end; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdd.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdd.dfm deleted file mode 100644 index 44912ee3..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdd.dfm +++ /dev/null @@ -1,496 +0,0 @@ -object dxfmAddComponent: TdxfmAddComponent - Left = 675 - Top = 331 - BorderStyle = bsDialog - ClientHeight = 457 - ClientWidth = 392 - Color = clBtnFace - Constraints.MinHeight = 400 - Constraints.MinWidth = 400 - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000000000000000000000FFFFFFFFF0000000F - FFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000F - FFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000FFFFFF0000000000F - FFFFF0F00000000FFFFFF000000000000000000000000000000000000000FFFF - 0000FFFF0000C0070000C0070000C0070000C0070000C0070000C0070000C007 - 0000C0070000C0070000C0070000C00F0000C01F0000C03F0000FFFF0000} - OldCreateOrder = True - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - OnCreate = FormCreate - OnDestroy = FormDestroy - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlHost: TPanel - Left = 6 - Top = 5 - Width = 380 - Height = 417 - Anchors = [akLeft, akTop, akRight, akBottom] - BevelOuter = bvNone - TabOrder = 4 - object pgctrlItems: TPageControl - Left = 0 - Top = 104 - Width = 380 - Height = 313 - ActivePage = tbsItems - Align = alClient - TabOrder = 4 - TabStop = False - object tbsItems: TTabSheet - Caption = '&Available Components' - object pnlBottomHost: TPanel - Left = 0 - Top = 211 - Width = 372 - Height = 74 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object bvlOnlyUnLinked: TBevel - Left = 0 - Top = 50 - Width = 372 - Height = 24 - Align = alTop - Shape = bsSpacer - end - object bvlHideCustomContainers: TBevel - Left = 0 - Top = 0 - Width = 372 - Height = 26 - Align = alTop - Shape = bsSpacer - end - object bvlOnlyInCurrentModule: TBevel - Left = 0 - Top = 26 - Width = 372 - Height = 24 - Align = alTop - Shape = bsSpacer - end - object chbxOnlyUnLinked: TCheckBox - Left = 7 - Top = 53 - Width = 253 - Height = 17 - Caption = 'Only Components &without Existing ReportLinks' - TabOrder = 2 - OnClick = chbxClick - end - object chbxOnlyInCurrentModule: TCheckBox - Left = 7 - Top = 29 - Width = 258 - Height = 17 - Caption = 'Only Components in the Active &Form' - TabOrder = 1 - OnClick = chbxClick - end - object chbxHideCustomContainers: TCheckBox - Left = 7 - Top = 5 - Width = 253 - Height = 17 - Caption = 'Hide Custom Containers' - TabOrder = 0 - OnClick = chbxClick - end - end - object lvItems: TListView - Left = 0 - Top = 0 - Width = 372 - Height = 211 - Align = alClient - Columns = <> - HideSelection = False - MultiSelect = True - ReadOnly = True - RowSelect = True - PopupMenu = pmItems - TabOrder = 0 - ViewStyle = vsReport - OnChange = lvItemsChange - OnColumnClick = lvItemsColumnClick - OnCompare = lvItemsCompare - OnDblClick = lvItemsDblClick - end - object pnlNoItems: TPanel - Left = 48 - Top = 72 - Width = 266 - Height = 22 - BevelOuter = bvNone - Caption = 'There are no Items in this View' - Color = clWindow - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnShadow - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - TabOrder = 2 - end - end - end - object pnlNameHost: TPanel - Left = 0 - Top = 0 - Width = 380 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblName: TLabel - Left = 6 - Top = 8 - Width = 31 - Height = 13 - Caption = '&Name:' - FocusControl = edName - end - object edName: TEdit - Left = 55 - Top = 5 - Width = 230 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - end - object pnlCreatorHost: TPanel - Left = 0 - Top = 60 - Width = 380 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object lblCreator: TLabel - Left = 6 - Top = 10 - Width = 41 - Height = 13 - Caption = 'Creato&r:' - FocusControl = edCreator - end - object edCreator: TEdit - Left = 55 - Top = 6 - Width = 230 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - object btnDescription: TButton - Left = 294 - Top = 6 - Width = 83 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Description...' - TabOrder = 1 - OnClick = btnDescriptionClick - end - end - object pnlSeparatorHost: TPanel - Left = 0 - Top = 90 - Width = 380 - Height = 14 - Align = alTop - BevelOuter = bvNone - TabOrder = 3 - object bvlSeparator: TBevel - Left = 0 - Top = 0 - Width = 380 - Height = 4 - Align = alTop - Shape = bsBottomLine - end - end - object pnlCaptionHost: TPanel - Left = 0 - Top = 30 - Width = 380 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblCaption: TLabel - Left = 6 - Top = 9 - Width = 41 - Height = 13 - Caption = '&Caption:' - FocusControl = edCaption - end - object edCaption: TEdit - Left = 55 - Top = 5 - Width = 230 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - end - end - object btnOK: TButton - Left = 68 - Top = 429 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 0 - end - object btnCancel: TButton - Left = 149 - Top = 429 - Width = 75 - Height = 23 - Cancel = True - Caption = 'OK' - ModalResult = 2 - TabOrder = 1 - end - object btnHelp: TButton - Left = 311 - Top = 429 - Width = 75 - Height = 23 - Caption = 'OK' - TabOrder = 3 - end - object btnDesign: TButton - Left = 230 - Top = 429 - Width = 75 - Height = 23 - Caption = 'OK' - TabOrder = 2 - OnClick = btnDesignClick - end - object ilItems: TImageList - AllocBy = 3 - Left = 2 - Top = 427 - Bitmap = { - 494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000001000000001002000000000000010 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F00000000007F7F - 7F007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F00000000000000000000000000000000000000000000000000000000000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00000000000000000000BFBFBF00BFBFBF00BFBFBF0000000000000000000000 - 000000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF00BFBFBF00000000007F7F7F00BFBF - BF0000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00BFBFBF007F7F7F0000000000BFBFBF007F7F7F007F7F - 7F007F7F7F007F7F7F007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00BFBFBF0000000000FFFFFF00FFFFFF0000000000BFBFBF000000 - 00000000000000000000000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF000000 - 0000BFBFBF0000000000BFBFBF00BFBFBF00BFBFBF00FFFFFF007F7F7F000000 - 0000BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF00BFBF - BF00FFFFFF00000000007F7F7F0000000000BFBFBF00FFFFFF007F7F7F00BFBF - BF00BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000000000000000 - 0000FFFFFF00000000007F7F7F007F7F7F00BFBFBF0000000000BFBFBF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00FFFFFF00000000000000000000000000BFBFBF00BFBFBF000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00FFFFFF00FFFFFF00BFBFBF00BFBFBF007F7F7F007F7F - 7F007F7F7F00000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF000000000000000000BFBFBF00BFBF - BF00000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00007F7F7F0000000000BFBFBF00BFBFBF00BFBFBF00000000007F7F7F000000 - 00007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F0000000000000000000000000000000000000000007F7F7F00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000100000000100010000000000800000000000000000000000 - 000000000000000000000000FFFFFF00FC7F000000000000FC27000000000000 - EC23000000000000C4010000000000008001000000000000C001000000000000 - E000000000000000000000000000000000000000000000000003000000000000 - E003000000000000C0010000000000008003000000000000C407000000000000 - EC3F000000000000FC7F00000000000000000000000000000000000000000000 - 000000000000} - end - object pmItems: TPopupMenu - Images = ilItems - OnPopup = pmItemsPopup - Left = 30 - Top = 427 - object miAdd: TMenuItem - Caption = '&Add' - Default = True - OnClick = lvItemsDblClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miDesign: TMenuItem - Caption = 'Add and D&esign Report...' - ImageIndex = 0 - OnClick = btnDesignClick - end - end - object ilColumns: TImageList - AllocBy = 2 - Height = 8 - Width = 8 - Left = 58 - Top = 427 - Bitmap = { - 494C010102000400040008000800FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000200000000800000001002000000000000004 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000000000000000000000000000000000008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800000000000000000000000000000000000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000808080000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000020000000080000000100010000000000200000000000000000000000 - 000000000000000000000000FFFFFF00FFFF0000FFFF000080F70000C1E30000 - E3C10000F7800000FFFF0000FFFF000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdd.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdd.pas deleted file mode 100644 index 45a19d68..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdd.pas +++ /dev/null @@ -1,912 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSfmLnkAdd; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Registry, - ExtCtrls, StdCtrls, ComCtrls, Menus, ImgList, dxPSForm, dxPSCompsProvider, - dxPSCore; - -type - TSortOrder = (soNone, soUp, soDown); - - TdxAddReportLinkDlgDataOption = (adoShowDesignButton, adoShowDescriptionColumn, - adoShowOnlyComponentsWOLinks, adoShowOnlyComponentsInActiveForm, - adoAllowMultiSelect, adoShowNameEdit, adoShowCaptionEdit, - adoShowHideCustomContainers, adoShowCreatorEdit); - TdxAddReportLinkDlgDataOptions = set of TdxAddReportLinkDlgDataOption; - - TdxfmAddComponent = class(TCustomdxPSForm) - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - btnDesign: TButton; - ilItems: TImageList; - pmItems: TPopupMenu; - miAdd: TMenuItem; - miLine1: TMenuItem; - miDesign: TMenuItem; - pnlHost: TPanel; - pgctrlItems: TPageControl; - tbsItems: TTabSheet; - pnlBottomHost: TPanel; - chbxOnlyUnLinked: TCheckBox; - chbxOnlyInCurrentModule: TCheckBox; - lvItems: TListView; - pnlNoItems: TPanel; - pnlNameHost: TPanel; - pnlCreatorHost: TPanel; - lblName: TLabel; - edName: TEdit; - lblCreator: TLabel; - edCreator: TEdit; - pnlSeparatorHost: TPanel; - bvlSeparator: TBevel; - chbxHideCustomContainers: TCheckBox; - bvlOnlyUnLinked: TBevel; - bvlHideCustomContainers: TBevel; - bvlOnlyInCurrentModule: TBevel; - btnDescription: TButton; - pnlCaptionHost: TPanel; - lblCaption: TLabel; - edCaption: TEdit; - ilColumns: TImageList; - procedure chbxClick(Sender: TObject); - procedure btnDesignClick(Sender: TObject); - procedure lvItemsDblClick(Sender: TObject); - procedure pmItemsPopup(Sender: TObject); - procedure FormResize(Sender: TObject); - procedure lvItemsChange(Sender: TObject; Item: TListItem; Change: TItemChange); - procedure btnDescriptionClick(Sender: TObject); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure lvItemsColumnClick(Sender: TObject; Column: TListColumn); - procedure lvItemsCompare(Sender: TObject; Item1, Item2: TListItem; - Data: Integer; var Compare: Integer); - procedure FormCreate(Sender: TObject); - procedure FormDestroy(Sender: TObject); - private - FComponentPrinter: TdxComponentPrinter; - FDesignBtnPressed: Boolean; - FOptions: TdxAddReportLinkDlgDataOptions; - FOriginalReportLinkName: string; - FReportLink: TBasedxReportLink; - FPrevListViewWndProc: TWndMethod; - FReportLinkDescription: string; - FSortedColumnIndex: Integer; - FSortOrder: TSortOrder; - function GetItemCount: Integer; - function GetListViewHeader: HWND; - function GetReportLinkCaption: string; - function GetReportLinkCreator: string; - function GetReportLinkName: string; - function GetSelectedComponent: TComponent; - procedure GetSelection(AList: TList); - procedure SetReportLinkCaption(const Value: string); - procedure SetReportLinkCreator(const Value: string); - procedure SetReportLinkName(const Value: string); - - procedure AssignListViewHeaderImages; - procedure ListViewWndProc(var Message: TMessage); - procedure RestoreListViewWndProc; - procedure SubstituteListViewWndProc; - - function CanEditName: Boolean; - function CanDesign: Boolean; - function CanSelect: Boolean; - function CheckUserInput: Boolean; - procedure ClearList; - procedure Initialize; - procedure LoadStrings; - function PreparedOptions: TdxPSGetComponentOptions; - procedure RefreshColumns; - procedure RefreshList; - procedure RefreshSorting; - procedure SetActiveControl; - procedure SetColumnSortMark(AIndex: Integer; ASortOrder: TSortOrder); - procedure SortColumn(Column: TListColumn; ASortOrder: TSortOrder); - procedure UpdateControlsState; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure CreateWnd; override; - procedure BeforeConstruction; override; - - procedure LoadComponentState(const APath: string); - procedure LoadListViewSorting(const APath: string); - procedure SaveComponentState(const APath: string); - procedure SaveListViewSorting(const APath: string); - - property ListViewHeader: HWND read GetListViewHeader; - public - function Execute: Boolean; - procedure LoadFromRegistry(const APath: string); override; - procedure SaveToRegistry(const APath: string); override; - - property ItemCount: Integer read GetItemCount; - property OriginalReportLinkName: string read FOriginalReportLinkName write FOriginalReportLinkName; - property ReportLinkCaption: string read GetReportLinkCaption write SetReportLinkCaption; - property ReportLinkCreator: string read GetReportLinkCreator write SetReportLinkCreator; - property ReportLinkDescription: string read FReportLinkDescription write FReportLinkDescription; - property ReportLinkName: string read GetReportLinkName write SetReportLinkName; - property SelectedComponent: TComponent read GetSelectedComponent; - end; - - PdxAddReportLinkDlgData = ^TdxAddReportLinkDlgData; - TdxAddReportLinkDlgData = record - Components: TList; - ComponentPrinter: TdxComponentPrinter; - ReportLink: TBasedxReportLink; - ReportLinkName: string; - ReportLinkCaption: string; - ReportLinkCreator: string; - ReportLinkDescription: string; - Options: TdxAddReportLinkDlgDataOptions; - DesignBtnPressed: Boolean; - Title: string; - end; - -function dxShowAddComponentsDlg(var AData: TdxAddReportLinkDlgData): Boolean; - -implementation - -{$R *.DFM} - -uses - CommCtrl, cxClasses, dxPSRes, dxPSUtl, dxPSGlbl, dxPSPopupMan, dxPSfmEditDesc; - -const - sdxOnlyWithoutLinks = 'OnlyWithoutLinks'; // Don't Localize - sdxOnlyInCurrentModule = 'OnlyInCurrentModule'; // Don't Localize - sdxHideCustomContainers_ = 'HideCustomContainers'; // Don't Localize - sdxSortedColumnIndex = 'SortedColumnIndex'; // Don't Localize - sdxSortOrder = 'SortOrder'; // Don't Localize - -function dxShowAddComponentsDlg(var AData: TdxAddReportLinkDlgData): Boolean; -var - Dialog: TdxfmAddComponent; -begin - Result := False; - if AData.Components = nil then Exit; - - Dialog := TdxfmAddComponent.Create(nil); - try - Dialog.FOptions := AData.Options; - Dialog.FComponentPrinter := AData.ComponentPrinter; - Dialog.FReportLink := AData.ReportLink; - Dialog.ReportLinkName := AData.ReportLinkName; - Dialog.OriginalReportLinkName := Dialog.ReportLinkName; - Dialog.ReportLinkCaption := AData.ReportLinkCaption; - Dialog.ReportLinkCreator := AData.ReportLinkCreator; - Dialog.ReportLinkDescription := AData.ReportLinkDescription; - if AData.Title <> '' then - Dialog.Caption := AData.Title; - - Result := Dialog.Execute; - - if Result then - begin - Dialog.GetSelection(AData.Components); - AData.DesignBtnPressed := Dialog.FDesignBtnPressed; - if Dialog.SelectedComponent <> nil then - AData.ReportLinkName := Dialog.ReportLinkName; - AData.ReportLinkCaption := Dialog.ReportLinkCaption; - AData.ReportLinkCreator := Dialog.ReportLinkCreator; - AData.ReportLinkDescription := Dialog.ReportLinkDescription; - end; - finally - Dialog.Free; - end; -end; - -{ TdxfmAddComponent } - -procedure TdxfmAddComponent.FormCreate(Sender: TObject); -begin - FSortedColumnIndex := -1; - HelpContext := dxPSGlbl.dxhcAddLinkDlg; - Application.MainForm.Caption := Caption; - SubstituteListViewWndProc; - AssignListViewHeaderImages; - dxPSPopupMenuController.RegisterControl(lvItems); -end; - -procedure TdxfmAddComponent.FormDestroy(Sender: TObject); -begin - dxPSPopupMenuController.UnregisterControl(lvItems); - RestoreListViewWndProc; - ClearList; -end; - -procedure TdxfmAddComponent.FormResize(Sender: TObject); -const - BtnOffsetY = 6; - Offset = 3; -var - BtnOffsetX, RightOrigin, TopOrigin: Integer; -begin - BtnOffsetX := pnlHost.Left; - RightOrigin := BtnOffsetX + pnlHost.Width; - TopOrigin := pnlHost.Top + pnlHost.Height + BtnOffsetY; - - dxPSUtl.PlaceButtons([btnHelp, btnDesign, btnCancel, btnOK], BtnOffsetX, RightOrigin, TopOrigin); - with pnlNoItems do - begin - Left := Offset; - Top := (lvItems.ClientHeight - Height) div 2; - Width := lvItems.ClientWidth - 2 * Offset; - end; -end; - -procedure TdxfmAddComponent.chbxClick(Sender: TObject); -begin - RefreshList; - RefreshSorting; -end; - -procedure TdxfmAddComponent.btnDesignClick(Sender: TObject); -begin - FDesignBtnPressed := True; - ModalResult := mrOk; -end; - -procedure TdxfmAddComponent.lvItemsChange(Sender: TObject; Item: TListItem; - Change: TItemChange); -begin - if Change = ctState then UpdateControlsState; -end; - -procedure TdxfmAddComponent.btnDescriptionClick(Sender: TObject); -var - S: string; -begin - S := ReportLinkDescription; - if dxEditDescriptionDlg(S) then - ReportLinkDescription := S; -end; - -procedure TdxfmAddComponent.FormCloseQuery(Sender: TObject; - var CanClose: Boolean); -begin - if ModalResult = mrOK then - CanClose := CheckUserInput; -end; - -procedure TdxfmAddComponent.lvItemsColumnClick(Sender: TObject; - Column: TListColumn); -const - SortOrderToggleMap: array[TSortOrder] of TSortOrder = (soUp, soDown, soUp); -var - KeyboardState: TKeyboardState; -begin - Windows.GetKeyboardState(KeyboardState); - if KeyboardState[VK_CONTROL] and $80 <> 0 then - if FSortedColumnIndex <> -1 then - begin - RefreshList; - SetColumnSortMark(FSortedColumnIndex, soNone); - FSortOrder := soNone; - FSortedColumnIndex := -1; - end - else - else - begin - FSortOrder := SortOrderToggleMap[FSortOrder]; - SortColumn(Column, FSortOrder); - end; -end; - -procedure TdxfmAddComponent.lvItemsCompare(Sender: TObject; Item1, Item2: TListItem; - Data: Integer; var Compare: Integer); -begin - if Data = 0 then - Compare := CompareText(Item1.Caption, Item2.Caption) - else - Compare := CompareText(Item1.SubItems[Data - 1], Item2.SubItems[Data - 1]); - - if FSortOrder = soUp then - Compare := -Compare; -end; - -procedure TdxfmAddComponent.lvItemsDblClick(Sender: TObject); -begin - ModalResult := mrOk; -end; - -procedure TdxfmAddComponent.pmItemsPopup(Sender: TObject); -begin - miAdd.Enabled := CanSelect; - miDesign.Enabled := CanDesign; - miDesign.Visible := adoShowDesignButton in FOptions; - miLine1.Visible := miDesign.Visible; -end; - -function TdxfmAddComponent.Execute: Boolean; -begin - Initialize; - Result := ShowModal = mrOk; -end; - -procedure TdxfmAddComponent.LoadFromRegistry(const APath: string); -begin - inherited; - dxLoadListViewColumnsFromRegistry(lvItems, APath); - LoadComponentState(APath); - LoadListViewSorting(APath + '\' + lvItems.Name); -end; - -procedure TdxfmAddComponent.SaveToRegistry(const APath: string); -begin - inherited; - dxSaveListViewColumnsToRegistry(lvItems, APath); - SaveComponentState(APath); - SaveListViewSorting(APath + '\' + lvItems.Name); -end; - -procedure TdxfmAddComponent.CreateWnd; -begin - inherited; - SendMessage(Handle, WM_SETICON, 1, Icon.Handle); -end; - -procedure TdxfmAddComponent.BeforeConstruction; -begin - inherited; - Options := Options + [foSizeableDialog]; -end; - -procedure TdxfmAddComponent.LoadComponentState(const APath: string); -var - Registry: TRegistry; -begin - Registry := TRegistry.Create; - try - if Registry.OpenKey(APath, False) then - try - if Registry.ValueExists(sdxOnlyWithoutLinks) then - chbxOnlyUnLinked.Checked := Registry.ReadBool(sdxOnlyWithoutLinks); - if Registry.ValueExists(sdxOnlyInCurrentModule) then - chbxOnlyInCurrentModule.Checked := Registry.ReadBool(sdxOnlyInCurrentModule); - if Registry.ValueExists(sdxHideCustomContainers_) then - chbxHideCustomContainers.Checked := Registry.ReadBool(sdxHideCustomContainers_); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Registry.Free; - end; -end; - -procedure TdxfmAddComponent.LoadListViewSorting(const APath: string); -begin - with TRegistry.Create do - try - if OpenKey(APath, False) then - try - if ValueExists(sdxSortedColumnIndex) then - FSortedColumnIndex := ReadInteger(sdxSortedColumnIndex); - if ValueExists(sdxSortOrder) then - FSortOrder := TSortOrder(ReadInteger(sdxSortOrder)); - except - end; - finally - Free; - end; -end; - -procedure TdxfmAddComponent.SaveListViewSorting(const APath: string); -begin - with TRegistry.Create do - try - if OpenKey(APath, True) then - begin - WriteInteger(sdxSortedColumnIndex, FSortedColumnIndex); - WriteInteger(sdxSortOrder, Integer(FSortOrder)); - end; - finally - Free; - end; -end; - -procedure TdxfmAddComponent.SaveComponentState(const APath: string); -var - Registry: TRegistry; -begin - Registry := TRegistry.Create; - try - if Registry.OpenKey(APath, True) then - try - Registry.WriteBool(sdxOnlyWithoutLinks, chbxOnlyUnLinked.Checked); - Registry.WriteBool(sdxOnlyInCurrentModule, chbxOnlyInCurrentModule.Checked); - Registry.WriteBool(sdxHideCustomContainers_, chbxHideCustomContainers.Checked); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Registry.Free; - end; -end; - -function TdxfmAddComponent.GetItemCount: Integer; -begin - Result := lvItems.Items.Count; -end; - -function TdxfmAddComponent.GetListViewHeader: HWND; -begin - lvItems.HandleNeeded; - if lvItems.HandleAllocated then - Result := ListView_GetHeader(lvItems.Handle) - else - Result := 0; -end; - -function TdxfmAddComponent.GetReportLinkCaption: string; -begin - Result := edCaption.Text; -end; - -function TdxfmAddComponent.GetReportLinkCreator: string; -begin - Result := edCreator.Text; -end; - -function TdxfmAddComponent.GetReportLinkName: string; -begin - Result := edName.Text; -end; - -function TdxfmAddComponent.GetSelectedComponent: TComponent; -begin - if lvItems.SelCount = 1 then - Result := TdxComponentItem(lvItems.Selected.Data).Component - else - Result := nil; -end; - -procedure TdxfmAddComponent.GetSelection(AList: TList); -var - I: Integer; -begin - with lvItems do - begin - for I := 0 to Items.Count - 1 do - if Items[I].Selected then - AList.Add(TdxComponentItem(Items[I].Data).Component); - end; -end; - -procedure TdxfmAddComponent.SetReportLinkCaption(const Value: string); -begin - edCaption.Text := Value; -end; - -procedure TdxfmAddComponent.SetReportLinkCreator(const Value: string); -begin - edCreator.Text := Value; -end; - -procedure TdxfmAddComponent.SetReportLinkName(const Value: string); -begin - edName.Text := Value; -end; - -procedure TdxfmAddComponent.AssignListViewHeaderImages; -var - Header: HWND; -begin - Header := ListViewHeader; - if IsWindow(Header) and not IsWindow(Header_GetImageList(Header)) then - Header_SetImageList(Header, ilColumns.Handle); -end; - -procedure TdxfmAddComponent.ListViewWndProc(var Message: TMessage); -begin - FPrevListViewWndProc(Message); - - if (FSortedColumnIndex <> -1) and (Message.Msg = WM_NOTIFY) then - if (TWMNotify(Message).NMHdr^.hWndFrom = ListViewHeader) and - (TWMNotify(Message).NMHdr^.Code = HDN_ENDTRACK) then - SetColumnSortMark(FSortedColumnIndex, FSortOrder); -end; - -procedure TdxfmAddComponent.RestoreListViewWndProc; -begin - lvItems.WindowProc := FPrevListViewWndProc; -end; - -procedure TdxfmAddComponent.SubstituteListViewWndProc; -begin - FPrevListViewWndProc := lvItems.WindowProc; - lvItems.WindowProc := ListViewWndProc; -end; - -function TdxfmAddComponent.CanDesign: Boolean; -begin - Result := (SelectedComponent <> nil) and - FComponentPrinter.DesignerExistsByComponent(SelectedComponent); -end; - -function TdxfmAddComponent.CanEditName: Boolean; -begin - Result := SelectedComponent <> nil; -end; - -function TdxfmAddComponent.CanSelect: Boolean; -begin - Result := lvItems.Selected <> nil; -end; - -function TdxfmAddComponent.CheckUserInput: Boolean; -begin - if adoShowNameEdit in FOptions then - begin - Result := IsValidIdent(ReportLinkName); - if Result then - begin - Result := FComponentPrinter.Owner.FindComponent(ReportLinkName) = nil; - if not Result then - MessageError(Format(cxGetResourceString(@sdxComponentAlreadyExists), [ReportLinkName])); - end - else - MessageError(Format(cxGetResourceString(@sdxInvalidComponentName), [ReportLinkName])); - - if not Result and edName.CanFocus then - begin - edName.Text := FOriginalReportLinkName; - edName.SelectAll; - ActiveControl := edName; - end; - end - else - Result := True; -end; - -procedure TdxfmAddComponent.ClearList; -var - I: Integer; -begin - for I := 0 to lvItems.Items.Count - 1 do - TObject(lvItems.Items[I].Data).Free; - lvItems.Items.Clear; -end; - -procedure TdxfmAddComponent.Initialize; -begin - pnlNameHost.Visible := adoShowNameEdit in FOptions; - pnlCaptionHost.Visible := adoShowCaptionEdit in FOptions; - pnlCreatorHost.Visible := adoShowCreatorEdit in FOptions; - pnlSeparatorHost.Visible := pnlNameHost.Visible or pnlCaptionHost.Visible or pnlCreatorHost.Visible; - btnDesign.Visible := adoShowDesignButton in FOptions; - - btnHelp.Visible := HelpContext <> 0; - if HelpContext <> 0 then - BorderIcons := BorderIcons + [biHelp]; - - lvItems.MultiSelect := adoAllowMultiSelect in FOptions; - - chbxOnlyInCurrentModule.Visible := adoShowOnlyComponentsInActiveForm in FOptions; - chbxOnlyUnLinked.Visible := adoShowOnlyComponentsWOLinks in FOptions; - chbxHideCustomContainers.Visible := adoShowHideCustomContainers in FOptions; - - pnlBottomHost.Visible := chbxOnlyInCurrentModule.Visible or chbxOnlyUnLinked.Visible or chbxHideCustomContainers.Visible; - if pnlBottomHost.Visible then - begin - if not chbxHideCustomContainers.Visible then - pnlBottomHost.Height := pnlBottomHost.Height - bvlHideCustomContainers.Height; - if not chbxOnlyInCurrentModule.Visible then - pnlBottomHost.Height := pnlBottomHost.Height - bvlOnlyInCurrentModule.Height; - if not chbxOnlyUnLinked.Visible then - pnlBottomHost.Height := pnlBottomHost.Height - bvlOnlyUnLinked.Height; - - if not chbxHideCustomContainers.Visible then - begin - chbxOnlyUnLinked.BoundsRect := chbxOnlyInCurrentModule.BoundsRect; - chbxOnlyInCurrentModule.BoundsRect := chbxHideCustomContainers.BoundsRect; - end; - if not chbxOnlyInCurrentModule.Visible then - chbxOnlyUnLinked.BoundsRect := chbxOnlyInCurrentModule.BoundsRect; - end; - - pnlNoItems.Parent := lvItems; - - RefreshColumns; - RefreshList; - LoadStrings; - - FormResize(nil); - SetActiveControl; -end; - -procedure TdxfmAddComponent.LoadStrings; -begin - if (FComponentPrinter = nil) or not (csDesigning in FComponentPrinter.ComponentState) then - Caption := cxGetResourceString(@sdxAddReport); - - lblName.Caption := cxGetResourceString(@sdxName); - lblCaption.Caption := cxGetResourceString(@sdxCaption); - lblCreator.Caption := cxGetResourceString(@sdxCreator); - btnDescription.Caption := cxGetResourceString(@sdxBtnDescription); - - tbsItems.Caption := cxGetResourceString(@sdxAvailableSources); - - chbxHideCustomContainers.Caption := cxGetResourceString(@sdxHideCustomContainers); - chbxOnlyInCurrentModule.Caption := cxGetResourceString(@sdxOnlyComponentsInActiveForm); - chbxOnlyUnLinked.Caption := cxGetResourceString(@sdxOnlyComponentsWithoutLinks); - - pnlNoItems.Caption := cxGetResourceString(@sdxThereAreNowItemsForShow); - miAdd.Caption := cxGetResourceString(@sdxAddReport); - miDesign.Caption := cxGetResourceString(@sdxAddAndDesignReport); - - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnDesign.Caption := cxGetResourceString(@sdxBtnDesign); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); -end; - -function TdxfmAddComponent.PreparedOptions: TdxPSGetComponentOptions; -begin - Result := []; - if (adoShowOnlyComponentsWOLinks in FOptions) and chbxOnlyUnLinked.Checked then - Include(Result, gcoExcludeExisting); - if (adoShowOnlyComponentsInActiveForm in FOptions) and chbxOnlyInCurrentModule.Checked then - Include(Result, gcoExcludeOutOfActiveForm); - if (adoShowHideCustomContainers in FOptions) and chbxHideCustomContainers.Checked then - Include(Result, gcoHideCustomContainers); -end; - -procedure TdxfmAddComponent.RefreshColumns; -var - ColumnWidths: array of Integer; - I: Integer; -begin - lvItems.Columns.BeginUpdate; - try - SetLength(ColumnWidths, lvItems.Columns.Count); - for I := 0 to lvItems.Columns.Count - 1 do - ColumnWidths[I] := lvItems.Columns[I].Width; - - lvItems.Columns.Clear; - with lvItems.Columns.Add do - begin - Width := 2 * (lvItems.Width - GetSystemMetrics(SM_CXHSCROLL) - 2) div 3; - Caption := cxGetResourceString(@sdxItemName); - end; - - if adoShowDescriptionColumn in FOptions then - with lvItems.Columns.Add do - begin - Width := (lvItems.Width - GetSystemMetrics(SM_CXHSCROLL) - 2) div 3; - Caption := cxGetResourceString(@sdxItemDescription); - end; - - for I := 0 to Min(lvItems.Columns.Count - 1, Length(ColumnWidths) - 1) do - lvItems.Columns[I].Width := ColumnWidths[I]; - finally - lvItems.ColumnClick := True; - lvItems.Columns.EndUpdate; - end; -end; - -procedure TdxfmAddComponent.RefreshList; - - procedure LoadStrings(AStrings: TStrings; AnOptions: TdxPSGetComponentOptions); - begin - dxPSComponentProvidersFactory.GetComponents(FComponentPrinter, FReportLink, AStrings, AnOptions); - end; - - procedure FillList(AStrings: TStrings); - var - I: Integer; - begin - for I := 0 to AStrings.Count - 1 do - with lvItems.Items.Add do - begin - Caption := AStrings[I]; - Data := AStrings.Objects[I]; - SubItems.Add(TdxComponentItem(Data).Description); - end; - end; - - procedure RestoreSelection(ASelection: TList); - var - I, J: Integer; - Item: TListItem; - begin - for I := 0 to ASelection.Count - 1 do - for J := 0 to lvItems.Items.Count - 1 do - begin - Item := TListItem(lvItems.Items[J]); - if TdxComponentItem(Item.Data).Component = ASelection[I] then - begin - Item.Selected := True; - Item.MakeVisible(True); - Break; - end; - end; - end; - - procedure UpdateListViewState; - const - Styles: array[Boolean] of TViewStyle = (vsReport, vsList); - begin - lvItems.ViewStyle := Styles[ItemCount = 0]; - lvItems.ColumnClick := True; - lvItems.Enabled := ItemCount <> 0; - lvItems.HideSelection := ItemCount = 0; - if (lvItems.SelCount = 0) and (ItemCount <> 0) then - lvItems.Selected := lvItems.Items[0]; - end; - -var - Selection: TList; - Strings: TStrings; -begin - lvItems.Items.BeginUpdate; - try - Selection := TList.Create; - try - GetSelection(Selection); - - Strings := TStringList.Create; - try - ClearList; - LoadStrings(Strings, PreparedOptions); - FillList(Strings); - finally - Strings.Free; - end; - - RestoreSelection(Selection); - - UpdateListViewState; - finally - Selection.Free; - end; - finally - lvItems.Items.EndUpdate; - end; - UpdateControlsState; -end; - -procedure TdxfmAddComponent.RefreshSorting; -begin - if (FSortedColumnIndex > -1) and (FSortedColumnIndex < lvItems.Columns.Count) and - (FSortOrder <> soNone) then - SortColumn(lvItems.Columns[FSortedColumnIndex], FSortOrder); -end; - -procedure TdxfmAddComponent.SetActiveControl; -begin - if lvItems.CanFocus then - ActiveControl := lvItems - else - if edName.CanFocus then - begin - ActiveControl := edName; - edName.SelectAll; - end - else - if edCaption.CanFocus then - begin - ActiveControl := edCaption; - edCaption.SelectAll; - end - else - if edCreator.CanFocus then - begin - ActiveControl := edCreator; - edCreator.SelectAll; - end; -end; - -procedure TdxfmAddComponent.SetColumnSortMark(AIndex: Integer; ASortOrder: TSortOrder); -const - Format: Integer = HDF_IMAGE or HDF_BITMAP_ON_RIGHT; - ImageIndexes: array[TSortOrder] of Integer = (-1, 0, 1); -var - Header: HWND; - HDItem: THDItem; -begin - AssignListViewHeaderImages; - Header := ListViewHeader; - if IsWindow(Header) then - begin - FillChar(HDItem, SizeOf(HDItem), 0); - HDItem.Mask := HDI_FORMAT or HDI_IMAGE; - Header_GetItem(Header, AIndex, HDItem); - if ASortOrder <> soNone then - HDItem.fmt := HDItem.fmt or Format - else - HDItem.fmt := HDItem.fmt and not Format; - HDItem.iImage := ImageIndexes[ASortOrder]; - Header_SetItem(Header, AIndex, HDItem); - end; -end; - -procedure TdxfmAddComponent.SortColumn(Column: TListColumn; ASortOrder: TSortOrder); -var - Item: TListItem; -begin - dxPSCore.dxPSStartWait; - try - if (FSortedColumnIndex <> Column.Index) and (FSortedColumnIndex <> -1) then - SetColumnSortMark(FSortedColumnIndex, soNone); - FSortedColumnIndex := Column.Index; - if ASortOrder <> soNone then - begin - lvItems.CustomSort(nil, MakeTTag(FSortedColumnIndex)); - SetColumnSortMark(FSortedColumnIndex, ASortOrder); - end; - Item := lvItems.Selected; - if Item <> nil then - Item.MakeVisible(True); - finally - dxPSCore.dxPSStopWait; - end; - lvItems.Invalidate; -end; - -procedure TdxfmAddComponent.UpdateControlsState; -begin - edName.Enabled := CanEditName; - edCaption.Enabled := ItemCount <> 0; - edCreator.Enabled := ItemCount <> 0; - btnDescription.Enabled := ItemCount <> 0; - pnlNoItems.Visible := ItemCount = 0; - btnDesign.Enabled := CanDesign; -end; - -procedure TdxfmAddComponent.CMDialogChar(var Message: TCMDialogChar); -begin - inherited; - if IsAccel(Message.CharCode, tbsItems.Caption) then - begin - Message.Result := 1; - if lvItems.Enabled then ActiveControl := lvItems; - end; -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdde.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdde.dfm deleted file mode 100644 index 62410c8d..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdde.dfm +++ /dev/null @@ -1,428 +0,0 @@ -object dxfmAddReportLinkClass: TdxfmAddReportLinkClass - Left = 472 - Top = 300 - BorderStyle = bsDialog - Caption = 'Add Report' - ClientHeight = 463 - ClientWidth = 430 - Color = clBtnFace - Constraints.MinHeight = 350 - Constraints.MinWidth = 438 - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000000000000000000000FFFFFFFFF0000000F - FFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000F - FFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000FFFFFF0000000000F - FFFFF0F00000000FFFFFF000000000000000000000000000000000000000FFFF - 0000FFFF0000C0070000C0070000C0070000C0070000C0070000C0070000C007 - 0000C0070000C0070000C0070000C00F0000C01F0000C03F0000FFFF0000} - OldCreateOrder = True - Position = poScreenCenter - OnCreate = FormCreate - OnDestroy = FormDestroy - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 107 - Top = 433 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 0 - end - object btnCancel: TButton - Left = 188 - Top = 433 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - object btnHelp: TButton - Left = 350 - Top = 433 - Width = 75 - Height = 23 - Caption = '&Help' - TabOrder = 3 - OnClick = btnHelpClick - end - object btnDesign: TButton - Left = 269 - Top = 433 - Width = 75 - Height = 23 - Caption = 'D&esign...' - TabOrder = 2 - OnClick = btnDesignClick - end - object pnlHost: TPanel - Left = 5 - Top = 3 - Width = 420 - Height = 422 - Anchors = [akLeft, akTop, akRight, akBottom] - BevelOuter = bvNone - TabOrder = 4 - object pnlNameHost: TPanel - Left = 0 - Top = 0 - Width = 420 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblName: TLabel - Left = 6 - Top = 7 - Width = 31 - Height = 13 - Caption = '&Name:' - FocusControl = edName - end - object edName: TEdit - Left = 55 - Top = 4 - Width = 271 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - end - object pnlCaptionHost: TPanel - Left = 0 - Top = 30 - Width = 420 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblCaption: TLabel - Left = 6 - Top = 9 - Width = 41 - Height = 13 - Caption = '&Caption:' - FocusControl = edCaption - end - object edCaption: TEdit - Left = 55 - Top = 5 - Width = 271 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - end - object pnlSeparatorHost: TPanel - Left = 0 - Top = 90 - Width = 420 - Height = 14 - Align = alTop - BevelOuter = bvNone - TabOrder = 3 - object bvlSeparator: TBevel - Left = 0 - Top = 0 - Width = 420 - Height = 4 - Align = alTop - Shape = bsBottomLine - end - end - object pgctrlItems: TPageControl - Left = 0 - Top = 104 - Width = 420 - Height = 318 - ActivePage = tbsItems - Align = alClient - TabOrder = 4 - TabStop = False - object tbsItems: TTabSheet - Caption = ' &Active Report Links ' - object lvItems: TListView - Left = 0 - Top = 0 - Width = 412 - Height = 290 - Align = alClient - Columns = < - item - Caption = 'Supported Component Class(es)' - Width = 200 - end - item - Caption = 'ReportLink Class(es)' - Width = 200 - end> - HideSelection = False - ReadOnly = True - RowSelect = True - PopupMenu = pmLinks - SortType = stText - TabOrder = 0 - ViewStyle = vsReport - OnChange = lvItemsChange - OnColumnClick = lvItemsColumnClick - OnCompare = lvItemsCompare - OnCustomDrawItem = lvItemsCustomDrawItem - OnDblClick = lvItemsDblClick - end - end - end - object pnlCreatorHost: TPanel - Left = 0 - Top = 60 - Width = 420 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object lblCreator: TLabel - Left = 6 - Top = 9 - Width = 41 - Height = 13 - Caption = 'Creato&r:' - FocusControl = edCreator - end - object edCreator: TEdit - Left = 55 - Top = 5 - Width = 271 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - object btnDescription: TButton - Left = 334 - Top = 4 - Width = 83 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Description...' - TabOrder = 1 - OnClick = btnDescriptionClick - end - end - end - object ilLinks: TImageList - AllocBy = 3 - Left = 7 - Top = 429 - Bitmap = { - 494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000001000000001002000000000000010 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F00000000007F7F - 7F007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F00000000000000000000000000000000000000000000000000000000000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00000000000000000000BFBFBF00BFBFBF00BFBFBF0000000000000000000000 - 000000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF00BFBFBF00000000007F7F7F00BFBF - BF0000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00BFBFBF007F7F7F0000000000BFBFBF007F7F7F007F7F - 7F007F7F7F007F7F7F007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00BFBFBF0000000000FFFFFF00FFFFFF0000000000BFBFBF000000 - 00000000000000000000000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF000000 - 0000BFBFBF0000000000BFBFBF00BFBFBF00BFBFBF00FFFFFF007F7F7F000000 - 0000BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF00BFBF - BF00FFFFFF00000000007F7F7F0000000000BFBFBF00FFFFFF007F7F7F00BFBF - BF00BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000000000000000 - 0000FFFFFF00000000007F7F7F007F7F7F00BFBFBF0000000000BFBFBF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00FFFFFF00000000000000000000000000BFBFBF00BFBFBF000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00FFFFFF00FFFFFF00BFBFBF00BFBFBF007F7F7F007F7F - 7F007F7F7F00000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF000000000000000000BFBFBF00BFBF - BF00000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00007F7F7F0000000000BFBFBF00BFBFBF00BFBFBF00000000007F7F7F000000 - 00007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F0000000000000000000000000000000000000000007F7F7F00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000100000000100010000000000800000000000000000000000 - 000000000000000000000000FFFFFF00FC7F000000000000FC27000000000000 - EC23000000000000C4010000000000008001000000000000C001000000000000 - E000000000000000000000000000000000000000000000000003000000000000 - E003000000000000C0010000000000008003000000000000C407000000000000 - EC3F000000000000FC7F00000000000000000000000000000000000000000000 - 000000000000} - end - object pmLinks: TPopupMenu - OnPopup = pmLinksPopup - Left = 35 - Top = 429 - object miSelect: TMenuItem - Caption = '&Add Report' - Default = True - OnClick = lvItemsDblClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miDesign: TMenuItem - Caption = 'Add and D&esign Report...' - OnClick = btnDesignClick - end - end - object ilColumns: TImageList - AllocBy = 2 - Height = 8 - Width = 8 - Left = 63 - Top = 429 - Bitmap = { - 494C010102000400040008000800FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000200000000800000001002000000000000004 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000000000000000000000000000000000008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800000000000000000000000000000000000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000808080000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000020000000080000000100010000000000200000000000000000000000 - 000000000000000000000000FFFFFF00FFFF0000FFFF000080F70000C1E30000 - E3C10000F7800000FFFF0000FFFF000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdde.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdde.pas deleted file mode 100644 index 078c8f4a..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkAdde.pas +++ /dev/null @@ -1,731 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSfmLnkAddE; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, StdCtrls, Registry, - Menus, Forms, ComCtrls, ExtCtrls, ImgList, dxPSCore, dxPSForm; - -type - TSortOrder = (soNone, soUp, soDown); - - TdxfmAddReportLinkClass = class(TCustomdxPSForm) - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - ilLinks: TImageList; - btnDesign: TButton; - pmLinks: TPopupMenu; - miSelect: TMenuItem; - miDesign: TMenuItem; - miLine1: TMenuItem; - pnlHost: TPanel; - pnlNameHost: TPanel; - lblName: TLabel; - edName: TEdit; - pnlCaptionHost: TPanel; - lblCaption: TLabel; - edCaption: TEdit; - pnlSeparatorHost: TPanel; - bvlSeparator: TBevel; - pgctrlItems: TPageControl; - tbsItems: TTabSheet; - lvItems: TListView; - pnlCreatorHost: TPanel; - lblCreator: TLabel; - edCreator: TEdit; - btnDescription: TButton; - ilColumns: TImageList; - procedure btnHelpClick(Sender: TObject); - procedure lvItemsDblClick(Sender: TObject); - procedure lvItemsColumnClick(Sender: TObject; Column: TListColumn); - procedure lvItemsCompare(Sender: TObject; Item1, Item2: TListItem; - Data: Integer; var Compare: Integer); - procedure FormResize(Sender: TObject); - procedure btnDesignClick(Sender: TObject); - procedure pmLinksPopup(Sender: TObject); - procedure lvItemsChange(Sender: TObject; Item: TListItem; Change: TItemChange); - procedure btnDescriptionClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure FormDestroy(Sender: TObject); - procedure lvItemsCustomDrawItem(Sender: TCustomListView; - Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean); - private - FDesignBtnPressed: Boolean; - {$IFDEF DELPHI5} - FPrevListViewWndProc: TWndMethod; - {$ENDIF} - FReportLinkDescription: string; - FSortedColumnIndex: Integer; - FSortOrder: TSortOrder; - function GetListViewHeader: HWND; - function GetReportLinkCaption: string; - function GetReportLinkCreator: string; - function GetReportLinkName: string; - function GetSelectedReportLinkClass: TdxReportLinkClass; - procedure SetReportLinkCaption(const Value: string); - procedure SetReportLinkCreator(Value: string); - procedure SetReportLinkName(const Value: string); - - function CanEditCaption: Boolean; - function CanEditCreator: Boolean; - function CanEditDescription: Boolean; - function CanEditName: Boolean; - function CanDesign: Boolean; - function CanSelect: Boolean; - procedure Initialize; - procedure RefreshList; - procedure SetActiveControl; - {$IFDEF DELPHI5} - procedure SetColumnSortMark(AIndex: Integer; ASortOrder: TSortOrder); - {$ENDIF} - procedure SortColumn(Column: TListColumn; ASortOrder: TSortOrder); - procedure RefreshSorting; - procedure UpdateControlsState; - - {$IFDEF DELPHI5} - procedure AssignListViewHeaderImages; - procedure ListViewWndProc(var Message: TMessage); - procedure RestoreListViewWndProc; - procedure SubstituteListViewWndProc; - {$ENDIF} - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure CreateWnd; override; - procedure BeforeConstruction; override; - - procedure LoadSorting(const APath: string); - procedure SaveSorting(const APath: string); - - property ListViewHeader: HWND read GetListViewHeader; - public - function Execute: Boolean; - procedure LoadFromRegistry(const APath: string); override; - procedure SaveToRegistry(const APath: string); override; - - property ReportLinkCaption: string read GetReportLinkCaption write SetReportLinkCaption; - property ReportLinkCreator: string read GetReportLinkCreator write SetReportLinkCreator; - property ReportLinkDescription: string read FReportLinkDescription write FReportLinkDescription; - property ReportLinkName: string read GetReportLinkName write SetReportLinkName; - property SelectedReportLinkClass: TdxReportLinkClass read GetSelectedReportLinkClass; - end; - - PdxAddReportLinkClassDlgData = ^TdxAddReportLinkClassDlgData; - TdxAddReportLinkClassDlgData = record - ReportLinkClass: TdxReportLinkClass; - ReportLinkName: string; - ReportLinkCaption: string; - ReportLinkCreator: string; - ReportLinkDescription: string; - DesignBtnPressed: Boolean; - HelpContext: THelpContext; - end; - -function dxShowAddReportLinkClassDlg(var AData: TdxAddReportLinkClassDlgData): Boolean; - -implementation - -{$R *.DFM} - -uses - Dialogs, CommCtrl, dxBase, dxPSGlbl, dxPSUtl, dxPSDsgProxies, dxPSPopupMan, - dxPSfmEditDesc; - -const - sdxSortedColumnIndex = 'SortedColumnIndex'; // Don't Localize - sdxSortOrder = 'SortOrder'; // Don't Localize - -type - TCustomListViewAccess = class(TCustomListView); - -function dxShowAddReportLinkClassDlg(var AData: TdxAddReportLinkClassDlgData): Boolean; -var - Dialog: TdxfmAddReportLinkClass; -begin - Dialog := TdxfmAddReportLinkClass.Create(nil); - try - Dialog.ReportLinkName := AData.ReportLinkName; - Dialog.ReportLinkCaption := AData.ReportLinkCaption; - Dialog.ReportLinkCreator := AData.ReportLinkCreator; - Dialog.ReportLinkDescription := AData.ReportLinkDescription; - if AData.HelpContext <> 0 then - Dialog.HelpContext := AData.HelpContext; - Result := Dialog.Execute; - if Result then - begin - AData.ReportLinkClass := Dialog.SelectedReportLinkClass; - AData.ReportLinkName := Dialog.ReportLinkName; - AData.ReportLinkCaption := Dialog.ReportLinkCaption; - AData.ReportLinkCreator := Dialog.ReportLinkCreator; - AData.ReportLinkDescription := Dialog.ReportLinkDescription; - AData.DesignBtnPressed := Dialog.FDesignBtnPressed; - end; - finally - Dialog.Free; - end; -end; - -{ TfmAddEmptyReportLink } - -procedure TdxfmAddReportLinkClass.FormCreate(Sender: TObject); -begin - FSortedColumnIndex := -1; - HelpContext := dxPSGlbl.dxhcAddEmptyLinkDlg; - dxPSDsgProxies.dxIdeImagesProvider.Refresh; - lvItems.SmallImages := dxPSDsgProxies.dxIdeImagesProvider.Images; - {$IFDEF DELPHI5} - SubstituteListViewWndProc; - AssignListViewHeaderImages; - {$ENDIF} - dxPSPopupMenuController.RegisterControl(lvItems); -end; - -procedure TdxfmAddReportLinkClass.FormDestroy(Sender: TObject); -begin - dxPSPopupMenuController.UnregisterControl(lvItems); - {$IFDEF DELPHI5} - RestoreListViewWndProc; - {$ENDIF} -end; - -function TdxfmAddReportLinkClass.Execute: Boolean; -begin - Initialize; - Result := (ShowModal = mrOk) and (lvItems.Selected <> nil); -end; - -procedure TdxfmAddReportLinkClass.LoadFromRegistry(const APath: string); -begin - inherited; - dxLoadListViewColumnsFromRegistry(lvItems, APath); - LoadSorting(APath + '\' + lvItems.Name); -end; - -procedure TdxfmAddReportLinkClass.SaveToRegistry(const APath: string); -begin - inherited; - dxSaveListViewColumnsToRegistry(lvItems, APath); - SaveSorting(APath + '\' + lvItems.Name); -end; - -procedure TdxfmAddReportLinkClass.CreateWnd; -begin - inherited; - SendMessage(Handle, WM_SETICON, 1, Icon.Handle); -end; - -procedure TdxfmAddReportLinkClass.BeforeConstruction; -begin - inherited; - Options := Options + [foSizeableDialog]; -end; - -procedure TdxfmAddReportLinkClass.LoadSorting(const APath: string); -begin - with TRegistry.Create do - try - if OpenKey(APath, False) then - try - if ValueExists(sdxSortedColumnIndex) then - FSortedColumnIndex := ReadInteger(sdxSortedColumnIndex); - if ValueExists(sdxSortOrder) then - FSortOrder := TSortOrder(ReadInteger(sdxSortOrder)); - except - end; - finally - Free; - end; -end; - -procedure TdxfmAddReportLinkClass.SaveSorting(const APath: string); -begin - with TRegistry.Create do - try - if OpenKey(APath, True) then - begin - WriteInteger(sdxSortedColumnIndex, FSortedColumnIndex); - WriteInteger(sdxSortOrder, Integer(FSortOrder)); - end; - finally - Free; - end; -end; - -procedure TdxfmAddReportLinkClass.pmLinksPopup(Sender: TObject); -begin - miSelect.Enabled := CanSelect; - miDesign.Enabled := CanDesign; -end; - -procedure TdxfmAddReportLinkClass.lvItemsChange(Sender: TObject; - Item: TListItem; Change: TItemChange); -begin - if Change = ctState then UpdateControlsState; -end; - -procedure TdxfmAddReportLinkClass.btnDescriptionClick(Sender: TObject); -var - S: string; -begin - S := ReportLinkDescription; - if dxEditDescriptionDlg(S) then - ReportLinkDescription := S; -end; - -procedure TdxfmAddReportLinkClass.btnDesignClick(Sender: TObject); -begin - FDesignBtnPressed := True; - ModalResult := mrOk; -end; - -procedure TdxfmAddReportLinkClass.btnHelpClick(Sender: TObject); -begin - if HelpContext <> 0 then Application.HelpContext(HelpContext); -end; - -procedure TdxfmAddReportLinkClass.lvItemsDblClick(Sender: TObject); -begin - if lvItems.Selected <> nil then ModalResult := mrOk; -end; - -procedure TdxfmAddReportLinkClass.lvItemsColumnClick(Sender: TObject; Column: TListColumn); -const - SortOrderToggleMap: array[TSortOrder] of TSortOrder = (soUp, soDown, soUp); -var - KeyboardState: TKeyboardState; -begin - Windows.GetKeyboardState(KeyboardState); - if KeyboardState[VK_CONTROL] and $80 <> 0 then - if FSortedColumnIndex <> -1 then - begin - RefreshList; - {$IFDEF DELPHI5} - SetColumnSortMark(FSortedColumnIndex, soNone); - {$ENDIF} - FSortOrder := soNone; - FSortedColumnIndex := -1; - end - else - else - begin - FSortOrder := SortOrderToggleMap[FSortOrder]; - SortColumn(Column, FSortOrder); - end; -end; - -procedure TdxfmAddReportLinkClass.FormResize(Sender: TObject); -const - BtnOffsetY = 6; -var - BtnOffsetX, RightOrigin, TopOrigin: Integer; -begin - BtnOffsetX := pnlHost.Left; - - with pnlHost do - SetBounds(Left, Top, Self.ClientWidth - 2 * Left, - Self.ClientHeight - Top - btnOK.Height - 2 * BtnOffsetY); - - RightOrigin := pnlHost.Left + pnlHost.Width; - TopOrigin := pnlHost.Top + pnlHost.Height + BtnOffsetY; - - PlaceButtons([btnHelp, btnDesign, btnCancel, btnOK], BtnOffsetX, RightOrigin, TopOrigin); -end; - -procedure TdxfmAddReportLinkClass.lvItemsCompare(Sender: TObject; Item1, Item2: TListItem; - Data: Integer; var Compare: Integer); -begin - if Data = 0 then - Compare := CompareText(Item1.Caption, Item2.Caption) - else - Compare := CompareText(Item1.SubItems[Data - 1], Item2.SubItems[Data - 1]); - - if FSortOrder = soUp then - Compare := -Compare; -end; - -procedure TdxfmAddReportLinkClass.lvItemsCustomDrawItem( - Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; - var DefaultDraw: Boolean); -var - R: TRect; - DC: HDC; - BkColor, TextColor: COLORREF; - X, Y: Integer; -begin - if [cdsSelected, cdsFocused] * State = [cdsSelected, cdsFocused] then - begin - R := Item.DisplayRect(drIcon); - if Item.ImageIndex = -1 then - begin - Sender.Canvas.Brush.Color := clWindow; - Sender.Canvas.FillRect(R); - end - else - TCustomListViewAccess(Sender).SmallImages.Draw(Sender.Canvas, R.Left, R.Top, Item.ImageIndex); - - DC := Sender.Canvas.Handle; - BkColor := SetBkColor(DC, ColorToRGB(clHighLight)); - TextColor := SetTextColor(DC, ColorToRGB(clHighLightText)); - - R := Item.DisplayRect(drLabel); - with R do - begin - X := R.Left + 2; - Y := Top + (Bottom - Top - Canvas.TextHeight(Item.Caption)) div 2; - end; - Sender.Canvas.TextRect(R, X, Y, Item.Caption); - - ListView_GetSubItemRect(Sender.Handle, Item.Index, 1, LVIR_LABEL, @R); - with R do - begin - X := R.Left + 6; - Y := Top + (Bottom - Top - Sender.Canvas.TextHeight(Item.SubItems[0])) div 2; - end; - Sender.Canvas.TextRect(R, X, Y, Item.SubItems[0]); - - SetTextColor(DC, TextColor); - SetBkColor(DC, BkColor); - - if cdsFocused in State then - begin - UnionRect(R, R, Item.DisplayRect(drLabel)); - Sender.Canvas.DrawFocusRect(R); - end; - DefaultDraw := False; - end; -end; - -function TdxfmAddReportLinkClass.GetListViewHeader: HWND; -begin - lvItems.HandleNeeded; - if lvItems.HandleAllocated then - Result := ListView_GetHeader(lvItems.Handle) - else - Result := 0; -end; - -function TdxfmAddReportLinkClass.GetReportLinkCaption: string; -begin - Result := edCaption.Text; -end; - -function TdxfmAddReportLinkClass.GetReportLinkCreator: string; -begin - Result := edCreator.Text; -end; - -function TdxfmAddReportLinkClass.GetReportLinkName: string; -begin - Result := edName.Text; -end; - -function TdxfmAddReportLinkClass.GetSelectedReportLinkClass: TdxReportLinkClass; -begin - if lvItems.Selected <> nil then - Result := TdxReportLinkClass(lvItems.Selected.Data) - else - Result := nil; -end; - -procedure TdxfmAddReportLinkClass.SetReportLinkCaption(const Value: string); -begin - edCaption.Text := Value; -end; - -procedure TdxfmAddReportLinkClass.SetReportLinkCreator(Value: string); -begin - edCreator.Text := Value; -end; - -procedure TdxfmAddReportLinkClass.SetReportLinkName(const Value: string); -begin - edName.Text := Value; -end; - -function TdxfmAddReportLinkClass.CanDesign: Boolean; -begin - Result := dxPSDesignerClassByLinkClass(SelectedReportLinkClass) <> nil; -end; - -function TdxfmAddReportLinkClass.CanEditCaption: Boolean; -begin - Result := SelectedReportLinkClass <> nil; -end; - -function TdxfmAddReportLinkClass.CanEditCreator: Boolean; -begin - Result := SelectedReportLinkClass <> nil; -end; - -function TdxfmAddReportLinkClass.CanEditDescription: Boolean; -begin - Result := SelectedReportLinkClass <> nil; -end; - -function TdxfmAddReportLinkClass.CanEditName: Boolean; -begin - Result := SelectedReportLinkClass <> nil; -end; - -function TdxfmAddReportLinkClass.CanSelect: Boolean; -begin - Result := lvItems.Selected <> nil; -end; - -procedure TdxfmAddReportLinkClass.Initialize; -begin - btnHelp.Visible := HelpContext <> 0; - RefreshList; - with lvItems do - begin - btnOK.Enabled := Items.Count > 0; - if Items.Count > 0 then - begin - Selected := Items[0]; - ItemFocused := Selected; - end; - end; - - pmLinks.Images := ilLinks; - miDesign.ImageIndex := 0; - - FormResize(nil); - SetActiveControl; - RefreshSorting; -end; - -procedure TdxfmAddReportLinkClass.RefreshList; -var - Selection: TList; - I, J: Integer; - LinkClasses: TdxClassList; - ComponentClasses: TdxClassList; - LinkClass: TdxReportLinkClass; - ComponentClass: TComponentClass; -begin - lvItems.Items.BeginUpdate; - try - Selection := TList.Create; - try - dxPSUtl.dxSaveListViewSelection(lvItems, Selection); - try - lvItems.Items.Clear; - LinkClasses := TdxClassList.Create; - try - ComponentClasses := TdxClassList.Create; - try - dxPSGetActiveReportLinksList(LinkClasses); - for I := 0 to LinkClasses.Count - 1 do - begin - ComponentClasses.Clear; - - LinkClass := TdxReportLinkClass(LinkClasses[I]); - with lvItems.Items.Add do - begin - LinkClass.GetSupportedComponentList(ComponentClasses); - for J := 0 to ComponentClasses.Count - 1 do - begin - ComponentClass := TComponentClass(ComponentClasses[J]); - if J = 0 then - ImageIndex := dxPSDsgProxies.dxIdeImagesProvider.ImageIndexes[ComponentClass]; - if Caption <> '' then - Caption := Caption + ', '; - if ComponentClass <> nil then - Caption := Caption + ComponentClass.ClassName; - end; - Data := (LinkClass); - StateIndex := -1; - - SubItems.Add(LinkClass.ClassName); - end; - end; - finally - ComponentClasses.Free; - end; - finally - LinkClasses.Free; - end; - finally - dxPSUtl.dxRestoreListViewSelection(lvItems, Selection); - end; - finally - Selection.Free; - end; - finally - lvItems.Items.EndUpdate; - end; -end; - -procedure TdxfmAddReportLinkClass.SetActiveControl; -begin - if lvItems.CanFocus then - ActiveControl := lvItems - else - if edName.CanFocus then - begin - ActiveControl := edName; - edName.SelectAll; - end - else - if edCaption.CanFocus then - begin - ActiveControl := edCaption; - edCaption.SelectAll; - end - else - if edCreator.CanFocus then - begin - ActiveControl := edCreator; - edCreator.SelectAll; - end; -end; - -{$IFDEF DELPHI5} -procedure TdxfmAddReportLinkClass.SetColumnSortMark(AIndex: Integer; ASortOrder: TSortOrder); -const - Format: Integer = HDF_IMAGE or HDF_BITMAP_ON_RIGHT; - ImageIndexes: array[TSortOrder] of Integer = (-1, 0, 1); -var - Header: HWND; - HDItem: THDItem; -begin - AssignListViewHeaderImages; - Header := ListViewHeader; - if IsWindow(Header) then - begin - FillChar(HDItem, SizeOf(HDItem), 0); - HDItem.Mask := HDI_FORMAT or HDI_IMAGE; - Header_GetItem(Header, AIndex, HDItem); - if ASortOrder <> soNone then - HDItem.fmt := HDItem.fmt or Format - else - HDItem.fmt := HDItem.fmt and not Format; - HDItem.iImage := ImageIndexes[ASortOrder]; - Header_SetItem(Header, AIndex, HDItem); - end; -end; -{$ENDIF} - -procedure TdxfmAddReportLinkClass.SortColumn(Column: TListColumn; ASortOrder: TSortOrder); -var - Item: TListItem; -begin - dxPSCore.dxPSStartWait; - try - {$IFDEF DELPHI5} - if (FSortedColumnIndex <> Column.Index) and (FSortedColumnIndex <> -1) then - SetColumnSortMark(FSortedColumnIndex, soNone); - {$ENDIF} - FSortedColumnIndex := Column.Index; - if ASortOrder <> soNone then - begin - lvItems.CustomSort(nil, MakeTTag(FSortedColumnIndex)); - {$IFDEF DELPHI5} - SetColumnSortMark(FSortedColumnIndex, ASortOrder); - {$ENDIF} - end; - Item := lvItems.Selected; - if Item <> nil then - Item.MakeVisible(True); - finally - dxPSCore.dxPSStopWait; - end; - lvItems.Invalidate; -end; - -procedure TdxfmAddReportLinkClass.RefreshSorting; -begin - if (FSortedColumnIndex <> -1) and (FSortOrder <> soNone) then - SortColumn(lvItems.Columns[FSortedColumnIndex], FSortOrder); -end; - -procedure TdxfmAddReportLinkClass.UpdateControlsState; -begin - btnDesign.Enabled := CanDesign; - edCaption.Enabled := CanEditCaption; - edCreator.Enabled := CanEditCreator; - btnDescription.Enabled := CanEditDescription; - edName.Enabled := CanEditName; -end; - -{$IFDEF DELPHI5} -procedure TdxfmAddReportLinkClass.AssignListViewHeaderImages; -var - Header: HWND; -begin - Header := ListViewHeader; - if IsWindow(Header) and not IsWindow(Header_GetImageList(Header)) then - Header_SetImageList(Header, ilColumns.Handle); -end; - -procedure TdxfmAddReportLinkClass.ListViewWndProc(var Message: TMessage); -begin - FPrevListViewWndProc(Message); - - if (FSortedColumnIndex <> -1) and (Message.Msg = WM_NOTIFY) then - with TWMNotify(Message).NMHdr^ do - if (hWndFrom = ListViewHeader) and (Code = HDN_ENDTRACK) then - SetColumnSortMark(FSortedColumnIndex, FSortOrder); -end; - -procedure TdxfmAddReportLinkClass.RestoreListViewWndProc; -begin - lvItems.WindowProc := FPrevListViewWndProc; -end; - -procedure TdxfmAddReportLinkClass.SubstituteListViewWndProc; -begin - FPrevListViewWndProc := lvItems.WindowProc; - lvItems.WindowProc := ListViewWndProc; -end; -{$ENDIF} - -procedure TdxfmAddReportLinkClass.CMDialogChar(var Message: TCMDialogChar); -begin - inherited; - if IsAccel(Message.CharCode, tbsItems.Caption) then - begin - Message.Result := 1; - ActiveControl := lvItems; - end; -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkDsg.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkDsg.dfm deleted file mode 100644 index fa01efab..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkDsg.dfm +++ /dev/null @@ -1,934 +0,0 @@ -object dxfmReportLinkDesignWindow: TdxfmReportLinkDesignWindow - Left = 699 - Top = 105 - BorderStyle = bsDialog - Caption = 'Report Links' - ClientHeight = 343 - ClientWidth = 367 - Color = clBtnFace - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000FFFFFFFFFF000000F00F00000F000000FFF - FFFFFFF000000F00F00000F000000FFFFFFFFFF000000FFFFFFF0FF000000F00 - FFF080F000000F080F08080000440FF080808088804400000808088888440000 - 008088888844000000088888804400000000000000440000000000000000FFFF - 0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F - 0000000400000000000000000000F8000000FC000000FE040000FFFF0000} - KeyPreview = True - OldCreateOrder = True - OnClose = FormClose - OnKeyDown = FormKeyDown - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlButtons: TPanel - Left = 240 - Top = 0 - Width = 127 - Height = 343 - Align = alRight - BevelOuter = bvNone - TabOrder = 0 - object btnAdd: TButton - Left = 5 - Top = 4 - Width = 98 - Height = 22 - Caption = '&Add...' - TabOrder = 0 - OnClick = AddClick - end - object btnDelete: TButton - Tag = 4 - Left = 5 - Top = 31 - Width = 119 - Height = 22 - Caption = '&Delete' - TabOrder = 2 - OnClick = EditClick - end - object btnShowDesigner: TButton - Left = 5 - Top = 147 - Width = 119 - Height = 22 - Caption = 'Show D&esigner...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - OnClick = LinkDesignClick - end - object btnSelectAll: TButton - Tag = 6 - Left = 5 - Top = 58 - Width = 119 - Height = 22 - Caption = 'Se&lect All' - TabOrder = 3 - OnClick = EditClick - end - object btnRestoreOriginal: TButton - Left = 5 - Top = 233 - Width = 119 - Height = 22 - Caption = 'Rest&ore Or&iginal' - TabOrder = 9 - OnClick = RestoreOriginalClick - end - object btnChangeComponent: TButton - Tag = 3 - Left = 5 - Top = 174 - Width = 119 - Height = 22 - Caption = 'C&hange Component...' - TabOrder = 7 - OnClick = LinkChangeComponentClick - end - object btnPrintPreview: TButton - Tag = 2 - Left = 5 - Top = 291 - Width = 119 - Height = 22 - Caption = 'Pre&view...' - TabOrder = 11 - OnClick = PrintPreviewClick - end - object btnPrint: TButton - Tag = 3 - Left = 5 - Top = 318 - Width = 119 - Height = 22 - Caption = 'Print...' - TabOrder = 12 - OnClick = PrintClick - end - object btnPageSetup: TButton - Tag = 1 - Left = 5 - Top = 264 - Width = 119 - Height = 22 - Caption = 'Pa&ge Setup...' - TabOrder = 10 - OnClick = PageSetupClick - end - object btnMoveUp: TButton - Left = 5 - Top = 89 - Width = 119 - Height = 22 - Caption = 'Move &Up' - TabOrder = 4 - OnClick = MoveUpClick - end - object btnMoveDown: TButton - Tag = 1 - Left = 5 - Top = 116 - Width = 119 - Height = 22 - Caption = 'Move Dow&n' - TabOrder = 5 - OnClick = MoveDownClick - end - object btnRestoreDefaults: TButton - Left = 5 - Top = 206 - Width = 119 - Height = 22 - Caption = 'Rest&ore Defaults' - TabOrder = 8 - OnClick = RestoreDefaultsClick - end - object btnDropDownMenu: TButton - Left = 103 - Top = 4 - Width = 21 - Height = 22 - Caption = '6' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Marlett' - Font.Style = [] - ParentFont = False - TabOrder = 1 - OnClick = btnDropDownMenuClick - end - end - object lbxLinks: TListBox - Left = 0 - Top = 0 - Width = 240 - Height = 343 - Style = lbOwnerDrawVariable - Align = alClient - Ctl3D = True - DragMode = dmAutomatic - ItemHeight = 16 - MultiSelect = True - ParentCtl3D = False - PopupMenu = pmLinks - TabOrder = 1 - OnClick = lbxLinksClick - OnDblClick = lbxLinksDblClick - OnDragDrop = lbxLinksDragDrop - OnDragOver = lbxLinksDragOver - OnDrawItem = lbxLinksDrawItem - OnEndDrag = lbxLinksEndDrag - OnKeyPress = lbxLinksKeyPress - OnMeasureItem = lbxLinksMeasureItem - OnStartDrag = lbxLinksStartDrag - end - object pmLinks: TPopupMenu - Images = ilLinks - OnPopup = pmLinksPopup - Left = 7 - Top = 6 - object miAdd: TMenuItem - Caption = '&Add...' - ImageIndex = 0 - ShortCut = 45 - OnClick = AddClick - end - object miAddComposition: TMenuItem - Caption = 'Add Composition...' - ImageIndex = 1 - OnClick = AddCompositionClick - end - object miLine7: TMenuItem - Caption = '-' - end - object miAddExisting: TMenuItem - Caption = 'Add Existing' - ShortCut = 32813 - OnClick = AddExistingClick - end - object miAddStandard: TMenuItem - Caption = 'Add Standard Link...' - ShortCut = 16429 - OnClick = AddStandardClick - end - object miLine5: TMenuItem - Caption = '-' - end - object miEdit: TMenuItem - Caption = '&Edit' - object miCut: TMenuItem - Tag = 2 - Caption = 'Cu&t' - ImageIndex = 3 - ShortCut = 16472 - OnClick = EditClick - end - object miCopy: TMenuItem - Tag = 1 - Caption = '&Copy' - ImageIndex = 2 - ShortCut = 16451 - OnClick = EditClick - end - object miPaste: TMenuItem - Tag = 3 - Caption = '&Paste' - ImageIndex = 4 - ShortCut = 16470 - OnClick = EditClick - end - object miDelete: TMenuItem - Tag = 4 - Caption = '&Delete' - ImageIndex = 5 - ShortCut = 46 - OnClick = EditClick - end - object N3: TMenuItem - Caption = '-' - end - object miSelectAll: TMenuItem - Tag = 6 - Caption = 'Se&lect All' - ShortCut = 16449 - OnClick = EditClick - end - end - object N2: TMenuItem - Caption = '-' - end - object miMoveUp: TMenuItem - Caption = 'Move &Up' - ImageIndex = 10 - ShortCut = 16422 - OnClick = MoveUpClick - end - object miMoveDown: TMenuItem - Caption = 'Move Dow&n' - ImageIndex = 11 - ShortCut = 16424 - OnClick = MoveDownClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miShowDesigner: TMenuItem - Caption = 'Show Designer...' - Default = True - ImageIndex = 6 - ShortCut = 16397 - OnClick = LinkDesignClick - end - object miSetAsCurrent: TMenuItem - Caption = '&Make Current' - ShortCut = 16416 - OnClick = SetAsCurrentClick - end - object miChangeComponent: TMenuItem - Caption = 'C&hange Component...' - OnClick = LinkChangeComponentClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miRestoreDefaults: TMenuItem - Caption = 'Rest&ore Defaults' - ShortCut = 16463 - OnClick = RestoreDefaultsClick - end - object miRestoreOriginal: TMenuItem - Caption = 'Rest&ore Or&iginal' - ShortCut = 16457 - OnClick = RestoreOriginalClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miPageSetup: TMenuItem - Tag = 1 - Caption = 'Pa&ge Setup...' - ImageIndex = 7 - OnClick = PageSetupClick - end - object miPrintPreview: TMenuItem - Tag = 2 - Caption = 'Print Pre&view...' - ImageIndex = 8 - OnClick = PrintPreviewClick - end - object miPrint: TMenuItem - Tag = 3 - Caption = '&Print...' - ImageIndex = 9 - ShortCut = 16464 - OnClick = PrintClick - end - object N1: TMenuItem - Caption = '-' - end - object miBackground: TMenuItem - Caption = 'Bac&kground' - object miBackgroundEffects: TMenuItem - Tag = 4 - Caption = 'E&ffects...' - ImageIndex = 12 - OnClick = BackgroundClick - end - object miBackgroundClear: TMenuItem - Tag = 5 - Caption = 'Clear' - OnClick = ClearBackgroundClick - end - end - object miLine: TMenuItem - Caption = '-' - end - object miShowButtons: TMenuItem - Caption = 'Show &Button Bar' - Checked = True - OnClick = ShowButtonsClick - end - end - object ilLinks: TImageList - Left = 63 - Top = 6 - Bitmap = { - 494C01010D000E00040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000004000000001002000000000000040 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF000000000000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484000000 - 00008484840000000000FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400848484008484840000000000FFFFFF00FFFFFF0000FFFF0084848400FFFF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600848484008484840000000000FFFFFF00FFFFFF00840000008484 - 8400FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00C6C6C600C6C6 - C600C6C6C600C6C6C60084848400848484000000000000FFFF00840000008400 - 0000FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000C6C6C600FFFFFF00FFFFFF00C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084000000840000008400 - 0000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600FFFFFF00FFFF - FF00C6C6C60000000000C6C6C600C6C6C6008484840084000000840000008400 - 0000FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000C6C6C600FFFF - FF00000000008400000000000000C6C6C6008400000084000000840000008484 - 8400FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600FFFFFF0084000000C6C6C60084848400840000008400000084848400FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000840000000000 - 0000C6C6C60084000000848484000000000084848400FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084000000C6C6 - C60000000000840000000000000084848400FFFFFF0000FFFF00FFFFFF008484 - 8400C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084000000C6C6 - C600C6C6C600840000008484840000FFFF00FFFFFF00FFFFFF00FFFFFF008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008400 - 0000840000008484840084848400848484008484840084848400848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C60000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000084848400C6C6C600C6C6C6008484 - 84000000000084848400000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C60000FFFF0000FFFF0000FFFF00C6C6C600C6C6 - C600000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000084848400C6C6C600C6C6C600FFFF00008484 - 84008484840000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400C6C6C600C6C6 - C60000000000C6C6C60000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000C6C6C600C6C6C600C6C6C600C6C6C6008484 - 8400C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000C6C6C600FFFF0000C6C6C600C6C6C6008484 - 8400C6C6C60000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C60000000000C6C6C600000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000084848400FFFF0000FFFF0000C6C6C6008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C60000000000C6C6C60000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000084848400C6C6C600C6C6C6008484 - 840000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C6C6C60000000000C6C6C600848484000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFF00008484 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C6C6C600000000000000 - 0000000000000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00848484008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007B7B7B007B7B7B007B7B7B0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007B7B7B00000000007B7B - 7B007B7B7B000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000007B7B - 7B00000000000000000000000000000000000000000000000000000000000000 - 0000000000007B7B7B0000000000000000000000000000000000000000000000 - 0000000000008400000084000000840000008400000084000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF008400000084000000840000008400 - 00008400000084000000FFFFFF00840000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007B7B7B000000 - 00000000000000000000BDBDBD00BDBDBD00BDBDBD0000000000000000000000 - 000000000000000000007B7B7B00000000008400000084000000840000008400 - 0000840000008400000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00840000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000007B7B7B0000000000BDBD - BD007B7B7B000000000000000000BDBDBD00BDBDBD00000000007B7B7B00BDBD - BD0000000000000000007B7B7B00000000008400000084000000840000008400 - 000084000000840000008484840084000000FFFFFF0084000000840000008400 - 0000840000008400000084000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00840000008400000084000000FFFF - FF00840000008400000084000000840000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000000000007B7B7B00BDBD - BD007B7B7B00BDBDBD00BDBDBD007B7B7B0000000000BDBDBD007B7B7B007B7B - 7B007B7B7B007B7B7B007B7B7B00000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0084000000FFFFFF0084000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000BDBDBD00BDBDBD0000000000FFFFFF00FFFFFF0000000000BDBDBD000000 - 00000000000000000000000000007B7B7B008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000007B7B7B0000000000BDBDBD000000 - 0000BDBDBD0000000000BDBDBD00BDBDBD00BDBDBD00FFFFFF007B7B7B000000 - 0000BDBDBD00BDBDBD00000000007B7B7B008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000848400848484000084 - 8400848484000084840084000000840000008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000007B7B7B0000000000BDBDBD00BDBD - BD00FFFFFF00000000007B7B7B0000000000BDBDBD00FFFFFF007B7B7B00BDBD - BD00BDBDBD00BDBDBD00000000007B7B7B008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000084848400008484008484 - 8400008484008484840000848400848484000084840084848400008484008484 - 8400008484000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000007B7B7B0000000000000000000000 - 0000FFFFFF00000000007B7B7B007B7B7B00BDBDBD0000000000BDBDBD000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000848400848484000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BDBDBD00FFFFFF00000000000000000000000000BDBDBD00BDBDBD000000 - 0000000000007B7B7B0000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000084848400848484000000 - 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600000000008484 - 8400008484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 00000000000000000000000000000000000000000000000000007B7B7B00BDBD - BD007B7B7B00BDBDBD00FFFFFF00FFFFFF00BDBDBD00BDBDBD007B7B7B007B7B - 7B007B7B7B00000000007B7B7B00000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000848400848484000084 - 84000000000000FFFF00000000000000000000FFFF0000000000848484000084 - 8400848484000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000007B7B7B0000000000BDBD - BD007B7B7B000000000000000000BDBDBD000000000000000000BDBDBD00BDBD - BD00000000007B7B7B0000000000000000008400000084000000848484008484 - 84008484840084848400840000000000000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000000FFFF0000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF00000000000000000000000000000000007B7B7B000000 - 00007B7B7B0000000000BDBDBD00BDBDBD00BDBDBD00000000007B7B7B000000 - 00007B7B7B000000000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000007B7B - 7B0000000000000000000000000000000000000000007B7B7B00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007B7B7B007B7B7B007B7B7B0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000000000000084000000840000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00C0C0C000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FF00 - 0000FF000000C0C0C000FFFFFF00FFFFFF00FFFFFF0000FFFF000000000000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000C0C0C000FF00 - 0000FF000000C0C0C000C0C0C000C0C0C000FFFFFF00FFFFFF0000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000840000008400000084000000000000008400000000000000000000008400 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF000000000000000000000000000000000000000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000C0C0C000FFFFFF00FFFFFF000000000000FF - FF000000000000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000084000000840000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FF000000FF000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF000000000000000000000000000000000000000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF0000000000FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C000FF000000FF000000C0C0C000C0C0C000C0C0C000FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FF00 - 0000FF000000C0C0C000FFFFFF0000000000000000000000000000000000FFFF - FF000000000000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000FFFFFF008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000C0C0C000FFFFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000FFFFFF00FF00 - 0000FF000000FFFFFF00FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFF - FF0000000000FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000FFFFFF008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 000000000000FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FF000000FF000000C0C0C000FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000000000FFFFFF000000 - 0000FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000084000000840000008400000084000000840000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FF000000FF000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000400000000100010000000000000200000000000000000000 - 000000000000000000000000FFFFFF00FFFF000000000000C001000000000000 - C001000000000000C001000000000000C001000000000000C001000000000000 - 8001000000000000000100000000000000010000000000000001000000000000 - 8001000000000000C001000000000000C001000000000000C003000000000000 - C007000000000000C00F000000000000FFFFFFFFFFFFFFFF000CC007FFFFFFFF - 00088003FFFFFFFF00010001FFFFFFFF00030001F83FFEFF00030001F83FFC7F - 00030000F83FF83F00030000F83FF01F00038000C007E00F0007C000E00FC007 - 000FE000F01FF83F000F8000F83FF83F000F8007FC7FF83F001F8000FEFFF83F - 003FF000FFFFFFFF007FF800FFFFFFFFFFFFFFFFFC7FFFFFFC00FFFFFC27FFFF - 8000FFF9EC23F83F0000E7FFC40100010000C3F3800100010000C3E7C0010001 - 0001E1C7E00000010003F08F000000010003F81F000000010003FC3F00030001 - 0003F81FE00300010003F09FC00100010003C1C780030101800783E3C4078383 - F87F8FF1EC3FFFFFFFFFFFFFFC7FFFFFFFFFFFFFFFFFFFFFFFFF801FFFFFF3FF - C007801FFC01ED9FC0078007FC01ED6FC0078007FC01ED6FC00780010001F16F - C00780010001FD1FC00780010001FC7FC00780010001FEFFC00780010003FC7F - C00780010007FD7FC0078001000FF93FC00FE00100FFFBBFC01FE00301FFFBBF - C03FF80703FFFBBFFFFFF80FFFFFFFFF} - end - object pmAdd: TPopupMenu - Images = ilLinks - OnPopup = pmLinksPopup - Left = 35 - Top = 6 - object miAdd1: TMenuItem - Caption = '&Add...' - Default = True - ImageIndex = 0 - ShortCut = 45 - OnClick = AddClick - end - object miAddComposition1: TMenuItem - Caption = 'Add Composition...' - Hint = 'miAddComposition' - ImageIndex = 1 - OnClick = AddCompositionClick - end - object miLine6: TMenuItem - Caption = '-' - end - object miAddExisting1: TMenuItem - Caption = 'Add Existing' - ShortCut = 32813 - OnClick = AddExistingClick - end - object miAddStandard1: TMenuItem - Caption = 'Add Standard...' - ShortCut = 16429 - OnClick = AddStandardClick - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkDsg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkDsg.pas deleted file mode 100644 index 740d4f04..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmLnkDsg.pas +++ /dev/null @@ -1,1882 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSfmLnkDsg; - -interface - -{$I cxVer.inc} - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignWindows, - {$ELSE} - DsgnIntf, DsgnWnds, LibIntf, - {$ENDIF} - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - Menus, StdCtrls, ExtCtrls, ComCtrls, Buttons, ImgList, - dxCore, dxPSfmLnkAdd, dxPSCore, dxPSDsgProxies, dxPSGlbl; - -type - TdxfmReportLinkDesignWindow = class(TDesignWindow) - pmLinks: TPopupMenu; - pnlButtons: TPanel; - btnAdd: TButton; - btnDelete: TButton; - btnShowDesigner: TButton; - miAdd: TMenuItem; - miDelete: TMenuItem; - miLine1: TMenuItem; - miShowDesigner: TMenuItem; - miLine2: TMenuItem; - miSelectAll: TMenuItem; - btnSelectAll: TButton; - btnRestoreOriginal: TButton; - btnChangeComponent: TButton; - miChangeComponent: TMenuItem; - btnPrintPreview: TButton; - btnPrint: TButton; - miPrintPreview: TMenuItem; - miPrint: TMenuItem; - btnPageSetup: TButton; - miPageSetup: TMenuItem; - miLine3: TMenuItem; - miCopy: TMenuItem; - miCut: TMenuItem; - miPaste: TMenuItem; - miRestoreDefaults: TMenuItem; - miLine: TMenuItem; - miShowButtons: TMenuItem; - miLine5: TMenuItem; - ilLinks: TImageList; - btnMoveUp: TButton; - btnMoveDown: TButton; - miMoveUp: TMenuItem; - miMoveDown: TMenuItem; - miBackgroundEffects: TMenuItem; - miAddStandard: TMenuItem; - N1: TMenuItem; - miBackgroundClear: TMenuItem; - N2: TMenuItem; - btnRestoreDefaults: TButton; - miRestoreOriginal: TMenuItem; - miSetAsCurrent: TMenuItem; - lbxLinks: TListBox; - miEdit: TMenuItem; - N3: TMenuItem; - miBackground: TMenuItem; - miAddExisting: TMenuItem; - pmAdd: TPopupMenu; - miAdd1: TMenuItem; - miAddStandard1: TMenuItem; - miAddExisting1: TMenuItem; - btnDropDownMenu: TButton; - miLine6: TMenuItem; - miAddComposition1: TMenuItem; - miAddComposition: TMenuItem; - miLine7: TMenuItem; - procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure AddClick(Sender: TObject); - procedure AddStandardClick(Sender: TObject); - procedure AddExistingClick(Sender: TObject); - procedure lbxLinksClick(Sender: TObject); - procedure LinkDesignClick(Sender: TObject); - procedure SetAsCurrentClick(Sender: TObject); - procedure LinkChangeComponentClick(Sender: TObject); - procedure RestoreDefaultsClick(Sender: TObject); - procedure RestoreOriginalClick(Sender: TObject); - procedure PageSetupClick(Sender: TObject); - procedure PrintPreviewClick(Sender: TObject); - procedure PrintClick(Sender: TObject); - procedure lbxLinksDblClick(Sender: TObject); - procedure lbxLinksStartDrag(Sender: TObject; var DragObject: TDragObject); - procedure lbxLinksEndDrag(Sender, Target: TObject; X, Y: Integer); - procedure lbxLinksDragOver(Sender, Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); - procedure lbxLinksDragDrop(Sender, Source: TObject; X, Y: Integer); - procedure lbxLinksKeyPress(Sender: TObject; var Key: Char); - procedure EditClick(Sender: TObject); - procedure MoveUpClick(Sender: TObject); - procedure MoveDownClick(Sender: TObject); - procedure lbxLinksDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure BackgroundClick(Sender: TObject); - procedure ClearBackgroundClick(Sender: TObject); - procedure pmLinksPopup(Sender: TObject); - procedure ShowButtonsClick(Sender: TObject); - procedure btnDropDownMenuClick(Sender: TObject); - procedure FormResize(Sender: TObject); - procedure lbxLinksMeasureItem(Control: TWinControl; Index: Integer; - var Height: Integer); - procedure AddCompositionClick(Sender: TObject); - private - FController: TCustomdxComponentPrinter; - FSaveCursor: TCursor; - FSaveDragIndex: Integer; - - function GetControllerDesigner: TAbstractdxReportLinkDesigner; - function GetCurrentLink: TBasedxReportLink; - function GetLink(Index: Integer): TBasedxReportLink; - function GetLinkCount: Integer; - function GetLinkDescription(Index: Integer): string; - function GetRegistryPath: string; - function GetSelected(Index: Integer): Boolean; - function GetSelectedCount: Integer; - procedure SetController(Value: TCustomdxComponentPrinter); - procedure SetSelected(Index: Integer; Value: Boolean); - - function CalculateLinkCaptionWidth: Integer; - function CalculateLinkDescriptionOffset: Integer; - function CalculateLinkDescriptionWidth: Integer; - function CalculateLinkMaxRowWidth: Integer; - - function CanAdd: Boolean; - function CanAddExisting: Boolean; - function CanBackgroundClear: Boolean; - function CanBackgroundEffects: Boolean; - function CanChangeComponent: Boolean; - function CanCopy: Boolean; - function CanCut: Boolean; - function CanDelete: Boolean; - function CanMoveDown: Boolean; - function CanMoveUp: Boolean; - function CanPaste: Boolean; - function CanPageSetup: Boolean; - function CanPrint: Boolean; - function CanPrintPreview: Boolean; - function CanRestoreDefaults: Boolean; - function CanRestoreOriginal: Boolean; - function CanSelectAll: Boolean; - function CanSetAsCurrent: Boolean; - function CanShowDesigner: Boolean; - {$IFDEF DELPHI5} - procedure CheckAddLink; - {$ENDIF} - procedure CheckDeleteLink; - procedure Copy; - procedure Cut; - procedure Delete; - procedure DeleteItem(AItem: TBasedxReportLink); - procedure DrawDragRect; - function GetMinWindowSize: TPoint; - procedure GetSelections(const ASelections: TdxDesignSelectionList); - function IndexOf(AItem: TBasedxReportLink): Integer; - procedure InternalAddLink(ALinkClass: TdxReportLinkClass; AComponent: TComponent; - const AName, ACaption, ACreator, ADescription: string; AShowDesigner: Boolean); - procedure MakeLinkable(AComponent: TComponent); - procedure MoveSelection(ADelta: Integer); - procedure Paste; - procedure PrepareAddExistingItem(AMenuItem: TMenuItem); - procedure RefreshList; - procedure RestoreLayout; - procedure SaveLayout; - procedure Select(AItem: TPersistent; AddToSelection: Boolean); - procedure SelectAll; - procedure SelectController; - procedure StartWait; - procedure StopWait; - procedure UpdateCaption; - procedure UpdateControlsState; - procedure UpdateHScrollBar; - procedure UpdateItem(AItem: TBasedxReportLink); - procedure UpdateMenuState; - procedure UpdateSelections(const ASelections: TdxDesignSelectionList); - procedure WMAppCommand(var Message: TMessage); message WM_APPCOMMAND; - procedure WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); message WM_GETMINMAXINFO; - procedure WMNCCreate(var Message: TWMNCCreate); message WM_NCCREATE; - procedure WMNCDestroy(var Message: TWMNCCreate); message WM_NCDESTROY; - protected - procedure Activated; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - function UniqueName(Comp: TComponent): string; override; - property LinkDescriptions[Index: Integer]: string read GetLinkDescription; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - {$IFDEF DELPHI6} - function EditAction(Action: TEditAction): Boolean; override; - procedure ItemDeleted(const ADesigner: IDesigner; Item: TPersistent); override; - procedure ItemsModified(const Designer: IDesigner); override; - procedure SelectionChanged(const ADesigner: IDesigner; const ASelection: IDesignerSelections); override; - {$ELSE} - procedure ComponentDeleted(Component: IPersistent); override; - procedure EditAction(Action: TEditAction); override; - procedure SelectionChanged(ASelection: {$IFDEF DELPHI5} TDesignerSelectionList {$ELSE} TComponentList{$ENDIF}); override; - procedure FormModified; override; - {$ENDIF} - function GetEditState: TEditState; override; - - property Controller: TCustomdxComponentPrinter read FController write SetController; - property ControllerDesigner: TAbstractdxReportLinkDesigner read GetControllerDesigner; - property CurrentLink: TBasedxReportLink read GetCurrentLink; - property LinkCount: Integer read GetLinkCount; - property Links[Index: Integer]: TBasedxReportLink read GetLink; - property RegistryPath: string read GetRegistryPath; - property Selected[Index: Integer]: Boolean read GetSelected write SetSelected; - property SelectedCount: Integer read GetSelectedCount; - end; - -procedure dxShowReportLinkDesigner(AComponentPrinter: TCustomdxComponentPrinter; - AFormDesigner: TFormDesigner); -function dxReportLinkUniqueName(AComponentPrinter: TCustomdxComponentPrinter; - AComponent: TComponent): string; - -implementation - -{$R *.DFM} - -uses - {$IFDEF DELPHI5} - DesignConst, - {$IFDEF DELPHI6} - ComponentDesigner, - {$ENDIF} - {$ELSE} - LibConst, - {$ENDIF} - Registry, TypInfo, CommCtrl, ColnEdit, cxClasses, dxPSRes, dxPrnPg, dxBkgnd, - dxPSPrVwDsg, dxPSPopupMan, dxPSfmLnkAddE, dxPSUtl, dxPSContainerLnk, - dxPSCompsProvider; - -const - sdxButtonBar = 'ButtonBar'; // Don't localize - sdxWidth = 'Width'; // Don't localize - sdxHeight = 'Height'; // Don't localize - - sdxCantPasteComponent = 'Can''t paste component %s here !'; - sdxCantCreateUniqueName = 'Can''t create unique name for %s.'; - sdxLinkDesigner = 'Editing %s%s%s Links'; - sdxChangeComponent = 'Change Component'; - - sdxLinked = 'Linked'; - sdxLinkedTo = 'Linked to'; - sdxUnassigned = 'Unassigned'; - -type - TdxPSDesignTimedxComponentsProvider = class(TAbstractdxPSComponentsProvider) - private - FComponents: TStrings; - FExistingComponents: TList; - FOptions: TdxPSGetComponentOptions; - FReportLink: TBasedxReportLink; - procedure AppendComponent(AComponent: TComponent; const APathName: string); - procedure EnumComponentsProc(const S: string); - procedure EnumReportLinksProc(const S: string); - procedure GetExistingComponents; - function IsComponentAccessible(AComponent: TComponent): Boolean; - public - function ActiveDesigner: TFormDesigner; - procedure GetComponents(AComponentPrinter: TdxComponentPrinter; AReportLink: TBasedxReportLink; - AComponents: TStrings; AnOptions: TdxPSGetComponentOptions); override; - end; - - TdxReportLinkDesigner = class(TAbstractdxReportLinkDesigner) - private - FDesignWindow: TdxfmReportLinkDesignWindow; - FFormDesigner: TFormDesigner; - FUpdateCount: Integer; - function GetDesignWindow: TdxfmReportLinkDesignWindow; - procedure Activate; - protected - procedure Modified; override; - procedure Update(AItem: TBasedxReportLink); override; - public - constructor Create(AComponentPrinter: TCustomdxComponentPrinter; AFormDesigner: TFormDesigner); - destructor Destroy; override; - - procedure BeginUpdate; override; - procedure CancelUpdate; override; - procedure EndUpdate; override; - - property DesignWindow: TdxfmReportLinkDesignWindow read GetDesignWindow; - property FormDesigner: TFormDesigner read FFormDesigner; - end; - -procedure dxShowReportLinkDesigner(AComponentPrinter: TCustomdxComponentPrinter; AFormDesigner: TFormDesigner); -begin - if AComponentPrinter.ReportLinkDesigner = nil then - TdxReportLinkDesigner.Create(AComponentPrinter, AFormDesigner); - TdxReportLinkDesigner(AComponentPrinter.ReportLinkDesigner).Activate; -end; - -function dxReportLinkUniqueName(AComponentPrinter: TCustomdxComponentPrinter; - AComponent: TComponent): string; -var - I, J: Integer; - S: string; - NameExists: Boolean; - Item: TBasedxReportLink; -begin - S := AComponentPrinter.Name + AComponentPrinter.GetNewLinkName(TBasedxReportLink(AComponent)); - for I := 1 to High(Integer) do - begin - Result := Format(S, [I]); - NameExists := False; - Item := AComponentPrinter.LinkByName(Result); - if Item = nil then - begin - for J := 0 to AComponentPrinter.Owner.ComponentCount - 1 do - if CompareText(AComponentPrinter.Owner.Components[J].Name, Result) = 0 then - begin - NameExists := True; - Break; - end; - if not NameExists then Exit; - end; - end; - raise EdxException.CreateFmt(sdxCantCreateUniqueName, [AComponent.ClassName]); -end; - -{ TdxPSDesignTimedxComponentsProvider } - -function TdxPSDesignTimedxComponentsProvider.ActiveDesigner: TFormDesigner; -begin - {$IFDEF DELPHI6} - Result := ComponentDesigner.ActiveRoot.GetDesigner; - {$ELSE} - Result := TIForm(CompLib.GetActiveForm).Designer; - {$ENDIF} -end; - -procedure TdxPSDesignTimedxComponentsProvider.GetComponents(AComponentPrinter: TdxComponentPrinter; - AReportLink: TBasedxReportLink; AComponents: TStrings; AnOptions: TdxPSGetComponentOptions); -var - Root: TComponent; -begin - if ActiveDesigner = nil then Exit; - - FComponents := AComponents; - FOptions := AnOptions; - FReportLink := AReportLink; - - FExistingComponents := nil; - if gcoExcludeExisting in FOptions then FExistingComponents := TList.Create; - try - if FExistingComponents <> nil then GetExistingComponents; - Root := ActiveDesigner.GetRoot; - if IsComponentAccessible(Root) then AppendComponent(Root, Root.Name); - ActiveDesigner.GetComponentNames(GetTypeData(PTypeInfo(TComponent.ClassInfo)), EnumComponentsProc); - finally - FreeAndNil(FExistingComponents); - end; -end; - -procedure TdxPSDesignTimedxComponentsProvider.AppendComponent(AComponent: TComponent; - const APathName: string); -var - ComponentItem: TdxComponentItem; -begin - if (not (gcoExcludeOutOfActiveForm in FOptions) or (Pos('.', APathName) = 0)) and - (((FReportLink = nil) and dxPSIsSupportedCompClass(AComponent)) or - ((FReportLink <> nil) and FReportLink.Supports(AComponent) and - (FReportLink.Component <> AComponent))) then - begin - ComponentItem := TdxComponentItem.Create(AComponent, APathName, AComponent.ClassName); - FComponents.AddObject(ComponentItem.Caption, ComponentItem); - end; -end; - -procedure TdxPSDesignTimedxComponentsProvider.EnumComponentsProc(const S: string); -var - Component: TComponent; -begin - if ActiveDesigner <> nil then - begin - Component := ActiveDesigner.GetComponent(S); - if IsComponentAccessible(Component) then AppendComponent(Component, S); - end; -end; - -procedure TdxPSDesignTimedxComponentsProvider.EnumReportLinksProc(const S: string); -var - Component: TComponent; -begin - if ActiveDesigner <> nil then - begin - Component := ActiveDesigner.GetComponent(S); - if (Component is TBasedxReportLink) and (TBasedxReportLink(Component).Component <> nil) then - FExistingComponents.Add(TBasedxReportLink(Component).Component); - end; -end; - -procedure TdxPSDesignTimedxComponentsProvider.GetExistingComponents; -begin - if ActiveDesigner <> nil then - ActiveDesigner.GetComponentNames(GetTypeData(TComponent.ClassInfo), EnumReportLinksProc); -end; - -function TdxPSDesignTimedxComponentsProvider.IsComponentAccessible(AComponent: TComponent): Boolean; -var - Inaccessible: Boolean; -begin - Inaccessible := ((AComponent = nil) or (AComponent is TBasedxReportLink) or (AComponent is TCustomdxComponentPrinter)) or - ((FExistingComponents <> nil) and (FExistingComponents.IndexOf(AComponent) <> -1)) or - ((gcoHideCustomContainers in FOptions) and dxPSContainerLnk.dxPSIsComponentContainer(AComponent)); - Result := not Inaccessible; -end; - -{ TdxReportLinkDesigner } - -constructor TdxReportLinkDesigner.Create(AComponentPrinter: TCustomdxComponentPrinter; - AFormDesigner: TFormDesigner); -begin - inherited Create(AComponentPrinter); - FFormDesigner := AFormDesigner; -end; - -destructor TdxReportLinkDesigner.Destroy; -begin - if FDesignWindow <> nil then - begin - FDesignWindow.Designer := nil; - FDesignWindow.Free; - end; - inherited Destroy; -end; - -procedure TdxReportLinkDesigner.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TdxReportLinkDesigner.CancelUpdate; -begin - if FUpdateCount <> 0 then Dec(FUpdateCount); -end; - -procedure TdxReportLinkDesigner.EndUpdate; -begin - if FUpdateCount <> 0 then - begin - Dec(FUpdateCount); - if FUpdateCount = 0 then Update(nil); - end; -end; - -function TdxReportLinkDesigner.GetDesignWindow: TdxfmReportLinkDesignWindow; -begin - if FDesignWindow = nil then - begin - FDesignWindow := TdxfmReportLinkDesignWindow.Create(nil); - FDesignWindow.Designer := FormDesigner; - FDesignWindow.Controller := ComponentPrinter; - end; - Result := FDesignWindow; -end; - -procedure TdxReportLinkDesigner.Activate; -begin - DesignWindow.Show; -end; - -procedure TdxReportLinkDesigner.Modified; -begin - if FormDesigner <> nil then FormDesigner.Modified; -end; - -procedure TdxReportLinkDesigner.Update(AItem: TBasedxReportLink); -begin - if (FUpdateCount = 0) and (FDesignWindow <> nil) then - DesignWindow.UpdateItem(AItem); -end; - -{ TdxfmReportLinkDesigner } - -constructor TdxfmReportLinkDesignWindow.Create(AOwner: TComponent); - - function MakeTTag(AnAction: TEditAction): Integer ; - begin - Result := Integer(AnAction); - end; - -begin - HelpContext := dxPSGlbl.dxhcReportLinkDesignWindow; - inherited; - - miCut.Tag := MakeTTag(eaCut); - miCopy.Tag := MakeTTag(eaCopy); - miPaste.Tag := MakeTTag(eaPaste); - miDelete.Tag := MakeTTag(eaDelete); - miSelectAll.Tag := MakeTTag(eaSelectAll); - - btnDelete.Tag := MakeTTag(eaDelete); - btnSelectAll.Tag := MakeTTag(eaSelectAll); - - RestoreLayout; - dxPSPopupMenuController.RegisterControl(lbxLinks); -end; - -destructor TdxfmReportLinkDesignWindow.Destroy; -begin - dxPSPopupMenuController.UnregisterControl(lbxLinks); - SaveLayout; - if ControllerDesigner <> nil then - TdxReportLinkDesigner(ControllerDesigner).FDesignWindow := nil; - inherited Destroy; -end; - -procedure TdxfmReportLinkDesignWindow.FormKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -var - MenuItem: TMenuItem; -begin - MenuItem := pmLinks.FindItem(Key, fkShortCut); - if (MenuItem <> nil) and MenuItem.Enabled and MenuItem.Visible then - begin - MenuItem.Click; - Key := 0; - end - else - if Key = VK_ESCAPE then - begin - Close; - Key := 0; - end; -end; - -procedure TdxfmReportLinkDesignWindow.FormResize(Sender: TObject); -begin - UpdateHScrollBar; -end; - -procedure TdxfmReportLinkDesignWindow.FormClose(Sender: TObject; - var Action: TCloseAction); -begin - if not (csDestroying in Controller.ComponentState) then - SelectController; - Action := caFree; -end; - -procedure TdxfmReportLinkDesignWindow.AddClick(Sender: TObject); -var - Data: TdxAddReportLinkDlgData; - I: Integer; - Component: TComponent; - LinkClass: TdxReportLinkClass; -begin - {$IFDEF DELPHI5} - CheckAddLink; - {$ENDIF} - FillChar(Data, SizeOf(TdxAddReportLinkDlgData), 0); - Data.Options := [adoShowDesignButton..adoShowCreatorEdit]; - Data.ReportLinkName := UniqueName(nil); - Data.ReportLinkCaption := cxGetResourceString(@sdxNewReport); - Data.ReportLinkCreator := dxPSUtl.GetUserName; - Data.ComponentPrinter := TdxComponentPrinter(Controller); - Data.Components := TList.Create; - try - Data.Title := sdxAddReport; - if dxShowAddComponentsDlg(Data) then - for I := 0 to Data.Components.Count - 1 do - begin - Component := TComponent(Data.Components[I]); - LinkClass := dxPSLinkClassByCompClass(Component); - if LinkClass <> nil then - begin - if (Data.ReportLinkName = '') or (Data.Components.Count <> 1) then - Data.ReportLinkName := UniqueName(nil); - InternalAddLink(LinkClass, Component, Data.ReportLinkName, - Data.ReportLinkCaption, Data.ReportLinkCreator, - Data.ReportLinkDescription, Data.DesignBtnPressed); - end; - end; - finally - Data.Components.Free; - end; -end; - -procedure TdxfmReportLinkDesignWindow.AddCompositionClick(Sender: TObject); -begin - {$IFDEF DELPHI5} - CheckAddLink; - {$ENDIF} - InternalAddLink(TdxCompositionReportLink, nil, UniqueName(nil), - '', dxPSUtl.GetUserName, cxGetResourceString(@sdxComposition), False); -end; - -procedure TdxfmReportLinkDesignWindow.btnDropDownMenuClick(Sender: TObject); -var - X, Y: Integer; -begin - with btnAdd do - begin - X := ClientOrigin.X; - Y := ClientOrigin.Y + Height; - end; - dxPSPopupMan.dxPSPopupMenuController.ShowPopup(X, Y, nil, pmAdd); -end; - -procedure TdxfmReportLinkDesignWindow.AddStandardClick(Sender: TObject); -var - Data: TdxAddReportLinkClassDlgData; -begin - {$IFDEF DELPHI5} - CheckAddLink; - {$ENDIF} - FillChar(Data, SizeOf(TdxAddReportLinkClassDlgData), 0); - Data.ReportLinkName := UniqueName(nil); - Data.ReportLinkCaption := sdxNewReport; - Data.ReportLinkCreator := dxPSUtl.GetUserName; - if dxShowAddReportLinkClassDlg(Data) then - begin - if Data.ReportLinkName = '' then - Data.ReportLinkName := UniqueName(nil); - InternalAddLink(Data.ReportLinkClass, nil, Data.ReportLinkName, Data.ReportLinkCaption, - Data.ReportLinkCreator, Data.ReportLinkDescription, Data.DesignBtnPressed); - end; -end; - -procedure TdxfmReportLinkDesignWindow.AddExistingClick(Sender: TObject); -var - Link: TBasedxReportLink; -begin - {$IFDEF DELPHI5} - CheckAddLink; - {$ENDIF} - Link := TBasedxReportLink(TComponent(Sender).Tag); - if Link <> nil then - InternalAddLink(Link.LinkClass, nil, UniqueName(Link), - Link.ReportDocument.Caption, Link.ReportDocument.Creator, - Link.ReportDocument.Description, False); -end; - -procedure TdxfmReportLinkDesignWindow.lbxLinksClick(Sender: TObject); -var - Selections: TdxDesignSelectionList; -begin - Selections := CreateDesignSelectionList; - GetSelections(Selections); - Designer.SetSelections(Selections); -end; - -procedure TdxfmReportLinkDesignWindow.LinkDesignClick(Sender: TObject); -begin - CurrentLink.IsCurrentLink := True; - if CurrentLink is TdxCompositionReportLink then - ShowCollectionEditor(Designer, CurrentLink, TdxCompositionReportLink(CurrentLink).Items, 'Items') - else - if Controller.DesignReport(CurrentLink) then - Designer.Modified; -end; - -procedure TdxfmReportLinkDesignWindow.SetAsCurrentClick(Sender: TObject); -begin - Controller.CurrentLink := CurrentLink; -end; - -procedure TdxfmReportLinkDesignWindow.LinkChangeComponentClick(Sender: TObject); -var - Data: TdxAddReportLinkDlgData; -begin - FillChar(Data, SizeOf(TdxAddReportLinkDlgData), 0); - Data.ReportLink := CurrentLink; - Data.ComponentPrinter := TdxComponentPrinter(Controller); - Data.Components := TList.Create; - try - Data.Options := [adoShowOnlyComponentsWOLinks..adoShowOnlyComponentsInActiveForm, adoShowHideCustomContainers]; - Data.Title := sdxChangeComponent; - if dxShowAddComponentsDlg(Data) and (Data.Components.Count <> 0) then - begin - CurrentLink.Component := TComponent(Data.Components[0]); - Designer.Modified; - ActiveControl := lbxLinks; - end; - finally - Data.Components.Free; - end; -end; - -procedure TdxfmReportLinkDesignWindow.RestoreDefaultsClick(Sender: TObject); -var - I: Integer; -begin - for I := 0 to LinkCount - 1 do - if Selected[I] or (SelectedCount = 0) then - begin - Links[I].RestoreDefaults; - Links[I].RealPrinterPage.RestoreDefaults; - end; -end; - -procedure TdxfmReportLinkDesignWindow.RestoreOriginalClick(Sender: TObject); -var - I: Integer; -begin - for I := 0 to LinkCount - 1 do - if (Selected[I] or (SelectedCount = 0)) and Links[I].DataProviderPresent then - Links[I].RestoreFromOriginal; -end; - -procedure TdxfmReportLinkDesignWindow.PageSetupClick(Sender: TObject); -begin - CurrentLink.IsCurrentLink := True; - if CurrentLink.PageSetup then Designer.Modified; -end; - -procedure TdxfmReportLinkDesignWindow.PrintPreviewClick(Sender: TObject); -begin - CurrentLink.IsCurrentLink := True; - dxShowPreviewWindow(Controller, Designer); -end; - -procedure TdxfmReportLinkDesignWindow.PrintClick(Sender: TObject); -begin - CurrentLink.IsCurrentLink := True; - Controller.Print(True, nil, nil); -end; - -procedure TdxfmReportLinkDesignWindow.lbxLinksDblClick(Sender: TObject); -begin - if CanShowDesigner then - LinkDesignClick(Sender) - else - if CanPrintPreview then - PrintPreviewClick(Sender) - else - if CanPageSetup then - PageSetupClick(Sender); -end; - -procedure TdxfmReportLinkDesignWindow.lbxLinksStartDrag(Sender: TObject; - var DragObject: TDragObject); -begin - FSaveDragIndex := -1; -end; - -procedure TdxfmReportLinkDesignWindow.lbxLinksEndDrag(Sender, Target: TObject; - X, Y: Integer); -begin - DrawDragRect; -end; - -procedure TdxfmReportLinkDesignWindow.lbxLinksDragOver(Sender, Source: TObject; - X, Y: Integer; State: TDragState; var Accept: Boolean); -var - Index: Integer; -begin - Accept := Sender = Source; - if Accept then - with TListBox(Sender) do - begin - Index := ItemAtPos(MakePoint(X, Y), True); - Accept := (Index <> -1) and (FSaveDragIndex <> ItemIndex); - DrawDragRect; - FSaveDragIndex := Index; - DrawDragRect; - end; -end; - -procedure TdxfmReportLinkDesignWindow.lbxLinksDragDrop(Sender, Source: TObject; - X, Y: Integer); -begin - MoveSelection(FSaveDragIndex - TListBox(Sender).ItemIndex); -end; - -procedure TdxfmReportLinkDesignWindow.lbxLinksKeyPress(Sender: TObject; - var Key: Char); -begin - case Key of - #13, #33..#126: - begin - if Key = #13 then Key := #0; - ActivateInspector(Key); - Key := #0; - end; - #27: - begin - SelectController; - Key := #0; - end; - end; -end; - -procedure TdxfmReportLinkDesignWindow.EditClick(Sender: TObject); -begin - EditAction(TEditAction(TComponent(Sender).Tag)); -end; - -procedure TdxfmReportLinkDesignWindow.MoveUpClick(Sender: TObject); -begin - MoveSelection(-1); -end; - -procedure TdxfmReportLinkDesignWindow.MoveDownClick(Sender: TObject); -begin - MoveSelection(1); -end; - -procedure TdxfmReportLinkDesignWindow.lbxLinksMeasureItem( - Control: TWinControl; Index: Integer; var Height: Integer); -begin - with TListBox(Control).Canvas do - begin - Font.Style := Font.Style + [fsBold]; - Height := 2 + TextHeight('Wg') + 2; - Font.Style := Font.Style - [fsBold]; - end; -end; - -procedure TdxfmReportLinkDesignWindow.lbxLinksDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -var - Link: TBasedxReportLink; - S: string; - X, Y, Ri: Integer; - TextColor, BrushColor: TColor; -begin - Link := Links[Index]; - S := LinkDescriptions[Index]; - - with TListBox(Control) do - begin - Canvas.FillRect(Rect); - - if Link.IsCurrentLink then - Canvas.Font.Style := Canvas.Font.Style + [fsBold]; - with Rect do - begin - X := Left + 2; - Y := Top + (Bottom - Top - Canvas.TextHeight('Wg')) div 2; - Ri := Right; - if S <> '' then - Right := Left + 2 + Canvas.TextWidth(Link.Name) + 2; - end; - - BrushColor := Canvas.Brush.Color; - Canvas.Brush.Style := bsClear; - Canvas.TextRect(Rect, X, Y, Link.Name); - - if S <> '' then - begin - X := Rect.Left + CalculateLinkDescriptionOffset; - Rect.Right := Ri; - - TextColor := Canvas.Font.Color; - if not (odSelected in State) then - Canvas.Font.Color := clBlue; - Canvas.TextRect(Rect, X, Y, S); - Canvas.Font.Color := TextColor; - end; - Canvas.Brush.Style := bsSolid; - Canvas.Brush.Color := BrushColor; - if Link.IsCurrentLink then - Canvas.Font.Style := Canvas.Font.Style - [fsBold]; - end; -end; - -procedure TdxfmReportLinkDesignWindow.BackgroundClick(Sender: TObject); -var - Background: TdxBackground; - I: Integer; -begin - StartWait; - try - Background := TdxBackground.Create; - try - for I := 0 to LinkCount - 1 do - if Selected[I] or (SelectedCount = 0) then - begin - Background.Assign(Links[I].RealPrinterPage.Background); - Break; - end; - if Background.SetupEffects then - begin - for I := 0 to LinkCount - 1 do - if Selected[I] or (SelectedCount = 0) then - Links[I].RealPrinterPage.Background := Background; - Designer.Modified; - end; - finally - Background.Free; - end; - finally - StopWait; - end; -end; - -procedure TdxfmReportLinkDesignWindow.ClearBackgroundClick(Sender: TObject); -var - I: Integer; -begin - for I := 0 to LinkCount - 1 do - if Selected[I] or (SelectedCount = 0) then - Links[I].RealPrinterPage.Background.Clear; - Designer.Modified; -end; - -procedure TdxfmReportLinkDesignWindow.pmLinksPopup(Sender: TObject); -begin - UpdateMenuState; -end; - -procedure TdxfmReportLinkDesignWindow.ShowButtonsClick(Sender: TObject); -begin - pnlButtons.Visible := not pnlButtons.Visible; -end; - -{$IFDEF DELPHI6} -function TdxfmReportLinkDesignWindow.EditAction(Action: TEditAction): Boolean; -{$ELSE} -procedure TdxfmReportLinkDesignWindow.EditAction(Action: TEditAction); -{$ENDIF} -begin -{$IFDEF DELPHI6} - Result := True; -{$ENDIF} - case Action of - eaCut: Cut; - eaCopy: Copy; - eaPaste: Paste; - eaDelete: Delete; - eaSelectAll: SelectAll; - end; -end; - -function TdxfmReportLinkDesignWindow.GetEditState: TEditState; -begin - Result := []; - if CanCut then - Result := Result + [esCanCut]; - if CanCopy then - Result := Result + [esCanCopy]; - if CanPaste then - Result := Result + [esCanPaste]; - if CanDelete then - Result := Result + [esCanDelete]; - if CanSelectAll then - Result := Result + [esCanSelectAll]; -end; - -{$IFDEF DELPHI6} - -procedure TdxfmReportLinkDesignWindow.ItemDeleted(const ADesigner: IDesigner; - Item: TPersistent); -begin - inherited ItemDeleted(ADesigner, Item); - if (ADesigner = Designer) and (Item is TBasedxReportLink) and - (Controller <> nil) and not (csDestroying in Controller.ComponentState) then - DeleteItem(TBasedxReportLink(Item)); -end; - -procedure TdxfmReportLinkDesignWindow.ItemsModified(const Designer: IDesigner); -begin - inherited ItemsModified(Designer); - UpdateCaption; -end; - -procedure TdxfmReportLinkDesignWindow.SelectionChanged(const ADesigner: IDesigner; - const ASelection: IDesignerSelections); -begin - inherited SelectionChanged(ADesigner, ASelection); - if ADesigner = Designer then UpdateSelections(ASelection); -end; - -{$ELSE} - -procedure TdxfmReportLinkDesignWindow.ComponentDeleted(Component: IPersistent); -var - Item: TPersistent; -begin - inherited ComponentDeleted(Component); - Item := dxPSDsgProxies.TryExtractPersistent(Component); - if (Item is TBasedxReportLink) and (Controller <> nil) and - not (csDestroying in Controller.ComponentState) then - DeleteItem(TBasedxReportLink(Item)); -end; - -procedure TdxfmReportLinkDesignWindow.SelectionChanged( - ASelection: {$IFDEF DELPHI5} TDesignerSelectionList {$ELSE} TComponentList {$ENDIF}); -begin - inherited SelectionChanged(ASelection); - UpdateSelections(ASelection); -end; - -procedure TdxfmReportLinkDesignWindow.FormModified; -begin - inherited FormModified; - UpdateCaption; -end; -{$ENDIF} - -procedure TdxfmReportLinkDesignWindow.Activated; -var - Selections: TdxDesignSelectionList; -begin - inherited Activated; - Selections := CreateDesignSelectionList; - try - Designer.GetSelections(Selections); - UpdateSelections(Selections); - finally - FreeDesignSelectionList(Selections); - end; -end; - -procedure TdxfmReportLinkDesignWindow.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params do - Style := Style or WS_THICKFRAME; -{$IFDEF DELPHI9} - Params.WndParent := Application.MainForm.Handle; -{$ENDIF} -end; - -procedure TdxfmReportLinkDesignWindow.CreateWnd; -begin - inherited CreateWnd; - SendMessage(Handle, WM_SETICON, 1, Icon.Handle) -end; - -function TdxfmReportLinkDesignWindow.UniqueName(Comp: TComponent): string; -begin - Result := dxReportLinkUniqueName(Controller, Comp); -end; - -function TdxfmReportLinkDesignWindow.GetControllerDesigner: TAbstractdxReportLinkDesigner; -begin - if Controller <> nil then - Result := Controller.ReportLinkDesigner - else - Result := nil; -end; - -function TdxfmReportLinkDesignWindow.GetCurrentLink: TBasedxReportLink; -begin - if LinkCount <> 0 then - Result := Links[lbxLinks.ItemIndex] - else - Result := nil; -end; - -function TdxfmReportLinkDesignWindow.GetLink(Index: Integer): TBasedxReportLink; -begin - Result := TBasedxReportLink(lbxLinks.Items.Objects[Index]); -end; - -function TdxfmReportLinkDesignWindow.GetLinkCount: Integer; -begin - Result := lbxLinks.Items.Count; -end; - -function TdxfmReportLinkDesignWindow.GetLinkDescription(Index: Integer): string; -var - Link: TBasedxReportLink; -begin - Link := Links[Index]; - if Link.Component <> nil then - Result := sdxLinkedTo + ' ' + Link.Component.Name - else - if Link.DataProviderPresent then - Result := sdxLinked - else - Result := sdxUnassigned; - - Result := '[' + Result + ']'; -end; - -function TdxfmReportLinkDesignWindow.GetRegistryPath: string; -begin - Result := dxPSDsgProxies.GetBaseRegistryKey + '\' + sdxPSRegPathRunTimeFormLayouts + '\' + DropT(ClassName); -end; - -function TdxfmReportLinkDesignWindow.GetSelected(Index: Integer): Boolean; -begin - Result := lbxLinks.Selected[Index] -end; - -function TdxfmReportLinkDesignWindow.GetSelectedCount: Integer; -begin - Result := lbxLinks.SelCount; -end; - -procedure TdxfmReportLinkDesignWindow.SetController(Value: TCustomdxComponentPrinter); -begin - if FController <> Value then - begin - FController := Value; - UpdateCaption; - RefreshList; - end; -end; - -procedure TdxfmReportLinkDesignWindow.SetSelected(Index: Integer; Value: Boolean); -begin - lbxLinks.Selected[Index] := Value; -end; - -function TdxfmReportLinkDesignWindow.CalculateLinkCaptionWidth: Integer; -var - I, W: Integer; -begin - Result := 0; - with lbxLinks do - for I := 0 to Items.Count - 1 do - begin - if Links[I].IsCurrentLink then - Canvas.Font.Style := Canvas.Font.Style + [fsBold]; - W := Canvas.TextWidth(Items[I]); - Canvas.Font.Style := Canvas.Font.Style - [fsBold]; - if Result < W then Result := W; - end; -end; - -function TdxfmReportLinkDesignWindow.CalculateLinkDescriptionOffset: Integer; -begin - Result := CalculateLinkCaptionWidth + 10; -end; - -function TdxfmReportLinkDesignWindow.CalculateLinkDescriptionWidth: Integer; -var - I, W: Integer; -begin - Result := 0; - with lbxLinks do - for I := 0 to LinkCount - 1 do - begin - if Links[I].IsCurrentLink then - Canvas.Font.Style := Canvas.Font.Style + [fsBold]; - W := Canvas.TextWidth(LinkDescriptions[I]); - Canvas.Font.Style := Canvas.Font.Style - [fsBold]; - if Result < W then Result := W; - end; -end; - -function TdxfmReportLinkDesignWindow.CalculateLinkMaxRowWidth: Integer; -begin - Result := CalculateLinkDescriptionOffset + CalculateLinkDescriptionWidth; -end; - -function TdxfmReportLinkDesignWindow.CanAdd: Boolean; -begin - {$IFDEF DELPHI5} - Result := not ((Controller <> nil) and (Controller.Owner <> nil) and - (csInline in Controller.Owner.ComponentState)); - {$ELSE} - Result := True; - {$ENDIF} -end; - -function TdxfmReportLinkDesignWindow.CanAddExisting: Boolean; -begin - Result := CanAdd and (CurrentLink <> nil); -end; - -function TdxfmReportLinkDesignWindow.CanBackgroundClear: Boolean; -begin - Result := LinkCount <> 0; -end; - -function TdxfmReportLinkDesignWindow.CanBackgroundEffects: Boolean; -begin - Result := LinkCount <> 0; -end; - -function TdxfmReportLinkDesignWindow.CanChangeComponent: Boolean; -begin - Result := (SelectedCount = 1) and not (CurrentLink is TdxCompositionReportLink); -end; - -function TdxfmReportLinkDesignWindow.CanCopy: Boolean; -begin - Result := SelectedCount <> 0; -end; - -function TdxfmReportLinkDesignWindow.CanCut: Boolean; -begin - Result := CanCopy and CanDelete; -end; - -function TdxfmReportLinkDesignWindow.CanDelete: Boolean; -var - I: Integer; -begin - Result := SelectedCount <> 0; - if Result then - for I := 0 to LinkCount - 1 do - if Selected[I] and (csAncestor in Links[I].ComponentState) then - begin - Result := False; - Exit; - end; -end; - -function TdxfmReportLinkDesignWindow.CanMoveDown: Boolean; -var - I, Counter: Integer; -begin - Counter := 0; - for I := LinkCount - 1 downto 0 do - begin - if not Selected[I] then - begin - Result := Counter < SelectedCount; - Exit; - end; - Inc(Counter); - end; - Result := False; -end; - -function TdxfmReportLinkDesignWindow.CanMoveUp: Boolean; -var - I: Integer; -begin - for I := 0 to LinkCount - 1 do - if not Selected[I] then - begin - Result := I < SelectedCount; - Exit; - end; - Result := False; -end; - -function TdxfmReportLinkDesignWindow.CanPaste: Boolean; -begin - Result := CanAdd and ClipboardComponents {$IFDEF DELPHI5} and Designer.CanPaste {$ENDIF}; -end; - -function TdxfmReportLinkDesignWindow.CanPageSetup: Boolean; -begin - Result := SelectedCount = 1; -end; - -function TdxfmReportLinkDesignWindow.CanPrint: Boolean; -begin - Result := (SelectedCount = 1) and (CurrentLink <> nil) and CurrentLink.DataProviderPresent; -end; - -function TdxfmReportLinkDesignWindow.CanPrintPreview: Boolean; -begin - Result := (SelectedCount = 1) and (CurrentLink <> nil) and CurrentLink.DataProviderPresent; -end; - -function TdxfmReportLinkDesignWindow.CanRestoreDefaults: Boolean; -begin - Result := CurrentLink <> nil; -end; - -function TdxfmReportLinkDesignWindow.CanRestoreOriginal: Boolean; -begin - Result := LinkCount > 0; -end; - -function TdxfmReportLinkDesignWindow.CanSelectAll: Boolean; -begin - Result := LinkCount <> SelectedCount; -end; - -function TdxfmReportLinkDesignWindow.CanSetAsCurrent: Boolean; -begin - Result := (SelectedCount = 1) and (CurrentLink <> nil) and not CurrentLink.IsCurrentLink; -end; - -function TdxfmReportLinkDesignWindow.CanShowDesigner: Boolean; -begin - Result := (SelectedCount = 1) and (CurrentLink <> nil) and CurrentLink.CheckToDesign; -end; - -{$IFDEF DELPHI5} -procedure TdxfmReportLinkDesignWindow.CheckAddLink; -begin - if not CanAdd then - raise EdxException.CreateRes(@SCantAddToFrame); -end; -{$ENDIF} - -procedure TdxfmReportLinkDesignWindow.CheckDeleteLink; -begin - if not CanDelete then - raise EdxException.CreateRes(@SCantDeleteAncestor); -end; - -procedure TdxfmReportLinkDesignWindow.Copy; -var - Components: TdxDesignSelectionList; -begin - Components := CreateDesignSelectionList; - try - GetSelections(Components); - CopyComponents(Controller.Owner, Components); - finally - FreeDesignSelectionList(Components); - end; - UpdateHScrollBar; -end; - -procedure TdxfmReportLinkDesignWindow.Cut; -begin - Copy; - CheckDeleteLink; - Delete; -end; - -procedure TdxfmReportLinkDesignWindow.Delete; -var - Selections: TdxDesignSelectionList; - I, ItemIndex: Integer; - Item: TComponent; -begin - StartWait; - try - ControllerDesigner.BeginUpdate; - try - Selections := CreateDesignSelectionList; - try - GetSelections(Selections); - ItemIndex := lbxLinks.ItemIndex; - for I := 0 to Selections.Count - 1 do - begin - Item := TComponent(Selections[I]); - if not (csAncestor in Item.ComponentState) then Item.Free; - end; - if ItemIndex < 0 then - ItemIndex := 0; - if ItemIndex > LinkCount - 1 then - ItemIndex := LinkCount - 1; - finally - FreeDesignSelectionList(Selections); - end; - finally - ControllerDesigner.CancelUpdate; - end; - if ItemIndex <> -1 then - Select(Links[ItemIndex], False) - else - SelectController; - UpdateHScrollBar; - finally - StopWait; - end; -end; - -procedure TdxfmReportLinkDesignWindow.DeleteItem(AItem: TBasedxReportLink); -var - Index, ItemIndex: Integer; -begin - Index := IndexOf(AItem); - if Index <> -1 then - begin - ItemIndex := lbxLinks.ItemIndex; - lbxLinks.Items.Delete(Index); - if ItemIndex < 0 then - ItemIndex := 0; - if ItemIndex > LinkCount - 1 then - ItemIndex := LinkCount - 1; - if ItemIndex <> -1 then - Select(Links[ItemIndex], False) - else - SelectController; - UpdateHScrollBar; - end; -end; - -procedure TdxfmReportLinkDesignWindow.DrawDragRect; -begin - with lbxLinks do - if (FSaveDragIndex <> -1) and (FSaveDragIndex <> ItemIndex) then - DrawFocusRect(Canvas.Handle, ItemRect(FSaveDragIndex)); -end; - -function TdxfmReportLinkDesignWindow.GetMinWindowSize: TPoint; -begin - Result.X := 300; - Result.Y := btnPrint.Top + btnPrint.Height + - GetSystemMetrics(SM_CYCAPTION) + 2 * GetSystemMetrics(SM_CXFRAME) + 4; -end; - -procedure TdxfmReportLinkDesignWindow.GetSelections(const ASelections: TdxDesignSelectionList); -var - I: Integer; -begin - for I := 0 to LinkCount - 1 do - if Selected[I] then - ASelections.Add(Links[I]); - if ASelections.Count = 0 then - ASelections.Add(Controller); -end; - -function TdxfmReportLinkDesignWindow.IndexOf(AItem: TBasedxReportLink): Integer; -begin - Result := lbxLinks.Items.IndexOfObject(AItem); -end; - -procedure TdxfmReportLinkDesignWindow.InternalAddLink(ALinkClass: TdxReportLinkClass; - AComponent: TComponent; const AName, ACaption, ACreator, ADescription: string; - AShowDesigner: Boolean); -var - Link: TBasedxReportLink; -begin -// ALink := TBasedxReportLink(Designer.CreateComponent(ALinkClass, Designer.GetRoot, 0, 0, 0, 0)); - ControllerDesigner.BeginUpdate; - try - Link := Controller.AddEmptyLinkEx(ALinkClass, Designer.GetRoot); - Link.Component := AComponent; - Link.Name := AName; - if ACaption <> cxGetResourceString(@sdxNewReport) then - Link.ReportDocument.Caption := ACaption; - Link.ReportDocument.Creator := ACreator; - Link.ReportDocument.Description := ADescription; - finally - ControllerDesigner.CancelUpdate; - end; - - if AComponent <> nil then - Self.MakeLinkable(AComponent); - - lbxLinks.Items.AddObject(Link.Name, Link); - Select(Link, False); - UpdateHScrollBar; - lbxLinks.Update; - - if AShowDesigner then LinkDesignClick(nil); -end; - -procedure TdxfmReportLinkDesignWindow.MakeLinkable(AComponent: TComponent); -begin - with Designer do - if (GetRoot.FindComponent(AComponent.Name) <> AComponent) and not IsComponentLinkable(AComponent) then - MakeComponentLinkable(AComponent) -end; - -procedure TdxfmReportLinkDesignWindow.MoveSelection(ADelta: Integer); - - procedure MoveDown(ADelta: Integer); - var - I, Index: Integer; - begin - for I := LinkCount - 1 downto 0 do - if Selected[I] then - begin - Index := Links[I].Index; - Inc(Index, ADelta); - if Index > LinkCount - 1 then - Index := LinkCount - 1; -// while (Index < LinkCount) and Selected[Index] do -// Inc(Index); - Links[I].Index := Index; - end; - end; - - procedure MoveUp(ADelta: Integer); - var - I, Index: Integer; - begin - for I := 0 to LinkCount - 1 do - if Selected[I] then - begin - Index := Links[I].Index; - Inc(Index, ADelta); - if Index < 0 then - Index := 0; -// while (Index > -1) and Selected[Index] do -// Dec(Index); - Links[I].Index := Index; - end; - end; - -begin - ControllerDesigner.BeginUpdate; - try - if ADelta > 0 then - MoveDown(ADelta) - else - MoveUp(ADelta); - finally - ControllerDesigner.EndUpdate; - end; -end; - -procedure TdxfmReportLinkDesignWindow.Paste; -var - Components: TdxDesignSelectionList; - I: Integer; -begin - Components := CreateDesignSelectionList; - try - StartWait; - try - lbxLinks.Items.BeginUpdate; - try - ControllerDesigner.BeginUpdate; - try - PasteComponents(Controller.Owner, Controller, Components); - finally - ControllerDesigner.EndUpdate; - end; - for I := LinkCount - 1 downto LinkCount - Components.Count do - Selected[I] := True; - Designer.SetSelections(Components); - finally - lbxLinks.Items.EndUpdate; - end; - finally - StopWait; - end; - finally - FreeDesignSelectionList(Components); - end; - UpdateHScrollBar; -end; - -procedure TdxfmReportLinkDesignWindow.PrepareAddExistingItem(AMenuItem: TMenuItem); -begin - if CanAddExisting then - begin - AMenuItem.Caption := 'Add ' + DropT(CurrentLink.ClassName); - AMenuItem.Tag := Integer(CurrentLink); - end; -end; - -procedure TdxfmReportLinkDesignWindow.RefreshList; -var - Selections: TdxDesignSelectionList; - I, Index: Integer; - Item: TBasedxReportLink; - Component: TPersistent; -begin - lbxLinks.Items.BeginUpdate; - try - Selections := CreateDesignSelectionList; - try - GetSelections(Selections); - - lbxLinks.Items.Clear; - if Controller = nil then Exit; - - for I := 0 to Controller.LinkCount - 1 do - begin - Item := Controller.ReportLink[I]; - if Item.Owner = Controller.Owner then - lbxLinks.Items.AddObject(Item.Name, Item); - end; - - for I := 0 to Selections.Count - 1 do - begin - Component := Selections[I]; - if Component is TBasedxReportLink then - begin - Index := IndexOf(TBasedxReportLink(Component)); - if Index <> -1 then - Selected[Index] := True; - end; - end; - finally - FreeDesignSelectionList(Selections); - end; - finally - lbxLinks.Items.EndUpdate; - end; - UpdateHScrollBar; -end; - -procedure TdxfmReportLinkDesignWindow.RestoreLayout; -begin - with TRegistry.Create do - try - try - if OpenKey(RegistryPath, False) then - begin - if ValueExists(sdxButtonBar) then - pnlButtons.Visible := ReadBool(sdxButtonBar); - if ValueExists(sdxWidth) then - Width := ReadInteger(sdxWidth); - if ValueExists(sdxHeight) then - Height := ReadInteger(sdxHeight); - end; - except - // - end; - finally - Free; - end; -end; - -procedure TdxfmReportLinkDesignWindow.SaveLayout; -begin - with TRegistry.Create do - try - try - if OpenKey(RegistryPath, True) then - begin - WriteBool(sdxButtonBar, pnlButtons.Visible); - WriteInteger(sdxWidth, Width); - WriteInteger(sdxHeight, Height); - end; - except - // - end; - finally - Free; - end; -end; - -procedure TdxfmReportLinkDesignWindow.Select(AItem: TPersistent; AddToSelection: Boolean); -var - Selections: TdxDesignSelectionList; -begin - Selections := CreateDesignSelectionList; - if AddToSelection then - Designer.GetSelections(Selections); - Selections.Add(AItem); - Designer.SetSelections(Selections); -end; - -procedure TdxfmReportLinkDesignWindow.SelectAll; -var - Selections: TdxDesignSelectionList; - I: Integer; -begin - Selections := CreateDesignSelectionList; - for I := 0 to LinkCount - 1 do - Selections.Add(Links[I]); - Designer.SetSelections(Selections); -end; - -procedure TdxfmReportLinkDesignWindow.SelectController; -begin - Select(Controller, False); -end; - -procedure TdxfmReportLinkDesignWindow.StartWait; -begin - FSaveCursor := Screen.Cursor; - Screen.Cursor := crHourGlass; -end; - -procedure TdxfmReportLinkDesignWindow.StopWait; -begin - Screen.Cursor := FSaveCursor; -end; - -procedure TdxfmReportLinkDesignWindow.UpdateCaption; -var - NewCaption: string; -begin - if (Controller <> nil) and (Controller.Owner <> nil) then - NewCaption := Format(sdxLinkDesigner, [Controller.Owner.Name, '.', Controller.Name]); - if Caption <> NewCaption then - Caption := NewCaption; -end; - -procedure TdxfmReportLinkDesignWindow.UpdateControlsState; -begin - btnAdd.Enabled := CanAdd; - btnDropDownMenu.Enabled := CanAdd; - btnDelete.Enabled := CanDelete; - btnSelectAll.Enabled := CanSelectAll; - btnMoveUp.Enabled := CanMoveUp; - btnMoveDown.Enabled := CanMoveDown; - btnShowDesigner.Enabled := CanShowDesigner; - btnChangeComponent.Enabled := CanChangeComponent; - btnRestoreDefaults.Enabled := CanRestoreDefaults; - btnRestoreOriginal.Enabled := CanRestoreOriginal; - btnPageSetup.Enabled := CanPageSetup; - btnPrintPreview.Enabled := CanPrintPreview; - btnPrint.Enabled := CanPrint; -end; - -procedure TdxfmReportLinkDesignWindow.UpdateHScrollBar; -begin - lbxLinks.Perform(LB_SETHORIZONTALEXTENT, 2 + CalculateLinkMaxRowWidth + 2, 0); -end; - -procedure TdxfmReportLinkDesignWindow.UpdateItem(AItem: TBasedxReportLink); -var - Index: Integer; -begin - if AItem <> nil then - begin - Index := IndexOf(AItem); - if Index <> -1 then - begin - lbxLinks.Items[Index] := AItem.Name; - UpdateHScrollBar; - end; - end - else - RefreshList; - UpdateControlsState; -end; - -procedure TdxfmReportLinkDesignWindow.UpdateMenuState; -begin - miAdd.Enabled := CanAdd; - miAdd1.Enabled := CanAdd; - miAddComposition.Enabled := CanAdd; - miAddComposition1.Enabled := CanAdd; - miAddStandard.Visible := CanAdd; - miAddStandard1.Visible := CanAdd; - miAddExisting.Visible := CanAddExisting; - miAddExisting1.Visible := CanAddExisting; - PrepareAddExistingItem(miAddExisting); - PrepareAddExistingItem(miAddExisting1); - - miCut.Enabled := CanCut; - miCopy.Enabled := CanCopy; - miPaste.Enabled := CanPaste; - miDelete.Enabled := CanDelete; - miSelectAll.Enabled := CanSelectAll; - miMoveUp.Enabled := CanMoveUp; - miMoveDown.Enabled := CanMoveDown; - miShowDesigner.Enabled := CanShowDesigner; - miSetAsCurrent.Enabled := CanSetAsCurrent; - miChangeComponent.Enabled := CanChangeComponent; - miRestoreDefaults.Enabled := CanRestoreDefaults; - miRestoreOriginal.Enabled := CanRestoreOriginal; - miPageSetup.Enabled := CanPageSetup; - miPrintPreview.Enabled := CanPrintPreview; - miPrint.Enabled := CanPrint; - miBackgroundEffects.Enabled := CanBackgroundEffects; - miBackgroundClear.Enabled := CanBackgroundClear; - miShowButtons.Checked := pnlButtons.Visible; - - if CanShowDesigner then - miShowDesigner.Default := True - else - if CanPrintPreview then - miPrintPreview.Default := True - else - if CanPageSetup then - miPageSetup.Default := True; -end; - -procedure TdxfmReportLinkDesignWindow.UpdateSelections(const ASelections: TdxDesignSelectionList); - - function InSelection(ALink: TBasedxReportLink): Boolean; - var - I: Integer; - begin - for I := 0 to ASelections.Count - 1 do - if ALink = ASelections[I] then - begin - Result := True; - Exit; - end; - Result := False; - end; - -var - I: Integer; -begin - if (ASelections = nil) or (Controller = nil) or (csDestroying in Controller.ComponentState) or - (ControllerDesigner = nil) or (TdxReportLinkDesigner(ControllerDesigner).FUpdateCount <> 0) then - Exit; - for I := 0 to LinkCount - 1 do - if Selected[I] <> InSelection(Links[I]) then - Selected[I] := not Selected[I]; - UpdateControlsState; -end; - -procedure TdxfmReportLinkDesignWindow.WMAppCommand(var Message: TMessage); -begin - with Message do - case dxPSGlbl.GET_APPCOMMAND_LPARAM(lParam) of - APPCOMMAND_COPY: - begin - Result := Ord(CanCopy); - if Result = 1 then EditAction(eaCopy); - end; - - APPCOMMAND_CUT: - begin - Result := Ord(CanCut); - if Result = 1 then EditAction(eaCut); - end; - - APPCOMMAND_PASTE: - begin - Result := Ord(CanPaste); - if Result = 1 then EditAction(eaPaste); - end; - - APPCOMMAND_PRINT: - begin - Result := Ord(CanPrint); - if Result = 1 then - begin - CurrentLink.IsCurrentLink := True; - Controller.Print(True, nil, nil); - end; - end; - end; - inherited; -end; - -procedure TdxfmReportLinkDesignWindow.WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); -begin - inherited; - with Message.MinMaxInfo^ do - ptMinTrackSize := GetMinWindowSize; -end; - -procedure TdxfmReportLinkDesignWindow.WMNCCreate(var Message: TWMNCCreate); -const - TypeDataSize = 32; -var - SysMenu: HMENU; - P: Pointer; - S: array[0..TypeDataSize - 1] of Char; - Info: TMenuItemInfo; - ItemExist: Boolean; -begin - SysMenu := GetSystemMenu(Handle, False); - P := @S[0]; - Info.cbSize := SizeOf(Info) - SizeOf(HBITMAP); - Info.fMask := MIIM_ID or MIIM_TYPE; - Info.dwTypeData := P; - Info.cch := TypeDataSize; - ItemExist := GetMenuItemInfo(SysMenu, SC_SIZE, False, Info); - inherited; - if ItemExist then - InsertMenuItem(SysMenu, 0, True, Info); -end; - -procedure TdxfmReportLinkDesignWindow.WMNCDestroy(var Message: TWMNCCreate); -begin - GetSystemMenu(Handle, True); - inherited; -end; - -initialization - TdxPSDesignTimedxComponentsProvider.Register; - -finalization - TdxPSDesignTimedxComponentsProvider.Unregister; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmReportProperties.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSfmReportProperties.dfm deleted file mode 100644 index ee009a9e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmReportProperties.dfm +++ /dev/null @@ -1,216 +0,0 @@ -object dxfmPSReportProperties: TdxfmPSReportProperties - Left = 357 - Top = 319 - ActiveControl = edName - BorderIcons = [biSystemMenu, biMinimize, biMaximize, biHelp] - BorderStyle = bsDialog - Caption = 'Properties' - ClientHeight = 477 - ClientWidth = 359 - Color = clBtnFace - Constraints.MinHeight = 502 - Constraints.MinWidth = 367 - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000FFFFFFFFFF000000F00F00000F000000FFF - FFFFFFF000000F00F00000F000000FFFFFFFFFF000000FFFFFFF0FF000000F00 - FFF080F000000F080F08080000440FF080808088804400000808088888440000 - 008088888844000000088888804400000000000000440000000000000000FFFF - 0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F - 0000000400000000000000000000F8000000FC000000FE040000FFFF0000} - OldCreateOrder = False - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pcSummary: TPageControl - Left = 5 - Top = 6 - Width = 349 - Height = 434 - ActivePage = tshSummary - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - object tshSummary: TTabSheet - Caption = 'Summary' - object Image1: TImage - Left = 10 - Top = 8 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDD777777777777777777777777777DDDD00000000000000000000000000 - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF - 07DDDD0F88888888888888888888888F07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F - 07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F07DDDD0F88888888888888888888888F - 07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F - 07DDDD0F88888888888888888888888F07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F - 07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F07DDDD0F88888888888888888888888F - 07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F - 07DDDD0F88888888888888888888888F07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0F0000FF7777777777FFFFFFFF - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0F0000FF7777777777FFFFFFFF - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0F0000FF7777777777FFFFFFFF - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF - 07DDDD0F77777777777777777777777F07DDDD0F7777777FFFFFFFFFFFFFFFFF - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF - 07DDDD000000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel1: TBevel - Left = 8 - Top = 46 - Width = 320 - Height = 6 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object lblCreator: TLabel - Left = 10 - Top = 80 - Width = 41 - Height = 13 - Caption = 'Creator:' - FocusControl = edCreator - end - object lblCreationDate: TLabel - Left = 10 - Top = 105 - Width = 71 - Height = 13 - Caption = 'Creation Date:' - FocusControl = edCreationDate - end - object Bevel2: TBevel - Left = 8 - Top = 142 - Width = 320 - Height = 6 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object edName: TEdit - Left = 66 - Top = 16 - Width = 262 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - Text = 'edName' - end - object edCreator: TEdit - Left = 112 - Top = 80 - Width = 215 - Height = 14 - TabStop = False - Anchors = [akLeft, akTop, akRight] - AutoSize = False - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ReadOnly = True - TabOrder = 1 - Text = 'edCreator' - end - object edCreationDate: TEdit - Left = 112 - Top = 105 - Width = 215 - Height = 14 - TabStop = False - Anchors = [akLeft, akTop, akRight] - AutoSize = False - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - Text = 'edCreationDate' - end - object pcDescription: TPageControl - Left = 10 - Top = 158 - Width = 319 - Height = 237 - ActivePage = tshPreview - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 3 - object tshDescription: TTabSheet - Caption = '&Description' - object memDescription: TMemo - Left = 0 - Top = 0 - Width = 311 - Height = 209 - Align = alClient - ScrollBars = ssBoth - TabOrder = 0 - end - end - object tshPreview: TTabSheet - Caption = '&Preview' - ImageIndex = 1 - object bvlPreviewHost: TBevel - Left = 0 - Top = 0 - Width = 311 - Height = 172 - Align = alTop - Anchors = [akLeft, akTop, akRight, akBottom] - end - object btnPreview: TButton - Left = 206 - Top = 180 - Width = 100 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'Pre&view...' - TabOrder = 0 - OnClick = PreviewClick - end - end - end - end - end - object btnOK: TButton - Left = 116 - Top = 447 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 197 - Top = 447 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 279 - Top = 447 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Help' - TabOrder = 3 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmReportProperties.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSfmReportProperties.pas deleted file mode 100644 index 290473f6..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmReportProperties.pas +++ /dev/null @@ -1,319 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSfmReportProperties; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, Controls, Graphics, StdCtrls, ComCtrls, ExtCtrls, Forms, - dxPSCore, dxPSForm, dxExtCtrls; - -type - TdxfmPSReportProperties = class(TCustomdxPSExplorerItemPropertySheets) - pcSummary: TPageControl; - tshSummary: TTabSheet; - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - Image1: TImage; - edName: TEdit; - Bevel1: TBevel; - lblCreator: TLabel; - lblCreationDate: TLabel; - Bevel2: TBevel; - edCreator: TEdit; - edCreationDate: TEdit; - pcDescription: TPageControl; - tshDescription: TTabSheet; - tshPreview: TTabSheet; - memDescription: TMemo; - btnPreview: TButton; - bvlPreviewHost: TBevel; - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure PreviewClick(Sender: TObject); - private - FPreviewBox: TdxPSImageScrollBox; - function GetReportCaption: string; - function GetReportCreationDateTime: TDateTime; - function GetReportCreator: string; - function GetReportDescription: string; - procedure SetReportCaption(const Value: string); - procedure SetReportCreationDateTime(const Value: TDateTime); - procedure SetReportCreator(const Value: string); - procedure SetReportDescription(const Value: string); - procedure SetReportPreview(Value: TGraphic); - protected - procedure CreateWnd; override; - - procedure BeforeConstruction; override; - procedure Done; override; - procedure Initialize; override; - - procedure CreateControls; virtual; - function HasGraphic: Boolean; - procedure LoadStrings; virtual; - public - constructor Create(AOwner: TComponent); override; - - function ExplorerItem: TdxPSExplorerItem; reintroduce; overload; - - property ReportCaption: string read GetReportCaption write SetReportCaption; - property ReportCreationDateTime: TDateTime read GetReportCreationDateTime write SetReportCreationDateTime; - property ReportCreator: string read GetReportCreator write SetReportCreator; - property ReportDescription: string read GetReportDescription write SetReportDescription; - property ReportPreview: TGraphic write SetReportPreview; - - property PreviewBox: TdxPSImageScrollBox read FPreviewBox; - end; - -implementation - -{$R *.dfm} - -uses - {$IFDEF DELPHI7} - Themes, - {$ENDIF} - Messages, SysUtils, Dialogs, ExtDlgs, cxClasses, dxPSGlbl, dxPSUtl, dxPSRes, - dxPcPrVW; - -{ TdxfmPSReportProperties } - -constructor TdxfmPSReportProperties.Create(AOwner: TComponent); -begin - inherited; - - HelpContext := dxPSGlbl.dxhcPSReportPropertiesDlg; - if HelpContext = 0 then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - btnHelp.Visible := False; - BorderIcons := BorderIcons - [biHelp]; - end; - - CreateControls; - LoadStrings; - pcDescription.ActivePage := tshDescription; -end; - -function TdxfmPSReportProperties.ExplorerItem: TdxPSExplorerItem; -begin - Result := inherited ExplorerItem as TdxPSExplorerItem; -end; - -procedure TdxfmPSReportProperties.CreateWnd; -begin - inherited; - SendMessage(Handle, WM_SETICON, 1, Icon.Handle); -end; - -procedure TdxfmPSReportProperties.BeforeConstruction; -begin - inherited; - Options := Options + [foSizeableDialog]; -end; - -procedure TdxfmPSReportProperties.Done; -begin - if ModalResult = mrOK then - with ExplorerItem.ReportDocument do - begin - BeginUpdate; - try - Caption := ReportCaption; - Description := ReportDescription; - finally - EndUpdate; - end; - end; -end; - -procedure TdxfmPSReportProperties.Initialize; -const - Colors: array[Boolean] of TColor = (clWindow, clBtnFace); -begin - with ExplorerItem.ReportDocument do - begin - ReportCaption := Caption; - ReportCreator := Creator; - ReportCreationDateTime := CreationDate; - ReportDescription := Description; - ReportPreview := Preview; - end; - - Caption := ReportCaption; - if Caption <> '' then - Caption := '"' + Caption + '" '; - Caption := Caption + DropAmpersand(cxGetResourceString(@sdxProperties)); - - edName.ReadOnly := ExplorerItem.IsCurrentlyLoaded; - {$IFDEF DELPHI7} - if not Themes.ThemeServices.ThemesEnabled then - begin - {$ENDIF} - edName.Color := Colors[edName.ReadOnly]; - edCreator.ParentColor := True; - edCreationDate.ParentColor := True; - {$IFDEF DELPHI7} - end - else - begin - Control_SetParentBackground(edCreator, True); - Control_SetParentBackground(edCreationDate, True); - end; - {$ENDIF} - - btnPreview.Enabled := HasGraphic; - PreviewBox.Enabled := HasGraphic; -end; - -procedure TdxfmPSReportProperties.CreateControls; -begin - bvlPreviewHost.Visible := False; - - FPreviewBox := TdxPSImageScrollBox.Create(Self); - with FPreviewBox do - begin - Parent := tshPreview; - Align := alTop; - Anchors := [akLeft..akBottom]; - Height := bvlPreviewHost.Height; - end; -end; - -function TdxfmPSReportProperties.HasGraphic: Boolean; -begin - Result := PreviewBox.HasGraphic; -end; - -procedure TdxfmPSReportProperties.LoadStrings; -begin - inherited; - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - btnPreview.Caption := AddEndEllipsis(cxGetResourceString(@sdxPreview)); - - tshSummary.Caption := cxGetResourceString(@sdxSummary); - lblCreator.Caption := cxGetResourceString(@sdxCreator); - lblCreationDate.Caption := cxGetResourceString(@sdxCreationDate); - tshDescription.Caption := DropColon(DropAmpersand(cxGetResourceString(@sdxDescription))); - tshPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); -end; - -function TdxfmPSReportProperties.GetReportCaption: string; -begin - Result := edName.Text; -end; - -function TdxfmPSReportProperties.GetReportCreationDateTime: TDateTime; -begin - Result := SysUtils.StrToDateTime(edCreationDate.Text); -end; - -function TdxfmPSReportProperties.GetReportCreator: string; -begin - Result := edCreator.Text; -end; - -function TdxfmPSReportProperties.GetReportDescription: string; -begin - Result := memDescription.Text; -end; - -procedure TdxfmPSReportProperties.SetReportCaption(const Value: string); -begin - edName.Text := Value; -end; - -procedure TdxfmPSReportProperties.SetReportCreationDateTime(const Value: TDateTime); -const - LongDateFormat = 'mmmm d, yyyy'; -var - SystemTime: TSystemTime; - DefaultLCID: LCID; - DateFormat, TimeFormat: string; - Buffer: array[Byte] of Char; -begin - DateTimeToSystemTime(Value, SystemTime); - DefaultLCID := GetThreadLocale; - - DateFormat := GetLocaleStr(DefaultLCID, LOCALE_SLONGDATE, LongDateFormat); - GetDateFormat(DefaultLCID, 0, @SystemTime, PChar(DateFormat), @Buffer, SizeOf(Buffer)); - edCreationDate.Text := Buffer; - - TimeFormat := GetLocaleStr(DefaultLCID, LOCALE_STIMEFORMAT, LongTimeFormat); - GetTimeFormat(DefaultLCID, 0, @SystemTime, PChar(TimeFormat), @Buffer, SizeOf(Buffer)); - edCreationDate.Text := edCreationDate.Text + ', ' + Buffer; -end; - -procedure TdxfmPSReportProperties.SetReportCreator(const Value: string); -begin - edCreator.Text := Value; -end; - -procedure TdxfmPSReportProperties.SetReportDescription(const Value: string); -begin - memDescription.Text := Value; -end; - -procedure TdxfmPSReportProperties.SetReportPreview(Value: TGraphic); -begin - PreviewBox.Picture.Graphic := Value; -end; - -procedure TdxfmPSReportProperties.FormCloseQuery(Sender: TObject; - var CanClose: Boolean); -begin - CanClose := (ModalResult = mrCancel) or ExplorerItem.IsCurrentlyLoaded or - not ExplorerItem.IsNameChanged(ReportCaption) or ExplorerItem.CanRenameTo(ReportCaption); - if not CanClose then - begin - dxPSUtl.MessageError(ExplorerItem.CannotRenameMessageText(ExplorerItem.DisplayName, ReportCaption)); - ActiveControl := edName; - edName.SelectAll; - end; -end; - -procedure TdxfmPSReportProperties.PreviewClick(Sender: TObject); -begin - dxPcPrVW.dxShowPicturePreview(PreviewBox.Picture.Graphic); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlAdd.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlAdd.dfm deleted file mode 100644 index 93c3b06d..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlAdd.dfm +++ /dev/null @@ -1,67 +0,0 @@ -object dxfmSelectStyleClass: TdxfmSelectStyleClass - Left = 427 - Top = 284 - BorderStyle = bsDialog - Caption = 'Select PrintStyle Type' - ClientHeight = 91 - ClientWidth = 279 - Color = clBtnFace - OldCreateOrder = True - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object GroupBox1: TGroupBox - Left = 2 - Top = -2 - Width = 275 - Height = 58 - TabOrder = 0 - object Label1: TLabel - Left = 7 - Top = 24 - Width = 28 - Height = 13 - Caption = '&Type:' - FocusControl = cbxStyleTypes - OnClick = Label1Click - end - object cbxStyleTypes: TComboBox - Left = 44 - Top = 20 - Width = 220 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 0 - OnChange = cbxStyleTypesChange - end - end - object btnOK: TButton - Left = 31 - Top = 63 - Width = 79 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 115 - Top = 63 - Width = 79 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 198 - Top = 63 - Width = 79 - Height = 23 - Caption = '&Help' - TabOrder = 3 - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlAdd.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlAdd.pas deleted file mode 100644 index 448f7d93..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlAdd.pas +++ /dev/null @@ -1,157 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSfmStlAdd; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, dxPSForm, dxPgsDlg; - -type - TdxfmSelectStyleClass = class(TCustomdxPSForm) - GroupBox1: TGroupBox; - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - Label1: TLabel; - cbxStyleTypes: TComboBox; - procedure Label1Click(Sender: TObject); - procedure cbxStyleTypesChange(Sender: TObject); - private - FStyleClass: TdxPrintStyleClass; - procedure RefreshList; - public - constructor Create(AOwner: TComponent); override; - function Execute(const Pt: TPoint): TdxPrintStyleClass; - end; - -function dxSelectStyleClass(const Pt: TPoint): TdxPrintStyleClass; - -implementation - -{$R *.DFM} - -uses - dxPSGlbl; - -function dxSelectStyleClass(const Pt: TPoint): TdxPrintStyleClass; -begin - with TdxfmSelectStyleClass.Create(nil) do - try - Result := Execute(Pt); - finally - Free; - end; -end; - -{ TdxfmAddNewPrintStyle } - -constructor TdxfmSelectStyleClass.Create(AOwner: TComponent); -begin - inherited; - HelpContext := dxPSGlbl.dxhcAddStyleDlg; - btnHelp.Visible := HelpContext <> 0; - if not btnHelp.Visible then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - end; - FStyleClass := nil; - RefreshList; -end; - -procedure TdxfmSelectStyleClass.RefreshList; -var - SaveCursor: TCursor; -begin - SaveCursor := Screen.Cursor; - Screen.Cursor := crHourGlass; - try - with cbxStyleTypes do - begin - Items.BeginUpdate; - try - Items.Clear; - dxPSGetRegisteredPrintStylesList(cbxStyleTypes.Items); - finally - Items.EndUpdate; - end; - if Items.Count <> 0 then - begin - ItemIndex := Items.IndexOfObject(TObject(dxPgsDlg.dxDefaultPrintStyleClass)); - if ItemIndex = -1 then ItemIndex := 0; - cbxStyleTypesChange(nil); - end; - end; - finally - Screen.Cursor := SaveCursor; - end; -end; - -function TdxfmSelectStyleClass.Execute(const Pt: TPoint): TdxPrintStyleClass; -begin - if (Pt.X = MaxInt) and (Pt.Y = MaxInt) then - Position := poScreenCenter - else - begin - Left := Pt.X; - Top := Pt.Y; - end; - - if ShowModal = mrOK then - Result := FStyleClass - else - Result := nil; -end; - -procedure TdxfmSelectStyleClass.Label1Click(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - if TComboBox(ActiveControl).Style = csDropDownList then - TComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxfmSelectStyleClass.cbxStyleTypesChange(Sender: TObject); -begin - with cbxStyleTypes do - FStyleClass := TdxPrintStyleClass(Items.Objects[ItemIndex]); -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlDsg.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlDsg.dfm deleted file mode 100644 index 553529bb..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlDsg.dfm +++ /dev/null @@ -1,792 +0,0 @@ -object dxfmPrintStylesDesignWindow: TdxfmPrintStylesDesignWindow - Left = 395 - Top = 187 - BorderStyle = bsDialog - Caption = 'Print Styles' - ClientHeight = 199 - ClientWidth = 358 - Color = clBtnFace - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000FFFFFFFFFF000000F00F00000F000000FFF - FFFFFFF000000F00F00000F000000FFFFFFFFFF000000FFFFFFF0FF000000F00 - FFF080F000000F080F08080000440FF080808088804400000808088888440000 - 008088888844000000088888804400000000000000440000000000000000FFFF - 0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F - 0000000400000000000000000000F8000000FC000000FE040000FFFF0000} - KeyPreview = True - OldCreateOrder = True - OnClose = FormClose - OnKeyDown = FormKeyDown - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlButtons: TPanel - Left = 249 - Top = 0 - Width = 109 - Height = 199 - Align = alRight - BevelOuter = bvNone - TabOrder = 0 - object btnAdd: TButton - Left = 6 - Top = 4 - Width = 100 - Height = 22 - Caption = '&Add...' - TabOrder = 0 - OnClick = AddClick - end - object btnDelete: TButton - Tag = 4 - Left = 6 - Top = 31 - Width = 100 - Height = 22 - Caption = '&Delete' - TabOrder = 1 - OnClick = EditClick - end - object btnSelectAll: TButton - Tag = 6 - Left = 6 - Top = 58 - Width = 100 - Height = 22 - Caption = 'Se&lect All' - TabOrder = 2 - OnClick = EditClick - end - object btnPageSetup: TButton - Tag = 1 - Left = 6 - Top = 147 - Width = 100 - Height = 22 - Caption = 'Pa&ge Setup...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 5 - OnClick = PageSetupClick - end - object btnMoveUp: TButton - Left = 6 - Top = 89 - Width = 100 - Height = 22 - Caption = 'Move &Up' - TabOrder = 3 - OnClick = MoveUpClick - end - object btnMoveDown: TButton - Tag = 1 - Left = 6 - Top = 116 - Width = 100 - Height = 22 - Caption = 'Move Dow&n' - TabOrder = 4 - OnClick = MoveDownClick - end - object btnRestoreDefaults: TButton - Left = 6 - Top = 174 - Width = 100 - Height = 22 - Caption = 'Rest&ore Defaults' - TabOrder = 6 - OnClick = RestoreDefaultsClick - end - end - object lbxStyles: TListBox - Left = 0 - Top = 0 - Width = 249 - Height = 199 - Style = lbOwnerDrawFixed - Align = alClient - Ctl3D = True - DragMode = dmAutomatic - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ItemHeight = 34 - MultiSelect = True - ParentCtl3D = False - ParentFont = False - PopupMenu = pmStyles - TabOrder = 1 - OnClick = lbxStylesClick - OnDblClick = PageSetupClick - OnDragDrop = lbxStylesDragDrop - OnDragOver = lbxStylesDragOver - OnDrawItem = lbxStylesDrawItem - OnEndDrag = lbxStylesEndDrag - OnKeyPress = lbxStylesKeyPress - OnStartDrag = lbxStylesStartDrag - end - object pmStyles: TPopupMenu - OnPopup = pmStylesPopup - Left = 13 - Top = 9 - object miAdd: TMenuItem - Caption = '&Add...' - ShortCut = 45 - OnClick = AddClick - end - object miAddStandard: TMenuItem - Caption = 'Add' - ShortCut = 32813 - OnClick = AddStandardClick - end - object miLine5: TMenuItem - Caption = '-' - end - object miEdit: TMenuItem - Caption = '&Edit' - object miCut: TMenuItem - Tag = 2 - Caption = 'Cu&t' - ShortCut = 16472 - OnClick = EditClick - end - object miCopy: TMenuItem - Tag = 1 - Caption = '&Copy' - ShortCut = 16451 - OnClick = EditClick - end - object miPaste: TMenuItem - Tag = 3 - Caption = '&Paste' - ShortCut = 16470 - OnClick = EditClick - end - object miDelete: TMenuItem - Tag = 4 - Caption = '&Delete' - ShortCut = 46 - OnClick = EditClick - end - object N2: TMenuItem - Caption = '-' - end - object miSelectAll: TMenuItem - Tag = 6 - Caption = 'Se&lect All' - ShortCut = 16449 - OnClick = EditClick - end - end - object N1: TMenuItem - Caption = '-' - end - object miMoveUp: TMenuItem - Caption = 'Move &Up' - ShortCut = 16422 - OnClick = MoveUpClick - end - object miMoveDown: TMenuItem - Caption = 'Move Dow&n' - ShortCut = 16424 - OnClick = MoveDownClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miPageSetup: TMenuItem - Tag = 1 - Caption = 'Pa&ge Setup...' - Default = True - ShortCut = 16397 - OnClick = PageSetupClick - end - object miSetAsCurrent: TMenuItem - Caption = '&Make Current' - ShortCut = 16416 - OnClick = miSetAsCurrentClick - end - object miLine: TMenuItem - Caption = '-' - end - object miRestoreDefaults: TMenuItem - Caption = 'Rest&ore Defaults' - ShortCut = 16463 - OnClick = RestoreDefaultsClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miBackground: TMenuItem - Caption = 'Bac&kground' - object miBackgroundEffects: TMenuItem - Tag = 4 - Caption = 'E&ffects...' - OnClick = BackgroundClick - end - object miBackgroundClear: TMenuItem - Tag = 5 - Caption = 'Clear' - OnClick = ClearBackgroundClick - end - end - object N3: TMenuItem - Caption = '-' - end - object miShowButtons: TMenuItem - Caption = 'Show &Button Bar' - Checked = True - OnClick = miShowButtonsClick - end - end - object ilMenu: TImageList - Left = 41 - Top = 9 - Bitmap = { - 494C01010A000F00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000004000000001002000000000000040 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF000000000000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484000000 - 00008484840000000000FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400848484008484840000000000FFFFFF00FFFFFF0000FFFF0084848400FFFF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600848484008484840000000000FFFFFF00FFFFFF00840000008484 - 8400FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00C6C6C600C6C6 - C600C6C6C600C6C6C60084848400848484000000000000FFFF00840000008400 - 0000FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 000000000000000000000000000000000000C6C6C600FFFFFF00FFFFFF00C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084000000840000008400 - 0000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600FFFFFF00FFFF - FF00C6C6C60000000000C6C6C600C6C6C6008484840084000000840000008400 - 0000FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000C6C6C600FFFF - FF00000000008400000000000000C6C6C6008400000084000000840000008484 - 8400FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600FFFFFF0084000000C6C6C60084848400840000008400000084848400FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000840000000000 - 0000C6C6C60084000000848484000000000084848400FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084000000C6C6 - C60000000000840000000000000084848400FFFFFF0000FFFF00FFFFFF008484 - 8400C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084000000C6C6 - C600C6C6C600840000008484840000FFFF00FFFFFF00FFFFFF00FFFFFF008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008400 - 0000840000008484840084848400848484008484840084848400848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008400000084000000840000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000840000008400 - 0000840000008400000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000840000008400 - 000084000000840000008484840084000000FFFFFF0084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000008400000084000000848484008484 - 84008484840084848400840000000000000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 000084000000840000008400000084000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000000000000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0084000000000000000000000000000000FFFF - FF000000000000FF000000000000FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF008400000084000000840000008400 - 00008400000084000000FFFFFF0084000000000000000000000000000000FFFF - FF000000000000FF000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0084000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000840000008400000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00840000008400000084000000FFFF - FF0084000000840000008400000084000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000084000000840000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0084000000FFFFFF008400000000000000000000000000000000000000FFFF - FF00FF000000FF0000008400000000000000000000000000000000000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00840000008400000000000000000000000000000000000000000000000000 - 0000FF000000FF00000084000000000000000000000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000FFFFFF008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000840000008400000084000000840000008400 - 0000840000000000000000000000000000000000000084000000840000008400 - 0000FF000000FF00000084000000840000008400000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000FFFFFF008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840000848400848484000084840084848400008484008484 - 84000084840000000000000000000000000000000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 84008484840000000000000000000000000000000000FF000000FF000000FF00 - 0000FF000000FF000000840000008400000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000084000000840000008400000084000000840000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484000000 - 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600000000008484 - 840000848400000000000000000000000000000000000000000000000000FFFF - FF00FF000000FF0000008400000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 84000000000000FFFF00000000000000000000FFFF0000000000848484000084 - 840084848400000000000000000000000000000000000000000000000000FFFF - FF00FF000000FF00000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000FFFF0000FFFF000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000400000000100010000000000000200000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFF00000000FFFFC00100000000 - FFFFC00100000000FFFFC00100000000FEFFC00100000000FC7FC00100000000 - F83F800100000000F01F000100000000E00F000100000000C007000100000000 - F83F800100000000F83FC00100000000F83FC00100000000F83FC00300000000 - FFFFC00700000000FFFFC00F00000000FFFFF80FFFFFFFFFFFFFF007FFFFFFFF - FFF9F007F83FFFFFE7FFF0070001FFFFC3F3F0070001F83FC3E7F0070001F83F - E1C7F0070001F83FF08FF0070001F83FF81FF0070001C007FC3FF0070001E00F - F81FF0070001F01FF09FE0030001F83FC1C7E0030101FC7F83E3F0078383FEFF - 8FF1FE3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC03FFFFFF3FFFC00 - C09FFC01ED9F8000CAAFFC01ED6F0000CA97FC01ED6F0000C0030001F16F0000 - C1C30001FD1F0001C1E30001FC7F0003D1F30001FEFF000380330003FC7F0003 - 80330007FD7F00038003000FF93F0003C10300FFFBBF0003C00301FFFBBF8007 - C00303FFFBBFF87FC003FFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlDsg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlDsg.pas deleted file mode 100644 index d1b98d35..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmStlDsg.pas +++ /dev/null @@ -1,1369 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSfmStlDsg; - -interface - -{$I cxVer.inc} - -uses - {$IFDEF DELPHI6} - DesignIntf, DesignWindows, - {$ELSE} - DsgnIntf, DsgnWnds, LibIntf, - {$ENDIF} - Windows, Messages, SysUtils, Classes, Graphics, Controls, StdCtrls, Dialogs, - ExtCtrls, ComCtrls, Menus, Forms, Buttons, ImgList, dxCore, dxPgsDlg, dxPSDsgProxies; - -type - TdxfmPrintStylesDesignWindow = class(TDesignWindow) - pmStyles: TPopupMenu; - pnlButtons: TPanel; - btnAdd: TButton; - btnDelete: TButton; - miAdd: TMenuItem; - miDelete: TMenuItem; - miLine1: TMenuItem; - miLine2: TMenuItem; - miSelectAll: TMenuItem; - btnSelectAll: TButton; - btnPageSetup: TButton; - miPageSetup: TMenuItem; - miCopy: TMenuItem; - miCut: TMenuItem; - miPaste: TMenuItem; - miRestoreDefaults: TMenuItem; - miLine: TMenuItem; - miShowButtons: TMenuItem; - miLine5: TMenuItem; - ilMenu: TImageList; - btnMoveUp: TButton; - btnMoveDown: TButton; - miMoveUp: TMenuItem; - miMoveDown: TMenuItem; - miBackgroundEffects: TMenuItem; - miBackgroundClear: TMenuItem; - N2: TMenuItem; - btnRestoreDefaults: TButton; - miSetAsCurrent: TMenuItem; - N3: TMenuItem; - lbxStyles: TListBox; - miEdit: TMenuItem; - N1: TMenuItem; - miBackground: TMenuItem; - miAddStandard: TMenuItem; - procedure pmStylesPopup(Sender: TObject); - procedure lbxStylesClick(Sender: TObject); - procedure lbxStylesDragDrop(Sender, Source: TObject; X, Y: Integer); - procedure lbxStylesDragOver(Sender, Source: TObject; X, - Y: Integer; State: TDragState; var Accept: Boolean); - procedure FormKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure RestoreDefaultsClick(Sender: TObject); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure EditClick(Sender: TObject); - procedure miShowButtonsClick(Sender: TObject); - procedure MoveUpClick(Sender: TObject); - procedure MoveDownClick(Sender: TObject); - procedure lbxStylesEndDrag(Sender, Target: TObject; X, Y: Integer); - procedure lbxStylesStartDrag(Sender: TObject; - var DragObject: TDragObject); - procedure PageSetupClick(Sender: TObject); - procedure BackgroundClick(Sender: TObject); - procedure ClearBackgroundClick(Sender: TObject); - procedure lbxStylesDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure miSetAsCurrentClick(Sender: TObject); - procedure lbxStylesKeyPress(Sender: TObject; var Key: Char); - procedure AddClick(Sender: TObject); - procedure AddStandardClick(Sender: TObject); - procedure FormResize(Sender: TObject); - private - FController: TdxPrintStyleManager; - FSaveCursor: TCursor; - FSaveDragIndex: Integer; - - function GetCurrentStyle: TBasedxPrintStyle; - function GetControllerDesigner: TAbstractdxStyleManagerDesigner; - function GetRegistryPath: string; - function GetSelected(Index: Integer): Boolean; - function GetSelectedCount: Integer; - function GetStyleCount: Integer; - function GetStyle(Index: Integer): TBasedxPrintStyle; - procedure SetController(Value: TdxPrintStyleManager); - procedure SetSelected(Index: Integer; Value: Boolean); - - procedure AddStyle; - function CanAdd: Boolean; - function CanAddStandard: Boolean; - function CanBackgroundClear: Boolean; - function CanBackgroundEffects: Boolean; - function CanCopy: Boolean; - function CanCut: Boolean; - function CanDelete: Boolean; - function CanMoveDown: Boolean; - function CanMoveUp: Boolean; - function CanPaste: Boolean; - function CanPageSetup: Boolean; - function CanRestoreDefaults: Boolean; - function CanSelectAll: Boolean; - function CanSetAsCurrent: Boolean; - {$IFDEF DELPHI5} - procedure CheckAddStyle; - {$ENDIF} - procedure CheckDeleteStyle; - procedure Copy; - procedure Cut; - procedure Delete; - procedure DeleteItem(AItem: TBasedxPrintStyle); - procedure DrawDragRect; - function GetMinWindowSize: TPoint; - procedure GetSelections(const ASelections: TdxDesignSelectionList); - function IndexOf(AItem: TBasedxPrintStyle): Integer; - procedure InternalAddStyle(AStyleClass: TdxPrintStyleClass); - procedure MoveSelection(ADelta: Integer); - procedure Paste; - procedure PrepareAddStandardItem(MenuItem: TMenuItem); - procedure RefreshList; - procedure RestoreLayout; - procedure Select(AItem: TPersistent; AddToSelection: Boolean); - procedure SelectAll; - procedure SelectController; - procedure StartWait; - procedure StopWait; - procedure StoreLayout; - procedure UpdateCaption; - procedure UpdateControlsState; - procedure UpdateHScrollBar; - procedure UpdateItem(AItem: TBasedxPrintStyle); - procedure UpdateMenuState; - procedure UpdateSelections(const ASelections: TdxDesignSelectionList); - procedure WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); message WM_GETMINMAXINFO; - procedure WMNCCreate(var Message: TWMNCCreate); message WM_NCCREATE; - procedure WMNCDestroy(var Message: TWMNCCreate); message WM_NCDESTROY; - protected - procedure Activated; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - function UniqueName(Comp: TComponent): string; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - {$IFDEF DELPHI6} - function EditAction(Action: TEditAction): Boolean; override; - procedure ItemDeleted(const ADesigner: IDesigner; Item: TPersistent); override; - procedure ItemsModified(const Designer: IDesigner); override; - procedure SelectionChanged(const ADesigner: IDesigner; const ASelection: IDesignerSelections); override; - {$ELSE} - procedure ComponentDeleted(Component: IPersistent); override; - procedure EditAction(Action: TEditAction); override; - procedure SelectionChanged(ASelection: {$IFDEF DELPHI5} TDesignerSelectionList {$ELSE} TComponentList{$ENDIF}); override; - procedure FormModified; override; - {$ENDIF} - function GetEditState: TEditState; override; - - property CurrentStyle: TBasedxPrintStyle read GetCurrentStyle; - property Controller: TdxPrintStyleManager read FController write SetController; - property ControllerDesigner: TAbstractdxStyleManagerDesigner read GetControllerDesigner; - property RegistryPath: string read GetRegistryPath; - property Selected[Index: Integer]: Boolean read GetSelected write SetSelected; - property SelectedCount: Integer read GetSelectedCount; - property StyleCount: Integer read GetStyleCount; - property Styles[Index: Integer]: TBasedxPrintStyle read GetStyle; - end; - -procedure dxShowPrintStylesDesigner(AStyleController: TdxPrintStyleManager; AFormDesigner: TFormDesigner); -//function dxPrintStyleUniqueName(AStyleController: TdxPrintStyleManager; AComponent: TComponent): string; - -implementation - -{$R *.DFM} - -uses - {$IFDEF DELPHI5} - DesignConst, - {$ELSE} - LibConst, - {$ENDIF} - Registry, CommCtrl, dxPrnPg, dxBkgnd, dxPSGlbl, dxPSUtl, dxPSPopupMan, - dxPSfmStlAdd; - -const - sdxCantPasteComponent = 'Can''t paste component %s here !'; - sdxStyleDesigner = 'Editing %s%s%s Styles'; - - { don't localize } - sdxButtonBar = 'ButtonBar'; - sdxWidth = 'Width'; - sdxHeight = 'Height'; - -type - TdxStyleManagerDesigner = class(TAbstractdxStyleManagerDesigner) - private - FDesignWindow: TdxfmPrintStylesDesignWindow; - FFormDesigner: TFormDesigner; - FUpdateCount: Integer; - - function GetDesignWindow: TdxfmPrintStylesDesignWindow; - procedure Activate; - protected - procedure Modified; override; - procedure Update(AItem: TBasedxPrintStyle); override; - public - constructor Create(AStyleController: TdxPrintStyleManager; AFormDesigner: TFormDesigner); - destructor Destroy; override; - - procedure BeginUpdate; override; - procedure CancelUpdate; override; - procedure EndUpdate; override; - - property DesignWindow: TdxfmPrintStylesDesignWindow read GetDesignWindow; - property FormDesigner: TFormDesigner read FFormDesigner; - end; - -procedure dxShowPrintStylesDesigner(AStyleController: TdxPrintStyleManager; AFormDesigner: TFormDesigner); -begin - if AStyleController.Designer = nil then - TdxStyleManagerDesigner.Create(AStyleController, AFormDesigner); - TdxStyleManagerDesigner(AStyleController.Designer).Activate; -end; - -{ TdxStyleManagerDesigner } - -constructor TdxStyleManagerDesigner.Create(AStyleController: TdxPrintStyleManager; - AFormDesigner: TFormDesigner); -begin - inherited Create(AStyleController); - FFormDesigner := AFormDesigner; -end; - -destructor TdxStyleManagerDesigner.Destroy; -begin - if FDesignWindow <> nil then - begin - FDesignWindow.Designer := nil; - FDesignWindow.Free; - end; - inherited Destroy; -end; - -procedure TdxStyleManagerDesigner.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TdxStyleManagerDesigner.CancelUpdate; -begin - if FUpdateCount <> 0 then Dec(FUpdateCount); -end; - -procedure TdxStyleManagerDesigner.EndUpdate; -begin - if FUpdateCount <> 0 then - begin - Dec(FUpdateCount); - if FUpdateCount = 0 then Update(nil); - end; -end; - -function TdxStyleManagerDesigner.GetDesignWindow: TdxfmPrintStylesDesignWindow; -begin - if FDesignWindow = nil then - begin - FDesignWindow := TdxfmPrintStylesDesignWindow.Create(nil); - FDesignWindow.Designer := FormDesigner; - FDesignWindow.Controller := StyleManager; - end; - Result := FDesignWindow; -end; - -procedure TdxStyleManagerDesigner.Activate; -begin - DesignWindow.Show; -end; - -procedure TdxStyleManagerDesigner.Modified; -begin - if FormDesigner <> nil then FormDesigner.Modified; -end; - -procedure TdxStyleManagerDesigner.Update(AItem: TBasedxPrintStyle); -begin - if (FUpdateCount = 0) and (FDesignWindow <> nil) then - DesignWindow.UpdateItem(AItem); -end; - -{ TdxfmPrintStylesDesignWindow } - -constructor TdxfmPrintStylesDesignWindow.Create(AOwner: TComponent); - - function MakeTTag(AnAction: TEditAction): Integer ; - begin - Result := Integer(AnAction); - end; - -begin - HelpContext := dxPSGlbl.dxhcPrintStylesDesignWindow; - inherited; - - pmStyles.Images := ilMenu; - miAdd.ImageIndex := 0; - miCopy.ImageIndex := 1; - miCut.ImageIndex := 2; - miPaste.ImageIndex := 3; - miDelete.ImageIndex := 4; - miPageSetup.ImageIndex := 6; - miMoveUp.ImageIndex := 7; - miMoveDown.ImageIndex := 8; - miBackgroundEffects.ImageIndex := 9; - - miCut.Tag := MakeTTag(eaCut); - miCopy.Tag := MakeTTag(eaCopy); - miPaste.Tag := MakeTTag(eaPaste); - miDelete.Tag := MakeTTag(eaDelete); - miSelectAll.Tag := MakeTTag(eaSelectAll); - - btnDelete.Tag := MakeTTag(eaDelete); - btnSelectAll.Tag := MakeTTag(eaSelectAll); - - RestoreLayout; - dxPSPopupMenuController.RegisterControl(lbxStyles); -end; - -destructor TdxfmPrintStylesDesignWindow.Destroy; -begin - dxPSPopupMenuController.UnregisterControl(lbxStyles); - StoreLayout; - if ControllerDesigner <> nil then - TdxStyleManagerDesigner(ControllerDesigner).FDesignWindow := nil; - inherited Destroy; -end; - -procedure TdxfmPrintStylesDesignWindow.FormKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -var - MenuItem: TMenuItem; -begin - MenuItem := pmStyles.FindItem(Key, fkShortCut); - if (MenuItem <> nil) and MenuItem.Enabled and MenuItem.Visible then - begin - MenuItem.Click; - Key := 0; - end - else - if Key = VK_ESCAPE then - begin - Close; - Key := 0; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.FormResize(Sender: TObject); -begin - UpdateHScrollBar; -end; - -procedure TdxfmPrintStylesDesignWindow.FormClose(Sender: TObject; - var Action: TCloseAction); -begin - if not (csDestroying in Controller.ComponentState) then - SelectController; - Action := caFree; -end; - -procedure TdxfmPrintStylesDesignWindow.AddClick(Sender: TObject); -begin - AddStyle; - ActiveControl := lbxStyles; -end; - -procedure TdxfmPrintStylesDesignWindow.lbxStylesClick(Sender: TObject); -var - Selections: TdxDesignSelectionList; -begin - Selections := CreateDesignSelectionList; - GetSelections(Selections); - Designer.SetSelections(Selections); -end; - -procedure TdxfmPrintStylesDesignWindow.PageSetupClick(Sender: TObject); -begin - if CurrentStyle.PageSetup then Designer.Modified; -end; - -procedure TdxfmPrintStylesDesignWindow.lbxStylesStartDrag(Sender: TObject; - var DragObject: TDragObject); -begin - FSaveDragIndex := -1; -end; - -procedure TdxfmPrintStylesDesignWindow.lbxStylesEndDrag(Sender, - Target: TObject; X, Y: Integer); -begin - DrawDragRect; -end; - -procedure TdxfmPrintStylesDesignWindow.lbxStylesDragOver(Sender, - Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); -var - Index: Integer; -begin - Accept := Sender = Source; - if Accept then - with TListBox(Sender) do - begin - Index := ItemAtPos(MakePoint(X, Y), True); - Accept := (Index <> -1) and (FSaveDragIndex <> ItemIndex); - DrawDragRect; - FSaveDragIndex := Index; - DrawDragRect; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.lbxStylesDragDrop(Sender, - Source: TObject; X, Y: Integer); -begin - MoveSelection(FSaveDragIndex - TListBox(Sender).ItemIndex); -end; - -procedure TdxfmPrintStylesDesignWindow.lbxStylesKeyPress(Sender: TObject; - var Key: Char); -begin - case Key of - #13, #33..#126: - begin - if Key = #13 then Key := #0; - ActivateInspector(Key); - Key := #0; - end; - #27: - begin - SelectController; - Key := #0; - end; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.EditClick(Sender: TObject); -begin - EditAction(TEditAction(TComponent(Sender).Tag)); -end; - -procedure TdxfmPrintStylesDesignWindow.MoveUpClick(Sender: TObject); -begin - MoveSelection(-1); -end; - -procedure TdxfmPrintStylesDesignWindow.MoveDownClick(Sender: TObject); -begin - MoveSelection(1); -end; - -procedure TdxfmPrintStylesDesignWindow.lbxStylesDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - dxPgsDlg.dxPSDrawStyleItem(Styles[Index], TListBox(Control), Index, State, Rect, False, True); -end; - -procedure TdxfmPrintStylesDesignWindow.miSetAsCurrentClick(Sender: TObject); -begin - Controller.CurrentStyle := CurrentStyle; -end; - -procedure TdxfmPrintStylesDesignWindow.RestoreDefaultsClick(Sender: TObject); -var - I: Integer; -begin - for I := 0 to StyleCount - 1 do - if Selected[I] or (SelectedCount = 0) then - Styles[I].RestoreDefaults; -end; - -procedure TdxfmPrintStylesDesignWindow.BackgroundClick(Sender: TObject); -var - Background: TdxBackground; - I: Integer; -begin - StartWait; - try - Background := TdxBackground.Create; - try - for I := 0 to StyleCount - 1 do - if Selected[I] or (SelectedCount = 0) then - begin - Background.Assign(Styles[I].PrinterPage.Background); - Break; - end; - - if Background.SetupEffects then - begin - for I := 0 to StyleCount - 1 do - if Selected[I] or (SelectedCount = 0) then - Styles[I].PrinterPage.Background := Background; - Designer.Modified; - end; - finally - Background.Free; - end; - finally - StopWait; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.ClearBackgroundClick(Sender: TObject); -var - I: Integer; -begin - for I := 0 to StyleCount - 1 do - if Selected[I] or (SelectedCount = 0) then - Styles[I].PrinterPage.Background.Clear; - Designer.Modified; -end; - -procedure TdxfmPrintStylesDesignWindow.pmStylesPopup(Sender: TObject); -begin - UpdateMenuState; -end; - -procedure TdxfmPrintStylesDesignWindow.miShowButtonsClick(Sender: TObject); -begin - pnlButtons.Visible := not pnlButtons.Visible; -end; - -{$IFDEF DELPHI6} -function TdxfmPrintStylesDesignWindow.EditAction(Action: TEditAction): Boolean; -{$ELSE} -procedure TdxfmPrintStylesDesignWindow.EditAction(Action: TEditAction); -{$ENDIF} -begin - {$IFDEF DELPHI6} - Result := True; - {$ENDIF} - case Action of - eaCut: Cut; - eaCopy: Copy; - eaPaste: Paste; - eaDelete: Delete; - eaSelectAll: SelectAll; - end; -end; - -function TdxfmPrintStylesDesignWindow.GetEditState: TEditState; -begin - Result := []; - if CanCut then - Result := Result + [esCanCut]; - if CanCopy then - Result := Result + [esCanCopy]; - if CanPaste then - Result := Result + [esCanPaste]; - if CanDelete then - Result := Result + [esCanDelete]; - if CanSelectAll then - Result := Result + [esCanSelectAll]; -end; - -{$IFDEF DELPHI6} - -procedure TdxfmPrintStylesDesignWindow.ItemDeleted(const ADesigner: IDesigner; - Item: TPersistent); -begin - inherited; - if (ADesigner = Designer) and (Item is TBasedxPrintStyle) and - (Controller <> nil) and not (csDestroying in Controller.ComponentState) then - DeleteItem(TBasedxPrintStyle(Item)); -end; - -procedure TdxfmPrintStylesDesignWindow.ItemsModified(const Designer: IDesigner); -begin - inherited; - UpdateCaption; -end; - -procedure TdxfmPrintStylesDesignWindow.SelectionChanged(const ADesigner: IDesigner; - const ASelection: IDesignerSelections); -begin - inherited; - UpdateSelections(ASelection); -end; - -{$ELSE} - -procedure TdxfmPrintStylesDesignWindow.ComponentDeleted(Component: IPersistent); -var - Item: TPersistent; -begin - inherited; - Item := dxPSDsgProxies.TryExtractPersistent(Component); - if (Item is TBasedxPrintStyle) and - (Controller <> nil) and not (csDestroying in Controller.ComponentState) then - DeleteItem(TBasedxPrintStyle(Item)); -end; - -procedure TdxfmPrintStylesDesignWindow.SelectionChanged( - ASelection: {$IFDEF DELPHI5} TDesignerSelectionList {$ELSE} TComponentList {$ENDIF}); -begin - inherited; - UpdateSelections(ASelection); -end; - -procedure TdxfmPrintStylesDesignWindow.FormModified; -begin - inherited; - UpdateCaption; -end; - -{$ENDIF} - -procedure TdxfmPrintStylesDesignWindow.Activated; -var - Selections: TdxDesignSelectionList; -begin - inherited Activated; - Selections := CreateDesignSelectionList; - try - Designer.GetSelections(Selections); - UpdateSelections(Selections); - finally - FreeDesignSelectionList(Selections); - end; -end; - -procedure TdxfmPrintStylesDesignWindow.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params do - Style := Style or WS_THICKFRAME; -{$IFDEF DELPHI9} - Params.WndParent := Application.MainForm.Handle; -{$ENDIF} -end; - -procedure TdxfmPrintStylesDesignWindow.CreateWnd; -begin - inherited CreateWnd; - SendMessage(Handle, WM_SETICON, 1, Icon.Handle) -end; - -function TdxfmPrintStylesDesignWindow.UniqueName(Comp: TComponent): string; -begin - Result := dxPgsDlg.dxPSPrintStyleUniqueName(Controller, Comp); -end; - -function TdxfmPrintStylesDesignWindow.GetCurrentStyle: TBasedxPrintStyle; -begin - if StyleCount <> 0 then - Result := Styles[lbxStyles.ItemIndex] - else - Result := nil; -end; - -function TdxfmPrintStylesDesignWindow.GetControllerDesigner: TAbstractdxStyleManagerDesigner; -begin - if Controller <> nil then - Result := Controller.Designer - else - Result := nil; -end; - -function TdxfmPrintStylesDesignWindow.GetRegistryPath: string; -begin - Result := - dxPSDsgProxies.GetBaseRegistryKey + '\' + dxPSGlbl.sdxPSRegPathRunTimeFormLayouts + '\' + dxPSUtl.DropT(ClassName); -end; - -function TdxfmPrintStylesDesignWindow.GetSelected(Index: Integer): Boolean; -begin - Result := lbxStyles.Selected[Index]; -end; - -function TdxfmPrintStylesDesignWindow.GetSelectedCount: Integer; -begin - Result := lbxStyles.SelCount; -end; - -function TdxfmPrintStylesDesignWindow.GetStyleCount: Integer; -begin - Result := lbxStyles.Items.Count; -end; - -function TdxfmPrintStylesDesignWindow.GetStyle(Index: Integer): TBasedxPrintStyle; -begin - Result := TBasedxPrintStyle(lbxStyles.Items.Objects[Index]); -end; - -procedure TdxfmPrintStylesDesignWindow.SetController(Value: TdxPrintStyleManager); -begin - if FController <> Value then - begin - FController := Value; - UpdateCaption; - RefreshList; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.SetSelected(Index: Integer; Value: Boolean); -begin - lbxStyles.Selected[Index] := Value; -end; - -procedure TdxfmPrintStylesDesignWindow.AddStyle; -var - StyleClass: TdxPrintStyleClass; - Origin: TPoint; -begin - {$IFDEF DELPHI5} - CheckAddStyle; - {$ENDIF} - Origin := ClientToScreen(MakePoint(btnAdd.Left + btnAdd.Width, btnAdd.Top - 40)); - StyleClass := dxSelectStyleClass(Origin); - if StyleClass <> nil then - InternalAddStyle(StyleClass); -end; - -procedure TdxfmPrintStylesDesignWindow.AddStandardClick(Sender: TObject); -var - StyleClass: TdxPrintStyleClass; -begin - {$IFDEF DELPHI5} - CheckAddStyle; - {$ENDIF} - StyleClass := TdxPrintStyleClass(TComponent(Sender).Tag); - if StyleClass <> nil then - InternalAddStyle(StyleClass); -end; - -function TdxfmPrintStylesDesignWindow.CanAdd: Boolean; -begin -{$IFDEF DELPHI5} - Result := not ((Controller <> nil) and (Controller.Owner <> nil) and - (csInline in Controller.Owner.ComponentState)); -{$ELSE} - Result := True; -{$ENDIF} -end; - -function TdxfmPrintStylesDesignWindow.CanAddStandard: Boolean; -begin - Result := CanAdd and (CurrentStyle <> nil); -end; - -function TdxfmPrintStylesDesignWindow.CanBackgroundClear: Boolean; -begin - Result := StyleCount <> 0; -end; - -function TdxfmPrintStylesDesignWindow.CanBackgroundEffects: Boolean; -begin - Result := StyleCount <> 0; -end; - -function TdxfmPrintStylesDesignWindow.CanCopy: Boolean; -begin - Result := SelectedCount <> 0; -end; - -function TdxfmPrintStylesDesignWindow.CanCut: Boolean; -begin - Result := CanCopy and CanDelete; -end; - -function TdxfmPrintStylesDesignWindow.CanDelete: Boolean; -var - I: Integer; -begin - Result := SelectedCount <> 0; - if Result then - for I := 0 to StyleCount - 1 do - if Selected[I] and (csAncestor in Styles[I].ComponentState) then - begin - Result := False; - Exit; - end; -end; - -function TdxfmPrintStylesDesignWindow.CanMoveDown: Boolean; -var - I, Counter: Integer; -begin - Counter := 0; - for I := StyleCount - 1 downto 0 do - begin - if not Selected[I] then - begin - Result := Counter < SelectedCount; - Exit; - end; - Inc(Counter); - end; - Result := False; -end; - -function TdxfmPrintStylesDesignWindow.CanMoveUp: Boolean; -var - I: Integer; -begin - for I := 0 to StyleCount - 1 do - if not Selected[I] then - begin - Result := I < SelectedCount; - Exit; - end; - Result := False; -end; - -function TdxfmPrintStylesDesignWindow.CanPaste: Boolean; -begin - Result := CanAdd and ClipboardComponents {$IFDEF DELPHI5} and Designer.CanPaste {$ENDIF}; -end; - -function TdxfmPrintStylesDesignWindow.CanPageSetup: Boolean; -begin - Result := SelectedCount = 1; -end; - -function TdxfmPrintStylesDesignWindow.CanRestoreDefaults: Boolean; -begin - Result := CurrentStyle <> nil; -end; - -function TdxfmPrintStylesDesignWindow.CanSelectAll: Boolean; -begin - Result := StyleCount <> SelectedCount; -end; - -function TdxfmPrintStylesDesignWindow.CanSetAsCurrent: Boolean; -begin - Result := (SelectedCount = 1) and not CurrentStyle.IsCurrentStyle; -end; - -{$IFDEF DELPHI5} -procedure TdxfmPrintStylesDesignWindow.CheckAddStyle; -begin - if not CanAdd then - raise EdxException.CreateRes(@SCantAddToFrame); -end; -{$ENDIF} - -procedure TdxfmPrintStylesDesignWindow.CheckDeleteStyle; -begin - if not CanDelete then - raise EdxException.CreateRes(@SCantDeleteAncestor); -end; - -procedure TdxfmPrintStylesDesignWindow.Copy; -var - Components: TdxDesignSelectionList; -begin - Components := CreateDesignSelectionList; - try - GetSelections(Components); - CopyComponents(Controller.Owner, Components); - finally - FreeDesignSelectionList(Components); - end; - UpdateHScrollBar; -end; - -procedure TdxfmPrintStylesDesignWindow.Cut; -begin - Copy; - CheckDeleteStyle; - Delete; -end; - -procedure TdxfmPrintStylesDesignWindow.Delete; -var - Selections: TdxDesignSelectionList; - I, ItemIndex: Integer; - Item: TComponent; -begin - StartWait; - try - ControllerDesigner.BeginUpdate; - try - Selections := CreateDesignSelectionList; - try - GetSelections(Selections); - ItemIndex := lbxStyles.ItemIndex; - for I := 0 to Selections.Count - 1 do - begin - Item := TComponent(Selections[I]); - if not (csAncestor in Item.ComponentState) then Item.Free; - end; - if ItemIndex < 0 then - ItemIndex := 0; - if ItemIndex > StyleCount - 1 then - ItemIndex := StyleCount - 1; - finally - FreeDesignSelectionList(Selections); - end; - finally - ControllerDesigner.CancelUpdate; - end; - if ItemIndex <> -1 then - Select(Styles[ItemIndex], False) - else - SelectController; - UpdateHScrollBar; - finally - StopWait; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.DeleteItem(AItem: TBasedxPrintStyle); -var - Index, ItemIndex: Integer; -begin - Index := IndexOf(AItem); - if Index <> -1 then - begin - ItemIndex := lbxStyles.ItemIndex; - lbxStyles.Items.Delete(Index); - - if ItemIndex < 0 then - ItemIndex := 0; - if ItemIndex > StyleCount - 1 then - ItemIndex := StyleCount - 1; - if ItemIndex <> -1 then - Select(Styles[ItemIndex], False) - else - SelectController; - UpdateHScrollBar; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.DrawDragRect; -begin - with lbxStyles do - if (FSaveDragIndex <> -1) and (FSaveDragIndex <> ItemIndex) then - Canvas.DrawFocusRect(ItemRect(FSaveDragIndex)); -end; - -function TdxfmPrintStylesDesignWindow.GetMinWindowSize: TPoint; -begin - Result.X := 300; - Result.Y := btnRestoreDefaults.Top + btnRestoreDefaults.Height + - GetSystemMetrics(SM_CYCAPTION) + 2 * GetSystemMetrics(SM_CXFRAME) + 4; -end; - -procedure TdxfmPrintStylesDesignWindow.GetSelections(const ASelections: TdxDesignSelectionList); -var - I: Integer; -begin - for I := 0 to StyleCount - 1 do - if Selected[I] then - ASelections.Add(Styles[I]); - if ASelections.Count = 0 then - ASelections.Add(Controller); -end; - -function TdxfmPrintStylesDesignWindow.IndexOf(AItem: TBasedxPrintStyle): Integer; -begin - Result := lbxStyles.Items.IndexOfObject(AItem); -end; - -procedure TdxfmPrintStylesDesignWindow.InternalAddStyle(AStyleClass: TdxPrintStyleClass); -var - Style: TBasedxPrintStyle; -begin -// AStyle := TBasedxPrintStyle(Designer.CreateComponent(AStyleClass, Designer.GetRoot, 0, 0, 0, 0)); - ControllerDesigner.BeginUpdate; - try - Style := Controller.AddStyleEx(AStyleClass, Designer.GetRoot); - Style.Name := UniqueName(Style); - finally - ControllerDesigner.CancelUpdate; - end; - lbxStyles.Items.AddObject(Style.Name, Style); - Select(Style, False); - UpdateHScrollBar; - lbxStyles.Update; -end; - -procedure TdxfmPrintStylesDesignWindow.MoveSelection(ADelta: Integer); - - procedure MoveDown(ADelta: Integer); - var - I, Index: Integer; - begin - for I := StyleCount - 1 downto 0 do - if Selected[I] then - begin - Index := Styles[I].Index; - Inc(Index, ADelta); - if Index > StyleCount - 1 then Index := StyleCount - 1; -// while (Index < StyleCount) and Selected[Index] do Inc(Index); - Styles[I].Index := Index; - end; - end; - - procedure MoveUp(ADelta: Integer); - var - I, Index: Integer; - begin - for I := 0 to StyleCount - 1 do - if Selected[I] then - begin - Index := Styles[I].Index; - Inc(Index, ADelta); - if Index < 0 then Index := 0; -// while (Index > -1) and Selected[Index] do Dec(Index); - Styles[I].Index := Index; - end; - end; - -begin - ControllerDesigner.BeginUpdate; - try - if ADelta > 0 then - MoveDown(ADelta) - else - MoveUp(ADelta); - finally - ControllerDesigner.EndUpdate; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.Paste; -var - Components: TdxDesignSelectionList; - I: Integer; -begin - Components := CreateDesignSelectionList; - try - StartWait; - try - lbxStyles.Items.BeginUpdate; - try - ControllerDesigner.BeginUpdate; - try - PasteComponents(Controller.Owner, Controller, Components); - finally - ControllerDesigner.EndUpdate; - end; - for I := StyleCount - 1 downto StyleCount - Components.Count do - Selected[I] := True; - Designer.SetSelections(Components); - finally - lbxStyles.Items.EndUpdate; - end; - finally - StopWait; - end; - finally - FreeDesignSelectionList(Components); - end; - UpdateHScrollBar; -end; - -procedure TdxfmPrintStylesDesignWindow.PrepareAddStandardItem(MenuItem: TMenuItem); -begin - if CanAddStandard then - begin - MenuItem.Caption := 'Add ' + DropT(CurrentStyle.ClassName); - MenuItem.Tag := MakeTTag(CurrentStyle.ClassType); - end; -end; - -procedure TdxfmPrintStylesDesignWindow.RefreshList; -var - Selections: TdxDesignSelectionList; - I, Index: Integer; - Item: TBasedxPrintStyle; - Component: TPersistent; -begin - lbxStyles.Items.BeginUpdate; - try - Selections := CreateDesignSelectionList; - try - GetSelections(Selections); - - lbxStyles.Items.Clear; - if Controller = nil then Exit; - - for I := 0 to Controller.Count - 1 do - begin - Item := Controller[I]; - if Item.Owner = Controller.Owner then - lbxStyles.Items.AddObject(Item.Name, Item); - end; - - for I := 0 to Selections.Count - 1 do - begin - Component := Selections[I]; - if Component is TBasedxPrintStyle then - begin - Index := IndexOf(TBasedxPrintStyle(Component)); - if Index <> -1 then - Selected[Index] := True; - end; - end; - finally - FreeDesignSelectionList(Selections); - end; - finally - lbxStyles.Items.EndUpdate; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.RestoreLayout; -begin - with TRegistry.Create do - try - try - if OpenKey(RegistryPath, False) then - begin - if ValueExists(sdxButtonBar) then - pnlButtons.Visible := ReadBool(sdxButtonBar); - if ValueExists(sdxWidth) then - Width := ReadInteger(sdxWidth); - if ValueExists(sdxHeight) then - Height := ReadInteger(sdxHeight); - end; - except - Abort; - end; - finally - Free; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.Select(AItem: TPersistent; AddToSelection: Boolean); -var - Selections: TdxDesignSelectionList; -begin - Selections := CreateDesignSelectionList; - if AddToSelection then - Designer.GetSelections(Selections); - Selections.Add(AItem); - Designer.SetSelections(Selections); -end; - -procedure TdxfmPrintStylesDesignWindow.SelectAll; -var - Selections: TdxDesignSelectionList; - I: Integer; -begin - Selections := CreateDesignSelectionList; - for I := 0 to StyleCount - 1 do - Selections.Add(Styles[I]); - Designer.SetSelections(Selections); -end; - -procedure TdxfmPrintStylesDesignWindow.SelectController; -begin - Select(Controller, False); -end; - -procedure TdxfmPrintStylesDesignWindow.StartWait; -begin - FSaveCursor := Screen.Cursor; - Screen.Cursor := crHourGlass; -end; - -procedure TdxfmPrintStylesDesignWindow.StopWait; -begin - Screen.Cursor := FSaveCursor; -end; - -procedure TdxfmPrintStylesDesignWindow.StoreLayout; -begin - with TRegistry.Create do - try - try - if OpenKey(RegistryPath, True) then - begin - WriteBool(sdxButtonBar, pnlButtons.Visible); - WriteInteger(sdxWidth, Width); - WriteInteger(sdxHeight, Height); - end; - except - Abort; - end; - finally - Free; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.UpdateCaption; -var - NewCaption: string; -begin - if (Controller <> nil) and (Controller.Owner <> nil) then - NewCaption := Format(sdxStyleDesigner, [Controller.Owner.Name, '.', Controller.Name]); - if Caption <> NewCaption then - Caption := NewCaption; -end; - -procedure TdxfmPrintStylesDesignWindow.UpdateControlsState; -begin - btnAdd.Enabled := CanAdd; - btnDelete.Enabled := CanDelete; - btnSelectAll.Enabled := CanSelectAll; - btnMoveUp.Enabled := CanMoveUp; - btnMoveDown.Enabled := CanMoveDown; - btnPageSetup.Enabled := CanPageSetup; - btnRestoreDefaults.Enabled := CanRestoreDefaults; -end; - -procedure TdxfmPrintStylesDesignWindow.UpdateHScrollBar; -var - I, W, W2: Integer; -begin - W := 0; - with lbxStyles, Items do - begin - for I := 0 to Count - 1 do - begin - if I = Controller.CurrentStyleIndex then - Canvas.Font.Style := [fsBold] - else - Canvas.Font.Style := []; - W2 := dxStyleGlyphSize.X + 4 + Canvas.TextWidth(Items[I]); - if W2 > W then W := W2; - end; - Perform(LB_SETHORIZONTALEXTENT, W, 0); - Canvas.Font.Style := []; - end; -end; - -procedure TdxfmPrintStylesDesignWindow.UpdateItem(AItem: TBasedxprintStyle); -var - Index: Integer; - R: TRect; -begin - if AItem <> nil then - begin - Index := IndexOf(AItem); - if Index <> -1 then - begin - lbxStyles.Items[Index] := AItem.Name; - R := lbxStyles.ItemRect(Index); - InvalidateRect(lbxStyles.Handle, @R, False); - UpdateHScrollBar; - end - end - else - RefreshList; - UpdateControlsState; -end; - -procedure TdxfmPrintStylesDesignWindow.UpdateMenuState; -begin - miAdd.Enabled := CanAdd; - miAddStandard.Visible := CanAddStandard; - PrepareAddStandardItem(miAddStandard); - miCut.Enabled := CanCut; - miCopy.Enabled := CanCopy; - miPaste.Enabled := CanPaste; - miDelete.Enabled := CanDelete; - miSelectAll.Enabled := CanSelectAll; - miMoveUp.Enabled := CanMoveUp; - miMoveDown.Enabled := CanMoveDown; - miPageSetup.Enabled := CanPageSetup; - miSetAsCurrent.Enabled := CanSetAsCurrent; - miRestoreDefaults.Enabled := CanRestoreDefaults; - miBackgroundEffects.Enabled := CanBackgroundEffects; - miBackgroundClear.Enabled := CanBackgroundClear; - miShowButtons.Checked := pnlButtons.Visible; -end; - -procedure TdxfmPrintStylesDesignWindow.UpdateSelections(const ASelections: TdxDesignSelectionList); - - function InSelection(AStyle: TBasedxPrintStyle): Boolean; - var - I: Integer; - begin - for I := 0 to ASelections.Count - 1 do - if AStyle = ASelections[I] then - begin - Result := True; - Exit; - end; - Result := False; - end; - -var - I: Integer; -begin - if (ASelections = nil) or (Controller = nil) or (csDestroying in Controller.ComponentState) or - (ControllerDesigner = nil) or (TdxStyleManagerDesigner(ControllerDesigner).FUpdateCount <> 0) then - Exit; - for I := 0 to StyleCount - 1 do - if Selected[I] xor InSelection(Styles[I]) then - Selected[I] := not Selected[I]; - UpdateControlsState; -end; - -procedure TdxfmPrintStylesDesignWindow.WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); -begin - inherited; - with Message.MinMaxInfo^ do - ptMinTrackSize := GetMinWindowSize; -end; - -procedure TdxfmPrintStylesDesignWindow.WMNCCreate(var Message: TWMNCCreate); -const - TypeDataSize = 32; -var - SysMenu: HMENU; - P: Pointer; - S: array[0..TypeDataSize - 1] of Char; - Info: TMenuItemInfo; - ItemExist: Boolean; -begin - SysMenu := GetSystemMenu(Handle, False); - P := @S[0]; - Info.cbSize := SizeOf(Info) - SizeOf(HBITMAP); - Info.fMask := MIIM_ID or MIIM_TYPE; - Info.dwTypeData := P; - Info.cch := TypeDataSize; - ItemExist := GetMenuItemInfo(SysMenu, SC_SIZE, False, Info); - inherited; - if ItemExist then - InsertMenuItem(SysMenu, 0, True, Info); -end; - -procedure TdxfmPrintStylesDesignWindow.WMNCDestroy(var Message: TWMNCCreate); -begin - GetSystemMenu(Handle, True); - inherited; -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmTtl.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPSfmTtl.dfm deleted file mode 100644 index 54dee039..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmTtl.dfm +++ /dev/null @@ -1,687 +0,0 @@ -object dxfmReportTitleProperties: TdxfmReportTitleProperties - Left = 442 - Top = 242 - ActiveControl = chbxTransparent - BorderIcons = [biSystemMenu, biMinimize, biMaximize, biHelp] - BorderStyle = bsDialog - Caption = 'Report Title' - ClientHeight = 443 - ClientWidth = 392 - Color = clBtnFace - Constraints.MinHeight = 470 - Constraints.MinWidth = 400 - KeyPreview = True - OldCreateOrder = True - Position = poScreenCenter - OnClose = FormClose - OnKeyDown = FormKeyDown - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object lblMode: TLabel - Left = 8 - Top = 11 - Width = 30 - Height = 13 - Caption = '&Mode:' - FocusControl = cbxMode - end - object btnOK: TButton - Left = 151 - Top = 413 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object btnCancel: TButton - Left = 231 - Top = 413 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 3 - end - object btnHelp: TButton - Left = 311 - Top = 413 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Help' - TabOrder = 4 - end - object pctlMain: TPageControl - Left = 6 - Top = 39 - Width = 380 - Height = 366 - ActivePage = tshProperties - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 1 - object tshText: TTabSheet - Caption = '&Text' - object memText: TMemo - Left = 0 - Top = 0 - Width = 372 - Height = 338 - Align = alClient - Lines.Strings = ( - '') - TabOrder = 0 - OnChange = TitleChanged - end - end - object tshProperties: TTabSheet - Caption = '&Properties' - OnResize = tshPropertiesResize - object bvlFont: TBevel - Left = 41 - Top = 84 - Width = 324 - Height = 4 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object lblAlignment: TLabel - Left = 7 - Top = 173 - Width = 47 - Height = 13 - Caption = 'Alignment' - end - object lblTextAlignY: TLabel - Left = 196 - Top = 199 - Width = 47 - Height = 13 - Caption = '&Vertically:' - FocusControl = cbxTextAlignY - end - object bvlTransparent: TBevel - Left = 100 - Top = 15 - Width = 265 - Height = 5 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object bvlAlignment: TBevel - Left = 74 - Top = 177 - Width = 290 - Height = 5 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object lblColor: TLabel - Left = 65 - Top = 41 - Width = 29 - Height = 13 - Alignment = taRightJustify - Caption = '&Color:' - end - object bvlColorHolder: TBevel - Left = 104 - Top = 37 - Width = 261 - Height = 21 - Anchors = [akLeft, akTop, akRight] - end - object lblTextAlignX: TLabel - Left = 8 - Top = 199 - Width = 60 - Height = 13 - Caption = 'Hori&zontally:' - FocusControl = cbxTextAlignX - end - object imgFont: TImage - Left = 9 - Top = 79 - Width = 16 - Height = 16 - AutoSize = True - Picture.Data = { - 07544269746D6170F6000000424DF60000000000000076000000280000001000 - 0000100000000100040000000000800000000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD000000DDDDDDDDDDDD00D - DDDDDDDDDDDDD00DDDDDDDD77777700DDDDDDDDDD77DD00DDDDDDDDDD70DD00D - D0DDDDDDD70DD00DD0DDDDDDD700D00D00DDDD7DD700000000DDDD7DD77DD7DD - DDDDDD77D77D77DDDDDDDD77777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel2: TBevel - Left = 10 - Top = 294 - Width = 354 - Height = 5 - Anchors = [akLeft, akRight, akBottom] - Shape = bsBottomLine - end - object lblTransparent: TLabel - Left = 25 - Top = 11 - Width = 62 - Height = 13 - Caption = '&Transparent ' - FocusControl = chbxTransparent - OnClick = lblTransparentClick - end - object cbxTextAlignX: TComboBox - Left = 92 - Top = 194 - Width = 95 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 4 - OnChange = TitleChanged - OnDrawItem = cbxTextAlignYDrawItem - Items.Strings = ( - 'Left' - 'Center' - 'Right') - end - object cbxTextAlignY: TComboBox - Tag = 1 - Left = 270 - Top = 194 - Width = 95 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 5 - OnChange = TitleChanged - OnDrawItem = cbxTextAlignYDrawItem - Items.Strings = ( - 'Top' - 'Center' - 'Bottom') - end - object chbxAdjustOnScale: TCheckBox - Left = 104 - Top = 137 - Width = 261 - Height = 17 - Anchors = [akLeft, akTop, akRight] - Caption = '&Adjust on Scale' - TabOrder = 3 - OnClick = TitleChanged - end - object edFont: TEdit - Left = 104 - Top = 107 - Width = 261 - Height = 21 - TabStop = False - Anchors = [akLeft, akTop, akRight] - Color = clBtnFace - ReadOnly = True - TabOrder = 2 - end - object btnFont: TButton - Left = 8 - Top = 105 - Width = 88 - Height = 25 - Caption = 'Fo&nt...' - TabOrder = 1 - OnClick = btnFontClick - end - object btnRestoreDefaults: TButton - Left = 189 - Top = 307 - Width = 176 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Restore Defaults' - TabOrder = 6 - OnClick = btnRestoreDefaultsClick - end - object chbxTransparent: TCheckBox - Left = 7 - Top = 10 - Width = 15 - Height = 17 - Caption = '&Transparent' - TabOrder = 0 - OnClick = TitleChanged - end - end - end - object cbxMode: TComboBox - Left = 48 - Top = 8 - Width = 338 - Height = 21 - Style = csDropDownList - Anchors = [akLeft, akTop, akRight] - ItemHeight = 13 - TabOrder = 0 - OnChange = TitleChanged - Items.Strings = ( - 'None' - 'On First Page, ' - 'On Every Top Page') - end - object ilAlignments: TImageList - AllocBy = 6 - Left = 10 - Top = 411 - Bitmap = { - 494C010106000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FF7FFFFF00000000FF7FFFFF00000000 - FF7FE00300000000FC1FFFFF00000000FE3FFF7F00000000FF7FFE3F00000000 - FFFFFC1F00000000E003FF7F00000000FFFFFF7F00000000FF7FFF7F00000000 - FE3FFF7F00000000FC1FFFFF00000000FF7FFFFF00000000FF7FFFFF00000000 - FF7FFFFF00000000FFFFFFFF00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFF003FC00FF003FFFFFFFFFFFFFFFFFFFF000300030003FF7F - FFFFFFFFFFFFFF7F003FC00FF003FF7FFFFFFFFFFFFFFF7F000300030003FC1F - FFFFFFFFFFFFFE3F003FC00FF003FF7FFFFFFFFFFFFFFFFF000300030003E003 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSfmTtl.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSfmTtl.pas deleted file mode 100644 index d61077ee..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSfmTtl.pas +++ /dev/null @@ -1,430 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSfmTtl; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, ComCtrls, ExtCtrls, dxPSForm, ImgList; - -type - TdxfmReportTitleProperties = class(TCustomdxPSForm) - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - pctlMain: TPageControl; - tshText: TTabSheet; - memText: TMemo; - tshProperties: TTabSheet; - lblMode: TLabel; - cbxMode: TComboBox; - bvlFont: TBevel; - lblAlignment: TLabel; - lblTextAlignY: TLabel; - bvlTransparent: TBevel; - bvlAlignment: TBevel; - lblColor: TLabel; - bvlColorHolder: TBevel; - lblTextAlignX: TLabel; - imgFont: TImage; - cbxTextAlignX: TComboBox; - cbxTextAlignY: TComboBox; - chbxAdjustOnScale: TCheckBox; - edFont: TEdit; - btnFont: TButton; - btnRestoreDefaults: TButton; - Bevel2: TBevel; - chbxTransparent: TCheckBox; - ilAlignments: TImageList; - lblTransparent: TLabel; - procedure TitleChanged(Sender: TObject); - procedure btnFontClick(Sender: TObject); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure btnRestoreDefaultsClick(Sender: TObject); - procedure cbxTextAlignYDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure tshPropertiesResize(Sender: TObject); - procedure lblTransparentClick(Sender: TObject); - private - FActivePage: Integer; - FccbxColor: TCustomComboBox; - FModified: Boolean; - FReportTitle: TPersistent; {TdxReportTitle} - procedure SetReportTitle(Value: TPersistent{TdxReportTitle}); - - procedure CreateControls; - procedure InitializeControls; - procedure LoadStrings; - procedure SaveUserInput; - procedure SetModified(Value: Boolean); - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - - property Modified: Boolean read FModified write SetModified; - protected - procedure BeforeConstruction; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - procedure LoadFromRegistry(const APath: string); override; - procedure SaveToRegistry(const APath: string); override; - - function Execute: Boolean; - property ReportTitle: TPersistent{TdxReportTitle} read FReportTitle write SetReportTitle; - end; - -function dxShowReportTitlePropertiesDlg(AReportTitle: TPersistent{TdxReportTitle}): Boolean; - -implementation - -{$R *.DFM} - -uses - Registry, cxClasses, dxPSCore, dxPrnDev, dxPSRes, dxPSUtl, dxPSGlbl, - dxExtCtrls, cxDrawTextUtils; - -const - sdxActivePage = 'ActivePage'; //Don't Localize - -function dxShowReportTitlePropertiesDlg(AReportTitle: TPersistent{TdxReportTitle}): Boolean; -var - Dialog: TdxfmReportTitleProperties; -begin - Result := False; - if AReportTitle = nil then Exit; - - Dialog := TdxfmReportTitleProperties.Create(nil); - try - Dialog.ReportTitle := TdxReportTitle(AReportTitle); - Result := Dialog.Execute; - if Result then - AReportTitle.Assign(Dialog.ReportTitle); - finally - Dialog.Free; - end; -end; - -procedure PlaceBevel(ABevel: TBevel; AControl: TControl); -var - RightBound: Integer; -begin - RightBound := ABevel.BoundsRect.Right; - ABevel.Left := AControl.Left + AControl.Width + 10; - ABevel.Width := RightBound - ABevel.Left; -end; - -{ TdxfmReportTitleProperties } - -constructor TdxfmReportTitleProperties.Create(AOwner: TComponent); -begin - HelpContext := dxhcTitlePropertiesDlg; - inherited; - if HelpContext = 0 then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - btnHelp.Visible := False; - BorderIcons := BorderIcons - [biHelp]; - end; - FReportTitle := TdxReportTitle.Create(nil); - CreateControls; - LoadStrings; -end; - -destructor TdxfmReportTitleProperties.Destroy; -begin - FreeAndNil(FReportTitle); - inherited; -end; - -function TdxfmReportTitleProperties.Execute: Boolean; -begin - InitializeControls; - with pctlMain do - ActivePage := Pages[FActivePage]; - Modified := False; - Result := (ShowModal = mrOK) and Modified; -end; - -procedure TdxfmReportTitleProperties.BeforeConstruction; -begin - inherited; - Options := Options + [foSizeableDialog]; -end; - -procedure TdxfmReportTitleProperties.FormClose(Sender: TObject; - var Action: TCloseAction); -begin - if ModalResult = mrOK then SaveUserInput; -end; - -procedure TdxfmReportTitleProperties.InitializeControls; -begin - with TdxReportTitle(ReportTitle) do - begin - chbxAdjustOnScale.Checked := AdjustOnReportScale; - TdxPSColorCombo(FccbxColor).ColorValue := Color; - FontInfoToText(Font, edFont); - cbxMode.ItemIndex := Integer(Mode); - memText.Text := Text; - cbxTextAlignX.ItemIndex := Integer(TextAlignX); - cbxTextAlignY.ItemIndex := Integer(TextAlignY); - chbxTransparent.Checked := Transparent; - FccbxColor.Enabled := not chbxTransparent.Checked; - end; -end; - -procedure TdxfmReportTitleProperties.SetModified(Value: Boolean); -begin - if FModified <> Value then - begin - FModified := Value; - //btnOK.Enabled := Value; - end; - FccbxColor.Enabled := not chbxTransparent.Checked; -end; - -procedure TdxfmReportTitleProperties.TitleChanged(Sender: TObject); -begin - FccbxColor.Enabled := not chbxTransparent.Checked; - Modified := True; -end; - -procedure TdxfmReportTitleProperties.lblTransparentClick(Sender: TObject); -begin - if chbxTransparent.CanFocus then ActiveControl := chbxTransparent; - chbxTransparent.Checked := not chbxTransparent.Checked; -end; - -procedure TdxfmReportTitleProperties.FormKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - if (ActiveControl = memText) and (Key = VK_ESCAPE) and (Shift = []) then - ModalResult := mrCancel; -end; - -procedure TdxfmReportTitleProperties.SetReportTitle(Value: TPersistent{TdxReportTitle}); -begin - FReportTitle.Assign(Value); -end; - -procedure TdxfmReportTitleProperties.CreateControls; -begin - FccbxColor := TdxPSColorCombo.Create(Self); - with TdxPSColorCombo(FccbxColor) do - begin - Anchors := bvlColorHolder.Anchors; - BoundsRect := bvlColorHolder.BoundsRect; - Parent := tshProperties; - ColorTypes := [ctPure]; - AutoColor := dxDefaultColor; - ShowAutoColor := True; - TabOrder := chbxTransparent.TabOrder + 1; - OnChange := TitleChanged; - end; - lblColor.FocusControl := FccbxColor; -end; - -procedure TdxfmReportTitleProperties.LoadStrings; -begin - Caption := cxGetResourceString(@sdxReportTitleDlgCaption); - btnOK.Caption := cxGetResourceString(@sdxBtnOkAccelerated); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - btnRestoreDefaults.Caption := cxGetResourceString(@sdxBtnRestoreDefaults); - - lblMode.Caption := cxGetResourceString(@sdxMode); - cbxMode.Clear; - cbxMode.Items.Add(cxGetResourceString(@sdxTitleModeNone)); - cbxMode.Items.Add(cxGetResourceString(@sdxTitleModeOnFirstPage)); - cbxMode.Items.Add(cxGetResourceString(@sdxTitleModeOnEveryTopPage)); - - tshText.Caption := cxGetResourceString(@sdxText); - tshProperties.Caption := cxGetResourceString(@sdxProperties); - lblColor.Caption := cxGetResourceString(@sdxColor); - PlaceBevel(bvlFont, imgFont); - btnFont.Caption := cxGetResourceString(@sdxBtnFont); - chbxAdjustOnScale.Caption := cxGetResourceString(@sdxAdjustOnScale); - - lblAlignment.Caption := DropAmpersand(cxGetResourceString(@sdxAlignment)); - PlaceBevel(bvlAlignment, lblAlignment); - - lblTextAlignX.Caption := cxGetResourceString(@sdxTextAlignHorz) + ':'; - cbxTextAlignX.Clear; - cbxTextAlignX.Items.Add(cxGetResourceString(@sdxTextAlignLeft)); - cbxTextAlignX.Items.Add(cxGetResourceString(@sdxTextAlignCenter)); - cbxTextAlignX.Items.Add(cxGetResourceString(@sdxTextAlignRight)); - - lblTextAlignY.Caption := cxGetResourceString(@sdxTextAlignVert) + ':'; - cbxTextAlignY.Clear; - cbxTextAlignY.Items.Add(cxGetResourceString(@sdxTextAlignTop)); - cbxTextAlignY.Items.Add(cxGetResourceString(@sdxTextAlignVCenter)); - cbxTextAlignY.Items.Add(cxGetResourceString(@sdxTextAlignBottom)); - - lblTransparent.Caption := cxGetResourceString(@sdxTransparent); - PlaceBevel(bvlTransparent, lblTransparent); -end; - -procedure TdxfmReportTitleProperties.SaveUserInput; -begin - with TdxReportTitle(FReportTitle) do - begin - AdjustOnReportScale := chbxAdjustOnScale.Checked; - Color := TdxPSColorCombo(FccbxColor).ColorValue; - Mode := TdxReportTitleMode(cbxMode.ItemIndex); - Text := memText.Text; - TextAlignX := TcxTextAlignX(cbxTextAlignX.ItemIndex); - TextAlignY := TcxTextAlignY(cbxTextAlignY.ItemIndex); - Transparent := chbxTransparent.Checked; - end; -end; - -procedure TdxfmReportTitleProperties.CMDialogChar(var message: TCMDialogChar); -var - I: Integer; -begin - inherited; - with pctlMain do - for I := 0 to PageCount - 1 do - if IsAccel(message.CharCode, Pages[I].Caption) then - begin - message.Result := 1; - ActivePage := Pages[I]; - Exit; - end; -end; - -procedure TdxfmReportTitleProperties.btnFontClick(Sender: TObject); -begin - FontDialog.Font := TdxReportTitle(ReportTitle).Font; - if FontDialog.Execute then - begin - TdxReportTitle(ReportTitle).Font := FontDialog.Font; - FontInfoToText(TdxReportTitle(ReportTitle).Font, edFont); - TitleChanged(nil); - end; -end; - -procedure TdxfmReportTitleProperties.LoadFromRegistry(const APath: string); -begin - inherited LoadFromRegistry(APath); - with TRegistry.Create do - try - if OpenKey(APath, False) then - try - if ValueExists(sdxActivePage) then - FActivePage := ReadInteger(sdxActivePage); - except - on ERegistryException do - // ignore - else - raise; - end; - finally - Free; - end; -end; - -procedure TdxfmReportTitleProperties.SaveToRegistry(const APath: string); -begin - inherited SaveToRegistry(APath); - with TRegistry.Create do - try - if OpenKey(APath, True) then - try - WriteInteger(sdxActivePage, pctlMain.ActivePage.PageIndex); - except - on ERegistryException do - // ignore - else - raise; - end; - finally - Free; - end; -end; - -procedure TdxfmReportTitleProperties.btnRestoreDefaultsClick(Sender: TObject); -begin - TdxReportTitle(ReportTitle).RestoreDefaults; - InitializeControls; - TitleChanged(nil); -end; - -procedure TdxfmReportTitleProperties.cbxTextAlignYDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -var - X, Y: Integer; -begin - with TComboBox(Control) do - begin - Canvas.FillRect(Rect); - - ilAlignments.Draw(Canvas, Rect.Left + 1, Rect.Top + 1, 3 * TTagToInt(Tag) + Index, True); - - Inc(Rect.Left, 1 + ilAlignments.Width + 2); - with Rect do - begin - X := Left; - Y := Top + (Bottom - Top - Canvas.TextHeight(Items[Index])) div 2; - end; - Canvas.TextRect(Rect, X, Y, Items[Index]); - end; -end; - -procedure TdxfmReportTitleProperties.tshPropertiesResize(Sender: TObject); -const - MinRightBound = 7; -var - W: Integer; -begin - W := TControl(Sender).Width div 2 - cbxTextAlignX.Left; - cbxTextAlignX.Width := W; - - lblTextAlignY.Left := cbxTextAlignX.Left + W + 12; - cbxTextAlignY.Left := lblTextAlignY.Left + lblTextAlignY.Width + - (cbxTextAlignX.Left - lblTextAlignX.Left - lblTextAlignX.Width); - if (TControl(Sender).Width - cbxTextAlignY.BoundsRect.Right) < MinRightBound then - cbxTextAlignY.Left := TControl(Sender).Width - MinRightBound - cbxTextAlignY.Width; - - cbxTextAlignY.Width := W; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSrxRELnk.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSrxRELnk.pas deleted file mode 100644 index 0759f786..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSrxRELnk.pas +++ /dev/null @@ -1,88 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSrxRELnk; - -interface - -{$I cxVer.inc} - -uses - Classes, Windows, dxPSRELnk, ARichEd; - -type - TrxRichEditReportLink = class(TAbstractdxRichEditReportLink) - private - function GetrxRichEdit: TAutoRichEdit; - protected - function GetRichEditHandle: HWND; override; - public - constructor Create(AOwner: TComponent); override; - property rxRichEdit: TAutoRichEdit read GetrxRichEdit; - end; - -implementation - -uses - dxPSCore; - -constructor TrxRichEditReportLink.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - RichEditVersion := 2; - LinkModified(False); -end; - -function TrxRichEditReportLink.GetrxRichEdit: TAutoRichEdit; -begin - Result := TAutoRichEdit(Component); -end; - -function TrxRichEditReportLink.GetRichEditHandle: HWND; -begin - if rxRichEdit <> nil then - Result := rxRichEdit.Handle - else - Result := 0; -end; - -initialization - dxPSRegisterReportLink(TrxRichEditReportLink, TAutoRichEdit, nil); - -finalization - dxPSUnregisterReportLink(TrxRichEditReportLink, TAutoRichEdit, nil); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPSrxRELnkReg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPSrxRELnkReg.pas deleted file mode 100644 index d566541b..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPSrxRELnkReg.pas +++ /dev/null @@ -1,54 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSrxRELnkReg; - -interface - -{$I cxVer.inc} - -procedure Register; - -implementation - -uses - Classes, dxPSrxRELnk; - -procedure Register; -begin - RegisterNoIcon([TrxRichEditReportLink]); -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPcPrVw.pas b/internal/x.46/ExpressPrinting System/Sources/dxPcPrVw.pas deleted file mode 100644 index 141cbf85..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPcPrVw.pas +++ /dev/null @@ -1,167 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPcPrVw; - -interface - -{$I cxVer.inc} - -uses - Graphics; - -procedure dxShowPicturePreview(AGraphic: TGraphic); - -implementation - -uses - Classes, SysUtils, Controls, ComCtrls, cxClasses, dxPSUtl, dxPSRes, dxPSImgs, - dxPSForm, dxExtCtrls; - -type - TdxfmPicturePreview = class(TCustomdxPSForm) - private - FPictureBox: TdxPSImageScrollBox; - FStatusBar: TStatusBar; - function GetGraphic: TGraphic; - function GetHasGraphic: Boolean; - protected - procedure KeyPress(var Key: Char); override; - procedure CreateControls; - procedure UpdateControls; - - property Graphic: TGraphic read GetGraphic; - property HasGraphic: Boolean read GetHasGraphic; - public - constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); override; - procedure Execute(AGraphic: TGraphic); - - property PreviewBox: TdxPSImageScrollBox read FPictureBox; - property StatusBar: TStatusBar read FStatusBar; - end; - -procedure dxShowPicturePreview(AGraphic: TGraphic); -begin - with TdxfmPicturePreview.CreateNew(nil) do - try - Execute(AGraphic); - finally - Free; - end; -end; - -constructor TdxfmPicturePreview.CreateNew(AOwner: TComponent; Dummy: Integer = 0); -begin - inherited; - Caption := cxGetResourceString(@sdxFSPCaption); - Constraints.MinHeight := 200; - Constraints.MinWidth := 200; - Icon_LoadFromResourceName(Icon, IDB_DXPSPREVIEW); - - CreateControls; -end; - -procedure TdxfmPicturePreview.Execute(AGraphic: TGraphic); -begin - PreviewBox.Picture.Assign(AGraphic); - UpdateControls; - - ShowModal; -end; - -procedure TdxfmPicturePreview.KeyPress(var Key: Char); -begin - if Key = #27 then - Close - else - inherited; -end; - -procedure TdxfmPicturePreview.CreateControls; -begin - FStatusBar := TStatusBar.Create(Self); - with StatusBar do - begin - Parent := Self; - Align := alBottom; - with Panels.Add do Width := 250; - with Panels.Add do Width := -1; - end; - - FPictureBox := TdxPSImageScrollBox.Create(Self); - with FPictureBox do - begin - Parent := Self; - Align := alClient; - BuiltInMenuItemsVisibility := BuiltInMenuItemsVisibility - [biiPreview]; - end; -end; - -procedure TdxfmPicturePreview.UpdateControls; -begin - Width := 400; - Height := 400; - - if HasGraphic then - begin - ClientWidth := Graphic.Width + 10; - ClientHeight := Graphic.Height + StatusBar.Height + 10; - with dxPSUtl.GetDesktopWorkArea do - begin - if Width > Right - Left then Width := Right - Left; - if Height > Bottom - Top then Height := Bottom - Top; - Self.Left := (Right - Left - Width) div 2; - Self.Top := (Bottom - Top - Height) div 2; - end; - StatusBar.Panels[0].Text := Format('%s: %d %s: %d', - [cxGetResourceString(@sdxWidth), Graphic.Width, - cxGetResourceString(@sdxHeight), Graphic.Height]); - end - else - PreviewBox.HintText := cxGetResourceString(@sdxNone); -end; - -function TdxfmPicturePreview.GetGraphic: TGraphic; -begin - Result := PreviewBox.Picture.Graphic; -end; - -function TdxfmPicturePreview.GetHasGraphic: Boolean; -begin - Result := PreviewBox.HasGraphic; -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPgsDlg.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPgsDlg.dfm deleted file mode 100644 index 71c59374..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPgsDlg.dfm +++ /dev/null @@ -1,3662 +0,0 @@ -object dxfmPageSetupDialog: TdxfmPageSetupDialog - Left = 448 - Top = 228 - BorderStyle = bsDialog - Caption = 'Page Setup' - ClientHeight = 435 - ClientWidth = 526 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = True - Position = poScreenCenter - OnClose = FormClose - OnCloseQuery = FormCloseQuery - OnKeyDown = FormKeyDown - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlStyleName: TPanel - Left = 0 - Top = 0 - Width = 526 - Height = 31 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblStyleName: TLabel - Left = 4 - Top = 9 - Width = 61 - Height = 13 - Caption = 'Style &Name: ' - FocusControl = edStyleName - end - object edStyleName: TEdit - Left = 66 - Top = 6 - Width = 259 - Height = 21 - MaxLength = 31 - TabOrder = 0 - OnChange = edStyleNameChange - OnExit = edStyleNameExit - end - object btnOptions: TButton - Left = 331 - Top = 5 - Width = 88 - Height = 24 - Caption = '&Options ...' - TabOrder = 1 - end - end - object pnlButtons: TPanel - Left = 0 - Top = 399 - Width = 526 - Height = 36 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object btnPrintPreview: TButton - Left = 117 - Top = 7 - Width = 106 - Height = 23 - Caption = 'Print Preview...' - TabOrder = 1 - OnClick = btnPrintPreviewClick - end - object btnPrint: TButton - Left = 5 - Top = 7 - Width = 106 - Height = 23 - Caption = 'Print...' - TabOrder = 0 - OnClick = btnPrintClick - end - object btnOK: TButton - Left = 273 - Top = 7 - Width = 79 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object btnCancel: TButton - Left = 358 - Top = 7 - Width = 79 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 3 - end - object btnHelp: TButton - Left = 443 - Top = 7 - Width = 79 - Height = 23 - Caption = '&Help' - TabOrder = 4 - end - end - object Panel4: TPanel - Left = 0 - Top = 31 - Width = 526 - Height = 368 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object pgctrlMain: TPageControl - Left = 5 - Top = 3 - Width = 517 - Height = 365 - ActivePage = tshMargins - MultiLine = True - TabOrder = 0 - OnChange = pgctrlMainChange - OnChanging = pgctrlMainChanging - object tshPage: TTabSheet - Caption = '&Page' - object Panel5: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 337 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object gbxPaper: TGroupBox - Left = 5 - Top = 5 - Width = 231 - Height = 326 - Caption = ' Paper ' - TabOrder = 0 - object lblPaperWidth: TLabel - Left = 18 - Top = 208 - Width = 32 - Height = 13 - Caption = '&Width:' - OnClick = lblMarginTopClick - end - object lblPaperHeight: TLabel - Left = 18 - Top = 234 - Width = 35 - Height = 13 - Caption = 'H&eight:' - OnClick = lblMarginTopClick - end - object bvlPaperDimensions: TBevel - Left = 64 - Top = 191 - Width = 157 - Height = 4 - Shape = bsBottomLine - end - object bvlPaperSource: TBevel - Left = 79 - Top = 278 - Width = 142 - Height = 4 - Shape = bsBottomLine - end - object bvlPaperType: TBevel - Left = 36 - Top = 20 - Width = 185 - Height = 4 - Shape = bsBottomLine - end - object bvlPaperWidthHolder: TBevel - Left = 81 - Top = 204 - Width = 100 - Height = 22 - Visible = False - end - object bvlPaperHeightHolder: TBevel - Left = 81 - Top = 230 - Width = 100 - Height = 22 - Visible = False - end - object lblPaperSource: TLabel - Left = 6 - Top = 272 - Width = 63 - Height = 13 - Caption = 'Paper so&urce' - FocusControl = cbxPaperSource - OnClick = lblPaperSourceClick - end - object lblPaperType: TLabel - Left = 6 - Top = 15 - Width = 24 - Height = 13 - Caption = 'T&ype' - FocusControl = lbxPaperType - end - object lblPaperDimensions: TLabel - Left = 6 - Top = 186 - Width = 53 - Height = 13 - Caption = 'Dimensions' - end - object lbxPaperType: TListBox - Left = 12 - Top = 31 - Width = 208 - Height = 148 - Style = lbOwnerDrawFixed - IntegralHeight = True - ItemHeight = 18 - TabOrder = 0 - OnClick = lbxPaperTypeClick - OnDrawItem = lbxPaperTypeDrawItem - end - object cbxPaperSource: TComboBox - Left = 12 - Top = 289 - Width = 208 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 1 - OnChange = cbxPaperSourceChange - OnDrawItem = cbxPaperSourceDrawItem - end - end - object Panel1: TPanel - Left = 239 - Top = 0 - Width = 270 - Height = 337 - Align = alRight - BevelOuter = bvNone - ParentColor = True - TabOrder = 1 - object Label1: TLabel - Left = 265 - Top = 5 - Width = 5 - Height = 326 - Align = alRight - AutoSize = False - Transparent = True - end - object Label2: TLabel - Left = 0 - Top = 5 - Width = 5 - Height = 326 - Align = alLeft - AutoSize = False - Transparent = True - end - object Label3: TLabel - Left = 0 - Top = 0 - Width = 270 - Height = 5 - Align = alTop - AutoSize = False - Transparent = True - end - object Label4: TLabel - Left = 0 - Top = 331 - Width = 270 - Height = 6 - Align = alBottom - AutoSize = False - Transparent = True - end - object Panel6: TPanel - Left = 5 - Top = 5 - Width = 260 - Height = 326 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object gbxOrientation: TGroupBox - Left = 0 - Top = 0 - Width = 260 - Height = 187 - Align = alTop - Caption = ' Orientation ' - TabOrder = 0 - object bvlOrientationHolder: TBevel - Left = 8 - Top = 20 - Width = 145 - Height = 159 - Visible = False - end - object rBtnLandscape: TRadioButton - Tag = 1 - Left = 162 - Top = 109 - Width = 93 - Height = 17 - Caption = '&Landscape' - TabOrder = 1 - OnClick = OrientationClick - OnDblClick = OrientationDblClick - end - object rBtnPortrait: TRadioButton - Left = 162 - Top = 62 - Width = 93 - Height = 17 - Caption = 'P&ortrait' - Checked = True - TabOrder = 0 - TabStop = True - OnClick = OrientationClick - OnDblClick = OrientationDblClick - end - end - object gbxPrintOrder: TGroupBox - Left = 0 - Top = 187 - Width = 260 - Height = 80 - Align = alTop - Caption = ' Print Order ' - TabOrder = 1 - object pbxPageOrder: TPaintBox - Left = 10 - Top = 20 - Width = 74 - Height = 49 - OnDblClick = pbxPageOrderDblClick - OnPaint = pbxPageOrderPaint - end - object rbtnOverThenDown: TRadioButton - Left = 105 - Top = 47 - Width = 150 - Height = 17 - Caption = 'O&ver, then down' - TabOrder = 0 - OnClick = PageOrderClick - end - object rbtnDownThenOver: TRadioButton - Tag = 1 - Left = 105 - Top = 24 - Width = 150 - Height = 17 - Caption = '&Down, then over' - Checked = True - TabOrder = 1 - TabStop = True - OnClick = PageOrderClick - end - end - object gbxShading: TGroupBox - Left = 0 - Top = 267 - Width = 260 - Height = 59 - Align = alClient - Caption = ' Shading ' - TabOrder = 2 - object chbxShading: TCheckBox - Left = 11 - Top = 25 - Width = 206 - Height = 17 - Caption = 'Print using &gray shading' - TabOrder = 0 - OnClick = chbxShadingClick - end - end - end - end - end - end - object tshMargins: TTabSheet - Caption = '&Margins' - object pnlInMargins: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 337 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Bevel12: TBevel - Left = 297 - Top = 7 - Width = 201 - Height = 5 - Shape = bsBottomLine - end - object bvlPreviewHolder: TBevel - Left = 252 - Top = 18 - Width = 246 - Height = 310 - Visible = False - end - object lblPreview: TLabel - Left = 252 - Top = 3 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object Panel14: TPanel - Left = 0 - Top = 0 - Width = 237 - Height = 337 - Align = alLeft - BevelOuter = bvNone - ParentColor = True - TabOrder = 0 - object Label5: TLabel - Left = 0 - Top = 0 - Width = 237 - Height = 5 - Align = alTop - AutoSize = False - Transparent = True - end - object Label6: TLabel - Left = 0 - Top = 332 - Width = 237 - Height = 5 - Align = alBottom - AutoSize = False - Transparent = True - end - object Label7: TLabel - Left = 0 - Top = 5 - Width = 5 - Height = 327 - Align = alLeft - AutoSize = False - Transparent = True - end - object Label8: TLabel - Left = 232 - Top = 5 - Width = 5 - Height = 327 - Align = alRight - AutoSize = False - Transparent = True - end - object Panel8: TPanel - Left = 5 - Top = 5 - Width = 227 - Height = 327 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object bvlMarginsWarningHolder: TBevel - Left = 4 - Top = 281 - Width = 222 - Height = 33 - Visible = False - end - object gbxMargins: TGroupBox - Left = 0 - Top = 0 - Width = 227 - Height = 223 - Align = alTop - TabOrder = 0 - object pnlMargins: TPanel - Left = 2 - Top = 15 - Width = 223 - Height = 106 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblMarginTop: TLabel - Left = 13 - Top = 8 - Width = 22 - Height = 13 - Caption = '&Top:' - OnClick = lblMarginTopClick - end - object lblMarginBottom: TLabel - Left = 13 - Top = 34 - Width = 41 - Height = 13 - Caption = '&Bottom: ' - OnClick = lblMarginTopClick - end - object lblMarginLeft: TLabel - Left = 13 - Top = 60 - Width = 26 - Height = 13 - Caption = 'Le&ft: ' - OnClick = lblMarginTopClick - end - object lblMarginRight: TLabel - Left = 13 - Top = 86 - Width = 32 - Height = 13 - Caption = 'Ri&ght: ' - OnClick = lblMarginTopClick - end - object bvlMarginTopHolder: TBevel - Left = 97 - Top = 3 - Width = 117 - Height = 22 - Visible = False - end - object bvlMarginBottomHolder: TBevel - Left = 97 - Top = 29 - Width = 117 - Height = 22 - Visible = False - end - object bvlMarginLeftHolder: TBevel - Left = 97 - Top = 55 - Width = 117 - Height = 22 - Visible = False - end - object bvlMarginRightHolder: TBevel - Left = 97 - Top = 81 - Width = 117 - Height = 22 - Visible = False - end - end - object pnlHFMargins: TPanel - Left = 2 - Top = 121 - Width = 223 - Height = 58 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblMarginHeader: TLabel - Left = 13 - Top = 11 - Width = 42 - Height = 13 - Caption = 'H&eader: ' - OnClick = lblMarginTopClick - end - object lblMarginFooter: TLabel - Left = 13 - Top = 38 - Width = 36 - Height = 13 - Caption = 'Foote&r:' - OnClick = lblMarginTopClick - end - object bvlMarginHeaderHolder: TBevel - Left = 97 - Top = 6 - Width = 117 - Height = 22 - Visible = False - end - object bvlMarginFooterHolder: TBevel - Left = 97 - Top = 33 - Width = 117 - Height = 22 - Visible = False - end - end - object Panel3: TPanel - Left = 2 - Top = 179 - Width = 223 - Height = 39 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object btnFix: TButton - Left = 6 - Top = 13 - Width = 79 - Height = 23 - Caption = 'Fi&x' - TabOrder = 0 - OnClick = btnFixClick - end - object btnRestoreOriginalMargins: TButton - Left = 88 - Top = 13 - Width = 127 - Height = 23 - Caption = 'Restore &Original' - TabOrder = 1 - OnClick = btnRestoreOriginalMarginsClick - end - end - end - object pnlCenterOnPage: TPanel - Left = 0 - Top = 223 - Width = 227 - Height = 54 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object bvlCenterOnPage: TBevel - Left = 99 - Top = 16 - Width = 128 - Height = 4 - Shape = bsBottomLine - end - object lblCenterOnPage: TLabel - Left = 1 - Top = 13 - Width = 78 - Height = 13 - Caption = 'Center on page ' - end - object chbxCenterHorz: TCheckBox - Left = 9 - Top = 33 - Width = 112 - Height = 17 - Caption = 'Hori&zontaly' - Color = clBtnFace - ParentColor = False - TabOrder = 0 - OnClick = CenterOnPageClick - end - object chbxCenterVert: TCheckBox - Tag = 1 - Left = 131 - Top = 33 - Width = 92 - Height = 17 - Caption = '&Verticaly' - TabOrder = 1 - OnClick = CenterOnPageClick - end - end - end - end - end - end - object tshHeaderFooter: TTabSheet - Caption = '&Header\Footer' - object Panel7: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 337 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object pnlBottom: TPanel - Left = 0 - Top = 236 - Width = 509 - Height = 67 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object pnlHFOpt: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 67 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object Label18: TLabel - Left = 0 - Top = 65 - Width = 509 - Height = 2 - Align = alBottom - AutoSize = False - Transparent = True - end - object Label17: TLabel - Left = 0 - Top = 2 - Width = 4 - Height = 63 - Align = alLeft - AutoSize = False - Transparent = True - end - object Label19: TLabel - Left = 505 - Top = 2 - Width = 4 - Height = 63 - Align = alRight - AutoSize = False - Transparent = True - end - object Label20: TLabel - Left = 0 - Top = 0 - Width = 509 - Height = 2 - Align = alTop - AutoSize = False - Transparent = True - end - object Panel9: TPanel - Left = 4 - Top = 2 - Width = 501 - Height = 63 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object pnlVertAlignment: TPanel - Left = 0 - Top = 0 - Width = 125 - Height = 63 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object gbxVertAlignment: TGroupBox - Left = 0 - Top = 0 - Width = 120 - Height = 63 - Caption = ' Vertical Alignment ' - TabOrder = 0 - object tbTAVert: TToolBar - Left = 22 - Top = 23 - Width = 79 - Height = 30 - Align = alNone - ButtonHeight = 24 - ButtonWidth = 25 - EdgeBorders = [ebLeft, ebTop, ebRight, ebBottom] - EdgeInner = esLowered - Images = ilPaperTypes - TabOrder = 0 - Wrapable = False - object ToolButton12: TToolButton - Left = 0 - Top = 2 - Caption = 'ToolButton9' - Down = True - Grouped = True - ImageIndex = 0 - Style = tbsCheck - OnClick = VertTextAlignClick - end - object ToolButton13: TToolButton - Tag = 1 - Left = 25 - Top = 2 - Caption = 'ToolButton10' - Grouped = True - ImageIndex = 1 - Style = tbsCheck - OnClick = VertTextAlignClick - end - object ToolButton14: TToolButton - Tag = 2 - Left = 50 - Top = 2 - Caption = 'ToolButton11' - Grouped = True - ImageIndex = 2 - Style = tbsCheck - OnClick = VertTextAlignClick - end - end - end - end - object gbxFunctions: TGroupBox - Left = 125 - Top = 0 - Width = 376 - Height = 63 - Align = alClient - Caption = ' Predefined Functions ' - TabOrder = 1 - object pnlToolBar: TPanel - Left = 2 - Top = 15 - Width = 372 - Height = 46 - Align = alClient - BevelOuter = bvNone - Caption = 'Panel1' - TabOrder = 0 - object tbPredefined: TToolBar - Left = 19 - Top = 8 - Width = 335 - Height = 30 - Align = alNone - ButtonHeight = 24 - ButtonWidth = 25 - EdgeBorders = [ebLeft, ebTop, ebRight, ebBottom] - EdgeInner = esLowered - ParentShowHint = False - ShowHint = True - TabOrder = 0 - Wrapable = False - end - end - end - end - end - end - object pnlHeader: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 118 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object pnlHeaderMemos: TPanel - Left = 0 - Top = 46 - Width = 509 - Height = 72 - Align = alClient - BevelOuter = bvNone - ParentColor = True - TabOrder = 2 - object Label9: TLabel - Left = 0 - Top = 4 - Width = 4 - Height = 64 - Align = alLeft - AutoSize = False - Transparent = True - end - object Label10: TLabel - Left = 505 - Top = 4 - Width = 4 - Height = 64 - Align = alRight - AutoSize = False - Transparent = True - end - object Label11: TLabel - Left = 0 - Top = 0 - Width = 509 - Height = 4 - Align = alTop - AutoSize = False - Transparent = True - end - object Label12: TLabel - Left = 0 - Top = 68 - Width = 509 - Height = 4 - Align = alBottom - AutoSize = False - Transparent = True - end - object pnlHeaderMemosHost: TPanel - Left = 4 - Top = 4 - Width = 501 - Height = 64 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object memHeaderLeft: TMemo - Left = 0 - Top = 0 - Width = 167 - Height = 64 - Align = alClient - ScrollBars = ssVertical - TabOrder = 0 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - object memHeaderCenter: TMemo - Tag = 1 - Left = 167 - Top = 0 - Width = 167 - Height = 64 - Align = alRight - Alignment = taCenter - ScrollBars = ssVertical - TabOrder = 1 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - object memHeaderRight: TMemo - Tag = 2 - Left = 334 - Top = 0 - Width = 167 - Height = 64 - Align = alRight - Alignment = taRightJustify - ScrollBars = ssVertical - TabOrder = 2 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - end - end - object pnlHeaderFont: TPanel - Left = 0 - Top = 16 - Width = 509 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object btnHeaderFont: TButton - Left = 4 - Top = 3 - Width = 75 - Height = 26 - Caption = '&Font...' - TabOrder = 0 - OnClick = btnHFFontClick - end - object edHeaderFontInfo: TEdit - Left = 84 - Top = 6 - Width = 244 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnHeaderBackground: TBitBtn - Left = 333 - Top = 3 - Width = 172 - Height = 26 - Caption = '&Background' - TabOrder = 2 - OnClick = BackgroundClick - Layout = blGlyphRight - end - end - object pnlHeaderTitle: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 16 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object bvlHeader: TBevel - Left = 47 - Top = 6 - Width = 454 - Height = 5 - Shape = bsBottomLine - end - object lblHeader: TLabel - Left = 6 - Top = 2 - Width = 35 - Height = 13 - Caption = 'Header' - end - end - end - object pnlFooter: TPanel - Left = 0 - Top = 118 - Width = 509 - Height = 118 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object pnlFooterTitle: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 16 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object bvlFooter: TBevel - Left = 48 - Top = 8 - Width = 456 - Height = 4 - Shape = bsBottomLine - end - object lblFooter: TLabel - Left = 6 - Top = 3 - Width = 32 - Height = 13 - Caption = 'Footer' - end - end - object pnlFooterFont: TPanel - Left = 0 - Top = 16 - Width = 509 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object btnFooterFont: TButton - Tag = 1 - Left = 4 - Top = 3 - Width = 75 - Height = 26 - Caption = 'Fo&nt...' - TabOrder = 0 - OnClick = btnHFFontClick - end - object edFooterFontInfo: TEdit - Left = 83 - Top = 6 - Width = 244 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnFooterBackGround: TBitBtn - Tag = 1 - Left = 332 - Top = 3 - Width = 172 - Height = 26 - Caption = 'Back&ground' - TabOrder = 2 - OnClick = BackgroundClick - Layout = blGlyphRight - end - end - object pnlFooterMemos: TPanel - Left = 0 - Top = 46 - Width = 509 - Height = 72 - Align = alClient - BevelOuter = bvNone - ParentColor = True - TabOrder = 2 - object Label14: TLabel - Left = 0 - Top = 0 - Width = 509 - Height = 4 - Align = alTop - AutoSize = False - Transparent = True - end - object Label15: TLabel - Left = 0 - Top = 68 - Width = 509 - Height = 4 - Align = alBottom - AutoSize = False - Transparent = True - end - object Label13: TLabel - Left = 0 - Top = 4 - Width = 4 - Height = 64 - Align = alLeft - AutoSize = False - Transparent = True - end - object Label16: TLabel - Left = 505 - Top = 4 - Width = 4 - Height = 64 - Align = alRight - AutoSize = False - Transparent = True - end - object pnlFooterMemosHost: TPanel - Left = 4 - Top = 4 - Width = 501 - Height = 64 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object memFooterLeft: TMemo - Tag = 3 - Left = 0 - Top = 0 - Width = 167 - Height = 64 - Align = alClient - ScrollBars = ssVertical - TabOrder = 0 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - object memFooterCenter: TMemo - Tag = 4 - Left = 167 - Top = 0 - Width = 167 - Height = 64 - Align = alRight - Alignment = taCenter - ScrollBars = ssVertical - TabOrder = 1 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - object memFooterRight: TMemo - Tag = 5 - Left = 334 - Top = 0 - Width = 167 - Height = 64 - Align = alRight - Alignment = taRightJustify - ScrollBars = ssVertical - TabOrder = 2 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - end - end - end - object pnlReverse: TPanel - Left = 0 - Top = 303 - Width = 509 - Height = 28 - Align = alTop - BevelOuter = bvNone - TabOrder = 3 - object chbxReverseOnEvenPages: TCheckBox - Left = 7 - Top = 8 - Width = 264 - Height = 17 - Caption = '&Reverse on even pages' - TabOrder = 0 - OnClick = chbxReverseOnEvenPagesClick - end - end - end - end - object tshScaling: TTabSheet - Caption = '&Scaling' - object Panel2: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 337 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object bvlAdjustToHolder: TBevel - Left = 35 - Top = 32 - Width = 75 - Height = 22 - Visible = False - end - object bvlFitToPageHolder: TBevel - Left = 35 - Top = 84 - Width = 75 - Height = 22 - Visible = False - end - object lblPagesWideBy: TLabel - Left = 119 - Top = 91 - Width = 77 - Height = 13 - Caption = 'page(s) &wide by' - end - object lblPercentOfNormalSize: TLabel - Left = 118 - Top = 39 - Width = 67 - Height = 13 - Caption = '% normal size' - end - object bvlFitToPageTallHolder: TBevel - Left = 261 - Top = 84 - Width = 75 - Height = 22 - Visible = False - end - object lblTall: TLabel - Left = 343 - Top = 91 - Width = 14 - Height = 13 - Caption = '&tall' - end - object rbtnAdjustTo: TRadioButton - Left = 12 - Top = 9 - Width = 150 - Height = 17 - Caption = '&Adjust To:' - Checked = True - TabOrder = 0 - TabStop = True - OnClick = ScalingClick - end - object rbtnFitTo: TRadioButton - Tag = 1 - Left = 12 - Top = 62 - Width = 150 - Height = 17 - Caption = '&Fit To:' - TabOrder = 1 - OnClick = ScalingClick - end - end - end - end - end - object ilPrintOrders: TImageList - BkColor = clWhite - AllocBy = 2 - Height = 49 - Masked = False - Width = 74 - Left = 210 - Top = 65534 - Bitmap = { - 494C01010200040004004A003100FFFFFF00FE00FFFFFFFFFFFFFFFF424D3600 - 000000000000360000002800000028010000310000000100200000000000A0E2 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080000000 - 0000000000008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000000000000000000080800000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000000000000000000000000000000000008080 - 00008080000080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF0000000000000000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000000000000000000000FFFFFF0080808000FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 000000000000808000008080000080800000FFFFFF00FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000080800000808000008080 - 0000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000080800000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008080000080800000808000008080 - 000080800000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 000080800000808000008080000080800000808000008080000080800000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 000000000000808000008080000080800000808000008080000080808000FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000808000008080000080800000808000008080 - 000080800000808000008080000080800000808000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF008080800080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 000000000000808000008080000080800000808000008080000080800000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000008080000080800000808000008080000080800000808000008080 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 000080800000808000008080000080800000808000008080000080800000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 0000000000008080000080800000808000008080000080800000808000008080 - 000080800000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00000000000000000080800000808000008080 - 0000808000008080000000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000FFFFFF0080808000FFFFFF00000000000000 - 0000000000000000000080800000808000008080000080800000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00808000008080 - 0000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF0000000000FFFFFF00808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00808080008080 - 0000808000008080000080800000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 000080800000808000008080000080800000FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080000000 - 0000000000008080000080800000808000008080000080808000808080008080 - 8000808000008080000080800000808000008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080000000000000000000808000008080 - 0000808000008080000080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808000008080000080800000808000008080000080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080800000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080000080800000808000008080000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080000080800000808000008080000080800000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00000000000000000080800000808000008080000080800000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0080800000808000008080000080800000808000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF0000000000000000000000000080800000808000008080000080800000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000808000008080000080800000808000008080 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080000080800000808000008080 - 0000FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080000080800000808000008080 - 000080800000FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080000000 - 0000000000008080000080800000808000008080000080808000808080008080 - 8000808080008080800080808000808080008080800080800000808000008080 - 000080800000FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080000000000000000000808000008080 - 0000808000008080000080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080800000808000008080 - 00008080000080800000FFFFFF00FFFFFF008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00808000008080 - 0000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 0000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 000080800000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080800000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF008080000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080000080800000808000008080000080800000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080000000 - 0000000000008080000080800000808000008080000080808000808080008080 - 8000808080008080800080808000808080008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080800000808000008080000080800000808080008080 - 8000808080008080800080808000808080000000000000000000808000008080 - 0000808000008080000080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF0080800000808000008080000080800000808000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF008080800080800000808000008080000080800000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00808000008080000080800000808000008080 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF008080000080800000808000008080 - 000000000000FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080000080800000808000008080 - 0000808000000000000000000000FFFFFF0080808000FFFFFF00000000000000 - 00000000000000000000FFFFFF0080808000FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0080800000808000008080 - 000080800000FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080800080800000808000008080 - 00008080000080800000FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00808000008080 - 0000808000008080000080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00808000008080 - 0000808000008080000080800000FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000008080 - 0000808000008080000080800000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF008080 - 00008080000080800000808000008080000080808000FFFFFF00000000000000 - 00000000000000000000FFFFFF0080808000FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00808000008080000080800000808000000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF008080000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080000080800000808000008080000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080000080800000808000008080000080800000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080800000808000008080000080800000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF000000 - 0000000000000000000080800000808000008080000080800000808000000000 - 00000000000000000000FFFFFF0080808000FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000808000008080000080800000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000808000008080000080800000808000008080 - 0000FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF008080000080800000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080000080800000808000008080 - 000080800000FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080000000 - 0000000000008080000080800000808000008080000080808000808080008080 - 8000808080008080800080808000808080008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080800000808000008080 - 0000808000008080000080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000000000000000000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF00FFFFFF0080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 000080800000808000008080000080800000FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF00FFFFFF0080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000} - end - object ilPaperTypes: TImageList - AllocBy = 8 - Left = 126 - Top = 65534 - Bitmap = { - 494C010103000800080010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFF7FFFFF0000FFFFFF7FFFFF0000 - FFFFFF7FE0030000FFFFFC1FFFFF0000FFFFFE3FFFBF0000FF7FFF7FFF1F0000 - FF7FFFFFFE0F0000FF7FE003FFBF0000FF7FFFFFFFBF0000FC1FFF7FFFBF0000 - FE3FFE3FFFBF0000FF7FFC1FFFFF0000FFFFFF7FFFFF0000E003FF7FFFFF0000 - FFFFFF7FFFFF0000FFFFFFFFFFFF000000000000000000000000000000000000 - 000000000000} - end - object ilBins: TImageList - Left = 154 - Top = 65534 - Bitmap = { - 494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000001000000001002000000000000010 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000000000FF - FF00000000000000000000000000FFFFFF008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000000 - 0000FFFFFF008080800000000000808080000000000000000000808080008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 800080808000808080008080800000000000000000000000000080808000FFFF - FF00808080008080800000000000FFFFFF008080800080808000000000000000 - 0000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF00000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00808080000000000080808000FFFFFF00808080008080 - 8000FFFFFF008080800000000000FFFFFF008080800080808000808080008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF0000FFFF00808080008080800080808000808080000000000000000000FFFF - FF0000FFFF00FFFFFF008080800000000000808080008080800080808000FFFF - FF00808080008080800000000000FFFFFF008080800080808000808080008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF0000FF - FF00FFFFFF0080808000FFFFFF00FFFFFF008080800080808000808080000000 - 0000FFFFFF0000FFFF00808080000000000080808000FFFFFF00808080008080 - 800080808000FFFFFF00FFFFFF00FFFFFF008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF0000FFFF00808080008080800000FF00000000FF0000000000808080000000 - 000000FFFF00FFFFFF008080800000000000808080008080800080808000FFFF - FF00FFFFFF008080800080808000FFFFFF00FFFFFF00FFFFFF00808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080008080800000FF - FF00FFFFFF0000FFFF00FFFFFF008080800080808000808080000000000000FF - FF00FFFFFF0000FFFF0080808000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000FF000000FF00FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0080808000FFFFFF00FFFFFF000000 - 000000FFFF00FFFFFF008080800000000000000000000000000080808000FFFF - FF00FFFFFF0000FF000000FF0000FFFFFF00FFFFFF00FFFFFF00808080008080 - 800000000000FFFFFF0080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00808080008080800000FF - FF00FFFFFF0000FFFF0080808000000000000000000000000000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080800080808000FFFFFF00FFFF - FF0000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000000000000000000000000000000000000000 - 00008080800080808000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000008080800000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF008080800000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000100000000100010000000000800000000000000000000000 - 000000000000000000000000FFFFFF00FFFFFE3F00000000E000E00F00000000 - C000800300000000800000010000000080000001000000008000000100000000 - 8000000000000000800000000000000080008000000000008000800000000000 - 8000C001000000008000F003000000008001FC0100000000C07FFF0000000000 - E0FFFF8100000000FFFFFFC70000000000000000000000000000000000000000 - 000000000000} - end - object ilPapers: TImageList - Left = 182 - Top = 65534 - Bitmap = { - 494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000001000000001002000000000000010 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00808080008080800080808000808080008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000080800000808000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000FFFF0000808000008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000808000FFFFFF000080800000FF - FF00FFFFFF00FFFFFF00FFFFFF000080800000808000FFFFFF00FFFFFF0000FF - FF00FFFFFF0000808000FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF0080808000808080008080800080808000808080008080800080808000FFFF - FF00FFFFFF00FFFFFF0000000000000000000080800000FFFF00FFFFFF000080 - 8000FFFFFF0000FFFF0000808000FFFFFF00FFFFFF0000808000FFFFFF00FFFF - FF000080800000FFFF00FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000808000FFFFFF00FFFFFF0000FF - FF000000000000808000FFFFFF0000FFFF00FFFFFF00FFFFFF00008080000000 - 0000FFFFFF00FFFFFF00FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF0080808000808080008080800080808000808080008080800080808000FFFF - FF00FFFFFF00FFFFFF0000000000000000000080800000FFFF00FFFFFF00FFFF - FF000080800000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF000080 - 8000FFFFFF0000FFFF00FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000808000FFFFFF00FFFFFF000080 - 8000FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF0000808000FFFFFF00FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF0080808000808080008080800080808000808080008080800080808000FFFF - FF00FFFFFF00FFFFFF0000000000000000000080800000FFFF0000808000FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000808000FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000080800000808000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF0000808000008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000080800000808000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000808000008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000100000000100010000000000800000000000000000000000 - 000000000000000000000000FFFFFF00C001FFFF00000000C001FFFF00000000 - C001FFFF00000000C001000000000000C001000000000000C001000000000000 - C001000000000000C001081000000000C001000000000000C001000000000000 - C001000000000000C001000000000000C001000000000000C003FFFF00000000 - C007FFFF00000000C00FFFFF0000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPgsDlg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPgsDlg.pas deleted file mode 100644 index e5f3af7d..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPgsDlg.pas +++ /dev/null @@ -1,6176 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPgsDlg; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - ExtCtrls, StdCtrls, ComCtrls, Buttons, Menus, ToolWin, Registry, ImgList, - dxCore, cxClasses, dxPSESys, dxPSForm, dxBkgnd, dxPreVw, dxPSGlbl, dxfmClr, - dxPrnPg, dxPrnDev, dxExtCtrls; - -type - TdxPageSetupDlgButtonKind = (psbHelp, psbStyleOptions, psbPreview, psbPrint); - TdxPageSetupDlgButtons = set of TdxPageSetupDlgButtonKind; - TdxPageSetupDlgOption = - (psoCenterOnPage, psoMargins, psoPageOrder, psoShading, psoStyleCaption, - psoHFAutoText, psoHFBackground, psoHFFont, psoHFText, psoHFFunctions, - psoHFMargins, psoHFReverse, psoHFVertAlignment); - TdxPageSetupDlgOptions = set of TdxPageSetupDlgOption; - TdxHFMode = (hfmThreeSections, hfmOneSection); - -const - psbAll = [Low(TdxPageSetupDlgButtonKind)..High(TdxPageSetupDlgButtonKind)]; - psbDefault = [psbStyleOptions, psbPreview, psbPrint]; - psoAll = [Low(TdxPageSetupDlgOption)..High(TdxPageSetupDlgOption)]; - psoDefaultOptionsEnabled = psoAll; - psoDefaultOptionsVisible = psoAll; - -type - TdxPrintStyleManager = class; - TBasedxPrintStyle = class; - TdxPrintStyleClass = class of TBasedxPrintStyle; - TAbstractdxStyleManagerDesigner = class; - TdxPageSetupDialog = class; - - TdxPrintStylePrinterPageClass = class of TdxPrintStylePrinterPage; - - TdxPrintStylePrinterPage = class(TdxPrinterPage) - private - FPrintStyle: TBasedxPrintStyle; - protected - function GetOwner: TPersistent; override; - - function IsPageFooterTitleStored(Index: Integer): Boolean; override; - function IsPageHeaderTitleStored(Index: Integer): Boolean; override; - procedure PageParamsChanged(AUpdateCodes: TdxPrinterPageUpdateCodes); override; - public - property PrintStyle: TBasedxPrintStyle read FPrintStyle; - end; - - TdxPrintStyleState = (pssCopy, pssOptionsDialog); - TdxPrintStyleStates = set of TdxPrintStyleState; - - TdxPageParamsChangedEvent = procedure(Sender: TdxPrinterPage; - APrintStyle: TBasedxPrintStyle; AUpdateCodes: TdxPrinterPageUpdateCodes) of object; - - TdxFilterPaperEvent = procedure(Sender: TBasedxPrintStyle; - const APaper: TdxPaperInfo; var AIsSupported: Boolean) of object; - - TBasedxPrintStyle = class(TComponent) - private - FAllowChangeHFText: Boolean; - FAllowChangeMargins: Boolean; - FAllowChangeOrientation: Boolean; - FAllowChangePaper: Boolean; - FAllowChangeScale: Boolean; - FAllowCustomPaperSizes: Boolean; - FBuiltIn: Boolean; - FData: Pointer; - FDefaultStyleGlyph: TBitmap; - FDescription: string; - FImageIndex: Integer; - FIsDescriptionAssigned: Boolean; - FIsStyleCaptionAssigned: Boolean; - FIsStyleGlyphAssigned: Boolean; - FPrinterPage: TdxPrinterPage; - FShowPageSetupDlg: Boolean; - FState: TdxPrintStyleStates; - FStyleCaption: string; - FStyleGlyph: TBitmap; - FStyleManager: TdxPrintStyleManager; - FOnDestroy: TNotifyEvent; - FOnFilterPaper: TdxFilterPaperEvent; - function GetDescription: string; - function GetIndex: Integer; - function GetIsCurrentStyle: Boolean; - function GetStyleCaption: string; - function GetStyleGlyph: TBitmap; - function IsDescriptionStored: Boolean; - function IsStyleCaptionStored: Boolean; - function IsStyleGlyphStored: Boolean; - procedure SetBuiltIn(Value: Boolean); - procedure SetDescription(const Value: string); - procedure SetImageIndex(Value: Integer); - procedure SetIndex(Value: Integer); - procedure SetIsCurrentStyle(Value: Boolean); - procedure SetPrinterPage(Value: TdxPrinterPage); - procedure SetStyleCaption(const Value: string); - procedure SetStyleGlyph(Value: TBitmap); - procedure SetStyleManager(Value: TdxPrintStyleManager); - - procedure DesignerModified; - procedure DesignerUpdate(TheAll: Boolean); - function IsDesigning: Boolean; - function IsLoading: Boolean; - - procedure ReadData(Reader: TReader); - procedure ReadIsDescriptionAssigned(Reader: TReader); - procedure ReadIsStyleCaptionAssigned(Reader: TReader); - procedure ReadIsStyleGlyphAssigned(Reader: TReader); - procedure WriteData(Writer: TWriter); - procedure WriteIsDescriptionAssigned(Writer: TWriter); - procedure WriteIsStyleCaptionAssigned(Writer: TWriter); - procedure WriteIsStyleGlyphAssigned(Writer: TWriter); - protected - procedure DefineProperties(Filer: TFiler); override; - procedure ReadState(Reader: TReader); override; - procedure SetName(const NewName: TComponentName); override; - procedure SetParentComponent(AParent: TComponent); override; - - function GetAllowChangeHFText: Boolean; virtual; - function GetAllowChangeMargins: Boolean; virtual; - function GetAllowChangeOrientation: Boolean; virtual; - function GetAllowChangePaper: Boolean; virtual; - function GetAllowChangeScale: Boolean; virtual; - function GetAllowCustomPaperSizes: Boolean; virtual; - procedure SetAllowChangeHFText(Value: Boolean); virtual; - procedure SetAllowChangeMargins(Value: Boolean); virtual; - procedure SetAllowChangeOrientation(Value: Boolean); virtual; - procedure SetAllowChangePaper(Value: Boolean); virtual; - procedure SetAllowChangeScale(Value: Boolean); virtual; - procedure SetAllowCustomPaperSizes(Value: Boolean); virtual; - - function CreatePrinterPage: TdxPrinterPage; virtual; - function GetPrinterPageClass: TdxPrinterPageClass; virtual; - procedure InitializePrinterPage(APrinterPage: TdxPrinterPage); virtual; - - procedure DoAfterPrinting; dynamic; - procedure DoBeforePrinting; dynamic; - procedure DoDestroy; dynamic; - function IsSupportedPaper(const APaper: TdxPaperInfo): Boolean; dynamic; - procedure PageParamsChanged(AUpdateCodes: TdxPrinterPageUpdateCodes); dynamic; - - procedure InitializeDefaultStyleGlyph(ABitmap: TBitmap); virtual; - procedure StyleGlyphChanged(Sender: TObject); virtual; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure BeforeDestruction; override; - procedure Assign(Source: TPersistent); override; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - - class function StyleClass: TdxPrintStyleClass; - - function DefaultDescription: string; virtual; - function DefaultPageFooterText(APart: TdxPageTitlePart): string; virtual; - function DefaultPageHeaderText(APart: TdxPageTitlePart): string; virtual; - function DefaultStyleCaption: string; virtual; - function DefaultStyleGlyph: TBitmap; virtual; - - procedure AfterPrinting; - procedure BeforePrinting; - - procedure GetFilteredPapers(AStrings: TStrings); - - function PageSetup: Boolean; overload; - function PageSetup(AnActivePageIndex: Integer; AShowPreviewBtn, AShowPrintBtn: Boolean; - out APreviewBtnClicked, APrintBtnClicked: Boolean): Boolean; overload; - function PageSetup(AnActivePageIndex: Integer; - APreviewBtnClicked, APrintBtnClicked: PBoolean): Boolean; overload; //{$IFDEF DELPHI6} deprecated; {$ENDIF} - function PageSetupEx(AnActivePageIndex: Integer; - APreviewBtnClicked, APrintBtnClicked: PBoolean): Boolean; overload; //{$IFDEF DELPHI6} deprecated; {$ENDIF} - - function SetupOptions: Boolean; // obsolete - do nothing ! - - procedure RestoreDefaultGlyph; virtual; - procedure RestoreDefaults; virtual; - - property BuiltIn: Boolean read FBuiltIn write SetBuiltIn; - property Data: Pointer read FData write FData; - property IsStyleGlyphAssigned: Boolean read FIsStyleGlyphAssigned; - property State: TdxPrintStyleStates read FState; - property StyleManager: TdxPrintStyleManager read FStyleManager write SetStyleManager; - published - property AllowChangeHFText: Boolean read GetAllowChangeHFText write SetAllowChangeHFText default True; - property AllowChangeMargins: Boolean read GetAllowChangeMargins write SetAllowChangeMargins default True; - property AllowChangeOrientation: Boolean read GetAllowChangeOrientation write SetAllowChangeOrientation default True; - property AllowChangePaper: Boolean read GetAllowChangePaper write SetAllowChangePaper default True; - property AllowChangeScale: Boolean read GetAllowChangeScale write SetAllowChangeScale default True; - property AllowCustomPaperSizes: Boolean read GetAllowCustomPaperSizes write SetAllowCustomPaperSizes default True; - property Description: string read GetDescription write SetDescription stored IsDescriptionStored; - property ImageIndex: Integer read FImageIndex write SetImageIndex default -1; - property Index: Integer read GetIndex write SetIndex stored False; - property IsCurrentStyle: Boolean read GetIsCurrentStyle write SetIsCurrentStyle stored False; - property PrinterPage: TdxPrinterPage read FPrinterPage write SetPrinterPage; - property ShowPageSetupDlg: Boolean read FShowPageSetupDlg write FShowPageSetupDlg stored False; - property StyleCaption: string read GetStyleCaption write SetStyleCaption stored IsStyleCaptionStored; - property StyleGlyph: TBitmap read GetStyleGlyph write SetStyleGlyph stored IsStyleGlyphStored; {32 x 32} - - property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy; - property OnFilterPaper: TdxFilterPaperEvent read FOnFilterPaper write FOnFilterPaper; - end; - - TdxPrintStyleManager = class(TComponent) - private - FAlreadySaved: Boolean; - FAutoHFTextEntries: TStrings; - FAutoSave: Boolean; - FCloneStyleCaptionPrefix: string; - FCurrentStyle: TBasedxPrintStyle; - FDesigner: TAbstractdxStyleManagerDesigner; - FHelpContext: THelpContext; - FImages: TImageList; - FInternalStreaming: Boolean; - FIsCloneStyleCaptionPrefixAssigned: Boolean; - FIsTitleAssigned: Boolean; - FLoadedExistingStyles: TStringList; - FPageSetupDialog: TdxPageSetupDialog; - FPreviewBtnClicked: Boolean; - FPrintBtnClicked: Boolean; - FStorageName: string; - FStyles: TList; - FTitle: string; - FVersion: Integer; - FUpdateCount: Integer; - FWindowHandle: hWnd; - FOnChangeCurrentStyle: TNotifyEvent; - FOnStyleListChanged: TNotifyEvent; - function GetCloneStyleCaptionPrefix: string; - function GetCount: Integer; - function GetCurrentStyleIndex: Integer; - function GetRegistryPath: string; - function GetStyle(Index: Integer): TBasedxPrintStyle; - function GetTitle: string; - function IsAutoHFTextEntriesStored: Boolean; - function IsCloneStyleCaptionPrefixStored: Boolean; - function IsTitleStored: Boolean; - procedure SetAutoHFTextEntries(Value: TStrings); - procedure SetCloneStyleCaptionPrefix(const Value: string); - procedure SetCurrentStyle(Value: TBasedxPrintStyle); - procedure SetCurrentStyleIndex(Value: Integer); - procedure SetImages(Value: TImageList); - procedure SetNewStyleCaption(AStyle: TBasedxPrintStyle; AIndex: Integer); - procedure SetPageSetupDialog(Value: TdxPageSetupDialog); - procedure SetStyle(Index: Integer; Value: TBasedxPrintStyle); - procedure SetTitle(const Value: string); - - function AllowAutoSave: Boolean; - procedure DesignerModified; - procedure DesignerUpdate(AStyle: TBasedxPrintStyle); - function IsDesigning: Boolean; - function IsDestroying: Boolean; - function IsLoading: Boolean; - - procedure FreeAndNilStyles; - procedure InsertStyle(Value: TBasedxPrintStyle); - procedure MoveStyle(ACurIndex, ANewIndex: Integer); - procedure RemoveStyle(Value: TBasedxPrintStyle); - procedure ResyncCurrentStyle(AIndex: Integer); - - // AutoHFTextEntries - v2.2 - procedure AutoHFTextEntriesChanged(Sender: TObject); - procedure OnAutoHFTextEntryClick(Sender: TObject); - procedure OnEditAutoHFTextEntriesClick(Sender: TObject); - - procedure WndProc(var Message: TMessage); - - procedure SetNameHandler(Reader: TReader; Component: TComponent; var Name: string); - - procedure ReadIsCloneStyleCaptionPrefixAssigned(Reader: TReader); - procedure ReadIsTitleAssigned(Reader: TReader); - procedure WriteIsCloneStyleCaptionPrefixAssigned(Writer: TWriter); - procedure WriteIsTitleAssigned(Writer: TWriter); - protected - procedure DefineProperties(Filer: TFiler); override; - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - procedure Loaded; override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure ReadState(Reader: TReader); override; - procedure SetChildOrder(Child: TComponent; Order: Integer); override; - procedure SetName(const NewName: TComponentName); override; - - function CreateAutoHFTextEntries: TStrings; virtual; - procedure DoRestoreDefaults; virtual; - - procedure ChangeCurrentStyle; dynamic; - procedure PageParamsChanged(APrintStyle: TBasedxPrintStyle; - AUpdateCodes: TdxPrinterPageUpdateCodes); dynamic; - procedure StyleListChanged; dynamic; - - property RegistryPath: string read GetRegistryPath; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function AddStyle(AStyleClass: TdxPrintStyleClass): TBasedxPrintStyle; - function AddStyleEx(AStyleClass: TdxPrintStyleClass; AOwner: TComponent): TBasedxPrintStyle; - procedure AssignStyles(Source: TdxPrintStyleManager); - procedure Clear; - procedure Delete(Index: Integer); - procedure DeleteNonBuiltIns; - function IndexOfStyle(Value: TBasedxPrintStyle): Integer; - function NonBuiltInsExists: Boolean; - function StyleByCaption(const ACaption: string): TBasedxPrintStyle; - function StyleByName(const AName: string): TBasedxPrintStyle; - - function BeginClone(AIndex: Integer): TBasedxPrintStyle; - procedure EndClone(AStyle: TBasedxPrintStyle); - - procedure BeginUpdate; - procedure EndUpdate; - - function DefaultCloneStyleCaptionPrefix: string; virtual; - function DefaultTitle: string; virtual; - - // AutoHFTextEntries - v2.2 - procedure BuildAutoHFTextEntriesMenu(ARootItem: TComponent; AData: Pointer; - AIncludeSetupAutoHFTextEntriesItem: Boolean = True); - procedure RefreshAutoHFTextEntries; - function ShowAutoHFTextEntriesDlg: Boolean; - - procedure LoadFromRegistry(const APath: string); - procedure SaveToRegistry(const APath: string); - - procedure DefinePrintStylesDlg(out APreviewBtnClicked, APrintBtnClicked: Boolean); overload; - procedure DefinePrintStylesDlg(APreviewBtnClicked, APrintBtnClicked: PBoolean); overload; {$IFDEF DELPHI6} deprecated; {$ENDIF} - - procedure RestoreDefaultAutoHFTextEntries; - procedure RestoreDefaults; - procedure RestoreDefaultStyles; - - procedure LoadFromFile(const AName: string); - procedure LoadFromStream(AStream: TStream); - procedure SaveToFile(const AName: string); - procedure SaveToStream(AStream: TStream); - - property Count: Integer read GetCount; - property CurrentStyleIndex: Integer read GetCurrentStyleIndex write SetCurrentStyleIndex; - property Designer: TAbstractdxStyleManagerDesigner read FDesigner; {accessible only in DesignTime} - property PreviewBtnClicked: Boolean read FPreviewBtnClicked; - property PrintBtnClicked: Boolean read FPrintBtnClicked; - property Styles[Index: Integer]: TBasedxPrintStyle read GetStyle write SetStyle; default; - property UpdateCount: Integer read FUpdateCount; - published - property AutoHFTextEntries: TStrings read FAutoHFTextEntries write SetAutoHFTextEntries stored IsAutoHFTextEntriesStored; - property AutoSave: Boolean read FAutoSave write FAutoSave default False; - property CloneStyleCaptionPrefix: string read GetCloneStyleCaptionPrefix write SetCloneStyleCaptionPrefix stored IsCloneStyleCaptionPrefixStored; - property CurrentStyle: TBasedxPrintStyle read FCurrentStyle write SetCurrentStyle; - property HelpContext: THelpContext read FHelpContext write FHelpContext default 0; - property Images: TImageList read FImages write SetImages; - property PageSetupDialog: TdxPageSetupDialog read FPageSetupDialog write SetPageSetupDialog; - property StorageName: string read FStorageName write FStorageName; - property Title: string read GetTitle write SetTitle stored IsTitleStored; - property Version: Integer read FVersion write FVersion; - - property OnChangeCurrentStyle: TNotifyEvent read FOnChangeCurrentStyle write FOnChangeCurrentStyle; - property OnStyleListChanged: TNotifyEvent read FOnStyleListChanged write FOnStyleListChanged; - end; - - TAbstractdxStyleManagerDesigner = class - private - FStyleManager: TdxPrintStyleManager; - protected - procedure Modified; virtual; abstract; - procedure Update(AItem: TBasedxPrintStyle); virtual; abstract; - public - constructor Create(AStyleManager: TdxPrintStyleManager); - destructor Destroy; override; - - procedure BeginUpdate; virtual; abstract; - procedure CancelUpdate; virtual; abstract; - procedure EndUpdate; virtual; abstract; - - property StyleManager: TdxPrintStyleManager read FStyleManager; - end; - - { TdxPageSetupDialog } - - TdxCustomDrawPreviewEvent = procedure(APrintStyle: TBasedxPrintStyle; - ACanvas: TCanvas; APageRect, AContentRect, AHeaderRect, AFooterRect: TRect) of object; - - PdxPageSetupDlgEvents = ^TdxPageSetupDlgEvents; - TdxPageSetupDlgEvents = record - OnClose: TNotifyEvent; - OnCustomDrawPreview: TdxCustomDrawPreviewEvent; - OnShow: TNotifyEvent; - end; - - PdxPageSetupDlgData = ^TdxPageSetupDlgData; - TdxPageSetupDlgData = {$IFNDEF DELPHI12} packed {$ENDIF} record - PrintStyle: TBasedxPrintStyle; - ActivePageIndex: Integer; - Title: string; - HelpContext: THelpContext; - HFMode: TdxHFMode; - ButtonsEnabled: TdxPageSetupDlgButtons; - ButtonsVisible: TdxPageSetupDlgButtons; - OptionsEnabled: TdxPageSetupDlgOptions; - OptionsVisible: TdxPageSetupDlgOptions; - Events: TdxPageSetupDlgEvents; - PreviewBtnClicked: Boolean; - PrintBtnClicked: Boolean; - iReserved: Integer; - end; - - TdxPageSetupDialog = class(TComponent) - private - FActivePageIndex: Integer; - FButtonsEnabled: TdxPageSetupDlgButtons; - FButtonsVisible: TdxPageSetupDlgButtons; - FHFMode: TdxHFMode; - FHelpContext: THelpContext; - FIsTitleAssigned: Boolean; - FOptionsEnabled: TdxPageSetupDlgOptions; - FOptionsVisible: TdxPageSetupDlgOptions; - FPreviewBtnClicked: Boolean; - FPrintBtnClicked: Boolean; - FPrintStyle: TBasedxPrintStyle; - FTitle: string; - FOnClose: TNotifyEvent; - FOnCustomDrawPreview: TdxCustomDrawPreviewEvent; - FOnShow: TNotifyEvent; - function GetTitle: string; - function IsTitleStored: Boolean; - procedure SetPrintStyle(Value: TBasedxPrintStyle); - procedure SetTitle(const Value: string); - - procedure ReadIsTitleAssigned(Reader: TReader); - procedure WriteIsTitleAssigned(Writer: TWriter); - protected - procedure DefineProperties(Filer: TFiler); override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - public - constructor Create(AOwner: TComponent); override; - procedure Assign(Source: TPersistent); override; - - function DefaultTitle: string; virtual; - function Execute: Boolean; - function RealTitle: string; - procedure RestoreDefaults; virtual; - - property PreviewBtnClicked: Boolean read FPreviewBtnClicked; - property PrintBtnClicked: Boolean read FPrintBtnClicked; - published - property ActivePageIndex: Integer read FActivePageIndex write FActivePageIndex default 0; - property ButtonsEnabled: TdxPageSetupDlgButtons read FButtonsEnabled write FButtonsEnabled - default [psbStyleOptions, psbPreview, psbPrint]; - property ButtonsVisible: TdxPageSetupDlgButtons read FButtonsVisible write FButtonsVisible - default [psbStyleOptions, psbPreview, psbPrint]; - property HelpContext: THelpContext read FHelpContext write FHelpContext default 0; - property HFMode: TdxHFMode read FHFMode write FHFMode default hfmThreeSections; - property OptionsEnabled: TdxPageSetupDlgOptions read FOptionsEnabled write FOptionsEnabled - default [Low(TdxPageSetupDlgOption)..High(TdxPageSetupDlgOption)]; {psoDefaultOptionsEnabled} - property OptionsVisible: TdxPageSetupDlgOptions read FOptionsVisible write FOptionsVisible - default psoDefaultOptionsVisible; - property PrintStyle: TBasedxPrintStyle read FPrintStyle write SetPrintStyle; - property Title: string read GetTitle write SetTitle stored IsTitleStored; - - property OnClose: TNotifyEvent read FOnClose write FOnClose; - property OnCustomDrawPreview: TdxCustomDrawPreviewEvent read FOnCustomDrawPreview write FOnCustomDrawPreview; - property OnShow: TNotifyEvent read FOnShow write FOnShow; - end; - - TdxfmPageSetupDialog = class(TCustomdxPSForm) - pnlStyleName: TPanel; - lblStyleName: TLabel; - edStyleName: TEdit; - ilPrintOrders: TImageList; - ilPaperTypes: TImageList; - btnOptions: TButton; - pnlButtons: TPanel; - btnPrintPreview: TButton; - btnPrint: TButton; - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - Panel4: TPanel; - pgctrlMain: TPageControl; - tshPage: TTabSheet; - Panel5: TPanel; - gbxPaper: TGroupBox; - lblPaperType: TLabel; - lblPaperDimensions: TLabel; - lblPaperSource: TLabel; - lblPaperWidth: TLabel; - lblPaperHeight: TLabel; - bvlPaperDimensions: TBevel; - bvlPaperSource: TBevel; - bvlPaperType: TBevel; - bvlPaperWidthHolder: TBevel; - bvlPaperHeightHolder: TBevel; - lbxPaperType: TListBox; - cbxPaperSource: TComboBox; - Panel1: TPanel; - tshMargins: TTabSheet; - pnlInMargins: TPanel; - lblPreview: TLabel; - Bevel12: TBevel; - bvlPreviewHolder: TBevel; - Panel14: TPanel; - tshHeaderFooter: TTabSheet; - Panel7: TPanel; - pnlBottom: TPanel; - pnlHFOpt: TPanel; - pnlHeader: TPanel; - pnlHeaderMemos: TPanel; - pnlHeaderFont: TPanel; - btnHeaderFont: TButton; - edHeaderFontInfo: TEdit; - btnHeaderBackground: TBitBtn; - pnlHeaderTitle: TPanel; - lblHeader: TLabel; - bvlHeader: TBevel; - pnlFooter: TPanel; - pnlFooterTitle: TPanel; - lblFooter: TLabel; - bvlFooter: TBevel; - pnlFooterFont: TPanel; - btnFooterFont: TButton; - edFooterFontInfo: TEdit; - btnFooterBackGround: TBitBtn; - pnlFooterMemos: TPanel; - pnlReverse: TPanel; - chbxReverseOnEvenPages: TCheckBox; - tshScaling: TTabSheet; - Panel2: TPanel; - bvlAdjustToHolder: TBevel; - bvlFitToPageHolder: TBevel; - lblPagesWideBy: TLabel; - lblPercentOfNormalSize: TLabel; - bvlFitToPageTallHolder: TBevel; - lblTall: TLabel; - rbtnAdjustTo: TRadioButton; - rbtnFitTo: TRadioButton; - ilBins: TImageList; - ilPapers: TImageList; - Label1: TLabel; - Label2: TLabel; - Label3: TLabel; - Label4: TLabel; - Panel6: TPanel; - gbxOrientation: TGroupBox; - bvlOrientationHolder: TBevel; - rBtnLandscape: TRadioButton; - rBtnPortrait: TRadioButton; - gbxPrintOrder: TGroupBox; - pbxPageOrder: TPaintBox; - rbtnOverThenDown: TRadioButton; - rbtnDownThenOver: TRadioButton; - gbxShading: TGroupBox; - chbxShading: TCheckBox; - Label5: TLabel; - Label6: TLabel; - Label7: TLabel; - Label8: TLabel; - Panel8: TPanel; - gbxMargins: TGroupBox; - pnlMargins: TPanel; - lblMarginTop: TLabel; - lblMarginBottom: TLabel; - lblMarginLeft: TLabel; - lblMarginRight: TLabel; - bvlMarginTopHolder: TBevel; - bvlMarginBottomHolder: TBevel; - bvlMarginLeftHolder: TBevel; - bvlMarginRightHolder: TBevel; - pnlHFMargins: TPanel; - lblMarginHeader: TLabel; - lblMarginFooter: TLabel; - bvlMarginHeaderHolder: TBevel; - bvlMarginFooterHolder: TBevel; - Panel3: TPanel; - btnFix: TButton; - btnRestoreOriginalMargins: TButton; - pnlCenterOnPage: TPanel; - lblCenterOnPage: TLabel; - bvlCenterOnPage: TBevel; - chbxCenterHorz: TCheckBox; - chbxCenterVert: TCheckBox; - bvlMarginsWarningHolder: TBevel; - Label9: TLabel; - Label10: TLabel; - Label11: TLabel; - Label12: TLabel; - pnlHeaderMemosHost: TPanel; - memHeaderLeft: TMemo; - memHeaderCenter: TMemo; - memHeaderRight: TMemo; - Label14: TLabel; - Label15: TLabel; - Label13: TLabel; - Label16: TLabel; - pnlFooterMemosHost: TPanel; - memFooterLeft: TMemo; - memFooterCenter: TMemo; - memFooterRight: TMemo; - Label18: TLabel; - Label17: TLabel; - Label19: TLabel; - Label20: TLabel; - Panel9: TPanel; - pnlVertAlignment: TPanel; - gbxVertAlignment: TGroupBox; - tbTAVert: TToolBar; - ToolButton12: TToolButton; - ToolButton13: TToolButton; - ToolButton14: TToolButton; - gbxFunctions: TGroupBox; - pnlToolBar: TPanel; - tbPredefined: TToolBar; - procedure btnHFFontClick(Sender: TObject); - procedure SpecialInsertClick(Sender: TObject); - procedure pgctrlMainChange(Sender: TObject); - procedure BackgroundClick(Sender: TObject); - procedure VertTextAlignClick(Sender: TObject); - procedure memHeaderLeftChange(Sender: TObject); - procedure chbxReverseOnEvenPagesClick(Sender: TObject); - procedure btnPrintPreviewClick(Sender: TObject); - procedure lblMarginTopClick(Sender: TObject); - procedure btnPrintClick(Sender: TObject); - procedure lblPaperSourceClick(Sender: TObject); - procedure pbxPageOrderPaint(Sender: TObject); - procedure PageOrderClick(Sender: TObject); - procedure pbxPageOrderDblClick(Sender: TObject); - procedure CenterOnPageClick(Sender: TObject); - procedure OrientationClick(Sender: TObject); - procedure cbxPaperSourceChange(Sender: TObject); - procedure lbxPaperTypeClick(Sender: TObject); - procedure ScalingClick(Sender: TObject); - procedure cbxPaperSourceDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure lbxPaperTypeDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure FormKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure MemoChange(Sender: TObject); - procedure MemoEnter(Sender: TObject); - procedure MemoExit(Sender: TObject); - procedure edStyleNameChange(Sender: TObject); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure edStyleNameExit(Sender: TObject); - procedure chbxShadingClick(Sender: TObject); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure pgctrlMainChanging(Sender: TObject; - var AllowChange: Boolean); - procedure btnRestoreOriginalMarginsClick(Sender: TObject); - procedure btnFixClick(Sender: TObject); - procedure OrientationDblClick(Sender: TObject); - private - FBmpArrow: TBitmap; - FControlsUpdating: Boolean; - FilPredefined: TImageList; - FFooterBkGndGlyph: TBitmap; - FHeaderBkGndGlyph: TBitmap; - FHFFunctionList: TStringList; - FModified: Boolean; - FMarginsChanged: Boolean; - FMarginsChanging: Boolean; - FMarginsInvalid: Boolean; - FMarginsOutside: Boolean; - FOrientationPreview: TdxPreview; - FPaperSizeLocked: Boolean; - FPreview: TdxPreview; - FPreviewBtnClicked: Boolean; - FPrintBtnClicked: Boolean; - FPrintStyle: TBasedxPrintStyle; - FSavePrintStyle: TBasedxPrintStyle; - FStyleManager: TdxPrintStyleManager; - FwpMargins: TdxPSWarningPane; - - FOnClose: TNotifyEvent; - FOnCustomDrawPreview: TdxCustomDrawPreviewEvent; - FOnShow: TNotifyEvent; - procedure AdjustToExit(Sender: TObject); - procedure AutoHFTextEntriesClick(Sender: TObject); - procedure ChangeBkgndGlyph(AGlyph: TBitmap; ABackground: TdxBackground); - procedure FitToPageChange(Sender: TObject); - procedure FitToPageExit(Sender: TObject); - procedure FitToPageTallExit(Sender: TObject); - procedure MarginButtonClick(Sender: TObject; ButtonType: TdxButtonType; - Button: TUDBtnType); - procedure MarginChange(Sender: TObject); - procedure MarginExit(Sender: TObject); - procedure OrientationPreviewCalcPageCount(Sender: TObject); - procedure PaperHeightButtonClick(Sender: TObject; ButtonType: TdxButtonType; - Button: TUDBtnType); - procedure PaperWidthButtonClick(Sender: TObject; ButtonType: TdxButtonType; - Button: TUDBtnType); - procedure PaperHeightExit(Sender: TObject); - procedure PaperWidthExit(Sender: TObject); - procedure PaperWidthChange(Sender: TObject); - procedure PaperHeightChange(Sender: TObject); - procedure PreviewCalcPageCount(Sender: TObject); - procedure PreviewDrawPageContent(Sender: TObject; ACanvas: TCanvas; - ABounds: TRect; APageIndex: Integer); - procedure PreviewAfterDragMargin(Sender: TObject; AMargin: TdxPreviewPageMargin); - procedure ScaleChanged(Sender: TObject); - - procedure CheckModified; - procedure CreateControls; - procedure EnabledMemoAttr(AEnabled: Boolean); - function FindControlPageIndex(AControl: TWinControl): Integer; - procedure FixupMargins; - procedure FixupMarginsOutside; - function GetEditColor(Value: Boolean): TColor; - function GetCurrentPaperInfo: TdxPaperInfo; - function GetPage: TdxPrinterPage; - function GetPaperInfo(Index: Integer): TdxPaperInfo; - function GetPaperInfoCount: Integer; - procedure LoadStrings; - procedure RestoreOriginalMargins; - procedure SaveMargins; - procedure SaveStyleCaption; - procedure SaveUserInput; - procedure SetMarginsInvalid(Value: Boolean); - procedure SetMarginsOutside(Value: Boolean); - procedure SetupDialog(const APageSetupDlgData: TdxPageSetupDlgData); - procedure StartSetting; - procedure TrySetActiveControl(AControl: TWinControl); - procedure UpdateControlsState; - procedure UpdateMarginsBounds; - procedure UpdateMarginsEdits; - procedure UpdatePageInfos; - procedure UpdatePreviewMargin(const AValue: Extended; AMargin: TdxPreviewPageMargin); - procedure UpdatePreviewMargins; - procedure UpdateWarningPane(AValue, APairValue: Boolean; const AHint, APairHint: string); - function ValidateMargins(out AInvalidMarginControl: TWinControl): Boolean; - function ValidateMarginsOutside(out AInvalidMarginControl: TWinControl): Boolean; - function ValidateStyleCaption: Boolean; - function ValidateUserInput(out AControl: TWinControl): Boolean; - - procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE; - - property MarginsInvalid: Boolean read FMarginsInvalid write SetMarginsInvalid; - property MarginsOutside: Boolean read FMarginsOutside write SetMarginsOutside; - protected - procedure CreateWnd; override; - procedure DoHide; override; - procedure DoShow; override; - public - FseAdjustTo: TdxPSSpinEdit; - FseFitToPage: TdxPSSpinEdit; - FseFitToPageTall: TdxPSSpinEdit; - FseMarginBottom: TdxPSSpinEdit; - FseMarginFooter: TdxPSSpinEdit; - FseMarginHeader: TdxPSSpinEdit; - FseMarginLeft: TdxPSSpinEdit; - FseMarginRight: TdxPSSpinEdit; - FseMarginTop: TdxPSSpinEdit; - FsePaperHeight: TdxPSSpinEdit; - FsePaperWidth: TdxPSSpinEdit; - - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; - - procedure SetPrintStyle(Value: TBasedxPrintStyle); - - property CurrentPaperInfo: TdxPaperInfo read GetCurrentPaperInfo; - property Modified: Boolean read FModified; - property Page: TdxPrinterPage read GetPage; - property PaperInfoCount: Integer read GetPaperInfoCount; - property PaperInfos[Index: Integer]: TdxPaperInfo read GetPaperInfo; - property PreviewBtnClicked: Boolean read FPreviewBtnClicked; - property PrintBtnClicked: Boolean read FPrintBtnClicked; - property PrintStyle: TBasedxPrintStyle read FPrintStyle; - property OnCustomDrawPreview: TdxCustomDrawPreviewEvent read FOnCustomDrawPreview write FOnCustomDrawPreview; - end; - - TdxHFFunctionFormatObjectClass = class of TdxHFFunctionFormatObject; - - TdxHFFunctionFormatObject = class - private - FCurrentPage: Integer; - FDateFormat: string; - FDateTime: TDateTime; - FMachineName: string; - FPageNumberFormat: TdxPageNumberFormat; - FStartPageIndex: Integer; - FTimeFormat: string; - FTotalPages: Integer; - FUserName: string; - protected - procedure Initialize; virtual; - public - constructor Create; virtual; - property CurrentPage: Integer read FCurrentPage write FCurrentPage; - property DateFormat: string read FDateFormat write FDateFormat; - property DateTime: TDateTime read FDateTime write FDateTime; - property MachineName: string read FMachineName write FMachineName; - property PageNumberFormat: TdxPageNumberFormat read FPageNumberFormat write FPageNumberFormat; - property StartPageIndex: Integer read FStartPageIndex write FStartPageIndex; - property TimeFormat: string read FTimeFormat write FTimeFormat; - property TotalPages: Integer read FTotalPages write FTotalPages; - property UserName: string read FUserName write FUserName; - end; - - { Function Categories } - - TdxHFFunctionCustomCategoryClass = class of TdxHFFunctionCustomCategory; - TdxHFFunctionCustomCategory = class end; - TdxHFFunctionDateTimeCategory = class(TdxHFFunctionCustomCategory); - TdxHFFunctionPagesCategory = class(TdxHFFunctionCustomCategory); - TdxHFFunctionAuthenticationCategory = class(TdxHFFunctionCustomCategory); - - { Function } - - TdxHFConvertFunction = function(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; - - TdxHFCustomFunctionClass = class of TdxHFCustomFunction; - - TdxHFCustomFunction = class(TPersistent) - private - FGlyph: TBitmap; - FHint: string; - FTemplateString: string; - procedure SetGlyph(Value: Graphics.TBitmap); - procedure SetTemplateString(const Value: string); - protected - function ConvertFunc(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; virtual; - public - constructor Create; virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function DoProcess(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; virtual; - class function FunctionClass: TdxHFCustomFunctionClass; - class function GetCategory: TdxHFFunctionCustomCategoryClass; virtual; - class function GetName: string; virtual; - - property Glyph: TBitmap read FGlyph write SetGlyph; - property Hint: string read FHint write FHint; - property TemplateString: string read FTemplateString write SetTemplateString; - end; - - TdxHFPagesFunctions = class(TdxHFCustomFunction) - public - class function GetCategory: TdxHFFunctionCustomCategoryClass; override; - end; - - TdxHFPageNumberFunction = class(TdxHFPagesFunctions) - protected - function ConvertFunc(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; override; - public - constructor Create; override; - class function GetName: string; override; - end; - - TdxHFTotalPagesFunction = class(TdxHFPagesFunctions) - protected - function ConvertFunc(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; override; - public - constructor Create; override; - class function GetName: string; override; - end; - - TdxHFPageOfPagesFunction = class(TdxHFPagesFunctions) - protected - function ConvertFunc(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; override; - public - constructor Create; override; - class function GetName: string; override; - end; - - TdxHFAuthenticationFunctions = class(TdxHFCustomFunction) - public - class function GetCategory: TdxHFFunctionCustomCategoryClass; override; - end; - - TdxHFMachineNameFunction = class(TdxHFAuthenticationFunctions) - protected - function ConvertFunc(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; override; - public - constructor Create; override; - class function GetName: string; override; - end; - - TdxHFUserNameFunction = class(TdxHFAuthenticationFunctions) - protected - function ConvertFunc(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; override; - public - constructor Create; override; - class function GetName: string; override; - end; - - TdxHFDateTimeFunctions = class(TdxHFCustomFunction) - public - class function GetCategory: TdxHFFunctionCustomCategoryClass; override; - end; - - TdxHFDateTimeFunction = class(TdxHFDateTimeFunctions) - protected - function ConvertFunc(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; override; - public - constructor Create; override; - class function GetName: string; override; - end; - - TdxHFDateFunction = class(TdxHFDateTimeFunctions) - protected - function ConvertFunc(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; override; - public - constructor Create; override; - class function GetName: string; override; - end; - - TdxHFTimeFunction = class(TdxHFDateTimeFunctions) - protected - function ConvertFunc(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; override; - public - constructor Create; override; - class function GetName: string; override; - end; - - { TdxHFFunctionLibrary } - - TdxHFFunctionLibrary = class; - - TdxHFFunctionEnumProc = procedure(Sender: TdxHFFunctionLibrary; const AHFFunction: TdxHFCustomFunction) of object; - - TdxHFFunctionLibraryClass = class of TdxHFFunctionLibrary; - - TdxHFFunctionLibrary = class(TPersistent) - private - FItems: TStringList; - function GetCount: Integer; - function GetFunction(Index: Integer): TdxHFCustomFunction; - function GetFunctionByClass(FunctionClass: TdxHFCustomFunctionClass): TdxHFCustomFunction; - procedure SetFunction(Index: Integer; Value: TdxHFCustomFunction); - procedure SetFunctionByClass(FunctionClass: TdxHFCustomFunctionClass; Value: TdxHFCustomFunction); - procedure FreeAndNilItems; - public - constructor Create; virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function Add(AFunctionClass: TdxHFCustomFunctionClass): TdxHFCustomFunction; - procedure Clear; - procedure Delete(AnIndex: Integer); - procedure Enumerate(AProc: TdxHFFunctionEnumProc); virtual; - procedure GetFunctions(AStrings: TStrings); - procedure GetFunctionsByCategory(ACategory: TdxHFFunctionCustomCategoryClass; AStrings: TStrings); - function IndexOf(const ATemplateString: string): Integer; - function IndexOfByName(const AFunctionName: string): Integer; - function IndexOfByClass(AFunctionClass: TdxHFCustomFunctionClass): Integer; - function ProcessString(const Source: string; const AFormatObject: TdxHFFunctionFormatObject): string; virtual; - - property Count: Integer read GetCount; - property Funcs[Index: Integer]: TdxHFCustomFunction read GetFunction write SetFunction; default; - property FuncsByClass[FunctionClass: TdxHFCustomFunctionClass]: TdxHFCustomFunction read GetFunctionByClass write SetFunctionByClass; - end; - - TdxStandardHFFunctionLibrary = class(TdxHFFunctionLibrary) - protected - procedure AddStandardFunctions; virtual; - public - constructor Create; override; - end; - -function dxProcessHFString(const Source: string): string; -procedure dxGetHFFunctionsList(AStrings: TStrings); -procedure dxGetHFFunctionsListByCategory(ACategory: TdxHFFunctionCustomCategoryClass; AStrings: TStrings); - -type - TdxGetDateTimeFormatsProc = procedure(AStrings: TStrings); - TdxGetAutoHFTextEntriesProc = procedure(AStrings: TStrings); - -var - dxGetDateFormatsProc: TdxGetDateTimeFormatsProc = nil; - dxGetTimeFormatsProc: TdxGetDateTimeFormatsProc = nil; - dxGetAutoHFTextEntriesProc: TdxGetAutoHFTextEntriesProc = nil; - -function DateFormats: TStrings; -function PageNumberFormats: TStrings; -function TimeFormats: TStrings; -procedure RefreshDateFormats; -procedure RefreshTimeFormats; -function GetFormatedDate(const ADateTime: TDateTime; const AFormat: string): string; -procedure GetFormatedDateStrings(const ADateTime: TDateTime; ADateFormats, AFormatedStrings: TStrings); -function GetFormatedTime(const ADateTime: TDateTime; const AFormat: string): string; -procedure GetFormatedTimeStrings(const ADateTime: TDateTime; ATimeFormats, AFormatedStrings: TStrings); -function DefaultAutoHFTextEntries: TStrings; - -{ Registration routines } -procedure dxPSRegisterPrintStyle(AStyleClass: TdxPrintStyleClass; AMakeAsDefault: Boolean = False); -procedure dxPSUnregisterPrintStyle(AStyleClass: TdxPrintStyleClass); -procedure dxPSGetRegisteredPrintStylesList(AStrings: TStrings); - -{ Utility routines } -procedure dxPSDrawStyleItem(AStyle: TBasedxPrintStyle; AListBox: TListBox; - Index: Integer; State: TOwnerDrawState; ABounds: TRect; AMultiline, ABoldedCurrent: Boolean); -procedure dxPSDefaultDrawPagePreview(APrintStyle: TBasedxPrintStyle; ACanvas: TCanvas; - APageBounds, AContentBounds, AHeaderBounds, AFooterBounds: TRect); -function dxPSPrintStyleUniqueName(AStyleController: TdxPrintStyleManager; AComponent: TComponent): string; -procedure dxPSSplitAutoHFTextEntry(Source: string; var APart1, APart2, APart3: string); - -function dxPageSetupDialog(var APageSetupDlgData: TdxPageSetupDlgData): Boolean; - -const - dxMaxStyleCaption = 31; - dxFunctionDelimiters: array[Boolean] of Char = ('[', ']'); - dxHFFunctionSeparator = ','; - dxHFFunctionLibrary: TdxHFFunctionLibrary = nil; - dxHFFormatObject: TdxHFFunctionFormatObject = nil; - dxDefaultPrintStyleClass: TdxPrintStyleClass = nil; - -implementation - -{$R *.DFM} - -uses - TypInfo, CommCtrl, Consts, dxPSImgs, dxPSEngn, dxPSEvnt, dxfmMnPg, dxfmDfnStl, - dxPSUtl, dxPSRes, dxPSAutoHFTextMnuBld, dxPSfmAutoHFTextFmt, dxPSHFToolBarBld, - dxBase, cxDrawTextUtils; - -const - FDefaultAutoHFTextEntries: TStrings = nil; - FStyleClassList: TdxPersistentClassList = nil; - FDateFormats: TStrings = nil; - FPageNumberFormats: TStrings = nil; - FTimeFormats: TStrings = nil; - - sdxAutoHFTextEntries = '\AutoHFTextEntries'; // Don't localize - sdxCantCreateUniqueName = 'Can''t create unique name for %s.'; // Don't localize - sdxStyleNameTemplate = 'Style%d'; // Don't localize - -function dxPageSetupDialog(var APageSetupDlgData: TdxPageSetupDlgData): Boolean; -var - Dialog: TdxfmPageSetupDialog; -begin - Result := False; - if APageSetupDlgData.PrintStyle = nil then Exit; - - Dialog := TdxfmPageSetupDialog.Create(nil); - try - Dialog.SetupDialog(APageSetupDlgData); - Result := Dialog.Execute; - if Result then - begin - if Dialog.Modified then - APageSetupDlgData.PrintStyle.Assign(Dialog.FPrintStyle); - if Dialog.PreviewBtnClicked or Dialog.PrintBtnClicked then - APageSetupDlgData.PrintStyle.IsCurrentStyle := True; - end; - APageSetupDlgData.ActivePageIndex := Dialog.pgctrlMain.ActivePage.PageIndex; - APageSetupDlgData.PreviewBtnClicked := Dialog.PreviewBtnClicked; - APageSetupDlgData.PrintBtnClicked := Dialog.PrintBtnClicked; - finally - Dialog.Free; - end; -end; - -{ PrintStyle Registration Routines } - -procedure dxPSRegisterPrintStyle(AStyleClass: TdxPrintStyleClass; - AMakeAsDefault: Boolean = False); -begin - if FStyleClassList = nil then - FStyleClassList := TdxPersistentClassList.Create; - FStyleClassList.Register(AStyleClass); - if AMakeAsDefault then - dxDefaultPrintStyleClass := AStyleClass; -end; - -procedure dxPSUnregisterPrintStyle(AStyleClass: TdxPrintStyleClass); -begin - if FStyleClassList <> nil then - FStyleClassList.Unregister(AStyleClass); -end; - -procedure dxPSUnregisterAllPrintStyles; -begin - FreeAndNil(FStyleClassList); -end; - -procedure dxPSGetRegisteredPrintStylesList(AStrings: TStrings); -var - I: Integer; - StyleClass: TPersistentClass; -begin - if FStyleClassList <> nil then - begin - AStrings.BeginUpdate; - try - for I := 0 to FStyleClassList.Count - 1 do - begin - StyleClass := FStyleClassList[I]; - AStrings.AddObject(StyleClass.ClassName, TObject(StyleClass)); - end; - finally - AStrings.EndUpdate; - end; - end; -end; - -{ utility routines } - -procedure PlaceBevel(ABevel: TBevel; AControl: TControl); -var - RightBound: Integer; -begin - RightBound := ABevel.BoundsRect.Right; - ABevel.Left := AControl.Left + AControl.Width + 10; - ABevel.Width := RightBound - ABevel.Left; -end; - -function MarginsMessageDlg(const Message: string): TModalResult; -var - Form: TForm; - B: TComponent; -begin - Form := CreateMessageDialog(Message, mtWarning, mbYesNoCancel); - try - B := Form.FindComponent('Yes'); - if B is TButton then - with TButton(B) do - begin - Form.Width := Form.Width + 3 * Width div 2; - Width := 3 * Width div 2; - Caption := cxGetResourceString(@sdxBtnFix); - end; - - B := Form.FindComponent('No'); - if B is TButton then - with TButton(B) do - begin - Left := Left + Width div 2; - Width := 3 * Width div 2; - Caption := cxGetResourceString(@sdxBtnRestoreOriginal); - end; - - B := Form.FindComponent('Cancel'); - if B is TButton then - with TButton(B) do - begin - Left := Left + Width; - Width := 3 * Width div 2; - Caption := cxGetResourceString(@sdxBtnClose); - end; - Result := Form.ShowModal; - finally - Form.Free; - end; -end; - -function MarginsOutsideMessageDlg(const Message: string): TModalResult; -var - Form: TForm; - B: TComponent; -begin - Form := CreateMessageDialog(Message, mtWarning, [mbYes, mbIgnore]); - try - B := Form.FindComponent('Yes'); - if B is TButton then - TButton(B).Caption := cxGetResourceString(@sdxBtnFix); - Result := Form.ShowModal; - finally - Form.Free; - end; -end; - -procedure dxPSDrawStyleItem(AStyle: TBasedxPrintStyle; AListBox: TListBox; - Index: Integer; State: TOwnerDrawState; ABounds: TRect; - AMultiline, ABoldedCurrent: Boolean); - - function GetColor: TColor; - begin - if odSelected in State then - Result := clHighlight - else - Result := clWindow; - end; - -const - uFormat: array[Boolean] of UINT = (DT_LEFT or DT_WORDBREAK, DT_LEFT or DT_SINGLELINE or DT_VCENTER); -var - B: TBitmap; - S: string; - R: TRect; - AreImagesDrawn: Boolean; -begin - with AListBox do - begin - AreImagesDrawn := (AStyle.StyleManager <> nil) and - (AStyle.StyleManager.Images <> nil) and (AStyle.ImageIndex > -1) and - (AStyle.ImageIndex < AStyle.StyleManager.Images.Count); - - B := nil; - if AreImagesDrawn then B := TBitmap.Create; - try - if AreImagesDrawn then - begin - B.Width := AStyle.StyleManager.Images.Width; - B.Height := AStyle.StyleManager.Images.Height; - R := MakeRect(0, 0, B.Width, B.Height); - B.Canvas.FillRect(R); - AStyle.StyleManager.Images.Draw(B.Canvas, 0, 0, AStyle.ImageIndex); - - OffsetRect(R, ABounds.Left + (dxStyleGlyphSize.X - B.Width) div 2, - ABounds.Top + (dxStyleGlyphSize.Y - B.Height) div 2); - end - else - if not AStyle.StyleGlyph.Empty then - begin - R := MakeBounds(ABounds.Left + 1, ABounds.Top + 1, dxStyleGlyphSize.X, dxStyleGlyphSize.Y); - B := AStyle.StyleGlyph; - end; - - if AreImagesDrawn or not AStyle.StyleGlyph.Empty then - begin - B.Transparent := True; - Canvas.Brush.Color := GetColor; - Canvas.BrushCopy(R, B, MakeRect(0, 0, B.Width, B.Height), clFuchsia); - with R do - ExcludeClipRect(Canvas.Handle, Left, Top, Right, Bottom); - end; - finally - if AreImagesDrawn then B.Free; - end; - - Canvas.FillRect(ABounds); - Inc(ABounds.Left, dxStyleGlyphSize.X + 4); - - Canvas.Brush.Style := bsClear; - if ABoldedCurrent and AStyle.IsCurrentStyle then - Canvas.Font.Style := Canvas.Font.Style + [fsBold]; - - S := Items[Index]; - if AMultiline then - begin - R := ABounds; - DrawText(Canvas.Handle, PChar(S), Length(S), ABounds, DT_LEFT or DT_SINGLELINE or DT_CALCRECT); - DrawText(Canvas.Handle, PChar(S), Length(S), R, uFormat[(ABounds.Right - ABounds.Left) <= (R.Right - R.Left)]); - end - else - DrawText(Canvas.Handle, PChar(S), Length(S), ABounds, uFormat[True]); - - if ABoldedCurrent and AStyle.IsCurrentStyle then - Canvas.Font.Style := Canvas.Font.Style - [fsBold]; - Canvas.Brush.Style := bsSolid; - end; -end; - -procedure dxPSDefaultDrawPagePreview(APrintStyle: TBasedxPrintStyle; ACanvas: TCanvas; - APageBounds, AContentBounds, AHeaderBounds, AFooterBounds: TRect); -const - LineStepX = 15; - LineStepY = 7; -var - R, LineBounds: TRect; - LineCountX, LineCountY, I: Integer; -begin - R := AContentBounds; - with R do - begin - LineCountX := (Right - Left - 1) div LineStepX; - LineCountY := (Bottom - Top - 1) div LineStepY; - Right := Left + LineCountX * LineStepX; - Bottom := Top + LineCountY * LineStepY; - - if APrintStyle.PrinterPage.CenterOnPageH then - OffsetRect(R, ((AContentBounds.Right - AContentBounds.Left) - (Right - Left)) div 2, 0); - if APrintStyle.PrinterPage.CenterOnPageV then - OffsetRect(R, 0, ((AContentBounds.Bottom - AContentBounds.Top) - (Bottom - Top)) div 2); - end; - - ACanvas.Brush.Color := clBtnFace; - - {vert lines} - for I := 0 to LineCountX do - begin - LineBounds := MakeRect(R.Left + I * LineStepX, R.Top, R.Left + I * LineStepX + 1, R.Bottom); - if RectVisible(ACanvas.Handle, LineBounds) then - ACanvas.FillRect(LineBounds); - end; - - {horz lines} - for I := 0 to LineCountY do - begin - LineBounds := MakeRect(R.Left, R.Top + I * LineStepY, R.Right + 1, R.Top + I * LineStepY + 1); - if RectVisible(ACanvas.Handle, LineBounds) then - ACanvas.FillRect(LineBounds); - end; -end; - -function dxPSPrintStyleUniqueName(AStyleController: TdxPrintStyleManager; AComponent: TComponent): string; -var - S: string; - I, J: Integer; - NameExists: Boolean; - Item: TBasedxPrintStyle; -begin - S := AStyleController.Name + sdxStyleNameTemplate; - for I := 1 to High(Integer) do - begin - Result := Format(S, [I]); - NameExists := False; - Item := AStyleController.StyleByName(Result); - if Item = nil then - begin - with AStyleController.Owner do - for J := 0 to ComponentCount - 1 do - if dxSameText(Components[J].Name, Result) then - begin - NameExists := True; - Break; - end; - if not NameExists then Exit; - end; - end; - if AStyleController.IsDesigning then - raise EdxException.CreateFmt(sdxCantCreateUniqueName, [AComponent.ClassName]) - else - Result := ''; -end; - -procedure dxPSSplitAutoHFTextEntry(Source: string; var APart1, APart2, APart3: string); - - function DoExtract(var Source: string): string; - var - P: Integer; - begin - P := Pos(dxHFFunctionSeparator, Source); - if P = 0 then - begin - Result := Source; - P := Length(Source); - end - else - Result := Copy(Source, 1, P - 1); - - Delete(Source, 1, P); - Result := Trim(Result); - end; - -begin - APart1 := ''; - APart2 := ''; - APart3 := ''; - APart1 := DoExtract(Source); - if Source <> '' then APart2 := DoExtract(Source); - if Source <> '' then APart3 := DoExtract(Source); -end; - -{ TdxPageSetupDialog } - -constructor TdxPageSetupDialog.Create(AOwner: TComponent); -begin - inherited; - FButtonsEnabled := psbDefault; - FOptionsEnabled := psoDefaultOptionsEnabled; - FHFMode := hfmThreeSections; - FButtonsVisible := psbDefault; - FOptionsVisible := psoDefaultOptionsVisible; -end; - -procedure TdxPageSetupDialog.Assign(Source: TPersistent); -begin - if Source is TdxPageSetupDialog then - with TdxPageSetupDialog(Source) do - begin - Self.ActivePageIndex := ActivePageIndex; - Self.ButtonsEnabled := ButtonsEnabled; - Self.OptionsEnabled := OptionsEnabled; - Self.HFMode := HFMode; - Self.Title := Title; - Self.ButtonsVisible := ButtonsVisible; - Self.OptionsVisible := OptionsVisible; - - Self.FIsTitleAssigned := FIsTitleAssigned; - end - else - inherited; -end; - -function TdxPageSetupDialog.DefaultTitle: string; -begin - Result := cxGetResourceString(@sdxPageSetupCaption); -end; - -procedure TdxPageSetupDialog.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('IsTitleAssigned', ReadIsTitleAssigned, WriteIsTitleAssigned, - FIsTitleAssigned and (Title = '')); -end; - -procedure TdxPageSetupDialog.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited; - if (AComponent = PrintStyle) and (Operation = opRemove) then - PrintStyle := nil; -end; - -function TdxPageSetupDialog.Execute: Boolean; -var - APageSetupDlgData: TdxPageSetupDlgData; - APageSetupDlgEvents: TdxPageSetupDlgEvents; -begin - if PrintStyle = nil then - begin - Result := False; - Exit; - end; - FillChar(APageSetupDlgData, SizeOf(TdxPageSetupDlgData), 0); - FillChar(APageSetupDlgEvents, SizeOf(TdxPageSetupDlgEvents), 0); - with APageSetupDlgEvents do - begin - OnClose := Self.OnClose; - OnCustomDrawPreview := Self.OnCustomDrawPreview; - OnShow := Self.OnShow; - end; - APageSetupDlgData.Events := APageSetupDlgEvents; - APageSetupDlgData.PrintStyle := Self.PrintStyle; - APageSetupDlgData.HelpContext := Self.HelpContext; - APageSetupDlgData.Title := Self.RealTitle; - APageSetupDlgData.ActivePageIndex := ActivePageIndex; - -{ - if (csDesigning in ComponentState) then - begin - APageSetupDlgData.ButtonsEnabled := psbDefault; - APageSetupDlgData.ButtonsVisible := psbDefault; - APageSetupDlgData.OptionsEnabled := psoDefaultOptionsEnabled; - APageSetupDlgData.OptionsVisible := psoDefaultOptionsVisible; - end - else -} - begin - APageSetupDlgData.ButtonsEnabled := ButtonsEnabled; - APageSetupDlgData.ButtonsVisible := ButtonsVisible; - //if not PrintStyle.OptionsDialogExists then - // APageSetupDlgData.ButtonsVisible := APageSetupDlgData.ButtonsVisible - [psbStyleOptions]; - APageSetupDlgData.OptionsEnabled := OptionsEnabled; - APageSetupDlgData.OptionsVisible := OptionsVisible; - end; - APageSetupDlgData.HFMode := HFMode; - - Result := dxPageSetupDialog(APageSetupDlgData); - FPreviewBtnClicked := APageSetupDlgData.PreviewBtnClicked; - FPrintBtnClicked := APageSetupDlgData.PrintBtnClicked; -end; - -function TdxPageSetupDialog.RealTitle: string; -begin - Result := Title; - if PrintStyle.StyleManager <> nil then - begin - if PrintStyle <> nil then - Result := Result + ': ' + PrintStyle.StyleCaption; - if Result[Length(Result) - 1] = ':' then - Delete(Result, Length(Result) - 1, 1); - end; -end; - -procedure TdxPageSetupDialog.RestoreDefaults; -begin - FIsTitleAssigned := False; - ActivePageIndex := 0; - FButtonsEnabled := psbDefault; - FOptionsEnabled := psoDefaultOptionsEnabled; - FHFMode := hfmThreeSections; - FButtonsVisible := psbDefault; - FOptionsVisible := psoDefaultOptionsVisible; -end; - -function TdxPageSetupDialog.GetTitle: string; -begin - if FIsTitleAssigned then - Result := FTitle - else - Result := DefaultTitle; -end; - -function TdxPageSetupDialog.IsTitleStored: Boolean; -begin - Result := FisTitleAssigned and (Title <> DefaultTitle); -end; - -procedure TdxPageSetupDialog.SetPrintStyle(Value: TBasedxPrintStyle); -begin - if FPrintStyle <> Value then - begin - FPrintStyle := Value; - if Value <> nil then Value.FreeNotification(Self); - end; -end; - -procedure TdxPageSetupDialog.SetTitle(const Value: string); -begin - if Title <> Value then - begin - FTitle := Value; - FIsTitleAssigned := True; - end; -end; - -procedure TdxPageSetupDialog.ReadIsTitleAssigned(Reader: TReader); -begin - FIsTitleAssigned := Reader.ReadBoolean; -end; - -procedure TdxPageSetupDialog.WriteIsTitleAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsTitleAssigned); -end; - -{ TdxfmPageSetupDialog } - -constructor TdxfmPageSetupDialog.Create(AOwner: TComponent); - - function CreateGlyph(AWidth, AHeight: Integer): TBitmap; - begin - Result := TBitmap.Create; - Result.Height := AHeight; - Result.Width := AWidth; - end; - -const - cGlyphWidth = 75 + 4 + 16; { TextArea width + Separator width + DownArrow width} -begin - inherited; - FBmpArrow := dxPSUtl.CreateArrowBitmap(udgDown); - FFooterBkGndGlyph := CreateGlyph(cGlyphWidth, btnFooterBackGround.Height - 10); - FHeaderBkGndGlyph := CreateGlyph(cGlyphWidth, btnHeaderBackGround.Height - 10); - - FHFFunctionList := TStringList.Create; - dxGetHFFunctionsList(FHFFunctionList); - - HelpContext := dxPSGlbl.dxhcPageSetupDlg; - - FPreviewBtnClicked := False; - FPrintBtnClicked := False; - - CreateControls; - LoadStrings; -end; - -destructor TdxfmPageSetupDialog.Destroy; -begin - FreeAndNil(FHFFunctionList); - FreeAndNil(FFooterBkGndGlyph); - FreeAndNil(FHeaderBkGndGlyph); - FreeAndNil(FBmpArrow); - FreeAndNil(FPrintStyle); - inherited; -end; - -function TdxfmPageSetupDialog.Execute: Boolean; -begin - Result := False; - if PrintStyle = nil then Exit; - StartSetting; - Result := ShowModal = mrOk;// and FModified; -end; - -procedure TdxfmPageSetupDialog.SetPrintStyle(Value: TBasedxPrintStyle); -begin - if FPrintStyle <> nil then - begin - FPrintStyle.Free; - FPrintStyle := nil; - end; - if Value <> nil then - begin - FSavePrintStyle := Value; - FPrintStyle := Value.StyleClass.Create(nil); - FPrintStyle.Assign(Value); -// MarginsOutside := not ValidateMarginsOutside(nil); - end; -end; - -procedure TdxfmPageSetupDialog.CreateWnd; -begin - inherited; - if Icon.Handle = 0 then - Icon_LoadFromResourceName(Icon, IDB_DXPSPAGESETUP); - SendMessage(Handle, WM_SETICON, 1, Icon.Handle); -end; - -procedure TdxfmPageSetupDialog.DoHide; -begin - if Assigned(FOnClose) then FOnClose(Self); - inherited; -end; - -procedure TdxfmPageSetupDialog.DoShow; -begin - inherited; - if Assigned(FOnShow) then FOnShow(Self); -end; - -function TdxfmPageSetupDialog.GetEditColor(Value: Boolean): TColor; -begin - if Value then - Result := clBtnFace - else - Result := clWindow; -end; - -procedure TdxfmPageSetupDialog.SetupDialog(const APageSetupDlgData: TdxPageSetupDlgData); -var - I, Denominator: Integer; - AutoHFTextEntries: TStrings; - Control: TControl; - LegendText: string; -begin - FControlsUpdating := True; - - // it is very important because property TabVisible doesn't work properly without this line - pgctrlMain.HandleNeeded; - - SetPrintStyle(APageSetupDlgData.PrintStyle); - FStyleManager := FSavePrintStyle.StyleManager; - - Caption := APageSetupDlgData.Title; - if APageSetupDlgData.HelpContext <> 0 then - HelpContext := APageSetupDlgData.HelpContext; - - FOnShow := APageSetupDlgData.Events.OnShow; - FOnClose := APageSetupDlgData.Events.OnClose; - OnCustomDrawPreview := APageSetupDlgData.Events.OnCustomDrawPreview; - - btnOptions.Enabled := psbStyleOptions in APageSetupDlgData.ButtonsEnabled; - btnPrintPreview.Enabled := psbPreview in APageSetupDlgData.ButtonsEnabled; - btnPrint.Enabled := psbPrint in APageSetupDlgData.ButtonsEnabled; - btnOptions.Visible := psbStyleOptions in APageSetupDlgData.ButtonsVisible; - btnPrintPreview.Visible := psbPreview in APageSetupDlgData.ButtonsVisible; - btnPrint.Visible := psbPrint in APageSetupDlgData.ButtonsVisible; - if not btnPrint.Visible and btnPrintPreview.Visible then - btnPrintPreview.BoundsRect := btnPrint.BoundsRect; - - pnlStyleName.Visible := psoStyleCaption in APageSetupDlgData.OptionsVisible; - if not pnlStyleName.Visible then - Self.Height := Self.Height - pnlStyleName.Height; - - rBtnPortrait.Checked := PrintStyle.PrinterPage.Orientation = poPortrait; - rBtnLandscape.Checked := PrintStyle.PrinterPage.Orientation = poLandscape; - - gbxPrintOrder.Visible := psoPageOrder in APageSetupDlgData.OptionsVisible; - gbxShading.Visible := psoShading in APageSetupDlgData.OptionsVisible; - - gbxMargins.Visible := psoMargins in APageSetupDlgData.OptionsVisible; - if psoMargins in APageSetupDlgData.OptionsVisible then - FPreview.OptionsView := FPreview.OptionsView + [povMargins] - else - FPreview.OptionsView := FPreview.OptionsView - [povMargins]; - - pnlHFMargins.Visible := gbxMargins.Visible and (psoHFMargins in APageSetupDlgData.OptionsVisible); - if povMargins in FPreview.OptionsView then - begin - FPreview.Margins.Header.Visible := pnlHFMargins.Visible; - FPreview.Margins.Footer.Visible := pnlHFMargins.Visible; - end; - if not pnlHFMargins.Visible and gbxMargins.Visible then - gbxMargins.Height := gbxMargins.Height - pnlHFMargins.Height; - - pnlCenterOnPage.Visible := psoCenterOnPage in APageSetupDlgData.OptionsVisible; - tshMargins.TabVisible := gbxMargins.Visible or pnlCenterOnPage.Visible; - - btnHeaderFont.Visible := psoHFFont in APageSetupDlgData.OptionsVisible; - edHeaderFontInfo.Visible := psoHFFont in APageSetupDlgData.OptionsVisible; - btnHeaderBackground.Visible := psoHFBackground in APageSetupDlgData.OptionsVisible; - if btnHeaderBackground.Visible and not btnHeaderFont.Visible then - begin - btnHeaderBackground.Left := btnHeaderFont.Left; - btnHeaderBackground.Top := btnHeaderFont.Top; - end; - pnlHeaderFont.Visible := btnHeaderFont.Visible or btnHeaderBackGround.Visible; - pnlHeaderMemos.Visible := (psoHFText in APageSetupDlgData.OptionsVisible); - if not pnlHeaderMemos.Visible then - pnlHeader.Height := pnlHeader.Height - pnlHeaderMemos.Height; - if pnlHeaderMemos.Visible and (APageSetupDlgData.HFMode = hfmOneSection) then - begin - memHeaderCenter.Visible := False; - memHeaderRight.Visible := False; - end; - pnlHeader.Visible := pnlHeaderFont.Visible or pnlHeaderMemos.Visible; - - btnFooterFont.Visible := (psoHFFont in APageSetupDlgData.OptionsVisible); - edFooterFontInfo.Visible := (psoHFFont in APageSetupDlgData.OptionsVisible); - btnFooterBackground.Visible := (psoHFBackground in APageSetupDlgData.OptionsVisible); - if btnFooterBackground.Visible and not btnFooterFont.Visible then - begin - btnFooterBackground.Left := btnFooterFont.Left; - btnFooterBackground.Top := btnFooterFont.Top; - end; - - pnlFooterFont.Visible := btnHeaderFont.Visible or btnHeaderBackGround.Visible; - - pnlFooterMemos.Visible := (psoHFText in APageSetupDlgData.OptionsVisible); - if not pnlFooterMemos.Visible then - pnlFooter.Height := pnlFooter.Height - pnlFooterMemos.Height; - - if pnlFooterMemos.Visible and (APageSetupDlgData.HFMode = hfmOneSection) then - begin - memFooterCenter.Visible := False; - memFooterRight.Visible := False; - end; - pnlFooter.Visible := pnlFooterFont.Visible or pnlFooterMemos.Visible; - - pnlToolBar.Visible := (psoHFFunctions in APageSetupDlgData.OptionsVisible); -// pnlAutoText.Visible := (psoHFAutoText in APageSetupDlgData.OptionsVisible); - gbxFunctions.Visible := pnlToolBar.Visible; // or pnlAutoText.Visible; - pnlVertAlignment.Visible := (psoHFVertAlignment in APageSetupDlgData.OptionsVisible); - pnlHFOpt.Visible := gbxFunctions.Visible or pnlVertAlignment.Visible; - pnlReverse.Visible := (psoHFReverse in APageSetupDlgData.OptionsVisible); - - tshHeaderFooter.TabVisible := - pnlHeader.Visible or pnlFooter.Visible or pnlHFOpt.Visible or pnlReverse.Visible; - tshScaling.TabVisible := PrintStyle.AllowChangeScale; - - if pnlStyleName.Visible then - begin - pnlStyleName.Enabled := - not FSavePrintStyle.BuiltIn; // or (csDesigning in FSavePrintStyle.ComponentState); - btnOptions.Enabled := pnlStyleName.Enabled; - edStyleName.ReadOnly := not pnlStyleName.Enabled; - edStyleName.TabStop := not edStyleName.ReadOnly; - edStyleName.Color := GetEditColor(edStyleName.ReadOnly); - edStyleName.MaxLength := dxMaxStyleCaption; - end; - - lbxPaperType.Enabled := PrintStyle.AllowChangePaper; - lbxPaperType.Color := GetEditColor(not lbxPaperType.Enabled); - - rBtnPortrait.Enabled := PrintStyle.AllowChangeOrientation; - rBtnLandscape.Enabled := PrintStyle.AllowChangeOrientation; - - if gbxPrintOrder.Visible then - begin - gbxPrintOrder.Enabled := (psoPageOrder in APageSetupDlgData.OptionsEnabled); - rbtnDownThenOver.Enabled := gbxPrintOrder.Enabled; - rbtnOverThenDown.Enabled := gbxPrintOrder.Enabled; - end; - if gbxShading.Visible then - begin - gbxShading.Enabled := (psoShading in APageSetupDlgData.OptionsEnabled); - chbxShading.Enabled := gbxShading.Enabled; - end; - - if gbxMargins.Visible then - begin - gbxMargins.Enabled := - PrintStyle.AllowChangeMargins and (psoMargins in APageSetupDlgData.OptionsEnabled); - - for I := 0 to pnlMargins.ControlCount - 1 do - begin - Control := pnlMargins.Controls[I]; - - if Control is TLabel then - Control.Enabled := gbxMargins.Enabled; - - if Control is TdxPSSpinEdit then - with TdxPSSpinEdit(Control) do - begin - ReadOnly := not gbxMargins.Enabled; - TabStop := not ReadOnly; - Color := GetEditColor(ReadOnly); - end; - end; - end; - - if gbxMargins.Enabled then - FPreview.OptionsBehavior := FPreview.OptionsBehavior + [pobAllowDragMargins] - else - FPreview.OptionsBehavior := FPreview.OptionsBehavior - [pobAllowDragMargins]; - - if pnlHFMargins.Visible then - begin - pnlHFMargins.Enabled := - gbxMargins.Enabled and (psoHFMargins in APageSetupDlgData.OptionsEnabled); - - for I := 0 to pnlHFMargins.ControlCount - 1 do - begin - Control := pnlHFMargins.Controls[I]; - - if Control is TLabel then - Control.Enabled := pnlHFMargins.Enabled; - - if Control is TdxPSSpinEdit then - with TdxPSSpinEdit(Control) do - begin - ReadOnly := not pnlHFMargins.Enabled; - TabStop := not ReadOnly; - Color := GetEditColor(ReadOnly); - end; - end; - end; - FPreview.Margins.Header.Enabled := pnlHFMargins.Enabled; - FPreview.Margins.Footer.Enabled := pnlHFMargins.Enabled; - - if pnlCenterOnPage.Visible then - begin - pnlCenterOnPage.Enabled := psoCenterOnPage in APageSetupDlgData.OptionsEnabled; - for I := 0 to pnlCenterOnPage.ControlCount - 1 do - pnlCenterOnPage.Controls[I].Enabled := pnlCenterOnPage.Enabled; - end; - - if btnHeaderFont.Visible then - btnHeaderFont.Enabled := (psoHFFont in APageSetupDlgData.OptionsEnabled); - if btnHeaderBackground.Visible then - btnHeaderBackground.Enabled := (psoHFBackground in APageSetupDlgData.OptionsEnabled); - - if pnlHeaderMemos.Visible then - begin - pnlHeaderMemos.Enabled := - PrintStyle.AllowChangeHFText and (psoHFText in APageSetupDlgData.OptionsEnabled); - memHeaderLeft.ReadOnly := not pnlHeaderMemos.Enabled; - memHeaderLeft.TabStop := not memHeaderLeft.ReadOnly; - memHeaderLeft.Color := GetEditColor(memHeaderLeft.ReadOnly); - memHeaderCenter.ReadOnly := not pnlHeaderMemos.Enabled; - memHeaderCenter.TabStop := not memHeaderCenter.ReadOnly; - memHeaderCenter.Color := GetEditColor(memHeaderCenter.ReadOnly); - memHeaderRight.ReadOnly := not pnlHeaderMemos.Enabled; - memHeaderRight.TabStop := not memHeaderRight.ReadOnly; - memHeaderRight.Color := GetEditColor(memHeaderRight.ReadOnly); - end; - - if btnFooterFont.Visible then - btnFooterFont.Enabled := (psoHFFont in APageSetupDlgData.OptionsEnabled); - if btnFooterBackground.Visible then - btnFooterBackground.Enabled := (psoHFBackground in APageSetupDlgData.OptionsEnabled); - if pnlFooterMemos.Visible then - begin - pnlFooterMemos.Enabled := PrintStyle.AllowChangeHFText and (psoHFText in APageSetupDlgData.OptionsEnabled); - memFooterLeft.ReadOnly := not pnlFooterMemos.Enabled; - memFooterLeft.TabStop := not memFooterLeft.ReadOnly; - memFooterLeft.Color := GetEditColor(memFooterLeft.ReadOnly); - memFooterCenter.ReadOnly := not pnlFooterMemos.Enabled; - memFooterCenter.TabStop := not memFooterCenter.ReadOnly; - memFooterCenter.Color := GetEditColor(memFooterCenter.ReadOnly); - memFooterRight.ReadOnly := not pnlFooterMemos.Enabled; - memFooterRight.TabStop := not memFooterRight.ReadOnly; - memFooterRight.Color := GetEditColor(memFooterRight.ReadOnly); - end; - - if pnlToolBar.Visible then - begin - FilPredefined := TImageList.Create(Self); - FilPredefined.AllocBy := FHFFunctionList.Count; - pnlToolBar.Enabled := psoHFFunctions in APageSetupDlgData.OptionsEnabled; - - if FStyleManager <> nil then - AutoHFTextEntries := FStyleManager.AutoHFTextEntries - else - AutoHFTextEntries := nil; - - TdxPSHFToolBarBuilder.Build(tbPredefined, FilPredefined, - (FStyleManager <> nil) and (psoHFAutoText in APageSetupDlgData.OptionsVisible), - FHFFunctionList, AutoHFTextEntries, SpecialInsertClick, AutoHFTextEntriesClick, True); - end; - - if pnlVertAlignment.Visible then - pnlVertAlignment.Enabled := psoHFVertAlignment in APageSetupDlgData.OptionsEnabled; - - if pnlReverse.Visible then - chbxReverseOnEvenPages.Enabled := psoHFReverse in APageSetupDlgData.OptionsEnabled; - - if tshScaling.TabVisible then - begin - rbtnAdjustTo.Enabled := tshScaling.Enabled; - rbtnFitTo.Enabled := tshScaling.Enabled; - rbtnFitTo.Enabled := tshScaling.Enabled; - lblPercentOfNormalSize.Enabled := tshScaling.Enabled; - lblPagesWideBy.Enabled := tshScaling.Enabled; - lblTall.Enabled := tshScaling.Enabled; - FseFitToPage.Enabled := tshScaling.Enabled; - FseAdjustTo.Enabled := tshScaling.Enabled; - - rbtnAdjustTo.Checked := PrintStyle.PrinterPage.ScaleMode = smAdjust; - rbtnFitTo.Checked := PrintStyle.PrinterPage.ScaleMode = smFit; - TdxPSSpinEdit(FseAdjustTo).AsInteger := PrintStyle.PrinterPage.ScaleFactor; - TdxPSSpinEdit(FseFitToPage).AsInteger := PrintStyle.PrinterPage.FitToPagesByWide; - TdxPSSpinEdit(FseFitToPage).AsInteger := PrintStyle.PrinterPage.FitToPagesByTall; - end; - - case Page.GetInnerMeasurementUnits of - muInches: - begin - Denominator := 254; - LegendText := cxGetResourceString(@sdxUnitsInches); - end; - muMillimeters: - begin - Denominator := 10; - LegendText := cxGetResourceString(@sdxUnitsMillimeters); - end; - else - Denominator := 10; - end; - - if Page.Orientation = poPortrait then - begin - FsePaperWidth.MinValue := dxPrintDevice.MinExtentX / Denominator; - FsePaperWidth.MaxValue := dxPrintDevice.MaxExtentX / Denominator; - FsePaperHeight.MinValue := dxPrintDevice.MinExtentY / Denominator; - FsePaperHeight.MaxValue := dxPrintDevice.MaxExtentY / Denominator; - end - else - begin - FsePaperWidth.MinValue := dxPrintDevice.MinExtentY / Denominator; - FsePaperWidth.MaxValue := dxPrintDevice.MaxExtentY / Denominator; - FsePaperHeight.MinValue := dxPrintDevice.MinExtentX / Denominator; - FsePaperHeight.MaxValue := dxPrintDevice.MaxExtentX / Denominator; - end; - - FsePaperWidth.LegendText := LegendText; - FsePaperHeight.LegendText := LegendText; - FseMarginTop.LegendText := LegendText; - FseMarginLeft.LegendText := LegendText; - FseMarginRight.LegendText := LegendText; - FseMarginBottom.LegendText := LegendText; - FseMarginHeader.LegendText := LegendText; - FseMarginFooter.LegendText := LegendText; - - FsePaperWidth.ReadOnly := not PrintStyle.AllowCustomPaperSizes; - FsePaperWidth.TabStop := not FsePaperWidth.ReadOnly; - FsePaperWidth.Color := GetEditColor(FsePaperWidth.ReadOnly); - - FsePaperHeight.ReadOnly := not PrintStyle.AllowCustomPaperSizes; - FsePaperHeight.TabStop := not FsePaperHeight.ReadOnly; - FsePaperHeight.Color := GetEditColor(FsePaperHeight.ReadOnly); - - with pgctrlMain do - begin - I := APageSetupDlgData.ActivePageIndex; - if I < 0 then I := 0; - if I > PageCount - 1 then I := PageCount - 1; - if not Pages[I].TabVisible then I := 0; - ActivePage := Pages[I]; - end; - - FControlsUpdating := False; - - if pssCopy in FSavePrintStyle.State then CheckModified; -end; - -procedure TdxfmPageSetupDialog.ChangeBkgndGlyph(AGlyph: TBitmap; ABackground: TdxBackground); -var - DC: HDC; - PrevFont: HFONT; - PrevFontColor: COLORREF; - R: TRect; - PrevColor: COLORREF; - S: string; - Brush: HBRUSH; -begin - DC := AGlyph.Canvas.Handle; - PrevFont := SelectObject(DC, Font.Handle); - PrevFontColor := SetTextColor(DC, ColorToRGB(Font.Color)); - - R := MakeRect(0, 0, AGlyph.Width - FBmpArrow.Width - 4, AGlyph.Height); - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - InflateRect(R, -1, -1); - - case ABackground.Mode of - bmNone: - begin - S := DropAmpersand(cxGetResourceString(@sdxBtnNoFill)); - S := '[' + S + ']'; - - FillRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - SetBkMode(DC, Windows.TRANSPARENT); - SetTextColor(DC, ColorToRGB(clHighlight)); - DrawText(DC, PChar(S), Length(S), R, DT_SINGLELINE or DT_CENTER or DT_VCENTER); - end; - - bmBrush: - begin - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNSHADOW)); - InflateRect(R, -1, -1); - - PrevColor := SetBkColor(DC, ColorToRGB(ABackground.BkColor)); - Brush := CreateSolidBrush(ColorToRGB(ABackground.Brush.Color)); - FillRect(DC, R, Brush); - DeleteObject(Brush); - SetBkColor(DC, PrevColor); - end; - - bmBrushBitmap: - begin - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNSHADOW)); - InflateRect(R, -1, -1); - - Brush := CreatePatternBrush(TBitmap(ABackground.Picture).Handle); - FillRect(DC, R, Brush); - DeleteObject(Brush); - end; - - bmPicture: - begin - S := DropAmpersand(cxGetResourceString(@sdxPicture)); - S := '[' + S + ']'; - - FillRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - SetBkMode(DC, Windows.TRANSPARENT); - SetTextColor(DC, ColorToRGB(clHighlight)); - DrawText(DC, PChar(S), Length(S), R, DT_SINGLELINE or DT_CENTER or DT_VCENTER); - end; - end; - - R := MakeBounds(AGlyph.Width - FBmpArrow.Width, 0, FBmpArrow.Width, AGlyph.Height); - FillRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - // Down arrow - AGlyph.Canvas.Draw(R.Left + 4, R.Top, FBmpArrow); - // Separator vertical lines - R.Left := R.Left - 4; - R.Right := R.Left + 1; - FillRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - OffsetRect(R, 1, 0); - FillRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - OffsetRect(R, 1, 0); - FillRect(DC, R, GetSysColorBrush(COLOR_BTNSHADOW)); - OffsetRect(R, 1, 0); - FillRect(DC, R, GetSysColorBrush(COLOR_BTNHIGHLIGHT)); - - SetTextColor(DC, PrevFontColor); - SelectObject(DC, PrevFont); -end; - -procedure TdxfmPageSetupDialog.CreateControls; - - function CreateMarginSpin(AHost: TBevel; ATag, ATabOrder: Integer; ALabel: TLabel): TdxPSSpinEdit; - begin - Result := TdxPSSpinEdit.Create(Self); - with Result do - begin - Parent := AHost.Parent; - BoundsRect := AHost.BoundsRect; - LegendText := FsePaperHeight.LegendText; - ValueType := svtFloat; - Decimal := 2; - Increment := 0.1; - PageIncrement := 1; - TabOrder := ATabOrder; - Tag := MakeTTag(ATag); - OnButtonClick := MarginButtonClick; - OnChange := MarginChange; - OnExit := MarginExit; - end; - lblMarginTop.FocusControl := Result; - end; - -begin - FseAdjustTo := TdxPSSpinEdit.Create(Self); - with FseAdjustTo do - begin - Parent := tshScaling; - BoundsRect := bvlAdjustToHolder.BoundsRect; - Increment := 1; - PageIncrement := 10; - MinValue := 10; - MaxValue := 500; - TabOrder := rbtnAdjustTo.TabOrder + 1; - OnChange := ScaleChanged; - OnExit := AdjustToExit; - end; - FseFitToPage := TdxPSSpinEdit.Create(Self); - with FseFitToPage do - begin - Parent := tshScaling; - BoundsRect := bvlFitToPageHolder.BoundsRect; - Increment := 1; - PageIncrement := 10; - MinValue := 1; - MaxValue := 100; - TabOrder := rbtnFitTo.TabOrder + 1; - OnChange := FitToPageChange; - OnExit := FitToPageExit; - end; - lblPagesWideBy.FocusControl := FseFitToPage; - FseFitToPageTall := TdxPSSpinEdit.Create(Self); - with FseFitToPageTall do - begin - Parent := tshScaling; - BoundsRect := bvlFitToPageTallHolder.BoundsRect; - Increment := 1; - PageIncrement := 10; - MinValue := 1; - MaxValue := 100; - TabOrder := rbtnFitTo.TabOrder + 2; - OnChange := FitToPageChange; - OnExit := FitToPageTallExit; - end; - lblTall.FocusControl := FseFitToPageTall; - - FsePaperWidth := TdxPSSpinEdit.Create(Self); - with FsePaperWidth do - begin - Parent := gbxPaper; - BoundsRect := bvlPaperWidthHolder.BoundsRect; - ValueType := svtFloat; - Decimal := 2; - Increment := 0.1; - PageIncrement := 1.0; - TabOrder := lbxPaperType.TabOrder + 1; - OnButtonClick := PaperWidthButtonClick; - OnChange := PaperWidthChange; - OnExit := PaperWidthExit; - lblPaperWidth.FocusControl := FsePaperWidth; - end; - FsePaperHeight := TdxPSSpinEdit.Create(Self); - with FsePaperHeight do - begin - Parent := gbxPaper; - BoundsRect := bvlPaperHeightHolder.BoundsRect; - LegendText := FsePaperWidth.LegendText; - ValueType := svtFloat; - Decimal := 2; - Increment := 0.1; - PageIncrement := 1.0; - TabOrder := lbxPaperType.TabOrder + 2; - OnButtonClick := PaperHeightButtonClick; - OnChange := PaperHeightChange; - OnExit := PaperHeightExit; - lblPaperHeight.FocusControl := FsePaperHeight; - end; - - FseMarginTop := CreateMarginSpin(bvlMarginTopHolder, 1, 0, lblMarginTop); - FseMarginBottom := CreateMarginSpin(bvlMarginBottomHolder, 3, 1, lblMarginBottom); - FseMarginLeft := CreateMarginSpin(bvlMarginLeftHolder, 0, 2, lblMarginLeft); - FseMarginRight := CreateMarginSpin(bvlMarginRightHolder, 2, 3, lblMarginRight); - FseMarginHeader := CreateMarginSpin(bvlMarginHeaderHolder, 5, 4, lblMarginHeader); - FseMarginFooter := CreateMarginSpin(bvlMarginFooterHolder, 6, 5, lblMarginFooter); - - FOrientationPreview := TdxPreview.Create(Self); - with FOrientationPreview do - begin - Parent := gbxOrientation; - Enabled := False; - BoundsRect := bvlOrientationHolder.BoundsRect; - Color := clBtnFace; - {$IFDEF DELPHI7} - ControlStyle := ControlStyle + [csParentBackground]; - {$ENDIF} - ZoomMode := pzmPages; - PageXCount := 1; - ScrollBars := ssNone; - OptionsHint := OptionsHint - [pohShowForMargins, pohShowOnDrag]; - OptionsView := OptionsView - [povPageSelection, povMargins]; - LookAndFeel := plfFlat; - OptionsZoom := OptionsZoom - [pozZoomOnClick]; - MinHeaderSize := 0; - MinFooterSize := 0; - Margins.Footer.Value := 0; - Margins.Bottom.Value := 0; - Margins.Left.Value := 0; - Margins.Header.Value := 0; - Margins.Top.Value := 0; - Margins.Right.Value := 0; - MinUsefulSize := NullPoint; - BorderStyle := bsNone; - OnCalcPageCount := OrientationPreviewCalcPageCount; - end; - - FPreview := TdxPreview.Create(Self); - with FPreview do - begin - Parent := pnlInMargins; - BoundsRect := bvlPreviewHolder.BoundsRect; - OptionsZoom := OptionsZoom - [pozZoomOnClick]; - OptionsView := OptionsView - [povPageSelection]; - MinHeaderSize := 0; - MinFooterSize := 0; - ScrollBars := ssNone; - ZoomMode := pzmPages; - OnCalcPageCount := PreviewCalcPageCount; - OnDrawPageContent := PreviewDrawPageContent; - OnAfterDragMargin := PreviewAfterDragMargin; - end; - - FwpMargins := TdxPSWarningPane.Create(Self); - FwpMargins.Parent := bvlMarginsWarningHolder.Parent; - FwpMargins.BoundsRect := bvlMarginsWarningHolder.BoundsRect; -end; - -procedure TdxfmPageSetupDialog.LoadStrings; -begin - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - btnPrint.Caption := cxGetResourceString(@sdxBtnPrint); - btnPrintPreview.Caption := cxGetResourceString(@sdxBtnPrintPreview); - btnOptions.Caption := cxGetResourceString(@sdxBtnOptions); - - lblStyleName.Caption := cxGetResourceString(@sdxStyleName); - - tshPage.Caption := cxGetResourceString(@sdxPage); - tshMargins.Caption := cxGetResourceString(@sdxMargins); - tshHeaderFooter.Caption := cxGetResourceString(@sdxHeaderFooter); - tshScaling.Caption := cxGetResourceString(@sdxScaling); - - gbxPaper.Caption := cxGetResourceString(@sdxPaper); - lblPaperType.Caption := cxGetResourceString(@sdxPaperType); - PlaceBevel(bvlPaperType, lblPaperType); - lblPaperDimensions.Caption := cxGetResourceString(@sdxPaperDimension); - PlaceBevel(bvlPaperDimensions, lblPaperDimensions); - lblPaperWidth.Caption := cxGetResourceString(@sdxPaperWidth); - lblPaperHeight.Caption := cxGetResourceString(@sdxPaperHeight); - lblPaperSource.Caption := cxGetResourceString(@sdxPaperSource); - PlaceBevel(bvlPaperSource, lblPaperSource); - - gbxOrientation.Caption := cxGetResourceString(@sdxOrientation); - rBtnPortrait.Caption := cxGetResourceString(@sdxPortrait); - rBtnLandscape.Caption := cxGetResourceString(@sdxLandscape); - gbxPrintOrder.Caption := cxGetResourceString(@sdxPrintOrder); - rbtnDownThenOver.Caption := cxGetResourceString(@sdxDownThenOver); - rbtnOverThenDown.Caption := cxGetResourceString(@sdxOverThenDown); - gbxShading.Caption := cxGetResourceString(@sdxShading); - chbxShading.Caption := cxGetResourceString(@sdxPrintUsingGrayShading); - - lblMarginTop.Caption := cxGetResourceString(@sdxTop); - lblMarginLeft.Caption := cxGetResourceString(@sdxLeft); - lblMarginRight.Caption := cxGetResourceString(@sdxRight); - lblMarginBottom.Caption := cxGetResourceString(@sdxBottom); - lblMarginHeader.Caption := cxGetResourceString(@sdxHeader2); - lblMarginFooter.Caption := cxGetResourceString(@sdxFooter2); - btnFix.Caption := cxGetResourceString(@sdxBtnFix); - btnRestoreOriginalMargins.Caption := cxGetResourceString(@sdxBtnRestoreOriginal); - - lblCenterOnPage.Caption := cxGetResourceString(@sdxCenterOnPage); - PlaceBevel(bvlCenterOnPage, lblCenterOnPage); - chbxCenterHorz.Caption := cxGetResourceString(@sdxHorizontally); - chbxCenterVert.Caption := cxGetResourceString(@sdxVertically); - - lblPreview.Caption := DropAmpersand(cxGetResourceString(@sdxPreview)); - - lblHeader.Caption := cxGetResourceString(@sdxHeader); - PlaceBevel(bvlHeader, lblHeader); - btnHeaderFont.Caption := cxGetResourceString(@sdxBtnHeaderFont); - btnHeaderBackground.Caption := cxGetResourceString(@sdxBtnHeaderBackground); - lblFooter.Caption := cxGetResourceString(@sdxFooter); - PlaceBevel(bvlFooter, lblFooter); - btnFooterFont.Caption := cxGetResourceString(@sdxBtnFooterFont); - btnFooterBackground.Caption := cxGetResourceString(@sdxBtnFooterBackground); - - gbxVertAlignment.Caption := cxGetResourceString(@sdxVertAlignment); - gbxFunctions.Caption := cxGetResourceString(@sdxPredefinedFunctions); - chbxReverseOnEvenPages.Caption := cxGetResourceString(@sdxReverseOnEvenPages); - - rbtnAdjustTo.Caption := cxGetResourceString(@sdxAdjustTo); - rbtnFitTo.Caption := cxGetResourceString(@sdxFitTo); - lblPercentOfNormalSize.Caption := cxGetResourceString(@sdxPercentOfNormalSize); - lblPagesWideBy.Caption := cxGetResourceString(@sdxPagesWideBy); - lblTall.Caption := cxGetResourceString(@sdxTall); -end; - -procedure TdxfmPageSetupDialog.PaperWidthExit(Sender: TObject); -begin - UpdatePageInfos; -end; - -procedure TdxfmPageSetupDialog.PaperWidthChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.PaperHeightButtonClick(Sender: TObject; - ButtonType: TdxButtonType; Button: TUDBtnType); -begin - UpdatePageInfos; -end; - -procedure TdxfmPageSetupDialog.PaperWidthButtonClick(Sender: TObject; - ButtonType: TdxButtonType; Button: TUDBtnType); -begin - UpdatePageInfos; -end; - -procedure TdxfmPageSetupDialog.PaperHeightExit(Sender: TObject); -begin - UpdatePageInfos; -end; - -procedure TdxfmPageSetupDialog.UpdatePageInfos; -var - I: Integer; -begin - Page.RealPageSize := MakePoint(Round(1000 * FsePaperWidth.Value), Round(1000 * FsePaperHeight.Value)); - FPreview.OriginalPageSize.Point := Page.PageSizeLoMetric; - FOrientationPreview.OriginalPageSize.Point := Page.PageSizeLoMetric; - UpdateMarginsBounds; - FPaperSizeLocked := True; - try - for I := 0 to PaperInfoCount - 1 do - if PaperInfos[I].DMPaper = Page.DMPaper then - begin - lbxPaperType.ItemIndex := I; - Break; - end; - finally - FPaperSizeLocked := False; - end; -end; - -procedure TdxfmPageSetupDialog.PaperHeightChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.AdjustToExit(Sender: TObject); -begin - if FControlsUpdating then Exit; - rbtnAdjustTo.Checked := True; - PrintStyle.PrinterPage.ScaleFactor := fseAdjustTo.AsInteger; -end; - -procedure TdxfmPageSetupDialog.ScaleChanged(Sender: TObject); -begin - if FControlsUpdating then Exit; - rbtnAdjustTo.Checked := True; - ActiveControl := TWinControl(Sender); - CheckModified; -end; - -procedure TdxfmPageSetupDialog.FitToPageChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - rbtnFitTo.Checked := True; - ActiveControl := TWinControl(Sender); - CheckModified; -end; - -procedure TdxfmPageSetupDialog.FitToPageExit(Sender: TObject); -begin - if FControlsUpdating then Exit; - PrintStyle.PrinterPage.FitToPagesByWide := FseFitToPage.AsInteger; -end; - -procedure TdxfmPageSetupDialog.FitToPageTallExit(Sender: TObject); -begin - if FControlsUpdating then Exit; - PrintStyle.PrinterPage.FitToPagesByTall := FseFitToPageTall.AsInteger; -end; - -procedure TdxfmPageSetupDialog.UpdateControlsState; -begin - FControlsUpdating := True; - try -// btnOK.Enabled := FModified; - btnPrintPreview.Enabled := True; - btnPrint.Enabled := True; - //btnOptions.Enabled := PrintStyle.OptionsDialogExists; - btnFix.Enabled := MarginsOutside or MarginsInvalid; - btnRestoreOriginalMargins.Enabled := gbxMargins.Enabled and FMarginsChanged; - finally - FControlsUpdating := False; - end -end; - -procedure TdxfmPageSetupDialog.CheckModified; -begin - if not FModified then FModified := True; - UpdateControlsState; -end; - -function TdxfmPageSetupDialog.GetCurrentPaperInfo: TdxPaperInfo; -begin - with lbxPaperType do - if ItemIndex <> -1 then - Result := PaperInfos[ItemIndex] - else - Result := nil; -end; - -function TdxfmPageSetupDialog.GetPage: TdxPrinterPage; -begin - if PrintStyle <> nil then - Result := PrintStyle.PrinterPage - else - Result := nil -end; - -function TdxfmPageSetupDialog.GetPaperInfo(Index: Integer): TdxPaperInfo; -begin - Result := TdxPaperInfo(lbxPaperType.Items.Objects[Index]); -end; - -function TdxfmPageSetupDialog.GetPaperInfoCount: Integer; -begin - Result := lbxPaperType.Items.Count; -end; - -procedure TdxfmPageSetupDialog.StartSetting; - - procedure DeleteCustomPapers; - var - I: Integer; - begin - // TODO: Check - for I := lbxPaperType.Items.Count - 1 downto 0 do - if PaperInfos[I].DMPaper >= DMPAPER_USER then - lbxPaperType.Items.Delete(I); - end; - - procedure SetupPapers; - var - I: Integer; - begin - lbxPaperType.Items.BeginUpdate; - try - lbxPaperType.Clear; - PrintStyle.GetFilteredPapers(lbxPaperType.Items); - if lbxPaperType.Items.Count > 0 then - begin - if not PrintStyle.AllowCustomPaperSizes then - DeleteCustomPapers; - - for I := 0 to PaperInfoCount - 1 do - if PrintStyle.PrinterPage.DMPaper = PaperInfos[I].DMPaper then // TODO: FindByDMPaper - begin - lbxPaperType.ItemIndex := I; - Break; - end; - - if lbxPaperType.ItemIndex = -1 then - if not PrintStyle.AllowCustomPaperSizes then - lbxPaperType.ItemIndex := 0 - else - begin - I := 0; - //TdxPaperInfo(lbxPaperType.Items.Objects[I]).DMPaper < DMPAPER_USER - while (I < lbxPaperType.Items.Count) and (Pos('Custom', lbxPaperType.Items[I]) = 0) do - Inc(I); - if (I < lbxPaperType.Items.Count) then - lbxPaperType.ItemIndex := I - else - lbxPaperType.ItemIndex := 0; - end; - end; - finally - lbxPaperType.Items.EndUpdate; - end; - if lbxPaperType.Enabled then - lbxPaperType.Enabled := lbxPaperType.Items.Count > 0; - end; - - procedure SetupBins; - var - I: Integer; - begin - with cbxPaperSource do - begin - Items.BeginUpdate; - try - Items.Clear; - if dxPrintDevice.Bins <> nil then - Items := dxPrintDevice.Bins; - Enabled := Items.Count > 0; - if Enabled then - begin - I := Items.IndexOfObject(TObject(Page.PaperSource)); - if I <> -1 then - ItemIndex := I - else - ItemIndex := 0; - end; - finally - Items.EndUpdate; - end; - end; - end; - -begin - FControlsUpdating := True; - try - SetupPapers; - if lbxPaperType.Items.Count > 0 then lbxPaperTypeClick(lbxPaperType); - SetupBins; - ChangeBkgndGlyph(FHeaderBkgndGlyph, Page.PageHeader.Background); - btnHeaderBackGround.Glyph := FHeaderBkgndGlyph; - ChangeBkgndGlyph(FFooterBkgndGlyph, Page.PageFooter.Background); - btnFooterBackGround.Glyph := FFooterBkgndGlyph; - edStyleName.Text := Copy(FSavePrintStyle.StyleCaption, 1, edStyleName.MaxLength); - - chbxShading.Checked := PrintStyle.PrinterPage.GrayShading; - - EnabledMemoAttr(False); - UpdateMarginsEdits; - with Page do - begin - FPreview.MeasurementUnits := TdxPreviewMeasurementUnits(MeasurementUnits); - FPreview.MinUsefulSize := MakePoint(MinPrintableAreaLoMetric, MinPrintableAreaLoMetric); - FPreview.Orientation := TdxPreviewPaperOrientation(Orientation); - FPreview.Margins.Header.Value := HeaderLoMetric; - FPreview.Margins.Footer.Value := FooterLoMetric; - with MarginsLoMetric do - begin - FPreview.Margins.Left.Value := Left; - FPreview.Margins.Top.Value := Top; - FPreview.Margins.Right.Value := Right; - FPreview.Margins.Bottom.Value := Bottom; - end; - FOrientationPreview.MeasurementUnits := TdxPreviewMeasurementUnits(MeasurementUnits); - FOrientationPreview.Orientation := TdxPreviewPaperOrientation(Orientation); - - chbxCenterHorz.Checked := PrintStyle.PrinterPage.CenterOnPageH; - chbxCenterVert.Checked := PrintStyle.PrinterPage.CenterOnPageV; - rbtnDownThenOver.Checked := (PrintStyle.PrinterPage.PageOrder = poDownThenOver); - rbtnOverThenDown.Checked := (PrintStyle.PrinterPage.PageOrder = poOverThenDown); - - memHeaderLeft.Lines := PageHeader.LeftTitle; - memHeaderCenter.Lines := PageHeader.CenterTitle; - memHeaderRight.Lines := PageHeader.RightTitle; - memFooterLeft.Lines := PageFooter.LeftTitle; - memFooterCenter.Lines := PageFooter.CenterTitle; - memFooterRight.Lines := PageFooter.RightTitle; - FontInfoToText(PageHeader.Font, edHeaderFontInfo); - FontInfoToText(PageFooter.Font, edFooterFontInfo); - - rbtnAdjustTo.Checked := ScaleMode = smAdjust; - rbtnFitTo.Checked := ScaleMode = smFit; - TdxPSSpinEdit(FseAdjustTo).AsInteger := ScaleFactor; - TdxPSSpinEdit(FseFitToPage).AsInteger := FitToPagesByWide; - TdxPSSpinEdit(FseFitToPageTall).AsInteger := FitToPagesByTall; - chbxReverseOnEvenPages.Checked := ReverseTitlesOnEvenPages; - end; - btnHelp.Visible := (HelpContext <> 0); - if (HelpContext = 0) then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - end; - finally - FControlsUpdating := False; - UpdateControlsState; - end; - - if (FStyleManager <> nil) and edStyleName.CanFocus then - ActiveControl := edStyleName - else - if pgctrlMain.ActivePage.PageIndex = 0 then - begin - if lbxPaperType.CanFocus then ActiveControl := lbxPaperType - end - else - if pgctrlMain.ActivePage.PageIndex = 1 then - if FseMarginTop.CanFocus and not FseMarginTop.ReadOnly then - ActiveControl := FseMarginTop; -end; - -procedure TdxfmPageSetupDialog.UpdateMarginsBounds; -var - APrevValue: Boolean; -begin - APrevValue := FControlsUpdating; - if not APrevValue then FControlsUpdating := True; - try - with Page do - begin - FseMarginHeader.MinValue := MinMargins.Top / 1000; - FseMarginHeader.MaxValue := (RealPageSize.Y - MinPrintableArea - MinMargins.Bottom) / 1000; - FseMarginFooter.MinValue := MinMargins.Bottom / 1000; - FseMarginFooter.MaxValue := (RealPageSize.Y - MinPrintableArea - MinMargins.Top) / 1000; - FseMarginTop.MinValue := MinMargins.Top / 1000; - FseMarginTop.MaxValue := (RealPageSize.Y - MinPrintableArea - MinMargins.Bottom) / 1000; - FseMarginBottom.MinValue := MinMargins.Bottom / 1000; - FseMarginBottom.MaxValue := (RealPageSize.Y - MinPrintableArea - MinMargins.Top) / 1000; - FseMarginLeft.MinValue := MinMargins.Left / 1000; - FseMarginLeft.MaxValue := (RealPageSize.X - MinPrintableArea - MinMargins.Right) / 1000; - FseMarginRight.MinValue := MinMargins.Right / 1000; - FseMarginRight.MaxValue := (RealPageSize.X - MinPrintableArea - MinMargins.Left) / 1000; - end; - finally - if not APrevValue then FControlsUpdating := False; - end; -end; - -procedure TdxfmPageSetupDialog.SetMarginsInvalid(Value: Boolean); -begin - if FMarginsInvalid <> Value then - begin - FMarginsInvalid := Value; - UpdateWarningPane(MarginsInvalid, MarginsOutside, - cxGetResourceString(@sdxInvalidMargins), cxGetResourceString(@sdxOutsideMargins)); - FPreview.InvalidatePages; - end; -end; - -procedure TdxfmPageSetupDialog.SetMarginsOutside(Value: Boolean); -begin - if FMarginsOutside <> Value then - begin - FMarginsOutside := Value; - UpdateWarningPane(MarginsOutside, MarginsInvalid, - cxGetResourceString(@sdxOutsideMargins), cxGetResourceString(@sdxInvalidMargins)); - end; -end; - -procedure TdxfmPageSetupDialog.MarginExit(Sender: TObject); -var - InvalidMarginControl: TWinControl; -begin - if FMarginsChanging then Exit; - FMarginsChanging := True; - try - MarginsInvalid := not ValidateMargins(InvalidMarginControl); - MarginsOutside := not ValidateMarginsOutside(InvalidMarginControl); - if not MarginsInvalid then UpdatePreviewMargins; - finally - FMarginsChanging := False; - end; - UpdateControlsState; -end; - -procedure TdxfmPageSetupDialog.MarginButtonClick(Sender: TObject; - ButtonType: TdxButtonType; Button: TUDBtnType); -begin - MarginExit(Sender); - CheckModified; -end; - -procedure TdxfmPageSetupDialog.MarginChange(Sender: TObject); -begin - if FControlsUpdating or FMarginsChanging then Exit; - FMarginsChanged := True; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.btnHFFontClick(Sender: TObject); -var - PageObject: TCustomdxPageObject; - Editor: TEdit; -begin - if TTagToInt(TComponent(Sender).Tag) = 0 then - begin - PageObject := Page.PageHeader; - Editor := edHeaderFontInfo; - end - else - begin - PageObject := Page.PageFooter; - Editor := edFooterFontInfo; - end; - - dxPSGlbl.FontDialog.Font := PageObject.Font; - if dxPSGlbl.FontDialog.Execute then - begin - PageObject.Font := dxPSGlbl.FontDialog.Font; - FontInfoToText(PageObject.Font, Editor); - CheckModified; - end; -end; - -procedure TdxfmPageSetupDialog.AutoHFTextEntriesClick(Sender: TObject); -var - Part1, Part2, Part3: string; -begin - dxPSSplitAutoHFTextEntry(FStyleManager.AutoHFTextEntries[TTagToInt(TComponent(Sender).Tag)], Part1, Part2, Part3); - if (Part2 = '') and (Part3 = '') then - TCustomMemo(ActiveControl).SelText := Part1 - else - if TTagToInt(TCustomMemo(ActiveControl).Tag) < 4 then - begin - if Part1 <> '' then memHeaderLeft.SelText := Part1; - if Part2 <> '' then memHeaderCenter.SelText := Part2; - if Part3 <> '' then memHeaderRight.SelText := Part3; - end - else - begin - if Part1 <> '' then memFooterLeft.SelText := Part1; - if Part2 <> '' then memFooterCenter.SelText := Part2; - if Part3 <> '' then memFooterRight.SelText := Part3; - end; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.SpecialInsertClick(Sender: TObject); -begin - if ActiveControl is TCustomMemo then - begin - TCustomMemo(ActiveControl).SelText := FHFFunctionList[TTagToInt(TComponent(Sender).Tag)]; - CheckModified; - end; -end; - -const - PageTitlePartMap: array[0..2] of TdxPageTitlePart = (tpLeft, tpCenter, tpRight); - -procedure TdxfmPageSetupDialog.MemoExit(Sender: TObject); -var - T: Integer; -begin - if not (ActiveControl is TCustomMemo) then - EnabledMemoAttr(False); - - T := TTagToInt(TCustomMemo(Sender).Tag); - if T < 3 then - Page.PageHeader.Titles[PageTitlePartMap[T]].Text := TCustomMemo(Sender).Text - else - Page.PageFooter.Titles[PageTitlePartMap[T - 3]].Text := TCustomMemo(Sender).Text; -end; - -procedure TdxfmPageSetupDialog.MemoEnter(Sender: TObject); -var - T, ButtonIndex: Integer; -begin - EnabledMemoAttr(True); - T := TTagToInt(TCustomMemo(Sender).Tag); - if T < 3 then - ButtonIndex := Integer(Page.PageHeader.TextAlignY[PageTitlePartMap[T]]) - else - ButtonIndex := Integer(Page.PageFooter.TextAlignY[PageTitlePartMap[T - 3]]); - tbTAVert.Buttons[ButtonIndex].Down := True; -end; - -procedure TdxfmPageSetupDialog.pgctrlMainChange(Sender: TObject); -begin - EnabledMemoAttr(False); -end; - -procedure TdxfmPageSetupDialog.EnabledMemoAttr(AEnabled: Boolean); -var - I: Integer; -begin - tbPredefined.Enabled := AEnabled; - for I := 0 to tbPredefined.ButtonCount - 1 do - tbPredefined.Buttons[I].Enabled := AEnabled; - - tbTAVert.Enabled := AEnabled; - for I := 0 to tbTAVert.ButtonCount - 1 do - tbTAVert.Buttons[I].Enabled := AEnabled; -end; - -procedure TdxfmPageSetupDialog.BackgroundClick(Sender: TObject); -var - Pt: TPoint; - T: Integer; - ABackground: TdxBackground; - AParams: TdxBackgroundDlgData; -begin - Pt := TWinControl(Sender).ClientOrigin; - Inc(Pt.Y, TWinControl(Sender).Height); - FillChar(AParams, SizeOf(TdxBackgroundDlgData), 0); - with AParams do - begin - BorderStyle := bsNone; - NoBtnCaption := cxGetResourceString(@sdxBtnNoFill); - ShowFillEffects := True; - ShowMoreColors := True; - end; - T := TTagToInt(TComponent(Sender).Tag); - if T = 0 then - ABackground := Page.PageHeader.Background - else - ABackground := Page.PageFooter.Background; - if dxChooseBackgroundDlg(ABackground, Pt, AParams) then - begin - if T = 0 then - begin - ChangeBkgndGlyph(FHeaderBkgndGlyph, ABackground); - TBitBtn(Sender).Glyph := FHeaderBkgndGlyph; - end - else - begin - ChangeBkgndGlyph(FFooterBkgndGlyph, ABackground); - TBitBtn(Sender).Glyph := FFooterBkgndGlyph; - end; - CheckModified; - end; -end; - -procedure TdxfmPageSetupDialog.VertTextAlignClick(Sender: TObject); -var - T: Integer; -begin - if ActiveControl is TCustomMemo then - begin - T := TTagToInt(TCustomMemo(ActiveControl).Tag); - if T < 3 then - Page.PageHeader.TextAlignY[PageTitlePartMap[T]] := TcxTextAlignY(TTagToInt(TToolButton(Sender).Tag)) - else - Page.PageFooter.TextAlignY[PageTitlePartMap[T - 3]] := TcxTextAlignY(TTagToInt(TToolButton(Sender).Tag)); - CheckModified; - end; -end; - -procedure TdxfmPageSetupDialog.memHeaderLeftChange(Sender: TObject); -begin - CheckModified; - TWinControl(Sender).Invalidate; -end; - -procedure TdxfmPageSetupDialog.chbxReverseOnEvenPagesClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - PrintStyle.PrinterPage.ReverseTitlesOnEvenPages := TCheckBox(Sender).Checked; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.btnPrintPreviewClick(Sender: TObject); -begin - FModified := True; - FPreviewBtnClicked := True; - ModalResult := mrOK -end; - -procedure TdxfmPageSetupDialog.btnPrintClick(Sender: TObject); -begin - FModified := True; - FPrintBtnClicked := True; - ModalResult := mrOK; -end; - -procedure TdxfmPageSetupDialog.OrientationPreviewCalcPageCount(Sender: TObject); -begin - TdxPreview(Sender).PageCount := 1; -end; - -procedure TdxfmPageSetupDialog.PreviewCalcPageCount(Sender: TObject); -begin - TdxPreview(Sender).PageCount := 1; -end; - -procedure TdxfmPageSetupDialog.PreviewDrawPageContent(Sender: TObject; - ACanvas: TCanvas; ABounds: TRect; APageIndex: Integer); -var - ContentBounds, FooterBounds, HeaderBounds: TRect; - InvalidMarginControl: TWinControl; -begin - with TdxPreview(Sender) do - begin - ContentBounds := MakeRect(ABounds.Left + Margins.Left.VisibleValue, - ABounds.Top + Margins.Top.VisibleValue, - ABounds.Right - Margins.Right.VisibleValue, - ABounds.Bottom - Margins.Bottom.VisibleValue); - FooterBounds := MakeRect(ABounds.Left + Margins.Left.VisibleValue, - ABounds.Bottom - Margins.Footer.VisibleValue, - ABounds.Right - Margins.Right.VisibleValue, - ABounds.Bottom - Margins.Bottom.VisibleValue); - HeaderBounds := MakeRect(ABounds.Left + Margins.Left.VisibleValue, - ABounds.Top + Margins.Header.VisibleValue, - ABounds.Right - Margins.Right.VisibleValue, - ABounds.Top + Margins.Top.VisibleValue); - - if ValidateMargins(InvalidMarginControl) then - OptionsView := OptionsView + [povMargins] - else - OptionsView := OptionsView - [povMargins]; - - if povMargins in OptionsView then - if Assigned(FOnCustomDrawPreview) then - FOnCustomDrawPreview(PrintStyle, ACanvas, ABounds, ContentBounds, HeaderBounds, FooterBounds) - else - dxPSDefaultDrawPagePreview(PrintStyle, ACanvas, ABounds, ContentBounds, HeaderBounds, FooterBounds); - end; -end; - -procedure TdxfmPageSetupDialog.PreviewAfterDragMargin(Sender: TObject; - AMargin: TdxPreviewPageMargin); -var - V: Extended; -begin - case Page.GetInnerMeasurementUnits of - muInches: - V := AMargin.Value / 254; - muMillimeters: - V := AMargin.Value / 10; - else - V := 0; - end; - - if (AMargin is TdxPreviewPageMarginFooter) or (AMargin is TdxPreviewPageMarginHeader) then - FMarginsChanging := True; - - try - if AMargin is TdxPreviewPageMarginLeft then - begin - FseMarginLeft.Value := V; - MarginExit(FseMarginLeft); - end; - if AMargin is TdxPreviewPageMarginTop then - begin - FseMarginTop.Value := V; - MarginExit(FseMarginTop); - end; - if AMargin is TdxPreviewPageMarginRight then - begin - FseMarginRight.Value := V; - MarginExit(FseMarginRight); - end; - if AMargin is TdxPreviewPageMarginBottom then - begin - FseMarginBottom.Value := V; - MarginExit(FseMarginBottom); - end; - if AMargin is TdxPreviewPageMarginHeader then - begin - FseMarginHeader.Value := V; - if FseMarginTop.Value < FseMarginHeader.Value then - FseMarginTop.Value := FseMarginHeader.Value; - FMarginsChanged := True; - end; - if AMargin is TdxPreviewPageMarginFooter then - begin - FseMarginFooter.Value := V; - if FseMarginBottom.Value < FseMarginFooter.Value then - FseMarginBottom.Value := FseMarginFooter.Value; - FMarginsChanged := True; - end; - finally - if (AMargin is TdxPreviewPageMarginFooter) or (AMargin is TdxPreviewPageMarginHeader) then - begin - FMarginsChanging := False; - if AMargin is TdxPreviewPageMarginHeader then - MarginExit(FseMarginHeader) - else - MarginExit(FseMarginBottom); - end; - end; -end; - -procedure TdxfmPageSetupDialog.lblMarginTopClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; -end; - -procedure TdxfmPageSetupDialog.lblPaperSourceClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxfmPageSetupDialog.pbxPageOrderPaint(Sender: TObject); -const - ImageIndexes: array[Boolean] of Integer = (1, 0); -begin - ilPrintOrders.Draw(TPaintBox(Sender).Canvas, 0, 0, - ImageIndexes[rbtnDownThenOver.Checked], gbxPrintOrder.Enabled); -end; - -procedure TdxfmPageSetupDialog.PageOrderClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - PrintStyle.PrinterPage.PageOrder := TdxPageOrder(TTagToInt(TRadioButton(Sender).Tag)); - pbxPageOrder.Invalidate; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.pbxPageOrderDblClick(Sender: TObject); -begin - rbtnDownThenOver.Checked := not rbtnDownThenOver.Checked; - rbtnOverThenDown.Checked := not rbtnDownThenOver.Checked; -end; - -procedure TdxfmPageSetupDialog.chbxShadingClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - PrintStyle.PrinterPage.GrayShading := TCheckBox(Sender).Checked; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.CenterOnPageClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - with TCheckBox(Sender) do - if TTagToInt(Tag) = 0 then - PrintStyle.PrinterPage.CenterOnPageH := Checked - else - PrintStyle.PrinterPage.CenterOnPageV := Checked; - CheckModified; - FPreview.InvalidatePages; -end; - -procedure TdxfmPageSetupDialog.OrientationClick(Sender: TObject); -var - T: Integer; - V, W, H: Extended; -begin - if FControlsUpdating then Exit; - T := TTagToInt(TComponent(Sender).Tag); - if not Page.AutoSwapMargins then - begin - FPreview.OptionsBehavior := FPreview.OptionsBehavior - [pobAutoSwapMargins]; - FOrientationPreview.OptionsBehavior := FOrientationPreview.OptionsBehavior - [pobAutoSwapMargins]; - end; - FPreview.Orientation := TdxPreviewPaperOrientation(T); - FOrientationPreview.Orientation := TdxPreviewPaperOrientation(T); - SaveMargins; - Page.Orientation := TdxPrinterOrientation(T); - - W := FsePaperWidth.Value; - H := FsePaperHeight.Value; - V := FsePaperWidth.MaxValue; - FsePaperWidth.MaxValue := FsePaperHeight.MaxValue; - FsePaperHeight.MaxValue := V; - V := FsePaperWidth.MinValue; - FsePaperWidth.MinValue := FsePaperHeight.MinValue; - FsePaperHeight.MinValue := V; - FsePaperWidth.Value := H; - FsePaperHeight.Value := W; - - UpdateMarginsEdits; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.OrientationDblClick(Sender: TObject); -begin - ModalResult := mrOk; -end; - -procedure TdxfmPageSetupDialog.UpdateMarginsEdits; -begin - UpdateMarginsBounds; - with Page do - begin - FseMarginHeader.Value := Header / 1000; - FseMarginFooter.Value := Footer / 1000; - FseMarginTop.Value := Margins.Top / 1000; - FseMarginBottom.Value := Margins.Bottom / 1000; - FseMarginLeft.Value := Margins.Left / 1000; - FseMarginRight.Value := Margins.Right / 1000; - end; - if not FControlsUpdating then - begin - MarginExit(FseMarginHeader); - MarginExit(FseMarginFooter); - MarginExit(FseMarginTop); - MarginExit(FseMarginBottom); - MarginExit(FseMarginLeft); - MarginExit(FseMarginRight); - end; -end; - -procedure TdxfmPageSetupDialog.cbxPaperSourceChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - with TComboBox(Sender) do - Page.PaperSource := Integer(Items.Objects[ItemIndex]); - CheckModified; -end; - -procedure TdxfmPageSetupDialog.lbxPaperTypeClick(Sender: TObject); -var - PaperInfo: TdxPaperInfo; - Pt: TPoint; -begin - if FPaperSizeLocked then Exit; - - PaperInfo := CurrentPaperInfo; - - Pt := MakePoint(PaperInfo.Width, PaperInfo.Height); - FPreview.OriginalPageSize.Point := Pt; - FOrientationPreview.OriginalPageSize.Point := Pt; - - Page.DMPaper := PaperInfo.DMPaper; - FsePaperWidth.Value := Page.RealPageSize.X / 1000; - FsePaperHeight.Value := Page.RealPageSize.Y / 1000; - - UpdateMarginsBounds; - if not FControlsUpdating then CheckModified; -end; - -procedure TdxfmPageSetupDialog.ScalingClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - case TTagToInt(TComponent(Sender).Tag) of - 0: - begin - PrintStyle.PrinterPage.ScaleMode := smAdjust; - ActiveControl := FseAdjustTo; - end; - 1: - begin - PrintStyle.PrinterPage.ScaleMode := smFit; - if FseFitToPage.Enabled then - ActiveControl := FseFitToPage - else if FseFitToPageTall.Enabled then - ActiveControl := FseFitToPageTall; - end; - end; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.MemoChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.cbxPaperSourceDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - with TComboBox(Control) do - begin - Canvas.FillRect(Rect); - InflateRect(Rect, -2, -1); - ilBins.Draw(Canvas, Rect.Left, Rect.Top, Integer(dxPrintDevice.IsAutoSelectBin(Index))); - Inc(Rect.Left, ilPaperTypes.Width + 2); - Canvas.TextRect(Rect, Rect.Left, - Rect.Top + (Rect.Bottom - Rect.Top - Canvas.TextHeight(Items[Index])) div 2, Items[Index]); - end; -end; - -procedure TdxfmPageSetupDialog.lbxPaperTypeDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -const - ImageIndexes: array[Boolean] of Integer = (0, 1); -begin - with TListBox(Control) do - begin - Canvas.FillRect(Rect); - InflateRect(Rect, -2, -1); - ilPapers.Draw(Canvas, Rect.Left, Rect.Top, ImageIndexes[dxPrintDevice.IsEnvelopePaper(Index)], Enabled); - Inc(Rect.Left, ilPaperTypes.Width + 2); - if not Enabled then - Canvas.Font.Color := clGrayText; - Canvas.TextRect(Rect, Rect.Left, - Rect.Top + (Rect.Bottom - Rect.Top - Canvas.TextHeight(Items[Index])) div 2, Items[Index]); - Canvas.Font.Color := clWindowText; - end; -end; - -procedure TdxfmPageSetupDialog.FormKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if (Key = VK_ESCAPE) and (Shift = []) and (ActiveControl is TCustomMemo) then - ModalResult := mrCancel; -end; - -procedure TdxfmPageSetupDialog.edStyleNameChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.edStyleNameExit(Sender: TObject); -var - StyleManager: TdxPrintStyleManager; -begin - if edStyleName.Enabled then - begin - PrintStyle.StyleCaption := edStyleName.Text; - StyleManager := FSavePrintStyle.StyleManager; - if (StyleManager <> nil) and (StyleManager.PageSetupDialog <> nil) then - Caption := StyleManager.PageSetupDialog.RealTitle - else - Caption := cxGetResourceString(@sdxPageSetupCaption) + ': ' + PrintStyle.StyleCaption; - end; -end; - -function TdxfmPageSetupDialog.ValidateStyleCaption: Boolean; -var - S: string; - I: Integer; - AStyle: TBasedxPrintStyle; -begin - Result := True; - if (FStyleManager <> nil) and not edStyleName.ReadOnly then - begin - S := edStyleName.Text; - for I := 0 to FStyleManager.Count - 1 do - begin - AStyle := FStyleManager[I]; - if (AStyle <> FSavePrintStyle) and dxSameText(AStyle.StyleCaption, S) then - begin - Result := False; - Exit; - end; - end; - end; -end; - -function TdxfmPageSetupDialog.ValidateUserInput(out AControl: TWinControl): Boolean; -var - IsFixupMarginsOutside: Boolean; - Stub: TWinControl; -begin - AControl := nil; - Result := ValidateStyleCaption; - if not Result then - begin - MessageWarning(Format(cxGetResourceString(@sdxInvalideStyleCaption), [edStyleName.Text])); - AControl := edStyleName; - end - else - begin - IsFixupMarginsOutside := False; - if not ValidateMarginsOutside(Stub) then - begin - Result := True; - Beep; - IsFixupMarginsOutside := MarginsOutsideMessageDlg(cxGetResourceString(@sdxOutsideMarginsMessage2)) = mrYes; - if IsFixupMarginsOutside then FixupMarginsOutside; - end; - if not IsFixupMarginsOutside then - begin - Result := ValidateMargins(AControl); - if not Result then - begin - Beep; - Result := True; - case MarginsMessageDlg(cxGetResourceString(@sdxInvalidMarginsMessage)) of - mrYes: - FixupMargins; - mrNo: - RestoreOriginalMargins; - end; - end; - end; - end; -end; - -procedure TdxfmPageSetupDialog.SaveMargins; -begin - Page.BeginUpdate; - try - Page.Header := Round(FseMarginHeader.Value * 1000); - Page.Footer := Round(FseMarginFooter.Value * 1000); - Page.Margins.Left := Round(FseMarginLeft.Value * 1000); - Page.Margins.Top := Round(FseMarginTop.Value * 1000); - Page.Margins.Right := Round(FseMarginRight.Value * 1000); - Page.Margins.Bottom := Round(FseMarginBottom.Value * 1000); - finally - Page.EndUpdate; - end; -end; - -procedure TdxfmPageSetupDialog.SaveStyleCaption; -begin - if not edStyleName.ReadOnly then - PrintStyle.StyleCaption := edStyleName.Text; -end; - -procedure TdxfmPageSetupDialog.SaveUserInput; -begin - SaveStyleCaption; - SaveMargins; -end; - -function TdxfmPageSetupDialog.ValidateMarginsOutside(out AInvalidMarginControl: TWinControl): Boolean; -var - MinX, MinY: Extended; -begin - if dxInitPrintDevice(False) then - begin - MinX := dxPrintDevice.PhysOffsetX / GetDeviceCaps(dxPrintDevice.Handle, LOGPIXELSX); - MinY := dxPrintDevice.PhysOffsetY / GetDeviceCaps(dxPrintDevice.Handle, LOGPIXELSX); - case Page.GetInnerMeasurementUnits of - muInches: ; - muMillimeters: - begin - MinX := 25.4 * MinX; - MinY := 25.4 * MinY; - end; - end; - end - else - begin - MinX := 0; - MinY := 0; - end; - Result := FseMarginHeader.Value >= MinY; - if Result then - Result := FseMarginFooter.Value >= MinY - else - begin - AInvalidMarginControl := FseMarginHeader; - Exit; - end; - if Result then - Result := FseMarginLeft.Value >= MinX - else - begin - AInvalidMarginControl := FseMarginFooter; - Exit; - end; - if Result then - Result := FseMarginRight.Value >= MinX - else - begin - AInvalidMarginControl := FseMarginLeft; - Exit; - end; - - if Result then - AInvalidMarginControl := nil - else - AInvalidMarginControl := FseMarginRight; -end; - -function TdxfmPageSetupDialog.ValidateMargins(out AInvalidMarginControl: TWinControl): Boolean; - - function EqualOrGreaterThen(const AValue1, AValue2: Extended): Boolean; - const - Eps = 0.00001; - begin - Result := (AValue1 > AValue2) or (Abs(AValue1 - AValue2) < Eps); - end; - - function EqualOrLessThen(const AValue1, AValue2: Extended): Boolean; - const - Eps = 0.00001; - begin - Result := (AValue1 < AValue2) or (Abs(AValue1 - AValue2) < Eps); - end; - -var - Min, Max, APageSizeX, APageSizeY, AMinPrintableArea: Extended; -begin - with Page do - begin - APageSizeX := RealPageSize.X / 1000; - APageSizeY := RealPageSize.Y / 1000; - AMinPrintableArea := MinPrintableArea / 1000; - {header} - Min := 0; - Max := APageSizeY - AMinPrintableArea; - Result := EqualOrGreaterThen(FseMarginHeader.Value, Min) and EqualOrLessThen(FseMarginHeader.Value, Max); - if Result then - begin - {footer} - Min := 0; - Max := APageSizeY - AMinPrintableArea - FseMarginHeader.Value; - Result := EqualOrGreaterThen(FseMarginFooter.Value, Min) and EqualOrLessThen(FseMarginFooter.Value, Max); - end - else - begin - AInvalidMarginControl := FseMarginHeader; - Exit; - end; - {top} - if Result then - begin - Min := FseMarginHeader.Value; - Max := APageSizeY - AMinPrintableArea - FseMarginBottom.Value; - Result := EqualOrGreaterThen(FseMarginTop.Value, Min) and EqualOrLessThen(FseMarginTop.Value, Max); - end - else - begin - AInvalidMarginControl := FseMarginFooter; - Exit; - end; - if Result then - begin {bottom} - Min := FseMarginFooter.Value; - Max := APageSizeY - AMinPrintableArea - FseMarginTop.Value; - Result := EqualOrGreaterThen(FseMarginBottom.Value, Min) and EqualOrLessThen(FseMarginBottom.Value, Max); - end - else - begin - AInvalidMarginControl := FseMarginTop; - Exit; - end; - if Result then - begin {left} - Min := 0; - Max := APageSizeX - AMinPrintableArea; - Result := EqualOrGreaterThen(FseMarginLeft.Value, Min) and EqualOrLessThen(FseMarginLeft.Value, Max); - end - else - begin - AInvalidMarginControl := FseMarginBottom; - Exit; - end; - if Result then - begin {right} - Min := 0; - Max := APageSizeX - AMinPrintableArea - FseMarginLeft.Value; - Result := EqualOrGreaterThen(FseMarginRight.Value, Min) and EqualOrLessThen(FseMarginRight.Value, Max); - end - else - begin - AInvalidMarginControl := FseMarginLeft; - Exit; - end; - end; - if Result then - AInvalidMarginControl := nil - else - AInvalidMarginControl := FseMarginRight; -end; - -procedure TdxfmPageSetupDialog.UpdatePreviewMargin(const AValue: Extended; - AMargin: TdxPreviewPageMargin); -var - V: Integer; -begin - V := Round(AValue * 1000); - case Page.GetInnerMeasurementUnits of - muInches: - V := MulDiv(V, 254, 1000); - muMillimeters: - V := V div 100; - end; - AMargin.Value := V; -end; - -procedure TdxfmPageSetupDialog.UpdatePreviewMargins; -begin - UpdatePreviewMargin(FseMarginHeader.Value, FPreview.Margins.Header); - UpdatePreviewMargin(FseMarginTop.Value, FPreview.Margins.Top); - UpdatePreviewMargin(FseMarginFooter.Value, FPreview.Margins.Footer); - UpdatePreviewMargin(FseMarginBottom.Value, FPreview.Margins.Bottom); - UpdatePreviewMargin(FseMarginLeft.Value, FPreview.Margins.Left); - UpdatePreviewMargin(FseMarginRight.Value, FPreview.Margins.Right); -end; - -procedure TdxfmPageSetupDialog.UpdateWarningPane(AValue, APairValue: Boolean; - const AHint, APairHint: string); -begin - if AValue then - FwpMargins.SetStateAndHint(AValue, AHint) - else - if APairValue then - FwpMargins.SetStateAndHint(APairValue, APairHint) - else - FwpMargins.State := False; -end; - -procedure TdxfmPageSetupDialog.FixupMarginsOutside; - - function SetSpinEditValidValue(AEdit: TdxPSSpinEdit; - var AValue: Integer; const ADenominator: Integer): Boolean; - begin - Result := False; - while AEdit.Value < AValue / ADenominator do - begin - Inc(AValue); - AEdit.Value := AValue / ADenominator; - Result := True; - end; - end; - -var - AMinLeft, AMinRight, AMinTop, AMinBottom: Integer; -begin - Page.GetRealMinMargins(AMinLeft, AMinRight, AMinTop, AMinBottom); - FMarginsChanging := True; - try - if SetSpinEditValidValue(FseMarginTop, AMinTop, 1000) then - UpdatePreviewMargin(AMinTop / 1000, FPreview.Margins.Top); - if SetSpinEditValidValue(FseMarginHeader, AMinTop, 1000) then - UpdatePreviewMargin(AMinTop / 1000, FPreview.Margins.Header); - if SetSpinEditValidValue(FseMarginBottom, AMinBottom, 1000) then - UpdatePreviewMargin(AMinBottom / 1000, FPreview.Margins.Bottom); - if SetSpinEditValidValue(FseMarginFooter, AMinBottom, 1000) then - UpdatePreviewMargin(AMinBottom / 1000, FPreview.Margins.Footer); - if SetSpinEditValidValue(FseMarginLeft, AMinLeft, 1000) then - UpdatePreviewMargin(AMinLeft / 1000, FPreview.Margins.Left); - if SetSpinEditValidValue(FseMarginRight, AMinRight, 1000) then - UpdatePreviewMargin(AMinRight / 1000, FPreview.Margins.Right); - finally - FMarginsChanging := False; - end; - MarginsOutside := False; - MarginsInvalid := False; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.FixupMargins; - - function MinMax(const Value, Min, Max: Double): Double; - begin - if Value < Min then - Result := Min - else if Value > Max then - Result := Max - else - Result := Value; - end; - -var - V: Double; - AMinLeft, AMinRight, AMinTop, AMinBottom: Integer; -begin - Page.GetRealMinMargins(AMinLeft, AMinRight, AMinTop, AMinBottom); - FMarginsChanging := True; - try - V := (Page.RealPageSize.Y - Page.MinPrintableArea - AMinBottom) / 1000; - FseMarginHeader.Value := MinMax(FseMarginHeader.Value, AMinTop / 1000, V); - V := (Page.RealPageSize.Y - Page.MinPrintableArea - 1000 * FseMarginHeader.Value) / 1000; - FseMarginFooter.Value := MinMax(FseMarginFooter.Value, AMinBottom / 1000, V); - V := (Page.RealPageSize.Y - Page.MinPrintableArea - 1000 * FseMarginFooter.Value) / 1000; - FseMarginTop.Value := MinMax(FseMarginTop.Value, FseMarginHeader.Value, V); - V := (Page.RealPageSize.Y - Page.MinPrintableArea - 1000 * FseMarginTop.Value) / 1000; - FseMarginBottom.Value := MinMax(FseMarginBottom.Value, FseMarginFooter.Value, V); - - V := (Page.RealPageSize.X - Page.MinPrintableArea - AMinRight) / 1000; - FseMarginLeft.Value := MinMax(FseMarginLeft.Value, AMinLeft / 1000, V); - V := (Page.RealPageSize.X - Page.MinPrintableArea - 1000 * FseMarginLeft.Value) / 1000; - FseMarginRight.Value := MinMax(FseMarginRight.Value, AMinRight / 1000, V); - - UpdatePreviewMargin(0, FPreview.Margins.Footer); - UpdatePreviewMargin(0, FPreview.Margins.Bottom); - UpdatePreviewMargin(0, FPreview.Margins.Right); - UpdatePreviewMargin(FseMarginTop.Value, FPreview.Margins.Top); - UpdatePreviewMargin(FseMarginHeader.Value, FPreview.Margins.Header); - UpdatePreviewMargin(FseMarginBottom.Value, FPreview.Margins.Bottom); - UpdatePreviewMargin(FseMarginFooter.Value, FPreview.Margins.Footer); - UpdatePreviewMargin(FseMarginLeft.Value, FPreview.Margins.Left); - UpdatePreviewMargin(FseMarginRight.Value, FPreview.Margins.Right); - finally - FMarginsChanging := False; - end; - - MarginsInvalid := False; - CheckModified; -end; - -procedure TdxfmPageSetupDialog.RestoreOriginalMargins; -begin - FMarginsChanging := True; - try - with FSavePrintStyle.PrinterPage do - begin - FseMarginHeader.Value := Footer / 1000; - FPreview.Margins.Header.Value := HeaderLoMetric; - FseMarginFooter.Value := Footer / 1000; - FPreview.Margins.Footer.Value := FooterLoMetric; - FseMarginLeft.Value := Margins.Left / 1000; - FPreview.Margins.Left.Value := MarginsLoMetric.Left; - FseMarginTop.Value := Margins.Top / 1000; - FPreview.Margins.Top.Value := MarginsLoMetric.Top; - FseMarginRight.Value := Margins.Right / 1000; - FPreview.Margins.Right.Value := MarginsLoMetric.Right; - FseMarginBottom.Value := Margins.Bottom / 1000; - FPreview.Margins.Bottom.Value := MarginsLoMetric.Bottom; - end; - finally - FMarginsChanging := False; - end; - MarginsOutside := False; - MarginsInvalid := False; - CheckModified; -end; - -function TdxfmPageSetupDialog.FindControlPageIndex(AControl: TWinControl): Integer; -begin - for Result := 0 to pgctrlMain.PageCount - 1 do - if pgctrlMain.Pages[Result].ContainsControl(AControl) then Exit; - Result := -1; -end; - -procedure TdxfmPageSetupDialog.TrySetActiveControl(AControl: TWinControl); -var - PageIndex: Integer; -begin - PageIndex := FindControlPageIndex(AControl); - if PageIndex = -1 then Exit; - //if pgctrlMain.Pages[PageIndex].CanFocus then - begin - pgctrlMain.ActivePage := pgctrlMain.Pages[PageIndex]; - if AControl.CanFocus then ActiveControl := AControl; - end; -end; - -procedure TdxfmPageSetupDialog.pgctrlMainChanging(Sender: TObject; var AllowChange: Boolean); -var - InvalidMarginControl: TWinControl; -begin - if TPageControl(Sender).ActivePage.PageIndex = 1 then - begin - AllowChange := ValidateMargins(InvalidMarginControl); - if not AllowChange then - begin - Beep; - case MarginsMessageDlg(cxGetResourceString(@sdxInvalidMarginsMessage)) of - mrYes: - FixupMargins; - mrNo: - RestoreOriginalMargins; - end; - ActiveControl := InvalidMarginControl; - end; - end; -end; - -procedure TdxfmPageSetupDialog.btnRestoreOriginalMarginsClick( - Sender: TObject); -begin - RestoreOriginalMargins; -end; - -procedure TdxfmPageSetupDialog.btnFixClick(Sender: TObject); -begin - if MarginsOutside then - FixupMarginsOutside - else - if MarginsInvalid then - FixupMargins; -end; - -procedure TdxfmPageSetupDialog.FormCloseQuery(Sender: TObject; - var CanClose: Boolean); -var - Control: TWinControl; -begin - if FPreview.DraggingMargin <> nil then - CanClose := False - else - if ModalResult = mrOK then - begin - CanClose := ValidateUserInput(Control); - if not CanClose then - begin - FPrintBtnClicked := False; - FPreviewBtnClicked := False; - TrySetActiveControl(Control); - end - else - SaveUserInput; - end; -end; - -procedure TdxfmPageSetupDialog.FormClose(Sender: TObject; - var Action: TCloseAction); -begin - if (ModalResult = mrOK) and (ActiveControl is TdxPSSpinEdit) then - TdxPSSpinEdit(ActiveControl).Perform(CM_EXIT, 0, 0); -end; - -procedure TdxfmPageSetupDialog.CMSysColorChange(var Message: TMessage); -begin - inherited; - if pgctrlMain.ActivePage = tshMargins then FPreview.Invalidate; -end; - -{ TdxPrintStylePrinterPage } - -function TdxPrintStylePrinterPage.GetOwner: TPersistent; -begin - Result := PrintStyle; -end; - -function TdxPrintStylePrinterPage.IsPageFooterTitleStored(Index: Integer): Boolean; -var - Part: TdxPageTitlePart; -begin - Part := dxPSPageTitlePartMap[Index]; - Result := PageFooter.Titles[Part].Text <> PrintStyle.DefaultPageFooterText(Part); -end; - -function TdxPrintStylePrinterPage.IsPageHeaderTitleStored(Index: Integer): Boolean; -var - Part: TdxPageTitlePart; -begin - Part := dxPSPageTitlePartMap[Index]; - Result := PageHeader.Titles[Part].Text <> PrintStyle.DefaultPageHeaderText(Part); -end; - -procedure TdxPrintStylePrinterPage.PageParamsChanged(AUpdateCodes: TdxPrinterPageUpdateCodes); -begin - inherited; - if (UpdateCount = 0) and PrintStyle.IsCurrentStyle then - PrintStyle.PageParamsChanged(AUpdateCodes); -end; - -{ TBasedxPrintStyle } - -constructor TBasedxPrintStyle.Create(AOwner: TComponent); -begin - inherited; - FAllowChangeHFText := True; - FAllowChangeMargins := True; - FAllowChangeOrientation := True; - FAllowChangePaper := True; - FAllowChangeScale := True; - FAllowCustomPaperSizes := True; - FImageIndex := -1; - FBuiltIn := IsDesigning; - - FPrinterPage := CreatePrinterPage; - - FStyleGlyph := TBitmap.Create; - FStyleGlyph.OnChange := StyleGlyphChanged; -end; - -destructor TBasedxPrintStyle.Destroy; -begin - try - if (StyleManager <> nil) and StyleManager.AllowAutoSave then - try - StyleManager.SaveToFile(StyleManager.StorageName); - finally - StyleManager.FAlreadySaved := True; - end; - finally - {$IFNDEF DELPHI5} - Destroying; - {$ENDIF} - StyleManager := nil; - FreeAndNil(FPrinterPage); - FreeAndNil(FStyleGlyph); - FreeAndNil(FDefaultStyleGlyph); - inherited; - end; -end; - -procedure TBasedxPrintStyle.BeforeDestruction; -begin - DoDestroy; - inherited; -end; - -procedure TBasedxPrintStyle.Assign(Source: TPersistent); -begin - if Source is TBasedxPrintStyle then - with TBasedxPrintStyle(Source) do - begin - Self.AllowChangeHFText := AllowChangeHFText; - Self.AllowChangeMargins := AllowChangeMargins; - Self.AllowChangeOrientation := AllowChangeOrientation; - Self.AllowChangePaper := AllowChangePaper; - Self.AllowChangeScale := AllowChangeScale; - Self.AllowCustomPaperSizes := AllowCustomPaperSizes; - Self.Description := Description; - Self.ImageIndex := ImageIndex; - Self.PrinterPage := PrinterPage; - Self.StyleGlyph := StyleGlyph; - Self.StyleCaption := StyleCaption; - - Self.FIsDescriptionAssigned := FIsDescriptionAssigned; - Self.FIsStyleCaptionAssigned := FIsStyleCaptionAssigned; - Self.FIsStyleGlyphAssigned := FIsStyleGlyphAssigned; - end - else - inherited; -end; - -function TBasedxPrintStyle.GetParentComponent: TComponent; -begin - Result := StyleManager; -end; - -function TBasedxPrintStyle.HasParent: Boolean; -begin - Result := StyleManager <> nil; -end; - -procedure TBasedxPrintStyle.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('BuiltInStyle', ReadData, WriteData, True); - Filer.DefineProperty('IsDescriptonAssigned', ReadIsDescriptionAssigned, WriteIsDescriptionAssigned, - FIsDescriptionAssigned and (Description = '')); - Filer.DefineProperty('IsStyleCaptionAssigned', ReadIsStyleCaptionAssigned, WriteIsStyleCaptionAssigned, - FIsStyleCaptionAssigned and (StyleCaption = '')); - Filer.DefineProperty('IsStyleGlyphAssigned', ReadIsStyleGlyphAssigned, WriteIsStyleGlyphAssigned, - FIsStyleGlyphAssigned and StyleGlyph.Empty); -end; - -procedure TBasedxPrintStyle.ReadState(Reader: TReader); -begin - inherited; - if Reader.Parent is TdxPrintStyleManager then - StyleManager := Reader.Parent as TdxPrintStyleManager; -end; - -procedure TBasedxPrintStyle.SetName(const NewName: TComponentName); -begin - inherited; - DesignerUpdate(False); -end; - -procedure TBasedxPrintStyle.SetParentComponent(AParent: TComponent); -begin - inherited; - if not IsLoading then - StyleManager := AParent as TdxPrintStyleManager; -end; - -class function TBasedxPrintStyle.StyleClass: TdxPrintStyleClass; -begin - Result := TdxPrintStyleClass(GetTypeData(ClassInfo)^.ClassType); -end; - -function TBasedxPrintStyle.DefaultDescription: string; -begin - Result := ''; -end; - -function TBasedxPrintStyle.DefaultPageFooterText(APart: TdxPageTitlePart): string; -begin - Result := ''; -end; - -function TBasedxPrintStyle.DefaultPageHeaderText(APart: TdxPageTitlePart): string; -begin - Result := ''; -end; - -function TBasedxPrintStyle.DefaultStyleCaption: string; -begin - Result := cxGetResourceString(@sdxBaseStyle); -end; - -function TBasedxPrintStyle.DefaultStyleGlyph: TBitmap; -begin - if FDefaultStyleGlyph = nil then - begin - FDefaultStyleGlyph := TBitmap.Create; - InitializeDefaultStyleGlyph(FDefaultStyleGlyph); - end; - Result := FDefaultStyleGlyph; -end; - -procedure TBasedxPrintStyle.AfterPrinting; -begin - DoAfterPrinting; -end; - -procedure TBasedxPrintStyle.BeforePrinting; -begin - DoBeforePrinting; -end; - -procedure TBasedxPrintStyle.GetFilteredPapers(AStrings: TStrings); -var - Papers: TStrings; - I: Integer; - Paper: TdxPaperInfo; -begin - if AStrings = nil then Exit; - - AStrings.BeginUpdate; - try - Papers := dxPrintDevice.Papers; - if Papers = nil then Exit; - - for I := 0 to Papers.Count - 1 do - begin - Paper := TdxPaperInfo(Papers.Objects[I]); - if IsSupportedPaper(Paper) then - AStrings.AddObject(Paper.Name, Paper); - if Paper.DMPaper = DMPAPER_USER then - begin - Paper.Width := PrinterPage.PageSizeLoMetric.X; - Paper.Height := PrinterPage.PageSizeLoMetric.Y; - end; - end; - finally - AStrings.EndUpdate; - end; -end; - -function TBasedxPrintStyle.PageSetup: Boolean; -var - PreviewBtnClicked, PrintBtnClicked: Boolean; -begin - Result := PageSetup(0, False, False, PreviewBtnClicked, PrintBtnClicked); -end; - -function TBasedxPrintStyle.PageSetup(AnActivePageIndex: Integer; AShowPreviewBtn, AShowPrintBtn: Boolean; - out APreviewBtnClicked, APrintBtnClicked: Boolean): Boolean; - - function GetDialog(out ANewCreated: Boolean): TdxPageSetupDialog; - begin - if StyleManager <> nil then - Result := StyleManager.PageSetupDialog - else - Result := nil; - ANewCreated := Result = nil; - if ANewCreated then - Result := TdxPageSetupDialog.Create(nil); - end; - -var - Dialog: TdxPageSetupDialog; - NewCreated: Boolean; - PrevStyle: TBasedxPrintStyle; -begin - Dialog := GetDialog(NewCreated); - try - PrevStyle := Dialog.PrintStyle; - Dialog.PrintStyle := Self; - Dialog.ActivePageIndex := AnActivePageIndex; - - if not AShowPreviewBtn then - Dialog.ButtonsVisible := Dialog.ButtonsVisible - [psbPreview]; - - if not AShowPrintBtn then - Dialog.ButtonsVisible := Dialog.ButtonsVisible - [psbPrint]; - - if StyleManager = nil then - Dialog.OptionsVisible := Dialog.OptionsVisible - [psoStyleCaption]; - - Result := Dialog.Execute; - Dialog.PrintStyle := PrevStyle; - - APreviewBtnClicked := AShowPreviewBtn and Dialog.PreviewBtnClicked; - APrintBtnClicked := AShowPrintBtn and Dialog.PrintBtnClicked; - finally - if NewCreated then Dialog.Free; - end; -end; - -function TBasedxPrintStyle.PageSetup(AnActivePageIndex: Integer; - APreviewBtnClicked, APrintBtnClicked: PBoolean): Boolean; -var - ShowPreviewBtn, ShowPrintBtn: Boolean; - PreviewBtnClicked, PrintBtnClicked: Boolean; -begin - ShowPreviewBtn := APreviewBtnClicked <> nil; - ShowPrintBtn := APrintBtnClicked <> nil; - Result := PageSetup(0, ShowPreviewBtn, ShowPrintBtn, PreviewBtnClicked, PrintBtnClicked); - - if ShowPreviewBtn then - APreviewBtnClicked^ := PreviewBtnClicked; - - if ShowPrintBtn then - APrintBtnClicked^ := PrintBtnClicked; -end; - -function TBasedxPrintStyle.PageSetupEx(AnActivePageIndex: Integer; - APreviewBtnClicked, APrintBtnClicked: PBoolean): Boolean; -var - ShowPreviewBtn, ShowPrintBtn: Boolean; - PreviewBtnClicked, PrintBtnClicked: Boolean; -begin - ShowPreviewBtn := APreviewBtnClicked <> nil; - ShowPrintBtn := APrintBtnClicked <> nil; - Result := PageSetup(0, ShowPreviewBtn, ShowPrintBtn, PreviewBtnClicked, PrintBtnClicked); - - if ShowPreviewBtn then - APreviewBtnClicked^ := PreviewBtnClicked; - - if ShowPrintBtn then - APrintBtnClicked^ := PrintBtnClicked; -end; - -function TBasedxPrintStyle.SetupOptions: Boolean; -begin - Result := False; -end; - -procedure TBasedxPrintStyle.RestoreDefaultGlyph; -begin - FIsStyleGlyphAssigned := False; - DesignerModified; - DesignerUpdate(False); -end; - -procedure TBasedxPrintStyle.RestoreDefaults; -begin - AllowChangeHFText := True; - AllowChangeMargins := True; - AllowChangeOrientation := True; - AllowChangePaper := True; - AllowChangeScale := True; - AllowCustomPaperSizes := True; - PrinterPage.RestoreDefaults; - - FIsDescriptionAssigned := False; - FIsStyleCaptionAssigned := False; - FIsStyleGlyphAssigned := False; -end; - -function TBasedxPrintStyle.GetAllowChangeHFText: Boolean; -begin - Result := FAllowChangeHFText; -end; - -function TBasedxPrintStyle.GetAllowChangeMargins: Boolean; -begin - Result := FAllowChangeMargins; -end; - -function TBasedxPrintStyle.GetAllowChangePaper: Boolean; -begin - Result := FAllowChangePaper; -end; - -function TBasedxPrintStyle.GetAllowChangeScale: Boolean; -begin - Result := FAllowChangeScale; -end; - -procedure TBasedxPrintStyle.SetAllowChangeHFText(Value: Boolean); -begin - FAllowChangeHFText := Value; -end; - -function TBasedxPrintStyle.GetAllowChangeOrientation: Boolean; -begin - Result := FAllowChangeOrientation; -end; - -function TBasedxPrintStyle.GetAllowCustomPaperSizes: Boolean; -begin - Result := FAllowCustomPaperSizes; -end; - -procedure TBasedxPrintStyle.SetAllowChangeMargins(Value: Boolean); -begin - FAllowChangeMargins := Value; -end; - -procedure TBasedxPrintStyle.SetAllowChangeOrientation(Value: Boolean); -begin - FAllowChangeOrientation := Value; -end; - -procedure TBasedxPrintStyle.SetAllowChangePaper(Value: Boolean); -begin - FAllowChangePaper := Value; -end; - -procedure TBasedxPrintStyle.SetAllowChangeScale(Value: Boolean); -begin - FAllowChangeScale := Value; -end; - -procedure TBasedxPrintStyle.SetAllowCustomPaperSizes(Value: Boolean); -begin - FAllowCustomPaperSizes := Value; -end; - -function TBasedxPrintStyle.CreatePrinterPage: TdxPrinterPage; -begin - Result := GetPrinterPageClass.Create; - InitializePrinterPage(Result); -end; - -function TBasedxPrintStyle.GetPrinterPageClass: TdxPrinterPageClass; -begin - Result := TdxPrintStylePrinterPage; -end; - -procedure TBasedxPrintStyle.InitializePrinterPage(APrinterPage: TdxPrinterPage); -begin - TdxPrintStylePrinterPage(APrinterPage).FPrintStyle := Self; -end; - -procedure TBasedxPrintStyle.DoAfterPrinting; -begin -end; - -procedure TBasedxPrintStyle.DoBeforePrinting; -begin -end; - -procedure TBasedxPrintStyle.DoDestroy; -begin - if Assigned(FOnDestroy) then FOnDestroy(Self); -end; - -function TBasedxPrintStyle.IsSupportedPaper(const APaper: TdxPaperInfo): Boolean; -begin - Result := True; - if Assigned(FOnFilterPaper) then - begin - FOnFilterPaper(Self, APaper, Result); - if not Result and (APaper.DMPaper = PrinterPage.DMPaper) then - Result := True; - end; -end; - -procedure TBasedxPrintStyle.PageParamsChanged(AUpdateCodes: TdxPrinterPageUpdateCodes); -begin - if StyleManager <> nil then - StyleManager.PageParamsChanged(Self, AUpdateCodes); -end; - -procedure TBasedxPrintStyle.InitializeDefaultStyleGlyph(ABitmap: TBitmap); -begin -end; - -procedure TBasedxPrintStyle.StyleGlyphChanged(Sender: TObject); -begin - FIsStyleGlyphAssigned := True; - DesignerUpdate(False); -end; - -function TBasedxPrintStyle.GetDescription: string; -begin - if FIsDescriptionAssigned then - Result := FDescription - else - Result := DefaultDescription; -end; - -function TBasedxPrintStyle.GetIndex: Integer; -begin - if StyleManager <> nil then - Result := StyleManager.IndexOfStyle(Self) - else - Result := -1; -end; - -function TBasedxPrintStyle.GetIsCurrentStyle: Boolean; -begin - Result := (StyleManager <> nil) and (StyleManager.CurrentStyle = Self); -end; - -function TBasedxPrintStyle.GetStyleCaption: string; -begin - if FIsStyleCaptionAssigned then - Result := FStyleCaption - else - Result := DefaultStyleCaption; -end; - -function TBasedxPrintStyle.GetStyleGlyph: TBitmap; -begin - if FIsStyleGlyphAssigned or (csLoading in ComponentState) then - Result := FStyleGlyph - else - Result := DefaultStyleGlyph; -end; - -function TBasedxPrintStyle.IsDescriptionStored: Boolean; -begin - Result := FIsDescriptionAssigned and (FDescription <> DefaultDescription); -end; - -function TBasedxPrintStyle.IsStyleCaptionStored: Boolean; -begin - Result := FIsStyleCaptionAssigned and (FStyleCaption <> DefaultStyleCaption); -end; - -function TBasedxPrintStyle.IsStyleGlyphStored: Boolean; -begin - Result := FIsStyleGlyphAssigned and not dxPSUtl.dxAreGraphicsEqual(FStyleGlyph, DefaultStyleGlyph); -end; - -procedure TBasedxPrintStyle.SetBuiltIn(Value: Boolean); -begin - FBuiltIn := Value; -end; - -procedure TBasedxPrintStyle.SetDescription(const Value: string); -begin - if Description <> Value then - begin - FDescription := Value; - FIsDescriptionAssigned := True; - end; -end; - -procedure TBasedxPrintStyle.SetImageIndex(Value: Integer); -begin - if FImageIndex <> Value then - begin - FImageIndex := Value; - if (StyleManager <> nil) and (StyleManager.Images <> nil) then - DesignerUpdate(False); - end; -end; - -procedure TBasedxPrintStyle.SetIndex(Value: Integer); -var - CurIndex: Integer; -begin - if FStyleManager = nil then Exit; - if Value < 0 then Value := 0; - if Value > StyleManager.Count - 1 then - Value := StyleManager.Count - 1; - CurIndex := GetIndex; - if CurIndex <> Value then - StyleManager.MoveStyle(CurIndex, Value); -end; - -procedure TBasedxPrintStyle.SetIsCurrentStyle(Value: Boolean); -begin - if Value then - if not (csReading in ComponentState) and (StyleManager <> nil) then - StyleManager.CurrentStyle := Self; -end; - -procedure TBasedxPrintStyle.SetPrinterPage(Value: TdxPrinterPage); -begin - PrinterPage.Assign(Value); -end; - -procedure TBasedxPrintStyle.SetStyleCaption(const Value: string); -begin - if StyleCaption <> Value then - begin - FStyleCaption := Value; - FIsStyleCaptionAssigned := True; - end; -end; - -procedure TBasedxPrintStyle.SetStyleGlyph(Value: TBitmap); -begin - FStyleGlyph.Assign(Value); -end; - -procedure TBasedxPrintStyle.SetStyleManager(Value: TdxPrintStyleManager); -begin - if FStyleManager <> Value then - begin - if FStyleManager <> nil then - FStyleManager.RemoveStyle(Self); - if Value <> nil then - Value.InsertStyle(Self); - end; -end; - -procedure TBasedxPrintStyle.DesignerModified; -begin - if StyleManager <> nil then StyleManager.DesignerModified; -end; - -procedure TBasedxPrintStyle.DesignerUpdate(TheAll: Boolean); -begin - if StyleManager <> nil then - if TheAll then - StyleManager.DesignerUpdate(nil) - else - StyleManager.DesignerUpdate(Self); -end; - -function TBasedxPrintStyle.IsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -function TBasedxPrintStyle.IsLoading: Boolean; -begin - Result := csLoading in ComponentState; -end; - -procedure TBasedxPrintStyle.ReadData(Reader: TReader); -begin - FBuiltIn := Reader.ReadBoolean; -end; - -procedure TBasedxPrintStyle.ReadIsDescriptionAssigned(Reader: TReader); -begin - FIsDescriptionAssigned := Reader.ReadBoolean; -end; - -procedure TBasedxPrintStyle.ReadIsStyleCaptionAssigned(Reader: TReader); -begin - FIsStyleCaptionAssigned := Reader.ReadBoolean; -end; - -procedure TBasedxPrintStyle.ReadIsStyleGlyphAssigned(Reader: TReader); -begin - FIsStyleGlyphAssigned := Reader.ReadBoolean; -end; - -procedure TBasedxPrintStyle.WriteData(Writer: TWriter); -begin - Writer.WriteBoolean(FBuiltIn); -end; - -procedure TBasedxPrintStyle.WriteIsDescriptionAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsDescriptionAssigned); -end; - -procedure TBasedxPrintStyle.WriteIsStyleCaptionAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsStyleCaptionAssigned); -end; - -procedure TBasedxPrintStyle.WriteIsStyleGlyphAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsStyleGlyphAssigned); -end; - -{ TdxPrintStyleManager } - -constructor TdxPrintStyleManager.Create(AOwner: TComponent); -begin - inherited; - FAutoHFTextEntries := CreateAutoHFTextEntries; - FStyles := TList.Create; - FWindowHandle := dxPSUtl.dxAllocatehWnd(WndProc); -end; - -destructor TdxPrintStyleManager.Destroy; -begin - try - if AllowAutoSave then - try - SaveToFile(StorageName); - finally - FAlreadySaved := True; - end; - finally - {$IFNDEF DELPHI5} - Destroying; - {$ENDIF} - dxPSUtl.dxDeallocateHWnd(FWindowHandle); - - FreeAndNil(FDesigner); - FreeAndNilStyles; - if not IsDesigning and (RegistryPath <> '') then - SaveToRegistry(RegistryPath); - FreeAndNil(FAutoHFTextEntries); - inherited; - end; -end; - -procedure TdxPrintStyleManager.Assign(Source: TPersistent); -begin - if Source is TdxPrintStyleManager then - with TdxPrintStyleManager(Source) do - begin - Self.AutoHFTextEntries := AutoHFTextEntries; - Self.AssignStyles(TdxPrintStyleManager(Source)); - - Self.FIsCloneStyleCaptionPrefixAssigned := FIsCloneStyleCaptionPrefixAssigned; - Self.FIsTitleAssigned := FIsTitleAssigned; - end - else - inherited; -end; - -procedure TdxPrintStyleManager.Loaded; -begin - inherited; - if not IsDesigning and (RegistryPath <> '') then - LoadFromRegistry(RegistryPath); - - if not FInternalStreaming and not IsDesigning and AutoSave then - LoadFromFile(StorageName); -end; - -procedure TdxPrintStyleManager.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited; - if Operation = opRemove then - begin - if AComponent = Images then Images := nil; - if AComponent = PageSetupDialog then PageSetupDialog := nil; - end; -end; - -procedure TdxPrintStyleManager.ReadState(Reader: TReader); -begin - if FInternalStreaming then - Reader.OnSetName := SetNameHandler; - try - inherited; - finally - if FInternalStreaming then - Reader.OnSetName := nil; - end; -end; - -procedure TdxPrintStyleManager.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('IsTitleAssigned', ReadIsTitleAssigned, WriteIsTitleAssigned, - FIsTitleAssigned and (Title = '')); - Filer.DefineProperty('IsCloneStyleCaptionPrefixAssigned', - ReadIsCloneStyleCaptionPrefixAssigned, WriteIsCloneStyleCaptionPrefixAssigned, - FIsCloneStyleCaptionPrefixAssigned and (CloneStyleCaptionPrefix = '')); -end; - -procedure TdxPrintStyleManager.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - I: Integer; - Style: TBasedxPrintStyle; -begin - for I := 0 to Count - 1 do - begin - Style := Styles[I]; - if (Root = Style.Owner) or (FInternalStreaming and (Root = Style.StyleManager)) then - Proc(Style); - end; -end; - -procedure TdxPrintStyleManager.SetChildOrder(Child: TComponent; Order: Integer); -begin - inherited; - if FStyles.IndexOf(Child) > -1 then - (Child as TBasedxPrintStyle).Index := Order; -end; - -procedure TdxPrintStyleManager.AutoHFTextEntriesChanged(Sender: TObject); -var - Event: TdxEvent; -begin - Event := TdxHFTextEntriesChangedEvent.Create(Self); - dxPSProcessEvent(Event); -end; - -procedure TdxPrintStyleManager.OnAutoHFTextEntryClick(Sender: TObject); -var - S: string; - Event: TdxEvent; -begin - try - S := AutoHFTextEntries[dxPSAutoHFTextMenuBuilderFactory.ActiveBuilder.ExtractAutoHFTextEntryIndexFromObj(Sender)]; - Event := TdxHFTextEntryChooseEvent.Create(Self, S); - dxPSProcessEvent(Event); - except - Application.HandleException(Self); - end; -end; - -procedure TdxPrintStyleManager.OnEditAutoHFTextEntriesClick(Sender: TObject); -begin - ShowAutoHFTextEntriesDlg; -end; - -procedure TdxPrintStyleManager.WndProc(var Message: TMessage); -var - I: Integer; -begin - with Message do - begin - case Msg of - WM_SETTINGCHANGE: - // if (PChar(message.lParam) = 'devices') then - begin - RereadDefaultPrinterPage; - for I := 0 to Count - 1 do - TdxPrintStylePrinterPage(Styles[I].PrinterPage).SynchronizeMeasurementUnits; - DesignerModified; - end; - - WMPS_PRINTSTYLELISTCHANGED: - begin - StyleListChanged; - ChangeCurrentStyle; - end; - end; - Result := DefWindowProc(FWindowHandle, Msg, WParam, LParam); - end; -end; - -procedure TdxPrintStyleManager.SetNameHandler(Reader: TReader; Component: TComponent; - var Name: string); -begin - if (Component is TBasedxPrintStyle) and (StyleByName(Name) <> nil) then - begin - if FLoadedExistingStyles = nil then - FLoadedExistingStyles := TStringList.Create; - FLoadedExistingStyles.AddObject(Name, Component); - Name := ''; - end; -end; - -procedure TdxPrintStyleManager.ReadIsCloneStyleCaptionPrefixAssigned(Reader: TReader); -begin - FIsCloneStyleCaptionPrefixAssigned := Reader.ReadBoolean; -end; - -procedure TdxPrintStyleManager.ReadIsTitleAssigned(Reader: TReader); -begin - FIsTitleAssigned := Reader.ReadBoolean; -end; - -procedure TdxPrintStyleManager.WriteIsCloneStyleCaptionPrefixAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsCloneStyleCaptionPrefixAssigned); -end; - -procedure TdxPrintStyleManager.WriteIsTitleAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsTitleAssigned); -end; - -function TdxPrintStyleManager.IsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -function TdxPrintStyleManager.IsDestroying: Boolean; -begin - Result := csDestroying in ComponentState; -end; - -function TdxPrintStyleManager.IsLoading: Boolean; -begin - Result := csLoading in ComponentState; -end; - -function TdxPrintStyleManager.AllowAutoSave: Boolean; -begin - Result := AutoSave and not IsDesigning and IsDestroying and not FAlreadySaved; -end; - -procedure TdxPrintStyleManager.DesignerUpdate(AStyle: TBasedxPrintStyle); -begin - if IsDesigning and (Designer <> nil) then - Designer.Update(AStyle); -end; - -procedure TdxPrintStyleManager.DesignerModified; -begin - if IsDesigning and (Designer <> nil) then - Designer.Modified; -end; - -procedure TdxPrintStyleManager.SetName(const NewName: TComponentName); -var - OldName, ItemName, AName: string; - P, I: Integer; -begin - OldName := Name; - inherited SetName(NewName); - if IsDesigning and (Count > 0) then - try - if Designer <> nil then Designer.BeginUpdate; - try - for I := 0 to Count - 1 do - begin - ItemName := Styles[I].Name; - P := Pos(OldName, ItemName); - if P = 0 then - AName := Name + ItemName - else - AName := Copy(ItemName, 1, P - 1) + Name + - Copy(ItemName, P + Length(OldName), Length(ItemName) - P - Length(OldName) + 1); - Styles[I].Name := AName; - end; - finally - if Designer <> nil then Designer.EndUpdate; - end; - except - on EComponentError do ; {Ignore rename errors } - end; -end; - -procedure TdxPrintStyleManager.SetPageSetupDialog(Value: TdxPageSetupDialog); -begin - if FPageSetupDialog <> Value then - begin - FPageSetupDialog := Value; - if Value <> nil then Value.FreeNotification(Self); - end; -end; - -function TdxPrintStyleManager.GetStyle(Index: Integer): TBasedxPrintStyle; -begin - Result := TBasedxPrintStyle(FStyles[Index]); -end; - -function TdxPrintStyleManager.GetTitle: string; -begin - if FIsTitleAssigned then - Result := FTitle - else - Result := DefaultTitle; -end; - -function TdxPrintStyleManager.IsAutoHFTextEntriesStored: Boolean; -begin - Result := not AutoHFTextEntries.Equals(DefaultAutoHFTextEntries); -end; - -function TdxPrintStyleManager.IsCloneStyleCaptionPrefixStored: Boolean; -begin - Result := FIsCloneStyleCaptionPrefixAssigned and (FCloneStyleCaptionPrefix <> DefaultCloneStyleCaptionPrefix); -end; - -function TdxPrintStyleManager.IsTitleStored: Boolean; -begin - Result := FIsTitleAssigned and (FTitle <> DefaultTitle); -end; - -procedure TdxPrintStyleManager.SetStyle(Index: Integer; Value: TBasedxPrintStyle); -begin - Styles[Index].Assign(Value); -end; - -procedure TdxPrintStyleManager.SetTitle(const Value: string); -begin - if Title <> Value then - begin - FTitle := Value; - FIsTitleAssigned := True; - end; -end; - -procedure TdxPrintStyleManager.SetImages(Value: TImageList); -begin - if FImages <> Value then - begin - FImages := Value; - if FImages <> nil then - FImages.FreeNotification(Self); - DesignerUpdate(nil); - end; -end; - -procedure TdxPrintStyleManager.AssignStyles(Source: TdxPrintStyleManager); -var - I: Integer; - Style: TBasedxPrintStyle; -begin - BeginUpdate; - try - Clear; - Images := Source.Images; - for I := 0 to Source.Count - 1 do - begin - Style := Source[I]; - AddStyle(Style.StyleClass).Assign(Style); - end; - finally - EndUpdate; - end; -end; - -function TdxPrintStyleManager.IndexOfStyle(Value: TBasedxPrintStyle): Integer; -begin - Result := FStyles.IndexOf(Value); -end; - -function TdxPrintStyleManager.StyleByCaption(const ACaption: string): TBasedxPrintStyle; -var - I: Integer; -begin - for I := 0 to Count - 1 do - if dxSameText(ACaption, Styles[I].StyleCaption) then - begin - Result := Styles[I]; - Exit; - end; - Result := nil; -end; - -function TdxPrintStyleManager.StyleByName(const AName: string): TBasedxPrintStyle; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Styles[I]; - if CompareText(AName, Result.Name) = 0 then Exit; - end; - Result := nil; -end; - -procedure TdxPrintStyleManager.Delete(Index: Integer); -var - Style: TBasedxPrintStyle; -begin - if (Index > -1) and (Index < Count) then - begin - Style := Styles[Index]; - Style.Free; - end; -end; - -procedure TdxPrintStyleManager.Clear; -begin - BeginUpdate; - try - while Count > 0 do Delete(Count - 1); - finally - EndUpdate; - end; -end; - -function TdxPrintStyleManager.NonBuiltInsExists: Boolean; -var - I: Integer; -begin - Result := True; - for I := 0 to Count - 1 do - if not Styles[I].BuiltIn then Exit; - Result := False; -end; - -procedure TdxPrintStyleManager.DeleteNonBuiltIns; -var - I: Integer; -begin - BeginUpdate; - try - for I := Count - 1 downto 0 do - if not Styles[I].BuiltIn then Delete(I); - finally - EndUpdate; - end; -end; - -function TdxPrintStyleManager.BeginClone(AIndex: Integer): TBasedxPrintStyle; -var - StyleClass: TdxPrintStyleClass; -begin - Result := nil; - if (AIndex < -1) or (AIndex > Count - 1) then Exit; - if AIndex = -1 then - StyleClass := dxDefaultPrintStyleClass - else - StyleClass := Styles[AIndex].StyleClass; - if StyleClass = nil then Exit; - BeginUpdate; - Result := AddStyle(StyleClass); - Result.Index := AIndex + 1; - Include(Result.FState, pssCopy); - if AIndex > -1 then - begin - Result.Assign(Styles[AIndex]); - SetNewStyleCaption(Result, AIndex); - end; -end; - -procedure TdxPrintStyleManager.EndClone(AStyle: TBasedxPrintStyle); -begin -// CurrentStyle := AStyle; - if IsDesigning then - AStyle.Name := dxPSPrintStyleUniqueName(Self, AStyle); - EndUpdate; - Exclude(AStyle.FState, pssCopy); -end; - -procedure TdxPrintStyleManager.SetNewStyleCaption(AStyle: TBasedxPrintStyle; - AIndex: Integer); - - function CheckName(const Source: string): Boolean; - var - I: Integer; - begin - for I := 0 to Count - 1 do - if Styles[I] <> AStyle then - begin - Result := not dxSameStr(Source, Styles[I].StyleCaption); - if not Result then Exit; - end; - Result := True; - end; - -const - MaskCount = 4; - Mask: array[0..MaskCount - 1] of string = ('(%d) ', '(%d)', '%d ', '%d'); -var - S, S2: string; - OkName: Boolean; - I, K: Integer; -begin - OkName := False; - if not OkName then - begin - S := CloneStyleCaptionPrefix + Styles[AIndex].StyleCaption; - for K := 0 to MaskCount - 1 do - begin - I := Pos(Mask[K], S); - if I > 0 then - begin - System.Delete(S, I, Length(Mask[K])); - Break; - end; - end; - if Length(S) > dxMaxStyleCaption then SetLength(S, dxMaxStyleCaption); - OkName := CheckName(S); - if not OkName then - begin - S2 := CloneStyleCaptionPrefix + Styles[AIndex].StyleCaption; - if (Length(S2) > dxMaxStyleCaption) then SetLength(S2, dxMaxStyleCaption); - I := 2; - while not OkName and (I < MaxInt) do - begin - try - S := Format(S2, [I]); - except - S := S2; - end; - if Length(S) > dxMaxStyleCaption then - SetLength(S, dxMaxStyleCaption); - if dxSameStr(S, S2) then - begin - AStyle.StyleCaption := S; - Exit; - end; - OkName := CheckName(S); - Inc(I); - end; - end; - end; - if OkName then AStyle.StyleCaption := S; -end; - -function TdxPrintStyleManager.AddStyle(AStyleClass: TdxPrintStyleClass): TBasedxPrintStyle; -begin - Result := AddStyleEx(AStyleClass, Self.Owner); -end; - -function TdxPrintStyleManager.AddStyleEx(AStyleClass: TdxPrintStyleClass; - AOwner: TComponent): TBasedxPrintStyle; -begin - Result := nil; - if AStyleClass = nil then - Exit; - Result := AStyleClass.Create(AOwner); - Result.StyleManager := Self; -end; - -procedure TdxPrintStyleManager.ResyncCurrentStyle(AIndex: Integer); -begin - if AIndex > Count - 1 then - AIndex := Count - 1; - if AIndex < 0 then - begin - FCurrentStyle := nil; - ChangeCurrentStyle; - end - else - CurrentStyle := Styles[AIndex]; -end; -procedure TdxPrintStyleManager.FreeAndNilStyles; -begin - Clear; - FreeAndNil(FStyles); -end; - -procedure TdxPrintStyleManager.InsertStyle(Value: TBasedxPrintStyle); -begin - FStyles.Add(Value); - Value.FStyleManager := Self; - if Count = 1 then - CurrentStyle := Value; - StyleListChanged; -end; - -procedure TdxPrintStyleManager.MoveStyle(ACurIndex, ANewIndex: Integer); -begin - FStyles.Move(ACurIndex, ANewIndex); - DesignerUpdate(nil); -end; - -procedure TdxPrintStyleManager.RemoveStyle(Value: TBasedxPrintStyle); -var - Index: Integer; -begin - if FCurrentStyle = Value then - Index := Value.Index - else - Index := -1; - FStyles.Remove(Value); - Value.FStyleManager := nil; - if Index <> -1 then - ResyncCurrentStyle(Index); - StyleListChanged; -end; - -function TdxPrintStyleManager.GetCloneStyleCaptionPrefix: string; -begin - if FIsCloneStyleCaptionPrefixAssigned then - Result := FCloneStyleCaptionPrefix - else - Result := DefaultCloneStyleCaptionPrefix; -end; - -function TdxPrintStyleManager.GetCount: Integer; -begin - Result := FStyles.Count; -end; - -procedure TdxPrintStyleManager.RestoreDefaultAutoHFTextEntries; -begin - AutoHFTextEntries.Assign(DefaultAutoHFTextEntries); -end; - -procedure TdxPrintStyleManager.RestoreDefaults; -begin - BeginUpdate; - try - DoRestoreDefaults; - finally - EndUpdate; - end; -end; - -procedure TdxPrintStyleManager.RestoreDefaultStyles; -var - I: Integer; -begin - BeginUpdate; - try - for I := 0 to Count - 1 do - Styles[I].RestoreDefaults; - finally - EndUpdate; - end; -end; - -procedure TdxPrintStyleManager.LoadFromFile(const AName: string); -var - AStream: TFileStream; -begin - if (AName <> '') and FileExists(AName) then - begin - AStream := TFileStream.Create(AName, fmOpenRead or fmShareDenyWrite); - try - LoadFromStream(AStream); - finally - AStream.Free; - end; - end; -end; - -procedure TdxPrintStyleManager.LoadFromStream(AStream: TStream); - - procedure CheckExistingStyles(AExistingStyleCount: Integer); - var - I, ALoadedExistingStyleIndex: Integer; - AStyle: TBasedxPrintStyle; - begin - for I := AExistingStyleCount - 1 downto 0 do - begin - if FLoadedExistingStyles = nil then - ALoadedExistingStyleIndex := -1 - else - ALoadedExistingStyleIndex := FLoadedExistingStyles.IndexOf(Styles[I].Name); - if ALoadedExistingStyleIndex = -1 then - Styles[I].Free - else - begin - AStyle := TBasedxPrintStyle(FLoadedExistingStyles.Objects[ALoadedExistingStyleIndex]); - Styles[I].Assign(AStyle); - AStyle.Free; - end; - end; - FreeAndNil(FLoadedExistingStyles); - end; - -var - Version: Integer; - M: TMemoryStream; - AExistingStyleCount, I: Integer; - Style: TBasedxPrintStyle; - CurrentStyleIndex: Integer; -begin - AStream.ReadBuffer(Version , SizeOf(Integer)); - if Version <> Self.Version then Exit; - BeginUpdate; - try - M := TMemoryStream.Create; - try - AExistingStyleCount := Count; - FInternalStreaming := True; - try - M.WriteComponent(Self); - try - try - AStream.ReadBuffer(CurrentStyleIndex , SizeOf(Integer)); - AStream.ReadComponent(Self); - Self.CurrentStyleIndex := CurrentStyleIndex; - finally - CheckExistingStyles(AExistingStyleCount); - end; - except - Clear; // links to styles in other components will be lost - M.Position := 0; - M.ReadComponent(Self); - Application.HandleException(Self); - end; - finally - Loaded; - for I := 0 to Count - 1 do - begin - Style := Styles[I]; - if Style.Owner = Self then - begin - RemoveComponent(Style); - Owner.InsertComponent(Style); - end; - Style.Loaded; - end; - FInternalStreaming := False; - end; - finally - M.Free; - end; - finally - EndUpdate; - end; -end; - -procedure TdxPrintStyleManager.SaveToFile(const AName: string); -var - AStream: TFileStream; -begin - if ValidateFileName(AName) then - begin - AStream := TFileStream.Create(AName, fmCreate or fmShareDenyWrite); - try - SaveToStream(AStream); - finally - AStream.Free; - end; - end; -end; - -procedure TdxPrintStyleManager.SaveToStream(AStream: TStream); -var - ACurrentStyleIndex: Integer; -begin - FInternalStreaming := True; - try - AStream.WriteBuffer(Version , SizeOf(Integer)); - ACurrentStyleIndex := CurrentStyleIndex; - AStream.WriteBuffer(ACurrentStyleIndex , SizeOf(Integer)); - AStream.WriteComponent(Self); - finally - FInternalStreaming := False; - end; -end; - -function TdxPrintStyleManager.CreateAutoHFTextEntries: TStrings; -begin - FAutoHFTextEntries := TStringList.Create; - with TStringList(FAutoHFTextEntries) do - begin - Duplicates := dupIgnore; - Assign(DefaultAutoHFTextEntries); - OnChange := AutoHFTextEntriesChanged; - end; - Result := FAutoHFTextEntries; -end; - -procedure TdxPrintStyleManager.DoRestoreDefaults; -begin - RestoreDefaultAutoHFTextEntries; - RestoreDefaultStyles; - AutoSave := False; - FIsCloneStyleCaptionPrefixAssigned := False; - FIsTitleAssigned := False; -end; - -procedure TdxPrintStyleManager.ChangeCurrentStyle; -begin - if (FUpdateCount = 0) and not IsLoading and not IsDestroying then - if Assigned(FOnChangeCurrentStyle) then FOnChangeCurrentStyle(Self); -end; - -procedure TdxPrintStyleManager.StyleListChanged; -var - Event: TdxEvent; -begin - if (FUpdateCount = 0) and not IsLoading and not IsDestroying then - begin - if Assigned(FOnStyleListChanged) then FOnStyleListChanged(Self); - Event := TdxSMStyleListChangedEvent.Create(Self); - dxPSProcessEvent(Event); - end; -end; - -procedure TdxPrintStyleManager.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TdxPrintStyleManager.EndUpdate; -begin - if FUpdateCount <> 0 then - begin - Dec(FUpdateCount); - if FUpdateCount = 0 then - begin - StyleListChanged; - ChangeCurrentStyle; - end; - end; -end; - -function TdxPrintStyleManager.DefaultCloneStyleCaptionPrefix: string; -begin - Result := cxGetResourceString(@sdxCloneStyleCaptionPrefix); -end; - -function TdxPrintStyleManager.DefaultTitle: string; -begin - Result := cxGetResourceString(@sdxDefinePrintStylesCaption); -end; - -procedure TdxPrintStyleManager.PageParamsChanged(APrintStyle: TBasedxPrintStyle; - AUpdateCodes: TdxPrinterPageUpdateCodes); -var - Event: TdxEvent; -begin - Event := TdxSMPageParamsChangedEvent.Create(Self, APrintStyle, AUpdateCodes); - dxPSProcessEvent(Event); -end; - -procedure TdxPrintStyleManager.SetAutoHFTextEntries(Value: TStrings); -begin - AutoHFTextEntries.Assign(Value); -end; - -procedure TdxPrintStyleManager.SetCloneStyleCaptionPrefix(const Value: string); -begin - if CloneStyleCaptionPrefix <> Value then - begin - FCloneStyleCaptionPrefix := Value; - FIsCloneStyleCaptionPrefixAssigned := True; - end; -end; - -procedure TdxPrintStyleManager.SetCurrentStyle(Value: TBasedxPrintStyle); -begin - if (FCurrentStyle <> Value) and (IndexOfStyle(Value) <> -1) then - begin - FCurrentStyle := Value; - PageParamsChanged(Value, ucAll); - ChangeCurrentStyle; - DesignerUpdate(Value);//nil); - end; -end; - -function TdxPrintStyleManager.GetCurrentStyleIndex: Integer; -begin - if CurrentStyle <> nil then - Result := CurrentStyle.Index - else - Result := -1; -end; - -function TdxPrintStyleManager.GetRegistryPath: string; -begin - if dxPSEngine.RealRegistryPath <> '' then - Result := dxPSEngine.RealRegistryPath + sdxAutoHFTextEntries + '\' + Name - else - Result := ''; -end; - -procedure TdxPrintStyleManager.SetCurrentStyleIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > Count - 1 then - Value := Count - 1; - if Value <> CurrentStyleIndex then - CurrentStyle := Styles[Value]; -end; - -procedure TdxPrintStyleManager.BuildAutoHFTextEntriesMenu(ARootItem: TComponent; - AData: Pointer; AIncludeSetupAutoHFTextEntriesItem: Boolean = True); -var - MenuBuilder: TAbstractdxPSAutoHFTextMenuBuilder; -begin - MenuBuilder := dxPSAutoHFTextMenuBuilderFactory.ActiveBuilder.Create; - try - try - MenuBuilder.BuildAutoHFTextEntriesMenu(ARootItem, AData, AIncludeSetupAutoHFTextEntriesItem, - AutoHFTextEntries, OnAutoHFTextEntryClick, OnEditAutoHFTextEntriesClick); - except - Application.HandleException(Self); - end; - finally - MenuBuilder.Free; - end; -end; - -procedure TdxPrintStyleManager.RefreshAutoHFTextEntries; -begin - FreeAndNil(FAutoHFTextEntries); -end; - -function TdxPrintStyleManager.ShowAutoHFTextEntriesDlg: Boolean; -begin - Result := dxShowAutoTextDlg(AutoHFTextEntries); -end; - -procedure TdxPrintStyleManager.LoadFromRegistry(const APath: string); -begin - dxLoadStringsFromRegistry(APath, AutoHFTextEntries); -end; - -procedure TdxPrintStyleManager.SaveToRegistry(const APath: string); -begin - dxSaveStringsToRegistry(APath, AutoHFTextEntries); -end; - -procedure TdxPrintStyleManager.DefinePrintStylesDlg(out APreviewBtnClicked, APrintBtnClicked: Boolean); -var - Data: TdxDefinePrintStylesDlgData; -begin - FillChar(Data, SizeOf(TdxDefinePrintStylesDlgData), 0); - Data.StyleManager := Self; - Data.Title := Title; - dxDefinePrintStylesDlg(Data); - - APreviewBtnClicked := Data.PreviewBtnClicked; - APrintBtnClicked := Data.PrintBtnClicked; - - DesignerUpdate(nil); - PostMessage(FWindowHandle, WMPS_PRINTSTYLELISTCHANGED, 0, 0); -end; - -procedure TdxPrintStyleManager.DefinePrintStylesDlg(APreviewBtnClicked, - APrintBtnClicked: PBoolean); -var - PreviewBtnClicked, PrintBtnClicked: Boolean; -begin - DefinePrintStylesDlg(PreviewBtnClicked, PrintBtnClicked); - - if APreviewBtnClicked <> nil then - APreviewBtnClicked^ := PreviewBtnClicked; - - if APrintBtnClicked <> nil then - APrintBtnClicked^ := PrintBtnClicked; -end; - -{ TAbstractdxStyleManagerDesigner } - -constructor TAbstractdxStyleManagerDesigner.Create(AStyleManager: TdxPrintStyleManager); -begin - inherited Create; - FStyleManager := AStyleManager; - if FStyleManager <> nil then FStyleManager.FDesigner := Self; -end; - -destructor TAbstractdxStyleManagerDesigner.Destroy; -begin - if FStyleManager <> nil then FStyleManager.FDesigner := nil; - inherited; -end; - -{ Header & footer parser functions } - -function dxProcessHFString(const Source: string): string; -begin - if dxHFFunctionLibrary <> nil then - Result := dxHFFunctionLibrary.ProcessString(Source, dxHFFormatObject) - else - Result := Source; -end; - -procedure dxGetHFFunctionsList(AStrings: TStrings); -begin - if dxHFFunctionLibrary <> nil then - dxHFFunctionLibrary.GetFunctions(AStrings); -end; - -procedure dxGetHFFunctionsListByCategory(ACategory: TdxHFFunctionCustomCategoryClass; AStrings: TStrings); -begin - if dxHFFunctionLibrary <> nil then - dxHFFunctionLibrary.GetFunctionsByCategory(ACategory, AStrings); -end; - -{ TdxHFFunctionFormatObject } - -constructor TdxHFFunctionFormatObject.Create; -begin - inherited Create; - Initialize; -end; - -procedure TdxHFFunctionFormatObject.Initialize; -begin - FDateTime := Now; - FCurrentPage := 1; - FDateFormat := LongDateFormat; - FMachineName := dxPSUtl.GetMachineName; - FPageNumberFormat := pnfNumeral; - FTimeFormat := LongTimeFormat; - FTotalPages := 1; - FUserName := dxPSUtl.GetUserName; -end; - -{ TdxHFCustomFunction } - -constructor TdxHFCustomFunction.Create; -begin - inherited Create; - FGlyph := TBitmap.Create; -end; - -destructor TdxHFCustomFunction.Destroy; -begin - FreeAndNil(FGlyph); - inherited; -end; - -procedure TdxHFCustomFunction.Assign(Source: TPersistent); -begin - if Source is TdxHFCustomFunction then - with TdxHFCustomFunction(Source) do - begin - Self.TemplateString := TemplateString; - Self.Hint := Hint; - Self.Glyph := Glyph; - end - else - inherited; -end; - -class function TdxHFCustomFunction.FunctionClass: TdxHFCustomFunctionClass; -begin - Result := TdxHFCustomFunctionClass(GetTypeData(ClassInfo)^.ClassType); -end; - -function TdxHFCustomFunction.DoProcess(const Source: string; - const AFormatObject: TdxHFFunctionFormatObject): string; -begin - if AFormatObject <> nil then - Result := ConvertFunc(Source, AFormatObject) - else - Result := Source; -end; - -procedure TdxHFCustomFunction.SetTemplateString(const Value: string); -begin - FTemplateString := Value; - if Length(FTemplateString) > 0 then - begin - if FTemplateString[1] <> dxFunctionDelimiters[False] then - FTemplateString := dxFunctionDelimiters[False] + FTemplateString; - if FTemplateString[Length(FTemplateString)] <> dxFunctionDelimiters[True] then - FTemplateString := FTemplateString + dxFunctionDelimiters[True]; - end; -end; - -procedure TdxHFCustomFunction.SetGlyph(Value: Graphics.TBitmap); -begin - Glyph.Assign(Value); -end; - -class function TdxHFCustomFunction.GetName: string; -begin - Result := cxGetResourceString(@sdxHFFunctionNameUnknown); -end; - -class function TdxHFCustomFunction.GetCategory: TdxHFFunctionCustomCategoryClass; -begin - Result := TdxHFFunctionCustomCategory; -end; - -function TdxHFCustomFunction.ConvertFunc(const Source: string; - const AFormatObject: TdxHFFunctionFormatObject): string; -begin - Result := Source; -end; - -{ TdxHFPagesFunctions } - -class function TdxHFPagesFunctions.GetCategory: TdxHFFunctionCustomCategoryClass; -begin - Result := TdxHFFunctionPagesCategory; -end; - -{ TdxHFPageNumberFunction } - -constructor TdxHFPageNumberFunction.Create; -begin - inherited; - Bitmap_LoadFromResourceName(Glyph, IDB_DXPSFUNCTION_PAGENUMBER); - TemplateString := cxGetResourceString(@sdxHFFunctionTemplatePageNumber); - Hint := cxGetResourceString(@sdxHFFunctionHintPageNumber); -end; - -function TdxHFPageNumberFunction.ConvertFunc(const Source: string; - const AFormatObject: TdxHFFunctionFormatObject): string; -var - ACurrentPage: Integer; -begin - ACurrentPage := AFormatObject.StartPageIndex + AFormatObject.CurrentPage - 1; - - case AFormatObject.PageNumberFormat of - pnfNumeral: - Result := IntToStr(ACurrentPage); - pnfChars: - Result := Int2Chars(ACurrentPage, False); - pnfUpperChars: - Result := Int2Chars(ACurrentPage, True); - pnfRoman: - Result := Int2Roman(ACurrentPage, False); - else // pnfUpperRoman - Result := Int2Roman(ACurrentPage, True); - end -end; - -class function TdxHFPageNumberFunction.GetName: string; -begin - Result := cxGetResourceString(@sdxHFFunctionNamePageNumber); -end; - -{ TdxHFTotalPagesFunction } - -constructor TdxHFTotalPagesFunction.Create; -begin - inherited; - Bitmap_LoadFromResourceName(Glyph, IDB_DXPSFUNCTION_TOTALPAGES); - TemplateString := cxGetResourceString(@sdxHFFunctionTemplateTotalPages); - Hint := cxGetResourceString(@sdxHFFunctionHintTotalPages); -end; - -function TdxHFTotalPagesFunction.ConvertFunc(const Source: string; - const AFormatObject: TdxHFFunctionFormatObject): string; -var - ATotalPages: Integer; -begin - ATotalPages := AFormatObject.StartPageIndex + AFormatObject.TotalPages - 1; - - case AFormatObject.PageNumberFormat of - pnfNumeral: - Result := IntToStr(ATotalPages); - pnfChars: - Result := Int2Chars(ATotalPages, False); - pnfUpperChars: - Result := Int2Chars(ATotalPages, True); - pnfRoman: - Result := Int2Roman(ATotalPages, False); - else // pnfUpperRoman - Result := Int2Roman(ATotalPages, True); - end -end; - -class function TdxHFTotalPagesFunction.GetName: string; -begin - Result := cxGetResourceString(@sdxHFFunctionNameTotalPages); -end; - -{ TdxHFPageOfPagesFunction } - -constructor TdxHFPageOfPagesFunction.Create; -begin - inherited; - Bitmap_LoadFromResourceName(Glyph, IDB_DXPSFUNCTION_PAGENUMBEROFPAGES); - TemplateString := cxGetResourceString(@sdxHFFunctionTemplatePageOfPages); - Hint := cxGetResourceString(@sdxHFFunctionHintPageOfPages); -end; - -function TdxHFPageOfPagesFunction.ConvertFunc(const Source: string; - const AFormatObject: TdxHFFunctionFormatObject): string; -var - CurrentPage, TotalPages: Integer; -begin - CurrentPage := AFormatObject.CurrentPage + AFormatObject.StartPageIndex - 1; - TotalPages := AFormatObject.TotalPages + AFormatObject.StartPageIndex - 1; - - case AFormatObject.PageNumberFormat of - pnfNumeral: - Result := IntToStr(CurrentPage) + ' ' + cxGetResourceString(@sdxOf) + ' ' + IntToStr(TotalPages); - pnfChars: - Result := Int2Chars(CurrentPage, False) + ' ' + cxGetResourceString(@sdxOf) + ' ' + Int2Chars(TotalPages, False); - pnfUpperChars: - Result := Int2Chars(CurrentPage, True) + ' ' + cxGetResourceString(@sdxOf) + ' ' + Int2Chars(TotalPages, True); - pnfRoman: - Result := Int2Roman(CurrentPage, False) + ' ' + cxGetResourceString(@sdxOf) + ' ' + Int2Roman(TotalPages, False); - else // pnfUpperRoman - Result := Int2Roman(CurrentPage, True) + ' ' + cxGetResourceString(@sdxOf) + ' ' + Int2Roman(TotalPages, True); - end -end; - -class function TdxHFPageOfPagesFunction.GetName: string; -begin - Result := cxGetResourceString(@sdxHFFunctionNamePageOfPages); -end; - -{ TdxHFAuthenticationFunctions } - -class function TdxHFAuthenticationFunctions.GetCategory: TdxHFFunctionCustomCategoryClass; -begin - Result := TdxHFFunctionAuthenticationCategory; -end; - -{ TdxHFMachineNameFunction } - -constructor TdxHFMachineNameFunction.Create; -begin - inherited; - Bitmap_LoadFromResourceName(Glyph, IDB_DXPSFUNCTION_MACHINENAME); - TemplateString := cxGetResourceString(@sdxHFFunctionTemplateMachineName); - Hint := cxGetResourceString(@sdxHFFunctionHintMachineName); -end; - -function TdxHFMachineNameFunction.ConvertFunc(const Source: string; - const AFormatObject: TdxHFFunctionFormatObject): string; -begin - Result := AFormatObject.MachineName -end; - -class function TdxHFMachineNameFunction.GetName: string; -begin - Result := cxGetResourceString(@sdxHFFunctionNameMachineName); -end; - -{ TdxHFMachineNameFunction } - -constructor TdxHFUserNameFunction.Create; -begin - inherited; - Bitmap_LoadFromResourceName(Glyph, IDB_DXPSFUNCTION_USERNAME); - TemplateString := cxGetResourceString(@sdxHFFunctionTemplateUserName); - Hint := cxGetResourceString(@sdxHFFunctionHintUserName); -end; - -function TdxHFUserNameFunction.ConvertFunc(const Source: string; - const AFormatObject: TdxHFFunctionFormatObject): string; -begin - Result := AFormatObject.UserName -end; - -class function TdxHFUserNameFunction.GetName: string; -begin - Result := cxGetResourceString(@sdxHFFunctionNameUserName); -end; - -{ TdxHFDateTimeFunctions } - -class function TdxHFDateTimeFunctions.GetCategory: TdxHFFunctionCustomCategoryClass; -begin - Result := TdxHFFunctionDateTimeCategory; -end; - -{ TdxHFDateTimeFunction } - -constructor TdxHFDateTimeFunction.Create; -begin - inherited; - Bitmap_LoadFromResourceName(Glyph, IDB_DXPSFUNCTION_DATETIME); - TemplateString := cxGetResourceString(@sdxHFFunctionTemplateDateTime); - Hint := cxGetResourceString(@sdxHFFunctionHintDateTime); -end; - -function TdxHFDateTimeFunction.ConvertFunc(const Source: string; - const AFormatObject: TdxHFFunctionFormatObject): string; -begin - with AFormatObject do - Result := GetFormatedDate(DateTime, DateFormat) + ' ' + - GetFormatedTime(DateTime, TimeFormat); -end; - -class function TdxHFDateTimeFunction.GetName: string; -begin - Result := cxGetResourceString(@sdxHFFunctionNameDateTime); -end; - -{ TdxHFDateFunction } - -constructor TdxHFDateFunction.Create; -begin - inherited; - Bitmap_LoadFromResourceName(Glyph, IDB_DXPSFUNCTION_DATE); - TemplateString := cxGetResourceString(@sdxHFFunctionTemplateDate); - Hint := cxGetResourceString(@sdxHFFunctionHintDate); -end; - -function TdxHFDateFunction.ConvertFunc(const Source: string; - const AFormatObject: TdxHFFunctionFormatObject): string; -begin - with AFormatObject do - Result := GetFormatedDate(DateTime, DateFormat); -end; - -class function TdxHFDateFunction.GetName: string; -begin - Result := cxGetResourceString(@sdxHFFunctionNameDate); -end; - -{ TdxHFDateFunction } - -constructor TdxHFTimeFunction.Create; -begin - inherited; - Bitmap_LoadFromResourceName(Glyph, IDB_DXPSFUNCTION_TIME); - TemplateString := cxGetResourceString(@sdxHFFunctionTemplateTime); - Hint := cxGetResourceString(@sdxHFFunctionHintTime); -end; - -function TdxHFTimeFunction.ConvertFunc(const Source: string; - const AFormatObject: TdxHFFunctionFormatObject): string; -begin - with AFormatObject do - Result := GetFormatedTime(DateTime, TimeFormat); -end; - -class function TdxHFTimeFunction.GetName: string; -begin - Result := cxGetResourceString(@sdxHFFunctionNameTime); -end; - -{ TdxHFFunctionLibrary } - -constructor TdxHFFunctionLibrary.Create; -begin - inherited Create; - FItems := TStringList.Create; -end; - -destructor TdxHFFunctionLibrary.Destroy; -begin - FreeAndNilItems; - inherited; -end; - -procedure TdxHFFunctionLibrary.Assign(Source: TPersistent); -var - I: Integer; -begin - if Source is TdxHFFunctionLibrary then - begin - Clear; - with TdxHFFunctionLibrary(Source) do - for I := 0 to Count - 1 do - Self.Add(Funcs[I].FunctionClass); - end - else - inherited; -end; - -procedure TdxHFFunctionLibrary.GetFunctions(AStrings: TStrings); -var - I: Integer; - AFunction: TdxHFCustomFunction; -begin - AStrings.BeginUpdate; - try - for I := 0 to Count - 1 do - begin - AFunction := Funcs[I]; - AStrings.AddObject(AFunction.TemplateString, AFunction); - end; - finally - AStrings.EndUpdate; - end; -end; - -procedure TdxHFFunctionLibrary.GetFunctionsByCategory(ACategory: TdxHFFunctionCustomCategoryClass; - AStrings: TStrings); -var - I: Integer; - AFunction: TdxHFCustomFunction; -begin - AStrings.BeginUpdate; - try - for I := 0 to Count - 1 do - begin - AFunction := Funcs[I]; - if AFunction.GetCategory = ACategory then - AStrings.AddObject(AFunction.TemplateString, AFunction); - end; - finally - AStrings.EndUpdate; - end; -end; - -procedure TdxHFFunctionLibrary.Enumerate(AProc: TdxHFFunctionEnumProc); -var - I: Integer; -begin - if Assigned(AProc) then - for I := 0 to Count - 1 do - AProc(Self, Funcs[I]); -end; - -function TdxHFFunctionLibrary.ProcessString(const Source: string; - const AFormatObject: TdxHFFunctionFormatObject): string; -var - I, J, Left, Right: Integer; - S: string; -begin - Result := Source; - if Length(Result) = 0 then Exit; - - I := 1; - while I <= Length(Result) do - begin - while (I <= Length(Result)) and (Result[I] <> dxFunctionDelimiters[False]) do - Inc(I); - - if I < Length(Result) then - Left := I - else - Left := 0; - if Left = 0 then Break; - - while (I <= Length(Result)) and (Result[I] <> dxFunctionDelimiters[True]) do - Inc(I); - - if I <= Length(Result) then - Right := I - else - Right := 0; - if Right = 0 then Break; - - if Right - Left > 1 then - begin - S := Copy(Result, Left {+1}, Right - Left + 1 {-1}); - J := IndexOf(S); - if J <> -1 then - begin - System.Delete(Result, Left, Right - Left + 1); - S := Funcs[J].DoProcess(S, AFormatObject); - if S <> '' then - Insert(' ' + S + ' ', Result, Left); - I := Left + Length(S) + 2 {left and right spaces}; - end; - end; - end; -end; - -function TdxHFFunctionLibrary.Add(AFunctionClass: TdxHFCustomFunctionClass): TdxHFCustomFunction; -begin - Result := AFunctionClass.Create; - FItems.AddObject(Result.TemplateString, Result); -end; - -procedure TdxHFFunctionLibrary.Clear; -begin - while Count > 0 do Delete(Count - 1); -end; - -procedure TdxHFFunctionLibrary.Delete(AnIndex: Integer); -begin - FItems.Objects[AnIndex].Free; - FItems.Delete(AnIndex); -end; - -function TdxHFFunctionLibrary.IndexOf(const ATemplateString: string): Integer; -begin - Result := FItems.IndexOf(ATemplateString); -end; - -function TdxHFFunctionLibrary.IndexOfByName(const AFunctionName: string): Integer; -begin - for Result := 0 to Count - 1 do - if dxSameText(Funcs[Result].GetName, AFunctionName) then Exit; - Result := -1; -end; - -function TdxHFFunctionLibrary.IndexOfByClass(AFunctionClass: TdxHFCustomFunctionClass): Integer; -begin - for Result := 0 to Count - 1 do - if Funcs[Result].FunctionClass = AFunctionClass then Exit; -// if Assigned(AFunctionClass) and AFunctionClass.InheritsFrom(Funcs[Result].FunctionClass) then Exit; - Result := -1; -end; - -function TdxHFFunctionLibrary.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TdxHFFunctionLibrary.GetFunction(Index: Integer): TdxHFCustomFunction; -begin - Result := TdxHFCustomFunction(FItems.Objects[Index]); -end; - -function TdxHFFunctionLibrary.GetFunctionByClass(FunctionClass: TdxHFCustomFunctionClass): TdxHFCustomFunction; -var - Index: Integer; -begin - Index := IndexOfByClass(FunctionClass); - if Index <> -1 then - Result := Funcs[Index] - else - Result := nil; -end; - -procedure TdxHFFunctionLibrary.SetFunction(Index: Integer; Value: TdxHFCustomFunction); -begin - Funcs[Index].Assign(Value); -end; - -procedure TdxHFFunctionLibrary.SetFunctionByClass(FunctionClass: TdxHFCustomFunctionClass; Value: TdxHFCustomFunction); -var - Index: Integer; -begin - Index := IndexOfByClass(FunctionClass); - if Index <> -1 then - Funcs[Index] := Value; -end; - -procedure TdxHFFunctionLibrary.FreeAndNilItems; -begin - Clear; - FreeAndNil(FItems); -end; - -{ TdxStdHFFunctionLibrary } - -constructor TdxStandardHFFunctionLibrary.Create; -begin - inherited; - AddStandardFunctions; -end; - -procedure TdxStandardHFFunctionLibrary.AddStandardFunctions; -begin - Add(TdxHFPageNumberFunction); - Add(TdxHFTotalPagesFunction); - Add(TdxHFPageOfPagesFunction); - Add(TdxHFDateTimeFunction); - Add(TdxHFDateFunction); - Add(TdxHFTimeFunction); - Add(TdxHFUserNameFunction); - Add(TdxHFMachineNameFunction); -end; - -{ functions } - -function DateFormats: TStrings; -begin - if FDateFormats = nil then - begin - FDateFormats := TStringList.Create; - if Assigned(dxGetDateFormatsProc) then dxGetDateFormatsProc(FDateFormats); - end; - Result := FDateFormats; -end; - -function TimeFormats: TStrings; -begin - if FTimeFormats = nil then - begin - FTimeFormats := TStringList.Create; - if Assigned(dxGetTimeFormatsProc) then dxGetTimeFormatsProc(FTimeFormats); - end; - Result := FTimeFormats; -end; - -procedure RefreshDateFormats; -begin - FreeAndNil(FDateFormats); -end; - -procedure RefreshTimeFormats; -begin - FreeAndNil(FTimeFormats); -end; - -procedure DeleteLeadingGarbage(var Source: string); -begin - while (Length(Source) > 0) and ((Source[1] = '.') or (Source[1] = ',') or (Source[1] = ' ')) do - Delete(Source, 1, 1); -end; - -function ExtractLongMonthFormat(AnExcludeDelimiters: Boolean): string; -const - ValidChars: array[Boolean] of string = (' M:\.,/', ' M:\'); -var - I: Integer; - Ch: char; -begin - Result := ''; - for I := 1 to Length(LongDateFormat) do - begin - Ch := LongDateFormat[I]; - if Pos(Ch, ValidChars[AnExcludeDelimiters]) <> 0 then - Result := Result + Ch; - end; - Result := Trim(Result); - DeleteLeadingGarbage(Result); -end; - -function ReducedLongDayFormat: string; -var - P: Integer; -begin - Result := LongDateFormat; - repeat - P := Pos('dddd', Result); - if P <> 0 then Delete(Result, P, 4); - until P = 0; - - Result := Trim(Result); - DeleteLeadingGarbage(Result); -end; - -procedure dxGetDateFormats(AStrings: TStrings); -var - S: string; - P: Integer; -begin - AStrings.BeginUpdate; - try - AStrings.Clear; -{1} AStrings.Add(ShortDateFormat); - - S := Trim(LongDateFormat); - if Pos('dddd', S) = 0 then S := 'dddd, ' + S; -{2} AStrings.Add(S); - -{3} AStrings.Add(ReducedLongDayFormat); - - S := ShortDateFormat; - P := Pos('yyyy', S); - if P <> 0 then - Delete(S, P, 2) - else - begin - P := Pos('yy', S); - if P <> 0 then Insert('yy', S, P); - end; -{4} AStrings.Add(S); - -{5} AStrings.Add('yyyy-MM-dd'); -{6} AStrings.Add('d-MMM-yy'); - - S := ShortDateFormat; - if DateSeparator <> '/' then - S := ReplaceSubStr(S, DateSeparator, '/') - else - S := ReplaceSubStr(S, DateSeparator, '.'); -{7} AStrings.Add(S); - -{8} AStrings.Add(ExtractLongMonthFormat(False) + ' yyyy'); -{9} AStrings.Add('d MMMM yyyy'); -{10}AStrings.Add(ExtractLongMonthFormat(True) + ' yy'); -{11}AStrings.Add('MMM-yy'); - finally - AStrings.EndUpdate; - end; -end; - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} -{$ENDIF} - -procedure dxGetTimeFormats(AStrings: TStrings); -const - HourFormats: array[Boolean] of string = ('hh', 'h'); -var - HourFormat: string; -begin - HourFormat := HourFormats[StrToIntDef(GetLocaleChar(GetThreadLocale, LOCALE_ITLZERO, '0'), 0) = 0]; - with AStrings do - begin - BeginUpdate; - try - Clear; - Add(HourFormat + ':mm tt'); - Add(HourFormat + ':mm:ss tt'); - Add(UpperCase(HourFormat) + ':mm'); - Add(UpperCase(HourFormat) + ':mm:ss'); - finally - EndUpdate; - end; - end; -end; - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM ON} -{$ENDIF} - -function PageNumberFormats: TStrings; -begin - if FPageNumberFormats = nil then - begin - FPageNumberFormats := TStringList.Create; - FPageNumberFormats.AddObject('1, 2, 3, 4, 5, ...', TObject(Integer(pnfNumeral))); - FPageNumberFormats.AddObject('a, b, c, d, e, ...', TObject(Integer(pnfChars))); - FPageNumberFormats.AddObject('A, B, C, D, E, ...', TObject(Integer(pnfUpperChars))); - FPageNumberFormats.AddObject('i, ii, iii, iv, v, ...', TObject(Integer(pnfRoman))); - FPageNumberFormats.AddObject('I, II, III, IV, V, ...', TObject(Integer(pnfUpperRoman))); - end; - Result := FPageNumberFormats; -end; - -function System_GetFormatedDate(const ASystemTime: TSystemTime; const AFormat: string): string; -var - DefaultLCID: LCID; - BufferSize: Integer; - Buffer: array[0..255] of Char; -begin - if AFormat <> '' then - begin - DefaultLCID := GetThreadLocale; - FillChar(Buffer, SizeOf(Buffer), 0); - BufferSize := GetDateFormat(DefaultLCID, 0, @ASystemTime, PChar(AFormat), @Buffer, Length(Buffer)); - if BufferSize = 0 then - Result := '' - else - Result := Buffer; - end - else - Result := ''; -end; - -function System_GetFormatedTime(const ASystemTime: TSystemTime; const AFormat: string): string; -var - DefaultLCID: LCID; - BufferSize: Integer; - Buffer: array[0..255] of Char; -begin - if AFormat <> '' then - begin - DefaultLCID := GetThreadLocale; - FillChar(Buffer, SizeOf(Buffer), 0); - BufferSize := GetTimeFormat(DefaultLCID, 0, @ASystemTime, PChar(AFormat), @Buffer, Length(Buffer)); - if BufferSize = 0 then - Result := '' - else - Result := Buffer; - Result := Buffer; - end - else - Result := ''; -end; - -function GetFormatedDate(const ADateTime: TDateTime; const AFormat: string): string; -var - SystemTime: TSystemTime; -begin - DateTimeToSystemTime(ADateTime, SystemTime); - Result := System_GetFormatedDate(SystemTime, AFormat); -end; - -function GetFormatedTime(const ADateTime: TDateTime; const AFormat: string): string; -var - SystemTime: TSystemTime; -begin - DateTimeToSystemTime(ADateTime, SystemTime); - Result := System_GetFormatedTime(SystemTime, AFormat); -end; - -procedure GetFormatedDateStrings(const ADateTime: TDateTime; - ADateFormats, AFormatedStrings: TStrings); -var - I: Integer; -begin - with AFormatedStrings do - begin - BeginUpdate; - try - for I := 0 to ADateFormats.Count - 1 do - Add(GetFormatedDate(ADateTime, ADateFormats[I])); - finally - EndUpdate; - end; - end; -end; - -procedure GetFormatedTimeStrings(const ADateTime: TDateTime; - ATimeFormats, AFormatedStrings: TStrings); -var - I: Integer; -begin - with AFormatedStrings do - begin - BeginUpdate; - try - for I := 0 to ATimeFormats.Count - 1 do - Add(GetFormatedTime(ADateTime, ATimeFormats[I])); - finally - EndUpdate; - end; - end; -end; - -function DefaultAutoHFTextEntries: TStrings; -begin - if FDefaultAutoHFTextEntries = nil then - begin - FDefaultAutoHFTextEntries := TStringList.Create; - TStringList(FDefaultAutoHFTextEntries).Duplicates := dupIgnore; - if Assigned(dxGetAutoHFTextEntriesProc) then - dxGetAutoHFTextEntriesProc(FDefaultAutoHFTextEntries); - end; - Result := FDefaultAutoHFTextEntries; -end; - -procedure dxGetAutoHFTextEntries(AStrings: TStrings); -var - F: TdxHFCustomFunction; - S: string; -begin - with AStrings do - begin - //, -Page #-, - F := dxHFFunctionLibrary.FuncsByClass[TdxHFPageNumberFunction]; - if F <> nil then - Add(dxHFFunctionSeparator + ' ' + '-' + F.TemplateString + '-' + ' ' + dxHFFunctionSeparator); - - // Author, Page #, Date - S := ''; - F := dxHFFunctionLibrary.FuncsByClass[TdxHFUserNameFunction]; - if F <> nil then - S := F.TemplateString; - F := dxHFFunctionLibrary.FuncsByClass[TdxHFPageNumberFunction]; - if F <> nil then - S := S + dxHFFunctionSeparator + ' ' + DropAmpersand(cxGetResourceString(@sdxPage)) + ' ' + F.TemplateString; - F := dxHFFunctionLibrary.FuncsByClass[TdxHFDateFunction]; - if F <> nil then - S := S + dxHFFunctionSeparator + ' ' + F.TemplateString; - Add(S); - - // Confidential, Page #, Date - S := cxGetResourceString(@sdxConfidential); - F := dxHFFunctionLibrary.FuncsByClass[TdxHFPageNumberFunction]; - if F <> nil then - S := S + dxHFFunctionSeparator + ' ' + DropAmpersand(cxGetResourceString(@sdxPage)) + ' ' + F.TemplateString; - F := dxHFFunctionLibrary.FuncsByClass[TdxHFDateFunction]; - if F <> nil then - S := S + dxHFFunctionSeparator + ' ' + F.TemplateString; - Add(S); - - // Created By - F := dxHFFunctionLibrary.FuncsByClass[TdxHFUserNameFunction]; - if F <> nil then - Add(cxGetResourceString(@sdxCreatedBy) + F.TemplateString); - - // Created On - F := dxHFFunctionLibrary.FuncsByClass[TdxHFDateTimeFunction]; - if F <> nil then - Add(cxGetResourceString(@sdxCreatedOn) + F.TemplateString); - - // Printed By - F := dxHFFunctionLibrary.FuncsByClass[TdxHFUserNameFunction]; - if F <> nil then - Add(cxGetResourceString(@sdxPrintedBy) + F.TemplateString); - - // Printed On - F := dxHFFunctionLibrary.FuncsByClass[TdxHFDateTimeFunction]; - if F <> nil then - Add(cxGetResourceString(@sdxPrintedOn) + F.TemplateString); - - // Last Printed - F := dxHFFunctionLibrary.FuncsByClass[TdxHFDateTimeFunction]; - if F <> nil then - Add(cxGetResourceString(@sdxLastPrinted) + F.TemplateString); - - // Page # - F := dxHFFunctionLibrary.FuncsByClass[TdxHFPageOfPagesFunction]; - if F <> nil then - Add(DropAmpersand(cxGetResourceString(@sdxPage)) + ' ' + F.TemplateString); - end; -end; - -var - FHFFunctionLibrary: TdxHFFunctionLibrary; - FHFFormatObject: TdxHFFunctionFormatObject; - -initialization - dxGetDateFormatsProc := dxGetDateFormats; - dxGetTimeFormatsProc := dxGetTimeFormats; - dxGetAutoHFTextEntriesProc := dxGetAutoHFTextEntries; - - FHFFunctionLibrary := TdxStandardHFFunctionLibrary.Create; - dxHFFunctionLibrary := FHFFunctionLibrary; - - FHFFormatObject := TdxHFFunctionFormatObject.Create; - dxHFFormatObject := FHFFormatObject; - - dxPSRegisterPrintStyle(TBasedxPrintStyle, False); - if dxDefaultPrintStyleClass = nil then dxDefaultPrintStyleClass := TBasedxPrintStyle; - -finalization - dxPSUnregisterAllPrintStyles; - - if dxHFFormatObject = FHFFormatObject then dxHFFormatObject := nil; - if dxHFFunctionLibrary = FHFFunctionLibrary then dxHFFunctionLibrary := nil; - - FreeAndNil(FDefaultAutoHFTextEntries); - FreeAndNil(FHFFormatObject); - FreeAndNil(FHFFunctionLibrary); - FreeAndNil(FDateFormats); - FreeAndNil(FPageNumberFormats); - FreeAndNil(FTimeFormats); - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPrevw.pas b/internal/x.46/ExpressPrinting System/Sources/dxPrevw.pas deleted file mode 100644 index 84823008..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPrevw.pas +++ /dev/null @@ -1,5403 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPreVw; - -interface - -{$I cxVer.inc} - -uses - Classes, Controls, Messages, Windows, Graphics, Forms, StdCtrls, SysUtils, - ExtCtrls, FlatSB, dxWrap, dxBkgnd, dxPSUtl, dxPSGlbl; - -const - dxPreviewIndent1 = 4; - dxPreviewIndent2 = 9; - dxPreviewIndent = dxPreviewIndent1 + dxPreviewIndent2; - dxPreviewDragHintOffset = 5; - dxPreviewMarginSelectDelta = 3; - dxPreviewMinZoomFactor = 5; - dxPreviewScrollStep = 30; - dxPreviewMinUsefulSize: TPoint = (X: 500; Y: 500); - dxPreviewMinHeaderFooterSize = 127; - -type - TCMHintHide = TWMNoParams; - - TCustomdxPreview = class; - TdxPreviewPageMargins = class; - - TdxPreviewPageClass = class of TdxPreviewPage; - - TdxPreviewPage = class - private - FBounds: TRect; - FPreview: TCustomdxPreview; - function GetIndex: Integer; - function GetPartVisible: Boolean; - function GetSelected: Boolean; - function GetSiteBounds: TRect; - function GetVisible: Boolean; - function GetZoomed: Boolean; - procedure SetBounds(const Value: TRect); - procedure SetSelected(Value: Boolean); - protected - //procedure DrawBackground; - //procedure DrawBorder; - //procedure DrawContent; - //procedure DrawMargins; - public - constructor Create(APreview: TCustomdxPreview); virtual; - - function GetCursor: TCursor; virtual; - function HasPoint(const Pt: TPoint): Boolean; overload; - function HasPoint(X, Y: Integer): Boolean; overload; - procedure MakeVisible; - - property Bounds: TRect read FBounds write SetBounds; - property Index: Integer read GetIndex; - property PartVisible: Boolean read GetPartVisible; - property Preview: TCustomdxPreview read FPreview; - property Selected: Boolean read GetSelected write SetSelected; - property SiteBounds: TRect read GetSiteBounds; - property Visible: Boolean read GetVisible; - property Zoomed: Boolean read GetZoomed; - end; - - TdxPreviewHitTest = (phtNoWhere, phtPage, phtMarginLeft, phtMarginTop, - phtMarginRight, phtMarginBottom, phtMarginHeader, phtMarginFooter); - TdxPreviewHitTests = set of TdxPreviewHitTest; - - TdxPreviewPageMarginClass = class of TdxPreviewPageMargin; - - TdxPreviewPageMargin = class(TPersistent) - private - FCaption: string; - FDraggingPos: Integer; - FEnabled: Boolean; - FIsCaptionAssigned: Boolean; - FMargins: TdxPreviewPageMargins; - FMaxValue: Integer; - FMinValue: Integer; - FScreenBitmap: HBITMAP; - FValue: Integer; - FVisible: Boolean; - function GetActualMaxValue: Integer; - function GetActualMinValue: Integer; - function GetBounds: TRect; - function GetCaption: string; - function GetDisplayText: string; - function GetDraggingValue: Integer; - function GetIsDragging: Boolean; - function GetMaxPos: Integer; - function GetMinPos: Integer; - function GetPageBounds: TRect; - function GetPreview: TCustomdxPreview; - function GetSelectableBounds: TRect; - function GetVisibleValue: Integer; - function IsCaptionStored: Boolean; - function IsValueStored: Boolean; - procedure SetCaption(const Value: string); - procedure SetDraggingPos(Value: Integer); - procedure SetEnabled(Value: Boolean); - procedure SetMaxValue(Value: Integer); - procedure SetMinValue(Value: Integer); - procedure SetValue(Value: Integer); - procedure SetVisible(Value: Boolean); - - procedure ReadIsCaptionAssigned(AReader: TReader); - procedure WriteIsCaptionAssigned(AWriter: TWriter); - protected - procedure DefineProperties(Filer: TFiler); override; - - function GetIsForceRecalculatePageCount: Boolean; virtual; - function GetIsForward: Boolean; virtual; - function GetIsVertical: Boolean; virtual; - function DoGetActualMaxValue: Integer; virtual; - function DoGetActualMinValue: Integer; virtual; - function DoGetMaxMinValue: Integer; virtual; - function DoPosFromValue(AValue: Integer): Integer; virtual; - function DoValueFromPos(APos: Integer): Integer; virtual; - - procedure Changed(HardRefresh: Boolean); virtual; - procedure DoAssign(Source: TdxPreviewPageMargin); virtual; - procedure DoDragAfter; - procedure DoDragBefore; - procedure DoRestoreDefaults; virtual; - - procedure Draw(DC: HDC); virtual; - procedure Invalidate; virtual; - procedure Invert(DC: HDC); virtual; - - function CheckValue(Value: Integer): Integer; - function PosFromValue(AValue: Integer): Integer; - function ValueFromPos(APos: Integer): Integer; - - property ActualMaxValue: Integer read GetActualMaxValue; - property ActualMinValue: Integer read GetActualMinValue; - property Bounds: TRect read GetBounds; - property DraggingPos: Integer read FDraggingPos write SetDraggingPos; - property IsForceRecalculatePageCount: Boolean read GetIsForceRecalculatePageCount; - property MaxPos: Integer read GetMaxPos; - property MaxValue: Integer read FMaxValue write SetMaxValue; // HIMETRIC - property MinPos: Integer read GetMinPos; - property PageBounds: TRect read GetPageBounds; - property Preview: TCustomdxPreview read GetPreview; - property SelectableBounds: TRect read GetSelectableBounds; - public - constructor Create(AMargins: TdxPreviewPageMargins); virtual; - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; - - procedure BeginUpdate; - procedure EndUpdate; - - function DefaultCaption: string; virtual; - function DefaultValue: Integer; virtual; - function GetHitTest: TdxPreviewHitTest; virtual; - function GetCursor: TCursor; virtual; - - function HasPoint(const Pt: TPoint): Boolean; overload; - function HasPoint(const Pt: TSmallPoint): Boolean; overload; - function HasPoint(X, Y: Integer): Boolean; overload; - - property DisplayText: string read GetDisplayText; - property DraggingValue: Integer read GetDraggingValue; - property IsDragging: Boolean read GetIsDragging; - property IsForward: Boolean read GetIsForward; - property IsVertical: Boolean read GetIsVertical; - property Margins: TdxPreviewPageMargins read FMargins; - property VisibleValue: Integer read GetVisibleValue; // pixels - published - property Caption: string read GetCaption write SetCaption stored IsCaptionStored; - property Enabled: Boolean read FEnabled write SetEnabled default True; - property MinValue: Integer read FMinValue write SetMinValue default 0; // HIMETRIC - property Value: Integer read FValue write SetValue stored IsValueStored; // HIMETRIC - property Visible: Boolean read FVisible write SetVisible default True; - end; - - TdxPreviewPageMarginBottom = class(TdxPreviewPageMargin) - protected - function GetIsForceRecalculatePageCount: Boolean; override; - function GetIsForward: Boolean; override; - function GetIsVertical: Boolean; override; - function DoGetActualMaxValue: Integer; override; - function DoGetActualMinValue: Integer; override; - function DoGetMaxMinValue: Integer; override; - function DoPosFromValue(AValue: Integer): Integer; override; - function DoValueFromPos(APos: Integer): Integer; override; - public - function DefaultCaption: string; override; - function DefaultValue: Integer; override; - function GetHitTest: TdxPreviewHitTest; override; - function GetCursor: TCursor; override; - end; - - TdxPreviewPageMarginFooter = class(TdxPreviewPageMargin) - protected - function GetIsForward: Boolean; override; - function GetIsVertical: Boolean; override; - function DoGetActualMaxValue: Integer; override; - function DoGetMaxMinValue: Integer; override; - function DoPosFromValue(AValue: Integer): Integer; override; - function DoValueFromPos(APos: Integer): Integer; override; - public - function DefaultCaption: string; override; - function DefaultValue: Integer; override; - function GetHitTest: TdxPreviewHitTest; override; - function GetCursor: TCursor; override; - end; - - TdxPreviewPageMarginHeader = class(TdxPreviewPageMargin) - protected - function GetIsForward: Boolean; override; - function GetIsVertical: Boolean; override; - function DoGetActualMaxValue: Integer; override; - function DoGetMaxMinValue: Integer; override; - function DoPosFromValue(AValue: Integer): Integer; override; - function DoValueFromPos(APos: Integer): Integer; override; - public - function DefaultCaption: string; override; - function DefaultValue: Integer; override; - function GetHitTest: TdxPreviewHitTest; override; - function GetCursor: TCursor; override; - end; - - TdxPreviewPageMarginLeft = class(TdxPreviewPageMargin) - protected - function GetIsForceRecalculatePageCount: Boolean; override; - function GetIsForward: Boolean; override; - function GetIsVertical: Boolean; override; - function DoGetActualMaxValue: Integer; override; - function DoGetMaxMinValue: Integer; override; - function DoPosFromValue(AValue: Integer): Integer; override; - function DoValueFromPos(APos: Integer): Integer; override; - public - function DefaultCaption: string; override; - function DefaultValue: Integer; override; - function GetHitTest: TdxPreviewHitTest; override; - function GetCursor: TCursor; override; - end; - - TdxPreviewPageMarginRight = class(TdxPreviewPageMargin) - protected - function GetIsForceRecalculatePageCount: Boolean; override; - function GetIsForward: Boolean; override; - function GetIsVertical: Boolean; override; - function DoGetActualMaxValue: Integer; override; - function DoGetMaxMinValue: Integer; override; - function DoPosFromValue(AValue: Integer): Integer; override; - function DoValueFromPos(APos: Integer): Integer; override; - public - function DefaultCaption: string; override; - function DefaultValue: Integer; override; - function GetHitTest: TdxPreviewHitTest; override; - function GetCursor: TCursor; override; - end; - - TdxPreviewPageMarginTop = class(TdxPreviewPageMargin) - protected - function GetIsForceRecalculatePageCount: Boolean; override; - function GetIsForward: Boolean; override; - function GetIsVertical: Boolean; override; - function DoGetActualMaxValue: Integer; override; - function DoGetActualMinValue: Integer; override; - function DoGetMaxMinValue: Integer; override; - function DoPosFromValue(AValue: Integer): Integer; override; - function DoValueFromPos(APos: Integer): Integer; override; - public - function DefaultCaption: string; override; - function DefaultValue: Integer; override; - function GetHitTest: TdxPreviewHitTest; override; - function GetCursor: TCursor; override; - end; - - TdxPreviewPageMarginsClass = class of TdxPreviewPageMargins; - - TdxPreviewPageMargins = class(TPersistent) - private - FMargins: TList; - FPreview: TCustomdxPreview; - FUpdateCount: Integer; - function GetCount: Integer; - function GetMargin(Index: Integer): TdxPreviewPageMargin; - function GetMarginByCaption(const Caption: string): TdxPreviewPageMargin; - function GetMarginByClass(Index: TdxPreviewPageMarginClass): TdxPreviewPageMargin; - function GetMarginBottom: TdxPreviewPageMarginBottom; - function GetMarginFooter: TdxPreviewPageMarginFooter; - function GetMarginHeader: TdxPreviewPageMarginHeader; - function GetMarginLeft: TdxPreviewPageMarginLeft; - function GetMarginRight: TdxPreviewPageMarginRight; - function GetMarginTop: TdxPreviewPageMarginTop; - procedure SetMargin(Index: Integer; Value: TdxPreviewPageMargin); - procedure SetMarginByClass(Index: TdxPreviewPageMarginClass; Value: TdxPreviewPageMargin); - procedure SetMarginBottom(Value: TdxPreviewPageMarginBottom); - procedure SetMarginFooter(Value: TdxPreviewPageMarginFooter); - procedure SetMarginHeader(Value: TdxPreviewPageMarginHeader); - procedure SetMarginLeft(Value: TdxPreviewPageMarginLeft); - procedure SetMarginRight(Value: TdxPreviewPageMarginRight); - procedure SetMarginTop(Value: TdxPreviewPageMarginTop); - protected - procedure DoAssign(Source: TdxPreviewPageMargins); virtual; - procedure DoRestoreDefaults; virtual; - - function AddMargin(AClass: TdxPreviewPageMarginClass): TdxPreviewPageMargin; virtual; - procedure AddMargins; virtual; - procedure FreeAndNilMargins; - procedure Update(AMargin: TdxPreviewPageMargin); virtual; - public - constructor Create(APreview: TCustomdxPreview); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure RestoreDefaults; - - procedure BeginUpdate; - procedure EndUpdate; - - property Count: Integer read GetCount; - property Margins[Index: Integer]: TdxPreviewPageMargin read GetMargin write SetMargin; default; - property MarginsByCaption[const Caption: string]: TdxPreviewPageMargin read GetMarginByCaption; - property MarginsByClass[Index: TdxPreviewPageMarginClass]: TdxPreviewPageMargin read GetMarginByClass write SetMarginByClass; - property Preview: TCustomdxPreview read FPreview; - published - property Bottom: TdxPreviewPageMarginBottom read GetMarginBottom write SetMarginBottom; - property Footer: TdxPreviewPageMarginFooter read GetMarginFooter write SetMarginFooter; - property Header: TdxPreviewPageMarginHeader read GetMarginHeader write SetMarginHeader; - property Left: TdxPreviewPageMarginLeft read GetMarginLeft write SetMarginLeft; - property Right: TdxPreviewPageMarginRight read GetMarginRight write SetMarginRight; - property Top: TdxPreviewPageMarginTop read GetMarginTop write SetMarginTop; - end; - - TdxPreviewPageBackground = class(TdxBackground) - private - FBitmap: TBitmap; - FPreview: TCustomdxPreview; - protected - procedure DoApply; override; - procedure DoChange(AChangeWhats: TdxBackgroundParams); override; - function HasPreview: Boolean; - public - constructor Create; override; - destructor Destroy; override; - procedure Paint(ACanvas: TCanvas; const R: TRect); override; - property Preview: TCustomdxPreview read FPreview; - property OnApply; - end; - - TdxPreviewOptionBehavior = (pobAllowDragMargins, pobHotTrack, pobKeyNavigation, - pobStoreInRegistry, pobThumbTracking, pobAutoSwapMargins, pobNonCenterizePages); - TdxPreviewOptionsBehavior = set of TdxPreviewOptionBehavior; - - TdxPreviewOptionHint = (pohShowForMargins, pohShowOnDrag, pohShowOnScroll); - TdxPreviewOptionsHint = set of TdxPreviewOptionHint; - - TdxPreviewOptionStore = (posZoom); - TdxPreviewOptionsStore = set of TdxPreviewOptionStore; - - TdxPreviewOptionView = (povAutoHideScrollBars, povDefaultDrawPageBackground, povMargins, povPageSelection); - TdxPreviewOptionsView = set of TdxPreviewOptionView; - - TdxPreviewOptionZoom = (pozZoomOnClick, pozZoomOnMouseRoll); - TdxPreviewOptionsZoom = set of TdxPreviewOptionZoom; - - TdxPreviewDragStage = (pdsAfter, pdsBefore, pdsDrag); - TdxPreviewLookAndFeel = (plfStandard, plfFlat, plfUltraFlat); - TdxPreviewMeasurementUnits = (pmuDefault, pmuInches, pmuMillimeters, pmuCentimeters, pmuPoints, pmuPicas); - TdxPreviewPaperOrientation = (ppoPortrait, ppoLandscape); - TdxPreviewScrollDirection = (psdLeft, psdUp, psdRight, psdDown); - TdxPreviewZoomMode = (pzmNone, pzmPageWidth, pzmPages); - - TdxDrawPageContentEvent = procedure(Sender: TObject; ACanvas: TCanvas; - ARect: TRect; APageIndex: Integer) of object; - - TdxGetPageNumberHintEvent = procedure(Sender: TObject; - AStartPage, AEndPage: Integer; var AHintString: string) of object; - - TdxCanShowMarginHintEvent = procedure(Sender: TObject; - var ACanShowHint: Boolean) of object; - - TdxMarginEvent = procedure(Sender: TObject; AMargin: TdxPreviewPageMargin) of object; - - TdxPreviewPageEvent = procedure(Sender: TObject; APageIndex: Integer) of object; - - TdxPageBackgroundDrawEvent = procedure(Sender: TObject; ACanvas: TCanvas; - const ARect: TRect; APageIndex: Integer) of object; - - TdxSelectingPageEvent = procedure(Sender: TObject; APagePage: Integer; - var ACanSelect: Boolean) of object; - - TCustomdxPreview = class(TCustomControl) - private - FActualOriginalPageSize: TPoint; - FBeforeDragPos: Integer; - FBorderStyle: TBorderStyle; - FDC: HDC; - FDraggingMargin: TdxPreviewPageMargin; - FDragOffset: Integer; - FHintHideLongTimer: TTimer; - FHintHideShortTimer: TTimer; - FHintShowTimer: TTimer; - FHintWindow: TCustomControl; - FHintWindowPageNumber: TCustomControl; - FIndent: Integer; - FIsColorAssigned: Boolean; - FIsNoPagesTextAssigned: Boolean; - FLastMousePos: TPoint; - FLeftPos: Integer; - FLookAndFeel: TdxPreviewLookAndFeel; - FMarginColor: TColor; - FMarginPen: HPEN; - FMargins: TdxPreviewPageMargins; - FMaxZoomFactor: Integer; - FMeasurementUnits: TdxPreviewMeasurementUnits; - FMinFooterSize: Integer; - FMinHeaderSize: Integer; - FMinUsefulSize: TPoint; - FMinZoomFactor: Integer; - FNoPagesText: string; - FOptionsBehavior: TdxPreviewOptionsBehavior; - FOptionsHint: TdxPreviewOptionsHint; - FOptionsStore: TdxPreviewOptionsStore; - FOptionsView: TdxPreviewOptionsView; - FOptionsZoom: TdxPreviewOptionsZoom; - FOrientation: TdxPreviewPaperOrientation; - FOriginalPageSize: TdxPointWrapper; - FPageBackground: TdxBackground; - FPages: TList; - FPageSize: TPoint; - FPageStack: TList; - FPageXCount: Integer; - FPageYCount: Integer; - FRegistryPath: string; - FScrollBars: TScrollStyle; - FScrollBarStyle: TScrollBarStyle; - FSelectionFrameThickness: Integer; - FSelPageIndex: Integer; - FTopPos: Integer; - FUnzoomedFactor: Integer; - FUnzoomedMode: TdxPreviewZoomMode; - FUpdateCount: Integer; - FZoomed: Boolean; - FZoomFactor: Integer; - FZoomedFixed: Boolean; - FZooming: Boolean; - FZoomMode: TdxPreviewZoomMode; - FZoomModeFixed: Boolean; - FZoomStep: Integer; - FOnAfterDragMargin: TdxMarginEvent; - FOnBeforeDragMargin: TdxMarginEvent; - FOnCalcPageCount: TNotifyEvent; - FOnDrawPageBackground: TdxPageBackgroundDrawEvent; - FOnDragMargin: TdxMarginEvent; - FOnDrawPageContent: TdxDrawPageContentEvent; - FOnGetPageNumberHint: TdxGetPageNumberHintEvent; - FOnCanShowMarginHint: TdxCanShowMarginHintEvent; - FOnChangePageCount: TNotifyEvent; - FOnMarginChanged: TdxMarginEvent; - FOnPostDrawPageContent: TdxDrawPageContentEvent; - FOnSelectedPageChanged: TdxPreviewPageEvent; - FOnSelectedPageChanging: TdxPreviewPageEvent; - FOnSelectingPage: TdxSelectingPageEvent; - FOnZoomFactorChanged: TNotifyEvent; - FOnZoomModeChanged: TNotifyEvent; - function GetActualMeasurementUnits: TdxPreviewMeasurementUnits; - function GetAllRowCount: Integer; - function GetColCount: Integer; - function GetColor: TColor; - function GetNoPagesText: string; - function GetPage(Index: Integer): TdxPreviewPage; - function GetPageCount: Integer; - function GetRowCount: Integer; - function GetSelPageCol: Integer; - function GetSelPageRow: Integer; - function GetVirtualHeight: Integer; - function GetVirtualWidth: Integer; - function GetVisiblePageSize: TPoint; - function IsColorStored: Boolean; - function IsNoPagesTextStored: Boolean; - procedure SetBorderStyle(Value: TBorderStyle); - procedure SetColor(Value: TColor); - procedure SetLeftPos(Value: Integer); - procedure SetLookAndFeel(Value: TdxPreviewLookAndFeel); - procedure SetMarginColor(Value: TColor); - procedure SetMargins(Value: TdxPreviewPageMargins); - procedure SetMaxZoomFactor(Value: Integer); - procedure SetMinZoomFactor(Value: Integer); - procedure SetMinFooterSize(Value: Integer); - procedure SetMinHeaderSize(Value: Integer); - procedure SetMinUsefulSize(const Value: TPoint); - procedure SetNoPagesText(const Value: string); - procedure SetOnCalcPageCount(Value: TNotifyEvent); - procedure SetOptionsBehavior(Value: TdxPreviewOptionsBehavior); - procedure SetOptionsHint(Value: TdxPreviewOptionsHint); - procedure SetOptionsStore(Value: TdxPreviewOptionsStore); - procedure SetOptionsView(Value: TdxPreviewOptionsView); - procedure SetOptionsZoom(Value: TdxPreviewOptionsZoom); - procedure SetOrientation(Value: TdxPreviewPaperOrientation); - procedure SetOriginalPageSize(Value: TdxPointWrapper); - procedure SetPageBackground(Value: TdxBackground); - procedure SetPageCount(Value: Integer); - procedure SetPageXCount(Value: Integer); - procedure SetPageYCount(Value: Integer); - procedure SetScrollBars(Value: TScrollStyle); - procedure SetScrollBarStyle(Value: TScrollBarStyle); - procedure SetSelectionFrameThickness(Value: Integer); - procedure SetSelPageIndex(Value: Integer); - procedure SetTopPos(Value: Integer); - procedure SetZoomed(Value: Boolean); - procedure SetZoomFactor(Value: Integer); - procedure SetZoomMode(Value: TdxPreviewZoomMode); - procedure SetZoomStep(Value: Integer); - - procedure AdjustOrientation; - procedure AdjustPagesBounds; - - procedure DrawNoPages; - procedure DrawPages; - procedure DrawPagesContent; - procedure DrawRestSpaceBackgroundRect(const R: TRect); - procedure DrawRestSpaceBackgroundRgn(ARgn: HRGN); - - procedure PageParametersChanging(Sender: TObject; Coords: TdxPointCoords; - var Values: array of Integer); - procedure PageParametersChanged(Sender: TObject; Coords: TdxPointCoords); - procedure ResyncSelPageIndex; - - function CanAnyScrolling: Boolean; - function CanHorzScrolling: Boolean; - function CanPageScrolling(ADirection: TdxPreviewScrollDirection): Boolean; - function CanVertScrolling: Boolean; - function CanHorzScrollBarBeVisible: Boolean; - function CanVertScrollBarBeVisible: Boolean; - function DoublePassUpdateScrollBars: Boolean; - function GetScrollInfo(ABarFlag: Integer; var AScrollInfo: TScrollInfo): BOOL; - procedure ScrollPage(ADirection: TdxPreviewScrollDirection); - function SetScrollInfo(ABarFlag: Integer; const AScrollInfo: TScrollInfo; ARedraw: BOOL): Integer; - procedure UpdateScrollBars; - - procedure CancelDragMargin; - function CanChangeMargins: Boolean; - procedure ClearLastMousePos; - procedure RecreateMarginPen; - - procedure ActivateHint(AMargin: TdxPreviewPageMargin); - procedure CancelHintHide; - procedure CancelHintShow; - procedure CreateHint; - procedure DestroyHint; - procedure ResetHintShowTimer(X, Y: Integer); - procedure StartHintShow; - - procedure DestroyPageNumberHint; - procedure UpdatePageNumberHint; - - procedure DesignerModified; - function IsDesigning: Boolean; - function IsParentFormActive: Boolean; - - procedure HintHideLongTimerHandler(Sender: TObject); - procedure HintHideShortTimerHandler(Sender: TObject); - procedure HintShowTimerHandler(Sender: TObject); - - procedure ReadIsNoPagesTextAssigned(AReader: TReader); - procedure WriteIsNoPagesTextAssigned(AWriter: TWriter); - - procedure WMCaptureChanged(var Message: TMessage); Message WM_CAPTURECHANGED; - procedure WMDestroy(var Message: TWMDestroy); Message WM_DESTROY; - procedure WMGetDlgCode(var Message: TWMGetDlgCode); Message WM_GETDLGCODE; - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); Message WM_ERASEBKGND; - procedure WMHScroll(var Message: TWMHScroll); Message WM_HSCROLL; - procedure WMKillFocus(var Message: TWMKillFocus); Message WM_KILLFOCUS; - procedure WMRButtonUp(var Message: TWMRButtonUp); Message WM_RBUTTONUP; - procedure WMMouseActivate(var Message: TWMMouseActivate); Message WM_MOUSEACTIVATE; - procedure WMMouseWheel(var Message: TWMMouseWheel); Message WM_MOUSEWHEEL; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); Message WM_NCCALCSIZE; - procedure WMNCDestroy(var Message: TWMNCDestroy); Message WM_NCDESTROY; - procedure WMNCHitTest(var Message: TWMNCHitTest); Message WM_NCHITTEST; - procedure WMNCPaint(var Message: TWMNCPaint); Message WM_NCPAINT; - procedure WMSetCursor(var Message: TWMSetCursor); Message WM_SETCURSOR; - procedure WMSize(var Message: TWMSize); Message WM_SIZE; - procedure WMVScroll(var Message: TWMVScroll); Message WM_VSCROLL; - procedure CMCancelMode(var Message: TCMCancelMode); Message CM_CANCELMODE; - procedure CMColorChanged(var Message: TMessage); Message CM_COLORCHANGED; - procedure CMCtl3DChanged(var Message: TMessage); Message CM_CTL3DCHANGED; - procedure CMDesignHitTest(var Message: TCMDesignHitTest); Message CM_DESIGNHITTEST; - procedure CMHintShow(var Message: TCMHintShow); Message CM_HINTSHOW; - procedure CMSysColorChange(var Message: TMessage); Message CM_SYSCOLORCHANGE; - protected - procedure AdjustSize; override; - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWindowHandle(const Params: TCreateParams); override; - procedure CreateWnd; override; - procedure DefineProperties(Filer: TFiler); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure Loaded; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure Paint; override; - procedure WndProc(var Message: TMessage); override; - - function CreateMargins: TdxPreviewPageMargins; virtual; - function GetMarginsClass: TdxPreviewPageMarginsClass; virtual; - - function CreatePage: TdxPreviewPage; virtual; - function GetPageClass: TdxPreviewPageClass; virtual; - - function CheckLeftPos(Value: Integer): Integer; - function CheckTopPos(Value: Integer): Integer; - procedure CheckMargins; - procedure CheckZoomFactor; - procedure DoScrolling; - - function CanSelectPage(APageIndex: Integer): Boolean; dynamic; - function CanShowMarginHint: Boolean; dynamic; - procedure DoAfterDragMargin(AMargin: TdxPreviewPageMargin); dynamic; - procedure DoBeforeDragMargin(AMargin: TdxPreviewPageMargin); dynamic; - procedure DoCalcPageCount; dynamic; - procedure DoChangePageCount; dynamic; - procedure DoDragMargin(AMargin: TdxPreviewPageMargin); dynamic; - procedure DoDrawPageContent(R: TRect; APageIndex: Integer); dynamic; - procedure DoGetPageNumberHintText(out AText: string); dynamic; - procedure DoMarginChanged(AMargin: TdxPreviewPageMargin); dynamic; - procedure DoZoomFactorChanged; dynamic; - procedure DoZoomModeChanged; dynamic; - procedure DoSelectedPageChanging; dynamic; - procedure DoSelectedPageChanged; dynamic; - - procedure DrawMargins(DC: HDC); - procedure DrawPageBackground(const R: TRect; APageIndex: Integer); virtual; - procedure DrawPageBorder(DC: HDC; APageIndex: Integer); virtual; - - procedure InvalidateMargins; - procedure InvalidatePageBorder(APageIndex: Integer); - - property ScrollBarStyle: TScrollBarStyle read FScrollBarStyle write SetScrollBarStyle default ssRegular; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - procedure LoadFromRegistry(const ARegistryPath: string); virtual; - procedure SaveToRegistry(const ARegistryPath: string); virtual; - - function DefaultColor: TColor; virtual; - function DefaultNoPagesText: string; virtual; - - procedure BeginUpdate; - procedure CancelUpdate; - procedure EndUpdate; - function IsUpdateLocked: Boolean; - - procedure GetPartVisiblePageRanges(AStartIndex, AEndIndex: PInteger ); overload; - procedure GetPartVisiblePageRanges(out AStartIndex, AEndIndex: Integer); overload; - procedure GetVisiblePageRanges(AStartIndex, AEndIndex: PInteger ); overload; - procedure GetVisiblePageRanges(out AStartIndex, AEndIndex: Integer); overload; - - procedure InvalidatePage(APageIndex: Integer); - procedure InvalidatePages; - procedure InvalidatePagesContent; - procedure InvalidatePagesFooter; - procedure InvalidatePagesHeader; - - procedure CalcPagesBounds(ATopPos, VWidth, VHeight: Integer); - function GetHitInfoAt(const Pt: TPoint): TdxPreviewHitTests; overload; - function GetHitInfoAt(const Pt: TSmallPoint): TdxPreviewHitTests; overload; - function GetHitInfoAt(X, Y: Integer): TdxPreviewHitTests; overload; - procedure HideAllHints; - procedure MakeVisible(APageIndex: Integer); - procedure SetPageXYCount(XCount, YCount: Integer); - - procedure ZoomIn; - procedure ZoomOut; - - function MarginFromPoint(const Pt: TPoint): TdxPreviewPageMargin; overload; - function MarginFromPoint(const Pt: TSmallPoint): TdxPreviewPageMargin; overload; - function MarginFromPoint(X, Y: Integer): TdxPreviewPageMargin; overload; - function MarginValueToString(Value: Integer): string; - - function IndexOfPage(APage: TdxPreviewPage): Integer; - function PageIndexFromPoint(const Pt: TPoint): Integer; overload; - function PageIndexFromPoint(const Pt: TSmallPoint): Integer; overload; - function PageIndexFromPoint(X, Y: Integer): Integer; overload; - function PageSizeToString: string; - - procedure SelectFirstPage; - procedure SelectLastPage; - procedure SelectNextPage; - procedure SelectPrevPage; - - property ActualMeasurementUnits: TdxPreviewMeasurementUnits read GetActualMeasurementUnits; - property ActualOriginalPageSize: TPoint read FActualOriginalPageSize; // in tenths of a mm with Orientation - property AllRowCount: Integer read GetAllRowCount; - property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle default bsSingle; - property ColCount: Integer read GetColCount; - property Color: TColor read GetColor write SetColor stored IsColorStored default clDefault; - property DraggingMargin: TdxPreviewPageMargin read FDraggingMargin; - property Indent: Integer read FIndent; - property LeftPos: Integer read FLeftPos write SetLeftPos; - property LookAndFeel: TdxPreviewLookAndFeel read FLookAndFeel write SetLookAndFeel default plfStandard; - property MarginColor: TColor read FMarginColor write SetMarginColor default clWindowText; - property Margins: TdxPreviewPageMargins read FMargins write SetMargins; - property MaxZoomFactor: Integer read FMaxZoomFactor write SetMaxZoomFactor default 500; - property MeasurementUnits: TdxPreviewMeasurementUnits read FMeasurementUnits write FMeasurementUnits default pmuDefault; - property MinFooterSize: Integer read FMinFooterSize write SetMinFooterSize default dxPreviewMinHeaderFooterSize; - property MinHeaderSize: Integer read FMinHeaderSize write SetMinHeaderSize default dxPreviewMinHeaderFooterSize; - property MinUsefulSize: TPoint read FMinUsefulSize write SetMinUsefulSize; - property MinZoomFactor: Integer read FMinZoomFactor write SetMinZoomFactor default 10; - property NoPagesText: string read GetNoPagesText write SetNoPagesText stored IsNoPagesTextStored; - property OptionsBehavior: TdxPreviewOptionsBehavior read FOptionsBehavior write SetOptionsBehavior - default [pobAllowDragMargins, pobKeyNavigation, pobThumbTracking, pobAutoSwapMargins]; - property OptionsHint: TdxPreviewOptionsHint read FOptionsHint write SetOptionsHint - default [pohShowForMargins, pohShowOnDrag, pohShowOnScroll]; - property OptionsStore: TdxPreviewOptionsStore read FOptionsStore write SetOptionsStore default [posZoom]; - property OptionsView: TdxPreviewOptionsView read FOptionsView write SetOptionsView - default [povAutoHideScrollBars, povDefaultDrawPageBackground, povMargins, povPageSelection]; - property OptionsZoom: TdxPreviewOptionsZoom read FOptionsZoom write SetOptionsZoom default [pozZoomOnClick]; - property Orientation: TdxPreviewPaperOrientation read FOrientation write SetOrientation default ppoPortrait; - property OriginalPageSize: TdxPointWrapper read FOriginalPageSize write SetOriginalPageSize; // in tenths of a mm - property PageBackground: TdxBackground read FPageBackground write SetPageBackground; - property PageCount: Integer read GetPageCount write SetPageCount; - property Pages[Index: Integer]: TdxPreviewPage read GetPage; - property PageSize: TPoint read FPageSize; // in pixels = 100% zoom - property PageXCount: Integer read FPageXCount write SetPageXCount default 1; - property PageYCount: Integer read FPageYCount write SetPageYCount default 1; - property RegistryPath: string read FRegistryPath write FRegistryPath; - property RowCount: Integer read GetRowCount; - property ScrollBars: TScrollStyle read FScrollBars write SetScrollBars default ssBoth; - property SelectionFrameThickness: Integer read FSelectionFrameThickness write SetSelectionFrameThickness default 2; - property SelPageCol: Integer read GetSelPageCol; - property SelPageIndex: Integer read FSelPageIndex write SetSelPageIndex; - property SelPageRow: Integer read GetSelPageRow; - property TopPos: Integer read FTopPos write SetTopPos; - property VirtualHeight: Integer read GetVirtualHeight; - property VirtualWidth: Integer read GetVirtualWidth; - property VisiblePageSize: TPoint read GetVisiblePageSize; - property Zoomed: Boolean read FZoomed write SetZoomed; - property ZoomFactor: Integer read FZoomFactor write SetZoomFactor stored True default 100; - property ZoomMode: TdxPreviewZoomMode read FZoomMode write SetZoomMode default pzmNone; //Pages; - property ZoomStep: Integer read FZoomStep write SetZoomStep default 10; - - property OnAfterDragMargin: TdxMarginEvent read FOnAfterDragMargin write FOnAfterDragMargin; - property OnBeforeDragMargin: TdxMarginEvent read FOnBeforeDragMargin write FOnBeforeDragMargin; - property OnCalcPageCount: TNotifyEvent read FOnCalcPageCount write SetOnCalcPageCount; - property OnDrawPageBackground: TdxPageBackgroundDrawEvent read FOnDrawPageBackground write FOnDrawPageBackground; - property OnDragMargin: TdxMarginEvent read FOnDragMargin write FOnDragMargin; - property OnDrawPageContent: TdxDrawPageContentEvent read FOnDrawPageContent write FOnDrawPageContent; - property OnGetPageNumberHint: TdxGetPageNumberHintEvent read FOnGetPageNumberHint write FOnGetPageNumberHint; - property OnCanShowMarginHint: TdxCanShowMarginHintEvent read FOnCanShowMarginHint write FOnCanShowMarginHint; - property OnChangePageCount: TNotifyEvent read FOnChangePageCount write FOnChangePageCount; - property OnMarginChanged: TdxMarginEvent read FOnMarginChanged write FOnMarginChanged; - property OnPostDrawPageContent: TdxDrawPageContentEvent read FOnPostDrawPageContent write FOnPostDrawPageContent; - property OnSelectedPageChanged: TdxPreviewPageEvent read FOnSelectedPageChanged write FOnSelectedPageChanged; - property OnSelectedPageChanging: TdxPreviewPageEvent read FOnSelectedPageChanging write FOnSelectedPageChanging; - property OnSelectingPage: TdxSelectingPageEvent read FOnSelectingPage write FOnSelectingPage; - property OnZoomFactorChanged: TNotifyEvent read FOnZoomFactorChanged write FOnZoomFactorChanged; - property OnZoomModeChanged: TNotifyEvent read FOnZoomModeChanged write FOnZoomModeChanged; - end; - - TdxPreview = class(TCustomdxPreview) - published - property Align; - property Anchors; - property BorderStyle; - property Color default clBtnShadow; - property Constraints; - property Ctl3D; - property DragMode; - property Enabled; - property LookAndFeel; - property MarginColor; - property Margins; - property MaxZoomFactor; - property MeasurementUnits; - property MinFooterSize; - property MinHeaderSize; - property MinZoomFactor; - property OptionsBehavior; - property OptionsHint; - property OptionsStore; - property OptionsView; - property OptionsZoom; - property Orientation; - property OriginalPageSize; - property PageBackground; - property PageXCount; - property PageYCount; - {$IFDEF DELPHI7} - property ParentBackground; - {$ENDIF} - property ParentColor default False; - property ParentCtl3D; - property ParentShowHint; - property PopupMenu; - property ScrollBars; - property ShowHint; - property TabOrder; - property TabStop; - property Visible; - property ZoomFactor; - property ZoomMode; - property ZoomStep; - property OnAfterDragMargin; - property OnBeforeDragMargin; - property OnCalcPageCount; - property OnCanResize; - property OnConstrainedResize; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - property OnClick; - property OnDblClick; - property OnDragDrop; - property OnDragMargin; - property OnDragOver; - property OnDrawPageBackground; - property OnDrawPageContent; - property OnEndDrag; - property OnEnter; - property OnExit; - property OnGetPageNumberHint; - property OnCanShowMarginHint; - property OnMarginChanged; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnResize; - property OnSelectedPageChanged; - property OnSelectedPageChanging; - property OnSelectingPage; - property OnStartDrag; - property OnZoomFactorChanged; - property OnZoomModeChanged; - end; - -const - phtMargins: TdxPreviewHitTests = [phtMarginLeft..phtMarginFooter]; - phtMarginsHorz: TdxPreviewHitTests = [phtMarginTop, phtMarginBottom, phtMarginHeader]; - phtMarginsVert: TdxPreviewHitTests = [phtMarginLeft, phtMarginRight]; - PreviewScrollBarStyleMap: array[TdxPreviewLookAndFeel] of TScrollBarStyle = (ssRegular, ssFlat, ssHotTrack); - -implementation - -uses - {$IFDEF DELPHI7} - Themes, - UxTheme, - {$ENDIF} - Math, TypInfo, Registry, CommCtrl, cxClasses, dxPSRes, dxPSImgs, dxExtCtrls; - -type - TFloat = Extended; - -const - { strings used when saving(loading) properties to(from) registry } - sdxOptionsBehavior = 'OptionsBehavior'; // Don't localize - sdxOptionsHint = 'OptionHint'; // Don't localize - sdxOptionsView = 'OptionView'; // Don't localize - sdxOptionsZoom = 'OptionZoom'; // Don't localize - sdxZoomFactor = 'ZoomFactor'; // Don't localize - sdxZoomStep = 'ZoomStep'; // Don't localize - sdxZoomMode = 'ZoomMode'; // Don't localize - sdxPageXCount = 'PageXCount'; // Don't localize - sdxPageYCount = 'PageYCount'; // Don't localize - sdxMarginColor = 'MarginColor'; // Don't localize - sdxMeasurementUnits = 'MeasurementUnits'; // Don't localize - sdxOrientation = 'Orientation'; // Don't localize - - NullDraggingPos = -Maxint; - dxShowHintTimerID = 1; - dxHideHintTimerID = 2; - - dxPreviewHideHintShortTime = 500; - dxPreviewHideHintLongTime = 10000; - dxPreviewShowHintTime = 500; - -var - A4_LOMETRIC: TPoint = (X: 2100; Y: 2970); - FLongShowHintTime: DWORD; - - crdxPreviewHorzResize: TCursor; - crdxPreviewVertResize: TCursor; - crdxPreviewZoomIn: TCursor; - crdxPreviewZoomOut: TCursor; - crdxPreviewFullScroll: TCursor; - crdxPreviewHorzScroll: TCursor; - crdxPreviewVertScroll: TCursor; - crdxPreviewUpScroll: TCursor; - crdxPreviewRightScroll: TCursor; - crdxPreviewDownScroll: TCursor; - crdxPreviewLeftScroll: TCursor; - crdxPreviewTopLeftScroll: TCursor; - crdxPreviewBottomLeftScroll: TCursor; - crdxPreviewTopRightLeftScroll: TCursor; - crdxPreviewBottomRightScroll: TCursor; - - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} -{$ENDIF} - -function GetDefaultMeasurementUnits: TdxPreviewMeasurementUnits; -begin - if GetLocaleChar(LOCALE_USER_DEFAULT, LOCALE_IMEASURE, '0') = '0' then - Result := pmuMillimeters - else - Result := pmuInches; -end; - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM ON} -{$ENDIF} - -function LoMetricToPixels(const Pt: TPoint): TPoint; overload; -var - DC: HDC; -begin - DC := GetDC(0); - try - Result.X := MulDiv(Pt.X, GetDeviceCaps(DC, LOGPIXELSX), 254); - Result.Y := MulDiv(Pt.Y, GetDeviceCaps(DC, LOGPIXELSY), 254); - //Result.X := MulDiv(Value.X, GetDeviceCaps(DC, HORZRES), 10 * GetDeviceCaps(DC, HORZSIZE)); - //Result.Y := MulDiv(Value.Y, GetDeviceCaps(DC, VERTRES), 10 * GetDeviceCaps(DC, VERTSIZE)); - finally - ReleaseDC(0, DC); - end; -end; - -function LoMetricToPixels(Value: Integer): Integer; overload; -var - DC: HDC; -begin - DC := GetDC(0); - try - Result := MulDiv(Value, GetDeviceCaps(DC, LOGPIXELSX), 254); - //Result := MulDiv(Value, GetDeviceCaps(DC, HORZRES), 10 * GetDeviceCaps(DC, HORZSIZE)); - finally - ReleaseDC(0, DC); - end; -end; - -function PixelsToLoMetric(Value: Integer): Integer; -var - DC: HDC; -begin - DC := GetDC(0); - try - Result := MulDiv(Value, 254, GetDeviceCaps(DC, LOGPIXELSX)); - finally - ReleaseDC(0, DC); - end; -end; - -function LoMetricToAnother(Units: TdxPreviewMeasurementUnits; Value: Integer): TFloat; -var - AUnits: TdxPreviewMeasurementUnits; -begin - if Units = pmuDefault then - AUnits := GetDefaultMeasurementUnits - else - AUnits := Units; - - case AUnits of - pmuInches: - Result := Value / 254; - pmuMillimeters: - Result := Value / 10; - pmuCentimeters: - Result := Value / 100; - pmuPoints: - Result := Value * 72 / 254; - else { pmuPicas} - Result := Value * 6 / 254; - end; -end; - -function Min(const V1, V2: Integer): Integer; -begin - if V1 < V2 then - Result := V1 - else - Result := V2; -end; - -function Max(const V1, V2: Integer): Integer; -begin - if V1 > V2 then - Result := V1 - else - Result := V2; -end; - -function MinMax(const V, V1, V2: Integer): Integer; -begin - if (V2 >= V1) then - begin - if (V < V1) then - Result := V1 - else if (V > V2) then - Result := V2 - else - Result := V; - end - else - Result := V2; -end; - -type - TdxPreviewHintWindow = class(TCustomControl) - private - FirstPos: TPoint; - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); Message WM_ERASEBKGND; - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure Paint; override; - - procedure DrawBorder(DC: HDC; R: TRect); - procedure DrawText(DC: HDC; const R: TRect); - public - constructor Create(AOwner: TComponent); override; - procedure ActivateHint(P: TPoint; const AHint: string; Margin: TdxPreviewPageMargin); - end; - -constructor TdxPreviewHintWindow.Create(AOwner: TComponent); -var - AMetrics: TNonClientMetrics; -begin - inherited; -{$IFDEF DELPHI14} - AMetrics.cbSize := TNonClientMetrics.SizeOf; -{$ELSE} - AMetrics.cbSize := SizeOf(TNonClientMetrics); -{$ENDIF} - if SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, @AMetrics, 0) then - Canvas.Font.Handle := CreateFontIndirect(AMetrics.lfStatusFont) - else - Canvas.Font.Size := 8; -end; - -procedure TdxPreviewHintWindow.ActivateHint(P: TPoint; const AHint: string; Margin: TdxPreviewPageMargin); -var - R: TRect; - AWidth, AHeight: Integer; -begin - Application.CancelHint; - Caption := AHint; - - R := MakeRect(0, 0, Screen.Width, 0); - Windows.DrawText(Canvas.Handle, PChar(AHint), Length(AHint), R, - DT_CALCRECT or DT_LEFT or DT_NOPREFIX); - Inc(R.Right, 2 * (1 + 2)); - Inc(R.Bottom, 2 * (1 + 2)); - AWidth := R.Right; - AHeight := R.Bottom; - if IsWindowVisible(Handle) then - begin - if AWidth < Width then AWidth := Width; - if AHeight < Height then AHeight := Height; - end - else - FirstPos := P; - - if Assigned(Margin) then - begin - if Margin.IsForward then - if Margin.IsVertical then - OffsetRect(R, -(dxPreviewDragHintOffset + AWidth), dxPreviewDragHintOffset) - else - OffsetRect(R, dxPreviewDragHintOffset, -(dxPreviewDragHintOffset + AHeight)) - else - OffsetRect(R, dxPreviewDragHintOffset, dxPreviewDragHintOffset); - end - else {scroll bar hint} - OffsetRect(R, -(GetSystemMetrics(SM_CXVSCROLL) + AWidth), 0); - - OffsetRect(R, FirstPos.X, FirstPos.Y); - - with R do - begin - if Right > Screen.Width then - OffsetRect(R, Screen.Width - Right, 0); - if Bottom > Screen.Height then - OffsetRect(R, 0, Screen.Height - Bottom); - if Left < 0 then OffsetRect(R, -Left, 0); - if Top < 0 then OffsetRect(R, 0, -Top); - end; - - if IsWindowVisible(Handle) then - if (Width <> AWidth) or (Height <> AHeight) then - ShowWindow(Handle, SW_HIDE) - else - begin - InvalidateRect(Handle, nil, False); - UpdateWindow(Handle); - end; - - if not IsWindowVisible(Handle) then - SetWindowPos(Handle, HWND_TOPMOST, R.Left, R.Top, AWidth, AHeight, - SWP_SHOWWINDOW or SWP_NOACTIVATE); -end; - -procedure TdxPreviewHintWindow.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - Message.Result := 1; -end; - -procedure TdxPreviewHintWindow.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); - with Params do - begin - Style := WS_POPUP or WS_DISABLED; - WindowClass.Style := WindowClass.Style or CS_SAVEBITS; - if IsWin32Version(5, 1) then - WindowClass.Style := WindowClass.Style or CS_DROPSHADOW; - ExStyle := WS_EX_TOOLWINDOW; - end; -end; - -procedure TdxPreviewHintWindow.Paint; -var - R: TRect; - DC: HDC; -begin - //GetClientRect(Handle, ); - R := ClientRect; - DC := Canvas.Handle; - DrawBorder(DC, R); - InflateRect(R, -1, -1); - DrawText(DC, R); -end; - -procedure TdxPreviewHintWindow.DrawBorder(DC: HDC; R: TRect); -begin - {$IFDEF DELPHI7} - with ThemeServices do - if ThemesEnabled then - begin - DrawEdge(DC, GetElementDetails(twWindowRoot), R, BDR_RAISEDOUTER, BF_RECT); - Exit; - end; - {$ENDIF} - DrawEdge(DC, R, BDR_RAISEDOUTER, BF_RECT); -end; - -procedure TdxPreviewHintWindow.DrawText(DC: HDC; const R: TRect); -begin - SetTextColor(DC, GetSysColor(COLOR_INFOTEXT)); - SetBkColor(DC, GetSysColor(COLOR_INFOBK)); - ExtTextOut(DC, R.Left + 2, R.Top + 2, ETO_OPAQUE, @R, PChar(Caption), Length(Caption), nil); -end; - -{ TdxPreviewPageBackground } - -constructor TdxPreviewPageBackground.Create; -begin - inherited; - FBitmap := TBitmap.Create; -end; - -destructor TdxPreviewPageBackground.Destroy; -begin - FreeAndNil(FBitmap); - inherited; -end; - -procedure TdxPreviewPageBackground.Paint(ACanvas: TCanvas; const R: TRect); -begin - if (Mode = bmPicture) and (PictureMode = ppmCenter) and (Preview.ZoomFactor <> 100) then - begin - FBitmap.Width := MulDiv(Picture.Width, Preview.ZoomFactor, 100); - FBitmap.Height := MulDiv(Picture.Height, Preview.ZoomFactor, 100); - FBitmap.Canvas.StretchDraw(MakeRect(0, 0, FBitmap.Width, FBitmap.Height), Picture); - dxBkgnd.DrawPicture(FBitmap, ACanvas, R, PictureMode, 1, 1); - end - else - inherited; -end; - -procedure TdxPreviewPageBackground.DoApply; -begin - inherited; - if HasPreview and not Preview.IsUpdateLocked then - begin - Preview.InvalidatePages; - Preview.DesignerModified; - end; -end; - -procedure TdxPreviewPageBackground.DoChange(AChangeWhats: TdxBackgroundParams); -begin - inherited; - if (UpdateCount = 0) and IsRepaintNeeded and HasPreview and not Preview.IsUpdateLocked then - FPreview.InvalidatePages; -end; - -function TdxPreviewPageBackground.HasPreview: Boolean; -begin - Result := Preview <> nil; -end; - -{ TdxPreviewPage } - -constructor TdxPreviewPage.Create(APreview: TCustomdxPreview); -begin - inherited Create; - Assert(APreview <> nil); - FPreview := APreview; -end; - -function TdxPreviewPage.GetCursor: TCursor; -begin - //if Selected then - if Zoomed then - Result := crdxPreviewZoomOut - else - Result := crdxPreviewZoomIn; -end; - -function TdxPreviewPage.HasPoint(const Pt: TPoint): Boolean; -var - R: TRect; -begin - Result := IntersectRect(R, SiteBounds, Preview.ClientRect) and PtInRect(R, Pt); -end; - -function TdxPreviewPage.HasPoint(X, Y: Integer): Boolean; -begin - Result := HasPoint(MakePoint(X, Y)); -end; - -procedure TdxPreviewPage.MakeVisible; -begin - Preview.MakeVisible(Index); -end; - -function TdxPreviewPage.GetIndex: Integer; -begin - Result := Preview.IndexOfPage(Self); -end; - -function TdxPreviewPage.GetPartVisible: Boolean; -var - R: TRect; -begin - Result := IntersectRect(R, Bounds, Preview.ClientRect); -end; - -function TdxPreviewPage.GetSelected: Boolean; -begin - Result := Preview.SelPageIndex = Index; -end; - -function TdxPreviewPage.GetSiteBounds: TRect; -begin - Result := Bounds; - with Result do - begin - Dec(Left, 2); - Dec(Top, 2); - Inc(Right, Preview.Indent - 2); - Inc(Bottom, Preview.Indent - 2); - end; -end; - -function TdxPreviewPage.GetVisible: Boolean; -var - R: TRect; -begin - Result := IntersectRect(R, Bounds, Preview.ClientRect) and EqualRect(R, Bounds); -end; - -function TdxPreviewPage.GetZoomed: Boolean; -begin - Result := Selected and Preview.Zoomed; -end; - -procedure TdxPreviewPage.SetBounds(const Value: TRect); -begin - FBounds := Value; -end; - -procedure TdxPreviewPage.SetSelected(Value: Boolean); -begin - Preview.SelPageIndex := Index; -end; - -{ TdxPreviewPageMargin } - -constructor TdxPreviewPageMargin.Create(AMargins: TdxPreviewPageMargins); -begin - inherited Create; - FMargins := AMargins; - FDraggingPos := NullDraggingPos; - FEnabled := True; - FMaxValue := -1; - FVisible := True; -end; - -procedure TdxPreviewPageMargin.Assign(Source: TPersistent); -begin - if Source is TdxPreviewPageMargin then - begin - BeginUpdate; - try - DoAssign(TdxPreviewPageMargin(Source)); - finally - EndUpdate; - end; - end - else - inherited; -end; - -procedure TdxPreviewPageMargin.RestoreDefaults; -begin - BeginUpdate; - try - DoRestoreDefaults; - finally - EndUpdate; - end; -end; - -procedure TdxPreviewPageMargin.BeginUpdate; -begin - if Margins <> nil then Margins.BeginUpdate; -end; - -procedure TdxPreviewPageMargin.EndUpdate; -begin - if Margins <> nil then Margins.EndUpdate; -end; - -function TdxPreviewPageMargin.DefaultCaption: string; -begin - Result := ''; -end; - -function TdxPreviewPageMargin.DefaultValue: Integer; -begin - Result := 0; -end; - -function TdxPreviewPageMargin.GetHitTest: TdxPreviewHitTest; -begin - Result := phtPage; -end; - -function TdxPreviewPageMargin.GetCursor: TCursor; -begin - Result := crDefault; -end; - -function TdxPreviewPageMargin.HasPoint(const Pt: TPoint): Boolean; -begin - Result := Visible and Enabled and PtInRect(SelectableBounds, Pt); -end; - -function TdxPreviewPageMargin.HasPoint(const Pt: TSmallPoint): Boolean; -begin - Result := HasPoint(SmallPointToPoint(Pt)); -end; - -function TdxPreviewPageMargin.HasPoint(X, Y: Integer): Boolean; -begin - Result := HasPoint(MakePoint(X, Y)); -end; - -procedure TdxPreviewPageMargin.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('IsCaptionAssigned', ReadIsCaptionAssigned, WriteIsCaptionAssigned, - FIsCaptionAssigned and (FCaption = '')); -end; - -function TdxPreviewPageMargin.GetIsForceRecalculatePageCount: Boolean; -begin - Result := False; -end; - -function TdxPreviewPageMargin.GetIsForward: Boolean; -begin - Result := False; -end; - -function TdxPreviewPageMargin.GetIsVertical: Boolean; -begin - Result := False; -end; - -function TdxPreviewPageMargin.DoGetActualMaxValue: Integer; -begin - Result := MaxValue; -end; - -function TdxPreviewPageMargin.DoGetActualMinValue: Integer; -begin - Result := MinValue; -end; - -function TdxPreviewPageMargin.DoGetMaxMinValue: Integer; -begin - Result := 0; -end; - -function TdxPreviewPageMargin.DoPosFromValue(AValue: Integer): Integer; -begin - Result := AValue; -end; - -function TdxPreviewPageMargin.DoValueFromPos(APos: Integer): Integer; -begin - Result := APos; -end; - -procedure TdxPreviewPageMargin.Changed(HardRefresh: Boolean); -begin - if Margins <> nil then - if HardRefresh then - Margins.Update(nil) - else - Margins.Update(Self) -end; - -procedure TdxPreviewPageMargin.DoAssign(Source: TdxPreviewPageMargin); -begin - Enabled := Source.Enabled; - MaxValue := Source.MaxValue; - MinValue := Source.MinValue; - Value := Source.Value; - Visible := Source.Visible; -end; - -procedure TdxPreviewPageMargin.DoDragAfter; -begin - if Preview <> nil then - begin - Preview.DestroyHint; - DeleteObject(FScreenBitmap); - Invert(Preview.FDC); - Preview.DoAfterDragMargin(Self); - end; -end; - -procedure TdxPreviewPageMargin.DoDragBefore; -var - DC: HDC; -begin - if Preview <> nil then - begin - Preview.DoBeforeDragMargin(Self); - - DC := GetDC(Preview.Handle); - try - Invert(DC); - with PageBounds do - if IsVertical then - FScreenBitmap := CreateCompatibleBitmap(DC, 1, Bottom - Top) - else - FScreenBitmap := CreateCompatibleBitmap(DC, Right - Left, 1); - finally - ReleaseDC(Preview.Handle, DC); - end; - - with Preview do - if pohShowOnDrag in OptionsHint then - CreateHint - else - DestroyHint; - end; -end; - -procedure TdxPreviewPageMargin.DoRestoreDefaults; -begin - Enabled := True; - MaxValue := -1; - MinValue := 0; - Value := DefaultValue; - Visible := True; - FIsCaptionAssigned := False; -end; - -procedure TdxPreviewPageMargin.Draw(DC: HDC); -var - R: TRect; - Pen: HPEN; -begin - if Preview <> nil then - begin - R := Bounds; - Pen := SelectObject(DC, Preview.FMarginPen); - SetBkMode(DC, Windows.TRANSPARENT); - with R do - if IsVertical then - begin - MoveToEx(DC, Left, Top, nil); - LineTo(DC, Left, Bottom); - end - else - begin - MoveToEx(DC, Left, Top, nil); - LineTo(DC, Right, Top); - end; - SetBkMode(DC, Windows.OPAQUE); - SelectObject(DC, Pen); - end; -end; - -procedure TdxPreviewPageMargin.Invalidate; -var - R: TRect; -begin - if (Preview <> nil) and Preview.HandleAllocated then - begin - R := Bounds; - if IsVertical then - Inc(R.Right) - else - Inc(R.Bottom); - - InvalidateRect(Preview.Handle, @R, False); - end; -end; - -procedure TdxPreviewPageMargin.Invert(DC: HDC); -begin - with Bounds do - BitBlt(DC, Left, Top, - Right - Left + Ord(IsVertical), Bottom - Top + Ord(not IsVertical), 0, 0, 0, DSTINVERT); -end; - -function TdxPreviewPageMargin.CheckValue(Value: Integer): Integer; -begin - Result := Value; - if Result < ActualMinValue then Result := ActualMinValue; - if Result > ActualMaxValue then Result := ActualMaxValue; -end; - -function TdxPreviewPageMargin.PosFromValue(AValue: Integer): Integer; -begin - Result := LoMetricToPixels(AValue); - if Preview <> nil then - Result := MulDiv(Result, Preview.ZoomFactor, 100); - Result := DoPosFromValue(Result); -end; - -function TdxPreviewPageMargin.ValueFromPos(APos: Integer): Integer; -begin - if APos = MinPos then - if IsForward then - Result := ActualMinValue - else - Result := ActualMaxValue - else - if APos = MaxPos then - if IsForward then - Result := ActualMaxValue - else - Result := ActualMinValue - else - if APos = PosFromValue(FValue) then - Result := FValue - else - begin - Result := DoValueFromPos(APos); - if Preview <> nil then - Result := PixelsToLoMetric(MulDiv(Result, 100, Preview.ZoomFactor)); - CheckValue(Result); - end; -end; - -function TdxPreviewPageMargin.GetActualMaxValue: Integer; -begin - if (Preview <> nil) and Preview.CanChangeMargins then - begin - Result := DoGetActualMaxValue; - if (FMaxValue <> -1) and (Result > FMaxValue) then - Result := FMaxValue; - end - else - Result := FMaxValue; -end; - -function TdxPreviewPageMargin.GetActualMinValue: Integer; -begin - if (Preview <> nil) and Preview.CanChangeMargins then - begin - Result := DoGetActualMinValue; - if Result < MinValue then Result := MinValue; - end - else - Result := MinValue; -end; - -function TdxPreviewPageMargin.GetBounds: TRect; -var - V: Integer; -begin - if IsDragging and (DraggingPos <> NullDraggingPos) then - V := DraggingPos - else - V := PosFromValue(Value); - - Result := PageBounds; - with Result do - if IsVertical then - begin - Left := V; - Right := V; - end - else - begin - Top := V; - Bottom := V; - end; -end; - -function TdxPreviewPageMargin.GetCaption: string; -begin - if FIsCaptionAssigned then - Result := FCaption - else - Result := DefaultCaption; -end; - -function TdxPreviewPageMargin.GetDisplayText: string; -begin - Result := Caption; - if Preview <> nil then - begin - Result := Result + ': '; - if IsDragging then - Result := Result + Preview.MarginValueToString(DraggingValue) - else - Result := Result + Preview.MarginValueToString(Value); - end; -end; - -function TdxPreviewPageMargin.GetDraggingValue: Integer; -begin - if FDraggingPos = NullDraggingPos then - Result := -1 - else - Result := ValueFromPos(FDraggingPos); -end; - -function TdxPreviewPageMargin.GetIsDragging: Boolean; -begin - Result := (Preview <> nil) and (Preview.DraggingMargin = Self); -end; - -function TdxPreviewPageMargin.GetMaxPos: Integer; -begin - if IsForward then - Result := PosFromValue(ActualMaxValue) - else - Result := PosFromValue(ActualMinValue); -end; - -function TdxPreviewPageMargin.GetMinPos: Integer; -begin - if IsForward then - Result := PosFromValue(ActualMinValue) - else - Result := PosFromValue(ActualMaxValue); -end; - -function TdxPreviewPageMargin.GetPageBounds: TRect; -begin - if Preview <> nil then - with Preview do - if SelPageIndex = -1 then - if PageCount > 0 then - Result := Pages[0].Bounds - else - Result := NullRect - else - Result := Pages[SelPageIndex].Bounds - else - Result := NullRect; -end; - -function TdxPreviewPageMargin.GetPreview: TCustomdxPreview; -begin - if Margins <> nil then - Result := Margins.Preview - else - Result := nil; -end; - -function TdxPreviewPageMargin.GetSelectableBounds: TRect; -begin - Result := Bounds; - if IsVertical then - InflateRect(Result, dxPreviewMarginSelectDelta, 0) - else - InflateRect(Result, 0, dxPreviewMarginSelectDelta); -end; - -function TdxPreviewPageMargin.GetVisibleValue: Integer; -begin - Result := LoMetricToPixels(Value); - if Preview <> nil then - Result := MulDiv(Result, Preview.ZoomFactor, 100); -end; - -function TdxPreviewPageMargin.IsCaptionStored: Boolean; -begin - Result := FIsCaptionAssigned and (FCaption <> DefaultCaption); -end; - -function TdxPreviewPageMargin.IsValueStored: Boolean; -begin - Result := Value <> DefaultValue; -end; - -procedure TdxPreviewPageMargin.SetCaption(const Value: string); -begin - if Caption <> Value then - begin - FCaption := Value; - FIsCaptionAssigned := True; - end; -end; - -procedure TdxPreviewPageMargin.SetDraggingPos(Value: Integer); -var - DC, BitmapDC: HDC; -begin - if Preview <> nil then - begin - if Value <> NullDraggingPos then - begin - if Value < MinPos then Value := MinPos; - if Value > MaxPos then Value := MaxPos; - end; - - if FDraggingPos <> Value then - begin - DC := GetDC(Preview.Handle); - try - BitmapDC := CreateCompatibleDC(DC); - try - FScreenBitmap := SelectObject(BitmapDC, FScreenBitmap); - if FDraggingPos <> NullDraggingPos then - // restore screen image - with PageBounds do - if IsVertical then - BitBlt(DC, FDraggingPos, Top, 1, Bottom - Top, BitmapDC, 0, 0, SRCCOPY) - else - BitBlt(DC, Left, FDraggingPos, Right - Left, 1, BitmapDC, 0, 0, SRCCOPY); - FDraggingPos := Value; - if FDraggingPos <> NullDraggingPos then - begin - Preview.ActivateHint(Self); - // save screen image - with PageBounds do - if IsVertical then - BitBlt(BitmapDC, 0, 0, 1, Bottom - Top, DC, FDraggingPos, Top, SRCCOPY) - else - BitBlt(BitmapDC, 0, 0, Right - Left, 1, DC, Left, FDraggingPos, SRCCOPY); - Draw(DC); - end; - FScreenBitmap := SelectObject(BitmapDC, FScreenBitmap); - finally - DeleteDC(BitmapDC); - end; - finally - ReleaseDC(Preview.Handle, DC); - end; - - if FDraggingPos <> NullDraggingPos then - Preview.DoDragMargin(Self); - end; - end; -end; - -procedure TdxPreviewPageMargin.SetMaxValue(Value: Integer); -begin - if Value < -1 then Value := -1; - if FMaxValue <> Value then - begin - FMaxValue := Value; - if MaxValue <> -1 then - begin - if MaxValue < MinValue then MinValue := MaxValue; - if FValue > MaxValue then Self.Value := MaxValue; - end; - end; -end; - -procedure TdxPreviewPageMargin.SetMinValue(Value: Integer); -var - V: Integer; -begin - if Value < 0 then Value := 0; - - if FMinValue <> Value then - begin - if (Preview <> nil) and Preview.CanChangeMargins then - begin - V := DoGetMaxMinValue; - if Value > V then Value := V; - end; - FMinValue := Value; - if (MaxValue <> -1) and (MinValue > MaxValue) then - MaxValue := MinValue; - if FValue < MinValue then - Self.Value := MinValue; - end; -end; - -procedure TdxPreviewPageMargin.SetValue(Value: Integer); -begin - Value := CheckValue(Value); - if FValue <> Value then - begin - FValue := Value; - if (Preview <> nil) and Preview.CanChangeMargins then - begin - Preview.DoMarginChanged(Self); - Changed(True); - end; - end; -end; - -procedure TdxPreviewPageMargin.SetEnabled(Value: Boolean); -begin - if FEnabled <> Value then - begin - FEnabled := Value; - Changed(False); - end; -end; - -procedure TdxPreviewPageMargin.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - FVisible := Value; - Changed(False); - end; -end; - -procedure TdxPreviewPageMargin.ReadIsCaptionAssigned(AReader: TReader); -begin - FIsCaptionAssigned := AReader.ReadBoolean; -end; - -procedure TdxPreviewPageMargin.WriteIsCaptionAssigned(AWriter: TWriter); -begin - AWriter.WriteBoolean(FIsCaptionAssigned); -end; - -{ TdxPreviewPageMarginBottom } - -function TdxPreviewPageMarginBottom.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxBottomMargin); -end; - -function TdxPreviewPageMarginBottom.DefaultValue: Integer; -begin - Result := 254; -end; - -function TdxPreviewPageMarginBottom.GetHitTest: TdxPreviewHitTest; -begin - Result := phtMarginBottom; -end; - -function TdxPreviewPageMarginBottom.GetCursor: TCursor; -begin - Result := crdxPreviewVertResize; -end; - -function TdxPreviewPageMarginBottom.GetIsForceRecalculatePageCount: Boolean; -begin - Result := True; -end; - -function TdxPreviewPageMarginBottom.GetIsForward: Boolean; -begin - Result := False; -end; - -function TdxPreviewPageMarginBottom.GetIsVertical: Boolean; -begin - Result := False; -end; - -function TdxPreviewPageMarginBottom.DoGetActualMaxValue: Integer; -begin - Result := Preview.ActualOriginalPageSize.Y - (Preview.MinUsefulSize.Y + - MaxIntValue([Margins.Top.Value, Margins.Top.MinValue, Margins.Header.MinValue + Preview.MinHeaderSize])); -end; - -function TdxPreviewPageMarginBottom.DoGetActualMinValue: Integer; -begin - Result := Min(Margins.Footer.Value + Preview.MinFooterSize, ActualMaxValue); -end; - -function TdxPreviewPageMarginBottom.DoGetMaxMinValue: Integer; -begin - Result := Preview.ActualOriginalPageSize.Y - (Margins.Top.Value + Preview.MinUsefulSize.Y); -end; - -function TdxPreviewPageMarginBottom.DoPosFromValue(AValue: Integer): Integer; -begin - Result := PageBounds.Bottom - 1 - AValue; -end; - -function TdxPreviewPageMarginBottom.DoValueFromPos(APos: Integer): Integer; -begin - Result := PageBounds.Bottom - 1 - APos; -end; - -{ TdxPreviewPageMarginFooter } - -function TdxPreviewPageMarginFooter.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxFooterMargin); -end; - -function TdxPreviewPageMarginFooter.DefaultValue: Integer; -begin - Result := 127; -end; - -function TdxPreviewPageMarginFooter.GetHitTest: TdxPreviewHitTest; -begin - Result := phtMarginFooter; -end; - -function TdxPreviewPageMarginFooter.GetCursor: TCursor; -begin - Result := crdxPreviewVertResize; -end; - -function TdxPreviewPageMarginFooter.GetIsForward: Boolean; -begin - Result := False; -end; - -function TdxPreviewPageMarginFooter.GetIsVertical: Boolean; -begin - Result := False; -end; - -function TdxPreviewPageMarginFooter.DoGetActualMaxValue: Integer; -begin - Result := Preview.ActualOriginalPageSize.Y - (Margins.Top.Value + Preview.MinUsefulSize.Y + Preview.MinFooterSize); -end; - -function TdxPreviewPageMarginFooter.DoGetMaxMinValue: Integer; -begin - Result := Preview.ActualOriginalPageSize.Y - (Margins.Top.Value + Preview.MinUsefulSize.Y + Preview.MinFooterSize); -end; - -function TdxPreviewPageMarginFooter.DoPosFromValue(AValue: Integer): Integer; -begin - Result := PageBounds.Bottom - 1 - AValue; -end; - -function TdxPreviewPageMarginFooter.DoValueFromPos(APos: Integer): Integer; -begin - Result := PageBounds.Bottom - 1 - APos; -end; - -{ TdxPreviewPageMarginHeader } - -function TdxPreviewPageMarginHeader.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxHeaderMargin); -end; - -function TdxPreviewPageMarginHeader.DefaultValue: Integer; -begin - Result := 127; -end; - -function TdxPreviewPageMarginHeader.GetHitTest: TdxPreviewHitTest; -begin - Result := phtMarginHeader; -end; - -function TdxPreviewPageMarginHeader.GetCursor: TCursor; -begin - Result := crdxPreviewVertResize; -end; - -function TdxPreviewPageMarginHeader.GetIsForward: Boolean; -begin - Result := True; -end; - -function TdxPreviewPageMarginHeader.GetIsVertical: Boolean; -begin - Result := False; -end; - -function TdxPreviewPageMarginHeader.DoGetActualMaxValue: Integer; -begin - Result := Preview.ActualOriginalPageSize.Y - (Preview.MinHeaderSize + Preview.MinUsefulSize.Y + Margins.Bottom.Value); -end; - -function TdxPreviewPageMarginHeader.DoGetMaxMinValue: Integer; -begin - Result := Preview.ActualOriginalPageSize.Y - (Margins.Bottom.Value + Preview.MinUsefulSize.Y + Preview.MinHeaderSize); -end; - -function TdxPreviewPageMarginHeader.DoPosFromValue(AValue: Integer): Integer; -begin - Result := PageBounds.Top + AValue; -end; - -function TdxPreviewPageMarginHeader.DoValueFromPos(APos: Integer): Integer; -begin - Result := APos - PageBounds.Top; -end; - -{ TdxPreviewPageMarginLeft } - -function TdxPreviewPageMarginLeft.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxLeftMargin); -end; - -function TdxPreviewPageMarginLeft.DefaultValue: Integer; -begin - Result := 254; -end; - -function TdxPreviewPageMarginLeft.GetHitTest: TdxPreviewHitTest; -begin - Result := phtMarginLeft; -end; - -function TdxPreviewPageMarginLeft.GetCursor: TCursor; -begin - Result := crdxPreviewHorzResize; -end; - -function TdxPreviewPageMarginLeft.GetIsForceRecalculatePageCount: Boolean; -begin - Result := True; -end; - -function TdxPreviewPageMarginLeft.GetIsForward: Boolean; -begin - Result := True; -end; - -function TdxPreviewPageMarginLeft.GetIsVertical: Boolean; -begin - Result := True; -end; - -function TdxPreviewPageMarginLeft.DoGetActualMaxValue: Integer; -begin - Result := Max(ActualMinValue, Preview.ActualOriginalPageSize.X - (Preview.MinUsefulSize.X + Margins.Right.Value)); -end; - -function TdxPreviewPageMarginLeft.DoGetMaxMinValue: Integer; -begin - Result := Preview.ActualOriginalPageSize.X - (Margins.Right.Value + Preview.MinUsefulSize.X); -end; - -function TdxPreviewPageMarginLeft.DoPosFromValue(AValue: Integer): Integer; -begin - Result := PageBounds.Left + AValue; -end; - -function TdxPreviewPageMarginLeft.DoValueFromPos(APos: Integer): Integer; -begin - Result := APos - PageBounds.Left; -end; - -{ TdxPreviewPageMarginRight } - -function TdxPreviewPageMarginRight.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxRightMargin); -end; - -function TdxPreviewPageMarginRight.DefaultValue: Integer; -begin - Result := 254; -end; - -function TdxPreviewPageMarginRight.GetHitTest: TdxPreviewHitTest; -begin - Result := phtMarginRight; -end; - -function TdxPreviewPageMarginRight.GetCursor: TCursor; -begin - Result := crdxPreviewHorzResize; -end; - -function TdxPreviewPageMarginRight.GetIsForceRecalculatePageCount: Boolean; -begin - Result := True; -end; - -function TdxPreviewPageMarginRight.GetIsForward: Boolean; -begin - Result := False; -end; - -function TdxPreviewPageMarginRight.GetIsVertical: Boolean; -begin - Result := True; -end; - -function TdxPreviewPageMarginRight.DoGetActualMaxValue: Integer; -begin - Result := Max(ActualMinValue, Preview.ActualOriginalPageSize.X - (Margins.Left.Value + Preview.MinUsefulSize.X)); -end; - -function TdxPreviewPageMarginRight.DoGetMaxMinValue: Integer; -begin - Result := Preview.ActualOriginalPageSize.X - (Margins.Left.Value + Preview.MinUsefulSize.X); -end; - -function TdxPreviewPageMarginRight.DoPosFromValue(AValue: Integer): Integer; -begin - Result := PageBounds.Right - 1 - AValue; -end; - -function TdxPreviewPageMarginRight.DoValueFromPos(APos: Integer): Integer; -begin - Result := PageBounds.Right - 1 - APos; -end; - -{ TdxPreviewPageMarginTop } - -function TdxPreviewPageMarginTop.DefaultCaption: string; -begin - Result := cxGetResourceString(@sdxTopMargin); -end; - -function TdxPreviewPageMarginTop.DefaultValue: Integer; -begin - Result := 254; -end; - -function TdxPreviewPageMarginTop.GetHitTest: TdxPreviewHitTest; -begin - Result := phtMarginLeft; -end; - -function TdxPreviewPageMarginTop.GetCursor: TCursor; -begin - Result := crdxPreviewVertResize; -end; - -function TdxPreviewPageMarginTop.GetIsForceRecalculatePageCount: Boolean; -begin - Result := True; -end; - -function TdxPreviewPageMarginTop.GetIsForward: Boolean; -begin - Result := True; -end; - -function TdxPreviewPageMarginTop.GetIsVertical: Boolean; -begin - Result := False; -end; - -function TdxPreviewPageMarginTop.DoGetActualMaxValue: Integer; -begin - Result := Preview.ActualOriginalPageSize.Y - - (Preview.MinUsefulSize.Y + - MaxIntValue([Margins.Bottom.Value, Margins.Bottom.MinValue, Preview.MinFooterSize + Margins.Footer.MinValue])); -end; - -function TdxPreviewPageMarginTop.DoGetActualMinValue: Integer; -begin - Result := Min(Margins.Header.Value + Preview.MinHeaderSize, ActualMaxValue); -end; - -function TdxPreviewPageMarginTop.DoGetMaxMinValue: Integer; -begin - Result := Preview.ActualOriginalPageSize.Y - (Margins.Bottom.Value + Preview.MinUsefulSize.Y); -end; - -function TdxPreviewPageMarginTop.DoPosFromValue(AValue: Integer): Integer; -begin - Result := PageBounds.Top + AValue; -end; - -function TdxPreviewPageMarginTop.DoValueFromPos(APos: Integer): Integer; -begin - Result := APos - PageBounds.Top; -end; - -{ TdxPreviewPageMargins } - -constructor TdxPreviewPageMargins.Create(APreview: TCustomdxPreview); -begin - inherited Create; - FPreview := APreview; - FMargins := TList.Create; - AddMargins; -end; - -destructor TdxPreviewPageMargins.Destroy; -begin - FreeAndNilMargins; - inherited; -end; - -procedure TdxPreviewPageMargins.Assign(Source: TPersistent); -begin - if Source is TdxPreviewPageMargins then - begin - BeginUpdate; - try - DoAssign(TdxPreviewPageMargins(Source)); - finally - EndUpdate; - end; - end - else - inherited; -end; - -procedure TdxPreviewPageMargins.RestoreDefaults; -begin - BeginUpdate; - try - DoRestoreDefaults; - finally - EndUpdate; - end; -end; - -procedure TdxPreviewPageMargins.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TdxPreviewPageMargins.EndUpdate; -begin - Dec(FUpdateCount); - if FUpdateCount = 0 then Update(nil); -end; - -procedure TdxPreviewPageMargins.DoAssign(Source: TdxPreviewPageMargins); -var - I: Integer; -begin - for I := 0 to Count - 1 do - Margins[I].Assign(Source[I]); -end; - -procedure TdxPreviewPageMargins.DoRestoreDefaults; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Margins[I].RestoreDefaults; -end; - -function TdxPreviewPageMargins.AddMargin(AClass: TdxPreviewPageMarginClass): TdxPreviewPageMargin; -begin - Result := AClass.Create(Self); - FMargins.Add(Result); -end; - -procedure TdxPreviewPageMargins.AddMargins; -begin - AddMargin(TdxPreviewPageMarginLeft); - AddMargin(TdxPreviewPageMarginTop); - AddMargin(TdxPreviewPageMarginRight); - AddMargin(TdxPreviewPageMarginBottom); - AddMargin(TdxPreviewPageMarginHeader); - AddMargin(TdxPreviewPageMarginFooter); -end; - -procedure TdxPreviewPageMargins.FreeAndNilMargins; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Margins[I].Free; - FreeAndNil(FMargins); -end; - -procedure TdxPreviewPageMargins.Update(AMargin: TdxPreviewPageMargin); -begin - if (Preview <> nil) and not Preview.IsUpdateLocked then - if AMargin <> nil then - AMargin.Invalidate - else - Preview.Invalidate; -end; - -function TdxPreviewPageMargins.GetCount: Integer; -begin - Result := FMargins.Count; -end; - -function TdxPreviewPageMargins.GetMargin(Index: Integer): TdxPreviewPageMargin; -begin - Result := TdxPreviewPageMargin(FMargins[Index]); -end; - -function TdxPreviewPageMargins.GetMarginByCaption(const Caption: string): TdxPreviewPageMargin; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Margins[I]; - if dxSameText(Result.Caption, Caption) then Exit; - end; - Result := nil; -end; - -function TdxPreviewPageMargins.GetMarginByClass(Index: TdxPreviewPageMarginClass): TdxPreviewPageMargin; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Margins[I]; - if Result.ClassType = Index then Exit; - end; - Result := nil; -end; - -function TdxPreviewPageMargins.GetMarginBottom: TdxPreviewPageMarginBottom; -begin - Result := MarginsByClass[TdxPreviewPageMarginBottom] as TdxPreviewPageMarginBottom; -end; - -function TdxPreviewPageMargins.GetMarginFooter: TdxPreviewPageMarginFooter; -begin - Result := MarginsByClass[TdxPreviewPageMarginFooter] as TdxPreviewPageMarginFooter; -end; - -function TdxPreviewPageMargins.GetMarginHeader: TdxPreviewPageMarginHeader; -begin - Result := MarginsByClass[TdxPreviewPageMarginHeader] as TdxPreviewPageMarginHeader; -end; - -function TdxPreviewPageMargins.GetMarginLeft: TdxPreviewPageMarginLeft; -begin - Result := MarginsByClass[TdxPreviewPageMarginLeft] as TdxPreviewPageMarginLeft; -end; - -function TdxPreviewPageMargins.GetMarginRight: TdxPreviewPageMarginRight; -begin - Result := MarginsByClass[TdxPreviewPageMarginRight] as TdxPreviewPageMarginRight; -end; - -function TdxPreviewPageMargins.GetMarginTop: TdxPreviewPageMarginTop; -begin - Result := MarginsByClass[TdxPreviewPageMarginTop] as TdxPreviewPageMarginTop; -end; - -procedure TdxPreviewPageMargins.SetMargin(Index: Integer; Value: TdxPreviewPageMargin); -begin - Margins[Index].Assign(Value); -end; - -procedure TdxPreviewPageMargins.SetMarginByClass(Index: TdxPreviewPageMarginClass; - Value: TdxPreviewPageMargin); -var - Margin: TdxPreviewPageMargin; -begin - Margin := MarginsByClass[Index]; - if Margin <> nil then - Margin.Assign(Value); -end; - -procedure TdxPreviewPageMargins.SetMarginBottom(Value: TdxPreviewPageMarginBottom); -begin - MarginsByClass[TdxPreviewPageMarginBottom] := Value; -end; - -procedure TdxPreviewPageMargins.SetMarginFooter(Value: TdxPreviewPageMarginFooter); -begin - MarginsByClass[TdxPreviewPageMarginFooter] := Value; -end; - -procedure TdxPreviewPageMargins.SetMarginHeader(Value: TdxPreviewPageMarginHeader); -begin - MarginsByClass[TdxPreviewPageMarginHeader] := Value; -end; - -procedure TdxPreviewPageMargins.SetMarginLeft(Value: TdxPreviewPageMarginLeft); -begin - MarginsByClass[TdxPreviewPageMarginLeft] := Value; -end; - -procedure TdxPreviewPageMargins.SetMarginRight(Value: TdxPreviewPageMarginRight); -begin - MarginsByClass[TdxPreviewPageMarginRight] := Value; -end; - -procedure TdxPreviewPageMargins.SetMarginTop(Value: TdxPreviewPageMarginTop); -begin - MarginsByClass[TdxPreviewPageMarginTop] := Value; -end; - -{ TCustomdxPreview } - -constructor TCustomdxPreview.Create(AOwner: TComponent); - - function CreateTimer(AHandler: TNotifyEvent; AnInterval: Integer): TTimer; - begin - Result := TTimer.Create(Self); - Result.Enabled := True; - Result.Interval := AnInterval; - Result.OnTimer := AHandler; - end; - -begin - inherited; - ControlStyle := ControlStyle - [csAcceptsControls, csCaptureMouse]; - ParentColor := False; - //Font.Name := 'Tahoma'; - Brush.Color := Color; - - FHintHideLongTimer := CreateTimer(HintHideLongTimerHandler, dxPreviewHideHintLongTime); - FHintHideShortTimer := CreateTimer(HintHideShortTimerHandler, dxPreviewHideHintShortTime); - FHintShowTimer := CreateTimer(HintShowTimerHandler, dxPreviewShowHintTime); - - FOptionsBehavior := [pobAllowDragMargins, pobKeyNavigation, pobThumbTracking, pobAutoSwapMargins]; - FOptionsHint := [pohShowForMargins, pohShowOnDrag, pohShowOnScroll]; - FOptionsStore := [posZoom]; - FOptionsView := [povAutoHideScrollBars, povDefaultDrawPageBackground, povMargins, povPageSelection]; - FOptionsZoom := [pozZoomOnClick]; - - FBorderStyle := bsSingle; - FPageBackground := TdxPreviewPageBackground.Create; - TdxPreviewPageBackground(FPageBackground).FPreview := Self; - MarginColor := clWindowText; - FScrollBars := ssBoth; - - ClearLastMousePos; - FMargins := CreateMargins; - - FMaxZoomFactor := 500; - FMinFooterSize := dxPreviewMinHeaderFooterSize; - FMinHeaderSize := dxPreviewMinHeaderFooterSize; - FMinUsefulSize := dxPreviewMinUsefulSize; - FMinZoomFactor := 5; - - FOriginalPageSize := TdxPointWrapper.Create(0, 0); - FOriginalPageSize.OnChanging := PageParametersChanging; - FOriginalPageSize.OnChanged := PageParametersChanged; - FOriginalPageSize.Point := A4_LOMETRIC; - - FLookAndFeel := plfStandard; - FPages := TList.Create; - FPageXCount := 1; - FPageYCount := 1; - FSelectionFrameThickness := 2; - FSelPageIndex := -1; - FScrollBars := ssBoth; - FScrollBarStyle := ssRegular; - FUnzoomedFactor := 50; - ZoomFactor := 100; - ZoomMode := pzmNone; - FZoomStep := 10; - Height := 460; - Width := 320; - - if IsDesigning then - begin - PageCount := 1; - SelPageIndex := 0; - end; - FPageStack := TList.Create; -end; - -destructor TCustomdxPreview.Destroy; -begin - if not IsDesigning and (pobStoreInRegistry in OptionsBehavior) and (RegistryPath <> '') then - SaveToRegistry(RegistryPath); - {$IFNDEF DELPHI5} - Destroying; - {$ENDIF} - DestroyPageNumberHint; - DestroyHint; - if FMarginPen <> 0 then DeleteObject(FMarginPen); - FreeAndnil(FPageStack); - FreeAndnil(FOriginalPageSize); - FreeAndnil(FPageBackground); - PageCount := 0; - FreeAndNil(FPages); - FreeAndNil(FMargins); - inherited; -end; - -procedure TCustomdxPreview.LoadFromRegistry(const ARegistryPath: string); -begin - with TRegistry.Create do - try - if OpenKey(ARegistryPath, True) then - try - if ValueExists(sdxOptionsHint) then - OptionsHint := TdxPreviewOptionsHint(Byte(ReadInteger(sdxOptionsHint))); - if ValueExists(sdxOptionsView) then - OptionsView := TdxPreviewOptionsView(Byte(ReadInteger(sdxOptionsView))); - if ValueExists(sdxOptionsZoom) then - OptionsZoom := TdxPreviewOptionsZoom(Byte(ReadInteger(sdxOptionsZoom))); - if ValueExists(sdxZoomStep) then - ZoomStep := ReadInteger(sdxZoomStep); - if ValueExists(sdxMarginColor) then - MarginColor := TColor(ReadInteger(sdxMarginColor)); - if ValueExists(sdxMeasurementUnits) then - MeasurementUnits := TdxPreviewMeasurementUnits(ReadInteger(sdxMeasurementUnits)); - if ValueExists(sdxOrientation) then - Orientation := TdxPreviewPaperOrientation(ReadInteger(sdxOrientation)); - if posZoom in OptionsStore then - begin - if ValueExists(sdxZoomFactor) then - ZoomFactor := ReadInteger(sdxZoomFactor); - if ValueExists(sdxZoomMode) then - ZoomMode := TdxPreviewZoomMode(ReadInteger(sdxZoomMode)); - if ZoomMode = pzmPages then - begin - if ValueExists(sdxPageXCount) then - PageXCount := ReadInteger(sdxPageXCount); - if ValueExists(sdxPageYCount) then - PageYCount := ReadInteger(sdxPageYCount); - end; - end; - except - on ERegistryException do - else - raise; - end; - finally - Free; - end; -end; - -procedure TCustomdxPreview.SaveToRegistry(const ARegistryPath: string); -begin - with TRegistry.Create do - try - if OpenKey(ARegistryPath, True) then - try - WriteInteger(sdxOptionsHint, Integer(Byte(OptionsHint))); - WriteInteger(sdxOptionsView, Integer(Byte(OptionsView))); - WriteInteger(sdxOptionsZoom, Integer(Byte(OptionsZoom))); - WriteInteger(sdxZoomStep, ZoomStep); - WriteInteger(sdxMarginColor, Integer(MarginColor)); - WriteInteger(sdxMeasurementUnits, Integer(MeasurementUnits)); - WriteInteger(sdxOrientation, Integer(Orientation)); - if posZoom in OptionsStore then - begin - WriteInteger(sdxZoomFactor, ZoomFactor); - WriteInteger(sdxZoomMode, Integer(ZoomMode)); - if ZoomMode = pzmPages then - begin - WriteInteger(sdxPageXCount, PageXCount); - WriteInteger(sdxPageYCount, PageYCount); - end; - end; - except - on ERegistryException do - else - raise; - end; - finally - Free; - end; -end; - -function TCustomdxPreview.DefaultColor: TColor; - - function GetUltraFlatBkColor: TColor; - - function GetUltraFlatValue(Value: Byte): Byte; - begin - Result := Value + (255 - Value) div 3; - end; - - var - R, G, B: Byte; - begin - Result := ColorToRGB(clBtnShadow); - R := GetUltraFlatValue(GetRValue(Result)); - G := GetUltraFlatValue(GetGValue(Result)); - B := GetUltraFlatValue(GetBValue(Result)); - Result := RGB(R, G, B); - end; - -begin - if LookAndFeel in [plfStandard, plfFlat] then - Result := clBtnShadow - else - Result := GetUltraFlatBkColor; -end; - -function TCustomdxPreview.DefaultNoPagesText: string; -begin - Result := cxGetResourceString(@sdxNoPages); -end; - -procedure TCustomdxPreview.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TCustomdxPreview.CancelUpdate; -begin - if FUpdateCount <> 0 then Dec(FUpdateCount); -end; - -procedure TCustomdxPreview.EndUpdate; -begin - if FUpdateCount <> 0 then - begin - Dec(FUpdateCount); - if not IsUpdateLocked then - begin - DoCalcPageCount; - Invalidate; - end; - end; -end; - -function TCustomdxPreview.IsUpdateLocked: Boolean; -begin - Result := (FUpdateCount <> 0) or (csLoading in ComponentState); -end; - -procedure TCustomdxPreview.GetPartVisiblePageRanges(AStartIndex, AEndIndex: PInteger ); -var - StartIndex, EndIndex: Integer; -begin - GetPartVisiblePageRanges(StartIndex, EndIndex); - - if AStartIndex <> nil then - AStartIndex^ := StartIndex; - - if AEndIndex <> nil then - AEndIndex^ := EndIndex; -end; - -procedure TCustomdxPreview.GetPartVisiblePageRanges(out AStartIndex, AEndIndex: Integer); -begin - if PageCount <> 0 then - begin - AStartIndex := 0; - while (AStartIndex < PageCount) and not Pages[AStartIndex].PartVisible do - Inc(AStartIndex); - - AEndIndex := AStartIndex; - while (AEndIndex < PageCount) and Pages[AEndIndex].PartVisible do - Inc(AEndIndex); - Dec(AEndIndex); - end - else - begin - AStartIndex := -1; - AEndIndex := -1; - end; -end; - -procedure TCustomdxPreview.GetVisiblePageRanges(AStartIndex, AEndIndex: PInteger ); -var - StartIndex, EndIndex: Integer; -begin - GetVisiblePageRanges(StartIndex, EndIndex); - - if AStartIndex <> nil then - AStartIndex^ := StartIndex; - - if AEndIndex <> nil then - AEndIndex^ := EndIndex; -end; - -procedure TCustomdxPreview.GetVisiblePageRanges(out AStartIndex, AEndIndex: Integer); -begin - if PageCount <> 0 then - begin - AStartIndex := 0; - while (AStartIndex < PageCount) and not Pages[AStartIndex].Visible do - Inc(AStartIndex); - - if AStartIndex = PageCount then - begin - AStartIndex := -1; - AEndIndex := -1; - end - else - begin - AEndIndex := AStartIndex; - while (AEndIndex < PageCount) and Pages[AEndIndex].Visible do - Inc(AEndIndex); - Dec(AEndIndex); - end; - end - else - begin - AStartIndex := -1; - AEndIndex := -1; - end; -end; - -procedure TCustomdxPreview.InvalidatePage(APageIndex: Integer); -var - R: TRect; -begin - if (APageIndex > -1) and (APageIndex < PageCount) and HandleAllocated and - IntersectRect(R, Pages[APageIndex].Bounds, ClientRect) then - InvalidateRect(Handle, @Pages[APageIndex].Bounds, False); -end; - -procedure TCustomdxPreview.InvalidatePages; -var - StartIndex, EndIndex, I: Integer; -begin - if not HandleAllocated or (PageCount = 0) then Exit; - - GetPartVisiblePageRanges(StartIndex, EndIndex); - if StartIndex < 0 then Exit; - - for I := StartIndex to EndIndex do - InvalidateRect(Handle, @Pages[I].Bounds, False); -end; - -procedure TCustomdxPreview.InvalidatePagesContent; -var - StartIndex, EndIndex, I: Integer; - R: TRect; -begin - if not HandleAllocated or (PageCount = 0) then Exit; - - GetPartVisiblePageRanges(StartIndex, EndIndex); - if StartIndex < 0 then Exit; - - for I := StartIndex to EndIndex do - begin - with Pages[I].Bounds do - R := MakeRect(Left + Margins.Left.VisibleValue, - Top + Margins.Top.VisibleValue, - Right - Margins.Right.VisibleValue, - Bottom - Margins.Bottom.VisibleValue); - InvalidateRect(Handle, @R, False); - end; -end; - -procedure TCustomdxPreview.InvalidatePagesFooter; -var - StartIndex, EndIndex, I: Integer; - R, CR: TRect; -begin - if not HandleAllocated or (PageCount = 0) then Exit; - - GetPartVisiblePageRanges(StartIndex, EndIndex); - if StartIndex < 0 then Exit; - - CR := ClientRect; - for I := StartIndex to EndIndex do - begin - with Pages[I].Bounds do - R := MakeRect(Left + Margins.Left.VisibleValue, - Bottom - Margins.Bottom.VisibleValue, - Right - Margins.Right.VisibleValue, - Bottom - Margins.Footer.VisibleValue); - if IntersectRect(R, R, CR) then - InvalidateRect(Handle, @R, False); - end; -end; - -procedure TCustomdxPreview.InvalidatePagesHeader; -var - StartIndex, EndIndex, I: Integer; - R, CR: TRect; -begin - if not HandleAllocated or (PageCount = 0) then Exit; - - GetPartVisiblePageRanges(StartIndex, EndIndex); - if StartIndex < 0 then Exit; - - CR := ClientRect; - for I := StartIndex to EndIndex do - begin - with Pages[I].Bounds do - R := MakeRect(Left + Margins.Left.VisibleValue, - Top + Margins.Header.VisibleValue, - Right - Margins.Right.VisibleValue, - Top + Margins.Top.VisibleValue); - if IntersectRect(R, R, CR) then - InvalidateRect(Handle, @R, False); - end; -end; - -procedure TCustomdxPreview.CalcPagesBounds(ATopPos, VWidth, VHeight: Integer); -var - R: TRect; - APageSize: TPoint; - AWidth, AHeight, LeftOffset, TopOffset, I, J, PageIndex: Integer; -begin - APageSize := VisiblePageSize; - AWidth := VWidth; - AHeight := VHeight; - - R := ClientRect; - if (AWidth > R.Right - R.Left) or (pobNonCenterizePages in OptionsBehavior) then - LeftOffset := Indent - else - LeftOffset := (R.Right - (AWidth - 2 * Indent)) div 2; - if (AHeight > R.Bottom - R.Top) or (pobNonCenterizePages in OptionsBehavior) then - TopOffset := Indent - else - TopOffset := (R.Bottom - (AHeight - 2 * Indent)) div 2; - - if ZoomFactor = MinZoomFactor then - begin - if LeftOffset < Indent then LeftOffset := Indent; - if TopOffset < Indent then TopOffset := Indent; - end; - -// Inc(TopOffset, Indent); - for J := 0 to AllRowCount - 1 do - for I := 0 to ColCount - 1 do - begin - PageIndex := J * ColCount + I; - if PageIndex > PageCount - 1 then - Break; - - with R do - begin - Left := -LeftPos + LeftOffset + I * (APageSize.X + Indent); - Top := -ATopPos + TopOffset + J * (APageSize.Y + Indent); - Right := Left + APageSize.X; - Bottom := Top + APageSize.Y; - end; - Pages[PageIndex].Bounds := R; - end; -end; - -function TCustomdxPreview.GetHitInfoAt(const Pt: TPoint): TdxPreviewHitTests; -var - Margin: TdxPreviewPageMargin; -begin - if PtInRect(ClientRect, Pt) then - if PageIndexFromPoint(Pt) > -1 then - begin - Result := [phtPage]; - Margin := MarginFromPoint(Pt); - if Margin <> nil then - Result := Result + [Margin.GetHitTest]; - end - else - Result := [phtNoWhere] - else - Result := []; -end; - -function TCustomdxPreview.GetHitInfoAt(const Pt: TSmallPoint): TdxPreviewHitTests; -begin - Result := GetHitInfoAt(SmallPointToPoint(Pt)); -end; - -function TCustomdxPreview.GetHitInfoAt(X, Y: Integer): TdxPreviewHitTests; -begin - Result := GetHitInfoAt(MakePoint(X, Y)); -end; - -procedure TCustomdxPreview.HideAllHints; -begin - CancelHintShow; - CancelHintHide; -end; - -procedure TCustomdxPreview.MakeVisible(APageIndex: Integer); - - function GetDeltaX(const R: TRect): Integer; - begin - Result := 0; - if R.Right > ClientWidth then - Result := R.Right - ClientWidth; - if R.Left - Result < 0 then - Result := R.Left; - end; - - function GetDeltaY(const R: TRect): Integer; - begin - Result := 0; - if R.Bottom > ClientHeight then - Result := R.Bottom - ClientHeight; - if R.Top - Result < 0 then - Result := R.Top; - end; - -begin - if HandleAllocated and (APageIndex > -1) and (APageIndex < PageCount) then - begin - CalcPagesBounds(TopPos, VirtualWidth, VirtualHeight); - LeftPos := LeftPos + GetDeltaX(Pages[APageIndex].SiteBounds); - TopPos := TopPos + GetDeltaY(Pages[APageIndex].SiteBounds); - CalcPagesBounds(TopPos, VirtualWidth, VirtualHeight); - end; -end; - -procedure TCustomdxPreview.SetPageXYCount(XCount, YCount: Integer); -begin - BeginUpdate; - try - PageXCount := XCount; - PageYCount := YCount; - finally - EndUpdate; - end; -end; - -procedure TCustomdxPreview.ZoomIn; -begin - ZoomFactor := ZoomFactor + ZoomStep; -end; - -procedure TCustomdxPreview.ZoomOut; -begin - ZoomFactor := ZoomFactor - ZoomStep; -end; - -function TCustomdxPreview.MarginFromPoint(const Pt: TPoint): TdxPreviewPageMargin; -var - I: Integer; -begin - if SelPageIndex <> -1 then - for I := Margins.Count - 1 downto 0 do - begin - Result := Margins[I]; - if Result.HasPoint(Pt) then Exit; - end; - Result := nil; -end; - -function TCustomdxPreview.MarginFromPoint(const Pt: TSmallPoint): TdxPreviewPageMargin; -begin - Result := MarginFromPoint(SmallPointToPoint(Pt)); -end; - -function TCustomdxPreview.MarginFromPoint(X, Y: Integer): TdxPreviewPageMargin; -begin - Result := MarginFromPoint(MakePoint(X, Y)); -end; - -function TCustomdxPreview.MarginValueToString(Value: Integer): string; -var - DisplayValue: TFloat; - Mask: string; -begin - DisplayValue := LoMetricToAnother(FMeasurementUnits, Value); - case ActualMeasurementUnits of - pmuInches: - Result := cxGetResourceString(@sdxUnitsInches); - pmuMillimeters: - Result := cxGetResourceString(@sdxUnitsMillimeters); - pmuCentimeters: - Result := cxGetResourceString(@sdxUnitsCentimeters); - pmuPoints: - Result := cxGetResourceString(@sdxUnitsPoints); - pmuPicas: - Result := cxGetResourceString(@sdxUnitsPicas); - end; - Mask := '########0.#'; - if ActualMeasurementUnits in [pmuInches, pmuCentimeters, pmuPicas] then - Mask := Mask + '#'; - Result := FormatFloat(Mask, DisplayValue) + ' ' + Result; -end; - -function TCustomdxPreview.IndexOfPage(APage: TdxPreviewPage): Integer; -begin - Result := FPages.IndexOf(APage); -end; - -function TCustomdxPreview.PageIndexFromPoint(const Pt: TPoint): Integer; -begin - for Result := 0 to PageCount - 1 do - if Pages[Result].HasPoint(Pt) then - Exit; - - Result := -1; -end; - -function TCustomdxPreview.PageIndexFromPoint(const Pt: TSmallPoint): Integer; -begin - Result := PageIndexFromPoint(SmallPointToPoint(Pt)); -end; - -function TCustomdxPreview.PageIndexFromPoint(X, Y: Integer): Integer; -begin - Result := PageIndexFromPoint(MakePoint(X, Y)); -end; - -function TCustomdxPreview.PageSizeToString: string; -var - PageWidth, PageHeight: Double; - Mask: string; -begin - case ActualMeasurementUnits of - pmuInches: - Result := cxGetResourceString(@sdxUnitsInches); - pmuMillimeters: - Result := cxGetResourceString(@sdxUnitsMillimeters); - pmuCentimeters: - Result := cxGetResourceString(@sdxUnitsCentimeters); - pmuPoints: - Result := cxGetResourceString(@sdxUnitsPoints); - pmuPicas: - Result := cxGetResourceString(@sdxUnitsPicas); - end; - - Mask := '########0.#'; - if ActualMeasurementUnits in [pmuInches, pmuCentimeters, pmuPicas] then - Mask := Mask + '#'; - PageWidth := LoMetricToAnother(FMeasurementUnits, OriginalPageSize.X); - PageHeight := LoMetricToAnother(FMeasurementUnits, OriginalPageSize.Y); - - Result := FormatFloat(Mask, PageWidth) + ' ' + Result + ' x ' + - FormatFloat(Mask, PageHeight) + ' ' + Result; -end; - -procedure TCustomdxPreview.SelectFirstPage; -var - I: Integer; - OldSelPageIndex: Integer; -begin - I := 0; - OldSelPageIndex := SelPageIndex; - repeat - SelPageIndex := I; - Inc(I); - until (SelPageIndex + I = PageCount + 1) or (SelPageIndex <> OldSelPageIndex); -end; - -procedure TCustomdxPreview.SelectLastPage; -var - I: Integer; - OldSelPageIndex: Integer; -begin - I := 1; - OldSelPageIndex := SelPageIndex; - repeat - SelPageIndex := PageCount - I; - Inc(I); - until (I = -1) or (SelPageIndex <> OldSelPageIndex); -end; - -procedure TCustomdxPreview.SelectNextPage; -var - I: Integer; - OldSelPageIndex: Integer; -begin - I := 1; - OldSelPageIndex := SelPageIndex; - repeat - SelPageIndex := SelPageIndex + I; - Inc(I); - until (SelPageIndex + I = PageCount + 1) or (SelPageIndex <> OldSelPageIndex); -end; - -procedure TCustomdxPreview.SelectPrevPage; -var - I: Integer; - OldSelPageIndex: Integer; -begin - if SelPageIndex > 0 then - begin - I := 1; - OldSelPageIndex := SelPageIndex; - repeat - SelPageIndex := SelPageIndex - I; - Inc(I); - until (SelPageIndex - I = -2) or (SelPageIndex <> OldSelPageIndex); - end; -end; - -procedure TCustomdxPreview.AdjustSize; -begin -end; - -procedure TCustomdxPreview.CreateParams(var Params: TCreateParams); -const - CS_ON = CS_OWNDC; - CS_OFF = CS_HREDRAW or CS_VREDRAW; -begin - inherited; - with Params do - begin - if FScrollBars in [ssVertical, ssBoth] then - Style := Style or WS_VSCROLL; - if FScrollBars in [ssHorizontal, ssBoth] then - Style := Style or WS_HSCROLL; - WindowClass.Style := WindowClass.Style + CS_ON - CS_OFF; - if (FBorderStyle = bsSingle) and (LookAndFeel = plfStandard) then - if NewStyleControls and Ctl3D then - begin - Style := Style and not WS_BORDER; - ExStyle := ExStyle or WS_EX_CLIENTEDGE; - end - else - Style := Style or WS_BORDER; - end; -end; - -procedure TCustomdxPreview.CreateWindowHandle(const Params: TCreateParams); -begin - inherited; - if HandleAllocated then FDC := GetDC(Handle); -end; - -procedure TCustomdxPreview.CreateWnd; -const - Styles: array[TScrollBarStyle] of Integer = (FSB_REGULAR_MODE, FSB_ENCARTA_MODE, FSB_FLAT_MODE); -begin - inherited; - if not SysLocale.MiddleEast then - InitializeFlatSB(Handle); - FlatSB_SetScrollProp(Handle, WSB_PROP_HSTYLE, Styles[ScrollBarStyle], True); - FlatSB_SetScrollProp(Handle, WSB_PROP_VSTYLE, Styles[ScrollBarStyle], True); -end; - -procedure TCustomdxPreview.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('IsNoPagesTextAssigned', ReadIsNoPagesTextAssigned, WriteIsNoPagesTextAssigned, - FIsNoPagesTextAssigned and (FNoPagesText = '')); -end; - -procedure TCustomdxPreview.KeyDown(var Key: Word; Shift: TShiftState); -begin - case Key of - VK_RETURN: - if (SelPageIndex > -1) and (DraggingMargin = nil) then - begin - HideAllHints; - Zoomed := not Zoomed; - end; - - VK_ADD: - if (SelPageIndex > -1) and (DraggingMargin = nil) then - begin - HideAllHints; - if GetKeyState(VK_CONTROL) < 0 then - ZoomIn - else - if not Zoomed then - Zoomed := True; - end; - - VK_SUBTRACT: - if (SelPageIndex > -1) and (DraggingMargin = nil) then - begin - HideAllHints; - if GetKeyState(VK_CONTROL) < 0 then - ZoomOut - else - if Zoomed then - Zoomed := False; - end; - - VK_MENU: - if DraggingMargin = nil then - HideAllHints; - - VK_APPS: - if (PopupMenu <> nil) or IsDesigning then - HideAllHints; - - VK_ESCAPE: - if GetCapture = Handle then - begin - ReleaseCapture; - Key := 0; - end; - - VK_PRIOR: - if not (ssCtrl in Shift) then - SelectPrevPage - else - if CanPageScrolling(psdUp) then - begin - ScrollPage(psdUp); - ScrollPage(psdUp); - end; - - VK_NEXT: - if not (ssCtrl in Shift) then - SelectNextPage - else - if CanPageScrolling(psdDown) then - begin - ScrollPage(psdDown); - ScrollPage(psdDown); - end; - - VK_END: - SelectLastPage; - - VK_HOME: - SelectFirstPage; - - VK_LEFT: - if (ssCtrl in Shift) or (ColCount = 1) then - if CanPageScrolling(psdLeft) then - ScrollPage(psdLeft) - else - else - if SelPageCol > 0 then - SelectPrevPage; - - VK_UP: - if ssAlt in Shift then - ZoomIn - else - if (ssCtrl in Shift) or (ColCount = 1) then - if CanPageScrolling(psdUp) then - ScrollPage(psdUp) - else - else - if SelPageRow > 0 then - SelPageIndex := SelPageIndex - ColCount; - - VK_RIGHT: - if (ssCtrl in Shift) or (ColCount = 1) then - if CanPageScrolling(psdRight) then - ScrollPage(psdRight) - else - else - if SelPageCol < ColCount - 1 then - SelectNextPage; - - VK_DOWN: - if ssAlt in Shift then - ZoomOut - else - if (ssCtrl in Shift) or (ColCount = 1) then - if CanPageScrolling(psdDown) then - ScrollPage(psdDown) - else - else - if SelPageRow < Ceil(PageCount / ColCount) - 1 then - SelPageIndex := SelPageIndex + ColCount; - end; - inherited; -end; - -procedure TCustomdxPreview.Loaded; -begin - inherited; - DoCalcPageCount; - if not IsDesigning and (pobStoreInRegistry in OptionsBehavior) and (RegistryPath <> '') then - LoadFromRegistry(RegistryPath); -end; - -procedure TCustomdxPreview.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - PageIndex, OldPageIndex: Integer; - Margin: TdxPreviewPageMargin; - R: TRect; -begin - if Button = mbLeft then - begin - PageIndex := PageIndexFromPoint(X, Y); - if PageIndex <> -1 then - if SelPageIndex = PageIndex then - begin - Margin := MarginFromPoint(X, Y); - if Margin = nil then - if pozZoomOnClick in OptionsZoom then - Zoomed := not Zoomed - else - else - begin - if (pobAllowDragMargins in OptionsBehavior) and Margin.Enabled and not (ssDouble in Shift) then - begin - Margin.DoDragBefore; - R := Margin.Bounds; - FDraggingMargin := Margin; - if Margin.IsVertical then - begin - FBeforeDragPos := X; - FDragOffset := X - R.Left; - end - else - begin - FBeforeDragPos := Y; - FDragOffset := Y - R.Top; - end; - Margin.DraggingPos := FBeforeDragPos - FDragOffset; - SetCapture(Handle); - end; - end; - end - else - begin - OldPageIndex := SelPageIndex; - SelPageIndex := PageIndex; - if OldPageIndex <> SelPageIndex then ResetHintShowTimer(X, Y); - end; - end - else - if DraggingMargin <> nil then ReleaseCapture; - - if (Button = mbMiddle) and (DraggingMargin = nil) and CanAnyScrolling then - DoScrolling; - - inherited; -end; - -procedure TCustomdxPreview.MouseMove(Shift: TShiftState; X, Y: Integer); -var - Pos: Integer; - APageIndex: Integer; -begin - inherited; - if (FLastMousePos.X <> X) or (FLastMousePos.Y <> Y) then - begin - FLastMousePos := MakePoint(X, Y); - if FDraggingMargin = nil then - begin - ResetHintShowTimer(X, Y); - if (pobHotTrack in OptionsBehavior) and IsParentFormActive then - begin - APageIndex := PageIndexFromPoint(X, Y); - if APageIndex <> -1 then SelPageIndex := APageIndex; - end; - end - else - begin - if DraggingMargin.IsVertical then - Pos := X - else - Pos := Y; - DraggingMargin.DraggingPos := Pos - FDragOffset; - end; - end; -end; - -procedure TCustomdxPreview.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - Margin: TdxPreviewPageMargin; - Pos: Integer; -begin - inherited; - if (Button = mbLeft) and (DraggingMargin <> nil) then - begin - Margin := DraggingMargin; -// ReleaseCapture; - with Margin do - begin - if IsVertical then - Pos := X - else - Pos := Y; - if FBeforeDragPos <> Pos then - Value := ValueFromPos(Pos - FDragOffset); - end; - ReleaseCapture; - end; -end; - -{.$DEFINE DEBUG_PREVIEW} - -procedure TCustomdxPreview.Paint; -{$IFDEF DEBUG_PREVIEW} -var - T: DWORD; -{$ENDIF} -begin -{$IFDEF DEBUG_PREVIEW} - T := GetTickCount; -{$ENDIF} - - FPageStack.Clear; - AdjustPagesBounds; - DrawPages; - DrawPagesContent; - if PageCount = 0 then DrawNoPages; -// UpdateScrollBars; - -{$IFDEF DEBUG_PREVIEW} - GetParentForm(Self).Caption := Format('%d', [GetTickCount - T]); -{$ENDIF} -end; - -procedure TCustomdxPreview.WndProc(var Message: TMessage); -var - MouseMsg: TWMMouse; -begin - if (Message.Msg = WM_MOUSEMOVE) and (DraggingMargin <> nil) then - inherited - else - if not IsDesigning and - ((Message.Msg = WM_LBUTTONDOWN) or (Message.Msg = WM_LBUTTONDBLCLK)) and - not Dragging and (DragMode = dmAutomatic) and (DragKind = dkDrag) then - begin - MouseMsg := TWMMouse(Message); - if not IsControlMouseMsg(MouseMsg) and (not (pozZoomOnClick in OptionsZoom) or (PageIndexFromPoint(MouseMsg.Pos) = -1)) then - begin - ControlState := ControlState + [csLButtonDown]; - Dispatch(Message); - end - end - else - inherited; -end; - -function TCustomdxPreview.CreateMargins: TdxPreviewPageMargins; -begin - Result := GetMarginsClass.Create(Self); -end; - -function TCustomdxPreview.GetMarginsClass: TdxPreviewPageMarginsClass; -begin - Result := TdxPreviewPageMargins; -end; - -function TCustomdxPreview.CreatePage: TdxPreviewPage; -begin - Result := GetPageClass.Create(Self); - FPages.Add(Result); -end; - -function TCustomdxPreview.GetPageClass: TdxPreviewPageClass; -begin - Result := TdxPreviewPage; -end; - -function TCustomdxPreview.CheckLeftPos(Value: Integer): Integer; -begin - Result := Value; - if Result > VirtualWidth - ClientWidth then - Result := VirtualWidth - ClientWidth; - if Result < 0 then Result := 0; -end; - -function TCustomdxPreview.CheckTopPos(Value: Integer): Integer; -begin - Result := Value; - if Result > VirtualHeight - ClientHeight then - Result := VirtualHeight - ClientHeight; - if Result < 0 then Result := 0; -end; - -procedure TCustomdxPreview.CheckMargins; -var - I: Integer; -begin - for I := 0 to Margins.Count - 1 do - with Margins[I] do - Value := Value; -end; - -procedure TCustomdxPreview.CheckZoomFactor; -var - PageIndex, FirstPageIndex, LastPageIndex, I, ZoomFactorX, ZoomFactorY: Integer; - - function CalcZoomFactor(Size, PageSize: Integer): Integer; - begin - Result := MulDiv(Size - dxPreviewIndent1 * (1 + I), 100, - dxPreviewIndent2 + I * (PageSize + dxPreviewIndent2)); - end; - -begin - if not HandleAllocated then Exit; - - GetVisiblePageRanges(FirstPageIndex, LastPageIndex); - if FirstPageIndex = 0 then - GetPartVisiblePageRanges(FirstPageIndex, LastPageIndex); - if (SelPageIndex <> -1) and Pages[SelPageIndex].PartVisible then - PageIndex := SelPageIndex - else - PageIndex := FirstPageIndex; - - FZoomModeFixed := True; - try - case ZoomMode of - pzmPageWidth: - ZoomFactor := MulDiv(ClientWidth, 100, PageSize.X + 2 * dxPreviewIndent); - pzmPages: - begin - ZoomFactorX := MinZoomFactor; - for I := FPageXCount downto 1 do - begin - ZoomFactorX := CalcZoomFactor(ClientWidth, PageSize.X); - if ZoomFactorX >= MinZoomFactor then Break; - end; - if ZoomFactorX < MinZoomFactor then ZoomFactorX := MinZoomFactor; -// calc Y zoom factor - ZoomFactorY := MinZoomFactor; - for I := FPageYCount downto 1 do - begin - ZoomFactorY := CalcZoomFactor(ClientHeight, PageSize.Y); - if ZoomFactorY >= MinZoomFactor then Break; - end; - if ZoomFactorY < MinZoomFactor then ZoomFactorY := MinZoomFactor; -// select the smallest zoom factor - if ZoomFactorX < ZoomFactorY then - ZoomFactor := ZoomFactorX - else - ZoomFactor := ZoomFactorY; - end; - end; - finally - FZoomModeFixed := False; - UpdateScrollBars; - LeftPos := LeftPos; - TopPos := TopPos; - MakeVisible(FirstPageIndex); - if FirstPageIndex <> PageIndex then MakeVisible(PageIndex); - if FUpdateCount = 0 then Invalidate; - end; -end; - -procedure TCustomdxPreview.DoScrolling; -type - TdxPreviewScrollDirection = - (dirNone, dirLeft, dirTop, dirRight, dirBottom, dirTopLeft, dirTopRight, dirBottomRight, dirBottomLeft); -const - ScrollTimeStep = 20; - ScrollValueStep = 5; - MaxSpeed = 12; - KeyDelta = 10; -var - BreakOnMouseUp: Boolean; - AllowHorScrolling, AllowVerScrolling: Boolean; - P, PrevP: TPoint; - AnchorPos: TPoint; - AnchorSize: Integer; - AnchorWnd: HWND; - Direction: TdxPreviewScrollDirection; - Speed: Integer; - TimerHits: Integer; - Timer: UINT; - CaptureWnd: HWND; - Msg: TMsg; - Form : TCustomForm; - - function CreateScrollingAnchorWnd: HWND; - var - B: TBitmap; - W, H: Integer; - Rgn: HRGN; - DC: HDC; - - function GetBitmapResourceName: string; - begin - if AllowHorScrolling and AllowVerScrolling then - Result := IDB_DXPSPREVIEW_ANCHORSCROLLFULL - else - if AllowHorScrolling then - Result := IDB_DXPSPREVIEW_ANCHORSCROLLHORZ - else - Result := IDB_DXPSPREVIEW_ANCHORSCROLLVERT; - end; - - begin - B := TBitmap.Create; - try - Bitmap_LoadFromResourceName(B, GetBitmapResourceName); - - W := B.Width; - H := B.Height; - AnchorSize := W; - with AnchorPos do - Result := CreateWindow('STATIC', nil, WS_POPUP, - X - W div 2, Y - H div 2 - 2, W, H, Handle, 0, HInstance, nil); - Rgn := CreateEllipticRgn(0, 0, W + 1, H + 1); - SetWindowRgn(Result, Rgn, True); - SetWindowPos(Result, 0, 0, 0, 0, 0, - SWP_NOZORDER or SWP_NOMOVE or SWP_NOSIZE or SWP_SHOWWINDOW or SWP_NOACTIVATE); - - DC := GetWindowDC(Result); - BitBlt(DC, 0, 0, W, H, B.Canvas.Handle, 0, 0, SRCCOPY); - Rgn := CreateEllipticRgn(0, 0, W + 1, H + 1); - FrameRgn(DC, Rgn, GetSysColorBrush(COLOR_WINDOWTEXT), 1, 1); - DeleteObject(Rgn); - ReleaseDC(Result, DC); - finally - B.Free; - end; - end; - - procedure CalcDirectionAndSpeed(const P: TPoint); - var - DeltaX, DeltaY, SpeedValueX, SpeedValueY: Integer; - Angle, Angle2: Double; - - function GetNeutralZone: TRect; - begin - with AnchorPos do - Result := MakeBounds(X - AnchorSize div 2, Y - AnchorSize div 2, AnchorSize, AnchorSize); - if not AllowHorScrolling then - begin - Result.Left := 0; - Result.Right := Screen.Width; - end; - if not AllowVerScrolling then - begin - Result.Top := 0; - Result.Bottom := Screen.Height; - end; - end; - - begin - Direction := dirNone; - if PtInRect(GetNeutralZone, P) then - begin - Direction := dirNone; - Speed := 0; - Exit; - end - else - begin - BreakOnMouseUp := True; - DeltaX := P.X - AnchorPos.X; - DeltaY := P.Y - AnchorPos.Y; - SpeedValueX := Abs(DeltaX) - AnchorSize div 2; - SpeedValueY := Abs(DeltaY) - AnchorSize div 2; - if SpeedValueY > SpeedValueX then - SpeedValueX := SpeedValueY; - Speed := 1 + SpeedValueX div ScrollValueStep; - if Speed > MaxSpeed then - Speed := MaxSpeed; - if 0.5 * AnchorSize/SQRT(DeltaX * DeltaX + DeltaY * DeltaY) <= 1 then - Angle2 := ArcSin(0.5 * AnchorSize/SQRT(DeltaX * DeltaX + DeltaY * DeltaY)) - else - Angle2 := 0; - Angle := ArcTan2(Abs(DeltaY), Abs(DeltaX)); - if DeltaX <= 0 then - if DeltaY > 0 then - Angle := Angle + Pi - else - Angle := Pi - Angle - else - if DeltaY > 0 then - Angle := 2 * Pi - Angle; - - if (Angle <= Angle2) or (Angle >= 2 * Pi - Angle2) then - Direction := dirRight - else - if (Angle > Angle2) and (Angle < 0.5 * Pi - Angle2) then - if not AllowHorScrolling then - Direction := dirTop - else - if not AllowVerScrolling then - Direction := dirRight - else - Direction := dirTopRight - else - if (Angle >= 0.5 * Pi - Angle2) and (Angle <= 0.5 * Pi + Angle2) then - Direction := dirTop - else - if (Angle > 0.5 * Pi + Angle2) and (Angle < Pi - Angle2) then - if not AllowHorScrolling then - Direction := dirTop - else - if not AllowVerScrolling then - Direction := dirLeft - else - Direction := dirTopLeft - else - if (Angle >= Pi - Angle2) and (Angle <= Pi + Angle2) then - Direction := dirLeft - else - if (Angle > Pi + Angle2) and (Angle < 1.5 * Pi - Angle2) then - if not AllowHorScrolling then - Direction := dirBottom - else - if not AllowVerScrolling then - Direction := dirLeft - else - Direction := dirBottomLeft - else - if (Angle >= 1.5 * Pi - Angle2) and (Angle <= 1.5 * Pi + Angle2) then - Direction := dirBottom - else - if (Angle > 1.5 * Pi + Angle2) and (Angle < 2 * Pi - Angle2) then - if not AllowHorScrolling then - Direction := dirBottom - else - if not AllowVerScrolling then - Direction := dirRight - else - Direction := dirBottomRight - else - Direction := dirNone; - end; - end; - - procedure SetMouseCursor; - var - Cursor: TCursor; - begin - case Direction of - dirLeft: - Cursor := crdxPreviewLeftScroll; - dirTop: - Cursor := crdxPreviewUpScroll; - dirRight: - Cursor := crdxPreviewRightScroll; - dirBottom: - Cursor := crdxPreviewDownScroll; - dirTopLeft: - Cursor := crdxPreviewTopLeftScroll; - dirTopRight: - Cursor := crdxPreviewTopRightLeftScroll; - dirBottomRight: - Cursor := crdxPreviewBottomRightScroll; - dirBottomLeft: - Cursor := crdxPreviewBottomLeftScroll; - else - if AllowHorScrolling and AllowVerScrolling then - Cursor := crdxPreviewFullScroll - else if AllowHorScrolling then - Cursor := crdxPreviewHorzScroll - else - Cursor := crdxPreviewVertScroll; - end; - SetCursor(Screen.Cursors[Cursor]); - end; - - procedure Scroll(Direction: TdxPreviewScrollDirection); - const - Scrolls: array[Boolean] of Longint = (WM_HSCROLL, WM_VSCROLL); - Flags: array[Boolean] of WPARAM = (SB_LINEUP, SB_LINEDOWN); - begin - if Direction > dirNone then - if Direction < dirTopLeft then - SendMessage(Handle, Scrolls[Direction in [dirTop, dirBottom]], Flags[Direction in [dirRight, dirBottom]], 0) - else {dirTopLeft..dirBottomLeft} - begin - SendMessage(Handle, WM_HSCROLL, Flags[Direction in [dirTopRight, dirBottomRight]], 0); - SendMessage(Handle, WM_VSCROLL, Flags[Direction in [dirBottomRight, dirBottomLeft]], 0); - end; - end; - -begin - BreakOnMouseUp := False; - AllowHorScrolling := CanHorzScrolling; - AllowVerScrolling := CanVertScrolling; - GetCursorPos(PrevP); - AnchorPos := PrevP; - AnchorWnd := CreateScrollingAnchorWnd; - Direction := dirNone; - SetMouseCursor; - Speed := 1; - TimerHits := 0; - Timer := SetTimer(0, 0, ScrollTimeStep, nil); - - CaptureWnd := Handle; - SetCapture(CaptureWnd); - try - while GetCapture = CaptureWnd do - begin - case Integer(GetMessage(Msg, 0, 0, 0)) of - -1: Break; - 0: - begin - PostQuitMessage(Msg.wParam); - Break; - end; - end; - case Msg.Message of - WM_KEYDOWN, WM_KEYUP: - case Msg.wParam of - VK_ESCAPE, VK_MENU, VK_APPS: - Break; - VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT, VK_HOME, VK_PRIOR, VK_END, VK_NEXT: - begin - GetCursorPos(P); - if Msg.wParam in [VK_UP, VK_HOME, VK_PRIOR] then Dec(P.Y, KeyDelta); - if Msg.wParam in [VK_DOWN, VK_END, VK_NEXT] then Inc(P.Y, KeyDelta); - if Msg.wParam in [VK_LEFT, VK_HOME, VK_END] then Dec(P.X, KeyDelta); - if Msg.wParam in [VK_RIGHT, VK_PRIOR, VK_NEXT] then Inc(P.X, KeyDelta); - SetCursorPos(P.X, P.Y); - end; - end; - WM_MOUSEMOVE: - begin - P.X := SmallInt(LoWord(Msg.lParam)); - P.Y := SmallInt(HiWord(Msg.lParam)); - Windows.ClientToScreen(Msg.hWnd, P); - if (P.X <> PrevP.X) or (P.Y <> PrevP.Y) then - begin - CalcDirectionAndSpeed(P); - SetMouseCursor; - PrevP := P; - end; - end; - WM_MBUTTONUP: - if BreakOnMouseUp then Break; - WM_TIMER: - if UINT(Msg.wParam) = Timer then - begin - Inc(TimerHits); - if TimerHits mod (MaxSpeed - Speed + 1) = 0 then - Scroll(Direction); - end; - WM_SYSCOMMAND: - if Msg.wParam = SC_CLOSE then Break; - else - if (Msg.Message = WM_PAINT) and (Msg.hwnd = AnchorWnd) then - begin - ValidateRect(AnchorWnd, nil); - Continue; - end; - if (Msg.Message >= WM_MOUSEFIRST) and (Msg.Message <= WM_MOUSELAST) then - Break; - TranslateMessage(Msg); - DispatchMessage(Msg); - end; - end; - finally - if GetCapture = CaptureWnd then - ReleaseCapture; - KillTimer(0, Timer); - DestroyWindow(AnchorWnd); - if (Msg.Message = WM_SYSCOMMAND) and (Msg.wParam = SC_CLOSE) then - begin - Form := GetParentForm(Self); - if Form <> nil then - PostMessage(Form.Handle, WM_SYSCOMMAND, SC_CLOSE, 0); - end; - end; -end; - -function TCustomdxPreview.CanSelectPage(APageIndex: Integer): Boolean; -begin - Result := True; - if Assigned(FOnSelectingPage) then FOnSelectingPage(Self, APageIndex, Result); -end; - -function TCustomdxPreview.CanShowMarginHint: Boolean; -begin - Result := True; - if Assigned(FOnCanShowMarginHint) then FOnCanShowMarginHint(Self, Result); -end; - -procedure TCustomdxPreview.DoAfterDragMargin(AMargin: TdxPreviewPageMargin); -begin - if Assigned(FOnAfterDragMargin) then FOnAfterDragMargin(Self, AMargin); -end; - -procedure TCustomdxPreview.DoBeforeDragMargin(AMargin: TdxPreviewPageMargin); -begin - if Assigned(FOnBeforeDragMargin) then FOnBeforeDragMargin(Self, AMargin); -end; - -procedure TCustomdxPreview.DoCalcPageCount; -begin - if FUpdateCount > 0 then Exit; - if Assigned(FOnCalcPageCount) then FOnCalcPageCount(Self); -end; - -procedure TCustomdxPreview.DoChangePageCount; -begin - if Assigned(FOnChangePageCount) then FOnChangePageCount(Self); -end; - -procedure TCustomdxPreview.DoDragMargin(AMargin: TdxPreviewPageMargin); -begin - if Assigned(FOnDragMargin) then FOnDragMargin(Self, AMargin); -end; - -procedure TCustomdxPreview.DoDrawPageContent(R: TRect; APageIndex: Integer); -begin - if Assigned(FOnDrawPageContent) then FOnDrawPageContent(Self, Canvas, R, APageIndex); -end; - -procedure TCustomdxPreview.DoGetPageNumberHintText(out AText: string); -var - StartPage, EndPage: Integer; -begin - AText := DropAmpersand(cxGetResourceString(@sdxPage)) + ': '; - GetPartVisiblePageRanges(StartPage, EndPage); - AText := AText + IntToStr(StartPage + 1); - if StartPage <> EndPage then - AText := AText + ' - ' + IntToStr(EndPage + 1); - - if Assigned(FOnGetPageNumberHint) then - FOnGetPageNumberHint(Self, StartPage, EndPage, AText); -end; - -procedure TCustomdxPreview.DoMarginChanged(AMargin: TdxPreviewPageMargin); -begin - if Assigned(FOnMarginChanged) then FOnMarginChanged(Self, AMargin); - if (AMargin <> nil) and AMargin.IsForceRecalculatePageCount then - DoCalcPageCount; -end; - - {case FMarginType of - pmHeader: - if Margins.Top.Value - FValue < Preview.MinHeaderSize then - Margins.Top.Value := FValue + Preview.MinHeaderSize; - pmFooter: - if Margins.Bottom.Value - FValue < Preview.MinFooterSize then - Margins.Bottom.Value := FValue + Preview.MinFooterSize; - end;} - -procedure TCustomdxPreview.DoZoomFactorChanged; -begin - if Assigned(FOnZoomFactorChanged) then FOnZoomFactorChanged(Self); -end; - -procedure TCustomdxPreview.DoZoomModeChanged; -begin - if Assigned(FOnZoomModeChanged) then FOnZoomModeChanged(Self); -end; - -procedure TCustomdxPreview.DoSelectedPageChanging; -begin - if Assigned(FOnSelectedPageChanging) then FOnSelectedPageChanging(Self, FSelPageIndex); -end; - -procedure TCustomdxPreview.DoSelectedPageChanged; -begin - if Assigned(FOnSelectedPageChanged) then FOnSelectedPageChanged(Self, FSelPageIndex); -end; - -procedure TCustomdxPreview.DrawMargins(DC: HDC); -var - I: Integer; - Margin: TdxPreviewPageMargin; -begin - for I := 0 to Margins.Count - 1 do - begin - Margin := Margins[I]; - if Margin.Visible then Margin.Draw(DC); - end; -end; - -procedure TCustomdxPreview.DrawPageBackground(const R: TRect; APageIndex: Integer); -begin - if Assigned(FOnDrawPageBackground) then - FOnDrawPageBackground(Self, Canvas, R, APageIndex) - else - if povDefaultDrawPageBackground in OptionsView then - with PageBackground do - if Mode = bmNone then - FillRect(FDC, R, HBRUSH(COLOR_WINDOW + 1)) - else - begin - if (Mode = bmPicture) and (PictureMode in [ppmCenter, ppmProportional]) then - FillRect(FDC, R, HBRUSH(COLOR_WINDOW + 1)); - Paint(Canvas, R); - end; -end; - -procedure TCustomdxPreview.DrawPageBorder(DC: HDC; APageIndex: Integer); -var - BorderBounds, SiteBounds: TRect; - BrushColor: COLORREF; - SiteBrush: HBRUSH; - I: Integer; -begin - BorderBounds := Pages[APageIndex].Bounds; - InflateRect(BorderBounds, 1, 1); - - if (povPageSelection in OptionsView) and (APageIndex = SelPageIndex) then - BrushColor := COLOR_HIGHLIGHT - else - BrushColor := COLOR_WINDOWTEXT; - - FrameRect(DC, BorderBounds, GetSysColorBrush(BrushColor)); - if (povPageSelection in OptionsView) and (APageIndex = SelPageIndex) then - begin - InflateRect(BorderBounds, 1, 1); - FrameRect(DC, BorderBounds, GetSysColorBrush(BrushColor)); - if SelectionFrameThickness > 2 then - begin - InflateRect(BorderBounds, -2, -2); - for I := 0 to SelectionFrameThickness - 2 do - begin - FrameRect(DC, BorderBounds, GetSysColorBrush(BrushColor)); - InflateRect(BorderBounds, -1, -1); - end; - InflateRect(BorderBounds, SelectionFrameThickness, SelectionFrameThickness); - end; - end; - - SiteBounds := Pages[APageIndex].SiteBounds; - SiteBrush := CreateSolidBrush(ColorToRGB(Color)); - with SiteBounds do - begin - DrawRestSpaceBackgroundRect(MakeRect(Left, Top, Right, BorderBounds.Top)); - DrawRestSpaceBackgroundRect(MakeRect(Left, BorderBounds.Top, BorderBounds.Left, Bottom)); - end; - OffsetRect(BorderBounds, 2, 2); - with BorderBounds do - begin - DrawRestSpaceBackgroundRect(MakeRect(Left - 2, Bottom - 2, Left, Bottom)); - FillRect(DC, MakeRect(Left, Bottom - 2, Right, Bottom), GetSysColorBrush(COLOR_WINDOWTEXT)); - DrawRestSpaceBackgroundRect(MakeRect(Right - 2, Top - 2, Right, Top)); - FillRect(DC, MakeRect(Right - 2, Top, Right, Bottom - 2), GetSysColorBrush(COLOR_WINDOWTEXT)); - end; - with SiteBounds do - begin - FillRect(DC, MakeRect(BorderBounds.Left - 2, BorderBounds.Bottom, Right, Bottom), SiteBrush); - FillRect(DC, MakeRect(BorderBounds.Right, BorderBounds.Top - 2, Right, BorderBounds.Bottom), SiteBrush); - end; - DeleteObject(SiteBrush); -end; - -procedure TCustomdxPreview.InvalidateMargins; -var - I: Integer; -begin - if povMargins in OptionsView then - for I := 0 to Margins.Count - 1 do - Margins[I].Invalidate; -end; - -procedure TCustomdxPreview.InvalidatePageBorder(APageIndex: Integer); -var - R1, R2: TRect; - Rgn1, Rgn2: HRGN; -begin - if not HandleAllocated or (APageIndex < 0) or (APageIndex > PageCount - 1) then - Exit; - - R2 := Pages[APageIndex].Bounds; - R1 := Pages[APageIndex].SiteBounds; - InflateRect(R2, -(SelectionFrameThickness - 1), -(SelectionFrameThickness - 1)); - Rgn1 := CreateRectRgnIndirect(R1); - Rgn2 := CreateRectRgnIndirect(R2); - CombineRgn(Rgn1, Rgn1, Rgn2, RGN_DIFF); - DeleteObject(Rgn2); - InvalidateRgn(Handle, Rgn1, False); - DeleteObject(Rgn1); -end; - -function TCustomdxPreview.GetActualMeasurementUnits: TdxPreviewMeasurementUnits; -begin - if MeasurementUnits = pmuDefault then - Result := GetDefaultMeasurementUnits - else - Result := MeasurementUnits; -end; - -function TCustomdxPreview.GetAllRowCount: Integer; -begin - Result := ColCount; - Result := PageCount div Result + Byte(PageCount mod Result > 0); -end; - -function TCustomdxPreview.GetColCount: Integer; -begin - if FZoomMode = pzmPageWidth then - Result := 1 - else - begin - if FZoomMode = pzmNone then - Result := (ClientWidth - Indent) div (VisiblePageSize.X + Indent) - else - Result := - (MulDiv(ClientWidth, 100, FZoomFactor) - dxPreviewIndent) div (PageSize.X + dxPreviewIndent); - if Result > PageCount then Result := PageCount; - if Result < 1 then Result := 1; - if (FZoomMode = pzmPages) and (Result > FPageXCount) then - Result := FPageXCount; - end; -end; - -function TCustomdxPreview.GetColor: TColor; -begin - if FIsColorAssigned then - Result := inherited Color - else - Result := DefaultColor; -end; - -function TCustomdxPreview.GetNoPagesText: string; -begin - if FIsNoPagesTextAssigned then - Result := FNoPagesText - else - Result := DefaultNoPagesText; -end; - -procedure TCustomdxPreview.SetLookAndFeel(Value: TdxPreviewLookAndFeel); -begin - if LookAndFeel <> Value then - begin - FLookAndFeel := Value; - ScrollBarStyle := PreviewScrollBarStyleMap[Value]; - Brush.Color := Color; - RecreateWnd; - end; -end; - -procedure TCustomdxPreview.SetOptionsBehavior(Value: TdxPreviewOptionsBehavior); -var - Changes: TdxPreviewOptionsBehavior; - I: Integer; -begin - Changes := FOptionsBehavior + Value - FOptionsBehavior * Value; - if Changes <> [] then - begin - FOptionsBehavior := Value; - if pobAllowDragMargins in Changes then - for I := 0 to Margins.Count - 1 do - Margins[I].Enabled := pobAllowDragMargins in Value; - end; -end; - -procedure TCustomdxPreview.SetOptionsHint(Value: TdxPreviewOptionsHint); -var - Changes: TdxPreviewOptionsHint; -begin - Changes := FOptionsHint + Value - FOptionsHint * Value; - if Changes <> [] then - FOptionsHint := Value; -end; - -procedure TCustomdxPreview.SetOptionsStore(Value: TdxPreviewOptionsStore); -var - Changes: TdxPreviewOptionsStore; -begin - Changes := FOptionsStore + Value - FOptionsStore * Value; - if Changes <> [] then - FOptionsStore := Value; -end; - -procedure TCustomdxPreview.SetOptionsView(Value: TdxPreviewOptionsView); -var - Changes: TdxPreviewOptionsView; - I: Integer; -begin - Changes := FOptionsView + Value - FOptionsView * Value; - if Changes <> [] then - begin - FOptionsView := Value; - - if HandleAllocated then - if [povDefaultDrawPageBackground, povPageSelection] * Changes <> [] then - InvalidatePages - else - if povAutoHideScrollBars in Changes then - RecreateWnd; - - if povMargins in Changes then - for I := 0 to Margins.Count - 1 do - Margins[I].Visible := povMargins in Value; - end; -end; - -procedure TCustomdxPreview.SetOptionsZoom(Value: TdxPreviewOptionsZoom); -var - Changes: TdxPreviewOptionsZoom; -begin - Changes := FOptionsZoom + Value - FOptionsZoom * Value; - if Changes <> [] then - FOptionsZoom := Value; -end; - -procedure TCustomdxPreview.SetMarginColor(Value: TColor); -begin - if FMarginColor <> Value then - begin - FMarginColor := Value; - RecreateMarginPen; - if HandleAllocated then InvalidateMargins; - end; -end; - -procedure TCustomdxPreview.RecreateMarginPen; -begin - if FMarginPen <> 0 then DeleteObject(FMarginPen); - FMarginPen := CreatePen(PS_DOT, 1, ColorToRGB(MarginColor)); -end; - -function TCustomdxPreview.IsColorStored: Boolean; -begin - Result := FIsColorAssigned and (Color <> DefaultColor); -end; - -function TCustomdxPreview.IsNoPagesTextStored: Boolean; -begin - Result := FIsNoPagesTextAssigned and (FNoPagesText <> DefaultNoPagesText); -end; - -procedure TCustomdxPreview.SetBorderStyle(Value: TBorderStyle); -begin - if FBorderStyle <> Value then - begin - FBorderStyle := Value; - RecreateWnd; - end; -end; - -procedure TCustomdxPreview.SetColor(Value: TColor); -begin - if Color <> Value then - begin - inherited Color := Value; - FIsColorAssigned := True; - end; -end; - -function TCustomdxPreview.GetPage(index: Integer): TdxPreviewPage; -begin - Result := TdxPreviewPage(FPages[index]); -end; - -function TCustomdxPreview.GetPageCount: Integer; -begin - Result := FPages.Count; -end; - -function TCustomdxPreview.GetSelPageRow: Integer; -begin - Result := SelPageIndex div ColCount; -end; - -function TCustomdxPreview.GetSelPageCol: Integer; -begin - Result := SelPageIndex - SelPageRow * ColCount; -end; - -function TCustomdxPreview.GetRowCount: Integer; -begin - if ZoomMode = pzmPageWidth then - Result := 1 - else - begin - Result := (MulDiv(ClientHeight, 100, FZoomFactor) - dxPreviewIndent) div (PageSize.Y + dxPreviewIndent); - if Result < 1 then Result := 1; - if (ZoomMode = pzmPages) and (Result > FPageYCount) then - Result := FPageYCount; - end; -end; - -function TCustomdxPreview.GetVirtualHeight: Integer; -begin - { Result := MulDiv(dxPreviewIndent + AllRowCount * (PageSize.Y + dxPreviewIndent), - FZoomFactor, 100);} - Result := Indent + AllRowCount * (VisiblePageSize.Y + Indent); -end; - -function TCustomdxPreview.GetVirtualWidth: Integer; -begin - if (PageCount = 0) or (ZoomMode = pzmPageWidth) then - Result := ClientWidth - else - Result := Indent + ColCount * (VisiblePageSize.X + Indent); -end; - -procedure TCustomdxPreview.SetMinFooterSize(Value: Integer); -begin - if Value < 0 then - Value := 0; - if FMinFooterSize <> Value then - begin - Value := Min(Value, ActualOriginalPageSize.Y - MinUsefulSize.Y - MinHeaderSize - - Margins.Footer.Value - Margins.Header.Value); - FMinFooterSize := Value; - Margins.Bottom.Value := Max(Margins.Bottom.Value, Margins.Footer.Value + Value); - end; -end; - -procedure TCustomdxPreview.SetMinHeaderSize(Value: Integer); -begin - if Value < 0 then - Value := 0; - if FMinHeaderSize <> Value then - begin - Value := Min(Value, ActualOriginalPageSize.Y - MinUsefulSize.Y - MinFooterSize - - Margins.Footer.Value - Margins.Header.Value); - FMinHeaderSize := Value; - Margins.Top.Value := Max(Margins.Top.Value, Margins.Header.Value + Value); - end; -end; - -procedure TCustomdxPreview.SetMinUsefulSize(const Value: TPoint); -begin - FMinUsefulSize.X := MinMax(Value.X, 0, - ActualOriginalPageSize.X - Margins.Left.Value - Margins.Right.Value); - FMinUsefulSize.Y := MinMax(Value.Y, 0, - ActualOriginalPageSize.Y - Margins.Top.Value - Margins.Bottom.Value); -end; - -procedure TCustomdxPreview.SetNoPagesText(const Value: string); -begin - if NoPagesText <> Value then - begin - FNoPagesText := Value; - FIsNoPagesTextAssigned := True; - if PageCount = 0 then Invalidate; - end; -end; - -function TCustomdxPreview.GetVisiblePageSize: TPoint; -begin - Result.X := MulDiv(FPageSize.X, FZoomFactor, 100); - Result.Y := MulDiv(FPageSize.Y, FZoomFactor, 100); -end; - -procedure TCustomdxPreview.SetMargins(Value: TdxPreviewPageMargins); -begin - FMargins.Assign(Value); - if FUpdateCount = 0 then Invalidate; -end; - -procedure TCustomdxPreview.SetLeftPos(Value: Integer); -begin - Value := CheckLeftPos(Value); - if FLeftPos <> Value then - begin - if not FZooming then - ScrollWindowEx(Handle, FLeftPos - Value, 0, nil, nil, 0, nil, SW_INVALIDATE); - FLeftPos := Value; - if HandleAllocated then UpdateScrollBars; - end; -end; - -procedure TCustomdxPreview.SetMaxZoomFactor(Value: Integer); -begin - if Value < FMinZoomFactor then - Value := FMinZoomFactor; - if FMaxZoomFactor <> Value then - begin - FMaxZoomFactor := Value; - if ZoomFactor > FMaxZoomFactor then - ZoomFactor := FMaxZoomFactor; - end; -end; - -procedure TCustomdxPreview.SetMinZoomFactor(Value: Integer); -begin - if Value < dxPreviewMinZoomFactor then - Value := dxPreviewMinZoomFactor; - if Value > FMaxZoomFactor then - Value := FMaxZoomFactor; - if FMinZoomFactor <> Value then - begin - FMinZoomFactor := Value; - if ZoomFactor < FMinZoomFactor then - ZoomFactor := FMinZoomFactor; - end; -end; - -procedure TCustomdxPreview.SetOnCalcPageCount(Value: TNotifyEvent); -begin - if @FOnCalcPageCount <> @Value then - begin - FOnCalcPageCount := Value; - if Assigned(FOnCalcPageCount) and ([csReading, csLoading] * ComponentState = []) then - begin - DoCalcPageCount; - if HandleAllocated then Invalidate; - end; - end; -end; - -procedure TCustomdxPreview.SetOrientation(Value: TdxPreviewPaperOrientation); -begin - if FOrientation <> Value then - begin - FOrientation := Value; - AdjustOrientation; - end; -end; - -procedure TCustomdxPreview.AdjustOrientation; -var - Temp, Temp1: Integer; -begin - BeginUpdate; - try - if pobAutoSwapMargins in OptionsBehavior then - if Orientation = ppoLandscape then - begin - Temp := Margins.Left.Value; - Margins.Left.Value := Margins.Bottom.Value; - Temp1 := Margins.Top.Value; - Margins.Top.Value := Temp; - Temp := Margins.Right.Value; - Margins.Right.Value := Temp1; - Margins.Bottom.Value := Temp; - end - else - begin - Temp := Margins.Bottom.Value; - Margins.Bottom.Value := Margins.Left.Value; - Temp1 := Margins.Right.Value; - Margins.Right.Value := Temp; - Temp := Margins.Top.Value; - Margins.Top.Value := Temp1; - Margins.Left.Value := Temp; - end; - PageParametersChanged(FOriginalPageSize, [pcX, pcY]); - CheckMargins; - finally - EndUpdate; - CheckZoomFactor; - end; -end; - -procedure TCustomdxPreview.PageParametersChanging(Sender: TObject; - Coords: TdxPointCoords; var Values: array of Integer); -begin - if (pcX in Coords) and (Values[0] < MinUsefulSize.X) then - Values[0] := MinUsefulSize.X; - if (pcY in Coords) and (Values[1] < MinUsefulSize.Y) then - Values[1] := MinUsefulSize.Y; -end; - -procedure TCustomdxPreview.PageParametersChanged(Sender: TObject; Coords: TdxPointCoords); -var - V: Integer; -begin - FActualOriginalPageSize := OriginalPageSize.Point; - if Orientation = ppoLandscape then - with FActualOriginalPageSize do - begin - V := Y; - Y := X; - X := V; - end; - FPageSize := LoMetricToPixels(ActualOriginalPageSize); - CheckMargins; - CheckZoomFactor; -end; - -procedure TCustomdxPreview.SetOriginalPageSize(Value: TdxPointWrapper); -begin - if Value <> nil then OriginalPageSize.Assign(Value); -end; - -procedure TCustomdxPreview.SetPageBackground(Value: TdxBackground); -begin - PageBackground.Assign(Value); -end; - -procedure TCustomdxPreview.SetPageCount(Value: Integer); -var - I: Integer; -begin - if Value < 0 then Value := 0; - if PageCount <> Value then - begin - if Value < PageCount then - begin - for I := Value to FPages.Count - 1 do - TdxPreviewPage(FPages[I]).Free; - FPages.Count := Value; - end - else - for I := PageCount to Value - 1 do - CreatePage; - // check SelPageIndex - if not (csDestroying in ComponentState) then - begin - ResyncSelPageIndex; - CheckZoomFactor; - end; - end; -end; - -procedure TCustomdxPreview.ResyncSelPageIndex; -var - Value: Integer; -begin - Value := SelPageIndex; - while (Value > -1) and not CanSelectPage(Value) do - Dec(Value); - if Value = -1 then - begin - Value := 0; - while (Value < PageCount) and not CanSelectPage(Value) do - Inc(Value); - end; - if Value = PageCount then Value := -1; - SelPageIndex := Value; -end; - -procedure TCustomdxPreview.SetPageXCount(Value: Integer); -begin - if Value < 1 then Value := 1; - if FPageXCount <> Value then - begin - FPageXCount := Value; - ZoomMode := pzmPages; - CheckZoomFactor; - end; -end; - -procedure TCustomdxPreview.SetPageYCount(Value: Integer); -begin - if Value < 1 then Value := 1; - if FPageYCount <> Value then - begin - FPageYCount := Value; - ZoomMode := pzmPages; - CheckZoomFactor; - end; -end; - -procedure TCustomdxPreview.SetSelPageIndex(Value: Integer); -begin - if Value < -1 then Value := -1; - if Value > PageCount - 1 then Value := PageCount - 1; - - if FSelPageIndex <> Value then - if (Value = -1) or CanSelectPage(Value) then - begin - DoSelectedPageChanging; - if FSelPageIndex < PageCount then - begin - InvalidatePageBorder(FSelPageIndex); - InvalidateMargins; - end; - FSelPageIndex := Value; - if FSelPageIndex <> -1 then - begin - InvalidatePageBorder(FSelPageIndex); - InvalidateMargins; - MakeVisible(FSelPageIndex); - end; - DoSelectedPageChanged; - end; -end; - -procedure TCustomdxPreview.SetTopPos(Value: Integer); -begin - Value := CheckTopPos(Value); - if FTopPos <> Value then - begin - if not FZooming then - ScrollWindowEx(Handle, 0, FTopPos - Value, nil, nil, 0, nil, SW_INVALIDATE); - FTopPos := Value; - if HandleAllocated then UpdateScrollBars; - end; -end; - -procedure TCustomdxPreview.SetZoomed(Value: Boolean); -begin - FZoomedFixed := True; - if not FZoomed and Value then - begin - FZoomed := True; - FUnzoomedFactor := ZoomFactor; - FUnzoomedMode := ZoomMode; - ZoomFactor := 100; - end - else if FZoomed then - if ZoomFactor = 100 then - begin - FZoomed := False; - ZoomMode := FUnzoomedMode; - ZoomFactor := FUnzoomedFactor; - end - else - ZoomFactor := 100; - FZoomedFixed := False; - UpdateWindow(Handle); -end; - -procedure TCustomdxPreview.SetZoomStep(Value: Integer); -begin - if (Value < 1) then Value := 1; - if (FZoomStep <> Value) then FZoomStep := Value; -end; - -procedure TCustomdxPreview.SetZoomFactor(Value: Integer); -begin - if Value < FMinZoomFactor then Value := FMinZoomFactor; - if Value > FMaxZoomFactor then Value := FMaxZoomFactor; - if FZoomFactor <> Value then - begin - FZoomFactor := Value; - if not FZoomModeFixed then FZoomMode := pzmNone; - if not FZoomedFixed then FZoomed := FZoomFactor >= 100; - // FIndent := dxPreviewIndent1 + MulDiv(dxPreviewIndent2, FZoomFactor, 100); - FIndent := dxPreviewIndent1 + dxPreviewIndent2 * FZoomFactor div 100; - if FZoomMode = pzmNone then - begin - FZooming := True; - try - CheckZoomFactor; - finally - FZooming := False; - end; - end - else - if (FUpdateCount = 0) then Invalidate; - DoZoomFactorChanged; - end; -end; - -procedure TCustomdxPreview.SetZoomMode(Value: TdxPreviewZoomMode); -begin - if FZoomMode <> Value then - begin - FZoomMode := Value; - CheckZoomFactor; - DoZoomModeChanged; - end; -end; - -procedure TCustomdxPreview.CreateHint; -begin - if FHintWindow = nil then - FHintWindow := TdxPreviewHintWindow.Create(nil); -end; - -procedure TCustomdxPreview.DestroyHint; -begin - FreeAndNil(FHintWindow); -end; - -procedure TCustomdxPreview.ActivateHint(AMargin: TdxPreviewPageMargin); -var - Pt: TPoint; -begin - if FHintWindow = nil then Exit; - Pt := ScreenToClient(Mouse.CursorPos); - with AMargin do - begin - if IsVertical then - if IsDragging then - Pt.X := DraggingPos - else - Pt.X := Bounds.Left - else - if IsDragging then - Pt.Y := DraggingPos - else - Pt.Y := Bounds.Top; - Windows.ClientToScreen(Handle, Pt); - end; - TdxPreviewHintWindow(FHintWindow).ActivateHint(Pt, AMargin.DisplayText, AMargin); -end; - -procedure TCustomdxPreview.CancelHintHide; -begin - FHintHideShortTimer.Enabled := False; -end; - -procedure TCustomdxPreview.CancelHintShow; -begin - FHintShowTimer.Enabled := False; - DestroyHint; -end; - -procedure TCustomdxPreview.StartHintShow; -begin - FHintShowTimer.Enabled := True; -end; - -procedure TCustomdxPreview.ClearLastMousePos; -begin - FLastMousePos := MakePoint(MaxInt, MaxInt); -end; - -procedure TCustomdxPreview.CancelDragMargin; -begin - if DraggingMargin = nil then Exit; - DraggingMargin.DraggingPos := NullDraggingPos; - DraggingMargin.DoDragAfter; - FDraggingMargin := nil; - ClearLastMousePos; -end; - -procedure TCustomdxPreview.DestroyPageNumberHint; -begin - FreeAndNil(FHintWindowPageNumber); -end; - -procedure TCustomdxPreview.UpdatePageNumberHint; -var - HintText: string; -begin - if FHintWindowPageNumber = nil then - FHintWindowPageNumber := TdxPreviewHintWindow.Create(nil); - DoGetPageNumberHintText(HintText); - TdxPreviewHintWindow(FHintWindowPageNumber).ActivateHint(Mouse.CursorPos, HintText, nil); -end; - -function TCustomdxPreview.GetScrollInfo(ABarFlag: Integer; var AScrollInfo: TScrollInfo): BOOL; -begin - Result := FlatSB_GetScrollInfo(Handle, ABarFlag, AScrollInfo); -end; - -function TCustomdxPreview.SetScrollInfo(ABarFlag: Integer; const AScrollInfo: TScrollInfo; - ARedraw: BOOL): Integer; -begin - Result := FlatSB_SetScrollInfo(Handle, ABarFlag, AScrollInfo, ARedraw); -end; - -procedure TCustomdxPreview.SetSelectionFrameThickness(Value: Integer); -begin - if Value < 2 then Value := 2; - if FSelectionFrameThickness <> Value then - begin - FSelectionFrameThickness := Value; - if SelPageIndex <> -1 then InvalidatePage(SelPageIndex); - end; -end; - -procedure TCustomdxPreview.SetScrollBarStyle(Value: TScrollBarStyle); -begin - if Value <> FScrollBarStyle then - begin - FScrollBarStyle := Value; - RecreateWnd; - end; -end; - -function TCustomdxPreview.CanChangeMargins: Boolean; -begin - Result := [csReading, csLoading] * ComponentState = []; -end; - -procedure TCustomdxPreview.ScrollPage(ADirection: TdxPreviewScrollDirection); -const - MsgMap: array[TdxPreviewScrollDirection] of Cardinal = (WM_HSCROLL, WM_VSCROLL, WM_HSCROLL, WM_VSCROLL); - ScrollCodeMap: array[TdxPreviewScrollDirection] of Smallint = (SB_LINELEFT, SB_LINEUP, SB_LINERIGHT, SB_LINEDOWN); - BarMap: array[TdxPreviewScrollDirection] of Integer = (SB_HORZ, SB_VERT, SB_HORZ, SB_VERT); -var - Message: TWMScroll; -begin - FillChar(Message, SizeOf(TMessage), 0); - Message.Msg := MsgMap[ADirection]; - Message.ScrollCode := ScrollCodeMap[ADirection]; - Message.Pos := GetScrollPos(Handle, BarMap[ADirection]); - Dispatch(Message); -end; - -procedure TCustomdxPreview.DrawNoPages; -var - R: TRect; - H: Integer; - F: HFONT; - C: TColor; -begin - R := ClientRect; - FillRect(FDC, R, Brush.Handle); - SetBkMode(FDC, TRANSPARENT); - - H := DrawText(FDC, PChar(NoPagesText), Length(NoPagesText), R, DT_LEFT or DT_CALCRECT or DT_WORDBREAK); - R := ClientRect; - R.Top := R.Top + (R.Bottom - R.Top - H) div 2; - R.Bottom := R.Top + H; - - F := SelectObject(FDC, Font.Handle); - C := SetTextColor(FDC, ColorToRGB(clWindow)); - DrawText(FDC, PChar(NoPagesText), Length(NoPagesText), R, DT_WORDBREAK or DT_CENTER or DT_TOP); - SetTextColor(FDC, C); - SelectObject(FDC, F); -end; - -procedure TCustomdxPreview.DrawPages; -var - I, J, H, PageIndex: Integer; - Page: TdxPreviewPage; - R: TRect; - Rgn, RestRgn: HRGN; - - procedure ExcludePageRect(const R: TRect); - begin - Rgn := CreateRectRgnIndirect(R); - CombineRgn(RestRgn, RestRgn, Rgn, RGN_DIFF); - DeleteObject(Rgn); - end; - -begin - H := ClientHeight; - GetClipBox(FDC, R); - RestRgn := CreateRectRgnIndirect(R); - for J := 0 to AllRowCount - 1 do - for I := 0 to ColCount - 1 do - begin - PageIndex := J * ColCount + I; - if PageIndex > PageCount - 1 then Break; - Page := Pages[PageIndex]; - R := Page.SiteBounds; - if (R.Bottom > 0) and (R.Top < H) and RectVisible(FDC, R) then - begin - ExcludePageRect(R); - R := Page.Bounds; - if RectVisible(FDC, R) then - begin - FPageStack.Add(TObject(PageIndex)); - DrawPageBackground(R, PageIndex); - end; - DrawPageBorder(FDC, PageIndex); - end; - end; - - if GetRgnBox(RestRgn, R) <> NULLREGION then - DrawRestSpaceBackgroundRgn(RestRgn); - DeleteObject(RestRgn); -end; - -procedure TCustomdxPreview.DrawPagesContent; -var - I, PageIndex: Integer; -begin - for I := 0 to FPageStack.Count - 1 do - begin - PageIndex := Integer(FPageStack[I]); - DoDrawPageContent(Pages[PageIndex].Bounds, PageIndex); - if (povMargins in OptionsView) and (PageIndex = SelPageIndex) then - DrawMargins(FDC); - end; -end; - -procedure TCustomdxPreview.DrawRestSpaceBackgroundRgn(ARgn: HRGN); -{$IFDEF DELPHI7} -var - Count, I: Integer; - RgnHeader: TRgnDataHeader; - Rects: TRects; -{$ENDIF} -begin - {$IFDEF DELPHI7} - if ThemeServices.ThemesEnabled and (Parent <> nil) and (csParentBackground in ControlStyle) then - begin - Count := GetRgnData(ARgn, RgnHeader, Rects); - for I := 0 to Count - 1 do - ThemeServices.DrawParentBackground(Handle, FDC, nil, False, @Rects[I]); - end - else - {$ENDIF} - FillRgn(FDC, ARgn, Brush.Handle); -end; - -procedure TCustomdxPreview.DrawRestSpaceBackgroundRect(const R: TRect); -begin - {$IFDEF DELPHI7} - if ThemeServices.ThemesEnabled and (Parent <> nil) and (csParentBackground in ControlStyle) then - ThemeServices.DrawParentBackground(Handle, FDC, nil, False, @R) - else - {$ENDIF} - FillRect(FDC, R, Brush.Handle); -end; - -procedure TCustomdxPreview.AdjustPagesBounds; -begin - if povAutoHideScrollBars in OptionsView then - begin - CalcPagesBounds(TopPos, VirtualWidth + GetSystemMetrics(SM_CXVSCROLL), - VirtualHeight + GetSystemMetrics(SM_CXHSCROLL)); - if (VirtualWidth > ClientWidth) or (VirtualHeight > ClientHeight) then - CalcPagesBounds(TopPos, VirtualWidth, VirtualHeight); - end - else - CalcPagesBounds(TopPos, VirtualWidth, VirtualHeight); -end; - -function TCustomdxPreview.CanHorzScrollBarBeVisible: Boolean; -begin - Result := ScrollBars in [ssBoth, ssHorizontal]; -end; - -function TCustomdxPreview.CanVertScrollBarBeVisible: Boolean; -begin - Result := ScrollBars in [ssBoth, ssVertical]; -end; - -function TCustomdxPreview.CanAnyScrolling: Boolean; -begin - Result := CanHorzScrolling or CanVertScrolling; -end; - -function TCustomdxPreview.CanHorzScrolling: Boolean; -begin - Result := (ZoomMode <> pzmPageWidth) and - (ClientWidth < VirtualWidth - Byte(ZoomMode = pzmPages) * Indent); -end; - -function TCustomdxPreview.CanVertScrolling: Boolean; -begin - Result := ClientHeight < VirtualHeight - Byte(ZoomMode = pzmPages) * Indent; -end; - -function TCustomdxPreview.CanPageScrolling(ADirection: TdxPreviewScrollDirection): Boolean; -begin - Result := ((ZoomMode <> pzmPages) or (PageCount <> 1)) and - ((ADirection in [psdLeft, psdRight]) and CanHorzScrolling) or - ((ADirection in [psdUp, psdDown]) and CanVertScrolling); -end; - -procedure TCustomdxPreview.UpdateScrollBars; -const - DisableNoScroll: array[Boolean] of UINT = (SIF_DISABLENOSCROLL, 0); -var - ScrollInfo: TScrollInfo; - - procedure UpdateHorzScrollBar; - begin - with ScrollInfo do - begin - cbSize := SizeOf(ScrollInfo); - fMask := SIF_ALL or DisableNoScroll[povAutoHideScrollBars in OptionsView]; - nMin := 0; - nMax := VirtualWidth - Byte(ZoomMode = pzmPages) * Indent - 1; - nPage := ClientWidth; - nPos := LeftPos; - end; - SetScrollInfo(SB_HORZ, ScrollInfo, True); - end; - - procedure UpdateVertScrollBar; - begin - with ScrollInfo do - begin - cbSize := SizeOf(ScrollInfo); - fMask := SIF_ALL or DisableNoScroll[povAutoHideScrollBars in OptionsView]; - nMin := 0; - nMax := VirtualHeight - Byte(ZoomMode = pzmPages) * Indent - 1; - nPage := ClientHeight; - nPos := TopPos; - end; - SetScrollInfo(SB_VERT, ScrollInfo, True); - end; - -begin - if CanHorzScrollBarBeVisible then UpdateHorzScrollBar; - if CanVertScrollBarBeVisible then UpdateVertScrollBar; - if DoublePassUpdateScrollBars then - begin - UpdateHorzScrollBar; - UpdateVertScrollBar; - end; -end; - -function TCustomdxPreview.DoublePassUpdateScrollBars: Boolean; -begin - Result := (povAutoHideScrollBars in OptionsView) and - CanHorzScrollBarBeVisible and CanVertScrollBarBeVisible; -end; - -procedure TCustomdxPreview.ResetHintShowTimer(X, Y: Integer); -begin - CancelHintShow; - if not IsDesigning and IsParentFormActive and (pohShowForMargins in OptionsHint) and - (GetHitInfoAt(X, Y) * phtMargins <> []) and CanShowMarginHint then - StartHintShow; -end; - -procedure TCustomdxPreview.SetScrollBars(Value: TScrollStyle); -begin - if FScrollBars <> Value then - begin - FScrollBars := Value; - RecreateWnd; - end; -end; - -procedure TCustomdxPreview.DesignerModified; -var - Designer: IDesignerNotify; -begin - if IsDesigning then - begin - Designer := GetParentForm(Self).Designer; - if Designer <> nil then Designer.Modified; - end; -end; - -function TCustomdxPreview.IsDesigning: Boolean; -begin - Result := csDesigning in ComponentState; -end; - -function TCustomdxPreview.IsParentFormActive: Boolean; -var - Form: TCustomForm; -begin - Form := GetParentForm(Self); - Result := (Form <> nil) and Form.Active; -end; - -procedure TCustomdxPreview.HintHideLongTimerHandler(Sender: TObject); -begin -end; - -procedure TCustomdxPreview.HintHideShortTimerHandler(Sender: TObject); -begin - if not IsParentFormActive or (Time - FLongShowHintTime > dxPreviewHideHintLongTime) then - begin - DestroyHint; - //FHintHideTimer.Enabled := False; - end; -end; - -procedure TCustomdxPreview.HintShowTimerHandler(Sender: TObject); -var - Margin: TdxPreviewPageMargin; -begin - FHintShowTimer.Enabled := False; - Margin := MarginFromPoint(ScreenToClient(Mouse.CursorPos)); - if (Margin <> nil) and (not Margin.IsDragging or (pohShowOnDrag in OptionsHint)) then - begin - CreateHint; - ActivateHint(Margin); - FLongShowHintTime := GetTickCount; - FHintHideShortTimer.Enabled := True; - end; -end; - -procedure TCustomdxPreview.ReadIsNoPagesTextAssigned(AReader: TReader); -begin - FIsNoPagesTextAssigned := AReader.ReadBoolean; -end; - -procedure TCustomdxPreview.WriteIsNoPagesTextAssigned(AWriter: TWriter); -begin - AWriter.WriteBoolean(FIsNoPagesTextAssigned); -end; - -procedure TCustomdxPreview.WMCaptureChanged(var Message: TMessage); -begin - CancelDragMargin; - DestroyPageNumberHint; - inherited; -end; - -procedure TCustomdxPreview.WMDestroy(var Message: TWMDestroy); -begin - if (FDC <> 0) and HandleAllocated then - ReleaseDC(Handle, FDC); - FDC := 0; - inherited; -end; - -procedure TCustomdxPreview.WMGetDlgCode(var Message: TWMGetDlgCode); -const - AllKeys: array[Boolean] of LongInt = (0, DLGC_WANTALLKEYS); - ArrowKeys: array[Boolean] of LongInt = (0, DLGC_WANTARROWS); -begin - inherited; - Message.Result := Message.Result or - AllKeys[DraggingMargin <> nil] or ArrowKeys[pobKeyNavigation in OptionsBehavior]; -end; - -procedure TCustomdxPreview.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - Message.Result := 1; -end; - -procedure TCustomdxPreview.WMHScroll(var Message: TWMHScroll); -begin - inherited; - case Message.ScrollCode of - SB_LINEUP: - LeftPos := LeftPos - dxPreviewScrollStep; - SB_LINEDOWN: - LeftPos := LeftPos + dxPreviewScrollStep; - SB_PAGEUP: - LeftPos := LeftPos - ClientWidth; - SB_PAGEDOWN: - LeftPos := LeftPos + ClientWidth; - SB_THUMBTRACK: - if pobThumbTracking in OptionsBehavior then LeftPos := Message.Pos; - SB_THUMBPOSITION: - if not (pobThumbTracking in OptionsBehavior) then - begin - LeftPos := Message.Pos; - UpdateWindow(Handle); - end; - end; -end; - -procedure TCustomdxPreview.WMKillFocus(var Message: TWMKillFocus); -begin - ClearLastMousePos; - HideAllHints; - inherited; -end; - -procedure TCustomdxPreview.WMRButtonUp(var Message: TWMRButtonUp); -begin - if ((PopupMenu <> nil) and PopupMenu.AutoPopup) or IsDesigning then - HideAllHints; - inherited; -end; - -procedure TCustomdxPreview.WMMouseActivate(var Message: TWMMouseActivate); -var - Control: TWinControl; - Pt: TPoint; -begin - inherited; - if not IsDesigning then - begin - Control := FindControl(GetFocus); - if (Control = nil) or (GetParentForm(Control) <> GetParentForm(Self)) then - begin - Pt := ScreenToClient(Mouse.CursorPos); - if (PageIndexFromPoint(Pt) > -1) {and not Assigned(MarginFromPoint(APt)) } then - Message.Result := MA_ACTIVATEANDEAT; - end; - if CanFocus then SetFocus; - end; -end; - -procedure TCustomdxPreview.WMMouseWheel(var Message: TWMMouseWheel); - - function IsZoomRequested: Boolean; - begin - Result := (pozZoomOnMouseRoll in OptionsZoom) or (GetKeyState(VK_CONTROL) < 0); - end; - - function IsScrolledUp: Boolean; - begin - Result := Message.WheelDelta > 0; - end; - -const - BarValueMap: array[Boolean] of WPARAM = (SB_LINEDOWN, SB_LINEUP); -begin - inherited; - if DraggingMargin <> nil then - Perform(WM_LBUTTONUP, Message.Keys, TMessage(Message).lParam); - HideAllHints; - - if PageCount <> 0 then - if IsZoomRequested then - if IsScrolledUp then - ZoomIn - else - ZoomOut - else - if CanVertScrolling then - SendMessage(Handle, WM_VSCROLL, BarValueMap[IsScrolledUp], 0); -end; - -procedure TCustomdxPreview.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - inherited; - if (LookAndFeel <> plfStandard) and (BorderStyle <> bsNone) then - begin - InflateRect(Message.CalcSize_Params^.rgrc[0], -1, -1); - end; -end; - -procedure TCustomdxPreview.WMNCDestroy(var Message: TWMNCDestroy); -begin - HideAllHints; - inherited; -end; - -procedure TCustomdxPreview.WMNCHitTest(var Message: TWMNCHitTest); -begin - DefaultHandler(Message); -end; - -procedure TCustomdxPreview.WMNCPaint(var Message: TWMNCPaint); -const - Flat: array[Boolean] of UINT = (0, BF_FLAT); -var - R: TRect; - DC: HDC; - AStyle: DWORD; -begin - inherited; - if (LookAndFeel <> plfStandard) and (BorderStyle <> bsNone) then - begin - GetWindowRect(Handle, R); - OffsetRect(R, -R.Left, -R.Top); - DC := GetWindowDC(Handle); - try - DrawEdge(DC, R, BDR_SUNKENOUTER, BF_RECT or Flat[LookAndFeel = plfUltraFlat]); - - AStyle := GetWindowLong(Handle, GWL_STYLE); - if (AStyle and WS_HSCROLL <> 0) and (AStyle and WS_VSCROLL <> 0) then - begin - InflateRect(R, -1, -1); - R.Left := R.Right - GetSystemMetrics(SM_CXVSCROLL); - R.Top := R.Bottom - GetSystemMetrics(SM_CYHSCROLL); - - FillRect(DC, R, HBRUSH(COLOR_BTNFACE + 1)); - end; - finally - ReleaseDC(Handle, DC); - end; - end; -end; - -procedure TCustomdxPreview.WMSetCursor(var Message: TWMSetCursor); -var - Cursor: HCURSOR; - Margin: TdxPreviewPageMargin; - Pt: TPoint; - HitInfo: TdxPreviewHitTests; -begin - Cursor := 0; - if Message.HitTest = HTCLIENT then - begin - Margin := DraggingMargin; - if (Margin = nil) and IsParentFormActive then - begin - Pt := ScreenToClient(Mouse.CursorPos); - HitInfo := GetHitInfoAt(Pt); - if phtPage in HitInfo then - if phtMargins * HitInfo <> [] then - begin - Margin := MarginFromPoint(Pt); - if Margin.Enabled then - Cursor := Screen.Cursors[Margin.GetCursor]; - end - else - if not IsDesigning and (pozZoomOnClick in OptionsZoom) and (PageIndexFromPoint(Pt) = SelPageIndex) then - if Zoomed then - Cursor := Screen.Cursors[crdxPreviewZoomOut] - else - Cursor := Screen.Cursors[crdxPreviewZoomIn]; - end; - end; - - if Cursor <> 0 then - SetCursor(Cursor) - else - inherited; -end; - -procedure TCustomdxPreview.WMSize(var Message: TWMSize); -begin - inherited; - CheckZoomFactor; -end; - -procedure TCustomdxPreview.WMVScroll(var Message: TWMVScroll); - - function GetScrollTrackPos: Integer; - var - ScrollInfo: TScrollInfo; - begin - with ScrollInfo do - begin - cbSize := SizeOf(ScrollInfo); - fMask := SIF_TRACKPOS; - end; - GetScrollInfo(SB_VERT, ScrollInfo); - Result := ScrollInfo.nTrackPos; - end; - -var - TrackPos: Integer; -begin - inherited; - case Message.ScrollCode of - SB_LINEUP: - TopPos := TopPos - dxPreviewScrollStep; - SB_LINEDOWN: - TopPos := TopPos + dxPreviewScrollStep; - SB_PAGEUP: - TopPos := TopPos - ClientHeight; - SB_PAGEDOWN: - TopPos := TopPos + ClientHeight; - SB_THUMBTRACK: - begin - TrackPos := GetScrollTrackPos; - FHintShowTimer.Enabled := False; - if pobThumbTracking in OptionsBehavior then - TopPos := TrackPos; - if (pohShowOnScroll in OptionsHint) and (AllRowCount > 1) then - begin - CalcPagesBounds(TrackPos, VirtualWidth, VirtualHeight); - UpdatePageNumberHint; - end; - end; - SB_THUMBPOSITION: - if not (pobThumbTracking in OptionsBehavior) then - begin - TopPos := GetScrollTrackPos;; - UpdateWindow(Handle); - end; - SB_ENDSCROLL: - DestroyPageNumberHint; - end; -end; - -procedure TCustomdxPreview.CMCancelMode(var Message: TCMCancelMode); -begin - HideAllHints; - inherited; -end; - -procedure TCustomdxPreview.CMColorChanged(var Message: TMessage); -begin - inherited; - Brush.Color := Color; - NotifyControls(CM_PARENTCOLORCHANGED); -end; - -procedure TCustomdxPreview.CMCtl3DChanged(var Message: TMessage); -begin - inherited; - if (BorderStyle = bsSingle) and (LookAndFeel = plfStandard) then - RecreateWnd; -end; - -procedure TCustomdxPreview.CMDesignHitTest(var Message: TCMDesignHitTest); -begin - Message.Result := Integer((DraggingMargin <> nil) or (GetHitInfoAt(Message.Pos) * phtMargins <> [])); -end; - -procedure TCustomdxPreview.CMHintShow(var Message: TCMHintShow); -begin - inherited; - Message.Result := Integer((DraggingMargin <> nil) and - (PageIndexFromPoint(Message.HintInfo^.CursorPos) <> -1)); -end; - -procedure TCustomdxPreview.CMSysColorChange(var Message: TMessage); -begin - inherited; - if MarginColor and $80000000 = $80000000 then - begin - RecreateMarginPen; - InvalidateMargins; - end; -end; - -function DefineCursor(const AResName: PChar): TCursor; -var - Handle: HCURSOR; -begin - Result := crDefault; - Handle := LoadCursor(hInstance, AResName); - if Handle > 0 then - begin - for Result := 100 to High(TCursor) do - if Screen.Cursors[Result] = Screen.Cursors[crDefault] then - begin - Screen.Cursors[Result] := Handle; - Exit; - end; - DestroyCursor(Handle); - raise EOutOfResources.Create(cxGetResourceString(@sdxOutOfResources)); - end; -end; - -procedure DefineCursors; -begin - crdxPreviewHorzResize := DefineCursor(IDC_DXPSPREVIEW_MARGINSMOVEHORZ); - crdxPreviewVertResize := DefineCursor(IDC_DXPSPREVIEW_MARGINSMOVEVERT); - crdxPreviewZoomIn := DefineCursor(IDC_DXPSPREVIEW_ZOOMIN); - crdxPreviewZoomOut := DefineCursor(IDC_DXPSPREVIEW_ZOOMOUT); - crdxPreviewFullScroll := DefineCursor(IDC_DXPSPREVIEW_SCROLLFULL); - crdxPreviewHorzScroll := DefineCursor(IDC_DXPSPREVIEW_SCROLLHORZ); - crdxPreviewVertScroll := DefineCursor(IDC_DXPSPREVIEW_SCROLLVERT); - crdxPreviewUpScroll := DefineCursor(IDC_DXPSPREVIEW_WHEELSCROLLUP); - crdxPreviewRightScroll := DefineCursor(IDC_DXPSPREVIEW_WHEELSCROLLRIGHT); - crdxPreviewDownScroll := DefineCursor(IDC_DXPSPREVIEW_WHEELSCROLLDOWN); - crdxPreviewLeftScroll := DefineCursor(IDC_DXPSPREVIEW_WHEELSCROLLLEFT); - crdxPreviewTopLeftScroll := DefineCursor(IDC_DXPSPREVIEW_WHEELSCROLLTOPLEFT); - crdxPreviewBottomLeftScroll := DefineCursor(IDC_DXPSPREVIEW_WHEELSCROLLBOTTOMLEFT); - crdxPreviewTopRightLeftScroll := DefineCursor(IDC_DXPSPREVIEW_WHEELSCROLLTOPRIGHT); - crdxPreviewBottomRightScroll := DefineCursor(IDC_DXPSPREVIEW_WHEELSCROLLBOTTOMRIGHT); -end; - -initialization - DefineCursors; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPrnDev.pas b/internal/x.46/ExpressPrinting System/Sources/dxPrnDev.pas deleted file mode 100644 index bf375c43..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPrnDev.pas +++ /dev/null @@ -1,2382 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPrnDev; - -interface - -(*$HPPEMIT '#include ' *) - -{$I cxVer.inc} - -uses - Windows, Classes, ImgList, Controls, SysUtils, Graphics, Messages, - dxCore, cxControls, dxPSGlbl; - -type - // Follow structures are supported only in W2K and upper - - // specifies the global default printer settings - - {$IFDEF CBUILDER5} - {$EXTERNALSYM _PRINTER_INFO_8A} - {$ENDIF} - _PRINTER_INFO_8A = record - DevMode: PDeviceModeA ; - end; - {$IFDEF CBUILDER5} - {$EXTERNALSYM _PRINTER_INFO_8W} - {$ENDIF} - _PRINTER_INFO_8W = record - DevMode: PDeviceModeW ; - end; - {$IFDEF CBUILDER5} - {$EXTERNALSYM _PRINTER_INFO_8} - {$ENDIF} - _PRINTER_INFO_8 = _PRINTER_INFO_8A; - TPrinterInfo8A = _PRINTER_INFO_8A; - TPrinterInfo8W = _PRINTER_INFO_8W; - TPrinterInfo8 = TPrinterInfo8A; - {$IFDEF CBUILDER5} - {$EXTERNALSYM PRINTER_INFO_8A} - {$ENDIF} - PRINTER_INFO_8A = _PRINTER_INFO_8A; - {$IFDEF CBUILDER5} - {$EXTERNALSYM PRINTER_INFO_8W} - {$ENDIF} - PRINTER_INFO_8W = _PRINTER_INFO_8W; - {$IFDEF CBUILDER5} - {$EXTERNALSYM PRINTER_INFO_8} - {$ENDIF} - PRINTER_INFO_8 = PRINTER_INFO_8A; - PPrinterInfo8A = ^TPrinterInfo8A; - PPrinterInfo8W = ^TPrinterInfo8W; - PPrinterInfo8 = PPrinterInfo8A; - - // specifies the per-user default printer settings - - {$IFDEF CBUILDER5} - {$EXTERNALSYM _PRINTER_INFO_9A} - {$ENDIF} - _PRINTER_INFO_9A = record - DevMode: PDeviceModeA ; - end; - {$IFDEF CBUILDER5} - {$EXTERNALSYM _PRINTER_INFO_9W} - {$ENDIF} - _PRINTER_INFO_9W = record - DevMode: PDeviceModeW ; - end; - {$IFDEF CBUILDER5} - {$EXTERNALSYM _PRINTER_INFO_8} - {$ENDIF} - _PRINTER_INFO_9 = _PRINTER_INFO_9A; - TPrinterInfo9A = _PRINTER_INFO_9A; - TPrinterInfo9W = _PRINTER_INFO_9W; - TPrinterInfo9 = TPrinterInfo9A; - {$IFDEF CBUILDER5} - {$EXTERNALSYM PRINTER_INFO_9A} - {$ENDIF} - PRINTER_INFO_9A = _PRINTER_INFO_9A; - {$IFDEF CBUILDER5} - {$EXTERNALSYM PRINTER_INFO_9W} - {$ENDIF} - PRINTER_INFO_9W = _PRINTER_INFO_9W; - {$IFDEF CBUILDER5} - {$EXTERNALSYM PRINTER_INFO_9} - {$ENDIF} - PRINTER_INFO_9 = PRINTER_INFO_9A; - PPrinterInfo9A = ^TPrinterInfo9A; - PPrinterInfo9W = ^TPrinterInfo9W; - PPrinterInfo9 = PPrinterInfo9A; - - TdxPrinterState = (psNoHandle, psHandleIC, psHandleDC); - TdxDuplexMode = (dmSimplex, dmHorizontal, dmVertical); - TdxPrinterOrientation = (poPortrait, poLandscape); - TdxPrinterCapability = (pcCopies, pcOrientation, pcCollation);//, pcDuplex, pcColor); - TdxPrinterCapabilities = set of TdxPrinterCapability; - - EdxPrintDevice = class(EdxException); - - TdxPrintDeviceInfo = class - private - FDevice: PChar ; - FDriver: PChar ; - FPort: PChar ; - FIsDefault: Boolean; - FIsNetwork: Boolean; - public - constructor Create(ADriver, ADevice, APort: PChar ; - AnIsDefault, AnIsNetwork: Boolean); - destructor Destroy; override; - function IsEqual(ADriver, ADevice, APort: PChar ): Boolean; - - property Device: PChar read FDevice; - property Driver: PChar read FDriver; - property Port: PChar read FPort; - property IsDefault: Boolean read FIsDefault write FIsDefault; - property IsNetwork: Boolean read FIsNetwork; - end; - - TdxPrintDevice = class - private - FAborted: Boolean; - FAutoRefresh: Boolean; - FBins: TStrings; - FCanvas: TCanvas; - FCapabilities: TdxPrinterCapabilities; - FCurrentDevice: PChar ; - FCurrentDriver: PChar ; - FCurrentPort: PChar ; - FDC: HDC; - FDeviceHandle: THandle; - FDeviceMode: PDeviceMode ; - FDeviceModeChanged: Boolean; - FHDeviceMode: THandle; - FFileName: string; - FFonts: TStrings; - FIsDeviceModePersistent: Boolean; - FMaxCopies: Integer; - FMaxExtents: Integer; - FMinExtents: Integer; - FPageNumber: Integer; - FPapers: TStrings; - FPrinters: TStrings; - FPrinterIndex: Integer; - FPrinting: Boolean; - FState: TdxPrinterState; - FTitle: string; - FWindowHandle: HWND; - FOnNewPage: TNotifyEvent; - FOnPrinterChange: TNotifyEvent; - FOnRefresh: TNotifyEvent; - function GetBinIndex: Integer; - function GetBins: TStrings; - function GetCanvas: TCanvas; - function GetCollate: Boolean; - function GetColorMode: Boolean; - function GetCurrentDevice: PChar ; - function GetCurrentDriver: PChar ; - function GetCurrentPort: PChar ; - function GetDefaultDMPaper: Integer; - function GetDeviceMode: PDeviceMode; - function GetDuplex: TdxDuplexMode; - function GetFonts: TStrings; - function GetHandle: HDC; - function GetHDeviceMode: THandle; - function GetIsDefault: Boolean; - function GetIsInitialized: Boolean; - function GetIsNetwork: Boolean; - function GetMaxExtents(Index: Integer): Integer; - function GetMinExtents(Index: Integer): Integer; - function GetNumCopies: Integer; - function GetOrientation: TdxPrinterOrientation; - function GetPageHeight: Integer; - function GetPageHeightLoMetric: Integer; - function GetPageWidth: Integer; - function GetPageWidthLoMetric: Integer; - function GetPaperCount: Integer; - function GetPaperIndex: Integer; - function GetPapers: TStrings; - function GetPhysOffset(Index: Integer): Integer; - function GetPrinterCount: Integer; - function GetPrinterIndex: Integer; - function GetPrinterInfo(Index: Integer): TdxPrintDeviceInfo; - function GetPrinters: TStrings; - procedure SetBinIndex(Value: Integer); - procedure SetCollate(Value: Boolean); - procedure SetColorMode(Value: Boolean); - procedure SetDuplex(Value: TdxDuplexMode); - procedure SetIsDefault(Value: Boolean); - procedure SetNumCopies(Value: Integer); - procedure SetOrientation(Value: TdxPrinterOrientation); - procedure SetPaperIndex(Value: Integer); - procedure SetPrinterCapabilities(Value: Integer); - procedure SetPrinterIndex(Value: Integer); - - procedure CheckPrinting(Value: Boolean); - procedure ClosePrintDevice; - procedure DeselectHandles; - procedure FixMinMaxExtents; - procedure FreeAndNilBins; - procedure FreeAndNilCanvas; - procedure FreeAndNilFonts; - procedure FreeAndNilPapers; - procedure FreeAndNilPrinters; - procedure InternalSelectPaperBySize(var AWidth, AHeight: Integer); - procedure OpenPrintDevice(AIndex: Integer); - procedure SetState(Value: TdxPrinterState); - procedure SetToDefaultPrintDevice; - procedure WndProc(var Message: TMessage); - protected - procedure DoNewPage; dynamic; - procedure DoPrinterChanged; dynamic; - procedure DoRefresh; dynamic; - public - constructor Create; - destructor Destroy; override; - - procedure Abort; - function BeginDoc: Integer; {returns the print job identifier for the document} - procedure EndDoc; - procedure NewPage; - - function FindPrintDevice(ADevice, APort: PChar ): Integer; - function IsDeviceModeChanged: Boolean; - procedure Refresh; - procedure ResetDC(IsForced: Boolean); - procedure ResetPrintDevice; - - function FindBin(ABin: Integer): Integer; overload; - function FindBin(const AName: string): Integer; overload; - function IsAutoSelectBin(AIndex: Integer): Boolean; - function IsUserPaperSource(AIndex: Integer): Boolean; - function SelectBin(Value: Integer): Boolean; overload; - function SelectBin(const AName: string): Boolean; overload; - - function FindPaper(ADMPaper: Integer): Integer; overload; - function FindPaper(const AName: string): Integer; overload; - function FindPaper(const ASize: TPoint): Integer; overload; - function FindPaper(AWidth, AHeight: Integer): Integer; overload; - function IsEnvelopePaper(AIndex: Integer): Boolean; - function IsUserPaperSize(AIndex: Integer): Boolean; - function SelectPaper(ADMPaper: Integer): Boolean; overload; - function SelectPaper(const AName: string): Boolean; overload; - function SelectPaper(var AWidth, AHeight: Integer): Boolean; overload; - - function IsSupportColoration: Boolean; - function IsSupportDuplex: Boolean; - - property Aborted: Boolean read FAborted; - property AutoRefresh: Boolean read FAutoRefresh write FAutoRefresh; - property BinIndex: Integer read GetBinIndex write SetBinIndex; - property Bins: TStrings read GetBins; - property Canvas: TCanvas read GetCanvas; - property Capabilities: TdxPrinterCapabilities read FCapabilities; - property Collate: Boolean read GetCollate write SetCollate; - property ColorMode: Boolean read GetColorMode write SetColorMode; - property Copies: Integer read GetNumCopies write SetNumCopies; - property CurrentDevice: PChar read GetCurrentDevice; - property CurrentDriver: PChar read GetCurrentDriver; - property CurrentPort: PChar read GetCurrentPort; - property DefaultDMPaper: Integer read GetDefaultDMPaper; - property DeviceMode: PDeviceMode read GetDeviceMode; - property Duplex: TdxDuplexMode read GetDuplex write SetDuplex; - property FileName: string read FFileName write FFileName; - property Fonts: TStrings read GetFonts; - property Handle: HDC read GetHandle; - property HDeviceMode: THandle read GetHDeviceMode; - property IsDefault: Boolean read GetIsDefault write SetIsDefault; - property IsDeviceModePersistent: Boolean read FIsDeviceModePersistent write FIsDeviceModePersistent; - property IsInitialized: Boolean read GetIsInitialized; - property IsNetwork: Boolean read GetIsNetwork; - property MaxCopies: Longint read FMaxCopies; - property MaxExtentX: Integer index 0 read GetMaxExtents; - property MaxExtentY: Integer index 1 read GetMaxExtents; - property MinExtentX: Integer index 0 read GetMinExtents; - property MinExtentY: Integer index 1 read GetMinExtents; - property Orientation: TdxPrinterOrientation read GetOrientation write SetOrientation; - property PageHeight: Integer read GetPageHeight; - property PageHeightLoMetric: Integer read GetPageHeightLoMetric; - property PageWidth: Integer read GetPageWidth; - property PageWidthLoMetric: Integer read GetPageWidthLoMetric; - property PageNumber: Integer read FPageNumber; - property PaperIndex: Integer read GetPaperIndex write SetPaperIndex; - property PaperCount: Integer read GetPaperCount; - property Papers: TStrings read GetPapers; - property PhysOffsetX: Integer index 0 read GetPhysOffset; - property PhysOffsetY: Integer index 1 read GetPhysOffset; - property PrinterCount: Integer read GetPrinterCount; - property PrinterIndex: Integer read GetPrinterIndex write SetPrinterIndex; - property PrinterInfos[Index: Integer]: TdxPrintDeviceInfo read GetPrinterInfo; - property Printers: TStrings read GetPrinters; - property Printing: Boolean read FPrinting; - property Title: string read FTitle write FTitle; - - property OnNewPage: TNotifyEvent read FOnNewPage write FOnNewPage; - property OnPrinterChange: TNotifyEvent read FOnPrinterChange write FOnPrinterChange; - property OnRefresh: TNotifyEvent read FOnRefresh write FOnRefresh; - end; - - TdxPaperInfo = class - private - FDMPaper: Integer; - FName: string; - FPrintDevice: TdxPrintDevice; - FSize: TPoint; - function GetSize(Index: Integer): Integer; - procedure SetSize(Index: Integer; Value: Integer); - public - constructor Create(APrintDevice: TdxPrintDevice); - procedure Assign(Source: TdxPaperInfo); - function IsEqual(Source: TdxPaperInfo): Boolean; - - property DMPaper: Integer read FDMPaper; - property Height: Integer index 1 read GetSize write SetSize; - property Name: string read FName; - property Size: TPoint read FSize; - property Width: Integer index 0 read GetSize write SetSize; - end; - -function dxConnectToNetPrinter(AParentWnd: HWND): Boolean; -function dxDocumentProperties(AParentWnd: HWND): Boolean; -function dxInitPrintDevice(ARaiseException: Boolean): Boolean; -function dxIsAutoSelectBin(const AName: string): Boolean; -function dxIsEnvelopePaper(const AName: string): Boolean; -function dxIsPrintDeviceAllocated: Boolean; -function dxIsPrintDeviceInitialized: Boolean; -function dxPrintDevice: TdxPrintDevice; -procedure dxReleasePrintDevice; -function dxSetPrintDevice(APrintDevice: TdxPrintDevice): TdxPrintDevice; - -procedure dxDrawPrinter(ACanvas: TCanvas; ARect: TRect; const AText: string; - AImageList: TCustomImageList; AImageIndex: Integer); -procedure dxGetPrinterList(AStrings: TStrings); - -function dxGetDefaultDMPaper: Integer; -function dxGetDefaultPrinter: string; - -function dxIsDefaultPrinter(ADevice: PChar ): Boolean; -procedure dxSetDefaultPrinter(ADevice: PChar ); - -type - TConnectToPrinterDlg = function(hWnd: HWND; Flags: DWORD): THandle; stdcall; - TGetDefaultPrinter = function(pszBuffer: PChar; var cchBuffer: DWORD): BOOL; stdcall; - TGetDefaultPrinterA = function(pszBuffer: PAnsiChar; var cchBuffer: DWORD): BOOL; stdcall; - TGetDefaultPrinterW = function(pszBuffer: PWideChar; var cchBuffer: DWORD): BOOL; stdcall; - TSetDefaultPrinter = function(pszPrinter: PChar): BOOL; stdcall; - TSetDefaultPrinterA = function(pszPrinter: PAnsiChar): BOOL; stdcall; - TSetDefaultPrinterW = function(pszPrinter: PWideChar): BOOL; stdcall; - -var - dxPSUseCachedDMPaper: Boolean = True; - -const - cMinPaperExtent = 254; - cMaxPaperExtent = 30 * cMinPaperExtent; - - {$EXTERNALSYM LOCALE_IPAPERSIZE} - LOCALE_IPAPERSIZE = $0000100A; - -implementation - -uses - Forms, WinSpool, cxClasses, dxPSUtl, dxPSRes; - - -const - dxDefaultMaxPaperExtents = 5000; - dxDefaultMinPaperExtents = 500; - - DuplexModeMap: array[DMDUP_SIMPLEX..DMDUP_HORIZONTAL] of TdxDuplexMode = (dmSimplex, dmHorizontal, dmVertical); - OrientationMap: array[DMORIENT_PORTRAIT..DMORIENT_LANDSCAPE] of TdxPrinterOrientation = (poPortrait, poLandscape); - PrinterOrientationMap: array[TdxPrinterOrientation] of Integer = (DMORIENT_PORTRAIT, DMORIENT_LANDSCAPE); - -var - FPrintDevice: TdxPrintDevice = nil; - FConnectToPrinterDlg: TConnectToPrinterDlg = nil; - FGetDefaultPrinter: TGetDefaultPrinter = nil; - FSetDefaultPrinter: TSetDefaultPrinter = nil; - - -function DocumentProperties(hWnd: HWND; hPrinter: THandle; pDeviceName: PChar; - pDevModeOutput, pDevModeInput: PDeviceMode; fMode: DWORD): Longint; - stdcall; external winspl name {$IFNDEF DELPHI12} 'DocumentPropertiesA' {$ELSE} 'DocumentPropertiesW' {$ENDIF}; - - -function IsConnectToPrinterDlgInitialized: Boolean; -begin - Result := @FConnectToPrinterDlg <> nil; -end; - -function IsGetDefaultPrinterInitialized: Boolean; -begin - Result := @FGetDefaultPrinter <> nil; -end; - -function IsSetDefaultPrinterInitialized: Boolean; -begin - Result := @FSetDefaultPrinter <> nil; -end; - -{ Memory Management Routines } - -function dxAllocMem(ASize: Integer): Pointer; -begin - Result := AllocMem(ASize); -end; - -procedure dxFreeMem(var P: Pointer; ASize: Integer); -begin - FreeMem(P, ASize); - P := nil; -end; - -{.$DEFINE DEBUG_PRINTDEVICE} - -{$IFDEF DEBUG_PRINTDEVICE} -var - LogFile: TextFile; - -procedure RewriteLog; -begin - Rewrite(LogFile); -end; - -procedure WriteLog(const S: string); -begin - WriteLn(LogFile, S); -end; - -{$ENDIF} - -function FetchStr(var Str: PChar): PChar; -var - P: PChar; -begin - Result := Str; - if Str = nil then Exit; - P := Str; - while P^ = ' ' do - Inc(P); - Result := P; - while (P^ <> #0) and (P^ <> ',') do - P := StrNextChar(P); - if P^ = ',' then - begin - P^ := #0; - Inc(P); - end; - Str := P; -end; - -procedure RaiseError(const Msg: string); -begin - raise EdxPrintDevice.Create(Msg); -end; - -function AbortProc(Prn: HDC; Error: Integer): Bool; stdcall; -begin -{$IFDEF DEBUG_PRINTDEVICE} - WriteLog('AbortProc'); -{$ENDIF} -// Application.ProcessMessages; - Result := not FPrintDevice.Aborted; -end; - -function dxIsPrintDeviceAllocated: Boolean; -begin - Result := FPrintDevice <> nil; -end; - -function dxIsPrintDeviceInitialized: Boolean; -begin - Result := dxIsPrintDeviceAllocated and dxPrintDevice.IsInitialized; -end; - -function dxPrintDevice: TdxPrintDevice; -begin - if FPrintDevice = nil then FPrintDevice := TdxPrintDevice.Create; - Result := FPrintDevice; -end; - -function dxConnectToNetPrinter(AParentWnd: HWND): Boolean; -var - Handle: THandle; -begin - if IsConnectToPrinterDlgInitialized then - begin - Handle := FConnectToPrinterDlg(AParentWnd, 0); - Result := Handle <> 0; - if Result then - begin - ClosePrinter(Handle); - dxPrintDevice.Refresh; - end; - end - else - Result := False; -end; - -{.$WARN SYMBOL_DEPRECATED OFF} - -function dxDocumentProperties(AParentWnd: HWND): Boolean; -var - HNewDevMode: THandle; - PNewDevMode: PDevMode ; -begin - Result := False; - HNewDevMode := 0; - try - HNewDevMode := CopyDeviceMode(dxPrintDevice.HDeviceMode); - if HNewDevMode <> 0 then - try - PNewDevMode := GlobalLock(HNewDevMode); - try - with dxPrintDevice do - Result := IDOK = DocumentProperties(AParentWnd, FDeviceHandle, CurrentDevice, - PNewDevMode, DeviceMode, DM_IN_PROMPT or DM_OUT_BUFFER or DM_IN_BUFFER); - finally - GlobalUnlock(HNewDevMode); - end; - finally - if Result then - with dxPrintDevice do - begin - while GlobalUnlock(FHDeviceMode) do; - GlobalFree(FHDeviceMode); - FHDeviceMode := HNewDevMode; - FDeviceMode := GlobalLock(FHDeviceMode); - end - else - if HNewDevMode <> 0 then GlobalFree(HNewDevMode); - end; - except - if HNewDevMode <> 0 then GlobalFree(HNewDevMode); - end; -end; - -{.$WARN SYMBOL_DEPRECATED ON} - -{$HINTS OFF} - -function dxInitPrintDevice(ARaiseException: Boolean): Boolean; -var - Stub: HDC; -begin - Result := True; - try - Result := dxPrintDevice.Printers.Count > 0; - if Result then Stub := dxPrintDevice.Handle; - except - Result := False; - if ARaiseException then raise; - end; -end; - -{$HINTS ON} - -procedure dxReleasePrintDevice; -begin - dxSetPrintDevice(nil).Free; -end; - -function dxSetPrintDevice(APrintDevice: TdxPrintDevice): TdxPrintDevice; -begin - Result := FPrintDevice; - FPrintDevice := APrintDevice; -end; - -function dxIsAutoSelectBin(const AName: string): Boolean; -begin - Result := Pos(UpperCase(cxGetResourceString(@sdxAuto)), UpperCase(AName)) > 0; -end; - -function dxIsEnvelopePaper(const AName: string): Boolean; -begin - Result := Pos(UpperCase(cxGetResourceString(@sdxEnv)), UpperCase(AName)) > 0; -end; - -function dxGetDefaultDMPaper: Integer; -const - CachedDMPaper: Integer = -1; -var - Device: string; - HPrinter: THandle; - dwNeeded: DWORD; - PI9: PPrinterInfo9; -begin - if not dxPSUseCachedDMPaper or (CachedDMPaper = -1) then - begin - Result := Windows.DMPAPER_FIRST; - if IsWin2KOrLater then - begin - Device := dxGetDefaultPrinter; - if (Device <> '') and OpenPrinter(PChar(Device), HPrinter, nil) and (HPrinter <> 0) then - try - dwNeeded := 0; {3.03} - if GetPrinter(HPrinter, 9, nil, 0, @dwNeeded) or (dwNeeded <> 0) then - begin - PI9 := GlobalAllocPtr(GPTR, dwNeeded); - if PI9 <> nil then - try - if GetPrinter(HPrinter, 9, PI9, dwNeeded, @dwNeeded) then - if PI9^.DevMode <> nil then - try - Result := PI9^.DevMode^.dmPaperSize; - finally - //GlobalFreePtr(PI9^.DevMode); //TODO: check necessity - end; - finally - GlobalFreePtr(PI9); - end; - end; - finally - ClosePrinter(HPrinter); - end - else - case GetLocaleChar(LOCALE_USER_DEFAULT, LOCALE_IPAPERSIZE, '0') of - '1': Result := Windows.DMPAPER_LETTER; - '5': Result := Windows.DMPAPER_LEGAL; - '8': Result := Windows.DMPAPER_A3; - '9': Result := Windows.DMPAPER_A4; - end; - end; - CachedDMPaper := Result; - end - else - Result := CachedDMPaper; -end; - -function dxGetDefaultPrinter: string; -const - MAX_BUFFER_SIZE = 1024; -var - L: DWORD; - Buffer: array[0..MAX_BUFFER_SIZE] of Char; - C: PChar; -begin - Result := ''; - L := MAX_BUFFER_SIZE; - FillChar(Buffer, SizeOf(Buffer), 0); - if false and IsGetDefaultPrinterInitialized and FGetDefaultPrinter(@Buffer, L) and - (GetLastError = ERROR_SUCCESS) then - Result := Buffer - else - if GetProfileString('WINDOWS', 'DEVICE', '', Buffer, L) > 0 then - begin - C := @Buffer[0]; - Result := FetchStr(C); - end; -end; - -function dxIsDefaultPrinter(ADevice: PChar ): Boolean; -begin - Result := StrIComp(PChar(dxGetDefaultPrinter), ADevice) = 0; -end; - -procedure dxSetDefaultPrinter(ADevice: PChar ); -var - dwNeeded: DWORD; - HPrinter: THandle; - PI2: PPrinterInfo2; - S: string; -begin - if IsSetDefaultPrinterInitialized then // Win2KOrXP - FSetDefaultPrinter(ADevice) - else - if OpenPrinter(ADevice, HPrinter, nil) and (HPrinter <> 0) then - try - dwNeeded := 0; {3.03} - if GetPrinter(HPrinter, 2, nil, 0, @dwNeeded) or (dwNeeded <> 0) then - begin - PI2 := GlobalAllocPtr(GPTR, dwNeeded); - if PI2 <> nil then - try - if GetPrinter(HPrinter, 2, PI2, dwNeeded, @dwNeeded) then - if IsWin9X then - begin - PI2^.Attributes := PI2^.Attributes or PRINTER_ATTRIBUTE_DEFAULT; - SetPrinter(HPrinter, 2, PI2, 0); - SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, LPARAM(PChar('windows')), SMTO_NORMAL, 1000, dwNeeded); - end - else // WinNT or earlier - if (PI2^.pDriverName <> nil) and (PI2^.pPortName <> nil) then - begin - S := dxConcatenateStrings([PI2^.pPrinterName, ',',PI2^.pDriverName, ',', PI2^.pDriverName]); - if WriteProfileString('windows', 'device', PChar(S)) then - begin - dwNeeded := Length(S); - SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0, SMTO_NORMAL, 1000, dwNeeded); - end; - end; - finally - GlobalFreePtr(PI2); - end; - end; - finally - ClosePrinter(hPrinter); - end; -end; - -procedure dxDrawPrinter(ACanvas: TCanvas; ARect: TRect; const AText: string; - AImageList: TCustomImageList; AImageIndex: Integer); -var - Offset: Integer; -begin - with ACanvas, ARect do - begin - FillRect(ARect); - // Image - InflateRect(ARect, -1, -1); - Offset := (Bottom - Top - AImageList.Height) div 2; - Inc(Left, Offset); - Inc(Top, Offset); - AImageList.Draw(ACanvas, Left, Top, AImageIndex); - // Text - Inc(Offset); - Inc(Left, Offset + AImageList.Width + Offset); - Brush.Style := bsClear; - TextRect(ARect, Left + Offset, Top + Offset, AText); - Brush.Style := bsSolid; - end; -end; - -procedure dxGetPrinterList(AStrings: TStrings); -begin - with AStrings do - begin - BeginUpdate; - try - Clear; - if dxPrintDevice.Printers <> nil then - Assign(dxPrintDevice.Printers); - finally - EndUpdate; - end; - end; -end; - -{ TdxPrintDeviceInfo } - -constructor TdxPrintDeviceInfo.Create(ADriver, ADevice, APort: PChar ; - AnIsDefault, AnIsNetwork: Boolean); -begin - inherited Create; - FDriver := StrNew(ADriver); - FDevice := StrNew(ADevice); - FPort := StrNew(APort); - FIsDefault := AnIsDefault; - FIsNetwork := AnIsNetwork; -end; - -destructor TdxPrintDeviceInfo.Destroy; -begin - StrDispose(FPort); - StrDispose(FDevice); - StrDispose(FDriver); - inherited; -end; - -function TdxPrintDeviceInfo.IsEqual(ADriver, ADevice, APort: PChar ): Boolean; -begin - Result := (StrIComp(Device, ADevice) = 0) and ((Port = nil) or (APort = nil) or (StrIComp(Port, APort) = 0)); -end; - -{ TdxPrintDeviceCanvas } - -type - TdxPrintDeviceCanvas = class(TCanvas) - private - FPrintDevice: TdxPrintDevice; - protected - procedure CreateHandle; override; - procedure Changing; override; - procedure UpdateFont; - public - constructor Create(APrintDevice: TdxPrintDevice); - end; - -constructor TdxPrintDeviceCanvas.Create(APrintDevice: TdxPrintDevice); -begin - inherited Create; - FPrintDevice := APrintDevice; -end; - -procedure TdxPrintDeviceCanvas.CreateHandle; -begin - FPrintDevice.SetState(psHandleIC); - UpdateFont; - Handle := FPrintDevice.FDC; -end; - -procedure TdxPrintDeviceCanvas.Changing; -begin - FPrintDevice.CheckPrinting(True); - inherited Changing; - UpdateFont; -end; - -procedure TdxPrintDeviceCanvas.UpdateFont; -var - FontSize: Integer; -begin - if GetDeviceCaps(FPrintDevice.FDC, LOGPIXELSY) <> Font.PixelsPerInch then - begin - FontSize := Font.Size; - Font.PixelsPerInch := GetDeviceCaps(FPrintDevice.FDC, LOGPIXELSY); - Font.Size := FontSize; - end; -end; - -{ TdxPaperInfo } - -constructor TdxPaperInfo.Create(APrintDevice: TdxPrintDevice); -begin - inherited Create; - FPrintDevice := APrintDevice; -end; - -function TdxPaperInfo.IsEqual(Source: TdxPaperInfo): Boolean; -begin - Result := (DMPaper = Source.DMPaper) and (FName = Source.Name) and - dxPSUtl.ArePointsEqual(Size, Source.Size); -end; - -procedure TdxPaperInfo.Assign(Source: TdxPaperInfo); -begin - FDMPaper := Source.FDMPaper; - FName := Source.FName; - FSize := Source.FSize; -end; - -function TdxPaperInfo.GetSize(Index: Integer): Integer; -begin - with Size do - if Index = 0 then - Result := X - else - Result := Y; -end; - -procedure TdxPaperInfo.SetSize(Index: Integer; Value: Integer); -begin - if DMPaper < DMPAPER_USER then Exit; - if Index = 0 then - begin - FSize.X := Value; - if (FPrintDevice <> nil) and (FPrintDevice.FDeviceMode <> nil) then - FPrintDevice.DeviceMode^.dmPaperWidth := FSize.X; - end - else - begin - FSize.Y := Value; - if (FPrintDevice <> nil) and (FPrintDevice.FDeviceMode <> nil) then - FPrintDevice.DeviceMode^.dmPaperLength := FSize.Y; - end; -end; - -{ TdxPrintDevice } - -constructor TdxPrintDevice.Create; -begin - inherited Create; - FAutoRefresh := {True; //}False; - FIsDeviceModePersistent := True; - FPrinterIndex := -MaxInt; - FWindowHandle := dxPSUtl.dxAllocateHWnd(WndProc); -end; - -destructor TdxPrintDevice.Destroy; -begin - if Printing then EndDoc; - DeselectHandles; - SetState(psNoHandle); - dxPSUtl.dxDeallocatehWnd(FWindowHandle); - FWindowHandle := 0; - ClosePrintDevice; - - FreeAndNilPrinters; - inherited; -end; - -procedure TdxPrintDevice.Abort; -begin - CheckPrinting(True); - AbortDoc(Canvas.Handle); - FAborted := True; - EndDoc; -end; - -function TdxPrintDevice.BeginDoc: Integer; -var - DocInfo: TDocInfo; -begin - Application.ProcessMessages; - {$IFDEF DEBUG_PRINTDEVICE} - RewriteLog; - WriteLog('BeginDoc'); - {$ENDIF} - CheckPrinting(False); - SetState(psNoHandle); - SetState(psHandleDC); - Canvas.Refresh; - TdxPrintDeviceCanvas(Canvas).UpdateFont; - FPrinting := True; - FAborted := False; - FPageNumber := 1; - - FillChar(DocInfo, SizeOf(DocInfo), 0); - with DocInfo do - begin - cbSize := SizeOf(DocInfo); - if Title <> '' then - lpszDocName := PChar(Title) - else - lpszDocName := PChar('Document'); - if FileName <> '' then lpszOutput := PChar(FileName); - end; - SetAbortProc(FDC, AbortProc); - Result := StartDoc(FDC, DocInfo); - if Result > 0 then - StartPage(FDC) - else - begin - FPrinting := False; - FAborted := False; - SetState(psNoHandle); - FPageNumber := 0; - end; -end; - -procedure TdxPrintDevice.EndDoc; -begin -{$IFDEF DEBUG_PRINTDEVICE} - WriteLog('EndDoc'); -{$ENDIF} - CheckPrinting(True); -// EndPage(FDC); - if not Aborted then Windows.EndDoc(FDC); - FPrinting := False; - FAborted := False; - SetState(psNoHandle); - FPageNumber := 0; -end; - -procedure TdxPrintDevice.NewPage; -begin -{$IFDEF DEBUG_PRINTDEVICE} - WriteLog('NewPage'); -{$ENDIF} - CheckPrinting(True); - EndPage(FDC); - Inc(FPageNumber); - Application.ProcessMessages; - DoNewPage; - ResetDC(False); - StartPage(FDC); - Canvas.Refresh; -end; - -function TdxPrintDevice.FindPrintDevice(ADevice, APort: PChar ): Integer; -begin - for Result := 0 to Printers.Count - 1 do - if PrinterInfos[Result].IsEqual(nil, ADevice, APort) then Exit; - Result := -1; -end; - -function TdxPrintDevice.IsDeviceModeChanged: Boolean; -begin - Result := FDeviceModeChanged; -end; - -procedure TdxPrintDevice.Refresh; -var - ADevice, APort: PChar ; - APrinterIndex: Integer; - AHDeviceMode: THandle; -begin - ADevice := StrNew(FCurrentDevice); - try - APort := StrNew(FCurrentPort); - try - AHDeviceMode := 0; - if FHDeviceMode <> 0 then AHDeviceMode := CopyDeviceMode(FHDeviceMode); - try - ClosePrintDevice; - FreeAndNilPrinters; - GetPrinters; - if AHDeviceMode <> 0 then - begin - APrinterIndex := FindPrintDevice(ADevice, APort); - if APrinterIndex <> -1 then - begin - OpenPrintDevice(APrinterIndex); - if FHDeviceMode <> 0 then - begin - while GlobalUnLock(FHDeviceMode) do; - GlobalFree(FHDeviceMode); - FDeviceMode := nil; - FHDeviceMode := CopyDeviceMode(AHDeviceMode); - FDeviceMode := GlobalLock(FHDeviceMode); - end; - end - else - if Printers.Count > 0 then GetPrinterIndex; - end; - finally - if AHDeviceMode <> 0 then GlobalFree(AHDeviceMode); - end; - finally - StrDispose(APort); - end; - finally - StrDispose(ADevice); - end; - DoRefresh; -end; - -procedure TdxPrintDevice.ResetDC(IsForced: Boolean); -var - ACanvas: TCanvas; - ABrushBitmap: TBitmap; - - procedure SaveCanvas; - begin - ACanvas := TdxPrintDeviceCanvas.Create(Self); - with ACanvas do - begin - OnChanging := Canvas.OnChanging; - OnChange := Canvas.OnChange; - Canvas.OnChanging := nil; - Canvas.OnChange := nil; - - Brush := Canvas.Brush; - ABrushBitmap := nil; - if Brush.Bitmap <> nil then ABrushBitmap := Brush.Bitmap; - Font := Canvas.Font; - Pen := Canvas.Pen; - PenPos := Canvas.PenPos; - CopyMode := Canvas.CopyMode; - end; - end; - - procedure RestoreCanvas; - begin - with Canvas do - begin - Brush := ACanvas.Brush; - if ABrushBitmap <> nil then Brush.Bitmap := ABrushBitmap; - Font := ACanvas.Font; - Pen := ACanvas.Pen; - PenPos := ACanvas.PenPos; - CopyMode := ACanvas.CopyMode; - OnChanging := ACanvas.OnChanging; - OnChange := ACanvas.OnChange; - end; - ACanvas.Free; - end; - -begin - if IsDeviceModeChanged or IsForced then - begin - FDeviceModeChanged := False; - SaveCanvas; - try - if FDeviceMode <> nil then - Windows.ResetDC(FDC, FDeviceMode^); - finally - RestoreCanvas; - end; - end; -end; - -procedure TdxPrintDevice.ResetPrintDevice; -var - Index: Integer; -begin - Index := PrinterIndex; - ClosePrintDevice; - OpenPrintDevice(Index); -end; - -function TdxPrintDevice.FindBin(ABin: Integer): Integer; -begin - if Bins <> nil then - Result := Bins.IndexOfObject(TObject(ABin)) - else - Result := -1; -end; - -function TdxPrintDevice.FindBin(const AName: string): Integer; -begin - if Bins <> nil then - Result := Bins.IndexOf(AName) - else - Result := -1; -end; - -function TdxPrintDevice.IsAutoSelectBin(AIndex: Integer): Boolean; -begin - Result := (Bins <> nil) and (AIndex > -1) and (AIndex < Bins.Count) and - dxIsAutoSelectBin(Bins[AIndex]); -end; - -function TdxPrintDevice.IsUserPaperSource(AIndex: Integer): Boolean; -begin - Result := (Bins <> nil) and (AIndex > -1) and (AIndex < Bins.Count) and - (Integer(Papers.Objects[AIndex]) >= DMBIN_USER); -end; - -function TdxPrintDevice.SelectBin(Value: Integer): Boolean; -var - Index: Integer; -begin - Index := FindBin(Value); - Result := Index > -1; - if Result then BinIndex := Index; -end; - -function TdxPrintDevice.SelectBin(const AName: string): Boolean; -var - Index: Integer; -begin - Index := FindBin(AName); - Result := Index > -1; - if Result then BinIndex := Index; -end; - -function TdxPrintDevice.FindPaper(ADMPaper: Integer): Integer; -begin - if Papers <> nil then - for Result := 0 to Papers.Count - 1 do - if TdxPaperInfo(Papers.Objects[Result]).DMPaper = ADMPaper then - Exit; - Result := -1; -end; - -function TdxPrintDevice.FindPaper(const AName: string): Integer; -begin - if Papers <> nil then - Result := Papers.IndexOf(AName) - else - Result := -1; -end; - -function TdxPrintDevice.FindPaper(const ASize: TPoint): Integer; -begin - if Papers <> nil then - begin - for Result := 0 to Papers.Count - 1 do - if dxPSUtl.ArePointsEqual(TdxPaperInfo(Papers.Objects[Result]).Size, ASize) then - Exit; - Result := Papers.Count - 1; - end - else - Result := -1; -end; - -function TdxPrintDevice.FindPaper(AWidth, AHeight: Integer): Integer; -begin - Result := FindPaper(MakePoint(AWidth, AHeight)); -end; - -function TdxPrintDevice.IsEnvelopePaper(AIndex: Integer): Boolean; -begin - Result := (Papers <> nil) and (AIndex > -1) and (AIndex < Papers.Count) and - dxIsEnvelopePaper(Papers[AIndex]); -end; - -function TdxPrintDevice.IsUserPaperSize(AIndex: Integer): Boolean; -var - PaperInfo: TdxPaperInfo; -begin - Result := (Papers <> nil) and (AIndex > -1) and (AIndex < Papers.Count); - if Result then - begin - PaperInfo := TdxPaperInfo(Papers.Objects[AIndex]); - Result := (PaperInfo.DMPaper >= DMPAPER_USER) or - (Pos(cxGetResourceString(@sdxCustom), PaperInfo.Name) > 0); - end; -end; - -function TdxPrintDevice.SelectPaper(ADMPaper: Integer): Boolean; -var - Index: Integer; -begin - Index := FindPaper(ADMPaper); - Result := Index > -1; - if Result then PaperIndex := Index; -end; - -function TdxPrintDevice.SelectPaper(const AName: string): Boolean; -var - Index: Integer; -begin - Index := FindPaper(AName); - Result := Index > -1; - if Result then PaperIndex := Index; -end; - -function TdxPrintDevice.SelectPaper(var AWidth, AHeight: Integer): Boolean; -var - Index: Integer; -begin - Index := FindPaper(AWidth, AHeight); - Result := Index > -1; - if Result then - begin - PaperIndex := Index; // setting FDeviceModeChanged := True; - if FDeviceMode <> nil then - if PaperIndex <> Papers.Count - 1 then - begin - DeviceMode^.dmPaperWidth := 0; - DeviceMode^.dmPaperLength := 0; - end - else - InternalSelectPaperBySize(AWidth, AHeight) - end; -end; - -function TdxPrintDevice.IsSupportColoration: Boolean; -begin - Result := 1 = WinSpool.DeviceCapabilities(CurrentDevice, CurrentPort, DC_COLORDEVICE, nil, nil); -end; - -function TdxPrintDevice.IsSupportDuplex: Boolean; -begin - Result := 1 = WinSpool.DeviceCapabilities(CurrentDevice, CurrentPort, DC_DUPLEX, nil, nil); -end; - -procedure TdxPrintDevice.DoNewPage; -begin - if Assigned(FOnNewPage) then FOnNewPage(Self) -end; - -procedure TdxPrintDevice.DoPrinterChanged; -begin - if Assigned(FOnPrinterChange) then FOnPrinterChange(Self); -end; - -procedure TdxPrintDevice.DoRefresh; -begin - if Assigned(FOnRefresh) then FOnRefresh(Self); -end; - -function TdxPrintDevice.GetBinIndex: Integer; -begin - if FDeviceMode <> nil then - begin - Result := FindBin(FDeviceMode^.dmDefaultSource); - if (Result = -1) and (FBins <> nil) and (FBins.Count <> 0) then - Result := 0; - end - else - Result := 0; -end; - -function TdxPrintDevice.GetBins: TStrings; -const - BinSize = SizeOf(Word); - BinNameSize = 24; -type - TdxBin = Word; - TdxBins = array[0..0] of TdxBin; - PdxBins = ^TdxBins; - TdxBinName = array[0..BinNameSize - 1] of Char; - TdxBinNames = array[0..0] of TdxBinName; - PdxBinNames = ^TdxBinNames; -var - BinCount: Integer; - BinValues: PdxBins ; - BinNames: PdxBinNames ; - I: Integer; - BinName: string; -begin - if FBins = nil then - try - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FDeviceMode = nil then - begin - Result := nil; - Exit; - end; - BinCount := DeviceCapabilities(CurrentDevice, CurrentPort, DC_BINS, nil, nil); - if BinCount > 0 then - begin - BinValues := AllocMem(BinSize * BinCount * SizeOf(Char)); - try - if DeviceCapabilities(CurrentDevice, CurrentPort, DC_BINS, PChar(BinValues), nil) <> -1 then - begin - BinNames := AllocMem(BinNameSize * BinCount * SizeOf(Char)); - try - if DeviceCapabilities(CurrentDevice, CurrentPort, DC_BINNAMES, PChar(BinNames), nil) <> -1 then - begin - FBins := TStringList.Create; - for I := 0 to BinCount - 1 do - begin - BinName := BinNames^[I]; - FBins.AddObject(BinName, TObject(BinValues^[I])); - end; - end; - finally - FreeMem(BinNames); - end; - end; - finally - FreeMem(BinValues); - end; - end; - end - else - begin - FBins := TStringList.Create; - FBins.AddObject(cxGetResourceString(@sdxDefaultTray), TObject(DMBIN_USER)); - end; - except - FreeAndNil(FBins); - raise; - end; - Result := FBins; -end; - -function TdxPrintDevice.GetCanvas: TCanvas; -begin - if FCanvas = nil then FCanvas := TdxPrintDeviceCanvas.Create(Self); - Result := FCanvas; -end; - -function TdxPrintDevice.GetCollate: Boolean; -const - CollationMap: array[DMCOLLATE_FALSE..DMCOLLATE_TRUE] of Boolean = (False, True); -begin - Result := False; - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FDeviceMode <> nil then - Result := CollationMap[FDeviceMode^.dmCollate]; - end; -end; - -function TdxPrintDevice.GetColorMode: Boolean; -begin - Result := False; - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FDeviceMode <> nil then - Result := FDeviceMode^.dmColor = DMCOLOR_COLOR; - end; -end; - -function TdxPrintDevice.GetCurrentDevice: PChar ; -begin - Result := nil; - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FHDeviceMode <> 0 then - Result := FCurrentDevice; - end; -end; - -function TdxPrintDevice.GetCurrentDriver: PChar ; -begin - Result := nil; - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FHDeviceMode <> 0 then - Result := FCurrentDriver; - end; -end; - -function TdxPrintDevice.GetCurrentPort: PChar ; -begin - Result := nil; - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FHDeviceMode <> 0 then - Result := FCurrentPort; - end; -end; - -function TdxPrintDevice.GetDefaultDMPaper: Integer; -begin - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FDeviceMode <> nil then - Result := DeviceMode^.dmPaperSize - else - Result := Windows.DMPAPER_FIRST; - end - else - Result := Windows.DMPAPER_FIRST; -end; - -function TdxPrintDevice.GetDeviceMode: PDeviceMode; -begin - if Printers.Count > 0 then - begin - GetPrinterIndex; - Result := FDeviceMode; - end - else - Result := nil; -end; - -function TdxPrintDevice.GetDuplex: TdxDuplexMode; -begin - Result := dmSimplex; - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FDeviceMode <> nil then - Result := DuplexModeMap[DeviceMode^.dmDuplex]; - end; -end; - -function EnumFontsProc(var LogFont: TLogFont; var TextMetric: TTextMetric; - FontType: DWORD; Data: LPARAM): Integer; stdcall; -begin - TStrings(Data).Add(LogFont.lfFaceName); - Result := 1; -end; - -function TdxPrintDevice.GetFonts: TStrings; -begin - if FFonts = nil then - try - SetState(psHandleIC); - FFonts := TStringList.Create; - EnumFonts(FDC, nil, @EnumFontsProc, Pointer(FFonts)); - except - FreeAndNil(FFonts); - raise; - end; - Result := FFonts; -end; - -function TdxPrintDevice.GetHandle: HDC; -begin - SetState(psHandleIC); - Result := FDC; -end; - -function TdxPrintDevice.GetHDeviceMode: THandle; -begin - if Printers.Count > 0 then - begin - GetPrinterIndex; - Result := FHDeviceMode; - end - else - Result := 0; -end; - -function TdxPrintDevice.GetIsDefault: Boolean; -begin - if PrinterIndex <> -1 then - Result := PrinterInfos[PrinterIndex].IsDefault - else - Result := False; -end; - -function TdxPrintDevice.GetIsInitialized: Boolean; -begin - Result := FPrinters <> nil; -end; - -function TdxPrintDevice.GetIsNetwork: Boolean; -begin - if PrinterIndex <> -1 then - Result := PrinterInfos[PrinterIndex].IsNetwork - else - Result := False; -end; - -function TdxPrintDevice.GetMaxExtents(Index: Integer): Integer; -begin - if Printers.Count > 0 then - begin - GetPrinterIndex; - if Index = 0 then - Result := LOWORD(FMaxExtents) - else - Result := HIWORD(FMaxExtents); - end - else - Result := dxDefaultMaxPaperExtents; -end; - -function TdxPrintDevice.GetMinExtents(Index: Integer): Integer; -begin - if Printers.Count > 0 then - begin - GetPrinterIndex; - if Index = 0 then - Result := LOWORD(FMinExtents) - else - Result := HIWORD(FMinExtents); - end - else - Result := dxDefaultMinPaperExtents; -end; - -function TdxPrintDevice.GetNumCopies: Integer; -begin - Result := 0; - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FDeviceMode <> nil then - Result := FDeviceMode^.dmCopies; - end; -end; - -function TdxPrintDevice.GetOrientation: TdxPrinterOrientation; -begin - Result := poPortrait; - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FDeviceMode <> nil then - if FDeviceMode^.dmOrientation = DMORIENT_LANDSCAPE then - Result := poLandscape; - end; -end; - -function TdxPrintDevice.GetPageHeight: Integer; -begin - SetState(psHandleIC); - Result := GetDeviceCaps(FDC, VertRes); -end; - -function TdxPrintDevice.GetPageHeightLoMetric: Integer; -begin - SetState(psHandleIC); - Result := 10 * GetDeviceCaps(FDC, VertSize); -end; - -function TdxPrintDevice.GetPageWidth: Integer; -begin - SetState(psHandleIC); - Result := GetDeviceCaps(FDC, HorzRes); -end; - -function TdxPrintDevice.GetPageWidthLoMetric: Integer; -begin - SetState(psHandleIC); - Result := 10 * GetDeviceCaps(FDC, HorzSize); -end; - -function TdxPrintDevice.GetPaperCount: Integer; -begin - if FPapers <> nil then - Result := FPapers.Count - else - Result := 0; -end; - -function TdxPrintDevice.GetPaperIndex: Integer; -begin - if FDeviceMode <> nil then - begin - Result := FindPaper(FDeviceMode^.dmPaperSize); - if (Result = -1) and (FPapers <> nil) and (FPapers.Count > 0) then - Result := 0; - end - else - Result := 0; -end; - -function TdxPrintDevice.GetPapers: TStrings; -const - PaperNameSize = 64; - PaperValueSize = SizeOf(Word); - PaperSizeSize = SizeOf(TPoint); -type - TdxPaperSize = TPoint; - TdxPaperSizes = array[0..0] of TdxPaperSize; - PdxPaperSizes = ^TdxPaperSizes; - TdxPaperValue = Word; - TdxPaperValues = array[0..0] of TdxPaperValue; - PdxPaperValues = ^TdxPaperValues; - TdxPaperName = array[0..PaperNameSize - 1] of Char; - TdxPaperNames = array[0..0] of TdxPaperName; - PdxPaperNames = ^TdxPaperNames; -var - HasStandardPapers: Boolean; - PaperCount: Integer; - PaperNames: PdxPaperNames ; - PaperValues: PdxPaperValues ; - PaperSizes: PdxPaperSizes ; - I: Integer; - Paper: TdxPaperInfo; -begin - if FPapers = nil then - try - HasStandardPapers := False; - if Printers.Count > 0 then - begin - GetPrinterIndex; - if DeviceMode = nil then - begin - Result := nil; - Exit; - end; - if FPapers <> nil then - begin - Result := FPapers; - Exit; - end; - PaperCount := DeviceCapabilities(CurrentDevice, CurrentPort, DC_PAPERNAMES, nil, nil); - if PaperCount > 0 then - begin - PaperNames := AllocMem(PaperNameSize * PaperCount * SizeOf(Char)); - try - if DeviceCapabilities(CurrentDevice, CurrentPort, DC_PAPERNAMES, PChar(PaperNames), nil) <> -1 then - begin - PaperValues := AllocMem(PaperValueSize * PaperCount); - try - if DeviceCapabilities(CurrentDevice, CurrentPort, DC_PAPERS, PChar(PaperValues), nil) <> -1 then - begin - PaperSizes := AllocMem(PaperSizeSize * PaperCount); - try - if DeviceCapabilities(CurrentDevice, CurrentPort, DC_PAPERSIZE, PChar(PaperSizes), nil) <> -1 then - begin - HasStandardPapers := True; - FPapers := TStringList.Create; - for I := 0 to PaperCount - 1 do - begin - Paper := TdxPaperInfo.Create(Self); - with Paper do - begin - FSize := PaperSizes^[I]; - FDMPaper := PaperValues^[I]; - FName := PaperNames^[I]; - end; - FPapers.AddObject(Paper.Name, Paper); - end; - if Pos(cxGetResourceString(@sdxCustom), FPapers[PaperCount - 1]) = 0 then - begin - Paper := TdxPaperInfo.Create(Self); - with Paper do - begin - FSize := TdxPaperInfo(FPapers.Objects[0]).Size; - FDMPaper := DMPAPER_USER; - FName := cxGetResourceString(@sdxCustomSize); - end; - FPapers.AddObject(Paper.Name, Paper); - end; - end; - finally - FreeMem(PaperSizes); - end; - end; - finally - FreeMem(PaperValues); - end; - end; - finally - FreeMem(PaperNames); - end; - end; - end; - - if not HasStandardPapers then - begin - FPapers := TStringList.Create; - Paper := TdxPaperInfo.Create(Self); - with Paper do - begin - FSize := Point(2100, 2970); {A4} // TODO: use default locale paper - FDMPaper := DMPAPER_USER; - FName := cxGetResourceString(@sdxCustomSize); - end; - FPapers.AddObject(Paper.Name, Paper); - end; - except - FreeAndNil(FPapers); - raise; - end; - Result := FPapers; -end; - -function TdxPrintDevice.GetPhysOffset(Index: Integer): Integer; -const - PhysicalOffsets: array[0..1] of Integer = (PHYSICALOFFSETX, PHYSICALOFFSETY); -begin - if Printers.Count > 0 then - begin - GetPrinterIndex; - try - Result := GetDeviceCaps(Handle, PhysicalOffsets[Index]); - except - Result := 0; - end; - end - else - Result := 0; -end; - -function TdxPrintDevice.GetPrinterCount: Integer; -begin - if FPrinters <> nil then - Result := FPrinters.Count - else - Result := 0; -end; - -function TdxPrintDevice.GetPrinterIndex: Integer; -begin - if FPrinterIndex = -MaxInt then SetToDefaultPrintDevice; - Result := FPrinterIndex; -end; - -function TdxPrintDevice.GetPrinterInfo(Index: Integer): TdxPrintDeviceInfo; -begin - if (FPrinters <> nil) and (Index >= 0) and (Index < FPrinters.Count) then - Result := TdxPrintDeviceInfo(FPrinters.Objects[Index]) - else - Result := nil; -end; - -function TdxPrintDevice.GetPrinters: TStrings; - - function IsDefaultDevice(AnAttributes: DWORD): Boolean; - begin - Result := AnAttributes and PRINTER_ATTRIBUTE_DEFAULT = PRINTER_ATTRIBUTE_DEFAULT; - end; - - function IsNetworkDevice(AnAttributes: DWORD): Boolean; - begin - Result := AnAttributes and PRINTER_ATTRIBUTE_NETWORK = PRINTER_ATTRIBUTE_NETWORK; - end; - - - procedure GetAsPrinterInfo4(var AnOffset: Integer; ABuffer: PChar); - var - PrintDeviceInfo: TdxPrintDeviceInfo; - begin - Inc(PByte(ABuffer), AnOffset); - with PPrinterInfo4(ABuffer)^ do - begin - PrintDeviceInfo := TdxPrintDeviceInfo.Create('', pPrinterName, '', dxIsDefaultPrinter(pPrinterName), IsNetworkDevice(Attributes)); - FPrinters.AddObject(pPrinterName, PrintDeviceInfo); - end; - Inc(AnOffset, SizeOf(TPrinterInfo4)); - end; - - procedure GetAsPrinterInfo5(var AnOffset: Integer; ABuffer: PChar); - var - LineCur, PortName: PChar; - PrintDeviceTitle: string; - PrintDeviceInfo: TdxPrintDeviceInfo; - begin - Inc(PByte(ABuffer), AnOffset); - with PPrinterInfo5(ABuffer)^ do - begin - LineCur := pPortName; - PortName := FetchStr(LineCur); - while PortName^ <> #0 do - begin - PrintDeviceTitle := Format(cxGetResourceString(@sdxDeviceOnPort), [pPrinterName, PortName]); - PrintDeviceInfo := TdxPrintDeviceInfo.Create(nil, pPrinterName, PortName, dxIsDefaultPrinter(pPrinterName), IsNetworkDevice(Attributes)); - FPrinters.AddObject(PrintDeviceTitle, PrintDeviceInfo); - PortName := FetchStr(LineCur); - end; - end; - Inc(AnOffset, SizeOf(TPrinterInfo5)); - end; - -const - Levels: array[Boolean] of DWORD = (5, 4); - Flags: array[Boolean] of DWORD = (PRINTER_ENUM_LOCAL, PRINTER_ENUM_CONNECTIONS or PRINTER_ENUM_LOCAL); -var - Level, Flag, Count, NumInfo: DWORD; - Buffer: Pointer; - Offset, I: Integer; -begin - if FPrinters = nil then - begin - FPrinters := TStringList.Create; - try - Level := Levels[IsWinNT]; - Flag := Flags[IsWinNT]; - Count := 0; - EnumPrinters(Flag, nil, Level, nil, 0, Count, NumInfo); - if Count <> 0 then - begin - Buffer := dxAllocMem(Count); - try - if EnumPrinters(Flag, nil, Level, Buffer, Count, Count, NumInfo) then - begin - Offset := 0; - for I := 0 to NumInfo - 1 do - if Level = 4 then - GetAsPrinterInfo4(Offset, Buffer) - else - GetAsPrinterInfo5(Offset, Buffer); - end; - finally - dxFreeMem(Buffer, Count); - end; - end; - except - FreeAndNil(FPrinters); - raise; - end; - end; - Result := FPrinters; -end; - -procedure TdxPrintDevice.SetBinIndex(Value: Integer); -begin - if (FDeviceMode <> nil) and (Bins <> nil) and (Value > -1) and (Value < Bins.Count) then - begin - if FDeviceMode^.dmDefaultSource <> Value then - begin - FDeviceMode^.dmDefaultSource := Integer(Bins.Objects[Value]); - FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_DEFAULTSOURCE; - FDeviceModeChanged := True; - end; - end; -end; - -procedure TdxPrintDevice.SetCollate(Value: Boolean); -const - Collations: array[Boolean] of ShortInt = (DMCOLLATE_FALSE, DMCOLLATE_TRUE); -begin - //CheckPrinting(False); - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FDeviceMode <> nil then - begin - FDeviceMode^.dmCollate := Collations[Value]; - FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_COLLATE; - FDeviceModeChanged := True; - end; - end; -end; - -procedure TdxPrintDevice.SetColorMode(Value: Boolean); -const - ColorModes: array[Boolean] of ShortInt = (DMCOLOR_MONOCHROME, DMCOLOR_COLOR); -begin - //CheckPrinting(False); - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FDeviceMode <> nil then - begin - FDeviceMode^.dmColor := ColorModes[Value]; - FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_COLOR; - FDeviceModeChanged := True; - end; - end; -end; - -procedure TdxPrintDevice.SetDuplex(Value: TdxDuplexMode); -const - DuplexModeMap: array[TdxDuplexMode] of UINT = (DMDUP_SIMPLEX, DMDUP_VERTICAL, DMDUP_HORIZONTAL); -begin - //CheckPrinting(False); - if Printers.Count > 0 then - begin - GetPrinterIndex; - if (FDeviceMode <> nil) and IsSupportDuplex then - begin - FDeviceMode^.dmDuplex := DuplexModeMap[Value]; - FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_DUPLEX; - FDeviceModeChanged := True; - end; - end; -end; - -procedure TdxPrintDevice.SetIsDefault(Value: Boolean); -var - I: Integer; -begin - if (PrinterIndex <> -1) and (IsDefault <> Value) then - begin - for I := 0 to Printers.Count - 1 do - PrinterInfos[I].IsDefault := False; - dxSetDefaultPrinter(CurrentDevice); - end -end; - -procedure TdxPrintDevice.SetNumCopies(Value: Integer); -begin - CheckPrinting(False); - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FDeviceMode <> nil then - begin - FDeviceMode^.dmCopies := Value; - FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_COPIES; - FDeviceModeChanged := True; - end; - end; -end; - -procedure TdxPrintDevice.SetOrientation(Value: TdxPrinterOrientation); -begin - //CheckPrinting(False); - if Printers.Count > 0 then - begin - GetPrinterIndex; - if FDeviceMode <> nil then - begin - FDeviceMode^.dmOrientation := PrinterOrientationMap[Value]; - FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_ORIENTATION; - FDeviceModeChanged := True; - end; - end; -end; - -procedure TdxPrintDevice.SetPaperIndex(Value: Integer); -begin - if (FDeviceMode <> nil) and (Papers <> nil) and (Value > -1) and (Value < Papers.Count) then - begin - FDeviceMode^.dmPaperSize := TdxPaperInfo(Papers.Objects[Value]).DMPaper; - FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_PAPERSIZE; - if Value = Papers.Count - 1 then - FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_PAPERWIDTH or DM_PAPERLENGTH; - FDeviceModeChanged := True; - end; -end; - -procedure TdxPrintDevice.SetPrinterCapabilities(Value: Integer); -begin - FCapabilities := []; - if Value and DM_ORIENTATION <> 0 then Include(FCapabilities, pcOrientation); - if Value and DM_COPIES <> 0 then Include(FCapabilities, pcCopies); - if Value and DM_COLLATE <> 0 then Include(FCapabilities, pcCollation); -// if Value and DM_DUPLEX <> 0 then Include(FCapabilities, pcDuplex); -// if Value and DM_COLLATE <> 0 then Include(FCapabilities, pcColor); -end; - -procedure TdxPrintDevice.SetPrinterIndex(Value: Integer); -begin - CheckPrinting(False); - if (Value < -1) or (Value >= Printers.Count) then - RaiseError(cxGetResourceString(@sdxPrinterIndexError)) - else - if Value = -1 then - begin - FPrinterIndex := -MaxInt; - GetPrinterIndex; - end - else - OpenPrintDevice(Value); - SetState(psNoHandle); -end; - -procedure TdxPrintDevice.CheckPrinting(Value: Boolean); -begin - if Printing <> Value then - if Value then - RaiseError(cxGetResourceString(@sdxNotPrinting)) - else - RaiseError(cxGetResourceString(@sdxPrinting)); -end; - -procedure TdxPrintDevice.ClosePrintDevice; -begin - StrDispose(FCurrentDevice); - FCurrentDevice := nil; - StrDispose(FCurrentDriver); - FCurrentDriver := nil; - StrDispose(FCurrentPort); - FCurrentPort := nil; - - FreeAndNilBins; - FreeAndNilFonts; - FreeAndNilPapers; - - if FHDeviceMode <> 0 then - begin - while GlobalUnlock(FHDeviceMode) do; - GlobalFree(FHDeviceMode); - //Marshal.DestroyStructure(DeviceMode, TypeOf(TDeviceMode)); - FHDeviceMode := 0; - FDeviceMode := nil; - end; - - if FDeviceHandle <> 0 then - begin - ClosePrinter(FDeviceHandle); - FDeviceHandle := 0; - end; - - SetState(psNoHandle); - FreeAndNilCanvas; - - FPrinterIndex := -MaxInt; -end; - -procedure TdxPrintDevice.DeselectHandles; -begin - if FDC <> 0 then - begin - SelectObject(FDC, GetStockObject(BLACK_PEN)); - SelectObject(FDC, GetStockObject(HOLLOW_BRUSH)); - SelectObject(FDC, GetStockObject(SYSTEM_FONT)); - end; -end; - -procedure TdxPrintDevice.FixMinMaxExtents; -var - I: Integer; - MaxSize, MinSize, PaperSize: TPoint; -begin - if (FMaxExtents = -1) or (FMaxExtents = 0) then - FMaxExtents := SetLoHiWords(FMaxExtents, cMaxPaperExtent, cMaxPaperExtent); - if (FMinExtents = -1) or (FMinExtents = 0) then - FMinExtents := SetLoHiWords(FMinExtents, cMinPaperExtent, cMinPaperExtent); - - if Papers <> nil then - begin - MaxSize := Point(LoWord(FMaxExtents), HiWord(FMaxExtents)); - MinSize := Point(LoWord(FMinExtents), HiWord(FMinExtents)); - - for I := 0 to Papers.Count - 1 do - begin - PaperSize := TdxPaperInfo(Papers.Objects[I]).Size; - if PaperSize.X < MinSize.X then MinSize.X := PaperSize.X; - if PaperSize.X > MaxSize.X then MaxSize.X := PaperSize.X; - if PaperSize.Y < MinSize.Y then MinSize.Y := PaperSize.Y; - if PaperSize.Y > MaxSize.Y then MaxSize.Y := PaperSize.Y; - end; - - if MinSize.X <> LoWord(FMinExtents) then - FMinExtents := SetLoWord(FMinExtents, MinSize.X); - if MinSize.Y <> HiWord(FMinExtents) then - FMinExtents := SetHiWord(FMinExtents, MinSize.Y); - if MaxSize.X <> LoWord(FMaxExtents) then - FMaxExtents := SetLoWord(FMaxExtents, MaxSize.X); - if MaxSize.Y <> HiWord(FMaxExtents) then - FMaxExtents := SetHiWord(FMaxExtents, MaxSize.Y); - end; - - if LoWord(FMinExtents) < 500 then - FMinExtents := SetLoWord(FMinExtents, 500); - if HiWord(FMinExtents) < 500 then - FMinExtents := SetHiWord(FMinExtents, 500); - if LoWord(FMaxExtents) < LoWord(FMinExtents) then - FMaxExtents := SetLoWord(FMaxExtents, LoWord(FMinExtents)); - if HiWord(FMaxExtents) < HiWord(FMinExtents) then - FMaxExtents := SetHiWord(FMaxExtents, HiWord(FMinExtents)); -end; - -procedure TdxPrintDevice.FreeAndNilBins; -begin - FreeAndNil(FBins); -end; - -procedure TdxPrintDevice.FreeAndNilFonts; -begin - FreeAndNil(FFonts); -end; - -procedure TdxPrintDevice.FreeAndNilCanvas; -begin - FreeAndNil(FCanvas); -end; - -procedure TdxPrintDevice.FreeAndNilPapers; -var - I: Integer; -begin - for I := 0 to PaperCount - 1 do - FPapers.Objects[I].Free; - FreeAndNil(FPapers); -end; - -procedure TdxPrintDevice.FreeAndNilPrinters; -var - I: Integer; -begin - for I := 0 to PrinterCount - 1 do - PrinterInfos[I].Free; - FreeAndNil(FPrinters); -end; - -procedure TdxPrintDevice.InternalSelectPaperBySize(var AWidth, AHeight: Integer); -var - DeviceMode: TDeviceMode; -begin - if AWidth > MaxExtentX then AWidth := MaxExtentX; - if AWidth < MinExtentX then AWidth := MinExtentX; - if AHeight > MaxExtentY then AHeight := MaxExtentY; - if AHeight < MinExtentY then AHeight := MinExtentY; - - if FDeviceMode <> nil then - begin - DeviceMode := FDeviceMode^; - if DeviceMode.dmPaperWidth <> AWidth then - TdxPaperInfo(Papers.Objects[Papers.Count - 1]).Width := AWidth; - if DeviceMode.dmPaperLength <> AHeight then - TdxPaperInfo(Papers.Objects[Papers.Count - 1]).Height := AHeight; - end; -end; - -procedure TdxPrintDevice.OpenPrintDevice(AIndex: Integer); -const - dmFields: UINT = DM_ORIENTATION or DM_PAPERSIZE or DM_PAPERLENGTH or - DM_PAPERWIDTH or DM_SCALE or DM_COPIES or DM_DEFAULTSOURCE or DM_PRINTQUALITY or - DM_COLOR or DM_DUPLEX or DM_YRESOLUTION or DM_TTOPTION or DM_COLLATE or - DM_FORMNAME or DM_LOGPIXELS or DM_BITSPERPEL or DM_PELSWIDTH or DM_PELSHEIGHT; -var - DeviceMode: TDeviceMode; - MemSize: Integer; - SaveHDeviceMode: THandle; - SavePaperWidth, SavePaperHeight: Integer; - - procedure RestoreDeviceMode(ASaveHDeviceMode: THandle); - var - PDevMode: Pointer ; - DevMode: TDeviceMode; - begin - PDevMode := GlobalLock(ASaveHDeviceMode); - try - DevMode := PDeviceMode(PDevMode)^; - Copies := DevMode.dmCopies; - Duplex := DuplexModeMap[DevMode.dmDuplex]; - Orientation := OrientationMap[DevMode.dmOrientation]; - if not SelectPaper(DevMode.dmPaperSize) then - SelectPaper(SavePaperWidth, SavePaperHeight); - SelectBin(DevMode.dmDefaultSource); - finally - GlobalUnlock(ASaveHDeviceMode); - end; - end; - -begin - if FPrinterIndex = AIndex then Exit; - SaveHDeviceMode := 0; - if IsDeviceModePersistent and (FHDeviceMode <> 0) then - begin - SaveHDeviceMode := CopyDeviceMode(FHDeviceMode); - if (Papers <> nil) and (PaperIndex > -1) and (PaperIndex < Papers.Count) then - with TdxPaperInfo(Papers.Objects[PaperIndex]) do - begin - SavePaperWidth := Width; - SavePaperHeight := Height; - end; - end; - - try - ClosePrintDevice; - with PrinterInfos[AIndex] do - begin - FCurrentDevice := StrNew(FDevice); - FCurrentDriver := StrNew(FDriver); - FCurrentPort := StrNew(FPort); - end; - - if OpenPrinter(FCurrentDevice, FDeviceHandle, nil) then - begin - MemSize := DocumentProperties(0, FDeviceHandle, FCurrentDevice, nil, nil, 0); - if MemSize <= 0 then - begin - ClosePrintDevice; - Exit; - end; - - FHDeviceMode := GlobalAlloc(GHND, MemSize); - if FHDeviceMode = 0 then - begin - ClosePrintDevice; - Exit; - end; - - FDeviceMode := GlobalLock(FHDeviceMode); - FDeviceMode^.dmFields := dmFields; - if IDOK <> DocumentProperties(0, FDeviceHandle, FCurrentDevice, FDeviceMode, nil, DM_OUT_BUFFER) then - begin - ClosePrintDevice; - Exit; - end; - FPrinterIndex := AIndex; - - SetPrinterCapabilities(DeviceMode.dmFields); - - FMaxCopies := DeviceCapabilities(FCurrentDevice, FCurrentPort, DC_COPIES, nil, nil); - FMaxExtents := DeviceCapabilities(FCurrentDevice, FCurrentPort, DC_MAXEXTENT, nil, nil); - FMinExtents := DeviceCapabilities(FCurrentDevice, FCurrentPort, DC_MINEXTENT, nil, nil); - FixMinMaxExtents; - - if IsDeviceModePersistent and (SaveHDeviceMode <> 0) then - RestoreDeviceMode(SaveHDeviceMode); - DoPrinterChanged; - end; - finally - if SaveHDeviceMode <> 0 then GlobalFree(SaveHDeviceMode); - end; -end; - -procedure TdxPrintDevice.SetState(Value: TdxPrinterState); -type - TCreateHandleFunc = function(DriverName, DeviceName, Output: PChar; - InitData: PDeviceMode): HDC stdcall; -var - CreateHandleFunc: TCreateHandleFunc; -begin - if Value <> FState then - begin - CreateHandleFunc := nil; - case Value of - psNoHandle: - begin - CheckPrinting(False); - if FCanvas <> nil then - FCanvas.Handle := 0; - DeleteDC(FDC); - FDC := 0; - end; - psHandleIC: - if FState <> psHandleDC then - CreateHandleFunc := CreateIC - else - Exit; - psHandleDC: - begin - if FCanvas <> nil then FCanvas.Handle := 0; - if FDC <> 0 then DeleteDC(FDC); - CreateHandleFunc := CreateDC; - end; - end; - if Assigned(CreateHandleFunc) and (PrinterIndex >= 0) and (PrinterIndex < PrinterCount) then - with PrinterInfos[PrinterIndex] do - begin - FDC := CreateHandleFunc(Driver, Device, Port, FDeviceMode); - if FDC = 0 then - RaiseError(cxGetResourceString(@sdxInvalidPrintDevice)); - if FCanvas <> nil then - FCanvas.Handle := FDC; - end; - FState := Value; - end; -end; - -procedure TdxPrintDevice.SetToDefaultPrintDevice; -var - Device: string; - Index: Integer; -begin - Device := dxGetDefaultPrinter; - if Device <> '' then - begin - Index := FindPrintDevice(PChar(Device), nil); - if Index <> -1 then - begin - OpenPrintDevice(Index); - Exit; - end; - end; - RaiseError(cxGetResourceString(@sdxNoDefaultPrintDevice)); -end; - -procedure TdxPrintDevice.WndProc(var Message: TMessage); - - procedure PostPrnMessage; - begin - PostMessage(FWindowHandle, WMPS_PRINTERLISTCHANGED, 0, 0); - end; - - function PeekPrnMessage(ARemove: Boolean): Boolean; - const - RemoveMap: array[Boolean] of UINT = (PM_NOREMOVE, PM_REMOVE); - var - Msg: TMsg; - begin - Result := PeekMessage(Msg, FWindowHandle, WMPS_PRINTERLISTCHANGED, WMPS_PRINTERLISTCHANGED, RemoveMap[ARemove]); - end; - -begin - with Message do - begin - case Msg of - WM_SETTINGCHANGE: - if AutoRefresh then PostPrnMessage; - - WMPS_PRINTERLISTCHANGED: - if AutoRefresh then - if not FPrinting then - begin - while PeekPrnMessage(True) do ; - Refresh; - end - else - if not PeekPrnMessage(False) then PostPrnMessage; - end; - Result := DefWindowProc(FWindowHandle, Msg, wParam, lParam); - end; -end; - -var - LibHandle: THandle = 0; - -procedure InitializeProcs; -begin - LibHandle := LoadLibrary(winspl); - if LibHandle > HINSTANCE_ERROR then - begin - @FConnectToPrinterDlg := GetProcAddress(LibHandle, 'ConnectToPrinterDlg'); - @FGetDefaultPrinter := GetProcAddress(LibHandle, 'GetDefaultPrinterA'); - @FSetDefaultPrinter := GetProcAddress(LibHandle, 'SetDefaultPrinterA'); - end - else - LibHandle := 0; -end; - -procedure DeinitializeProcs; -begin - if LibHandle <> 0 then - begin - @FConnectToPrinterDlg := nil; - @FGetDefaultPrinter := nil; - @FSetDefaultPrinter := nil; - FreeLibrary(LibHandle); - LibHandle := 0; - end; -end; - -initialization - InitializeProcs; - - {$IFDEF DEBUG_PRINTDEVICE} - AssignFile(LogFile, 'PrinterLog.txt'); - Rewrite(LogFile); - {$ENDIF} - -finalization - {$IFDEF DEBUG_PRINTDEVICE} - CloseFile(LogFile); - {$ENDIF} - - FreeAndNil(FPrintDevice); - DeinitializeProcs; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPrnDlg.dfm b/internal/x.46/ExpressPrinting System/Sources/dxPrnDlg.dfm deleted file mode 100644 index c359784e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPrnDlg.dfm +++ /dev/null @@ -1,858 +0,0 @@ -object dxfmPrintDialog: TdxfmPrintDialog - Left = 384 - Top = 200 - BorderStyle = bsDialog - Caption = 'Print' - ClientHeight = 458 - ClientWidth = 484 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Panel1: TPanel - Left = 0 - Top = 427 - Width = 484 - Height = 31 - Align = alBottom - BevelOuter = bvNone - TabOrder = 3 - object btnPreview: TBitBtn - Left = 113 - Top = 2 - Width = 105 - Height = 23 - Caption = 'Print Pre&view' - TabOrder = 1 - OnClick = btnPreviewClick - end - object btnOK: TButton - Left = 234 - Top = 2 - Width = 79 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object btnCancel: TButton - Left = 318 - Top = 2 - Width = 79 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 3 - end - object btnHelp: TButton - Left = 402 - Top = 2 - Width = 79 - Height = 23 - Caption = '&Help' - TabOrder = 4 - end - object btnPageSetup: TBitBtn - Left = 3 - Top = 2 - Width = 105 - Height = 23 - Caption = 'Page Set&up...' - TabOrder = 0 - OnClick = btnPageSetupClick - Layout = blGlyphRight - end - end - object pnlPrintStyles: TPanel - Left = 0 - Top = 317 - Width = 484 - Height = 105 - Align = alTop - BevelOuter = bvNone - BorderWidth = 3 - TabOrder = 2 - object gbxPrintStyles: TGroupBox - Left = 3 - Top = 3 - Width = 478 - Height = 99 - Align = alClient - Caption = ' Print Styles ' - TabOrder = 0 - object lbxPrintStyles: TListBox - Left = 7 - Top = 15 - Width = 322 - Height = 78 - Style = lbOwnerDrawFixed - ItemHeight = 34 - PopupMenu = pmPrintStyles - TabOrder = 0 - OnClick = lbxPrintStylesClick - OnDblClick = PageSetup2Click - OnDrawItem = lbxPrintStylesDrawItem - end - object btnPageSetup2: TButton - Left = 335 - Top = 15 - Width = 136 - Height = 23 - Caption = 'Page Set&up...' - Default = True - TabOrder = 1 - OnClick = PageSetup2Click - end - object btnDefineStyles: TButton - Left = 335 - Top = 42 - Width = 136 - Height = 23 - Caption = 'Define S&tyles...' - TabOrder = 2 - OnClick = DefineStylesClick - end - end - end - object pnlMiddle: TPanel - Left = 0 - Top = 164 - Width = 484 - Height = 153 - Align = alTop - BevelOuter = bvNone - BorderWidth = 3 - TabOrder = 1 - object gbxPageRange: TGroupBox - Left = 3 - Top = 3 - Width = 244 - Height = 147 - Align = alLeft - Caption = ' Page ra&nge ' - TabOrder = 0 - object lblDescription: TLabel - Left = 6 - Top = 98 - Width = 232 - Height = 41 - AutoSize = False - Caption = - 'Enter page number and/or page ranges'#13#10'separated by commes. For e' + - 'xample : 1,3,5-12' - Transparent = True - WordWrap = True - end - object bvlPRWarningHolder: TBevel - Left = 80 - Top = 12 - Width = 157 - Height = 30 - Visible = False - end - object rbtnAllPages: TRadioButton - Left = 9 - Top = 23 - Width = 58 - Height = 17 - Caption = '&All' - Checked = True - TabOrder = 0 - TabStop = True - OnClick = rbtnPagesClick - end - object rbtnCurrentPage: TRadioButton - Tag = 1 - Left = 9 - Top = 48 - Width = 104 - Height = 17 - Caption = 'Curr&ent page' - TabOrder = 1 - OnClick = rbtnPagesClick - end - object rbtnPageRanges: TRadioButton - Tag = 2 - Left = 9 - Top = 72 - Width = 67 - Height = 17 - Caption = 'Pa&ges: ' - TabOrder = 2 - OnClick = rbtnPagesClick - end - object edPageRanges: TEdit - Left = 80 - Top = 70 - Width = 157 - Height = 21 - AutoSelect = False - TabOrder = 3 - OnChange = edPageRangesChange - OnExit = edPageRangesExit - OnKeyPress = edPageRangesKeyPress - end - object rbtnSelection: TRadioButton - Tag = 3 - Left = 116 - Top = 48 - Width = 113 - Height = 17 - Caption = '&Selection' - TabOrder = 4 - OnClick = rbtnPagesClick - end - end - object gbxCopies: TGroupBox - Left = 251 - Top = 3 - Width = 230 - Height = 147 - Align = alRight - Caption = ' C&opies ' - TabOrder = 1 - object lblNumberOfCopies: TLabel - Left = 11 - Top = 48 - Width = 90 - Height = 13 - Caption = 'Number of &copies :' - OnClick = lblNumberOfCopiesClick - end - object bvlCopiesHolder: TBevel - Left = 122 - Top = 43 - Width = 101 - Height = 22 - Visible = False - end - object lblNumberOfPages: TLabel - Left = 11 - Top = 21 - Width = 89 - Height = 13 - Caption = 'Number of pa&ges :' - FocusControl = cbxNumberOfPages - OnClick = lblNumberOfPagesClick - end - object pbxCollate: TPaintBox - Left = 62 - Top = 96 - Width = 118 - Height = 44 - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -9 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - OnDblClick = pbxCollateDblClick - OnPaint = pbxCollatePaint - end - object chbxCollate: TCheckBox - Left = 9 - Top = 74 - Width = 171 - Height = 17 - Caption = 'Co&llate copies' - TabOrder = 1 - OnClick = chbxCollateClick - end - object cbxNumberOfPages: TComboBox - Left = 122 - Top = 17 - Width = 101 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 0 - OnChange = cbxNumberOfPagesChange - Items.Strings = ( - 'All' - 'Even' - 'Odd') - end - end - end - object pnlTop: TPanel - Left = 0 - Top = 0 - Width = 484 - Height = 164 - Align = alTop - BevelOuter = bvNone - BorderWidth = 3 - TabOrder = 0 - object gbxPrinter: TGroupBox - Left = 3 - Top = 3 - Width = 478 - Height = 158 - Align = alClient - Caption = ' &Printer ' - TabOrder = 0 - object lblName: TLabel - Left = 8 - Top = 20 - Width = 31 - Height = 13 - Caption = '&Name:' - FocusControl = cbxPrinters - OnClick = lblNameClick - end - object lblStatus: TLabel - Left = 8 - Top = 48 - Width = 35 - Height = 13 - Caption = 'Status:' - end - object lblType: TLabel - Left = 8 - Top = 67 - Width = 28 - Height = 13 - Caption = 'Type:' - end - object lblWhere: TLabel - Left = 8 - Top = 86 - Width = 36 - Height = 13 - Caption = 'Where:' - end - object lblComment: TLabel - Left = 8 - Top = 105 - Width = 49 - Height = 13 - Caption = 'Comment:' - end - object lStatus: TLabel - Left = 90 - Top = 49 - Width = 31 - Height = 13 - Caption = 'Status' - end - object lType: TLabel - Left = 90 - Top = 68 - Width = 24 - Height = 13 - Caption = 'Type' - end - object lWhere: TLabel - Left = 90 - Top = 87 - Width = 32 - Height = 13 - Caption = 'Where' - end - object lComment: TLabel - Left = 90 - Top = 106 - Width = 45 - Height = 13 - Caption = 'Comment' - end - object cbxPrinters: TComboBox - Left = 90 - Top = 15 - Width = 280 - Height = 26 - Style = csOwnerDrawFixed - ItemHeight = 20 - TabOrder = 0 - OnChange = cbxPrintersChange - OnDrawItem = cbxPrintersDrawItem - end - object btnPrinterProperties: TButton - Left = 376 - Top = 15 - Width = 95 - Height = 26 - Caption = 'P&roperties...' - TabOrder = 1 - OnClick = btnPrinterPropertiesClick - end - object btnNetwork: TButton - Left = 376 - Top = 45 - Width = 95 - Height = 26 - Caption = 'Net&work...' - TabOrder = 2 - OnClick = btnNetworkClick - end - object pnlPrintToFile: TPanel - Left = 2 - Top = 120 - Width = 474 - Height = 36 - Align = alBottom - BevelOuter = bvNone - TabOrder = 3 - object chbxPrintToFile: TCheckBox - Left = 8 - Top = 10 - Width = 136 - Height = 15 - Caption = 'Print to &file' - TabOrder = 0 - OnClick = chbxPrintToFileClick - end - object cbxFileName: TComboBox - Left = 150 - Top = 7 - Width = 216 - Height = 21 - ItemHeight = 13 - TabOrder = 1 - Text = 'cbxFileName' - OnExit = cbxFileNameExit - end - object btnBrowse: TButton - Left = 374 - Top = 6 - Width = 95 - Height = 23 - Caption = '&Browse...' - TabOrder = 2 - OnClick = btnBrowseClick - end - end - end - end - object ilPrinters: TImageList - AllocBy = 7 - Left = 85 - Top = 357 - Bitmap = { - 494C010107000C000C0010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008400 - 0000840000008400000084000000840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000840000008400 - 0000840000008484840084000000FFFFFF008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008400000084000000840000008400000084000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000840000000000000000000000000000000000000000000000848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000840000008400 - 0000840000008400000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 000084000000000000000000000000000000000000008484840000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF0000FFFF008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000840000008400 - 000084000000840000008484840084000000FFFFFF0084000000840000008400 - 0000840000008400000084000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 000084000000000000000000000000000000000000008484840000FFFF0000FF - FF0000FFFF0000FFFF00C6C6C600000000000084840000FFFF0000FFFF0000FF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 000084000000000000000000000000000000000000008484840000FFFF0000FF - FF0000FFFF0000FFFF000084840000000000C6C6C60000FFFF0000FFFF0000FF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 00008400000084000000840000008400000000000000000000008484840000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 000084000000FFFFFF00840000008400000000000000000000008484840000FF - FF0000FFFF0000FFFF0000FFFF000000000000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000008400000084000000848484008484 - 840084848400840000008484840084000000FFFFFF00FFFFFF00FFFFFF008400 - 000084000000FFFFFF0084000000840000000000000000000000000000008484 - 840000FFFF0000FFFF0000FFFF000000000000FFFF0000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000084000000840000008400 - 0000840000008484840084848400848484008400000084000000840000008400 - 0000FFFFFF00FFFFFF0084000000840000000000000000000000000000008484 - 840000FFFF0000FFFF0000848400000000000084840000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000008400 - 0000840000008484840084848400848484008484840084000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000840000000000000000000000000000000000 - 00008484840000FFFF0000848400000000000084840000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000008400 - 0000840000008484840084848400848484008484840084000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000840000000000000000000000000000000000 - 00008484840000FFFF0000848400000000000084840000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 84008484840084848400840000000000000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000008400 - 0000840000008484840084848400848484008484840084000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000840000000000000000000000000000000000 - 0000000000008484840000FFFF000000000000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000000000000000000008400 - 000084000000848484008484840084848400840000000000000084000000FFFF - FF00FFFFFF00FFFFFF0084000000840000000000000000000000000000000000 - 0000000000008484840000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000840000008400000084000000840000000000000000000000000000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 000000000000000000008484840000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000C6C6C600848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000084840000FFFF00C6C6C600008484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000C0C0C000808080008080800000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000080800000FFFF00C0C0C000008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400C6C6C600C6C6C60084848400000000000000000084848400848484000000 - 000000000000000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6 - C600C6C6C60084848400000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C6000000000000000000000000008080 - 8000C0C0C000C0C0C00080808000000000000000000080808000808080000000 - 000000000000000000000000000000000000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C00080808000000000000000000000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000C0C0C0000000000084848400C6C6C6008484 - 84008484840084848400C6C6C600848484008484840000000000000000008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000008484840084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000080808000C0C0C0008080 - 80008080800080808000C0C0C000808080008080800000000000000000008080 - 8000808080000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000808080008080800000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484008484 - 8400C6C6C600C6C6C600C6C6C600848484008484840084848400848484000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000C6C6C600C6C6C600C6C6C600848484008484840084848400848484000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000C0C0C000C0C0C000C0C0C000808080008080800080808000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000C0C0C000C0C0C000C0C0C000808080008080800080808000808080000000 - 0000000000000000000000000000000000008484840084848400C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400848484008484 - 840084848400000000000000000000000000000000008484840084848400C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400848484008484 - 8400848484000000000000000000000000008080800080808000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000808080008080800080808000808080008080 - 800080808000000000000000000000000000000000008080800080808000C0C0 - C000C0C0C000C0C0C000C0C0C000808080008080800080808000808080008080 - 800080808000000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400848484008484 - 840084848400848484008484840000000000C6C6C600C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400848484008484 - 840084848400848484008484840000000000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000808080008080800080808000808080008080 - 800080808000808080008080800000000000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000808080008080800080808000808080008080 - 800080808000808080008080800000000000C6C6C600FFFFFF00C6C6C600C6C6 - C600FFFFFF00FFFFFF00C6C6C600C6C6C600C6C6C60084848400848484008484 - 840084848400848484008484840000000000C6C6C600FFFFFF00C6C6C600C6C6 - C600FFFFFF00FFFFFF00C6C6C600C6C6C600C6C6C60084848400848484008484 - 840084848400848484008484840000000000C0C0C000FFFFFF00C0C0C000C0C0 - C000FFFFFF00FFFFFF00C0C0C000C0C0C000C0C0C00080808000808080008080 - 800080808000808080008080800000000000C0C0C000FFFFFF00C0C0C000C0C0 - C000FFFFFF00FFFFFF00C0C0C000C0C0C000C0C0C00080808000808080008080 - 800080808000808080008080800000000000C6C6C600FFFFFF00FFFFFF00FFFF - FF00C6C6C600C6C6C6000000FF0084848400C6C6C600C6C6C600C6C6C6008484 - 840084848400848484008484840000000000C6C6C600FFFFFF00FFFFFF00FFFF - FF00C6C6C600C6C6C6000000FF0084848400C6C6C600C6C6C600C6C6C6008484 - 840084848400848484008484840000000000C0C0C000FFFFFF00FFFFFF00FFFF - FF00C0C0C000C0C0C0000000FF0080808000C0C0C000C0C0C000C0C0C0008080 - 800080808000808080008080800000000000C0C0C000FFFFFF00FFFFFF00FFFF - FF00C0C0C000C0C0C0000000FF0080808000C0C0C000C0C0C000C0C0C0008080 - 800080808000808080008080800000000000C6C6C600FFFFFF00C6C6C600C6C6 - C60000FF00008484840084848400C6C6C600C6C6C60084848400848484000000 - 0000C6C6C600848484008484840000000000C6C6C600FFFFFF00C6C6C600C6C6 - C60000FF00008484840084848400C6C6C600C6C6C60084848400848484000000 - 0000C6C6C600848484008484840000000000C0C0C000FFFFFF00C0C0C000C0C0 - C00000FF00008080800080808000C0C0C000C0C0C00080808000808080000000 - 0000C0C0C000808080008080800000000000C0C0C000FFFFFF00C0C0C000C0C0 - C00000FF00008080800080808000C0C0C000C0C0C00080808000808080000000 - 0000C0C0C0008080800080808000000000000000000084848400C6C6C600C6C6 - C60084848400C6C6C600C6C6C60084848400C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000084848400C6C6C600C6C6 - C60084848400C6C6C600C6C6C6008484840084848400C6C6C600C6C6C6000000 - 0000C6C6C6008484840084848400000000000000000080808000C0C0C000C0C0 - C00080808000C0C0C000C0C0C00080808000C0C0C000C0C0C000C0C0C0000000 - 0000C0C0C0000000000000000000000000000000000080808000C0C0C000C0C0 - C00080808000C0C0C000C0C0C0008080800080808000C0C0C000C0C0C0000000 - 0000C0C0C000808080008080800000000000000000000000000000000000C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600FFFFFF00FFFFFF008484 - 840000000000000000000000000000000000000000000000000000000000C6C6 - C600C6C6C600C6C6C60084848400C6C6C600C6C6C600FFFFFF00FFFFFF008484 - 8400848484000000000000000000000000008080800000000000000000000000 - 000080808000C0C0C000C0C0C000C0C0C000C0C0C000FFFFFF00FFFFFF008080 - 8000000000000000000000000000000000008080800000000000000000000000 - 000080808000C0C0C00080808000C0C0C000C0C0C000FFFFFF00FFFFFF008080 - 8000808080000000000000000000000000000000000000000000000000000000 - 00000000000084848400C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00848484000000000000000000000000000000000000000000000000000000 - 0000000000008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00848484000000000000000000000000000000000000000000FFFFFF000000 - 00000000000080808000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00808080000000000000000000000000000000000000000000FFFFFF000000 - 0000000000008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084848400000000000000000000000000C0C0C00000000000FFFF - FF0000000000FFFFFF0000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000000000000000000000000000C0C0C00000000000FFFF - FF0000000000FFFFFF0000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080800000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000C6C6C600FFFFFF00FFFFFF00FFFF - FF00C6C6C600C6C6C60000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000C6C6C600FFFFFF00FFFFFF00FFFF - FF00C6C6C600C6C6C60000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000C0C0C000FFFFFF00FFFFFF00FFFF - FF00C0C0C000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000C0C0C000FFFFFF00FFFFFF00FFFF - FF00C0C0C000C0C0C00000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600000000000000000000000000000000008080800000000000000000000000 - 00008080800000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000008080800000000000000000000000 - 00008080800000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C00000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFE0FFFFFF0000FFFF0007E0030000 - F83F0007C0010000000100078001000000010007800300000001000780030000 - 00010000C007000000010000C007000000010000E00F000000018000E00F0000 - 0001E000F01F00000001E000F01F00000101E000F83F00008383E040F83F0000 - FFFFF0E1FC7F0000FFFFFFFFFE7F0000FC7FF87FFC7FF87FF01F0000F01F0000 - C0070000C00700008001F01F8001F01F8001C0078001C0070001000100010001 - 0000000000000000000000000000000000000000000000000000000000000000 - 8001800180018001E007E00700070007F803F80300030003FE00FE0002000200 - FF03FF0303030303FF8FFF8F078F078F00000000000000000000000000000000 - 000000000000} - end - object pmPrintStyles: TPopupMenu - OnPopup = pmPrintStylesPopup - Left = 27 - Top = 357 - object miPageSetup: TMenuItem - Caption = 'Page Set&up...' - Default = True - ShortCut = 16397 - OnClick = PageSetup2Click - end - object miLine1: TMenuItem - Caption = '-' - end - object miDefineStyles: TMenuItem - Caption = 'Define Styles...' - OnClick = DefineStylesClick - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPrnDlg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPrnDlg.pas deleted file mode 100644 index f9f74996..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPrnDlg.pas +++ /dev/null @@ -1,1847 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPrnDlg; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - Registry, ExtCtrls, StdCtrls, Menus, Buttons, ImgList, dxPSForm, dxPSESys, - dxPSGlbl, dxPgsDlg, dxPrnDev, dxExtCtrls, dxCore; - -type - TdxPageNumbers = (pnAll, pnEven, pnOdd); - TdxPageRanges = (prAll, prCurrent, prRange, prSelection); - TdxPrintDlgButtonKind = (pdbPrinterProperties, pdbNetwork, pdbPreview, - pdbPageSetup, pdbDefineStyles, pdbStyleOptions, pdbHelp); - TdxPrintDlgButtons = set of TdxPrintDlgButtonKind; - TdxPrintDlgOption = (pdoPrintToFile, pdoAllPages, pdoCurrentPage, pdoSelection, - pdoPageRange, pdoPrintStyles); - TdxPrintDlgOptions = set of TdxPrintDlgOption; - -const - pdbAll = [Low(TdxPrintDlgButtonKind)..High(TdxPrintDlgButtonKind)]; - pdbDefault = [pdbPrinterProperties, pdbNetwork, pdbPreview, pdbPageSetup, pdbDefineStyles, pdbStyleOptions]; - - pdoAll = [Low(TdxPrintDlgOption)..High(TdxPrintDlgOption)]; - pdoDefaultOptionsEnabled = [pdoPrintToFile, pdoAllPages, pdoPageRange]; - pdoDefaultOptionsVisible = [pdoPrintToFile, pdoAllPages, pdoCurrentPage, pdoPageRange]; - -type - TdxPageSetupEvent = procedure(Sender: TObject; var ADone: Boolean; - APreviewBtnClicked, APrintBtnClicked: PBoolean) of object; - - PdxPrintDlgEvents = ^TdxPrintDlgEvents; - TdxPrintDlgEvents = record - OnClose: TNotifyEvent; {called on the OnHide event} - OnPageSetup: TdxPageSetupEvent; - OnShow: TNotifyEvent; - end; - - PdxPrintDialogData = ^TdxPrintDialogData; - TdxPrintDialogData = record - Copies: Integer; - Collate: Boolean; - FileList: TStrings; - FileName: string; - MaxRange: Integer; - MinRange: Integer; - PageCount: Integer; - PageNums: TdxPageNumbers; - PageRanges: TdxPageRanges; - Pages: string; - PrintToFile: Boolean; - StyleManager: TdxPrintStyleManager; - end; - - PdxPrintDlgData = ^TdxPrintDlgData; - TdxPrintDlgData = record - DialogData: TdxPrintDialogData; - Title: string; - HelpContext: THelpContext; - ButtonsEnabled: TdxPrintDlgButtons; - ButtonsVisible: TdxPrintDlgButtons; - OptionsEnabled: TdxPrintDlgOptions; - OptionsVisible: TdxPrintDlgOptions; - Events: TdxPrintDlgEvents; - IsCheckUserInput: Boolean; - PreviewBtnClicked: Boolean; - end; - - TdxPrintDialog = class(TComponent) - private - FButtonsEnabled: TdxPrintDlgButtons; - FButtonsVisible: TdxPrintDlgButtons; - FDialogData: TdxPrintDialogData; - FHelpContext: THelpContext; - FIsTitleAssigned: Boolean; - FOptionsEnabled: TdxPrintDlgOptions; - FOptionsVisible: TdxPrintDlgOptions; - FPreviewBtnClicked: Boolean; - FPrintBtnClicked: Boolean; - FTitle: string; - FUseFileList: Boolean; - FOnClose: TNotifyEvent; - FOnPageSetup: TdxPageSetupEvent; - FOnShow: TNotifyEvent; - function GetCollate: Boolean; - function GetCopies: Integer; - function GetFileList: TStrings; - function GetFileName: string; - function GetMaxRange: Integer; - function GetMinRange: Integer; - function GetPageCount: Integer; - function GetPageNums: TdxPageNumbers; - function GetPageRanges: TdxPageRanges; - function GetPages: string; - function GetPrintToFile: Boolean; - function GetStyleManager: TdxPrintStyleManager; - function GetTitle: string; - function IsTitleStored: Boolean; - procedure SetCollate(Value: Boolean); - procedure SetCopies(Value: Integer); - procedure SetFileList(Value: TStrings); - procedure SetFileName(const Value: string); - procedure SetMaxRange(Value: Integer); - procedure SetMinRange(Value: Integer); - procedure SetPageCount(Value: Integer); - procedure SetPageNums(Value: TdxPageNumbers); - procedure SetPageRanges(Value: TdxPageRanges); - procedure SetPages(const Value: string); - procedure SetPrintToFile(Value: Boolean); - procedure SetStyleManager(Value: TdxPrintStyleManager); - procedure SetTitle(const Value: string); - - procedure ReadIsTitleAssigned(Reader: TReader); - procedure WriteIsTitleAssigned(Writer: TWriter); - protected - procedure AssignTo(Dest: TPersistent); override; - procedure DefineProperties(Filer: TFiler); override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - function DefaultTitle: string; virtual; - function Execute: Boolean; - procedure RestoreDefaults; virtual; - procedure SetMinMaxRanges(AMinRange, AMaxRange: Integer); - - property DialogData: TdxPrintDialogData read FDialogData; - property FileList: TStrings read GetFileList write SetFileList; - property PageCount: Integer read GetPageCount write SetPageCount; - property PreviewBtnClicked: Boolean read FPreviewBtnClicked; - property PrintBtnClicked: Boolean read FPrintBtnClicked; - published - property ButtonsEnabled: TdxPrintDlgButtons read FButtonsEnabled write FButtonsEnabled - default [pdbPrinterProperties, pdbNetwork, pdbPreview, pdbPageSetup, pdbDefineStyles, pdbStyleOptions]; - property ButtonsVisible: TdxPrintDlgButtons read FButtonsVisible write FButtonsVisible - default [pdbPrinterProperties, pdbNetwork, pdbPreview, pdbPageSetup, pdbDefineStyles, pdbStyleOptions]; - property Collate: Boolean read GetCollate write SetCollate default False; - property Copies: Integer read GetCopies write SetCopies default 1; - property FileName: string read GetFileName write SetFileName; - property HelpContext: THelpContext read FHelpContext write FHelpContext default 0; - property MaxRange: Integer read GetMaxRange write SetMaxRange default 1; - property MinRange: Integer read GetMinRange write SetMinRange default 1; - property OptionsEnabled: TdxPrintDlgOptions read FOptionsEnabled write FOptionsEnabled - default [pdoPrintToFile, pdoAllPages, pdoPageRange]; - property OptionsVisible: TdxPrintDlgOptions read FOptionsVisible write FOptionsVisible - default [pdoPrintToFile, pdoAllPages, pdoCurrentPage, pdoPageRange]; - property PageNums: TdxPageNumbers read GetPageNums write SetPageNums default pnAll; - property PageRanges: TdxPageRanges read GetPageRanges write SetPageRanges default prAll; - property Pages: string read GetPages write SetPages; - property PrintToFile: Boolean read GetPrintToFile write SetPrintToFile default False; - property StyleManager: TdxPrintStyleManager read GetStyleManager write SetStyleManager; - property Title: string read GetTitle write SetTitle stored IsTitleStored; - property UseFileList: Boolean read FUseFileList write FUseFileList default False; - - property OnClose: TNotifyEvent read FOnClose write FOnClose; - property OnPageSetup: TdxPageSetupEvent read FOnPageSetup write FOnPageSetup; - property OnShow: TNotifyEvent read FOnShow write FOnShow; - end; - - TdxfmPrintDialog = class(TCustomdxPSForm) - ilPrinters: TImageList; - Panel1: TPanel; - btnPreview: TBitBtn; - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - pnlPrintStyles: TPanel; - gbxPrintStyles: TGroupBox; - lbxPrintStyles: TListBox; - btnPageSetup2: TButton; - btnDefineStyles: TButton; - pmPrintStyles: TPopupMenu; - miPageSetup: TMenuItem; - miDefineStyles: TMenuItem; - miLine1: TMenuItem; - pnlMiddle: TPanel; - gbxPageRange: TGroupBox; - lblDescription: TLabel; - rbtnAllPages: TRadioButton; - rbtnCurrentPage: TRadioButton; - rbtnPageRanges: TRadioButton; - edPageRanges: TEdit; - rbtnSelection: TRadioButton; - gbxCopies: TGroupBox; - chbxCollate: TCheckBox; - pnlTop: TPanel; - gbxPrinter: TGroupBox; - lblName: TLabel; - lblStatus: TLabel; - lblType: TLabel; - lblWhere: TLabel; - lblComment: TLabel; - lStatus: TLabel; - lType: TLabel; - lWhere: TLabel; - lComment: TLabel; - cbxPrinters: TComboBox; - btnPrinterProperties: TButton; - btnNetwork: TButton; - pnlPrintToFile: TPanel; - chbxPrintToFile: TCheckBox; - cbxFileName: TComboBox; - btnBrowse: TButton; - btnPageSetup: TBitBtn; - lblNumberOfCopies: TLabel; - bvlCopiesHolder: TBevel; - lblNumberOfPages: TLabel; - cbxNumberOfPages: TComboBox; - bvlPRWarningHolder: TBevel; - pbxCollate: TPaintBox; - procedure chbxCollateClick(Sender: TObject); - procedure btnPrinterPropertiesClick(Sender: TObject); - procedure cbxPrintersChange(Sender: TObject); - procedure chbxPrintToFileClick(Sender: TObject); - procedure edPageRangesChange(Sender: TObject); - procedure cbxNumberOfPagesChange(Sender: TObject); - procedure rbtnPagesClick(Sender: TObject); - procedure btnBrowseClick(Sender: TObject); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure edPageRangesExit(Sender: TObject); - procedure btnPreviewClick(Sender: TObject); - procedure btnPageSetupClick(Sender: TObject); - procedure edPageRangesKeyPress(Sender: TObject; var KEY: Char); - procedure lblNumberOfPagesClick(Sender: TObject); - procedure lblNumberOfCopiesClick(Sender: TObject); - procedure lblNameClick(Sender: TObject); - procedure btnNetworkClick(Sender: TObject); - procedure cbxPrintersDrawItem(Control: TWinControl; index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure seCopiesChange(Sender: TObject); - procedure seCopiesExit(Sender: TObject); - procedure PageSetup2Click(Sender: TObject); - procedure lbxPrintStylesDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure lbxPrintStylesClick(Sender: TObject); - procedure DefineStylesClick(Sender: TObject); - procedure pmPrintStylesPopup(Sender: TObject); - procedure cbxFileNameExit(Sender: TObject); - procedure pbxCollatePaint(Sender: TObject); - procedure pbxCollateDblClick(Sender: TObject); - private - FControlsUpdating: Boolean; - FDialogData: TdxPrintDialogData; - FGlyphs: array[Boolean] of TBitmap; - FIsCheckUserInput: Boolean; - FModified: Boolean; - FSubscriber: TdxEventSubscriber; - FPreviewBtnClicked: Boolean; - FPrintBtnClicked: Boolean; - FSaveDialogData: TdxPrintDialogData; - FseCopies: TdxPSSpinEdit; - FPrintStylesVisibled: Boolean; - FwpPageRanges: TdxPSWarningPane; - FOnClose: TNotifyEvent; - FOnPageSetup: TdxPageSetupEvent; - FOnShow: TNotifyEvent; - function CheckFileName(const FileName: string): Boolean; - procedure CheckModified; - function CheckPageRanges: Boolean; - function CheckUserInput: Boolean; - procedure ConnectToPrinterDlg; - procedure CreateControls; - procedure DocumentPropertiesDlg; - procedure DrawCollatedPages(DC: HDC; const ADrawRect: TRect; ACollate: Boolean); - function GetFileName(const S: string): string; - procedure LoadStrings; - procedure RefreshPrinterList; - procedure RefreshStyleList; - procedure SavePrintDialogData; - procedure SetActiveControl; - procedure SetupDialog(const APrintDlgData: TdxPrintDlgData); - procedure StartSettings; - procedure StyleListChanged(Sender: TObject); - procedure UpdateControlsState; - procedure UpdatePrinterInfos; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - protected - procedure CreateWnd; override; - procedure DoHide; override; - procedure DoShow; override; - - procedure DoPageSetup; dynamic; - procedure UpdatePrinters; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - procedure LoadFromRegistry(const APath: string); override; - procedure SaveToRegistry(const APath: string); override; - - function Execute: Boolean; - procedure ShowPrintStyles(AShow: Boolean); - - property PreviewBtnClicked: Boolean read FPreviewBtnClicked; - property OnPageSetup: TdxPageSetupEvent read FOnPageSetup write FOnPageSetup; - end; - -function dxPrintDialog(var AData: TdxPrintDlgData): Boolean; overload; - -implementation - -{$R *.DFM} - -uses - {$IFDEF DELPHI6} - Variants, - {$ENDIF} - WinSpool, Math, cxClasses, dxPSPopupMan, dxPSRes, dxPSEngn, dxPSEvnt, dxPSUtl, - dxPSImgs; - -const - sdxMaximized = 'Maximized'; // Don't Localize - -function dxPrintDialog(var AData: TdxPrintDlgData): Boolean; -var - Dialog: TdxfmPrintDialog; -begin - Dialog := TdxfmPrintDialog.Create(nil); - try - Dialog.SetupDialog(AData); - Result := Dialog.Execute; - if Result then - AData.DialogData := Dialog.FDialogData - else - AData.DialogData := Dialog.FSaveDialogData; - AData.PreviewBtnClicked := Dialog.PreviewBtnClicked; - finally - Dialog.Free; - end; -end; - -{ Memory Management Routines } - -function dxAllocMem(ASize: Integer): Pointer; -begin - Result := AllocMem(ASize); -end; - -procedure dxFreeMem(var P: Pointer; ASize: Integer); -begin - FreeMem(P, ASize); - P := nil; -end; - -{ TdxPrintDialog } - -constructor TdxPrintDialog.Create(AOwner: TComponent); -begin - inherited; - FillChar(FDialogData, SizeOf(TdxPrintDialogData), 0); - FDialogData.Copies := 1; - FDialogData.Collate := False; - FDialogData.FileList := TStringList.Create; - FDialogData.FileName := ''; - FDialogData.MaxRange := 1; - FDialogData.MinRange := 1; - FDialogData.PageCount := 0; - FDialogData.PageNums := pnAll; - FDialogData.PageRanges := prAll; - FDialogData.Pages := ''; - FDialogData.PrintToFile := False; - FDialogData.StyleManager := nil; - - FButtonsEnabled := pdbDefault; - FOptionsEnabled := pdoDefaultOptionsEnabled; - - FButtonsVisible := pdbDefault; - FOptionsVisible := pdoDefaultOptionsVisible; -end; - -destructor TdxPrintDialog.Destroy; -begin - FreeAndNil(FDialogData.FileList); - inherited; -end; - -function TdxPrintDialog.DefaultTitle: string; -begin - Result := cxGetResourceString(@sdxPrintDialogCaption); -end; - -function TdxPrintDialog.Execute: Boolean; -var - APrintDlgData: TdxPrintDlgData; - AEvents: TdxPrintDlgEvents; - ADialogData: TdxPrintDialogData; - ASaveStrings: TStrings; -begin - if dxPrintDevice.Printers.Count = 0 then - begin - MessageWarning(cxGetResourceString(@sdxPrintDialogNoPrinters)); - Result := False; - Exit; - end; - - FillChar(APrintDlgData, SizeOf(TdxPrintDlgData), 0); - FillChar(AEvents, SizeOf(TdxPrintDlgEvents), 0); - FillChar(ADialogData, SizeOf(TdxPrintDialogData), 0); - try - ADialogData.Copies := Copies; - ADialogData.Collate := Collate; - if UseFileList then - begin - ADialogData.FileList := TStringList.Create; - ADialogData.FileList.Assign(FileList); - end; - ADialogData.FileName := FileName; - ADialogData.MaxRange := MaxRange; - ADialogData.MinRange := MinRange; - ADialogData.PageCount := PageCount; - ADialogData.PageNums := PageNums; - ADialogData.PageRanges := PageRanges; - ADialogData.Pages := Pages; - ADialogData.PrintToFile := PrintToFile; - ADialogData.StyleManager := StyleManager; - - APrintDlgData.DialogData := ADialogData; - if APrintDlgData.HelpContext <> 0 then - APrintDlgData.HelpContext := HelpContext; - APrintDlgData.Title := Title; - APrintDlgData.IsCheckUserInput := not (csDesigning in ComponentState); - APrintDlgData.OptionsEnabled := OptionsEnabled; - APrintDlgData.OptionsVisible := OptionsVisible; - APrintDlgData.ButtonsEnabled := ButtonsEnabled; - APrintDlgData.ButtonsVisible := ButtonsVisible; - - AEvents.OnClose := OnClose; - AEvents.OnPageSetup := OnPageSetup; - AEvents.OnShow := OnShow; - - APrintDlgData.Events := AEvents; - - Result := dxPrintDialog(APrintDlgData); - if Result then - begin - ASaveStrings := FileList; - if UseFileList then - FileList := APrintDlgData.DialogData.FileList; - FDialogData := APrintDlgData.DialogData; - FDialogData.FileList := ASaveStrings; - end; - FPreviewBtnClicked := APrintDlgData.PreviewBtnClicked; - finally - if ADialogData.FileList <> nil then ADialogData.FileList.Free; - end; -end; - -procedure TdxPrintDialog.RestoreDefaults; -begin - ButtonsEnabled := pdbDefault; - ButtonsVisible := pdbDefault; - Collate := False; - Copies := 1; - MaxRange := 1; - MinRange := 1; - OptionsEnabled := pdoDefaultOptionsEnabled; - OptionsVisible := pdoDefaultOptionsVisible; - PageNums := pnAll; - PageRanges := prAll; - PrintToFile := False; - UseFileList := False; - FIsTitleAssigned := False; -end; - -procedure TdxPrintDialog.SetMinMaxRanges(AMinRange, AMaxRange: Integer); -begin - if AMinRange < 1 then AMinRange := 1; - if AMaxRange <> -1 then - if AMaxRange < AMinRange then AMaxRange := AMinRange; - FDialogData.MinRange := AMinRange; - FDialogData.MaxRange := AMaxRange; -end; - -procedure TdxPrintDialog.AssignTo(Dest: TPersistent); - - procedure XorOption(var AOptions: TPrintDialogOptions; AItem: TPrintDialogOption; AValue: Boolean); - begin - if AValue then - AOptions := AOptions + [AItem] - else - AOptions := AOptions - [AItem]; - end; - -var - PageIndexes: TIntegers; - SrcOptions: TPrintDialogOptions; -begin - if Dest is Dialogs.TPrintDialog then - with Dialogs.TPrintDialog(Dest) do - begin - Collate := Self.Collate; - Copies := Self.Copies; - MinPage := Self.MinRange; - MaxPage := Self.MaxRange; - if MakePageIndexes(Self.Pages, PageIndexes) then - try - FromPage := MinIntValue(PageIndexes); - ToPage := MaxIntValue(PageIndexes); - finally - SetLength(PageIndexes, 0); - end - else - begin - FromPage := 1; - ToPage := 1; - end; - - SrcOptions := Options; - XorOption(SrcOptions, poPrintToFile, pdoPrintToFile in Self.OptionsVisible); - XorOption(SrcOptions, poDisablePrintToFile, pdoPrintToFile in Self.OptionsEnabled); - XorOption(SrcOptions, poPageNums, - (pdoPageRange in Self.OptionsVisible) and (pdoPageRange in Self.OptionsEnabled)); - XorOption(SrcOptions, poSelection, - (pdoSelection in Self.OptionsVisible) and (pdoSelection in Self.OptionsEnabled)); - XorOption(SrcOptions, poHelp, - (pdbHelp in Self.ButtonsVisible) and (pdbHelp in Self.ButtonsEnabled)); - Options := SrcOptions; - - PrintToFile := Self.PrintToFile; - - if Self.PageRanges = prSelection then - PrintRange := Dialogs.prAllPages - else - PrintRange := TPrintRange(PageRanges); - end; -end; - -procedure TdxPrintDialog.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('IsTitleAssigned', ReadIsTitleAssigned, WriteIsTitleAssigned, - FIsTitleAssigned and (Title = '')); -end; - -procedure TdxPrintDialog.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited; - if (AComponent = StyleManager) and (Operation = opRemove) then - StyleManager := nil; -end; - -function TdxPrintDialog.GetPageCount: Integer; -begin - Result := FDialogData.PageCount; -end; - -function TdxPrintDialog.GetCollate: Boolean; -begin - Result := FDialogData.Collate; -end; - -function TdxPrintDialog.GetCopies: Integer; -begin - Result := FDialogData.Copies; -end; - -function TdxPrintDialog.GetFileList: TStrings; -begin - Result := FDialogData.FileList; -end; - -function TdxPrintDialog.GetFileName: string; -begin - Result := FDialogData.FileName; -end; - -function TdxPrintDialog.GetMaxRange: Integer; -begin - Result := FDialogData.MaxRange; -end; - -function TdxPrintDialog.GetMinRange: Integer; -begin - Result := FDialogData.MinRange; -end; - -function TdxPrintDialog.GetPageNums: TdxPageNumbers; -begin - Result := FDialogData.PageNums; -end; - -function TdxPrintDialog.GetPageRanges: TdxPageRanges; -begin - Result := FDialogData.PageRanges; -end; - -function TdxPrintDialog.GetPages: string; -begin - Result := FDialogData.Pages; -end; - -function TdxPrintDialog.GetPrintToFile: Boolean; -begin - Result := FDialogData.PrintToFile; -end; - -function TdxPrintDialog.GetStyleManager: TdxPrintStyleManager; -begin - Result := FDialogData.StyleManager; -end; - -function TdxPrintDialog.GetTitle: string; -begin - if FIsTitleAssigned then - Result := FTitle - else - Result := DefaultTitle; -end; - -function TdxPrintDialog.IsTitleStored: Boolean; -begin - Result := FIsTitleAssigned and (Title <> DefaultTitle); -end; - -procedure TdxPrintDialog.SetCollate(Value: Boolean); -begin - FDialogData.Collate := Value; -end; - -procedure TdxPrintDialog.SetCopies(Value: Integer); -begin - FDialogData.Copies := Value; -end; - -procedure TdxPrintDialog.SetFileList(Value: TStrings); -begin - FDialogData.FileList.Assign(Value); -end; - -procedure TdxPrintDialog.SetFileName(const Value: string); -begin - FDialogData.FileName := Value; -end; - -procedure TdxPrintDialog.SetMaxRange(Value: Integer); -begin - SetMinMaxRanges(MinRange, Value); -end; - -procedure TdxPrintDialog.SetMinRange(Value: Integer); -begin - SetMinMaxRanges(Value, MaxRange); -end; - -procedure TdxPrintDialog.SetPageCount(Value: Integer); -begin - if Value < 1 then Value := 1; - FDialogData.PageCount := Value; -end; - -procedure TdxPrintDialog.SetPageNums(Value: TdxPageNumbers); -begin - FDialogData.PageNums := Value; -end; - -procedure TdxPrintDialog.SetPageRanges(Value: TdxPageRanges); -begin - if FDialogData.PageRanges <> Value then - begin - case Value of - prAll: - begin - OptionsVisible := OptionsVisible + [pdoAllPages]; - OptionsEnabled := OptionsEnabled + [pdoAllPages]; - end; - prCurrent: - begin - OptionsVisible := OptionsVisible + [pdoCurrentPage]; - OptionsEnabled := OptionsEnabled + [pdoCurrentPage]; - end; - prRange: - begin - OptionsVisible := OptionsVisible + [pdoPageRange]; - OptionsEnabled := OptionsEnabled + [pdoPageRange]; - end; - prSelection: - begin - OptionsVisible := OptionsVisible + [pdoSelection]; - OptionsEnabled := OptionsEnabled + [pdoSelection]; - end; - end; - FDialogData.PageRanges := Value; - end; -end; - -procedure TdxPrintDialog.SetPages(const Value: string); -begin - FDialogData.Pages := Value; -end; - -procedure TdxPrintDialog.SetPrintToFile(Value: Boolean); -begin - FDialogData.PrintToFile := Value; -end; - -procedure TdxPrintDialog.SetStyleManager(Value: TdxPrintStyleManager); -begin - if FDialogData.StyleManager <> Value then - begin - FDialogData.StyleManager := Value; - if StyleManager <> nil then - StyleManager.FreeNotification(Self); - end; -end; - -procedure TdxPrintDialog.SetTitle(const Value: string); -begin - if Title <> Value then - begin - FTitle := Value; - FIsTitleAssigned := True; - end; -end; - -procedure TdxPrintDialog.ReadIsTitleAssigned(Reader: TReader); -begin - FIsTitleAssigned := Reader.ReadBoolean; -end; - -procedure TdxPrintDialog.WriteIsTitleAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsTitleAssigned); -end; - -{ utilities } - -function GetStatusString(Status: DWORD): string; -begin - case Status of - 0: - Result := cxGetResourceString(@sdxPrintDialogPSReady); - PRINTER_STATUS_PAUSED: - Result := cxGetResourceString(@sdxPrintDialogPSPaused); - PRINTER_STATUS_PENDING_DELETION: - Result := cxGetResourceString(@sdxPrintDialogPSPendingDeletion); - PRINTER_STATUS_BUSY: - Result := cxGetResourceString(@sdxPrintDialogPSBusy); - PRINTER_STATUS_DOOR_OPEN: - Result := cxGetResourceString(@sdxPrintDialogPSDoorOpen); - PRINTER_STATUS_ERROR: - Result := cxGetResourceString(@sdxPrintDialogPSError); - PRINTER_STATUS_INITIALIZING: - Result := cxGetResourceString(@sdxPrintDialogPSInitializing); - PRINTER_STATUS_IO_ACTIVE: - Result := cxGetResourceString(@sdxPrintDialogPSIOActive); - PRINTER_STATUS_MANUAL_FEED: - Result := cxGetResourceString(@sdxPrintDialogPSManualFeed); - PRINTER_STATUS_NO_TONER: - Result := cxGetResourceString(@sdxPrintDialogPSNoToner); - PRINTER_STATUS_NOT_AVAILABLE: - Result := cxGetResourceString(@sdxPrintDialogPSNotAvailable); - PRINTER_STATUS_OFFLINE: - Result := cxGetResourceString(@sdxPrintDialogPSOFFLine); - PRINTER_STATUS_OUT_OF_MEMORY: - Result := cxGetResourceString(@sdxPrintDialogPSOutOfMemory); - PRINTER_STATUS_OUTPUT_BIN_FULL: - Result := cxGetResourceString(@sdxPrintDialogPSOutBinFull); - PRINTER_STATUS_PAGE_PUNT: - Result := cxGetResourceString(@sdxPrintDialogPSPagePunt); - PRINTER_STATUS_PAPER_JAM: - Result := cxGetResourceString(@sdxPrintDialogPSPaperJam); - PRINTER_STATUS_PAPER_OUT: - Result := cxGetResourceString(@sdxPrintDialogPSPaperOut); - PRINTER_STATUS_PAPER_PROBLEM: - Result := cxGetResourceString(@sdxPrintDialogPSPaperProblem); - PRINTER_STATUS_PRINTING: - Result := cxGetResourceString(@sdxPrintDialogPSPrinting); - PRINTER_STATUS_PROCESSING: - Result := cxGetResourceString(@sdxPrintDialogPSProcessing); - PRINTER_STATUS_TONER_LOW: - Result := cxGetResourceString(@sdxPrintDialogPSTonerLow); - PRINTER_STATUS_USER_INTERVENTION: - Result := cxGetResourceString(@sdxPrintDialogPSUserIntervention); - PRINTER_STATUS_WAITING: - Result := cxGetResourceString(@sdxPrintDialogPSWaiting); - PRINTER_STATUS_WARMING_UP: - Result := cxGetResourceString(@sdxPrintDialogPSWarningUp); - else - Result := ''; - end; -end; - -{ TfmdxPrintDialog } - -constructor TdxfmPrintDialog.Create(AOwner: TComponent); -begin - inherited; - HelpContext := dxPSGlbl.dxhcPrintDlg; - FillChar(FDialogData, SizeOf(TdxPrintDialogData), 0); - FillChar(FSaveDialogData, SizeOf(TdxPrintDialogData), 0); - CreateControls; - FGlyphs[False] := CreateDoubleArrowBitmap(udgUp, 8); - FGlyphs[True] := CreateDoubleArrowBitmap(udgDown, 8); - - pmPrintStyles.Images := ilPrinters; - miPageSetup.ImageIndex := 4; - miDefineStyles.ImageIndex := 5; - - FSubscriber := TdxStyleListChangedSubscriber.Create([TdxSMStyleListChangedEvent]); - TdxStyleListChangedSubscriber(FSubscriber).OnStyleListChanged := StyleListChanged; - dxPSPopupMenuController.RegisterControl(lbxPrintStyles); -end; - -destructor TdxfmPrintDialog.Destroy; -begin - dxPSPopupMenuController.UnregisterControl(lbxPrintStyles); - FreeAndNil(FSubscriber); - FreeAndNil(FGlyphs[True]); - FreeAndNil(FGlyphs[False]); - inherited; -end; - -function TdxfmPrintDialog.Execute: Boolean; -begin - if dxPrintDevice.Printers.Count = 0 then - begin - MessageWarning(cxGetResourceString(@sdxPrintDialogNoPrinters)); - Result := False; - Exit; - end; - - StartSettings; - ShowPrintStyles(FPrintStylesVisibled and (FDialogData.StyleManager <> nil)); - if FDialogData.StyleManager <> nil then - TdxStyleListChangedSubscriber(FSubscriber).StyleListChanged(FDialogData.StyleManager); - SetActiveControl; - - Result := ShowModal = mrOk; -end; - -procedure TdxfmPrintDialog.CreateWnd; -begin - inherited; - if Icon.Handle = 0 then - Icon_LoadFromResourceName(Icon, IDB_DXPSPRINT); - SendMessage(Handle, WM_SETICON, 1, Icon.Handle); -end; - -procedure TdxfmPrintDialog.DoHide; -begin - if Assigned(FOnClose) then FOnClose(Self); - inherited; -end; - -procedure TdxfmPrintDialog.DoShow; -begin - inherited; - if Assigned(FOnShow) then FOnShow(Self); -end; - -procedure TdxfmPrintDialog.DoPageSetup; -var - Done: Boolean; -begin - if Assigned(FOnPageSetup) then - begin - Done := True; - try - FOnPageSetup(Self, Done, @FPreviewBtnClicked, nil);//@FPrintBtnClicked); - except - Application.HandleException(Self); - end; - if Done then - begin - UpdatePrinterInfos; - CheckModified; - btnCancel.Caption := cxGetResourceString(@sdxBtnClose); - end; - if FPreviewBtnClicked then ModalResult := mrOK; - end; -end; - -procedure TdxfmPrintDialog.UpdatePrinters; -begin - RefreshPrinterList; - UpdatePrinterInfos; - if dxPrintDevice.Printers.Count > 0 then - dxPrintDevice.PrinterIndex := -1 - else - cbxPrinters.Enabled := False; - Invalidate; -end; - -procedure TdxfmPrintDialog.cbxPrintersDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - with TComboBox(Control), TdxPrintDeviceInfo(Items.Objects[Index]) do - dxDrawPrinter(Canvas, Rect, Items[Index], ilPrinters, Ord(IsNetwork) + 2 * Ord(IsDefault)); -end; - -procedure TdxfmPrintDialog.chbxCollateClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - FDialogData.Collate := TCheckBox(Sender).Checked; - pbxCollate.Invalidate; - CheckModified; -end; - -procedure TdxfmPrintDialog.btnPrinterPropertiesClick(Sender: TObject); -begin - if dxPrintDevice.Printing then - MessageWarning(cxGetResourceString(@sdxPrintDialogInPrintingState)) - else - DocumentPropertiesDlg; -end; - -procedure TdxfmPrintDialog.cbxPrintersChange(Sender: TObject); -var - PrevCursor: TCursor; -begin - if FControlsUpdating then Exit; - PrevCursor := Screen.Cursor; - Screen.Cursor := crHourGlass; - try - dxPrintDevice.PrinterIndex := TComboBox(Sender).ItemIndex; - finally - Screen.Cursor := PrevCursor; - end; - btnCancel.Caption := cxGetResourceString(@sdxBtnClose); - UpdatePrinterInfos; - CheckModified; -end; - -procedure TdxfmPrintDialog.chbxPrintToFileClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - FDialogData.PrintToFile := TCheckBox(Sender).Checked; - if TCheckBox(Sender).Checked and (cbxFileName.Items.Count > 0) then - cbxFileName.ItemIndex := 0; - CheckModified; - if TCheckBox(Sender).Checked then ActiveControl := btnBrowse; -end; - -procedure TdxfmPrintDialog.edPageRangesChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - if ActiveControl = Sender then rBtnPageRanges.Checked := True; - CheckModified; -end; - -procedure TdxfmPrintDialog.cbxNumberOfPagesChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - FDialogData.PageNums := TdxPageNumbers(TComboBox(Sender).ItemIndex); - CheckModified; -end; - -procedure TdxfmPrintDialog.seCopiesChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - CheckModified; -end; - -procedure TdxfmPrintDialog.seCopiesExit(Sender: TObject); -begin - FDialogData.Copies := TdxPSSpinEdit(Sender).AsInteger; -end; - -procedure TdxfmPrintDialog.rbtnPagesClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - FDialogData.PageRanges := TdxPageRanges(TTagToInt(TRadioButton(Sender).Tag)); - CheckModified; - if Sender = rbtnPageRanges then - begin - if ActiveControl <> edPageRanges then - begin - ActiveControl := edPageRanges; - edPageRanges.SelectAll; - end; - end - else - begin - edPageRanges.Text := ''; - FwpPageRanges.State := False; - end; -end; - -procedure TdxfmPrintDialog.btnBrowseClick(Sender: TObject); -var - OpenDialog: TOpenDialog; -begin - OpenDialog := TOpenDialog.Create(nil); - try - with OpenDialog do - begin - Title := cxGetResourceString(@sdxPrintDialogOpenDlgTitle); - Filter := Format('%s (*.*)|*.*|%s (*.prn)|*.PRN', - [cxGetResourceString(@sdxPrintDialogOpenDlgAllFiles), - cxGetResourceString(@sdxPrintDialogOpenDlgPrinterFiles)]); - FilterIndex := 2; - DefaultExt := 'prn'; - FileName := cbxFileName.Text; - if Execute then - cbxFileName.Text := FileName; - end; - finally - OpenDialog.Free; - end; -end; - -procedure TdxfmPrintDialog.FormCloseQuery(Sender: TObject; var CanClose: Boolean); -begin - if ModalResult = mrOk then - begin - if FIsCheckUserInput then CanClose := CheckUserInput; - if CanClose then SavePrintDialogData; - end; -end; - -procedure TdxfmPrintDialog.cbxFileNameExit(Sender: TObject); -var - S: string; -begin - S := StringReplace(TComboBox(Sender).Text, ' ', '', [rfReplaceAll, rfIgnoreCase]); - FDialogData.FileName := GetFileName(S); -end; - -procedure TdxfmPrintDialog.edPageRangesExit(Sender: TObject); -var - b: Boolean; -begin - with TEdit(Sender) do - Text := StringReplace(Text, ' ', '', [rfReplaceAll, rfIgnoreCase]); - FDialogData.Pages := TEdit(Sender).Text; - if rbtnAllPages.Checked or rbtnCurrentPage.Checked or rbtnSelection.Checked or - (rbtnAllPages = ActiveControl) or (rbtnCurrentPage = ActiveControl) or - (rbtnSelection = ActiveControl) then - FwpPageRanges.State := False - else - begin - try - // order is very important because there is a possibility of rising exception in CheckPageRanges - b := CheckPageRanges or (FDialogData.MaxRange = -1); - if not b then - FwpPageRanges.Hint := Format(cxGetResourceString(@sdxPrintDialogPageNumbersOutOfRange), - [FDialogData.MinRange, FDialogData.MaxRange]); - except - b := False; - FwpPageRanges.Hint := Format(cxGetResourceString(@sdxPrintDialogInvalidPageRanges), [edPageRanges.Text]); - end; - if not b and not FwpPageRanges.State and (ActiveControl <> btnOK) and (ActiveControl <> btnCancel) then - Beep; - FwpPageRanges.State := not b; - end; -end; - -procedure TdxfmPrintDialog.edPageRangesKeyPress(Sender: TObject; var Key: Char); - - function IsValidKey(AKey: Char): Boolean; - begin - Result := dxCharInSet(AKey, ['0'..'9']); - if not Result and (Text <> '') then - Result := (AKey = cPageSeparator) or (AKey = cPageRangeSeparator) or (AKey = Char(VK_BACK)); - end; - -begin - if not IsValidKey(Key) then - begin - MessageBeep(MB_ICONHAND); - Key := #0; - end; -end; - -procedure TdxfmPrintDialog.btnPreviewClick(Sender: TObject); -begin - FPreviewBtnClicked := True; - ModalResult := mrCancel; // mrOK ??? -end; - -procedure TdxfmPrintDialog.ShowPrintStyles(AShow: Boolean); -begin - if pnlPrintStyles.Visible <> AShow then - begin - pnlPrintStyles.Visible := AShow; - btnPageSetup.Glyph := FGlyphs[not pnlPrintStyles.Visible]; - Height := Height + (-1 + 2 * Byte(pnlPrintStyles.Visible)) * pnlPrintStyles.Height; - end; -end; - -procedure TdxfmPrintDialog.btnPageSetupClick(Sender: TObject); -begin - if FDialogData.StyleManager <> nil then - ShowPrintStyles(not pnlPrintStyles.Visible) - else - DoPageSetup; -end; - -procedure TdxfmPrintDialog.lblNumberOfPagesClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxfmPrintDialog.lblNumberOfCopiesClick(Sender: TObject); -begin - TLabel(Sender).FocusControl.SetFocus; -end; - -procedure TdxfmPrintDialog.lblNameClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxfmPrintDialog.btnNetworkClick(Sender: TObject); -begin - Self.ConnectToPrinterDlg; - UpdateControlsState; -end; - -procedure TdxfmPrintDialog.lbxPrintStylesDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - with TListBox(Control) do - dxPSDrawStyleItem(TBasedxPrintStyle(Items.Objects[Index]), TListBox(Control), - Index, State, Rect, True, False); -end; - -procedure TdxfmPrintDialog.lbxPrintStylesClick(Sender: TObject); -begin - with lbxPrintStyles do - FDialogData.StyleManager.CurrentStyle := TBasedxPrintStyle(Items.Objects[ItemIndex]); - btnCancel.Caption := cxGetResourceString(@sdxBtnClose); -end; - -procedure TdxfmPrintDialog.DefineStylesClick(Sender: TObject); -var - PrintBtnClicked: Boolean; -begin - FDialogData.StyleManager.DefinePrintStylesDlg(FPreviewBtnClicked, PrintBtnClicked); - btnCancel.Caption := cxGetResourceString(@sdxBtnClose); - if FPreviewBtnClicked then ModalResult := mrOK; -end; - -procedure TdxfmPrintDialog.PageSetup2Click(Sender: TObject); -var - Index: Integer; - Style: TBasedxPrintStyle; -begin - Index := lbxPrintStyles.ItemIndex; - if Index <> -1 then - begin - Style := TBasedxPrintStyle(lbxPrintStyles.Items.Objects[Index]); - if Style.PageSetup(0, True, True, FPreviewBtnClicked, FPrintBtnClicked) then - btnCancel.Caption := cxGetResourceString(@sdxBtnClose); - if FPreviewBtnClicked then ModalResult := mrOK; - end; -end; - -procedure TdxfmPrintDialog.pmPrintStylesPopup(Sender: TObject); -begin - miPageSetup.Enabled := btnPageSetup2.Enabled; -end; - -procedure TdxfmPrintDialog.SaveToRegistry(const APath: string); -begin - inherited; - if FDialogData.StyleManager <> nil then - with TRegistry.Create do - try - if OpenKey(APath, True) then - try - WriteBool(sdxMaximized, pnlPrintStyles.Visible); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Free; - end; -end; - -procedure TdxfmPrintDialog.LoadFromRegistry(const APath: string); -begin - inherited; - with TRegistry.Create do - try - if OpenKey(APath, False) and ValueExists(sdxMaximized) then - try - FPrintStylesVisibled := ReadBool(sdxMaximized); - except - on ERegistryException do - { ignore } - else - raise; - end; - finally - Free; - end; -end; - -procedure TdxfmPrintDialog.pbxCollateDblClick(Sender: TObject); -begin - chbxCollate.Checked := not chbxCollate.Checked; -end; - -procedure TdxfmPrintDialog.pbxCollatePaint(Sender: TObject); -var - DC: HDC; - R: TRect; -begin - with TPaintBox(Sender) do - begin - DC := Canvas.Handle; - SelectObject(DC, Font.Handle); - SetTextColor(DC, GetSysColor(COLOR_WINDOWTEXT)); - R := ClientRect; - end; - SetBkMode(DC, TRANSPARENT); - DrawCollatedPages(DC, R, FDialogData.Collate); - SelectClipRgn(DC, 0); -end; - -function TdxfmPrintDialog.CheckFileName(const FileName: string): Boolean; -begin - Result := ValidateFileName(FileName) -end; - -procedure TdxfmPrintDialog.CheckModified; -begin - if not FModified then FModified := True; - UpdateControlsState; -end; - -function TdxfmPrintDialog.CheckPageRanges: Boolean; -var - PageIndexes: TIntegers; -begin - Result := MakePageIndexes(edPageRanges.Text, PageIndexes) and - (MinIntValue(PageIndexes) >= FDialogData.MinRange) and - (MaxIntValue(PageIndexes) <= FDialogData.MaxRange); -end; - -function TdxfmPrintDialog.CheckUserInput: Boolean; -var - FileName: string; - RealFileName: string; -begin - Result := True; - if chbxPrintToFile.Checked then - begin - FileName := cbxFileName.Text; - Result := Length(Filename) > 0; - if Result then - begin - if (Length(FileName) > 2) and (FileName[1] = '"') and (FileName[Length(FileName)] = '"') then - FileName := Copy(FileName, 2, Length(FileName) - 2); - Result := CheckFileName(Filename); - if Result then - begin - RealFileName := GetFileName(cbxFileName.Text); - Result := not FileExists(RealFileName); - if not Result then - Result := MessageQuestion(Format(cxGetResourceString(@sdxConfirmOverWrite), [RealFileName])) - end - else - MessageWarning(Format(cxGetResourceString(@sdxInvalidFileName), [FileName])); - end - else - MessageWarning(cxGetResourceString(@sdxRequiredFileName)); - if not Result then ActiveControl := cbxFileName; - Exit; - end; - if rBtnPageRanges.Checked then - begin - Result := Length(edPageRanges.Text) > 0; - if Result then - try - // Because there is possibility of exception raising in CheckPageRanges that order is very important - Result := CheckPageRanges or (FDialogData.MaxRange = -1); - if not Result then - MessageWarning(Format(cxGetResourceString(@sdxPrintDialogPageNumbersOutOfRange), - [FDialogData.MinRange, FDialogData.MaxRange])); - except - MessageWarning(Format(cxGetResourceString(@sdxPrintDialogInvalidPageRanges), [edPageRanges.Text])); - Result := False; - end - else - MessageWarning(cxGetResourceString(@sdxPrintDialogRequiredPageNumbers)); - if not Result then ActiveControl := edPageRanges; - end; -end; - -procedure TdxfmPrintDialog.ConnectToPrinterDlg; -begin - if dxConnectToNetPrinter(Self.Handle) then - begin - RefreshPrinterList; - cbxPrintersChange(cbxPrinters); - btnCancel.Caption := cxGetResourceString(@sdxBtnClose); - end; -end; - -procedure TdxfmPrintDialog.CreateControls; -begin - FseCopies := TdxPSSpinEdit.Create(Self); - with FseCopies do - begin - Parent := gbxCopies; - BoundsRect := bvlCopiesHolder.BoundsRect; - MinValue := 0; - MaxValue := MaxInt; - OnChange := seCopiesChange; - OnExit := seCopiesExit; - Flat := False; - TabOrder := cbxNumberOfPages.TabOrder + 1; - end; - lblNumberOfCopies.FocusControl := FseCopies; - - FwpPageRanges := TdxPSWarningPane.Create(Self); - FwpPageRanges.Parent := gbxPageRange; - FwpPageRanges.BoundsRect := bvlPRWarningHolder.BoundsRect; -end; - -procedure TdxfmPrintDialog.DocumentPropertiesDlg; -begin - dxPrintDevice.Copies := FseCopies.AsInteger; - dxPrintDevice.Collate := chbxCollate.Checked; - if dxDocumentProperties(Handle) then - begin - FseCopies.AsInteger := dxPrintDevice.Copies; - chbxCollate.Checked := dxPrintDevice.Collate; - UpdatePrinterInfos; - CheckModified; - btnCancel.Caption := cxGetResourceString(@sdxBtnClose); - end; -end; - -procedure TdxfmPrintDialog.DrawCollatedPages(DC: HDC; const ADrawRect: TRect; ACollate: Boolean); - - procedure DrawPages(const APageRect: TRect; const AOffsets: TPoint; - ADistance: Integer; ACollate: Boolean); - - procedure DrawPage(var R: TRect; const S: string); - var - Size: TSize; - begin - DrawEdge(DC, R, BDR_RAISEDOUTER, BF_LEFT or BF_TOP or BF_FLAT); - DrawEdge(DC, R, BDR_RAISEDOUTER, BF_RIGHT or BF_BOTTOM); - InflateRect(R, -1, -1); - - DrawEdge(DC, R, BDR_SUNKENINNER, BF_RIGHT or BF_BOTTOM); - Dec(R.Right); - Dec(R.Bottom); - FillRect(DC, R, GetSysColorBrush(COLOR_WINDOW)); - - Inc(R.Right); - Inc(R.Bottom); - InflateRect(R, 1, 1); - GetTextExtentPoint32(DC, PChar(S), Length(S), Size); - TextOut(DC, R.Right - Size.cX - 2, R.Bottom - Size.cY - 1, PChar(S), Length(S)); - with R do - ExcludeClipRect(DC, Left, Top, Right, Bottom); - end; - - procedure DrawPageColumn(var R: TRect; Index, Count: Integer); - var - I: Integer; - S: string; - begin - if not ACollate then - S := IntToStr(Index + 1); - for I := 0 to Count - 1 do - begin - if ACollate then - S := IntToStr(I + 1); - DrawPage(R, S); - OffsetRect(R, AOffsets.X, -AOffsets.Y); - end; - end; - - var - I, C: Integer; - R: TRect; - begin - C := 2 + Byte(ACollate); - for I := 0 to 2 - Byte(ACollate) do - begin - R := APageRect; - OffsetRect(R, I * ADistance, 0); - DrawPageColumn(R, I, C); - end; - end; - -const - PageWidth = 19; - PageHeight = 24; - Offsets: TPoint = (X: 10; Y: 8); -var - R: TRect; - W, H, Distance, ShiftX, ShiftY: Integer; -begin - R := Rect(0, 0, PageWidth, PageHeight); - W := ADrawRect.Right - ADrawRect.Left; - H := ADrawRect.Bottom - ADrawRect.Top; - ShiftX := ((W div (3 - Byte(ACollate))) - (PageWidth + Offsets.X * (1 + Byte(ACollate)))) div 2; - ShiftY := ((H - PageHeight + Offsets.Y * (1 + Byte(ACollate))) div 2); - OffsetRect(R, ShiftX, ShiftY); - Distance := W div (3 - Byte(ACollate)); - DrawPages(R, Offsets, Distance, ACollate); -end; - -function TdxfmPrintDialog.GetFileName(const S: string): string; -begin - if S <> '' then - if (S[1] = '"') and (S[Length(S)] = '"') then - Result := Copy(S, 2, Length(S) - 2) - else - Result := ChangeFileExt(S, '.prn') - else - Result := ''; -end; - -procedure TdxfmPrintDialog.LoadStrings; - - procedure AdjustControls; - - function CalculateLeftBound: Integer; - begin - Result := lblName.Width; - if Result < lblStatus.Width then - Result := lblStatus.Width; - if Result < lblType.Width then - Result := lblType.Width; - if Result < lblWhere.Width then - Result := lblWhere.Width; - if Result < lblComment.Width then - Result := lblComment.Width; - - Inc(Result, lblStatus.Left + 10); - end; - - var - LeftBound, RightBound: Integer; - begin - LeftBound := CalculateLeftBound; - - RightBound := cbxPrinters.Left + cbxPrinters.Width; - cbxPrinters.Left := LeftBound; - cbxPrinters.Width := RightBound - LeftBound; - - lStatus.Left := LeftBound; - lType.Left := LeftBound; - lWhere.Left := LeftBound; - lComment.Left := LeftBound; - end; - -var - Index: Integer; -begin - Caption := cxGetResourceString(@sdxPrintDialogCaption); - gbxPrinter.Caption := cxGetResourceString(@sdxPrintDialogPrinter); - - lblName.Caption := cxGetResourceString(@sdxPrintDialogName); - lblStatus.Caption := cxGetResourceString(@sdxPrintDialogStatus); - lblType.Caption := cxGetResourceString(@sdxPrintDialogType); - lblWhere.Caption := cxGetResourceString(@sdxPrintDialogWhere); - lblComment.Caption := cxGetResourceString(@sdxPrintDialogComment); - AdjustControls; - chbxPrintToFile.Caption := cxGetResourceString(@sdxPrintDialogPrintToFile); - - gbxPageRange.Caption := cxGetResourceString(@sdxPrintDialogPageRange); - rbtnAllPages.Caption := cxGetResourceString(@sdxPrintDialogAll); - rbtnCurrentPage.Caption := cxGetResourceString(@sdxPrintDialogCurrentPage); - rbtnSelection.Caption := cxGetResourceString(@sdxPrintDialogSelection); - rBtnPageRanges.Caption := cxGetResourceString(@sdxPrintDialogPages); - lblDescription.Caption := cxGetResourceString(@sdxPrintDialogRangeLegend); - gbxCopies.Caption := cxGetResourceString(@sdxPrintDialogCopies); - - lblNumberOfPages.Caption := cxGetResourceString(@sdxPrintDialogNumberOfPages); - Index := cbxNumberOfPages.ItemIndex; - with cbxNumberOfPages.Items do - begin - BeginUpdate; - try - Clear; - Add(cxGetResourceString(@sdxPrintDialogAllPages)); - Add(cxGetResourceString(@sdxPrintDialogEvenPages)); - Add(cxGetResourceString(@sdxPrintDialogOddPages)); - finally - EndUpdate; - end; - end; - cbxNumberOfPages.ItemIndex := Index; - - lblNumberOfCopies.Caption := cxGetResourceString(@sdxPrintDialogNumberOfCopies); - chbxCollate.Caption := cxGetResourceString(@sdxPrintDialogCollateCopies); - - btnPrinterProperties.Caption := cxGetResourceString(@sdxBtnProperties); - btnNetwork.Caption := cxGetResourceString(@sdxBtnNetwork); - btnBrowse.Caption := cxGetResourceString(@sdxBtnBrowse); - btnPageSetup.Caption := cxGetResourceString(@sdxBtnPageSetup); - btnPreview.Caption := cxGetResourceString(@sdxBtnPreview); - btnOK.Caption := DropEndEllipsis(cxGetResourceString(@sdxBtnPrint)); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - - gbxPrintStyles.Caption := cxGetResourceString(@sdxPrintDialogPrintStyles); - btnPageSetup2.Caption := cxGetResourceString(@sdxBtnPageSetup); - btnDefineStyles.Caption := cxGetResourceString(@sdxBtnDefinePrintStyles); - miPageSetup.Caption := cxGetResourceString(@sdxBtnPageSetup); - miDefineStyles.Caption := cxGetResourceString(@sdxBtnDefinePrintStyles); -end; - -procedure TdxfmPrintDialog.RefreshPrinterList; -begin - with cbxPrinters do - begin - dxGetPrinterList(Items); - if Items.Count > 0 then - ItemIndex := dxPrintDevice.PrinterIndex; - end; -end; - -procedure TdxfmPrintDialog.RefreshStyleList; -var - I: Integer; - AStyle: TBasedxPrintStyle; -begin - with lbxPrintStyles do - begin - Items.BeginUpdate; - try - Items.Clear; - for I := 0 to FDialogData.StyleManager.Count - 1 do - begin - AStyle := FDialogData.StyleManager[I]; - Items.AddObject(AStyle.StyleCaption, AStyle); - end; - ItemIndex := Items.IndexOfObject(FDialogData.StyleManager.CurrentStyle); - finally - Items.EndUpdate; - end; - end; -end; - -procedure TdxfmPrintDialog.SavePrintDialogData; -var - Index: Integer; -begin - with FDialogData do - begin - Pages := StringReplace(edPageRanges.Text, ' ', '', [rfReplaceAll, rfIgnoreCase]); - FileName := GetFileName(Trim(cbxFileName.Text)); - if FileList <> nil then - begin - Index := FileList.IndexOf(FileName); - if Index = -1 then - FileList.Insert(0, FDialogData.FileName) - else - FileList.Exchange(0, Index); - end; - end; -end; - -procedure TdxfmPrintDialog.SetActiveControl; -begin - if FseCopies.CanFocus then - ActiveControl := FseCopies - else - if cbxNumberOfPages.CanFocus then - ActiveControl := cbxNumberOfPages - else - if btnOK.CanFocus then - ActiveControl := btnOK; -end; - -procedure TdxfmPrintDialog.SetupDialog(const APrintDlgData: TdxPrintDlgData); -begin -// FModified := False; - FControlsUpdating := True; - try - FSaveDialogData := APrintDlgData.DialogData; - FDialogData := FSaveDialogData; - - FIsCheckUserInput := APrintDlgData.IsCheckUserInput; - - with APrintDlgData do - begin - { visible } - btnPrinterProperties.Visible := pdbPrinterProperties in ButtonsVisible; - btnNetwork.Visible := (pdbNetwork in ButtonsVisible) and not IsWin9X; - chbxPrintToFile.Visible := pdoPrintToFile in OptionsVisible; - cbxFileName.Visible := pdoPrintToFile in OptionsVisible; - btnBrowse.Visible := pdoPrintToFile in OptionsVisible; - - rbtnAllPages.Visible := pdoAllPages in OptionsVisible; - rbtnCurrentPage.Visible := pdoCurrentPage in OptionsVisible; - rbtnSelection.Visible := pdoSelection in OptionsVisible; - rbtnPageRanges.Visible := pdoPageRange in OptionsVisible; - lblDescription.Visible := rBtnPageRanges.Visible; - edPageRanges.Visible := pdoPageRange in OptionsVisible; - gbxPageRange.Visible := rbtnAllPages.Visible or rbtnCurrentPage.Visible or - rbtnSelection.Visible or rbtnPageRanges.Visible; - - btnPageSetup2.Visible := pdbPageSetup in ButtonsVisible; - btnDefineStyles.Visible := pdbDefineStyles in ButtonsVisible; - - btnPageSetup.Visible := pdbPageSetup in ButtonsVisible; - btnPreview.Visible := pdbPreview in ButtonsVisible; - btnHelp.Visible := pdbHelp in ButtonsVisible; - if btnPreview.Visible and not btnPageSetup.Visible then - btnPreview.BoundsRect := btnPageSetup.BoundsRect; - - if not (pdoPrintToFile in OptionsVisible) then - begin - pnlPrintToFile.Visible := False; - pnlTop.Height := pnlTop.Height - pnlPrintToFile.Height; - Height := Height - pnlPrintToFile.Height; - end; - if (DialogData.StyleManager = nil) or not (pdoPrintStyles in OptionsVisible) then - begin - pnlPrintStyles.Visible := False; - Height := Height - pnlPrintStyles.Height; - end; - - {enable} - if btnPrinterProperties.Visible then - btnPrinterProperties.Enabled := pdbPrinterProperties in ButtonsEnabled; - if btnNetwork.Visible then - btnNetwork.Enabled := dxPSUtl.IsNetworkPresent and (pdbNetwork in ButtonsEnabled); - if chbxPrintToFile.Visible then - chbxPrintToFile.Enabled := pdoPrintToFile in OptionsEnabled; - if cbxFileName.Visible then - begin - cbxFileName.Enabled := pdoPrintToFile in OptionsEnabled; - if DialogData.FileList <> nil then - cbxFileName.Items := DialogData.FileList; - cbxFileName.ItemIndex := 0; -// cbxFileName.Text := DialogData.FileName; - end; - if btnBrowse.Visible then - btnBrowse.Enabled := pdoPrintToFile in OptionsEnabled; - if rbtnAllPages.Visible then - rbtnAllPages.Enabled := pdoAllPages in OptionsEnabled; - if rbtnCurrentPage.Visible then - rbtnCurrentPage.Enabled := pdoCurrentPage in OptionsEnabled; - if rbtnSelection.Visible then - rbtnSelection.Enabled := pdoSelection in OptionsEnabled; - if rBtnPageRanges.Visible then - rBtnPageRanges.Enabled := pdoPageRange in OptionsEnabled; - if edPageRanges.Visible then - edPageRanges.Enabled := pdoPageRange in OptionsEnabled; - if lblDescription.Visible then - lblDescription.Enabled := rBtnPageRanges.Enabled; - if edPageRanges.Enabled and edPageRanges.Visible then - edPageRanges.Text := DialogData.Pages; - - if btnPageSetup.Visible then - btnPageSetup.Enabled := pdbPageSetup in ButtonsEnabled; - if btnPreview.Visible then - btnPreview.Enabled := pdbPreview in ButtonsEnabled; - if btnHelp.Visible then - btnHelp.Enabled := pdbHelp in ButtonsEnabled; - - Caption := Title; - - FOnClose := Events.OnClose; - FOnShow := Events.OnShow; - FOnPageSetup := Events.OnPageSetup; - end; - finally - UpdateControlsState; - FControlsUpdating := False; - end; -end; - -procedure TdxfmPrintDialog.StartSettings; -begin - FModified := False; - FControlsUpdating := True; - try - LoadStrings; - RefreshPrinterList; - - chbxPrintToFile.Checked := FDialogData.PrintToFile; - rbtnAllPages.Checked := FDialogData.PageRanges = prAll; - rbtnCurrentPage.Checked := FDialogData.PageRanges = prCurrent; - rbtnPageRanges.Checked := FDialogData.PageRanges = prRange; - rbtnSelection.Checked := FDialogData.PageRanges = prSelection; - edPageRanges.Text := FDialogData.Pages; - cbxNumberOfPages.ItemIndex := Integer(FDialogData.PageNums); - FseCopies.AsInteger := FDialogData.Copies; - chbxCollate.Checked := FDialogData.Collate; - if FDialogData.StyleManager <> nil then - begin - btnPageSetup.Caption := cxGetResourceString(@sdxBtnPrintStyles); - btnPageSetup.Glyph := FGlyphs[not pnlPrintStyles.Visible]; - end - else - if Assigned(FOnPageSetup) then - begin - btnPageSetup.Caption := cxGetResourceString(@sdxBtnPageSetup); - btnPageSetup.Glyph := nil; - end; - cbxPrinters.Enabled := cbxPrinters.Items.Count > 0; -// if cbxPrinters.Enabled then cbxPrinters.ItemIndex := 0; - if btnPrinterProperties.Visible and btnPrinterProperties.Enabled then - btnPrinterProperties.Enabled := cbxPrinters.Items.Count > 0; - - btnHelp.Visible := HelpContext <> 0; - if HelpContext = 0 then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - end; - finally - UpdatePrinterInfos; - UpdateControlsState; - FControlsUpdating := False; - end; -end; - -procedure TdxfmPrintDialog.StyleListChanged(Sender: TObject); -begin - if Sender = FDialogData.StyleManager then - begin - RefreshStyleList; - UpdateControlsState; - end; -end; - -procedure TdxfmPrintDialog.UpdateControlsState; -begin - cbxFileName.Enabled := chbxPrintToFile.Enabled and chbxPrintToFile.Visible and chbxPrintToFile.Checked; - if chbxPrintToFile.Checked then - cbxFileName.Color := clWindow - else - cbxFileName.Color := clBtnFace; - btnBrowse.Enabled := cbxFileName.Enabled; - btnPageSetup2.Enabled := lbxPrintStyles.ItemIndex <> -1; - cbxPrinters.Enabled := dxPrintDevice.Printers.Count > 0; // 2.2 - if cbxPrinters.Items.Count > 0 then // 2.2 - cbxPrinters.ItemIndex := dxPrintDevice.PrinterIndex; // 2.2 - btnOK.Enabled := (dxPrintDevice.Printers.Count > 0) or chbxPrintToFile.Checked; -end; - -procedure TdxfmPrintDialog.UpdatePrinterInfos; -const - SizeReserved = 1000; -var - PBuffer: Pointer; {PPrinterInfo2} - PrinterInfo2: TPrinterInfo2; - Size: DWORD; - PrinterHandle: THandle; -begin - try - if WinSpool.OpenPrinter(dxPrintDevice.CurrentDevice, PrinterHandle, nil) then - try - WinSpool.GetPrinter(PrinterHandle, 2, nil, 0, @Size); - if Size > 0 then - begin - Inc(Size, SizeReserved); - PBuffer := dxAllocMem(Size); - if PBuffer <> nil then - try - if WinSpool.GetPrinter(PrinterHandle, 2, PBuffer, Size, @Size) then - begin - PrinterInfo2 := PPrinterInfo2(PBuffer)^; - - if PrinterInfo2.cJobs > 0 then - lStatus.Caption := Format(cxGetResourceString(@sdxPrintDialogPSPrintingAndWaiting), [PrinterInfo2.cJobs]) - else - lStatus.Caption := GetStatusString(PrinterInfo2.Status); - - if (dxPrintDevice.DeviceMode <> nil) and (PrinterInfo2.pDevMode <> nil) then - PrinterInfo2.pDevMode^ := dxPrintDevice.DeviceMode^; - - if PrinterInfo2.Status = 0 then - lStatus.Font.Color := Font.Color - else - lStatus.Font.Color := clHighlight; - - lType.Caption := StrPas(PrinterInfo2.pDriverName); - lWhere.Caption := StrPas(PrinterInfo2.pPortName); - lWhere.AutoSize := lWhere.Left + lWhere.Width < gbxPrinter.ClientWidth; - if not lWhere.AutoSize then - lWhere.Width := gbxPrinter.ClientWidth - lWhere.Left - 4; - - lComment.Caption := StrPas(PrinterInfo2.pComment); - end; - finally - dxFreeMem(PBuffer, Size); - end; - end; - finally - ClosePrinter(PrinterHandle); - end; - FseCopies.MaxValue := dxPrintDevice.MaxCopies; - FseCopies.MinValue := 1; - except - Application.HandleException(Self); - end; -end; - -procedure TdxfmPrintDialog.CMDialogChar(var Message: TCMDialogChar); -begin - inherited; - if IsAccel(Message.CharCode, gbxPrintStyles.Caption) then - begin - ActiveControl := lbxPrintStyles; - Message.Result := 1; - end; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxPrnPg.pas b/internal/x.46/ExpressPrinting System/Sources/dxPrnPg.pas deleted file mode 100644 index 8501453b..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxPrnPg.pas +++ /dev/null @@ -1,1689 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPrnPg; - -interface - -{$I cxVer.inc} - -uses - Classes, SysUtils, Windows, Controls, Graphics, Dialogs, CommDlg, Messages, - dxBase, dxPSGlbl, dxPSUtl, dxWrap, dxPrnDev, dxBkgnd, cxDrawTextUtils; - -type - TdxHFPageType = (ptHeader, ptFooter); - TdxMeasurementUnits = (muDefault, muInches, muMillimeters); - TdxPageTitlePart = (tpLeft, tpCenter, tpRight); - TdxPageTitleParts = set of TdxPageTitlePart; - TdxScaleMode = (smAdjust, smFit); - TdxMarginType = (mtLeft, mtTop, mtRight, mtBottom, mtHeader, mtFooter); - TdxMarginTypes = set of TdxMarginType; - TdxPrinterPageUpdateCode = (ucMarginLeft, ucMarginTop, ucMarginRight, ucMarginBottom, - ucMarginHeader, ucMarginFooter, ucScale); - TdxPrinterPageUpdateCodes = set of TdxPrinterPageUpdateCode; - -const - mtAll: TdxMarginTypes = - [mtLeft, mtTop, mtRight, mtBottom, mtHeader, mtFooter]; - ucAll = [ucMarginLeft, ucMarginTop, ucMarginRight, ucMarginBottom, ucMarginHeader, ucMarginFooter, ucScale]; - ucMargins = [ucMarginLeft, ucMarginTop, ucMarginRight, ucMarginBottom, ucMarginHeader, ucMarginFooter]; - uaMarginsVert = [ucMarginLeft, ucMarginRight]; - uaMarginsHorz = [ucMarginTop, ucMarginBottom]; - - dxDefaultDMPaper = Windows.DMPAPER_FIRST; - dxDefaultPaperSource = Windows.DMBIN_AUTO; - -type - TdxPrinterPage = class; - - TdxPrinterPageObjectClass = class of TdxPrinterPageObject; - - TdxPrinterPageObject = class(TdxBaseObject) - private - FBackground: TdxBackground; - FPage: TdxPrinterPage; - procedure SetBackground(Value: TdxBackground); - protected - procedure DoAssign(Source: TdxBaseObject); override; - procedure LockUpdate(ALockState: TdxLockState); override; - - procedure Changed; dynamic; - - function CreateBackground: TdxBackground; virtual; - function GetBackgroundClass: TdxBackgroundClass; virtual; - procedure InitializeBackground(ABackground: TdxBackground); virtual; - - property Background: TdxBackground read FBackground write SetBackground; - property Page: TdxPrinterPage read FPage; - public - constructor Create; override; - destructor Destroy; override; - end; - - TCustomdxPageObjectClass = class of TCustomdxPageObject; - - TCustomdxPageObject = class(TdxPrinterPageObject) - private - FDefaultFont: TFont; - FFont: TFont; - FTextAlignY: array[TdxPageTitlePart] of TcxTextAlignY; - FTitles: array[TdxPageTitlePart] of TStrings; - function GetPartialTextAlignY(Index: Integer): TcxTextAlignY; - function GetPartialTitle(Index: Integer): TStrings; - function GetTextAlignY(Index: TdxPageTitlePart): TcxTextAlignY; - function GetTitle(Index: TdxPageTitlePart): TStrings; - function IsFontStored: Boolean; - procedure SetPartialTextAlignY(Index: Integer; Value: TcxTextAlignY); - procedure SetPartialTitle(Index: Integer; Value: TStrings); - procedure SetFont(Value: TFont); - procedure SetTextAlignY(Index: TdxPageTitlePart; Value: TcxTextAlignY); - procedure SetTitle(Index: TdxPageTitlePart; Value: TStrings); - - procedure FontChanged(Sender: TObject); - procedure TitleChanged(Sender: TObject); - - procedure FreeAndNilTitles; - protected - procedure DoAssign(Source: TdxBaseObject); override; - procedure InitializeDefaultFont(AFont: TFont); virtual; - function IsTitleStored(Index: Integer): Boolean; virtual; - public - constructor Create; override; - destructor Destroy; override; - - function DefaultFont: TFont; virtual; - - property CenterTextAlignY: TcxTextAlignY Index 1 read GetPartialTextAlignY write SetPartialTextAlignY default taCenterY; - property CenterTitle: TStrings Index 1 read GetPartialTitle write SetPartialTitle stored IsTitleStored; - property Font: TFont read FFont write SetFont stored IsFontStored; - property LeftTextAlignY: TcxTextAlignY Index 0 read GetPartialTextAlignY write SetPartialTextAlignY default taCenterY; - property LeftTitle: TStrings Index 0 read GetPartialTitle write SetPartialTitle stored IsTitleStored; - property Page; - property RightTextAlignY: TcxTextAlignY Index 2 read GetPartialTextAlignY write SetPartialTextAlignY default taCenterY; - property RightTitle: TStrings Index 2 read GetPartialTitle write SetPartialTitle stored IsTitleStored; - property TextAlignY[Index: TdxPageTitlePart]: TcxTextAlignY read GetTextAlignY write SetTextAlignY; - property Titles[Index: TdxPageTitlePart]: TStrings read GetTitle write SetTitle; default; - published - property Background; - end; - - TdxPageFooterClass = class of TdxPageFooter; - - TdxPageFooter = class(TCustomdxPageObject) - protected - function IsTitleStored(Index: Integer): Boolean; override; - published - property CenterTextAlignY; - property CenterTitle; - property Font; - property LeftTextAlignY; - property LeftTitle; - property RightTextAlignY; - property RightTitle; - end; - - TdxPageHeaderClass = class of TdxPageHeader; - - TdxPageHeader = class(TCustomdxPageObject) - protected - function IsTitleStored(Index: Integer): Boolean; override; - published - property CenterTextAlignY; - property CenterTitle; - property Font; - property LeftTextAlignY; - property LeftTitle; - property RightTextAlignY; - property RightTitle; - end; - - TdxPrinterPageClass = class of TdxPrinterPage; - - TdxPrinterPage = class(TdxPrinterPageObject) - private - FAssigning: Boolean; - FAutoSwapMargins: Boolean; - FCenterOnPageH: Boolean; - FCenterOnPageV: Boolean; - FDMPaper: Integer; - FFitToPagesByTall: Integer; - FFitToPagesByWide: Integer; - FGrayShading: Boolean; - FHFG: TdxRectWrapper; - FLastMU: TdxMeasurementUnits; - FMargins: TdxRectWrapper; - FMeasurementUnits: TdxMeasurementUnits; - FMinMargins: TdxRectWrapper; - FOrientation: TdxPrinterOrientation; - FPageFooter: TdxPageFooter; - FPageHeader: TdxPageHeader; - FPageOrder: TdxPageOrder; - FPageSize: TdxPointWrapper; - FPageSizeLocked: Boolean; - FPaperSource: Integer; - FReverseTitlesOnEvenPages: Boolean; - FScaleFactor: Integer; - FScaleMode: TdxScaleMode; - FOnChange: TNotifyEvent; - FOnMarginChange: TNotifyEvent; - function GetCanSwapMargins: Boolean; - function GetHFG(index: Integer): Integer; - function GetRealMeasurementUnits: TdxMeasurementUnits; - function GetRealPageSize: TPoint; - function GetRestPageSizeX: Integer; - function GetRestPageSizeY: Integer; - function IsMinMarginsStored: Boolean; - function IsPageSizeStored: Boolean; - procedure SetDMPaper(Value: Integer); - procedure SetFitToPagesByTall(Value: Integer); - procedure SetFitToPagesByWide(Value: Integer); - procedure SetHFG(index: Integer; Value: Integer); - procedure SetMargins(Value: TdxRectWrapper); - procedure SetMeasurementUnits(Value: TdxMeasurementUnits); - procedure SetMinMargins(Value: TdxRectWrapper); - procedure SetOrientation(Value: TdxPrinterOrientation); - procedure SetPageFooter(Value: TdxPageFooter); - procedure SetPageHeader(Value: TdxPageHeader); - procedure SetPageSize(Value: TdxPointWrapper); - procedure SetPaperSource(Value: Integer); - procedure SetRealPageSize(const Value: TPoint); - procedure SetScaleFactor(Value: Integer); - - procedure HFGChanged(Sender: TObject; ASides: TdxRectSides); - procedure HFGChanging(Sender: TObject; ASides: TdxRectSides; var Values: array of Integer); - procedure LockUpdated(Sender: TdxBaseObject; ALockState: TdxLockState); - procedure MarginsChanged(Sender: TObject; ASides: TdxRectSides); - procedure MarginsChanging(Sender: TObject; ASides: TdxRectSides; var Values: array of Integer); - procedure MinMarginsChanged(Sender: TObject; ASides: TdxRectSides); - procedure MinMarginsChanging(Sender: TObject; ASides: TdxRectSides; var Values: array of Integer); - procedure PageSizeChanged(Sender: TObject; ACoords: TdxPointCoords); - procedure PageSizeChanging(Sender: TObject; ACoords: TdxPointCoords; var Values: array of Integer); - - procedure ReadLastMU(Reader: TReader); - procedure ReadMU(Reader: TReader); - procedure WriteLastMU(Writer: TWriter); - procedure WriteMU(Writer: TWriter); - - procedure DoSwapMargins; - procedure FindDMPaperByPageSize; - procedure FixMargins; - procedure FixMinMargins; - function IsLoading: Boolean; - procedure SetPaperSizeByDMPaper; - protected - constructor CreateInstance(Dummy: Integer = 0); - procedure DefineProperties(Filer: TFiler); override; - - procedure Changed; override; - procedure DoAssign(Source: TdxBaseObject); override; - function GetSupportsScaling: Boolean; virtual; - function IsDefaultDMPaperSelected: Boolean; - function IsPageFooterTitleStored(Index: Integer): Boolean; virtual; - function IsPageHeaderTitleStored(Index: Integer): Boolean; virtual; - procedure MarginChanged; dynamic; - procedure PageParamsChanged(AUpdateCodes: TdxPrinterPageUpdateCodes); virtual; - - function CreatePageFooter: TdxPageFooter; virtual; - function GetPageFooterClass: TdxPageFooterClass; virtual; - procedure InitializePageFooter(APageFooter: TdxPageFooter); virtual; - - function CreatePageHeader: TdxPageHeader; virtual; - function GetPageHeaderClass: TdxPageHeaderClass; virtual; - procedure InitializePageHeader(APageHeader: TdxPageHeader); virtual; - - procedure DoUpdateMeasurementUnits; - procedure ReadPrinterInfos; - procedure SynchronizeMeasurementUnits; - - property CanSwapMargins: Boolean read GetCanSwapMargins; - property RestPageSizeX: Integer read GetRestPageSizeX; - property RestPageSizeY: Integer read GetRestPageSizeY; - property SupportsScaling: Boolean read GetSupportsScaling; - public - constructor Create; override; - destructor Destroy; override; - function GetNamePath: string; override; - - procedure ApplyToPrintDevice; - procedure InitFromPrintDevice; - procedure FixMarginsOutside; - function GetInnerMeasurementUnits: TdxMeasurementUnits; - procedure GetRealMinMargins(var AMinLeft, AMinRight, AMinTop, AMinBottom: Integer); - function IsEqual(ABaseObject: TdxBaseObject): Boolean; override; - procedure RestoreDefaults; - - procedure MapRect2LoMetric(var R: TRect); - function FooterLoMetric: Integer; - function FooterRect: TRect; - function FooterRectLoMetric: TRect; - function HeaderLoMetric: Integer; - function HeaderRect: TRect; - function HeaderRectLoMetric: TRect; - function MarginsLoMetric: TRect; - function MinMarginsLoMetric: TRect; - function MinPrintableArea: Integer; - function MinPrintableAreaLoMetric: Integer; - function PageSizeLoMetric: TPoint; - function PageSizePixels: TPoint; - function PaintRectLoMetric: TRect; - function PaintRectPixels: TRect; - function RealPageSizeLoMetric: TPoint; - function RealPageSizePixels: TPoint; - function ValidateMargins: Boolean; - - property RealMeasurementUnits: TdxMeasurementUnits read GetRealMeasurementUnits; - property RealPageSize: TPoint read GetRealPageSize write SetRealPageSize; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - property OnMarginChange: TNotifyEvent read FOnMarginChange write FOnMarginChange; - published - property AutoSwapMargins: Boolean read FAutoSwapMargins write FAutoSwapMargins default True; - property Background; - property CenterOnPageH: Boolean read FCenterOnPageH write FCenterOnPageH default False; - property CenterOnPageV: Boolean read FCenterOnPageV write FCenterOnPageV default False; - property DMPaper: Integer read FDMPaper write SetDMPaper{ default dxDefaultDMPaper}; { DMPAPER_FIRST = DMPAPER_LETTER } - property FitToPagesByTall: Integer read FFitToPagesByTall write SetFitToPagesByTall default 1; - property FitToPagesByWide: Integer read FFitToPagesByWide write SetFitToPagesByWide default 1; - property Footer: Integer index 3 read GetHFG write SetHFG default 0; - property GrayShading: Boolean read FGrayShading write FGrayShading default False; - property Header: Integer index 1 read GetHFG write SetHFG default 0; - property Margins: TdxRectWrapper read FMargins write SetMargins; - property MeasurementUnits: TdxMeasurementUnits read FMeasurementUnits write SetMeasurementUnits stored False default muDefault; - property MinMargins: TdxRectWrapper read FMinMargins write SetMinMargins stored IsMinMarginsStored; - property Orientation: TdxPrinterOrientation read FOrientation write SetOrientation default poPortrait; - property PageFooter: TdxPageFooter read FPageFooter write SetPageFooter; - property PageHeader: TdxPageHeader read FPageHeader write SetPageHeader; - property PageOrder: TdxPageOrder read FPageOrder write FPageOrder default poOverThenDown; - property PageSize: TdxPointWrapper read FPageSize write SetPageSize stored IsPageSizeStored; - property PaperSource: Integer read FPaperSource write SetPaperSource default dxDefaultPaperSource; { DMBIN_AUTO = 7 } - property ReverseTitlesOnEvenPages: Boolean read FReverseTitlesOnEvenPages write FReverseTitlesOnEvenPages default False; - property ScaleFactor: Integer read FScaleFactor write SetScaleFactor default 100; - property ScaleMode: TdxScaleMode read FScaleMode write FScaleMode default smAdjust; - end; - -function DefaultPrinterPage: TdxPrinterPage; -function GetDefaultMeasurementUnits: TdxMeasurementUnits; -procedure RereadDefaultPrinterPage; - -const - dxPSPageTitlePartMap: array[0..2] of TdxPageTitlePart = (tpLeft, tpCenter, tpRight); - dxPSDefaltHFFontColor = clBlack; - dxPSDefaltHFFontName = 'Tahoma'; - dxPSDefaltHFFontSize = 8; - dxPSDefaltHFFontStyle = []; - - dxDefaultHFFont = dxPSDefaltHFFontName; // for backward compatibility - -implementation - -uses - Forms, dxPPAttr; - -const - dxMinScaleFactor = 10; - dxMaxScaleFactor = 500; - -var - FDefaultPrinterPage: TdxPrinterPage = nil; - -function DefaultPrinterPage: TdxPrinterPage; -begin - if FDefaultPrinterPage = nil then - FDefaultPrinterPage := TdxPrinterPage.CreateInstance(0); - Result := FDefaultPrinterPage; -end; - -procedure RereadDefaultPrinterPage; -begin - DefaultPrinterPage.ReadPrinterInfos; -end; - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} -{$ENDIF} - -function GetDefaultMeasurementUnits: TdxMeasurementUnits; -const - MeasurementUintsMap: array[Boolean] of TdxMeasurementUnits = (muInches, muMillimeters); -begin - Result := MeasurementUintsMap[GetLocaleChar(LOCALE_USER_DEFAULT, LOCALE_IMEASURE, '0') = '0']; -end; - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM ON} -{$ENDIF} - -function MMToInch(Value: Integer): Integer; -begin - Result := MulDiv(Value, 10, 254); - Result := 100 * Round(Result / 100); // PS 3.01 -end; - -function InchToMM(Value: Integer): Integer; -begin - Result := MulDiv(Value, 254, 10); - Result := 10 * Round(Result / 10); // PS 3.01 -end; - -function Pt_MMToInch(const Value: TPoint): TPoint; -begin - Result.X := MMToInch(Value.X); - Result.Y := MMToInch(Value.Y); -end; - -function Pt_InchToMM(const Value: TPoint): TPoint; -begin - Result.X := InchToMM(Value.X); - Result.Y := InchToMM(Value.Y); -end; - -function Rect_MMToInch(const Value: TRect): TRect; -begin - Result.Left := MMToInch(Value.Left); - Result.Right := MMToInch(Value.Right); - Result.Bottom := MMToInch(Value.Bottom); - Result.Top := MMToInch(Value.Top); -end; - -function Rect_InchToMM(const Value: TRect): TRect; -begin - Result.Left := InchToMM(Value.Left); - Result.Top := InchToMM(Value.Top); - Result.Right := InchToMM(Value.Right); - Result.Bottom := InchToMM(Value.Bottom); -end; - -procedure GetDefaultPageInfo(out AMargins: TRect; out AHeader, AFooter: Integer; - out APageSize: TPoint; out ADMPaper: Integer; out AOrientation: TdxPrinterOrientation); -var - Index: Integer; -begin - AOrientation := poPortrait; - - ADMPaper := dxPrnDev.dxGetDefaultDMPaper; - Index := dxPPAttr.Papers.FindByDMPaper(ADMPaper); - if Index = -1 then - begin - ADMPaper := dxDefaultDMPaper; - Index := dxPPAttr.Papers.FindByDMPaper(ADMPaper); - end; - - AMargins := dxDefaultInitialMargins; - AHeader := dxDefaultInitialHeader; - AFooter := dxDefaultInitialFooter; - APageSize.X := 100 * dxPPAttr.Papers[Index].Size.X; - APageSize.Y := 100 * dxPPAttr.Papers[Index].Size.Y; - - if GetDefaultMeasurementUnits = muInches then - begin - AMargins := Rect_MMToInch(AMargins); - AHeader := MMToInch(AHeader); - AFooter := MMToInch(AFooter); - APageSize.X := MulDiv(APageSize.X, 10, 254); - APageSize.Y := MulDiv(APageSize.Y, 10, 254); - end; -end; - -type - TdxPageBackground = class(TdxBackground) - private - FPageObject: TdxPrinterPageObject; - protected - procedure DoChange(AChangeWhats: TdxBackgroundParams); override; - public - property PageObject: TdxPrinterPageObject read FPageObject; - end; - -procedure TdxPageBackground.DoChange(AChangeWhats: TdxBackgroundParams); -begin - inherited; - if PageObject <> nil then PageObject.Changed; -end; - -{ TdxPrinterPageObject } - -constructor TdxPrinterPageObject.Create; -begin - inherited; - FBackground := CreateBackground; -end; - -destructor TdxPrinterPageObject.Destroy; -begin - FreeAndNil(FBackground); - inherited; -end; - -procedure TdxPrinterPageObject.DoAssign(Source: TdxBaseObject); -begin - inherited; - Background := TdxPrinterPageObject(Source).Background; -end; - -procedure TdxPrinterPageObject.LockUpdate(ALockState: TdxLockState); -begin - inherited; - if ALockState = lsUnLock then Changed; -end; - -procedure TdxPrinterPageObject.Changed; -begin - if (UpdateCount = 0) and (Page <> nil) then Page.Changed; -end; - -function TdxPrinterPageObject.CreateBackground: TdxBackground; -begin - Result := GetBackgroundClass.Create; - InitializeBackground(Result); -end; - -function TdxPrinterPageObject.GetBackgroundClass: TdxBackgroundClass; -begin - Result := TdxPageBackground; -end; - -procedure TdxPrinterPageObject.InitializeBackground(ABackground: TdxBackground); -begin - TdxPageBackground(ABackground).FPageObject := Self; -end; - -procedure TdxPrinterPageObject.SetBackground(Value: TdxBackground); -begin - Background.Assign(Value); -end; - -{ TCustomdxPageObject } - -constructor TCustomdxPageObject.Create; -var - I: TdxPageTitlePart; -begin - inherited; - for I := Low(TdxPageTitlePart) to High(TdxPageTitlePart) do - begin - FTitles[I] := TStringList.Create; - TStringList(FTitles[I]).OnChange := TitleChanged; - FTextAlignY[I] := taCenterY; - end; - FFont := TFont.Create; - FFont.Assign(DefaultFont); - FFont.OnChange := FontChanged; -end; - -destructor TCustomdxPageObject.Destroy; -begin - FreeAndNilTitles; - FreeAndNil(FFont); - FreeAndNil(FDefaultFont); - inherited; -end; - -function TCustomdxPageObject.DefaultFont: TFont; -begin - if FDefaultFont = nil then - begin - FDefaultFont := TFont.Create; - InitializeDefaultFont(FDefaultFont); - end; - Result := FDefaultFont; -end; - -procedure TCustomdxPageObject.DoAssign(Source: TdxBaseObject); -var - I: TdxPageTitlePart; -begin - inherited; - with TCustomdxPageObject(Source) do - begin - for I := Low(TdxPageTitlePart) to High(TdxPageTitlePart) do - begin - Self.Titles[I] := Titles[I]; - Self.FTextAlignY[I] := FTextAlignY[I]; - end; - Self.Font := Font; - end; -end; - -procedure TCustomdxPageObject.InitializeDefaultFont(AFont: TFont); -begin - AFont.Color := dxPSDefaltHFFontColor; - AFont.Name := dxPSDefaltHFFontName; - AFont.Size := dxPSDefaltHFFontSize; - AFont.Style := dxPSDefaltHFFontStyle; -end; - -function TCustomdxPageObject.IsTitleStored(Index: Integer): Boolean; -begin - Result := True; -end; - -function TCustomdxPageObject.GetPartialTextAlignY(Index: Integer): TcxTextAlignY; -begin - Result := TextAlignY[TdxPageTitlePart(Index)]; -end; - -function TCustomdxPageObject.GetPartialTitle(Index: Integer): TStrings; -begin - Result := Titles[TdxPageTitlePart(Index)]; -end; - -function TCustomdxPageObject.GetTextAlignY(Index: TdxPageTitlePart): TcxTextAlignY; -begin - Result := FTextAlignY[Index]; -end; - -function TCustomdxPageObject.GetTitle(Index: TdxPageTitlePart): TStrings; -begin - Result := FTitles[Index]; -end; - -function TCustomdxPageObject.IsFontStored: Boolean; -begin - Result := not dxPSUtl.dxAreFontsEqual(Font, DefaultFont); -end; - -procedure TCustomdxPageObject.SetFont(Value: TFont); -begin - Font.Assign(Value); -end; - -procedure TCustomdxPageObject.SetPartialTextAlignY(Index: Integer; Value: TcxTextAlignY); -begin - TextAlignY[TdxPageTitlePart(Index)] := Value; -end; - -procedure TCustomdxPageObject.SetPartialTitle(Index: Integer; Value: TStrings); -begin - Titles[TdxPageTitlePart(Index)] := Value; -end; - -procedure TCustomdxPageObject.SetTextAlignY(Index: TdxPageTitlePart; Value: TcxTextAlignY); -begin - if FTextAlignY[Index] <> Value then - begin - FTextAlignY[Index] := Value; - Changed; - end; -end; - -procedure TCustomdxPageObject.SetTitle(Index: TdxPageTitlePart; Value: TStrings); -begin - Titles[Index].Assign(Value); -end; - -procedure TCustomdxPageObject.FontChanged(Sender: TObject); -begin - Changed; -end; - -procedure TCustomdxPageObject.TitleChanged(Sender: TObject); -begin - Changed; -end; - -procedure TCustomdxPageObject.FreeAndNilTitles; -var - I: TdxPageTitlePart; -begin - for I := Low(TdxPageTitlePart) to High(TdxPageTitlePart) do - FreeAndNil(FTitles[I]); -end; - -{ TdxPageFooter } - -function TdxPageFooter.IsTitleStored(Index: Integer): Boolean; -begin - if Page <> nil then - Result := Page.IsPageFooterTitleStored(Index) - else - Result := inherited IsTitleStored(Index); -end; - -{ TdxPageHooter } - -function TdxPageHeader.IsTitleStored(Index: Integer): Boolean; -begin - if Page <> nil then - Result := Page.IsPageHeaderTitleStored(Index) - else - Result := inherited IsTitleStored(Index); -end; - -{ TdxPrinterPage } - -constructor TdxPrinterPage.Create; -begin - CreateInstance(0); - if FDefaultPrinterPage = nil then RereadDefaultPrinterPage; - RestoreDefaults; - - OnLockUpdate := LockUpdated; - FMargins.OnChanged := MarginsChanged; - FMargins.OnChanging := MarginsChanging; - FHFG.OnChanging := HFGChanging; - FHFG.OnChanged := HFGChanged; - FMinMargins.OnChanging := MinMarginsChanging; - FMinMargins.OnChanged := MinMarginsChanged; - FPageSize.OnChanging := PageSizeChanging; - FPageSize.OnChanged := PageSizeChanged; -end; - -destructor TdxPrinterPage.Destroy; -begin - FreeAndNil(FMargins); - FreeAndNil(FMinMargins); - FreeAndNil(FHFG); - FreeAndNil(FPageSize); - FreeAndNil(FPageHeader); - FreeAndNil(FPageFooter); - inherited; -end; - -function TdxPrinterPage.GetNamePath: string; -begin - Result := ClassName; -end; - -procedure TdxPrinterPage.ApplyToPrintDevice; -begin - if dxPrnDev.dxInitPrintDevice(False) then - begin - dxPrnDev.dxPrintDevice.ColorMode := not GrayShading; - dxPrnDev.dxPrintDevice.Orientation := Orientation; - dxPrnDev.dxPrintDevice.SelectPaper(DMPaper); - if DMPaper >= DMPAPER_USER then - with TdxPaperInfo(dxPrnDev.dxPrintDevice.Papers.Objects[dxPrnDev.dxPrintDevice.PaperIndex]) do - begin - Width := PageSizeLoMetric.X; - Height := PageSizeLoMetric.Y; - end; - dxPrnDev.dxPrintDevice.SelectBin(PaperSource); - end; -end; - -procedure TdxPrinterPage.InitFromPrintDevice; -begin - GrayShading := not Boolean(dxPrnDev.dxPrintDevice.ColorMode); - Orientation := dxPrnDev.dxPrintDevice.Orientation; -end; - -procedure TdxPrinterPage.FixMarginsOutside; -var - AMinLeft, AMinRight, AMinTop, AMinBottom: Integer; -begin - GetRealMinMargins(AMinLeft, AMinRight, AMinTop, AMinBottom); - BeginUpdate; - try - if Header < AMinTop then - Header := AMinTop; - if Footer < AMinBottom then - Footer := AMinBottom; - if Margins.Left < AMinLeft then - Margins.Left := AMinLeft; - if Margins.Right < AMinRight then - Margins.Right := AMinRight; - FixMargins; - finally - EndUpdate; - end; -end; - -function TdxPrinterPage.GetInnerMeasurementUnits: TdxMeasurementUnits; -begin - if MeasurementUnits = muDefault then - Result := GetDefaultMeasurementUnits - else - Result := MeasurementUnits; -end; - -procedure TdxPrinterPage.GetRealMinMargins(var AMinLeft, AMinRight, AMinTop, AMinBottom: Integer); -begin - AMinLeft := 0; - AMinRight := 0; - AMinTop := 0; - AMinBottom := 0; - if dxInitPrintDevice(False) then - begin - AMinLeft := - MulDiv(dxPrintDevice.PhysOffsetX, 1000, GetDeviceCaps(dxPrintDevice.Handle, LOGPIXELSX)); - AMinTop := - MulDiv(dxPrintDevice.PhysOffsetY, 1000, GetDeviceCaps(dxPrintDevice.Handle, LOGPIXELSY)); - case Page.GetInnerMeasurementUnits of - muInches:; - muMillimeters: - begin - AMinLeft := MulDiv(AMinLeft, 254, 10); - AMinTop := MulDiv(AMinTop, 254, 10); - end; - end; - AMinRight := AMinLeft; - AMinBottom := AMinTop; - end; - if MinMargins.Left > AMinLeft then - AMinLeft := MinMargins.Left; - if MinMargins.Right > AMinRight then - AMinRight := MinMargins.Right; - if MinMargins.Top > AMinTop then - AMinTop := MinMargins.Top; - if MinMargins.Bottom > AMinBottom then - AMinBottom := MinMargins.Bottom; -end; - -function TdxPrinterPage.IsEqual(ABaseObject: TdxBaseObject): Boolean; -begin - Result := inherited IsEqual(ABaseObject) and - FBackground.IsEqual(TdxPrinterPage(ABaseObject).Background) and - (CenterOnPageH = TdxPrinterPage(ABaseObject).CenterOnPageH) and - (CenterOnPageV = TdxPrinterPage(ABaseObject).CenterOnPageV) and - (PageOrder = TdxPrinterPage(ABaseObject).PageOrder) and - (GrayShading = TdxPrinterPage(ABaseObject).GrayShading) and - (ScaleFactor = TdxPrinterPage(ABaseObject).ScaleFactor) and - (ReverseTitlesOnEvenPages = TdxPrinterPage(ABaseObject).ReverseTitlesOnEvenPages) and - FMargins.IsEqual(TdxPrinterPage(ABaseObject).Margins.Rect) and - FMinMargins.IsEqual(TdxPrinterPage(ABaseObject).MinMargins.Rect) and - PageSize.IsEqual(TdxPrinterPage(ABaseObject).PageSize.Point) and - (MeasurementUnits = TdxPrinterPage(ABaseObject).MeasurementUnits) and - (Orientation = TdxPrinterPage(ABaseObject).Orientation) and - (DMPaper = TdxPrinterPage(ABaseObject).DMPaper) and - (PaperSource = TdxPrinterPage(ABaseObject).PaperSource) and - PageHeader.IsEqual(TdxPrinterPage(ABaseObject).PageHeader) and - PageFooter.IsEqual(TdxPrinterPage(ABaseObject).PageFooter) and - FHFG.IsEqual(TdxPrinterPage(ABaseObject).FHFG.Rect); -end; - -procedure TdxPrinterPage.RestoreDefaults; -begin - if (Self <> FDefaultPrinterPage) and (FDefaultPrinterPage <> nil) then - Assign(DefaultPrinterPage); -end; - -procedure TdxPrinterPage.MapRect2LoMetric(var R: TRect); -begin - case GetInnerMeasurementUnits of - muInches: - R := dxPSUtl.ScaleRect(Rect_InchToMM(R), 1, 100, 1, 100); - muMillimeters: - R := dxPSUtl.ScaleRect(R, 1, 100, 1, 100); - end; -end; - -function TdxPrinterPage.FooterLoMetric: Integer; -begin - case GetInnerMeasurementUnits of - muInches: - Result := MulDiv(InchToMM(Footer), 1, 100); - else {muMillimeters} - Result := MulDiv(Footer, 1, 100); - end; -end; - -function TdxPrinterPage.FooterRect: TRect; -begin - Result := Rect(Margins.Left, RealPageSize.Y - Margins.Bottom, - RealPageSize.X - Margins.Right, RealPageSize.Y - Footer); -end; - -function TdxPrinterPage.FooterRectLoMetric: TRect; -begin - Result := FooterRect; - MapRect2LoMetric(Result); -end; - -function TdxPrinterPage.HeaderLoMetric: Integer; -begin - case GetInnerMeasurementUnits of - muInches: - Result := MulDiv(InchToMM(Header), 1, 100); - else {muMillimeters} - Result := MulDiv(Header, 1, 100); - end; -end; - -function TdxPrinterPage.HeaderRect: TRect; -begin - Result := Rect(Margins.Left, Header, RealPageSize.X - Margins.Right, Margins.Top); -end; - -function TdxPrinterPage.HeaderRectLoMetric: TRect; -begin - Result := HeaderRect; - MapRect2LoMetric(Result); -end; - -function TdxPrinterPage.MarginsLoMetric: TRect; -begin - case GetInnerMeasurementUnits of - muInches: - Result := ScaleRect(Rect_InchToMM(Margins.Rect), 1, 100, 1, 100); - else {muMillimeters} - Result := ScaleRect(Margins.Rect, 1, 100, 1, 100); - end; -end; - -function TdxPrinterPage.MinMarginsLoMetric: TRect; -begin - case GetInnerMeasurementUnits of - muInches: - Result := ScaleRect(Rect_InchToMM(MinMargins.Rect), 1, 100, 1, 100); - else {muMillimeters} - Result := ScaleRect(MinMargins.Rect, 1, 100, 1, 100); - end; -end; - -function TdxPrinterPage.MinPrintableArea: Integer; -begin - Result := dxDefaultMinPrintableArea; - case GetInnerMeasurementUnits of - muInches: - Result := MMToInch(Result); - end; -end; - -function TdxPrinterPage.MinPrintableAreaLoMetric: Integer; -begin - Result := MulDiv(dxDefaultMinPrintableArea, 1, 100); -end; - -function TdxPrinterPage.PageSizeLoMetric: TPoint; -begin - case GetInnerMeasurementUnits of - muInches: - Result := ScalePoint(Pt_InchToMM(PageSize.Point), 1, 100); - else {muMillimeters} - Result := ScalePoint(PageSize.Point, 1, 100); - end; -end; - -function TdxPrinterPage.PageSizePixels: TPoint; -begin - Result := ScalePoint(RealPageSizeLoMetric, Screen.PixelsPerInch, 254); -end; - -function TdxPrinterPage.PaintRectLoMetric: TRect; -var - Margins: TRect; - PageSize: TPoint; -begin - Margins := MarginsLoMetric; - PageSize := RealPageSizeLoMetric; - with Result do - begin - Left := Margins.Left; - Top := Margins.Top; - Right := PageSize.X - Margins.Right; - Bottom := PageSize.Y - Margins.Bottom; - if (Right < Left) or (Bottom < Top) then - begin - Self.Margins.Empty; - Result := Rect(0, 0, PageSize.X, PageSize.Y); - end; - end; -end; - -function TdxPrinterPage.PaintRectPixels: TRect; -begin - Result := ScaleRect(PaintRectLoMetric, Screen.PixelsPerInch, 254, Screen.PixelsPerInch, 254); -end; - -function TdxPrinterPage.RealPageSizeLoMetric: TPoint; -var - V: Integer; -begin - Result := PageSizeLoMetric; - if Orientation = poLandscape then - with Result do - begin - V := X; - X := Y; - Y := V; - end; -end; - -function TdxPrinterPage.RealPageSizePixels: TPoint; -var - V: Integer; -begin - Result := PageSizePixels; - if Orientation = poLandscape then - with Result do - begin - V := X; - X := Y; - Y := V; - end; -end; - -function TdxPrinterPage.ValidateMargins: Boolean; -var - OffsetX, OffsetY: Integer; -begin - // PS v3.01: Don't ask a Printer until it's not initialized outside, for instance, first printout from PS - - if dxPrnDev.dxIsPrintDeviceInitialized and (dxPrintDevice.PrinterCount > 0) then - with dxPrintDevice do - begin - OffsetX := MulDiv(PhysOffsetX, 254, GetDeviceCaps(Handle, LOGPIXELSX)); - OffsetY := MulDiv(PhysOffsetY, 254, GetDeviceCaps(Handle, LOGPIXELSY)); - end - else - with dxDefaultPhysicalPaperOffsets do - begin - OffsetX := X div 100; - OffsetY := Y div 100; - end; - - with MarginsLoMetric do - Result := (Left >= OffsetX) and (Right >= OffsetX) and - (HeaderLoMetric >= OffsetY) and (FooterLoMetric >= OffsetY); -end; - -constructor TdxPrinterPage.CreateInstance(Dummy: Integer = 0); -begin - inherited Create; - FPage := Self; - - FAutoSwapMargins := True; - FCenterOnPageH := False; - FCenterOnPageV := False; - FMeasurementUnits := muDefault; - FLastMU := GetInnerMeasurementUnits; - FMargins := TdxRectWrapper.CreateEmpty; - FMinMargins := TdxRectWrapper.CreateEmpty; - FOrientation := poPortrait; - FPageSize := TdxPointWrapper.CreateEmpty; - FHFG := TdxRectWrapper.CreateEmpty; - FDMPaper := dxPrnDev.dxGetDefaultDMPaper; - FFitToPagesByTall := 1; - FFitToPagesByWide := 1; - FGrayShading := False; - FPageFooter := CreatePageFooter; - FPageHeader := CreatePageHeader; - FPageOrder := poOverThenDown; - FPaperSource := dxDefaultPaperSource;{Windows.DMBIN_AUTO} - FReverseTitlesOnEvenPages := False; - FScaleFactor := 100; - FScaleMode := smAdjust; -end; - -procedure TdxPrinterPage.DefineProperties(Filer: TFiler); - - function HasData: Boolean; - begin - Result := Filer.Ancestor = nil; - end; - -begin - inherited; - Filer.DefineProperty('_dxMeasurementUnits_', ReadMU, WriteMU, HasData); - Filer.DefineProperty('_dxLastMU_', ReadLastMU, WriteLastMU, HasData); - - if Filer is TReader then - SynchronizeMeasurementUnits; -end; - -procedure TdxPrinterPage.Changed; -begin - if (UpdateCount = 0) and Assigned(FOnChange) then - FOnChange(Self); -end; - -procedure TdxPrinterPage.DoAssign(Source: TdxBaseObject); -begin - FAssigning := True; - try - inherited; - with TdxPrinterPage(Source) do - begin - Self.AutoSwapMargins := AutoSwapMargins; - Self.Background := Background; - Self.CenterOnPageH := CenterOnPageH; - Self.CenterOnPageV := CenterOnPageV; - Self.DMPaper := DMPaper; - Self.GrayShading := GrayShading; - Self.MeasurementUnits := MeasurementUnits; - Self.MinMargins.Rect := MinMargins.Rect; - Self.Margins := Margins; - Self.Header := Header; - Self.Footer := Footer; - //if Self.DMPaper >= DMPAPER_USER then - Self.PageSize := PageSize; - Self.Orientation := Orientation; - Self.PageHeader := PageHeader; - Self.PageFooter := PageFooter; - Self.PageOrder := PageOrder; - Self.PaperSource := PaperSource; - Self.ReverseTitlesOnEvenPages := ReverseTitlesOnEvenPages; - Self.ScaleMode := ScaleMode; - - if Self.ScaleMode = smAdjust then - begin - Self.FitToPagesByWide := FitToPagesByWide; - Self.FitToPagesByTall := FitToPagesByTall; - Self.ScaleFactor := ScaleFactor; - end - else - begin - Self.ScaleFactor := ScaleFactor; - Self.FitToPagesByWide := FitToPagesByWide; - Self.FitToPagesByTall := FitToPagesByTall; - end; - end; - finally - FAssigning := False; - end; -end; - -function TdxPrinterPage.GetSupportsScaling: Boolean; -begin - Result := True; -end; - -function TdxPrinterPage.IsDefaultDMPaperSelected: Boolean; -begin - Result := FDMPaper = dxPrnDev.dxGetDefaultDMPaper; -end; - -function TdxPrinterPage.IsPageFooterTitleStored(Index: Integer): Boolean; -begin - Result := True; -end; - -function TdxPrinterPage.IsPageHeaderTitleStored(Index: Integer): Boolean; -begin - Result := True; -end; - -procedure TdxPrinterPage.MarginChanged; -begin - if Assigned(FOnMarginChange) then FOnMarginChange(Self); -end; - -procedure TdxPrinterPage.PageParamsChanged(AUpdateCodes: TdxPrinterPageUpdateCodes); -begin - if (UpdateCount = 0) and (ucMargins * AUpdateCodes <> []) then - MarginChanged; -end; - -function TdxPrinterPage.CreatePageFooter: TdxPageFooter; -begin - Result := GetPageFooterClass.Create; - InitializePageFooter(Result); -end; - -function TdxPrinterPage.GetPageFooterClass: TdxPageFooterClass; -begin - Result := TdxPageFooter; -end; - -procedure TdxPrinterPage.InitializePageFooter(APageFooter: TdxPageFooter); -begin - APageFooter.FPage := Self; -end; - -function TdxPrinterPage.CreatePageHeader: TdxPageHeader; -begin - Result := GetPageHeaderClass.Create; - InitializePageHeader(Result); -end; - -function TdxPrinterPage.GetPageHeaderClass: TdxPageHeaderClass; -begin - Result := TdxPageHeader; -end; - -procedure TdxPrinterPage.InitializePageHeader(APageHeader: TdxPageHeader); -begin - APageHeader.FPage := Self; -end; - -procedure TdxPrinterPage.DoUpdateMeasurementUnits; -begin - BeginUpdate; - try - case FLastMU of - muMillimeters: - begin - PageSize.Point := Pt_InchToMM(PageSize.Point); - MinMargins.Rect := Rect_InchToMM(MinMargins.Rect); - Header := InchToMM(Header); - Footer := InchToMM(Footer); - Margins.Rect := Rect_InchToMM(Margins.Rect); - end; - - muInches: - begin - PageSize.Point := Pt_MMToInch(PageSize.Point); - MinMargins.Rect := Rect_MMToInch(MinMargins.Rect); - Header := MMToInch(Header); - Footer := MMToInch(Footer); - Margins.Rect := Rect_MMToInch(Margins.Rect); - end; - end; - finally - EndUpdate; - end; -end; - -procedure TdxPrinterPage.ReadPrinterInfos; -var - AMargins: TRect; - APageSize: TPoint; - AHeader, AFooter: Integer; - ADMPaper: Integer; - AOrientation: TdxPrinterOrientation; -begin - GetDefaultPageInfo(AMargins, AHeader, AFooter, APageSize, ADMPaper, AOrientation); - FMinMargins.Rect := dxPSGlbl.NullRect; - FMargins.Rect := AMargins; - FHFG.Top := AHeader; - FHFG.Bottom := AFooter; - FPageSize.Point := APageSize; - FDMPaper := ADMPaper; - FOrientation := AOrientation; -end; - -procedure TdxPrinterPage.SynchronizeMeasurementUnits; -var - MU: TdxMeasurementUnits; -begin - if MeasurementUnits = muDefault then - begin - MU := GetDefaultMeasurementUnits; - if FLastMU <> MU then - begin - FLastMU := MU; - DoUpdateMeasurementUnits; - end; - end; -end; - -function TdxPrinterPage.GetCanSwapMargins: Boolean; -begin - Result := not IsLoading and not FAssigning and AutoSwapMargins; -end; - -function TdxPrinterPage.GetHFG(Index: Integer): Integer; -begin - Result := FHFG[TdxRectSide(Index)]; -end; - -function TdxPrinterPage.GetRealMeasurementUnits: TdxMeasurementUnits; -begin - if MeasurementUnits = muDefault then - Result := GetDefaultMeasurementUnits - else - Result := MeasurementUnits; -end; - -function TdxPrinterPage.GetRealPageSize: TPoint; -var - V: Integer; -begin - Result := PageSize.Point; - if Orientation = poLandscape then - with Result do - begin - V := X; - X := Y; - Y := V; - end; -end; - -function TdxPrinterPage.GetRestPageSizeX: Integer; -begin - Result := RealPageSize.X - MinPrintableArea; -end; - -function TdxPrinterPage.GetRestPageSizeY: Integer; -begin - Result := RealPageSize.Y - MinPrintableArea; -end; - -function TdxPrinterPage.IsMinMarginsStored: Boolean; -begin - Result := not MinMargins.IsEmpty(True); -end; - -function TdxPrinterPage.IsPageSizeStored: Boolean; -begin - Result := True;//dxPPAttr.Papers.FindByDMPaper(DMPaper) = -1; -end; - -procedure TdxPrinterPage.SetDMPaper(Value: Integer); -begin - if FDMPaper <> Value then - begin - FDMPaper := Value; - SetPaperSizeByDMPaper; - end; -end; - -procedure TdxPrinterPage.SetFitToPagesByTall(Value: Integer); -var - ScaleChanged: Boolean; -begin - ScaleChanged := FFitToPagesByTall <> Value; - FFitToPagesByTall := Value; - ScaleMode := smFit; - if ScaleChanged then PageParamsChanged([ucScale]); -end; - -procedure TdxPrinterPage.SetFitToPagesByWide(Value: Integer); -var - ScaleChanged: Boolean; -begin - ScaleChanged := FFitToPagesByWide <> Value; - FFitToPagesByWide := Value; - ScaleMode := smFit; - if ScaleChanged then PageParamsChanged([ucScale]); -end; - -procedure TdxPrinterPage.SetHFG(Index: Integer; Value: Integer); -begin - if Value < 0 then Value := 0; - FHFG[TdxRectSide(Index)] := Value; -end; - -procedure TdxPrinterPage.SetMargins(Value: TdxRectWrapper); -begin - FMargins.Assign(Value); -end; - -procedure TdxPrinterPage.SetMeasurementUnits(Value: TdxMeasurementUnits); - - function HasMUChanged: Boolean; - var - DMU: TdxMeasurementUnits; - begin - DMU := GetDefaultMeasurementUnits; - Result := ((Value = muDefault) and (FMeasurementUnits <> DMU)) or - ((FMeasurementUnits = muDefault) and (Value <> DMU)) or - ((Value <> muDefault) and (FMeasurementUnits <> muDefault)); - end; - -begin - if FMeasurementUnits <> Value then - if HasMUChanged then - begin - FMeasurementUnits := Value; - FLastMU := GetInnerMeasurementUnits; - DoUpdateMeasurementUnits; - end - else - FMeasurementUnits := Value; -end; - -procedure TdxPrinterPage.SetMinMargins(Value: TdxRectWrapper); -begin - MinMargins.Assign(Value); -end; - -procedure TdxPrinterPage.SetOrientation(Value: TdxPrinterOrientation); -begin - if FOrientation <> Value then - begin - FOrientation := Value; - if dxPrnDev.dxPrintDevice <> nil then - dxPrnDev.dxPrintDevice.Orientation := FOrientation; - if CanSwapMargins then DoSwapMargins; - end; -end; - -procedure TdxPrinterPage.SetPageFooter(Value: TdxPageFooter); -begin - PageFooter.Assign(Value); -end; - -procedure TdxPrinterPage.SetPageHeader(Value: TdxPageHeader); -begin - PageHeader.Assign(Value); -end; - -procedure TdxPrinterPage.SetPageSize(Value: TdxPointWrapper); -begin - PageSize.Assign(Value); -end; - -procedure TdxPrinterPage.SetPaperSource(Value: Integer); -begin - if Value < Windows.DMBIN_FIRST then - Value := Windows.DMBIN_FIRST; - if (Value > Windows.DMBIN_LAST) and (Value < Windows.DMBIN_USER) then - Value := Windows.DMBIN_LAST; - if FPaperSource <> Value then - FPaperSource := Value; -end; - -procedure TdxPrinterPage.SetRealPageSize(const Value: TPoint); -begin - if Orientation = poPortrait then - PageSize.Point := Value - else - PageSize.Point := Point(Value.Y, Value.X); -end; - -procedure TdxPrinterPage.SetScaleFactor(Value: Integer); -var - ScaleChanged: Boolean; -begin - if Value < dxMinScaleFactor then Value := dxMinScaleFactor; - if Value > dxMaxScaleFactor then Value := dxMaxScaleFactor; - ScaleChanged := ScaleFactor <> Value; - FScaleFactor := Value; - ScaleMode := smAdjust; - if ScaleChanged then PageParamsChanged([ucScale]); -end; - -procedure TdxPrinterPage.HFGChanged(Sender: TObject; ASides: TdxRectSides); -begin - if UpdateCount <> 0 then Exit; - BeginUpdate; - try - FixMargins; - finally - EndUpdate; - end; -end; - -procedure TdxPrinterPage.HFGChanging(Sender: TObject; ASides: TdxRectSides; - var Values: array of Integer); -begin - if UpdateCount <> 0 then Exit; - if rsTop in ASides then - Values[1] := MinMax(Values[1], FMinMargins.Top, RestPageSizeY - Margins.Bottom); - if rsBottom in ASides then - Values[3] := MinMax(Values[3], FMinMargins.Bottom, RestPageSizeY - Margins.Top); -end; - -procedure TdxPrinterPage.LockUpdated(Sender: TdxBaseObject; ALockState: TdxLockState); -begin - if ALockState = lsUnlock then PageParamsChanged(ucAll); -end; - -procedure TdxPrinterPage.MarginsChanged(Sender: TObject; ASides: TdxRectSides); - - function GetUpdateCode: TdxPrinterPageUpdateCodes; - begin - Result := []; - if rsLeft in ASides then Include(Result, ucMarginLeft); - if rsTop in ASides then Include(Result, ucMarginTop); - if rsRight in ASides then Include(Result, ucMarginRight); - if rsBottom in ASides then Include(Result, ucMarginBottom); - end; - -begin - if not IsLoading and (UpdateCount = 0) then - PageParamsChanged(GetUpdateCode); -end; - -procedure TdxPrinterPage.MarginsChanging(Sender: TObject; ASides: TdxRectSides; - var Values: array of Integer); -begin - if IsLoading or (UpdateCount <> 0) then Exit; - if rsLeft in ASides then - Values[0] := MinMax(Values[0], FMinMargins.Left, RestPageSizeX - Margins.Right); - if rsTop in ASides then - Values[1] := MinMax(Values[1], Header, RestPageSizeY - Margins.Bottom); - if rsRight in ASides then - Values[2] := MinMax(Values[2], FMinMargins.Right, RestPageSizeX - Margins.Left); - if rsBottom in ASides then - Values[3] := MinMax(Values[3], Footer, RestPageSizeY - Margins.Top); -end; - -procedure TdxPrinterPage.MinMarginsChanged(Sender: TObject; ASides: TdxRectSides); -begin - if IsLoading or (UpdateCount <> 0) then Exit; - - if rsLeft in ASides then - begin - FMargins.Left := MinMax(FMargins.Left, FMinMargins.Left, RestPageSizeX); - FMargins.Right := MinMax(FMargins.Right, FMinMargins.Right, RestPageSizeX - FMargins.Left); - end; - - if rsTop in ASides then - begin - Header := MinMax(Header, FMinMargins.Top, RestPageSizeY); - Footer := MinMax(Footer, FMinMargins.Bottom, RestPageSizeY - Header); - FMargins.Top := MinMax(FMargins.Top, Header, RestPageSizeY - Footer); - FMargins.Bottom := MinMax(FMargins.Bottom, Footer, RestPageSizeY - Header); - end; - - if rsRight in ASides then - begin - FMargins.Right := MinMax(FMargins.Right, FMinMargins.Right, RestPageSizeX); - FMargins.Left := MinMax(FMargins.Left, FMinMargins.Left, RestPageSizeX - FMargins.Right); - end; - - if rsBottom in ASides then - begin - Footer := MinMax(Footer, FMinMargins.Bottom, RestPageSizeY); - Header := MinMax(Header, FMinMargins.Top, RestPageSizeY - Footer); - FMargins.Bottom := MinMax(FMargins.Bottom, Footer, RestPageSizeY - Header); - FMargins.Top := MinMax(FMargins.Bottom, Header, RestPageSizeY - Footer); - end; -end; - -procedure TdxPrinterPage.MinMarginsChanging(Sender: TObject; ASides: TdxRectSides; - var Values: array of Integer); -begin - if IsLoading or (UpdateCount <> 0) then Exit; - if rsLeft in ASides then - Values[0] := MinMax(Values[0], 0, RestPageSizeX - MinMargins.Right); - if rsTop in ASides then - Values[1] := MinMax(Values[1], 0, RestPageSizeY - MinMargins.Bottom); - if rsRight in ASides then - Values[2] := MinMax(Values[2], 0, RestPageSizeX - MinMargins.Left); - if rsBottom in ASides then - Values[3] := MinMax(Values[3], 0, RestPageSizeY - MinMargins.Top); -end; - -procedure TdxPrinterPage.PageSizeChanged(Sender: TObject; ACoords: TdxPointCoords); -begin - if IsLoading or (UpdateCount <> 0) then Exit; - - BeginUpdate; - try - FixMinMargins; - FixMargins; - if not FPageSizeLocked then FindDMPaperByPageSize; - finally - EndUpdate; - end; -end; - -procedure TdxPrinterPage.PageSizeChanging(Sender: TObject; ACoords: TdxPointCoords; - var Values: array of Integer); -begin - if IsLoading then Exit; - - if pcX in ACoords then - Values[0] := Max(Values[0], MinPrintableArea); - if pcY in ACoords then - Values[1] := Max(Values[1], MinPrintableArea); -end; - -procedure TdxPrinterPage.ReadLastMU(Reader: TReader); -begin - FLastMU := TdxMeasurementUnits(Reader.ReadInteger); -end; - -procedure TdxPrinterPage.ReadMU(Reader: TReader); -begin - FMeasurementUnits := TdxMeasurementUnits(Reader.ReadInteger); -end; - -procedure TdxPrinterPage.WriteLastMU(Writer: TWriter); -begin - Writer.WriteInteger(Integer(FLastMU)); -end; - -procedure TdxPrinterPage.WriteMU(Writer: TWriter); -begin - Writer.WriteInteger(Integer(FMeasurementUnits)); -end; - -procedure TdxPrinterPage.DoSwapMargins; -var - V, V2: Integer; -begin - BeginUpdate; - try - if Orientation = poLandscape then - begin - V := MinMargins.Left; - MinMargins.Left := MinMargins.Bottom; - V2 := MinMargins.Top; - MinMargins.Top := V; - V := MinMargins.Right; - MinMargins.Right := V2; - MinMargins.Bottom := V; - - V := Margins.Left; - Margins.Left := Margins.Bottom; - V2 := Margins.Top; - Margins.Top := V; - V := Margins.Right; - Margins.Right := V2; - Margins.Bottom := V; - end - else - begin - V := MinMargins.Bottom; - MinMargins.Bottom := MinMargins.Left; - V2 := MinMargins.Right; - MinMargins.Right := V; - V := MinMargins.Top; - MinMargins.Top := V2; - MinMargins.Left := V; - - V := Margins.Bottom; - Margins.Bottom := Margins.Left; - V2 := Margins.Right; - Margins.Right := V; - V := Margins.Top; - Margins.Top := V2; - Margins.Left := V; - end; - FixMargins; - finally - EndUpdate; - end; -end; - -procedure TdxPrinterPage.FindDMPaperByPageSize; -var - Index: Integer; -begin - with PageSizeLoMetric do - Index := dxPPAttr.Papers.FindBySize(X, Y); - - if Index <> -1 then - FDMPaper := dxPPAttr.Papers[Index].DMPaper - else - FDMPaper := DMPAPER_USER; -end; - -procedure TdxPrinterPage.FixMargins; -begin - Header := MinMax(Header, FMinMargins.Top, RestPageSizeY - FMinMargins.Bottom); - Footer := MinMax(Footer, FMinMargins.Bottom, RestPageSizeY - Header); - FMargins.Left := MinMax(FMargins.Left, FMinMargins.Left, RestPageSizeX - FMinMargins.Right); - FMargins.Right := MinMax(FMargins.Right, FMinMargins.Right, RestPageSizeX - FMargins.Left); - FMargins.Top := MinMax(FMargins.Top, Header, RestPageSizeY - Footer); - FMargins.Bottom := MinMax(FMargins.Bottom, Footer, RestPageSizeY - Header); -end; - -procedure TdxPrinterPage.FixMinMargins; -begin - FMinMargins.Left := MinMax(FMinMargins.Left, 0, RestPageSizeX); - if RestPageSizeX = 0 then - FMinMargins.Right := 0 - else - FMinMargins.Right := MinMax(FMinMargins.Right, 0, RestPageSizeX - FMinMargins.Left); - - FMinMargins.Top := MinMax(FMinMargins.Top, 0, RestPageSizeY); - if RestPageSizeY = 0 then - FMinMargins.Bottom := 0 - else - FMinMargins.Bottom := MinMax(FMinMargins.Bottom, 0, RestPageSizeY - FMinMargins.Top); -end; - -function TdxPrinterPage.IsLoading: Boolean; -var - AOwner: TPersistent; -begin - AOwner := GetOwner; - Result := (AOwner is TComponent) and (csLoading in TComponent(AOwner).ComponentState); -end; - -procedure TdxPrinterPage.SetPaperSizeByDMPaper; -var - PaperSize: TPoint; - PaperIndex: Integer; -begin - PaperSize := dxPSGlbl.NullPoint; - PaperIndex := dxPPAttr.Papers.FindByDMPaper(DMPaper); - if PaperIndex = -1 then - begin - PaperIndex := dxPrintDevice.FindPaper(DMPaper); - if PaperIndex <> -1 then - PaperSize := ScalePoint(TdxPaperInfo(dxPrintDevice.Papers.Objects[PaperIndex]).Size, 100, 1) - end - else - PaperSize := ScalePoint(TPoint(dxPPAttr.Papers[PaperIndex].Size), 100, 1); - - if (PaperSize.X <> 0) and (PaperSize.Y <> 0) then - begin - FPageSizeLocked := True; - try - case GetInnerMeasurementUnits of - muInches: - PageSize.Point := Pt_MMToInch(PaperSize); - muMillimeters: - PageSize.Point := PaperSize; - end; - finally - FPageSizeLocked := False; - end; - end -end; - -initialization - -finalization - FreeAndNil(FDefaultPrinterPage); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxWrap.pas b/internal/x.46/ExpressPrinting System/Sources/dxWrap.pas deleted file mode 100644 index 05df0bb8..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxWrap.pas +++ /dev/null @@ -1,526 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxWrap; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, dxPSGlbl; - -type - TdxPointCoord = (pcX, pcY); - TdxPointCoords = set of TdxPointCoord; - - TdxPointChangingEvent = procedure(Sender: TObject; Coords: TdxPointCoords; - var Values: array of Integer) of object; - - TdxPointChangeEvent = procedure(Sender: TObject; Coords: TdxPointCoords) of object; - - TdxPointWrapper = class(TPersistent) - private - FPoint: TPoint; - FOnChanged: TdxPointChangeEvent; - FOnChanging: TdxPointChangingEvent; - function GetPartPoint(Index: Integer): Integer; - procedure SetPartPoint(Index: Integer; Value: Integer); - procedure SetPoint(const Value: TPoint); - protected - procedure DoChanged(ACoords: TdxPointCoords); dynamic; - procedure DoChanging(ACoords: TdxPointCoords; var AValues: array of Integer); dynamic; - public - constructor Create(AX, AY: Integer); - constructor CreateEmpty; - procedure Assign(Source: TPersistent); override; - - function Clone: TPersistent; - procedure Empty; - function IsEqual(const APoint: TPoint): Boolean; - class function ArePointsEqual(const Pt1, Pt2: TPoint): Boolean; - - property Point: TPoint read FPoint write SetPoint; - property OnChanging: TdxPointChangingEvent read FOnChanging write FOnChanging; - property OnChanged: TdxPointChangeEvent read FOnChanged write FOnChanged; - published - property X: Integer index 0 read GetPartPoint write SetPartPoint default 0; - property Y: Integer index 1 read GetPartPoint write SetPartPoint default 0; - end; - - TdxRectSide = (rsLeft, rsTop, rsRight, rsBottom); - TdxRectSides = set of TdxRectSide; - - TdxRectChangingEvent = procedure(Sender: TObject; Sides: TdxRectSides; - var Values: array of Integer) of object; - - TdxRectChangeEvent = procedure(Sender: TObject; Sides: TdxRectSides) of object; - - TdxRectWrapper = class(TPersistent) - private - FRect: TRect; - FOnChanged: TdxRectChangeEvent; - FOnChanging: TdxRectChangingEvent; - function GetHeight: Integer; - function GetPartRect(Index: Integer): Integer; - function GetRectPoint(Index: Integer): TPoint; - function GetSide(ASide: TdxRectSide): Integer; - function GetWidth: Integer; - procedure SetHeight(Value: Integer); - procedure SetPartRect(Index: Integer; Value: Integer); - procedure SetRect(const Value: TRect); - procedure SetRectPoint(Index: Integer; const Value: TPoint); - procedure SetSide(ASide: TdxRectSide; Value: Integer); - procedure SetWidth(Value: Integer); - protected - procedure DoChanged(ASides: TdxRectSides); dynamic; - procedure DoChanging(ASides: TdxRectSides; var AValues: array of Integer); dynamic; - public - constructor Create(ALeft, ATop, ARight, ABottom: Integer); - constructor CreateEmpty; - procedure Assign(Source: TPersistent); override; - - function Clone: TPersistent; - procedure Empty; - function IsEqual(const ARect: TRect): Boolean; - function IsEmpty(AnExact: Boolean = False): Boolean; - - property BottomRight: TPoint Index 1 read GetRectPoint write SetRectPoint; - property Height: Integer read GetHeight write SetHeight; - property Rect: TRect read FRect write SetRect; - property Side[ASide: TdxRectSide]: Integer read GetSide write SetSide; default; - property TopLeft: TPoint Index 0 read GetRectPoint write SetRectPoint; - property Width: Integer read GetWidth write SetWidth; - - property OnChanging: TdxRectChangingEvent read FOnChanging write FOnChanging; - property OnChanged: TdxRectChangeEvent read FOnChanged write FOnChanged; - published - property Bottom: Integer index 3 read GetPartRect write SetPartRect default 0; - property Left: Integer index 0 read GetPartRect write SetPartRect default 0; - property Right: Integer index 2 read GetPartRect write SetPartRect default 0; - property Top: Integer index 1 read GetPartRect write SetPartRect default 0; - end; - -implementation - -uses - dxPSUtl; - -type - TPoints = array[0..1] of Integer; - TRects = array[0..3] of Integer; - -function MakePoints(X, Y: Integer): TPoints; overload; -begin - Result[0] := X; - Result[1] := Y; -end; - -function MakePoints(const Pt: TPoint): TPoints; overload; -begin - Result := MakePoints(Pt.X, Pt.Y); -end; - -function MakeRects(ALeft, ATop, ARight, ABottom: Integer): TRects; overload; -begin - Result[0] := ALeft; - Result[1] := ATop; - Result[2] := ARight; - Result[3] := ABottom; -end; - -function MakeRects(const R: TRect): TRects; overload; -begin - with R do - Result := MakeRects(Left, Top, Right, Bottom); -end; - -{ TdxPointWrapper } - -constructor TdxPointWrapper.Create(AX, AY: Integer); -begin - inherited Create; - FPoint.X := AX; - FPoint.Y := AY; -end; - -constructor TdxPointWrapper.CreateEmpty; -begin - Create(0, 0); -end; - -procedure TdxPointWrapper.Assign(Source: TPersistent); -begin - if Source = nil then - Empty - else - if Source is TdxPointWrapper then - Point := TdxPointWrapper(Source).Point - else - inherited Assign(Source) -end; - -function TdxPointWrapper.Clone: TPersistent; -begin - Result := TdxPointWrapper.Create(0, 0); - try - Result.Assign(Self); - except - Result.Free; - raise; - end; -end; - -procedure TdxPointWrapper.DoChanged(ACoords: TdxPointCoords); -begin - if Assigned(FOnChanged) then FOnChanged(Self, ACoords); -end; - -procedure TdxPointWrapper.DoChanging(ACoords: TdxPointCoords; - var AValues: array of Integer); -begin - if Assigned(FOnChanging) then FOnChanging(Self, ACoords, AValues); -end; - -procedure TdxPointWrapper.SetPoint(const Value: TPoint); -var - Points: TPoints; -begin - if not IsEqual(Value) then - begin - Points := MakePoints(Value); - DoChanging([pcX, pcY], Points); - FPoint.X := Points[0]; - FPoint.Y := Points[1]; - DoChanged([pcX, pcY]); - end; -end; - -function TdxPointWrapper.GetPartPoint(Index: Integer): Integer; -begin - if Index = 0 then - Result := FPoint.X - else - Result := FPoint.Y; -end; - -procedure TdxPointWrapper.SetPartPoint(Index: Integer; Value: Integer); -var - Points: TPoints; -begin - if Index = 0 then - begin - if FPoint.X <> Value then - begin - Points := MakePoints(Value, 0); - DoChanging([pcX], Points); - FPoint.X := Points[0]; - DoChanged([pcX]); - end - end - else - if FPoint.Y <> Value then - begin - Points := MakePoints(0, Value); - DoChanging([pcY], Points); - FPoint.Y := Points[1]; - DoChanged([pcY]); - end; -end; - -function TdxPointWrapper.IsEqual(const APoint: TPoint): Boolean; -begin - Result := (FPoint.X = APoint.X) and (FPoint.Y = APoint.Y); -end; - -class function TdxPointWrapper.ArePointsEqual(const Pt1, Pt2: TPoint): Boolean; -begin - Result := (Pt1.X = Pt2.X) and (Pt1.Y = Pt2.Y); -end; - -procedure TdxPointWrapper.Empty; -var - Points: TPoints; -begin - if not IsEqual(NullPoint) then - begin - Points := MakePoints(0, 0); - DoChanging([pcX, pcY], Points); - FPoint.X := Points[0]; - FPoint.Y := Points[1]; - DoChanged([pcX, pcY]); - end; -end; - -{ TdxRectWrapper } - -constructor TdxRectWrapper.Create(ALeft, ATop, ARight, ABottom: Integer); -begin - inherited Create; - FRect.Left := ALeft; - FRect.Top := ATop; - FRect.Right := ARight; - FRect.Bottom := ABottom; -end; - -constructor TdxRectWrapper.CreateEmpty; -begin - Create(0, 0, 0, 0); -end; - -procedure TdxRectWrapper.Assign(Source: TPersistent); -begin - if Source = nil then - Empty - else - if Source is TdxRectWrapper then - Rect := TdxRectWrapper(Source).Rect - else - inherited Assign(Source) -end; - -function TdxRectWrapper.Clone: TPersistent; -begin - Result := TdxRectWrapper.Create(0, 0, 0, 0); - try - Result.Assign(Self); - except - Result.Free; - raise; - end; -end; - -procedure TdxRectWrapper.Empty; -var - Rects: TRects; -begin - if not IsEqual(NullRect) then - begin - Rects := MakeRects(0, 0, 0, 0); - DoChanging([rsLeft, rsTop, rsRight, rsBottom], Rects); - FRect.Left := Rects[0]; - FRect.Top := Rects[1]; - FRect.Right := Rects[2]; - FRect.Bottom := Rects[3]; - DoChanged([rsLeft, rsTop, rsRight, rsBottom]); - end; -end; - -function TdxRectWrapper.IsEqual(const ARect: TRect): Boolean; -begin - Result := EqualRect(FRect, ARect); -end; - -function TdxRectWrapper.IsEmpty(AnExact: Boolean = False): Boolean; -begin - if AnExact then - Result := IsEqual(dxPSGlbl.NullRect) - else - Result := IsRectEmpty(Rect); -end; - -procedure TdxRectWrapper.DoChanged(ASides: TdxRectSides); -begin - if Assigned(FOnChanged) then FOnChanged(Self, ASides); -end; - -procedure TdxRectWrapper.DoChanging(ASides: TdxRectSides; var AValues: array of Integer); -begin - if Assigned(FOnChanging) then FOnChanging(Self, ASides, AValues); -end; - -procedure TdxRectWrapper.SetRect(const Value: TRect); -var - Rects: TRects; -begin - if not EqualRect(FRect, Value) then - begin - Rects := MakeRects(Value); - DoChanging([rsLeft, rsTop, rsRight, rsBottom], Rects); - FRect.Left := Rects[0]; - FRect.Top := Rects[1]; - FRect.Right := Rects[2]; - FRect.Bottom := Rects[3]; - DoChanged([rsLeft, rsTop, rsRight, rsBottom]); - end; -end; - -function TdxRectWrapper.GetWidth: Integer; -begin - Result := FRect.Right - FRect.Left; -end; - -procedure TdxRectWrapper.SetWidth(Value: Integer); -var - Rects: TRects; -begin - if Width <> Value then - begin - Rects := MakeRects(0, 0, Value, 0); - DoChanging([rsRight], Rects); - FRect.Right := Rects[2]; - DoChanged([rsRight]); - end; -end; - -function TdxRectWrapper.GetHeight: Integer; -begin - Result := FRect.Bottom - FRect.Top -end; - -procedure TdxRectWrapper.SetHeight(Value: Integer); -var - Rects: TRects; -begin - if Height <> Value then - begin - Rects := MakeRects(0, 0, 0, Value); - DoChanging([rsBottom], Rects); - FRect.Bottom := Rects[3]; - DoChanged([rsBottom]); - end; -end; - -function TdxRectWrapper.GetPartRect(Index: Integer): Integer; -begin - case Index of - 0: Result := FRect.Left; - 1: Result := FRect.Top; - 2: Result := FRect.Right; - else - Result := FRect.Bottom; - end; -end; - -procedure TdxRectWrapper.SetPartRect(Index: Integer; Value: Integer); -var - Rects: TRects; -begin - case Index of - 0: - if FRect.Left <> Value then - begin - Rects := MakeRects(Value, 0, 0, 0); - DoChanging([rsLeft], Rects); - FRect.Left := Rects[0]; - DoChanged([rsLeft]); - end; - 1: - if FRect.Top <> Value then - begin - Rects := MakeRects(0, Value, 0, 0); - DoChanging([rsTop], Rects); - FRect.Top := Rects[1]; - DoChanged([rsTop]); - end; - 2: - if FRect.Right <> Value then - begin - Rects := MakeRects(0, 0, Value, 0); - DoChanging([rsRight], Rects); - FRect.Right := Rects[2]; - DoChanged([rsRight]); - end; - 3: - if FRect.Bottom <> Value then - begin - Rects := MakeRects(0, 0, 0, Value); - DoChanging([rsBottom], Rects); - FRect.Bottom := Rects[3]; - DoChanged([rsBottom]); - end; - end; -end; - -function TdxRectWrapper.GetRectPoint(Index: Integer): TPoint; -begin - if Index = 0 then - Result := FRect.TopLeft - else - Result := FRect.BottomRight; -end; - -procedure TdxRectWrapper.SetRectPoint(Index: Integer; const Value: TPoint); -var - Rects: TRects; -begin - if Index = 0 then - if not TdxPointWrapper.ArePointsEqual(FRect.TopLeft, Value) then - begin - Rects := MakeRects(Value.X, Value.Y, 0, 0); - DoChanging([rsLeft, rsTop], Rects); - FRect.Left := Rects[0]; - FRect.Top := Rects[1]; - DoChanged([rsLeft, rsTop]); - end - else - else - if not TdxPointWrapper.ArePointsEqual(FRect.BottomRight, Value) then - begin - Rects := MakeRects(0, 0, Value.X, Value.Y); - DoChanging([rsRight, rsBottom], Rects); - FRect.Right := Rects[2]; - FRect.Bottom := Rects[3]; - DoChanged([rsRight, rsBottom]); - end; -end; - -function TdxRectWrapper.GetSide(ASide: TdxRectSide): Integer; -begin - case ASide of - rsLeft: - Result := FRect.Left; - rsTop: - Result := FRect.Top; - rsRight: - Result := FRect.Right; - else //rsBottom - Result := FRect.Bottom; - end; -end; - -procedure TdxRectWrapper.SetSide(ASide: TdxRectSide; Value: Integer); -begin - SetPartRect(Integer(ASide), Value); -end; - -initialization - RegisterClasses([TdxPointWrapper, TdxRectWrapper]); - -finalization - UnregisterClasses([TdxPointWrapper, TdxRectWrapper]); - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmChFn.dfm b/internal/x.46/ExpressPrinting System/Sources/dxfmChFn.dfm deleted file mode 100644 index 50d8c552..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmChFn.dfm +++ /dev/null @@ -1,69 +0,0 @@ -object fmdxChangeFileName: TfmdxChangeFileName - Left = 368 - Top = 184 - ActiveControl = edFileName - BorderStyle = bsDialog - Caption = 'Choose New File Name' - ClientHeight = 104 - ClientWidth = 350 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 109 - Top = 75 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 190 - Top = 75 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 271 - Top = 75 - Width = 75 - Height = 23 - Caption = '&Help' - TabOrder = 3 - end - object GroupBox1: TGroupBox - Left = 4 - Top = 2 - Width = 342 - Height = 65 - TabOrder = 0 - object lblEnterNewFileName: TLabel - Left = 9 - Top = 17 - Width = 103 - Height = 13 - Caption = '&Enter New File Name:' - FocusControl = edFileName - end - object edFileName: TEdit - Left = 9 - Top = 33 - Width = 324 - Height = 21 - MaxLength = 260 - TabOrder = 0 - OnChange = edFileNameChange - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmChFn.pas b/internal/x.46/ExpressPrinting System/Sources/dxfmChFn.pas deleted file mode 100644 index 5661e4c8..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmChFn.pas +++ /dev/null @@ -1,141 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxfmChFN; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, dxPSForm; - -type - TfmdxChangeFileName = class(TCustomdxPSForm) - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - GroupBox1: TGroupBox; - edFileName: TEdit; - lblEnterNewFileName: TLabel; - procedure FormCreate(Sender: TObject); - procedure edFileNameChange(Sender: TObject); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - private - FFileName: string; - FModified: Boolean; - procedure LoadStrings; - function ValidateFileName: Boolean; - public - function Execute: Boolean; - property FileName: string read FFileName write FFileName; - end; - -function dxShowChooseFileNameDlg(var AFileName: string): Boolean; - -implementation - -{$R *.DFM} - -uses - cxClasses, dxPSRes, dxPSUtl; - -function dxShowChooseFileNameDlg(var AFileName: string): Boolean; -begin - with TfmdxChangeFileName.Create(nil) do - try - FileName := AFileName; - Result := Execute; - if Result then AFileName := FileName; - finally - Free; - end; -end; - -procedure TfmdxChangeFileName.FormCreate(Sender: TObject); -begin - edFileName.MaxLength := MAX_PATH; - LoadStrings; -end; - -procedure TfmdxChangeFileName.LoadStrings; -begin - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - Caption := cxGetResourceString(@sdxENFNCaption); - lblEnterNewFileName.Caption := cxGetResourceString(@sdxEnterNewFileName); -end; - -function TfmdxChangeFileName.Execute: Boolean; -begin - FModified := False; - edFileName.Text := FileName; - btnOK.Enabled := False; - Result := (ShowModal = mrOK) and FModified; -end; - -procedure TfmdxChangeFileName.edFileNameChange(Sender: TObject); -begin - FModified := True; - btnOK.Enabled := True; - FileName := TEdit(Sender).Text; -end; - -function TfmdxChangeFileName.ValidateFileName: Boolean; -begin - Result := dxPSUtl.ValidateFileName(FileName); - if not Result then - MessageWarning(Format(cxGetResourceString(@sdxInvalidFileName), [FileName])) - else - begin - Result := not FileExists(FileName); - if not Result then - MessageWarning(Format(cxGetResourceString(@sdxFileAlreadyExists), [FileName])); - end; -end; - -procedure TfmdxChangeFileName.FormCloseQuery(Sender: TObject; - var CanClose: Boolean); -begin - if ModalResult = mrOK then - begin - CanClose := ValidateFileName; - ActiveControl := edFileName; - end; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmClr.dfm b/internal/x.46/ExpressPrinting System/Sources/dxfmClr.dfm deleted file mode 100644 index 4ae384fc..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmClr.dfm +++ /dev/null @@ -1,569 +0,0 @@ -object dxfmColorPalette: TdxfmColorPalette - Left = 410 - Top = 280 - BorderStyle = bsDialog - ClientHeight = 182 - ClientWidth = 148 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = True - ShowHint = True - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlTop: TPanel - Left = 0 - Top = 0 - Width = 148 - Height = 121 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object SpeedButton1: TSpeedButton - Left = 2 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton2: TSpeedButton - Left = 20 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton3: TSpeedButton - Left = 38 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton4: TSpeedButton - Left = 56 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton5: TSpeedButton - Left = 74 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton6: TSpeedButton - Left = 92 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton7: TSpeedButton - Left = 110 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton8: TSpeedButton - Left = 128 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton9: TSpeedButton - Left = 2 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton10: TSpeedButton - Left = 20 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton11: TSpeedButton - Left = 38 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton12: TSpeedButton - Left = 56 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton13: TSpeedButton - Left = 74 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton14: TSpeedButton - Left = 92 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton15: TSpeedButton - Left = 110 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton16: TSpeedButton - Left = 128 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton17: TSpeedButton - Left = 2 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton18: TSpeedButton - Left = 20 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton19: TSpeedButton - Left = 38 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton20: TSpeedButton - Left = 56 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton21: TSpeedButton - Left = 74 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton22: TSpeedButton - Left = 92 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton23: TSpeedButton - Left = 110 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton24: TSpeedButton - Left = 128 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton25: TSpeedButton - Left = 2 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton26: TSpeedButton - Left = 20 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton27: TSpeedButton - Left = 38 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton28: TSpeedButton - Left = 56 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton29: TSpeedButton - Left = 74 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton30: TSpeedButton - Left = 92 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton31: TSpeedButton - Left = 110 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton32: TSpeedButton - Left = 128 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton33: TSpeedButton - Left = 2 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton34: TSpeedButton - Left = 20 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton35: TSpeedButton - Left = 38 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton36: TSpeedButton - Left = 56 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton37: TSpeedButton - Left = 74 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton38: TSpeedButton - Left = 92 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton39: TSpeedButton - Left = 110 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton40: TSpeedButton - Left = 128 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object bvlNoFillHolder: TBevel - Left = 2 - Top = 3 - Width = 144 - Height = 22 - Visible = False - end - end - object pnlBottom: TPanel - Left = 0 - Top = 126 - Width = 148 - Height = 56 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object sBtnMoreColors: TSpeedButton - Left = 2 - Top = 4 - Width = 144 - Height = 26 - Caption = '&More Colors ...' - Flat = True - Glyph.Data = { - F6000000424DF600000000000000760000002800000010000000100000000100 - 0400000000008000000000000000000000001000000010000000000000000000 - 8000008000000080800080000000800080008080000080808000C0C0C0000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00551199BBAAEE - CC44551199BBAAEECC44551199BBAAEECC44551199BBAAEECC44551199BBAAEE - CC44551199BBAAEECC44551199BBAAEECC44551199BBAAEECC44551199BBAAEE - CC44551199BBAAEECC44551199BBAAEECC44551199BBAAEECC44551199BBAAEE - CC44551199BBAAEECC44551199BBAAEECC44551199BBAAEECC44} - Margin = 3 - Spacing = 10 - OnClick = sBtnMoreColorsClick - end - object sBtnFillEffects: TSpeedButton - Left = 2 - Top = 30 - Width = 144 - Height = 26 - Caption = '&Fill Effects ...' - Flat = True - Glyph.Data = { - 36050000424D3605000000000000360400002800000010000000100000000100 - 0800000000000001000000000000000000000001000000010000000000000000 - 80000080000000808000800000008000800080800000C0C0C000C0DCC000F0CA - A600D3F0FF00B1E2FF008ED3FF006BC6FF0048B8FF0024AAFF0000AAFF000092 - DC000079B900006196000049730000325000D3E3FF00B1C7FF008EABFF006B8F - FF004873FF002457FF000055FF000049DC00003CB90000309600002473000019 - 5000D3D3FF00B1B1FF008E8EFF006B6BFF004848FF002424FF000000FE000000 - DC000000B900000096000000730000005000E3D3FF00C7B1FF00AB8EFF008F6B - FF007348FF005724FF005500FF004900DC003C00B90030009600240073001900 - 5000F0D3FF00E2B1FF00D38EFF00C66BFF00B848FF00AA24FF00AA00FF009200 - DC007900B900610096004900730032005000FFD3FF00FFB1FF00FF8EFF00FF6B - FF00FF48FF00FF24FF00FE00FE00DC00DC00B900B90096009600730073005000 - 5000FFD3F000FFB1E200FF8ED300FF6BC600FF48B800FF24AA00FF00AA00DC00 - 9200B9007900960061007300490050003200FFD3E300FFB1C700FF8EAB00FF6B - 8F00FF487300FF245700FF005500DC004900B9003C0096003000730024005000 - 1900FFD3D300FFB1B100FF8E8E00FF6B6B00FF484800FF242400FE000000DC00 - 0000B9000000960000007300000050000000FFE3D300FFC7B100FFAB8E00FF8F - 6B00FF734800FF572400FF550000DC490000B93C000096300000732400005019 - 0000FFF0D300FFE2B100FFD38E00FFC66B00FFB84800FFAA2400FFAA0000DC92 - 0000B9790000966100007349000050320000FFFFD300FFFFB100FFFF8E00FFFF - 6B00FFFF4800FFFF2400FEFE0000DCDC0000B9B9000096960000737300005050 - 0000F0FFD300E2FFB100D3FF8E00C6FF6B00B8FF4800AAFF2400AAFF000092DC - 000079B90000619600004973000032500000E3FFD300C7FFB100ABFF8E008FFF - 6B0073FF480057FF240055FF000049DC00003CB9000030960000247300001950 - 0000D3FFD300B1FFB1008EFF8E006BFF6B0048FF480024FF240000FE000000DC - 000000B90000009600000073000000500000D3FFE300B1FFC7008EFFAB006BFF - 8F0048FF730024FF570000FF550000DC490000B93C0000963000007324000050 - 1900D3FFF000B1FFE2008EFFD3006BFFC60048FFB80024FFAA0000FFAA0000DC - 920000B97900009661000073490000503200D3FFFF00B1FFFF008EFFFF006BFF - FF0048FFFF0024FFFF0000FEFE0000DCDC0000B9B90000969600007373000050 - 5000F2F2F200E6E6E600DADADA00CECECE00C2C2C200B6B6B600AAAAAA009E9E - 9E009292920086868600797979006E6E6E006161610056565600494949003E3E - 3E0032323200262626001A1A1A000E0E0E00F0FBFF00A3A0A000808080000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00686868686868 - 686868686868686868686873737373737373737373737373736868737E7E7E7E - 7E7E7E7E7E7E7E7E736868737E7C7C7C7C7C7C7C7C7C7C7E736868737E7C8787 - 8787878787877C7E736868737E7C87858585858585877C7E736868737E7C8785 - 8484848485877C7E736868737E7C87858483838485877C7E736868737E7C8785 - 8483838485877C7E736868737E7C87858484848485877C7E736868737E7C8785 - 8585858585877C7E736868737E7C87878787878787877C7E736868737E7C7C7C - 7C7C7C7C7C7C7C7E736868737E7E7E7E7E7E7E7E7E7E7E7E7368687373737373 - 7373737373737373736868686868686868686868686868686868} - Margin = 4 - Spacing = 10 - OnClick = sBtnFillEffectsClick - end - end - object pnlMiddle: TPanel - Left = 0 - Top = 121 - Width = 148 - Height = 5 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object Bevel1: TBevel - Left = 25 - Top = -2 - Width = 97 - Height = 6 - Shape = bsBottomLine - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmClr.pas b/internal/x.46/ExpressPrinting System/Sources/dxfmClr.pas deleted file mode 100644 index 686a2a87..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmClr.pas +++ /dev/null @@ -1,723 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxfmClr; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - ExtCtrls, Buttons, dxBkgnd; - -const - dxPaletteColCount = 8; - dxPaletteRowCount = 5; - dxPaletteColors: array[0..dxPaletteColCount - 1, 0..dxPaletteRowCount - 1] of TColor = - (($00000000, $00000484, $000004FF, $00FF04FF, $00CE9EFF), - ($00003498, $00006AFF, $00009AFF, $0000CBFF, $0098CFFF), - ($00003C39, $00007D7B, $0000CF9C, $0000FFFF, $0098FFFF), - ($00003400, $00008200, $0084A242, $0000FF00, $00CEFFCE), - ($00633400, $00848600, $00CECF39, $00FFFF00, $00FFFFCE), - ($00840400, $00FF0400, $00FF6531, $00FFCF00, $00FFCF9C), - ($00943431, $009C6563, $00840484, $006B349C, $00FF9ECE), - ($00313431, $007B7D7B, $00949694, $00C6C6C7, $00FFFFFF)); - -type - PdxBackgroundDlgData = ^TdxBackgroundDlgData; - TdxBackgroundDlgData = record - BorderStyle: TFormBorderStyle; - FormCaption: string; - NoBtnCaption: string; - AutoColor: TColor; - ShowFillEffects: Boolean; - ShowMoreColors: Boolean; - end; - - TdxfmColorPalette = class(TForm) - pnlTop: TPanel; - SpeedButton1: TSpeedButton; - SpeedButton2: TSpeedButton; - SpeedButton3: TSpeedButton; - SpeedButton4: TSpeedButton; - SpeedButton5: TSpeedButton; - SpeedButton6: TSpeedButton; - SpeedButton7: TSpeedButton; - SpeedButton8: TSpeedButton; - SpeedButton9: TSpeedButton; - SpeedButton10: TSpeedButton; - SpeedButton11: TSpeedButton; - SpeedButton12: TSpeedButton; - SpeedButton13: TSpeedButton; - SpeedButton14: TSpeedButton; - SpeedButton15: TSpeedButton; - SpeedButton16: TSpeedButton; - SpeedButton17: TSpeedButton; - SpeedButton18: TSpeedButton; - SpeedButton19: TSpeedButton; - SpeedButton20: TSpeedButton; - SpeedButton21: TSpeedButton; - SpeedButton22: TSpeedButton; - SpeedButton23: TSpeedButton; - SpeedButton24: TSpeedButton; - SpeedButton25: TSpeedButton; - SpeedButton26: TSpeedButton; - SpeedButton27: TSpeedButton; - SpeedButton28: TSpeedButton; - SpeedButton29: TSpeedButton; - SpeedButton30: TSpeedButton; - SpeedButton31: TSpeedButton; - SpeedButton32: TSpeedButton; - SpeedButton33: TSpeedButton; - SpeedButton34: TSpeedButton; - SpeedButton35: TSpeedButton; - SpeedButton36: TSpeedButton; - SpeedButton37: TSpeedButton; - SpeedButton38: TSpeedButton; - SpeedButton39: TSpeedButton; - SpeedButton40: TSpeedButton; - pnlBottom: TPanel; - sBtnMoreColors: TSpeedButton; - sBtnFillEffects: TSpeedButton; - bvlNoFillHolder: TBevel; - pnlMiddle: TPanel; - Bevel1: TBevel; - procedure sBtnMoreColorsClick(Sender: TObject); - procedure sBtnFillEffectsClick(Sender: TObject); - procedure ButtonClick(Sender: TObject); - private - FAutoColor: TColor; - FBackground: TdxBackground; - FButtons: array[0..dxPaletteColCount - 1, 0..dxPaletteRowCount - 1] of TSpeedButton; - FColor: TColor; - FNoBtnCaption: string; - FResult: TModalResult; - FShowFillEffects: Boolean; - FShowMoreColors: Boolean; - sbtnNoFill: TSpeedButton; - procedure AdjustHeight; - function GetBorderStyle: TFormBorderStyle; - procedure FindButtonColor; - procedure InitControls; - procedure LoadStrings; - procedure SetAutoColor(Value: TColor); - procedure SetBackground(Value: TdxBackground); - procedure SetBackgroundColor(AColor: TColor); - procedure SetBorderStyle(Value: TFormBorderStyle); - procedure SetColor(Value: TColor); - procedure SetNoBtnCaption(const Value: string); - procedure SetShowFillEffects(Value: Boolean); - procedure SetShowMoreColors(Value: Boolean); - procedure SetupButtons; - function TagToColor(ATag: Integer): TColor; - procedure UpButtons; - procedure WMKillFocus(var message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMNCCalcSize(var message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCCreate(var message: TWMNCCreate); message WM_NCCREATE; - procedure WMNCDestroy(var message: TWMNCDestroy); message WM_NCDESTROY; - procedure WMNCPaint(var message: TWMNCPaint); message WM_NCPAINT; - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - - procedure Initialize(ABackground: TdxBackground; const APosition: TPoint; AData: TdxBackgroundDlgData); virtual; - property Color: TColor read FColor write SetColor; - public - constructor Create(AOwner: TComponent); override; - function Execute: Boolean; - - property AutoColor: TColor read FAutoColor write SetAutoColor; - property Background: TdxBackground read FBackground write SetBackground; - property BorderStyle: TFormBorderStyle read GetBorderStyle write SetBorderStyle; - property NoBtnCaption: string read FNoBtnCaption write SetNoBtnCaption; - property ShowFillEffects: Boolean read FShowFillEffects write SetShowFillEffects; - property ShowMoreColors: Boolean read FShowMoreColors write SetShowMoreColors; - end; - -function dxChooseBackgroundDlg(ABackground: TdxBackground; APosition: TPoint; - const AParams: PdxBackgroundDlgData): Boolean; overload; {$IFDEF DELPHI6} deprecated; {$ENDIF} -function dxChooseBackgroundDlg(ABackground: TdxBackground; APosition: TPoint; - const AParams: TdxBackgroundDlgData): Boolean; overload; -function dxDefaultBackgroundDlgData: TdxBackgroundDlgData; - -implementation - -{$R *.DFM} - -uses - cxClasses, dxPSRes, dxPSUtl, dxPSEngn, dxPSImgs, dxPSGlbl; - -function dxChooseBackgroundDlg(ABackground: TdxBackground; APosition: TPoint; - const AParams: PdxBackgroundDlgData): Boolean; -var - Params: TdxBackgroundDlgData; -begin - if AParams = nil then - Params := dxDefaultBackgroundDlgData - else - Params := AParams^; - Result := dxChooseBackgroundDlg(ABackground, APosition, Params); -end; - -function dxChooseBackgroundDlg(ABackground: TdxBackground; APosition: TPoint; - const AParams: TdxBackgroundDlgData): Boolean; -begin - with TdxfmColorPalette.Create(nil) do - try - Initialize(ABackground, APosition, AParams); - Result := Execute; - finally - Free; - end; -end; - -function dxDefaultBackgroundDlgData: TdxBackgroundDlgData; -//const -// BorderStyleMap: array[TdxPSLookAndFeel] of TBorderStyle = -begin - with Result do - begin - BorderStyle := Forms.bsNone; - FormCaption := cxGetResourceString(@sdxPageBackground); - NoBtnCaption := cxGetResourceString(@sdxBtnNoFill); - AutoColor := clBlack; - ShowFillEffects := True; - ShowMoreColors := True; - end; -end; - -{ TdxNoFillButton } - -type - TdxNoFillButton = class(TSpeedButton) - private - FColorGlyph: TBitmap; - FColorValue: TColor; - FShowColorValue: Boolean; - procedure SetColorValue(Value: TColor); - procedure SetShowColorValue(Value: Boolean); - procedure ChangeColorGlyph; - procedure CreateColorGlyph; - procedure DestroyColorGlyph; - protected - procedure Paint; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - property ColorValue: TColor read FColorValue write SetColorValue; - property ShowColorValue: Boolean read FShowColorValue write SetShowColorValue; - end; - -constructor TdxNoFillButton.Create(AOwner: TComponent); -begin - inherited; - FColorValue := clBlack; - ShowColorValue := False; -end; - -destructor TdxNoFillButton.Destroy; -begin - DestroyColorGlyph; - inherited; -end; - -procedure TdxNoFillButton.Paint; -var - R: TRect; -begin - inherited; - R := ClientRect; - InflateRect(R, -2, -2); - if Screen.PixelsPerInch > 96 then - InflateRect(R, -2, -2); - DrawEdge(Canvas.Handle, R, BDR_SUNKENOUTER, BF_RECT or BF_FLAT); -end; - -procedure TdxNoFillButton.CreateColorGlyph; -var - R: TRect; -begin - FColorGlyph := TBitmap.Create; - R := ClientRect; - InflateRect(R, -2, -2); - OffsetRect(R, -R.Left, -R.Top); - R.Right := R.Bottom - R.Top; - FColorGlyph.Width := R.Right - R.Left; - FColorGlyph.Height := R.Bottom - R.Top; - FrameRect(FColorGlyph.Canvas.Handle, R, GetSysColorBrush(COLOR_BTNSHADOW)); - ChangeColorGlyph; -end; - -procedure TdxNoFillButton.DestroyColorGlyph; -begin - Glyph := nil; - FreeAndNil(FColorGlyph); -end; - -procedure TdxNoFillButton.ChangeColorGlyph; -var - R: TRect; -begin - R := MakeRect(0, 0, FColorGlyph.Width, FColorGlyph.Height); - InflateRect(R, -1, -1); - FColorGlyph.Canvas.Brush.Color := ColorToRGB(ColorValue); - FColorGlyph.Canvas.FillRect(R); - Glyph := FColorGlyph; -end; - -procedure TdxNoFillButton.SetColorValue(Value: TColor); -begin - if FColorValue <> Value then - begin - FColorValue := Value; - if ShowColorValue then - begin - ChangeColorGlyph; - Invalidate; - end; - end; -end; - -procedure TdxNoFillButton.SetShowColorValue(Value: Boolean); -begin - if FShowColorValue <> Value then - begin - FShowColorValue := Value; - if FShowColorValue then - CreateColorGlyph - else - DestroyColorGlyph; - Invalidate; - end; -end; - -{ TdxfmColorPalette } - -constructor TdxfmColorPalette.Create(AOwner: TComponent); -begin - inherited; - ControlStyle := ControlStyle - [csCaptureMouse]; - FShowFillEffects := True; - FShowMoreColors := True; - InitControls; - LoadStrings; - - sbtnNoFill := TdxNoFillButton.Create(Self); - with sbtnNoFill do - begin - BoundsRect := bvlNoFillHolder.BoundsRect; - Parent := pnlTop; - Down := True; - AllowAllUp := False; - GroupIndex := 1; - Tag := MakeTTag(-1); - Flat := True; - Caption := FNoBtnCaption; - OnClick := ButtonClick; - end; - FormStyle := fsStayOnTop; -end; - -function TdxfmColorPalette.Execute: Boolean; -begin - FResult := mrNone; - Show; - while FResult = mrNone do Application.HandleMessage; - Result := FResult = mrOK; -end; - -procedure TdxfmColorPalette.CreateParams(var Params: TCreateParams); -begin - inherited; - Params.WindowClass.Style := Params.WindowClass.Style or CS_SAVEBITS; -end; - -procedure TdxfmColorPalette.KeyDown(var Key: Word; Shift: TShiftState); -begin - if (Key = VK_ESCAPE) or (ssAlt in Shift) then - Close - else - if Key = Ord('f') then - sBtnFillEffects.Click - else - if Key = Ord('b') then - sBtnMoreColors.Click - else - inherited; -end; - -procedure TdxfmColorPalette.Initialize(ABackground: TdxBackground; - const APosition: TPoint; AData: TdxBackgroundDlgData); -var - R: TRect; -begin - Background := ABackground; - - BorderStyle := AData.BorderStyle; - Caption := AData.FormCaption; - NoBtnCaption := AData.NoBtnCaption; - AutoColor := AData.AutoColor; - ShowFillEffects := AData.ShowFillEffects; - ShowMoreColors := AData.ShowMoreColors; - - Left := APosition.X; - Top := APosition.Y; - R := GetDesktopWorkArea; - - if Left + Width > R.Right then - Left := R.Right - Width; - if Left < R.Left then - Left := R.Left; - if Top + Height > R.Bottom then - Top := R.Bottom - Height; -end; - -procedure TdxfmColorPalette.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - FResult := mrCancel; - Hide; -end; - -procedure TdxfmColorPalette.WMNCCreate(var Message: TWMNCCreate); -var - SysMenu: HMENU; -begin - inherited; - SysMenu := GetSystemMenu(Handle, False); - DeleteMenu(SysMenu, SC_RESTORE, MF_BYCOMMAND); - DeleteMenu(SysMenu, SC_MINIMIZE, MF_BYCOMMAND); - DeleteMenu(SysMenu, SC_MAXIMIZE, MF_BYCOMMAND); - DeleteMenu(SysMenu, SC_SIZE, MF_BYCOMMAND); -end; - -procedure TdxfmColorPalette.WMNCDestroy(var Message: TWMNCDestroy); -begin - GetSystemMenu(Handle, True); - inherited; -end; - -procedure TdxfmColorPalette.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - if BorderStyle = bsNone then - InflateRect(TWMNCCalcSize(Message).CalcSize_Params^.rgrc[0], -2, -2) - else - inherited; -end; - -procedure TdxfmColorPalette.WMNCPaint(var message: TWMNCPaint); -var - R: TRect; - DC: HDC; -begin - if BorderStyle = bsNone then - begin - GetWindowRect(Handle, R); - OffsetRect(R, -R.Left, -R.Top); - DC := GetWindowDC(Handle); - try - DrawEdge(DC, R, EDGE_RAISED, BF_ADJUST or BF_RECT); - finally - ReleaseDC(Handle, DC); - end; - end - else - inherited; -end; - -procedure TdxfmColorPalette.SetNoBtnCaption(const Value: string); -begin - if FNoBtnCaption <> Value then - begin - FNoBtnCaption := Value; - sbtnNoFill.Caption := FNoBtnCaption; - end; -end; - -procedure TdxfmColorPalette.SetShowFillEffects(Value: Boolean); -begin - if FShowFillEffects <> Value then - begin - FShowFillEffects := Value; - pnlBottom.Visible := FShowMoreColors or FShowFillEffects; - pnlMiddle.Visible := pnlBottom.Visible; - AdjustHeight; - end; -end; - -procedure TdxfmColorPalette.SetShowMoreColors(Value: Boolean); -begin - if FShowMoreColors <> Value then - begin - FShowMoreColors := Value; - pnlBottom.Visible := FShowMoreColors or FShowFillEffects; - pnlMiddle.Visible := pnlBottom.Visible; - AdjustHeight; - end; -end; - -function TdxfmColorPalette.GetBorderStyle: TFormBorderStyle; -begin - Result := inherited BorderStyle; -end; - -procedure TdxfmColorPalette.SetBorderStyle(Value: TFormBorderStyle); -begin - inherited BorderStyle := Value; - AdjustHeight; -end; - -procedure TdxfmColorPalette.AdjustHeight; -var - H: Integer; -begin - H := pnlTop.Height; - if pnlMiddle.Visible then Inc(H, pnlMiddle.Height); - if pnlBottom.Visible then Inc(H, pnlBottom.Height); - ClientHeight := H; -end; - -procedure TdxfmColorPalette.InitControls; - - procedure PrepareButtonGlyph(AGlyph: TBitmap; I, J: Integer); - const - W = 16; - H = 16; - var - R: TRect; - begin - R := MakeRect(0, 0, W, H); - AGlyph.Width := W; - AGlyph.Height := H; - with AGlyph.Canvas do - begin - Brush.Color := clBtnFace; - FrameRect(R); - InflateRect(R, -1, -1); - FrameRect(R); - InflateRect(R, -1, -1); - - Brush.Color := clBtnShadow; - FrameRect(R); - InflateRect(R, -1, -1); - - Brush.Color := ColorToRGB(dxPaletteColors[I, J]); - FillRect(R); - end; - end; - - -var - I, J, Index: Integer; - ButtonName: string; -begin - for J := 0 to dxPaletteRowCount - 1 do - for I := 0 to dxPaletteColCount - 1 do - begin - Index := J * dxPaletteColCount + I; - ButtonName := 'SpeedButton' + Trim(IntToStr(Index + 1)); - FButtons[I, J] := TSpeedButton(Self.FindComponent(ButtonName)); - FButtons[I, J].Tag := MakeTTag(Index); - PrepareButtonGlyph(FButtons[I, J].Glyph, I, J); - end; -end; - -procedure TdxfmColorPalette.LoadStrings; -begin - sBtnMoreColors.Caption := cxGetResourceString(@sdxBtnMoreColors); - sBtnFillEffects.Caption := cxGetResourceString(@sdxBtnFillEffects); - - SpeedButton1.Hint := cxGetResourceString(@sdxColorBlack); - SpeedButton9.Hint := cxGetResourceString(@sdxColorDarkRed); - SpeedButton17.Hint := cxGetResourceString(@sdxColorRed); - SpeedButton25.Hint := cxGetResourceString(@sdxColorPink); - SpeedButton33.Hint := cxGetResourceString(@sdxColorRose); - SpeedButton2.Hint := cxGetResourceString(@sdxColorBrown); - SpeedButton10.Hint := cxGetResourceString(@sdxColorOrange); - SpeedButton18.Hint := cxGetResourceString(@sdxColorLightOrange); - SpeedButton26.Hint := cxGetResourceString(@sdxColorGold); - SpeedButton34.Hint := cxGetResourceString(@sdxColorTan); - SpeedButton3.Hint := cxGetResourceString(@sdxColorOliveGreen); - SpeedButton11.Hint := cxGetResourceString(@sdxColorDrakYellow); - SpeedButton19.Hint := cxGetResourceString(@sdxColorLime); - SpeedButton27.Hint := cxGetResourceString(@sdxColorYellow); - SpeedButton35.Hint := cxGetResourceString(@sdxColorLightYellow); - SpeedButton4.Hint := cxGetResourceString(@sdxColorDarkGreen); - SpeedButton12.Hint := cxGetResourceString(@sdxColorGreen); - SpeedButton20.Hint := cxGetResourceString(@sdxColorSeaGreen); - SpeedButton28.Hint := cxGetResourceString(@sdxColorBrighthGreen); - SpeedButton36.Hint := cxGetResourceString(@sdxColorLightGreen); - SpeedButton5.Hint := cxGetResourceString(@sdxColorDarkTeal); - SpeedButton13.Hint := cxGetResourceString(@sdxColorTeal); - SpeedButton21.Hint := cxGetResourceString(@sdxColorAqua); - SpeedButton29.Hint := cxGetResourceString(@sdxColorTurquoise); - SpeedButton37.Hint := cxGetResourceString(@sdxColorLightTurquoise); - SpeedButton6.Hint := cxGetResourceString(@sdxColorDarkBlue); - SpeedButton14.Hint := cxGetResourceString(@sdxColorBlue); - SpeedButton22.Hint := cxGetResourceString(@sdxColorLightBlue); - SpeedButton30.Hint := cxGetResourceString(@sdxColorSkyBlue); - SpeedButton38.Hint := cxGetResourceString(@sdxColorPaleBlue); - SpeedButton7.Hint := cxGetResourceString(@sdxColorIndigo); - SpeedButton15.Hint := cxGetResourceString(@sdxColorBlueGray); - SpeedButton23.Hint := cxGetResourceString(@sdxColorViolet); - SpeedButton31.Hint := cxGetResourceString(@sdxColorPlum); - SpeedButton39.Hint := cxGetResourceString(@sdxColorLavender); - SpeedButton8.Hint := cxGetResourceString(@sdxColorGray80); - SpeedButton16.Hint := cxGetResourceString(@sdxColorGray50); - SpeedButton24.Hint := cxGetResourceString(@sdxColorGray40); - SpeedButton32.Hint := cxGetResourceString(@sdxColorGray25); - SpeedButton40.Hint := cxGetResourceString(@sdxColorWhite); -end; - -procedure TdxfmColorPalette.SetColor(Value: TColor); -begin - FColor := Value; - FindButtonColor; -end; - -procedure TdxfmColorPalette.FindButtonColor; -var - I, J: Integer; -begin - for I := 0 to dxPaletteColCount - 1 do - for J := 0 to dxPaletteRowCount - 1 do - if FColor = dxPaletteColors[I, J] then - begin - FButtons[I, J].Down := True; - Exit; - end; - UpButtons; -end; - -procedure TdxfmColorPalette.UpButtons; -var - I, J: Integer; -begin - for I := 0 to dxPaletteColCount - 1 do - for J := 0 to dxPaletteRowCount - 1 do - begin - FButtons[I, J].AllowAllUp := True; - FButtons[I, J].Down := False; - end; - sbtnNoFill.AllowAllUp := True; - sbtnNoFill.Down := False; -end; - -procedure TdxfmColorPalette.sBtnMoreColorsClick(Sender: TObject); -begin - Hide; - dxPSGlbl.ColorDialog.Color := FColor; - if dxPSGlbl.ColorDialog.Execute then - begin - SetBackgroundColor(dxPSGlbl.ColorDialog.Color); - FResult := mrOK; - end - else - FResult := mrCancel; -end; - -procedure TdxfmColorPalette.sBtnFillEffectsClick(Sender: TObject); -const - ModalResults: array[Boolean] of TModalResult = (mrCancel, mrOK); -begin - Hide; - Application.ProcessMessages; - FResult := ModalResults[Background.SetupEffects]; -end; - -procedure TdxfmColorPalette.SetupButtons; -begin - if FBackground <> nil then - case FBackground.Mode of - bmNone: - sbtnNoFill.Down := True; - bmBrush: - Color := FBackground.Brush.Color - else // bmBrushBitmap, bmPicture - UpButtons; - end; -end; - -procedure TdxfmColorPalette.SetAutoColor(Value: TColor); -begin - if FAutoColor <> Value then - begin - FAutoColor := Value; - TdxNoFillButton(sbtnNoFill).ColorValue := FAutoColor; - end; -end; - -procedure TdxfmColorPalette.SetBackground(Value: TdxBackground); -begin - FBackground := Value; - SetupButtons; -end; - -function TdxfmColorPalette.TagToColor(ATag: Integer): TColor; -var - T: Integer; -begin - T := TTagToInt(ATag); - Result := dxPaletteColors[T - (T div dxPaletteColCount) * dxPaletteColCount, T div dxPaletteColCount]; -end; - -procedure TdxfmColorPalette.SetBackgroundColor(AColor: TColor); -begin - with Background do - begin - BeginUpdate; - try - Mode := bmBrush; - Brush.Style := bsSolid; - Brush.Color := AColor; - finally - EndUpdate; - end; - end; -end; - -procedure TdxfmColorPalette.ButtonClick(Sender: TObject); -begin - if TTagToInt(TSpeedButton(Sender).Tag) = -1 then // No Fill - Background.Clear - else - SetBackgroundColor(TagToColor(TSpeedButton(Sender).Tag)); - FResult := mrOk; -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmDTFmt.dfm b/internal/x.46/ExpressPrinting System/Sources/dxfmDTFmt.dfm deleted file mode 100644 index b078c756..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmDTFmt.dfm +++ /dev/null @@ -1,106 +0,0 @@ -object dxfmDateTimeFormats: TdxfmDateTimeFormats - Left = 350 - Top = 153 - ActiveControl = lbxDateFormats - BorderStyle = bsDialog - Caption = 'Change Date and Time Formats' - ClientHeight = 342 - ClientWidth = 282 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 41 - Top = 313 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 122 - Top = 313 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 203 - Top = 313 - Width = 75 - Height = 23 - Caption = '&Help' - TabOrder = 3 - end - object GroupBox1: TGroupBox - Left = 4 - Top = 4 - Width = 274 - Height = 301 - TabOrder = 0 - object lblAvailableDateFormats: TLabel - Left = 10 - Top = 13 - Width = 115 - Height = 13 - Caption = 'Available &Date Formats:' - FocusControl = lbxDateFormats - OnClick = lblAvailableDateFormatsClick - end - object lblAvailableTimeFormats: TLabel - Left = 10 - Top = 187 - Width = 114 - Height = 13 - Caption = 'Available Time &Formats:' - FocusControl = lbxTimeFormats - OnClick = lblAvailableDateFormatsClick - end - object lbxDateFormats: TListBox - Left = 8 - Top = 28 - Width = 257 - Height = 150 - ItemHeight = 13 - TabOrder = 0 - OnClick = lbxDateFormatsClick - OnDblClick = lbxDTFormatsDblClick - end - object lbxTimeFormats: TListBox - Left = 8 - Top = 203 - Width = 257 - Height = 59 - ItemHeight = 13 - TabOrder = 1 - OnClick = TimeFormatsChanged - OnDblClick = lbxDTFormatsDblClick - end - object chbxAutoUpdate: TCheckBox - Left = 8 - Top = 274 - Width = 160 - Height = 17 - Caption = '&Update Automatically ' - TabOrder = 2 - OnClick = chbxAutoUpdateClick - end - object btnDefault: TButton - Left = 175 - Top = 270 - Width = 90 - Height = 23 - Caption = '&Default ...' - TabOrder = 3 - OnClick = btnDefaultClick - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmDTFmt.pas b/internal/x.46/ExpressPrinting System/Sources/dxfmDTFmt.pas deleted file mode 100644 index de532b6a..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmDTFmt.pas +++ /dev/null @@ -1,301 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxfmDTFmt; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - ComCtrls, StdCtrls, ExtCtrls, dxPSForm; - -type - TdxfmDateTimeFormats = class(TCustomdxPSForm) - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - GroupBox1: TGroupBox; - lblAvailableDateFormats: TLabel; - lbxDateFormats: TListBox; - lblAvailableTimeFormats: TLabel; - lbxTimeFormats: TListBox; - chbxAutoUpdate: TCheckBox; - btnDefault: TButton; - procedure btnDefaultClick(Sender: TObject); - procedure TimeFormatsChanged(Sender: TObject); - procedure lblAvailableDateFormatsClick(Sender: TObject); - procedure lbxDateFormatsClick(Sender: TObject); - procedure chbxAutoUpdateClick(Sender: TObject); - procedure lbxDTFormatsDblClick(Sender: TObject); - private - FAutoUpdateDateTime: Boolean; - FControlsUpdating: Boolean; - FDateFormatIndex: Integer; - FDateFormats: TStrings; - FDTFormatIndexChanged: Boolean; - FModified: Boolean; - FSetDateTimeFormatAsDefault: Boolean; - FTimeFormatIndex: Integer; - FTimeFormats: TStrings; - - procedure CheckModified; - procedure LoadStrings; - procedure SetDateFormats(Value: TStrings); - procedure SetTimeFormats(Value: TStrings); - procedure StartSettings; - procedure UpdateControlsState; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; - - property AutoUpdateDateTime: Boolean read FAutoUpdateDateTime write FAutoUpdateDateTime; - property DateFormatIndex: Integer read FDateFormatIndex write FDateFormatIndex; - property DateFormats: TStrings read FDateFormats write SetDateFormats; - property SetDateTimeFormatAsDefault: Boolean read FSetDateTimeFormatAsDefault - write FSetDateTimeFormatAsDefault; - property TimeFormatIndex: Integer read FTimeFormatIndex write FTimeFormatIndex; - property TimeFormats: TStrings read FTimeFormats write SetTimeFormats; - end; - - PdxDateTimeFormatDlgData = ^TdxDateTimeFormatDlgData; - TdxDateTimeFormatDlgData = record - AutoUpdateDateTime: Boolean; - DateFormatIndex: Integer; - DateFormats: TStrings; - ShowAsDefaultButton: Boolean; - SetDateTimeFormatAsDefault: Boolean; - TimeFormatIndex: Integer; - TimeFormats: TStrings; - HelpContext: THelpContext; - end; - -function dxShowDateTimeFormatDlg(var AFormatsDlgData: TdxDateTimeFormatDlgData): Boolean; - -implementation - -{$R *.DFM} - -uses - Registry, cxClasses, dxExtCtrls, dxPSRes, dxPSGlbl, dxPSUtl, dxPgsDlg; - -function dxShowDateTimeFormatDlg(var AFormatsDlgData: TdxDateTimeFormatDlgData): Boolean; - - function CheckFormats: Boolean; - begin - with AFormatsDlgData do - Result := (DateFormats <> nil) and (TimeFormats <> nil) and - (DateFormatIndex > -1) and (DateFormatIndex < DateFormats.Count) and - (TimeFormatIndex > -1) and (TimeFormatIndex < TimeFormats.Count - 1); - end; - -var - Dialog: TdxfmDateTimeFormats; -begin - Result := False; - if not CheckFormats then Exit; - - Dialog := TdxfmDateTimeFormats.Create(nil); - try - with AFormatsDlgData do - begin - Dialog.AutoUpdateDateTime := AutoUpdateDateTime; - Dialog.DateFormats := DateFormats; - Dialog.FDateFormatIndex := DateFormatIndex; - Dialog.TimeFormats := TimeFormats; - Dialog.FTimeFormatIndex := TimeFormatIndex; - Dialog.AutoUpdateDateTime := AutoUpdateDateTime; - Dialog.btnDefault.Visible := ShowAsDefaultButton; - if HelpContext <> 0 then - Dialog.HelpContext := HelpContext; - end; - Result := Dialog.Execute; - if Result then - with AFormatsDlgData do - begin - DateFormatIndex := Dialog.DateFormatIndex; - TimeFormatIndex := Dialog.TimeFormatIndex; - AutoUpdateDateTime := Dialog.AutoUpdateDateTime; - SetDateTimeFormatAsDefault := Dialog.SetDateTimeFormatAsDefault; - end; - finally - Dialog.Free; - end; -end; - -{ TdxfmDateTimeFormats } - -constructor TdxfmDateTimeFormats.Create(AOwner: TComponent); -begin - inherited; - HelpContext := dxhcDateTimeFormatDlg; - btnHelp.Visible := HelpContext <> 0; - if HelpContext <> 0 then - BorderIcons := BorderIcons + [biHelp] - else - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - end; - FDateFormats := TStringList.Create; - FTimeFormats := TStringList.Create; - LoadStrings; -end; - -destructor TdxfmDateTimeFormats.Destroy; -begin - FTimeFormats.Free; - FDateFormats.Free; - inherited; -end; - -procedure TdxfmDateTimeFormats.SetDateFormats(Value: TStrings); -begin - DateFormats.Assign(Value); -end; - -procedure TdxfmDateTimeFormats.SetTimeFormats(Value: TStrings); -begin - TimeFormats.Assign(Value); -end; - -procedure TdxfmDateTimeFormats.UpdateControlsState; -begin - btnDefault.Enabled := (lbxDateFormats.ItemIndex > -1) and (lbxTimeFormats.ItemIndex > -1); - // btnOK.Enabled := FModified; -end; - -procedure TdxfmDateTimeFormats.CheckModified; -begin - FModified := True; - UpdateControlsState; -end; - -procedure TdxfmDateTimeFormats.StartSettings; -begin - FControlsUpdating := True; - try - with lbxDateFormats do - begin - Items.Clear; - GetFormatedDateStrings(Date, DateFormats, Items); - if Items.Count > 0 then ItemIndex := FDateFormatIndex; - end; - with lbxTimeFormats do - begin - Items.Clear; - GetFormatedTimeStrings(Time, TimeFormats, Items); - if (Items.Count > 0) then ItemIndex := FTimeFormatIndex; - end; - chbxAutoUpdate.Checked := AutoUpdateDateTime; - finally - FControlsUpdating := false; - end; - UpdateControlsState; -end; - -procedure TdxfmDateTimeFormats.LoadStrings; -begin - Caption := cxGetResourceString(@sdxDTFormatsCaption); - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - btnDefault.Caption := cxGetResourceString(@sdxBtnDefault); - lblAvailableDateFormats.Caption := cxGetResourceString(@sdxDTFormatsAvailableDateFormats); - lblAvailableTimeFormats.Caption := cxGetResourceString(@sdxDTFormatsAvailableTimeFormats); - chbxAutoUpdate.Caption := cxGetResourceString(@sdxDTFormatsAutoUpdate); -end; - -function TdxfmDateTimeFormats.Execute: Boolean; -begin - StartSettings; - FModified := False; - Result := (ShowModal = mrOK) and FModified; -end; - -procedure TdxfmDateTimeFormats.btnDefaultClick(Sender: TObject); -var - S: string; -begin - try - S := Format(cxGetResourceString(@sdxDTFormatsChangeDefaultFormat), - [lbxDateFormats.Items[lbxDateFormats.ItemIndex], - lbxTimeFormats.Items[lbxTimeFormats.ItemIndex]]); - if MessageQuestion(S) then - begin - FSetDateTimeFormatAsDefault := True; - CheckModified; - end; - except - Application.HandleException(Self); - end; -end; - -procedure TdxfmDateTimeFormats.lbxDateFormatsClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - DateFormatIndex := TListBox(Sender).ItemIndex; - FDTFormatIndexChanged := True; - CheckModified; -end; - -procedure TdxfmDateTimeFormats.TimeFormatsChanged(Sender: TObject); -begin - if FControlsUpdating then Exit; - TimeFormatIndex := TListBox(Sender).ItemIndex; - FDTFormatIndexChanged := True; - CheckModified; -end; - -procedure TdxfmDateTimeFormats.chbxAutoUpdateClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - AutoUpdateDateTime := TCheckBox(Sender).Checked; - CheckModified; -end; - -procedure TdxfmDateTimeFormats.lblAvailableDateFormatsClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; -end; - -procedure TdxfmDateTimeFormats.lbxDTFormatsDblClick(Sender: TObject); -begin - ModalResult := mrOk; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmDfnStl.dfm b/internal/x.46/ExpressPrinting System/Sources/dxfmDfnStl.dfm deleted file mode 100644 index ceb4453e..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmDfnStl.dfm +++ /dev/null @@ -1,409 +0,0 @@ -object dxfmDefinePrintStyles: TdxfmDefinePrintStyles - Left = 414 - Top = 232 - ActiveControl = lbxPrintStyles - BorderStyle = bsDialog - Caption = 'Define Print Styles' - ClientHeight = 193 - ClientWidth = 282 - Color = clBtnFace - Constraints.MinHeight = 220 - Constraints.MinWidth = 290 - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000004 - 4444000000004444474F444440004477774FFFF440004477774FFFF440004477 - 774FFFF440004477774FFFF440004477774FFFF444444477774FFFF44F444477 - 7474FFF44F44044447774444FF440004477774FFFF440004477774FFFF440004 - 477774FFFF4400044777404FFF4400004444000444400000000000000000E0FF - 0000000700000007000000070000000700000007000000000000000000000000 - 000080000000E0000000E0000000E0000000E0400000F0E10000FFFF0000} - KeyPreview = True - OldCreateOrder = True - Position = poScreenCenter - OnResize = FormResize - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object lblPrintStyles: TLabel - Left = 3 - Top = 5 - Width = 58 - Height = 13 - Caption = 'Print &Styles:' - FocusControl = lbxPrintStyles - end - object btnEdit: TButton - Left = 196 - Top = 24 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Edit...' - TabOrder = 0 - OnClick = EditClick - end - object btnCopy: TButton - Left = 196 - Top = 53 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Copy...' - TabOrder = 1 - OnClick = CopyClick - end - object btnReset: TButton - Left = 196 - Top = 82 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Reset...' - TabOrder = 2 - OnClick = ResetClick - end - object btnClose: TButton - Left = 196 - Top = 133 - Width = 80 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Close' - Default = True - ModalResult = 1 - TabOrder = 3 - end - object btnHelp: TButton - Left = 196 - Top = 162 - Width = 80 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = '&Help' - ModalResult = 1 - TabOrder = 4 - end - object lbxPrintStyles: TListBox - Left = 0 - Top = 24 - Width = 189 - Height = 169 - Anchors = [akLeft, akTop, akRight, akBottom] - ItemHeight = 34 - PopupMenu = pmPrintStyles - Style = lbOwnerDrawFixed - TabOrder = 5 - OnClick = lbxPrintStylesClick - OnDblClick = EditClick - OnDrawItem = lbxPrintStylesDrawItem - end - object pmPrintStyles: TPopupMenu - OnPopup = pmPrintStylesPopup - Left = 26 - Top = 120 - object miEdit: TMenuItem - Caption = '&Edit ...' - Default = True - ShortCut = 16397 - OnClick = EditClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miCopy: TMenuItem - Caption = '&Copy ...' - ShortCut = 45 - OnClick = CopyClick - end - object miReset: TMenuItem - Caption = '&Reset ...' - OnClick = ResetClick - end - object miClear: TMenuItem - Caption = 'C&lear ...' - OnClick = ClearClick - end - end - object ilPrintStyles: TImageList - AllocBy = 2 - Left = 54 - Top = 120 - Bitmap = { - 494C010104000800040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008400000084000000840000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000840000008400 - 0000840000008400000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000840000008400 - 000084000000840000008484840084000000FFFFFF0084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF0000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000FFFFFF008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000FFFFFF008400000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000084000000840000008400000084000000840000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 84008484840084848400840000000000000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000 - 0000000000000000000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000084000000840000008400 - 00008400000084000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - F83FFC01FFF9C0070001FC01E7FFC0070001FC01C3F3C00700010001C3E7C007 - 00010001E1C7C00700010001F08FC00700010001F81FC00700010003FC3FC007 - 00010007F81FC0070001000FF09FC007010100FFC1C7C00F838301FF83E3C01F - FFFF03FF8FF1C03FFFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmDfnStl.pas b/internal/x.46/ExpressPrinting System/Sources/dxfmDfnStl.pas deleted file mode 100644 index 71e7882a..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmDfnStl.pas +++ /dev/null @@ -1,482 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxfmDfnStl; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, ComCtrls, ExtCtrls, Menus, ImgList, dxPSESys, dxPSForm, dxPgsDlg; - -type - TdxfmDefinePrintStyles = class(TCustomdxPSForm) - pmPrintStyles: TPopupMenu; - miEdit: TMenuItem; - miLine1: TMenuItem; - miCopy: TMenuItem; - miReset: TMenuItem; - ilPrintStyles: TImageList; - miClear: TMenuItem; - btnEdit: TButton; - btnCopy: TButton; - btnReset: TButton; - btnClose: TButton; - btnHelp: TButton; - lbxPrintStyles: TListBox; - lblPrintStyles: TLabel; - procedure EditClick(Sender: TObject); - procedure CopyClick(Sender: TObject); - procedure ResetClick(Sender: TObject); - procedure pmPrintStylesPopup(Sender: TObject); - procedure lbxPrintStylesClick(Sender: TObject); - procedure lbxPrintStylesDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure ClearClick(Sender: TObject); - procedure FormResize(Sender: TObject); - procedure FormShow(Sender: TObject); - private - FPrevClassStyle: DWORD; - FPrevWindowProc: TWndMethod; - FSubscriber: TdxEventSubscriber; - FBtnDelCaptions: array[Boolean] of string; - FBtnCopyCaptions: array[Boolean] of string; - FPreviewBtnClicked: Boolean; - FPrintBtnClicked: Boolean; - FStyleManager: TdxPrintStyleManager; - procedure SetStyleManager(Value: TdxPrintStyleManager); - - procedure AddPrintStyle(AClonedIndex: Integer); - procedure FillRestSpace(DC: hDC); - procedure Initialize; - procedure LoadStrings; - procedure RefreshStyleList; - procedure StyleListChanged(Sender: TObject); - procedure UpdateControlsState; - - procedure ListBoxWndProc(var Message: TMessage); - procedure RestoreWndProc; - procedure SubstWindowProc; - protected - procedure CreateWnd; override; - procedure BeforeConstruction; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; - - property PreviewBtnClicked: Boolean read FPreviewBtnClicked; - property PrintBtnClicked: Boolean read FPrintBtnClicked; - property StyleManager: TdxPrintStyleManager read FStyleManager write SetStyleManager; - end; - - PdxDefinePrintStylesDlgData = ^TdxDefinePrintStylesDlgData; - TdxDefinePrintStylesDlgData = record - StyleManager: TdxPrintStyleManager; - Title: string; - PreviewBtnClicked: Boolean; - PrintBtnClicked: Boolean; - end; - -procedure dxDefinePrintStylesDlg(var AData: TdxDefinePrintStylesDlgData); - -implementation - -{$R *.DFM} - -uses - Registry, cxClasses, dxPSRes, dxPSEngn, dxPSEvnt, dxPSPopupMan, dxPSGlbl, - dxPSUtl; - -procedure dxDefinePrintStylesDlg(var AData: TdxDefinePrintStylesDlgData); -var - Dialog: TdxfmDefinePrintStyles; -begin - if AData.StyleManager = nil then - begin - AData.PreviewBtnClicked := False; - AData.PrintBtnClicked := False; - Exit; - end; - Dialog := TdxfmDefinePrintStyles.Create(nil); - try - Dialog.StyleManager := AData.StyleManager; - Dialog.Caption := AData.Title; - Dialog.Execute; - Dialog.StyleManager := nil; - AData.PreviewBtnClicked := Dialog.PreviewBtnClicked; - AData.PrintBtnClicked := Dialog.PrintBtnClicked; - finally - Dialog.Free; - end; -end; - -function MessageWarning(const Message: string): Boolean; -begin - MessageBeep(MB_ICONEXCLAMATION); - Result := IDOK = Application.MessageBox(PChar(Message), - PChar(Application.Title), MB_OKCANCEL or MB_ICONEXCLAMATION); -end; - -{ TfmdxDefinePrintStyles } - -constructor TdxfmDefinePrintStyles.Create(AOwner: TComponent); -begin - HelpContext := dxhcDefinePrintStyleDlg; - inherited; - - pmPrintStyles.Images := ilPrintStyles; - miEdit.ImageIndex := 0; - miCopy.ImageIndex := 1; - - FSubscriber := TdxStyleListChangedSubscriber.Create([TdxSMStyleListChangedEvent]); - TdxStyleListChangedSubscriber(FSubscriber).OnStyleListChanged := StyleListChanged; - SubstWindowProc; - dxPSPopupMenuController.RegisterControl(lbxPrintStyles); - LoadStrings; -end; - -destructor TdxfmDefinePrintStyles.Destroy; -begin - dxPSPopupMenuController.UnregisterControl(lbxPrintStyles); - RestoreWndProc; - FreeAndNil(FSubscriber); - inherited; -end; - -function TdxfmDefinePrintStyles.Execute: Boolean; -begin - Initialize; - ShowModal; - Result := True; - if (StyleManager <> nil) and (lbxPrintStyles.ItemIndex <> -1) then - StyleManager.CurrentStyleIndex := lbxPrintStyles.ItemIndex; -end; - -procedure TdxfmDefinePrintStyles.CreateWnd; -begin - inherited; - SendMessage(Handle, WM_SETICON, 1, Icon.Handle); -end; - -procedure TdxfmDefinePrintStyles.BeforeConstruction; -begin - inherited; - Options := Options + [foSizeableDialog]; -end; - -procedure TdxfmDefinePrintStyles.SetStyleManager(Value: TdxPrintStyleManager); -begin - if FStyleManager <> Value then - begin - FStyleManager := Value; - if FStyleManager <> nil then - begin - Caption := Value.Title; - if Value.HelpContext <> 0 then HelpContext := Value.HelpContext; - end; - end; -end; - -procedure TdxfmDefinePrintStyles.AddPrintStyle(AClonedIndex: Integer); -var - Style: TBasedxPrintStyle; - Result: Boolean; -begin - Result := False; - Style := StyleManager.BeginClone(AClonedIndex); - if Style = nil then Exit; - try - Result := Style.PageSetup(0, True, True, FPreviewBtnClicked, FPrintBtnClicked); - if Result or FPreviewBtnClicked or FPrintBtnClicked then - begin - lbxPrintStyles.Items.AddObject(Style.StyleCaption, Style); - lbxPrintStyles.ItemIndex := lbxPrintStyles.Items.IndexOfObject(Style); - end; - finally - StyleManager.EndClone(Style); - if not Result then Style.Free; - end; - - if PreviewBtnClicked or PrintBtnClicked then - ModalResult := mrOK - else - if lbxPrintStyles.ItemIndex <> -1 then - lbxPrintStylesClick(lbxPrintStyles); -end; - -procedure TdxfmDefinePrintStyles.FillRestSpace(DC: hDC); -var - R: TRect; -begin - with lbxPrintStyles do - begin - SendMessage(Handle, LB_GETITEMRECT, Items.Count - 1, LPARAM(@R)); - if R.Bottom < ClientHeight then - begin - R := MakeRect(0, R.Bottom, ClientWidth, ClientHeight); - FillRect(DC, R, GetSysColorBrush(COLOR_WINDOW)); - end; - end; -end; - -procedure TdxfmDefinePrintStyles.Initialize; -begin - TdxStyleListChangedSubscriber(FSubscriber).StyleListChanged(StyleManager); - btnHelp.Visible := HelpContext <> 0; - if btnHelp.Visible then - BorderIcons := BorderIcons + [biHelp]; - if not btnHelp.Visible then - btnClose.BoundsRect := btnHelp.BoundsRect; - ActiveControl := lbxPrintStyles; - UpdateControlsState; -end; - -procedure TdxfmDefinePrintStyles.LoadStrings; -begin - Caption := cxGetResourceString(@sdxDefinePrintStylesCaption); - lblPrintStyles.Caption := cxGetResourceString(@sdxDefinePrintStylesTitle); - btnEdit.Caption := cxGetResourceString(@sdxBtnEdit); - btnCopy.Caption := cxGetResourceString(@sdxBtnCopy); - FBtnDelCaptions[False] := cxGetResourceString(@sdxBtnDelete); - FBtnDelCaptions[True] := cxGetResourceString(@sdxBtnReset); - FBtnCopyCaptions[False] := cxGetResourceString(@sdxBtnNew); - FBtnCopyCaptions[True] := cxGetResourceString(@sdxBtnCopy); - btnClose.Caption := cxGetResourceString(@sdxBtnClose); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - miEdit.Caption := cxGetResourceString(@sdxBtnEdit); - miCopy.Caption := cxGetResourceString(@sdxBtnCopy); - miClear.Caption := cxGetResourceString(@sdxClear); -end; - -procedure TdxfmDefinePrintStyles.RefreshStyleList; -var - SavedStyle, Style: TBasedxPrintStyle; - I, Index: Integer; -begin - if FStyleManager <> nil then - begin - if lbxPrintStyles.ItemIndex <> -1 then - SavedStyle := TBasedxPrintStyle(lbxPrintStyles.Items.Objects[lbxPrintStyles.ItemIndex]) - else - SavedStyle := FStyleManager.CurrentStyle; - - with lbxPrintStyles.Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to FStyleManager.Count - 1 do - begin - Style := FStyleManager[I]; - AddObject(Style.StyleCaption, Style); - end; - finally - EndUpdate; - end; - end; - - if lbxPrintStyles.Items.Count > 0 then - begin - Index := lbxPrintStyles.Items.IndexOfObject(SavedStyle); - if Index = -1 then - Index := FStyleManager.CurrentStyleIndex; - lbxPrintStyles.ItemIndex := Index; - lbxPrintStylesClick(lbxPrintStyles); - end; - end; -end; - -procedure TdxfmDefinePrintStyles.StyleListChanged(Sender: TObject); -begin - if Sender = StyleManager then - begin - RefreshStyleList; - UpdateControlsState; - end; -end; - -procedure TdxfmDefinePrintStyles.UpdateControlsState; -begin - btnEdit.Enabled := lbxPrintStyles.ItemIndex > -1; - btnReset.Enabled := lbxPrintStyles.ItemIndex > -1; - btnCopy.Caption := FBtnCopyCaptions[lbxPrintStyles.Items.Count > 0]; - if lbxPrintStyles.Items.Count > 0 then - miCopy.ImageIndex := 1 - else - miCopy.ImageIndex := 3; -end; - -procedure TdxfmDefinePrintStyles.ListBoxWndProc(var Message: TMessage); -begin - if Message.Msg = WM_ERASEBKGND then - begin - with TWMEraseBkgnd(Message) do - FillRestSpace(DC); - Message.Result := 1; - end - else - FPrevWindowProc(Message); -end; - -procedure TdxfmDefinePrintStyles.RestoreWndProc; -begin - lbxPrintStyles.WindowProc := FPrevWindowProc; - SetClassLong(lbxPrintStyles.Handle, GCL_STYLE, FPrevClassStyle); -end; - -procedure TdxfmDefinePrintStyles.SubstWindowProc; -begin - lbxPrintStyles.HandleNeeded; - FPrevClassStyle := GetClassLong(lbxPrintStyles.Handle, GCL_STYLE); - SetClassLong(lbxPrintStyles.Handle, GCL_STYLE, FPrevClassStyle or CS_HREDRAW); - FPrevWindowProc := lbxPrintStyles.WindowProc; - lbxPrintStyles.WindowProc := ListBoxWndProc; -end; - -procedure TdxfmDefinePrintStyles.FormResize(Sender: TObject); -var - Rgn, Rgn2: HRGN; - I: Integer; -begin - Rgn := CreateRectRgnIndirect(ClientRect); - for I := 0 to ControlCount - 1 do - begin - Rgn2 := CreateRectRgnIndirect(Controls[I].ClientRect); - CombineRgn(Rgn, Rgn, Rgn2, RGN_DIFF); - DeleteObject(Rgn2); - end; - InvalidateRgn(Handle, Rgn, True); - DeleteObject(Rgn); -end; - -procedure TdxfmDefinePrintStyles.FormShow(Sender: TObject); -begin - FormResize(nil); -end; - -procedure TdxfmDefinePrintStyles.EditClick(Sender: TObject); -var - AStyle: TBasedxPrintStyle; -begin - with lbxPrintStyles do - AStyle := TBasedxPrintStyle(Items.Objects[ItemIndex]); - if AStyle.PageSetup(0, True, True, FPreviewBtnClicked, FPrintBtnClicked) then - StyleListChanged(StyleManager); - if PreviewBtnClicked or PrintBtnClicked then - ModalResult := mrOK; -end; - -procedure TdxfmDefinePrintStyles.CopyClick(Sender: TObject); -begin - AddPrintStyle(lbxPrintStyles.ItemIndex); -end; - -procedure TdxfmDefinePrintStyles.ResetClick(Sender: TObject); -var - Style: TBasedxPrintStyle; - S: string; -begin - Style := TBasedxPrintStyle(lbxPrintStyles.Items.Objects[lbxPrintStyles.ItemIndex]); - - if not Style.BuiltIn then - begin - S := Format(cxGetResourceString(@sdxDefinePrintStylesWarningDelete), [Style.StyleCaption]); - if MessageWarning(S) then Style.Free; - end - else - Style.RestoreDefaults; - UpdateControlsState; -end; - -procedure TdxfmDefinePrintStyles.pmPrintStylesPopup(Sender: TObject); -begin - with lbxPrintStyles do - begin - miEdit.Enabled := ItemIndex > -1; - miReset.Enabled := ItemIndex > -1; - miClear.Enabled := StyleManager.NonBuiltInsExists; - - if ItemIndex > -1 then - miReset.Caption := FBtnDelCaptions[TBasedxPrintStyle(Items.Objects[ItemIndex]).BuiltIn]; - - miCopy.Caption := FBtnCopyCaptions[Items.Count > 0]; - end; -end; - -procedure TdxfmDefinePrintStyles.lbxPrintStylesClick(Sender: TObject); -var - PrintStyle: TBasedxPrintStyle; -begin - with TListBox(Sender) do - begin - PrintStyle := nil; - if ItemIndex <> -1 then - PrintStyle := StyleManager[ItemIndex]; - btnReset.Caption := FBtnDelCaptions[(PrintStyle <> nil) and PrintStyle.BuiltIn]; - miReset.Caption := btnReset.Caption; - if (PrintStyle <> nil) and PrintStyle.BuiltIn then - begin - miReset.ShortCut := TShortCut(0); - miReset.ImageIndex := -1; - end - else - begin - miReset.ShortCut := ShortCut(VK_DELETE, []); - miReset.ImageIndex := 2; - end; - UpdateControlsState; - end; -end; - -procedure TdxfmDefinePrintStyles.lbxPrintStylesDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - dxPSDrawStyleItem(TBasedxPrintStyle(lbxPrintStyles.Items.Objects[Index]), - TListBox(Control), Index, State, Rect, True, False); - - if Index = lbxPrintStyles.Items.Count - 1 then - FillRestSpace(lbxPrintStyles.Canvas.Handle); -end; - -procedure TdxfmDefinePrintStyles.ClearClick(Sender: TObject); -begin - if MessageWarning(cxGetResourceString(@sdxDefinePrintStylesWarningClear)) then - StyleManager.DeleteNonBuiltIns; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmMnPg.pas b/internal/x.46/ExpressPrinting System/Sources/dxfmMnPg.pas deleted file mode 100644 index 82582708..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmMnPg.pas +++ /dev/null @@ -1,760 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxfmMnPg; - -interface - -{$I cxVer.inc} - -uses - Windows, Classes, Controls, ImgList, Graphics; - -function dxChooseMultiplePages(AImageList: TCustomImageList; AImageIndex: Integer; - AOrigin: TPoint; AYShift: Integer; AMaxColCount, AMaxRowCount: Integer; - var AColCount, ARowCount: Integer): Boolean; - -implementation - -uses - Messages, SysUtils, Forms, CommCtrl, Math, cxClasses, dxPSGlbl, dxPSEngn, - dxPSRes, dxPSUtl; - -const - CellSize = 26; - -type - TdxGrowDirection = (gdTopLeft, gdTopRight, gdBottomRight, gdBottomLeft); - - TfmPageChooser = class(TCustomForm) - private - FColCount: Integer; - FDesktop: TRect; - FGrowDirection: TdxGrowDirection; - FilCell: TCustomImageList; - FImageIndex: Integer; - FIsMousePressed: Boolean; - FIsTextAtBottom: Boolean; - FLastMousePos: TPoint; - FMaxColCount: Integer; - FMaxRowCount: Integer; - FResult: TModalResult; - FRowCount: Integer; - FSelectedColCount: Integer; - FSelectedRowCount: Integer; - function GetBottomBounds: TRect; - function GetBottomHeight: Integer; - function GetCellBounds(ACol, ARow: Integer): TRect; - function GetCellHeight: Integer; - function GetCellWidth: Integer; - function GetSelectedBounds: TRect; - function IsSelectedCell(ACol, ARow: Integer): Boolean; - procedure SetColCount(Value: Integer); - procedure SetRowCount(Value: Integer); - procedure SetSelectedCells(ACol, ARow: Integer); - procedure SetSelectedColCount(Value: Integer); - procedure SetSelectedRowCount(Value: Integer); - - procedure DoSelectCells(X, Y: Integer); - procedure ProcessKey(var Key: Word); - procedure ProcessSelect(AColCount, ARowCount: Integer; GrowFlag: Boolean); - procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; - procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; - procedure WMLButtonUp(var Message: TWMLButtonUp); message WM_LBUTTONUP; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCLButtonDown(var Message: TWMNCLButtonDown); message WM_NCLBUTTONDOWN; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure Paint; override; - - property BottomBounds: TRect read GetBottomBounds; - property BottomHeight: Integer read GetBottomHeight; - property CellHeight: Integer read GetCellHeight; - property CellWidth: Integer read GetCellWidth; - property ColCount: Integer read FColCount write SetColCount; - property MaxColCount: Integer read FMaxColCount; - property MaxRowCount: Integer read FMaxRowCount; - property RowCount: Integer read FRowCount write SetRowCount; - property SelectedBounds: TRect read GetSelectedBounds; - property SelectedColCount: Integer read FSelectedColCount write SetSelectedColCount; - property SelectedRowCount: Integer read FSelectedRowCount write SetSelectedRowCount; - public - constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); override; - property Height; - property MouseCapture; - property Width; - end; - -function dxChooseMultiplePages(AImageList: TCustomImageList; AImageIndex: Integer; - AOrigin: TPoint; AYShift: Integer; AMaxColCount, AMaxRowCount: Integer; - var AColCount, ARowCount: Integer): Boolean; -var - AForm: TfmPageChooser; -begin - AForm := TfmPageChooser.CreateNew(nil, 0); - try - with AForm do - begin - FilCell := AImageList; - FImageIndex := AImageIndex; - FMaxColCount := AMaxColCount; - FMaxRowCount := AMaxRowCount; - Left := AOrigin.X; - Top := AOrigin.Y; - - if (AOrigin.Y + AColCount * CellWidth + 4 {non client} + 2 {frame} > FDesktop.Bottom) then - if (AOrigin.X + AColCount * CellWidth + 4 {non client} + 2 {frame} > FDesktop.Right) then - FGrowDirection := gdTopLeft - else - FGrowDirection := gdTopRight - else - if (AOrigin.X + AColCount * CellWidth + 4 {non client} + 2 {frame} > FDesktop.Right) then - FGrowDirection := gdBottomLeft - else - FGrowDirection := gdBottomRight; - - if (FGrowDirection in [gdTopLeft, gdBottomLeft]) then - Left := FDesktop.Right - Width; - - if (FGrowDirection in [gdTopLeft, gdTopRight]) then - Top := Top - Height - AYShift; - FIsTextAtBottom := FGrowDirection in [gdBottomRight, gdBottomLeft]; - ColCount := AColCount; - RowCount := ARowCount; - - Show; - MouseCapture := True; - try - while FResult = mrNone do Application.ProcessMessages; - finally - MouseCapture := False; - end; - Result := (FResult = mrOK) and (SelectedColCount > 0) and (SelectedRowCount > 0); - if Result then - begin - AColCount := SelectedColCount; - ARowCount := SelectedRowCount; - end; - end - finally - AForm.Free; - end; -end; - -{ TfmPageChooser } - -constructor TfmPageChooser.CreateNew(AOwner: TComponent; Dummy: Integer = 0); -begin - inherited CreateNew(AOwner, Dummy); -{$IFDEF DELPHI9} - Position := poDesigned; - PopupMode := pmAuto; -{$ENDIF} - BorderStyle := bsNone; - BorderIcons := []; - FIsMousePressed := False; - FIsTextAtBottom := True; - FDesktop := GetDesktopWorkArea; -end; - -procedure TfmPageChooser.CreateParams(var Params: TCreateParams); -begin - inherited; - Params.WindowClass.Style := Params.WindowClass.Style or CS_SAVEBITS; -end; - -procedure TfmPageChooser.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited; - if (ssAlt in Shift) or (Key = VK_ESCAPE) then - FResult := mrCancel - else - if Key = VK_RETURN then - FResult := mrOk - else - if Key in [VK_LEFT, VK_UP, VK_RIGHT, VK_DOWN] then - ProcessKey(Key); -end; - -procedure TfmPageChooser.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - inherited; - if PtInRect(ClientRect, MakePoint(X, Y)) then - FIsMousePressed := True - else - FResult := mrCancel; -end; - -procedure TfmPageChooser.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited; - if (FLastMousePos.X <> X) or (FLastMousePos.Y <> Y) then - begin - DoSelectCells(X, Y); - FLastMousePos := MakePoint(X, Y); - end; -end; - -procedure TfmPageChooser.Paint; - - function GetCellColor(AnIsSelected: Boolean): TColor; - begin - if AnIsSelected then - Result := clHighlight - else - Result := clWindow; - end; - - function GetFillColor: TColor; - begin - if dxPSEngine.LookAndFeel = pslfStandard then - Result := clHighLight - else - Result := clWindow; - end; - - function GetFrameColor: TColor; - begin - if dxPSEngine.LookAndFeel = pslfStandard then - Result := clBtnFace - else - Result := clWindow; - end; - - procedure DrawCell(ACol, ARow: Integer); - var - R: TRect; - begin - R := GetCellBounds(ACol, ARow); - if RectVisible(Canvas.Handle, R) then - begin - Canvas.Brush.Color := GetFrameColor; - Canvas.FrameRect(R); - InflateRect(R, -1, -1); - - Canvas.Brush.Color := clBtnShadow; - Canvas.FrameRect(R); - InflateRect(R, -1, -1); - - Canvas.Brush.Color := GetCellColor(IsSelectedCell(ACol, ARow)); - Canvas.FillRect(R); - InflateRect(R, -3, -3); - if (FilCell <> nil) and (FImageIndex > -1) and (FImageIndex < FilCell.Count) then - FilCell.Draw(Canvas, R.Left, R.Top, FImageIndex); - end; - end; - - procedure DrawBottomPart; - - function GetText: string; - begin - if (SelectedRowCount > 0) and (SelectedColCount > 0) then - Result := Format('%d x %d %s', [SelectedRowCount, SelectedColCount, cxGetResourceString(@sdxPages)]) - else - Result := cxGetResourceString(@sdxCancel); - end; - - var - R: TRect; - S: string; - X, Y: Integer; - begin - R := BottomBounds; - if RectVisible(Canvas.Handle, R) then - begin - Canvas.Brush.Color := GetFrameColor; - if FIsTextAtBottom then - begin - Canvas.FillRect(MakeRect(R.Left, R.Top, R.Right, R.Top + 1)); - Inc(R.Top); - end - else - begin - Dec(R.Bottom); - Canvas.FillRect(MakeRect(R.Left, R.Bottom, R.Right, R.Bottom + 1)); - end; - - Canvas.Brush.Color := GetFrameColor; - Canvas.FrameRect(R); - InflateRect(R, -1, -1); - - if dxPSEngine.LookAndFeel = pslfStandard then - DrawEdge(Canvas.Handle, R, BDR_SUNKENOUTER, BF_RECT or BF_MIDDLE) - else - begin - Canvas.Brush.Color := clWindow; - Canvas.FillRect(R); - end; - InflateRect(R, -1, -1); - - Canvas.Brush.Style := bsClear; - S := GetText; - with R do - begin - X := Left + (Right - Left - Canvas.TextWidth(S)) div 2; - Y := Top + (Bottom - Top - Canvas.TextHeight(S)) div 2; - end; - Canvas.TextOut(X, Y, S); - Canvas.Brush.Style := bsSolid; - end; - end; - -var - Col, Row: Integer; -begin - Canvas.Brush.Color := GetFrameColor; - Canvas.FrameRect(ClientRect); - - for Col := 0 to ColCount - 1 do - for Row := 0 to RowCount - 1 do - DrawCell(Col, Row); - - DrawBottomPart; -end; - -function TfmPageChooser.GetBottomBounds: TRect; -begin - Result := ClientRect; - InflateRect(Result, -1, -1); - with Result do - if FIsTextAtBottom then - Top := Bottom - BottomHeight - else - Bottom := Top + BottomHeight; -end; - -function TfmPageChooser.GetBottomHeight: Integer; -begin - Result := MulDiv(-Font.Height, PixelsPerInch, 72) + 6; -end; - -function TfmPageChooser.GetCellBounds(ACol, ARow: Integer): TRect; -var - CR: TRect; - ATop, ALeft: Integer; -begin - Windows.GetClientRect(Handle, CR); - case FGrowDirection of - gdTopLeft: - begin - ALeft := CR.Right - (ACol + 1) * CellWidth - 1; - ATop := CR.Bottom - (ARow + 1) * CellHeight - 1; - if FIsTextAtBottom then Dec(ATop, BottomHeight); - end; - - gdTopRight: - begin - ALeft := 1 + ACol * CellWidth; - ATop := CR.Bottom - (ARow + 1) * CellHeight - 1; - if FIsTextAtBottom then Dec(ATop, BottomHeight); - end; - - gdBottomRight: - begin - ALeft := 1 + ACol * CellWidth; - ATop := 1 + ARow * CellHeight; - if not FIsTextAtBottom then Inc(ATop, BottomHeight); - end; - - else {gdBottomLeft} - begin - ALeft := CR.Right - (ACol + 1) * CellWidth - 1; - ATop := 1 + ARow * CellHeight; - if not FIsTextAtBottom then Inc(ATop, BottomHeight); - end; - end; - Result := MakeBounds(ALeft, ATop, CellWidth, CellHeight); -end; - -function TfmPageChooser.GetCellHeight: Integer; -begin - if FilCell <> nil then - Result := MulDiv(FilCell.Height, 3, 2) + 2 - else - Result := CellSize; -end; - -function TfmPageChooser.GetCellWidth: Integer; -begin - if FilCell <> nil then - Result := MulDiv(FilCell.Width, 3, 2) + 2 - else - Result := CellSize; -end; - -function TfmPageChooser.GetSelectedBounds: TRect; -var - ALeft, ATop, ARight, ABottom: Integer; -begin - Result := NullRect; - if (SelectedColCount > 0) or (SelectedRowCount > 0) then - begin - case FGrowDirection of - gdTopLeft: - begin - with GetCellBounds(SelectedColCount - 1, SelectedRowCount - 1) do - begin - ALeft := Left; - ATop := Top; - end; - with GetCellBounds(0, 0) do - begin - ARight := Right; - ABottom := Bottom; - end; - end; - - gdTopRight: - begin - with GetCellBounds(0, 0) do - begin - ALeft := Left; - ABottom := Bottom; - end; - with GetCellBounds(SelectedColCount - 1, SelectedRowCount - 1) do - begin - ARight := Right; - ATop := Top; - end; - end; - - gdBottomRight: - begin - with GetCellBounds(0, 0) do - begin - ALeft := Left; - ATop := Top; - end; - with GetCellBounds(SelectedColCount - 1, SelectedRowCount - 1) do - begin - ARight := Right; - ABottom := Bottom; - end; - end; - - else {gdBottomLeft} - begin - with GetCellBounds(SelectedColCount - 1, SelectedRowCount - 1) do - begin - ALeft := Left; - ABottom := Bottom; - end; - with GetCellBounds(0, 0) do - begin - ARight := Right; - ATop := Top; - end; - end; - end; - Result := MakeRect(ALeft, ATop, ARight, ABottom); - end; -end; - -function TfmPageChooser.IsSelectedCell(ACol, ARow: Integer): Boolean; -begin - Result := (ACol < SelectedColCount) and (ARow < SelectedRowCount); -end; - -procedure TfmPageChooser.SetColCount(Value: Integer); -var - NewWidth, OldLeft: Integer; -begin - if (FColCount = 0) or ((Value > FColCount) and (Value <= MaxColCount)) then - begin - FColCount := Value; - NewWidth := Value * CellWidth + 2 {frame}; - if FGrowDirection in [gdTopLeft, gdBottomLeft] then - begin - Inc(NewWidth, 4 {non client}); - SetBounds(Left - (NewWidth - Width), Top, NewWidth, Height); - Inc(FLastMousePos.X, CellWidth); - end - else - begin - OldLeft := Left; // Bug in Delphi 8 :-))) - ClientWidth := NewWidth; - Left := OldLeft; - end; - SelectedColCount := FColCount - 1; - UpdateWindow(Handle); - end; -end; - -procedure TfmPageChooser.SetRowCount(Value: Integer); -var - NewHeight, OldTop: Integer; - R1, R2: TRect; -begin - if (FRowCount = 0) or ((Value > FRowCount) and (Value <= MaxRowCount)) then - begin - FRowCount := Value; - NewHeight := Value * CellHeight + BottomHeight + 2; - if (FGrowDirection in [gdTopLeft, gdTopRight]) then - begin - Inc(NewHeight, 4 {not client}); - SetBounds(Left, Top - (NewHeight - Height), Width, NewHeight); - Inc(FLastMousePos.Y, CellWidth); - end - else - begin - OldTop := Top; // Bug in Delphi 8 :-))) - ClientHeight := NewHeight; - Top := OldTop; - end; - - if SelectedColCount < ColCount then - begin - R1 := GetCellBounds(SelectedColCount - 1, SelectedRowCount - 1); - if not (FGrowDirection in [gdTopLeft, gdBottomLeft]) then - OffsetRect(R1, CellWidth, CellHeight); - R2 := GetCellBounds(ColCount - 1, RowCount - 1); - if not (FGrowDirection in [gdTopLeft, gdBottomLeft]) then - OffsetRect(R2, CellWidth, CellHeight); - UnionRect(R1, R1, R2); - InvalidateRect(Handle, @R1, False); - end; - SelectedRowCount := FRowCount - 1; - end; -end; - -procedure TfmPageChooser.SetSelectedCells(ACol, ARow: Integer); -var - Rgn1, Rgn2: HRGN; -begin - Rgn1 := CreateRectRgnIndirect(SelectedBounds); - Rgn2 := CreateRectRgnIndirect(BottomBounds); - CombineRgn(Rgn1, Rgn1, Rgn2, RGN_OR); - DeleteObject(Rgn2); - FSelectedColCount := ACol; - FSelectedRowCount := ARow; - Rgn2 := CreateRectRgnIndirect(SelectedBounds); - CombineRgn(Rgn1, Rgn1, Rgn2, RGN_XOR); - DeleteObject(Rgn2); - InvalidateRgn(Handle, Rgn1, False); - Rgn2 := CreateRectRgnIndirect(BottomBounds); - CombineRgn(Rgn1, Rgn1, Rgn2, RGN_OR); - DeleteObject(Rgn2); - InvalidateRgn(Handle, Rgn1, False); - DeleteObject(Rgn1); -end; - -procedure TfmPageChooser.SetSelectedColCount(Value: Integer); -begin - SetSelectedCells(Value, SelectedRowCount); -end; - -procedure TfmPageChooser.SetSelectedRowCount(Value: Integer); -begin - SetSelectedCells(SelectedColCount, Value); -end; - -procedure TfmPageChooser.DoSelectCells(X, Y: Integer); -var - AColCount, ARowCount: Integer; -begin - if FGrowDirection in [gdTopLeft, gdBottomLeft] then - AColCount := Ceil((Width - X - 2 {frame} - 4 {non client}) / CellWidth) - else - AColCount := Ceil(X / CellWidth); - - if FIsTextAtBottom then - ARowCount := Ceil(Y / CellHeight) - else - ARowCount := Ceil((Height - Y - 2 {frame} - 4 {non client}) / CellHeight); - - if (FGrowDirection in [gdTopRight, gdBottomRight]) and - (Left + (AColCount * CellWidth + 2 {frame}) + 4 {non client} > FDesktop.Right) then - Dec(AColCount); - if (FGrowDirection in [gdTopLeft, gdTopRight]) and - (Top + (ARowCount * CellHeight + BottomHeight + 2 {frame}) + 4 {non client} > FDesktop.Bottom) then - Dec(ARowCount); - ProcessSelect(AColCount, ARowCount, FIsMousePressed); -end; - -procedure TfmPageChooser.ProcessKey(var Key: Word); -var - AColCount, ARowCount: Integer; -begin - AColCount := 0; - ARowCount := 0; - case Key of - VK_LEFT: - if FGrowDirection in [gdTopLeft, gdBottomLeft] then - begin - AColCount := SelectedColCount + 1; - ARowCount := SelectedRowCount; - if ARowCount = 0 then ARowCount := 1; - end - else - begin - AColCount := SelectedColCount - 1; - if AColCount < 1 then AColCount := 1; - ARowCount := SelectedRowCount; - end; - VK_UP: - if FGrowDirection in [gdTopRight, gdTopLeft] then - begin - ARowCount := SelectedRowCount + 1; - AColCount := SelectedColCount; - if AColCount = 0 then AColCount := 1; - end - else - begin - ARowCount := SelectedRowCount - 1; - if ARowCount < 1 then ARowCount := 1; - AColCount := SelectedColCount; - end; - VK_RIGHT: - if FGrowDirection in [gdTopLeft, gdBottomLeft] then - begin - AColCount := SelectedColCount - 1; - if AColCount < 1 then AColCount := 1; - ARowCount := SelectedRowCount; - end - else - begin - AColCount := SelectedColCount + 1; - ARowCount := SelectedRowCount; - if ARowCount = 0 then ARowCount := 1; - end; - VK_DOWN: - if FGrowDirection in [gdTopRight, gdTopLeft] then - begin - ARowCount := SelectedRowCount - 1; - if ARowCount < 1 then ARowCount := 1; - AColCount := SelectedColCount; - end - else - begin - ARowCount := SelectedRowCount + 1; - AColCount := SelectedColCount; - if AColCount = 0 then AColCount := 1; - end; - end; - ProcessSelect(AColCount, ARowCount, True); - Key := 0; -end; - -procedure TfmPageChooser.ProcessSelect(AColCount, ARowCount: Integer; GrowFlag: Boolean); -begin - if GrowFlag then - begin - if (SelectedRowCount <> 0) and (SelectedColCount <> 0) then - begin - RowCount := ARowCount; - ColCount := AColCount; - end - end - else - begin - if AColCount > ColCount then AColCount := 0; - if ARowCount > RowCount then ARowCount := 0; - end; - - if AColCount < 0 then - AColCount := 0 - else - if AColCount > ColCount then - AColCount := ColCount; - - if ARowCount < 0 then - ARowCount := 0 - else - if ARowCount > RowCount then - ARowCount := RowCount; - - SetSelectedCells(AColCount, ARowCount); -end; - -procedure TfmPageChooser.WMEraseBkgnd(var Message: TWMEraseBkgnd); -begin - Message.Result := 1; -end; - -procedure TfmPageChooser.WMKillFocus(var Message: TWMKillFocus); -begin - inherited; - FResult := mrCancel; -end; - -procedure TfmPageChooser.WMLButtonUp(var Message: TWMLButtonUp); -begin - inherited; - if SelectedRowCount * SelectedColCount > 0 then - FResult := mrOk - else - FResult := mrCancel; -end; - -procedure TfmPageChooser.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - InflateRect(Message.CalcSize_Params^.rgrc[0], -2, -2); -end; - -procedure TfmPageChooser.WMNCLButtonDown(var Message: TWMNCLButtonDown); -begin - inherited; - FResult := mrCancel; -end; - -procedure TfmPageChooser.WMNCPaint(var Message: TWMNCPaint); -var - R: TRect; - DC: HDC; -begin - GetWindowRect(Handle, R); - OffsetRect(R, -R.Left, -R.Top); - DC := GetWindowDC(Handle); - try - if dxPSEngine.LookAndFeel = pslfStandard then - DrawEdge(DC, R, EDGE_RAISED, BF_RECT) - else - begin - FrameRect(DC, R, GetSysColorBrush(COLOR_BTNSHADOW)); - InflateRect(R, -1, -1); - FrameRect(DC, R, GetSysColorBrush(COLOR_WINDOW)); - end; - finally - ReleaseDC(Handle, DC); - end; - inherited; -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmPNFmt.dfm b/internal/x.46/ExpressPrinting System/Sources/dxfmPNFmt.dfm deleted file mode 100644 index d39b3504..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmPNFmt.dfm +++ /dev/null @@ -1,140 +0,0 @@ -object dxfmPageNumberFormat: TdxfmPageNumberFormat - Left = 434 - Top = 210 - BorderStyle = bsDialog - Caption = 'Change Page Number Format' - ClientHeight = 209 - ClientWidth = 247 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object lblPageNumberFormat: TLabel - Left = 6 - Top = 15 - Width = 78 - Height = 13 - Caption = 'Number &Format:' - FocusControl = cbxPageNumberingFormat - OnClick = lblPageNumberFormatClick - end - object bvlStartAtHolder: TBevel - Left = 113 - Top = 93 - Width = 129 - Height = 22 - Visible = False - end - object bvlPageNumbering: TBevel - Left = 111 - Top = 49 - Width = 132 - Height = 5 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object Bevel2: TBevel - Left = 6 - Top = 119 - Width = 237 - Height = 5 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object lblPageNumbering: TLabel - Left = 7 - Top = 45 - Width = 78 - Height = 13 - Caption = 'Page Numbering' - end - object Bevel3: TBevel - Left = 6 - Top = 166 - Width = 237 - Height = 4 - Anchors = [akLeft, akRight, akBottom] - Shape = bsBottomLine - end - object btnOK: TButton - Left = 6 - Top = 180 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 0 - end - object btnCancel: TButton - Left = 87 - Top = 180 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - object btnHelp: TButton - Left = 168 - Top = 180 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Help' - TabOrder = 2 - end - object cbxPageNumberingFormat: TComboBox - Left = 113 - Top = 12 - Width = 130 - Height = 21 - Style = csDropDownList - Anchors = [akLeft, akTop, akRight] - ItemHeight = 13 - TabOrder = 3 - OnChange = cbxPageNumberingFormatChange - Items.Strings = ( - '1, 2, 3, 3, 4, ...' - 'a, b, c, d, e, ...' - 'A, B, C, D, E, ...' - 'i, ii, iii, iv, v, ...' - 'I, II, III, IV, V, ...') - end - object btnDefault: TButton - Left = 154 - Top = 135 - Width = 89 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Default...' - TabOrder = 4 - OnClick = btnDefaultClick - end - object rbtnContinueFromPrevSection: TRadioButton - Left = 13 - Top = 69 - Width = 228 - Height = 17 - Anchors = [akLeft, akTop, akRight] - Caption = 'Continue from Previous Section' - Checked = True - TabOrder = 5 - TabStop = True - OnClick = rbtnContinueFromPrevSectionClick - end - object rbtnStartAt: TRadioButton - Left = 13 - Top = 96 - Width = 92 - Height = 17 - Caption = 'Start &at:' - TabOrder = 6 - OnClick = rbtnStartAtClick - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmPNFmt.pas b/internal/x.46/ExpressPrinting System/Sources/dxfmPNFmt.pas deleted file mode 100644 index 19a89893..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmPNFmt.pas +++ /dev/null @@ -1,442 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxfmPNFmt; - -interface - -{$I cxVer.inc} - -uses - Windows, SysUtils, Classes, Graphics, Controls, Forms, StdCtrls, ExtCtrls, - dxPSForm, dxPSGlbl, dxCore; - -type - TdxfmPageNumberFormat = class(TCustomdxPSForm) - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - lblPageNumberFormat: TLabel; - bvlStartAtHolder: TBevel; - bvlPageNumbering: TBevel; - Bevel2: TBevel; - cbxPageNumberingFormat: TComboBox; - btnDefault: TButton; - rbtnContinueFromPrevSection: TRadioButton; - rbtnStartAt: TRadioButton; - lblPageNumbering: TLabel; - Bevel3: TBevel; - procedure cbxPageNumberingFormatChange(Sender: TObject); - procedure btnDefaultClick(Sender: TObject); - procedure lblPageNumberFormatClick(Sender: TObject); - procedure rbtnStartAtClick(Sender: TObject); - procedure rbtnContinueFromPrevSectionClick(Sender: TObject); - private - FseStartAt: TCustomEdit; - FAllowContinueFromPrevSection: Boolean; - FControlsUpdating: Boolean; - FContinueFromPrevSection: Boolean; - FModified: Boolean; - FPageNumberFormats: TStrings; - FPageNumberFormat: TdxPageNumberFormat; - FStartPageIndex: Integer; - FSetPageNumberingFormatAsDefault: Boolean; - procedure CheckModified; - procedure CreateControls; - procedure Initialize; - procedure LoadStrings; - procedure SetContinueFromPrevSection(Value: Boolean); - procedure SetPageNumberFormats(Value: TStrings); - procedure StartAtChanged(Sender: TObject); - procedure StartatExit(Sender: TObject); - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Execute: Boolean; - property AllowContinueFromPrevSection: Boolean read FAllowContinueFromPrevSection write FAllowContinueFromPrevSection; - property ContinueFromPrevSection: Boolean read FContinueFromPrevSection write SetContinueFromPrevSection; - property PageNumberFormats: TStrings read FPageNumberFormats write SetPageNumberFormats; - property PageNumberFormat: TdxPageNumberFormat read FPageNumberFormat write FPageNumberFormat; - property SetPageNumberingFormatAsDefault: Boolean read FSetPageNumberingFormatAsDefault write FSetPageNumberingFormatAsDefault; - property StartPageIndex: Integer read FStartPageIndex write FStartPageIndex; - end; - - PdxPageNumberFormatDlgData = ^TdxPageNumberFormatDlgData; - TdxPageNumberFormatDlgData = record - PageNumberFormats: TStrings; - PageNumberFormat: TdxPageNumberFormat; - ContinueFromPrevSection: Boolean; - StartPageIndex: Integer; - AllowContinueFromPrevSection: Boolean; - ShowAsDefaultButton: Boolean; - SetPageNumberFormatAsDefault: Boolean; - HelpContext: THelpContext; - end; - -function dxShowPageNumberFormatDlg(var AFormatsDlgData: TdxPageNumberFormatDlgData): Boolean; - -implementation - -{$R *.DFM} - -uses - Registry, cxClasses, dxExtCtrls, dxPSRes, dxPSUtl; - -function dxShowPageNumberFormatDlg(var AFormatsDlgData: TdxPageNumberFormatDlgData): Boolean; -var - Dialog: TdxfmPageNumberFormat; -begin - Result := False; - if AFormatsDlgData.PageNumberFormats = nil then Exit; - - Dialog := TdxfmPageNumberFormat.Create(nil); - try - with AFormatsDlgData do - begin - Dialog.AllowContinueFromPrevSection := AllowContinueFromPrevSection; - Dialog.FContinueFromPrevSection := ContinueFromPrevSection; - Dialog.PageNumberFormats := PageNumberFormats; - Dialog.FPageNumberFormat := PageNumberFormat; - Dialog.FStartPageIndex := StartPageIndex; - Dialog.btnDefault.Visible := ShowAsDefaultButton; - if HelpContext <> 0 then - Dialog.HelpContext := HelpContext; - end; - Result := Dialog.Execute; - if Result then - with AFormatsDlgData do - begin - PageNumberFormat := TdxPageNumberFormat(Dialog.PageNumberFormat); - ContinueFromPrevSection := Dialog.ContinueFromPrevSection; - StartPageIndex := Dialog.StartPageIndex; - SetPageNumberFormatAsDefault := Dialog.SetPageNumberingFormatAsDefault; - end; - finally - Dialog.Free; - end; -end; - -procedure PlaceBavel(ABevel: TBevel; AControl: TControl); -var - RightBound: Integer; -begin - RightBound := ABevel.BoundsRect.Right; - ABevel.Left := AControl.Left + AControl.Width + 10; - ABevel.Width := RightBound - ABevel.Left; -end; - -type - TdxIntValueType = (ivtDecimal, ivtLiteral, ivtCapitalLiteral, ivtRoman, ivtCapitalRoman); - - TdxPSValueEdit = class(TdxPSSpinEdit) - private - FIntValueType: TdxIntValueType; - procedure SetIntValueType(Value: TdxIntValueType); - protected - function IsValidChar(Key: Char): Boolean; override; - function GetValue: Extended; override; - procedure SetValue(NewValue: Extended); override; - public - constructor Create(AOwner: TComponent); override; - published - property IntValueType: TdxIntValueType read FIntValueType write SetIntValueType default ivtDecimal; - end; - -constructor TdxPSValueEdit.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FIntValueType := ivtDecimal; - MinValue := 1; - DefaultValue := 1; -end; - -procedure TdxPSValueEdit.SetIntValueType(Value: TdxIntValueType); -var - V: Integer; -begin - if FIntValueType <> Value then - begin - V := AsInteger; - FIntValueType := Value; - AsInteger := V; - end; -end; - -function TdxPSValueEdit.IsValidChar(Key: Char): Boolean; -const - RomanChars: string = 'cdilmxv'; - CapitalRomanChars: string = 'CDILMXV'; -begin - if ValueType = svtFloat then - Result := inherited IsValidChar(Key) - else - case IntValueType of - ivtDecimal: - Result := (Key <> '-') and inherited IsValidChar(Key); - ivtLiteral: - Result := dxCharInSet(Key, ['a'..'z']); - ivtCapitalLiteral: - Result := dxCharInSet(Key, ['A'..'Z']); - ivtRoman: - Result := Pos(Key, RomanChars) <> 0; - else //ivtCapitalRoman - Result := Pos(Key, CapitalRomanChars) <> 0; - end; -end; - -function TdxPSValueEdit.GetValue: Extended; -var - S: string; -begin - if (ValueType = svtFloat) or (IntValueType = ivtDecimal) then - Result := inherited GetValue - else - try - S := Trim(GetValueText); - if S <> '' then - case IntValueType of - ivtLiteral: - Result := Chars2Int(S, False); - ivtCapitalLiteral: - Result := Chars2Int(S, True); - ivtRoman: - Result := Roman2Int(S, False); - else //ivtCapitalRomans - Result := Roman2Int(S, True); - end - else - Result := 1; - Result := CheckValue(Result); - except - Result := Trunc(DefaultValue); - end; -end; - -procedure TdxPSValueEdit.SetValue(NewValue: Extended); -begin - if (ValueType = svtFloat) or (IntValueType = ivtDecimal) then - inherited SetValue(NewValue) - else - case IntValueType of - ivtLiteral: - Text := Int2Chars(Round(CheckValue(NewValue)), False); - ivtCapitalLiteral: - Text := Int2Chars(Round(CheckValue(NewValue)), True); - ivtRoman: - Text := Int2Roman(Round(CheckValue(NewValue)), False); - else //ivtCapitalRoman - Text := Int2Roman(Round(CheckValue(NewValue)), True); - end; -end; - -{ TdxfmPageNumberFormat } - -constructor TdxfmPageNumberFormat.Create(AOwner: TComponent); -begin - inherited; - - HelpContext := dxhcPageNumberFormatDlg; - btnHelp.Visible := HelpContext <> 0; - if HelpContext = 0 then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - end - else - BorderIcons := BorderIcons + [biHelp]; - - FPageNumberFormats := TStringList.Create; - CreateControls; - LoadStrings; -end; - -destructor TdxfmPageNumberFormat.Destroy; -begin - FreeAndNil(FPageNumberFormats); - inherited; -end; - -function TdxfmPageNumberFormat.Execute: Boolean; -begin - Initialize; - FModified := False; - Result := (ShowModal = mrOK) and FModified; -end; - -procedure TdxfmPageNumberFormat.CheckModified; -begin - FModified := True; -end; - -procedure TdxfmPageNumberFormat.CreateControls; -begin - FseStartAt := TdxPSValueEdit.Create(Self); - with TdxPSValueEdit(FseStartAt) do - begin - Parent := Self; - TabOrder := rbtnStartAt.TabOrder + 1; - BoundsRect := bvlStartAtHolder.BoundsRect; - ValueType := svtInteger; - MinValue := 1; - MaxValue := 10000; - Value := 1; - OnChange := StartAtChanged; - OnExit := StartAtExit; - end; -end; - -procedure TdxfmPageNumberFormat.Initialize; -begin - FControlsUpdating := True; - try - with cbxPageNumberingFormat do - begin - Items.BeginUpdate; - try - Items.Clear; - Items := FPageNumberFormats; - ItemIndex := Integer(PageNumberFormat); - finally - Items.EndUpdate; - end; - end; - rbtnContinueFromPrevSection.Enabled := AllowContinueFromPrevSection; - //rbtnStartAt.Enabled := AllowContinueFromPrevSection; - rbtnContinueFromPrevSection.Checked := ContinueFromPrevSection; - rbtnStartAt.Checked := not ContinueFromPrevSection; - - TdxPSValueEdit(FseStartAt).IntValueType := TdxIntValueType(PageNumberFormat); - if AllowContinueFromPrevSection and ContinueFromPrevSection then - TdxPSValueEdit(FseStartAt).Text := '' - else - TdxPSValueEdit(FseStartAt).AsInteger := StartPageIndex; - finally - FControlsUpdating := False; - end; -end; - -procedure TdxfmPageNumberFormat.SetContinueFromPrevSection(Value: Boolean); -begin - if FContinueFromPrevSection <> Value then - begin - FContinueFromPrevSection := Value; - FControlsUpdating := True; - try - rbtnContinueFromPrevSection.Checked := FContinueFromPrevSection; - rbtnStartAt.Checked := not FContinueFromPrevSection; - if FContinueFromPrevSection then - TdxPSValueEdit(FseStartAt).Text := '' - else - TdxPSValueEdit(FseStartAt).AsInteger := 1; - finally - FControlsUpdating := False; - end; - end; -end; - -procedure TdxfmPageNumberFormat.SetPageNumberFormats(Value: TStrings); -begin - FPageNumberFormats.Assign(Value); -end; - -procedure TdxfmPageNumberFormat.LoadStrings; -begin - Caption := cxGetResourceString(@sdxPNFormatsCaption); - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - btnDefault.Caption := cxGetResourceString(@sdxBtnDefault); - lblPageNumberFormat.Caption := cxGetResourceString(@sdxPNFormatsNumberFormat); - lblPageNumbering.Caption := cxGetResourceString(@sdxPageNumbering); - PlaceBavel(bvlPageNumbering, lblPageNumbering); - rbtnContinueFromPrevSection.Caption := cxGetResourceString(@sdxPNFormatsContinueFromPrevious); - rbtnStartAt.Caption := cxGetResourceString(@sdxPNFormatsStartAt); -end; - -procedure TdxfmPageNumberFormat.cbxPageNumberingFormatChange(Sender: TObject); -begin - if FControlsUpdating then Exit; - TdxPSValueEdit(FseStartAt).IntValueType := TdxIntValueType(TComboBox(Sender).ItemIndex); - FPageNumberFormat := TdxPageNumberFormat(TComboBox(Sender).ItemIndex); - CheckModified; -end; - -procedure TdxfmPageNumberFormat.StartAtChanged(Sender: TObject); -begin - if FControlsUpdating then Exit; - rbtnStartAt.Checked := True; - CheckModified; -end; - -procedure TdxfmPageNumberFormat.StartAtExit(Sender: TObject); -begin - FStartPageIndex := TdxPSSpinEdit(Sender).AsInteger; -end; - -procedure TdxfmPageNumberFormat.btnDefaultClick(Sender: TObject); -var - S : string; -begin - S := Format(cxGetResourceString(@sdxPNFormatsChangeDefaultFormat), - [cbxPageNumberingFormat.Items[cbxPageNumberingFormat.ItemIndex]]); - if MessageQuestion(S) then - begin - FSetPageNumberingFormatAsDefault := True; - CheckModified; - end; -end; - -procedure TdxfmPageNumberFormat.lblPageNumberFormatClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; - TComboBox(ActiveControl).DroppedDown := True; -end; - -procedure TdxfmPageNumberFormat.rbtnStartAtClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - ContinueFromPrevSection := False; - ActiveControl := FseStartAt; - CheckModified; -end; - -procedure TdxfmPageNumberFormat.rbtnContinueFromPrevSectionClick(Sender: TObject); -begin - if FControlsUpdating then Exit; - ContinueFromPrevSection := True; - CheckModified; -end; - -end. diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmZoom.dfm b/internal/x.46/ExpressPrinting System/Sources/dxfmZoom.dfm deleted file mode 100644 index d7ae4981..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmZoom.dfm +++ /dev/null @@ -1,544 +0,0 @@ -object fmZoom: TfmZoom - Left = 422 - Top = 239 - BorderStyle = bsDialog - Caption = 'Zoom' - ClientHeight = 280 - ClientWidth = 428 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 186 - Top = 251 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object btnCancel: TButton - Left = 267 - Top = 251 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 3 - end - object gbxPreview: TGroupBox - Left = 193 - Top = 4 - Width = 230 - Height = 238 - Caption = ' Preview ' - TabOrder = 1 - object bvlFontPreviewHolder: TBevel - Left = 8 - Top = 176 - Width = 214 - Height = 54 - Visible = False - end - object bvlPreviewHolder: TBevel - Left = 24 - Top = 23 - Width = 183 - Height = 123 - Visible = False - end - object Panel1: TPanel - Left = 2 - Top = 162 - Width = 226 - Height = 2 - BevelOuter = bvLowered - TabOrder = 0 - end - object stxtFontPreview: TStaticText - Left = 9 - Top = 157 - Width = 125 - Height = 17 - Caption = ' 12 pt Times New Roman ' - TabOrder = 1 - end - end - object btnHelp: TButton - Left = 348 - Top = 251 - Width = 75 - Height = 23 - Caption = '&Help' - TabOrder = 4 - end - object gbxZoomTo: TGroupBox - Left = 5 - Top = 4 - Width = 185 - Height = 238 - Caption = ' &Zoom To ' - TabOrder = 0 - object lblPercent: TLabel - Left = 9 - Top = 205 - Width = 44 - Height = 13 - Caption = 'P&ercent: ' - OnClick = lblPercentClick - end - object bvlPercentHolder: TBevel - Left = 80 - Top = 201 - Width = 87 - Height = 21 - Visible = False - end - object rbtn500: TRadioButton - Left = 8 - Top = 21 - Width = 55 - Height = 17 - Caption = '500 %' - TabOrder = 0 - OnClick = rbtnClick - end - object rbtn200: TRadioButton - Tag = 1 - Left = 8 - Top = 41 - Width = 55 - Height = 17 - Caption = '&200 %' - TabOrder = 1 - OnClick = rbtnClick - end - object rbtn150: TRadioButton - Tag = 2 - Left = 8 - Top = 61 - Width = 55 - Height = 17 - Caption = '150 %' - TabOrder = 2 - OnClick = rbtnClick - end - object rbtn100: TRadioButton - Tag = 3 - Left = 8 - Top = 81 - Width = 55 - Height = 17 - Caption = '&100 %' - TabOrder = 3 - OnClick = rbtnClick - end - object rbtn75: TRadioButton - Tag = 4 - Left = 8 - Top = 101 - Width = 55 - Height = 17 - Caption = '&75 %' - TabOrder = 4 - OnClick = rbtnClick - end - object rbtn50: TRadioButton - Tag = 5 - Left = 8 - Top = 121 - Width = 55 - Height = 17 - Caption = '&50 %' - TabOrder = 5 - OnClick = rbtnClick - end - object rbtn10: TRadioButton - Tag = 7 - Left = 8 - Top = 161 - Width = 55 - Height = 17 - Caption = '10 %' - TabOrder = 7 - OnClick = rbtnClick - end - object rbtn25: TRadioButton - Tag = 6 - Left = 8 - Top = 141 - Width = 55 - Height = 17 - Caption = '25 %' - TabOrder = 6 - OnClick = rbtnClick - end - object rbtnTwoPages: TRadioButton - Tag = 10 - Left = 76 - Top = 61 - Width = 105 - Height = 17 - Caption = '&Two Pages' - TabOrder = 10 - OnClick = rbtnClick - end - object rbtnWholePage: TRadioButton - Tag = 9 - Left = 76 - Top = 41 - Width = 105 - Height = 17 - Caption = 'W&hole Page' - TabOrder = 9 - OnClick = rbtnClick - end - object rbtnPageWidth: TRadioButton - Tag = 8 - Left = 76 - Top = 21 - Width = 105 - Height = 17 - Caption = 'Page &Width' - TabOrder = 8 - OnClick = rbtnClick - end - object rbtnFourPages: TRadioButton - Tag = 11 - Left = 76 - Top = 81 - Width = 105 - Height = 17 - Caption = '&Four Pages' - TabOrder = 11 - OnClick = rbtnClick - end - object rbtnManyPages: TRadioButton - Tag = 12 - Left = 76 - Top = 101 - Width = 105 - Height = 17 - Caption = '&Many Pages:' - TabOrder = 12 - OnClick = rbtnClick - end - object btnManyPages: TBitBtn - Left = 122 - Top = 126 - Width = 45 - Height = 44 - TabOrder = 13 - OnClick = btnManyPagesClick - Glyph.Data = { - 1E030000424D1E03000000000000760000002800000024000000220000000100 - 040000000000A802000000000000000000001000000010000000000000000000 - 8000008000000080800080000000800080008080000080808000C0C0C0000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00888888888888 - 8888888888888888888888880000888888888888888888888888888888880888 - 0000888888888888888888888888888888800088000088888888888888888888 - 8888888888000008000088000000000000000000000000008888888800008877 - 7777777777777777777777778888888800008888888808888888888880888888 - 8888888800008888888000000000000000088888888888880000888888077777 - 7777777777708888888888880000888880F8888888888AA88877088888888888 - 000080000000000000000000000000000888888800000F777777777777777777 - 777777777088888800000F888888888888888888888888887088888800000F87 - FFFFFFFFFFFFFFFFFFFFFFF87088888800000F870888888888888888888888F8 - 7088888800000F870770F0000F00F0000F0778F87088888800000F870770FFFF - FF00FFFFFF0778F87088888800000F870770FFFFFF00FFFFFF0778F870888888 - 00000F870770000000000000000778F87088888800000F870770000000000000 - 000778F87088888800000F870770FFFFFF00FFFFFF0778F87088888800000F87 - 0770F0000F00F0000F0778F87088888800000F870770FFFFFF00FFFFFF0778F8 - 7088888800000F870770F0000F00F0000F0778F87088888800000F870770FFFF - FF00FFFFFF0778F87088888800000F870770F0000F00F0000F0778F870888888 - 00000F870770FFFFFF00FFFFFF0778F87088888800000F870770FFFFFF00FFFF - FF0778F87088888800000F870770000000000000000778F87088888800000F87 - 0000000000000000000000F87088888800000F87777777777777777777777778 - 7088888800000F888888888888888888888888887088888800000FFFFFFFFFFF - FFFFFFFFFFFFFFFF878888880000800000000000000000000000000008888888 - 0000} - Layout = blGlyphBottom - Spacing = 0 - end - end - object ilStub: TImageList - Left = 6 - Top = 248 - Bitmap = { - 494C010101000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF00000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000C6C6C600FFFFFF00C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00C6C6 - C600000000000000000000000000C6C6C600FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00848484008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000100000000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxfmZoom.pas b/internal/x.46/ExpressPrinting System/Sources/dxfmZoom.pas deleted file mode 100644 index 9f576883..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxfmZoom.pas +++ /dev/null @@ -1,665 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxfmZoom; - -interface - -{$I cxVer.inc} - -uses - Windows, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, StdCtrls, - ComCtrls, Commctrl, Buttons, ImgList, dxExtCtrls, dxPreVw, dxPSForm; - -type - TfmZoom = class(TCustomdxPSForm) - btnOK: TButton; - btnCancel: TButton; - gbxPreview: TGroupBox; - btnHelp: TButton; - Panel1: TPanel; - stxtFontPreview: TStaticText; - gbxZoomTo: TGroupBox; - rbtn500: TRadioButton; - rbtn200: TRadioButton; - rbtn150: TRadioButton; - rbtn100: TRadioButton; - rbtn75: TRadioButton; - rbtn50: TRadioButton; - rbtn10: TRadioButton; - rbtn25: TRadioButton; - rbtnTwoPages: TRadioButton; - rbtnWholePage: TRadioButton; - rbtnPageWidth: TRadioButton; - rbtnFourPages: TRadioButton; - rbtnManyPages: TRadioButton; - lblPercent: TLabel; - bvlPercentHolder: TBevel; - bvlFontPreviewHolder: TBevel; - bvlPreviewHolder: TBevel; - btnManyPages: TBitBtn; - ilStub: TImageList; - procedure lblPercentClick(Sender: TObject); - procedure rbtnClick(Sender: TObject); - procedure btnManyPagesClick(Sender: TObject); - private - FModified: Boolean; - FpnlFontPreview: TCustomControl; - FpnlPreview: TCustomControl; - FPreview: TdxPreview; - FPreviewOwnerSize: TPoint; - FsePercent: TCustomEdit; - FUpdateCount: Integer; - procedure FontPreviewPaint(Sender: TObject); - procedure PercentButtonClick(Sender: TObject; ButtonType: TdxButtonType; Button: TUDBtnType); - procedure PercentChange(Sender: TObject); - procedure PercentExit(Sender: TObject); - procedure PreviewPaint(Sender: TObject); - procedure SetZoomFactor(Value: Integer); - procedure ZoomKeyPress(Sender: TObject; var Key: Char); - protected - procedure BeginUpdate; - procedure EndUpdate; - - procedure CreateControls; virtual; - procedure InitControls; virtual; - procedure InitPreview(APreview: TdxPreview); - procedure LoadStrings; virtual; - procedure UpdateControlsState; - public - constructor Create(AOwner: TComponent); override; - function Execute: Boolean; - end; - -function dxZoomDlg(APreview: TdxPreview): Boolean; - -implementation - -{$R *.DFM} - -uses - //Variants, - Math, cxClasses, dxPSGlbl, dxPSImgs, dxPSRes, dxPSUtl, dxfmMnPg, - dxCore, cxDrawTextUtils; - -type - TdxPreviewAccess = class(TdxPreview); - -function dxZoomDlg(APreview: TdxPreview): Boolean; -var - Form: TfmZoom; -begin - Form := TfmZoom.Create(nil); - try - with Form do - begin - CreateControls; - InitPreview(APreview); - if (APreview.Owner <> nil) and (APreview.Owner is TControl) then - FPreviewOwnerSize := MakePoint(TControl(APreview.Owner).Width, TControl(APreview.Owner).Height) - else - FPreviewOwnerSize := MakePoint(APreview.Width, APreview.Height); - Result := Execute; - if Result then - begin - APreview.ZoomMode := FPreview.ZoomMode; - APreview.SetPageXYCount(FPreview.ColCount, FPreview.RowCount); - APreview.ZoomFactor := FPreview.ZoomFactor; - end; - end; - finally - Form.Free; - end; -end; - -{ TfmZoom } - -constructor TfmZoom.Create(AOwner: TComponent); -begin - inherited; - HelpContext := dxhcZoomDlg; - if HelpContext <> 0 then - BorderIcons := BorderIcons + [biHelp]; - btnHelp.Visible := HelpContext <> 0; - if not btnHelp.Visible then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - end; - FPreview := TdxPreview.Create(Self); - FPreview.Visible := False; - FPreview.MinZoomFactor := 10; - FPreview.Parent := Self; -end; - -function TfmZoom.Execute: Boolean; -begin - LoadStrings; - InitControls; - FModified := False; - UpdateControlsState; - Result := (ShowModal = mrOK) and FModified; -end; - -procedure TfmZoom.BeginUpdate; -begin - Inc(FUpdateCount); -end; - -procedure TfmZoom.EndUpdate; -begin - Dec(FUpdateCount); - if FUpdateCount = 0 then - begin - FpnlFontPreview.Invalidate; - FpnlPreview.Invalidate; - end; -end; - -procedure TfmZoom.CreateControls; -begin - FsePercent := TdxPSSpinEdit.Create(Self); - with TdxPSSpinEdit(FsePercent) do - begin - Parent := gbxZoomTo; - BoundsRect := bvlPercentHolder.BoundsRect; - MinValue := FPreview.MinZoomFactor; - MaxValue := FPreview.MaxZoomFactor; - Value := FPreview.ZoomFactor; - LegendText := PercentSymbol; - OnKeyPress := ZoomKeyPress; - OnButtonClick := PercentButtonClick; - OnExit := PercentExit; - OnChange := PercentChange; - end; - lblPercent.FocusControl := FsePercent; - - FpnlPreview := TdxPSPaintPanel.Create(Self); - with TdxPSPaintPanel(FpnlPreview) do - begin - Parent := gbxPreview; - BoundsRect := bvlPreviewHolder.BoundsRect; - OnPaint := PreviewPaint; - EdgeInner := esNone; - EdgeOuter := esNone; - end; - - FpnlFontPreview := TdxPSPaintPanel.Create(Self); - with TdxPSPaintPanel(FpnlFontPreview) do - begin - Parent := gbxPreview; - BoundsRect := bvlFontPreviewHolder.BoundsRect; - OnPaint := FontPreviewPaint; - EdgeInner := esNone; - EdgeOuter := esNone; - end; -end; - -procedure TfmZoom.InitControls; -var - I: Integer; - Control: TControl; -begin - case FPreview.ZoomMode of - pzmNone: - begin - rbtn500.Checked := FPreview.ZoomFactor = 500; - rbtn200.Checked := FPreview.ZoomFactor = 200; - rbtn150.Checked := FPreview.ZoomFactor = 150; - rbtn100.Checked := FPreview.ZoomFactor = 100; - rbtn75.Checked := FPreview.ZoomFactor = 75; - rbtn50.Checked := FPreview.ZoomFactor = 50; - rbtn25.Checked := FPreview.ZoomFactor = 25; - rbtn10.Checked := FPreview.ZoomFactor = 10; - for I := 0 to gbxZoomTo.ControlCount - 1 do - begin - Control := gbxZoomTo.Controls[I]; - if (Control is TRadioButton) and TRadioButton(Control).Checked then - begin - ActiveControl := TWinControl(Control); - Break; - end; - end; - TdxPSSpinEdit(FsePercent).Value := FPreview.ZoomFactor; - end; - - pzmPageWidth: - rbtnPageWidth.Checked := True; - - pzmPages: - begin - rbtnWholePage.Checked := FPreview.ColCount = 1; - rbtnTwoPages.Checked := FPreview.ColCount = 2; - rbtnFourPages.Checked := FPreview.ColCount = 4; - rbtnManyPages.Checked := not (FPreview.ColCount in [1, 2, 4]); - end; - end; - rbtnTwoPages.Enabled := FPreview.PageCount > 1; - rbtnFourPages.Enabled := FPreview.PageCount > 3; -end; - -procedure TfmZoom.InitPreview(APreview: TdxPreview); -var - I: Integer; -begin - FPreview.MeasurementUnits := APreview.MeasurementUnits; - FPreview.Orientation := APreview.Orientation; - FPreview.OriginalPageSize := APreview.OriginalPageSize; - for I := 0 to APreview.PageCount - 1 do - TdxPreviewAccess(FPreview).CreatePage; - FPreview.PageXCount := APreview.PageXCount; - FPreview.PageYCount := APreview.PageYCount; - FPreview.Width := APreview.Width; - FPreview.Height := APreview.Height; - FPreview.ZoomFactor := APreview.ZoomFactor; - FPreview.ZoomMode := APreview.ZoomMode; -end; - -procedure TfmZoom.LoadStrings; -begin - btnOK.Caption := cxGetResourceString(@sdxBtnOK); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); - - Caption := cxGetResourceString(@sdxZoomDlgCaption); - gbxZoomTo.Caption := cxGetResourceString(@sdxZoomDlgZoomTo); - rbtnPageWidth.Caption := cxGetResourceString(@sdxZoomDlgPageWidth); - rbtnWholePage.Caption := cxGetResourceString(@sdxZoomDlgWholePage); - rbtnTwoPages.Caption := cxGetResourceString(@sdxZoomDlgTwoPages); - rbtnFourPages.Caption := cxGetResourceString(@sdxZoomDlgFourPages); - rbtnManyPages.Caption := cxGetResourceString(@sdxZoomDlgManyPages); - lblPercent.Caption := cxGetResourceString(@sdxZoomDlgPercent); - gbxPreview.Caption := cxGetResourceString(@sdxZoomDlgPreview); - stxtFontPreview.Caption := cxGetResourceString(@sdxZoomDlgFontPreview); -end; - -procedure TfmZoom.UpdateControlsState; -begin - //btnOK.Enabled := FModified; -end; - -procedure TfmZoom.SetZoomFactor(Value: Integer); -begin - TdxPSSpinEdit(FsePercent).AsInteger := Value; - FPreview.ZoomFactor := Value; - FpnlFontPreview.Invalidate; - FpnlPreview.Invalidate; -end; - -procedure TfmZoom.lblPercentClick(Sender: TObject); -begin - ActiveControl := TLabel(Sender).FocusControl; -end; - -procedure TfmZoom.rbtnClick(Sender: TObject); -const - cZoomFactors: array[0..7] of Integer = (500, 200, 150, 100, 75, 50, 25, 10); -var - T: Longint; -begin - T := TTagToInt(TComponent(Sender).Tag); - if T < 8 then - begin - TdxPSSpinEdit(FsePercent).AsInteger := cZoomFactors[T]; - FPreview.ZoomMode := pzmNone; - SetZoomFactor(cZoomFactors[T]); - end - else - if T < 12 then - begin - SetZoomFactor(FPreview.ZoomFactor); - if T = 8 then - FPreview.ZoomMode := pzmPageWidth - else - begin - FPreview.ZoomMode := pzmPages; - case T of - 9: FPreview.SetPageXYCount(1, 1); - 10: FPreview.SetPageXYCount(2, 1); - 11: FPreview.SetPageXYCount(2, 2); - end; - end; - SetZoomFactor(FPreview.ZoomFactor); - end - else - SetZoomFactor(FPreview.ZoomFactor); - FModified := True; - UpdateControlsState; -end; - -procedure TfmZoom.PercentChange(Sender: TObject); -begin - FModified := True; - UpdateControlsState; -end; - -procedure TfmZoom.PercentExit(Sender: TObject); -begin - SetZoomFactor(TdxPSSpinEdit(Sender).AsInteger); -end; - -procedure TfmZoom.ZoomKeyPress(Sender: TObject; var Key: Char); -begin - if Key = Char(VK_RETURN) then - begin - SetZoomFactor(TdxPSSpinEdit(Sender).AsInteger); - UpdateControlsState; - end; -end; - -procedure TfmZoom.PercentButtonClick(Sender: TObject; ButtonType: TdxButtonType; Button: TUDBtnType); -begin - BeginUpdate; - try - with TdxPSSpinEdit(Sender) do - begin - SetZoomFactor(AsInteger); - rbtn500.Checked := AsInteger = 500; - rbtn200.Checked := AsInteger = 200; - rbtn150.Checked := AsInteger = 150; - rbtn100.Checked := AsInteger = 100; - rbtn75.Checked := AsInteger = 75; - rbtn50.Checked := AsInteger = 50; - rbtn25.Checked := AsInteger = 25; - rbtn10.Checked := AsInteger = 10; - end; - finally - EndUpdate; - end; -end; - -procedure TfmZoom.btnManyPagesClick(Sender: TObject); -var - AOrigin: TPoint; - AYShift: Integer; - AMaxColCount, AMaxRowCount: Integer; - ARowCount, AColCount: Integer; -begin - AOrigin := TButton(Sender).ClientOrigin; - AYShift := TButton(Sender).Height; - Inc(AOrigin.Y, AYShift); - { - AMaxColCount := Floor((FPreview.Width - 2 * FPreview.Indent) / - (FPreview.Indent + MulDiv(FPreview.PageSize.X, FPreview.MinZoomFactor, 100))); - AMaxRowCount := Floor((FPreview.Height - 2 * FPreview.Indent) / - (FPreview.Indent + MulDiv(FPreview.PageSize.Y, FPreview.MinZoomFactor, 100))); - } - AMaxColCount := FPreview.Width div MulDiv(FPreview.PageSize.X, FPreview.MinZoomFactor, 100); - AMaxRowCount := FPreview.Height div MulDiv(FPreview.PageSize.Y, 2 * FPreview.MinZoomFactor, 100); - if AMaxColCount = 0 then - AMaxColCount := 1; - if AMaxRowCount = 0 then - AMaxRowCount := 1; - - if AMaxColCount > 3 then - AColCount := 3 - else - AColCount := AMaxColCount; - - if AMaxRowCount > 3 then - ARowCount := 2 - else - ARowCount := AMaxRowCount; - - if dxChooseMultiplePages(ilStub, 0, AOrigin, AYShift, AMaxColCount, - AMaxRowCount, AColCount, ARowCount) then - begin - FPreview.ZoomMode := pzmPages; - FPreview.SetPageXYCount(AColCount, ARowCount); - if rbtnManyPages.Checked then - begin - SetZoomFactor(FPreview.ZoomFactor); - FModified := True; - UpdateControlsState; - end - else - rbtnManyPages.Checked := True; - end; -end; - -procedure TfmZoom.PreviewPaint(Sender: TObject); -const - ScreenRect: TRect = (Left: 12; Top: 10; Right: 170; Bottom: 93); - Offset: TPoint = (X: 10; Y: 2); -var - ADesktop, DestR, R, R2: TRect; - I, AWidth, AHeight, W, H, V: Integer; - DC: HDC; - Rgn: HRGN; - - function MapRect(const ARect: TRect): TRect; - begin - Result := ScaleRect(ARect, DestR.Right - DestR.Left, FPreview.Width, - DestR.Right - DestR.Left, FPreview.Width); - end; - - procedure DrawBorder; - var - R2: TRect; - begin - R2 := R; - FrameRect(DC, R2, GetSysColorBrush(COLOR_3DDKSHADOW)); - InflateRect(R2, -1, -1); - FrameRect(DC, R2, GetSysColorBrush(COLOR_3DDKSHADOW)); - InflateRect(R2, -1, -1); - FillRect(DC, R2, HBRUSH(COLOR_BTNSHADOW + 1)); - end; - - procedure DrawMonitor; - var - R2, R3: TRect; - L: Integer; - Pen: HPEN; - Brush: HBRUSH; - begin - { Monitor } - R2 := R; - R2.Bottom := MulDiv(R2.Bottom, 104, 122); - DrawEdge(DC, R2, EDGE_RAISED, BF_RECT); - InflateRect(R2, -11, -10); - Dec(R2.Bottom); - DrawEdge(DC, R2, BDR_SUNKENOUTER, BF_RECT or BF_MONO); - Inc(R2.Bottom); - InflateRect(R2, 11, 10); - { Under Screen Side Borders } - L := R.Left + MulDiv(R.Right - R.Left, 35, R.Right - R.Left); - FillRect(DC, MakeBounds(L + 1, R2.Bottom, 1, 4), GetSysColorBrush(COLOR_3DDKSHADOW)); - FillRect(DC, MakeBounds(R.Right - L - 1, R2.Bottom, 1, 4), GetSysColorBrush(COLOR_3DDKSHADOW)); - R2 := MakeRect(L, R2.Bottom, R.Right - L, MulDiv(R.Bottom, 108, 122)); - { Interior } - R3 := R2; - InflateRect(R2, -3, 0); - Inc(R2.Left); - Dec(R2.Bottom); - FillRect(DC, MakeRect(R2.Left, R2.Top, R2.Right, R2.Top + 2), GetSysColorBrush(COLOR_BTNSHADOW)); - FillRect(DC, MakeBounds(R2.Right, R2.Top, 2, 4), GetSysColorBrush(COLOR_BTNSHADOW)); - FillRect(DC, MakeBounds(R2.Left - 2, R2.Bottom - 1, 2, 2), GetSysColorBrush(COLOR_BTNHIGHLIGHT)); - Dec(R2.Left); - InflateRect(R2, -3, 0); - OffsetRect(R2, 0, 6); - Dec(R2.Bottom); - { Right Side } - MoveToEx(DC, R3.Right - 1, R3.Bottom - 1, nil); - LineTo(DC, R2.Right - 1, R2.Bottom + 1); - Pen := SelectObject(DC, CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNSHADOW))); - MoveToEx(DC, R3.Right - 2, R3.Bottom - 1, nil); - LineTo(DC, R2.Right - 2, R2.Bottom + 1); - MoveToEx(DC, R3.Right - 2, R3.Bottom - 2, nil); - LineTo(DC, R2.Right - 2, R2.Bottom); - MoveToEx(DC, R3.Right - 2, R3.Bottom - 3, nil); - LineTo(DC, R2.Right - 2, R2.Bottom - 1); - DeleteObject(SelectObject(DC, Pen)); - { Left Side } - MoveToEx(DC, R3.Left + 1, R3.Bottom - 1, nil); - LineTo(DC, R2.Left + 1, R2.Bottom + 1); - Pen := SelectObject(DC, CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNHIGHLIGHT))); - MoveToEx(DC, R3.Left + 2, R3.Bottom - 1, nil); - LineTo(DC, R2.Left + 2, R2.Bottom + 1); - MoveToEx(DC, R3.Left + 2, R3.Bottom - 2, nil); - LineTo(DC, R2.Left + 2, R2.Bottom); - DeleteObject(SelectObject(DC, Pen)); - R3 := R2; - { Button } - R2 := MakeBounds(R2.Right - 19, R2.Top - 5, 10, 4); - DrawEdge(DC, R2, BDR_RAISEDINNER, BF_LEFT or BF_RIGHT or BF_BOTTOM); - FillRect(DC, MakeBounds(R2.Left, R2.Top, 10, 1), HBRUSH(COLOR_BTNFACE + 1)); - { Spot } - InflateRect(R2, -3, 0); - OffsetRect(R2, -11, 0); - DrawEdge(DC, R2, BDR_SUNKENOUTER, BF_RECT or BF_SOFT); - InflateRect(R2, -1, -1); - Brush := CreateSolidBrush(clLime); - FillRect(DC, R2, Brush); - DeleteObject(Brush); - R2 := R3; - - FillRect(DC, R2, GetSysColorBrush(COLOR_BTNSHADOW)); - OffsetRect(R2, 0, 2); - Dec(R2.Bottom); - FillRect(DC, R2, GetSysColorBrush(COLOR_3DDKSHADOW)); - InflateRect(R2, -4, 0); - Inc(R2.Top, 1); - Inc(R2.Bottom, 4); - DrawEdge(DC, R2, BDR_SUNKENOUTER, BF_FLAT or BF_MONO or BF_LEFT or BF_RIGHT); - R3 := R2; - { Interior } - InflateRect(R2, -1, -1); - OffsetRect(R2, 0, -1); - Inc(R2.Left, 2); - FillRect(DC, R2, HBRUSH(COLOR_BTNSHADOW + 1)); - FillRect(DC, MakeBounds(R2.Right - 2, R2.Bottom, 2, 2), GetSysColorBrush(COLOR_BTNSHADOW)); - FillRect(DC, MakeBounds(R2.Left - 2, R2.Bottom, 2, 2), GetSysColorBrush(COLOR_BTNHIGHLIGHT)); - { Bottom } - R2 := R3; - InflateRect(R2, (R2.Left - R.Left) div 2, 0); - OffsetRect(R2, 0, 4); - Inc(R2.Bottom, 1); - DrawButtonFace(TdxPSPaintPanel(Sender).Canvas, R2, 0, bsWin31, True, False, False); - Inc(R2.Left); - Inc(R2.Top); - DrawEdge(DC, R2, EDGE_RAISED, BF_SOFT or BF_RECT); - SetPixel(DC, R2.Right - 1, R2.Bottom - 1, GetSysColor(COLOR_BTNFACE)); - end; - -begin - if FUpdateCount <> 0 then Exit; - ADesktop := GetDesktopWorkArea; - with TdxPSPaintPanel(Sender) do - begin - Windows.GetClientRect(Handle, R); - DC := Canvas.Handle; - end; - FillRect(DC, R, GetSysColorBrush(COLOR_BTNFACE)); - DrawMonitor; - AWidth := MulDiv(ScreenRect.Right - ScreenRect.Left - 2 * Offset.X, - FPreviewOwnerSize.X, ADesktop.Right - ADesktop.Left); - AHeight := MulDiv(ScreenRect.Bottom - ScreenRect.Top - 2 * Offset.Y, - FPreviewOwnerSize.Y, ADesktop.Bottom - ADesktop.Top); - - with ScreenRect do - begin - W := Right - Left; - H := Bottom - Top; - if AWidth / AHeight > W / H then - begin - V := MulDiv(AHeight, W, AWidth); - R := Bounds(Left, Top + (H - V) div 2, W, V); - end - else - begin - V := MulDiv(AWidth, H, AHeight); - R := Bounds(Left + (W - V) div 2, Top, V, H); - end; - end; - DestR := R; - DrawBorder; - - InflateRect(R, -1, -1); - Dec(R.Top); - - Rgn := dxPSUtl.IntersectCliprect(DC, R); - - FPreview.CalcPagesBounds(FPreview.TopPos, FPreview.VirtualWidth, FPreview.VirtualHeight); - for I := 0 to FPreview.PageCount - 1 do - begin - R := MapRect(FPreview.Pages[I].Bounds); - OffsetRect(R, 0, 4); - if (R.Right - R.Left) < (DestR.Right - DestR.Left) then - OffsetRect(R, 1, 0); - OffsetRect(R, DestR.Left, DestR.Top); - if IntersectRect(R2, R, DestR) then - DrawEdge(DC, R, BDR_SUNKENOUTER, BF_RECT or BF_MIDDLE or BF_MONO); - end; - - dxPSUtl.RestoreClipRgn(DC, Rgn); -end; - -procedure TfmZoom.FontPreviewPaint(Sender: TObject); -const - Format = CXTO_PATTERNEDTEXT or CXTO_CENTER_HORIZONTALLY or CXTO_WORDBREAK or CXTO_CHARBREAK; -var - Template, S: string; - I: Integer; - R: TRect; -begin - if FUpdateCount <> 0 then Exit; - - Template := cxGetResourceString(@sdxZoomDlgFontPreviewString); - S := ''; - for I := 0 to 6 do - begin - S := S + Template; - if I <> 6 then S := S + #13#10; - end; - - with TdxPSPaintPanel(Sender), Canvas do - begin - R := ClientRect; - Inc(R.Top, 2); - - Brush.Color := clWindowText; - FrameRect(R); - InflateRect(R, -1, -1); - Brush.Color := clWindow; - FillRect(R); - - Font.Size := Round(12 * FPreview.ZoomFactor / 100); - Font.Name := 'Times New Roman'; - cxTextOut(Handle, S, R, Format, nil, 0, 0); - end; -end; - -end. - diff --git a/internal/x.46/ExpressPrinting System/Sources/dxpsfmEditDesc.dfm b/internal/x.46/ExpressPrinting System/Sources/dxpsfmEditDesc.dfm deleted file mode 100644 index 0c462540..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxpsfmEditDesc.dfm +++ /dev/null @@ -1,59 +0,0 @@ -object dxfmEditDescription: TdxfmEditDescription - Left = 383 - Top = 205 - BorderStyle = bsDialog - Caption = 'Edit Description' - ClientHeight = 294 - ClientWidth = 333 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = True - Position = poScreenCenter - OnKeyDown = FormKeyDown - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 90 - Top = 265 - Width = 75 - Height = 23 - Caption = '&OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 171 - Top = 265 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 252 - Top = 265 - Width = 75 - Height = 23 - Caption = '&Help' - TabOrder = 3 - end - object gbxMemoHost: TGroupBox - Left = 5 - Top = 6 - Width = 322 - Height = 249 - TabOrder = 0 - object memDescription: TMemo - Left = 8 - Top = 18 - Width = 305 - Height = 218 - TabOrder = 0 - end - end -end diff --git a/internal/x.46/ExpressPrinting System/Sources/dxpsfmEditDesc.pas b/internal/x.46/ExpressPrinting System/Sources/dxpsfmEditDesc.pas deleted file mode 100644 index 1b971e84..00000000 --- a/internal/x.46/ExpressPrinting System/Sources/dxpsfmEditDesc.pas +++ /dev/null @@ -1,180 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressPrinting System(tm) COMPONENT SUITE } -{ } -{ Copyright (C) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSPRINTINGSYSTEM AND } -{ ALL ACCOMPANYING VCL CONTROLS AS PART OF AN } -{ EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxPSfmEditDesc; - -interface - -{$I cxVer.inc} - -uses - Windows, Messages, Classes, Controls, Forms, StdCtrls, dxPSForm; - -type - TdxfmEditDescription = class(TCustomdxPSForm) - btnOK: TButton; - btnCancel: TButton; - btnHelp: TButton; - gbxMemoHost: TGroupBox; - memDescription: TMemo; - procedure FormResize(Sender: TObject); - procedure FormKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - private - function GetDescription: string; - procedure SetDescription(const Value: string); - procedure WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); message WM_GETMINMAXINFO; - protected - procedure BeforeConstruction; override; - procedure Initialize; - procedure LoadStrings; - public - constructor Create(AOwner: TComponent); override; - function Execute: Boolean; - property Description: string read GetDescription write SetDescription; - end; - -function dxEditDescriptionDlg(var ADescription: string): Boolean; - -implementation - -{$R *.DFM} - -uses - cxClasses, dxPSRes, dxPSUtl, dxPSGlbl; - -function dxEditDescriptionDlg(var ADescription: string): Boolean; -var - Dialog: TdxfmEditDescription; -begin - Dialog := TdxfmEditDescription.Create(nil); - try - Dialog.Description := ADescription; - Result := Dialog.Execute; - if Result then - ADescription := Dialog.Description; - finally - Dialog.Free; - end; -end; - -{ TdxfmEditDescription } - -constructor TdxfmEditDescription.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - HelpContext := dxhcEditDescriptionDlg; -end; - -function TdxfmEditDescription.Execute: Boolean; -begin - Initialize; - Result := ShowModal = mrOK; -end; - -procedure TdxfmEditDescription.FormResize(Sender: TObject); -const - BtnOffsetY = 6; -var - BtnOffsetX, RightOrigin, TopOrigin: Integer; -begin - BtnOffsetX := gbxMemoHost.Left; - with gbxMemoHost do - SetBounds(Left, Top, Self.ClientWidth - 2 * Left, - Self.ClientHeight - Top - btnOK.Height - 2 * BtnOffsetY); - - with memDescription do - SetBounds(Left, Top, Parent.ClientWidth - 2 * Left, Parent.ClientHeight - 2 * Top); - - RightOrigin := gbxMemoHost.Left + gbxMemoHost.Width; - TopOrigin := gbxMemoHost.Top + gbxMemoHost.Height + BtnOffsetY; - - PlaceButtons([btnHelp, btnCancel, btnOK], BtnOffsetX, RightOrigin, TopOrigin); -end; - -procedure TdxfmEditDescription.FormKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if (Key = VK_ESCAPE) and (Shift = []) and (ActiveControl is TCustomMemo) then - ModalResult := mrCancel; -end; - -procedure TdxfmEditDescription.BeforeConstruction; -begin - inherited BeforeConstruction; - Options := Options + [foSizeableDialog]; -end; - -procedure TdxfmEditDescription.Initialize; -begin - btnHelp.Visible := HelpContext <> 0; - if HelpContext <> 0 then - BorderIcons := BorderIcons + [biHelp]; - - if not btnHelp.Visible then - begin - btnOK.BoundsRect := btnCancel.BoundsRect; - btnCancel.BoundsRect := btnHelp.BoundsRect; - end; - LoadStrings; - FormResize(nil); -end; - -procedure TdxfmEditDescription.LoadStrings; -begin - Caption := cxGetResourceString(@sdxEditDescription); - btnOK.Caption := cxGetResourceString(@sdxBtnOKAccelerated); - btnCancel.Caption := cxGetResourceString(@sdxBtnCancel); - btnHelp.Caption := cxGetResourceString(@sdxBtnHelp); -end; - -function TdxfmEditDescription.GetDescription: string; -begin - Result := memDescription.Lines.Text; -end; - -procedure TdxfmEditDescription.SetDescription(const Value: string); -begin - memDescription.Lines.Text := Value; -end; - -procedure TdxfmEditDescription.WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); -begin - inherited; - Message.MinMaxInfo^.ptMinTrackSize := Point(300, 300); -end; - -end. - diff --git a/internal/x.46/ExpressQuantumGrid 6/Description of Demos.pdf b/internal/x.46/ExpressQuantumGrid 6/Description of Demos.pdf deleted file mode 100644 index 67d4c8fc..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Description of Demos.pdf and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/EULA.txt b/internal/x.46/ExpressQuantumGrid 6/EULA.txt deleted file mode 100644 index 84764290..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/EULA.txt +++ /dev/null @@ -1,119 +0,0 @@ -DEVELOPER EXPRESS INC -ExpressQuantumGrid 6(tm) COMPONENT SUITE -Copyright (C) 1999-2009 Developer Express Inc. - -END-USER LICENSE AGREEMENT -FOR ALL SOFTWARE COMPONENT PRODUCT(S) - -IMPORTANT- READ CAREFULLY: This DEVELOPER EXPRESS INC ("DEVEXPRESS") End-User License Agreement ("EULA") is a legal agreement between you, a developer of software applications, ("Developer End User") and DEVEXPRESS for all DEVEXPRESS products, controls, source code, demos, intermediate files, media, printed materials, and "online" or electronic documentation ("SOFTWARE COMPONENT PRODUCT(S)") contained in this installation file. - -DEVEXPRESS grants to you as an individual, a personal, nonexclusive license to install and use the SOFTWARE COMPONENT PRODUCT(S) for the sole purposes of designing, developing, testing, and deploying application programs which you create. By installing, copying, or otherwise using the SOFTWARE COMPONENT PRODUCT(S), you agree to be bound by the terms of this EULA. If you do not agree to any part of the terms of this EULA, DO NOT INSTALL, USE, EVALUATE, OR REPLICATE IN ANY MANNER, ANY PART, FILE OR PORTION OF THE SOFTWARE COMPONENT PRODUCT(S). - -All SOFTWARE COMPONENT PRODUCT(S) is licensed, not sold. If you are an individual, you must acquire an individual license for the SOFTWARE COMPONENT PRODUCT(S) from DEVEXPRESS or its authorized resellers. If you are an entity, you must acquire and assign an individual license for each Developer End User within your organization using and or developing with the SOFTWARE COMPONENT PRODUCT(S) from DEVEXPRESS or its authorized resellers. - -If the SOFTWARE COMPONENT PRODUCT(S) you have obtained is marked as a "TRIAL" or "EVALUATION," you may install one copy of the SOFTWARE COMPONENT PRODUCT(S) for testing purposes for a period of 30 calendar days from the date of installation ("Evaluation Period"). Upon expiration of the Evaluation Period, the SOFTWARE COMPONENT PRODUCT(S) must be uninstalled and all copies destroyed. - -RIGOROUS ENFORCEMENT OF INTELLECTUAL PROPERTY RIGHTS. If the licensed right of use for this SOFTWARE COMPONENT PRODUCT(S) is purchased by you with any intent to reverse engineer, decompile, create derivative works, and the exploitation or unauthorized transfer of, any DEVEXPRESS intellectual property and trade secrets, to include any exposed methods or source code where provided, no licensed right of use shall exist, and any PRODUCT(s) created as a result shall be judged illegal by definition of all applicable law. Any sale or resale of intellectual property or created derivatives so obtained will be prosecuted to the fullest extent of all local, federal and international law. - -1. GRANT OF LICENSE. - -This EULA, if legally executed as defined herein, licenses and so grants the single individual Developer End User the following rights: - -SOFTWARE COMPONENT PRODUCT(S) - Developer End User may install and use the SOFTWARE COMPONENT PRODUCT(S) on a single computer. Developer End User may also install and use the SOFTWARE COMPONENT PRODUCT(S) on a portable computer. - -2. LIMITATIONS ON REVERSE ENGINEERING, DECOMPILATION, AND DISASSEMBLY. - -You may not reverse engineer, decompile, create derivative works, translate, or disassemble the SOFTWARE COMPONENT PRODUCT(S), and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. You agree to take all reasonable, legal and appropriate measures to prohibit the illegal dissemination of the SOFTWARE COMPONENT PRODUCT(S) or any of its constituent parts and redistributables to the fullest extent of all applicable local, US Codes and International Laws and Treaties regarding anti-circumvention, including but not limited to, the Geneva and Berne World Intellectual Property Organization (WIPO) Diplomatic Conferences. - -3. SEPARATION OF COMPONENTS. - -The SOFTWARE COMPONENT PRODUCT(S) is licensed as a single PRODUCT(s). The SOFTWARE COMPONENT PRODUCT(S) and its constituent parts and any provided redistributables may not be reverse engineered, decompiled, disassembled or separated for use on more than one computer, nor placed for distribution, sale, or resale as individual creations by Developer End User. The provision of source code, if included with the SOFTWARE COMPONENT PRODUCT(S), does not constitute transfer of any legal rights to such code, and resale or distribution of all or any portion of all source code and intellectual property will be prosecuted to the fullest extent of all applicable local, federal and international laws. All DEVEXPRESS libraries, source code, redistributables and other files remain DEVEXPRESS's exclusive property. You may not distribute any files, except those that DEVEXPRESS has expressly designated as Redistributable. - -4. RENTAL. - -You may not rent, lease, or lend the SOFTWARE COMPONENT PRODUCT(S). - -5. TRANSFER. - -You may NOT permanently or temporarily transfer ANY of your rights under this EULA to any individual or entity without prior written approval from DEVEXPRESS. Regardless of any modifications which you make and regardless of how you might compile, link, and/or package your programs, under no circumstances may the libraries, Redistributables, and/or other files of the SOFTWARE COMPONENT PRODUCT(S) (including any portions thereof) be used for developing programs by anyone other than you. Only you as the licensed Developer End User have the right to use the libraries, redistributables, or other files of the SOFTWARE COMPONENT PRODUCT(S) (or any portions thereof) for developing programs created with the SOFTWARE COMPONENT PRODUCT(S). In particular, you may not share copies of the Redistributables with other co-developers. You may not reproduce or distribute any DEVEXPRESS documentation without DEVEXPRESS's explicit permission. - -If you are an entity (Company), you must acquire and assign a license to each Developer End User within your organization using and or developing with the SOFTWARE COMPONENT PRODUCT(S). With written notification to DEVEXPRESS, Company may transfer the license obtained for a Developer End User to another Developer End User employed or otherwise engaged by Company if the initial Developer End User is no longer employed or engaged by Company or is reassigned to another function within Company and no longer develops software applications using the SOFTWARE COMPONENT PRODUCT(S). In addition, with written notification to DEVEXPRESS, Company may transfer its license of the SOFTWARE COMPONENT PRODUCT(S) to a successor Company. - -6. ROYALTY FREE REDISTRIBUTION. - -DEVEXPRESS PRODUCT(s) may include certain files ("Redistributable(s)") intended for distribution by you to the users of software applications which you create. Redistributables include, for example, those files identified in printed or on-line documentation as redistributable files, or those files preselected for deployment by an install utility provided with the SOFTWARE COMPONENT PRODUCT(S) (if any). In all circumstances, the Redistributables for the SOFTWARE COMPONENT PRODUCT(S) are only those files specifically designated as such by DEVEXPRESS. - -Subject to all of the terms and conditions in this EULA, you may reproduce and distribute copies of the Redistributables, provided that such copies are made from the original copy of the Redistributables included with the SOFTWARE COMPONENT PRODUCT(S) or modified versions of the Redistributables which are provided to you by DEVEXPRESS or those which you create. Copies of Redistributables may only be distributed with and for the sole purpose of executing application programs permitted under this EULA that you have created using the SOFTWARE COMPONENT PRODUCT(S). - -REDISTRIBUTABLES. To obtain a list of redistributables that apply under this EULA, contact support@devexpress.com - -AT NO TIME MAY DEVELOPER END USER CREATE ANY TOOL, REDISTRIBUTABLE, OR SOFTWARE COMPONENT PRODUCT(S) THAT DIRECTLY OR INDIRECTLY COMPETES WITH DEVEXPRESS SOFTWARE COMPONENT PRODUCT(S) WHICH UTILIZES ALL OR ANY PORTION OF THE SOFTWARE COMPONENT PRODUCT(S) contained within this installation. - -Distribution by the Developer End User of any design-time tools (EXE's OCX's or DLL's), executables, and source code distributed to Developer End User by DEVEXPRESS as part of this SOFTWARE COMPONENT PRODUCT(S) and not explicitly identified as a redistributable file is strictly prohibited. The Developer End User shall not develop software applications that provide an application programming interface to the SOFTWARE COMPONENT PRODUCT(S) or the SOFTWARE COMPONENT PRODUCT(S) as modified. - -The Developer End User may NOT distribute the SOFTWARE COMPONENT PRODUCT(S), in any format, to other users for development or application compilation purposes. Specifically, if Developer End User creates a control using the SOFTWARE COMPONENT PRODUCT(S) as a constituent control, Developer End User may NOT distribute the control created with the SOFTWARE COMPONENT PRODUCT(S) (in any format) to users to be used used at design time and or for ANY development purposes. - -Developer End User MAY NOT REDISTRIBUTE any SOFTWARE COMPONENT PRODUCT(s) files if using an evaluation, trial, Not for Resale, or demo version of the SOFTWARE COMPONENT PRODUCT(s). - -7. UPGRADES. - -If the SOFTWARE COMPONENT PRODUCT(S) is labeled as an upgrade, you must be properly licensed to use the SOFTWARE COMPONENT PRODUCT(S) identified by DEVEXPRESS as being eligible for the upgrade in order to use the SOFTWARE COMPONENT PRODUCT(S). A SOFTWARE COMPONENT PRODUCT(S) labeled as an upgrade replaces and/or supplements the SOFTWARE COMPONENT PRODUCT(S) that formed the basis for your eligibility for the upgrade, and together constitutes a single PRODUCT(S). You may use the resulting upgraded PRODUCT(S) only in accordance with all the terms of this EULA. - -8. COPYRIGHT. - -All title and copyrights in and to the SOFTWARE COMPONENT PRODUCT(S) (including but not limited to any copywritten images, demos, source code, intermediate files, packages, photographs, redistributables, animations, video, audio, music, text, and "applets" incorporated into the SOFTWARE COMPONENT PRODUCT(S) the accompanying printed materials, and any copies of the SOFTWARE COMPONENT PRODUCT(S)) are owned by DEVEXPRESS or its subsidiaries. The SOFTWARE COMPONENT PRODUCT(S) is protected by copyright laws and international treaty provisions and therefore, you must treat the SOFTWARE COMPONENT PRODUCT(S) like any other copyrighted material except that you may install the SOFTWARE COMPONENT PRODUCT(S) as described in this EULA. - -9. DUAL-MEDIA SOFTWARE COMPONENT PRODUCT(S). - -You may receive the SOFTWARE COMPONENT PRODUCT(S) in more than one medium. Regardless of the medium, you may use only one medium that is appropriate for your single computer. You may not loan, sell, rent, lease, or otherwise transfer in any manner the other medium to another user or entity. - -10. U.S. GOVERNMENT RESTRICTED RIGHTS. - -The Licensed Software is Commercial Computer Software provided with RESTRICTED RIGHTS under Federal Acquisition Regulations and agency supplements to them. Use, duplication or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFAR 255.227-7013 et. seq. or 252.211-7015, or subparagraphs (a) through (d) of the Commercial Computer Software Restricted Rights at FAR 52.227-19, as applicable, or similar clauses in the NASA FAR Supplement. Contractor-manufacturer is Developer Express Inc. / 801 N. Brand Blvd Suite 850, Glendale CA 91203. - -11. EXPORT RESTRICTIONS. - -DEVEXPRESS expressly complies with all export restrictions imposed by the government of the United States of America. You, as Developer End User, must agree not to export or re-export the SOFTWARE COMPONENT PRODUCT(S) within any created application to any country, person, entity or end user subject to U.S.A. export restrictions. Restricted countries currently include, but are not necessarily limited to Cuba, Iran, Iraq, Libya, North Korea, Sudan, and Syria. You warrant and represent that neither the U.S.A. Bureau of Export Administration nor any other federal agency has suspended, revoked or denied your export privileges. - -12. NOTE ON JAVA SUPPORT. - -Certain SOFTWARE COMPONENT PRODUCT(S) may contain support for programs written in Java. Java technology is not fault tolerant and is not designed, manufactured, or intended for use or resale as on-line control equipment in hazardous environments requiring fail-safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of Java technology could lead directly to death, personal injury, or severe physical or environmental damage. - -13. DISCLAIMER OF WARRANTY. - -DEVEXPRESS expressly disclaims any warranty for the SOFTWARE COMPONENT PRODUCT(S). THE SOFTWARE COMPONENT PRODUCT(S) AND ANY RELATED DOCUMENTATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. DEVEXPRESS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF THE USE, OF THE SOFTWARE COMPONENT PRODUCT(S) IN TERMS OF CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE COMPONENT PRODUCT(S) REMAINS WITH YOU. No oral or written information or advice given by DEVEXPRESS or its employees shall create a warranty or in any way increase the scope of this warranty. - -14. LIMITATIONS ON LIABILITY. - -To the maximum extent permitted by applicable law, in no event shall DEVEXPRESS be liable for any special, incidental, indirect, or consequential damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use the SOFTWARE COMPONENT PRODUCT(S) or the provision of or failure to provide Support Services, even if DEVEXPRESS has been advised of the possibility of such damages. - -Developer End User understands that the SOFTWARE COMPONENT PRODUCT(S) may produce inaccurate results because of a failure or fault within the SOFTWARE COMPONENT PRODUCT(S) or failure by Developer End User to properly use and or deploy the SOFTWARE COMPONENT PRODUCT(S). Developer End User assumes full and sole responsibility for any use of the SOFTWARE COMPONENT PRODUCT(S), and bears the entire risk for failures or faults within the SOFTWARE COMPONENT PRODUCT(S). You agree that regardless of the cause of failure or fault or the form of any claim, YOUR SOLE REMEDY AND DEVEXPRESS'S SOLE OBLIGATION SHALL BE GOVERNED BY THIS AGREEMENT AND IN NO EVENT SHALL DEVEXPRESS'S LIABILITY EXCEED THE PRICE PAID TO DEVEXPRESS FOR THE SOFTWARE COMPONENT PRODUCT(S). This Limited Warranty is void if failure of the SOFTWARE COMPONENT PRODUCT(S) has resulted from accident, abuse, alteration, unauthorized use or misapplication of the SOFTWARE COMPONENT PRODUCT(S). - -15. INDEMNIFICATION. - -You hereby agree to indemnify DEVEXPRESS and its officers, directors, employees, agents, and representatives from each and every demand, claim, loss, liability, or damage of any kind, including actual attorneys fees, whether in tort or contract, that it or any of them may incur by reason of, or arising out of, any claim which is made by any third party with respect to any breach or violation of this Agreement by you or any claims based on the Applications and the SOFTWARE COMPONENT PRODUCT(S) included herein. - -16. SUPPORT SERVICES. - -DEVEXPRESS may provide you with support services related to the SOFTWARE COMPONENT PRODUCT(S) ("Support Services"). Use of Support Services is governed by DEVEXPRESS policies and programs described in the user manual, in "on line" documentation and/or other DEVEXPRESS provided materials. Any supplemental SOFTWARE COMPONENT PRODUCT(S) provided to you as part of the Support Services shall be considered part of the SOFTWARE COMPONENT PRODUCT(S) and subject to the terms and conditions of this EULA. With respect to technical information you provide to DEVEXPRESS as part of the Support Services, DEVEXPRESS may use such information for its business purposes, including for SOFTWARE COMPONENT PRODUCT(s) support and development. DEVEXPRESS will not utilize such technical information in a form that personally identifies you. - -17. TERMINATION. - -Without prejudice to any other rights or remedies, DEVEXPRESS will terminate this EULA upon your failure to comply with all the terms and conditions of this EULA. In such events, you must destroy all copies of the SOFTWARE COMPONENT PRODUCT(S) and all of its component parts including any related documentation, and must remove ANY and ALL use of such technology immediately from any applications using technology contained in the SOFTWARE COMPONENT PRODUCT(S) developed by you, whether in native, altered or compiled state. - -18. TAX. - -DEVEXPRESS delivers its software electronically and does not collect sales or use tax for residents of US states in which it operates. You should confirm that your local, state, or federal government does not impose any sales or use tax on electronically delivered software. You are entirely liable for any such sales or use tax. - -19. MISCELLANEOUS. - -This EULA shall be construed, interpreted and governed by the laws of the State of Nevada, U.S.A. This EULA gives you specific legal rights; you may have others that vary from state to state and from country to country. - -This EULA may only be modified in writing signed by you and an authorized officer of DEVELOPER EXPRESS INC. If any provision of this EULA is found void or unenforceable, the remainder will remain valid and enforceable according to its terms. If any remedy provided is determined to have failed for its essential purpose, all limitations of liability and exclusions of damages set forth in the Limited Warranty shall remain in effect. - -DEVEXPRESS reserves all rights not specifically granted in this EULA. - -ACKNOWLEDGEMENTS. Developer End User acknowledges that he or she has read this Agreement, understands it, and agrees to be bound by its terms and conditions. - -Should you have any questions concerning this EULA, or if you desire to contact DEVEXPRESS for any reason, please contact us directly in the United States at +1 (818) 844 3383, or write: Developer Express Inc. Legal department / 801 N. Brand Blvd Suite 850, Glendale CA 91203. - diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC10.bpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC10.bpk deleted file mode 100644 index 43d04c0f..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC10.bpk +++ /dev/null @@ -1,221 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = cxGridC10.bpl -OBJFILES = cxGridLevel.obj \ - cxGridStrs.obj cxFilterDialog.obj cxGrid.obj \ - cxGridChartView.obj cxGridBandedTableView.obj cxGridCardView.obj \ - cxGridCommon.obj cxGridCustomView.obj cxGridCustomTableView.obj \ - cxGridDBChartView.obj cxGridDBBandedTableView.obj \ - cxGridDBCardView.obj cxGridDBDataDefinitions.obj \ - cxGridDBTableView.obj cxGridDetailsSite.obj \ - cxGridRows.obj cxGridFilterHelpers.obj \ - cxGridExportLink.obj cxGridTableView.obj \ - cxDBExtLookupComboBox.obj \ - cxGridCustomPopUpMenu.obj \ - cxGridFooterPopupMenuItems.obj \ - cxGridHeaderPopupMenuItems.obj \ - cxGridGroupRowPopupMenuItems.obj \ - cxGridMenuOperations.obj \ - cxGridPopUpMenu.obj \ - cxGridStdPopUpMenu.obj \ - cxGridUIBandedTableHelper.obj \ - cxGridUICardHelper.obj \ - cxGridUICustomTableHelper.obj \ - cxGridUIHelper.obj \ - cxGridUITableHelper.obj\ - cxGridPopupMenuConsts.obj \ - cxGridStyleSheetsPreview.obj \ - cxGridC10.obj -RESFILES = cxGridC10.res -MAINSOURCE = cxGridC10.cpp -RESDEPEN = $(RESFILES) cxFilterDialog.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dxThemeC10.bpi cxEditorsC10.bpi cxExportC10.bpi cxLibraryC10.bpi \ - cxDataC10.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi cxExtEditorsC10.bpi \ - cxPageControlC10.bpi dxCoreC10.bpi -SPARELIBS = rtl.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) \ - -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressQuantumGrid 6 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC10.cpp b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC10.cpp deleted file mode 100644 index ef4d9f73..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC10.cpp +++ /dev/null @@ -1,65 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxGridC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEPACKAGE("cxExportC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("cxExtEditorsC10.bpi"); -USEPACKAGE("cxPageControlC10.bpi"); -USEUNIT("cxGridStrs.pas"); -USEFORMNS("cxFilterDialog.pas", Cxfilterdialog, cxFilterDialog); -USEUNIT("cxDBExtLookupComboBox.pas"); -USEUNIT("cxGrid.pas"); -USEUNIT("cxGridChartView.pas"); -USEUNIT("cxGridBandedTableView.pas"); -USEUNIT("cxGridCardView.pas"); -USEUNIT("cxGridCommon.pas"); -USEUNIT("cxGridCustomTableView.pas"); -USEUNIT("cxGridCustomView.pas"); -USEUNIT("cxGridDBChartView.pas"); -USEUNIT("cxGridDBBandedTableView.pas"); -USEUNIT("cxGridDBCardView.pas"); -USEUNIT("cxGridDBDataDefinitions.pas"); -USEUNIT("cxGridRows.pas"); -USEUNIT("cxGridDBTableView.pas"); -USEUNIT("cxGridDetailsSite.pas"); -USEUNIT("cxGridLevel.pas"); -USEUNIT("cxGridExportLink.pas"); -USEUNIT("cxGridTableView.pas"); -USEUNIT("cxGridFilterHelpers.pas"); -USEUNIT("cxGridCustomPopUpMenu.pas"); -USEUNIT("cxGridFooterPopupMenuItems.pas"); -USEUNIT("cxGridHeaderPopupMenuItems.pas"); -USEUNIT("cxGridGroupRowPopupMenuItems.pas"); -USEUNIT("cxGridMenuOperations.pas"); -USEUNIT("cxGridPopUpMenu.pas"); -USEUNIT("cxGridStdPopUpMenu.pas"); -USEUNIT("cxGridUIBandedTableHelper.pas"); -USEUNIT("cxGridUICardHelper.pas"); -USEUNIT("cxGridUICustomTableHelper.pas"); -USEUNIT("cxGridUIHelper.pas"); -USEUNIT("cxGridUITableHelper.pas"); -USEUNIT("cxGridPopupMenuConsts.pas"); -USEUNIT("cxGridStyleSheetsPreview.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC10.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC10.res deleted file mode 100644 index b0ccd8f8..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC10.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC11.bpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC11.bpk deleted file mode 100644 index b678ff76..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC11.bpk +++ /dev/null @@ -1,221 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = cxGridC11.bpl -OBJFILES = cxGridLevel.obj \ - cxGridStrs.obj cxFilterDialog.obj cxGrid.obj \ - cxGridChartView.obj cxGridBandedTableView.obj cxGridCardView.obj \ - cxGridCommon.obj cxGridCustomView.obj cxGridCustomTableView.obj \ - cxGridDBChartView.obj cxGridDBBandedTableView.obj \ - cxGridDBCardView.obj cxGridDBDataDefinitions.obj \ - cxGridDBTableView.obj cxGridDetailsSite.obj \ - cxGridRows.obj cxGridFilterHelpers.obj \ - cxGridExportLink.obj cxGridTableView.obj \ - cxDBExtLookupComboBox.obj \ - cxGridCustomPopUpMenu.obj \ - cxGridFooterPopupMenuItems.obj \ - cxGridHeaderPopupMenuItems.obj \ - cxGridGroupRowPopupMenuItems.obj \ - cxGridMenuOperations.obj \ - cxGridPopUpMenu.obj \ - cxGridStdPopUpMenu.obj \ - cxGridUIBandedTableHelper.obj \ - cxGridUICardHelper.obj \ - cxGridUICustomTableHelper.obj \ - cxGridUIHelper.obj \ - cxGridUITableHelper.obj\ - cxGridPopupMenuConsts.obj \ - cxGridStyleSheetsPreview.obj \ - cxGridC11.obj -RESFILES = cxGridC11.res -MAINSOURCE = cxGridC11.cpp -RESDEPEN = $(RESFILES) cxFilterDialog.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dxThemeC11.bpi cxEditorsC11.bpi cxExportC11.bpi cxLibraryC11.bpi \ - cxDataC11.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi cxExtEditorsC11.bpi \ - cxPageControlC11.bpi dxCoreC11.bpi -SPARELIBS = rtl.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) \ - -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressQuantumGrid 6 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC11.cpp b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC11.cpp deleted file mode 100644 index f4e261cc..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC11.cpp +++ /dev/null @@ -1,65 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxGridC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEPACKAGE("cxExportC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("cxExtEditorsC11.bpi"); -USEPACKAGE("cxPageControlC11.bpi"); -USEUNIT("cxGridStrs.pas"); -USEFORMNS("cxFilterDialog.pas", Cxfilterdialog, cxFilterDialog); -USEUNIT("cxDBExtLookupComboBox.pas"); -USEUNIT("cxGrid.pas"); -USEUNIT("cxGridChartView.pas"); -USEUNIT("cxGridBandedTableView.pas"); -USEUNIT("cxGridCardView.pas"); -USEUNIT("cxGridCommon.pas"); -USEUNIT("cxGridCustomTableView.pas"); -USEUNIT("cxGridCustomView.pas"); -USEUNIT("cxGridDBChartView.pas"); -USEUNIT("cxGridDBBandedTableView.pas"); -USEUNIT("cxGridDBCardView.pas"); -USEUNIT("cxGridDBDataDefinitions.pas"); -USEUNIT("cxGridRows.pas"); -USEUNIT("cxGridDBTableView.pas"); -USEUNIT("cxGridDetailsSite.pas"); -USEUNIT("cxGridLevel.pas"); -USEUNIT("cxGridExportLink.pas"); -USEUNIT("cxGridTableView.pas"); -USEUNIT("cxGridFilterHelpers.pas"); -USEUNIT("cxGridCustomPopUpMenu.pas"); -USEUNIT("cxGridFooterPopupMenuItems.pas"); -USEUNIT("cxGridHeaderPopupMenuItems.pas"); -USEUNIT("cxGridGroupRowPopupMenuItems.pas"); -USEUNIT("cxGridMenuOperations.pas"); -USEUNIT("cxGridPopUpMenu.pas"); -USEUNIT("cxGridStdPopUpMenu.pas"); -USEUNIT("cxGridUIBandedTableHelper.pas"); -USEUNIT("cxGridUICardHelper.pas"); -USEUNIT("cxGridUICustomTableHelper.pas"); -USEUNIT("cxGridUIHelper.pas"); -USEUNIT("cxGridUITableHelper.pas"); -USEUNIT("cxGridPopupMenuConsts.pas"); -USEUNIT("cxGridStyleSheetsPreview.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC11.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC11.res deleted file mode 100644 index 6fd40531..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC11.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC12.bpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC12.bpk deleted file mode 100644 index 2c3cc9bd..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC12.bpk +++ /dev/null @@ -1,221 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = cxGridC12.bpl -OBJFILES = cxGridLevel.obj \ - cxGridStrs.obj cxFilterDialog.obj cxGrid.obj \ - cxGridChartView.obj cxGridBandedTableView.obj cxGridCardView.obj \ - cxGridCommon.obj cxGridCustomView.obj cxGridCustomTableView.obj \ - cxGridDBChartView.obj cxGridDBBandedTableView.obj \ - cxGridDBCardView.obj cxGridDBDataDefinitions.obj \ - cxGridDBTableView.obj cxGridDetailsSite.obj \ - cxGridRows.obj cxGridFilterHelpers.obj \ - cxGridExportLink.obj cxGridTableView.obj \ - cxDBExtLookupComboBox.obj \ - cxGridCustomPopUpMenu.obj \ - cxGridFooterPopupMenuItems.obj \ - cxGridHeaderPopupMenuItems.obj \ - cxGridGroupRowPopupMenuItems.obj \ - cxGridMenuOperations.obj \ - cxGridPopUpMenu.obj \ - cxGridStdPopUpMenu.obj \ - cxGridUIBandedTableHelper.obj \ - cxGridUICardHelper.obj \ - cxGridUICustomTableHelper.obj \ - cxGridUIHelper.obj \ - cxGridUITableHelper.obj\ - cxGridPopupMenuConsts.obj \ - cxGridStyleSheetsPreview.obj \ - cxGridC12.obj -RESFILES = cxGridC12.res -MAINSOURCE = cxGridC12.cpp -RESDEPEN = $(RESFILES) cxFilterDialog.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dxThemeC12.bpi cxEditorsC12.bpi cxExportC12.bpi cxLibraryC12.bpi \ - cxDataC12.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi cxExtEditorsC12.bpi \ - cxPageControlC12.bpi dxCoreC12.bpi -SPARELIBS = rtl.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) \ - -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressQuantumGrid 6 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC12.cpp b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC12.cpp deleted file mode 100644 index ddb897e0..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC12.cpp +++ /dev/null @@ -1,65 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxGridC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEPACKAGE("cxExportC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("cxExtEditorsC12.bpi"); -USEPACKAGE("cxPageControlC12.bpi"); -USEUNIT("cxGridStrs.pas"); -USEFORMNS("cxFilterDialog.pas", Cxfilterdialog, cxFilterDialog); -USEUNIT("cxDBExtLookupComboBox.pas"); -USEUNIT("cxGrid.pas"); -USEUNIT("cxGridChartView.pas"); -USEUNIT("cxGridBandedTableView.pas"); -USEUNIT("cxGridCardView.pas"); -USEUNIT("cxGridCommon.pas"); -USEUNIT("cxGridCustomTableView.pas"); -USEUNIT("cxGridCustomView.pas"); -USEUNIT("cxGridDBChartView.pas"); -USEUNIT("cxGridDBBandedTableView.pas"); -USEUNIT("cxGridDBCardView.pas"); -USEUNIT("cxGridDBDataDefinitions.pas"); -USEUNIT("cxGridRows.pas"); -USEUNIT("cxGridDBTableView.pas"); -USEUNIT("cxGridDetailsSite.pas"); -USEUNIT("cxGridLevel.pas"); -USEUNIT("cxGridExportLink.pas"); -USEUNIT("cxGridTableView.pas"); -USEUNIT("cxGridFilterHelpers.pas"); -USEUNIT("cxGridCustomPopUpMenu.pas"); -USEUNIT("cxGridFooterPopupMenuItems.pas"); -USEUNIT("cxGridHeaderPopupMenuItems.pas"); -USEUNIT("cxGridGroupRowPopupMenuItems.pas"); -USEUNIT("cxGridMenuOperations.pas"); -USEUNIT("cxGridPopUpMenu.pas"); -USEUNIT("cxGridStdPopUpMenu.pas"); -USEUNIT("cxGridUIBandedTableHelper.pas"); -USEUNIT("cxGridUICardHelper.pas"); -USEUNIT("cxGridUICustomTableHelper.pas"); -USEUNIT("cxGridUIHelper.pas"); -USEUNIT("cxGridUITableHelper.pas"); -USEUNIT("cxGridPopupMenuConsts.pas"); -USEUNIT("cxGridStyleSheetsPreview.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC12.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC12.res deleted file mode 100644 index cfb2d31a..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC12.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC14.bpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC14.bpk deleted file mode 100644 index 7598fa79..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC14.bpk +++ /dev/null @@ -1,221 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = cxGridC14.bpl -OBJFILES = cxGridLevel.obj \ - cxGridStrs.obj cxFilterDialog.obj cxGrid.obj \ - cxGridChartView.obj cxGridBandedTableView.obj cxGridCardView.obj \ - cxGridCommon.obj cxGridCustomView.obj cxGridCustomTableView.obj \ - cxGridDBChartView.obj cxGridDBBandedTableView.obj \ - cxGridDBCardView.obj cxGridDBDataDefinitions.obj \ - cxGridDBTableView.obj cxGridDetailsSite.obj \ - cxGridRows.obj cxGridFilterHelpers.obj \ - cxGridExportLink.obj cxGridTableView.obj \ - cxDBExtLookupComboBox.obj \ - cxGridCustomPopUpMenu.obj \ - cxGridFooterPopupMenuItems.obj \ - cxGridHeaderPopupMenuItems.obj \ - cxGridGroupRowPopupMenuItems.obj \ - cxGridMenuOperations.obj \ - cxGridPopUpMenu.obj \ - cxGridStdPopUpMenu.obj \ - cxGridUIBandedTableHelper.obj \ - cxGridUICardHelper.obj \ - cxGridUICustomTableHelper.obj \ - cxGridUIHelper.obj \ - cxGridUITableHelper.obj\ - cxGridPopupMenuConsts.obj \ - cxGridStyleSheetsPreview.obj \ - cxGridC14.obj -RESFILES = cxGridC14.res -MAINSOURCE = cxGridC14.cpp -RESDEPEN = $(RESFILES) cxFilterDialog.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dxThemeC14.bpi cxEditorsC14.bpi cxExportC14.bpi cxLibraryC14.bpi \ - cxDataC14.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi cxExtEditorsC14.bpi \ - cxPageControlC14.bpi dxCoreC14.bpi -SPARELIBS = rtl.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) \ - -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressQuantumGrid 6 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC14.cpp b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC14.cpp deleted file mode 100644 index 95c0b0c2..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC14.cpp +++ /dev/null @@ -1,65 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxGridC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEPACKAGE("cxExportC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("cxExtEditorsC14.bpi"); -USEPACKAGE("cxPageControlC14.bpi"); -USEUNIT("cxGridStrs.pas"); -USEFORMNS("cxFilterDialog.pas", Cxfilterdialog, cxFilterDialog); -USEUNIT("cxDBExtLookupComboBox.pas"); -USEUNIT("cxGrid.pas"); -USEUNIT("cxGridChartView.pas"); -USEUNIT("cxGridBandedTableView.pas"); -USEUNIT("cxGridCardView.pas"); -USEUNIT("cxGridCommon.pas"); -USEUNIT("cxGridCustomTableView.pas"); -USEUNIT("cxGridCustomView.pas"); -USEUNIT("cxGridDBChartView.pas"); -USEUNIT("cxGridDBBandedTableView.pas"); -USEUNIT("cxGridDBCardView.pas"); -USEUNIT("cxGridDBDataDefinitions.pas"); -USEUNIT("cxGridRows.pas"); -USEUNIT("cxGridDBTableView.pas"); -USEUNIT("cxGridDetailsSite.pas"); -USEUNIT("cxGridLevel.pas"); -USEUNIT("cxGridExportLink.pas"); -USEUNIT("cxGridTableView.pas"); -USEUNIT("cxGridFilterHelpers.pas"); -USEUNIT("cxGridCustomPopUpMenu.pas"); -USEUNIT("cxGridFooterPopupMenuItems.pas"); -USEUNIT("cxGridHeaderPopupMenuItems.pas"); -USEUNIT("cxGridGroupRowPopupMenuItems.pas"); -USEUNIT("cxGridMenuOperations.pas"); -USEUNIT("cxGridPopUpMenu.pas"); -USEUNIT("cxGridStdPopUpMenu.pas"); -USEUNIT("cxGridUIBandedTableHelper.pas"); -USEUNIT("cxGridUICardHelper.pas"); -USEUNIT("cxGridUICustomTableHelper.pas"); -USEUNIT("cxGridUIHelper.pas"); -USEUNIT("cxGridUITableHelper.pas"); -USEUNIT("cxGridPopupMenuConsts.pas"); -USEUNIT("cxGridStyleSheetsPreview.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC14.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC14.res deleted file mode 100644 index 6ebaaa7f..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC14.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC6.bpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC6.bpk deleted file mode 100644 index d8109cb0..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC6.bpk +++ /dev/null @@ -1,221 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = cxGridC6.bpl -OBJFILES = cxGridLevel.obj \ - cxGridStrs.obj cxFilterDialog.obj cxGrid.obj \ - cxGridChartView.obj cxGridBandedTableView.obj cxGridCardView.obj \ - cxGridCommon.obj cxGridCustomView.obj cxGridCustomTableView.obj \ - cxGridDBChartView.obj cxGridDBBandedTableView.obj \ - cxGridDBCardView.obj cxGridDBDataDefinitions.obj \ - cxGridDBTableView.obj cxGridDetailsSite.obj \ - cxGridRows.obj cxGridFilterHelpers.obj \ - cxGridExportLink.obj cxGridTableView.obj \ - cxDBExtLookupComboBox.obj \ - cxGridCustomPopUpMenu.obj \ - cxGridFooterPopupMenuItems.obj \ - cxGridHeaderPopupMenuItems.obj \ - cxGridGroupRowPopupMenuItems.obj \ - cxGridMenuOperations.obj \ - cxGridPopUpMenu.obj \ - cxGridStdPopUpMenu.obj \ - cxGridUIBandedTableHelper.obj \ - cxGridUICardHelper.obj \ - cxGridUICustomTableHelper.obj \ - cxGridUIHelper.obj \ - cxGridUITableHelper.obj\ - cxGridPopupMenuConsts.obj \ - cxGridStyleSheetsPreview.obj \ - cxGridC6.obj -RESFILES = cxGridC6.res -MAINSOURCE = cxGridC6.cpp -RESDEPEN = $(RESFILES) cxFilterDialog.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = dxThemeC6.bpi cxEditorsVCLC6.bpi cxExportVCLC6.bpi cxLibraryVCLC6.bpi \ - cxDataC6.bpi rtl.bpi vcl.bpi dbrtl.bpi vcldb.bpi cxExtEditorsVCLC6.bpi \ - cxPageControlVCLC6.bpi dxCoreC6.bpi -SPARELIBS = rtl.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) \ - -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressQuantumGrid 6 by Developer Express Inc." -aa \ - -Tpp -Gpr -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC6.cpp b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC6.cpp deleted file mode 100644 index be7abaa9..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC6.cpp +++ /dev/null @@ -1,65 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("cxGridC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEPACKAGE("cxExportVCLC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("cxExtEditorsVCLC6.bpi"); -USEPACKAGE("cxPageControlVCLC6.bpi"); -USEUNIT("cxGridStrs.pas"); -USEFORMNS("cxFilterDialog.pas", Cxfilterdialog, cxFilterDialog); -USEUNIT("cxDBExtLookupComboBox.pas"); -USEUNIT("cxGrid.pas"); -USEUNIT("cxGridChartView.pas"); -USEUNIT("cxGridBandedTableView.pas"); -USEUNIT("cxGridCardView.pas"); -USEUNIT("cxGridCommon.pas"); -USEUNIT("cxGridCustomTableView.pas"); -USEUNIT("cxGridCustomView.pas"); -USEUNIT("cxGridDBChartView.pas"); -USEUNIT("cxGridDBBandedTableView.pas"); -USEUNIT("cxGridDBCardView.pas"); -USEUNIT("cxGridDBDataDefinitions.pas"); -USEUNIT("cxGridRows.pas"); -USEUNIT("cxGridDBTableView.pas"); -USEUNIT("cxGridDetailsSite.pas"); -USEUNIT("cxGridLevel.pas"); -USEUNIT("cxGridExportLink.pas"); -USEUNIT("cxGridTableView.pas"); -USEUNIT("cxGridFilterHelpers.pas"); -USEUNIT("cxGridCustomPopUpMenu.pas"); -USEUNIT("cxGridFooterPopupMenuItems.pas"); -USEUNIT("cxGridHeaderPopupMenuItems.pas"); -USEUNIT("cxGridGroupRowPopupMenuItems.pas"); -USEUNIT("cxGridMenuOperations.pas"); -USEUNIT("cxGridPopUpMenu.pas"); -USEUNIT("cxGridStdPopUpMenu.pas"); -USEUNIT("cxGridUIBandedTableHelper.pas"); -USEUNIT("cxGridUICardHelper.pas"); -USEUNIT("cxGridUICustomTableHelper.pas"); -USEUNIT("cxGridUIHelper.pas"); -USEUNIT("cxGridUITableHelper.pas"); -USEUNIT("cxGridPopupMenuConsts.pas"); -USEUNIT("cxGridStyleSheetsPreview.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC6.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC6.res deleted file mode 100644 index 7ce95430..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridC6.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD10.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD10.dpk deleted file mode 100644 index 139004b9..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD10.dpk +++ /dev/null @@ -1,72 +0,0 @@ -package cxGridD10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxEditorsD10, - cxExportD10, - cxExtEditorsD10, - cxPageControlD10; - -contains - cxGridLevel, - cxDBExtLookupComboBox, - cxGridExportLink, - cxFilterDialog, - cxGrid, - cxGridBandedTableView, - cxGridCardView, - cxGridChartView, - cxGridCommon, - cxGridCustomPopupMenu, - cxGridCustomTableView, - cxGridCustomView, - cxGridDBBandedTableView, - cxGridDBCardView, - cxGridDBChartView, - cxGridDBDataDefinitions, - cxGridDBTableView, - cxGridDetailsSite, - cxGridFilterHelpers, - cxGridFooterPopupMenuItems, - cxGridHeaderPopupMenuItems, - cxGridGroupRowPopupMenuItems, - cxGridMenuOperations, - cxGridPopupMenu, - cxGridPopupMenuConsts, - cxGridRows, - cxGridStdPopupMenu, - cxGridStrs, - cxGridTableView, - cxGridUIBandedTableHelper, - cxGridUICardHelper, - cxGridUICustomTableHelper, - cxGridUIHelper, - cxGridUITableHelper; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD10.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD10.res deleted file mode 100644 index 227b7ca7..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD10.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD11.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD11.dpk deleted file mode 100644 index f4e6290a..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD11.dpk +++ /dev/null @@ -1,72 +0,0 @@ -package cxGridD11; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxEditorsD11, - cxExportD11, - cxExtEditorsD11, - cxPageControlD11; - -contains - cxGridLevel, - cxDBExtLookupComboBox, - cxGridExportLink, - cxFilterDialog, - cxGrid, - cxGridBandedTableView, - cxGridCardView, - cxGridChartView, - cxGridCommon, - cxGridCustomPopupMenu, - cxGridCustomTableView, - cxGridCustomView, - cxGridDBBandedTableView, - cxGridDBCardView, - cxGridDBChartView, - cxGridDBDataDefinitions, - cxGridDBTableView, - cxGridDetailsSite, - cxGridFilterHelpers, - cxGridFooterPopupMenuItems, - cxGridHeaderPopupMenuItems, - cxGridGroupRowPopupMenuItems, - cxGridMenuOperations, - cxGridPopupMenu, - cxGridPopupMenuConsts, - cxGridRows, - cxGridStdPopupMenu, - cxGridStrs, - cxGridTableView, - cxGridUIBandedTableHelper, - cxGridUICardHelper, - cxGridUICustomTableHelper, - cxGridUIHelper, - cxGridUITableHelper; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD11.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD11.res deleted file mode 100644 index 95f46dcc..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD11.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD12.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD12.dpk deleted file mode 100644 index 5360da15..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD12.dpk +++ /dev/null @@ -1,72 +0,0 @@ -package cxGridD12; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxEditorsD12, - cxExportD12, - cxExtEditorsD12, - cxPageControlD12; - -contains - cxGridLevel, - cxDBExtLookupComboBox, - cxGridExportLink, - cxFilterDialog, - cxGrid, - cxGridBandedTableView, - cxGridCardView, - cxGridChartView, - cxGridCommon, - cxGridCustomPopupMenu, - cxGridCustomTableView, - cxGridCustomView, - cxGridDBBandedTableView, - cxGridDBCardView, - cxGridDBChartView, - cxGridDBDataDefinitions, - cxGridDBTableView, - cxGridDetailsSite, - cxGridFilterHelpers, - cxGridFooterPopupMenuItems, - cxGridHeaderPopupMenuItems, - cxGridGroupRowPopupMenuItems, - cxGridMenuOperations, - cxGridPopupMenu, - cxGridPopupMenuConsts, - cxGridRows, - cxGridStdPopupMenu, - cxGridStrs, - cxGridTableView, - cxGridUIBandedTableHelper, - cxGridUICardHelper, - cxGridUICustomTableHelper, - cxGridUIHelper, - cxGridUITableHelper; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD12.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD12.res deleted file mode 100644 index 875dd88a..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD12.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD14.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD14.dpk deleted file mode 100644 index 2530e666..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD14.dpk +++ /dev/null @@ -1,72 +0,0 @@ -package cxGridD14; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxEditorsD14, - cxExportD14, - cxExtEditorsD14, - cxPageControlD14; - -contains - cxGridLevel, - cxDBExtLookupComboBox, - cxGridExportLink, - cxFilterDialog, - cxGrid, - cxGridBandedTableView, - cxGridCardView, - cxGridChartView, - cxGridCommon, - cxGridCustomPopupMenu, - cxGridCustomTableView, - cxGridCustomView, - cxGridDBBandedTableView, - cxGridDBCardView, - cxGridDBChartView, - cxGridDBDataDefinitions, - cxGridDBTableView, - cxGridDetailsSite, - cxGridFilterHelpers, - cxGridFooterPopupMenuItems, - cxGridHeaderPopupMenuItems, - cxGridGroupRowPopupMenuItems, - cxGridMenuOperations, - cxGridPopupMenu, - cxGridPopupMenuConsts, - cxGridRows, - cxGridStdPopupMenu, - cxGridStrs, - cxGridTableView, - cxGridUIBandedTableHelper, - cxGridUICardHelper, - cxGridUICustomTableHelper, - cxGridUIHelper, - cxGridUITableHelper; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD14.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD14.res deleted file mode 100644 index bb20e6c8..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD14.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD6.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD6.dpk deleted file mode 100644 index 0a23a101..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD6.dpk +++ /dev/null @@ -1,72 +0,0 @@ -package cxGridD6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxEditorsVCLD6, - cxExportVCLD6, - cxExtEditorsVCLD6, - cxPageControlVCLD6; - -contains - cxGridLevel, - cxDBExtLookupComboBox, - cxGridExportLink, - cxFilterDialog, - cxGrid, - cxGridBandedTableView, - cxGridCardView, - cxGridChartView, - cxGridCommon, - cxGridCustomPopupMenu, - cxGridCustomTableView, - cxGridCustomView, - cxGridDBBandedTableView, - cxGridDBCardView, - cxGridDBChartView, - cxGridDBDataDefinitions, - cxGridDBTableView, - cxGridDetailsSite, - cxGridFilterHelpers, - cxGridFooterPopupMenuItems, - cxGridHeaderPopupMenuItems, - cxGridGroupRowPopupMenuItems, - cxGridMenuOperations, - cxGridPopupMenu, - cxGridPopupMenuConsts, - cxGridRows, - cxGridStdPopupMenu, - cxGridStrs, - cxGridTableView, - cxGridUIBandedTableHelper, - cxGridUICardHelper, - cxGridUICustomTableHelper, - cxGridUIHelper, - cxGridUITableHelper; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD6.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD6.res deleted file mode 100644 index effea4bf..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD6.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD7.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD7.dpk deleted file mode 100644 index b216b48a..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD7.dpk +++ /dev/null @@ -1,72 +0,0 @@ -package cxGridD7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxEditorsVCLD7, - cxExportVCLD7, - cxExtEditorsVCLD7, - cxPageControlVCLD7; - -contains - cxGridLevel, - cxDBExtLookupComboBox, - cxGridExportLink, - cxFilterDialog, - cxGrid, - cxGridBandedTableView, - cxGridCardView, - cxGridChartView, - cxGridCommon, - cxGridCustomPopupMenu, - cxGridCustomTableView, - cxGridCustomView, - cxGridDBBandedTableView, - cxGridDBCardView, - cxGridDBChartView, - cxGridDBDataDefinitions, - cxGridDBTableView, - cxGridDetailsSite, - cxGridFilterHelpers, - cxGridFooterPopupMenuItems, - cxGridHeaderPopupMenuItems, - cxGridGroupRowPopupMenuItems, - cxGridMenuOperations, - cxGridPopupMenu, - cxGridPopupMenuConsts, - cxGridRows, - cxGridStdPopupMenu, - cxGridStrs, - cxGridTableView, - cxGridUIBandedTableHelper, - cxGridUICardHelper, - cxGridUICustomTableHelper, - cxGridUIHelper, - cxGridUITableHelper; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD7.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD7.res deleted file mode 100644 index 36e3a7d7..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD7.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD9.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD9.dpk deleted file mode 100644 index 07c34d84..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD9.dpk +++ /dev/null @@ -1,72 +0,0 @@ -package cxGridD9; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxEditorsD9, - cxExportD9, - cxExtEditorsD9, - cxPageControlD9; - -contains - cxGridLevel, - cxDBExtLookupComboBox, - cxGridExportLink, - cxFilterDialog, - cxGrid, - cxGridBandedTableView, - cxGridCardView, - cxGridChartView, - cxGridCommon, - cxGridCustomPopupMenu, - cxGridCustomTableView, - cxGridCustomView, - cxGridDBBandedTableView, - cxGridDBCardView, - cxGridDBChartView, - cxGridDBDataDefinitions, - cxGridDBTableView, - cxGridDetailsSite, - cxGridFilterHelpers, - cxGridFooterPopupMenuItems, - cxGridHeaderPopupMenuItems, - cxGridGroupRowPopupMenuItems, - cxGridMenuOperations, - cxGridPopupMenu, - cxGridPopupMenuConsts, - cxGridRows, - cxGridStdPopupMenu, - cxGridStrs, - cxGridTableView, - cxGridUIBandedTableHelper, - cxGridUICardHelper, - cxGridUICustomTableHelper, - cxGridUIHelper, - cxGridUITableHelper; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD9.res b/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD9.res deleted file mode 100644 index 81060d78..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/cxGridD9.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC10.bpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC10.bpk deleted file mode 100644 index 998bbd22..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC10.bpk +++ /dev/null @@ -1,208 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxGridC10.bpl -OBJFILES = dclcxGridC10.obj cxGridViewLayoutEditor.obj \ - cxChartViewEditor.obj cxCardViewEditor.obj cxCustomTableViewEditor.obj \ - cxDBGridConverter.obj cxDXGridConverter.obj \ - cxGridImportDialog.obj \ - cxGridPredefinedStyles.obj cxGridReg.obj \ - cxGridStructureNavigator.obj \ - cxGridConverter.obj cxGridEditor.obj \ - cxBandedTableViewEditor.obj \ - cxTableViewEditor.obj cxViewEditor.obj \ - cxWWGridConverter.obj cxGridPopupMenuReg.obj \ - cxImageComboBoxItemsEditor.obj -RESFILES = dclcxGridC10.res cxGridReg.dcr cxGridPopupMenuReg.dcr -MAINSOURCE = dclcxGridC10.cpp -RESDEPEN = $(RESFILES) cxGridViewLayoutEditor.dfm \ - cxGridEditor.dfm cxGridImportDialog.dfm \ - cxGridPredefinedStyles.dfm cxViewEditor.dfm \ - cxImageComboBoxItemsEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxDataC10.bpi cxEditorsC10.bpi cxGridC10.bpi dclcxLibraryC10.bpi designide.bpi rtl.bpi vcl.bpi \ - dbrtl.bpi vcldb.bpi cxLibraryC10.bpi dclcxEditorsC10.bpi cxPageControlC10.bpi dxThemeC10.bpi dxCoreC10.bpi dcldxCoreC10.bpi -SPARELIBS = rtl.lib vcl.lib dclcxLibraryC10.lib CXLIBRARYC10.lib dxCoreC10.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressQuantumGrid 6 by Developer Express Inc." -aa -Tpp \ - -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC10.cpp b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC10.cpp deleted file mode 100644 index dcdfbcdd..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC10.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxGridC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC10.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxDataC10.bpi"); -USEPACKAGE("cxEditorsC10.bpi"); -USEPACKAGE("cxGridC10.bpi"); -USEPACKAGE("cxLibraryC10.bpi"); -USEPACKAGE("dclcxEditorsC10.bpi"); -USEPACKAGE("dclcxLibraryC10.bpi"); -USEPACKAGE("cxPageControlC10.bpi"); -USEPACKAGE("dxThemeC10.bpi"); -USEFORMNS("cxGridViewLayoutEditor.pas", Cxgridviewlayouteditor, cxGridViewLayoutEditor); -USEUNIT("cxCardViewEditor.pas"); -USEUNIT("cxCustomTableViewEditor.pas"); -USEUNIT("cxDBGridConverter.pas"); -USEUNIT("cxDXGridConverter.pas"); -USEFORMNS("cxGridEditor.pas", Cxgrideditor, cxGridEditor); -USEFORMNS("cxGridImportDialog.pas", Cxgridimportdialog, ImportDialog); -USEFORMNS("cxGridPredefinedStyles.pas", Cxgridpredefinedstyles, cxdmGridPredefinedStyles); /* TDataModule: File Type */ -USEFORMNS("cxImageComboBoxItemsEditor.pas", Cximagecomboboxitemseditor, fmImageComboBoxItemsEditor); -USEUNIT("cxGridReg.pas"); -USERES("cxGridReg.dcr"); -USEUNIT("cxGridStructureNavigator.pas"); -USEUNIT("cxChartViewEditor.pas"); -USEUNIT("cxBandedTableViewEditor.pas"); -USEUNIT("cxTableViewEditor.pas"); -USEFORMNS("cxViewEditor.pas", Cxvieweditor, cxViewEditor); -USEUNIT("cxWWGridConverter.pas"); -USEUNIT("cxGridConverter.pas"); -USEUNIT("cxGridPopupMenuReg.pas"); -USERES("cxGridPopupMenuReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC10.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC10.res deleted file mode 100644 index 40656a12..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC10.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC11.bpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC11.bpk deleted file mode 100644 index 7b5bd819..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC11.bpk +++ /dev/null @@ -1,208 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxGridC11.bpl -OBJFILES = dclcxGridC11.obj cxGridViewLayoutEditor.obj \ - cxChartViewEditor.obj cxCardViewEditor.obj cxCustomTableViewEditor.obj \ - cxDBGridConverter.obj cxDXGridConverter.obj \ - cxGridImportDialog.obj \ - cxGridPredefinedStyles.obj cxGridReg.obj \ - cxGridStructureNavigator.obj \ - cxGridConverter.obj cxGridEditor.obj \ - cxBandedTableViewEditor.obj \ - cxTableViewEditor.obj cxViewEditor.obj \ - cxWWGridConverter.obj cxGridPopupMenuReg.obj \ - cxImageComboBoxItemsEditor.obj -RESFILES = dclcxGridC11.res cxGridReg.dcr cxGridPopupMenuReg.dcr -MAINSOURCE = dclcxGridC11.cpp -RESDEPEN = $(RESFILES) cxGridViewLayoutEditor.dfm \ - cxGridEditor.dfm cxGridImportDialog.dfm \ - cxGridPredefinedStyles.dfm cxViewEditor.dfm \ - cxImageComboBoxItemsEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxDataC11.bpi cxEditorsC11.bpi cxGridC11.bpi dclcxLibraryC11.bpi designide.bpi rtl.bpi vcl.bpi \ - dbrtl.bpi vcldb.bpi cxLibraryC11.bpi dclcxEditorsC11.bpi cxPageControlC11.bpi dxThemeC11.bpi dxCoreC11.bpi dcldxCoreC11.bpi -SPARELIBS = rtl.lib vcl.lib dclcxLibraryC11.lib CXLIBRARYC11.lib dxCoreC11.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressQuantumGrid 6 by Developer Express Inc." -aa -Tpp \ - -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC11.cpp b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC11.cpp deleted file mode 100644 index e50dc5d5..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC11.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxGridC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC11.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxDataC11.bpi"); -USEPACKAGE("cxEditorsC11.bpi"); -USEPACKAGE("cxGridC11.bpi"); -USEPACKAGE("cxLibraryC11.bpi"); -USEPACKAGE("dclcxEditorsC11.bpi"); -USEPACKAGE("dclcxLibraryC11.bpi"); -USEPACKAGE("cxPageControlC11.bpi"); -USEPACKAGE("dxThemeC11.bpi"); -USEFORMNS("cxGridViewLayoutEditor.pas", Cxgridviewlayouteditor, cxGridViewLayoutEditor); -USEUNIT("cxCardViewEditor.pas"); -USEUNIT("cxCustomTableViewEditor.pas"); -USEUNIT("cxDBGridConverter.pas"); -USEUNIT("cxDXGridConverter.pas"); -USEFORMNS("cxGridEditor.pas", Cxgrideditor, cxGridEditor); -USEFORMNS("cxGridImportDialog.pas", Cxgridimportdialog, ImportDialog); -USEFORMNS("cxGridPredefinedStyles.pas", Cxgridpredefinedstyles, cxdmGridPredefinedStyles); /* TDataModule: File Type */ -USEFORMNS("cxImageComboBoxItemsEditor.pas", Cximagecomboboxitemseditor, fmImageComboBoxItemsEditor); -USEUNIT("cxGridReg.pas"); -USERES("cxGridReg.dcr"); -USEUNIT("cxGridStructureNavigator.pas"); -USEUNIT("cxChartViewEditor.pas"); -USEUNIT("cxBandedTableViewEditor.pas"); -USEUNIT("cxTableViewEditor.pas"); -USEFORMNS("cxViewEditor.pas", Cxvieweditor, cxViewEditor); -USEUNIT("cxWWGridConverter.pas"); -USEUNIT("cxGridConverter.pas"); -USEUNIT("cxGridPopupMenuReg.pas"); -USERES("cxGridPopupMenuReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC11.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC11.res deleted file mode 100644 index 838eaaec..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC11.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC12.bpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC12.bpk deleted file mode 100644 index b75a617b..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC12.bpk +++ /dev/null @@ -1,208 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxGridC12.bpl -OBJFILES = dclcxGridC12.obj cxGridViewLayoutEditor.obj \ - cxChartViewEditor.obj cxCardViewEditor.obj cxCustomTableViewEditor.obj \ - cxDBGridConverter.obj cxDXGridConverter.obj \ - cxGridImportDialog.obj \ - cxGridPredefinedStyles.obj cxGridReg.obj \ - cxGridStructureNavigator.obj \ - cxGridConverter.obj cxGridEditor.obj \ - cxBandedTableViewEditor.obj \ - cxTableViewEditor.obj cxViewEditor.obj \ - cxWWGridConverter.obj cxGridPopupMenuReg.obj \ - cxImageComboBoxItemsEditor.obj -RESFILES = dclcxGridC12.res cxGridReg.dcr cxGridPopupMenuReg.dcr -MAINSOURCE = dclcxGridC12.cpp -RESDEPEN = $(RESFILES) cxGridViewLayoutEditor.dfm \ - cxGridEditor.dfm cxGridImportDialog.dfm \ - cxGridPredefinedStyles.dfm cxViewEditor.dfm \ - cxImageComboBoxItemsEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxDataC12.bpi cxEditorsC12.bpi cxGridC12.bpi dclcxLibraryC12.bpi designide.bpi rtl.bpi vcl.bpi \ - dbrtl.bpi vcldb.bpi cxLibraryC12.bpi dclcxEditorsC12.bpi cxPageControlC12.bpi dxThemeC12.bpi dxCoreC12.bpi dcldxCoreC12.bpi -SPARELIBS = rtl.lib vcl.lib dclcxLibraryC12.lib CXLIBRARYC12.lib dxCoreC12.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressQuantumGrid 6 by Developer Express Inc." -aa -Tpp \ - -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC12.cpp b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC12.cpp deleted file mode 100644 index 6566002b..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC12.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxGridC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC12.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxDataC12.bpi"); -USEPACKAGE("cxEditorsC12.bpi"); -USEPACKAGE("cxGridC12.bpi"); -USEPACKAGE("cxLibraryC12.bpi"); -USEPACKAGE("dclcxEditorsC12.bpi"); -USEPACKAGE("dclcxLibraryC12.bpi"); -USEPACKAGE("cxPageControlC12.bpi"); -USEPACKAGE("dxThemeC12.bpi"); -USEFORMNS("cxGridViewLayoutEditor.pas", Cxgridviewlayouteditor, cxGridViewLayoutEditor); -USEUNIT("cxCardViewEditor.pas"); -USEUNIT("cxCustomTableViewEditor.pas"); -USEUNIT("cxDBGridConverter.pas"); -USEUNIT("cxDXGridConverter.pas"); -USEFORMNS("cxGridEditor.pas", Cxgrideditor, cxGridEditor); -USEFORMNS("cxGridImportDialog.pas", Cxgridimportdialog, ImportDialog); -USEFORMNS("cxGridPredefinedStyles.pas", Cxgridpredefinedstyles, cxdmGridPredefinedStyles); /* TDataModule: File Type */ -USEFORMNS("cxImageComboBoxItemsEditor.pas", Cximagecomboboxitemseditor, fmImageComboBoxItemsEditor); -USEUNIT("cxGridReg.pas"); -USERES("cxGridReg.dcr"); -USEUNIT("cxGridStructureNavigator.pas"); -USEUNIT("cxChartViewEditor.pas"); -USEUNIT("cxBandedTableViewEditor.pas"); -USEUNIT("cxTableViewEditor.pas"); -USEFORMNS("cxViewEditor.pas", Cxvieweditor, cxViewEditor); -USEUNIT("cxWWGridConverter.pas"); -USEUNIT("cxGridConverter.pas"); -USEUNIT("cxGridPopupMenuReg.pas"); -USERES("cxGridPopupMenuReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC12.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC12.res deleted file mode 100644 index a1fd5fa8..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC12.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC14.bpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC14.bpk deleted file mode 100644 index 88489ba3..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC14.bpk +++ /dev/null @@ -1,208 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxGridC14.bpl -OBJFILES = dclcxGridC14.obj cxGridViewLayoutEditor.obj \ - cxChartViewEditor.obj cxCardViewEditor.obj cxCustomTableViewEditor.obj \ - cxDBGridConverter.obj cxDXGridConverter.obj \ - cxGridImportDialog.obj \ - cxGridPredefinedStyles.obj cxGridReg.obj \ - cxGridStructureNavigator.obj \ - cxGridConverter.obj cxGridEditor.obj \ - cxBandedTableViewEditor.obj \ - cxTableViewEditor.obj cxViewEditor.obj \ - cxWWGridConverter.obj cxGridPopupMenuReg.obj \ - cxImageComboBoxItemsEditor.obj -RESFILES = dclcxGridC14.res cxGridReg.dcr cxGridPopupMenuReg.dcr -MAINSOURCE = dclcxGridC14.cpp -RESDEPEN = $(RESFILES) cxGridViewLayoutEditor.dfm \ - cxGridEditor.dfm cxGridImportDialog.dfm \ - cxGridPredefinedStyles.dfm cxViewEditor.dfm \ - cxImageComboBoxItemsEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxDataC14.bpi cxEditorsC14.bpi cxGridC14.bpi dclcxLibraryC14.bpi designide.bpi rtl.bpi vcl.bpi \ - dbrtl.bpi vcldb.bpi cxLibraryC14.bpi dclcxEditorsC14.bpi cxPageControlC14.bpi dxThemeC14.bpi dxCoreC14.bpi dcldxCoreC14.bpi -SPARELIBS = rtl.lib vcl.lib dclcxLibraryC14.lib CXLIBRARYC14.lib dxCoreC14.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressQuantumGrid 6 by Developer Express Inc." -aa -Tpp \ - -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC14.cpp b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC14.cpp deleted file mode 100644 index 919eda7d..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC14.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxGridC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC14.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxDataC14.bpi"); -USEPACKAGE("cxEditorsC14.bpi"); -USEPACKAGE("cxGridC14.bpi"); -USEPACKAGE("cxLibraryC14.bpi"); -USEPACKAGE("dclcxEditorsC14.bpi"); -USEPACKAGE("dclcxLibraryC14.bpi"); -USEPACKAGE("cxPageControlC14.bpi"); -USEPACKAGE("dxThemeC14.bpi"); -USEFORMNS("cxGridViewLayoutEditor.pas", Cxgridviewlayouteditor, cxGridViewLayoutEditor); -USEUNIT("cxCardViewEditor.pas"); -USEUNIT("cxCustomTableViewEditor.pas"); -USEUNIT("cxDBGridConverter.pas"); -USEUNIT("cxDXGridConverter.pas"); -USEFORMNS("cxGridEditor.pas", Cxgrideditor, cxGridEditor); -USEFORMNS("cxGridImportDialog.pas", Cxgridimportdialog, ImportDialog); -USEFORMNS("cxGridPredefinedStyles.pas", Cxgridpredefinedstyles, cxdmGridPredefinedStyles); /* TDataModule: File Type */ -USEFORMNS("cxImageComboBoxItemsEditor.pas", Cximagecomboboxitemseditor, fmImageComboBoxItemsEditor); -USEUNIT("cxGridReg.pas"); -USERES("cxGridReg.dcr"); -USEUNIT("cxGridStructureNavigator.pas"); -USEUNIT("cxChartViewEditor.pas"); -USEUNIT("cxBandedTableViewEditor.pas"); -USEUNIT("cxTableViewEditor.pas"); -USEFORMNS("cxViewEditor.pas", Cxvieweditor, cxViewEditor); -USEUNIT("cxWWGridConverter.pas"); -USEUNIT("cxGridConverter.pas"); -USEUNIT("cxGridPopupMenuReg.pas"); -USERES("cxGridPopupMenuReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC14.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC14.res deleted file mode 100644 index 002c57f4..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC14.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC6.bpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC6.bpk deleted file mode 100644 index 947c3b2b..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC6.bpk +++ /dev/null @@ -1,208 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dclcxGridC6.bpl -OBJFILES = dclcxGridC6.obj cxGridViewLayoutEditor.obj \ - cxChartViewEditor.obj cxCardViewEditor.obj cxCustomTableViewEditor.obj \ - cxDBGridConverter.obj cxDXGridConverter.obj \ - cxGridImportDialog.obj \ - cxGridPredefinedStyles.obj cxGridReg.obj \ - cxGridStructureNavigator.obj \ - cxGridConverter.obj cxGridEditor.obj \ - cxBandedTableViewEditor.obj \ - cxTableViewEditor.obj cxViewEditor.obj \ - cxWWGridConverter.obj cxGridPopupMenuReg.obj \ - cxImageComboBoxItemsEditor.obj -RESFILES = dclcxGridC6.res cxGridReg.dcr cxGridPopupMenuReg.dcr -MAINSOURCE = dclcxGridC6.cpp -RESDEPEN = $(RESFILES) cxGridViewLayoutEditor.dfm \ - cxGridEditor.dfm cxGridImportDialog.dfm \ - cxGridPredefinedStyles.dfm cxViewEditor.dfm \ - cxImageComboBoxItemsEditor.dfm -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = cxDataC6.bpi cxEditorsVCLC6.bpi cxGridC6.bpi dclcxLibraryVCLC6.bpi designide.bpi rtl.bpi vcl.bpi \ - dbrtl.bpi vcldb.bpi cxLibraryVCLC6.bpi dclcxEditorsVCLC6.bpi cxPageControlVCLC6.bpi dxThemeC6.bpi dxCoreC6.bpi dcldxCoreC6.bpi -SPARELIBS = rtl.lib vcl.lib dclcxLibraryVCLC6.lib CXLIBRARYVCLC6.lib dxCoreC6.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;"$(SEARCHPATH)";$(LIBDIR) -LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;"$(SEARCHPATH)";$(LIBDIR) -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I$(BCB)\include -I$(BCB)\include\vcl -I"$(SEARCHPATH)";$(LIBDIR) -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -LUdclstd -LUdcldb -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"ExpressQuantumGrid 6 by Developer Express Inc." -aa -Tpp \ - -Gpd -x -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC6.cpp b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC6.cpp deleted file mode 100644 index e2029a1b..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC6.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dclcxGridC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEPACKAGE("dxCoreC6.bpi"); -USEPACKAGE("designide.bpi"); -USEPACKAGE("vcldb.bpi"); -USEPACKAGE("dbrtl.bpi"); -USEPACKAGE("cxDataC6.bpi"); -USEPACKAGE("cxEditorsVCLC6.bpi"); -USEPACKAGE("cxGridC6.bpi"); -USEPACKAGE("cxLibraryVCLC6.bpi"); -USEPACKAGE("dclcxEditorsVCLC6.bpi"); -USEPACKAGE("dclcxLibraryVCLC6.bpi"); -USEPACKAGE("cxPageControlVCLC6.bpi"); -USEPACKAGE("dxThemeC6.bpi"); -USEFORMNS("cxGridViewLayoutEditor.pas", Cxgridviewlayouteditor, cxGridViewLayoutEditor); -USEUNIT("cxCardViewEditor.pas"); -USEUNIT("cxCustomTableViewEditor.pas"); -USEUNIT("cxDBGridConverter.pas"); -USEUNIT("cxDXGridConverter.pas"); -USEFORMNS("cxGridEditor.pas", Cxgrideditor, cxGridEditor); -USEFORMNS("cxGridImportDialog.pas", Cxgridimportdialog, ImportDialog); -USEFORMNS("cxGridPredefinedStyles.pas", Cxgridpredefinedstyles, cxdmGridPredefinedStyles); /* TDataModule: File Type */ -USEFORMNS("cxImageComboBoxItemsEditor.pas", Cximagecomboboxitemseditor, fmImageComboBoxItemsEditor); -USEUNIT("cxGridReg.pas"); -USERES("cxGridReg.dcr"); -USEUNIT("cxGridStructureNavigator.pas"); -USEUNIT("cxChartViewEditor.pas"); -USEUNIT("cxBandedTableViewEditor.pas"); -USEUNIT("cxTableViewEditor.pas"); -USEFORMNS("cxViewEditor.pas", Cxvieweditor, cxViewEditor); -USEUNIT("cxWWGridConverter.pas"); -USEUNIT("cxGridConverter.pas"); -USEUNIT("cxGridPopupMenuReg.pas"); -USERES("cxGridPopupMenuReg.dcr"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC6.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC6.res deleted file mode 100644 index 405921d2..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridC6.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD10.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD10.dpk deleted file mode 100644 index 88a5e8cd..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD10.dpk +++ /dev/null @@ -1,62 +0,0 @@ -package dclcxGridD10; - -{$R *.res} -{$R cxGridReg.dcr} -{$R cxGridPopupMenuReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxGridD10, - dxThemeD10, - designide, - dclcxLibraryD10, - dclcxEditorsD10, - dclcxExtEditorsD10, - dclcxPageControlD10; - -contains - cxBandedTableViewEditor, - cxCardViewEditor, - cxChartViewEditor, - cxCustomTableViewEditor, - cxDBGridConverter, - cxDXGridConverter, - cxGridConverter, - cxGridEditor, - cxGridImportDialog, - cxGridPopupMenuReg, - cxGridPredefinedStyles, - cxGridReg, - cxGridStructureNavigator, - cxGridStyleSheetsPreview, - cxGridViewLayoutEditor, - cxImageComboBoxItemsEditor, - cxTableViewEditor, - cxViewEditor, - cxWWGridConverter; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD10.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD10.res deleted file mode 100644 index e1b2e597..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD10.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD11.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD11.dpk deleted file mode 100644 index e1242db9..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD11.dpk +++ /dev/null @@ -1,62 +0,0 @@ -package dclcxGridD11; - -{$R *.res} -{$R cxGridReg.dcr} -{$R cxGridPopupMenuReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxGridD11, - dxThemeD11, - designide, - dclcxLibraryD11, - dclcxEditorsD11, - dclcxExtEditorsD11, - dclcxPageControlD11; - -contains - cxBandedTableViewEditor, - cxCardViewEditor, - cxChartViewEditor, - cxCustomTableViewEditor, - cxDBGridConverter, - cxDXGridConverter, - cxGridConverter, - cxGridEditor, - cxGridImportDialog, - cxGridPopupMenuReg, - cxGridPredefinedStyles, - cxGridReg, - cxGridStructureNavigator, - cxGridStyleSheetsPreview, - cxGridViewLayoutEditor, - cxImageComboBoxItemsEditor, - cxTableViewEditor, - cxViewEditor, - cxWWGridConverter; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD11.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD11.res deleted file mode 100644 index 83873093..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD11.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD12.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD12.dpk deleted file mode 100644 index a8eab056..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD12.dpk +++ /dev/null @@ -1,59 +0,0 @@ -package dclcxGridD12; - -{$R *.res} -{$R cxGridReg.dcr} -{$R cxGridPopupMenuReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxGridD12, - dclcxExtEditorsD12, - dclcxPageControlD12; - -contains - cxBandedTableViewEditor, - cxCardViewEditor, - cxChartViewEditor, - cxCustomTableViewEditor, - cxDBGridConverter, - cxDXGridConverter, - cxGridConverter, - cxGridEditor, - cxGridImportDialog, - cxGridPopupMenuReg, - cxGridPredefinedStyles, - cxGridReg, - cxGridStructureNavigator, - cxGridStyleSheetsPreview, - cxGridViewLayoutEditor, - cxImageComboBoxItemsEditor, - cxTableViewEditor, - cxViewEditor, - cxWWGridConverter; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD12.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD12.res deleted file mode 100644 index fe3c5247..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD12.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD14.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD14.dpk deleted file mode 100644 index f4109bee..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD14.dpk +++ /dev/null @@ -1,59 +0,0 @@ -package dclcxGridD14; - -{$R *.res} -{$R cxGridReg.dcr} -{$R cxGridPopupMenuReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - cxGridD14, - dclcxExtEditorsD14, - dclcxPageControlD14; - -contains - cxBandedTableViewEditor, - cxCardViewEditor, - cxChartViewEditor, - cxCustomTableViewEditor, - cxDBGridConverter, - cxDXGridConverter, - cxGridConverter, - cxGridEditor, - cxGridImportDialog, - cxGridPopupMenuReg, - cxGridPredefinedStyles, - cxGridReg, - cxGridStructureNavigator, - cxGridStyleSheetsPreview, - cxGridViewLayoutEditor, - cxImageComboBoxItemsEditor, - cxTableViewEditor, - cxViewEditor, - cxWWGridConverter; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD14.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD14.res deleted file mode 100644 index fb09901b..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD14.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD6.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD6.dpk deleted file mode 100644 index 0cfa554a..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD6.dpk +++ /dev/null @@ -1,62 +0,0 @@ -package dclcxGridD6; - -{$R *.res} -{$R cxGridReg.dcr} -{$R cxGridPopupMenuReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxGridD6, - dxThemeD6, - designide, - dclcxLibraryVCLD6, - dclcxEditorsVCLD6, - dclcxExtEditorsVCLD6, - dclcxPageControlVCLD6; - -contains - cxBandedTableViewEditor, - cxCardViewEditor, - cxChartViewEditor, - cxCustomTableViewEditor, - cxDBGridConverter, - cxDXGridConverter, - cxGridConverter, - cxGridEditor, - cxGridImportDialog, - cxGridPopupMenuReg, - cxGridPredefinedStyles, - cxGridReg, - cxGridStructureNavigator, - cxGridStyleSheetsPreview, - cxGridViewLayoutEditor, - cxImageComboBoxItemsEditor, - cxTableViewEditor, - cxViewEditor, - cxWWGridConverter; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD6.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD6.res deleted file mode 100644 index 4e44a89a..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD6.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD7.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD7.dpk deleted file mode 100644 index ce22f168..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD7.dpk +++ /dev/null @@ -1,62 +0,0 @@ -package dclcxGridD7; - -{$R *.res} -{$R cxGridReg.dcr} -{$R cxGridPopupMenuReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxGridD7, - dxThemeD7, - designide, - dclcxLibraryVCLD7, - dclcxEditorsVCLD7, - dclcxExtEditorsVCLD7, - dclcxPageControlVCLD7; - -contains - cxBandedTableViewEditor, - cxCardViewEditor, - cxChartViewEditor, - cxCustomTableViewEditor, - cxDBGridConverter, - cxDXGridConverter, - cxGridConverter, - cxGridEditor, - cxGridImportDialog, - cxGridPopupMenuReg, - cxGridPredefinedStyles, - cxGridReg, - cxGridStructureNavigator, - cxGridStyleSheetsPreview, - cxGridViewLayoutEditor, - cxImageComboBoxItemsEditor, - cxTableViewEditor, - cxViewEditor, - cxWWGridConverter; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD7.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD7.res deleted file mode 100644 index 33d5e5b9..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD7.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD9.dpk b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD9.dpk deleted file mode 100644 index c275761b..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD9.dpk +++ /dev/null @@ -1,62 +0,0 @@ -package dclcxGridD9; - -{$R *.res} -{$R cxGridReg.dcr} -{$R cxGridPopupMenuReg.dcr} -{$ALIGN 8} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'ExpressQuantumGrid 6 by Developer Express Inc.'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - cxGridD9, - dxThemeD9, - designide, - dclcxLibraryD9, - dclcxEditorsD9, - dclcxExtEditorsD9, - dclcxPageControlD9; - -contains - cxBandedTableViewEditor, - cxCardViewEditor, - cxChartViewEditor, - cxCustomTableViewEditor, - cxDBGridConverter, - cxDXGridConverter, - cxGridConverter, - cxGridEditor, - cxGridImportDialog, - cxGridPopupMenuReg, - cxGridPredefinedStyles, - cxGridReg, - cxGridStructureNavigator, - cxGridStyleSheetsPreview, - cxGridViewLayoutEditor, - cxImageComboBoxItemsEditor, - cxTableViewEditor, - cxViewEditor, - cxWWGridConverter; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD9.res b/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD9.res deleted file mode 100644 index 8965c5d2..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Packages/dclcxGridD9.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxBandedTableViewEditor.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxBandedTableViewEditor.dfm deleted file mode 100644 index 4e144072..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxBandedTableViewEditor.dfm +++ /dev/null @@ -1,127 +0,0 @@ -inherited cxBandedTableViewEditor: TcxBandedTableViewEditor - Left = 477 - Caption = 'cxBandedTableViewEditor' - PixelsPerInch = 96 - TextHeight = 13 - inherited PViewEditor: TPanel - inherited PageControl1: TcxPageControl - ActivePage = TSBands - object TSBands: TcxTabSheet [0] - BorderWidth = 8 - Caption = ' Bands ' - object Panel22: TPanel - Left = 209 - Top = 0 - Width = 118 - Height = 273 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object BAddBand: TcxButton - Left = 8 - Top = 0 - Width = 110 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BAddBandClick - end - object BDeleteBand: TcxButton - Left = 8 - Top = 32 - Width = 110 - Height = 24 - Caption = 'Delete' - TabOrder = 1 - OnClick = BDeleteBandClick - end - object BBandMoveDown: TcxButton - Left = 8 - Top = 104 - Width = 110 - Height = 24 - Caption = 'Move &Down' - TabOrder = 2 - OnClick = BBandMoveDownClick - end - object BBandMoveUp: TcxButton - Left = 8 - Top = 72 - Width = 110 - Height = 24 - Caption = 'Move &Up' - TabOrder = 3 - OnClick = BBandMoveUpClick - end - end - object Panel20: TPanel - Left = 0 - Top = 0 - Width = 209 - Height = 273 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBBands: TListBox - Left = 1 - Top = 1 - Width = 207 - Height = 271 - Style = lbOwnerDrawFixed - Align = alClient - BorderStyle = bsNone - DragMode = dmAutomatic - ItemHeight = 16 - MultiSelect = True - PopupMenu = PMBands - TabOrder = 0 - OnClick = LBBandsClick - OnDragDrop = LBBandsDragDrop - OnDragOver = LBBandsDragOver - OnDrawItem = LBBandsDrawItem - OnEndDrag = LBBandsEndDrag - OnKeyPress = FormKeyPress - OnStartDrag = LBBandsStartDrag - end - end - end - end - end - object PMBands: TPopupMenu - Left = 230 - Top = 90 - object MIBandsAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BAddBandClick - end - object MIBandsDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BDeleteBandClick - end - object MenuItem4: TMenuItem - Caption = '-' - end - object MIBandsMoveUp: TMenuItem - Caption = 'Move Up' - ShortCut = 16422 - OnClick = BBandMoveUpClick - end - object MIBandsMoveDown: TMenuItem - Caption = 'Move Down' - ShortCut = 16424 - OnClick = BBandMoveDownClick - end - object MenuItem7: TMenuItem - Caption = '-' - end - object MIBandsSelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MIBandsSelectAllClick - end - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxBandedTableViewEditor.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxBandedTableViewEditor.pas deleted file mode 100644 index 10d26fd1..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxBandedTableViewEditor.pas +++ /dev/null @@ -1,360 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxBandedTableViewEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, Variants, -{$ELSE} - Windows, -{$ENDIF} - SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, Menus, ExtCtrls, StdCtrls, ComCtrls, - cxGridCustomView, cxGridBandedTableView, - cxViewEditor, cxCustomTableViewEditor, cxTableViewEditor, - cxLookAndFeelPainters, cxButtons, cxPC, cxControls; - -type - TcxBandedTableViewEditor = class(TcxTableViewEditor) - TSBands: TcxTabSheet; - LBBands: TListBox; - Panel22: TPanel; - BAddBand: TcxButton; - BDeleteBand: TcxButton; - PMBands: TPopupMenu; - MIBandsAdd: TMenuItem; - MIBandsDelete: TMenuItem; - MenuItem4: TMenuItem; - MIBandsMoveUp: TMenuItem; - MenuItem7: TMenuItem; - MIBandsSelectAll: TMenuItem; - MIBandsMoveDown: TMenuItem; - BBandMoveDown: TcxButton; - BBandMoveUp: TcxButton; - Panel20: TPanel; - procedure BAddBandClick(Sender: TObject); - procedure BDeleteBandClick(Sender: TObject); - procedure LBBandsClick(Sender: TObject); - procedure LBBandsStartDrag(Sender: TObject; - var DragObject: TDragObject); - procedure LBBandsDragOver(Sender, Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); - procedure LBBandsEndDrag(Sender, Target: TObject; X, Y: Integer); - procedure LBBandsDragDrop(Sender, Source: TObject; X, Y: Integer); - procedure BBandMoveUpClick(Sender: TObject); - procedure BBandMoveDownClick(Sender: TObject); - procedure MIBandsSelectAllClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure LBBandsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure LBColumnsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - private - FBandsPrevDragIndex: Integer; - function GetBands: TcxGridBands; - procedure ReindexBandsProc(AList: TList; ANewIndex: Integer); - procedure UpdateBandList; - protected - procedure DrawListBoxItem(AListBox: TWinControl; AIndex: Integer; R: TRect; - AParentBand: TcxGridBand); - procedure SelectAllBands; - procedure UpdateButtons; override; - procedure UpdateEditor; override; - procedure UpdateSelection; override; - public - class function GetViewByObject(APersistent: TPersistent): TcxCustomGridView; override; - property Bands: TcxGridBands read GetBands; - end; - - { TcxGridBandedTableViewStorage } - - TcxGridBandedTableViewStorage = class(TcxCustomGridTableViewStorage) - private - function GetOptionsCustomize: TcxGridBandedTableOptionsCustomize; - function GetOptionsView: TcxGridBandedTableOptionsView; - protected - function BandedTableView: TcxGridBandedTableView; - public - class function GetViewClass: TcxCustomGridViewClass; override; - published - property OptionsCustomize: TcxGridBandedTableOptionsCustomize read GetOptionsCustomize; - property OptionsView: TcxGridBandedTableOptionsView read GetOptionsView; - end; - - { TcxGridBandedTableViewMenuProvider } - - TcxGridBandedTableViewMenuProvider = class(TcxCustomGridTableViewMenuProvider) - private - function GetGridView: TcxGridBandedTableView; - protected - procedure CreateBand(Sender: TcxGridViewMenuItem); - procedure InitStructureCreationItems; override; - public - property GridView: TcxGridBandedTableView read GetGridView; - end; - -implementation - -uses - cxDesignWindows; - -{$R *.dfm} - -{ TcxGridBandedTableViewStorage } - -function TcxGridBandedTableViewStorage.GetOptionsCustomize: TcxGridBandedTableOptionsCustomize; -begin - Result := BandedTableView.OptionsCustomize; -end; - -function TcxGridBandedTableViewStorage.GetOptionsView: TcxGridBandedTableOptionsView; -begin - Result := BandedTableView.OptionsView; -end; - -function TcxGridBandedTableViewStorage.BandedTableView: TcxGridBandedTableView; -begin - Result := inherited View as TcxGridBandedTableView; -end; - -class function TcxGridBandedTableViewStorage.GetViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridBandedTableView; -end; - -{ TcxBandedTableViewEditor } - -class function TcxBandedTableViewEditor.GetViewByObject(APersistent: TPersistent): TcxCustomGridView; -begin - if APersistent is TcxGridBand then - Result := (APersistent as TcxGridBand).Bands.GridView - else - if APersistent is TcxGridBands then - Result := (APersistent as TcxGridBands).GridView - else - Result := inherited GetViewByObject(APersistent); -end; - -procedure TcxBandedTableViewEditor.DrawListBoxItem(AListBox: TWinControl; - AIndex: Integer; R: TRect; AParentBand: TcxGridBand); - - function GetParentBandInfoOffset: Integer; - var - I, W: Integer; - begin - Result := 0; - with AListBox as TListBox, Items do - for I := 0 to Count - 1 do - begin - W := Canvas.TextWidth(Items[I]); - if W > Result then Result := W; - end; - Inc(Result, 30); - end; - - function GetParentBandInfoText: string; - begin - Result := '[ParentBand: ' + IntToStr(AParentBand.Index); - if AParentBand.Caption <> '' then - Result := Result + ' - ' + AParentBand.Caption; - Result := Result + ']'; - end; - -begin - inherited DrawListBoxItem(AListBox, AIndex, R); - with AListBox as TListBox, Canvas do - if AParentBand <> nil then - begin - Inc(R.Left, GetParentBandInfoOffset); - TextOut(R.Left, R.Top, GetParentBandInfoText); - end; -end; - -procedure TcxBandedTableViewEditor.SelectAllBands; -begin - ListBoxSelectAll(LBBands); -end; - -procedure TcxBandedTableViewEditor.UpdateButtons; -begin - inherited; - BDeleteBand.Enabled := CanDeleteComponent(nil) and (LBBands.SelCount > 0); - BBandMoveUp.Enabled := LBBands.SelCount > 0; - BBandMoveDown.Enabled := LBBands.SelCount > 0; - - MIBandsMoveUp.Enabled := BBandMoveUp.Enabled; - MIBandsMoveDown.Enabled := BBandMoveDown.Enabled; - MIBandsSelectAll.Enabled := LBBands.SelCount < LBBands.Items.Count; -end; - -procedure TcxBandedTableViewEditor.UpdateEditor; -begin - inherited; - UpdateBandList; -end; - -procedure TcxBandedTableViewEditor.UpdateSelection; -begin - FormEditor.ListBoxSynchronizeSelection(LBBands); - inherited; -end; - -function TcxBandedTableViewEditor.GetBands: TcxGridBands; -begin - Result := (View as TcxGridBandedTableView).Bands; -end; - -procedure TcxBandedTableViewEditor.ReindexBandsProc(AList: TList; ANewIndex: Integer); -var - I: Integer; -begin - for I := 0 to AList.Count - 1 do - TcxGridBand(AList[I]).Index := ANewIndex; - UpdateDesigner; -end; - -procedure TcxBandedTableViewEditor.UpdateBandList; -begin - ListBoxLoadCollection(LBBands, Bands); -end; - -procedure TcxBandedTableViewEditor.BAddBandClick(Sender: TObject); -begin - CollectionItemsAdd(LBBands, Bands); -end; - -procedure TcxBandedTableViewEditor.BDeleteBandClick(Sender: TObject); -begin - CollectionItemsDelete(LBBands, Bands); -end; - -procedure TcxBandedTableViewEditor.LBBandsClick(Sender: TObject); -begin - FormEditor.ListBoxApplySelection(LBBands, Bands); -end; - -procedure TcxBandedTableViewEditor.BBandMoveUpClick(Sender: TObject); -begin - ListBoxMoveUpItems(LBBands, FBandsPrevDragIndex, ReindexBandsProc); -end; - -procedure TcxBandedTableViewEditor.BBandMoveDownClick(Sender: TObject); -begin - ListBoxMoveDownItems(LBBands, FBandsPrevDragIndex, ReindexBandsProc); -end; - -procedure TcxBandedTableViewEditor.MIBandsSelectAllClick(Sender: TObject); -begin - SelectAllBands; - LBBandsClick(nil); -end; - -// Drag Drop Bands - -procedure TcxBandedTableViewEditor.LBBandsStartDrag(Sender: TObject; - var DragObject: TDragObject); -begin - FBandsPrevDragIndex := -1; -end; - -procedure TcxBandedTableViewEditor.LBBandsDragOver(Sender, Source: TObject; - X, Y: Integer; State: TDragState; var Accept: Boolean); -begin - ListBoxDragOver(LBBands, Sender, Source, X, Y, State, Accept, FBandsPrevDragIndex); -end; - -procedure TcxBandedTableViewEditor.LBBandsEndDrag(Sender, Target: TObject; - X, Y: Integer); -begin - ListBoxEndDrag(LBBands, Sender, Target, X, Y, FBandsPrevDragIndex); -end; - -procedure TcxBandedTableViewEditor.LBBandsDragDrop(Sender, Source: TObject; - X, Y: Integer); -begin - ListBoxDragDrop(LBBands, Sender, Source, X, Y, FBandsPrevDragIndex, ReindexBandsProc); -end; - -procedure TcxBandedTableViewEditor.FormCreate(Sender: TObject); -begin - inherited; - CalculateListBoxItemHeight(LBBands); -end; - -procedure TcxBandedTableViewEditor.LBBandsDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - DrawListBoxItem(Control, Index, Rect, Bands[Index].ParentBand); -end; - -procedure TcxBandedTableViewEditor.LBColumnsDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - DrawListBoxItem(Control, Index, Rect, TcxGridBandedColumn(View.Items[Index]).Position.Band); -end; - -{ TcxGridBandedTableViewMenuProvider } - -function TcxGridBandedTableViewMenuProvider.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -procedure TcxGridBandedTableViewMenuProvider.CreateBand(Sender: TcxGridViewMenuItem); -begin - ObjectCreated(GridView.Bands.Add); -end; - -procedure TcxGridBandedTableViewMenuProvider.InitStructureCreationItems; -begin - inherited; - Items.AddItem('Create Band', CreateBand); -end; - -initialization - RegisterViewEditorClass(TcxGridBandedTableView, TcxBandedTableViewEditor); - RegisterDefaultViewStorage(TcxGridBandedTableViewStorage); - RegisterViewMenuProviderClass(TcxGridBandedTableView, TcxGridBandedTableViewMenuProvider); - -finalization - UnregisterViewMenuProviderClass(TcxGridBandedTableView, TcxGridBandedTableViewMenuProvider); - UnregisterDefaultViewStorage(TcxGridBandedTableViewStorage); - UnregisterViewEditorClass(TcxGridBandedTableView, TcxBandedTableViewEditor); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxCardViewEditor.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxCardViewEditor.dfm deleted file mode 100644 index 8c648579..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxCardViewEditor.dfm +++ /dev/null @@ -1,15 +0,0 @@ -inherited cxCardViewEditor: TcxCardViewEditor - Caption = 'cxCardViewEditor' - PixelsPerInch = 96 - TextHeight = 13 - inherited PViewEditor: TPanel - inherited PageControl1: TcxPageControl - inherited TSItems: TcxTabSheet - Caption = ' Rows ' - end - inherited TSSummary: TcxTabSheet - TabVisible = False - end - end - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxCardViewEditor.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxCardViewEditor.pas deleted file mode 100644 index c9da9035..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxCardViewEditor.pas +++ /dev/null @@ -1,127 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxCardViewEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, ComCtrls, ExtCtrls, Menus, StdCtrls, - cxViewEditor, cxCustomTableViewEditor, cxGridCustomView, cxGridCardView, - cxLookAndFeelPainters, cxButtons, cxPC, cxControls; - -type - TcxCardViewEditor = class(TcxCustomTableViewEditor); - - TcxGridCardViewStorage = class(TcxCustomGridViewStorage) - private - function GetLayoutDirection: TcxGridCardViewLayoutDirection; - function GetOptionsBehavior: TcxGridCardViewOptionsBehavior; - function GetOptionsData: TcxGridCardViewOptionsData; - function GetOptionsSelection: TcxGridCardViewOptionsSelection; - function GetOptionsView: TcxGridCardViewOptionsView; - procedure SetLayoutDirection(Value: TcxGridCardViewLayoutDirection); - protected - function CardView: TcxGridCardView; - public - class function GetViewClass: TcxCustomGridViewClass; override; - published - property LayoutDirection: TcxGridCardViewLayoutDirection read GetLayoutDirection write SetLayoutDirection; - property OptionsBehavior: TcxGridCardViewOptionsBehavior read GetOptionsBehavior; - property OptionsData: TcxGridCardViewOptionsData read GetOptionsData; - property OptionsSelection: TcxGridCardViewOptionsSelection read GetOptionsSelection; - property OptionsView: TcxGridCardViewOptionsView read GetOptionsView; - end; - -implementation - -{$R *.dfm} - -{ TcxGridCardViewStorage } - -function TcxGridCardViewStorage.GetLayoutDirection: TcxGridCardViewLayoutDirection; -begin - Result := CardView.LayoutDirection; -end; - -function TcxGridCardViewStorage.GetOptionsBehavior: TcxGridCardViewOptionsBehavior; -begin - Result := CardView.OptionsBehavior; -end; - -function TcxGridCardViewStorage.GetOptionsData: TcxGridCardViewOptionsData; -begin - Result := CardView.OptionsData; -end; - -function TcxGridCardViewStorage.GetOptionsSelection: TcxGridCardViewOptionsSelection; -begin - Result := CardView.OptionsSelection; -end; - -function TcxGridCardViewStorage.GetOptionsView: TcxGridCardViewOptionsView; -begin - Result := CardView.OptionsView; -end; - -procedure TcxGridCardViewStorage.SetLayoutDirection(Value: TcxGridCardViewLayoutDirection); -begin - CardView.LayoutDirection := Value; -end; - -function TcxGridCardViewStorage.CardView: TcxGridCardView; -begin - Result := inherited View as TcxGridCardView; -end; - -class function TcxGridCardViewStorage.GetViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -initialization - RegisterViewEditorClass(TcxGridCardView, TcxCardViewEditor); - RegisterDefaultViewStorage(TcxGridCardViewStorage); - -finalization - UnregisterDefaultViewStorage(TcxGridCardViewStorage); - UnregisterViewEditorClass(TcxGridCardView, TcxCardViewEditor); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxChartViewEditor.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxChartViewEditor.dfm deleted file mode 100644 index dccf7e97..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxChartViewEditor.dfm +++ /dev/null @@ -1,165 +0,0 @@ -inherited cxChartViewEditor: TcxChartViewEditor - Left = 543 - Top = 157 - Caption = 'cxChartViewEditor' - ClientHeight = 291 - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - inherited PViewEditor: TPanel - Height = 291 - Constraints.MinHeight = 210 - Constraints.MinWidth = 200 - object tcMain: TcxTabControl - Left = 0 - Top = 0 - Width = 343 - Height = 291 - Align = alClient - TabOrder = 0 - Tabs.Strings = ( - ' Series ' - ' DataGroups ') - OnChange = tcMainChange - OnChanging = tcMainChanging - ClientRectBottom = 291 - ClientRectRight = 343 - ClientRectTop = 24 - object Panel1: TPanel - Left = 0 - Top = 24 - Width = 343 - Height = 267 - Align = alClient - BevelOuter = bvNone - BorderWidth = 8 - TabOrder = 0 - object Panel2: TPanel - Left = 217 - Top = 8 - Width = 118 - Height = 251 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btnItemAdd: TcxButton - Left = 8 - Top = 0 - Width = 110 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = btnItemAddClick - end - object btnItemDelete: TcxButton - Left = 8 - Top = 32 - Width = 110 - Height = 24 - Caption = 'Delete' - TabOrder = 1 - OnClick = btnItemDeleteClick - end - object btnItemMoveUp: TcxButton - Left = 8 - Top = 72 - Width = 110 - Height = 24 - Caption = 'Move &Up' - TabOrder = 2 - OnClick = btnItemMoveUpClick - end - object btnItemMoveDown: TcxButton - Left = 8 - Top = 104 - Width = 110 - Height = 24 - Caption = 'Move &Down' - TabOrder = 3 - OnClick = btnItemMoveDownClick - end - object btnItemSelectAll: TcxButton - Left = 8 - Top = 144 - Width = 110 - Height = 24 - Caption = 'Select All' - TabOrder = 4 - OnClick = btnItemSelectAllClick - end - end - object Panel9: TPanel - Left = 8 - Top = 8 - Width = 209 - Height = 251 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object lbItems: TListBox - Left = 1 - Top = 1 - Width = 207 - Height = 249 - Style = lbOwnerDrawFixed - Align = alClient - BorderStyle = bsNone - DragMode = dmAutomatic - ItemHeight = 13 - MultiSelect = True - PopupMenu = pmItems - TabOrder = 0 - OnClick = lbItemsClick - OnDragDrop = lbItemsDragDrop - OnDragOver = lbItemsDragOver - OnDrawItem = lbItemsDrawItem - OnEndDrag = lbItemsEndDrag - OnKeyPress = FormKeyPress - OnStartDrag = lbItemsStartDrag - end - end - end - end - end - object pmItems: TPopupMenu - Left = 140 - Top = 74 - object miItemAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = btnItemAddClick - end - object miItemDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = btnItemDeleteClick - end - object N2: TMenuItem - Caption = '-' - end - object miItemMoveUp: TMenuItem - Caption = 'Move Up' - ShortCut = 16422 - OnClick = btnItemMoveUpClick - end - object miItemMoveDown: TMenuItem - Caption = 'Move Down' - ShortCut = 16424 - OnClick = btnItemMoveDownClick - end - object N1: TMenuItem - Caption = '-' - end - object miItemSelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = btnItemSelectAllClick - end - end - object pmItemsAdd: TPopupMenu - Left = 140 - Top = 112 - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxChartViewEditor.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxChartViewEditor.pas deleted file mode 100644 index 4cbc7cd7..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxChartViewEditor.pas +++ /dev/null @@ -1,726 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxChartViewEditor; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, ExtCtrls, cxViewEditor, cxGridCustomView, cxGridChartView, ComCtrls, StdCtrls, - Menus, cxControls, cxPC, cxLookAndFeelPainters, cxButtons; - -type - TcxGridChartItemKind = (ciSeries, ciDataGroup); - TcxGridChartItemListBoxParams = array[TcxGridChartItemKind] of Integer; - - TcxChartViewEditor = class(TcxViewEditor) - pmItems: TPopupMenu; - miItemAdd: TMenuItem; - miItemDelete: TMenuItem; - N2: TMenuItem; - miItemMoveUp: TMenuItem; - miItemMoveDown: TMenuItem; - N1: TMenuItem; - miItemSelectAll: TMenuItem; - pmItemsAdd: TPopupMenu; - tcMain: TcxTabControl; - Panel1: TPanel; - lbItems: TListBox; - Panel2: TPanel; - btnItemAdd: TcxButton; - btnItemDelete: TcxButton; - btnItemMoveUp: TcxButton; - btnItemMoveDown: TcxButton; - btnItemSelectAll: TcxButton; - Panel9: TPanel; - procedure tcMainChanging(Sender: TObject; var AllowChange: Boolean); - procedure tcMainChange(Sender: TObject); - procedure lbItemsClick(Sender: TObject); - procedure btnItemAddClick(Sender: TObject); - procedure btnItemAddExClick(Sender: TObject); - procedure miItemAddExClick(Sender: TObject); - procedure btnItemDeleteClick(Sender: TObject); - procedure btnItemMoveUpClick(Sender: TObject); - procedure btnItemMoveDownClick(Sender: TObject); - procedure btnItemSelectAllClick(Sender: TObject); - procedure lbItemsStartDrag(Sender: TObject; var DragObject: TDragObject); - procedure lbItemsDragOver(Sender, Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); - procedure lbItemsDragDrop(Sender, Source: TObject; X, Y: Integer); - procedure lbItemsEndDrag(Sender, Target: TObject; X, Y: Integer); - procedure lbItemsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure FormCreate(Sender: TObject); - private - FItemPrevDragIndex: Integer; - FListBoxItemIndex: TcxGridChartItemListBoxParams; - FListBoxTopIndex: TcxGridChartItemListBoxParams; - function GetItemClassValue: TcxGridChartItemClass; - function GetView: TcxGridChartView; - procedure ReindexItemsProc(AList: TList; ANewIndex: Integer); - protected - IsActiveTabChanging: Boolean; - - procedure Loaded; override; - - function GetItem(Index: Integer): TcxGridChartItem; virtual; - function GetItemClass(AItemKind: TcxGridChartItemKind): TcxGridChartItemClass; virtual; - function GetItemCount: Integer; virtual; - function GetItemKind: TcxGridChartItemKind; virtual; - function GetItemName: string; virtual; - procedure SetItemKind(Value: TcxGridChartItemKind); virtual; - - function AddItem: TcxGridChartItem; - procedure UpdateActiveTab; virtual; - procedure UpdateButtons; virtual; - procedure UpdateEditor; override; - procedure UpdateSelection; override; - procedure UpdateItemList; virtual; - - procedure RestoreListBoxParams; - procedure SaveListBoxParams; - - property ItemClass: TcxGridChartItemClass read GetItemClassValue; - property ItemCount: Integer read GetItemCount; - property ItemKind: TcxGridChartItemKind read GetItemKind write SetItemKind; - property ItemName: string read GetItemName; - property Items[Index: Integer]: TcxGridChartItem read GetItem; - public - class function GetViewByObject(APersistent: TPersistent): TcxCustomGridView; override; - property View: TcxGridChartView read GetView; - end; - - TcxGridChartViewStorage = class(TcxCustomGridViewStorage) - private - function GetDiagramArea: TcxGridChartAreaDiagram; - function GetDiagramBar: TcxGridChartBarDiagram; - function GetDiagramColumn: TcxGridChartColumnDiagram; - function GetDiagramLine: TcxGridChartLineDiagram; - function GetDiagramPie: TcxGridChartPieDiagram; - function GetLegend: TcxGridChartLegend; - function GetOptionsBehavior: TcxGridChartOptionsBehavior; - function GetOptionsCustomize: TcxGridChartOptionsCustomize; - function GetOptionsView: TcxGridChartOptionsView; - function GetTitle: TcxGridChartTitle; - function GetToolBox: TcxGridChartToolBox; - function GetView: TcxGridChartView; - protected - property View: TcxGridChartView read GetView; - public - class function GetViewClass: TcxCustomGridViewClass; override; - published - property DiagramArea: TcxGridChartAreaDiagram read GetDiagramArea; - property DiagramBar: TcxGridChartBarDiagram read GetDiagramBar; - property DiagramColumn: TcxGridChartColumnDiagram read GetDiagramColumn; - property DiagramLine: TcxGridChartLineDiagram read GetDiagramLine; - property DiagramPie: TcxGridChartPieDiagram read GetDiagramPie; - property Legend: TcxGridChartLegend read GetLegend; - property OptionsBehavior: TcxGridChartOptionsBehavior read GetOptionsBehavior; - property OptionsCustomize: TcxGridChartOptionsCustomize read GetOptionsCustomize; - property OptionsView: TcxGridChartOptionsView read GetOptionsView; - property Title: TcxGridChartTitle read GetTitle; - property ToolBox: TcxGridChartToolBox read GetToolBox; - end; - - TcxGridChartViewMenuProvider = class(TcxCustomGridViewMenuProvider) - private - function GetGridView: TcxGridChartView; - protected - procedure ActivateDiagram(Sender: TcxGridViewMenuItem); - procedure CreateDataGroup(Sender: TcxGridViewMenuItem); - procedure CreateSeries(Sender: TcxGridViewMenuItem); - procedure InitLayoutItems; override; - procedure InitStructureItems; override; - public - property GridView: TcxGridChartView read GetGridView; - end; - -implementation - -{$R *.dfm} - -uses - Math, cxClasses, cxCustomData, cxDesignWindows; - -const - AddButtonCaption = '&Add'; - AddExButtonCaption = '&Add...'; - -function GetChartItemName(AItemKind: TcxGridChartItemKind): string; -begin - case AItemKind of - ciSeries: - Result := 'Series'; - ciDataGroup: - Result := 'DataGroup'; - else - Result := ''; - end; -end; - -function CreateChartItem(AView: TcxGridChartView; AItemKind: TcxGridChartItemKind): TcxGridChartItem; -begin - AView.BeginUpdate; - try - case AItemKind of - ciSeries: - Result := AView.CreateSeries; - ciDataGroup: - Result := AView.CreateDataGroup; - else - Result := nil; - end; - Result.Name := GetViewItemUniqueName(AView, Result, GetChartItemName(AItemKind)); - finally - AView.EndUpdate; - end; -end; - -{ TcxChartViewEditor } - -function TcxChartViewEditor.GetItemClassValue: TcxGridChartItemClass; -begin - Result := GetItemClass(ItemKind); -end; - -function TcxChartViewEditor.GetView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited View); -end; - -procedure TcxChartViewEditor.ReindexItemsProc(AList: TList; ANewIndex: Integer); -var - I: Integer; -begin - if AList.Count = 0 then Exit; - for I := AList.Count - 1 downto 0 do - begin - if TcxGridChartItem(AList[I]).Index < ANewIndex then - Dec(ANewIndex); - TcxGridChartItem(AList[I]).Index := ANewIndex; - end; - UpdateDesigner; -end; - -procedure TcxChartViewEditor.Loaded; -begin - inherited; - tcMain.TabIndex := 0; // because it is deleted from DFM by SetupBuilder -end; - -function TcxChartViewEditor.GetItem(Index: Integer): TcxGridChartItem; -begin - case ItemKind of - ciSeries: - Result := View.Series[Index]; - ciDataGroup: - Result := View.DataGroups[Index]; - else - Result := nil; - end; -end; - -function TcxChartViewEditor.GetItemClass(AItemKind: TcxGridChartItemKind): TcxGridChartItemClass; -begin - case AItemKind of - ciSeries: - Result := View.GetSeriesClass; - ciDataGroup: - Result := View.GetDataGroupClass; - else - Result := nil; - end; -end; - -function TcxChartViewEditor.GetItemCount: Integer; -begin - case ItemKind of - ciSeries: - Result := View.SeriesCount; - ciDataGroup: - Result := View.DataGroupCount; - else - Result := 0; - end; -end; - -function TcxChartViewEditor.GetItemKind: TcxGridChartItemKind; -begin - Result := TcxGridChartItemKind(tcMain.TabIndex); -end; - -function TcxChartViewEditor.GetItemName: string; -begin - Result := GetChartItemName(ItemKind); -end; - -procedure TcxChartViewEditor.SetItemKind(Value: TcxGridChartItemKind); -begin - if IsActiveTabChanging then Exit; - if ItemKind <> Value then - begin - SaveListBoxParams; - tcMain.TabIndex := Ord(Value); - tcMainChange(nil); - end; -end; - -function TcxChartViewEditor.AddItem: TcxGridChartItem; -begin - Result := CreateChartItem(View, ItemKind); - SelectComponent(Result); - UpdateDesigner; -end; - -procedure TcxChartViewEditor.UpdateActiveTab; -var - AIsItemFoundInSelection: Boolean; - AItemKind, ASelectedItemKind: TcxGridChartItemKind; - AList: TList; - I: Integer; - AObject: TObject; -begin - AIsItemFoundInSelection := False; - ASelectedItemKind := Low(ASelectedItemKind); - AList := TList.Create; - try - GetSelectionList(AList); - for I := 0 to AList.Count - 1 do - begin - AObject := TObject(AList[I]); - if (AObject is TcxGridChartItem) and (TcxGridChartItem(AObject).GridView = View) then - for AItemKind := Low(AItemKind) to High(AItemKind) do - if AObject.ClassType = GetItemClass(AItemKind) then - if AIsItemFoundInSelection and (ASelectedItemKind <> AItemKind) then - Exit - else - begin - AIsItemFoundInSelection := True; - ASelectedItemKind := AItemKind; - Break; - end; - end; - finally - AList.Free; - end; - if AIsItemFoundInSelection then - ItemKind := ASelectedItemKind; -end; - -procedure TcxChartViewEditor.UpdateButtons; -begin - btnItemAdd.Enabled := CanAddComponent; - btnItemDelete.Enabled := CanDeleteComponent(nil) and (lbItems.SelCount > 0); - btnItemMoveUp.Enabled := lbItems.SelCount > 0; - btnItemMoveDown.Enabled := lbItems.SelCount > 0; - btnItemSelectAll.Enabled := lbItems.SelCount < lbItems.Items.Count; - - miItemAdd.Enabled := btnItemAdd.Enabled; - miItemDelete.Enabled := btnItemDelete.Enabled; - miItemMoveUp.Enabled := btnItemMoveUp.Enabled; - miItemMoveDown.Enabled := btnItemMoveDown.Enabled; - miItemSelectAll.Enabled := btnItemSelectAll.Enabled; - - if Supports(DataController, IcxGridChartViewItemsProvider) then - begin - btnItemAdd.Caption := AddExButtonCaption; - btnItemAdd.OnClick := btnItemAddExClick; - end - else - begin - btnItemAdd.Caption := AddButtonCaption; - btnItemAdd.OnClick := btnItemAddClick; - end; -end; - -procedure TcxChartViewEditor.UpdateEditor; -begin - inherited; - UpdateItemList; -end; - -procedure TcxChartViewEditor.UpdateSelection; -begin - inherited; - UpdateActiveTab; - FormEditor.ListBoxSynchronizeSelection(lbItems); - UpdateButtons; -end; - -procedure TcxChartViewEditor.UpdateItemList; -var - ASelection: TStringList; - AItemIndex, ATopIndex, I: Integer; - AItem: TcxGridChartItem; - S: string; -begin - ListBoxSaveSelection(lbItems, ASelection, AItemIndex, ATopIndex); - try - lbItems.Items.Clear; - for I := 0 to ItemCount - 1 do - begin - AItem := Items[I]; - S := AItem.Name + ' - "' + AItem.GetDisplayText + '"'; - lbItems.Items.AddObject(S, AItem); - end; - finally - ListBoxRestoreSelection(lbItems, ASelection, AItemIndex, ATopIndex); - end; -end; - -procedure TcxChartViewEditor.RestoreListBoxParams; -begin - lbItems.Items.BeginUpdate; - try - ListBoxRestorePos(lbItems, FListBoxItemIndex[ItemKind], FListBoxTopIndex[ItemKind]); - finally - lbItems.Items.EndUpdate; - RedrawWindow(lbItems.Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE or RDW_UPDATENOW); // to fix the bug with scrollbar updating - end; -end; - -procedure TcxChartViewEditor.SaveListBoxParams; -begin - ListBoxSavePos(lbItems, FListBoxItemIndex[ItemKind], FListBoxTopIndex[ItemKind]); -end; - -class function TcxChartViewEditor.GetViewByObject(APersistent: TPersistent): TcxCustomGridView; -begin - if APersistent is TcxGridChartItem then - Result := TcxGridChartItem(APersistent).GridView - else - if APersistent is TcxGridChartDiagram then - Result := TcxGridChartDiagram(APersistent).GridView - else - Result := inherited GetViewByObject(APersistent); -end; - -procedure TcxChartViewEditor.lbItemsClick(Sender: TObject); -begin - FormEditor.ListBoxApplySelection(lbItems, View); -end; - -procedure TcxChartViewEditor.btnItemAddClick(Sender: TObject); -begin - AddItem; -end; - -procedure TcxChartViewEditor.btnItemAddExClick(Sender: TObject); - - procedure InitPopupMenu(APopupMenu: TPopupMenu; const AProvider: IcxGridChartViewItemsProvider); - var - I: Integer; - ACaptions: TStringList; - begin - APopupMenu.Items.Clear; - APopupMenu.Items.Add(CreateMenuItem(pmItems, 'Blank', miItemAddExClick)); - APopupMenu.Items.Add(CreateMenuItem(pmItems, '-')); - - ACaptions := TStringList.Create; - try - AProvider.GetItemCaptions(ItemClass, ACaptions); - for I := 0 to ACaptions.Count - 1 do - APopupMenu.Items.Add(CreateMenuItem(pmItems, ACaptions[I], miItemAddExClick, - True, I, AProvider.GetItem(ItemClass, I) <> nil)); - finally - ACaptions.Free; - end; - end; - - function GetPopupMenuPosition(AButton: TcxButton): TPoint; - begin - with AButton.BoundsRect do - Result := Point(Left, Bottom); - Result := AButton.Parent.ClientToScreen(Result); - end; - -begin - InitPopupMenu(pmItemsAdd, DataController as IcxGridChartViewItemsProvider); - with GetPopupMenuPosition(btnItemAdd) do - pmItemsAdd.Popup(X, Y); -end; - -procedure TcxChartViewEditor.miItemAddExClick(Sender: TObject); -var - AIndex: Integer; - AItem: TcxGridChartItem; -begin - AIndex := (Sender as TMenuItem).Tag; - if (AIndex = -1) or not (Sender as TMenuItem).Checked then - begin - View.BeginUpdate; - try - AItem := AddItem; - if AIndex <> -1 then - begin - (DataController as IcxGridChartViewItemsProvider).InitItem(AItem, AIndex); - UpdateDesigner; - end; - finally - View.EndUpdate; - end; - end - else - begin - SelectComponent(View); - (DataController as IcxGridChartViewItemsProvider).GetItem(ItemClass, AIndex).Free; - UpdateDesigner; - end; -end; - -procedure TcxChartViewEditor.btnItemDeleteClick(Sender: TObject); -begin - if lbItems.SelCount > 0 then - begin - BeginUpdate; - try - ListBoxDeleteSelection(lbItems, True); - FormEditor.ListBoxApplySelection(lbItems, View); - UpdateDesigner; - finally - EndUpdate; - end; - end; -end; - -procedure TcxChartViewEditor.btnItemMoveUpClick(Sender: TObject); -begin - FItemPrevDragIndex := -1; - ListBoxMoveItems(lbItems, Max(0, ListBoxGetFirstSelectedIndex(lbItems) - 1), - FItemPrevDragIndex, ReindexItemsProc); -end; - -procedure TcxChartViewEditor.btnItemMoveDownClick(Sender: TObject); -begin - FItemPrevDragIndex := -1; - ListBoxMoveItems(lbItems, Min(lbItems.Items.Count, ListBoxGetLastSelectedIndex(lbItems) + 2), - FItemPrevDragIndex, ReindexItemsProc); -end; - -procedure TcxChartViewEditor.btnItemSelectAllClick(Sender: TObject); -begin - ListBoxSelectAll(lbItems); - FormEditor.ListBoxApplySelection(lbItems, View); -end; - -procedure TcxChartViewEditor.lbItemsStartDrag(Sender: TObject; - var DragObject: TDragObject); -begin - FItemPrevDragIndex := -1; -end; - -procedure TcxChartViewEditor.lbItemsDragOver(Sender, Source: TObject; X, - Y: Integer; State: TDragState; var Accept: Boolean); -begin - ListBoxDragOver(lbItems, Sender, Source, X, Y, State, Accept, FItemPrevDragIndex); -end; - -procedure TcxChartViewEditor.lbItemsDragDrop(Sender, Source: TObject; X, - Y: Integer); -begin - ListBoxDragDrop(lbItems, Sender, Source, X, Y, FItemPrevDragIndex, ReindexItemsProc); -end; - -procedure TcxChartViewEditor.lbItemsEndDrag(Sender, Target: TObject; X, - Y: Integer); -begin - ListBoxEndDrag(lbItems, Sender, Target, X, Y, FItemPrevDragIndex); -end; - -procedure TcxChartViewEditor.lbItemsDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - with Control as TListBox, Canvas do - begin - FillRect(Rect); - TextOut(Rect.Left + 3, Rect.Top + 3, Items[Index]); - end; -end; - -procedure TcxChartViewEditor.FormCreate(Sender: TObject); -begin - inherited; - with lbItems do - begin - Canvas.Font := Font; - ItemHeight := 2 * 3 + Canvas.TextHeight('Qq'); - end; -end; - -procedure TcxChartViewEditor.tcMainChanging(Sender: TObject; var AllowChange: Boolean); -begin - SaveListBoxParams; -end; - -procedure TcxChartViewEditor.tcMainChange(Sender: TObject); -begin - IsActiveTabChanging := True; - try - UpdateItemList; - RestoreListBoxParams; - UpdateSelection; - finally - IsActiveTabChanging := False; - end; -end; - -{ TcxGridChartViewStorage } - -function TcxGridChartViewStorage.GetDiagramArea: TcxGridChartAreaDiagram; -begin - Result := View.DiagramArea; -end; - -function TcxGridChartViewStorage.GetDiagramBar: TcxGridChartBarDiagram; -begin - Result := View.DiagramBar; -end; - -function TcxGridChartViewStorage.GetDiagramColumn: TcxGridChartColumnDiagram; -begin - Result := View.DiagramColumn; -end; - -function TcxGridChartViewStorage.GetDiagramLine: TcxGridChartLineDiagram; -begin - Result := View.DiagramLine; -end; - -function TcxGridChartViewStorage.GetDiagramPie: TcxGridChartPieDiagram; -begin - Result := View.DiagramPie; -end; - -function TcxGridChartViewStorage.GetLegend: TcxGridChartLegend; -begin - Result := View.Legend; -end; - -function TcxGridChartViewStorage.GetOptionsBehavior: TcxGridChartOptionsBehavior; -begin - Result := View.OptionsBehavior; -end; - -function TcxGridChartViewStorage.GetOptionsCustomize: TcxGridChartOptionsCustomize; -begin - Result := View.OptionsCustomize; -end; - -function TcxGridChartViewStorage.GetOptionsView: TcxGridChartOptionsView; -begin - Result := View.OptionsView; -end; - -function TcxGridChartViewStorage.GetTitle: TcxGridChartTitle; -begin - Result := View.Title; -end; - -function TcxGridChartViewStorage.GetToolBox: TcxGridChartToolBox; -begin - Result := View.ToolBox; -end; - -function TcxGridChartViewStorage.GetView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited View); -end; - -class function TcxGridChartViewStorage.GetViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridChartView; -end; - -{ TcxGridChartViewMenuProvider } - -function TcxGridChartViewMenuProvider.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -procedure TcxGridChartViewMenuProvider.ActivateDiagram(Sender: TcxGridViewMenuItem); -var - ADiagram: TcxGridChartDiagram; -begin - ADiagram := GridView.FindDiagramByDisplayText(Sender.Caption); - if not ADiagram.Active then - begin - ADiagram.Active := True; - DesignerModified; - end; - SelectObject(ADiagram); -end; - -procedure TcxGridChartViewMenuProvider.CreateDataGroup(Sender: TcxGridViewMenuItem); -begin - ObjectCreated(CreateChartItem(GridView, ciDataGroup)); -end; - -procedure TcxGridChartViewMenuProvider.CreateSeries(Sender: TcxGridViewMenuItem); -begin - ObjectCreated(CreateChartItem(GridView, ciSeries)); -end; - -procedure TcxGridChartViewMenuProvider.InitLayoutItems; -var - I: Integer; -begin - inherited; - for I := 0 to GridView.DiagramCount - 1 do - Items.AddItem(GridView.Diagrams[I].DisplayText, ActivateDiagram, True, - GridView.Diagrams[I].Active); -end; - -procedure TcxGridChartViewMenuProvider.InitStructureItems; -begin - Items.AddItem('Create Series', CreateSeries, CanAddComponent(GridView.Owner)); - Items.AddItem('Create DataGroup', CreateDataGroup, CanAddComponent(GridView.Owner)); - Items.AddSeparator; - inherited; -end; - -initialization - RegisterViewEditorClass(TcxGridChartView, TcxChartViewEditor); - RegisterDefaultViewStorage(TcxGridChartViewStorage); - RegisterViewMenuProviderClass(TcxGridChartView, TcxGridChartViewMenuProvider); - -finalization - UnregisterViewMenuProviderClass(TcxGridChartView, TcxGridChartViewMenuProvider); - UnregisterDefaultViewStorage(TcxGridChartViewStorage); - UnregisterViewEditorClass(TcxGridChartView, TcxChartViewEditor); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxCustomTableViewEditor.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxCustomTableViewEditor.dfm deleted file mode 100644 index fc545584..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxCustomTableViewEditor.dfm +++ /dev/null @@ -1,766 +0,0 @@ -inherited cxCustomTableViewEditor: TcxCustomTableViewEditor - Left = 556 - Top = 316 - ActiveControl = PageControl1 - Caption = 'cxCustomTableViewEditor' - ClientHeight = 319 - ClientWidth = 344 - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - inherited PViewEditor: TPanel - Width = 344 - Height = 319 - Constraints.MinHeight = 282 - Constraints.MinWidth = 344 - object PageControl1: TcxPageControl - Left = 0 - Top = 0 - Width = 344 - Height = 319 - ActivePage = TSItems - Align = alClient - TabOrder = 0 - ClientRectBottom = 319 - ClientRectRight = 344 - ClientRectTop = 24 - object TSItems: TcxTabSheet - BorderWidth = 8 - object Panel1: TPanel - Left = 200 - Top = 0 - Width = 128 - Height = 279 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object BColumnAdd: TcxButton - Left = 8 - Top = 0 - Width = 120 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BColumnAddClick - end - object BColumnDelete: TcxButton - Left = 8 - Top = 32 - Width = 120 - Height = 24 - Caption = 'Delete' - TabOrder = 1 - OnClick = BColumnDeleteClick - end - object BColumnAddAll: TcxButton - Left = 8 - Top = 176 - Width = 120 - Height = 24 - Caption = 'Retrieve &Fields' - TabOrder = 5 - Visible = False - OnClick = BColumnAddAllClick - end - object BColumnRestore: TcxButton - Left = 8 - Top = 64 - Width = 120 - Height = 24 - Caption = '&Restore Defaults' - TabOrder = 2 - OnClick = BColumnRestoreClick - end - object BColumnMoveUp: TcxButton - Left = 8 - Top = 104 - Width = 120 - Height = 24 - Caption = 'Move &Up' - TabOrder = 3 - OnClick = BColumnMoveUpClick - end - object BColumnMoveDown: TcxButton - Left = 8 - Top = 136 - Width = 120 - Height = 24 - Caption = 'Move &Down' - TabOrder = 4 - OnClick = BColumnMoveDownClick - end - object BColumnAddMissing: TcxButton - Left = 8 - Top = 208 - Width = 120 - Height = 24 - Caption = 'Retrieve &Missing Fields' - TabOrder = 6 - Visible = False - OnClick = BColumnAddMissingClick - end - end - object Panel8: TPanel - Left = 0 - Top = 0 - Width = 200 - Height = 279 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBColumns: TListBox - Left = 1 - Top = 1 - Width = 198 - Height = 277 - Style = lbOwnerDrawFixed - Align = alClient - BorderStyle = bsNone - DragMode = dmAutomatic - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMColumns - TabOrder = 0 - OnClick = LBColumnsClick - OnDragDrop = LBColumnsDragDrop - OnDragOver = LBColumnsDragOver - OnDrawItem = LBColumnsDrawItem - OnEndDrag = LBColumnsEndDrag - OnKeyPress = FormKeyPress - OnStartDrag = LBColumnsStartDrag - end - end - end - object TSSummary: TcxTabSheet - BorderWidth = 8 - Caption = ' Summary ' - ImageIndex = 1 - object PageControl2: TcxPageControl - Left = 0 - Top = 0 - Width = 328 - Height = 279 - ActivePage = TSFooterSummaryItems - Align = alClient - TabOrder = 0 - ClientRectBottom = 279 - ClientRectRight = 328 - ClientRectTop = 24 - object TSFooterSummaryItems: TcxTabSheet - Caption = ' Footer ' - object Panel2: TPanel - Left = 0 - Top = 0 - Width = 185 - Height = 255 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object Panel3: TPanel - Left = 0 - Top = 220 - Width = 185 - Height = 35 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BAddFooterSummaryItem: TcxButton - Left = 13 - Top = 8 - Width = 75 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BAddFooterSummaryItemClick - end - object BDeleteFooterSummaryItem: TcxButton - Left = 97 - Top = 8 - Width = 75 - Height = 24 - Caption = '&Delete' - TabOrder = 1 - OnClick = BDeleteFooterSummaryItemClick - end - end - object Panel4: TPanel - Left = 0 - Top = 0 - Width = 185 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object Label1: TLabel - Left = 4 - Top = 4 - Width = 28 - Height = 13 - Caption = 'Items:' - end - end - object Panel9: TPanel - Left = 0 - Top = 20 - Width = 185 - Height = 200 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBFooterSummary: TListBox - Left = 1 - Top = 1 - Width = 183 - Height = 198 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMFooterSummary - TabOrder = 0 - OnClick = LBFooterSummaryClick - OnKeyPress = FormKeyPress - end - end - end - end - object TSDefaultGroupSummaryItems: TcxTabSheet - Caption = ' Default For Groups ' - ImageIndex = 1 - object Panel5: TPanel - Left = 0 - Top = 0 - Width = 185 - Height = 255 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object Panel6: TPanel - Left = 0 - Top = 220 - Width = 185 - Height = 35 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BDefaultGroupSummaryAdd: TcxButton - Left = 13 - Top = 8 - Width = 75 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BDefaultGroupSummaryAddClick - end - object BDefaultGroupSummaryDelete: TcxButton - Left = 97 - Top = 8 - Width = 75 - Height = 24 - Caption = '&Delete' - TabOrder = 1 - OnClick = BDefaultGroupSummaryDeleteClick - end - end - object Panel7: TPanel - Left = 0 - Top = 0 - Width = 185 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object Label2: TLabel - Left = 4 - Top = 4 - Width = 28 - Height = 13 - Caption = 'Items:' - end - end - object Panel10: TPanel - Left = 0 - Top = 20 - Width = 185 - Height = 200 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBDefaultGroupsSummary: TListBox - Left = 1 - Top = 1 - Width = 183 - Height = 198 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMDefaultGroupsSummary - TabOrder = 0 - OnClick = LBDefaultGroupsSummaryClick - OnKeyPress = FormKeyPress - end - end - end - end - object TabSheet3: TcxTabSheet - Caption = ' Groups ' - ImageIndex = 2 - object Splitter2: TSplitter - Left = 0 - Top = 137 - Width = 328 - Height = 5 - Cursor = crVSplit - Align = alBottom - Beveled = True - end - object PSummaryGroups: TPanel - Left = 0 - Top = 0 - Width = 328 - Height = 137 - Align = alClient - BevelOuter = bvNone - Constraints.MinHeight = 100 - TabOrder = 0 - OnResize = PSummaryGroupsResize - object PGroupItems: TPanel - Left = 166 - Top = 0 - Width = 162 - Height = 137 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object Panel11: TPanel - Left = 0 - Top = 103 - Width = 162 - Height = 34 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BGroupSummaryItemAdd: TcxButton - Left = 4 - Top = 6 - Width = 75 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BGroupSummaryItemAddClick - end - object BGroupSummaryItemDelete: TcxButton - Left = 83 - Top = 6 - Width = 75 - Height = 24 - Caption = '&Delete' - TabOrder = 1 - OnClick = BGroupSummaryItemDeleteClick - end - end - object Panel12: TPanel - Left = 0 - Top = 0 - Width = 162 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object Label4: TLabel - Left = 4 - Top = 4 - Width = 28 - Height = 13 - Caption = 'Items:' - end - end - object Panel16: TPanel - Left = 0 - Top = 20 - Width = 162 - Height = 83 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBGroupSummaryItems: TListBox - Left = 1 - Top = 1 - Width = 160 - Height = 81 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMGroupSummaryItems - TabOrder = 0 - OnClick = LBGroupSummaryItemsClick - OnKeyPress = FormKeyPress - end - end - end - object PGroups: TPanel - Left = 0 - Top = 0 - Width = 162 - Height = 137 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object Panel14: TPanel - Left = 0 - Top = 103 - Width = 162 - Height = 34 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BSummaryGroupAdd: TcxButton - Left = 4 - Top = 6 - Width = 75 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BSummaryGroupAddClick - end - object BSummaryGroupDelete: TcxButton - Left = 83 - Top = 6 - Width = 75 - Height = 24 - Caption = '&Delete' - TabOrder = 1 - OnClick = BSummaryGroupDeleteClick - end - end - object Panel15: TPanel - Left = 0 - Top = 0 - Width = 162 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object Label5: TLabel - Left = 4 - Top = 4 - Width = 37 - Height = 13 - Caption = 'Groups:' - end - end - object Panel13: TPanel - Left = 0 - Top = 20 - Width = 162 - Height = 83 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBSummaryGroups: TListBox - Left = 1 - Top = 1 - Width = 160 - Height = 81 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMSummaryGroups - TabOrder = 0 - OnClick = LBSummaryGroupsClick - OnKeyPress = FormKeyPress - end - end - end - object PGSeparator: TPanel - Left = 162 - Top = 0 - Width = 4 - Height = 137 - Align = alLeft - BevelOuter = bvNone - TabOrder = 2 - end - end - object PLinks: TPanel - Left = 0 - Top = 142 - Width = 328 - Height = 113 - Align = alBottom - BevelOuter = bvNone - Constraints.MinHeight = 100 - TabOrder = 1 - OnResize = PLinksResize - object PUnlinkedColumns: TPanel - Left = 0 - Top = 0 - Width = 147 - Height = 113 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object Panel19: TPanel - Left = 0 - Top = 0 - Width = 147 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object Label6: TLabel - Left = 4 - Top = 4 - Width = 88 - Height = 13 - Caption = 'Unlinked Columns:' - end - end - object Panel17: TPanel - Left = 0 - Top = 20 - Width = 147 - Height = 93 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 1 - object LBUnlinkedColumns: TListBox - Left = 1 - Top = 1 - Width = 145 - Height = 91 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - TabOrder = 0 - OnClick = LBUnlinkedColumnsClick - OnKeyPress = FormKeyPress - end - end - end - object PLinkUnlink: TPanel - Left = 147 - Top = 0 - Width = 35 - Height = 113 - Align = alLeft - BevelOuter = bvNone - TabOrder = 1 - object BColumnLink: TcxButton - Left = 5 - Top = 34 - Width = 25 - Height = 25 - Caption = '>' - TabOrder = 0 - OnClick = BColumnLinkClick - end - object BColumnUnlink: TcxButton - Left = 5 - Top = 68 - Width = 25 - Height = 25 - Caption = '<' - TabOrder = 1 - OnClick = BColumnUnlinkClick - end - end - object PLinkedColumns: TPanel - Left = 182 - Top = 0 - Width = 146 - Height = 113 - Align = alClient - BevelOuter = bvNone - TabOrder = 2 - object Panel23: TPanel - Left = 0 - Top = 0 - Width = 146 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object Label7: TLabel - Left = 4 - Top = 4 - Width = 78 - Height = 13 - Caption = 'Linked Columns:' - end - end - object Panel18: TPanel - Left = 0 - Top = 20 - Width = 146 - Height = 93 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 1 - object LBLinkedColumns: TListBox - Left = 1 - Top = 1 - Width = 144 - Height = 91 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - TabOrder = 0 - OnClick = LBUnlinkedColumnsClick - OnKeyPress = FormKeyPress - end - end - end - end - end - end - end - end - end - object PMColumns: TPopupMenu - Left = 228 - Top = 6 - object MIColumnAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BColumnAddClick - end - object MIColumnDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BColumnDeleteClick - end - object MIColumnRestore: TMenuItem - Caption = 'Rest&ore Defaults' - OnClick = BColumnRestoreClick - end - object N2: TMenuItem - Caption = '-' - end - object MIColumnMoveUp: TMenuItem - Caption = 'Move Up' - ShortCut = 16422 - OnClick = BColumnMoveUpClick - end - object MIColumnMoveDown: TMenuItem - Caption = 'Move Down' - ShortCut = 16424 - OnClick = BColumnMoveDownClick - end - object N1: TMenuItem - Caption = '-' - end - object MIColumnSelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MIColumnSelectAllClick - end - end - object PMFooterSummary: TPopupMenu - Left = 230 - Top = 90 - object MIFooterSummaryAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BAddFooterSummaryItemClick - end - object MIFooterSummaryDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BDeleteFooterSummaryItemClick - end - object MenuItem4a: TMenuItem - Caption = '-' - end - object MIFooterSummarySelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MIFooterSummarySelectAllClick - end - end - object PMDefaultGroupsSummary: TPopupMenu - Left = 230 - Top = 130 - object MIDefaultGroupSummaryAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BDefaultGroupSummaryAddClick - end - object MIDefaultGroupSummaryDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BDefaultGroupSummaryDeleteClick - end - object MenuItem3b: TMenuItem - Caption = '-' - end - object MIDefaultGroupSummarySelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MIDefaultGroupSummarySelectAllClick - end - end - object PMSummaryGroups: TPopupMenu - Left = 230 - Top = 170 - object MISummaryGroupAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BSummaryGroupAddClick - end - object MISummaryGroupDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BSummaryGroupDeleteClick - end - object MenuItem5d: TMenuItem - Caption = '-' - end - object MISummaryGroupSelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MISummaryGroupSelectAllClick - end - end - object PMGroupSummaryItems: TPopupMenu - Left = 230 - Top = 210 - object MIGroupSummaryItemsAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BGroupSummaryItemAddClick - end - object MIGroupSummaryItemsDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BGroupSummaryItemDeleteClick - end - object MenuItem6c: TMenuItem - Caption = '-' - end - object MIGroupSummaryItemsSelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MIGroupSummaryItemsSelectAllClick - end - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxCustomTableViewEditor.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxCustomTableViewEditor.pas deleted file mode 100644 index 3a6dee08..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxCustomTableViewEditor.pas +++ /dev/null @@ -1,1117 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxCustomTableViewEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, ExtCtrls, StdCtrls, ComCtrls, Menus, - cxClasses, cxCustomData, cxDBData, cxNavigator, cxGridCustomView, cxGridCustomTableView, - cxGridStructureNavigator, cxViewEditor, cxLookAndFeelPainters, cxButtons, - cxPC, cxControls; - -type - TcxCustomTableViewEditor = class(TcxViewEditor) - PageControl1: TcxPageControl; - TSItems: TcxTabSheet; - TSSummary: TcxTabSheet; - Panel1: TPanel; - BColumnAdd: TcxButton; - BColumnDelete: TcxButton; - BColumnAddAll: TcxButton; - BColumnRestore: TcxButton; - PMColumns: TPopupMenu; - MIColumnAdd: TMenuItem; - MIColumnDelete: TMenuItem; - MIColumnRestore: TMenuItem; - MIColumnSelectAll: TMenuItem; - PageControl2: TcxPageControl; - TSFooterSummaryItems: TcxTabSheet; - TSDefaultGroupSummaryItems: TcxTabSheet; - TabSheet3: TcxTabSheet; - Panel2: TPanel; - Panel3: TPanel; - BAddFooterSummaryItem: TcxButton; - BDeleteFooterSummaryItem: TcxButton; - LBFooterSummary: TListBox; - Panel4: TPanel; - Label1: TLabel; - Panel5: TPanel; - Panel6: TPanel; - BDefaultGroupSummaryAdd: TcxButton; - BDefaultGroupSummaryDelete: TcxButton; - LBDefaultGroupsSummary: TListBox; - Panel7: TPanel; - Label2: TLabel; - PSummaryGroups: TPanel; - PLinks: TPanel; - PGroupItems: TPanel; - Panel11: TPanel; - BGroupSummaryItemAdd: TcxButton; - BGroupSummaryItemDelete: TcxButton; - LBGroupSummaryItems: TListBox; - Panel12: TPanel; - Label4: TLabel; - PGroups: TPanel; - Panel14: TPanel; - BSummaryGroupAdd: TcxButton; - BSummaryGroupDelete: TcxButton; - LBSummaryGroups: TListBox; - Panel15: TPanel; - Label5: TLabel; - PUnlinkedColumns: TPanel; - LBUnlinkedColumns: TListBox; - Panel19: TPanel; - Label6: TLabel; - PLinkUnlink: TPanel; - PLinkedColumns: TPanel; - LBLinkedColumns: TListBox; - Panel23: TPanel; - Label7: TLabel; - BColumnLink: TcxButton; - BColumnUnlink: TcxButton; - Splitter2: TSplitter; - PGSeparator: TPanel; - N1: TMenuItem; - BColumnMoveUp: TcxButton; - BColumnMoveDown: TcxButton; - N2: TMenuItem; - MIColumnMoveUp: TMenuItem; - MIColumnMoveDown: TMenuItem; - PMFooterSummary: TPopupMenu; - MIFooterSummaryAdd: TMenuItem; - MIFooterSummaryDelete: TMenuItem; - MenuItem4a: TMenuItem; - MIFooterSummarySelectAll: TMenuItem; - PMDefaultGroupsSummary: TPopupMenu; - MIDefaultGroupSummaryAdd: TMenuItem; - MIDefaultGroupSummaryDelete: TMenuItem; - MenuItem3b: TMenuItem; - MIDefaultGroupSummarySelectAll: TMenuItem; - PMSummaryGroups: TPopupMenu; - MISummaryGroupAdd: TMenuItem; - MISummaryGroupDelete: TMenuItem; - MenuItem5d: TMenuItem; - MISummaryGroupSelectAll: TMenuItem; - PMGroupSummaryItems: TPopupMenu; - MIGroupSummaryItemsAdd: TMenuItem; - MIGroupSummaryItemsDelete: TMenuItem; - MenuItem6c: TMenuItem; - MIGroupSummaryItemsSelectAll: TMenuItem; - Panel8: TPanel; - LBColumns: TListBox; - Panel9: TPanel; - Panel10: TPanel; - Panel13: TPanel; - Panel16: TPanel; - Panel17: TPanel; - Panel18: TPanel; - BColumnAddMissing: TcxButton; - procedure LBColumnsClick(Sender: TObject); - procedure BColumnAddClick(Sender: TObject); - procedure BColumnDeleteClick(Sender: TObject); - procedure BColumnRestoreClick(Sender: TObject); - procedure MIColumnSelectAllClick(Sender: TObject); - procedure LBFooterSummaryClick(Sender: TObject); - procedure BAddFooterSummaryItemClick(Sender: TObject); - procedure BDeleteFooterSummaryItemClick(Sender: TObject); - procedure LBDefaultGroupsSummaryClick(Sender: TObject); - procedure BDefaultGroupSummaryAddClick(Sender: TObject); - procedure BDefaultGroupSummaryDeleteClick(Sender: TObject); - procedure LBSummaryGroupsClick(Sender: TObject); - procedure BSummaryGroupAddClick(Sender: TObject); - procedure BSummaryGroupDeleteClick(Sender: TObject); - procedure LBGroupSummaryItemsClick(Sender: TObject); - procedure BGroupSummaryItemAddClick(Sender: TObject); - procedure BGroupSummaryItemDeleteClick(Sender: TObject); - procedure LBUnlinkedColumnsClick(Sender: TObject); - procedure BColumnLinkClick(Sender: TObject); - procedure BColumnUnlinkClick(Sender: TObject); - procedure BColumnAddAllClick(Sender: TObject); - procedure PLinksResize(Sender: TObject); - procedure PSummaryGroupsResize(Sender: TObject); - procedure LBColumnsDragOver(Sender, Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); - procedure LBColumnsEndDrag(Sender, Target: TObject; X, Y: Integer); - procedure LBColumnsStartDrag(Sender: TObject; - var DragObject: TDragObject); - procedure LBColumnsDragDrop(Sender, Source: TObject; X, Y: Integer); - procedure BColumnMoveUpClick(Sender: TObject); - procedure BColumnMoveDownClick(Sender: TObject); - procedure MIFooterSummarySelectAllClick(Sender: TObject); - procedure MIDefaultGroupSummarySelectAllClick(Sender: TObject); - procedure MISummaryGroupSelectAllClick(Sender: TObject); - procedure MIGroupSummaryItemsSelectAllClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure LBColumnsDrawItem(Control: TWinControl; Index: Integer; - Rect: TRect; State: TOwnerDrawState); - procedure BColumnAddMissingClick(Sender: TObject); - private - FColumnsPrevDragIndex: Integer; - FSummaryGroup: TcxDataSummaryGroup; - function GetDefaultGroupSummaryItems: TcxDataGroupSummaryItems; - function GetFooterSummaryItems: TcxDataFooterSummaryItems; - function GetSummaryGroups: TcxDataSummaryGroups; - function GetView: TcxCustomGridTableView; - procedure SetSummaryGroup(Value: TcxDataSummaryGroup); - - procedure ReindexColumnsProc(AList: TList; ANewIndex: Integer); - procedure UpdateSummaryGroupLinks; - procedure UpdateSummaryGroups; - protected - procedure CalculateListBoxItemHeight(AListBox: TListBox); - procedure CollectionItemsAdd(AListBox: TListBox; ACollection: TCollection); - procedure CollectionItemsDelete(AListBox: TListBox; ACollection: TCollection); - procedure DoCreateViewItems(AMissingItemsOnly: Boolean); - procedure DrawListBoxItem(AListBox: TWinControl; AIndex: Integer; R: TRect); - function GetCurrentGroup: TcxDataSummaryGroup; - function GetDeleteItemsCaption: string; virtual; - procedure SelectAllColumns; - procedure UpdateButtons; virtual; - procedure UpdateColumnList; virtual; - procedure UpdateEditor; override; - procedure UpdateSelection; override; - procedure UpdateSummary; - procedure UpdateSummarySelection; - property SummaryGroup: TcxDataSummaryGroup read FSummaryGroup write SetSummaryGroup; - public - class function GetViewByObject(APersistent: TPersistent): TcxCustomGridView; override; - property DefaultGroupSummaryItems: TcxDataGroupSummaryItems read GetDefaultGroupSummaryItems; - property FooterSummaryItems: TcxDataFooterSummaryItems read GetFooterSummaryItems; - property SummaryGroups: TcxDataSummaryGroups read GetSummaryGroups; - property View: TcxCustomGridTableView read GetView; - end; - - { TcxCustomGridTableViewStorage } - - TcxCustomGridTableViewStorage = class(TcxCustomGridViewStorage) - private - function GetNavigatorButtons: TcxNavigatorControlButtons; - protected - function CustomTableView: TcxCustomGridTableView; - public - class function GetViewClass: TcxCustomGridViewClass; override; - published - property NavigatorButtons: TcxNavigatorControlButtons read GetNavigatorButtons; - end; - - { TcxCustomGridViewMenuProvider } - - TcxCustomGridTableViewMenuProvider = class(TcxCustomGridViewMenuProvider) - private - function GetGridView: TcxCustomGridTableView; - function GetViewItemNameValue: string; - protected - function CanDeleteItems: Boolean; - procedure CreateAllItems(Sender: TcxGridViewMenuItem); - procedure CreateItem(Sender: TcxGridViewMenuItem); - procedure CreateMissingItems(Sender: TcxGridViewMenuItem); - procedure DeleteAllItems(Sender: TcxGridViewMenuItem); - procedure InitStructureCreationItems; virtual; - procedure InitStructureItems; override; - property ViewItemName: string read GetViewItemNameValue; - public - property GridView: TcxCustomGridTableView read GetGridView; - end; - -implementation - -uses - cxDesignWindows, dxCore; - -{$R *.dfm} - -function CheckInDataController(APersistent: TPersistent): TcxCustomGridView; -var - ADataController: TcxCustomDataController; - AIDataController: IcxCustomGridDataController; -begin - ADataController := nil; - if APersistent is TcxCustomDataSummaryItem then - ADataController := (APersistent as TcxCustomDataSummaryItem).DataController - else - if APersistent is TcxDataSummaryItems then - ADataController := (APersistent as TcxDataSummaryItems).DataController - else - if APersistent is TcxDataSummaryGroups then - ADataController := (APersistent as TcxDataSummaryGroups).Summary.DataController - else - if APersistent is TcxDataSummaryGroup then - ADataController := (APersistent as TcxDataSummaryGroup).SummaryGroups.Summary.DataController - else - if APersistent is TcxDataSummaryGroupItemLinks then - ADataController := - (APersistent as TcxDataSummaryGroupItemLinks).SummaryGroup.SummaryGroups.Summary.DataController; - if (ADataController <> nil) and Supports(ADataController, IcxCustomGridDataController) then - begin - Supports(TObject(ADataController), IcxCustomGridDataController, AIDataController); - Result := AIDataController.GridView; - end - else - Result := nil; -end; - -function GetViewItemName(AView: TcxCustomGridTableView): string; -var - I: Integer; -begin - Result := TcxCustomGridTableViewAccess.GetItemClass(AView).ClassName; - for I := Length(Result) downto 1 do - if dxCharInSet(Result[I], ['A'..'Z']) then - begin - Delete(Result, 1, I - 1); - Break; - end; -end; - -function CreateViewItem(AView: TcxCustomGridTableView): TcxCustomGridTableItem; -begin - Result := AView.CreateItem; - Result.Name := GetViewItemUniqueName(AView, Result, GetViewItemName(AView)); -end; - -procedure CreateViewItems(AView: TcxCustomGridView; AMissingItemsOnly: Boolean); -begin - (AView.DataController as IcxCustomGridDataController).CreateAllItems(AMissingItemsOnly); -end; - -{ TcxCustomGridTableViewStorage } - -function TcxCustomGridTableViewStorage.GetNavigatorButtons: TcxNavigatorControlButtons; -begin - Result := CustomTableView.NavigatorButtons; -end; - -function TcxCustomGridTableViewStorage.CustomTableView: TcxCustomGridTableView; -begin - Result := inherited View as TcxCustomGridTableView; -end; - -class function TcxCustomGridTableViewStorage.GetViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridTableView; -end; - -{ TcxCustomTableViewEditor } - -class function TcxCustomTableViewEditor.GetViewByObject(APersistent: TPersistent): TcxCustomGridView; -begin - // Items - if APersistent is TcxCustomGridTableItem then - Result := (APersistent as TcxCustomGridTableItem).GridView - else - // DataController - Result := CheckInDataController(APersistent); -end; - -procedure TcxCustomTableViewEditor.CalculateListBoxItemHeight(AListBox: TListBox); -begin - with AListBox do - begin - Canvas.Font := Font; - ItemHeight := 2 + Canvas.TextHeight('Qq'); - end; -end; - -procedure TcxCustomTableViewEditor.CollectionItemsAdd(AListBox: TListBox; - ACollection: TCollection); -var - AItem: TCollectionItem; -begin - ListBoxClearSelection(AListBox); - AItem := ACollection.Add; - ListBoxLoadCollection(AListBox, ACollection); - ListBoxSelectByObject(AListBox, AItem); - FormEditor.ListBoxApplySelection(AListBox, nil); - UpdateDesigner; -end; - -procedure TcxCustomTableViewEditor.CollectionItemsDelete(AListBox: TListBox; - ACollection: TCollection); -begin - if AListBox.SelCount > 0 then - begin - BeginUpdate; - try - View.BeginUpdate; - try - ListBoxDeleteSelection(AListBox, True); - ListBoxLoadCollection(AListBox, ACollection); - finally - View.EndUpdate; - end; - FormEditor.ListBoxApplySelection(AListBox, ACollection); - UpdateDesigner; - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomTableViewEditor.DoCreateViewItems(AMissingItemsOnly: Boolean); - - procedure GetViewItems(AItems: TList); - var - I: Integer; - begin - for I := 0 to View.ItemCount - 1 do - AItems.Add(View.Items[I]); - end; - - procedure GetViewNewItems(AOldItems, ANewItems: TList); - var - I, J: Integer; - begin - for I := 0 to View.ItemCount - 1 do - begin - J := AOldItems.IndexOf(View.Items[I]); - if J = -1 then - ANewItems.Add(View.Items[I]) - else - AOldItems.Delete(J); - end; - end; - -var - AItems: TList; -begin - AItems := TList.Create; - try - GetViewItems(AItems); - CreateViewItems(View, AMissingItemsOnly); - GetViewNewItems(AItems, AItems); - UpdateColumnList; - ListBoxSyncSelection(LBColumns, AItems); - LBColumnsClick(nil); - UpdateDesigner; - finally - AItems.Free; - end; -end; - -procedure TcxCustomTableViewEditor.DrawListBoxItem(AListBox: TWinControl; - AIndex: Integer; R: TRect); -begin - with AListBox as TListBox, Canvas do - begin - FillRect(R); - TextOut(R.Left + 2, R.Top, Items[AIndex]); - end; -end; - -function TcxCustomTableViewEditor.GetCurrentGroup: TcxDataSummaryGroup; - - function GetGroupByItems(ASummaryItems: TcxDataSummaryItems): TcxDataSummaryGroup; - var - I: Integer; - begin - Result := nil; - for I := 0 to SummaryGroups.Count - 1 do - if SummaryGroups[I].SummaryItems = ASummaryItems then - begin - Result := SummaryGroups[I]; - Break; - end; - end; - - function GetGroupByItemLinks(ASummaryGroupItemLinks: TcxDataSummaryGroupItemLinks): TcxDataSummaryGroup; - var - I: Integer; - begin - Result := nil; - for I := 0 to SummaryGroups.Count - 1 do - if SummaryGroups[I].Links = ASummaryGroupItemLinks then - begin - Result := SummaryGroups[I]; - Break; - end; - end; - - function GetSummaryGroup(APersistent: TPersistent): TcxDataSummaryGroup; - begin - if APersistent is TcxDataSummaryGroup then - Result := TcxDataSummaryGroup(APersistent) - else - if APersistent is TcxDataSummaryItem then - Result := GetGroupByItems(TcxDataSummaryItem(APersistent).SummaryItems) - else - if APersistent is TcxDataSummaryItems then - Result := GetGroupByItems(TcxDataSummaryItems(APersistent)) - else - if APersistent is TcxDataSummaryGroupItemLink then - Result := GetGroupByItemLinks(TcxDataSummaryGroupItemLink(APersistent).SummaryGroupItemLinks) - else - if APersistent is TcxDataSummaryGroupItemLinks then - Result := GetGroupByItemLinks(TcxDataSummaryGroupItemLinks(APersistent)) - else - Result := nil; - end; - -var - AList: TList; - I: Integer; - ASummaryGroup: TcxDataSummaryGroup; -begin - Result := nil; - AList := TList.Create; - try - GetSelectionList(AList); - for I := 0 to AList.Count - 1 do - begin - ASummaryGroup := GetSummaryGroup(TPersistent(AList[I])); - if (ASummaryGroup <> nil) and (GetViewByObject(ASummaryGroup) = View) then - if Result = nil then - Result := ASummaryGroup - else - if Result <> ASummaryGroup then - begin - Result := nil; - Break; - end; - end; - finally - AList.Free; - end; -end; - -function TcxCustomTableViewEditor.GetDeleteItemsCaption: string; -begin - Result := Format('Delete existing %ss?', [LowerCase(GetViewItemName(View))]); -end; - -procedure TcxCustomTableViewEditor.SelectAllColumns; -begin - ListBoxSelectAll(LBColumns); -end; - -procedure TcxCustomTableViewEditor.UpdateButtons; -begin - // Columns - BColumnAdd.Enabled := CanAddComponent; - BColumnDelete.Enabled := CanDeleteComponent(nil) and (LBColumns.SelCount > 0); - BColumnRestore.Enabled := LBColumns.SelCount > 0; - BColumnMoveUp.Enabled := LBColumns.SelCount > 0; - BColumnMoveDown.Enabled := LBColumns.SelCount > 0; - BColumnAddAll.Enabled := CanAddComponent and - (View.DataController as IcxCustomGridDataController).IsDataLinked; - BColumnAddMissing.Enabled := BColumnAddAll.Enabled and - not (View.DataController as IcxCustomGridDataController).HasAllItems; - - MIColumnAdd.Enabled := BColumnAdd.Enabled; - MIColumnDelete.Enabled := BColumnDelete.Enabled; - MIColumnRestore.Enabled := BColumnRestore.Enabled; - MIColumnMoveUp.Enabled := BColumnMoveUp.Enabled; - MIColumnMoveDown.Enabled := BColumnMoveDown.Enabled; - MIColumnSelectAll.Enabled := LBColumns.SelCount < LBColumns.Items.Count; - - // Summary - BAddFooterSummaryItem.Enabled := CanAddComponent; - BDeleteFooterSummaryItem.Enabled := CanDeleteComponent(nil) and (LBFooterSummary.SelCount > 0); - - BDefaultGroupSummaryAdd.Enabled := CanAddComponent; - BDefaultGroupSummaryDelete.Enabled := CanDeleteComponent(nil) and (LBDefaultGroupsSummary.SelCount > 0); - - BSummaryGroupAdd.Enabled := CanAddComponent; - BSummaryGroupDelete.Enabled := CanDeleteComponent(nil) and (LBSummaryGroups.SelCount > 0); - BGroupSummaryItemAdd.Enabled := CanAddComponent and (GetCurrentGroup <> nil); - BGroupSummaryItemDelete.Enabled := CanDeleteComponent(nil) and (LBGroupSummaryItems.SelCount > 0); - BColumnLink.Enabled := CanAddComponent and (LBUnlinkedColumns.SelCount > 0); - BColumnUnlink.Enabled := CanDeleteComponent(nil) and (LBLinkedColumns.SelCount > 0); - - MIFooterSummaryAdd.Enabled := BAddFooterSummaryItem.Enabled; - MIFooterSummaryDelete.Enabled := BDeleteFooterSummaryItem.Enabled; - MIFooterSummarySelectAll.Enabled := LBFooterSummary.SelCount < LBFooterSummary.Items.Count; - - MIDefaultGroupSummaryAdd.Enabled := BDefaultGroupSummaryAdd.Enabled; - MIDefaultGroupSummaryDelete.Enabled := BDefaultGroupSummaryDelete.Enabled; - MIDefaultGroupSummarySelectAll.Enabled := LBDefaultGroupsSummary.SelCount < LBDefaultGroupsSummary.Items.Count; - - MISummaryGroupAdd.Enabled := BSummaryGroupAdd.Enabled; - MISummaryGroupDelete.Enabled := BSummaryGroupDelete.Enabled; - MISummaryGroupSelectAll.Enabled := LBSummaryGroups.SelCount < LBSummaryGroups.Items.Count; - - MIGroupSummaryItemsAdd.Enabled := BGroupSummaryItemAdd.Enabled; - MIGroupSummaryItemsDelete.Enabled := BGroupSummaryItemDelete.Enabled; - MIGroupSummaryItemsSelectAll.Enabled := LBGroupSummaryItems.SelCount < LBGroupSummaryItems.Items.Count; -end; - -procedure TcxCustomTableViewEditor.UpdateColumnList; -var - I, AItemIndex, ATopIndex: Integer; - ASelection: TStringList; - S: string; -begin - ListBoxSaveSelection(LBColumns, ASelection, AItemIndex, ATopIndex); - try - LBColumns.Items.Clear; - for I := 0 to View.ItemCount - 1 do - begin - S := View.Items[I].Name; - if View.Items[I].RepositoryItem <> nil then - S := S + ' (' + View.Items[I].RepositoryItem.Name + ')'; // TODO: description - LBColumns.Items.AddObject(S, View.Items[I]); - end; - finally - ListBoxRestoreSelection(LBColumns, ASelection, AItemIndex, ATopIndex); - end; -end; - -procedure TcxCustomTableViewEditor.UpdateEditor; -begin - BColumnAddAll.Visible := - (View.DataController as IcxCustomGridDataController).SupportsCreateAllItems; - BColumnAddMissing.Visible := BColumnAddAll.Visible; - UpdateColumnList; - UpdateSummary; -end; - -procedure TcxCustomTableViewEditor.UpdateSelection; -begin - FormEditor.ListBoxSynchronizeSelection(LBColumns); - UpdateSummarySelection; - UpdateButtons; -end; - -procedure TcxCustomTableViewEditor.UpdateSummary; -begin - ListBoxLoadCollection(LBFooterSummary, FooterSummaryItems); - ListBoxLoadCollection(LBDefaultGroupsSummary, DefaultGroupSummaryItems); - ListBoxLoadCollection(LBSummaryGroups, SummaryGroups); - UpdateSummaryGroups; -end; - -procedure TcxCustomTableViewEditor.UpdateSummarySelection; -var - AList: TList; -begin - AList := TList.Create; - try - FormEditor.GetSelectionList(AList); - ListBoxSyncSelection(LBFooterSummary, AList); - ListBoxSyncSelection(LBDefaultGroupsSummary, AList); - ListBoxSyncSelection(LBSummaryGroups, AList); - ListBoxSelectByObject(LBSummaryGroups, GetCurrentGroup); - SummaryGroup := GetCurrentGroup; - ListBoxSyncSelection(LBGroupSummaryItems, AList); - finally - AList.Free; - end; -end; - -function TcxCustomTableViewEditor.GetDefaultGroupSummaryItems: TcxDataGroupSummaryItems; -begin - Result := View.DataController.Summary.DefaultGroupSummaryItems; -end; - -function TcxCustomTableViewEditor.GetFooterSummaryItems: TcxDataFooterSummaryItems; -begin - Result := View.DataController.Summary.FooterSummaryItems; -end; - -function TcxCustomTableViewEditor.GetSummaryGroups: TcxDataSummaryGroups; -begin - Result := View.DataController.Summary.SummaryGroups; -end; - -function TcxCustomTableViewEditor.GetView: TcxCustomGridTableView; -begin - Result := inherited View as TcxCustomGridTableView; -end; - -procedure TcxCustomTableViewEditor.SetSummaryGroup(Value: TcxDataSummaryGroup); -begin - if FSummaryGroup <> Value then - begin - FSummaryGroup := Value; - UpdateSummaryGroups; - end; -end; - -procedure TcxCustomTableViewEditor.ReindexColumnsProc(AList: TList; ANewIndex: Integer); -var - I: Integer; -begin - if AList.Count = 0 then Exit; - if TcxCustomGridTableItem(AList[0]).Index < ANewIndex then - begin - for I := 0 to AList.Count - 1 do - TcxCustomGridTableItem(AList[I]).Index := ANewIndex; - end - else - begin - for I := AList.Count - 1 downto 0 do - TcxCustomGridTableItem(AList[I]).Index := ANewIndex; - end; - UpdateDesigner; -end; - -procedure TcxCustomTableViewEditor.UpdateSummaryGroupLinks; -var - ACurrentGroup: TcxDataSummaryGroup; - I: Integer; - AItemLink: TObject; - ADataController: TcxCustomDataController; - AItemIndex1, ATopIndex1, AItemIndex2, ATopIndex2: Integer; - ASelection1, ASelection2: TStringList; -begin - ACurrentGroup := GetCurrentGroup; - ListBoxSaveSelection(LBUnlinkedColumns, ASelection1, AItemIndex1, ATopIndex1); - ListBoxSaveSelection(LBLinkedColumns, ASelection2, AItemIndex2, ATopIndex2); - try - LBUnlinkedColumns.Items.Clear; - LBLinkedColumns.Items.Clear; - if ACurrentGroup <> nil then - begin - for I := 0 to ACurrentGroup.Links.Count - 1 do - begin - AItemLink := ACurrentGroup.Links[I].ItemLink; - if AItemLink is TComponent then - LBLinkedColumns.Items.AddObject((AItemLink as TComponent).Name, AItemLink); - end; - ADataController := ACurrentGroup.SummaryGroups.Summary.DataController; - for I := 0 to ADataController.ItemCount - 1 do - begin - AItemLink := ADataController.GetItem(I); - if LBLinkedColumns.Items.IndexOfObject(AItemLink) = -1 then - LBUnlinkedColumns.Items.AddObject((AItemLink as TComponent).Name, AItemLink); - end; - end; - finally - ListBoxRestoreSelection(LBUnlinkedColumns, ASelection1, AItemIndex1, ATopIndex1); - ListBoxRestoreSelection(LBLinkedColumns, ASelection2, AItemIndex2, ATopIndex2); - end; -end; - -procedure TcxCustomTableViewEditor.UpdateSummaryGroups; -var - ACurrentGroup: TcxDataSummaryGroup; -begin - ACurrentGroup := GetCurrentGroup; - if ACurrentGroup <> nil then - ListBoxLoadCollection(LBGroupSummaryItems, ACurrentGroup.SummaryItems) - else - LBGroupSummaryItems.Items.Clear; - UpdateSummaryGroupLinks; -end; - -// Columns - -procedure TcxCustomTableViewEditor.LBColumnsClick(Sender: TObject); -begin - FormEditor.ListBoxApplySelection(LBColumns, View); -end; - -procedure TcxCustomTableViewEditor.BColumnAddClick(Sender: TObject); -var - AItem: TcxCustomGridTableItem; -begin - ListBoxClearSelection(LBColumns); - AItem := CreateViewItem(View); - UpdateColumnList; - ListBoxSelectByObject(LBColumns, AItem); - LBColumnsClick(nil); - UpdateDesigner; -end; - -procedure TcxCustomTableViewEditor.BColumnAddMissingClick(Sender: TObject); -begin - DoCreateViewItems(True); -end; - -procedure TcxCustomTableViewEditor.BColumnDeleteClick(Sender: TObject); -begin - if LBColumns.SelCount > 0 then - begin - BeginUpdate; - try - ListBoxDeleteSelection(LBColumns, True); - UpdateColumnList; - LBColumnsClick(nil); - UpdateDesigner; - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomTableViewEditor.BColumnRestoreClick(Sender: TObject); -var - I: Integer; -begin - if LBColumns.SelCount > 0 then - try - for I := 0 to LBColumns.Items.Count - 1 do - if LBColumns.Selected[I] then - TcxCustomGridTableItem(LBColumns.Items.Objects[I]).RestoreDefaults; - finally - UpdateColumnList; - LBColumnsClick(nil); - UpdateDesigner; - end; -end; - -procedure TcxCustomTableViewEditor.BColumnMoveUpClick(Sender: TObject); -begin - FColumnsPrevDragIndex := -1; - ListBoxMoveUpItems(LBColumns, FColumnsPrevDragIndex, ReindexColumnsProc); -end; - -procedure TcxCustomTableViewEditor.BColumnMoveDownClick(Sender: TObject); -begin - FColumnsPrevDragIndex := -1; - ListBoxMoveDownItems(LBColumns, FColumnsPrevDragIndex, ReindexColumnsProc); -end; - -procedure TcxCustomTableViewEditor.BColumnAddAllClick(Sender: TObject); -begin - if View.ItemCount > 0 then - case Application.MessageBox(PChar(GetDeleteItemsCaption), - 'Confirm', MB_YESNOCANCEL) of - IDYES: - View.ClearItems; - IDCANCEL: - Exit; - end; - DoCreateViewItems(False); -end; - -procedure TcxCustomTableViewEditor.MIColumnSelectAllClick(Sender: TObject); -begin - SelectAllColumns; - LBColumnsClick(nil); -end; - -// Summary - Footer - -procedure TcxCustomTableViewEditor.LBFooterSummaryClick(Sender: TObject); -begin - FormEditor.ListBoxApplySelection(LBFooterSummary, FooterSummaryItems); -end; - -procedure TcxCustomTableViewEditor.BAddFooterSummaryItemClick( - Sender: TObject); -begin - CollectionItemsAdd(LBFooterSummary, FooterSummaryItems); -end; - -procedure TcxCustomTableViewEditor.BDeleteFooterSummaryItemClick( - Sender: TObject); -begin - CollectionItemsDelete(LBFooterSummary, FooterSummaryItems); -end; - -// Summary - Default Group - -procedure TcxCustomTableViewEditor.LBDefaultGroupsSummaryClick( - Sender: TObject); -begin - FormEditor.ListBoxApplySelection(LBDefaultGroupsSummary, DefaultGroupSummaryItems); -end; - -procedure TcxCustomTableViewEditor.BDefaultGroupSummaryAddClick(Sender: TObject); -begin - CollectionItemsAdd(LBDefaultGroupsSummary, DefaultGroupSummaryItems); -end; - -procedure TcxCustomTableViewEditor.BDefaultGroupSummaryDeleteClick( - Sender: TObject); -begin - CollectionItemsDelete(LBDefaultGroupsSummary, DefaultGroupSummaryItems); -end; - -// Summary - Groups - -procedure TcxCustomTableViewEditor.LBSummaryGroupsClick(Sender: TObject); -begin - FormEditor.ListBoxApplySelection(LBSummaryGroups, SummaryGroups); -end; - -procedure TcxCustomTableViewEditor.BSummaryGroupAddClick(Sender: TObject); -begin - CollectionItemsAdd(LBSummaryGroups, SummaryGroups); -end; - -procedure TcxCustomTableViewEditor.BSummaryGroupDeleteClick( - Sender: TObject); -begin - CollectionItemsDelete(LBSummaryGroups, SummaryGroups); -end; - -// Summary - Selected Group - -procedure TcxCustomTableViewEditor.LBGroupSummaryItemsClick( - Sender: TObject); -begin - if GetCurrentGroup <> nil then - FormEditor.ListBoxApplySelection(LBGroupSummaryItems, GetCurrentGroup.SummaryItems); -end; - -procedure TcxCustomTableViewEditor.BGroupSummaryItemAddClick( - Sender: TObject); -begin - if GetCurrentGroup <> nil then - CollectionItemsAdd(LBGroupSummaryItems, GetCurrentGroup.SummaryItems); -end; - -procedure TcxCustomTableViewEditor.BGroupSummaryItemDeleteClick( - Sender: TObject); -begin - if GetCurrentGroup <> nil then - CollectionItemsDelete(LBGroupSummaryItems, GetCurrentGroup.SummaryItems); -end; - -procedure TcxCustomTableViewEditor.LBUnlinkedColumnsClick(Sender: TObject); -begin - UpdateButtons; -end; - -procedure TcxCustomTableViewEditor.BColumnLinkClick(Sender: TObject); -var - ACurrentGroup: TcxDataSummaryGroup; - I: Integer; - AGroupItemLink: TcxDataSummaryGroupItemLink; -begin - BeginUpdate; - try - ACurrentGroup := GetCurrentGroup; - for I := 0 to LBUnlinkedColumns.Items.Count - 1 do - if LBUnlinkedColumns.Selected[I] then - begin - AGroupItemLink := ACurrentGroup.Links.Add; - AGroupItemLink.ItemLink := LBUnlinkedColumns.Items.Objects[I]; - end; - UpdateSummaryGroupLinks; - UpdateDesigner; - finally - EndUpdate; - end; -end; - -procedure TcxCustomTableViewEditor.BColumnUnlinkClick(Sender: TObject); -var - ACurrentGroup: TcxDataSummaryGroup; - I: Integer; - AGroupItemLink: TcxDataSummaryGroupItemLink; -begin - BeginUpdate; - try - ACurrentGroup := GetCurrentGroup; - for I := LBLinkedColumns.Items.Count - 1 downto 0 do - if LBLinkedColumns.Selected[I] then - begin - AGroupItemLink := ACurrentGroup.Links.ItemOfItemLink(LBLinkedColumns.Items.Objects[I]); - AGroupItemLink.Free; - end; - UpdateSummaryGroupLinks; - UpdateDesigner; - finally - EndUpdate; - end; -end; - -procedure TcxCustomTableViewEditor.PLinksResize(Sender: TObject); -var - W: Integer; -begin - W := (PLinks.Width - PLinkUnlink.Width) div 2; - PUnlinkedColumns.Width := W; - PLinkedColumns.Width := W; -end; - -procedure TcxCustomTableViewEditor.PSummaryGroupsResize(Sender: TObject); -var - W: Integer; -begin - // Groups - W := (PSummaryGroups.Width - PGSeparator.Width) div 2; - PGroups.Width := W; - PGroupItems.Width := W; -end; - -// Drag Drop Columns - -procedure TcxCustomTableViewEditor.LBColumnsStartDrag(Sender: TObject; - var DragObject: TDragObject); -begin - FColumnsPrevDragIndex := -1; -end; - -procedure TcxCustomTableViewEditor.LBColumnsDragOver(Sender, - Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); -begin - ListBoxDragOver(LBColumns, Sender, Source, X, Y, State, Accept, FColumnsPrevDragIndex); -end; - -procedure TcxCustomTableViewEditor.LBColumnsEndDrag(Sender, - Target: TObject; X, Y: Integer); -begin - ListBoxEndDrag(LBColumns, Sender, Target, X, Y, FColumnsPrevDragIndex); -end; - -procedure TcxCustomTableViewEditor.LBColumnsDragDrop(Sender, - Source: TObject; X, Y: Integer); -begin - ListBoxDragDrop(LBColumns, Sender, Source, X, Y, FColumnsPrevDragIndex, ReindexColumnsProc); -end; - -// Summary: Select All - -procedure TcxCustomTableViewEditor.MIFooterSummarySelectAllClick( - Sender: TObject); -begin - ListBoxSelectAll(LBFooterSummary); - LBFooterSummaryClick(nil); -end; - -procedure TcxCustomTableViewEditor.MIDefaultGroupSummarySelectAllClick( - Sender: TObject); -begin - ListBoxSelectAll(LBDefaultGroupsSummary); - LBDefaultGroupsSummaryClick(nil); -end; - -procedure TcxCustomTableViewEditor.MISummaryGroupSelectAllClick( - Sender: TObject); -begin - ListBoxSelectAll(LBSummaryGroups); - LBSummaryGroupsClick(nil); -end; - -procedure TcxCustomTableViewEditor.MIGroupSummaryItemsSelectAllClick( - Sender: TObject); -begin - ListBoxSelectAll(LBGroupSummaryItems); - LBGroupSummaryItemsClick(nil); -end; - -procedure TcxCustomTableViewEditor.FormCreate(Sender: TObject); -begin - inherited; - CalculateListBoxItemHeight(LBColumns); -end; - -procedure TcxCustomTableViewEditor.LBColumnsDrawItem(Control: TWinControl; - Index: Integer; Rect: TRect; State: TOwnerDrawState); -begin - DrawListBoxItem(Control, Index, Rect); -end; - -{ TcxCustomGridTableViewMenuProvider } - -function TcxCustomGridTableViewMenuProvider.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -function TcxCustomGridTableViewMenuProvider.GetViewItemNameValue: string; -begin - Result := GetViewItemName(GridView); -end; - -function TcxCustomGridTableViewMenuProvider.CanDeleteItems: Boolean; -var - I: Integer; -begin - Result := GridView.ItemCount <> 0; - if Result then - for I := 0 to GridView.ItemCount - 1 do - begin - Result := CanDeleteComponent(GridView.Items[I].Owner, GridView.Items[I]); - if not Result then Break; - end; -end; - -procedure TcxCustomGridTableViewMenuProvider.CreateAllItems(Sender: TcxGridViewMenuItem); -begin - CreateViewItems(GridView, False); - DesignerModified; -end; - -procedure TcxCustomGridTableViewMenuProvider.CreateItem(Sender: TcxGridViewMenuItem); -begin - ObjectCreated(CreateViewItem(GridView)); -end; - -procedure TcxCustomGridTableViewMenuProvider.CreateMissingItems(Sender: TcxGridViewMenuItem); -begin - CreateViewItems(GridView, True); - DesignerModified; -end; - -procedure TcxCustomGridTableViewMenuProvider.DeleteAllItems(Sender: TcxGridViewMenuItem); -begin - (GridView.DataController as IcxCustomGridDataController).DeleteAllItems; - DesignerModified; -end; - -procedure TcxCustomGridTableViewMenuProvider.InitStructureCreationItems; -begin - if (GridView.DataController as IcxCustomGridDataController).SupportsCreateAllItems then - if (GridView.DataController as IcxCustomGridDataController).IsDataLinked then - begin - Items.AddItem(Format('Create All %ss', [ViewItemName]), CreateAllItems, - CanAddComponent(GridView.Owner)); - Items.AddItem(Format('Create Missing %ss', [ViewItemName]), CreateMissingItems, - CanAddComponent(GridView.Owner) and not (GridView.DataController as IcxCustomGridDataController).HasAllItems); - end - else - Items.AddItem('(no data linked)', nil, False); - Items.AddItem(Format('Create %s', [ViewItemName]), CreateItem, CanAddComponent(GridView.Owner)); -end; - -procedure TcxCustomGridTableViewMenuProvider.InitStructureItems; -begin - InitStructureCreationItems; - Items.AddSeparator; - if (GridView.DataController as IcxCustomGridDataController).SupportsCreateAllItems then - Items.AddItem(Format('Delete All %ss', [ViewItemName]), DeleteAllItems, CanDeleteItems); - inherited; -end; - -initialization - RegisterViewEditorClass(TcxCustomGridTableView, TcxCustomTableViewEditor); - RegisterViewMenuProviderClass(TcxCustomGridTableView, TcxCustomGridTableViewMenuProvider); - -finalization - UnregisterViewMenuProviderClass(TcxCustomGridTableView, TcxCustomGridTableViewMenuProvider); - UnregisterViewEditorClass(TcxCustomGridTableView, TcxCustomTableViewEditor); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxDBExtLookupComboBox.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxDBExtLookupComboBox.pas deleted file mode 100644 index 2920e9a8..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxDBExtLookupComboBox.pas +++ /dev/null @@ -1,968 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxDBExtLookupComboBox; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, DB, Graphics, Messages, SysUtils, cxClasses, - cxContainer, cxControls, cxCustomData, cxDB, cxDBData, cxDBEdit, - cxDBLookupEdit, cxEditConsts, cxGrid, cxGridCustomTableView, cxEdit, - cxGridCustomView, cxGridStrs, cxGridTableView, cxLookAndFeels, cxLookupEdit; - -type - { TcxExtLookupGrid } - - TcxExtLookupGrid = class(TcxGrid) - private - FEditable: Boolean; - FMousePos: TPoint; - FPopupMouseMoveLocked: Boolean; - FPrevOnKeyDown: TKeyEvent; - FPrevOnMouseDown: TMouseEvent; - FPrevOnMouseMove: TMouseMoveEvent; - FPrevOnMouseUp: TMouseEvent; - FRowPressed: Boolean; - FOnCloseUp: TcxLookupGridCloseUpEvent; - function GetView: TcxCustomGridTableView; - procedure ViewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure ViewMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - procedure ViewMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); - procedure ViewMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - protected - procedure DoCancelMode; override; - procedure DoCloseUp(AAccept: Boolean); virtual; - function IsDataRow(AHitTest: TcxCustomGridHitTest): Boolean; - property Editable: Boolean read FEditable write FEditable; - property PopupMouseMoveLocked: Boolean read FPopupMouseMoveLocked write FPopupMouseMoveLocked; - property OnCloseUp: TcxLookupGridCloseUpEvent read FOnCloseUp write FOnCloseUp; - public - property View: TcxCustomGridTableView read GetView; - end; - - { TcxCustomExtLookupComboBoxProperties } - - TcxCustomExtLookupComboBoxProperties = class(TcxCustomDBLookupEditProperties); - - { TcxExtLookupComboBoxProperties } - - TcxExtLookupComboBoxProperties = class(TcxCustomExtLookupComboBoxProperties) - private - FAutoSearchOnPopup: Boolean; - FDestroying: Boolean; - FFocusPopup: Boolean; - FGrid: TcxExtLookupGrid; - FInCheckListFieldItem: Boolean; - FListFieldItem: TcxCustomGridTableItem; - FPrevColumnFiltering: Boolean; - FPrevPullFocusing: Boolean; - FPrevImmediateEditor: Boolean; - FPrevIncSearch: Boolean; - FPrevMultiSelect: Boolean; - FView: TcxCustomGridTableView; - function GetGrid: TcxExtLookupGrid; - function GetGridMode: Boolean; - function GetListFieldIndex: Integer; - function GetListFieldItem: TcxCustomGridTableItem; - procedure SetGridMode(Value: Boolean); - procedure SetListFieldItem(Value: TcxCustomGridTableItem); - procedure SetView(Value: TcxCustomGridTableView); - protected - procedure CheckListFieldItem; - procedure DeinitializeDataController; override; - procedure FreeNotification(Sender: TComponent); override; - function GetIncrementalFiltering: Boolean; override; - function GetListIndex: Integer; override; - procedure InitializeDataController; override; - procedure LinkView(AView: TcxCustomGridTableView); - function PopupWindowCapturesFocus: Boolean; override; - procedure UnlinkView(AView: TcxCustomGridTableView); - // LookupGrid methods - function GetLookupGridActiveControl: TWinControl; override; - function GetLookupGridCanResize: Boolean; override; - function GetLookupGridColumnCount: Integer; override; - function GetLookupGridControl: TWinControl; override; - function GetLookupGridDataController: TcxCustomDataController; override; - function GetLookupGridVisualAreaPreferredWidth: Integer; override; - function GetLookupGridNearestPopupHeight(AHeight: Integer): Integer; override; - function GetLookupGridPopupHeight(ADropDownRowCount: Integer): Integer; override; - function IsLookupGridMouseOverList(const P: TPoint): Boolean; override; - procedure LookupGridDeinitialize; override; - procedure LookupGridDroppedDown(const AFindStr: string); override; - procedure LookupGridInitEvents(AOnClick, AOnFocusedRowChanged: TNotifyEvent; - AOnCloseUp: TcxLookupGridCloseUpEvent); override; - procedure LookupGridInitialize; override; - procedure LookupGridInitLookAndFeel(ALookAndFeel: TcxLookAndFeel; - AColor: TColor; AFont: TFont); override; - procedure LookupGridLockMouseMove; override; - procedure LookupGridMakeFocusedRowVisible; override; - procedure LookupGridUnlockMouseMove; override; - // DBLookupGrid methods - procedure DBLookupGridBeginUpdate; override; - procedure DBLookupGridCheckColumnByFieldName(const AFieldName: string); override; - procedure DBLookupGridCreateColumnsByFieldNames(const AFieldNames: string); override; - procedure DBLookupGridEndUpdate; override; - function GetDBLookupGridColumnField(AIndex: Integer): TField; override; - function GetDBLookupGridColumnFieldName(AIndex: Integer): string; override; - function GetDBLookupGridColumnIndexByFieldName(const AFieldName: string): Integer; override; - function GetDBLookupGridDataController: TcxDBDataController; override; - public - constructor Create(AOwner: TPersistent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - class function GetContainerClass: TcxContainerClass; override; - class function IsViewSupported(Value: TcxCustomGridTableView): Boolean; - property Grid: TcxExtLookupGrid read GetGrid; - property ListFieldIndex: Integer read GetListFieldIndex; - published - property Alignment; - property AssignedValues; - property AutoSearchOnPopup: Boolean read FAutoSearchOnPopup write FAutoSearchOnPopup default True; - property AutoSelect; - property ButtonGlyph; - property CaseSensitiveSearch; - property CharCase; - property ClearKey; - property DropDownAutoSize; - property DropDownHeight; - property DropDownListStyle; - property DropDownRows; - property DropDownSizeable; - property DropDownWidth; - property FocusPopup: Boolean read FFocusPopup write FFocusPopup default False; - property GridMode: Boolean read GetGridMode write SetGridMode default False; - property HideSelection; - property ImeMode; - property ImeName; - property ImmediateDropDown; - property ImmediatePost; - property IncrementalFiltering; - property View: TcxCustomGridTableView read FView write SetView; // before - property KeyFieldNames; - property ListFieldItem: TcxCustomGridTableItem read GetListFieldItem write SetListFieldItem; - property MaxLength; - property OEMConvert; - property PopupAlignment; - property PostPopupValueOnTab; - property ReadOnly; - property Revertable; - property UseLeftAlignmentOnEditing; - property ValidateOnEnter; - property OnChange; - property OnCloseUp; - property OnEditValueChanged; - property OnInitPopup; - property OnNewLookupDisplayText; - property OnPopup; - property OnValidate; - end; - - { TcxCustomExtLookupComboBox } - - TcxCustomExtLookupComboBox = class(TcxCustomDBLookupEdit) - private - function GetActiveProperties: TcxExtLookupComboBoxProperties; - function GetProperties: TcxExtLookupComboBoxProperties; - procedure SetProperties(Value: TcxExtLookupComboBoxProperties); - protected - function CanDropDown: Boolean; override; - public - class function GetPropertiesClass: TcxCustomEditPropertiesClass; override; - property ActiveProperties: TcxExtLookupComboBoxProperties - read GetActiveProperties; - property EditValue; - property Properties: TcxExtLookupComboBoxProperties read GetProperties - write SetProperties; - property Text; - end; - - { TcxExtLookupComboBox } - - TcxExtLookupComboBox = class(TcxCustomExtLookupComboBox) - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties; - property EditValue; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnEditing; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - end; - - { TcxDBExtLookupComboBox } - - TcxDBExtLookupComboBox = class(TcxCustomExtLookupComboBox) - private - function GetDataBinding: TcxDBTextEditDataBinding; - procedure SetDataBinding(Value: TcxDBTextEditDataBinding); - procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK; - protected - class function GetDataBindingClass: TcxEditDataBindingClass; override; - published - property Anchors; - property AutoSize; - property BeepOnEnter; - property Constraints; - property DragCursor; - property DragKind; - property DataBinding: TcxDBTextEditDataBinding read GetDataBinding - write SetDataBinding; - property DragMode; - property Enabled; - property ImeMode; - property ImeName; - property ParentColor; - property ParentFont; - property ParentShowHint; - property PopupMenu; - property Properties; - property ShowHint; - property Style; - property StyleDisabled; - property StyleFocused; - property StyleHot; - property TabOrder; - property TabStop; - property Visible; - property OnClick; - property OnContextPopup; - property OnDblClick; - property OnEditing; - property OnEnter; - property OnExit; - property OnKeyDown; - property OnKeyPress; - property OnKeyUp; - property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - end; - - { TcxEditRepositoryExtLookupComboBoxItem } - - TcxEditRepositoryExtLookupComboBoxItem = class(TcxEditRepositoryItem) - private - function GetProperties: TcxExtLookupComboBoxProperties; - procedure SetProperties(Value: TcxExtLookupComboBoxProperties); - public - class function GetEditPropertiesClass: TcxCustomEditPropertiesClass; override; - published - property Properties: TcxExtLookupComboBoxProperties read GetProperties write SetProperties; - end; - -implementation - -uses - cxGridFilterHelpers; - -type - TcxCustomGridTableOptionsBehaviorAccess = class(TcxCustomGridTableOptionsBehavior); - TcxCustomGridTableOptionsViewAccess = class(TcxCustomGridTableOptionsView); - -{ TcxExtLookupGrid } - -procedure TcxExtLookupGrid.DoCancelMode; -begin - FRowPressed := False; - inherited; -end; - -procedure TcxExtLookupGrid.DoCloseUp(AAccept: Boolean); -begin - if AAccept then - View.DataController.SyncSelected(True); - if Assigned(FOnCloseUp) then FOnCloseUp(Self, AAccept); -end; - -function TcxExtLookupGrid.IsDataRow(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := (AHitTest is TcxGridRecordHitTest) and - TcxGridRecordHitTest(AHitTest).GridRecord.IsData; -end; - -function TcxExtLookupGrid.GetView: TcxCustomGridTableView; -begin - Result := Levels[0].GridView as TcxCustomGridTableView; -end; - -procedure TcxExtLookupGrid.ViewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); -begin - if Assigned(FPrevOnKeyDown) then - FPrevOnKeyDown(Self, Key, Shift); - if (View = nil) then Exit; - case Key of - VK_RETURN: - if not Editable or not View.OptionsData.Editing or (ssCtrl in Shift) then - begin - if View.DataController.IsEditing then - View.DataController.Post; - DoCloseUp(View.DataController.FocusedRowIndex <> -1); - end; - VK_ESCAPE: - if Editable and not View.DataController.IsEditing then - DoCloseUp(False); - end; -end; - -procedure TcxExtLookupGrid.ViewMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; -begin - if Assigned(FPrevOnMouseDown) then - FPrevOnMouseDown(Sender, Button, Shift, X, Y); - AHitTest := View.ViewInfo.GetHitTest(X, Y); - if (Button = mbLeft) and IsDataRow(AHitTest) then - begin - if Editable then - begin - if ssDouble in Shift then - DoCloseUp(True); - end - else - FRowPressed := True; - end; -end; - -procedure TcxExtLookupGrid.ViewMouseMove(Sender: TObject; Shift: TShiftState; - X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; -begin - if Assigned(FPrevOnMouseMove) then - FPrevOnMouseMove(Sender, Shift, X, Y); - if not MouseCapture and PopupMouseMoveLocked then - begin - PopupMouseMoveLocked := False; - Exit; - end; - // Hot Track - if (View = nil) or Editable then Exit; - AHitTest := View.ViewInfo.GetHitTest(X, Y); - if IsDataRow(AHitTest) and ((FMousePos.X <> X) or (FMousePos.Y <> Y)) then - begin - FMousePos.X := X; - FMousePos.Y := Y; - TcxGridRecordHitTest(AHitTest).GridRecord.Focused := True; - end; -end; - -procedure TcxExtLookupGrid.ViewMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; -begin - if Assigned(FPrevOnMouseUp) then - FPrevOnMouseUp(Sender, Button, Shift, X, Y); - AHitTest := View.ViewInfo.GetHitTest(X, Y); - if (Button = mbLeft) and FRowPressed then - DoCloseUp(IsDataRow(AHitTest)); - FRowPressed := False; -end; - -{ TcxExtLookupComboBoxProperties } - -constructor TcxExtLookupComboBoxProperties.Create(AOwner: TPersistent); -begin - inherited Create(AOwner); - FAutoSearchOnPopup := True; -end; - -destructor TcxExtLookupComboBoxProperties.Destroy; -begin - FDestroying := True; - ListFieldItem := nil; - View := nil; - FreeAndNil(FGrid); - inherited Destroy; -end; - -procedure TcxExtLookupComboBoxProperties.Assign(Source: TPersistent); -begin - if Source is TcxExtLookupComboBoxProperties then - begin - BeginUpdate; - try - AutoSearchOnPopup := TcxExtLookupComboBoxProperties(Source).AutoSearchOnPopup; - FocusPopup := TcxExtLookupComboBoxProperties(Source).FocusPopup; - View := nil; //? - GridMode := TcxExtLookupComboBoxProperties(Source).GridMode; - View := TcxExtLookupComboBoxProperties(Source).View; - inherited Assign(Source); - ListFieldItem := TcxExtLookupComboBoxProperties(Source).ListFieldItem; - finally - EndUpdate; - end - end - else - inherited Assign(Source); -end; - -class function TcxExtLookupComboBoxProperties.GetContainerClass: TcxContainerClass; -begin - Result := TcxExtLookupComboBox; -end; - -class function TcxExtLookupComboBoxProperties.IsViewSupported(Value: TcxCustomGridTableView): Boolean; -begin - Result := Value.CanBeLookupList and - (TcxCustomGridView(Value).DataController is TcxDBDataController); -end; - -procedure TcxExtLookupComboBoxProperties.CheckListFieldItem; -begin - FInCheckListFieldItem := True; - try - if (View <> nil) and (ListFieldItem <> nil) and - (View.IndexOfItem(ListFieldItem) = -1) then - ListFieldItem := nil; - finally - FInCheckListFieldItem := False; - end; -end; - -procedure TcxExtLookupComboBoxProperties.DeinitializeDataController; -begin - inherited DeinitializeDataController; - if DataController <> nil then - DataController.RemoveDataChangeRefCount; -end; - -procedure TcxExtLookupComboBoxProperties.FreeNotification(Sender: TComponent); -begin - inherited FreeNotification(Sender); - if Sender = ListFieldItem then - ListFieldItem := nil; - if Sender = View then - View := nil; -end; - -function TcxExtLookupComboBoxProperties.GetIncrementalFiltering: Boolean; -begin - if FocusPopup then - Result := False - else - Result := inherited GetIncrementalFiltering; -end; - -function TcxExtLookupComboBoxProperties.GetListIndex: Integer; -begin - Result := Self.ListFieldIndex; -end; - -procedure TcxExtLookupComboBoxProperties.InitializeDataController; -begin - inherited InitializeDataController; - if DataController <> nil then - DataController.AddDataChangeRefCount; -end; - -procedure TcxExtLookupComboBoxProperties.LinkView(AView: TcxCustomGridTableView); -begin - CheckListFieldItem; - FreeNotificator.AddSender(AView); - InitializeDataController; -end; - -function TcxExtLookupComboBoxProperties.PopupWindowCapturesFocus: Boolean; -begin - Result := FocusPopup; -end; - -procedure TcxExtLookupComboBoxProperties.UnlinkView(AView: TcxCustomGridTableView); -begin - DeinitializeDataController; - FreeNotificator.RemoveSender(AView); -end; - -// LookupGrid methods - -function TcxExtLookupComboBoxProperties.GetLookupGridActiveControl: TWinControl; -begin - if View <> nil then - Result := View.Site - else - Result := inherited GetLookupGridActiveControl; -end; - -function TcxExtLookupComboBoxProperties.GetLookupGridCanResize: Boolean; -begin - if View <> nil then - Result := not TcxCustomGridTableOptionsViewAccess(View.OptionsView).CellAutoHeight - else - Result := False; -end; - -function TcxExtLookupComboBoxProperties.GetLookupGridColumnCount: Integer; -begin - if View <> nil then - Result := View.ItemCount - else - Result := 0; -end; - -function TcxExtLookupComboBoxProperties.GetLookupGridControl: TWinControl; -begin - Result := Grid; -end; - -function TcxExtLookupComboBoxProperties.GetLookupGridDataController: TcxCustomDataController; -begin - if View <> nil then - Result := View.DataController - else - Result := nil; -end; - -function TcxExtLookupComboBoxProperties.GetLookupGridVisualAreaPreferredWidth: Integer; -begin - Result := 0; - if View <> nil then - View.ViewInfo.GetWidth(Point(MaxInt, MaxInt), Result); -end; - -function TcxExtLookupComboBoxProperties.GetLookupGridNearestPopupHeight(AHeight: Integer): Integer; -begin - if View <> nil then - Result := View.ViewInfo.GetNearestPopupHeight(AHeight, FocusPopup) - else - Result := AHeight; -end; - -function TcxExtLookupComboBoxProperties.GetLookupGridPopupHeight(ADropDownRowCount: Integer): Integer; -begin - if View <> nil then - begin - if FocusPopup and (ADropDownRowCount < 2) then // TODO: Check New Item Row - ADropDownRowCount := 2; - Result := View.ViewInfo.GetPopupHeight(ADropDownRowCount); - end - else - Result := 0; -end; - -function TcxExtLookupComboBoxProperties.IsLookupGridMouseOverList(const P: TPoint): Boolean; -var - AHitTest: TcxCustomGridHitTest; -begin - Result := False; - if View <> nil then - begin - AHitTest := View.ViewInfo.GetHitTest(P); - Result := AHitTest is TcxGridRecordHitTest; - end; -end; - -procedure TcxExtLookupComboBoxProperties.LookupGridDeinitialize; -begin - Grid.Levels[0].GridView := nil; - // restore options - if (View <> nil) and not (csDestroying in View.ComponentState) then - begin - TcxCustomGridTableOptionsBehaviorAccess(View.OptionsBehavior).PullFocusing := FPrevPullFocusing; - View.OptionsSelection.MultiSelect := FPrevMultiSelect; - View.OptionsBehavior.ImmediateEditor := FPrevImmediateEditor; - if View is TcxGridTableView then - TcxGridTableView(View).OptionsCustomize.ColumnFiltering := FPrevColumnFiltering; - View.OptionsBehavior.IncSearch := FPrevIncSearch; - View.OnKeyDown := Grid.FPrevOnKeyDown; - View.OnMouseDown := Grid.FPrevOnMouseDown; - View.OnMouseMove := Grid.FPrevOnMouseMove; - View.OnMouseUp := Grid.FPrevOnMouseUp; - end; -end; - -procedure TcxExtLookupComboBoxProperties.LookupGridDroppedDown(const AFindStr: string); -begin - // Init Inc Search - // TODO: !!! - if FocusPopup and AutoSearchOnPopup and (ListFieldItem <> nil) then - begin - ListFieldItem.Focused := True; - View.DataController.Search.Locate(ListFieldItem.Index, AFindStr); - end; -end; - -procedure TcxExtLookupComboBoxProperties.LookupGridInitEvents(AOnClick, AOnFocusedRowChanged: TNotifyEvent; - AOnCloseUp: cxLookupEdit.TcxLookupGridCloseUpEvent); -begin - Grid.OnClick := AOnClick; // not impl - if View <> nil then - begin -// View.OnFocusedRecordChanged := AOnFocusedRowChanged; - Grid.OnCloseUp := AOnCloseUp; - end; -end; - -procedure TcxExtLookupComboBoxProperties.LookupGridInitialize; -begin - if View = nil then - Exit; - // save options - FPrevPullFocusing := TcxCustomGridTableOptionsBehaviorAccess(View.OptionsBehavior).PullFocusing; - TcxCustomGridTableOptionsBehaviorAccess(View.OptionsBehavior).PullFocusing := True; - FPrevMultiSelect := View.OptionsSelection.MultiSelect; - View.OptionsSelection.MultiSelect := False; - FPrevImmediateEditor := View.OptionsBehavior.ImmediateEditor; - View.OptionsBehavior.ImmediateEditor := False; - if View is TcxGridTableView then - begin - FPrevColumnFiltering := TcxGridTableView(View).OptionsCustomize.ColumnFiltering; - if not FocusPopup then - TcxGridTableView(View).OptionsCustomize.ColumnFiltering := False; - end; - - Grid.FPrevOnKeyDown := View.OnKeyDown; - View.OnKeyDown := Grid.ViewKeyDown; - - Grid.FPrevOnMouseDown := View.OnMouseDown; - View.OnMouseDown := Grid.ViewMouseDown; - - Grid.FMousePos := Point(-1, -1); - Grid.FPrevOnMouseMove := View.OnMouseMove; - View.OnMouseMove := Grid.ViewMouseMove; - - Grid.FPrevOnMouseUp := View.OnMouseUp; - View.OnMouseUp := Grid.ViewMouseUp; - - Grid.Editable := FocusPopup; - Grid.Levels[0].GridView := View; - - FPrevIncSearch := View.OptionsBehavior.IncSearch; - if FocusPopup and AutoSearchOnPopup then - View.OptionsBehavior.IncSearch := True; - View.DataController.Search.Cancel; -end; - -procedure TcxExtLookupComboBoxProperties.LookupGridInitLookAndFeel(ALookAndFeel: TcxLookAndFeel; - AColor: TColor; AFont: TFont); -begin - Grid.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - Grid.Color := AColor; - Grid.Font := AFont; -end; - -procedure TcxExtLookupComboBoxProperties.LookupGridLockMouseMove; -begin - Grid.PopupMouseMoveLocked := True; -end; - -procedure TcxExtLookupComboBoxProperties.LookupGridMakeFocusedRowVisible; -begin - if View <> nil then - View.Controller.MakeFocusedRecordVisible; -end; - -procedure TcxExtLookupComboBoxProperties.LookupGridUnlockMouseMove; -begin - Grid.MouseCapture := False; - Grid.PopupMouseMoveLocked := False; -end; - -// DBLookupGrid methods - -procedure TcxExtLookupComboBoxProperties.DBLookupGridBeginUpdate; -begin - if View <> nil then View.BeginUpdate; -end; - -procedure TcxExtLookupComboBoxProperties.DBLookupGridCheckColumnByFieldName(const AFieldName: string); -begin - if (View <> nil) and (DataController <> nil) then - begin - if (AFieldName <> '') and (DataController.GetItemByFieldName(AFieldName) = nil) then - with View.CreateItem do - begin - Index := 0; - DataController.ChangeFieldName(Index, AFieldName); - end; - end; -end; - -procedure TcxExtLookupComboBoxProperties.DBLookupGridCreateColumnsByFieldNames(const AFieldNames: string); -var - I: Integer; - AFieldNamesList: TStrings; -begin - if View <> nil then - begin - View.ClearItems; - AFieldNamesList := TStringList.Create; - try - GetFieldNames(AFieldNames, AFieldNamesList); - View.BeginUpdate; - try - for I := 0 to AFieldNamesList.Count - 1 do - DataController.ChangeFieldName(View.CreateItem.Index, AFieldNamesList[I]); - finally - View.EndUpdate; - end; - finally - AFieldNamesList.Free; - end; - end; -end; - -procedure TcxExtLookupComboBoxProperties.DBLookupGridEndUpdate; -begin - if View <> nil then View.EndUpdate; -end; - -function TcxExtLookupComboBoxProperties.GetDBLookupGridColumnField(AIndex: Integer): TField; -begin - if DataController <> nil then - Result := DataController.GetItemField(AIndex) - else - Result := nil; -end; - -function TcxExtLookupComboBoxProperties.GetDBLookupGridColumnFieldName(AIndex: Integer): string; -begin - if DataController <> nil then - Result := DataController.GetItemFieldName(AIndex) - else - Result := ''; -end; - -function TcxExtLookupComboBoxProperties.GetDBLookupGridColumnIndexByFieldName(const AFieldName: string): Integer; -var - AItem: TcxCustomGridTableItem; -begin - if DataController <> nil then - begin - AItem := TcxCustomGridTableItem(DataController.GetItemByFieldName(AFieldName)); - Result := AItem.Index; - end - else - Result := -1; -end; - -function TcxExtLookupComboBoxProperties.GetDBLookupGridDataController: TcxDBDataController; -begin - Result := TcxDBDataController(GetLookupGridDataController); -end; - -function TcxExtLookupComboBoxProperties.GetGrid: TcxExtLookupGrid; - - procedure CreateGrid; - begin - FGrid := TcxExtLookupGrid.Create(nil); - FGrid.IsPopupControl := True; - FGrid.BorderStyle := cxcbsNone; - FGrid.Levels.Add; - end; - -begin - if (FGrid = nil) and not FDestroying then - CreateGrid; - Result := FGrid; -end; - -function TcxExtLookupComboBoxProperties.GetGridMode: Boolean; -begin - Result := inherited IsUseLookupList; -end; - -function TcxExtLookupComboBoxProperties.GetListFieldIndex: Integer; -var - AItem: TcxCustomGridTableItem; -begin - if IsDefinedByLookup then - Result := GetDisplayColumnIndex - else - begin - AItem := ListFieldItem; - if AItem <> nil then - Result := AItem.Index - else - Result := -1; - end; -end; - -function TcxExtLookupComboBoxProperties.GetListFieldItem: TcxCustomGridTableItem; -begin - if IsDefinedByLookup then - Result := nil - else - Result := FListFieldItem; -end; - -procedure TcxExtLookupComboBoxProperties.SetGridMode(Value: Boolean); -begin - inherited IsUseLookupList := Value; -end; - -procedure TcxExtLookupComboBoxProperties.SetListFieldItem(Value: TcxCustomGridTableItem); -begin - if (View <> nil) and (View.IndexOfItem(Value) = -1) then - Value := nil; - if FListFieldItem <> Value then - begin - if FListFieldItem <> nil then - FreeNotificator.RemoveSender(FListFieldItem); - FListFieldItem := Value; - if FListFieldItem <> nil then - FreeNotificator.AddSender(FListFieldItem); - if not FInCheckListFieldItem then - Changed; - end; -end; - -procedure TcxExtLookupComboBoxProperties.SetView(Value: TcxCustomGridTableView); -begin - if (Value <> nil) and not IsViewSupported(Value) then Exit; - if FView <> Value then - begin - if FView <> nil then - UnlinkView(FView); - FView := Value; - if FView <> nil then - LinkView(FView); - Changed; - end; -end; - -{ TcxCustomExtLookupComboBox } - -class function TcxCustomExtLookupComboBox.GetPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxExtLookupComboBoxProperties; -end; - -function TcxCustomExtLookupComboBox.CanDropDown: Boolean; -begin - if ActiveProperties.FocusPopup then - Result := True - else - Result := inherited CanDropDown; -end; - -function TcxCustomExtLookupComboBox.GetActiveProperties: TcxExtLookupComboBoxProperties; -begin - Result := TcxExtLookupComboBoxProperties(InternalGetActiveProperties); -end; - -function TcxCustomExtLookupComboBox.GetProperties: TcxExtLookupComboBoxProperties; -begin - Result := TcxExtLookupComboBoxProperties(FProperties); -end; - -procedure TcxCustomExtLookupComboBox.SetProperties(Value: TcxExtLookupComboBoxProperties); -begin - FProperties.Assign(Value); -end; - -{ TcxDBExtLookupComboBox } - -class function TcxDBExtLookupComboBox.GetDataBindingClass: TcxEditDataBindingClass; -begin - Result := TcxDBLookupEditDataBinding; -end; - -function TcxDBExtLookupComboBox.GetDataBinding: TcxDBTextEditDataBinding; -begin - Result := TcxDBTextEditDataBinding(FDataBinding); -end; - -procedure TcxDBExtLookupComboBox.SetDataBinding(Value: TcxDBTextEditDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxDBExtLookupComboBox.CMGetDataLink(var Message: TMessage); -begin - Message.Result := Integer(GetcxDBEditDataLink(Self)); -end; - -{ TcxEditRepositoryExtLookupComboBoxItem } - -class function TcxEditRepositoryExtLookupComboBoxItem.GetEditPropertiesClass: TcxCustomEditPropertiesClass; -begin - Result := TcxExtLookupComboBoxProperties; -end; - -function TcxEditRepositoryExtLookupComboBoxItem.GetProperties: TcxExtLookupComboBoxProperties; -begin - Result := inherited Properties as TcxExtLookupComboBoxProperties; -end; - -procedure TcxEditRepositoryExtLookupComboBoxItem.SetProperties(Value: TcxExtLookupComboBoxProperties); -begin - inherited Properties := Value; -end; - -initialization - RegisterClasses([TcxEditRepositoryExtLookupComboBoxItem]); - GetRegisteredEditProperties.Register(TcxExtLookupComboBoxProperties, - cxSEditRepositoryExtLookupComboBoxItem); - -finalization - GetRegisteredEditProperties.Unregister(TcxExtLookupComboBoxProperties); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxDBGridConverter.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxDBGridConverter.pas deleted file mode 100644 index d0412f49..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxDBGridConverter.pas +++ /dev/null @@ -1,390 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxDBGridConverter; - -interface - -{$I cxVer.inc} - -uses - Classes, SysUtils, cxConverterFactory, cxGridConverter, cxConverterUtils, - cxGridDBTableView, cxGridCustomView, DB, cxEdit, cxGraphics, cxButtonEdit, - cxDropDownEdit, cxTextEdit, cxDBLookupComboBox, cxStyles, Graphics, cxCustomConverter; - -type - - { TcxDBGridConverter } - TcxDBGridConverter = class(TcxCustomGridConverter) - private - FColor: Integer; - FFixedColor: Integer; - FFont: TFont; - FTitleFont: TFont; - function FindcxColumn(const AFieldName: string): TcxGridDBColumn; - function GetcxGridView: TcxGridDBTableView; - function GetFieldName(AColumn: TCollectionItem): string; - procedure ImportColumns; - procedure ImportColumnsStyles; - procedure ImportGrid; - procedure ImportGridStyles; - protected - procedure DoRealImport; override; - procedure DoImportStyles; override; - function GetGridViewClass: TcxCustomGridViewClass; override; - property cxGridView: TcxGridDBTableView read GetcxGridView; - public - class function GetSourceClassName: string; override; - end; - -implementation - -uses cxGridTableView, Windows; - -type - TcxCustomEditPropertiesAccessor = class(TcxCustomEditProperties); - -{ TcxDBGridConverter } - -class function TcxDBGridConverter.GetSourceClassName: string; -begin - Result := 'TDBGrid'; -end; - -procedure TcxDBGridConverter.DoRealImport; -begin - cxGridView.DataController.DataSource := GetClassProperty(nil, 'DataSource') as TDataSource; - ImportColumns; - ImportGrid; -end; - -procedure TcxDBGridConverter.DoImportStyles; -begin - ImportGridStyles; - ImportColumnsStyles; -end; - -function TcxDBGridConverter.GetGridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridDBTableView; -end; - -function TcxDBGridConverter.FindcxColumn(const AFieldName: string): TcxGridDBColumn; -var - I: Integer; -begin - Result := nil; - with cxGridView do - begin - for I := 0 to ColumnCount do - if Columns[I].DataBinding.FieldName = AFieldName then - begin - Result := Columns[I]; - Exit; - end; - end; -end; - -function TcxDBGridConverter.GetcxGridView: TcxGridDBTableView; -begin - Result := inherited cxGridView as TcxGridDBTableView; -end; - -function TcxDBGridConverter.GetFieldName(AColumn: TCollectionItem): string; -begin -{$IFDEF DELPHI10} - Result := GetWideStringProperty(AColumn, 'FieldName', 'Field' + IntToStr(AColumn.Index)); -{$ELSE} - Result := GetStringProperty(AColumn, 'FieldName', 'Field' + IntToStr(AColumn.Index)); -{$ENDIF} -end; - -{function TcxDBGridConverter.GetDefaultColumnName: string; -begin - Result := 'DBColumn'; -end;} - -procedure TcxDBGridConverter.ImportColumns; -var - AColumns: TObject; - AObject: TObject; - ATitle: TObject; - AcxColumn: TcxGridDBColumn; - AButtonStyle: string; - AReadOnly: Boolean; - AAlignment: TAlignment; - AFieldName: string; - I, J: Integer; - ADataSource: TDataSource; - AField: TField; - AButtonEditProperties: TcxButtonEditProperties; - AComboBoxProperties: TcxComboBoxProperties; - ALookupComboBoxProperties: TcxLookupComboBoxProperties; -begin - AColumns := GetClassProperty(nil, 'Columns'); - if AColumns <> nil then - begin - if AColumns is TCollection then - with TCollection(AColumns) do - begin - for I := 0 to Count - 1 do - begin - AcxColumn := cxGridView.CreateColumn; - AFieldName := GetFieldName(Items[I]); - AButtonStyle := GetEnumProperty(Items[I], 'ButtonStyle'); - if AButtonStyle = 'cbsAuto' then - begin - ADataSource := GetClassProperty(nil, 'DataSource') as TDataSource; - AField := nil; - if ADataSource <> nil then - begin - if ADataSource.DataSet <> nil then - with ADataSource.DataSet.Fields do - begin - for J := 0 to Count - 1 do - if Fields[J].FieldName = AFieldName then - begin - AField := Fields[J]; - Break; - end; - end; - end; - if (AField <> nil) and (AField.FieldKind = fkLookup) then - begin - AcxColumn.PropertiesClass := TcxLookupComboBoxProperties; - ALookupComboBoxProperties := TcxLookupComboBoxProperties(AcxColumn.Properties); - ALookupComboBoxProperties.DropDownRows := GetIntegerProperty(Items[I], - 'DropDownRows', ALookupComboBoxProperties.DropDownRows); - ALookupComboBoxProperties.ReadOnly := GetBooleanProperty(Items[I], - 'ReadOnly', ALookupComboBoxProperties.ReadOnly); - end - else - begin - AObject := GetClassProperty(Items[I], 'PickList'); - if AObject <> nil then - begin - if (AObject as TStrings).Count > 0 then - begin - AcxColumn.PropertiesClass := TcxComboBoxProperties; - AComboBoxProperties := TcxComboBoxProperties(AcxColumn.Properties); - for J := 0 to (AObject as TStrings).Count - 1 do - AComboBoxProperties.Items.Add((AObject as TStrings)[J]); - AComboBoxProperties.ReadOnly := GetBooleanProperty( - TCollection(AColumns).Items[I], 'ReadOnly', AComboBoxProperties.ReadOnly); - AComboBoxProperties.Alignment.Horz := - ConvertAlignment(GetEnumProperty(TCollection(AColumns).Items[I], 'Alignment')); - AComboBoxProperties.DropDownRows := - GetIntegerProperty(TCollection(AColumns).Items[I], 'DropDownRows', AComboBoxProperties.DropDownRows); - end - else - begin - AReadOnly := GetBooleanProperty(Items[I], 'ReadOnly', False); - AAlignment := ConvertAlignment(GetEnumProperty(Items[I], 'Alignment')); - if AReadOnly or (AAlignment <> taLeftJustify) then - begin - AcxColumn.PropertiesClass := TcxTextEditProperties; - TcxTextEditProperties(AcxColumn.Properties).ReadOnly := AReadOnly; - TcxTextEditProperties(AcxColumn.Properties).Alignment.Horz := AAlignment; - end; - end; - end; - end; - end - else if AButtonStyle = 'cbsEllipsis' then - begin - AcxColumn.PropertiesClass := TcxButtonEditProperties; - AButtonEditProperties := TcxButtonEditProperties(AcxColumn.Properties); - AButtonEditProperties.ReadOnly := GetBooleanProperty(Items[I], - 'ReadOnly', AButtonEditProperties.ReadOnly); - AButtonEditProperties.Alignment.Horz := - ConvertAlignment(GetEnumProperty(Items[I], 'Alignment')); - end - else - begin - AReadOnly := GetBooleanProperty(Items[I], 'ReadOnly', False); - AAlignment := ConvertAlignment(GetEnumProperty(Items[I], 'Alignment')); - if AReadOnly or (AAlignment <> taLeftJustify) then - begin - AcxColumn.PropertiesClass := TcxTextEditProperties; - TcxTextEditProperties(AcxColumn.Properties).ReadOnly := AReadOnly; - TcxTextEditProperties(AcxColumn.Properties).Alignment.Horz := AAlignment; - end; - end; - AcxColumn.DataBinding.FieldName := AFieldName; - AcxColumn.Name := UniqueColumnName(AcxColumn, AcxColumn.DataBinding.FieldName); - ATitle := GetClassProperty(Items[I], 'Title'); - if ATitle <> nil then - begin - AcxColumn.Caption := GetStringProperty(ATitle, 'Caption', AcxColumn.Caption); - AcxColumn.HeaderAlignmentHorz := ConvertAlignment(GetEnumProperty(ATitle, 'Alignment')); - end; - AcxColumn.Visible := GetBooleanProperty(Items[I], 'Visible', AcxColumn.Visible); - AcxColumn.Width := GetIntegerProperty(Items[I], 'Width', AcxColumn.Width); - end; - end; - end; -end; - -procedure TcxDBGridConverter.ImportColumnsStyles; -var - AColumns: TObject; - AColumnTitle: TObject; - AcxColumn: TcxGridDBColumn; - I: Integer; - AStyle: TcxCustomStyle; - AColor: Integer; - AFont: TFont; -begin - AColumns := GetClassProperty(nil, 'Columns'); - if AColumns <> nil then - begin - if AColumns is TCollection then - with TCollection(AColumns) do - begin - for I := 0 to Count - 1 do - begin - AcxColumn := FindcxColumn(GetFieldName(Items[I])); - if AcxColumn <> nil then - begin - AColor := GetIntegerProperty(Items[I], 'Color'); - AFont := GetClassProperty(Items[I], 'Font') as TFont; - if ((AColor <> clWindow) and (AColor <> FColor)) or - (not DefaultFont(AFont) and not CompareFonts(AFont, FFont)) then - begin - AStyle := CreateStyleItem; - (AStyle as TcxStyle).Color := AColor; - (AStyle as TcxStyle).Font.Assign(AFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - AcxColumn.Styles.Content := AStyle as TcxStyle; - end; - AColumnTitle := GetClassProperty(Items[I], 'Title'); - if AColumnTitle <> nil then - begin - AColor := GetIntegerProperty(AColumnTitle, 'Color'); - AFont := GetClassProperty(AColumnTitle, 'Font') as TFont; - if ((AColor <> clBtnFace) and (AColor <> FFixedColor)) or - (not DefaultFont(AFont) and not CompareFonts(AFont, FTitleFont)) then - begin - AStyle := CreateStyleItem; - (AStyle as TcxStyle).Color := AColor; - (AStyle as TcxStyle).Font.Assign(AFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - AcxColumn.Styles.Header := AStyle as TcxStyle; - end; - end; - end; - end; - end; - end; -end; - -procedure TcxDBGridConverter.ImportGrid; -var - AOptions: TStringList; - I: Integer; -begin - AOptions := TStringList.Create; - try - EnablePropertyException; - try - GetSetProperty(nil, 'Options', AOptions); - AOptions.Sort; - with cxGridView do - begin - OptionsData.Editing := AOptions.Find('dgEditing', I); - OptionsBehavior.AlwaysShowEditor := AOptions.Find('dgAlwaysShowEditor', I); - OptionsView.Indicator := AOptions.Find('dgIndicator', I); - OptionsCustomize.ColumnHorzSizing := AOptions.Find('dgColumnResize', I); - if AOptions.Find('dgColLines', I) then - begin - if AOptions.Find('dgRowLines', I) then - OptionsView.GridLines := glBoth - else - OptionsView.GridLines := glVertical; - end - else - begin - if AOptions.Find('dgRowLines', I) then - OptionsView.GridLines := glHorizontal - else - OptionsView.GridLines := glNone; - end; - OptionsData.DeletingConfirmation := AOptions.Find('dgConfirmDelete', I); - OptionsData.CancelOnExit := AOptions.Find('dgCancelOnExit', I); - OptionsSelection.MultiSelect := AOptions.Find('dgMultiSelect', I); - OptionsSelection.CellSelect := not AOptions.Find('dgRowSelect', I); - OptionsView.Header := AOptions.Find('dgTitles', I); - OptionsBehavior.FocusCellOnTab := AOptions.Find('dgTabs', I); - OptionsSelection.HideSelection := not AOptions.Find('dgAlwaysShowSelection', I); - end; - except - on EcxUnknownProperty do; - end; - finally - AOptions.Free; - DisablePropertyException; - end; -end; - -procedure TcxDBGridConverter.ImportGridStyles; -var - AStyle: TcxCustomStyle; -begin - FColor := GetIntegerProperty(nil, 'Color'); - FFont := GetClassProperty(nil, 'Font') as TFont; - if (FColor <> clWindow) or not DefaultFont(FFont) then - begin - AStyle := CreateStyleItem; - (AStyle as TcxStyle).Color := FColor; - (AStyle as TcxStyle).Font.Assign(FFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - cxGridView.Styles.Content := AStyle as TcxStyle; - end; - FFixedColor := GetIntegerProperty(nil, 'FixedColor'); - FTitleFont := GetClassProperty(nil, 'TitleFont') as TFont; - if (FFixedColor <> clBtnFace) or not DefaultFont(FTitleFont) then - begin - AStyle := CreateStyleItem; - (AStyle as TcxStyle).Color := FFixedColor; - (AStyle as TcxStyle).Font.Assign(FTitleFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - cxGridView.Styles.Header := AStyle as TcxStyle; - cxGridView.Styles.Indicator := AStyle as TcxStyle; - end; -end; - -initialization - ConverterFactory(cxGridGroupConverterName).RegisterConverter('DB Grid Converter', TcxDBGridConverter); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxDXGridConverter.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxDXGridConverter.pas deleted file mode 100644 index 4bca9be3..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxDXGridConverter.pas +++ /dev/null @@ -1,1813 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxDXGridConverter; - -interface - -{$I cxVer.inc} - -uses - Forms, Classes, SysUtils, cxConverterFactory, cxGridConverter, cxGridCustomView, - cxGridDBTableView, cxGridDBBandedTableView, cxGridBandedTableView, DB, Controls, - cxCustomData, cxGraphics, cxGridCustomTableView, cxFilter, cxGrid, cxLookAndFeels, - cxEdit, cxBlobEdit, cxButtonEdit, cxCalc, cxCalendar, cxCheckBox, cxCurrencyEdit, - cxDropDownEdit, cxHyperLinkEdit, cxImage, cxImageComboBox, cxDBLookupComboBox, - cxMaskEdit, cxMemo, cxMRUEdit, cxSpinEdit, cxTimeEdit, cxTextEdit, StdCtrls, Graphics, - cxGridTableView, cxDBData, cxStyles, cxConverterUtils, cxCustomConverter, - cxPropertiesConverters; - -type - { TcxDXGridConverter } - TcxDXGridConverter = class(TcxCustomGridConverter) - protected - procedure DoRealImport; override; - procedure DoImportStyles; override; - function GetGridViewClass: TcxCustomGridViewClass; override; - public - class function GetSourceClassName: string; override; - end; - - { TcxDXGridLayoutConverter } - TcxDXGridLayoutConverter = class(TcxDXGridConverter) - private - FdxDBGrid: TComponent; - FComponent: TComponent; - protected - procedure DoRealImport; override; - function GetGridViewClass: TcxCustomGridViewClass; override; - procedure PostImport; override; - procedure PreImport; override; - function TestIntermediary: Boolean; override; - public - class function GetIntermediaryClassName: string; override; - class function GetSourceClassName: string; override; - end; - -implementation - -uses - dxCore; - -type - { TcxRealConverterToTableView } - TcxRealConverterToTableView = class - private - FColor: Integer; - FFont: TFont; - FHeaderColor: Integer; - FHeaderFont: TFont; - FcxSummaryGroups: TStringList; - function DefaultPreviewFont(AFont: TFont): Boolean; - function GetColumn(const AName: string): TComponent; - procedure GetColumns(AColumns: TList); - function GetCXColumnByFieldName(const AFieldName: string): TcxGridDBColumn; - function GetcxGrid: TcxCustomGrid; - function GetcxGridView: TcxGridTableView; - protected - Converter: TcxDXGridConverter; - procedure AssignColumn(AColumn: TcxGridColumn; ADXColumn: TObject; AIndex: Integer); virtual; - procedure AssignDXOptionsView(AList: TStringList); virtual; - procedure AssignGrid; virtual; - procedure AssignSummaryItem(AColumn: TcxGridColumn; ADXColumn: TObject); virtual; - function CreateColumn: TcxGridColumn; virtual; - function ConvertColumnShowEditButtons(const AStyle: string): TcxGridItemShowEditButtons; - function GetSummaryKind(const AType: string): TcxSummaryKind; - procedure ImportAutoDataSetFilter(const AValue: Boolean); virtual; - procedure ImportColumn(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportColumns; - procedure ImportColumnsStyles; - procedure ImportColumnSummaryGroups; virtual; - procedure ImportDXFilter; - procedure ImportDXOptionsBehavior; - procedure ImportDXOptionsCustomize; virtual; - procedure ImportDXOptionsDB; - procedure ImportDXOptionsView; - procedure ImportGrid; - procedure ImportGridStyles; - procedure ImportPreview; - procedure ImportPropertiesBlobEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesButtonEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesCalcEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesCheckBox(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesComboBox(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesCurencyEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesDateEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesHyperLinkEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesImage(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesImageComboBox(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesLookupComboBox(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesExLookupComboBox(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesMaskEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesMemo(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesMRUEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesPopupEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesSpinEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesTextEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportPropertiesTimeEdit(AdxColumn: TObject; AcxColumn: TcxGridColumn); - procedure ImportSummaryGroups; virtual; - procedure ImportSyncMode(const AValue: Boolean); virtual; - function TestPreviewFieldName(AIndex: Integer; const APreview: string): Boolean; virtual; - property cxGrid: TcxCustomGrid read GetcxGrid; - property cxGridView: TcxGridTableView read GetcxGridView; - public - constructor Create(AConverter: TcxDXGridConverter); - destructor Destroy; override; - procedure DoImport; virtual; - procedure DoImportStyles; virtual; - end; - - { TcxRealConverterToBandedTableView } - TcxRealConverterToBandedTableView = class(TcxRealConverterToTableView) - private - FBandHeaderWidth: Boolean; - function GetCXColumnByFieldName(const AFieldName: string): TcxGridDBBandedColumn; - function GetcxGridView: TcxGridBandedTableView; - protected - procedure AssignColumn(AColumn: TcxGridColumn; ADXColumn: TObject; AIndex: Integer); override; - procedure ImportAutoDataSetFilter(const AValue: Boolean); override; - procedure ImportColumnSummaryGroups; override; - procedure ImportDXOptionsCustomize; override; - procedure AssignDXOptionsView(AList: TStringList); override; - procedure AssignGrid; override; - procedure AssignSummaryItem(AColumn: TcxGridColumn; ADXColumn: TObject); override; - function CreateColumn: TcxGridColumn; override; - procedure ImportColumnsStyles; - procedure ImportBands; - procedure ImportBandsStyles; - procedure ImportSummaryGroups; override; - procedure ImportSyncMode(const AValue: Boolean); override; - function TestPreviewFieldName(AIndex: Integer; const APreview: string): Boolean; override; - property cxGridView: TcxGridBandedTableView read GetcxGridView; - public - procedure DoImport; override; - procedure DoImportStyles; override; - end; - - { TcxDXGridLayoutDataReader } - TcxDXGridLayoutDataReader = class(TReader) - protected - procedure SetName(Component: TComponent; var Name: string); override; - end; - - { TcxDXGridLayoutDummy } - TcxDXGridLayoutDummy = class(TComponent) - private - FComponent: TComponent; - FdxDBGrid: TComponent; - FIntermediary: TComponent; - procedure ReadData(Stream: TStream); - protected - procedure DefineProperties(Filer: TFiler); override; - public - constructor Create(AOwner: TComponent); override; - property Component: TComponent read FComponent write FComponent; - property dxDBGrid: TComponent read FdxDBGrid write FdxDbGrid; - property Intermediary: TComponent read FIntermediary write FIntermediary; - end; - -{ TcxRealConverterToTableView } - -constructor TcxRealConverterToTableView.Create(AConverter: TcxDXGridConverter); -begin - FcxSummaryGroups := TStringList.Create; - Converter := AConverter; -end; - -destructor TcxRealConverterToTableView.Destroy; -begin - FcxSummaryGroups.Free; - inherited Destroy; -end; - -procedure TcxRealConverterToTableView.DoImport; -begin - TcxGridDBTableView(cxGridView).DataController.DataSource := - Converter.GetClassProperty(nil, 'DataSource') as TDataSource; - ImportDXOptionsView; - ImportDXFilter; - ImportColumns; - TcxGridDBTableView(cxGridView).DataController.KeyFieldNames := - Converter.GetStringProperty(nil, 'KeyField', ''); - ImportGrid; -end; - -procedure TcxRealConverterToTableView.DoImportStyles; -begin - ImportGridStyles; - ImportColumnsStyles; -end; - -procedure TcxRealConverterToTableView.AssignColumn(AColumn: TcxGridColumn; ADXColumn: TObject; - AIndex: Integer); -var - ASortOrder: string; -begin - with TcxGridDBColumn(AColumn) do - begin - DataBinding.FieldName := Converter.GetStringProperty(ADXColumn, 'FieldName', 'Field' + IntToStr(AIndex)); - Name := Converter.UniqueColumnName(AColumn, DataBinding.FieldName); - Caption := Converter.GetStringProperty(ADXColumn, 'Caption', Caption); - Visible := Converter.GetBooleanProperty(ADXColumn, 'Visible', Visible); - GroupIndex := Converter.GetIntegerProperty(ADXColumn, 'GroupIndex', GroupIndex); - Width := Converter.GetIntegerProperty(ADXColumn, 'Width', Width); - ASortOrder := Converter.GetEnumProperty(ADXColumn, 'Sorted'); - if ASortOrder = 'csDown' then - SortOrder := soDescending - else if ASortOrder = 'csNone' then - SortOrder := soNone - else if ASortOrder = 'csUp' then - SortOrder := soAscending; - Options.Moving := not Converter.GetBooleanProperty(ADXColumn, 'DisableDragging', Options.Moving); - Options.Editing := not Converter.GetBooleanProperty(ADXColumn, 'DisableEditor', Options.Editing); - Options.Grouping := not Converter.GetBooleanProperty(ADXColumn, 'DisableGrouping', Options.Grouping); - Options.Focusing := True; - Options.Filtering := cxGridView.DataController.Filter.Active; - Options.HorzSizing := Converter.GetBooleanProperty(ADXColumn, 'Sizing', Options.HorzSizing); - HeaderAlignmentHorz := ConvertAlignment(Converter.GetEnumProperty(ADXColumn, 'HeaderAlignment')); - MinWidth := Converter.GetIntegerProperty(ADXColumn, 'MinWidth', MinWidth); - Tag := Converter.GetIntegerProperty(ADXColumn, 'Tag', Tag); - AssignSummaryItem(AColumn, ADXColumn); - ImportColumn(ADXColumn, AColumn); - end; -end; - -procedure TcxRealConverterToTableView.AssignDXOptionsView(AList: TStringList); -var - I: Integer; -begin - with cxGridView do - begin - OptionsView.Indicator := AList.Find('edgoIndicator', I); - OptionsView.CellAutoHeight := AList.Find('edgoRowAutoHeight', I); - OptionsView.HeaderAutoHeight := AList.Find('edgoAutoHeaderPanelHeight', I); - OptionsView.ColumnAutoWidth := AList.Find('edgoAutoWidth', I); - OptionsSelection.HideFocusRect := AList.Find('edgoHideFocusRect', I); - OptionsSelection.CellSelect := not AList.Find('edgoRowSelect', I); - OptionsSelection.InvertSelect := AList.Find('edgoInvertSelect', I); - OptionsView.GroupFooters := gfVisibleWhenExpanded; - Preview.Visible := AList.Find('edgoPreview', I); - if AList.Find('edgoShowButtonAlways', I) then - OptionsView.ShowEditButtons := gsebForFocusedRecord - else - OptionsView.ShowEditButtons := gsebNever; - end; -end; - -procedure TcxRealConverterToTableView.AssignGrid; -var - ALookAndFeel: string; -begin - with cxGridView do - begin - if Converter.GetBooleanProperty(nil, 'ShowGrid', False) then - OptionsView.GridLines := glBoth - else - OptionsView.GridLines := glNone; - OptionsView.Header := Converter.GetBooleanProperty(nil, 'ShowHeader', OptionsView.Header); - OptionsView.NewItemRow := Converter.GetBooleanProperty(nil, 'ShowNewItemRow', OptionsView.NewItemRow); - OptionsView.Footer := Converter.GetBooleanProperty(nil, 'ShowSummaryFooter', OptionsView.Footer); - OptionsView.IndicatorWidth := Converter.GetIntegerProperty(nil, 'GrIndicatorWidth', OptionsView.IndicatorWidth); - OptionsSelection.HideSelection := Converter.GetBooleanProperty(nil, 'HideSelection', OptionsSelection.HideSelection); - Preview.LeftIndent := Converter.GetIntegerProperty(nil, 'IndentDesc', Preview.LeftIndent); - ALookAndFeel := Converter.GetEnumProperty(nil, 'LookAndFeel'); - if ALookAndFeel = 'lfFlat' then - cxGrid.LookAndFeel.Kind := lfFlat - else if ALookAndFeel = 'lfStandard' then - cxGrid.LookAndFeel.Kind := lfStandard - else if ALookAndFeel = 'lfUltraFlat' then - cxGrid.LookAndFeel.Kind := lfUltraFlat; - OptionsView.GroupByBox := Converter.GetBooleanProperty(nil, 'ShowGroupPanel', OptionsView.GroupByBox); - end; -end; - -procedure TcxRealConverterToTableView.AssignSummaryItem(AColumn: TcxGridColumn; ADXColumn: TObject); -var - ASummaryFooterType: string; - AcxSummaryFooterItem: TcxGridDBTableSummaryItem; -begin - ASummaryFooterType := Converter.GetEnumProperty(ADXColumn, 'SummaryFooterType', 'cstNone'); - if ASummaryFooterType <> 'cstNone' then - begin - AcxSummaryFooterItem := TcxGridDBTableSummaryItem( - TcxGridDBTableView(cxGridView).DataController.Summary.FooterSummaryItems.Add); - AcxSummaryFooterItem.FieldName := Converter.GetStringProperty(ADXColumn, 'SummaryFooterField', ''); - AcxSummaryFooterItem.Format := Converter.GetStringProperty(ADXColumn, 'SummaryFooterFormat', AcxSummaryFooterItem.Format); - AcxSummaryFooterItem.Kind := GetSummaryKind(ASummaryFooterType); - AcxSummaryFooterItem.Column := TcxGridDBColumn(AColumn); - end; -end; - -function TcxRealConverterToTableView.CreateColumn: TcxGridColumn; -begin - Result := TcxGridDBTableView(cxGridView).CreateColumn; -end; - -procedure TcxRealConverterToTableView.ImportAutoDataSetFilter(const AValue: Boolean); -begin - TcxGridDBTableView(cxGridView).DataController.Filter.AutoDataSetFilter := AValue; -end; - -procedure TcxRealConverterToTableView.ImportColumn(AdxColumn: TObject; AcxColumn: TcxGridColumn); -begin - if AdxColumn.ClassName = 'TdxDBGridColumn' then - ImportPropertiesTextEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridMaskColumn' then - ImportPropertiesMaskEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridButtonColumn' then - ImportPropertiesButtonEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridDateColumn' then - ImportPropertiesDateEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridCheckColumn' then - ImportPropertiesCheckBox(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridImageColumn' then - ImportPropertiesImageComboBox(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridSpinColumn' then - ImportPropertiesSpinEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridLookupColumn' then - ImportPropertiesLookupComboBox(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridPickColumn' then - ImportPropertiesComboBox(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridCalcColumn' then - ImportPropertiesCalcEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridBlobColumn' then - ImportPropertiesBlobEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridHyperLinkColumn' then - ImportPropertiesHyperLinkEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridTimeColumn' then - ImportPropertiesTimeEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridCurrencyColumn' then - ImportPropertiesCurencyEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridMemoColumn' then - ImportPropertiesMemo(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridGraphicColumn' then - ImportPropertiesImage(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridMRUColumn' then - ImportPropertiesMRUEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridPopupColumn' then - ImportPropertiesPopupEdit(AdxColumn, AcxColumn) - else if AdxColumn.ClassName = 'TdxDBGridExtLookupColumn' then - ImportPropertiesExLookupComboBox(AdxColumn, AcxColumn); -end; - -procedure TcxRealConverterToTableView.ImportColumns; -var - AColumns: TList; - I: Integer; -begin - AColumns := TList.Create; - try - GetColumns(AColumns); - for I := 0 to AColumns.Count - 1 do - AssignColumn(CreateColumn, AColumns[I], I); - finally - AColumns.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportColumnsStyles; -var - AColumns: TList; - AColumn: TcxGridDBColumn; - I: Integer; - AColor: Integer; - AFont: TFont; - AStyle: TcxCustomStyle; -begin - AColumns := TList.Create; - try - GetColumns(AColumns); - for I := 0 to AColumns.Count - 1 do - begin - AColumn := GetCXColumnByFieldName(Converter.GetStringProperty(AColumns[I], 'FieldName', '')); - AColor := Converter.GetIntegerProperty(TComponent(AColumns[I]), 'Color'); - AFont := Converter.GetClassProperty(TComponent(AColumns[I]), 'Font') as TFont; - if ((AColor <> clWindow) and (AColor <> FColor)) or - (not DefaultFont(AFont) and not CompareFonts(AFont, FFont)) then - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := AColor; - (AStyle as TcxStyle).Font.Assign(AFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - AColumn.Styles.Content := AStyle as TcxStyle; - end; - end; - finally - AColumns.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportColumnSummaryGroups; -var - AColumns: TList; - AColumn: TcxGridDBColumn; - ASummaryField: string; - ASummaryFormat: string; - ASummaryGroupName: string; - ASummaryType: string; - ASummaryGroup: TcxDataSummaryGroup; - ASummaryItem: TcxGridDBTableSummaryItem; - ALink: TcxGridTableSummaryGroupItemLink; - AIndex: Integer; - I: Integer; -begin - AColumns := TList.Create; - try - GetColumns(AColumns); - for I := 0 to AColumns.Count - 1 do - begin - AColumn := GetCXColumnByFieldName(Converter.GetStringProperty(AColumns[I], 'FieldName', '')); - if AColumn = nil then - Continue; - ASummaryField := Converter.GetStringProperty(TComponent(AColumns[I]), 'SummaryField', ''); - ASummaryFormat := Converter.GetStringProperty(TComponent(AColumns[I]), 'SummaryFormat', ''); - ASummaryType := Converter.GetEnumProperty(TComponent(AColumns[I]), 'SummaryType'); - ASummaryGroupName := Converter.GetStringProperty(TComponent(AColumns[I]), 'SummaryGroupName', ''); - if ASummaryGroupName <> '' then - begin - if FcxSummaryGroups.Find(ASummaryGroupName, AIndex) then - begin - ASummaryGroup := TcxDataSummaryGroup(FcxSummaryGroups.Objects[AIndex]); - ALink := TcxGridTableSummaryGroupItemLink(ASummaryGroup.Links.Add); - ALink.Column := AColumn; - end; - end; - if (ASummaryField <> '') and (ASummaryType <> 'cstNone') then - begin - ASummaryGroup := cxGridView.DataController.Summary.SummaryGroups.Add; - ASummaryItem := TcxGridDBTableSummaryItem(ASummaryGroup.SummaryItems.Add); - ASummaryItem.FieldName := ASummaryField; - ASummaryItem.Format := ASummaryFormat; - ASummaryItem.Kind := GetSummaryKind(ASummaryType); - ALink := TcxGridTableSummaryGroupItemLink(ASummaryGroup.Links.Add); - ALink.Column := AColumn; - end; - end; - finally - AColumns.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportDXFilter; -var - AFilter: TObject; - AStatus: string; - AFilterOptions: TcxFilterCriteriaOptions; -begin - AFilter := Converter.GetClassProperty(nil, 'Filter'); - if AFilter <> nil then - begin - cxGridView.Filtering.DropDownWidth := - Converter.GetIntegerProperty(AFilter, 'DropDownWidth', cxGridView.Filtering.DropDownWidth); - cxGridView.DataController.Filter.MaxValueListCount := - Converter.GetIntegerProperty(AFilter, 'MaxDropDownCount', cxGridView.DataController.Filter.MaxValueListCount); - cxGridView.Filtering.MaxDropDownCount := Converter.GetIntegerProperty(AFilter, 'DropDownCount', - cxGridView.Filtering.MaxDropDownCount); - AStatus := Converter.GetEnumProperty(AFilter, 'FilterStatus'); - if AStatus = 'fsAlways' then - cxGridView.Filtering.Visible := fvAlways - else if AStatus = 'fsAuto' then - cxGridView.Filtering.Visible := fvNonEmpty - else if AStatus = 'fsNone' then - cxGridView.Filtering.Visible := fvNever; - cxGridView.DataController.Filter.Active := Converter.GetBooleanProperty(AFilter, 'Active', cxGridView.DataController.Filter.Active); - ImportAutoDatasetFilter(Converter.GetBooleanProperty(AFilter, 'AutoDataSetFilter', False)); - AFilterOptions := cxGridView.DataController.Filter.Options; - if Converter.GetBooleanProperty(AFilter, 'CaseInsensitive', False) then - Include(AFilterOptions, fcoCaseInsensitive); - cxGridView.DataController.Filter.Options := AFilterOptions; - end; -end; - -procedure TcxRealConverterToTableView.ImportDXOptionsBehavior; -var - AList: TStringList; - I: Integer; - AOptions: TcxDataControllerOptions; -begin - AList := TStringList.Create; - try - Converter.EnablePropertyException; - try - Converter.GetSetProperty(nil, 'OptionsBehavior', AList); - AList.Sort; - with cxGridView do - begin - OptionsData.Editing := AList.Find('edgoEditing', I); - OptionsBehavior.ImmediateEditor := AList.Find('edgoImmediateEditor', I); - OptionsSelection.MultiSelect := AList.Find('edgoMultiSelect', I); - OptionsBehavior.GoToNextCellOnEnter := AList.Find('edgoEnterThrough', I); - OptionsBehavior.FocusCellOnTab := AList.Find('edgoTabs', I); - OptionsBehavior.FocusCellOnCycle := not Alist.Find('edgoTabThrough', I); - AOptions := DataController.Options; - if AList.Find('edgoAnsiSort', I) then - Include(AOptions, dcoAnsiSort); - if AList.Find('edgoCaseInsensitive', I) then - Include(AOptions, dcoCaseInsensitive); - DataController.Options := AOptions; - OptionsBehavior.IncSearch := AList.Find('edgoAutoSearch', I); - end; - except - on EcxUnknownProperty do; - end; - finally - AList.Free; - Converter.DisablePropertyException; - end; -end; - -procedure TcxRealConverterToTableView.ImportDXOptionsCustomize; -var - AList: TStringList; - I: Integer; -begin - AList := TStringList.Create; - try - Converter.EnablePropertyException; - try - Converter.GetSetProperty(nil, 'OptionsCustomize', AList); - AList.Sort; - with cxGridView do - begin - OptionsCustomize.ColumnMoving := AList.Find('edgoColumnMoving', I); - OptionsCustomize.ColumnHorzSizing := AList.Find('edgoColumnSizing', I); - OptionsCustomize.ColumnHiding := AList.Find('edgoExtCustomizing', I); - end; - except - on EcxUnknownProperty do; - end; - finally - AList.Free; - Converter.DisablePropertyException; - end; -end; - -procedure TcxRealConverterToTableView.ImportDXOptionsDB; -var - AList: TStringList; - I: Integer; -begin - AList := TStringList.Create; - try - Converter.EnablePropertyException; - try - Converter.GetSetProperty(nil, 'OptionsDB', AList); - AList.Sort; - with cxGridView do - begin - OptionsData.Appending := AList.Find('edgoCanAppend', I); - OptionsData.CancelOnExit := AList.Find('edgoCancelOnExit', I); - OptionsData.Deleting := AList.Find('edgoCanDelete', I); - OptionsData.Inserting := AList.Find('edgoCanInsert', I); - OptionsData.DeletingConfirmation := AList.Find('edgoConfirmDelete', I); - OptionsBehavior.FocusFirstCellOnNewRecord := AList.Find('edgoResetColumnFocus', I); - ImportSyncMode(AList.Find('edgoCanNavigation', I)); - end; - except - on EcxUnknownProperty do; - end; - finally - AList.Free; - Converter.DisablePropertyException; - end; -end; - -procedure TcxRealConverterToTableView.ImportDXOptionsView; -var - AList: TStringList; -begin - AList := TStringList.Create; - try - Converter.EnablePropertyException; - try - Converter.GetSetProperty(nil, 'OptionsView', AList); - AList.Sort; - AssignDXOptionsView(AList); - except - on EcxUnknownProperty do; - end; - finally - AList.Free; - Converter.DisablePropertyException; - end; -end; - -procedure TcxRealConverterToTableView.ImportGrid; -begin - AssignGrid; - ImportPreview; - ImportDXOptionsDB; - ImportDXOptionsCustomize; - ImportDXOptionsBehavior; - ImportSummaryGroups; - ImportColumnSummaryGroups; -end; - -procedure TcxRealConverterToTableView.ImportGridStyles; -var - AStyle: TcxCustomStyle; - AGroupNodeColor: Integer; - AGroupNodeTextColor: Integer; - AGroupPanelColor: Integer; - AGroupPanelFontColor: Integer; - AAutoSearchColor: Integer; - AAutoSearchTextColor: Integer; - APreviewFont: TFont; - AHighlightColor: Integer; - AHighlightTextColor: Integer; - AHideSelectionColor: Integer; - AHideSelectionTextColor: Integer; - AGridLineColor: Integer; -begin - FColor := Converter.GetIntegerProperty(nil, 'Color'); - FFont := Converter.GetClassProperty(nil, 'Font') as TFont; - if (FColor <> clWindow) or not DefaultFont(FFont) then - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := FColor; - (AStyle as TcxStyle).Font.Assign(FFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - cxGridView.Styles.Content := AStyle as TcxStyle; - end; - AGroupNodeColor := Converter.GetIntegerProperty(nil, 'GroupNodeColor'); - AGroupNodeTextColor := Converter.GetIntegerProperty(nil, 'GroupNodeTextColor'); - if (AGroupNodeColor <> clBtnFace) or (AGroupNodeTextColor <> clNone) then - begin - if (AGroupNodeColor = FColor) and ((AGroupNodeTextColor = FFont.Color) or - (AGroupNodeTextColor = clNone)) then - cxGridView.Styles.Group := cxGridView.Styles.Content - else - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := AGroupNodeColor; - (AStyle as TcxStyle).Font.Assign(FFont); - if AGroupNodeTextColor = clNone then - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color - else - (AStyle as TcxStyle).TextColor := AGroupNodeTextColor; - cxGridView.Styles.Group := AStyle as TcxStyle; - end; - end; - AGroupPanelColor := Converter.GetIntegerProperty(nil, 'GroupPanelColor'); - AGroupPanelFontColor := Converter.GetIntegerProperty(nil, 'GroupPanelFontColor'); - if (AGroupPanelColor <> clBtnShadow) or (AGroupPanelFontColor <> clBtnFace) then - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := AGroupPanelColor; - (AStyle as TcxStyle).TextColor := AGroupPanelFontColor; - cxGridView.Styles.GroupByBox := AStyle as TcxStyle; - end; - FHeaderColor := Converter.GetIntegerProperty(nil, 'HeaderColor'); - FHeaderFont := Converter.GetClassProperty(nil, 'HeaderFont') as TFont; - if (FHeaderColor <> clBtnFace) or not DefaultFont(FHeaderFont) then - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := FHeaderColor; - (AStyle as TcxStyle).Font.Assign(FHeaderFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - cxGridView.Styles.Header := AStyle as TcxStyle; - cxGridView.Styles.Indicator := AStyle as TcxStyle; - end; - if (FHeaderColor <> clBtnface) or not DefaultFont(FFont) then - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := FHeaderColor; - (AStyle as TcxStyle).Font.Assign(FFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - cxGridView.Styles.Footer := AStyle as TcxStyle; - end; - AAutoSearchColor := Converter.GetIntegerProperty(nil, 'AutoSearchColor'); - AAutoSearchTextColor := Converter.GetIntegerProperty(nil, 'AutoSearchTextColor'); - if (AAutoSearchColor <> clNone) or (AAutoSearchTextColor <> clNone) then - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := AAutoSearchColor; - (AStyle as TcxStyle).TextColor := AAutoSearchTextColor; - cxGridView.Styles.IncSearch := AStyle as TcxStyle; - end; - APreviewFont := Converter.GetClassProperty(nil, 'PreviewFont') as TFont; - if not DefaultPreviewFont(APreviewFont) then - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := FColor; - (AStyle as TcxStyle).Font.Assign(APreviewFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - cxGridView.Styles.Preview := AStyle as TcxStyle; - end; - AGridLineColor := Converter.GetIntegerProperty(nil, 'GridLineColor'); - if AGridLineColor <> clNone then - cxGridView.OptionsView.GridLineColor := Converter.GetIntegerProperty(nil, 'GridLineColor'); - AHighlightColor := Converter.GetIntegerProperty(nil, 'HighlightColor'); - AHighlightTextColor := Converter.GetIntegerProperty(nil, 'HighlightTextColor'); - if (AHighlightColor <> clHighlight) or (AHighlightTextColor <> clHighlightText) then - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := AHighlightColor; - (AStyle as TcxStyle).TextColor := AHighlightTextColor; - cxGridView.Styles.Selection := AStyle as TcxStyle; - end; - AHideSelectionColor := Converter.GetIntegerProperty(nil, 'HideSelectionColor'); - AHideSelectionTextColor := Converter.GetIntegerProperty(nil, 'HideSelectionTextColor'); - if (AHideSelectionColor <> clHighlight) or (AHideSelectionTextColor <> clHighlightText) then - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := AHideSelectionColor; - (AStyle as TcxStyle).TextColor := AHideSelectionTextColor; - cxGridView.Styles.Inactive := AStyle as TcxStyle; - end; -end; - -procedure TcxRealConverterToTableView.ImportPreview; -var - APreview: string; - I: Integer; -begin - APreview := Converter.GetStringProperty(nil, 'PreviewFieldName', ''); - if APreview <> '' then - begin - for I := 0 to cxGridView.ColumnCount - 1 do - if TestPreviewFieldName(I, APreview) then - begin - cxGridView.Preview.Column := cxGridView.Columns[I]; - Break; - end; - end; - cxGridView.Preview.Place := ppBottom; - cxGridView.Preview.AutoHeight := False; - cxGridView.Preview.MaxLineCount := Converter.GetIntegerProperty(nil, 'PreviewLines', - cxGridView.Preview.MaxLineCount); -end; - -procedure TcxRealConverterToTableView.ImportPropertiesBlobEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxBlobEditProperties; - AConverter := TcxBlobEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons( - Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle')); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesButtonEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxButtonEditProperties; - AConverter := TcxButtonEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons( - Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle')); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesCalcEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxCalcEditProperties; - AConverter := TcxCalcEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons( - Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle')); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesCheckBox( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxCheckBoxProperties; - AConverter := TcxCheckBoxPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesComboBox( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxComboBoxProperties; - AConverter := TcxComboBoxPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons( - Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle')); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesCurencyEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxCurrencyEditProperties; - AConverter := TcxCurrencyEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesDateEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxDateEditProperties; - AConverter := TcxDateEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons( - Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle')); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesExLookupComboBox( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -begin - -end; - -procedure TcxRealConverterToTableView.ImportPropertiesHyperLinkEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxHyperLinkEditProperties; - AConverter := TcxHyperLinkEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesImage( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxImageProperties; - AConverter := TcxImagePropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesImageComboBox( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxImageComboBoxProperties; - AConverter := TcxImageComboBoxPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons( - Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle')); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesLookupComboBox( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxLookupComboBoxProperties; - AConverter := TcxLookupComboBoxPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons( - Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle')); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesMaskEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxMaskEditProperties; - AConverter := TcxMaskEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesMemo( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxMemoProperties; - AConverter := TcxMemoPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesMRUEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxMRUEditProperties; - AConverter := TcxMRUEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons( - Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle')); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesPopupEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxPopupEditProperties; - AConverter := TcxPopupEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesSpinEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxSpinEditProperties; - AConverter := TcxSpinEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons( - Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle')); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesTextEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxTextEditProperties; - AConverter := TcxTextEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportPropertiesTimeEdit( - AdxColumn: TObject; AcxColumn: TcxGridColumn); -var - AConverter: TcxCustomPropertiesConverter; -begin - AcxColumn.PropertiesClass := TcxTimeEditProperties; - AConverter := TcxTimeEditPropertiesConverter.Create(AcxColumn.Properties); - try - AConverter.ImportFrom(AdxColumn); - finally - AConverter.Free; - end; -end; - -procedure TcxRealConverterToTableView.ImportSummaryGroups; -var - ASummaryGroups: TObject; - ASummaryItems: TObject; - AcxSummaryGroup: TcxDataSummaryGroup; - AcxSummaryItem: TcxGridDBTableSummaryItem; - I, J, K: Integer; - ASeparator: string; - AFieldName: string; - AIsDefaultGroup: Boolean; - AdxColumn: TComponent; - ABeginText, AEndText: string; -begin - ASeparator := Converter.GetStringProperty(nil, 'SummarySeparator', ''); - ASummaryGroups := Converter.GetClassProperty(nil, 'SummaryGroups'); - if ASummaryGroups <> nil then - begin - if ASummaryGroups is TCollection then - with TCollection(ASummaryGroups) do - begin - for I := 0 to Count - 1 do - begin - ABeginText := Converter.GetStringProperty(Items[I], 'BeginSummaryText', ''); - AEndText := Converter.GetStringProperty(Items[I], 'EndSummaryText', ''); - AIsDefaultGroup := Converter.GetBooleanProperty(Items[I], 'DefaultGroup', True); - if AIsDefaultGroup then - begin - cxGridView.DataController.Summary.DefaultGroupSummaryItems.BeginText := ABeginText; - cxGridView.DataController.Summary.DefaultGroupSummaryItems.EndText := AEndText; - cxGridView.DataController.Summary.DefaultGroupSummaryItems.Separator := ASeparator; - AcxSummaryGroup := nil; - end - else - begin - AcxSummaryGroup := cxGridView.DataController.Summary.SummaryGroups.Add; - AcxSummaryGroup.SummaryItems.BeginText := ABeginText; - AcxSummaryGroup.SummaryItems.EndText := AEndText; - AcxSummaryGroup.SummaryItems.Separator := ASeparator; - end; - if AcxSummaryGroup <> nil then - FcxSummaryGroups.AddObject(Converter.GetStringProperty(Items[I], 'Name', ''), AcxSummaryGroup); - ASummaryItems := Converter.GetClassProperty(Items[I], 'SummaryItems'); - if ASummaryItems <> nil then - begin - if ASummaryItems is TCollection then - with TCollection(ASummaryItems) do - begin - for J := 0 to Count - 1 do - begin - if AIsDefaultGroup then - AcxSummaryItem := TcxGridDBTableSummaryItem(cxGridView.DataController.Summary.DefaultGroupSummaryItems.Add) - else - AcxSummaryItem := TcxGridDBTableSummaryItem(AcxSummaryGroup.SummaryItems.Add); - AcxSummaryItem.Column := nil; - AdxColumn := GetColumn(Converter.GetStringProperty(Items[J], 'ColumnName', '')); - if AdxColumn <> nil then - begin - AFieldName := Converter.GetStringProperty(AdxColumn, 'FieldName', ''); - for K := 0 to cxGridView.ColumnCount - 1 do - if TcxGridDbTableView(cxGridView).Columns[K].DataBinding.FieldName = AFieldName then - begin - AcxSummaryItem.Column := TcxGridDBTableView(cxGridView).Columns[K]; - AcxSummaryItem.Position := spFooter; - Break; - end; - end; - AcxSummaryItem.FieldName := Converter.GetStringProperty(Items[J], 'SummaryField', ''); - AcxSummaryItem.Format := Converter.GetStringProperty(Items[J], 'SummaryFormat', AcxSummaryItem.Format); - AcxSummaryItem.Kind := GetSummaryKind(Converter.GetEnumProperty(Items[J], 'SummaryType')); - end; - end; - end; - end; - end; - end; -end; - -procedure TcxRealConverterToTableView.ImportSyncMode(const AValue: Boolean); -begin - TcxGridDBTableView(cxGridView).DataController.DataModeController.SyncMode := AValue; -end; - -function TcxRealConverterToTableView.TestPreviewFieldName(AIndex: Integer; - const APreview: string): Boolean; -begin - Result := TcxGridDBTableView(cxGridView).Columns[AIndex].DataBinding.FieldName = APreview; -end; - -function TcxRealConverterToTableView.DefaultPreviewFont(AFont: TFont): Boolean; -begin - if AFont = nil then - begin - Result := True; - Exit; - end; - with AFont do - Result := - (Pitch = DefFontData.Pitch) and - (Style = DefFontData.Style) and - (Charset = DefFontData.Charset) and - (Name = dxShortStringToString(DefFontData.Name)) and - (Color = clBlue) and - (Size = 8); -end; - -function TcxRealConverterToTableView.GetColumn(const AName: string): TComponent; -var - AColumns: TList; - I: Integer; -begin - Result := nil; - AColumns := TList.Create; - try - GetColumns(AColumns); - for I := 0 to AColumns.Count - 1 do - if Converter.GetStringProperty(TComponent(AColumns[I]), 'Name', '') = AName then - begin - Result := TComponent(AColumns[I]); - Break; - end; - finally - AColumns.Free; - end; -end; - -procedure TcxRealConverterToTableView.GetColumns(AColumns: TList); -var - AForm: TComponent; - I: Integer; -begin - AForm := Converter.Source.Owner; - for I := 0 to AForm.ComponentCount - 1 do - begin - if AForm.Components[I].GetParentComponent = Converter.Source then - AColumns.Add(AForm.Components[I]); - end; - if AColumns.Count = 0 then - begin - for I := 0 to Converter.Source.ComponentCount - 1 do - begin - if Converter.Source.Components[I].GetParentComponent = Converter.Source then - AColumns.Add(Converter.Source.Components[I]); - end; - end; -end; - -function TcxRealConverterToTableView.GetCXColumnByFieldName(const AFieldName: string): TcxGridDBColumn; -var - I: Integer; -begin - Result := nil; - for I := 0 to cxGridView.ColumnCount - 1 do - begin - if TcxGridDBTableView(cxGridView).Columns[I].DataBinding.FieldName = AFieldName then - begin - Result := TcxGridDBTableView(cxGridView).Columns[I]; - Break; - end; - end; -end; - -function TcxRealConverterToTableView.GetcxGrid: TcxCustomGrid; -begin - Result := Converter.Destination; -end; - -function TcxRealConverterToTableView.GetcxGridView: TcxGridTableView; -begin - Result := Converter.cxGridView as TcxGridTableView; -end; - -function TcxRealConverterToTableView.ConvertColumnShowEditButtons( - const AStyle: string): TcxGridItemShowEditButtons; -begin - if AStyle = 'sbDefault' then - Result := isebDefault - else if AStyle = 'sbAlways' then - Result := isebAlways - else if AStyle = 'sbNone' then - Result := isebNever - else - Result := isebDefault; -end; - -function TcxRealConverterToTableView.GetSummaryKind( - const AType: string): TcxSummaryKind; -begin - if AType = 'cstNone' then - Result := skNone - else if AType = 'cstAvg' then - Result := skAverage - else if AType = 'cstCount' then - Result := skCount - else if AType = 'cstMax' then - Result := skMax - else if AType = 'cstMin' then - Result := skMin - else if AType = 'cstSum' then - Result := skSum - else - Result := skNone; -end; - -{ TcxRealConverterToBandedTableView } - -procedure TcxRealConverterToBandedTableView.DoImport; -begin - TcxGridDBBandedTableView(cxGridView).DataController.DataSource := - Converter.GetClassProperty(nil, 'DataSource') as TDataSource; - ImportDXOptionsView; - ImportDXFilter; - ImportBands; - ImportColumns; - TcxGridDBBandedTableView(cxGridView).DataController.KeyFieldNames := - Converter.GetStringProperty(nil, 'KeyField', ''); - ImportGrid; -end; - -procedure TcxRealConverterToBandedTableView.DoImportStyles; -begin - ImportGridStyles; - ImportBandsStyles; - ImportColumnsStyles; -end; - -procedure TcxRealConverterToBandedTableView.AssignColumn(AColumn: TcxGridColumn; - ADXColumn: TObject; AIndex: Integer); -begin - with TcxGridDBBandedColumn(AColumn) do - begin - Position.BandIndex := Converter.GetIntegerProperty(ADXColumn, 'BandIndex', Position.BandIndex); - Position.ColIndex := Converter.GetIntegerProperty(ADXColumn, 'ColIndex', Position.ColIndex); - Options.VertSizing := Converter.GetBooleanProperty(ADXColumn, 'Sizing', Options.VertSizing); - Position.RowIndex := Converter.GetIntegerProperty(ADXColumn, 'RowIndex', Position.RowIndex); - end; - inherited AssignColumn(AColumn, ADXColumn, AIndex); -end; - -procedure TcxRealConverterToBandedTableView.ImportAutoDataSetFilter(const AValue: Boolean); -begin - TcxGridDBBandedTableView(cxGridView).DataController.Filter.AutoDataSetFilter := AValue; -end; - -procedure TcxRealConverterToBandedTableView.ImportColumnSummaryGroups; - function GetCXColumnByFieldName(const AFieldName: string): TcxGridDBBandedColumn; - var - I: Integer; - begin - Result := nil; - for I := 0 to cxGridView.ColumnCount - 1 do - begin - if TcxGridDbBandedTableView(cxGridView).Columns[I].DataBinding.FieldName = AFieldName then - begin - Result := TcxGridDbBandedTableView(cxGridView).Columns[I]; - Break; - end; - end; - end; -var - AColumns: TList; - AColumn: TcxGridDBBandedColumn; - ASummaryField: string; - ASummaryFormat: string; - ASummaryGroupName: string; - ASummaryType: string; - ASummaryGroup: TcxDataSummaryGroup; - ASummaryItem: TcxGridDBTableSummaryItem; - ALink: TcxGridTableSummaryGroupItemLink; - AIndex: Integer; - I: Integer; -begin - AColumns := TList.Create; - try - GetColumns(AColumns); - for I := 0 to AColumns.Count - 1 do - begin - AColumn := GetCXColumnByFieldName(Converter.GetStringProperty(AColumns[I], 'FieldName', '')); - if AColumn = nil then - Continue; - ASummaryField := Converter.GetStringProperty(TComponent(AColumns[I]), 'SummaryField', ''); - ASummaryFormat := Converter.GetStringProperty(TComponent(AColumns[I]), 'SummaryFormat', ''); - ASummaryType := Converter.GetEnumProperty(TComponent(AColumns[I]), 'SummaryType'); - ASummaryGroupName := Converter.GetStringProperty(TComponent(AColumns[I]), 'SummaryGroupName', ''); - if ASummaryGroupName <> '' then - begin - if FcxSummaryGroups.Find(ASummaryGroupName, AIndex) then - begin - ASummaryGroup := TcxDataSummaryGroup(FcxSummaryGroups.Objects[AIndex]); - ALink := TcxGridTableSummaryGroupItemLink(ASummaryGroup.Links.Add); - ALink.Column := AColumn; - end; - end; - if (ASummaryField <> '') and (ASummaryType <> 'cstNone') then - begin - ASummaryGroup := cxGridView.DataController.Summary.SummaryGroups.Add; - ASummaryItem := TcxGridDBTableSummaryItem(ASummaryGroup.SummaryItems.Add); - ASummaryItem.FieldName := ASummaryField; - ASummaryItem.Format := ASummaryFormat; - ASummaryItem.Kind := GetSummaryKind(ASummaryType); - ALink := TcxGridTableSummaryGroupItemLink(ASummaryGroup.Links.Add); - ALink.Column := AColumn; - end; - end; - finally - AColumns.Free; - end; -end; - -procedure TcxRealConverterToBandedTableView.AssignDXOptionsView(AList: TStringList); -var - I: Integer; -begin - with cxGridView do - FBandHeaderWidth := AList.Find('edgoBandHeaderWidth', I); - inherited AssignDXOptionsView(AList); -end; - -procedure TcxRealConverterToBandedTableView.AssignGrid; -begin - with cxGridView do - begin - OptionsView.BandHeaders := Converter.GetBooleanProperty(nil, 'ShowBands', OptionsView.BandHeaders); - OptionsView.FixedBandSeparatorWidth := Converter.GetIntegerProperty(nil, 'FixedBandLineWidth', - OptionsView.FixedBandSeparatorWidth); - end; - inherited AssignGrid; -end; - -procedure TcxRealConverterToBandedTableView.AssignSummaryItem(AColumn: TcxGridColumn; ADXColumn: TObject); -var - ASummaryFooterType: string; - AcxSummaryFooterItem: TcxGridDBTableSummaryItem; -begin - ASummaryFooterType := Converter.GetEnumProperty(ADXColumn, 'SummaryFooterType'); - if ASummaryFooterType <> 'cstNone' then - begin - AcxSummaryFooterItem := TcxGridDBTableSummaryItem( - TcxGridDBBandedTableView(cxGridView).DataController.Summary.FooterSummaryItems.Add); - AcxSummaryFooterItem.FieldName := Converter.GetStringProperty(ADXColumn, 'SummaryFooterField', ''); - AcxSummaryFooterItem.Format := Converter.GetStringProperty(ADXColumn, 'SummaryFooterFormat', - AcxSummaryFooterItem.Format); - AcxSummaryFooterItem.Kind := GetSummaryKind(ASummaryFooterType); - AcxSummaryFooterItem.Column := AColumn; - end; -end; - -function TcxRealConverterToBandedTableView.CreateColumn: TcxGridColumn; -begin - Result := TcxGridDBBandedTableView(cxGridView).CreateColumn; -end; - -procedure TcxRealConverterToBandedTableView.ImportColumnsStyles; -var - AColumns: TList; - AColumn: TcxGridDBBandedColumn; - I: Integer; - AColor: Integer; - AFont: TFont; - AStyle: TcxCustomStyle; -begin - AColumns := TList.Create; - try - GetColumns(AColumns); - for I := 0 to AColumns.Count - 1 do - begin - AColumn := GetCXColumnByFieldName(Converter.GetStringProperty(AColumns[I], 'FieldName', '')); - AColor := Converter.GetIntegerProperty(TComponent(AColumns[I]), 'Color'); - AFont := Converter.GetClassProperty(TComponent(AColumns[I]), 'Font') as TFont; - if ((AColor <> clWindow) and (AColor <> FColor)) or - (not DefaultFont(AFont) and not CompareFonts(AFont, FFont)) then - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := AColor; - (AStyle as TcxStyle).Font.Assign(AFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - AColumn.Styles.Content := AStyle as TcxStyle; - end; - end; - finally - AColumns.Free; - end; -end; - -procedure TcxRealConverterToBandedTableView.ImportBands; -var - ABands: TObject; - AcxGridBand: TcxGridBand; - I: Integer; - AFixed: string; -begin - cxGridView.Bands.Clear; - ABands := Converter.GetClassProperty(nil, 'Bands'); - if ABands <> nil then - begin - if ABands is TCollection then - with TCollection(ABands) do - begin - for I := 0 to Count - 1 do - begin - AcxGridBand := cxGridView.Bands.Add; - if FBandHeaderWidth then - AcxGridBand.Width := 0 - else - AcxGridBand.Width := Converter.GetIntegerProperty(Items[I], 'Width', AcxGridBand.Width); - AcxGridBand.Caption := Converter.GetStringProperty(Items[I], 'Caption', AcxGridBand.Caption); - AcxGridBand.Alignment := ConvertAlignment(Converter.GetEnumProperty(Items[I], 'Alignment')); - AcxGridBand.Visible := Converter.GetBooleanProperty(Items[I], 'Visible', AcxGridBand.Visible); - AcxGridBand.Options.Sizing := Converter.GetBooleanProperty(Items[I], 'Sizing', AcxGridBand.Options.Sizing); - AcxGridBand.Options.Moving := not Converter.GetBooleanProperty(Items[I], 'DisableDragging', AcxGridBand.Options.Moving); - AFixed := Converter.GetEnumProperty(Items[I], 'Fixed'); - if AFixed = 'bfLeft' then - AcxGridBand.FixedKind := fkLeft - else if AFixed = 'bfNone' then - AcxGridBand.FixedKind := fkNone - else if AFixed = 'bfRight' then - AcxGridBand.FixedKind := fkRight; - end; - end; - end; - cxGridView.OptionsView.BandHeaders := Converter.GetBooleanProperty(nil, 'ShowBands', cxGridView.OptionsView.BandHeaders); -end; - -procedure TcxRealConverterToBandedTableView.ImportBandsStyles; -var - ABandColor: Integer; - ABandFont: TFont; - AStyle: TcxCustomStyle; -begin - ABandColor := Converter.GetIntegerProperty(nil, 'BandColor'); - ABandFont := Converter.GetClassProperty(nil, 'BandFont') as TFont; - if (ABandColor <> clBtnFace) or not DefaultFont(ABandFont) then - begin - AStyle := Converter.CreateStyleItem; - (AStyle as TcxStyle).Color := ABandColor; - (AStyle as TcxStyle).Font.Assign(ABandFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - cxGridView.Styles.BandHeader := AStyle as TcxStyle; - end; -end; - -procedure TcxRealConverterToBandedTableView.ImportSummaryGroups; -var - ASummaryGroups: TObject; - ASummaryItems: TObject; - AcxSummaryGroup: TcxDataSummaryGroup; - AcxSummaryItem: TcxGridDBTableSummaryItem; - I, J, K: Integer; - ASeparator: string; - AFieldName: string; - AIsDefaultGroup: Boolean; - AdxColumn: TComponent; - ABeginText, AEndText: string; -begin - ASeparator := Converter.GetStringProperty(nil, 'SummarySeparator', ''); - ASummaryGroups := Converter.GetClassProperty(nil, 'SummaryGroups'); - if ASummaryGroups <> nil then - begin - if ASummaryGroups is TCollection then - with TCollection(ASummaryGroups) do - begin - for I := 0 to Count - 1 do - begin - ABeginText := Converter.GetStringProperty(Items[I], 'BeginSummaryText', ''); - AEndText := Converter.GetStringProperty(Items[I], 'EndSummaryText', ''); - AIsDefaultGroup := Converter.GetBooleanProperty(Items[I], 'DefaultGroup', false); - if AIsDefaultGroup then - begin - cxGridView.DataController.Summary.DefaultGroupSummaryItems.BeginText := ABeginText; - cxGridView.DataController.Summary.DefaultGroupSummaryItems.EndText := AEndText; - cxGridView.DataController.Summary.DefaultGroupSummaryItems.Separator := ASeparator; - AcxSummaryGroup := nil; - end - else - begin - AcxSummaryGroup := cxGridView.DataController.Summary.SummaryGroups.Add; - AcxSummaryGroup.SummaryItems.BeginText := ABeginText; - AcxSummaryGroup.SummaryItems.EndText := AEndText; - AcxSummaryGroup.SummaryItems.Separator := ASeparator; - end; - if AcxSummaryGroup <> nil then - FcxSummaryGroups.AddObject(Converter.GetStringProperty(Items[I], 'Name', ''), AcxSummaryGroup); - ASummaryItems := Converter.GetClassProperty(Items[I], 'SummaryItems'); - if ASummaryItems <> nil then - begin - if ASummaryItems is TCollection then - with TCollection(ASummaryItems) do - begin - for J := 0 to Count - 1 do - begin - if AIsDefaultGroup then - AcxSummaryItem := TcxGridDBTableSummaryItem(cxGridView.DataController.Summary.DefaultGroupSummaryItems.Add) - else - AcxSummaryItem := TcxGridDBTableSummaryItem(AcxSummaryGroup.SummaryItems.Add); - AcxSummaryItem.Column := nil; - AdxColumn := GetColumn(Converter.GetStringProperty(Items[J], 'ColumnName', '')); - if AdxColumn <> nil then - begin - AFieldName := Converter.GetStringProperty(AdxColumn, 'FieldName', ''); - for K := 0 to cxGridView.ColumnCount - 1 do - if TcxGridDBBandedTableView(cxGridView).Columns[K].DataBinding.FieldName = AFieldName then - begin - AcxSummaryItem.Column := TcxGridDBBandedTableView(cxGridView).Columns[K]; - AcxSummaryItem.Position := spFooter; - Break; - end; - end; - AcxSummaryItem.FieldName := Converter.GetStringProperty(Items[J], 'SummaryField', ''); - AcxSummaryItem.Format := Converter.GetStringProperty(Items[J], 'SummaryFormat', AcxSummaryItem.Format); - AcxSummaryItem.Kind := GetSummaryKind(Converter.GetEnumProperty(Items[J], 'SummaryType')); - end; - end; - end; - end; - end; - end; -end; - -procedure TcxRealConverterToBandedTableView.ImportSyncMode(const AValue: Boolean); -begin - TcxGridDBBandedTableView(cxGridView).DataController.DataModeController.SyncMode := AValue; -end; - -function TcxRealConverterToBandedTableView.TestPreviewFieldName( - AIndex: Integer; const APreview: string): Boolean; -begin - Result := TcxGridDBBandedTableView(cxGridView).Columns[AIndex].DataBinding.FieldName = APreview; -end; - -function TcxRealConverterToBandedTableView.GetCXColumnByFieldName( - const AFieldName: string): TcxGridDBBandedColumn; -var - I: Integer; -begin - Result := nil; - for I := 0 to cxGridView.ColumnCount - 1 do - begin - if TcxGridDBBandedTableView(cxGridView).Columns[I].DataBinding.FieldName = AFieldName then - begin - Result := TcxGridDBBandedTableView(cxGridView).Columns[I]; - Break; - end; - end; -end; - -function TcxRealConverterToBandedTableView.GetcxGridView: TcxGridBandedTableView; -begin - Result := Converter.cxGridView as TcxGridBandedTableView; -end; - -procedure TcxRealConverterToBandedTableView.ImportDXOptionsCustomize; -var - AList: TStringList; - I: Integer; -begin - AList := TStringList.Create; - try - Converter.EnablePropertyException; - try - Converter.GetSetProperty(nil, 'OptionsCustomize', AList); - AList.Sort; - with cxGridView do - begin - OptionsCustomize.BandMoving := AList.Find('edgoBandMoving', I); - OptionsCustomize.BandSizing := AList.Find('edgoBandSizing', I); - OptionsCustomize.ColumnVertSizing := AList.Find('edgoColumnSizing', I); - OptionsCustomize.BandHiding := AList.Find('edgoExtCustomizing', I); - end; - except - on EcxUnknownProperty do; - end; - finally - AList.Free; - Converter.DisablePropertyException; - end; - inherited ImportDXOptionsCustomize; -end; - -{ TcxDXGridConverter } - -class function TcxDXGridConverter.GetSourceClassName: string; -begin - Result := 'TdxDBGrid'; -end; - -procedure TcxDXGridConverter.DoRealImport; -var - ARealConverter: TcxRealConverterToTableView; -begin - if GetGridViewClass = TcxGridDBTableView then - ARealConverter := TcxRealConverterToTableView.Create(Self) - else - ARealConverter := TcxRealConverterToBandedTableView.Create(Self); - try - ARealConverter.DoImport; - finally - ARealConverter.Free; - end; -end; - -procedure TcxDXGridConverter.DoImportStyles; -var - ARealConverter: TcxRealConverterToTableView; -begin - if GetGridViewClass = TcxGridDBTableView then - ARealConverter := TcxRealConverterToTableView.Create(Self) - else - ARealConverter := TcxRealConverterToBandedTableView.Create(Self); - try - ARealConverter.DoImportStyles; - finally - ARealConverter.Free; - end; -end; - -function TcxDXGridConverter.GetGridViewClass: TcxCustomGridViewClass; -var - ADXBands: TCollection; -begin - Result := TcxGridDBBandedTableView; - EnablePropertyException; - try - if not GetBooleanProperty(nil, 'ShowBands', False) then - begin - ADXBands := GetClassProperty(nil, 'Bands') as TCollection; - if ADXBands <> nil then - if ADXBands.Count = 1 then - begin - if GetStringProperty(ADXBands.Items[0], 'Caption', '') = '' then - Result := TcxGridDBTableView; - end; - end; - except - on EcxUnknownProperty do - Result := TcxGridDBTableView; - end; - DisablePropertyException; -end; - -{ TcxDXGridLayoutConverter } - -procedure TcxDXGridLayoutConverter.DoRealImport; -begin - if FdxDBGrid <> nil then - inherited DoRealImport; -end; - -function TcxDXGridLayoutConverter.GetGridViewClass: TcxCustomGridViewClass; -begin - if FdxDBGrid <> nil then - Result := inherited GetGridViewClass - else - Result := TcxGridDBTableView; -end; - -class function TcxDXGridLayoutConverter.GetSourceClassName: string; -begin - Result := 'TdxDBGridLayout'; -end; - -procedure TcxDXGridLayoutConverter.PostImport; -begin - FdxDBGrid.Free; - FdxDBGrid := nil; - if FComponent <> nil then - Source := FComponent; -end; - -procedure TcxDXGridLayoutConverter.PreImport; -var - AReader: TcxDXGridLayoutDataReader; - AWriter: TWriter; - AStream: TStringStream; - ADummy: TcxDXGridLayoutDummy; -begin - FdxDBGrid := nil; - FComponent := nil; - if Intermediary = nil then - Exit; - - ADummy := TcxDXGridLayoutDummy.Create(nil); - ADummy.Component := Source; - ADummy.Intermediary := Intermediary; - AStream := TStringStream.Create(''); - try - AWriter := TWriter.Create(AStream, 65536); - try - AWriter.Root := Source.Owner; - AWriter.WriteComponent(Source); - finally - AWriter.Free; - end; - AReader := TcxDXGridLayoutDataReader.Create(AStream, 65536); - AStream.Position := 0; - try - AReader.BeginReferences; - AReader.ReadComponent(ADummy); - FdxDBGrid := ADummy.dxDBGrid; - FComponent := Source; - Source := FdxDBGrid; - finally - AReader.EndReferences; - AReader.Free; - end; - finally - AStream.Free; - ADummy.Free; - end; -end; - -function TcxDXGridLayoutConverter.TestIntermediary: Boolean; -begin - Result := Intermediary <> nil; -end; - -class function TcxDXGridLayoutConverter.GetIntermediaryClassName: string; -begin - Result := 'TdxDBGrid'; -end; - -{ TcxDXGridLayoutDataReader } - -procedure TcxDXGridLayoutDataReader.SetName(Component: TComponent; var Name: string); -begin - Name := ''; -end; - -{ TcxDXGridLayoutDummy } - -constructor TcxDXGridLayoutDummy.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FComponent := nil; - FdxDBGrid := nil; - FIntermediary := nil; -end; - -procedure TcxDXGridLayoutDummy.DefineProperties(Filer: TFiler); -begin - Filer.DefineBinaryProperty('Data', ReadData, nil, False); -end; - -procedure TcxDXGridLayoutDummy.ReadData(Stream: TStream); -var - AClass: TFormClass; - ASize: Integer; -begin - if FIntermediary = nil then - Exit; - try - AClass := TFormClass(FIntermediary.ClassType); - Stream.ReadBuffer(ASize, SizeOf(ASize)); - FdxDBGrid := AClass.Create(Component.Owner); - FdxDBGrid := Stream.ReadComponent(FdxDBGrid); - (FdxDBGrid as TControl).Parent := Component.Owner as TWinControl; - except - FdxDBGrid.Free; - FdxDBGrid := nil; - raise; - end; -end; - -initialization - ConverterFactory(cxGridGroupConverterName).RegisterConverter('DX Grid Converter', TcxDXGridConverter); - ConverterFactory(cxGridGroupConverterName).RegisterConverter('DX Grid Layout Converter', TcxDXGridLayoutConverter); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxFilterDialog.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxFilterDialog.dfm deleted file mode 100644 index b4e859b6..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxFilterDialog.dfm +++ /dev/null @@ -1,135 +0,0 @@ -object cxFilterDialog: TcxFilterDialog - Left = 421 - Top = 148 - HorzScrollBar.Visible = False - VertScrollBar.Visible = False - ActiveControl = cbOperator1 - BorderIcons = [biSystemMenu] - BorderStyle = bsDialog - Caption = 'Custom Filter' - ClientHeight = 206 - ClientWidth = 414 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - object lblTitle: TLabel - Left = 8 - Top = 8 - Width = 87 - Height = 13 - Caption = 'Show rows where:' - Transparent = True - end - object bvlLine: TBevel - Left = 8 - Top = 34 - Width = 396 - Height = 4 - Shape = bsTopLine - end - object lblColumnCaption: TLabel - Left = 8 - Top = 27 - Width = 71 - Height = 13 - Caption = 'ColumnCaption' - Transparent = True - end - object lblSingle: TLabel - Left = 8 - Top = 134 - Width = 185 - Height = 13 - Caption = 'Use ? to represent any single character' - Transparent = True - end - object lblSeries: TLabel - Left = 8 - Top = 153 - Width = 200 - Height = 13 - Caption = 'Use * to represent any series of characters' - Transparent = True - end - object lblEdit1PlaceHolder: TLabel - Left = 208 - Top = 46 - Width = 193 - Height = 21 - AutoSize = False - Color = clGreen - ParentColor = False - Visible = False - end - object lblEdit2PlaceHolder: TLabel - Left = 208 - Top = 96 - Width = 193 - Height = 21 - AutoSize = False - Color = clGreen - ParentColor = False - Visible = False - end - object cbOperator1: TcxComboBox - Left = 8 - Top = 46 - Properties.DropDownListStyle = lsFixedList - TabOrder = 0 - OnClick = cbOperator1Click - Width = 193 - end - object cbOperator2: TcxComboBox - Left = 8 - Top = 96 - Properties.DropDownListStyle = lsFixedList - Properties.OnChange = cbOperator2PropertiesChange - TabOrder = 3 - Width = 193 - end - object btnOK: TcxButton - Left = 248 - Top = 176 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 4 - end - object btnCancel: TcxButton - Left = 330 - Top = 176 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 5 - end - object rbAnd: TcxRadioButton - Tag = 1 - Left = 56 - Top = 74 - Width = 60 - Height = 17 - Caption = '&And' - Checked = True - TabOrder = 1 - TabStop = True - Transparent = True - end - object rbOr: TcxRadioButton - Tag = 1 - Left = 120 - Top = 74 - Width = 65 - Height = 17 - Caption = '&Or' - TabOrder = 2 - Transparent = True - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxFilterDialog.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxFilterDialog.pas deleted file mode 100644 index f6ecfc17..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxFilterDialog.pas +++ /dev/null @@ -1,519 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxFilterDialog; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Controls, Graphics, ExtCtrls, Forms, StdCtrls, SysUtils, cxButtonEdit, - cxButtons, cxContainer, cxControls, cxDataStorage, cxDropDownEdit, cxEdit, - cxFilter, cxFilterConsts, cxFilterControlUtils, cxLookAndFeels, cxMaskEdit, - cxTextEdit, cxLookAndFeelPainters, cxRadioGroup, cxGraphics, Menus; - -type - TcxFilterDialogClass = class of TcxFilterDialog; - - TcxFilterDialog = class(TForm) - lblTitle: TLabel; - lblColumnCaption: TLabel; - bvlLine: TBevel; - lblSingle: TLabel; - lblSeries: TLabel; - btnOK: TcxButton; - btnCancel: TcxButton; - lblEdit1PlaceHolder: TLabel; - lblEdit2PlaceHolder: TLabel; - cbOperator1: TcxComboBox; - cbOperator2: TcxComboBox; - rbAnd: TcxRadioButton; - rbOr: TcxRadioButton; - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure cbOperator1Click(Sender: TObject); - procedure cbOperator2PropertiesChange(Sender: TObject); - private - FCriteria: TcxFilterCriteria; - FDisplayValue1: TCaption; - FDisplayValue2: TCaption; - FEdit1: TcxCustomEdit; - FEdit2: TcxCustomEdit; - FEditProperties: TcxCustomEditProperties; - FFilterEditHelper: TcxCustomFilterEditHelperClass; - FItemLink: TObject; - FValue1: Variant; - FValue2: Variant; - FValueTypeClass: TcxValueTypeClass; - protected - procedure AddFilterItem(AParent: TcxFilterCriteriaItemList; AComboBox: TcxComboBox; - AValue: Variant; ADisplayValue: string); - procedure CheckWildcardDescriptionVisibility; - procedure CreateParams(var Params: TCreateParams); override; - procedure GetFilterValues(AEdit: TcxCustomEdit; var AValue: Variant; - var ADisplayValue: TCaption); - function GetOperatorComboBox(AEdit: TcxCustomEdit): TcxComboBox; virtual; - function GetSupportedOperators: TcxFilterControlOperators; virtual; - procedure InitControls(const ACriteriaItemCaption: string); virtual; - procedure InitControlValues; virtual; - procedure InitEdits(AComboBox: TcxComboBox; AEdit: TcxCustomEdit; - AItem: TcxFilterCriteriaItem); - procedure InitLookAndFeel(ALookAndFeel: TcxLookAndFeel); virtual; - procedure SetEditValidChars(AEdit: TcxCustomEdit); - procedure ValidateValue(AEdit: TcxCustomEdit; var AValue: Variant); - - property DisplayValue1: TCaption read FDisplayValue1; - property DisplayValue2: TCaption read FDisplayValue2; - property Edit1: TcxCustomEdit read FEdit1; - property Edit2: TcxCustomEdit read FEdit2; - property FilterEditHelper: TcxCustomFilterEditHelperClass read FFilterEditHelper; - property SupportedOperators: TcxFilterControlOperators read GetSupportedOperators; - property Value1: Variant read FValue1; - property Value2: Variant read FValue2; - public - constructor Create(ACriteria: TcxFilterCriteria; AItemLink: TObject; - AEditProperties: TcxCustomEditProperties; const ACriteriaItemCaption: string; - AValueTypeClass: TcxValueTypeClass; ALookAndFeel: TcxLookAndFeel; AFont: TFont); reintroduce; virtual; - procedure ApplyChanges; virtual; - class function GetFilterEditHelper(AEditProperties: TcxCustomEditProperties): TcxCustomFilterEditHelperClass; - - property Criteria: TcxFilterCriteria read FCriteria; - property EditProperties: TcxCustomEditProperties read FEditProperties; - property ItemLink: TObject read FItemLink; - property ValueTypeClass: TcxValueTypeClass read FValueTypeClass; - end; - -var - cxFilterDialogClass: TcxFilterDialogClass = TcxFilterDialog; - -function IsFilterControlDialogNeeded(ACriteria: TcxFilterCriteria): Boolean; -function ShowFilterDialog(ACriteria: TcxFilterCriteria; - AItemLink: TObject; AEditProperties: TcxCustomEditProperties; - const ACriteriaItemCaption: string; AValueTypeClass: TcxValueTypeClass; - ALookAndFeel: TcxLookAndFeel = nil; AFont: TFont = nil): Boolean; - -implementation - -{$R *.dfm} - -uses -{$IFNDEF DELPHI6} - cxVariants, -{$ENDIF} - cxClasses, cxFilterControlStrs; - -function IsFilterControlDialogNeeded(ACriteria: TcxFilterCriteria): Boolean; -const - SupportedKinds: TcxFilterOperatorKinds = [foEqual..foNotLike]; -var - AItemLinks: TList; - - function SimpleList(AList: TcxFilterCriteriaItemList): Boolean; - var - I: Integer; - AItem: TcxCustomFilterCriteriaItem; - AItemLink: TObject; - begin - Result := False; - with AList do - begin - if (Count <> 2) or not (BoolOperatorKind in [fboAnd, fboOr]) then - Exit; - for I := 0 to Count - 1 do - begin - AItem := Items[I]; - if AItem.IsItemList or not (TcxFilterCriteriaItem(AItem).OperatorKind in SupportedKinds) then - Exit; - end; - AItemLink := TcxFilterCriteriaItem(Items[0]).ItemLink; - Result := (AItemLink = TcxFilterCriteriaItem(Items[1]).ItemLink) and - (AItemLinks.IndexOf(AItemLink) = -1); - if Result then - AItemLinks.Add(AItemLink); - end; - end; - - function SimpleItem(AItem: TcxCustomFilterCriteriaItem): Boolean; - begin - if AItem.IsItemList then - Result := SimpleList(TcxFilterCriteriaItemList(AItem)) - else - with TcxFilterCriteriaItem(AItem) do - begin - Result := (OperatorKind in SupportedKinds) and (AItemLinks.IndexOf(ItemLink) = -1); - if Result then - AItemLinks.Add(ItemLink); - end; - end; - -var - I: Integer; -begin - AItemLinks := TList.Create; - try - Result := ACriteria.Root.BoolOperatorKind <> fboAnd; - if not Result then - for I := 0 to ACriteria.Root.Count - 1 do - begin - Result := not SimpleItem(ACriteria.Root.Items[I]); - if Result then Break; - end; - finally - AItemLinks.Free; - end; -end; - -function ShowFilterDialog(ACriteria: TcxFilterCriteria; - AItemLink: TObject; AEditProperties: TcxCustomEditProperties; - const ACriteriaItemCaption: string; AValueTypeClass: TcxValueTypeClass; - ALookAndFeel: TcxLookAndFeel = nil; AFont: TFont = nil): Boolean; -var - ADialog: TcxFilterDialog; -begin - Result := False; - if cxFilterDialogClass.GetFilterEditHelper(AEditProperties) = nil then - Exit; - ADialog := cxFilterDialogClass.Create(ACriteria, AItemLink, AEditProperties, - ACriteriaItemCaption, AValueTypeClass, ALookAndFeel, AFont); - try - Result := ADialog.ShowModal = mrOK; - if Result then ADialog.ApplyChanges; - finally - ADialog.Free; - end; -end; - -procedure FillOperatorComboBox(AComboBox: TcxComboBox; AOperators: TcxFilterControlOperators); -var - AOperator: TcxFilterControlOperator; -begin - for AOperator := Low(TcxFilterControlOperator) to High(TcxFilterControlOperator) do - if AOperator in AOperators then - AComboBox.Properties.Items.AddObject(GetFilterControlOperatorText(AOperator), TObject(AOperator)); -end; - -function GetOperatorIndex(AComboBox: TcxComboBox; AOperator: TcxFilterControlOperator): Integer; -begin - Result := AComboBox.Properties.Items.IndexOfObject(TObject(AOperator)); -end; - -function GetOperator(AComboBox: TcxComboBox): TcxFilterControlOperator; - - function GetStartItemIndex(AComboBox: TcxComboBox): Integer; - begin - if AComboBox.Properties.Items[0] = '' then - Result := 0 - else - Result := -1; - end; - -begin - with AComboBox do - if (ItemIndex = -1) or (ItemIndex = GetStartItemIndex(AComboBox)) then - Result := fcoNone - else - Result := TcxFilterControlOperator(Properties.Items.Objects[ItemIndex]) -end; - -{ TcxFilterDialog } - -constructor TcxFilterDialog.Create(ACriteria: TcxFilterCriteria; AItemLink: TObject; - AEditProperties: TcxCustomEditProperties; const ACriteriaItemCaption: string; - AValueTypeClass: TcxValueTypeClass; ALookAndFeel: TcxLookAndFeel; AFont: TFont); -begin - inherited Create(Application); - FCriteria := ACriteria; - FItemLink := AItemLink; - FEditProperties := AEditProperties; - FValueTypeClass := AValueTypeClass; - FFilterEditHelper := GetFilterEditHelper(FEditProperties); - - Caption := cxGetResourceString(@cxSFilterDialogCaption); - InitControls(ACriteriaItemCaption); - if ALookAndFeel <> nil then - InitLookAndFeel(ALookAndFeel); - if AFont <> nil then - DialogApplyFont(Self, AFont); - InitControlValues; -end; - -procedure TcxFilterDialog.AddFilterItem(AParent: TcxFilterCriteriaItemList; - AComboBox: TcxComboBox; AValue: Variant; ADisplayValue: string); -const - AOperatorKinds: array[fcoEqual .. fcoNotLike] of TcxFilterOperatorKind = - (foEqual, foNotEqual, foLess, foLessEqual, foGreater, foGreaterEqual, - foLike, foNotLike); -var - AOperator: TcxFilterControlOperator; -begin - AOperator := GetOperator(AComboBox); - if AOperator = fcoNone then Exit; - - if AOperator in [fcoBlanks, fcoNonBlanks] then - begin - if AOperator = fcoBlanks then - AOperator := fcoEqual - else - AOperator := fcoNotEqual; - AValue := Null; - ADisplayValue := cxGetResourceString(@cxSFilterBlankCaption); - end; - if VarIsNull(AValue) or (VarIsStr(AValue) and (AValue = '')) then - ADisplayValue := cxGetResourceString(@cxSFilterBlankCaption); - - Criteria.AddItem(AParent, ItemLink, AOperatorKinds[AOperator], AValue, ADisplayValue); -end; - -procedure TcxFilterDialog.CheckWildcardDescriptionVisibility; - - function CheckCombo(AComboBox: TcxComboBox): Boolean; - begin - Result := GetOperator(AComboBox) in [fcoLike, fcoNotLike]; - end; - -begin - lblSingle.Visible := CheckCombo(cbOperator1) or CheckCombo(cbOperator2); - lblSeries.Visible := lblSingle.Visible; -end; - -procedure TcxFilterDialog.CreateParams(var Params: TCreateParams); -begin - inherited CreateParams(Params); -// rollback CorrectDlgParams(Params); -end; - -procedure TcxFilterDialog.GetFilterValues(AEdit: TcxCustomEdit; var AValue: Variant; - var ADisplayValue: TCaption); -begin - AValue := Null; - ADisplayValue := ''; - if GetOperatorComboBox(AEdit).ItemIndex <> -1 then - FilterEditHelper.GetFilterValue(AEdit, EditProperties, AValue, ADisplayValue); - ValidateValue(AEdit, AValue); -end; - -function TcxFilterDialog.GetOperatorComboBox(AEdit: TcxCustomEdit): TcxComboBox; -begin - if AEdit = FEdit1 then - Result := cbOperator1 - else - Result := cbOperator2; -end; - -function TcxFilterDialog.GetSupportedOperators: TcxFilterControlOperators; -begin - Result := FilterEditHelper.GetSupportedFilterOperators(EditProperties, ValueTypeClass); - if not Criteria.SupportedLike then - Result := Result - [fcoLike, fcoNotLike]; -end; - -procedure TcxFilterDialog.InitControls(const ACriteriaItemCaption: string); - - function CreateValueEdit(APlaceHolder: TControl; AOperatorComboBox: TcxComboBox): TcxCustomEdit; - begin - Result := FilterEditHelper.GetFilterEdit(EditProperties); - with Result do - begin - BoundsRect := APlaceHolder.BoundsRect; - Parent := Self; - TabOrder := AOperatorComboBox.TabOrder + 1; - end; - end; - -begin - lblTitle.Caption := cxGetResourceString(@cxSFilterDialogRows); - lblColumnCaption.Caption := ACriteriaItemCaption + ' '; - bvlLine.SetBounds(lblColumnCaption.Left + lblColumnCaption.Width, bvlLine.Top, - bvlLine.Width - lblColumnCaption.Width + bvlLine.Left - lblColumnCaption.Left, - bvlLine.Height); - - rbAnd.Caption := cxGetResourceString(@cxSFilterDialogOperationAnd); - rbOr.Caption := cxGetResourceString(@cxSFilterDialogOperationOr); - lblSingle.Caption := cxGetResourceString(@cxSFilterDialogUse) + ' ' + - Criteria.UnderscoreWildcard + ' ' + cxGetResourceString(@cxSFilterDialogSingleCharacter); - lblSeries.Caption := cxGetResourceString(@cxSFilterDialogUse) + ' ' + - Criteria.PercentWildcard + ' ' + cxGetResourceString(@cxSFilterDialogCharactersSeries); - btnOK.Caption := cxGetResourceString(@cxSFilterControlDialogActionOkCaption); - btnCancel.Caption := cxGetResourceString(@cxSFilterControlDialogActionCancelCaption); - - // Operator ComboBoxes - FillOperatorComboBox(cbOperator1, SupportedOperators); - with cbOperator1.Properties do - DropDownRows := Items.Count; - with cbOperator2.Properties do - begin - Items.Assign(cbOperator1.Properties.Items); - Items.Insert(0, ''); - DropDownRows := Items.Count; - end; - - // Value Edits - FEdit1 := CreateValueEdit(lblEdit1PlaceHolder, cbOperator1); - rbAnd.TabOrder := FEdit1.TabOrder + 1; - FEdit2 := CreateValueEdit(lblEdit2PlaceHolder, cbOperator2); -end; - -procedure TcxFilterDialog.InitControlValues; -var - AItem: TcxFilterCriteriaItem; -begin - // default values - if (fcoLike in SupportedOperators) and (ValueTypeClass <> nil) and ValueTypeClass.IsString then - cbOperator1.ItemIndex := GetOperatorIndex(cbOperator1, fcoLike) - else - if fcoEqual in SupportedOperators then - cbOperator1.ItemIndex := GetOperatorIndex(cbOperator1, fcoEqual) - else - cbOperator1.ItemIndex := 0; - cbOperator2.ItemIndex := 0; - - // current values - AItem := Criteria.FindItemByItemLink(ItemLink); - if AItem <> nil then - begin - InitEdits(cbOperator1, FEdit1, AItem); - if (AItem.Parent <> Criteria.Root) and (AItem.Parent.Items[1] <> nil) then - begin - rbAnd.Checked := AItem.Parent.BoolOperatorKind = fboAnd; - rbOr.Checked := not rbAnd.Checked; - AItem := TcxFilterCriteriaItem(AItem.Parent.Items[1]); - InitEdits(cbOperator2, FEdit2, AItem); - end; - end; - - SetEditValidChars(FEdit1); - SetEditValidChars(FEdit2); - CheckWildcardDescriptionVisibility; -end; - -procedure TcxFilterDialog.InitEdits(AComboBox: TcxComboBox; AEdit: TcxCustomEdit; - AItem: TcxFilterCriteriaItem); -var - AOperator: TcxFilterControlOperator; -begin - AOperator := GetFilterControlOperator(AItem.OperatorKind, AItem.ValueIsNull(AItem.Value)); - AComboBox.ItemIndex := GetOperatorIndex(AComboBox, AOperator); - FilterEditHelper.SetFilterValue(AEdit, EditProperties, AItem.Value); -end; - -procedure TcxFilterDialog.InitLookAndFeel(ALookAndFeel: TcxLookAndFeel); -begin - cbOperator1.Style.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - FEdit1.Style.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - rbAnd.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - rbOr.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - cbOperator2.Style.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - FEdit2.Style.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - btnOK.LookAndFeel.MasterLookAndFeel := ALookAndFeel; - btnCancel.LookAndFeel.MasterLookAndFeel := ALookAndFeel; -end; - -procedure TcxFilterDialog.SetEditValidChars(AEdit: TcxCustomEdit); -var - AWildcardChars: set of AnsiChar; -begin - AWildcardChars := [AnsiChar(Criteria.UnderscoreWildcard), AnsiChar(Criteria.PercentWildcard)]; - if AEdit is TcxCustomTextEdit then - with TcxCustomTextEdit(AEdit) do - if GetOperator(GetOperatorComboBox(AEdit)) in [fcoLike, fcoNotLike] then - ActiveProperties.ValidChars := ActiveProperties.ValidChars + AWildcardChars - else - ActiveProperties.ValidChars := ActiveProperties.ValidChars - AWildcardChars; -end; - -procedure TcxFilterDialog.ValidateValue(AEdit: TcxCustomEdit; var AValue: Variant); -begin - FilterControlValidateValue(AEdit, AValue, GetOperator(GetOperatorComboBox(AEdit)), - ValueTypeClass, FilterEditHelper); -end; - -procedure TcxFilterDialog.ApplyChanges; -var - AItemList: TcxFilterCriteriaItemList; -begin - Criteria.BeginUpdate; - try - Criteria.Root.BoolOperatorKind := fboAnd; - Criteria.RemoveItemByItemLink(ItemLink); - if cbOperator2.ItemIndex <> 0 then - begin - AItemList := Criteria.Root.AddItemList(TcxFilterBoolOperatorKind(rbOr.Checked)); - AddFilterItem(AItemList, cbOperator1, FValue1, FDisplayValue1); - AddFilterItem(AItemList, cbOperator2, FValue2, FDisplayValue2); - end - else - AddFilterItem(nil, cbOperator1, FValue1, FDisplayValue1); - finally - Criteria.EndUpdate; - end; -end; - -class function TcxFilterDialog.GetFilterEditHelper(AEditProperties: TcxCustomEditProperties): TcxCustomFilterEditHelperClass; -begin - Result := FilterEditsController.FindHelper(AEditProperties.ClassType); -end; - -procedure TcxFilterDialog.FormCloseQuery(Sender: TObject; var CanClose: Boolean); -begin - if ModalResult <> mrOK then Exit; - - CanClose := False; - - FEdit1.ValidateEdit(True); - FEdit2.ValidateEdit(True); - btnOK.SetFocus; - - GetFilterValues(FEdit1, FValue1, FDisplayValue1); - GetFilterValues(FEdit2, FValue2, FDisplayValue2); - - CanClose := True; -end; - -procedure TcxFilterDialog.cbOperator1Click(Sender: TObject); -begin - SetEditValidChars(FEdit1); - CheckWildcardDescriptionVisibility; -end; - -procedure TcxFilterDialog.cbOperator2PropertiesChange(Sender: TObject); //!!! -begin - SetEditValidChars(FEdit2); - CheckWildcardDescriptionVisibility; -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGrid.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGrid.pas deleted file mode 100644 index 4b45938c..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGrid.pas +++ /dev/null @@ -1,2459 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGrid; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, -{$ENDIF} - Windows, Messages, - Classes, Controls, Graphics, ImgList, Forms, StdCtrls, - cxClasses, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, cxControls, cxPC, - cxNavigator, cxCustomData, - cxGridCommon, cxGridLevel, cxGridDetailsSite, cxGridCustomView; - -const -(* - CM_DEFERUPDATES = WM_USER + 333; -*) - - cxGridLevelTabsDefaultCaptionAlignment = taCenter; - cxGridLevelTabsDefaultImageBorder = 0; - cxGridRootLevelDefaultDetailFrameWidth = 0; - cxGridDefaultDragOpeningWaitTime = 800;//500; - -type - TcxGridViewInfo = class; - TcxCustomGrid = class; - - { changes } - - TcxGridLayoutChange = class(TcxCustomGridViewChange) - public - procedure Execute; override; - function IsCompatibleWith(AChange: TcxCustomGridChange): Boolean; override; - end; - - TcxGridSizeChange = class(TcxCustomGridViewChange) - private - FKeepMaster: Boolean; - FUpdateGridViewOnly: Boolean; - public - constructor Create(AGridView: TcxCustomGridView; - AUpdateGridViewOnly: Boolean = False; AKeepMaster: Boolean = False); reintroduce; virtual; - procedure Execute; override; - function IsCompatibleWith(AChange: TcxCustomGridChange): Boolean; override; - function IsEqual(AChange: TcxCustomGridChange): Boolean; override; - property KeepMaster: Boolean read FKeepMaster; - property UpdateGridViewOnly: Boolean read FUpdateGridViewOnly - write FUpdateGridViewOnly; - end; - - TcxGridViewChange = class(TcxCustomGridViewChange) - private - FUpdateBounds: TRect; - FUpdateRegion: TcxRegion; - public - constructor Create(AGridView: TcxCustomGridView; - const AUpdateBounds: TRect); reintroduce; overload; virtual; - constructor Create(AGridView: TcxCustomGridView; - const AUpdateRegion: TcxRegion); reintroduce; overload; virtual; - constructor Create(AGridView: TcxCustomGridView); reintroduce; overload; - destructor Destroy; override; - procedure Execute; override; - function IsCompatibleWith(AChange: TcxCustomGridChange): Boolean; override; - function IsEqual(AChange: TcxCustomGridChange): Boolean; override; - property UpdateBounds: TRect read FUpdateBounds; - property UpdateRegion: TcxRegion read FUpdateRegion; - end; - - { notification } - - TcxGridNotificationKind = (gnkFocusedViewChanged, gnkFocusedRecordChanged, - gnkRecordCountChanged, gnkContextMenu, gnkCustomization, gnkKeyDown); - TcxGridNotificationKinds = set of TcxGridNotificationKind; - - TcxCustomGridNotification = class - protected - function NotificationKinds: TcxGridNotificationKinds; virtual; abstract; - procedure Notify(AKind: TcxGridNotificationKind; AData: TObject; - var AHandled: Boolean); virtual; abstract; - end; - - { structure navigator } - - TcxCustomGridStructureNavigatorClass = class of TcxCustomGridStructureNavigator; - - TcxCustomGridStructureNavigator = class(TcxControl) - private - FGrid: TcxCustomGrid; - protected - procedure Changed; virtual; - procedure FontChanged; override; - function MayFocus: Boolean; override; - - function CalculateBoundsRect: TRect; virtual; abstract; - public - constructor Create(AGrid: TcxCustomGrid); reintroduce; virtual; - procedure BeforeGridLoading; virtual; - function IsObjectSelected(AObject: TPersistent): Boolean; virtual; abstract; - procedure SelectionChanged(ASelection: TList); virtual; abstract; - procedure SelectObject(AObject: TPersistent; AClearSelection: Boolean); virtual; abstract; - procedure SelectObjects(AObjects: TList); virtual; abstract; - procedure UnselectObject(AObject: TPersistent); virtual; abstract; - property Grid: TcxCustomGrid read FGrid; - end; - - { handlers } - - TcxCustomGridHandler = class - private - FControl: TcxCustomGrid; - function GetActiveController: TcxCustomGridController; - function GetActiveGridView: TcxCustomGridView; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetViewInfo: TcxGridViewInfo; - protected - property ActiveController: TcxCustomGridController read GetActiveController; - property ActiveGridView: TcxCustomGridView read GetActiveGridView; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property ViewInfo: TcxGridViewInfo read GetViewInfo; - public - constructor Create(AControl: TcxCustomGrid); virtual; - property Control: TcxCustomGrid read FControl; - end; - - TcxGridDesignControllerClass = class of TcxGridDesignController; - - TcxGridDesignController = class(TcxCustomGridDesignController) - private - FControl: TcxCustomGrid; - protected - function GetControl: TcxControl; override; - public - constructor Create(AControl: TcxCustomGrid); virtual; - end; - - TcxGridDragOpenInfoTab = class(TcxCustomGridDragOpenInfo) - public - Level: TcxGridLevel; - constructor Create(ALevel: TcxGridLevel); virtual; - function Equals(AInfo: TcxCustomGridDragOpenInfo): Boolean; override; - procedure Run; override; - end; - - TcxGridControllerClass = class of TcxGridController; - - TcxGridController = class(TcxCustomGridHandler) - private - FDesignController: TcxGridDesignController; - FDragOpenInfo: TcxCustomGridDragOpenInfo; - FDragOpenTimer: TcxTimer; - function GetDesignController: TcxGridDesignController; - procedure DragOpenTimerHandler(Sender: TObject); - protected - function GetDesignControllerClass: TcxGridDesignControllerClass; virtual; - public - destructor Destroy; override; - - procedure DoCancelMode; virtual; - procedure FocusChanged; virtual; - - function GetCursor(X, Y: Integer): TCursor; virtual; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); dynamic; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); dynamic; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); dynamic; - - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); virtual; - procedure EndDrag(Target: TObject; X, Y: Integer); virtual; - procedure StartDrag(var DragObject: TDragObject); virtual; - - function GetDragOpenInfo(AHitTest: TcxCustomGridHitTest): TcxCustomGridDragOpenInfo; virtual; - function IsDragOpenHitTest(AHitTest: TcxCustomGridHitTest; - out ADragOpenInfo: TcxCustomGridDragOpenInfo): Boolean; - procedure StartDragOpen(ADragOpenInfo: TcxCustomGridDragOpenInfo); - procedure StopDragOpen; - property DragOpenInfo: TcxCustomGridDragOpenInfo read FDragOpenInfo; - - property DesignController: TcxGridDesignController read GetDesignController; - end; - - TcxGridPainterClass = class of TcxGridPainter; - - TcxGridPainter = class(TcxCustomGridHandler) - private - function GetCanvas: TcxCanvas; - protected - procedure DrawDetailsSite; virtual; - //procedure DrawEmptyArea; virtual; - public - procedure Invalidate(AInvalidateDetails: Boolean); overload; virtual; - procedure Invalidate(const R: TRect); overload; virtual; - procedure Paint; virtual; - property Canvas: TcxCanvas read GetCanvas; - end; - - TcxGridTopDetailsSiteViewInfoClass = class of TcxGridTopDetailsSiteViewInfo; - - TcxGridTopDetailsSiteViewInfo = class(TcxCustomGridDetailsSiteViewInfo) - private - function GetControl: TcxCustomGrid; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetActiveGridView: TcxCustomGridView; override; - function GetActiveLevel: TcxGridLevel; override; - function GetCanvas: TcxCanvas; override; - function GetContainer: TcxControl; override; - function GetDesignController: TcxCustomGridDesignController; override; - function GetMasterRecord: TObject; override; - function GetMaxHeight: Integer; override; - function GetMaxWidth: Integer; override; - procedure InitTabHitTest(AHitTest: TcxGridDetailsSiteTabHitTest); override; - property Control: TcxCustomGrid read GetControl; - public - procedure ChangeActiveTab(ALevel: TcxGridLevel; AFocusView: Boolean = False); override; - function DetailHasData(ALevel: TcxGridLevel): Boolean; override; - function SupportsTabAccelerators: Boolean; override; - procedure VisibilityChanged(AVisible: Boolean); override; - end; - - TcxGridViewInfoClass = class of TcxGridViewInfo; - - TcxGridViewInfo = class(TcxCustomGridHandler) - private - FDetailsSiteViewInfo: TcxGridTopDetailsSiteViewInfo; - FDetailsSiteViewInfoCachedInfo: TcxCustomGridDetailsSiteViewInfoCachedInfo; - FIsCalculating: Boolean; - function GetBounds: TRect; - function GetClientBounds: TRect; - function GetEmptyAreaColor: TColor; - protected - procedure CreateViewInfos; virtual; - procedure DestroyViewInfos; virtual; - function GetDetailsSiteViewInfoClass: TcxGridTopDetailsSiteViewInfoClass; virtual; - procedure RecreateViewInfos; - - procedure Calculate; virtual; - public - constructor Create(AControl: TcxCustomGrid); override; - destructor Destroy; override; - function GetHitTest(X, Y: Integer): TcxCustomGridHitTest; virtual; - procedure MainCalculate; - property Bounds: TRect read GetBounds; - property ClientBounds: TRect read GetClientBounds; - property DetailsSiteViewInfo: TcxGridTopDetailsSiteViewInfo read FDetailsSiteViewInfo; - property EmptyAreaColor: TColor read GetEmptyAreaColor; - property IsCalculating: Boolean read FIsCalculating; - end; - - { controls } - - TcxGridLevelTabsClass = class of TcxGridLevelTabs; - - TcxGridLevelTabs = class(TPersistent) - private - FCaptionAlignment: TAlignment; - FFreeNotificator: TcxFreeNotificator; - FImageBorder: Integer; - FImages: TCustomImageList; - FImagesChangeLink: TChangeLink; - FOwner: TcxCustomGrid; - FSlants: TcxTabSlants; - FStyle: TcxPCStyleID; - procedure SetCaptionAlignment(Value: TAlignment); - procedure SetImageBorder(Value: Integer); - procedure SetImages(Value: TCustomImageList); - procedure SetSlants(Value: TcxTabSlants); - procedure SetStyle(Value: TcxPCStyleID); - procedure FreeNotification(Sender: TComponent); - procedure ImagesChanged(Sender: TObject); - procedure SlantsChanged(Sender: TObject); - protected - procedure Changed; - public - constructor Create(AOwner: TcxCustomGrid); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - property Owner: TcxCustomGrid read FOwner; - published - property CaptionAlignment: TAlignment read FCaptionAlignment write SetCaptionAlignment default cxGridLevelTabsDefaultCaptionAlignment; - property ImageBorder: Integer read FImageBorder write SetImageBorder default cxGridLevelTabsDefaultImageBorder; - property Images: TCustomImageList read FImages write SetImages; - property Slants: TcxTabSlants read FSlants write SetSlants; - property Style: TcxPCStyleID read FStyle write SetStyle default cxPCDefaultStyle; - end; - - TcxGridRootLevelOptions = class(TcxGridLevelOptions) - public - constructor Create(ALevel: TcxGridLevel); override; - published - property DetailFrameWidth default cxGridRootLevelDefaultDetailFrameWidth; - end; - - TcxGridRootLevel = class(TcxGridLevel) - protected - function GetOptionsClass: TcxGridLevelOptionsClass; override; - end; - - TcxGridActiveTabChangedEvent = procedure(Sender: TcxCustomGrid; ALevel: TcxGridLevel) of object; - TcxGridFocusedViewChangedEvent = procedure(Sender: TcxCustomGrid; - APrevFocusedView, AFocusedView: TcxCustomGridView) of object; - TcxGridLayoutChangedEvent = procedure(Sender: TcxCustomGrid; AGridView: TcxCustomGridView) of object; - - TcxCustomGrid = class(TcxControl, IcxNavigator, IdxSkinSupport) - private - FActiveLevel: TcxGridLevel; - FChanges: TList; - FChangesStack: TList; - FController: TcxGridController; - FCreatingStructureNavigator: Boolean; - FDragOpening: Boolean; - FDragOpeningWaitTime: Integer; - FFocusedView: TcxCustomGridView; - FIsPopupControl: Boolean; - FLastFocused: Boolean; - FLevels: TcxGridLevel; - FLevelTabs: TcxGridLevelTabs; - FNavigatorNotifier: TcxNavigatorControlNotifier; - FNotifications: TList; - FPainter: TcxGridPainter; - FProcessingChangesStack: Boolean; - FStructureNavigator: TcxCustomGridStructureNavigator; - FTabStop: Boolean; - FTag: TObject; - FUpdateLockCount: Integer; - FViewInfo: TcxGridViewInfo; - FViews: TList; - FOnActiveTabChanged: TcxGridActiveTabChangedEvent; - FOnFocusedViewChanged: TcxGridFocusedViewChangedEvent; - FOnLayoutChanged: TcxGridLayoutChangedEvent; - FSubClassEvents: TNotifyEvent; - - function GetActiveView: TcxCustomGridView; - function GetFocusedViewNavigator: IcxNavigator; - function GetView(Index: Integer): TcxCustomGridView; - function GetViewCount: Integer; - function GetRootLevelOptions: TcxGridLevelOptions; - function GetRootLevelStyles: TcxGridLevelStyles; - function GetStructureNavigator: TcxCustomGridStructureNavigator; - function GetUpdateLocked: Boolean; - procedure SetActiveLevel(Value: TcxGridLevel); - procedure SetDragOpeningWaitTime(Value: Integer); - procedure SetFocusedView(Value: TcxCustomGridView); - procedure SetLevels(Value: TcxGridLevel); - procedure SetLevelTabs(Value: TcxGridLevelTabs); - procedure SetRootLevelOptions(Value: TcxGridLevelOptions); - procedure SetRootLevelStyles(Value: TcxGridLevelStyles); - procedure SetTabStop(Value: Boolean); - - procedure AddView(AView: TcxCustomGridView); - procedure RemoveView(AView: TcxCustomGridView); - procedure DestroyViews; - - procedure DestroyChanges(AChanges: TList); - procedure DestroyViewChanges(AView: TcxCustomGridView); - - procedure CreateStructureNavigator; - - //procedure CMDeferUpdates(var Message: TMessage); message CM_DEFERUPDATES; - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - protected - // IcxNavigator - function IcxNavigator.IsActive = NavigatorIsActive; - function IcxNavigator.IsBof = NavigatorIsBof; - function IcxNavigator.IsEof = NavigatorIsEof; - function IcxNavigator.CanAppend = NavigatorCanAppend; - function IcxNavigator.CanEdit = NavigatorCanEdit; - function IcxNavigator.CanDelete = NavigatorCanDelete; - function IcxNavigator.CanInsert = NavigatorCanInsert; - procedure IcxNavigator.ClearBookmark = NavigatorClearBookmark; - function IcxNavigator.IsEditing = NavigatorIsEditing; - function IcxNavigator.IsBookmarkAvailable = NavigatorIsBookmarkAvailable; - procedure IcxNavigator.DoAction = NavigatorDoAction; - function IcxNavigator.GetNotifier = NavigatorGetNotifier; - function IcxNavigator.IsActionSupported = NavigatorIsActionSupported; - function NavigatorIsActive: Boolean; - function NavigatorIsBof: Boolean; - function NavigatorIsEof: Boolean; - function NavigatorCanAppend: Boolean; - function NavigatorCanEdit: Boolean; - function NavigatorCanDelete: Boolean; - function NavigatorCanInsert: Boolean; - function NavigatorIsEditing: Boolean; - procedure NavigatorClearBookmark; - function NavigatorIsBookmarkAvailable: Boolean; - procedure NavigatorDoAction(AButtonIndex: Integer); - function NavigatorGetNotifier: TcxNavigatorControlNotifier; - function NavigatorIsActionSupported(AButtonIndex: Integer): Boolean; - - procedure AddChildComponent(AComponent: TcxControlChildComponent); override; - procedure RemoveChildComponent(AComponent: TcxControlChildComponent); override; - - procedure BoundsChanged; override; - procedure DoCancelMode; override; - procedure DoContextPopup(MousePos: TPoint; var Handled: Boolean); override; - procedure FocusChanged; override; - {$IFNDEF DELPHI12} - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - {$ENDIF} - function GetCursor(X, Y: Integer): TCursor; override; - function GetDesignHitTest(X, Y: Integer; Shift: TShiftState): Boolean; override; - function GetIsFocused: Boolean; override; - procedure Loaded; override; - function MayFocus: Boolean; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); override; - procedure Paint; override; - procedure ReadState(Reader: TReader); override; - procedure SetChildOrder(Child: TComponent; Order: Integer); override; - procedure SetName(const NewName: TComponentName); override; - procedure WndProc(var Message: TMessage); override; - - procedure DoEndDrag(Target: TObject; X, Y: Integer); override; - procedure DoStartDrag(var DragObject: TDragObject); override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); override; - - procedure CreateHandlers; virtual; - procedure DestroyHandlers; virtual; - - procedure DoActiveTabChanged(ALevel: TcxGridLevel); virtual; - procedure DoChange(AGridChange: TcxCustomGridChange); - procedure DoLayoutChanged(AGridView: TcxCustomGridView); virtual; - procedure DoProcessChangesStack; - procedure DoUpdate(AChanges: TList); - procedure FocusedViewChanged(APrevFocusedView, AFocusedView: TcxCustomGridView); virtual; - function GetControllerClass: TcxGridControllerClass; virtual; - function GetDefaultViewClass: TcxCustomGridViewClass; virtual; - function GetLevelsClass: TcxGridLevelClass; virtual; - function GetLevelTabsClass: TcxGridLevelTabsClass; virtual; - function GetPainterClass: TcxGridPainterClass; virtual; - function GetViewInfoClass: TcxGridViewInfoClass; virtual; - procedure LevelChanged(ALevel: TcxGridLevel; AChangeKind: TcxGridLevelChangeKind); - procedure RefreshNavigators; - procedure StructureNavigatorChanged; - function UpdateOnRootViewDataChange: Boolean; virtual; - procedure ViewChanged(AView: TcxCustomGridView; AChangeKind: TcxGridViewChangeNotificationKind); - - procedure UpdateFocusing(AChildFocused: Boolean); - property LastFocused: Boolean read FLastFocused; - - property FocusedViewNavigator: IcxNavigator read GetFocusedViewNavigator; - property IsPopupControl: Boolean read FIsPopupControl write FIsPopupControl; - property NavigatorNotifier: TcxNavigatorControlNotifier read FNavigatorNotifier; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - {$IFDEF DELPHI12} - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - {$ENDIF} - procedure Invalidate(AHardUpdate: Boolean = False); reintroduce; - procedure RemoveFocus(AGoForward: Boolean); - - procedure BeginUpdate; - procedure CancelUpdate; - procedure Changed(AGridChange: TcxCustomGridChange); - procedure CheckFocusedView; - procedure EndUpdate; - procedure LayoutChanged; virtual; - procedure SizeChanged; virtual; - property UpdateLocked: Boolean read GetUpdateLocked; - - function CreateView(AViewClass: TcxCustomGridViewClass): TcxCustomGridView; - function ViewExists(AView: TcxCustomGridView): Boolean; - - procedure RegisterNotification(ANotification: TcxCustomGridNotification); - procedure UnregisterNotification(ANotification: TcxCustomGridNotification); - function SendNotifications(AKind: TcxGridNotificationKind; AData: TObject = nil): Boolean; - - procedure RootViewDataChanged(AView: TcxCustomGridView); virtual; - - // IdxLocalizerListener - procedure TranslationChanged; override; - - property ActiveView: TcxCustomGridView read GetActiveView; - property ActiveLevel: TcxGridLevel read FActiveLevel write SetActiveLevel; - property BorderStyle default cxcbsDefault; - property Color; - property Controller: TcxGridController read FController; - property DragOpening: Boolean read FDragOpening write FDragOpening default True; - property DragOpeningWaitTime: Integer read FDragOpeningWaitTime write SetDragOpeningWaitTime - default cxGridDefaultDragOpeningWaitTime; - property FocusedView: TcxCustomGridView read FFocusedView write SetFocusedView; - property Font; - property Levels: TcxGridLevel read FLevels write SetLevels; - property LevelTabs: TcxGridLevelTabs read FLevelTabs write SetLevelTabs; - property LookAndFeel; - property LookAndFeelPainter; - property Painter: TcxGridPainter read FPainter; - property RootLevelOptions: TcxGridLevelOptions read GetRootLevelOptions write SetRootLevelOptions; - property RootLevelStyles: TcxGridLevelStyles read GetRootLevelStyles write SetRootLevelStyles; - property StructureNavigator: TcxCustomGridStructureNavigator read GetStructureNavigator; - property TabStop: Boolean read FTabStop write SetTabStop default True; - property ViewCount: Integer read GetViewCount; - property ViewInfo: TcxGridViewInfo read FViewInfo; - property Views[Index: Integer]: TcxCustomGridView read GetView; - property OnActiveTabChanged: TcxGridActiveTabChangedEvent read FOnActiveTabChanged write FOnActiveTabChanged; - property OnFocusedViewChanged: TcxGridFocusedViewChangedEvent read FOnFocusedViewChanged write FOnFocusedViewChanged; - property OnLayoutChanged: TcxGridLayoutChangedEvent read FOnLayoutChanged write FOnLayoutChanged; - published - property RootLevelStylesEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - end; - - TcxGrid = class(TcxCustomGrid) - published - property Align; - property Anchors; - {$IFDEF DELPHI6} - property BevelEdges; - property BevelInner; - property BevelOuter; - property BevelKind; - property BevelWidth; - property BorderWidth; - {$ENDIF} - property BorderStyle; - property Constraints; - property DragCursor; - property DragKind; - property DragMode; - property Enabled; - property Font; - //property ParentColor; - property ParentFont; - property PopupMenu; - property TabOrder; - property TabStop; - property Visible; - - //property OnClick; - {$IFDEF DELPHI5} - property OnContextPopup; - {$ENDIF} - //property OnDblClick; - property OnDragDrop; - property OnDragOver; - property OnEndDock; - property OnEndDrag; - property OnEnter; - property OnExit; - {property OnMouseDown; - property OnMouseMove; - property OnMouseUp; - property OnMouseWheel; - property OnMouseWheelDown; - property OnMouseWheelUp;} - property OnResize; - property OnStartDock; - property OnStartDrag; - - property DragOpening; - property DragOpeningWaitTime; - property LevelTabs; - property LookAndFeel; - property RootLevelOptions; - property RootLevelStyles; - - property OnActiveTabChanged; - property OnFocusedViewChanged; - property OnLayoutChanged; - property OnMouseEnter; - property OnMouseLeave; - end; - - { TcxGridViewRepository } - - TcxGridViewRepository = class(TComponent) {5} - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxCustomGridView; - procedure DestroyItems; - protected - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - - procedure AddItem(AItem: TcxCustomGridView); - procedure RemoveItem(AItem: TcxCustomGridView); - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function CreateItem(AItemClass: TcxCustomGridViewClass): TcxCustomGridView; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxCustomGridView read GetItem; default; - end; - -var - cxGridStructureNavigatorClass: TcxCustomGridStructureNavigatorClass; - -function GetParentGrid(AControl: TControl): TcxCustomGrid; - -implementation - -uses - SysUtils, Math, cxGridCustomTableView; - -function GetLevel(ACaller: TComponent; Index: Integer): TComponent; -begin - Result := TComponent(TList(TcxCustomGrid(ACaller).FTag)[Index]); -end; - -function GetView(ACaller: TComponent; Index: Integer): TComponent; -begin - Result := TcxCustomGrid(ACaller).Views[Index]; -end; - -{ TcxGridLayoutChange } - -procedure TcxGridLayoutChange.Execute; -begin - if GridView <> nil then - with GridView do - if TcxCustomGridViewAccess.GetChangeable(GridView) and - not IsRectEmpty(Site.BoundsRect) then - begin - ViewInfo.MainCalculate(Site.BoundsRect); - Painter.Invalidate; - end - else - else - with TcxCustomGrid(Control) do - if ViewInfo <> nil then - begin - ViewInfo.MainCalculate; - Painter.Invalidate(True); - end; - if Control <> nil then {7} - TcxCustomGrid(Control).DoLayoutChanged(GridView); -end; - -function TcxGridLayoutChange.IsCompatibleWith(AChange: TcxCustomGridChange): Boolean; -begin - Result := inherited IsCompatibleWith(AChange) or - (AChange is TcxGridLayoutChange) and - ((TcxGridLayoutChange(AChange).GridView = nil) or - (GridView <> nil) and GridView.HasAsMaster(TcxGridLayoutChange(AChange).GridView)) or - (AChange is TcxGridSizeChange) and - ((TcxGridSizeChange(AChange).GridView = nil) or - (GridView <> nil) and - ((GridView = TcxGridSizeChange(AChange).GridView) or - GridView.HasAsMaster(TcxGridSizeChange(AChange).GridView))); -end; - -{ TcxGridSizeChange } - -constructor TcxGridSizeChange.Create(AGridView: TcxCustomGridView; - AUpdateGridViewOnly: Boolean = False; AKeepMaster: Boolean = False); -begin - inherited Create(AGridView); - FUpdateGridViewOnly := AUpdateGridViewOnly; - FKeepMaster := AKeepMaster; -end; - -procedure TcxGridSizeChange.Execute; -begin - if GridView = nil then - with TcxCustomGrid(Control) do - if ActiveView <> nil then - ActiveView.SizeChanged(False, FKeepMaster) - else - LayoutChanged - else - with GridView do - if TcxCustomGridViewAccess.GetChangeable(GridView) then - begin - if ViewInfoCache <> nil then - ViewInfoCache.UnassignValues(FKeepMaster); - if FUpdateGridViewOnly and FKeepMaster then - LayoutChanged - else - if MasterGridView = nil then - if {(Control = nil) or }IsPattern then - {//}LayoutChanged - else - TcxCustomGrid(Control).LayoutChanged - else - if not IsPattern and not MasterGridView.SizeChanged(False, FKeepMaster) then - LayoutChanged; - end; -end; - -function TcxGridSizeChange.IsCompatibleWith(AChange: TcxCustomGridChange): Boolean; -begin - Result := inherited IsCompatibleWith(AChange) or - (AChange is TcxGridSizeChange) and (TcxGridSizeChange(AChange).GridView = GridView) and - (TcxGridSizeChange(AChange).KeepMaster = FKeepMaster) and FUpdateGridViewOnly or - (AChange is TcxGridDataChange) and (TcxGridDataChange(AChange).GridView = GridView); -end; - -function TcxGridSizeChange.IsEqual(AChange: TcxCustomGridChange): Boolean; -begin - Result := inherited IsEqual(AChange) and - (FKeepMaster = TcxGridSizeChange(AChange).KeepMaster) and - (FUpdateGridViewOnly = TcxGridSizeChange(AChange).UpdateGridViewOnly); -end; - -{ TcxGridViewChange } - -constructor TcxGridViewChange.Create(AGridView: TcxCustomGridView; - const AUpdateBounds: TRect); -begin - inherited Create(AGridView); - FUpdateBounds := AUpdateBounds; -end; - -constructor TcxGridViewChange.Create(AGridView: TcxCustomGridView; - const AUpdateRegion: TcxRegion); -begin - inherited Create(AGridView); - FUpdateRegion := TcxRegion.Create; - FUpdateRegion.Combine(AUpdateRegion, roSet, False); -end; - -constructor TcxGridViewChange.Create(AGridView: TcxCustomGridView); -begin - Create(AGridView, Rect(0, 0, 0, 0)); -end; - -destructor TcxGridViewChange.Destroy; -begin - FUpdateRegion.Free; - inherited; -end; - -procedure TcxGridViewChange.Execute; -begin - if not IsRectEmpty(FUpdateBounds) then - GridView.Painter.Invalidate(FUpdateBounds) - else - if FUpdateRegion <> nil then - GridView.Painter.Invalidate(FUpdateRegion) - else - GridView.Painter.Invalidate; -end; - -function TcxGridViewChange.IsCompatibleWith(AChange: TcxCustomGridChange): Boolean; -begin - Result := inherited IsCompatibleWith(AChange) or - (AChange is TcxGridLayoutChange) and (TcxGridLayoutChange(AChange).GridView = GridView) or - (AChange is TcxGridSizeChange) and (TcxGridSizeChange(AChange).GridView = GridView); -end; - -function TcxGridViewChange.IsEqual(AChange: TcxCustomGridChange): Boolean; -begin - Result := inherited IsEqual(AChange) and - ((FUpdateRegion = nil) and (TcxGridViewChange(AChange).UpdateRegion = nil) and - EqualRect(FUpdateBounds, TcxGridViewChange(AChange).UpdateBounds) or - (FUpdateRegion <> nil) and (TcxGridViewChange(AChange).UpdateRegion <> nil) and - FUpdateRegion.IsEqual(TcxGridViewChange(AChange).UpdateRegion)); -end; - -{ TcxCustomGridStructureNavigator } - -constructor TcxCustomGridStructureNavigator.Create(AGrid: TcxCustomGrid); -begin - inherited Create(nil); - FGrid := AGrid; - Parent := FGrid; -end; - -procedure TcxCustomGridStructureNavigator.Changed; -begin - BoundsRect := CalculateBoundsRect; - BringToFront; - Invalidate; -end; - -procedure TcxCustomGridStructureNavigator.FontChanged; -begin - inherited; - Changed; -end; - -function TcxCustomGridStructureNavigator.MayFocus: Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridStructureNavigator.BeforeGridLoading; -begin -end; - -{ TcxCustomGridHandler } - -constructor TcxCustomGridHandler.Create(AControl: TcxCustomGrid); -begin - inherited Create; - FControl := AControl; -end; - -function TcxCustomGridHandler.GetActiveController: TcxCustomGridController; -begin - if ActiveGridView <> nil then - Result := ActiveGridView.Controller - else - Result := nil; -end; - -function TcxCustomGridHandler.GetActiveGridView: TcxCustomGridView; -begin - Result := FControl.ActiveView; -end; - -function TcxCustomGridHandler.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := FControl.LookAndFeelPainter; -end; - -function TcxCustomGridHandler.GetViewInfo: TcxGridViewInfo; -begin - Result := FControl.ViewInfo; -end; - -{ TcxGridDesignController } - -constructor TcxGridDesignController.Create(AControl: TcxCustomGrid); -begin - inherited Create; - FControl := AControl; -end; - -function TcxGridDesignController.GetControl: TcxControl; -begin - Result := FControl; -end; - -{ TcxGridDragOpenInfoTab } - -constructor TcxGridDragOpenInfoTab.Create(ALevel: TcxGridLevel); -begin - inherited Create; - Level := ALevel; -end; - -function TcxGridDragOpenInfoTab.Equals(AInfo: TcxCustomGridDragOpenInfo): Boolean; -begin - Result := inherited Equals(AInfo) and - (Level = TcxGridDragOpenInfoTab(AInfo).Level); -end; - -procedure TcxGridDragOpenInfoTab.Run; -begin - Level.Active := True; -end; - -{ TcxGridController } - -destructor TcxGridController.Destroy; -begin - FreeAndNil(FDesignController); - inherited; -end; - -function TcxGridController.GetDesignController: TcxGridDesignController; -begin - if (FDesignController = nil) and Control.IsDesigning then - FDesignController := GetDesignControllerClass.Create(Control); - Result := FDesignController; -end; - -procedure TcxGridController.DragOpenTimerHandler(Sender: TObject); -begin - FDragOpenTimer.Enabled := False; - try - FDragOpenInfo.Run; - finally - StopDragOpen; - end; -end; - -function TcxGridController.GetDesignControllerClass: TcxGridDesignControllerClass; -begin - Result := TcxGridDesignController; -end; - -procedure TcxGridController.DoCancelMode; -begin - if ActiveController <> nil then - ActiveController.DoCancelMode; -end; - -procedure TcxGridController.FocusChanged; -begin - if ActiveController <> nil then - ActiveController.DoControlFocusChanged; -end; - -function TcxGridController.GetCursor(X, Y: Integer): TCursor; -begin - Result := crDefault; -end; - -procedure TcxGridController.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; -begin - AHitTest := ViewInfo.GetHitTest(X, Y); - if AHitTest.ViewInfo <> nil then - AHitTest.ViewInfo.MouseDown(AHitTest, Button, Shift); -end; - -procedure TcxGridController.MouseMove(Shift: TShiftState; X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; -begin - AHitTest := ViewInfo.GetHitTest(X, Y); - if AHitTest.ViewInfo <> nil then - AHitTest.ViewInfo.MouseMove(AHitTest, Shift); -end; - -procedure TcxGridController.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin -end; - -procedure TcxGridController.DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); - - procedure ProcessOpening; - var - AHitTest: TcxCustomGridHitTest; - ADragOpenInfo: TcxCustomGridDragOpenInfo; - begin - AHitTest := ViewInfo.GetHitTest(X, Y); - if (State <> dsDragLeave) and IsDragOpenHitTest(AHitTest, ADragOpenInfo) then - StartDragOpen(ADragOpenInfo) - else - StopDragOpen; - end; - -begin - if Control.DragOpening then - ProcessOpening; -end; - -procedure TcxGridController.EndDrag(Target: TObject; X, Y: Integer); -begin - StopDragOpen; -end; - -procedure TcxGridController.StartDrag(var DragObject: TDragObject); -begin -end; - -function TcxGridController.GetDragOpenInfo(AHitTest: TcxCustomGridHitTest): TcxCustomGridDragOpenInfo; -begin - if AHitTest.HitTestCode = htTab then - with TcxGridDetailsSiteTabHitTest(AHitTest) do - Result := TcxGridDragOpenInfoTab.Create(Level) - else - Result := nil; -end; - -function TcxGridController.IsDragOpenHitTest(AHitTest: TcxCustomGridHitTest; - out ADragOpenInfo: TcxCustomGridDragOpenInfo): Boolean; -begin - ADragOpenInfo := GetDragOpenInfo(AHitTest); - Result := ADragOpenInfo <> nil; -end; - -procedure TcxGridController.StartDragOpen(ADragOpenInfo: TcxCustomGridDragOpenInfo); -begin - if (FDragOpenInfo <> nil) and FDragOpenInfo.Equals(ADragOpenInfo) then - begin - ADragOpenInfo.Free; - Exit; - end; - FDragOpenInfo.Free; - FDragOpenInfo := ADragOpenInfo; - if FDragOpenTimer = nil then - begin - FDragOpenTimer := TcxTimer.Create(nil); - with FDragOpenTimer do - begin - Interval := Control.DragOpeningWaitTime; - OnTimer := DragOpenTimerHandler; - end; - end - else - with FDragOpenTimer do - begin - Enabled := False; - Enabled := True; - end; -end; - -procedure TcxGridController.StopDragOpen; -begin - FreeAndNil(FDragOpenTimer); - FreeAndNil(FDragOpenInfo); -end; - -{ TcxGridPainter } - -function TcxGridPainter.GetCanvas: TcxCanvas; -begin - Result := Control.ActiveCanvas; -end; - -procedure TcxGridPainter.DrawDetailsSite; -begin - with TcxGridTopDetailsSiteViewInfo(ViewInfo.DetailsSiteViewInfo) do - if Visible then Paint(Self.Canvas); -end; - -{procedure TcxGridPainter.DrawEmptyArea; -begin - Canvas.Brush.Color := ViewInfo.EmptyAreaColor; - Canvas.FillRect(ViewInfo.ClientBounds); -end;} - -procedure TcxGridPainter.Invalidate(AInvalidateDetails: Boolean); -var - I: Integer; - AControl: TControl; -begin - Control.Invalidate; - if AInvalidateDetails then - for I := 0 to Control.ControlCount - 1 do - begin - AControl := Control.Controls[I]; - if AControl is TcxGridSite then - AControl.Invalidate; - end; -end; - -procedure TcxGridPainter.Invalidate(const R: TRect); -begin - Control.InvalidateRect(R, False); -end; - -procedure TcxGridPainter.Paint; -begin - DrawDetailsSite; - //DrawEmptyArea; -end; - -{ TcxGridTopDetailsSiteViewInfo } - -function TcxGridTopDetailsSiteViewInfo.GetControl: TcxCustomGrid; -begin - Result := TcxCustomGrid(Level.Control); -end; - -function TcxGridTopDetailsSiteViewInfo.CalculateHeight: Integer; -begin - Result := MaxHeight; -end; - -function TcxGridTopDetailsSiteViewInfo.CalculateWidth: Integer; -begin - Result := MaxWidth; -end; - -function TcxGridTopDetailsSiteViewInfo.GetActiveGridView: TcxCustomGridView; -begin - Result := Control.ActiveView; -end; - -function TcxGridTopDetailsSiteViewInfo.GetActiveLevel: TcxGridLevel; -begin - Result := Control.ActiveLevel; -end; - -function TcxGridTopDetailsSiteViewInfo.GetCanvas: TcxCanvas; -begin - Result := Control.Painter.Canvas; -end; - -function TcxGridTopDetailsSiteViewInfo.GetContainer: TcxControl; -begin - Result := Control; -end; - -function TcxGridTopDetailsSiteViewInfo.GetDesignController: TcxCustomGridDesignController; -begin - Result := Control.Controller.DesignController; -end; - -function TcxGridTopDetailsSiteViewInfo.GetMasterRecord: TObject; -begin - Result := nil; -end; - -function TcxGridTopDetailsSiteViewInfo.GetMaxHeight: Integer; -begin - with Control.ViewInfo.ClientBounds do - Result := Bottom - Top; -end; - -function TcxGridTopDetailsSiteViewInfo.GetMaxWidth: Integer; -begin - with Control.ViewInfo.ClientBounds do - Result := Right - Left; -end; - -procedure TcxGridTopDetailsSiteViewInfo.InitTabHitTest(AHitTest: TcxGridDetailsSiteTabHitTest); -begin - AHitTest.Owner := Control; -end; - -procedure TcxGridTopDetailsSiteViewInfo.ChangeActiveTab(ALevel: TcxGridLevel; - AFocusView: Boolean = False); -begin - Control.ActiveLevel := ALevel; -end; - -function TcxGridTopDetailsSiteViewInfo.DetailHasData(ALevel: TcxGridLevel): Boolean; -begin - Result := (ALevel.GridView <> nil) and not ALevel.GridView.ViewData.IsEmpty; -end; - -function TcxGridTopDetailsSiteViewInfo.SupportsTabAccelerators: Boolean; -begin - Result := True; -end; - -procedure TcxGridTopDetailsSiteViewInfo.VisibilityChanged(AVisible: Boolean); -begin - if not Control.IsDestroying then inherited; -end; - -{ TcxGridViewInfo } - -constructor TcxGridViewInfo.Create(AControl: TcxCustomGrid); -begin - inherited; - CreateViewInfos; -end; - -destructor TcxGridViewInfo.Destroy; -begin - DestroyViewInfos; - FDetailsSiteViewInfoCachedInfo.Free; - inherited; -end; - -function TcxGridViewInfo.GetBounds: TRect; -begin - Result := Control.Bounds; -end; - -function TcxGridViewInfo.GetClientBounds: TRect; -begin - Result := Control.ClientBounds; -end; - -function TcxGridViewInfo.GetEmptyAreaColor: TColor; -begin - Result := Control.Color; -end; - -procedure TcxGridViewInfo.CreateViewInfos; -begin - FDetailsSiteViewInfo := - TcxGridTopDetailsSiteViewInfoClass(GetDetailsSiteViewInfoClass).Create(Control.Levels); - if FDetailsSiteViewInfoCachedInfo <> nil then - FDetailsSiteViewInfo.SetCachedInfo(FDetailsSiteViewInfoCachedInfo); -end; - -procedure TcxGridViewInfo.DestroyViewInfos; -begin - FDetailsSiteViewInfo.GetCachedInfo(FDetailsSiteViewInfoCachedInfo); - FDetailsSiteViewInfo.Free; -end; - -function TcxGridViewInfo.GetDetailsSiteViewInfoClass: TcxGridTopDetailsSiteViewInfoClass; -begin - Result := TcxGridTopDetailsSiteViewInfo; -end; - -procedure TcxGridViewInfo.RecreateViewInfos; -begin - DestroyViewInfos; - CreateViewInfos; -end; - -procedure TcxGridViewInfo.Calculate; -begin - RecreateViewInfos; - with ClientBounds, TcxGridTopDetailsSiteViewInfo(FDetailsSiteViewInfo) do - if Visible then Calculate(Left, Top); -end; - -function TcxGridViewInfo.GetHitTest(X, Y: Integer): TcxCustomGridHitTest; -begin - Result := TcxGridTopDetailsSiteViewInfo(FDetailsSiteViewInfo).GetHitTest(Point(X, Y)); - if Result = nil then - Result := TcxGridNoneHitTest.Instance(Point(X, Y)); -end; - -procedure TcxGridViewInfo.MainCalculate; -var - APrevIsCalculating: Boolean; -begin - APrevIsCalculating := IsCalculating; - FIsCalculating := True; - try - Calculate; - finally - FIsCalculating := APrevIsCalculating; - end; -end; - -{ TcxGridLevelTabs } - -constructor TcxGridLevelTabs.Create(AOwner: TcxCustomGrid); -begin - inherited Create; - FOwner := AOwner; - FCaptionAlignment := cxGridLevelTabsDefaultCaptionAlignment; - FFreeNotificator := TcxFreeNotificator.Create(nil); - FFreeNotificator.OnFreeNotification := FreeNotification; - FImageBorder := cxGridLevelTabsDefaultImageBorder; - FImagesChangeLink := TChangeLink.Create; - FImagesChangeLink.OnChange := ImagesChanged; - FSlants := TcxTabSlants.Create(Self); - FSlants.OnChange := SlantsChanged; - FStyle := cxPCDefaultStyle; -end; - -destructor TcxGridLevelTabs.Destroy; -begin - FSlants.Free; - FImagesChangeLink.Free; - FFreeNotificator.Free; - inherited; -end; - -procedure TcxGridLevelTabs.SetCaptionAlignment(Value: TAlignment); -begin - if FCaptionAlignment <> Value then - begin - FCaptionAlignment := Value; - Changed; - end; -end; - -procedure TcxGridLevelTabs.SetImageBorder(Value: Integer); -begin - if Value < 0 then Value := 0; - if FImageBorder <> Value then - begin - FImageBorder := Value; - Changed; - end; -end; - -procedure TcxGridLevelTabs.SetImages(Value: TCustomImageList); -begin - cxSetImageList(Value, FImages, FImagesChangeLink, FFreeNotificator); -end; - -procedure TcxGridLevelTabs.SetSlants(Value: TcxTabSlants); -begin - FSlants.Assign(Value); -end; - -procedure TcxGridLevelTabs.SetStyle(Value: TcxPCStyleID); -begin - if FStyle <> Value then - begin - FStyle := Value; - Changed; - end; -end; - -procedure TcxGridLevelTabs.FreeNotification(Sender: TComponent); -begin - if Sender = Images then Images := nil; -end; - -procedure TcxGridLevelTabs.ImagesChanged(Sender: TObject); -begin - Changed; -end; - -procedure TcxGridLevelTabs.SlantsChanged(Sender: TObject); -begin - Changed; -end; - -procedure TcxGridLevelTabs.Changed; -begin - FOwner.SizeChanged; -end; - -procedure TcxGridLevelTabs.Assign(Source: TPersistent); -begin - if Source is TcxGridLevelTabs then - with TcxGridLevelTabs(Source) do - begin - Self.CaptionAlignment := CaptionAlignment; - Self.ImageBorder := ImageBorder; - Self.Images := Images; - Self.Slants := Slants; - Self.Style := Style; - end - else - inherited; -end; - -{ TcxGridRootLevelOptions } - -constructor TcxGridRootLevelOptions.Create(ALevel: TcxGridLevel); -begin - inherited; - DetailFrameWidth := cxGridRootLevelDefaultDetailFrameWidth; -end; - -{ TcxGridRootLevel } - -function TcxGridRootLevel.GetOptionsClass: TcxGridLevelOptionsClass; -begin - Result := TcxGridRootLevelOptions; -end; - -{ TcxCustomGrid } - -constructor TcxCustomGrid.Create(AOwner: TComponent); -begin - inherited; - BorderStyle := cxcbsDefault; - ControlStyle := ControlStyle + [csDisplayDragImage]; - FDragOpening := True; - FDragOpeningWaitTime := cxGridDefaultDragOpeningWaitTime; - FLevelTabs := GetLevelTabsClass.Create(Self); - FNotifications := TList.Create; - FViews := TList.Create; - FChanges := TList.Create; - FChangesStack := TList.Create; - FTabStop := True; - Levels := GetLevelsClass.Create(nil); - CreateHandlers; - Width := 250; - Height := 200; -end; - -destructor TcxCustomGrid.Destroy; - - procedure HideRootViews; - var - I: Integer; - begin - for I := 0 to Levels.VisibleCount - 1 do - with Levels.VisibleItems[I] do - if GridView <> nil then GridView.ViewInfo.DoVisibilityChanged(False); - end; - -begin - HideRootViews; - //Levels := nil; - DestroyHandlers; - Levels := nil; - DestroyViews; - FViews.Free; - FreeAndNil(FNotifications); - FreeAndNil(FLevelTabs); - DestroyChanges(FChangesStack); - FreeAndNil(FChangesStack); - FreeAndNil(FChanges); - inherited; -end; - -function TcxCustomGrid.GetActiveView: TcxCustomGridView; -begin - if FActiveLevel = nil then - Result := nil - else - Result := FActiveLevel.GridView; -end; - -function TcxCustomGrid.GetFocusedViewNavigator: IcxNavigator; -begin - if (FocusedView = nil) or not Supports(FocusedView, IcxNavigator) then - Result := nil - else - Result := FocusedView as IcxNavigator; -end; - -function TcxCustomGrid.GetView(Index: Integer): TcxCustomGridView; -begin - Result := TcxCustomGridView(FViews[Index]); -end; - -function TcxCustomGrid.GetViewCount: Integer; -begin - Result := FViews.Count; -end; - -function TcxCustomGrid.GetRootLevelOptions: TcxGridLevelOptions; -begin - Result := FLevels.Options; -end; - -function TcxCustomGrid.GetRootLevelStyles: TcxGridLevelStyles; -begin - Result := FLevels.Styles; -end; - -function TcxCustomGrid.GetStructureNavigator: TcxCustomGridStructureNavigator; -begin - CreateStructureNavigator; - Result := FStructureNavigator; -end; - -function TcxCustomGrid.GetUpdateLocked: Boolean; -{ - function DataControllerLocked: Boolean; //!!!!!!!!!!!!!!!!!!!! - var - I, J: Integer; - - function CheckDataController(AView: TcxCustomGridView; out ALocked: Boolean): Boolean; - begin - ALocked := AView.DataController.LockCount <> 0; - Result := ALocked; - end; - - begin - for I := 0 to ViewCount - 1 do - begin - if CheckDataController(Views[I], Result) then Exit; - for J := 0 to Views[I].CloneCount - 1 do - if CheckDataController(Views[I].Clones[J], Result) then Exit; - end; - Result := False; - end; -} -begin - Result := (FUpdateLockCount <> 0) {or DataControllerLocked}; -end; - -procedure TcxCustomGrid.SetActiveLevel(Value: TcxGridLevel); -begin - if FActiveLevel <> Value then - begin - if Value = nil then - Value := FLevels.GetAvailableItem - else - if not Value.Visible then - Exit; - FActiveLevel := Value; - SizeChanged; - if not IsLoading and (FActiveLevel <> nil) then - DoActiveTabChanged(FActiveLevel); - if FActiveLevel <> nil then - FocusedView := FActiveLevel.GridView - else - FocusedView := nil; - end; -end; - -procedure TcxCustomGrid.SetDragOpeningWaitTime(Value: Integer); -begin - if Value < 0 then Value := 0; - FDragOpeningWaitTime := Value; -end; - -procedure TcxCustomGrid.SetFocusedView(Value: TcxCustomGridView); -var - APrevFocusedView: TcxCustomGridView; - APrevFocused: Boolean; - - function GetAvailableView: TcxCustomGridView; - var - I: Integer; - - function CheckMasterView(AView: TcxCustomGridView): TcxCustomGridView; - begin - Result := AView; - repeat - Result := Result.MasterGridView; - until (Result = nil) or not Result.IsDestroying; - end; - - begin - Result := CheckMasterView(FFocusedView); - if Result = nil then - begin - for I := 0 to Levels.Count - 1 do - begin - Result := Levels[I].GridView; - if (Result <> nil) and not Result.IsDestroying then Exit; - end; - Result := nil; - end; - end; - -begin - if (Value <> nil) and not TcxCustomGridViewAccess.CanFocus(Value) then Exit; - if FFocusedView <> Value then - begin - APrevFocusedView := FFocusedView; - if not IsDestroying and not IsDesigning and - ((Value = nil) and (ActiveLevel <> nil) and (ActiveLevel.GridView <> nil) or - (Value <> nil) and Value.IsDestroying) then - Value := GetAvailableView; - FFocusedView := Value; - if APrevFocusedView <> nil then - begin - APrevFocused := IsFocused; - try - TcxCustomGridViewAccess.FocusChanged(APrevFocusedView, False); - except - FocusedView := APrevFocusedView; - raise; - end; - if APrevFocused and not IsFocused then - SetFocus; - end; - if FFocusedView <> nil then - begin - TcxCustomGridViewAccess.FocusChanged(FFocusedView, True); - TcxGridLevel(FFocusedView.Level).Active := True; - end - else - if IsFocused and CanFocusEx then - SetFocus; - FocusedViewChanged(APrevFocusedView, FFocusedView); - end; -end; - -procedure TcxCustomGrid.SetLevels(Value: TcxGridLevel); -begin - FLevels.Free; - FLevels := Value; - if FLevels <> nil then - FLevels.Control := Self; -end; - -procedure TcxCustomGrid.SetLevelTabs(Value: TcxGridLevelTabs); -begin - FLevelTabs.Assign(Value); -end; - -procedure TcxCustomGrid.SetRootLevelOptions(Value: TcxGridLevelOptions); -begin -end; - -procedure TcxCustomGrid.SetRootLevelStyles(Value: TcxGridLevelStyles); -begin -end; - -procedure TcxCustomGrid.SetTabStop(Value: Boolean); -begin - if FTabStop <> Value then - begin - FTabStop := Value; - if FocusedView <> nil then - FocusedView.TabStop := FTabStop; - end; -end; - -procedure TcxCustomGrid.AddView(AView: TcxCustomGridView); -begin - FViews.Add(AView); - AView.DataController.SetMasterMode(nil, True); -end; - -procedure TcxCustomGrid.RemoveView(AView: TcxCustomGridView); -begin - FViews.Remove(AView); - DestroyViewChanges(AView); - //ViewChanged(AView, vsRemoved); -end; - -procedure TcxCustomGrid.DestroyViews; -var - I: Integer; -begin - for I := ViewCount - 1 downto 0 do - Views[I].Free; -end; - -procedure TcxCustomGrid.DestroyChanges(AChanges: TList); -var - I: Integer; -begin - for I := 0 to AChanges.Count - 1 do - TObject(AChanges[I]).Free; - AChanges.Clear; -end; - -procedure TcxCustomGrid.DestroyViewChanges(AView: TcxCustomGridView); - - procedure ClearViewChanges(AChanges: TList); - var - I: Integer; - begin - for I := AChanges.Count - 1 downto 0 do - if (TcxCustomGridChange(AChanges[I]) is TcxCustomGridViewChange) and - (TcxCustomGridViewChange(AChanges[I]).GridView = AView) then - begin - TObject(AChanges[I]).Free; - AChanges.Delete(I); - end; - end; - -begin - ClearViewChanges(FChanges); - ClearViewChanges(FChangesStack); -end; - -procedure TcxCustomGrid.CreateStructureNavigator; -begin - if (FStructureNavigator = nil) and - IsDesigning and (cxGridStructureNavigatorClass <> nil) and - (FController <> nil) and not FCreatingStructureNavigator then - begin - FCreatingStructureNavigator := True; - try - FStructureNavigator := cxGridStructureNavigatorClass.Create(Self); - finally - FCreatingStructureNavigator := False; - end; - end; -end; - -{procedure TcxCustomGrid.CMDeferUpdates(var Message: TMessage); -begin - DoProcessChangesStack; -end;} - -procedure TcxCustomGrid.CMDialogChar(var Message: TCMDialogChar); -begin - if TcxGridTopDetailsSiteViewInfo(ViewInfo.DetailsSiteViewInfo).ProcessDialogChar(Message.CharCode) then - Message.Result := 1 - else - inherited; -end; - -function TcxCustomGrid.NavigatorIsActive: Boolean; -begin - if FocusedViewNavigator = nil then - Result := False - else - Result := FocusedViewNavigator.IsActive; -end; - -function TcxCustomGrid.NavigatorIsBof: Boolean; -begin - if FocusedViewNavigator = nil then - Result := False - else - Result := FocusedViewNavigator.IsBof; -end; - -function TcxCustomGrid.NavigatorIsEof: Boolean; -begin - if FocusedViewNavigator = nil then - Result := False - else - Result := FocusedViewNavigator.IsEof; -end; - -function TcxCustomGrid.NavigatorCanAppend: Boolean; -begin - if FocusedViewNavigator = nil then - Result := False - else - Result := FocusedViewNavigator.CanAppend; -end; - -function TcxCustomGrid.NavigatorCanEdit: Boolean; -begin - if FocusedViewNavigator = nil then - Result := False - else - Result := FocusedViewNavigator.CanEdit; -end; - -function TcxCustomGrid.NavigatorCanDelete: Boolean; -begin - if FocusedViewNavigator = nil then - Result := False - else - Result := FocusedViewNavigator.CanDelete; -end; - -function TcxCustomGrid.NavigatorCanInsert: Boolean; -begin - if FocusedViewNavigator = nil then - Result := False - else - Result := FocusedViewNavigator.CanInsert; -end; - -function TcxCustomGrid.NavigatorIsEditing: Boolean; -begin - if FocusedViewNavigator = nil then - Result := False - else - Result := FocusedViewNavigator.IsEditing; -end; - -procedure TcxCustomGrid.NavigatorClearBookmark; -begin - if FocusedViewNavigator <> nil then - FocusedViewNavigator.ClearBookmark; -end; - -function TcxCustomGrid.NavigatorIsBookmarkAvailable: Boolean; -begin - if FocusedViewNavigator = nil then - Result := False - else - Result := FocusedViewNavigator.IsBookmarkAvailable; -end; - -procedure TcxCustomGrid.NavigatorDoAction(AButtonIndex: Integer); -begin - if FocusedViewNavigator <> nil then - FocusedViewNavigator.DoAction(AButtonIndex); -end; - -function TcxCustomGrid.NavigatorGetNotifier: TcxNavigatorControlNotifier; -begin - Result := FNavigatorNotifier; -end; - -function TcxCustomGrid.NavigatorIsActionSupported(AButtonIndex: Integer): Boolean; -begin - Result := True; -end; - -procedure TcxCustomGrid.AddChildComponent(AComponent: TcxControlChildComponent); -begin - inherited; - if AComponent is TcxCustomGridView then - AddView(TcxCustomGridView(AComponent)); -end; - -procedure TcxCustomGrid.RemoveChildComponent(AComponent: TcxControlChildComponent); -begin - inherited; - if AComponent is TcxCustomGridView then - RemoveView(TcxCustomGridView(AComponent)); -end; - -procedure TcxCustomGrid.BoundsChanged; -begin - if (ViewInfo = nil) or not ViewInfo.IsCalculating then - SizeChanged; - inherited; - StructureNavigatorChanged; -end; - -procedure TcxCustomGrid.DoCancelMode; -begin - inherited; - FController.DoCancelMode; -end; - -procedure TcxCustomGrid.DoContextPopup(MousePos: TPoint; var Handled: Boolean); -begin - inherited; - if not Handled then - Handled := SendNotifications(gnkContextMenu, TObject((MousePos.X = -1) and (MousePos.Y = -1))); -end; - -procedure TcxCustomGrid.FocusChanged; -begin - inherited; - if not IsDestroying and Focused and (FocusedView <> nil) then - TcxCustomGridViewAccess.FocusChanged(FocusedView, True); -end; - -procedure TcxCustomGrid.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - I: Integer; -begin - inherited; - for I := 0 to ViewCount - 1 do - if Views[I].Owner = Root then - Proc(Views[I]); - for I := 0 to FLevels.Count - 1 do - if FLevels[I].Owner = Root then - Proc(FLevels[I]); -end; - -function TcxCustomGrid.GetCursor(X, Y: Integer): TCursor; -begin - Result := FController.GetCursor(X, Y); - if Result = crDefault then - Result := inherited GetCursor(X, Y); -end; - -function TcxCustomGrid.GetDesignHitTest(X, Y: Integer; Shift: TShiftState): Boolean; -var - AHitTest: TcxCustomGridHitTest; -begin - Result := inherited GetDesignHitTest(X, Y, Shift); - if not Result and (ssLeft in Shift) then - begin - AHitTest := ViewInfo.GetHitTest(X, Y); - Result := AHitTest.HitTestCode = htTab; - end; -end; - -function TcxCustomGrid.GetIsFocused: Boolean; -var - AForm: TCustomForm; -begin - Result := FIsPopupControl{8} or inherited GetIsFocused; - if not Result then - begin - AForm := GetParentForm(Self); - Result := (AForm <> nil) and (AForm.ActiveControl <> Self) and - ContainsControl(AForm.ActiveControl) and AForm.ActiveControl.Focused and - (not (AForm.ActiveControl is TcxControl) or TcxControl(AForm.ActiveControl).IsFocused); - end; -end; - -procedure TcxCustomGrid.Loaded; -begin - inherited; - BeginUpdate; - try - LayoutChanged; - finally - EndUpdate; - end; - StructureNavigatorChanged; -end; - -function TcxCustomGrid.MayFocus: Boolean; -begin - Result := False; -end; - -procedure TcxCustomGrid.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - inherited; - FController.MouseDown(Button, Shift, X, Y); -end; - -procedure TcxCustomGrid.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited; - FController.MouseMove(Shift, X, Y); -end; - -procedure TcxCustomGrid.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - inherited; - FController.MouseUp(Button, Shift, X, Y); -end; - -procedure TcxCustomGrid.LookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); -var - I: Integer; -begin - inherited; - //SizeChanged; - for I := 0 to ViewCount - 1 do - TcxCustomGridViewAccess.LookAndFeelChanged(Views[I]); - SizeChanged; -end; - -procedure TcxCustomGrid.Paint; -begin - inherited; - FPainter.Paint; -end; - -procedure TcxCustomGrid.ReadState(Reader: TReader); -begin - if StructureNavigator <> nil then StructureNavigator.BeforeGridLoading; - inherited; -end; - -procedure TcxCustomGrid.SetChildOrder(Child: TComponent; Order: Integer); -begin - inherited; - if Child is TcxGridLevel then - TcxGridLevel(Child).Index := Order - ViewCount; -end; - -procedure TcxCustomGrid.SetName(const NewName: TComponentName); -var - AOldName: TComponentName; - ALevels: TList; - - procedure RetriveLevels; - - procedure AddLevel(ALevel: TcxGridLevel); - var - I: Integer; - begin - if ALevel.Name <> '' then ALevels.Add(ALevel); - for I := 0 to ALevel.Count - 1 do - AddLevel(ALevel[I]); - end; - - begin - AddLevel(Levels); - end; - -begin - AOldName := Name; - inherited; - if Name <> AOldName then - begin - RenameComponents(Self, Owner, Name, AOldName, ViewCount, @cxGrid.GetView); - ALevels := TList.Create; - try - RetriveLevels; - FTag := ALevels; - RenameComponents(Self, Owner, Name, AOldName, ALevels.Count, @cxGrid.GetLevel); - finally - ALevels.Free; - end; - StructureNavigatorChanged; - end; -end; - -procedure TcxCustomGrid.WndProc(var Message: TMessage); -begin - {if (Message.Msg = WM_MOUSEACTIVATE) and IsDesigning then - Exit;} - inherited WndProc(Message); -end; - -procedure TcxCustomGrid.DoEndDrag(Target: TObject; X, Y: Integer); -begin - FController.EndDrag(Target, X, Y); - inherited; -end; - -procedure TcxCustomGrid.DoStartDrag(var DragObject: TDragObject); -begin - inherited; - FController.StartDrag(DragObject); -end; - -procedure TcxCustomGrid.DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); -begin - inherited; - FController.DragOver(Source, X, Y, State, Accept); -end; - -procedure TcxCustomGrid.CreateHandlers; -begin - FController := GetControllerClass.Create(Self); - FPainter := GetPainterClass.Create(Self); - FViewInfo := GetViewInfoClass.Create(Self); - FNavigatorNotifier := TcxNavigatorControlNotifier.Create; - CreateStructureNavigator; -end; - -procedure TcxCustomGrid.DestroyHandlers; -begin - FreeAndNil(FStructureNavigator); - FreeAndNil(FNavigatorNotifier); - FreeAndNil(FViewInfo); - FreeAndNil(FPainter); - FreeAndNil(FController); -end; - -procedure TcxCustomGrid.DoActiveTabChanged(ALevel: TcxGridLevel); -begin - if StructureNavigator <> nil then StructureNavigator.BringToFront; - if Assigned(FOnActiveTabChanged) then FOnActiveTabChanged(Self, ALevel); -end; - -procedure TcxCustomGrid.DoChange(AGridChange: TcxCustomGridChange); -begin - try - if {IsLoading or - because of details} IsDestroying then Exit; - with AGridChange do - begin - Control := Self; - Execute; - end; - finally - AGridChange.Free; - end; -end; - -procedure TcxCustomGrid.DoLayoutChanged(AGridView: TcxCustomGridView); -begin - if Assigned(FOnLayoutChanged) then FOnLayoutChanged(Self, AGridView); -end; - -procedure TcxCustomGrid.DoProcessChangesStack; -begin - FProcessingChangesStack := True; - try - DoUpdate(FChangesStack); - finally - FProcessingChangesStack := False; - end; -end; - -procedure TcxCustomGrid.DoUpdate(AChanges: TList); -var - AFinalChanges: TList; - - procedure BuildFinalChangesList; - var - I, J: Integer; - AChange: TcxCustomGridChange; - - function FinalChangesContainClass(AChange: TcxCustomGridChange): Boolean; - var - I: Integer; - begin - for I := 0 to AFinalChanges.Count - 1 do - begin - Result := TcxCustomGridChange(AFinalChanges[I]).IsEqual(AChange); - if Result then Exit; - end; - Result := False; - end; - - begin - for I := 0 to AChanges.Count - 1 do - begin - AChange := TcxCustomGridChange(AChanges[I]); - if not AChange.IsCumulative or not FinalChangesContainClass(AChange) then - AFinalChanges.Add(AChange) - else - AChange.Free; - end; - AChanges.Clear; - - I := 0; - while I < AFinalChanges.Count do - begin - AChange := TcxCustomGridChange(AFinalChanges[I]); - for J := I + 1 to AFinalChanges.Count - 1 do - if AChange.IsCompatibleWith(TcxCustomGridChange(AFinalChanges[J])) then - begin - AChange.Free; - AFinalChanges.Delete(I); - Dec(I); - Break; - end; - Inc(I); - end; - - //!!! - for I := AFinalChanges.Count - 1 downto 0 do - begin - AChange := TcxCustomGridChange(AFinalChanges[I]); - for J := I - 1 downto 0 do - if AChange.IsCompatibleWith(TcxCustomGridChange(AFinalChanges[J])) then - begin - AChange.Free; - AFinalChanges.Delete(I); - Break; - end; - end; - end; - - procedure DoFinalChanges; - var - ALockChanges: Boolean; - I: Integer; - AChange: TcxCustomGridChange; - -// T: Integer; - - begin - -// T := GetTickCount; - - if AFinalChanges.Count = 0 then Exit; - ALockChanges := AFinalChanges.Count > 1; - if ALockChanges then - BeginUpdate; - try - for I := 0 to AFinalChanges.Count - 1 do - begin - AChange := TcxCustomGridChange(AFinalChanges[I]); - if ALockChanges and not AChange.CanExecuteWhenLocked then - EndUpdate; - DoChange(AChange); - if ALockChanges and not UpdateLocked then - BeginUpdate; - end; - finally - if ALockChanges then - EndUpdate; - end; - -// Application.MainForm.Caption := IntToStr(GetTickCount - T); - - end; - -begin - AFinalChanges := TList.Create; - try - BuildFinalChangesList; - DoFinalChanges; - finally - AFinalChanges.Free; - end; -end; - -procedure TcxCustomGrid.FocusedViewChanged(APrevFocusedView, AFocusedView: TcxCustomGridView); -begin - if IsDestroying then Exit; - RefreshNavigators; - SendNotifications(gnkFocusedViewChanged); - if Assigned(FOnFocusedViewChanged) then - FOnFocusedViewChanged(Self, APrevFocusedView, AFocusedView); -end; - -function TcxCustomGrid.GetControllerClass: TcxGridControllerClass; -begin - Result := TcxGridController; -end; - -function TcxCustomGrid.GetDefaultViewClass: TcxCustomGridViewClass; -begin - Result := nil; -end; - -function TcxCustomGrid.GetLevelsClass: TcxGridLevelClass; -begin - Result := TcxGridRootLevel; -end; - -function TcxCustomGrid.GetLevelTabsClass: TcxGridLevelTabsClass; -begin - Result := TcxGridLevelTabs; -end; - -function TcxCustomGrid.GetPainterClass: TcxGridPainterClass; -begin - Result := TcxGridPainter; -end; - -function TcxCustomGrid.GetViewInfoClass: TcxGridViewInfoClass; -begin - Result := TcxGridViewInfo; -end; - -procedure TcxCustomGrid.StructureNavigatorChanged; -begin - if StructureNavigator <> nil then StructureNavigator.Changed; -end; - -function TcxCustomGrid.UpdateOnRootViewDataChange: Boolean; -begin - Result := (RootLevelOptions.DetailTabsPosition <> dtpNone) and - not RootLevelOptions.TabsForEmptyDetails; -end; - -procedure TcxCustomGrid.Invalidate(AHardUpdate: Boolean = False); - - procedure InvalidateView(AView: TcxCustomGridView); - var - I: Integer; - begin - if AView = nil then Exit; - AView.Invalidate(AHardUpdate); - for I := 0 to TcxGridLevel(AView.Level).VisibleCount - 1 do - InvalidateView(TcxGridLevel(AView.Level).VisibleItems[I].GridView); - end; - -begin - if IsDestroying then Exit; - if AHardUpdate then - LayoutChanged - else - inherited Invalidate; - InvalidateView(ActiveView); -end; - -procedure TcxCustomGrid.RemoveFocus(AGoForward: Boolean); -begin - if IsFocused then - PostMessage(GetParentForm(Self).Handle, WM_NEXTDLGCTL, WPARAM(not AGoForward), LPARAM(False)); -end; - -procedure TcxCustomGrid.BeginUpdate; -begin - Inc(FUpdateLockCount); -end; - -procedure TcxCustomGrid.CancelUpdate; -begin - if FUpdateLockCount > 0 then - begin - Dec(FUpdateLockCount); - if FUpdateLockCount = 0 then - DestroyChanges(FChanges); - end; -end; - -procedure TcxCustomGrid.Changed(AGridChange: TcxCustomGridChange); -begin - if AGridChange.IsLockable then - if UpdateLocked then - FChanges.Add(AGridChange) - else -(* if HandleAllocated and not FProcessingChangesStack then - begin - if FChangesStack.Count = 0 then - PostMessage(Handle, CM_DEFERUPDATES, 0, 0); - FChangesStack.Add(AGridChange); - end - else *) - DoChange(AGridChange) - else - DoChange(AGridChange); -end; - -procedure TcxCustomGrid.CheckFocusedView; -begin - if (FFocusedView <> nil) and not TcxCustomGridViewAccess.CanFocus(FFocusedView) then - if (ActiveView <> nil) and TcxCustomGridViewAccess.CanFocus(ActiveView) then - ActiveView.Focused := True - else - FocusedView := nil; -end; - -procedure TcxCustomGrid.EndUpdate; -begin - if FUpdateLockCount > 0 then - begin - Dec(FUpdateLockCount); - if FUpdateLockCount = 0 then DoUpdate(FChanges); - end; -end; - -procedure TcxCustomGrid.LayoutChanged; -begin - if not IsLoading then - Changed(TcxGridLayoutChange.Create(nil)); -end; - -procedure TcxCustomGrid.LevelChanged(ALevel: TcxGridLevel; AChangeKind: TcxGridLevelChangeKind); -begin - StructureNavigatorChanged; -end; - -procedure TcxCustomGrid.RefreshNavigators; -begin - if FNavigatorNotifier <> nil then - FNavigatorNotifier.RefreshNavigatorButtons; -end; - -procedure TcxCustomGrid.SizeChanged; -begin - if not IsLoading then - Changed(TcxGridSizeChange.Create(nil)); -end; - -procedure TcxCustomGrid.UpdateFocusing(AChildFocused: Boolean); - - function NeedFocusingUpdate: Boolean; - begin - Result := - AChildFocused and not FLastFocused or - not AChildFocused and not IsFocused; - end; - -begin - if IsDestroying then Exit; - if NeedFocusingUpdate then - begin - FLastFocused := AChildFocused; - FController.FocusChanged; - end; -end; - -procedure TcxCustomGrid.ViewChanged(AView: TcxCustomGridView; - AChangeKind: TcxGridViewChangeNotificationKind); -begin - StructureNavigatorChanged; -end; - -function TcxCustomGrid.CreateView(AViewClass: TcxCustomGridViewClass): TcxCustomGridView; -begin - Result := AViewClass.Create(Owner); - Result.Control := Self; -// Result := AViewClass.CreateEx(Self); - AddView(Result); -end; - -function TcxCustomGrid.ViewExists(AView: TcxCustomGridView): Boolean; -var - I: Integer; -begin - for I := 0 to ViewCount - 1 do - begin - Result := (Views[I] = AView) or Views[I].HasAsClone(AView); - if Result then Exit; - end; - Result := False; -end; - -procedure TcxCustomGrid.RegisterNotification(ANotification: TcxCustomGridNotification); -begin - if FNotifications.IndexOf(ANotification) = -1 then - FNotifications.Add(ANotification); -end; - -procedure TcxCustomGrid.UnregisterNotification(ANotification: TcxCustomGridNotification); -begin - FNotifications.Remove(ANotification); -end; - -function TcxCustomGrid.SendNotifications(AKind: TcxGridNotificationKind; - AData: TObject = nil): Boolean; -var - I: Integer; - ANotification: TcxCustomGridNotification; -begin - Result := False; - if (AKind = gnkContextMenu) and IsDesigning then Exit; - for I := 0 to FNotifications.Count - 1 do - begin - ANotification := TcxCustomGridNotification(FNotifications[I]); - if AKind in ANotification.NotificationKinds then - begin - ANotification.Notify(AKind, AData, Result); - if Result then Break; - end; - end; -end; - -procedure TcxCustomGrid.RootViewDataChanged(AView: TcxCustomGridView); -begin - if UpdateOnRootViewDataChange then - LayoutChanged; -end; - -procedure TcxCustomGrid.TranslationChanged; -begin - SizeChanged; -end; - -{ TcxGridViewRepository } - -constructor TcxGridViewRepository.Create(AOwner: TComponent); -begin - inherited; - FItems := TList.Create; -end; - -destructor TcxGridViewRepository.Destroy; -begin - DestroyItems; - FItems.Free; - inherited; -end; - -function TcxGridViewRepository.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridViewRepository.GetItem(Index: Integer): TcxCustomGridView; -begin - Result := TcxCustomGridView(FItems[Index]); -end; - -procedure TcxGridViewRepository.DestroyItems; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Items[I].Free; -end; - -procedure TcxGridViewRepository.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - I: Integer; -begin - inherited; - for I := 0 to Count - 1 do - if Items[I].Owner = Root then - Proc(Items[I]); -end; - -procedure TcxGridViewRepository.AddItem(AItem: TcxCustomGridView); -begin - FItems.Add(AItem); - AItem.Repository := Self; - AItem.DataController.SetMasterMode(nil, True); -end; - -function TcxGridViewRepository.CreateItem(AItemClass: TcxCustomGridViewClass): TcxCustomGridView; -begin - Result := AItemClass.Create(Owner); - AddItem(Result); -end; - -procedure TcxGridViewRepository.RemoveItem(AItem: TcxCustomGridView); -begin - FItems.Remove(AItem); - AItem.Repository := nil; - if AItem.Control <> nil then - TcxCustomGrid(AItem.Control).DestroyViewChanges(AItem); -end; - -{ functions } - -function GetParentGrid(AControl: TControl): TcxCustomGrid; -var - AGridView: TcxCustomGridView; -begin - AGridView := GetParentGridView(AControl); - if AGridView = nil then - Result := nil - else - Result := TcxCustomGrid(AGridView.Control); -end; - -initialization - RegisterClass(TcxGridLevel); - PageControlDependsControls.Add(Pointer(TcxCustomGrid)); - -finalization - PageControlDependsControls.Remove(Pointer(TcxCustomGrid)); - - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGrid.res b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGrid.res deleted file mode 100644 index 04b9d5d7..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGrid.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridBandedTableView.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridBandedTableView.pas deleted file mode 100644 index 08554664..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridBandedTableView.pas +++ /dev/null @@ -1,9416 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridBandedTableView; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Graphics, Controls, ComCtrls, cxClasses, cxControls, - cxGraphics, cxLookAndFeelPainters, cxStyles, cxStorage, cxPC, cxGridCommon, - cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridRows; - -const - cxGridBandedTableViewAlternateCaptionSeparator: string = '-'; - - cxGridDefaultFixedBandSeparatorWidth = 2; - cxGridDefaultEmptyBandWidth = 50; - - htBandedGridBase = htGridBase + 50; - htColumnHeaderVertSizingEdge = htBandedGridBase + 1; - htBand = htBandedGridBase + 2; - htBandHeader = htBandedGridBase + 3; - htBandHeaderSizingEdge = htBandedGridBase + 4; - htIndicatorBandHeader = htBandedGridBase + 5; - - bbBandedTableFirst = bbTableLast + 1; - bbBandBackground = bbBandedTableFirst; - bbBandHeader = bbBandedTableFirst + 1; - bbBandedTableLast = bbBandHeader; - - bsFirst = 0; - bsBackground = bsFirst; - bsContent = bsFirst + 1; - bsHeader = bsFirst + 2; - bsLast = bsHeader; - - vsBandedTableFirst = vsTableLast + 1; - vsBandBackground = vsBandedTableFirst; - vsBandHeader = vsBandedTableFirst + 1; - vsBandedTableLast = vsBandHeader; - -type - TcxGridBandedTableCustomizationForm = class; - TcxGridBandedTableController = class; - TcxGridBandedColumnContainerZone = class; - TcxGridBandHeaderViewInfo = class; - TcxGridIndicatorBandHeaderItemViewInfo = class; - TcxGridBandRowViewInfo = class; - TcxGridBandRowsViewInfo = class; - TcxGridBandViewInfo = class; - TcxGridBandsViewInfo = class; - TcxGridBandedHeaderViewInfo = class; - TcxGridBandedDataRowCellsAreaItemViewInfo = class; - TcxGridBandedDataRowCellsAreaViewInfo = class; - TcxGridBandedRowsViewInfo = class; - TcxGridBandedTableViewInfo = class; - TcxGridBandedColumnPosition = class; - TcxGridBandedColumn = class; - TcxGridBandRow = class; - TcxGridBandRows = class; - TcxGridBand = class; - TcxGridBands = class; - TcxGridBandedTableView = class; - - TcxGridBandFixedKind = (fkNone, fkLeft, fkRight); - - { hit tests } - - TcxGridColumnHeaderVertSizingEdgeHitTest = class(TcxCustomGridColumnHitTest) - protected - class function GetHitTestCode: Integer; override; - public - function Cursor: TCursor; override; - function DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; override; - end; - - TcxGridBandContainerKind = (bcHeader, bcCustomizationForm); - - TcxGridBandHitTest = class(TcxCustomGridViewHitTest) - private - FBand: TcxGridBand; - FBandContainerKind: TcxGridBandContainerKind; - FVisibleRowIndex: Integer; - protected - class function GetHitTestCode: Integer; override; - public - property Band: TcxGridBand read FBand write FBand; - property BandContainerKind: TcxGridBandContainerKind read FBandContainerKind - write FBandContainerKind; - property VisibleRowIndex: Integer read FVisibleRowIndex write FVisibleRowIndex; - end; - - TcxGridBandHeaderHitTest = class(TcxGridBandHitTest) - protected - class function GetHitTestCode: Integer; override; - public - function DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; override; - end; - - TcxGridBandHeaderSizingEdgeHitTest = class(TcxGridBandHitTest) - protected - class function GetHitTestCode: Integer; override; - public - function Cursor: TCursor; override; - function DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; override; - end; - - TcxGridIndicatorBandHeaderHitTest = class(TcxGridIndicatorHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - { controller } - - // drag&drop objects - - TcxGridBandedColumnContainerZone = class(TcxGridItemContainerZone) - public - Band: TcxGridBand; - ColIndex: Integer; - RowIndex: Integer; - constructor Create(AColumnIndex: Integer; - ABand: TcxGridBand; AColIndex, ARowIndex: Integer); - function IsEqual(Value: TcxGridItemContainerZone): Boolean; override; - function IsInsertion: Boolean; - end; - - TcxGridBandedColumnHeaderMovingObject = class(TcxGridColumnHeaderMovingObject) - private - function GetDestZone: TcxGridBandedColumnContainerZone; - function GetSourceItem: TcxGridBandedColumn; - function GetSourcePosition: TcxGridBandedColumnPosition; - function GetViewInfo: TcxGridBandedTableViewInfo; - procedure SetSourceItem(Value: TcxGridBandedColumn); - protected - function AreArrowsVertical: Boolean; override; - procedure CheckDestItemContainerKind(var AValue: TcxGridItemContainerKind); override; - procedure DoColumnMoving; override; - function GetArrowAreaBoundsForHeader(APlace: TcxGridArrowPlace): TRect; override; - function GetArrowsClientRect: TRect; override; - function IsValidDestinationForVisibleSource: Boolean; override; - property DestZone: TcxGridBandedColumnContainerZone read GetDestZone; - property SourceItem: TcxGridBandedColumn read GetSourceItem write SetSourceItem; - property SourcePosition: TcxGridBandedColumnPosition read GetSourcePosition; - property ViewInfo: TcxGridBandedTableViewInfo read GetViewInfo; - end; - - TcxGridBandHeaderMovingObject = class(TcxCustomGridTableMovingObject) - private - FDestBand: TcxGridBand; - FDestBandContainerKind: TcxGridBandContainerKind; - FDestInsertPosition: TcxPosition; - FIsEmptyViewInsert: Boolean; - FSourceBandContainerKind: TcxGridBandContainerKind; - function GetController: TcxGridBandedTableController; - function GetCustomizationForm: TcxGridBandedTableCustomizationForm; - function GetGridView: TcxGridBandedTableView; - function GetSourceBand: TcxGridBand; - function GetViewInfo: TcxGridBandedTableViewInfo; - procedure SetDestBand(Value: TcxGridBand); - procedure SetDestBandContainerKind(Value: TcxGridBandContainerKind); - procedure SetDestInsertPosition(Value: TcxPosition); - procedure SetIsEmptyViewInsert(Value: Boolean); - procedure SetSourceBand(Value: TcxGridBand); - protected - function AreArrowsVertical: Boolean; override; - function CalculateIsEmptyViewInsert(ACheckMousePos: Boolean): Boolean; - function CanRemove: Boolean; override; - procedure CheckDestParams; virtual; - function GetArrowAreaBounds(APlace: TcxGridArrowPlace): TRect; override; - function GetArrowsClientRect: TRect; override; - function GetCustomizationFormListBox: TcxCustomGridItemsListBox; override; - function GetSourceItemViewInfo: TcxCustomGridCellViewInfo; override; - function IsSourceCustomizationForm: Boolean; override; - function IsValidDestination: Boolean; override; - - procedure BeginDragAndDrop; override; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - procedure EndDragAndDrop(Accepted: Boolean); override; - - property Controller: TcxGridBandedTableController read GetController; - property CustomizationForm: TcxGridBandedTableCustomizationForm read GetCustomizationForm; - property DestBand: TcxGridBand read FDestBand write SetDestBand; - property DestBandContainerKind: TcxGridBandContainerKind read FDestBandContainerKind - write SetDestBandContainerKind; - property DestInsertPosition: TcxPosition read FDestInsertPosition - write SetDestInsertPosition; - property GridView: TcxGridBandedTableView read GetGridView; - property IsEmptyViewInsert: Boolean read FIsEmptyViewInsert write SetIsEmptyViewInsert; - property SourceBand: TcxGridBand read GetSourceBand write SetSourceBand; - property SourceBandContainerKind: TcxGridBandContainerKind read FSourceBandContainerKind - write FSourceBandContainerKind; - property ViewInfo: TcxGridBandedTableViewInfo read GetViewInfo; - public - procedure Init(const P: TPoint; AParams: TcxCustomGridHitTest); override; - end; - - TcxGridColumnVertSizingObject = class(TcxCustomGridColumnSizingObject) - private - function GetColumn: TcxGridBandedColumn; - function GetController: TcxGridBandedTableController; - function GetLineHeight: Integer; - protected - procedure BeginDragAndDrop; override; - procedure EndDragAndDrop(Accepted: Boolean); override; - function GetCurrentSize: Integer; override; - function GetIsHorizontalSizing: Boolean; override; - property Column: TcxGridBandedColumn read GetColumn; - property Controller: TcxGridBandedTableController read GetController; - property LineHeight: Integer read GetLineHeight; - end; - - TcxGridBandSizingObject = class(TcxCustomGridSizingObject) - private - FBand: TcxGridBand; - function GetBandViewInfo: TcxGridBandViewInfo; - function GetController: TcxGridBandedTableController; - function GetGridView: TcxGridBandedTableView; - protected - procedure BeginDragAndDrop; override; - procedure EndDragAndDrop(Accepted: Boolean); override; - - function GetCurrentSize: Integer; override; - function GetSizingItemBounds: TRect; override; - function GetSizingMarkWidth: Integer; override; - - property Band: TcxGridBand read FBand write FBand; - property BandViewInfo: TcxGridBandViewInfo read GetBandViewInfo; - property Controller: TcxGridBandedTableController read GetController; - property GridView: TcxGridBandedTableView read GetGridView; - public - procedure Init(const P: TPoint; AParams: TcxCustomGridHitTest); override; - end; - - // customization form - - TcxGridBandedTableBandsListBoxClass = class of TcxGridBandedTableBandsListBox; - - TcxGridBandedTableBandsListBox = class(TcxGridTableItemsListBox) - private - function GetGridView: TcxGridBandedTableView; - protected - procedure DoRefreshItems; override; - function DrawItemDrawBackgroundHandler(ACanvas: TcxCanvas; const ABounds: TRect): Boolean; override; - function GetDragAndDropParams: TcxCustomGridHitTest; override; - function GetItemEndEllipsis: Boolean; override; - property GridView: TcxGridBandedTableView read GetGridView; - end; - - TcxGridBandedTableCustomizationForm = class(TcxGridTableCustomizationForm) - private - FBandsListBox: TcxGridBandedTableBandsListBox; - FBandsPage: TcxTabSheet; - function GetGridView: TcxGridBandedTableView; - protected - procedure CreateControls; override; - procedure InitPageControl; override; - - function GetBandsListBoxClass: TcxGridBandedTableBandsListBoxClass; virtual; - - property BandsListBox: TcxGridBandedTableBandsListBox read FBandsListBox; - property GridView: TcxGridBandedTableView read GetGridView; - public - procedure RefreshData; override; - property BandsPage: TcxTabSheet read FBandsPage; - end; - - // popup - - TcxGridBandsCustomizationPopupClass = class of TcxGridBandsCustomizationPopup; - - TcxGridBandsCustomizationPopup = class(TcxCustomGridCustomizationPopup) - private - function GetGridView: TcxGridBandedTableView; - protected - procedure AddCheckListBoxItems; override; - function GetDropDownCount: Integer; override; - function SupportsItemMoving: Boolean; override; - - procedure ItemClicked(AItem: TObject; AChecked: Boolean); override; - function GetItemIndex(AItem: TObject): Integer; override; - procedure SetItemIndex(AItem: TObject; AIndex: Integer); override; - public - property GridView: TcxGridBandedTableView read GetGridView; - end; - - // controller - - TcxGridBandedTableController = class(TcxGridTableController) - private - FBandsCustomizationPopup: TcxGridBandsCustomizationPopup; - FForcingWidthBand: TcxGridBand; - FMovingBand: TcxGridBand; - FPressedBand: TcxGridBand; - FSizingBand: TcxGridBand; - FVertSizingColumn: TcxGridBandedColumn; - function GetBandsCustomizationPopup: TcxGridBandsCustomizationPopup; - function GetGridView: TcxGridBandedTableView; - function GetIsBandMoving: Boolean; - function GetIsBandSizing: Boolean; - function GetIsColumnVertSizing: Boolean; - function GetViewInfo: TcxGridBandedTableViewInfo; - procedure SetPressedBand(Value: TcxGridBand); - protected - function GetBandsCustomizationPopupClass: TcxGridBandsCustomizationPopupClass; virtual; - function GetColumnHeaderDragAndDropObjectClass: TcxGridColumnHeaderMovingObjectClass; override; - procedure GetColumnNeighbors(AColumn: TcxGridBandedColumn; AGoForward: Boolean; - AList: TList); virtual; - function GetCustomizationFormClass: TcxCustomGridCustomizationFormClass; override; - function GetDesignHitTest(AHitTest: TcxCustomGridHitTest): Boolean; override; - function GetPatternObject(AObject: TPersistent): TPersistent; override; - function IsBandFixedDuringSizing(ABand: TcxGridBand): Boolean; virtual; - function IsColumnFixedDuringHorzSizing(AColumn: TcxGridColumn): Boolean; override; - procedure LeftPosChanged; override; - - // cells selection - function GetCellMultiSelect: Boolean; override; - - property ForcingWidthBand: TcxGridBand read FForcingWidthBand write FForcingWidthBand; - property ViewInfo: TcxGridBandedTableViewInfo read GetViewInfo; - public - destructor Destroy; override; - procedure DoCancelMode; override; - procedure EndDragAndDrop(Accepted: Boolean); override; - function HasBandsCustomizationPopup: Boolean; - - function FindNextColumnVertically(AFocusedItemIndex: Integer; - AGoForward, AGoOnCycle: Boolean): Integer; virtual; - function FindNextItem(AFocusedItemIndex: Integer; - AGoForward, AGoOnCycle, AFollowVisualOrder: Boolean; out ACycleChanged: Boolean; - ARecord: TcxCustomGridRecord): Integer; override; - function FocusNextColumnVertically(AFocusedColumnIndex: Integer; - AGoForward, AGoOnCycle: Boolean): Boolean; - - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - - property BandsCustomizationPopup: TcxGridBandsCustomizationPopup read GetBandsCustomizationPopup; - property GridView: TcxGridBandedTableView read GetGridView; - property IsBandMoving: Boolean read GetIsBandMoving; - property IsBandSizing: Boolean read GetIsBandSizing; - property IsColumnVertSizing: Boolean read GetIsColumnVertSizing; - property MovingBand: TcxGridBand read FMovingBand; - property PressedBand: TcxGridBand read FPressedBand write SetPressedBand; - property SizingBand: TcxGridBand read FSizingBand; - property VertSizingColumn: TcxGridBandedColumn read FVertSizingColumn; - end; - - { painters } - - TcxGridBandHeaderPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridBandHeaderViewInfo; - protected - procedure DrawBorders; override; - procedure DrawContent; override; - procedure DrawPressed; virtual; - function ExcludeFromClipRect: Boolean; override; - procedure Paint; override; - property ViewInfo: TcxGridBandHeaderViewInfo read GetViewInfo; - end; - - TcxGridBandPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridBandViewInfo; - protected - procedure DrawChildBands; virtual; - procedure DrawColumnHeaders; virtual; - procedure DrawContent; override; - procedure DrawHeader; virtual; - function ExcludeFromClipRect: Boolean; override; - property ViewInfo: TcxGridBandViewInfo read GetViewInfo; - end; - - TcxGridBandedHeaderPainter = class(TcxGridHeaderPainter) - private - function GetViewInfo: TcxGridBandedHeaderViewInfo; - protected - procedure DrawBands; virtual; - procedure DrawItems; override; - property ViewInfo: TcxGridBandedHeaderViewInfo read GetViewInfo; - end; - - TcxGridBandedFooterPainter = class(TcxGridFooterPainter) - protected - procedure DrawItems; override; - end; - - TcxGridIndicatorBandHeaderItemPainter = class(TcxGridIndicatorHeaderItemPainter) - private - function GetViewInfo: TcxGridIndicatorBandHeaderItemViewInfo; - protected - function DrawBackgroundHandler(ACanvas: TcxCanvas; const ABounds: TRect): Boolean; override; - property ViewInfo: TcxGridIndicatorBandHeaderItemViewInfo read GetViewInfo; - end; - - TcxGridBandedDataRowCellsAreaItemPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridBandedDataRowCellsAreaItemViewInfo; - protected - procedure DrawFixedBandsSeparator; virtual; - procedure DrawContent; override; - procedure DrawLines; virtual; - function ExcludeFromClipRect: Boolean; override; - procedure Paint; override; - property ViewInfo: TcxGridBandedDataRowCellsAreaItemViewInfo read GetViewInfo; - end; - - TcxGridBandedRowsPainter = class(TcxGridRowsPainter) - public - class procedure DrawDataRowCells(ARowViewInfo: TcxCustomGridRowViewInfo); override; - end; - - TcxGridBandedTablePainter = class(TcxGridTablePainter) - private - function GetViewInfo: TcxGridBandedTableViewInfo; - protected - function CanOffset(AItemsOffset, DX, DY: Integer): Boolean; override; - public - property ViewInfo: TcxGridBandedTableViewInfo read GetViewInfo; - end; - - { view infos } - - // column container - - // column header - - TcxGridBandedColumnHeaderVertSizingEdgeViewInfo = class(TcxGridColumnHeaderAreaViewInfo) - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function OccupiesSpace: Boolean; override; - function ResidesInContent: Boolean; override; - public - procedure Calculate(const ABounds: TRect; var ATextAreaBounds: TRect); override; - end; - - TcxGridBandedColumnHeaderViewInfo = class(TcxGridColumnHeaderViewInfo) - private - function GetBandViewInfo: TcxGridBandViewInfo; - function GetColumn: TcxGridBandedColumn; - function GetContainer: TcxGridBandedHeaderViewInfo; - function GetRowViewInfo: TcxGridBandRowViewInfo; - protected - function CanVertSize: Boolean; virtual; - procedure GetAreaViewInfoClasses(AProc: TcxGridClassEnumeratorProc); override; - function GetMaxWidth: Integer; override; - property BandViewInfo: TcxGridBandViewInfo read GetBandViewInfo; - property Container: TcxGridBandedHeaderViewInfo read GetContainer; - property RowViewInfo: TcxGridBandRowViewInfo read GetRowViewInfo; - public - property Column: TcxGridBandedColumn read GetColumn; - end; - - // bands - - TcxGridBandHeaderViewInfoClass = class of TcxGridBandHeaderViewInfo; - - TcxGridBandHeaderViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FBandViewInfo: TcxGridBandViewInfo; - function GetBand: TcxGridBand; - function GetGridView: TcxGridBandedTableView; - function GetGridViewInfo: TcxGridBandedTableViewInfo; - function GetRowCount: Integer; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function CanShowHint: Boolean; override; - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - function GetAlignmentHorz: TAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetAreaBounds: TRect; override; - function GetBackgroundBitmap: TBitmap; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetCanvas: TcxCanvas; override; - class function GetCellHeight(ATextHeight: Integer; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; override; - function GetHeight: Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetIsDesignSelected: Boolean; override; - function GetIsPressed: Boolean; virtual; - function GetMultiLinePainting: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetShowEndEllipsis: Boolean; override; - function GetSizingEdgeBounds: TRect; virtual; - function GetText: string; override; - function GetVisible: Boolean; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasCustomDraw: Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - property SizingEdgeBounds: TRect read GetSizingEdgeBounds; - public - constructor Create(ABandViewInfo: TcxGridBandViewInfo); reintroduce; virtual; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - property Band: TcxGridBand read GetBand; - property BandViewInfo: TcxGridBandViewInfo read FBandViewInfo; - property GridView: TcxGridBandedTableView read GetGridView; - property GridViewInfo: TcxGridBandedTableViewInfo read GetGridViewInfo; - property IsPressed: Boolean read GetIsPressed; - property RowCount: Integer read GetRowCount; - end; - - TcxGridBandRowViewInfoClass = class of TcxGridBandRowViewInfo; - - TcxGridBandRowViewInfo = class - private - FColumnViewInfos: TList; - FHeight: Integer; - FIndex: Integer; - FRowsViewInfo: TcxGridBandRowsViewInfo; - function GetBandRow: TcxGridBandRow; - function GetBandViewInfo: TcxGridBandViewInfo; - function GetColumnViewInfo(Index: Integer): TcxGridBandedColumnHeaderViewInfo; - function GetColumnViewInfoCount: Integer; - function GetGridView: TcxGridBandedTableView; - function GetHeight: Integer; - function GetLineHeight: Integer; - function GetMinWidth: Integer; - function GetWidth: Integer; - protected - procedure AddColumnViewInfos; virtual; - procedure Calculate(const ABounds: TRect); virtual; - procedure CalculateColumnWidths; virtual; - function CalculateHeight: Integer; virtual; - function CalculateLineHeight: Integer; virtual; - function CalculateWidth: Integer; virtual; - property GridView: TcxGridBandedTableView read GetGridView; - property LineHeight: Integer read GetLineHeight; - public - Bounds: TRect; - constructor Create(ARowsViewInfo: TcxGridBandRowsViewInfo; AIndex: Integer); virtual; - destructor Destroy; override; - procedure AssignColumnWidths; - procedure Offset(DX, DY: Integer); virtual; - property BandRow: TcxGridBandRow read GetBandRow; - property BandViewInfo: TcxGridBandViewInfo read GetBandViewInfo; - property ColumnViewInfoCount: Integer read GetColumnViewInfoCount; - property ColumnViewInfos[Index: Integer]: TcxGridBandedColumnHeaderViewInfo read GetColumnViewInfo; default; - property Index: Integer read FIndex; - property MinWidth: Integer read GetMinWidth; - property RowsViewInfo: TcxGridBandRowsViewInfo read FRowsViewInfo; - property Height: Integer read GetHeight; - property Width: Integer read GetWidth; - end; - - TcxGridBandRowsViewInfoClass = class of TcxGridBandRowsViewInfo; - - TcxGridBandRowsViewInfo = class - private - FBandViewInfo: TcxGridBandViewInfo; - FItems: TList; - FWidth: Integer; - function GetBandRows: TcxGridBandRows; - function GetCount: Integer; - function GetItem(Index: Integer): TcxGridBandRowViewInfo; - function GetMinWidth: Integer; - function GetWidth: Integer; - procedure CreateItems; - procedure DestroyItems; - protected - procedure AssignColumnWidths; - procedure Calculate(const ABounds: TRect); virtual; - procedure CalculateColumnWidths; virtual; - function CalculateWidth: Integer; virtual; - function GetBandRowViewInfoClass: TcxGridBandRowViewInfoClass; virtual; - public - Bounds: TRect; - constructor Create(ABandViewInfo: TcxGridBandViewInfo); virtual; - destructor Destroy; override; - //function GetColumnsHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - function IndexAtPos(const P: TPoint): Integer; - procedure Offset(DX, DY: Integer); virtual; - property BandRows: TcxGridBandRows read GetBandRows; - property BandViewInfo: TcxGridBandViewInfo read FBandViewInfo; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxGridBandRowViewInfo read GetItem; default; - property MinWidth: Integer read GetMinWidth; - property Width: Integer read GetWidth; - end; - - TcxGridBandViewInfoClass = class of TcxGridBandViewInfo; - - TcxGridBandViewInfo = class(TcxCustomGridCellViewInfo) - private - FBandsViewInfo: TcxGridBandsViewInfo; - FBottomIndex: Integer; - FColumnViewInfos: TList; - FHeaderViewInfo: TcxGridBandHeaderViewInfo; - FIndex: Integer; - FRowsViewInfo: TcxGridBandRowsViewInfo; - FWidth: Integer; - function GetBand: TcxGridBand; - function GetBoundsForBandInsert: TRect; - function GetChildBandViewInfo(Index: Integer): TcxGridBandViewInfo; - function GetChildBandViewInfoCount: Integer; - function GetColumnViewInfo(Index: Integer): TcxGridBandedColumnHeaderViewInfo; - function GetColumnViewInfoCount: Integer; - function GetContainerViewInfo: TcxGridBandedHeaderViewInfo; - function GetFixedKind: TcxGridBandFixedKind; - function GetGridView: TcxGridBandedTableView; - function GetGridViewInfo: TcxGridBandedTableViewInfo; - function GetIsBottom: Boolean; - function GetIsFixed: Boolean; - function GetIsRight: Boolean; - function GetIsRoot: Boolean; - function GetParentBandViewInfo: TcxGridBandViewInfo; - function GetRowCount: Integer; - function GetSameLevelAutoWidth: Integer; - function GetSameLevelItem(Index: Integer): TcxGridBandViewInfo; - function GetSameLevelItemCount: Integer; - protected - procedure AddColumnViewInfos; virtual; - procedure AssignChildBandWidths; - procedure AssignColumnWidths; - procedure CalculateChildBandWidths; virtual; - procedure CalculateChildBands(R: TRect); virtual; - function CalculateChildBandsBounds: TRect; virtual; - function CalculateColumnsBounds: TRect; virtual; - procedure CalculateColumnWidths; virtual; - function CalculateHeaderBounds: TRect; virtual; - //function CalculateHeaderHeightWithChildren: Integer; - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function CanSize: Boolean; virtual; - procedure CheckWidth(var Value: Integer); virtual; - function CustomDrawBackground(ACanvas: TcxCanvas): Boolean; override; - function GetAreAllColumnsFixed: Boolean; virtual; - function GetBackgroundBitmap: TBitmap; override; - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetCanvas: TcxCanvas; override; - function GetContentWidth: Integer; override; - class function GetHeaderViewInfoClass: TcxGridBandHeaderViewInfoClass; virtual; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetMaxContentWidth: Integer; virtual; - function GetMaxWidth: Integer; virtual; - function GetMinContentWidth: Integer; virtual; - function GetMinWidth: Integer; virtual; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetRowsViewInfoClass: TcxGridBandRowsViewInfoClass; virtual; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetWidth: Integer; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - procedure Offset(DX, DY: Integer); override; - procedure SetWidth(Value: Integer); override; - property BoundsForBandInsert: TRect read GetBoundsForBandInsert; - public - constructor Create(ABandsViewInfo: TcxGridBandsViewInfo; AIndex: Integer); virtual; - destructor Destroy; override; - procedure Calculate(const ABounds: TRect); override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - procedure InitAutoWidthItem(AAutoWidthItem: TcxAutoWidthItem); - function InsertPositionAtPos(const P: TPoint; out ABand: TcxGridBand; - out AInsertPosition: TcxPosition): Boolean; - - property AreAllColumnsFixed: Boolean read GetAreAllColumnsFixed; - property Band: TcxGridBand read GetBand; - property BandsViewInfo: TcxGridBandsViewInfo read FBandsViewInfo; - property BottomIndex: Integer read FBottomIndex; - property ChildBandViewInfoCount: Integer read GetChildBandViewInfoCount; - property ChildBandViewInfos[Index: Integer]: TcxGridBandViewInfo read GetChildBandViewInfo; - property ColumnViewInfoCount: Integer read GetColumnViewInfoCount; - property ColumnViewInfos[Index: Integer]: TcxGridBandedColumnHeaderViewInfo read GetColumnViewInfo; default; - property ContainerViewInfo: TcxGridBandedHeaderViewInfo read GetContainerViewInfo; - property FixedKind: TcxGridBandFixedKind read GetFixedKind; - property GridView: TcxGridBandedTableView read GetGridView; - property GridViewInfo: TcxGridBandedTableViewInfo read GetGridViewInfo; - property HeaderViewInfo: TcxGridBandHeaderViewInfo read FHeaderViewInfo; - property Index: Integer read FIndex; - property IsBottom: Boolean read GetIsBottom; - property IsFixed: Boolean read GetIsFixed; - property IsRight: Boolean read GetIsRight; - property IsRoot: Boolean read GetIsRoot; - property MaxContentWidth: Integer read GetMaxContentWidth; - property MaxWidth: Integer read GetMaxWidth; - property MinContentWidth: Integer read GetMinContentWidth; - property MinWidth: Integer read GetMinWidth; - property ParentBandViewInfo: TcxGridBandViewInfo read GetParentBandViewInfo; - property RowCount: Integer read GetRowCount; - property RowsViewInfo: TcxGridBandRowsViewInfo read FRowsViewInfo; - property SameLevelItemCount: Integer read GetSameLevelItemCount; - property SameLevelItems[Index: Integer]: TcxGridBandViewInfo read GetSameLevelItem; - property SameLevelAutoWidth: Integer read GetSameLevelAutoWidth; - end; - - TcxGridBandsViewInfoClass = class of TcxGridBandsViewInfo; - - TcxGridBandsViewInfo = class - private - FContainerViewInfo: TcxGridBandedHeaderViewInfo; - FBandHeaderRowHeights: TList; - FBandHeadersAreaHeight: Integer; - FItems: TList; - FLineCount: Integer; - FRowCount: Integer; - function GetBandHeaderRowCount: Integer; - function GetBandHeaderRowHeight(Index: Integer): Integer; - function GetBandHeadersAreaHeight: Integer; - function GetBands: TcxGridBands; - function GetBottomItem(Index: Integer): TcxGridBandViewInfo; - function GetBottomItemCount: Integer; - function GetColumnHeadersAreaHeight: Integer; - function GetCount: Integer; - function GetGridView: TcxGridBandedTableView; - function GetGridViewInfo: TcxGridBandedTableViewInfo; - function GetInternalItem(Index: Integer): TcxGridBandViewInfo; - function GetItem(Index: Integer): TcxGridBandViewInfo; - function GetLastFixedItem(AFixedKind: TcxGridBandFixedKind; ALevelIndex: Integer): TcxGridBandViewInfo; - function GetLineCount: Integer; - function GetRootItem(Index: Integer): TcxGridBandViewInfo; - function GetRootItemCount: Integer; - function GetRowCount: Integer; - procedure SetBandHeaderRowHeight(Index: Integer; Value: Integer); - procedure CreateItems; - procedure DestroyItems; - protected - function AddIndicatorItems(AIndicatorViewInfo: TcxGridIndicatorViewInfo; ATopBound: Integer): Boolean; virtual; - procedure Calculate; virtual; - function CalculateBandHeaderHeight(ABandHeaderViewInfo: TcxGridBandHeaderViewInfo): Integer; virtual; - procedure CalculateBandHeaderRowHeights; virtual; - function CalculateBandHeadersAreaHeight: Integer; virtual; - procedure CalculateColumnWidths; virtual; - function CalculateHeight: Integer; virtual; - function CalculateWidth: Integer; virtual; - function DrawBandHeaderBackgroundHandler(ACanvas: TcxCanvas; const ABounds: TRect): Boolean; virtual; - function GetBandBackgroundBitmap: TBitmap; virtual; - function GetBandHeaderBackgroundBitmap: TBitmap; virtual; - function GetItemClass: TcxGridBandViewInfoClass; virtual; - function IsBandHeaderHeightAssigned: Boolean; virtual; - function ShowBandHeaders: Boolean; virtual; - function ShowColumnHeaders: Boolean; virtual; - - property BandHeadersAreaHeight: Integer read GetBandHeadersAreaHeight; - property ColumnHeadersAreaHeight: Integer read GetColumnHeadersAreaHeight; - property GridViewInfo: TcxGridBandedTableViewInfo read GetGridViewInfo; - property InternalItems[Index: Integer]: TcxGridBandViewInfo read GetInternalItem; - public - constructor Create(AContainerViewInfo: TcxGridBandedHeaderViewInfo); virtual; - destructor Destroy; override; - procedure AssignRootItemWidths; - //function GetColumnsHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - function GetItemAreaBounds(ABand: TcxGridBand): TRect; virtual; - procedure InsertPositionAtPos(const P: TPoint; out ABand: TcxGridBand; - out AInsertPosition: TcxPosition); - procedure Offset(DX, DY: Integer); virtual; - property BandBackgroundBitmap: TBitmap read GetBandBackgroundBitmap; - property BandHeaderBackgroundBitmap: TBitmap read GetBandHeaderBackgroundBitmap; - property BandHeaderRowCount: Integer read GetBandHeaderRowCount; - property BandHeaderRowHeights[Index: Integer]: Integer read GetBandHeaderRowHeight write SetBandHeaderRowHeight; - property Bands: TcxGridBands read GetBands; - property BottomItemCount: Integer read GetBottomItemCount; - property BottomItems[Index: Integer]: TcxGridBandViewInfo read GetBottomItem; - property ContainerViewInfo: TcxGridBandedHeaderViewInfo read FContainerViewInfo; - property Count: Integer read GetCount; - property GridView: TcxGridBandedTableView read GetGridView; - property Items[Index: Integer]: TcxGridBandViewInfo read GetItem; default; - property LastFixedItems[AFixedKind: TcxGridBandFixedKind; ALevelIndex: Integer]: TcxGridBandViewInfo read GetLastFixedItem; - property LineCount: Integer read GetLineCount; - property RootItemCount: Integer read GetRootItemCount; - property RootItems[Index: Integer]: TcxGridBandViewInfo read GetRootItem; - property RowCount: Integer read GetRowCount; - end; - - // header - - TcxGridBandedHeaderViewInfoSpecific = class(TcxGridHeaderViewInfoSpecific) - private - function GetGridViewInfo: TcxGridBandedTableViewInfo; - protected - function CalculateHeight: Integer; override; - public - property GridViewInfo: TcxGridBandedTableViewInfo read GetGridViewInfo; - end; - - TcxGridBandedHeaderViewInfo = class(TcxGridHeaderViewInfo) - private - FBandsViewInfo: TcxGridBandsViewInfo; - function GetGridView: TcxGridBandedTableView; - function GetGridViewInfo: TcxGridBandedTableViewInfo; - function GetItem(Index: Integer): TcxGridBandedColumnHeaderViewInfo; - function GetLineCount: Integer; - function GetRowCount: Integer; - function GetSpecific: TcxGridBandedHeaderViewInfoSpecific; - protected - procedure AddIndicatorItems(AIndicatorViewInfo: TcxGridIndicatorViewInfo; ATopBound: Integer); override; - procedure CalculateColumnAutoWidths; override; - procedure CalculateColumnWidths; override; - function CalculateHeight: Integer; override; - procedure CalculateItems; override; - function GetBandsViewInfoClass: TcxGridBandsViewInfoClass; virtual; - function GetColumnNeighbors(AColumn: TcxGridColumn): TcxNeighbors; override; - function GetIsScrollable: Boolean; override; - function GetItemAreaBounds(AItem: TcxGridColumnHeaderViewInfo): TRect; override; - function GetItemClass: TcxGridColumnHeaderViewInfoClass; override; - function GetItemMultiLinePainting(AItem: TcxGridColumnHeaderViewInfo): Boolean; override; - function GetItemsAreaBounds: TRect; override; - function GetItemsHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetVisible: Boolean; override; - function GetWidth: Integer; override; - function IsHeightAssigned: Boolean; override; - procedure Offset(DX, DY: Integer); override; - public - constructor Create(AGridViewInfo: TcxCustomGridTableViewInfo); override; - destructor Destroy; override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function GetZone(const P: TPoint): TcxGridItemContainerZone; override; - property BandsViewInfo: TcxGridBandsViewInfo read FBandsViewInfo; - property GridView: TcxGridBandedTableView read GetGridView; - property GridViewInfo: TcxGridBandedTableViewInfo read GetGridViewInfo; - property Items[Index: Integer]: TcxGridBandedColumnHeaderViewInfo read GetItem; default; - property LineCount: Integer read GetLineCount; - property RowCount: Integer read GetRowCount; - property Specific: TcxGridBandedHeaderViewInfoSpecific read GetSpecific; - end; - - // footer - - TcxGridBandedFooterViewInfo = class(TcxGridFooterViewInfo) - protected - function GetItemMultiLinePainting(AItem: TcxGridColumnHeaderViewInfo): Boolean; override; - function IsColumnOnFirstLayer(AColumnIndex: Integer): Boolean; override; - function IsMultilayerLayout: Boolean; override; - procedure PrepareSummaryItems(ASummaryItems: TList); override; - end; - - // indicator - - TcxGridIndicatorBandHeaderItemViewInfo = class(TcxGridIndicatorHeaderItemViewInfo) - private - function GetGridView: TcxGridBandedTableView; - protected - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function SupportsQuickCustomization: Boolean; override; - - function DropDownWindowExists: Boolean; override; - function GetDropDownWindow: TcxCustomGridPopup; override; - public - property GridView: TcxGridBandedTableView read GetGridView; - end; - - TcxGridBandedIndicatorViewInfo = class(TcxGridIndicatorViewInfo) - protected - function GetAlwaysVisible: Boolean; override; - end; - - // rows - - TcxGridFixedBandsSeparatorLocation = (slNone, slLeft, slRight); - - TcxGridBandedDataRowCellsAreaItemViewInfoClass = class of TcxGridBandedDataRowCellsAreaItemViewInfo; - - TcxGridBandedDataRowCellsAreaItemViewInfo = class(TcxGridCellViewInfo) - private - FBandViewInfo: TcxGridBandViewInfo; - FCellsAreaViewInfo: TcxGridBandedDataRowCellsAreaViewInfo; - FLineBounds: TList; - function GetFixedBandsSeparatorLocation: TcxGridFixedBandsSeparatorLocation; - function GetGridViewInfo: TcxGridBandedTableViewInfo; - function GetLineBounds(Index: Integer): TRect; - function GetLineCount: Integer; - function GetRecordsViewInfo: TcxGridBandedRowsViewInfo; - function GetRecordViewInfo: TcxGridDataRowViewInfo; - procedure ClearLines; - procedure CreateLineBounds; - procedure DestroyLineBounds; - protected - procedure AddLine(const ABounds: TRect); - procedure AddLines; virtual; - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetBorders: TcxBorders; override; - function GetFixedBandsSeparatorBounds: TRect; virtual; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - procedure Offset(DX, DY: Integer); override; - - property BandViewInfo: TcxGridBandViewInfo read FBandViewInfo; - property CellsAreaViewInfo: TcxGridBandedDataRowCellsAreaViewInfo read FCellsAreaViewInfo; - property GridViewInfo: TcxGridBandedTableViewInfo read GetGridViewInfo; - property RecordViewInfo: TcxGridDataRowViewInfo read GetRecordViewInfo; - property RecordsViewInfo: TcxGridBandedRowsViewInfo read GetRecordsViewInfo; - public - constructor Create(ACellsAreaViewInfo: TcxGridBandedDataRowCellsAreaViewInfo; - ABandViewInfo: TcxGridBandViewInfo); reintroduce; virtual; - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function CanDrawSelected: Boolean; override; - property FixedBandsSeparatorBounds: TRect read GetFixedBandsSeparatorBounds; - property FixedBandsSeparatorLocation: TcxGridFixedBandsSeparatorLocation read - GetFixedBandsSeparatorLocation; - property LineBounds[Index: Integer]: TRect read GetLineBounds; - property LineCount: Integer read GetLineCount; - end; - - TcxGridBandedDataRowCellsAreaViewInfo = class(TcxGridDataRowCellsAreaViewInfo) - private - FItems: TList; - function GetBandsViewInfo: TcxGridBandsViewInfo; - function GetCount: Integer; - function GetGridViewInfo: TcxGridBandedTableViewInfo; - function GetItem(Index: Integer): TcxGridBandedDataRowCellsAreaItemViewInfo; - procedure CreateItems; - procedure DestroyItems; - protected - function CalculateVisible: Boolean; override; - function GetItemClass: TcxGridBandedDataRowCellsAreaItemViewInfoClass; virtual; - procedure Offset(DX, DY: Integer); override; - property BandsViewInfo: TcxGridBandsViewInfo read GetBandsViewInfo; - property GridViewInfo: TcxGridBandedTableViewInfo read GetGridViewInfo; - public - constructor Create(ARecordViewInfo: TcxCustomGridRecordViewInfo); override; - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function DrawMergedCells: Boolean; override; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxGridBandedDataRowCellsAreaItemViewInfo read GetItem; default; - end; - - TcxGridBandedRowsViewInfo = class(TcxGridRowsViewInfo) - private - FRowCellsAreaVisible: Boolean; - function GetHeaderViewInfo: TcxGridBandedHeaderViewInfo; - protected - function CalculateDataRowHeight: Integer; override; - function CalculateRowCellsAreaVisible: Boolean; virtual; - function GetAreaBoundsForCell(ACellViewInfo: TcxGridTableDataCellViewInfo): TRect; override; - function GetPainterClass: TcxCustomGridRecordsPainterClass; override; - function GetRowWidth: Integer; override; - function GetShowBandSeparators: Boolean; virtual; - function GetShowCellLeftLines: Boolean; virtual; - function GetShowCellTopLines: Boolean; virtual; - - property HeaderViewInfo: TcxGridBandedHeaderViewInfo read GetHeaderViewInfo; - property ShowBandSeparators: Boolean read GetShowBandSeparators; - property ShowCellLeftLines: Boolean read GetShowCellLeftLines; - property ShowCellTopLines: Boolean read GetShowCellTopLines; - public - procedure AfterConstruction; override; - function GetDataRowCellsAreaViewInfoClass: TClass; override; - function IsCellMultiLine(AItem: TcxCustomGridTableItem): Boolean; override; - property RowCellsAreaVisible: Boolean read FRowCellsAreaVisible; - end; - - // table - - TcxGridBandedTableViewInfo = class(TcxGridTableViewInfo) - private - function GetController: TcxGridBandedTableController; - function GetFixedBandSeparatorColor: TColor; - function GetFixedBandSeparatorWidth: Integer; - function GetGridView: TcxGridBandedTableView; - function GetHeaderViewInfo: TcxGridBandedHeaderViewInfo; - protected - function GetScrollableAreaBoundsForEdit: TRect; override; - function GetScrollableAreaBoundsHorz: TRect; override; - function SupportsAutoHeight: Boolean; override; - function SupportsGroupSummariesAlignedWithColumns: Boolean; override; - function SupportsMultipleFooterSummaries: Boolean; override; - - function GetFooterPainterClass: TcxGridFooterPainterClass; override; - function GetFooterViewInfoClass: TcxGridFooterViewInfoClass; override; - function GetHeaderViewInfoClass: TcxGridHeaderViewInfoClass; override; - function GetHeaderViewInfoSpecificClass: TcxGridHeaderViewInfoSpecificClass; override; - function GetIndicatorViewInfoClass: TcxGridIndicatorViewInfoClass; override; - function GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; override; - - property Controller: TcxGridBandedTableController read GetController; - public - function CanOffset(ARecordCountDelta, DX, DY: Integer): Boolean; override; - function GetCellHeight(AIndex, ACellHeight: Integer): Integer; override; - function GetCellTopOffset(AIndex, ACellHeight: Integer): Integer; override; - property FixedBandSeparatorColor: TColor read GetFixedBandSeparatorColor; - property FixedBandSeparatorWidth: Integer read GetFixedBandSeparatorWidth; - property GridView: TcxGridBandedTableView read GetGridView; - property HeaderViewInfo: TcxGridBandedHeaderViewInfo read GetHeaderViewInfo; - end; - - { column } - - TcxGridBandedColumnOptions = class(TcxGridColumnOptions) - private - FVertSizing: Boolean; - procedure SetVertSizing(Value: Boolean); - public - procedure Assign(Source: TPersistent); override; - constructor Create(AItem: TcxCustomGridTableItem); override; - published - property VertSizing: Boolean read FVertSizing write SetVertSizing default True; - end; - - TcxGridBandedColumnStyles = class(TcxGridColumnStyles) - private - function GetItem: TcxGridBandedColumn; - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - public - property Item: TcxGridBandedColumn read GetItem; - end; - - TcxGridBandedColumnPosition = class(TcxCustomGridTableItemCustomOptions) - private - FBand: TcxGridBand; - FBandIndex: Integer; - FColIndex: Integer; - FLineCount: Integer; - FRow: TcxGridBandRow; - FRowIndex: Integer; - FVisibleColIndex: Integer; - function GetBandIndex: Integer; - function GetColIndex: Integer; - function GetGridView: TcxGridBandedTableView; - function GetItem: TcxGridBandedColumn; - function GetRowIndex: Integer; - function GetVisibleBandIndex: Integer; - function GetVisibleRowIndex: Integer; - procedure SetBand(Value: TcxGridBand); - procedure SetBandIndex(Value: Integer); - procedure SetColIndex(Value: Integer); - procedure SetLineCount(Value: Integer); - procedure SetRowIndex(Value: Integer); - protected - procedure CheckLineCount(var Value: Integer); - procedure SaveParams(ABandIndexOnly: Boolean = False); - public - constructor Create(AItem: TcxCustomGridTableItem); override; - procedure Assign(Source: TPersistent); override; - property Band: TcxGridBand read FBand; - property GridView: TcxGridBandedTableView read GetGridView; - property Item: TcxGridBandedColumn read GetItem; - property Row: TcxGridBandRow read FRow; - property VisibleBandIndex: Integer read GetVisibleBandIndex; - property VisibleColIndex: Integer read FVisibleColIndex; - property VisibleRowIndex: Integer read GetVisibleRowIndex; - published - property BandIndex: Integer read GetBandIndex write SetBandIndex; - property ColIndex: Integer read GetColIndex write SetColIndex; - property LineCount: Integer read FLineCount write SetLineCount default 1; - property RowIndex: Integer read GetRowIndex write SetRowIndex; - end; - - TcxGridBandedColumn = class(TcxGridColumn) - private - FPosition: TcxGridBandedColumnPosition; - function GetGridView: TcxGridBandedTableView; - function GetOptions: TcxGridBandedColumnOptions; - function GetStyles: TcxGridBandedColumnStyles; - procedure SetOptions(Value: TcxGridBandedColumnOptions); - procedure SetPosition(Value: TcxGridBandedColumnPosition); - procedure SetStyles(Value: TcxGridBandedColumnStyles); - protected - // IcxStoredObject - function GetStoredProperties(AProperties: TStrings): Boolean; override; - procedure GetPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetPropertyValue(const AName: string; const AValue: Variant); override; - - procedure CreateSubClasses; override; - procedure DestroySubClasses; override; - function GetOptionsClass: TcxCustomGridTableItemOptionsClass; override; - function GetStylesClass: TcxCustomGridTableItemStylesClass; override; - - procedure AssignColumnWidths; override; - function CanCellMerging: Boolean; override; - function CanScroll: Boolean; override; - function CanVertSize: Boolean; virtual; - function DefaultAlternateCaption: string; override; - function GetActuallyVisible: Boolean; override; - function GetEditPartVisible: Boolean; override; - function GetIsBottom: Boolean; override; - function GetIsLeft: Boolean; override; - function GetIsMostBottom: Boolean; override; - function GetIsMostLeft: Boolean; override; - function GetIsMostRight: Boolean; override; - function GetIsRight: Boolean; override; - function GetIsTop: Boolean; override; - function GetVisibleInQuickCustomizationPopup: Boolean; override; - procedure VisibleChanged; override; - public - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - property GridView: TcxGridBandedTableView read GetGridView; - published - property Options: TcxGridBandedColumnOptions read GetOptions write SetOptions; - property Position: TcxGridBandedColumnPosition read FPosition write SetPosition; - property Styles: TcxGridBandedColumnStyles read GetStyles write SetStyles; - end; - - { view } - - // row, rows, band, bands - - TcxGridBandRow = class - private - FBandRows: TcxGridBandRows; - FItems: TList; - FVisibleItems: TList; - function GetCount: Integer; - function GetIndex: Integer; - function GetIsFirst: Boolean; - function GetIsLast: Boolean; - function GetItem(Index: Integer): TcxGridBandedColumn; - function GetLineCount: Integer; - function GetLineOffset: Integer; - function GetVisible: Boolean; - function GetVisibleCount: Integer; - function GetVisibleIndex: Integer; - function GetVisibleItem(Index: Integer): TcxGridBandedColumn; - function GetWidth: Integer; - protected - procedure CheckIndexForInsert(var AIndex: Integer; AExistingItem: Boolean); - procedure RefreshVisibleItemsList; - property VisibleItemsList: TList read FVisibleItems; - property Width: Integer read GetWidth; - public - constructor Create(ABandRows: TcxGridBandRows); - destructor Destroy; override; - procedure ApplyBestFit(ACheckSizingAbility: Boolean = False; AFireEvents: Boolean = False); - procedure Delete(AIndex: Integer); - function IndexOf(AColumn: TcxGridBandedColumn): Integer; - procedure Insert(AIndex: Integer; AColumn: TcxGridBandedColumn); - procedure Move(ACurIndex, ANewIndex: Integer); - - property BandRows: TcxGridBandRows read FBandRows; - property Count: Integer read GetCount; - property Index: Integer read GetIndex; - property IsFirst: Boolean read GetIsFirst; - property IsLast: Boolean read GetIsLast; - property Items[Index: Integer]: TcxGridBandedColumn read GetItem; default; - property LineCount: Integer read GetLineCount; - property LineOffset: Integer read GetLineOffset; - property Visible: Boolean read GetVisible; - property VisibleCount: Integer read GetVisibleCount; - property VisibleIndex: Integer read GetVisibleIndex; - property VisibleItems[Index: Integer]: TcxGridBandedColumn read GetVisibleItem; - end; - - TcxGridBandRows = class - private - FBand: TcxGridBand; - FItems: TList; - FVisibleItems: TList; - function GetCount: Integer; - function GetFirstVisible: TcxGridBandRow; - function GetGridView: TcxGridBandedTableView; - function GetItem(Index: Integer): TcxGridBandRow; - function GetLastVisible: TcxGridBandRow; - function GetLineCount: Integer; - function GetVisibleCount: Integer; - function GetVisibleItem(Index: Integer): TcxGridBandRow; - function GetWidth: Integer; - procedure SetCount(Value: Integer); - procedure RemoveItem(ARow: TcxGridBandRow); - protected - procedure RefreshVisibleItemsList; - property GridView: TcxGridBandedTableView read GetGridView; - property Width: Integer read GetWidth; - public - constructor Create(ABand: TcxGridBand); virtual; - destructor Destroy; override; - procedure ApplyBestFit(ACheckSizingAbility: Boolean = False; AFireEvents: Boolean = False); - function GetLineIndex(ARowIndex: Integer): Integer; - function GetRowIndex(ALineIndex: Integer): Integer; - function Insert(AIndex: Integer): TcxGridBandRow; - procedure MoveColumn(AColumn: TcxGridBandedColumn; ARowIndex, AColIndex: Integer); - - property Band: TcxGridBand read FBand; - property Count: Integer read GetCount write SetCount; - property FirstVisible: TcxGridBandRow read GetFirstVisible; - property Items[Index: Integer]: TcxGridBandRow read GetItem; default; - property LastVisible: TcxGridBandRow read GetLastVisible; - property LineCount: Integer read GetLineCount; - property VisibleCount: Integer read GetVisibleCount; - property VisibleItems[Index: Integer]: TcxGridBandRow read GetVisibleItem; - end; - - TcxGridBandChange = (bcProperty, bcLayout, bcSize); - - TcxGridBandCustomOptions = class(TPersistent) - private - FBand: TcxGridBand; - protected - procedure Changed(AChange: TcxGridBandChange); virtual; - public - constructor Create(ABand: TcxGridBand); virtual; - procedure Assign(Source: TPersistent); override; - property Band: TcxGridBand read FBand; - end; - - TcxGridBandOptionsClass = class of TcxGridBandOptions; - - TcxGridBandOptions = class(TcxGridBandCustomOptions) - private - FHoldOwnColumnsOnly: Boolean; - FMoving: Boolean; - FSizing: Boolean; - procedure SetHoldOwnColumnsOnly(Value: Boolean); - procedure SetMoving(Value: Boolean); - procedure SetSizing(Value: Boolean); - public - constructor Create(ABand: TcxGridBand); override; - procedure Assign(Source: TPersistent); override; - published - property HoldOwnColumnsOnly: Boolean read FHoldOwnColumnsOnly write SetHoldOwnColumnsOnly default False; - property Moving: Boolean read FMoving write SetMoving default True; - property Sizing: Boolean read FSizing write SetSizing default True; - end; - - TcxGridBandPosition = class(TcxGridBandCustomOptions) - private - FBandIndex: Integer; - FColIndex: Integer; - function GetBandIndex: Integer; - function GetColIndex: Integer; - function GetGridView: TcxGridBandedTableView; - function GetParentBand: TcxGridBand; - function GetVisibleColIndex: Integer; - procedure SetBandIndex(Value: Integer); - procedure SetColIndex(Value: Integer); - function IsColIndexStored: Boolean; - protected - function CheckBandIndex(var Value: Integer): Boolean; - procedure SaveParams; - public - constructor Create(ABand: TcxGridBand); override; - procedure Assign(Source: TPersistent); override; - property GridView: TcxGridBandedTableView read GetGridView; - property ParentBand: TcxGridBand read GetParentBand; - property VisibleColIndex: Integer read GetVisibleColIndex; - published - property BandIndex: Integer read GetBandIndex write SetBandIndex default -1; - property ColIndex: Integer read GetColIndex write SetColIndex stored IsColIndexStored; - end; - - TcxGridBandGetHeaderStyle = procedure(Sender: TcxGridBandedTableView; ABand: TcxGridBand; - {$IFDEF BCB}var{$ELSE}out{$ENDIF} AStyle: TcxStyle) of object; - - TcxGridBandStylesClass = class of TcxGridBandStyles; - - TcxGridBandStyles = class(TcxCustomGridStyles) - private - FOnGetHeaderStyle: TcxGridBandGetHeaderStyle; - function GetBand: TcxGridBand; - function GetGridViewValue: TcxGridBandedTableView; - procedure SetOnGetHeaderStyle(Value: TcxGridBandGetHeaderStyle); - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - function GetGridView: TcxCustomGridView; override; - public - procedure Assign(Source: TPersistent); override; - procedure GetHeaderParams(out AParams: TcxViewParams); virtual; - property Band: TcxGridBand read GetBand; - property GridView: TcxGridBandedTableView read GetGridViewValue; - published - property Background: TcxStyle index bsBackground read GetValue write SetValue; - property Content: TcxStyle index bsContent read GetValue write SetValue; - property Header: TcxStyle index bsHeader read GetValue write SetValue; - property OnGetHeaderStyle: TcxGridBandGetHeaderStyle read FOnGetHeaderStyle - write SetOnGetHeaderStyle; - end; - - TcxGridBandGetStoredPropertiesEvent = procedure(Sender: TcxGridBand; - AProperties: TStrings) of object; - TcxGridBandGetStoredPropertyValueEvent = procedure(Sender: TcxGridBand; - const AName: string; var AValue: Variant) of object; - TcxGridBandSetStoredPropertyValueEvent = procedure(Sender: TcxGridBand; - const AName: string; const AValue: Variant) of object; - - TcxGridBandClass = class of TcxGridBand; - - TcxGridBand = class(TcxInterfacedCollectionItem, IcxStoredObject) - private - FCaption: string; - FChildBands: TList; - FColumns: TList; - FFixedKind: TcxGridBandFixedKind; - FHeaderAlignmentHorz: TAlignment; - FHeaderAlignmentVert: TcxAlignmentVert; - FID: Integer; - FIgnoreLoadingStatus: Boolean; - FIsDestroying: Boolean; - FOptions: TcxGridBandOptions; - FParentBand: TcxGridBand; - FPosition: TcxGridBandPosition; - FRows: TcxGridBandRows; - FSavedVisible: Boolean; - FStyles: TcxGridBandStyles; - FTag: TcxTag; - FVisible: Boolean; - FVisibleChildBands: TList; - FVisibleForCustomization: Boolean; - FWidth: Integer; - FSubClassEvents: TNotifyEvent; - FOnHeaderClick: TNotifyEvent; - FOnGetStoredProperties: TcxGridBandGetStoredPropertiesEvent; - FOnGetStoredPropertyValue: TcxGridBandGetStoredPropertyValueEvent; - FOnSetStoredPropertyValue: TcxGridBandSetStoredPropertyValueEvent; - function GetBandLevelIndex: Integer; - function GetBands: TcxGridBands; - function GetChildBand(Index: Integer): TcxGridBand; - function GetChildBandCount: Integer; - function GetChildItem(Index: Integer): TObject; - function GetChildItemCount: Integer; - function GetChildItemVisible(Index: Integer): Boolean; - function GetColumnCount: Integer; - function GetColumn(Index: Integer): TcxGridBandedColumn; - function GetFirstChildBottomBand: TcxGridBand; - function GetFirstVisibleChildBottomBand: TcxGridBand; - function GetGridView: TcxGridBandedTableView; - function GetHidden: Boolean; - function GetIsBottom: Boolean; - function GetIsEmpty: Boolean; - function GetIsFirst: Boolean; - function GetIsFirstNonEmpty: Boolean; - function GetIsLast: Boolean; - function GetIsLastAsChild: Boolean; - function GetIsLastNonEmpty: Boolean; - function GetIsLoading: Boolean; - function GetIsMostRight: Boolean; - function GetIsRoot: Boolean; - function GetIsUpdating: Boolean; - function GetIsVisibleBottom: Boolean; - function GetMinWidth: Integer; - function GetParentBandWithAssignedWidth: TcxGridBand; - function GetRootIndex: Integer; - function GetRootParentBand: TcxGridBand; - function GetVisibleBandLevelCount: Integer; - function GetVisibleBottomIndex: Integer; - function GetVisibleChildBand(Index: Integer): TcxGridBand; - function GetVisibleChildBandCount: Integer; - function GetVisibleIndex: Integer; - function GetVisibleRootIndex: Integer; - function IsTagStored: Boolean; - procedure SetCaption(const Value: string); - procedure SetFixedKind(Value: TcxGridBandFixedKind); - procedure SetHeaderAlignmentHorz(Value: TAlignment); - procedure SetHeaderAlignmentVert(Value: TcxAlignmentVert); - procedure SetHidden(Value: Boolean); - procedure SetOnHeaderClick(Value: TNotifyEvent); - procedure SetOnGetStoredProperties(Value: TcxGridBandGetStoredPropertiesEvent); - procedure SetOnGetStoredPropertyValue(Value: TcxGridBandGetStoredPropertyValueEvent); - procedure SetOnSetStoredPropertyValue(Value: TcxGridBandSetStoredPropertyValueEvent); - procedure SetOptions(Value: TcxGridBandOptions); - procedure SetPosition(Value: TcxGridBandPosition); - procedure SetRootIndex(Value: Integer); - procedure SetStyles(Value: TcxGridBandStyles); - procedure SetTag(Value: TcxTag); - procedure SetVisible(Value: Boolean); - procedure SetVisibleForCustomization(Value: Boolean); - procedure SetWidth(Value: Integer); - - procedure ReadHidden(Reader: TReader); - - procedure AddBand(ABand: TcxGridBand); - procedure RemoveBand(ABand: TcxGridBand); - procedure RefreshVisibleChildBandsList; - - procedure AddColumn(AColumn: TcxGridBandedColumn); - procedure RemoveColumn(AColumn: TcxGridBandedColumn); - protected - procedure DefineProperties(Filer: TFiler); override; - - // IcxStoredObject - function GetObjectName: string; virtual; - function GetProperties(AProperties: TStrings): Boolean; virtual; - procedure GetPropertyValue(const AName: string; var AValue: Variant); virtual; - procedure SetPropertyValue(const AName: string; const AValue: Variant); virtual; - - procedure AssignChildBandWidths; - procedure AssignColumnWidths; - function CanHide: Boolean; virtual; - function CanMove: Boolean; virtual; - function CanSize: Boolean; virtual; - procedure Changed(AChange: TcxGridBandChange); virtual; - procedure ForceWidth(Value: Integer); virtual; - function GetActuallyVisible: Boolean; virtual; - function GetDisplayName: string; override; - function GetFixed: Boolean; virtual; - function GetParentInParent(ABand: TcxGridBand): TcxGridBand; - function HasFixedWidth: Boolean; virtual; - function HasParentWithAssignedWidth: Boolean; - function ColIndexOf(ABand: TcxGridBand): Integer; overload; - procedure MoveBandsToRoot; - procedure SetIndex(Value: Integer); override; - function VisibleColIndexOf(ABand: TcxGridBand): Integer; overload; - procedure VisibleForCustomizationChanged; virtual; - - procedure CheckChildrenVisibles; - procedure CheckVisible; - procedure SaveChildrenVisibles; - procedure SaveColumnsVisibles; - procedure SaveVisible; - property ChildItemCount: Integer read GetChildItemCount; - property ChildItems[Index: Integer]: TObject read GetChildItem; - property ChildItemVisibles[Index: Integer]: Boolean read GetChildItemVisible; - property SavedVisible: Boolean read FSavedVisible; - - function GetOptionsClass: TcxGridBandOptionsClass; virtual; - function GetStylesClass: TcxGridBandStylesClass; virtual; - - procedure DoHeaderClick; virtual; - - property Fixed: Boolean read GetFixed; - property IgnoreLoadingStatus: Boolean read FIgnoreLoadingStatus write FIgnoreLoadingStatus; - property IsDestroying: Boolean read FIsDestroying; - property IsLoading: Boolean read GetIsLoading; - property IsUpdating: Boolean read GetIsUpdating; - property ParentBandWithAssignedWidth: TcxGridBand read GetParentBandWithAssignedWidth; - public - constructor Create(Collection: TCollection); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - procedure ApplyBestFit(ACheckSizingAbility: Boolean = False; AFireEvents: Boolean = False); virtual; - function HasAsParent(ABand: TcxGridBand): Boolean; - procedure MoveBand(ABand: TcxGridBand; AColIndex: Integer); - procedure MoveColumn(AColumn: TcxGridBandedColumn; ARowIndex, AColIndex: Integer); - procedure MoveColumns(ABand: TcxGridBand); - - property ActuallyVisible: Boolean read GetActuallyVisible; - property BandLevelIndex: Integer read GetBandLevelIndex; - property Bands: TcxGridBands read GetBands; - property ChildBandCount: Integer read GetChildBandCount; - property ChildBands[Index: Integer]: TcxGridBand read GetChildBand; - property ColumnCount: Integer read GetColumnCount; - property Columns[Index: Integer]: TcxGridBandedColumn read GetColumn; - property FirstChildBottomBand: TcxGridBand read GetFirstChildBottomBand; - property FirstVisibleChildBottomBand: TcxGridBand read GetFirstVisibleChildBottomBand; - property GridView: TcxGridBandedTableView read GetGridView; - property Hidden: Boolean read GetHidden write SetHidden; // obsolete, use VisibleForCustomization - property ID: Integer read FID; - property IsBottom: Boolean read GetIsBottom; - property IsEmpty: Boolean read GetIsEmpty; - property IsFirst: Boolean read GetIsFirst; - property IsFirstNonEmpty: Boolean read GetIsFirstNonEmpty; - property IsLast: Boolean read GetIsLast; - property IsLastAsChild: Boolean read GetIsLastAsChild; - property IsLastNonEmpty: Boolean read GetIsLastNonEmpty; - property IsMostRight: Boolean read GetIsMostRight; - property IsRoot: Boolean read GetIsRoot; - property IsVisibleBottom: Boolean read GetIsVisibleBottom; - property MinWidth: Integer read GetMinWidth; - property ParentBand: TcxGridBand read FParentBand; - property RootIndex: Integer read GetRootIndex write SetRootIndex; - property RootParentBand: TcxGridBand read GetRootParentBand; - property Rows: TcxGridBandRows read FRows; - property VisibleBandLevelCount: Integer read GetVisibleBandLevelCount; - property VisibleBottomIndex: Integer read GetVisibleBottomIndex; - property VisibleChildBandCount: Integer read GetVisibleChildBandCount; - property VisibleChildBands[Index: Integer]: TcxGridBand read GetVisibleChildBand; - property VisibleIndex: Integer read GetVisibleIndex; - property VisibleRootIndex: Integer read GetVisibleRootIndex; - published - property Alignment: TAlignment read FHeaderAlignmentHorz write SetHeaderAlignmentHorz stored False; // for compatibility - property Caption: string read FCaption write SetCaption; - property FixedKind: TcxGridBandFixedKind read FFixedKind write SetFixedKind default fkNone; - property HeaderAlignmentHorz: TAlignment read FHeaderAlignmentHorz write SetHeaderAlignmentHorz default taCenter; - property HeaderAlignmentVert: TcxAlignmentVert read FHeaderAlignmentVert write SetHeaderAlignmentVert default vaCenter; - property Options: TcxGridBandOptions read FOptions write SetOptions; - property Position: TcxGridBandPosition read FPosition write SetPosition; - property Styles: TcxGridBandStyles read FStyles write SetStyles; - property Tag: TcxTag read FTag write SetTag stored IsTagStored; - property Visible: Boolean read FVisible write SetVisible default True; - property VisibleForCustomization: Boolean read FVisibleForCustomization - write SetVisibleForCustomization default True; - property Width: Integer read FWidth write SetWidth default 0; - property StylesEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property OnHeaderClick: TNotifyEvent read FOnHeaderClick write SetOnHeaderClick; - property OnGetStoredProperties: TcxGridBandGetStoredPropertiesEvent - read FOnGetStoredProperties write SetOnGetStoredProperties; - property OnGetStoredPropertyValue: TcxGridBandGetStoredPropertyValueEvent - read FOnGetStoredPropertyValue write SetOnGetStoredPropertyValue; - property OnSetStoredPropertyValue: TcxGridBandSetStoredPropertyValueEvent - read FOnSetStoredPropertyValue write SetOnSetStoredPropertyValue; - end; - - TcxGridBandsLayout = (blNonFixed, blLeftFixed, blRightFixed, blLeftRightFixed); - - TcxGridBandsClass = class of TcxGridBands; - - TcxGridBands = class(TcxOwnedInterfacedCollection, IcxStoredObject, IcxStoredParent) - private - FBottomItems: TList; - FGridView: TcxGridBandedTableView; - FNextID: Integer; - FRootItems: TList; - FVisibleBottomItems: TList; - FVisibleItems: TList; - FVisibleLeftFixedCount: Integer; - FVisibleRightFixedCount: Integer; - FVisibleRootItems: TList; - FVisibleRootLeftFixedCount: Integer; - FVisibleRootRightFixedCount: Integer; - function GetBottomItem(Index: Integer): TcxGridBand; - function GetBottomItemCount: Integer; - function GetFirstVisibleNonEmpty: TcxGridBand; - function GetItem(Index: Integer): TcxGridBand; - function GetLastVisibleNonEmpty: TcxGridBand; - function GetLayout: TcxGridBandsLayout; - function GetLineCount: Integer; - function GetRootItem(Index: Integer): TcxGridBand; - function GetRootItemCount: Integer; - function GetVisibleBottomItem(Index: Integer): TcxGridBand; - function GetVisibleBottomItemCount: Integer; - function GetVisibleCount: Integer; - function GetVisibleItem(Index: Integer): TcxGridBand; - function GetVisibleRootItem(Index: Integer): TcxGridBand; - function GetVisibleRootItemCount: Integer; - function GetVisibleRowCount: Integer; - procedure SetItem(Index: Integer; Value: TcxGridBand); - - procedure AddItem(AItem: TcxGridBand); - procedure RemoveItem(AItem: TcxGridBand); - - procedure RefreshBottomItemsList; - procedure RefreshRootItemsList; - procedure RefreshVisibleBottomItemsList; - procedure RefreshVisibleItemsList; - procedure RefreshVisibleRootItemsList; - protected - // IcxStoredObject - function GetObjectName: string; virtual; - function GetProperties(AProperties: TStrings): Boolean; virtual; - procedure GetPropertyValue(const AName: string; var AValue: Variant); virtual; - procedure SetPropertyValue(const AName: string; const AValue: Variant); virtual; - // IcxStoredParent - function CreateChild(const AObjectName, AClassName: string): TObject; virtual; - procedure DeleteChild(const AObjectName: string; AObject: TObject); virtual; - procedure GetChildren(AChildren: TStringList); virtual; - - procedure BandVisibilityChanged(ABand: TcxGridBand; Value: Boolean); virtual; - function GetBandClass: TcxGridBandClass; virtual; - function GetNextID: Integer; - procedure ReleaseID(AID: Integer); - property NextID: Integer read FNextID; - public - constructor Create(AGridView: TcxGridBandedTableView); virtual; - destructor Destroy; override; - function Add: TcxGridBand; - function AreNested: Boolean; - procedure Assign(Source: TPersistent); override; - procedure Clear; - function FindItemID(AID: Integer): TcxGridBand; - function GetFirstVisibleIndex(AFixedKind: TcxGridBandFixedKind): Integer; - function GetFirstVisibleRootIndex(AFixedKind: TcxGridBandFixedKind): Integer; - function GetLastVisibleIndex(AFixedKind: TcxGridBandFixedKind): Integer; - function GetLastVisibleRootIndex(AFixedKind: TcxGridBandFixedKind): Integer; - function HaveFixedItems: Boolean; - - property BottomItemCount: Integer read GetBottomItemCount; - property BottomItems[Index: Integer]: TcxGridBand read GetBottomItem; - property FirstVisibleNonEmpty: TcxGridBand read GetFirstVisibleNonEmpty; - property GridView: TcxGridBandedTableView read FGridView; - property Items[Index: Integer]: TcxGridBand read GetItem write SetItem; default; - property Layout: TcxGridBandsLayout read GetLayout; - property LastVisibleNonEmpty: TcxGridBand read GetLastVisibleNonEmpty; - property LineCount: Integer read GetLineCount; - property RootItemCount: Integer read GetRootItemCount; - property RootItems[Index: Integer]: TcxGridBand read GetRootItem; - property VisibleBottomItemCount: Integer read GetVisibleBottomItemCount; - property VisibleBottomItems[Index: Integer]: TcxGridBand read GetVisibleBottomItem; - property VisibleCount: Integer read GetVisibleCount; - property VisibleItems[Index: Integer]: TcxGridBand read GetVisibleItem; - property VisibleLeftFixedCount: Integer read FVisibleLeftFixedCount; - property VisibleRightFixedCount: Integer read FVisibleRightFixedCount; - property VisibleRootItemCount: Integer read GetVisibleRootItemCount; - property VisibleRootItems[Index: Integer]: TcxGridBand read GetVisibleRootItem; - property VisibleRootLeftFixedCount: Integer read FVisibleRootLeftFixedCount; - property VisibleRootRightFixedCount: Integer read FVisibleRootRightFixedCount; - property VisibleRowCount: Integer read GetVisibleRowCount; - end; - - // options - - TcxGridBandedTableBackgroundBitmaps = class(TcxGridTableBackgroundBitmaps) - protected - function GetBitmapStyleIndex(Index: Integer): Integer; override; - public - procedure Assign(Source: TPersistent); override; - published - property BandBackground: TBitmap index bbBandBackground read GetValue write SetValue; - property BandHeader: TBitmap index bbBandHeader read GetValue write SetValue; - end; - - TcxGridBandedTableOptionsBehavior = class(TcxGridTableOptionsBehavior) - private - FBandHeaderHints: Boolean; - procedure SetBandHeaderHints(Value: Boolean); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - published - property BandHeaderHints: Boolean read FBandHeaderHints write SetBandHeaderHints default True; - end; - - TcxGridBandedTableOptionsCustomize = class(TcxGridTableOptionsCustomize) - private - FBandHiding: Boolean; - FBandMoving: Boolean; - FBandSizing: Boolean; - FBandsQuickCustomization: Boolean; - FBandsQuickCustomizationMaxDropDownCount: Integer; - FBandsQuickCustomizationReordering: TcxGridQuickCustomizationReordering; - FColumnVertSizing: Boolean; - FNestedBands: Boolean; - function GetGridView: TcxGridBandedTableView; - procedure SetBandHiding(Value: Boolean); - procedure SetBandMoving(Value: Boolean); - procedure SetBandSizing(Value: Boolean); - procedure SetBandsQuickCustomization(Value: Boolean); - procedure SetBandsQuickCustomizationMaxDropDownCount(Value: Integer); - procedure SetBandsQuickCustomizationReordering(Value: TcxGridQuickCustomizationReordering); - procedure SetColumnVertSizing(Value: Boolean); - procedure SetNestedBands(Value: Boolean); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - function SupportsBandsQuickCustomizationReordering: Boolean; virtual; - function SupportsItemsQuickCustomizationReordering: Boolean; override; - property GridView: TcxGridBandedTableView read GetGridView; - published - property BandHiding: Boolean read FBandHiding write SetBandHiding default False; - property BandMoving: Boolean read FBandMoving write SetBandMoving default True; - property BandSizing: Boolean read FBandSizing write SetBandSizing default True; - property BandsQuickCustomization: Boolean read FBandsQuickCustomization - write SetBandsQuickCustomization default False; - property BandsQuickCustomizationMaxDropDownCount: Integer read FBandsQuickCustomizationMaxDropDownCount - write SetBandsQuickCustomizationMaxDropDownCount default 0; - property BandsQuickCustomizationReordering: TcxGridQuickCustomizationReordering - read FBandsQuickCustomizationReordering write SetBandsQuickCustomizationReordering default qcrDefault; - property ColumnVertSizing: Boolean read FColumnVertSizing write SetColumnVertSizing default True; - property NestedBands: Boolean read FNestedBands write SetNestedBands default True; - end; - - TcxGridBandedTableOptionsView = class(TcxGridTableOptionsView) - private - FBandCaptionsInColumnAlternateCaption: Boolean; - FBandHeaderEndEllipsis: Boolean; - FBandHeaderHeight: Integer; - FBandHeaderLineCount: Integer; - FBandHeaders: Boolean; - FFixedBandSeparatorColor: TColor; - FFixedBandSeparatorWidth: Integer; - function GetGridView: TcxGridBandedTableView; - procedure SetBandCaptionsInColumnAlternateCaption(Value: Boolean); - procedure SetBandHeaderEndEllipsis(Value: Boolean); - procedure SetBandHeaderHeight(Value: Integer); - procedure SetBandHeaderLineCount(Value: Integer); - procedure SetBandHeaders(Value: Boolean); - procedure SetFixedBandSeparatorColor(Value: TColor); - procedure SetFixedBandSeparatorWidth(Value: Integer); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - function GetFixedBandSeparatorColor: TColor; - property GridView: TcxGridBandedTableView read GetGridView; - published - property BandCaptionsInColumnAlternateCaption: Boolean read FBandCaptionsInColumnAlternateCaption - write SetBandCaptionsInColumnAlternateCaption default False; - property BandHeaderEndEllipsis: Boolean read FBandHeaderEndEllipsis - write SetBandHeaderEndEllipsis default False; - property BandHeaderHeight: Integer read FBandHeaderHeight write SetBandHeaderHeight default 0; - property BandHeaderLineCount: Integer read FBandHeaderLineCount write SetBandHeaderLineCount default 1; - property BandHeaders: Boolean read FBandHeaders write SetBandHeaders default True; - property FixedBandSeparatorColor: TColor read FFixedBandSeparatorColor - write SetFixedBandSeparatorColor default clDefault; - property FixedBandSeparatorWidth: Integer read FFixedBandSeparatorWidth - write SetFixedBandSeparatorWidth default cxGridDefaultFixedBandSeparatorWidth; - end; - - // styles - - TcxGridBandedTableViewStyles = class(TcxGridTableViewStyles) - private - FOnGetBandHeaderStyle: TcxGridBandGetHeaderStyle; - function GetGridViewValue: TcxGridBandedTableView; - procedure SetOnGetBandHeaderStyle(Value: TcxGridBandGetHeaderStyle); - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - public - procedure Assign(Source: TPersistent); override; - procedure GetBandHeaderParams(ABand: TcxGridBand; out AParams: TcxViewParams); virtual; - property GridView: TcxGridBandedTableView read GetGridViewValue; - published - property BandBackground: TcxStyle index vsBandBackground read GetValue write SetValue; - property BandHeader: TcxStyle index vsBandHeader read GetValue write SetValue; - property StyleSheet; - property OnGetBandHeaderStyle: TcxGridBandGetHeaderStyle read FOnGetBandHeaderStyle - write SetOnGetBandHeaderStyle; - end; - - TcxGridBandedTableViewStyleSheet = class(TcxCustomStyleSheet) - private - function GetStylesValue: TcxGridBandedTableViewStyles; - procedure SetStylesValue(Value: TcxGridBandedTableViewStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TcxGridBandedTableViewStyles read GetStylesValue write SetStylesValue; - end; - - // grid view - - TcxGridBandCustomDrawHeaderEvent = procedure(Sender: TcxGridBandedTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridBandHeaderViewInfo; var ADone: Boolean) of object; - TcxGridBandEvent = procedure(Sender: TcxGridBandedTableView; ABand: TcxGridBand) of object; - - TcxGridBandedTableView = class(TcxGridTableView) - private - FBands: TcxGridBands; - FIsAssigningBands: Boolean; - FOnBandPosChanged: TcxGridBandEvent; - FOnBandSizeChanged: TcxGridBandEvent; - FOnCustomDrawBandHeader: TcxGridBandCustomDrawHeaderEvent; - function GetBackgroundBitmaps: TcxGridBandedTableBackgroundBitmaps; - function GetColumn(Index: Integer): TcxGridBandedColumn; - function GetController: TcxGridBandedTableController; - function GetGroupedColumn(Index: Integer): TcxGridBandedColumn; - function GetOptionsBehavior: TcxGridBandedTableOptionsBehavior; - function GetOptionsCustomize: TcxGridBandedTableOptionsCustomize; - function GetOptionsView: TcxGridBandedTableOptionsView; - function GetStyles: TcxGridBandedTableViewStyles; - function GetViewInfo: TcxGridBandedTableViewInfo; - function GetVisibleColumn(Index: Integer): TcxGridBandedColumn; - procedure SetBackgroundBitmaps(Value: TcxGridBandedTableBackgroundBitmaps); - procedure SetBands(Value: TcxGridBands); - procedure SetColumn(Index: Integer; Value: TcxGridBandedColumn); - procedure SetOnBandPosChanged(Value: TcxGridBandEvent); - procedure SetOnBandSizeChanged(Value: TcxGridBandEvent); - procedure SetOnCustomDrawBandHeader(Value: TcxGridBandCustomDrawHeaderEvent); - procedure SetOptionsBehavior(Value: TcxGridBandedTableOptionsBehavior); - procedure SetOptionsCustomize(Value: TcxGridBandedTableOptionsCustomize); - procedure SetOptionsView(Value: TcxGridBandedTableOptionsView); - procedure SetStyles(Value: TcxGridBandedTableViewStyles); - protected - // IcxStoredParent - procedure DeleteChild(const AObjectName: string; AObject: TObject); override; - procedure GetStoredChildren(AChildren: TStringList); override; - // IcxGridViewLayoutEditorSupport - for design-time layout editor - procedure AssignLayout(ALayoutView: TcxCustomGridView); override; - - procedure ReadState(Reader: TReader); override; - procedure Updated; override; - procedure Updating; override; - - procedure BeginAssignBands; - procedure DoAssign(ASource: TcxCustomGridView); override; - procedure DoItemsAssigned; override; - procedure EndAssignBands; - procedure GetFakeComponentLinks(AList: TList); override; - function GetIsControlFocused: Boolean; override; - function HasCustomDrawBandHeader: Boolean; - - procedure CreateOptions; override; - procedure DestroyOptions; override; - - procedure AddItem(AItem: TcxCustomGridTableItem); override; - procedure AssignBandsParams; - procedure AssignColumnsParams(AAssignBandIndexes, AAssignOtherIndexes: Boolean); - procedure GetVisibleItemsList(AItems: TList); override; - procedure LoadingComplete; override; - procedure RefreshVisibleItemsList; override; - procedure RestoringComplete; override; - procedure SaveBandsParams; - procedure SaveColumnsParams(ABandIndexOnly: Boolean = False); - - function GetBackgroundBitmapsClass: TcxCustomGridBackgroundBitmapsClass; override; - function GetBandsClass: TcxGridBandsClass; virtual; - function GetControllerClass: TcxCustomGridControllerClass; override; - function GetItemClass: TcxCustomGridTableItemClass; override; - function GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; override; - function GetOptionsCustomizeClass: TcxCustomGridTableOptionsCustomizeClass; override; - function GetOptionsViewClass: TcxCustomGridOptionsViewClass; override; - function GetPainterClass: TcxCustomGridPainterClass; override; - function GetStylesClass: TcxCustomGridViewStylesClass; override; - function GetViewInfoClass: TcxCustomGridViewInfoClass; override; - - procedure DoBandPosChanged(ABand: TcxGridBand); virtual; - procedure DoBandSizeChanged(ABand: TcxGridBand); virtual; - procedure DoCustomDrawBandHeader(ACanvas: TcxCanvas; AViewInfo: TcxGridBandHeaderViewInfo; - var ADone: Boolean); virtual; - - procedure Initialize; override; - - property IsAssigningBands: Boolean read FIsAssigningBands; - public - procedure ApplyBestFit(AItem: TcxCustomGridTableItem = nil; ACheckSizingAbility: Boolean = False; - AFireEvents: Boolean = False); override; - function CreateColumn: TcxGridBandedColumn; - - property Columns[Index: Integer]: TcxGridBandedColumn read GetColumn write SetColumn; - property Controller: TcxGridBandedTableController read GetController; - property GroupedColumns[Index: Integer]: TcxGridBandedColumn read GetGroupedColumn; - property ViewInfo: TcxGridBandedTableViewInfo read GetViewInfo; - property VisibleColumns[Index: Integer]: TcxGridBandedColumn read GetVisibleColumn; - published - property BackgroundBitmaps: TcxGridBandedTableBackgroundBitmaps read GetBackgroundBitmaps - write SetBackgroundBitmaps; - property Bands: TcxGridBands read FBands write SetBands; - property OptionsBehavior: TcxGridBandedTableOptionsBehavior read GetOptionsBehavior write SetOptionsBehavior; - property OptionsCustomize: TcxGridBandedTableOptionsCustomize read GetOptionsCustomize write SetOptionsCustomize; - property OptionsView: TcxGridBandedTableOptionsView read GetOptionsView write SetOptionsView; - property Styles: TcxGridBandedTableViewStyles read GetStyles write SetStyles; - property OnBandPosChanged: TcxGridBandEvent read FOnBandPosChanged write SetOnBandPosChanged; - property OnBandSizeChanged: TcxGridBandEvent read FOnBandSizeChanged write SetOnBandSizeChanged; - property OnCustomDrawBandHeader: TcxGridBandCustomDrawHeaderEvent read FOnCustomDrawBandHeader write SetOnCustomDrawBandHeader; - end; - -implementation - -uses - SysUtils, Math, cxGridStrs, cxCustomData, cxCheckListBox, cxLibraryConsts; - -const - ColumnHeaderInsertZoneSize = 20; - BandHeaderMovingZoneSize = 20; - BandSizingMarkWidth = 2; - EmptyBandMinWidth = 20; - - BandHeaderHitTests = [htBandHeader, htBandHeaderSizingEdge]; - -type - TData = class - Columns: TList; - GridRecord: TcxCustomGridRecord; - end; - -procedure CheckItemIndexForInsert(var AIndex: Integer; ACount: Integer; AExistingItem: Boolean); -begin - if AIndex < 0 then AIndex := 0; - if AIndex > ACount - Ord(AExistingItem) then AIndex := ACount - Ord(AExistingItem); -end; - -function CompareVisibleColumnPositions(APosition1, APosition2: TcxGridBandedColumnPosition): Integer; -begin - Result := APosition1.Band.VisibleIndex - APosition2.Band.VisibleIndex; - if Result = 0 then - begin - Result := APosition1.VisibleRowIndex - APosition2.VisibleRowIndex; - if Result = 0 then - begin - Result := APosition1.VisibleColIndex - APosition2.VisibleColIndex; - if Result = 0 then - Result := APosition1.Item.VisibleIndex - APosition2.Item.VisibleIndex; - end; - end; -end; - -{ TcxGridColumnHeaderVertSizingEdgeHitTest } - -class function TcxGridColumnHeaderVertSizingEdgeHitTest.GetHitTestCode: Integer; -begin - Result := htColumnHeaderVertSizingEdge; -end; - -function TcxGridColumnHeaderVertSizingEdgeHitTest.Cursor: TCursor; -begin - Result := crcxGridVertSize; -end; - -function TcxGridColumnHeaderVertSizingEdgeHitTest.DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; -begin - Result := TcxGridColumnVertSizingObject; -end; - -{ TcxGridBandHitTest } - -class function TcxGridBandHitTest.GetHitTestCode: Integer; -begin - Result := htBand; -end; - -{ TcxGridBandHeaderHitTest } - -class function TcxGridBandHeaderHitTest.GetHitTestCode: Integer; -begin - Result := htBandHeader; -end; - -function TcxGridBandHeaderHitTest.DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; -begin - if Band.CanMove then - Result := TcxGridBandHeaderMovingObject - else - Result := nil; -end; - -{ TcxGridBandHeaderSizingEdgeHitTest } - -class function TcxGridBandHeaderSizingEdgeHitTest.GetHitTestCode: Integer; -begin - Result := htBandHeaderSizingEdge; -end; - -function TcxGridBandHeaderSizingEdgeHitTest.Cursor: TCursor; -begin - Result := crcxGridHorzSize; -end; - -function TcxGridBandHeaderSizingEdgeHitTest.DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; -begin - Result := TcxGridBandSizingObject; -end; - -{ TcxGridIndicatorBandHeaderHitTest } - -class function TcxGridIndicatorBandHeaderHitTest.GetHitTestCode: Integer; -begin - Result := htIndicatorBandHeader; -end; - -{ TcxGridBandedColumnContainerZone } - -constructor TcxGridBandedColumnContainerZone.Create(AColumnIndex: Integer; - ABand: TcxGridBand; AColIndex, ARowIndex: Integer); -begin - inherited Create(AColumnIndex); - Band := ABand; - ColIndex := AColIndex; - RowIndex := ARowIndex; -end; - -function TcxGridBandedColumnContainerZone.IsEqual(Value: TcxGridItemContainerZone): Boolean; -var - AValue: TcxGridBandedColumnContainerZone; -begin - AValue := TcxGridBandedColumnContainerZone(Value); - Result := inherited IsEqual(Value) and (ClassType = Value.ClassType) and - (Band = AValue.Band) and (ColIndex = AValue.ColIndex) and (RowIndex = AValue.RowIndex); -end; - -function TcxGridBandedColumnContainerZone.IsInsertion: Boolean; -begin - Result := ItemIndex = -1; -end; - -{ TcxGridBandedColumnHeaderMovingObject } - -function TcxGridBandedColumnHeaderMovingObject.GetDestZone: TcxGridBandedColumnContainerZone; -begin - Result := TcxGridBandedColumnContainerZone(inherited DestZone); -end; - -function TcxGridBandedColumnHeaderMovingObject.GetSourceItem: TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(inherited SourceItem); -end; - -function TcxGridBandedColumnHeaderMovingObject.GetSourcePosition: TcxGridBandedColumnPosition; -begin - Result := TcxGridBandedColumn(SourceItem).Position; -end; - -function TcxGridBandedColumnHeaderMovingObject.GetViewInfo: TcxGridBandedTableViewInfo; -begin - Result := TcxGridBandedTableViewInfo(inherited ViewInfo); -end; - -procedure TcxGridBandedColumnHeaderMovingObject.SetSourceItem(Value: TcxGridBandedColumn); -begin - inherited SourceItem := Value; -end; - -function TcxGridBandedColumnHeaderMovingObject.AreArrowsVertical: Boolean; -begin - if (DestItemContainerKind = ckHeader) and (DestZone.ItemIndex = -1) then - Result := False - else - Result := inherited AreArrowsVertical; -end; - -procedure TcxGridBandedColumnHeaderMovingObject.CheckDestItemContainerKind(var AValue: TcxGridItemContainerKind); -begin - inherited; - if (AValue = ckHeader) and - (DestZone.Band.Options.HoldOwnColumnsOnly or - (SourceItem.Position.Band <> nil) and SourceItem.Position.Band.Options.HoldOwnColumnsOnly) and - (SourceItem.Position.Band <> DestZone.Band) then - AValue := ckNone; -end; - -procedure TcxGridBandedColumnHeaderMovingObject.DoColumnMoving; - - function GetRowIndex: Integer; - var - ABand: TcxGridBand; - begin - ABand := DestZone.Band; - if DestZone.RowIndex = ABand.Rows.VisibleCount then - Result := ABand.Rows.Count - else - Result := ABand.Rows.VisibleItems[DestZone.RowIndex].Index; - end; - - function GetColIndex: Integer; - var - ARow: TcxGridBandRow; - begin - ARow := SourcePosition.Row; - if DestZone.ColIndex = ARow.VisibleCount then - Result := ARow.Count - else - begin - Result := ARow.VisibleItems[DestZone.ColIndex].Position.ColIndex; - if SourcePosition.ColIndex < Result then Dec(Result); - end; - end; - -begin - with SourceItem do - begin - Position.BandIndex := DestZone.Band.Index; - if DestZone.IsInsertion then - Position.Band.Rows.Insert(GetRowIndex); - Position.RowIndex := GetRowIndex; - Position.ColIndex := GetColIndex; - end; -end; - -function TcxGridBandedColumnHeaderMovingObject.GetArrowAreaBoundsForHeader(APlace: TcxGridArrowPlace): TRect; -var - ARowsViewInfo: TcxGridBandRowsViewInfo; - AColumn: TcxGridBandedColumn; -begin - if DestZone.IsInsertion then - begin - ARowsViewInfo := ViewInfo.HeaderViewInfo.BandsViewInfo[DestZone.Band.VisibleIndex].RowsViewInfo; - Result := ARowsViewInfo.Bounds; - if DestZone.RowIndex > 0 then - Result.Top := ARowsViewInfo[DestZone.RowIndex - 1].Bounds.Bottom; - end - else - begin - Result := inherited GetArrowAreaBoundsForHeader(APlace); - AColumn := TcxGridBandedColumn(GridView.VisibleColumns[DestZone.ItemIndex]); - if DestZone.ColIndex <> AColumn.Position.VisibleColIndex then - Result.Left := Result.Right; - end; -end; - -function TcxGridBandedColumnHeaderMovingObject.GetArrowsClientRect: TRect; -begin - Result := inherited GetArrowsClientRect; - if (DestItemContainerKind = ckHeader) and (DestZone.Band.FixedKind = fkNone) then - Result := ViewInfo.ScrollableAreaBoundsHorz; -end; - -function TcxGridBandedColumnHeaderMovingObject.IsValidDestinationForVisibleSource: Boolean; - - function IsValidForInsertion: Boolean; - begin - Result := - (SourcePosition.Row.VisibleCount <> 1) or - (DestZone.RowIndex < SourcePosition.VisibleRowIndex) or - (SourcePosition.VisibleRowIndex + 1 < DestZone.RowIndex); - end; - - function IsValidForMoving: Boolean; - begin - Result := - (DestZone.RowIndex <> SourcePosition.VisibleRowIndex) or - (DestZone.ColIndex < SourcePosition.VisibleColIndex) or - (SourcePosition.VisibleColIndex + 1 < DestZone.ColIndex); - end; - -begin - if DestItemContainerKind = ckHeader then - Result := - (SourceItemContainerKind = ckGroupByBox) or - (DestZone.Band <> SourcePosition.Band) or - DestZone.IsInsertion and IsValidForInsertion or - not DestZone.IsInsertion and IsValidForMoving - else - Result := inherited IsValidDestinationForVisibleSource; -end; - -{ TcxGridBandHeaderMovingObject } - -function TcxGridBandHeaderMovingObject.GetController: TcxGridBandedTableController; -begin - Result := TcxGridBandedTableController(inherited Controller); -end; - -function TcxGridBandHeaderMovingObject.GetCustomizationForm: TcxGridBandedTableCustomizationForm; -begin - Result := TcxGridBandedTableCustomizationForm(inherited CustomizationForm); -end; - -function TcxGridBandHeaderMovingObject.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -function TcxGridBandHeaderMovingObject.GetSourceBand: TcxGridBand; -begin - Result := SourceItem as TcxGridBand; -end; - -function TcxGridBandHeaderMovingObject.GetViewInfo: TcxGridBandedTableViewInfo; -begin - Result := TcxGridBandedTableViewInfo(inherited ViewInfo); -end; - -procedure TcxGridBandHeaderMovingObject.SetDestBand(Value: TcxGridBand); -begin - if FDestBand <> Value then - begin - Dirty := True; - FDestBand := Value; - end; -end; - -procedure TcxGridBandHeaderMovingObject.SetDestBandContainerKind(Value: TcxGridBandContainerKind); -begin - if FDestBandContainerKind <> Value then - begin - Dirty := True; - FDestBandContainerKind := Value; - end; -end; - -procedure TcxGridBandHeaderMovingObject.SetDestInsertPosition(Value: TcxPosition); -begin - if FDestInsertPosition <> Value then - begin - Dirty := True; - FDestInsertPosition := Value; - end; -end; - -procedure TcxGridBandHeaderMovingObject.SetIsEmptyViewInsert(Value: Boolean); -begin - if FIsEmptyViewInsert <> Value then - begin - Dirty := True; - FIsEmptyViewInsert := Value; - end; -end; - -procedure TcxGridBandHeaderMovingObject.SetSourceBand(Value: TcxGridBand); -begin - SourceItem := Value; -end; - -function TcxGridBandHeaderMovingObject.AreArrowsVertical: Boolean; -begin - Result := FDestInsertPosition in [posLeft, posRight]; -end; - -function TcxGridBandHeaderMovingObject.CalculateIsEmptyViewInsert(ACheckMousePos: Boolean): Boolean; -begin - Result := (DestBandContainerKind = bcHeader) and - (GridView.Bands.VisibleRootItemCount = 0) and - (not ACheckMousePos or PtInRect(GridView.ViewInfo.ScrollableAreaBoundsHorz, CurMousePos)); -end; - -function TcxGridBandHeaderMovingObject.CanRemove: Boolean; -begin - Result := SourceBand.VisibleForCustomization and - (SourceBandContainerKind = bcHeader) and SourceBand.CanHide and - (GridView.OptionsCustomize.BandHiding or GridView.Controller.Customization); -end; - -procedure TcxGridBandHeaderMovingObject.CheckDestParams; -var - AColumnsSource, AColumnsDestination: TcxGridBand; -begin - if (DestBand <> nil) and (DestInsertPosition in [posTop, posBottom]) then - begin - AColumnsSource := nil; - AColumnsDestination := nil; - if (DestInsertPosition = posBottom) and DestBand.IsBottom then - if DestBand.ColumnCount <> 0 then - begin - AColumnsSource := DestBand; - AColumnsDestination := SourceBand.FirstVisibleChildBottomBand; - end - else - else - if SourceBand.IsBottom and (SourceBand.ColumnCount <> 0) then - begin - AColumnsSource := SourceBand; - AColumnsDestination := DestBand.FirstVisibleChildBottomBand; - end; - if (AColumnsSource <> AColumnsDestination) and - ((AColumnsSource <> nil) and AColumnsSource.Options.HoldOwnColumnsOnly or - (AColumnsDestination <> nil) and AColumnsDestination.Options.HoldOwnColumnsOnly) then - DestBand := nil; - end; -end; - -function TcxGridBandHeaderMovingObject.GetArrowAreaBounds(APlace: TcxGridArrowPlace): TRect; -begin - if IsEmptyViewInsert then - Result := ViewInfo.HeaderViewInfo.Bounds - else - begin - Result := ViewInfo.HeaderViewInfo.BandsViewInfo[DestBand.VisibleIndex].HeaderViewInfo.Bounds; - case DestInsertPosition of - posRight: - Result.Left := Result.Right; - posBottom: - Result.Top := Result.Bottom; - end; - end; -end; - -function TcxGridBandHeaderMovingObject.GetArrowsClientRect: TRect; -begin - Result := inherited GetArrowsClientRect; - if (DestBandContainerKind = bcHeader) and (SourceBand.FixedKind = fkNone) then - Result := ViewInfo.ScrollableAreaBoundsHorz; -end; - -function TcxGridBandHeaderMovingObject.GetCustomizationFormListBox: TcxCustomGridItemsListBox; -begin - Result := CustomizationForm.BandsListBox; -end; - -function TcxGridBandHeaderMovingObject.GetSourceItemViewInfo: TcxCustomGridCellViewInfo; -begin - if SourceBandContainerKind = bcHeader then - Result := ViewInfo.HeaderViewInfo.BandsViewInfo[SourceBand.VisibleIndex].HeaderViewInfo - else - Result := inherited GetSourceItemViewInfo; -end; - -function TcxGridBandHeaderMovingObject.IsSourceCustomizationForm: Boolean; -begin - Result := SourceBandContainerKind = bcCustomizationForm; -end; - -function TcxGridBandHeaderMovingObject.IsValidDestination: Boolean; - - function GetNearestColIndex(AForward: Boolean): Integer; - begin - Result := SourceBand.Position.VisibleColIndex; - if AForward then - Inc(Result) - else - Dec(Result); - end; - - function GetVisibleBandCount(AFixedKind: TcxGridBandFixedKind): Integer; - begin - with GridView.Bands do - Result := GetLastVisibleIndex(AFixedKind) - GetFirstVisibleIndex(AFixedKind) + 1; - end; - -begin - if IsEmptyViewInsert then - begin - Result := True; - Exit; - end; - Result := (DestBand <> nil) and (DestBand <> SourceBand); - if Result then - begin - Result := DestBand.FixedKind = SourceBand.FixedKind; - - if not Result and not SourceBand.Visible and - (GetVisibleBandCount(SourceBand.FixedKind) = 0) and DestBand.IsRoot then - case SourceBand.FixedKind of - fkLeft: - Result := (DestInsertPosition = posLeft) and - (DestBand.VisibleRootIndex = GridView.Bands.GetFirstVisibleRootIndex(fkNone)); - fkNone: - Result := - (DestInsertPosition = posRight) and - (DestBand.VisibleRootIndex = GridView.Bands.GetLastVisibleRootIndex(fkLeft)) or - (DestInsertPosition = posLeft) and - (DestBand.VisibleRootIndex = GridView.Bands.GetFirstVisibleRootIndex(fkRight)); - fkRight: - Result := (DestInsertPosition = posRight) and - (DestBand.VisibleRootIndex = GridView.Bands.GetLastVisibleRootIndex(fkNone)); - end; - - if Result and SourceBand.Visible then - case DestInsertPosition of - posLeft, posRight: - Result := (DestBand.ParentBand <> SourceBand.ParentBand) or - (DestBand.Position.VisibleColIndex <> GetNearestColIndex(DestInsertPosition = posLeft)); - posTop: - Result := (DestBand.ParentBand <> SourceBand) or (SourceBand.VisibleChildBandCount > 1); - posBottom: - Result := (SourceBand.ParentBand <> DestBand) or (DestBand.VisibleChildBandCount > 1); - end; - end; -end; - -procedure TcxGridBandHeaderMovingObject.BeginDragAndDrop; -begin - if CustomizationForm <> nil then - with CustomizationForm do - ActivatePage(BandsPage); - Controller.FMovingBand := SourceBand; - inherited; -end; - -procedure TcxGridBandHeaderMovingObject.DragAndDrop(const P: TPoint; var Accepted: Boolean); -var - AHitTest: TcxCustomGridHitTest; - ABand: TcxGridBand; - AInsertPosition: TcxPosition; -begin - AHitTest := ViewInfo.GetHitTest(P); - if AHitTest.HitTestCode = htCustomizationForm then - begin - DestBandContainerKind := bcCustomizationForm; - DestBand := nil; - end - else - begin - DestBandContainerKind := bcHeader; - ViewInfo.HeaderViewInfo.BandsViewInfo.InsertPositionAtPos(P, ABand, AInsertPosition); - DestBand := ABand; - DestInsertPosition := AInsertPosition; - end; - IsEmptyViewInsert := CalculateIsEmptyViewInsert(True); - CheckDestParams; - Accepted := (DestBandContainerKind = bcCustomizationForm) or - (DestBand <> nil) or IsEmptyViewInsert; - inherited; -end; - -procedure TcxGridBandHeaderMovingObject.EndDragAndDrop(Accepted: Boolean); -var - ABandPosChanged: Boolean; - - function GetParentBandIndex: Integer; - begin - if FDestInsertPosition = posBottom then - Result := FDestBand.Index - else - Result := FDestBand.Position.BandIndex; - end; - - function GetColIndex: Integer; - begin - if FDestInsertPosition = posBottom then - Result := 0 - else - begin - Result := FDestBand.Position.ColIndex; - if FDestInsertPosition = posRight then Inc(Result); - if SourceBand.Position.ColIndex < Result then Dec(Result); - end; - end; - - procedure BeforePositionChange; - var - AColIndex, I: Integer; - begin - if (DestInsertPosition <> posBottom) and (GetParentBandIndex = SourceBand.Index) then - begin - AColIndex := SourceBand.Position.ColIndex; - for I := SourceBand.ChildBandCount - 1 downto 0 do - with SourceBand.ChildBands[I].Position do - begin - BandIndex := SourceBand.Position.BandIndex; - ColIndex := AColIndex; - end; - end; - end; - - procedure AfterPositionChange; - var - I: Integer; - begin - case DestInsertPosition of - posTop: - begin - DestBand.Position.BandIndex := SourceBand.Index; - DestBand.Position.ColIndex := 0; - end; - posBottom: - begin - I := 0; - while I < DestBand.VisibleChildBandCount do - if DestBand.VisibleChildBands[I] <> SourceBand then - DestBand.VisibleChildBands[I].Position.BandIndex := SourceBand.Index - else - Inc(I); - end; - end; - end; - -begin - inherited; - Controller.FMovingBand := nil; - if Accepted then - begin - ABandPosChanged := False; - GridView.BeginUpdate; - try - if DestBand = nil then - if CanRemove then - begin - SourceBand.Visible := False; - ABandPosChanged := True; - end - else - if IsEmptyViewInsert then - begin - SourceBand.Position.BandIndex := -1; - SourceBand.Visible := True; - ABandPosChanged := True; - end - else - else - if IsValidDestination then - begin - BeforePositionChange; - SourceBand.Position.BandIndex := GetParentBandIndex; - SourceBand.Position.ColIndex := GetColIndex; - AfterPositionChange; - SourceBand.Visible := True; - ABandPosChanged := True; - end; - finally - GridView.EndUpdate; - end; - if ABandPosChanged then - GridView.DoBandPosChanged(SourceBand); - end; -end; - -procedure TcxGridBandHeaderMovingObject.Init(const P: TPoint; AParams: TcxCustomGridHitTest); -begin - inherited; - with AParams as TcxGridBandHeaderHitTest do - begin - SourceBand := Band; - SourceBandContainerKind := BandContainerKind; - end; -end; - -{ TcxGridColumnVertSizingObject } - -function TcxGridColumnVertSizingObject.GetColumn: TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(inherited Column); -end; - -function TcxGridColumnVertSizingObject.GetController: TcxGridBandedTableController; -begin - Result := TcxGridBandedTableController(inherited Controller); -end; - -function TcxGridColumnVertSizingObject.GetLineHeight: Integer; -begin - Result := ViewInfo.HeaderViewInfo.ItemHeight; -end; - -procedure TcxGridColumnVertSizingObject.BeginDragAndDrop; -begin - OriginalSize := ColumnHeaderViewInfo.Height; - Controller.FVertSizingColumn := Column; - inherited; -end; - -procedure TcxGridColumnVertSizingObject.EndDragAndDrop(Accepted: Boolean); -begin - inherited; - if Accepted then - begin - Column.Position.LineCount := CurrentSize div LineHeight; - TcxGridBandedTableView(GridView).DoColumnSizeChanged(Column); - end; - Controller.FVertSizingColumn := nil; -end; - -function TcxGridColumnVertSizingObject.GetCurrentSize: Integer; -begin - Result := MulDiv(inherited GetCurrentSize, 1, LineHeight); - Column.Position.CheckLineCount(Result); - Result := Result * LineHeight; -end; - -function TcxGridColumnVertSizingObject.GetIsHorizontalSizing: Boolean; -begin - Result := False; -end; - -{ TcxGridBandSizingObject } - -function TcxGridBandSizingObject.GetBandViewInfo: TcxGridBandViewInfo; -begin - Result := TcxGridBandedTableViewInfo(ViewInfo).HeaderViewInfo.BandsViewInfo[Band.VisibleIndex]; -end; - -function TcxGridBandSizingObject.GetController: TcxGridBandedTableController; -begin - Result := TcxGridBandedTableController(inherited Controller); -end; - -function TcxGridBandSizingObject.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -procedure TcxGridBandSizingObject.BeginDragAndDrop; -begin - OriginalSize := BandViewInfo.ContentWidth; - Controller.FSizingBand := Band; - inherited; -end; - -procedure TcxGridBandSizingObject.EndDragAndDrop(Accepted: Boolean); -begin - inherited; - Controller.FSizingBand := nil; - if Accepted and (CurrentSize <> OriginalSize) then - begin - Band.ForceWidth(CurrentSize); - GridView.DoBandSizeChanged(Band); - end; -end; - -function TcxGridBandSizingObject.GetCurrentSize: Integer; -begin - Result := inherited GetCurrentSize; - BandViewInfo.CheckWidth(Result); -end; - -function TcxGridBandSizingObject.GetSizingItemBounds: TRect; -begin - Result := BandViewInfo.ContentBounds; -end; - -function TcxGridBandSizingObject.GetSizingMarkWidth: Integer; -begin - Result := BandSizingMarkWidth; -end; - -procedure TcxGridBandSizingObject.Init(const P: TPoint; AParams: TcxCustomGridHitTest); -begin - inherited; - Band := (AParams as TcxGridBandHeaderSizingEdgeHitTest).Band; -end; - -{ TcxGridBandedTableBandsListBox } - -function TcxGridBandedTableBandsListBox.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -procedure TcxGridBandedTableBandsListBox.DoRefreshItems; -var - I: Integer; - ABand: TcxGridBand; -begin - inherited; - with Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to GridView.Bands.Count - 1 do - begin - ABand := GridView.Bands[I]; - if ABand.CanMove and ABand.VisibleForCustomization and not ABand.Visible then - AddObject(ABand.Caption, ABand); - end; - finally - EndUpdate; - end; - end; -end; - -function TcxGridBandedTableBandsListBox.DrawItemDrawBackgroundHandler(ACanvas: TcxCanvas; - const ABounds: TRect): Boolean; -begin - Result := GridView.ViewInfo.HeaderViewInfo.BandsViewInfo.DrawBandHeaderBackgroundHandler(ACanvas, ABounds); -end; - -function TcxGridBandedTableBandsListBox.GetDragAndDropParams: TcxCustomGridHitTest; -begin - Result := TcxGridBandHeaderHitTest.Instance(Point(-1, -1)); - with TcxGridBandHeaderHitTest(Result) do - begin - GridView := Self.GridView; - Band := TcxGridBand(DragAndDropItem); - BandContainerKind := bcCustomizationForm; - end; -end; - -function TcxGridBandedTableBandsListBox.GetItemEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.BandHeaderEndEllipsis; -end; - -{ TcxGridBandedTableCustomizationForm } - -function TcxGridBandedTableCustomizationForm.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -procedure TcxGridBandedTableCustomizationForm.CreateControls; - - procedure CreateBandsListBox; - begin - FBandsListBox := GetBandsListBoxClass.Create(Self); - with FBandsListBox do - begin - Align := alClient; - Parent := FBandsPage; - RefreshItems; - end; - end; - -begin - inherited; - CreateBandsListBox; -end; - -procedure TcxGridBandedTableCustomizationForm.InitPageControl; -begin - inherited; - FBandsPage := CreatePage(cxGetResourceString(@scxGridCustomizationFormBandsPageCaption), - GridView.OptionsCustomize.BandMoving); - FBandsPage.PageIndex := 0; - ActivatePage(FBandsPage); -end; - -function TcxGridBandedTableCustomizationForm.GetBandsListBoxClass: TcxGridBandedTableBandsListBoxClass; -begin - Result := TcxGridBandedTableBandsListBox; -end; - -procedure TcxGridBandedTableCustomizationForm.RefreshData; -begin - inherited; - FBandsListBox.RefreshItems; -end; - -{ TcxGridBandsCustomizationPopup } - -function TcxGridBandsCustomizationPopup.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -procedure TcxGridBandsCustomizationPopup.AddCheckListBoxItems; -var - I: Integer; - - procedure AddBandToItems(AItems: TcxCheckListBoxItems; ABand: TcxGridBand); - var - I: Integer; - begin - if ABand.VisibleForCustomization then - with AItems.Add do - begin - Checked := ABand.Visible; - ItemObject := ABand; - Text := ABand.Caption; - end; - if ABand.Visible then - for I := 0 to ABand.ChildBandCount - 1 do - AddBandToItems(AItems, ABand.ChildBands[I]); - end; - -begin - CheckListBox.Items.BeginUpdate; - try - for I := 0 to GridView.Bands.RootItemCount - 1 do - AddBandToItems(CheckListBox.Items, GridView.Bands.RootItems[I]); - finally - CheckListBox.Items.EndUpdate; - end; -end; - -function TcxGridBandsCustomizationPopup.GetDropDownCount: Integer; -begin - Result := GridView.OptionsCustomize.BandsQuickCustomizationMaxDropDownCount; -end; - -function TcxGridBandsCustomizationPopup.SupportsItemMoving: Boolean; -begin - Result := GridView.OptionsCustomize.SupportsBandsQuickCustomizationReordering; -end; - -procedure TcxGridBandsCustomizationPopup.ItemClicked(AItem: TObject; AChecked: Boolean); -var - AItems: TList; -begin - TcxGridBand(AItem).Visible := AChecked; - - AItems := TList.Create; - try - GetCheckListBoxSelectedItems(AItems); - RefreshCheckListBoxItems; - SetCheckListBoxSelectedItems(AItems); - finally - AItems.Free; - end; - AdjustCheckListBoxSize; - RestoreControlsBounds; - CalculateSize; - - GridView.Controller.DesignerModified; - - GridView.DoBandPosChanged(TcxGridBand(AItem)); -end; - -function TcxGridBandsCustomizationPopup.GetItemIndex(AItem: TObject): Integer; -begin - Result := TcxGridBand(AItem).Index; -end; - -procedure TcxGridBandsCustomizationPopup.SetItemIndex(AItem: TObject; AIndex: Integer); -begin - if TcxGridBand(AItem).Index < AIndex then - Dec(AIndex); - TcxGridBand(AItem).Index := AIndex; - GridView.Controller.DesignerModified; - GridView.DoBandPosChanged(TcxGridBand(AItem)); -end; - -{ TcxGridBandedTableController } - -destructor TcxGridBandedTableController.Destroy; -begin - FBandsCustomizationPopup.Free; - inherited; -end; - -function TcxGridBandedTableController.GetBandsCustomizationPopup: TcxGridBandsCustomizationPopup; -begin - if FBandsCustomizationPopup = nil then - FBandsCustomizationPopup := GetBandsCustomizationPopupClass.Create(GridView); - Result := FBandsCustomizationPopup; -end; - -function TcxGridBandedTableController.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -function TcxGridBandedTableController.GetIsBandMoving: Boolean; -begin - Result := FMovingBand <> nil; -end; - -function TcxGridBandedTableController.GetIsBandSizing: Boolean; -begin - Result := FSizingBand <> nil; -end; - -function TcxGridBandedTableController.GetIsColumnVertSizing: Boolean; -begin - Result := FVertSizingColumn <> nil; -end; - -function TcxGridBandedTableController.GetViewInfo: TcxGridBandedTableViewInfo; -begin - Result := TcxGridBandedTableViewInfo(inherited ViewInfo); -end; - -procedure TcxGridBandedTableController.SetPressedBand(Value: TcxGridBand); -var - R: TRect; - - function GetUpdateRect: TRect; - begin - if FPressedBand.VisibleIndex = -1 then - SetRectEmpty(Result) - else - Result := ViewInfo.HeaderViewInfo.BandsViewInfo[FPressedBand.VisibleIndex].HeaderViewInfo.Bounds; - end; - -begin - if FPressedBand <> Value then - begin - if Value = nil then - R := GetUpdateRect; - FPressedBand := Value; - if Value <> nil then - R := GetUpdateRect; - GridView.ViewChanged(R); - end; -end; - -function TcxGridBandedTableController.GetBandsCustomizationPopupClass: TcxGridBandsCustomizationPopupClass; -begin - Result := TcxGridBandsCustomizationPopup; -end; - -function TcxGridBandedTableController.GetColumnHeaderDragAndDropObjectClass: TcxGridColumnHeaderMovingObjectClass; -begin - Result := TcxGridBandedColumnHeaderMovingObject; -end; - -procedure TcxGridBandedTableController.GetColumnNeighbors(AColumn: TcxGridBandedColumn; - AGoForward: Boolean; AList: TList); -var - ABands: TcxGridBands; - ANeighborColumn: TcxGridBandedColumn; - - function GetNextColumn(AColumn: TcxGridBandedColumn): TcxGridBandedColumn; - var - ABand: TcxGridBand; - ARow: TcxGridBandRow; - ARowIndex, AColIndex: Integer; - - function InitializeValues: Boolean; - begin - Result := False; - if AColumn = nil then - if AGoForward then - begin - ABand := ABands.FirstVisibleNonEmpty; - if ABand = nil then Exit; - ARow := ABand.Rows.FirstVisible; - AColIndex := -1; - end - else - begin - ABand := ABands.LastVisibleNonEmpty; - if ABand = nil then Exit; - ARow := ABand.Rows.LastVisible; - AColIndex := ARow.VisibleCount; - end - else - with AColumn.Position do - begin - ABand := Band; - ARow := Row; - ARowIndex := VisibleRowIndex; - AColIndex := VisibleColIndex; - end; - Result := ARow <> nil; - end; - - function ProcessRow: Boolean; - begin - Result := - (AColumn <> nil) and (AGoForward and not AColumn.IsRight or not AGoForward and not AColumn.IsLeft) or - (AColumn = nil) and (ARow.VisibleCount <> 0); - if Result then - GetNextColumn := ARow.VisibleItems[AColIndex + 2 * Ord(AGoForward) - 1]; - end; - - function ProcessBand: Boolean; - var - ALineIndex, AOriginalRowIndex: Integer; - ARowChanged: Boolean; - - procedure FindNextBand; - begin - if AGoForward and ABand.IsLast then - begin - ABand := ABands.FirstVisibleNonEmpty; - ARowIndex := AOriginalRowIndex + 1; - ARowChanged := True; - end - else - if not AGoForward and ABand.IsFirst then - begin - ABand := ABands.LastVisibleNonEmpty; - ARowIndex := AOriginalRowIndex - 1; - ARowChanged := True; - end - else - begin - ABand := ABands.VisibleBottomItems[ABand.VisibleBottomIndex + 2 * Ord(AGoForward) - 1]; - if not ARowChanged then - ARowIndex := ABand.Rows.GetRowIndex(ALineIndex); - end; - end; - - begin - if ARowIndex = -1 then - ALineIndex := 0 - else - ALineIndex := ABand.Rows.GetLineIndex(ARowIndex); - AOriginalRowIndex := ARowIndex; - ARowChanged := False; - repeat - FindNextBand; - Result := (0 <= ARowIndex) and (ARowIndex < ABand.Rows.VisibleCount); - until Result or - AGoForward and ABand.IsFirstNonEmpty and (ARowIndex = ABands.VisibleRowCount) or - not AGoForward and ABand.IsLastNonEmpty and (ARowIndex = -1); - if Result then - begin - AColumn := nil; - ARow := ABand.Rows.VisibleItems[ARowIndex]; - if AGoForward then - AColIndex := -1 - else - AColIndex := ARow.VisibleCount; - end; - end; - - begin - Result := nil; - if not InitializeValues then Exit; - while not ProcessRow do - if not ProcessBand then Break; - end; - -begin - AList.Clear; - if (AColumn <> nil) and not AColumn.ActuallyVisible then Exit; - ABands := GridView.Bands; - ANeighborColumn := AColumn; - repeat - ANeighborColumn := GetNextColumn(ANeighborColumn); - if (ANeighborColumn = nil) or (AList.IndexOf(ANeighborColumn) <> -1) then - Break - else - AList.Add(ANeighborColumn); - until False; -end; - -function TcxGridBandedTableController.GetCustomizationFormClass: TcxCustomGridCustomizationFormClass; -begin - Result := TcxGridBandedTableCustomizationForm; -end; - -function TcxGridBandedTableController.GetDesignHitTest(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := inherited GetDesignHitTest(AHitTest); - if not Result then - Result := AHitTest.HitTestCode in [htBandHeader, htIndicatorBandHeader]; -end; - -function TcxGridBandedTableController.GetPatternObject(AObject: TPersistent): TPersistent; -begin - if AObject is TcxGridBand then - Result := TcxGridBandedTableView(GridView.PatternGridView).Bands.FindItemID(TcxGridBand(AObject).ID) - else - Result := inherited GetPatternObject(AObject); -end; - -function TcxGridBandedTableController.IsBandFixedDuringSizing(ABand: TcxGridBand): Boolean; -begin - Result := (ABand = ForcingWidthBand) or - not ForcingWidthBand.IsLastAsChild and (ABand.ParentBand = ForcingWidthBand.ParentBand) and - (ABand.Position.VisibleColIndex < ForcingWidthBand.Position.VisibleColIndex); -end; - -function TcxGridBandedTableController.IsColumnFixedDuringHorzSizing(AColumn: TcxGridColumn): Boolean; -var - APosition1, APosition2: TcxGridBandedColumnPosition; -begin - APosition1 := TcxGridBandedColumn(AColumn).Position; - APosition2 := TcxGridBandedColumn(ForcingWidthItem).Position; - Result := - (APosition1 = APosition2) or - not APosition2.Item.IsRight and (APosition1.Row = APosition2.Row) and - (APosition1.VisibleColIndex < APosition2.VisibleColIndex); -end; - -procedure TcxGridBandedTableController.LeftPosChanged; -begin - with GridView do - if Preview.Active and Preview.AutoHeight and (Bands.Layout <> blNonFixed) then - SizeChanged - else - inherited; -end; - -function TcxGridBandedTableController.GetCellMultiSelect: Boolean; -begin - Result := inherited GetCellMultiSelect and (ViewInfo.HeaderViewInfo.RowCount = 1); -end; - -procedure TcxGridBandedTableController.DoCancelMode; -begin - inherited; - PressedBand := nil; -end; - -procedure TcxGridBandedTableController.EndDragAndDrop(Accepted: Boolean); -begin - PressedBand := nil; - inherited; -end; - -function TcxGridBandedTableController.HasBandsCustomizationPopup: Boolean; -begin - Result := FBandsCustomizationPopup <> nil; -end; - -function CanFocusColumnVertically(AOwner: TcxCustomGridTableView; - AItemIndex: Integer; AData: TObject): Boolean; -begin - Result := TcxGridBandedColumn(TList(AData)[AItemIndex]).CanFocus(nil); -end; - -function TcxGridBandedTableController.FindNextColumnVertically(AFocusedItemIndex: Integer; - AGoForward, AGoOnCycle: Boolean): Integer; -var - AColumn: TcxGridBandedColumn; - AColumns: TList; - ACycleChanged: Boolean; - - procedure InitializeColumns; - var - AColIndex, I, AIndex: Integer; - begin - AColIndex := AColumn.Position.VisibleColIndex; - with AColumn.Position.Band.Rows do - for I := 0 to VisibleCount - 1 do - with VisibleItems[I] do - begin - AIndex := AColIndex; - if AIndex > VisibleCount - 1 then - AIndex := VisibleCount - 1; - AColumns.Add(VisibleItems[AIndex]); - end; - end; - -begin - if AFocusedItemIndex = -1 then - Result := -1 - else - begin - AColumn := GridView.VisibleColumns[AFocusedItemIndex]; - AColumns := TList.Create; - try - InitializeColumns; - if FindNextCustomItem(AColumns.IndexOf(AColumn), AColumns.Count, - AGoForward, AGoOnCycle, @CanFocusColumnVertically, AColumns, Result, - ACycleChanged) then - Result := TcxGridBandedColumn(AColumns[Result]).VisibleIndex - else - Result := -1; - finally - AColumns.Free; - end; - end; -end; - -function CanFocusColumn(AOwner: TcxCustomGridTableView; AItemIndex: Integer; - AData: TObject): Boolean; -begin - Result := TcxGridBandedColumn(TData(AData).Columns[AItemIndex]).CanFocus(TData(AData).GridRecord); -end; - -function TcxGridBandedTableController.FindNextItem(AFocusedItemIndex: Integer; - AGoForward, AGoOnCycle, AFollowVisualOrder: Boolean; out ACycleChanged: Boolean; - ARecord: TcxCustomGridRecord): Integer; -var - AColumns: TList; - AColumn: TcxGridBandedColumn; - AData: TData; -begin - if not AFollowVisualOrder then - begin - Result := inherited FindNextItem(AFocusedItemIndex, AGoForward, AGoOnCycle, - AFollowVisualOrder, ACycleChanged, ARecord); - Exit; - end; - - ACycleChanged := False; - AColumns := TList.Create; - try - if AFocusedItemIndex = -1 then - AColumn := nil - else - AColumn := GridView.VisibleColumns[AFocusedItemIndex]; - GetColumnNeighbors(AColumn, AGoForward, AColumns); - - AData := TData.Create; - try - AData.Columns := AColumns; - AData.GridRecord := ARecord; - if FindNextCustomItem(-1, AColumns.Count, True, False, - @CanFocusColumn, AData, Result, ACycleChanged) then - Result := TcxGridBandedColumn(AColumns[Result]).VisibleIndex - else - if AGoOnCycle then - begin - Result := FindNextItem(-1, AGoForward, False, AFollowVisualOrder, ACycleChanged, ARecord); - ACycleChanged := True; - end - else - Result := -1; - finally - AData.Free; - end; - finally - AColumns.Free; - end; -end; - -function TcxGridBandedTableController.FocusNextColumnVertically(AFocusedColumnIndex: Integer; - AGoForward, AGoOnCycle: Boolean): Boolean; -var - ANextItemIndex: Integer; -begin - ANextItemIndex := FindNextColumnVertically(AFocusedColumnIndex, AGoForward, AGoOnCycle); - Result := ANextItemIndex <> -1; - if Result then - GridView.VisibleItems[ANextItemIndex].Focused := True; -end; - -procedure TcxGridBandedTableController.KeyDown(var Key: Word; Shift: TShiftState); -var - APrevFocusedRowIndex: Integer; - APrevFocusedRowHasColumns: Boolean; - - function IsFocusedRecordChanged: Boolean; - begin - Result := (FocusedRowIndex <> APrevFocusedRowIndex) or - DataController.IsGridMode and - ((Key = VK_UP) and not DataController.IsBOF or (Key = VK_DOWN) and not DataController.IsEOF); - end; - -begin - APrevFocusedRowIndex := FocusedRowIndex; - APrevFocusedRowHasColumns := (FocusedRow <> nil) and - FocusedRow.HasCells and GridView.OptionsSelection.CellSelect; - if APrevFocusedRowHasColumns then - case Key of - VK_UP: - if FocusNextColumnVertically(FocusedColumnIndex, False, False) then - Key := 0; - VK_DOWN: - if FocusNextColumnVertically(FocusedColumnIndex, True, False) then - Key := 0; - end; - inherited; - if APrevFocusedRowHasColumns and IsFocusedRecordChanged and - (FocusedRow <> nil) and FocusedRow.HasCells then - case Key of - VK_UP: - FocusNextColumnVertically(FocusedColumnIndex, False, True); - VK_DOWN: - FocusNextColumnVertically(FocusedColumnIndex, True, True); - end; -end; - -procedure TcxGridBandedTableController.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -begin - inherited; - PressedBand := nil; -end; - -{ TcxGridBandHeaderPainter } - -function TcxGridBandHeaderPainter.GetViewInfo: TcxGridBandHeaderViewInfo; -begin - Result := TcxGridBandHeaderViewInfo(inherited ViewInfo); -end; - -procedure TcxGridBandHeaderPainter.DrawBorders; -begin - // inherited; -end; - -procedure TcxGridBandHeaderPainter.DrawContent; -const - States: array[TcxGridCellState] of TcxButtonState = (cxbsNormal, cxbsHot, cxbsPressed); -var - AState: TcxButtonState; -begin - with ViewInfo do - begin - if IsMainCanvasInUse then - begin - AState := States[State]; - if IsPressed then AState := cxbsPressed; - end - else - AState := cxbsNormal; - LookAndFeelPainter.DrawHeader(Self.Canvas, Bounds, TextAreaBounds, [], - Borders, AState, AlignmentHorz, AlignmentVert, MultiLinePainting, ShowEndEllipsis, - Text, Params.Font, Params.TextColor, Params.Color, - BandViewInfo.BandsViewInfo.DrawBandHeaderBackgroundHandler, Band.IsMostRight); - end; -end; - -procedure TcxGridBandHeaderPainter.DrawPressed; -begin - with ViewInfo do - LookAndFeelPainter.DrawHeaderPressed(Self.Canvas, Bounds); -end; - -function TcxGridBandHeaderPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -procedure TcxGridBandHeaderPainter.Paint; -begin - inherited; - if ViewInfo.IsPressed and IsMainCanvasInUse then DrawPressed; -end; - -{ TcxGridBandPainter } - -function TcxGridBandPainter.GetViewInfo: TcxGridBandViewInfo; -begin - Result := TcxGridBandViewInfo(inherited ViewInfo); -end; - -procedure TcxGridBandPainter.DrawChildBands; -var - I: Integer; -begin - with ViewInfo do - for I := 0 to ChildBandViewInfoCount - 1 do - ChildBandViewInfos[I].Paint; -end; - -procedure TcxGridBandPainter.DrawColumnHeaders; -var - I, J: Integer; -begin - with ViewInfo do - for I := 0 to RowCount - 1 do - with RowsViewInfo[I] do - for J := 0 to ColumnViewInfoCount - 1 do - ColumnViewInfos[J].Paint; -end; - -procedure TcxGridBandPainter.DrawContent; -begin - DrawHeader; - if ViewInfo.IsBottom then - DrawColumnHeaders - else - DrawChildBands; - inherited; -end; - -procedure TcxGridBandPainter.DrawHeader; -begin - ViewInfo.HeaderViewInfo.Paint; -end; - -function TcxGridBandPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridBandedHeaderPainter } - -function TcxGridBandedHeaderPainter.GetViewInfo: TcxGridBandedHeaderViewInfo; -begin - Result := TcxGridBandedHeaderViewInfo(inherited ViewInfo); -end; - -procedure TcxGridBandedHeaderPainter.DrawBands; - - procedure ProcessItems(AFixedKind: TcxGridBandFixedKind); - var - I: Integer; - AItem: TcxGridBandViewInfo; - begin - with ViewInfo.BandsViewInfo do - for I := 0 to RootItemCount - 1 do - begin - AItem := RootItems[I]; - if AItem.FixedKind = AFixedKind then - AItem.Paint; - end; - end; - -begin - ProcessItems(fkLeft); - ProcessItems(fkRight); - ProcessItems(fkNone); -end; - -procedure TcxGridBandedHeaderPainter.DrawItems; -begin - DrawBands; -end; - -{ TcxGridBandedFooterPainter } - -procedure TcxGridBandedFooterPainter.DrawItems; -var - AClipRegion: TcxRegion; - AFixedPartExcluded: array[TcxGridBandFixedKind] of Boolean; - AFixedKind: TcxGridBandFixedKind; - I: Integer; - AViewInfo: TcxGridColumnHeaderViewInfo; - ABand: TcxGridBand; - - function GetFixedPartBounds(AFixedKind: TcxGridBandFixedKind): TRect; - var - ABandViewInfo: TcxGridBandViewInfo; - begin - Result := ViewInfo.Bounds; - with TcxGridBandedHeaderViewInfo(ViewInfo.GridViewInfo.HeaderViewInfo).BandsViewInfo do - begin - ABandViewInfo := LastFixedItems[AFixedKind, 0]; - if ABandViewInfo <> nil then - case AFixedKind of - fkLeft: - Result.Right := ABandViewInfo.Bounds.Right; - fkRight: - Result.Left := ABandViewInfo.Bounds.Left; - end - else - Result := Rect(0, 0, 0, 0); - end; - end; - - procedure ExcludeFixedPart(AFixedKind: TcxGridBandFixedKind); - begin - Canvas.ExcludeClipRect(GetFixedPartBounds(AFixedKind)); - AFixedPartExcluded[AFixedKind] := True; - end; - - procedure IncludeFixedPart(AFixedKind: TcxGridBandFixedKind); - var - ARegion: TcxRegion; - begin - if not AFixedPartExcluded[AFixedKind] then Exit; - ARegion := TcxRegion.Create(GetFixedPartBounds(AFixedKind)); - Canvas.SetClipRegion(ARegion, roAdd); - AFixedPartExcluded[AFixedKind] := False; - end; - - procedure ChangeFixedKind(Value: TcxGridBandFixedKind); - begin - case AFixedKind of - fkLeft: - begin - AClipRegion := Canvas.GetClipRegion; - ExcludeFixedPart(fkLeft); - ExcludeFixedPart(fkRight); - end; - fkRight: - begin - IncludeFixedPart(fkLeft); - Canvas.SetClipRegion(AClipRegion, roIntersect); - AClipRegion := Canvas.GetClipRegion; - ExcludeFixedPart(fkLeft); - ExcludeFixedPart(fkRight); - end; - end; - if Value = fkRight then - IncludeFixedPart(fkRight); - AFixedKind := Value; - end; - - procedure RestoreClipRegion; - begin - if AClipRegion <> nil then - begin - IncludeFixedPart(fkLeft); - IncludeFixedPart(fkRight); - Canvas.SetClipRegion(AClipRegion, roIntersect); - AClipRegion := nil; - end; - end; - -begin - AClipRegion := nil; - for AFixedKind := Low(AFixedKind) to High(AFixedKind) do - AFixedPartExcluded[AFixedKind] := False; - - AFixedKind := fkLeft; - for I := 0 to ViewInfo.Count - 1 do - begin - AViewInfo := ViewInfo.InternalItems[I]; - if AViewInfo <> nil then - begin - ABand := TcxGridBandedColumn(AViewInfo.Column).Position.Band; - if ABand.FixedKind <> AFixedKind then - ChangeFixedKind(ABand.FixedKind); - AViewInfo.Paint; - end; - end; - - RestoreClipRegion; -end; - -{ TcxGridIndicatorBandHeaderItemPainter } - -function TcxGridIndicatorBandHeaderItemPainter.GetViewInfo: TcxGridIndicatorBandHeaderItemViewInfo; -begin - Result := TcxGridIndicatorBandHeaderItemViewInfo(inherited ViewInfo); -end; - -function TcxGridIndicatorBandHeaderItemPainter.DrawBackgroundHandler(ACanvas: TcxCanvas; - const ABounds: TRect): Boolean; -begin - Result := ViewInfo.GridView.ViewInfo.HeaderViewInfo.BandsViewInfo.DrawBandHeaderBackgroundHandler(ACanvas, ABounds); -end; - -{ TcxGridBandedDataRowCellsAreaItemPainter } - -function TcxGridBandedDataRowCellsAreaItemPainter.GetViewInfo: TcxGridBandedDataRowCellsAreaItemViewInfo; -begin - Result := TcxGridBandedDataRowCellsAreaItemViewInfo(inherited ViewInfo); -end; - -procedure TcxGridBandedDataRowCellsAreaItemPainter.DrawFixedBandsSeparator; -var - R: TRect; -begin - with Canvas do - begin - R := ViewInfo.FixedBandsSeparatorBounds; - Brush.Color := ViewInfo.GridViewInfo.FixedBandSeparatorColor; - FillRect(R); - ExcludeClipRect(R); - end; -end; - -procedure TcxGridBandedDataRowCellsAreaItemPainter.DrawContent; -begin - DrawLines; - inherited; -end; - -procedure TcxGridBandedDataRowCellsAreaItemPainter.DrawLines; -var - I: Integer; - R: TRect; -begin - Canvas.Brush.Color := ViewInfo.GridViewInfo.GridLineColor; - for I := 0 to ViewInfo.LineCount - 1 do - begin - R := ViewInfo.LineBounds[I]; - Canvas.FillRect(R); - Canvas.ExcludeClipRect(R); - end; -end; - -function TcxGridBandedDataRowCellsAreaItemPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -procedure TcxGridBandedDataRowCellsAreaItemPainter.Paint; -begin - if ViewInfo.FixedBandsSeparatorLocation <> slNone then - DrawFixedBandsSeparator; - inherited; -end; - -{ TcxGridBandedRowsPainter } - -class procedure TcxGridBandedRowsPainter.DrawDataRowCells(ARowViewInfo: TcxCustomGridRowViewInfo); -var - ADataRowViewInfo: TcxGridDataRowViewInfo; - ACellsAreaViewInfo: TcxGridBandedDataRowCellsAreaViewInfo; - ACanvas: TcxCanvas; - AClipRegion: TcxRegion; - - procedure DrawBandCells(ABandViewInfo: TcxGridBandViewInfo); - var - I: Integer; - ACellViewInfo: TcxGridDataCellViewInfo; - begin - for I := 0 to ABandViewInfo.ColumnViewInfoCount - 1 do - begin - ACellViewInfo := ADataRowViewInfo.InternalCellViewInfos[ABandViewInfo[I].Index]; - if ACellViewInfo <> nil then ACellViewInfo.Paint; - end; - if ACellsAreaViewInfo.Visible then - ACellsAreaViewInfo[ABandViewInfo.BottomIndex].Paint; - end; - - procedure DrawBands(AFixedKind: TcxGridBandFixedKind); - var - I: Integer; - ABandViewInfo: TcxGridBandViewInfo; - begin - with TcxGridBandedTableViewInfo(ARowViewInfo.GridViewInfo).HeaderViewInfo.BandsViewInfo do - for I := 0 to BottomItemCount - 1 do - begin - ABandViewInfo := BottomItems[I]; - if ABandViewInfo.FixedKind = AFixedKind then - DrawBandCells(ABandViewInfo); - end; - end; - -begin - ADataRowViewInfo := TcxGridDataRowViewInfo(ARowViewInfo); - ACellsAreaViewInfo := TcxGridBandedDataRowCellsAreaViewInfo(ADataRowViewInfo.CellsAreaViewInfo); - ACanvas := ARowViewInfo.GridViewInfo.Canvas; - if ACellsAreaViewInfo.Visible then - begin - AClipRegion := ACanvas.GetClipRegion; - ACanvas.IntersectClipRect(ACellsAreaViewInfo.Bounds); // for layout with the fixed bands - end - else - AClipRegion := nil; - try - {if ACellsAreaViewInfo.Count = 0 then - ACellsAreaViewInfo.Paint;} - DrawBands(fkLeft); - DrawBands(fkRight); - DrawBands(fkNone); - ACellsAreaViewInfo.Paint; - finally - if AClipRegion <> nil then - begin - ACanvas.SetClipRegion(AClipRegion, roSet); - ACanvas.ExcludeClipRect(ACellsAreaViewInfo.Bounds); - end; - end; -end; - -{ TcxGridBandedTablePainter } - -function TcxGridBandedTablePainter.GetViewInfo: TcxGridBandedTableViewInfo; -begin - Result := TcxGridBandedTableViewInfo(inherited ViewInfo); -end; - -function TcxGridBandedTablePainter.CanOffset(AItemsOffset, DX, DY: Integer): Boolean; -begin - with ViewInfo.HeaderViewInfo.BandsViewInfo do - Result := inherited CanOffset(AItemsOffset, DX, DY) and - ((AItemsOffset <> 0) or (BandBackgroundBitmap = nil) and (BandHeaderBackgroundBitmap = nil) and - ((GridView.Bands.Layout = blNonFixed) or - (GridView.GroupedColumnCount = 0) and not GridView.Preview.Active)); -end; - -{ TcxGridBandedColumnHeaderVertSizingEdgeViewInfo } - -function TcxGridBandedColumnHeaderVertSizingEdgeViewInfo.CalculateHeight: Integer; -begin - Result := cxGridHeaderSizingEdgeSize; -end; - -function TcxGridBandedColumnHeaderVertSizingEdgeViewInfo.CalculateWidth: Integer; -begin - Result := 0; -end; - -function TcxGridBandedColumnHeaderVertSizingEdgeViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaBottom; -end; - -function TcxGridBandedColumnHeaderVertSizingEdgeViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridColumnHeaderVertSizingEdgeHitTest; -end; - -function TcxGridBandedColumnHeaderVertSizingEdgeViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := nil; -end; - -function TcxGridBandedColumnHeaderVertSizingEdgeViewInfo.OccupiesSpace: Boolean; -begin - Result := False; -end; - -function TcxGridBandedColumnHeaderVertSizingEdgeViewInfo.ResidesInContent: Boolean; -begin - Result := False; -end; - -procedure TcxGridBandedColumnHeaderVertSizingEdgeViewInfo.Calculate(const ABounds: TRect; - var ATextAreaBounds: TRect); -begin - inherited; - OffsetRect(Bounds, 0, Height div 2); -end; - -{ TcxGridBandedColumnHeaderViewInfo } - -function TcxGridBandedColumnHeaderViewInfo.GetBandViewInfo: TcxGridBandViewInfo; -begin - Result := Container.BandsViewInfo[Column.Position.VisibleBandIndex]; -end; - -function TcxGridBandedColumnHeaderViewInfo.GetColumn: TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(inherited Column); -end; - -function TcxGridBandedColumnHeaderViewInfo.GetContainer: TcxGridBandedHeaderViewInfo; -begin - Result := TcxGridBandedHeaderViewInfo(inherited Container); -end; - -function TcxGridBandedColumnHeaderViewInfo.GetRowViewInfo: TcxGridBandRowViewInfo; -begin - Result := BandViewInfo.RowsViewInfo[Column.Position.VisibleRowIndex]; -end; - -function TcxGridBandedColumnHeaderViewInfo.CanVertSize: Boolean; -begin - Result := Column.CanVertSize and (Container.Kind = ckHeader); -end; - -procedure TcxGridBandedColumnHeaderViewInfo.GetAreaViewInfoClasses(AProc: TcxGridClassEnumeratorProc); -begin - inherited; - if CanVertSize then AProc(TcxGridBandedColumnHeaderVertSizingEdgeViewInfo); -end; - -function TcxGridBandedColumnHeaderViewInfo.GetMaxWidth: Integer; -var - AColIndex, I: Integer; -begin - if (BandViewInfo.Band.Width <> 0) or BandViewInfo.Band.HasParentWithAssignedWidth then - begin - if BandViewInfo.Band.Width = 0 then - Result := BandViewInfo.MaxContentWidth - else - Result := RowViewInfo.Width; - AColIndex := Column.Position.VisibleColIndex; - if AColIndex = RowViewInfo.ColumnViewInfoCount - 1 then - for I := 0 to AColIndex - 1 do - Dec(Result, RowViewInfo[I].MinWidth) - else - for I := 0 to RowViewInfo.ColumnViewInfoCount - 1 do - begin - if I < AColIndex then - Dec(Result, RowViewInfo[I].Width); - if I > AColIndex then - Dec(Result, RowViewInfo[I].MinWidth); - end; - if Result < MinWidth then Result := MinWidth; - end - else - Result := MaxInt; -end; - -{ TcxGridBandHeaderViewInfo } - -constructor TcxGridBandHeaderViewInfo.Create(ABandViewInfo: TcxGridBandViewInfo); -begin - inherited Create(ABandViewInfo.GridViewInfo); - FBandViewInfo := ABandViewInfo; -end; - -function TcxGridBandHeaderViewInfo.GetBand: TcxGridBand; -begin - Result := FBandViewInfo.Band; -end; - -function TcxGridBandHeaderViewInfo.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -function TcxGridBandHeaderViewInfo.GetGridViewInfo: TcxGridBandedTableViewInfo; -begin - Result := FBandViewInfo.GridViewInfo; -end; - -function TcxGridBandHeaderViewInfo.GetRowCount: Integer; -begin - if FBandViewInfo.IsBottom then - Result := FBandViewInfo.BandsViewInfo.BandHeaderRowCount - Band.BandLevelIndex - else - Result := 1; -end; - -function TcxGridBandHeaderViewInfo.CalculateHeight: Integer; -begin - Result := FBandViewInfo.BandsViewInfo.CalculateBandHeaderHeight(Self); -end; - -function TcxGridBandHeaderViewInfo.CalculateWidth: Integer; -begin - with Bounds do - Result := Right - Left; -end; - -function TcxGridBandHeaderViewInfo.CanShowHint: Boolean; -begin - Result := GridView.OptionsBehavior.BandHeaderHints; -end; - -function TcxGridBandHeaderViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDraw(ACanvas); - GridViewInfo.GridView.DoCustomDrawBandHeader(ACanvas, Self, Result); -end; - -function TcxGridBandHeaderViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := Band.HeaderAlignmentHorz; -end; - -function TcxGridBandHeaderViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := Band.HeaderAlignmentVert; -end; - -function TcxGridBandHeaderViewInfo.GetAreaBounds: TRect; -begin - Result := BandViewInfo.BandsViewInfo.GetItemAreaBounds(Band); -end; - -function TcxGridBandHeaderViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := BandViewInfo.BandsViewInfo.BandHeaderBackgroundBitmap; -end; - -function TcxGridBandHeaderViewInfo.GetBorders: TcxBorders; -begin - Result := cxBordersAll; -end; - -function TcxGridBandHeaderViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := LookAndFeelPainter.HeaderBorderSize; -end; - -function TcxGridBandHeaderViewInfo.GetCanvas: TcxCanvas; -begin - Result := FBandViewInfo.Canvas; -end; - -class function TcxGridBandHeaderViewInfo.GetCellHeight(ATextHeight: Integer; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; -begin - Result := inherited GetCellHeight(ATextHeight, ALookAndFeelPainter) + - 2 * ALookAndFeelPainter.HeaderBorderSize; -end; - -function TcxGridBandHeaderViewInfo.GetHeight: Integer; -var - I: Integer; -begin - if FBandViewInfo.IsBottom then - begin - Result := 0; - for I := Band.BandLevelIndex to FBandViewInfo.BandsViewInfo.BandHeaderRowCount - 1 do - Inc(Result, FBandViewInfo.BandsViewInfo.BandHeaderRowHeights[I]); - end - else - Result := FBandViewInfo.BandsViewInfo.BandHeaderRowHeights[Band.BandLevelIndex]; -end; - -function TcxGridBandHeaderViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridBandHeaderHitTest; -end; - -function TcxGridBandHeaderViewInfo.GetHotTrack: Boolean; -begin - Result := LookAndFeelPainter.IsHeaderHotTrack; -end; - -function TcxGridBandHeaderViewInfo.GetIsDesignSelected: Boolean; -begin - Result := GridView.IsDesigning and - GridView.Controller.DesignController.IsObjectSelected(Band); -end; - -function TcxGridBandHeaderViewInfo.GetIsPressed: Boolean; -begin - Result := (State = gcsPressed) or (GridViewInfo.Controller.PressedBand = Band); -end; - -function TcxGridBandHeaderViewInfo.GetMultiLinePainting: Boolean; -begin - Result := inherited GetMultiLinePainting or - FBandViewInfo.BandsViewInfo.IsBandHeaderHeightAssigned; -end; - -function TcxGridBandHeaderViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridBandHeaderPainter; -end; - -function TcxGridBandHeaderViewInfo.GetShowEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.BandHeaderEndEllipsis; -end; - -function TcxGridBandHeaderViewInfo.GetSizingEdgeBounds: TRect; -begin - Result := Bounds; - with Result do - begin - Left := Right - cxGridHeaderSizingEdgeSize div 2; - Right := Left + cxGridHeaderSizingEdgeSize; - end; -end; - -function TcxGridBandHeaderViewInfo.GetText: string; -begin - Result := Band.Caption; -end; - -function TcxGridBandHeaderViewInfo.GetVisible: Boolean; -begin - Result := FBandViewInfo.BandsViewInfo.ShowBandHeaders; -end; - -procedure TcxGridBandHeaderViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - Band.Styles.GetHeaderParams(AParams); -end; - -function TcxGridBandHeaderViewInfo.HasCustomDraw: Boolean; -begin - Result := GridView.HasCustomDrawBandHeader; -end; - -procedure TcxGridBandHeaderViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - FBandViewInfo.InitHitTest(AHitTest); - inherited; -end; - -function TcxGridBandHeaderViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - if FBandViewInfo.CanSize and PtInRect(SizingEdgeBounds, P) then - begin - Result := TcxGridBandHeaderSizingEdgeHitTest.Instance(P); - InitHitTest(Result); - end - else - Result := inherited GetHitTest(P); -end; - -function TcxGridBandHeaderViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -var - ABand: TcxGridBand; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if AButton = mbLeft then - case AHitTest.HitTestCode of - htBandHeader: - if not (ssDouble in AShift) then - begin - if GridView.IsDesigning then - GridView.Controller.DesignController.SelectObject(Band, not (ssShift in AShift)) - else - begin - GridView.Controller.PressedBand := Band; - Band.DoHeaderClick; - end; - Result := True; - end; - htBandHeaderSizingEdge: - if ssDouble in AShift then - begin - ABand := Band; - ABand.ApplyBestFit(True); - ABand.GridView.DoBandSizeChanged(ABand); - Result := True; - end; - end; -end; - -{ TcxGridBandRowViewInfo } - -constructor TcxGridBandRowViewInfo.Create(ARowsViewInfo: TcxGridBandRowsViewInfo; - AIndex: Integer); -begin - inherited Create; - FRowsViewInfo := ARowsViewInfo; - FIndex := AIndex; - FColumnViewInfos := TList.Create; - FHeight := -1; - AddColumnViewInfos; -end; - -destructor TcxGridBandRowViewInfo.Destroy; -begin - FColumnViewInfos.Free; - inherited; -end; - -function TcxGridBandRowViewInfo.GetBandRow: TcxGridBandRow; -begin - Result := FRowsViewInfo.BandRows.VisibleItems[FIndex]; -end; - -function TcxGridBandRowViewInfo.GetBandViewInfo: TcxGridBandViewInfo; -begin - Result := FRowsViewInfo.BandViewInfo; -end; - -function TcxGridBandRowViewInfo.GetColumnViewInfo(Index: Integer): TcxGridBandedColumnHeaderViewInfo; -begin - Result := TcxGridBandedColumnHeaderViewInfo(FColumnViewInfos[Index]); -end; - -function TcxGridBandRowViewInfo.GetColumnViewInfoCount: Integer; -begin - Result := FColumnViewInfos.Count; -end; - -function TcxGridBandRowViewInfo.GetGridView: TcxGridBandedTableView; -begin - Result := FRowsViewInfo.BandViewInfo.GridView; -end; - -function TcxGridBandRowViewInfo.GetHeight: Integer; -begin - if FHeight = -1 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TcxGridBandRowViewInfo.GetLineHeight: Integer; -begin - Result := BandViewInfo.ContainerViewInfo.ItemHeight; -end; - -function TcxGridBandRowViewInfo.GetMinWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ColumnViewInfoCount - 1 do - Inc(Result, ColumnViewInfos[I].MinWidth); -end; - -function TcxGridBandRowViewInfo.GetWidth: Integer; -begin - with Bounds do - Result := Right - Left; -end; - -procedure TcxGridBandRowViewInfo.AddColumnViewInfos; -var - AHeaderViewInfo: TcxGridBandedHeaderViewInfo; - I: Integer; - AColumnViewInfo: TcxGridBandedColumnHeaderViewInfo; -begin - AHeaderViewInfo := BandViewInfo.GridViewInfo.HeaderViewInfo; - for I := 0 to BandRow.VisibleCount - 1 do - begin - AColumnViewInfo := AHeaderViewInfo[BandRow.VisibleItems[I].VisibleIndex]; - FColumnViewInfos.Add(AColumnViewInfo); - end; -end; - -procedure TcxGridBandRowViewInfo.Calculate(const ABounds: TRect); -var - ALeftBound, ATopBound, ALineHeight, I, AWidth: Integer; - AColumnViewInfo: TcxGridBandedColumnHeaderViewInfo; -begin - Bounds := ABounds; - CalculateColumnWidths; - ALeftBound := Bounds.Left; - ATopBound := Bounds.Top; - ALineHeight := LineHeight; - for I := 0 to ColumnViewInfoCount - 1 do - begin - AColumnViewInfo := ColumnViewInfos[I]; - AWidth := AColumnViewInfo.CalculateWidth; - AColumnViewInfo.Calculate(ALeftBound, ATopBound, AWidth, - AColumnViewInfo.Column.Position.LineCount * ALineHeight); - Inc(ALeftBound, AWidth); - end; -end; - -procedure TcxGridBandRowViewInfo.CalculateColumnWidths; -var - AAutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AAutoWidthObject := TcxAutoWidthObject.Create(ColumnViewInfoCount); - try - for I := 0 to ColumnViewInfoCount - 1 do - ColumnViewInfos[I].InitAutoWidthItem(AAutoWidthObject.AddItem); - AAutoWidthObject.AvailableWidth := FRowsViewInfo.Width; - AAutoWidthObject.Calculate; - for I := 0 to ColumnViewInfoCount - 1 do - ColumnViewInfos[I].Width := AAutoWidthObject[I].AutoWidth; - finally - AAutoWidthObject.Free; - end; -end; - -function TcxGridBandRowViewInfo.CalculateHeight: Integer; -begin - Result := BandRow.LineCount * LineHeight; -end; - -function TcxGridBandRowViewInfo.CalculateLineHeight: Integer; -var - I, AColumnHeaderHeight: Integer; -begin - Result := 0; - for I := 0 to ColumnViewInfoCount - 1 do - begin - AColumnHeaderHeight := ColumnViewInfos[I].CalculateHeight; - if AColumnHeaderHeight > Result then - Result := AColumnHeaderHeight; - end; -end; - -function TcxGridBandRowViewInfo.CalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ColumnViewInfoCount - 1 do - Inc(Result, ColumnViewInfos[I].CalculateWidth); -end; - -procedure TcxGridBandRowViewInfo.AssignColumnWidths; -var - I: Integer; -begin - GridView.BeginUpdate; - try - for I := 0 to ColumnViewInfoCount - 1 do - with ColumnViewInfos[I] do - Column.Width := RealWidth; - finally - GridView.EndUpdate; - end; -end; - -procedure TcxGridBandRowViewInfo.Offset(DX, DY: Integer); -begin - OffsetRect(Bounds, DX, DY); -end; - -{ TcxGridBandRowsViewInfo } - -constructor TcxGridBandRowsViewInfo.Create(ABandViewInfo: TcxGridBandViewInfo); -begin - inherited Create; - FBandViewInfo := ABandViewInfo; - FWidth := -1; - CreateItems; -end; - -destructor TcxGridBandRowsViewInfo.Destroy; -begin - DestroyItems; - inherited; -end; - -function TcxGridBandRowsViewInfo.GetBandRows: TcxGridBandRows; -begin - Result := FBandViewInfo.Band.Rows; -end; - -function TcxGridBandRowsViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridBandRowsViewInfo.GetItem(Index: Integer): TcxGridBandRowViewInfo; -begin - Result := TcxGridBandRowViewInfo(FItems[Index]); -end; - -function TcxGridBandRowsViewInfo.GetMinWidth: Integer; -var - I, AMinWidth: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - begin - AMinWidth := Items[I].MinWidth; - if AMinWidth > Result then Result := AMinWidth; - end; -end; - -function TcxGridBandRowsViewInfo.GetWidth: Integer; -begin - {with Bounds do - Result := Right - Left;} - Result := FBandViewInfo.ContentWidth; -end; - -procedure TcxGridBandRowsViewInfo.CreateItems; -var - I: Integer; -begin - FItems := TList.Create; - for I := 0 to BandRows.VisibleCount - 1 do - FItems.Add(GetBandRowViewInfoClass.Create(Self, I)); -end; - -procedure TcxGridBandRowsViewInfo.DestroyItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do Items[I].Free; - FItems.Free; -end; - -procedure TcxGridBandRowsViewInfo.AssignColumnWidths; -var - I: Integer; -begin - BandViewInfo.GridView.BeginUpdate; - try - for I := 0 to Count - 1 do - Items[I].AssignColumnWidths; - finally - BandViewInfo.GridView.EndUpdate; - end; -end; - -procedure TcxGridBandRowsViewInfo.Calculate(const ABounds: TRect); -var - ARowBounds: TRect; - I: Integer; -begin - Bounds := ABounds; - ARowBounds := Bounds; - for I := 0 to Count - 1 do - begin - ARowBounds.Bottom := ARowBounds.Top + Items[I].Height; - Items[I].Calculate(ARowBounds); - ARowBounds.Top := ARowBounds.Bottom; - end; -end; - -procedure TcxGridBandRowsViewInfo.CalculateColumnWidths; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].CalculateColumnWidths; -end; - -function TcxGridBandRowsViewInfo.CalculateWidth: Integer; -var - I, ARowWidth: Integer; -begin - if Count = 0 then - Result := cxGridDefaultEmptyBandWidth - else - begin - Result := 0; - for I := 0 to Count - 1 do - begin - ARowWidth := Items[I].CalculateWidth; - if ARowWidth > Result then Result := ARowWidth; - end; - end; -end; - -function TcxGridBandRowsViewInfo.GetBandRowViewInfoClass: TcxGridBandRowViewInfoClass; -begin - Result := TcxGridBandRowViewInfo; -end; - -{function TcxGridBandRowsViewInfo.GetColumnsHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I, J: Integer; -begin - for I := 0 to Count - 1 do - for J := 0 to Items[I].ColumnViewInfoCount - 1 do - begin - Result := Items[I][J].GetHitTest(P); - if Result <> nil then Exit; - end; - Result := nil; -end;} - -function TcxGridBandRowsViewInfo.IndexAtPos(const P: TPoint): Integer; -var - R: TRect; -begin - R := Bounds; - if FBandViewInfo.GridView.Controller.IsItemMoving then - Inc(R.Bottom, ColumnHeaderInsertZoneSize); - if PtInRect(R, P) then - begin - for Result := 0 to Count - 1 do - if PtInRect(Items[Result].Bounds, P) then Exit; - Result := Count; - end - else - Result := -1; -end; - -procedure TcxGridBandRowsViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - OffsetRect(Bounds, DX, 0); - for I := 0 to Count - 1 do - Items[I].Offset(DX, DY); -end; - -{ TcxGridBandViewInfo } - -constructor TcxGridBandViewInfo.Create(ABandsViewInfo: TcxGridBandsViewInfo; AIndex: Integer); -begin - inherited Create; - FBandsViewInfo := ABandsViewInfo; - FColumnViewInfos := TList.Create; - FIndex := AIndex; - FBottomIndex := Band.VisibleBottomIndex; - FHeaderViewInfo := GetHeaderViewInfoClass.Create(Self); - if IsBottom then - begin - AddColumnViewInfos; - FRowsViewInfo := GetRowsViewInfoClass.Create(Self); - end; - FWidth := -1; -end; - -destructor TcxGridBandViewInfo.Destroy; -begin - FHeaderViewInfo.Free; - FRowsViewInfo.Free; - FColumnViewInfos.Free; - inherited; -end; - -function TcxGridBandViewInfo.GetBand: TcxGridBand; -begin - Result := GridView.Bands.VisibleItems[FIndex]; -end; - -function TcxGridBandViewInfo.GetBoundsForBandInsert: TRect; -begin - Result := FHeaderViewInfo.Bounds; - if Band.IsMostRight then - Result.Right := GridViewInfo.ClientBounds.Right; - if IsRoot then - Dec(Result.Top, BandHeaderMovingZoneSize); - if IsBottom then - Inc(Result.Bottom, BandHeaderMovingZoneSize); -end; - -function TcxGridBandViewInfo.GetChildBandViewInfo(Index: Integer): TcxGridBandViewInfo; -begin - Result := FBandsViewInfo[Band.VisibleChildBands[Index].VisibleIndex]; -end; - -function TcxGridBandViewInfo.GetChildBandViewInfoCount: Integer; -begin - Result := Band.VisibleChildBandCount; -end; - -function TcxGridBandViewInfo.GetColumnViewInfo(Index: Integer): TcxGridBandedColumnHeaderViewInfo; -begin - Result := TcxGridBandedColumnHeaderViewInfo(FColumnViewInfos[Index]); -end; - -function TcxGridBandViewInfo.GetColumnViewInfoCount: Integer; -begin - Result := FColumnViewInfos.Count; -end; - -function TcxGridBandViewInfo.GetContainerViewInfo: TcxGridBandedHeaderViewInfo; -begin - Result := FBandsViewInfo.ContainerViewInfo; -end; - -function TcxGridBandViewInfo.GetFixedKind: TcxGridBandFixedKind; -begin - Result := Band.FixedKind; -end; - -function TcxGridBandViewInfo.GetGridView: TcxGridBandedTableView; -begin - Result := FBandsViewInfo.GridView; -end; - -function TcxGridBandViewInfo.GetGridViewInfo: TcxGridBandedTableViewInfo; -begin - Result := ContainerViewInfo.GridViewInfo; -end; - -function TcxGridBandViewInfo.GetIsBottom: Boolean; -begin - Result := Band.IsVisibleBottom; -end; - -function TcxGridBandViewInfo.GetIsFixed: Boolean; -begin - Result := Band.Fixed; -end; - -function TcxGridBandViewInfo.GetIsRight: Boolean; -begin - Result := FBottomIndex = FBandsViewInfo.BottomItemCount - 1; -end; - -function TcxGridBandViewInfo.GetIsRoot: Boolean; -begin - Result := Band.IsRoot; -end; - -function TcxGridBandViewInfo.GetParentBandViewInfo: TcxGridBandViewInfo; -begin - Result := BandsViewInfo[Band.ParentBand.VisibleIndex]; -end; - -function TcxGridBandViewInfo.GetRowCount: Integer; -begin - Result := FRowsViewInfo.Count; -end; - -function TcxGridBandViewInfo.GetSameLevelAutoWidth: Integer; -begin - if IsRoot then - Result := GridViewInfo.ClientWidth - else - if ParentBandViewInfo.Band.Width = 0 then - Result := ParentBandViewInfo.MaxWidth - else - Result := ParentBandViewInfo.Width; -end; - -function TcxGridBandViewInfo.GetSameLevelItem(Index: Integer): TcxGridBandViewInfo; -begin - if IsRoot then - Result := BandsViewInfo.RootItems[Index] - else - Result := ParentBandViewInfo.ChildBandViewInfos[Index]; -end; - -function TcxGridBandViewInfo.GetSameLevelItemCount: Integer; -begin - if IsRoot then - Result := BandsViewInfo.RootItemCount - else - Result := ParentBandViewInfo.ChildBandViewInfoCount; -end; - -function CompareColumnViewInfos( - Item1, Item2: Pointer): Integer; -begin - Result := CompareVisibleColumnPositions( - TcxGridBandedColumnHeaderViewInfo(Item1).Column.Position, - TcxGridBandedColumnHeaderViewInfo(Item2).Column.Position); -end; - -procedure TcxGridBandViewInfo.AddColumnViewInfos; -var - I: Integer; - AColumnHeaderViewInfo: TcxGridBandedColumnHeaderViewInfo; -begin - for I := 0 to ContainerViewInfo.Count - 1 do - begin - AColumnHeaderViewInfo := ContainerViewInfo[I]; - if AColumnHeaderViewInfo.Column.Position.Band = Band then - FColumnViewInfos.Add(AColumnHeaderViewInfo); - end; - FColumnViewInfos.Sort(CompareColumnViewInfos); -end; - -procedure TcxGridBandViewInfo.AssignChildBandWidths; -var - I: Integer; -begin - GridView.BeginUpdate; - try - for I := 0 to ChildBandViewInfoCount - 1 do - with ChildBandViewInfos[I] do - Band.Width := ContentWidth; - finally - GridView.EndUpdate; - end; -end; - -procedure TcxGridBandViewInfo.AssignColumnWidths; -var - I: Integer; -begin - if IsBottom then - FRowsViewInfo.AssignColumnWidths - else - begin - GridView.BeginUpdate; - try - for I := 0 to ChildBandViewInfoCount - 1 do - ChildBandViewInfos[I].AssignColumnWidths; - finally - GridView.EndUpdate; - end; - end; -end; - -procedure TcxGridBandViewInfo.CalculateChildBandWidths; -var - AAutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AAutoWidthObject := TcxAutoWidthObject.Create(ChildBandViewInfoCount); - try - for I := 0 to ChildBandViewInfoCount - 1 do - ChildBandViewInfos[I].InitAutoWidthItem(AAutoWidthObject.AddItem); - AAutoWidthObject.AvailableWidth := Width; - AAutoWidthObject.Calculate; - for I := 0 to ChildBandViewInfoCount - 1 do - ChildBandViewInfos[I].Width := AAutoWidthObject[I].AutoWidth; - finally - AAutoWidthObject.Free; - end; -end; - -procedure TcxGridBandViewInfo.CalculateChildBands(R: TRect); -var - I: Integer; - AChildBandViewInfo: TcxGridBandViewInfo; -begin - CalculateChildBandWidths; - for I := 0 to ChildBandViewInfoCount - 1 do - begin - AChildBandViewInfo := ChildBandViewInfos[I]; - R.Right := R.Left + AChildBandViewInfo.Width; - AChildBandViewInfo.Calculate(R); - R.Left := R.Right; - end; -end; - -function TcxGridBandViewInfo.CalculateChildBandsBounds: TRect; -begin - Result := Bounds; - Result.Top := CalculateHeaderBounds.Bottom; -end; - -function TcxGridBandViewInfo.CalculateColumnsBounds: TRect; -begin - Result := ContentBounds; - Result.Top := CalculateHeaderBounds.Bottom; -end; - -procedure TcxGridBandViewInfo.CalculateColumnWidths; -begin - FRowsViewInfo.CalculateColumnWidths; -end; - -function TcxGridBandViewInfo.CalculateHeaderBounds: TRect; -begin - Result := ContentBounds; - Result.Bottom := Result.Top + HeaderViewInfo.Height; -end; - -function TcxGridBandViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TcxGridBandViewInfo.CalculateWidth: Integer; -var - AMinWidth: Integer; - - function CalculateChildBandsWidth: Integer; - var - I: Integer; - begin - Result := 0; - for I := 0 to ChildBandViewInfoCount - 1 do - Inc(Result, ChildBandViewInfos[I].CalculateWidth); - end; - -begin - if FWidth = -1 then - begin - FWidth := Band.Width; - CalculateParams; - if FWidth = 0 then - if IsBottom then - FWidth := BorderSize[bLeft] + FRowsViewInfo.CalculateWidth + BorderSize[bRight] - else - FWidth := CalculateChildBandsWidth - else - Inc(FWidth, BorderSize[bLeft] + BorderSize[bRight]); - AMinWidth := MinWidth; - if FWidth < AMinWidth then FWidth := AMinWidth; - end; - Result := FWidth; -end; - -function TcxGridBandViewInfo.CanSize: Boolean; -begin - Result := Band.CanSize; -end; - -procedure TcxGridBandViewInfo.CheckWidth(var Value: Integer); -begin - if Value < MinContentWidth then Value := MinContentWidth; - if Value > MaxContentWidth then Value := MaxContentWidth; -end; - -function TcxGridBandViewInfo.CustomDrawBackground(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDrawBackground(ACanvas); - GridView.DoCustomDrawPartBackground(ACanvas, Self, Result); -end; - -function TcxGridBandViewInfo.GetAreAllColumnsFixed: Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to ColumnViewInfoCount - 1 do - begin - Result := ColumnViewInfos[I].IsFixed; - if not Result then Exit; - end; -end; - -function TcxGridBandViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := BandsViewInfo.BandBackgroundBitmap; -end; - -function TcxGridBandViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := GridViewInfo.FixedBandSeparatorColor; -end; - -function TcxGridBandViewInfo.GetBorders: TcxBorders; -begin - Result := []; - if (FixedKind <> fkNone) and - (BandsViewInfo.LastFixedItems[FixedKind, Band.BandLevelIndex] = Self) then - case FixedKind of - fkLeft: - Include(Result, bRight); - fkRight: - Include(Result, bLeft); - end; -end; - -function TcxGridBandViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := GridViewInfo.FixedBandSeparatorWidth; -end; - -function TcxGridBandViewInfo.GetCanvas: TcxCanvas; -begin - Result := ContainerViewInfo.Canvas; -end; - -function TcxGridBandViewInfo.GetContentWidth: Integer; -begin - //CalculateParams; - Result := Width - (BorderSize[bLeft] + BorderSize[bRight]); -end; - -class function TcxGridBandViewInfo.GetHeaderViewInfoClass: TcxGridBandHeaderViewInfoClass; -begin - Result := TcxGridBandHeaderViewInfo; -end; - -function TcxGridBandViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridBandHitTest; -end; - -function TcxGridBandViewInfo.GetMaxContentWidth: Integer; -begin - CalculateParams; - Result := MaxWidth - (BorderSize[bLeft] + BorderSize[bRight]); -end; - -function TcxGridBandViewInfo.GetMaxWidth: Integer; -var - AIndex, I: Integer; -begin - if GridView.OptionsView.ColumnAutoWidth or Band.HasParentWithAssignedWidth then - begin - Result := SameLevelAutoWidth; - AIndex := Band.Position.VisibleColIndex; - if Band.IsLastAsChild then - for I := 0 to AIndex - 1 do - Dec(Result, SameLevelItems[I].MinWidth) - else - for I := 0 to SameLevelItemCount - 1 do - begin - if I < AIndex then - Dec(Result, SameLevelItems[I].Width); - if I > AIndex then - Dec(Result, SameLevelItems[I].MinWidth); - end; - if Result < MinWidth then Result := MinWidth; - end - else - Result := MaxInt; -end; - -function TcxGridBandViewInfo.GetMinContentWidth: Integer; -var - I: Integer; -begin - if IsBottom then - begin - CalculateParams; - Result := FRowsViewInfo.MinWidth; - if Band.IsFirst then - Result := Max(Result, GridViewInfo.FirstItemAdditionalWidth); - end - else - begin - Result := 0; - for I := 0 to ChildBandViewInfoCount - 1 do - Inc(Result, ChildBandViewInfos[I].MinContentWidth); - end; - if Result < Band.MinWidth then Result := Band.MinWidth; -end; - -function TcxGridBandViewInfo.GetMinWidth: Integer; -begin - CalculateParams; - Result := MinContentWidth + (BorderSize[bLeft] + BorderSize[bRight]); -end; - -function TcxGridBandViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridBandPainter; -end; - -function TcxGridBandViewInfo.GetRowsViewInfoClass: TcxGridBandRowsViewInfoClass; -begin - Result := TcxGridBandRowsViewInfo; -end; - -procedure TcxGridBandViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - Band.Styles.GetViewParams(bsBackground, Band, nil, AParams); -end; - -function TcxGridBandViewInfo.GetWidth: Integer; -begin - if FWidth = -1 then - Result := CalculateWidth - else - Result := FWidth; -end; - -procedure TcxGridBandViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - with AHitTest as TcxGridBandHitTest do - begin - GridView := Self.GridView; - Band := Self.Band; - BandContainerKind := bcHeader; - VisibleRowIndex := -1; - end; -end; - -procedure TcxGridBandViewInfo.Offset(DX, DY: Integer); -begin - inherited; - FHeaderViewInfo.DoOffset(DX, DY); - if IsBottom then - FRowsViewInfo.Offset(DX, DY); -end; - -procedure TcxGridBandViewInfo.SetWidth(Value: Integer); -begin - inherited; - FWidth := Value; -end; - -procedure TcxGridBandViewInfo.Calculate(const ABounds: TRect); -begin - inherited; - FHeaderViewInfo.Calculate(CalculateHeaderBounds); - if IsBottom then - FRowsViewInfo.Calculate(CalculateColumnsBounds) - else - CalculateChildBands(CalculateChildBandsBounds); -end; - -function TcxGridBandViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I, ARowIndex: Integer; -begin - Result := FHeaderViewInfo.GetHitTest(P); - if Result = nil then - if IsBottom then - begin - if BandsViewInfo.ShowColumnHeaders then - for I := 0 to ColumnViewInfoCount - 1 do - begin - Result := ColumnViewInfos[I].GetHitTest(P); - if Result <> nil then Exit; - end; - Result := inherited GetHitTest(P); - ARowIndex := FRowsViewInfo.IndexAtPos(P); - if ARowIndex <> -1 then - begin - if Result = nil then - begin - Result := GetHitTestClass.Instance(P); - InitHitTest(Result); - end; - TcxGridBandHitTest(Result).VisibleRowIndex := ARowIndex; - end; - end - else - for I := 0 to ChildBandViewInfoCount - 1 do - begin - Result := ChildBandViewInfos[I].GetHitTest(P); - if Result <> nil then Break; - end; -end; - -procedure TcxGridBandViewInfo.InitAutoWidthItem(AAutoWidthItem: TcxAutoWidthItem); -begin - AAutoWidthItem.MinWidth := MinWidth; - AAutoWidthItem.Width := CalculateWidth; - AAutoWidthItem.Fixed := IsFixed; -end; - -function TcxGridBandViewInfo.InsertPositionAtPos(const P: TPoint; - out ABand: TcxGridBand; out AInsertPosition: TcxPosition): Boolean; -var - I: Integer; -begin - Result := PtInRect(BoundsForBandInsert, P); - if Result then - begin - ABand := Band; - AInsertPosition := GetPointPosition(FHeaderViewInfo.Bounds, P, - True, GridView.OptionsCustomize.NestedBands); - end - else - if GridView.OptionsCustomize.NestedBands and not IsBottom then - for I := 0 to ChildBandViewInfoCount - 1 do - begin - Result := ChildBandViewInfos[I].InsertPositionAtPos(P, ABand, AInsertPosition); - if Result then Break; - end; -end; - -{ TcxGridBandsViewInfo } - -constructor TcxGridBandsViewInfo.Create(AContainerViewInfo: TcxGridBandedHeaderViewInfo); -begin - inherited Create; - FContainerViewInfo := AContainerViewInfo; - FBandHeadersAreaHeight := -1; - FLineCount := -1; - FRowCount := -1; - FBandHeaderRowHeights := TList.Create; - CreateItems; -end; - -destructor TcxGridBandsViewInfo.Destroy; -begin - DestroyItems; - FBandHeaderRowHeights.Free; - inherited; -end; - -function TcxGridBandsViewInfo.GetBandHeaderRowCount: Integer; -begin - Result := FBandHeaderRowHeights.Count; -end; - -function TcxGridBandsViewInfo.GetBandHeaderRowHeight(Index: Integer): Integer; -var - APrevCount, I: Integer; -begin - if Index >= FBandHeaderRowHeights.Count then - begin - APrevCount := FBandHeaderRowHeights.Count; - FBandHeaderRowHeights.Count := Index + 1; - for I := APrevCount to Index do - BandHeaderRowHeights[I] := 0; - end; - Result := Integer(FBandHeaderRowHeights[Index]); -end; - -function TcxGridBandsViewInfo.GetBandHeadersAreaHeight: Integer; -begin - if FBandHeadersAreaHeight = -1 then - if ShowBandHeaders then - FBandHeadersAreaHeight := CalculateBandHeadersAreaHeight - else - FBandHeadersAreaHeight := 0; - Result := FBandHeadersAreaHeight; -end; - -function TcxGridBandsViewInfo.GetBands: TcxGridBands; -begin - Result := GridView.Bands; -end; - -function TcxGridBandsViewInfo.GetBottomItem(Index: Integer): TcxGridBandViewInfo; -begin - Result := Items[GridView.Bands.VisibleBottomItems[Index].VisibleIndex]; -end; - -function TcxGridBandsViewInfo.GetBottomItemCount: Integer; -begin - Result := GridView.Bands.VisibleBottomItemCount; -end; - -function TcxGridBandsViewInfo.GetColumnHeadersAreaHeight: Integer; -begin - if ShowColumnHeaders then - Result := FContainerViewInfo.Specific.Height - else - Result := 0; -end; - -function TcxGridBandsViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridBandsViewInfo.GetGridView: TcxGridBandedTableView; -begin - Result := FContainerViewInfo.GridView; -end; - -function TcxGridBandsViewInfo.GetGridViewInfo: TcxGridBandedTableViewInfo; -begin - Result := FContainerViewInfo.GridViewInfo; -end; - -function TcxGridBandsViewInfo.GetInternalItem(Index: Integer): TcxGridBandViewInfo; -begin - Result := TcxGridBandViewInfo(FItems[Index]); -end; - -function TcxGridBandsViewInfo.GetItem(Index: Integer): TcxGridBandViewInfo; -begin - Result := InternalItems[Index]; - if Result = nil then - begin - Result := GetItemClass.Create(Self, Index); - FItems[Index] := Result; - end; -end; - -function TcxGridBandsViewInfo.GetLastFixedItem(AFixedKind: TcxGridBandFixedKind; - ALevelIndex: Integer): TcxGridBandViewInfo; - - function GetLastLeftFixedItem: TcxGridBandViewInfo; - begin - Result := RootItems[Bands.VisibleRootLeftFixedCount - 1]; - while Result.Band.BandLevelIndex <> ALevelIndex do - if Result.IsBottom then - begin - Result := nil; - Break; - end - else - Result := Result.ChildBandViewInfos[Result.ChildBandViewInfoCount - 1]; - end; - - function GetFirstRightFixedItem: TcxGridBandViewInfo; - begin - Result := RootItems[RootItemCount - Bands.VisibleRootRightFixedCount]; - while Result.Band.BandLevelIndex <> ALevelIndex do - if Result.IsBottom then - begin - Result := nil; - Break; - end - else - Result := Result.ChildBandViewInfos[0]; - end; - -begin - Result := nil; - case AFixedKind of - fkLeft: - if Bands.VisibleLeftFixedCount <> 0 then - Result := GetLastLeftFixedItem; - fkRight: - if Bands.VisibleRightFixedCount <> 0 then - Result := GetFirstRightFixedItem; - end; -end; - -function TcxGridBandsViewInfo.GetLineCount: Integer; -begin - if FLineCount = -1 then - FLineCount := Bands.LineCount; - Result := FLineCount; -end; - -function TcxGridBandsViewInfo.GetRootItem(Index: Integer): TcxGridBandViewInfo; -begin - Result := Items[GridView.Bands.VisibleRootItems[Index].VisibleIndex]; -end; - -function TcxGridBandsViewInfo.GetRootItemCount: Integer; -begin - Result := GridView.Bands.VisibleRootItemCount; -end; - -function TcxGridBandsViewInfo.GetRowCount: Integer; -begin - if FRowCount = -1 then - FRowCount := Bands.VisibleRowCount; - Result := FRowCount; -end; - -procedure TcxGridBandsViewInfo.SetBandHeaderRowHeight(Index: Integer; Value: Integer); -begin - FBandHeaderRowHeights[Index] := Pointer(Value); -end; - -procedure TcxGridBandsViewInfo.CreateItems; -begin - FItems := TList.Create; - FItems.Count := GridView.Bands.VisibleCount; -end; - -procedure TcxGridBandsViewInfo.DestroyItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do - InternalItems[I].Free; - FItems.Free; -end; - -function TcxGridBandsViewInfo.AddIndicatorItems(AIndicatorViewInfo: TcxGridIndicatorViewInfo; - ATopBound: Integer): Boolean; -begin - Result := AIndicatorViewInfo.AlwaysVisible; - if not Result then Exit; - if ShowBandHeaders then - begin - AIndicatorViewInfo.AddItem(ATopBound, BandHeadersAreaHeight, TcxGridIndicatorBandHeaderItemViewInfo); - Inc(ATopBound, BandHeadersAreaHeight); - end; - if ShowColumnHeaders then - AIndicatorViewInfo.AddItem(ATopBound, ColumnHeadersAreaHeight, TcxGridIndicatorHeaderItemViewInfo); -end; - -procedure TcxGridBandsViewInfo.Calculate; -var - AScrollableAreaBounds, ABounds: TRect; - - procedure ProcessLeftFixedItems; - var - I: Integer; - AItem: TcxGridBandViewInfo; - begin - ABounds := ContainerViewInfo.Bounds; - for I := 0 to RootItemCount - 1 do - begin - AItem := RootItems[I]; - if AItem.FixedKind = fkLeft then - begin - ABounds.Right := ABounds.Left + AItem.Width; - AItem.Calculate(ABounds); - ABounds.Left := ABounds.Right; - end; - end; - AScrollableAreaBounds.Left := ABounds.Left; - end; - - procedure ProcessRightFixedItems; - var - I: Integer; - AItem: TcxGridBandViewInfo; - begin - ABounds := ContainerViewInfo.Bounds; - for I := RootItemCount - 1 downto 0 do - begin - AItem := RootItems[I]; - if AItem.FixedKind = fkRight then - begin - ABounds.Left := ABounds.Right - AItem.Width; - AItem.Calculate(ABounds); - ABounds.Right := ABounds.Left; - end; - end; - AScrollableAreaBounds.Right := ABounds.Right; - end; - - procedure ProcessNonFixedItems; - var - I: Integer; - AItem: TcxGridBandViewInfo; - begin - ABounds := AScrollableAreaBounds; - if not FContainerViewInfo.IsScrollable then - Dec(ABounds.Left, GridViewInfo.LeftPos); - for I := 0 to RootItemCount - 1 do - begin - AItem := RootItems[I]; - if AItem.FixedKind = fkNone then - begin - ABounds.Right := ABounds.Left + AItem.Width; - AItem.Calculate(ABounds); - ABounds.Left := ABounds.Right; - end; - end; - end; - -begin - AScrollableAreaBounds := ContainerViewInfo.Bounds; - ProcessLeftFixedItems; - ProcessRightFixedItems; - ProcessNonFixedItems; -end; - -function TcxGridBandsViewInfo.CalculateBandHeaderHeight(ABandHeaderViewInfo: TcxGridBandHeaderViewInfo): Integer; - - function GetBaseBandHeaderHeight: Integer; - var - AParams: TcxViewParams; - begin - if ABandHeaderViewInfo = nil then - begin - GridView.Styles.GetBandHeaderParams(nil, AParams); - Result := GetItemClass.GetHeaderViewInfoClass.GetCellHeight( - GridViewInfo.GetFontHeight(AParams.Font), FContainerViewInfo.LookAndFeelPainter); - end - else - Result := ABandHeaderViewInfo.GetTextCellHeight(GridViewInfo, - FContainerViewInfo.LookAndFeelPainter); - end; - -begin - if IsBandHeaderHeightAssigned then - Result := GridView.OptionsView.BandHeaderHeight - else - Result := GetBaseBandHeaderHeight * GridView.OptionsView.BandHeaderLineCount; -end; - -procedure TcxGridBandsViewInfo.CalculateBandHeaderRowHeights; -var - I, ABandHeaderHeight, ABandLevelIndex: Integer; -begin - if BandHeaderRowCount <> 0 then Exit; - for I := 0 to Count - 1 do - begin - ABandHeaderHeight := Items[I].HeaderViewInfo.CalculateHeight; - ABandLevelIndex := Items[I].Band.BandLevelIndex; - if BandHeaderRowHeights[ABandLevelIndex] < ABandHeaderHeight then - BandHeaderRowHeights[ABandLevelIndex] := ABandHeaderHeight; - end; -end; - -function TcxGridBandsViewInfo.CalculateBandHeadersAreaHeight: Integer; -var - I: Integer; -begin - CalculateBandHeaderRowHeights; - Result := 0; - for I := 0 to BandHeaderRowCount - 1 do - Inc(Result, BandHeaderRowHeights[I]); - if Result = 0 then - Result := CalculateBandHeaderHeight(nil); -end; - -procedure TcxGridBandsViewInfo.CalculateColumnWidths; -var - I: Integer; -begin - for I := 0 to BottomItemCount - 1 do - BottomItems[I].CalculateColumnWidths; -end; - -function TcxGridBandsViewInfo.CalculateHeight: Integer; -begin - Result := BandHeadersAreaHeight + ColumnHeadersAreaHeight; -end; - -function TcxGridBandsViewInfo.CalculateWidth: Integer; -var - I: Integer; -begin - Result := 0; - if not GridView.IsLoading {Count <> 0} then - for I := 0 to RootItemCount - 1 do - Inc(Result, RootItems[I].CalculateWidth); -end; - -function TcxGridBandsViewInfo.DrawBandHeaderBackgroundHandler(ACanvas: TcxCanvas; - const ABounds: TRect): Boolean; -begin - Result := BandHeaderBackgroundBitmap <> nil; - if Result then - ACanvas.FillRect(ABounds, BandHeaderBackgroundBitmap); -end; - -function TcxGridBandsViewInfo.GetBandBackgroundBitmap: TBitmap; -begin - Result := GridView.BackgroundBitmaps.GetBitmap(bbBandBackground); -end; - -function TcxGridBandsViewInfo.GetBandHeaderBackgroundBitmap: TBitmap; -begin - Result := GridView.BackgroundBitmaps.GetBitmap(bbBandHeader); -end; - -function TcxGridBandsViewInfo.GetItemClass: TcxGridBandViewInfoClass; -begin - Result := TcxGridBandViewInfo; -end; - -function TcxGridBandsViewInfo.IsBandHeaderHeightAssigned: Boolean; -begin - Result := GridView.OptionsView.BandHeaderHeight <> 0; -end; - -function TcxGridBandsViewInfo.ShowBandHeaders: Boolean; -begin - Result := GridView.OptionsView.BandHeaders; -end; - -function TcxGridBandsViewInfo.ShowColumnHeaders: Boolean; -begin - Result := GridView.OptionsView.Header; -end; - -procedure TcxGridBandsViewInfo.AssignRootItemWidths; -var - I: Integer; -begin - GridView.BeginUpdate; - try - for I := 0 to RootItemCount - 1 do - with RootItems[I] do - Band.Width := ContentWidth; - finally - GridView.EndUpdate; - end; -end; - -{function TcxGridBandsViewInfo.GetColumnsHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; -begin - for I := 0 to BottomItemCount - 1 do - begin - Result := BottomItems[I].RowsViewInfo.GetColumnsHitTest(P); - if Result <> nil then Exit; - end; - Result := nil; -end;} - -function TcxGridBandsViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; - - procedure ProcessItems(AFixedKind: TcxGridBandFixedKind); - var - I: Integer; - begin - if Result = nil then - for I := 0 to RootItemCount - 1 do - if RootItems[I].FixedKind = AFixedKind then - begin - Result := RootItems[I].GetHitTest(P); - if Result <> nil then Break; - end; - end; - -begin - Result := nil; - ProcessItems(fkLeft); - ProcessItems(fkRight); - ProcessItems(fkNone); -end; - -function TcxGridBandsViewInfo.GetItemAreaBounds(ABand: TcxGridBand): TRect; -begin - Result := GridViewInfo.ScrollableAreaBoundsHorz; - if ABand.FixedKind <> fkNone then - with Items[ABand.VisibleIndex].Bounds do - begin - Result.Left := Left; - Result.Right := Right; - end; -end; - -procedure TcxGridBandsViewInfo.InsertPositionAtPos(const P: TPoint; - out ABand: TcxGridBand; out AInsertPosition: TcxPosition); -var - I: Integer; -begin - ABand := nil; - AInsertPosition := posLeft; - for I := 0 to RootItemCount - 1 do - if RootItems[I].InsertPositionAtPos(P, ABand, AInsertPosition) then Break; -end; - -procedure TcxGridBandsViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].DoOffset(DX, DY); -end; - -{ TcxGridBandedHeaderViewInfoSpecific } - -function TcxGridBandedHeaderViewInfoSpecific.GetGridViewInfo: TcxGridBandedTableViewInfo; -begin - Result := TcxGridBandedTableViewInfo(inherited GridViewInfo); -end; - -function TcxGridBandedHeaderViewInfoSpecific.CalculateHeight: Integer; -begin - Result := Max(1, GridViewInfo.HeaderViewInfo.LineCount) * ItemHeight; -end; - -{ TcxGridBandedHeaderViewInfo } - -constructor TcxGridBandedHeaderViewInfo.Create(AGridViewInfo: TcxCustomGridTableViewInfo); -begin - inherited; - FBandsViewInfo := GetBandsViewInfoClass.Create(Self); -end; - -destructor TcxGridBandedHeaderViewInfo.Destroy; -begin - FBandsViewInfo.Free; - inherited; -end; - -function TcxGridBandedHeaderViewInfo.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -function TcxGridBandedHeaderViewInfo.GetGridViewInfo: TcxGridBandedTableViewInfo; -begin - Result := TcxGridBandedTableViewInfo(inherited GridViewInfo); -end; - -function TcxGridBandedHeaderViewInfo.GetItem(Index: Integer): TcxGridBandedColumnHeaderViewInfo; -begin - Result := TcxGridBandedColumnHeaderViewInfo(inherited Items[Index]); -end; - -function TcxGridBandedHeaderViewInfo.GetLineCount: Integer; -begin - Result := FBandsViewInfo.LineCount; -end; - -function TcxGridBandedHeaderViewInfo.GetRowCount: Integer; -begin - Result := FBandsViewInfo.RowCount; -end; - -function TcxGridBandedHeaderViewInfo.GetSpecific: TcxGridBandedHeaderViewInfoSpecific; -begin - Result := TcxGridBandedHeaderViewInfoSpecific(inherited Specific); -end; - -procedure TcxGridBandedHeaderViewInfo.AddIndicatorItems(AIndicatorViewInfo: TcxGridIndicatorViewInfo; - ATopBound: Integer); -begin - if not FBandsViewInfo.AddIndicatorItems(AIndicatorViewInfo, ATopBound) then - inherited; -end; - -procedure TcxGridBandedHeaderViewInfo.CalculateColumnAutoWidths; -var - AAutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AAutoWidthObject := TcxAutoWidthObject.Create(FBandsViewInfo.Count); - try - for I := 0 to FBandsViewInfo.RootItemCount - 1 do - FBandsViewInfo.RootItems[I].InitAutoWidthItem(AAutoWidthObject.AddItem); - AAutoWidthObject.AvailableWidth := GridViewInfo.ClientWidth; - AAutoWidthObject.Calculate; - for I := 0 to FBandsViewInfo.RootItemCount - 1 do - FBandsViewInfo.RootItems[I].Width := AAutoWidthObject[I].AutoWidth; - finally - AAutoWidthObject.Free; - end; -end; - -procedure TcxGridBandedHeaderViewInfo.CalculateColumnWidths; -begin - inherited; - FBandsViewInfo.CalculateColumnWidths; -end; - -function TcxGridBandedHeaderViewInfo.CalculateHeight: Integer; -begin - Result := FBandsViewInfo.CalculateHeight; -end; - -procedure TcxGridBandedHeaderViewInfo.CalculateItems; -begin - FBandsViewInfo.Calculate; -end; - -function TcxGridBandedHeaderViewInfo.GetBandsViewInfoClass: TcxGridBandsViewInfoClass; -begin - Result := TcxGridBandsViewInfo; -end; - -function TcxGridBandedHeaderViewInfo.GetColumnNeighbors(AColumn: TcxGridColumn): TcxNeighbors; -begin - Result := inherited GetColumnNeighbors(AColumn); - if not AColumn.IsTop then Include(Result, nTop); - if not AColumn.IsBottom then Include(Result, nBottom); -end; - -function TcxGridBandedHeaderViewInfo.GetIsScrollable: Boolean; -begin - Result := FBandsViewInfo.Bands.Layout in [blNonFixed, blRightFixed]; -end; - -function TcxGridBandedHeaderViewInfo.GetItemAreaBounds(AItem: TcxGridColumnHeaderViewInfo): TRect; -begin - Result := FBandsViewInfo.GetItemAreaBounds(TcxGridBandedColumn(AItem.Column).Position.Band); -end; - -function TcxGridBandedHeaderViewInfo.GetItemClass: TcxGridColumnHeaderViewInfoClass; -begin - Result := TcxGridBandedColumnHeaderViewInfo; -end; - -function TcxGridBandedHeaderViewInfo.GetItemMultiLinePainting(AItem: TcxGridColumnHeaderViewInfo): Boolean; -begin - Result := inherited GetItemMultiLinePainting(AItem) or - (TcxGridBandedColumn(AItem.Column).Position.LineCount > 1); -end; - -function TcxGridBandedHeaderViewInfo.GetItemsAreaBounds: TRect; -begin - Result := inherited GetItemsAreaBounds; - Inc(Result.Top, FBandsViewInfo.BandHeadersAreaHeight); -end; - -function TcxGridBandedHeaderViewInfo.GetItemsHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := nil; -end; - -function TcxGridBandedHeaderViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridBandedHeaderPainter; -end; - -function TcxGridBandedHeaderViewInfo.GetVisible: Boolean; -begin - with FBandsViewInfo do - Result := ShowBandHeaders or ShowColumnHeaders; -end; - -function TcxGridBandedHeaderViewInfo.GetWidth: Integer; -begin - Result := FBandsViewInfo.CalculateWidth; -end; - -function TcxGridBandedHeaderViewInfo.IsHeightAssigned: Boolean; -begin - Result := inherited IsHeightAssigned and (LineCount <= 1); -end; - -procedure TcxGridBandedHeaderViewInfo.Offset(DX, DY: Integer); -begin - inherited; - FBandsViewInfo.Offset(DX, 0); -end; - -function TcxGridBandedHeaderViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := FBandsViewInfo.GetHitTest(P); - if Result = nil then - Result := inherited GetHitTest(P); -end; - -function TcxGridBandedHeaderViewInfo.GetZone(const P: TPoint): TcxGridItemContainerZone; -var - AHitTest: TcxCustomGridHitTest; - AColumn: TcxGridBandedColumn; - ABounds: TRect; - ABand: TcxGridBand; - ARowIndex: Integer; -begin - Result := nil; - AHitTest := GridViewInfo.GetHitTest(P); - if GridViewInfo.Controller.CanHandleHitTest(AHitTest) then - if AHitTest is TcxCustomGridColumnHitTest then - begin - AColumn := TcxGridBandedColumn(TcxCustomGridColumnHitTest(AHitTest).Column); - ABounds := Items[AColumn.VisibleIndex].Bounds; - with AColumn.Position do - Result := TcxGridBandedColumnContainerZone.Create(AColumn.VisibleIndex, Band, - VisibleColIndex + Ord(P.X >= (ABounds.Left + ABounds.Right) div 2), VisibleRowIndex); - end - else - if AHitTest is TcxGridBandHitTest then - begin - with TcxGridBandHitTest(AHitTest) do - begin - ABand := Band; - ARowIndex := VisibleRowIndex; - end; - if ARowIndex <> -1 then - begin - if ARowIndex <> ABand.Rows.VisibleCount then - Inc(ARowIndex); - Result := TcxGridBandedColumnContainerZone.Create(-1, ABand, 0, ARowIndex); - end; - end; -end; - -{ TcxGridBandedFooterViewInfo } - -function TcxGridBandedFooterViewInfo.GetItemMultiLinePainting(AItem: TcxGridColumnHeaderViewInfo): Boolean; -begin - Result := inherited GetItemMultiLinePainting(AItem) or - (TcxGridBandedColumn(AItem.Column).Position.LineCount > 1); -end; - -function TcxGridBandedFooterViewInfo.IsColumnOnFirstLayer(AColumnIndex: Integer): Boolean; -begin - Result := TcxGridBandedColumn(GridView.VisibleColumns[AColumnIndex]).Position.Band.FixedKind <> fkNone; -end; - -function TcxGridBandedFooterViewInfo.IsMultilayerLayout: Boolean; -begin - Result := True; -end; - -function CompareSummaryItems(Item1, Item2: Pointer): Integer; -var - ASummaryItem1, ASummaryItem2: TcxDataSummaryItem; -begin - ASummaryItem1 := TcxDataSummaryItem(Item1); - ASummaryItem2 := TcxDataSummaryItem(Item2); - Result := TcxGridColumn(ASummaryItem1.ItemLink).VisibleIndex - - TcxGridColumn(ASummaryItem2.ItemLink).VisibleIndex; - if Result = 0 then - Result := ASummaryItem1.Index - ASummaryItem2.Index; -end; - -procedure TcxGridBandedFooterViewInfo.PrepareSummaryItems(ASummaryItems: TList); -begin - inherited; - ASummaryItems.Sort(CompareSummaryItems); -end; - -{ TcxGridIndicatorBandHeaderItemViewInfo } - -function TcxGridIndicatorBandHeaderItemViewInfo.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -function TcxGridIndicatorBandHeaderItemViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridIndicatorBandHeaderHitTest; -end; - -function TcxGridIndicatorBandHeaderItemViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridIndicatorBandHeaderItemPainter; -end; - -function TcxGridIndicatorBandHeaderItemViewInfo.GetText: string; -begin - Result := cxGetResourceString(@scxGridBandsQuickCustomizationHint); -end; - -procedure TcxGridIndicatorBandHeaderItemViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetBandHeaderParams(nil, AParams); -end; - -function TcxGridIndicatorBandHeaderItemViewInfo.SupportsQuickCustomization: Boolean; -begin - Result := GridView.OptionsCustomize.BandsQuickCustomization; -end; - -function TcxGridIndicatorBandHeaderItemViewInfo.DropDownWindowExists: Boolean; -begin - Result := GridView.Controller.HasBandsCustomizationPopup; -end; - -function TcxGridIndicatorBandHeaderItemViewInfo.GetDropDownWindow: TcxCustomGridPopup; -begin - Result := GridView.Controller.BandsCustomizationPopup; -end; - -{ TcxGridBandedIndicatorViewInfo } - -function TcxGridBandedIndicatorViewInfo.GetAlwaysVisible: Boolean; -begin - Result := inherited GetAlwaysVisible or - TcxGridBandedTableView(GridView).OptionsCustomize.BandsQuickCustomization; -end; - -{ TcxGridBandedDataRowCellsAreaItemViewInfo } - -constructor TcxGridBandedDataRowCellsAreaItemViewInfo.Create(ACellsAreaViewInfo: TcxGridBandedDataRowCellsAreaViewInfo; - ABandViewInfo: TcxGridBandViewInfo); -begin - inherited Create(ACellsAreaViewInfo.RecordViewInfo); - FCellsAreaViewInfo := ACellsAreaViewInfo; - FBandViewInfo := ABandViewInfo; - CreateLineBounds; -end; - -destructor TcxGridBandedDataRowCellsAreaItemViewInfo.Destroy; -begin - DestroyLineBounds; - inherited; -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.GetFixedBandsSeparatorLocation: TcxGridFixedBandsSeparatorLocation; -begin - if bLeft in FBandViewInfo.Borders then - Result := slLeft - else - if bRight in FBandViewInfo.Borders then - Result := slRight - else - Result := slNone; -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.GetGridViewInfo: TcxGridBandedTableViewInfo; -begin - Result := TcxGridBandedTableViewInfo(inherited GridViewInfo); -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.GetLineBounds(Index: Integer): TRect; -begin - Result := PRect(FLineBounds[Index])^; -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.GetLineCount: Integer; -begin - Result := FLineBounds.Count; -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.GetRecordsViewInfo: TcxGridBandedRowsViewInfo; -begin - Result := TcxGridBandedRowsViewInfo(RecordViewInfo.RecordsViewInfo); -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.GetRecordViewInfo: TcxGridDataRowViewInfo; -begin - Result := TcxGridDataRowViewInfo(inherited RecordViewInfo); -end; - -procedure TcxGridBandedDataRowCellsAreaItemViewInfo.ClearLines; -var - I: Integer; -begin - for I := 0 to LineCount - 1 do - Dispose(PRect(FLineBounds[I])); - FLineBounds.Clear; -end; - -procedure TcxGridBandedDataRowCellsAreaItemViewInfo.CreateLineBounds; -begin - FLineBounds := TList.Create; -end; - -procedure TcxGridBandedDataRowCellsAreaItemViewInfo.DestroyLineBounds; -begin - ClearLines; - FLineBounds.Free; -end; - -procedure TcxGridBandedDataRowCellsAreaItemViewInfo.AddLine(const ABounds: TRect); -var - ALineBounds: PRect; -begin - New(ALineBounds); - ALineBounds^ := ABounds; - FLineBounds.Add(ALineBounds); -end; - -procedure TcxGridBandedDataRowCellsAreaItemViewInfo.AddLines; - - procedure AddCellsLines(AShowLeftLines, AShowTopLines: Boolean); - var - I: Integer; - ACellViewInfo: TcxGridDataCellViewInfo; - APosition: TcxGridBandedColumnPosition; - R: TRect; - - procedure AddLeftLine; - begin - R := ACellViewInfo.Bounds; - R.Right := R.Left; - Dec(R.Left, GridViewInfo.GridLineWidth); - AddLine(R); - end; - - procedure AddTopLine; - begin - R := ACellViewInfo.Bounds; - R.Bottom := R.Top; - Dec(R.Top, GridViewInfo.GridLineWidth); - AddLine(R); - end; - - begin - if not (AShowLeftLines or AShowTopLines) then Exit; - for I := 0 to FBandViewInfo.ColumnViewInfoCount - 1 do - begin - ACellViewInfo := RecordViewInfo.InternalCellViewInfos[FBandViewInfo[I].Index]; - if ACellViewInfo <> nil then - begin - APosition := TcxGridBandedColumn(ACellViewInfo.Item).Position; - if AShowLeftLines and (APosition.VisibleColIndex > 0) then - AddLeftLine; - if AShowTopLines and (APosition.VisibleRowIndex > 0) then - AddTopLine; - end; - end; - end; - -begin - if Borders <> [] then - AddCellsLines(RecordsViewInfo.ShowCellLeftLines, RecordsViewInfo.ShowCellTopLines); -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.CalculateWidth: Integer; -begin - Result := 0; -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.GetBorders: TcxBorders; -begin - Result := RecordViewInfo.GetCellBorders(FBandViewInfo.IsRight, CellsAreaViewInfo.IsBottom); - if GridViewInfo.FixedBandSeparatorWidth <> 0 then - Result := Result - FBandViewInfo.Borders; -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.GetFixedBandsSeparatorBounds: TRect; -begin - Result := ContentBounds; - with Result do - case FixedBandsSeparatorLocation of - slLeft: - Right := Left + GridViewInfo.FixedBandSeparatorWidth; - slRight: - Left := Right - GridViewInfo.FixedBandSeparatorWidth; - end; -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridBandedDataRowCellsAreaItemPainter; -end; - -procedure TcxGridBandedDataRowCellsAreaItemViewInfo.GetViewParams(var AParams: TcxViewParams); -var - ACellPos: TcxGridDataCellPos; -begin - if RecordViewInfo.Selected then - inherited - else - begin - ACellPos := TcxGridDataCellPos.Create(RecordViewInfo.GridRecord, nil); - try - FBandViewInfo.Band.Styles.GetViewParams(bsContent, ACellPos, nil, AParams); - finally - ACellPos.Free; - end; - end; -end; - -procedure TcxGridBandedDataRowCellsAreaItemViewInfo.Offset(DX, DY: Integer); -begin - inherited; - ClearLines; - AddLines; -end; - -procedure TcxGridBandedDataRowCellsAreaItemViewInfo.BeforeRecalculation; -begin - inherited; - ClearLines; - RecordViewInfo.BeforeCellRecalculation(Self); -end; - -procedure TcxGridBandedDataRowCellsAreaItemViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - AddLines; -end; - -function TcxGridBandedDataRowCellsAreaItemViewInfo.CanDrawSelected: Boolean; -begin - Result := True; -end; - -{ TcxGridBandedDataRowCellsAreaViewInfo } - -constructor TcxGridBandedDataRowCellsAreaViewInfo.Create(ARecordViewInfo: TcxCustomGridRecordViewInfo); -begin - inherited; - CreateItems; -end; - -destructor TcxGridBandedDataRowCellsAreaViewInfo.Destroy; -begin - DestroyItems; - inherited; -end; - -function TcxGridBandedDataRowCellsAreaViewInfo.GetBandsViewInfo: TcxGridBandsViewInfo; -begin - Result := GridViewInfo.HeaderViewInfo.BandsViewInfo; -end; - -function TcxGridBandedDataRowCellsAreaViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridBandedDataRowCellsAreaViewInfo.GetGridViewInfo: TcxGridBandedTableViewInfo; -begin - Result := TcxGridBandedTableViewInfo(inherited GridViewInfo); -end; - -function TcxGridBandedDataRowCellsAreaViewInfo.GetItem(Index: Integer): TcxGridBandedDataRowCellsAreaItemViewInfo; -begin - Result := TcxGridBandedDataRowCellsAreaItemViewInfo(FItems[Index]); -end; - -procedure TcxGridBandedDataRowCellsAreaViewInfo.CreateItems; -var - I: Integer; -begin - FItems := TList.Create; - for I := 0 to BandsViewInfo.BottomItemCount - 1 do - FItems.Add(GetItemClass.Create(Self, BandsViewInfo.BottomItems[I])); -end; - -procedure TcxGridBandedDataRowCellsAreaViewInfo.DestroyItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do Items[I].Free; - FItems.Free; -end; - -function TcxGridBandedDataRowCellsAreaViewInfo.CalculateVisible: Boolean; -begin - Result := TcxGridBandedRowsViewInfo(RecordViewInfo.RecordsViewInfo).RowCellsAreaVisible; -end; - -function TcxGridBandedDataRowCellsAreaViewInfo.GetItemClass: TcxGridBandedDataRowCellsAreaItemViewInfoClass; -begin - Result := TcxGridBandedDataRowCellsAreaItemViewInfo; -end; - -procedure TcxGridBandedDataRowCellsAreaViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - inherited; - for I := 0 to Count - 1 do - Items[I].DoOffset(DX, DY); -end; - -procedure TcxGridBandedDataRowCellsAreaViewInfo.BeforeRecalculation; -var - I: Integer; -begin - inherited; - for I := 0 to Count - 1 do - Items[I].BeforeRecalculation; -end; - -procedure TcxGridBandedDataRowCellsAreaViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -var - R: TRect; - I: Integer; -begin - inherited; - R := Bounds; - for I := 0 to Count - 1 do - begin - with Items[I].BandViewInfo.Bounds do - begin - if I <> 0 then R.Left := Left; - R.Right := Right; - end; - Items[I].Calculate(R); - end; -end; - -function TcxGridBandedDataRowCellsAreaViewInfo.DrawMergedCells: Boolean; -begin - Result := True; -end; - -{ TcxGridBandedRowsViewInfo } - -function TcxGridBandedRowsViewInfo.GetHeaderViewInfo: TcxGridBandedHeaderViewInfo; -begin - Result := TcxGridBandedHeaderViewInfo(inherited HeaderViewInfo); -end; - -function TcxGridBandedRowsViewInfo.CalculateDataRowHeight: Integer; -begin - Result := inherited CalculateDataRowHeight; - if HeaderViewInfo.LineCount <> 0 then - Result := Result * HeaderViewInfo.LineCount; -end; - -function TcxGridBandedRowsViewInfo.CalculateRowCellsAreaVisible: Boolean; -var - I: Integer; -begin - with HeaderViewInfo.BandsViewInfo do - begin - Result := LineCount > 1; - if not Result then - if Count = 0 then - Result := True - else - for I := 0 to Count - 1 do - with Items[I] do - if (ColumnViewInfoCount = 0) or (FixedKind <> fkNone) or AreAllColumnsFixed then - begin - Result := True; - Break; - end; - end; -end; - -function TcxGridBandedRowsViewInfo.GetAreaBoundsForCell(ACellViewInfo: TcxGridTableDataCellViewInfo): TRect; -var - ABand: TcxGridBand; -begin - ABand := TcxGridBandedColumn(ACellViewInfo.Item).Position.Band; - if (ABand <> nil) and (ABand.FixedKind = fkNone) then - Result := GridViewInfo.ScrollableAreaBoundsHorz - else - Result := inherited GetAreaBoundsForCell(ACellViewInfo); -end; - -function TcxGridBandedRowsViewInfo.GetPainterClass: TcxCustomGridRecordsPainterClass; -begin - Result := TcxGridBandedRowsPainter; -end; - -function TcxGridBandedRowsViewInfo.GetRowWidth: Integer; -var - AClientWidth: Integer; -begin - Result := inherited GetRowWidth; - AClientWidth := GridViewInfo.ClientWidth; - if Result > AClientWidth then - case HeaderViewInfo.BandsViewInfo.Bands.Layout of - blLeftFixed: - Dec(Result, GridViewInfo.LeftPos); - blRightFixed: - Result := AClientWidth + GridViewInfo.LeftPos; - blLeftRightFixed: - Result := AClientWidth; - end; -end; - -function TcxGridBandedRowsViewInfo.GetShowBandSeparators: Boolean; -begin - Result := (HeaderViewInfo.LineCount > 1) and (GridLines in [glBoth, glVertical]); -end; - -function TcxGridBandedRowsViewInfo.GetShowCellLeftLines: Boolean; -begin - Result := (HeaderViewInfo.LineCount > 1) and (GridLines in [glBoth, glVertical]); -end; - -function TcxGridBandedRowsViewInfo.GetShowCellTopLines: Boolean; -begin - Result := (HeaderViewInfo.RowCount > 1) and (GridLines = glBoth); -end; - -procedure TcxGridBandedRowsViewInfo.AfterConstruction; -begin - FRowCellsAreaVisible := CalculateRowCellsAreaVisible; - inherited; -end; - -function TcxGridBandedRowsViewInfo.GetDataRowCellsAreaViewInfoClass: TClass; -begin - Result := TcxGridBandedDataRowCellsAreaViewInfo; -end; - -function TcxGridBandedRowsViewInfo.IsCellMultiLine(AItem: TcxCustomGridTableItem): Boolean; -begin - Result := inherited IsCellMultiLine(AItem) or - (TcxGridBandedColumn(AItem).Position.LineCount > 1); -end; - -{ TcxGridBandedTableViewInfo } - -function TcxGridBandedTableViewInfo.GetController: TcxGridBandedTableController; -begin - Result := TcxGridBandedTableController(inherited Controller); -end; - -function TcxGridBandedTableViewInfo.GetFixedBandSeparatorColor: TColor; -begin - Result := GridView.OptionsView.GetFixedBandSeparatorColor; -end; - -function TcxGridBandedTableViewInfo.GetFixedBandSeparatorWidth: Integer; -begin - Result := GridView.OptionsView.FixedBandSeparatorWidth; -end; - -function TcxGridBandedTableViewInfo.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -function TcxGridBandedTableViewInfo.GetHeaderViewInfo: TcxGridBandedHeaderViewInfo; -begin - Result := TcxGridBandedHeaderViewInfo(inherited HeaderViewInfo); -end; - -function TcxGridBandedTableViewInfo.GetScrollableAreaBoundsForEdit: TRect; -begin - Result := inherited GetScrollableAreaBoundsForEdit; - with ScrollableAreaBoundsHorz do - begin - Result.Left := Left; - Result.Right := Right; - end; -end; - -function TcxGridBandedTableViewInfo.GetScrollableAreaBoundsHorz: TRect; -begin - Result := inherited GetScrollableAreaBoundsHorz; - with GridView.Bands do - begin - if VisibleLeftFixedCount <> 0 then - Result.Left := HeaderViewInfo.BandsViewInfo.LastFixedItems[fkLeft, 0].Bounds.Right; - if VisibleRightFixedCount <> 0 then - Result.Right := HeaderViewInfo.BandsViewInfo.LastFixedItems[fkRight, 0].Bounds.Left; - end; -end; - -function TcxGridBandedTableViewInfo.SupportsAutoHeight: Boolean; -begin - Result := inherited SupportsAutoHeight and (HeaderViewInfo.LineCount = 1); -end; - -function TcxGridBandedTableViewInfo.SupportsGroupSummariesAlignedWithColumns: Boolean; -begin - Result := inherited SupportsGroupSummariesAlignedWithColumns and - (HeaderViewInfo.RowCount = 1) and (GridView.Bands.Layout = blNonFixed); -end; - -function TcxGridBandedTableViewInfo.SupportsMultipleFooterSummaries: Boolean; -begin - Result := inherited SupportsMultipleFooterSummaries and (HeaderViewInfo.RowCount = 1); -end; - -function TcxGridBandedTableViewInfo.GetFooterPainterClass: TcxGridFooterPainterClass; -begin - Result := TcxGridBandedFooterPainter; -end; - -function TcxGridBandedTableViewInfo.GetFooterViewInfoClass: TcxGridFooterViewInfoClass; -begin - Result := TcxGridBandedFooterViewInfo; -end; - -function TcxGridBandedTableViewInfo.GetHeaderViewInfoClass: TcxGridHeaderViewInfoClass; -begin - Result := TcxGridBandedHeaderViewInfo; -end; - -function TcxGridBandedTableViewInfo.GetHeaderViewInfoSpecificClass: TcxGridHeaderViewInfoSpecificClass; -begin - Result := TcxGridBandedHeaderViewInfoSpecific; -end; - -function TcxGridBandedTableViewInfo.GetIndicatorViewInfoClass: TcxGridIndicatorViewInfoClass; -begin - Result := TcxGridBandedIndicatorViewInfo; -end; - -function TcxGridBandedTableViewInfo.GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; -begin - Result := TcxGridBandedRowsViewInfo; -end; - -function TcxGridBandedTableViewInfo.CanOffset(ARecordCountDelta, DX, DY: Integer): Boolean; -begin - Result := inherited CanOffset(ARecordCountDelta, DX, DY) and - ((ARecordCountDelta <> 0) or (GridView.Bands.Layout = blNonFixed)); -end; - -function TcxGridBandedTableViewInfo.GetCellHeight(AIndex, ACellHeight: Integer): Integer; -begin - Result := HeaderViewInfo[AIndex].Column.Position.LineCount * ACellHeight; -end; - -function TcxGridBandedTableViewInfo.GetCellTopOffset(AIndex, ACellHeight: Integer): Integer; -begin - Result := HeaderViewInfo[AIndex].Column.Position.Row.LineOffset * ACellHeight; -end; - -{ TcxGridBandedColumnOptions } - -constructor TcxGridBandedColumnOptions.Create(AItem: TcxCustomGridTableItem); -begin - inherited; - FVertSizing := True; -end; - -procedure TcxGridBandedColumnOptions.SetVertSizing(Value: Boolean); -begin - if FVertSizing <> Value then - begin - FVertSizing := Value; - Changed; - end; -end; - -procedure TcxGridBandedColumnOptions.Assign(Source: TPersistent); -begin - if Source is TcxGridBandedColumnOptions then - with TcxGridBandedColumnOptions(Source) do - Self.VertSizing := VertSizing; - inherited; -end; - -{ TcxGridBandedColumnStyles } - -function TcxGridBandedColumnStyles.GetItem: TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(inherited Item); -end; - -procedure TcxGridBandedColumnStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -var - ADataCellPos: TcxGridDataCellPos; -begin - if (Index = isContent) and (Item.Position.Band <> nil) then - begin - ADataCellPos := TcxGridDataCellPos.Create(TcxCustomGridRecord(AData), Item); - try - Item.Position.Band.Styles.GetViewParams(bsContent, ADataCellPos, nil, AParams); - finally - ADataCellPos.Free; - end; - end - else - inherited; -end; - -{ TcxGridBandedColumnPosition } - -constructor TcxGridBandedColumnPosition.Create(AItem: TcxCustomGridTableItem); -begin - inherited; - FBandIndex := -1; - FColIndex := -1; - FLineCount := 1; - FRowIndex := -1; - FVisibleColIndex := -1; -end; - -function TcxGridBandedColumnPosition.GetBandIndex: Integer; -begin - if FBand = nil then - Result := -1 - else - Result := FBand.Index; -end; - -function TcxGridBandedColumnPosition.GetColIndex: Integer; -begin - if Row = nil then - Result := -1 - else - Result := Row.IndexOf(Item); -end; - -function TcxGridBandedColumnPosition.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -function TcxGridBandedColumnPosition.GetItem: TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(inherited Item); -end; - -function TcxGridBandedColumnPosition.GetRowIndex: Integer; -begin - if Row = nil then - Result := -1 - else - Result := Row.Index; -end; - -function TcxGridBandedColumnPosition.GetVisibleBandIndex: Integer; -begin - if FBand = nil then - Result := -1 - else - Result := FBand.VisibleIndex; -end; - -function TcxGridBandedColumnPosition.GetVisibleRowIndex: Integer; -begin - if Row = nil then - Result := -1 - else - Result := Row.VisibleIndex; -end; - -procedure TcxGridBandedColumnPosition.SetBand(Value: TcxGridBand); -begin - FBand := Value; - if FBand = nil then - FVisibleColIndex := -1; -end; - -procedure TcxGridBandedColumnPosition.SetBandIndex(Value: Integer); -var - ANewBand: TcxGridBand; - APrevVisible: Boolean; -begin - if BandIndex <> Value then - begin - if (0 <= Value) and (Value < GridView.Bands.Count) then - ANewBand := GridView.Bands[Value] - else - ANewBand := nil; - if (ANewBand <> nil) and not ANewBand.IsBottom then - ANewBand.MoveBandsToRoot; - APrevVisible := Item.ActuallyVisible; - GridView.BeginUpdate; - try - if FBand <> nil{BandIndex <> -1} then - FBand.RemoveColumn(Item); - if ANewBand <> nil then - ANewBand.AddColumn(Item); - if Item.IsReading or Item.IsUpdating then - FBandIndex := BandIndex; - if Item.ActuallyVisible <> APrevVisible then - GridView.ItemVisibilityChanged(Item, Item.ActuallyVisible) - else - GridView.RefreshVisibleItemsList; - Changed(ticSize); - finally - GridView.EndUpdate; - end; - end; -end; - -procedure TcxGridBandedColumnPosition.SetColIndex(Value: Integer); -begin - if FBand <> nil then - if Item.IsLoading or Item.IsUpdating or GridView.IsAssigningItems then - FColIndex := Value - else - if Value >= 0 then - begin - FBand.MoveColumn(Item, RowIndex, Value); - Changed(ticSize); - end; -end; - -procedure TcxGridBandedColumnPosition.SetLineCount(Value: Integer); -begin - CheckLineCount(Value); - if FLineCount <> Value then - begin - FLineCount := Value; - Changed(ticSize); - end; -end; - -procedure TcxGridBandedColumnPosition.SetRowIndex(Value: Integer); -begin - if (FBand <> nil) and (RowIndex <> Value) then - if Item.IsLoading or Item.IsUpdating or GridView.IsAssigningItems then - FRowIndex := Value - else - if Value >= 0 then - begin - FBand.MoveColumn(Item, Value, -1); - Changed(ticSize); - end; -end; - -procedure TcxGridBandedColumnPosition.CheckLineCount(var Value: Integer); -begin - if Value < 1 then Value := 1; -end; - -procedure TcxGridBandedColumnPosition.SaveParams(ABandIndexOnly: Boolean = False); -begin - FBandIndex := BandIndex; - if not ABandIndexOnly then - begin - FColIndex := ColIndex; - FRowIndex := RowIndex; - end; -end; - -procedure TcxGridBandedColumnPosition.Assign(Source: TPersistent); -begin - if Source is TcxGridBandedColumnPosition then - with TcxGridBandedColumnPosition(Source) do - begin - Self.BandIndex := BandIndex; - Self.RowIndex := RowIndex; - Self.ColIndex := ColIndex; - Self.LineCount := LineCount; - end; - inherited; -end; - -{ TcxGridBandedColumn } - -destructor TcxGridBandedColumn.Destroy; -begin - FPosition.BandIndex := -1; - inherited; -end; - -function TcxGridBandedColumn.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -function TcxGridBandedColumn.GetOptions: TcxGridBandedColumnOptions; -begin - Result := TcxGridBandedColumnOptions(inherited Options); -end; - -function TcxGridBandedColumn.GetStyles: TcxGridBandedColumnStyles; -begin - Result := TcxGridBandedColumnStyles(inherited Styles); -end; - -procedure TcxGridBandedColumn.SetOptions(Value: TcxGridBandedColumnOptions); -begin - inherited Options := Value; -end; - -procedure TcxGridBandedColumn.SetPosition(Value: TcxGridBandedColumnPosition); -begin - FPosition.Assign(Value); -end; - -procedure TcxGridBandedColumn.SetStyles(Value: TcxGridBandedColumnStyles); -begin - inherited Styles := Value; -end; - -function TcxGridBandedColumn.GetStoredProperties(AProperties: TStrings): Boolean; -begin - with AProperties do - begin - Add('BandIndex'); - Add('ColIndex'); - Add('RowIndex'); - Add('LineCount'); - end; - Result := inherited GetStoredProperties(AProperties); -end; - -procedure TcxGridBandedColumn.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'BandIndex' then - AValue := Position.BandIndex - else - if AName = 'ColIndex' then - AValue := Position.ColIndex - else - if AName = 'RowIndex' then - AValue := Position.RowIndex - else - if AName = 'LineCount' then - AValue := Position.LineCount - else - inherited; -end; - -procedure TcxGridBandedColumn.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'BandIndex' then - Position.BandIndex := AValue - else - if AName = 'ColIndex' then - Position.FColIndex := AValue - else - if AName = 'RowIndex' then - Position.FRowIndex := AValue - else - if AName = 'LineCount' then - Position.LineCount := AValue - else - inherited; -end; - -procedure TcxGridBandedColumn.CreateSubClasses; -begin - inherited; - FPosition := TcxGridBandedColumnPosition.Create(Self); -end; - -procedure TcxGridBandedColumn.DestroySubClasses; -begin - FreeAndNil(FPosition); - inherited; -end; - -function TcxGridBandedColumn.GetOptionsClass: TcxCustomGridTableItemOptionsClass; -begin - Result := TcxGridBandedColumnOptions; -end; - -function TcxGridBandedColumn.GetStylesClass: TcxCustomGridTableItemStylesClass; -begin - Result := TcxGridBandedColumnStyles; -end; - -function TcxGridBandedColumn.CanCellMerging: Boolean; -begin - Result := inherited CanCellMerging and - (FPosition.LineCount = GridView.ViewInfo.HeaderViewInfo.LineCount); -end; - -procedure TcxGridBandedColumn.AssignColumnWidths; - - function GetRowViewInfo: TcxGridBandRowViewInfo; - begin - Result := GridView.ViewInfo.HeaderViewInfo.BandsViewInfo[Position.VisibleBandIndex].RowsViewInfo[Position.VisibleRowIndex]; - end; - -begin - if Position.Band.Width <> 0 then - GetRowViewInfo.AssignColumnWidths - else - if Position.Band.HasParentWithAssignedWidth then - Position.Band.ParentBandWithAssignedWidth.AssignColumnWidths - else - if (Position.Band.Rows.VisibleCount > 1) and - (Position.Row.Width < Position.Band.Rows.Width) then - GetRowViewInfo.AssignColumnWidths - else - inherited; -end; - -function TcxGridBandedColumn.CanScroll: Boolean; -begin - Result := inherited CanScroll and - (Position.Band <> nil) and (Position.Band.FixedKind = fkNone); -end; - -function TcxGridBandedColumn.CanVertSize: Boolean; -begin - Result := GridView.OptionsCustomize.ColumnVertSizing and Options.VertSizing; -end; - -function TcxGridBandedColumn.DefaultAlternateCaption: string; -var - ABand: TcxGridBand; -begin - Result := inherited DefaultAlternateCaption; - if GridView.OptionsView.BandCaptionsInColumnAlternateCaption then - begin - ABand := Position.Band; - while ABand <> nil do - begin - Result := ABand.Caption + cxGridBandedTableViewAlternateCaptionSeparator + Result; - ABand := ABand.ParentBand; - end; - end; -end; - -function TcxGridBandedColumn.GetActuallyVisible: Boolean; -begin - Result := inherited GetActuallyVisible and - (Position.Band <> nil) and Position.Band.ActuallyVisible; -end; - -function TcxGridBandedColumn.GetEditPartVisible: Boolean; -var - R: TRect; - - function HasPoint(X, Y: Integer): Boolean; - var - AHitTest: TcxCustomGridHitTest; - begin - AHitTest := GridView.ViewInfo.GetHitTest(X, Y); - Result := (AHitTest is TcxGridRecordCellHitTest) and - (TcxGridRecordCellHitTest(AHitTest).Item = Self); - end; - -begin - if CanScroll then - Result := inherited GetEditPartVisible - else - with GridView.ViewInfo.ScrollableAreaBoundsForEdit do - begin - Result := Right < Left; // left fixed and right fixed bands overlap - if Result then - begin - R := FocusedCellViewInfo.EditBounds; - // R.Top is ignored because it is always visible if R.Bottom - 1 is visible - // Also R.Top might intersect with the header sizing hittest area - Result := not HasPoint(R.Left, R.Bottom - 1) or not HasPoint(R.Right - 1, R.Bottom - 1); - end - else - Result := FocusedCellViewInfo.EditBounds.Bottom > Bottom; - end; -end; - -function TcxGridBandedColumn.GetIsBottom: Boolean; -begin - Result := (Position.Row <> nil) and Position.Row.IsLast; -end; - -function TcxGridBandedColumn.GetIsLeft: Boolean; -begin - Result := Position.VisibleColIndex = 0; -end; - -function TcxGridBandedColumn.GetIsMostBottom: Boolean; -begin - Result := IsBottom and - (Position.VisibleRowIndex = GridView.Bands.VisibleRowCount - 1); -end; - -function TcxGridBandedColumn.GetIsMostLeft: Boolean; -begin - Result := IsLeft and Position.Band.IsFirst; -end; - -function TcxGridBandedColumn.GetIsMostRight: Boolean; -begin - Result := IsRight and Position.Band.IsLast; -end; - -function TcxGridBandedColumn.GetIsRight: Boolean; -begin - Result := (Position.Row <> nil) and - (Position.VisibleColIndex = Position.Row.VisibleCount - 1); -end; - -function TcxGridBandedColumn.GetIsTop: Boolean; -begin - Result := (Position.Row <> nil) and Position.Row.IsFirst; -end; - -function TcxGridBandedColumn.GetVisibleInQuickCustomizationPopup: Boolean; -begin - Result := inherited GetVisibleInQuickCustomizationPopup and - (FPosition.Band <> nil) and FPosition.Band.ActuallyVisible; -end; - -procedure TcxGridBandedColumn.VisibleChanged; -begin - inherited; - if Position.Row <> nil then - Position.Row.RefreshVisibleItemsList; -end; - -procedure TcxGridBandedColumn.Assign(Source: TPersistent); -begin - if Source is TcxGridBandedColumn then - with TcxGridBandedColumn(Source) do - begin - Self.Position := Position; - end; - inherited; -end; - -{ TcxGridBandRow } - -constructor TcxGridBandRow.Create(ABandRows: TcxGridBandRows); -begin - inherited Create; - FBandRows := ABandRows; - FItems := TList.Create; - FVisibleItems := TList.Create; -end; - -destructor TcxGridBandRow.Destroy; -begin - FBandRows.RemoveItem(Self); - FVisibleItems.Free; - FItems.Free; - inherited; -end; - -function TcxGridBandRow.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridBandRow.GetIndex: Integer; -begin - Result := FBandRows.FItems.IndexOf(Self); -end; - -function TcxGridBandRow.GetIsFirst: Boolean; -begin - Result := VisibleIndex = 0; -end; - -function TcxGridBandRow.GetIsLast: Boolean; -begin - Result := VisibleIndex = FBandRows.VisibleCount - 1; -end; - -function TcxGridBandRow.GetItem(Index: Integer): TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(FItems[Index]); -end; - -function TcxGridBandRow.GetLineCount: Integer; -var - I, ALineCount: Integer; -begin - Result := 1; - for I := 0 to VisibleCount - 1 do - begin - ALineCount := VisibleItems[I].Position.LineCount; - if ALineCount > Result then Result := ALineCount; - end; -end; - -function TcxGridBandRow.GetLineOffset: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to VisibleIndex - 1 do - Inc(Result, FBandRows.VisibleItems[I].LineCount); -end; - -function TcxGridBandRow.GetVisible: Boolean; -begin - Result := (VisibleCount <> 0) or (Count = 0); // for new just inserted empty rows -end; - -function TcxGridBandRow.GetVisibleCount: Integer; -begin - Result := FVisibleItems.Count; -end; - -function TcxGridBandRow.GetVisibleIndex: Integer; -begin - Result := FBandRows.FVisibleItems.IndexOf(Self); -end; - -function TcxGridBandRow.GetVisibleItem(Index: Integer): TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(FVisibleItems[Index]); -end; - -function TcxGridBandRow.GetWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to VisibleCount - 1 do - Inc(Result, VisibleItems[I].Width); -end; - -procedure TcxGridBandRow.CheckIndexForInsert(var AIndex: Integer; AExistingItem: Boolean); -begin - CheckItemIndexForInsert(AIndex, Count, AExistingItem); -end; - -procedure TcxGridBandRow.RefreshVisibleItemsList; -var - I: Integer; -begin - FVisibleItems.Clear; - for I := 0 to Count - 1 do - if Items[I].Visible then - Items[I].Position.FVisibleColIndex := FVisibleItems.Add(Items[I]) - else - Items[I].Position.FVisibleColIndex := -1; - FBandRows.RefreshVisibleItemsList; -end; - -procedure TcxGridBandRow.ApplyBestFit(ACheckSizingAbility: Boolean = False; - AFireEvents: Boolean = False); -var - I: Integer; -begin - for I := 0 to VisibleCount - 1 do - VisibleItems[I].ApplyBestFit(ACheckSizingAbility, AFireEvents); -end; - -procedure TcxGridBandRow.Delete(AIndex: Integer); -begin - Items[AIndex].Position.FRow := nil; - FItems.Delete(AIndex); - if Count = 0 then - Free - else - RefreshVisibleItemsList; -end; - -function TcxGridBandRow.IndexOf(AColumn: TcxGridBandedColumn): Integer; -begin - Result := FItems.IndexOf(AColumn); -end; - -procedure TcxGridBandRow.Insert(AIndex: Integer; AColumn: TcxGridBandedColumn); -begin - CheckIndexForInsert(AIndex, False); - FItems.Insert(AIndex, AColumn); - AColumn.Position.FRow := Self; - RefreshVisibleItemsList; -end; - -procedure TcxGridBandRow.Move(ACurIndex, ANewIndex: Integer); -begin - CheckIndexForInsert(ANewIndex, True); - FItems.Move(ACurIndex, ANewIndex); - RefreshVisibleItemsList; -end; - -{ TcxGridBandRows } - -constructor TcxGridBandRows.Create(ABand: TcxGridBand); -begin - inherited Create; - FBand := ABand; - FItems := TList.Create; - FVisibleItems := TList.Create; -end; - -destructor TcxGridBandRows.Destroy; -begin - Count := 0; - FVisibleItems.Free; - FItems.Free; - inherited; -end; - -function TcxGridBandRows.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridBandRows.GetFirstVisible: TcxGridBandRow; -begin - Result := VisibleItems[0]; -end; - -function TcxGridBandRows.GetGridView: TcxGridBandedTableView; -begin - Result := FBand.GridView; -end; - -function TcxGridBandRows.GetItem(Index: Integer): TcxGridBandRow; -begin - Result := TcxGridBandRow(FItems[Index]); -end; - -function TcxGridBandRows.GetLastVisible: TcxGridBandRow; -begin - Result := VisibleItems[VisibleCount - 1]; -end; - -function TcxGridBandRows.GetLineCount: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to VisibleCount - 1 do - Inc(Result, VisibleItems[I].LineCount); -end; - -function TcxGridBandRows.GetVisibleCount: Integer; -begin - Result := FVisibleItems.Count; -end; - -function TcxGridBandRows.GetVisibleItem(Index: Integer): TcxGridBandRow; -begin - Result := TcxGridBandRow(FVisibleItems[Index]); -end; - -function TcxGridBandRows.GetWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to VisibleCount - 1 do - Inc(Result, VisibleItems[I].Width); -end; - -procedure TcxGridBandRows.SetCount(Value: Integer); -var - APrevCount, I: Integer; -begin - if Value < 0 then Value := 0; - if Count <> Value then - begin - if Value > Count then - begin - APrevCount := Count; - FItems.Count := Value; - for I := APrevCount to Count - 1 do - FItems[I] := TcxGridBandRow.Create(Self); - end - else - begin - for I := Value to Count - 1 do Items[I].Free; - FItems.Count := Value; - end; - RefreshVisibleItemsList; - end; -end; - -procedure TcxGridBandRows.RemoveItem(ARow: TcxGridBandRow); -begin - FItems.Remove(ARow); - RefreshVisibleItemsList; -end; - -procedure TcxGridBandRows.RefreshVisibleItemsList; -var - I: Integer; -begin - FVisibleItems.Clear; - for I := 0 to Count - 1 do - if Items[I].Visible then - FVisibleItems.Add(Items[I]); -end; - -procedure TcxGridBandRows.ApplyBestFit(ACheckSizingAbility: Boolean = False; - AFireEvents: Boolean = False); -var - I: Integer; -begin - for I := 0 to VisibleCount - 1 do - VisibleItems[I].ApplyBestFit(ACheckSizingAbility, AFireEvents); -end; - -function TcxGridBandRows.GetLineIndex(ARowIndex: Integer): Integer; -begin - Result := VisibleItems[ARowIndex].LineOffset; -end; - -function TcxGridBandRows.GetRowIndex(ALineIndex: Integer): Integer; -begin - for Result := 0 to VisibleCount - 1 do - with VisibleItems[Result] do - if (LineOffset <= ALineIndex) and (ALineIndex < LineOffset + LineCount) then - Exit; - Result := -1; -end; - -function TcxGridBandRows.Insert(AIndex: Integer): TcxGridBandRow; -begin - if AIndex > Count then AIndex := Count; - Result := TcxGridBandRow.Create(Self); - FItems.Insert(AIndex, Result); - RefreshVisibleItemsList; -end; - -procedure TcxGridBandRows.MoveColumn(AColumn: TcxGridBandedColumn; ARowIndex, AColIndex: Integer); -var - AColumnColIndex, AColumnRowIndex, APrevCount: Integer; -begin - AColumnRowIndex := AColumn.Position.RowIndex; - AColumnColIndex := AColumn.Position.ColIndex; - - if AColumnRowIndex <> ARowIndex then - begin - if AColumnRowIndex <> -1 then - begin - APrevCount := Count; - Items[AColumnRowIndex].Delete(AColumnColIndex); - if (Count <> APrevCount) and (AColumnRowIndex < ARowIndex) then - Dec(ARowIndex); - end; - if ARowIndex <> -1 then - begin - if ARowIndex > Count then ARowIndex := Count; - if ARowIndex = Count then Count := ARowIndex + 1; - if AColIndex = -1 then - AColIndex := Items[ARowIndex].Count; - Items[ARowIndex].Insert(AColIndex, AColumn); - end; - end - else - if (ARowIndex <> -1) and (AColumnColIndex <> AColIndex) then - if AColumnColIndex = -1 then - Items[ARowIndex].Insert(AColIndex, AColumn) - else - if AColIndex = -1 then - Items[ARowIndex].Delete(AColumnColIndex) - else - Items[ARowIndex].Move(AColumnColIndex, AColIndex); - - GridView.RefreshVisibleItemsList; -end; - -{ TcxGridBandCustomOptions } - -constructor TcxGridBandCustomOptions.Create(ABand: TcxGridBand); -begin - inherited Create; - FBand := ABand; -end; - -procedure TcxGridBandCustomOptions.Changed(AChange: TcxGridBandChange); -begin - FBand.Changed(AChange); -end; - -procedure TcxGridBandCustomOptions.Assign(Source: TPersistent); -begin - if not (Source is TcxGridBandCustomOptions) then - inherited; -end; - -{ TcxGridBandOptions } - -constructor TcxGridBandOptions.Create(ABand: TcxGridBand); -begin - inherited; - FMoving := True; - FSizing := True; -end; - -procedure TcxGridBandOptions.SetHoldOwnColumnsOnly(Value: Boolean); -begin - if FHoldOwnColumnsOnly <> Value then - begin - FHoldOwnColumnsOnly := Value; - Changed(bcProperty); - end; -end; - -procedure TcxGridBandOptions.SetMoving(Value: Boolean); -begin - if FMoving <> Value then - begin - FMoving := Value; - Changed(bcProperty); - end; -end; - -procedure TcxGridBandOptions.SetSizing(Value: Boolean); -begin - if FSizing <> Value then - begin - FSizing := Value; - Changed(bcProperty); - end; -end; - -procedure TcxGridBandOptions.Assign(Source: TPersistent); -begin - if Source is TcxGridBandOptions then - with TcxGridBandOptions(Source) do - begin - Self.HoldOwnColumnsOnly := HoldOwnColumnsOnly; - Self.Moving := Moving; - Self.Sizing := Sizing; - end; - inherited; -end; - -{ TcxGridBandPosition } - -constructor TcxGridBandPosition.Create(ABand: TcxGridBand); -begin - inherited; - FBandIndex := -1; - FColIndex := -1; -end; - -function TcxGridBandPosition.GetBandIndex: Integer; -begin - if ParentBand = nil then - Result := -1 - else - Result := ParentBand.Index; -end; - -function TcxGridBandPosition.GetColIndex: Integer; -begin - if ParentBand = nil then - Result := FBand.RootIndex - else - Result := ParentBand.ColIndexOf(FBand); -end; - -function TcxGridBandPosition.GetGridView: TcxGridBandedTableView; -begin - Result := FBand.GridView; -end; - -function TcxGridBandPosition.GetParentBand: TcxGridBand; -begin - Result := FBand.ParentBand; -end; - -function TcxGridBandPosition.GetVisibleColIndex: Integer; -begin - if ParentBand = nil then - Result := FBand.VisibleRootIndex - else - Result := ParentBand.VisibleColIndexOf(FBand); -end; - -procedure TcxGridBandPosition.SetBandIndex(Value: Integer); -begin - if not FBand.IsDestroying and ((ParentBand = nil) or not ParentBand.IsDestroying) and - (FBand.IsLoading or FBand.IsUpdating or GridView.IsAssigningBands) then - begin - FBandIndex := Value; - if FBand.IsLoading or GridView.IsAssigningBands then Exit; - end; - if not CheckBandIndex(Value) then Exit; - if BandIndex <> Value then - begin - FBand.SaveVisible; - if not GridView.IsDestroying then - GridView.BeginUpdate; - try - if ParentBand <> nil then - ParentBand.RemoveBand(FBand); - if not GridView.IsDestroying and - (0 <= Value) and (Value < GridView.Bands.Count) then - GridView.Bands[Value].AddBand(FBand); - if not GridView.IsDestroying then - begin - GridView.Bands.RefreshRootItemsList; - GridView.Bands.RefreshVisibleItemsList; - end; - finally - if not GridView.IsDestroying then - GridView.EndUpdate; - FBand.CheckVisible; - Changed(bcProperty); - end; - end; -end; - -procedure TcxGridBandPosition.SetColIndex(Value: Integer); -begin - if FBand.IsLoading or FBand.IsUpdating or GridView.IsAssigningBands then - FColIndex := Value - else - if ColIndex <> Value then - if ParentBand = nil then - FBand.RootIndex := Value - else - begin - ParentBand.MoveBand(FBand, Value); - if FBand.ActuallyVisible then - GridView.Bands.RefreshVisibleBottomItemsList; - Changed(bcSize); - end; -end; - -function TcxGridBandPosition.IsColIndexStored: Boolean; -begin - Result := not Band.IsRoot; -end; - -function TcxGridBandPosition.CheckBandIndex(var Value: Integer): Boolean; -var - ABand: TcxGridBand; - AColIndex, I: Integer; -begin - Result := GridView.IsDestroying; - if Result then Exit; - Result := (Value = -1) or - (0 <= Value) and (Value < GridView.Bands.Count) and (FBand.Index <> Value); - if Result and (Value <> -1) then - begin - ABand := GridView.Bands[Value]; - Result := not ABand.HasAsParent(FBand); - if not Result then - begin - AColIndex := ColIndex; - GridView.BeginUpdate; - try - for I := FBand.ChildBandCount - 1 downto 0 do - with FBand.ChildBands[I].Position do - begin - BandIndex := Self.BandIndex; - ColIndex := AColIndex; - end; - Value := ABand.Index; - Result := True; - finally - GridView.EndUpdate; - end; - end; - end; -end; - -procedure TcxGridBandPosition.SaveParams; -begin - FBandIndex := BandIndex; - FColIndex := ColIndex; -end; - -procedure TcxGridBandPosition.Assign(Source: TPersistent); -begin - if Source is TcxGridBandPosition then - with TcxGridBandPosition(Source) do - begin - Self.BandIndex := BandIndex; - Self.ColIndex := ColIndex; - end; - inherited; -end; - -{ TcxGridBandStyles } - -function TcxGridBandStyles.GetBand: TcxGridBand; -begin - Result := TcxGridBand(GetOwner); -end; - -function TcxGridBandStyles.GetGridViewValue: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -procedure TcxGridBandStyles.SetOnGetHeaderStyle(Value: TcxGridBandGetHeaderStyle); -begin - if @FOnGetHeaderStyle <> @Value then - begin - FOnGetHeaderStyle := Value; - Band.Changed(bcProperty); - end; -end; - -procedure TcxGridBandStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - case Index of - bsBackground: - GridView.Styles.GetViewParams(vsBandBackground, AData, nil, AParams); - bsContent: - with TcxGridDataCellPos(AData) do - GridView.Styles.GetRecordContentParams(GridRecord, Item, AParams); - bsHeader: - GridView.Styles.GetBandHeaderParams(TcxGridBand(AData), AParams); - else - inherited; - end; -end; - -function TcxGridBandStyles.GetGridView: TcxCustomGridView; -begin - Result := Band.GridView; -end; - -procedure TcxGridBandStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridBandStyles then - with TcxGridBandStyles(Source) do - begin - Self.Background := Background; - Self.Content := Content; - Self.Header := Header; - Self.OnGetHeaderStyle := OnGetHeaderStyle; - end; -end; - -procedure TcxGridBandStyles.GetHeaderParams(out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if Assigned(FOnGetHeaderStyle) then - FOnGetHeaderStyle(GridView, Band, AStyle); - GetViewParams(bsHeader, Band, AStyle, AParams); -end; - -{ TcxGridBand } - -constructor TcxGridBand.Create(Collection: TCollection); -begin - inherited; - FChildBands := TList.Create; - FColumns := TList.Create; - FHeaderAlignmentHorz := taCenter; - FHeaderAlignmentVert := vaCenter; - FOptions := GetOptionsClass.Create(Self); - FPosition := TcxGridBandPosition.Create(Self); - FRows := TcxGridBandRows.Create(Self); - FStyles := GetStylesClass.Create(Self); - FVisible := True; - FVisibleChildBands := TList.Create; - FVisibleForCustomization := True; - Bands.AddItem(Self); -end; - -destructor TcxGridBand.Destroy; -var - ABands: TcxGridBands; - - procedure RemoveBands; - var - AColIndex, I: Integer; - begin - AColIndex := FPosition.ColIndex; - for I := ChildBandCount - 1 downto 0 do - with ChildBands[I].Position do - begin - BandIndex := FPosition.BandIndex; - ColIndex := AColIndex; - end; - end; - - procedure RemoveColumns; - var - I: Integer; - begin - for I := ColumnCount - 1 downto 0 do - Columns[I].Position.BandIndex := -1; - end; - -begin - if not (GridView.IsLoading or GridView.IsDestroying) and GridView.IsDesigning then - GridView.Controller.DesignController.UnselectObject(Self); - FIsDestroying := True; - ABands := Bands; - if not GridView.IsDestroying then - GridView.BeginUpdate; - try - RemoveBands; - RemoveColumns; - FPosition.BandIndex := -1; - finally - if not GridView.IsDestroying then - GridView.CancelUpdate; - end; - FVisibleChildBands.Free; - FStyles.Free; - FRows.Free; - FPosition.Free; - FOptions.Free; - FColumns.Free; - FChildBands.Free; - inherited; - ABands.RemoveItem(Self); -end; - -function TcxGridBand.GetBandLevelIndex: Integer; -var - ABand: TcxGridBand; -begin - Result := 0; - ABand := Self; - while ABand.ParentBand <> nil do - begin - Inc(Result); - ABand := ABand.ParentBand; - end; -end; - -function TcxGridBand.GetBands: TcxGridBands; -begin - Result := TcxGridBands(Collection); -end; - -function TcxGridBand.GetChildBand(Index: Integer): TcxGridBand; -begin - Result := TcxGridBand(FChildBands[Index]); -end; - -function TcxGridBand.GetChildBandCount: Integer; -begin - Result := FChildBands.Count; -end; - -function TcxGridBand.GetChildItem(Index: Integer): TObject; -begin - if IsBottom then - Result := Columns[Index] - else - Result := ChildBands[Index]; -end; - -function TcxGridBand.GetChildItemCount: Integer; -begin - if IsBottom then - Result := ColumnCount - else - Result := ChildBandCount; -end; - -function TcxGridBand.GetChildItemVisible(Index: Integer): Boolean; -var - AChildItem: TObject; -begin - AChildItem := ChildItems[Index]; - if AChildItem is TcxGridBand then - Result := TcxGridBand(AChildItem).SavedVisible - else - Result := TcxGridBandedColumn(AChildItem).SavedVisible; -end; - -function TcxGridBand.GetColumnCount: Integer; -begin - Result := FColumns.Count; -end; - -function TcxGridBand.GetColumn(Index: Integer): TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(FColumns[Index]); -end; - -function TcxGridBand.GetFirstChildBottomBand: TcxGridBand; -begin - if ChildBandCount = 0 then - Result := Self - else - begin - Result := ChildBands[0]; - while not Result.IsBottom do - Result := Result.ChildBands[0]; - end; -end; - -function TcxGridBand.GetFirstVisibleChildBottomBand: TcxGridBand; -begin - if VisibleChildBandCount = 0 then - Result := Self - else - begin - Result := VisibleChildBands[0]; - while not Result.IsVisibleBottom do - Result := Result.VisibleChildBands[0]; - end; -end; - -function TcxGridBand.GetGridView: TcxGridBandedTableView; -begin - if Bands = nil then - Result := nil - else - Result := Bands.GridView; -end; - -function TcxGridBand.GetHidden: Boolean; -begin - Result := not VisibleForCustomization; -end; - -function TcxGridBand.GetIsBottom: Boolean; -begin - Result := ChildBandCount = 0; -end; - -function TcxGridBand.GetIsEmpty: Boolean; -begin - if IsVisibleBottom then - Result := FRows.VisibleCount = 0 - else - Result := VisibleChildBandCount = 0; -end; - -function TcxGridBand.GetIsFirst: Boolean; -begin - Result := VisibleBottomIndex = 0; -end; - -function TcxGridBand.GetIsFirstNonEmpty: Boolean; -begin - Result := Bands.FirstVisibleNonEmpty = Self; -end; - -function TcxGridBand.GetIsLast: Boolean; -begin - Result := VisibleBottomIndex = Bands.VisibleBottomItemCount - 1; -end; - -function TcxGridBand.GetIsLastAsChild: Boolean; - - function GetVisibleBandCount: Integer; - begin - if FParentBand = nil then - Result := Bands.VisibleRootItemCount - else - Result := FParentBand.VisibleChildBandCount; - end; - -begin - Result := FPosition.VisibleColIndex = GetVisibleBandCount - 1; -end; - -function TcxGridBand.GetIsLastNonEmpty: Boolean; -begin - Result := Bands.LastVisibleNonEmpty = Self; -end; - -function TcxGridBand.GetIsLoading: Boolean; -begin - Result := not FIgnoreLoadingStatus and (GridView <> nil) and GridView.IsLoading; -end; - -function TcxGridBand.GetIsMostRight: Boolean; -begin - if IsRoot then - Result := IsLastAsChild - else - Result := FParentBand.IsMostRight and IsLastAsChild; -end; - -function TcxGridBand.GetIsRoot: Boolean; -begin - Result := FPosition.BandIndex = -1; -end; - -function TcxGridBand.GetIsUpdating: Boolean; -begin - Result := (GridView <> nil) and GridView.IsUpdating; -end; - -function TcxGridBand.GetIsVisibleBottom: Boolean; -begin - Result := VisibleChildBandCount = 0; -end; - -function TcxGridBand.GetMinWidth: Integer; -begin - if HasFixedWidth then - Result := FWidth - else - if IsEmpty then - Result := EmptyBandMinWidth - else - Result := 0; -end; - -function TcxGridBand.GetParentBandWithAssignedWidth: TcxGridBand; -begin - Result := FParentBand; - while Result <> nil do - begin - if Result.Width <> 0 then Break; - Result := Result.ParentBand; - end; -end; - -function TcxGridBand.GetRootIndex: Integer; -begin - if Bands.FRootItems = nil{GridView.IsDestroying} then - Result := -1 - else - Result := Bands.FRootItems.IndexOf(Self); {!!! optimize} -end; - -function TcxGridBand.GetRootParentBand: TcxGridBand; -begin - if IsRoot then - Result := nil - else - Result := GetParentInParent(nil); -end; - -function TcxGridBand.GetVisibleBandLevelCount: Integer; -var - I, AChildLevelCount: Integer; -begin - Result := 0; - for I := 0 to VisibleChildBandCount - 1 do - begin - AChildLevelCount := VisibleChildBands[I].VisibleBandLevelCount; - if Result < AChildLevelCount then Result := AChildLevelCount; - end; - Inc(Result); -end; - -function TcxGridBand.GetVisibleBottomIndex: Integer; -begin - Result := Bands.FVisibleBottomItems.IndexOf(Self); {!!!optimize} -end; - -function TcxGridBand.GetVisibleChildBand(Index: Integer): TcxGridBand; -begin - Result := TcxGridBand(FVisibleChildBands[Index]); -end; - -function TcxGridBand.GetVisibleChildBandCount: Integer; -begin - Result := FVisibleChildBands.Count; -end; - -function TcxGridBand.GetVisibleIndex: Integer; -begin - Result := Bands.FVisibleItems.IndexOf(Self); {!!!optimize} -end; - -function TcxGridBand.GetVisibleRootIndex: Integer; -begin - Result := Bands.FVisibleRootItems.IndexOf(Self); {!!!optimize} -end; - -function TcxGridBand.IsTagStored: Boolean; -begin - Result := Tag <> 0; -end; - -procedure TcxGridBand.SetCaption(const Value: string); -begin - if FCaption <> Value then - begin - FCaption := Value; - Changed(bcLayout); - end; -end; - -procedure TcxGridBand.SetFixedKind(Value: TcxGridBandFixedKind); -var - I: Integer; -begin - if FFixedKind <> Value then - begin - FFixedKind := Value; - GridView.BeginUpdate; - try - for I := 0 to ChildBandCount - 1 do - ChildBands[I].FixedKind := Value; - GridView.RefreshVisibleItemsList; - Bands.RefreshVisibleItemsList; - if not IsRoot and (FFixedKind <> FParentBand.FixedKind) then - FPosition.BandIndex := -1; - Changed(bcProperty); - finally - GridView.EndUpdate; - end; - end; -end; - -procedure TcxGridBand.SetHeaderAlignmentHorz(Value: TAlignment); -begin - if FHeaderAlignmentHorz <> Value then - begin - FHeaderAlignmentHorz := Value; - Changed(bcLayout); - end; -end; - -procedure TcxGridBand.SetHeaderAlignmentVert(Value: TcxAlignmentVert); -begin - if FHeaderAlignmentVert <> Value then - begin - FHeaderAlignmentVert := Value; - Changed(bcLayout); - end; -end; - -procedure TcxGridBand.SetHidden(Value: Boolean); -begin - VisibleForCustomization := not Value; -end; - -procedure TcxGridBand.SetOnHeaderClick(Value: TNotifyEvent); -begin - if @FOnHeaderClick <> @Value then - begin - FOnHeaderClick := Value; - Changed(bcProperty); - end; -end; - -procedure TcxGridBand.SetOnGetStoredProperties(Value: TcxGridBandGetStoredPropertiesEvent); -begin - if @FOnGetStoredProperties <> @Value then - begin - FOnGetStoredProperties := Value; - Changed(bcProperty); - end; -end; - -procedure TcxGridBand.SetOnGetStoredPropertyValue(Value: TcxGridBandGetStoredPropertyValueEvent); -begin - if @FOnGetStoredPropertyValue <> @Value then - begin - FOnGetStoredPropertyValue := Value; - Changed(bcProperty); - end; -end; - -procedure TcxGridBand.SetOnSetStoredPropertyValue(Value: TcxGridBandSetStoredPropertyValueEvent); -begin - if @FOnSetStoredPropertyValue <> @Value then - begin - FOnSetStoredPropertyValue := Value; - Changed(bcProperty); - end; -end; - -procedure TcxGridBand.SetOptions(Value: TcxGridBandOptions); -begin - FOptions.Assign(Value); -end; - -procedure TcxGridBand.SetPosition(Value: TcxGridBandPosition); -begin - FPosition.Assign(Value); -end; - -procedure TcxGridBand.SetRootIndex(Value: Integer); -begin - if not IsRoot or GridView.IsDestroying then Exit; - CheckItemIndexForInsert(Value, Bands.RootItemCount, True); - if RootIndex <> Value then - Index := Bands.RootItems[Value].Index; -end; - -procedure TcxGridBand.SetStyles(Value: TcxGridBandStyles); -begin - FStyles.Assign(Value); -end; - -procedure TcxGridBand.SetTag(Value: TcxTag); -begin - if FTag <> Value then - begin - FTag := Value; - Changed(bcProperty); - end; -end; - -procedure TcxGridBand.SetVisible(Value: Boolean); -{var - APrevParentIsVisibleBottom: Boolean;} -begin - if FVisible <> Value then - begin - GridView.BeginUpdate; - try - // APrevParentIsVisibleBottom := (FParentBand <> nil) and FParentBand.IsVisibleBottom; - SaveVisible; - FVisible := Value; - if FParentBand <> nil then - FParentBand.RefreshVisibleChildBandsList; - GridView.RefreshVisibleItemsList; - Bands.RefreshVisibleItemsList; - {if APrevParentIsVisibleBottom then - FParentBand.MoveColumns(Self);} - CheckVisible; - GridView.RefreshCustomizationForm; - Changed(bcProperty); - finally - GridView.EndUpdate; - end; - end; -end; - -procedure TcxGridBand.SetVisibleForCustomization(Value: Boolean); -begin - if FVisibleForCustomization <> Value then - begin - FVisibleForCustomization := Value; - VisibleForCustomizationChanged; - end; -end; - -procedure TcxGridBand.SetWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FWidth <> Value then - begin - FWidth := Value; - Changed(bcSize); - end; -end; - -procedure TcxGridBand.ReadHidden(Reader: TReader); -begin - Hidden := Reader.ReadBoolean; -end; - -procedure TcxGridBand.AddBand(ABand: TcxGridBand); -var - APrevIsBottom{, APrevIsVisibleBottom}: Boolean; -begin - APrevIsBottom := IsBottom; - //APrevIsVisibleBottom := IsVisibleBottom; - SaveColumnsVisibles; - ABand.FParentBand := Self; - FChildBands.Add(ABand); - RefreshVisibleChildBandsList; - if APrevIsBottom then - begin - Bands.RefreshBottomItemsList; - MoveColumns(FirstChildBottomBand); - end - {else - if APrevIsVisibleBottom and not IsVisibleBottom then - MoveColumns(FirstVisibleChildBottomBand)}; - ABand.FixedKind := FFixedKind; -end; - -procedure TcxGridBand.RemoveBand(ABand: TcxGridBand); -begin - ABand.FParentBand := nil; - FChildBands.Remove(ABand); - RefreshVisibleChildBandsList; - if IsBottom then - Bands.RefreshBottomItemsList; -end; - -procedure TcxGridBand.RefreshVisibleChildBandsList; -var - I: Integer; - ABand: TcxGridBand; -begin - FVisibleChildBands.Clear; - for I := 0 to ChildBandCount - 1 do - begin - ABand := ChildBands[I]; - if ABand.Visible then FVisibleChildBands.Add(ABand); - end; -end; - -procedure TcxGridBand.AddColumn(AColumn: TcxGridBandedColumn); -begin - FColumns.Add(AColumn); - AColumn.Position.SetBand(Self); - AColumn.Position.RowIndex := 0; -end; - -procedure TcxGridBand.RemoveColumn(AColumn: TcxGridBandedColumn); -begin - MoveColumn(AColumn, -1, -1); - AColumn.Position.SetBand(nil); - FColumns.Remove(AColumn); -end; - -procedure TcxGridBand.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('Hidden', ReadHidden, nil, True); -end; - -function TcxGridBand.GetObjectName: string; -begin - Result := 'Band' + IntToStr(ID{Index}); -end; - -function TcxGridBand.GetProperties(AProperties: TStrings): Boolean; -begin - with AProperties do - begin - Add('Width'); - Add('Visible'); - Add('Index'); - Add('BandIndex'); - Add('ColIndex'); - end; - if Assigned(FOnGetStoredProperties) then - FOnGetStoredProperties(Self, AProperties); - Result := True; -end; - -procedure TcxGridBand.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'Width' then - AValue := Width - else - if AName = 'Visible' then - AValue := Visible - else - if AName = 'Index' then - AValue := Index - else - if AName = 'BandIndex' then - AValue := FPosition.BandIndex - else - if AName = 'ColIndex' then - AValue := FPosition.ColIndex - else - if Assigned(FOnGetStoredPropertyValue) then - FOnGetStoredPropertyValue(Self, AName, AValue); -end; - -procedure TcxGridBand.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'Width' then - Width := AValue - else - if AName = 'Visible' then - Visible := AValue - else - if AName = 'Index' then - Index := AValue - else - if AName = 'BandIndex' then - FPosition.FBandIndex := AValue - else - if AName = 'ColIndex' then - FPosition.FColIndex := AValue - else - if Assigned(FOnSetStoredPropertyValue) then - FOnSetStoredPropertyValue(Self, AName, AValue); -end; - -procedure TcxGridBand.AssignChildBandWidths; -begin - GridView.ViewInfo.HeaderViewInfo.BandsViewInfo[VisibleIndex].AssignChildBandWidths; -end; - -procedure TcxGridBand.AssignColumnWidths; -begin - GridView.ViewInfo.HeaderViewInfo.BandsViewInfo[VisibleIndex].AssignColumnWidths; -end; - -function TcxGridBand.CanHide: Boolean; -begin - Result := (Bands.VisibleRootItemCount > 1) or not IsRoot; -end; - -function TcxGridBand.CanMove: Boolean; -begin - Result := GridView.IsDesigning or GridView.OptionsCustomize.BandMoving and FOptions.Moving; -end; - -function TcxGridBand.CanSize: Boolean; -begin - Result := not HasFixedWidth and GridView.OptionsCustomize.BandSizing; -end; - -procedure TcxGridBand.Changed(AChange: TcxGridBandChange); -begin - if GridView <> nil then - GridView.Changed(TcxGridViewChangeKind(AChange)); -end; - -procedure TcxGridBand.ForceWidth(Value: Integer); - - procedure AssignBandWidths; - - procedure AssignBandWidths; - var - ABand: TcxGridBand; - begin - ABand := FParentBand; - while ABand <> nil do - begin - ABand.AssignChildBandWidths; - ABand := ABand.ParentBand; - end; - GridView.ViewInfo.HeaderViewInfo.BandsViewInfo.AssignRootItemWidths; - end; - - begin - with GridView do - begin - BeginUpdate; - try - if HasParentWithAssignedWidth then - FParentBand.AssignChildBandWidths; - if OptionsView.ColumnAutoWidth then - AssignBandWidths; - finally - EndUpdate; - end; - end; - end; - -begin - AssignBandWidths; - GridView.Controller.ForcingWidthBand := Self; - try - Width := Value; - finally - GridView.Controller.ForcingWidthBand := nil; - end; - AssignBandWidths; - Changed(bcSize); -end; - -function TcxGridBand.GetActuallyVisible: Boolean; -begin - Result := FVisible and ((FParentBand = nil) or FParentBand.ActuallyVisible); -end; - -function TcxGridBand.GetDisplayName: string; -begin - Result := Caption; - if Result = '' then - Result := ''; -end; - -function TcxGridBand.GetFixed: Boolean; -begin - with GridView.Controller do - Result := HasFixedWidth or - (ForcingWidthBand <> nil) and IsBandFixedDuringSizing(Self) or - (ForcingWidthItem <> nil) and - (TcxGridBandedColumn(ForcingWidthItem).Position.Band.ParentBandWithAssignedWidth = Self); -end; - -function TcxGridBand.GetParentInParent(ABand: TcxGridBand): TcxGridBand; -var - AParentBand: TcxGridBand; - AFound: Boolean; -begin - AParentBand := Self; - repeat - Result := AParentBand; - AParentBand := AParentBand.ParentBand; - AFound := AParentBand = ABand; - until (AParentBand = nil) or AFound; - if not AFound then Result := nil; -end; - -function TcxGridBand.HasFixedWidth: Boolean; -begin - Result := not FOptions.Sizing; -end; - -function TcxGridBand.HasParentWithAssignedWidth: Boolean; -begin - Result := ParentBandWithAssignedWidth <> nil; -end; - -function TcxGridBand.ColIndexOf(ABand: TcxGridBand): Integer; -begin - Result := FChildBands.IndexOf(ABand); -end; - -procedure TcxGridBand.MoveBandsToRoot; -var - AColIndex, I: Integer; -begin - if RootParentBand = nil then - AColIndex := FPosition.ColIndex + 1 - else - AColIndex := RootParentBand.Position.ColIndex + 1; - GridView.BeginUpdate; - try - for I := ChildBandCount - 1 downto 0 do - with ChildBands[I].Position do - begin - BandIndex := -1; - ColIndex := AColIndex; - end; - finally - GridView.EndUpdate; - end; -end; - -procedure TcxGridBand.SetIndex(Value: Integer); -var - APrevIndex: Integer; -begin - APrevIndex := Index; - inherited; - if Index <> APrevIndex then - begin - if Visible then Bands.RefreshVisibleItemsList; - Bands.RefreshRootItemsList; - Bands.RefreshBottomItemsList; - Changed(bcProperty); - end; -end; - -function TcxGridBand.VisibleColIndexOf(ABand: TcxGridBand): Integer; -begin - Result := FVisibleChildBands.IndexOf(ABand); -end; - -procedure TcxGridBand.VisibleForCustomizationChanged; -begin - GridView.RefreshCustomizationForm; - Changed(bcProperty); -end; - -procedure TcxGridBand.CheckChildrenVisibles; -var - I: Integer; - AChildItem: TObject; -begin - for I := 0 to ChildItemCount - 1 do - begin - AChildItem := ChildItems[I]; - if AChildItem is TcxGridBand then - TcxGridBand(AChildItem).CheckVisible - else - TcxGridBandedColumn(AChildItem).CheckVisible; - end; -end; - -procedure TcxGridBand.CheckVisible; -begin - if ActuallyVisible <> FSavedVisible then - begin - Bands.BandVisibilityChanged(Self, ActuallyVisible); - CheckChildrenVisibles; - end; -end; - -procedure TcxGridBand.SaveChildrenVisibles; -var - I: Integer; - AChildItem: TObject; -begin - for I := 0 to ChildItemCount - 1 do - begin - AChildItem := ChildItems[I]; - if AChildItem is TcxGridBand then - TcxGridBand(AChildItem).SaveVisible - else - TcxGridBandedColumn(AChildItem).SaveVisible; - end; -end; - -procedure TcxGridBand.SaveColumnsVisibles; -var - I: Integer; -begin - for I := 0 to ColumnCount - 1 do - Columns[I].SaveVisible; -end; - -procedure TcxGridBand.SaveVisible; -begin - FSavedVisible := ActuallyVisible; - SaveChildrenVisibles; -end; - -function TcxGridBand.GetOptionsClass: TcxGridBandOptionsClass; -begin - Result := TcxGridBandOptions; -end; - -function TcxGridBand.GetStylesClass: TcxGridBandStylesClass; -begin - Result := TcxGridBandStyles; -end; - -procedure TcxGridBand.DoHeaderClick; -begin - if Assigned(FOnHeaderClick) then FOnHeaderClick(Self); -end; - -procedure TcxGridBand.Assign(Source: TPersistent); -begin - if Source is TcxGridBand then - with TcxGridBand(Source) do - begin - Self.HeaderAlignmentHorz := HeaderAlignmentHorz; - Self.HeaderAlignmentVert := HeaderAlignmentVert; - Self.Caption := Caption; - Self.FixedKind := FixedKind; - Self.Options := Options; - Self.Position := Position; - Self.Styles := Styles; - Self.Tag := Tag; - Self.Visible := Visible; - Self.VisibleForCustomization := VisibleForCustomization; - Self.Width := Width; - Self.OnHeaderClick := OnHeaderClick; - Self.OnGetStoredProperties := OnGetStoredProperties; - Self.OnGetStoredPropertyValue := OnGetStoredPropertyValue; - Self.OnSetStoredPropertyValue := OnSetStoredPropertyValue; - end - else - inherited; -end; - -procedure TcxGridBand.ApplyBestFit(ACheckSizingAbility: Boolean = False; - AFireEvents: Boolean = False); -var - I, ABestFitWidth: Integer; - AViewInfo: TcxGridBandViewInfo; -begin - if ACheckSizingAbility and not CanSize then Exit; - Width := 0; - if IsBottom then - FRows.ApplyBestFit(ACheckSizingAbility, AFireEvents) - else - for I := 0 to VisibleChildBandCount - 1 do - VisibleChildBands[I].ApplyBestFit(ACheckSizingAbility, AFireEvents); - if GridView.OptionsView.BandHeaders and ActuallyVisible and GridView.Visible then - begin - AViewInfo := GridView.ViewInfo.HeaderViewInfo.BandsViewInfo[VisibleIndex]; - ABestFitWidth := AViewInfo.HeaderViewInfo.GetBestFitWidth; - if ABestFitWidth > AViewInfo.ContentWidth then - ForceWidth(ABestFitWidth); - end; - GridView.Controller.DesignerModified; -end; - -function TcxGridBand.HasAsParent(ABand: TcxGridBand): Boolean; -begin - Result := GetParentInParent(ABand) <> nil; -end; - -procedure TcxGridBand.MoveBand(ABand: TcxGridBand; AColIndex: Integer); -begin - ABand.Position.BandIndex := Index; - CheckItemIndexForInsert(AColIndex, FChildBands.Count, True); - FChildBands.Move(ABand.Position.ColIndex, AColIndex); - RefreshVisibleChildBandsList; -end; - -procedure TcxGridBand.MoveColumn(AColumn: TcxGridBandedColumn; ARowIndex, AColIndex: Integer); -begin - AColumn.Position.BandIndex := Index; - FRows.MoveColumn(AColumn, ARowIndex, AColIndex); -end; - -procedure TcxGridBand.MoveColumns(ABand: TcxGridBand); -var - I, J: Integer; -begin - if ABand = nil then Exit; - for I := 0 to Rows.Count - 1 do - for J := 0 to Rows[0].Count - 1 do - ABand.MoveColumn(Rows[0][0], I, J); -end; - -{ TcxGridBands } - -constructor TcxGridBands.Create(AGridView: TcxGridBandedTableView); -begin - inherited Create(AGridView, GetBandClass); - FGridView := AGridView; - FBottomItems := TList.Create; - FRootItems := TList.Create; - FVisibleBottomItems := TList.Create; - FVisibleItems := TList.Create; - FVisibleRootItems := TList.Create; -end; - -destructor TcxGridBands.Destroy; -begin - FreeAndNil(FVisibleRootItems); - FreeAndNil(FVisibleItems); - FreeAndNil(FVisibleBottomItems); - FreeAndNil(FRootItems); - FreeAndNil(FBottomItems); - inherited; -end; - -function TcxGridBands.GetBottomItem(Index: Integer): TcxGridBand; -begin - Result := TcxGridBand(FBottomItems[Index]); -end; - -function TcxGridBands.GetBottomItemCount: Integer; -begin - Result := FBottomItems.Count; -end; - -function TcxGridBands.GetFirstVisibleNonEmpty: TcxGridBand; -var - I: Integer; -begin - for I := 0 to VisibleBottomItemCount - 1 do - begin - Result := VisibleBottomItems[I]; - if Result.Rows.VisibleCount <> 0 then Exit; - end; - Result := nil; -end; - -function TcxGridBands.GetItem(Index: Integer): TcxGridBand; -begin - Result := TcxGridBand(inherited GetItem(Index)); -end; - -function TcxGridBands.GetLastVisibleNonEmpty: TcxGridBand; -var - I: Integer; -begin - for I := VisibleBottomItemCount - 1 downto 0 do - begin - Result := VisibleBottomItems[I]; - if Result.Rows.VisibleCount <> 0 then Exit; - end; - Result := nil; -end; - -function TcxGridBands.GetLayout: TcxGridBandsLayout; -begin - if (VisibleLeftFixedCount <> 0) and (VisibleRightFixedCount <> 0) then - Result := blLeftRightFixed - else - if VisibleLeftFixedCount <> 0 then - Result := blLeftFixed - else - if VisibleRightFixedCount <> 0 then - Result := blRightFixed - else - Result := blNonFixed; -end; - -function TcxGridBands.GetLineCount: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to VisibleBottomItemCount - 1 do - Result := Max(Result, VisibleBottomItems[I].Rows.LineCount); -end; - -function TcxGridBands.GetRootItem(Index: Integer): TcxGridBand; -begin - Result := TcxGridBand(FRootItems[Index]); -end; - -function TcxGridBands.GetRootItemCount: Integer; -begin - Result := FRootItems.Count; -end; - -function TcxGridBands.GetVisibleBottomItem(Index: Integer): TcxGridBand; -begin - Result := TcxGridBand(FVisibleBottomItems[Index]); -end; - -function TcxGridBands.GetVisibleBottomItemCount: Integer; -begin - Result := FVisibleBottomItems.Count; -end; - -function TcxGridBands.GetVisibleCount: Integer; -begin - Result := FVisibleItems.Count; -end; - -function TcxGridBands.GetVisibleItem(Index: Integer): TcxGridBand; -begin - Result := TcxGridBand(FVisibleItems[Index]); -end; - -function TcxGridBands.GetVisibleRootItem(Index: Integer): TcxGridBand; -begin - Result := TcxGridBand(FVisibleRootItems[Index]); -end; - -function TcxGridBands.GetVisibleRootItemCount: Integer; -begin - Result := FVisibleRootItems.Count; -end; - -function TcxGridBands.GetVisibleRowCount: Integer; -var - I, ACount: Integer; -begin - Result := 0; - for I := 0 to VisibleBottomItemCount - 1 do - begin - ACount := VisibleBottomItems[I].Rows.VisibleCount; - if ACount > Result then Result := ACount; - end; -end; - -procedure TcxGridBands.SetItem(Index: Integer; Value: TcxGridBand); -begin - inherited SetItem(Index, Value); -end; - -procedure TcxGridBands.AddItem(AItem: TcxGridBand); -begin - AItem.FID := GetNextID; - RefreshVisibleItemsList; - RefreshRootItemsList; - RefreshBottomItemsList; - GridView.RefreshCustomizationForm; - GridView.Synchronize; -end; - -procedure TcxGridBands.RemoveItem(AItem: TcxGridBand); -begin - ReleaseID(AItem.ID); - RefreshVisibleItemsList; - RefreshRootItemsList; - RefreshBottomItemsList; - GridView.RefreshCustomizationForm; - GridView.Synchronize; -end; - -procedure TcxGridBands.RefreshBottomItemsList; -var - I: Integer; - AItem: TcxGridBand; -begin - if FBottomItems = nil then Exit; - FBottomItems.Clear; - for I := 0 to Count - 1 do - begin - AItem := Items[I]; - if AItem.IsBottom then FBottomItems.Add(AItem); - end; -end; - -procedure TcxGridBands.RefreshRootItemsList; -var - I: Integer; - AItem: TcxGridBand; -begin - if FRootItems = nil then Exit; - FRootItems.Clear; - for I := 0 to Count - 1 do - begin - AItem := Items[I]; - if AItem.IsRoot then FRootItems.Add(AItem); - end; -end; - -procedure TcxGridBands.RefreshVisibleBottomItemsList; -var - I: Integer; - - procedure AddBottomItems(ABand: TcxGridBand); - var - I: Integer; - begin - if ABand.IsVisibleBottom then - FVisibleBottomItems.Add(ABand) - else - for I := 0 to ABand.VisibleChildBandCount - 1 do - AddBottomItems(ABand.VisibleChildBands[I]); - end; - -begin - if FVisibleBottomItems = nil then Exit; - FVisibleBottomItems.Clear; - for I := 0 to VisibleRootItemCount - 1 do - AddBottomItems(VisibleRootItems[I]); -end; - -procedure TcxGridBands.RefreshVisibleItemsList; -var - I: Integer; -begin - if FVisibleItems = nil then Exit; - FVisibleItems.Clear; - FVisibleLeftFixedCount := 0; - FVisibleRightFixedCount := 0; - for I := 0 to Count - 1 do - if Items[I].ActuallyVisible then - begin - FVisibleItems.Add(Items[I]); - case Items[I].FixedKind of - fkNone: - FVisibleItems.Move(VisibleCount - 1, VisibleCount - 1 - FVisibleRightFixedCount); - fkLeft: - begin - FVisibleItems.Move(VisibleCount - 1, FVisibleLeftFixedCount); - Inc(FVisibleLeftFixedCount); - end; - fkRight: - Inc(FVisibleRightFixedCount); - end; - end; - RefreshVisibleRootItemsList; - RefreshVisibleBottomItemsList; - GridView.RefreshVisibleItemsList; - GridView.SizeChanged; -end; - -procedure TcxGridBands.RefreshVisibleRootItemsList; -var - I: Integer; - AItem: TcxGridBand; -begin - if FVisibleRootItems = nil then Exit; - FVisibleRootItems.Clear; - FVisibleRootLeftFixedCount := 0; - FVisibleRootRightFixedCount := 0; - for I := 0 to VisibleCount - 1 do - begin - AItem := VisibleItems[I]; - if AItem.IsRoot then - begin - FVisibleRootItems.Add(AItem); - case AItem.FixedKind of - fkLeft: - Inc(FVisibleRootLeftFixedCount); - fkRight: - Inc(FVisibleRootRightFixedCount); - end; - end; - end; -end; - -function TcxGridBands.GetObjectName: string; -begin - Result := 'Bands'; -end; - -function TcxGridBands.GetProperties(AProperties: TStrings): Boolean; -begin - Result := True; -end; - -procedure TcxGridBands.GetPropertyValue(const AName: string; var AValue: Variant); -begin -end; - -procedure TcxGridBands.SetPropertyValue(const AName: string; const AValue: Variant); -begin -end; - -function TcxGridBands.CreateChild(const AObjectName, AClassName: string): TObject; -begin - if AClassName = 'TcxGridBand' then - Result := Add - else - Result := nil; -end; - -procedure TcxGridBands.DeleteChild(const AObjectName: string; AObject: TObject); -begin - AObject.Free; -end; - -procedure TcxGridBands.GetChildren(AChildren: TStringList); -var - I: Integer; -begin - for I := 0 to Count - 1 do - AChildren.AddObject('', Items[I]); -end; - -procedure TcxGridBands.BandVisibilityChanged(ABand: TcxGridBand; Value: Boolean); -begin -end; - -function TcxGridBands.GetBandClass: TcxGridBandClass; -begin - Result := TcxGridBand; -end; - -function TcxGridBands.GetNextID: Integer; -begin - Result := FNextID; - Inc(FNextID); -end; - -procedure TcxGridBands.ReleaseID(AID: Integer); -begin - if AID = FNextID - 1 then Dec(FNextID); -end; - -function TcxGridBands.Add: TcxGridBand; -begin - Result := TcxGridBand(inherited Add); -end; - -function TcxGridBands.AreNested: Boolean; -begin - Result := Count <> BottomItemCount; -end; - -procedure TcxGridBands.Assign(Source: TPersistent); -var - I: Integer; - ASource: TcxGridBands; - AItem: TcxGridBand; -begin - ASource := Source as TcxGridBands; - GridView.BeginAssignBands; - try - for I := 0 to ASource.Count - 1 do - begin - AItem := FindItemID(ASource[I].ID); - if AItem = nil then - begin - AItem := Add; - AItem.FID := ASource[I].ID; - end; - AItem.Index := I; - AItem.Assign(ASource[I]); - end; - for I := Count - 1 downto ASource.Count do - Delete(I); - finally - GridView.EndAssignBands; - end; - FNextID := ASource.NextID; -end; - -procedure TcxGridBands.Clear; -begin - inherited; - FNextID := 0; -end; - -function TcxGridBands.FindItemID(AID: Integer): TcxGridBand; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.ID = AID then Exit; - end; - Result := nil; -end; - -function TcxGridBands.GetFirstVisibleIndex(AFixedKind: TcxGridBandFixedKind): Integer; -begin - case AFixedKind of - fkLeft: - Result := 0; - fkNone: - Result := VisibleLeftFixedCount; - fkRight: - Result := VisibleCount - VisibleRightFixedCount; - else - Result := -1; - end; -end; - -function TcxGridBands.GetFirstVisibleRootIndex(AFixedKind: TcxGridBandFixedKind): Integer; -begin - case AFixedKind of - fkLeft: - Result := 0; - fkNone: - Result := VisibleRootLeftFixedCount; - fkRight: - Result := VisibleRootItemCount - VisibleRootRightFixedCount; - else - Result := -1; - end; -end; - -function TcxGridBands.GetLastVisibleIndex(AFixedKind: TcxGridBandFixedKind): Integer; -begin - case AFixedKind of - fkLeft: - Result := GetFirstVisibleIndex(fkNone) - 1; - fkNone: - Result := GetFirstVisibleIndex(fkRight) - 1; - fkRight: - Result := VisibleCount - 1; - else - Result := -1; - end; -end; - -function TcxGridBands.GetLastVisibleRootIndex(AFixedKind: TcxGridBandFixedKind): Integer; -begin - case AFixedKind of - fkLeft: - Result := GetFirstVisibleRootIndex(fkNone) - 1; - fkNone: - Result := GetFirstVisibleRootIndex(fkRight) - 1; - fkRight: - Result := VisibleRootItemCount - 1; - else - Result := -1; - end; -end; - -function TcxGridBands.HaveFixedItems: Boolean; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I].FixedKind <> fkNone; - if Result then Exit; - end; - Result := False; -end; - -{ TcxGridBandedTableBackgroundBitmaps } - -function TcxGridBandedTableBackgroundBitmaps.GetBitmapStyleIndex(Index: Integer): Integer; -begin - case Index of - bbBandBackground: - Result := vsBandBackground; - bbBandHeader: - Result := vsBandHeader; - else - Result := inherited GetBitmapStyleIndex(Index); - end; -end; - -procedure TcxGridBandedTableBackgroundBitmaps.Assign(Source: TPersistent); -begin - if Source is TcxGridBandedTableBackgroundBitmaps then - with TcxGridBandedTableBackgroundBitmaps(Source) do - begin - Self.BandBackground := BandBackground; - Self.BandHeader := BandHeader; - end; - inherited; -end; - -{ TcxGridBandedTableOptionsBehavior } - -constructor TcxGridBandedTableOptionsBehavior.Create(AGridView: TcxCustomGridView); -begin - inherited; - FBandHeaderHints := True; -end; - -procedure TcxGridBandedTableOptionsBehavior.SetBandHeaderHints(Value: Boolean); -begin - if FBandHeaderHints <> Value then - begin - FBandHeaderHints := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridBandedTableOptionsBehavior.Assign(Source: TPersistent); -begin - if Source is TcxGridBandedTableOptionsBehavior then - with TcxGridBandedTableOptionsBehavior(Source) do - Self.BandHeaderHints := BandHeaderHints; - inherited; -end; - -{ TcxGridBandedTableOptionsCustomize } - -constructor TcxGridBandedTableOptionsCustomize.Create(AGridView: TcxCustomGridView); -begin - inherited; - FBandMoving := True; - FBandSizing := True; - FColumnVertSizing := True; - FNestedBands := True; -end; - -function TcxGridBandedTableOptionsCustomize.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -procedure TcxGridBandedTableOptionsCustomize.SetBandHiding(Value: Boolean); -begin - if FBandHiding <> Value then - begin - FBandHiding := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridBandedTableOptionsCustomize.SetBandMoving(Value: Boolean); -begin - if FBandMoving <> Value then - begin - FBandMoving := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridBandedTableOptionsCustomize.SetBandSizing(Value: Boolean); -begin - if FBandSizing <> Value then - begin - FBandSizing := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridBandedTableOptionsCustomize.SetBandsQuickCustomization(Value: Boolean); -begin - if FBandsQuickCustomization <> Value then - begin - FBandsQuickCustomization := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridBandedTableOptionsCustomize.SetBandsQuickCustomizationMaxDropDownCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FBandsQuickCustomizationMaxDropDownCount <> Value then - begin - FBandsQuickCustomizationMaxDropDownCount := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridBandedTableOptionsCustomize.SetBandsQuickCustomizationReordering(Value: TcxGridQuickCustomizationReordering); -begin - if FBandsQuickCustomizationReordering <> Value then - begin - FBandsQuickCustomizationReordering := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridBandedTableOptionsCustomize.SetColumnVertSizing(Value: Boolean); -begin - if FColumnVertSizing <> Value then - begin - FColumnVertSizing := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridBandedTableOptionsCustomize.SetNestedBands(Value: Boolean); -begin - if FNestedBands <> Value then - begin - FNestedBands := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridBandedTableOptionsCustomize.Assign(Source: TPersistent); -begin - if Source is TcxGridBandedTableOptionsCustomize then - with TcxGridBandedTableOptionsCustomize(Source) do - begin - Self.BandHiding := BandHiding; - Self.BandMoving := BandMoving; - Self.BandSizing := BandSizing; - Self.BandsQuickCustomization := BandsQuickCustomization; - Self.BandsQuickCustomizationMaxDropDownCount := BandsQuickCustomizationMaxDropDownCount; - Self.BandsQuickCustomizationReordering := BandsQuickCustomizationReordering; - Self.ColumnVertSizing := ColumnVertSizing; - Self.NestedBands := NestedBands; - end; - inherited; -end; - -function TcxGridBandedTableOptionsCustomize.SupportsBandsQuickCustomizationReordering: Boolean; -begin - Result := not GridView.Bands.AreNested and not GridView.Bands.HaveFixedItems and - (GridView.IsDesigning or - (BandsQuickCustomizationReordering = qcrEnabled) or - (BandsQuickCustomizationReordering = qcrDefault) and BandMoving); -end; - -function TcxGridBandedTableOptionsCustomize.SupportsItemsQuickCustomizationReordering: Boolean; -begin - Result := False; -end; - -{ TcxGridBandedTableOptionsView } - -constructor TcxGridBandedTableOptionsView.Create(AGridView: TcxCustomGridView); -begin - inherited; - FBandHeaderLineCount := 1; - FBandHeaders := True; - FFixedBandSeparatorColor := clDefault; - FFixedBandSeparatorWidth := cxGridDefaultFixedBandSeparatorWidth; -end; - -function TcxGridBandedTableOptionsView.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -procedure TcxGridBandedTableOptionsView.SetBandCaptionsInColumnAlternateCaption(Value: Boolean); -begin - if FBandCaptionsInColumnAlternateCaption <> Value then - begin - FBandCaptionsInColumnAlternateCaption := Value; - GridView.ItemCaptionChanged(nil); - end; -end; - -procedure TcxGridBandedTableOptionsView.SetBandHeaderEndEllipsis(Value: Boolean); -begin - if FBandHeaderEndEllipsis <> Value then - begin - FBandHeaderEndEllipsis := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridBandedTableOptionsView.SetBandHeaderHeight(Value: Integer); -begin - if Value < 0 then Value := 0; - if FBandHeaderHeight <> Value then - begin - FBandHeaderHeight := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridBandedTableOptionsView.SetBandHeaderLineCount(Value: Integer); -begin - if Value < 1 then Value := 1; - if FBandHeaderLineCount <> Value then - begin - FBandHeaderLineCount := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridBandedTableOptionsView.SetBandHeaders(Value: Boolean); -begin - if FBandHeaders <> Value then - begin - FBandHeaders := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridBandedTableOptionsView.SetFixedBandSeparatorColor(Value: TColor); -begin - if FFixedBandSeparatorColor <> Value then - begin - FFixedBandSeparatorColor := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridBandedTableOptionsView.SetFixedBandSeparatorWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FFixedBandSeparatorWidth <> Value then - begin - FFixedBandSeparatorWidth := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridBandedTableOptionsView.Assign(Source: TPersistent); -begin - if Source is TcxGridBandedTableOptionsView then - with TcxGridBandedTableOptionsView(Source) do - begin - Self.BandCaptionsInColumnAlternateCaption := BandCaptionsInColumnAlternateCaption; - Self.BandHeaderEndEllipsis := BandHeaderEndEllipsis; - Self.BandHeaderHeight := BandHeaderHeight; - Self.BandHeaderLineCount := BandHeaderLineCount; - Self.BandHeaders := BandHeaders; - Self.FixedBandSeparatorColor := FixedBandSeparatorColor; - Self.FixedBandSeparatorWidth := FixedBandSeparatorWidth; - end; - inherited; -end; - -function TcxGridBandedTableOptionsView.GetFixedBandSeparatorColor: TColor; -begin - Result := FFixedBandSeparatorColor; - if Result = clDefault then - Result := LookAndFeelPainter.DefaultFixedSeparatorColor; -end; - -{ TcxGridBandedTableViewStyles } - -function TcxGridBandedTableViewStyles.GetGridViewValue: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -procedure TcxGridBandedTableViewStyles.SetOnGetBandHeaderStyle(Value: TcxGridBandGetHeaderStyle); -begin - if @FOnGetBandHeaderStyle <> @Value then - begin - FOnGetBandHeaderStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridBandedTableViewStyles.GetDefaultViewParams(Index: Integer; - AData: TObject; out AParams: TcxViewParams); -begin - inherited; - with AParams, LookAndFeelPainter do - case Index of - vsBandBackground: - begin - Color := DefaultHeaderBackgroundColor; - TextColor := DefaultHeaderBackgroundTextColor; - end; - vsBandHeader: - begin - Color := DefaultHeaderColor; - TextColor := DefaultHeaderTextColor; - end; - end; -end; - -procedure TcxGridBandedTableViewStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridBandedTableViewStyles then - with TcxGridBandedTableViewStyles(Source) do - begin - Self.BandBackground := BandBackground; - Self.BandHeader := BandHeader; - Self.OnGetBandHeaderStyle := OnGetBandHeaderStyle; - end; -end; - -procedure TcxGridBandedTableViewStyles.GetBandHeaderParams(ABand: TcxGridBand; - out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if Assigned(FOnGetBandHeaderStyle) then - FOnGetBandHeaderStyle(GridView, ABand, AStyle); - GetViewParams(vsBandHeader, ABand, AStyle, AParams); -end; - -{ TcxGridBandedTableViewStyleSheet } - -function TcxGridBandedTableViewStyleSheet.GetStylesValue: TcxGridBandedTableViewStyles; -begin - Result := TcxGridBandedTableViewStyles(GetStyles); -end; - -procedure TcxGridBandedTableViewStyleSheet.SetStylesValue(Value: TcxGridBandedTableViewStyles); -begin - SetStyles(Value); -end; - -class function TcxGridBandedTableViewStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxGridBandedTableViewStyles; -end; - -{ TcxGridBandedTableView } - -function TcxGridBandedTableView.GetBackgroundBitmaps: TcxGridBandedTableBackgroundBitmaps; -begin - Result := TcxGridBandedTableBackgroundBitmaps(inherited BackgroundBitmaps); -end; - -function TcxGridBandedTableView.GetColumn(Index: Integer): TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(inherited Columns[Index]); -end; - -function TcxGridBandedTableView.GetController: TcxGridBandedTableController; -begin - Result := TcxGridBandedTableController(inherited Controller); -end; - -function TcxGridBandedTableView.GetGroupedColumn(Index: Integer): TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(inherited GroupedColumns[Index]); -end; - -function TcxGridBandedTableView.GetOptionsBehavior: TcxGridBandedTableOptionsBehavior; -begin - Result := TcxGridBandedTableOptionsBehavior(inherited OptionsBehavior); -end; - -function TcxGridBandedTableView.GetOptionsCustomize: TcxGridBandedTableOptionsCustomize; -begin - Result := TcxGridBandedTableOptionsCustomize(inherited OptionsCustomize); -end; - -function TcxGridBandedTableView.GetOptionsView: TcxGridBandedTableOptionsView; -begin - Result := TcxGridBandedTableOptionsView(inherited OptionsView); -end; - -function TcxGridBandedTableView.GetStyles: TcxGridBandedTableViewStyles; -begin - Result := TcxGridBandedTableViewStyles(inherited Styles); -end; - -function TcxGridBandedTableView.GetViewInfo: TcxGridBandedTableViewInfo; -begin - Result := TcxGridBandedTableViewInfo(inherited ViewInfo); -end; - -function TcxGridBandedTableView.GetVisibleColumn(Index: Integer): TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(inherited VisibleColumns[Index]); -end; - -procedure TcxGridBandedTableView.SetBackgroundBitmaps(Value: TcxGridBandedTableBackgroundBitmaps); -begin - inherited BackgroundBitmaps := Value; -end; - -procedure TcxGridBandedTableView.SetBands(Value: TcxGridBands); -begin - FBands.Assign(Value); -end; - -procedure TcxGridBandedTableView.SetColumn(Index: Integer; - Value: TcxGridBandedColumn); -begin - inherited Columns[Index] := Value; -end; - -procedure TcxGridBandedTableView.SetOnBandPosChanged(Value: TcxGridBandEvent); -begin - if @FOnBandPosChanged <> @Value then - begin - FOnBandPosChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridBandedTableView.SetOnBandSizeChanged(Value: TcxGridBandEvent); -begin - if @FOnBandSizeChanged <> @Value then - begin - FOnBandSizeChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridBandedTableView.SetOnCustomDrawBandHeader(Value: TcxGridBandCustomDrawHeaderEvent); -begin - if @FOnCustomDrawBandHeader <> @Value then - begin - FOnCustomDrawBandHeader := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridBandedTableView.SetOptionsBehavior(Value: TcxGridBandedTableOptionsBehavior); -begin - inherited OptionsBehavior := Value; -end; - -procedure TcxGridBandedTableView.SetOptionsCustomize(Value: TcxGridBandedTableOptionsCustomize); -begin - inherited OptionsCustomize := Value; -end; - -procedure TcxGridBandedTableView.SetOptionsView(Value: TcxGridBandedTableOptionsView); -begin - inherited OptionsView := Value; -end; - -procedure TcxGridBandedTableView.SetStyles(Value: TcxGridBandedTableViewStyles); -begin - inherited Styles := Value; -end; - -procedure TcxGridBandedTableView.DeleteChild(const AObjectName: string; AObject: TObject); -begin - if AObject <> Bands then inherited; -end; - -procedure TcxGridBandedTableView.GetStoredChildren(AChildren: TStringList); -begin - AChildren.AddObject('', Bands); - inherited; -end; - -procedure TcxGridBandedTableView.AssignLayout(ALayoutView: TcxCustomGridView); -begin - Bands := (ALayoutView as TcxGridBandedTableView).Bands; - inherited; -end; - -procedure TcxGridBandedTableView.ReadState(Reader: TReader); -begin - //if csAncestor in ComponentState then - does not exist in run-time - SaveColumnsParams(True); - inherited; - //if csAncestor in ComponentState then - AssignColumnsParams(True, False); -end; - -procedure TcxGridBandedTableView.Updated; -begin - inherited; - BeginUpdate; - try - AssignBandsParams; - AssignColumnsParams(True, True); - finally - EndUpdate; - end; -end; - -procedure TcxGridBandedTableView.Updating; -begin - SaveBandsParams; - SaveColumnsParams; - inherited; -end; - -procedure TcxGridBandedTableView.BeginAssignBands; -begin - FIsAssigningBands := True; -end; - -procedure TcxGridBandedTableView.DoAssign(ASource: TcxCustomGridView); -begin - if ASource is TcxGridBandedTableView then - with TcxGridBandedTableView(ASource) do - begin - if not Self.AssigningSettings then - Self.Bands := Bands; - Self.OnBandPosChanged := OnBandPosChanged; - Self.OnBandSizeChanged := OnBandSizeChanged; - Self.OnCustomDrawBandHeader := OnCustomDrawBandHeader; - end; - inherited; -end; - -procedure TcxGridBandedTableView.DoItemsAssigned; -begin - inherited; - AssignColumnsParams(False, True); -end; - -procedure TcxGridBandedTableView.EndAssignBands; -begin - FIsAssigningBands := False; - AssignBandsParams; -end; - -procedure TcxGridBandedTableView.GetFakeComponentLinks(AList: TList); -var - I: Integer; -begin - inherited; - for I := 0 to FBands.Count - 1 do - FBands[I].Styles.GetFakeComponentLinks(AList); -end; - -function TcxGridBandedTableView.GetIsControlFocused: Boolean; -begin - Result := inherited GetIsControlFocused or - Controller.HasBandsCustomizationPopup and Controller.BandsCustomizationPopup.Visible; -end; - -function TcxGridBandedTableView.HasCustomDrawBandHeader: Boolean; -begin - Result := Assigned(FOnCustomDrawBandHeader); -end; - -procedure TcxGridBandedTableView.CreateOptions; -begin - inherited; - FBands := GetBandsClass.Create(Self); -end; - -procedure TcxGridBandedTableView.DestroyOptions; -begin - FreeAndNil(FBands); - inherited; -end; - -procedure TcxGridBandedTableView.AddItem(AItem: TcxCustomGridTableItem); -begin - inherited; - if not IsLoading and (FBands.VisibleBottomItemCount <> 0) then - TcxGridBandedColumn(AItem).Position.BandIndex := FBands.VisibleBottomItems[0].Index; -end; - -function CompareLoadedBandPositions( - Item1, Item2: Pointer): Integer; -var - APosition1, APosition2: TcxGridBandPosition; -begin - APosition1 := TcxGridBandPosition(Item1); - APosition2 := TcxGridBandPosition(Item2); - Result := APosition1.FBandIndex - APosition2.FBandIndex; - if Result = 0 then - Result := APosition1.FColIndex - APosition2.FColIndex; -end; - -procedure TcxGridBandedTableView.AssignBandsParams; -var - ABandPositions: TList; - I: Integer; - - procedure GetSortedBandPositionList(AList: TList); - var - I: Integer; - begin - AList.Count := FBands.Count; - for I := 0 to FBands.Count - 1 do - AList[I] := FBands[I].Position; - AList.Sort(CompareLoadedBandPositions); - end; - -begin - BeginUpdate; - try - ABandPositions := TList.Create; - try - GetSortedBandPositionList(ABandPositions); - for I := 0 to ABandPositions.Count - 1 do - with TcxGridBandPosition(ABandPositions[I]) do - begin - Band.IgnoreLoadingStatus := True; - try - BandIndex := FBandIndex; - if not Band.IsRoot then - ColIndex := FColIndex; - finally - Band.IgnoreLoadingStatus := False; - end; - end; - finally - ABandPositions.Free; - end; - finally - EndUpdate; - end; -end; - -function CompareLoadedColumnPositions(Item1, Item2: - Pointer): Integer; -var - APosition1, APosition2: TcxGridBandedColumnPosition; -begin - APosition1 := TcxGridBandedColumnPosition(Item1); - APosition2 := TcxGridBandedColumnPosition(Item2); - Result := APosition1.BandIndex - APosition2.BandIndex; - if Result = 0 then - begin - Result := APosition1.FRowIndex - APosition2.FRowIndex; - if Result = 0 then - Result := APosition1.FColIndex - APosition2.FColIndex; - end; -end; - -procedure TcxGridBandedTableView.AssignColumnsParams(AAssignBandIndexes, AAssignOtherIndexes: Boolean); -var - AColumnPositions: TList; - I: Integer; - - procedure GetSortedColumnPositionList(AList: TList); - var - I: Integer; - begin - AList.Count := ColumnCount; - for I := 0 to ColumnCount - 1 do - AList[I] := Columns[I].Position; - AList.Sort(CompareLoadedColumnPositions); - end; - -begin - BeginUpdate; - try - if AAssignBandIndexes then - for I := 0 to ColumnCount - 1 do - with Columns[I].Position do - BandIndex := FBandIndex; - if AAssignOtherIndexes then - begin - AColumnPositions := TList.Create; - try - GetSortedColumnPositionList(AColumnPositions); - for I := 0 to AColumnPositions.Count - 1 do - with TcxGridBandedColumnPosition(AColumnPositions[I]) do - begin - Item.IgnoreLoadingStatus := True; - try - RowIndex := FRowIndex; - ColIndex := FColIndex; - finally - Item.IgnoreLoadingStatus := False; - end; - end; - finally - AColumnPositions.Free; - end; - end; - RefreshVisibleItemsList; - finally - EndUpdate; - end; -end; - -procedure TcxGridBandedTableView.GetVisibleItemsList(AItems: TList); -var - I: Integer; - - procedure ProcessBand(ABand: TcxGridBand); - var - I: Integer; - begin - if ABand.Rows.VisibleCount <> 0 then - with ABand.Rows.VisibleItems[0].VisibleItemsList do - for I := 0 to Count - 1 do - AItems.Add(Items[I]); - end; - -begin - for I := 0 to FBands.VisibleBottomItemCount - 1 do - ProcessBand(FBands.VisibleBottomItems[I]); -end; - -procedure TcxGridBandedTableView.LoadingComplete; -begin - inherited; - BeginUpdate; - try - AssignBandsParams; - AssignColumnsParams(False, True); - finally - EndUpdate; - end; -end; - -function CompareColumns(Item1, Item2: - Pointer): Integer; -var - AColumn1, AColumn2: TcxGridBandedColumn; - AFixedKind1, AFixedKind2: TcxGridBandFixedKind; -begin - AColumn1 := TcxGridBandedColumn(Item1); - AColumn2 := TcxGridBandedColumn(Item2); - AFixedKind1 := AColumn1.Position.Band.FixedKind; - AFixedKind2 := AColumn2.Position.Band.FixedKind; - - if AFixedKind1 = AFixedKind2 then - Result := CompareVisibleColumnPositions(AColumn1.Position, AColumn2.Position) - else - if AFixedKind1 = fkLeft then - Result := -1 - else - if AFixedKind2 = fkLeft then - Result := 1 - else - Result := Ord(AFixedKind1) - Ord(AFixedKind2); -end; - -procedure TcxGridBandedTableView.RefreshVisibleItemsList; -begin - inherited; - VisibleItemsList.Sort(CompareColumns); - AssignVisibleItemsIndexes; -end; - -procedure TcxGridBandedTableView.RestoringComplete; -begin - inherited; - BeginUpdate; - try - AssignBandsParams; - AssignColumnsParams(False, True); - finally - EndUpdate; - end; -end; - -procedure TcxGridBandedTableView.SaveBandsParams; -var - I: Integer; -begin - for I := 0 to FBands.Count - 1 do - FBands[I].Position.SaveParams; -end; - -procedure TcxGridBandedTableView.SaveColumnsParams(ABandIndexOnly: Boolean = False); -var - I: Integer; -begin - for I := 0 to ColumnCount - 1 do - Columns[I].Position.SaveParams(ABandIndexOnly); -end; - -function TcxGridBandedTableView.GetBackgroundBitmapsClass: TcxCustomGridBackgroundBitmapsClass; -begin - Result := TcxGridBandedTableBackgroundBitmaps; -end; - -function TcxGridBandedTableView.GetBandsClass: TcxGridBandsClass; -begin - Result := TcxGridBands; -end; - -function TcxGridBandedTableView.GetControllerClass: TcxCustomGridControllerClass; -begin - Result := TcxGridBandedTableController; -end; - -function TcxGridBandedTableView.GetItemClass: TcxCustomGridTableItemClass; -begin - Result := TcxGridBandedColumn; -end; - -function TcxGridBandedTableView.GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; -begin - Result := TcxGridBandedTableOptionsBehavior; -end; - -function TcxGridBandedTableView.GetOptionsCustomizeClass: TcxCustomGridTableOptionsCustomizeClass; -begin - Result := TcxGridBandedTableOptionsCustomize; -end; - -function TcxGridBandedTableView.GetOptionsViewClass: TcxCustomGridOptionsViewClass; -begin - Result := TcxGridBandedTableOptionsView; -end; - -function TcxGridBandedTableView.GetPainterClass: TcxCustomGridPainterClass; -begin - Result := TcxGridBandedTablePainter; -end; - -function TcxGridBandedTableView.GetStylesClass: TcxCustomGridViewStylesClass; -begin - Result := TcxGridBandedTableViewStyles; -end; - -function TcxGridBandedTableView.GetViewInfoClass: TcxCustomGridViewInfoClass; -begin - Result := TcxGridBandedTableViewInfo; -end; - -procedure TcxGridBandedTableView.DoBandPosChanged(ABand: TcxGridBand); -begin - if Assigned(FOnBandPosChanged) then FOnBandPosChanged(Self, ABand); -end; - -procedure TcxGridBandedTableView.DoBandSizeChanged(ABand: TcxGridBand); -begin - if Assigned(FOnBandSizeChanged) then FOnBandSizeChanged(Self, ABand); -end; - -procedure TcxGridBandedTableView.DoCustomDrawBandHeader(ACanvas: TcxCanvas; - AViewInfo: TcxGridBandHeaderViewInfo; var ADone: Boolean); -begin - if HasCustomDrawBandHeader then - FOnCustomDrawBandHeader(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridBandedTableView.Initialize; -begin - inherited Initialize; - if (Owner <> nil) and (csDesigning in Owner.ComponentState) then - Bands.Add; -end; - -procedure TcxGridBandedTableView.ApplyBestFit(AItem: TcxCustomGridTableItem = nil; - ACheckSizingAbility: Boolean = False; AFireEvents: Boolean = False); -var - I: Integer; -begin - if AItem = nil then - for I := 0 to FBands.VisibleRootItemCount - 1 do - FBands.VisibleRootItems[I].ApplyBestFit(ACheckSizingAbility, AFireEvents) - else - inherited; -end; - -function TcxGridBandedTableView.CreateColumn: TcxGridBandedColumn; -begin - Result := TcxGridBandedColumn(inherited CreateColumn); -end; - -initialization - cxGridRegisteredViews.Register(TcxGridBandedTableView, 'Banded Table'); - Classes.RegisterClasses([TcxGridBandedColumn, TcxGridBandedTableViewStyleSheet]); - -finalization - cxGridRegisteredViews.Unregister(TcxGridBandedTableView); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCardView.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCardView.pas deleted file mode 100644 index 68a88c5a..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCardView.pas +++ /dev/null @@ -1,9996 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridCardView; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Classes, Graphics, Controls, Forms, StdCtrls, - cxClasses, cxGraphics, cxControls, cxStyles, cxLookAndFeelPainters, - cxGridCommon, cxGrid, cxGridCustomView, cxGridCustomTableView, - cxDataStorage, cxCustomData; - -const - cxGridCardViewAlternateCaptionSeparator: string = '-'; - - cxGridDefaultCardBorderWidth = 3; - cxGridDefaultCardViewCaptionSeparator = ':'; - cxGridDefaultCardViewSeparatorWidth = 2; - cxGridCardDefaultCategoryIndent = 17; - cxGridCardDefaultCategorySeparatorWidth = 2; - cxGridCardDefaultLayerSeparatorWidth = 0; - cxGridCardDefaultWidth = 200; - cxGridCardBorderMinWidth = 1; - cxGridCardDefaultIndent = 7; - cxGridCardMinWidth = 40; - - htCardViewBase = htCustomGridTableBase + 50; - htCardRowIndent = htCardViewBase + 1; - htCardRowExpandButton = htCardViewBase + 2; - htRowCaption = htCardViewBase + 3; - htRowFilterButton = htCardViewBase + 4; - htCardScrollButtonUp = htCardViewBase + 5; - htCardScrollButtonDown = htCardViewBase + 6; - htSeparator = htCardViewBase + 7; - - ckRows = 2; - - bbCardViewFirst = bbCustomTableLast + 1; - bbCaptionRow = bbCardViewFirst; - bbCardBorder = bbCardViewFirst + 1; - bbRowCaption = bbCardViewFirst + 2; - bbCardViewLast = bbRowCaption; - - isRowFirst = isCustomItemLast + 1; - isCaptionRow = isRowFirst; - isCategoryRow = isRowFirst + 1; - isRowCaption = isRowFirst + 2; - isRowLast = isRowCaption; - - vsCardViewFirst = vsCustomTableLast + 1; - vsCaptionRow = vsCardViewFirst; - vsCardBorder = vsCardViewFirst + 1; - vsCategoryRow = vsCardViewFirst + 2; - vsCategorySeparator = vsCardViewFirst + 3; - vsLayerSeparator = vsCardViewFirst + 4; - vsRowCaption = vsCardViewFirst + 5; - vsCardViewLast = vsRowCaption; - -type - TcxGridCardViewController = class; - TcxGridCard = class; - TcxGridCardViewViewData = class; - TcxGridCardRowFilterButtonViewInfo = class; - TcxGridCardRowCaptionViewInfo = class; - TcxGridCardRowViewInfo = class; - TcxCustomGridCardScrollButtonViewInfo = class; - TcxGridCardExpandButtonViewInfo = class; - TcxGridCardRowLayer = class; - TcxGridCardRowLayoutClass = class of TcxGridCardRowLayout; - TcxGridCardRowLayout = class; - TcxGridCardRowHorizontalLayout = class; - TcxGridCardViewInfoClass = class of TcxGridCardViewInfo; - TcxGridCardViewInfo = class; - TcxGridCardViewColumns = class; - TcxGridCardsViewInfo = class; - TcxGridCardViewSeparatorsViewInfo = class; - TcxGridCardViewViewInfo = class; - TcxGridCardViewInfoCacheItem = class; - TcxGridCardViewRow = class; - TcxGridCardVisibleRowLayoutObject = class; - TcxGridCardViewRowLayoutObject = class; - TcxGridCardViewVisibleRowLayoutObject = class; - TcxGridCardViewRowLayoutController = class; - TcxGridCardView = class; - - TcxGridCardExpandButtonAlignment = (cebaLeft, cebaRight); - TcxGridCardViewLayoutDirection = (ldHorizontal, ldVertical); - - { hit tests } - - TcxGridCardRowFilterButtonHitTest = class(TcxGridRecordCellHitTest) - protected - class function GetHitTestCode: Integer; override; - public - class function CanClick: Boolean; override; - end; - - TcxGridCardRowIndentHitTest = class(TcxGridRecordCellHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridCardRowExpandButtonHitTest = class(TcxGridRecordCellHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridCardRowCellHitTest = class(TcxGridRecordCellHitTest) - public - function DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; override; - end; - - TcxGridCardRowCaptionHitTest = class(TcxGridCardRowCellHitTest) - protected - class function GetHitTestCode: Integer; override; - public - RowContainerKind: TcxGridItemContainerKind; - end; - - TcxGridCardScrollButtonDownHitTest = class(TcxGridRecordHitTest) - protected - class function GetHitTestCode: Integer; override; - public - class function CanClick: Boolean; override; - end; - - TcxGridCardScrollButtonUpHitTest = class(TcxGridRecordHitTest) - protected - class function GetHitTestCode: Integer; override; - public - class function CanClick: Boolean; override; - end; - - TcxGridCardViewSeparatorHitTest = class(TcxCustomGridHitTest) - protected - class function GetHitTestCode: Integer; override; - public - Index: Integer; - Separators: TcxGridCardViewSeparatorsViewInfo; - function Cursor: TCursor; override; - function DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; override; - end; - - { view data } - - TcxGridCard = class(TcxCustomGridRecord) - private - FExpanded: Boolean; - function GetGridView: TcxGridCardView; - protected - procedure DoCollapse(ARecurse: Boolean); override; - procedure DoExpand(ARecurse: Boolean); override; - function GetExpandable: Boolean; override; - function GetExpanded: Boolean; override; - function GetHasCells: Boolean; override; - function GetViewInfoCacheItemClass: TcxCustomGridViewInfoCacheItemClass; override; - function GetViewInfoClass: TcxCustomGridRecordViewInfoClass; override; - public - constructor Create(AViewData: TcxCustomGridTableViewData; AIndex: Integer; - const ARecordInfo: TcxRowInfo); override; - procedure GetVisibleRows(ARows: TList); - property GridView: TcxGridCardView read GetGridView; - end; - - TcxGridCardViewViewData = class(TcxCustomGridTableViewData) - private - function GetCard(Index: Integer): TcxGridCard; - function GetCardCount: Integer; - protected - function GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; override; - public - property CardCount: Integer read GetCardCount; - property Cards[Index: Integer]: TcxGridCard read GetCard; - end; - - { controller } - - // drag&drop objects - - TcxGridCardRowInsertionPos = (ripPrevLayer, ripNewLayer, ripSameLayer); - - TcxGridCardRowContainerZone = class(TcxGridItemContainerZone) - private - function GetItem: TcxGridCardViewRow; - function GetRecordViewInfo: TcxGridCardViewInfo; - public - GridRecord: TcxCustomGridRecord; - InsertionPos: TcxGridCardRowInsertionPos; - constructor Create(AGridRecord: TcxCustomGridRecord; AItemIndex: Integer; - AInsertionPos: TcxGridCardRowInsertionPos); reintroduce; - function IsEqual(Value: TcxGridItemContainerZone): Boolean; override; - property RecordViewInfo: TcxGridCardViewInfo read GetRecordViewInfo; - property Item: TcxGridCardViewRow read GetItem; - end; - - TcxGridCardRowMovingObjectClass = class of TcxGridCardRowMovingObject; - - TcxGridCardRowMovingObject = class(TcxCustomGridTableItemMovingObject) - private - FExpandingRow: TcxGridCardViewRow; - FRowExpandingTimer: TcxTimer; - FSourceGridRecord: TcxCustomGridRecord; - function GetDestZone: TcxGridCardRowContainerZone; - function GetGridView: TcxGridCardView; - function GetRowLayout: TcxGridCardViewRowLayoutObject; - function GetSourceItem: TcxGridCardViewRow; - function GetViewInfo: TcxGridCardViewViewInfo; - function GetVisibleRowLayout: TcxGridCardViewVisibleRowLayoutObject; - procedure SetDestZone(Value: TcxGridCardRowContainerZone); - procedure SetSourceItem(Value: TcxGridCardViewRow); - procedure RowExpandingHandler(Sender: TObject); - protected - function AreArrowsVertical: Boolean; override; - procedure CalculateDestParams(AHitTest: TcxCustomGridHitTest; - out AContainerKind: TcxGridItemContainerKind; out AZone: TcxGridItemContainerZone); override; - function CanRemove: Boolean; override; - procedure ChangeSourceItemPosition; virtual; - function GetArrowAreaBounds(APlace: TcxGridArrowPlace): TRect; override; - function GetArrowsClientRect: TRect; override; - function GetSourceItemViewInfo: TcxCustomGridCellViewInfo; override; - function IsValidDestination: Boolean; override; - - procedure BeginDragAndDrop; override; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - procedure EndDragAndDrop(Accepted: Boolean); override; - - procedure StartRowExpanding(ARow: TcxGridCardViewRow); - procedure StopRowExpanding; - property ExpandingRow: TcxGridCardViewRow read FExpandingRow; - - property DestZone: TcxGridCardRowContainerZone read GetDestZone write SetDestZone; - property GridView: TcxGridCardView read GetGridView; - property RowLayout: TcxGridCardViewRowLayoutObject read GetRowLayout; - property SourceGridRecord: TcxCustomGridRecord read FSourceGridRecord write FSourceGridRecord; - property SourceItem: TcxGridCardViewRow read GetSourceItem write SetSourceItem; - property ViewInfo: TcxGridCardViewViewInfo read GetViewInfo; - property VisibleRowLayout: TcxGridCardViewVisibleRowLayoutObject read GetVisibleRowLayout; - public - procedure Init(const P: TPoint; AParams: TcxCustomGridHitTest); override; - end; - - TcxGridCardSizingObject = class(TcxCustomGridDragAndDropObject) - private - FCardColumnIndex: Integer; - FCardOriginalWidth: Integer; - FDestPointX: Integer; - FSeparators: TList; - function GetGridView: TcxGridCardView; - function GetSeparator(Index: Integer): TRect; - function GetSeparatorCount: Integer; - function GetViewInfo: TcxGridCardViewViewInfo; - procedure SetDestPointX(Value: Integer); - protected - procedure DirtyChanged; override; - function GetCurrentWidth: Integer; virtual; - function GetDeltaWidth: Integer; virtual; - function GetDragAndDropCursor(Accepted: Boolean): TCursor; override; - function GetImmediateStart: Boolean; override; - function GetOriginalWidth: Integer; virtual; - - procedure BeginDragAndDrop; override; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - procedure EndDragAndDrop(Accepted: Boolean); override; - - procedure AddSeparator(const R: TRect); - procedure CalculateSeparators; - procedure ClearSeparators; - procedure DrawSeparators; - property SeparatorCount: Integer read GetSeparatorCount; - property Separators[Index: Integer]: TRect read GetSeparator; - - property CardColumnIndex: Integer read FCardColumnIndex; - property CardOriginalWidth: Integer read FCardOriginalWidth - write FCardOriginalWidth; - property CurrentWidth: Integer read GetCurrentWidth; - property DeltaWidth: Integer read GetDeltaWidth; - property DestPointX: Integer read FDestPointX write SetDestPointX; - property GridView: TcxGridCardView read GetGridView; - property OriginalWidth: Integer read GetOriginalWidth; - property ViewInfo: TcxGridCardViewViewInfo read GetViewInfo; - public - constructor Create(AControl: TcxControl); override; - destructor Destroy; override; - procedure Init(const P: TPoint; AParams: TcxCustomGridHitTest); override; - end; - - // customization form - - TcxGridCardRowsListBox = class(TcxCustomGridTableItemsListBox) - private - function GetGridView: TcxGridCardView; - protected - function CalculateItemHeight: Integer; override; - procedure DoRefreshItems; override; - function GetDragAndDropParams: TcxCustomGridHitTest; override; - property GridView: TcxGridCardView read GetGridView; - public - procedure PaintItem(ACanvas: TcxCanvas; R: TRect; AIndex: Integer; AFocused: Boolean); override; - end; - - TcxGridCardViewCustomizationForm = class(TcxCustomGridTableCustomizationForm) - protected - function GetItemsListBoxClass: TcxCustomGridTableItemsListBoxClass; override; - function GetItemsPageCaption: string; override; - end; - - // controllers - - TcxGridCardViewControllerImplClass = class of TcxGridCardViewControllerImpl; - - TcxGridCardViewControllerImpl = class - private - FController: TcxGridCardViewController; - function GetControl: TcxControl; - function GetDataController: TcxCustomDataController; - function GetScrollBarOffsetBegin: Integer; - function GetScrollBarOffsetEnd: Integer; - function GetViewData: TcxGridCardViewViewData; - function GetViewInfo: TcxGridCardViewViewInfo; - protected - property Control: TcxControl read GetControl; - property Controller: TcxGridCardViewController read FController; - property DataController: TcxCustomDataController read GetDataController; - property ScrollBarOffsetBegin: Integer read GetScrollBarOffsetBegin; - property ScrollBarOffsetEnd: Integer read GetScrollBarOffsetEnd; - property ViewData: TcxGridCardViewViewData read GetViewData; - property ViewInfo: TcxGridCardViewViewInfo read GetViewInfo; - public - constructor Create(AController: TcxGridCardViewController); virtual; - function GetIsRecordsScrollHorizontal: Boolean; virtual; abstract; - function GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; virtual; abstract; - function GetScrollDelta: Integer; virtual; abstract; - procedure InitScrollBarsParameters; virtual; abstract; - procedure KeyDown(var Key: Word; Shift: TShiftState); dynamic; - end; - - TcxGridCardViewControllerHorizontalImpl = class(TcxGridCardViewControllerImpl) - public - procedure FocusRecordInNextColumn(ADirection: TcxDirection; AIsSelecting: Boolean); - function GetIsRecordsScrollHorizontal: Boolean; override; - function GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; override; - function GetScrollDelta: Integer; override; - procedure InitScrollBarsParameters; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - end; - - TcxGridCardViewControllerVerticalImpl = class(TcxGridCardViewControllerImpl) - public - procedure FocusRecordInNextRow(ADirection: TcxDirection; AIsSelecting: Boolean); - function GetIsRecordsScrollHorizontal: Boolean; override; - function GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; override; - function GetScrollDelta: Integer; override; - procedure InitScrollBarsParameters; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - end; - - TcxGridCardViewController = class(TcxCustomGridTableController) - private - FImplementationObject: TcxGridCardViewControllerImpl; - FScrollCardViewInfo: TcxGridCardViewInfo; - - function GetCustomizationForm: TcxGridCardViewCustomizationForm; - function GetFocusedCard: TcxGridCard; - function GetFocusedCardViewInfo: TcxGridCardViewInfo; - function GetFocusedRow: TcxGridCardViewRow; - function GetGridView: TcxGridCardView; - function GetScrollDelta: Integer; - function GetTopCardIndex: Integer; - function GetViewData: TcxGridCardViewViewData; - function GetViewInfo: TcxGridCardViewViewInfo; - procedure SetFocusedCard(Value: TcxGridCard); - procedure SetFocusedRow(Value: TcxGridCardViewRow); - procedure SetScrollCardViewInfo(Value: TcxGridCardViewInfo); - procedure SetTopCardIndex(Value: Integer); - procedure CreateImplementationObject; - procedure DestroyImplementationObject; - function GetImplementationObjectClass: TcxGridCardViewControllerImplClass; - protected - function CanFocusNextItem(AFocusedItemIndex, ANextItemIndex: Integer; - AGoForward, AGoOnCycle, AGoToNextRecordOnCycle: Boolean): Boolean; override; - function FindNextRow(ACard: TcxGridCard; ARows: TList; ARow: TcxGridCardViewRow; - AGoForward, AGoOnCycle: Boolean; out ACycleChanged: Boolean): TcxGridCardViewRow; - function GetDesignHitTest(AHitTest: TcxCustomGridHitTest): Boolean; override; - function GetDragScrollInterval: Integer; override; - function GetIsRecordsScrollHorizontal: Boolean; override; - function GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; override; - function IsKeyForMultiSelect(AKey: Word; AShift: TShiftState; - AFocusedRecordChanged: Boolean): Boolean; override; - function ProcessFocusedRowKeys(var AKey: Word; AShift: TShiftState; - ARowGoOnCycle: Boolean): Boolean; virtual; - procedure RowExpandedChanged(ARow: TcxGridCardViewRow); virtual; - procedure RowExpandedChanging(ARow: TcxGridCardViewRow; AValue: Boolean); virtual; - procedure ScrollData(ADirection: TcxDirection); override; - - // internal draganddrop data scrolling - function CanScrollData(ADirection: TcxDirection): Boolean; override; - function GetScrollDataTimeInterval(ADirection: TcxDirection): Integer; override; - property ScrollCardViewInfo: TcxGridCardViewInfo read FScrollCardViewInfo write SetScrollCardViewInfo; - - // customization - function GetCustomizationFormClass: TcxCustomGridCustomizationFormClass; override; - function GetRowDragAndDropObjectClass: TcxGridCardRowMovingObjectClass; virtual; - - property FocusedCardViewInfo: TcxGridCardViewInfo read GetFocusedCardViewInfo; - property ImplementationObject: TcxGridCardViewControllerImpl read FImplementationObject; - property ScrollDelta: Integer read GetScrollDelta; - property ViewData: TcxGridCardViewViewData read GetViewData; - property ViewInfo: TcxGridCardViewViewInfo read GetViewInfo; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - procedure CheckScrolling(const P: TPoint); override; - function IsDataFullyVisible(AIsCallFromMaster: Boolean = False): Boolean; override; - procedure MakeItemVisible(AItem: TcxCustomGridTableItem); override; - - function CanScrollFocusedCard(ADown: Boolean): Boolean; - function ScrollFocusedCard(ADown: Boolean): Boolean; - - procedure InitScrollBarsParameters; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - - procedure LayoutDirectionChanged; - - function FocusNextRowHorizontally(AGoForward, AGoOnCycle: Boolean): Boolean; virtual; - function FocusNextRowVertically(AGoForward, AGoOnCycle: Boolean): Boolean; virtual; - - property CustomizationForm: TcxGridCardViewCustomizationForm read GetCustomizationForm; - property FocusedCard: TcxGridCard read GetFocusedCard write SetFocusedCard; - property FocusedItem: TcxGridCardViewRow read GetFocusedRow write SetFocusedRow; - property FocusedRow: TcxGridCardViewRow read GetFocusedRow write SetFocusedRow; - property GridView: TcxGridCardView read GetGridView; - property TopCardIndex: Integer read GetTopCardIndex write SetTopCardIndex; - end; - - // row layout controller - - TcxGridCardViewRowLayout = (rlHorizontal, rlVertical); - TcxGridCardViewRowLayerPosition = (rlpBeforeRow, rlpAfterRow, rlpBeforeLayer, rlpAfterLayer); - - TcxGridCardRowPosition = record - LayerIndex: Integer; - IndexInLayer: Integer; - end; - - TcxGridCardRowCoordinates = record - ColIndex: Integer; - RowIndex: Integer; - end; - - TcxGridCardRowCoordinatesArray = array of TcxGridCardRowCoordinates; - - TcxCustomGridCardRowLayoutObject = class - private - FLayerRowCounts: TList; - function GetLayerCount: Integer; - function GetLayerFirstRow(ALayerIndex: Integer): TcxGridCardViewRow; - function GetLayerFirstRowIndex(ALayerIndex: Integer): Integer; - function GetLayerRow(ALayerIndex, AIndex: Integer): TcxGridCardViewRow; - function GetLayerRowCount(ALayerIndex: Integer): Integer; - procedure SetLayerRowCount(ALayerIndex, Value: Integer); - protected - function GetLayout: TcxGridCardViewRowLayout; virtual; abstract; - function GetRow(AIndex: Integer): TcxGridCardViewRow; virtual; abstract; - function GetRowCount: Integer; virtual; abstract; - function GetRowIndex(ARow: TcxGridCardViewRow): Integer; virtual; abstract; - - function GetCoordinates(const APosition: TcxGridCardRowPosition): TcxGridCardRowCoordinates; overload; - function GetPosition(const ACoordinates: TcxGridCardRowCoordinates): TcxGridCardRowPosition; overload; - - function GetLayerIndex(ARowIndex: Integer): Integer; overload; - function GetLayerPosition(APosition: TcxPosition): TcxGridCardViewRowLayerPosition; - function GetLength(ARow: TcxGridCardViewRow): Integer; - function GetOffsetInLayer(ALayerIndex, AIndexInLayer: Integer): Integer; overload; - function GetPosition(ARowIndex: Integer): TcxGridCardRowPosition; overload; - - property LayerRowCounts: TList read FLayerRowCounts; - property RowCount: Integer read GetRowCount; - property Rows[AIndex: Integer]: TcxGridCardViewRow read GetRow; - public - constructor Create; - destructor Destroy; override; - - function GetCoordinates(ARow: TcxGridCardViewRow): TcxGridCardRowCoordinates; overload; - function GetIndexInLayer(ARow: TcxGridCardViewRow): Integer; - function GetLayerIndex(ARow: TcxGridCardViewRow): Integer; overload; - function GetOffsetInLayer(ARow: TcxGridCardViewRow): Integer; overload; - function GetPosition(ARow: TcxGridCardViewRow): TcxGridCardRowPosition; overload; - function GetRowAtOffset(ALayerIndex, AOffset: Integer): TcxGridCardViewRow; - function IsFirstInLayer(ARow: TcxGridCardViewRow): Boolean; - function IsLastInLayer(ARow: TcxGridCardViewRow): Boolean; - function IsWholeLine(ARow: TcxGridCardViewRow): Boolean; - - property LayerCount: Integer read GetLayerCount; - property LayerFirstRow[ALayerIndex: Integer]: TcxGridCardViewRow read GetLayerFirstRow; - property LayerFirstRowIndex[ALayerIndex: Integer]: Integer read GetLayerFirstRowIndex; - property LayerRowCount[ALayerIndex: Integer]: Integer read GetLayerRowCount write SetLayerRowCount; - property LayerRows[ALayerIndex, AIndex: Integer]: TcxGridCardViewRow read GetLayerRow; - property Layout: TcxGridCardViewRowLayout read GetLayout; - end; - - TcxGridCardRowLayoutObject = class(TcxCustomGridCardRowLayoutObject) - private - FLayout: TcxGridCardViewRowLayout; - FRows: TList; - protected - function GetLayout: TcxGridCardViewRowLayout; override; - function GetRow(AIndex: Integer): TcxGridCardViewRow; override; - function GetRowCount: Integer; override; - function GetRowIndex(ARow: TcxGridCardViewRow): Integer; override; - property RowsList: TList read FRows; - public - constructor Create; - destructor Destroy; override; - procedure Fill(ARows: TList); - property Layout: TcxGridCardViewRowLayout read GetLayout write FLayout; - end; - - TcxGridCardVisibleRowLayoutObject = class(TcxGridCardRowLayoutObject) - private - FCard: TcxGridCard; - public - constructor Create(ACard: TcxGridCard); - procedure GetInsertionParams(ARow: TcxGridCardViewRow; APosition: TcxPosition; - out AInsertionIndex: Integer; out AInsertionPos: TcxGridCardRowInsertionPos); - procedure GetLayerRows(ARowInLayer: TcxGridCardViewRow; ARows: TList); - procedure GetRowsAtOffset(ARowAtOffset: TcxGridCardViewRow; ARows: TList); - property Card: TcxGridCard read FCard; - end; - - TcxGridCardViewRowLayoutObject = class(TcxCustomGridCardRowLayoutObject) - private - FGridView: TcxGridCardView; - FOnLayerIndexChanged: TNotifyEvent; - function GetBeginsLayer(ARow: TcxGridCardViewRow): Boolean; - procedure SetBeginsLayer(ARow: TcxGridCardViewRow; Value: Boolean); - protected - function GetLayout: TcxGridCardViewRowLayout; override; - function GetRow(AIndex: Integer): TcxGridCardViewRow; override; - function GetRowCount: Integer; override; - function GetRowIndex(ARow: TcxGridCardViewRow): Integer; override; - - procedure AddLayer; - procedure InsertLayer(AIndex: Integer); - procedure RemoveLayer(AIndex: Integer); - - procedure AddRowToLayer(ALayerIndex: Integer); - procedure RemoveRowFromLayer(ALayerIndex: Integer); - - procedure AddRow(ARow: TcxGridCardViewRow); - procedure RemoveRow(ARowIndex: Integer); - procedure MoveRow(ARow: TcxGridCardViewRow; AOldIndex: Integer); - procedure MoveRows(ARows: TList; AIndex: Integer); overload; - procedure MoveRows(ARows: TList; AIndex: Integer; ARowLayout: TcxGridCardRowLayoutObject); overload; - - procedure LayerIndexChanged; - property OnLayerIndexChanged: TNotifyEvent read FOnLayerIndexChanged write FOnLayerIndexChanged; - public - constructor Create(AGridView: TcxGridCardView); - - procedure BreakLayer(ALayerIndex, AIndexInLayer: Integer); - function IsSimpleLayout: Boolean; - procedure MergeLayer(ALayerIndex: Integer); - - procedure SetCoordinates(ARow: TcxGridCardViewRow; const ACoordinates: TcxGridCardRowCoordinates); - procedure SetIndexInLayer(ARow: TcxGridCardViewRow; AValue: Integer; - AMoveSubItems: Boolean = False); - procedure SetLayerIndex(ARow: TcxGridCardViewRow; AValue: Integer; - ANewLayer: Boolean = False; AMoveSubItems: Boolean = False); - procedure SetPosition(ARow: TcxGridCardViewRow; const APosition: TcxGridCardRowPosition); - - property BeginsLayer[ARow: TcxGridCardViewRow]: Boolean read GetBeginsLayer write SetBeginsLayer; - property GridView: TcxGridCardView read FGridView; - end; - - TcxGridCardViewVisibleRowLayoutObject = class(TcxGridCardRowLayoutObject) - private - FGridView: TcxGridCardView; - protected - function GetLayout: TcxGridCardViewRowLayout; override; - public - constructor Create(AGridView: TcxGridCardView); - function GetLastVisibleSubItem(ARow: TcxGridCardViewRow): TcxGridCardViewRow; - function GetLayerCount(ARow: TcxGridCardViewRow): Integer; - function IsWholeLayer(ARow: TcxGridCardViewRow): Boolean; - property GridView: TcxGridCardView read FGridView; - end; - - TcxGridCardViewRowLayoutControllerClass = class of TcxGridCardViewRowLayoutController; - - TcxGridCardViewRowLayoutController = class - private - FGridView: TcxGridCardView; - FLayoutObject: TcxGridCardViewRowLayoutObject; - FVisibleLayoutObject: TcxGridCardViewVisibleRowLayoutObject; - function GetBeginsLayer(ARow: TcxGridCardViewRow): Boolean; - function GetLayout: TcxGridCardViewRowLayout; - procedure SetBeginsLayer(ARow: TcxGridCardViewRow; Value: Boolean); - procedure LayerIndexChanged(Sender: TObject); - protected - procedure RefreshVisibleLayoutObject; - procedure RowIndexChanged(ARow: TcxGridCardViewRow; AOldIndex: Integer); - procedure VisibleRowsListChanged; - - function CreateCardRowLayout(ACardViewInfo: TcxGridCardViewInfo): TcxGridCardRowLayout; - function GetCardRowLayoutClass: TcxGridCardRowLayoutClass; virtual; - public - constructor Create(AGridView: TcxGridCardView); virtual; - destructor Destroy; override; - function IsHorizontalLayout: Boolean; - function IsSimpleLayout: Boolean; - function IsWholeLine(ARow: TcxGridCardViewRow): Boolean; - - // indexes handling - - function GetCoordinates(ARow: TcxGridCardViewRow): TcxGridCardRowCoordinates; - procedure SetCoordinates(ARow: TcxGridCardViewRow; AColIndex, ARowIndex: Integer); overload; - procedure SetCoordinates(ARow: TcxGridCardViewRow; ACoordinates: TcxGridCardRowCoordinates); overload; - function GetVisibleCoordinates(ARow: TcxGridCardViewRow): TcxGridCardRowCoordinates; - - function GetPosition(ARow: TcxGridCardViewRow): TcxGridCardRowPosition; - procedure SetPosition(ARow: TcxGridCardViewRow; ALayerIndex, AIndexInLayer: Integer); - function GetVisiblePosition(ARow: TcxGridCardViewRow): TcxGridCardRowPosition; - - // navigation - - function FindNextRow(ACard: TcxGridCard; ARow: TcxGridCardViewRow; - ASameLayer, AGoForward, AGoOnCycle: Boolean; out ACycleChanged: Boolean): TcxGridCardViewRow; - - function FindNextRowHorizontally(ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AGoForward, AGoOnCycle: Boolean; out ACycleChanged: Boolean): TcxGridCardViewRow; - function FindNextRowVertically(ACard: TcxGridCard; ARow: TcxGridCardViewRow; - AGoForward, AGoOnCycle: Boolean; out ACycleChanged: Boolean): TcxGridCardViewRow; - - property BeginsLayer[ARow: TcxGridCardViewRow]: Boolean read GetBeginsLayer write SetBeginsLayer; - property GridView: TcxGridCardView read FGridView; - property Layout: TcxGridCardViewRowLayout read GetLayout; - property LayoutObject: TcxGridCardViewRowLayoutObject read FLayoutObject; - property VisibleLayoutObject: TcxGridCardViewVisibleRowLayoutObject read FVisibleLayoutObject; - end; - - { painters } - - TcxGridCardRowFilterButtonPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridCardRowFilterButtonViewInfo; - protected - procedure Paint; override; - property ViewInfo: TcxGridCardRowFilterButtonViewInfo read GetViewInfo; - end; - - TcxGridCardRowCaptionPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridCardRowCaptionViewInfo; - protected - procedure DrawContent; override; - property ViewInfo: TcxGridCardRowCaptionViewInfo read GetViewInfo; - end; - - TcxGridCardRowPainterClass = class of TcxGridCardRowPainter; - - TcxGridCardRowPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridCardRowViewInfo; - protected - procedure DrawExpandButton; virtual; - procedure DrawFocusRect; virtual; - procedure DrawIndent; virtual; - procedure Paint; override; - property ViewInfo: TcxGridCardRowViewInfo read GetViewInfo; - end; - - TcxGridCardScrollButtonPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxCustomGridCardScrollButtonViewInfo; - protected - procedure DrawContent; override; - function ExcludeFromClipRect: Boolean; override; - property ViewInfo: TcxCustomGridCardScrollButtonViewInfo read GetViewInfo; - end; - - TcxGridCardExpandButtonPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridCardExpandButtonViewInfo; - protected - procedure Paint; override; - property ViewInfo: TcxGridCardExpandButtonViewInfo read GetViewInfo; - end; - - TcxGridCardPainter = class(TcxCustomGridRecordPainter) - private - FClipRegion: TcxRegion; - function GetViewInfo: TcxGridCardViewInfo; - protected - procedure AfterPaint; override; - procedure BeforePaint; override; - procedure DrawBackground; override; - procedure DrawCardBorder; virtual; - procedure DrawExpandButton; override; - function DrawExpandButtonBeforePaint: Boolean; override; - procedure DrawLayerSeparators; virtual; - procedure DrawRows; virtual; - procedure DrawScrollButtons; virtual; - procedure Paint; override; - property ViewInfo: TcxGridCardViewInfo read GetViewInfo; - end; - - TcxGridCardViewPainter = class(TcxCustomGridTablePainter) - protected - procedure DrawBackground; override; - procedure DrawSeparators; virtual; - procedure PaintContent; override; - function ViewInfo: TcxGridCardViewViewInfo; reintroduce; - end; - - { view infos } - - // column and columns - - TcxGridCardViewColumn = class - private - FColumns: TcxGridCardViewColumns; - FIndex: Integer; - FRows: TList; - function GetLastRow: TcxGridCardViewInfo; - function GetRow(Index: Integer): TcxGridCardViewInfo; - function GetRowCount: Integer; - function GetVisibleRowCount: Integer; - procedure SetRow(Index: Integer; Value: TcxGridCardViewInfo); - public - constructor Create(AColumns: TcxGridCardViewColumns; AIndex: Integer); - destructor Destroy; override; - function GetNearestRow(APos: Integer): TcxGridCardViewInfo; - property Index: Integer read FIndex; - property LastRow: TcxGridCardViewInfo read GetLastRow; - property RowCount: Integer read GetRowCount; - property Rows[Index: Integer]: TcxGridCardViewInfo read GetRow write SetRow; default; - property VisibleRowCount: Integer read GetVisibleRowCount; - end; - - TcxGridCardViewColumnsClass = class of TcxGridCardViewColumns; - - TcxGridCardViewColumns = class - private - FCardsViewInfo: TcxGridCardsViewInfo; - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxGridCardViewColumn; - function GetLast: TcxGridCardViewColumn; - function GetVisibleCount: Integer; - procedure CreateItems; - procedure DestroyItems; - protected - property CardsViewInfo: TcxGridCardsViewInfo read FCardsViewInfo; - public - constructor Create(ACardsViewInfo: TcxGridCardsViewInfo); - destructor Destroy; override; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxGridCardViewColumn read GetItem; default; - property Last: TcxGridCardViewColumn read GetLast; - property VisibleCount: Integer read GetVisibleCount; - end; - - // card row - - TcxGridCardRowCellViewInfo = class(TcxGridTableDataCellViewInfo) - private - FRowViewInfo: TcxGridCardRowViewInfo; - function GetCardViewInfo: TcxGridCardViewInfo; - function GetGridView: TcxGridCardView; - function GetGridRecord: TcxGridCard; - function GetRow: TcxGridCardViewRow; - protected - function GetAreaBounds: TRect; override; - function GetMultiLine: Boolean; override; - function GetMultiLinePainting: Boolean; override; - function GetTransparent: Boolean; override; - function HasFocusRect: Boolean; override; - public - constructor Create(ARowViewInfo: TcxGridCardRowViewInfo); reintroduce; virtual; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - property CardViewInfo: TcxGridCardViewInfo read GetCardViewInfo; - property GridRecord: TcxGridCard read GetGridRecord; - property GridView: TcxGridCardView read GetGridView; - property Row: TcxGridCardViewRow read GetRow; - property RowViewInfo: TcxGridCardRowViewInfo read FRowViewInfo; - end; - - TcxGridCardRowFilterButtonViewInfoClass = class of TcxGridCardRowFilterButtonViewInfo; - - TcxGridCardRowFilterButtonViewInfo = class(TcxCustomGridViewCellViewInfo, - IcxGridFilterPopupOwner) - private - FRowCaptionViewInfo: TcxGridCardRowCaptionViewInfo; - function GetActive: Boolean; - function GetDropDownWindowValue: TcxGridFilterPopup; - function GetRow: TcxGridCardViewRow; - protected - { IcxGridFilterPopupOwner } - function GetItem: TcxCustomGridTableItem; - - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetVisible: Boolean; override; - function GetWidth: Integer; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - function NeedsContainerHotTrack: Boolean; virtual; - function OccupiesSpace: Boolean; virtual; - - function CloseDropDownWindowOnDestruction: Boolean; override; - function DropDownWindowExists: Boolean; override; - function GetDropDownWindow: TcxCustomGridPopup; override; - function GetDropDownWindowOwnerBounds: TRect; override; - function IsDropDownWindowOwner: Boolean; override; - property DropDownWindow: TcxGridFilterPopup read GetDropDownWindowValue; - public - constructor Create(ARowCaptionViewInfo: TcxGridCardRowCaptionViewInfo); reintroduce; virtual; - property Active: Boolean read GetActive; - property Row: TcxGridCardViewRow read GetRow; - property RowCaptionViewInfo: TcxGridCardRowCaptionViewInfo read FRowCaptionViewInfo; - end; - - TcxGridCardRowCaptionViewInfoClass = class of TcxGridCardRowCaptionViewInfo; - - TcxGridCardRowCaptionViewInfo = class(TcxGridCardRowCellViewInfo) - private - FCalculatingRealWidth: Boolean; - FFilterButtonViewInfo: TcxGridCardRowFilterButtonViewInfo; - function GetRealWidth: Integer; - protected - function CalculateHeight: Integer; override; - class function CalculateSimpleHeight(ARow: TcxGridCardViewRow; - ACanvas: TcxCanvas; AFont: TFont): Integer; virtual; - function CalculateRealWidth: Integer; virtual; - function CalculateWidth: Integer; override; - function CanFilter: Boolean; virtual; - function CanShowAutoHint: Boolean; override; - function CanShowCustomHint: Boolean; override; - function CanShowEdit: Boolean; override; - function GetAlignmentHorz: TAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetAutoHeight: Boolean; override; - function GetFilterButtonBounds: TRect; virtual; - function GetFilterButtonViewInfoClass: TcxGridCardRowFilterButtonViewInfoClass; virtual; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetShowEndEllipsis: Boolean; override; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - function UseStandardNeedShowHint: Boolean; override; - - property CalculatingRealWidth: Boolean read FCalculatingRealWidth; - property FilterButtonBounds: TRect read GetFilterButtonBounds; - public - constructor Create(ARowViewInfo: TcxGridCardRowViewInfo); override; - destructor Destroy; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - - property FilterButtonViewInfo: TcxGridCardRowFilterButtonViewInfo read FFilterButtonViewInfo; - property RealWidth: Integer read GetRealWidth; - end; - - TcxGridCardRowDataViewInfoClass = class of TcxGridCardRowDataViewInfo; - - TcxGridCardRowDataViewInfo = class(TcxGridCardRowCellViewInfo) - protected - function CalculateHeight: Integer; override; - class function CalculateSimpleHeight(ARow: TcxGridCardViewRow; - ACanvas: TcxCanvas; AFont: TFont): Integer; virtual; - function CalculateWidth: Integer; override; - function GetAutoHeight: Boolean; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetText: string; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - end; - - TcxGridCardRowViewInfoClass = class of TcxGridCardRowViewInfo; - - TcxGridCardRowViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FCaptionViewInfo: TcxGridCardRowCaptionViewInfo; - FCardViewInfo: TcxGridCardViewInfo; - FDataViewInfo: TcxGridCardRowDataViewInfo; - FHeight: Integer; - FIndex: Integer; - FPartVisible: Boolean; - function GetExpandButtonAreaSizeValue: Integer; - function GetExpandButtonSizeValue: Integer; - function GetExpanded: Boolean; - function GetGridView: TcxGridCardView; - function GetGridRecord: TcxGridCard; - function GetGridViewInfo: TcxGridCardViewViewInfo; - //function GetMaxHeight: Integer; - function GetRow: TcxGridCardViewRow; - procedure SetExpanded(Value: Boolean); - function CalculatePartVisible: Boolean; - function CalculateVisible: Boolean; - procedure CreateViewInfos; - procedure DestroyViewInfos; - protected - function CalculateContentBounds: TRect; override; - function CalculateHeaderWidth: Integer; virtual; - function CalculateHeight: Integer; override; - class function CalculateSimpleHeight(ARow: TcxGridCardViewRow; ACanvas: TcxCanvas): Integer; virtual; - function CalculateWidth: Integer; override; - class procedure CheckHeight(ACardViewInfoClass: TcxGridCardViewInfoClass; - ARow: TcxGridCardViewRow; ARowViewInfo: TcxGridCardRowViewInfo; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass; var AHeight: Integer); virtual; - class function GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; virtual; - function GetCaptionWidth: Integer; virtual; - class function GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; virtual; - function GetDataWidth: Integer; virtual; - function GetDesignSelectionBounds: TRect; override; - function GetExpandButtonAreaBounds: TRect; virtual; - class function GetExpandButtonAreaSize(ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; virtual; - function GetExpandButtonBounds: TRect; virtual; - class function GetExpandButtonSize(ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; virtual; - function GetHeaderWidth: Integer; virtual; - function GetHeight: Integer; override; - function GetHidden: Boolean; virtual; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIndent: Integer; virtual; - function GetIndentBounds: TRect; virtual; - function GetIndentViewParams: TcxViewParams; virtual; - function GetIsDesignSelected: Boolean; override; - function GetIsVisibleForPainting: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - class function GetSimpleViewParams(ARow: TcxGridCardViewRow; AIsCaption: Boolean): TcxViewParams; virtual; - function GetWidth: Integer; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - - procedure GetCaptionViewParams(var AParams: TcxViewParams; AIgnoreSelection: Boolean); virtual; abstract; - procedure GetDataViewParams(var AParams: TcxViewParams); virtual; abstract; - - property CaptionWidth: Integer read GetCaptionWidth; - property DataWidth: Integer read GetDataWidth; - property ExpandButtonAreaSize: Integer read GetExpandButtonAreaSizeValue; - property ExpandButtonSize: Integer read GetExpandButtonSizeValue; - property Indent: Integer read GetIndent; - //!!!property MaxHeight: Integer read GetMaxHeight; - public - constructor Create(ACardViewInfo: TcxGridCardViewInfo; AIndex: Integer); reintroduce; virtual; - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Calculate(const ABounds: TRect); override; - function CalculateVisibleCounts(var AVisibleRowCount, APartVisibleRowCount: Integer): Boolean; - procedure CalculateVisibles; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function HasExpandButton: Boolean; virtual; - function HasIndent: Boolean; virtual; - function HasLimitedHeaderSpace: Boolean; virtual; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - - property CaptionViewInfo: TcxGridCardRowCaptionViewInfo read FCaptionViewInfo; - property CardViewInfo: TcxGridCardViewInfo read FCardViewInfo; - property DataViewInfo: TcxGridCardRowDataViewInfo read FDataViewInfo; - property ExpandButtonAreaBounds: TRect read GetExpandButtonAreaBounds; - property ExpandButtonBounds: TRect read GetExpandButtonBounds; - property Expanded: Boolean read GetExpanded write SetExpanded; - property GridRecord: TcxGridCard read GetGridRecord; - property GridView: TcxGridCardView read GetGridView; - property GridViewInfo: TcxGridCardViewViewInfo read GetGridViewInfo; - property HeaderWidth: Integer read GetHeaderWidth; - property Height: Integer read GetHeight write FHeight; - property Hidden: Boolean read GetHidden; - property IndentBounds: TRect read GetIndentBounds; - property Index: Integer read FIndex; - property PartVisible: Boolean read FPartVisible; - property Row: TcxGridCardViewRow read GetRow; - end; - - // data row - - TcxGridCardDataRowDataViewInfo = class(TcxGridCardRowDataViewInfo) - protected - function CalculateSelected: Boolean; override; - end; - - TcxGridCardDataRowViewInfo = class(TcxGridCardRowViewInfo) - protected - procedure GetCaptionViewParams(var AParams: TcxViewParams; AIgnoreSelection: Boolean); override; - class function GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; override; - procedure GetDataViewParams(var AParams: TcxViewParams); override; - class function GetSimpleViewParams(ARow: TcxGridCardViewRow; AIsCaption: Boolean): TcxViewParams; override; - end; - - // caption row - - TcxGridCardCaptionRowCaptionViewInfo = class(TcxGridCardRowCaptionViewInfo) - protected - function GetTextAreaBounds: TRect; override; - end; - - TcxGridCardCaptionRowDataViewInfo = class(TcxGridCardRowDataViewInfo) - protected - procedure GetEditViewDataContentOffsets(var R: TRect); override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetTextAreaBounds: TRect; override; - end; - - TcxGridCardCaptionRowViewInfo = class(TcxGridCardRowViewInfo) - protected - class function GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; override; - procedure GetCaptionViewParams(var AParams: TcxViewParams; AIgnoreSelection: Boolean); override; - class function GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; override; - procedure GetDataViewParams(var AParams: TcxViewParams); override; - procedure GetViewParams(var AParams: TcxViewParams); override; - end; - - // category row - - TcxGridCardCategoryRowViewInfo = class(TcxGridCardCaptionRowViewInfo) - protected - class procedure CheckHeight(ACardViewInfoClass: TcxGridCardViewInfoClass; - ARow: TcxGridCardViewRow; ARowViewInfo: TcxGridCardRowViewInfo; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass; var AHeight: Integer); override; - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - procedure GetDataViewParams(var AParams: TcxViewParams); override; - function GetSeparatorColor: TColor; virtual; - function HasSeparator: Boolean; overload; - class function HasSeparator(ACardViewInfoClass: TcxGridCardViewInfoClass; - ARow: TcxGridCardViewRow): Boolean; overload; - property SeparatorColor: TColor read GetSeparatorColor; - public - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - end; - - // card scroll buttons - - TcxCustomGridCardScrollButtonViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FCardViewInfo: TcxGridCardViewInfo; - FScrollTimer: TcxTimer; - procedure ScrollTimerHandler(Sender: TObject); - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function CaptureMouseOnPress: Boolean; override; - function GetHotTrack: Boolean; override; - function GetIsDownButton: Boolean; virtual; abstract; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - procedure Scroll; virtual; abstract; - procedure StateChanged(APrevState: TcxGridCellState); override; - - procedure StartAutoScrolling; - procedure StopAutoScrolling; - property ScrollTimer: TcxTimer read FScrollTimer; - public - constructor Create(ACardViewInfo: TcxGridCardViewInfo); reintroduce; virtual; - property IsDownButton: Boolean read GetIsDownButton; - property CardViewInfo: TcxGridCardViewInfo read FCardViewInfo; - end; - - TcxGridCardScrollButtonDownViewInfoClass = class of TcxGridCardScrollButtonDownViewInfo; - - TcxGridCardScrollButtonDownViewInfo = class(TcxCustomGridCardScrollButtonViewInfo) - protected - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIsDownButton: Boolean; override; - function GetVisible: Boolean; override; - procedure Scroll; override; - end; - - TcxGridCardScrollButtonUpViewInfoClass = class of TcxGridCardScrollButtonUpViewInfo; - - TcxGridCardScrollButtonUpViewInfo = class(TcxCustomGridCardScrollButtonViewInfo) - protected - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIsDownButton: Boolean; override; - function GetVisible: Boolean; override; - procedure Scroll; override; - end; - - // card expand button - - TcxGridCardExpandButtonViewInfoClass = class of TcxGridCardExpandButtonViewInfo; - - TcxGridCardExpandButtonViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FCardViewInfo: TcxGridCardViewInfo; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function CaptureMouseOnPress: Boolean; override; - procedure Click; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetVisible: Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - public - constructor Create(ACardViewInfo: TcxGridCardViewInfo); reintroduce; virtual; - function HasPoint(const P: TPoint): Boolean; override; - property CardViewInfo: TcxGridCardViewInfo read FCardViewInfo; - end; - - // card row layout - - TcxGridCardRowLayerClass = class of TcxGridCardRowLayer; - - TcxGridCardRowLayer = class - private - FIndex: Integer; - FLength: Integer; - FOwner: TcxGridCardRowLayout; - FThickness: Integer; - function GetBounds: TRect; - function GetLength: Integer; - function GetRow(AIndex: Integer): TcxGridCardRowViewInfo; - function GetRowCount: Integer; - function GetThickness: Integer; - protected - procedure BeforeCalculation; virtual; - function CalculateLength: Integer; virtual; abstract; - function CalculateThickness: Integer; virtual; abstract; - procedure SetThickness(Value: Integer); virtual; - public - constructor Create(AOwner: TcxGridCardRowLayout; AIndex: Integer); virtual; - procedure Calculate(AOwnerWidth: Integer); virtual; - procedure CalculateRows(const ABounds: TRect; ATopRowIndex: Integer; - var AVisibleRowCount, APartVisibleRowCount: Integer); virtual; abstract; - function HasPoint(const P: TPoint): Boolean; virtual; abstract; - - property Bounds: TRect read GetBounds; - property Index: Integer read FIndex; - property Length: Integer read GetLength; - property Owner: TcxGridCardRowLayout read FOwner; - property RowCount: Integer read GetRowCount; - property Rows[Index: Integer]: TcxGridCardRowViewInfo read GetRow; - property Thickness: Integer read GetThickness write SetThickness; - end; - - TcxGridCardRowLayout = class(TcxGridCardVisibleRowLayoutObject) - private - FCardViewInfo: TcxGridCardViewInfo; - FLayers: array of TcxGridCardRowLayer; - FSeparatorWidth: Integer; - FSimple: Boolean; - function GetLayer(Index: Integer): TcxGridCardRowLayer; - function GetLayerRowViewInfo(ALayerIndex, AIndex: Integer): TcxGridCardRowViewInfo; - function GetSeparatorCount: Integer; - procedure CreateLayers; - procedure DestroyLayers; - protected - procedure BeforeCalculation; virtual; - procedure CalculateLayerBounds(ALayer: TcxGridCardRowLayer; AMaxRowHeight: Integer; - var ABounds: TRect); virtual; abstract; - procedure CalculateLayers(AWidth: Integer); virtual; - function CalculateRowsHeaderWidth(ARows: TList; AWidth: Integer): Integer; virtual; - function GetLayerClass: TcxGridCardRowLayerClass; virtual; - function GetLayersHeight: Integer; virtual; abstract; - function GetLayersLength: Integer; virtual; - function GetLayersThickness: Integer; virtual; - function GetNonContentThickness: Integer; virtual; - function HasSeparator(ALayer: TcxGridCardRowLayer): Boolean; - function IsLayerVisible(ALayer: TcxGridCardRowLayer; ATopRowIndex: Integer): Boolean; overload; virtual; - function IsLayerVisible(const ABounds, ALayerBounds: TRect): Boolean; overload; virtual; - - property LayersLength: Integer read GetLayersLength; - property LayersThickness: Integer read GetLayersThickness; - property NonContentThickness: Integer read GetNonContentThickness; - public - constructor Create(ACardViewInfo: TcxGridCardViewInfo; ASimple: Boolean); virtual; - destructor Destroy; override; - procedure Calculate(AWidth: Integer); virtual; - procedure CalculateRows(const ABounds: TRect; ATopRowIndex, AMaxRowHeight: Integer; - var AVisibleRowCount, APartVisibleRowCount: Integer); virtual; - function GetHeaderWidth(ARowViewInfo: TcxGridCardRowViewInfo): Integer; virtual; abstract; - function GetIndexInLayer(ARowViewInfo: TcxGridCardRowViewInfo): Integer; overload; - function GetLayerIndex(ARowViewInfo: TcxGridCardRowViewInfo): Integer; overload; - function GetLayerIndex(const P: TPoint): Integer; overload; - function GetSeparatorBounds(AIndex: Integer): TRect; virtual; abstract; - function IsLeft(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; virtual; abstract; - function IsTop(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; virtual; abstract; - function IsZoneVertical(AZone: TcxGridCardRowContainerZone): Boolean; virtual; abstract; - - property CardViewInfo: TcxGridCardViewInfo read FCardViewInfo; - property LayerRowViewInfos[ALayerIndex, AIndex: Integer]: TcxGridCardRowViewInfo read GetLayerRowViewInfo; - property LayersHeight: Integer read GetLayersHeight; - property Layers[Index: Integer]: TcxGridCardRowLayer read GetLayer; - property SeparatorCount: Integer read GetSeparatorCount; - property SeparatorWidth: Integer read FSeparatorWidth write FSeparatorWidth; - property Simple: Boolean read FSimple; - end; - - // - horizontal - - TcxGridCardRowHorizontalLayer = class(TcxGridCardRowLayer) - private - function GetOwner: TcxGridCardRowHorizontalLayout; - protected - function CalculateLength: Integer; override; - procedure CalculateRowWidths(AAvailableWidth: Integer); virtual; - function CalculateThickness: Integer; override; - public - procedure Calculate(AOwnerWidth: Integer); override; - procedure CalculateRows(const ABounds: TRect; ATopRowIndex: Integer; - var AVisibleRowCount, APartVisibleRowCount: Integer); override; - function HasPoint(const P: TPoint): Boolean; override; - property Owner: TcxGridCardRowHorizontalLayout read GetOwner; - end; - - TcxGridCardRowHorizontalLayout = class(TcxGridCardRowLayout) - private - FFirstColumnRowsHeaderWidth: Integer; - protected - function CalculateFirstColumnRowsHeaderWidth(AWidth: Integer): Integer; virtual; - procedure CalculateLayerBounds(ALayer: TcxGridCardRowLayer; AMaxRowHeight: Integer; - var ABounds: TRect); override; - function GetLayerClass: TcxGridCardRowLayerClass; override; - function GetLayersHeight: Integer; override; - function IsLayerVisible(ALayer: TcxGridCardRowLayer; ATopRowIndex: Integer): Boolean; override; - function IsLayerVisible(const ABounds, ALayerBounds: TRect): Boolean; override; - public - constructor Create(ACardViewInfo: TcxGridCardViewInfo; ASimple: Boolean); override; - procedure Calculate(AWidth: Integer); override; - function GetHeaderWidth(ARowViewInfo: TcxGridCardRowViewInfo): Integer; override; - function GetSeparatorBounds(AIndex: Integer): TRect; override; - function IsLeft(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; override; - function IsTop(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; override; - function IsZoneVertical(AZone: TcxGridCardRowContainerZone): Boolean; override; - property FirstColumnRowsHeaderWidth: Integer read FFirstColumnRowsHeaderWidth; - end; - - // - vertical - - TcxGridCardRowVerticalLayer = class(TcxGridCardRowLayer) - private - FRowsHeaderWidth: Integer; - protected - function CalculateLength: Integer; override; - function CalculateRowsHeaderWidth: Integer; virtual; - function CalculateThickness: Integer; override; - procedure SetThickness(Value: Integer); override; - public - constructor Create(AOwner: TcxGridCardRowLayout; AIndex: Integer); override; - procedure Calculate(AOwnerWidth: Integer); override; - procedure CalculateRows(const ABounds: TRect; ATopRowIndex: Integer; - var AVisibleRowCount, APartVisibleRowCount: Integer); override; - function HasPoint(const P: TPoint): Boolean; override; - property RowsHeaderWidth: Integer read FRowsHeaderWidth; - end; - - TcxGridCardRowVerticalLayout = class(TcxGridCardRowLayout) - protected - procedure CalculateLayerBounds(ALayer: TcxGridCardRowLayer; AMaxRowHeight: Integer; - var ABounds: TRect); override; - procedure CalculateLayers(AWidth: Integer); override; - procedure CalculateLayerWidths(AAvailableWidth: Integer); virtual; - function GetLayerClass: TcxGridCardRowLayerClass; override; - function GetLayersHeight: Integer; override; - public - function GetHeaderWidth(ARowViewInfo: TcxGridCardRowViewInfo): Integer; override; - function GetSeparatorBounds(AIndex: Integer): TRect; override; - function IsLeft(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; override; - function IsTop(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; override; - function IsZoneVertical(AZone: TcxGridCardRowContainerZone): Boolean; override; - end; - - // card - - TcxGridCardViewInfo = class(TcxCustomGridRecordViewInfo) - private - FCol: Integer; - FExpandButtonViewInfo: TcxGridCardExpandButtonViewInfo; - FLayout: TcxGridCardRowLayout; - FLayoutCalculated: Boolean; - FPartVisibleRowCount: Integer; - FRow: Integer; - FRowViewInfos: TList; - FScrollButtonDown: TcxGridCardScrollButtonDownViewInfo; - FScrollButtonUp: TcxGridCardScrollButtonUpViewInfo; - FVisibleRowCount: Integer; - function GetCacheItem: TcxGridCardViewInfoCacheItem; - function GetCardBorderWidth: Integer; - function GetExpandButtonSizeValue: Integer; - function GetFirstCaptionRowViewInfo: TcxGridCardRowViewInfo; - function GetGridView: TcxGridCardView; - function GetGridRecord: TcxGridCard; - function GetRecordsViewInfo: TcxGridCardsViewInfo; - function GetRowViewInfo(Index: Integer): TcxGridCardRowViewInfo; - function GetRowViewInfoCount: Integer; - function GetTopRowIndex: Integer; - function GetVisibleRowViewInfo(Index: Integer): TcxGridCardRowViewInfo; - function GetVisibleRowViewInfoCount: Integer; - procedure SetTopRowIndex(Value: Integer); - procedure CreateRowViewInfos; - procedure DestroyRowViewInfos; - procedure CreateScrollButtons; - procedure DestroyScrollButtons; - protected - procedure CalculateExpandButtonBounds(var ABounds: TRect); override; - function CalculateHeight: Integer; override; - procedure CalculateLayout; virtual; - procedure DoCalculateLayout; - procedure CalculateRows; virtual; - procedure CalculateRowVisibles; virtual; - function CalculateWidth: Integer; override; - function CanGenerateExpandButtonHitTest: Boolean; override; - function GetAutoHeight: Boolean; override; - function GetBackgroundBitmapBounds: TRect; override; - function GetContentBounds: TRect; override; - function GetContentHeight: Integer; override; - function GetContentWidth: Integer; override; - function GetExpandButtonAlignment: TcxGridCardExpandButtonAlignment; virtual; - function GetExpandButtonAreaBounds: TRect; override; - function GetExpandButtonAreaWidth: Integer; virtual; - class function GetExpandButtonSize(ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; virtual; - function GetHeight: Integer; override; - function GetLayerSeparatorAreaBounds: TRect; virtual; - function GetLayerSeparatorColor: TColor; virtual; - function GetLayerSeparatorWidth: Integer; virtual; - function GetMaxRowViewInfoHeight: Integer; virtual; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetRestSpaceBounds: TRect; virtual; - function GetScrollableAreaBounds: TRect; virtual; - function GetScrollButtonDownBounds: TRect; virtual; - function GetScrollButtonDownViewInfoClass: TcxGridCardScrollButtonDownViewInfoClass; virtual; - function GetScrollButtonUpViewInfoClass: TcxGridCardScrollButtonUpViewInfoClass; virtual; - function GetScrollButtonHeight: Integer; virtual; - function GetScrollButtonUpBounds: TRect; virtual; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - function GetWidth: Integer; override; - function HasCategorySeparator(ARowViewInfo: TcxGridCardCategoryRowViewInfo): Boolean; overload; virtual; - class function HasCategorySeparator(ARow: TcxGridCardViewRow): Boolean; overload; virtual; - function HasIndent(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; virtual; - function HasLayerSeparators: Boolean; virtual; - function IsRowPartiallyVisible(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; virtual; - function IsRowVisible(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; virtual; - function SupportsScrolling: Boolean; virtual; - - function GetZone(AHitTest: TcxCustomGridHitTest): TcxGridItemContainerZone; virtual; - function GetZoneBounds(AZone: TcxGridCardRowContainerZone): TRect; virtual; - function IsZoneVertical(AZone: TcxGridCardRowContainerZone): Boolean; virtual; - - function GetExpandButtonViewInfoClass: TcxGridCardExpandButtonViewInfoClass; virtual; - class function GetRowViewInfoClass(ARow: TcxGridCardViewRow): TcxGridCardRowViewInfoClass; virtual; - - property CacheItem: TcxGridCardViewInfoCacheItem read GetCacheItem; - property ExpandButtonAreaWidth: Integer read GetExpandButtonAreaWidth; - property ExpandButtonSize: Integer read GetExpandButtonSizeValue; - property FirstCaptionRowViewInfo: TcxGridCardRowViewInfo read GetFirstCaptionRowViewInfo; - property LayerSeparatorWidth: Integer read GetLayerSeparatorWidth; - property MaxRowViewInfoHeight: Integer read GetMaxRowViewInfoHeight; - property ScrollButtonDownBounds: TRect read GetScrollButtonDownBounds; - property ScrollButtonHeight: Integer read GetScrollButtonHeight; - property ScrollButtonUpBounds: TRect read GetScrollButtonUpBounds; - public - constructor Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); override; - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function GetBoundsForItem(AItem: TcxCustomGridTableItem): TRect; override; - procedure GetCardBorderViewParams(var AParams: TcxViewParams); virtual; - function GetCellViewInfoByItem(AItem: TcxCustomGridTableItem): TcxGridTableDataCellViewInfo; override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function IsFullyVisible: Boolean; - procedure MainCalculate(ALeftBound, ATopBound: Integer); override; - procedure MakeRowVisible(ARow: TcxGridCardViewRow); virtual; - function NeedsScrollingDown: Boolean; virtual; - function NeedsScrollingUp: Boolean; virtual; - function VisibleRowViewInfoIndexOf(ARow: TcxGridCardViewRow): Integer; overload; - function VisibleRowViewInfoIndexOf(ARowViewInfo: TcxGridCardRowViewInfo): Integer; overload; - - property CardBorderWidth: Integer read GetCardBorderWidth; - property Col: Integer read FCol; - //property DataWidth: Integer read GetDataWidth; - property ExpandButtonAlignment: TcxGridCardExpandButtonAlignment read GetExpandButtonAlignment; - property ExpandButtonViewInfo: TcxGridCardExpandButtonViewInfo read FExpandButtonViewInfo; - property GridView: TcxGridCardView read GetGridView; - property GridRecord: TcxGridCard read GetGridRecord; - property LayerSeparatorAreaBounds: TRect read GetLayerSeparatorAreaBounds; - property LayerSeparatorColor: TColor read GetLayerSeparatorColor; - property Layout: TcxGridCardRowLayout read FLayout; - property PartVisibleRowCount: Integer read FPartVisibleRowCount; - property RecordsViewInfo: TcxGridCardsViewInfo read GetRecordsViewInfo; - property RestSpaceBounds: TRect read GetRestSpaceBounds; - property Row: Integer read FRow; - property RowViewInfoCount: Integer read GetRowViewInfoCount; - property RowViewInfos[Index: Integer]: TcxGridCardRowViewInfo read GetRowViewInfo; - property ScrollableAreaBounds: TRect read GetScrollableAreaBounds; - property ScrollButtonDown: TcxGridCardScrollButtonDownViewInfo read FScrollButtonDown; - property ScrollButtonUp: TcxGridCardScrollButtonUpViewInfo read FScrollButtonUp; - property TopRowIndex: Integer read GetTopRowIndex write SetTopRowIndex; - property VisibleRowCount: Integer read FVisibleRowCount; - property VisibleRowViewInfoCount: Integer read GetVisibleRowViewInfoCount; - property VisibleRowViewInfos[Index: Integer]: TcxGridCardRowViewInfo read GetVisibleRowViewInfo; - end; - - // cards - - TcxGridCardsViewInfo = class(TcxCustomGridRecordsViewInfo) - private - FCardHeight: Integer; - FCardWidth: Integer; - FColumns: TcxGridCardViewColumns; - FMaxCardHeight: Integer; - function GetCardBorderWidth: Integer; - function GetCardContentWidth: Integer; - function GetCardIndent: Integer; - function GetColumnWidth: Integer; - function GetGridView: TcxGridCardView; - function GetGridViewInfo: TcxGridCardViewViewInfo; - function GetItem(Index: Integer): TcxGridCardViewInfo; - function GetRowHeight: Integer; - function GetViewData: TcxGridCardViewViewData; - protected - FPartVisibleCount: Integer; - procedure Calculate; override; - function CalculateCardHeight: Integer; virtual; - function CalculateCardRowHeight(ARow: TcxGridCardViewRow): Integer; virtual; - function CalculateCardWidth: Integer; virtual; - function CalculateContentBounds: TRect; override; - function CalculateHeight(var AFullyVisible: Boolean): Integer; virtual; - function CalculateMaxCardHeight: Integer; virtual; - function CalculateWidth(AMaxWidth: Integer): Integer; virtual; - function GetAutoCellHeight: Boolean; virtual; - function GetAutoDataRecordHeight: Boolean; override; - function GetCardSpaceHorz: Integer; virtual; abstract; - function GetCardSpaceVert: Integer; virtual; abstract; - //procedure GetDataCellDefaultViewParams(ARecord: TcxCustomGridRecord; - // AItem: TcxCustomGridTableItem; var AParams: TcxViewParams); override; - function GetItemLeftBound(AIndex: Integer): Integer; override; - function GetItemsOffset(AItemCountDelta: Integer): Integer; override; - function GetItemTopBound(AIndex: Integer): Integer; override; - function GetItemViewInfoClass: TcxGridCardViewInfoClass; virtual; - procedure OffsetItem(AIndex, AOffset: Integer); override; - - property CardIndent: Integer read GetCardIndent; - property CardSpaceHorz: Integer read GetCardSpaceHorz; - property CardSpaceVert: Integer read GetCardSpaceVert; - property GridView: TcxGridCardView read GetGridView; - property GridViewInfo: TcxGridCardViewViewInfo read GetGridViewInfo; - property ViewData: TcxGridCardViewViewData read GetViewData; - public - CardRowHeights: array of Integer; - constructor Create(AGridViewInfo: TcxCustomGridTableViewInfo); override; - destructor Destroy; override; - function GetRealItem(ARecord: TcxCustomGridRecord): TcxGridCardViewInfo; reintroduce; virtual; - function GetZone(AHitTest: TcxCustomGridHitTest): TcxGridItemContainerZone; virtual; - function UseCardHeight: Boolean; virtual; - function UseCardRowHeights: Boolean; virtual; - - property AutoCellHeight: Boolean read GetAutoCellHeight; - property CardBorderWidth: Integer read GetCardBorderWidth; - property CardContentWidth: Integer read GetCardContentWidth; - property CardHeight: Integer read FCardHeight; - property CardWidth: Integer read FCardWidth; - property Columns: TcxGridCardViewColumns read FColumns; - property ColumnWidth: Integer read GetColumnWidth; - property Items[Index: Integer]: TcxGridCardViewInfo read GetItem; default; - property MaxCardHeight: Integer read FMaxCardHeight; - property PartVisibleCount: Integer read FPartVisibleCount; - property RowHeight: Integer read GetRowHeight; - end; - - TcxGridCardsHorizontalViewInfo = class(TcxGridCardsViewInfo) - protected - procedure Calculate; override; - function GetCardSpaceHorz: Integer; override; - function GetCardSpaceVert: Integer; override; - end; - - TcxGridCardsVerticalViewInfo = class(TcxGridCardsViewInfo) - protected - procedure Calculate; override; - function GetCardSpaceHorz: Integer; override; - function GetCardSpaceVert: Integer; override; - end; - - // separators - - TcxGridCardViewSeparatorsViewInfoClass = class of TcxGridCardViewSeparatorsViewInfo; - - TcxGridCardViewSeparatorsViewInfo = class - private - FGridViewInfo: TcxGridCardViewViewInfo; - FItems: TList; - function GetColor: TColor; - function GetCount: Integer; - function GetGridView: TcxGridCardView; - function GetItem(Index: Integer): TRect; - function GetRecordsViewInfo: TcxGridCardsViewInfo; - function GetWidth: Integer; - procedure SetItem(Index: Integer; const Value: TRect); - procedure CreateItems; - procedure DestroyItems; - protected - function GetBounds: TRect; virtual; - function GetHitTestItem(Index: Integer): TRect; virtual; abstract; - function GetHitTestItemCount: Integer; virtual; abstract; - - property Bounds: TRect read GetBounds; - property GridView: TcxGridCardView read GetGridView; - property GridViewInfo: TcxGridCardViewViewInfo read FGridViewInfo; - property HitTestItemCount: Integer read GetHitTestItemCount; - property HitTestItems[Index: Integer]: TRect read GetHitTestItem; - property RecordsViewInfo: TcxGridCardsViewInfo read GetRecordsViewInfo; - public - constructor Create(AGridViewInfo: TcxGridCardViewViewInfo); virtual; - destructor Destroy; override; - procedure Calculate; virtual; abstract; - function GetHitTest(const P: TPoint): TcxGridCardViewSeparatorHitTest; virtual; - - property Color: TColor read GetColor; - property Count: Integer read GetCount; - property Items[Index: Integer]: TRect read GetItem write SetItem; default; - property Width: Integer read GetWidth; - end; - - TcxGridCardViewSeparatorsHorizontalViewInfo = class(TcxGridCardViewSeparatorsViewInfo) - protected - function GetHitTestItem(Index: Integer): TRect; override; - function GetHitTestItemCount: Integer; override; - public - procedure Calculate; override; - end; - - TcxGridCardViewSeparatorsVerticalViewInfo = class(TcxGridCardViewSeparatorsViewInfo) - protected - function GetHitTestItem(Index: Integer): TRect; override; - function GetHitTestItemCount: Integer; override; - public - procedure Calculate; override; - end; - - // card view - - TcxGridCardViewViewInfo = class(TcxCustomGridTableViewInfo) - private - FPrevCardHeight: Integer; - FSeparatorsViewInfo: TcxGridCardViewSeparatorsViewInfo; - function GetController: TcxGridCardViewController; - function GetGridView: TcxGridCardView; - function GetRecordsViewInfo: TcxGridCardsViewInfo; - function GetViewData: TcxGridCardViewViewData; - protected - procedure CreateViewInfos; override; - procedure DestroyViewInfos(AIsRecreating: Boolean); override; - - procedure AfterCalculating; override; - procedure BeforeCalculating; override; - procedure Calculate; override; - procedure CalculateHeight(const AMaxSize: TPoint; var AHeight: Integer; - var AFullyVisible: Boolean); override; - procedure CalculateWidth(const AMaxSize: TPoint; var AWidth: Integer); override; - function DoGetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function GetDefaultGridModeBufferCount: Integer; override; - function GetScrollableAreaBoundsForEdit: TRect; override; - - function GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; override; - function GetSeparatorsViewInfoClass: TcxGridCardViewSeparatorsViewInfoClass; virtual; - - property Controller: TcxGridCardViewController read GetController; - property GridView: TcxGridCardView read GetGridView; - property ViewData: TcxGridCardViewViewData read GetViewData; - public - function CanOffsetView(ARecordCountDelta: Integer): Boolean; override; - property RecordsViewInfo: TcxGridCardsViewInfo read GetRecordsViewInfo; - property SeparatorsViewInfo: TcxGridCardViewSeparatorsViewInfo read FSeparatorsViewInfo; - end; - - // cache - - TcxGridCardViewInfoCacheItem = class(TcxCustomGridTableViewInfoCacheItem) - private - FTopRowIndex: Integer; - FIsTopRowIndexAssigned: Boolean; - procedure SetTopRowIndex(Value: Integer); - public - procedure UnassignValues(AKeepMaster: Boolean); override; - property TopRowIndex: Integer read FTopRowIndex write SetTopRowIndex; - property IsTopRowIndexAssigned: Boolean read FIsTopRowIndexAssigned write FIsTopRowIndexAssigned; - end; - - { view } - - TcxGridCardViewRowOptions = class(TcxCustomGridTableItemOptions) - private - FExpanding: Boolean; - FShowData: Boolean; - procedure SetExpanding(Value: Boolean); - procedure SetShowData(Value: Boolean); - protected - procedure BeforeShowCaptionChange; override; - public - constructor Create(AItem: TcxCustomGridTableItem); override; - procedure Assign(Source: TPersistent); override; - published - property Expanding: Boolean read FExpanding write SetExpanding default True; - property Moving; - property ShowCaption; - property ShowData: Boolean read FShowData write SetShowData default True; - end; - - TcxGridCardViewRowPositionClass = class of TcxGridCardViewRowPosition; - - TcxGridCardViewRowPosition = class(TcxCustomGridTableItemCustomOptions) - private - FBeginsLayer: Boolean; - FLineCount: Integer; - FWidth: Integer; - function GetBeginsLayer: Boolean; - function GetColIndex: Integer; - function GetGridView: TcxGridCardView; - function GetIndexInLayer: Integer; - function GetItem: TcxGridCardViewRow; - function GetLayerIndex: Integer; - function GetLayerVisibleIndex: Integer; - function GetRowIndex: Integer; - function GetVisibleColIndex: Integer; - function GetVisibleIndexInLayer: Integer; - function GetVisibleRowIndex: Integer; - procedure SetBeginsLayer(Value: Boolean); - procedure SetColIndex(Value: Integer); - procedure SetIndexInLayer(Value: Integer); - procedure SetLayerIndex(Value: Integer); - procedure SetLineCount(Value: Integer); - procedure SetRowIndex(Value: Integer); - procedure SetWidth(Value: Integer); - protected - procedure AssignParams; - procedure SaveParams; - public - constructor Create(AItem: TcxCustomGridTableItem); override; - procedure Assign(Source: TPersistent); override; - function IsWholeLine: Boolean; - - property GridView: TcxGridCardView read GetGridView; - property Item: TcxGridCardViewRow read GetItem; - - property ColIndex: Integer read GetColIndex write SetColIndex; - property RowIndex: Integer read GetRowIndex write SetRowIndex; - - property VisibleColIndex: Integer read GetVisibleColIndex; - property VisibleRowIndex: Integer read GetVisibleRowIndex; - - property LayerVisibleIndex: Integer read GetLayerVisibleIndex; - property VisibleIndexInLayer: Integer read GetVisibleIndexInLayer; - published - property BeginsLayer: Boolean read GetBeginsLayer write SetBeginsLayer; - property IndexInLayer: Integer read GetIndexInLayer write SetIndexInLayer stored False; - property LayerIndex: Integer read GetLayerIndex write SetLayerIndex stored False; - property LineCount: Integer read FLineCount write SetLineCount default 1; - property Width: Integer read FWidth write SetWidth default 0; - end; - - TcxGridCardViewRowStyles = class(TcxCustomGridTableItemStyles) - private - FOnGetCaptionRowStyle: TcxGridGetCellStyleEvent; - FOnGetCaptionStyle: TcxGridGetCellStyleEvent; - FOnGetCategoryRowStyle: TcxGridGetCellStyleEvent; - function GetGridViewValue: TcxGridCardView; - function GetItem: TcxGridCardViewRow; - procedure SetOnGetCaptionRowStyle(Value: TcxGridGetCellStyleEvent); - procedure SetOnGetCaptionStyle(Value: TcxGridGetCellStyleEvent); - procedure SetOnGetCategoryRowStyle(Value: TcxGridGetCellStyleEvent); - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - procedure GetCaptionParams(ARecord: TcxCustomGridRecord; out AParams: TcxViewParams); virtual; - procedure GetCaptionRowParams(ARecord: TcxCustomGridRecord; out AParams: TcxViewParams); virtual; - procedure GetCategoryRowParams(ARecord: TcxCustomGridRecord; out AParams: TcxViewParams); virtual; - property GridView: TcxGridCardView read GetGridViewValue; - property Item: TcxGridCardViewRow read GetItem; - published - property Caption: TcxStyle index isRowCaption read GetValue write SetValue; - property CaptionRow: TcxStyle index isCaptionRow read GetValue write SetValue; - property CategoryRow: TcxStyle index isCategoryRow read GetValue write SetValue; - property OnGetCaptionRowStyle: TcxGridGetCellStyleEvent read FOnGetCaptionRowStyle - write SetOnGetCaptionRowStyle; - property OnGetCaptionStyle: TcxGridGetCellStyleEvent read FOnGetCaptionStyle - write SetOnGetCaptionStyle; - property OnGetCategoryRowStyle: TcxGridGetCellStyleEvent read FOnGetCategoryRowStyle - write SetOnGetCategoryRowStyle; - end; - - TcxGridCardViewRowKind = (rkData, rkCaption, rkCategory); - - TcxGridCardViewRow = class(TcxCustomGridTableItem) - private - FCategoryItems: TList; - FCategoryRow: TcxGridCardViewRow; - FExpanded: Boolean; - FKind: TcxGridCardViewRowKind; - FLockPositionSync: Boolean; - FPosition: TcxGridCardViewRowPosition; - function GetCaptionAlignmentHorz: TAlignment; - function GetCaptionAlignmentVert: TcxAlignmentVert; - function GetCategoryItem(AIndex: Integer): TcxGridCardViewRow; - function GetCategoryItemCount: Integer; - function GetExpanded: Boolean; - function GetGridView: TcxGridCardView; - function GetOptions: TcxGridCardViewRowOptions; - function GetStyles: TcxGridCardViewRowStyles; - procedure SetCaptionAlignmentHorz(Value: TAlignment); - procedure SetCaptionAlignmentVert(Value: TcxAlignmentVert); - procedure SetCategoryRow(Value: TcxGridCardViewRow); - procedure SetCategoryRowValue(Value: TcxGridCardViewRow); - procedure SetExpanded(Value: Boolean); - procedure SetKind(Value: TcxGridCardViewRowKind); - procedure SetOptions(Value: TcxGridCardViewRowOptions); - procedure SetPosition(Value: TcxGridCardViewRowPosition); - procedure SetStyles(Value: TcxGridCardViewRowStyles); - function IsCaptionAlignmentHorzStored: Boolean; - function IsCaptionAlignmentVertStored: Boolean; - protected - // IcxStoredObject - function GetStoredProperties(AProperties: TStrings): Boolean; override; - procedure GetPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetPropertyValue(const AName: string; const AValue: Variant); override; - - procedure CreateSubClasses; override; - procedure DestroySubClasses; override; - function GetOptionsClass: TcxCustomGridTableItemOptionsClass; override; - function GetPositionClass: TcxGridCardViewRowPositionClass; virtual; - function GetStylesClass: TcxCustomGridTableItemStylesClass; override; - - function CanEdit: Boolean; override; - function CanExpand: Boolean; virtual; - function CanFilter(AVisually: Boolean): Boolean; override; - function CanFocus(ARecord: TcxCustomGridRecord): Boolean; override; - function DefaultAlternateCaption: string; override; - function DefaultWidth: Integer; override; - function GetActuallyVisible: Boolean; override; - function GetExpandable: Boolean; virtual; - procedure GetItems(ARows: TList; AIncludeSubItems: Boolean); virtual; - function GetVisibleCaption: string; override; - function HasExpandableItems: Boolean; virtual; - - property CategoryItemsList: TList read FCategoryItems; - property GridView: TcxGridCardView read GetGridView; - property LockPositionSync: Boolean read FLockPositionSync write FLockPositionSync; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function HasCardExpandButton: Boolean; virtual; - function HasExpandButton: Boolean; virtual; - function IsVisibleInCard(ACard: TcxGridCard): Boolean; virtual; - procedure MoveTo(AIndex: Integer; AMoveSubItems: Boolean); - - property CategoryItemCount: Integer read GetCategoryItemCount; - property CategoryItems[AIndex: Integer]: TcxGridCardViewRow read GetCategoryItem; - property CategoryRow: TcxGridCardViewRow read FCategoryRow write SetCategoryRow; - property Expandable: Boolean read GetExpandable; - property Hidden; // obsolete, use VisibleForCustomization - published - property CaptionAlignmentHorz: TAlignment read GetCaptionAlignmentHorz write SetCaptionAlignmentHorz stored IsCaptionAlignmentHorzStored; - property CaptionAlignmentVert: TcxAlignmentVert read GetCaptionAlignmentVert write SetCaptionAlignmentVert stored IsCaptionAlignmentVertStored; - property Expanded: Boolean read GetExpanded write SetExpanded default False; - property Kind: TcxGridCardViewRowKind read FKind write SetKind default rkData; - property Options: TcxGridCardViewRowOptions read GetOptions write SetOptions; - property Position: TcxGridCardViewRowPosition read FPosition write SetPosition; - property SortIndex; - property SortOrder; - property Styles: TcxGridCardViewRowStyles read GetStyles write SetStyles; - property VisibleForCustomization; - end; - - // options - - TcxGridCardViewBackgroundBitmaps = class(TcxCustomGridTableBackgroundBitmaps) - protected - function GetBitmapStyleIndex(Index: Integer): Integer; override; - public - procedure Assign(Source: TPersistent); override; - function GetBitmap(Index: Integer): TBitmap; override; - published - property CaptionRow: TBitmap index bbCaptionRow read GetValue write SetValue; - property CardBorder: TBitmap index bbCardBorder read GetValue write SetValue; - property RowCaption: TBitmap index bbRowCaption read GetValue write SetValue; - end; - - TcxGridCardViewDateTimeHandling = class(TcxCustomGridTableDateTimeHandling); - - TcxGridCardViewFiltering = class(TcxCustomGridTableFiltering) - private - function GetRowFilteredItemsList: Boolean; - function GetRowMRUItemsList: Boolean; - function GetRowMRUItemsListCount: Integer; - function GetRowPopup: TcxGridItemFilterPopupOptions; - procedure SetRowFilteredItemsList(Value: Boolean); - procedure SetRowMRUItemsList(Value: Boolean); - procedure SetRowMRUItemsListCount(Value: Integer); - procedure SetRowPopup(Value: TcxGridItemFilterPopupOptions); - protected - procedure DefineProperties(Filer: TFiler); override; - public - // obsolete - use RowPopup.DropDownWidth - property DropDownWidth; - property RowPopupDropDownWidth: Integer read GetItemPopupDropDownWidth write SetItemPopupDropDownWidth; - // obsolete - use RowPopup.MaxDropDownItemCount - property MaxDropDownCount; - property RowPopupMaxDropDownItemCount: Integer read GetItemPopupMaxDropDownItemCount write SetItemPopupMaxDropDownItemCount; - published - property RowFilteredItemsList: Boolean read GetRowFilteredItemsList write SetRowFilteredItemsList default False; - property RowMRUItemsList: Boolean read GetRowMRUItemsList write SetRowMRUItemsList default True; - property RowMRUItemsListCount: Integer read GetRowMRUItemsListCount - write SetRowMRUItemsListCount default cxGridFilterDefaultItemMRUItemsListCount; - property RowPopup: TcxGridItemFilterPopupOptions read GetRowPopup write SetRowPopup; - end; - - TcxGridCardViewOptionsBehavior = class(TcxCustomGridTableOptionsBehavior) - private - FExpandRowOnDblClick: Boolean; - FRowCaptionHints: Boolean; - procedure SetExpandRowOnDblClick(Value: Boolean); - procedure SetRowCaptionHints(Value: Boolean); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - published - property ExpandRowOnDblClick: Boolean read FExpandRowOnDblClick write SetExpandRowOnDblClick default True; - property PullFocusing; - property RowCaptionHints: Boolean read FRowCaptionHints write SetRowCaptionHints default True; - end; - - TcxGridCardViewOptionsCustomize = class(TcxCustomGridTableOptionsCustomize) - private - FCardExpanding: Boolean; - FCardSizing: Boolean; - FLayeredRows: Boolean; - FRowExpanding: Boolean; - function GetGridView: TcxGridCardView; - function GetRowFiltering: Boolean; - function GetRowHiding: Boolean; - function GetRowMoving: Boolean; - procedure SetCardExpanding(Value: Boolean); - procedure SetCardSizing(Value: Boolean); - procedure SetLayeredRows(Value: Boolean); - procedure SetRowExpanding(Value: Boolean); - procedure SetRowFiltering(Value: Boolean); - procedure SetRowHiding(Value: Boolean); - procedure SetRowMoving(Value: Boolean); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - property GridView: TcxGridCardView read GetGridView; - published - property CardExpanding: Boolean read FCardExpanding write SetCardExpanding default False; - property CardSizing: Boolean read FCardSizing write SetCardSizing default True; - property LayeredRows: Boolean read FLayeredRows write SetLayeredRows default False; - property RowExpanding: Boolean read FRowExpanding write SetRowExpanding default True; - property RowFiltering: Boolean read GetRowFiltering write SetRowFiltering default True; - property RowHiding: Boolean read GetRowHiding write SetRowHiding default False; - property RowMoving: Boolean read GetRowMoving write SetRowMoving default False; - end; - - TcxGridCardViewOptionsData = class(TcxCustomGridTableOptionsData); - - TcxGridCardViewOptionsSelection = class(TcxCustomGridTableOptionsSelection) - private - FCardBorderSelection: Boolean; - procedure SetCardBorderSelection(Value: Boolean); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - published - property CardBorderSelection: Boolean read FCardBorderSelection write SetCardBorderSelection default True; - end; - - TcxGridCardViewOptionsView = class(TcxCustomGridTableOptionsView) - private - FCaptionSeparator: Char; - FCaptionWidth: Integer; - FCardAutoWidth: Boolean; - FCardBorderWidth: Integer; - FCardExpandButtonAlignment: TcxGridCardExpandButtonAlignment; - FCardIndent: Integer; - FCardWidth: Integer; - FCategoryIndent: Integer; - FCategoryRowCaptionInRowAlternateCaption: Boolean; - FCategorySeparatorWidth: Integer; - FEmptyRows: Boolean; - FLayerSeparatorWidth: Integer; - FSeparatorColor: TColor; - FSeparatorWidth: Integer; - function GetGridView: TcxGridCardView; - function GetRowCaptionAutoHeight: Boolean; - function GetRowCaptionEndEllipsis: Boolean; - function GetShowRowFilterButtons: TcxGridShowItemFilterButtons; - procedure SetCaptionSeparator(Value: Char); - procedure SetCaptionWidth(Value: Integer); - procedure SetCardAutoWidth(Value: Boolean); - procedure SetCardBorderWidth(Value: Integer); - procedure SetCardExpandButtonAlignment(Value: TcxGridCardExpandButtonAlignment); - procedure SetCardIndent(Value: Integer); - procedure SetCardWidth(Value: Integer); - procedure SetCategoryIndent(Value: Integer); - procedure SetCategoryRowCaptionInRowAlternateCaption(Value: Boolean); - procedure SetCategorySeparatorWidth(Value: Integer); - procedure SetEmptyRows(Value: Boolean); - procedure SetLayerSeparatorWidth(Value: Integer); - procedure SetRowCaptionAutoHeight(Value: Boolean); - procedure SetRowCaptionEndEllipsis(Value: Boolean); - procedure SetSeparatorColor(Value: TColor); - procedure SetSeparatorWidth(Value: Integer); - procedure SetShowRowFilterButtons(Value: TcxGridShowItemFilterButtons); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - function GetSeparatorColor: TColor; - property GridView: TcxGridCardView read GetGridView; - published - property CaptionSeparator: Char read FCaptionSeparator write SetCaptionSeparator default cxGridDefaultCardViewCaptionSeparator; - property CaptionWidth: Integer read FCaptionWidth write SetCaptionWidth default 0; - property CardAutoWidth: Boolean read FCardAutoWidth write SetCardAutoWidth default False; - property CardBorderWidth: Integer read FCardBorderWidth write SetCardBorderWidth - default cxGridDefaultCardBorderWidth; - property CardExpandButtonAlignment: TcxGridCardExpandButtonAlignment read FCardExpandButtonAlignment - write SetCardExpandButtonAlignment default cebaRight; - property CardIndent: Integer read FCardIndent write SetCardIndent default cxGridCardDefaultIndent; - property CardWidth: Integer read FCardWidth write SetCardWidth default cxGridCardDefaultWidth; - property CategoryIndent: Integer read FCategoryIndent write SetCategoryIndent default cxGridCardDefaultCategoryIndent; - property CategoryRowCaptionInRowAlternateCaption: Boolean read FCategoryRowCaptionInRowAlternateCaption - write SetCategoryRowCaptionInRowAlternateCaption default False; - property CategorySeparatorWidth: Integer read FCategorySeparatorWidth - write SetCategorySeparatorWidth default cxGridCardDefaultCategorySeparatorWidth; - property CellAutoHeight; - property CellTextMaxLineCount; - property EmptyRows: Boolean read FEmptyRows write SetEmptyRows default True; - property LayerSeparatorWidth: Integer read FLayerSeparatorWidth write SetLayerSeparatorWidth - default cxGridCardDefaultLayerSeparatorWidth; - property RowCaptionAutoHeight: Boolean read GetRowCaptionAutoHeight write SetRowCaptionAutoHeight default False; - property RowCaptionEndEllipsis: Boolean read GetRowCaptionEndEllipsis write SetRowCaptionEndEllipsis default False; - property SeparatorColor: TColor read FSeparatorColor write SetSeparatorColor default clDefault; - property SeparatorWidth: Integer read FSeparatorWidth write SetSeparatorWidth default cxGridDefaultCardViewSeparatorWidth; - property ShowRowFilterButtons: TcxGridShowItemFilterButtons read GetShowRowFilterButtons - write SetShowRowFilterButtons default sfbWhenSelected; - end; - - // styles - - TcxGridCardViewStyles = class(TcxCustomGridTableViewStyles) - private - FOnGetCaptionRowStyle: TcxGridGetCellStyleEvent; - FOnGetCardBorderStyle: TcxGridGetRecordStyleEvent; - FOnGetCategoryRowStyle: TcxGridGetCellStyleEvent; - FOnGetRowCaptionStyle: TcxGridGetCellStyleEvent; - function GetGridViewValue: TcxGridCardView; - procedure SetOnGetCaptionRowStyle(Value: TcxGridGetCellStyleEvent); - procedure SetOnGetCardBorderStyle(Value: TcxGridGetRecordStyleEvent); - procedure SetOnGetCategoryRowStyle(Value: TcxGridGetCellStyleEvent); - procedure SetOnGetRowCaptionStyle(Value: TcxGridGetCellStyleEvent); - protected - function GetBackgroundBitmapIndex(Index: Integer): Integer; virtual; - function GetDefaultBitmap(Index: Integer): TBitmap; virtual; - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - procedure GetCaptionRowParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetCardBorderParams(ARecord: TcxCustomGridRecord; out AParams: TcxViewParams); virtual; - procedure GetCardBorderVisualParams(ARecord: TcxCustomGridRecord; out AParams: TcxViewParams); virtual; - procedure GetCategoryRowParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetDataCellContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); override; - procedure GetRowCaptionParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - property GridView: TcxGridCardView read GetGridViewValue; - published - property CaptionRow: TcxStyle index vsCaptionRow read GetValue write SetValue; - property CardBorder: TcxStyle index vsCardBorder read GetValue write SetValue; - property CategoryRow: TcxStyle index vsCategoryRow read GetValue write SetValue; - property CategorySeparator: TcxStyle index vsCategorySeparator read GetValue write SetValue; - property LayerSeparator: TcxStyle index vsLayerSeparator read GetValue write SetValue; - property RowCaption: TcxStyle index vsRowCaption read GetValue write SetValue; - property StyleSheet; - property OnGetCaptionRowStyle: TcxGridGetCellStyleEvent read FOnGetCaptionRowStyle write SetOnGetCaptionRowStyle; - property OnGetCardBorderStyle: TcxGridGetRecordStyleEvent read FOnGetCardBorderStyle write SetOnGetCardBorderStyle; - property OnGetCategoryRowStyle: TcxGridGetCellStyleEvent read FOnGetCategoryRowStyle write SetOnGetCategoryRowStyle; - property OnGetRowCaptionStyle: TcxGridGetCellStyleEvent read FOnGetRowCaptionStyle write SetOnGetRowCaptionStyle; - end; - - TcxGridCardViewStyleSheet = class(TcxCustomStyleSheet) - private - function GetStylesValue: TcxGridCardViewStyles; - procedure SetStylesValue(Value: TcxGridCardViewStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TcxGridCardViewStyles read GetStylesValue write SetStylesValue; - end; - - // view - - TcxGridCardRowEvent = procedure(Sender: TcxGridCardView; ARow: TcxGridCardViewRow) of object; - TcxGridCardRowChangingEvent = procedure(Sender: TcxGridCardView; ARow: TcxGridCardViewRow; - var AAllow: Boolean) of object; - - TcxGridCardView = class(TcxCustomGridTableView) - private - FLayoutDirection: TcxGridCardViewLayoutDirection; - FOnRowCollapsing: TcxGridCardRowChangingEvent; - FOnRowCollapsed: TcxGridCardRowEvent; - FOnRowExpanding: TcxGridCardRowChangingEvent; - FOnRowExpanded: TcxGridCardRowEvent; - FOnRowPosChanged: TcxGridCardRowEvent; - FRowLayout: TcxGridCardViewRowLayout; - FRowLayoutController: TcxGridCardViewRowLayoutController; - function GetBackgroundBitmaps: TcxGridCardViewBackgroundBitmaps; - function GetControl: TcxCustomGrid; - function GetController: TcxGridCardViewController; - function GetDataController: TcxGridDataController; - function GetDateTimeHandling: TcxGridCardViewDateTimeHandling; - function GetFiltering: TcxGridCardViewFiltering; - function GetFirstCaptionRow: TcxGridCardViewRow; - function GetFirstCategoryRow: TcxGridCardViewRow; - function GetOptionsBehavior: TcxGridCardViewOptionsBehavior; - function GetOptionsCustomize: TcxGridCardViewOptionsCustomize; - function GetOptionsData: TcxGridCardViewOptionsData; - function GetOptionsSelection: TcxGridCardViewOptionsSelection; - function GetOptionsView: TcxGridCardViewOptionsView; - function GetPainter: TcxGridCardViewPainter; - function GetRow(Index: Integer): TcxGridCardViewRow; - function GetRowCount: Integer; - function GetStyles: TcxGridCardViewStyles; - function GetViewData: TcxGridCardViewViewData; - function GetViewInfo: TcxGridCardViewViewInfo; - function GetVisibleRow(Index: Integer): TcxGridCardViewRow; - function GetVisibleRowCount: Integer; - procedure SetBackgroundBitmaps(Value: TcxGridCardViewBackgroundBitmaps); - procedure SetDataController(Value: TcxGridDataController); - procedure SetDateTimeHandling(Value: TcxGridCardViewDateTimeHandling); - procedure SetFiltering(Value: TcxGridCardViewFiltering); - procedure SetLayoutDirection(Value: TcxGridCardViewLayoutDirection); - procedure SetOnRowCollapsed(Value: TcxGridCardRowEvent); - procedure SetOnRowCollapsing(Value: TcxGridCardRowChangingEvent); - procedure SetOnRowExpanded(Value: TcxGridCardRowEvent); - procedure SetOnRowExpanding(Value: TcxGridCardRowChangingEvent); - procedure SetOnRowPosChanged(Value: TcxGridCardRowEvent); - procedure SetOptionsBehavior(Value: TcxGridCardViewOptionsBehavior); - procedure SetOptionsCustomize(Value: TcxGridCardViewOptionsCustomize); - procedure SetOptionsData(Value: TcxGridCardViewOptionsData); - procedure SetOptionsSelection(Value: TcxGridCardViewOptionsSelection); - procedure SetOptionsView(Value: TcxGridCardViewOptionsView); - procedure SetRow(Index: Integer; Value: TcxGridCardViewRow); - procedure SetRowLayout(Value: TcxGridCardViewRowLayout); - procedure SetStyles(Value: TcxGridCardViewStyles); - procedure RefreshCategoryRowLinks; - protected - // IcxStoredObject - function GetProperties(AProperties: TStrings): Boolean; override; - procedure GetPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetPropertyValue(const AName: string; const AValue: Variant); override; - // IcxGridViewLayoutEditorSupport - for design-time layout editor - procedure AssignLayout(ALayoutView: TcxCustomGridView); override; - function GetLayoutCustomizationFormButtonCaption: string; override; - - procedure CreateHandlers; override; - procedure DestroyHandlers; override; - - function GetControllerClass: TcxCustomGridControllerClass; override; - function GetDataControllerClass: TcxCustomDataControllerClass; override; - function GetPainterClass: TcxCustomGridPainterClass; override; - function GetRowLayoutControllerClass: TcxGridCardViewRowLayoutControllerClass; virtual; - function GetViewDataClass: TcxCustomGridViewDataClass; override; - function GetViewInfoClass: TcxCustomGridViewInfoClass; override; - - procedure SaveRowParams; - procedure AssignRowParams; - - function GetRowCoordinates: TcxGridCardRowCoordinatesArray; - procedure SetRowCoordinates(const ACoordinates: TcxGridCardRowCoordinatesArray); - - procedure Updating; override; - procedure Updated; override; - - procedure BeforeRestoring; override; - procedure AfterRestoring; override; - - procedure ChangeItemIndex(AItem: TcxCustomGridTableItem; Value: Integer); override; - procedure DoAssign(ASource: TcxCustomGridView); override; - function GetResizeOnBoundsChange: Boolean; override; - procedure ItemIndexChanged(AItem: TcxCustomGridTableItem; AOldIndex: Integer); override; - procedure ItemVisibilityChanged(AItem: TcxCustomGridTableItem; Value: Boolean); override; - procedure RefreshVisibleItemsList; override; - procedure RowExpandedChanged(ARow: TcxGridCardViewRow); virtual; - function RowExpandedChanging(ARow: TcxGridCardViewRow; AValue: Boolean): Boolean; virtual; - - function CalculateDataCellSelected(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; AUseViewInfo: Boolean; - ACellViewInfo: TcxGridTableCellViewInfo): Boolean; override; - function DrawCardBorderSelected(ARecord: TcxCustomGridRecord): Boolean; virtual; - - function GetBackgroundBitmapsClass: TcxCustomGridBackgroundBitmapsClass; override; - function GetDateTimeHandlingClass: TcxCustomGridTableDateTimeHandlingClass; override; - function GetFilteringClass: TcxCustomGridTableFilteringClass; override; - function GetItemClass: TcxCustomGridTableItemClass; override; - function GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; override; - function GetOptionsCustomizeClass: TcxCustomGridTableOptionsCustomizeClass; override; - function GetOptionsDataClass: TcxCustomGridOptionsDataClass; override; - function GetOptionsSelectionClass: TcxCustomGridOptionsSelectionClass; override; - function GetOptionsViewClass: TcxCustomGridOptionsViewClass; override; - function GetStylesClass: TcxCustomGridViewStylesClass; override; - - function SupportsCardSizing: Boolean; virtual; - function SupportsLayeredRows: Boolean; virtual; - - procedure DoRowCollapsed(ARow: TcxGridCardViewRow); virtual; - function DoRowCollapsing(ARow: TcxGridCardViewRow): Boolean; virtual; - procedure DoRowExpanded(ARow: TcxGridCardViewRow); virtual; - function DoRowExpanding(ARow: TcxGridCardViewRow): Boolean; virtual; - procedure DoRowPositionChanged(ARow: TcxGridCardViewRow); virtual; - - property FirstCaptionRow: TcxGridCardViewRow read GetFirstCaptionRow; - property FirstCategoryRow: TcxGridCardViewRow read GetFirstCategoryRow; - public - function CreateRow: TcxGridCardViewRow; - - property Control: TcxCustomGrid read GetControl; - property Controller: TcxGridCardViewController read GetController; - property Painter: TcxGridCardViewPainter read GetPainter; - property RowCount: Integer read GetRowCount; - property Rows[Index: Integer]: TcxGridCardViewRow read GetRow write SetRow; - property RowLayoutController: TcxGridCardViewRowLayoutController read FRowLayoutController; - property ViewData: TcxGridCardViewViewData read GetViewData; - property ViewInfo: TcxGridCardViewViewInfo read GetViewInfo; - property VisibleRowCount: Integer read GetVisibleRowCount; - property VisibleRows[Index: Integer]: TcxGridCardViewRow read GetVisibleRow; - published - property BackgroundBitmaps: TcxGridCardViewBackgroundBitmaps read GetBackgroundBitmaps write - SetBackgroundBitmaps; - property DataController: TcxGridDataController read GetDataController - write SetDataController; - property DateTimeHandling: TcxGridCardViewDateTimeHandling read GetDateTimeHandling write SetDateTimeHandling; - property Filtering: TcxGridCardViewFiltering read GetFiltering write SetFiltering; - property LayoutDirection: TcxGridCardViewLayoutDirection read FLayoutDirection - write SetLayoutDirection default ldHorizontal; - property OptionsBehavior: TcxGridCardViewOptionsBehavior read GetOptionsBehavior - write SetOptionsBehavior; - property OptionsCustomize: TcxGridCardViewOptionsCustomize read GetOptionsCustomize - write SetOptionsCustomize; - property OptionsData: TcxGridCardViewOptionsData read GetOptionsData write SetOptionsData; - property OptionsSelection: TcxGridCardViewOptionsSelection read GetOptionsSelection - write SetOptionsSelection; - property OptionsView: TcxGridCardViewOptionsView read GetOptionsView write SetOptionsView; - property RowLayout: TcxGridCardViewRowLayout read FRowLayout write SetRowLayout default rlHorizontal; - property Styles: TcxGridCardViewStyles read GetStyles write SetStyles; - property OnCustomization; - property OnRowCollapsed: TcxGridCardRowEvent read FOnRowCollapsed write SetOnRowCollapsed; - property OnRowCollapsing: TcxGridCardRowChangingEvent read FOnRowCollapsing write SetOnRowCollapsing; - property OnRowExpanded: TcxGridCardRowEvent read FOnRowExpanded write SetOnRowExpanded; - property OnRowExpanding: TcxGridCardRowChangingEvent read FOnRowExpanding write SetOnRowExpanding; - property OnRowPosChanged: TcxGridCardRowEvent read FOnRowPosChanged write SetOnRowPosChanged; - end; - -implementation - -uses - SysUtils, Math, cxGeometry, cxScrollBar, cxGridStrs; - -const - CardDataIndent = 2; - CardExpandButtonOffset = 5; - CardRowDefaultWidth = 20; - CardRowExpandButtonOffset = 3; - SeparatorSizingZone = 7; - SeparatorSizingAddZone = 3; - EmptyCardHeight = 30; - - CardScrollingInterval = 300; - RowExpandingPauseTime = 800; - -procedure CalculateCardRowWidths(var AWidths: array of Integer; AAvailableWidth: Integer); -var - AAutoWidths: TcxAutoWidthObject; - AAllFixed: Boolean; - I: Integer; -begin - AAutoWidths := TcxAutoWidthObject.Create(Length(AWidths)); - try - AAllFixed := True; - for I := 0 to Length(AWidths) - 1 do - with AAutoWidths.AddItem do - begin - Width := AWidths[I]; - Fixed := Width <> 0; - AAllFixed := AAllFixed and Fixed; - if Width = 0 then Width := CardRowDefaultWidth; - end; - if AAllFixed or (AAutoWidths.Width > AAvailableWidth) then - for I := 0 to AAutoWidths.Count - 1 do - AAutoWidths[I].Fixed := False; - AAutoWidths.AvailableWidth := AAvailableWidth; - AAutoWidths.Calculate; - for I := 0 to Length(AWidths) - 1 do - AWidths[I] := AAutoWidths[I].AutoWidth; - finally - AAutoWidths.Free; - end; -end; - -{ TcxGridCardRowFilterButtonHitTest } - -class function TcxGridCardRowFilterButtonHitTest.GetHitTestCode: Integer; -begin - Result := htRowFilterButton; -end; - -class function TcxGridCardRowFilterButtonHitTest.CanClick: Boolean; -begin - Result := False; -end; - -{ TcxGridCardRowIndentHitTest } - -class function TcxGridCardRowIndentHitTest.GetHitTestCode: Integer; -begin - Result := htCardRowIndent; -end; - -{ TcxGridCardRowExpandButtonHitTest } - -class function TcxGridCardRowExpandButtonHitTest.GetHitTestCode: Integer; -begin - Result := htCardRowExpandButton; -end; - -{ TcxGridCardRowCellHitTest } - -function TcxGridCardRowCellHitTest.DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; -begin - if ((GridRecord = nil) or GridRecord.Visible) and TcxGridCardViewRow(Item).CanMove then - Result := TcxGridCardView(GridView).Controller.GetRowDragAndDropObjectClass - else - Result := nil; -end; - -{ TcxGridCardRowCaptionHitTest } - -class function TcxGridCardRowCaptionHitTest.GetHitTestCode: Integer; -begin - Result := htRowCaption; -end; - -{ TcxGridCardScrollButtonDownHitTest } - -class function TcxGridCardScrollButtonDownHitTest.GetHitTestCode: Integer; -begin - Result := htCardScrollButtonDown; -end; - -class function TcxGridCardScrollButtonDownHitTest.CanClick: Boolean; -begin - Result := False; -end; - -{ TcxGridCardScrollButtonUpHitTest } - -class function TcxGridCardScrollButtonUpHitTest.GetHitTestCode: Integer; -begin - Result := htCardScrollButtonUp; -end; - -class function TcxGridCardScrollButtonUpHitTest.CanClick: Boolean; -begin - Result := False; -end; - -{ TcxGridCardViewSeparatorHitTest } - -class function TcxGridCardViewSeparatorHitTest.GetHitTestCode: Integer; -begin - Result := htSeparator; -end; - -function TcxGridCardViewSeparatorHitTest.Cursor: TCursor; -begin - Result := crSizeWE; -end; - -function TcxGridCardViewSeparatorHitTest.DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; -begin - Result := TcxGridCardSizingObject; -end; - -{ TcxGridCard } - -constructor TcxGridCard.Create(AViewData: TcxCustomGridTableViewData; AIndex: Integer; - const ARecordInfo: TcxRowInfo); -begin - inherited; - FExpanded := True; -end; - -function TcxGridCard.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -procedure TcxGridCard.DoCollapse(ARecurse: Boolean); -begin - if FExpanded then - begin - if Focused then - GridView.Controller.FocusedItem := nil; - FExpanded := False; - GridView.SizeChanged; - end; -end; - -procedure TcxGridCard.DoExpand(ARecurse: Boolean); -begin - if not FExpanded then - begin - FExpanded := True; - GridView.SizeChanged; - end; -end; - -function TcxGridCard.GetExpandable: Boolean; -begin - Result := GridView.OptionsCustomize.CardExpanding; -end; - -function TcxGridCard.GetExpanded: Boolean; -begin - Result := not Expandable or FExpanded; -end; - -function TcxGridCard.GetHasCells: Boolean; -begin - Result := True; -end; - -function TcxGridCard.GetViewInfoCacheItemClass: TcxCustomGridViewInfoCacheItemClass; -begin - Result := TcxGridCardViewInfoCacheItem; -end; - -function TcxGridCard.GetViewInfoClass: TcxCustomGridRecordViewInfoClass; -begin - Result := GridView.ViewInfo.RecordsViewInfo.GetItemViewInfoClass; -end; - -procedure TcxGridCard.GetVisibleRows(ARows: TList); -var - I: Integer; - ARow: TcxGridCardViewRow; -begin - ARows.Clear; - for I := 0 to GridView.VisibleRowCount - 1 do - begin - ARow := GridView.VisibleRows[I]; - if ARow.IsVisibleInCard(Self) then ARows.Add(ARow); - end; -end; - -{ TcxGridCardViewViewData } - -function TcxGridCardViewViewData.GetCard(Index: Integer): TcxGridCard; -begin - Result := TcxGridCard(Records[Index]); -end; - -function TcxGridCardViewViewData.GetCardCount: Integer; -begin - Result := RecordCount; -end; - -function TcxGridCardViewViewData.GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; -begin - Result := TcxGridCard; -end; - -{ TcxGridCardRowContainerZone } - -constructor TcxGridCardRowContainerZone.Create(AGridRecord: TcxCustomGridRecord; - AItemIndex: Integer; AInsertionPos: TcxGridCardRowInsertionPos); -begin - inherited Create(AItemIndex); - GridRecord := AGridRecord; - InsertionPos := AInsertionPos; -end; - -function TcxGridCardRowContainerZone.GetItem: TcxGridCardViewRow; -var - AGridView: TcxGridCardView; -begin - AGridView := TcxGridCardView(GridRecord.GridView); - if (0 <= ItemIndex) and (ItemIndex < AGridView.VisibleRowCount) then - Result := AGridView.VisibleRows[ItemIndex] - else - Result := nil; -end; - -function TcxGridCardRowContainerZone.GetRecordViewInfo: TcxGridCardViewInfo; -begin - Result := TcxGridCardViewInfo(GridRecord.ViewInfo); -end; - -function TcxGridCardRowContainerZone.IsEqual(Value: TcxGridItemContainerZone): Boolean; -var - AValue: TcxGridCardRowContainerZone; -begin - AValue := Value as TcxGridCardRowContainerZone; - Result := inherited IsEqual(Value) and (GridRecord = AValue.GridRecord) and - (InsertionPos = AValue.InsertionPos); -end; - -{ TcxGridCardRowMovingObject } - -function TcxGridCardRowMovingObject.GetDestZone: TcxGridCardRowContainerZone; -begin - Result := TcxGridCardRowContainerZone(inherited DestZone); -end; - -function TcxGridCardRowMovingObject.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardRowMovingObject.GetRowLayout: TcxGridCardViewRowLayoutObject; -begin - Result := GridView.RowLayoutController.LayoutObject; -end; - -function TcxGridCardRowMovingObject.GetSourceItem: TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(inherited SourceItem); -end; - -function TcxGridCardRowMovingObject.GetViewInfo: TcxGridCardViewViewInfo; -begin - Result := TcxGridCardViewViewInfo(inherited ViewInfo); -end; - -function TcxGridCardRowMovingObject.GetVisibleRowLayout: TcxGridCardViewVisibleRowLayoutObject; -begin - Result := GridView.RowLayoutController.VisibleLayoutObject; -end; - -procedure TcxGridCardRowMovingObject.SetDestZone(Value: TcxGridCardRowContainerZone); -begin - inherited DestZone := Value; -end; - -procedure TcxGridCardRowMovingObject.SetSourceItem(Value: TcxGridCardViewRow); -begin - inherited SourceItem := Value; -end; - -procedure TcxGridCardRowMovingObject.RowExpandingHandler(Sender: TObject); -begin - StopRowExpanding; - ExpandingRow.Expanded := True; - if ExpandingRow.Expanded then - begin - DestZone.GridRecord.MakeVisible; - Controller.DesignerModified; - AfterViewChange; - end; -end; - -function TcxGridCardRowMovingObject.AreArrowsVertical: Boolean; -begin - Result := DestZone.RecordViewInfo.IsZoneVertical(DestZone); -end; - -procedure TcxGridCardRowMovingObject.CalculateDestParams(AHitTest: TcxCustomGridHitTest; - out AContainerKind: TcxGridItemContainerKind; out AZone: TcxGridItemContainerZone); -var - ADestRow: TcxGridCardViewRow; - ALayerIndex, ALayerCount, AFirstIndexInLayer, ALastIndexInLayer: Integer; - ALastVisibleSubItem: TcxGridCardViewRow; -begin - inherited; - if AContainerKind = ckNone then - begin - AZone := ViewInfo.RecordsViewInfo.GetZone(AHitTest); - if AZone <> nil then - begin - AContainerKind := ckRows; - ADestRow := TcxGridCardRowContainerZone(AZone).Item; - if (SourceItem.Kind = rkCategory) and - (ADestRow <> nil) and (ADestRow.CategoryRow <> nil) then - begin - AZone.ItemIndex := ADestRow.CategoryRow.VisibleIndex; - ALayerIndex := ADestRow.CategoryRow.Position.LayerVisibleIndex; - ALayerCount := VisibleRowLayout.GetLayerCount(ADestRow.CategoryRow); - if ALayerCount = 1 then - begin - AFirstIndexInLayer := ADestRow.CategoryRow.Position.VisibleIndexInLayer; - ALastVisibleSubItem := VisibleRowLayout.GetLastVisibleSubItem(ADestRow.CategoryRow); - ALastIndexInLayer := ALastVisibleSubItem.Position.VisibleIndexInLayer; - if ADestRow.Position.VisibleIndexInLayer > (AFirstIndexInLayer + ALastIndexInLayer) div 2 then - begin - AZone.ItemIndex := ALastVisibleSubItem.VisibleIndex + 1; - if (TcxGridCardRowContainerZone(AZone).Item = nil) or - (TcxGridCardRowContainerZone(AZone).Item.Position.LayerVisibleIndex <> ALayerIndex) then - TcxGridCardRowContainerZone(AZone).InsertionPos := ripPrevLayer - else - TcxGridCardRowContainerZone(AZone).InsertionPos := ripSameLayer; - end - else - TcxGridCardRowContainerZone(AZone).InsertionPos := ripSameLayer; - end - else - begin - if ADestRow.Position.LayerVisibleIndex - ALayerIndex >= MulDiv(ALayerCount, 1, 2) then - AZone.ItemIndex := VisibleRowLayout.LayerFirstRowIndex[ALayerIndex + ALayerCount]; - TcxGridCardRowContainerZone(AZone).InsertionPos := ripNewLayer; - end; - end; - end; - end; -end; - -function TcxGridCardRowMovingObject.CanRemove: Boolean; -begin - Result := SourceItem.VisibleForCustomization and - (SourceItemContainerKind = ckRows) and SourceItem.CanHide and - (GridView.Controller.Customization or GridView.OptionsCustomize.RowHiding); -end; - -procedure TcxGridCardRowMovingObject.ChangeSourceItemPosition; - - function GetInsertionRowIndex: Integer; - begin - if DestZone.InsertionPos = ripPrevLayer then - Result := DestZone.ItemIndex - 1 - else - Result := DestZone.ItemIndex; - end; - - function GetLayerIndex(AInsertionRow: TcxGridCardViewRow): Integer; - begin - if DestZone.InsertionPos = ripNewLayer then - if SourceItem.Kind = rkCategory then - if AInsertionRow = nil then - Result := RowLayout.LayerCount - else - Result := AInsertionRow.Position.LayerIndex - else - begin - if AInsertionRow = nil then - Result := VisibleRowLayout.LayerCount - else - Result := AInsertionRow.Position.LayerVisibleIndex; - if Result > 0 then - Result := VisibleRowLayout.LayerFirstRow[Result - 1].Position.LayerIndex + 1; - end - else - Result := AInsertionRow.Position.LayerIndex; - end; - - function GetIndexInLayer(AInsertionRow: TcxGridCardViewRow): Integer; - var - ALayerIndex: Integer; - begin - case DestZone.InsertionPos of - ripPrevLayer: - if SourceItem.Kind = rkCategory then - Result := RowLayout.LayerRowCount[SourceItem.Position.LayerIndex] - 1 - else - begin - Result := AInsertionRow.Position.IndexInLayer + 1; - if SourceItem.Position.IndexInLayer < Result then - Dec(Result); - end; - ripSameLayer: - begin - if SourceItem.Kind = rkCategory then - Result := AInsertionRow.Position.IndexInLayer - else - if AInsertionRow.Position.VisibleIndexInLayer = 0 then - Result := 0 - else - begin - ALayerIndex := SourceItem.Position.LayerVisibleIndex; - Result := AInsertionRow.Position.VisibleIndexInLayer - 1; - Result := VisibleRowLayout.LayerRows[ALayerIndex, Result].Position.IndexInLayer + 1; - end; - if SourceItem.Position.IndexInLayer < Result then Dec(Result); - end; - else - Result := -1; - end; - end; - - function IsNewLayer: Boolean; - begin - Result := DestZone.InsertionPos = ripNewLayer; - end; - -var - AInsertionRow: TcxGridCardViewRow; -begin - if GetInsertionRowIndex = GridView.VisibleRowCount then - AInsertionRow := nil - else - AInsertionRow := GridView.VisibleRows[GetInsertionRowIndex]; - RowLayout.SetLayerIndex(SourceItem, GetLayerIndex(AInsertionRow), IsNewLayer, True); - if GetIndexInLayer(AInsertionRow) <> -1 then - RowLayout.SetIndexInLayer(SourceItem, GetIndexInLayer(AInsertionRow), True); -end; - -function TcxGridCardRowMovingObject.GetArrowAreaBounds(APlace: TcxGridArrowPlace): TRect; -begin - Result := DestZone.RecordViewInfo.GetZoneBounds(DestZone); -end; - -function TcxGridCardRowMovingObject.GetArrowsClientRect: TRect; -begin - Result := DestZone.RecordViewInfo.ContentBounds; -end; - -function TcxGridCardRowMovingObject.GetSourceItemViewInfo: TcxCustomGridCellViewInfo; -begin - if SourceItemContainerKind = ckRows then - Result := ViewInfo.RecordsViewInfo.GetRealItem(FSourceGridRecord).RowViewInfos[SourceItem.VisibleIndex] - else - Result := inherited GetSourceItemViewInfo; -end; - -function TcxGridCardRowMovingObject.IsValidDestination: Boolean; -begin - Result := DestItemContainerKind = ckRows; - if Result then - begin - Result := not SourceItem.Visible; - if not Result then - if DestZone.InsertionPos = ripPrevLayer then - Result := SourceItem.VisibleIndex <> DestZone.ItemIndex - 1 - else - begin - Result := (DestZone.ItemIndex < SourceItem.VisibleIndex) or - (SourceItem.VisibleIndex + 1 < DestZone.ItemIndex); - if not Result then - case DestZone.InsertionPos of - ripNewLayer: - Result := not VisibleRowLayout.IsWholeLayer(SourceItem); - ripSameLayer: - Result := DestZone.Item.Position.LayerIndex <> SourceItem.Position.LayerIndex; - end; - end; - // do not allow to insert category row just after its items - if Result and (SourceItem.Kind = rkCategory) and SourceItem.Visible and SourceItem.Expanded and - ((DestZone.InsertionPos <> ripNewLayer) or VisibleRowLayout.IsWholeLayer(SourceItem)) and - ((DestZone.Item = nil) or - (DestZone.Item.Kind = rkCategory) and (SourceItem.VisibleIndex < DestZone.ItemIndex)) and - (GridView.VisibleRows[DestZone.ItemIndex - 1].CategoryRow = SourceItem) then - Result := False; - end; -end; - -procedure TcxGridCardRowMovingObject.BeginDragAndDrop; -begin - TcxGridCardViewController(Controller).IsReadyForImmediateEditing := False; - inherited; -end; - -procedure TcxGridCardRowMovingObject.DragAndDrop(const P: TPoint; var Accepted: Boolean); -var - AKeepRowExpanding: Boolean; - AHitTest: TcxCustomGridHitTest; -begin - inherited; - AKeepRowExpanding := False; - if DestItemContainerKind = ckRows then - begin - AHitTest := ViewInfo.GetHitTest(P); - if AHitTest.HitTestCode = htCardRowExpandButton then - begin - StartRowExpanding(TcxGridCardViewRow(TcxGridCardRowExpandButtonHitTest(AHitTest).Item)); - AKeepRowExpanding := True; - end - end; - if not AKeepRowExpanding then StopRowExpanding; -end; - -procedure TcxGridCardRowMovingObject.EndDragAndDrop(Accepted: Boolean); -var - ARowPositionChanged: Boolean; -begin - StopRowExpanding; - inherited; - if Accepted then - begin - ARowPositionChanged := False; - GridView.BeginUpdate; - try - if DestItemContainerKind = ckRows then - if IsValidDestination then - begin - ChangeSourceItemPosition; - SourceItem.Visible := True; - SourceItem.MakeVisible; - ARowPositionChanged := True; - end - else - else - if CanRemove then - begin - SourceItem.Visible := False; - ARowPositionChanged := True; - end; - finally - GridView.EndUpdate; - end; - if ARowPositionChanged then - GridView.DoRowPositionChanged(SourceItem); - end; -end; - -procedure TcxGridCardRowMovingObject.StartRowExpanding(ARow: TcxGridCardViewRow); -begin - if (FRowExpandingTimer <> nil) and (FExpandingRow = ARow) then Exit; - StopRowExpanding; - FExpandingRow := ARow; - FRowExpandingTimer := TcxTimer.Create(nil); - FRowExpandingTimer.Interval := RowExpandingPauseTime; - FRowExpandingTimer.OnTimer := RowExpandingHandler; -end; - -procedure TcxGridCardRowMovingObject.StopRowExpanding; -begin - FreeAndNil(FRowExpandingTimer); -end; - -procedure TcxGridCardRowMovingObject.Init(const P: TPoint; AParams: TcxCustomGridHitTest); -begin - inherited; - with AParams as TcxGridCardRowCellHitTest do - begin - SourceGridRecord := GridRecord; - SourceItem := TcxGridCardViewRow(Item); - end; - if AParams is TcxGridCardRowCaptionHitTest then - SourceItemContainerKind := TcxGridCardRowCaptionHitTest(AParams).RowContainerKind - else - SourceItemContainerKind := ckRows; -end; - -{ TcxGridCardSizingObject } - -constructor TcxGridCardSizingObject.Create(AControl: TcxControl); -begin - inherited; - FSeparators := TList.Create; -end; - -destructor TcxGridCardSizingObject.Destroy; -begin - ClearSeparators; - FSeparators.Free; - inherited; -end; - -function TcxGridCardSizingObject.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardSizingObject.GetSeparator(Index: Integer): TRect; -begin - Result := PRect(FSeparators[Index])^; -end; - -function TcxGridCardSizingObject.GetSeparatorCount: Integer; -begin - Result := FSeparators.Count; -end; - -function TcxGridCardSizingObject.GetViewInfo: TcxGridCardViewViewInfo; -begin - Result := TcxGridCardViewViewInfo(inherited ViewInfo); -end; - -procedure TcxGridCardSizingObject.SetDestPointX(Value: Integer); -var - APrevWidth: Integer; -begin - if FDestPointX <> Value then - begin - APrevWidth := CurrentWidth; - FDestPointX := Value; - if CurrentWidth <> APrevWidth then - Dirty := True; - end; -end; - -procedure TcxGridCardSizingObject.DirtyChanged; -begin - if not Dirty then - begin - ClearSeparators; - CalculateSeparators; - end; - DrawSeparators; -end; - -function TcxGridCardSizingObject.GetCurrentWidth: Integer; -begin - Result := OriginalWidth + DeltaWidth; - if Result < cxGridCardMinWidth then Result := cxGridCardMinWidth; -end; - -function TcxGridCardSizingObject.GetDeltaWidth: Integer; -begin - Result := (DestPointX - SourcePoint.X) div (FCardColumnIndex + 1); -end; - -function TcxGridCardSizingObject.GetDragAndDropCursor(Accepted: Boolean): TCursor; -begin - if Accepted then - Result := crSizeWE - else - Result := inherited GetDragAndDropCursor(Accepted); -end; - -function TcxGridCardSizingObject.GetImmediateStart: Boolean; -begin - Result := True; -end; - -function TcxGridCardSizingObject.GetOriginalWidth: Integer; -begin - Result := GridView.ViewInfo.RecordsViewInfo.CardWidth; -end; - -procedure TcxGridCardSizingObject.BeginDragAndDrop; -begin - FDestPointX := CurMousePos.X; - inherited; -end; - -procedure TcxGridCardSizingObject.DragAndDrop(const P: TPoint; - var Accepted: Boolean); -begin - DestPointX := P.X; - Accepted := True; - inherited; -end; - -procedure TcxGridCardSizingObject.EndDragAndDrop(Accepted: Boolean); -begin - inherited; - if Accepted then - GridView.OptionsView.CardWidth := CurrentWidth; -end; - -procedure TcxGridCardSizingObject.AddSeparator(const R: TRect); -var - ANewSeparator: PRect; -begin - New(ANewSeparator); - ANewSeparator^ := R; - FSeparators.Add(ANewSeparator); -end; - -procedure TcxGridCardSizingObject.CalculateSeparators; -var - ACardIndent, ACardWidth, APrevCardRight: Integer; - R: TRect; -begin - ACardIndent := GridView.OptionsView.CardIndent; - ACardWidth := CurrentWidth; - with ViewInfo.ClientBounds do - begin - R.Right := Left; - R.Top := Top + ACardIndent; - R.Bottom := Bottom - ACardIndent; - end; - repeat - R.Left := R.Right + ACardIndent + ACardWidth; - APrevCardRight := R.Left; - if GridView.LayoutDirection = ldHorizontal then - Inc(R.Left, ACardIndent) - else - Inc(R.Left, (ACardIndent - ViewInfo.SeparatorsViewInfo.Width) div 2); - if R.Left >= ViewInfo.ClientBounds.Right then Exit; - R.Right := R.Left + ViewInfo.SeparatorsViewInfo.Width; - AddSeparator(R); - if GridView.LayoutDirection = ldVertical then - R.Right := APrevCardRight; - until False; -end; - -procedure TcxGridCardSizingObject.ClearSeparators; -var - I: Integer; -begin - for I := 0 to SeparatorCount - 1 do - Dispose(PRect(FSeparators[I])); - FSeparators.Clear; -end; - -procedure TcxGridCardSizingObject.DrawSeparators; -var - I: Integer; -begin - for I := 0 to SeparatorCount - 1 do - Canvas.InvertRect(Separators[I]); -end; - -procedure TcxGridCardSizingObject.Init(const P: TPoint; AParams: TcxCustomGridHitTest); -begin - inherited; - FCardColumnIndex := (AParams as TcxGridCardViewSeparatorHitTest).Index; -end; - -{ TcxGridCardRowsListBox } - -function TcxGridCardRowsListBox.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardRowsListBox.CalculateItemHeight: Integer; -begin - Result := TcxGridCardRowCaptionViewInfo.GetCellHeight(Canvas.TextHeight('Qq'), - LookAndFeelPainter); -end; - -procedure TcxGridCardRowsListBox.DoRefreshItems; -begin - inherited; - RefreshItemsAsTableItems; -end; - -function TcxGridCardRowsListBox.GetDragAndDropParams: TcxCustomGridHitTest; -begin - Result := TcxGridCardRowCaptionHitTest.Instance(Point(-1, -1)); - with TcxGridCardRowCaptionHitTest(Result) do - begin - GridView := Self.GridView; - GridRecord := nil; - Item := TcxCustomGridTableItem(DragAndDropItem); - RowContainerKind := ckCustomizationForm; - end; -end; - -procedure TcxGridCardRowsListBox.PaintItem(ACanvas: TcxCanvas; R: TRect; - AIndex: Integer; AFocused: Boolean); -begin - with ACanvas do - begin - FillRect(R); - Inc(R.Left, cxGridCellTextOffset); - DrawText(Items[AIndex], R, cxAlignLeft or cxAlignVCenter or cxSingleLine or - Ord(GridView.OptionsView.RowCaptionEndEllipsis) * cxShowEndEllipsis); - end; -end; - -{ TcxGridCardViewCustomizationForm } - -function TcxGridCardViewCustomizationForm.GetItemsListBoxClass: TcxCustomGridTableItemsListBoxClass; -begin - Result := TcxGridCardRowsListBox; -end; - -function TcxGridCardViewCustomizationForm.GetItemsPageCaption: string; -begin - Result := cxGetResourceString(@scxGridCustomizationFormRowsPageCaption); -end; - -{ TcxGridCardViewControllerImpl } - -constructor TcxGridCardViewControllerImpl.Create(AController: TcxGridCardViewController); -begin - inherited Create; - FController := AController; -end; - -function TcxGridCardViewControllerImpl.GetControl: TcxControl; -begin - Result := FController.Control; -end; - -function TcxGridCardViewControllerImpl.GetDataController: TcxCustomDataController; -begin - Result := FController.DataController; -end; - -function TcxGridCardViewControllerImpl.GetScrollBarOffsetBegin: Integer; -begin - Result := FController.ScrollBarOffsetBegin; -end; - -function TcxGridCardViewControllerImpl.GetScrollBarOffsetEnd: Integer; -begin - Result := FController.ScrollBarOffsetEnd; -end; - -function TcxGridCardViewControllerImpl.GetViewData: TcxGridCardViewViewData; -begin - Result := FController.ViewData; -end; - -function TcxGridCardViewControllerImpl.GetViewInfo: TcxGridCardViewViewInfo; -begin - Result := FController.ViewInfo; -end; - -procedure TcxGridCardViewControllerImpl.KeyDown(var Key: Word; Shift: TShiftState); -begin -end; - -{ TcxGridCardViewControllerHorizontalImpl } - -procedure TcxGridCardViewControllerHorizontalImpl.FocusRecordInNextColumn(ADirection: TcxDirection; - AIsSelecting: Boolean); -var - ARecordViewInfo: TcxGridCardViewInfo; - ACheckPos: Integer; - - function MarginCol(AIsLeftDirection: Boolean): Integer; - begin - if AIsLeftDirection then - Result := 0 - else - Result := ViewInfo.RecordsViewInfo.Columns.VisibleCount - 1; - end; - - function NextCol: Integer; - begin - if ARecordViewInfo = nil then - Result := MarginCol(ADirection = dirRight) - else - if ADirection = dirLeft then - Result := ARecordViewInfo.Col - 1 - else - Result := ARecordViewInfo.Col + 1; - end; - - function MarginRecordIndex: Integer; - begin - if ADirection = dirLeft then - Result := 0 - else - Result := ViewData.RecordCount - 1; - end; - -begin - with Controller do - try - if FocusedRecordIndex = -1 then - begin - if ADirection = dirLeft then - GoToFirst - else - GoToLast(False); - Exit; - end; - MakeFocusedRecordVisible; - ARecordViewInfo := ViewInfo.RecordsViewInfo.GetRealItem(FocusedRecord); - ACheckPos := ARecordViewInfo.Bounds.Top; - if ARecordViewInfo.Col = MarginCol(ADirection = dirLeft) then - begin - ScrollData(ADirection); - ARecordViewInfo := ViewInfo.RecordsViewInfo.GetRealItem(FocusedRecord); - if (ARecordViewInfo <> nil) and - (ARecordViewInfo.Col = MarginCol(ADirection = dirLeft)) then - begin - if ARecordViewInfo.Bounds.Top <> ACheckPos then - GoToPrev(False) - else - if GridView.IsDetail then - FocusNextRecord(MarginRecordIndex, ADirection = dirRight, False, - not AIsSelecting, not AIsSelecting); - Exit; - end; - end; - ARecordViewInfo := ViewInfo.RecordsViewInfo.Columns[NextCol].GetNearestRow(ACheckPos); - FocusedRecord := ARecordViewInfo.GridRecord; - finally - MakeFocusedItemVisible; - end; -end; - -function TcxGridCardViewControllerHorizontalImpl.GetIsRecordsScrollHorizontal: Boolean; -begin - Result := True; -end; - -function TcxGridCardViewControllerHorizontalImpl.GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; -begin - Result := mwskHorizontal; -end; - -function TcxGridCardViewControllerHorizontalImpl.GetScrollDelta: Integer; -begin - if ViewInfo.RecordsViewInfo.Columns.Count = 0 then - Result := 0 - else - Result := ViewInfo.RecordsViewInfo.Columns[0].RowCount -end; - -procedure TcxGridCardViewControllerHorizontalImpl.InitScrollBarsParameters; -begin - with Controller do - begin - SetScrollBarInfo(sbHorizontal, 0, ScrollBarRecordCount - 1, - ScrollDelta, ViewInfo.VisibleRecordCount, ScrollBarPos, True, CanHScrollBarHide); - SetScrollBarInfo(sbVertical, 0, -1, 0, 0, 0, True, True); - end; -end; - -procedure TcxGridCardViewControllerHorizontalImpl.KeyDown(var Key: Word; - Shift: TShiftState); -begin - inherited; - case Key of - VK_LEFT: - FocusRecordInNextColumn(dirLeft, ssShift in Shift); - VK_RIGHT: - FocusRecordInNextColumn(dirRight, ssShift in Shift); - VK_UP: - Controller.GoToPrev(not (ssShift in Shift), False); - VK_DOWN: - Controller.GoToNext(not (ssShift in Shift), False); - end; -end; - -{ TcxGridCardViewControllerVerticalImpl } - -procedure TcxGridCardViewControllerVerticalImpl.FocusRecordInNextRow(ADirection: TcxDirection; - AIsSelecting: Boolean); -var - ANewFocusedRecordIndex: Integer; - AIsNewFocusedRecordOutOfRange: Boolean; - - function NextRecordIndex: Integer; - begin - with Controller do - if ADirection = dirUp then - Result := FocusedRecordIndex - ScrollDelta - else - Result := FocusedRecordIndex + ScrollDelta; - end; - - function IsOnBound: Boolean; - begin - Result := - DataController.IsGridMode and - (DataController.IsBOF and (ADirection = dirUp) or - DataController.IsEOF and (ADirection = dirDown)) or - not DataController.IsGridMode and AIsNewFocusedRecordOutOfRange; - end; - - function MarginRecordIndex: Integer; - begin - if ADirection = dirUp then - Result := 0 - else - Result := ViewData.RecordCount - 1; - end; - -begin - with Controller do - begin - if FocusedRecordIndex = -1 then - begin - if ADirection = dirUp then - GoToFirst - else - GoToLast(False); - Exit; - end; - MakeFocusedRecordVisible; - ANewFocusedRecordIndex := NextRecordIndex; - AIsNewFocusedRecordOutOfRange := (ANewFocusedRecordIndex < 0) or - (ANewFocusedRecordIndex > ViewData.RecordCount - 1); - if IsOnBound then - begin - if GridView.IsDetail then - FocusNextRecord(MarginRecordIndex, ADirection = dirDown, False, - not AIsSelecting, not AIsSelecting); - Exit; - end; - if DataController.IsGridMode and AIsNewFocusedRecordOutOfRange or - not ViewData.Records[ANewFocusedRecordIndex].Visible then - begin - ScrollData(ADirection); - if AIsNewFocusedRecordOutOfRange then - begin - if ANewFocusedRecordIndex < 0 then ANewFocusedRecordIndex := 0; - if ANewFocusedRecordIndex > ViewData.RecordCount - 1 then - ANewFocusedRecordIndex := ViewData.RecordCount - 1; - end; - end; - FocusedRecordIndex := ANewFocusedRecordIndex; - end; -end; - -function TcxGridCardViewControllerVerticalImpl.GetIsRecordsScrollHorizontal: Boolean; -begin - Result := False; -end; - -function TcxGridCardViewControllerVerticalImpl.GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; -begin - Result := mwskVertical; -end; - -function TcxGridCardViewControllerVerticalImpl.GetScrollDelta: Integer; -begin - Result := ViewInfo.RecordsViewInfo.Columns.Count; -end; - -procedure TcxGridCardViewControllerVerticalImpl.InitScrollBarsParameters; -begin - with Controller do - begin - SetScrollBarInfo(sbHorizontal, 0, -1, 0, 0, 0, True, CanHScrollBarHide); - SetScrollBarInfo(sbVertical, 0, ScrollBarRecordCount - 1, - ScrollDelta, ViewInfo.VisibleRecordCount, ScrollBarPos, True, True); - end; -end; - -procedure TcxGridCardViewControllerVerticalImpl.KeyDown(var Key: Word; - Shift: TShiftState); -begin - inherited; - case Key of - VK_LEFT: - begin - Controller.GoToPrev(not (ssShift in Shift), False); - Controller.MakeFocusedItemVisible; - end; - VK_RIGHT: - begin - Controller.GoToNext(not (ssShift in Shift), False); - Controller.MakeFocusedItemVisible; - end; - VK_UP: - FocusRecordInNextRow(dirUp, ssShift in Shift); - VK_DOWN: - FocusRecordInNextRow(dirDown, ssShift in Shift); - end; -end; - -{ TcxGridCardViewController } - -constructor TcxGridCardViewController.Create(AGridView: TcxCustomGridView); -begin - inherited; - CreateImplementationObject; -end; - -destructor TcxGridCardViewController.Destroy; -begin - DestroyImplementationObject; - inherited; -end; - -function TcxGridCardViewController.GetCustomizationForm: TcxGridCardViewCustomizationForm; -begin - Result := TcxGridCardViewCustomizationForm(inherited CustomizationForm); -end; - -function TcxGridCardViewController.GetFocusedCard: TcxGridCard; -begin - Result := TcxGridCard(FocusedRecord); -end; - -function TcxGridCardViewController.GetFocusedCardViewInfo: TcxGridCardViewInfo; -begin - if FocusedRecord = nil then - Result := nil - else - Result := TcxGridCardViewInfo(FocusedRecord.ViewInfo); -end; - -function TcxGridCardViewController.GetFocusedRow: TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(inherited FocusedItem); -end; - -function TcxGridCardViewController.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardViewController.GetScrollDelta: Integer; -begin - Result := ImplementationObject.GetScrollDelta; -end; - -function TcxGridCardViewController.GetTopCardIndex: Integer; -begin - Result := TopRecordIndex; -end; - -function TcxGridCardViewController.GetViewData: TcxGridCardViewViewData; -begin - Result := TcxGridCardViewViewData(inherited ViewData); -end; - -function TcxGridCardViewController.GetViewInfo: TcxGridCardViewViewInfo; -begin - Result := TcxGridCardViewViewInfo(inherited ViewInfo); -end; - -procedure TcxGridCardViewController.SetFocusedCard(Value: TcxGridCard); -begin - FocusedRecord := Value; -end; - -procedure TcxGridCardViewController.SetFocusedRow(Value: TcxGridCardViewRow); -begin - inherited FocusedItem := Value; -end; - -procedure TcxGridCardViewController.SetScrollCardViewInfo(Value: TcxGridCardViewInfo); -var - AScrollDirection: TcxDirection; -begin - if FScrollCardViewInfo <> Value then - begin - AScrollDirection := ScrollDirection; - ScrollDirection := dirNone; - FScrollCardViewInfo := Value; - if FScrollCardViewInfo <> nil then - ScrollDirection := AScrollDirection; - end; -end; - -procedure TcxGridCardViewController.SetTopCardIndex(Value: Integer); -begin - TopRecordIndex := Value; -end; - -procedure TcxGridCardViewController.CreateImplementationObject; -begin - FImplementationObject := GetImplementationObjectClass.Create(Self); -end; - -procedure TcxGridCardViewController.DestroyImplementationObject; -begin - FreeAndNil(FImplementationObject); -end; - -function TcxGridCardViewController.GetImplementationObjectClass: TcxGridCardViewControllerImplClass; -begin - case GridView.LayoutDirection of - ldHorizontal: - Result := TcxGridCardViewControllerHorizontalImpl; - ldVertical: - Result := TcxGridCardViewControllerVerticalImpl; - else - Result := nil; - end; -end; - -function TcxGridCardViewController.CanFocusNextItem(AFocusedItemIndex, ANextItemIndex: Integer; - AGoForward, AGoOnCycle, AGoToNextRecordOnCycle: Boolean): Boolean; -begin - Result := inherited CanFocusNextItem(AFocusedItemIndex, ANextItemIndex, AGoForward, AGoOnCycle, AGoToNextRecordOnCycle) and - (not AGoToNextRecordOnCycle or - (not AGoForward and (not CanScrollFocusedCard(False) or (ANextItemIndex < AFocusedItemIndex)) or - AGoForward and (not CanScrollFocusedCard(True) or (ANextItemIndex > AFocusedItemIndex)))); -end; - -type - TCanFocusRowData = class - Card: TcxGridCard; - Rows: TList; - end; - -function CanFocusRow(AOwner: TcxCustomGridTableView; AItemIndex: Integer; AData: TObject): Boolean; -begin - Result := TcxGridCardViewRow(TCanFocusRowData(AData).Rows[AItemIndex]).CanFocus(TCanFocusRowData(AData).Card); -end; - -function TcxGridCardViewController.FindNextRow(ACard: TcxGridCard; ARows: TList; - ARow: TcxGridCardViewRow; AGoForward, AGoOnCycle: Boolean; out ACycleChanged: Boolean): TcxGridCardViewRow; -var - AData: TCanFocusRowData; - ARowIndex: Integer; -begin - AData := TCanFocusRowData.Create; - try - AData.Card := ACard; - AData.Rows := ARows; - if FindNextCustomItem(ARows.IndexOf(ARow), ARows.Count, - AGoForward, AGoOnCycle, @CanFocusRow, AData, ARowIndex, ACycleChanged) then - Result := TcxGridCardViewRow(ARows[ARowIndex]) - else - Result := nil; - finally - AData.Free; - end; -end; - -function TcxGridCardViewController.GetDesignHitTest(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := inherited GetDesignHitTest(AHitTest); - if not Result then - Result := AHitTest.HitTestCode in [htExpandButton, htCardRowExpandButton, htRowCaption, htCell]; -end; - -function TcxGridCardViewController.GetDragScrollInterval: Integer; -begin - Result := 300; -end; - -function TcxGridCardViewController.GetIsRecordsScrollHorizontal: Boolean; -begin - Result := FImplementationObject.GetIsRecordsScrollHorizontal; -end; - -function TcxGridCardViewController.GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; -begin - Result := FImplementationObject.GetMouseWheelScrollingKind; -end; - -function TcxGridCardViewController.IsKeyForMultiSelect(AKey: Word; - AShift: TShiftState; AFocusedRecordChanged: Boolean): Boolean; -begin - Result := inherited IsKeyForMultiSelect(AKey, AShift, AFocusedRecordChanged) or - (AKey = VK_LEFT) or (AKey = VK_RIGHT) or - ((AKey = VK_UP) or (AKey = VK_DOWN) or (AKey = VK_HOME) or (AKey = VK_END)) and - (not GridView.OptionsSelection.CellSelect or (FocusedItem = nil) or - AFocusedRecordChanged); -end; - -function TcxGridCardViewController.ProcessFocusedRowKeys(var AKey: Word; - AShift: TShiftState; ARowGoOnCycle: Boolean): Boolean; -begin - Result := False; - if FocusedRow <> nil then - case AKey of - VK_LEFT, VK_RIGHT: - Result := FocusNextRowHorizontally(AKey = VK_RIGHT, ARowGoOnCycle); - VK_UP, VK_DOWN: - Result := FocusNextRowVertically(AKey = VK_DOWN, ARowGoOnCycle); - VK_HOME: - if AShift = [] then - begin - FocusNextItem(-1, True, False, False, True); - Result := True; - end; - VK_END: - if AShift = [] then - begin - FocusNextItem(-1, False, True, False, True); - Result := True; - end; - VK_ESCAPE: - if GridView.OptionsSelection.InvertSelect and (FocusedRow <> nil) then - begin - FocusedRow := nil; - Result := True; - end; - end - else - if AKey = VK_F2 then - Result := FocusNextItem(-1, True, False, False, True); -end; - -procedure TcxGridCardViewController.RowExpandedChanged(ARow: TcxGridCardViewRow); -begin -end; - -procedure TcxGridCardViewController.RowExpandedChanging(ARow: TcxGridCardViewRow; - AValue: Boolean); -begin - if IsDragging then - DragAndDropObject.BeforeViewChange; -end; - -procedure TcxGridCardViewController.ScrollData(ADirection: TcxDirection); -begin - if Site.DragAndDropState = ddsNone then - ScrollRecords(ADirection in [dirRight, dirDown], ScrollDelta) - else - with FScrollCardViewInfo do - case ADirection of - dirUp: - TopRowIndex := TopRowIndex - 1; - dirDown: - TopRowIndex := TopRowIndex + 1; - end; -end; - -function TcxGridCardViewController.CanScrollData(ADirection: TcxDirection): Boolean; -begin - with FScrollCardViewInfo do - case ADirection of - dirUp: - Result := NeedsScrollingUp; - dirDown: - Result := NeedsScrollingDown; - else - Result := inherited CanScrollData(ADirection); - end; -end; - -function TcxGridCardViewController.GetScrollDataTimeInterval(ADirection: TcxDirection): Integer; -begin - if ADirection in [dirUp, dirDown] then - Result := CardScrollingInterval - else - Result := inherited GetScrollDataTimeInterval(ADirection); -end; - -function TcxGridCardViewController.GetCustomizationFormClass: TcxCustomGridCustomizationFormClass; -begin - Result := TcxGridCardViewCustomizationForm; -end; - -function TcxGridCardViewController.GetRowDragAndDropObjectClass: TcxGridCardRowMovingObjectClass; -begin - Result := TcxGridCardRowMovingObject; -end; - -procedure TcxGridCardViewController.CheckScrolling(const P: TPoint); -var - AHitTest: TcxCustomGridHitTest; -begin - AHitTest := ViewInfo.GetHitTest(P); - case AHitTest.HitTestCode of - htCardScrollButtonUp, htCardScrollButtonDown: - begin - ScrollCardViewInfo := - TcxCustomGridCardScrollButtonViewInfo(AHitTest.ViewInfo).CardViewInfo; - if AHitTest.HitTestCode = htCardScrollButtonUp then - ScrollDirection := dirUp - else - ScrollDirection := dirDown; - end - else - ScrollDirection := dirNone; - end; -end; - -function TcxGridCardViewController.IsDataFullyVisible(AIsCallFromMaster: Boolean = False): Boolean; -var - I: Integer; -begin - Result := True; - for I := 0 to ViewInfo.RecordsViewInfo.PartVisibleCount - 1 do - begin - Result := ViewInfo.RecordsViewInfo[I].IsFullyVisible; - if not Result then Break; - end; - if Result then - Result := inherited IsDataFullyVisible(AIsCallFromMaster); -end; - -procedure TcxGridCardViewController.MakeItemVisible(AItem: TcxCustomGridTableItem); -var - ARow: TcxGridCardViewRow; -begin - ARow := TcxGridCardViewRow(AItem); - if (ARow <> nil) and (ARow.CategoryRow <> nil) then - ARow.CategoryRow.Expanded := True; - MakeFocusedRecordVisible; - if (ARow <> nil) and (FocusedCardViewInfo <> nil) and - not TcxCustomGrid(Control).UpdateLocked then - FocusedCardViewInfo.MakeRowVisible(ARow); -end; - -function TcxGridCardViewController.CanScrollFocusedCard(ADown: Boolean): Boolean; -begin - Result := (FocusedCardViewInfo <> nil) and - (not ADown and FocusedCardViewInfo.NeedsScrollingUp or - ADown and FocusedCardViewInfo.NeedsScrollingDown); -end; - -function TcxGridCardViewController.ScrollFocusedCard(ADown: Boolean): Boolean; -var - APrevTopRowIndex: Integer; -begin - Result := (FocusedCardViewInfo <> nil) and CanScrollFocusedCard(ADown); - if Result then - with FocusedCardViewInfo do - begin - APrevTopRowIndex := TopRowIndex; - TopRowIndex := TopRowIndex + 2 * Ord(ADown) - 1; - Result := TopRowIndex <> APrevTopRowIndex; - end; -end; - -procedure TcxGridCardViewController.InitScrollBarsParameters; -begin - ImplementationObject.InitScrollBarsParameters; -end; - -procedure TcxGridCardViewController.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -begin - case AScrollCode of - scLineUp: - ScrollData(dirLeft); - scLineDown: - ScrollData(dirRight); - scPageUp: - ScrollPage(False); - scPageDown: - ScrollPage(True); - scTrack: - if not DataController.IsGridMode then - //TopCardIndex := AScrollPos; - ScrollBarPos := AScrollPos; - scPosition: - if DataController.IsGridMode then - ScrollBarPos := AScrollPos; - end; - AScrollPos := ScrollBarPos; -end; - -procedure TcxGridCardViewController.KeyDown(var Key: Word; Shift: TShiftState); -var - APrevFocusedRecordIndex: Integer; -begin - if (FocusedRecordIndex <> -1) and (FocusedRow <> nil) and FocusedRow.CanExpand then - case Key of - VK_ADD: - if not FocusedRow.Expanded then - begin - EatKeyPress := True; - FocusedRow.Expanded := True; - MakeFocusedRecordVisible; - Key := 0; - end; - VK_SUBTRACT: - if FocusedRow.Expanded then - begin - EatKeyPress := True; - FocusedRow.Expanded := False; - MakeFocusedRecordVisible; - Key := 0; - end; - end; - inherited; - if FocusedRecordIndex <> -1 then - begin - if GridView.OptionsSelection.CellSelect and ProcessFocusedRowKeys(Key, Shift, False) then - Exit; - if ((Key = VK_UP) or (Key = VK_DOWN)) and ScrollFocusedCard(Key = VK_DOWN) then - Exit; - end; - APrevFocusedRecordIndex := FocusedRecordIndex; - case Key of - VK_HOME: - GoToFirst(False); - VK_END: - GoToLast(False, False); - end; - ImplementationObject.KeyDown(Key, Shift); - if (FocusedRecordIndex <> APrevFocusedRecordIndex) and - (FocusedRecordIndex <> -1) and GridView.OptionsSelection.CellSelect then - ProcessFocusedRowKeys(Key, Shift, True); -end; - -procedure TcxGridCardViewController.LayoutDirectionChanged; -begin - DestroyImplementationObject; - CreateImplementationObject; -end; - -function TcxGridCardViewController.FocusNextRowHorizontally(AGoForward, AGoOnCycle: Boolean): Boolean; -var - ARow: TcxGridCardViewRow; - ACycleChanged: Boolean; -begin - Result := FocusedRecordHasCells(True); - if Result then - begin - ARow := GridView.RowLayoutController.FindNextRowHorizontally(FocusedCard, - FocusedRow, AGoForward, AGoOnCycle, ACycleChanged); - Result := ARow <> nil; - if Result then - ARow.Focused := True; - end; -end; - -function TcxGridCardViewController.FocusNextRowVertically(AGoForward, AGoOnCycle: Boolean): Boolean; -var - ARow: TcxGridCardViewRow; - ACycleChanged: Boolean; -begin - Result := FocusedRecordHasCells(True); - if Result then - begin - ARow := GridView.RowLayoutController.FindNextRowVertically(FocusedCard, - FocusedRow, AGoForward, AGoOnCycle, ACycleChanged); - Result := ARow <> nil; - if Result then - ARow.Focused := True; - end; -end; - -{ TcxCustomGridCardRowLayoutObject } - -constructor TcxCustomGridCardRowLayoutObject.Create; -begin - inherited; - FLayerRowCounts := TList.Create; -end; - -destructor TcxCustomGridCardRowLayoutObject.Destroy; -begin - FLayerRowCounts.Free; - inherited; -end; - -function TcxCustomGridCardRowLayoutObject.GetLayerCount: Integer; -begin - Result := FLayerRowCounts.Count; -end; - -function TcxCustomGridCardRowLayoutObject.GetLayerFirstRow(ALayerIndex: Integer): TcxGridCardViewRow; -begin - Result := Rows[LayerFirstRowIndex[ALayerIndex]]; -end; - -function TcxCustomGridCardRowLayoutObject.GetLayerFirstRowIndex(ALayerIndex: Integer): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ALayerIndex - 1 do - Inc(Result, LayerRowCount[I]); -end; - -function TcxCustomGridCardRowLayoutObject.GetLayerRow(ALayerIndex, AIndex: Integer): TcxGridCardViewRow; -begin - Result := Rows[LayerFirstRowIndex[ALayerIndex] + AIndex]; -end; - -function TcxCustomGridCardRowLayoutObject.GetLayerRowCount(ALayerIndex: Integer): Integer; -begin - Result := Integer(FLayerRowCounts[ALayerIndex]); -end; - -procedure TcxCustomGridCardRowLayoutObject.SetLayerRowCount(ALayerIndex, Value: Integer); -begin - FLayerRowCounts[ALayerIndex] := TObject(Value); -end; - -function TcxCustomGridCardRowLayoutObject.GetCoordinates(const APosition: TcxGridCardRowPosition): TcxGridCardRowCoordinates; -begin - case Layout of - rlHorizontal: - begin - Result.ColIndex := APosition.IndexInLayer; - Result.RowIndex := APosition.LayerIndex; - end; - rlVertical: - begin - Result.ColIndex := APosition.LayerIndex; - Result.RowIndex := APosition.IndexInLayer; - end - else - Result.ColIndex := -1; - Result.RowIndex := -1; - end; -end; - -function TcxCustomGridCardRowLayoutObject.GetPosition(const ACoordinates: TcxGridCardRowCoordinates): TcxGridCardRowPosition; -begin - case Layout of - rlHorizontal: - begin - Result.LayerIndex := ACoordinates.RowIndex; - Result.IndexInLayer := ACoordinates.ColIndex; - end; - rlVertical: - begin - Result.LayerIndex := ACoordinates.ColIndex; - Result.IndexInLayer := ACoordinates.RowIndex; - end - else - Result.LayerIndex := -1; - Result.IndexInLayer := -1; - end; -end; - -function TcxCustomGridCardRowLayoutObject.GetLayerIndex(ARowIndex: Integer): Integer; -begin - Result := GetPosition(ARowIndex).LayerIndex; -end; - -function TcxCustomGridCardRowLayoutObject.GetLayerPosition(APosition: TcxPosition): TcxGridCardViewRowLayerPosition; -begin - Result := rlpBeforeRow; - case Layout of - rlHorizontal: - case APosition of - posLeft: - Result := rlpBeforeRow; - posRight: - Result := rlpAfterRow; - posTop: - Result := rlpBeforeLayer; - posBottom: - Result := rlpAfterLayer; - end; - rlVertical: - case APosition of - posLeft: - Result := rlpBeforeLayer; - posRight: - Result := rlpAfterLayer; - posTop: - Result := rlpBeforeRow; - posBottom: - Result := rlpAfterRow; - end; - end; -end; - -function TcxCustomGridCardRowLayoutObject.GetLength(ARow: TcxGridCardViewRow): Integer; -begin - case Layout of - rlHorizontal: - Result := 1; - rlVertical: - Result := ARow.Position.LineCount; - else - Result := 0; - end; -end; - -function TcxCustomGridCardRowLayoutObject.GetOffsetInLayer(ALayerIndex, AIndexInLayer: Integer): Integer; -var - I: Integer; -begin - case Layout of - rlHorizontal: - Result := AIndexInLayer; - rlVertical: - begin - Result := 0; - for I := 0 to AIndexInLayer - 1 do - Inc(Result, GetLength(LayerRows[ALayerIndex, I])); - end; - else - Result := -1; - end; -end; - -function TcxCustomGridCardRowLayoutObject.GetPosition(ARowIndex: Integer): TcxGridCardRowPosition; -var - I: Integer; -begin - if ARowIndex <> -1 then - for I := 0 to LayerCount - 1 do - begin - if ARowIndex < LayerRowCount[I] then - begin - Result.LayerIndex := I; - Result.IndexInLayer := ARowIndex; - Exit; - end; - Dec(ARowIndex, LayerRowCount[I]); - end; - Result.LayerIndex := -1; - Result.IndexInLayer := -1; -end; - -function TcxCustomGridCardRowLayoutObject.GetCoordinates(ARow: TcxGridCardViewRow): TcxGridCardRowCoordinates; -begin - Result := GetCoordinates(GetPosition(ARow)); -end; - -function TcxCustomGridCardRowLayoutObject.GetIndexInLayer(ARow: TcxGridCardViewRow): Integer; -begin - Result := GetPosition(ARow).IndexInLayer; -end; - -function TcxCustomGridCardRowLayoutObject.GetLayerIndex(ARow: TcxGridCardViewRow): Integer; -begin - Result := GetLayerIndex(GetRowIndex(ARow)); -end; - -function TcxCustomGridCardRowLayoutObject.GetOffsetInLayer(ARow: TcxGridCardViewRow): Integer; -begin - with GetPosition(ARow) do - Result := GetOffsetInLayer(LayerIndex, IndexInLayer); -end; - -function TcxCustomGridCardRowLayoutObject.GetPosition(ARow: TcxGridCardViewRow): TcxGridCardRowPosition; -begin - Result := GetPosition(GetRowIndex(ARow)); -end; - -function TcxCustomGridCardRowLayoutObject.GetRowAtOffset(ALayerIndex, AOffset: Integer): TcxGridCardViewRow; -var - I, ARowOffset: Integer; -begin - Result := nil; - for I := 0 to LayerRowCount[ALayerIndex] - 1 do - begin - Result := LayerRows[ALayerIndex, I]; - ARowOffset := GetOffsetInLayer(ALayerIndex, I); - if ARowOffset + GetLength(Result) > AOffset then - Exit; - end; -end; - -function TcxCustomGridCardRowLayoutObject.IsFirstInLayer(ARow: TcxGridCardViewRow): Boolean; -begin - Result := GetIndexInLayer(ARow) = 0; -end; - -function TcxCustomGridCardRowLayoutObject.IsLastInLayer(ARow: TcxGridCardViewRow): Boolean; -begin - Result := GetIndexInLayer(ARow) = LayerRowCount[GetLayerIndex(ARow)] - 1; -end; - -function TcxCustomGridCardRowLayoutObject.IsWholeLine(ARow: TcxGridCardViewRow): Boolean; -begin - case Layout of - rlHorizontal: - Result := LayerRowCount[GetLayerIndex(ARow)] = 1; - rlVertical: - Result := True; - else - Result := True; - end; -end; - -{ TcxGridCardRowLayoutObject } - -constructor TcxGridCardRowLayoutObject.Create; -begin - inherited; - FRows := TList.Create; -end; - -destructor TcxGridCardRowLayoutObject.Destroy; -begin - FRows.Free; - inherited; -end; - -function TcxGridCardRowLayoutObject.GetLayout: TcxGridCardViewRowLayout; -begin - Result := FLayout; -end; - -function TcxGridCardRowLayoutObject.GetRow(AIndex: Integer): TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(FRows[AIndex]); -end; - -function TcxGridCardRowLayoutObject.GetRowCount: Integer; -begin - Result := FRows.Count; -end; - -function TcxGridCardRowLayoutObject.GetRowIndex(ARow: TcxGridCardViewRow): Integer; -begin - Result := FRows.IndexOf(ARow); -end; - -procedure TcxGridCardRowLayoutObject.Fill(ARows: TList); -var - ALayerIndex, I: Integer; - ARow: TcxGridCardViewRow; -begin - CopyList(ARows, FRows); - FLayerRowCounts.Clear; - ALayerIndex := -1; - for I := 0 to RowCount - 1 do - begin - ARow := Rows[I]; - if ARow.Position.LayerIndex <> ALayerIndex then - begin - ALayerIndex := ARow.Position.LayerIndex; - FLayerRowCounts.Add(nil); - end; - LayerRowCount[LayerCount - 1] := LayerRowCount[LayerCount - 1] + 1; - end; -end; - -{ TcxGridCardVisibleRowLayoutObject } - -constructor TcxGridCardVisibleRowLayoutObject.Create(ACard: TcxGridCard); -begin - inherited Create; - FCard := ACard; - Layout := ACard.GridView.RowLayout; - FCard.GetVisibleRows(RowsList); - Fill(RowsList); -end; - -procedure TcxGridCardVisibleRowLayoutObject.GetInsertionParams(ARow: TcxGridCardViewRow; - APosition: TcxPosition; out AInsertionIndex: Integer; out AInsertionPos: TcxGridCardRowInsertionPos); - - function GetNextLayerFirstRowVisibleIndex: Integer; - begin - if GetLayerIndex(ARow) = LayerCount - 1 then - Result := Card.GridView.VisibleRowCount - else - Result := LayerFirstRow[GetLayerIndex(ARow) + 1].VisibleIndex; - end; - -begin - case GetLayerPosition(APosition) of - rlpBeforeRow: - begin - AInsertionIndex := ARow.VisibleIndex; - AInsertionPos := ripSameLayer; - end; - rlpAfterRow: - if IsLastInLayer(ARow) then - begin - AInsertionIndex := GetNextLayerFirstRowVisibleIndex; - AInsertionPos := ripPrevLayer; - end - else - begin - AInsertionIndex := LayerRows[GetLayerIndex(ARow), GetIndexInLayer(ARow) + 1].VisibleIndex; - AInsertionPos := ripSameLayer; - end; - rlpBeforeLayer: - begin - AInsertionIndex := LayerFirstRow[GetLayerIndex(ARow)].VisibleIndex; - AInsertionPos := ripNewLayer; - end; - rlpAfterLayer: - begin - AInsertionIndex := GetNextLayerFirstRowVisibleIndex; - AInsertionPos := ripNewLayer; - end; - end; -end; - -procedure TcxGridCardVisibleRowLayoutObject.GetLayerRows(ARowInLayer: TcxGridCardViewRow; - ARows: TList); -var - ALayerIndex, I: Integer; -begin - ALayerIndex := GetLayerIndex(ARowInLayer); - ARows.Clear; - if ALayerIndex <> -1 then - for I := 0 to LayerRowCount[ALayerIndex] - 1 do - ARows.Add(LayerRows[ALayerIndex, I]); -end; - -procedure TcxGridCardVisibleRowLayoutObject.GetRowsAtOffset(ARowAtOffset: TcxGridCardViewRow; - ARows: TList); -var - ARowOffset, I: Integer; -begin - ARowOffset := GetOffsetInLayer(ARowAtOffset); - ARows.Clear; - for I := 0 to LayerCount - 1 do - ARows.Add(GetRowAtOffset(I, ARowOffset)); -end; - -{ TcxGridCardViewRowLayoutObject } - -constructor TcxGridCardViewRowLayoutObject.Create(AGridView: TcxGridCardView); -begin - inherited Create; - FGridView := AGridView; -end; - -function TcxGridCardViewRowLayoutObject.GetBeginsLayer(ARow: TcxGridCardViewRow): Boolean; -begin - Result := IsFirstInLayer(ARow); -end; - -procedure TcxGridCardViewRowLayoutObject.SetBeginsLayer(ARow: TcxGridCardViewRow; - Value: Boolean); -var - APosition: TcxGridCardRowPosition; -begin - if BeginsLayer[ARow] <> Value then - begin - APosition := GetPosition(ARow); - if Value then - BreakLayer(APosition.LayerIndex, APosition.IndexInLayer) - else - MergeLayer(APosition.LayerIndex); - end; -end; - -function TcxGridCardViewRowLayoutObject.GetLayout: TcxGridCardViewRowLayout; -begin - Result := FGridView.RowLayout; -end; - -function TcxGridCardViewRowLayoutObject.GetRow(AIndex: Integer): TcxGridCardViewRow; -begin - Result := GridView.Rows[AIndex]; -end; - -function TcxGridCardViewRowLayoutObject.GetRowCount: Integer; -begin - Result := GridView.RowCount; -end; - -function TcxGridCardViewRowLayoutObject.GetRowIndex(ARow: TcxGridCardViewRow): Integer; -begin - Result := ARow.Index; -end; - -procedure TcxGridCardViewRowLayoutObject.AddLayer; -begin - LayerRowCounts.Add(TObject(0)); -end; - -procedure TcxGridCardViewRowLayoutObject.InsertLayer(AIndex: Integer); -begin - LayerRowCounts.Insert(AIndex, TObject(0)); -end; - -procedure TcxGridCardViewRowLayoutObject.RemoveLayer(AIndex: Integer); -begin - LayerRowCounts.Delete(AIndex); -end; - -procedure TcxGridCardViewRowLayoutObject.AddRowToLayer(ALayerIndex: Integer); -begin - LayerRowCount[ALayerIndex] := LayerRowCount[ALayerIndex] + 1; -end; - -procedure TcxGridCardViewRowLayoutObject.RemoveRowFromLayer(ALayerIndex: Integer); -begin - LayerRowCount[ALayerIndex] := LayerRowCount[ALayerIndex] - 1; - if LayerRowCount[ALayerIndex] = 0 then - RemoveLayer(ALayerIndex); -end; - -procedure TcxGridCardViewRowLayoutObject.AddRow(ARow: TcxGridCardViewRow); -begin - case Layout of - rlHorizontal: - SetLayerIndex(ARow, LayerCount); - rlVertical: - SetLayerIndex(ARow, Max(0, LayerCount - 1)); - end; -end; - -procedure TcxGridCardViewRowLayoutObject.RemoveRow(ARowIndex: Integer); -begin - RemoveRowFromLayer(GetLayerIndex(ARowIndex)); -end; - -procedure TcxGridCardViewRowLayoutObject.MoveRow(ARow: TcxGridCardViewRow; - AOldIndex: Integer); -var - AOldLayerIndex, ANewLayerIndex: Integer; -begin - if ARow.LockPositionSync then Exit; - AOldLayerIndex := GetLayerIndex(AOldIndex); - ANewLayerIndex := GetLayerIndex(ARow); - AddRowToLayer(ANewLayerIndex); - RemoveRowFromLayer(AOldLayerIndex); -end; - -procedure TcxGridCardViewRowLayoutObject.MoveRows(ARows: TList; AIndex: Integer); -var - ARowLayout: TcxGridCardRowLayoutObject; -begin - ARowLayout := TcxGridCardRowLayoutObject.Create; - try - ARowLayout.Fill(ARows); - MoveRows(ARows, AIndex, ARowLayout); - finally - ARowLayout.Free; - end; -end; - -procedure TcxGridCardViewRowLayoutObject.MoveRows(ARows: TList; AIndex: Integer; - ARowLayout: TcxGridCardRowLayoutObject); -var - I, ALayerIndex: Integer; - ARow, APrevRow: TcxGridCardViewRow; - ANewLayer: Boolean; -begin - GridView.BeginUpdate; - try - APrevRow := nil; - for I := 0 to ARows.Count - 1 do - begin - ARow := TcxGridCardViewRow(ARows[I]); - ARow.Index := AIndex + I; - if I <> 0 then - begin - ALayerIndex := GetLayerIndex(TcxGridCardViewRow(ARows[0])) + - ARowLayout.GetLayerIndex(ARow); - ANewLayer := ARowLayout.IsFirstInLayer(ARow); - if ANewLayer and not IsLastInLayer(APrevRow) then - BreakLayer(ALayerIndex - 1, GetIndexInLayer(ARow) + 1); - SetLayerIndex(ARow, ALayerIndex, ANewLayer); - end; - APrevRow := ARow; - end; - finally - GridView.EndUpdate; - end; -end; - -procedure TcxGridCardViewRowLayoutObject.LayerIndexChanged; -begin - if Assigned(FOnLayerIndexChanged) then FOnLayerIndexChanged(Self); -end; - -procedure TcxGridCardViewRowLayoutObject.BreakLayer(ALayerIndex, AIndexInLayer: Integer); -{var - I: Integer;} -begin - if AIndexInLayer = 0 then Exit; - InsertLayer(ALayerIndex + 1); - LayerRowCount[ALayerIndex + 1] := LayerRowCount[ALayerIndex] - AIndexInLayer; - LayerRowCount[ALayerIndex] := AIndexInLayer; - LayerIndexChanged; - GridView.Changed(vcSize); -{ - GridView.BeginUpdate; - try - for I := AIndexInLayer to LayerRowCount[ALayerIndex] - 1 do - SetLayerIndex(LayerRows[ALayerIndex, AIndexInLayer], ALayerIndex + 1, - I = AIndexInLayer); - finally - GridView.EndUpdate; - end;} -end; - -function TcxGridCardViewRowLayoutObject.IsSimpleLayout: Boolean; -var - I: Integer; -begin - case Layout of - rlHorizontal: - begin - Result := True; - for I := 0 to LayerCount - 1 do - begin - Result := LayerRowCount[I] = 1; - if not Result then Break; - end; - end; - rlVertical: - Result := LayerCount <= 1; - else - Result := True; - end; -end; - -procedure TcxGridCardViewRowLayoutObject.MergeLayer(ALayerIndex: Integer); -begin - if ALayerIndex = 0 then Exit; - LayerRowCount[ALayerIndex - 1] := LayerRowCount[ALayerIndex - 1] + LayerRowCount[ALayerIndex]; - RemoveLayer(ALayerIndex); - LayerIndexChanged; - GridView.Changed(vcSize); -end; - -procedure TcxGridCardViewRowLayoutObject.SetCoordinates(ARow: TcxGridCardViewRow; - const ACoordinates: TcxGridCardRowCoordinates); -begin - SetPosition(ARow, GetPosition(ACoordinates)); -end; - -procedure TcxGridCardViewRowLayoutObject.SetIndexInLayer(ARow: TcxGridCardViewRow; - AValue: Integer; AMoveSubItems: Boolean = False); -var - ALayerIndex: Integer; -begin - ALayerIndex := GetLayerIndex(ARow); - AValue := Max(AValue, 0); - AValue := Min(AValue, LayerRowCount[ALayerIndex] - 1); - ARow.MoveTo(LayerFirstRowIndex[ALayerIndex] + AValue, AMoveSubItems); -end; - -procedure TcxGridCardViewRowLayoutObject.SetLayerIndex(ARow: TcxGridCardViewRow; - AValue: Integer; ANewLayer: Boolean = False; AMoveSubItems: Boolean = False); - - function GetRowNewIndex: Integer; - begin - Result := LayerFirstRowIndex[AValue] + LayerRowCount[AValue]; - // do not allow category row to break another category row, - // but layer index cannot be changed - if AMoveSubItems and (ARow.Kind = rkCategory) and - (Result < RowCount) and (Rows[Result].CategoryRow <> nil) then - for Result := Result - 1 downto 0 do - if (Rows[Result].Kind = rkCategory) or IsFirstInLayer(Rows[Result]) then - Break; - if ARow.Index < Result then Dec(Result); - end; - -var - ALayerIndex, ARowNewIndex: Integer; - ARows: TList; - ARowLayout: TcxGridCardRowLayoutObject; -begin - AValue := Max(AValue, 0); - AValue := Min(AValue, LayerCount); - ALayerIndex := GetLayerIndex(ARow); - if (ALayerIndex <> AValue) or ANewLayer and (LayerRowCount[ALayerIndex] > 1) then - begin - GridView.BeginUpdate; - ARow.LockPositionSync := True; - ARows := TList.Create; - ARowLayout := TcxGridCardRowLayoutObject.Create; - try - if ARow.GridView <> nil then // not from AddItem - begin - ARow.GetItems(ARows, AMoveSubItems); - ARowLayout.Fill(ARows); - end; - if AValue = LayerCount then - AddLayer - else - if ANewLayer then - begin - InsertLayer(AValue); - if (ALayerIndex <> -1) and (AValue <= ALayerIndex) then - Inc(ALayerIndex); - end; - ARowNewIndex := GetRowNewIndex; - AddRowToLayer(AValue); - if ALayerIndex <> -1 then - RemoveRowFromLayer(ALayerIndex); - if ARows.Count <> 0 then - MoveRows(ARows, ARowNewIndex, ARowLayout); - LayerIndexChanged; - if ARow.GridView <> nil then // not from AddItem - GridView.Changed(vcSize); - finally - ARowLayout.Free; - ARows.Free; - ARow.LockPositionSync := False; - GridView.EndUpdate; - end; - end; -end; - -procedure TcxGridCardViewRowLayoutObject.SetPosition(ARow: TcxGridCardViewRow; - const APosition: TcxGridCardRowPosition); -begin - if APosition.LayerIndex <> -1 then - SetLayerIndex(ARow, APosition.LayerIndex); - if APosition.IndexInLayer <> -1 then - SetIndexInLayer(ARow, APosition.IndexInLayer); -end; - -{ TcxGridCardViewVisibleRowLayoutObject } - -constructor TcxGridCardViewVisibleRowLayoutObject.Create(AGridView: TcxGridCardView); -begin - inherited Create; - FGridView := AGridView; -end; - -function TcxGridCardViewVisibleRowLayoutObject.GetLayout: TcxGridCardViewRowLayout; -begin - Result := FGridView.RowLayout; -end; - -function TcxGridCardViewVisibleRowLayoutObject.GetLastVisibleSubItem(ARow: TcxGridCardViewRow): TcxGridCardViewRow; -var - ARows: TList; - I: Integer; -begin -{$IFDEF DELPHI7} -{$IFNDEF DELPHI8} - Result := nil; // to remove wrong warning -{$ENDIF} -{$ENDIF} - ARows := TList.Create; - try - ARow.GetItems(ARows, True); - for I := ARows.Count - 1 downto 0 do - begin - Result := TcxGridCardViewRow(ARows[I]); - if GetRowIndex(Result) <> -1 then Exit; - end; - finally - ARows.Free; - end; - Result := nil; -end; - -function TcxGridCardViewVisibleRowLayoutObject.GetLayerCount(ARow: TcxGridCardViewRow): Integer; -var - ALastVisibleSubItem: TcxGridCardViewRow; -begin - ALastVisibleSubItem := GetLastVisibleSubItem(ARow); - if ALastVisibleSubItem = nil then - Result := 0 - else - Result := GetLayerIndex(ALastVisibleSubItem) - GetLayerIndex(ARow) + 1; -end; - -function TcxGridCardViewVisibleRowLayoutObject.IsWholeLayer(ARow: TcxGridCardViewRow): Boolean; -var - ALastVisibleSubItem: TcxGridCardViewRow; -begin - Result := IsFirstInLayer(ARow); - if Result then - begin - ALastVisibleSubItem := GetLastVisibleSubItem(ARow); - Result := (GetLayerIndex(ALastVisibleSubItem) > GetLayerIndex(ARow)) or - IsLastInLayer(ALastVisibleSubItem); - end; -end; - -{ TcxGridCardViewRowLayoutController } - -constructor TcxGridCardViewRowLayoutController.Create(AGridView: TcxGridCardView); -begin - inherited Create; - FGridView := AGridView; - FLayoutObject := TcxGridCardViewRowLayoutObject.Create(FGridView); - FLayoutObject.OnLayerIndexChanged := LayerIndexChanged; - FVisibleLayoutObject := TcxGridCardViewVisibleRowLayoutObject.Create(FGridView); -end; - -destructor TcxGridCardViewRowLayoutController.Destroy; -begin - FVisibleLayoutObject.Free; - FLayoutObject.Free; - inherited; -end; - -function TcxGridCardViewRowLayoutController.GetBeginsLayer(ARow: TcxGridCardViewRow): Boolean; -begin - Result := LayoutObject.BeginsLayer[ARow]; -end; - -function TcxGridCardViewRowLayoutController.GetLayout: TcxGridCardViewRowLayout; -begin - Result := GridView.RowLayout; -end; - -procedure TcxGridCardViewRowLayoutController.SetBeginsLayer(ARow: TcxGridCardViewRow; - Value: Boolean); -begin - LayoutObject.BeginsLayer[ARow] := Value; -end; - -procedure TcxGridCardViewRowLayoutController.LayerIndexChanged(Sender: TObject); -begin - RefreshVisibleLayoutObject; -end; - -procedure TcxGridCardViewRowLayoutController.RefreshVisibleLayoutObject; -begin - VisibleLayoutObject.Fill(GridView.VisibleItemsList); -end; - -procedure TcxGridCardViewRowLayoutController.RowIndexChanged(ARow: TcxGridCardViewRow; - AOldIndex: Integer); -begin - if AOldIndex = -1 then - LayoutObject.AddRow(ARow) - else - if ARow.Index = -1 then - LayoutObject.RemoveRow(AOldIndex) - else - LayoutObject.MoveRow(ARow, AOldIndex); -end; - -procedure TcxGridCardViewRowLayoutController.VisibleRowsListChanged; -begin - RefreshVisibleLayoutObject; -end; - -function TcxGridCardViewRowLayoutController.CreateCardRowLayout(ACardViewInfo: TcxGridCardViewInfo): TcxGridCardRowLayout; -begin - Result := GetCardRowLayoutClass.Create(ACardViewInfo, IsSimpleLayout); -end; - -function TcxGridCardViewRowLayoutController.GetCardRowLayoutClass: TcxGridCardRowLayoutClass; -begin - case Layout of - rlHorizontal: - Result := TcxGridCardRowHorizontalLayout; - rlVertical: - Result := TcxGridCardRowVerticalLayout; - else - Result := nil; - end; -end; - -function TcxGridCardViewRowLayoutController.IsHorizontalLayout: Boolean; -begin - Result := Layout = rlHorizontal; -end; - -function TcxGridCardViewRowLayoutController.IsSimpleLayout: Boolean; -begin - Result := LayoutObject.IsSimpleLayout; -end; - -function TcxGridCardViewRowLayoutController.IsWholeLine(ARow: TcxGridCardViewRow): Boolean; -begin - Result := VisibleLayoutObject.IsWholeLine(ARow); -end; - -function TcxGridCardViewRowLayoutController.GetCoordinates(ARow: TcxGridCardViewRow): TcxGridCardRowCoordinates; -begin - Result := LayoutObject.GetCoordinates(ARow); -end; - -procedure TcxGridCardViewRowLayoutController.SetCoordinates(ARow: TcxGridCardViewRow; - AColIndex, ARowIndex: Integer); -var - ACoordinates: TcxGridCardRowCoordinates; -begin - ACoordinates.ColIndex := AColIndex; - ACoordinates.RowIndex := ARowIndex; - SetCoordinates(ARow, ACoordinates); -end; - -procedure TcxGridCardViewRowLayoutController.SetCoordinates(ARow: TcxGridCardViewRow; - ACoordinates: TcxGridCardRowCoordinates); -begin - LayoutObject.SetCoordinates(ARow, ACoordinates); -end; - -function TcxGridCardViewRowLayoutController.GetVisibleCoordinates(ARow: TcxGridCardViewRow): TcxGridCardRowCoordinates; -begin - Result := VisibleLayoutObject.GetCoordinates(ARow); -end; - -function TcxGridCardViewRowLayoutController.GetPosition(ARow: TcxGridCardViewRow): TcxGridCardRowPosition; -begin - Result := LayoutObject.GetPosition(ARow); -end; - -procedure TcxGridCardViewRowLayoutController.SetPosition(ARow: TcxGridCardViewRow; - ALayerIndex, AIndexInLayer: Integer); -var - APosition: TcxGridCardRowPosition; -begin - APosition.LayerIndex := ALayerIndex; - APosition.IndexInLayer := AIndexInLayer; - LayoutObject.SetPosition(ARow, APosition); -end; - -function TcxGridCardViewRowLayoutController.GetVisiblePosition(ARow: TcxGridCardViewRow): TcxGridCardRowPosition; -begin - Result := VisibleLayoutObject.GetPosition(ARow); -end; - -function TcxGridCardViewRowLayoutController.FindNextRow(ACard: TcxGridCard; - ARow: TcxGridCardViewRow; ASameLayer, AGoForward, AGoOnCycle: Boolean; - out ACycleChanged: Boolean): TcxGridCardViewRow; -var - ARows: TList; - ALayout: TcxGridCardVisibleRowLayoutObject; -begin - ARows := TList.Create; - try - ALayout := TcxGridCardVisibleRowLayoutObject.Create(ACard); - try - if ASameLayer then - ALayout.GetLayerRows(ARow, ARows) - else - ALayout.GetRowsAtOffset(ARow, ARows); - finally - ALayout.Free; - end; - Result := GridView.Controller.FindNextRow(ACard, ARows, ARow, AGoForward, - AGoOnCycle, ACycleChanged); - finally - ARows.Free; - end; -end; - -function TcxGridCardViewRowLayoutController.FindNextRowHorizontally(ACard: TcxGridCard; - ARow: TcxGridCardViewRow; AGoForward, AGoOnCycle: Boolean; out ACycleChanged: Boolean): TcxGridCardViewRow; -begin - Result := FindNextRow(ACard, ARow, IsHorizontalLayout, AGoForward, AGoOnCycle, ACycleChanged); -end; - -function TcxGridCardViewRowLayoutController.FindNextRowVertically(ACard: TcxGridCard; - ARow: TcxGridCardViewRow; AGoForward, AGoOnCycle: Boolean; out ACycleChanged: Boolean): TcxGridCardViewRow; -begin - Result := FindNextRow(ACard, ARow, not IsHorizontalLayout, AGoForward, AGoOnCycle, ACycleChanged); -end; - -{ TcxGridCardRowFilterButtonPainter } - -function TcxGridCardRowFilterButtonPainter.GetViewInfo: TcxGridCardRowFilterButtonViewInfo; -begin - Result := TcxGridCardRowFilterButtonViewInfo(inherited ViewInfo); -end; - -procedure TcxGridCardRowFilterButtonPainter.Paint; -begin - with ViewInfo do - GridViewInfo.LookAndFeelPainter.DrawFilterDropDownButton(Self.Canvas, - Bounds, ButtonState, Active); -end; - -{ TcxGridCardRowCaptionPainter } - -function TcxGridCardRowCaptionPainter.GetViewInfo: TcxGridCardRowCaptionViewInfo; -begin - Result := TcxGridCardRowCaptionViewInfo(inherited ViewInfo); -end; - -procedure TcxGridCardRowCaptionPainter.DrawContent; -begin - inherited; - if ViewInfo.FilterButtonViewInfo <> nil then - ViewInfo.FilterButtonViewInfo.Paint(Canvas); -end; - -{ TcxGridCardRowPainter } - -function TcxGridCardRowPainter.GetViewInfo: TcxGridCardRowViewInfo; -begin - Result := TcxGridCardRowViewInfo(inherited ViewInfo); -end; - -procedure TcxGridCardRowPainter.DrawExpandButton; -begin - Canvas.FillRect(ViewInfo.ExpandButtonAreaBounds, ViewInfo.Params); - ViewInfo.LookAndFeelPainter.DrawExpandButton(Canvas, ViewInfo.ExpandButtonBounds, - ViewInfo.Expanded); -end; - -procedure TcxGridCardRowPainter.DrawFocusRect; -begin - with ViewInfo do - if DataViewInfo.Focused then - GridViewInfo.Painter.DrawFocusRect(ContentBounds, CardViewInfo.HideFocusRectOnExit); -end; - -procedure TcxGridCardRowPainter.DrawIndent; -begin - Canvas.FillRect(ViewInfo.IndentBounds, ViewInfo.GetIndentViewParams); -end; - -procedure TcxGridCardRowPainter.Paint; -begin - if ViewInfo.HasIndent then DrawIndent; - if ViewInfo.HasExpandButton then DrawExpandButton; - ViewInfo.CaptionViewInfo.Paint(Canvas); - ViewInfo.DataViewInfo.Paint(Canvas); - DrawBorders; - DrawFocusRect; -end; - -{ TcxGridCardScrollButtonPainter } - -function TcxGridCardScrollButtonPainter.GetViewInfo: TcxCustomGridCardScrollButtonViewInfo; -begin - Result := TcxCustomGridCardScrollButtonViewInfo(inherited ViewInfo); -end; - -procedure TcxGridCardScrollButtonPainter.DrawContent; -const - ScrollBarParts: array[Boolean] of TcxScrollBarPart = (sbpLineUp, sbpLineDown); -begin - ViewInfo.GridViewInfo.LookAndFeelPainter.DrawScrollBarPart(Canvas, False, - ViewInfo.Bounds, ScrollBarParts[ViewInfo.IsDownButton], ViewInfo.ButtonState); -end; - -function TcxGridCardScrollButtonPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridCardExpandButtonPainter } - -function TcxGridCardExpandButtonPainter.GetViewInfo: TcxGridCardExpandButtonViewInfo; -begin - Result := TcxGridCardExpandButtonViewInfo(inherited ViewInfo); -end; - -procedure TcxGridCardExpandButtonPainter.Paint; -begin - ViewInfo.LookAndFeelPainter.DrawGroupExpandButton(Canvas, - ViewInfo.Bounds, ViewInfo.CardViewInfo.Expanded, ViewInfo.ButtonState); -end; - -{ TcxGridCardPainter } - -function TcxGridCardPainter.GetViewInfo: TcxGridCardViewInfo; -begin - Result := TcxGridCardViewInfo(inherited ViewInfo); -end; - -procedure TcxGridCardPainter.AfterPaint; -begin - inherited; - Canvas.SetClipRegion(FClipRegion, roSet); -end; - -procedure TcxGridCardPainter.BeforePaint; -begin - FClipRegion := Canvas.GetClipRegion; - Canvas.IntersectClipRect(ViewInfo.Bounds); - inherited; -end; - -procedure TcxGridCardPainter.DrawBackground; -begin - with ViewInfo do - if Transparent then - inherited - else - begin - Self.Canvas.Brush.Color := Params.Color; - Self.Canvas.FillRect(BackgroundBitmapBounds); - end; -end; - -procedure TcxGridCardPainter.DrawCardBorder; -var - ABounds: TRect; - AParams: TcxViewParams; -begin - ABounds := ViewInfo.Bounds; - ViewInfo.GetCardBorderViewParams(AParams); - if AParams.Bitmap = nil then - Canvas.FrameRect(ABounds, AParams.Color, ViewInfo.CardBorderWidth) - else - with ViewInfo.ContentBounds do - begin - Canvas.FillRect(Rect(ABounds.Left, ABounds.Top, ABounds.Right, Top), AParams.Bitmap); - Canvas.FillRect(Rect(ABounds.Left, Top, Left, Bottom), AParams.Bitmap); - Canvas.FillRect(Rect(Right, Top, ABounds.Right, Bottom), AParams.Bitmap); - Canvas.FillRect(Rect(ABounds.Left, Bottom, ABounds.Right, ABounds.Bottom), AParams.Bitmap); - end; -end; - -procedure TcxGridCardPainter.DrawExpandButton; -begin - ViewInfo.ExpandButtonViewInfo.Paint(Canvas); -end; - -function TcxGridCardPainter.DrawExpandButtonBeforePaint: Boolean; -begin - Result := False; -end; - -procedure TcxGridCardPainter.DrawLayerSeparators; -var - I: Integer; -begin - Canvas.Brush.Color := ViewInfo.LayerSeparatorColor; - for I := 0 to ViewInfo.Layout.SeparatorCount - 1 do - Canvas.FillRect(ViewInfo.Layout.GetSeparatorBounds(I), nil, True); -end; - -procedure TcxGridCardPainter.DrawRows; -var - APrevClipRegion, ARestSpace: TcxRegion; - I: Integer; - ARow: TcxGridCardRowViewInfo; -begin - APrevClipRegion := Canvas.GetClipRegion; - try - ARestSpace := TcxRegion.Create(ViewInfo.ContentBounds); - try - Canvas.IntersectClipRect(ViewInfo.ContentBounds); - for I := ViewInfo.TopRowIndex to ViewInfo.TopRowIndex + ViewInfo.PartVisibleRowCount - 1 do - begin - ARow := ViewInfo.VisibleRowViewInfos[I]; - ARow.Paint(Canvas); - ARestSpace.Combine(TcxRegion.Create(ARow.Bounds), roSubtract); - end; - Canvas.SetClipRegion(ARestSpace, roIntersect, False); - Canvas.FillRect(ViewInfo.ContentBounds, ViewInfo.Params); - finally - ARestSpace.Free; - end; - finally - Canvas.SetClipRegion(APrevClipRegion, roSet); - end; -end; - -procedure TcxGridCardPainter.DrawScrollButtons; -begin - ViewInfo.ScrollButtonUp.Paint(Canvas); - ViewInfo.ScrollButtonDown.Paint(Canvas); -end; - -procedure TcxGridCardPainter.Paint; -begin - DrawCardBorder; - DrawScrollButtons; - if ViewInfo.HasLayerSeparators then DrawLayerSeparators; - DrawRows; - inherited; -end; - -{ TcxGridCardViewPainter } - -procedure TcxGridCardViewPainter.DrawBackground; -begin - DrawSeparators; - inherited; -end; - -procedure TcxGridCardViewPainter.DrawSeparators; -var - I: Integer; - R: TRect; -begin - Canvas.Brush.Color := ViewInfo.SeparatorsViewInfo.Color; - for I := 0 to ViewInfo.SeparatorsViewInfo.Count - 1 do - begin - R := ViewInfo.SeparatorsViewInfo[I]; - Canvas.FillRect(R); - Canvas.ExcludeClipRect(R); - end; -end; - -procedure TcxGridCardViewPainter.PaintContent; -begin - DrawFilterBar; - inherited; -end; - -function TcxGridCardViewPainter.ViewInfo: TcxGridCardViewViewInfo; -begin - Result := TcxGridCardViewViewInfo(inherited ViewInfo); -end; - -{ TcxGridCardViewColumn } - -constructor TcxGridCardViewColumn.Create(AColumns: TcxGridCardViewColumns; AIndex: Integer); -begin - inherited Create; - FColumns := AColumns; - FIndex := AIndex; - FRows := TList.Create; -end; - -destructor TcxGridCardViewColumn.Destroy; -begin - FRows.Free; - inherited; -end; - -function TcxGridCardViewColumn.GetLastRow: TcxGridCardViewInfo; -begin - Result := Rows[VisibleRowCount - 1]; -end; - -function TcxGridCardViewColumn.GetRow(Index: Integer): TcxGridCardViewInfo; -begin - Result := TcxGridCardViewInfo(FRows[Index]); -end; - -function TcxGridCardViewColumn.GetRowCount: Integer; -begin - Result := FRows.Count; -end; - -function TcxGridCardViewColumn.GetVisibleRowCount: Integer; -begin - if RowCount = 0 then - Result := 0 - else - begin - for Result := RowCount - 1 downto 0 do - if Rows[Result].Visible then Break; - Inc(Result); - end; -end; - -procedure TcxGridCardViewColumn.SetRow(Index: Integer; Value: TcxGridCardViewInfo); -begin - if Index < RowCount then - FRows[Index] := Value - else - FRows.Add(Value); - Value.FCol := Self.Index; - Value.FRow := Index; -end; - -function TcxGridCardViewColumn.GetNearestRow(APos: Integer): TcxGridCardViewInfo; -var - I: Integer; -begin - Result := nil; - for I := 0 to RowCount - 1 do - begin - Result := Rows[I]; - if APos < Result.Bounds.Bottom then Break; - end; -end; - -{ TcxGridCardViewColumns } - -constructor TcxGridCardViewColumns.Create(ACardsViewInfo: TcxGridCardsViewInfo); -begin - inherited Create; - FCardsViewInfo := ACardsViewInfo; - CreateItems; -end; - -destructor TcxGridCardViewColumns.Destroy; -begin - DestroyItems; - inherited; -end; - -function TcxGridCardViewColumns.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridCardViewColumns.GetItem(Index: Integer): TcxGridCardViewColumn; -begin - if Index < Count then - Result := TcxGridCardViewColumn(FItems[Index]) - else - begin - Result := TcxGridCardViewColumn.Create(Self, Index); - FItems.Add(Result); - end; -end; - -function TcxGridCardViewColumns.GetLast: TcxGridCardViewColumn; -begin - if Count = 0 then - Result := nil - else - Result := Items[Count - 1]; -end; - -function TcxGridCardViewColumns.GetVisibleCount: Integer; -begin - if Count = 0 then - Result := 0 - else - begin - for Result := Count - 1 downto 0 do - if Items[Result][0].Visible then Break; - Inc(Result); - end; -end; - -procedure TcxGridCardViewColumns.CreateItems; -begin - FItems := TList.Create; -end; - -procedure TcxGridCardViewColumns.DestroyItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Free; - FItems.Free; -end; - -{ TcxGridCardRowCellViewInfo } - -constructor TcxGridCardRowCellViewInfo.Create(ARowViewInfo: TcxGridCardRowViewInfo); -begin - FRowViewInfo := ARowViewInfo; - inherited Create(FRowViewInfo.CardViewInfo, FRowViewInfo.Row); -end; - -function TcxGridCardRowCellViewInfo.GetCardViewInfo: TcxGridCardViewInfo; -begin - Result := TcxGridCardViewInfo(RecordViewInfo); -end; - -function TcxGridCardRowCellViewInfo.GetGridRecord: TcxGridCard; -begin - Result := TcxGridCard(inherited GridRecord); -end; - -function TcxGridCardRowCellViewInfo.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardRowCellViewInfo.GetRow: TcxGridCardViewRow; -begin - Result := FRowViewInfo.Row; -end; - -function TcxGridCardRowCellViewInfo.GetAreaBounds: TRect; -begin - Result := inherited GetAreaBounds; - IntersectRect(Result, Result, CardViewInfo.ScrollableAreaBounds); -end; - -function TcxGridCardRowCellViewInfo.GetMultiLine: Boolean; -begin - Result := (Row.Position.LineCount = 1) and AutoHeight; -end; - -function TcxGridCardRowCellViewInfo.GetMultiLinePainting: Boolean; -begin - Result := inherited GetMultiLinePainting or (Row.Position.LineCount > 1); -end; - -function TcxGridCardRowCellViewInfo.GetTransparent: Boolean; -begin - Result := BackgroundBitmap <> nil; -end; - -function TcxGridCardRowCellViewInfo.HasFocusRect: Boolean; -begin - Result := False; -end; - -function TcxGridCardRowCellViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -var - AGridViewInfo: TcxGridCardViewViewInfo; -begin - AGridViewInfo := GridView.ViewInfo; - AGridViewInfo.AddActiveViewInfo(Self); - try - Result := inherited MouseDown(AHitTest, AButton, AShift); - if AGridViewInfo.IsViewInfoActive(Self) and (AButton = mbLeft) then - if ssDouble in AShift then - if Result and Row.CanExpand and GridView.OptionsBehavior.ExpandRowOnDblClick then - begin - Row.Expanded := not Row.Expanded; - AGridViewInfo.Controller.MakeFocusedRecordVisible; - end - else - else - if GridView.IsDesigning then - begin - GridView.Controller.DesignController.SelectObject(Row, not (ssShift in AShift)); - Result := True; - end; - finally - AGridViewInfo.RemoveActiveViewInfo(Self); - end; -end; - -{ TcxGridCardRowFilterButtonViewInfo } - -constructor TcxGridCardRowFilterButtonViewInfo.Create(ARowCaptionViewInfo: TcxGridCardRowCaptionViewInfo); -begin - inherited Create(ARowCaptionViewInfo.GridViewInfo); - FRowCaptionViewInfo := ARowCaptionViewInfo; -end; - -function TcxGridCardRowFilterButtonViewInfo.GetActive: Boolean; -begin - Result := Row.Filtered; -end; - -function TcxGridCardRowFilterButtonViewInfo.GetDropDownWindowValue: TcxGridFilterPopup; -begin - Result := TcxGridFilterPopup(inherited DropDownWindow); -end; - -function TcxGridCardRowFilterButtonViewInfo.GetRow: TcxGridCardViewRow; -begin - Result := FRowCaptionViewInfo.Row; -end; - -function TcxGridCardRowFilterButtonViewInfo.GetItem: TcxCustomGridTableItem; -begin - Result := Row; -end; - -function TcxGridCardRowFilterButtonViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TcxGridCardRowFilterButtonViewInfo.CalculateWidth: Integer; -begin - Result := 0; -end; - -function TcxGridCardRowFilterButtonViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - if GridView.IsDesigning then - Result := nil - else - Result := TcxGridCardRowFilterButtonHitTest; -end; - -function TcxGridCardRowFilterButtonViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridCardRowFilterButtonPainter; -end; - -function TcxGridCardRowFilterButtonViewInfo.GetVisible: Boolean; -begin - Result := OccupiesSpace or - (RowCaptionViewInfo.State = gcsSelected) or (State = gcsPressed); -end; - -function TcxGridCardRowFilterButtonViewInfo.GetWidth: Integer; -begin - Result := GridViewInfo.LookAndFeelPainter.FilterDropDownButtonSize.X; -end; - -procedure TcxGridCardRowFilterButtonViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - with TcxGridCardRowFilterButtonHitTest(AHitTest) do - begin - GridRecord := FRowCaptionViewInfo.GridRecord; - Item := Row; - end; -end; - -function TcxGridCardRowFilterButtonViewInfo.NeedsContainerHotTrack: Boolean; -begin - Result := not OccupiesSpace; -end; - -function TcxGridCardRowFilterButtonViewInfo.OccupiesSpace: Boolean; -begin - Result := TcxGridCardView(GridView).OptionsView.ShowRowFilterButtons = sfbAlways; -end; - -function TcxGridCardRowFilterButtonViewInfo.CloseDropDownWindowOnDestruction: Boolean; -begin - Result := False; -end; - -function TcxGridCardRowFilterButtonViewInfo.DropDownWindowExists: Boolean; -begin - Result := TcxGridCardView(GridView).Controller.HasFilterPopup; -end; - -function TcxGridCardRowFilterButtonViewInfo.GetDropDownWindow: TcxCustomGridPopup; -begin - Result := TcxGridCardView(GridView).Controller.FilterPopup; -end; - -function TcxGridCardRowFilterButtonViewInfo.GetDropDownWindowOwnerBounds: TRect; -begin - Result := Bounds; - with FRowCaptionViewInfo.Bounds do - begin - Result.Left := Left; - Result.Right := Right; - end; -end; - -function TcxGridCardRowFilterButtonViewInfo.IsDropDownWindowOwner: Boolean; -begin - Result := inherited IsDropDownWindowOwner and (DropDownWindow.Item = Row); -end; - -{ TcxGridCardRowCaptionViewInfo } - -constructor TcxGridCardRowCaptionViewInfo.Create(ARowViewInfo: TcxGridCardRowViewInfo); -begin - inherited; - if CanFilter then - FFilterButtonViewInfo := GetFilterButtonViewInfoClass.Create(Self); -end; - -destructor TcxGridCardRowCaptionViewInfo.Destroy; -begin - FFilterButtonViewInfo.Free; - inherited; -end; - -function TcxGridCardRowCaptionViewInfo.GetRealWidth: Integer; -begin - FCalculatingRealWidth := True; - try - Result := CalculateRealWidth; - finally - FCalculatingRealWidth := False; - end; -end; - -function TcxGridCardRowCaptionViewInfo.CalculateHeight: Integer; -begin - CalculateParams; - if MultiLine then - Result := GetTextCellHeight(GridViewInfo, LookAndFeelPainter) - else - Result := CalculateSimpleHeight(Row, Canvas, Params.Font); -end; - -class function TcxGridCardRowCaptionViewInfo.CalculateSimpleHeight(ARow: TcxGridCardViewRow; - ACanvas: TcxCanvas; AFont: TFont): Integer; -begin - Result := GetCellHeight(ACanvas.FontHeight(AFont), ARow.GridView.LookAndFeelPainter) * - ARow.Position.LineCount; -end; - -function TcxGridCardRowCaptionViewInfo.CalculateRealWidth: Integer; -begin - CalculateParams; - Result := TextWidthWithOffset; - if Row.HasCardExpandButton and - ((CardViewInfo.ExpandButtonAlignment = cebaLeft) or - (CardViewInfo.ExpandButtonAlignment = cebaRight) and not RowViewInfo.DataViewInfo.Visible) then - Inc(Result, CardViewInfo.ExpandButtonAreaWidth); - if (FilterButtonViewInfo <> nil) and FilterButtonViewInfo.OccupiesSpace then - Inc(Result, cxGridCellTextOffset + FilterButtonViewInfo.Width); - CalculateParamsNeeded; // to recalculate Width -end; - -function TcxGridCardRowCaptionViewInfo.CalculateWidth: Integer; -begin - Result := FRowViewInfo.CaptionWidth; -end; - -function TcxGridCardRowCaptionViewInfo.CanFilter: Boolean; -begin - Result := Row.CanFilter(True); -end; - -function TcxGridCardRowCaptionViewInfo.CanShowAutoHint: Boolean; -begin - Result := GridView.OptionsBehavior.RowCaptionHints; -end; - -function TcxGridCardRowCaptionViewInfo.CanShowCustomHint: Boolean; -begin - Result := False; -end; - -function TcxGridCardRowCaptionViewInfo.CanShowEdit: Boolean; -begin - Result := False; -end; - -function TcxGridCardRowCaptionViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := Row.CaptionAlignmentHorz; -end; - -function TcxGridCardRowCaptionViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := Row.CaptionAlignmentVert; -end; - -function TcxGridCardRowCaptionViewInfo.GetAutoHeight: Boolean; -begin - Result := GridView.OptionsView.RowCaptionAutoHeight; -end; - -function TcxGridCardRowCaptionViewInfo.GetFilterButtonBounds: TRect; -begin - Result := TextAreaBounds; - with Result do - begin - if FilterButtonViewInfo.OccupiesSpace then - Left := Max(Left, Right + cxGridCellTextOffset) - else - Left := Max(Left, Right - FilterButtonViewInfo.Width); - Right := Left + FilterButtonViewInfo.Width; - end; -end; - -function TcxGridCardRowCaptionViewInfo.GetFilterButtonViewInfoClass: TcxGridCardRowFilterButtonViewInfoClass; -begin - Result := TcxGridCardRowFilterButtonViewInfo; -end; - -function TcxGridCardRowCaptionViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridCardRowCaptionHitTest; -end; - -function TcxGridCardRowCaptionViewInfo.GetHotTrack: Boolean; -begin - Result := (FilterButtonViewInfo <> nil) and FilterButtonViewInfo.NeedsContainerHotTrack; -end; - -function TcxGridCardRowCaptionViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridCardRowCaptionPainter; -end; - -function TcxGridCardRowCaptionViewInfo.GetShowEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.RowCaptionEndEllipsis; -end; - -function TcxGridCardRowCaptionViewInfo.GetText: string; -begin - Result := Row.VisibleCaption; -end; - -function TcxGridCardRowCaptionViewInfo.GetTextAreaBounds: TRect; -begin - Result := inherited GetTextAreaBounds; - if (FilterButtonViewInfo <> nil) and FilterButtonViewInfo.OccupiesSpace then - Dec(Result.Right, cxGridCellTextOffset + FilterButtonViewInfo.Width); -end; - -procedure TcxGridCardRowCaptionViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - FRowViewInfo.GetCaptionViewParams(AParams, FCalculatingRealWidth); -end; - -function TcxGridCardRowCaptionViewInfo.GetVisible: Boolean; -begin - Result := Row.Options.ShowCaption; -end; - -procedure TcxGridCardRowCaptionViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - TcxGridCardRowCaptionHitTest(AHitTest).RowContainerKind := ckRows; -end; - -function TcxGridCardRowCaptionViewInfo.UseStandardNeedShowHint: Boolean; -begin - Result := True; -end; - -procedure TcxGridCardRowCaptionViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - if (FilterButtonViewInfo <> nil) and FilterButtonViewInfo.Visible then - FilterButtonViewInfo.Calculate(FilterButtonBounds); -end; - -function TcxGridCardRowCaptionViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - if (FilterButtonViewInfo <> nil) and FilterButtonViewInfo.Visible then - begin - Result := FilterButtonViewInfo.GetHitTest(P); - if Result <> nil then Exit; - end; - Result := inherited GetHitTest(P); -end; - -{ TcxGridCardRowDataViewInfo } - -function TcxGridCardRowDataViewInfo.CalculateHeight: Integer; -begin - CalculateParams; - if MultiLine then - Result := CardViewInfo.RecordsViewInfo.GetCellHeight(inherited CalculateHeight) - else - Result := CalculateSimpleHeight(Row, Canvas, Params.Font); -end; - -class function TcxGridCardRowDataViewInfo.CalculateSimpleHeight(ARow: TcxGridCardViewRow; - ACanvas: TcxCanvas; AFont: TFont): Integer; -begin - Result := ARow.CalculateDefaultCellHeight(ACanvas, AFont) * ARow.Position.LineCount; - Result := ARow.GridView.ViewInfo.RecordsViewInfo.GetCellHeight(Result); -end; - -function TcxGridCardRowDataViewInfo.CalculateWidth: Integer; -begin - Result := FRowViewInfo.DataWidth; -end; - -function TcxGridCardRowDataViewInfo.GetAutoHeight: Boolean; -begin - Result := CardViewInfo.RecordsViewInfo.AutoDataCellHeight; -end; - -function TcxGridCardRowDataViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - if GridView.IsDesigning or GridView.Controller.Customization then - Result := TcxGridCardRowCellHitTest - else - Result := inherited GetHitTestClass; -end; - -function TcxGridCardRowDataViewInfo.GetText: string; -begin - Result := inherited GetText; - if (Result = '') and not RowViewInfo.CaptionViewInfo.Visible then - Result := '<' + Row.Caption + '>'; -end; - -procedure TcxGridCardRowDataViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - FRowViewInfo.GetDataViewParams(AParams); -end; - -function TcxGridCardRowDataViewInfo.GetVisible: Boolean; -begin - Result := Row.Options.ShowData; -end; - -{ TcxGridCardRowViewInfo } - -constructor TcxGridCardRowViewInfo.Create(ACardViewInfo: TcxGridCardViewInfo; - AIndex: Integer); -begin - inherited Create(ACardViewInfo.GridViewInfo); - FCardViewInfo := ACardViewInfo; - FIndex := AIndex; - CreateViewInfos; -end; - -destructor TcxGridCardRowViewInfo.Destroy; -begin - DestroyViewInfos; - inherited; -end; - -function TcxGridCardRowViewInfo.GetExpandButtonAreaSizeValue: Integer; -begin - Result := GetExpandButtonAreaSize(LookAndFeelPainter); -end; - -function TcxGridCardRowViewInfo.GetExpandButtonSizeValue: Integer; -begin - Result := GetExpandButtonSize(LookAndFeelPainter); -end; - -function TcxGridCardRowViewInfo.GetExpanded: Boolean; -begin - Result := Row.Expanded; -end; - -function TcxGridCardRowViewInfo.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardRowViewInfo.GetGridRecord: TcxGridCard; -begin - Result := FCardViewInfo.GridRecord; -end; - -function TcxGridCardRowViewInfo.GetGridViewInfo: TcxGridCardViewViewInfo; -begin - Result := TcxGridCardViewViewInfo(inherited GridViewInfo); -end; - -{function TcxGridCardRowViewInfo.GetMaxHeight: Integer; -begin //!!! - Result := FCardViewInfo.MaxRowViewInfoHeight; -end;} - -function TcxGridCardRowViewInfo.GetRow: TcxGridCardViewRow; -begin - Result := GridView.VisibleRows[FIndex]; -end; - -procedure TcxGridCardRowViewInfo.SetExpanded(Value: Boolean); -begin - Row.Expanded := Value; -end; - -function TcxGridCardRowViewInfo.CalculatePartVisible: Boolean; -begin - Result := CardViewInfo.IsRowPartiallyVisible(Self); -end; - -function TcxGridCardRowViewInfo.CalculateVisible: Boolean; -begin - Result := CardViewInfo.IsRowVisible(Self); -end; - -procedure TcxGridCardRowViewInfo.CreateViewInfos; -begin - FCaptionViewInfo := GetCaptionViewInfoClass.Create(Self); - FDataViewInfo := GetDataViewInfoClass.Create(Self); -end; - -procedure TcxGridCardRowViewInfo.DestroyViewInfos; -begin - FreeAndNil(FDataViewInfo); - FreeAndNil(FCaptionViewInfo); -end; - -function TcxGridCardRowViewInfo.CalculateContentBounds: TRect; -begin - Result := inherited CalculateContentBounds; - if HasIndent then - Inc(Result.Left, Indent); - if HasExpandButton then - Inc(Result.Left, ExpandButtonAreaSize); -end; - -function TcxGridCardRowViewInfo.CalculateHeaderWidth: Integer; -begin - CalculateParams; - Result := Width - ContentWidth + CaptionViewInfo.RealWidth + CardDataIndent; -end; - -function TcxGridCardRowViewInfo.CalculateHeight: Integer; -var - ACaptionHeight, ADataHeight: Integer; -begin - if CardViewInfo.RecordsViewInfo.UseCardRowHeights then - Result := CardViewInfo.RecordsViewInfo.CardRowHeights[Index] - else - begin - CalculateParams; - if FCaptionViewInfo.Visible then - ACaptionHeight := FCaptionViewInfo.CalculateHeight - else - ACaptionHeight := 0; - if FDataViewInfo.Visible then - ADataHeight := FDataViewInfo.CalculateHeight - else - ADataHeight := 0; - Result := Max(ACaptionHeight, ADataHeight); - CheckHeight(TcxGridCardViewInfoClass(CardViewInfo.ClassType), Row, Self, - LookAndFeelPainter, Result); - end; -end; - -class function TcxGridCardRowViewInfo.CalculateSimpleHeight(ARow: TcxGridCardViewRow; - ACanvas: TcxCanvas): Integer; - - function CalculateCaptionHeight: Integer; - begin - if ARow.Options.ShowCaption then - Result := GetCaptionViewInfoClass.CalculateSimpleHeight(ARow, ACanvas, - GetSimpleViewParams(ARow, True).Font) - else - Result := 0; - end; - - function CalculateDataHeight: Integer; - begin - if ARow.Options.ShowData then - Result := GetDataViewInfoClass.CalculateSimpleHeight(ARow, ACanvas, - GetSimpleViewParams(ARow, False).Font) - else - Result := 0; - end; - -begin - Result := Max(CalculateCaptionHeight, CalculateDataHeight); - CheckHeight(ARow.GridView.ViewInfo.RecordsViewInfo.GetItemViewInfoClass, ARow, - nil, ARow.GridView.LookAndFeelPainter, Result); -end; - -function TcxGridCardRowViewInfo.CalculateWidth: Integer; -begin - if CardViewInfo.Layout.Simple then - Result := CardViewInfo.ContentWidth - else - Result := Row.Position.Width; -end; - -class procedure TcxGridCardRowViewInfo.CheckHeight(ACardViewInfoClass: TcxGridCardViewInfoClass; - ARow: TcxGridCardViewRow; ARowViewInfo: TcxGridCardRowViewInfo; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass; var AHeight: Integer); -begin - if ARow.HasCardExpandButton then - AHeight := Max(AHeight, ACardViewInfoClass.GetExpandButtonSize(ALookAndFeelPainter)); - if ARow.HasExpandButton then - AHeight := Max(AHeight, GetExpandButtonAreaSize(ALookAndFeelPainter)); -end; - -class function TcxGridCardRowViewInfo.GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; -begin - Result := TcxGridCardRowCaptionViewInfo; -end; - -function TcxGridCardRowViewInfo.GetCaptionWidth: Integer; -begin - Result := ContentWidth - DataWidth; -end; - -class function TcxGridCardRowViewInfo.GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; -begin - Result := TcxGridCardRowDataViewInfo; -end; - -function TcxGridCardRowViewInfo.GetDataWidth: Integer; -begin - if FDataViewInfo.Visible then - if FCaptionViewInfo.Visible then - begin - Result := CardViewInfo.Layout.GetHeaderWidth(Self); - if Result = -1 then - Result := HeaderWidth; - Result := Max(0, Width - Result); - end - else - Result := ContentWidth - else - Result := 0; -end; - -function TcxGridCardRowViewInfo.GetDesignSelectionBounds: TRect; -begin - Result := ContentBounds; -end; - -function TcxGridCardRowViewInfo.GetExpandButtonAreaBounds: TRect; -begin - Result := ContentBounds; - Result.Right := Result.Left; - Result.Left := Result.Right - ExpandButtonAreaSize; -end; - -class function TcxGridCardRowViewInfo.GetExpandButtonAreaSize(ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; -begin - Result := CardRowExpandButtonOffset + GetExpandButtonSize(ALookAndFeelPainter) + CardRowExpandButtonOffset; -end; - -function TcxGridCardRowViewInfo.GetExpandButtonBounds: TRect; -begin - Result := cxRectCenter(ExpandButtonAreaBounds, ExpandButtonSize, ExpandButtonSize); -end; - -class function TcxGridCardRowViewInfo.GetExpandButtonSize(ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; -begin - Result := ALookAndFeelPainter.ExpandButtonSize; -end; - -function TcxGridCardRowViewInfo.GetHeaderWidth: Integer; -begin - Result := GridView.OptionsView.CaptionWidth; - if Result = 0 then - Result := CalculateHeaderWidth; -end; - -function TcxGridCardRowViewInfo.GetHeight: Integer; -begin - if FHeight = 0 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TcxGridCardRowViewInfo.GetHidden: Boolean; -begin - Result := FCardViewInfo.VisibleRowViewInfoIndexOf(Self) = -1; -end; - -function TcxGridCardRowViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := nil; -end; - -function TcxGridCardRowViewInfo.GetIndent: Integer; -begin - Result := GridView.OptionsView.CategoryIndent; -end; - -function TcxGridCardRowViewInfo.GetIndentBounds: TRect; -begin - Result := Bounds; - Result.Right := Result.Left + Indent; -end; - -function TcxGridCardRowViewInfo.GetIndentViewParams: TcxViewParams; -begin - GridView.Styles.GetDataCellContentParams(GridRecord, Row.CategoryRow, Result); -end; - -function TcxGridCardRowViewInfo.GetIsDesignSelected: Boolean; -begin - Result := GridView.IsDesigning and - GridView.Controller.DesignController.IsObjectSelected(Row); -end; - -function TcxGridCardRowViewInfo.GetIsVisibleForPainting: Boolean; -begin - Result := FPartVisible; -end; - -function TcxGridCardRowViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridCardRowPainter; -end; - -class function TcxGridCardRowViewInfo.GetSimpleViewParams(ARow: TcxGridCardViewRow; - AIsCaption: Boolean): TcxViewParams; -begin - ARow.GridView.Styles.GetDataCellContentParams(nil, ARow, Result); -end; - -function TcxGridCardRowViewInfo.GetWidth: Integer; -begin - CalculateParams; - Result := inherited GetWidth; -end; - -procedure TcxGridCardRowViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - if AHitTest is TcxGridRecordCellHitTest then - with TcxGridRecordCellHitTest(AHitTest) do - begin - GridRecord := Self.GridRecord; - Item := Self.Row; - end; -end; - -procedure TcxGridCardRowViewInfo.BeforeRecalculation; -begin - inherited; - FCaptionViewInfo.BeforeRecalculation; - FDataViewInfo.BeforeRecalculation; - Visible := False; - FPartVisible := False; -end; - -procedure TcxGridCardRowViewInfo.Calculate(const ABounds: TRect); -begin - Height := ABounds.Bottom - ABounds.Top; - inherited; - CalculateVisibles; - FCaptionViewInfo.Calculate(ContentBounds.Left, ContentBounds.Top, -1, ContentHeight); - FDataViewInfo.Calculate(ContentBounds.Left + FCaptionViewInfo.Width, - ContentBounds.Top, -1, ContentHeight); -end; - -function TcxGridCardRowViewInfo.CalculateVisibleCounts(var AVisibleRowCount, APartVisibleRowCount: Integer): Boolean; -begin - if PartVisible then - Inc(APartVisibleRowCount); - if Visible then - Inc(AVisibleRowCount); - Result := Visible; -end; - -procedure TcxGridCardRowViewInfo.CalculateVisibles; -begin - FPartVisible := CalculatePartVisible; - Visible := CalculateVisible; -end; - -function TcxGridCardRowViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - if HasIndent and PtInRect(IndentBounds, P) then - begin - Result := TcxGridCardRowIndentHitTest.Instance(P); - InitHitTest(Result); - Result.ViewInfo := CardViewInfo; - end - else - if HasExpandButton and PtInRect(ExpandButtonAreaBounds, P) then - begin - Result := TcxGridCardRowExpandButtonHitTest.Instance(P); - InitHitTest(Result); - end - else - begin - Result := CaptionViewInfo.GetHitTest(P); - if Result = nil then - Result := DataViewInfo.GetHitTest(P); - end; -end; - -function TcxGridCardRowViewInfo.HasExpandButton: Boolean; -begin - Result := Row.HasExpandButton; -end; - -function TcxGridCardRowViewInfo.HasIndent: Boolean; -begin - Result := CardViewInfo.HasIndent(Self); -end; - -function TcxGridCardRowViewInfo.HasLimitedHeaderSpace: Boolean; -begin - Result := CaptionViewInfo.Visible and DataViewInfo.Visible; -end; - -function TcxGridCardRowViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -var - ARow: TcxGridCardViewRow; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if not Result and (AButton = mbLeft) and - (AHitTest.HitTestCode = htCardRowExpandButton) then - begin - ARow := Row; - Result := CardViewInfo.MouseDown(AHitTest, AButton, AShift); - if Result or ARow.IsDesigning then - begin - ARow.Expanded := not ARow.Expanded; - ARow.Controller.MakeFocusedRecordVisible; - ARow.Controller.DesignerModified; - end; - end; -end; - -{ TcxGridCardDataRowDataViewInfo } - -function TcxGridCardDataRowDataViewInfo.CalculateSelected: Boolean; -begin - Result := False; -end; - -{ TcxGridCardDataRowViewInfo } - -procedure TcxGridCardDataRowViewInfo.GetCaptionViewParams(var AParams: TcxViewParams; - AIgnoreSelection: Boolean); -begin - GridView.Styles.GetDataCellParams(GridRecord, Row, AParams, False, nil, AIgnoreSelection); -end; - -class function TcxGridCardDataRowViewInfo.GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; -begin - Result := TcxGridCardDataRowDataViewInfo; -end; - -procedure TcxGridCardDataRowViewInfo.GetDataViewParams(var AParams: TcxViewParams); -begin - Row.Styles.GetContentParams(GridRecord, AParams); -end; - -class function TcxGridCardDataRowViewInfo.GetSimpleViewParams(ARow: TcxGridCardViewRow; - AIsCaption: Boolean): TcxViewParams; -begin - if AIsCaption then - Result := inherited GetSimpleViewParams(ARow, AIsCaption) - else - ARow.Styles.GetContentParams(nil, Result); -end; - -{ TcxGridCardCaptionRowCaptionViewInfo } - -function TcxGridCardCaptionRowCaptionViewInfo.GetTextAreaBounds: TRect; -begin - Result := inherited GetTextAreaBounds; - if Row.HasCardExpandButton then - case CardViewInfo.ExpandButtonAlignment of - cebaLeft: - Inc(Result.Left, CardViewInfo.ExpandButtonAreaWidth); - cebaRight: - if not RowViewInfo.DataViewInfo.Visible then - Dec(Result.Right, CardViewInfo.ExpandButtonAreaWidth); - end; -end; - -{ TcxGridCardCaptionRowDataViewInfo } - -procedure TcxGridCardCaptionRowDataViewInfo.GetEditViewDataContentOffsets(var R: TRect); -var - R1, R2: TRect; -begin - inherited; - R1 := inherited GetTextAreaBounds; - R2 := TextAreaBounds; - Inc(R.Left, R2.Left - R1.Left); - Inc(R.Right, R1.Right - R2.Right); -end; - -function TcxGridCardCaptionRowDataViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridCardRowCellHitTest; -end; - -function TcxGridCardCaptionRowDataViewInfo.GetTextAreaBounds: TRect; -begin - Result := inherited GetTextAreaBounds; - if Row.HasCardExpandButton then - case CardViewInfo.ExpandButtonAlignment of - cebaLeft: - if not RowViewInfo.CaptionViewInfo.Visible then - Inc(Result.Left, CardViewInfo.ExpandButtonAreaWidth); - cebaRight: - Dec(Result.Right, CardViewInfo.ExpandButtonAreaWidth); - end; -end; - -{ TcxGridCardCaptionRowViewInfo } - -class function TcxGridCardCaptionRowViewInfo.GetCaptionViewInfoClass: TcxGridCardRowCaptionViewInfoClass; -begin - Result := TcxGridCardCaptionRowCaptionViewInfo; -end; - -procedure TcxGridCardCaptionRowViewInfo.GetCaptionViewParams(var AParams: TcxViewParams; - AIgnoreSelection: Boolean); -begin - GridView.Styles.GetDataCellParams(GridRecord, Row, AParams, False, nil, AIgnoreSelection); -end; - -class function TcxGridCardCaptionRowViewInfo.GetDataViewInfoClass: TcxGridCardRowDataViewInfoClass; -begin - Result := TcxGridCardCaptionRowDataViewInfo; -end; - -procedure TcxGridCardCaptionRowViewInfo.GetDataViewParams(var AParams: TcxViewParams); -begin - GetViewParams(AParams); -end; - -procedure TcxGridCardCaptionRowViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetDataCellParams(GridRecord, Row, AParams); -end; - -{ TcxGridCardCategoryRowViewInfo } - -class procedure TcxGridCardCategoryRowViewInfo.CheckHeight(ACardViewInfoClass: TcxGridCardViewInfoClass; - ARow: TcxGridCardViewRow; ARowViewInfo: TcxGridCardRowViewInfo; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass; var AHeight: Integer); -begin - inherited; - if (ARowViewInfo = nil) and HasSeparator(ACardViewInfoClass, ARow) or - (ARowViewInfo <> nil) and TcxGridCardCategoryRowViewInfo(ARowViewInfo).HasSeparator then - Inc(AHeight, ARow.GridView.OptionsView.CategorySeparatorWidth); -end; - -function TcxGridCardCategoryRowViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - if AIndex = bTop then - Result := SeparatorColor - else - Result := inherited GetBorderColor(AIndex); -end; - -function TcxGridCardCategoryRowViewInfo.GetBorders: TcxBorders; -begin - Result := inherited GetBorders; - if HasSeparator then Include(Result, bTop); -end; - -function TcxGridCardCategoryRowViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - if AIndex = bTop then - Result := GridView.OptionsView.CategorySeparatorWidth - else - Result := inherited GetBorderWidth(AIndex); -end; - -procedure TcxGridCardCategoryRowViewInfo.GetDataViewParams(var AParams: TcxViewParams); -begin - if Row.Editable then - Row.Styles.GetContentParams(GridRecord, AParams) - else - inherited; -end; - -function TcxGridCardCategoryRowViewInfo.GetSeparatorColor: TColor; -var - AParams: TcxViewParams; -begin - GridView.Styles.GetViewParams(vsCategorySeparator, nil, nil, AParams); - Result := AParams.Color; -end; - -function TcxGridCardCategoryRowViewInfo.HasSeparator: Boolean; -begin - Result := CardViewInfo.HasCategorySeparator(Self); -end; - -class function TcxGridCardCategoryRowViewInfo.HasSeparator(ACardViewInfoClass: TcxGridCardViewInfoClass; - ARow: TcxGridCardViewRow): Boolean; -begin - Result := ACardViewInfoClass.HasCategorySeparator(ARow); -end; - -function TcxGridCardCategoryRowViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - if HasSeparator and PtInRect(BorderBounds[bTop], P) then - begin - Result := TcxGridCardRowCellHitTest.Instance(P); - InitHitTest(Result); - end - else - Result := inherited GetHitTest(P); -end; - -{ TcxCustomGridCardScrollButtonViewInfo } - -constructor TcxCustomGridCardScrollButtonViewInfo.Create(ACardViewInfo: TcxGridCardViewInfo); -begin - inherited Create(ACardViewInfo.GridViewInfo); - FCardViewInfo := ACardViewInfo; -end; - -procedure TcxCustomGridCardScrollButtonViewInfo.ScrollTimerHandler(Sender: TObject); -begin - if Visible then - Scroll - else - StopAutoScrolling; -end; - -function TcxCustomGridCardScrollButtonViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TcxCustomGridCardScrollButtonViewInfo.CalculateWidth: Integer; -begin - Result := Width; -end; - -function TcxCustomGridCardScrollButtonViewInfo.CaptureMouseOnPress: Boolean; -begin - Result := True; -end; - -function TcxCustomGridCardScrollButtonViewInfo.GetHotTrack: Boolean; -begin - Result := True; -end; - -function TcxCustomGridCardScrollButtonViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridCardScrollButtonPainter; -end; - -procedure TcxCustomGridCardScrollButtonViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - FCardViewInfo.InitHitTest(AHitTest); - inherited; -end; - -procedure TcxCustomGridCardScrollButtonViewInfo.StateChanged(APrevState: TcxGridCellState); -begin - inherited; - case State of - gcsSelected: - StopAutoScrolling; - gcsPressed: - begin - Scroll; - StartAutoScrolling; - end; - gcsNone: - StopAutoScrolling; - end; -end; - -procedure TcxCustomGridCardScrollButtonViewInfo.StartAutoScrolling; -begin - FScrollTimer := TcxTimer.Create(nil); - with FScrollTimer do - begin - Interval := CardScrollingInterval; - OnTimer := ScrollTimerHandler; - end; -end; - -procedure TcxCustomGridCardScrollButtonViewInfo.StopAutoScrolling; -begin - FreeAndNil(FScrollTimer); -end; - -{ TcxGridCardScrollButtonDownViewInfo } - -function TcxGridCardScrollButtonDownViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridCardScrollButtonDownHitTest; -end; - -function TcxGridCardScrollButtonDownViewInfo.GetIsDownButton: Boolean; -begin - Result := True; -end; - -function TcxGridCardScrollButtonDownViewInfo.GetVisible: Boolean; -begin - Result := CardViewInfo.NeedsScrollingDown; -end; - -procedure TcxGridCardScrollButtonDownViewInfo.Scroll; -begin - with CardViewInfo do - TopRowIndex := TopRowIndex + 1; -end; - -{ TcxGridCardScrollButtonUpViewInfo } - -function TcxGridCardScrollButtonUpViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridCardScrollButtonUpHitTest; -end; - -function TcxGridCardScrollButtonUpViewInfo.GetIsDownButton: Boolean; -begin - Result := False; -end; - -function TcxGridCardScrollButtonUpViewInfo.GetVisible: Boolean; -begin - Result := CardViewInfo.NeedsScrollingUp; -end; - -procedure TcxGridCardScrollButtonUpViewInfo.Scroll; -begin - with CardViewInfo do - TopRowIndex := TopRowIndex - 1; -end; - -{ TcxGridCardExpandButtonViewInfo } - -constructor TcxGridCardExpandButtonViewInfo.Create(ACardViewInfo: TcxGridCardViewInfo); -begin - inherited Create(ACardViewInfo.GridViewInfo); - FCardViewInfo := ACardViewInfo; -end; - -function TcxGridCardExpandButtonViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TcxGridCardExpandButtonViewInfo.CalculateWidth: Integer; -begin - Result := 0; -end; - -function TcxGridCardExpandButtonViewInfo.CaptureMouseOnPress: Boolean; -begin - Result := True; -end; - -procedure TcxGridCardExpandButtonViewInfo.Click; -begin - inherited; - FCardViewInfo.GridRecord.ToggleExpanded; -end; - -function TcxGridCardExpandButtonViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridExpandButtonHitTest; -end; - -function TcxGridCardExpandButtonViewInfo.GetHotTrack: Boolean; -begin - Result := True; -end; - -function TcxGridCardExpandButtonViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridCardExpandButtonPainter; -end; - -function TcxGridCardExpandButtonViewInfo.GetVisible: Boolean; -begin - Result := FCardViewInfo.GridRecord.Expandable; -end; - -procedure TcxGridCardExpandButtonViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - TcxGridExpandButtonHitTest(AHitTest).GridRecord := FCardViewInfo.GridRecord; -end; - -function TcxGridCardExpandButtonViewInfo.HasPoint(const P: TPoint): Boolean; -begin - Result := inherited HasPoint(P) and - LookAndFeelPainter.IsPointOverGroupExpandButton(Bounds, P); -end; - -{ TcxGridCardRowLayer } - -constructor TcxGridCardRowLayer.Create(AOwner: TcxGridCardRowLayout; AIndex: Integer); -begin - inherited Create; - FOwner := AOwner; - FIndex := AIndex; - BeforeCalculation; -end; - -function TcxGridCardRowLayer.GetBounds: TRect; -begin - Result.TopLeft := Rows[0].Bounds.TopLeft; - Result.BottomRight := Rows[RowCount - 1].Bounds.BottomRight; -end; - -function TcxGridCardRowLayer.GetLength: Integer; -begin - if FLength = -1 then - FLength := CalculateLength; - Result := FLength; -end; - -function TcxGridCardRowLayer.GetRow(AIndex: Integer): TcxGridCardRowViewInfo; -begin - Result := Owner.LayerRowViewInfos[Index, AIndex]; -end; - -function TcxGridCardRowLayer.GetRowCount: Integer; -begin - Result := Owner.LayerRowCount[Index]; -end; - -function TcxGridCardRowLayer.GetThickness: Integer; -begin - if FThickness = -1 then - FThickness := CalculateThickness; - Result := FThickness; -end; - -procedure TcxGridCardRowLayer.BeforeCalculation; -begin - FLength := -1; - FThickness := -1; -end; - -procedure TcxGridCardRowLayer.SetThickness(Value: Integer); -begin - FThickness := Value; -end; - -procedure TcxGridCardRowLayer.Calculate(AOwnerWidth: Integer); -begin -end; - -{ TcxGridCardRowLayout } - -constructor TcxGridCardRowLayout.Create(ACardViewInfo: TcxGridCardViewInfo; - ASimple: Boolean); -begin - inherited Create(ACardViewInfo.GridRecord); - FCardViewInfo := ACardViewInfo; - FSimple := ASimple; - CreateLayers; -end; - -destructor TcxGridCardRowLayout.Destroy; -begin - DestroyLayers; - inherited; -end; - -function TcxGridCardRowLayout.GetLayer(Index: Integer): TcxGridCardRowLayer; -begin - Result := FLayers[Index]; -end; - -function TcxGridCardRowLayout.GetLayerRowViewInfo(ALayerIndex, AIndex: Integer): TcxGridCardRowViewInfo; -begin - Result := CardViewInfo.RowViewInfos[LayerRows[ALayerIndex, AIndex].VisibleIndex]; -end; - -function TcxGridCardRowLayout.GetSeparatorCount: Integer; -begin - Result := LayerCount - 1; -end; - -procedure TcxGridCardRowLayout.CreateLayers; -var - I: Integer; -begin - SetLength(FLayers, LayerCount); - for I := 0 to LayerCount - 1 do - FLayers[I] := GetLayerClass.Create(Self, I); -end; - -procedure TcxGridCardRowLayout.DestroyLayers; -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - Layers[I].Free; - FLayers := nil; -end; - -procedure TcxGridCardRowLayout.BeforeCalculation; -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - Layers[I].BeforeCalculation; -end; - -procedure TcxGridCardRowLayout.CalculateLayers(AWidth: Integer); -var - I: Integer; -begin - for I := 0 to LayerCount - 1 do - Layers[I].Calculate(AWidth); -end; - -function TcxGridCardRowLayout.CalculateRowsHeaderWidth(ARows: TList; AWidth: Integer): Integer; -var - I: Integer; - ARowViewInfo: TcxGridCardRowViewInfo; -begin - Result := 0; - for I := 0 to ARows.Count - 1 do - begin - ARowViewInfo := TcxGridCardRowViewInfo(ARows[I]); - if ARowViewInfo.HasLimitedHeaderSpace then - Result := Max(Result, ARowViewInfo.HeaderWidth); - end; - Result := Max(0, Min(Result, AWidth)); -end; - -function TcxGridCardRowLayout.GetLayerClass: TcxGridCardRowLayerClass; -begin - Result := TcxGridCardRowLayer; -end; - -function TcxGridCardRowLayout.GetLayersLength: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to LayerCount - 1 do - Result := Max(Result, Layers[I].Length); -end; - -function TcxGridCardRowLayout.GetLayersThickness: Integer; -var - I: Integer; -begin - Result := NonContentThickness; - for I := 0 to LayerCount - 1 do - Inc(Result, Layers[I].Thickness); -end; - -function TcxGridCardRowLayout.GetNonContentThickness: Integer; -begin - Result := SeparatorCount * SeparatorWidth; -end; - -function TcxGridCardRowLayout.HasSeparator(ALayer: TcxGridCardRowLayer): Boolean; -begin - Result := ALayer.Index > 0; -end; - -function TcxGridCardRowLayout.IsLayerVisible(ALayer: TcxGridCardRowLayer; - ATopRowIndex: Integer): Boolean; -begin - Result := True; -end; - -function TcxGridCardRowLayout.IsLayerVisible(const ABounds, ALayerBounds: TRect): Boolean; -begin - Result := True; -end; - -procedure TcxGridCardRowLayout.Calculate(AWidth: Integer); -begin - BeforeCalculation; - CalculateLayers(AWidth); -end; - -procedure TcxGridCardRowLayout.CalculateRows(const ABounds: TRect; - ATopRowIndex, AMaxRowHeight: Integer; var AVisibleRowCount, APartVisibleRowCount: Integer); -var - R: TRect; - I: Integer; -begin - AVisibleRowCount := 0; - APartVisibleRowCount := 0; - - R := ABounds; - R.BottomRight := R.TopLeft; - - for I := 0 to LayerCount - 1 do - if IsLayerVisible(Layers[I], ATopRowIndex) then - begin - CalculateLayerBounds(Layers[I], AMaxRowHeight, R); - if IsLayerVisible(ABounds, R) then - Layers[I].CalculateRows(R, ATopRowIndex, AVisibleRowCount, APartVisibleRowCount); - end; -end; - -function TcxGridCardRowLayout.GetIndexInLayer(ARowViewInfo: TcxGridCardRowViewInfo): Integer; -begin - Result := GetIndexInLayer(ARowViewInfo.Row); -end; - -function TcxGridCardRowLayout.GetLayerIndex(ARowViewInfo: TcxGridCardRowViewInfo): Integer; -begin - Result := GetLayerIndex(ARowViewInfo.Row); -end; - -function TcxGridCardRowLayout.GetLayerIndex(const P: TPoint): Integer; -begin - for Result := 0 to LayerCount - 1 do - if Layers[Result].HasPoint(P) then Exit; - Result := -1; -end; - -{ TcxGridCardRowHorizontalLayer } - -function TcxGridCardRowHorizontalLayer.GetOwner: TcxGridCardRowHorizontalLayout; -begin - Result := TcxGridCardRowHorizontalLayout(inherited Owner); -end; - -function TcxGridCardRowHorizontalLayer.CalculateLength: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - Inc(Result, Rows[I].Width); -end; - -procedure TcxGridCardRowHorizontalLayer.CalculateRowWidths(AAvailableWidth: Integer); -var - AWidths: array of Integer; - I: Integer; -begin - SetLength(AWidths, RowCount); - for I := 0 to RowCount - 1 do - AWidths[I] := Rows[I].Width; - CalculateCardRowWidths(AWidths, AAvailableWidth); - for I := 0 to RowCount - 1 do - Rows[I].Width := AWidths[I]; -end; - -function TcxGridCardRowHorizontalLayer.CalculateThickness: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - Result := Max(Result, Rows[I].Height); -end; - -procedure TcxGridCardRowHorizontalLayer.Calculate(AOwnerWidth: Integer); -begin - inherited; - CalculateRowWidths(AOwnerWidth); -end; - -procedure TcxGridCardRowHorizontalLayer.CalculateRows(const ABounds: TRect; - ATopRowIndex: Integer; var AVisibleRowCount, APartVisibleRowCount: Integer); -var - R: TRect; - I: Integer; - ARowViewInfo: TcxGridCardRowViewInfo; -begin - R := ABounds; - for I := 0 to RowCount - 1 do - begin - ARowViewInfo := Rows[I]; - R.Right := R.Left + ARowViewInfo.Width; - ARowViewInfo.Calculate(R); - R.Left := R.Right; - ARowViewInfo.CalculateVisibleCounts(AVisibleRowCount, APartVisibleRowCount); - end -end; - -function TcxGridCardRowHorizontalLayer.HasPoint(const P: TPoint): Boolean; -begin - with Rows[0].Bounds do - Result := (Top <= P.Y) and (P.Y < Bottom); -end; - -{ TcxGridCardRowHorizontalLayout } - -constructor TcxGridCardRowHorizontalLayout.Create(ACardViewInfo: TcxGridCardViewInfo; - ASimple: Boolean); -begin - inherited; - FFirstColumnRowsHeaderWidth := -1; -end; - -function TcxGridCardRowHorizontalLayout.CalculateFirstColumnRowsHeaderWidth(AWidth: Integer): Integer; -var - ARows: TList; - I: Integer; -begin - ARows := TList.Create; - try - for I := 0 to LayerCount - 1 do - ARows.Add(Layers[I].Rows[0]); - Result := CalculateRowsHeaderWidth(ARows, AWidth); - finally - ARows.Free; - end; -end; - -procedure TcxGridCardRowHorizontalLayout.CalculateLayerBounds(ALayer: TcxGridCardRowLayer; - AMaxRowHeight: Integer; var ABounds: TRect); -begin - ABounds.Top := ABounds.Bottom; - if HasSeparator(ALayer) then - Inc(ABounds.Top, SeparatorWidth); - ABounds.Bottom := ABounds.Top + Min(ALayer.Thickness, AMaxRowHeight); -end; - -function TcxGridCardRowHorizontalLayout.GetLayerClass: TcxGridCardRowLayerClass; -begin - Result := TcxGridCardRowHorizontalLayer; -end; - -function TcxGridCardRowHorizontalLayout.GetLayersHeight: Integer; -begin - Result := LayersThickness; -end; - -function TcxGridCardRowHorizontalLayout.IsLayerVisible(ALayer: TcxGridCardRowLayer; - ATopRowIndex: Integer): Boolean; -begin - Result := inherited IsLayerVisible(ALayer, ATopRowIndex) and - (not Simple or (ALayer.Index >= ATopRowIndex)); -end; - -function TcxGridCardRowHorizontalLayout.IsLayerVisible(const ABounds, ALayerBounds: TRect): Boolean; -begin - Result := inherited IsLayerVisible(ABounds, ALayerBounds) and - (not Simple or (ABounds.Top <= ALayerBounds.Top) and (ALayerBounds.Top < ABounds.Bottom)); -end; - -procedure TcxGridCardRowHorizontalLayout.Calculate(AWidth: Integer); -begin - inherited; - FFirstColumnRowsHeaderWidth := CalculateFirstColumnRowsHeaderWidth(AWidth); -end; - -function TcxGridCardRowHorizontalLayout.GetHeaderWidth(ARowViewInfo: TcxGridCardRowViewInfo): Integer; -begin - if IsLeft(ARowViewInfo) then - Result := FirstColumnRowsHeaderWidth - else - Result := -1; -end; - -function TcxGridCardRowHorizontalLayout.GetSeparatorBounds(AIndex: Integer): TRect; -begin - Result := CardViewInfo.LayerSeparatorAreaBounds; - Result.Bottom := Layers[1 + AIndex].Bounds.Top; - Result.Top := Result.Bottom - SeparatorWidth; -end; - -function TcxGridCardRowHorizontalLayout.IsLeft(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; -begin - Result := GetIndexInLayer(ARowViewInfo) = 0; -end; - -function TcxGridCardRowHorizontalLayout.IsTop(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; -begin - Result := GetLayerIndex(ARowViewInfo) = 0; -end; - -function TcxGridCardRowHorizontalLayout.IsZoneVertical(AZone: TcxGridCardRowContainerZone): Boolean; -begin - Result := AZone.InsertionPos <> ripNewLayer; -end; - -{ TcxGridCardRowVerticalLayer } - -constructor TcxGridCardRowVerticalLayer.Create(AOwner: TcxGridCardRowLayout; - AIndex: Integer); -begin - inherited; - FRowsHeaderWidth := -1; -end; - -function TcxGridCardRowVerticalLayer.CalculateLength: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - Inc(Result, Rows[I].Height); -end; - -function TcxGridCardRowVerticalLayer.CalculateRowsHeaderWidth: Integer; -var - ARows: TList; - I: Integer; -begin - ARows := TList.Create; - try - for I := 0 to RowCount - 1 do - ARows.Add(Rows[I]); - Result := Owner.CalculateRowsHeaderWidth(ARows, Thickness); - finally - ARows.Free; - end; -end; - -function TcxGridCardRowVerticalLayer.CalculateThickness: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RowCount - 1 do - Result := Max(Result, Rows[I].Width); -end; - -procedure TcxGridCardRowVerticalLayer.SetThickness(Value: Integer); -var - I: Integer; -begin - inherited; - for I := 0 to RowCount - 1 do - Rows[I].Width := Thickness; -end; - -procedure TcxGridCardRowVerticalLayer.Calculate(AOwnerWidth: Integer); -begin - inherited; - FRowsHeaderWidth := CalculateRowsHeaderWidth; -end; - -procedure TcxGridCardRowVerticalLayer.CalculateRows(const ABounds: TRect; - ATopRowIndex: Integer; var AVisibleRowCount, APartVisibleRowCount: Integer); -var - R: TRect; - I: Integer; - ARowViewInfo: TcxGridCardRowViewInfo; -begin - R := ABounds; - for I := ATopRowIndex to RowCount - 1 do - begin - ARowViewInfo := Rows[I]; - R.Bottom := R.Top + ARowViewInfo.Height; - ARowViewInfo.Calculate(R); - R.Top := R.Bottom; - if not ARowViewInfo.CalculateVisibleCounts(AVisibleRowCount, APartVisibleRowCount) then - Break; - end; -end; - -function TcxGridCardRowVerticalLayer.HasPoint(const P: TPoint): Boolean; -begin - with Rows[0].Bounds do - Result := (Left <= P.X) and (P.X < Right); -end; - -{ TcxGridCardRowVerticalLayout } - -procedure TcxGridCardRowVerticalLayout.CalculateLayerBounds(ALayer: TcxGridCardRowLayer; - AMaxRowHeight: Integer; var ABounds: TRect); -begin - ABounds.Left := ABounds.Right; - if HasSeparator(ALayer) then - Inc(ABounds.Left, SeparatorWidth); - ABounds.Right := ABounds.Left + ALayer.Thickness; -end; - -procedure TcxGridCardRowVerticalLayout.CalculateLayers(AWidth: Integer); -begin - CalculateLayerWidths(AWidth - NonContentThickness); - inherited; -end; - -procedure TcxGridCardRowVerticalLayout.CalculateLayerWidths(AAvailableWidth: Integer); -var - AWidths: array of Integer; - I: Integer; -begin - SetLength(AWidths, LayerCount); - for I := 0 to LayerCount - 1 do - AWidths[I] := Layers[I].Thickness; - CalculateCardRowWidths(AWidths, AAvailableWidth); - for I := 0 to LayerCount - 1 do - Layers[I].Thickness := AWidths[I]; -end; - -function TcxGridCardRowVerticalLayout.GetLayerClass: TcxGridCardRowLayerClass; -begin - Result := TcxGridCardRowVerticalLayer; -end; - -function TcxGridCardRowVerticalLayout.GetLayersHeight: Integer; -begin - Result := LayersLength; -end; - -function TcxGridCardRowVerticalLayout.GetHeaderWidth(ARowViewInfo: TcxGridCardRowViewInfo): Integer; -begin - Result := TcxGridCardRowVerticalLayer(Layers[GetLayerIndex(ARowViewInfo)]).RowsHeaderWidth; -end; - -function TcxGridCardRowVerticalLayout.GetSeparatorBounds(AIndex: Integer): TRect; -begin - Result := CardViewInfo.LayerSeparatorAreaBounds; - Result.Right := Layers[1 + AIndex].Bounds.Left; - Result.Left := Result.Right - SeparatorWidth; -end; - -function TcxGridCardRowVerticalLayout.IsLeft(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; -begin - Result := True; -end; - -function TcxGridCardRowVerticalLayout.IsTop(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; -begin - Result := GetIndexInLayer(ARowViewInfo) = 0; -end; - -function TcxGridCardRowVerticalLayout.IsZoneVertical(AZone: TcxGridCardRowContainerZone): Boolean; -begin - Result := AZone.InsertionPos = ripNewLayer; -end; - -{ TcxGridCardViewInfo } - -constructor TcxGridCardViewInfo.Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); -begin - inherited; - CreateRowViewInfos; - FLayout := GridView.RowLayoutController.CreateCardRowLayout(Self); - if HasLayerSeparators then - FLayout.SeparatorWidth := LayerSeparatorWidth; - CreateScrollButtons; - FExpandButtonViewInfo := GetExpandButtonViewInfoClass.Create(Self); -end; - -destructor TcxGridCardViewInfo.Destroy; -begin - FreeAndNil(FExpandButtonViewInfo); - DestroyScrollButtons; - FreeAndNil(FLayout); - DestroyRowViewInfos; - inherited; -end; - -function TcxGridCardViewInfo.GetCacheItem: TcxGridCardViewInfoCacheItem; -begin - Result := TcxGridCardViewInfoCacheItem(inherited CacheItem); -end; - -function TcxGridCardViewInfo.GetCardBorderWidth: Integer; -begin - Result := RecordsViewInfo.CardBorderWidth; -end; - -function TcxGridCardViewInfo.GetExpandButtonSizeValue: Integer; -begin - Result := GetExpandButtonSize(LookAndFeelPainter); -end; - -function TcxGridCardViewInfo.GetFirstCaptionRowViewInfo: TcxGridCardRowViewInfo; -var - ARow: TcxGridCardViewRow; -begin - ARow := GridView.FirstCaptionRow; - if ARow = nil then - Result := nil - else - Result := RowViewInfos[ARow.VisibleIndex]; -end; - -function TcxGridCardViewInfo.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardViewInfo.GetGridRecord: TcxGridCard; -begin - Result := TcxGridCard(inherited GridRecord); -end; - -function TcxGridCardViewInfo.GetRecordsViewInfo: TcxGridCardsViewInfo; -begin - Result := TcxGridCardsViewInfo(inherited RecordsViewInfo); -end; - -function TcxGridCardViewInfo.GetRowViewInfo(Index: Integer): TcxGridCardRowViewInfo; -begin - Result := TcxGridCardRowViewInfo(FRowViewInfos[Index]); -end; - -function TcxGridCardViewInfo.GetRowViewInfoCount: Integer; -begin - Result := FRowViewInfos.Count; -end; - -function TcxGridCardViewInfo.GetTopRowIndex: Integer; -begin - if CacheItem.IsTopRowIndexAssigned then - Result := CacheItem.TopRowIndex - else - begin - Result := 0; - CacheItem.TopRowIndex := Result; - end; -end; - -function TcxGridCardViewInfo.GetVisibleRowViewInfo(Index: Integer): TcxGridCardRowViewInfo; -begin - Result := RowViewInfos[Layout.Rows[Index].VisibleIndex]; -end; - -function TcxGridCardViewInfo.GetVisibleRowViewInfoCount: Integer; -begin - Result := Layout.RowCount; -end; - -procedure TcxGridCardViewInfo.SetTopRowIndex(Value: Integer); -begin - if Value < 0 then Value := 0; - if TopRowIndex <> Value then - begin - CacheItem.TopRowIndex := Value; - Recalculate; - Invalidate; - end; -end; - -procedure TcxGridCardViewInfo.CreateRowViewInfos; -var - I: Integer; - ARow: TcxGridCardViewRow; -begin - FRowViewInfos := TList.Create; - for I := 0 to GridView.VisibleRowCount - 1 do - begin - ARow := GridView.VisibleRows[I]; - FRowViewInfos.Add(GetRowViewInfoClass(ARow).Create(Self, I)); - end; -end; - -procedure TcxGridCardViewInfo.DestroyRowViewInfos; -var - I: Integer; -begin - for I := 0 to RowViewInfoCount - 1 do RowViewInfos[I].Free; - FreeAndNil(FRowViewInfos); -end; - -procedure TcxGridCardViewInfo.CreateScrollButtons; -begin - FScrollButtonDown := GetScrollButtonDownViewInfoClass.Create(Self); - FScrollButtonUp := GetScrollButtonUpViewInfoClass.Create(Self); -end; - -procedure TcxGridCardViewInfo.DestroyScrollButtons; -begin - FreeAndNil(FScrollButtonUp); - FreeAndNil(FScrollButtonDown); -end; - -procedure TcxGridCardViewInfo.CalculateExpandButtonBounds(var ABounds: TRect); -var - ASize: Integer; -begin - ABounds := ExpandButtonAreaBounds; - if IsRectEmpty(ABounds) then Exit; - ASize := ExpandButtonSize; - with ABounds do - begin - Left := (Left + Right - ASize) div 2; - Right := Left + ASize; - Top := (Top + Bottom - ASize) div 2; - Bottom := Top + ASize; - end; -end; - -function TcxGridCardViewInfo.CalculateHeight: Integer; -begin - if RecordsViewInfo.UseCardHeight then - Result := RecordsViewInfo.CardHeight - else - begin - CalculateParams; - DoCalculateLayout; - Result := 2 * CardBorderWidth; - Inc(Result, Layout.LayersHeight); - end; -{ if Result > RecordsViewInfo.MaxCardHeight then - Result := RecordsViewInfo.MaxCardHeight;} -end; - -procedure TcxGridCardViewInfo.CalculateLayout; -begin - Layout.Calculate(ContentWidth); -end; - -procedure TcxGridCardViewInfo.DoCalculateLayout; -begin - if not FLayoutCalculated then - begin - CalculateLayout; - FLayoutCalculated := True; - end; -end; - -procedure TcxGridCardViewInfo.CalculateRows; -var - R: TRect; -begin - R := ContentBounds; - if NeedsScrollingUp then - Inc(R.Top, ScrollButtonHeight); - Layout.CalculateRows(R, TopRowIndex, MaxRowViewInfoHeight, - FVisibleRowCount, FPartVisibleRowCount); -end; - -procedure TcxGridCardViewInfo.CalculateRowVisibles; -var - I: Integer; - ARowViewInfo: TcxGridCardRowViewInfo; -begin - FVisibleRowCount := 0; - FPartVisibleRowCount := 0; - for I := TopRowIndex to VisibleRowViewInfoCount - 1 do - begin - ARowViewInfo := VisibleRowViewInfos[I]; - ARowViewInfo.CalculateVisibles; - if not ARowViewInfo.CalculateVisibleCounts(FVisibleRowCount, FPartVisibleRowCount) then - Break; - end; -end; - -function TcxGridCardViewInfo.CalculateWidth: Integer; -begin - Result := Width; -end; - -function TcxGridCardViewInfo.CanGenerateExpandButtonHitTest: Boolean; -begin - Result := False; -end; - -function TcxGridCardViewInfo.GetAutoHeight: Boolean; -begin - Result := RecordsViewInfo.AutoDataRecordHeight; -end; - -function TcxGridCardViewInfo.GetBackgroundBitmapBounds: TRect; -begin - Result := RestSpaceBounds; -end; - -function TcxGridCardViewInfo.GetContentBounds: TRect; -begin - Result := inherited GetContentBounds; - InflateRect(Result, -CardBorderWidth, -CardBorderWidth); - Inc(Result.Top, FScrollButtonUp.Height); - Dec(Result.Bottom, FScrollButtonDown.Height); -end; - -function TcxGridCardViewInfo.GetContentHeight: Integer; -begin - with ContentBounds do - Result := Bottom - Top; -end; - -function TcxGridCardViewInfo.GetContentWidth: Integer; -begin - with ContentBounds do - Result := Right - Left; -end; - -function TcxGridCardViewInfo.GetExpandButtonAlignment: TcxGridCardExpandButtonAlignment; -begin - Result := GridView.OptionsView.CardExpandButtonAlignment; -end; - -function TcxGridCardViewInfo.GetExpandButtonAreaBounds: TRect; -var - ARowViewInfo: TcxGridCardRowViewInfo; - AOwnerViewInfo: TcxGridCardRowCellViewInfo; -begin - ARowViewInfo := FirstCaptionRowViewInfo; - if (ARowViewInfo = nil) or not ARowViewInfo.PartVisible then - SetRectEmpty(Result) - else - begin - Result := ARowViewInfo.Bounds; - case ExpandButtonAlignment of - cebaLeft: - begin - Result.Right := Result.Left + ExpandButtonAreaWidth; - if ARowViewInfo.CaptionViewInfo.Visible then - AOwnerViewInfo := ARowViewInfo.CaptionViewInfo - else - AOwnerViewInfo := ARowViewInfo.DataViewInfo; - end; - cebaRight: - begin - Result.Left := Result.Right - ExpandButtonAreaWidth; - if ARowViewInfo.DataViewInfo.Visible then - AOwnerViewInfo := ARowViewInfo.DataViewInfo - else - AOwnerViewInfo := ARowViewInfo.CaptionViewInfo; - end; - else - AOwnerViewInfo := nil; - end; - if IsRectEmpty(AOwnerViewInfo.TextAreaBounds) then - SetRectEmpty(Result); - end; -end; - -function TcxGridCardViewInfo.GetExpandButtonAreaWidth: Integer; -begin - Result := CardExpandButtonOffset + ExpandButtonSize + CardExpandButtonOffset; -end; - -class function TcxGridCardViewInfo.GetExpandButtonSize(ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; -begin - Result := ALookAndFeelPainter.GroupExpandButtonSize; -end; - -function TcxGridCardViewInfo.GetHeight: Integer; -begin - Result := Min(inherited GetHeight, RecordsViewInfo.MaxCardHeight); -end; - -function TcxGridCardViewInfo.GetLayerSeparatorAreaBounds: TRect; -begin - Result := ContentBounds; -end; - -function TcxGridCardViewInfo.GetLayerSeparatorColor: TColor; -var - AParams: TcxViewParams; -begin - GridView.Styles.GetViewParams(vsLayerSeparator, nil, nil, AParams); - Result := AParams.Color; -end; - -function TcxGridCardViewInfo.GetLayerSeparatorWidth: Integer; -begin - Result := GridView.OptionsView.LayerSeparatorWidth; -end; - -function TcxGridCardViewInfo.GetMaxRowViewInfoHeight: Integer; -begin - Result := ContentHeight; - if NeedsScrollingUp then - Dec(Result, ScrollButtonHeight); -end; - -function TcxGridCardViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridCardPainter; -end; - -function TcxGridCardViewInfo.GetRestSpaceBounds: TRect; -begin - if (VisibleRowCount = 0) or not NeedsScrollingUp or NeedsScrollingDown then - SetRectEmpty(Result) - else - begin - Result := ContentBounds; - Result.Top := RowViewInfos[TopRowIndex + VisibleRowCount - 1].Bounds.Bottom; - end; -end; - -function TcxGridCardViewInfo.GetScrollableAreaBounds: TRect; -begin - Result := ContentBounds; - if FScrollButtonUp.Visible then - Result.Top := FScrollButtonUp.Bounds.Bottom; - if FScrollButtonDown.Visible then - Result.Bottom := FScrollButtonDown.Bounds.Top; -end; - -function TcxGridCardViewInfo.GetScrollButtonDownBounds: TRect; -begin - Result := ContentBounds; - with Result do - Top := Bottom - ScrollButtonHeight; -end; - -function TcxGridCardViewInfo.GetScrollButtonDownViewInfoClass: TcxGridCardScrollButtonDownViewInfoClass; -begin - Result := TcxGridCardScrollButtonDownViewInfo; -end; - -function TcxGridCardViewInfo.GetScrollButtonUpViewInfoClass: TcxGridCardScrollButtonUpViewInfoClass; -begin - Result := TcxGridCardScrollButtonUpViewInfo; -end; - -function TcxGridCardViewInfo.GetScrollButtonHeight: Integer; -begin - Result := MulDiv(GetScrollBarSize.cy, 3, 4); -end; - -function TcxGridCardViewInfo.GetScrollButtonUpBounds: TRect; -begin - Result := ContentBounds; - with Result do - Bottom := Top + ScrollButtonHeight; -end; - -procedure TcxGridCardViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetRecordContentParams(GridRecord, nil, AParams); -end; - -function TcxGridCardViewInfo.GetVisible: Boolean; -begin - Result := Index < RecordsViewInfo.PartVisibleCount; -end; - -function TcxGridCardViewInfo.GetWidth: Integer; -begin - Result := RecordsViewInfo.CardWidth; -end; - -function TcxGridCardViewInfo.HasCategorySeparator(ARowViewInfo: TcxGridCardCategoryRowViewInfo): Boolean; -begin - Result := not Layout.IsTop(ARowViewInfo) and Layout.IsWholeLine(ARowViewInfo.Row); -end; - -class function TcxGridCardViewInfo.HasCategorySeparator(ARow: TcxGridCardViewRow): Boolean; -begin - Result := (ARow.Position.VisibleRowIndex <> 0) and ARow.Position.IsWholeLine; -end; - -function TcxGridCardViewInfo.HasIndent(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; -begin - Result := (ARowViewInfo.Row.CategoryRow <> nil) and Layout.IsLeft(ARowViewInfo); -end; - -function TcxGridCardViewInfo.HasLayerSeparators: Boolean; -begin - Result := not Layout.Simple and (LayerSeparatorWidth <> 0); -end; - -function TcxGridCardViewInfo.IsRowPartiallyVisible(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; -begin - Result := not Layout.Simple or (ARowViewInfo.Bounds.Top < ContentBounds.Bottom); -end; - -function TcxGridCardViewInfo.IsRowVisible(ARowViewInfo: TcxGridCardRowViewInfo): Boolean; -begin - Result := not Layout.Simple or (ARowViewInfo.Bounds.Bottom <= ContentBounds.Bottom); -end; - -function TcxGridCardViewInfo.SupportsScrolling: Boolean; -begin - Result := Layout.Simple; -end; - -function TcxGridCardViewInfo.GetZone(AHitTest: TcxCustomGridHitTest): TcxGridItemContainerZone; - - function GetPointPosition(const ARect: TRect; const P: TPoint; - AHorzSeparation: Boolean): TcxPosition; - const - HorzAreaMaxWidth = 30; - var - AHorzAreaWidth: Integer; - begin - if P.Y < GetRangeCenter(ARect.Top, ARect.Bottom) then - Result := posTop - else - Result := posBottom; - if AHorzSeparation then - begin - AHorzAreaWidth := Min(HorzAreaMaxWidth, (ARect.Right - ARect.Left) div 4); - if P.X < ARect.Left + AHorzAreaWidth then - Result := posLeft - else - if P.X >= ARect.Right - AHorzAreaWidth then - Result := posRight; - end; - end; - -var - AInsertionIndex: Integer; - AInsertionPos: TcxGridCardRowInsertionPos; - ARow: TcxGridCardViewRow; - APosition: TcxPosition; -begin - if VisibleRowCount = 0 then - begin - AInsertionIndex := 0; - AInsertionPos := ripNewLayer; - end - else - begin - if AHitTest is TcxGridRecordCellHitTest then - begin - ARow := TcxGridCardViewRow(TcxGridRecordCellHitTest(AHitTest).Item); - APosition := GetPointPosition(RowViewInfos[ARow.VisibleIndex].ContentBounds, - AHitTest.Pos, GridView.SupportsLayeredRows); - end - else - if AHitTest.HitTestCode = htCardScrollButtonUp then - begin - ARow := VisibleRowViewInfos[TopRowIndex].Row; - APosition := posTop; - end - else - if (AHitTest.HitTestCode = htCardScrollButtonDown) or PtInRect(RestSpaceBounds, AHitTest.Pos) then - begin - ARow := VisibleRowViewInfos[TopRowIndex + PartVisibleRowCount - 1].Row; - APosition := posBottom; - end - else - begin - ARow := nil; - APosition := posNone; - end; - if ARow <> nil then - Layout.GetInsertionParams(ARow, APosition, AInsertionIndex, AInsertionPos) - else - if PtInRect(ContentBounds, AHitTest.Pos) then - begin - AInsertionIndex := Layout.GetLayerIndex(AHitTest.Pos); - if AInsertionIndex <> -1 then - begin - AInsertionIndex := Layout.LayerFirstRowIndex[AInsertionIndex + 1]; - AInsertionPos := ripPrevLayer; - end; - end - else - AInsertionIndex := -1; - end; - if AInsertionIndex <> -1 then - Result := TcxGridCardRowContainerZone.Create(GridRecord, AInsertionIndex, AInsertionPos) - else - Result := nil; -end; - -function TcxGridCardViewInfo.GetZoneBounds(AZone: TcxGridCardRowContainerZone): TRect; -var - AUseFirstPart: Boolean; -begin - if VisibleRowCount = 0 then - Result := ContentBounds - else - begin - AUseFirstPart := False; - if AZone.ItemIndex > VisibleRowViewInfos[TopRowIndex + PartVisibleRowCount - 1].Row.VisibleIndex then - Result := VisibleRowViewInfos[TopRowIndex + PartVisibleRowCount - 1].Bounds - else - if AZone.InsertionPos = ripPrevLayer then - Result := VisibleRowViewInfos[VisibleRowViewInfoIndexOf(RowViewInfos[AZone.ItemIndex]) - 1].Bounds - else - begin - Result := RowViewInfos[AZone.ItemIndex].Bounds; - AUseFirstPart := True; - end; - if not AUseFirstPart then - if IsZoneVertical(AZone) then - Result.Left := Result.Right - else - Result.Top := Result.Bottom; - - if AZone.InsertionPos = ripNewLayer then - if IsZoneVertical(AZone) then - begin - Result.Top := ContentBounds.Top; - Result.Bottom := ContentBounds.Bottom; - end - else - begin - Result.Left := ContentBounds.Left; - Result.Right := ContentBounds.Right; - end; - end; -end; - -function TcxGridCardViewInfo.IsZoneVertical(AZone: TcxGridCardRowContainerZone): Boolean; -begin - Result := Layout.IsZoneVertical(AZone); -end; - -function TcxGridCardViewInfo.GetExpandButtonViewInfoClass: TcxGridCardExpandButtonViewInfoClass; -begin - Result := TcxGridCardExpandButtonViewInfo; -end; - -class function TcxGridCardViewInfo.GetRowViewInfoClass(ARow: TcxGridCardViewRow): TcxGridCardRowViewInfoClass; -const - RowViewInfoClasses: array[TcxGridCardViewRowKind] of TcxGridCardRowViewInfoClass = - (TcxGridCardDataRowViewInfo, TcxGridCardCaptionRowViewInfo, TcxGridCardCategoryRowViewInfo); -begin - Result := RowViewInfoClasses[ARow.Kind]; -end; - -procedure TcxGridCardViewInfo.BeforeRecalculation; -var - I: Integer; -begin - FVisibleRowCount := 0; - FPartVisibleRowCount := 0; - FLayoutCalculated := False; - inherited; - for I := 0 to RowViewInfoCount - 1 do - RowViewInfos[I].BeforeRecalculation; - FExpandButtonViewInfo.BeforeRecalculation; -end; - -procedure TcxGridCardViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - DoCalculateLayout; - SetRectEmpty(FScrollButtonDown.Bounds); - SetRectEmpty(FScrollButtonUp.Bounds); - CalculateRows; - if SupportsScrolling then - begin - if FScrollButtonDown.Visible then - FScrollButtonDown.Calculate(ScrollButtonDownBounds); - if FScrollButtonUp.Visible then - FScrollButtonUp.Calculate(ScrollButtonUpBounds); - CalculateRowVisibles; - end; -end; - -function TcxGridCardViewInfo.GetBoundsForItem(AItem: TcxCustomGridTableItem): TRect; -begin - with RowViewInfos[AItem.VisibleIndex] do - if Hidden then - Result := inherited GetBoundsForItem(AItem) - else - Result := Bounds; -end; - -procedure TcxGridCardViewInfo.GetCardBorderViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetCardBorderVisualParams(GridRecord, AParams); -end; - -function TcxGridCardViewInfo.GetCellViewInfoByItem(AItem: TcxCustomGridTableItem): TcxGridTableDataCellViewInfo; -begin - if AItem.VisibleIndex = -1 then - Result := nil - else - Result := RowViewInfos[AItem.VisibleIndex].DataViewInfo; -end; - -function TcxGridCardViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; - AHitTest: TcxCustomGridHitTest; -begin - Result := FScrollButtonUp.GetHitTest(P); - if Result = nil then - begin - Result := FScrollButtonDown.GetHitTest(P); - if Result = nil then - begin - Result := FExpandButtonViewInfo.GetHitTest(P); - if Result = nil then - begin - Result := inherited GetHitTest(P); - if Result <> nil then - for I := TopRowIndex to TopRowIndex + PartVisibleRowCount - 1 do - begin - AHitTest := VisibleRowViewInfos[I].GetHitTest(P); - if AHitTest <> nil then - begin - Result := AHitTest; - Exit; - end; - end; - end; - end; - end; -end; - -function TcxGridCardViewInfo.IsFullyVisible: Boolean; -begin - Result := (inherited GetHeight <= RecordsViewInfo.MaxCardHeight){ and - not (NeedsScrollingUp or NeedsScrollingDown)}; -end; - -procedure TcxGridCardViewInfo.MainCalculate(ALeftBound, ATopBound: Integer); -begin - inherited; - if FExpandButtonViewInfo.Visible then - FExpandButtonViewInfo.Calculate(ExpandButtonBounds); -end; - -procedure TcxGridCardViewInfo.MakeRowVisible(ARow: TcxGridCardViewRow); -var - AVisibleRowIndex: Integer; -begin - AVisibleRowIndex := VisibleRowViewInfoIndexOf(ARow); - if AVisibleRowIndex = -1 then Exit; - if AVisibleRowIndex < TopRowIndex then - TopRowIndex := AVisibleRowIndex - else - if AVisibleRowIndex >= TopRowIndex + VisibleRowCount then - while not VisibleRowViewInfos[AVisibleRowIndex].Visible and (AVisibleRowIndex <> TopRowIndex) do - TopRowIndex := TopRowIndex + 1; -end; - -function TcxGridCardViewInfo.NeedsScrollingDown: Boolean; -begin - Result := (TopRowIndex + VisibleRowCount < VisibleRowViewInfoCount) and - ((VisibleRowCount > 0) or (TopRowIndex <> VisibleRowViewInfoCount - 1)); -end; - -function TcxGridCardViewInfo.NeedsScrollingUp: Boolean; -begin - Result := TopRowIndex > 0; -end; - -function TcxGridCardViewInfo.VisibleRowViewInfoIndexOf(ARow: TcxGridCardViewRow): Integer; -begin - if ARow.VisibleIndex = -1 then - Result := -1 - else - Result := VisibleRowViewInfoIndexOf(RowViewInfos[ARow.VisibleIndex]); -end; - -function TcxGridCardViewInfo.VisibleRowViewInfoIndexOf(ARowViewInfo: TcxGridCardRowViewInfo): Integer; -begin - Result := Layout.GetRowIndex(ARowViewInfo.Row); -end; - -{ TcxGridCardsViewInfo } - -constructor TcxGridCardsViewInfo.Create(AGridViewInfo: TcxCustomGridTableViewInfo); -begin - inherited; - FCardHeight := -1; - FColumns := TcxGridCardViewColumns.Create(Self); -end; - -destructor TcxGridCardsViewInfo.Destroy; -begin - FColumns.Free; - inherited; -end; - -function TcxGridCardsViewInfo.GetCardBorderWidth: Integer; -begin - Result := GridView.OptionsView.CardBorderWidth; -end; - -function TcxGridCardsViewInfo.GetCardContentWidth: Integer; -begin - Result := CardWidth - 2 * CardBorderWidth; -end; - -function TcxGridCardsViewInfo.GetCardIndent: Integer; -begin - Result := GridView.OptionsView.CardIndent; -end; - -function TcxGridCardsViewInfo.GetColumnWidth: Integer; -begin - Result := CardWidth + CardSpaceHorz; -end; - -function TcxGridCardsViewInfo.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardsViewInfo.GetGridViewInfo: TcxGridCardViewViewInfo; -begin - Result := TcxGridCardViewViewInfo(inherited GridViewInfo); -end; - -function TcxGridCardsViewInfo.GetItem(Index: Integer): TcxGridCardViewInfo; -begin - Result := TcxGridCardViewInfo(inherited Items[Index]); -end; - -function TcxGridCardsViewInfo.GetRowHeight: Integer; -begin - Result := CardHeight + CardSpaceVert; -end; - -function TcxGridCardsViewInfo.GetViewData: TcxGridCardViewViewData; -begin - Result := TcxGridCardViewViewData(inherited ViewData); -end; - -procedure TcxGridCardsViewInfo.Calculate; -begin - inherited; - FCardWidth := CalculateCardWidth; - FCardHeight := CalculateCardHeight; - FMaxCardHeight := CalculateMaxCardHeight; -end; - -function TcxGridCardsViewInfo.CalculateCardHeight: Integer; -var - I: Integer; -begin - if GridView.VisibleRowCount = 0 then - Result := EmptyCardHeight - else - begin - Result := 2 * CardBorderWidth; - SetLength(CardRowHeights, GridView.VisibleRowCount); - for I := 0 to GridView.VisibleRowCount - 1 do - begin - CardRowHeights[I] := CalculateCardRowHeight(GridView.VisibleRows[I]); - Inc(Result, CardRowHeights[I]); - end; - end; -end; - -function TcxGridCardsViewInfo.CalculateCardRowHeight(ARow: TcxGridCardViewRow): Integer; -begin - Result := GetItemViewInfoClass.GetRowViewInfoClass(ARow).CalculateSimpleHeight(ARow, Canvas); -end; - -function TcxGridCardsViewInfo.CalculateCardWidth: Integer; -var - ASpace, ACardColCount: Integer; -begin - Result := GridView.OptionsView.CardWidth; - if GridView.OptionsView.CardAutoWidth then - begin - ASpace := ContentBounds.Right - ContentBounds.Left + CardSpaceHorz; - ACardColCount := ASpace div (Result + CardSpaceHorz); - if ACardColCount < 1 then ACardColCount := 1; - Result := ASpace div ACardColCount - CardSpaceHorz; - if Result < cxGridCardMinWidth then Result := cxGridCardMinWidth; - end; -end; - -function TcxGridCardsViewInfo.CalculateContentBounds: TRect; -begin - Result := inherited CalculateContentBounds; - InflateRect(Result, -CardIndent, -CardIndent); -end; - -function TcxGridCardsViewInfo.CalculateHeight(var AFullyVisible: Boolean): Integer; -var - AIsParentViewInfoCalculatedDown: Boolean; - I, AColumnHeight: Integer; - ALastRow: TcxGridCardViewInfo; -begin - if Columns.Count = 0 then - Result := 2 * CardIndent + CardHeight - else - begin - Result := 0; - AIsParentViewInfoCalculatedDown := - (GridView.MasterGridView.ViewInfo as TcxCustomGridTableViewInfo).CalculateDown; - {if AIsParentViewInfoCalculatedDown then - AFullyVisible := True;} - for I := 0 to Columns.Count - 1 do - begin - ALastRow := Columns[I].LastRow; - AColumnHeight := ALastRow.Bounds.Bottom + CardIndent; - if Result < AColumnHeight then Result := AColumnHeight; - if AIsParentViewInfoCalculatedDown and AFullyVisible then - AFullyVisible := ALastRow.IsFullyVisible; - end; - end; -end; - -function TcxGridCardsViewInfo.CalculateMaxCardHeight: Integer; -begin - with ContentBounds do - Result := Bottom - Top; - if Result < 0 then Result := 0; -end; - -function TcxGridCardsViewInfo.CalculateWidth(AMaxWidth: Integer): Integer; -begin - if Columns.Count = 0 then - Result := 0 - else - if Columns.Count = Columns.VisibleCount then - Result := Columns.Last[0].Bounds.Right + CardIndent - else - Result := AMaxWidth; -end; - -function TcxGridCardsViewInfo.GetAutoCellHeight: Boolean; -begin - Result := AutoDataCellHeight or GridView.OptionsView.RowCaptionAutoHeight; -end; - -function TcxGridCardsViewInfo.GetAutoDataRecordHeight: Boolean; -begin - Result := AutoCellHeight or not GridView.OptionsView.EmptyRows or - GridView.OptionsCustomize.CardExpanding; -end; - -{procedure TcxGridCardsViewInfo.GetDataCellDefaultViewParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; var AParams: TcxViewParams); -begin - inherited; - RealItems[ARecord.Index].RowViewInfos[AItem.VisibleIndex].GetDefaultViewParams(AParams); -end;} - -function TcxGridCardsViewInfo.GetItemLeftBound(AIndex: Integer): Integer; -begin - Result := 0; -end; - -function TcxGridCardsViewInfo.GetItemsOffset(AItemCountDelta: Integer): Integer; -begin - Result := 0; -end; - -function TcxGridCardsViewInfo.GetItemTopBound(AIndex: Integer): Integer; -begin - Result := 0; -end; - -function TcxGridCardsViewInfo.GetItemViewInfoClass: TcxGridCardViewInfoClass; -begin - Result := TcxGridCardViewInfo; -end; - -procedure TcxGridCardsViewInfo.OffsetItem(AIndex, AOffset: Integer); -begin -end; - -function TcxGridCardsViewInfo.GetRealItem(ARecord: TcxCustomGridRecord): TcxGridCardViewInfo; -begin - Result := TcxGridCardViewInfo(inherited GetRealItem(ARecord)); -end; - -function TcxGridCardsViewInfo.GetZone(AHitTest: TcxCustomGridHitTest): TcxGridItemContainerZone; -begin - if (AHitTest is TcxGridRecordHitTest) and - TcxGridCardViewController(Controller).CanHandleHitTest(AHitTest) then - Result := GetRealItem(TcxGridRecordHitTest(AHitTest).GridRecord).GetZone(AHitTest) - else - Result := nil; -end; - -function TcxGridCardsViewInfo.UseCardHeight: Boolean; -begin - Result := UseCardRowHeights and not AutoDataRecordHeight and - GridView.RowLayoutController.IsSimpleLayout; -end; - -function TcxGridCardsViewInfo.UseCardRowHeights: Boolean; -begin - Result := (CardRowHeights <> nil) and not AutoCellHeight and - (not AutoDataRecordHeight or (GridView.OptionsView.CategorySeparatorWidth = 0) {or (no category rows)}); -end; - -{ TcxGridCardsHorizontalViewInfo } - -procedure TcxGridCardsHorizontalViewInfo.Calculate; -var - ALeftBound, ATopBound, ACol, ARow, I: Integer; -begin - inherited; - ACol := 0; - ARow := 0; - ALeftBound := ContentBounds.Left; - ATopBound := ContentBounds.Top; - - for I := 0 to MaxCount - 1 do - begin - if I <> 0 then - if ATopBound + Items[I].Height > ContentBounds.Bottom then - begin - Inc(ACol); - ARow := 0; - Inc(ALeftBound, Items[I - 1].Width + CardSpaceHorz); - if ALeftBound >= Bounds.Right then Break; - ATopBound := ContentBounds.Top; - end; - - if GridViewInfo.CalculateDown then - begin - Columns[ACol][ARow] := Items[I]; - Items[I].MainCalculate(ALeftBound, ATopBound); - end; - - if ((ALeftBound + Items[I].Width <= Bounds.Right) or (ACol = 0)) then - Inc(FVisibleCount); - Inc(FPartVisibleCount); - Inc(ARow); - Inc(ATopBound, Items[I].Height + CardSpaceVert); - end; -end; - -function TcxGridCardsHorizontalViewInfo.GetCardSpaceHorz: Integer; -begin - Result := CardIndent + GridViewInfo.SeparatorsViewInfo.Width + CardIndent; -end; - -function TcxGridCardsHorizontalViewInfo.GetCardSpaceVert: Integer; -begin - Result := CardIndent; -end; - -{ TcxGridCardsVerticalViewInfo } - -procedure TcxGridCardsVerticalViewInfo.Calculate; -var - ALeftBound, ATopBound, ARowHeight, ACol, ARow, I: Integer; - AIsVisibleCountCalculated: Boolean; - - procedure CalcVisibleCount; - begin - Inc(FPartVisibleCount); - if not AIsVisibleCountCalculated then - if (ARow = 0) or (ATopBound + Items[I].Height <= Bounds.Bottom) then - Inc(FVisibleCount) - else - begin - Dec(FVisibleCount, ACol); - AIsVisibleCountCalculated := True; - end; - end; - -begin - inherited; - ACol := 0; - ARow := 0; - ALeftBound := ContentBounds.Left; - ATopBound := ContentBounds.Top; - ARowHeight := 0; - AIsVisibleCountCalculated := False; - - for I := 0 to MaxCount - 1 do - begin - if I <> 0 then - if ALeftBound + Items[I].Width > ContentBounds.Right then - begin - ACol := 0; - Inc(ARow); - ALeftBound := ContentBounds.Left; - Inc(ATopBound, ARowHeight + CardSpaceVert); - if ATopBound >= Bounds.Bottom then Break; - ARowHeight := 0; - end; - - if GridViewInfo.CalculateDown then - begin - Columns[ACol][ARow] := Items[I]; - Items[I].MainCalculate(ALeftBound, ATopBound); - end; - - CalcVisibleCount; - - Inc(ACol); - if ARowHeight < Items[I].Height then - ARowHeight := Items[I].Height; - Inc(ALeftBound, Items[I].Width + CardSpaceHorz); - end; -end; - -function TcxGridCardsVerticalViewInfo.GetCardSpaceHorz: Integer; -begin - Result := CardIndent; -end; - -function TcxGridCardsVerticalViewInfo.GetCardSpaceVert: Integer; -begin - Result := CardIndent + GridViewInfo.SeparatorsViewInfo.Width + CardIndent; -end; - -{ TcxGridCardViewSeparatorsViewInfo } - -constructor TcxGridCardViewSeparatorsViewInfo.Create(AGridViewInfo: TcxGridCardViewViewInfo); -begin - inherited Create; - FGridViewInfo := AGridViewInfo; - CreateItems; -end; - -destructor TcxGridCardViewSeparatorsViewInfo.Destroy; -begin - DestroyItems; - inherited; -end; - -function TcxGridCardViewSeparatorsViewInfo.GetColor: TColor; -begin - Result := GridView.OptionsView.GetSeparatorColor; -end; - -function TcxGridCardViewSeparatorsViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridCardViewSeparatorsViewInfo.GetGridView: TcxGridCardView; -begin - Result := FGridViewInfo.GridView; -end; - -function TcxGridCardViewSeparatorsViewInfo.GetItem(Index: Integer): TRect; -begin - Result := PRect(FItems[Index])^; -end; - -function TcxGridCardViewSeparatorsViewInfo.GetRecordsViewInfo: TcxGridCardsViewInfo; -begin - Result := FGridViewInfo.RecordsViewInfo; -end; - -function TcxGridCardViewSeparatorsViewInfo.GetWidth: Integer; -begin - Result := GridView.OptionsView.SeparatorWidth; -end; - -procedure TcxGridCardViewSeparatorsViewInfo.SetItem(Index: Integer; const Value: TRect); -var - ARect: PRect; -begin - if Index >= Count then - begin - New(ARect); - FItems.Add(ARect); - end; - PRect(FItems[Index])^ := Value; -end; - -procedure TcxGridCardViewSeparatorsViewInfo.CreateItems; -begin - FItems := TList.Create; -end; - -procedure TcxGridCardViewSeparatorsViewInfo.DestroyItems; -var - I: Integer; -begin - for I := 0 to FItems.Count - 1 do Dispose(PRect(FItems[I])); - FreeAndNil(FItems); -end; - -function TcxGridCardViewSeparatorsViewInfo.GetBounds: TRect; -begin - Result := GridViewInfo.ClientBounds; - InflateRect(Result, -RecordsViewInfo.CardIndent, -RecordsViewInfo.CardIndent); -end; - -function TcxGridCardViewSeparatorsViewInfo.GetHitTest(const P: TPoint): TcxGridCardViewSeparatorHitTest; -var - I: Integer; -begin - if GridView.SupportsCardSizing and PtInRect(GridViewInfo.ClientBounds, P) then - for I := 0 to HitTestItemCount - 1 do - if PtInRect(HitTestItems[I], P) then - begin - Result := TcxGridCardViewSeparatorHitTest(TcxGridCardViewSeparatorHitTest.Instance(P)); - Result.Separators := Self; - Result.Index := I; - Exit; - end; - Result := nil; -end; - -{ TcxGridCardViewSeparatorsHorizontalViewInfo } - -function TcxGridCardViewSeparatorsHorizontalViewInfo.GetHitTestItem(Index: Integer): TRect; -begin - Result := Items[Index]; - InflateRect(Result, SeparatorSizingAddZone, 0); -end; - -function TcxGridCardViewSeparatorsHorizontalViewInfo.GetHitTestItemCount: Integer; -begin - Result := Count; -end; - -procedure TcxGridCardViewSeparatorsHorizontalViewInfo.Calculate; -var - R: TRect; - I: Integer; -begin - R := Bounds; - for I := 0 to RecordsViewInfo.Columns.Count - 1 do - begin - R.Left := RecordsViewInfo.Columns[I][0].Bounds.Right + RecordsViewInfo.CardIndent; - R.Right := R.Left + Width; - Items[I] := R; - end; -end; - -{ TcxGridCardViewSeparatorsVerticalViewInfo } - -function TcxGridCardViewSeparatorsVerticalViewInfo.GetHitTestItem(Index: Integer): TRect; -begin - Result := Bounds; - Result.Left := RecordsViewInfo.Columns[Index][0].Bounds.Right + - (RecordsViewInfo.CardSpaceHorz - SeparatorSizingZone) div 2; - Result.Right := Result.Left + SeparatorSizingZone; -end; - -function TcxGridCardViewSeparatorsVerticalViewInfo.GetHitTestItemCount: Integer; -begin - Result := RecordsViewInfo.Columns.Count; -end; - -procedure TcxGridCardViewSeparatorsVerticalViewInfo.Calculate; - - function GetRowBottom(ARowIndex: Integer): Integer; - var - I: Integer; - begin - Result := 0; - for I := 0 to RecordsViewInfo.Columns.Count - 1 do - with RecordsViewInfo.Columns[I] do - if ARowIndex < RowCount then - with Rows[ARowIndex] do - if Result < Bounds.Bottom then Result := Bounds.Bottom; - end; - -var - R: TRect; - I: Integer; -begin - if RecordsViewInfo.Columns.Count = 0 then Exit; - R := Bounds; - R.Right := Max(R.Right, RecordsViewInfo.Columns[0][0].Bounds.Right); - for I := 0 to RecordsViewInfo.Columns[0].RowCount - 1 do - begin - R.Top := GetRowBottom(I) + RecordsViewInfo.CardIndent; - R.Bottom := R.Top + Width; - Items[I] := R; - end; -end; - -{ TcxGridCardViewViewInfo } - -function TcxGridCardViewViewInfo.GetController: TcxGridCardViewController; -begin - Result := TcxGridCardViewController(inherited Controller); -end; - -function TcxGridCardViewViewInfo.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardViewViewInfo.GetRecordsViewInfo: TcxGridCardsViewInfo; -begin - Result := TcxGridCardsViewInfo(inherited RecordsViewInfo); -end; - -function TcxGridCardViewViewInfo.GetViewData: TcxGridCardViewViewData; -begin - Result := TcxGridCardViewViewData(inherited ViewData); -end; - -procedure TcxGridCardViewViewInfo.CreateViewInfos; -begin - inherited; - FSeparatorsViewInfo := GetSeparatorsViewInfoClass.Create(Self); -end; - -procedure TcxGridCardViewViewInfo.DestroyViewInfos(AIsRecreating: Boolean); -begin - FreeAndNil(FSeparatorsViewInfo); - inherited; -end; - -procedure TcxGridCardViewViewInfo.AfterCalculating; -begin - if Visible and (RecordsViewInfo.CardHeight <> FPrevCardHeight) then - Controller.PostGridModeBufferCountUpdate; - inherited; -end; - -procedure TcxGridCardViewViewInfo.BeforeCalculating; -begin - inherited; - if Visible then - FPrevCardHeight := RecordsViewInfo.CardHeight; -end; - -procedure TcxGridCardViewViewInfo.Calculate; -begin - RecreateViewInfos; - FilterViewInfo.MainCalculate; - inherited; - SeparatorsViewInfo.Calculate; -end; - -procedure TcxGridCardViewViewInfo.CalculateHeight(const AMaxSize: TPoint; - var AHeight: Integer; var AFullyVisible: Boolean); -begin - MainCalculate(Classes.Bounds( - cxGridInvisibleCoordinate, 0, AMaxSize.X, AMaxSize.Y)); - AFullyVisible := Controller.IsDataFullyVisible; - AHeight := RecordsViewInfo.CalculateHeight(AFullyVisible); - Inc(AHeight, GetNonRecordsAreaHeight(False)); - inherited; -end; - -procedure TcxGridCardViewViewInfo.CalculateWidth(const AMaxSize: TPoint; var AWidth: Integer); -begin -// AWidth := AMaxSize.X; - //MainCalculate(Bounds(cxGridInvisibleCoordinate, 0, AMaxSize.X, AMaxSize.Y)); it is supposed that calculation was called from GetHeight - AWidth := RecordsViewInfo.CalculateWidth(AMaxSize.X); - inherited; -end; - -function TcxGridCardViewViewInfo.DoGetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := SeparatorsViewInfo.GetHitTest(P); - if Result = nil then - Result := inherited DoGetHitTest(P); -end; - -function TcxGridCardViewViewInfo.GetDefaultGridModeBufferCount: Integer; -begin - if (RecordsViewInfo.CardWidth = 0) or (RecordsViewInfo.CardHeight = 0) then - begin - Controller.PostGridModeBufferCountUpdate; - Result := 0; - end - else - Result := RoundDiv(Screen.Width, RecordsViewInfo.ColumnWidth) * - RoundDiv(Screen.Height, RecordsViewInfo.RowHeight) + 2; -end; - -function TcxGridCardViewViewInfo.GetScrollableAreaBoundsForEdit: TRect; -begin - Result := inherited GetScrollableAreaBoundsForEdit; - IntersectRect(Result, Result, Controller.FocusedCardViewInfo.ScrollableAreaBounds); -end; - -function TcxGridCardViewViewInfo.GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; -begin - case GridView.LayoutDirection of - ldHorizontal: - Result := TcxGridCardsHorizontalViewInfo; - ldVertical: - Result := TcxGridCardsVerticalViewInfo; - else - Result := nil; - end; -end; - -function TcxGridCardViewViewInfo.GetSeparatorsViewInfoClass: TcxGridCardViewSeparatorsViewInfoClass; -begin - case GridView.LayoutDirection of - ldHorizontal: - Result := TcxGridCardViewSeparatorsHorizontalViewInfo; - ldVertical: - Result := TcxGridCardViewSeparatorsVerticalViewInfo; - else - Result := nil; - end; -end; - -function TcxGridCardViewViewInfo.CanOffsetView(ARecordCountDelta: Integer): Boolean; -begin - Result := False; -end; - -{ TcxGridCardViewInfoCacheItem } - -procedure TcxGridCardViewInfoCacheItem.SetTopRowIndex(Value: Integer); -begin - FTopRowIndex := Value; - FIsTopRowIndexAssigned := True; -end; - -procedure TcxGridCardViewInfoCacheItem.UnassignValues(AKeepMaster: Boolean); -begin - inherited; - FIsTopRowIndexAssigned := False; -end; - -{ TcxGridCardViewRowOptions } - -constructor TcxGridCardViewRowOptions.Create(AItem: TcxCustomGridTableItem); -begin - inherited; - FExpanding := True; - FShowData := True; -end; - -procedure TcxGridCardViewRowOptions.SetExpanding(Value: Boolean); -begin - if FExpanding <> Value then - begin - FExpanding := Value; - Changed(ticSize); - end; -end; - -procedure TcxGridCardViewRowOptions.SetShowData(Value: Boolean); -begin - if FShowData <> Value then - begin - if not Value then - ShowCaption := True; - FShowData := Value; - Changed(ticSize); - end; -end; - -procedure TcxGridCardViewRowOptions.BeforeShowCaptionChange; -begin - inherited; - if ShowCaption then ShowData := True; -end; - -procedure TcxGridCardViewRowOptions.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridCardViewRowOptions then - with TcxGridCardViewRowOptions(Source) do - begin - Self.Expanding := Expanding; - Self.ShowData := ShowData; - end; -end; - -{ TcxGridCardViewRowPosition } - -constructor TcxGridCardViewRowPosition.Create(AItem: TcxCustomGridTableItem); -begin - inherited; - FLineCount := 1; -end; - -function TcxGridCardViewRowPosition.GetBeginsLayer: Boolean; -begin - Result := GridView.RowLayoutController.BeginsLayer[Item]; -end; - -function TcxGridCardViewRowPosition.GetColIndex: Integer; -begin - Result := GridView.RowLayoutController.GetCoordinates(Item).ColIndex; -end; - -function TcxGridCardViewRowPosition.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardViewRowPosition.GetIndexInLayer: Integer; -begin - Result := GridView.RowLayoutController.GetPosition(Item).IndexInLayer; -end; - -function TcxGridCardViewRowPosition.GetItem: TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(inherited Item); -end; - -function TcxGridCardViewRowPosition.GetLayerIndex: Integer; -begin - Result := GridView.RowLayoutController.GetPosition(Item).LayerIndex; -end; - -function TcxGridCardViewRowPosition.GetLayerVisibleIndex: Integer; -begin - Result := GridView.RowLayoutController.GetVisiblePosition(Item).LayerIndex; -end; - -function TcxGridCardViewRowPosition.GetRowIndex: Integer; -begin - Result := GridView.RowLayoutController.GetCoordinates(Item).RowIndex; -end; - -function TcxGridCardViewRowPosition.GetVisibleColIndex: Integer; -begin - Result := GridView.RowLayoutController.GetVisibleCoordinates(Item).ColIndex; -end; - -function TcxGridCardViewRowPosition.GetVisibleIndexInLayer: Integer; -begin - Result := GridView.RowLayoutController.GetVisiblePosition(Item).IndexInLayer; -end; - -function TcxGridCardViewRowPosition.GetVisibleRowIndex: Integer; -begin - Result := GridView.RowLayoutController.GetVisibleCoordinates(Item).RowIndex; -end; - -procedure TcxGridCardViewRowPosition.SetBeginsLayer(Value: Boolean); -begin - if GridView.IsUpdating or GridView.IsRestoring then - FBeginsLayer := Value - else - GridView.RowLayoutController.BeginsLayer[Item] := Value; -end; - -procedure TcxGridCardViewRowPosition.SetColIndex(Value: Integer); -begin - GridView.RowLayoutController.SetCoordinates(Item, Value, -1); -end; - -procedure TcxGridCardViewRowPosition.SetIndexInLayer(Value: Integer); -begin - GridView.RowLayoutController.SetPosition(Item, -1, Value); -end; - -procedure TcxGridCardViewRowPosition.SetLayerIndex(Value: Integer); -begin - GridView.RowLayoutController.SetPosition(Item, Value, -1); -end; - -procedure TcxGridCardViewRowPosition.SetLineCount(Value: Integer); -begin - if Value < 1 then Value := 1; - if FLineCount <> Value then - begin - FLineCount := Value; - Changed(ticSize); - end; -end; - -procedure TcxGridCardViewRowPosition.SetRowIndex(Value: Integer); -begin - GridView.RowLayoutController.SetCoordinates(Item, -1, Value); -end; - -procedure TcxGridCardViewRowPosition.SetWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FWidth <> Value then - begin - FWidth := Value; - Changed(ticSize); - end; -end; - -procedure TcxGridCardViewRowPosition.AssignParams; -begin - BeginsLayer := FBeginsLayer; -end; - -procedure TcxGridCardViewRowPosition.SaveParams; -begin - FBeginsLayer := BeginsLayer; -end; - -procedure TcxGridCardViewRowPosition.Assign(Source: TPersistent); -begin - inherited; - with TcxGridCardViewRowPosition(Source) do - begin - Self.BeginsLayer := BeginsLayer; - {Self.IndexInLayer := IndexInLayer; - Self.LayerIndex := LayerIndex;} - Self.LineCount := LineCount; - Self.Width := Width; - end; -end; - -function TcxGridCardViewRowPosition.IsWholeLine: Boolean; -begin - Result := GridView.RowLayoutController.IsWholeLine(Item); -end; - -{ TcxGridCardViewRowStyles } - -constructor TcxGridCardViewRowStyles.Create(AOwner: TPersistent); -begin - inherited; - BitmapInViewParams := True; -end; - -function TcxGridCardViewRowStyles.GetGridViewValue: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardViewRowStyles.GetItem: TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(inherited Item); -end; - -procedure TcxGridCardViewRowStyles.SetOnGetCaptionRowStyle(Value: TcxGridGetCellStyleEvent); -begin - if @FOnGetCaptionRowStyle <> @Value then - begin - FOnGetCaptionRowStyle := Value; - Item.Changed(ticProperty); - end; -end; - -procedure TcxGridCardViewRowStyles.SetOnGetCaptionStyle(Value: TcxGridGetCellStyleEvent); -begin - if @FOnGetCaptionStyle <> @Value then - begin - FOnGetCaptionStyle := Value; - Item.Changed(ticProperty); - end; -end; - -procedure TcxGridCardViewRowStyles.SetOnGetCategoryRowStyle(Value: TcxGridGetCellStyleEvent); -begin - if @FOnGetCategoryRowStyle <> @Value then - begin - FOnGetCategoryRowStyle := Value; - Item.Changed(ticProperty); - end; -end; - -procedure TcxGridCardViewRowStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - case Index of - isCaptionRow: - GridView.Styles.GetCaptionRowParams(TcxCustomGridRecord(AData), Item, AParams); - isCategoryRow: - GridView.Styles.GetCategoryRowParams(TcxCustomGridRecord(AData), Item, AParams); - isRowCaption: - GridView.Styles.GetRowCaptionParams(TcxCustomGridRecord(AData), Item, AParams); - else - inherited; - end; -end; - -procedure TcxGridCardViewRowStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridCardViewRowStyles then - with TcxGridCardViewRowStyles(Source) do - begin - Self.Caption := Caption; - Self.CaptionRow := CaptionRow; - Self.CategoryRow := CategoryRow; - Self.OnGetCaptionRowStyle := OnGetCaptionRowStyle; - Self.OnGetCaptionStyle := OnGetCaptionStyle; - Self.OnGetCategoryRowStyle := OnGetCategoryRowStyle; - end; -end; - -procedure TcxGridCardViewRowStyles.GetCaptionParams(ARecord: TcxCustomGridRecord; - out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if (ARecord <> nil) and Assigned(FOnGetCaptionStyle) then - FOnGetCaptionStyle(GridView, ARecord, Item, AStyle); - GetViewParams(isRowCaption, ARecord, AStyle, AParams); -end; - -procedure TcxGridCardViewRowStyles.GetCaptionRowParams(ARecord: TcxCustomGridRecord; - out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if (ARecord <> nil) and Assigned(FOnGetCaptionRowStyle) then - FOnGetCaptionRowStyle(GridView, ARecord, Item, AStyle); - GetViewParams(isCaptionRow, ARecord, AStyle, AParams); -end; - -procedure TcxGridCardViewRowStyles.GetCategoryRowParams(ARecord: TcxCustomGridRecord; - out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if (ARecord <> nil) and Assigned(FOnGetCategoryRowStyle) then - FOnGetCategoryRowStyle(GridView, ARecord, Item, AStyle); - GetViewParams(isCategoryRow, ARecord, AStyle, AParams); -end; - -{ TcxGridCardViewRow } - -constructor TcxGridCardViewRow.Create(AOwner: TComponent); -begin - inherited; - FCategoryItems := TList.Create; -end; - -destructor TcxGridCardViewRow.Destroy; -begin - FCategoryItems.Free; - inherited; -end; - -function TcxGridCardViewRow.GetCaptionAlignmentHorz: TAlignment; -begin - Result := HeaderAlignmentHorz; -end; - -function TcxGridCardViewRow.GetCaptionAlignmentVert: TcxAlignmentVert; -begin - Result := HeaderAlignmentVert; -end; - -function TcxGridCardViewRow.GetCategoryItem(AIndex: Integer): TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(FCategoryItems[AIndex]); -end; - -function TcxGridCardViewRow.GetCategoryItemCount: Integer; -begin - Result := FCategoryItems.Count; -end; - -function TcxGridCardViewRow.GetExpanded: Boolean; -begin - Result := HasExpandableItems and FExpanded; -end; - -function TcxGridCardViewRow.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardViewRow.GetOptions: TcxGridCardViewRowOptions; -begin - Result := TcxGridCardViewRowOptions(inherited Options); -end; - -function TcxGridCardViewRow.GetStyles: TcxGridCardViewRowStyles; -begin - Result := TcxGridCardViewRowStyles(inherited Styles); -end; - -procedure TcxGridCardViewRow.SetCaptionAlignmentHorz(Value: TAlignment); -begin - HeaderAlignmentHorz := Value; -end; - -procedure TcxGridCardViewRow.SetCaptionAlignmentVert(Value: TcxAlignmentVert); -begin - HeaderAlignmentVert := Value; -end; - -procedure TcxGridCardViewRow.SetCategoryRow(Value: TcxGridCardViewRow); -begin - if (FKind <> rkCategory) and (CategoryRow <> Value) then - if Value = nil then - Index := GridView.FirstCategoryRow.Index - else - if Value.Kind = rkCategory then - Index := Value.Index + Value.CategoryItemCount + 1 - Ord(Index < Value.Index); -end; - -procedure TcxGridCardViewRow.SetCategoryRowValue(Value: TcxGridCardViewRow); -begin - FCategoryRow := Value; - FCategoryItems.Clear; - if FCategoryRow <> nil then - FCategoryRow.FCategoryItems.Add(Self); -end; - -procedure TcxGridCardViewRow.SetExpanded(Value: Boolean); -begin - if (Expanded <> Value) and (IsLoading or HasExpandableItems) then - begin - if not GridView.RowExpandedChanging(Self, Value) then Exit; - GridView.BeginUpdate; - try - GridView.SaveItemVisibles; - FExpanded := Value; - Changed(ticLayout); - GridView.CheckItemVisibles; - finally - GridView.EndUpdate; - end; - GridView.RowExpandedChanged(Self); - end; -end; - -procedure TcxGridCardViewRow.SetKind(Value: TcxGridCardViewRowKind); -begin - if FKind <> Value then - begin - GridView.BeginUpdate; - try - GridView.SaveItemVisibles; - FKind := Value; - GridView.RefreshCategoryRowLinks; - if Visible then - begin - if not CanFocus(nil) then Focused := False; - Changed(ticSize); - end - else - Changed(ticProperty); - GridView.CheckItemVisibles; - finally - GridView.EndUpdate; - end; - end; -end; - -procedure TcxGridCardViewRow.SetOptions(Value: TcxGridCardViewRowOptions); -begin - inherited Options := Value; -end; - -procedure TcxGridCardViewRow.SetPosition(Value: TcxGridCardViewRowPosition); -begin - FPosition.Assign(Value); -end; - -procedure TcxGridCardViewRow.SetStyles(Value: TcxGridCardViewRowStyles); -begin - inherited Styles := Value; -end; - -function TcxGridCardViewRow.IsCaptionAlignmentHorzStored: Boolean; -begin - Result := IsHeaderAlignmentHorzStored; -end; - -function TcxGridCardViewRow.IsCaptionAlignmentVertStored: Boolean; -begin - Result := IsHeaderAlignmentVertStored; -end; - -function TcxGridCardViewRow.GetStoredProperties(AProperties: TStrings): Boolean; -begin - AProperties.Add('BeginsLayer'); - if Expandable then - AProperties.Add('Expanded'); - Result := inherited GetStoredProperties(AProperties); -end; - -procedure TcxGridCardViewRow.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'BeginsLayer' then - AValue := Position.BeginsLayer - else - if AName = 'Expanded' then - AValue := Expanded - else - inherited; -end; - -procedure TcxGridCardViewRow.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'BeginsLayer' then - Position.BeginsLayer := AValue - else - if AName = 'Expanded' then - Expanded := AValue - else - inherited; -end; - -procedure TcxGridCardViewRow.CreateSubClasses; -begin - inherited; - FPosition := GetPositionClass.Create(Self); -end; - -procedure TcxGridCardViewRow.DestroySubClasses; -begin - FreeAndNil(FPosition); - inherited; -end; - -function TcxGridCardViewRow.GetOptionsClass: TcxCustomGridTableItemOptionsClass; -begin - Result := TcxGridCardViewRowOptions; -end; - -function TcxGridCardViewRow.GetPositionClass: TcxGridCardViewRowPositionClass; -begin - Result := TcxGridCardViewRowPosition; -end; - -function TcxGridCardViewRow.GetStylesClass: TcxCustomGridTableItemStylesClass; -begin - Result := TcxGridCardViewRowStyles; -end; - -function TcxGridCardViewRow.CanEdit: Boolean; -begin - Result := inherited CanEdit and Options.ShowData; -end; - -function TcxGridCardViewRow.CanExpand: Boolean; -begin - Result := Expandable and GridView.OptionsCustomize.RowExpanding and Options.Expanding; -end; - -function TcxGridCardViewRow.CanFilter(AVisually: Boolean): Boolean; -begin - Result := inherited CanFilter(AVisually); - if Result and AVisually then - Result := Options.ShowData; -end; - -function TcxGridCardViewRow.CanFocus(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := inherited CanFocus(ARecord) and (FKind <> rkCaption) and - ((ARecord = nil) or IsVisibleInCard(TcxGridCard(ARecord))); -end; - -function TcxGridCardViewRow.DefaultAlternateCaption: string; -begin - Result := inherited DefaultAlternateCaption; - if GridView.OptionsView.CategoryRowCaptionInRowAlternateCaption and (CategoryRow <> nil) then - Result := CategoryRow.GetAlternateCaption + cxGridCardViewAlternateCaptionSeparator + Result; -end; - -function TcxGridCardViewRow.DefaultWidth: Integer; -begin - Result := DataBinding.DefaultWidth(False); -end; - -function TcxGridCardViewRow.GetActuallyVisible: Boolean; -begin - Result := inherited GetActuallyVisible; - if Result and (CategoryRow <> nil) then - Result := CategoryRow.ActuallyVisible and CategoryRow.Expanded; -end; - -function TcxGridCardViewRow.GetExpandable: Boolean; -begin - Result := FKind = rkCategory; -end; - -procedure TcxGridCardViewRow.GetItems(ARows: TList; AIncludeSubItems: Boolean); -begin - if AIncludeSubItems and (FKind = rkCategory) then - CopyList(CategoryItemsList, ARows) - else - ARows.Clear; - ARows.Insert(0, Self); -end; - -function TcxGridCardViewRow.GetVisibleCaption: string; -begin - Result := inherited GetVisibleCaption; - if Options.ShowData and (GridView.OptionsView.CaptionSeparator <> #0) then - Result := Result + GridView.OptionsView.CaptionSeparator; -end; - -function TcxGridCardViewRow.HasExpandableItems: Boolean; -begin - Result := Expandable and (CategoryItemCount <> 0); -end; - -procedure TcxGridCardViewRow.Assign(Source: TPersistent); -begin - if Source is TcxGridCardViewRow then - with TcxGridCardViewRow(Source) do - begin - Self.Expanded := Expanded; - Self.Kind := Kind; - Self.Position := Position; - end; - inherited; -end; - -function TcxGridCardViewRow.HasCardExpandButton: Boolean; -begin - Result := GridView.OptionsCustomize.CardExpanding and - (FKind = rkCaption) and (GridView.FirstCaptionRow = Self); -end; - -function TcxGridCardViewRow.HasExpandButton: Boolean; -begin - Result := CanExpand; -end; - -function TcxGridCardViewRow.IsVisibleInCard(ACard: TcxGridCard): Boolean; -begin - Result := ActuallyVisible; - if Result and (FKind <> rkCaption) then - Result := ACard.Expanded and - ((FKind <> rkData) or GridView.OptionsView.EmptyRows or - ACard.IsEditing or not VarIsNull(ACard.Values[Index])); -end; - -procedure TcxGridCardViewRow.MoveTo(AIndex: Integer; AMoveSubItems: Boolean); -var - ARows: TList; -begin - if AMoveSubItems then - begin - ARows := TList.Create; - try - GetItems(ARows, True); - GridView.RowLayoutController.LayoutObject.MoveRows(ARows, AIndex); - finally - ARows.Free; - end; - end - else - Index := AIndex; -end; - -{ TcxGridCardViewBackgroundBitmaps } - -function TcxGridCardViewBackgroundBitmaps.GetBitmapStyleIndex(Index: Integer): Integer; -begin - case Index of - bbCaptionRow: - Result := vsCaptionRow; - bbCardBorder: - Result := vsCardBorder; - bbRowCaption: - Result := vsRowCaption; - else - Result := inherited GetBitmapStyleIndex(Index); - end; -end; - -procedure TcxGridCardViewBackgroundBitmaps.Assign(Source: TPersistent); -begin - if Source is TcxGridCardViewBackgroundBitmaps then - with TcxGridCardViewBackgroundBitmaps(Source) do - begin - Self.CaptionRow := CaptionRow; - Self.CardBorder := CardBorder; - Self.RowCaption := RowCaption; - end; - inherited; -end; - -function TcxGridCardViewBackgroundBitmaps.GetBitmap(Index: Integer): TBitmap; -begin - Result := inherited GetBitmap(Index); - if Result = nil then - case Index of - bbRowCaption: - Result := GetBitmap(bbContent); - end; -end; - -{ TcxGridCardViewFiltering } - -function TcxGridCardViewFiltering.GetRowFilteredItemsList: Boolean; -begin - Result := ItemFilteredItemsList; -end; - -function TcxGridCardViewFiltering.GetRowMRUItemsList: Boolean; -begin - Result := ItemMRUItemsList; -end; - -function TcxGridCardViewFiltering.GetRowMRUItemsListCount: Integer; -begin - Result := ItemMRUItemsListCount; -end; - -function TcxGridCardViewFiltering.GetRowPopup: TcxGridItemFilterPopupOptions; -begin - Result := ItemPopup; -end; - -procedure TcxGridCardViewFiltering.SetRowFilteredItemsList(Value: Boolean); -begin - ItemFilteredItemsList := Value; -end; - -procedure TcxGridCardViewFiltering.SetRowMRUItemsList(Value: Boolean); -begin - ItemMRUItemsList := Value; -end; - -procedure TcxGridCardViewFiltering.SetRowMRUItemsListCount(Value: Integer); -begin - ItemMRUItemsListCount := Value; -end; - -procedure TcxGridCardViewFiltering.SetRowPopup(Value: TcxGridItemFilterPopupOptions); -begin - ItemPopup := Value; -end; - -procedure TcxGridCardViewFiltering.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('RowPopupDropDownWidth', ReadItemPopupDropDownWidth, nil, True); - Filer.DefineProperty('RowPopupMaxDropDownItemCount', ReadItemPopupMaxDropDownCount, nil, True); -end; - -{ TcxGridCardViewOptionsBehavior } - -constructor TcxGridCardViewOptionsBehavior.Create(AGridView: TcxCustomGridView); -begin - inherited; - FExpandRowOnDblClick := True; - FocusCellOnCycle := True; - FRowCaptionHints := True; -end; - -procedure TcxGridCardViewOptionsBehavior.SetExpandRowOnDblClick(Value: Boolean); -begin - if FExpandRowOnDblClick <> Value then - begin - FExpandRowOnDblClick := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridCardViewOptionsBehavior.SetRowCaptionHints(Value: Boolean); -begin - if FRowCaptionHints <> Value then - begin - FRowCaptionHints := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridCardViewOptionsBehavior.Assign(Source: TPersistent); -begin - if Source is TcxGridCardViewOptionsBehavior then - with TcxGridCardViewOptionsBehavior(Source) do - begin - Self.ExpandRowOnDblClick := ExpandRowOnDblClick; - Self.RowCaptionHints := RowCaptionHints; - end; - inherited; -end; - -{ TcxGridCardViewOptionsCustomize } - -constructor TcxGridCardViewOptionsCustomize.Create(AGridView: TcxCustomGridView); -begin - inherited; - RowMoving := False; - FCardSizing := True; - FRowExpanding := True; -end; - -function TcxGridCardViewOptionsCustomize.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardViewOptionsCustomize.GetRowFiltering: Boolean; -begin - Result := ItemFiltering; -end; - -function TcxGridCardViewOptionsCustomize.GetRowHiding: Boolean; -begin - Result := ItemHiding; -end; - -function TcxGridCardViewOptionsCustomize.GetRowMoving: Boolean; -begin - Result := ItemMoving; -end; - -procedure TcxGridCardViewOptionsCustomize.SetCardExpanding(Value: Boolean); -begin - if FCardExpanding <> Value then - begin - if Value then - GridView.Controller.FocusedItem := nil; - FCardExpanding := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsCustomize.SetCardSizing(Value: Boolean); -begin - if FCardSizing <> Value then - begin - FCardSizing := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridCardViewOptionsCustomize.SetLayeredRows(Value: Boolean); -begin - if FLayeredRows <> Value then - begin - FLayeredRows := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridCardViewOptionsCustomize.SetRowExpanding(Value: Boolean); -begin - if FRowExpanding <> Value then - begin - FRowExpanding := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsCustomize.SetRowFiltering(Value: Boolean); -begin - ItemFiltering := Value; -end; - -procedure TcxGridCardViewOptionsCustomize.SetRowHiding(Value: Boolean); -begin - ItemHiding := Value; -end; - -procedure TcxGridCardViewOptionsCustomize.SetRowMoving(Value: Boolean); -begin - ItemMoving := Value; -end; - -procedure TcxGridCardViewOptionsCustomize.Assign(Source: TPersistent); -begin - if Source is TcxGridCardViewOptionsCustomize then - with TcxGridCardViewOptionsCustomize(Source) do - begin - Self.CardExpanding := CardExpanding; - Self.CardSizing := CardSizing; - Self.LayeredRows := LayeredRows; - Self.RowExpanding := RowExpanding; - end; - inherited; -end; - -{ TcxGridCardViewOptionsSelection } - -constructor TcxGridCardViewOptionsSelection.Create(AGridView: TcxCustomGridView); -begin - inherited; - FCardBorderSelection := True; -end; - -procedure TcxGridCardViewOptionsSelection.SetCardBorderSelection(Value: Boolean); -begin - if FCardBorderSelection <> Value then - begin - FCardBorderSelection := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridCardViewOptionsSelection.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridCardViewOptionsSelection then - CardBorderSelection := TcxGridCardViewOptionsSelection(Source).CardBorderSelection; -end; - -{ TcxGridCardViewOptionsView } - -constructor TcxGridCardViewOptionsView.Create(AGridView: TcxCustomGridView); -begin - inherited; - FCardBorderWidth := cxGridDefaultCardBorderWidth; - FCardExpandButtonAlignment := cebaRight; - FCardIndent := cxGridCardDefaultIndent; - FCardWidth := cxGridCardDefaultWidth; - FCaptionSeparator := cxGridDefaultCardViewCaptionSeparator; - FCategoryIndent := cxGridCardDefaultCategoryIndent; - FCategorySeparatorWidth := cxGridCardDefaultCategorySeparatorWidth; - FEmptyRows := True; - FLayerSeparatorWidth := cxGridCardDefaultLayerSeparatorWidth; - FSeparatorColor := clDefault; - FSeparatorWidth := cxGridDefaultCardViewSeparatorWidth; -end; - -function TcxGridCardViewOptionsView.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardViewOptionsView.GetRowCaptionAutoHeight: Boolean; -begin - Result := ItemCaptionAutoHeight; -end; - -function TcxGridCardViewOptionsView.GetRowCaptionEndEllipsis: Boolean; -begin - Result := ItemCaptionEndEllipsis; -end; - -function TcxGridCardViewOptionsView.GetShowRowFilterButtons: TcxGridShowItemFilterButtons; -begin - Result := ShowItemFilterButtons; -end; - -procedure TcxGridCardViewOptionsView.SetCaptionSeparator(Value: Char); -begin - if FCaptionSeparator <> Value then - begin - FCaptionSeparator := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsView.SetCaptionWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FCaptionWidth <> Value then - begin - FCaptionWidth := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsView.SetCardAutoWidth(Value: Boolean); -begin - if FCardAutoWidth <> Value then - begin - FCardAutoWidth := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsView.SetCardBorderWidth(Value: Integer); -begin - if Value < cxGridCardBorderMinWidth then Value := cxGridCardBorderMinWidth; - if FCardBorderWidth <> Value then - begin - FCardBorderWidth := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsView.SetCardExpandButtonAlignment(Value: TcxGridCardExpandButtonAlignment); -begin - if FCardExpandButtonAlignment <> Value then - begin - FCardExpandButtonAlignment := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsView.SetCardIndent(Value: Integer); -begin - if Value < 0 then Value := 0; - if FCardIndent <> Value then - begin - FCardIndent := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsView.SetCardWidth(Value: Integer); -begin - if Value < cxGridCardMinWidth then Value := cxGridCardMinWidth; - if FCardWidth <> Value then - begin - FCardWidth := Value; - Changed(vcSize); - TcxGridCardView(GridView).Controller.PostGridModeBufferCountUpdate; - end; -end; - -procedure TcxGridCardViewOptionsView.SetCategoryIndent(Value: Integer); -begin - if Value < 0 then Value := 0; - if FCategoryIndent <> Value then - begin - FCategoryIndent := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsView.SetCategoryRowCaptionInRowAlternateCaption(Value: Boolean); -begin - if FCategoryRowCaptionInRowAlternateCaption <> Value then - begin - FCategoryRowCaptionInRowAlternateCaption := Value; - GridView.ItemCaptionChanged(nil); - end; -end; - -procedure TcxGridCardViewOptionsView.SetCategorySeparatorWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FCategorySeparatorWidth <> Value then - begin - FCategorySeparatorWidth := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsView.SetEmptyRows(Value: Boolean); -begin - if FEmptyRows <> Value then - begin - if not Value then - GridView.Controller.FocusedItem := nil; - FEmptyRows := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsView.SetLayerSeparatorWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FLayerSeparatorWidth <> Value then - begin - FLayerSeparatorWidth := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridCardViewOptionsView.SetRowCaptionAutoHeight(Value: Boolean); -begin - ItemCaptionAutoHeight := Value; -end; - -procedure TcxGridCardViewOptionsView.SetRowCaptionEndEllipsis(Value: Boolean); -begin - ItemCaptionEndEllipsis := Value; -end; - -procedure TcxGridCardViewOptionsView.SetSeparatorColor(Value: TColor); -begin - if FSeparatorColor <> Value then - begin - FSeparatorColor := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridCardViewOptionsView.SetSeparatorWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FSeparatorWidth <> Value then - begin - FSeparatorWidth := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridCardViewOptionsView.SetShowRowFilterButtons(Value: TcxGridShowItemFilterButtons); -begin - ShowItemFilterButtons := Value; -end; - -procedure TcxGridCardViewOptionsView.Assign(Source: TPersistent); -begin - if Source is TcxGridCardViewOptionsView then - with TcxGridCardViewOptionsView(Source) do - begin - Self.CaptionSeparator := CaptionSeparator; - Self.CaptionWidth := CaptionWidth; - Self.CardAutoWidth := CardAutoWidth; - Self.CardBorderWidth := CardBorderWidth; - Self.CardExpandButtonAlignment := CardExpandButtonAlignment; - Self.CardIndent := CardIndent; - Self.CardWidth := CardWidth; - Self.CategoryIndent := CategoryIndent; - Self.CategoryRowCaptionInRowAlternateCaption := CategoryRowCaptionInRowAlternateCaption; - Self.CategorySeparatorWidth := CategorySeparatorWidth; - Self.EmptyRows := EmptyRows; - Self.LayerSeparatorWidth := LayerSeparatorWidth; - Self.SeparatorColor := SeparatorColor; - Self.SeparatorWidth := SeparatorWidth; - end; - inherited; -end; - -function TcxGridCardViewOptionsView.GetSeparatorColor: TColor; -begin - Result := FSeparatorColor; - if Result = clDefault then - Result := LookAndFeelPainter.DefaultSeparatorColor; -end; - -{ TcxGridCardViewStyles } - -constructor TcxGridCardViewStyles.Create(AOwner: TPersistent); -begin - inherited; - BitmapInViewParams := True; -end; - -function TcxGridCardViewStyles.GetGridViewValue: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -procedure TcxGridCardViewStyles.SetOnGetCaptionRowStyle(Value: TcxGridGetCellStyleEvent); -begin - if @FOnGetCaptionRowStyle <> @Value then - begin - FOnGetCaptionRowStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridCardViewStyles.SetOnGetCardBorderStyle(Value: TcxGridGetRecordStyleEvent); -begin - if @FOnGetCardBorderStyle <> @Value then - begin - FOnGetCardBorderStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridCardViewStyles.SetOnGetCategoryRowStyle(Value: TcxGridGetCellStyleEvent); -begin - if @FOnGetCategoryRowStyle <> @Value then - begin - FOnGetCategoryRowStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridCardViewStyles.SetOnGetRowCaptionStyle(Value: TcxGridGetCellStyleEvent); -begin - if @FOnGetRowCaptionStyle <> @Value then - begin - FOnGetRowCaptionStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -function TcxGridCardViewStyles.GetBackgroundBitmapIndex(Index: Integer): Integer; -begin - case Index of - vsCardBorder: - Result := bbCardBorder; - vsContent: - Result := bbContent; - vsCaptionRow: - Result := bbCaptionRow; - vsRowCaption: - Result := bbRowCaption; - else - Result := -1; - end; -end; - -function TcxGridCardViewStyles.GetDefaultBitmap(Index: Integer): TBitmap; -begin - Index := GetBackgroundBitmapIndex(Index); - if Index = -1 then - Result := nil - else - Result := GridView.BackgroundBitmaps.GetBitmap(Index); -end; - -procedure TcxGridCardViewStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - if Index = vsCardBorder then - GetRecordContentParams(TcxCustomGridRecord(AData), nil, AParams) - else - begin - inherited; - with AParams, LookAndFeelPainter do - case Index of - vsCaptionRow, vsCategoryRow, vsRowCaption: - begin - if AData <> nil then - with TcxGridDataCellPos(AData) do - Item.Styles.GetContentParams(GridRecord, AParams); - case Index of - vsCaptionRow: - begin - Color := DefaultHeaderColor; - TextColor := DefaultHeaderTextColor; - end; - vsCategoryRow: - begin - Color := DefaultGroupColor; - TextColor := DefaultGroupTextColor; - end; - end; - end; - vsCategorySeparator: - Color := DefaultRecordSeparatorColor; - vsLayerSeparator: - Color := DefaultSeparatorColor; - end; - end; - AParams.Bitmap := GetDefaultBitmap(Index); -end; - -procedure TcxGridCardViewStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridCardViewStyles then - with TcxGridCardViewStyles(Source) do - begin - Self.CaptionRow := CaptionRow; - Self.CardBorder := CardBorder; - Self.CategoryRow := CategoryRow; - Self.CategorySeparator := CategorySeparator; - Self.LayerSeparator := LayerSeparator; - Self.RowCaption := RowCaption; - Self.OnGetCaptionRowStyle := OnGetCaptionRowStyle; - Self.OnGetCardBorderStyle := OnGetCardBorderStyle; - Self.OnGetCategoryRowStyle := OnGetCategoryRowStyle; - Self.OnGetRowCaptionStyle := OnGetRowCaptionStyle; - end; -end; - -procedure TcxGridCardViewStyles.GetCaptionRowParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -var - AStyle: TcxStyle; - ADataCellPos: TcxGridDataCellPos; -begin - AStyle := nil; - if (ARecord <> nil) and Assigned(FOnGetCaptionRowStyle) then - FOnGetCaptionRowStyle(GridView, ARecord, AItem, AStyle); - ADataCellPos := TcxGridDataCellPos.Create(ARecord, AItem); - try - GetViewParams(vsCaptionRow, ADataCellPos, AStyle, AParams); - finally - ADataCellPos.Free; - end; -end; - -procedure TcxGridCardViewStyles.GetCardBorderParams(ARecord: TcxCustomGridRecord; - out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if (ARecord <> nil) and Assigned(FOnGetCardBorderStyle) then - FOnGetCardBorderStyle(GridView, ARecord, AStyle); - GetViewParams(vsCardBorder, ARecord, AStyle, AParams); -end; - -procedure TcxGridCardViewStyles.GetCardBorderVisualParams(ARecord: TcxCustomGridRecord; - out AParams: TcxViewParams); -begin - if GridView.OptionsSelection.CardBorderSelection and - GridView.DrawCardBorderSelected(ARecord) then - GetSelectionParams(ARecord, nil, AParams) - else - GetCardBorderParams(ARecord, AParams); -end; - -procedure TcxGridCardViewStyles.GetCategoryRowParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -var - AStyle: TcxStyle; - ADataCellPos: TcxGridDataCellPos; -begin - AStyle := nil; - if (ARecord <> nil) and Assigned(FOnGetCategoryRowStyle) then - FOnGetCategoryRowStyle(GridView, ARecord, AItem, AStyle); - ADataCellPos := TcxGridDataCellPos.Create(ARecord, AItem); - try - GetViewParams(vsCategoryRow, ADataCellPos, AStyle, AParams); - finally - ADataCellPos.Free; - end; -end; - -procedure TcxGridCardViewStyles.GetDataCellContentParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -begin - if AItem = nil then - inherited - else - case TcxGridCardViewRow(AItem).Kind of - rkData: - TcxGridCardViewRow(AItem).Styles.GetCaptionParams(ARecord, AParams); - rkCaption: - TcxGridCardViewRow(AItem).Styles.GetCaptionRowParams(ARecord, AParams); - rkCategory: - TcxGridCardViewRow(AItem).Styles.GetCategoryRowParams(ARecord, AParams); - end; -end; - -procedure TcxGridCardViewStyles.GetRowCaptionParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -var - AStyle: TcxStyle; - ADataCellPos: TcxGridDataCellPos; -begin - AStyle := nil; - if (ARecord <> nil) and Assigned(FOnGetRowCaptionStyle) then - FOnGetRowCaptionStyle(GridView, ARecord, AItem, AStyle); - ADataCellPos := TcxGridDataCellPos.Create(ARecord, AItem); - try - GetViewParams(vsRowCaption, ADataCellPos, AStyle, AParams); - finally - ADataCellPos.Free; - end; -end; - -{ TcxGridCardViewStyleSheet } - -function TcxGridCardViewStyleSheet.GetStylesValue: TcxGridCardViewStyles; -begin - Result := TcxGridCardViewStyles(GetStyles); -end; - -procedure TcxGridCardViewStyleSheet.SetStylesValue(Value: TcxGridCardViewStyles); -begin - SetStyles(Value); -end; - -class function TcxGridCardViewStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxGridCardViewStyles; -end; - -{ TcxGridCardView } - -function TcxGridCardView.GetBackgroundBitmaps: TcxGridCardViewBackgroundBitmaps; -begin - Result := TcxGridCardViewBackgroundBitmaps(inherited BackgroundBitmaps); -end; - -function TcxGridCardView.GetControl: TcxCustomGrid; -begin - Result := TcxCustomGrid(inherited Control); -end; - -function TcxGridCardView.GetController: TcxGridCardViewController; -begin - Result := TcxGridCardViewController(inherited Controller); -end; - -function TcxGridCardView.GetDataController: TcxGridDataController; -begin - Result := TcxGridDataController(FDataController); -end; - -function TcxGridCardView.GetDateTimeHandling: TcxGridCardViewDateTimeHandling; -begin - Result := TcxGridCardViewDateTimeHandling(inherited DateTimeHandling); -end; - -function TcxGridCardView.GetFiltering: TcxGridCardViewFiltering; -begin - Result := TcxGridCardViewFiltering(inherited Filtering); -end; - -function TcxGridCardView.GetFirstCaptionRow: TcxGridCardViewRow; -var - I: Integer; -begin - for I := 0 to VisibleRowCount - 1 do - begin - Result := VisibleRows[I]; - if Result.Kind = rkCaption then Exit; - end; - Result := nil; -end; - -function TcxGridCardView.GetFirstCategoryRow: TcxGridCardViewRow; -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - begin - Result := Rows[I]; - if Result.Kind = rkCategory then Exit; - end; - Result := nil; -end; - -function TcxGridCardView.GetOptionsBehavior: TcxGridCardViewOptionsBehavior; -begin - Result := TcxGridCardViewOptionsBehavior(inherited OptionsBehavior); -end; - -function TcxGridCardView.GetOptionsCustomize: TcxGridCardViewOptionsCustomize; -begin - Result := TcxGridCardViewOptionsCustomize(inherited OptionsCustomize); -end; - -function TcxGridCardView.GetOptionsData: TcxGridCardViewOptionsData; -begin - Result := TcxGridCardViewOptionsData(inherited OptionsData); -end; - -function TcxGridCardView.GetOptionsSelection: TcxGridCardViewOptionsSelection; -begin - Result := TcxGridCardViewOptionsSelection(inherited OptionsSelection); -end; - -function TcxGridCardView.GetOptionsView: TcxGridCardViewOptionsView; -begin - Result := TcxGridCardViewOptionsView(inherited OptionsView); -end; - -function TcxGridCardView.GetPainter: TcxGridCardViewPainter; -begin - Result := TcxGridCardViewPainter(inherited Painter); -end; - -function TcxGridCardView.GetRow(Index: Integer): TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(Items[Index]); -end; - -function TcxGridCardView.GetRowCount: Integer; -begin - Result := ItemCount; -end; - -function TcxGridCardView.GetStyles: TcxGridCardViewStyles; -begin - Result := TcxGridCardViewStyles(inherited Styles); -end; - -function TcxGridCardView.GetViewData: TcxGridCardViewViewData; -begin - Result := TcxGridCardViewViewData(inherited ViewData); -end; - -function TcxGridCardView.GetViewInfo: TcxGridCardViewViewInfo; -begin - Result := TcxGridCardViewViewInfo(inherited ViewInfo); -end; - -function TcxGridCardView.GetVisibleRow(Index: Integer): TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(VisibleItems[Index]); -end; - -function TcxGridCardView.GetVisibleRowCount: Integer; -begin - Result := VisibleItemCount; -end; - -procedure TcxGridCardView.SetBackgroundBitmaps(Value: TcxGridCardViewBackgroundBitmaps); -begin - inherited BackgroundBitmaps := Value; -end; - -procedure TcxGridCardView.SetDataController(Value: TcxGridDataController); -begin - FDataController.Assign(Value); -end; - -procedure TcxGridCardView.SetDateTimeHandling(Value: TcxGridCardViewDateTimeHandling); -begin - inherited DateTimeHandling := Value; -end; - -procedure TcxGridCardView.SetFiltering(Value: TcxGridCardViewFiltering); -begin - inherited Filtering := Value; -end; - -procedure TcxGridCardView.SetLayoutDirection(Value: TcxGridCardViewLayoutDirection); -begin - if FLayoutDirection <> Value then - begin - FLayoutDirection := Value; - Controller.LayoutDirectionChanged; - Changed(vcSize); - end; -end; - -procedure TcxGridCardView.SetOnRowCollapsed(Value: TcxGridCardRowEvent); -begin - if @FOnRowCollapsed <> @Value then - begin - FOnRowCollapsed := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridCardView.SetOnRowCollapsing(Value: TcxGridCardRowChangingEvent); -begin - if @FOnRowCollapsing <> @Value then - begin - FOnRowCollapsing := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridCardView.SetOnRowExpanded(Value: TcxGridCardRowEvent); -begin - if @FOnRowExpanded <> @Value then - begin - FOnRowExpanded := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridCardView.SetOnRowExpanding(Value: TcxGridCardRowChangingEvent); -begin - if @FOnRowExpanding <> @Value then - begin - FOnRowExpanding := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridCardView.SetOnRowPosChanged(Value: TcxGridCardRowEvent); -begin - if @FOnRowPosChanged <> @Value then - begin - FOnRowPosChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridCardView.SetOptionsBehavior(Value: TcxGridCardViewOptionsBehavior); -begin - inherited OptionsBehavior := Value; -end; - -procedure TcxGridCardView.SetOptionsCustomize(Value: TcxGridCardViewOptionsCustomize); -begin - inherited OptionsCustomize := Value; -end; - -procedure TcxGridCardView.SetOptionsData(Value: TcxGridCardViewOptionsData); -begin - inherited OptionsData := Value; -end; - -procedure TcxGridCardView.SetOptionsSelection(Value: TcxGridCardViewOptionsSelection); -begin - inherited OptionsSelection := Value; -end; - -procedure TcxGridCardView.SetOptionsView(Value: TcxGridCardViewOptionsView); -begin - inherited OptionsView := Value; -end; - -procedure TcxGridCardView.SetRow(Index: Integer; Value: TcxGridCardViewRow); -begin - Items[Index] := Value; -end; - -procedure TcxGridCardView.SetRowLayout(Value: TcxGridCardViewRowLayout); -var - ACoordinates: TcxGridCardRowCoordinatesArray; -begin -{$IFNDEF DELPHI7} - ACoordinates := nil; // to remove wrong warning -{$ENDIF} - if FRowLayout <> Value then - begin - ACoordinates := GetRowCoordinates; - FRowLayout := Value; - SetRowCoordinates(ACoordinates); - end; -end; - -procedure TcxGridCardView.SetStyles(Value: TcxGridCardViewStyles); -begin - inherited Styles := Value; -end; - -procedure TcxGridCardView.RefreshCategoryRowLinks; -var - ACategoryRow, ARow: TcxGridCardViewRow; - I: Integer; -begin - ACategoryRow := nil; - for I := 0 to RowCount - 1 do - begin - ARow := Rows[I]; - if ARow.Kind = rkCategory then - begin - ACategoryRow := ARow; - ARow.SetCategoryRowValue(nil); - end - else - ARow.SetCategoryRowValue(ACategoryRow); - end; -end; - -function TcxGridCardView.GetProperties(AProperties: TStrings): Boolean; -begin - AProperties.Add('CardWidth'); - Result := inherited GetProperties(AProperties); -end; - -procedure TcxGridCardView.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'CardWidth' then - AValue := OptionsView.CardWidth - else - inherited; -end; - -procedure TcxGridCardView.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'CardWidth' then - OptionsView.CardWidth := AValue - else - inherited; -end; - -procedure TcxGridCardView.AssignLayout(ALayoutView: TcxCustomGridView); -begin - inherited; - OptionsView.CardWidth := (ALayoutView as TcxGridCardView).OptionsView.CardWidth; -end; - -function TcxGridCardView.GetLayoutCustomizationFormButtonCaption: string; -begin - Result := 'Rows customization'; -end; - -procedure TcxGridCardView.CreateHandlers; -begin - FRowLayoutController := GetRowLayoutControllerClass.Create(Self); - inherited; -end; - -procedure TcxGridCardView.DestroyHandlers; -begin - inherited; - FreeAndNil(FRowLayoutController); -end; - -function TcxGridCardView.GetControllerClass: TcxCustomGridControllerClass; -begin - Result := TcxGridCardViewController; -end; - -function TcxGridCardView.GetDataControllerClass: TcxCustomDataControllerClass; -begin - Result := TcxGridDataController; -end; - -function TcxGridCardView.GetPainterClass: TcxCustomGridPainterClass; -begin - Result := TcxGridCardViewPainter; -end; - -function TcxGridCardView.GetRowLayoutControllerClass: TcxGridCardViewRowLayoutControllerClass; -begin - Result := TcxGridCardViewRowLayoutController; -end; - -function TcxGridCardView.GetViewDataClass: TcxCustomGridViewDataClass; -begin - Result := TcxGridCardViewViewData; -end; - -function TcxGridCardView.GetViewInfoClass: TcxCustomGridViewInfoClass; -begin - Result := TcxGridCardViewViewInfo; -end; - -procedure TcxGridCardView.SaveRowParams; -var - I: Integer; -begin - for I := 0 to RowCount - 1 do - Rows[I].Position.SaveParams; -end; - -procedure TcxGridCardView.AssignRowParams; -var - I: Integer; -begin - BeginUpdate; - try - for I := 0 to RowCount - 1 do - Rows[I].Position.AssignParams; - finally - EndUpdate; - end; -end; - -function TcxGridCardView.GetRowCoordinates: TcxGridCardRowCoordinatesArray; -var - I: Integer; -begin - SetLength(Result, RowCount); - for I := 0 to RowCount - 1 do - Result[I] := RowLayoutController.GetCoordinates(Rows[I]); -end; - -procedure TcxGridCardView.SetRowCoordinates(const ACoordinates: TcxGridCardRowCoordinatesArray); -var - ARows: TList; - I: Integer; -begin - ARows := TList.Create; - BeginUpdate; - try - CopyList(ItemsList, ARows); - for I := 0 to ARows.Count - 1 do - RowLayoutController.SetCoordinates(TcxGridCardViewRow(ARows[I]), ACoordinates[I]); - finally - EndUpdate; - ARows.Free; - end; -end; - -procedure TcxGridCardView.Updating; -begin - SaveRowParams; - inherited; -end; - -procedure TcxGridCardView.Updated; -begin - inherited; - AssignRowParams; -end; - -procedure TcxGridCardView.BeforeRestoring; -begin - SaveRowParams; - inherited; -end; - -procedure TcxGridCardView.AfterRestoring; -begin - inherited; - AssignRowParams; -end; - -procedure TcxGridCardView.ChangeItemIndex(AItem: TcxCustomGridTableItem; - Value: Integer); -begin - SaveItemVisibles; - inherited; - CheckItemVisibles; -end; - -procedure TcxGridCardView.DoAssign(ASource: TcxCustomGridView); -begin - if ASource is TcxGridCardView then - with TcxGridCardView(ASource) do - begin - Self.LayoutDirection := LayoutDirection; - Self.RowLayout := RowLayout; - Self.OnRowExpanded := OnRowExpanded; - Self.OnRowExpanding := OnRowExpanding; - Self.OnRowCollapsed := OnRowCollapsed; - Self.OnRowCollapsing := OnRowCollapsing; - Self.OnRowPosChanged := OnRowPosChanged; - end; - inherited; -end; - -function TcxGridCardView.GetResizeOnBoundsChange: Boolean; -begin - Result := True; -end; - -procedure TcxGridCardView.ItemIndexChanged(AItem: TcxCustomGridTableItem; - AOldIndex: Integer); -begin - inherited; - RefreshCategoryRowLinks; - RowLayoutController.RowIndexChanged(TcxGridCardViewRow(AItem), AOldIndex); -end; - -procedure TcxGridCardView.ItemVisibilityChanged(AItem: TcxCustomGridTableItem; - Value: Boolean); -begin - if not Value and AItem.Focused and (TcxGridCardViewRow(AItem).CategoryRow <> nil) then - TcxGridCardViewRow(AItem).CategoryRow.Focused := True; - inherited; -end; - -procedure TcxGridCardView.RefreshVisibleItemsList; -begin - inherited; - RowLayoutController.VisibleRowsListChanged; -end; - -procedure TcxGridCardView.RowExpandedChanged(ARow: TcxGridCardViewRow); -begin - Controller.RowExpandedChanged(ARow); - if ARow.Expanded then - DoRowExpanded(ARow) - else - DoRowCollapsed(ARow); -end; - -function TcxGridCardView.RowExpandedChanging(ARow: TcxGridCardViewRow; AValue: Boolean): Boolean; -begin - if AValue then - Result := DoRowExpanding(ARow) - else - Result := DoRowCollapsing(ARow); - if Result then - Controller.RowExpandedChanging(ARow, AValue); -end; - -function TcxGridCardView.CalculateDataCellSelected(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; AUseViewInfo: Boolean; ACellViewInfo: TcxGridTableCellViewInfo): Boolean; -begin - if TcxGridCardViewRow(AItem).Kind = rkCaption then - Result := inherited CalculateDataCellSelected(ARecord, AItem, AUseViewInfo, ACellViewInfo) - else - Result := DrawRecordFocused(ARecord) and AItem.Focused; -end; - -function TcxGridCardView.DrawCardBorderSelected(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := DrawRecordSelected(ARecord) and DrawSelection; -end; - -function TcxGridCardView.GetBackgroundBitmapsClass: TcxCustomGridBackgroundBitmapsClass; -begin - Result := TcxGridCardViewBackgroundBitmaps; -end; - -function TcxGridCardView.GetDateTimeHandlingClass: TcxCustomGridTableDateTimeHandlingClass; -begin - Result := TcxGridCardViewDateTimeHandling; -end; - -function TcxGridCardView.GetFilteringClass: TcxCustomGridTableFilteringClass; -begin - Result := TcxGridCardViewFiltering; -end; - -function TcxGridCardView.GetItemClass: TcxCustomGridTableItemClass; -begin - Result := TcxGridCardViewRow; -end; - -function TcxGridCardView.GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; -begin - Result := TcxGridCardViewOptionsBehavior; -end; - -function TcxGridCardView.GetOptionsCustomizeClass: TcxCustomGridTableOptionsCustomizeClass; -begin - Result := TcxGridCardViewOptionsCustomize; -end; - -function TcxGridCardView.GetOptionsDataClass: TcxCustomGridOptionsDataClass; -begin - Result := TcxGridCardViewOptionsData; -end; - -function TcxGridCardView.GetOptionsSelectionClass: TcxCustomGridOptionsSelectionClass; -begin - Result := TcxGridCardViewOptionsSelection; -end; - -function TcxGridCardView.GetOptionsViewClass: TcxCustomGridOptionsViewClass; -begin - Result := TcxGridCardViewOptionsView; -end; - -function TcxGridCardView.GetStylesClass: TcxCustomGridViewStylesClass; -begin - Result := TcxGridCardViewStyles; -end; - -function TcxGridCardView.SupportsCardSizing: Boolean; -begin - Result := OptionsCustomize.CardSizing; -end; - -function TcxGridCardView.SupportsLayeredRows: Boolean; -begin - Result := IsDesigning or OptionsCustomize.LayeredRows; -end; - -procedure TcxGridCardView.DoRowCollapsed(ARow: TcxGridCardViewRow); -begin - if Assigned(FOnRowCollapsed) then FOnRowCollapsed(Self, ARow); -end; - -function TcxGridCardView.DoRowCollapsing(ARow: TcxGridCardViewRow): Boolean; -begin - Result := True; - if Assigned(FOnRowCollapsing) then FOnRowCollapsing(Self, ARow, Result); -end; - -procedure TcxGridCardView.DoRowExpanded(ARow: TcxGridCardViewRow); -begin - if Assigned(FOnRowExpanded) then FOnRowExpanded(Self, ARow); -end; - -function TcxGridCardView.DoRowExpanding(ARow: TcxGridCardViewRow): Boolean; -begin - Result := True; - if Assigned(FOnRowExpanding) then FOnRowExpanding(Self, ARow, Result); -end; - -procedure TcxGridCardView.DoRowPositionChanged(ARow: TcxGridCardViewRow); -begin - if Assigned(FOnRowPosChanged) then FOnRowPosChanged(Self, ARow); -end; - -function TcxGridCardView.CreateRow: TcxGridCardViewRow; -begin - Result := TcxGridCardViewRow(CreateItem); -end; - -initialization - cxGridRegisteredViews.Register(TcxGridCardView, 'Cards'); - Classes.RegisterClasses([TcxGridCardViewRow, TcxGridCardViewStyleSheet]); - -finalization - cxGridRegisteredViews.Unregister(TcxGridCardView); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridChartView.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridChartView.pas deleted file mode 100644 index c6fca945..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridChartView.pas +++ /dev/null @@ -1,16850 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridChartView; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Messages, Classes, Graphics, Controls, Forms, Menus, StdCtrls, - cxClasses, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, cxStyles, cxControls, cxStorage, - cxEdit, cxCheckBox, cxCheckListBox, cxDropDownEdit, cxLabel, cxPC, - cxVariants, cxCustomData, cxData, cxDataStorage, - cxGridCommon, cxGridCustomView; - -const - cxGridChartCustomizationFormDefaultWidth = 200; - - htChartBase = 50; - htChartTitle = htChartBase + 1; - htLegend = htChartBase + 2; - htLegendItem = htChartBase + 3; - htChartToolBox = htChartBase + 4; - htDataLevelInfo = htChartBase + 5; - htDataLevelActiveValueInfo = htChartBase + 6; - htChartCustomizeButton = htChartBase + 7; - htDiagramSelector = htChartBase + 8; - htChartValue = htChartBase + 9; - // histogram - htPlot = htChartBase + 10; - htCategoryAxisTitle = htChartBase + 11; - htValueAxisTitle = htChartBase + 12; - // line diagram - htChartValueLine = htChartBase + 13; - // area diagram - htChartValueArea = htChartBase + 14; - // pie diagram - htSeriesSite = htChartBase + 15; - htSeriesSiteCaption = htChartBase + 16; - - ckToolBox = 2; - - dsDiagramFirst = 0; - dsLegend = dsDiagramFirst; - dsValueCaptions = dsDiagramFirst + 1; - dsValues = dsDiagramFirst + 2; - dsAxis = dsDiagramFirst + 3; - dsCategoryAxis = dsDiagramFirst + 4; - dsValueAxis = dsDiagramFirst + 5; - dsAxisTitle = dsDiagramFirst + 6; - dsCategoryAxisTitle = dsDiagramFirst + 7; - dsValueAxisTitle = dsDiagramFirst + 8; - dsGridLines = dsDiagramFirst + 9; - dsCategoryGridLines = dsDiagramFirst + 10; - dsValueGridLines = dsDiagramFirst + 11; - dsPlot = dsDiagramFirst + 12; - dsValueMarkers = dsDiagramFirst + 13; - dsSeriesSiteCaptions = dsDiagramFirst + 14; - dsSeriesSites = dsDiagramFirst + 15; - dsDiagramLast = dsSeriesSites; - - ssSeriesFirst = 0; - ssValues = ssSeriesFirst; - ssSeriesLast = ssValues; - - vsChartFirst = vsCustomLast + 1; - vsTitle = vsChartFirst; - vsLegend = vsChartFirst + 1; - vsToolBox = vsChartFirst + 2; - vsDiagramSelector = vsChartFirst + 3; - vsDataLevelsInfo = vsChartFirst + 4; - vsDataLevelActiveValueInfo = vsChartFirst + 5; - vsActiveDataLevelInfo = vsChartFirst + 6; - vsChartLast = vsActiveDataLevelInfo; - - cxGridChartColumnDiagramDefaultBorderWidth = 1; - cxGridChartLineDiagramDefaultHotSpotSize = 15; - cxGridChartLineDiagramDefaultLineWidth = 1; - cxGridChartLineDiagramDefaultMarkerSize = 7; - cxGridChartDefaultDataLevelActiveValueDropDownCount = 15; - - cxGridChartItemDefaultSummaryKind = skSum; - -type - TcxGridChartCustomizationForm = class; - TcxGridChartController = class; - TcxCustomGridChartTitleViewInfo = class; - TcxGridChartLegendItemViewInfo = class; - TcxGridChartLegendViewInfo = class; - TcxGridChartDiagramValueViewInfo = class; - TcxGridChartDiagramViewInfo = class; - TcxGridChartHistogramTickMarkLabelsViewInfo = class; - TcxGridChartHistogramViewInfo = class; - TcxGridChartColumnDiagramViewInfo = class; - TcxGridChartLineDiagramLegendItemViewInfo = class; - TcxGridChartLineDiagramValueViewInfoClass = class of TcxGridChartLineDiagramValueViewInfo; - TcxGridChartLineDiagramValueViewInfo = class; - TcxGridChartLineDiagramViewInfo = class; - TcxGridChartAreaDiagramValueViewInfo = class; - TcxGridChartPieDiagramValueViewInfo = class; - TcxGridChartPieSeriesSiteViewInfo = class; - TcxGridChartPieDiagramViewInfo = class; - TcxGridChartToolBoxItemViewInfo = class; - TcxGridChartToolBoxDataLevelActiveValueViewInfo = class; - TcxGridChartToolBoxDataLevelInfoViewInfo = class; - TcxGridChartToolBoxCustomizeButtonViewInfo = class; - TcxGridChartToolBoxDiagramSelectorViewInfo = class; - TcxGridChartToolBoxViewInfo = class; - TcxGridChartViewInfo = class; - TcxCustomGridChartTitle = class; - TcxGridChartDiagram = class; - TcxGridChartHistogramAxisTitle = class; - TcxGridChartHistogramAxis = class; - TcxGridChartHistogramAxisValue = class; - TcxGridChartHistogram = class; - TcxGridChartColumnDiagram = class; - TcxGridChartLineDiagram = class; - TcxGridChartAreaDiagram = class; - TcxGridChartPieDiagram = class; - TcxGridChartItemDataBinding = class; - TcxGridChartItemClass = class of TcxGridChartItem; - TcxGridChartItem = class; - TcxGridChartDataGroup = class; - TcxGridChartSeries = class; - TcxGridChartView = class; - - TcxGridChartDataGroupContainerKind = Integer; - - TcxGridChartPartAlignment = (cpaDefault, cpaStart, cpaCenter, cpaEnd); - TcxGridChartPartOrientation = (cpoDefault, cpoHorizontal, cpoVertical); - TcxGridChartPartPosition = (cppDefault, cppNone, cppLeft, cppTop, cppRight, cppBottom); - - TcxGridChartColumnDiagramValueCaptionPosition = (cdvcpNone, cdvcpInsideBase, - cdvcpCenter, cdvcpInsideEnd, cdvcpOutsideEnd); - - TcxGridChartLineDiagramValueCaptionPosition = (ldvcpNone, ldvcpLeft, ldvcpAbove, - ldvcpRight, ldvcpBelow, ldvcpCenter); - TcxGridChartLineStyle = (clsNone, clsSolid, clsDash, clsDot, clsDashDot, clsDashDotDot); - TcxGridChartMarkerStyle = (cmsNone, cmsSquare, cmsTriangle, cmsDiamond, cmsCircle); - - TcxGridChartPieDiagramValueCaptionPosition = (pdvcpNone, pdvcpCenter, - pdvcpInsideEnd, pdvcpOutsideEnd, pdvcpOutsideEndWithLeaderLines); - - { hit tests } - - TcxGridChartTitleHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridChartLegendHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridChartLegendItemHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - public - Index: Integer; - Series: TcxGridChartSeries; - ValueIndex: Integer; - end; - - TcxGridChartToolBoxHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridChartDataLevelInfoHitTest = class(TcxCustomGridViewHitTest) - private - FDataLevel: Integer; - FDataLevelObject: TcxGridChartDataGroup; - procedure SetDataLevel(Value: Integer); - procedure SetDataLevelObject(Value: TcxGridChartDataGroup); - protected - class function GetHitTestCode: Integer; override; - public - DataLevelObjectContainerKind: TcxGridChartDataGroupContainerKind; - function DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; override; - property DataLevel: Integer read FDataLevel write SetDataLevel; - property DataLevelObject: TcxGridChartDataGroup read FDataLevelObject write SetDataLevelObject; - end; - - TcxGridChartDataLevelActiveValueInfoHitTest = class(TcxGridChartDataLevelInfoHitTest) - protected - class function GetHitTestCode: Integer; override; - public - CanDropDown: Boolean; - function Cursor: TCursor; override; - function DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; override; - end; - - TcxGridChartCustomizeButtonHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridChartDiagramSelectorHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - public - CanDropDown: Boolean; - function Cursor: TCursor; override; - end; - - TcxGridChartValueHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - public - CanDrillDown: Boolean; - Series: TcxGridChartSeries; - ValueIndex: Integer; - function Cursor: TCursor; override; - end; - - TcxCustomGridChartDiagramHitTest = class(TcxCustomGridViewHitTest) - public - Diagram: TcxGridChartDiagram; - end; - - // histogram - - TcxGridChartHistogramPlotHitTest = class(TcxCustomGridChartDiagramHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxCustomGridChartHistogramAxisHitTest = class(TcxCustomGridChartDiagramHitTest); - - TcxGridChartHistogramCategoryAxisTitleHitTest = class(TcxCustomGridChartHistogramAxisHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridChartHistogramValueAxisTitleHitTest = class(TcxCustomGridChartHistogramAxisHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - // line diagram - - TcxGridChartValueLineHitTest = class(TcxGridChartValueHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - // area diagram - - TcxGridChartValueAreaHitTest = class(TcxGridChartValueHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - // pie diagram - - TcxGridChartPieSeriesSiteHitTest = class(TcxCustomGridChartDiagramHitTest) - protected - class function GetHitTestCode: Integer; override; - public - Series: TcxGridChartSeries; - end; - - TcxGridChartPieSeriesSiteCaptionHitTest = class(TcxGridChartPieSeriesSiteHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - { controller } - - // drag&drop objects - - TcxCustomGridChartMovingObject = class(TcxCustomGridMovingObject) - private - function GetController: TcxGridChartController; - function GetCustomizationForm: TcxGridChartCustomizationForm; - function GetGridView: TcxGridChartView; - function GetViewInfo: TcxGridChartViewInfo; - protected - property Controller: TcxGridChartController read GetController; - property CustomizationForm: TcxGridChartCustomizationForm read GetCustomizationForm; - property GridView: TcxGridChartView read GetGridView; - property ViewInfo: TcxGridChartViewInfo read GetViewInfo; - end; - - TcxGridChartDataGroupMovingObjectClass = class of TcxGridChartDataGroupMovingObject; - - TcxGridChartDataGroupMovingObject = class(TcxCustomGridChartMovingObject) - private - FDestDataLevel: Integer; - FSourceItemContainerKind: TcxGridChartDataGroupContainerKind; - function GetSourceItem: TcxGridChartDataGroup; - procedure SetDestDataLevel(Value: Integer); - procedure SetSourceItem(Value: TcxGridChartDataGroup); - protected - function CanRemove: Boolean; override; - function GetArrowAreaBounds(APlace: TcxGridArrowPlace): TRect; override; - function GetCustomizationFormListBox: TcxCustomGridItemsListBox; override; - function GetSourceItemViewInfo: TcxCustomGridCellViewInfo; override; - function IsSourceCustomizationForm: Boolean; override; - function IsValidDestination: Boolean; override; - - procedure BeginDragAndDrop; override; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - procedure EndDragAndDrop(Accepted: Boolean); override; - - property DestDataLevel: Integer read FDestDataLevel write SetDestDataLevel; - property SourceItem: TcxGridChartDataGroup read GetSourceItem write SetSourceItem; - property SourceItemContainerKind: TcxGridChartDataGroupContainerKind - read FSourceItemContainerKind write FSourceItemContainerKind; - public - constructor Create(AControl: TcxControl); override; - procedure Init(const P: TPoint; AParams: TcxCustomGridHitTest); override; - end; - - // customization form - - TcxGridChartSeriesInnerCheckListBox = class(TcxCustomInnerCheckListBox) - protected - function GetMetrics: TcxCheckListBoxMetrics; override; - public - function GetSeriesImageSize: Integer; virtual; - end; - - TcxGridChartSeriesCheckListBoxClass = class of TcxGridChartSeriesCheckListBox; - - TcxGridChartSeriesCheckListBox = class(TcxCheckListBox) - private - FDraggingSeries: TcxGridChartSeries; - FGridView: TcxGridChartView; - FLockRefreshItems: Boolean; - FSeriesImages: TImageList; - function GetSeries(AIndex: Integer): TcxGridChartSeries; - protected - procedure CheckClicked(Sender: TObject; AIndex: Integer; - APrevState, ANewState: TcxCheckBoxState); virtual; - procedure CreateWnd; override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); override; - procedure DrawSeriesImage(ACanvas: TcxCanvas; const R: TRect; ASeries: TcxGridChartSeries); virtual; - function GetInnerCheckListBoxClass: TcxCustomInnerCheckListBoxClass; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); override; - procedure RefreshImages; - procedure RefreshSeriesImages; virtual; - - property DraggingSeries: TcxGridChartSeries read FDraggingSeries write FDraggingSeries; - property GridView: TcxGridChartView read FGridView; - property LockRefreshItems: Boolean read FLockRefreshItems write FLockRefreshItems; - property Series[AIndex: Integer]: TcxGridChartSeries read GetSeries; - property SeriesImages: TImageList read FSeriesImages; - public - constructor Create(AOwner: TComponent; AGridView: TcxGridChartView); reintroduce; virtual; - destructor Destroy; override; - procedure RefreshItems; virtual; - function StartDrag(DragObject: TDragObject): Boolean; override; - end; - - TcxGridChartSortBySeriesComboBoxClass = class of TcxGridChartSortBySeriesComboBox; - - TcxGridChartSortBySeriesComboBox = class(TcxComboBox) - private - FDirectionButton: TcxEditButton; - FGridView: TcxGridChartView; - protected - procedure Click; override; - procedure DirectionButtonClick; virtual; - procedure DoButtonClick(AButtonVisibleIndex: Integer); override; - procedure DrawItem(AControl: TcxCustomComboBox; ACanvas: TcxCanvas; - AIndex: Integer; const ARect: TRect; AState: TOwnerDrawState); virtual; - procedure MeasureItem(AControl: TcxCustomComboBox; AIndex: Integer; - ACanvas: TcxCanvas; var AHeight: Integer); virtual; - procedure RefreshDirectionButton; virtual; - - property DirectionButton: TcxEditButton read FDirectionButton; - property GridView: TcxGridChartView read FGridView; - public - constructor Create(AOwner: TComponent; AGridView: TcxGridChartView); reintroduce; virtual; - procedure RefreshItems; virtual; - end; - - TcxGridChartDataGroupsListBoxClass = class of TcxGridChartDataGroupsListBox; - - TcxGridChartDataGroupsListBox = class(TcxCustomGridItemsListBox) - private - function GetGridView: TcxGridChartView; - protected - function CalculateItemHeight: Integer; override; - procedure DoRefreshItems; override; - function GetDragAndDropParams: TcxCustomGridHitTest; override; - property GridView: TcxGridChartView read GetGridView; - public - procedure PaintItem(ACanvas: TcxCanvas; R: TRect; AIndex: Integer; AFocused: Boolean); override; - end; - - TcxGridChartOptionsTreeViewClass = class of TcxGridChartOptionsTreeView; - - TcxGridChartOptionsTreeView = class(TcxGridOptionsTreeView) - private - FGridView: TcxGridChartView; - protected - LegendID: Integer; - LegendAlignmentID: Integer; - LegendBorderID: Integer; - LegendKeyBorderID: Integer; - LegendOrientationID: Integer; - LegendPositionID: Integer; - TitleID: Integer; - TitleAlignmentID: Integer; - TitlePositionID: Integer; - ToolBoxID: Integer; - ToolBoxBorderID: Integer; - ToolBoxDiagramSelectorID: Integer; - ToolBoxPositionID: Integer; - OtherID: Integer; - OtherValueHintsID: Integer; - - procedure AddItems; override; - function IsItemChecked(AParentID, AID: Integer): Boolean; override; - procedure ItemClicked(AParentID, AID: Integer); override; - - property GridView: TcxGridChartView read FGridView; - public - constructor Create(AOwner: TComponent; AGridView: TcxGridChartView); reintroduce; virtual; - end; - - TcxGridChartCustomizationForm = class(TcxCustomGridCustomizationForm) - private - FDataGroupsListBox: TcxGridChartDataGroupsListBox; - FDataGroupsPage: TcxTabSheet; - FOptionsPage: TcxTabSheet; - FOptionsTreeView: TcxGridChartOptionsTreeView; - FSeriesCheckListBox: TcxGridChartSeriesCheckListBox; - FSortBySeriesComboBox: TcxGridChartSortBySeriesComboBox; - FSortBySeriesLabel: TcxLabel; - FSeriesPage: TcxTabSheet; - function GetGridView: TcxGridChartView; - protected - function CanChangeSortedSeries: Boolean; virtual; - procedure CreateControls; override; - function GetDataGroupsListBoxClass: TcxGridChartDataGroupsListBoxClass; virtual; - function GetDataGroupsPageVisible: Boolean; virtual; - function GetOptionsPageVisible: Boolean; virtual; - function GetOptionsTreeViewClass: TcxGridChartOptionsTreeViewClass; virtual; - function GetSeriesCheckListBoxClass: TcxGridChartSeriesCheckListBoxClass; virtual; - function GetSeriesPageVisible: Boolean; virtual; - function GetSortBySeriesComboBoxClass: TcxGridChartSortBySeriesComboBoxClass; virtual; - procedure GridViewChanged; override; - procedure InitPageControl; override; - - property GridView: TcxGridChartView read GetGridView; - public - procedure PrepareForDataGroupDragAndDrop; virtual; - procedure RefreshData; override; - - property DataGroupsListBox: TcxGridChartDataGroupsListBox read FDataGroupsListBox; - property DataGroupsPage: TcxTabSheet read FDataGroupsPage; - property OptionsPage: TcxTabSheet read FOptionsPage; - property OptionsTreeView: TcxGridChartOptionsTreeView read FOptionsTreeView; - property SeriesCheckListBox: TcxGridChartSeriesCheckListBox read FSeriesCheckListBox; - property SeriesPage: TcxTabSheet read FSeriesPage; - property SortBySeriesComboBox: TcxGridChartSortBySeriesComboBox read FSortBySeriesComboBox; - property SortBySeriesLabel: TcxLabel read FSortBySeriesLabel; - end; - - // popups - - IcxGridChartDataLevelActiveValuePopupOwner = interface(IcxCustomGridPopupOwner) - ['{94AE5C9F-9A81-401D-8B76-E3278CDD0CEB}'] - function GetDataGroup: TcxGridChartDataGroup; - end; - - TcxGridChartDataLevelActiveValuePopupClass = class of TcxGridChartDataLevelActiveValuePopup; - - TcxGridChartDataLevelActiveValuePopup = class(TcxCustomGridPopup) - private - FDataGroup: TcxGridChartDataGroup; - FListBox: TcxGridPopupListBox; - function GetGridView: TcxGridChartView; - procedure ListBoxAction(Sender: TcxGridPopupListBox; AItemIndex: Integer); - protected - Values: TVariantArray; - procedure AddValueItems(AStrings: TStrings; out AValues: TVariantArray); virtual; - procedure AdjustListBoxSize; virtual; - procedure InitPopup; override; - procedure SetDataGroupActiveValue(AItemIndex: Integer); virtual; - property ListBox: TcxGridPopupListBox read FListBox; - public - constructor Create(AGridView: TcxCustomGridView); override; - property DataGroup: TcxGridChartDataGroup read FDataGroup; - property GridView: TcxGridChartView read GetGridView; - end; - - TcxGridChartDiagramSelectorPopupListBox = class(TcxGridPopupListBox) - protected - function CalculateItemHeight: Integer; override; - procedure DrawItemContent(ACanvas: TcxCanvas; AIndex: Integer; ARect: TRect; - AState: TOwnerDrawState); override; - end; - - TcxGridChartDiagramSelectorPopupClass = class of TcxGridChartDiagramSelectorPopup; - - TcxGridChartDiagramSelectorPopup = class(TcxCustomGridPopup) - private - FListBox: TcxGridChartDiagramSelectorPopupListBox; - function GetGridView: TcxGridChartView; - procedure ListBoxAction(Sender: TcxGridPopupListBox; AItemIndex: Integer); - protected - procedure AddDiagramItems(AStrings: TStrings); virtual; - function GetImageOffset: Integer; virtual; - procedure InitPopup; override; - procedure SelectDiagram(AItemIndex: Integer); virtual; - property ListBox: TcxGridChartDiagramSelectorPopupListBox read FListBox; - public - constructor Create(AGridView: TcxCustomGridView); override; - property GridView: TcxGridChartView read GetGridView; - property ImageOffset: Integer read GetImageOffset; - end; - - // controller - - TcxGridChartController = class(TcxCustomGridController) - private - FDataLevelActiveValuePopup: TcxGridChartDataLevelActiveValuePopup; - FDiagramSelectorPopup: TcxGridChartDiagramSelectorPopup; - FFirstVisibleCategoryIndex: Integer; - FFirstVisibleCategoryIndexes: array of Integer; - FMovingDataGroup: TcxGridChartDataGroup; - FStoredFirstVisibleCategoryIndex: Integer; - function GetCustomizationForm: TcxGridChartCustomizationForm; - function GetDataLevelActiveValuePopup: TcxGridChartDataLevelActiveValuePopup; - function GetDiagramSelectorPopup: TcxGridChartDiagramSelectorPopup; - function GetGridView: TcxGridChartView; - function GetIsDataGroupMoving: Boolean; - function GetViewInfo: TcxGridChartViewInfo; - function GetVisibleCategoryCountValue: Integer; - procedure SetFirstVisibleCategoryIndex(Value: Integer); - protected - procedure ActiveDataLevelChanged(APrevActiveDataLevel, AActiveDataLevel: Integer); virtual; - procedure ActiveDiagramChanged(ADiagram: TcxGridChartDiagram); virtual; - procedure CheckCoordinates; override; - procedure DataLevelsChanged; virtual; - procedure FirstVisibleCategoryIndexChanged; virtual; - function GetDataLevelActiveValuePopupClass: TcxGridChartDataLevelActiveValuePopupClass; virtual; - function GetDesignHitTest(AHitTest: TcxCustomGridHitTest): Boolean; override; - function GetDiagramSelectorPopupClass: TcxGridChartDiagramSelectorPopupClass; virtual; - function GetPatternObject(AObject: TPersistent): TPersistent; override; - - function GetFirstVisibleCategoryIndex: Integer; virtual; - function GetVisibleCategoryCount(ACheckCount: Boolean): Integer; virtual; - - function CanDataDrillDown(AValueIndex: Integer): Boolean; virtual; - function CanDataDrillUp: Boolean; virtual; - function DoDataDrillDown(AValueIndex: Integer): Boolean; virtual; - function DoDataDrillUp: Boolean; virtual; - function MayDataDrillDown(ACheckDesignTime: Boolean = True): Boolean; virtual; - - // scrollbar - function CanShowScrollBar: Boolean; virtual; - function GetScrollBarKind: TScrollBarKind; virtual; - function GetScrollBarPageSize: Integer; virtual; - function GetScrollBarPos: Integer; virtual; - function GetScrollBarSize: Integer; virtual; - function ScrollPosToCategoryIndex(AScrollPos: Integer): Integer; virtual; - - function CanShowDataLevelActiveValuePopup(ACheckDesignTime: Boolean = True): Boolean; virtual; - - // customization - procedure CustomizationChanged; override; - function GetCustomizationFormClass: TcxCustomGridCustomizationFormClass; override; - function GetCustomizationFormDefaultWidth: Integer; override; - function GetDataLevelInfoDragAndDropObjectClass: TcxGridChartDataGroupMovingObjectClass; virtual; - - property ViewInfo: TcxGridChartViewInfo read GetViewInfo; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - function HasDataLevelActiveValuePopup: Boolean; - function HasDiagramSelectorPopup: Boolean; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - - procedure InitScrollBarsParameters; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - - function GetValueHintText(ASeries: TcxGridChartSeries; AValueIndex: Integer): string; virtual; - - // data drill down - function DataDrillDown(AValueIndex: Integer): Boolean; virtual; - function DataDrillUp: Boolean; virtual; - function IsDataDrillDownPossible(AValueIndex: Integer): Boolean; - - // paging - function ActiveDiagramSupportsPaging: Boolean; - property FirstVisibleCategoryIndex: Integer read GetFirstVisibleCategoryIndex write SetFirstVisibleCategoryIndex; - property VisibleCategoryCount: Integer read GetVisibleCategoryCountValue; - - property CustomizationForm: TcxGridChartCustomizationForm read GetCustomizationForm; - property DataLevelActiveValuePopup: TcxGridChartDataLevelActiveValuePopup read GetDataLevelActiveValuePopup; - property DiagramSelectorPopup: TcxGridChartDiagramSelectorPopup read GetDiagramSelectorPopup; - property GridView: TcxGridChartView read GetGridView; - property IsDataGroupMoving: Boolean read GetIsDataGroupMoving; - property MovingDataGroup: TcxGridChartDataGroup read FMovingDataGroup; - end; - - { datacontroller } - - {$HPPEMIT '__interface IcxGridChartItem;'} - - IcxGridChartItem = interface - ['{CDDAE712-6292-4814-A69E-7D871B299EB2}'] - procedure DataChanged; - function GetDataBinding: TcxGridChartItemDataBinding; - function GetID: Integer; - procedure ValueTypeClassChanged; - end; - - IcxGridChartViewItemsProvider = interface - ['{852B466D-5068-4600-BBC6-0061BF69A0B0}'] - function GetItem(AItemClass: TcxGridChartItemClass; AIndex: Integer): TcxGridChartItem; - procedure GetItemCaptions(AItemClass: TcxGridChartItemClass; ACaptions: TStringList); - procedure InitItem(AItem: TcxGridChartItem; AIndex: Integer); - end; - - TcxGridChartDataController = class(TcxDataController, IcxCustomGridDataController) - private - function GetGridViewValue: TcxGridChartView; - function GetOnAfterSummary: TcxAfterSummaryEvent; - function GetOnSummary: TcxSummaryEvent; - procedure SetOnAfterSummary(Value: TcxAfterSummaryEvent); - procedure SetOnSummary(Value: TcxSummaryEvent); - protected - { IcxCustomGridDataController } - procedure AssignData(ADataController: TcxCustomDataController); - procedure CreateAllItems(AMissingItemsOnly: Boolean); - procedure DeleteAllItems; - procedure GetFakeComponentLinks(AList: TList); - function GetGridView: TcxCustomGridView; - function HasAllItems: Boolean; - function IsDataChangeable: Boolean; - function IsDataLinked: Boolean; - function SupportsCreateAllItems: Boolean; - - procedure DoValueTypeClassChanged(AItemIndex: Integer); override; - //function GetChartViewItemIndex: Integer; override; - function GetItemID(AItem: TObject): Integer; override; - function GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; override; - procedure Unlocked; override; - public - procedure BeginFullUpdate; override; - procedure EndFullUpdate; override; - function GetItem(Index: Integer): TObject; override; - property GridView: TcxGridChartView read GetGridViewValue; - published - property Options; - property OnAfterSummary: TcxAfterSummaryEvent read GetOnAfterSummary write SetOnAfterSummary; - property OnCompare; - property OnDataChanged; - property OnFilterRecord; - property OnRecordChanged; - property OnSummary: TcxSummaryEvent read GetOnSummary write SetOnSummary; - end; - - { painter } - - // title - - TcxGridChartTitlePainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxCustomGridChartTitleViewInfo; - protected - procedure PrepareCanvasForDrawText; override; - procedure UnprepareCanvasForDrawText; override; - public - property ViewInfo: TcxCustomGridChartTitleViewInfo read GetViewInfo; - end; - - // legend - - TcxGridChartLegendItemPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridChartLegendItemViewInfo; - protected - procedure DrawContent; override; - procedure DrawLegendKey; virtual; - property ViewInfo: TcxGridChartLegendItemViewInfo read GetViewInfo; - end; - - TcxGridChartLegendPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridChartLegendViewInfo; - protected - procedure DrawContent; override; - function ExcludeFromClipRect: Boolean; override; - property ViewInfo: TcxGridChartLegendViewInfo read GetViewInfo; - end; - - // custom diagram - - TcxGridChartDiagramPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridChartDiagramViewInfo; - protected - procedure DrawValueCaptions; virtual; - procedure DrawValues; virtual; - procedure FillAndExcludeRect(const R: TRect); - function NeedsPainting: Boolean; override; - procedure Paint; override; - procedure PrepareClipRegionForValueDrawing(AValueViewInfo: TcxGridChartDiagramValueViewInfo; - AOriginalClipRegion: TcxRegion); virtual; - property ViewInfo: TcxGridChartDiagramViewInfo read GetViewInfo; - end; - - // histogram - - TcxGridChartHistogramTickMarkLabelsPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridChartHistogramTickMarkLabelsViewInfo; - protected - procedure DrawCaptions; virtual; - procedure DrawContent; override; - public - property ViewInfo: TcxGridChartHistogramTickMarkLabelsViewInfo read GetViewInfo; - end; - - TcxGridChartHistogramPainter = class(TcxGridChartDiagramPainter) - private - function GetViewInfo: TcxGridChartHistogramViewInfo; - protected - procedure DrawCategoryAxis; virtual; - procedure DrawCategoryGridLines; virtual; - procedure DrawContent; override; - procedure DrawPlotBackground; virtual; - procedure DrawValueAxis; virtual; - procedure DrawValueGridLines; virtual; - procedure DrawValuesBackground; virtual; - function GetTransparentValues: Boolean; virtual; abstract; - function GetValuesClipRect: TRect; virtual; - procedure SetValuesClipRegion; virtual; - - property TransparentValues: Boolean read GetTransparentValues; - property ViewInfo: TcxGridChartHistogramViewInfo read GetViewInfo; - end; - - // column diagram - - TcxGridChartColumnDiagramValuePainter = class(TcxCustomGridCellPainter) - protected - function ExcludeFromClipRect: Boolean; override; - end; - - TcxGridChartColumnDiagramPainter = class(TcxGridChartHistogramPainter) - protected - function GetTransparentValues: Boolean; override; - end; - - // line diagram - - TcxGridChartLineDiagramLegendItemPainter = class(TcxGridChartLegendItemPainter) - private - function GetViewInfo: TcxGridChartLineDiagramLegendItemViewInfo; - protected - procedure DrawLegendKey; override; - procedure DrawLine; virtual; - procedure DrawMarker; virtual; - property ViewInfo: TcxGridChartLineDiagramLegendItemViewInfo read GetViewInfo; - end; - - TcxGridChartLineDiagramValuePainterClass = class of TcxGridChartLineDiagramValuePainter; - - TcxGridChartLineDiagramValuePainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridChartLineDiagramValueViewInfo; - protected - function CanDrawDesignSelection: Boolean; override; - procedure DrawContent; override; - procedure DrawLine; virtual; - procedure DrawMarker; virtual; - property ViewInfo: TcxGridChartLineDiagramValueViewInfo read GetViewInfo; - public - class procedure DrawLineEx(ACanvas: TcxCanvas; const AStart, AFinish: TPoint; - AStyle: TcxGridChartLineStyle; AWidth: Integer; AColor: TColor); virtual; - class procedure DrawLines(ACanvas: TcxCanvas; const APoints: TPointArray; - AStyle: TcxGridChartLineStyle; AWidth: Integer; AColor: TColor); virtual; - class procedure DrawMarkerEx(ACanvas: TcxCanvas; const ABounds: TRect; - const APoints: TPointArray; AStyle: TcxGridChartMarkerStyle; - const AParams: TcxViewParams); virtual; - end; - - TcxGridChartLineDiagramPainter = class(TcxGridChartHistogramPainter) - protected - procedure DrawContent; override; - procedure DrawValuesDesignSelection; virtual; - function GetTransparentValues: Boolean; override; - end; - - // area diagram - - TcxGridChartAreaDiagramLegendItemPainter = class(TcxGridChartLineDiagramLegendItemPainter) - protected - procedure DrawAreaBackground; virtual; - procedure DrawAreaBorder; virtual; - procedure DrawLegendKey; override; - end; - - TcxGridChartAreaDiagramValuePainter = class(TcxGridChartLineDiagramValuePainter) - private - function GetViewInfo: TcxGridChartAreaDiagramValueViewInfo; - protected - procedure DoDrawArea; virtual; - procedure DrawArea; virtual; - property ViewInfo: TcxGridChartAreaDiagramValueViewInfo read GetViewInfo; - end; - - TcxGridChartAreaDiagramPainter = class(TcxGridChartLineDiagramPainter) - protected - procedure DrawValuesBackground; override; - end; - - // pie diagram - - TcxGridChartPieDiagramValuePainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridChartPieDiagramValueViewInfo; - protected - procedure DrawContent; override; - procedure DrawLeaderLine; virtual; - procedure DrawSlice; virtual; - property ViewInfo: TcxGridChartPieDiagramValueViewInfo read GetViewInfo; - public - procedure MainPaint; override; - end; - - TcxGridChartPieSeriesSiteCaptionPainter = class(TcxCustomGridCellPainter) - protected - function ExcludeFromClipRect: Boolean; override; - end; - - TcxGridChartPieSeriesSitePainter = class(TcxCustomGridCellPainter) - protected - function CanDrawDesignSelection: Boolean; override; - function ExcludeFromClipRect: Boolean; override; - end; - - TcxGridChartPieDiagramPainter = class(TcxGridChartDiagramPainter) - private - function GetViewInfo: TcxGridChartPieDiagramViewInfo; - protected - procedure DrawContent; override; - procedure DrawSeriesDesignSelection; virtual; - procedure DrawSeriesSites; virtual; - procedure DrawValues; override; - procedure ExcludeSeriesPieAreasFromClipRegion; virtual; - procedure PrepareClipRegionForValueDrawing(AValueViewInfo: TcxGridChartDiagramValueViewInfo; - AOriginalClipRegion: TcxRegion); override; - property ViewInfo: TcxGridChartPieDiagramViewInfo read GetViewInfo; - end; - - // ToolBox - - TcxGridChartToolBoxItemSeparatorPainter = class(TcxCustomGridCellPainter) - protected - procedure DrawContent; override; - end; - - TcxGridChartToolBoxDataLevelActiveValuePainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridChartToolBoxDataLevelActiveValueViewInfo; - protected - procedure PrepareCanvasForDrawText; override; - property ViewInfo: TcxGridChartToolBoxDataLevelActiveValueViewInfo read GetViewInfo; - end; - - TcxGridChartToolBoxDataLevelInfoPainter = class(TcxCustomGridCellPainter) - protected - procedure DrawBackground; override; - function ExcludeFromClipRect: Boolean; override; - end; - - TcxGridChartToolBoxCustomizeButtonPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridChartToolBoxCustomizeButtonViewInfo; - protected - procedure Paint; override; - property ViewInfo: TcxGridChartToolBoxCustomizeButtonViewInfo read GetViewInfo; - end; - - TcxGridChartToolBoxDiagramSelectorPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridChartToolBoxDiagramSelectorViewInfo; - protected - procedure DrawContent; override; - procedure DrawImage; virtual; - procedure PrepareCanvasForDrawText; override; - property ViewInfo: TcxGridChartToolBoxDiagramSelectorViewInfo read GetViewInfo; - end; - - TcxGridChartToolBoxPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridChartToolBoxViewInfo; - protected - procedure DrawContent; override; - procedure DrawDataLevelInfoConnectors; virtual; - procedure DrawItems(AOpaqueItems: Boolean); virtual; - function ExcludeFromClipRect: Boolean; override; - property ViewInfo: TcxGridChartToolBoxViewInfo read GetViewInfo; - end; - - // view - - TcxGridChartPainter = class(TcxCustomGridPainter) - private - function GetViewInfo: TcxGridChartViewInfo; - protected - procedure PaintAfter; override; - procedure PaintContent; override; - public - property ViewInfo: TcxGridChartViewInfo read GetViewInfo; - end; - - { view data } - - TcxGridChartViewData = class(TcxCustomGridViewData) - private - FDataGroupIndex: Integer; - FSumOfValues: TVariantArray; - function GetCategory(AIndex: Integer): Variant; - function GetCategoryCount: Integer; - function GetChildCount: Integer; - function GetChildDataGroupIndex(Index: Integer): Integer; - function GetChildLevel: Integer; - function GetChildRecordIndex(Index: Integer): Integer; - function GetDataGroupIndex: Integer; - function GetGridView: TcxGridChartView; - function GetGroupValue(ADataGroupIndex, AIndex: Integer): Variant; - function GetSumOfValues(ASeriesIndex: Integer): Variant; - function GetValue(ASeriesIndex, AIndex: Integer): Variant; - function GetVisibleCategory(AIndex: Integer): Variant; - function GetVisibleCategoryCount: Integer; - function GetVisibleGroupValue(AVisibleDataGroupIndex, AIndex: Integer): Variant; - function GetVisibleGroupValueCount(AVisibleDataGroupIndex: Integer): Integer; - function GetVisibleValue(ASeriesIndex, AIndex: Integer): Variant; - procedure SetCategory(AIndex: Integer; const Value: Variant); - procedure SetCategoryCount(Value: Integer); - procedure SetGroupValue(ADataGroupIndex, AIndex: Integer; const Value: Variant); - procedure SetValue(ASeriesIndex, AIndex: Integer; const Value: Variant); - protected - function CalculateDataGroupIndex: Integer; virtual; - function CalculateSumOfValues(ASeriesIndex: Integer): Variant; virtual; - procedure CheckValueAtLevel(ALevel: Integer; var AValue: Variant); - function GetDataGroupIndexByLevel(ALevel: Integer): Integer; - function GetRecordIndexByValueIndex(AValueIndex: Integer): Integer; - procedure DataLevelsChanged; virtual; - function IsDataGrouped: Boolean; - function IsSummaryLevel: Boolean; - procedure CalculateSumsOfValues; - procedure SeriesPosChanged(ASeries: TcxGridChartSeries); virtual; - procedure Update(AInfo: TcxUpdateControlInfo); virtual; - procedure UpdateDataGroupIndex; - procedure UpdateSumsOfValues; - - property ChildCount: Integer read GetChildCount; - property ChildDataGroupIndex[Index: Integer]: Integer read GetChildDataGroupIndex; - property ChildLevel: Integer read GetChildLevel; - property ChildRecordIndex[Index: Integer]: Integer read GetChildRecordIndex; - property DataGroupIndex: Integer read GetDataGroupIndex; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure GetVisibleGroupValues(ADataGroup: TcxGridChartDataGroup; AStrings: TStrings; - out AValues: TVariantArray); - - property GridView: TcxGridChartView read GetGridView; - property SumOfValues[ASeriesIndex: Integer]: Variant read GetSumOfValues; - - // all values - property Categories[AIndex: Integer]: Variant read GetCategory write SetCategory; - property CategoryCount: Integer read GetCategoryCount write SetCategoryCount; - property GroupValues[ADataGroupIndex, AIndex: Integer]: Variant read GetGroupValue write SetGroupValue; - property Values[ASeriesIndex, AIndex: Integer]: Variant read GetValue write SetValue; - - // visible values - property VisibleCategories[AIndex: Integer]: Variant read GetVisibleCategory; - property VisibleCategoryCount: Integer read GetVisibleCategoryCount; - property VisibleValues[ASeriesIndex, AIndex: Integer]: Variant read GetVisibleValue; - - property VisibleGroupValueCount[AVisibleDataGroupIndex: Integer]: Integer read GetVisibleGroupValueCount; - property VisibleGroupValues[AVisibleDataGroupIndex, AIndex: Integer]: Variant read GetVisibleGroupValue; - end; - - { view info } - - // part - - TcxCustomGridChartPartViewInfo = class(TcxCustomGridViewCellViewInfo) - private - function GetGridView: TcxGridChartView; - function GetGridViewInfo: TcxGridChartViewInfo; - protected - function GetAlignment: TcxGridChartPartAlignment; virtual; abstract; - function GetHeight: Integer; override; - function GetOrientation: TcxGridChartPartOrientation; virtual; abstract; - function GetPosition: TcxGridChartPartPosition; virtual; abstract; - function GetVisible: Boolean; override; - function GetWidth: Integer; override; - public - property Alignment: TcxGridChartPartAlignment read GetAlignment; - property GridView: TcxGridChartView read GetGridView; - property GridViewInfo: TcxGridChartViewInfo read GetGridViewInfo; - property Orientation: TcxGridChartPartOrientation read GetOrientation; - property Position: TcxGridChartPartPosition read GetPosition; - end; - - // custom title - - TcxCustomGridChartTitleViewInfo = class(TcxCustomGridChartPartViewInfo) - private - FTitle: TcxCustomGridChartTitle; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAlignment: TcxGridChartPartAlignment; override; - function GetOrientation: TcxGridChartPartOrientation; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetPosition: TcxGridChartPartPosition; override; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - function HasBackground: Boolean; override; - public - constructor Create(AGridViewInfo: TcxCustomGridViewInfo; ATitle: TcxCustomGridChartTitle); reintroduce; virtual; - property Title: TcxCustomGridChartTitle read FTitle; - end; - - // custom legend - - TcxGridChartLegendItemViewInfoClass = class of TcxGridChartLegendItemViewInfo; - - TcxGridChartLegendItemViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FContainer: TcxGridChartLegendViewInfo; - FIndex: Integer; - function GetDiagram: TcxGridChartDiagram; - function GetGridView: TcxGridChartView; - function GetLegendKeyHeight: Integer; - function GetLegendKeyWidth: Integer; - function GetSeries: TcxGridChartSeries; - protected - function CalculateContentBounds: TRect; override; - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function CalculateLegendKeyHeight: Integer; virtual; - function CalculateLegendKeySize: Integer; virtual; - function CalculateLegendKeyWidth: Integer; virtual; - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - procedure DoCalculateParams; override; - function GetDesignSelectionBounds: TRect; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIsDesignSelected: Boolean; override; - function GetLegendKeyBorders: TcxBorders; virtual; - function GetLegendKeyBounds: TRect; virtual; - function GetLegendKeyOffset: Integer; virtual; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasBackground: Boolean; override; - function HasCustomDraw: Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - - property LegendKeyHeight: Integer read GetLegendKeyHeight; - property LegendKeyOffset: Integer read GetLegendKeyOffset; - property LegendKeyWidth: Integer read GetLegendKeyWidth; - public - LegendKeyParams: TcxViewParams; - constructor Create(AContainer: TcxGridChartLegendViewInfo; AIndex: Integer); reintroduce; virtual; - function GetAreaBoundsForPainting: TRect; override; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - property Container: TcxGridChartLegendViewInfo read FContainer; - property Diagram: TcxGridChartDiagram read GetDiagram; - property GridView: TcxGridChartView read GetGridView; - property Index: Integer read FIndex; - property LegendKeyBorders: TcxBorders read GetLegendKeyBorders; - property LegendKeyBounds: TRect read GetLegendKeyBounds; - property Series: TcxGridChartSeries read GetSeries; - end; - - TcxGridChartLegendKind = (lkSeries, lkCategories); - - TcxGridChartLegendViewInfoClass = class of TcxGridChartLegendViewInfo; - - TcxGridChartLegendViewInfo = class(TcxCustomGridChartPartViewInfo) - private - FDiagram: TcxGridChartDiagram; - FItemLegendKeyWidth: Integer; - FItemLegendKeyHeight: Integer; - FItemOffset: Integer; - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxGridChartLegendItemViewInfo; - function GetItemLegendKeyWidth: Integer; - function GetItemLegendKeyHeight: Integer; - function GetItemOffset: Integer; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function CalculateItemLegendKeyWidth: Integer; virtual; - function CalculateItemLegendKeyHeight: Integer; virtual; - function CalculateItemOffset: Integer; virtual; - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - function GetAlignment: TcxGridChartPartAlignment; override; - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetOrientation: TcxGridChartPartOrientation; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetPosition: TcxGridChartPartPosition; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - function HasCustomDraw: Boolean; override; - - function AddItem: TcxGridChartLegendItemViewInfo; - procedure CalculateItems; virtual; - function GetItemCaption(AIndex: Integer): string; virtual; - function GetItemClass: TcxGridChartLegendItemViewInfoClass; virtual; - function GetItemCount: Integer; virtual; - function GetItemObjectIndex(AIndex: Integer): Integer; virtual; abstract; - function GetItemSeriesIndex(AIndex: Integer): Integer; virtual; - function GetItemValueIndex(AIndex: Integer): Integer; virtual; - function GetKind: TcxGridChartLegendKind; virtual; abstract; - //function ItemLegendKeyBorderIsValueBorder: Boolean; virtual; - - property ItemLegendKeyWidth: Integer read GetItemLegendKeyWidth; - property ItemLegendKeyHeight: Integer read GetItemLegendKeyHeight; - property ItemOffset: Integer read GetItemOffset; - public - constructor Create(AGridViewInfo: TcxCustomGridViewInfo; ADiagram: TcxGridChartDiagram); reintroduce; virtual; - destructor Destroy; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - procedure GetItemLegendKeyParams(AIndex: Integer; out AParams: TcxViewParams); virtual; - property Diagram: TcxGridChartDiagram read FDiagram; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxGridChartLegendItemViewInfo read GetItem; - property Kind: TcxGridChartLegendKind read GetKind; - end; - - // custom diagram - - TcxGridChartDiagramValueCaptionViewInfoClass = class of TcxGridChartDiagramValueCaptionViewInfo; - - TcxGridChartDiagramValueCaptionViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FValueViewInfo: TcxGridChartDiagramValueViewInfo; - protected - function GetAlignmentHorz: TAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - function GetTextAttributes(AForPainting: Boolean): Integer; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - function HasBackground: Boolean; override; - function HasVisualCompensation: Boolean; virtual; - public - constructor Create(AValueViewInfo: TcxGridChartDiagramValueViewInfo); reintroduce; virtual; - property ValueViewInfo: TcxGridChartDiagramValueViewInfo read FValueViewInfo; - end; - - TcxGridChartDiagramValueViewInfoClass = class of TcxGridChartDiagramValueViewInfo; - - TcxGridChartDiagramValueViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FCaptionViewInfo: TcxGridChartDiagramValueCaptionViewInfo; - FDiagramViewInfo: TcxGridChartDiagramViewInfo; - FSeriesIndex: Integer; - FVisibleValueIndex: Integer; - function GetController: TcxGridChartController; - function GetDiagram: TcxGridChartDiagram; - function GetGridView: TcxGridChartView; - function GetSeries: TcxGridChartSeries; - function GetValueIndex: Integer; - protected - function CalculateCaptionBounds: TRect; virtual; abstract; - function CanShowHint: Boolean; override; - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - function GetCaptionViewInfoClass: TcxGridChartDiagramValueCaptionViewInfoClass; virtual; - function GetCaptionText: string; virtual; - procedure GetCaptionViewParams(var AParams: TcxViewParams); virtual; - function GetCellBoundsForHint: TRect; override; - function GetHintText: string; override; - function GetHintTextRect(const AMousePos: TPoint): TRect; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetIsDesignSelected: Boolean; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasCaption: Boolean; virtual; - function HasCaptionVisualCompensation: Boolean; virtual; - function HasCustomDraw: Boolean; override; - function HasHintPoint(const P: TPoint): Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - function IsHintForText: Boolean; override; - function IsHintMultiLine: Boolean; override; - procedure StateChanged(APrevState: TcxGridCellState); override; - - property Controller: TcxGridChartController read GetController; - property Diagram: TcxGridChartDiagram read GetDiagram; - public - constructor Create(ADiagramViewInfo: TcxGridChartDiagramViewInfo; - ASeriesIndex, AVisibleValueIndex: Integer); reintroduce; virtual; - destructor Destroy; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - property CaptionViewInfo: TcxGridChartDiagramValueCaptionViewInfo read FCaptionViewInfo; - property DiagramViewInfo: TcxGridChartDiagramViewInfo read FDiagramViewInfo; - property GridView: TcxGridChartView read GetGridView; - property Series: TcxGridChartSeries read GetSeries; - property SeriesIndex: Integer read FSeriesIndex; - property ValueIndex: Integer read GetValueIndex; - property VisibleValueIndex: Integer read FVisibleValueIndex; - end; - - TcxGridChartDiagramViewInfoClass = class of TcxGridChartDiagramViewInfo; - - TcxGridChartDiagramViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FDiagram: TcxGridChartDiagram; - FValueViewInfos: TList; - function GetCategory(AIndex: Integer): string; - function GetGridView: TcxGridChartView; - function GetSeries(AIndex: Integer): TcxGridChartSeries; - function GetSeriesCount: Integer; - function GetValueCount: Integer; - function GetValueViewInfoValue(Index: Integer): TcxGridChartDiagramValueViewInfo; - function GetValueViewInfoCount: Integer; - function GetViewData: TcxGridChartViewData; - protected - procedure GetViewParams(var AParams: TcxViewParams); override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - - function CreateValueViewInfo(ASeriesIndex, AVisibleValueIndex: Integer): TcxGridChartDiagramValueViewInfo; - function GetValue(ASeriesIndex, AIndex: Integer): Variant; virtual; - function GetValueCaption(ASeriesIndex, AVisibleValueIndex: Integer): string; virtual; - function GetValueIndex(AVisibleValueIndex: Integer): Integer; virtual; - class function GetValueViewInfoClass: TcxGridChartDiagramValueViewInfoClass; virtual; // abstract; - because of CLR, BCB - function GetValueViewInfoIndex(ASeriesIndex, AVisibleIndex: Integer): Integer; virtual; abstract; - function GetVisibleCategory(AIndex: Integer): string; virtual; - function GetVisibleValue(ASeriesIndex, AIndex: Integer): Variant; virtual; - function GetVisibleValueCount: Integer; virtual; - - property Categories[AIndex: Integer]: string read GetCategory; - property Values[ASeriesIndex, AIndex: Integer]: Variant read GetValue; - property Series[AIndex: Integer]: TcxGridChartSeries read GetSeries; - public - constructor Create(AGridViewInfo: TcxCustomGridViewInfo; ADiagram: TcxGridChartDiagram); reintroduce; virtual; - destructor Destroy; override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function GetValueViewInfo(ASeriesIndex, AVisibleIndex: Integer): TcxGridChartDiagramValueViewInfo; - property Diagram: TcxGridChartDiagram read FDiagram; - property GridView: TcxGridChartView read GetGridView; - property SeriesCount: Integer read GetSeriesCount; - property ValueCount: Integer read GetValueCount; - property ValueViewInfoCount: Integer read GetValueViewInfoCount; - property ValueViewInfos[Index: Integer]: TcxGridChartDiagramValueViewInfo read GetValueViewInfoValue; - property ViewData: TcxGridChartViewData read GetViewData; - property VisibleCategories[AIndex: Integer]: string read GetVisibleCategory; - property VisibleValueCount: Integer read GetVisibleValueCount; - property VisibleValues[ASeriesIndex, AIndex: Integer]: Variant read GetVisibleValue; - end; - - // histogram legend - - TcxGridChartHistogramLegendViewInfo = class(TcxGridChartLegendViewInfo) - private - function GetDiagram: TcxGridChartHistogram; - protected - function GetItemObjectIndex(AIndex: Integer): Integer; override; - function GetItemsInReverseOrder: Boolean; virtual; - function GetKind: TcxGridChartLegendKind; override; - property ItemsInReverseOrder: Boolean read GetItemsInReverseOrder; - public - property Diagram: TcxGridChartHistogram read GetDiagram; - end; - - // histogram - - TcxGridChartHistogramValueViewInfo = class(TcxGridChartDiagramValueViewInfo) - private - function GetCategoryDirection: TcxDirection; - function GetDiagramViewInfo: TcxGridChartHistogramViewInfo; - function GetValueDirection: TcxDirection; - public - property CategoryDirection: TcxDirection read GetCategoryDirection; - property DiagramViewInfo: TcxGridChartHistogramViewInfo read GetDiagramViewInfo; - property ValueDirection: TcxDirection read GetValueDirection; - end; - - TcxGridChartHistogramAxisTitleViewInfoClass = class of TcxGridChartHistogramAxisTitleViewInfo; - - TcxGridChartHistogramAxisTitleViewInfo = class(TcxCustomGridChartTitleViewInfo) - private - FContainer: TcxGridChartHistogramTickMarkLabelsViewInfo; - function GetTitle: TcxGridChartHistogramAxisTitle; - protected - procedure GetViewParams(var AParams: TcxViewParams); override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - public - constructor Create(AContainer: TcxGridChartHistogramTickMarkLabelsViewInfo; - ATitle: TcxCustomGridChartTitle); reintroduce; virtual; - property Container: TcxGridChartHistogramTickMarkLabelsViewInfo read FContainer; - property Title: TcxGridChartHistogramAxisTitle read GetTitle; - end; - - TcxGridChartAxisPosition = cppLeft..cppBottom; - - TcxGridChartHistogramTickMarkLabelsViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FCaptionBounds: TRectArray; - FCaptionHeight: Integer; - FCaptionWidths: array of Integer; - FDiagramViewInfo: TcxGridChartHistogramViewInfo; - FIsTwoRowLayout: Boolean; - FTitleViewInfo: TcxGridChartHistogramAxisTitleViewInfo; - function GetCaptionBounds(Index: Integer): TRect; - function GetCaptionHeight: Integer; - function GetCaptionWidth(Index: Integer): Integer; - function GetDiagram: TcxGridChartHistogram; - function GetIsVertical: Boolean; - procedure SetCaptionBounds(Index: Integer; const Value: TRect); - protected - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetTitleViewInfoClass: TcxGridChartHistogramAxisTitleViewInfoClass; virtual; - - function GetCaption(Index: Integer): string; virtual; - function GetCount: Integer; virtual; abstract; - function GetIsReverseOrder: Boolean; virtual; abstract; - function GetValue(Index: Integer): Variant; virtual; abstract; - - function CalculateCaptionBounds(AIndex: Integer): TRect; virtual; - procedure CalculateCaptionsBounds; virtual; - function CalculateHeight(AWidth, ALeftReduction, ARightReduction: Integer): Integer; {overload;}reintroduce; virtual; - function CalculateWidth: Integer; override; - function CalculateIsTwoRowLayout(AWidth, ALeftReduction, ARightReduction: Integer): Boolean; virtual; - procedure CalculateTitleBounds(out ATitleBounds, AContentBounds: TRect); virtual; - function GetAlignmentHorz: TAlignment; override; - function GetAxis: TcxGridChartHistogramAxis; virtual; abstract; - function GetCaptionPosition(AIndex: Integer): Integer; virtual; abstract; - function GetCaptionsVisible: Boolean; virtual; - procedure GetEdgeCaptionsReductions(var ALeftReduction, ARightReduction: Integer); virtual; - function GetIsEdgeCaptions: Boolean; virtual; abstract; - function GetPosition: TcxGridChartAxisPosition; virtual; abstract; - function GetTextAttributes(AForPainting: Boolean): Integer; override; - procedure GetTitleViewParams(var AParams: TcxViewParams); virtual; abstract; - function GetVisible: Boolean; override; - - property Axis: TcxGridChartHistogramAxis read GetAxis; - property CaptionHeight: Integer read GetCaptionHeight; - property CaptionWidths[Index: Integer]: Integer read GetCaptionWidth; - property Diagram: TcxGridChartHistogram read GetDiagram; - property IsEdgeCaptions: Boolean read GetIsEdgeCaptions; - property IsReverseOrder: Boolean read GetIsReverseOrder; - property IsTwoRowLayout: Boolean read FIsTwoRowLayout write FIsTwoRowLayout; - property IsVertical: Boolean read GetIsVertical; - public - constructor Create(ADiagramViewInfo: TcxGridChartHistogramViewInfo); reintroduce; virtual; - destructor Destroy; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - procedure FitCaptionsHorz(AWidth: Integer; var ALeftReduction, ARightReduction: Integer); virtual; - procedure FitCaptionsVert(var ATopReduction, ABottomReduction: Integer); virtual; - function GetCaptionSpace(AWidth, ALeftReduction, ARightReduction: Integer): Integer; virtual; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - - property CaptionBounds[Index: Integer]: TRect read GetCaptionBounds write SetCaptionBounds; - property Captions[Index: Integer]: string read GetCaption; - property CaptionsVisible: Boolean read GetCaptionsVisible; - property Count: Integer read GetCount; - property DiagramViewInfo: TcxGridChartHistogramViewInfo read FDiagramViewInfo; - property Position: TcxGridChartAxisPosition read GetPosition; - property TitleViewInfo: TcxGridChartHistogramAxisTitleViewInfo read FTitleViewInfo; - property Values[Index: Integer]: Variant read GetValue; - end; - - TcxGridChartHistogramCategoryAxisTitleViewInfo = class(TcxGridChartHistogramAxisTitleViewInfo) - protected - function GetHitTestClass: TcxCustomGridHitTestClass; override; - end; - - TcxGridChartHistogramCategoryTickMarkLabelsViewInfoClass = class of TcxGridChartHistogramCategoryTickMarkLabelsViewInfo; - - TcxGridChartHistogramCategoryTickMarkLabelsViewInfo = class(TcxGridChartHistogramTickMarkLabelsViewInfo) - protected - function GetTitleViewInfoClass: TcxGridChartHistogramAxisTitleViewInfoClass; override; - - function GetCount: Integer; override; - function GetIsReverseOrder: Boolean; override; - function GetValue(Index: Integer): Variant; override; - - function GetAxis: TcxGridChartHistogramAxis; override; - function GetCaptionPosition(AIndex: Integer): Integer; override; - function GetIsEdgeCaptions: Boolean; override; - function GetPosition: TcxGridChartAxisPosition; override; - procedure GetTitleViewParams(var AParams: TcxViewParams); override; - procedure GetViewParams(var AParams: TcxViewParams); override; - end; - - TcxGridChartHistogramValueAxisTitleViewInfo = class(TcxGridChartHistogramAxisTitleViewInfo) - protected - function GetHitTestClass: TcxCustomGridHitTestClass; override; - end; - - TcxGridChartHistogramValueTickMarkLabelsViewInfoClass = class of TcxGridChartHistogramValueTickMarkLabelsViewInfo; - - TcxGridChartHistogramValueTickMarkLabelsViewInfo = class(TcxGridChartHistogramTickMarkLabelsViewInfo) - private - function GetAxisValue: TcxGridChartHistogramAxisValue; - protected - function GetTitleViewInfoClass: TcxGridChartHistogramAxisTitleViewInfoClass; override; - - function GetCaption(Index: Integer): string; override; - function GetCount: Integer; override; - function GetIsReverseOrder: Boolean; override; - function GetValue(Index: Integer): Variant; override; - - function GetAxis: TcxGridChartHistogramAxis; override; - function GetCaptionPosition(AIndex: Integer): Integer; override; - function GetIsEdgeCaptions: Boolean; override; - function GetPosition: TcxGridChartAxisPosition; override; - procedure GetTitleViewParams(var AParams: TcxViewParams); override; - procedure GetViewParams(var AParams: TcxViewParams); override; - - property Axis: TcxGridChartHistogramAxisValue read GetAxisValue; - end; - - TcxGridChartHistogramMark = record - Value: Variant; - Position: Integer; - end; - TcxGridChartHistogramMarks = array of TcxGridChartHistogramMark; - - TcxGridChartHistogramViewInfo = class(TcxGridChartDiagramViewInfo) - private - FCategoryTickMarkLabelsViewInfo: TcxGridChartHistogramCategoryTickMarkLabelsViewInfo; - FCategoryMarkHeight: Integer; - FCategoryMarks: TcxGridChartHistogramMarks; - FHasValuesOutOfRange: Boolean; - FIsPlotBoundsCalculated: Boolean; - FMinValue: Extended; - FMaxValue: Extended; - FMinVisualValue: Extended; - FMaxVisualValue: Extended; - FPlotBounds: TRect; - FSumOfValues: TVariantArray; - FValueTickMarkLabelsViewInfo: TcxGridChartHistogramValueTickMarkLabelsViewInfo; - FValueMarkHeight: Integer; - FValueMarks: TcxGridChartHistogramMarks; - FValueStep: Extended; - function GetCategoryAxisColor: TColor; - function GetCategoryGridLineColor: TColor; - function GetCategoryMarkCount: Integer; - function GetCategoryMarkPosition(Index: Integer): Integer; - function GetCategoryMarkValue(Index: Integer): Integer; - function GetDiagram: TcxGridChartHistogram; - function GetHasCategoryAxis: Boolean; - function GetHasCategoryGridLines: Boolean; - function GetHasValueAxis: Boolean; - function GetHasValueGridLines: Boolean; - function GetIsCategoriesInReverseOrder: Boolean; - function GetIsCategoryAxisHorz: Boolean; - function GetIsValueAxisVert: Boolean; - function GetPlotBounds: TRect; - function GetSumOfValues(AValueIndex: Integer): Variant; - function GetValueAxisColor: TColor; - function GetValueGridLineColor: TColor; - function GetValueMarkCount: Integer; - function GetValueMarkPosition(Index: Integer): Integer; - function GetValueMarkValue(Index: Integer): Extended; - function GetZeroValueOffset: Integer; - procedure SetCategoryMarkPosition(Index: Integer; Value: Integer); - procedure SetValueMarkPosition(Index: Integer; Value: Integer); - protected - function GetCategoryTickMarkLabelsViewInfoClass: TcxGridChartHistogramCategoryTickMarkLabelsViewInfoClass; virtual; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetValueTickMarkLabelsViewInfoClass: TcxGridChartHistogramValueTickMarkLabelsViewInfoClass; virtual; - - procedure DoCalculateParams; override; - procedure GetPlotBackgroundParams(out AParams: TcxViewParams); virtual; - - function GetCategoryDirection: TcxDirection; virtual; - function GetCategoryTickMarkLabelOffsetUnits(AIndex: Integer): Integer; virtual; abstract; - function GetCategoryTickMarkOffsetUnits(AIndex: Integer; AValueAxisBetweenCategories: Boolean): Integer; virtual; abstract; - function GetUnitAdjustedOffset(AIndex: Integer): Integer; virtual; - function GetUnitCount: Integer; virtual; abstract; - function GetUnitOffset(AIndex: Integer): Integer; virtual; - function IsEdgeCategoryTickMarkLabels: Boolean; virtual; abstract; - - procedure CalculateMinMaxValues(out AMinValue, AMaxValue: Extended; - out AHasValuesOutOfRange: Boolean); virtual; - procedure CalculateMinMaxVisualValues(out AMinVisualValue, AMaxVisualValue: Extended); virtual; - function CalculateSumOfValues(AValueIndex: Integer): Variant; virtual; - function CalculateValueStep: Extended; virtual; - function GetValue(ASeriesIndex, AIndex: Integer): Variant; override; - function GetValueDirection(ASeriesIndex, AVisibleValueIndex: Integer): TcxDirection; virtual; - function GetValueOffset(const AValue: Variant): Integer; virtual; - function GetZeroValue: Extended; virtual; - function IsDataInteger: Boolean; - function IsValuePositive(ASeriesIndex, AVisibleValueIndex: Integer): Boolean; virtual; - function NeedsMinMaxValuesOffset: Boolean; virtual; - - procedure AddMark(var AMarks: TcxGridChartHistogramMarks; const AValue: Variant); - - procedure AddCategoryMark(AValue: Integer); - procedure CalculateCategoryMarkPositions; - procedure CalculateCategoryMarkValues; virtual; - - procedure AddValueMark(const AValue: Extended); - procedure CalculateValueMarkPositions; - procedure CalculateValueMarkValues; virtual; - - function CalculateCategoryMarkHeight: Integer; virtual; - function CalculateValueMarkHeight: Integer; virtual; - function CalculatePlotBounds: TRect; virtual; - procedure CalculatePlotOffsets(APlotAreaWidth: Integer; var AOffsets: TRect); virtual; - procedure CalculateValues; virtual; abstract; - function GetCategoryAxisBounds: TRect; virtual; - function GetCategoryAxisPosition: TcxGridChartAxisPosition; virtual; - function GetCategoryGridLineBounds(AIndex: Integer): TRect; virtual; - function GetCategoryMarkBounds(Index: Integer): TRect; virtual; - function GetCategoryTickMarkLabelsBounds: TRect; virtual; - function GetTickMarkLabelsBounds(APosition: TcxGridChartAxisPosition): TRect; virtual; - function GetValueAxisBounds: TRect; virtual; - function GetValueAxisPosition: TcxGridChartAxisPosition; virtual; - //function GetValueBounds(AValueIndex, ASeriesIndex: Integer): TRect; virtual; abstract; - function GetValueGridLineBounds(AIndex: Integer): TRect; virtual; - function GetValueMarkBounds(Index: Integer): TRect; virtual; - function GetValueTickMarkLabelsBounds: TRect; virtual; - - function CustomDrawPlot(ACanvas: TcxCanvas): Boolean; virtual; - function DoCustomDrawPlot(ACanvas: TcxCanvas): Boolean; virtual; - function HasCustomDrawPlot: Boolean; virtual; - - property CategoryMarkHeight: Integer read FCategoryMarkHeight; - property CategoryMarkValues[Index: Integer]: Integer read GetCategoryMarkValue; - property HasValuesOutOfRange: Boolean read FHasValuesOutOfRange; - property IsCategoriesInReverseOrder: Boolean read GetIsCategoriesInReverseOrder; - property IsCategoryAxisHorz: Boolean read GetIsCategoryAxisHorz; - property IsValueAxisVert: Boolean read GetIsValueAxisVert; - property MinValue: Extended read FMinValue; - property MaxValue: Extended read FMaxValue; - property MinVisualValue: Extended read FMinVisualValue; - property MaxVisualValue: Extended read FMaxVisualValue; - property SumOfValues[AValueIndex: Integer]: Variant read GetSumOfValues; - property UnitCount: Integer read GetUnitCount; - property ValueMarkHeight: Integer read FValueMarkHeight; - property ValueMarkValues[Index: Integer]: Extended read GetValueMarkValue; - property ValueStep: Extended read FValueStep; - property ZeroValue: Extended read GetZeroValue; - property ZeroValueOffset: Integer read GetZeroValueOffset; - public - PlotParams: TcxViewParams; - constructor Create(AGridViewInfo: TcxCustomGridViewInfo; ADiagram: TcxGridChartDiagram); override; - destructor Destroy; override; - procedure Calculate(const ABounds: TRect); override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - - property CategoryAxisColor: TColor read GetCategoryAxisColor; - property CategoryAxisBounds: TRect read GetCategoryAxisBounds; - property CategoryAxisPosition: TcxGridChartAxisPosition read GetCategoryAxisPosition; - property CategoryGridLineBounds[AIndex: Integer]: TRect read GetCategoryGridLineBounds; - property CategoryGridLineColor: TColor read GetCategoryGridLineColor; - property CategoryMarkBounds[Index: Integer]: TRect read GetCategoryMarkBounds; - property CategoryTickMarkLabelsViewInfo: TcxGridChartHistogramCategoryTickMarkLabelsViewInfo read FCategoryTickMarkLabelsViewInfo; - property CategoryMarkCount: Integer read GetCategoryMarkCount; - property CategoryMarkPositions[Index: Integer]: Integer read GetCategoryMarkPosition write SetCategoryMarkPosition; - property Diagram: TcxGridChartHistogram read GetDiagram; - property HasCategoryAxis: Boolean read GetHasCategoryAxis; - property HasCategoryGridLines: Boolean read GetHasCategoryGridLines; - property HasValueAxis: Boolean read GetHasValueAxis; - property HasValueGridLines: Boolean read GetHasValueGridLines; - property PlotBounds: TRect read GetPlotBounds; - property ValueAxisBounds: TRect read GetValueAxisBounds; - property ValueAxisColor: TColor read GetValueAxisColor; - property ValueAxisPosition: TcxGridChartAxisPosition read GetValueAxisPosition; - property ValueGridLineBounds[AIndex: Integer]: TRect read GetValueGridLineBounds; - property ValueGridLineColor: TColor read GetValueGridLineColor; - property ValueMarkBounds[Index: Integer]: TRect read GetValueMarkBounds; - property ValueTickMarkLabelsViewInfo: TcxGridChartHistogramValueTickMarkLabelsViewInfo read FValueTickMarkLabelsViewInfo; - property ValueMarkCount: Integer read GetValueMarkCount; - property ValueMarkPositions[Index: Integer]: Integer read GetValueMarkPosition write SetValueMarkPosition; - end; - - // column diagram legend - - TcxGridChartColumnDiagramLegendViewInfo = class(TcxGridChartHistogramLegendViewInfo) - protected - function GetItemsInReverseOrder: Boolean; override; - end; - - // column diagram - - TcxGridChartColumnDiagramValueViewInfo = class(TcxGridChartHistogramValueViewInfo) - private - function GetCaptionPosition: TcxGridChartColumnDiagramValueCaptionPosition; - function GetDiagramViewInfo: TcxGridChartColumnDiagramViewInfo; - protected - function CalculateCaptionBounds: TRect; override; - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function HasCaption: Boolean; override; - function HasCaptionVisualCompensation: Boolean; override; - public - property CaptionPosition: TcxGridChartColumnDiagramValueCaptionPosition read GetCaptionPosition; - property DiagramViewInfo: TcxGridChartColumnDiagramViewInfo read GetDiagramViewInfo; - end; - - TcxGridChartColumnDiagramViewInfo = class(TcxGridChartHistogramViewInfo) - private - function GetDiagram: TcxGridChartColumnDiagram; - protected - function GetPainterClass: TcxCustomGridCellPainterClass; override; - - class function GetValueViewInfoClass: TcxGridChartDiagramValueViewInfoClass; override; - function GetValueViewInfoIndex(ASeriesIndex, AVisibleIndex: Integer): Integer; override; - - function GetCategoryTickMarkLabelOffsetUnits(AIndex: Integer): Integer; override; - function GetCategoryTickMarkOffsetUnits(AIndex: Integer; AValueAxisBetweenCategories: Boolean): Integer; override; - function GetUnitCount: Integer; override; - function GetValueGroupAreaSizeUnits: Integer; virtual; - function GetValueOffsetUnits(AVisibleValueIndex, ASeriesIndex: Integer): Integer; virtual; - function IsEdgeCategoryTickMarkLabels: Boolean; override; - - procedure CalculateValues; override; - function GetValueBounds(AVisibleValueIndex, ASeriesIndex: Integer): TRect; virtual; - public - property Diagram: TcxGridChartColumnDiagram read GetDiagram; - end; - - // line diagram legend - - TcxGridChartLineDiagramLegendItemViewInfo = class(TcxGridChartLegendItemViewInfo) - private - function GetDiagram: TcxGridChartLineDiagram; - function GetLineStyle: TcxGridChartLineStyle; - function GetLineWidth: Integer; - function GetMarkerSize: Integer; - function GetMarkerStyle: TcxGridChartMarkerStyle; - protected - function CalculateHeight: Integer; override; - function CalculateLegendKeyWidth: Integer; override; - procedure CalculateMarkerPoints; virtual; - procedure DoCalculateParams; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetDiagramValueViewInfoClass: TcxGridChartLineDiagramValueViewInfoClass; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetLineColor: TColor; virtual; - function GetLineStart: TPoint; virtual; - function GetLineFinish: TPoint; virtual; - function GetMarkerBounds: TRect; virtual; - property MarkerSize: Integer read GetMarkerSize; - public - MarkerParams: TcxViewParams; - MarkerPoints: TPointArray; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - property Diagram: TcxGridChartLineDiagram read GetDiagram; - property LineColor: TColor read GetLineColor; - property LineStart: TPoint read GetLineStart; - property LineFinish: TPoint read GetLineFinish; - property LineStyle: TcxGridChartLineStyle read GetLineStyle; - property LineWidth: Integer read GetLineWidth; - property MarkerBounds: TRect read GetMarkerBounds; - property MarkerStyle: TcxGridChartMarkerStyle read GetMarkerStyle; - end; - - TcxGridChartLineDiagramLegendViewInfo = class(TcxGridChartHistogramLegendViewInfo) - protected - function GetItemClass: TcxGridChartLegendItemViewInfoClass; override; - public - procedure GetItemLegendKeyMarkerParams(AIndex: Integer; out AParams: TcxViewParams); virtual; - end; - - // line diagram - - TcxGridChartLineDiagramValueViewInfo = class(TcxGridChartHistogramValueViewInfo) - private - FLineStartY: Integer; - FLineFinishY: Integer; - function GetCaptionPosition: TcxGridChartLineDiagramValueCaptionPosition; - function GetDiagram: TcxGridChartLineDiagram; - function GetDiagramViewInfo: TcxGridChartLineDiagramViewInfo; - function GetLineStyle: TcxGridChartLineStyle; - function GetLineWidth: Integer; - function GetMarkerStyle: TcxGridChartMarkerStyle; - protected - function CalculateCaptionBounds: TRect; override; - procedure CalculateMarkerParams(var AParams: TcxViewParams); virtual; - procedure CalculateMarkerPoints; virtual; - procedure DoCalculateParams; override; - function GetCellBoundsForHint: TRect; override; - function GetDesignSelectionBounds: TRect; override; - function GetHotSpotBounds: TRect; virtual; - function GetLineColor: TColor; virtual; - function GetLineHotZoneMinWidth: Integer; virtual; - function GetLineStart: TPoint; virtual; - function GetLineFinish: TPoint; virtual; - function GetMarkerBounds: TRect; virtual; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - class function GetPainterClassEx: TcxGridChartLineDiagramValuePainterClass; virtual; - function GetPosition: TPoint; virtual; - procedure MakeRealBounds(var ABounds: TRect); - function HasBackground: Boolean; override; - function HasCaption: Boolean; override; - - property Diagram: TcxGridChartLineDiagram read GetDiagram; - property HotSpotBounds: TRect read GetHotSpotBounds; - property LineHotZoneMinWidth: Integer read GetLineHotZoneMinWidth; - public - MarkerParams: TcxViewParams; - MarkerPoints: TPointArray; - procedure Calculate(const ABounds: TRect; ALineStartY, ALineFinishY: Integer); virtual; - class procedure CalculateMarkerPointsEx(const ABounds: TRect; - AStyle: TcxGridChartMarkerStyle; var APoints: TPointArray); virtual; - function GetAreaBoundsForPainting: TRect; override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function GetRealBounds: TRect; - function HasPoint(const P: TPoint): Boolean; override; - - property CaptionPosition: TcxGridChartLineDiagramValueCaptionPosition read GetCaptionPosition; - property DiagramViewInfo: TcxGridChartLineDiagramViewInfo read GetDiagramViewInfo; - property LineColor: TColor read GetLineColor; - property LineStart: TPoint read GetLineStart; - property LineFinish: TPoint read GetLineFinish; - property LineStartY: Integer read FLineStartY; - property LineFinishY: Integer read FLineFinishY; - property LineStyle: TcxGridChartLineStyle read GetLineStyle; - property LineWidth: Integer read GetLineWidth; - property MarkerBounds: TRect read GetMarkerBounds; - property MarkerStyle: TcxGridChartMarkerStyle read GetMarkerStyle; - property Position: TPoint read GetPosition; - end; - - TcxGridChartLineDiagramViewInfo = class(TcxGridChartHistogramViewInfo) - private - function GetDiagram: TcxGridChartLineDiagram; - protected - function GetPainterClass: TcxCustomGridCellPainterClass; override; - - class function GetValueViewInfoClass: TcxGridChartDiagramValueViewInfoClass; override; - function GetValueViewInfoIndex(ASeriesIndex, AVisibleIndex: Integer): Integer; override; - - function GetCategoryTickMarkLabelOffsetUnits(AIndex: Integer): Integer; override; - function GetCategoryTickMarkOffsetUnits(AIndex: Integer; AValueAxisBetweenCategories: Boolean): Integer; override; - function GetUnitCount: Integer; override; - function GetValueOffsetUnits(AVisibleValueIndex, ASeriesIndex: Integer): Integer; virtual; - function IsEdgeCategoryTickMarkLabels: Boolean; override; - - function GetValueY(AVisibleValueIndex, ASeriesIndex: Integer): Integer; virtual; - - procedure CalculatePlotOffsets(APlotAreaWidth: Integer; var AOffsets: TRect); override; - procedure CalculateValues; override; - function GetValueBounds(AVisibleValueIndex, ASeriesIndex: Integer): TRect; virtual; - public - property Diagram: TcxGridChartLineDiagram read GetDiagram; - end; - - // area diagram legend - - TcxGridChartAreaDiagramLegendItemViewInfo = class(TcxGridChartLineDiagramLegendItemViewInfo) - protected - function CalculateHeight: Integer; override; - function CalculateLegendKeyHeight: Integer; override; - function CalculateLegendKeyWidth: Integer; override; - function GetLineColor: TColor; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - end; - - TcxGridChartAreaDiagramLegendViewInfo = class(TcxGridChartLineDiagramLegendViewInfo) - protected - function GetItemClass: TcxGridChartLegendItemViewInfoClass; override; - function GetItemsInReverseOrder: Boolean; override; - //function ItemLegendKeyBorderIsValueBorder: Boolean; override; - end; - - // area diagram - - TcxGridChartAreaDiagramValueViewInfo = class(TcxGridChartLineDiagramValueViewInfo) - private - function GetDiagram: TcxGridChartAreaDiagram; - protected - procedure CalculateAreaPoints; virtual; - function CustomDrawBackground(ACanvas: TcxCanvas): Boolean; override; - function GetAreaColor: TColor; virtual; - function GetHotSpotBounds: TRect; override; - function GetLineColor: TColor; override; - function GetLineHotZoneMinWidth: Integer; override; - class function GetPainterClassEx: TcxGridChartLineDiagramValuePainterClass; override; - function GetZeroValueOffset: Integer; virtual; - function HasCustomDrawBackground: Boolean; override; - - property Diagram: TcxGridChartAreaDiagram read GetDiagram; - property ZeroValueOffset: Integer read GetZeroValueOffset; - public - AreaPoints: TPointArray; - procedure Calculate(const ABounds: TRect; ALineStartY, ALineFinishY: Integer); override; - function CreateAreaRegion: TcxRegion; virtual; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - property AreaColor: TColor read GetAreaColor; - end; - - TcxGridChartAreaDiagramViewInfo = class(TcxGridChartLineDiagramViewInfo) - protected - function GetPainterClass: TcxCustomGridCellPainterClass; override; - class function GetValueViewInfoClass: TcxGridChartDiagramValueViewInfoClass; override; - end; - - // pie diagram legend - - TcxGridChartPieDiagramLegendViewInfo = class(TcxGridChartLegendViewInfo) - private - function GetDiagram: TcxGridChartPieDiagram; - protected - function GetItemObjectIndex(AIndex: Integer): Integer; override; - function GetKind: TcxGridChartLegendKind; override; - public - property Diagram: TcxGridChartPieDiagram read GetDiagram; - end; - - // pie diagram - - TcxGridChartPieDiagramValueViewInfo = class(TcxGridChartDiagramValueViewInfo) - private - FStartAngle: Integer; - FFinishAngle: Integer; - function GetCaptionPosition: TcxGridChartPieDiagramValueCaptionPosition; - function GetCenter: TPoint; - function GetDiagramViewInfo: TcxGridChartPieDiagramViewInfo; - function GetRadius: Integer; - protected - function CalculateCaptionBounds: TRect; override; - function CalculateCaptionCenter(AAngle, ACaptionWidth, ACaptionHeight: Integer): TPoint; virtual; - procedure CalculateLeaderLinePoints(AAngle: Integer); virtual; - function GetIsDesignSelected: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function HasBackground: Boolean; override; - function HasCaption: Boolean; override; - procedure MakeCaptionVisible(var ACaptionBounds: TRect; AAngle: Integer); virtual; - public - LeaderLinePoints: TPointArray; - procedure Calculate(const R: TRect; AStartAngle, AFinishAngle: Integer); virtual; - function HasPoint(const P: TPoint): Boolean; override; - - property CaptionPosition: TcxGridChartPieDiagramValueCaptionPosition read GetCaptionPosition; - property Center: TPoint read GetCenter; - property DiagramViewInfo: TcxGridChartPieDiagramViewInfo read GetDiagramViewInfo; - property Radius: Integer read GetRadius; - property StartAngle: Integer read FStartAngle; - property FinishAngle: Integer read FFinishAngle; - end; - - TcxGridChartPieSeriesSiteCaptionViewInfoClass = class of TcxGridChartPieSeriesSiteCaptionViewInfo; - - TcxGridChartPieSeriesSiteCaptionViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FSiteViewInfo: TcxGridChartPieSeriesSiteViewInfo; - protected - function CalculateHeight: Integer; override; - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - function GetAlignmentHorz: TAlignment; override; - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetText: string; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - function HasCustomDraw: Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - public - constructor Create(ASiteViewInfo: TcxGridChartPieSeriesSiteViewInfo); reintroduce; virtual; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - property SiteViewInfo: TcxGridChartPieSeriesSiteViewInfo read FSiteViewInfo; - end; - - TcxGridChartPieSeriesSiteViewInfoClass = class of TcxGridChartPieSeriesSiteViewInfo; - - TcxGridChartPieSeriesSiteViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FCaptionBounds: TRect; - FCaptionViewInfo: TcxGridChartPieSeriesSiteCaptionViewInfo; - FDiagramViewInfo: TcxGridChartPieDiagramViewInfo; - FPieAreaBounds: TRect; - FSeries: TcxGridChartSeries; - function GetDiagram: TcxGridChartPieDiagram; - protected - Angles: array of Integer; - procedure CalculateAngles; virtual; - procedure CalculateCaptionAndPieAreaBounds(var ACaptionBounds, APieAreaBounds: TRect); virtual; - function CalculateContentBounds: TRect; override; - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetCaptionViewInfoClass: TcxGridChartPieSeriesSiteCaptionViewInfoClass; virtual; - function GetDesignSelectionBounds: TRect; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIsDesignSelected: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetValueViewInfo(AVisibleValueIndex: Integer): TcxGridChartPieDiagramValueViewInfo; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - function HasCustomDraw: Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - - property CaptionBounds: TRect read FCaptionBounds; - property Diagram: TcxGridChartPieDiagram read GetDiagram; - public - constructor Create(ADiagramViewInfo: TcxGridChartPieDiagramViewInfo; ASeries: TcxGridChartSeries); reintroduce; virtual; - destructor Destroy; override; - procedure Calculate(const ABounds: TRect); override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function IsPieEmpty: Boolean; virtual; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - procedure Paint(ACanvas: TcxCanvas = nil); override; - property CaptionViewInfo: TcxGridChartPieSeriesSiteCaptionViewInfo read FCaptionViewInfo; - property DiagramViewInfo: TcxGridChartPieDiagramViewInfo read FDiagramViewInfo; - property PieAreaBounds: TRect read FPieAreaBounds; - property Series: TcxGridChartSeries read FSeries; - end; - - TcxGridChartPieDiagramViewInfo = class(TcxGridChartDiagramViewInfo) - private - FPieAreaValueCaptionCompensation: Integer; - FSeriesSiteViewInfos: TList; - function GetCaptionPosition: TcxGridChartPieDiagramValueCaptionPosition; - function GetDiagram: TcxGridChartPieDiagram; - function GetSeriesSiteViewInfo(Index: Integer): TcxGridChartPieSeriesSiteViewInfo; - function GetSeriesSiteViewInfoCount: Integer; - protected - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetSeriesSiteViewInfoClass: TcxGridChartPieSeriesSiteViewInfoClass; virtual; - class function GetValueViewInfoClass: TcxGridChartDiagramValueViewInfoClass; override; - function GetValueViewInfoIndex(ASeriesIndex, AVisibleIndex: Integer): Integer; override; - - function CalculatePieAreaValueCaptionCompensation: Integer; virtual; - function CalculateSeriesSiteViewInfoBounds(AIndex: Integer): TRect; virtual; - function CalculateValueCaptionMaxWidth: Integer; - function CalculateValueCaptionMaxHeight: Integer; - - property CaptionPosition: TcxGridChartPieDiagramValueCaptionPosition read GetCaptionPosition; - property PieAreaValueCaptionCompensation: Integer read FPieAreaValueCaptionCompensation; - public - constructor Create(AGridViewInfo: TcxCustomGridViewInfo; ADiagram: TcxGridChartDiagram); override; - destructor Destroy; override; - procedure Calculate(const ABounds: TRect); override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - property Diagram: TcxGridChartPieDiagram read GetDiagram; - property SeriesSiteViewInfoCount: Integer read GetSeriesSiteViewInfoCount; - property SeriesSiteViewInfos[Index: Integer]: TcxGridChartPieSeriesSiteViewInfo read GetSeriesSiteViewInfo; - end; - - // toolbox - - TcxGridChartToolBoxItemAlignment = TcxGridChartPartPosition; // cppLeft, cppRight only - - TcxGridChartToolBoxItemViewInfoClass = class of TcxGridChartToolBoxItemViewInfo; - - TcxGridChartToolBoxItemViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FAlignment: TcxGridChartToolBoxItemAlignment; - FContainer: TcxGridChartToolBoxViewInfo; - function GetGridView: TcxGridChartView; - protected - procedure GetViewParams(var AParams: TcxViewParams); override; - public - constructor Create(AContainer: TcxGridChartToolBoxViewInfo; - AAlignment: TcxGridChartToolBoxItemAlignment); reintroduce; virtual; - property Alignment: TcxGridChartToolBoxItemAlignment read FAlignment write FAlignment; - property Container: TcxGridChartToolBoxViewInfo read FContainer; - property GridView: TcxGridChartView read GetGridView; - end; - - TcxGridChartToolBoxItemSeparatorViewInfoClass = class of TcxGridChartToolBoxItemSeparatorViewInfo; - - TcxGridChartToolBoxItemSeparatorViewInfo = class(TcxGridChartToolBoxItemViewInfo) - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasBackground: Boolean; override; - end; - - TcxGridChartToolBoxDataLevelActiveValueViewInfoClass = class of TcxGridChartToolBoxDataLevelActiveValueViewInfo; - - TcxGridChartToolBoxDataLevelActiveValueViewInfo = class(TcxCustomGridViewCellViewInfo, - IcxGridChartDataLevelActiveValuePopupOwner) - private - FCanShowDropDownWindow: Boolean; - FContainer: TcxGridChartToolBoxDataLevelInfoViewInfo; - function GetGridView: TcxGridChartView; - protected - { IcxGridChartDataLevelActiveValuePopupOwner } - function GetDataGroup: TcxGridChartDataGroup; - - function CalculateContentBounds: TRect; override; - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - - function DropDownWindowExists: Boolean; override; - function GetDropDownWindow: TcxCustomGridPopup; override; - function GetDropDownWindowOwnerBounds: TRect; override; - public - constructor Create(AContainer: TcxGridChartToolBoxDataLevelInfoViewInfo); reintroduce; virtual; - property CanShowDropDownWindow: Boolean read FCanShowDropDownWindow; - property Container: TcxGridChartToolBoxDataLevelInfoViewInfo read FContainer; - property GridView: TcxGridChartView read GetGridView; - end; - - TcxGridChartToolBoxDataLevelInfoViewInfoClass = class of TcxGridChartToolBoxDataLevelInfoViewInfo; - - TcxGridChartToolBoxDataLevelInfoViewInfo = class(TcxGridChartToolBoxItemViewInfo) - private - FActiveValueViewInfo: TcxGridChartToolBoxDataLevelActiveValueViewInfo; - FDataLevel: Integer; - function GetActive: Boolean; - function GetDataLevelObject: TcxGridChartDataGroup; - protected - function CalculateActiveValueViewInfoBounds: TRect; virtual; - function CalculateContentBounds: TRect; override; - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetActiveValueViewInfoClass: TcxGridChartToolBoxDataLevelActiveValueViewInfoClass; virtual; - function GetAlignmentHorz: TAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetDesignObject: TPersistent; virtual; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIsDesignSelected: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasActiveValue: Boolean; virtual; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - public - constructor Create(AContainer: TcxGridChartToolBoxViewInfo; - AAlignment: TcxGridChartToolBoxItemAlignment; ADataLevel: Integer); reintroduce; virtual; - destructor Destroy; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - procedure Paint(ACanvas: TcxCanvas = nil); override; - property Active: Boolean read GetActive; - property ActiveValueViewInfo: TcxGridChartToolBoxDataLevelActiveValueViewInfo read FActiveValueViewInfo; - property DataLevel: Integer read FDataLevel; - property DataLevelObject: TcxGridChartDataGroup read GetDataLevelObject; - end; - - TcxGridChartToolBoxCustomizeButtonViewInfoClass = class of TcxGridChartToolBoxCustomizeButtonViewInfo; - - TcxGridChartToolBoxCustomizeButtonViewInfo = class(TcxGridChartToolBoxItemViewInfo) - private - function GetChecked: Boolean; - procedure SetChecked(Value: Boolean); - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function CaptureMouseOnPress: Boolean; override; - procedure Click; override; - function GetActualState: TcxGridCellState; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - function HasBackground: Boolean; override; - property Checked: Boolean read GetChecked write SetChecked; - end; - - TcxGridChartToolBoxDiagramSelectorViewInfoClass = class of TcxGridChartToolBoxDiagramSelectorViewInfo; - - TcxGridChartToolBoxDiagramSelectorViewInfo = class(TcxGridChartToolBoxItemViewInfo) - private - FCanShowDropDownWindow: Boolean; - function GetDropDownWindowValue: TcxGridChartDiagramSelectorPopup; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetImageBounds: TRect; virtual; - function GetImageHeight: Integer; virtual; - function GetImageIndex: Integer; virtual; - function GetImageWidth: Integer; virtual; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasBackground: Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - - function CalculateCanShowDropDownWindow: Boolean; virtual; - function DropDownWindowExists: Boolean; override; - function GetDropDownWindow: TcxCustomGridPopup; override; - function GetDropDownWindowOwnerBounds: TRect; override; - property DropDownWindow: TcxGridChartDiagramSelectorPopup read GetDropDownWindowValue; - - property ImageWidth: Integer read GetImageWidth; - property ImageHeight: Integer read GetImageHeight; - public - constructor Create(AContainer: TcxGridChartToolBoxViewInfo; - AAlignment: TcxGridChartToolBoxItemAlignment); override; - property CanShowDropDownWindow: Boolean read FCanShowDropDownWindow; - property ImageBounds: TRect read GetImageBounds; - property ImageIndex: Integer read GetImageIndex; - end; - - TcxGridChartToolBoxViewInfoClass = class of TcxGridChartToolBoxViewInfo; - - TcxGridChartToolBoxViewInfo = class(TcxCustomGridChartPartViewInfo) - private - FCustomizeButton: TcxGridChartToolBoxCustomizeButtonViewInfo; - FDataLevelInfos: TList; - FDiagramSelector: TcxGridChartToolBoxDiagramSelectorViewInfo; - FItems: TList; - function GetCount: Integer; - function GetDataLevelInfoConnectorCount: Integer; - function GetDataLevelInfo(AIndex: Integer): TcxGridChartToolBoxDataLevelInfoViewInfo; - function GetDataLevelInfoCount: Integer; - function GetItem(AIndex: Integer): TcxGridChartToolBoxItemViewInfo; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function CalculateContentBounds: TRect; override; - procedure CalculateItems; virtual; - function GetAlignment: TcxGridChartPartAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetBorders: TcxBorders; override; - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetDataGroupInsertionAreaBounds: TRect; virtual; - function GetDataLevelInfoConnector(AIndex: Integer): TRect; virtual; - function GetDataLevelInfoConnectorColor: TColor; virtual; - function GetFirstSeparator: TcxGridChartToolBoxItemViewInfo; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetItemsAreaBounds: TRect; virtual; - function GetOrientation: TcxGridChartPartOrientation; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetPosition: TcxGridChartPartPosition; override; - function GetText: string; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - - function AddItem(AItem: TcxGridChartToolBoxItemViewInfo): TcxGridChartToolBoxItemViewInfo; - procedure AddSeparator(AAlignment: TcxGridChartToolBoxItemAlignment); - procedure CreateItems; virtual; - function GetCustomizeButtonClass: TcxGridChartToolBoxCustomizeButtonViewInfoClass; virtual; - function GetDataLevelInfoClass: TcxGridChartToolBoxDataLevelInfoViewInfoClass; virtual; - function GetDiagramSelectorClass: TcxGridChartToolBoxDiagramSelectorViewInfoClass; virtual; - function GetItemSeparatorClass: TcxGridChartToolBoxItemSeparatorViewInfoClass; virtual; - function IsCustomizeButtonVisible: Boolean; virtual; - function IsDataLevelsInfoVisible: Boolean; virtual; - function IsDiagramSelectorVisible: Boolean; virtual; - function IsSeparator(AItem: TcxGridChartToolBoxItemViewInfo): Boolean; - - property ItemsAreaBounds: TRect read GetItemsAreaBounds; - public - constructor Create(AGridViewInfo: TcxCustomGridViewInfo); override; - destructor Destroy; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function GetDataGroupInsertionBounds(AIndex: Integer): TRect; virtual; - function GetDataGroupInsertionIndex(const P: TPoint): Integer; virtual; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - procedure InvalidateCustomizeButton; - property Count: Integer read GetCount; - property CustomizeButton: TcxGridChartToolBoxCustomizeButtonViewInfo read FCustomizeButton; - property DataLevelInfoConnectorColor: TColor read GetDataLevelInfoConnectorColor; - property DataLevelInfoConnectorCount: Integer read GetDataLevelInfoConnectorCount; - property DataLevelInfoConnectors[AIndex: Integer]: TRect read GetDataLevelInfoConnector; - property DataLevelInfoCount: Integer read GetDataLevelInfoCount; - property DataLevelInfos[AIndex: Integer]: TcxGridChartToolBoxDataLevelInfoViewInfo read GetDataLevelInfo; - property DiagramSelector: TcxGridChartToolBoxDiagramSelectorViewInfo read FDiagramSelector; - property Items[AIndex: Integer]: TcxGridChartToolBoxItemViewInfo read GetItem; - end; - - // view - - TcxGridChartTitleViewInfoClass = class of TcxGridChartTitleViewInfo; - - TcxGridChartTitleViewInfo = class(TcxCustomGridChartTitleViewInfo) - protected - function GetHitTestClass: TcxCustomGridHitTestClass; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - end; - - TcxGridChartViewInfo = class(TcxCustomGridViewInfo) - private - FDiagramViewInfo: TcxGridChartDiagramViewInfo; - FIsImage: Boolean; - FLegendViewInfo: TcxGridChartLegendViewInfo; - FTitleViewInfo: TcxGridChartTitleViewInfo; - FToolBoxViewInfo: TcxGridChartToolBoxViewInfo; - function GetGridView: TcxGridChartView; - protected - procedure CreateViewInfos; override; - procedure DestroyViewInfos(AIsRecreating: Boolean); override; - - function GetTitleViewInfoClass: TcxGridChartTitleViewInfoClass; virtual; - function GetToolBoxViewInfoClass: TcxGridChartToolBoxViewInfoClass; virtual; - - procedure Calculate; override; - function CalculateClientBounds: TRect; override; - procedure CalculateHeight(const AMaxSize: TPoint; var AHeight: Integer; - var AFullyVisible: Boolean); override; - procedure CalculatePartBounds(APart: TcxCustomGridChartPartViewInfo; - var ABounds, APartBounds: TRect); virtual; - procedure CalculatePartsBounds(out ADiagramBounds, ALegendBounds, ATitleBounds, - AToolBoxBounds: TRect); virtual; - function DoGetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - - property IsImage: Boolean read FIsImage write FIsImage; - public - property DiagramViewInfo: TcxGridChartDiagramViewInfo read FDiagramViewInfo; - property GridView: TcxGridChartView read GetGridView; - property LegendViewInfo: TcxGridChartLegendViewInfo read FLegendViewInfo; - property TitleViewInfo: TcxGridChartTitleViewInfo read FTitleViewInfo; - property ToolBoxViewInfo: TcxGridChartToolBoxViewInfo read FToolBoxViewInfo; - end; - - { view } - - // custom title - - TcxCustomGridChartTitle = class(TcxCustomGridOptions) - private - FAlignment: TcxGridChartPartAlignment; - FPosition: TcxGridChartPartPosition; - FText: string; - procedure SetAlignment(Value: TcxGridChartPartAlignment); - procedure SetPosition(Value: TcxGridChartPartPosition); - procedure SetText(Value: string); - protected - procedure GetStoredProperties(AProperties: TStrings); override; - procedure GetStoredPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetStoredPropertyValue(const AName: string; const AValue: Variant); override; - - function GetDefaultAlignment: TcxGridChartPartAlignment; virtual; - function GetDefaultOrientation: TcxGridChartPartOrientation; virtual; - function GetDefaultPosition: TcxGridChartPartPosition; virtual; abstract; - function GetDefaultText: string; virtual; - - property Position: TcxGridChartPartPosition read FPosition write SetPosition default cppDefault; - public - procedure Assign(Source: TPersistent); override; - function GetAlignment: TcxGridChartPartAlignment; - function GetOrientation: TcxGridChartPartOrientation; - function GetPosition: TcxGridChartPartPosition; - function GetText: string; - published - property Alignment: TcxGridChartPartAlignment read FAlignment write SetAlignment default cpaDefault; - property Text: string read FText write SetText; - end; - - // legend - - TcxGridChartLegendBorder = (lbDefault, lbNone, lbSingle); - - TcxGridChartLegendClass = class of TcxGridChartLegend; - - TcxGridChartLegend = class(TcxCustomGridOptions) - private - FAlignment: TcxGridChartPartAlignment; - FBorder: TcxGridChartLegendBorder; - FKeyBorder: TcxGridChartLegendBorder; - FOrientation: TcxGridChartPartOrientation; - FParent: TcxGridChartLegend; - FPosition: TcxGridChartPartPosition; - procedure SetAlignment(Value: TcxGridChartPartAlignment); - procedure SetBorder(Value: TcxGridChartLegendBorder); - procedure SetKeyBorder(Value: TcxGridChartLegendBorder); - procedure SetOrientation(Value: TcxGridChartPartOrientation); - procedure SetPosition(Value: TcxGridChartPartPosition); - protected - procedure GetStoredProperties(AProperties: TStrings); override; - procedure GetStoredPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetStoredPropertyValue(const AName: string; const AValue: Variant); override; - - function GetDefaultAlignment: TcxGridChartPartAlignment; virtual; - function GetDefaultBorder: TcxGridChartLegendBorder; virtual; - function GetDefaultKeyBorder: TcxGridChartLegendBorder; virtual; - function GetDefaultOrientation(APosition: TcxGridChartPartPosition): TcxGridChartPartOrientation; virtual; - function GetDefaultPosition: TcxGridChartPartPosition; virtual; - property Parent: TcxGridChartLegend read FParent write FParent; - public - procedure Assign(Source: TPersistent); override; - function GetAlignment: TcxGridChartPartAlignment; - function GetBorder: TcxGridChartLegendBorder; - function GetKeyBorder: TcxGridChartLegendBorder; - function GetOrientation(APosition: TcxGridChartPartPosition = cppDefault): TcxGridChartPartOrientation; - function GetPosition: TcxGridChartPartPosition; - published - property Alignment: TcxGridChartPartAlignment read FAlignment write SetAlignment default cpaDefault; - property Border: TcxGridChartLegendBorder read FBorder write SetBorder default lbDefault; - property KeyBorder: TcxGridChartLegendBorder read FKeyBorder write SetKeyBorder default lbDefault; - property Orientation: TcxGridChartPartOrientation read FOrientation - write SetOrientation default cpoDefault; - property Position: TcxGridChartPartPosition read FPosition write SetPosition default cppDefault; - end; - - // diagram - - TcxGridDiagramChange = (dcProperty, dcLayout, dcSize); - - TcxCustomGridChartDiagramOptions = class(TPersistent) - private - FDiagram: TcxGridChartDiagram; - function GetGridView: TcxGridChartView; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - protected - procedure Changed(AChange: TcxGridDiagramChange = dcLayout); virtual; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - public - constructor Create(ADiagram: TcxGridChartDiagram); virtual; - procedure Assign(Source: TPersistent); override; - property Diagram: TcxGridChartDiagram read FDiagram; - property GridView: TcxGridChartView read GetGridView; - end; - - TcxGridChartDiagramStylesClass = class of TcxGridChartDiagramStyles; - - TcxGridChartDiagramStyles = class(TcxCustomGridStyles) - private - function GetDiagram: TcxGridChartDiagram; - function GetGridViewValue: TcxGridChartView; - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - function GetGridView: TcxCustomGridView; override; - function GetVaryColorsByCategory: Boolean; virtual; abstract; - public - constructor Create(AOwner: TPersistent); override; - procedure GetBackgroundParams(out AParams: TcxViewParams); virtual; - procedure GetValueParams(AVisibleSeriesIndex, AValueIndex: Integer; - out AParams: TcxViewParams); virtual; - procedure Assign(Source: TPersistent); override; - property Diagram: TcxGridChartDiagram read GetDiagram; - property GridView: TcxGridChartView read GetGridViewValue; - published - property Legend: TcxStyle index dsLegend read GetValue write SetValue; - property ValueCaptions: TcxStyle index dsValueCaptions read GetValue write SetValue; - property Values: TcxStyle index dsValues read GetValue write SetValue; - end; - - TcxGridChartDiagramLegendCustomDrawEvent = procedure(Sender: TcxGridChartDiagram; - ACanvas: TcxCanvas; AViewInfo: TcxGridChartLegendViewInfo; var ADone: Boolean) of object; - TcxGridChartDiagramLegendItemCustomDrawEvent = procedure(Sender: TcxGridChartDiagram; - ACanvas: TcxCanvas; AViewInfo: TcxGridChartLegendItemViewInfo; var ADone: Boolean) of object; - TcxGridChartDiagramValueCustomDrawEvent = procedure(Sender: TcxGridChartDiagram; - ACanvas: TcxCanvas; AViewInfo: TcxGridChartDiagramValueViewInfo; var ADone: Boolean) of object; - - TcxGridChartDiagramClass = class of TcxGridChartDiagram; - - TcxGridChartDiagram = class(TPersistent) - private - FEnabled: Boolean; - FGridView: TcxGridChartView; - FLegend: TcxGridChartLegend; - FStyles: TcxGridChartDiagramStyles; - FOnCustomDrawLegend: TcxGridChartDiagramLegendCustomDrawEvent; - FOnCustomDrawLegendItem: TcxGridChartDiagramLegendItemCustomDrawEvent; - FOnCustomDrawValue: TcxGridChartDiagramValueCustomDrawEvent; - function GetActive: Boolean; - function GetID: string; - procedure SetActive(Value: Boolean); - procedure SetEnabled(Value: Boolean); - procedure SetLegend(Value: TcxGridChartLegend); - procedure SetStyles(Value: TcxGridChartDiagramStyles); - procedure SetOnCustomDrawLegend(Value: TcxGridChartDiagramLegendCustomDrawEvent); - procedure SetOnCustomDrawLegendItem(Value: TcxGridChartDiagramLegendItemCustomDrawEvent); - procedure SetOnCustomDrawValue(Value: TcxGridChartDiagramValueCustomDrawEvent); - protected - FSubClassEvents: TNotifyEvent; - function GetOwner: TPersistent; override; - - procedure CreateSubObjects(AGridView: TcxGridChartView); virtual; - procedure DestroySubObjects; virtual; - procedure SetGridView(Value: TcxGridChartView); - - function GetStylesClass: TcxGridChartDiagramStylesClass; virtual; - - function GetLegendViewInfoClass: TcxGridChartLegendViewInfoClass; virtual; abstract; - function GetViewInfoClass: TcxGridChartDiagramViewInfoClass; virtual; abstract; - - procedure Changed(AChange: TcxGridDiagramChange = dcLayout); virtual; - function GetDisplayText: string; virtual; - function GetImageIndex: Integer; virtual; - function HorizontalPaging: Boolean; virtual; - function PagingInOppositeDirection: Boolean; virtual; - function SupportsPaging: Boolean; virtual; - function SupportsValueHotTrack: Boolean; virtual; - - procedure DoCustomDrawLegend(ACanvas: TcxCanvas; AViewInfo: TcxGridChartLegendViewInfo; - var ADone: Boolean); virtual; - procedure DoCustomDrawLegendItem(ACanvas: TcxCanvas; AViewInfo: TcxGridChartLegendItemViewInfo; - var ADone: Boolean); virtual; - procedure DoCustomDrawValue(ACanvas: TcxCanvas; AViewInfo: TcxGridChartDiagramValueViewInfo; - var ADone: Boolean); virtual; - function HasCustomDrawLegend: Boolean; virtual; - function HasCustomDrawLegendItem: Boolean; virtual; - function HasCustomDrawValue: Boolean; virtual; - - property ImageIndex: Integer read GetImageIndex; - property Styles: TcxGridChartDiagramStyles read FStyles write SetStyles; - public - constructor Create(AGridView: TcxGridChartView); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function GetNamePath: string; override; - function GetValueCaption(ASeries: TcxGridChartSeries; AValueIndex: Integer): string; virtual; - function IsAvailable: Boolean; virtual; - property DisplayText: string read GetDisplayText; - property GridView: TcxGridChartView read FGridView; - property ID: string read GetID; - published - property Active: Boolean read GetActive write SetActive default False; - property Enabled: Boolean read FEnabled write SetEnabled default True; - property Legend: TcxGridChartLegend read FLegend write SetLegend; - property OnCustomDrawLegend: TcxGridChartDiagramLegendCustomDrawEvent read FOnCustomDrawLegend - write SetOnCustomDrawLegend; - property OnCustomDrawLegendItem: TcxGridChartDiagramLegendItemCustomDrawEvent - read FOnCustomDrawLegendItem write SetOnCustomDrawLegendItem; - property OnCustomDrawValue: TcxGridChartDiagramValueCustomDrawEvent read FOnCustomDrawValue - write SetOnCustomDrawValue; - end; - - // histogram - - TcxGridChartHistogramAxisTitleClass = class of TcxGridChartHistogramAxisTitle; - - TcxGridChartHistogramAxisTitle = class(TcxCustomGridChartTitle) - private - FAxis: TcxGridChartHistogramAxis; - protected - function GetDefaultPosition: TcxGridChartPartPosition; override; - function GetDefaultText: string; override; - function GetGridViewValue: TcxCustomGridView; override; - public - constructor Create(AAxis: TcxGridChartHistogramAxis); reintroduce; virtual; - property Axis: TcxGridChartHistogramAxis read FAxis; - end; - - TcxGridChartHistogramTickMarkKind = (tmkNone, tmkCross, tmkInside, tmkOutside); - - TcxGridChartHistogramAxis = class(TcxCustomGridChartDiagramOptions) - private - FGridLines: Boolean; - FTickMarkKind: TcxGridChartHistogramTickMarkKind; - FTickMarkLabels: Boolean; - FTitle: TcxGridChartHistogramAxisTitle; - FVisible: Boolean; - function GetDiagram: TcxGridChartHistogram; - procedure SetGridLines(Value: Boolean); - procedure SetTickMarkKind(Value: TcxGridChartHistogramTickMarkKind); - procedure SetTickMarkLabels(Value: Boolean); - procedure SetTitle(Value: TcxGridChartHistogramAxisTitle); - procedure SetVisible(Value: Boolean); - protected - function GetTitleClass: TcxGridChartHistogramAxisTitleClass; virtual; - function GetTitleDefaultText: string; virtual; - public - constructor Create(ADiagram: TcxGridChartDiagram); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function GetPosition: TcxGridChartAxisPosition; virtual; abstract; - property Diagram: TcxGridChartHistogram read GetDiagram; - published - property GridLines: Boolean read FGridLines write SetGridLines default True; - property TickMarkKind: TcxGridChartHistogramTickMarkKind read FTickMarkKind - write SetTickMarkKind default tmkOutside; - property TickMarkLabels: Boolean read FTickMarkLabels write SetTickMarkLabels default True; - property Title: TcxGridChartHistogramAxisTitle read FTitle write SetTitle; - property Visible: Boolean read FVisible write SetVisible default True; - end; - - TcxGridChartHistogramAxisCategoryClass = class of TcxGridChartHistogramAxisCategory; - - TcxGridChartHistogramAxisCategory = class(TcxGridChartHistogramAxis) - private - FCategoriesInReverseOrder: Boolean; - FValueAxisAtMaxCategory: Boolean; - FValueAxisBetweenCategories: Boolean; - procedure SetCategoriesInReverseOrder(Value: Boolean); - procedure SetValueAxisAtMaxCategory(Value: Boolean); - procedure SetValueAxisBetweenCategories(Value: Boolean); - protected - function GetDefaultValueAxisBetweenCategories: Boolean; virtual; - function GetTitleDefaultText: string; override; - public - constructor Create(ADiagram: TcxGridChartDiagram); override; - procedure Assign(Source: TPersistent); override; - function GetPosition: TcxGridChartAxisPosition; override; - published - property CategoriesInReverseOrder: Boolean read FCategoriesInReverseOrder - write SetCategoriesInReverseOrder default False; - property ValueAxisAtMaxCategory: Boolean read FValueAxisAtMaxCategory - write SetValueAxisAtMaxCategory default False; - property ValueAxisBetweenCategories: Boolean read FValueAxisBetweenCategories - write SetValueAxisBetweenCategories default True; - end; - - TcxGridChartHistogramMinMaxValues = (mmvZeroBasedAuto, mmvAuto, mmvCustom); - - TcxGridChartHistogramAxisValueClass = class of TcxGridChartHistogramAxisValue; - - TcxGridChartHistogramAxisValue = class(TcxGridChartHistogramAxis) - private - FMaxValue: Extended; - FMinMaxValues: TcxGridChartHistogramMinMaxValues; - FMinValue: Extended; - FTickMarkLabelFormat: string; - procedure SetMaxValue(const Value: Extended); - procedure SetMinMaxValues(Value: TcxGridChartHistogramMinMaxValues); - procedure SetMinValue(const Value: Extended); - procedure SetTickMarkLabelFormat(const Value: string); - protected - function GetTitleDefaultText: string; override; - public - procedure Assign(Source: TPersistent); override; - function GetPosition: TcxGridChartAxisPosition; override; - function GetTickMarkLabel(const ATickMarkValue: Variant): string; virtual; - function GetTickMarkLabelFormat(AConsiderSeriesFormat: Boolean): string; virtual; - published - property MinMaxValues: TcxGridChartHistogramMinMaxValues read FMinMaxValues - write SetMinMaxValues default mmvZeroBasedAuto; - property MinValue: Extended read FMinValue write SetMinValue; - property MaxValue: Extended read FMaxValue write SetMaxValue; - property TickMarkLabelFormat: string read FTickMarkLabelFormat write SetTickMarkLabelFormat; - end; - - TcxGridChartHistogramStyles = class(TcxGridChartDiagramStyles) - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - function GetVaryColorsByCategory: Boolean; override; - public - procedure Assign(Source: TPersistent); override; - published - property Axis: TcxStyle index dsAxis read GetValue write SetValue; - property AxisTitle: TcxStyle index dsAxisTitle read GetValue write SetValue; - property CategoryAxis: TcxStyle index dsCategoryAxis read GetValue write SetValue; - property CategoryAxisTitle: TcxStyle index dsCategoryAxisTitle read GetValue write SetValue; - property CategoryGridLines: TcxStyle index dsCategoryGridLines read GetValue write SetValue; - property GridLines: TcxStyle index dsGridLines read GetValue write SetValue; - property Plot: TcxStyle index dsPlot read GetValue write SetValue; - property ValueAxis: TcxStyle index dsValueAxis read GetValue write SetValue; - property ValueAxisTitle: TcxStyle index dsValueAxisTitle read GetValue write SetValue; - property ValueGridLines: TcxStyle index dsValueGridLines read GetValue write SetValue; - end; - - TcxGridChartValuesStacking = (vsNone, vsNormal, vs100Percent); - - TcxGridChartHistogramValuesClass = class of TcxGridChartHistogramValues; - - TcxGridChartHistogramValues = class(TcxCustomGridChartDiagramOptions) - private - FStacking: TcxGridChartValuesStacking; - FVaryColorsByCategory: Boolean; - procedure SetStacking(Value: TcxGridChartValuesStacking); - procedure SetVaryColorsByCategory(Value: Boolean); - protected - property Stacking: TcxGridChartValuesStacking read FStacking write SetStacking default vsNone; - public - procedure Assign(Source: TPersistent); override; - function GetVaryColorsByCategory: Boolean; virtual; - published - property VaryColorsByCategory: Boolean read FVaryColorsByCategory write SetVaryColorsByCategory default False; - end; - - TcxGridChartHistogramPlotCustomDrawEvent = procedure(Sender: TcxGridChartHistogram; - ACanvas: TcxCanvas; AViewInfo: TcxGridChartHistogramViewInfo; - const ABounds: TRect; var ADone: Boolean) of object; - - TcxGridChartHistogram = class(TcxGridChartDiagram) - private - FAxisCategory: TcxGridChartHistogramAxisCategory; - FAxisValue: TcxGridChartHistogramAxisValue; - FValues: TcxGridChartHistogramValues; - FOnCustomDrawPlot: TcxGridChartHistogramPlotCustomDrawEvent; - function GetStyles: TcxGridChartHistogramStyles; - procedure SetAxisCategory(Value: TcxGridChartHistogramAxisCategory); - procedure SetAxisValue(Value: TcxGridChartHistogramAxisValue); - procedure SetStyles(Value: TcxGridChartHistogramStyles); - procedure SetValues(Value: TcxGridChartHistogramValues); - procedure SetOnCustomDrawPlot(Value: TcxGridChartHistogramPlotCustomDrawEvent); - protected - procedure CreateSubObjects(AGridView: TcxGridChartView); override; - procedure DestroySubObjects; override; - - function GetAxisCategoryClass: TcxGridChartHistogramAxisCategoryClass; virtual; - function GetAxisValueClass: TcxGridChartHistogramAxisValueClass; virtual; - function GetStylesClass: TcxGridChartDiagramStylesClass; override; - function GetValuesClass: TcxGridChartHistogramValuesClass; virtual; - - function GetLegendViewInfoClass: TcxGridChartLegendViewInfoClass; override; - - function PagingInOppositeDirection: Boolean; override; - function SupportsPaging: Boolean; override; - - procedure DoCustomDrawPlot(ACanvas: TcxCanvas; AViewInfo: TcxGridChartHistogramViewInfo; - const ABounds: TRect; var ADone: Boolean); virtual; - function HasCustomDrawPlot: Boolean; virtual; - public - procedure Assign(Source: TPersistent); override; - function GetCategoryAxisPosition: TcxGridChartAxisPosition; virtual; - function GetValueAxisPosition: TcxGridChartAxisPosition; virtual; - - property AxisCategory: TcxGridChartHistogramAxisCategory read FAxisCategory write SetAxisCategory; - property AxisValue: TcxGridChartHistogramAxisValue read FAxisValue write SetAxisValue; - property Styles: TcxGridChartHistogramStyles read GetStyles write SetStyles; - property Values: TcxGridChartHistogramValues read FValues write SetValues; - property ValuesEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - published - property OnCustomDrawPlot: TcxGridChartHistogramPlotCustomDrawEvent read FOnCustomDrawPlot - write SetOnCustomDrawPlot; - end; - - // column diagram - - TcxGridChartColumnDiagramValues = class(TcxGridChartHistogramValues) - private - FBorderWidth: Integer; - FCaptionPosition: TcxGridChartColumnDiagramValueCaptionPosition; - procedure SetBorderWidth(Value: Integer); - procedure SetCaptionPosition(Value: TcxGridChartColumnDiagramValueCaptionPosition); - public - constructor Create(ADiagram: TcxGridChartDiagram); override; - procedure Assign(Source: TPersistent); override; - published - property BorderWidth: Integer read FBorderWidth write SetBorderWidth default cxGridChartColumnDiagramDefaultBorderWidth; - property CaptionPosition: TcxGridChartColumnDiagramValueCaptionPosition read FCaptionPosition - write SetCaptionPosition default cdvcpNone; - end; - - TcxGridChartColumnDiagramClass = class of TcxGridChartColumnDiagram; - - TcxGridChartColumnDiagram = class(TcxGridChartHistogram) - private - function GetValues: TcxGridChartColumnDiagramValues; - procedure SetValues(Value: TcxGridChartColumnDiagramValues); - protected - function GetLegendViewInfoClass: TcxGridChartLegendViewInfoClass; override; - function GetValuesClass: TcxGridChartHistogramValuesClass; override; - function GetViewInfoClass: TcxGridChartDiagramViewInfoClass; override; - - function GetDisplayText: string; override; - function GetImageIndex: Integer; override; - published - property AxisCategory; - property AxisValue; - property Styles; - property Values: TcxGridChartColumnDiagramValues read GetValues write SetValues; - end; - - // bar diagram - - TcxGridChartBarDiagramClass = class of TcxGridChartBarDiagram; - - TcxGridChartBarDiagram = class(TcxGridChartColumnDiagram) - protected - function GetDisplayText: string; override; - function GetImageIndex: Integer; override; - - function HorizontalPaging: Boolean; override; - function PagingInOppositeDirection: Boolean; override; - public - function GetCategoryAxisPosition: TcxGridChartAxisPosition; override; - function GetValueAxisPosition: TcxGridChartAxisPosition; override; - end; - - // line diagram - - TcxGridChartLineDiagramAxisCategory = class(TcxGridChartHistogramAxisCategory) - protected - function GetDefaultValueAxisBetweenCategories: Boolean; override; - published - property ValueAxisBetweenCategories default False; - end; - - TcxGridChartLineDiagramStyles = class(TcxGridChartHistogramStyles) - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - function ValueMarkerHasBorderByDefault: Boolean; virtual; - public - procedure Assign(Source: TPersistent); override; - procedure GetValueMarkerParams(AVisibleSeriesIndex, AValueIndex: Integer; - out AParams: TcxViewParams); virtual; - published - property ValueMarkers: TcxStyle index dsValueMarkers read GetValue write SetValue; - end; - - TcxGridChartLineDiagramGetLineStyleEvent = procedure(Sender: TcxGridChartLineDiagram; - ASeries: TcxGridChartSeries; var AStyle: TcxGridChartLineStyle) of object; - TcxGridChartLineDiagramGetMarkerStyleEvent = procedure(Sender: TcxGridChartLineDiagram; - ASeries: TcxGridChartSeries; var AStyle: TcxGridChartMarkerStyle) of object; - - TcxGridChartLineDiagramValues = class(TcxGridChartHistogramValues) - private - FCaptionPosition: TcxGridChartLineDiagramValueCaptionPosition; - FHotSpotSize: Integer; - FLineStyle: TcxGridChartLineStyle; - FLineWidth: Integer; - FMarkerSize: Integer; - FMarkerStyle: TcxGridChartMarkerStyle; - FOnGetLineStyle: TcxGridChartLineDiagramGetLineStyleEvent; - FOnGetMarkerStyle: TcxGridChartLineDiagramGetMarkerStyleEvent; - function GetDiagram: TcxGridChartLineDiagram; - procedure SetCaptionPosition(Value: TcxGridChartLineDiagramValueCaptionPosition); - procedure SetHotSpotSize(Value: Integer); - procedure SetLineStyle(Value: TcxGridChartLineStyle); - procedure SetLineWidth(Value: Integer); - procedure SetMarkerSize(Value: Integer); - procedure SetMarkerStyle(Value: TcxGridChartMarkerStyle); - procedure SetOnGetLineStyle(Value: TcxGridChartLineDiagramGetLineStyleEvent); - procedure SetOnGetMarkerStyle(Value: TcxGridChartLineDiagramGetMarkerStyleEvent); - protected - procedure DoGetLineStyle(ASeries: TcxGridChartSeries; var AStyle: TcxGridChartLineStyle); virtual; - procedure DoGetMarkerStyle(ASeries: TcxGridChartSeries; var AStyle: TcxGridChartMarkerStyle); virtual; - public - constructor Create(ADiagram: TcxGridChartDiagram); override; - procedure Assign(Source: TPersistent); override; - function GetHotSpotSize: Integer; virtual; - function GetLineStyle(ASeries: TcxGridChartSeries): TcxGridChartLineStyle; virtual; - function GetMarkerStyle(ASeries: TcxGridChartSeries): TcxGridChartMarkerStyle; virtual; - property Diagram: TcxGridChartLineDiagram read GetDiagram; - published - property CaptionPosition: TcxGridChartLineDiagramValueCaptionPosition read FCaptionPosition - write SetCaptionPosition default ldvcpNone; - property HotSpotSize: Integer read FHotSpotSize write SetHotSpotSize default cxGridChartLineDiagramDefaultHotSpotSize; - property LineStyle: TcxGridChartLineStyle read FLineStyle write SetLineStyle default clsSolid; - property LineWidth: Integer read FLineWidth write SetLineWidth default cxGridChartLineDiagramDefaultLineWidth; - property MarkerSize: Integer read FMarkerSize write SetMarkerSize default cxGridChartLineDiagramDefaultMarkerSize; - property MarkerStyle: TcxGridChartMarkerStyle read FMarkerStyle write SetMarkerStyle default cmsNone; - property Stacking; - property OnGetLineStyle: TcxGridChartLineDiagramGetLineStyleEvent read FOnGetLineStyle write SetOnGetLineStyle; - property OnGetMarkerStyle: TcxGridChartLineDiagramGetMarkerStyleEvent read FOnGetMarkerStyle write SetOnGetMarkerStyle; - end; - - TcxGridChartLineDiagramClass = class of TcxGridChartLineDiagram; - - TcxGridChartLineDiagram = class(TcxGridChartHistogram) - private - function GetAxisCategory: TcxGridChartLineDiagramAxisCategory; - function GetStyles: TcxGridChartLineDiagramStyles; - function GetValues: TcxGridChartLineDiagramValues; - procedure SetAxisCategory(Value: TcxGridChartLineDiagramAxisCategory); - procedure SetStyles(Value: TcxGridChartLineDiagramStyles); - procedure SetValues(Value: TcxGridChartLineDiagramValues); - protected - function GetAxisCategoryClass: TcxGridChartHistogramAxisCategoryClass; override; - function GetLegendViewInfoClass: TcxGridChartLegendViewInfoClass; override; - function GetStylesClass: TcxGridChartDiagramStylesClass; override; - function GetValuesClass: TcxGridChartHistogramValuesClass; override; - function GetViewInfoClass: TcxGridChartDiagramViewInfoClass; override; - - function GetDisplayText: string; override; - function GetImageIndex: Integer; override; - function SupportsValueHotTrack: Boolean; override; - published - property AxisCategory: TcxGridChartLineDiagramAxisCategory read GetAxisCategory write SetAxisCategory; - property AxisValue; - property Styles: TcxGridChartLineDiagramStyles read GetStyles write SetStyles; - property Values: TcxGridChartLineDiagramValues read GetValues write SetValues; - property ValuesEvents; - end; - - // area diagram - - TcxGridChartAreaDiagramStyles = class(TcxGridChartLineDiagramStyles) - protected - function ValueMarkerHasBorderByDefault: Boolean; override; - end; - - TcxGridChartAreaDiagramValueAreaCustomDrawEvent = procedure(Sender: TcxGridChartAreaDiagram; - ACanvas: TcxCanvas; AViewInfo: TcxGridChartAreaDiagramValueViewInfo; var ADone: Boolean) of object; - - TcxGridChartAreaDiagramClass = class of TcxGridChartAreaDiagram; - - TcxGridChartAreaDiagram = class(TcxGridChartLineDiagram) - private - FOnCustomDrawValueArea: TcxGridChartAreaDiagramValueAreaCustomDrawEvent; - function GetStyles: TcxGridChartAreaDiagramStyles; - procedure SetStyles(Value: TcxGridChartAreaDiagramStyles); - procedure SetOnCustomDrawValueArea(Value: TcxGridChartAreaDiagramValueAreaCustomDrawEvent); - protected - function GetLegendViewInfoClass: TcxGridChartLegendViewInfoClass; override; - function GetStylesClass: TcxGridChartDiagramStylesClass; override; - function GetViewInfoClass: TcxGridChartDiagramViewInfoClass; override; - - function GetDisplayText: string; override; - function GetImageIndex: Integer; override; - - procedure DoCustomDrawValueArea(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartAreaDiagramValueViewInfo; var ADone: Boolean); virtual; - function HasCustomDrawValueArea: Boolean; virtual; - public - procedure Assign(Source: TPersistent); override; - published - property Styles: TcxGridChartAreaDiagramStyles read GetStyles write SetStyles; - property OnCustomDrawValueArea: TcxGridChartAreaDiagramValueAreaCustomDrawEvent - read FOnCustomDrawValueArea write SetOnCustomDrawValueArea; - end; - - // pie diagram - - TcxGridChartPieDiagramStyles = class(TcxGridChartDiagramStyles) - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - function GetVaryColorsByCategory: Boolean; override; - public - procedure Assign(Source: TPersistent); override; - published - property SeriesSiteCaptions: TcxStyle index dsSeriesSiteCaptions read GetValue write SetValue; - property SeriesSites: TcxStyle index dsSeriesSites read GetValue write SetValue; - end; - - TcxGridChartPieDiagramValueCaptionItem = (pdvciCategory, pdvciValue, pdvciPercentage); - TcxGridChartPieDiagramValueCaptionItems = set of TcxGridChartPieDiagramValueCaptionItem; - - TcxGridChartPieDiagramValuesClass = class of TcxGridChartPieDiagramValues; - - TcxGridChartPieDiagramValues = class(TcxCustomGridChartDiagramOptions) - private - FAngleOfFirstSlice: Integer; - FCaptionItems: TcxGridChartPieDiagramValueCaptionItems; - FCaptionItemSeparator: string; - FCaptionPosition: TcxGridChartPieDiagramValueCaptionPosition; - FPercentageCaptionFormat: string; - procedure SetAngleOfFirstSlice(Value: Integer); - procedure SetCaptionItems(Value: TcxGridChartPieDiagramValueCaptionItems); - procedure SetCaptionItemSeparator(const Value: string); - procedure SetCaptionPosition(Value: TcxGridChartPieDiagramValueCaptionPosition); - procedure SetPercentageCaptionFormat(const Value: string); - protected - function GetDefaultCaptionItemSeparator: string; virtual; - function GetDefaultPercentageCaptionFormat: string; virtual; - public - constructor Create(ADiagram: TcxGridChartDiagram); override; - procedure Assign(Source: TPersistent); override; - function GetCaptionItemSeparator: string; - function GetCaptionPosition: TcxGridChartPieDiagramValueCaptionPosition; virtual; - function GetPercentageCaptionFormat: string; - published - property AngleOfFirstSlice: Integer read FAngleOfFirstSlice write SetAngleOfFirstSlice default 0; - property CaptionPosition: TcxGridChartPieDiagramValueCaptionPosition read FCaptionPosition - write SetCaptionPosition default pdvcpNone; - property CaptionItems: TcxGridChartPieDiagramValueCaptionItems read FCaptionItems - write SetCaptionItems default [pdvciValue]; - property CaptionItemSeparator: string read FCaptionItemSeparator write SetCaptionItemSeparator; - property PercentageCaptionFormat: string read FPercentageCaptionFormat - write SetPercentageCaptionFormat; - end; - - TcxGridChartPieDiagramSeriesSiteCaptionCustomDrawEvent = procedure(Sender: TcxGridChartPieDiagram; - ACanvas: TcxCanvas; AViewInfo: TcxGridChartPieSeriesSiteCaptionViewInfo; var ADone: Boolean) of object; - TcxGridChartPieDiagramSeriesSiteCustomDrawEvent = procedure(Sender: TcxGridChartPieDiagram; - ACanvas: TcxCanvas; AViewInfo: TcxGridChartPieSeriesSiteViewInfo; var ADone: Boolean) of object; - - TcxGridChartPieDiagramClass = class of TcxGridChartPieDiagram; - - TcxGridChartPieDiagram = class(TcxGridChartDiagram) - private - FSeriesCaptions: Boolean; - FSeriesColumnCount: Integer; - FSeriesSites: Boolean; - FValues: TcxGridChartPieDiagramValues; - FOnCustomDrawSeriesSite: TcxGridChartPieDiagramSeriesSiteCustomDrawEvent; - FOnCustomDrawSeriesSiteCaption: TcxGridChartPieDiagramSeriesSiteCaptionCustomDrawEvent; - function GetStyles: TcxGridChartPieDiagramStyles; - procedure SetSeriesCaptions(Value: Boolean); - procedure SetSeriesColumnCount(Value: Integer); - procedure SetSeriesSites(Value: Boolean); - procedure SetStyles(Value: TcxGridChartPieDiagramStyles); - procedure SetValues(Value: TcxGridChartPieDiagramValues); - procedure SetOnCustomDrawSeriesSite(Value: TcxGridChartPieDiagramSeriesSiteCustomDrawEvent); - procedure SetOnCustomDrawSeriesSiteCaption(Value: TcxGridChartPieDiagramSeriesSiteCaptionCustomDrawEvent); - protected - procedure CreateSubObjects(AGridView: TcxGridChartView); override; - procedure DestroySubObjects; override; - - function GetStylesClass: TcxGridChartDiagramStylesClass; override; - function GetValuesClass: TcxGridChartPieDiagramValuesClass; virtual; - - function GetLegendViewInfoClass: TcxGridChartLegendViewInfoClass; override; - function GetViewInfoClass: TcxGridChartDiagramViewInfoClass; override; - - function GetDisplayText: string; override; - function GetImageIndex: Integer; override; - - procedure DoCustomDrawSeriesSite(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartPieSeriesSiteViewInfo; var ADone: Boolean); virtual; - procedure DoCustomDrawSeriesSiteCaption(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartPieSeriesSiteCaptionViewInfo; var ADone: Boolean); virtual; - function HasCustomDrawSeriesSite: Boolean; virtual; - function HasCustomDrawSeriesSiteCaption: Boolean; virtual; - public - constructor Create(AGridView: TcxGridChartView); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function GetSeriesColumnCount: Integer; virtual; - function GetValueCaption(ASeries: TcxGridChartSeries; AValueIndex: Integer): string; override; - published - property SeriesCaptions: Boolean read FSeriesCaptions write SetSeriesCaptions default True; - property SeriesColumnCount: Integer read FSeriesColumnCount write SetSeriesColumnCount default 0; - property SeriesSites: Boolean read FSeriesSites write SetSeriesSites default False; - property Styles: TcxGridChartPieDiagramStyles read GetStyles write SetStyles; - property Values: TcxGridChartPieDiagramValues read FValues write SetValues; - property OnCustomDrawSeriesSite: TcxGridChartPieDiagramSeriesSiteCustomDrawEvent - read FOnCustomDrawSeriesSite write SetOnCustomDrawSeriesSite; - property OnCustomDrawSeriesSiteCaption: TcxGridChartPieDiagramSeriesSiteCaptionCustomDrawEvent - read FOnCustomDrawSeriesSiteCaption write SetOnCustomDrawSeriesSiteCaption; - end; - - // chart item data binding - - TcxGridChartItemDataBindingClass = class of TcxGridChartItemDataBinding; - - TcxGridChartItemDataBinding = class(TcxInterfacedPersistent, IcxEditRepositoryItemListener) - private - FData: TObject; - FDataField: TcxCustomDataField; - FDefaultRepositoryItem: TcxEditRepositoryItem; - FDefaultValuesProvider: TcxCustomEditDefaultValuesProvider; - FDefaultValueTypeClass: TcxValueTypeClass; - FGridView: TcxGridChartView; - FID: Integer; - FIsValue: Boolean; - FSummaryItem: TcxDataSummaryItem; - function GetDataController: TcxCustomDataController; - function GetDataIndex: Integer; - function GetDataItem: TObject; - function GetDefaultProperties: TcxCustomEditProperties; - function GetDefaultValuesProvider: TcxCustomEditDefaultValuesProvider; - function GetGroupIndex: Integer; - function GetSortIndex: Integer; - function GetSortOrder: TcxDataSortOrder; - function GetSummaryIndex: Integer; - function GetSummaryKind: TcxSummaryKind; - function GetValueType: string; - function GetValueTypeClass: TcxValueTypeClass; - procedure SetData(Value: TObject); - procedure SetDataField(Value: TcxCustomDataField); - procedure SetGroupIndex(Value: Integer); - procedure SetSortIndex(Value: Integer); - procedure SetSortOrder(Value: TcxDataSortOrder); - procedure SetSummaryKind(Value: TcxSummaryKind); - procedure SetValueType(const Value: string); - procedure SetValueTypeClass(Value: TcxValueTypeClass); - protected - // IcxEditRepositoryItemListener - procedure ItemRemoved(Sender: TcxEditRepositoryItem); - procedure PropertiesChanged(Sender: TcxEditRepositoryItem); - - procedure CreateSummaryItem(var ASummaryItem: TcxDataSummaryItem); virtual; - function GetDefaultDisplayText: string; virtual; - function GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; virtual; - function GetDefaultValueTypeClass: TcxValueTypeClass; virtual; - function GetSummaryItem: TcxDataSummaryItem; virtual; - procedure InitDefaultValuesProvider(ADefaultValuesProvider: TcxCustomEditDefaultValuesProvider); virtual; - function IsValueTypeInteger: Boolean; - function IsValueTypeStored: Boolean; virtual; - procedure UpdateSummaryItemValue; - procedure ValueTypeClassChanged; virtual; - - function GetDefaultRepositoryItem: TcxEditRepositoryItem; virtual; - procedure UpdateDefaultRepositoryItemValue; - - property DataField: TcxCustomDataField read FDataField write SetDataField; - property DefaultProperties: TcxCustomEditProperties read GetDefaultProperties; - property DefaultRepositoryItem: TcxEditRepositoryItem read FDefaultRepositoryItem; - property DefaultValuesProvider: TcxCustomEditDefaultValuesProvider read GetDefaultValuesProvider; - property DataItem: TObject read GetDataItem; - property GroupIndex: Integer read GetGroupIndex write SetGroupIndex; - property ID: Integer read FID write FID; - property IsValue: Boolean read FIsValue; - property SortIndex: Integer read GetSortIndex write SetSortIndex; - property SortOrder: TcxDataSortOrder read GetSortOrder write SetSortOrder; - property SummaryKind: TcxSummaryKind read GetSummaryKind write SetSummaryKind; - public - constructor Create(AGridView: TcxGridChartView; AIsValue: Boolean; - ADefaultValueTypeClass: TcxValueTypeClass); reintroduce; virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function GetValueDisplayText(const AValue: Variant): string; virtual; - function IsValueTypeClassValid(AValueTypeClass: TcxValueTypeClass): Boolean; virtual; - property Data: TObject read FData write SetData; - property DataIndex: Integer read GetDataIndex; - property DataController: TcxCustomDataController read GetDataController; - property GridView: TcxGridChartView read FGridView; - property SummaryIndex: Integer read GetSummaryIndex; - property SummaryItem: TcxDataSummaryItem read FSummaryItem; - property ValueTypeClass: TcxValueTypeClass read GetValueTypeClass write SetValueTypeClass; - published - property ValueType: string read GetValueType write SetValueType stored IsValueTypeStored; - end; - - TcxGridChartGetValueDisplayTextEvent = procedure(Sender: TObject; - const AValue: Variant; var ADisplayText: string) of object; - TcxGridChartItemGetStoredPropertiesEvent = procedure(Sender: TcxGridChartItem; - AProperties: TStrings) of object; - TcxGridChartItemGetStoredPropertyValueEvent = procedure(Sender: TcxGridChartItem; - const AName: string; var AValue: Variant) of object; - TcxGridChartItemSetStoredPropertyValueEvent = procedure(Sender: TcxGridChartItem; - const AName: string; const AValue: Variant) of object; - - TcxGridChartItem = class(TcxComponent, IcxStoredObject, IcxGridChartItem) - private - FDataBinding: TcxGridChartItemDataBinding; - FDisplayText: string; - FGridView: TcxGridChartView; - FLastDataBindingDefaultDisplayText: string; - FOrder: Integer; - FVisible: Boolean; - FVisibleForCustomization: Boolean; - FVisibleIndex: Integer; - FOnGetStoredProperties: TcxGridChartItemGetStoredPropertiesEvent; - FOnGetStoredPropertyValue: TcxGridChartItemGetStoredPropertyValueEvent; - FOnGetValueDisplayText: TcxGridChartGetValueDisplayTextEvent; - FOnSetStoredPropertyValue: TcxGridChartItemSetStoredPropertyValueEvent; - function GetID: Integer; - function GetIndex: Integer; - function GetSortOrder: TcxDataSortOrder; - function GetTag: TcxTag; - function GetVisibleDisplayText(AIndex: Integer): string; - procedure SetDataBinding(Value: TcxGridChartItemDataBinding); - procedure SetDisplayText(const Value: string); - procedure SetIndex(Value: Integer); - procedure SetOnGetStoredProperties(Value: TcxGridChartItemGetStoredPropertiesEvent); - procedure SetOnGetStoredPropertyValue(Value: TcxGridChartItemGetStoredPropertyValueEvent); - procedure SetOnGetValueDisplayText(Value: TcxGridChartGetValueDisplayTextEvent); - procedure SetOnSetStoredPropertyValue(Value: TcxGridChartItemSetStoredPropertyValueEvent); - procedure SetSortOrder(Value: TcxDataSortOrder); - procedure SetTag(Value: TcxTag); - procedure SetVisible(Value: Boolean); - procedure SetVisibleForCustomization(Value: Boolean); - function IsTagStored: Boolean; - protected - FSubObjectEvents: TNotifyEvent; - - // IcxStoredObject - function GetObjectName: string; virtual; - function IcxStoredObject.GetProperties = GetStoredProperties; - function GetStoredProperties(AProperties: TStrings): Boolean; virtual; - procedure GetPropertyValue(const AName: string; var AValue: Variant); virtual; - procedure SetPropertyValue(const AName: string; const AValue: Variant); virtual; - procedure SetRestoredIndex(AValue: Integer); virtual; abstract; - // IcxGridChartItem - procedure DataChanged; virtual; - function GetDataBinding: TcxGridChartItemDataBinding; - procedure ValueTypeClassChanged; - - procedure SetParentComponent(AParent: TComponent); override; - - procedure Changed(AChange: TcxGridViewChangeKind = vcLayout); virtual; - procedure DisplayTextChanged; virtual; - procedure DoGetValueDisplayText(const AValue: Variant; var ADisplayText: string); virtual; - function GetDefaultDisplayText: string; virtual; - function GetDefaultValueTypeClass: TcxValueTypeClass; virtual; abstract; - procedure SetGridView(Value: TcxGridChartView); - procedure SetName(const NewName: TComponentName); override; - - function GetValue(AIndex: Integer): Variant; virtual; abstract; - function GetValueCount: Integer; virtual; abstract; - function GetVisibleValue(AIndex: Integer): Variant; virtual; abstract; - function GetVisibleValueCount: Integer; virtual; abstract; - procedure SetValue(AIndex: Integer; const Value: Variant); virtual; abstract; - procedure SetValueCount(Value: Integer); virtual; abstract; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - - function GetDisplayText: string; - function GetValueDisplayText(const AValue: Variant): string; - class function IsValue: Boolean; virtual; // abstract; - because of CLR, BCB - - property GridView: TcxGridChartView read FGridView; - property ID: Integer read GetID; - property Index: Integer read GetIndex write SetIndex; - property Order: Integer read FOrder; - property ValueCount: Integer read GetValueCount write SetValueCount; - property Values[AIndex: Integer]: Variant read GetValue write SetValue; default; - property VisibleDisplayTexts[AIndex: Integer]: string read GetVisibleDisplayText; - property VisibleIndex: Integer read FVisibleIndex; - property VisibleValueCount: Integer read GetVisibleValueCount; - property VisibleValues[AIndex: Integer]: Variant read GetVisibleValue; - published - property DataBinding: TcxGridChartItemDataBinding read FDataBinding - write SetDataBinding; - property DisplayText: string read FDisplayText write SetDisplayText; - property SortOrder: TcxDataSortOrder read GetSortOrder write SetSortOrder default soNone; - property Tag: TcxTag read GetTag write SetTag stored IsTagStored; - property Visible: Boolean read FVisible write SetVisible default True; - property VisibleForCustomization: Boolean read FVisibleForCustomization - write SetVisibleForCustomization default True; - property OnGetStoredProperties: TcxGridChartItemGetStoredPropertiesEvent read FOnGetStoredProperties write SetOnGetStoredProperties; - property OnGetStoredPropertyValue: TcxGridChartItemGetStoredPropertyValueEvent read FOnGetStoredPropertyValue write SetOnGetStoredPropertyValue; - property OnGetValueDisplayText: TcxGridChartGetValueDisplayTextEvent read FOnGetValueDisplayText write SetOnGetValueDisplayText; - property OnSetStoredPropertyValue: TcxGridChartItemSetStoredPropertyValueEvent read FOnSetStoredPropertyValue write SetOnSetStoredPropertyValue; - end; - - // categories - - TcxGridChartCategoriesClass = class of TcxGridChartCategories; - - TcxGridChartCategories = class(TcxCustomGridOptions, IcxGridChartItem) - private - FDataBinding: TcxGridChartItemDataBinding; - FDisplayText: string; - FOnGetValueDisplayText: TcxGridChartGetValueDisplayTextEvent; - function GetGridView: TcxGridChartView; - function GetID: Integer; - function GetSortOrder: TcxDataSortOrder; - function GetValue(Index: Integer): Variant; - function GetValueCount: Integer; - function GetVisibleDisplayText(Index: Integer): string; - function GetVisibleValue(Index: Integer): Variant; - function GetVisibleValueCount: Integer; - procedure SetDataBinding(Value: TcxGridChartItemDataBinding); - procedure SetDisplayText(const Value: string); - procedure SetOnGetValueDisplayText(Value: TcxGridChartGetValueDisplayTextEvent); - procedure SetSortOrder(Value: TcxDataSortOrder); - procedure SetValue(Index: Integer; const Value: Variant); - procedure SetValueCount(Value: Integer); - protected - // IcxGridChartItem - procedure DataChanged; virtual; - function GetDataBinding: TcxGridChartItemDataBinding; - procedure ValueTypeClassChanged; - - procedure DoGetValueDisplayText(const AValue: Variant; var ADisplayText: string); virtual; - function GetDefaultDisplayText: string; virtual; - function GetDefaultValueTypeClass: TcxValueTypeClass; virtual; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function GetDisplayText: string; - function GetNamePath: string; override; - function GetValueDisplayText(const AValue: Variant): string; - - property GridView: TcxGridChartView read GetGridView; - property ID: Integer read GetID; - property ValueCount: Integer read GetValueCount write SetValueCount; - property Values[Index: Integer]: Variant read GetValue write SetValue; default; - property VisibleDisplayTexts[Index: Integer]: string read GetVisibleDisplayText; - property VisibleValueCount: Integer read GetVisibleValueCount; - property VisibleValues[Index: Integer]: Variant read GetVisibleValue; - published - property DataBinding: TcxGridChartItemDataBinding read FDataBinding - write SetDataBinding; - property DisplayText: string read FDisplayText write SetDisplayText; - property SortOrder: TcxDataSortOrder read GetSortOrder write SetSortOrder default soNone; - property OnGetValueDisplayText: TcxGridChartGetValueDisplayTextEvent read FOnGetValueDisplayText - write SetOnGetValueDisplayText; - end; - - // data groups - - TcxGridChartDataGroupClass = class of TcxGridChartDataGroup; - - TcxGridChartDataGroup = class(TcxGridChartItem) - private - FActiveValue: Variant; - function GetActive: Boolean; - function GetActiveValueDisplayText: string; - function GetDataLevel: Integer; - function GetGroupIndex: Integer; - procedure SetActive(Value: Boolean); - procedure SetActiveValue(const Value: Variant); - procedure SetDataLevel(Value: Integer); - procedure SetGroupIndex(Value: Integer); - protected - // IcxStoredObject - function GetStoredProperties(AProperties: TStrings): Boolean; override; - procedure GetPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetPropertyValue(const AName: string; const AValue: Variant); override; - procedure SetRestoredIndex(AValue: Integer); override; - - procedure CheckActiveValue; - function GetDefaultValueTypeClass: TcxValueTypeClass; override; - - function GetValue(AIndex: Integer): Variant; override; - function GetValueCount: Integer; override; - function GetVisibleValue(AIndex: Integer): Variant; override; - function GetVisibleValueCount: Integer; override; - procedure SetValue(AIndex: Integer; const Value: Variant); override; - procedure SetValueCount(Value: Integer); override; - - function CanMove: Boolean; virtual; - - property GroupIndex: Integer read GetGroupIndex write SetGroupIndex; - public - function HasActiveValue: Boolean; - class function IsValue: Boolean; override; - property Active: Boolean read GetActive write SetActive; - property ActiveValue: Variant read FActiveValue write SetActiveValue; - property ActiveValueDisplayText: string read GetActiveValueDisplayText; - property DataLevel: Integer read GetDataLevel write SetDataLevel; - published - property SortOrder default soAscending; - end; - - // series - - TcxGridChartSeriesGetValueStyleEvent = procedure(Sender: TcxGridChartSeries; - AValueIndex: Integer; var AStyle: TcxStyle) of object; - - TcxGridChartSeriesStylesClass = class of TcxGridChartSeriesStyles; - - TcxGridChartSeriesStyles = class(TcxCustomGridStyles) - private - FOnGetValueStyle: TcxGridChartSeriesGetValueStyleEvent; - function GetSeries: TcxGridChartSeries; - procedure SetOnGetValueStyle(Value: TcxGridChartSeriesGetValueStyleEvent); - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - function GetGridView: TcxCustomGridView; override; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - procedure GetValueParams(AValueIndex: Integer; AVaryColorsByCategory: Boolean; - out AParams: TcxViewParams); virtual; - property Series: TcxGridChartSeries read GetSeries; - published - property Values: TcxStyle index ssValues read GetValue write SetValue; - property OnGetValueStyle: TcxGridChartSeriesGetValueStyleEvent read FOnGetValueStyle - write SetOnGetValueStyle; - end; - - TcxGridChartSeriesValueCustomDrawEvent = procedure(Sender: TcxGridChartSeries; - ACanvas: TcxCanvas; AViewInfo: TcxGridChartDiagramValueViewInfo; var ADone: Boolean) of object; - TcxGridChartValueClickEvent = procedure(Sender: TcxGridChartView; ASeries: TcxGridChartSeries; - AValueIndex: Integer; var AHandled: Boolean) of object; - - TcxGridChartSeriesClass = class of TcxGridChartSeries; - - TcxGridChartSeries = class(TcxGridChartItem) - private - FStyles: TcxGridChartSeriesStyles; - FValueCaptionFormat: string; - FOnCustomDrawValue: TcxGridChartSeriesValueCustomDrawEvent; - FOnValueClick: TcxGridChartValueClickEvent; - function GetGroupSummaryKind: TcxSummaryKind; - function GetSumOfValues: Variant; - procedure SetGroupSummaryKind(Value: TcxSummaryKind); - procedure SetStyles(Value: TcxGridChartSeriesStyles); - procedure SetValueCaptionFormat(const Value: string); - procedure SetOnCustomDrawValue(Value: TcxGridChartSeriesValueCustomDrawEvent); - procedure SetOnValueClick(Value: TcxGridChartValueClickEvent); - protected - // IcxStoredObject - function GetStoredProperties(AProperties: TStrings): Boolean; override; - procedure GetPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetPropertyValue(const AName: string; const AValue: Variant); override; - procedure SetRestoredIndex(AValue: Integer); override; - - procedure DoGetValueDisplayText(const AValue: Variant; var ADisplayText: string); override; - function GetDefaultValueTypeClass: TcxValueTypeClass; override; - function GetStylesClass: TcxGridChartSeriesStylesClass; virtual; - function IsGroupSummaryKindValid(AValue: TcxSummaryKind): Boolean; virtual; - - function GetValue(AIndex: Integer): Variant; override; - function GetValueCount: Integer; override; - function GetVisibleValue(AIndex: Integer): Variant; override; - function GetVisibleValueCount: Integer; override; - procedure SetValue(AIndex: Integer; const Value: Variant); override; - procedure SetValueCount(Value: Integer); override; - - procedure DoCustomDrawValue(ACanvas: TcxCanvas; AViewInfo: TcxGridChartDiagramValueViewInfo; - var ADone: Boolean); virtual; - function DoValueClick(AValueIndex: Integer): Boolean; virtual; - function HasCustomDrawValue: Boolean; virtual; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function AddValue(const AValue: Variant): Integer; - class function IsValue: Boolean; override; - - property SumOfValues: Variant read GetSumOfValues; - published - property GroupSummaryKind: TcxSummaryKind read GetGroupSummaryKind write SetGroupSummaryKind - default cxGridChartItemDefaultSummaryKind; - property Styles: TcxGridChartSeriesStyles read FStyles write SetStyles; - property ValueCaptionFormat: string read FValueCaptionFormat write SetValueCaptionFormat; - - property StylesEvents: TNotifyEvent read FSubObjectEvents write FSubObjectEvents; - - property OnCustomDrawValue: TcxGridChartSeriesValueCustomDrawEvent read FOnCustomDrawValue - write SetOnCustomDrawValue; - property OnValueClick: TcxGridChartValueClickEvent read FOnValueClick write SetOnValueClick; - end; - - // view title - - TcxGridChartTitleClass = class of TcxGridChartTitle; - - TcxGridChartTitle = class(TcxCustomGridChartTitle) - protected - function GetDefaultPosition: TcxGridChartPartPosition; override; - published - property Position; - end; - - // view - - TcxGridChartDataLevelsInfoVisible = (dlivNever, dlivNonEmpty, dlivAlways); - TcxGridChartToolBoxBorder = (tbNone, tbSingle); - TcxGridChartToolBoxPosition = (tpTop, tpBottom); - TcxGridChartToolBoxVisible = (tvNever, tvNonEmpty, tvAlways); - - TcxGridChartToolBoxClass = class of TcxGridChartToolBox; - - TcxGridChartToolBox = class(TcxCustomGridOptions) - private - FBorder: TcxGridChartToolBoxBorder; - FCustomizeButton: Boolean; - FDataLevelActiveValueDropDownCount: Integer; - FDataLevelActiveValueDropDownWidth: Integer; - FDataLevelsInfoVisible: TcxGridChartDataLevelsInfoVisible; - FDiagramSelector: Boolean; - FPosition: TcxGridChartToolBoxPosition; - FVisible: TcxGridChartToolBoxVisible; - function GetGridView: TcxGridChartView; - procedure SetBorder(Value: TcxGridChartToolBoxBorder); - procedure SetCustomizeButton(Value: Boolean); - procedure SetDataLevelActiveValueDropDownCount(Value: Integer); - procedure SetDataLevelActiveValueDropDownWidth(Value: Integer); - procedure SetDataLevelsInfoVisible(Value: TcxGridChartDataLevelsInfoVisible); - procedure SetDiagramSelector(Value: Boolean); - procedure SetPosition(Value: TcxGridChartToolBoxPosition); - procedure SetVisible(Value: TcxGridChartToolBoxVisible); - protected - procedure GetStoredProperties(AProperties: TStrings); override; - procedure GetStoredPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetStoredPropertyValue(const AName: string; const AValue: Variant); override; - - function IsDataLevelsInfoNonEmpty: Boolean; virtual; - function IsNonEmpty: Boolean; virtual; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - function GetDataLevelsInfoVisible: Boolean; - function GetVisible: Boolean; - property GridView: TcxGridChartView read GetGridView; - published - property Border: TcxGridChartToolBoxBorder read FBorder write SetBorder default tbSingle; - property CustomizeButton: Boolean read FCustomizeButton write SetCustomizeButton default False; - property DataLevelActiveValueDropDownCount: Integer read FDataLevelActiveValueDropDownCount - write SetDataLevelActiveValueDropDownCount default cxGridChartDefaultDataLevelActiveValueDropDownCount; - property DataLevelActiveValueDropDownWidth: Integer read FDataLevelActiveValueDropDownWidth - write SetDataLevelActiveValueDropDownWidth default 0; - property DataLevelsInfoVisible: TcxGridChartDataLevelsInfoVisible read FDataLevelsInfoVisible - write SetDataLevelsInfoVisible default dlivNonEmpty; - property DiagramSelector: Boolean read FDiagramSelector write SetDiagramSelector default False; - property Position: TcxGridChartToolBoxPosition read FPosition write SetPosition default tpTop; - property Visible: TcxGridChartToolBoxVisible read FVisible write SetVisible default tvNonEmpty; - end; - - TcxGridChartValueHotTrack = (vhDefault, vhNever, vhAlways); - - TcxGridChartOptionsBehavior = class(TcxCustomGridOptionsBehavior) - private - FValueHints: Boolean; - FValueHotTrack: TcxGridChartValueHotTrack; - function GetGridView: TcxGridChartView; - procedure SetValueHints(Value: Boolean); - procedure SetValueHotTrack(Value: TcxGridChartValueHotTrack); - protected - procedure GetStoredProperties(AProperties: TStrings); override; - procedure GetStoredPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetStoredPropertyValue(const AName: string; const AValue: Variant); override; - - function GetDefaultValueHotTrack(AValueIndex: Integer): Boolean; virtual; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - function GetValueHotTrack(AValueIndex: Integer): Boolean; virtual; - property GridView: TcxGridChartView read GetGridView; - published - property ValueHints: Boolean read FValueHints write SetValueHints default True; - property ValueHotTrack: TcxGridChartValueHotTrack read FValueHotTrack write SetValueHotTrack default vhDefault; - end; - - TcxGridChartDataDrillUpMethod = (ddumNone, ddumValueMouseRightButtonClick, ddumMouseRightButtonClick); - - TcxGridChartOptionsCustomizeClass = class of TcxGridChartOptionsCustomize; - - TcxGridChartOptionsCustomize = class(TcxCustomGridOptions) - private - FDataDrillDown: Boolean; - FDataDrillUpMethod: TcxGridChartDataDrillUpMethod; - FDataGroupHiding: Boolean; - FDataGroupMoving: Boolean; - FOptionsCustomization: Boolean; - FSeriesCustomization: Boolean; - procedure SetDataDrillDown(Value: Boolean); - procedure SetDataDrillUpMethod(Value: TcxGridChartDataDrillUpMethod); - procedure SetDataGroupHiding(Value: Boolean); - procedure SetDataGroupMoving(Value: Boolean); - procedure SetOptionsCustomization(Value: Boolean); - procedure SetSeriesCustomization(Value: Boolean); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - published - property DataDrillDown: Boolean read FDataDrillDown write SetDataDrillDown default True; - property DataDrillUpMethod: TcxGridChartDataDrillUpMethod read FDataDrillUpMethod - write SetDataDrillUpMethod default ddumMouseRightButtonClick; - property DataGroupHiding: Boolean read FDataGroupHiding write SetDataGroupHiding default False; - property DataGroupMoving: Boolean read FDataGroupMoving write SetDataGroupMoving default True; - property OptionsCustomization: Boolean read FOptionsCustomization write SetOptionsCustomization default True; - property SeriesCustomization: Boolean read FSeriesCustomization write SetSeriesCustomization default True; - end; - - TcxGridChartOptionsViewClass = class of TcxGridChartOptionsView; - - TcxGridChartOptionsView = class(TcxCustomGridOptionsView) - private - FCategoriesPerPage: Integer; - function GetGridView: TcxGridChartView; - procedure SetCategoriesPerPage(Value: Integer); - public - //constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - property GridView: TcxGridChartView read GetGridView; - published - property CategoriesPerPage: Integer read FCategoriesPerPage write SetCategoriesPerPage default 0; - end; - - TcxGridChartViewStyles = class(TcxCustomGridViewStyles) - private - function GetGridViewValue: TcxGridChartView; - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - public - constructor Create(AOwner: TPersistent); override; - procedure Assign(Source: TPersistent); override; - procedure GetDataLevelInfoParams(ADataLevel: Integer; out AParams: TcxViewParams); virtual; - property GridView: TcxGridChartView read GetGridViewValue; - published - property ActiveDataLevelInfo: TcxStyle index vsActiveDataLevelInfo read GetValue write SetValue; - property DataLevelActiveValueInfo: TcxStyle index vsDataLevelActiveValueInfo read GetValue write SetValue; - property DataLevelsInfo: TcxStyle index vsDataLevelsInfo read GetValue write SetValue; - property DiagramSelector: TcxStyle index vsDiagramSelector read GetValue write SetValue; - property Legend: TcxStyle index vsLegend read GetValue write SetValue; - property Title: TcxStyle index vsTitle read GetValue write SetValue; - property ToolBox: TcxStyle index vsToolBox read GetValue write SetValue; - end; - - TcxGridOpenChartItemList = class(TcxOpenList) - private - function GetItem(Index: Integer): TcxGridChartItem; - procedure SetItem(Index: Integer; Value: TcxGridChartItem); - public - property Items[Index: Integer]: TcxGridChartItem read GetItem write SetItem; default; - end; - - TcxGridChartDataGroupEvent = procedure(Sender: TcxGridChartView; ADataGroup: TcxGridChartDataGroup) of object; - TcxGridChartDiagramEvent = procedure(Sender: TcxGridChartView; ADiagram: TcxGridChartDiagram) of object; - TcxGridChartGetValueHintEvent = procedure(Sender: TcxGridChartView; - ASeries: TcxGridChartSeries; AValueIndex: Integer; var AHint: string) of object; - TcxGridChartLegendCustomDrawEvent = procedure(Sender: TcxGridChartView; - ACanvas: TcxCanvas; AViewInfo: TcxGridChartLegendViewInfo; var ADone: Boolean) of object; - TcxGridChartLegendItemCustomDrawEvent = procedure(Sender: TcxGridChartView; - ACanvas: TcxCanvas; AViewInfo: TcxGridChartLegendItemViewInfo; var ADone: Boolean) of object; - TcxGridChartSeriesEvent = procedure(Sender: TcxGridChartView; ASeries: TcxGridChartSeries) of object; - -(* - -User can customize: - ToolBox: - ActiveDiagram - ActiveDataLevel - DataGroups: - ActiveValue - Index - Visible - CustomizationForm: - Series: - Index - Visible - SortOrder - DataGroups: - Visible - Options: - Legend: - Position - Alignment - Orientation - Border - KeyBorder - Title: - Position - Alignment - ToolBox: - Position - Border - DiagramSelector - Other: - ValueHints - DataDrilling: - ActiveDataLevel - DataGroups: - ActiveValue - -Store/Restore: - View: - ActiveDiagram - ActiveDataLevel - Options: - Legend: - Position - Alignment - Orientation - Border - KeyBorder - Title: - Position - Alignment - ToolBox: - Position - Border - DiagramSelector - Other: - ValueHints - DataGroup: - ActiveValue - Index - Visible - Series: - Index - Visible - SortOrder - -*) - - TcxGridChartView = class(TcxCustomGridView) - private - FActiveDataLevel: Integer; - FActiveDiagram: TcxGridChartDiagram; - FAvailableDiagrams: TList; - FCategories: TcxGridChartCategories; - FDataGroupActiveValuesUpdateNeeded: Boolean; - FDataGroups: TList; - FDiagramArea: TcxGridChartAreaDiagram; - FDiagramBar: TcxGridChartBarDiagram; - FDiagramColumn: TcxGridChartColumnDiagram; - FDiagramLine: TcxGridChartLineDiagram; - FDiagramPie: TcxGridChartPieDiagram; - FDiagrams: TList; - FIDs: TList; - FLegend: TcxGridChartLegend; - FOptionsCustomize: TcxGridChartOptionsCustomize; - FRestoredActiveDataLevel: Integer; - FRestoringDataGroups: TcxGridOpenChartItemList; - FRestoringSeries: TcxGridOpenChartItemList; - FSeries: TList; - FTitle: TcxGridChartTitle; - FToolBox: TcxGridChartToolBox; - FVisibleDataGroups: TList; - FVisibleSeries: TList; - FOnActiveDataLevelChanged: TNotifyEvent; - FOnActiveDiagramChanged: TcxGridChartDiagramEvent; - FOnCustomDrawLegend: TcxGridChartLegendCustomDrawEvent; - FOnCustomDrawLegendItem: TcxGridChartLegendItemCustomDrawEvent; - FOnDataGroupPosChanged: TcxGridChartDataGroupEvent; - FOnFirstVisibleCategoryIndexChanged: TNotifyEvent; - FOnGetValueHint: TcxGridChartGetValueHintEvent; - FOnSeriesPosChanged: TcxGridChartSeriesEvent; - FOnValueClick: TcxGridChartValueClickEvent; - FSubClassEvents: TNotifyEvent; - - function GetActiveDataGroup: TcxGridChartDataGroup; - function GetAvailableDiagram(Index: Integer): TcxGridChartDiagram; - function GetAvailableDiagramCount: Integer; - function GetController: TcxGridChartController; - function GetDataController: TcxGridChartDataController; - function GetDataGroup(Index: Integer): TcxGridChartDataGroup; - function GetDataGroupCount: Integer; - function GetDiagram(Index: Integer): TcxGridChartDiagram; - function GetDiagramCount: Integer; - function GetItem(Index: Integer): IcxGridChartItem; - function GetItemCount: Integer; - function GetOptionsBehavior: TcxGridChartOptionsBehavior; - function GetOptionsView: TcxGridChartOptionsView; - function GetSeries(Index: Integer): TcxGridChartSeries; - function GetSeriesCount: Integer; - function GetSortedSeries: TcxGridChartSeries; - function GetStyles: TcxGridChartViewStyles; - function GetViewData: TcxGridChartViewData; - function GetViewInfo: TcxGridChartViewInfo; - function GetVisibleDataGroup(Index: Integer): TcxGridChartDataGroup; - function GetVisibleDataGroupCount: Integer; - function GetVisibleSeries(Index: Integer): TcxGridChartSeries; - function GetVisibleSeriesCount: Integer; - procedure SetActiveDataGroup(Value: TcxGridChartDataGroup); - procedure SetActiveDataLevel(Value: Integer); - procedure SetActiveDiagram(Value: TcxGridChartDiagram); - procedure SetCategories(Value: TcxGridChartCategories); - procedure SetDataController(Value: TcxGridChartDataController); - procedure SetDataGroup(Index: Integer; Value: TcxGridChartDataGroup); - procedure SetDiagramArea(Value: TcxGridChartAreaDiagram); - procedure SetDiagramBar(Value: TcxGridChartBarDiagram); - procedure SetDiagramColumn(Value: TcxGridChartColumnDiagram); - procedure SetDiagramLine(Value: TcxGridChartLineDiagram); - procedure SetDiagramPie(Value: TcxGridChartPieDiagram); - procedure SetLegend(Value: TcxGridChartLegend); - procedure SetOptionsBehavior(Value: TcxGridChartOptionsBehavior); - procedure SetOptionsCustomize(Value: TcxGridChartOptionsCustomize); - procedure SetOptionsView(Value: TcxGridChartOptionsView); - procedure SetSeries(Index: Integer; Value: TcxGridChartSeries); - procedure SetSortedSeries(Value: TcxGridChartSeries); - procedure SetStyles(Value: TcxGridChartViewStyles); - procedure SetTitle(Value: TcxGridChartTitle); - procedure SetToolBox(Value: TcxGridChartToolBox); - procedure SetOnActiveDataLevelChanged(Value: TNotifyEvent); - procedure SetOnActiveDiagramChanged(Value: TcxGridChartDiagramEvent); - procedure SetOnCustomDrawLegend(Value: TcxGridChartLegendCustomDrawEvent); - procedure SetOnCustomDrawLegendItem(Value: TcxGridChartLegendItemCustomDrawEvent); - procedure SetOnDataGroupPosChanged(Value: TcxGridChartDataGroupEvent); - procedure SetOnFirstVisibleCategoryIndexChanged(Value: TNotifyEvent); - procedure SetOnGetValueHint(Value: TcxGridChartGetValueHintEvent); - procedure SetOnSeriesPosChanged(Value: TcxGridChartSeriesEvent); - procedure SetOnValueClick(Value: TcxGridChartValueClickEvent); - - protected - // IcxStoredObject - function GetProperties(AProperties: TStrings): Boolean; override; - procedure GetPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetPropertyValue(const AName: string; const AValue: Variant); override; - // IcxStoredParent - function CreateStoredObject(const AObjectName, AClassName: string): TObject; override; - procedure GetStoredChildren(AChildren: TStringList); override; - // IcxGridViewLayoutEditorSupport - for design-time layout editor - procedure AssignLayout(ALayoutView: TcxCustomGridView); override; - function GetLayoutCustomizationFormButtonCaption: string; override; - function HasLayoutCustomizationForm: Boolean; override; - - procedure CreateHandlers; override; - procedure DestroyHandlers; override; - procedure CreateOptions; override; - procedure DestroyOptions; override; - - procedure ActiveDataLevelChanged(APrevActiveDataLevel: Integer); virtual; - procedure ActiveDiagramChanged(ADiagram: TcxGridChartDiagram); virtual; - procedure BeforeAssign(ASource: TcxCustomGridView); override; - procedure AfterAssign(ASource: TcxCustomGridView); override; - procedure DoAssign(ASource: TcxCustomGridView); override; - procedure BeforeRestoring; override; - procedure AfterRestoring; override; - procedure DataControllerUnlocked; virtual; - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - procedure GetFakeComponentLinks(AList: TList); override; - procedure RestoringComplete; override; - procedure SetChildOrder(Child: TComponent; Order: Integer); override; - procedure SetName(const NewName: TComponentName); override; - procedure UpdateControl(AInfo: TcxUpdateControlInfo); override; - - function GetControllerClass: TcxCustomGridControllerClass; override; - function GetDataControllerClass: TcxCustomDataControllerClass; override; - function GetItemDataBindingClass: TcxGridChartItemDataBindingClass; virtual; - function GetPainterClass: TcxCustomGridPainterClass; override; - function GetViewDataClass: TcxCustomGridViewDataClass; override; - function GetViewInfoClass: TcxCustomGridViewInfoClass; override; - - function GetLegendClass: TcxGridChartLegendClass; virtual; - function GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; override; - function GetOptionsCustomizeClass: TcxGridChartOptionsCustomizeClass; virtual; - function GetOptionsViewClass: TcxCustomGridOptionsViewClass; override; - function GetStylesClass: TcxCustomGridViewStylesClass; override; - function GetTitleClass: TcxGridChartTitleClass; virtual; - function GetToolBoxClass: TcxGridChartToolBoxClass; virtual; - - function GetAreaDiagramClass: TcxGridChartAreaDiagramClass; virtual; - function GetBarDiagramClass: TcxGridChartBarDiagramClass; virtual; - function GetCategoriesClass: TcxGridChartCategoriesClass; virtual; - function GetColumnDiagramClass: TcxGridChartColumnDiagramClass; virtual; - function GetLineDiagramClass: TcxGridChartLineDiagramClass; virtual; - function GetPieDiagramClass: TcxGridChartPieDiagramClass; virtual; - - function GetCategoriesNamePath: string; virtual; - - procedure AddDiagram(ADiagram: TcxGridChartDiagram); - procedure RemoveDiagram(ADiagram: TcxGridChartDiagram); - procedure ClearDiagrams; - function CreateDiagram(ADiagramClass: TcxGridChartDiagramClass): TcxGridChartDiagram; - procedure CreateDiagrams; virtual; - procedure DiagramRemoved(ADiagram: TcxGridChartDiagram); virtual; - function GetDiagramNamePath(ADiagram: TcxGridChartDiagram): string; virtual; - function GetFirstAvailableDiagram: TcxGridChartDiagram; - procedure RefreshAvailableDiagramList; - - function GetNextID: Integer; - procedure ReleaseID(AID: Integer); - - procedure DataSortingChanged(AItem: TObject); virtual; - procedure DataSortingChanging(AItem: TObject); virtual; - procedure UpdateDataController(AItem: TObject; ADataBinding: TcxGridChartItemDataBinding; - AAdd: Boolean); - procedure UpdateSummaryItemValues; - - function GetItemList(AItemClass: TcxGridChartItemClass): TList; overload; virtual; - function GetItemList(AItem: TcxGridChartItem): TList; overload; - function GetVisibleItemList(AItem: TcxGridChartItem): TList; virtual; - procedure AddItem(AItem: TcxGridChartItem); - procedure RemoveItem(AItem: TcxGridChartItem); - function GetItemIndex(AItem: TcxGridChartItem): Integer; - procedure SetItemIndex(AItem: TcxGridChartItem; AIndex: Integer); - procedure DataGroupVisibilityChanged(ADataGroup: TcxGridChartDataGroup); virtual; - procedure ItemDisplayTextChanged(AItem: TcxGridChartItem); virtual; - procedure ItemIndexChanged(AItem: TcxGridChartItem); virtual; - procedure ItemPosChanged(AItem: TcxGridChartItem); virtual; - procedure ItemVisibilityChanged(AItem: TcxGridChartItem); virtual; - procedure ItemVisibilityForCustomizationChanged(AItem: TcxGridChartItem); virtual; - procedure SeriesVisibilityChanged(ASeries: TcxGridChartSeries); virtual; - procedure RefreshVisibleItemsList(AItems, AVisibleItems: TList); - procedure UpdateItemsOrder(AItemClass: TcxGridChartItemClass); - - procedure ClearItems(AItemClass: TcxGridChartItemClass); - function CreateItem(AItemClass: TcxGridChartItemClass): TcxGridChartItem; - function FindItemByID(AItemClass: TcxGridChartItemClass; AID: Integer): TcxGridChartItem; - function FindItemByName(AItemClass: TcxGridChartItemClass; const AName: string): TcxGridChartItem; - function FindItemByTag(AItemClass: TcxGridChartItemClass; ATag: TcxTag): TcxGridChartItem; - - function GetAvailableDataLevel(ALevel: Integer): Integer; - function GetDataLevelCount: Integer; virtual; - function GetDataLevelObject(Index: Integer): TcxGridChartDataGroup; virtual; - function GetDataObjectLevel(AObject: TcxGridChartDataGroup): Integer; virtual; - procedure SetDataObjectLevel(AObject: TcxGridChartDataGroup; ALevel: Integer); virtual; - function GetIsDataGrouped: Boolean; virtual; - procedure UpdateDataGroupActiveValues; - procedure UpdateDataLevels; - procedure UpdateDataSortingBySummary; - - procedure CalculateImageWidth(var AWidth: Integer); virtual; - procedure CalculateImageHeight(var AHeight: Integer); virtual; - - procedure DoActiveDataLevelChanged; virtual; - procedure DoActiveDiagramChanged(ADiagram: TcxGridChartDiagram); virtual; - procedure DoCustomDrawLegend(ACanvas: TcxCanvas; AViewInfo: TcxGridChartLegendViewInfo; - var ADone: Boolean); virtual; - procedure DoCustomDrawLegendItem(ACanvas: TcxCanvas; AViewInfo: TcxGridChartLegendItemViewInfo; - var ADone: Boolean); virtual; - procedure DoDataGroupPosChanged(ADataGroup: TcxGridChartDataGroup); virtual; - procedure DoFirstVisibleCategoryIndexChanged; virtual; - procedure DoGetValueHint(ASeries: TcxGridChartSeries; AValueIndex: Integer; - var AHint: string); virtual; - procedure DoSeriesPosChanged(ASeries: TcxGridChartSeries); virtual; - function DoValueClick(ASeries: TcxGridChartSeries; AValueIndex: Integer): Boolean; virtual; - function HasCustomDrawLegend: Boolean; virtual; - function HasCustomDrawLegendItem: Boolean; virtual; - - property DataGroupActiveValuesUpdateNeeded: Boolean read FDataGroupActiveValuesUpdateNeeded; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: IcxGridChartItem read GetItem; - property RestoringDataGroups: TcxGridOpenChartItemList read FRestoringDataGroups; - property RestoringSeries: TcxGridOpenChartItemList read FRestoringSeries; - public - // base - function CreateImage(AGraphicClass: TGraphicClass; AWidth: Integer = 0; AHeight: Integer = 0): TGraphic; - property Controller: TcxGridChartController read GetController; - property ViewData: TcxGridChartViewData read GetViewData; - property ViewInfo: TcxGridChartViewInfo read GetViewInfo; - - // diagrams - function FindDiagramByDisplayText(const ADisplayText: string): TcxGridChartDiagram; - function FindDiagramByID(const AID: string): TcxGridChartDiagram; - property AvailableDiagramCount: Integer read GetAvailableDiagramCount; - property AvailableDiagrams[Index: Integer]: TcxGridChartDiagram read GetAvailableDiagram; - property DiagramCount: Integer read GetDiagramCount; - property Diagrams[Index: Integer]: TcxGridChartDiagram read GetDiagram; - - // series - procedure ClearSeries; - function CreateSeries: TcxGridChartSeries; - function FindSeriesByID(AID: Integer): TcxGridChartSeries; - function FindSeriesByName(const AName: string): TcxGridChartSeries; - function FindSeriesByTag(ATag: TcxTag): TcxGridChartSeries; - function GetSeriesClass: TcxGridChartSeriesClass; virtual; - - property Series[Index: Integer]: TcxGridChartSeries read GetSeries write SetSeries; - property SeriesCount: Integer read GetSeriesCount; - property SortedSeries: TcxGridChartSeries read GetSortedSeries write SetSortedSeries; - property VisibleSeries[Index: Integer]: TcxGridChartSeries read GetVisibleSeries; - property VisibleSeriesCount: Integer read GetVisibleSeriesCount; - - // data groups - procedure ClearDataGroups; - function CreateDataGroup: TcxGridChartDataGroup; - function FindDataGroupByID(AID: Integer): TcxGridChartDataGroup; - function FindDataGroupByName(const AName: string): TcxGridChartDataGroup; - function FindDataGroupByTag(ATag: TcxTag): TcxGridChartDataGroup; - function GetDataGroupClass: TcxGridChartDataGroupClass; virtual; - - function CanActivateDataLevel(ALevel: Integer): Boolean; - - property ActiveDataGroup: TcxGridChartDataGroup read GetActiveDataGroup write SetActiveDataGroup; - property ActiveDataLevel: Integer read FActiveDataLevel write SetActiveDataLevel; - property DataLevelCount: Integer read GetDataLevelCount; - property DataLevelObjects[Index: Integer]: TcxGridChartDataGroup read GetDataLevelObject; - property DataGroupCount: Integer read GetDataGroupCount; - property DataGroups[Index: Integer]: TcxGridChartDataGroup read GetDataGroup write SetDataGroup; - property IsDataGrouped: Boolean read GetIsDataGrouped; - property VisibleDataGroupCount: Integer read GetVisibleDataGroupCount; - property VisibleDataGroups[Index: Integer]: TcxGridChartDataGroup read GetVisibleDataGroup; - published - property ActiveDiagram: TcxGridChartDiagram read FActiveDiagram write SetActiveDiagram stored False; - property Categories: TcxGridChartCategories read FCategories write SetCategories - ; - property DataController: TcxGridChartDataController read GetDataController write SetDataController; - property DiagramArea: TcxGridChartAreaDiagram read FDiagramArea write SetDiagramArea; - property DiagramBar: TcxGridChartBarDiagram read FDiagramBar write SetDiagramBar; - property DiagramColumn: TcxGridChartColumnDiagram read FDiagramColumn write SetDiagramColumn; - property DiagramLine: TcxGridChartLineDiagram read FDiagramLine write SetDiagramLine; - property DiagramPie: TcxGridChartPieDiagram read FDiagramPie write SetDiagramPie; - property Legend: TcxGridChartLegend read FLegend write SetLegend; - property OptionsBehavior: TcxGridChartOptionsBehavior read GetOptionsBehavior write SetOptionsBehavior; - property OptionsCustomize: TcxGridChartOptionsCustomize read FOptionsCustomize write SetOptionsCustomize; - property OptionsView: TcxGridChartOptionsView read GetOptionsView write SetOptionsView; - property Styles: TcxGridChartViewStyles read GetStyles write SetStyles; - property Title: TcxGridChartTitle read FTitle write SetTitle; - property ToolBox: TcxGridChartToolBox read FToolBox write SetToolBox; - - property CategoriesEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property DiagramAreaEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property DiagramBarEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property DiagramColumnEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property DiagramLineEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property DiagramPieEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - - property OnActiveDataLevelChanged: TNotifyEvent read FOnActiveDataLevelChanged write SetOnActiveDataLevelChanged; - property OnActiveDiagramChanged: TcxGridChartDiagramEvent read FOnActiveDiagramChanged write SetOnActiveDiagramChanged; - property OnCustomDrawLegend: TcxGridChartLegendCustomDrawEvent read FOnCustomDrawLegend write SetOnCustomDrawLegend; - property OnCustomDrawLegendItem: TcxGridChartLegendItemCustomDrawEvent read FOnCustomDrawLegendItem write SetOnCustomDrawLegendItem; - property OnCustomization; - property OnDataGroupPosChanged: TcxGridChartDataGroupEvent read FOnDataGroupPosChanged write SetOnDataGroupPosChanged; - property OnFirstVisibleCategoryIndexChanged: TNotifyEvent read FOnFirstVisibleCategoryIndexChanged write SetOnFirstVisibleCategoryIndexChanged; - property OnGetValueHint: TcxGridChartGetValueHintEvent read FOnGetValueHint write SetOnGetValueHint; - property OnInitStoredObject; - property OnSeriesPosChanged: TcxGridChartSeriesEvent read FOnSeriesPosChanged write SetOnSeriesPosChanged; - property OnValueClick: TcxGridChartValueClickEvent read FOnValueClick write SetOnValueClick; - end; - -var - cxGridChartDiagramImages: TImageList; - -procedure cxGridChartDiagramImages_Add(const AResourceName: string); - -function IsValueTypeClassValid(AValueTypeClass: TcxValueTypeClass): Boolean; - -implementation - -{$R cxGridChartView.res} - -uses -{$IFDEF DELPHI6} - Types, StrUtils, -{$IFNDEF NONDB} - FMTBcd, -{$ENDIF} -{$ENDIF} - SysUtils, Math, ImgList, - cxEditDataRegisteredRepositoryItems, cxGrid, cxGridLevel, cxGridStrs, cxListBox, - cxTextEdit, cxLibraryConsts; - -const - ChartPartOffset = 10; - - MarkWidth = 1; - CategoryGridLineWidth = 1; - ValueGridLineWidth = 1; - ValueAxisWidth = CategoryGridLineWidth; - CategoryAxisWidth = ValueGridLineWidth; - - TickMarkLabelsOffset = 10; - - ColumnDiagramValueOffsetUnits = 3; - ColumnDiagramValueSizeUnits = 4; - - LineDiagramCaptionOffset = 2; - LineDiagramValueSizeUnits = 2; - LineDiagramLineHotZoneMinWidth = 5; - - AreaDiagramLegendKeyOffset = 2; - AreaDiagramLegendKeySpace = 3; - - PieMinSize = 100; - PieSeriesSiteOffset = 10; - PieAreaOffset = 20; - PieValueCaptionOffset = 4; - PieLeaderLineSegment1 = 12; - PieLeaderLineSegment2 = 9; - - ToolBoxItemOffset = 5; - ToolBoxItemSeparatorWidth = 1; - ToolBoxDataLevelInfoConnectorWidth = 1; - ToolBoxDiagramImageOffset = 2; - - DefaultItemDisplayText = ''; - - ValueHintOffset = 27; - -procedure cxGridChartDiagramImages_Add(const AResourceName: string); -var - B: TBitmap; -begin - B := TBitmap.Create; - try - B.LoadFromResourceName(HInstance, AResourceName); - cxGridChartDiagramImages.AddMasked(B, B.TransparentColor); - finally - B.Free; - end; -end; - -function GetDefaultValueColor(AIndex: Integer): TColor; -const - ColorCount = 24; - Colors: array[0..ColorCount - 1] of TColor = - ($60C1FF, $B4835C, $7C58A5, $657C6C, $6379E6, $9AA05B, $605DCF, $6A8846, - $61A3F5, $58999E, $5A8CFF, $AD977A, $808E54, $95C9B9, $6763A5, $AC8C4D, - $80E4FB, $956349, $4D50C0, $67B48B, $D6A584, $73D8DD, $89674D, $9CB5A5); -begin - Result := Colors[AIndex mod ColorCount]; -end; - -function GetHotColor(AColor: TColor): TColor; -const - Alpha = 80; - //Delta = 25; -var - R, G, B: Byte; -begin - Result := ColorToRGB(AColor); - R := GetRValue(Result); - G := GetGValue(Result); - B := GetBValue(Result); -{ // MS Money style - does not give good results on light colors (clRed, clLime, ...) - Result := RGB( - Min(R + Delta, 255), - Min(G + Delta, 255), - Min(B + Delta, 255) - );} - // alpha blending with white color - Result := RGB( - MulDiv(R, Alpha, 100) + MulDiv(255, 100 - Alpha, 100), - MulDiv(G, Alpha, 100) + MulDiv(255, 100 - Alpha, 100), - MulDiv(B, Alpha, 100) + MulDiv(255, 100 - Alpha, 100) - ); -end; - -procedure PositionRect(out R: TRect; var AClientR: TRect; AWidth, AHeight, AOffset: Integer; - APosition: TcxGridChartPartPosition); -begin - R := AClientR; - case APosition of - cppLeft: - begin - R.Right := R.Left + AWidth; - AClientR.Left := R.Right + AOffset; - end; - cppTop: - begin - R.Bottom := R.Top + AHeight; - AClientR.Top := R.Bottom + AOffset; - end; - cppRight: - begin - R.Left := R.Right - AWidth; - AClientR.Right := R.Left - AOffset; - end; - cppBottom: - begin - R.Top := R.Bottom - AHeight; - AClientR.Bottom := R.Top - AOffset; - end; - end; -end; - -procedure AlignRect(var R: TRect; AWidth, AHeight: Integer; AIsHorizontal: Boolean; - AAlignment: TcxGridChartPartAlignment); -var - AOriginalR: TRect; -begin - AOriginalR := R; - case AAlignment of - cpaStart: - if AIsHorizontal then - R.Right := R.Left + AWidth - else - R.Bottom := R.Top + AHeight; - cpaCenter: - if AIsHorizontal then - begin - R.Left := (R.Left + R.Right - AWidth) div 2; - R.Right := R.Left + AWidth; - end - else - begin - R.Top := (R.Top + R.Bottom - AHeight) div 2; - R.Bottom := R.Top + AHeight; - end; - cpaEnd: - if AIsHorizontal then - R.Left := R.Right - AWidth - else - R.Top := R.Bottom - AHeight; - end; -// IntersectRect(R, R, AOriginalR); -end; - -procedure CheckRectBounds(var R: TRect); -begin - with R do - begin - if Left > Right then - SwapIntegers(Left, Right); - if Top > Bottom then - SwapIntegers(Top, Bottom); - end; -end; - -procedure GetCenteredRect(const ACenter: TPoint; AWidth, AHeight: Integer; out R: TRect); -begin - R.Left := ACenter.X - AWidth div 2; - R.Right := R.Left + AWidth; - R.Top := ACenter.Y - AHeight div 2; - R.Bottom := R.Top + AHeight; -end; - -{$IFNDEF DELPHI6} - -type - TValueSign = -1..1; - -function Sign(const AValue: Double): TValueSign; -const - NegativeValue = Low(TValueSign); - ZeroValue = 0; - PositiveValue = High(TValueSign); -begin - if (PInt64(@AValue)^ and $7FFFFFFFFFFFFFFF) = $0000000000000000 then - Result := ZeroValue - else - if (PInt64(@AValue)^ and $8000000000000000) = $8000000000000000 then - Result := NegativeValue - else - Result := PositiveValue; -end; - -{$ENDIF} - -const - ErrorValue = 1e-15; - -function Fraction(const AValue: Extended): Extended; -begin - Result := Frac(AValue); - if Result <> 0 then // to fix the bug in standard implementation - begin - Result := Frac(AValue + Sign(AValue) * ErrorValue); - if Abs(Result) < ErrorValue then - Result := 0 - else - begin - Result := Frac(AValue - Sign(AValue) * ErrorValue); - if 1 - Abs(Result) < ErrorValue then - Result := 0; - end; - end; -end; - -function Ceiling(const X: Extended): Integer; -begin - Result := Integer(Trunc(X)); - if Fraction(X) > 0 then Inc(Result); -end; - -procedure CheckZero(var AValue: Extended); -begin - if Abs(AValue) < ErrorValue then AValue := 0; -end; - -function IsPositive(const AValue: Extended): Boolean; -begin - Result := AValue >= 0; -end; - -function IsValueTypeValid(AValueType: {$IFDEF DELPHI6}TVarType{$ELSE}Integer{$ENDIF}; - AOnlyIntegerTypes: Boolean): Boolean; -const - ValidIntegerValueTypes = [varSmallint, varInteger, varByte - {$IFDEF DELPHI6}, varShortInt, varWord, varLongWord, varInt64{$ENDIF}]; - ValidFloatValueTypes = [varSingle, varDouble, varCurrency]; -begin - Result := (AValueType in ValidIntegerValueTypes) or not AOnlyIntegerTypes and - ((AValueType in ValidFloatValueTypes){$IFDEF DELPHI6}{$IFNDEF NONDB} or (AValueType = VarFMTBcd){$ENDIF}{$ENDIF}); -end; - -function IsValueTypeClassValid(AValueTypeClass: TcxValueTypeClass): Boolean; -begin - Result := IsValueTypeValid(AValueTypeClass.GetVarType, False); -end; - -function IsValueValid(const AValue: Variant): Boolean; -begin - Result := IsValueTypeValid(VarType(AValue), False); -end; - -function GetPointOnCircle(const ACenter: TPoint; ARadius, AAngle: Integer): TPoint; -var - ASin, ACos: Extended; -begin - SinCos(DegToRad(AAngle - 90), ASin, ACos); - Result.X := ACenter.X + Round(ARadius * ACos); - Result.Y := ACenter.Y + Round(ARadius * ASin); -end; - -function LineHasPoint(const ALineStart, ALineFinish: TPoint; ALineWidth: Integer; - const P: TPoint; AHotZoneMinWidth: Integer): Boolean; -var - ALineIntersectionY, AHotZoneSizeY: Integer; -begin - Result := (ALineStart.X <= P.X) and (P.X < ALineFinish.X); - if Result then - begin - ALineIntersectionY := ALineStart.Y + MulDiv(ALineFinish.Y - ALineStart.Y, - P.X - ALineStart.X, ALineFinish.X - ALineStart.X); - AHotZoneSizeY := Abs(Round(Max(AHotZoneMinWidth, ALineWidth div 2) * - Sqrt(1 + Sqr((ALineFinish.Y - ALineStart.Y) / (ALineFinish.X - ALineStart.X))))); - Result := - (ALineIntersectionY - AHotZoneSizeY <= P.Y) and - (P.Y <= ALineIntersectionY + AHotZoneSizeY); - end; -end; - -{ TcxGridChartTitleHitTest } - -class function TcxGridChartTitleHitTest.GetHitTestCode: Integer; -begin - Result := htChartTitle; -end; - -{ TcxGridChartLegendHitTest } - -class function TcxGridChartLegendHitTest.GetHitTestCode: Integer; -begin - Result := htLegend; -end; - -{ TcxGridChartLegendItemHitTest } - -class function TcxGridChartLegendItemHitTest.GetHitTestCode: Integer; -begin - Result := htLegendItem; -end; - -{ TcxGridChartToolBoxHitTest } - -class function TcxGridChartToolBoxHitTest.GetHitTestCode: Integer; -begin - Result := htChartToolBox; -end; - -{ TcxGridChartDataLevelInfoHitTest } - -procedure TcxGridChartDataLevelInfoHitTest.SetDataLevel(Value: Integer); -begin - FDataLevel := Value; - if FDataLevel = -1 then - FDataLevelObject := nil - else - FDataLevelObject := TcxGridChartView(GridView).DataLevelObjects[FDataLevel]; -end; - -procedure TcxGridChartDataLevelInfoHitTest.SetDataLevelObject(Value: TcxGridChartDataGroup); -begin - FDataLevelObject := Value; - if FDataLevelObject = nil then - FDataLevel := -1 - else - FDataLevel := FDataLevelObject.DataLevel; -end; - -class function TcxGridChartDataLevelInfoHitTest.GetHitTestCode: Integer; -begin - Result := htDataLevelInfo; -end; - -function TcxGridChartDataLevelInfoHitTest.DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; -begin - if (DataLevelObject <> nil) and DataLevelObject.CanMove then - Result := TcxGridChartView(GridView).Controller.GetDataLevelInfoDragAndDropObjectClass - else - Result := nil; -end; - -{ TcxGridChartDataLevelActiveValueInfoHitTest } - -class function TcxGridChartDataLevelActiveValueInfoHitTest.GetHitTestCode: Integer; -begin - Result := htDataLevelActiveValueInfo; -end; - -function TcxGridChartDataLevelActiveValueInfoHitTest.Cursor: TCursor; -begin - if CanDropDown then - Result := crcxHandPoint - else - Result := inherited Cursor; -end; - -function TcxGridChartDataLevelActiveValueInfoHitTest.DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; -begin - if CanDropDown then - Result := nil - else - Result := inherited DragAndDropObjectClass; -end; - -{ TcxGridChartCustomizeButtonHitTest } - -class function TcxGridChartCustomizeButtonHitTest.GetHitTestCode: Integer; -begin - Result := htChartCustomizeButton; -end; - -{ TcxGridChartDiagramSelectorHitTest } - -class function TcxGridChartDiagramSelectorHitTest.GetHitTestCode: Integer; -begin - Result := htDiagramSelector; -end; - -function TcxGridChartDiagramSelectorHitTest.Cursor: TCursor; -begin - if CanDropDown then - Result := crcxHandPoint - else - Result := inherited Cursor; -end; - -{ TcxGridChartValueHitTest } - -class function TcxGridChartValueHitTest.GetHitTestCode: Integer; -begin - Result := htChartValue; -end; - -function TcxGridChartValueHitTest.Cursor: TCursor; -begin - if CanDrillDown then - Result := crcxGridMagnifier - else - Result := inherited Cursor; -end; - -{ TcxGridChartHistogramPlotHitTest } - -class function TcxGridChartHistogramPlotHitTest.GetHitTestCode: Integer; -begin - Result := htPlot; -end; - -{ TcxGridChartHistogramCategoryAxisTitleHitTest } - -class function TcxGridChartHistogramCategoryAxisTitleHitTest.GetHitTestCode: Integer; -begin - Result := htCategoryAxisTitle; -end; - -{ TcxGridChartHistogramValueAxisTitleHitTest } - -class function TcxGridChartHistogramValueAxisTitleHitTest.GetHitTestCode: Integer; -begin - Result := htValueAxisTitle; -end; - -{ TcxGridChartValueLineHitTest } - -class function TcxGridChartValueLineHitTest.GetHitTestCode: Integer; -begin - Result := htChartValueLine; -end; - -{ TcxGridChartValueAreaHitTest } - -class function TcxGridChartValueAreaHitTest.GetHitTestCode: Integer; -begin - Result := htChartValueArea; -end; - -{ TcxGridChartPieSeriesSiteHitTest } - -class function TcxGridChartPieSeriesSiteHitTest.GetHitTestCode: Integer; -begin - Result := htSeriesSite; -end; - -{ TcxGridChartPieSeriesSiteCaptionHitTest } - -class function TcxGridChartPieSeriesSiteCaptionHitTest.GetHitTestCode: Integer; -begin - Result := htSeriesSiteCaption; -end; - -{ TcxCustomGridChartMovingObject } - -function TcxCustomGridChartMovingObject.GetController: TcxGridChartController; -begin - Result := TcxGridChartController(inherited Controller); -end; - -function TcxCustomGridChartMovingObject.GetCustomizationForm: TcxGridChartCustomizationForm; -begin - Result := TcxGridChartCustomizationForm(inherited CustomizationForm); -end; - -function TcxCustomGridChartMovingObject.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -function TcxCustomGridChartMovingObject.GetViewInfo: TcxGridChartViewInfo; -begin - Result := TcxGridChartViewInfo(inherited ViewInfo); -end; - -{ TcxGridChartDataGroupMovingObject } - -constructor TcxGridChartDataGroupMovingObject.Create(AControl: TcxControl); -begin - inherited; - FDestDataLevel := -1; -end; - -function TcxGridChartDataGroupMovingObject.GetSourceItem: TcxGridChartDataGroup; -begin - Result := TcxGridChartDataGroup(inherited SourceItem); -end; - -procedure TcxGridChartDataGroupMovingObject.SetDestDataLevel(Value: Integer); -begin - if FDestDataLevel <> Value then - begin - Dirty := True; - FDestDataLevel := Value; - end; -end; - -procedure TcxGridChartDataGroupMovingObject.SetSourceItem(Value: TcxGridChartDataGroup); -begin - inherited SourceItem := Value; -end; - -function TcxGridChartDataGroupMovingObject.CanRemove: Boolean; -begin - Result := SourceItem.Visible and SourceItem.VisibleForCustomization and - (GridView.OptionsCustomize.DataGroupHiding or Controller.Customization); -end; - -function TcxGridChartDataGroupMovingObject.GetArrowAreaBounds(APlace: TcxGridArrowPlace): TRect; -begin - Result := ViewInfo.ToolBoxViewInfo.GetDataGroupInsertionBounds(DestDataLevel); -end; - -function TcxGridChartDataGroupMovingObject.GetCustomizationFormListBox: TcxCustomGridItemsListBox; -begin - Result := CustomizationForm.DataGroupsListBox; -end; - -function TcxGridChartDataGroupMovingObject.GetSourceItemViewInfo: TcxCustomGridCellViewInfo; -begin - if SourceItemContainerKind = ckToolBox then - Result := ViewInfo.ToolBoxViewInfo.DataLevelInfos[SourceItem.DataLevel] - else - Result := inherited GetSourceItemViewInfo; -end; - -function TcxGridChartDataGroupMovingObject.IsSourceCustomizationForm: Boolean; -begin - Result := SourceItemContainerKind = ckCustomizationForm; -end; - -function TcxGridChartDataGroupMovingObject.IsValidDestination: Boolean; -begin - Result := (DestDataLevel <> -1) and (not SourceItem.Visible or - (DestDataLevel < SourceItem.DataLevel) or (DestDataLevel > SourceItem.DataLevel + 1)); -end; - -procedure TcxGridChartDataGroupMovingObject.BeginDragAndDrop; -begin - if CustomizationForm <> nil then - CustomizationForm.PrepareForDataGroupDragAndDrop; - Controller.FMovingDataGroup := SourceItem; - inherited; -end; - -procedure TcxGridChartDataGroupMovingObject.DragAndDrop(const P: TPoint; var Accepted: Boolean); -begin - DestDataLevel := ViewInfo.ToolBoxViewInfo.GetDataGroupInsertionIndex(P); - Accepted := (ViewInfo.GetHitTest(P).HitTestCode = htCustomizationForm) or - (DestDataLevel <> -1); - inherited; -end; - -procedure TcxGridChartDataGroupMovingObject.EndDragAndDrop(Accepted: Boolean); - - function GetNewDataLevel: Integer; - begin - Result := DestDataLevel; - if SourceItem.Visible and (SourceItem.DataLevel < Result) then - Dec(Result); - end; - -var - ADataGroupPositionChanged: Boolean; -begin - inherited; - Controller.FMovingDataGroup := nil; - if not Accepted then Exit; - ADataGroupPositionChanged := False; - if DestDataLevel = -1 then - if CanRemove then - begin - SourceItem.Visible := False; - ADataGroupPositionChanged := True; - end - else - else - if IsValidDestination then - begin - SourceItem.DataLevel := GetNewDataLevel; - ADataGroupPositionChanged := True; - end; - if ADataGroupPositionChanged then - GridView.DoDataGroupPosChanged(SourceItem); -end; - -procedure TcxGridChartDataGroupMovingObject.Init(const P: TPoint; AParams: TcxCustomGridHitTest); -begin - inherited; - with AParams as TcxGridChartDataLevelInfoHitTest do - begin - SourceItem := DataLevelObject; - SourceItemContainerKind := DataLevelObjectContainerKind; - end; -end; - -{ TcxGridChartSeriesInnerCheckListBox } - -function TcxGridChartSeriesInnerCheckListBox.GetMetrics: TcxCheckListBoxMetrics; -begin - Result := inherited GetMetrics; - Inc(Result.CheckFrameWidth, cxTextOffset); - Inc(Result.ContentOffset, cxTextOffset); - Inc(Result.ImageFrameWidth, 1); - Result.TextAreaOffset := 0; - Inc(Result.TextOffset, 1); -end; - -function TcxGridChartSeriesInnerCheckListBox.GetSeriesImageSize: Integer; -begin - Result := GetStandardItemHeight - 2 * (Metrics.ImageFrameWidth + 1); -end; - -{ TcxGridChartSeriesCheckListBox } - -constructor TcxGridChartSeriesCheckListBox.Create(AOwner: TComponent; - AGridView: TcxGridChartView); -begin - inherited Create(AOwner); - FGridView := AGridView; - DragCursor := crcxGridDrag; - DragMode := dmAutomatic; - ImageLayout := ilAfterChecks; - Style.LookAndFeel.MasterLookAndFeel := GridView.LookAndFeel; - Style.HotTrack := False; - OnClickCheck := CheckClicked; - FSeriesImages := TImageList.Create(nil); - EditValueFormat := cvfIndices; -end; - -destructor TcxGridChartSeriesCheckListBox.Destroy; -begin - FreeAndNil(FSeriesImages); - inherited; -end; - -function TcxGridChartSeriesCheckListBox.GetSeries(AIndex: Integer): TcxGridChartSeries; -begin - Result := TcxGridChartSeries(Items[AIndex].ItemObject); -end; - -procedure TcxGridChartSeriesCheckListBox.CheckClicked(Sender: TObject; AIndex: Integer; - APrevState, ANewState: TcxCheckBoxState); -begin - LockRefreshItems := True; - try - Series[AIndex].Visible := ANewState = cbsChecked; - finally - LockRefreshItems := False; - end; - GridView.DoSeriesPosChanged(Series[AIndex]); -end; - -procedure TcxGridChartSeriesCheckListBox.CreateWnd; -begin - inherited; - RefreshItems; -end; - -procedure TcxGridChartSeriesCheckListBox.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -var - AItemIndex: Integer; -begin - inherited; - AItemIndex := ItemAtPos(Point(X, Y), True); - Accept := AItemIndex <> -1; - if Accept and (Series[AItemIndex] <> FDraggingSeries) then - begin - FDraggingSeries.Index := Series[AItemIndex].Index; - ItemIndex := AItemIndex; - GridView.DoSeriesPosChanged(FDraggingSeries); - end; -end; - -procedure TcxGridChartSeriesCheckListBox.DrawSeriesImage(ACanvas: TcxCanvas; - const R: TRect; ASeries: TcxGridChartSeries); -var - AParams: TcxViewParams; -begin - ASeries.Styles.GetValueParams(-1, False, AParams); - ACanvas.FillRect(R, AParams, cxBordersAll, clWindowText); -end; - -function TcxGridChartSeriesCheckListBox.GetInnerCheckListBoxClass: TcxCustomInnerCheckListBoxClass; -begin - Result := TcxGridChartSeriesInnerCheckListBox; -end; - -procedure TcxGridChartSeriesCheckListBox.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited; - RefreshImages; -end; - -procedure TcxGridChartSeriesCheckListBox.RefreshImages; -begin - if SeriesImages = nil then Exit; - Images := nil; - RefreshSeriesImages; - Images := SeriesImages; -end; - -procedure TcxGridChartSeriesCheckListBox.RefreshSeriesImages; -var - AImage: TBitmap; - AImageCanvas: TcxCanvas; - I: Integer; -begin - SeriesImages.Clear; - SeriesImages.Masked := False; - SeriesImages.Width := TcxGridChartSeriesInnerCheckListBox(InnerCheckListBox).GetSeriesImageSize; - SeriesImages.Height := SeriesImages.Width; - - AImage := TBitmap.Create; - AImageCanvas := TcxCanvas.Create(AImage.Canvas); - try - AImage.Width := SeriesImages.Width; - AImage.Height := SeriesImages.Height; - for I := 0 to Items.Count - 1 do - begin - DrawSeriesImage(AImageCanvas, Rect(0, 0, AImage.Width, AImage.Height), Series[I]); - SeriesImages.Add(AImage, nil); - end; - finally - AImageCanvas.Free; - AImage.Free; - end; -end; - -procedure TcxGridChartSeriesCheckListBox.RefreshItems; -var - I: Integer; - ASeries: TcxGridChartSeries; -begin - if LockRefreshItems then - Exit; - with Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to GridView.SeriesCount - 1 do - begin - ASeries := GridView.Series[I]; - if ASeries.VisibleForCustomization then - with Add do - begin - ItemObject := ASeries; - Text := ASeries.GetDisplayText; - Checked := ASeries.Visible; - ImageIndex := Index; - end; - end; - RefreshImages; - finally - EndUpdate; - end; - end; -end; - -function TcxGridChartSeriesCheckListBox.StartDrag(DragObject: TDragObject): Boolean; -var - AItemIndex: Integer; -begin - Result := inherited StartDrag(DragObject); - if Result then - begin - AItemIndex := ItemAtPos(ScreenToClient(GetMouseCursorPos), True); - Result := AItemIndex <> -1; - if Result then - FDraggingSeries := Series[AItemIndex]; - end; -end; - -{ TcxGridChartSortBySeriesComboBox } - -constructor TcxGridChartSortBySeriesComboBox.Create(AOwner: TComponent; - AGridView: TcxGridChartView); -begin - inherited Create(AOwner); - FGridView := AGridView; - Properties.DropDownListStyle := lsFixedList; - FDirectionButton := Properties.Buttons.Add; - FDirectionButton.Kind := bkGlyph; - Properties.OnDrawItem := DrawItem; - Properties.OnMeasureItem := MeasureItem; - Style.LookAndFeel.MasterLookAndFeel := GridView.LookAndFeel; - Style.HotTrack := False; - RefreshItems; -end; - -procedure TcxGridChartSortBySeriesComboBox.Click; -begin - GridView.SortedSeries := TcxGridChartSeries(ItemObject); - inherited; -end; - -procedure TcxGridChartSortBySeriesComboBox.DirectionButtonClick; -begin - with GridView.SortedSeries do - if SortOrder = soAscending then - SortOrder := soDescending - else - SortOrder := soAscending; -end; - -procedure TcxGridChartSortBySeriesComboBox.DoButtonClick(AButtonVisibleIndex: Integer); -begin - if AButtonVisibleIndex = DirectionButton.Index then - DirectionButtonClick; - inherited; -end; - -procedure TcxGridChartSortBySeriesComboBox.DrawItem(AControl: TcxCustomComboBox; - ACanvas: TcxCanvas; AIndex: Integer; const ARect: TRect; AState: TOwnerDrawState); - - function GetKeyBounds: TRect; - const - KeyOffset = 1; - var - AKeySize: Integer; - begin - Result := ARect; - AKeySize := ACanvas.TextHeight('Qq') - 2 * KeyOffset; - with Result do - begin - InflateRect(Result, -(cxTextOffset + KeyOffset), -(Bottom - Top - AKeySize) div 2); - Right := Left + AKeySize; - end; - end; - -var - ASeries: TcxGridChartSeries; - AParams: TcxViewParams; - ABrushColor: TColor; - ATextRect: TRect; -begin - ASeries := TcxGridChartSeries(Properties.Items.Objects[AIndex]); - if ASeries <> nil then - begin - ASeries.Styles.GetValueParams(-1, False, AParams); - ABrushColor := ACanvas.Brush.Color; - ACanvas.FillRect(GetKeyBounds, AParams, cxBordersAll, clWindowText, 1, True); - ACanvas.Brush.Color := ABrushColor; - end; - - ACanvas.FillRect(ARect); - - ATextRect := ARect; - ATextRect.Left := GetKeyBounds.Right + 2 * cxTextOffset; - ACanvas.DrawText(Properties.Items[AIndex], ATextRect, - cxSingleLine or cxAlignVCenter or cxShowEndEllipsis); -end; - -procedure TcxGridChartSortBySeriesComboBox.MeasureItem(AControl: TcxCustomComboBox; - AIndex: Integer; ACanvas: TcxCanvas; var AHeight: Integer); -begin - Inc(AHeight, 2 * cxTextOffset); -end; - -procedure TcxGridChartSortBySeriesComboBox.RefreshDirectionButton; -const - GlyphWidth = 13; - GlyphHeight = 13; - LineSize = 1; - LineOffset = 1; - LineChange = LineSize + LineOffset; -var - ASortOrder: TcxDataSortOrder; - R: TRect; - I: Integer; -begin - if GridView.SortedSeries = nil then - ASortOrder := soNone - else - ASortOrder := GridView.SortedSeries.SortOrder; - DirectionButton.Visible := ASortOrder <> soNone; - if not DirectionButton.Visible then Exit; - - with DirectionButton.Glyph do - begin - Width := GlyphWidth; - Height := GlyphHeight; - - Canvas.Brush.Color := clRed; - Canvas.FillRect(Rect(0, 0, GlyphWidth, GlyphHeight)); - - R := Rect(0, LineOffset, 0, LineOffset + LineSize); - if ASortOrder = soAscending then - R.Right := LineOffset + LineChange - else - R.Right := GlyphWidth; - Canvas.Brush.Color := clBtnText; - for I := 0 to GlyphHeight div LineChange - 1 do - begin - Canvas.FillRect(R); - if ASortOrder = soAscending then - Inc(R.Right, LineChange) - else - Dec(R.Right, LineChange); - OffsetRect(R, 0, LineChange); - end; - end; -end; - -procedure TcxGridChartSortBySeriesComboBox.RefreshItems; -var - I: Integer; - ASeries: TcxGridChartSeries; -begin - with Properties.Items do - begin - BeginUpdate; - try - Clear; - Add(cxGetResourceString(@scxGridChartCustomizationFormNoSortedSeries)); - for I := 0 to GridView.SeriesCount - 1 do - begin - ASeries := GridView.Series[I]; - if ASeries.VisibleForCustomization then - AddObject(ASeries.GetDisplayText, ASeries); - end; - ItemObject := GridView.SortedSeries; - RefreshDirectionButton; - Properties.DropDownRows := Count; - finally - EndUpdate; - end; - end; -end; - -{ TcxGridChartDataGroupsListBox } - -function TcxGridChartDataGroupsListBox.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -function TcxGridChartDataGroupsListBox.CalculateItemHeight: Integer; -begin - Result := - 2 * (LookAndFeelPainter.ChartToolBoxDataLevelInfoBorderSize + cxTextOffset) + - Canvas.TextHeight('Qq'); -end; - -procedure TcxGridChartDataGroupsListBox.DoRefreshItems; -var - I: Integer; - AItem: TcxGridChartDataGroup; -begin - inherited; - with Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to GridView.DataGroupCount - 1 do - begin - AItem := GridView.DataGroups[I]; - if AItem.VisibleForCustomization and not AItem.Visible then - AddObject(AItem.GetDisplayText, AItem); - end; - finally - EndUpdate; - end; - end; -end; - -function TcxGridChartDataGroupsListBox.GetDragAndDropParams: TcxCustomGridHitTest; -begin - Result := TcxGridChartDataLevelInfoHitTest.Instance(Point(-1, -1)); - with TcxGridChartDataLevelInfoHitTest(Result) do - begin - GridView := Self.GridView; - DataLevelObject := TcxGridChartDataGroup(DragAndDropItem); - DataLevelObjectContainerKind := ckCustomizationForm; - end; -end; - -procedure TcxGridChartDataGroupsListBox.PaintItem(ACanvas: TcxCanvas; R: TRect; - AIndex: Integer; AFocused: Boolean); -var - ABorderSize: Integer; - AParams: TcxViewParams; -begin - ABorderSize := LookAndFeelPainter.ChartToolBoxDataLevelInfoBorderSize; - if AFocused then - GridView.Styles.GetViewParams(vsActiveDataLevelInfo, nil, nil, AParams) - else - GridView.Styles.GetViewParams(vsDataLevelsInfo, nil, nil, AParams); - with ACanvas do - begin - FillRect(R, AParams, cxBordersAll, - LookAndFeelPainter.DefaultChartToolBoxDataLevelInfoBorderColor, - ABorderSize); - InflateRect(R, -(ABorderSize + cxTextOffset), -(ABorderSize + cxTextOffset)); - Brush.Style := bsClear; - Font.Color := AParams.TextColor; - DrawText(Items[AIndex], R, cxSingleLine or cxShowEndEllipsis); - Brush.Style := bsSolid; - end; -end; - -{ TcxGridChartOptionsTreeView } - -constructor TcxGridChartOptionsTreeView.Create(AOwner: TComponent; AGridView: TcxGridChartView); -begin - inherited Create(AOwner); - FGridView := AGridView; - Style.LookAndFeel.MasterLookAndFeel := GridView.LookAndFeel; - Style.HotTrack := False; -end; - -function GetChartPartPositionItemCaption(ATypeItem: Integer): string; -begin - Result := ''; - case TcxGridChartPartPosition(ATypeItem) of - cppDefault: - Result := cxGetResourceString(@scxGridChartPositionDefault); - cppNone: - Result := cxGetResourceString(@scxGridChartPositionNone); - cppLeft: - Result := cxGetResourceString(@scxGridChartPositionLeft); - cppTop: - Result := cxGetResourceString(@scxGridChartPositionTop); - cppRight: - Result := cxGetResourceString(@scxGridChartPositionRight); - cppBottom: - Result := cxGetResourceString(@scxGridChartPositionBottom); - end; -end; - -function GetChartPartAlignmentItemCaption(ATypeItem: Integer): string; -begin - Result := ''; - case TcxGridChartPartAlignment(ATypeItem) of - cpaDefault: - Result := cxGetResourceString(@scxGridChartAlignmentDefault); - cpaStart: - Result := cxGetResourceString(@scxGridChartAlignmentStart); - cpaCenter: - Result := cxGetResourceString(@scxGridChartAlignmentCenter); - cpaEnd: - Result := cxGetResourceString(@scxGridChartAlignmentEnd); - end; -end; - -function GetChartPartOrientationItemCaption(ATypeItem: Integer): string; -begin - Result := ''; - case TcxGridChartPartOrientation(ATypeItem) of - cpoDefault: - Result := cxGetResourceString(@scxGridChartOrientationDefault); - cpoHorizontal: - Result := cxGetResourceString(@scxGridChartOrientationHorizontal); - cpoVertical: - Result := cxGetResourceString(@scxGridChartOrientationVertical); - end; -end; - -function GetChartToolBoxPositionItemCaption(ATypeItem: Integer): string; -begin - Result := ''; - case TcxGridChartToolBoxPosition(ATypeItem) of - tpTop: - Result := cxGetResourceString(@scxGridChartPositionTop); - tpBottom: - Result := cxGetResourceString(@scxGridChartPositionBottom); - end; -end; - -procedure TcxGridChartOptionsTreeView.AddItems; -begin - // Legend - LegendID := AddCategory(-1, -1, cxGetResourceString(@scxGridChartLegend)); - LegendPositionID := AddCategory(LegendID, -1, cxGetResourceString(@scxGridChartPosition)); - AddRadioButtons(LegendPositionID, TypeInfo(TcxGridChartPartPosition), @GetChartPartPositionItemCaption); - LegendAlignmentID := AddCategory(LegendID, -1, cxGetResourceString(@scxGridChartAlignment)); - AddRadioButtons(LegendAlignmentID, TypeInfo(TcxGridChartPartAlignment), @GetChartPartAlignmentItemCaption); - LegendOrientationID := AddCategory(LegendID, -1, cxGetResourceString(@scxGridChartOrientation)); - AddRadioButtons(LegendOrientationID, TypeInfo(TcxGridChartPartOrientation), @GetChartPartOrientationItemCaption); - LegendBorderID := AddCheckBox(LegendID, -1, cxGetResourceString(@scxGridChartBorder)); - LegendKeyBorderID := AddCheckBox(LegendID, -1, cxGetResourceString(@scxGridChartLegendKeyBorder)); - // Title - TitleID := AddCategory(-1, -1, cxGetResourceString(@scxGridChartTitle)); - TitlePositionID := AddCategory(TitleID, -1, cxGetResourceString(@scxGridChartPosition)); - AddRadioButtons(TitlePositionID, TypeInfo(TcxGridChartPartPosition), @GetChartPartPositionItemCaption); - TitleAlignmentID := AddCategory(TitleID, -1, cxGetResourceString(@scxGridChartAlignment)); - AddRadioButtons(TitleAlignmentID, TypeInfo(TcxGridChartPartAlignment), @GetChartPartAlignmentItemCaption); - // ToolBox - ToolBoxID := AddCategory(-1, -1, cxGetResourceString(@scxGridChartToolBox)); - ToolBoxPositionID := AddCategory(ToolBoxID, -1, cxGetResourceString(@scxGridChartPosition)); - AddRadioButtons(ToolBoxPositionID, TypeInfo(TcxGridChartToolBoxPosition), @GetChartToolBoxPositionItemCaption); - ToolBoxBorderID := AddCheckBox(ToolBoxID, -1, cxGetResourceString(@scxGridChartBorder)); - ToolBoxDiagramSelectorID := AddCheckBox(ToolBoxID, -1, cxGetResourceString(@scxGridChartDiagramSelector)); - // Other - OtherID := AddCategory(-1, -1, cxGetResourceString(@scxGridChartOther)); - OtherValueHintsID := AddCheckBox(OtherID, -1, cxGetResourceString(@scxGridChartValueHints)); -end; - -function TcxGridChartOptionsTreeView.IsItemChecked(AParentID, AID: Integer): Boolean; -begin - Result := False; - // Legend - if AParentID = LegendAlignmentID then - Result := Ord(GridView.ActiveDiagram.Legend.Alignment) = AID; - if AID = LegendBorderID then - Result := GridView.ActiveDiagram.Legend.GetBorder = lbSingle; - if AID = LegendKeyBorderID then - Result := GridView.ActiveDiagram.Legend.GetKeyBorder = lbSingle; - if AParentID = LegendOrientationID then - Result := Ord(GridView.ActiveDiagram.Legend.Orientation) = AID; - if AParentID = LegendPositionID then - Result := Ord(GridView.ActiveDiagram.Legend.Position) = AID; - // Title - if AParentID = TitleAlignmentID then - Result := Ord(GridView.Title.Alignment) = AID; - if AParentID = TitlePositionID then - Result := Ord(GridView.Title.Position) = AID; - // ToolBox - if AID = ToolBoxBorderID then - Result := GridView.ToolBox.Border = tbSingle; - if AID = ToolBoxDiagramSelectorID then - Result := GridView.ToolBox.DiagramSelector; - if AParentID = ToolBoxPositionID then - Result := Ord(GridView.ToolBox.Position) = AID; - // Other - if AID = OtherValueHintsID then - Result := GridView.OptionsBehavior.ValueHints; -end; - -procedure TcxGridChartOptionsTreeView.ItemClicked(AParentID, AID: Integer); -begin - // Legend - if AParentID = LegendAlignmentID then - GridView.ActiveDiagram.Legend.Alignment := TcxGridChartPartAlignment(AID); - if AID = LegendBorderID then - with GridView.ActiveDiagram.Legend do - if GetBorder = lbNone then - Border := lbSingle - else - Border := lbNone; - if AID = LegendKeyBorderID then - with GridView.ActiveDiagram.Legend do - if GetKeyBorder = lbNone then - KeyBorder := lbSingle - else - KeyBorder := lbNone; - if AParentID = LegendOrientationID then - GridView.ActiveDiagram.Legend.Orientation := TcxGridChartPartOrientation(AID); - if AParentID = LegendPositionID then - GridView.ActiveDiagram.Legend.Position := TcxGridChartPartPosition(AID); - // Title - if AParentID = TitleAlignmentID then - GridView.Title.Alignment := TcxGridChartPartAlignment(AID); - if AParentID = TitlePositionID then - GridView.Title.Position := TcxGridChartPartPosition(AID); - // ToolBox - if AID = ToolBoxBorderID then - with GridView.ToolBox do - if Border = tbNone then - Border := tbSingle - else - Border := tbNone; - if AID = ToolBoxDiagramSelectorID then - with GridView.ToolBox do - DiagramSelector := not DiagramSelector; - if AParentID = ToolBoxPositionID then - GridView.ToolBox.Position := TcxGridChartToolBoxPosition(AID); - // Other - if AID = OtherValueHintsID then - with GridView.OptionsBehavior do - ValueHints := not ValueHints; -end; - -{ TcxGridChartCustomizationForm } - -function TcxGridChartCustomizationForm.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -function TcxGridChartCustomizationForm.CanChangeSortedSeries: Boolean; -begin - Result := (GridView.SortedSeries = nil) or GridView.SortedSeries.VisibleForCustomization; -end; - -procedure TcxGridChartCustomizationForm.CreateControls; -begin - inherited; - // Series - FSeriesCheckListBox := GetSeriesCheckListBoxClass.Create(Self, GridView); - with FSeriesCheckListBox do - begin - Align := alClient; - Parent := FSeriesPage; - end; - FSortBySeriesLabel := TcxLabel.Create(Self); - with FSortBySeriesLabel do - begin - Align := alBottom; - Caption := cxGetResourceString(@scxGridChartCustomizationFormSortBySeries); - Style.LookAndFeel.MasterLookAndFeel := GridView.LookAndFeel; - Transparent := True; - Visible := CanChangeSortedSeries; - Parent := FSeriesPage; - end; - FSortBySeriesComboBox := GetSortBySeriesComboBoxClass.Create(Self, GridView); - with FSortBySeriesComboBox do - begin - Align := alBottom; - Visible := CanChangeSortedSeries; - Parent := FSeriesPage; - end; - // Data Groups - FDataGroupsListBox := GetDataGroupsListBoxClass.Create(Self); - with FDataGroupsListBox do - begin - Align := alClient; - Parent := FDataGroupsPage; - RefreshItems; - end; - // Options - FOptionsTreeView := GetOptionsTreeViewClass.Create(Self, GridView); - with FOptionsTreeView do - begin - Align := alClient; - Parent := FOptionsPage; - end; -end; - -function TcxGridChartCustomizationForm.GetDataGroupsListBoxClass: TcxGridChartDataGroupsListBoxClass; -begin - Result := TcxGridChartDataGroupsListBox; -end; - -function TcxGridChartCustomizationForm.GetDataGroupsPageVisible: Boolean; -begin - Result := GridView.OptionsCustomize.DataGroupMoving and - (GridView.ToolBox.DataLevelsInfoVisible <> dlivNever); -end; - -function TcxGridChartCustomizationForm.GetOptionsPageVisible: Boolean; -begin - Result := GridView.OptionsCustomize.OptionsCustomization; -end; - -function TcxGridChartCustomizationForm.GetOptionsTreeViewClass: TcxGridChartOptionsTreeViewClass; -begin - Result := TcxGridChartOptionsTreeView; -end; - -function TcxGridChartCustomizationForm.GetSeriesCheckListBoxClass: TcxGridChartSeriesCheckListBoxClass; -begin - Result := TcxGridChartSeriesCheckListBox; -end; - -function TcxGridChartCustomizationForm.GetSeriesPageVisible: Boolean; -begin - Result := GridView.OptionsCustomize.SeriesCustomization; -end; - -function TcxGridChartCustomizationForm.GetSortBySeriesComboBoxClass: TcxGridChartSortBySeriesComboBoxClass; -begin - Result := TcxGridChartSortBySeriesComboBox; -end; - -procedure TcxGridChartCustomizationForm.GridViewChanged; -begin - inherited; - OptionsTreeView.RefreshItemValues; -end; - -procedure TcxGridChartCustomizationForm.InitPageControl; -begin - inherited; - FSeriesPage := CreatePage( - cxGetResourceString(@scxGridChartCustomizationFormSeriesPageCaption), - GetSeriesPageVisible); - FDataGroupsPage := CreatePage( - cxGetResourceString(@scxGridChartCustomizationFormDataGroupsPageCaption), - GetDataGroupsPageVisible); - FOptionsPage := CreatePage( - cxGetResourceString(@scxGridChartCustomizationFormOptionsPageCaption), - GetOptionsPageVisible); -end; - -procedure TcxGridChartCustomizationForm.PrepareForDataGroupDragAndDrop; -begin - ActivatePage(DataGroupsPage); -end; - -procedure TcxGridChartCustomizationForm.RefreshData; -begin - inherited; - SeriesCheckListBox.RefreshItems; - SortBySeriesComboBox.RefreshItems; - DataGroupsListBox.RefreshItems; -end; - -{ TcxGridChartDataLevelActiveValuePopup } - -constructor TcxGridChartDataLevelActiveValuePopup.Create(AGridView: TcxCustomGridView); -begin - inherited; - FListBox := TcxGridPopupListBox.Create(Self); - FListBox.OnAction := ListBoxAction; -end; - -function TcxGridChartDataLevelActiveValuePopup.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -procedure TcxGridChartDataLevelActiveValuePopup.ListBoxAction(Sender: TcxGridPopupListBox; - AItemIndex: Integer); -begin - SetDataGroupActiveValue(AItemIndex); -end; - -procedure TcxGridChartDataLevelActiveValuePopup.AddValueItems(AStrings: TStrings; - out AValues: TVariantArray); -begin - GridView.ViewData.GetVisibleGroupValues(FDataGroup, AStrings, AValues); -end; - -procedure TcxGridChartDataLevelActiveValuePopup.AdjustListBoxSize; -begin - FListBox.VisibleItemCount := GridView.ToolBox.DataLevelActiveValueDropDownCount; - FListBox.VisibleWidth := GridView.ToolBox.DataLevelActiveValueDropDownWidth; - FListBox.AdjustBounds; -end; - -procedure TcxGridChartDataLevelActiveValuePopup.InitPopup; -begin - FDataGroup := (Owner as IcxGridChartDataLevelActiveValuePopupOwner).GetDataGroup; - inherited; - AddValueItems(FListBox.Items, Values); - AdjustListBoxSize; - FListBox.ItemIndex := VarIndex(Values, FDataGroup.ActiveValue); -end; - -procedure TcxGridChartDataLevelActiveValuePopup.SetDataGroupActiveValue(AItemIndex: Integer); -begin - GridView.BeginUpdate; - try - FDataGroup.ActiveValue := Values[AItemIndex]; - if FDataGroup.DataLevel >= GridView.ActiveDataLevel then - GridView.ActiveDataLevel := FDataGroup.DataLevel + 1; - finally - GridView.EndUpdate; - end; -end; - -{ TcxGridChartDiagramSelectorPopupListBox } - -function TcxGridChartDiagramSelectorPopupListBox.CalculateItemHeight: Integer; -begin - Result := Max(inherited CalculateItemHeight, - cxGridChartDiagramImages.Height + 2 * cxTextOffset); -end; - -procedure TcxGridChartDiagramSelectorPopupListBox.DrawItemContent(ACanvas: TcxCanvas; - AIndex: Integer; ARect: TRect; AState: TOwnerDrawState); -begin - inherited; - cxGridChartDiagramImages.Draw(ACanvas.Canvas, - ARect.Left + TcxGridChartDiagramSelectorPopup(Popup).ImageOffset, - (ARect.Top + ARect.Bottom - cxGridChartDiagramImages.Height) div 2, - TcxGridChartDiagram(Items.Objects[AIndex]).ImageIndex); -end; - -{ TcxGridChartDiagramSelectorPopup } - -constructor TcxGridChartDiagramSelectorPopup.Create(AGridView: TcxCustomGridView); -begin - inherited; - FListBox := TcxGridChartDiagramSelectorPopupListBox.Create(Self); - FListBox.OnAction := ListBoxAction; -end; - -function TcxGridChartDiagramSelectorPopup.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -procedure TcxGridChartDiagramSelectorPopup.ListBoxAction(Sender: TcxGridPopupListBox; - AItemIndex: Integer); -begin - SelectDiagram(AItemIndex); -end; - -procedure TcxGridChartDiagramSelectorPopup.AddDiagramItems(AStrings: TStrings); -var - I: Integer; -begin - AStrings.BeginUpdate; - try - AStrings.Clear; - for I := 0 to GridView.AvailableDiagramCount - 1 do - AStrings.AddObject(GridView.AvailableDiagrams[I].DisplayText, - GridView.AvailableDiagrams[I]); - finally - AStrings.EndUpdate; - end; -end; - -function TcxGridChartDiagramSelectorPopup.GetImageOffset: Integer; -begin - Result := cxTextOffset; -end; - -procedure TcxGridChartDiagramSelectorPopup.InitPopup; -begin - inherited; - FListBox.ItemTextOffsetLeft := ImageOffset + cxGridChartDiagramImages.Width + - ToolBoxDiagramImageOffset + cxTextOffset; - FListBox.ItemTextOffsetVert := cxTextOffset; - AddDiagramItems(FListBox.Items); - FListBox.AdjustBounds; - FListBox.ItemObject := GridView.ActiveDiagram; -end; - -procedure TcxGridChartDiagramSelectorPopup.SelectDiagram(AItemIndex: Integer); -var - ADiagram: TcxGridChartDiagram; -begin - ADiagram := TcxGridChartDiagram(FListBox.Items.Objects[AItemIndex]); - ADiagram.Active := True; - if GridView.IsDesigning then - begin - GridView.Controller.DesignController.SelectObject(ADiagram, True); - GridView.Controller.DesignerModified; - end; -end; - -{ TcxGridChartController } - -constructor TcxGridChartController.Create(AGridView: TcxCustomGridView); -begin - inherited; - DataLevelsChanged; -end; - -destructor TcxGridChartController.Destroy; -begin - FDataLevelActiveValuePopup.Free; - FDiagramSelectorPopup.Free; - inherited; -end; - -function TcxGridChartController.GetCustomizationForm: TcxGridChartCustomizationForm; -begin - Result := TcxGridChartCustomizationForm(inherited CustomizationForm); -end; - -function TcxGridChartController.GetDataLevelActiveValuePopup: TcxGridChartDataLevelActiveValuePopup; -begin - if FDataLevelActiveValuePopup = nil then - FDataLevelActiveValuePopup := GetDataLevelActiveValuePopupClass.Create(GridView); - Result := FDataLevelActiveValuePopup; -end; - -function TcxGridChartController.GetDiagramSelectorPopup: TcxGridChartDiagramSelectorPopup; -begin - if FDiagramSelectorPopup = nil then - FDiagramSelectorPopup := GetDiagramSelectorPopupClass.Create(GridView); - Result := FDiagramSelectorPopup; -end; - -function TcxGridChartController.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -function TcxGridChartController.GetIsDataGroupMoving: Boolean; -begin - Result := FMovingDataGroup <> nil; -end; - -function TcxGridChartController.GetViewInfo: TcxGridChartViewInfo; -begin - Result := TcxGridChartViewInfo(inherited ViewInfo); -end; - -function TcxGridChartController.GetVisibleCategoryCountValue: Integer; -begin - Result := GetVisibleCategoryCount(False); -end; - -procedure TcxGridChartController.SetFirstVisibleCategoryIndex(Value: Integer); -begin - if GridView.IsUpdateLocked then - Value := 0 - else - begin - Value := Max(Value, 0); - Value := Min(Value, GridView.ViewData.VisibleCategoryCount - VisibleCategoryCount); - end; - if FFirstVisibleCategoryIndex <> Value then - begin - FFirstVisibleCategoryIndex := Value; - GridView.LayoutChanged; - FirstVisibleCategoryIndexChanged; - end; -end; - -procedure TcxGridChartController.ActiveDataLevelChanged(APrevActiveDataLevel, AActiveDataLevel: Integer); -begin - if (0 <= APrevActiveDataLevel) and (APrevActiveDataLevel < GridView.DataLevelCount) then - FFirstVisibleCategoryIndexes[APrevActiveDataLevel] := FFirstVisibleCategoryIndex; - if AActiveDataLevel <> -1 then - if ActiveDiagramSupportsPaging then - FirstVisibleCategoryIndex := FFirstVisibleCategoryIndexes[AActiveDataLevel] - else - FFirstVisibleCategoryIndex := FFirstVisibleCategoryIndexes[AActiveDataLevel]; -end; - -procedure TcxGridChartController.ActiveDiagramChanged(ADiagram: TcxGridChartDiagram); -begin - FirstVisibleCategoryIndexChanged; -end; - -procedure TcxGridChartController.CheckCoordinates; -begin - inherited; - if ActiveDiagramSupportsPaging then - FirstVisibleCategoryIndex := FirstVisibleCategoryIndex; -end; - -procedure TcxGridChartController.DataLevelsChanged; -begin - FFirstVisibleCategoryIndexes := nil; - SetLength(FFirstVisibleCategoryIndexes, GridView.DataLevelCount); -end; - -procedure TcxGridChartController.FirstVisibleCategoryIndexChanged; -begin - if FStoredFirstVisibleCategoryIndex <> FirstVisibleCategoryIndex then - begin - FStoredFirstVisibleCategoryIndex := FirstVisibleCategoryIndex; - GridView.DoFirstVisibleCategoryIndexChanged; - end; -end; - -function TcxGridChartController.GetDataLevelActiveValuePopupClass: TcxGridChartDataLevelActiveValuePopupClass; -begin - Result := TcxGridChartDataLevelActiveValuePopup; -end; - -function TcxGridChartController.GetDesignHitTest(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := inherited GetDesignHitTest(AHitTest); - if not Result then - Result := AHitTest.HitTestCode in [htLegendItem, htDataLevelInfo, htDiagramSelector, - htChartValue, htChartValueLine, htChartValueArea, htSeriesSite, htSeriesSiteCaption]; -end; - -function TcxGridChartController.GetDiagramSelectorPopupClass: TcxGridChartDiagramSelectorPopupClass; -begin - Result := TcxGridChartDiagramSelectorPopup; -end; - -function TcxGridChartController.GetPatternObject(AObject: TPersistent): TPersistent; -begin - if AObject is GridView.GetCategoriesClass then - Result := TcxGridChartView(GridView.PatternGridView).Categories - else - if AObject is GridView.GetDataGroupClass then - Result := TcxGridChartView(GridView.PatternGridView).FindDataGroupByID(TcxGridChartDataGroup(AObject).ID) - else - if AObject is GridView.GetSeriesClass then - Result := TcxGridChartView(GridView.PatternGridView).FindSeriesByID(TcxGridChartSeries(AObject).ID) - else - Result := inherited GetPatternObject(AObject); -end; - -function TcxGridChartController.GetFirstVisibleCategoryIndex: Integer; -begin - if ActiveDiagramSupportsPaging then - Result := FFirstVisibleCategoryIndex - else - Result := 0; -end; - -function TcxGridChartController.GetVisibleCategoryCount(ACheckCount: Boolean): Integer; -begin - Result := GridView.ViewData.VisibleCategoryCount; - if ActiveDiagramSupportsPaging and (GridView.OptionsView.CategoriesPerPage <> 0) then - begin - Result := Min(Result, GridView.OptionsView.CategoriesPerPage); - if ACheckCount then - Result := Min(Result, Max(0, GridView.ViewData.VisibleCategoryCount - FirstVisibleCategoryIndex)); - end; -end; - -function TcxGridChartController.CanDataDrillDown(AValueIndex: Integer): Boolean; -begin - Result := GridView.ActiveDataLevel < GridView.DataLevelCount - 1; -end; - -function TcxGridChartController.CanDataDrillUp: Boolean; -begin - Result := GridView.ActiveDataLevel > 0; -end; - -function TcxGridChartController.DoDataDrillDown(AValueIndex: Integer): Boolean; -begin - Result := MayDataDrillDown and DataDrillDown(AValueIndex); -end; - -function TcxGridChartController.DoDataDrillUp: Boolean; -begin - Result := MayDataDrillDown and DataDrillUp; -end; - -function TcxGridChartController.MayDataDrillDown(ACheckDesignTime: Boolean = True): Boolean; -begin - Result := (not ACheckDesignTime or not GridView.IsDesigning) and - GridView.OptionsCustomize.DataDrillDown; -end; - -function TcxGridChartController.CanShowScrollBar: Boolean; -begin - Result := ActiveDiagramSupportsPaging; -end; - -function TcxGridChartController.GetScrollBarKind: TScrollBarKind; -begin - if GridView.ActiveDiagram.HorizontalPaging then - Result := sbHorizontal - else - Result := sbVertical; -end; - -function TcxGridChartController.GetScrollBarPageSize: Integer; -begin - Result := VisibleCategoryCount; -end; - -function TcxGridChartController.GetScrollBarPos: Integer; -begin - Result := ScrollPosToCategoryIndex(FirstVisibleCategoryIndex); -end; - -function TcxGridChartController.GetScrollBarSize: Integer; -begin - Result := GridView.ViewData.VisibleCategoryCount; -end; - -function TcxGridChartController.ScrollPosToCategoryIndex(AScrollPos: Integer): Integer; -begin - if GridView.ActiveDiagram.PagingInOppositeDirection then - Result := GetScrollBarSize - GetScrollBarPageSize - AScrollPos - else - Result := AScrollPos; -end; - -function TcxGridChartController.CanShowDataLevelActiveValuePopup(ACheckDesignTime: Boolean = True): Boolean; -begin - Result := MayDataDrillDown(ACheckDesignTime); -end; - -procedure TcxGridChartController.CustomizationChanged; -begin - GridView.ViewInfo.ToolBoxViewInfo.InvalidateCustomizeButton; - inherited; -end; - -function TcxGridChartController.GetCustomizationFormClass: TcxCustomGridCustomizationFormClass; -begin - Result := TcxGridChartCustomizationForm; -end; - -function TcxGridChartController.GetCustomizationFormDefaultWidth: Integer; -begin - Result := cxGridChartCustomizationFormDefaultWidth; -end; - -function TcxGridChartController.GetDataLevelInfoDragAndDropObjectClass: TcxGridChartDataGroupMovingObjectClass; -begin - Result := TcxGridChartDataGroupMovingObject; -end; - -function TcxGridChartController.HasDataLevelActiveValuePopup: Boolean; -begin - Result := FDataLevelActiveValuePopup <> nil; -end; - -function TcxGridChartController.HasDiagramSelectorPopup: Boolean; -begin - Result := FDiagramSelectorPopup <> nil; -end; - -procedure TcxGridChartController.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited; - if (Button = mbRight) and not (ssDouble in Shift) and - (GridView.OptionsCustomize.DataDrillUpMethod = ddumMouseRightButtonClick) then - DoDataDrillUp; -end; - -procedure TcxGridChartController.InitScrollBarsParameters; -begin - if CanShowScrollBar then - SetScrollBarInfo(GetScrollBarKind, 0, GetScrollBarSize - 1, 1, - GetScrollBarPageSize, GetScrollBarPos, True, True); -end; - -procedure TcxGridChartController.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -var - ADelta: Integer; -begin - if AScrollBarKind <> GetScrollBarKind then Exit; - ADelta := 0; - case AScrollCode of - scLineUp: - ADelta := -1; - scLineDown: - ADelta := 1; - scPageUp: - ADelta := -GetScrollBarPageSize; - scPageDown: - ADelta := GetScrollBarPageSize; - scTrack: - FirstVisibleCategoryIndex := ScrollPosToCategoryIndex(AScrollPos); - end; - if ADelta <> 0 then - begin - if GridView.ActiveDiagram.PagingInOppositeDirection then - ADelta := -ADelta; - FirstVisibleCategoryIndex := FirstVisibleCategoryIndex + ADelta; - end; - AScrollPos := GetScrollBarPos; -end; - -function TcxGridChartController.GetValueHintText(ASeries: TcxGridChartSeries; AValueIndex: Integer): string; -begin - Result := Format(cxGetResourceString(@scxGridChartValueHintFormat), - [ASeries.GetDisplayText, GridView.Categories.VisibleDisplayTexts[AValueIndex], - ASeries.VisibleDisplayTexts[AValueIndex]]); - GridView.DoGetValueHint(ASeries, AValueIndex, Result); -end; - -function TcxGridChartController.DataDrillDown(AValueIndex: Integer): Boolean; -begin - Result := CanDataDrillDown(AValueIndex); - if not Result then Exit; - GridView.BeginUpdate; - try - GridView.ActiveDataGroup.ActiveValue := GridView.ActiveDataGroup.VisibleValues[AValueIndex]; - GridView.ActiveDataLevel := GridView.ActiveDataLevel + 1; - finally - GridView.EndUpdate; - end; -end; - -function TcxGridChartController.DataDrillUp: Boolean; -begin - Result := CanDataDrillUp; - if Result then - GridView.ActiveDataLevel := GridView.ActiveDataLevel - 1; -end; - -function TcxGridChartController.IsDataDrillDownPossible(AValueIndex: Integer): Boolean; -begin - Result := MayDataDrillDown and CanDataDrillDown(AValueIndex); -end; - -function TcxGridChartController.ActiveDiagramSupportsPaging: Boolean; -begin - Result := (GridView.ActiveDiagram <> nil) and GridView.ActiveDiagram.SupportsPaging; -end; - -{ TcxGridChartDataController } - -function TcxGridChartDataController.GetGridViewValue: TcxGridChartView; -begin - Result := TcxGridChartView(GetOwner); -end; - -function TcxGridChartDataController.GetOnAfterSummary: TcxAfterSummaryEvent; -begin - Result := Summary.OnAfterSummary; -end; - -function TcxGridChartDataController.GetOnSummary: TcxSummaryEvent; -begin - Result := Summary.DefaultGroupSummaryItems.OnSummary; -end; - -procedure TcxGridChartDataController.SetOnAfterSummary(Value: TcxAfterSummaryEvent); -begin - Summary.OnAfterSummary := Value; -end; - -procedure TcxGridChartDataController.SetOnSummary(Value: TcxSummaryEvent); -begin - Summary.DefaultGroupSummaryItems.OnSummary := Value; -end; - -procedure TcxGridChartDataController.AssignData(ADataController: TcxCustomDataController); -begin -end; - -procedure TcxGridChartDataController.CreateAllItems(AMissingItemsOnly: Boolean); -begin -end; - -procedure TcxGridChartDataController.DeleteAllItems; -begin -end; - -procedure TcxGridChartDataController.GetFakeComponentLinks(AList: TList); -begin -end; - -function TcxGridChartDataController.GetGridView: TcxCustomGridView; -begin - Result := GridView; -end; - -function TcxGridChartDataController.HasAllItems: Boolean; -begin - Result := True; -end; - -function TcxGridChartDataController.IsDataChangeable: Boolean; -begin - Result := False; -end; - -function TcxGridChartDataController.IsDataLinked: Boolean; -begin - Result := True; -end; - -function TcxGridChartDataController.SupportsCreateAllItems: Boolean; -begin - Result := False; -end; - -procedure TcxGridChartDataController.DoValueTypeClassChanged(AItemIndex: Integer); -var - AChartItem: IcxGridChartItem; -begin - inherited; - if Supports(GetItem(AItemIndex), IcxGridChartItem, AChartItem) then - AChartItem.ValueTypeClassChanged; -end; - -{function TcxGridChartDataController.GetChartViewItemIndex: Integer; -begin - if GridView.SortedSeries = nil then - Result := -1 - else - Result := GridView.SortedSeries.DataBinding.DataIndex; -end;} - -function TcxGridChartDataController.GetItemID(AItem: TObject): Integer; -var - AChartItem: IcxGridChartItem; -begin - if Supports(AItem, IcxGridChartItem, AChartItem) then - Result := AChartItem.GetID - else - Result := -1; -end; - -function TcxGridChartDataController.GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; -begin - Result := GridView.ViewData.GetSortingBySummaryEngineClass; -end; - -procedure TcxGridChartDataController.Unlocked; -begin - inherited; - GridView.DataControllerUnlocked; -end; - -procedure TcxGridChartDataController.BeginFullUpdate; -begin - GridView.BeginUpdate; - inherited; -end; - -procedure TcxGridChartDataController.EndFullUpdate; -begin - inherited; - GridView.EndUpdate; -end; - -function TcxGridChartDataController.GetItem(Index: Integer): TObject; -begin - Result := Fields[Index].Item; -end; - -{ TcxGridChartTitlePainter } - -function TcxGridChartTitlePainter.GetViewInfo: TcxCustomGridChartTitleViewInfo; -begin - Result := TcxCustomGridChartTitleViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartTitlePainter.PrepareCanvasForDrawText; -begin - inherited; - if ViewInfo.Orientation = cpoVertical then - Canvas.SetFontAngle(90); -end; - -procedure TcxGridChartTitlePainter.UnprepareCanvasForDrawText; -begin - if ViewInfo.Orientation = cpoVertical then - Canvas.SetFontAngle(0); - inherited; -end; - -{ TcxGridChartLegendItemPainter } - -function TcxGridChartLegendItemPainter.GetViewInfo: TcxGridChartLegendItemViewInfo; -begin - Result := TcxGridChartLegendItemViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartLegendItemPainter.DrawContent; -begin - inherited; - DrawLegendKey; -end; - -procedure TcxGridChartLegendItemPainter.DrawLegendKey; -begin - Canvas.FillRect(ViewInfo.LegendKeyBounds, ViewInfo.LegendKeyParams, - ViewInfo.LegendKeyBorders, ViewInfo.LegendKeyParams.TextColor); -end; - -{ TcxGridChartLegendPainter } - -function TcxGridChartLegendPainter.GetViewInfo: TcxGridChartLegendViewInfo; -begin - Result := TcxGridChartLegendViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartLegendPainter.DrawContent; -var - I: Integer; -begin - inherited; - for I := 0 to ViewInfo.Count - 1 do - ViewInfo.Items[I].Paint(Canvas); -end; - -function TcxGridChartLegendPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridChartDiagramPainter } - -function TcxGridChartDiagramPainter.GetViewInfo: TcxGridChartDiagramViewInfo; -begin - Result := TcxGridChartDiagramViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartDiagramPainter.DrawValueCaptions; -var - AClipRegion, AUsedSpaceRegion, ARegion: TcxRegion; - I: Integer; - AValueCaptionViewInfo: TcxGridChartDiagramValueCaptionViewInfo; - ABounds: TRect; -begin - AClipRegion := Canvas.GetClipRegion; - AUsedSpaceRegion := TcxRegion.Create; - try - for I := 0 to ViewInfo.ValueViewInfoCount - 1 do - begin - PrepareClipRegionForValueDrawing(ViewInfo.ValueViewInfos[I], AClipRegion); - AValueCaptionViewInfo := ViewInfo.ValueViewInfos[I].CaptionViewInfo; - if AValueCaptionViewInfo.Visible then - begin - ABounds := AValueCaptionViewInfo.Bounds; - ARegion := TcxRegion.Create(ABounds); - try - ARegion.Combine(AUsedSpaceRegion, roIntersect, False); - if ARegion.IsEmpty then - begin - AValueCaptionViewInfo.Paint(Canvas); - AUsedSpaceRegion.Combine(TcxRegion.Create(ABounds), roAdd); - end; - finally - ARegion.Free; - end; - end; - end; - finally - AUsedSpaceRegion.Free; - AClipRegion.Free; - end; -end; - -procedure TcxGridChartDiagramPainter.DrawValues; -var - AClipRegion: TcxRegion; - I: Integer; -begin - AClipRegion := Canvas.GetClipRegion; - try - for I := 0 to ViewInfo.ValueViewInfoCount - 1 do - begin - PrepareClipRegionForValueDrawing(ViewInfo.ValueViewInfos[I], AClipRegion); - ViewInfo.ValueViewInfos[I].Paint(Canvas); - end; - finally - AClipRegion.Free; - end; -end; - -procedure TcxGridChartDiagramPainter.FillAndExcludeRect(const R: TRect); -begin - Canvas.FillRect(R); - Canvas.ExcludeClipRect(R); -end; - -function TcxGridChartDiagramPainter.NeedsPainting: Boolean; -var - I: Integer; - AValueCaptionViewInfo: TcxGridChartDiagramValueCaptionViewInfo; -begin - Result := inherited NeedsPainting; - if not Result then - for I := 0 to ViewInfo.ValueViewInfoCount - 1 do - begin - AValueCaptionViewInfo := ViewInfo.ValueViewInfos[I].CaptionViewInfo; - Result := AValueCaptionViewInfo.Visible and - Canvas.RectVisible(AValueCaptionViewInfo.GetAreaBoundsForPainting); - if Result then Break; - end; -end; - -procedure TcxGridChartDiagramPainter.Paint; -begin - inherited; - DrawValueCaptions; -end; - -procedure TcxGridChartDiagramPainter.PrepareClipRegionForValueDrawing( - AValueViewInfo: TcxGridChartDiagramValueViewInfo; AOriginalClipRegion: TcxRegion); -begin -end; - -{ TcxGridChartHistogramTickMarkLabelsPainter } - -function TcxGridChartHistogramTickMarkLabelsPainter.GetViewInfo: TcxGridChartHistogramTickMarkLabelsViewInfo; -begin - Result := TcxGridChartHistogramTickMarkLabelsViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartHistogramTickMarkLabelsPainter.DrawCaptions; -var - I: Integer; - ABounds: TRect; -begin - Canvas.SetParams(ViewInfo.Params); - Canvas.Brush.Style := bsClear; - for I := 0 to ViewInfo.Count - 1 do - begin - ABounds := ViewInfo.CaptionBounds[I]; - if not ViewInfo.IsVertical or Canvas.RectFullyVisible(ABounds) then - begin - Canvas.DrawText(ViewInfo.Captions[I], ABounds, ViewInfo.GetTextAttributes(True)); - if ViewInfo.IsVertical then - Canvas.ExcludeClipRect(ABounds); - end; - end; - Canvas.Brush.Style := bsSolid; -end; - -procedure TcxGridChartHistogramTickMarkLabelsPainter.DrawContent; -begin - if ViewInfo.CaptionsVisible then - DrawCaptions; - ViewInfo.TitleViewInfo.Paint(Canvas); -end; - -{ TcxGridChartHistogramPainter } - -function TcxGridChartHistogramPainter.GetViewInfo: TcxGridChartHistogramViewInfo; -begin - Result := TcxGridChartHistogramViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartHistogramPainter.DrawCategoryAxis; -var - R: TRect; - I: Integer; -begin - Canvas.Brush.Color := ViewInfo.CategoryAxisColor; - - R := ViewInfo.CategoryAxisBounds; - FillAndExcludeRect(R); - - for I := 0 to ViewInfo.CategoryMarkCount - 1 do - begin - R := ViewInfo.CategoryMarkBounds[I]; - FillAndExcludeRect(R); - end; -end; - -procedure TcxGridChartHistogramPainter.DrawCategoryGridLines; -var - I: Integer; - R: TRect; -begin - Canvas.Brush.Color := ViewInfo.CategoryGridLineColor; - for I := 0 to ViewInfo.CategoryMarkCount - 1 do - begin - R := ViewInfo.CategoryGridLineBounds[I]; - FillAndExcludeRect(R); - end; -end; - -procedure TcxGridChartHistogramPainter.DrawContent; -var - AClipRegion, APlotClipRegion: TcxRegion; -begin - AClipRegion := Canvas.GetClipRegion; - try - if ViewInfo.HasCategoryAxis then DrawCategoryAxis; - if ViewInfo.HasValueAxis then DrawValueAxis; - APlotClipRegion := Canvas.GetClipRegion; - try - APlotClipRegion.Combine(TcxRegion.Create(ViewInfo.PlotBounds), roSubtract); - SetValuesClipRegion; - DrawValuesBackground; - if not TransparentValues then DrawValues; - if ViewInfo.HasCategoryGridLines then DrawCategoryGridLines; - if ViewInfo.HasValueGridLines then DrawValueGridLines; - if not ViewInfo.DoCustomDrawPlot(Canvas) then - DrawPlotBackground; - finally - Canvas.SetClipRegion(APlotClipRegion, roSet); - end; - inherited; - finally - Canvas.SetClipRegion(AClipRegion, roSet); - end; - ViewInfo.CategoryTickMarkLabelsViewInfo.Paint(Canvas); - ViewInfo.ValueTickMarkLabelsViewInfo.Paint(Canvas); - if TransparentValues then - begin - AClipRegion := Canvas.GetClipRegion; - try - SetValuesClipRegion; - DrawValues; - finally - Canvas.SetClipRegion(AClipRegion, roSet); - end; - end; -end; - -procedure TcxGridChartHistogramPainter.DrawPlotBackground; -begin - Canvas.FillRect(ViewInfo.PlotBounds, ViewInfo.PlotParams); - Canvas.ExcludeClipRect(ViewInfo.PlotBounds); -end; - -procedure TcxGridChartHistogramPainter.DrawValueAxis; -var - R: TRect; - I: Integer; -begin - Canvas.Brush.Color := ViewInfo.ValueAxisColor; - - R := ViewInfo.ValueAxisBounds; - FillAndExcludeRect(R); - - for I := 0 to ViewInfo.ValueMarkCount - 1 do - begin - R := ViewInfo.ValueMarkBounds[I]; - FillAndExcludeRect(R); - end; -end; - -procedure TcxGridChartHistogramPainter.DrawValueGridLines; -var - I: Integer; - R: TRect; -begin - Canvas.Brush.Color := ViewInfo.ValueGridLineColor; - for I := 0 to ViewInfo.ValueMarkCount - 1 do - begin - R := ViewInfo.ValueGridLineBounds[I]; - FillAndExcludeRect(R); - end; -end; - -procedure TcxGridChartHistogramPainter.DrawValuesBackground; -begin -end; - -function TcxGridChartHistogramPainter.GetValuesClipRect: TRect; -begin - Result := ViewInfo.Bounds; - if ViewInfo.IsValueAxisVert then - begin - Result.Top := ViewInfo.PlotBounds.Top; - Result.Bottom := ViewInfo.PlotBounds.Bottom; - end - else - begin - Result.Left := ViewInfo.PlotBounds.Left; - Result.Right := ViewInfo.PlotBounds.Right; - end; -end; - -procedure TcxGridChartHistogramPainter.SetValuesClipRegion; -begin - if ViewInfo.HasValuesOutOfRange then - Canvas.SetClipRegion(TcxRegion.Create(GetValuesClipRect), roIntersect); -end; - -{ TcxGridChartColumnDiagramValuePainter } - -function TcxGridChartColumnDiagramValuePainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridChartColumnDiagramPainter } - -function TcxGridChartColumnDiagramPainter.GetTransparentValues: Boolean; -begin - Result := False; -end; - -{ TcxGridChartLineDiagramLegendItemPainter } - -function TcxGridChartLineDiagramLegendItemPainter.GetViewInfo: TcxGridChartLineDiagramLegendItemViewInfo; -begin - Result := TcxGridChartLineDiagramLegendItemViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartLineDiagramLegendItemPainter.DrawLegendKey; -begin - DrawMarker; - DrawLine; -end; - -procedure TcxGridChartLineDiagramLegendItemPainter.DrawLine; -begin - ViewInfo.GetDiagramValueViewInfoClass.GetPainterClassEx.DrawLineEx(Canvas, - ViewInfo.LineStart, ViewInfo.LineFinish, ViewInfo.LineStyle, ViewInfo.LineWidth, - ViewInfo.LineColor); -end; - -procedure TcxGridChartLineDiagramLegendItemPainter.DrawMarker; -begin - ViewInfo.GetDiagramValueViewInfoClass.GetPainterClassEx.DrawMarkerEx( - Canvas, ViewInfo.MarkerBounds, ViewInfo.MarkerPoints, ViewInfo.MarkerStyle, - ViewInfo.MarkerParams); -end; - -{ TcxGridChartLineDiagramValuePainter } - -function TcxGridChartLineDiagramValuePainter.GetViewInfo: TcxGridChartLineDiagramValueViewInfo; -begin - Result := TcxGridChartLineDiagramValueViewInfo(inherited ViewInfo); -end; - -function TcxGridChartLineDiagramValuePainter.CanDrawDesignSelection: Boolean; -begin - Result := False; -end; - -procedure TcxGridChartLineDiagramValuePainter.DrawContent; -begin - inherited; - DrawMarker; - DrawLine; -end; - -procedure TcxGridChartLineDiagramValuePainter.DrawLine; -begin - DrawLineEx(Canvas, ViewInfo.LineStart, ViewInfo.LineFinish, ViewInfo.LineStyle, - ViewInfo.LineWidth, ViewInfo.LineColor); -end; - -procedure TcxGridChartLineDiagramValuePainter.DrawMarker; -begin - DrawMarkerEx(Canvas, ViewInfo.MarkerBounds, ViewInfo.MarkerPoints, - ViewInfo.MarkerStyle, ViewInfo.MarkerParams); -end; - -class procedure TcxGridChartLineDiagramValuePainter.DrawLineEx(ACanvas: TcxCanvas; - const AStart, AFinish: TPoint; AStyle: TcxGridChartLineStyle; - AWidth: Integer; AColor: TColor); -var - APoints: TPointArray; -begin - SetLength(APoints, 2); - APoints[0] := AStart; - APoints[1] := AFinish; - DrawLines(ACanvas, APoints, AStyle, AWidth, AColor); -end; - -class procedure TcxGridChartLineDiagramValuePainter.DrawLines(ACanvas: TcxCanvas; - const APoints: TPointArray; AStyle: TcxGridChartLineStyle; AWidth: Integer; AColor: TColor); -const - PenTypes: array[Boolean] of Integer = (PS_COSMETIC, PS_GEOMETRIC); - PenStyles: array[TcxGridChartLineStyle] of Integer = - (0, PS_SOLID, PS_DASH, PS_DOT, PS_DASHDOT, PS_DASHDOTDOT); -var - APen: HPEN; - APenParams: TLogBrush; -begin - if AStyle = clsNone then Exit; - - APenParams.lbStyle := BS_SOLID; - APenParams.lbColor := AColor; - APenParams.lbHatch := 0; - APen := ExtCreatePen(PenTypes[AWidth <> 1] or PenStyles[AStyle], AWidth, - APenParams, 0, nil); - APen := SelectObject(ACanvas.Handle, APen); - - Polyline(ACanvas.Handle, APoints[0], Length(APoints)); - - DeleteObject(SelectObject(ACanvas.Handle, APen)); -end; - -class procedure TcxGridChartLineDiagramValuePainter.DrawMarkerEx(ACanvas: TcxCanvas; - const ABounds: TRect; const APoints: TPointArray; AStyle: TcxGridChartMarkerStyle; - const AParams: TcxViewParams); -var - ARegion, AInternalRegion: TcxRegion; - ARgn: HRGN; - R: TRect; -begin - case AStyle of - cmsSquare, cmsTriangle, cmsDiamond: - begin - if AStyle = cmsSquare then - ARgn := CreateRectRgnIndirect(ABounds) - else - ARgn := CreatePolygonRgn(APoints[0], Length(APoints), WINDING); - ARegion := TcxRegion.Create(ARgn); - try - ACanvas.DrawRegion(ARegion, AParams.Color, AParams.TextColor); - finally - ACanvas.SetClipRegion(ARegion, roSubtract); - end; - end; - cmsCircle: - begin - R := ABounds; - Inc(R.Right); - Inc(R.Bottom); - ARegion := TcxRegion.Create(CreateEllipticRgnIndirect(R)); - try - ACanvas.FillRegion(ARegion, AParams.TextColor); - if ABounds.Right - ABounds.Left = 4 then - InflateRect(R, 0, -1) - else - InflateRect(R, -1, -1); - AInternalRegion := TcxRegion.Create(CreateEllipticRgnIndirect(R)); - try - ACanvas.FillRegion(AInternalRegion, AParams.Color); - finally - AInternalRegion.Free; - end; - finally - ACanvas.SetClipRegion(ARegion, roSubtract); - end; - end; - end; -end; - -{ TcxGridChartLineDiagramPainter } - -procedure TcxGridChartLineDiagramPainter.DrawContent; -begin - inherited; - DrawValuesDesignSelection; -end; - -procedure TcxGridChartLineDiagramPainter.DrawValuesDesignSelection; -var - I: Integer; - AViewInfo: TcxGridChartDiagramValueViewInfo; -begin - for I := 0 to ViewInfo.ValueViewInfoCount - 1 do - begin - AViewInfo := ViewInfo.ValueViewInfos[I]; - AViewInfo.GetPainterClass.DoDrawDesignSelection(Canvas, AViewInfo); - end; -end; - -function TcxGridChartLineDiagramPainter.GetTransparentValues: Boolean; -begin - Result := True; -end; - -{ TcxGridChartAreaDiagramLegendItemPainter } - -procedure TcxGridChartAreaDiagramLegendItemPainter.DrawAreaBackground; -begin - Canvas.FillRect(ViewInfo.LegendKeyBounds, ViewInfo.LegendKeyParams); -end; - -procedure TcxGridChartAreaDiagramLegendItemPainter.DrawAreaBorder; - - function GetPointsRect: TRect; - begin - Result := ViewInfo.LegendKeyBounds; - InflateRect(Result, -ViewInfo.LineWidth div 2, -ViewInfo.LineWidth div 2); - if Odd(ViewInfo.LineWidth) then - begin - Dec(Result.Right); - Dec(Result.Bottom); - end; - end; - - procedure CalculatePointsForRect(const ARect: TRect; var APoints: TPointArray); - begin - SetLength(APoints, 5); - APoints[0] := ARect.TopLeft; - APoints[1] := Point(ARect.Right, ARect.Top); - APoints[2] := ARect.BottomRight; - APoints[3] := Point(ARect.Left, ARect.Bottom); - APoints[4] := APoints[0]; - end; - -var - APoints: TPointArray; -begin - if ViewInfo.LineStyle = clsNone then Exit; - CalculatePointsForRect(GetPointsRect, APoints); - ViewInfo.GetDiagramValueViewInfoClass.GetPainterClassEx.DrawLines(Canvas, - APoints, ViewInfo.LineStyle, ViewInfo.LineWidth, ViewInfo.LineColor); -end; - -procedure TcxGridChartAreaDiagramLegendItemPainter.DrawLegendKey; -begin - DrawMarker; - DrawAreaBackground; - DrawAreaBorder; -end; - -{ TcxGridChartAreaDiagramValuePainter } - -function TcxGridChartAreaDiagramValuePainter.GetViewInfo: TcxGridChartAreaDiagramValueViewInfo; -begin - Result := TcxGridChartAreaDiagramValueViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartAreaDiagramValuePainter.DoDrawArea; -begin - if not ViewInfo.DoCustomDrawBackground(Canvas) then - DrawArea; -end; - -procedure TcxGridChartAreaDiagramValuePainter.DrawArea; -begin - Canvas.Pen.Color := ViewInfo.AreaColor; - Canvas.Brush.Color := ViewInfo.AreaColor; - Canvas.Polygon(ViewInfo.AreaPoints); -end; - -{ TcxGridChartAreaDiagramPainter } - -procedure TcxGridChartAreaDiagramPainter.DrawValuesBackground; -var - ABackgroundRegion: TcxRegion; - I: Integer; - AValueViewInfo: TcxGridChartAreaDiagramValueViewInfo; -begin - inherited; - ABackgroundRegion := nil; - for I := 0 to ViewInfo.ValueViewInfoCount - 1 do - begin - AValueViewInfo := TcxGridChartAreaDiagramValueViewInfo(ViewInfo.ValueViewInfos[I]); - - with TcxGridChartAreaDiagramValuePainter(AValueViewInfo.GetPainterClass.Create(Canvas, AValueViewInfo)) do - try - DoDrawArea; - finally - Free; - end; - - if ABackgroundRegion = nil then - ABackgroundRegion := TcxRegion.Create; - ABackgroundRegion.Combine(AValueViewInfo.CreateAreaRegion, roAdd); - if (I = ViewInfo.ValueViewInfoCount - 1) or - (ViewInfo.ValueViewInfos[I + 1].SeriesIndex <> AValueViewInfo.SeriesIndex) then - begin - Canvas.SetClipRegion(ABackgroundRegion, roSubtract); - ABackgroundRegion := nil; - end; - end; -end; - -{ TcxGridChartPieDiagramValuePainter } - -function TcxGridChartPieDiagramValuePainter.GetViewInfo: TcxGridChartPieDiagramValueViewInfo; -begin - Result := TcxGridChartPieDiagramValueViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartPieDiagramValuePainter.DrawContent; -begin - inherited; - DrawSlice; -end; - -procedure TcxGridChartPieDiagramValuePainter.DrawLeaderLine; -begin - Canvas.Pen.Color := ViewInfo.Params.TextColor; - Canvas.Polyline(ViewInfo.LeaderLinePoints); -end; - -procedure TcxGridChartPieDiagramValuePainter.DrawSlice; -begin - Canvas.SetParams(ViewInfo.Params); - Canvas.Pen.Color := ViewInfo.Params.TextColor; - Canvas.Pie(ViewInfo.Bounds, 90 - ViewInfo.FinishAngle, - ViewInfo.FinishAngle - ViewInfo.StartAngle); -end; - -procedure TcxGridChartPieDiagramValuePainter.MainPaint; -begin - inherited; - if ViewInfo.CaptionPosition = pdvcpOutsideEndWithLeaderLines then - DrawLeaderLine; -end; - -{ TcxGridChartPieSeriesSiteCaptionPainter } - -function TcxGridChartPieSeriesSiteCaptionPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridChartPieSeriesSitePainter } - -function TcxGridChartPieSeriesSitePainter.CanDrawDesignSelection: Boolean; -begin - Result := False; -end; - -function TcxGridChartPieSeriesSitePainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridChartPieDiagramPainter } - -function TcxGridChartPieDiagramPainter.GetViewInfo: TcxGridChartPieDiagramViewInfo; -begin - Result := TcxGridChartPieDiagramViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartPieDiagramPainter.DrawContent; -var - AClipRegion: TcxRegion; -begin - AClipRegion := Canvas.GetClipRegion; - try - ExcludeSeriesPieAreasFromClipRegion; - DrawSeriesSites; - inherited; - finally - Canvas.SetClipRegion(AClipRegion, roSet); - end; - DrawValues; - DrawSeriesDesignSelection; -end; - -procedure TcxGridChartPieDiagramPainter.DrawSeriesDesignSelection; -var - I: Integer; - ASeriesSiteViewInfo: TcxGridChartPieSeriesSiteViewInfo; -begin - for I := 0 to ViewInfo.SeriesSiteViewInfoCount - 1 do - begin - ASeriesSiteViewInfo := ViewInfo.SeriesSiteViewInfos[I]; - ASeriesSiteViewInfo.GetPainterClass.DoDrawDesignSelection(Canvas, ASeriesSiteViewInfo); - end; -end; - -procedure TcxGridChartPieDiagramPainter.DrawSeriesSites; -var - I: Integer; -begin - for I := 0 to ViewInfo.SeriesSiteViewInfoCount - 1 do - ViewInfo.SeriesSiteViewInfos[I].Paint(Canvas); -end; - -procedure TcxGridChartPieDiagramPainter.DrawValues; -var - AClipRegion: TcxRegion; -begin - AClipRegion := Canvas.GetClipRegion; - try - inherited; - finally - Canvas.SetClipRegion(AClipRegion, roSet); - end; -end; - -procedure TcxGridChartPieDiagramPainter.ExcludeSeriesPieAreasFromClipRegion; -var - I: Integer; - R: TRect; -begin - for I := 0 to ViewInfo.SeriesSiteViewInfoCount - 1 do - if not ViewInfo.SeriesSiteViewInfos[I].IsPieEmpty then - begin - R := ViewInfo.SeriesSiteViewInfos[I].PieAreaBounds; - InflateRect(R, -1, -1); // to fill the gap between drawn pie and elliptic region - if not IsRectEmpty(R) then - Canvas.SetClipRegion(TcxRegion.Create(CreateEllipticRgnIndirect(R)), roSubtract); - end; -end; - -procedure TcxGridChartPieDiagramPainter.PrepareClipRegionForValueDrawing( - AValueViewInfo: TcxGridChartDiagramValueViewInfo; AOriginalClipRegion: TcxRegion); -var - ARegion: TcxRegion; -begin - if AValueViewInfo.VisibleValueIndex <> 0 then Exit; - ARegion := TcxRegion.Create(ViewInfo.SeriesSiteViewInfos[AValueViewInfo.SeriesIndex].ContentBounds); - ARegion.Combine(AOriginalClipRegion, roIntersect, False); - Canvas.SetClipRegion(ARegion, roSet); -end; - -{ TcxGridChartToolBoxItemSeparatorPainter } - -procedure TcxGridChartToolBoxItemSeparatorPainter.DrawContent; -begin - Canvas.Pen.Color := ViewInfo.Params.Color; - Canvas.Pen.Style := psDot; - with ViewInfo.Bounds do - begin - Canvas.MoveTo(Left, Top); - Canvas.LineTo(Left, Bottom); - end; - Canvas.Pen.Style := psSolid; -{ Canvas.Brush.Color := ViewInfo.ItemSeparatorColor; - Canvas.FillRect(ViewInfo.Bounds);} -end; - -{ TcxGridChartToolBoxDataLevelActiveValuePainter } - -function TcxGridChartToolBoxDataLevelActiveValuePainter.GetViewInfo: TcxGridChartToolBoxDataLevelActiveValueViewInfo; -begin - Result := TcxGridChartToolBoxDataLevelActiveValueViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartToolBoxDataLevelActiveValuePainter.PrepareCanvasForDrawText; -begin - inherited; - if ViewInfo.GridView.Controller.CanShowDataLevelActiveValuePopup(False) then - with Canvas.Font do - Style := Style + [fsUnderline]; -end; - -{ TcxGridChartToolBoxDataLevelInfoPainter } - -procedure TcxGridChartToolBoxDataLevelInfoPainter.DrawBackground; -begin - DrawBackground(ViewInfo.ContentBounds); -end; - -function TcxGridChartToolBoxDataLevelInfoPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridChartToolBoxCustomizeButtonPainter } - -function TcxGridChartToolBoxCustomizeButtonPainter.GetViewInfo: TcxGridChartToolBoxCustomizeButtonViewInfo; -begin - Result := TcxGridChartToolBoxCustomizeButtonViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartToolBoxCustomizeButtonPainter.Paint; -begin - Canvas.Font := ViewInfo.Params.Font; - ViewInfo.LookAndFeelPainter.DrawButton(Canvas, ViewInfo.Bounds, ViewInfo.Text, - ViewInfo.ButtonState); -end; - -{ TcxGridChartToolBoxDiagramSelectorPainter } - -function TcxGridChartToolBoxDiagramSelectorPainter.GetViewInfo: TcxGridChartToolBoxDiagramSelectorViewInfo; -begin - Result := TcxGridChartToolBoxDiagramSelectorViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartToolBoxDiagramSelectorPainter.DrawContent; -begin - inherited; - DrawImage; -end; - -procedure TcxGridChartToolBoxDiagramSelectorPainter.DrawImage; -begin - if ViewInfo.ImageIndex <> -1 then - with ViewInfo.ImageBounds do - cxGridChartDiagramImages.Draw(Canvas.Canvas, Left, Top, ViewInfo.ImageIndex); -end; - -procedure TcxGridChartToolBoxDiagramSelectorPainter.PrepareCanvasForDrawText; -begin - inherited; - if ViewInfo.CanShowDropDownWindow then - with Canvas.Font do - Style := Style + [fsUnderline]; -end; - -{ TcxGridChartToolBoxPainter } - -function TcxGridChartToolBoxPainter.GetViewInfo: TcxGridChartToolBoxViewInfo; -begin - Result := TcxGridChartToolBoxViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartToolBoxPainter.DrawContent; -var - AClipRegion: TcxRegion; -begin - AClipRegion := Canvas.GetClipRegion; - try - Canvas.IntersectClipRect(ViewInfo.ClientBounds); - DrawItems(True); - DrawDataLevelInfoConnectors; - inherited; - DrawItems(False); - finally - Canvas.SetClipRegion(AClipRegion, roSet); - end; -end; - -procedure TcxGridChartToolBoxPainter.DrawDataLevelInfoConnectors; -var - I: Integer; -begin - Canvas.Brush.Color := ViewInfo.DataLevelInfoConnectorColor; - for I := 0 to ViewInfo.DataLevelInfoConnectorCount - 1 do - Canvas.FillRect(ViewInfo.DataLevelInfoConnectors[I], nil, True); -end; - -procedure TcxGridChartToolBoxPainter.DrawItems(AOpaqueItems: Boolean); -var - I: Integer; -begin - for I := 0 to ViewInfo.Count - 1 do - if ViewInfo.Items[I].HasBackground = AOpaqueItems then - ViewInfo.Items[I].Paint(Canvas); -end; - -function TcxGridChartToolBoxPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridChartPainter } - -function TcxGridChartPainter.GetViewInfo: TcxGridChartViewInfo; -begin - Result := TcxGridChartViewInfo(inherited ViewInfo); -end; - -procedure TcxGridChartPainter.PaintAfter; -begin - inherited; - ViewInfo.TitleViewInfo.Paint(Canvas); - if ViewInfo.DiagramViewInfo <> nil then - ViewInfo.DiagramViewInfo.Paint(Canvas); -end; - -procedure TcxGridChartPainter.PaintContent; -begin - inherited; - if ViewInfo.DiagramViewInfo <> nil then - ExcludeFromBackground(ViewInfo.DiagramViewInfo.Bounds); - ViewInfo.ToolBoxViewInfo.Paint(Canvas); - if ViewInfo.LegendViewInfo <> nil then - ViewInfo.LegendViewInfo.Paint(Canvas); -end; - -{ TcxGridChartViewData } - -constructor TcxGridChartViewData.Create(AGridView: TcxCustomGridView); -begin - inherited; - UpdateDataGroupIndex; -end; - -function TcxGridChartViewData.GetCategory(AIndex: Integer): Variant; -begin - Result := DataController.Values[AIndex, GridView.Categories.DataBinding.DataIndex]; -end; - -function TcxGridChartViewData.GetCategoryCount: Integer; -begin - Result := DataController.RecordCount; -end; - -function TcxGridChartViewData.GetChildCount: Integer; -begin - Result := DataController.Groups.ChildCount[DataGroupIndex]; -end; - -function TcxGridChartViewData.GetChildDataGroupIndex(Index: Integer): Integer; -begin - Result := DataController.Groups.ChildDataGroupIndex[DataGroupIndex, Index]; -end; - -function TcxGridChartViewData.GetChildLevel: Integer; -begin - Result := GridView.ActiveDataLevel; -end; - -function TcxGridChartViewData.GetChildRecordIndex(Index: Integer): Integer; -begin - Result := DataController.Groups.ChildRecordIndex[DataGroupIndex, Index]; -end; - -function TcxGridChartViewData.GetDataGroupIndex: Integer; -begin - if FDataGroupIndex = -2 then - FDataGroupIndex := CalculateDataGroupIndex; - Result := FDataGroupIndex; -end; - -function TcxGridChartViewData.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -function TcxGridChartViewData.GetGroupValue(ADataGroupIndex, AIndex: Integer): Variant; -begin - Result := DataController.Values[AIndex, - GridView.DataGroups[ADataGroupIndex].DataBinding.DataIndex]; -end; - -function TcxGridChartViewData.GetSumOfValues(ASeriesIndex: Integer): Variant; -begin - if FSumOfValues = nil then CalculateSumsOfValues; - Result := FSumOfValues[ASeriesIndex]; -end; - -function TcxGridChartViewData.GetValue(ASeriesIndex, AIndex: Integer): Variant; -begin - Result := DataController.Values[AIndex, - GridView.Series[ASeriesIndex].DataBinding.DataIndex]; - if not IsValueValid(Result) then - Result := 0; -end; - -function TcxGridChartViewData.GetVisibleCategory(AIndex: Integer): Variant; -begin - if IsDataGrouped then - if IsSummaryLevel then - Result := DataController.Groups.GroupValues[ChildDataGroupIndex[AIndex]] - else - Result := Categories[ChildRecordIndex[AIndex]] - else - Result := Categories[GetRecordIndexByValueIndex(AIndex)]; -end; - -function TcxGridChartViewData.GetVisibleCategoryCount: Integer; -begin - if IsDataGrouped then - Result := ChildCount - else - Result := DataController.RowCount; -end; - -function TcxGridChartViewData.GetVisibleGroupValue(AVisibleDataGroupIndex, AIndex: Integer): Variant; -begin - Result := DataController.Groups.GroupValues[ - DataController.Groups.ChildDataGroupIndex[GetDataGroupIndexByLevel(AVisibleDataGroupIndex), AIndex]]; -end; - -function TcxGridChartViewData.GetVisibleGroupValueCount(AVisibleDataGroupIndex: Integer): Integer; -begin - Result := DataController.Groups.ChildCount[GetDataGroupIndexByLevel(AVisibleDataGroupIndex)]; -end; - -function TcxGridChartViewData.GetVisibleValue(ASeriesIndex, AIndex: Integer): Variant; -begin - if IsDataGrouped then - if IsSummaryLevel then - begin - Result := DataController.Summary.GroupSummaryValues[ - ChildDataGroupIndex[AIndex], - GridView.Series[ASeriesIndex].DataBinding.SummaryIndex]; - if not IsValueValid(Result) then - Result := 0; - end - else - Result := Values[ASeriesIndex, ChildRecordIndex[AIndex]] - else - Result := Values[ASeriesIndex, GetRecordIndexByValueIndex(AIndex)]; -end; - -procedure TcxGridChartViewData.SetCategory(AIndex: Integer; const Value: Variant); -begin - DataController.Values[AIndex, GridView.Categories.DataBinding.DataIndex] := Value; -end; - -procedure TcxGridChartViewData.SetCategoryCount(Value: Integer); -begin - DataController.RecordCount := Value; -end; - -procedure TcxGridChartViewData.SetGroupValue(ADataGroupIndex, AIndex: Integer; - const Value: Variant); -begin - DataController.Values[AIndex, - GridView.DataGroups[ADataGroupIndex].DataBinding.DataIndex] := Value; -end; - -procedure TcxGridChartViewData.SetValue(ASeriesIndex, AIndex: Integer; - const Value: Variant); -begin - DataController.Values[AIndex, - GridView.Series[ASeriesIndex].DataBinding.DataIndex] := Value; -end; - -function TcxGridChartViewData.CalculateDataGroupIndex: Integer; -begin - Result := GetDataGroupIndexByLevel(ChildLevel); -end; - -function TcxGridChartViewData.CalculateSumOfValues(ASeriesIndex: Integer): Variant; -var - I: Integer; -begin - Result := 0; - for I := 0 to VisibleCategoryCount - 1 do - Result := Result + Abs(VisibleValues[ASeriesIndex, I]); -end; - -procedure TcxGridChartViewData.CheckValueAtLevel(ALevel: Integer; var AValue: Variant); -var - ADataGroupIndex: Integer; -begin - ADataGroupIndex := GetDataGroupIndexByLevel(ALevel); - if (ADataGroupIndex = -2) or - (DataController.Groups.GetDataGroupIndexByGroupValue(ADataGroupIndex, AValue) = -1) then - AValue := Null; -end; - -function TcxGridChartViewData.GetDataGroupIndexByLevel(ALevel: Integer): Integer; -var - I, ADataGroupIndex: Integer; -begin - Result := -1; - for I := 0 to ALevel - 1 do - begin - ADataGroupIndex := DataController.Groups.GetDataGroupIndexByGroupValue(Result, - (DataController.GetItem(DataController.Groups.GroupingItemIndex[I]) as TcxGridChartDataGroup).ActiveValue); - if ADataGroupIndex = -1 then - begin - Result := -2; - Break; - end; -{ if ADataGroupIndex = -1 then - ADataGroupIndex := DataController.Groups.ChildDataGroupIndex[Result, 0];} - Result := ADataGroupIndex; - end; -end; - -function TcxGridChartViewData.GetRecordIndexByValueIndex(AValueIndex: Integer): Integer; -begin - Result := DataController.GetRowInfo(AValueIndex).RecordIndex; -end; - -procedure TcxGridChartViewData.DataLevelsChanged; -begin - UpdateDataGroupIndex; - UpdateSumsOfValues; -end; - -function TcxGridChartViewData.IsDataGrouped: Boolean; -begin - Result := DataController.Groups.GroupingItemCount <> 0; -end; - -function TcxGridChartViewData.IsSummaryLevel: Boolean; -begin - Result := ChildLevel < DataController.Groups.GroupingItemCount; -end; - -procedure TcxGridChartViewData.CalculateSumsOfValues; -var - I: Integer; -begin - SetLength(FSumOfValues, GridView.SeriesCount); - for I := 0 to GridView.SeriesCount - 1 do - FSumOfValues[I] := CalculateSumOfValues(I); -end; - -procedure TcxGridChartViewData.SeriesPosChanged(ASeries: TcxGridChartSeries); -begin - UpdateSumsOfValues; -end; - -procedure TcxGridChartViewData.Update(AInfo: TcxUpdateControlInfo); -begin - if (AInfo is TcxDataChangedInfo) or (AInfo is TcxLayoutChangedInfo) then - begin - DataLevelsChanged; - GridView.UpdateDataGroupActiveValues; - end; -end; - -procedure TcxGridChartViewData.UpdateDataGroupIndex; -begin - FDataGroupIndex := -2; -end; - -procedure TcxGridChartViewData.UpdateSumsOfValues; -begin - FSumOfValues := nil; -end; - -procedure TcxGridChartViewData.GetVisibleGroupValues(ADataGroup: TcxGridChartDataGroup; - AStrings: TStrings; out AValues: TVariantArray); -var - ADataGroupIndex, I: Integer; - AValue: Variant; -begin - ADataGroupIndex := GetDataGroupIndexByLevel(ADataGroup.VisibleIndex); - I := DataController.Groups.ChildCount[ADataGroupIndex]; - SetLength(AValues, I); - AStrings.BeginUpdate; - try - AStrings.Clear; - for I := 0 to I - 1 do - begin - AValue := DataController.Groups.GroupValues[ - DataController.Groups.ChildDataGroupIndex[ADataGroupIndex, I]]; - AStrings.Add(ADataGroup.GetValueDisplayText(AValue)); - AValues[I] := AValue; - end; - finally - AStrings.EndUpdate; - end; -end; - -{ TcxCustomGridChartPartViewInfo } - -function TcxCustomGridChartPartViewInfo.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -function TcxCustomGridChartPartViewInfo.GetGridViewInfo: TcxGridChartViewInfo; -begin - Result := TcxGridChartViewInfo(inherited GridViewInfo); -end; - -function TcxCustomGridChartPartViewInfo.GetHeight: Integer; -begin - if inherited GetHeight = 0 then - Height := CalculateHeight; - Result := inherited GetHeight; -end; - -function TcxCustomGridChartPartViewInfo.GetVisible: Boolean; -begin - Result := Position <> cppNone; -end; - -function TcxCustomGridChartPartViewInfo.GetWidth: Integer; -begin - if inherited GetWidth = 0 then - Width := CalculateWidth; - Result := inherited GetWidth; -end; - -{ TcxCustomGridChartTitleViewInfo } - -constructor TcxCustomGridChartTitleViewInfo.Create(AGridViewInfo: TcxCustomGridViewInfo; - ATitle: TcxCustomGridChartTitle); -begin - inherited Create(AGridViewInfo); - FTitle := ATitle; -end; - -function TcxCustomGridChartTitleViewInfo.CalculateHeight: Integer; -begin - if Orientation = cpoHorizontal then - Result := TextHeight - else - Result := CalculateTextWidth(90); -end; - -function TcxCustomGridChartTitleViewInfo.CalculateWidth: Integer; -begin - if Orientation = cpoHorizontal then - Result := TextWidth - else - Result := CalculateTextHeight(False, 90); -end; - -function TcxCustomGridChartTitleViewInfo.GetAlignment: TcxGridChartPartAlignment; -begin - Result := FTitle.GetAlignment; -end; - -function TcxCustomGridChartTitleViewInfo.GetOrientation: TcxGridChartPartOrientation; -begin - Result := FTitle.GetOrientation; -end; - -function TcxCustomGridChartTitleViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartTitlePainter; -end; - -function TcxCustomGridChartTitleViewInfo.GetPosition: TcxGridChartPartPosition; -begin - Result := FTitle.GetPosition; -end; - -function TcxCustomGridChartTitleViewInfo.GetText: string; -begin - Result := FTitle.GetText; -end; - -function TcxCustomGridChartTitleViewInfo.GetTextAreaBounds: TRect; -begin - Result := ContentBounds; - if Orientation = cpoVertical then - SwapIntegers(Result.Top, Result.Bottom); -end; - -function TcxCustomGridChartTitleViewInfo.HasBackground: Boolean; -begin - Result := False; -end; - -{ TcxGridChartLegendItemViewInfo } - -constructor TcxGridChartLegendItemViewInfo.Create(AContainer: TcxGridChartLegendViewInfo; - AIndex: Integer); -begin - inherited Create(AContainer.GridViewInfo); - FContainer := AContainer; - FIndex := AIndex; -end; - -function TcxGridChartLegendItemViewInfo.GetDiagram: TcxGridChartDiagram; -begin - Result := FContainer.Diagram; -end; - -function TcxGridChartLegendItemViewInfo.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -function TcxGridChartLegendItemViewInfo.GetLegendKeyHeight: Integer; -begin - Result := FContainer.ItemLegendKeyHeight; -end; - -function TcxGridChartLegendItemViewInfo.GetLegendKeyWidth: Integer; -begin - Result := FContainer.ItemLegendKeyWidth; -end; - -function TcxGridChartLegendItemViewInfo.GetSeries: TcxGridChartSeries; -begin - if Container.GetItemSeriesIndex(Index) = -1 then - Result := nil - else - Result := GridView.VisibleSeries[Container.GetItemSeriesIndex(Index)]; -end; - -function TcxGridChartLegendItemViewInfo.CalculateContentBounds: TRect; -begin - Result := inherited CalculateContentBounds; - InflateRect(Result, -LegendKeyOffset div 2, 0); -end; - -function TcxGridChartLegendItemViewInfo.CalculateHeight: Integer; -begin - Result := TextHeight; -end; - -function TcxGridChartLegendItemViewInfo.CalculateWidth: Integer; -begin - Result := TextWidth; - Inc(Result, LegendKeyOffset div 2 * 2 + LegendKeyWidth + LegendKeyOffset); -end; - -function TcxGridChartLegendItemViewInfo.CalculateLegendKeyHeight: Integer; -begin - Result := CalculateLegendKeySize; -end; - -function TcxGridChartLegendItemViewInfo.CalculateLegendKeySize: Integer; -begin - Result := 2 * LegendKeyOffset; -end; - -function TcxGridChartLegendItemViewInfo.CalculateLegendKeyWidth: Integer; -begin - Result := CalculateLegendKeySize; -end; - -function TcxGridChartLegendItemViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDraw(ACanvas); - if not Result then - begin - Diagram.DoCustomDrawLegendItem(ACanvas, Self, Result); - if not Result then - GridView.DoCustomDrawLegendItem(ACanvas, Self, Result); - end; -end; - -procedure TcxGridChartLegendItemViewInfo.DoCalculateParams; -begin - inherited; - Container.GetItemLegendKeyParams(Index, LegendKeyParams); -end; - -function TcxGridChartLegendItemViewInfo.GetDesignSelectionBounds: TRect; -begin - Result := Bounds; - InflateRect(Result, DesignSelectionWidth, DesignSelectionWidth); -end; - -function TcxGridChartLegendItemViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartLegendItemHitTest; -end; - -function TcxGridChartLegendItemViewInfo.GetIsDesignSelected: Boolean; -begin - Result := (Container.Kind = lkSeries) and GridView.IsDesigning and - GridView.Controller.DesignController.IsObjectSelected(Series); -end; - -function TcxGridChartLegendItemViewInfo.GetLegendKeyBorders: TcxBorders; -begin - if Diagram.Legend.GetKeyBorder = lbSingle then - Result := cxBordersAll - else - Result := []; -end; - -function TcxGridChartLegendItemViewInfo.GetLegendKeyBounds: TRect; -begin - CalculateParams; - Result := ContentBounds; - with Result do - begin - Right := Left + LegendKeyWidth; - Top := MulDiv(Top + Bottom - LegendKeyHeight, 1, 2); - Bottom := Top + LegendKeyHeight; - end; -end; - -function TcxGridChartLegendItemViewInfo.GetLegendKeyOffset: Integer; -begin - CalculateParams; - Result := MulDiv(Canvas.FontHeight(Params.Font), 3, 8); -end; - -function TcxGridChartLegendItemViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartLegendItemPainter; -end; - -function TcxGridChartLegendItemViewInfo.GetText: string; -begin - Result := FContainer.GetItemCaption(FIndex); -end; - -function TcxGridChartLegendItemViewInfo.GetTextAreaBounds: TRect; -begin - Result := ContentBounds; - Inc(Result.Left, LegendKeyWidth + LegendKeyOffset); -end; - -procedure TcxGridChartLegendItemViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - FContainer.GetViewParams(AParams); -end; - -function TcxGridChartLegendItemViewInfo.HasBackground: Boolean; -begin - Result := False; -end; - -function TcxGridChartLegendItemViewInfo.HasCustomDraw: Boolean; -begin - Result := Diagram.HasCustomDrawLegendItem or GridView.HasCustomDrawLegendItem; -end; - -procedure TcxGridChartLegendItemViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - with AHitTest as TcxGridChartLegendItemHitTest do - begin - Index := Self.Index; - Series := Self.Series; - ValueIndex := Container.GetItemValueIndex(Self.Index); - end; -end; - -function TcxGridChartLegendItemViewInfo.GetAreaBoundsForPainting: TRect; -begin - Result := DesignSelectionBounds; -end; - -function TcxGridChartLegendItemViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if (Container.Kind = lkSeries) and - (AButton = mbLeft) and not (ssDouble in AShift) and GridView.IsDesigning then - begin - GridView.Controller.DesignController.SelectObject(Series, not (ssShift in AShift)); - Result := True; - end; -end; - -{ TcxGridChartLegendViewInfo } - -constructor TcxGridChartLegendViewInfo.Create(AGridViewInfo: TcxCustomGridViewInfo; - ADiagram: TcxGridChartDiagram); -var - I: Integer; -begin - inherited Create(AGridViewInfo); - FDiagram := ADiagram; - FItems := TList.Create; - for I := 0 to GetItemCount - 1 do - AddItem; -end; - -destructor TcxGridChartLegendViewInfo.Destroy; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Free; - FItems.Free; - inherited; -end; - -function TcxGridChartLegendViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridChartLegendViewInfo.GetItem(Index: Integer): TcxGridChartLegendItemViewInfo; -begin - Result := TcxGridChartLegendItemViewInfo(FItems[Index]); -end; - -function TcxGridChartLegendViewInfo.GetItemLegendKeyWidth: Integer; -begin - if FItemLegendKeyWidth = 0 then - FItemLegendKeyWidth := CalculateItemLegendKeyWidth; - Result := FItemLegendKeyWidth; -end; - -function TcxGridChartLegendViewInfo.GetItemLegendKeyHeight: Integer; -begin - if FItemLegendKeyHeight = 0 then - FItemLegendKeyHeight := CalculateItemLegendKeyHeight; - Result := FItemLegendKeyHeight; -end; - -function TcxGridChartLegendViewInfo.GetItemOffset: Integer; -begin - if FItemOffset = 0 then - FItemOffset := CalculateItemOffset; - Result := FItemOffset; -end; - -function TcxGridChartLegendViewInfo.CalculateHeight: Integer; -var - I: Integer; -begin - CalculateParams; - if Orientation = cpoHorizontal then - begin - Result := 0; - for I := 0 to Count - 1 do - Result := Max(Result, Items[I].CalculateHeight); - end - else - begin - Result := ItemOffset * (Count - 1); - for I := 0 to Count - 1 do - Inc(Result, Items[I].CalculateHeight); - end; - Inc(Result, BorderSize[bTop] + BorderSize[bBottom] + 2 * ItemOffset); -end; - -function TcxGridChartLegendViewInfo.CalculateWidth: Integer; -var - I: Integer; -begin - CalculateParams; - if Orientation = cpoHorizontal then - begin - Result := ItemOffset * (Count - 1); - for I := 0 to Count - 1 do - Inc(Result, Items[I].CalculateWidth); - end - else - begin - Result := 0; - for I := 0 to Count - 1 do - Result := Max(Result, Items[I].CalculateWidth); - end; - Inc(Result, BorderSize[bLeft] + BorderSize[bRight] + 2 * ItemOffset); -end; - -function TcxGridChartLegendViewInfo.CalculateItemLegendKeyWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - Result := Max(Result, Items[I].CalculateLegendKeyWidth); -end; - -function TcxGridChartLegendViewInfo.CalculateItemLegendKeyHeight: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - Result := Max(Result, Items[I].CalculateLegendKeyHeight); -end; - -function TcxGridChartLegendViewInfo.CalculateItemOffset: Integer; -begin - CalculateParams; - Result := MulDiv(Canvas.FontHeight(Params.Font), 1, 4); -end; - -function TcxGridChartLegendViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDraw(ACanvas); - if not Result then - begin - Diagram.DoCustomDrawLegend(ACanvas, Self, Result); - if not Result then - GridView.DoCustomDrawLegend(ACanvas, Self, Result); - end; -end; - -function TcxGridChartLegendViewInfo.GetAlignment: TcxGridChartPartAlignment; -begin - Result := Diagram.Legend.GetAlignment; -end; - -function TcxGridChartLegendViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := Params.TextColor; -end; - -function TcxGridChartLegendViewInfo.GetBorders: TcxBorders; -begin - if Diagram.Legend.GetBorder = lbSingle then - Result := cxBordersAll - else - Result := []; -end; - -function TcxGridChartLegendViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := 1; -end; - -function TcxGridChartLegendViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartLegendHitTest; -end; - -function TcxGridChartLegendViewInfo.GetOrientation: TcxGridChartPartOrientation; -begin - Result := Diagram.Legend.GetOrientation; -end; - -function TcxGridChartLegendViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartLegendPainter; -end; - -function TcxGridChartLegendViewInfo.GetPosition: TcxGridChartPartPosition; -begin - Result := Diagram.Legend.GetPosition; -end; - -procedure TcxGridChartLegendViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - Diagram.Styles.GetViewParams(dsLegend, nil, nil, AParams); -end; - -function TcxGridChartLegendViewInfo.GetVisible: Boolean; -begin - Result := inherited GetVisible and (Count <> 0); -end; - -function TcxGridChartLegendViewInfo.HasCustomDraw: Boolean; -begin - Result := Diagram.HasCustomDrawLegend or GridView.HasCustomDrawLegend; -end; - -function TcxGridChartLegendViewInfo.AddItem: TcxGridChartLegendItemViewInfo; -begin - Result := GetItemClass.Create(Self, Count); - FItems.Add(Result); -end; - -procedure TcxGridChartLegendViewInfo.CalculateItems; -var - AItemLeftOffset, AItemTopOffset, I: Integer; -begin - AItemLeftOffset := ContentBounds.Left + ItemOffset; - AItemTopOffset := ContentBounds.Top + ItemOffset; - for I := 0 to Count - 1 do - begin - Items[I].Calculate(AItemLeftOffset, AItemTopOffset); - if Orientation = cpoHorizontal then - AItemLeftOffset := Items[I].Bounds.Right + ItemOffset - else - AItemTopOffset := Items[I].Bounds.Bottom + ItemOffset; - end; -end; - -function TcxGridChartLegendViewInfo.GetItemCaption(AIndex: Integer): string; -begin - if Kind = lkSeries then - Result := GridView.VisibleSeries[GetItemSeriesIndex(AIndex)].GetDisplayText - else - begin - Result := GridView.Categories.VisibleDisplayTexts[GetItemValueIndex(AIndex)]; - if Result = '' then - Result := '<' + IntToStr(1 + AIndex) + '>'; - end; -end; - -function TcxGridChartLegendViewInfo.GetItemClass: TcxGridChartLegendItemViewInfoClass; -begin - Result := TcxGridChartLegendItemViewInfo; -end; - -function TcxGridChartLegendViewInfo.GetItemCount: Integer; -begin - if Kind = lkSeries then - Result := GridView.VisibleSeriesCount - else - Result := GridView.Categories.VisibleValueCount; -end; - -function TcxGridChartLegendViewInfo.GetItemSeriesIndex(AIndex: Integer): Integer; -begin - if Kind = lkSeries then - Result := GetItemObjectIndex(AIndex) - else - if GridView.VisibleSeriesCount = 1 then - Result := 0 - else - Result := -1; -end; - -function TcxGridChartLegendViewInfo.GetItemValueIndex(AIndex: Integer): Integer; -begin - if Kind = lkSeries then - Result := -1 - else - Result := GetItemObjectIndex(AIndex); -end; - -{function TcxGridChartLegendViewInfo.ItemLegendKeyBorderIsValueBorder: Boolean; -begin - Result := False; -end;} - -procedure TcxGridChartLegendViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - CalculateItems; -end; - -function TcxGridChartLegendViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; - AHitTest: TcxCustomGridHitTest; -begin - Result := inherited GetHitTest(P); - if Result <> nil then - for I := 0 to Count - 1 do - begin - AHitTest := Items[I].GetHitTest(P); - if AHitTest <> nil then - begin - Result := AHitTest; - Break; - end; - end; -end; - -procedure TcxGridChartLegendViewInfo.GetItemLegendKeyParams(AIndex: Integer; - out AParams: TcxViewParams); -begin - Diagram.Styles.GetValueParams(GetItemSeriesIndex(AIndex), GetItemValueIndex(AIndex), AParams); -{ if not ItemLegendKeyBorderIsValueBorder then - AParams.TextColor := Params.TextColor;} -end; - -{ TcxGridChartDiagramValueCaptionViewInfo } - -constructor TcxGridChartDiagramValueCaptionViewInfo.Create(AValueViewInfo: TcxGridChartDiagramValueViewInfo); -begin - inherited Create(AValueViewInfo.GridViewInfo); - FValueViewInfo := AValueViewInfo; -end; - -function TcxGridChartDiagramValueCaptionViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := taCenter; -end; - -function TcxGridChartDiagramValueCaptionViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridChartDiagramValueCaptionViewInfo.CalculateHeight: Integer; -begin - Result := TextHeight; - if HasVisualCompensation then Inc(Result, 2 * cxTextOffset); -end; - -function TcxGridChartDiagramValueCaptionViewInfo.CalculateWidth: Integer; -begin - Result := TextWidthWithOffset; - if HasVisualCompensation then Inc(Result, 2 * cxTextOffset); -end; - -function TcxGridChartDiagramValueCaptionViewInfo.GetText: string; -begin - Result := FValueViewInfo.GetCaptionText; -end; - -function TcxGridChartDiagramValueCaptionViewInfo.GetTextAreaBounds: TRect; -begin - Result := ContentBounds; -end; - -function TcxGridChartDiagramValueCaptionViewInfo.GetTextAttributes(AForPainting: Boolean): Integer; -begin - Result := inherited GetTextAttributes(AForPainting) or cxDontClip; -end; - -procedure TcxGridChartDiagramValueCaptionViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - FValueViewInfo.GetCaptionViewParams(AParams); -end; - -function TcxGridChartDiagramValueCaptionViewInfo.GetVisible: Boolean; -begin - Result := FValueViewInfo.HasCaption; -end; - -function TcxGridChartDiagramValueCaptionViewInfo.HasBackground: Boolean; -begin - Result := False; -end; - -function TcxGridChartDiagramValueCaptionViewInfo.HasVisualCompensation: Boolean; -begin - Result := FValueViewInfo.HasCaptionVisualCompensation; -end; - -{ TcxGridChartDiagramValueViewInfo } - -constructor TcxGridChartDiagramValueViewInfo.Create(ADiagramViewInfo: TcxGridChartDiagramViewInfo; - ASeriesIndex, AVisibleValueIndex: Integer); -begin - inherited Create(ADiagramViewInfo.GridViewInfo); - FDiagramViewInfo := ADiagramViewInfo; - FSeriesIndex := ASeriesIndex; - FVisibleValueIndex := AVisibleValueIndex; - FCaptionViewInfo := GetCaptionViewInfoClass.Create(Self); -end; - -destructor TcxGridChartDiagramValueViewInfo.Destroy; -begin - FCaptionViewInfo.Free; - inherited; -end; - -function TcxGridChartDiagramValueViewInfo.GetController: TcxGridChartController; -begin - Result := TcxGridChartController(inherited Controller); -end; - -function TcxGridChartDiagramValueViewInfo.GetDiagram: TcxGridChartDiagram; -begin - Result := FDiagramViewInfo.Diagram; -end; - -function TcxGridChartDiagramValueViewInfo.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -function TcxGridChartDiagramValueViewInfo.GetSeries: TcxGridChartSeries; -begin - Result := GridView.VisibleSeries[FSeriesIndex]; -end; - -function TcxGridChartDiagramValueViewInfo.GetValueIndex: Integer; -begin - Result := DiagramViewInfo.GetValueIndex(VisibleValueIndex); -end; - -function TcxGridChartDiagramValueViewInfo.CanShowHint: Boolean; -begin - Result := GridView.OptionsBehavior.ValueHints; -end; - -function TcxGridChartDiagramValueViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDraw(ACanvas); - if not Result then - begin - Series.DoCustomDrawValue(ACanvas, Self, Result); - if not Result then - Diagram.DoCustomDrawValue(ACanvas, Self, Result); - end; -end; - -function TcxGridChartDiagramValueViewInfo.GetCaptionViewInfoClass: TcxGridChartDiagramValueCaptionViewInfoClass; -begin - Result := TcxGridChartDiagramValueCaptionViewInfo; -end; - -function TcxGridChartDiagramValueViewInfo.GetCaptionText: string; -begin - Result := DiagramViewInfo.GetValueCaption(SeriesIndex, VisibleValueIndex); -end; - -procedure TcxGridChartDiagramValueViewInfo.GetCaptionViewParams(var AParams: TcxViewParams); -begin - Diagram.Styles.GetViewParams(dsValueCaptions, nil, nil, AParams); -end; - -function TcxGridChartDiagramValueViewInfo.GetCellBoundsForHint: TRect; -begin - Result := Bounds; -end; - -function TcxGridChartDiagramValueViewInfo.GetHintText: string; -begin - Result := Controller.GetValueHintText(Series, ValueIndex); -end; - -function TcxGridChartDiagramValueViewInfo.GetHintTextRect(const AMousePos: TPoint): TRect; -begin - Result.TopLeft := AMousePos; - Inc(Result.Top, ValueHintOffset); - Result.BottomRight := Result.TopLeft; -end; - -function TcxGridChartDiagramValueViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartValueHitTest; -end; - -function TcxGridChartDiagramValueViewInfo.GetHotTrack: Boolean; -begin - Result := GridView.OptionsBehavior.GetValueHotTrack(ValueIndex); -end; - -function TcxGridChartDiagramValueViewInfo.GetIsDesignSelected: Boolean; -begin - Result := GridView.IsDesigning and - Controller.DesignController.IsObjectSelected(Series); -end; - -procedure TcxGridChartDiagramValueViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - Diagram.Styles.GetValueParams(SeriesIndex, ValueIndex, AParams); - if State <> gcsNone then - AParams.Color := GetHotColor(AParams.Color); -end; - -function TcxGridChartDiagramValueViewInfo.HasCaption: Boolean; -begin - Result := False; -end; - -function TcxGridChartDiagramValueViewInfo.HasCaptionVisualCompensation: Boolean; -begin - Result := False; -end; - -function TcxGridChartDiagramValueViewInfo.HasCustomDraw: Boolean; -begin - Result := Series.HasCustomDrawValue or Diagram.HasCustomDrawValue; -end; - -function TcxGridChartDiagramValueViewInfo.HasHintPoint(const P: TPoint): Boolean; -begin - Result := HasPoint(P); -end; - -procedure TcxGridChartDiagramValueViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - TcxGridChartValueHitTest(AHitTest).CanDrillDown := Controller.IsDataDrillDownPossible(ValueIndex); - TcxGridChartValueHitTest(AHitTest).Series := Series; - TcxGridChartValueHitTest(AHitTest).ValueIndex := ValueIndex; -end; - -function TcxGridChartDiagramValueViewInfo.IsHintForText: Boolean; -begin - Result := False; -end; - -function TcxGridChartDiagramValueViewInfo.IsHintMultiLine: Boolean; -begin - Result := False; -end; - -procedure TcxGridChartDiagramValueViewInfo.StateChanged(APrevState: TcxGridCellState); -begin - CalculateParamsNeeded; - inherited; -end; - -procedure TcxGridChartDiagramValueViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - if HasCaption then - CaptionViewInfo.Calculate(CalculateCaptionBounds); -end; - -function TcxGridChartDiagramValueViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if not (ssDouble in AShift) then - if GridView.IsDesigning then - if AButton = mbLeft then - begin - Controller.DesignController.SelectObject(Series, not (ssShift in AShift)); - Result := True; - end - else - else - begin - if AButton = mbLeft then - Result := Series.DoValueClick(ValueIndex); - if (AHitTest as TcxGridChartValueHitTest).CanDrillDown then - case AButton of - mbLeft: - if not Result then - Result := Controller.DoDataDrillDown(ValueIndex); - mbRight: - if GridView.OptionsCustomize.DataDrillUpMethod = ddumValueMouseRightButtonClick then - Result := Controller.DoDataDrillUp; - end; - end; -end; - -{ TcxGridChartDiagramViewInfo } - -constructor TcxGridChartDiagramViewInfo.Create(AGridViewInfo: TcxCustomGridViewInfo; - ADiagram: TcxGridChartDiagram); -begin - inherited Create(AGridViewInfo); - FDiagram := ADiagram; - FValueViewInfos := TList.Create; -end; - -destructor TcxGridChartDiagramViewInfo.Destroy; -var - I: Integer; -begin - for I := 0 to ValueViewInfoCount - 1 do - ValueViewInfos[I].Free; - FValueViewInfos.Free; - inherited; -end; - -function TcxGridChartDiagramViewInfo.GetCategory(AIndex: Integer): string; -begin - Result := GridView.Categories.VisibleDisplayTexts[AIndex]; -end; - -function TcxGridChartDiagramViewInfo.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -function TcxGridChartDiagramViewInfo.GetSeries(AIndex: Integer): TcxGridChartSeries; -begin - Result := GridView.VisibleSeries[AIndex]; -end; - -function TcxGridChartDiagramViewInfo.GetSeriesCount: Integer; -begin - Result := GridView.VisibleSeriesCount; -end; - -function TcxGridChartDiagramViewInfo.GetValueCount: Integer; -begin - Result := ViewData.VisibleCategoryCount; -end; - -function TcxGridChartDiagramViewInfo.GetValueViewInfoValue(Index: Integer): TcxGridChartDiagramValueViewInfo; -begin - Result := TcxGridChartDiagramValueViewInfo(FValueViewInfos[Index]); -end; - -function TcxGridChartDiagramViewInfo.GetValueViewInfoCount: Integer; -begin - Result := FValueViewInfos.Count; -end; - -function TcxGridChartDiagramViewInfo.GetViewData: TcxGridChartViewData; -begin - Result := GridView.ViewData; -end; - -procedure TcxGridChartDiagramViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - Diagram.Styles.GetBackgroundParams(AParams); -end; - -procedure TcxGridChartDiagramViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - (AHitTest as TcxCustomGridChartDiagramHitTest).Diagram := Diagram; -end; - -function TcxGridChartDiagramViewInfo.CreateValueViewInfo(ASeriesIndex, AVisibleValueIndex: Integer): TcxGridChartDiagramValueViewInfo; -begin - Result := GetValueViewInfoClass.Create(Self, ASeriesIndex, AVisibleValueIndex); - FValueViewInfos.Add(Result); -end; - -function TcxGridChartDiagramViewInfo.GetValue(ASeriesIndex, AIndex: Integer): Variant; -begin - Result := GridView.VisibleSeries[ASeriesIndex].VisibleValues[AIndex]; -end; - -function TcxGridChartDiagramViewInfo.GetValueCaption(ASeriesIndex, AVisibleValueIndex: Integer): string; -begin - Result := Diagram.GetValueCaption(GridView.VisibleSeries[ASeriesIndex], - GetValueIndex(AVisibleValueIndex)); -end; - -function TcxGridChartDiagramViewInfo.GetValueIndex(AVisibleValueIndex: Integer): Integer; -begin - Result := GridView.Controller.FirstVisibleCategoryIndex + AVisibleValueIndex; -end; - -class function TcxGridChartDiagramViewInfo.GetValueViewInfoClass: TcxGridChartDiagramValueViewInfoClass; -begin - Result := nil; -end; - -function TcxGridChartDiagramViewInfo.GetVisibleCategory(AIndex: Integer): string; -begin - Result := Categories[GetValueIndex(AIndex)]; -end; - -function TcxGridChartDiagramViewInfo.GetVisibleValue(ASeriesIndex, AIndex: Integer): Variant; -begin - Result := Values[ASeriesIndex, GetValueIndex(AIndex)]; -end; - -function TcxGridChartDiagramViewInfo.GetVisibleValueCount: Integer; -begin - Result := GridView.Controller.GetVisibleCategoryCount(True); -end; - -function TcxGridChartDiagramViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; -begin - Result := nil; - for I := 0 to ValueViewInfoCount - 1 do - begin - Result := ValueViewInfos[I].GetHitTest(P); - if Result <> nil then Break; - end; -end; - -function TcxGridChartDiagramViewInfo.GetValueViewInfo(ASeriesIndex, AVisibleIndex: Integer): TcxGridChartDiagramValueViewInfo; -begin - Result := ValueViewInfos[GetValueViewInfoIndex(ASeriesIndex, AVisibleIndex)]; -end; - -{ TcxGridChartHistogramLegendViewInfo } - -function TcxGridChartHistogramLegendViewInfo.GetDiagram: TcxGridChartHistogram; -begin - Result := TcxGridChartHistogram(inherited Diagram); -end; - -function TcxGridChartHistogramLegendViewInfo.GetItemObjectIndex(AIndex: Integer): Integer; -begin - if ItemsInReverseOrder then - Result := Count - 1 - AIndex - else - Result := AIndex; -end; - -function TcxGridChartHistogramLegendViewInfo.GetItemsInReverseOrder: Boolean; -begin - Result := False; -end; - -function TcxGridChartHistogramLegendViewInfo.GetKind: TcxGridChartLegendKind; -begin - if Diagram.Values.GetVaryColorsByCategory then - Result := lkCategories - else - Result := lkSeries; -end; - -{ TcxGridChartHistogramValueViewInfo } - -function TcxGridChartHistogramValueViewInfo.GetCategoryDirection: TcxDirection; -begin - Result := DiagramViewInfo.GetCategoryDirection; -end; - -function TcxGridChartHistogramValueViewInfo.GetDiagramViewInfo: TcxGridChartHistogramViewInfo; -begin - Result := TcxGridChartHistogramViewInfo(inherited DiagramViewInfo); -end; - -function TcxGridChartHistogramValueViewInfo.GetValueDirection: TcxDirection; -begin - Result := DiagramViewInfo.GetValueDirection(SeriesIndex, VisibleValueIndex); -end; - -{ TcxGridChartHistogramAxisTitleViewInfo } - -constructor TcxGridChartHistogramAxisTitleViewInfo.Create(AContainer: TcxGridChartHistogramTickMarkLabelsViewInfo; - ATitle: TcxCustomGridChartTitle); -begin - inherited Create(AContainer.GridViewInfo, ATitle); - FContainer := AContainer; -end; - -function TcxGridChartHistogramAxisTitleViewInfo.GetTitle: TcxGridChartHistogramAxisTitle; -begin - Result := TcxGridChartHistogramAxisTitle(inherited Title); -end; - -procedure TcxGridChartHistogramAxisTitleViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - FContainer.GetTitleViewParams(AParams); -end; - -procedure TcxGridChartHistogramAxisTitleViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - FContainer.DiagramViewInfo.InitHitTest(AHitTest); - inherited; -end; - -{ TcxGridChartHistogramTickMarkLabelsViewInfo } - -constructor TcxGridChartHistogramTickMarkLabelsViewInfo.Create(ADiagramViewInfo: TcxGridChartHistogramViewInfo); -begin - inherited Create(ADiagramViewInfo.GridViewInfo); - FDiagramViewInfo := ADiagramViewInfo; - FTitleViewInfo := GetTitleViewInfoClass.Create(Self, Axis.Title); -end; - -destructor TcxGridChartHistogramTickMarkLabelsViewInfo.Destroy; -begin - FreeAndNil(FTitleViewInfo); - inherited; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetCaptionBounds(Index: Integer): TRect; -begin - Result := FCaptionBounds[Index]; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetCaptionHeight: Integer; -begin - if FCaptionHeight = 0 then - begin - CalculateParams; - Canvas.Font := Params.Font; - FCaptionHeight := Canvas.TextHeight('Qq'); - end; - Result := FCaptionHeight; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetCaptionWidth(Index: Integer): Integer; -begin - if Index >= Length(FCaptionWidths) then - SetLength(FCaptionWidths, Index + 1); - if FCaptionWidths[Index] = 0 then - begin - CalculateParams; - Canvas.Font := Params.Font; - FCaptionWidths[Index] := Canvas.TextWidth(Captions[Index]); - end; - Result := FCaptionWidths[Index]; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetDiagram: TcxGridChartHistogram; -begin - Result := FDiagramViewInfo.Diagram; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetIsVertical: Boolean; -begin - Result := Position in [cppLeft, cppRight]; -end; - -procedure TcxGridChartHistogramTickMarkLabelsViewInfo.SetCaptionBounds(Index: Integer; - const Value: TRect); -begin - FCaptionBounds[Index] := Value; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartHistogramTickMarkLabelsPainter; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetTitleViewInfoClass: TcxGridChartHistogramAxisTitleViewInfoClass; -begin - Result := TcxGridChartHistogramAxisTitleViewInfo; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetCaption(Index: Integer): string; -begin - Result := Values[Index]; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.CalculateCaptionBounds(AIndex: Integer): TRect; -var - ACaptionWidth, ADirection: Integer; -begin - Result := ContentBounds; - if IsVertical then - begin - Result.Top := GetCaptionPosition(AIndex) - CaptionHeight div 2; - Result.Bottom := Result.Top + CaptionHeight; - end - else - begin - ACaptionWidth := CaptionWidths[AIndex]; - Result.Left := GetCaptionPosition(AIndex) - ACaptionWidth div 2; - Result.Right := Result.Left + ACaptionWidth; - if IsTwoRowLayout then - begin - if IsReverseOrder then - ADirection := -1 - else - ADirection := 1; - if AIndex > 0 then - Result.Left := Max(Result.Left, GetCaptionPosition(AIndex - ADirection) + cxTextOffset); - if AIndex < Count - 1 then - Result.Right := Min(Result.Right, GetCaptionPosition(AIndex + ADirection) - cxTextOffset); - if Odd(AIndex) then - Result.Top := Result.Bottom - CaptionHeight; - end; - end; -end; - -procedure TcxGridChartHistogramTickMarkLabelsViewInfo.CalculateCaptionsBounds; -var - I: Integer; -begin - SetLength(FCaptionBounds, Count); - for I := 0 to Count - 1 do - CaptionBounds[I] := CalculateCaptionBounds(I); -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.CalculateHeight( - AWidth, ALeftReduction, ARightReduction: Integer): Integer; -begin - IsTwoRowLayout := CalculateIsTwoRowLayout(AWidth, ALeftReduction, ARightReduction); - if IsVertical then - Result := 0 - else - begin - if CaptionsVisible then - begin - Result := CaptionHeight; - if IsTwoRowLayout then - Inc(Result, 2 * cxTextOffset + CaptionHeight); - end - else - Result := 0; - if TitleViewInfo.Visible then - begin - if CaptionsVisible then - Inc(Result, ChartPartOffset); - Inc(Result, TitleViewInfo.Height); - end; - end; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.CalculateWidth: Integer; -var - I: Integer; -begin - if IsVertical then - begin - Result := 0; - if CaptionsVisible then - for I := 0 to Count - 1 do - Result := Max(Result, CaptionWidths[I]); - if TitleViewInfo.Visible then - begin - if CaptionsVisible then - Inc(Result, ChartPartOffset); - Inc(Result, TitleViewInfo.Width); - end; - end - else - Result := 0; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.CalculateIsTwoRowLayout( - AWidth, ALeftReduction, ARightReduction: Integer): Boolean; -var - I: Integer; -begin - Result := False; - if IsVertical or (Count <= 1) then Exit; - AWidth := GetCaptionSpace(AWidth, ALeftReduction, ARightReduction); - for I := 0 to Count - 1 do - begin - Result := CaptionWidths[I] > AWidth; - if Result then Exit; - end; -end; - -procedure TcxGridChartHistogramTickMarkLabelsViewInfo.CalculateTitleBounds(out ATitleBounds, AContentBounds: TRect); -begin - AContentBounds := CalculateContentBounds; - if TitleViewInfo.Visible then - begin - PositionRect(ATitleBounds, AContentBounds, TitleViewInfo.Width, TitleViewInfo.Height, - ChartPartOffset, Position); - with DiagramViewInfo.PlotBounds do - if IsVertical then - begin - ATitleBounds.Top := Top; - ATitleBounds.Bottom := Bottom; - end - else - begin - ATitleBounds.Left := Left; - ATitleBounds.Right := Right; - end; - AlignRect(ATitleBounds, TitleViewInfo.Width, TitleViewInfo.Height, not IsVertical, - TitleViewInfo.Alignment); - end - else - SetRectEmpty(ATitleBounds); -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetAlignmentHorz: TAlignment; -begin - if IsVertical then - if Position = cppLeft then - Result := taRightJustify - else - Result := taLeftJustify - else - Result := taCenter; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetCaptionsVisible: Boolean; -begin - Result := Axis.TickMarkLabels; -end; - -procedure TcxGridChartHistogramTickMarkLabelsViewInfo.GetEdgeCaptionsReductions( - var ALeftReduction, ARightReduction: Integer); -begin - ALeftReduction := Max(ALeftReduction, CaptionWidths[0] div 2); - ARightReduction := Max(ARightReduction, CaptionWidths[Count - 1] div 2); -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetTextAttributes(AForPainting: Boolean): Integer; -begin - Result := inherited GetTextAttributes(AForPainting) or cxDontClip or cxShowEndEllipsis; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetVisible: Boolean; -begin - Result := CaptionsVisible or TitleViewInfo.Visible; -end; - -procedure TcxGridChartHistogramTickMarkLabelsViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -var - ATitleBounds: TRect; -begin - inherited; - CalculateTitleBounds(ATitleBounds, FContentBounds); - CalculateCaptionsBounds; - if TitleViewInfo.Visible then - TitleViewInfo.Calculate(ATitleBounds); -end; - -procedure TcxGridChartHistogramTickMarkLabelsViewInfo.FitCaptionsHorz(AWidth: Integer; - var ALeftReduction, ARightReduction: Integer); -var - ACaptionSpace, ALeftOffset, ARightOffset: Integer; -begin - if not CaptionsVisible then Exit; - if IsTwoRowLayout and not IsEdgeCaptions then - begin - ACaptionSpace := GetCaptionSpace(AWidth, ALeftReduction, ARightReduction); - ALeftOffset := Max(0, (CaptionWidths[0] - ACaptionSpace) div 2 - ALeftReduction); - ARightOffset := Max(0, (CaptionWidths[Count - 1] - ACaptionSpace) div 2 - ARightReduction); - - Inc(ALeftReduction, MulDiv((2 * ARightOffset + (4 * Count - 2) * ALeftOffset), 1, 4 * Count - 4)); - Inc(ARightReduction, MulDiv((2 * ALeftOffset + (4 * Count - 2) * ARightOffset), 1, 4 * Count - 4)); - end - else - if IsEdgeCaptions and (Count <> 0) then - GetEdgeCaptionsReductions(ALeftReduction, ARightReduction); -end; - -procedure TcxGridChartHistogramTickMarkLabelsViewInfo.FitCaptionsVert( - var ATopReduction, ABottomReduction: Integer); -begin - if not CaptionsVisible then Exit; - if IsEdgeCaptions then - begin - ATopReduction := Max(ATopReduction, CaptionHeight div 2); - ABottomReduction := Max(ABottomReduction, CaptionHeight div 2); - end; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetCaptionSpace( - AWidth, ALeftReduction, ARightReduction: Integer): Integer; -var - ACount: Integer; -begin - ACount := Count; - if IsEdgeCaptions then - begin - Dec(ACount); - GetEdgeCaptionsReductions(ALeftReduction, ARightReduction); - end; - Dec(AWidth, ALeftReduction + ARightReduction); - Result := AWidth div ACount - 4 * cxTextOffset; -end; - -function TcxGridChartHistogramTickMarkLabelsViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := FTitleViewInfo.GetHitTest(P); -end; - -{ TcxGridChartHistogramCategoryAxisTitleViewInfo } - -function TcxGridChartHistogramCategoryAxisTitleViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartHistogramCategoryAxisTitleHitTest; -end; - -{ TcxGridChartHistogramCategoryTickMarkLabelsViewInfo } - -function TcxGridChartHistogramCategoryTickMarkLabelsViewInfo.GetTitleViewInfoClass: TcxGridChartHistogramAxisTitleViewInfoClass; -begin - Result := TcxGridChartHistogramCategoryAxisTitleViewInfo; -end; - -function TcxGridChartHistogramCategoryTickMarkLabelsViewInfo.GetCount: Integer; -begin - Result := DiagramViewInfo.VisibleValueCount; -end; - -function TcxGridChartHistogramCategoryTickMarkLabelsViewInfo.GetIsReverseOrder: Boolean; -begin - Result := DiagramViewInfo.IsCategoriesInReverseOrder; -end; - -function TcxGridChartHistogramCategoryTickMarkLabelsViewInfo.GetValue(Index: Integer): Variant; -begin - Result := DiagramViewInfo.VisibleCategories[Index]; -end; - -function TcxGridChartHistogramCategoryTickMarkLabelsViewInfo.GetAxis: TcxGridChartHistogramAxis; -begin - Result := Diagram.AxisCategory; -end; - -function TcxGridChartHistogramCategoryTickMarkLabelsViewInfo.GetCaptionPosition(AIndex: Integer): Integer; -begin - Result := DiagramViewInfo.GetUnitOffset(DiagramViewInfo.GetCategoryTickMarkLabelOffsetUnits(AIndex)); -end; - -function TcxGridChartHistogramCategoryTickMarkLabelsViewInfo.GetIsEdgeCaptions: Boolean; -begin - Result := DiagramViewInfo.IsEdgeCategoryTickMarkLabels; -end; - -function TcxGridChartHistogramCategoryTickMarkLabelsViewInfo.GetPosition: TcxGridChartAxisPosition; -begin - Result := DiagramViewInfo.CategoryAxisPosition; -end; - -procedure TcxGridChartHistogramCategoryTickMarkLabelsViewInfo.GetTitleViewParams(var AParams: TcxViewParams); -begin - Diagram.Styles.GetViewParams(dsCategoryAxisTitle, nil, nil, AParams); -end; - -procedure TcxGridChartHistogramCategoryTickMarkLabelsViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - Diagram.Styles.GetViewParams(dsCategoryAxis, nil, nil, AParams); -end; - -{ TcxGridChartHistogramValueAxisTitleViewInfo } - -function TcxGridChartHistogramValueAxisTitleViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartHistogramValueAxisTitleHitTest; -end; - -{ TcxGridChartHistogramValueTickMarkLabelsViewInfo } - -function TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetAxisValue: TcxGridChartHistogramAxisValue; -begin - Result := TcxGridChartHistogramAxisValue(inherited Axis); -end; - -function TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetTitleViewInfoClass: TcxGridChartHistogramAxisTitleViewInfoClass; -begin - Result := TcxGridChartHistogramValueAxisTitleViewInfo; -end; - -function TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetCaption(Index: Integer): string; -begin - Result := Axis.GetTickMarkLabel(Values[Index]); -end; - -function TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetCount: Integer; -begin - Result := DiagramViewInfo.ValueMarkCount; -end; - -function TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetIsReverseOrder: Boolean; -begin - Result := False; -end; - -function TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetValue(Index: Integer): Variant; -begin - Result := DiagramViewInfo.ValueMarkValues[Index]; -end; - -function TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetAxis: TcxGridChartHistogramAxis; -begin - Result := Diagram.AxisValue; -end; - -function TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetCaptionPosition(AIndex: Integer): Integer; -begin - Result := DiagramViewInfo.ValueMarkPositions[AIndex]; -end; - -function TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetIsEdgeCaptions: Boolean; -begin - Result := True; -end; - -function TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetPosition: TcxGridChartAxisPosition; -begin - Result := DiagramViewInfo.ValueAxisPosition; -end; - -procedure TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetTitleViewParams(var AParams: TcxViewParams); -begin - Diagram.Styles.GetViewParams(dsValueAxisTitle, nil, nil, AParams); -end; - -procedure TcxGridChartHistogramValueTickMarkLabelsViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - Diagram.Styles.GetViewParams(dsValueAxis, nil, nil, AParams); -end; - -{ TcxGridChartHistogramViewInfo } - -constructor TcxGridChartHistogramViewInfo.Create(AGridViewInfo: TcxCustomGridViewInfo; - ADiagram: TcxGridChartDiagram); -begin - inherited; - FCategoryTickMarkLabelsViewInfo := GetCategoryTickMarkLabelsViewInfoClass.Create(Self); - FValueTickMarkLabelsViewInfo := GetValueTickMarkLabelsViewInfoClass.Create(Self); -end; - -destructor TcxGridChartHistogramViewInfo.Destroy; -begin - FValueTickMarkLabelsViewInfo.Free; - FCategoryTickMarkLabelsViewInfo.Free; - inherited; -end; - -function TcxGridChartHistogramViewInfo.GetCategoryAxisColor: TColor; -var - AParams: TcxViewParams; -begin - Diagram.Styles.GetViewParams(dsCategoryAxis, nil, nil, AParams); - Result := AParams.Color; -end; - -function TcxGridChartHistogramViewInfo.GetCategoryGridLineColor: TColor; -var - AParams: TcxViewParams; -begin - Diagram.Styles.GetViewParams(dsCategoryGridLines, nil, nil, AParams); - Result := AParams.Color; -end; - -function TcxGridChartHistogramViewInfo.GetCategoryMarkCount: Integer; -begin - Result := Length(FCategoryMarks); -end; - -function TcxGridChartHistogramViewInfo.GetCategoryMarkPosition(Index: Integer): Integer; -begin - Result := FCategoryMarks[Index].Position; -end; - -function TcxGridChartHistogramViewInfo.GetCategoryMarkValue(Index: Integer): Integer; -begin - Result := FCategoryMarks[Index].Value; -end; - -function TcxGridChartHistogramViewInfo.GetDiagram: TcxGridChartHistogram; -begin - Result := TcxGridChartHistogram(inherited Diagram); -end; - -function TcxGridChartHistogramViewInfo.GetHasCategoryAxis: Boolean; -begin - Result := Diagram.AxisCategory.Visible and (VisibleValueCount <> 0); -end; - -function TcxGridChartHistogramViewInfo.GetHasCategoryGridLines: Boolean; -begin - Result := Diagram.AxisCategory.GridLines; -end; - -function TcxGridChartHistogramViewInfo.GetHasValueAxis: Boolean; -begin - Result := Diagram.AxisValue.Visible and (VisibleValueCount <> 0); -end; - -function TcxGridChartHistogramViewInfo.GetHasValueGridLines: Boolean; -begin - Result := Diagram.AxisValue.GridLines; -end; - -function TcxGridChartHistogramViewInfo.GetIsCategoriesInReverseOrder: Boolean; -begin - Result := Diagram.AxisCategory.CategoriesInReverseOrder; -end; - -function TcxGridChartHistogramViewInfo.GetIsCategoryAxisHorz: Boolean; -begin - Result := CategoryAxisPosition in [cppTop, cppBottom]; -end; - -function TcxGridChartHistogramViewInfo.GetIsValueAxisVert: Boolean; -begin - Result := ValueAxisPosition in [cppLeft, cppRight]; -end; - -function TcxGridChartHistogramViewInfo.GetPlotBounds: TRect; -begin - if not FIsPlotBoundsCalculated then - begin - FPlotBounds := CalculatePlotBounds; - FIsPlotBoundsCalculated := True; - end; - Result := FPlotBounds; -end; - -function TcxGridChartHistogramViewInfo.GetSumOfValues(AValueIndex: Integer): Variant; -begin - if FSumOfValues = nil then - SetLength(FSumOfValues, ValueCount); - if VarIsEmpty(FSumOfValues[AValueIndex]) then - FSumOfValues[AValueIndex] := CalculateSumOfValues(AValueIndex); - Result := FSumOfValues[AValueIndex]; -end; - -function TcxGridChartHistogramViewInfo.GetValueAxisColor: TColor; -var - AParams: TcxViewParams; -begin - Diagram.Styles.GetViewParams(dsValueAxis, nil, nil, AParams); - Result := AParams.Color; -end; - -function TcxGridChartHistogramViewInfo.GetValueGridLineColor: TColor; -var - AParams: TcxViewParams; -begin - Diagram.Styles.GetViewParams(dsValueGridLines, nil, nil, AParams); - Result := AParams.Color; -end; - -function TcxGridChartHistogramViewInfo.GetValueMarkCount: Integer; -begin - Result := Length(FValueMarks); -end; - -function TcxGridChartHistogramViewInfo.GetValueMarkPosition(Index: Integer): Integer; -begin - Result := FValueMarks[Index].Position; -end; - -function TcxGridChartHistogramViewInfo.GetValueMarkValue(Index: Integer): Extended; -begin - Result := FValueMarks[Index].Value; -end; - -function TcxGridChartHistogramViewInfo.GetZeroValueOffset: Integer; -begin - Result := GetValueOffset(ZeroValue); -end; - -procedure TcxGridChartHistogramViewInfo.SetCategoryMarkPosition(Index: Integer; Value: Integer); -begin - FCategoryMarks[Index].Position := Value; -end; - -procedure TcxGridChartHistogramViewInfo.SetValueMarkPosition(Index: Integer; Value: Integer); -begin - FValueMarks[Index].Position := Value; -end; - -function TcxGridChartHistogramViewInfo.GetCategoryTickMarkLabelsViewInfoClass: TcxGridChartHistogramCategoryTickMarkLabelsViewInfoClass; -begin - Result := TcxGridChartHistogramCategoryTickMarkLabelsViewInfo; -end; - -function TcxGridChartHistogramViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartHistogramPainter; -end; - -function TcxGridChartHistogramViewInfo.GetValueTickMarkLabelsViewInfoClass: TcxGridChartHistogramValueTickMarkLabelsViewInfoClass; -begin - Result := TcxGridChartHistogramValueTickMarkLabelsViewInfo; -end; - -procedure TcxGridChartHistogramViewInfo.DoCalculateParams; -begin - inherited; - GetPlotBackgroundParams(PlotParams); -end; - -procedure TcxGridChartHistogramViewInfo.GetPlotBackgroundParams(out AParams: TcxViewParams); -begin - Diagram.Styles.GetViewParams(dsPlot, nil, nil, AParams); -end; - -function TcxGridChartHistogramViewInfo.GetCategoryDirection: TcxDirection; -begin - if IsCategoryAxisHorz then - if IsCategoriesInReverseOrder then - Result := dirLeft - else - Result := dirRight - else - if IsCategoriesInReverseOrder then - Result := dirDown - else - Result := dirUp; -end; - -function TcxGridChartHistogramViewInfo.GetUnitAdjustedOffset(AIndex: Integer): Integer; -begin - Result := GetUnitOffset(AIndex); - if IsCategoryAxisHorz and (AIndex = UnitCount) or - not IsCategoryAxisHorz and (AIndex = 0) then - Dec(Result, CategoryGridLineWidth); -end; - -function TcxGridChartHistogramViewInfo.GetUnitOffset(AIndex: Integer): Integer; -var - AOffset: Integer; -begin - with PlotBounds do - if IsCategoryAxisHorz then - begin - AOffset := MulDiv(Right - Left, AIndex, UnitCount); - if IsCategoriesInReverseOrder then - Result := Right - AOffset - else - Result := Left + AOffset; - end - else - begin - AOffset := MulDiv(Bottom - Top, AIndex, UnitCount); - if IsCategoriesInReverseOrder then - Result := Top + AOffset - else - Result := Bottom - AOffset; - end; -end; - -procedure TcxGridChartHistogramViewInfo.CalculateMinMaxValues(out AMinValue, AMaxValue: Extended; - out AHasValuesOutOfRange: Boolean); -var - I, J: Integer; - AValue: Extended; -begin - if Diagram.AxisValue.MinMaxValues = mmvCustom then - begin - AMinValue := Diagram.AxisValue.MinValue; - AMaxValue := Diagram.AxisValue.MaxValue; - if AMinValue > AMaxValue then - begin - AValue := AMinValue; - AMinValue := AMaxValue; - AMaxValue := AValue; - end; - end - else - begin - AMinValue := 0; - AMaxValue := 0; - end; - AHasValuesOutOfRange := False; - - for I := 0 to ValueCount - 1 do - for J := 0 to SeriesCount - 1 do - begin - AValue := Values[J, I]; - if Diagram.AxisValue.MinMaxValues = mmvCustom then - begin - AHasValuesOutOfRange := (AValue < AMinValue) or (AValue > AMaxValue); - if AHasValuesOutOfRange then Exit; - end - else - if (Diagram.AxisValue.MinMaxValues = mmvAuto) and (I = 0) and (J = 0) then - begin - AMinValue := AValue; - AMaxValue := AValue; - end - else - begin - AMinValue := Min(AMinValue, AValue); - AMaxValue := Max(AMaxValue, AValue); - end; - end; -end; - -procedure TcxGridChartHistogramViewInfo.CalculateMinMaxVisualValues(out AMinVisualValue, AMaxVisualValue: Extended); -begin - if (ValueStep = 0) or (Diagram.AxisValue.MinMaxValues = mmvCustom) then - begin - AMinVisualValue := MinValue; - AMaxVisualValue := MaxValue; - end - else - begin - AMinVisualValue := Floor(MinValue / ValueStep); - if NeedsMinMaxValuesOffset and - (MinValue <> 0) and (Fraction(MinValue / ValueStep) = 0) then - AMinVisualValue := AMinVisualValue - 1; - AMinVisualValue := AMinVisualValue * ValueStep; - - AMaxVisualValue := Ceiling(MaxValue / ValueStep); - if NeedsMinMaxValuesOffset and - (MaxValue <> 0) and (Fraction(MaxValue / ValueStep) = 0) then - AMaxVisualValue := AMaxVisualValue + 1; - AMaxVisualValue := AMaxVisualValue * ValueStep; - end; - if AMaxVisualValue - AMinVisualValue = 0 then - AMaxVisualValue := AMinVisualValue + 1; -end; - -function TcxGridChartHistogramViewInfo.CalculateSumOfValues(AValueIndex: Integer): Variant; -var - I: Integer; -begin - Result := 0; - for I := 0 to SeriesCount - 1 do - Result := Result + Abs(inherited GetValue(I, AValueIndex)); -end; - -function TcxGridChartHistogramViewInfo.CalculateValueStep: Extended; -const - MaxStepCount = 10; - BaseStepCount = 3; - BaseSteps: array[0..BaseStepCount - 1] of Integer = (1, 2, 5); -var - AStep: Extended; - AIntMultiple10, ABaseStepIndex: Integer; -begin - AStep := (FMaxValue - FMinValue) / MaxStepCount; - if AStep = 0 then - begin - Result := 0; - Exit; - end; - AIntMultiple10 := Floor(Log10(AStep)); - if (AIntMultiple10 < 0) and IsDataInteger then - AIntMultiple10 := 0; - ABaseStepIndex := 0; - repeat - Result := BaseSteps[ABaseStepIndex] * IntPower(10, AIntMultiple10); - if Result >= AStep then Break; - Inc(ABaseStepIndex); - if ABaseStepIndex = BaseStepCount then - begin - ABaseStepIndex := 0; - Inc(AIntMultiple10); - end; - until False; - CheckZero(Result); -end; - -function TcxGridChartHistogramViewInfo.GetValue(ASeriesIndex, AIndex: Integer): Variant; -var - I: Integer; - AIsPositive: Boolean; - AValue, ASum: Variant; -begin - Result := inherited GetValue(ASeriesIndex, AIndex); - case Diagram.Values.Stacking of - vsNormal: - for I := 0 to ASeriesIndex - 1 do - Result := Result + inherited GetValue(I, AIndex); - vs100Percent: - begin - AIsPositive := IsPositive(Result); - for I := 0 to ASeriesIndex - 1 do - begin - AValue := inherited GetValue(I, AIndex); - if IsPositive(AValue) = AIsPositive then - Result := Result + AValue; - end; - ASum := SumOfValues[AIndex]; - if ASum = 0 then - Result := 0 - else - Result := 100 * Result / ASum; - end; - end; -end; - -function TcxGridChartHistogramViewInfo.GetValueDirection(ASeriesIndex, AVisibleValueIndex: Integer): TcxDirection; -begin - if IsValueAxisVert then - if IsValuePositive(ASeriesIndex, AVisibleValueIndex) then - Result := dirUp - else - Result := dirDown - else - if IsValuePositive(ASeriesIndex, AVisibleValueIndex) then - Result := dirRight - else - Result := dirLeft; -end; - -function TcxGridChartHistogramViewInfo.GetValueOffset(const AValue: Variant): Integer; -var - AIsVertical: Boolean; - AAreaSize, AOffset: Integer; -begin - AIsVertical := IsValueAxisVert; - with PlotBounds do - begin - if AIsVertical then - AAreaSize := Bottom - Top - ValueGridLineWidth - else - AAreaSize := Right - Left - ValueGridLineWidth; - AOffset := AAreaSize * (AValue - MinVisualValue) / (MaxVisualValue - MinVisualValue); - if AIsVertical then - Result := Bottom - ValueGridLineWidth - AOffset - else - Result := Left + AOffset; - end; -end; - -function TcxGridChartHistogramViewInfo.GetZeroValue: Extended; -begin - Result := 0; - if Diagram.AxisValue.MinMaxValues <> mmvZeroBasedAuto then - begin - if Result < MinVisualValue then - Result := MinVisualValue; - if Result > MaxVisualValue then - Result := MaxVisualValue; - end; -end; - -function TcxGridChartHistogramViewInfo.IsDataInteger: Boolean; -var - I: Integer; -begin - for I := 0 to SeriesCount - 1 do - begin - Result := Series[I].DataBinding.IsValueTypeInteger; - if not Result then Exit; - end; - Result := True; -end; - -function TcxGridChartHistogramViewInfo.IsValuePositive(ASeriesIndex, AVisibleValueIndex: Integer): Boolean; -begin - Result := IsPositive(VisibleValues[ASeriesIndex, AVisibleValueIndex] - ZeroValue); -end; - -function TcxGridChartHistogramViewInfo.NeedsMinMaxValuesOffset: Boolean; -begin - Result := Diagram.Values.Stacking <> vs100Percent; -end; - -procedure TcxGridChartHistogramViewInfo.AddMark(var AMarks: TcxGridChartHistogramMarks; - const AValue: Variant); -begin - SetLength(AMarks, Length(AMarks) + 1); - AMarks[Length(AMarks) - 1].Value := AValue; -end; - -procedure TcxGridChartHistogramViewInfo.AddCategoryMark(AValue: Integer); -begin - AddMark(FCategoryMarks, AValue); -end; - -procedure TcxGridChartHistogramViewInfo.CalculateCategoryMarkPositions; -var - I: Integer; -begin - for I := 0 to CategoryMarkCount - 1 do - CategoryMarkPositions[I] := GetUnitAdjustedOffset(CategoryMarkValues[I]); -end; - -procedure TcxGridChartHistogramViewInfo.CalculateCategoryMarkValues; -var - ACount, I: Integer; -begin - if VisibleValueCount = 0 then Exit; - ACount := VisibleValueCount; - if Diagram.AxisCategory.ValueAxisBetweenCategories then - Inc(ACount); - for I := 0 to ACount - 1 do - AddCategoryMark(GetCategoryTickMarkOffsetUnits(I, Diagram.AxisCategory.ValueAxisBetweenCategories)); -end; - -procedure TcxGridChartHistogramViewInfo.AddValueMark(const AValue: Extended); -begin - AddMark(FValueMarks, AValue); -end; - -procedure TcxGridChartHistogramViewInfo.CalculateValueMarkPositions; -var - I: Integer; -begin - for I := 0 to ValueMarkCount - 1 do - ValueMarkPositions[I] := GetValueOffset(ValueMarkValues[I]); -end; - -procedure TcxGridChartHistogramViewInfo.CalculateValueMarkValues; -var - AValue: Extended; -begin - if ValueStep = 0 then Exit; - AValue := MinVisualValue; - repeat - CheckZero(AValue); - AddValueMark(AValue); - AValue := AValue + ValueStep; - until AValue > MaxVisualValue; -end; - -function TcxGridChartHistogramViewInfo.CalculateCategoryMarkHeight: Integer; -begin - Result := MulDiv(CategoryTickMarkLabelsViewInfo.CaptionHeight, 1, 4); -end; - -function TcxGridChartHistogramViewInfo.CalculateValueMarkHeight: Integer; -begin - Result := MulDiv(ValueTickMarkLabelsViewInfo.CaptionHeight, 1, 4); -end; - -function TcxGridChartHistogramViewInfo.CalculatePlotBounds: TRect; -var - AOffsets: TRect; -begin - Result := Bounds; - SetRectEmpty(AOffsets); - CalculatePlotOffsets(Result.Right - Result.Left, AOffsets); - Inc(Result.Left, AOffsets.Left); - Dec(Result.Right, AOffsets.Right); - Inc(Result.Top, AOffsets.Top); - Dec(Result.Bottom, AOffsets.Bottom); - with Result do - begin - if Left > Right then Left := Right; - if Top > Bottom then Top := Bottom; - end; -end; - -procedure TcxGridChartHistogramViewInfo.CalculatePlotOffsets(APlotAreaWidth: Integer; - var AOffsets: TRect); - - procedure ProcessVerticalAxisCaptions(ACaptionsViewInfo: TcxGridChartHistogramTickMarkLabelsViewInfo; - var AOffsets: TRect); - var - AOffset: Integer; - begin - if not ACaptionsViewInfo.Visible then Exit; - AOffset := TickMarkLabelsOffset + ACaptionsViewInfo.CalculateWidth; - if ACaptionsViewInfo.Position = cppLeft then - AOffsets.Left := Max(AOffsets.Left, AOffset) - else - AOffsets.Right := Max(AOffsets.Right, AOffset); - ACaptionsViewInfo.FitCaptionsVert(AOffsets.Top, AOffsets.Bottom); - end; - - procedure ProcessHorizontalAxisCaptions(ACaptionsViewInfo: TcxGridChartHistogramTickMarkLabelsViewInfo; - var AOffsets: TRect; APlotAreaWidth: Integer); - var - AOffset: Integer; - begin - if not ACaptionsViewInfo.Visible then Exit; - AOffset := TickMarkLabelsOffset + - ACaptionsViewInfo.CalculateHeight(APlotAreaWidth, AOffsets.Left, AOffsets.Right); - if ACaptionsViewInfo.Position = cppTop then - AOffsets.Top := Max(AOffsets.Top, AOffset) - else - AOffsets.Bottom := Max(AOffsets.Bottom, AOffset); - ACaptionsViewInfo.FitCaptionsHorz(APlotAreaWidth, AOffsets.Left, AOffsets.Right); - end; - -var - ACaptionsViewInfoHorz, ACaptionsViewInfoVert: TcxGridChartHistogramTickMarkLabelsViewInfo; -begin - if ValueTickMarkLabelsViewInfo.IsVertical then - begin - ACaptionsViewInfoHorz := CategoryTickMarkLabelsViewInfo; - ACaptionsViewInfoVert := ValueTickMarkLabelsViewInfo; - end - else - begin - ACaptionsViewInfoHorz := ValueTickMarkLabelsViewInfo; - ACaptionsViewInfoVert := CategoryTickMarkLabelsViewInfo; - end; - - ProcessVerticalAxisCaptions(ACaptionsViewInfoVert, AOffsets); - ProcessHorizontalAxisCaptions(ACaptionsViewInfoHorz, AOffsets, APlotAreaWidth); -end; - -function TcxGridChartHistogramViewInfo.GetCategoryAxisBounds: TRect; -begin - Result := PlotBounds; - if IsCategoryAxisHorz then - begin - Result.Top := ZeroValueOffset; - Result.Bottom := Result.Top + CategoryAxisWidth; - end - else - begin - Result.Left := ZeroValueOffset; - Result.Right := Result.Left + CategoryAxisWidth; - end; -end; - -function TcxGridChartHistogramViewInfo.GetCategoryAxisPosition: TcxGridChartAxisPosition; -begin - Result := Diagram.GetCategoryAxisPosition; -end; - -function TcxGridChartHistogramViewInfo.GetCategoryGridLineBounds(AIndex: Integer): TRect; -begin - Result := PlotBounds; - if IsCategoryAxisHorz then - begin - Result.Left := CategoryMarkPositions[AIndex]; - Result.Right := Result.Left + CategoryGridLineWidth; - end - else - begin - Result.Top := CategoryMarkPositions[AIndex]; - Result.Bottom := Result.Top + CategoryGridLineWidth; - end; -end; - -function TcxGridChartHistogramViewInfo.GetCategoryMarkBounds(Index: Integer): TRect; -var - AIsHorizontal: Boolean; -begin - AIsHorizontal := IsCategoryAxisHorz; - - Result := CategoryAxisBounds; - if AIsHorizontal then - begin - Result.Left := CategoryMarkPositions[Index]; - Result.Right := Result.Left + MarkWidth; - end - else - begin - Result.Top := CategoryMarkPositions[Index]; - Result.Bottom := Result.Top + MarkWidth; - end; - - if Diagram.AxisCategory.TickMarkKind in [tmkCross, tmkInside] then - if AIsHorizontal then - Dec(Result.Top, CategoryMarkHeight) - else - Inc(Result.Right, CategoryMarkHeight); - if Diagram.AxisCategory.TickMarkKind in [tmkCross, tmkOutside] then - if AIsHorizontal then - Inc(Result.Bottom, CategoryMarkHeight) - else - Dec(Result.Left, CategoryMarkHeight); -end; - -function TcxGridChartHistogramViewInfo.GetCategoryTickMarkLabelsBounds: TRect; -begin - Result := GetTickMarkLabelsBounds(CategoryAxisPosition); -end; - -function TcxGridChartHistogramViewInfo.GetTickMarkLabelsBounds(APosition: TcxGridChartAxisPosition): TRect; -begin - Result := Bounds; - case APosition of - cppLeft: - Result.Right := PlotBounds.Left - TickMarkLabelsOffset; - cppRight: - Result.Left := PlotBounds.Right + TickMarkLabelsOffset; - cppTop: - Result.Bottom := PlotBounds.Top - TickMarkLabelsOffset; - cppBottom: - Result.Top := PlotBounds.Bottom + TickMarkLabelsOffset; - end; -end; - -function TcxGridChartHistogramViewInfo.GetValueAxisBounds: TRect; -begin - Result := PlotBounds; - if IsValueAxisVert then - begin - if (ValueAxisPosition = cppLeft) xor IsCategoriesInReverseOrder then - Result.Left := CategoryMarkPositions[0] - else - Result.Left := CategoryMarkPositions[CategoryMarkCount - 1]; - Result.Right := Result.Left + ValueAxisWidth; - end - else - begin - if (ValueAxisPosition = cppBottom) xor IsCategoriesInReverseOrder then - Result.Top := CategoryMarkPositions[0] - else - Result.Top := CategoryMarkPositions[CategoryMarkCount - 1]; - Result.Bottom := Result.Top + ValueAxisWidth; - end; -end; - -function TcxGridChartHistogramViewInfo.GetValueAxisPosition: TcxGridChartAxisPosition; -begin - Result := Diagram.GetValueAxisPosition; -end; - -{function TcxGridChartHistogramViewInfo.GetValueBounds(AValueIndex, ASeriesIndex: Integer): TRect; -var - ACategoryOffset, ACategoryOffsetStart, ACategoryOffsetFinish, AValueOffsetStart, AValueOffsetFinish: Integer; -begin - ACategoryOffset := GetValueOffsetUnits(AValueIndex, ASeriesIndex); - ACategoryOffsetStart := GetUnitOffset(ACategoryOffset); - ACategoryOffsetFinish := GetUnitOffset(ACategoryOffset + ValueSizeUnits); - AValueOffsetStart := ZeroValueOffset; - AValueOffsetFinish := GetValueOffset(Values[ASeriesIndex, AValueIndex]); - - if IsValueAxisVert then - begin - Result.Left := ACategoryOffsetStart; - Result.Right := ACategoryOffsetFinish; - Result.Bottom := AValueOffsetStart; - Result.Top := AValueOffsetFinish; - CheckRectBounds(Result); - Inc(Result.Bottom, ValueGridLineWidth); - end - else - begin - Result.Bottom := ACategoryOffsetStart; - Result.Top := ACategoryOffsetFinish; - Result.Left := AValueOffsetStart; - Result.Right := AValueOffsetFinish; - CheckRectBounds(Result); - Inc(Result.Right, ValueGridLineWidth); - end; -end;} - -function TcxGridChartHistogramViewInfo.GetValueGridLineBounds(AIndex: Integer): TRect; -begin - Result := PlotBounds; - if IsValueAxisVert then - begin - Result.Top := ValueMarkPositions[AIndex]; - Result.Bottom := Result.Top + ValueGridLineWidth; - end - else - begin - Result.Left := ValueMarkPositions[AIndex]; - Result.Right := Result.Left + ValueGridLineWidth; - end; -end; - -function TcxGridChartHistogramViewInfo.GetValueMarkBounds(Index: Integer): TRect; -var - AIsVertical: Boolean; - AMarkKind: TcxGridChartHistogramTickMarkKind; -begin - Result := ValueAxisBounds; - AIsVertical := IsValueAxisVert; - if AIsVertical then - begin - Result.Top := ValueMarkPositions[Index]; - Result.Bottom := Result.Top + MarkWidth; - end - else - begin - Result.Left := ValueMarkPositions[Index]; - Result.Right := Result.Left + MarkWidth; - end; - AMarkKind := Diagram.AxisValue.TickMarkKind; - if (AMarkKind = tmkCross) or - (ValueAxisPosition in [cppRight, cppTop]) and (AMarkKind = tmkInside) or - (ValueAxisPosition in [cppLeft, cppBottom]) and (AMarkKind = tmkOutside) then - if AIsVertical then - Dec(Result.Left, ValueMarkHeight) - else - Inc(Result.Bottom, ValueMarkHeight); - if (AMarkKind = tmkCross) or - (ValueAxisPosition in [cppRight, cppTop]) and (AMarkKind = tmkOutside) or - (ValueAxisPosition in [cppLeft, cppBottom]) and (AMarkKind = tmkInside) then - if AIsVertical then - Inc(Result.Right, ValueMarkHeight) - else - Dec(Result.Top, ValueMarkHeight); -end; - -function TcxGridChartHistogramViewInfo.GetValueTickMarkLabelsBounds: TRect; -begin - Result := GetTickMarkLabelsBounds(ValueAxisPosition); -end; - -function TcxGridChartHistogramViewInfo.CustomDrawPlot(ACanvas: TcxCanvas): Boolean; -begin - Result := False; - Diagram.DoCustomDrawPlot(ACanvas, Self, PlotBounds, Result); -end; - -function TcxGridChartHistogramViewInfo.DoCustomDrawPlot(ACanvas: TcxCanvas): Boolean; -begin - Result := HasCustomDrawPlot; - if Result then - begin - ACanvas.SetParams(PlotParams); - Result := CustomDrawPlot(ACanvas); - if not Result then - ACanvas.GetParams(PlotParams); - end; -end; - -function TcxGridChartHistogramViewInfo.HasCustomDrawPlot: Boolean; -begin - Result := Diagram.HasCustomDrawPlot; -end; - -procedure TcxGridChartHistogramViewInfo.Calculate(const ABounds: TRect); -begin - inherited; - CalculateMinMaxValues(FMinValue, FMaxValue, FHasValuesOutOfRange); - FValueStep := CalculateValueStep; - CalculateMinMaxVisualValues(FMinVisualValue, FMaxVisualValue); - CalculateCategoryMarkValues; - CalculateValueMarkValues; - - FCategoryMarkHeight := CalculateCategoryMarkHeight; - FValueMarkHeight := CalculateValueMarkHeight; - CalculateCategoryMarkPositions; - CalculateValueMarkPositions; - if CategoryTickMarkLabelsViewInfo.Visible then - CategoryTickMarkLabelsViewInfo.Calculate(GetCategoryTickMarkLabelsBounds); - if ValueTickMarkLabelsViewInfo.Visible then - ValueTickMarkLabelsViewInfo.Calculate(GetValueTickMarkLabelsBounds); - - CalculateValues; -end; - -function TcxGridChartHistogramViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := inherited GetHitTest(P); - if Result = nil then - if PtInRect(PlotBounds, P) then - begin - Result := TcxGridChartHistogramPlotHitTest.Instance(P); - InitHitTest(Result); - end - else - begin - Result := CategoryTickMarkLabelsViewInfo.GetHitTest(P); - if Result = nil then - Result := ValueTickMarkLabelsViewInfo.GetHitTest(P); - end; -end; - -{ TcxGridChartColumnDiagramLegendViewInfo } - -function TcxGridChartColumnDiagramLegendViewInfo.GetItemsInReverseOrder: Boolean; -begin - Result := - (Diagram.GetCategoryAxisPosition in [cppTop, cppBottom]) and - Diagram.AxisCategory.CategoriesInReverseOrder or - not (Diagram.GetCategoryAxisPosition in [cppTop, cppBottom]) and - not Diagram.AxisCategory.CategoriesInReverseOrder; -end; - -{ TcxGridChartColumnDiagramValueViewInfo } - -function TcxGridChartColumnDiagramValueViewInfo.GetCaptionPosition: TcxGridChartColumnDiagramValueCaptionPosition; -begin - Result := DiagramViewInfo.Diagram.Values.CaptionPosition; -end; - -function TcxGridChartColumnDiagramValueViewInfo.GetDiagramViewInfo: TcxGridChartColumnDiagramViewInfo; -begin - Result := TcxGridChartColumnDiagramViewInfo(inherited DiagramViewInfo); -end; - -function TcxGridChartColumnDiagramValueViewInfo.CalculateCaptionBounds: TRect; - - function GetVerticalValueCaptionBounds(ACaptionWidth, ACaptionHeight: Integer; - AIsUpDirection: Boolean): TRect; - begin - Result := ContentBounds; - with Result do - begin - Left := GetRangeCenter(Left, Right) - ACaptionWidth div 2; - Right := Left + ACaptionWidth; - case CaptionPosition of - cdvcpInsideBase: - if AIsUpDirection then - Top := Bottom - ACaptionHeight - else - Bottom := Top + ACaptionHeight; - cdvcpInsideEnd: - if AIsUpDirection then - Bottom := Top + ACaptionHeight - else - Top := Bottom - ACaptionHeight; - cdvcpOutsideEnd: - if AIsUpDirection then - begin - Bottom := Self.Bounds.Top; - Top := Bottom - ACaptionHeight; - end - else - begin - Top := Self.Bounds.Bottom; - Bottom := Top + ACaptionHeight; - end; - end; - end; - end; - - function GetHorizontalValueCaptionBounds(ACaptionWidth, ACaptionHeight: Integer; - AIsRightDirection: Boolean): TRect; - begin - Result := ContentBounds; - with Result do - begin - Top := GetRangeCenter(Top, Bottom) - ACaptionHeight div 2; - Bottom := Top + ACaptionHeight; - case CaptionPosition of - cdvcpInsideBase: - if AIsRightDirection then - Right := Left + ACaptionWidth - else - Left := Right - ACaptionWidth; - cdvcpInsideEnd: - if AIsRightDirection then - Left := Right - ACaptionWidth - else - Right := Left + ACaptionWidth; - cdvcpOutsideEnd: - if AIsRightDirection then - begin - Left := Self.Bounds.Right; - Right := Left + ACaptionWidth; - end - else - begin - Right := Self.Bounds.Left; - Left := Right - ACaptionWidth; - end; - end; - end; - end; - -var - AIsPositive: Boolean; -begin - AIsPositive := DiagramViewInfo.IsValuePositive(SeriesIndex, VisibleValueIndex); - if DiagramViewInfo.IsValueAxisVert then - Result := GetVerticalValueCaptionBounds(CaptionViewInfo.CalculateWidth, - CaptionViewInfo.CalculateHeight, AIsPositive) - else - Result := GetHorizontalValueCaptionBounds(CaptionViewInfo.CalculateWidth, - CaptionViewInfo.CalculateHeight, AIsPositive); -end; - -function TcxGridChartColumnDiagramValueViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := Params.TextColor; -end; - -function TcxGridChartColumnDiagramValueViewInfo.GetBorders: TcxBorders; -begin - Result := cxBordersAll; -end; - -function TcxGridChartColumnDiagramValueViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := DiagramViewInfo.Diagram.Values.BorderWidth; -end; - -function TcxGridChartColumnDiagramValueViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartColumnDiagramValuePainter; -end; - -function TcxGridChartColumnDiagramValueViewInfo.HasCaption: Boolean; -begin - Result := CaptionPosition <> cdvcpNone; -end; - -function TcxGridChartColumnDiagramValueViewInfo.HasCaptionVisualCompensation: Boolean; -begin - Result := True; -end; - -{ TcxGridChartColumnDiagramViewInfo } - -function TcxGridChartColumnDiagramViewInfo.GetDiagram: TcxGridChartColumnDiagram; -begin - Result := TcxGridChartColumnDiagram(inherited Diagram); -end; - -function TcxGridChartColumnDiagramViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartColumnDiagramPainter; -end; - -class function TcxGridChartColumnDiagramViewInfo.GetValueViewInfoClass: TcxGridChartDiagramValueViewInfoClass; -begin - Result := TcxGridChartColumnDiagramValueViewInfo; -end; - -function TcxGridChartColumnDiagramViewInfo.GetValueViewInfoIndex(ASeriesIndex, AVisibleIndex: Integer): Integer; -begin - Result := AVisibleIndex * SeriesCount + ASeriesIndex; -end; - -function TcxGridChartColumnDiagramViewInfo.GetCategoryTickMarkLabelOffsetUnits(AIndex: Integer): Integer; -begin - Result := GetCategoryTickMarkOffsetUnits(AIndex, False); -end; - -function TcxGridChartColumnDiagramViewInfo.GetCategoryTickMarkOffsetUnits(AIndex: Integer; - AValueAxisBetweenCategories: Boolean): Integer; -begin - if AValueAxisBetweenCategories then - Result := 0 - else - Result := 1; - Result := GetValueGroupAreaSizeUnits * (Result + 2 * AIndex) div 2; -end; - -function TcxGridChartColumnDiagramViewInfo.GetUnitCount: Integer; -begin - Result := VisibleValueCount * GetValueGroupAreaSizeUnits; -end; - -function TcxGridChartColumnDiagramViewInfo.GetValueGroupAreaSizeUnits: Integer; -begin - Result := SeriesCount * ColumnDiagramValueSizeUnits + 2 * ColumnDiagramValueOffsetUnits; -end; - -function TcxGridChartColumnDiagramViewInfo.GetValueOffsetUnits(AVisibleValueIndex, ASeriesIndex: Integer): Integer; -begin - Result := AVisibleValueIndex * GetValueGroupAreaSizeUnits + ColumnDiagramValueOffsetUnits + - ASeriesIndex * ColumnDiagramValueSizeUnits; -end; - -function TcxGridChartColumnDiagramViewInfo.IsEdgeCategoryTickMarkLabels: Boolean; -begin - Result := False; -end; - -procedure TcxGridChartColumnDiagramViewInfo.CalculateValues; -var - AValueIndex, ASeriesIndex: Integer; -begin - for AValueIndex := 0 to VisibleValueCount - 1 do - for ASeriesIndex := 0 to SeriesCount - 1 do - CreateValueViewInfo(ASeriesIndex, AValueIndex).Calculate(GetValueBounds(AValueIndex, ASeriesIndex)); -end; - -function TcxGridChartColumnDiagramViewInfo.GetValueBounds(AVisibleValueIndex, ASeriesIndex: Integer): TRect; -var - ACategoryOffset, ACategoryOffsetStart, ACategoryOffsetFinish, AValueOffsetStart, AValueOffsetFinish: Integer; -begin - ACategoryOffset := GetValueOffsetUnits(AVisibleValueIndex, ASeriesIndex); - ACategoryOffsetStart := GetUnitOffset(ACategoryOffset); - ACategoryOffsetFinish := GetUnitOffset(ACategoryOffset + ColumnDiagramValueSizeUnits); - AValueOffsetStart := ZeroValueOffset; - AValueOffsetFinish := GetValueOffset(VisibleValues[ASeriesIndex, AVisibleValueIndex]); - - if IsValueAxisVert then - begin - Result.Left := ACategoryOffsetStart; - Result.Right := ACategoryOffsetFinish; - Result.Bottom := AValueOffsetStart; - Result.Top := AValueOffsetFinish; - CheckRectBounds(Result); - Inc(Result.Bottom, ValueGridLineWidth); - end - else - begin - Result.Bottom := ACategoryOffsetStart; - Result.Top := ACategoryOffsetFinish; - Result.Left := AValueOffsetStart; - Result.Right := AValueOffsetFinish; - CheckRectBounds(Result); - Inc(Result.Right, ValueGridLineWidth); - end; -end; - -{ TcxGridChartLineDiagramLegendItemViewInfo } - -function TcxGridChartLineDiagramLegendItemViewInfo.GetDiagram: TcxGridChartLineDiagram; -begin - Result := TcxGridChartLineDiagram(inherited Diagram); -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.GetLineStyle: TcxGridChartLineStyle; -begin - Result := Diagram.Values.GetLineStyle(Series); -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.GetLineWidth: Integer; -begin - Result := Diagram.Values.LineWidth; -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.GetMarkerSize: Integer; -begin - Result := Diagram.Values.MarkerSize; -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.GetMarkerStyle: TcxGridChartMarkerStyle; -begin - Result := Diagram.Values.GetMarkerStyle(Series); -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.CalculateHeight: Integer; -begin - Result := inherited CalculateHeight; - if LineStyle <> clsNone then - Result := Max(Result, LineWidth); - if MarkerStyle <> cmsNone then - Result := Max(Result, MarkerSize); -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.CalculateLegendKeyWidth: Integer; -begin - Result := 0; - if LineStyle <> clsNone then - Result := Max(Result, 20 + 10 * LineWidth); - if MarkerStyle <> cmsNone then - if LineStyle = clsNone then - Result := Max(Result, MarkerSize) - else - Result := Max(Result, 3 * MarkerSize); -end; - -procedure TcxGridChartLineDiagramLegendItemViewInfo.CalculateMarkerPoints; -begin - GetDiagramValueViewInfoClass.CalculateMarkerPointsEx(MarkerBounds, MarkerStyle, - MarkerPoints); -end; - -procedure TcxGridChartLineDiagramLegendItemViewInfo.DoCalculateParams; -begin - inherited; - TcxGridChartLineDiagramLegendViewInfo(Container).GetItemLegendKeyMarkerParams(Index, MarkerParams); -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.GetDiagramValueViewInfoClass: TcxGridChartLineDiagramValueViewInfoClass; -begin - Result := TcxGridChartLineDiagramValueViewInfoClass(Diagram.GetViewInfoClass.GetValueViewInfoClass); -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartLineDiagramLegendItemPainter; -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.GetLineColor: TColor; -begin - Result := LegendKeyParams.Color; -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.GetLineStart: TPoint; -begin - with LegendKeyBounds do - begin - Result.X := Left + RoundDiv(LineWidth, 2); - Result.Y := GetRangeCenter(Top, Bottom); - end; -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.GetLineFinish: TPoint; -begin - with LegendKeyBounds do - begin - Result.X := Right - RoundDiv(LineWidth, 2); - Result.Y := GetRangeCenter(Top, Bottom); - end; -end; - -function TcxGridChartLineDiagramLegendItemViewInfo.GetMarkerBounds: TRect; -begin - with LegendKeyBounds do - GetCenteredRect(Point(GetRangeCenter(Left, Right), GetRangeCenter(Top, Bottom)), - MarkerSize, MarkerSize, Result); -end; - -procedure TcxGridChartLineDiagramLegendItemViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - CalculateMarkerPoints; -end; - -{ TcxGridChartLineDiagramLegendViewInfo } - -function TcxGridChartLineDiagramLegendViewInfo.GetItemClass: TcxGridChartLegendItemViewInfoClass; -begin - Result := TcxGridChartLineDiagramLegendItemViewInfo; -end; - -procedure TcxGridChartLineDiagramLegendViewInfo.GetItemLegendKeyMarkerParams(AIndex: Integer; - out AParams: TcxViewParams); -begin - TcxGridChartLineDiagram(Diagram).Styles.GetValueMarkerParams(GetItemSeriesIndex(AIndex), - GetItemValueIndex(AIndex), AParams); -end; - -{ TcxGridChartLineDiagramValueViewInfo } - -function TcxGridChartLineDiagramValueViewInfo.GetCaptionPosition: TcxGridChartLineDiagramValueCaptionPosition; -begin - Result := Diagram.Values.CaptionPosition; -end; - -function TcxGridChartLineDiagramValueViewInfo.GetDiagram: TcxGridChartLineDiagram; -begin - Result := TcxGridChartLineDiagram(inherited Diagram); -end; - -function TcxGridChartLineDiagramValueViewInfo.GetDiagramViewInfo: TcxGridChartLineDiagramViewInfo; -begin - Result := TcxGridChartLineDiagramViewInfo(inherited DiagramViewInfo); -end; - -function TcxGridChartLineDiagramValueViewInfo.GetLineStyle: TcxGridChartLineStyle; -begin - Result := Diagram.Values.GetLineStyle(Series); -end; - -function TcxGridChartLineDiagramValueViewInfo.GetLineWidth: Integer; -begin - Result := Diagram.Values.LineWidth; -end; - -function TcxGridChartLineDiagramValueViewInfo.GetMarkerStyle: TcxGridChartMarkerStyle; -begin - Result := Diagram.Values.GetMarkerStyle(Series); -end; - -function TcxGridChartLineDiagramValueViewInfo.CalculateCaptionBounds: TRect; -var - ACaptionWidth, ACaptionHeight: Integer; -begin - Result := MarkerBounds; - InflateRect(Result, LineDiagramCaptionOffset, LineDiagramCaptionOffset); - ACaptionWidth := CaptionViewInfo.CalculateWidth; - ACaptionHeight := CaptionViewInfo.CalculateHeight; - - case CaptionPosition of - ldvcpLeft: - begin - Result.Right := Result.Left; - Dec(Result.Left, ACaptionWidth); - end; - ldvcpRight: - begin - Result.Left := Result.Right; - Inc(Result.Right, ACaptionWidth); - end; - else - Result.Left := GetRangeCenter(Result.Left, Result.Right) - ACaptionWidth div 2; - Result.Right := Result.Left + ACaptionWidth; - end; - case CaptionPosition of - ldvcpAbove: - begin - Result.Bottom := Result.Top; - Dec(Result.Top, ACaptionHeight); - end; - ldvcpBelow: - begin - Result.Top := Result.Bottom; - Inc(Result.Bottom, ACaptionHeight); - end; - else - Result.Top := GetRangeCenter(Result.Top, Result.Bottom) - ACaptionHeight div 2; - Result.Bottom := Result.Top + ACaptionHeight; - end; -end; - -procedure TcxGridChartLineDiagramValueViewInfo.CalculateMarkerParams(var AParams: TcxViewParams); -begin - Diagram.Styles.GetValueMarkerParams(SeriesIndex, ValueIndex, AParams); -end; - -procedure TcxGridChartLineDiagramValueViewInfo.CalculateMarkerPoints; -begin - CalculateMarkerPointsEx(MarkerBounds, MarkerStyle, MarkerPoints); -end; - -procedure TcxGridChartLineDiagramValueViewInfo.DoCalculateParams; -begin - inherited; - CalculateMarkerParams(MarkerParams); -end; - -function TcxGridChartLineDiagramValueViewInfo.GetCellBoundsForHint: TRect; -begin - Result := HotSpotBounds; -end; - -function TcxGridChartLineDiagramValueViewInfo.GetDesignSelectionBounds: TRect; -begin - Result := HotSpotBounds; -end; - -function TcxGridChartLineDiagramValueViewInfo.GetHotSpotBounds: TRect; -var - ASize: Integer; -begin - ASize := Diagram.Values.GetHotSpotSize; - GetCenteredRect(Position, ASize, ASize, Result); -end; - -function TcxGridChartLineDiagramValueViewInfo.GetLineColor: TColor; -begin - Result := Params.Color; -end; - -function TcxGridChartLineDiagramValueViewInfo.GetLineHotZoneMinWidth: Integer; -begin - Result := LineDiagramLineHotZoneMinWidth; -end; - -function TcxGridChartLineDiagramValueViewInfo.GetLineStart: TPoint; -begin - Result.X := Bounds.Left; - Result.Y := LineStartY; -end; - -function TcxGridChartLineDiagramValueViewInfo.GetLineFinish: TPoint; -begin - Result.X := Bounds.Right; - Result.Y := LineFinishY; -end; - -function TcxGridChartLineDiagramValueViewInfo.GetMarkerBounds: TRect; -var - ASize: Integer; -begin - ASize := Diagram.Values.MarkerSize; - GetCenteredRect(Position, ASize, ASize, Result); -end; - -function TcxGridChartLineDiagramValueViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := GetPainterClassEx; -end; - -class function TcxGridChartLineDiagramValueViewInfo.GetPainterClassEx: TcxGridChartLineDiagramValuePainterClass; -begin - Result := TcxGridChartLineDiagramValuePainter; -end; - -function TcxGridChartLineDiagramValueViewInfo.GetPosition: TPoint; -begin - if CategoryDirection = dirRight then - Result.X := Bounds.Right - else - Result.X := Bounds.Left; - if ValueDirection = dirUp then - Result.Y := Bounds.Top - else - Result.Y := Bounds.Bottom; -end; - -procedure TcxGridChartLineDiagramValueViewInfo.MakeRealBounds(var ABounds: TRect); -begin - ABounds.Top := Min(ABounds.Top, Min(LineStartY, LineFinishY)); - ABounds.Bottom := Max(ABounds.Bottom, Max(LineStartY, LineFinishY)); -end; - -function TcxGridChartLineDiagramValueViewInfo.HasBackground: Boolean; -begin - Result := False; -end; - -function TcxGridChartLineDiagramValueViewInfo.HasCaption: Boolean; -begin - Result := CaptionPosition <> ldvcpNone; -end; - -procedure TcxGridChartLineDiagramValueViewInfo.Calculate(const ABounds: TRect; - ALineStartY, ALineFinishY: Integer); -begin - inherited Calculate(ABounds); - FLineStartY := ALineStartY; - FLineFinishY := ALineFinishY; - CalculateMarkerPoints; -end; - -class procedure TcxGridChartLineDiagramValueViewInfo.CalculateMarkerPointsEx(const ABounds: TRect; - AStyle: TcxGridChartMarkerStyle; var APoints: TPointArray); -var - AOrigin: TPoint; - ASize: Integer; -begin - if not (AStyle in [cmsTriangle, cmsDiamond]) then Exit; - with ABounds do - begin - AOrigin := TopLeft; - ASize := Right - Left; - end; - if not Odd(ASize) then - begin - Dec(ASize); - Inc(AOrigin.X); - Inc(AOrigin.Y); - end; - if AStyle = cmsTriangle then - begin - SetLength(APoints, 3); - APoints[0] := Point(AOrigin.X, AOrigin.Y + ASize - 1 - 1); - APoints[1] := Point(AOrigin.X + ASize div 2, AOrigin.Y - 1); - APoints[2] := Point(AOrigin.X + ASize, AOrigin.Y + ASize - 1); - end - else - begin - SetLength(APoints, 4); - APoints[0] := Point(AOrigin.X, AOrigin.Y + ASize div 2); - APoints[1] := Point(AOrigin.X + ASize div 2, AOrigin.Y - 1); - APoints[2] := Point(AOrigin.X + ASize, AOrigin.Y + ASize div 2); - APoints[3] := Point(AOrigin.X + ASize div 2, AOrigin.Y + ASize); - end; -end; - -function TcxGridChartLineDiagramValueViewInfo.GetAreaBoundsForPainting: TRect; -begin - Result := inherited GetAreaBoundsForPainting; - if LineStyle <> clsNone then - begin - MakeRealBounds(Result); - InflateRect(Result, RoundDiv(LineWidth, 2), RoundDiv(LineWidth, 2)); - end; - if MarkerStyle <> cmsNone then - UnionRect(Result, Result, MarkerBounds); -end; - -function TcxGridChartLineDiagramValueViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := inherited GetHitTest(P); - if (Result = nil) and (LineStyle <> clsNone) and - LineHasPoint(LineStart, LineFinish, LineWidth, P, LineHotZoneMinWidth) then - begin - Result := TcxGridChartValueLineHitTest.Instance(P); - InitHitTest(Result); - TcxGridChartValueLineHitTest(Result).CanDrillDown := False; - end; -end; - -function TcxGridChartLineDiagramValueViewInfo.GetRealBounds: TRect; -begin - Result := Bounds; - MakeRealBounds(Result); -end; - -function TcxGridChartLineDiagramValueViewInfo.HasPoint(const P: TPoint): Boolean; -begin - Result := PtInRect(HotSpotBounds, P); -end; - -{ TcxGridChartLineDiagramViewInfo } - -function TcxGridChartLineDiagramViewInfo.GetDiagram: TcxGridChartLineDiagram; -begin - Result := TcxGridChartLineDiagram(inherited Diagram); -end; - -function TcxGridChartLineDiagramViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartLineDiagramPainter; -end; - -class function TcxGridChartLineDiagramViewInfo.GetValueViewInfoClass: TcxGridChartDiagramValueViewInfoClass; -begin - Result := TcxGridChartLineDiagramValueViewInfo; -end; - -function TcxGridChartLineDiagramViewInfo.GetValueViewInfoIndex(ASeriesIndex, AVisibleIndex: Integer): Integer; -begin - Result := ASeriesIndex * VisibleValueCount + AVisibleIndex; -end; - -function TcxGridChartLineDiagramViewInfo.GetCategoryTickMarkLabelOffsetUnits(AIndex: Integer): Integer; -begin - Result := GetValueOffsetUnits(AIndex, -1); -end; - -function TcxGridChartLineDiagramViewInfo.GetCategoryTickMarkOffsetUnits(AIndex: Integer; - AValueAxisBetweenCategories: Boolean): Integer; -begin - Result := LineDiagramValueSizeUnits * AIndex; -end; - -function TcxGridChartLineDiagramViewInfo.GetUnitCount: Integer; -begin - Result := LineDiagramValueSizeUnits * VisibleValueCount; - if not Diagram.AxisCategory.ValueAxisBetweenCategories then - Dec(Result, LineDiagramValueSizeUnits); -end; - -function TcxGridChartLineDiagramViewInfo.GetValueOffsetUnits(AVisibleValueIndex, ASeriesIndex: Integer): Integer; -begin - if Diagram.AxisCategory.ValueAxisBetweenCategories then - Result := LineDiagramValueSizeUnits div 2 - else - Result := 0; - Inc(Result, LineDiagramValueSizeUnits * AVisibleValueIndex); -end; - -function TcxGridChartLineDiagramViewInfo.IsEdgeCategoryTickMarkLabels: Boolean; -begin - Result := not Diagram.AxisCategory.ValueAxisBetweenCategories; -end; - -function TcxGridChartLineDiagramViewInfo.GetValueY(AVisibleValueIndex, ASeriesIndex: Integer): Integer; -begin - Result := GetValueOffset(VisibleValues[ASeriesIndex, AVisibleValueIndex]); -end; - -procedure TcxGridChartLineDiagramViewInfo.CalculatePlotOffsets(APlotAreaWidth: Integer; - var AOffsets: TRect); -var - ACompensation: Integer; -begin - inherited; - if Diagram.Values.LineStyle = clsNone then - ACompensation := 0 - else - ACompensation := RoundDiv(Diagram.Values.LineWidth, 2); - if Diagram.Values.MarkerStyle <> cmsNone then - ACompensation := Max(ACompensation, RoundDiv(Diagram.Values.MarkerSize, 2)); - if ACompensation <> 0 then - begin - AOffsets.Left := Max(AOffsets.Left, ACompensation); - AOffsets.Top := Max(AOffsets.Top, ACompensation); - AOffsets.Right := Max(AOffsets.Right, ACompensation); - AOffsets.Bottom := Max(AOffsets.Bottom, ACompensation); - end; -end; - -procedure TcxGridChartLineDiagramViewInfo.CalculateValues; -var - AValueIndex, ASeriesIndex, ALineStartY, ALineFinishY: Integer; -begin - ALineStartY := 0; // to avoid warning - for ASeriesIndex := 0 to SeriesCount - 1 do - for AValueIndex := 0 to VisibleValueCount - 1 do - begin - ALineFinishY := GetValueY(AValueIndex, ASeriesIndex); - if AValueIndex = 0 then - ALineStartY := ALineFinishY; - if IsCategoriesInReverseOrder then - SwapIntegers(ALineStartY, ALineFinishY); - TcxGridChartLineDiagramValueViewInfo(CreateValueViewInfo(ASeriesIndex, AValueIndex)).Calculate( - GetValueBounds(AValueIndex, ASeriesIndex), ALineStartY, ALineFinishY); - if not IsCategoriesInReverseOrder then - ALineStartY := ALineFinishY; - end; -end; - -function TcxGridChartLineDiagramViewInfo.GetValueBounds(AVisibleValueIndex, ASeriesIndex: Integer): TRect; -var - ACategoryOffsetStart, ACategoryOffsetFinish, AValueOffsetStart, AValueOffsetFinish: Integer; -begin - ACategoryOffsetFinish := GetUnitAdjustedOffset(GetValueOffsetUnits(AVisibleValueIndex, ASeriesIndex)); - if AVisibleValueIndex = 0 then - ACategoryOffsetStart := ACategoryOffsetFinish - else - ACategoryOffsetStart := GetUnitAdjustedOffset(GetValueOffsetUnits(AVisibleValueIndex - 1, ASeriesIndex)); - AValueOffsetStart := ZeroValueOffset; - AValueOffsetFinish := GetValueY(AVisibleValueIndex, ASeriesIndex); - - Result.Left := ACategoryOffsetStart; - Result.Right := ACategoryOffsetFinish; - Result.Bottom := AValueOffsetStart; - Result.Top := AValueOffsetFinish; - CheckRectBounds(Result); -end; - -{ TcxGridChartAreaDiagramLegendItemViewInfo } - -function TcxGridChartAreaDiagramLegendItemViewInfo.CalculateHeight: Integer; -begin - Result := Max(inherited CalculateHeight, 2 * AreaDiagramLegendKeyOffset + LegendKeyHeight); -end; - -function TcxGridChartAreaDiagramLegendItemViewInfo.CalculateLegendKeyHeight: Integer; -begin - Result := 2 * AreaDiagramLegendKeySpace; - if LineStyle <> clsNone then - Inc(Result, 2 * LineWidth); - if MarkerStyle <> cmsNone then - Inc(Result, MarkerSize); - Result := Max(Result, inherited CalculateLegendKeyHeight); -end; - -function TcxGridChartAreaDiagramLegendItemViewInfo.CalculateLegendKeyWidth: Integer; -begin - Result := inherited CalculateLegendKeyWidth; - if Result = 0 then - Result := LegendKeyHeight; -end; - -function TcxGridChartAreaDiagramLegendItemViewInfo.GetLineColor: TColor; -begin - Result := LegendKeyParams.TextColor; -end; - -function TcxGridChartAreaDiagramLegendItemViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartAreaDiagramLegendItemPainter; -end; - -{ TcxGridChartAreaDiagramLegendViewInfo } - -function TcxGridChartAreaDiagramLegendViewInfo.GetItemClass: TcxGridChartLegendItemViewInfoClass; -begin - Result := TcxGridChartAreaDiagramLegendItemViewInfo; -end; - -function TcxGridChartAreaDiagramLegendViewInfo.GetItemsInReverseOrder: Boolean; -begin - Result := (Orientation = cpoVertical) and (Diagram.Values.Stacking <> vsNone); -end; - -{function TcxGridChartAreaDiagramLegendViewInfo.ItemLegendKeyBorderIsValueBorder: Boolean; -begin - Result := True; -end;} - -{ TcxGridChartAreaDiagramValueViewInfo } - -function TcxGridChartAreaDiagramValueViewInfo.GetDiagram: TcxGridChartAreaDiagram; -begin - Result := TcxGridChartAreaDiagram(inherited Diagram); -end; - -procedure TcxGridChartAreaDiagramValueViewInfo.CalculateAreaPoints; -var - APrevSeriesValuePoints: TPointArray; -begin - SetLength(AreaPoints, 4); - AreaPoints[1] := LineStart; - AreaPoints[2] := LineFinish; -{$IFNDEF DELPHI7} - APrevSeriesValuePoints := nil; // to remove wrong warning -{$ENDIF} - if (Diagram.Values.Stacking <> vsNone) and (SeriesIndex > 0) then - begin - APrevSeriesValuePoints := TcxGridChartAreaDiagramValueViewInfo( - DiagramViewInfo.GetValueViewInfo(SeriesIndex - 1, VisibleValueIndex)).AreaPoints; - AreaPoints[0] := APrevSeriesValuePoints[1]; - AreaPoints[3] := APrevSeriesValuePoints[2]; - end - else - begin - AreaPoints[0] := Point(Bounds.Left, ZeroValueOffset); - AreaPoints[3] := Point(Bounds.Right, ZeroValueOffset); - end; -end; - -function TcxGridChartAreaDiagramValueViewInfo.CustomDrawBackground(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDrawBackground(ACanvas); - if not Result then - Diagram.DoCustomDrawValueArea(ACanvas, Self, Result); -end; - -function TcxGridChartAreaDiagramValueViewInfo.GetAreaColor: TColor; -begin - Result := Params.Color; -end; - -function TcxGridChartAreaDiagramValueViewInfo.GetHotSpotBounds: TRect; -var - ASize: TPoint; - APrevSeriesValuePosition: Integer; -begin - ASize.X := Diagram.Values.GetHotSpotSize; - if MarkerStyle = cmsNone then - ASize.Y := 0 - else - ASize.Y := ASize.X; - GetCenteredRect(Position, ASize.X, ASize.Y, Result); - - if (Diagram.Values.Stacking <> vsNone) and (SeriesIndex > 0) then - begin - APrevSeriesValuePosition := TcxGridChartAreaDiagramValueViewInfo( - DiagramViewInfo.GetValueViewInfo(SeriesIndex - 1, VisibleValueIndex)).Position.Y; - if Result.Top < APrevSeriesValuePosition then - Result.Bottom := APrevSeriesValuePosition - else - Result.Top := APrevSeriesValuePosition; - end - else - begin - Result.Top := Min(Result.Top, ZeroValueOffset); - Result.Bottom := Max(Result.Bottom, ZeroValueOffset); - end; -end; - -function TcxGridChartAreaDiagramValueViewInfo.GetLineColor: TColor; -begin - Result := Params.TextColor; -end; - -function TcxGridChartAreaDiagramValueViewInfo.GetLineHotZoneMinWidth: Integer; -begin - Result := 0; -end; - -class function TcxGridChartAreaDiagramValueViewInfo.GetPainterClassEx: TcxGridChartLineDiagramValuePainterClass; -begin - Result := TcxGridChartAreaDiagramValuePainter; -end; - -function TcxGridChartAreaDiagramValueViewInfo.GetZeroValueOffset: Integer; -begin - if ValueDirection = dirUp then - Result := Bounds.Bottom - else - Result := Bounds.Top; -end; - -function TcxGridChartAreaDiagramValueViewInfo.HasCustomDrawBackground: Boolean; -begin - Result := Diagram.HasCustomDrawValueArea; -end; - -procedure TcxGridChartAreaDiagramValueViewInfo.Calculate(const ABounds: TRect; - ALineStartY, ALineFinishY: Integer); -begin - inherited; - CalculateAreaPoints; -end; - -function TcxGridChartAreaDiagramValueViewInfo.CreateAreaRegion: TcxRegion; -begin - Result := TcxRegion.Create(CreatePolygonRgn(AreaPoints[0], Length(AreaPoints), WINDING)); -end; - -function TcxGridChartAreaDiagramValueViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - ARegion: TcxRegion; -begin - Result := inherited GetHitTest(P); - if Result = nil then - begin - ARegion := CreateAreaRegion; - try - if ARegion.PtInRegion(P) then - begin - Result := TcxGridChartValueAreaHitTest.Instance(P); - InitHitTest(Result); - TcxGridChartValueAreaHitTest(Result).CanDrillDown := False; - end; - finally - ARegion.Free; - end; - end; -end; - -{ TcxGridChartAreaDiagramViewInfo } - -function TcxGridChartAreaDiagramViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartAreaDiagramPainter; -end; - -class function TcxGridChartAreaDiagramViewInfo.GetValueViewInfoClass: TcxGridChartDiagramValueViewInfoClass; -begin - Result := TcxGridChartAreaDiagramValueViewInfo; -end; - -{ TcxGridChartPieDiagramLegendViewInfo } - -function TcxGridChartPieDiagramLegendViewInfo.GetDiagram: TcxGridChartPieDiagram; -begin - Result := TcxGridChartPieDiagram(inherited Diagram); -end; - -function TcxGridChartPieDiagramLegendViewInfo.GetItemObjectIndex(AIndex: Integer): Integer; -begin - Result := AIndex; -end; - -function TcxGridChartPieDiagramLegendViewInfo.GetKind: TcxGridChartLegendKind; -begin - if GridView.VisibleSeriesCount = 0 then - Result := lkSeries - else - Result := lkCategories; -end; - -{ TcxGridChartPieDiagramValueViewInfo } - -function TcxGridChartPieDiagramValueViewInfo.GetCaptionPosition: TcxGridChartPieDiagramValueCaptionPosition; -begin - Result := DiagramViewInfo.CaptionPosition; -end; - -function TcxGridChartPieDiagramValueViewInfo.GetCenter: TPoint; -begin - with Bounds do - begin - Result.X := GetRangeCenter(Left, Right); - Result.Y := GetRangeCenter(Top, Bottom); - end; -end; - -function TcxGridChartPieDiagramValueViewInfo.GetDiagramViewInfo: TcxGridChartPieDiagramViewInfo; -begin - Result := TcxGridChartPieDiagramViewInfo(inherited DiagramViewInfo); -end; - -function TcxGridChartPieDiagramValueViewInfo.GetRadius: Integer; -begin - with Bounds do - Result := (Right - Left) div 2; -end; - -function TcxGridChartPieDiagramValueViewInfo.CalculateCaptionBounds: TRect; -var - ACaptionWidth, ACaptionHeight, AAngle: Integer; -begin - ACaptionWidth := CaptionViewInfo.CalculateWidth; - ACaptionHeight := CaptionViewInfo.CalculateHeight; - AAngle := GetRangeCenter(StartAngle, FinishAngle) mod 360; - GetCenteredRect(CalculateCaptionCenter(AAngle, ACaptionWidth, ACaptionHeight), - ACaptionWidth, ACaptionHeight, Result); - OffsetRect(Result, 0, -1); // to center text inside text rect - if CaptionPosition = pdvcpOutsideEndWithLeaderLines then - MakeCaptionVisible(Result, AAngle); -end; - -function TcxGridChartPieDiagramValueViewInfo.CalculateCaptionCenter(AAngle, ACaptionWidth, ACaptionHeight: Integer): TPoint; -const - SpecialCaseAngleDelta = 25; -var - ARadius: Integer; - AIsSpecialCase: Boolean; - ASin, ACos: Extended; -begin - if CaptionPosition = pdvcpOutsideEndWithLeaderLines then - begin - CalculateLeaderLinePoints(AAngle); - Result := LeaderLinePoints[Length(LeaderLinePoints) - 1]; - if AAngle < 180 then - Inc(Result.X, RoundDiv(ACaptionWidth, 2)) - else - Dec(Result.X, RoundDiv(ACaptionWidth, 2) - 1); - end - else - begin - ARadius := Radius; - AIsSpecialCase := False; - case CaptionPosition of - pdvcpCenter: - ARadius := ARadius div 2; - pdvcpInsideEnd: - Dec(ARadius, PieValueCaptionOffset + Max(ACaptionWidth div 2, ACaptionHeight div 2)); - pdvcpOutsideEnd: - begin - Inc(ARadius, PieValueCaptionOffset + ACaptionHeight div 2); - AIsSpecialCase := not (AAngle mod 180 in [SpecialCaseAngleDelta..180 - SpecialCaseAngleDelta]); - if AIsSpecialCase then - begin - SinCos(DegToRad(AAngle mod 180), ASin, ACos); - if ACaptionWidth div 2 >= Abs(ASin / ACos * ARadius) then - ARadius := Round(Abs(ARadius / ACos)) - else - ARadius := Round(ACaptionWidth div 2 * ASin + Sqrt(Sqr(ARadius) - Sqr(ACaptionWidth div 2 * ACos))); - end; - end; - end; - Result := GetPointOnCircle(Center, ARadius, AAngle); - if CaptionPosition = pdvcpOutsideEnd then - if AIsSpecialCase then - if AAngle in [180 - SpecialCaseAngleDelta..180 + SpecialCaseAngleDelta] then - Inc(Result.Y, ACaptionHeight div 2) - else - Dec(Result.Y, ACaptionHeight div 2) - else - if AAngle < 180 then - Inc(Result.X, ACaptionWidth div 2) - else - Dec(Result.X, ACaptionWidth div 2); - end; -end; - -procedure TcxGridChartPieDiagramValueViewInfo.CalculateLeaderLinePoints(AAngle: Integer); -begin - SetLength(LeaderLinePoints, 3); - LeaderLinePoints[0] := GetPointOnCircle(Center, Radius, AAngle); - LeaderLinePoints[1] := - GetPointOnCircle(Center, Radius + PieLeaderLineSegment1, AAngle); - LeaderLinePoints[2] := LeaderLinePoints[1]; - if AAngle < 180 then - Inc(LeaderLinePoints[2].X, PieLeaderLineSegment2) - else - Dec(LeaderLinePoints[2].X, PieLeaderLineSegment2); -end; - -function TcxGridChartPieDiagramValueViewInfo.GetIsDesignSelected: Boolean; -begin - Result := False; -end; - -function TcxGridChartPieDiagramValueViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartPieDiagramValuePainter; -end; - -function TcxGridChartPieDiagramValueViewInfo.HasBackground: Boolean; -begin - Result := False; -end; - -function TcxGridChartPieDiagramValueViewInfo.HasCaption: Boolean; -begin - Result := (Radius <> 0) and (CaptionPosition <> pdvcpNone); -end; - -procedure TcxGridChartPieDiagramValueViewInfo.MakeCaptionVisible(var ACaptionBounds: TRect; - AAngle: Integer); -var - APrevValueIndex, ACaptionOffset: Integer; - APrevCaptionBounds, AIntersection: TRect; -begin - if VisibleValueIndex = 0 then Exit; - APrevValueIndex := VisibleValueIndex; - repeat - Dec(APrevValueIndex); - APrevCaptionBounds := - DiagramViewInfo.GetValueViewInfo(SeriesIndex, APrevValueIndex).CaptionViewInfo.Bounds; - if not EqualRect(ACaptionBounds, APrevCaptionBounds) and - IntersectRect(AIntersection, ACaptionBounds, APrevCaptionBounds) then - begin - if AAngle < 180 then - ACaptionOffset := APrevCaptionBounds.Right - ACaptionBounds.Left - else - ACaptionOffset := APrevCaptionBounds.Left - ACaptionBounds.Right; - OffsetRect(ACaptionBounds, ACaptionOffset, 0); - if LeaderLinePoints <> nil then - Inc(LeaderLinePoints[Length(LeaderLinePoints) - 1].X, ACaptionOffset); - APrevValueIndex := VisibleValueIndex; - end; - until APrevValueIndex = 0; -end; - -procedure TcxGridChartPieDiagramValueViewInfo.Calculate(const R: TRect; - AStartAngle, AFinishAngle: Integer); -begin - FStartAngle := AStartAngle; - FFinishAngle := AFinishAngle; - inherited Calculate(R); -end; - -function TcxGridChartPieDiagramValueViewInfo.HasPoint(const P: TPoint): Boolean; -var - APointRadius, APointAngle: Integer; -begin - Result := inherited HasPoint(P); - if Result then - begin - APointRadius := Round(Sqrt(Sqr(P.X - Center.X) + Sqr(P.Y - Center.Y))); - Result := APointRadius <= Radius; - if Result then - begin - APointAngle := 90 + Round(RadToDeg(ArcTan2(P.Y - Center.Y, P.X - Center.X))); - if APointAngle < 0 then Inc(APointAngle, 360); - Result := (StartAngle <= APointAngle) and (APointAngle < FinishAngle); - end; - end; -end; - -{ TcxGridChartPieSeriesSiteCaptionViewInfo } - -constructor TcxGridChartPieSeriesSiteCaptionViewInfo.Create(ASiteViewInfo: TcxGridChartPieSeriesSiteViewInfo); -begin - inherited Create(ASiteViewInfo.GridViewInfo); - FSiteViewInfo := ASiteViewInfo; -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.CalculateHeight: Integer; -begin - Result := BorderSize[bTop] + TextHeightWithOffset + BorderSize[bBottom]; -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDraw(ACanvas); - if not Result then - FSiteViewInfo.Diagram.DoCustomDrawSeriesSiteCaption(ACanvas, Self, Result); -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := taCenter; -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := FSiteViewInfo.BorderColor[AIndex]; -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.GetBorders: TcxBorders; -begin - if FSiteViewInfo.Visible then - Result := [bBottom] - else - Result := []; -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := FSiteViewInfo.BorderWidth[AIndex]; -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartPieSeriesSiteCaptionHitTest; -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.GetText: string; -begin - Result := FSiteViewInfo.Series.GetDisplayText; -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartPieSeriesSiteCaptionPainter; -end; - -procedure TcxGridChartPieSeriesSiteCaptionViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - FSiteViewInfo.Diagram.Styles.GetViewParams(dsSeriesSiteCaptions, nil, nil, AParams); -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.GetVisible: Boolean; -begin - Result := FSiteViewInfo.Diagram.SeriesCaptions; -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.HasCustomDraw: Boolean; -begin - Result := FSiteViewInfo.Diagram.HasCustomDrawSeriesSiteCaption; -end; - -procedure TcxGridChartPieSeriesSiteCaptionViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - FSiteViewInfo.InitHitTest(AHitTest); - inherited; -end; - -function TcxGridChartPieSeriesSiteCaptionViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if (AButton = mbLeft) and not (ssDouble in AShift) and GridView.IsDesigning then - begin - GridView.Controller.DesignController.SelectObject(FSiteViewInfo.Series, not (ssShift in AShift)); - Result := True; - end; -end; - -{ TcxGridChartPieSeriesSiteViewInfo } - -constructor TcxGridChartPieSeriesSiteViewInfo.Create(ADiagramViewInfo: TcxGridChartPieDiagramViewInfo; - ASeries: TcxGridChartSeries); -begin - inherited Create(ADiagramViewInfo.GridViewInfo); - FDiagramViewInfo := ADiagramViewInfo; - FSeries := ASeries; - FCaptionViewInfo := GetCaptionViewInfoClass.Create(Self); -end; - -destructor TcxGridChartPieSeriesSiteViewInfo.Destroy; -begin - FCaptionViewInfo.Free; - inherited; -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetDiagram: TcxGridChartPieDiagram; -begin - Result := FDiagramViewInfo.Diagram; -end; - -procedure TcxGridChartPieSeriesSiteViewInfo.CalculateAngles; -var - ASumOfValues, AValue: Variant; - AAngleOffset, I: Integer; -begin - ASumOfValues := Series.SumOfValues; - AAngleOffset := Diagram.Values.AngleOfFirstSlice; - SetLength(Angles, Series.VisibleValueCount + 1); - if ASumOfValues <> 0 then - begin - AValue := 0; - for I := 0 to Series.VisibleValueCount - 1 do - begin - Angles[I] := AAngleOffset + Min(Round(360 * AValue / ASumOfValues), 360); - AValue := AValue + Abs(Series.VisibleValues[I]); - end; - Angles[Series.VisibleValueCount] := AAngleOffset + 360; - end; -end; - -procedure TcxGridChartPieSeriesSiteViewInfo.CalculateCaptionAndPieAreaBounds(var ACaptionBounds, APieAreaBounds: TRect); -var - ASize: Integer; -begin - ACaptionBounds := ContentBounds; - if FCaptionViewInfo.Visible and not IsRectEmpty(ACaptionBounds) then - begin - ACaptionBounds.Bottom := ACaptionBounds.Top; - Dec(ACaptionBounds.Top, FCaptionViewInfo.CalculateHeight); - end; - - APieAreaBounds := ContentBounds; - InflateRect(APieAreaBounds, -PieAreaOffset, -PieAreaOffset); - with APieAreaBounds do - begin - ASize := Max(PieMinSize, Min(Right - Left, Bottom - Top) - - 2 * DiagramViewInfo.PieAreaValueCaptionCompensation); - if ASize > Min(ContentWidth, ContentHeight) then - SetRectEmpty(APieAreaBounds) - else - begin - Left := (Left + Right - ASize) div 2; - Right := Left + ASize; - Top := (Top + Bottom - ASize) div 2; - Bottom := Top + ASize; - end; - end; -end; - -function TcxGridChartPieSeriesSiteViewInfo.CalculateContentBounds: TRect; -begin - Result := inherited CalculateContentBounds; - if FCaptionViewInfo.Visible then - Inc(Result.Top, FCaptionViewInfo.CalculateHeight); - if IsRectEmpty(Result) then SetRectEmpty(Result); // for negative values -end; - -function TcxGridChartPieSeriesSiteViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDraw(ACanvas); - if not Result then - Diagram.DoCustomDrawSeriesSite(ACanvas, Self, Result); -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := Params.TextColor; -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetBorders: TcxBorders; -begin - Result := cxBordersAll; -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := 1; -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetCaptionViewInfoClass: TcxGridChartPieSeriesSiteCaptionViewInfoClass; -begin - Result := TcxGridChartPieSeriesSiteCaptionViewInfo; -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetDesignSelectionBounds: TRect; -begin - Result := ClientBounds; -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartPieSeriesSiteHitTest; -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetIsDesignSelected: Boolean; -begin - Result := GridView.IsDesigning and - GridView.Controller.DesignController.IsObjectSelected(Series); -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartPieSeriesSitePainter; -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetValueViewInfo(AVisibleValueIndex: Integer): TcxGridChartPieDiagramValueViewInfo; -begin - Result := FDiagramViewInfo.GetValueViewInfo(FSeries.VisibleIndex, AVisibleValueIndex) as TcxGridChartPieDiagramValueViewInfo; -end; - -procedure TcxGridChartPieSeriesSiteViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - Diagram.Styles.GetViewParams(dsSeriesSites, nil, nil, AParams); -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetVisible: Boolean; -begin - Result := Diagram.SeriesSites; -end; - -function TcxGridChartPieSeriesSiteViewInfo.HasCustomDraw: Boolean; -begin - Result := Diagram.HasCustomDrawSeriesSite; -end; - -procedure TcxGridChartPieSeriesSiteViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - FDiagramViewInfo.InitHitTest(AHitTest); - inherited; - (AHitTest as TcxGridChartPieSeriesSiteHitTest).Series := Series; -end; - -procedure TcxGridChartPieSeriesSiteViewInfo.Calculate(const ABounds: TRect); -var - I: Integer; -begin - inherited; - CalculateCaptionAndPieAreaBounds(FCaptionBounds, FPieAreaBounds); - if FCaptionViewInfo.Visible then - FCaptionViewInfo.Calculate(CaptionBounds); - CalculateAngles; - for I := 0 to DiagramViewInfo.VisibleValueCount - 1 do - GetValueViewInfo(I).Calculate(PieAreaBounds, Angles[I], Angles[I + 1]); -end; - -function TcxGridChartPieSeriesSiteViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := FCaptionViewInfo.GetHitTest(P); - if Result = nil then - Result := inherited GetHitTest(P); -end; - -function TcxGridChartPieSeriesSiteViewInfo.IsPieEmpty: Boolean; -begin - Result := (Angles = nil) or (Angles[Length(Angles) - 1] = 0); -end; - -function TcxGridChartPieSeriesSiteViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if (AButton = mbLeft) and not (ssDouble in AShift) and GridView.IsDesigning then - begin - GridView.Controller.DesignController.SelectObject(Series, not (ssShift in AShift)); - Result := True; - end; -end; - -procedure TcxGridChartPieSeriesSiteViewInfo.Paint(ACanvas: TcxCanvas = nil); -begin - FCaptionViewInfo.Paint(ACanvas); - inherited; -end; - -{ TcxGridChartPieDiagramViewInfo } - -constructor TcxGridChartPieDiagramViewInfo.Create(AGridViewInfo: TcxCustomGridViewInfo; - ADiagram: TcxGridChartDiagram); -var - I: Integer; -begin - inherited; - FSeriesSiteViewInfos := TList.Create; - for I := 0 to SeriesCount - 1 do - FSeriesSiteViewInfos.Add(GetSeriesSiteViewInfoClass.Create(Self, Series[I])); -end; - -destructor TcxGridChartPieDiagramViewInfo.Destroy; -var - I: Integer; -begin - for I := 0 to SeriesSiteViewInfoCount - 1 do - SeriesSiteViewInfos[I].Free; - FSeriesSiteViewInfos.Free; - inherited; -end; - -function TcxGridChartPieDiagramViewInfo.GetCaptionPosition: TcxGridChartPieDiagramValueCaptionPosition; -begin - Result := Diagram.Values.GetCaptionPosition; -end; - -function TcxGridChartPieDiagramViewInfo.GetDiagram: TcxGridChartPieDiagram; -begin - Result := TcxGridChartPieDiagram(inherited Diagram); -end; - -function TcxGridChartPieDiagramViewInfo.GetSeriesSiteViewInfo(Index: Integer): TcxGridChartPieSeriesSiteViewInfo; -begin - Result := TcxGridChartPieSeriesSiteViewInfo(FSeriesSiteViewInfos[Index]); -end; - -function TcxGridChartPieDiagramViewInfo.GetSeriesSiteViewInfoCount: Integer; -begin - Result := FSeriesSiteViewInfos.Count; -end; - -function TcxGridChartPieDiagramViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartPieDiagramPainter; -end; - -function TcxGridChartPieDiagramViewInfo.GetSeriesSiteViewInfoClass: TcxGridChartPieSeriesSiteViewInfoClass; -begin - Result := TcxGridChartPieSeriesSiteViewInfo; -end; - -class function TcxGridChartPieDiagramViewInfo.GetValueViewInfoClass: TcxGridChartDiagramValueViewInfoClass; -begin - Result := TcxGridChartPieDiagramValueViewInfo; -end; - -function TcxGridChartPieDiagramViewInfo.GetValueViewInfoIndex(ASeriesIndex, AVisibleIndex: Integer): Integer; -begin - Result := ASeriesIndex * VisibleValueCount + AVisibleIndex; -end; - -function TcxGridChartPieDiagramViewInfo.CalculatePieAreaValueCaptionCompensation: Integer; -begin - case CaptionPosition of - pdvcpOutsideEnd: - Result := PieValueCaptionOffset + CalculateValueCaptionMaxHeight div 2 + - CalculateValueCaptionMaxWidth; - pdvcpOutsideEndWithLeaderLines: - Result := PieLeaderLineSegment1 + PieLeaderLineSegment2 + CalculateValueCaptionMaxWidth; - else - Result := 0; - end; -end; - -function TcxGridChartPieDiagramViewInfo.CalculateSeriesSiteViewInfoBounds(AIndex: Integer): TRect; -var - AColumnCount, ARowCount, ASiteWidth, ASiteHeight: Integer; -begin - AColumnCount := Diagram.GetSeriesColumnCount; - ARowCount := RoundDiv(SeriesSiteViewInfoCount, AColumnCount); - - ASiteWidth := (Bounds.Right - Bounds.Left - (AColumnCount - 1) * PieSeriesSiteOffset) div AColumnCount; - ASiteHeight := (Bounds.Bottom - Bounds.Top - (ARowCount - 1) * PieSeriesSiteOffset) div ARowCount; - - Result := Bounds; - Inc(Result.Left, AIndex mod AColumnCount * (ASiteWidth + PieSeriesSiteOffset)); - Result.Right := Result.Left + ASiteWidth; - Inc(Result.Top, AIndex div AColumnCount * (ASiteHeight + PieSeriesSiteOffset)); - Result.Bottom := Result.Top + ASiteHeight; -end; - -function TcxGridChartPieDiagramViewInfo.CalculateValueCaptionMaxWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to ValueViewInfoCount - 1 do - Result := Max(Result, ValueViewInfos[I].CaptionViewInfo.CalculateWidth); -end; - -function TcxGridChartPieDiagramViewInfo.CalculateValueCaptionMaxHeight: Integer; -begin - if ValueViewInfoCount = 0 then - Result := 0 - else - Result := ValueViewInfos[0].CaptionViewInfo.CalculateHeight; -end; - -procedure TcxGridChartPieDiagramViewInfo.Calculate(const ABounds: TRect); -var - I, J: Integer; -begin - inherited; - for I := 0 to SeriesCount - 1 do - for J := 0 to VisibleValueCount - 1 do - CreateValueViewInfo(I, J); - FPieAreaValueCaptionCompensation := CalculatePieAreaValueCaptionCompensation; - for I := 0 to SeriesSiteViewInfoCount - 1 do - SeriesSiteViewInfos[I].Calculate(CalculateSeriesSiteViewInfoBounds(I)); -end; - -function TcxGridChartPieDiagramViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; -begin - Result := inherited GetHitTest(P); - if Result = nil then - for I := 0 to SeriesSiteViewInfoCount - 1 do - begin - Result := SeriesSiteViewInfos[I].GetHitTest(P); - if Result <> nil then Break; - end; -end; - -{ TcxGridChartToolBoxItemViewInfo } - -constructor TcxGridChartToolBoxItemViewInfo.Create(AContainer: TcxGridChartToolBoxViewInfo; - AAlignment: TcxGridChartToolBoxItemAlignment); -begin - inherited Create(AContainer.GridViewInfo); - FContainer := AContainer; - FAlignment := AAlignment; -end; - -function TcxGridChartToolBoxItemViewInfo.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -procedure TcxGridChartToolBoxItemViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - FContainer.GetViewParams(AParams); -end; - -{ TcxGridChartToolBoxItemSeparatorViewInfo } - -function TcxGridChartToolBoxItemSeparatorViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TcxGridChartToolBoxItemSeparatorViewInfo.CalculateWidth: Integer; -begin - Result := ToolBoxItemSeparatorWidth; -end; - -function TcxGridChartToolBoxItemSeparatorViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := nil; -end; - -function TcxGridChartToolBoxItemSeparatorViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartToolBoxItemSeparatorPainter; -end; - -procedure TcxGridChartToolBoxItemSeparatorViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - AParams.Color := LookAndFeelPainter.DefaultChartToolBoxItemSeparatorColor; -end; - -function TcxGridChartToolBoxItemSeparatorViewInfo.HasBackground: Boolean; -begin - Result := False; -end; - -{ TcxGridChartToolBoxDataLevelActiveValueViewInfo } - -constructor TcxGridChartToolBoxDataLevelActiveValueViewInfo.Create(AContainer: TcxGridChartToolBoxDataLevelInfoViewInfo); -begin - inherited Create(AContainer.GridViewInfo); - FContainer := AContainer; - FCanShowDropDownWindow := GridView.Controller.CanShowDataLevelActiveValuePopup; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetDataGroup: TcxGridChartDataGroup; -begin - Result := FContainer.DataLevelObject; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.CalculateContentBounds: TRect; -begin - Result := inherited CalculateContentBounds; - InflateRect(Result, -cxTextOffset, 0); -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.CalculateHeight: Integer; -begin - Result := TextHeightWithOffset; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.CalculateWidth: Integer; -begin - Result := BorderSize[bLeft] + 2 * cxTextOffset + TextWidthWithOffset; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := FContainer.BorderColor[AIndex]; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetBorders: TcxBorders; -begin - Result := [bLeft]; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := FContainer.BorderWidth[AIndex]; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartDataLevelActiveValueInfoHitTest; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartToolBoxDataLevelActiveValuePainter; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetText: string; -begin - if FContainer.DataLevelObject.HasActiveValue then - Result := FContainer.DataLevelObject.ActiveValueDisplayText - else - Result := cxGetResourceString(@scxGridChartToolBoxDataLevelSelectValue); -end; - -procedure TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetViewParams(vsDataLevelActiveValueInfo, nil, nil, AParams); -end; - -procedure TcxGridChartToolBoxDataLevelActiveValueViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - FContainer.InitHitTest(AHitTest); - inherited; - TcxGridChartDataLevelActiveValueInfoHitTest(AHitTest).CanDropDown := CanShowDropDownWindow; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.DropDownWindowExists: Boolean; -begin - Result := CanShowDropDownWindow and GridView.Controller.HasDataLevelActiveValuePopup; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetDropDownWindow: TcxCustomGridPopup; -begin - if CanShowDropDownWindow then - Result := GridView.Controller.DataLevelActiveValuePopup - else - Result := nil; -end; - -function TcxGridChartToolBoxDataLevelActiveValueViewInfo.GetDropDownWindowOwnerBounds: TRect; -begin - Result := FContainer.Bounds; - Result.Left := Bounds.Left; -end; - -{ TcxGridChartToolBoxDataLevelInfoViewInfo } - -constructor TcxGridChartToolBoxDataLevelInfoViewInfo.Create(AContainer: TcxGridChartToolBoxViewInfo; - AAlignment: TcxGridChartToolBoxItemAlignment; ADataLevel: Integer); -begin - inherited Create(AContainer, AAlignment); - FDataLevel := ADataLevel; - if HasActiveValue then - FActiveValueViewInfo := GetActiveValueViewInfoClass.Create(Self); -end; - -destructor TcxGridChartToolBoxDataLevelInfoViewInfo.Destroy; -begin - FActiveValueViewInfo.Free; - inherited; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetActive: Boolean; -begin - Result := GridView.ActiveDataLevel = FDataLevel; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetDataLevelObject: TcxGridChartDataGroup; -begin - Result := GridView.DataLevelObjects[FDataLevel]; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.CalculateActiveValueViewInfoBounds: TRect; -begin - Result := ClientBounds; - Result.Left := Result.Right - FActiveValueViewInfo.CalculateWidth; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.CalculateContentBounds: TRect; -begin - Result := inherited CalculateContentBounds; - if FActiveValueViewInfo <> nil then - Dec(Result.Right, FActiveValueViewInfo.CalculateWidth); -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.CalculateHeight: Integer; -begin - Result := TextHeightWithOffset; - if FActiveValueViewInfo <> nil then - Result := Max(Result, FActiveValueViewInfo.CalculateHeight); - Inc(Result, BorderSize[bTop] + BorderSize[bBottom]); -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.CalculateWidth: Integer; -begin - Result := BorderSize[bLeft] + 2 * cxTextOffset + TextWidthWithOffset + BorderSize[bRight]; - if FActiveValueViewInfo <> nil then - Inc(Result, FActiveValueViewInfo.CalculateWidth); -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetActiveValueViewInfoClass: TcxGridChartToolBoxDataLevelActiveValueViewInfoClass; -begin - Result := TcxGridChartToolBoxDataLevelActiveValueViewInfo; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := taCenter; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := LookAndFeelPainter.DefaultChartToolBoxDataLevelInfoBorderColor; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetBorders: TcxBorders; -begin - Result := cxBordersAll; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := LookAndFeelPainter.ChartToolBoxDataLevelInfoBorderSize; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetDesignObject: TPersistent; -begin - if DataLevelObject = nil then - Result := GridView.Categories - else - Result := DataLevelObject; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartDataLevelInfoHitTest; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetIsDesignSelected: Boolean; -begin - Result := GridView.IsDesigning and - GridView.Controller.DesignController.IsObjectSelected(GetDesignObject); -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartToolBoxDataLevelInfoPainter; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetText: string; -begin - if DataLevelObject = nil then - Result := GridView.Categories.GetDisplayText - else - Result := DataLevelObject.GetDisplayText; -end; - -procedure TcxGridChartToolBoxDataLevelInfoViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetDataLevelInfoParams(DataLevel, AParams); -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.HasActiveValue: Boolean; -begin - Result := DataLevelObject <> nil; - if Result then - if GridView.Controller.MayDataDrillDown(False) then - Result := GridView.CanActivateDataLevel(DataLevel) - else - Result := DataLevelObject.HasActiveValue; -end; - -procedure TcxGridChartToolBoxDataLevelInfoViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - with TcxGridChartDataLevelInfoHitTest(AHitTest) do - begin - DataLevel := Self.DataLevel; - DataLevelObjectContainerKind := ckToolBox; - end; -end; - -procedure TcxGridChartToolBoxDataLevelInfoViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - if FActiveValueViewInfo <> nil then - FActiveValueViewInfo.Calculate(CalculateActiveValueViewInfoBounds); -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - AHitTest: TcxCustomGridHitTest; -begin - Result := inherited GetHitTest(P); - if (Result <> nil) and not GridView.IsDesigning and (FActiveValueViewInfo <> nil) then - begin - AHitTest := FActiveValueViewInfo.GetHitTest(P); - if AHitTest <> nil then Result := AHitTest; - end; -end; - -function TcxGridChartToolBoxDataLevelInfoViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if (AButton = mbLeft) and not (ssDouble in AShift) then - if GridView.IsDesigning then - begin - GridView.Controller.DesignController.SelectObject(GetDesignObject, not (ssShift in AShift)); - Result := True; - end - else - if GridView.Controller.MayDataDrillDown then - GridView.ActiveDataLevel := DataLevel; -end; - -procedure TcxGridChartToolBoxDataLevelInfoViewInfo.Paint(ACanvas: TcxCanvas); -begin - if FActiveValueViewInfo <> nil then - FActiveValueViewInfo.Paint(ACanvas); - inherited; -end; - -{ TcxGridChartToolBoxCustomizeButtonViewInfo } - -function TcxGridChartToolBoxCustomizeButtonViewInfo.GetChecked: Boolean; -begin - Result := GridView.Controller.Customization; -end; - -procedure TcxGridChartToolBoxCustomizeButtonViewInfo.SetChecked(Value: Boolean); -begin - GridView.Controller.Customization := Value; -end; - -function TcxGridChartToolBoxCustomizeButtonViewInfo.CalculateHeight: Integer; -begin - Result := BorderWidth[bTop] + 2 * LookAndFeelPainter.ButtonTextOffset + - TextHeightWithOffset + BorderWidth[bBottom]; -end; - -function TcxGridChartToolBoxCustomizeButtonViewInfo.CalculateWidth: Integer; -begin - Result := BorderWidth[bLeft] + 2 * LookAndFeelPainter.ButtonTextOffset + - TextWidthWithOffset + BorderWidth[bRight]; -end; - -function TcxGridChartToolBoxCustomizeButtonViewInfo.CaptureMouseOnPress: Boolean; -begin - Result := True; -end; - -procedure TcxGridChartToolBoxCustomizeButtonViewInfo.Click; -begin - inherited; - Checked := not Checked; -end; - -function TcxGridChartToolBoxCustomizeButtonViewInfo.GetActualState: TcxGridCellState; -begin - if Checked then - Result := gcsPressed - else - Result := inherited GetActualState; -end; - -function TcxGridChartToolBoxCustomizeButtonViewInfo.GetBorders: TcxBorders; -begin - Result := cxBordersAll; -end; - -function TcxGridChartToolBoxCustomizeButtonViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := LookAndFeelPainter.ButtonBorderSize; -end; - -function TcxGridChartToolBoxCustomizeButtonViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartCustomizeButtonHitTest; -end; - -function TcxGridChartToolBoxCustomizeButtonViewInfo.GetHotTrack: Boolean; -begin - Result := True; -end; - -function TcxGridChartToolBoxCustomizeButtonViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartToolBoxCustomizeButtonPainter; -end; - -function TcxGridChartToolBoxCustomizeButtonViewInfo.GetText: string; -begin - Result := cxGetResourceString(@scxGridChartToolBoxCustomizeButtonCaption); -end; - -function TcxGridChartToolBoxCustomizeButtonViewInfo.HasBackground: Boolean; -begin - Result := False; -end; - -{ TcxGridChartToolBoxDiagramSelectorViewInfo } - -constructor TcxGridChartToolBoxDiagramSelectorViewInfo.Create(AContainer: TcxGridChartToolBoxViewInfo; - AAlignment: TcxGridChartToolBoxItemAlignment); -begin - inherited; - FCanShowDropDownWindow := CalculateCanShowDropDownWindow; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetDropDownWindowValue: TcxGridChartDiagramSelectorPopup; -begin - Result := TcxGridChartDiagramSelectorPopup(inherited DropDownWindow); -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.CalculateHeight: Integer; -begin - Result := Max(ImageHeight, TextHeightWithOffset); -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.CalculateWidth: Integer; -begin - Result := ImageWidth + ToolBoxDiagramImageOffset + TextWidthWithOffset; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartDiagramSelectorHitTest; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetImageBounds: TRect; -begin - Result := ContentBounds; - Result.Right := Result.Left + ImageWidth; - AlignRect(Result, 0, ImageHeight, False, cpaCenter); -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetImageHeight: Integer; -begin - Result := cxGridChartDiagramImages.Height; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetImageIndex: Integer; -begin - if GridView.ActiveDiagram = nil then - Result := -1 - else - Result := GridView.ActiveDiagram.ImageIndex; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetImageWidth: Integer; -begin - Result := cxGridChartDiagramImages.Width; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartToolBoxDiagramSelectorPainter; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetText: string; -begin - if GridView.ActiveDiagram = nil then - Result := cxGetResourceString(@scxGridChartNoneDiagramDisplayText) - else - Result := GridView.ActiveDiagram.DisplayText; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetTextAreaBounds: TRect; -begin - Result := inherited GetTextAreaBounds; - Inc(Result.Left, ImageWidth + ToolBoxDiagramImageOffset); -end; - -procedure TcxGridChartToolBoxDiagramSelectorViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetViewParams(vsDiagramSelector, nil, nil, AParams); -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.HasBackground: Boolean; -begin - Result := False; -end; - -procedure TcxGridChartToolBoxDiagramSelectorViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - TcxGridChartDiagramSelectorHitTest(AHitTest).CanDropDown := CanShowDropDownWindow; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.CalculateCanShowDropDownWindow: Boolean; -begin - Result := GridView.AvailableDiagramCount > 1; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.DropDownWindowExists: Boolean; -begin - Result := CanShowDropDownWindow and GridView.Controller.HasDiagramSelectorPopup; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetDropDownWindow: TcxCustomGridPopup; -begin - if CanShowDropDownWindow then - Result := GridView.Controller.DiagramSelectorPopup - else - Result := nil; -end; - -function TcxGridChartToolBoxDiagramSelectorViewInfo.GetDropDownWindowOwnerBounds: TRect; -begin - Result := Bounds; - Dec(Result.Left, DropDownWindow.BorderWidths[bLeft] + DropDownWindow.ImageOffset); -end; - -{ TcxGridChartToolBoxViewInfo } - -constructor TcxGridChartToolBoxViewInfo.Create(AGridViewInfo: TcxCustomGridViewInfo); -begin - inherited; - FDataLevelInfos := TList.Create; - FItems := TList.Create; - CreateItems; -end; - -destructor TcxGridChartToolBoxViewInfo.Destroy; -var - I: Integer; -begin - for I := 0 to Count - 1 do Items[I].Free; - FItems.Free; - FDataLevelInfos.Free; - inherited; -end; - -function TcxGridChartToolBoxViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridChartToolBoxViewInfo.GetDataLevelInfoConnectorCount: Integer; -begin - Result := DataLevelInfoCount - 1; -end; - -function TcxGridChartToolBoxViewInfo.GetDataLevelInfo(AIndex: Integer): TcxGridChartToolBoxDataLevelInfoViewInfo; -begin - Result := TcxGridChartToolBoxDataLevelInfoViewInfo(FDataLevelInfos[AIndex]); -end; - -function TcxGridChartToolBoxViewInfo.GetDataLevelInfoCount: Integer; -begin - Result := FDataLevelInfos.Count; -end; - -function TcxGridChartToolBoxViewInfo.GetItem(AIndex: Integer): TcxGridChartToolBoxItemViewInfo; -begin - Result := TcxGridChartToolBoxItemViewInfo(FItems[AIndex]); -end; - -function TcxGridChartToolBoxViewInfo.CalculateHeight: Integer; -var - I: Integer; -begin - CalculateParams; - Result := 0; - for I := 0 to Count - 1 do - Result := Max(Result, Items[I].CalculateHeight); - Inc(Result, BorderSize[bTop] + 2 * ToolBoxItemOffset + BorderSize[bBottom]); -end; - -function TcxGridChartToolBoxViewInfo.CalculateWidth: Integer; -begin - Result := 0; -end; - -function TcxGridChartToolBoxViewInfo.CalculateContentBounds: TRect; -begin - Result := inherited CalculateContentBounds; - InflateRect(Result, -ToolBoxItemOffset, -ToolBoxItemOffset); -end; - -procedure TcxGridChartToolBoxViewInfo.CalculateItems; - - function GetItemBounds(AItem: TcxGridChartToolBoxItemViewInfo; var ARestSpace: TRect): TRect; - begin - PositionRect(Result, ARestSpace, AItem.CalculateWidth, 0, ToolBoxItemOffset, - AItem.Alignment); - if IsSeparator(AItem) then - begin - Result.Top := ClientBounds.Top; - Result.Bottom := ClientBounds.Bottom; - end - else - AlignRect(Result, 0, AItem.CalculateHeight, False, cpaCenter); - end; - -var - ARestSpace, R: TRect; - I, J, ARestWidth, AOffset: Integer; - AItem: TcxGridChartToolBoxItemViewInfo; -begin - ARestSpace := ItemsAreaBounds; - for I := 0 to Count - 1 do - begin - AItem := Items[I]; - if AItem.Alignment = cppLeft then - AItem.Calculate(GetItemBounds(AItem, ARestSpace)); - end; - for I := Count - 1 downto 0 do - begin - AItem := Items[I]; - if AItem.Alignment = cppRight then - begin - R := GetItemBounds(AItem, ARestSpace); - ARestWidth := ARestSpace.Right - ARestSpace.Left + ToolBoxItemOffset; - if ARestWidth < 0 then - begin - AOffset := -ARestWidth; - Inc(ARestSpace.Right, AOffset); - OffsetRect(R, AOffset, 0); - for J := I + 1 to Count - 1 do - if Items[J].Alignment = cppRight then - Items[J].Offset(AOffset, 0); - end; - AItem.Calculate(R); - end; - end; -end; - -function TcxGridChartToolBoxViewInfo.GetAlignment: TcxGridChartPartAlignment; -begin - Result := cpaDefault; -end; - -function TcxGridChartToolBoxViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridChartToolBoxViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := Params.TextColor; -end; - -function TcxGridChartToolBoxViewInfo.GetBorders: TcxBorders; -begin - if GridView.ToolBox.Border = tbSingle then - Result := cxBordersAll - else - Result := []; -end; - -function TcxGridChartToolBoxViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := 1; -end; - -function TcxGridChartToolBoxViewInfo.GetDataGroupInsertionAreaBounds: TRect; -begin - Result := ClientBounds; - if GetFirstSeparator <> nil then - Result.Right := GetFirstSeparator.Bounds.Left; -end; - -function TcxGridChartToolBoxViewInfo.GetDataLevelInfoConnector(AIndex: Integer): TRect; -begin - Result := DataLevelInfos[AIndex].Bounds; - Result.Left := Result.Right; - Result.Right := DataLevelInfos[AIndex + 1].Bounds.Left; - Result.Top := (Result.Top + Result.Bottom - ToolBoxDataLevelInfoConnectorWidth) div 2; - Result.Bottom := Result.Top + ToolBoxDataLevelInfoConnectorWidth; -end; - -function TcxGridChartToolBoxViewInfo.GetDataLevelInfoConnectorColor: TColor; -begin - Result := LookAndFeelPainter.DefaultChartToolBoxDataLevelInfoBorderColor; -end; - -function TcxGridChartToolBoxViewInfo.GetFirstSeparator: TcxGridChartToolBoxItemViewInfo; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if IsSeparator(Result) then Exit; - end; - Result := nil; -end; - -function TcxGridChartToolBoxViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartToolBoxHitTest; -end; - -function TcxGridChartToolBoxViewInfo.GetItemsAreaBounds: TRect; -begin - Result := ContentBounds; - if Text <> '' then - Inc(Result.Left, TextWidthWithOffset + ToolBoxItemOffset); -end; - -function TcxGridChartToolBoxViewInfo.GetOrientation: TcxGridChartPartOrientation; -begin - Result := cpoHorizontal; -end; - -function TcxGridChartToolBoxViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridChartToolBoxPainter; -end; - -function TcxGridChartToolBoxViewInfo.GetPosition: TcxGridChartPartPosition; -begin - if GridView.ToolBox.Position = tpTop then - Result := cppTop - else - Result := cppBottom; -end; - -function TcxGridChartToolBoxViewInfo.GetText: string; -begin - if IsDataLevelsInfoVisible then - Result := cxGetResourceString(@scxGridChartToolBoxDataLevels) - else - Result := ''; -end; - -procedure TcxGridChartToolBoxViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetViewParams(vsToolBox, nil, nil, AParams); -end; - -function TcxGridChartToolBoxViewInfo.GetVisible: Boolean; -begin - Result := GridView.ToolBox.GetVisible; -end; - -function TcxGridChartToolBoxViewInfo.AddItem(AItem: TcxGridChartToolBoxItemViewInfo): TcxGridChartToolBoxItemViewInfo; -begin - Result := AItem; - FItems.Add(AItem); -end; - -procedure TcxGridChartToolBoxViewInfo.AddSeparator(AAlignment: TcxGridChartToolBoxItemAlignment); -begin - if Count <> 0 then - AddItem(GetItemSeparatorClass.Create(Self, AAlignment)); -end; - -procedure TcxGridChartToolBoxViewInfo.CreateItems; -var - I: Integer; -begin - if IsDataLevelsInfoVisible then - for I := 0 to GridView.DataLevelCount - 1 do - FDataLevelInfos.Add(AddItem(GetDataLevelInfoClass.Create(Self, cppLeft, I))); - if IsCustomizeButtonVisible then - begin - AddSeparator(cppRight); - FCustomizeButton := GetCustomizeButtonClass.Create(Self, cppRight); - AddItem(FCustomizeButton); - end; - if IsDiagramSelectorVisible then - begin - AddSeparator(cppRight); - FDiagramSelector := GetDiagramSelectorClass.Create(Self, cppRight); - AddItem(FDiagramSelector); - end; -end; - -function TcxGridChartToolBoxViewInfo.GetCustomizeButtonClass: TcxGridChartToolBoxCustomizeButtonViewInfoClass; -begin - Result := TcxGridChartToolBoxCustomizeButtonViewInfo; -end; - -function TcxGridChartToolBoxViewInfo.GetDataLevelInfoClass: TcxGridChartToolBoxDataLevelInfoViewInfoClass; -begin - Result := TcxGridChartToolBoxDataLevelInfoViewInfo; -end; - -function TcxGridChartToolBoxViewInfo.GetDiagramSelectorClass: TcxGridChartToolBoxDiagramSelectorViewInfoClass; -begin - Result := TcxGridChartToolBoxDiagramSelectorViewInfo; -end; - -function TcxGridChartToolBoxViewInfo.GetItemSeparatorClass: TcxGridChartToolBoxItemSeparatorViewInfoClass; -begin - Result := TcxGridChartToolBoxItemSeparatorViewInfo; -end; - -function TcxGridChartToolBoxViewInfo.IsCustomizeButtonVisible: Boolean; -begin - Result := not GridViewInfo.IsImage and GridView.ToolBox.CustomizeButton; -end; - -function TcxGridChartToolBoxViewInfo.IsDataLevelsInfoVisible: Boolean; -begin - Result := GridView.ToolBox.GetDataLevelsInfoVisible; -end; - -function TcxGridChartToolBoxViewInfo.IsDiagramSelectorVisible: Boolean; -begin - Result := not GridViewInfo.IsImage and GridView.ToolBox.DiagramSelector; -end; - -function TcxGridChartToolBoxViewInfo.IsSeparator(AItem: TcxGridChartToolBoxItemViewInfo): Boolean; -begin - Result := AItem is GetItemSeparatorClass; -end; - -procedure TcxGridChartToolBoxViewInfo.Calculate(ALeftBound, ATopBound, AWidth, - AHeight: Integer); -begin - inherited; - CalculateItems; -end; - -function TcxGridChartToolBoxViewInfo.GetDataGroupInsertionBounds(AIndex: Integer): TRect; -begin - if DataLevelInfoCount = 0 then - Result := ItemsAreaBounds - else - begin - Result := DataLevelInfos[AIndex].Bounds; - Dec(Result.Left, MulDiv(ToolBoxItemOffset, 1, 2)); - end; -end; - -function TcxGridChartToolBoxViewInfo.GetDataGroupInsertionIndex(const P: TPoint): Integer; -var - R: TRect; -begin - Result := -1; - if not PtInRect(GetDataGroupInsertionAreaBounds, P) then Exit; - for Result := 0 to DataLevelInfoCount - 1 do - if DataLevelInfos[Result].DataLevelObject <> nil then - begin - R := DataLevelInfos[Result].Bounds; - if P.X < GetRangeCenter(R.Left, R.Right) then Exit; - end; - Result := GridView.VisibleDataGroupCount; -end; - -function TcxGridChartToolBoxViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; - AHitTest: TcxCustomGridHitTest; -begin - Result := inherited GetHitTest(P); - if Result <> nil then - for I := 0 to Count - 1 do - begin - AHitTest := Items[I].GetHitTest(P); - if AHitTest <> nil then - begin - Result := AHitTest; - Break; - end; - end; -end; - -procedure TcxGridChartToolBoxViewInfo.InvalidateCustomizeButton; -begin - if CustomizeButton <> nil then - CustomizeButton.Invalidate; -end; - -{ TcxGridChartTitleViewInfo } - -function TcxGridChartTitleViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridChartTitleHitTest; -end; - -procedure TcxGridChartTitleViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetViewParams(vsTitle, nil, nil, AParams); -end; - -{ TcxGridChartViewInfo } - -function TcxGridChartViewInfo.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -procedure TcxGridChartViewInfo.CreateViewInfos; -var - ADiagram: TcxGridChartDiagram; -begin - inherited; - ADiagram := GridView.ActiveDiagram; - if ADiagram <> nil then - begin - FDiagramViewInfo := ADiagram.GetViewInfoClass.Create(Self, ADiagram); - FLegendViewInfo := ADiagram.GetLegendViewInfoClass.Create(Self, ADiagram); - end; - FTitleViewInfo := GetTitleViewInfoClass.Create(Self, GridView.Title); - FToolBoxViewInfo := GetToolBoxViewInfoClass.Create(Self); -end; - -procedure TcxGridChartViewInfo.DestroyViewInfos(AIsRecreating: Boolean); -begin - FreeAndNil(FToolBoxViewInfo); - FreeAndNil(FTitleViewInfo); - FreeAndNil(FLegendViewInfo); - FreeAndNil(FDiagramViewInfo); - inherited; -end; - -function TcxGridChartViewInfo.GetTitleViewInfoClass: TcxGridChartTitleViewInfoClass; -begin - Result := TcxGridChartTitleViewInfo; -end; - -function TcxGridChartViewInfo.GetToolBoxViewInfoClass: TcxGridChartToolBoxViewInfoClass; -begin - Result := TcxGridChartToolBoxViewInfo; -end; - -procedure TcxGridChartViewInfo.Calculate; -var - ADiagramBounds, ALegendBounds, ATitleBounds, AToolBoxBounds: TRect; -begin - RecreateViewInfos; - inherited; - CalculatePartsBounds(ADiagramBounds, ALegendBounds, ATitleBounds, AToolBoxBounds); - if FDiagramViewInfo <> nil then - FDiagramViewInfo.Calculate(ADiagramBounds); - if FLegendViewInfo <> nil then - FLegendViewInfo.Calculate(ALegendBounds); - FTitleViewInfo.Calculate(ATitleBounds); - if FToolBoxViewInfo.Visible then - FToolBoxViewInfo.Calculate(AToolBoxBounds); -end; - -function TcxGridChartViewInfo.CalculateClientBounds: TRect; -begin - Result := inherited CalculateClientBounds; - InflateRect(Result, -ChartPartOffset, -ChartPartOffset); -end; - -procedure TcxGridChartViewInfo.CalculateHeight(const AMaxSize: TPoint; - var AHeight: Integer; var AFullyVisible: Boolean); -begin - AHeight := MaxInt div 2; - AFullyVisible := False; - inherited; -end; - -procedure TcxGridChartViewInfo.CalculatePartBounds(APart: TcxCustomGridChartPartViewInfo; - var ABounds, APartBounds: TRect); -begin - if APart.Visible then - begin - PositionRect(APartBounds, ABounds, APart.Width, APart.Height, ChartPartOffset, APart.Position); - AlignRect(APartBounds, APart.Width, APart.Height, - APart.Position in [cppTop, cppBottom], APart.Alignment); - end - else - SetRectEmpty(APartBounds); -end; - -procedure TcxGridChartViewInfo.CalculatePartsBounds(out ADiagramBounds, ALegendBounds, - ATitleBounds, AToolBoxBounds: TRect); -begin - ADiagramBounds := ClientBounds; - CalculatePartBounds(FToolBoxViewInfo, ADiagramBounds, AToolBoxBounds); - CalculatePartBounds(FTitleViewInfo, ADiagramBounds, ATitleBounds); - if FLegendViewInfo <> nil then - CalculatePartBounds(FLegendViewInfo, ADiagramBounds, ALegendBounds); -end; - -function TcxGridChartViewInfo.DoGetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - if FDiagramViewInfo <> nil then - Result := FDiagramViewInfo.GetHitTest(P) - else - Result := nil; - if Result = nil then - begin - Result := FToolBoxViewInfo.GetHitTest(P); - if Result = nil then - begin - if FLegendViewInfo <> nil then - Result := FLegendViewInfo.GetHitTest(P); - if Result = nil then - begin - Result := FTitleViewInfo.GetHitTest(P); - if Result = nil then - Result := inherited DoGetHitTest(P); - end; - end; - end; -end; - -{ TcxCustomGridChartTitle } - -procedure TcxCustomGridChartTitle.SetAlignment(Value: TcxGridChartPartAlignment); -begin - if FAlignment <> Value then - begin - FAlignment := Value; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridChartTitle.SetPosition(Value: TcxGridChartPartPosition); -begin - if FPosition <> Value then - begin - FPosition := Value; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridChartTitle.SetText(Value: string); -begin - if FText <> Value then - begin - FText := Value; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridChartTitle.GetStoredProperties(AProperties: TStrings); -begin - AProperties.Add('Title.Alignment'); - AProperties.Add('Title.Position'); - inherited; -end; - -procedure TcxCustomGridChartTitle.GetStoredPropertyValue(const AName: string; - var AValue: Variant); -begin - if AName = 'Title.Alignment' then - AValue := Variant(Alignment) - else - if AName = 'Title.Position' then - AValue := Variant(Position); - inherited; -end; - -procedure TcxCustomGridChartTitle.SetStoredPropertyValue(const AName: string; - const AValue: Variant); -begin - if AName = 'Title.Alignment' then - Alignment := TcxGridChartPartAlignment((AValue)) - else - if AName = 'Title.Position' then - Position := TcxGridChartPartPosition((AValue)); - inherited; -end; - -function TcxCustomGridChartTitle.GetDefaultAlignment: TcxGridChartPartAlignment; -begin - Result := cpaCenter; -end; - -function TcxCustomGridChartTitle.GetDefaultOrientation: TcxGridChartPartOrientation; -begin - if GetPosition in [cppTop, cppBottom] then - Result := cpoHorizontal - else - Result := cpoVertical; -end; - -function TcxCustomGridChartTitle.GetDefaultText: string; -begin - Result := ''; -end; - -procedure TcxCustomGridChartTitle.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridChartTitle then - with TcxCustomGridChartTitle(Source) do - begin - Self.Alignment := Alignment; - Self.Position := Position; - Self.Text := Text; - end; - inherited; -end; - -function TcxCustomGridChartTitle.GetAlignment: TcxGridChartPartAlignment; -begin - Result := FAlignment; - if Result = cpaDefault then - Result := GetDefaultAlignment; -end; - -function TcxCustomGridChartTitle.GetOrientation: TcxGridChartPartOrientation; -begin - Result := GetDefaultOrientation; -end; - -function TcxCustomGridChartTitle.GetPosition: TcxGridChartPartPosition; -begin - if GetText = '' then - Result := cppNone - else - begin - Result := FPosition; - if Result = cppDefault then - Result := GetDefaultPosition; - end; -end; - -function TcxCustomGridChartTitle.GetText: string; -begin - Result := FText; - if Result = '' then - Result := GetDefaultText; -end; - -{ TcxGridChartLegend } - -procedure TcxGridChartLegend.SetAlignment(Value: TcxGridChartPartAlignment); -begin - if FAlignment <> Value then - begin - FAlignment := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartLegend.SetBorder(Value: TcxGridChartLegendBorder); -begin - if FBorder <> Value then - begin - FBorder := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartLegend.SetKeyBorder(Value: TcxGridChartLegendBorder); -begin - if FKeyBorder <> Value then - begin - FKeyBorder := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartLegend.SetOrientation(Value: TcxGridChartPartOrientation); -begin - if FOrientation <> Value then - begin - FOrientation := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartLegend.SetPosition(Value: TcxGridChartPartPosition); -begin - if FPosition <> Value then - begin - FPosition := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartLegend.GetStoredProperties(AProperties: TStrings); -begin - AProperties.Add('Legend.Alignment'); - AProperties.Add('Legend.Border'); - AProperties.Add('Legend.KeyBorder'); - AProperties.Add('Legend.Orientation'); - AProperties.Add('Legend.Position'); - inherited; -end; - -procedure TcxGridChartLegend.GetStoredPropertyValue(const AName: string; - var AValue: Variant); -begin - if AName = 'Legend.Alignment' then - AValue := Variant(Alignment) - else - if AName = 'Legend.Border' then - AValue := Variant(Border) - else - if AName = 'Legend.KeyBorder' then - AValue := Variant(KeyBorder) - else - if AName = 'Legend.Orientation' then - AValue := Variant(Orientation) - else - if AName = 'Legend.Position' then - AValue := Variant(Position); - inherited; -end; - -procedure TcxGridChartLegend.SetStoredPropertyValue(const AName: string; - const AValue: Variant); -begin - if AName = 'Legend.Alignment' then - Alignment := TcxGridChartPartAlignment((AValue)) - else - if AName = 'Legend.Border' then - Border := TcxGridChartLegendBorder((AValue)) - else - if AName = 'Legend.KeyBorder' then - KeyBorder := TcxGridChartLegendBorder((AValue)) - else - if AName = 'Legend.Orientation' then - Orientation := TcxGridChartPartOrientation((AValue)) - else - if AName = 'Legend.Position' then - Position := TcxGridChartPartPosition((AValue)); - inherited; -end; - -function TcxGridChartLegend.GetDefaultAlignment: TcxGridChartPartAlignment; -begin - Result := cpaCenter; -end; - -function TcxGridChartLegend.GetDefaultBorder: TcxGridChartLegendBorder; -begin - Result := lbNone; -end; - -function TcxGridChartLegend.GetDefaultKeyBorder: TcxGridChartLegendBorder; -begin - Result := lbSingle; -end; - -function TcxGridChartLegend.GetDefaultOrientation(APosition: TcxGridChartPartPosition): TcxGridChartPartOrientation; -begin - if APosition in [cppTop, cppBottom] then - Result := cpoHorizontal - else - Result := cpoVertical; -end; - -function TcxGridChartLegend.GetDefaultPosition: TcxGridChartPartPosition; -begin - Result := cppRight; -end; - -procedure TcxGridChartLegend.Assign(Source: TPersistent); -begin - if Source is TcxGridChartLegend then - with TcxGridChartLegend(Source) do - begin - Self.Alignment := Alignment; - Self.Border := Border; - Self.KeyBorder := KeyBorder; - Self.Orientation := Orientation; - Self.Position := Position; - end; - inherited; -end; - -function TcxGridChartLegend.GetAlignment: TcxGridChartPartAlignment; -begin - Result := FAlignment; - if Result = cpaDefault then - if Parent = nil then - Result := GetDefaultAlignment - else - Result := Parent.GetAlignment; -end; - -function TcxGridChartLegend.GetBorder: TcxGridChartLegendBorder; -begin - Result := FBorder; - if Result = lbDefault then - if Parent = nil then - Result := GetDefaultBorder - else - Result := Parent.GetBorder; -end; - -function TcxGridChartLegend.GetKeyBorder: TcxGridChartLegendBorder; -begin - Result := FKeyBorder; - if Result = lbDefault then - if Parent = nil then - Result := GetDefaultKeyBorder - else - Result := Parent.GetKeyBorder; -end; - -function TcxGridChartLegend.GetOrientation(APosition: TcxGridChartPartPosition = cppDefault): TcxGridChartPartOrientation; -begin - Result := FOrientation; - if Result = cpoDefault then - if Parent = nil then - Result := GetDefaultOrientation(APosition) - else - begin - if APosition = cppDefault then - APosition := GetPosition; - Result := Parent.GetOrientation(APosition); - end; -end; - -function TcxGridChartLegend.GetPosition: TcxGridChartPartPosition; -begin - Result := FPosition; - if Result = cppDefault then - if Parent = nil then - Result := GetDefaultPosition - else - Result := Parent.GetPosition; -end; - -{ TcxCustomGridChartDiagramOptions } - -constructor TcxCustomGridChartDiagramOptions.Create(ADiagram: TcxGridChartDiagram); -begin - inherited Create; - FDiagram := ADiagram; -end; - -function TcxCustomGridChartDiagramOptions.GetGridView: TcxGridChartView; -begin - Result := FDiagram.GridView; -end; - -function TcxCustomGridChartDiagramOptions.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := FDiagram.GridView.LookAndFeelPainter; -end; - -procedure TcxCustomGridChartDiagramOptions.Changed(AChange: TcxGridDiagramChange = dcLayout); -begin - FDiagram.Changed(AChange); -end; - -procedure TcxCustomGridChartDiagramOptions.Assign(Source: TPersistent); -begin - if not (Source is TcxCustomGridChartDiagramOptions) then - inherited; -end; - -{ TcxGridChartDiagramValueData } - -type - TcxGridChartDiagramValueData = class - ValueIndex: Integer; - VisibleSeriesIndex: Integer; - end; - -{ TcxGridChartDiagramStyles } - -constructor TcxGridChartDiagramStyles.Create(AOwner: TPersistent); -begin - inherited; - BitmapInViewParams := True; -end; - -function TcxGridChartDiagramStyles.GetDiagram: TcxGridChartDiagram; -begin - Result := TcxGridChartDiagram(Owner); -end; - -function TcxGridChartDiagramStyles.GetGridViewValue: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -procedure TcxGridChartDiagramStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - inherited; - with AParams, LookAndFeelPainter do - case Index of - dsLegend: - GridView.Styles.GetViewParams(vsLegend, AData, nil, AParams); - dsValueCaptions: - TextColor := DefaultChartDiagramValueCaptionTextColor; - dsValues: - with TcxGridChartDiagramValueData(AData) do - if VisibleSeriesIndex <> -1 then - GridView.VisibleSeries[VisibleSeriesIndex].Styles.GetValueParams(ValueIndex, - GetVaryColorsByCategory, AParams) - else - begin - Color := GetDefaultValueColor(ValueIndex); - TextColor := DefaultChartDiagramValueBorderColor; - end; - end; -end; - -function TcxGridChartDiagramStyles.GetGridView: TcxCustomGridView; -begin - Result := Diagram.GridView; -end; - -procedure TcxGridChartDiagramStyles.GetBackgroundParams(out AParams: TcxViewParams); -begin - GridView.Styles.GetViewParams(vsBackground, nil, nil, AParams); -end; - -procedure TcxGridChartDiagramStyles.GetValueParams(AVisibleSeriesIndex, AValueIndex: Integer; - out AParams: TcxViewParams); -var - AData: TcxGridChartDiagramValueData; -begin - AData := TcxGridChartDiagramValueData.Create; - try - AData.VisibleSeriesIndex := AVisibleSeriesIndex; - AData.ValueIndex := AValueIndex; - GetViewParams(dsValues, AData, nil, AParams); - finally - AData.Free; - end; -end; - -procedure TcxGridChartDiagramStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartDiagramStyles then - with TcxGridChartDiagramStyles(Source) do - begin - Self.Legend := Legend; - Self.ValueCaptions := ValueCaptions; - Self.Values := Values; - end; -end; - -{ TcxGridChartDiagram } - -constructor TcxGridChartDiagram.Create(AGridView: TcxGridChartView); -begin - inherited Create; - FEnabled := True; - CreateSubObjects(AGridView); - AGridView.AddDiagram(Self); -end; - -destructor TcxGridChartDiagram.Destroy; -begin - FGridView.RemoveDiagram(Self); - DestroySubObjects; - inherited; -end; - -function TcxGridChartDiagram.GetActive: Boolean; -begin - Result := FGridView.ActiveDiagram = Self; -end; - -function TcxGridChartDiagram.GetID: string; -begin - Result := ClassName; - Delete(Result, 1, Length('TcxGridChart')); - Insert(' ', Result, Pos('Diagram', Result)); -end; - -procedure TcxGridChartDiagram.SetActive(Value: Boolean); -begin - if Value then - FGridView.ActiveDiagram := Self; -end; - -procedure TcxGridChartDiagram.SetEnabled(Value: Boolean); -begin - if FEnabled <> Value then - begin - FEnabled := Value; - FGridView.RefreshAvailableDiagramList; - if IsAvailable then - if FGridView.ActiveDiagram = nil then - Active := True - else - else - if Active then - FGridView.ActiveDiagram := nil; - Changed(dcLayout); - end; -end; - -procedure TcxGridChartDiagram.SetLegend(Value: TcxGridChartLegend); -begin - FLegend.Assign(Value); -end; - -procedure TcxGridChartDiagram.SetStyles(Value: TcxGridChartDiagramStyles); -begin - FStyles.Assign(Value); -end; - -procedure TcxGridChartDiagram.SetOnCustomDrawLegend(Value: TcxGridChartDiagramLegendCustomDrawEvent); -begin - if @FOnCustomDrawLegend <> @Value then - begin - FOnCustomDrawLegend := Value; - Changed(dcProperty); - end; -end; - -procedure TcxGridChartDiagram.SetOnCustomDrawLegendItem(Value: TcxGridChartDiagramLegendItemCustomDrawEvent); -begin - if @FOnCustomDrawLegendItem <> @Value then - begin - FOnCustomDrawLegendItem := Value; - Changed(dcProperty); - end; -end; - -procedure TcxGridChartDiagram.SetOnCustomDrawValue(Value: TcxGridChartDiagramValueCustomDrawEvent); -begin - if @FOnCustomDrawValue <> @Value then - begin - FOnCustomDrawValue := Value; - Changed(dcProperty); - end; -end; - -function TcxGridChartDiagram.GetOwner: TPersistent; -begin - Result := FGridView; -end; - -procedure TcxGridChartDiagram.CreateSubObjects(AGridView: TcxGridChartView); -begin - FLegend := AGridView.GetLegendClass.Create(AGridView); - FLegend.Parent := AGridView.Legend; - FStyles := GetStylesClass.Create(Self); -end; - -procedure TcxGridChartDiagram.DestroySubObjects; -begin - FreeAndNil(FStyles); - FreeAndNil(FLegend); -end; - -procedure TcxGridChartDiagram.SetGridView(Value: TcxGridChartView); -begin - FGridView := Value; -end; - -function TcxGridChartDiagram.GetStylesClass: TcxGridChartDiagramStylesClass; -begin - Result := TcxGridChartDiagramStyles; -end; - -procedure TcxGridChartDiagram.Changed(AChange: TcxGridDiagramChange = dcLayout); -begin - //if FGridView <> nil then - FGridView.Changed(TcxGridViewChangeKind(AChange)); -end; - -function TcxGridChartDiagram.GetDisplayText: string; -begin - Result := ID; -end; - -function TcxGridChartDiagram.GetImageIndex: Integer; -begin - Result := -1; -end; - -function TcxGridChartDiagram.HorizontalPaging: Boolean; -begin - Result := True; -end; - -function TcxGridChartDiagram.PagingInOppositeDirection: Boolean; -begin - Result := False; -end; - -function TcxGridChartDiagram.SupportsPaging: Boolean; -begin - Result := False; -end; - -function TcxGridChartDiagram.SupportsValueHotTrack: Boolean; -begin - Result := True; -end; - -procedure TcxGridChartDiagram.DoCustomDrawLegend(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartLegendViewInfo; var ADone: Boolean); -begin - if HasCustomDrawLegend then - FOnCustomDrawLegend(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridChartDiagram.DoCustomDrawLegendItem(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartLegendItemViewInfo; var ADone: Boolean); -begin - if HasCustomDrawLegendItem then - FOnCustomDrawLegendItem(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridChartDiagram.DoCustomDrawValue(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartDiagramValueViewInfo; var ADone: Boolean); -begin - if HasCustomDrawValue then - FOnCustomDrawValue(Self, ACanvas, AViewInfo, ADone); -end; - -function TcxGridChartDiagram.HasCustomDrawLegend: Boolean; -begin - Result := Assigned(FOnCustomDrawLegend); -end; - -function TcxGridChartDiagram.HasCustomDrawLegendItem: Boolean; -begin - Result := Assigned(FOnCustomDrawLegendItem); -end; - -function TcxGridChartDiagram.HasCustomDrawValue: Boolean; -begin - Result := Assigned(FOnCustomDrawValue); -end; - -procedure TcxGridChartDiagram.Assign(Source: TPersistent); -begin - if Source is TcxGridChartDiagram then - with TcxGridChartDiagram(Source) do - begin - Self.Enabled := Enabled; // must be assigned before Active - Self.Active := Active; - Self.Legend := Legend; - Self.Styles := Styles; - Self.OnCustomDrawLegend := OnCustomDrawLegend; - Self.OnCustomDrawLegendItem := OnCustomDrawLegendItem; - Self.OnCustomDrawValue := OnCustomDrawValue; - end - else - inherited; -end; - -function TcxGridChartDiagram.GetNamePath: string; -begin - Result := FGridView.GetDiagramNamePath(Self); -end; - -function TcxGridChartDiagram.GetValueCaption(ASeries: TcxGridChartSeries; - AValueIndex: Integer): string; -begin - Result := ASeries.VisibleDisplayTexts[AValueIndex]; -end; - -function TcxGridChartDiagram.IsAvailable: Boolean; -begin - Result := FEnabled; -end; - -{ TcxGridChartHistogramAxisTitle } - -constructor TcxGridChartHistogramAxisTitle.Create(AAxis: TcxGridChartHistogramAxis); -begin - FAxis := AAxis; - inherited Create(nil); -end; - -function TcxGridChartHistogramAxisTitle.GetDefaultPosition: TcxGridChartPartPosition; -begin - Result := FAxis.GetPosition; -end; - -function TcxGridChartHistogramAxisTitle.GetDefaultText: string; -begin - Result := inherited GetDefaultText; - if Result = '' then - Result := FAxis.GetTitleDefaultText; -end; - -function TcxGridChartHistogramAxisTitle.GetGridViewValue: TcxCustomGridView; -begin - Result := FAxis.GridView; -end; - -{ TcxGridChartHistogramAxis } - -constructor TcxGridChartHistogramAxis.Create(ADiagram: TcxGridChartDiagram); -begin - inherited; - FGridLines := True; - FTickMarkKind := tmkOutside; - FTickMarkLabels := True; - FTitle := GetTitleClass.Create(Self); - FVisible := True; -end; - -destructor TcxGridChartHistogramAxis.Destroy; -begin - FreeAndNil(FTitle); - inherited; -end; - -function TcxGridChartHistogramAxis.GetDiagram: TcxGridChartHistogram; -begin - Result := TcxGridChartHistogram(inherited Diagram); -end; - -procedure TcxGridChartHistogramAxis.SetGridLines(Value: Boolean); -begin - if FGridLines <> Value then - begin - FGridLines := Value; - Changed; - end; -end; - -procedure TcxGridChartHistogramAxis.SetTickMarkKind(Value: TcxGridChartHistogramTickMarkKind); -begin - if FTickMarkKind <> Value then - begin - FTickMarkKind := Value; - Changed; - end; -end; - -procedure TcxGridChartHistogramAxis.SetTickMarkLabels(Value: Boolean); -begin - if FTickMarkLabels <> Value then - begin - FTickMarkLabels := Value; - Changed; - end; -end; - -procedure TcxGridChartHistogramAxis.SetTitle(Value: TcxGridChartHistogramAxisTitle); -begin - FTitle.Assign(Value); -end; - -procedure TcxGridChartHistogramAxis.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - FVisible := Value; - Changed; - end; -end; - -function TcxGridChartHistogramAxis.GetTitleClass: TcxGridChartHistogramAxisTitleClass; -begin - Result := TcxGridChartHistogramAxisTitle; -end; - -function TcxGridChartHistogramAxis.GetTitleDefaultText: string; -begin - Result := ''; -end; - -procedure TcxGridChartHistogramAxis.Assign(Source: TPersistent); -begin - if Source is TcxGridChartHistogramAxis then - with TcxGridChartHistogramAxis(Source) do - begin - Self.GridLines := GridLines; - Self.TickMarkKind := TickMarkKind; - Self.TickMarkLabels := TickMarkLabels; - Self.Title := Title; - Self.Visible := Visible; - end; - inherited; -end; - -{ TcxGridChartHistogramAxisCategory } - -constructor TcxGridChartHistogramAxisCategory.Create(ADiagram: TcxGridChartDiagram); -begin - inherited; - FValueAxisBetweenCategories := GetDefaultValueAxisBetweenCategories; -end; - -procedure TcxGridChartHistogramAxisCategory.SetCategoriesInReverseOrder(Value: Boolean); -begin - if FCategoriesInReverseOrder <> Value then - begin - FCategoriesInReverseOrder := Value; - Changed; - end; -end; - -procedure TcxGridChartHistogramAxisCategory.SetValueAxisAtMaxCategory(Value: Boolean); -begin - if FValueAxisAtMaxCategory <> Value then - begin - FValueAxisAtMaxCategory := Value; - Changed; - end; -end; - -procedure TcxGridChartHistogramAxisCategory.SetValueAxisBetweenCategories(Value: Boolean); -begin - if FValueAxisBetweenCategories <> Value then - begin - FValueAxisBetweenCategories := Value; - Changed; - end; -end; - -function TcxGridChartHistogramAxisCategory.GetDefaultValueAxisBetweenCategories: Boolean; -begin - Result := True; -end; - -function TcxGridChartHistogramAxisCategory.GetTitleDefaultText: string; -begin - Result := inherited GetTitleDefaultText; - if Result = '' then - if GridView.ViewData.IsSummaryLevel then - Result := GridView.ActiveDataGroup.DisplayText - else - Result := GridView.Categories.DisplayText; -end; - -procedure TcxGridChartHistogramAxisCategory.Assign(Source: TPersistent); -begin - if Source is TcxGridChartHistogramAxisCategory then - with TcxGridChartHistogramAxisCategory(Source) do - begin - Self.CategoriesInReverseOrder := CategoriesInReverseOrder; - Self.ValueAxisAtMaxCategory := ValueAxisAtMaxCategory; - Self.ValueAxisBetweenCategories := ValueAxisBetweenCategories; - end; - inherited; -end; - -function TcxGridChartHistogramAxisCategory.GetPosition: TcxGridChartAxisPosition; -begin - Result := Diagram.GetCategoryAxisPosition; -end; - -{ TcxGridChartHistogramAxisValue } - -procedure TcxGridChartHistogramAxisValue.SetMaxValue(const Value: Extended); -begin - if FMaxValue <> Value then - begin - FMaxValue := Value; - if not GridView.IsLoading and (FMaxValue <> 0) then - MinMaxValues := mmvCustom; - Changed; - end; -end; - -procedure TcxGridChartHistogramAxisValue.SetMinMaxValues(Value: TcxGridChartHistogramMinMaxValues); -begin - if FMinMaxValues <> Value then - begin - FMinMaxValues := Value; - Changed; - end; -end; - -procedure TcxGridChartHistogramAxisValue.SetMinValue(const Value: Extended); -begin - if FMinValue <> Value then - begin - FMinValue := Value; - if not GridView.IsLoading and (FMinValue <> 0) then - MinMaxValues := mmvCustom; - Changed; - end; -end; - -procedure TcxGridChartHistogramAxisValue.SetTickMarkLabelFormat(const Value: string); -begin - if FTickMarkLabelFormat <> Value then - begin - FTickMarkLabelFormat := Value; - Changed; - end; -end; - -function TcxGridChartHistogramAxisValue.GetTitleDefaultText: string; -begin - Result := inherited GetTitleDefaultText; - if (Result = '') and (GridView.VisibleSeriesCount = 1) then - Result := GridView.VisibleSeries[0].DisplayText; -end; - -procedure TcxGridChartHistogramAxisValue.Assign(Source: TPersistent); -begin - if Source is TcxGridChartHistogramAxisValue then - with TcxGridChartHistogramAxisValue(Source) do - begin - Self.MinValue := MinValue; - Self.MaxValue := MaxValue; - Self.MinMaxValues := MinMaxValues; // should be after Min/MaxValue - Self.TickMarkLabelFormat := TickMarkLabelFormat; - end; - inherited; -end; - -function TcxGridChartHistogramAxisValue.GetPosition: TcxGridChartAxisPosition; -begin - Result := Diagram.GetValueAxisPosition; -end; - -function TcxGridChartHistogramAxisValue.GetTickMarkLabel(const ATickMarkValue: Variant): string; -var - ATickMarkLabelFormat: string; -begin - ATickMarkLabelFormat := GetTickMarkLabelFormat(False); - if ATickMarkLabelFormat = '' then - case GridView.VisibleSeriesCount of - 0: Result := ATickMarkValue; - 1: Result := GridView.VisibleSeries[0].GetValueDisplayText(ATickMarkValue); - else - ATickMarkLabelFormat := GetTickMarkLabelFormat(True); - if ATickMarkLabelFormat = '' then - Result := GridView.VisibleSeries[0].DataBinding.GetValueDisplayText(ATickMarkValue) - else - Result := FormatFloat(ATickMarkLabelFormat, ATickMarkValue); - end - else - Result := FormatFloat(ATickMarkLabelFormat, ATickMarkValue); -end; - -function TcxGridChartHistogramAxisValue.GetTickMarkLabelFormat(AConsiderSeriesFormat: Boolean): string; -var - I: Integer; - AValueCaptionFormat: string; -begin - if Diagram.Values.Stacking = vs100Percent then - Result := cxGetResourceString(@scxGridChartPercentValueTickMarkLabelFormat) - else - begin - Result := TickMarkLabelFormat; - if (Result = '') and AConsiderSeriesFormat then - for I := 0 to GridView.VisibleSeriesCount - 1 do - begin - AValueCaptionFormat := GridView.VisibleSeries[I].ValueCaptionFormat; - if (I <> 0) and (AValueCaptionFormat <> Result) then - begin - Result := ''; - Break; - end; - Result := AValueCaptionFormat; - end; - end; -end; - -{ TcxGridChartHistogramStyles } - -procedure TcxGridChartHistogramStyles.GetDefaultViewParams(Index: Integer; - AData: TObject; out AParams: TcxViewParams); -begin - inherited; - with AParams, LookAndFeelPainter do - case Index of - dsAxis: - begin - Color := DefaultChartHistogramAxisColor; - TextColor := DefaultContentTextColor; - end; - dsCategoryAxis, dsValueAxis: - GetViewParams(dsAxis, nil, nil, AParams); - dsAxisTitle: - TextColor := DefaultContentTextColor; - dsCategoryAxisTitle, dsValueAxisTitle: - GetViewParams(dsAxisTitle, nil, nil, AParams); - dsGridLines: - Color := DefaultChartHistogramGridLineColor; - dsCategoryGridLines, dsValueGridLines: - GetViewParams(dsGridLines, nil, nil, AParams); - dsPlot: - Color := DefaultChartHistogramPlotColor; - end; -end; - -function TcxGridChartHistogramStyles.GetVaryColorsByCategory: Boolean; -begin - Result := TcxGridChartColumnDiagram(Diagram).Values.GetVaryColorsByCategory; -end; - -procedure TcxGridChartHistogramStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartHistogramStyles then - with TcxGridChartHistogramStyles(Source) do - begin - Self.Axis := Axis; - Self.AxisTitle := AxisTitle; - Self.CategoryAxis := CategoryAxis; - Self.CategoryAxisTitle := CategoryAxisTitle; - Self.CategoryGridLines := CategoryGridLines; - Self.GridLines := GridLines; - Self.Plot := Plot; - Self.ValueAxis := ValueAxis; - Self.ValueAxisTitle := ValueAxisTitle; - Self.ValueGridLines := ValueGridLines; - end; -end; - -{ TcxGridChartHistogramValues } - -procedure TcxGridChartHistogramValues.SetStacking(Value: TcxGridChartValuesStacking); -begin - if FStacking <> Value then - begin - FStacking := Value; - Changed; - end; -end; - -procedure TcxGridChartHistogramValues.SetVaryColorsByCategory(Value: Boolean); -begin - if FVaryColorsByCategory <> Value then - begin - FVaryColorsByCategory := Value; - Changed; - end; -end; - -procedure TcxGridChartHistogramValues.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartHistogramValues then - with TcxGridChartHistogramValues(Source) do - begin - Self.Stacking := Stacking; - Self.VaryColorsByCategory := VaryColorsByCategory; - end; -end; - -function TcxGridChartHistogramValues.GetVaryColorsByCategory: Boolean; -begin - Result := (GridView.VisibleSeriesCount = 1) and FVaryColorsByCategory; -end; - -{ TcxGridChartHistogram } - -function TcxGridChartHistogram.GetStyles: TcxGridChartHistogramStyles; -begin - Result := TcxGridChartHistogramStyles(inherited Styles); -end; - -procedure TcxGridChartHistogram.SetAxisCategory(Value: TcxGridChartHistogramAxisCategory); -begin - FAxisCategory.Assign(Value); -end; - -procedure TcxGridChartHistogram.SetAxisValue(Value: TcxGridChartHistogramAxisValue); -begin - FAxisValue.Assign(Value); -end; - -procedure TcxGridChartHistogram.SetStyles(Value: TcxGridChartHistogramStyles); -begin - inherited Styles := Value; -end; - -procedure TcxGridChartHistogram.SetValues(Value: TcxGridChartHistogramValues); -begin - FValues.Assign(Value); -end; - -procedure TcxGridChartHistogram.SetOnCustomDrawPlot(Value: TcxGridChartHistogramPlotCustomDrawEvent); -begin - if @FOnCustomDrawPlot <> @Value then - begin - FOnCustomDrawPlot := Value; - Changed(dcProperty); - end; -end; - -procedure TcxGridChartHistogram.CreateSubObjects(AGridView: TcxGridChartView); -begin - inherited; - FAxisCategory := GetAxisCategoryClass.Create(Self); - FAxisValue := GetAxisValueClass.Create(Self); - FValues := GetValuesClass.Create(Self); -end; - -procedure TcxGridChartHistogram.DestroySubObjects; -begin - FreeAndNil(FValues); - FreeAndNil(FAxisValue); - FreeAndNil(FAxisCategory); - inherited; -end; - -function TcxGridChartHistogram.GetAxisCategoryClass: TcxGridChartHistogramAxisCategoryClass; -begin - Result := TcxGridChartHistogramAxisCategory; -end; - -function TcxGridChartHistogram.GetAxisValueClass: TcxGridChartHistogramAxisValueClass; -begin - Result := TcxGridChartHistogramAxisValue; -end; - -function TcxGridChartHistogram.GetStylesClass: TcxGridChartDiagramStylesClass; -begin - Result := TcxGridChartHistogramStyles; -end; - -function TcxGridChartHistogram.GetValuesClass: TcxGridChartHistogramValuesClass; -begin - Result := TcxGridChartHistogramValues; -end; - -function TcxGridChartHistogram.GetLegendViewInfoClass: TcxGridChartLegendViewInfoClass; -begin - Result := TcxGridChartHistogramLegendViewInfo; -end; - -function TcxGridChartHistogram.PagingInOppositeDirection: Boolean; -begin - Result := AxisCategory.CategoriesInReverseOrder; -end; - -function TcxGridChartHistogram.SupportsPaging: Boolean; -begin - Result := True; -end; - -procedure TcxGridChartHistogram.DoCustomDrawPlot(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartHistogramViewInfo; const ABounds: TRect; var ADone: Boolean); -begin - if HasCustomDrawPlot then - FOnCustomDrawPlot(Self, ACanvas, AViewInfo, ABounds, ADone); -end; - -function TcxGridChartHistogram.HasCustomDrawPlot: Boolean; -begin - Result := Assigned(FOnCustomDrawPlot); -end; - -procedure TcxGridChartHistogram.Assign(Source: TPersistent); -begin - if Source is TcxGridChartHistogram then - with TcxGridChartHistogram(Source) do - begin - Self.AxisCategory := AxisCategory; - Self.AxisValue := AxisValue; - Self.Values := Values; - Self.OnCustomDrawPlot := OnCustomDrawPlot; - end; - inherited; -end; - -function TcxGridChartHistogram.GetCategoryAxisPosition: TcxGridChartAxisPosition; -begin - Result := cppBottom; -end; - -function TcxGridChartHistogram.GetValueAxisPosition: TcxGridChartAxisPosition; -begin - if AxisCategory.ValueAxisAtMaxCategory xor AxisCategory.CategoriesInReverseOrder then - Result := cppRight - else - Result := cppLeft; -end; - -{ TcxGridChartColumnDiagramValues } - -constructor TcxGridChartColumnDiagramValues.Create(ADiagram: TcxGridChartDiagram); -begin - inherited; - FBorderWidth := cxGridChartColumnDiagramDefaultBorderWidth; -end; - -procedure TcxGridChartColumnDiagramValues.SetBorderWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FBorderWidth <> Value then - begin - FBorderWidth := Value; - Changed; - end -end; - -procedure TcxGridChartColumnDiagramValues.SetCaptionPosition(Value: TcxGridChartColumnDiagramValueCaptionPosition); -begin - if FCaptionPosition <> Value then - begin - FCaptionPosition := Value; - Changed; - end; -end; - -procedure TcxGridChartColumnDiagramValues.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartColumnDiagramValues then - with TcxGridChartColumnDiagramValues(Source) do - begin - Self.BorderWidth := BorderWidth; - Self.CaptionPosition := CaptionPosition; - end; -end; - -{ TcxGridChartColumnDiagram } - -function TcxGridChartColumnDiagram.GetValues: TcxGridChartColumnDiagramValues; -begin - Result := TcxGridChartColumnDiagramValues(inherited Values); -end; - -procedure TcxGridChartColumnDiagram.SetValues(Value: TcxGridChartColumnDiagramValues); -begin - inherited Values := Value; -end; - -function TcxGridChartColumnDiagram.GetLegendViewInfoClass: TcxGridChartLegendViewInfoClass; -begin - Result := TcxGridChartColumnDiagramLegendViewInfo; -end; - -function TcxGridChartColumnDiagram.GetValuesClass: TcxGridChartHistogramValuesClass; -begin - Result := TcxGridChartColumnDiagramValues; -end; - -function TcxGridChartColumnDiagram.GetViewInfoClass: TcxGridChartDiagramViewInfoClass; -begin - Result := TcxGridChartColumnDiagramViewInfo; -end; - -function TcxGridChartColumnDiagram.GetDisplayText: string; -begin - Result := cxGetResourceString(@scxGridChartColumnDiagramDisplayText); -end; - -function TcxGridChartColumnDiagram.GetImageIndex: Integer; -begin - Result := 2; -end; - -{ TcxGridChartBarDiagram } - -function TcxGridChartBarDiagram.GetDisplayText: string; -begin - Result := cxGetResourceString(@scxGridChartBarDiagramDisplayText); -end; - -function TcxGridChartBarDiagram.GetImageIndex: Integer; -begin - Result := 1; -end; - -function TcxGridChartBarDiagram.HorizontalPaging: Boolean; -begin - Result := False; -end; - -function TcxGridChartBarDiagram.PagingInOppositeDirection: Boolean; -begin - Result := not inherited PagingInOppositeDirection; -end; - -function TcxGridChartBarDiagram.GetCategoryAxisPosition: TcxGridChartAxisPosition; -begin - Result := cppLeft; -end; - -function TcxGridChartBarDiagram.GetValueAxisPosition: TcxGridChartAxisPosition; -begin - if AxisCategory.ValueAxisAtMaxCategory xor AxisCategory.CategoriesInReverseOrder then - Result := cppTop - else - Result := cppBottom; -end; - -{ TcxGridChartLineDiagramAxisCategory } - -function TcxGridChartLineDiagramAxisCategory.GetDefaultValueAxisBetweenCategories: Boolean; -begin - Result := False; -end; - -{ TcxGridChartLineDiagramStyles } - -procedure TcxGridChartLineDiagramStyles.GetDefaultViewParams(Index: Integer; - AData: TObject; out AParams: TcxViewParams); -begin - inherited; - if Index = dsValueMarkers then - begin - with TcxGridChartDiagramValueData(AData) do - GetValueParams(VisibleSeriesIndex, ValueIndex, AParams); - if not ValueMarkerHasBorderByDefault then - AParams.TextColor := AParams.Color; - end; -end; - -function TcxGridChartLineDiagramStyles.ValueMarkerHasBorderByDefault: Boolean; -begin - Result := False; -end; - -procedure TcxGridChartLineDiagramStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartLineDiagramStyles then - ValueMarkers := TcxGridChartLineDiagramStyles(Source).ValueMarkers; -end; - -procedure TcxGridChartLineDiagramStyles.GetValueMarkerParams(AVisibleSeriesIndex, AValueIndex: Integer; - out AParams: TcxViewParams); -var - AData: TcxGridChartDiagramValueData; -begin - AData := TcxGridChartDiagramValueData.Create; - try - AData.VisibleSeriesIndex := AVisibleSeriesIndex; - AData.ValueIndex := AValueIndex; - GetViewParams(dsValueMarkers, AData, nil, AParams); - finally - AData.Free; - end; -end; - -{ TcxGridChartLineDiagramValues } - -constructor TcxGridChartLineDiagramValues.Create(ADiagram: TcxGridChartDiagram); -begin - inherited; - FHotSpotSize := cxGridChartLineDiagramDefaultHotSpotSize; - FLineStyle := clsSolid; - FLineWidth := cxGridChartLineDiagramDefaultLineWidth; - FMarkerSize := cxGridChartLineDiagramDefaultMarkerSize; -end; - -function TcxGridChartLineDiagramValues.GetDiagram: TcxGridChartLineDiagram; -begin - Result := TcxGridChartLineDiagram(inherited Diagram); -end; - -procedure TcxGridChartLineDiagramValues.SetCaptionPosition(Value: TcxGridChartLineDiagramValueCaptionPosition); -begin - if FCaptionPosition <> Value then - begin - FCaptionPosition := Value; - Changed; - end; -end; - -procedure TcxGridChartLineDiagramValues.SetHotSpotSize(Value: Integer); -begin - if Value < 0 then Value := 0; - if FHotSpotSize <> Value then - begin - FHotSpotSize := Value; - Changed; - end; -end; - -procedure TcxGridChartLineDiagramValues.SetLineStyle(Value: TcxGridChartLineStyle); -begin - if FLineStyle <> Value then - begin - FLineStyle := Value; - Changed; - end; -end; - -procedure TcxGridChartLineDiagramValues.SetLineWidth(Value: Integer); -begin - if Value < 1 then Value := 1; - if FLineWidth <> Value then - begin - FLineWidth := Value; - Changed; - end; -end; - -procedure TcxGridChartLineDiagramValues.SetMarkerSize(Value: Integer); -begin - if Value < 3 then Value := 3; - if FMarkerSize <> Value then - begin - FMarkerSize := Value; - Changed; - end; -end; - -procedure TcxGridChartLineDiagramValues.SetMarkerStyle(Value: TcxGridChartMarkerStyle); -begin - if FMarkerStyle <> Value then - begin - FMarkerStyle := Value; - Changed; - end; -end; - -procedure TcxGridChartLineDiagramValues.SetOnGetLineStyle(Value: TcxGridChartLineDiagramGetLineStyleEvent); -begin - if @FOnGetLineStyle <> @Value then - begin - FOnGetLineStyle := Value; - Changed(dcProperty); - end; -end; - -procedure TcxGridChartLineDiagramValues.SetOnGetMarkerStyle(Value: TcxGridChartLineDiagramGetMarkerStyleEvent); -begin - if @FOnGetMarkerStyle <> @Value then - begin - FOnGetMarkerStyle := Value; - Changed(dcProperty); - end; -end; - -procedure TcxGridChartLineDiagramValues.DoGetLineStyle(ASeries: TcxGridChartSeries; - var AStyle: TcxGridChartLineStyle); -begin - if Assigned(FOnGetLineStyle) then FOnGetLineStyle(Diagram, ASeries, AStyle); -end; - -procedure TcxGridChartLineDiagramValues.DoGetMarkerStyle(ASeries: TcxGridChartSeries; - var AStyle: TcxGridChartMarkerStyle); -begin - if Assigned(FOnGetMarkerStyle) then FOnGetMarkerStyle(Diagram, ASeries, AStyle); -end; - -procedure TcxGridChartLineDiagramValues.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartLineDiagramValues then - with TcxGridChartLineDiagramValues(Source) do - begin - Self.CaptionPosition := CaptionPosition; - Self.HotSpotSize := HotSpotSize; - Self.LineStyle := LineStyle; - Self.LineWidth := LineWidth; - Self.MarkerSize := MarkerSize; - Self.MarkerStyle := MarkerStyle; - Self.OnGetLineStyle := OnGetLineStyle; - Self.OnGetMarkerStyle := OnGetMarkerStyle; - end; -end; - -function TcxGridChartLineDiagramValues.GetHotSpotSize: Integer; -begin - Result := FHotSpotSize; - if MarkerStyle <> cmsNone then - Result := Max(Result, MarkerSize); -end; - -function TcxGridChartLineDiagramValues.GetLineStyle(ASeries: TcxGridChartSeries): TcxGridChartLineStyle; -begin - Result := FLineStyle; - DoGetLineStyle(ASeries, Result); -end; - -function TcxGridChartLineDiagramValues.GetMarkerStyle(ASeries: TcxGridChartSeries): TcxGridChartMarkerStyle; -begin - Result := FMarkerStyle; - DoGetMarkerStyle(ASeries, Result); -end; - -{ TcxGridChartLineDiagram } - -function TcxGridChartLineDiagram.GetAxisCategory: TcxGridChartLineDiagramAxisCategory; -begin - Result := TcxGridChartLineDiagramAxisCategory(inherited AxisCategory); -end; - -function TcxGridChartLineDiagram.GetStyles: TcxGridChartLineDiagramStyles; -begin - Result := TcxGridChartLineDiagramStyles(inherited Styles); -end; - -function TcxGridChartLineDiagram.GetValues: TcxGridChartLineDiagramValues; -begin - Result := TcxGridChartLineDiagramValues(inherited Values); -end; - -procedure TcxGridChartLineDiagram.SetAxisCategory(Value: TcxGridChartLineDiagramAxisCategory); -begin - inherited AxisCategory := Value; -end; - -procedure TcxGridChartLineDiagram.SetStyles(Value: TcxGridChartLineDiagramStyles); -begin - inherited Styles := Value; -end; - -procedure TcxGridChartLineDiagram.SetValues(Value: TcxGridChartLineDiagramValues); -begin - inherited Values := Value; -end; - -function TcxGridChartLineDiagram.GetAxisCategoryClass: TcxGridChartHistogramAxisCategoryClass; -begin - Result := TcxGridChartLineDiagramAxisCategory; -end; - -function TcxGridChartLineDiagram.GetLegendViewInfoClass: TcxGridChartLegendViewInfoClass; -begin - Result := TcxGridChartLineDiagramLegendViewInfo; -end; - -function TcxGridChartLineDiagram.GetStylesClass: TcxGridChartDiagramStylesClass; -begin - Result := TcxGridChartLineDiagramStyles; -end; - -function TcxGridChartLineDiagram.GetValuesClass: TcxGridChartHistogramValuesClass; -begin - Result := TcxGridChartLineDiagramValues; -end; - -function TcxGridChartLineDiagram.GetViewInfoClass: TcxGridChartDiagramViewInfoClass; -begin - Result := TcxGridChartLineDiagramViewInfo; -end; - -function TcxGridChartLineDiagram.GetDisplayText: string; -begin - Result := cxGetResourceString(@scxGridChartLineDiagramDisplayText); -end; - -function TcxGridChartLineDiagram.GetImageIndex: Integer; -begin - Result := 3; -end; - -function TcxGridChartLineDiagram.SupportsValueHotTrack: Boolean; -begin - Result := False; -end; - -{ TcxGridChartAreaDiagramStyles } - -function TcxGridChartAreaDiagramStyles.ValueMarkerHasBorderByDefault: Boolean; -begin - Result := True; -end; - -{ TcxGridChartAreaDiagram } - -function TcxGridChartAreaDiagram.GetStyles: TcxGridChartAreaDiagramStyles; -begin - Result := TcxGridChartAreaDiagramStyles(inherited Styles); -end; - -procedure TcxGridChartAreaDiagram.SetStyles(Value: TcxGridChartAreaDiagramStyles); -begin - inherited Styles := Value; -end; - -procedure TcxGridChartAreaDiagram.SetOnCustomDrawValueArea(Value: TcxGridChartAreaDiagramValueAreaCustomDrawEvent); -begin - if @FOnCustomDrawValueArea <> @Value then - begin - FOnCustomDrawValueArea := Value; - Changed(dcProperty); - end; -end; - -function TcxGridChartAreaDiagram.GetLegendViewInfoClass: TcxGridChartLegendViewInfoClass; -begin - Result := TcxGridChartAreaDiagramLegendViewInfo; -end; - -function TcxGridChartAreaDiagram.GetStylesClass: TcxGridChartDiagramStylesClass; -begin - Result := TcxGridChartAreaDiagramStyles; -end; - -function TcxGridChartAreaDiagram.GetViewInfoClass: TcxGridChartDiagramViewInfoClass; -begin - Result := TcxGridChartAreaDiagramViewInfo; -end; - -function TcxGridChartAreaDiagram.GetDisplayText: string; -begin - Result := cxGetResourceString(@scxGridChartAreaDiagramDisplayText); -end; - -function TcxGridChartAreaDiagram.GetImageIndex: Integer; -begin - Result := 0; -end; - -procedure TcxGridChartAreaDiagram.DoCustomDrawValueArea(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartAreaDiagramValueViewInfo; var ADone: Boolean); -begin - if HasCustomDrawValueArea then - FOnCustomDrawValueArea(Self, ACanvas, AViewInfo, ADone); -end; - -function TcxGridChartAreaDiagram.HasCustomDrawValueArea: Boolean; -begin - Result := Assigned(FOnCustomDrawValueArea); -end; - -procedure TcxGridChartAreaDiagram.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartAreaDiagram then - OnCustomDrawValueArea := TcxGridChartAreaDiagram(Source).OnCustomDrawValueArea; -end; - -{ TcxGridChartPieDiagramStyles } - -procedure TcxGridChartPieDiagramStyles.GetDefaultViewParams(Index: Integer; - AData: TObject; out AParams: TcxViewParams); -begin - inherited; - with AParams, LookAndFeelPainter do - case Index of - dsSeriesSiteCaptions: - begin - Color := DefaultChartPieDiagramSeriesSiteCaptionColor; - TextColor := DefaultChartPieDiagramSeriesSiteCaptionTextColor; - end; - dsSeriesSites: - begin - Color := DefaultContentColor; - TextColor := DefaultChartPieDiagramSeriesSiteBorderColor; - end; - end; -end; - -function TcxGridChartPieDiagramStyles.GetVaryColorsByCategory: Boolean; -begin - Result := True; -end; - -procedure TcxGridChartPieDiagramStyles.Assign(Source: TPersistent); -begin - if Source is TcxGridChartPieDiagramStyles then - with TcxGridChartPieDiagramStyles(Source) do - begin - Self.SeriesSiteCaptions := SeriesSiteCaptions; - Self.SeriesSites := SeriesSites; - end; - inherited; -end; - -{ TcxGridChartPieDiagramValues } - -constructor TcxGridChartPieDiagramValues.Create(ADiagram: TcxGridChartDiagram); -begin - inherited; - FCaptionItems := [pdvciValue]; -end; - -procedure TcxGridChartPieDiagramValues.SetAngleOfFirstSlice(Value: Integer); -begin - if Value < 0 then Value := 0; - if Value > 360 then Value := 360; - if FAngleOfFirstSlice <> Value then - begin - FAngleOfFirstSlice := Value; - Changed; - end; -end; - -procedure TcxGridChartPieDiagramValues.SetCaptionItems(Value: TcxGridChartPieDiagramValueCaptionItems); -begin - if FCaptionItems <> Value then - begin - FCaptionItems := Value; - Changed; - end; -end; - -procedure TcxGridChartPieDiagramValues.SetCaptionItemSeparator(const Value: string); -begin - if FCaptionItemSeparator <> Value then - begin - FCaptionItemSeparator := Value; - Changed; - end; -end; - -procedure TcxGridChartPieDiagramValues.SetCaptionPosition(Value: TcxGridChartPieDiagramValueCaptionPosition); -begin - if FCaptionPosition <> Value then - begin - FCaptionPosition := Value; - Changed; - end; -end; - -procedure TcxGridChartPieDiagramValues.SetPercentageCaptionFormat(const Value: string); -begin - if FPercentageCaptionFormat <> Value then - begin - FPercentageCaptionFormat := Value; - Changed; - end; -end; - -function TcxGridChartPieDiagramValues.GetDefaultCaptionItemSeparator: string; -begin - Result := '; '; -end; - -function TcxGridChartPieDiagramValues.GetDefaultPercentageCaptionFormat: string; -begin - Result := '0%'; -end; - -procedure TcxGridChartPieDiagramValues.Assign(Source: TPersistent); -begin - if Source is TcxGridChartPieDiagramValues then - with TcxGridChartPieDiagramValues(Source) do - begin - Self.AngleOfFirstSlice := AngleOfFirstSlice; - Self.CaptionItems := CaptionItems; - Self.CaptionItemSeparator := CaptionItemSeparator; - Self.CaptionPosition := CaptionPosition; - Self.PercentageCaptionFormat := PercentageCaptionFormat; - end; - inherited; -end; - -function TcxGridChartPieDiagramValues.GetCaptionItemSeparator: string; -begin - Result := FCaptionItemSeparator; - if Result = '' then - Result := GetDefaultCaptionItemSeparator; -end; - -function TcxGridChartPieDiagramValues.GetCaptionPosition: TcxGridChartPieDiagramValueCaptionPosition; -begin - if FCaptionItems = [] then - Result := pdvcpNone - else - Result := FCaptionPosition; -end; - -function TcxGridChartPieDiagramValues.GetPercentageCaptionFormat: string; -begin - Result := FPercentageCaptionFormat; - if Result = '' then - Result := GetDefaultPercentageCaptionFormat; -end; - -{ TcxGridChartPieDiagram } - -constructor TcxGridChartPieDiagram.Create(AGridView: TcxGridChartView); -begin - inherited; - FSeriesCaptions := True; -end; - -destructor TcxGridChartPieDiagram.Destroy; -begin - inherited; -end; - -function TcxGridChartPieDiagram.GetStyles: TcxGridChartPieDiagramStyles; -begin - Result := TcxGridChartPieDiagramStyles(inherited Styles); -end; - -procedure TcxGridChartPieDiagram.SetSeriesCaptions(Value: Boolean); -begin - if FSeriesCaptions <> Value then - begin - FSeriesCaptions := Value; - Changed; - end; -end; - -procedure TcxGridChartPieDiagram.SetSeriesColumnCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FSeriesColumnCount <> Value then - begin - FSeriesColumnCount := Value; - Changed; - end; -end; - -procedure TcxGridChartPieDiagram.SetSeriesSites(Value: Boolean); -begin - if FSeriesSites <> Value then - begin - FSeriesSites := Value; - Changed; - end; -end; - -procedure TcxGridChartPieDiagram.SetStyles(Value: TcxGridChartPieDiagramStyles); -begin - inherited Styles := Value; -end; - -procedure TcxGridChartPieDiagram.SetValues(Value: TcxGridChartPieDiagramValues); -begin - FValues.Assign(Value); -end; - -procedure TcxGridChartPieDiagram.SetOnCustomDrawSeriesSite(Value: TcxGridChartPieDiagramSeriesSiteCustomDrawEvent); -begin - if @FOnCustomDrawSeriesSite <> @Value then - begin - FOnCustomDrawSeriesSite := Value; - Changed(dcProperty); - end; -end; - -procedure TcxGridChartPieDiagram.SetOnCustomDrawSeriesSiteCaption(Value: TcxGridChartPieDiagramSeriesSiteCaptionCustomDrawEvent); -begin - if @FOnCustomDrawSeriesSiteCaption <> @Value then - begin - FOnCustomDrawSeriesSiteCaption := Value; - Changed(dcProperty); - end; -end; - -procedure TcxGridChartPieDiagram.CreateSubObjects(AGridView: TcxGridChartView); -begin - inherited; - FValues := GetValuesClass.Create(Self); -end; - -procedure TcxGridChartPieDiagram.DestroySubObjects; -begin - FreeAndNil(FValues); - inherited; -end; - -function TcxGridChartPieDiagram.GetStylesClass: TcxGridChartDiagramStylesClass; -begin - Result := TcxGridChartPieDiagramStyles; -end; - -function TcxGridChartPieDiagram.GetValuesClass: TcxGridChartPieDiagramValuesClass; -begin - Result := TcxGridChartPieDiagramValues; -end; - -function TcxGridChartPieDiagram.GetLegendViewInfoClass: TcxGridChartLegendViewInfoClass; -begin - Result := TcxGridChartPieDiagramLegendViewInfo; -end; - -function TcxGridChartPieDiagram.GetViewInfoClass: TcxGridChartDiagramViewInfoClass; -begin - Result := TcxGridChartPieDiagramViewInfo; -end; - -function TcxGridChartPieDiagram.GetDisplayText: string; -begin - Result := cxGetResourceString(@scxGridChartPieDiagramDisplayText); -end; - -function TcxGridChartPieDiagram.GetImageIndex: Integer; -begin - Result := 4; -end; - -procedure TcxGridChartPieDiagram.DoCustomDrawSeriesSite(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartPieSeriesSiteViewInfo; var ADone: Boolean); -begin - if HasCustomDrawSeriesSite then - FOnCustomDrawSeriesSite(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridChartPieDiagram.DoCustomDrawSeriesSiteCaption(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartPieSeriesSiteCaptionViewInfo; var ADone: Boolean); -begin - if HasCustomDrawSeriesSiteCaption then - FOnCustomDrawSeriesSiteCaption(Self, ACanvas, AViewInfo, ADone); -end; - -function TcxGridChartPieDiagram.HasCustomDrawSeriesSite: Boolean; -begin - Result := Assigned(FOnCustomDrawSeriesSite); -end; - -function TcxGridChartPieDiagram.HasCustomDrawSeriesSiteCaption: Boolean; -begin - Result := Assigned(FOnCustomDrawSeriesSiteCaption); -end; - -procedure TcxGridChartPieDiagram.Assign(Source: TPersistent); -begin - if Source is TcxGridChartPieDiagram then - with TcxGridChartPieDiagram(Source) do - begin - Self.SeriesCaptions := SeriesCaptions; - Self.SeriesColumnCount := SeriesColumnCount; - Self.SeriesSites := SeriesSites; - Self.Values := Values; - Self.OnCustomDrawSeriesSite := OnCustomDrawSeriesSite; - Self.OnCustomDrawSeriesSiteCaption := OnCustomDrawSeriesSiteCaption; - end; - inherited; -end; - -function TcxGridChartPieDiagram.GetSeriesColumnCount: Integer; -begin - Result := SeriesColumnCount; - if (Result = 0) or (Result > GridView.VisibleSeriesCount) then - Result := GridView.VisibleSeriesCount; -end; - -function TcxGridChartPieDiagram.GetValueCaption(ASeries: TcxGridChartSeries; - AValueIndex: Integer): string; - - function GetItemText(AItem: TcxGridChartPieDiagramValueCaptionItem): string; - var - AValue: Variant; - begin - case AItem of - pdvciCategory: - Result := GridView.Categories.VisibleDisplayTexts[AValueIndex]; - pdvciValue: - Result := ASeries.VisibleDisplayTexts[AValueIndex]; - pdvciPercentage: - begin - if ASeries.SumOfValues = 0 then - AValue := 100 - else - AValue := Abs(100 * ASeries.VisibleValues[AValueIndex] / ASeries.SumOfValues); - Result := FormatFloat(Values.GetPercentageCaptionFormat, AValue); - end; - end; - end; - -var - ACaptionItem: TcxGridChartPieDiagramValueCaptionItem; -begin - Result := ''; - for ACaptionItem := Low(ACaptionItem) to High(ACaptionItem) do - if ACaptionItem in Values.CaptionItems then - if Result = '' then - Result := GetItemText(ACaptionItem) - else - Result := Result + Values.GetCaptionItemSeparator + GetItemText(ACaptionItem); -end; - -{ TcxGridChartItemDataBinding } - -constructor TcxGridChartItemDataBinding.Create(AGridView: TcxGridChartView; - AIsValue: Boolean; ADefaultValueTypeClass: TcxValueTypeClass); -begin - inherited Create(nil); - FGridView := AGridView; - FIsValue := AIsValue; - FDefaultValueTypeClass := ADefaultValueTypeClass; - FDefaultValuesProvider := GetDefaultValuesProviderClass.Create(Self); -end; - -destructor TcxGridChartItemDataBinding.Destroy; -begin - FDefaultValuesProvider.Free; - inherited; -end; - -function TcxGridChartItemDataBinding.GetDataController: TcxCustomDataController; -begin - Result := FDataField.DataController; -end; - -function TcxGridChartItemDataBinding.GetDataIndex: Integer; -begin - Result := FDataField.Index; -end; - -function TcxGridChartItemDataBinding.GetDataItem: TObject; -begin - Result := FDataField.Item; -end; - -function TcxGridChartItemDataBinding.GetDefaultProperties: TcxCustomEditProperties; -begin - Result := FDefaultRepositoryItem.Properties; - with Result do - begin - LockUpdate(True); - IDefaultValuesProvider := Self.DefaultValuesProvider; - LockUpdate(False); - end; -end; - -function TcxGridChartItemDataBinding.GetDefaultValuesProvider: TcxCustomEditDefaultValuesProvider; -begin - Result := FDefaultValuesProvider; - InitDefaultValuesProvider(Result); -end; - -function TcxGridChartItemDataBinding.GetGroupIndex: Integer; -begin - Result := DataController.Groups.ItemGroupIndex[DataIndex]; -end; - -function TcxGridChartItemDataBinding.GetSortIndex: Integer; -begin - Result := DataController.GetItemSortingIndex(DataIndex); -end; - -function TcxGridChartItemDataBinding.GetSortOrder: TcxDataSortOrder; -begin - Result := DataController.GetItemSortOrder(DataIndex); -end; - -function TcxGridChartItemDataBinding.GetSummaryIndex: Integer; -begin - Result := FSummaryItem.Index; -end; - -function TcxGridChartItemDataBinding.GetSummaryKind: TcxSummaryKind; -begin - Result := FSummaryItem.Kind; -end; - -function TcxGridChartItemDataBinding.GetValueType: string; -begin - if ValueTypeClass = nil then - Result := '' - else - Result := ValueTypeClass.Caption; -end; - -function TcxGridChartItemDataBinding.GetValueTypeClass: TcxValueTypeClass; -begin - Result := DataController.GetItemValueTypeClass(DataIndex); -end; - -procedure TcxGridChartItemDataBinding.SetData(Value: TObject); -begin - if FData <> Value then - begin - FData := Value; - FGridView.Changed(vcProperty); - end; -end; - -procedure TcxGridChartItemDataBinding.SetDataField(Value: TcxCustomDataField); -begin - if FDataField <> Value then - begin - FDataField := Value; - if FDataField <> nil then - begin - ValueTypeClass := GetDefaultValueTypeClass; - if IsValue then - CreateSummaryItem(FSummaryItem); - end - else - FreeAndNil(FSummaryItem); - UpdateDefaultRepositoryItemValue; - end; -end; - -procedure TcxGridChartItemDataBinding.SetGroupIndex(Value: Integer); -begin - DataController.Groups.ChangeGrouping(DataIndex, Value); -end; - -procedure TcxGridChartItemDataBinding.SetSortIndex(Value: Integer); -begin - DataController.ChangeItemSortingIndex(DataIndex, Value); -end; - -procedure TcxGridChartItemDataBinding.SetSortOrder(Value: TcxDataSortOrder); -begin - if SortOrder <> Value then - begin - GridView.BeginUpdate; - try - GridView.DataSortingChanging(DataItem); - DataController.ChangeSorting(DataIndex, Value); - GridView.DataSortingChanged(DataItem); - finally - GridView.EndUpdate; - end; - end; -end; - -procedure TcxGridChartItemDataBinding.SetSummaryKind(Value: TcxSummaryKind); -begin - FSummaryItem.Kind := Value; -end; - -procedure TcxGridChartItemDataBinding.SetValueType(const Value: string); -begin - if ValueType <> Value then - ValueTypeClass := cxValueTypeClassList.ItemByCaption(Value); -end; - -procedure TcxGridChartItemDataBinding.SetValueTypeClass(Value: TcxValueTypeClass); -begin - DataController.ChangeValueTypeClass(DataIndex, Value); -end; - -procedure TcxGridChartItemDataBinding.ItemRemoved(Sender: TcxEditRepositoryItem); -begin - UpdateDefaultRepositoryItemValue; -end; - -procedure TcxGridChartItemDataBinding.PropertiesChanged(Sender: TcxEditRepositoryItem); -begin - if not GridView.IsPattern then GridView.Changed(vcLayout); -end; - -procedure TcxGridChartItemDataBinding.CreateSummaryItem(var ASummaryItem: TcxDataSummaryItem); -begin - DataController.Summary.DefaultGroupSummaryItems.BeginUpdate; - try - ASummaryItem := DataController.Summary.DefaultGroupSummaryItems.Add; - ASummaryItem.Kind := cxGridChartItemDefaultSummaryKind; - ASummaryItem.Position := spGroup; - ASummaryItem.ItemLink := DataItem; - finally - DataController.Summary.DefaultGroupSummaryItems.EndUpdate; - end; -end; - -function TcxGridChartItemDataBinding.GetDefaultDisplayText: string; -begin - Result := ''; -end; - -function TcxGridChartItemDataBinding.GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; -begin - Result := TcxCustomEditDefaultValuesProvider; -end; - -function TcxGridChartItemDataBinding.GetDefaultValueTypeClass: TcxValueTypeClass; -begin - Result := FDefaultValueTypeClass; -end; - -function TcxGridChartItemDataBinding.GetSummaryItem: TcxDataSummaryItem; -begin - Result := DataController.Summary.DefaultGroupSummaryItems.ItemOfItemLink(DataItem); -end; - -procedure TcxGridChartItemDataBinding.InitDefaultValuesProvider(ADefaultValuesProvider: TcxCustomEditDefaultValuesProvider); -begin -end; - -function TcxGridChartItemDataBinding.IsValueTypeInteger: Boolean; -begin - Result := (ValueTypeClass = nil) or IsValueTypeValid(ValueTypeClass.GetVarType, True); -end; - -function TcxGridChartItemDataBinding.IsValueTypeStored: Boolean; -begin - Result := ValueTypeClass <> GetDefaultValueTypeClass; -end; - -procedure TcxGridChartItemDataBinding.UpdateSummaryItemValue; -begin - if IsValue then - FSummaryItem := GetSummaryItem; -end; - -procedure TcxGridChartItemDataBinding.ValueTypeClassChanged; -begin - UpdateDefaultRepositoryItemValue; - GridView.Changed(vcLayout); -end; - -function TcxGridChartItemDataBinding.GetDefaultRepositoryItem: TcxEditRepositoryItem; -begin - Result := GetDefaultEditDataRepositoryItems.GetItem(ValueTypeClass); -end; - -procedure TcxGridChartItemDataBinding.UpdateDefaultRepositoryItemValue; -begin - if FDefaultRepositoryItem <> nil then - FDefaultRepositoryItem.RemoveListener(Self); - if FDataField = nil then - FDefaultRepositoryItem := nil - else - FDefaultRepositoryItem := GetDefaultRepositoryItem; - if FDefaultRepositoryItem <> nil then - FDefaultRepositoryItem.AddListener(Self); -end; - -procedure TcxGridChartItemDataBinding.Assign(Source: TPersistent); -begin - if Source is TcxGridChartItemDataBinding then - with TcxGridChartItemDataBinding(Source) do - begin - Self.Data := Data; - Self.ValueTypeClass := ValueTypeClass; - end - else - inherited; -end; - -function TcxGridChartItemDataBinding.GetValueDisplayText(const AValue: Variant): string; -begin - Result := DefaultProperties.GetDisplayText(AValue); -end; - -function TcxGridChartItemDataBinding.IsValueTypeClassValid(AValueTypeClass: TcxValueTypeClass): Boolean; -begin - if IsValue then - Result := cxGridChartView.IsValueTypeClassValid(AValueTypeClass) - else - Result := True; -end; - -{ TcxGridChartItem } - -constructor TcxGridChartItem.Create(AOwner: TComponent); -begin - inherited; - FVisible := True; - FVisibleForCustomization := True; - FVisibleIndex := -1; -end; - -destructor TcxGridChartItem.Destroy; -begin - if not GridView.IsDestroying and GridView.IsDesigning then - GridView.Controller.DesignController.UnselectObject(Self); - FGridView.RemoveItem(Self); - FDataBinding.Free; - inherited; -end; - -function TcxGridChartItem.GetID: Integer; -begin - Result := FDataBinding.ID; -end; - -function TcxGridChartItem.GetIndex: Integer; -begin - Result := FGridView.GetItemIndex(Self); -end; - -function TcxGridChartItem.GetSortOrder: TcxDataSortOrder; -begin - Result := FDataBinding.SortOrder; -end; - -function TcxGridChartItem.GetTag: TcxTag; -begin - Result := inherited Tag; -end; - -function TcxGridChartItem.GetVisibleDisplayText(AIndex: Integer): string; -begin - Result := GetValueDisplayText(VisibleValues[AIndex]); -end; - -procedure TcxGridChartItem.SetDataBinding(Value: TcxGridChartItemDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxGridChartItem.SetDisplayText(const Value: string); -begin - if FDisplayText <> Value then - begin - FDisplayText := Value; - DisplayTextChanged; - end; -end; - -procedure TcxGridChartItem.SetIndex(Value: Integer); -begin - FGridView.SetItemIndex(Self, Value); -end; - -procedure TcxGridChartItem.SetOnGetStoredProperties(Value: TcxGridChartItemGetStoredPropertiesEvent); -begin - if @FOnGetStoredProperties <> @Value then - begin - FOnGetStoredProperties := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartItem.SetOnGetStoredPropertyValue(Value: TcxGridChartItemGetStoredPropertyValueEvent); -begin - if @FOnGetStoredPropertyValue <> @Value then - begin - FOnGetStoredPropertyValue := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartItem.SetOnGetValueDisplayText(Value: TcxGridChartGetValueDisplayTextEvent); -begin - if @FOnGetValueDisplayText <> @Value then - begin - FOnGetValueDisplayText := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartItem.SetOnSetStoredPropertyValue(Value: TcxGridChartItemSetStoredPropertyValueEvent); -begin - if @FOnSetStoredPropertyValue <> @Value then - begin - FOnSetStoredPropertyValue := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartItem.SetSortOrder(Value: TcxDataSortOrder); -begin - FDataBinding.SortOrder := Value; -end; - -procedure TcxGridChartItem.SetTag(Value: TcxTag); -begin - if Tag <> Value then - begin - inherited Tag := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartItem.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - FVisible := Value; - FGridView.ItemVisibilityChanged(Self); - Changed; - end; -end; - -procedure TcxGridChartItem.SetVisibleForCustomization(Value: Boolean); -begin - if FVisibleForCustomization <> Value then - begin - FVisibleForCustomization := Value; - GridView.ItemVisibilityForCustomizationChanged(Self); - Changed(vcProperty); - end; -end; - -function TcxGridChartItem.IsTagStored: Boolean; -begin - Result := Tag <> 0; -end; - -function TcxGridChartItem.GetObjectName: string; -begin - if GridView.IsStoringNameMode then - Result := IntToStr(ID) - else - Result := Name; -end; - -function TcxGridChartItem.GetStoredProperties(AProperties: TStrings): Boolean; -begin - AProperties.Add('Index'); - AProperties.Add('Visible'); - if Assigned(FOnGetStoredProperties) then - FOnGetStoredProperties(Self, AProperties); - Result := True; -end; - -procedure TcxGridChartItem.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'Index' then - AValue := Index - else - if AName = 'Visible' then - AValue := Visible - else - if Assigned(FOnGetStoredPropertyValue) then - FOnGetStoredPropertyValue(Self, AName, AValue); -end; - -procedure TcxGridChartItem.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'Index' then - SetRestoredIndex(AValue) - else - if AName = 'Visible' then - Visible := AValue - else - if Assigned(FOnSetStoredPropertyValue) then - FOnSetStoredPropertyValue(Self, AName, AValue); -end; - -procedure TcxGridChartItem.DataChanged; -begin - if DataBinding.GetDefaultDisplayText <> FLastDataBindingDefaultDisplayText then - begin - FLastDataBindingDefaultDisplayText := DataBinding.GetDefaultDisplayText; - DisplayTextChanged; - end; -end; - -function TcxGridChartItem.GetDataBinding: TcxGridChartItemDataBinding; -begin - Result := FDataBinding; -end; - -procedure TcxGridChartItem.ValueTypeClassChanged; -begin - FDataBinding.ValueTypeClassChanged; -end; - -procedure TcxGridChartItem.Changed(AChange: TcxGridViewChangeKind = vcLayout); -begin - FGridView.Changed(AChange); -end; - -procedure TcxGridChartItem.DisplayTextChanged; -begin - Changed; - GridView.ItemDisplayTextChanged(Self); -end; - -procedure TcxGridChartItem.DoGetValueDisplayText(const AValue: Variant; - var ADisplayText: string); -begin - if Assigned(FOnGetValueDisplayText) then - FOnGetValueDisplayText(Self, AValue, ADisplayText); -end; - -function TcxGridChartItem.GetDefaultDisplayText: string; -begin - Result := DataBinding.GetDefaultDisplayText; - if Result = '' then - Result := Name; - if Result = '' then - Result := DefaultItemDisplayText; -end; - -procedure TcxGridChartItem.SetGridView(Value: TcxGridChartView); -begin - FGridView := Value; - if FDataBinding = nil then - FDataBinding := GridView.GetItemDataBindingClass.Create(GridView, IsValue, - GetDefaultValueTypeClass); -end; - -procedure TcxGridChartItem.SetName(const NewName: TComponentName); -begin - inherited; - DisplayTextChanged; -end; - -procedure TcxGridChartItem.Assign(Source: TPersistent); -begin - if Source is TcxGridChartItem then - with TcxGridChartItem(Source) do - begin - Self.DataBinding := DataBinding; - Self.DisplayText := DisplayText; - Self.SortOrder := SortOrder; - Self.Tag := Tag; - Self.Visible := Visible; - Self.VisibleForCustomization := VisibleForCustomization; - Self.OnGetStoredProperties := OnGetStoredProperties; - Self.OnGetStoredPropertyValue := OnGetStoredPropertyValue; - Self.OnGetValueDisplayText := OnGetValueDisplayText; - Self.OnSetStoredPropertyValue := OnSetStoredPropertyValue; - end - else - inherited; -end; - -function TcxGridChartItem.GetParentComponent: TComponent; -begin - Result := FGridView; -end; - -function TcxGridChartItem.HasParent: Boolean; -begin - Result := FGridView <> nil; -end; - -procedure TcxGridChartItem.SetParentComponent(AParent: TComponent); -begin - if AParent is TcxGridChartView then - TcxGridChartView(AParent).AddItem(Self); -end; - -function TcxGridChartItem.GetDisplayText: string; -begin - Result := DisplayText; - if Result = '' then - Result := GetDefaultDisplayText; -end; - -function TcxGridChartItem.GetValueDisplayText(const AValue: Variant): string; -begin - Result := DataBinding.GetValueDisplayText(AValue); - DoGetValueDisplayText(AValue, Result); -end; - -class function TcxGridChartItem.IsValue: Boolean; -begin - Result := True; -end; - -{ TcxGridChartCategories } - -constructor TcxGridChartCategories.Create(AGridView: TcxCustomGridView); -begin - inherited; - FDataBinding := GridView.GetItemDataBindingClass.Create(GridView, False, - GetDefaultValueTypeClass); -end; - -destructor TcxGridChartCategories.Destroy; -begin - FDataBinding.Free; - inherited; -end; - -function TcxGridChartCategories.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -function TcxGridChartCategories.GetID: Integer; -begin - Result := FDataBinding.ID; -end; - -function TcxGridChartCategories.GetSortOrder: TcxDataSortOrder; -begin - Result := FDataBinding.SortOrder; -end; - -function TcxGridChartCategories.GetValue(Index: Integer): Variant; -begin - Result := GridView.ViewData.Categories[Index]; -end; - -function TcxGridChartCategories.GetValueCount: Integer; -begin - Result := GridView.ViewData.CategoryCount; -end; - -function TcxGridChartCategories.GetVisibleDisplayText(Index: Integer): string; -begin - Result := GetValueDisplayText(VisibleValues[Index]); -end; - -function TcxGridChartCategories.GetVisibleValue(Index: Integer): Variant; -begin - Result := GridView.ViewData.VisibleCategories[Index]; -end; - -function TcxGridChartCategories.GetVisibleValueCount: Integer; -begin - Result := GridView.ViewData.VisibleCategoryCount; -end; - -procedure TcxGridChartCategories.SetDataBinding(Value: TcxGridChartItemDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxGridChartCategories.SetDisplayText(const Value: string); -begin - if FDisplayText <> Value then - begin - FDisplayText := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartCategories.SetOnGetValueDisplayText(Value: TcxGridChartGetValueDisplayTextEvent); -begin - if @FOnGetValueDisplayText <> @Value then - begin - FOnGetValueDisplayText := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartCategories.SetSortOrder(Value: TcxDataSortOrder); -begin - FDataBinding.SortOrder := Value; -end; - -procedure TcxGridChartCategories.SetValue(Index: Integer; const Value: Variant); -begin - GridView.ViewData.Categories[Index] := Value; -end; - -procedure TcxGridChartCategories.SetValueCount(Value: Integer); -begin - GridView.ViewData.CategoryCount := Value; -end; - -procedure TcxGridChartCategories.DataChanged; -begin -end; - -function TcxGridChartCategories.GetDataBinding: TcxGridChartItemDataBinding; -begin - Result := FDataBinding; -end; - -procedure TcxGridChartCategories.ValueTypeClassChanged; -begin - FDataBinding.ValueTypeClassChanged; -end; - -procedure TcxGridChartCategories.DoGetValueDisplayText(const AValue: Variant; - var ADisplayText: string); -begin - if Assigned(FOnGetValueDisplayText) then - FOnGetValueDisplayText(Self, AValue, ADisplayText); -end; - -function TcxGridChartCategories.GetDefaultDisplayText: string; -begin - Result := cxGetResourceString(@scxGridChartCategoriesDisplayText); -end; - -function TcxGridChartCategories.GetDefaultValueTypeClass: TcxValueTypeClass; -begin - Result := TcxStringValueType; -end; - -procedure TcxGridChartCategories.Assign(Source: TPersistent); -begin - if Source is TcxGridChartCategories then - with TcxGridChartCategories(Source) do - begin - Self.DataBinding := DataBinding; - Self.DisplayText := DisplayText; - Self.SortOrder := SortOrder; - Self.OnGetValueDisplayText := OnGetValueDisplayText; - end; - inherited; -end; - -function TcxGridChartCategories.GetDisplayText: string; -begin - Result := FDisplayText; - if Result = '' then - Result := GetDefaultDisplayText; -end; - -function TcxGridChartCategories.GetNamePath: string; -begin - Result := GridView.GetCategoriesNamePath; -end; - -function TcxGridChartCategories.GetValueDisplayText(const AValue: Variant): string; -begin - if GridView.ActiveDataGroup = nil then - Result := DataBinding.GetValueDisplayText(AValue) - else - Result := GridView.ActiveDataGroup.GetValueDisplayText(AValue); - DoGetValueDisplayText(AValue, Result); -end; - -{ TcxGridChartDataGroup } - -function TcxGridChartDataGroup.GetActive: Boolean; -begin - Result := GridView.ActiveDataGroup = Self; -end; - -function TcxGridChartDataGroup.GetActiveValueDisplayText: string; -begin - Result := GetValueDisplayText(FActiveValue); -end; - -function TcxGridChartDataGroup.GetDataLevel: Integer; -begin - Result := GridView.GetDataObjectLevel(Self); -end; - -function TcxGridChartDataGroup.GetGroupIndex: Integer; -begin - Result := DataBinding.GroupIndex; -end; - -procedure TcxGridChartDataGroup.SetActive(Value: Boolean); -begin - GridView.ActiveDataGroup := Self; -end; - -procedure TcxGridChartDataGroup.SetActiveValue(const Value: Variant); -begin - if not VarSameValue(FActiveValue, Value) then - begin - FActiveValue := Value; - GridView.ViewData.DataLevelsChanged; - GridView.UpdateDataGroupActiveValues; - Changed; - end; -end; - -procedure TcxGridChartDataGroup.SetDataLevel(Value: Integer); -begin - GridView.SetDataObjectLevel(Self, Value); -end; - -procedure TcxGridChartDataGroup.SetGroupIndex(Value: Integer); -begin - DataBinding.GroupIndex := Value; -end; - -function TcxGridChartDataGroup.GetStoredProperties(AProperties: TStrings): Boolean; -begin - AProperties.Add('ActiveValue'); - Result := inherited GetStoredProperties(AProperties); -end; - -procedure TcxGridChartDataGroup.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'ActiveValue' then - AValue := ActiveValue - else - inherited; -end; - -procedure TcxGridChartDataGroup.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'ActiveValue' then - ActiveValue := AValue - else - inherited; -end; - -procedure TcxGridChartDataGroup.SetRestoredIndex(AValue: Integer); -begin - GridView.RestoringDataGroups[AValue] := Self; -end; - -procedure TcxGridChartDataGroup.CheckActiveValue; -begin - if HasActiveValue then - if Visible then - GridView.ViewData.CheckValueAtLevel(VisibleIndex, FActiveValue) - else - FActiveValue := Null; -end; - -function TcxGridChartDataGroup.GetDefaultValueTypeClass: TcxValueTypeClass; -begin - Result := TcxVariantValueType; -end; - -function TcxGridChartDataGroup.GetValue(AIndex: Integer): Variant; -begin - Result := GridView.ViewData.GroupValues[Index, AIndex]; -end; - -function TcxGridChartDataGroup.GetValueCount: Integer; -begin - Result := GridView.ViewData.CategoryCount; -end; - -function TcxGridChartDataGroup.GetVisibleValue(AIndex: Integer): Variant; -begin - Result := GridView.ViewData.VisibleGroupValues[VisibleIndex, AIndex]; -end; - -function TcxGridChartDataGroup.GetVisibleValueCount: Integer; -begin - Result := GridView.ViewData.VisibleGroupValueCount[VisibleIndex]; -end; - -procedure TcxGridChartDataGroup.SetValue(AIndex: Integer; const Value: Variant); -begin - GridView.ViewData.GroupValues[Index, AIndex] := Value; -end; - -procedure TcxGridChartDataGroup.SetValueCount(Value: Integer); -begin - GridView.ViewData.CategoryCount := Value; -end; - -function TcxGridChartDataGroup.CanMove: Boolean; -begin - Result := IsDesigning or GridView.OptionsCustomize.DataGroupMoving; -end; - -function TcxGridChartDataGroup.HasActiveValue: Boolean; -begin - Result := not VarIsEmpty(FActiveValue) and not VarIsNull(FActiveValue); -end; - -class function TcxGridChartDataGroup.IsValue: Boolean; -begin - Result := False; -end; - -{ TcxGridChartSeriesStyles } - -constructor TcxGridChartSeriesStyles.Create(AOwner: TPersistent); -begin - inherited; - BitmapInViewParams := True; -end; - -function TcxGridChartSeriesStyles.GetSeries: TcxGridChartSeries; -begin - Result := TcxGridChartSeries(Owner); -end; - -procedure TcxGridChartSeriesStyles.SetOnGetValueStyle(Value: TcxGridChartSeriesGetValueStyleEvent); -begin - if @FOnGetValueStyle <> @Value then - begin - FOnGetValueStyle := Value; - Series.Changed(vcProperty); - end; -end; - -procedure TcxGridChartSeriesStyles.GetDefaultViewParams(Index: Integer; - AData: TObject; out AParams: TcxViewParams); -begin - inherited; - if Index = ssValues then - begin - if Integer(AData) = -1 then - AParams.Color := GetDefaultValueColor(Series.Order) - else - AParams.Color := GetDefaultValueColor(Integer(AData)); - AParams.TextColor := LookAndFeelPainter.DefaultChartDiagramValueBorderColor; - end; -end; - -function TcxGridChartSeriesStyles.GetGridView: TcxCustomGridView; -begin - Result := Series.GridView; -end; - -procedure TcxGridChartSeriesStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartSeriesStyles then - with TcxGridChartSeriesStyles(Source) do - begin - Self.Values := Values; - Self.OnGetValueStyle := OnGetValueStyle; - end; -end; - -procedure TcxGridChartSeriesStyles.GetValueParams(AValueIndex: Integer; - AVaryColorsByCategory: Boolean; out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if (AValueIndex <> -1) and Assigned(FOnGetValueStyle) then - FOnGetValueStyle(Series, AValueIndex, AStyle); - if not AVaryColorsByCategory then AValueIndex := -1; - GetViewParams(ssValues, TObject(AValueIndex), AStyle, AParams); -end; - -{ TcxGridChartSeries } - -constructor TcxGridChartSeries.Create(AOwner: TComponent); -begin - inherited; - FStyles := GetStylesClass.Create(Self); -end; - -destructor TcxGridChartSeries.Destroy; -begin - FStyles.Free; - inherited; -end; - -function TcxGridChartSeries.GetGroupSummaryKind: TcxSummaryKind; -begin - Result := DataBinding.SummaryKind; -end; - -function TcxGridChartSeries.GetSumOfValues: Variant; -begin - Result := GridView.ViewData.SumOfValues[Index]; -end; - -procedure TcxGridChartSeries.SetGroupSummaryKind(Value: TcxSummaryKind); -begin - if IsGroupSummaryKindValid(Value) then - DataBinding.SummaryKind := Value; -end; - -procedure TcxGridChartSeries.SetStyles(Value: TcxGridChartSeriesStyles); -begin - FStyles.Assign(Value); -end; - -procedure TcxGridChartSeries.SetValueCaptionFormat(const Value: string); -begin - if FValueCaptionFormat <> Value then - begin - FValueCaptionFormat := Value; - Changed; - end; -end; - -procedure TcxGridChartSeries.SetOnCustomDrawValue(Value: TcxGridChartSeriesValueCustomDrawEvent); -begin - if @FOnCustomDrawValue <> @Value then - begin - FOnCustomDrawValue := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartSeries.SetOnValueClick(Value: TcxGridChartValueClickEvent); -begin - if @FOnValueClick <> @Value then - begin - FOnValueClick := Value; - Changed(vcProperty); - end; -end; - -function TcxGridChartSeries.GetStoredProperties(AProperties: TStrings): Boolean; -begin - AProperties.Add('SortOrder'); - Result := inherited GetStoredProperties(AProperties); -end; - -procedure TcxGridChartSeries.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'SortOrder' then - AValue := Variant(SortOrder) - else - inherited; -end; - -procedure TcxGridChartSeries.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'SortOrder' then - SortOrder := TcxDataSortOrder((AValue)) - else - inherited; -end; - -procedure TcxGridChartSeries.SetRestoredIndex(AValue: Integer); -begin - GridView.RestoringSeries[AValue] := Self; -end; - -procedure TcxGridChartSeries.DoGetValueDisplayText(const AValue: Variant; - var ADisplayText: string); -begin - if (ValueCaptionFormat <> '') and not VarIsNull(AValue) then - ADisplayText := FormatFloat(ValueCaptionFormat, AValue); - inherited; -end; - -function TcxGridChartSeries.GetDefaultValueTypeClass: TcxValueTypeClass; -begin - Result := TcxFloatValueType; -end; - -function TcxGridChartSeries.GetStylesClass: TcxGridChartSeriesStylesClass; -begin - Result := TcxGridChartSeriesStyles; -end; - -function TcxGridChartSeries.IsGroupSummaryKindValid(AValue: TcxSummaryKind): Boolean; -begin - Result := AValue <> skNone; -end; - -function TcxGridChartSeries.GetValue(AIndex: Integer): Variant; -begin - Result := GridView.ViewData.Values[Index, AIndex]; -end; - -function TcxGridChartSeries.GetValueCount: Integer; -begin - Result := GridView.ViewData.CategoryCount; -end; - -function TcxGridChartSeries.GetVisibleValue(AIndex: Integer): Variant; -begin - Result := GridView.ViewData.VisibleValues[Index, AIndex]; -end; - -function TcxGridChartSeries.GetVisibleValueCount: Integer; -begin - Result := GridView.ViewData.VisibleCategoryCount; -end; - -procedure TcxGridChartSeries.SetValue(AIndex: Integer; const Value: Variant); -begin - GridView.ViewData.Values[Index, AIndex] := Value; -end; - -procedure TcxGridChartSeries.SetValueCount(Value: Integer); -begin - GridView.ViewData.CategoryCount := Value; -end; - -procedure TcxGridChartSeries.DoCustomDrawValue(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartDiagramValueViewInfo; var ADone: Boolean); -begin - if HasCustomDrawValue then - FOnCustomDrawValue(Self, ACanvas, AViewInfo, ADone); -end; - -function TcxGridChartSeries.DoValueClick(AValueIndex: Integer): Boolean; -begin - Result := False; - if Assigned(FOnValueClick) then - FOnValueClick(GridView, Self, AValueIndex, Result); - if not Result then - Result := GridView.DoValueClick(Self, AValueIndex); -end; - -function TcxGridChartSeries.HasCustomDrawValue: Boolean; -begin - Result := Assigned(FOnCustomDrawValue); -end; - -procedure TcxGridChartSeries.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartSeries then - with TcxGridChartSeries(Source) do - begin - Self.GroupSummaryKind := GroupSummaryKind; - Self.Styles := Styles; - Self.ValueCaptionFormat := ValueCaptionFormat; - Self.OnCustomDrawValue := OnCustomDrawValue; - Self.OnValueClick := OnValueClick; - end -end; - -function TcxGridChartSeries.AddValue(const AValue: Variant): Integer; -begin - ValueCount := ValueCount + 1; - Result := ValueCount - 1; - Values[Result] := AValue; -end; - -class function TcxGridChartSeries.IsValue: Boolean; -begin - Result := True; -end; - -{ TcxGridChartTitle } - -function TcxGridChartTitle.GetDefaultPosition: TcxGridChartPartPosition; -begin - Result := cppTop; -end; - -{ TcxGridChartToolBox } - -constructor TcxGridChartToolBox.Create(AGridView: TcxCustomGridView); -begin - inherited; - FBorder := tbSingle; - FDataLevelActiveValueDropDownCount := cxGridChartDefaultDataLevelActiveValueDropDownCount; - FDataLevelsInfoVisible := dlivNonEmpty; - FVisible := tvNonEmpty; -end; - -function TcxGridChartToolBox.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -procedure TcxGridChartToolBox.SetBorder(Value: TcxGridChartToolBoxBorder); -begin - if FBorder <> Value then - begin - FBorder := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartToolBox.SetCustomizeButton(Value: Boolean); -begin - if FCustomizeButton <> Value then - begin - FCustomizeButton := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartToolBox.SetDataLevelActiveValueDropDownCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FDataLevelActiveValueDropDownCount <> Value then - begin - FDataLevelActiveValueDropDownCount := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartToolBox.SetDataLevelActiveValueDropDownWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FDataLevelActiveValueDropDownWidth <> Value then - begin - FDataLevelActiveValueDropDownWidth := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartToolBox.SetDataLevelsInfoVisible(Value: TcxGridChartDataLevelsInfoVisible); -begin - if FDataLevelsInfoVisible <> Value then - begin - FDataLevelsInfoVisible := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartToolBox.SetDiagramSelector(Value: Boolean); -begin - if FDiagramSelector <> Value then - begin - FDiagramSelector := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartToolBox.SetPosition(Value: TcxGridChartToolBoxPosition); -begin - if FPosition <> Value then - begin - FPosition := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartToolBox.SetVisible(Value: TcxGridChartToolBoxVisible); -begin - if FVisible <> Value then - begin - FVisible := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartToolBox.GetStoredProperties(AProperties: TStrings); -begin - AProperties.Add('ToolBox.Border'); - AProperties.Add('ToolBox.DiagramSelector'); - AProperties.Add('ToolBox.Position'); - inherited; -end; - -procedure TcxGridChartToolBox.GetStoredPropertyValue(const AName: string; - var AValue: Variant); -begin - if AName = 'ToolBox.Border' then - AValue := Variant(Border) - else - if AName = 'ToolBox.DiagramSelector' then - AValue := DiagramSelector - else - if AName = 'ToolBox.Position' then - AValue := Variant(Position); - inherited; -end; - -procedure TcxGridChartToolBox.SetStoredPropertyValue(const AName: string; - const AValue: Variant); -begin - if AName = 'ToolBox.Border' then - Border := TcxGridChartToolBoxBorder((AValue)) - else - if AName = 'ToolBox.DiagramSelector' then - DiagramSelector := AValue - else - if AName = 'ToolBox.Position' then - Position := TcxGridChartToolBoxPosition((AValue)); - inherited; -end; - -function TcxGridChartToolBox.IsDataLevelsInfoNonEmpty: Boolean; -begin - Result := GridView.IsDataGrouped; -end; - -function TcxGridChartToolBox.IsNonEmpty: Boolean; -begin - Result := GetDataLevelsInfoVisible or CustomizeButton or DiagramSelector; -end; - -procedure TcxGridChartToolBox.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartToolBox then - with TcxGridChartToolBox(Source) do - begin - Self.Border := Border; - Self.CustomizeButton := CustomizeButton; - Self.DataLevelActiveValueDropDownCount := DataLevelActiveValueDropDownCount; - Self.DataLevelActiveValueDropDownWidth := DataLevelActiveValueDropDownWidth; - Self.DataLevelsInfoVisible := DataLevelsInfoVisible; - Self.DiagramSelector := DiagramSelector; - Self.Position := Position; - Self.Visible := Visible; - end; -end; - -function TcxGridChartToolBox.GetDataLevelsInfoVisible: Boolean; -begin - Result := (FDataLevelsInfoVisible = dlivAlways) or - (FDataLevelsInfoVisible = dlivNonEmpty) and IsDataLevelsInfoNonEmpty; -end; - -function TcxGridChartToolBox.GetVisible: Boolean; -begin - Result := (FVisible = tvAlways) or (FVisible = tvNonEmpty) and IsNonEmpty; -end; - -{ TcxGridChartOptionsBehavior } - -constructor TcxGridChartOptionsBehavior.Create(AGridView: TcxCustomGridView); -begin - inherited; - FValueHints := True; -end; - -function TcxGridChartOptionsBehavior.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -procedure TcxGridChartOptionsBehavior.SetValueHints(Value: Boolean); -begin - if FValueHints <> Value then - begin - FValueHints := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartOptionsBehavior.SetValueHotTrack(Value: TcxGridChartValueHotTrack); -begin - if FValueHotTrack <> Value then - begin - FValueHotTrack := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartOptionsBehavior.GetStoredProperties(AProperties: TStrings); -begin - AProperties.Add('OptionsBehavior.ValueHints'); - inherited; -end; - -procedure TcxGridChartOptionsBehavior.GetStoredPropertyValue(const AName: string; - var AValue: Variant); -begin - if AName = 'OptionsBehavior.ValueHints' then - AValue := ValueHints; - inherited; -end; - -procedure TcxGridChartOptionsBehavior.SetStoredPropertyValue(const AName: string; - const AValue: Variant); -begin - if AName = 'OptionsBehavior.ValueHints' then - ValueHints := AValue; - inherited; -end; - -function TcxGridChartOptionsBehavior.GetDefaultValueHotTrack(AValueIndex: Integer): Boolean; -begin - Result := GridView.Controller.IsDataDrillDownPossible(AValueIndex); -end; - -procedure TcxGridChartOptionsBehavior.Assign(Source: TPersistent); -begin - if Source is TcxGridChartOptionsBehavior then - with TcxGridChartOptionsBehavior(Source) do - begin - Self.ValueHints := ValueHints; - Self.ValueHotTrack := ValueHotTrack; - end; - inherited; -end; - -function TcxGridChartOptionsBehavior.GetValueHotTrack(AValueIndex: Integer): Boolean; -begin - Result := GridView.ActiveDiagram.SupportsValueHotTrack and - ((FValueHotTrack = vhAlways) or - (FValueHotTrack = vhDefault) and GetDefaultValueHotTrack(AValueIndex)); -end; - -{ TcxGridChartOptionsCustomize } - -constructor TcxGridChartOptionsCustomize.Create(AGridView: TcxCustomGridView); -begin - inherited; - FDataDrillDown := True; - FDataDrillUpMethod := ddumMouseRightButtonClick; - FDataGroupMoving := True; - FOptionsCustomization := True; - FSeriesCustomization := True; -end; - -procedure TcxGridChartOptionsCustomize.SetDataDrillDown(Value: Boolean); -begin - if FDataDrillDown <> Value then - begin - FDataDrillDown := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartOptionsCustomize.SetDataDrillUpMethod(Value: TcxGridChartDataDrillUpMethod); -begin - if FDataDrillUpMethod <> Value then - begin - FDataDrillUpMethod := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartOptionsCustomize.SetDataGroupHiding(Value: Boolean); -begin - if FDataGroupHiding <> Value then - begin - FDataGroupHiding := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartOptionsCustomize.SetDataGroupMoving(Value: Boolean); -begin - if FDataGroupMoving <> Value then - begin - FDataGroupMoving := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartOptionsCustomize.SetOptionsCustomization(Value: Boolean); -begin - if FOptionsCustomization <> Value then - begin - FOptionsCustomization := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartOptionsCustomize.SetSeriesCustomization(Value: Boolean); -begin - if FSeriesCustomization <> Value then - begin - FSeriesCustomization := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartOptionsCustomize.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartOptionsCustomize then - with TcxGridChartOptionsCustomize(Source) do - begin - Self.DataDrillDown := DataDrillDown; - Self.DataDrillUpMethod := DataDrillUpMethod; - Self.DataGroupHiding := DataGroupHiding; - Self.DataGroupMoving := DataGroupMoving; - Self.OptionsCustomization := OptionsCustomization; - Self.SeriesCustomization := SeriesCustomization; - end; -end; - -{ TcxGridChartOptionsView } - -{constructor TcxGridChartOptionsView.Create(AGridView: TcxCustomGridView); -begin - inherited; -end;} - -function TcxGridChartOptionsView.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -procedure TcxGridChartOptionsView.SetCategoriesPerPage(Value: Integer); -begin - if Value < 0 then Value := 0; - if FCategoriesPerPage <> Value then - begin - FCategoriesPerPage := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridChartOptionsView.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartOptionsView then - with TcxGridChartOptionsView(Source) do - begin - Self.CategoriesPerPage := CategoriesPerPage; - end; -end; - -{ TcxGridChartViewStyles } - -constructor TcxGridChartViewStyles.Create(AOwner: TPersistent); -begin - inherited; - BitmapInViewParams := True; -end; - -procedure TcxGridChartViewStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - inherited; - with AParams, LookAndFeelPainter do - case Index of - vsActiveDataLevelInfo: - begin - GetViewParams(vsDataLevelsInfo, nil, nil, AParams); - Bitmap := nil; - Color := DefaultSelectionColor; - TextColor := DefaultSelectionTextColor; - end; - vsDataLevelActiveValueInfo: - begin - GetViewParams(vsDataLevelsInfo, nil, nil, AParams); - if GridView.Controller.CanShowDataLevelActiveValuePopup(False) then - TextColor := DefaultHyperlinkTextColor; - end; - vsDataLevelsInfo: - GetViewParams(vsToolBox, nil, nil, AParams); - vsDiagramSelector: - begin - GetViewParams(vsToolBox, nil, nil, AParams); - TextColor := DefaultHyperlinkTextColor; - end; - vsLegend, vsToolBox: - begin - Color := DefaultContentColor; - TextColor := DefaultContentTextColor; - end; - vsTitle: - TextColor := DefaultContentTextColor; - end; -end; - -function TcxGridChartViewStyles.GetGridViewValue: TcxGridChartView; -begin - Result := TcxGridChartView(inherited GridView); -end; - -procedure TcxGridChartViewStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridChartViewStyles then - with TcxGridChartViewStyles(Source) do - begin - Self.ActiveDataLevelInfo := ActiveDataLevelInfo; - Self.DataLevelActiveValueInfo := DataLevelActiveValueInfo; - Self.DataLevelsInfo := DataLevelsInfo; - Self.DiagramSelector := DiagramSelector; - Self.Legend := Legend; - Self.Title := Title; - Self.ToolBox := ToolBox; - end; -end; - -procedure TcxGridChartViewStyles.GetDataLevelInfoParams(ADataLevel: Integer; - out AParams: TcxViewParams); -begin - if GridView.ActiveDataLevel = ADataLevel then - GetViewParams(vsActiveDataLevelInfo, nil, nil, AParams) - else - GetViewParams(vsDataLevelsInfo, nil, nil, AParams); -end; - -{ TcxGridOpenChartItemList } - -function TcxGridOpenChartItemList.GetItem(Index: Integer): TcxGridChartItem; -begin - Result := TcxGridChartItem(inherited Items[Index]); -end; - -procedure TcxGridOpenChartItemList.SetItem(Index: Integer; Value: TcxGridChartItem); -begin - inherited Items[Index] := Value; -end; - -{ TcxGridChartView } - -function TcxGridChartView.GetActiveDataGroup: TcxGridChartDataGroup; -begin - if ActiveDataLevel < DataLevelCount - 1 then - Result := VisibleDataGroups[ActiveDataLevel] - else - Result := nil; -end; - -function TcxGridChartView.GetAvailableDiagramCount: Integer; -begin - Result := FAvailableDiagrams.Count; -end; - -function TcxGridChartView.GetAvailableDiagram(Index: Integer): TcxGridChartDiagram; -begin - Result := TcxGridChartDiagram(FAvailableDiagrams[Index]); -end; - -function TcxGridChartView.GetController: TcxGridChartController; -begin - Result := TcxGridChartController(inherited Controller); -end; - -function TcxGridChartView.GetDataController: TcxGridChartDataController; -begin - Result := TcxGridChartDataController(FDataController); -end; - -function TcxGridChartView.GetDataGroup(Index: Integer): TcxGridChartDataGroup; -begin - Result := TcxGridChartDataGroup(FDataGroups[Index]); -end; - -function TcxGridChartView.GetDataGroupCount: Integer; -begin - Result := FDataGroups.Count; -end; - -function TcxGridChartView.GetDiagram(Index: Integer): TcxGridChartDiagram; -begin - Result := TcxGridChartDiagram(FDiagrams[Index]); -end; - -function TcxGridChartView.GetDiagramCount: Integer; -begin - Result := FDiagrams.Count; -end; - -function TcxGridChartView.GetItem(Index: Integer): IcxGridChartItem; -begin - FDataController.GetItem(Index).GetInterface(IcxGridChartItem, Result); -end; - -function TcxGridChartView.GetItemCount: Integer; -begin - Result := FDataController.ItemCount; -end; - -function TcxGridChartView.GetOptionsBehavior: TcxGridChartOptionsBehavior; -begin - Result := TcxGridChartOptionsBehavior(inherited OptionsBehavior); -end; - -function TcxGridChartView.GetOptionsView: TcxGridChartOptionsView; -begin - Result := TcxGridChartOptionsView(inherited OptionsView); -end; - -function TcxGridChartView.GetSeries(Index: Integer): TcxGridChartSeries; -begin - Result := TcxGridChartSeries(FSeries[Index]); -end; - -function TcxGridChartView.GetSeriesCount: Integer; -begin - Result := FSeries.Count; -end; - -function TcxGridChartView.GetSortedSeries: TcxGridChartSeries; -var - I: Integer; -begin - for I := 0 to SeriesCount - 1 do - begin - Result := Series[I]; - if Result.SortOrder <> soNone then Exit; - end; - Result := nil; -end; - -function TcxGridChartView.GetStyles: TcxGridChartViewStyles; -begin - Result := TcxGridChartViewStyles(inherited Styles); -end; - -function TcxGridChartView.GetViewData: TcxGridChartViewData; -begin - Result := TcxGridChartViewData(inherited ViewData); -end; - -function TcxGridChartView.GetViewInfo: TcxGridChartViewInfo; -begin - Result := TcxGridChartViewInfo(inherited ViewInfo); -end; - -function TcxGridChartView.GetVisibleDataGroup(Index: Integer): TcxGridChartDataGroup; -begin - Result := TcxGridChartDataGroup(FVisibleDataGroups[Index]); -end; - -function TcxGridChartView.GetVisibleDataGroupCount: Integer; -begin - Result := FVisibleDataGroups.Count; -end; - -function TcxGridChartView.GetVisibleSeries(Index: Integer): TcxGridChartSeries; -begin - Result := TcxGridChartSeries(FVisibleSeries[Index]); -end; - -function TcxGridChartView.GetVisibleSeriesCount: Integer; -begin - Result := FVisibleSeries.Count; -end; - -procedure TcxGridChartView.SetActiveDataGroup(Value: TcxGridChartDataGroup); -begin - if Value = nil then - ActiveDataLevel := DataLevelCount - 1 - else - if Value.Visible then - ActiveDataLevel := Value.VisibleIndex; -end; - -procedure TcxGridChartView.SetActiveDataLevel(Value: Integer); -var - APrevActiveDataLevel: Integer; -begin - if Value < 0 then Value := 0; - if Value > DataLevelCount - 1 then Value := DataLevelCount - 1; - Value := GetAvailableDataLevel(Value); - if FActiveDataLevel <> Value then - begin - APrevActiveDataLevel := FActiveDataLevel; - FActiveDataLevel := Value; - ViewData.DataLevelsChanged; - Changed(vcLayout); - ActiveDataLevelChanged(APrevActiveDataLevel); - end; -end; - -procedure TcxGridChartView.SetActiveDiagram(Value: TcxGridChartDiagram); -begin - if Value = nil then - Value := GetFirstAvailableDiagram; - if (FActiveDiagram <> Value) and ((Value = nil) or Value.IsAvailable) then - begin - FActiveDiagram := Value; - Changed(vcLayout); - ActiveDiagramChanged(FActiveDiagram); - end; -end; - -procedure TcxGridChartView.SetCategories(Value: TcxGridChartCategories); -begin - FCategories.Assign(Value); -end; - -procedure TcxGridChartView.SetDataController(Value: TcxGridChartDataController); -begin - FDataController.Assign(Value); -end; - -procedure TcxGridChartView.SetDataGroup(Index: Integer; Value: TcxGridChartDataGroup); -begin - DataGroups[Index].Assign(Value); -end; - -procedure TcxGridChartView.SetDiagramArea(Value: TcxGridChartAreaDiagram); -begin - FDiagramArea.Assign(Value); -end; - -procedure TcxGridChartView.SetDiagramBar(Value: TcxGridChartBarDiagram); -begin - FDiagramBar.Assign(Value); -end; - -procedure TcxGridChartView.SetDiagramColumn(Value: TcxGridChartColumnDiagram); -begin - FDiagramColumn.Assign(Value); -end; - -procedure TcxGridChartView.SetDiagramLine(Value: TcxGridChartLineDiagram); -begin - FDiagramLine.Assign(Value); -end; - -procedure TcxGridChartView.SetDiagramPie(Value: TcxGridChartPieDiagram); -begin - FDiagramPie.Assign(Value); -end; - -procedure TcxGridChartView.SetLegend(Value: TcxGridChartLegend); -begin - FLegend.Assign(Value); -end; - -procedure TcxGridChartView.SetOptionsBehavior(Value: TcxGridChartOptionsBehavior); -begin - inherited OptionsBehavior := Value; -end; - -procedure TcxGridChartView.SetOptionsCustomize(Value: TcxGridChartOptionsCustomize); -begin - FOptionsCustomize.Assign(Value); -end; - -procedure TcxGridChartView.SetOptionsView(Value: TcxGridChartOptionsView); -begin - inherited OptionsView := Value; -end; - -procedure TcxGridChartView.SetSeries(Index: Integer; Value: TcxGridChartSeries); -begin - Series[Index].Assign(Value); -end; - -procedure TcxGridChartView.SetSortedSeries(Value: TcxGridChartSeries); -begin - if SortedSeries <> Value then - if Value = nil then - SortedSeries.SortOrder := soNone - else - Value.SortOrder := soAscending; -end; - -procedure TcxGridChartView.SetStyles(Value: TcxGridChartViewStyles); -begin - inherited Styles := Value; -end; - -procedure TcxGridChartView.SetTitle(Value: TcxGridChartTitle); -begin - FTitle.Assign(Value); -end; - -procedure TcxGridChartView.SetToolBox(Value: TcxGridChartToolBox); -begin - FToolBox.Assign(Value); -end; - -procedure TcxGridChartView.SetOnActiveDataLevelChanged(Value: TNotifyEvent); -begin - if @FOnActiveDataLevelChanged <> @Value then - begin - FOnActiveDataLevelChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartView.SetOnActiveDiagramChanged(Value: TcxGridChartDiagramEvent); -begin - if @FOnActiveDiagramChanged <> @Value then - begin - FOnActiveDiagramChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartView.SetOnCustomDrawLegend(Value: TcxGridChartLegendCustomDrawEvent); -begin - if @FOnCustomDrawLegend <> @Value then - begin - FOnCustomDrawLegend := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartView.SetOnCustomDrawLegendItem(Value: TcxGridChartLegendItemCustomDrawEvent); -begin - if @FOnCustomDrawLegendItem <> @Value then - begin - FOnCustomDrawLegendItem := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartView.SetOnDataGroupPosChanged(Value: TcxGridChartDataGroupEvent); -begin - if @FOnDataGroupPosChanged <> @Value then - begin - FOnDataGroupPosChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartView.SetOnFirstVisibleCategoryIndexChanged(Value: TNotifyEvent); -begin - if @FOnFirstVisibleCategoryIndexChanged <> @Value then - begin - FOnFirstVisibleCategoryIndexChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartView.SetOnGetValueHint(Value: TcxGridChartGetValueHintEvent); -begin - if @FOnGetValueHint <> @Value then - begin - FOnGetValueHint := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartView.SetOnSeriesPosChanged(Value: TcxGridChartSeriesEvent); -begin - if @FOnSeriesPosChanged <> @Value then - begin - FOnSeriesPosChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridChartView.SetOnValueClick(Value: TcxGridChartValueClickEvent); -begin - if @FOnValueClick <> @Value then - begin - FOnValueClick := Value; - Changed(vcProperty); - end; -end; - -function TcxGridChartView.GetProperties(AProperties: TStrings): Boolean; -begin - AProperties.Add('ActiveDataLevel'); - AProperties.Add('ActiveDiagram'); - Legend.GetStoredProperties(AProperties); - OptionsBehavior.GetStoredProperties(AProperties); - Title.GetStoredProperties(AProperties); - ToolBox.GetStoredProperties(AProperties); - Result := inherited GetProperties(AProperties); -end; - -procedure TcxGridChartView.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'ActiveDataLevel' then - AValue := ActiveDataLevel - else - if AName = 'ActiveDiagram' then - if ActiveDiagram = nil then - AValue := '' - else - AValue := ActiveDiagram.ID - else - begin - Legend.GetStoredPropertyValue(AName, AValue); - OptionsBehavior.GetStoredPropertyValue(AName, AValue); - Title.GetStoredPropertyValue(AName, AValue); - ToolBox.GetStoredPropertyValue(AName, AValue); - end; - inherited; -end; - -procedure TcxGridChartView.SetPropertyValue(const AName: string; const AValue: Variant); -var - ADiagram: TcxGridChartDiagram; -begin - if AName = 'ActiveDataLevel' then - FRestoredActiveDataLevel := AValue - else - if AName = 'ActiveDiagram' then - begin - ADiagram := FindDiagramByID(AValue); - if ADiagram <> nil then - ADiagram.Active := True; - end - else - begin - Legend.SetStoredPropertyValue(AName, AValue); - OptionsBehavior.SetStoredPropertyValue(AName, AValue); - Title.SetStoredPropertyValue(AName, AValue); - ToolBox.SetStoredPropertyValue(AName, AValue); - end; - inherited; -end; - -function TcxGridChartView.CreateStoredObject(const AObjectName, AClassName: string): TObject; -begin - if AClassName = GetDataGroupClass.ClassName then - Result := CreateDataGroup - else - if AClassName = GetSeriesClass.ClassName then - Result := CreateSeries - else - Result := inherited CreateStoredObject(AObjectName, AClassName); -end; - -procedure TcxGridChartView.GetStoredChildren(AChildren: TStringList); -var - I: Integer; -begin - for I := 0 to DataGroupCount - 1 do - AChildren.AddObject('', DataGroups[I]); - for I := 0 to SeriesCount - 1 do - AChildren.AddObject('', Series[I]); - inherited; -end; - -procedure TcxGridChartView.AssignLayout(ALayoutView: TcxCustomGridView); -begin - inherited; - Assign(ALayoutView); -end; - -function TcxGridChartView.GetLayoutCustomizationFormButtonCaption: string; -begin - Result := 'Chart customization'; -end; - -function TcxGridChartView.HasLayoutCustomizationForm: Boolean; -begin - Result := True; -end; - -procedure TcxGridChartView.CreateHandlers; -begin - FCategories := GetCategoriesClass.Create(Self); - FDiagrams := TList.Create; - FAvailableDiagrams := TList.Create; - FDataGroups := TList.Create; - FSeries := TList.Create; - FVisibleDataGroups := TList.Create; - FVisibleSeries := TList.Create; - CreateDiagrams; - inherited; - UpdateDataController(FCategories, FCategories.DataBinding, True); -end; - -procedure TcxGridChartView.DestroyHandlers; -begin - ClearDiagrams; - ClearDataGroups; - ClearSeries; - UpdateDataController(FCategories, FCategories.DataBinding, False); - inherited; - FreeAndNil(FVisibleSeries); - FreeAndNil(FVisibleDataGroups); - FreeAndNil(FSeries); - FreeAndNil(FDataGroups); - FreeAndNil(FAvailableDiagrams); - FreeAndNil(FDiagrams); - FreeAndNil(FCategories); -end; - -procedure TcxGridChartView.CreateOptions; -begin - inherited; - FLegend := GetLegendClass.Create(Self); - FOptionsCustomize := GetOptionsCustomizeClass.Create(Self); - FTitle := GetTitleClass.Create(Self); - FToolBox := GetToolBoxClass.Create(Self); -end; - -procedure TcxGridChartView.DestroyOptions; -begin - FreeAndNil(FToolBox); - FreeAndNil(FTitle); - FreeAndNil(FOptionsCustomize); - FreeAndNil(FLegend); - inherited; -end; - -procedure TcxGridChartView.ActiveDataLevelChanged(APrevActiveDataLevel: Integer); -begin - if IsDestroying then Exit; - DoActiveDataLevelChanged; - Controller.ActiveDataLevelChanged(APrevActiveDataLevel, ActiveDataLevel); -end; - -procedure TcxGridChartView.ActiveDiagramChanged(ADiagram: TcxGridChartDiagram); -begin - if IsDestroying then Exit; - DoActiveDiagramChanged(ADiagram); - if Controller <> nil then - Controller.ActiveDiagramChanged(ADiagram); -end; - -procedure TcxGridChartView.BeforeAssign(ASource: TcxCustomGridView); -begin - inherited; - UpdateSummaryItemValues; -end; - -procedure TcxGridChartView.AfterAssign(ASource: TcxCustomGridView); -begin - inherited; - UpdateSummaryItemValues; -end; - -procedure TcxGridChartView.DoAssign(ASource: TcxCustomGridView); - - procedure AssignItems(ASource: TcxGridChartView; AItemClass: TcxGridChartItemClass); - var - ASourceItems, AItems: TList; - I: Integer; - ASourceItem, AItem: TcxGridChartItem; - begin - ASourceItems := ASource.GetItemList(AItemClass); - for I := 0 to ASourceItems.Count - 1 do - begin - ASourceItem := TcxGridChartItem(ASourceItems[I]); - AItem := FindItemByID(AItemClass, ASourceItem.ID); - if AItem = nil then - begin - AItem := CreateItem(AItemClass); - AItem.DataBinding.ID := ASourceItem.ID; - end; - AItem.FOrder := ASourceItem.Order; - AItem.Index := I; - AItem.Assign(ASourceItem); - end; - AItems := GetItemList(AItemClass); - for I := AItems.Count - 1 downto ASourceItems.Count do - TcxGridChartItem(AItems[I]).Free; - end; - -begin - if ASource is TcxGridChartView then - begin - if not AssigningSettings then - begin - Categories := TcxGridChartView(ASource).Categories; - Categories.DataBinding.ID := TcxGridChartView(ASource).Categories.ID; - AssignItems(TcxGridChartView(ASource), GetDataGroupClass); - AssignItems(TcxGridChartView(ASource), GetSeriesClass); - end; - with TcxGridChartView(ASource) do - begin - Self.DiagramArea := DiagramArea; - Self.DiagramBar := DiagramBar; - Self.DiagramColumn := DiagramColumn; - Self.DiagramLine := DiagramLine; - Self.DiagramPie := DiagramPie; - Self.Legend := Legend; - Self.OptionsCustomize := OptionsCustomize; - Self.Title := Title; - Self.ToolBox := ToolBox; - Self.OnActiveDataLevelChanged := OnActiveDataLevelChanged; - Self.OnActiveDiagramChanged := OnActiveDiagramChanged; - Self.OnCustomDrawLegend := OnCustomDrawLegend; - Self.OnCustomDrawLegendItem := OnCustomDrawLegendItem; - Self.OnDataGroupPosChanged := OnDataGroupPosChanged; - Self.OnFirstVisibleCategoryIndexChanged := OnFirstVisibleCategoryIndexChanged; - Self.OnGetValueHint := OnGetValueHint; - Self.OnSeriesPosChanged := OnSeriesPosChanged; - Self.OnValueClick := OnValueClick; - end; - end; - inherited; -end; - -procedure TcxGridChartView.BeforeRestoring; -begin - inherited; - FRestoringDataGroups := TcxGridOpenChartItemList.Create; - FRestoringSeries := TcxGridOpenChartItemList.Create; -end; - -procedure TcxGridChartView.AfterRestoring; - - procedure AssignItemIndexes(AItems: TcxGridOpenChartItemList); - var - I, J: Integer; - begin - J := 0; - for I := 0 to AItems.Count - 1 do - if AItems[I] <> nil then - begin - AItems[I].Index := J; - Inc(J); - end; - end; - -begin - try - AssignItemIndexes(RestoringDataGroups); - AssignItemIndexes(RestoringSeries); - finally - FRestoringSeries.Free; - FRestoringDataGroups.Free; - inherited; - end; -end; - -procedure TcxGridChartView.DataControllerUnlocked; -begin - if DataGroupActiveValuesUpdateNeeded then - UpdateDataGroupActiveValues; -end; - -procedure TcxGridChartView.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - I: Integer; -begin - inherited; - for I := 0 to DataGroupCount - 1 do - if DataGroups[I].Owner = Root then Proc(DataGroups[I]); - for I := 0 to SeriesCount - 1 do - if Series[I].Owner = Root then Proc(Series[I]); -end; - -procedure TcxGridChartView.GetFakeComponentLinks(AList: TList); -var - I: Integer; -begin - inherited; - for I := 0 to DiagramCount - 1 do - Diagrams[I].Styles.GetFakeComponentLinks(AList); - for I := 0 to SeriesCount - 1 do - Series[I].Styles.GetFakeComponentLinks(AList); -end; - -procedure TcxGridChartView.RestoringComplete; -begin - inherited; - ActiveDataLevel := FRestoredActiveDataLevel; -end; - -procedure TcxGridChartView.SetChildOrder(Child: TComponent; Order: Integer); -begin - inherited; - if Child is GetDataGroupClass then - TcxGridChartDataGroup(Child).Index := Order; - if Child is GetSeriesClass then - TcxGridChartSeries(Child).Index := Order - DataGroupCount; -end; - -function ChartViewGetDataGroup(ACaller: TComponent; Index: Integer): TComponent; -begin - Result := TcxGridChartView(ACaller).DataGroups[Index]; -end; - -function ChartViewGetSeries(ACaller: TComponent; Index: Integer): TComponent; -begin - Result := TcxGridChartView(ACaller).Series[Index]; -end; - -procedure TcxGridChartView.SetName(const NewName: TComponentName); -var - AOldName: TComponentName; -begin - AOldName := Name; - inherited; - if Name <> AOldName then - begin - RenameComponents(Self, Owner, Name, AOldName, DataGroupCount, @ChartViewGetDataGroup); - RenameComponents(Self, Owner, Name, AOldName, SeriesCount, @ChartViewGetSeries); - end; -end; - -procedure TcxGridChartView.UpdateControl(AInfo: TcxUpdateControlInfo); -var - I: Integer; -begin - ViewData.Update(AInfo); - if not (IsLoading or IsDestroying) and - not (AInfo is TcxFocusedRecordChangedInfo) and not (AInfo is TcxFocusedRowChangedInfo) then - begin - LayoutChanged; - if (AInfo is TcxDataChangedInfo) or (AInfo is TcxLayoutChangedInfo) then - begin - Synchronize; - if AInfo is TcxDataChangedInfo then - for I := 0 to ItemCount - 1 do - Items[I].DataChanged; - end; - end; - inherited; -end; - -function TcxGridChartView.GetControllerClass: TcxCustomGridControllerClass; -begin - Result := TcxGridChartController; -end; - -function TcxGridChartView.GetDataControllerClass: TcxCustomDataControllerClass; -begin - Result := TcxGridChartDataController; -end; - -function TcxGridChartView.GetItemDataBindingClass: TcxGridChartItemDataBindingClass; -begin - Result := TcxGridChartItemDataBinding; -end; - -function TcxGridChartView.GetPainterClass: TcxCustomGridPainterClass; -begin - Result := TcxGridChartPainter; -end; - -function TcxGridChartView.GetViewDataClass: TcxCustomGridViewDataClass; -begin - Result := TcxGridChartViewData; -end; - -function TcxGridChartView.GetViewInfoClass: TcxCustomGridViewInfoClass; -begin - Result := TcxGridChartViewInfo; -end; - -function TcxGridChartView.GetLegendClass: TcxGridChartLegendClass; -begin - Result := TcxGridChartLegend; -end; - -function TcxGridChartView.GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; -begin - Result := TcxGridChartOptionsBehavior; -end; - -function TcxGridChartView.GetOptionsCustomizeClass: TcxGridChartOptionsCustomizeClass; -begin - Result := TcxGridChartOptionsCustomize; -end; - -function TcxGridChartView.GetOptionsViewClass: TcxCustomGridOptionsViewClass; -begin - Result := TcxGridChartOptionsView; -end; - -function TcxGridChartView.GetStylesClass: TcxCustomGridViewStylesClass; -begin - Result := TcxGridChartViewStyles; -end; - -function TcxGridChartView.GetTitleClass: TcxGridChartTitleClass; -begin - Result := TcxGridChartTitle; -end; - -function TcxGridChartView.GetToolBoxClass: TcxGridChartToolBoxClass; -begin - Result := TcxGridChartToolBox; -end; - -function TcxGridChartView.GetAreaDiagramClass: TcxGridChartAreaDiagramClass; -begin - Result := TcxGridChartAreaDiagram; -end; - -function TcxGridChartView.GetBarDiagramClass: TcxGridChartBarDiagramClass; -begin - Result := TcxGridChartBarDiagram; -end; - -function TcxGridChartView.GetCategoriesClass: TcxGridChartCategoriesClass; -begin - Result := TcxGridChartCategories; -end; - -function TcxGridChartView.GetColumnDiagramClass: TcxGridChartColumnDiagramClass; -begin - Result := TcxGridChartColumnDiagram; -end; - -function TcxGridChartView.GetLineDiagramClass: TcxGridChartLineDiagramClass; -begin - Result := TcxGridChartLineDiagram; -end; - -function TcxGridChartView.GetPieDiagramClass: TcxGridChartPieDiagramClass; -begin - Result := TcxGridChartPieDiagram; -end; - -function TcxGridChartView.GetCategoriesNamePath: string; -begin - Result := Name; - if Result <> '' then - Result := Result + '.'; - Result := Result + GetSubobjectName(Self, Categories); -end; - -procedure TcxGridChartView.AddDiagram(ADiagram: TcxGridChartDiagram); -begin - FDiagrams.Add(ADiagram); - if ADiagram.IsAvailable then - FAvailableDiagrams.Add(ADiagram); - ADiagram.SetGridView(Self); - if ActiveDiagram = nil then - ActiveDiagram := GetFirstAvailableDiagram; -end; - -procedure TcxGridChartView.RemoveDiagram(ADiagram: TcxGridChartDiagram); -begin - ADiagram.SetGridView(nil); - FAvailableDiagrams.Remove(ADiagram); - FDiagrams.Remove(ADiagram); - DiagramRemoved(ADiagram); - if ActiveDiagram = ADiagram then - ActiveDiagram := nil; -end; - -procedure TcxGridChartView.ClearDiagrams; -var - I: Integer; -begin - for I := DiagramCount - 1 downto 0 do - Diagrams[I].Free; -end; - -function TcxGridChartView.CreateDiagram(ADiagramClass: TcxGridChartDiagramClass): TcxGridChartDiagram; -begin - Result := ADiagramClass.Create(Self); -end; - -procedure TcxGridChartView.CreateDiagrams; -begin - FDiagramColumn := TcxGridChartColumnDiagram(CreateDiagram(GetColumnDiagramClass)); // should first to be default - FDiagramBar := TcxGridChartBarDiagram(CreateDiagram(GetBarDiagramClass)); - FDiagramLine := TcxGridChartLineDiagram(CreateDiagram(GetLineDiagramClass)); - FDiagramArea := TcxGridChartAreaDiagram(CreateDiagram(GetAreaDiagramClass)); - FDiagramPie := TcxGridChartPieDiagram(CreateDiagram(GetPieDiagramClass)); -end; - -procedure TcxGridChartView.DiagramRemoved(ADiagram: TcxGridChartDiagram); -begin - if ADiagram = FDiagramArea then - FDiagramArea := nil; - if ADiagram = FDiagramBar then - FDiagramBar := nil; - if ADiagram = FDiagramColumn then - FDiagramColumn := nil; - if ADiagram = FDiagramLine then - FDiagramLine := nil; - if ADiagram = FDiagramPie then - FDiagramPie := nil; -end; - -function TcxGridChartView.GetDiagramNamePath(ADiagram: TcxGridChartDiagram): string; -begin - Result := Name; - if Result <> '' then - Result := Result + '.'; - Result := Result + GetSubobjectName(Self, ADiagram); -end; - -function TcxGridChartView.GetFirstAvailableDiagram: TcxGridChartDiagram; -begin - if AvailableDiagramCount = 0 then - Result := nil - else - Result := AvailableDiagrams[0]; -end; - -procedure TcxGridChartView.RefreshAvailableDiagramList; -var - I: Integer; -begin - FAvailableDiagrams.Clear; - for I := 0 to DiagramCount - 1 do - if Diagrams[I].IsAvailable then - FAvailableDiagrams.Add(Diagrams[I]); -end; - -function TcxGridChartView.GetNextID: Integer; -begin - if FIDs = nil then - FIDs := TList.Create; - Result := FIDs.Add(Pointer(1)); -end; - -procedure TcxGridChartView.ReleaseID(AID: Integer); -var - I: Integer; -begin - FIDs[AID] := nil; - if AID = FIDs.Count - 1 then - begin - I := FIDs.Count - 1; - while (I >= 0) and (FIDs[I] = nil) do - Dec(I); - FIDs.Count := I + 1; - if FIDs.Count = 0 then - FreeAndNil(FIDs); - end; -end; - -procedure TcxGridChartView.DataSortingChanged(AItem: TObject); -begin - if AItem is GetSeriesClass then - begin - if TcxGridChartSeries(AItem).SortOrder <> soNone then - TcxGridChartSeries(AItem).DataBinding.SortIndex := 0; - UpdateDataSortingBySummary; - RefreshCustomizationForm; - end; -end; - -procedure TcxGridChartView.DataSortingChanging(AItem: TObject); - - procedure ClearSeriesSorting; - var - I: Integer; - ASortedItem: TObject; - begin - for I := FDataController.GetSortingItemCount - 1 downto 0 do - begin - ASortedItem := FDataController.GetItem(FDataController.GetSortingItemIndex(I)); - if ASortedItem is GetSeriesClass then - TcxGridChartSeries(ASortedItem).SortOrder := soNone; - end; - end; - -begin - if (AItem is GetSeriesClass) and (TcxGridChartSeries(AItem).SortOrder = soNone) then - ClearSeriesSorting; -end; - -procedure TcxGridChartView.UpdateDataController(AItem: TObject; - ADataBinding: TcxGridChartItemDataBinding; AAdd: Boolean); -begin - BeginUpdate; - try - if AAdd then - begin - ADataBinding.ID := GetNextID; - ADataBinding.DataField := FDataController.AddItem(AItem); - end - else - begin - ReleaseID(ADataBinding.ID); - ADataBinding.DataField := nil; - FDataController.RemoveItem(AItem); - end; - finally - EndUpdate; - end; -end; - -procedure TcxGridChartView.UpdateSummaryItemValues; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].GetDataBinding.UpdateSummaryItemValue; - UpdateDataSortingBySummary; -end; - -function TcxGridChartView.GetItemList(AItemClass: TcxGridChartItemClass): TList; -begin - if AItemClass = GetSeriesClass then - Result := FSeries - else - if AItemClass = GetDataGroupClass then - Result := FDataGroups - else - Result := nil; -end; - -function TcxGridChartView.GetItemList(AItem: TcxGridChartItem): TList; -begin - Result := GetItemList(TcxGridChartItemClass(AItem.ClassType)); -end; - -function TcxGridChartView.GetVisibleItemList(AItem: TcxGridChartItem): TList; -begin - if AItem is GetSeriesClass then - Result := FVisibleSeries - else - if AItem is GetDataGroupClass then - Result := FVisibleDataGroups - else - Result := nil; -end; - -procedure TcxGridChartView.AddItem(AItem: TcxGridChartItem); -begin -{$IFDEF DELPHI6} - if csTransient in ComponentStyle then - AItem.FComponentStyle := AItem.FComponentStyle + [csTransient]; -{$ENDIF} - BeginUpdate; - try - GetItemList(AItem).Add(AItem); - AItem.SetGridView(Self); - UpdateDataController(AItem, AItem.DataBinding, True); - ItemPosChanged(AItem); - if AItem.Visible then - ItemVisibilityChanged(AItem); - Changed(vcLayout); - finally - EndUpdate; - end; - RefreshCustomizationForm; -end; - -procedure TcxGridChartView.RemoveItem(AItem: TcxGridChartItem); -begin - BeginUpdate; - try - AItem.SetGridView(nil); - GetItemList(AItem).Remove(AItem); - if AItem.Visible then - ItemVisibilityChanged(AItem); - ItemPosChanged(AItem); - UpdateDataController(AItem, AItem.DataBinding, False); - Changed(vcLayout); - finally - EndUpdate; - end; - RefreshCustomizationForm; -end; - -function TcxGridChartView.GetItemIndex(AItem: TcxGridChartItem): Integer; -begin - Result := GetItemList(AItem).IndexOf(AItem); -end; - -procedure TcxGridChartView.SetItemIndex(AItem: TcxGridChartItem; AIndex: Integer); -begin - if GetItemIndex(AItem) <> AIndex then - begin - GetItemList(AItem).Move(GetItemIndex(AItem), AIndex); - ItemIndexChanged(AItem); - Changed(vcLayout); - RefreshCustomizationForm; - end; -end; - -procedure TcxGridChartView.DataGroupVisibilityChanged(ADataGroup: TcxGridChartDataGroup); -begin - UpdateDataLevels; -end; - -procedure TcxGridChartView.ItemDisplayTextChanged(AItem: TcxGridChartItem); -begin - RefreshCustomizationForm; -end; - -procedure TcxGridChartView.ItemIndexChanged(AItem: TcxGridChartItem); -begin - ItemPosChanged(AItem); - if AItem.Visible then - ItemVisibilityChanged(AItem); -end; - -procedure TcxGridChartView.ItemPosChanged(AItem: TcxGridChartItem); -begin - UpdateItemsOrder(TcxGridChartItemClass(AItem.ClassType)); - if AItem is GetSeriesClass then - begin - UpdateDataSortingBySummary; - ViewData.SeriesPosChanged(TcxGridChartSeries(AItem)); - end; -end; - -procedure TcxGridChartView.ItemVisibilityChanged(AItem: TcxGridChartItem); -begin - RefreshVisibleItemsList(GetItemList(AItem), GetVisibleItemList(AItem)); - if AItem is GetDataGroupClass then - DataGroupVisibilityChanged(TcxGridChartDataGroup(AItem)); - if AItem is GetSeriesClass then - SeriesVisibilityChanged(TcxGridChartSeries(AItem)); - RefreshCustomizationForm; -end; - -procedure TcxGridChartView.ItemVisibilityForCustomizationChanged(AItem: TcxGridChartItem); -begin - RefreshCustomizationForm; -end; - -procedure TcxGridChartView.SeriesVisibilityChanged(ASeries: TcxGridChartSeries); -begin -end; - -procedure TcxGridChartView.RefreshVisibleItemsList(AItems, AVisibleItems: TList); -var - I: Integer; - AItem: TcxGridChartItem; -begin - AVisibleItems.Clear; - for I := 0 to AItems.Count - 1 do - begin - AItem := TcxGridChartItem(AItems[I]); - if AItem.Visible then - AItem.FVisibleIndex := AVisibleItems.Add(AItem) - else - AItem.FVisibleIndex := -1; - end; -end; - -function CompareItemsByID(Item1, Item2: Pointer): Integer; -begin - Result := TcxGridChartItem(Item1).ID - TcxGridChartItem(Item2).ID; -end; - -procedure TcxGridChartView.UpdateItemsOrder(AItemClass: TcxGridChartItemClass); -var - AItems: TList; - I: Integer; -begin - AItems := TList.Create; - try - CopyList(GetItemList(AItemClass), AItems); - AItems.Sort(CompareItemsByID); - for I := 0 to AItems.Count - 1 do - TcxGridChartItem(AItems[I]).FOrder := I; - finally - AItems.Free; - end; -end; - -procedure TcxGridChartView.ClearItems(AItemClass: TcxGridChartItemClass); -var - AItems: TList; - I: Integer; -begin - AItems := GetItemList(AItemClass); - BeginUpdate; - try - for I := AItems.Count - 1 downto 0 do - TcxGridChartItem(AItems[I]).Free; - finally - EndUpdate; - end; -end; - -function TcxGridChartView.CreateItem(AItemClass: TcxGridChartItemClass): TcxGridChartItem; -begin - Result := AItemClass.Create(Owner); - AddItem(Result); -end; - -function TcxGridChartView.FindItemByID(AItemClass: TcxGridChartItemClass; - AID: Integer): TcxGridChartItem; -var - AItems: TList; - I: Integer; -begin - AItems := GetItemList(AItemClass); - for I := 0 to AItems.Count - 1 do - begin - Result := TcxGridChartItem(AItems[I]); - if Result.ID = AID then Exit; - end; - Result := nil; -end; - -function TcxGridChartView.FindItemByName(AItemClass: TcxGridChartItemClass; - const AName: string): TcxGridChartItem; -var - AItems: TList; - I: Integer; -begin - AItems := GetItemList(AItemClass); - for I := 0 to AItems.Count - 1 do - begin - Result := TcxGridChartItem(AItems[I]); - if Result.Name = AName then Exit; - end; - Result := nil; -end; - -function TcxGridChartView.FindItemByTag(AItemClass: TcxGridChartItemClass; - ATag: TcxTag): TcxGridChartItem; -var - AItems: TList; - I: Integer; -begin - AItems := GetItemList(AItemClass); - for I := 0 to AItems.Count - 1 do - begin - Result := TcxGridChartItem(AItems[I]); - if Result.Tag = ATag then Exit; - end; - Result := nil; -end; - -function TcxGridChartView.GetAvailableDataLevel(ALevel: Integer): Integer; -begin - for Result := 0 to ALevel - 1 do - if not DataLevelObjects[Result].HasActiveValue then Exit; - Result := ALevel; -end; - -function TcxGridChartView.GetDataLevelCount: Integer; -begin - Result := VisibleDataGroupCount + 1; -end; - -function TcxGridChartView.GetDataLevelObject(Index: Integer): TcxGridChartDataGroup; -begin - if Index < VisibleDataGroupCount then - Result := VisibleDataGroups[Index] - else - Result := nil; -end; - -function TcxGridChartView.GetDataObjectLevel(AObject: TcxGridChartDataGroup): Integer; -begin - Result := AObject.VisibleIndex; -end; - -procedure TcxGridChartView.SetDataObjectLevel(AObject: TcxGridChartDataGroup; ALevel: Integer); -begin - if ALevel = -1 then - AObject.Visible := False - else - if (0 <= ALevel) and (ALevel < VisibleDataGroupCount + Ord(not AObject.Visible)) then - begin - BeginUpdate; - try - AObject.Visible := True; - AObject.Index := DataLevelObjects[ALevel].Index; - finally - EndUpdate; - end; - end; -end; - -function TcxGridChartView.GetIsDataGrouped: Boolean; -begin - Result := VisibleDataGroupCount <> 0; -end; - -procedure TcxGridChartView.UpdateDataGroupActiveValues; -var - I: Integer; -begin - if FDataController.LockCount <> 0 then - begin - FDataGroupActiveValuesUpdateNeeded := True; - Exit; - end; - FDataGroupActiveValuesUpdateNeeded := False; - - for I := 0 to DataGroupCount - 1 do - DataGroups[I].CheckActiveValue; - ActiveDataLevel := ActiveDataLevel; -end; - -procedure TcxGridChartView.UpdateDataLevels; -var - I: Integer; -begin - BeginUpdate; - try -// ActiveDataLevel := ActiveDataLevel; - FDataController.Groups.ClearGrouping; - for I := 0 to VisibleDataGroupCount - 1 do - VisibleDataGroups[I].GroupIndex := I; - UpdateDataGroupActiveValues; - Controller.DataLevelsChanged; - finally - EndUpdate; - end; -end; - -procedure TcxGridChartView.UpdateDataSortingBySummary; -var - ASeries: TcxGridChartSeries; -begin - ASeries := SortedSeries; - if ASeries = nil then - FDataController.SortingBySummaryDataItemIndex := -1 - else - FDataController.SortingBySummaryDataItemIndex := ASeries.DataBinding.DataIndex; -end; - -procedure TcxGridChartView.CalculateImageWidth(var AWidth: Integer); -const - DefaultWidth = 700; -begin - if AWidth = 0 then - begin - if Control <> nil then - AWidth := Control.Width; - if AWidth = 0 then - AWidth := DefaultWidth; - end; -end; - -procedure TcxGridChartView.CalculateImageHeight(var AHeight: Integer); -const - DefaultHeight = 500; -begin - if AHeight = 0 then - begin - AHeight := TcxGridLevel(Level).Parent.MaxDetailHeight; - if AHeight = 0 then - begin - if Control <> nil then - AHeight := Control.Height; - if AHeight = 0 then - AHeight := DefaultHeight; - end; - end; -end; - -procedure TcxGridChartView.DoActiveDataLevelChanged; -begin - if Assigned(FOnActiveDataLevelChanged) then FOnActiveDataLevelChanged(Self); -end; - -procedure TcxGridChartView.DoActiveDiagramChanged(ADiagram: TcxGridChartDiagram); -begin - if Assigned(FOnActiveDiagramChanged) then FOnActiveDiagramChanged(Self, ADiagram); -end; - -procedure TcxGridChartView.DoCustomDrawLegend(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartLegendViewInfo; var ADone: Boolean); -begin - if HasCustomDrawLegend then - FOnCustomDrawLegend(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridChartView.DoCustomDrawLegendItem(ACanvas: TcxCanvas; - AViewInfo: TcxGridChartLegendItemViewInfo; var ADone: Boolean); -begin - if HasCustomDrawLegendItem then - FOnCustomDrawLegendItem(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridChartView.DoDataGroupPosChanged(ADataGroup: TcxGridChartDataGroup); -begin - if Assigned(FOnDataGroupPosChanged) then FOnDataGroupPosChanged(Self, ADataGroup); -end; - -procedure TcxGridChartView.DoFirstVisibleCategoryIndexChanged; -begin - if Assigned(FOnFirstVisibleCategoryIndexChanged) then - FOnFirstVisibleCategoryIndexChanged(Self); -end; - -procedure TcxGridChartView.DoGetValueHint(ASeries: TcxGridChartSeries; AValueIndex: Integer; - var AHint: string); -begin - if Assigned(FOnGetValueHint) then - FOnGetValueHint(Self, ASeries, AValueIndex, AHint); -end; - -procedure TcxGridChartView.DoSeriesPosChanged(ASeries: TcxGridChartSeries); -begin - if Assigned(FOnSeriesPosChanged) then FOnSeriesPosChanged(Self, ASeries); -end; - -function TcxGridChartView.DoValueClick(ASeries: TcxGridChartSeries; AValueIndex: Integer): Boolean; -begin - Result := False; - if Assigned(FOnValueClick) then - FOnValueClick(Self, ASeries, AValueIndex, Result); -end; - -function TcxGridChartView.HasCustomDrawLegend: Boolean; -begin - Result := Assigned(FOnCustomDrawLegend); -end; - -function TcxGridChartView.HasCustomDrawLegendItem: Boolean; -begin - Result := Assigned(FOnCustomDrawLegendItem); -end; - -{$IFNDEF DELPHI6} - -type - TGraphicAccess = class(TGraphic); - TGraphicAccessClass = class of TGraphicAccess; - -{$ENDIF} - -function TcxGridChartView.CreateImage(AGraphicClass: TGraphicClass; - AWidth: Integer = 0; AHeight: Integer = 0): TGraphic; - - procedure DrawImage(AImageCanvas: TCanvas); - var - AViewInfo: TcxCustomGridViewInfo; - ACanvas: TcxCanvas; - begin - AViewInfo := CreateViewInfo; - try - AViewInfo.IsInternalUse := True; - (AViewInfo as TcxGridChartViewInfo).IsImage := True; - AViewInfo.MainCalculate(Rect(0, 0, AWidth, AHeight)); - ACanvas := TcxCanvas.Create(AImageCanvas); - try - Painter.Paint(ACanvas, AViewInfo); - finally - ACanvas.Free; - end; - finally - AViewInfo.Free; - end; - end; - -var - AMetaFileCanvas: TMetaFileCanvas; -begin - if IsPattern or - not (AGraphicClass.InheritsFrom(TMetafile) or AGraphicClass.InheritsFrom(TBitmap)) then - begin - Result := nil; - Exit; - end; - CalculateImageWidth(AWidth); - CalculateImageHeight(AHeight); - Result := {$IFNDEF DELPHI6}TGraphicAccessClass{$ENDIF}(AGraphicClass).Create; - Result.Width := AWidth; - Result.Height := AHeight; - if Result is TMetaFile then - begin - Result.Transparent := True; - AMetaFileCanvas := TMetaFileCanvas.Create(TMetaFile(Result), 0); - try - DrawImage(AMetaFileCanvas); - finally - AMetaFileCanvas.Free; - end; - end - else - DrawImage(TBitmap(Result).Canvas); -end; - -function TcxGridChartView.FindDiagramByDisplayText(const ADisplayText: string): TcxGridChartDiagram; -var - I: Integer; -begin - for I := 0 to DiagramCount - 1 do - begin - Result := Diagrams[I]; - if Result.DisplayText = ADisplayText then Exit; - end; - Result := nil; -end; - -function TcxGridChartView.FindDiagramByID(const AID: string): TcxGridChartDiagram; -var - I: Integer; -begin - for I := 0 to DiagramCount - 1 do - begin - Result := Diagrams[I]; - if Result.ID = AID then Exit; - end; - Result := nil; -end; - -procedure TcxGridChartView.ClearSeries; -begin - ClearItems(GetSeriesClass); -end; - -function TcxGridChartView.CreateSeries: TcxGridChartSeries; -begin - Result := TcxGridChartSeries(CreateItem(GetSeriesClass)); -end; - -function TcxGridChartView.FindSeriesByID(AID: Integer): TcxGridChartSeries; -begin - Result := TcxGridChartSeries(FindItemByID(GetSeriesClass, AID)); -end; - -function TcxGridChartView.FindSeriesByName(const AName: string): TcxGridChartSeries; -begin - Result := TcxGridChartSeries(FindItemByName(GetSeriesClass, AName)); -end; - -function TcxGridChartView.FindSeriesByTag(ATag: TcxTag): TcxGridChartSeries; -begin - Result := TcxGridChartSeries(FindItemByTag(GetSeriesClass, ATag)); -end; - -function TcxGridChartView.GetSeriesClass: TcxGridChartSeriesClass; -begin - Result := TcxGridChartSeries; -end; - -procedure TcxGridChartView.ClearDataGroups; -begin - ClearItems(GetDataGroupClass); -end; - -function TcxGridChartView.CreateDataGroup: TcxGridChartDataGroup; -begin - Result := TcxGridChartDataGroup(CreateItem(GetDataGroupClass)); -end; - -function TcxGridChartView.FindDataGroupByID(AID: Integer): TcxGridChartDataGroup; -begin - Result := TcxGridChartDataGroup(FindItemByID(GetDataGroupClass, AID)); -end; - -function TcxGridChartView.FindDataGroupByName(const AName: string): TcxGridChartDataGroup; -begin - Result := TcxGridChartDataGroup(FindItemByName(GetDataGroupClass, AName)); -end; - -function TcxGridChartView.FindDataGroupByTag(ATag: TcxTag): TcxGridChartDataGroup; -begin - Result := TcxGridChartDataGroup(FindItemByTag(GetDataGroupClass, ATag)); -end; - -function TcxGridChartView.GetDataGroupClass: TcxGridChartDataGroupClass; -begin - Result := TcxGridChartDataGroup; -end; - -function TcxGridChartView.CanActivateDataLevel(ALevel: Integer): Boolean; -begin - Result := GetAvailableDataLevel(ALevel) = ALevel; -end; - -initialization - cxGridRegisteredViews.Register(TcxGridChartView, 'Chart'); - Classes.RegisterClasses([TcxGridChartDataGroup, TcxGridChartSeries]); - - cxGridChartDiagramImages := TImageList.Create(nil); - cxGridChartDiagramImages_Add('CXGRIDCHARTAREADIAGRAMBITMAP'); - cxGridChartDiagramImages_Add('CXGRIDCHARTBARDIAGRAMBITMAP'); - cxGridChartDiagramImages_Add('CXGRIDCHARTCOLUMNDIAGRAMBITMAP'); - cxGridChartDiagramImages_Add('CXGRIDCHARTLINEDIAGRAMBITMAP'); - cxGridChartDiagramImages_Add('CXGRIDCHARTPIEDIAGRAMBITMAP'); - - Screen.Cursors[crcxGridMagnifier] := LoadCursor(HInstance, 'CXGRIDCHARTMAGNIFIERCURSOR'); - Screen.Cursors[crcxGridDrag] := LoadCursor(HInstance, 'CXGRIDCHARTDRAGCURSOR'); - -finalization - FreeAndNil(cxGridChartDiagramImages); - - cxGridRegisteredViews.Unregister(TcxGridChartView); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridChartView.res b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridChartView.res deleted file mode 100644 index 6c0eb144..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridChartView.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCommon.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCommon.pas deleted file mode 100644 index 3e8b0a0f..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCommon.pas +++ /dev/null @@ -1,613 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridCommon; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, TypInfo, Classes, Graphics, Controls, ComCtrls, - cxClasses, cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters, - cxTreeView; - -const - ScxGridPrefixName = 'TcxGrid'; - - cxGridInvisibleCoordinate = 30000{100000}; - - cxGridCellTextOffset = 2; - cxGridEditOffset = 1; - cxGridHeaderTextOffset = 2; - - cxGridDesignViewBorderColor = 3577330; - cxGridDesignViewColor = 9295359; - cxGridDesignViewHotColor = 6862841;//6078705; - cxGridDesignSelectedBorderColor = 11504744;//clWhite; - cxGridDesignSelectedColor = 14991773; - cxGridDesignSelectedHotBorderColor = clDkGray;//12033927; - cxGridDesignSelectedHotColor = 14065255;//13747387; - -type - TcxGridCellState = (gcsNone, gcsSelected, gcsPressed); - - TcxGridClassEnumeratorProc = procedure(AClass: TClass) of object; - - { custom change } - - TcxCustomGridChange = class - private - FControl: TcxControl; - public - function CanExecuteWhenLocked: Boolean; virtual; - procedure Execute; virtual; abstract; - function IsCompatibleWith(AChange: TcxCustomGridChange): Boolean; virtual; - function IsCumulative: Boolean; virtual; - function IsEqual(AChange: TcxCustomGridChange): Boolean; virtual; - function IsLockable: Boolean; virtual; - property Control: TcxControl read FControl write FControl; // TcxCustomGrid - end; - - { custom drag open info } - - TcxCustomGridDragOpenInfo = class - public - function Equals(AInfo: TcxCustomGridDragOpenInfo): Boolean;{$IFDEF DELPHI12} reintroduce;{$ENDIF} virtual; - procedure Run; virtual; abstract; - end; - - { options tree view } - - TcxGridOptionsTreeViewGetTypeItemCaptionFunction = function(ATypeItem: Integer): string; - TcxGridOptionsTreeViewItemKind = (otikCategory, otikCheckBox, otikRadioButton); - - TcxGridOptionsTreeView = class(TcxTreeView) - private - FItemValuesUpdateLocked: Boolean; - FMaxID: Integer; - procedure WMDestroy(var Message: TWMDestroy); message WM_DESTROY; - procedure CustomDrawItem(Sender: TCustomTreeView; Node: TTreeNode; - State: TCustomDrawState; var DefaultDraw: Boolean); - procedure GetNodeImageIndex(Sender: TObject; Node: TTreeNode); - procedure GetNodeSelectedImageIndex(Sender: TObject; Node: TTreeNode); - protected - procedure CreateWnd; override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues); override; - - function AddItem(AParentID, AID: Integer; const ACaption: string; - AKind: TcxGridOptionsTreeViewItemKind): Integer; virtual; - procedure ClearItems; - function FindNodeByID(AID: Integer): TTreeNode; - function GetItemImageIndex(AKind: TcxGridOptionsTreeViewItemKind; AChecked: Boolean): Integer; - function GetNodeID(ANode: TTreeNode): Integer; - function GetNodeKind(ANode: TTreeNode): TcxGridOptionsTreeViewItemKind; - function GetNodeParentID(ANode: TTreeNode): Integer; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure NodeClicked(ANode: TTreeNode); virtual; - procedure RefreshImages; - procedure RefreshItemImageIndexes; - procedure ResetMaxID; - - function CalculateImagesSize: TSize; virtual; - procedure DrawImage(ACanvas: TcxCanvas; const ARect: TRect; - AItemKind: TcxGridOptionsTreeViewItemKind; AChecked: Boolean); virtual; - function GetCategoryBitmap: TBitmap; - function GetCategorySize: TSize; virtual; - function GetCheckBoxSize: TSize; virtual; - function GetRadioButtonSize: TSize; virtual; - - procedure AddItems; virtual; abstract; - function IsItemChecked(AParentID, AID: Integer): Boolean; virtual; abstract; - procedure ItemClicked(AParentID, AID: Integer); virtual; abstract; - - property ItemValuesUpdateLocked: Boolean read FItemValuesUpdateLocked - write FItemValuesUpdateLocked; - property MaxID: Integer read FMaxID; - public - constructor Create(AOwner: TComponent); override; - - function AddCategory(AParentID, AID: Integer; const ACaption: string): Integer; - function AddCheckBox(AParentID, AID: Integer; const ACaption: string): Integer; - function AddRadioButton(AParentID, AID: Integer; const ACaption: string): Integer; - procedure AddRadioButtons(AParentID: Integer; ATypeInfo: PTypeInfo; - AGetTypeItemCaption: TcxGridOptionsTreeViewGetTypeItemCaptionFunction); - - procedure RefreshItems; - procedure RefreshItemValues; - end; - -function GetValidName(AComponent: TComponent; const AName: string; - AIsBaseName: Boolean = False): string; - -procedure GetCellTextAreaSize(var ATextSize: Integer); -function GridCellStateToButtonState(ACellState: TcxGridCellState): TcxButtonState; - -implementation - -{$R cxGrid.res} - -uses - cxGeometry, Math, Forms, SysUtils, cxLibraryConsts; - -{ TcxCustomGridChange } - -function TcxCustomGridChange.CanExecuteWhenLocked: Boolean; -begin - Result:= True; -end; - -function TcxCustomGridChange.IsCompatibleWith(AChange: TcxCustomGridChange): Boolean; -begin - Result := False; -end; - -function TcxCustomGridChange.IsCumulative: Boolean; -begin - Result := True; -end; - -function TcxCustomGridChange.IsEqual(AChange: TcxCustomGridChange): Boolean; -begin - Result := ClassType = AChange.ClassType; -end; - -function TcxCustomGridChange.IsLockable: Boolean; -begin - Result := True; -end; - -{ TcxCustomGridDragOpenInfo } - -function TcxCustomGridDragOpenInfo.Equals(AInfo: TcxCustomGridDragOpenInfo): Boolean; -begin - Result := ClassType = AInfo.ClassType; -end; - -{ TcxGridOptionsTreeView } - -const - OptionsTreeViewMaxInternalID = 99; - -type - TOptionTreeNodeData = class - ID: Integer; - Kind: TcxGridOptionsTreeViewItemKind; - constructor Create(AID: Integer; AKind: TcxGridOptionsTreeViewItemKind); - end; - -constructor TOptionTreeNodeData.Create(AID: Integer; AKind: TcxGridOptionsTreeViewItemKind); -begin - inherited Create; - ID := AID; - Kind := AKind; -end; - -constructor TcxGridOptionsTreeView.Create(AOwner: TComponent); -begin - inherited; - ReadOnly := True; - ShowButtons := False; - ShowRoot := False; - Images := TImageList.Create(Self); - OnCustomDrawItem := CustomDrawItem; - OnGetImageIndex := GetNodeImageIndex; - OnGetSelectedIndex := GetNodeSelectedImageIndex; - ResetMaxID; -end; - -procedure TcxGridOptionsTreeView.WMDestroy(var Message: TWMDestroy); -begin - ClearItems; - inherited; -end; - -procedure TcxGridOptionsTreeView.CustomDrawItem(Sender: TCustomTreeView; Node: TTreeNode; - State: TCustomDrawState; var DefaultDraw: Boolean); -var - R: TRect; -begin - // to fix the bug in VCL tree view - Sender.Canvas.Font.Name := 'System'; - Sender.Canvas.Font.Name := Font.Name; - - if GetNodeKind(Node) = otikCategory then - begin - if Node.Level = 0 then - begin - R := Node.DisplayRect(False); - R.Left := Node.DisplayRect(True).Left; - if not (cdsSelected in State) then - Sender.Canvas.Brush.Color := clBtnShadow; - Sender.Canvas.FillRect(R); - end; - Sender.Canvas.Font.Style := [fsBold]; - end; -end; - -procedure TcxGridOptionsTreeView.GetNodeImageIndex(Sender: TObject; Node: TTreeNode); -begin - if GetNodeKind(Node) = otikCategory then - Node.ImageIndex := GetItemImageIndex(otikCategory, Node.Expanded); -end; - -procedure TcxGridOptionsTreeView.GetNodeSelectedImageIndex(Sender: TObject; Node: TTreeNode); -begin - if GetNodeKind(Node) = otikCategory then - Node.SelectedIndex := GetItemImageIndex(otikCategory, Node.Expanded); -end; - -procedure TcxGridOptionsTreeView.CreateWnd; -begin - inherited; - RefreshImages; - RefreshItems; -end; - -procedure TcxGridOptionsTreeView.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - inherited; - if not FIsCreating then - RefreshImages; -end; - -function TcxGridOptionsTreeView.AddItem(AParentID, AID: Integer; - const ACaption: string; AKind: TcxGridOptionsTreeViewItemKind): Integer; -var - AParent: TTreeNode; -begin - if AParentID = -1 then - AParent := nil - else - AParent := FindNodeByID(AParentID); - if AID = -1 then - begin - Inc(FMaxID); - AID := FMaxID; - end - else - FMaxID := Max(FMaxID, AID); - Result := AID; - Items.AddChildObject(AParent, ACaption, TOptionTreeNodeData.Create(AID, AKind)); -end; - -procedure TcxGridOptionsTreeView.ClearItems; -var - I: Integer; -begin - for I := 0 to Items.Count - 1 do - TOptionTreeNodeData(Items[I].Data).Free; - Items.Clear; -end; - -function TcxGridOptionsTreeView.FindNodeByID(AID: Integer): TTreeNode; -var - I: Integer; -begin - for I := 0 to Items.Count - 1 do - begin - Result := Items[I]; - if GetNodeID(Result) = AID then Exit; - end; - Result := nil; -end; - -function TcxGridOptionsTreeView.GetItemImageIndex(AKind: TcxGridOptionsTreeViewItemKind; - AChecked: Boolean): Integer; -begin - Result := 2 * Ord(AKind) + Ord(AChecked); -end; - -function TcxGridOptionsTreeView.GetNodeID(ANode: TTreeNode): Integer; -begin - Result := TOptionTreeNodeData(ANode.Data).ID; -end; - -function TcxGridOptionsTreeView.GetNodeKind(ANode: TTreeNode): TcxGridOptionsTreeViewItemKind; -begin - Result := TOptionTreeNodeData(ANode.Data).Kind; -end; - -function TcxGridOptionsTreeView.GetNodeParentID(ANode: TTreeNode): Integer; -begin - if ANode.Parent = nil then - Result := -1 - else - Result := GetNodeID(ANode.Parent); -end; - -procedure TcxGridOptionsTreeView.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited; - if (Key = VK_SPACE) and (Selected <> nil) then - NodeClicked(Selected); -end; - -procedure TcxGridOptionsTreeView.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -var - ANode: TTreeNode; -begin - if Button = mbLeft then - begin - ANode := GetNodeAt(X, Y); - if (ANode <> nil) and (htOnItem in GetHitTestInfoAt(X, Y)) then - NodeClicked(ANode); - end; - inherited; -end; - -procedure TcxGridOptionsTreeView.NodeClicked(ANode: TTreeNode); -begin - ItemValuesUpdateLocked := True; - try - ItemClicked(GetNodeParentID(ANode), GetNodeID(ANode)); - finally - ItemValuesUpdateLocked := False; - end; - RefreshItemValues; -end; - -procedure TcxGridOptionsTreeView.RefreshImages; -var - AImage: TBitmap; - AImageCanvas: TcxCanvas; - AImageRect: TRect; - AItemKind: TcxGridOptionsTreeViewItemKind; - AChecked: Boolean; -begin - if IsDestroying then Exit; - - Images.Clear; - with CalculateImagesSize do - begin - Images.Width := cx; - Images.Height := cy; - end; - - AImage := TBitmap.Create; - try - AImage.Width := Images.Width; - AImage.Height := Images.Height; - AImageCanvas := TcxCanvas.Create(AImage.Canvas); - try - AImageRect := Rect(0, 0, AImage.Width, AImage.Height); - for AItemKind := Low(AItemKind) to High(AItemKind) do - for AChecked := Low(AChecked) to High(AChecked) do - begin - AImage.Canvas.Brush.Color := Color; - AImage.Canvas.FillRect(AImageRect); - DrawImage(AImageCanvas, AImageRect, AItemKind, AChecked); - Images.Add(AImage, nil); - end; - finally - AImageCanvas.Free; - end; - finally - AImage.Free; - end; -end; - -procedure TcxGridOptionsTreeView.RefreshItemImageIndexes; -var - I: Integer; - ANode: TTreeNode; -begin - Items.BeginUpdate; - try - for I := 0 to Items.Count - 1 do - begin - ANode := Items[I]; - ANode.ImageIndex := GetItemImageIndex(GetNodeKind(ANode), - IsItemChecked(GetNodeParentID(ANode), GetNodeID(ANode))); - ANode.SelectedIndex := ANode.ImageIndex; - end; - finally - Items.EndUpdate; - end; -end; - -procedure TcxGridOptionsTreeView.ResetMaxID; -begin - FMaxID := OptionsTreeViewMaxInternalID; -end; - -function TcxGridOptionsTreeView.CalculateImagesSize: TSize; -begin - Result := GetCategorySize; - Result.cx := Max(Result.cx, Max(GetCheckBoxSize.cx, GetRadioButtonSize.cx)); - Result.cy := Max(Result.cy, Max(GetCheckBoxSize.cy, GetRadioButtonSize.cy)); -end; - -procedure TcxGridOptionsTreeView.DrawImage(ACanvas: TcxCanvas; const ARect: TRect; - AItemKind: TcxGridOptionsTreeViewItemKind; AChecked: Boolean); -var - R: TRect; - B: TBitmap; -begin - R := ARect; - case AItemKind of - otikCategory: - begin - R := cxRectCenter(R, GetCategorySize); - B := GetCategoryBitmap; - try - if AChecked then - ACanvas.RotateBitmap(B, raMinus90); - ACanvas.DrawGlyph(R.Left, R.Top, B); - finally - B.Free; - end; - end; - otikCheckBox: - begin - R := cxRectCenter(R, GetCheckBoxSize); - LookAndFeelPainter.DrawCheckButton(ACanvas, R, cxbsNormal, AChecked); - end; - otikRadioButton: - begin - R := cxRectCenter(R, GetRadioButtonSize); - LookAndFeelPainter.DrawRadioButton(ACanvas, R.Left, R.Top, cxbsNormal, - AChecked, False, ACanvas.Brush.Color); - end; - end; -end; - -function TcxGridOptionsTreeView.GetCategoryBitmap: TBitmap; -begin - Result := TBitmap.Create; - Result.LoadFromResourceName(HInstance, 'CXGRIDOPTIONSTREEVIEWCATEGORYBITMAP'); -end; - -function TcxGridOptionsTreeView.GetCategorySize: TSize; -begin - with GetCategoryBitmap do - try - Result.cx := Width; - Result.cy := Height; - finally - Free; - end; -end; - -function TcxGridOptionsTreeView.GetCheckBoxSize: TSize; -begin - Result := LookAndFeelPainter.CheckButtonSize; -end; - -function TcxGridOptionsTreeView.GetRadioButtonSize: TSize; -begin - Result := LookAndFeelPainter.RadioButtonSize; -end; - -function TcxGridOptionsTreeView.AddCategory(AParentID, AID: Integer; - const ACaption: string): Integer; -begin - Result := AddItem(AParentID, AID, ACaption, otikCategory); -end; - -function TcxGridOptionsTreeView.AddCheckBox(AParentID, AID: Integer; - const ACaption: string): Integer; -begin - Result := AddItem(AParentID, AID, ACaption, otikCheckBox); -end; - -function TcxGridOptionsTreeView.AddRadioButton(AParentID, AID: Integer; - const ACaption: string): Integer; -begin - Result := AddItem(AParentID, AID, ACaption, otikRadioButton); -end; - -procedure TcxGridOptionsTreeView.AddRadioButtons(AParentID: Integer; - ATypeInfo: PTypeInfo; AGetTypeItemCaption: TcxGridOptionsTreeViewGetTypeItemCaptionFunction); -var - ATypeData: PTypeData; - I: Integer; -begin - if ATypeInfo.Kind <> tkEnumeration then Exit; - ATypeData := GetTypeData(ATypeInfo); - for I := ATypeData.MinValue to ATypeData.MaxValue do - AddRadioButton(AParentID, I, AGetTypeItemCaption(I)); -end; - -procedure TcxGridOptionsTreeView.RefreshItems; -begin - Items.BeginUpdate; - try - ClearItems; - ResetMaxID; - AddItems; - RefreshItemValues; - FullExpand; - TopItem := Items.GetFirstNode; - finally - Items.EndUpdate; - end; -end; - -procedure TcxGridOptionsTreeView.RefreshItemValues; -begin - if not ItemValuesUpdateLocked then - RefreshItemImageIndexes; -end; - -{ functions } - -function GetValidName(AComponent: TComponent; const AName: string; - AIsBaseName: Boolean = False): string; -var - AOwner: TComponent; - I: Integer; - - function GetNextName: string; - begin - Result := AName + IntToStr(I); - Inc(I); - end; - -begin - Result := AName; - AOwner := AComponent.Owner; - if AOwner = nil then Exit; - I := 1; - if AIsBaseName then Result := GetNextName; - while AOwner.FindComponent(Result) <> nil do - Result := GetNextName; -end; - -procedure GetCellTextAreaSize(var ATextSize: Integer); -begin - Inc(ATextSize, 2 * cxGridCellTextOffset); -end; - -function GridCellStateToButtonState(ACellState: TcxGridCellState): TcxButtonState; -const - ButtonStates: array[TcxGridCellState] of TcxButtonState = - (cxbsNormal, cxbsHot, cxbsPressed); -begin - Result := ButtonStates[ACellState]; -end; - -initialization - crcxGridHorzSize := crcxHorzSize; - crcxGridVertSize := crcxVertSize; - crcxGridRemove := crcxRemove; - crcxGridNoDrop := crcxNoDrop; - crcxGridDrag := crcxDrag; - crcxGridMultiDrag := crcxDragMulti; - Screen.Cursors[crcxGridSelectRow] := LoadCursor(HInstance, 'CX_GRIDSELECTROWCURSOR'); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridConverter.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridConverter.pas deleted file mode 100644 index 2e99e120..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridConverter.pas +++ /dev/null @@ -1,230 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxGridConverter; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - DesignIntf, -{$ELSE} - DsgnIntf, -{$ENDIF} - Windows, - SysUtils, Classes, - cxConverterFactory, cxGrid, cxGridCustomView, cxGridLevel, cxGridDBBandedTableView, - cxStyles, cxClasses, cxGridStrs, cxGridStructureNavigator, cxDesignWindows; - -type - TcxCustomGridConverterClass = class of TcxCustomGridConverter; - - { TcxCustomGridConverter } - TcxCustomGridConverter = class(TcxCustomConverterWithStyles) - private - FDeleteAllSublevels: Boolean; - FDestinationLevel: TcxGridLevel; - FIntermediary: TComponent; - procedure ClearAllSublevels(ALevel: TcxGridLevel); - procedure ClearGrid; - procedure ClearSublevels(ALevel: TcxGridLevel); - function GetDestination: TcxCustomGrid; - function GetDestinationLevel: TcxGridLevel; - function GetcxGridView: TcxCustomGridView; - function GetSource: TComponent; - procedure SetIntermediary(AIntermediary: TComponent); - procedure SetSource(ASource: TComponent); - protected - function CanConvert: Boolean; override; - procedure DoImport; override; - procedure DoRealImport; virtual; - function GetGridViewClass: TcxCustomGridViewClass; virtual; - function TestIntermediary: Boolean; virtual; - function UniqueColumnName(AColumn: TComponent; const AFieldName: string = ''): string; - property cxGridView: TcxCustomGridView read GetcxGridView; - public - constructor Create(ADestination: TObject); override; - class function GetIntermediaryClassName: string; virtual; - property DeleteAllSublevels: Boolean read FDeleteAllSublevels write FDeleteAllSublevels; - property Destination: TcxCustomGrid read GetDestination; - property DestinationLevel: TcxGridLevel read FDestinationLevel write FDestinationLevel; - property Intermediary: TComponent read FIntermediary write SetIntermediary; - property Source: TComponent read GetSource write SetSource; - end; - -const - cxGridGroupConverterName = 'Grid Converters'; - -implementation - -uses - cxGridCommon; - -{ TcxCustomGridConverter } - -constructor TcxCustomGridConverter.Create(ADestination: TObject); -begin - inherited Create(ADestination); - FDeleteAllSublevels := True; -end; - -class function TcxCustomGridConverter.GetIntermediaryClassName: string; -begin - Result := ''; -end; - -function TcxCustomGridConverter.CanConvert: Boolean; -begin - Result := TestIntermediary; - if not Result then - MessageBox(0, PChar(Format(cxGetResourceString(@scxGridConverterIntermediaryMissing), - [GetIntermediaryClassName])), PChar(cxGetResourceString(@scxImportErrorCaption)), - MB_OK or MB_ICONINFORMATION); -end; - -procedure TcxCustomGridConverter.DoImport; -begin - Destination.BeginUpdate; - try - ClearGrid; - DoRealImport; - inherited DoImport; - finally - Destination.EndUpdate; - end; -end; - -procedure TcxCustomGridConverter.DoRealImport; -begin -end; - -function TcxCustomGridConverter.GetGridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridDBBandedTableView; -end; - -function TcxCustomGridConverter.TestIntermediary: Boolean; -begin - Result := True; -end; - -//var -// NCount: Integer = 0; - -function TcxCustomGridConverter.UniqueColumnName(AColumn: TComponent; const AFieldName: string): string; -begin -// Result := 'Column' + IntToStr(NCount); -// Inc(NCount); - Result := CreateUniqueName(AColumn.Owner, cxGridView, AColumn, ScxGridPrefixName, AFieldName); -end; - -procedure TcxCustomGridConverter.ClearAllSublevels(ALevel: TcxGridLevel); -var - I: Integer; -begin - for I := ALevel.Count - 1 downto 0 do - ClearSublevels(ALevel[I]); -end; - -procedure TcxCustomGridConverter.ClearGrid; -var - AOldView: TcxCustomGridView; -begin - FDestinationLevel := GetDestinationLevel; - AOldView := FDestinationLevel.GridView; - if FDestinationLevel.Name = '' then -// FDestinationLevel.Name := 'L1'; - FDestinationLevel.Name := GenLevelName(Destination, FDestinationLevel); - FDestinationLevel.GridView := Destination.CreateView(GetGridViewClass); -// FDestinationLevel.GridView.Name := 'V1'; - FDestinationLevel.GridView.Name := GenViewName(Destination, FDestinationLevel.GridView); - AOldView.Free; -end; - -procedure TcxCustomGridConverter.ClearSublevels(ALevel: TcxGridLevel); -var - I: Integer; -begin - for I := ALevel.Count - 1 downto 0 do - ClearSublevels(ALevel[I]); - ALevel.GridView.Free; - ALevel.Free; -end; - -function TcxCustomGridConverter.GetDestination: TcxCustomGrid; -begin - Result := inherited Destination as TcxCustomGrid; -end; - -function TcxCustomGridConverter.GetDestinationLevel: TcxGridLevel; -begin - Result := FDestinationLevel; - if Result = nil then - begin - if FDeleteAllSublevels then - ClearAllSublevels(Destination.Levels); - Result := Destination.Levels.Add; - end - else - begin - if FDeleteAllSublevels then - ClearAllSublevels(Result); - end; -end; - -function TcxCustomGridConverter.GetcxGridView: TcxCustomGridView; -begin - Result := FDestinationLevel.GridView; -end; - -function TcxCustomGridConverter.GetSource: TComponent; -begin - Result := inherited Source as TComponent; -end; - -procedure TcxCustomGridConverter.SetIntermediary(AIntermediary: TComponent); -begin - if AIntermediary <> nil then - if AIntermediary.ClassName = GetIntermediaryClassName then - FIntermediary := AIntermediary; -end; - -procedure TcxCustomGridConverter.SetSource(ASource: TComponent); -begin - inherited Source := ASource; -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCustomPopupMenu.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCustomPopupMenu.pas deleted file mode 100644 index d4dd3281..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCustomPopupMenu.pas +++ /dev/null @@ -1,776 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridCustomPopupMenu; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, Classes, SysUtils, Controls, Menus, dxCore, cxGridCustomView; - -const - cxhtGridBase = 1000; - -type - EcxGridPopupMenu = class(EdxException); - - TcxGridViewHitType = (gvhtGridNone, gvhtGridTab, gvhtNone, gvhtTab, gvhtCell, - gvhtExpandButton, gvhtRecord, gvhtNavigator, gvhtPreview, gvhtColumnHeader, - gvhtColumnHeaderFilterButton, gvhtFilter, gvhtFooter, gvhtFooterCell, - gvhtGroupFooter, gvhtGroupFooterCell, gvhtGroupByBox, gvhtIndicator, - gvhtRowIndicator, gvhtRowLevelIndent, gvhtBand, gvhtBandHeader, - gvhtRowCaption, gvhtSeparator, gvhtGroupSummary); - - TcxGridViewHitTypes = set of TcxGridViewHitType; - - TcxGridBeforePopupProc = procedure(ASenderMenu: TComponent; - AHitTest: TcxCustomGridHitTest; X,Y: Integer; var AllowPopup: Boolean) of object; - - TcxGridOnPopupProc = procedure(ASenderMenu: TComponent; - AHitTest: TcxCustomGridHitTest; X,Y: Integer) of object; - - TcxGridPopupMenuItemClickProc = procedure(ASender: TObject; - AHitTest: TcxCustomGridHitTest; var AHandler: TNotifyEvent; - AParams: TList; var AHandled: Boolean) of object; - - IDoPopup = interface - ['{41999EDE-B9D9-4808-9D01-61B09DF700FA}'] - function GetPopupHandler: TcxGridOnPopupProc; - end; - - IcxGridPopupMenu = interface - ['{302C3B32-D753-43A6-BAE2-F513EB4F9399}'] - function CanPopup(AHitTest: TcxCustomGridHitTest): Boolean; - end; - - TcxPopupMenuInfo = Class(TCollectionItem) - private - FPopupMenu: TComponent; - FPopupProc: TcxGridOnPopupProc; - FHitTypes: TcxGridViewHitTypes; - FLocked: Boolean; - FView: TcxCustomGridView; - FViewClass: TcxCustomGridViewClass; - function FindCorrectComponent(const AComponent: TComponent): TComponent; - procedure SetPopupMenu(const AValue: TComponent); - procedure SetView(const AValue: TcxCustomGridView); - procedure SetViewClass(const Value: TcxCustomGridViewClass); - protected - FIsBuiltIn: Boolean; - procedure BeginUpdate; virtual; - procedure EndUpdate; virtual; - function CanPopup(AHitTest: TcxCustomGridHitTest): Boolean; - procedure DoChanged(const APopupMenu: TComponent; const AView: TcxCustomGridView; - AViewClass: TcxCustomGridViewClass); virtual; - property GridViewClass: TcxCustomGridViewClass read FViewClass write SetViewClass; - public - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - property IsBuiltIn: Boolean read FIsBuiltIn; - published - property GridView: TcxCustomGridView read FView write SetView; - property HitTypes: TcxGridViewHitTypes read FHitTypes write FHitTypes; - property Index; - property OnPopup: TcxGridOnPopupProc read FPopupProc write FPopupProc; - property PopupMenu: TComponent read FPopupMenu write SetPopupMenu; - end; - - TcxPopupMenuInfos = class(TCollection) - private - FOwner: TComponent; - function GetItem(AIndex: Integer): TcxPopupMenuInfo; - procedure SetItem(AIndex: Integer; const AValue: TcxPopupMenuInfo); - protected - function GetOwner: TPersistent; override; - function IsMenuInfoShortCut(AMenuInfo: TcxPopupMenuInfo; - var Message: TWMKey): Boolean; virtual; - function IsShortCut(var Message: TWMKey): Boolean; virtual; - {$IFDEF DELPHI6} - procedure Notify(Item: TCollectionItem; Action: TCollectionNotification); override; - {$ENDIF} - public - constructor Create(AOwner: TComponent); virtual; - function GetSameMenuCount(const AMenu: TComponent): Integer; - property Items[AIndex: Integer]: TcxPopupMenuInfo read GetItem write SetItem; default; - end; - - TcxCustomGridPopupMenu = class(TComponent) - private - FPopupMenuInfos: TcxPopupMenuInfos; - function GetMenuInfo(AIndex: Integer): TcxPopupMenuInfo; - function GetMenuInfoCount: Integer; - procedure SetPopupMenuInfos(const AValue: TcxPopupMenuInfos); - protected - procedure AddMenuInfo(const AMenu: TComponent; AHitTypes: TcxGridViewHitTypes; - ADoPopupProc: TcxGridOnPopupProc; AViewClass: TcxCustomGridViewClass = nil; - const AView: TcxCustomGridView = nil; AIsBuiltIn: Boolean = False); - procedure AdjustMenuInfo(AMenuInfo: TcxPopupMenuInfo; - const AMenu: TComponent; AHitTypes: TcxGridViewHitTypes; - ADoPopupProc: TcxGridOnPopupProc; AViewClass: TcxCustomGridViewClass = nil; - const AView: TcxCustomGridView = nil; AIsBuiltIn: Boolean = False); - procedure ClearMenuInfosGridView(const AView: TcxCustomGridView = nil); - function GetPopupMenuInfo(const AMenu: TComponent; const AView: TcxCustomGridView; - ASearchDefault: Boolean = True): TcxPopupMenuInfo; overload; virtual; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - property PopupMenuInfos: TcxPopupMenuInfos read FPopupMenuInfos write SetPopupMenuInfos; - property MenuInfos[AIndex: Integer]: TcxPopupMenuInfo read GetMenuInfo; default; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function CheckShortCuts(var Message: TWMKeyDown): Boolean; virtual; - function FindPopupMenuInfo(const AView: TcxCustomGridView; - AHitType: TcxGridViewHitType; AHitTest: TcxCustomGridHitTest): TcxPopupMenuInfo; virtual; - function GetPopupMenuInfo(const AMenu: TComponent; AViewClass: TcxCustomGridViewClass; - ASearchDefault: Boolean = True): TcxPopupMenuInfo; overload; virtual; - property Count: Integer read GetMenuInfoCount; - end; - - TcxGridDefaultPopupMenu = class(TcxCustomGridPopupMenu) - protected - function GetPopupMenuInfo(const AMenu: TComponent; const AView: TcxCustomGridView; - ASearchDefault: Boolean = True): TcxPopupMenuInfo; overload; override; - procedure InternalRegisterPopupMenu(const AMenu: TComponent; - AHitTypes: TcxGridViewHitTypes; ADoPopupProc: TcxGridOnPopupProc; - AViewClass: TcxCustomGridViewClass; AIsBuiltIn: Boolean = False); virtual; - public - function GetPopupMenuInfo(const AMenu: TComponent; AViewClass: TcxCustomGridViewClass; - ASearchDefault: Boolean = True): TcxPopupMenuInfo; overload; override; - procedure RegisterPopupMenu(const AMenu: TComponent; AHitTypes: TcxGridViewHitTypes; - ADoPopupProc: TcxGridOnPopupProc; AViewClass: TcxCustomGridViewClass); virtual; - procedure UnRegisterPopupMenu(const AMenu: TComponent; AViewClass: TcxCustomGridViewClass; - AHitTypes: TcxGridViewHitTypes = []); virtual; - property MenuInfos; - end; - - TcxPopupMenuClass = class of TComponent; - - TcxPopupMenuClassInfoRec = class - public - MenuClass: TcxPopupMenuClass; - HitTypes: TcxGridViewHitTypes; - ViewClass: TcxCustomGridViewClass; - constructor Create(AMenuClass: TcxPopupMenuClass; AHitTypes: TcxGridViewHitTypes; - AViewClass: TcxCustomGridViewClass); - end; - - TcxBuiltInPopupMenus = class - private - FInfoRecs: TList; - function GetCount: Integer; - function GetItem(AIndex: Integer): TcxPopupMenuClassInfoRec; - protected - function Add(AMenuClass: TcxPopupMenuClass; AHitTypes: TcxGridViewHitTypes; - AViewClass: TcxCustomGridViewClass): TcxPopupMenuClassInfoRec; - procedure Clear; - procedure Delete(AIndex: Integer); - procedure RegisterItemTo(ADefaultPopupMenu: TcxGridDefaultPopupMenu; - AItemIndex: Integer); - procedure Remove(APopupMenuClass: TcxPopupMenuClass); - - property Count: Integer read GetCount; - property Items[AIndex: Integer]: TcxPopupMenuClassInfoRec read GetItem; default; - public - constructor Create; - destructor Destroy; override; - procedure RegisterItemsTo(ADefaultPopupMenu: TcxGridDefaultPopupMenu); - end; - - function GetHitTypeByHitCode(AHitCode: Integer): TcxGridViewHitType; - - procedure RegisterPopupMenuClass(APopupMenuClass: TcxPopupMenuClass; - AHitTypes: TcxGridViewHitTypes; AViewClass: TcxCustomGridViewClass); - procedure UnregisterPopupMenuClass(APopupMenuClass: TcxPopupMenuClass); - -var - BuiltInPopupMenuList: TcxBuiltInPopupMenus; - -implementation - -uses - cxGridCustomTableView, cxGridTableView, Graphics, cxGridDetailsSite, - cxGridRows, cxGridBandedTableView, cxGridCardView, cxControls; - -function GetHitTypeByHitCode(AHitCode: Integer): TcxGridViewHitType; -const - cxGridViewHitCodes: array[TcxGridViewHitType] of Integer = (htNone + cxhtGridBase, - htTab + cxhtGridBase, htNone, htTab, htCell, htExpandButton, htRecord, htNavigator, - htPreview, htColumnHeader, htColumnHeaderFilterButton, htFilter, htFooter, htFooterCell, - htGroupFooter, htGroupFooterCell, htGroupByBox, htIndicator, htRowIndicator, - htRowLevelIndent, htBand, htBandHeader, htRowCaption, htSeparator, htGroupSummary); -begin - for Result := Low(Result) to High(Result) do - if cxGridViewHitCodes[Result] = AHitCode then - Exit; - Result := TcxGridViewHitType(-1); -end; - -{ TcxPopupMenuInfo } - -procedure TcxPopupMenuInfo.BeginUpdate; -begin - FLocked := True; -end; - -procedure TcxPopupMenuInfo.EndUpdate; -begin - FLocked := False; -end; - -function TcxPopupMenuInfo.CanPopup(AHitTest: TcxCustomGridHitTest): Boolean; -var - APopupMenuIntf: IcxGridPopupMenu; -begin - if (PopupMenu <> nil) and Supports(PopupMenu, IcxGridPopupMenu, APopupMenuIntf) then - Result := APopupMenuIntf.CanPopup(AHitTest) - else - Result := True; -end; - -procedure TcxPopupMenuInfo.DoChanged(const APopupMenu: TComponent; - const AView: TcxCustomGridView; AViewClass: TcxCustomGridViewClass); -var - AMenuInfo: TcxPopupMenuInfo; - MenuInfos: TcxPopupMenuInfos; -begin - AMenuInfo := nil; - if FLocked then exit; - MenuInfos := TcxPopupMenuInfos(Collection); - if Assigned(AView) then - AMenuInfo := - TcxCustomGridPopupMenu(MenuInfos.GetOwner).GetPopupMenuInfo(APopupMenu, AView) - else - begin - if Assigned(AViewClass) and (MenuInfos.GetOwner is TcxGridDefaultPopupMenu) then - AMenuInfo := - TcxGridDefaultPopupMenu(MenuInfos.GetOwner).GetPopupMenuInfo(APopupMenu, AViewClass); - end; - if (AMenuInfo <> nil) and (MenuInfos.GetOwner <> nil) and - not (csLoading in (MenuInfos.GetOwner as TComponent).ComponentState) then - Raise EcxGridPopupMenu.Create( - Format('This PopupMenuInfo is already registered. Index: %d',[AMenuInfo.Index])); -end; - -function TcxPopupMenuInfo.FindCorrectComponent(const AComponent: TComponent): TComponent; -var - AOwner: TComponent; -begin - Result := AComponent; - if not Assigned(AComponent) then - Exit; - AOwner := TComponent(TcxPopupMenuInfos(Collection).GetOwner); - while AOwner.InheritsFrom(TcxCustomGridPopupMenu) do - AOwner := TcxCustomGridPopupMenu(AOwner).Owner; - with AOwner do - if (csUpdating in ComponentState) then - begin - Result := FindComponent(AComponent.Name); - if not Assigned(Result) or (Result.ClassType <> AComponent.ClassType) then - Result := AComponent; - end; -end; - -procedure TcxPopupMenuInfo.SetPopupMenu(const AValue: TComponent); -begin - if FPopupMenu <> AValue then - begin - if (TcxPopupMenuInfos(Collection).GetSameMenuCount(FPopupMenu) = 1) and - (FPopupMenu <> nil) and not (csDestroying in FPopupMenu.ComponentState) then - FPopupMenu.RemoveFreeNotification(TComponent(TcxPopupMenuInfos(Collection).GetOwner)); - DoChanged(AValue, FView, FViewClass); - if FIsBuiltIn then - begin - FIsBuiltIn := False; - FreeAndNil(FPopupMenu); - end; - FPopupMenu := AValue; - if FPopupMenu <> nil then - FPopupMenu.FreeNotification(TComponent(TcxPopupMenuInfos(Collection).GetOwner)); - end; -end; - -procedure TcxPopupMenuInfo.SetView(const AValue: TcxCustomGridView); -begin - if FView <> AValue then - begin - if Assigned(FView) and not (csDestroying in FView.ComponentState) then - FView.RemoveFreeNotification(TComponent(TcxPopupMenuInfos(Collection).GetOwner)); - DoChanged(FPopupMenu, AValue, FViewClass); - FView := AValue; - if Assigned(FView) then - FView.FreeNotification(TComponent(TcxPopupMenuInfos(Collection).GetOwner)); - end; -end; - -procedure TcxPopupMenuInfo.SetViewClass( - const Value: TcxCustomGridViewClass); -begin - DoChanged(FPopupMenu, FView, Value); - FViewClass := Value; -end; - -destructor TcxPopupMenuInfo.Destroy; -begin - if FIsBuiltIn then - FreeAndNil(FPopupMenu); - inherited Destroy; -end; - -procedure TcxPopupMenuInfo.Assign(Source: TPersistent); -var - AMenuInfo: TcxPopupMenuInfo; -begin - if Source is TcxPopupMenuInfo then - begin - if Collection <> nil then - Collection.BeginUpdate; - try - BeginUpdate; - try - AMenuInfo := TcxPopupMenuInfo(Source); - Index := AMenuInfo.Index; - PopupMenu := FindCorrectComponent(AMenuInfo.PopupMenu); - OnPopup := AMenuInfo.OnPopup; - HitTypes := AMenuInfo.HitTypes; - GridView := TcxCustomGridView(FindCorrectComponent(AMenuInfo.GridView)); - GridViewClass := AMenuInfo.GridViewClass; - finally - EndUpdate; - end; - finally - if Collection <> nil then - Collection.EndUpdate; - end; - end - else - inherited; -end; - -{ TcxCustomGridPopupMenu } - -constructor TcxCustomGridPopupMenu.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FPopupMenuInfos := TcxPopupMenuInfos.Create(Self); -end; - -destructor TcxCustomGridPopupMenu.Destroy; -begin - FreeAndNil(FPopupMenuInfos); - inherited Destroy; -end; - -function TcxCustomGridPopupMenu.CheckShortCuts(var Message: TWMKeyDown): Boolean; -begin - Result := not (csDesigning in ComponentState) and - FPopupMenuInfos.IsShortCut(Message); - Message.Result := Message.Result or Integer(Result); -end; - -function TcxCustomGridPopupMenu.FindPopupMenuInfo(const AView: TcxCustomGridView; - AHitType: TcxGridViewHitType; AHitTest: TcxCustomGridHitTest): TcxPopupMenuInfo; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - if AHitType in MenuInfos[I].HitTypes then - if ((AHitType in [gvhtGridNone, gvhtGridTab]) or (MenuInfos[I].GridView = AView)) and - MenuInfos[I].CanPopup(AHitTest) then - begin - Result := MenuInfos[I]; - Break; - end - else - if AView.InheritsFrom(MenuInfos[I].GridViewClass) and - ((Result = nil) or MenuInfos[I].GridViewClass.InheritsFrom(Result.GridViewClass)) and - MenuInfos[I].CanPopup(AHitTest) then - Result := MenuInfos[I]; -end; - -function TcxCustomGridPopupMenu.GetPopupMenuInfo(const AMenu: TComponent; - const AView: TcxCustomGridView; ASearchDefault: Boolean): TcxPopupMenuInfo; -begin - Result := Nil; -end; - -function TcxCustomGridPopupMenu.GetPopupMenuInfo(const AMenu: TComponent; - AViewClass: TcxCustomGridViewClass; ASearchDefault: Boolean = True): TcxPopupMenuInfo; -begin - Result := nil; -end; - -procedure TcxCustomGridPopupMenu.Notification(AComponent: TComponent; - Operation: TOperation); -var - i: Integer; -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) then - begin - if AComponent.InheritsFrom(TcxCustomGridView) then - ClearMenuInfosGridView(TcxCustomGridView(AComponent)) - else - if Assigned(FPopupMenuInfos) then - begin - i := FPopupMenuInfos.Count - 1; - while i >= 0 do - with FPopupMenuInfos[i] do - begin - if PopupMenu = AComponent then - FPopupMenu := nil; - i := i - 1; - end; - end; - end; -end; - -procedure TcxCustomGridPopupMenu.AddMenuInfo(const AMenu: TComponent; - AHitTypes: TcxGridViewHitTypes; ADoPopupProc: TcxGridOnPopupProc; - AViewClass: TcxCustomGridViewClass; const AView: TcxCustomGridView; - AIsBuiltIn: Boolean); -begin - with TcxPopupMenuInfo(FPopupMenuInfos.Add) do - begin - BeginUpdate; - try - PopupMenu := AMenu; - OnPopup := ADoPopupProc; - GridView := AView; - GridViewClass := AViewClass; - HitTypes := AHitTypes; - FIsBuiltIn := AIsBuiltIn; - finally - EndUpdate; - end; - end; -end; - -procedure TcxCustomGridPopupMenu.AdjustMenuInfo(AMenuInfo: TcxPopupMenuInfo; - const AMenu: TComponent; AHitTypes: TcxGridViewHitTypes; - ADoPopupProc: TcxGridOnPopupProc; AViewClass: TcxCustomGridViewClass = nil; - const AView: TcxCustomGridView = nil; AIsBuiltIn: Boolean = False); -begin - if AMenuInfo <> nil then - AMenuInfo.HitTypes := AMenuInfo.HitTypes + AHitTypes - else - AddMenuInfo(AMenu, AHitTypes, ADoPopupProc, AViewClass, AView, AIsBuiltIn); -end; - -procedure TcxCustomGridPopupMenu.ClearMenuInfosGridView( - const AView: TcxCustomGridView = nil); -var - I: Integer; -begin - for I := 0 to PopupMenuInfos.Count - 1 do - with PopupMenuInfos[I] do - begin - if Assigned(AView) and (GridView <> AView) then - Continue; - BeginUpdate; - try - GridView := nil; - finally - EndUpdate; - end; - end; -end; - -function TcxCustomGridPopupMenu.GetMenuInfo(AIndex: Integer): TcxPopupMenuInfo; -begin - Result := FPopupMenuInfos[AIndex]; -end; - -function TcxCustomGridPopupMenu.GetMenuInfoCount: Integer; -begin - Result := FPopupMenuInfos.Count; -end; - -procedure TcxCustomGridPopupMenu.SetPopupMenuInfos(const AValue: TcxPopupMenuInfos); -begin - FPopupMenuInfos := AValue; -end; - -{ TcxGridDefaultPopupMenu } - -function TcxGridDefaultPopupMenu.GetPopupMenuInfo(const AMenu: TComponent; - AViewClass: TcxCustomGridViewClass; ASearchDefault: Boolean): TcxPopupMenuInfo; -var - I : Integer; - AClass: TcxCustomGridViewClass; -begin - Result := nil; - for I := 0 to Count - 1 do - if AMenu = MenuInfos[I].PopupMenu then - begin - AClass := MenuInfos[I].GridViewClass; - if (AViewClass = AClass) then - begin - Result := MenuInfos[I]; - exit; - end; - if AViewClass.InheritsFrom(AClass) and ASearchDefault then - if (Result = nil) or AClass.InheritsFrom(Result.GridViewClass) then - begin - Result := MenuInfos[I]; - end; - end; -end; - -procedure TcxGridDefaultPopupMenu.RegisterPopupMenu(const AMenu: TComponent; - AHitTypes: TcxGridViewHitTypes; ADoPopupProc: TcxGridOnPopupProc; - AViewClass: TcxCustomGridViewClass); -begin - InternalRegisterPopupMenu(AMenu, AHitTypes, ADoPopupProc, AViewClass); -end; - -procedure TcxGridDefaultPopupMenu.UnRegisterPopupMenu(const AMenu: TComponent; - AViewClass: TcxCustomGridViewClass; AHitTypes: TcxGridViewHitTypes); -var - AMenuInfo: TcxPopupMenuInfo; -begin - AMenuInfo := GetPopupMenuInfo(AMenu, AViewClass, false); - If AMenuInfo <> nil then - If AMenuInfo.HitTypes = AHitTypes then - AMenuInfo.Free - else - AMenuInfo.HitTypes := AMenuInfo.HitTypes - AHitTypes; -end; - -function TcxGridDefaultPopupMenu.GetPopupMenuInfo(const AMenu: TComponent; - const AView: TcxCustomGridView; ASearchDefault: Boolean): TcxPopupMenuInfo; -begin - Result := GetPopupMenuInfo(AMenu,TcxCustomGridViewClass(AView.ClassType), - ASearchDefault); -end; - -procedure TcxGridDefaultPopupMenu.InternalRegisterPopupMenu( - const AMenu: TComponent; AHitTypes: TcxGridViewHitTypes; - ADoPopupProc: TcxGridOnPopupProc; AViewClass: TcxCustomGridViewClass; - AIsBuiltIn: Boolean); -begin - if not Assigned(AViewClass) then exit; - AdjustMenuInfo(GetPopupMenuInfo(AMenu, AViewClass), AMenu, AHitTypes, - ADoPopupProc, AViewClass, nil ,AIsBuiltIn); -end; - -{ TcxPopupMenuInfos } - -constructor TcxPopupMenuInfos.Create(AOwner: TComponent); -begin - FOwner := AOwner; - inherited Create(TcxPopupMenuInfo); -end; - -function TcxPopupMenuInfos.GetSameMenuCount( - const AMenu: TComponent): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - if Items[I].PopupMenu = AMenu then - Inc(Result); -end; - -function TcxPopupMenuInfos.GetOwner: TPersistent; -begin - Result := FOwner; -end; - -function TcxPopupMenuInfos.IsMenuInfoShortCut(AMenuInfo: TcxPopupMenuInfo; - var Message: TWMKey): Boolean; -var - AIcxPopupMenu: IcxPopupMenu; -begin - Result := Assigned(AMenuInfo.PopupMenu); - if not Result then - Exit; - Result := (AMenuInfo.PopupMenu is TPopupMenu); - if Result then - Result := (AMenuInfo.PopupMenu as TPopupMenu).IsShortCut(Message) - else - begin - Result := Supports(AMenuInfo.PopupMenu, IcxPopupMenu, AIcxPopupMenu) and - (AIcxPopupMenu <> nil); - if Result then - Result := AIcxPopupMenu.IsShortCutKey(Message); - end; -end; - -function TcxPopupMenuInfos.IsShortCut(var Message: TWMKey): Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to Count - 1 do - begin - Result := IsMenuInfoShortCut(Items[I], Message); - if Result then - Break; - end; -end; - -{$IFDEF DELPHI6} -procedure TcxPopupMenuInfos.Notify(Item: TCollectionItem; - Action: TCollectionNotification); -begin - If Action = cnDeleting then TcxPopupMenuInfo(Item).PopupMenu := nil; - inherited; -end; -{$ENDIF} - -function TcxPopupMenuInfos.GetItem(AIndex: Integer): TcxPopupMenuInfo; -begin - Result := TcxPopupMenuInfo(inherited GetItem(AIndex)); -end; - -procedure TcxPopupMenuInfos.SetItem(AIndex: Integer; - const AValue: TcxPopupMenuInfo); -begin - inherited SetItem(AIndex , AValue); -end; - -{ TcxPopupMenuClassInfoRec } - -constructor TcxPopupMenuClassInfoRec.Create(AMenuClass: TcxPopupMenuClass; - AHitTypes: TcxGridViewHitTypes; AViewClass: TcxCustomGridViewClass); -begin - inherited Create; - MenuClass := AMenuClass; - HitTypes := AHitTypes; - ViewClass := AViewClass; -end; - -{ TcxBuiltInPopupMenus } - -constructor TcxBuiltInPopupMenus.Create; -begin - inherited; - FInfoRecs := TList.Create; -end; - -destructor TcxBuiltInPopupMenus.Destroy; -begin - Clear; - FreeAndNil(FInfoRecs); - inherited; -end; - -function TcxBuiltInPopupMenus.GetCount: Integer; -begin - Result := FInfoRecs.Count; -end; - -function TcxBuiltInPopupMenus.GetItem(AIndex: Integer): TcxPopupMenuClassInfoRec; -begin - Result := TcxPopupMenuClassInfoRec(FInfoRecs[AIndex]); -end; - -function TcxBuiltInPopupMenus.Add(AMenuClass: TcxPopupMenuClass; - AHitTypes: TcxGridViewHitTypes; AViewClass: TcxCustomGridViewClass): TcxPopupMenuClassInfoRec; -begin - Result := TcxPopupMenuClassInfoRec.Create(AMenuClass, AHitTypes, AViewClass); - FInfoRecs.Add(Result); -end; - -procedure TcxBuiltInPopupMenus.Clear; -begin - while Count <> 0 do - Delete(Count - 1); -end; - -procedure TcxBuiltInPopupMenus.Delete(AIndex: Integer); -begin - Items[AIndex].Free; - FInfoRecs.Delete(AIndex); -end; - -procedure TcxBuiltInPopupMenus.RegisterItemTo(ADefaultPopupMenu: TcxGridDefaultPopupMenu; - AItemIndex: Integer); -var - AMenu: TComponent; - AIDoPopup: IDoPopup; - ADoPopupProc: TcxGridOnPopupProc; -begin - AMenu := Items[AItemIndex].MenuClass.Create(nil); - if Supports(AMenu, IDoPopup, AIDoPopup) then - ADoPopupProc := AIDoPopup.GetPopupHandler - else - ADoPopupProc := nil; - ADefaultPopupMenu.InternalRegisterPopupMenu(AMenu, Items[AItemIndex].HitTypes, - ADoPopupProc, Items[AItemIndex].ViewClass, True); -end; - -procedure TcxBuiltInPopupMenus.Remove(APopupMenuClass: TcxPopupMenuClass); -var - I: Integer; -begin - for I := Count - 1 downto 0 do - if Items[I].MenuClass = APopupMenuClass then - Delete(I); -end; - -procedure TcxBuiltInPopupMenus.RegisterItemsTo(ADefaultPopupMenu: TcxGridDefaultPopupMenu); -var - I: Integer; -begin - for I := 0 to Count - 1 do - RegisterItemTo(ADefaultPopupMenu, I); -end; - -procedure RegisterPopupMenuClass(APopupMenuClass: TcxPopupMenuClass; - AHitTypes: TcxGridViewHitTypes; AViewClass: TcxCustomGridViewClass); -begin - BuiltInPopupMenuList.Add(APopupMenuClass, AHitTypes, AViewClass); -end; - -procedure UnregisterPopupMenuClass(APopupMenuClass: TcxPopupMenuClass); -begin - BuiltInPopupMenuList.Remove(APopupMenuClass); -end; - -initialization - BuiltInPopupMenuList := TcxBuiltInPopupMenus.Create; -{$IFDEF DELPHI6} - StartClassGroup(TControl); - GroupDescendentsWith(TcxCustomGridPopupMenu, TControl); -{$ENDIF} - -finalization - FreeAndNil(BuiltInPopupMenuList); - -end. - diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCustomTableView.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCustomTableView.pas deleted file mode 100644 index a5a08228..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCustomTableView.pas +++ /dev/null @@ -1,18863 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridCustomTableView; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Messages, Classes, Graphics, Controls, Forms, StdCtrls, Dialogs, - cxClasses, cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters, - cxStorage, cxPC, cxFilterControl, cxNavigator, cxListBox, cxEdit, cxButtons, - cxDataStorage, cxCustomData, cxData, cxFilter, cxDataUtils, cxContainer, - cxCheckBox, cxCheckListBox, cxStyles, cxGridCommon, cxGridCustomView; - -const - cxGridFilterDefaultItemMRUItemsListCount = 5; - cxGridFilterDefaultItemPopupMaxDropDownItemCount = 15; - cxGridFilterDefaultMRUItemsListCount = 10; - cxGridItemDefaultMinWidth = 20; - cxGridNavigatorDefaultOffset = 50; - - htCustomGridTableBase = 100; - htFilter = htCustomGridTableBase + 1; - htFilterActivateButton = htCustomGridTableBase + 2; - htFilterCloseButton = htCustomGridTableBase + 3; - htFilterDropDownButton = htCustomGridTableBase + 4; - htFilterCustomizeButton = htCustomGridTableBase + 5; - htRecord = htCustomGridTableBase + 6; - htCell = htCustomGridTableBase + 7; - htExpandButton = htCustomGridTableBase + 8; - - // record kind - rkNone = -1; - rkNormal = 0; - rkNewItem = 1; - - isCustomItemFirst = 0; - isContent = isCustomItemFirst; - isCustomItemLast = isContent; - - bbCustomTableFirst = bbCustomLast + 1; - bbContent = bbCustomTableFirst; - bbFilterBox = bbCustomTableFirst + 1; - bbCustomTableLast = bbFilterBox; - - vsCustomTableFirst = vsCustomLast + 1; - vsContent = vsCustomTableFirst; - vsContentEven = vsCustomTableFirst + 1; - vsContentOdd = vsCustomTableFirst + 2; - vsFilterBox = vsCustomTableFirst + 3; - vsInactive = vsCustomTableFirst + 4; - vsIncSearch = vsCustomTableFirst + 5; - vsSelection = vsCustomTableFirst + 6; - vsCustomTableLast = vsSelection; - -type - TcxGridItemDataBindingClass = class of TcxGridItemDataBinding; - TcxCustomGridDateRange = class; - TcxGridDateRanges = class; - TcxCustomGridRecord = class; - TcxCustomGridTableViewData = class; - TcxCustomGridTableItemsListBox = class; - TcxCustomGridTableCustomizationForm = class; - TcxGridFilterPopup = class; - TcxCustomGridTableController = class; - TcxCustomGridFilterButtonViewInfo = class; - TcxGridFilterActivateButtonViewInfo = class; - TcxGridFilterButtonsViewInfo = class; - TcxGridFilterViewInfo = class; - TcxGridTableDataCellViewInfo = class; - TcxCustomGridRecordViewInfoClass = class of TcxCustomGridRecordViewInfo; - TcxCustomGridRecordViewInfo = class; - TcxCustomGridRecordsViewInfo = class; - TcxCustomGridTableViewInfo = class; - TcxCustomGridTableViewInfoCacheItem = class; - TcxCustomGridTableItem = class; - TcxCustomGridTableDateTimeHandling = class; - TcxCustomGridTableFiltering = class; - TcxCustomGridTableView = class; - - { changes } - - TcxGridDataChange = class(TcxCustomGridViewChange) - public - procedure Execute; override; - function IsLockable: Boolean; override; - end; - - TcxGridRecordChange = class(TcxCustomGridViewChange) - private - FItem: TcxCustomGridTableItem; - FRecord: TcxCustomGridRecord; - FRecordIndex: Integer; - function GetGridView: TcxCustomGridTableView; - function GetRecordViewInfo: TcxCustomGridRecordViewInfo; - public - constructor Create(AGridView: TcxCustomGridView; ARecord: TcxCustomGridRecord; - ARecordIndex: Integer; AItem: TcxCustomGridTableItem = nil); reintroduce; virtual; - procedure Execute; override; - function IsCompatibleWith(AChange: TcxCustomGridChange): Boolean; override; - function IsEqual(AChange: TcxCustomGridChange): Boolean; override; - function IsItemVisible: Boolean; - property GridRecord: TcxCustomGridRecord read FRecord; - property GridView: TcxCustomGridTableView read GetGridView; - property Item: TcxCustomGridTableItem read FItem; - property RecordIndex: Integer read FRecordIndex; - property RecordViewInfo: TcxCustomGridRecordViewInfo read GetRecordViewInfo; - end; - - TcxGridFocusedRecordChange = class(TcxCustomGridViewChange) - private - FFocusedRecordIndex: Integer; - FNewItemRecordFocusingChanged: Boolean; - FPrevFocusedRecordIndex: Integer; - public - constructor Create(AGridView: TcxCustomGridView; - APrevFocusedRecordIndex, AFocusedRecordIndex: Integer; - ANewItemRecordFocusingChanged: Boolean); reintroduce; virtual; - function CanExecuteWhenLocked: Boolean; override; - procedure Execute; override; - property FocusedRecordIndex: Integer read FFocusedRecordIndex; - property NewItemRecordFocusingChanged: Boolean read FNewItemRecordFocusingChanged; - property PrevFocusedRecordIndex: Integer read FPrevFocusedRecordIndex; - end; - - { hit tests } - - TcxGridFilterHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridFilterCloseButtonHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridFilterActivateButtonHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridFilterDropDownButtonHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridFilterCustomizeButtonHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridRecordHitTest = class(TcxCustomGridViewHitTest) - private - FGridRecordIndex: Integer; - FGridRecordKind: Integer; - FViewData: TcxCustomGridTableViewData; - function GetGridRecord: TcxCustomGridRecord; - procedure SetGridRecord(Value: TcxCustomGridRecord); - protected - class function GetHitTestCode: Integer; override; - public - class function CanClick: Boolean; virtual; - property GridRecord: TcxCustomGridRecord read GetGridRecord write SetGridRecord; - end; - - TcxGridRecordCellHitTest = class(TcxGridRecordHitTest) - protected - class function GetHitTestCode: Integer; override; - public - Item: TcxCustomGridTableItem; - end; - - TcxGridExpandButtonHitTest = class(TcxGridRecordHitTest) - protected - class function GetHitTestCode: Integer; override; - public - class function CanClick: Boolean; override; - end; - - { data definitions } - - TcxGridDefaultValuesProvider = class(TcxCustomEditDefaultValuesProvider) - public - function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; override; - end; - - IcxGridDataController = interface - ['{FEEE7E69-BD54-4B5D-BA0B-B6116B69C0CC}'] - procedure CheckGridModeBufferCount; - function DoScroll(AForward: Boolean): Boolean; - function DoScrollPage(AForward: Boolean): Boolean; - function GetItemDataBindingClass: TcxGridItemDataBindingClass; - function GetItemDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; - function GetNavigatorIsBof: Boolean; - function GetNavigatorIsEof: Boolean; - //function GetFilterPropertyValue(const AName: string; var AValue: Variant): Boolean; - function GetScrollBarPos: Integer; - function GetScrollBarRecordCount: Integer; - //function SetFilterPropertyValue(const AName: string; const AValue: Variant): Boolean; - function SetScrollBarPos(Value: Integer): Boolean; - end; - - TcxGridDataController = class(TcxDataController, - IcxCustomGridDataController, IcxGridDataController) - private - FLoadedData: TMemoryStream; - function GetGridViewValue: TcxCustomGridTableView; - procedure ReadData(Stream: TStream); - procedure WriteData(Stream: TStream); - protected - { IcxCustomGridDataController } - procedure AssignData(ADataController: TcxCustomDataController); - procedure CreateAllItems(AMissingItemsOnly: Boolean); - procedure DeleteAllItems; - procedure GetFakeComponentLinks(AList: TList); - function GetGridView: TcxCustomGridView; - function HasAllItems: Boolean; - function IsDataChangeable: Boolean; - function IsDataLinked: Boolean; - function SupportsCreateAllItems: Boolean; - { IcxGridDataController } - procedure CheckGridModeBufferCount; - function DoScroll(AForward: Boolean): Boolean; - function DoScrollPage(AForward: Boolean): Boolean; - //function GetFilterPropertyValue(const AName: string; var AValue: Variant): Boolean; - function GetItemDataBindingClass: TcxGridItemDataBindingClass; - function GetItemDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; - function GetNavigatorIsBof: Boolean; - function GetNavigatorIsEof: Boolean; - function GetScrollBarPos: Integer; - function GetScrollBarRecordCount: Integer; - //function SetFilterPropertyValue(const AName: string; const AValue: Variant): Boolean; - function SetScrollBarPos(Value: Integer): Boolean; - - function CanSelectRow(ARowIndex: Integer): Boolean; override; - function CompareByField(ARecordIndex1, ARecordIndex2: Integer; - AField: TcxCustomDataField; AMode: TcxDataControllerComparisonMode): Integer; override; - procedure DefineProperties(Filer: TFiler); override; - procedure DoValueTypeClassChanged(AItemIndex: Integer); override; - procedure FilterChanged; override; - function GetDefaultActiveRelationIndex: Integer; override; - function GetFilterDisplayText(ARecordIndex, AItemIndex: Integer): string; override; - //function GetIncrementalSearchText(ARecordIndex, AItemIndex: Integer): string; override; - function GetItemID(AItem: TObject): Integer; override; - function GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; override; - function GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; override; - function GetSummaryItemClass: TcxDataSummaryItemClass; override; - public - procedure BeginFullUpdate; override; - procedure EndFullUpdate; override; - function CreateDetailLinkObject(ARelation: TcxCustomDataRelation; - ARecordIndex: Integer): TObject; override; - procedure FocusControl(AItemIndex: Integer; var Done: Boolean); override; - function GetDetailDataControllerByLinkObject(ALinkObject: TObject): TcxCustomDataController; override; - function GetDisplayText(ARecordIndex, AItemIndex: Integer): string; override; - function GetFilterDataValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; override; - function GetFilterItemFieldCaption(AItem: TObject): string; override; - function GetItem(Index: Integer): TObject; override; - function GetItemSortByDisplayText(AItemIndex: Integer; ASortByDisplayText: Boolean): Boolean; override; - function GetItemValueSource(AItemIndex: Integer): TcxDataEditValueSource; override; - procedure Loaded; override; - procedure UpdateData; override; - - property GridView: TcxCustomGridTableView read GetGridViewValue; - published - property Filter; - property Options; - property Summary; - property OnAfterCancel; - property OnAfterDelete; - property OnAfterInsert; - property OnAfterPost; - property OnBeforeCancel; - property OnBeforeDelete; - property OnBeforeInsert; - property OnBeforePost; - property OnNewRecord; - property OnCompare; - property OnDataChanged; - property OnDetailCollapsing; - property OnDetailCollapsed; - property OnDetailExpanding; - property OnDetailExpanded; - property OnFilterRecord; - property OnGroupingChanged; - property OnRecordChanged; - property OnSortingChanged; - end; - - TcxGridFilterValueListClass = class of TcxGridFilterValueList; - - TcxGridFilterValueList = class(TcxDataFilterValueList) - protected - procedure AddDateTimeAbsoluteFilters(ADateRange: TcxCustomGridDateRange; - AIgnoreTime: Boolean); overload; virtual; - procedure AddDateTimeAbsoluteFilters(AItem: TcxCustomGridTableItem); overload; virtual; - procedure AddDateTimeRelativeFilters(AItem: TcxCustomGridTableItem); virtual; - function SupportedSpecialOperatorKinds: TcxFilterOperatorKinds; virtual; - public - procedure ApplyFilter(AItem: TcxCustomGridTableItem; AIndex: Integer; - AFilterList: TcxFilterCriteriaItemList; AReplaceExistent, AAddToMRUItemsList: Boolean); - function GetIndexByCriteriaItem(ACriteriaItem: TcxFilterCriteriaItem): Integer; override; - procedure Load(AItem: TcxCustomGridTableItem; AInitSortByDisplayText: Boolean = True; - AUseFilteredValues: Boolean = False); reintroduce; virtual; - end; - - TcxGridFilterMRUValueItem = class(TcxMRUItem) - public - Value: Variant; - DisplayText: string; - constructor Create(const AValue: Variant; const ADisplayText: string); - function Equals(AItem: TcxMRUItem): Boolean; override; - end; - - TcxGridFilterMRUValueItemsClass = class of TcxGridFilterMRUValueItems; - - TcxGridFilterMRUValueItems = class(TcxMRUItems) - private - function GetItem(Index: Integer): TcxGridFilterMRUValueItem; - public - procedure Add(const AValue: Variant; const ADisplayText: string); - procedure AddItemsTo(AValueList: TcxGridFilterValueList); - property Items[Index: Integer]: TcxGridFilterMRUValueItem read GetItem; default; - end; - - TcxGridItemDataBinding = class(TPersistent) - private - FData: TObject; - FDefaultValuesProvider: TcxCustomEditDefaultValuesProvider; - FItem: TcxCustomGridTableItem; - FFilterMRUValueItems: TcxGridFilterMRUValueItems; - function GetDataController: TcxCustomDataController; - function GetFilter: TcxDataFilterCriteria; - function GetFilterCriteriaItem: TcxFilterCriteriaItem; - function GetFiltered: Boolean; - function GetGridView: TcxCustomGridTableView; - function GetValueType: string; - function GetValueTypeClass: TcxValueTypeClass; - procedure SetData(Value: TObject); - procedure SetFiltered(Value: Boolean); - procedure SetValueType(const Value: string); - procedure SetValueTypeClass(Value: TcxValueTypeClass); - protected - function GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; - function GetDefaultValueTypeClass: TcxValueTypeClass; virtual; - function GetFilterFieldName: string; virtual; - function GetFilterMRUValueItemsClass: TcxGridFilterMRUValueItemsClass; virtual; - procedure Init; virtual; - function IsValueTypeStored: Boolean; virtual; - property DefaultValuesProvider: TcxCustomEditDefaultValuesProvider read FDefaultValuesProvider; - public - constructor Create(AItem: TcxCustomGridTableItem); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - - function DefaultCaption: string; virtual; - function DefaultRepositoryItem: TcxEditRepositoryItem; virtual; - function DefaultWidth(ATakeHeaderIntoAccount: Boolean = True): Integer; virtual; - function GetDefaultValuesProvider(AProperties: TcxCustomEditProperties = nil): IcxEditDefaultValuesProvider; - function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; - - function AddToFilter(AParent: TcxFilterCriteriaItemList; AOperatorKind: TcxFilterOperatorKind; - const AValue: Variant; const ADisplayText: string = ''; - AReplaceExistent: Boolean = True): TcxFilterCriteriaItem; - procedure GetFilterDisplayText(const AValue: Variant; var ADisplayText: string); - procedure GetFilterStrings(AStrings: TStrings; AValueList: TcxGridFilterValueList); - procedure GetFilterValues(AValueList: TcxGridFilterValueList; AValuesOnly: Boolean = True; - AInitSortByDisplayText: Boolean = False; ACanUseFilteredValues: Boolean = False); - procedure GetFilterActiveValueIndexes(AValueList: TcxGridFilterValueList; - var AIndexes: TcxGridIndexes); - procedure SetFilterActiveValueIndexes(AValueList: TcxGridFilterValueList; - const AIndexes: TcxGridIndexes); - - property Data: TObject read FData write SetData; - property DataController: TcxCustomDataController read GetDataController; - property Filter: TcxDataFilterCriteria read GetFilter; - property FilterCriteriaItem: TcxFilterCriteriaItem read GetFilterCriteriaItem; - property Filtered: Boolean read GetFiltered write SetFiltered; - property FilterFieldName: string read GetFilterFieldName; - property FilterMRUValueItems: TcxGridFilterMRUValueItems read FFilterMRUValueItems; - property GridView: TcxCustomGridTableView read GetGridView; - property Item: TcxCustomGridTableItem read FItem; - property ValueTypeClass: TcxValueTypeClass read GetValueTypeClass write SetValueTypeClass; - published - property ValueType: string read GetValueType write SetValueType stored IsValueTypeStored; - end; - - { view data } - - // date ranges - - TcxCustomGridDateRangeClass = class of TcxCustomGridDateRange; - - TcxCustomGridDateRange = class - private - FContainer: TcxGridDateRanges; - function GetIndex: Integer; - procedure SetIndex(Value: Integer); - public - destructor Destroy; override; - - function Contains(const ADate: TDateTime): Boolean; virtual; abstract; - function GetDisplayText(const ADate: TDateTime): string; virtual; abstract; - function GetRangeValue(const ADate: TDateTime; AIgnoreTime: Boolean): Variant; virtual; - function GetSortingValue(const ADate: TDateTime): Variant; virtual; - function GetValue(const ADate: TDateTime): Variant; virtual; abstract; - function NeedsSortingByTime: Boolean; virtual; - function NeedsTime: Boolean; virtual; - - property Container: TcxGridDateRanges read FContainer; - property Index: Integer read GetIndex write SetIndex; - end; - - TcxGridHourRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - function NeedsSortingByTime: Boolean; override; - end; - - TcxGridDayRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridMonthRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetRangeValue(const ADate: TDateTime; AIgnoreTime: Boolean): Variant; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridYearRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetRangeValue(const ADate: TDateTime; AIgnoreTime: Boolean): Variant; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridYesterdayRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridTodayRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridTomorrowRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridLastWeekRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridThisWeekRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridNextWeekRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridLastMonthRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridThisMonthRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridNextMonthRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridLastYearRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridThisYearRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridNextYearRange = class(TcxCustomGridDateRange) - public - function Contains(const ADate: TDateTime): Boolean; override; - function GetDisplayText(const ADate: TDateTime): string; override; - function GetValue(const ADate: TDateTime): Variant; override; - end; - - TcxGridDateTimeFilter = (dtfRelativeDays, dtfRelativeDayPeriods, dtfRelativeWeeks, - dtfRelativeMonths, dtfRelativeYears, dtfPastFuture, dtfMonths, dtfYears); - TcxGridDateTimeFilters = set of TcxGridDateTimeFilter; - TcxGridDateTimeGrouping = (dtgDefault, dtgByDateAndTime, dtgRelativeToToday, - dtgByHour, dtgByDate, dtgByMonth, dtgByYear); - - TcxGridDateRangesClass = class of TcxGridDateRanges; - - TcxGridDateRanges = class - private - FDateTimeHandling: TcxCustomGridTableDateTimeHandling; - FItems: TList; - FStartOfThisWeek: TDateTime; - FThisDay: Word; - FThisMonth: Word; - FThisMonthNumber: Integer; - FThisYear: Word; - FToday: TDateTime; - function GetCount: Integer; - function GetItem(Index: Integer): TcxCustomGridDateRange; - protected - procedure AddItem(AItem: TcxCustomGridDateRange); - procedure RemoveItem(AItem: TcxCustomGridDateRange); - function GetItemIndex(AItem: TcxCustomGridDateRange): Integer; - procedure SetItemIndex(AItem: TcxCustomGridDateRange; AValue: Integer); - - procedure InitConsts; virtual; - public - constructor Create; virtual; - destructor Destroy; override; - procedure Add(ARange: TcxCustomGridDateRange); overload; - procedure Add(ARangeClass: TcxCustomGridDateRangeClass); overload; - procedure Clear; - function GetRange(const ADate: TDateTime): TcxCustomGridDateRange; overload; - function GetRange(ARangeClass: TcxCustomGridDateRangeClass): TcxCustomGridDateRange; overload; - procedure Init(ADateTimeHandling: TcxCustomGridTableDateTimeHandling); virtual; - function IsEmpty: Boolean; - function NeedSortingByTime: Boolean; - function NeedTime: Boolean; - - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxCustomGridDateRange read GetItem; default; - - property DateTimeHandling: TcxCustomGridTableDateTimeHandling read FDateTimeHandling; - property StartOfThisWeek: TDateTime read FStartOfThisWeek; - property ThisDay: Word read FThisDay; - property ThisMonth: Word read FThisMonth; - property ThisMonthNumber: Integer read FThisMonthNumber; - property ThisYear: Word read FThisYear; - property Today: TDateTime read FToday; - end; - - TcxGridFilteringDateRangesClass = class of TcxGridFilteringDateRanges; - - TcxGridFilteringDateRanges = class(TcxGridDateRanges) - public - procedure Init(ADateTimeHandling: TcxCustomGridTableDateTimeHandling; - ADateTimeFilters: TcxGridDateTimeFilters); reintroduce; virtual; - end; - - TcxGridGroupingDateRangesClass = class of TcxGridGroupingDateRanges; - - TcxGridGroupingDateRanges = class(TcxGridDateRanges) - public - procedure Init(ADateTimeHandling: TcxCustomGridTableDateTimeHandling; - ADateTimeGrouping: TcxGridDateTimeGrouping); reintroduce; virtual; - end; - - // record - - TcxCustomGridRecordClass = class of TcxCustomGridRecord; - - TcxCustomGridRecord = class - private - //FData: Pointer; - FIndex: Integer; - FViewData: TcxCustomGridTableViewData; - FViewInfo: TcxCustomGridRecordViewInfo; - function GetController: TcxCustomGridTableController; - function GetDataController: TcxCustomDataController; - function GetDragHighlighted: Boolean; - function GetFocused: Boolean; - function GetGridView: TcxCustomGridTableView; - function GetIsEditing: Boolean; - function GetIsNewItemRecord: Boolean; - function GetIsValid: Boolean; - function GetLastParentRecordCount: Integer; - function GetLevel: Integer; - function GetPartVisible: Boolean; - function GetRecordIndex: Integer; - procedure SetExpanded(Value: Boolean); - procedure SetFocused(Value: Boolean); - protected - RecordInfo: TcxRowInfo; - procedure RefreshRecordInfo; virtual; - - procedure DoCollapse(ARecurse: Boolean); virtual; - procedure DoExpand(ARecurse: Boolean); virtual; - //function GetDestroyingOnExpanding: Boolean; virtual; - function GetExpandable: Boolean; virtual; - function GetExpanded: Boolean; virtual; - procedure ToggleExpanded; virtual; - - function GetHasCells: Boolean; virtual; - function GetIsData: Boolean; virtual; - function GetIsFirst: Boolean; virtual; - function GetIsLast: Boolean; virtual; - function GetIsParent: Boolean; virtual; - function GetIsParentRecordLast(AIndex: Integer): Boolean; - function GetParentRecord: TcxCustomGridRecord; virtual; - function GetSelected: Boolean; virtual; - function GetVisible: Boolean; virtual; - procedure SetSelected(Value: Boolean); virtual; - - function GetDisplayText(Index: Integer): string; virtual; - function GetValueCount: Integer; virtual; - function GetValue(Index: Integer): Variant; virtual; - procedure SetDisplayText(Index: Integer; const Value: string); virtual; - procedure SetValue(Index: Integer; const Value: Variant); virtual; - - procedure KeyDown(var Key: Word; Shift: TShiftState); virtual; - - function GetViewInfoCacheItemClass: TcxCustomGridViewInfoCacheItemClass; virtual; abstract; - function GetViewInfoClass: TcxCustomGridRecordViewInfoClass; virtual; abstract; - - property IsParent: Boolean read GetIsParent; - property IsParentRecordLast[AIndex: Integer]: Boolean read GetIsParentRecordLast; - property IsValid: Boolean read GetIsValid; - property LastParentRecordCount: Integer read GetLastParentRecordCount; - - property Controller: TcxCustomGridTableController read GetController; - property DataController: TcxCustomDataController read GetDataController; - //property DestroyingOnExpanding: Boolean read GetDestroyingOnExpanding; - public - constructor Create(AViewData: TcxCustomGridTableViewData; AIndex: Integer; - const ARecordInfo: TcxRowInfo); virtual; - destructor Destroy; override; - function CanFocus: Boolean; virtual; - function CanFocusCells: Boolean; virtual; - procedure Collapse(ARecurse: Boolean); - procedure Expand(ARecurse: Boolean); - function GetFirstFocusableChild: TcxCustomGridRecord; virtual; - function GetLastFocusableChild(ARecursive: Boolean): TcxCustomGridRecord; virtual; - procedure Invalidate(AItem: TcxCustomGridTableItem = nil); virtual; - procedure MakeVisible; - - //property Data: Pointer read FData write FData; - property DragHighlighted: Boolean read GetDragHighlighted; - property DisplayTexts[Index: Integer]: string read GetDisplayText write SetDisplayText; - property Expandable: Boolean read GetExpandable; - property Expanded: Boolean read GetExpanded write SetExpanded; - property Focused: Boolean read GetFocused write SetFocused; - property GridView: TcxCustomGridTableView read GetGridView; - property HasCells: Boolean read GetHasCells; - property Index: Integer read FIndex; - property IsData: Boolean read GetIsData; - property IsEditing: Boolean read GetIsEditing; - property IsFirst: Boolean read GetIsFirst; - property IsLast: Boolean read GetIsLast; - property IsNewItemRecord: Boolean read GetIsNewItemRecord; - property Level: Integer read GetLevel; - property ParentRecord: TcxCustomGridRecord read GetParentRecord; - property PartVisible: Boolean read GetPartVisible; - property RecordIndex: Integer read GetRecordIndex; - property Selected: Boolean read GetSelected write SetSelected; - property ValueCount: Integer read GetValueCount; - property Values[Index: Integer]: Variant read GetValue write SetValue; - property ViewData: TcxCustomGridTableViewData read FViewData; - property ViewInfo: TcxCustomGridRecordViewInfo read FViewInfo; - property Visible: Boolean read GetVisible; - end; - - // view data - - TcxGridDataOperation = (doSorting, doGrouping, doFiltering); - - TcxCustomGridTableViewData = class(TcxCustomGridViewData) - private - FEditingRecord: TcxCustomGridRecord; - FNewItemRecord: TcxCustomGridRecord; - FRecords: TList; - function GetController: TcxCustomGridTableController; - function GetEditingRecord: TcxCustomGridRecord; - function GetGridView: TcxCustomGridTableView; - function GetInternalRecord(Index: Integer): TcxCustomGridRecord; - function GetRecord(Index: Integer): TcxCustomGridRecord; - function GetRecordCount: Integer; - function GetViewInfo: TcxCustomGridTableViewInfo; - function CreateRecord(AIndex: Integer): TcxCustomGridRecord; - protected - function GetFilterValueListClass: TcxGridFilterValueListClass; virtual; - function GetRecordByKind(AKind, AIndex: Integer): TcxCustomGridRecord; virtual; - function GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; virtual; abstract; - function GetRecordKind(ARecord: TcxCustomGridRecord): Integer; virtual; - - procedure AssignEditingRecord; - - procedure CreateNewItemRecord; - procedure DestroyNewItemRecord; - function GetNewItemRecordClass: TcxCustomGridRecordClass; virtual; - procedure RecreateNewItemRecord; - - property Controller: TcxCustomGridTableController read GetController; - property InternalRecords[Index: Integer]: TcxCustomGridRecord read GetInternalRecord; - property ViewInfo: TcxCustomGridTableViewInfo read GetViewInfo; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - - procedure Collapse(ARecurse: Boolean); virtual; - procedure DestroyRecords; - procedure Expand(ARecurse: Boolean); virtual; - function GetRecordByIndex(AIndex: Integer): TcxCustomGridRecord; - function GetRecordByRecordIndex(ARecordIndex: Integer): TcxCustomGridRecord; - function GetRecordIndexByRecord(ARecord: TcxCustomGridRecord): Integer; - function IsRecordIndexValid(AIndex: Integer): Boolean; - procedure Refresh(ARecordCount: Integer); virtual; - procedure RefreshRecords; - - procedure CheckNewItemRecord; - function HasNewItemRecord: Boolean; virtual; - - function AddItemToFilter(AParent: TcxFilterCriteriaItemList; AItem: TcxCustomGridTableItem; - AOperatorKind: TcxFilterOperatorKind; const AValue: Variant; ADisplayText: string = ''; - AReplaceExistent: Boolean = True): TcxFilterCriteriaItem; - function CreateFilterValueList: TcxGridFilterValueList; - function GetDisplayText(ARecordIndex, AItemIndex: Integer; out AText: string; - AUseCustomValue: Boolean = False; ACustomValueOperation: TcxGridDataOperation = doGrouping): Boolean; virtual; - - // custom data handling - function CustomCompareDataValues(AField: TcxCustomDataField; const AValue1, AValue2: Variant; - AMode: TcxDataControllerComparisonMode): Integer; virtual; - function GetCustomDataDisplayText(ARecordIndex, AItemIndex: Integer; - AOperation: TcxGridDataOperation): string; virtual; - function GetCustomDataValue(AField: TcxCustomDataField; const AValue: Variant; - AOperation: TcxGridDataOperation): Variant; overload; - function GetCustomDataValue(AItem: TcxCustomGridTableItem; const AValue: Variant; - AOperation: TcxGridDataOperation): Variant; overload; virtual; - function HasCustomDataHandling(AField: TcxCustomDataField; AOperation: TcxGridDataOperation): Boolean; overload; - function HasCustomDataHandling(AItem: TcxCustomGridTableItem; AOperation: TcxGridDataOperation): Boolean; overload; virtual; - function NeedsCustomDataComparison(AField: TcxCustomDataField; AMode: TcxDataControllerComparisonMode): Boolean; virtual; - - property EditingRecord: TcxCustomGridRecord read FEditingRecord; - property GridView: TcxCustomGridTableView read GetGridView; - property NewItemRecord: TcxCustomGridRecord read FNewItemRecord; - property RecordCount: Integer read GetRecordCount; - property Records[Index: Integer]: TcxCustomGridRecord read GetRecord; - end; - - { controller } - - // drag&drop objects - - TcxCustomGridTableMovingObject = class(TcxCustomGridMovingObject) - private - function GetController: TcxCustomGridTableController; - function GetCustomizationForm: TcxCustomGridTableCustomizationForm; - protected - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - property Controller: TcxCustomGridTableController read GetController; - property CustomizationForm: TcxCustomGridTableCustomizationForm read GetCustomizationForm; - end; - - TcxGridItemContainerKind = Integer; - - TcxGridItemContainerZone = class - public - ItemIndex: Integer; - constructor Create(AItemIndex: Integer); - function IsEqual(Value: TcxGridItemContainerZone): Boolean; virtual; - end; - - TcxCustomGridTableItemMovingObject = class(TcxCustomGridTableMovingObject) - private - FDestItemContainerKind: TcxGridItemContainerKind; - FDestZone: TcxGridItemContainerZone; - FSourceItemContainerKind: TcxGridItemContainerKind; - - procedure SetDestItemContainerKind(Value: TcxGridItemContainerKind); - procedure SetDestZone(Value: TcxGridItemContainerZone); - protected - procedure CalculateDestParams(AHitTest: TcxCustomGridHitTest; - out AContainerKind: TcxGridItemContainerKind; out AZone: TcxGridItemContainerZone); virtual; - procedure CheckDestItemContainerKind(var AValue: TcxGridItemContainerKind); virtual; - function GetCustomizationFormListBox: TcxCustomGridItemsListBox; override; - function IsSourceCustomizationForm: Boolean; override; - - procedure BeginDragAndDrop; override; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - procedure EndDragAndDrop(Accepted: Boolean); override; - - property DestItemContainerKind: TcxGridItemContainerKind read FDestItemContainerKind - write SetDestItemContainerKind; - property DestZone: TcxGridItemContainerZone read FDestZone write SetDestZone; - property SourceItemContainerKind: TcxGridItemContainerKind read FSourceItemContainerKind - write FSourceItemContainerKind; - public - constructor Create(AControl: TcxControl); override; - destructor Destroy; override; - end; - - // customization form - - TcxCustomGridTableItemsListBoxClass = class of TcxCustomGridTableItemsListBox; - - TcxCustomGridTableItemsListBox = class(TcxCustomGridItemsListBox) - private - function GetGridView: TcxCustomGridTableView; - protected - procedure RefreshItemsAsTableItems; - property GridView: TcxCustomGridTableView read GetGridView; - end; - - TcxCustomGridTableCustomizationForm = class(TcxCustomGridCustomizationForm) - private - FItemsListBox: TcxCustomGridTableItemsListBox; - FItemsPage: TcxTabSheet; - protected - procedure CreateControls; override; - function GetItemsListBoxClass: TcxCustomGridTableItemsListBoxClass; virtual; - function GetItemsPageCaption: string; virtual; abstract; - function GetItemsPageVisible: Boolean; virtual; - procedure InitPageControl; override; - - property ItemsListBox: TcxCustomGridTableItemsListBox read FItemsListBox; - public - procedure RefreshData; override; - property ItemsPage: TcxTabSheet read FItemsPage; - end; - - // popups - - IcxGridFilterPopupOwner = interface(IcxCustomGridPopupOwner) - ['{1FC070B2-36E5-4388-B22D-1FF5D240E95F}'] - function GetItem: TcxCustomGridTableItem; - end; - - TcxGridFilterPopupListBox = class(TcxGridPopupListBox) - private - function GetPopup: TcxGridFilterPopup; - protected - function CanHaveCheck(AItemIndex: Integer): Boolean; override; - procedure DrawItemContent(ACanvas: TcxCanvas; AIndex: Integer; ARect: TRect; - AState: TOwnerDrawState); override; - function HasCheck(AItemIndex: Integer): Boolean; override; - public - property Popup: TcxGridFilterPopup read GetPopup; - end; - - TcxGridFilterPopupClass = class of TcxGridFilterPopup; - - TcxGridFilterPopup = class(TcxCustomGridPopup) - private - FButton: TcxButton; - FFilterChangedByCheck: Boolean; - FItem: TcxCustomGridTableItem; - FListBox: TcxGridFilterPopupListBox; - FListBoxItems: TStringList; - FValueList: TcxGridFilterValueList; - function GetFilter: TcxDataFilterCriteria; - function GetGridView: TcxCustomGridTableView; - //function GetOwnerValue: IcxGridFilterPopupOwner; - //procedure SetOwnerValue(Value: IcxGridFilterPopupOwner); - procedure SetFilterChangedByCheck(Value: Boolean); - procedure ButtonClicked(Sender: TObject); - procedure ListBoxAction(Sender: TcxGridPopupListBox; AItemIndex: Integer); - protected - procedure AddListBoxItems; virtual; - procedure AdjustListBoxSize; virtual; - procedure ApplyFilterUsingCheckedItems(const AItemIndexes: TcxGridIndexes); virtual; - procedure ApplyFilterUsingClickedItem(AItemIndex: Integer); virtual; - function GetImmediateFilterUsingChecks: Boolean; virtual; - function GetListBoxCheckedItemIndexes: TcxGridIndexes; virtual; - function GetSelectedItemIndex: Integer; virtual; - procedure InitButton; virtual; - procedure InitListBox; virtual; - procedure InitPopup; override; - function IsButtonVisible: Boolean; virtual; - function IsCheck(AItemIndex: Integer): Boolean; virtual; - function IsMRUItemsListSeparator(AItemIndex: Integer): Boolean; - function SupportsChecks: Boolean; virtual; - procedure UpdateButtonEnabled; virtual; - - property Button: TcxButton read FButton; - property Filter: TcxDataFilterCriteria read GetFilter; - property FilterChangedByCheck: Boolean read FFilterChangedByCheck write SetFilterChangedByCheck; - property ImmediateFilterUsingChecks: Boolean read GetImmediateFilterUsingChecks; - property ListBox: TcxGridFilterPopupListBox read FListBox; - property ListBoxItems: TStringList read FListBoxItems; - property SelectedItemIndex: Integer read GetSelectedItemIndex; - property ValueList: TcxGridFilterValueList read FValueList; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - procedure CloseUp; override; - property GridView: TcxCustomGridTableView read GetGridView; - property Item: TcxCustomGridTableItem read FItem; -// property Owner: IcxGridFilterPopupOwner read GetOwnerValue write SetOwnerValue; - end; - - TcxGridFilterMRUItemsPopupClass = class of TcxGridFilterMRUItemsPopup; - - TcxGridFilterMRUItemsPopup = class(TcxCustomGridPopup) - private - FListBox: TcxGridPopupListBox; - function GetFiltering: TcxCustomGridTableFiltering; - function GetGridView: TcxCustomGridTableView; - procedure ListBoxAction(Sender: TcxGridPopupListBox; AItemIndex: Integer); - protected - procedure AddFilterMRUItems(AStrings: TStrings); virtual; - procedure ApplyFilterMRUItem(AItemIndex: Integer); virtual; - function GetTextOffsetHorz: Integer; virtual; - procedure InitPopup; override; - - property Filtering: TcxCustomGridTableFiltering read GetFiltering; - property ListBox: TcxGridPopupListBox read FListBox; - public - constructor Create(AGridView: TcxCustomGridView); override; - property GridView: TcxCustomGridTableView read GetGridView; - property TextOffsetHorz: Integer read GetTextOffsetHorz; - end; - - TcxCustomGridCustomizationPopup = class(TcxCustomGridPopup) - private - FCheckListBox: TcxCheckListBox; - FDragItemIndex: Integer; - FScrollDirection: TcxDirection; - FScrollTimer: TcxTimer; - function GetGridView: TcxCustomGridTableView; - procedure SetScrollDirection(Value: TcxDirection); - procedure CheckListBoxClick(Sender: TObject); - procedure CheckListBoxCheckClick(Sender: TObject; AIndex: Integer; - APrevState, ANewState: TcxCheckBoxState); - procedure CheckListBoxEndDrag(Sender, Target: TObject; X, Y: Integer); - procedure CheckListBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure CheckListBoxMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure CheckListBoxStartDrag(Sender: TObject; var DragObject: TDragObject); - procedure CheckListBoxDragOver(Sender, Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); - procedure CheckListBoxDragDrop(Sender, Source: TObject; X, Y: Integer); - procedure ScrollTimerHandler(Sender: TObject); - protected - procedure AddCheckListBoxItems; virtual; abstract; - procedure AdjustCheckListBoxSize(AFixedHeight: Boolean = False); virtual; - procedure CheckClicked(AIndex: Integer; AChecked: Boolean); virtual; - procedure CreateCheckListBox; virtual; - function GetCheckListBoxColumnWidth: Integer; virtual; - function GetDropDownCount: Integer; virtual; abstract; - function GetItemInsertionIndex(X, Y: Integer): Integer; - procedure InitPopup; override; - procedure RefreshCheckListBoxItems; - function SupportsItemMoving: Boolean; virtual; abstract; - - procedure GetCheckListBoxSelectedItems(AItems: TList); - procedure SetCheckListBoxSelectedItems(AItems: TList); - - procedure ItemClicked(AItem: TObject; AChecked: Boolean); virtual; abstract; - function GetItemIndex(AItem: TObject): Integer; virtual; abstract; - procedure SetItemIndex(AItem: TObject; AIndex: Integer); virtual; abstract; - - property CheckListBoxColumnWidth: Integer read GetCheckListBoxColumnWidth; - property DragItemIndex: Integer read FDragItemIndex write FDragItemIndex; - property ScrollDirection: TcxDirection read FScrollDirection write SetScrollDirection; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure CloseUp; override; - procedure CorrectBoundsWithDesktopWorkArea(var APosition: TPoint); override; - procedure Popup; override; - property CheckListBox: TcxCheckListBox read FCheckListBox; - property GridView: TcxCustomGridTableView read GetGridView; - end; - - TcxCustomGridItemsCustomizationPopupClass = class of TcxCustomGridItemsCustomizationPopup; - - TcxCustomGridItemsCustomizationPopup = class(TcxCustomGridCustomizationPopup) - protected - procedure AddCheckListBoxItems; override; - function GetDropDownCount: Integer; override; - function SupportsItemMoving: Boolean; override; - - procedure ItemClicked(AItem: TObject; AChecked: Boolean); override; - function GetItemIndex(AItem: TObject): Integer; override; - procedure SetItemIndex(AItem: TObject; AIndex: Integer); override; - end; - - // controllers - - TcxGridEditingControllerClass = class of TcxGridEditingController; - - TcxGridEditingController = class - private - FController: TcxCustomGridTableController; - FEdit: TcxCustomEdit; - FEditHiding: Boolean; - FEditingItem: TcxCustomGridTableItem; - FEditingItemSetting: Boolean; - FEditList: TcxInplaceEditList; - FEditPreparing: Boolean; - FEditShowingTimer: TcxTimer; - FEditShowingTimerItem: TcxCustomGridTableItem; - FEditUpdateNeeded: Boolean; - FInitiatingEditing: Boolean; - FIsEditPlaced: Boolean; - FIsErrorOnEditExit: Boolean; - FPrevEditOnChange: TNotifyEvent; - FPrevEditOnEditValueChanged: TNotifyEvent; - function GetEditingProperties: TcxCustomEditProperties; - function GetGridView: TcxCustomGridTableView; - function GetIsEditing: Boolean; - procedure SetEditingItem(Value: TcxCustomGridTableItem); - procedure EditShowingTimerHandler(Sender: TObject); - protected - procedure AfterViewInfoCalculate; virtual; - procedure BeforeViewInfoCalculate; virtual; - procedure CancelEditUpdatePost; - function CanInitEditing: Boolean; virtual; - function CanRemoveEditFocus: Boolean; virtual; - function CanUpdateEditValue: Boolean; virtual; - procedure CheckEdit; - procedure CheckEditUpdatePost; - procedure DoEditChanged; virtual; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); virtual; - procedure DoUpdateEdit; - function GetHideEditOnExit: Boolean; virtual; - function GetHideEditOnFocusedRecordChange: Boolean; virtual; - procedure InitEdit; virtual; - procedure UninitEdit; virtual; - procedure PostEditingData; virtual; - procedure PostEditUpdate; - function PrepareEdit(AItem: TcxCustomGridTableItem; AOnMouseEvent: Boolean): Boolean; virtual; - procedure UpdateEditValue; - procedure UpdateValue; - - procedure AssignEditEvents; virtual; - procedure UnassignEditEvents; virtual; - procedure EditAfterKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); virtual; - procedure EditChanged(Sender: TObject); virtual; - procedure EditEditing(Sender: TObject; var CanEdit: Boolean); virtual; - procedure EditExit(Sender: TObject); virtual; - procedure EditFocusChanged(Sender: TObject); virtual; - procedure EditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); virtual; - procedure EditKeyPress(Sender: TObject; var Key: Char); virtual; - procedure EditKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); virtual; - procedure EditPostEditValue(Sender: TObject); virtual; - procedure EditValueChanged(Sender: TObject); virtual; - - property EditHiding: Boolean read FEditHiding; - property EditingProperties: TcxCustomEditProperties read GetEditingProperties; - property EditList: TcxInplaceEditList read FEditList; - property EditPreparing: Boolean read FEditPreparing; - property EditUpdateNeeded: Boolean read FEditUpdateNeeded; - property HideEditOnExit: Boolean read GetHideEditOnExit; - property HideEditOnFocusedRecordChange: Boolean read GetHideEditOnFocusedRecordChange; - property InitiatingEditing: Boolean read FInitiatingEditing; - property IsEditPlaced: Boolean read FIsEditPlaced; - property IsErrorOnEditExit: Boolean read FIsErrorOnEditExit; - public - constructor Create(AController: TcxCustomGridTableController); virtual; - destructor Destroy; override; - - procedure HideEdit(Accept: Boolean); virtual; - procedure RemoveEdit(AProperties: TcxCustomEditProperties); virtual; - procedure ShowEdit(AItem: TcxCustomGridTableItem = nil); overload; - procedure ShowEdit(AItem: TcxCustomGridTableItem; Key: Char); overload; - procedure ShowEdit(AItem: TcxCustomGridTableItem; Shift: TShiftState; X, Y: Integer); overload; - procedure UpdateEdit; - - procedure StartEditShowingTimer(AItem: TcxCustomGridTableItem); - procedure StopEditShowingTimer; - - property Controller: TcxCustomGridTableController read FController; - property Edit: TcxCustomEdit read FEdit; - property EditingItem: TcxCustomGridTableItem read FEditingItem write SetEditingItem; - property GridView: TcxCustomGridTableView read GetGridView; - property IsEditing: Boolean read GetIsEditing; - end; - - TcxGridDragOpenInfoExpand = class(TcxCustomGridDragOpenInfo) - public - GridRecord: TcxCustomGridRecord; - constructor Create(AGridRecord: TcxCustomGridRecord); virtual; - function Equals(AInfo: TcxCustomGridDragOpenInfo): Boolean; override; - procedure Run; override; - end; - - TcxCustomGridTableCanItemFocus = function(AOwner: TcxCustomGridTableView; - AItemIndex: Integer; AData: TObject): Boolean; - - TcxCustomGridTableController = class(TcxCustomGridController) - private - FAllowAppendRecord: Boolean; - FAllowCheckEdit: Boolean; - FBlockRecordKeyboardHandling: Boolean; - FCheckEditNeeded: Boolean; - FCheckingCoordinate: Boolean; - FClickedCellViewInfo: TcxGridTableDataCellViewInfo; - FDragDropText: string; - FDragScrollDirection: TcxDirection; - FDragScrollTimer: TcxTimer; - FDragHighlightedRecord: TcxCustomGridRecord; - FEatKeyPress: Boolean; - FEditingController: TcxGridEditingController; - FFilterMRUItemsPopup: TcxGridFilterMRUItemsPopup; - FFilterPopup: TcxGridFilterPopup; - FFocusedItem: TcxCustomGridTableItem; - FFocusOnRecordFocusing: Boolean; - FForcingWidthItem: TcxCustomGridTableItem; - FGridModeBufferCountUpdateNeeded: Boolean; - FGridModeBufferCountUpdateTimer: TcxTimer; - FIsPullFocusing: Boolean; - FIsReadyForImmediateEditing: Boolean; - FIsRecordUnselecting: Boolean; - FItemsCustomizationPopup: TcxCustomGridItemsCustomizationPopup; - FMovingItem: TcxCustomGridTableItem; - FPullFocusingItem: TcxCustomGridTableItem; - FPullFocusingMousePos: TPoint; - FPullFocusingOriginHitTest: TcxCustomGridHitTest; - FPullFocusingRecordId: Variant; - FPullFocusingScrollingDirection: TcxDirection; - FPullFocusingScrollingTimer: TcxTimer; - FScrollDirection: TcxDirection; - FScrollTimer: TcxTimer; - FTopRecordIndex: Integer; - FUnselectingRecordIndex: Integer; - - function GetEditingItem: TcxCustomGridTableItem; - function GetFilterMRUItemsPopup: TcxGridFilterMRUItemsPopup; - function GetFilterPopup: TcxGridFilterPopup; - function GetFocusedItemIndex: Integer; - function GetFocusedRecordIndex: Integer; - function GetGridView: TcxCustomGridTableView; - function GetIncSearchingItem: TcxCustomGridTableItem; - function GetIncSearchingText: string; - function GetIsEditing: Boolean; - function GetIsIncSearching: Boolean; - function GetIsItemMoving: Boolean; - function GetItemsCustomizationPopup: TcxCustomGridItemsCustomizationPopup; - function GetMasterController: TcxCustomGridTableController; - function GetMultiSelect: Boolean; - function GetNewItemRecordFocused: Boolean; - function GetSelectedRecord(Index: Integer): TcxCustomGridRecord; - function GetSelectedRecordCount: Integer; - function GetViewData: TcxCustomGridTableViewData; - function GetViewInfo: TcxCustomGridTableViewInfo; - procedure SetDragHighlightedRecord(Value: TcxCustomGridRecord); - procedure SetEditingItem(Value: TcxCustomGridTableItem); - procedure SetFocusedItem(Value: TcxCustomGridTableItem); - procedure SetFocusedItemIndex(Value: Integer); - procedure SetFocusedRecordIndex(Value: Integer); - procedure SetIncSearchingText(const Value: string); - procedure SetInternalTopRecordIndex(Value: Integer); - procedure SetNewItemRecordFocused(Value: Boolean); - procedure SetScrollDirection(Value: TcxDirection); - procedure SetTopRecordIndex(Value: Integer); - - procedure DragScrollTimerHandler(Sender: TObject); - procedure GridModeBufferCountUpdateTimerHandler(Sender: TObject); - procedure PullFocusingScrollingTimerHandler(Sender: TObject); - - procedure CreateScrollTimer; - procedure DestroyScrollTimer; - procedure ScrollTimerHandler(Sender: TObject); - protected - procedure AfterPaint; override; - procedure BeforePaint; override; - function CanFocusOnClick(X, Y: Integer): Boolean; override; - procedure DetailFocused(ADetail: TcxCustomGridView); override; - procedure DoEnter; override; - procedure DoExit; override; - function MayFocus: Boolean; override; - procedure RemoveFocus; override; - procedure SetFocus(ANotifyMaster: Boolean); override; - - procedure AfterOffset; virtual; - procedure BeforeKillFocus; override; - procedure BeforeOffset; virtual; - function CanAppend(ACheckOptions: Boolean): Boolean; virtual; - procedure CancelCheckEditPost; - function CanDelete(ACheckOptions: Boolean): Boolean; virtual; - function CanEdit: Boolean; virtual; - procedure CheckCoordinates; override; - function CanHScrollBarHide: Boolean; virtual; - function CanInsert(ACheckOptions: Boolean): Boolean; virtual; - procedure CheckEdit; virtual; - procedure CheckTopRecordIndex(var Value: Integer); virtual; - function FindNextCustomItem(AFocusedItemIndex, AItemCount: Integer; - AGoForward, AGoOnCycle: Boolean; ACanFocus: TcxCustomGridTableCanItemFocus; - AData: TObject; var AItemIndex: Integer; out ACycleChanged: Boolean): Boolean; - procedure FocusedItemChanged(APrevFocusedItem: TcxCustomGridTableItem); virtual; - procedure FocusedRecordChanged(APrevFocusedRecordIndex, AFocusedRecordIndex: Integer; - ANewItemRecordFocusingChanged: Boolean); virtual; - function GetCancelEditingOnExit: Boolean; virtual; - function GetFilterMRUItemsPopupClass: TcxGridFilterMRUItemsPopupClass; virtual; - function GetFilterPopupClass: TcxGridFilterPopupClass; virtual; - function GetFocusedRecord: TcxCustomGridRecord; virtual; - function GetIsRecordsScrollHorizontal: Boolean; virtual; abstract; - function GetItemsCustomizationPopupClass: TcxCustomGridItemsCustomizationPopupClass; virtual; - function GetMaxTopRecordIndexValue: Integer; virtual; - function GetPatternObject(AObject: TPersistent): TPersistent; override; - function GetScrollBarOffsetBegin: Integer; virtual; - function GetScrollBarOffsetEnd: Integer; virtual; - function GetScrollBarPos: Integer; virtual; - function GetScrollBarRecordCount: Integer; virtual; - function GetVisibleRecordCount(AFirstRecordIndex: Integer; - ACalculateDown: Boolean = True): Integer; virtual; - procedure PostCheckEdit; - procedure ProcessCheckEditPost; - procedure ScrollData(ADirection: TcxDirection); virtual; - procedure SetFocusedRecord(Value: TcxCustomGridRecord); virtual; - procedure SetScrollBarPos(Value: Integer); virtual; - - procedure CancelGridModeBufferCountUpdate; - procedure CheckGridModeBufferCountUpdatePost; - procedure PostGridModeBufferCountUpdate; - property GridModeBufferCountUpdateNeeded: Boolean read FGridModeBufferCountUpdateNeeded; - - // internal draganddrop data scrolling - function CanScrollData(ADirection: TcxDirection): Boolean; virtual; - function GetScrollDataTimeInterval(ADirection: TcxDirection): Integer; virtual; - property ScrollDirection: TcxDirection read FScrollDirection write SetScrollDirection; - - // selection - function CanPostponeRecordSelection(AShift: TShiftState): Boolean; virtual; - function CanProcessMultiSelect(AIsKeyboard: Boolean): Boolean; overload; virtual; - function CanProcessMultiSelect(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState): Boolean; overload; virtual; - function CanProcessMultiSelect(AKey: Word; AShift: TShiftState; - AFocusedRecordChanged: Boolean): Boolean; overload; virtual; - procedure ChangeRecordSelection(ARecord: TcxCustomGridRecord; Value: Boolean); - procedure CheckFocusedRecordSelectionWhenExit(ARecord: TcxCustomGridRecord); - procedure DoMouseNormalSelection(AHitTest: TcxCustomGridHitTest); virtual; - procedure DoMouseRangeSelection(AClearSelection: Boolean = True; AData: TObject = nil); virtual; - procedure DoNormalSelection; virtual; - procedure DoNormalSelectionWithAnchor(ASelect: Boolean = True); - procedure DoRangeSelection(AClearSelection: Boolean = True); - procedure DoToggleRecordSelection; - procedure FinishSelection; virtual; - procedure InvalidateFocusedRecord; virtual; - procedure InvalidateSelection; virtual; - function IsKeyForMultiSelect(AKey: Word; AShift: TShiftState; - AFocusedRecordChanged: Boolean): Boolean; virtual; - function IsRecordSelected(ARecord: TcxCustomGridRecord): Boolean; - procedure MultiSelectKeyDown(var Key: Word; Shift: TShiftState); virtual; - procedure MultiSelectMouseDown(AHitTest: TcxCustomGridHitTest; AShift: TShiftState); virtual; - procedure MultiSelectMouseUp(AHitTest: TcxCustomGridHitTest; AShift: TShiftState); virtual; - procedure SelectFocusedRecord; - procedure SetSelectionAnchor(AGridRecordIndex: Integer); - function SupportsAdditiveSelection: Boolean; virtual; - function SupportsRecordSelectionToggling: Boolean; virtual; - - // navigation - function CanFocusNextItem(AFocusedItemIndex, ANextItemIndex: Integer; - AGoForward, AGoOnCycle, AGoToNextRecordOnCycle: Boolean): Boolean; virtual; - function FocusedRecordHasCells(ACheckCellSelectionAbility: Boolean): Boolean; - procedure FocusNextPage(ASyncSelection: Boolean); virtual; - procedure FocusPrevPage(ASyncSelection: Boolean); virtual; - function IsKeyForController(AKey: Word; AShift: TShiftState): Boolean; virtual; - procedure ScrollPage(AForward: Boolean); virtual; - procedure ScrollRecords(AForward: Boolean; ACount: Integer); virtual; - procedure ShowNextPage; virtual; - procedure ShowPrevPage; virtual; - - // pull focusing - procedure DoPullFocusing(AHitTest: TcxGridRecordHitTest); virtual; - procedure DoPullFocusingScrolling(ADirection: TcxDirection); virtual; - function GetPullFocusingScrollingDirection(X, Y: Integer; out ADirection: TcxDirection): Boolean; virtual; - function IsPullFocusingPosChanged: Boolean; - procedure SavePullFocusingPos; - procedure StartPullFocusing(AHitTest: TcxCustomGridHitTest); virtual; - procedure StopPullFocusing; - procedure StartPullFocusingScrolling(ADirection: TcxDirection); - procedure StopPullFocusingScrolling; - function SupportsPullFocusing: Boolean; virtual; - property PullFocusingOriginHitTest: TcxCustomGridHitTest read FPullFocusingOriginHitTest; - - // delphi drag and drop - function GetDragScrollDirection(X, Y: Integer): TcxDirection; virtual; - function GetDragScrollInterval: Integer; virtual; - function IsFirstRecordForDragScroll(ARecord: TcxCustomGridRecord): Boolean; virtual; - function IsLastRecordForDragScroll(ARecord: TcxCustomGridRecord): Boolean; virtual; - procedure ProcessDragFocusing(X, Y: Integer); - procedure StartDragScroll(ADirection: TcxDirection); - procedure StopDragScroll; - function IsDragScroll: Boolean; - //--- - function GetDragOpenInfo(AHitTest: TcxCustomGridHitTest): TcxCustomGridDragOpenInfo; virtual; - function IsDragOpenHitTest(AHitTest: TcxCustomGridHitTest; - out ADragOpenInfo: TcxCustomGridDragOpenInfo): Boolean; - //--- - property DragHighlightedRecord: TcxCustomGridRecord read FDragHighlightedRecord write SetDragHighlightedRecord; - - // incsearching - function GetItemForIncSearching: TcxCustomGridTableItem; virtual; - procedure IncSearchKeyDown(var Key: Word; Shift: TShiftState); virtual; - property ItemForIncSearching: TcxCustomGridTableItem read GetItemForIncSearching; - - function GetEditingControllerClass: TcxGridEditingControllerClass; virtual; - - property AllowAppendRecord: Boolean read FAllowAppendRecord write FAllowAppendRecord; - property AllowCheckEdit: Boolean read FAllowCheckEdit write FAllowCheckEdit; - property BlockRecordKeyboardHandling: Boolean read FBlockRecordKeyboardHandling - write FBlockRecordKeyboardHandling; - property CancelEditingOnExit: Boolean read GetCancelEditingOnExit; - property EatKeyPress: Boolean read FEatKeyPress write FEatKeyPress; - property FocusOnRecordFocusing: Boolean read FFocusOnRecordFocusing write FFocusOnRecordFocusing; - property ForcingWidthItem: TcxCustomGridTableItem read FForcingWidthItem write FForcingWidthItem; - property InternalTopRecordIndex: Integer read FTopRecordIndex write SetInternalTopRecordIndex; - property IsReadyForImmediateEditing: Boolean read FIsReadyForImmediateEditing - write FIsReadyForImmediateEditing; - property IsRecordsScrollHorizontal: Boolean read GetIsRecordsScrollHorizontal; - property MultiSelect: Boolean read GetMultiSelect; - property ScrollBarOffsetBegin: Integer read GetScrollBarOffsetBegin; - property ScrollBarOffsetEnd: Integer read GetScrollBarOffsetEnd; - property ScrollBarRecordCount: Integer read GetScrollBarRecordCount; - property ScrollBarPos: Integer read GetScrollBarPos write SetScrollBarPos; - property ViewData: TcxCustomGridTableViewData read GetViewData; - property ViewInfo: TcxCustomGridTableViewInfo read GetViewInfo; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - procedure BeginDragAndDrop; override; - procedure ControlFocusChanged; override; - procedure DoCancelMode; override; - procedure DoKeyDown(var Key: Word; Shift: TShiftState); override; - procedure EndDragAndDrop(Accepted: Boolean); override; - function FindNextItem(AFocusedItemIndex: Integer; - AGoForward, AGoOnCycle, AFollowVisualOrder: Boolean; out ACycleChanged: Boolean; - ARecord: TcxCustomGridRecord): Integer; virtual; - function FindNextRecord(AFocusedRecordIndex: Integer; - AGoForward, AGoOnCycle: Boolean; out ACycleChanged: Boolean): Integer; - function HasFilterMRUItemsPopup: Boolean; - function HasFilterPopup: Boolean; - function HasFocusedControls: Boolean; override; - function HasItemsCustomizationPopup: Boolean; - function IsClickableRecordHitTest(AHitTest: TcxCustomGridHitTest): Boolean; - function IsDataFullyVisible(AIsCallFromMaster: Boolean = False): Boolean; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - function ProcessDetailDialogChar(ADetail: TcxCustomGridView; ACharCode: Word): Boolean; override; - function ProcessDialogChar(ACharCode: Word): Boolean; override; - function SupportsTabAccelerators(AGridRecord: TcxCustomGridRecord): Boolean; virtual; - - procedure BeforeStartDrag; override; - function CanDrag(X, Y: Integer): Boolean; override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); override; - procedure DrawDragImage(ACanvas: TcxCanvas; R: TRect); override; - procedure EndDrag(Target: TObject; X, Y: Integer); override; - function GetDragDropText(ADragObject: TDragObject): string; virtual; - procedure GetDragDropTextViewParams(out AParams: TcxViewParams); virtual; - function GetDragImagesSize: TPoint; override; - function HasDragImages: Boolean; override; - procedure StartDrag(var DragObject: TDragObject); override; - property DragDropText: string read FDragDropText; - - procedure CancelIncSearching; - function CheckEditing(var AFocusedRecordIndex: Integer; AGoForward: Boolean): Boolean; - procedure CheckScrolling(const P: TPoint); virtual; - procedure ClearSelection; virtual; - procedure CreateNewRecord(AtEnd: Boolean); virtual; - procedure DeleteSelection; virtual; - function FocusFirstAvailableItem: Boolean; - function FocusNextCell(AGoForward: Boolean; AProcessCellsOnly: Boolean = True; - AAllowCellsCycle: Boolean = True; AFollowVisualOrder: Boolean = True): Boolean; - function FocusNextItem(AFocusedItemIndex: Integer; - AGoForward, AGoOnCycle, AGoToNextRecordOnCycle, AFollowVisualOrder: Boolean): Boolean; - function FocusNextRecord(AFocusedRecordIndex: Integer; - AGoForward, AGoOnCycle, AGoIntoDetail, AGoOutOfDetail: Boolean): Boolean; - function FocusNextRecordWithSelection(AFocusedRecordIndex: Integer; - AGoForward, AGoOnCycle, AGoIntoDetail: Boolean; ASyncSelection: Boolean = True): Boolean; - function FocusRecord(AFocusedRecordIndex: Integer; ASyncSelection: Boolean): Boolean; - procedure MakeFocusedItemVisible; - procedure MakeFocusedRecordVisible; - procedure MakeItemVisible(AItem: TcxCustomGridTableItem); virtual; abstract; - procedure MakeRecordVisible(ARecord: TcxCustomGridRecord); virtual; - procedure SelectAll; virtual; - procedure SelectAllRecords; - - function GoToFirst(ASyncSelection: Boolean = True): Boolean; - function GoToLast(AGoIntoDetail: Boolean; ASyncSelection: Boolean = True): Boolean; - function GoToNext(AGoIntoDetail: Boolean; ASyncSelection: Boolean = True): Boolean; - function GoToPrev(AGoIntoDetail: Boolean; ASyncSelection: Boolean = True): Boolean; - function IsFinish: Boolean; - function IsStart: Boolean; - - property ClickedCellViewInfo: TcxGridTableDataCellViewInfo read FClickedCellViewInfo write FClickedCellViewInfo; - property EditingController: TcxGridEditingController read FEditingController; - property EditingItem: TcxCustomGridTableItem read GetEditingItem write SetEditingItem; - property FilterMRUItemsPopup: TcxGridFilterMRUItemsPopup read GetFilterMRUItemsPopup; - property FilterPopup: TcxGridFilterPopup read GetFilterPopup; - property FocusedItem: TcxCustomGridTableItem read FFocusedItem write SetFocusedItem; - property FocusedItemIndex: Integer read GetFocusedItemIndex write SetFocusedItemIndex; - property FocusedRecord: TcxCustomGridRecord read GetFocusedRecord write SetFocusedRecord; - property FocusedRecordIndex: Integer read GetFocusedRecordIndex write SetFocusedRecordIndex; - property GridView: TcxCustomGridTableView read GetGridView; - property IncSearchingItem: TcxCustomGridTableItem read GetIncSearchingItem; - property IncSearchingText: string read GetIncSearchingText write SetIncSearchingText; - property IsPullFocusing: Boolean read FIsPullFocusing; - property IsEditing: Boolean read GetIsEditing; - property IsIncSearching: Boolean read GetIsIncSearching; - property IsItemMoving: Boolean read GetIsItemMoving; - property ItemsCustomizationPopup: TcxCustomGridItemsCustomizationPopup read GetItemsCustomizationPopup; - property MasterController: TcxCustomGridTableController read GetMasterController; - property MovingItem: TcxCustomGridTableItem read FMovingItem; - property NewItemRecordFocused: Boolean read GetNewItemRecordFocused write SetNewItemRecordFocused; - property SelectedRecordCount: Integer read GetSelectedRecordCount; - property SelectedRecords[Index: Integer]: TcxCustomGridRecord read GetSelectedRecord; - property TopRecordIndex: Integer read FTopRecordIndex write SetTopRecordIndex; - end; - - { painters } - - TcxCustomGridPartPainter = class(TcxCustomGridCellPainter); - - // filter - - TcxCustomGridFilterButtonPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxCustomGridFilterButtonViewInfo; - protected - function ExcludeFromClipRect: Boolean; override; - property ViewInfo: TcxCustomGridFilterButtonViewInfo read GetViewInfo; - end; - - TcxGridFilterCloseButtonPainter = class(TcxCustomGridFilterButtonPainter) - protected - procedure DrawContent; override; - end; - - TcxGridFilterActivateButtonPainter = class(TcxCustomGridFilterButtonPainter) - private - function GetViewInfo: TcxGridFilterActivateButtonViewInfo; - protected - procedure DrawContent; override; - property ViewInfo: TcxGridFilterActivateButtonViewInfo read GetViewInfo; - end; - - TcxGridFilterDropDownButtonPainter = class(TcxCustomGridFilterButtonPainter) - protected - procedure DrawContent; override; - end; - - TcxGridFilterCustomizeButtonPainter = class(TcxCustomGridFilterButtonPainter) - protected - procedure Paint; override; - end; - - TcxGridFilterPainterClass = class of TcxGridFilterPainter; - - TcxGridFilterPainter = class(TcxCustomGridPartPainter) - private - FTextWasUnderlined: Boolean; - function GetViewInfo: TcxGridFilterViewInfo; - protected - procedure DrawBackground(const R: TRect); override; - procedure DrawButtons; virtual; - function ExcludeFromClipRect: Boolean; override; - procedure Paint; override; - procedure PrepareCanvasForDrawText; override; - procedure UnprepareCanvasForDrawText; override; - property ViewInfo: TcxGridFilterViewInfo read GetViewInfo; - end; - - // records - - TcxGridTableDataCellPainterClass = class of TcxGridTableDataCellPainter; - - TcxGridTableDataCellPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridTableDataCellViewInfo; - protected - procedure DrawContent; override; - procedure DrawFocusRect; virtual; - procedure Paint; override; - property ViewInfo: TcxGridTableDataCellViewInfo read GetViewInfo; - end; - - TcxCustomGridRecordPainterClass = class of TcxCustomGridRecordPainter; - - TcxCustomGridRecordPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxCustomGridRecordViewInfo; - protected - procedure AfterPaint; override; - procedure BeforePaint; override; - procedure DrawBackground; override; - procedure DrawExpandButton; virtual; - function DrawExpandButtonBeforePaint: Boolean; virtual; - procedure DrawFocusRect; virtual; - procedure Paint; override; - property ViewInfo: TcxCustomGridRecordViewInfo read GetViewInfo; - end; - - TcxCustomGridRecordsPainterClass = class of TcxCustomGridRecordsPainter; - - TcxCustomGridRecordsPainter = class - private - FCanvas: TcxCanvas; - FViewInfo: TcxCustomGridRecordsViewInfo; - protected - //procedure BeforePaint; virtual; - procedure Paint; virtual; - property Canvas: TcxCanvas read FCanvas; - property ViewInfo: TcxCustomGridRecordsViewInfo read FViewInfo; - public - constructor Create(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridRecordsViewInfo); virtual; - procedure MainPaint; - end; - - // view - - TcxNavigatorSitePainter = class(TcxCustomGridCellPainter) - protected - function ExcludeFromClipRect: Boolean; override; - end; - - TcxCustomGridTablePainter = class(TcxCustomGridPainter) - private - function GetController: TcxCustomGridTableController; - function GetViewInfo: TcxCustomGridTableViewInfo; - protected - function CanOffset(AItemsOffset, DX, DY: Integer): Boolean; virtual; - procedure DrawBackground; override; - procedure DrawFilterBar; virtual; - procedure DrawInfoText; virtual; - procedure DrawNavigator; virtual; - procedure DrawRecords; virtual; - procedure Offset(AItemsOffset: Integer); overload; virtual; - procedure Offset(DX, DY: Integer); overload; virtual; - procedure PaintBefore; override; - procedure PaintContent; override; - public - procedure DoOffset(AItemsOffset, DX, DY: Integer); - procedure DrawFocusRect(const R: TRect; AHideFocusRect: Boolean); override; - property Controller: TcxCustomGridTableController read GetController; - property ViewInfo: TcxCustomGridTableViewInfo read GetViewInfo; - end; - - { view infos } - - // part - - TcxGridPartAlignment = (gpaTop, gpaBottom); - - TcxCustomGridPartViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FHeight: Integer; - function GetGridView: TcxCustomGridTableView; - function GetGridViewInfo: TcxCustomGridTableViewInfo; - function GetIndex: Integer; - procedure SetIndex(Value: Integer); - protected - function CalculateBounds: TRect; virtual; - procedure CalculateInvisible; virtual; - procedure CalculateVisible; virtual; - function CustomDrawBackground(ACanvas: TcxCanvas): Boolean; override; - function GetAlignment: TcxGridPartAlignment; virtual; abstract; - //function GetHeight: Integer; override; - function GetIsAutoWidth: Boolean; virtual; abstract; - function GetIsPart: Boolean; virtual; - function GetIsScrollable: Boolean; virtual; abstract; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function HasCustomDrawBackground: Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - - property Height: Integer read FHeight write FHeight; - property IsPart: Boolean read GetIsPart; - public - constructor Create(AGridViewInfo: TcxCustomGridTableViewInfo); reintroduce; virtual; - destructor Destroy; override; - procedure MainCalculate; - property Alignment: TcxGridPartAlignment read GetAlignment; - property GridView: TcxCustomGridTableView read GetGridView; - property GridViewInfo: TcxCustomGridTableViewInfo read GetGridViewInfo; - property Index: Integer read GetIndex write SetIndex; - property IsAutoWidth: Boolean read GetIsAutoWidth; - property IsScrollable: Boolean read GetIsScrollable; - end; - - // filter - - TcxGridFilterButtonAlignment = (fbaLeft, fbaRight); - - TcxCustomGridFilterButtonViewInfoClass = class of TcxCustomGridFilterButtonViewInfo; - - TcxCustomGridFilterButtonViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FContainer: TcxGridFilterButtonsViewInfo; - function GetFilter: TcxDataFilterCriteria; - function GetGridView: TcxCustomGridTableView; - protected - function CaptureMouseOnPress: Boolean; override; - function GetAlignment: TcxGridFilterButtonAlignment; virtual; - function GetCanvas: TcxCanvas; override; - function GetHotTrack: Boolean; override; - function GetVisible: Boolean; override; - - property Container: TcxGridFilterButtonsViewInfo read FContainer; - property Filter: TcxDataFilterCriteria read GetFilter; - public - constructor Create(AContainer: TcxGridFilterButtonsViewInfo); reintroduce; virtual; - property Alignment: TcxGridFilterButtonAlignment read GetAlignment; - property GridView: TcxCustomGridTableView read GetGridView; - end; - - TcxGridFilterCloseButtonViewInfo = class(TcxCustomGridFilterButtonViewInfo) - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - procedure Click; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - end; - - TcxGridFilterActivateButtonViewInfo = class(TcxCustomGridFilterButtonViewInfo) - private - function GetChecked: Boolean; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - procedure Click; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - public - property Checked: Boolean read GetChecked; - end; - - TcxGridFilterDropDownButtonViewInfo = class(TcxCustomGridFilterButtonViewInfo) - private - function GetDropDownWindowValue: TcxGridFilterMRUItemsPopup; - protected - procedure BeforeStateChange; override; - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function CaptureMouseOnPress: Boolean; override; - function GetAlignment: TcxGridFilterButtonAlignment; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetVisible: Boolean; override; - - function DropDownWindowExists: Boolean; override; - function GetDropDownWindow: TcxCustomGridPopup; override; - function GetDropDownWindowOwnerBounds: TRect; override; - property DropDownWindow: TcxGridFilterMRUItemsPopup read GetDropDownWindowValue; - public - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - end; - - TcxGridFilterCustomizeButtonViewInfo = class(TcxCustomGridFilterButtonViewInfo) - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - procedure Click; override; - function GetAlignment: TcxGridFilterButtonAlignment; override; - function GetAlignmentHorz: TAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - end; - - TcxGridFilterButtonsViewInfoClass = class of TcxGridFilterButtonsViewInfo; - - TcxGridFilterButtonsViewInfo = class - private - FFilterViewInfo: TcxGridFilterViewInfo; - FItems: TList; - function GetCount: Integer; - function GetGridView: TcxCustomGridTableView; - function GetHeight: Integer; - function GetItem(Index: Integer): TcxCustomGridFilterButtonViewInfo; - function GetWidth(AAlignment: TcxGridFilterButtonAlignment): Integer; - function GetWidthLeftPart: Integer; - function GetWidthRightPart: Integer; - protected - FDropDownButtonViewInfo: TcxGridFilterDropDownButtonViewInfo; - procedure AddItems; virtual; - procedure DestroyItems; virtual; - property FilterViewInfo: TcxGridFilterViewInfo read FFilterViewInfo; - property GridView: TcxCustomGridTableView read GetGridView; - public - constructor Create(AFilterViewInfo: TcxGridFilterViewInfo); virtual; - destructor Destroy; override; - function AddItem(AItemClass: TcxCustomGridFilterButtonViewInfoClass): TcxCustomGridFilterButtonViewInfo; - procedure Calculate(const ABounds: TRect); virtual; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - - property Count: Integer read GetCount; - property DropDownButtonViewInfo: TcxGridFilterDropDownButtonViewInfo read FDropDownButtonViewInfo; - property Height: Integer read GetHeight; - property Items[Index: Integer]: TcxCustomGridFilterButtonViewInfo read GetItem; default; - property WidthLeftPart: Integer read GetWidthLeftPart; - property WidthRightPart: Integer read GetWidthRightPart; - end; - - TcxGridFilterViewInfoClass = class of TcxGridFilterViewInfo; - - TcxGridFilterViewInfo = class(TcxCustomGridPartViewInfo) - private - FButtonsViewInfo: TcxGridFilterButtonsViewInfo; - function GetFilter: TcxDataFilterCriteria; - function GetFiltering: TcxCustomGridTableFiltering; - procedure CreateButtonsViewInfo; - procedure DestroyButtonsViewInfo; - protected - function CalculateButtonsViewInfoBounds: TRect; virtual; - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAlignment: TcxGridPartAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetBackgroundBitmap: TBitmap; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetIsAutoWidth: Boolean; override; - function GetIsCheck: Boolean; override; - function GetIsScrollable: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - function HasMouse(AHitTest: TcxCustomGridHitTest): Boolean; override; - function InvalidateOnStateChange: Boolean; override; - procedure StateChanged(APrevState: TcxGridCellState); override; - - function GetButtonsViewInfoClass: TcxGridFilterButtonsViewInfoClass; virtual; - - property Filter: TcxDataFilterCriteria read GetFilter; - property Filtering: TcxCustomGridTableFiltering read GetFiltering; - public - constructor Create(AGridViewInfo: TcxCustomGridTableViewInfo); override; - destructor Destroy; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - property ButtonsViewInfo: TcxGridFilterButtonsViewInfo read FButtonsViewInfo; - end; - - // cells - - TcxGridTableCellViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FRecordViewInfo: TcxCustomGridRecordViewInfo; - FSelected: Boolean; - FSelectedCalculated: Boolean; - function GetCacheItem: TcxCustomGridTableViewInfoCacheItem; - function GetController: TcxCustomGridTableController; - function GetGridView: TcxCustomGridTableView; - function GetGridRecord: TcxCustomGridRecord; - function GetSelected: Boolean; - protected - function CalculateSelected: Boolean; virtual; - function GetAlwaysSelected: Boolean; virtual; - function GetCanvas: TcxCanvas; override; - function GetGridViewInfo: TcxCustomGridTableViewInfo; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetTransparent: Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - - property AlwaysSelected: Boolean read GetAlwaysSelected; - property CacheItem: TcxCustomGridTableViewInfoCacheItem read GetCacheItem; - property Controller: TcxCustomGridTableController read GetController; - public - constructor Create(ARecordViewInfo: TcxCustomGridRecordViewInfo); reintroduce; virtual; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function CanDrawSelected: Boolean; virtual; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - property GridRecord: TcxCustomGridRecord read GetGridRecord; - property GridView: TcxCustomGridTableView read GetGridView; - property GridViewInfo: TcxCustomGridTableViewInfo read GetGridViewInfo; - property RecordViewInfo: TcxCustomGridRecordViewInfo read FRecordViewInfo; - property Selected: Boolean read GetSelected; - end; - - TcxGridTableDataCellViewInfo = class(TcxGridTableCellViewInfo) - private - FEditViewData: TcxCustomEditViewData; - FEditViewInfo: TcxCustomEditViewInfo; - FIsLocalCopyOfEditViewData: Boolean; - FItem: TcxCustomGridTableItem; - FProperties: TcxCustomEditProperties; - FStyle: TcxEditStyle; - FWasFocusedBeforeClick: Boolean; - function GetEditing: Boolean; - function GetMousePos: TPoint; - function GetProperties: TcxCustomEditProperties; - function GetShowButtons: Boolean; - protected - procedure AfterCustomDraw(ACanvas: TcxCanvas); override; - procedure BeforeCustomDraw(ACanvas: TcxCanvas); override; - procedure CalculateEditViewInfo(AEditViewInfo: TcxCustomEditViewInfo; - const AMousePos: TPoint); virtual; - function CalculateHeight: Integer; override; - function CalculateSelected: Boolean; override; - function CanActivateEditOnMouseDown(AButton: TMouseButton): Boolean; virtual; - function CanShowEdit: Boolean; virtual; - procedure CheckEditHotTrack(const AMousePos: TPoint); - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - procedure DoCalculateParams; override; - procedure EditHotTrackChanged; - function GetAreaBounds: TRect; override; - function GetAutoHeight: Boolean; virtual; - function GetDisplayValue: TcxEditValue; virtual; - function GetEditBounds: TRect; virtual; - function GetEditViewDataBounds: TRect; virtual; - procedure GetEditViewDataContentOffsets(var R: TRect); virtual; - function GetFocused: Boolean; virtual; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetMaxLineCount: Integer; virtual; - function GetMultiLine: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetShowEndEllipsis: Boolean; override; - function GetText: string; override; - function GetValue: Variant; virtual; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasCustomDraw: Boolean; override; - function HasFocusRect: Boolean; virtual; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - procedure InitTextSelection; virtual; - function InvalidateOnStateChange: Boolean; override; - function IsTextSelected: Boolean; virtual; - procedure MouseLeave; override; - procedure Offset(DX, DY: Integer); override; - procedure RestoreParams(const AParams: TcxViewParams); override; - procedure SaveParams(out AParams: TcxViewParams); override; - procedure StateChanged(APrevState: TcxGridCellState); override; - function SupportsZeroHeight: Boolean; virtual; - - function CanShowAutoHint: Boolean; virtual; - function CanShowCustomHint: Boolean; virtual; - function CanShowHint: Boolean; override; - function GetCellBoundsForHint: TRect; override; - function NeedShowHint(const AMousePos: TPoint; out AHintText: TCaption; - out AIsHintMultiLine: Boolean; out ATextRect: TRect): Boolean; override; - function UseStandardNeedShowHint: Boolean; virtual; - - procedure InitStyle; virtual; - - function CreateEditViewInfo: TcxCustomEditViewInfo; - - procedure CreateEditViewData; - procedure DestroyEditViewData; - property EditViewData: TcxCustomEditViewData read FEditViewData; - - procedure UpdateEdit; - - property AutoHeight: Boolean read GetAutoHeight; - property EditViewDataBounds: TRect read GetEditViewDataBounds; - property MaxLineCount: Integer read GetMaxLineCount; - property MousePos: TPoint read GetMousePos; - property ShowButtons: Boolean read GetShowButtons; - property WasFocusedBeforeClick: Boolean read FWasFocusedBeforeClick; - public - constructor Create(ARecordViewInfo: TcxCustomGridRecordViewInfo; - AItem: TcxCustomGridTableItem); reintroduce; virtual; - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function CanDrawSelected: Boolean; override; - function GetInplaceEditPosition: TcxInplaceEditPosition; - procedure Invalidate(ARecalculate: Boolean); reintroduce; virtual; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - function MouseMove(AHitTest: TcxCustomGridHitTest; AShift: TShiftState): Boolean; override; - function MouseUp(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - - property DisplayValue: TcxEditValue read GetDisplayValue; - //property Edit: TcxCustomEdit read GetEdit; - property EditBounds: TRect read GetEditBounds; - property Editing: Boolean read GetEditing; - property EditViewInfo: TcxCustomEditViewInfo read FEditViewInfo; - property Focused: Boolean read GetFocused; - property Item: TcxCustomGridTableItem read FItem; - property Properties: TcxCustomEditProperties read GetProperties; - property Style: TcxEditStyle read FStyle; - property Value: Variant read GetValue; - end; - - // records - - TcxCustomGridRecordViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FExpandButtonBounds: TRect; - FExpanded: Boolean; - FExpandedCalculated: Boolean; - FIsRecordViewInfoAssigned: Boolean; - FRecordsViewInfo: TcxCustomGridRecordsViewInfo; - FSelected: Boolean; - FSelectedCalculated: Boolean; - function GetCacheItem: TcxCustomGridTableViewInfoCacheItem; - function GetExpanded: Boolean; - function GetFocused: Boolean; - function GetGridView: TcxCustomGridTableView; - function GetGridViewInfo: TcxCustomGridTableViewInfo; - function GetIndex: Integer; - function GetSelected: Boolean; - protected - FRecord: TcxCustomGridRecord; - procedure CalculateExpandButtonBounds(var ABounds: TRect); virtual; abstract; - function CalculateSelected: Boolean; virtual; - function CanGenerateExpandButtonHitTest: Boolean; virtual; - procedure ControlFocusChanged; virtual; - function GetAutoHeight: Boolean; virtual; - function GetBackgroundBitmap: TBitmap; override; - function GetBackgroundBitmapBounds: TRect; virtual; - function GetCanvas: TcxCanvas; override; - function GetCellTransparent(ACell: TcxGridTableCellViewInfo): Boolean; virtual; - function GetContentBounds: TRect; virtual; - function GetExpandButtonAreaBounds: TRect; virtual; - function GetFocusRectBounds: TRect; virtual; - function GetFullyVisible: Boolean; virtual; - function GetHeight: Integer; override; - function GetHideFocusRectOnExit: Boolean; virtual; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetVisible: Boolean; override; - function HasFocusRect: Boolean; virtual; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - function IsClickHitTest(AHitTest: TcxCustomGridHitTest): Boolean; virtual; - function IsDetailVisible(ADetail: TcxCustomGridView): Boolean; virtual; - procedure Offset(DX, DY: Integer); override; - procedure VisibilityChanged(AVisible: Boolean); virtual; - - property AutoHeight: Boolean read GetAutoHeight; - property BackgroundBitmapBounds: TRect read GetBackgroundBitmapBounds; - property CacheItem: TcxCustomGridTableViewInfoCacheItem read GetCacheItem; - property ExpandButtonAreaBounds: TRect read GetExpandButtonAreaBounds; - property Expanded: Boolean read GetExpanded; - public - constructor Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); reintroduce; virtual; - destructor Destroy; override; - procedure BeforeRecalculation; override; - function Click(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; reintroduce; virtual; - function GetBoundsForInvalidate(AItem: TcxCustomGridTableItem): TRect; virtual; - function GetBoundsForItem(AItem: TcxCustomGridTableItem): TRect; virtual; - function GetCellViewInfoByItem(AItem: TcxCustomGridTableItem): TcxGridTableDataCellViewInfo; virtual; - {procedure GetDataCellViewParams(AItem: TcxCustomGridTableItem; - ACellViewInfo: TcxGridTableCellViewInfo; var AParams: TcxViewParams); virtual;} - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - procedure MainCalculate(ALeftBound, ATopBound: Integer); virtual; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - function ProcessDialogChar(ACharCode: Word): Boolean; virtual; - procedure Recalculate; - - property ContentBounds: TRect read GetContentBounds; - property ExpandButtonBounds: TRect read FExpandButtonBounds; - property Focused: Boolean read GetFocused; - property FocusRectBounds: TRect read GetFocusRectBounds; - property FullyVisible: Boolean read GetFullyVisible; - property GridView: TcxCustomGridTableView read GetGridView; - property GridRecord: TcxCustomGridRecord read FRecord; - property GridViewInfo: TcxCustomGridTableViewInfo read GetGridViewInfo; - property Index: Integer read GetIndex; - property HideFocusRectOnExit: Boolean read GetHideFocusRectOnExit; - property RecordsViewInfo: TcxCustomGridRecordsViewInfo read FRecordsViewInfo; - property Selected: Boolean read GetSelected; - end; - - TcxCustomGridRecordsViewInfoClass = class of TcxCustomGridRecordsViewInfo; - - TcxCustomGridRecordsViewInfo = class - private - FBackgroundBitmap: TBitmap; - FBounds: TRect; - FContentBounds: TRect; - FGridViewInfo: TcxCustomGridTableViewInfo; - FIncSearchingCellViewInfo: TcxGridTableDataCellViewInfo; - FIsIncSearchingCellViewInfoCalculated: Boolean; - FItems: TList; - FItemsOffset: Integer; - - function GetCanvas: TcxCanvas; - function GetController: TcxCustomGridTableController; - function GetCount: Integer; - function GetFirstRecordIndex: Integer; - function GetGridView: TcxCustomGridTableView; - function GetIncSearchingCellViewInfo: TcxGridTableDataCellViewInfo; - function GetItem(Index: Integer): TcxCustomGridRecordViewInfo; - function GetMaxCount: Integer; - function GetTopRecordIndex: Integer; - function GetViewData: TcxCustomGridTableViewData; - - procedure CreateItems; - procedure DestroyItems; - function CreateRecordViewInfo(AIndex: Integer): TcxCustomGridRecordViewInfo; - protected - FVisibleCount: Integer; - procedure AfterCalculate; virtual; - procedure BeforeCalculate; virtual; - procedure BeforeItemRecalculation; virtual; - procedure AfterOffset; virtual; - procedure BeforeOffset; virtual; - procedure Calculate; virtual; - function CalculateBounds: TRect; virtual; - function CalculateContentBounds: TRect; virtual; - function CalculateIncSearchingCellViewInfo: TcxGridTableDataCellViewInfo; virtual; - procedure CalculateVisibleCount; virtual; - procedure CreateEditViewDatas; - procedure DestroyEditViewDatas; - function GetAreaBoundsForCell(ACellViewInfo: TcxGridTableDataCellViewInfo): TRect; virtual; - function GetAutoDataCellHeight: Boolean; virtual; - function GetAutoDataRecordHeight: Boolean; virtual; - function GetAutoRecordHeight: Boolean; virtual; - function GetBackgroundBitmap: TBitmap; virtual; - function GetItemLeftBound(AIndex: Integer): Integer; virtual; abstract; - function GetItemsOffset(AItemCountDelta: Integer): Integer; virtual; abstract; - function GetItemTopBound(AIndex: Integer): Integer; virtual; abstract; - function GetRecordIndex(AViewInfoIndex: Integer): Integer; - function GetViewInfoIndex(ARecordIndex: Integer): Integer; - function IsEmpty: Boolean; virtual; - procedure OffsetItem(AIndex, AOffset: Integer); virtual; abstract; - - procedure ControlFocusChanged; virtual; - procedure VisibilityChanged(AVisible: Boolean); virtual; - - function GetPainterClass: TcxCustomGridRecordsPainterClass; virtual; - - property Canvas: TcxCanvas read GetCanvas; - property Controller: TcxCustomGridTableController read GetController; - property FirstRecordIndex: Integer read GetFirstRecordIndex; - property GridViewInfo: TcxCustomGridTableViewInfo read FGridViewInfo; - property IncSearchingCellViewInfo: TcxGridTableDataCellViewInfo read GetIncSearchingCellViewInfo; - property MaxCount: Integer read GetMaxCount; - property TopRecordIndex: Integer read GetTopRecordIndex; - property ViewData: TcxCustomGridTableViewData read GetViewData; - public - constructor Create(AGridViewInfo: TcxCustomGridTableViewInfo); virtual; - destructor Destroy; override; - function CanOffset(AItemCountDelta: Integer): Boolean; virtual; - function GetCellHeight(ACellContentHeight: Integer): Integer; virtual; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - function GetRealItem(ARecord: TcxCustomGridRecord): TcxCustomGridRecordViewInfo; virtual; - function IsCellMultiLine(AItem: TcxCustomGridTableItem): Boolean; virtual; - procedure MainCalculate; virtual; - procedure Offset(AItemCountDelta: Integer); overload; virtual; - procedure Offset(DX, DY: Integer); overload; virtual; - procedure Paint; - - property AutoDataCellHeight: Boolean read GetAutoDataCellHeight; - property AutoDataRecordHeight: Boolean read GetAutoDataRecordHeight; - property AutoRecordHeight: Boolean read GetAutoRecordHeight; - property BackgroundBitmap: TBitmap read FBackgroundBitmap write FBackgroundBitmap; - property Bounds: TRect read FBounds; - property ContentBounds: TRect read FContentBounds; - property Count: Integer read GetCount; - property GridView: TcxCustomGridTableView read GetGridView; - property Items[Index: Integer]: TcxCustomGridRecordViewInfo read GetItem; default; - property ItemsOffset: Integer read FItemsOffset; - property VisibleCount: Integer read FVisibleCount; - end; - - // view - - TcxNavigatorSiteViewInfoClass = class of TcxNavigatorSiteViewInfo; - - TcxNavigatorSiteViewInfo = class(TcxCustomGridViewCellViewInfo) - private - function GetGridViewInfo: TcxCustomGridTableViewInfo; - function GetNavigatorViewInfo: TcxNavigatorViewInfo; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetHeight: Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetVisible: Boolean; override; - procedure MouseLeave; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetWidth: Integer; override; - public - destructor Destroy; override; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - function MouseMove(AHitTest: TcxCustomGridHitTest; AShift: TShiftState): Boolean; override; - function MouseUp(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - property GridViewInfo: TcxCustomGridTableViewInfo read GetGridViewInfo; - property NavigatorViewInfo: TcxNavigatorViewInfo read GetNavigatorViewInfo; - end; - - TcxCustomGridTableViewInfo = class(TcxCustomGridViewInfo, IcxNavigatorOwner) - private - FCalculateDown: Boolean; - FFilterViewInfo: TcxGridFilterViewInfo; - FFirstRecordIndex: Integer; - FNavigatorSize: TPoint; - FNavigatorSiteViewInfo: TcxNavigatorSiteViewInfo; - FNavigatorViewInfo: TcxNavigatorViewInfo; - FParts: TList; - FRecordsViewInfo: TcxCustomGridRecordsViewInfo; - - function GetController: TcxCustomGridTableController; - function GetExpandButtonSize: Integer; - function GetFirstRecordIndex: Integer; - function GetGridView: TcxCustomGridTableView; - function GetPart(Index: Integer): TcxCustomGridPartViewInfo; - function GetPartCount: Integer; - function GetPartsBottomHeight: Integer; - function GetPartsCustomHeight(AAlignment: TcxGridPartAlignment): Integer; - function GetPartsTopHeight: Integer; - function GetScrollableAreaWidth: Integer; - function GetViewData: TcxCustomGridTableViewData; - function GetVisibleRecordCount: Integer; - - procedure AddPart(AItem: TcxCustomGridPartViewInfo); - procedure RemovePart(AItem: TcxCustomGridPartViewInfo); - protected - // IcxNavigatorOwner - function GetNavigatorBounds: TRect; virtual; - function GetNavigatorButtons: TcxCustomNavigatorButtons; - function GetNavigatorCanvas: TCanvas; - function GetNavigatorControl: TWinControl; - function GetNavigatorFocused: Boolean; - function GetNavigatorLookAndFeel: TcxLookAndFeel; - function GetNavigatorOwner: TComponent; - function GetNavigatorShowHint: Boolean; - function GetNavigatorTabStop: Boolean; - procedure NavigatorButtonsStateChanged; - procedure NavigatorChanged(AChangeType: TcxNavigatorChangeType); - procedure RefreshNavigator; - - procedure CreateViewInfos; override; - procedure DestroyViewInfos(AIsRecreating: Boolean); override; - - procedure AdjustClientBounds(var ABounds: TRect); override; - procedure AfterCalculating; override; - procedure AfterOffset; virtual; - procedure BeforeOffset; virtual; - procedure Calculate; override; - function CalculateClientBounds: TRect; override; - procedure CalculateHeight(const AMaxSize: TPoint; var AHeight: Integer; - var AFullyVisible: Boolean); override; - function CalculatePartBounds(APart: TcxCustomGridPartViewInfo): TRect; virtual; - function CalculateVisibleEqualHeightRecordCount: Integer; virtual; - procedure ControlFocusChanged; override; - function DoGetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function GetDefaultGridModeBufferCount: Integer; virtual; - procedure GetHScrollBarBounds(var ABounds: TRect); override; - function GetFilterViewInfoClass: TcxGridFilterViewInfoClass; virtual; - function GetIsInternalUse: Boolean; override; - function GetNavigatorOffset: Integer; virtual; - function GetNavigatorSiteBounds: TRect; virtual; - function GetNavigatorSiteViewInfoClass: TcxNavigatorSiteViewInfoClass; virtual; - function GetNavigatorViewInfoClass: TcxNavigatorViewInfoClass; virtual; - function GetNoDataInfoText: string; virtual; - function GetNoDataInfoTextAreaBounds: TRect; virtual; - procedure GetNoDataInfoTextParams(out AParams: TcxViewParams); virtual; - function GetNoDataInfoTextAreaVisible: Boolean; virtual; - function GetNonRecordsAreaHeight(ACheckScrollBar: Boolean): Integer; virtual; - function GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; virtual; abstract; - function GetScrollableAreaBounds: TRect; virtual; - function GetScrollableAreaBoundsForEdit: TRect; virtual; - function GetScrollableAreaBoundsHorz: TRect; virtual; - function GetScrollableAreaBoundsVert: TRect; virtual; - function FirstRecordIndexAssigned: Boolean; - procedure Offset(ARecordCountDelta: Integer); overload; virtual; - procedure Offset(DX, DY: Integer); overload; virtual; - procedure VisibilityChanged(AVisible: Boolean); override; - - property Controller: TcxCustomGridTableController read GetController; - property PartCount: Integer read GetPartCount; - property Parts[Index: Integer]: TcxCustomGridPartViewInfo read GetPart; - property ViewData: TcxCustomGridTableViewData read GetViewData; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - function CanOffset(ARecordCountDelta, DX, DY: Integer): Boolean; virtual; - function CanOffsetView(ARecordCountDelta: Integer): Boolean; virtual; - procedure DoOffset(ARecordCountDelta, DX, DY: Integer); virtual; - - // for extended lookup edit - function GetNearestPopupHeight(AHeight: Integer; AAdditionalRecord: Boolean = False): Integer; virtual; - function GetPopupHeight(ADropDownRecordCount: Integer): Integer; virtual; - - property CalculateDown: Boolean read FCalculateDown write FCalculateDown; - property ExpandButtonSize: Integer read GetExpandButtonSize; - property FilterViewInfo: TcxGridFilterViewInfo read FFilterViewInfo; - property FirstRecordIndex: Integer read GetFirstRecordIndex write FFirstRecordIndex; - property GridView: TcxCustomGridTableView read GetGridView; - property NavigatorBounds: TRect read GetNavigatorBounds; - property NavigatorOffset: Integer read GetNavigatorOffset; - property NavigatorSize: TPoint read FNavigatorSize; - property NavigatorSiteViewInfo: TcxNavigatorSiteViewInfo read FNavigatorSiteViewInfo; - property NavigatorViewInfo: TcxNavigatorViewInfo read FNavigatorViewInfo; - property NoDataInfoText: string read GetNoDataInfoText; - property NoDataInfoTextAreaBounds: TRect read GetNoDataInfoTextAreaBounds; - property NoDataInfoTextAreaVisible: Boolean read GetNoDataInfoTextAreaVisible; - property PartsBottomHeight: Integer read GetPartsBottomHeight; - property PartsTopHeight: Integer read GetPartsTopHeight; - property RecordsViewInfo: TcxCustomGridRecordsViewInfo read FRecordsViewInfo; - property ScrollableAreaBounds: TRect read GetScrollableAreaBounds; - property ScrollableAreaBoundsForEdit: TRect read GetScrollableAreaBoundsForEdit; - property ScrollableAreaBoundsHorz: TRect read GetScrollableAreaBoundsHorz; - property ScrollableAreaBoundsVert: TRect read GetScrollableAreaBoundsVert; - property ScrollableAreaWidth: Integer read GetScrollableAreaWidth; - property VisibleRecordCount: Integer read GetVisibleRecordCount; - end; - - // cache - - TcxCustomGridTableViewInfoCacheItem = class(TcxCustomGridViewInfoCacheItem) - private - FHeight: Integer; - FIsHeightAssigned: Boolean; - function GetGridRecord: TcxCustomGridRecord; - procedure SetHeight(Value: Integer); - protected - property GridRecord: TcxCustomGridRecord read GetGridRecord; - public - procedure UnassignValues(AKeepMaster: Boolean); override; - property Height: Integer read FHeight write SetHeight; - property IsHeightAssigned: Boolean read FIsHeightAssigned write FIsHeightAssigned; - end; - - TcxCustomGridTableViewInfoCache = class(TcxCustomGridViewInfoCache) - private - function GetViewData: TcxCustomGridTableViewData; - protected - function GetItemClass(Index: Integer): TcxCustomGridViewInfoCacheItemClass; override; - property ViewData: TcxCustomGridTableViewData read GetViewData; - end; - - { view } - - // custom item - - TcxGridTableItemChange = (ticProperty, ticLayout, ticSize); - - TcxCustomGridTableItemCustomOptions = class(TPersistent) - private - FItem: TcxCustomGridTableItem; - function GetGridView: TcxCustomGridTableView; - protected - procedure Changed(AChange: TcxGridTableItemChange = ticLayout); virtual; - public - constructor Create(AItem: TcxCustomGridTableItem); virtual; - procedure Assign(Source: TPersistent); override; - property GridView: TcxCustomGridTableView read GetGridView; - property Item: TcxCustomGridTableItem read FItem; - end; - - TcxGridItemShowEditButtons = (isebDefault, isebNever, isebAlways); - TcxGridItemSortByDisplayText = (isbtDefault, isbtOn, isbtOff); - - TcxCustomGridTableItemOptionsClass = class of TcxCustomGridTableItemOptions; - - TcxCustomGridTableItemOptions = class(TcxCustomGridTableItemCustomOptions) - private - FEditing: Boolean; - FFiltering: Boolean; - FFilteringFilteredItemsList: Boolean; - FFilteringMRUItemsList: Boolean; - FFilteringPopup: Boolean; - FFilteringPopupMultiSelect: Boolean; - FFocusing: Boolean; - FGrouping: Boolean; - FIgnoreTimeForFiltering: Boolean; - FIncSearch: Boolean; - FMoving: Boolean; - FShowCaption: Boolean; - FShowEditButtons: TcxGridItemShowEditButtons; - FSortByDisplayText: TcxGridItemSortByDisplayText; - FSorting: Boolean; - procedure SetEditing(Value: Boolean); - procedure SetFiltering(Value: Boolean); - procedure SetFilteringFilteredItemsList(Value: Boolean); - procedure SetFilteringMRUItemsList(Value: Boolean); - procedure SetFilteringPopup(Value: Boolean); - procedure SetFilteringPopupMultiSelect(Value: Boolean); - procedure SetFocusing(Value: Boolean); - procedure SetGrouping(Value: Boolean); - procedure SetIgnoreTimeForFiltering(Value: Boolean); - procedure SetIncSearch(Value: Boolean); - procedure SetMoving(Value: Boolean); - procedure SetShowCaption(Value: Boolean); - procedure SetShowEditButtons(Value: TcxGridItemShowEditButtons); - procedure SetSortByDisplayText(Value: TcxGridItemSortByDisplayText); - procedure SetSorting(Value: Boolean); - protected - procedure BeforeShowCaptionChange; virtual; - property Grouping: Boolean read FGrouping write SetGrouping default True; - property Moving: Boolean read FMoving write SetMoving default True; - property ShowCaption: Boolean read FShowCaption write SetShowCaption default True; - property SortByDisplayText: TcxGridItemSortByDisplayText read FSortByDisplayText - write SetSortByDisplayText default isbtDefault; - property Sorting: Boolean read FSorting write SetSorting default True; - public - constructor Create(AItem: TcxCustomGridTableItem); override; - procedure Assign(Source: TPersistent); override; - published - property Editing: Boolean read FEditing write SetEditing default True; - property Filtering: Boolean read FFiltering write SetFiltering default True; - property FilteringFilteredItemsList: Boolean read FFilteringFilteredItemsList - write SetFilteringFilteredItemsList default True; - property FilteringMRUItemsList: Boolean read FFilteringMRUItemsList write SetFilteringMRUItemsList default True; - property FilteringPopup: Boolean read FFilteringPopup write SetFilteringPopup default True; - property FilteringPopupMultiSelect: Boolean read FFilteringPopupMultiSelect - write SetFilteringPopupMultiSelect default True; - property Focusing: Boolean read FFocusing write SetFocusing default True; - property IgnoreTimeForFiltering: Boolean read FIgnoreTimeForFiltering write SetIgnoreTimeForFiltering default True; - property IncSearch: Boolean read FIncSearch write SetIncSearch default True; - property ShowEditButtons: TcxGridItemShowEditButtons read FShowEditButtons - write SetShowEditButtons default isebDefault; - end; - - TcxGridGetCellStyleEvent = procedure(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; {$IFDEF BCB}var{$ELSE}out{$ENDIF} AStyle: TcxStyle) of object; - - TcxGridGetRecordStyleEvent = procedure(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; - {$IFDEF BCB}var{$ELSE}out{$ENDIF} AStyle: TcxStyle) of object; - - TcxCustomGridTableItemStylesClass = class of TcxCustomGridTableItemStyles; - - TcxCustomGridTableItemStyles = class(TcxCustomGridStyles) - private - FOnGetContentStyle: TcxGridGetCellStyleEvent; - function GetGridViewValue: TcxCustomGridTableView; - function GetItem: TcxCustomGridTableItem; - procedure SetOnGetContentStyle(Value: TcxGridGetCellStyleEvent); - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - function GetGridView: TcxCustomGridView; override; - public - procedure Assign(Source: TPersistent); override; - procedure GetContentParams(ARecord: TcxCustomGridRecord; out AParams: TcxViewParams); virtual; - property GridView: TcxCustomGridTableView read GetGridViewValue; - property Item: TcxCustomGridTableItem read GetItem; - published - property Content: TcxStyle index isContent read GetValue write SetValue; - property OnGetContentStyle: TcxGridGetCellStyleEvent read FOnGetContentStyle write SetOnGetContentStyle; - end; - - TcxGridSortOrder = TcxDataSortOrder; - - TcxGridTableDataCellCustomDrawEvent = procedure(Sender: TcxCustomGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean) of object; - - TcxGridGetCellHintEvent = procedure(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; - ACellViewInfo: TcxGridTableDataCellViewInfo; const AMousePos: TPoint; - var AHintText: TCaption; var AIsHintMultiLine: Boolean; var AHintTextRect: TRect) of object; - TcxGridGetDataTextEvent = procedure(Sender: TcxCustomGridTableItem; - ARecordIndex: Integer; var AText: string) of object; - TcxGridGetDisplayTextEvent = procedure(Sender: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; var AText: string) of object; - TcxGridGetFilterDisplayTextEvent = procedure(Sender: TcxCustomGridTableItem; - const AValue: Variant; var ADisplayText: string) of object; - TcxGridGetFilterValuesEvent = procedure(Sender: TcxCustomGridTableItem; - AValueList: TcxDataFilterValueList) of object; - TcxGridGetPropertiesEvent = procedure(Sender: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; var AProperties: TcxCustomEditProperties) of object; - TcxGridInitDateRangesEvent = procedure(Sender: TcxCustomGridTableItem; ADateRanges: TcxGridDateRanges) of object; - TcxGridTableItemGetStoredPropertiesEvent = procedure(Sender: TcxCustomGridTableItem; - AProperties: TStrings) of object; - TcxGridTableItemGetStoredPropertyValueEvent = procedure(Sender: TcxCustomGridTableItem; - const AName: string; var AValue: Variant) of object; - TcxGridTableItemSetStoredPropertyValueEvent = procedure(Sender: TcxCustomGridTableItem; - const AName: string; const AValue: Variant) of object; - TcxGridUserFilteringEvent = procedure(Sender: TcxCustomGridTableItem; - const AValue: Variant; const ADisplayText: string) of object; - - TcxCustomGridTableItemClass = class of TcxCustomGridTableItem; - - TcxCustomGridTableItem = class(TcxComponent, IcxEditRepositoryItemListener, IcxStoredObject) - private - FAlternateCaption: string; - FBestFitMaxWidth: Integer; - FCaption: string; - FCells: TList; - FCellStyle: TcxEditStyle; - FCellStyleUseCounter: Integer; - FDataBinding: TcxGridItemDataBinding; - FDateTimeGrouping: TcxGridDateTimeGrouping; - FEditData: TcxCustomEditData; - FEditViewData: TcxCustomEditViewData; - FFilteringDateRanges: TcxGridFilteringDateRanges; - FGridView: TcxCustomGridTableView; - FGroupingDateRanges: TcxGridGroupingDateRanges; - FHeaderAlignmentHorz: TAlignment; - FHeaderAlignmentVert: TcxAlignmentVert; - FID: Integer; - FIgnoreLoadingStatus: Boolean; - FIndex: Integer; - FIsCaptionAssigned: Boolean; - FIsHeaderAlignmentHorzAssigned: Boolean; - FIsHeaderAlignmentVertAssigned: Boolean; - FIsWidthAssigned: Boolean; - FLastUsedDefaultRepositoryItem: TcxEditRepositoryItem; - FMinWidth: Integer; - FOptions: TcxCustomGridTableItemOptions; - FProperties: TcxCustomEditProperties; - FPropertiesClass: TcxCustomEditPropertiesClass; - FPropertiesValue: TcxCustomEditProperties; - FRepositoryItem: TcxEditRepositoryItem; - FSavedVisible: Boolean; - FStyles: TcxCustomGridTableItemStyles; - FVisible: Boolean; - FVisibleForCustomization: Boolean; - FVisibleIndex: Integer; - FWasVisibleBeforeGrouping: Boolean; - FWidth: Integer; - - FOnCustomDrawCell: TcxGridTableDataCellCustomDrawEvent; - FOnGetCellHint: TcxGridGetCellHintEvent; - FOnGetDataText: TcxGridGetDataTextEvent; - FOnGetDisplayText: TcxGridGetDisplayTextEvent; - FOnGetFilterDisplayText: TcxGridGetFilterDisplayTextEvent; - FOnGetFilterValues: TcxGridGetFilterValuesEvent; - FOnGetProperties: TcxGridGetPropertiesEvent; - FOnGetPropertiesForEdit: TcxGridGetPropertiesEvent; - FOnGetStoredProperties: TcxGridTableItemGetStoredPropertiesEvent; - FOnGetStoredPropertyValue: TcxGridTableItemGetStoredPropertyValueEvent; - FOnInitFilteringDateRanges: TcxGridInitDateRangesEvent; - FOnInitGroupingDateRanges: TcxGridInitDateRangesEvent; - FOnSetStoredPropertyValue: TcxGridTableItemSetStoredPropertyValueEvent; - FOnUserFiltering: TcxGridUserFilteringEvent; - FSubClassEvents: TNotifyEvent; - - function GetActualMinWidth: Integer; - function GetCaption: string; - function GetCell(Index: Integer): TcxGridTableDataCellViewInfo; - function GetCellCount: Integer; - function GetController: TcxCustomGridTableController; - function GetDataController: TcxCustomDataController; - function GetEditing: Boolean; - function GetEditingProperties: TcxCustomEditProperties; - function GetFilterCaption: string; - function GetFiltered: Boolean; - function GetFocused: Boolean; - function GetGroupIndex: Integer; - function GetHeaderAlignmentHorz: TAlignment; - function GetHeaderAlignmentVert: TcxAlignmentVert; - function GetHidden: Boolean; - function GetIsLoading: Boolean; - function GetIncSearching: Boolean; - function GetIsDestroying: Boolean; - function GetIsFirst: Boolean; - function GetIsLast: Boolean; - function GetIsReading: Boolean; - function GetIsUpdating: Boolean; - function GetMinWidth: Integer; - function GetPropertiesClassName: string; - function GetSortIndex: Integer; - function GetSortOrder: TcxGridSortOrder; - function GetTag: TcxTag; - function GetViewData: TcxCustomGridTableViewData; - function GetWidth: Integer; - procedure SetAlternateCaption(const Value: string); - procedure SetBestFitMaxWidth(Value: Integer); - procedure SetCaption(const Value: string); - procedure SetDataBinding(Value: TcxGridItemDataBinding); - procedure SetDateTimeGrouping(Value: TcxGridDateTimeGrouping); - procedure SetEditing(Value: Boolean); - procedure SetFiltered(Value: Boolean); - procedure SetFocused(Value: Boolean); - procedure SetGroupIndex(Value: Integer); - procedure SetHeaderAlignmentHorz(Value: TAlignment); - procedure SetHeaderAlignmentVert(Value: TcxAlignmentVert); - procedure SetHidden(Value: Boolean); - procedure SetIndex(Value: Integer); - procedure SetMinWidth(Value: Integer); - procedure SetOnCustomDrawCell(Value: TcxGridTableDataCellCustomDrawEvent); - procedure SetOnGetCellHint(Value: TcxGridGetCellHintEvent); - procedure SetOnGetDataText(Value: TcxGridGetDataTextEvent); - procedure SetOnGetDisplayText(Value: TcxGridGetDisplayTextEvent); - procedure SetOnGetFilterDisplayText(Value: TcxGridGetFilterDisplayTextEvent); - procedure SetOnGetFilterValues(Value: TcxGridGetFilterValuesEvent); - procedure SetOnGetProperties(Value: TcxGridGetPropertiesEvent); - procedure SetOnGetPropertiesForEdit(Value: TcxGridGetPropertiesEvent); - procedure SetOnGetStoredProperties(Value: TcxGridTableItemGetStoredPropertiesEvent); - procedure SetOnGetStoredPropertyValue(Value: TcxGridTableItemGetStoredPropertyValueEvent); - procedure SetOnInitFilteringDateRanges(Value: TcxGridInitDateRangesEvent); - procedure SetOnInitGroupingDateRanges(Value: TcxGridInitDateRangesEvent); - procedure SetOnSetStoredPropertyValue(Value: TcxGridTableItemSetStoredPropertyValueEvent); - procedure SetOnUserFiltering(Value: TcxGridUserFilteringEvent); - procedure SetOptions(Value: TcxCustomGridTableItemOptions); - procedure SetProperties(Value: TcxCustomEditProperties); - procedure SetPropertiesClass(Value: TcxCustomEditPropertiesClass); - procedure SetPropertiesClassName(const Value: string); - procedure SetRepositoryItem(Value: TcxEditRepositoryItem); - procedure SetSortIndex(Value: Integer); - procedure SetSortOrder(Value: TcxGridSortOrder); - procedure SetStyles(Value: TcxCustomGridTableItemStyles); - procedure SetTag(Value: TcxTag); - procedure SetVisible(Value: Boolean); - procedure SetVisibleForCustomization(Value: Boolean); - procedure SetWidth(Value: Integer); - - procedure ReadHidden(Reader: TReader); - procedure ReadIsCaptionAssigned(Reader: TReader); - procedure WriteIsCaptionAssigned(Writer: TWriter); - - function IsCaptionStored: Boolean; - function IsSortOrderStored: Boolean; - function IsTagStored: Boolean; - function IsWidthStored: Boolean; - - function GetDataBindingClass: TcxGridItemDataBindingClass; - - procedure CreateProperties; - procedure DestroyProperties; - procedure RecreateProperties; - protected - procedure DefineProperties(Filer: TFiler); override; - procedure SetParentComponent(AParent: TComponent); override; - - // IcxEditRepositoryItemListener - procedure ItemRemoved(Sender: TcxEditRepositoryItem); - procedure IcxEditRepositoryItemListener.PropertiesChanged = RepositoryItemPropertiesChanged; - procedure RepositoryItemPropertiesChanged(Sender: TcxEditRepositoryItem); - // IcxStoredObject - function GetObjectName: string; virtual; - function IcxStoredObject.GetProperties = GetStoredProperties; - function GetStoredProperties(AProperties: TStrings): Boolean; virtual; - procedure GetPropertyValue(const AName: string; var AValue: Variant); virtual; - procedure SetPropertyValue(const AName: string; const AValue: Variant); virtual; - - procedure CreateDataBinding; virtual; - procedure DestroyDataBinding; virtual; - - procedure CreateSubClasses; virtual; - procedure DestroySubClasses; virtual; - function GetFilteringDateRangesClass: TcxGridFilteringDateRangesClass; virtual; - function GetGroupingDateRangesClass: TcxGridGroupingDateRangesClass; virtual; - function GetOptionsClass: TcxCustomGridTableItemOptionsClass; virtual; - function GetStylesClass: TcxCustomGridTableItemStylesClass; virtual; - - function IsHeaderAlignmentHorzStored: Boolean; - function IsHeaderAlignmentVertStored: Boolean; - - procedure BestFitApplied(AFireEvents: Boolean); virtual; - function CalculateBestFitWidth: Integer; virtual; - function CanAutoHeight: Boolean; virtual; - function CanEdit: Boolean; virtual; - function CanFilter(AVisually: Boolean): Boolean; virtual; - function CanFilterUsingChecks: Boolean; virtual; - function CanFilterMRUValueItems: Boolean; virtual; - function CanFocus(ARecord: TcxCustomGridRecord): Boolean; virtual; - function CanGroup: Boolean; virtual; - function CanHide: Boolean; virtual; - function CanHorzSize: Boolean; virtual; - function CanIgnoreTimeForFiltering: Boolean; virtual; - function CanIncSearch: Boolean; virtual; - function CanInitEditing: Boolean; virtual; - function CanMove: Boolean; virtual; - function CanScroll: Boolean; virtual; - function CanSort: Boolean; virtual; - procedure CaptionChanged; virtual; - procedure Changed(AChange: TcxGridTableItemChange); virtual; - procedure ChangeGroupIndex(Value: Integer); - procedure ChangeSortIndex(Value: Integer); - procedure CheckWidthValue(var Value: Integer); - procedure DataChanged; virtual; - procedure DateTimeGroupingChanged; virtual; - procedure ForceWidth(Value: Integer); virtual; - function GetActuallyVisible: Boolean; virtual; - function GetBestFitWidth: Integer; virtual; - function GetDateTimeFilters: TcxGridDateTimeFilters; virtual; - function GetDateTimeGrouping: TcxGridDateTimeGrouping; - function GetEditable: Boolean; virtual; - function GetEditPartVisible: Boolean; virtual; - function GetEditValue: Variant; virtual; - function GetFilterable: Boolean; virtual; - procedure GetFilterDisplayText(const AValue: Variant; var ADisplayText: string); virtual; - function GetFixed: Boolean; virtual; - function GetFocusedCellViewInfo: TcxGridTableDataCellViewInfo; virtual; - function GetPropertiesForEdit: TcxCustomEditProperties; virtual; - function GetPropertiesValue: TcxCustomEditProperties; - function GetVisible: Boolean; virtual; - function GetVisibleCaption: string; virtual; - function GetVisibleForCustomization: Boolean; virtual; - function GetVisibleIndex: Integer; - function GetVisibleInQuickCustomizationPopup: Boolean; virtual; - procedure GroupingChanging; virtual; - function HasCustomDrawCell: Boolean; - function HasFixedWidth: Boolean; virtual; - procedure InitFilteringDateRanges; virtual; - procedure InitGroupingDateRanges; virtual; - procedure InitProperties(AProperties: TcxCustomEditProperties); virtual; - function IsSortingByDisplayText(ASortByDisplayText: Boolean): Boolean; - function IsVisibleStored: Boolean; virtual; - function IsVisibleForCustomizationStored: Boolean; virtual; - procedure PropertiesChanged; - procedure PropertiesChangedHandler(Sender: TObject); - procedure PropertiesValueChanged; - procedure RecalculateDefaultWidth; - procedure SetEditValue(const Value: Variant); virtual; - procedure SetGridView(Value: TcxCustomGridTableView); virtual; - function ShowButtons(AFocused: Boolean): Boolean; virtual; - function ShowOnUngrouping: Boolean; virtual; - function SupportsDateTimeFilters(ARelativeFilters: Boolean): Boolean; virtual; - function SupportsGroupingDateRanges(ACheckCustomHandlers: Boolean): Boolean; virtual; - function UseFilteredValuesForFilterValueList: Boolean; virtual; - function UseOwnProperties: Boolean; - procedure ValueTypeClassChanged; virtual; - procedure VisibleChanged; virtual; - procedure VisibleForCustomizationChanged; virtual; - - function DefaultAlternateCaption: string; virtual; - function DefaultCaption: string; virtual; - function DefaultHeaderAlignmentHorz: TAlignment; - function DefaultHeaderAlignmentVert: TcxAlignmentVert; - function DefaultRepositoryItem: TcxEditRepositoryItem; - function DefaultWidth: Integer; virtual; - - function GetCellStyle: TcxEditStyle; - procedure InitStyle(AStyle: TcxCustomEditStyle; const AParams: TcxViewParams; - AFocused: Boolean); virtual; - procedure ReleaseCellStyle; - - procedure AddCell(ACell: TcxGridTableDataCellViewInfo); - procedure RemoveCell(ACell: TcxGridTableDataCellViewInfo); - property CellCount: Integer read GetCellCount; - property Cells[Index: Integer]: TcxGridTableDataCellViewInfo read GetCell; - - function CreateEditViewData(AProperties: TcxCustomEditProperties): TcxCustomEditViewData; - procedure DestroyEditViewData(var AEditViewData: TcxCustomEditViewData); - procedure DoCreateEditViewData; - procedure DoDestroyEditViewData; - procedure EditViewDataGetDisplayTextHandler(Sender: TcxCustomEditViewData; var AText: string); - function GetEditViewData(AProperties: TcxCustomEditProperties; - out AIsLocalCopy: Boolean): TcxCustomEditViewData; - procedure ReleaseEditViewData(var AEditViewData: TcxCustomEditViewData; AIsLocalCopy: Boolean); - property EditViewData: TcxCustomEditViewData read FEditViewData; - - procedure CheckVisible; - procedure SaveVisible; - property SavedVisible: Boolean read FSavedVisible; - - procedure DoCustomDrawCell(ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; - var ADone: Boolean); virtual; - procedure DoGetCellHint(ARecord: TcxCustomGridRecord; ACellViewInfo: TcxGridTableDataCellViewInfo; - const AMousePos: TPoint; var AHintText: TCaption; var AIsHintMultiLine: Boolean; - var AHintTextRect: TRect); virtual; - procedure DoGetDataText(ARecordIndex: Integer; var AText: string); virtual; - procedure DoGetDisplayText(ARecord: TcxCustomGridRecord; var AText: string); virtual; - procedure DoGetFilterValues(AValueList: TcxDataFilterValueList); virtual; - function DoGetProperties(ARecord: TcxCustomGridRecord): TcxCustomEditProperties; virtual; - procedure DoGetPropertiesForEdit(ARecord: TcxCustomGridRecord; var AProperties: TcxCustomEditProperties); virtual; - procedure DoInitFilteringDateRanges; virtual; - procedure DoInitGroupingDateRanges; virtual; - procedure DoUserFiltering(const AValue: Variant; const ADisplayText: string); virtual; - function HasCellHintHandler: Boolean; - function HasCustomPropertiesForEditHandler: Boolean; - function HasCustomPropertiesHandler: Boolean; - function HasDataTextHandler: Boolean; - function HasInitFilteringDateRangesHandler: Boolean; - function HasInitFilteringDateRangesHandlers: Boolean; - function HasInitGroupingDateRangesHandler: Boolean; - function HasInitGroupingDateRangesHandlers: Boolean; - - property IsDestroying: Boolean read GetIsDestroying; - property IsLoading: Boolean read GetIsLoading; - property IsReading: Boolean read GetIsReading; - property IsUpdating: Boolean read GetIsUpdating; - - property ActualMinWidth: Integer read GetActualMinWidth; - property Controller: TcxCustomGridTableController read GetController; - property DataController: TcxCustomDataController read GetDataController; - property DateTimeGrouping: TcxGridDateTimeGrouping read FDateTimeGrouping write SetDateTimeGrouping default dtgDefault; - property EditingProperties: TcxCustomEditProperties read GetEditingProperties; - property EditPartVisible: Boolean read GetEditPartVisible; - property Filterable: Boolean read GetFilterable; - property FilterCaption: string read GetFilterCaption; - property Fixed: Boolean read GetFixed; - property GroupIndex: Integer read GetGroupIndex write SetGroupIndex default -1; - property GroupingDateRanges: TcxGridGroupingDateRanges read FGroupingDateRanges; - property HeaderAlignmentHorz: TAlignment read GetHeaderAlignmentHorz write SetHeaderAlignmentHorz - stored IsHeaderAlignmentHorzStored; - property HeaderAlignmentVert: TcxAlignmentVert read GetHeaderAlignmentVert - write SetHeaderAlignmentVert stored IsHeaderAlignmentVertStored; - property Hidden: Boolean read GetHidden write SetHidden; // obsolete, use VisibleForCustomization - property IgnoreLoadingStatus: Boolean read FIgnoreLoadingStatus write FIgnoreLoadingStatus; - property InternalVisible: Boolean read FVisible; - property MinWidth: Integer read GetMinWidth write SetMinWidth - default cxGridItemDefaultMinWidth; - property ViewData: TcxCustomGridTableViewData read GetViewData; - property VisibleForCustomization: Boolean read GetVisibleForCustomization - write SetVisibleForCustomization stored IsVisibleForCustomizationStored; - property VisibleInQuickCustomizationPopup: Boolean read GetVisibleInQuickCustomizationPopup; - property WasVisibleBeforeGrouping: Boolean read FWasVisibleBeforeGrouping; - property Width: Integer read GetWidth write SetWidth stored IsWidthStored; - - property OnInitGroupingDateRanges: TcxGridInitDateRangesEvent read FOnInitGroupingDateRanges write SetOnInitGroupingDateRanges; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - - procedure ApplyBestFit(ACheckSizingAbility: Boolean = False; AFireEvents: Boolean = False); virtual; - function CalculateDefaultCellHeight(ACanvas: TcxCanvas; AFont: TFont): Integer; virtual; - function CreateEditStyle: TcxEditStyle; virtual; - procedure FocusWithSelection; virtual; - function GetAlternateCaption: string; - function GetDefaultValuesProvider(AProperties: TcxCustomEditProperties = nil): IcxEditDefaultValuesProvider; - function GetProperties: TcxCustomEditProperties; overload; - function GetProperties(ARecord: TcxCustomGridRecord): TcxCustomEditProperties; overload; - function GetProperties(ARecordIndex: Integer): TcxCustomEditProperties; overload; - function GetRepositoryItem: TcxEditRepositoryItem; - procedure MakeVisible; - procedure RestoreDefaults; virtual; - - property ActuallyVisible: Boolean read GetActuallyVisible; - property BestFitMaxWidth: Integer read FBestFitMaxWidth write SetBestFitMaxWidth default 0; - property Editable: Boolean read GetEditable; - property Editing: Boolean read GetEditing write SetEditing; - property EditValue: Variant read GetEditValue write SetEditValue; - property Filtered: Boolean read GetFiltered write SetFiltered; - property FilteringDateRanges: TcxGridFilteringDateRanges read FFilteringDateRanges; - property Focused: Boolean read GetFocused write SetFocused; - property FocusedCellViewInfo: TcxGridTableDataCellViewInfo read GetFocusedCellViewInfo; - property GridView: TcxCustomGridTableView read FGridView; - property Hideable: Boolean read CanHide; - property ID: Integer read FID; - property IncSearching: Boolean read GetIncSearching; - property Index: Integer read FIndex write SetIndex; - property IsFirst: Boolean read GetIsFirst; - property IsLast: Boolean read GetIsLast; - property Options: TcxCustomGridTableItemOptions read FOptions write SetOptions; - property PropertiesClass: TcxCustomEditPropertiesClass read FPropertiesClass write SetPropertiesClass; - property SortIndex: Integer read GetSortIndex write SetSortIndex default -1; - property SortOrder: TcxGridSortOrder read GetSortOrder write SetSortOrder stored IsSortOrderStored; - property Styles: TcxCustomGridTableItemStyles read FStyles write SetStyles; - property VisibleCaption: string read GetVisibleCaption; - property VisibleIndex: Integer read FVisibleIndex; - published - property AlternateCaption: string read FAlternateCaption write SetAlternateCaption; - property Caption: string read GetCaption write SetCaption stored IsCaptionStored; - property DataBinding: TcxGridItemDataBinding read FDataBinding write SetDataBinding; - property PropertiesClassName: string read GetPropertiesClassName write SetPropertiesClassName; - property Properties: TcxCustomEditProperties read FProperties write SetProperties; - property RepositoryItem: TcxEditRepositoryItem read FRepositoryItem write SetRepositoryItem; - property Visible: Boolean read GetVisible write SetVisible stored IsVisibleStored default True; - property PropertiesEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property StylesEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property Tag: TcxTag read GetTag write SetTag stored IsTagStored; - property OnCustomDrawCell: TcxGridTableDataCellCustomDrawEvent read FOnCustomDrawCell write SetOnCustomDrawCell; - property OnGetCellHint: TcxGridGetCellHintEvent read FOnGetCellHint write SetOnGetCellHint; - property OnGetDataText: TcxGridGetDataTextEvent read FOnGetDataText write SetOnGetDataText; - property OnGetDisplayText: TcxGridGetDisplayTextEvent read FOnGetDisplayText write SetOnGetDisplayText; - property OnGetFilterDisplayText: TcxGridGetFilterDisplayTextEvent read FOnGetFilterDisplayText write SetOnGetFilterDisplayText; - property OnGetFilterValues: TcxGridGetFilterValuesEvent read FOnGetFilterValues write SetOnGetFilterValues; - property OnGetProperties: TcxGridGetPropertiesEvent read FOnGetProperties write SetOnGetProperties; - property OnGetPropertiesForEdit: TcxGridGetPropertiesEvent read FOnGetPropertiesForEdit write SetOnGetPropertiesForEdit; - property OnGetStoredProperties: TcxGridTableItemGetStoredPropertiesEvent read FOnGetStoredProperties write SetOnGetStoredProperties; - property OnGetStoredPropertyValue: TcxGridTableItemGetStoredPropertyValueEvent read FOnGetStoredPropertyValue write SetOnGetStoredPropertyValue; - property OnInitFilteringDateRanges: TcxGridInitDateRangesEvent read FOnInitFilteringDateRanges write SetOnInitFilteringDateRanges; - property OnSetStoredPropertyValue: TcxGridTableItemSetStoredPropertyValueEvent read FOnSetStoredPropertyValue write SetOnSetStoredPropertyValue; - property OnUserFiltering: TcxGridUserFilteringEvent read FOnUserFiltering write SetOnUserFiltering; - end; - - // grid view options - - TcxCustomGridTableBackgroundBitmaps = class(TcxCustomGridBackgroundBitmaps) - protected - function GetBitmapStyleIndex(Index: Integer): Integer; override; - public - procedure Assign(Source: TPersistent); override; - published - property Content: TBitmap index bbContent read GetValue write SetValue; - property FilterBox: TBitmap index bbFilterBox read GetValue write SetValue; - end; - - TcxCustomGridTableDateTimeHandlingClass = class of TcxCustomGridTableDateTimeHandling; - - TcxCustomGridTableDateTimeHandling = class(TcxCustomGridOptions) - private - FDateFormat: string; - FFilters: TcxGridDateTimeFilters; - FGrouping: TcxGridDateTimeGrouping; - FHourFormat: string; - FIgnoreTimeForFiltering: Boolean; - FMonthFormat: string; - FUseLongDateFormat: Boolean; - FUseShortTimeFormat: Boolean; - FYearFormat: string; - function GetGridView: TcxCustomGridTableView; - procedure SetDateFormat(const Value: string); - procedure SetFilters(Value: TcxGridDateTimeFilters); - procedure SetGrouping(Value: TcxGridDateTimeGrouping); - procedure SetHourFormat(const Value: string); - procedure SetIgnoreTimeForFiltering(Value: Boolean); - procedure SetMonthFormat(const Value: string); - procedure SetUseLongDateFormat(Value: Boolean); - procedure SetUseShortTimeFormat(Value: Boolean); - procedure SetYearFormat(const Value: string); - protected - property DateFormat: string read FDateFormat write SetDateFormat; - property Grouping: TcxGridDateTimeGrouping read FGrouping write SetGrouping default dtgByDateAndTime; - property HourFormat: string read FHourFormat write SetHourFormat; - property UseLongDateFormat: Boolean read FUseLongDateFormat write SetUseLongDateFormat default True; - property UseShortTimeFormat: Boolean read FUseShortTimeFormat write SetUseShortTimeFormat default True; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - function GetDateFormat: string; - function GetHourFormat: string; - function GetMonthFormat: string; - function GetYearFormat: string; - procedure GroupingChanged; - property GridView: TcxCustomGridTableView read GetGridView; - published - property Filters: TcxGridDateTimeFilters read FFilters write SetFilters default []; - property IgnoreTimeForFiltering: Boolean read FIgnoreTimeForFiltering write SetIgnoreTimeForFiltering default False; - property MonthFormat: string read FMonthFormat write SetMonthFormat; - property YearFormat: string read FYearFormat write SetYearFormat; - end; - - TcxGridFilterMRUItem = class(TcxMRUItem) - private - function GetCaption: string; - protected - function StreamEquals(AStream: TMemoryStream): Boolean; - public - Filter: TcxDataFilterCriteria; - constructor Create(AFilter: TcxDataFilterCriteria); - destructor Destroy; override; - procedure AssignTo(AFilter: TcxDataFilterCriteria); - function Equals(AItem: TcxMRUItem): Boolean; override; - function FilterEquals(AFilter: TcxDataFilterCriteria): Boolean; - function GetStream: TMemoryStream; - property Caption: string read GetCaption; - end; - - TcxGridFilterMRUItemsClass = class of TcxGridFilterMRUItems; - - TcxGridFilterMRUItems = class(TcxMRUItems) - private - FFiltering: TcxCustomGridTableFiltering; - FVisibleItems: TList; - function GetItem(Index: Integer): TcxGridFilterMRUItem; - function GetVisibleCount: Integer; - function GetVisibleItem(Index: Integer): TcxGridFilterMRUItem; - protected - procedure DeleteEmptyItems; - procedure FilterChanged; - procedure RefreshVisibleItemsList; - public - constructor Create(AFiltering: TcxCustomGridTableFiltering); reintroduce; virtual; - destructor Destroy; override; - procedure Add(AFilter: TcxDataFilterCriteria); - property Filtering: TcxCustomGridTableFiltering read FFiltering; - property Items[Index: Integer]: TcxGridFilterMRUItem read GetItem; default; - property VisibleCount: Integer read GetVisibleCount; - property VisibleItems[Index: Integer]: TcxGridFilterMRUItem read GetVisibleItem; - end; - - TcxGridFilterPosition = (fpTop, fpBottom); - TcxGridFilterVisible = (fvNever, fvNonEmpty, fvAlways); - - TcxGridFilterBoxClass = class of TcxGridFilterBox; - - TcxGridFilterBox = class(TcxCustomGridOptions) - private - FCustomizeDialog: Boolean; - FMRUItemsListDropDownCount: Integer; - FPosition: TcxGridFilterPosition; - FVisible: TcxGridFilterVisible; - procedure SetCustomizeDialog(Value: Boolean); - procedure SetMRUItemsListDropDownCount(Value: Integer); - procedure SetPosition(Value: TcxGridFilterPosition); - procedure SetVisible(Value: TcxGridFilterVisible); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - published - property CustomizeDialog: Boolean read FCustomizeDialog write SetCustomizeDialog default True; - property MRUItemsListDropDownCount: Integer read FMRUItemsListDropDownCount - write SetMRUItemsListDropDownCount default 0; - property Position: TcxGridFilterPosition read FPosition write SetPosition default fpBottom; - property Visible: TcxGridFilterVisible read FVisible write SetVisible default fvNonEmpty; - end; - - TcxGridItemFilterPopupApplyChangesMode = (fpacImmediately, fpacOnButtonClick); - - TcxGridItemFilterPopupOptionsClass = class of TcxGridItemFilterPopupOptions; - - TcxGridItemFilterPopupOptions = class(TcxCustomGridOptions) - private - FApplyMultiSelectChanges: TcxGridItemFilterPopupApplyChangesMode; - FDropDownWidth: Integer; - FMaxDropDownItemCount: Integer; - FMultiSelect: Boolean; - procedure SetApplyMultiSelectChanges(Value: TcxGridItemFilterPopupApplyChangesMode); - procedure SetDropDownWidth(Value: Integer); - procedure SetMaxDropDownItemCount(Value: Integer); - procedure SetMultiSelect(Value: Boolean); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - published - property ApplyMultiSelectChanges: TcxGridItemFilterPopupApplyChangesMode read FApplyMultiSelectChanges - write SetApplyMultiSelectChanges default fpacImmediately; - property DropDownWidth: Integer read FDropDownWidth write SetDropDownWidth default 0; - property MaxDropDownItemCount: Integer read FMaxDropDownItemCount - write SetMaxDropDownItemCount default cxGridFilterDefaultItemPopupMaxDropDownItemCount; - property MultiSelect: Boolean read FMultiSelect write SetMultiSelect default True; - end; - - TcxCustomGridTableFilteringClass = class of TcxCustomGridTableFiltering; - - TcxCustomGridTableFiltering = class(TcxCustomGridOptions) - private - FItemFilteredItemsList: Boolean; - FItemMRUItemsList: Boolean; - FItemMRUItemsListCount: Integer; - FItemPopup: TcxGridItemFilterPopupOptions; - FMRUItems: TcxGridFilterMRUItems; - FMRUItemsList: Boolean; - FMRUItemsListCount: Integer; - function GetCustomizeDialog: Boolean; - function GetGridView: TcxCustomGridTableView; - function GetMRUItemsListDropDownCount: Integer; - function GetPosition: TcxGridFilterPosition; - function GetVisible: TcxGridFilterVisible; - procedure SetCustomizeDialog(Value: Boolean); - procedure SetItemFilteredItemsList(Value: Boolean); - procedure SetItemMRUItemsList(Value: Boolean); - procedure SetItemMRUItemsListCount(Value: Integer); - procedure SetItemPopup(Value: TcxGridItemFilterPopupOptions); - procedure SetMRUItemsList(Value: Boolean); - procedure SetMRUItemsListCount(Value: Integer); - procedure SetMRUItemsListDropDownCount(Value: Integer); - procedure SetPosition(Value: TcxGridFilterPosition); - procedure SetVisible(Value: TcxGridFilterVisible); - procedure FilterControlDialogApply(Sender: TObject); - procedure ReadCustomizeDialog(Reader: TReader); - procedure ReadMRUItemsListDropDownCount(Reader: TReader); - procedure ReadPosition(Reader: TReader); - procedure ReadVisible(Reader: TReader); - protected - procedure DefineProperties(Filer: TFiler); override; - procedure FilterChanged; virtual; - function GetItemPopupClass: TcxGridItemFilterPopupOptionsClass; virtual; - function GetMRUItemsClass: TcxGridFilterMRUItemsClass; virtual; - function IsMRUItemsListAvailable: Boolean; virtual; - procedure MRUItemsVisibleCountChanged(AOldCount, ANewCount: Integer); virtual; - - property ItemFilteredItemsList: Boolean read FItemFilteredItemsList write SetItemFilteredItemsList default False; - property ItemMRUItemsList: Boolean read FItemMRUItemsList write SetItemMRUItemsList default True; - property ItemMRUItemsListCount: Integer read FItemMRUItemsListCount write SetItemMRUItemsListCount - default cxGridFilterDefaultItemMRUItemsListCount; - property ItemPopup: TcxGridItemFilterPopupOptions read FItemPopup write SetItemPopup; - - function GetItemPopupDropDownWidth: Integer; - function GetItemPopupMaxDropDownItemCount: Integer; - procedure SetItemPopupDropDownWidth(Value: Integer); - procedure SetItemPopupMaxDropDownItemCount(Value: Integer); - procedure ReadItemPopupDropDownWidth(Reader: TReader); - procedure ReadItemPopupMaxDropDownCount(Reader: TReader); - // obsolete - use ItemPopup.DropDownWidth - property DropDownWidth: Integer read GetItemPopupDropDownWidth write SetItemPopupDropDownWidth; - // obsolete - use ItemPopup.MaxDropDownItemCount - property MaxDropDownCount: Integer read GetItemPopupMaxDropDownItemCount write SetItemPopupMaxDropDownItemCount; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - procedure AddFilterToMRUItems(AFilter: TcxDataFilterCriteria = nil); - procedure Assign(Source: TPersistent); override; - procedure RunCustomizeDialog(AItem: TcxCustomGridTableItem = nil); - - property GridView: TcxCustomGridTableView read GetGridView; - property MRUItems: TcxGridFilterMRUItems read FMRUItems; - // obsolete - use GridView.FilterBox - property CustomizeDialog: Boolean read GetCustomizeDialog write SetCustomizeDialog; - property MRUItemsListDropDownCount: Integer read GetMRUItemsListDropDownCount write SetMRUItemsListDropDownCount; - property Position: TcxGridFilterPosition read GetPosition write SetPosition; - property Visible: TcxGridFilterVisible read GetVisible write SetVisible; - published - property MRUItemsList: Boolean read FMRUItemsList write SetMRUItemsList default True; - property MRUItemsListCount: Integer read FMRUItemsListCount write SetMRUItemsListCount - default cxGridFilterDefaultMRUItemsListCount; - end; - - TcxGridDragFocusing = (dfNone, dfDragOver, dfDragDrop); - - TcxCustomGridTableOptionsBehavior = class(TcxCustomGridOptionsBehavior) - private - FAlwaysShowEditor: Boolean; - FBestFitMaxRecordCount: Integer; - FCellHints: Boolean; - FCopyCaptionsToClipboard: Boolean; - FDragDropText: Boolean; - FDragFocusing: TcxGridDragFocusing; - FDragHighlighting: Boolean; - FDragOpening: Boolean; - FDragScrolling: Boolean; - FFocusCellOnCycle: Boolean; - FFocusCellOnTab: Boolean; - FFocusFirstCellOnNewRecord: Boolean; - FGoToNextCellOnEnter: Boolean; - FImmediateEditor: Boolean; - FIncSearch: Boolean; - FIncSearchItem: TcxCustomGridTableItem; - FNavigatorHints: Boolean; - FPullFocusing: Boolean; - function GetGridView: TcxCustomGridTableView; - procedure SetAlwaysShowEditor(Value: Boolean); - procedure SetBestFitMaxRecordCount(Value: Integer); - procedure SetCellHints(Value: Boolean); - procedure SetCopyCaptionsToClipboard(Value: Boolean); - procedure SetDragDropText(Value: Boolean); - procedure SetDragFocusing(Value: TcxGridDragFocusing); - procedure SetDragHighlighting(Value: Boolean); - procedure SetDragOpening(Value: Boolean); - procedure SetDragScrolling(Value: Boolean); - procedure SetFocusCellOnCycle(Value: Boolean); - procedure SetFocusCellOnTab(Value: Boolean); - procedure SetFocusFirstCellOnNewRecord(Value: Boolean); - procedure SetGoToNextCellOnEnter(Value: Boolean); - procedure SetImmediateEditor(Value: Boolean); - procedure SetIncSearch(Value: Boolean); - procedure SetIncSearchItem(Value: TcxCustomGridTableItem); - procedure SetNavigatorHints(Value: Boolean); - procedure SetPullFocusing(Value: Boolean); - protected - property FocusCellOnCycle: Boolean read FFocusCellOnCycle write SetFocusCellOnCycle default False; - property PullFocusing: Boolean read FPullFocusing write SetPullFocusing default False; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - property BestFitMaxRecordCount: Integer read FBestFitMaxRecordCount write SetBestFitMaxRecordCount default 0; - property GridView: TcxCustomGridTableView read GetGridView; - published - property AlwaysShowEditor: Boolean read FAlwaysShowEditor write SetAlwaysShowEditor default False; - property CellHints: Boolean read FCellHints write SetCellHints default False; - property CopyCaptionsToClipboard: Boolean read FCopyCaptionsToClipboard write SetCopyCaptionsToClipboard default True; - property DragDropText: Boolean read FDragDropText write SetDragDropText default False; - property DragFocusing: TcxGridDragFocusing read FDragFocusing write SetDragFocusing default dfNone; - property DragHighlighting: Boolean read FDragHighlighting write SetDragHighlighting default True; - property DragOpening: Boolean read FDragOpening write SetDragOpening default True; - property DragScrolling: Boolean read FDragScrolling write SetDragScrolling default True; - property FocusCellOnTab: Boolean read FFocusCellOnTab write SetFocusCellOnTab default False; - property FocusFirstCellOnNewRecord: Boolean read FFocusFirstCellOnNewRecord - write SetFocusFirstCellOnNewRecord default False; - property GoToNextCellOnEnter: Boolean read FGoToNextCellOnEnter write SetGoToNextCellOnEnter default False; - property ImmediateEditor: Boolean read FImmediateEditor write SetImmediateEditor default True; - property IncSearch: Boolean read FIncSearch write SetIncSearch default False; - property IncSearchItem: TcxCustomGridTableItem read FIncSearchItem write SetIncSearchItem; - property NavigatorHints: Boolean read FNavigatorHints write SetNavigatorHints default False; - end; - - TcxGridQuickCustomizationReordering = (qcrDefault, qcrEnabled, qcrDisabled); - - TcxCustomGridTableOptionsCustomizeClass = class of TcxCustomGridTableOptionsCustomize; - - TcxCustomGridTableOptionsCustomize = class(TcxCustomGridOptions) - private - FItemFiltering: Boolean; - FItemGrouping: Boolean; - FItemHiding: Boolean; - FItemMoving: Boolean; - FItemSorting: Boolean; - FItemsQuickCustomization: Boolean; - FItemsQuickCustomizationMaxDropDownCount: Integer; - FItemsQuickCustomizationReordering: TcxGridQuickCustomizationReordering; - procedure SetItemFiltering(Value: Boolean); - procedure SetItemGrouping(Value: Boolean); - procedure SetItemHiding(Value: Boolean); - procedure SetItemMoving(Value: Boolean); - procedure SetItemSorting(Value: Boolean); - procedure SetItemsQuickCustomization(Value: Boolean); - procedure SetItemsQuickCustomizationMaxDropDownCount(Value: Integer); - procedure SetItemsQuickCustomizationReordering(Value: TcxGridQuickCustomizationReordering); - protected - property ItemFiltering: Boolean read FItemFiltering write SetItemFiltering default True; - property ItemGrouping: Boolean read FItemGrouping write SetItemGrouping default True; - property ItemHiding: Boolean read FItemHiding write SetItemHiding default False; - property ItemMoving: Boolean read FItemMoving write SetItemMoving default True; - property ItemSorting: Boolean read FItemSorting write SetItemSorting default True; - property ItemsQuickCustomization: Boolean read FItemsQuickCustomization - write SetItemsQuickCustomization default False; - property ItemsQuickCustomizationMaxDropDownCount: Integer read FItemsQuickCustomizationMaxDropDownCount - write SetItemsQuickCustomizationMaxDropDownCount default 0; - property ItemsQuickCustomizationReordering: TcxGridQuickCustomizationReordering - read FItemsQuickCustomizationReordering write SetItemsQuickCustomizationReordering default qcrDefault; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - function SupportsItemsQuickCustomizationReordering: Boolean; virtual; - end; - - TcxCustomGridTableOptionsData = class(TcxCustomGridOptionsData) - private - FAppending: Boolean; - FCancelOnExit: Boolean; - FDeleting: Boolean; - FDeletingConfirmation: Boolean; - FEditing: Boolean; - FInserting: Boolean; - function GetGridView: TcxCustomGridTableView; - procedure SetAppending(Value: Boolean); - procedure SetCancelOnExit(Value: Boolean); - procedure SetDeleting(Value: Boolean); - procedure SetDeletingConfirmation(Value: Boolean); - procedure SetEditing(Value: Boolean); - procedure SetInserting(Value: Boolean); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - property GridView: TcxCustomGridTableView read GetGridView; - published - property Appending: Boolean read FAppending write SetAppending default False; - property CancelOnExit: Boolean read FCancelOnExit write SetCancelOnExit default True; - property Deleting: Boolean read FDeleting write SetDeleting default True; - property DeletingConfirmation: Boolean read FDeletingConfirmation - write SetDeletingConfirmation default True; - property Editing: Boolean read FEditing write SetEditing default True; - property Inserting: Boolean read FInserting write SetInserting default True; - end; - - TcxCustomGridTableOptionsSelection = class(TcxCustomGridOptionsSelection) - private - FCellSelect: Boolean; - FHideFocusRectOnExit: Boolean; - FHideSelection: Boolean; - FInvertSelect: Boolean; - FUnselectFocusedRecordOnExit: Boolean; - function GetGridView: TcxCustomGridTableView; - function GetMultiSelect: Boolean; - procedure SetHideFocusRectOnExit(Value: Boolean); - procedure SetHideSelection(Value: Boolean); - procedure SetUnselectFocusedRecordOnExit(Value: Boolean); - protected - function IsInvertSelectStored: Boolean; virtual; - function IsMultiSelectStored: Boolean; virtual; - procedure SetCellSelect(Value: Boolean); virtual; - procedure SetInvertSelect(Value: Boolean); virtual; - procedure SetMultiSelect(Value: Boolean); virtual; - property GridView: TcxCustomGridTableView read GetGridView; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - published - property CellSelect: Boolean read FCellSelect write SetCellSelect default True; - property HideFocusRect: Boolean read FHideFocusRectOnExit write SetHideFocusRectOnExit stored False; // for compatibility - property HideFocusRectOnExit: Boolean read FHideFocusRectOnExit write SetHideFocusRectOnExit default True; - property HideSelection: Boolean read FHideSelection write SetHideSelection default False; - property InvertSelect: Boolean read FInvertSelect write SetInvertSelect stored IsInvertSelectStored; - property MultiSelect: Boolean read GetMultiSelect write SetMultiSelect stored IsMultiSelectStored; - property UnselectFocusedRecordOnExit: Boolean read FUnselectFocusedRecordOnExit - write SetUnselectFocusedRecordOnExit default True; - end; - - TcxGridShowEditButtons = (gsebNever, gsebForFocusedRecord, gsebAlways); - TcxGridShowItemFilterButtons = (sfbAlways, sfbWhenSelected); - - TcxCustomGridTableOptionsView = class(TcxCustomGridOptionsView) - private - FCellAutoHeight: Boolean; - FCellEndEllipsis: Boolean; - FCellTextMaxLineCount: Integer; - FFocusRect: Boolean; - FItemCaptionAutoHeight: Boolean; - FItemCaptionEndEllipsis: Boolean; - FNavigator: Boolean; - FNavigatorOffset: Integer; - FNoDataToDisplayInfoText: string; - FShowEditButtons: TcxGridShowEditButtons; - FShowItemFilterButtons: TcxGridShowItemFilterButtons; - function GetGridView: TcxCustomGridTableView; - procedure SetCellAutoHeight(Value: Boolean); - procedure SetCellEndEllipsis(Value: Boolean); - procedure SetCellTextMaxLineCount(Value: Integer); - procedure SetFocusRect(Value: Boolean); - procedure SetItemCaptionAutoHeight(Value: Boolean); - procedure SetItemCaptionEndEllipsis(Value: Boolean); - procedure SetNavigator(Value: Boolean); - procedure SetNavigatorOffset(Value: Integer); - procedure SetNoDataToDisplayInfoText(const Value: string); - procedure SetShowEditButtons(Value: TcxGridShowEditButtons); - procedure SetShowItemFilterButtons(Value: TcxGridShowItemFilterButtons); - function IsNoDataToDisplayInfoTextAssigned: Boolean; - protected - procedure ItemCaptionAutoHeightChanged; dynamic; - - property CellAutoHeight: Boolean read FCellAutoHeight write SetCellAutoHeight default False; - property CellTextMaxLineCount: Integer read FCellTextMaxLineCount write SetCellTextMaxLineCount default 0; - property ItemCaptionAutoHeight: Boolean read FItemCaptionAutoHeight - write SetItemCaptionAutoHeight default False; - property ItemCaptionEndEllipsis: Boolean read FItemCaptionEndEllipsis - write SetItemCaptionEndEllipsis default False; - property ShowItemFilterButtons: TcxGridShowItemFilterButtons read FShowItemFilterButtons - write SetShowItemFilterButtons default sfbWhenSelected; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - function GetNoDataToDisplayInfoText: string; - property GridView: TcxCustomGridTableView read GetGridView; - published - property CellEndEllipsis: Boolean read FCellEndEllipsis write SetCellEndEllipsis default False; - property FocusRect: Boolean read FFocusRect write SetFocusRect default True; - property Navigator: Boolean read FNavigator write SetNavigator default False; - property NavigatorOffset: Integer read FNavigatorOffset write SetNavigatorOffset default cxGridNavigatorDefaultOffset; - property NoDataToDisplayInfoText: string read FNoDataToDisplayInfoText - write SetNoDataToDisplayInfoText stored IsNoDataToDisplayInfoTextAssigned; - property ScrollBars; - property ShowEditButtons: TcxGridShowEditButtons read FShowEditButtons - write SetShowEditButtons default gsebNever; - end; - - TcxGridCellPos = class - GridRecord: TcxCustomGridRecord; - Item: TObject; - constructor Create(AGridRecord: TcxCustomGridRecord; AItem: TObject); - end; - - TcxGridDataCellPos = class - GridRecord: TcxCustomGridRecord; - Item: TcxCustomGridTableItem; - constructor Create(AGridRecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem); overload; - end; - - TcxCustomGridTableViewStyles = class(TcxCustomGridViewStyles) - private - FOnGetContentStyle: TcxGridGetCellStyleEvent; - function GetGridViewValue: TcxCustomGridTableView; - procedure SetOnGetContentStyle(Value: TcxGridGetCellStyleEvent); - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - procedure GetSelectionParams(ARecord: TcxCustomGridRecord; AItem: TObject; - out AParams: TcxViewParams); virtual; - public - procedure Assign(Source: TPersistent); override; - procedure GetCellContentParams(ARecord: TcxCustomGridRecord; AItem: TObject; - out AParams: TcxViewParams); virtual; - procedure GetContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetDataCellContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetDataCellParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams; AUseViewInfo: Boolean = False; ACellViewInfo: TcxGridTableCellViewInfo = nil; - AIgnoreSelection: Boolean = False); virtual; - procedure GetRecordContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - property GridView: TcxCustomGridTableView read GetGridViewValue; - published - property Content: TcxStyle index vsContent read GetValue write SetValue; - property ContentEven: TcxStyle index vsContentEven read GetValue write SetValue; - property ContentOdd: TcxStyle index vsContentOdd read GetValue write SetValue; - property FilterBox: TcxStyle index vsFilterBox read GetValue write SetValue; - property Inactive: TcxStyle index vsInactive read GetValue write SetValue; - property IncSearch: TcxStyle index vsIncSearch read GetValue write SetValue; - property Selection: TcxStyle index vsSelection read GetValue write SetValue; - property OnGetContentStyle: TcxGridGetCellStyleEvent read FOnGetContentStyle write SetOnGetContentStyle; - end; - - // grid view - - TcxGridOpenTableItemList = class(TcxOpenList) - private - function GetItem(Index: Integer): TcxCustomGridTableItem; - procedure SetItem(Index: Integer; Value: TcxCustomGridTableItem); - public - property Items[Index: Integer]: TcxCustomGridTableItem read GetItem write SetItem; default; - end; - - TcxGridTableCellCustomDrawEvent = procedure(Sender: TcxCustomGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridTableCellViewInfo; var ADone: Boolean) of object; - - TcxGridAllowRecordOperationEvent = procedure(Sender: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; var AAllow: Boolean) of object; - TcxGridCellClickEvent = procedure(Sender: TcxCustomGridTableView; - ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; - AShift: TShiftState; var AHandled: Boolean) of object; - TcxGridCustomTableViewEvent = procedure(Sender: TcxCustomGridTableView) of object; - TcxGridEditingEvent = procedure(Sender: TcxCustomGridTableView; - AItem: TcxCustomGridTableItem; var AAllow: Boolean) of object; - TcxGridEditKeyEvent = procedure(Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem; - AEdit: TcxCustomEdit; var Key: Word; Shift: TShiftState) of object; - TcxGridEditKeyPressEvent = procedure(Sender: TcxCustomGridTableView; - AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit; var Key: Char) of object; - TcxGridCustomTableItemEvent = procedure(Sender: TcxCustomGridTableView; - AItem: TcxCustomGridTableItem) of object; - TcxGridFilterCustomizationEvent = procedure(Sender: TcxCustomGridTableView; - var ADone: Boolean) of object; - TcxGridFilterDialogShowEvent = procedure(Sender: TcxCustomGridTableView; - AItem: TcxCustomGridTableItem; var ADone: Boolean) of object; - TcxGridFocusedItemChangedEvent = procedure(Sender: TcxCustomGridTableView; - APrevFocusedItem, AFocusedItem: TcxCustomGridTableItem) of object; - TcxGridFocusedRecordChangedEvent = procedure(Sender: TcxCustomGridTableView; - APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean) of object; - TcxGridGetCellHeightEvent = procedure(Sender: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - ACellViewInfo: TcxGridTableDataCellViewInfo; var AHeight: Integer) of object; - TcxGridGetDragDropTextEvent = procedure(Sender: TcxCustomGridTableView; - ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; var AText: string) of object; - TcxGridInitEditEvent = procedure(Sender: TcxCustomGridTableView; - AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit) of object; - TcxGridInitEditValueEvent = procedure(Sender: TcxCustomGridTableView; - AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit; var AValue: TcxEditValue) of object; - TcxGridPartCustomDrawBackgroundEvent = procedure(Sender: TcxCustomGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo; var ADone: Boolean) of object; - TcxGridRecordEvent = procedure(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord) of object; - - TcxGridDataControllerChange = (dccItemAdded, dccItemRemoved, dccIndexesChanged); - - TcxCustomGridTableView = class(TcxCustomGridView, IcxFilterControl, IcxNavigator) - private - FAssigningGroupedItems: TcxGridOpenTableItemList; - FAssigningSortedItems: TcxGridOpenTableItemList; - FCopyToClipboardItems: TList; - FCopyToClipboardStr: string; - FDateTimeHandling: TcxCustomGridTableDateTimeHandling; - FDontMakeMasterRecordVisible: Boolean; - FFilterableItems: TList; - FFilterBox: TcxGridFilterBox; - FFiltering: TcxCustomGridTableFiltering; - FIgnorePropertiesChanges: Boolean; - FIsAfterAssigningItems: Boolean; - FIsAssigningItems: Boolean; - FItems: TList; - FNavigatorButtons: TcxNavigatorControlButtons; - FNavigatorNotifier: TcxNavigatorControlNotifier; - FNextID: Integer; - FOptionsCustomize: TcxCustomGridTableOptionsCustomize; - FRestoringItems: TcxGridOpenTableItemList; - FVisibleItems: TList; - FOnCanFocusRecord: TcxGridAllowRecordOperationEvent; - FOnCanSelectRecord: TcxGridAllowRecordOperationEvent; - FOnCellClick: TcxGridCellClickEvent; - FOnCellDblClick: TcxGridCellClickEvent; - FOnCustomDrawCell: TcxGridTableDataCellCustomDrawEvent; - FOnCustomDrawPartBackground: TcxGridPartCustomDrawBackgroundEvent; - FOnEditing: TcxGridEditingEvent; - FOnEditChanged: TcxGridCustomTableItemEvent; - FOnEditKeyDown: TcxGridEditKeyEvent; - FOnEditKeyPress: TcxGridEditKeyPressEvent; - FOnEditKeyUp: TcxGridEditKeyEvent; - FOnEditValueChanged: TcxGridCustomTableItemEvent; - FOnFilterControlDialogShow: TNotifyEvent; - FOnFilterCustomization: TcxGridFilterCustomizationEvent; - FOnFilterDialogShow: TcxGridFilterDialogShowEvent; - FOnFocusedItemChanged: TcxGridFocusedItemChangedEvent; - FOnFocusedRecordChanged: TcxGridFocusedRecordChangedEvent; - FOnGetCellHeight: TcxGridGetCellHeightEvent; - FOnGetDragDropText: TcxGridGetDragDropTextEvent; - FOnInitFilteringDateRanges: TcxGridInitDateRangesEvent; - FOnInitGroupingDateRanges: TcxGridInitDateRangesEvent; - FOnInitEdit: TcxGridInitEditEvent; - FOnInitEditValue: TcxGridInitEditValueEvent; - //FOnRecordCreated: TcxGridRecordEvent; - //FOnRecordDestroying: TcxGridRecordEvent; - FOnSelectionChanged: TcxGridCustomTableViewEvent; - FOnTopRecordIndexChanged: TNotifyEvent; - - function GetBackgroundBitmaps: TcxCustomGridTableBackgroundBitmaps; - function GetController: TcxCustomGridTableController; - function GetFilterableItem(Index: Integer): TcxCustomGridTableItem; - function GetFilterableItemCount: Integer; - function GetGroupedItem(Index: Integer): TcxCustomGridTableItem; - function GetGroupedItemCount: Integer; - function GetItem(Index: Integer): TcxCustomGridTableItem; - function GetItemCount: Integer; - function GetMasterGridRecord: TcxCustomGridRecord; - function GetOptionsBehavior: TcxCustomGridTableOptionsBehavior; - function GetOptionsData: TcxCustomGridTableOptionsData; - function GetOptionsSelection: TcxCustomGridTableOptionsSelection; - function GetOptionsView: TcxCustomGridTableOptionsView; - function GetPainter: TcxCustomGridTablePainter; - function GetPatternGridView: TcxCustomGridTableView; - function GetNavigatorButtonsControl: IcxNavigator; - function GetSortedItem(Index: Integer): TcxCustomGridTableItem; - function GetSortedItemCount: Integer; - function GetStyles: TcxCustomGridTableViewStyles; - function GetViewData: TcxCustomGridTableViewData; - function GetViewInfo: TcxCustomGridTableViewInfo; - function GetVisibleItem(Index: Integer): TcxCustomGridTableItem; - function GetVisibleItemCount: Integer; - procedure SetBackgroundBitmaps(Value: TcxCustomGridTableBackgroundBitmaps); - procedure SetDateTimeHandling(Value: TcxCustomGridTableDateTimeHandling); - procedure SetFilterBox(Value: TcxGridFilterBox); - procedure SetFiltering(Value: TcxCustomGridTableFiltering); - procedure SetItem(Index: Integer; Value: TcxCustomGridTableItem); - procedure SetNavigatorButtons(Value: TcxNavigatorControlButtons); - procedure SetOnCanFocusRecord(Value: TcxGridAllowRecordOperationEvent); - procedure SetOnCanSelectRecord(Value: TcxGridAllowRecordOperationEvent); - procedure SetOnCellClick(Value: TcxGridCellClickEvent); - procedure SetOnCellDblClick(Value: TcxGridCellClickEvent); - procedure SetOnCustomDrawCell(Value: TcxGridTableDataCellCustomDrawEvent); - procedure SetOnCustomDrawPartBackground(Value: TcxGridPartCustomDrawBackgroundEvent); - procedure SetOnEditChanged(Value: TcxGridCustomTableItemEvent); - procedure SetOnEditing(Value: TcxGridEditingEvent); - procedure SetOnEditKeyDown(Value: TcxGridEditKeyEvent); - procedure SetOnEditKeyPress(Value: TcxGridEditKeyPressEvent); - procedure SetOnEditKeyUp(Value: TcxGridEditKeyEvent); - procedure SetOnEditValueChanged(Value: TcxGridCustomTableItemEvent); - procedure SetOnFilterControlDialogShow(Value: TNotifyEvent); - procedure SetOnFilterCustomization(Value: TcxGridFilterCustomizationEvent); - procedure SetOnFilterDialogShow(Value: TcxGridFilterDialogShowEvent); - procedure SetOnFocusedItemChanged(Value: TcxGridFocusedItemChangedEvent); - procedure SetOnFocusedRecordChanged(Value: TcxGridFocusedRecordChangedEvent); - procedure SetOnGetCellHeight(Value: TcxGridGetCellHeightEvent); - procedure SetOnGetDragDropText(Value: TcxGridGetDragDropTextEvent); - procedure SetOnInitFilteringDateRanges(Value: TcxGridInitDateRangesEvent); - procedure SetOnInitGroupingDateRanges(Value: TcxGridInitDateRangesEvent); - procedure SetOnInitEdit(Value: TcxGridInitEditEvent); - procedure SetOnInitEditValue(Value: TcxGridInitEditValueEvent); - procedure SetOnSelectionChanged(Value: TcxGridCustomTableViewEvent); - procedure SetOnTopRecordIndexChanged(Value: TNotifyEvent); - procedure SetOptionsBehavior(Value: TcxCustomGridTableOptionsBehavior); - procedure SetOptionsCustomize(Value: TcxCustomGridTableOptionsCustomize); - procedure SetOptionsData(Value: TcxCustomGridTableOptionsData); - procedure SetOptionsSelection(Value: TcxCustomGridTableOptionsSelection); - procedure SetOptionsView(Value: TcxCustomGridTableOptionsView); - procedure SetStyles(Value: TcxCustomGridTableViewStyles); - - procedure CopyForEachRowProc(ARowIndex: Integer; ARowInfo: TcxRowInfo); - procedure RefreshItemIndexes; - protected - // IcxFilterControl - function IcxFilterControl.GetCaption = GetFilterCaption; - function IcxFilterControl.GetCount = GetFilterCount; - function IcxFilterControl.GetCriteria = GetFilterCriteria; - function IcxFilterControl.GetFieldName = GetFilterFieldName; - function IcxFilterControl.GetItemLink = GetFilterItemLink; - function IcxFilterControl.GetItemLinkID = GetFilterItemLinkID; - function IcxFilterControl.GetItemLinkName = GetFilterItemLinkName; - function IcxFilterControl.GetProperties = GetFilterProperties; - function IcxFilterControl.GetValueType = GetFilterValueType; - function GetFilterCaption(Index: Integer): string; - function GetFilterCount: Integer; - function GetFilterCriteria: TcxFilterCriteria; - function GetFilterFieldName(Index: Integer): string; - function GetFilterItemLink(Index: Integer): TObject; - function GetFilterItemLinkID(Index: Integer): Integer; - function GetFilterItemLinkName(Index: Integer): string; - function GetFilterProperties(Index: Integer): TcxCustomEditProperties; - function GetFilterValueType(Index: Integer): cxDataStorage.TcxValueTypeClass; - // IcxNavigator - function IcxNavigator.IsActive = NavigatorIsActive; - function IcxNavigator.IsBof = NavigatorIsBof; - function IcxNavigator.IsEof = NavigatorIsEof; - function IcxNavigator.CanAppend = NavigatorCanAppend; - function IcxNavigator.CanEdit = NavigatorCanEdit; - function IcxNavigator.CanDelete = NavigatorCanDelete; - function IcxNavigator.CanInsert = NavigatorCanInsert; - function IcxNavigator.IsEditing = NavigatorIsEditing; - procedure IcxNavigator.ClearBookmark = NavigatorClearBookmark; - function IcxNavigator.IsBookmarkAvailable = NavigatorIsBookmarkAvailable; - procedure IcxNavigator.DoAction = NavigatorDoAction; - function IcxNavigator.GetNotifier = NavigatorGetNotifier; - function IcxNavigator.IsActionSupported = NavigatorIsActionSupported; - function NavigatorIsActive: Boolean; - function NavigatorIsBof: Boolean; - function NavigatorIsEof: Boolean; - function NavigatorCanAppend: Boolean; - function NavigatorCanEdit: Boolean; - function NavigatorCanDelete: Boolean; - function NavigatorCanInsert: Boolean; - function NavigatorIsEditing: Boolean; - procedure NavigatorClearBookmark; - function NavigatorIsBookmarkAvailable: Boolean; - procedure NavigatorDoAction(AButtonIndex: Integer); - function NavigatorGetNotifier: TcxNavigatorControlNotifier; - function NavigatorIsActionSupported(AButtonIndex: Integer): Boolean; - // IcxStoredObject - function GetProperties(AProperties: TStrings): Boolean; override; - procedure GetPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetPropertyValue(const AName: string; const AValue: Variant); override; - // IcxStoredParent - function CreateStoredObject(const AObjectName, AClassName: string): TObject; override; - procedure GetStoredChildren(AChildren: TStringList); override; - // IcxGridViewLayoutEditorSupport - for design-time layout editor - procedure AssignLayout(ALayoutView: TcxCustomGridView); override; - procedure BeforeEditLayout(ALayoutView: TcxCustomGridView); override; - function HasLayoutCustomizationForm: Boolean; override; - - procedure BeforeRestoring; override; - procedure AfterRestoring; override; - procedure ReadState(Reader: TReader); override; - property RestoringItems: TcxGridOpenTableItemList read FRestoringItems; - - procedure BeginAssignItems; - procedure DoBeforeAssignItems; virtual; - procedure DoItemsAssigned; virtual; - procedure EndAssignItems; - property AssigningGroupedItems: TcxGridOpenTableItemList read FAssigningGroupedItems; - property AssigningSortedItems: TcxGridOpenTableItemList read FAssigningSortedItems; - property IsAssigningItems: Boolean read FIsAssigningItems; - property IsAfterAssigningItems: Boolean read FIsAfterAssigningItems; - - function CanOffset(ARecordCountDelta: Integer): Boolean; virtual; - function CanSelectRecord(ARecordIndex: Integer): Boolean; virtual; - function CanTabStop: Boolean; override; - procedure DetailVisibleChanged(ADetailLevel: TComponent; - APrevVisibleDetailCount, AVisibleDetailCount: Integer); override; - procedure DoAssign(ASource: TcxCustomGridView); override; - function FindItemByObjectName(const AObjectName: string): TcxCustomGridTableItem; virtual; - procedure FocusEdit(AItemIndex: Integer; var ADone: Boolean); virtual; - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - function GetDefaultActiveDetailIndex: Integer; virtual; - procedure GetFakeComponentLinks(AList: TList); override; - function GetIsControlFocused: Boolean; override; - procedure GetItemsListForClipboard(AItems: TList; ACopyAll: Boolean); virtual; - function GetItemSortByDisplayText(AItemIndex: Integer; ASortByDisplayText: Boolean): Boolean; - function GetItemValueSource(AItemIndex: Integer): TcxDataEditValueSource; - procedure GetVisibleItemsList(AItems: TList); virtual; - function HasCustomDrawCell: Boolean; - function HasCustomDrawPartBackground: Boolean; - procedure Init; override; - function IsDetailVisible(AGridView: TcxCustomGridView): Boolean; override; - function IsEqualHeightRecords: Boolean; virtual; - function IsRecordHeightDependsOnData: Boolean; virtual; - function IsRecordHeightDependsOnFocus: Boolean; virtual; - procedure LoadingComplete; override; - procedure Offset(ARecordCountDelta, DX, DY: Integer); virtual; - procedure SetChildOrder(Child: TComponent; Order: Integer); override; - procedure SetName(const NewName: TComponentName); override; - procedure UpdateControl(AInfo: TcxUpdateControlInfo); override; - procedure UpdateDataController(AChange: TcxGridDataControllerChange; - AItem: TcxCustomGridTableItem = nil); - procedure UpdateRecord; virtual; - - procedure CreateHandlers; override; - procedure DestroyHandlers; override; - procedure CreateOptions; override; - procedure DestroyOptions; override; - - procedure AddItem(AItem: TcxCustomGridTableItem); virtual; - procedure RemoveItem(AItem: TcxCustomGridTableItem); virtual; - procedure AssignVisibleItemsIndexes; - procedure ChangeItemIndex(AItem: TcxCustomGridTableItem; Value: Integer); virtual; - procedure CheckItemVisibles; - procedure SaveItemVisibles; - procedure ItemIndexChanged(AItem: TcxCustomGridTableItem; AOldIndex: Integer); virtual; - procedure ItemVisibilityChanged(AItem: TcxCustomGridTableItem; Value: Boolean); virtual; - procedure RefreshVisibleItemsList; virtual; - - function GetItemClass: TcxCustomGridTableItemClass; virtual; abstract; - function GetItemDataBindingClass: TcxGridItemDataBindingClass; virtual; - function GetNextID: Integer; - procedure ReleaseID(AID: Integer); - - procedure DataChanged; virtual; - procedure DataLayoutChanged; virtual; - function DoCellClick(ACellViewInfo: TcxGridTableDataCellViewInfo; - AButton: TMouseButton; AShift: TShiftState): Boolean; virtual; - function DoCellDblClick(ACellViewInfo: TcxGridTableDataCellViewInfo; - AButton: TMouseButton; AShift: TShiftState): Boolean; virtual; - function DoEditing(AItem: TcxCustomGridTableItem): Boolean; virtual; - procedure DoTopRecordIndexChanged; virtual; - procedure FilterChanged; virtual; - procedure FocusedItemChanged(APrevFocusedItem, AFocusedItem: TcxCustomGridTableItem); virtual; - procedure FocusedRecordChanged(APrevFocusedRecordIndex, AFocusedRecordIndex: Integer; - ANewItemRecordFocusingChanged: Boolean); virtual; - procedure GroupingChanging; virtual; - procedure ItemCaptionChanged(AItem: TcxCustomGridTableItem); virtual; - procedure ItemValueTypeClassChanged(AItemIndex: Integer); virtual; - procedure RecalculateDefaultWidths; - procedure RecordChanged(ARecordIndex: Integer); virtual; - procedure RecordCountChanged; virtual; - procedure RefreshFilterableItemsList; - procedure RefreshNavigators; - procedure SearchChanged; virtual; - procedure SelectionChanged(AInfo: TcxSelectionChangedInfo); virtual; - - function CalculateDataCellSelected(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; AUseViewInfo: Boolean; - ACellViewInfo: TcxGridTableCellViewInfo): Boolean; virtual; - function DrawDataCellSelected(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - AUseViewInfo: Boolean = False; ACellViewInfo: TcxGridTableCellViewInfo = nil): Boolean; virtual; - function DrawRecordActive(ARecord: TcxCustomGridRecord): Boolean; virtual; - function DrawRecordFocused(ARecord: TcxCustomGridRecord): Boolean; virtual; - function DrawRecordSelected(ARecord: TcxCustomGridRecord): Boolean; virtual; - function DrawSelection: Boolean; virtual; - - function DoCanFocusRecord(ARecord: TcxCustomGridRecord): Boolean; virtual; - procedure DoCustomDrawCell(ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; - var ADone: Boolean); virtual; - procedure DoCustomDrawPartBackground(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo; - var ADone: Boolean); virtual; - procedure DoEditChanged(AItem: TcxCustomGridTableItem); virtual; - procedure DoEditKeyDown(AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit; - var Key: Word; Shift: TShiftState); virtual; - procedure DoEditKeyPress(AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit; - var Key: Char); virtual; - procedure DoEditKeyUp(AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit; - var Key: Word; Shift: TShiftState); virtual; - procedure DoEditValueChanged(AItem: TcxCustomGridTableItem); virtual; - function DoFilterCustomization: Boolean; virtual; - function DoFilterDialogShow(AItem: TcxCustomGridTableItem): Boolean; virtual; - procedure DoFocusedRecordChanged(APrevFocusedRecordIndex, AFocusedRecordIndex: Integer; - ANewItemRecordFocusingChanged: Boolean); virtual; - procedure DoGetCellHeight(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - ACellViewInfo: TcxGridTableDataCellViewInfo; var AHeight: Integer); virtual; - function DoGetDragDropText(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem): string; virtual; - procedure DoInitEdit(AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit); virtual; - procedure DoInitEditValue(AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit; - var AValue: TcxEditValue); virtual; - procedure DoInitFilteringDateRanges(AItem: TcxCustomGridTableItem); virtual; - procedure DoInitGroupingDateRanges(AItem: TcxCustomGridTableItem); virtual; - //procedure DoRecordCreated(ARecord: TcxCustomGridRecord); virtual; - //procedure DoRecordDestroying(ARecord: TcxCustomGridRecord); virtual; - procedure DoSelectionChanged; virtual; - function HasCustomProperties: Boolean; - function HasInitFilteringDateRangesHandler: Boolean; - function HasInitGroupingDateRangesHandler: Boolean; - function IsGetCellHeightAssigned: Boolean; - - function GetControllerClass: TcxCustomGridControllerClass; override; - function GetPainterClass: TcxCustomGridPainterClass; override; - function GetViewDataClass: TcxCustomGridViewDataClass; override; - function GetViewInfoCacheClass: TcxCustomGridViewInfoCacheClass; override; - function GetViewInfoClass: TcxCustomGridViewInfoClass; override; - - function GetBackgroundBitmapsClass: TcxCustomGridBackgroundBitmapsClass; override; - function GetDateTimeHandlingClass: TcxCustomGridTableDateTimeHandlingClass; virtual; - function GetFilterBoxClass: TcxGridFilterBoxClass; virtual; - function GetFilteringClass: TcxCustomGridTableFilteringClass; virtual; - function GetNavigatorButtonsClass: TcxNavigatorControlButtonsClass; virtual; - function GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; override; - function GetOptionsCustomizeClass: TcxCustomGridTableOptionsCustomizeClass; virtual; - function GetOptionsDataClass: TcxCustomGridOptionsDataClass; override; - function GetOptionsSelectionClass: TcxCustomGridOptionsSelectionClass; override; - function GetOptionsViewClass: TcxCustomGridOptionsViewClass; override; - function GetStylesClass: TcxCustomGridViewStylesClass; override; - - function GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; virtual; - function GetSummaryItemClass: TcxDataSummaryItemClass; virtual; - - property BackgroundBitmaps: TcxCustomGridTableBackgroundBitmaps read GetBackgroundBitmaps - write SetBackgroundBitmaps; - property DontMakeMasterRecordVisible: Boolean read FDontMakeMasterRecordVisible - write FDontMakeMasterRecordVisible; - property FilterableItemCount: Integer read GetFilterableItemCount; - property FilterableItems[Index: Integer]: TcxCustomGridTableItem read GetFilterableItem; - property IgnorePropertiesChanges: Boolean read FIgnorePropertiesChanges write FIgnorePropertiesChanges; - property ItemsList: TList read FItems; - property NavigatorNotifier: TcxNavigatorControlNotifier read FNavigatorNotifier; - property NextID: Integer read FNextID; - property VisibleItemsList: TList read FVisibleItems; - - property OnInitGroupingDateRanges: TcxGridInitDateRangesEvent read FOnInitGroupingDateRanges write SetOnInitGroupingDateRanges; - public - destructor Destroy; override; - - procedure ApplyBestFit(AItem: TcxCustomGridTableItem = nil; ACheckSizingAbility: Boolean = False; - AFireEvents: Boolean = False); virtual; - procedure ClearItems; - procedure CopyToClipboard(ACopyAll: Boolean); - function CreateItem: TcxCustomGridTableItem; - function FindItemByID(AID: Integer): TcxCustomGridTableItem; - function FindItemByName(const AName: string): TcxCustomGridTableItem; - function FindItemByTag(ATag: TcxTag): TcxCustomGridTableItem; - function IndexOfItem(AItem: TcxCustomGridTableItem): Integer; - procedure MakeMasterGridRecordVisible; - procedure RestoreDefaults; override; - - // for extended lookup edit - class function CanBeLookupList: Boolean; virtual; - - property Controller: TcxCustomGridTableController read GetController; - property DateTimeHandling: TcxCustomGridTableDateTimeHandling read FDateTimeHandling write SetDateTimeHandling; - property Filtering: TcxCustomGridTableFiltering read FFiltering write SetFiltering; - property GroupedItemCount: Integer read GetGroupedItemCount; - property GroupedItems[Index: Integer]: TcxCustomGridTableItem read GetGroupedItem; - property ItemCount: Integer read GetItemCount; - property Items[Index: Integer]: TcxCustomGridTableItem read GetItem write SetItem; - property MasterGridRecord: TcxCustomGridRecord read GetMasterGridRecord; - property OptionsBehavior: TcxCustomGridTableOptionsBehavior read GetOptionsBehavior - write SetOptionsBehavior; - property OptionsCustomize: TcxCustomGridTableOptionsCustomize read FOptionsCustomize - write SetOptionsCustomize; - property OptionsData: TcxCustomGridTableOptionsData read GetOptionsData write SetOptionsData; - property OptionsSelection: TcxCustomGridTableOptionsSelection read GetOptionsSelection - write SetOptionsSelection; - property OptionsView: TcxCustomGridTableOptionsView read GetOptionsView write SetOptionsView; - property Painter: TcxCustomGridTablePainter read GetPainter; - property PatternGridView: TcxCustomGridTableView read GetPatternGridView; - property SortedItemCount: Integer read GetSortedItemCount; - property SortedItems[Index: Integer]: TcxCustomGridTableItem read GetSortedItem; - property Styles: TcxCustomGridTableViewStyles read GetStyles write SetStyles; - property ViewData: TcxCustomGridTableViewData read GetViewData; - property ViewInfo: TcxCustomGridTableViewInfo read GetViewInfo; - property VisibleItemCount: Integer read GetVisibleItemCount; - property VisibleItems[Index: Integer]: TcxCustomGridTableItem read GetVisibleItem; - published - property NavigatorButtons: TcxNavigatorControlButtons read FNavigatorButtons write SetNavigatorButtons; - property FilterBox: TcxGridFilterBox read FFilterBox write SetFilterBox; - - property NavigatorButtonsEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property OnCanFocusRecord: TcxGridAllowRecordOperationEvent read FOnCanFocusRecord write SetOnCanFocusRecord; - property OnCanSelectRecord: TcxGridAllowRecordOperationEvent read FOnCanSelectRecord write SetOnCanSelectRecord; - property OnCellClick: TcxGridCellClickEvent read FOnCellClick write SetOnCellClick; - property OnCellDblClick: TcxGridCellClickEvent read FOnCellDblClick write SetOnCellDblClick; - property OnCustomDrawCell: TcxGridTableDataCellCustomDrawEvent read FOnCustomDrawCell write SetOnCustomDrawCell; - property OnCustomDrawPartBackground: TcxGridPartCustomDrawBackgroundEvent - read FOnCustomDrawPartBackground write SetOnCustomDrawPartBackground; - property OnEditing: TcxGridEditingEvent read FOnEditing write SetOnEditing; - property OnEditChanged: TcxGridCustomTableItemEvent read FOnEditChanged write SetOnEditChanged; - property OnEditKeyDown: TcxGridEditKeyEvent read FOnEditKeyDown write SetOnEditKeyDown; - property OnEditKeyPress: TcxGridEditKeyPressEvent read FOnEditKeyPress write SetOnEditKeyPress; - property OnEditKeyUp: TcxGridEditKeyEvent read FOnEditKeyUp write SetOnEditKeyUp; - property OnEditValueChanged: TcxGridCustomTableItemEvent read FOnEditValueChanged write SetOnEditValueChanged; - property OnFilterControlDialogShow: TNotifyEvent read FOnFilterControlDialogShow - write SetOnFilterControlDialogShow; - property OnFilterCustomization: TcxGridFilterCustomizationEvent read FOnFilterCustomization - write SetOnFilterCustomization; - property OnFilterDialogShow: TcxGridFilterDialogShowEvent read FOnFilterDialogShow - write SetOnFilterDialogShow; - property OnFocusedItemChanged: TcxGridFocusedItemChangedEvent read FOnFocusedItemChanged - write SetOnFocusedItemChanged; - property OnFocusedRecordChanged: TcxGridFocusedRecordChangedEvent read FOnFocusedRecordChanged - write SetOnFocusedRecordChanged; - property OnGetCellHeight: TcxGridGetCellHeightEvent read FOnGetCellHeight write SetOnGetCellHeight; - property OnGetDragDropText: TcxGridGetDragDropTextEvent read FOnGetDragDropText write SetOnGetDragDropText; - property OnInitEdit: TcxGridInitEditEvent read FOnInitEdit write SetOnInitEdit; - property OnInitEditValue: TcxGridInitEditValueEvent read FOnInitEditValue write SetOnInitEditValue; - property OnInitFilteringDateRanges: TcxGridInitDateRangesEvent read FOnInitFilteringDateRanges write SetOnInitFilteringDateRanges; - property OnInitStoredObject; - //property OnRecordCreated: TcxGridRecordEvent read FOnRecordCreated write FOnRecordCreated; - //property OnRecordDestroying: TcxGridRecordEvent read FOnRecordDestroying write FOnRecordDestroying; - property OnSelectionChanged: TcxGridCustomTableViewEvent read FOnSelectionChanged write SetOnSelectionChanged; - property OnTopRecordIndexChanged: TNotifyEvent read FOnTopRecordIndexChanged write SetOnTopRecordIndexChanged; - end; - - { TcxCustomGridTableControllerAccess } - - TcxCustomGridTableControllerAccess = class - public - class procedure FocusNextPage(AInstance: TcxCustomGridTableController; - ASyncSelection: Boolean); - class procedure FocusPrevPage(AInstance: TcxCustomGridTableController; - ASyncSelection: Boolean); - end; - - { TcxCustomGridTableItemAccess } - - TcxCustomGridTableItemAccess = class - public - class function CanGroup(AInstance: TcxCustomGridTableItem): Boolean; - class function CanHide(AInstance: TcxCustomGridTableItem): Boolean; - class function CanHorzSize(AInstance: TcxCustomGridTableItem): Boolean; - class function CanSort(AInstance: TcxCustomGridTableItem): Boolean; - class procedure CheckWidthValue(AInstance: TcxCustomGridTableItem; - var Value: Integer); - class procedure DoGetDataText(AInstance: TcxCustomGridTableItem; - ARecordIndex: Integer; var AText: string); - class procedure DoGetDisplayText(AInstance: TcxCustomGridTableItem; - ARecord: TcxCustomGridRecord; var AText: string); - class function GetGroupIndex(AInstance: TcxCustomGridTableItem): Integer; - - class function GetFilterCaption(AInstance: TcxCustomGridTableItem): string; - end; - - { TcxCustomGridTableOptionsBehaviorAccess } - - TcxCustomGridTableOptionsBehaviorAccess = class - public - class function GetPullFocusing( - AInstance: TcxCustomGridTableOptionsBehavior): Boolean; - class procedure SetPullFocusing( - AInstance: TcxCustomGridTableOptionsBehavior; Value: Boolean); - end; - - { TcxCustomGridTableOptionsViewAccess } - - TcxCustomGridTableOptionsViewAccess = class - public - class function GetCellAutoHeight(AInstance: TcxCustomGridTableOptionsView): Boolean; - end; - - { TcxCustomGridTableViewAccess } - - TcxCustomGridTableViewAccess = class - public - class function CanSelectRecord(AInstance: TcxCustomGridTableView; - ARecordIndex: Integer): Boolean; - class procedure FilterChanged(AInstance: TcxCustomGridTableView); - class function FindItemByObjectName(AInstance: TcxCustomGridTableView; - const AObjectName: string): TcxCustomGridTableItem; - class procedure FocusEdit(AInstance: TcxCustomGridTableView; - AItemIndex: Integer; var ADone: Boolean); - class function GetDefaultActiveDetailIndex( - AInstance: TcxCustomGridTableView): Integer; - class function GetItemClass(AInstance: TcxCustomGridTableView): TcxCustomGridTableItemClass; - class function GetItemSortByDisplayText(AInstance: TcxCustomGridTableView; - AItemIndex: Integer; ASortByDisplayText: Boolean): Boolean; - class function GetItemValueSource(AInstance: TcxCustomGridTableView; - AItemIndex: Integer): TcxDataEditValueSource; - class function GetSummaryGroupItemLinkClass( - AInstance: TcxCustomGridTableView): TcxDataSummaryGroupItemLinkClass; - class function GetSummaryItemClass( - AInstance: TcxCustomGridTableView): TcxDataSummaryItemClass; - class function IsEqualHeightRecords( - AInstance: TcxCustomGridTableView): Boolean; - class function IsGetCellHeightAssigned( - AInstance: TcxCustomGridTableView): Boolean; - class procedure ItemValueTypeClassChanged(AInstance: TcxCustomGridTableView; - AItemIndex: Integer); - class procedure RefreshNavigators(AInstance: TcxCustomGridTableView); - class procedure UpdateRecord(AInstance: TcxCustomGridTableView); - end; - - { TcxCustomGridTableViewInfoAccess } - - TcxCustomGridTableViewInfoAccess = class - public - class function GetDefaultGridModeBufferCount(AInstance: TcxCustomGridTableViewInfo): Integer; - end; - -implementation - -uses -{$IFDEF DELPHI6} - DateUtils, -{$ENDIF} - Math, SysUtils, TypInfo, - Clipbrd, cxScrollBar, cxVariants, cxDateUtils, - cxTextEdit, cxEditUtils, cxFilterDialog, cxFilterControlDialog, - cxEditDataRegisteredRepositoryItems, cxFilterConsts, - cxGrid, cxGridStrs, cxGridLevel, cxLibraryConsts, dxCore; - -const - RecordIndexNone = -1; - PullFocusingScrollingTimeInterval = 50; - // Copy to text format - EndOfLine = #13#10; - ColumnSeparator = #9; - - FilterButtonsFirstOffset = 4; - FilterButtonsOffset = 4; - FilterTextOffset = 3; - - DragDropTextAreaOffset = 25; - DragDropTextBorderSize = 3; - DragDropTextIndent = DragDropTextBorderSize + cxGridCellTextOffset; - - ScrollTimeInterval = 35; - - FilterMRUItemBaseName = 'FilterMRUItem'; - - DateTimeRelativeFilters = [dtfRelativeDays..dtfPastFuture]; - DateTimeAbsoluteFilters = [dtfMonths, dtfYears]; - - CustomizationPopupCheckListBoxColumnOffset = 10; - CustomizationPopupCheckListBoxScrollZoneWidth = 15; - CustomizationPopupCheckListBoxScrollTimeInterval = 400; - -type - TControlAccess = class(TControl); - TcxControlAccess = class(TcxControl); - TcxCustomGridAccess = class(TcxCustomGrid); - TcxCustomGridViewAccess = class(TcxCustomGridView); - TcxGridLevelAccess = class(TcxGridLevel); - -function cxCustomGridTableControllerCanFocusItem(AOwner: TcxCustomGridTableView; - AItemIndex: Integer; AData: TObject): Boolean; -begin - Result := AOwner.VisibleItems[AItemIndex].CanFocus(TcxCustomGridRecord(AData)); -end; - -function cxCustomGridTableControllerCanFocusRecord( - AOwner: TcxCustomGridTableView; AItemIndex: Integer; - AData: TObject): Boolean; -begin - Result := AOwner.ViewData.Records[AItemIndex].CanFocus; -end; - -function cxCustomGridTableViewGetItem(ACaller: TComponent; - Index: Integer): TComponent; -begin - Result := TcxCustomGridTableView(ACaller).Items[Index]; -end; - -{ TcxGridDataChange } - -procedure TcxGridDataChange.Execute; -begin - with GridView as TcxCustomGridTableView do - begin - RecordCountChanged; - //Controller.MakeFocusedRecordVisible; removed because of group nodes expanding - end; -end; - -function TcxGridDataChange.IsLockable: Boolean; -begin - Result := False; -end; - -{ TcxGridRecordChange } - -constructor TcxGridRecordChange.Create(AGridView: TcxCustomGridView; - ARecord: TcxCustomGridRecord; ARecordIndex: Integer; AItem: TcxCustomGridTableItem = nil); -begin - inherited Create(AGridView); - FRecord := ARecord; - FRecordIndex := ARecordIndex; - FItem := AItem; -end; - -function TcxGridRecordChange.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -function TcxGridRecordChange.GetRecordViewInfo: TcxCustomGridRecordViewInfo; -begin - Result := GridView.ViewInfo.RecordsViewInfo.GetRealItem(FRecord); -end; - -procedure TcxGridRecordChange.Execute; -begin - if (RecordViewInfo = nil) or (FItem <> nil) and not IsItemVisible or - not GridView.Changeable then Exit; - RecordViewInfo.Recalculate; - GridView.ViewChanged(RecordViewInfo.GetBoundsForInvalidate(FItem)); -end; - -function TcxGridRecordChange.IsCompatibleWith(AChange: TcxCustomGridChange): Boolean; -begin - Result := inherited IsCompatibleWith(AChange) or - ((AChange is TcxGridLayoutChange) or (AChange is TcxGridSizeChange) or (AChange is TcxGridDataChange)) and - (TcxCustomGridViewChange(AChange).GridView <> nil) and (TcxCustomGridViewChange(AChange).GridView = GridView); -end; - -function TcxGridRecordChange.IsEqual(AChange: TcxCustomGridChange): Boolean; -begin - Result := inherited IsEqual(AChange) and - (GridRecord = TcxGridRecordChange(AChange).GridRecord) and - (RecordIndex = TcxGridRecordChange(AChange).RecordIndex) and - (Item = TcxGridRecordChange(AChange).Item); -end; - -function TcxGridRecordChange.IsItemVisible: Boolean; -begin - Result := (GridView.IndexOfItem(FItem) <> -1) and FItem.ActuallyVisible; -end; - -{ TcxGridFocusedRecordChange } - -constructor TcxGridFocusedRecordChange.Create(AGridView: TcxCustomGridView; - APrevFocusedRecordIndex, AFocusedRecordIndex: Integer; ANewItemRecordFocusingChanged: Boolean); -begin - inherited Create(AGridView); - FPrevFocusedRecordIndex := APrevFocusedRecordIndex; - FFocusedRecordIndex := AFocusedRecordIndex; - FNewItemRecordFocusingChanged := ANewItemRecordFocusingChanged; -end; - -function TcxGridFocusedRecordChange.CanExecuteWhenLocked: Boolean; -begin - Result := False; -end; - -procedure TcxGridFocusedRecordChange.Execute; -begin - with GridView as TcxCustomGridTableView do - //if Changeable then - should work with Visible = False (to show details) - begin - if DataController.IsGridMode then Controller.UpdateScrollBars; - if (FFocusedRecordIndex <> FPrevFocusedRecordIndex) or FNewItemRecordFocusingChanged then - Controller.MakeFocusedRecordVisible; - if IsRecordHeightDependsOnFocus then - SizeChanged - else - with ViewData do - begin - if IsRecordIndexValid(FPrevFocusedRecordIndex) then - Records[FPrevFocusedRecordIndex].Invalidate; - if IsRecordIndexValid(FFocusedRecordIndex) then - Records[FFocusedRecordIndex].Invalidate; - if FNewItemRecordFocusingChanged and HasNewItemRecord then - NewItemRecord.Invalidate; - end; - Controller.CheckEdit; - Controller.EditingController.UpdateEditValue; - DoFocusedRecordChanged(FPrevFocusedRecordIndex, FFocusedRecordIndex, - FNewItemRecordFocusingChanged); // see 23172 - end; -end; - -{ TcxGridFilterHitTest } - -class function TcxGridFilterHitTest.GetHitTestCode: Integer; -begin - Result := htFilter; -end; - -{ TcxGridFilterCloseButtonHitTest } - -class function TcxGridFilterCloseButtonHitTest.GetHitTestCode: Integer; -begin - Result := htFilterCloseButton; -end; - -{ TcxGridFilterActivateButtonHitTest } - -class function TcxGridFilterActivateButtonHitTest.GetHitTestCode: Integer; -begin - Result := htFilterActivateButton; -end; - -{ TcxGridFilterDropDownButtonHitTest } - -class function TcxGridFilterDropDownButtonHitTest.GetHitTestCode: Integer; -begin - Result := htFilterDropDownButton; -end; - -{ TcxGridFilterCustomizeButtonHitTest } - -class function TcxGridFilterCustomizeButtonHitTest.GetHitTestCode: Integer; -begin - Result := htFilterCustomizeButton; -end; - -{ TcxGridRecordHitTest } - -function TcxGridRecordHitTest.GetGridRecord: TcxCustomGridRecord; -begin - if FViewData = nil then - Result := nil - else - Result := FViewData.GetRecordByKind(FGridRecordKind, FGridRecordIndex); -end; - -procedure TcxGridRecordHitTest.SetGridRecord(Value: TcxCustomGridRecord); -begin - if Value <> nil then - begin - FViewData := Value.ViewData; - FGridRecordIndex := Value.Index; - FGridRecordKind := FViewData.GetRecordKind(Value); - end - else - begin - FViewData := nil; - FGridRecordIndex := -1; - FGridRecordKind := rkNone; - end; -end; - -class function TcxGridRecordHitTest.GetHitTestCode: Integer; -begin - Result := htRecord; -end; - -class function TcxGridRecordHitTest.CanClick: Boolean; -begin - Result := True; -end; - -{ TcxGridRecordCellHitTest } - -class function TcxGridRecordCellHitTest.GetHitTestCode: Integer; -begin - Result := htCell; -end; - -{ TcxGridExpandButtonHitTest } - -class function TcxGridExpandButtonHitTest.GetHitTestCode: Integer; -begin - Result := htExpandButton; -end; - -class function TcxGridExpandButtonHitTest.CanClick: Boolean; -begin - Result := False; -end; - -{ TcxGridDefaultValuesProvider } - -function TcxGridDefaultValuesProvider.IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; -begin - Result := TcxGridItemDataBinding(Owner).IsDisplayFormatDefined(AIsCurrencyValueAccepted); -end; - -{ TcxGridDataController } - -function TcxGridDataController.GetGridViewValue: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(GetGridView); -end; - -procedure TcxGridDataController.ReadData(Stream: TStream); -var - ASize: Integer; -begin - Stream.Read(ASize, SizeOf(ASize)); - if FLoadedData = nil then - FLoadedData := TMemoryStream.Create - else - FLoadedData.Clear; - FLoadedData.CopyFrom(Stream, ASize); - FLoadedData.Position := 0; -end; - -procedure TcxGridDataController.WriteData(Stream: TStream); -var - AStream: TMemoryStream; - ASize: Integer; -begin - AStream := TMemoryStream.Create; - try - SaveToStream(AStream); - ASize := AStream.Size; - Stream.Write(ASize, SizeOf(ASize)); - AStream.SaveToStream(Stream); - finally - AStream.Free; - end; -end; - -procedure TcxGridDataController.AssignData(ADataController: TcxCustomDataController); -var - AStream: TMemoryStream; -begin - AStream := TMemoryStream.Create; - try - ADataController.SaveToStream(AStream); - AStream.Position := 0; - LoadFromStream(AStream); - finally - AStream.Free; - end; -end; - -procedure TcxGridDataController.CreateAllItems(AMissingItemsOnly: Boolean); -begin -end; - -procedure TcxGridDataController.DeleteAllItems; -begin -end; - -procedure TcxGridDataController.GetFakeComponentLinks(AList: TList); -begin -end; - -function TcxGridDataController.GetGridView: TcxCustomGridView; -begin - Result := TcxCustomGridView(GetOwner); -end; - -function TcxGridDataController.HasAllItems: Boolean; -begin - Result := True; -end; - -function TcxGridDataController.IsDataChangeable: Boolean; -begin - Result := True; -end; - -function TcxGridDataController.IsDataLinked: Boolean; -begin - Result := True; -end; - -function TcxGridDataController.SupportsCreateAllItems: Boolean; -begin - Result := False; -end; - -procedure TcxGridDataController.CheckGridModeBufferCount; -begin -end; - -function TcxGridDataController.DoScroll(AForward: Boolean): Boolean; -begin - Result := False; -end; - -function TcxGridDataController.DoScrollPage(AForward: Boolean): Boolean; -begin - Result := False; -end; - -{function TcxGridDataController.GetFilterPropertyValue(const AName: string; - var AValue: Variant): Boolean; -begin - Result := False; -end;} - -function TcxGridDataController.GetItemDataBindingClass: TcxGridItemDataBindingClass; -begin - Result := TcxGridItemDataBinding; -end; - -function TcxGridDataController.GetItemDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; -begin - Result := TcxGridDefaultValuesProvider; -end; - -function TcxGridDataController.GetNavigatorIsBof: Boolean; -begin - Result := GridView.Controller.IsStart; -end; - -function TcxGridDataController.GetNavigatorIsEof: Boolean; -begin - Result := GridView.Controller.IsFinish; -end; - -function TcxGridDataController.GetScrollBarPos: Integer; -begin - Result := -1; -end; - -function TcxGridDataController.GetScrollBarRecordCount: Integer; -begin - Result := -1; -end; - -{function TcxGridDataController.SetFilterPropertyValue(const AName: string; - const AValue: Variant): Boolean; -begin - Result := False; -end;} - -function TcxGridDataController.SetScrollBarPos(Value: Integer): Boolean; -begin - Result := False; -end; - -function TcxGridDataController.CanSelectRow(ARowIndex: Integer): Boolean; -begin - Result := GridView.CanSelectRecord(ARowIndex); -end; - -function TcxGridDataController.CompareByField(ARecordIndex1, ARecordIndex2: Integer; - AField: TcxCustomDataField; AMode: TcxDataControllerComparisonMode): Integer; -begin - if GridView.ViewData.NeedsCustomDataComparison(AField, AMode) then - Result := GridView.ViewData.CustomCompareDataValues(AField, - GetComparedValue(ARecordIndex1, AField), GetComparedValue(ARecordIndex2, AField), AMode) - else - Result := inherited CompareByField(ARecordIndex1, ARecordIndex2, AField, AMode); -end; - -procedure TcxGridDataController.DefineProperties(Filer: TFiler); - - function HasData: Boolean; - var - AAncestor: TcxCustomDataController; - AStream1, AStream2: TMemoryStream; - begin - if Filer.Ancestor = nil then - Result := RecordCount <> 0 - else - begin - AAncestor := Filer.Ancestor as TcxCustomDataController; - AStream1 := TMemoryStream.Create; - AStream2 := TMemoryStream.Create; - try - SaveToStream(AStream1); - AAncestor.SaveToStream(AStream2); - Result := not StreamsEqual(AStream1, AStream2); - finally - AStream2.Free; - AStream1.Free; - end; - end; - end; - -begin - inherited; - if not IsProviderMode then - Filer.DefineBinaryProperty('Data', ReadData, WriteData, HasData); -end; - -procedure TcxGridDataController.DoValueTypeClassChanged(AItemIndex: Integer); -begin - inherited; - GridView.ItemValueTypeClassChanged(AItemIndex); -end; - -procedure TcxGridDataController.FilterChanged; -begin - inherited; - GridView.FilterChanged; -end; - -function TcxGridDataController.GetDefaultActiveRelationIndex: Integer; -begin - Result := GridView.GetDefaultActiveDetailIndex; -end; - -function TcxGridDataController.GetFilterDisplayText(ARecordIndex, AItemIndex: Integer): string; -begin - if GridView.ViewData.HasCustomDataHandling(Fields[AItemIndex], doFiltering) then - Result := GridView.ViewData.GetCustomDataDisplayText(ARecordIndex, AItemIndex, doFiltering) - else - Result := inherited GetFilterDisplayText(ARecordIndex, AItemIndex); -end; - -{function TcxGridDataController.GetIncrementalSearchText(ARecordIndex, AItemIndex: Integer): string; -begin - if not GridView.GetDisplayText(ARecordIndex, AItemIndex, Result) then - Result := inherited GetIncrementalSearchText(ARecordIndex, AItemIndex); -end;} - -function TcxGridDataController.GetItemID(AItem: TObject): Integer; -begin - if AItem is TcxCustomGridTableItem then - Result := TcxCustomGridTableItem(AItem).ID - else - Result := -1; -end; - -function TcxGridDataController.GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; -begin - Result := GridView.ViewData.GetSortingBySummaryEngineClass; -end; - -function TcxGridDataController.GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; -begin - Result := GridView.GetSummaryGroupItemLinkClass; - if Result = nil then - Result := inherited GetSummaryGroupItemLinkClass; -end; - -function TcxGridDataController.GetSummaryItemClass: TcxDataSummaryItemClass; -begin - Result := GridView.GetSummaryItemClass; - if Result = nil then - Result := inherited GetSummaryItemClass; -end; - -procedure TcxGridDataController.BeginFullUpdate; -begin - GridView.BeginUpdate; - inherited; -end; - -procedure TcxGridDataController.EndFullUpdate; -begin - inherited; - GridView.EndUpdate; -end; - -function TcxGridDataController.CreateDetailLinkObject(ARelation: TcxCustomDataRelation; - ARecordIndex: Integer): TObject; -begin - Result := TcxGridLevelAccess(ARelation.Item).CreateLinkObject(ARelation, ARecordIndex); -end; - -procedure TcxGridDataController.FocusControl(AItemIndex: Integer; var Done: Boolean); -begin - inherited; - GridView.FocusEdit(AItemIndex, Done); -end; - -function TcxGridDataController.GetDetailDataControllerByLinkObject(ALinkObject: TObject): TcxCustomDataController; -begin - Result := TcxCustomGridView(ALinkObject).DataController; -end; - -function TcxGridDataController.GetDisplayText(ARecordIndex, AItemIndex: Integer): string; -begin - if not GridView.ViewData.GetDisplayText(ARecordIndex, AItemIndex, Result) then - Result := inherited GetDisplayText(ARecordIndex, AItemIndex); - GridView.Items[AItemIndex].DoGetDataText(ARecordIndex, Result); -end; - -function TcxGridDataController.GetFilterDataValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; -begin - Result := inherited GetFilterDataValue(ARecordIndex, AField); - if GridView.ViewData.HasCustomDataHandling(AField, doFiltering) then - Result := GridView.ViewData.GetCustomDataValue(AField, Result, doFiltering); -end; - -function TcxGridDataController.GetFilterItemFieldCaption(AItem: TObject): string; -begin - Result := TcxCustomGridTableItem(AItem).FilterCaption; -end; - -function TcxGridDataController.GetItem(Index: Integer): TObject; -begin - Result := GridView.Items[Index]; -end; - -function TcxGridDataController.GetItemSortByDisplayText(AItemIndex: Integer; - ASortByDisplayText: Boolean): Boolean; -begin - Result := GridView.GetItemSortByDisplayText(AItemIndex, ASortByDisplayText); -end; - -function TcxGridDataController.GetItemValueSource(AItemIndex: Integer): TcxDataEditValueSource; -begin - Result := GridView.GetItemValueSource(AItemIndex); -end; - -procedure TcxGridDataController.Loaded; -begin - inherited; - if FLoadedData <> nil then - try - if not IsProviderMode then - LoadFromStream(FLoadedData); - finally - FreeAndNil(FLoadedData); - end; -end; - -procedure TcxGridDataController.UpdateData; -begin - inherited; - GridView.UpdateRecord; -end; - -{ TcxGridFilterValueList } - -procedure TcxGridFilterValueList.AddDateTimeAbsoluteFilters(ADateRange: TcxCustomGridDateRange; - AIgnoreTime: Boolean); -var - I: Integer; - ADateTime: TDateTime; - ADateRangeValue: Variant; -begin - I := GetStartValueIndex; - while I < Count do - begin - ADateTime := Items[I].Value; - if ADateRange.Contains(ADateTime) then - begin - ADateRangeValue := ADateRange.GetRangeValue(ADateTime, AIgnoreTime); - if FindItemByKind(fviSpecial, ADateRangeValue) = -1 then - begin - Add(fviSpecial, ADateRangeValue, ADateRange.GetDisplayText(ADateTime), True); - Inc(I); - end; - end; - Inc(I); - end; -end; - -procedure TcxGridFilterValueList.AddDateTimeAbsoluteFilters(AItem: TcxCustomGridTableItem); -var - I: Integer; -begin - AItem.InitFilteringDateRanges; - for I := 0 to AItem.FilteringDateRanges.Count - 1 do - AddDateTimeAbsoluteFilters(AItem.FilteringDateRanges[I], AItem.CanIgnoreTimeForFiltering); -end; - -procedure TcxGridFilterValueList.AddDateTimeRelativeFilters(AItem: TcxCustomGridTableItem); -var - AFilters: TcxGridDateTimeFilters; - AFilter: TcxGridDateTimeFilter; -begin - AFilters := AItem.GetDateTimeFilters; - for AFilter := Low(AFilter) to High(AFilter) do - if AFilter in AFilters then - case AFilter of - dtfRelativeDays: - begin - Add(fviSpecial, foYesterday, cxGetResourceString(@scxGridYesterday), True); - Add(fviSpecial, foToday, cxGetResourceString(@scxGridToday), True); - Add(fviSpecial, foTomorrow, cxGetResourceString(@scxGridTomorrow), True); - end; - dtfRelativeDayPeriods: - begin - Add(fviSpecial, foLast30Days, cxGetResourceString(@scxGridLast30Days), True); - Add(fviSpecial, foLast14Days, cxGetResourceString(@scxGridLast14Days), True); - Add(fviSpecial, foLast7Days, cxGetResourceString(@scxGridLast7Days), True); - Add(fviSpecial, foNext7Days, cxGetResourceString(@scxGridNext7Days), True); - Add(fviSpecial, foNext14Days, cxGetResourceString(@scxGridNext14Days), True); - Add(fviSpecial, foNext30Days, cxGetResourceString(@scxGridNext30Days), True); - end; - dtfRelativeWeeks: - begin - Add(fviSpecial, foLastTwoWeeks, cxGetResourceString(@scxGridLastTwoWeeks), True); - Add(fviSpecial, foLastWeek, cxGetResourceString(@scxGridLastWeek), True); - Add(fviSpecial, foThisWeek, cxGetResourceString(@scxGridThisWeek), True); - Add(fviSpecial, foNextWeek, cxGetResourceString(@scxGridNextWeek), True); - Add(fviSpecial, foNextTwoWeeks, cxGetResourceString(@scxGridNextTwoWeeks), True); - end; - dtfRelativeMonths: - begin - Add(fviSpecial, foLastMonth, cxGetResourceString(@scxGridLastMonth), True); - Add(fviSpecial, foThisMonth, cxGetResourceString(@scxGridThisMonth), True); - Add(fviSpecial, foNextMonth, cxGetResourceString(@scxGridNextMonth), True); - end; - dtfRelativeYears: - begin - Add(fviSpecial, foLastYear, cxGetResourceString(@scxGridLastYear), True); - Add(fviSpecial, foThisYear, cxGetResourceString(@scxGridThisYear), True); - Add(fviSpecial, foNextYear, cxGetResourceString(@scxGridNextYear), True); - end; - dtfPastFuture: - begin - Add(fviSpecial, foInPast, cxGetResourceString(@scxGridPast), True); - Add(fviSpecial, foInFuture, cxGetResourceString(@scxGridFuture), True); - end; - end; - (* !!! - if dtfRelativeDay in AFilterItems then - begin - Add(fviSpecial, foYesterday, cxGetResourceString(@scxGridYesterday), True); - Add(fviSpecial, foToday, cxGetResourceString(@scxGridToday), True); - Add(fviSpecial, foTomorrow, cxGetResourceString(@scxGridTomorrow), True); - end; - if dtfRelativeWeek in AFilterItems then - Add(fviSpecial, foLastWeek, cxGetResourceString(@scxGridLastWeek), True); - if dtfRelativeMonth in AFilterItems then - Add(fviSpecial, foLastMonth, cxGetResourceString(@scxGridLastMonth), True); - if dtfRelativeYear in AFilterItems then - Add(fviSpecial, foLastYear, cxGetResourceString(@scxGridLastYear), True); - if dtfRelativeWeek in AFilterItems then - Add(fviSpecial, foThisWeek, cxGetResourceString(@scxGridThisWeek), True); - if dtfRelativeMonth in AFilterItems then - Add(fviSpecial, foThisMonth, cxGetResourceString(@scxGridThisMonth), True); - if dtfRelativeYear in AFilterItems then - Add(fviSpecial, foThisYear, cxGetResourceString(@scxGridThisYear), True); - if dtfRelativeWeek in AFilterItems then - Add(fviSpecial, foNextWeek, cxGetResourceString(@scxGridNextWeek), True); - if dtfRelativeMonth in AFilterItems then - Add(fviSpecial, foNextMonth, cxGetResourceString(@scxGridNextMonth), True); - if dtfRelativeYear in AFilterItems then - Add(fviSpecial, foNextYear, cxGetResourceString(@scxGridNextYear), True); - *) - Add(fviMRUSeparator, Null, '', True); -end; - -function TcxGridFilterValueList.SupportedSpecialOperatorKinds: TcxFilterOperatorKinds; -begin - Result := [foYesterday..foInFuture]; -end; - -procedure TcxGridFilterValueList.ApplyFilter(AItem: TcxCustomGridTableItem; AIndex: Integer; - AFilterList: TcxFilterCriteriaItemList; AReplaceExistent, AAddToMRUItemsList: Boolean); - - function GetVarArrayDisplayText(const AValue: Variant): string; - begin - Result := - AItem.GetProperties.GetDisplayText(AValue[0], True, False) + ';' + - AItem.GetProperties.GetDisplayText(AValue[1], True, False); - end; - -var - AListItem: PcxFilterValueItem; -begin - AItem.DataBinding.Filter.BeginUpdate; - try - AListItem := Items[AIndex]; - case AListItem.Kind of - fviAll: - AItem.Filtered := False; - fviCustom: - AItem.GridView.Filtering.RunCustomizeDialog(AItem); - fviBlanks: - AItem.DataBinding.AddToFilter(AFilterList, foEqual, AListItem.Value, - cxGetResourceString(@cxSFilterBlankCaption), AReplaceExistent); - fviNonBlanks: - AItem.DataBinding.AddToFilter(AFilterList, foNotEqual, AListItem.Value, - cxGetResourceString(@cxSFilterBlankCaption), AReplaceExistent); - fviUser: - AItem.DoUserFiltering(AListItem.Value, AListItem.DisplayText); - fviValue, fviMRU: - begin - AItem.DataBinding.AddToFilter(AFilterList, foEqual, AListItem.Value, - AListItem.DisplayText, AReplaceExistent); - if AAddToMRUItemsList then - AItem.DataBinding.FilterMRUValueItems.Add(AListItem.Value, AListItem.DisplayText); - end; - fviSpecial: - if VarIsArray(AListItem.Value) then - AItem.DataBinding.AddToFilter(AFilterList, foBetween, AListItem.Value, - GetVarArrayDisplayText(AListItem.Value), AReplaceExistent) - else - if TcxFilterOperatorKind(AListItem.Value) in SupportedSpecialOperatorKinds then - AItem.DataBinding.AddToFilter(AFilterList, TcxFilterOperatorKind(AListItem.Value), - Null, '', AReplaceExistent); - end; - if not (AListItem.Kind in [fviAll, fviCustom]) then - AItem.DataBinding.Filter.Active := True; - finally - AItem.DataBinding.Filter.EndUpdate; - end; -end; - -function TcxGridFilterValueList.GetIndexByCriteriaItem(ACriteriaItem: TcxFilterCriteriaItem): Integer; -begin - Result := -1; - if ACriteriaItem <> nil then - if ACriteriaItem.OperatorKind in SupportedSpecialOperatorKinds then - Result := FindItemByKind(fviSpecial, ACriteriaItem.OperatorKind) - else - if ACriteriaItem.OperatorKind = foBetween then - Result := FindItemByKind(fviSpecial, ACriteriaItem.Value); - if Result = -1 then - Result := inherited GetIndexByCriteriaItem(ACriteriaItem); -end; - -procedure TcxGridFilterValueList.Load(AItem: TcxCustomGridTableItem; - AInitSortByDisplayText, AUseFilteredValues: Boolean); -begin - inherited Load(AItem.Index, AInitSortByDisplayText, AUseFilteredValues); - if AItem.SupportsDateTimeFilters(True) then - AddDateTimeRelativeFilters(AItem); - if AItem.SupportsDateTimeFilters(False) then - AddDateTimeAbsoluteFilters(AItem); -end; - -{ TcxGridFilterMRUValueItem } - -constructor TcxGridFilterMRUValueItem.Create(const AValue: Variant; const ADisplayText: string); -begin - inherited Create; - Value := AValue; - DisplayText := ADisplayText; -end; - -function TcxGridFilterMRUValueItem.Equals(AItem: TcxMRUItem): Boolean; -begin - Result := VarCompare(Value, TcxGridFilterMRUValueItem(AItem).Value) = 0; -end; - -{ TcxGridFilterMRUValueItems } - -function TcxGridFilterMRUValueItems.GetItem(Index: Integer): TcxGridFilterMRUValueItem; -begin - Result := TcxGridFilterMRUValueItem(inherited Items[Index]); -end; - -procedure TcxGridFilterMRUValueItems.Add(const AValue: Variant; const ADisplayText: string); -begin - inherited Add(TcxGridFilterMRUValueItem.Create(AValue, ADisplayText)); -end; - -procedure TcxGridFilterMRUValueItems.AddItemsTo(AValueList: TcxGridFilterValueList); -var - I: Integer; -begin - for I := 0 to Count - 1 do - with Items[I] do - AValueList.Add(fviMRU, Value, DisplayText, True); -end; - -{ TcxGridItemDataBinding } - -constructor TcxGridItemDataBinding.Create(AItem: TcxCustomGridTableItem); -begin - inherited Create; - FItem := AItem; - FDefaultValuesProvider := GetDefaultValuesProviderClass.Create(Self); - FFilterMRUValueItems := GetFilterMRUValueItemsClass.Create; - FFilterMRUValueItems.MaxCount := GridView.Filtering.ItemMRUItemsListCount; -end; - -destructor TcxGridItemDataBinding.Destroy; -begin - FFilterMRUValueItems.Free; - FDefaultValuesProvider.Free; - inherited; -end; - -function TcxGridItemDataBinding.GetDataController: TcxCustomDataController; -begin - Result := GridView.DataController; -end; - -function TcxGridItemDataBinding.GetFilter: TcxDataFilterCriteria; -begin - Result := DataController.Filter; -end; - -function TcxGridItemDataBinding.GetFilterCriteriaItem: TcxFilterCriteriaItem; -begin - Result := Filter.FindItemByItemLink(FItem); -end; - -function TcxGridItemDataBinding.GetFiltered: Boolean; -begin - Result := FilterCriteriaItem <> nil; -end; - -function TcxGridItemDataBinding.GetGridView: TcxCustomGridTableView; -begin - Result := FItem.GridView; -end; - -function TcxGridItemDataBinding.GetValueType: string; -begin - if ValueTypeClass = nil then - Result := '' - else - Result := ValueTypeClass.Caption; -end; - -function TcxGridItemDataBinding.GetValueTypeClass: TcxValueTypeClass; -begin - Result := DataController.GetItemValueTypeClass(FItem.Index); -end; - -procedure TcxGridItemDataBinding.SetData(Value: TObject); -begin - if FData <> Value then - begin - FData := Value; - FItem.Changed(ticProperty); - end; -end; - -procedure TcxGridItemDataBinding.SetFiltered(Value: Boolean); -begin - if Filtered <> Value then - if not Value then - Filter.RemoveItemByItemLink(FItem); -end; - -procedure TcxGridItemDataBinding.SetValueType(const Value: string); -begin - if ValueType <> Value then - ValueTypeClass := cxValueTypeClassList.ItemByCaption(Value); -end; - -procedure TcxGridItemDataBinding.SetValueTypeClass(Value: TcxValueTypeClass); -begin - DataController.ChangeValueTypeClass(FItem.Index, Value); -end; - -function TcxGridItemDataBinding.GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; -var - AIcxGridDataController: IcxGridDataController; -begin - if Supports(TObject(DataController), IcxGridDataController, AIcxGridDataController) then - Result := AIcxGridDataController.GetItemDefaultValuesProviderClass - else - Result := nil; -end; - -function TcxGridItemDataBinding.GetDefaultValueTypeClass: TcxValueTypeClass; -begin - Result := TcxStringValueType; -end; - -function TcxGridItemDataBinding.GetFilterFieldName: string; -begin - Result := ''; -end; - -function TcxGridItemDataBinding.GetFilterMRUValueItemsClass: TcxGridFilterMRUValueItemsClass; -begin - Result := TcxGridFilterMRUValueItems; -end; - -procedure TcxGridItemDataBinding.Init; -begin -end; - -function TcxGridItemDataBinding.IsValueTypeStored: Boolean; -begin - Result := ValueTypeClass <> GetDefaultValueTypeClass; -end; - -procedure TcxGridItemDataBinding.Assign(Source: TPersistent); -begin - if Source is TcxGridItemDataBinding then - with TcxGridItemDataBinding(Source) do - begin - Self.Data := Data; - Self.ValueTypeClass := ValueTypeClass; - end - else - inherited; -end; - -function TcxGridItemDataBinding.DefaultCaption: string; -begin - Result := ''{Item.Name}; -end; - -function TcxGridItemDataBinding.DefaultRepositoryItem: TcxEditRepositoryItem; -begin - Result := GetDefaultEditDataRepositoryItems.GetItem(ValueTypeClass); -end; - -function TcxGridItemDataBinding.DefaultWidth(ATakeHeaderIntoAccount: Boolean = True): Integer; -begin - Result := 64; -end; - -function TcxGridItemDataBinding.GetDefaultValuesProvider(AProperties: TcxCustomEditProperties = nil): IcxEditDefaultValuesProvider; -begin - Result := FDefaultValuesProvider; -end; - -function TcxGridItemDataBinding.IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; -begin - Result := - DataController.IsDisplayFormatDefined(FItem.Index, not AIsCurrencyValueAccepted) or - FItem.HasDataTextHandler; -end; - -function TcxGridItemDataBinding.AddToFilter(AParent: TcxFilterCriteriaItemList; - AOperatorKind: TcxFilterOperatorKind; const AValue: Variant; const ADisplayText: string; - AReplaceExistent: Boolean): TcxFilterCriteriaItem; -begin - Result := GridView.ViewData.AddItemToFilter(AParent, FItem, AOperatorKind, - AValue, ADisplayText, AReplaceExistent); -end; - -procedure TcxGridItemDataBinding.GetFilterDisplayText(const AValue: Variant; - var ADisplayText: string); -begin - FItem.GetFilterDisplayText(AValue, ADisplayText); -end; - -procedure TcxGridItemDataBinding.GetFilterStrings(AStrings: TStrings; - AValueList: TcxGridFilterValueList); -var - I: Integer; - S: string; -begin - GetFilterValues(AValueList, False, True, True); - AStrings.BeginUpdate; - try - AStrings.Clear; - for I := 0 to AValueList.Count - 1 do - begin - S := AValueList[I].DisplayText; - GetFilterDisplayText(AValueList[I].Value, S); - AStrings.AddObject(S, TObject(AValueList[I])); - end; - finally - AStrings.EndUpdate; - end; -end; - -procedure TcxGridItemDataBinding.GetFilterValues(AValueList: TcxGridFilterValueList; - AValuesOnly: Boolean = True; AInitSortByDisplayText: Boolean = False; - ACanUseFilteredValues: Boolean = False); -var - I: Integer; -begin - AValueList.Load(FItem, AInitSortByDisplayText, - ACanUseFilteredValues and FItem.UseFilteredValuesForFilterValueList); - FItem.DoGetFilterValues(AValueList); - if AValuesOnly then - for I := AValueList.Count - 1 downto 0 do - if AValueList[I].Kind <> fviValue then - AValueList.Delete(I) - else - else - if FItem.CanFilterMRUValueItems then - FFilterMRUValueItems.AddItemsTo(AValueList); -end; - -procedure TcxGridItemDataBinding.GetFilterActiveValueIndexes(AValueList: TcxGridFilterValueList; - var AIndexes: TcxGridIndexes); - - procedure CheckFilterItem(AFilterItem: TcxFilterCriteriaItem); - var - AValueIndex: Integer; - begin - if AFilterItem.ItemLink <> FItem then Exit; - AValueIndex := AValueList.GetIndexByCriteriaItem(AFilterItem); - if (AValueIndex <> -1) and (AValueList[AValueIndex].Kind <> fviCustom) then - begin - SetLength(AIndexes, Length(AIndexes) + 1); - AIndexes[Length(AIndexes) - 1] := AValueIndex; - end; - end; - -var - AFilterItem: TcxFilterCriteriaItem; - AFilterList: TcxFilterCriteriaItemList; - I: Integer; -begin - AIndexes := nil; - AFilterItem := FilterCriteriaItem; - if AFilterItem = nil then Exit; - AFilterList := AFilterItem.Parent; - case AFilterList.BoolOperatorKind of - fboOr: - for I := 0 to AFilterList.Count - 1 do - if AFilterList[I] is TcxFilterCriteriaItem then - CheckFilterItem(TcxFilterCriteriaItem(AFilterList[I])); - fboAnd: - CheckFilterItem(AFilterItem); - end; -end; - -procedure TcxGridItemDataBinding.SetFilterActiveValueIndexes(AValueList: TcxGridFilterValueList; - const AIndexes: TcxGridIndexes); - - function GetFilterList: TcxFilterCriteriaItemList; - begin - if (Filter.Root.BoolOperatorKind = fboOr) or - (Filter.Root.BoolOperatorKind = fboAnd) and (Length(AIndexes) = 1) then - Result := Filter.Root - else - Result := Filter.Root.AddItemList(fboOr); - end; - -var - AFilterList: TcxFilterCriteriaItemList; - I: Integer; -begin - Filter.BeginUpdate; - try - Filter.RemoveItemByItemLink(FItem); - if Length(AIndexes) <> 0 then - begin - AFilterList := GetFilterList; - for I := 0 to Length(AIndexes) - 1 do - AValueList.ApplyFilter(Item, AIndexes[I], AFilterList, False, False); - end; - finally - Filter.EndUpdate; - end; -end; - -{ TcxCustomGridDateRange } - -destructor TcxCustomGridDateRange.Destroy; -begin - if FContainer <> nil then - FContainer.RemoveItem(Self); - inherited; -end; - -function TcxCustomGridDateRange.GetIndex: Integer; -begin - if FContainer = nil then - Result := -1 - else - Result := FContainer.GetItemIndex(Self); -end; - -procedure TcxCustomGridDateRange.SetIndex(Value: Integer); -begin - if FContainer <> nil then - FContainer.SetItemIndex(Self, Value); -end; - -function TcxCustomGridDateRange.GetRangeValue(const ADate: TDateTime; AIgnoreTime: Boolean): Variant; -begin - Result := GetValue(ADate); -end; - -function TcxCustomGridDateRange.GetSortingValue(const ADate: TDateTime): Variant; -begin - if NeedsSortingByTime then - Result := TimeOf(ADate) - else - Result := GetValue(ADate); -end; - -function TcxCustomGridDateRange.NeedsSortingByTime: Boolean; -begin - Result := False; -end; - -function TcxCustomGridDateRange.NeedsTime: Boolean; -begin - Result := NeedsSortingByTime; -end; - -{ TcxGridHourRange } - -function TcxGridHourRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := True; -end; - -function TcxGridHourRange.GetDisplayText(const ADate: TDateTime): string; -begin - if Container.DateTimeHandling.GetHourFormat = '' then - Result := '' - else - Result := FormatDateTime(Container.DateTimeHandling.GetHourFormat, GetValue(ADate)); -end; - -function TcxGridHourRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := EncodeTime(HourOf(ADate), 0, 0, 0); -end; - -function TcxGridHourRange.NeedsSortingByTime: Boolean; -begin - Result := True; -end; - -{ TcxGridDayRange } - -function TcxGridDayRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := True; -end; - -function TcxGridDayRange.GetDisplayText(const ADate: TDateTime): string; -begin - if Container.DateTimeHandling.GetDateFormat = '' then - Result := '' - else - Result := FormatDateTime(Container.DateTimeHandling.GetDateFormat, ADate); -end; - -function TcxGridDayRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := ADate; -end; - -{ TcxGridMonthRange } - -function TcxGridMonthRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := True; -end; - -function TcxGridMonthRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := FormatDateTime(Container.DateTimeHandling.GetMonthFormat, ADate); -end; - -function TcxGridMonthRange.GetRangeValue(const ADate: TDateTime; AIgnoreTime: Boolean): Variant; -begin - Result := VarBetweenArrayCreate(GetStartDateOfMonth(ADate), GetEndDateOfMonth(ADate, AIgnoreTime)); -end; - -function TcxGridMonthRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := GetStartDateOfMonth(ADate); -end; - -{ TcxGridYearRange } - -function TcxGridYearRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := True; -end; - -function TcxGridYearRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := FormatDateTime(Container.DateTimeHandling.GetYearFormat, ADate); -end; - -function TcxGridYearRange.GetRangeValue(const ADate: TDateTime; AIgnoreTime: Boolean): Variant; -begin - Result := VarBetweenArrayCreate(GetStartDateOfYear(ADate), GetEndDateOfYear(ADate, AIgnoreTime)); -end; - -function TcxGridYearRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := GetStartDateOfYear(ADate); -end; - -{ TcxGridYesterdayRange } - -function TcxGridYesterdayRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := ADate = Container.Today - 1; -end; - -function TcxGridYesterdayRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridYesterday); -end; - -function TcxGridYesterdayRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := ADate; -end; - -{ TcxGridTodayRange } - -function TcxGridTodayRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := ADate = Container.Today; -end; - -function TcxGridTodayRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridToday); -end; - -function TcxGridTodayRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := ADate; -end; - -{ TcxGridTomorrowRange } - -function TcxGridTomorrowRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := ADate = Container.Today + 1; -end; - -function TcxGridTomorrowRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridTomorrow); -end; - -function TcxGridTomorrowRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := ADate; -end; - -{ TcxGridLastWeekRange } - -function TcxGridLastWeekRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := GetStartDateOfWeek(ADate) = Container.StartOfThisWeek - 7; -end; - -function TcxGridLastWeekRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridLastWeek); -end; - -function TcxGridLastWeekRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := GetStartDateOfWeek(ADate) + 0.1; -end; - -{ TcxGridThisWeekRange } - -function TcxGridThisWeekRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := GetStartDateOfWeek(ADate) = Container.StartOfThisWeek; -end; - -function TcxGridThisWeekRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridThisWeek); -end; - -function TcxGridThisWeekRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := GetStartDateOfWeek(ADate) + 0.1; -end; - -{ TcxGridNextWeekRange } - -function TcxGridNextWeekRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := GetStartDateOfWeek(ADate) = Container.StartOfThisWeek + 7; -end; - -function TcxGridNextWeekRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridNextWeek); -end; - -function TcxGridNextWeekRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := GetStartDateOfWeek(ADate) + 0.1; -end; - -{ TcxGridLastMonthRange } - -function TcxGridLastMonthRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := GetMonthNumber(ADate) = Container.ThisMonthNumber - 1; -end; - -function TcxGridLastMonthRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridLastMonth); -end; - -function TcxGridLastMonthRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := GetStartDateOfMonth(ADate) + 0.2; -end; - -{ TcxGridThisMonthRange } - -function TcxGridThisMonthRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := GetMonthNumber(ADate) = Container.ThisMonthNumber; -end; - -function TcxGridThisMonthRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridThisMonth); -end; - -function TcxGridThisMonthRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := GetStartDateOfMonth(ADate) + 0.2; -end; - -{ TcxGridNextMonthRange } - -function TcxGridNextMonthRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := GetMonthNumber(ADate) = Container.ThisMonthNumber + 1; -end; - -function TcxGridNextMonthRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridNextMonth); -end; - -function TcxGridNextMonthRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := GetStartDateOfMonth(ADate) + 0.2; -end; - -{ TcxGridLastYearRange } - -function TcxGridLastYearRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := GetDateElement(ADate, deYear) = Container.ThisYear - 1; -end; - -function TcxGridLastYearRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridLastYear); -end; - -function TcxGridLastYearRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := GetStartDateOfYear(ADate) + 0.3; -end; - -{ TcxGridThisYearRange } - -function TcxGridThisYearRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := GetDateElement(ADate, deYear) = Container.ThisYear; -end; - -function TcxGridThisYearRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridThisYear); -end; - -function TcxGridThisYearRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := GetStartDateOfYear(ADate) + 0.3; -end; - -{ TcxGridNextYearRange } - -function TcxGridNextYearRange.Contains(const ADate: TDateTime): Boolean; -begin - Result := GetDateElement(ADate, deYear) = Container.ThisYear + 1; -end; - -function TcxGridNextYearRange.GetDisplayText(const ADate: TDateTime): string; -begin - Result := cxGetResourceString(@scxGridNextYear); -end; - -function TcxGridNextYearRange.GetValue(const ADate: TDateTime): Variant; -begin - Result := GetStartDateOfYear(ADate) + 0.3; -end; - -{ TcxGridDateRanges } - -constructor TcxGridDateRanges.Create; -begin - inherited Create; - FItems := TList.Create; -end; - -destructor TcxGridDateRanges.Destroy; -begin - Clear; - FItems.Free; - inherited; -end; - -function TcxGridDateRanges.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridDateRanges.GetItem(Index: Integer): TcxCustomGridDateRange; -begin - Result := TcxCustomGridDateRange(FItems[Index]); -end; - -procedure TcxGridDateRanges.AddItem(AItem: TcxCustomGridDateRange); -begin - AItem.FContainer := Self; - FItems.Add(AItem); -end; - -procedure TcxGridDateRanges.RemoveItem(AItem: TcxCustomGridDateRange); -begin - FItems.Remove(AItem); - AItem.FContainer := nil; -end; - -function TcxGridDateRanges.GetItemIndex(AItem: TcxCustomGridDateRange): Integer; -begin - Result := FItems.IndexOf(AItem); -end; - -procedure TcxGridDateRanges.SetItemIndex(AItem: TcxCustomGridDateRange; AValue: Integer); -begin - FItems.Move(GetItemIndex(AItem), AValue); -end; - -procedure TcxGridDateRanges.InitConsts; -begin - FToday := Date; - FStartOfThisWeek := GetStartDateOfWeek(Today); - DecodeDate(Today, FThisYear, FThisMonth, FThisDay); - FThisMonthNumber := GetMonthNumber(Today); -end; - -procedure TcxGridDateRanges.Add(ARange: TcxCustomGridDateRange); -begin - AddItem(ARange); -end; - -procedure TcxGridDateRanges.Add(ARangeClass: TcxCustomGridDateRangeClass); -begin - Add(ARangeClass.Create); -end; - -procedure TcxGridDateRanges.Clear; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Items[I].Free; -end; - -function TcxGridDateRanges.GetRange(const ADate: TDateTime): TcxCustomGridDateRange; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.Contains(ADate) then Exit; - end; - Result := nil; -end; - -function TcxGridDateRanges.GetRange(ARangeClass: TcxCustomGridDateRangeClass): TcxCustomGridDateRange; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result is ARangeClass then Exit; - end; - Result := nil; -end; - -procedure TcxGridDateRanges.Init(ADateTimeHandling: TcxCustomGridTableDateTimeHandling); -begin - FDateTimeHandling := ADateTimeHandling; - InitConsts; - Clear; -end; - -function TcxGridDateRanges.IsEmpty: Boolean; -begin - Result := Count = 0; -end; - -function TcxGridDateRanges.NeedSortingByTime: Boolean; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I].NeedsSortingByTime; - if Result then Exit; - end; - Result := False; -end; - -function TcxGridDateRanges.NeedTime: Boolean; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I].NeedsTime; - if Result then Exit; - end; - Result := False; -end; - -{ TcxGridFilteringDateRanges } - -procedure TcxGridFilteringDateRanges.Init(ADateTimeHandling: TcxCustomGridTableDateTimeHandling; - ADateTimeFilters: TcxGridDateTimeFilters); -begin - inherited Init(ADateTimeHandling); - if dtfYears in ADateTimeFilters then - Add(TcxGridYearRange); - if dtfMonths in ADateTimeFilters then - Add(TcxGridMonthRange); -end; - -{ TcxGridGroupingDateRanges } - -procedure TcxGridGroupingDateRanges.Init(ADateTimeHandling: TcxCustomGridTableDateTimeHandling; - ADateTimeGrouping: TcxGridDateTimeGrouping); -begin - inherited Init(ADateTimeHandling); - case ADateTimeGrouping of - dtgRelativeToToday: - begin - Add(TcxGridYesterdayRange); - Add(TcxGridTodayRange); - Add(TcxGridTomorrowRange); - - Add(TcxGridLastWeekRange); - Add(TcxGridThisWeekRange); - Add(TcxGridNextWeekRange); - - Add(TcxGridLastMonthRange); - Add(TcxGridThisMonthRange); - Add(TcxGridNextMonthRange); - - Add(TcxGridLastYearRange); - Add(TcxGridThisYearRange); - Add(TcxGridNextYearRange); - end; - dtgByHour: - Add(TcxGridHourRange); - dtgByDate: - Add(TcxGridDayRange); - dtgByMonth: - Add(TcxGridMonthRange); - dtgByYear: - Add(TcxGridYearRange); - end; -end; - -{ TcxCustomGridRecord } - -constructor TcxCustomGridRecord.Create(AViewData: TcxCustomGridTableViewData; - AIndex: Integer; const ARecordInfo: TcxRowInfo); -begin - inherited Create; - FViewData := AViewData; - FIndex := AIndex; - RecordInfo := ARecordInfo; -end; - -destructor TcxCustomGridRecord.Destroy; -begin - //GridView.DoRecordDestroying(Self); - if FViewInfo <> nil then - FViewInfo.FRecord := nil; - inherited; -end; - -function TcxCustomGridRecord.GetController: TcxCustomGridTableController; -begin - Result := GridView.Controller; -end; - -function TcxCustomGridRecord.GetDataController: TcxCustomDataController; -begin - Result := FViewData.DataController; -end; - -function TcxCustomGridRecord.GetDragHighlighted: Boolean; -begin - Result := FViewData.Controller.DragHighlightedRecord = Self; -end; - -function TcxCustomGridRecord.GetFocused: Boolean; -begin - Result := FViewData.Controller.FocusedRecord = Self; -end; - -function TcxCustomGridRecord.GetGridView: TcxCustomGridTableView; -begin - Result := FViewData.GridView; -end; - -function TcxCustomGridRecord.GetIsEditing: Boolean; -begin - Result := FViewData.EditingRecord = Self; -end; - -function TcxCustomGridRecord.GetIsNewItemRecord: Boolean; -begin - Result := FViewData.NewItemRecord = Self; -end; - -function TcxCustomGridRecord.GetIsValid: Boolean; -begin - Result := (0 <= RecordIndex) and (RecordIndex < ViewData.DataController.RecordCount); -end; - -function TcxCustomGridRecord.GetLastParentRecordCount: Integer; -begin - if Level = 0 then - Result := 0 - else - for Result := 0 to Level - 1 do - if not IsParentRecordLast[Result] then Break; -end; - -function TcxCustomGridRecord.GetLevel: Integer; -begin - Result := RecordInfo.Level; -end; - -function TcxCustomGridRecord.GetPartVisible: Boolean; -begin - Result := FViewInfo <> nil; -end; - -function TcxCustomGridRecord.GetRecordIndex: Integer; -begin - Result := RecordInfo.RecordIndex; -end; - -procedure TcxCustomGridRecord.SetExpanded(Value: Boolean); -begin - if Expanded <> Value then - if Value then - Expand(False) - else - Collapse(False); -end; - -procedure TcxCustomGridRecord.SetFocused(Value: Boolean); -begin - if Value then - FViewData.Controller.FocusedRecord := Self - else - if Focused then - FViewData.Controller.FocusedRecord := nil; -end; - -procedure TcxCustomGridRecord.RefreshRecordInfo; -begin - if IsNewItemRecord then - with RecordInfo do - begin - Expanded := False; - Level := 0; - RecordIndex := DataController.NewItemRecordIndex; - end - else - RecordInfo := DataController.GetRowInfo(FIndex); -end; - -procedure TcxCustomGridRecord.DoCollapse(ARecurse: Boolean); -begin -end; - -procedure TcxCustomGridRecord.DoExpand(ARecurse: Boolean); -begin -end; - -{function TcxCustomGridRecord.GetDestroyingOnExpanding: Boolean; -begin - Result := False; -end;} - -function TcxCustomGridRecord.GetExpandable: Boolean; -begin - Result := False; -end; - -function TcxCustomGridRecord.GetExpanded: Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridRecord.ToggleExpanded; -begin - Expanded := not Expanded; -end; - -function TcxCustomGridRecord.GetHasCells: Boolean; -begin - Result := False; -end; - -function TcxCustomGridRecord.GetIsData: Boolean; -begin - Result := True; -end; - -function TcxCustomGridRecord.GetIsFirst: Boolean; -begin - Result := Index = 0; -end; - -function TcxCustomGridRecord.GetIsLast: Boolean; -begin - Result := Index = FViewData.RecordCount - 1; -end; - -function TcxCustomGridRecord.GetIsParent: Boolean; -begin - Result := False; -end; - -function TcxCustomGridRecord.GetIsParentRecordLast(AIndex: Integer): Boolean; -begin - Result := IsLast or (ViewData.Records[Index + 1].Level < Level - AIndex); -end; - -function TcxCustomGridRecord.GetParentRecord: TcxCustomGridRecord; -begin - if Level <> 0 then - begin - Result := Self; - repeat - Result := ViewData.Records[Result.Index - 1]; - until Result.Level < Level; - end - else - if GridView.IsDetail then - Result := GridView.MasterGridRecord - else - Result := nil; -end; - -function TcxCustomGridRecord.GetSelected: Boolean; -begin - if IsNewItemRecord then - Result := Controller.NewItemRecordFocused - else - Result := Controller.IsRecordSelected(Self); -end; - -function TcxCustomGridRecord.GetVisible: Boolean; -begin - Result := IsNewItemRecord or PartVisible and - FViewData.ViewInfo.RecordsViewInfo.GetRealItem(Self).FullyVisible; -end; - -procedure TcxCustomGridRecord.SetSelected(Value: Boolean); -begin - if IsNewItemRecord then - Controller.NewItemRecordFocused := Value - else - Controller.ChangeRecordSelection(Self, Value); -end; - -function TcxCustomGridRecord.GetDisplayText(Index: Integer): string; -begin - Result := DataController.GetRowDisplayText(RecordInfo, Index); -end; - -function TcxCustomGridRecord.GetValueCount: Integer; -begin - Result := DataController.GetItemCount; -end; - -function TcxCustomGridRecord.GetValue(Index: Integer): Variant; -begin - Result := DataController.GetRowValue(RecordInfo, Index); -end; - -procedure TcxCustomGridRecord.SetDisplayText(Index: Integer; const Value: string); -begin - DataController.SetDisplayText(RecordIndex, Index, Value); -end; - -procedure TcxCustomGridRecord.SetValue(Index: Integer; const Value: Variant); -begin - DataController.SetValue(RecordIndex, Index, Value); -end; - -procedure TcxCustomGridRecord.KeyDown(var Key: Word; Shift: TShiftState); -begin - case Key of - VK_ADD: - if Expandable then - begin - Controller.EatKeyPress := True; - Expanded := True; - Key := 0; - end; - VK_SUBTRACT: - if Expandable then - begin - Controller.EatKeyPress := True; - Expanded := False; - Key := 0; - end; - VK_RETURN, VK_F2, VK_PROCESSKEY: - if HasCells and (Controller.FocusedItem <> nil) and - ((Shift = []) or (Key = VK_RETURN) and (Shift = [ssShift])) then - begin - Controller.FocusedItem.Editing := True; - if Controller.FocusedItem.Editing and (Key <> VK_PROCESSKEY) then - Key := 0; - end; - end; -end; - -function TcxCustomGridRecord.CanFocus: Boolean; -begin - Result := GridView.DoCanFocusRecord(Self); //!!! -end; - -function TcxCustomGridRecord.CanFocusCells: Boolean; -begin - Result := GridView.OptionsSelection.CellSelect; -end; - -procedure TcxCustomGridRecord.Collapse(ARecurse: Boolean); -begin - if Expandable then DoCollapse(ARecurse); -end; - -procedure TcxCustomGridRecord.Expand(ARecurse: Boolean); -begin - if Expandable then DoExpand(ARecurse); -end; - -function TcxCustomGridRecord.GetFirstFocusableChild: TcxCustomGridRecord; -begin - Result := nil; -end; - -function TcxCustomGridRecord.GetLastFocusableChild(ARecursive: Boolean): TcxCustomGridRecord; -begin - Result := nil; -end; - -procedure TcxCustomGridRecord.Invalidate(AItem: TcxCustomGridTableItem = nil); -begin - if PartVisible then - GridView.Changed(TcxGridRecordChange.Create(GridView, Self, Index, AItem)); -end; - -procedure TcxCustomGridRecord.MakeVisible; -begin - Controller.MakeRecordVisible(Self); -end; - -{ TcxCustomGridTableViewData } - -constructor TcxCustomGridTableViewData.Create(AGridView: TcxCustomGridView); -begin - inherited; - FRecords := TList.Create; -end; - -destructor TcxCustomGridTableViewData.Destroy; -begin - DestroyNewItemRecord; - DestroyRecords; - FRecords.Free; - inherited; -end; - -function TcxCustomGridTableViewData.GetController: TcxCustomGridTableController; -begin - Result := TcxCustomGridTableController(inherited Controller); -end; - -function TcxCustomGridTableViewData.GetEditingRecord: TcxCustomGridRecord; -begin - if DataController.IsEditing then - Result := GetRecordByRecordIndex(DataController.EditingRecordIndex) - else - Result := nil; -end; - -function TcxCustomGridTableViewData.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -function TcxCustomGridTableViewData.GetInternalRecord(Index: Integer): TcxCustomGridRecord; -begin - Result := TcxCustomGridRecord(FRecords[Index]); -end; - -function TcxCustomGridTableViewData.GetRecord(Index: Integer): TcxCustomGridRecord; -begin - Result := InternalRecords[Index]; - if Result = nil then - begin - Result := CreateRecord(Index); - FRecords[Index] := Result; - //GridView.DoRecordCreated(Result); - end; -end; - -function TcxCustomGridTableViewData.GetRecordCount: Integer; -begin - Result := FRecords.Count; -end; - -function TcxCustomGridTableViewData.GetViewInfo: TcxCustomGridTableViewInfo; -begin - Result := TcxCustomGridTableViewInfo(inherited ViewInfo); -end; - -function TcxCustomGridTableViewData.CreateRecord(AIndex: Integer): TcxCustomGridRecord; -var - ARecordInfo: TcxRowInfo; -begin - ARecordInfo := DataController.GetRowInfo(AIndex); - Result := GetRecordClass(ARecordInfo).Create(Self, AIndex, ARecordInfo); -end; - -function TcxCustomGridTableViewData.GetFilterValueListClass: TcxGridFilterValueListClass; -begin - Result := TcxGridFilterValueList; -end; - -function TcxCustomGridTableViewData.GetRecordByKind(AKind, AIndex: Integer): TcxCustomGridRecord; -begin - case AKind of - rkNormal: - if (0 <= AIndex) and (AIndex < RecordCount) then - Result := Records[AIndex] - else - Result := nil; - rkNewItem: - Result := NewItemRecord; - else - Result := nil; - end; -end; - -function TcxCustomGridTableViewData.GetRecordKind(ARecord: TcxCustomGridRecord): Integer; -begin - if ARecord.IsNewItemRecord then - Result := rkNewItem - else - Result := rkNormal; -end; - -procedure TcxCustomGridTableViewData.AssignEditingRecord; -begin - FEditingRecord := GetEditingRecord; -end; - -procedure TcxCustomGridTableViewData.CreateNewItemRecord; -var - ARowInfo: TcxRowInfo; -begin - FNewItemRecord := GetNewItemRecordClass.Create(Self, -1, ARowInfo); - FNewItemRecord.RefreshRecordInfo; - //GridView.DoRecordCreated(FNewItemRecord); -end; - -procedure TcxCustomGridTableViewData.DestroyNewItemRecord; -begin - FreeAndNil(FNewItemRecord); -end; - -function TcxCustomGridTableViewData.GetNewItemRecordClass: TcxCustomGridRecordClass; -begin - Result := nil; -end; - -procedure TcxCustomGridTableViewData.RecreateNewItemRecord; -begin - if HasNewItemRecord then - begin - DestroyNewItemRecord; - CreateNewItemRecord; - end; -end; - -procedure TcxCustomGridTableViewData.Collapse(ARecurse: Boolean); -var - I: Integer; -begin - BeginUpdate; - try - for I := RecordCount - 1 downto 0 do - Records[I].Collapse(ARecurse); - finally - EndUpdate; - end; -end; - -procedure TcxCustomGridTableViewData.DestroyRecords; -var - I: Integer; - ARecord: TcxCustomGridRecord; -begin - for I := 0 to RecordCount - 1 do - begin - ARecord := InternalRecords[I]; - if ARecord <> nil then - begin - ARecord.Free; - FRecords[I] := nil; - end; - end; -end; - -procedure TcxCustomGridTableViewData.Expand(ARecurse: Boolean); -var - I: Integer; -begin - BeginUpdate; - try - for I := 0 to RecordCount - 1 do - Records[I].Expand(ARecurse); - finally - EndUpdate; - end; -end; - -function TcxCustomGridTableViewData.GetRecordByIndex(AIndex: Integer): TcxCustomGridRecord; -begin - if (0 <= AIndex) and (AIndex < RecordCount) then - Result := Records[AIndex] - else - Result := nil; -end; - -function TcxCustomGridTableViewData.GetRecordByRecordIndex(ARecordIndex: Integer): TcxCustomGridRecord; -var - I: Integer; -begin - if HasNewItemRecord and (ARecordIndex = DataController.NewItemRecordIndex) then - Result := FNewItemRecord - else - if (0 <= ARecordIndex) and (ARecordIndex < DataController.RecordCount) then - begin - // following loop was created because during sorting - // row order in data controller is new already, but it is old in view data - // (used in TcxCustomGridTableItem.GetProperties(ARecordIndex)) - if GridView.IsUpdateLocked or not DataController.IsRowInfoValid then - for I := 0 to RecordCount - 1 do - begin - Result := InternalRecords[I]; - if (Result <> nil) and Result.IsData and (Result.RecordIndex = ARecordIndex) then - Exit; - end; - Result := GetRecordByIndex(DataController.GetRowIndexByRecordIndex(ARecordIndex, False)); - end - else - Result := nil; -end; - -function TcxCustomGridTableViewData.GetRecordIndexByRecord(ARecord: TcxCustomGridRecord): Integer; -begin - if ARecord = nil then - Result := -1 //!!! can be internal record index - else - Result := ARecord.RecordIndex; -end; - -function TcxCustomGridTableViewData.IsRecordIndexValid(AIndex: Integer): Boolean; -begin - Result := (0 <= AIndex) and (AIndex < RecordCount); -end; - -procedure TcxCustomGridTableViewData.Refresh(ARecordCount: Integer); -begin - RecreateNewItemRecord; - DestroyRecords; - FRecords.Clear; - FRecords.Count := ARecordCount; - AssignEditingRecord; - GridView.SizeChanged(GridView.IsPattern); -end; - -procedure TcxCustomGridTableViewData.RefreshRecords; -var - I: Integer; - ARecord: TcxCustomGridRecord; -begin - if HasNewItemRecord then FNewItemRecord.RefreshRecordInfo; - for I := 0 to RecordCount - 1 do - begin - ARecord := InternalRecords[I]; - if ARecord <> nil then ARecord.RefreshRecordInfo; - end; - AssignEditingRecord; -end; - -procedure TcxCustomGridTableViewData.CheckNewItemRecord; -begin - if HasNewItemRecord then - CreateNewItemRecord - else - DestroyNewItemRecord; -end; - -function TcxCustomGridTableViewData.HasNewItemRecord: Boolean; -begin - Result := False; -end; - -function TcxCustomGridTableViewData.AddItemToFilter(AParent: TcxFilterCriteriaItemList; - AItem: TcxCustomGridTableItem; AOperatorKind: TcxFilterOperatorKind; - const AValue: Variant; ADisplayText: string; AReplaceExistent: Boolean): TcxFilterCriteriaItem; -begin - if (ADisplayText = '') and not (VarIsNull(AValue) or VarIsArray(AValue)) then - ADisplayText := AValue; - AItem.DataBinding.GetFilterDisplayText(AValue, ADisplayText); - if AReplaceExistent then - DataController.Filter.RemoveItemByItemLink(AItem); - Result := DataController.Filter.AddItem(AParent, AItem, AOperatorKind, AValue, ADisplayText); -end; - -function TcxCustomGridTableViewData.CreateFilterValueList: TcxGridFilterValueList; -begin - Result := GetFilterValueListClass.Create(DataController.Filter); -end; - -function TcxCustomGridTableViewData.GetDisplayText(ARecordIndex, AItemIndex: Integer; - out AText: string; AUseCustomValue: Boolean = False; ACustomValueOperation: TcxGridDataOperation = doGrouping): Boolean; -var - AItem: TcxCustomGridTableItem; - AProperties: TcxCustomEditProperties; - AValue: Variant; -begin - AItem := GridView.Items[AItemIndex]; - AProperties := AItem.GetProperties(ARecordIndex); - Result := AUseCustomValue or (AProperties.GetEditValueSource(False) = evsValue); - if Result then - begin - AValue := DataController.Values[ARecordIndex, AItemIndex]; - if AUseCustomValue then - AValue := GetCustomDataValue(AItem, AValue, ACustomValueOperation); - AText := AProperties.GetDisplayText(AValue, True); - end; -end; - -function TcxCustomGridTableViewData.CustomCompareDataValues(AField: TcxCustomDataField; - const AValue1, AValue2: Variant; AMode: TcxDataControllerComparisonMode): Integer; -var - AOperation: TcxGridDataOperation; - ACustomValue1, ACustomValue2: Variant; -begin - if AMode = dccmSorting then - AOperation := doSorting - else - AOperation := doGrouping; - ACustomValue1 := GetCustomDataValue(AField, AValue1, AOperation); - ACustomValue2 := GetCustomDataValue(AField, AValue2, AOperation); - Result := VarCompare(ACustomValue1, ACustomValue2); -end; - -function TcxCustomGridTableViewData.GetCustomDataDisplayText(ARecordIndex, AItemIndex: Integer; - AOperation: TcxGridDataOperation): string; -var - AValue: Variant; - ADate: TDateTime; - ADateRange: TcxCustomGridDateRange; -begin - Result := ''; - if AOperation = doGrouping then - begin - AValue := DataController.Values[ARecordIndex, AItemIndex]; - if not VarIsNull(AValue) then - begin - if GridView.Items[AItemIndex].GroupingDateRanges.NeedTime then - ADate := AValue - else - ADate := DateOf(AValue); - ADateRange := GridView.Items[AItemIndex].GroupingDateRanges.GetRange(ADate); - if ADateRange <> nil then - Result := ADateRange.GetDisplayText(ADate); - end; - end; - if Result = '' then - GetDisplayText(ARecordIndex, AItemIndex, Result, True, AOperation); -end; - -function TcxCustomGridTableViewData.GetCustomDataValue(AField: TcxCustomDataField; - const AValue: Variant; AOperation: TcxGridDataOperation): Variant; -begin - Result := GetCustomDataValue(TcxCustomGridTableItem(AField.Item), AValue, AOperation); -end; - -function TcxCustomGridTableViewData.GetCustomDataValue(AItem: TcxCustomGridTableItem; - const AValue: Variant; AOperation: TcxGridDataOperation): Variant; -var - ADate: TDateTime; - ADateRange: TcxCustomGridDateRange; -begin - if VarIsNull(AValue) then - Result := AValue - else - if AOperation in [doSorting, doGrouping] then - begin - if AItem.GroupingDateRanges.NeedTime then - ADate := AValue - else - ADate := DateOf(AValue); - ADateRange := AItem.GroupingDateRanges.GetRange(ADate); - if ADateRange = nil then - Result := ADate - else - if AOperation = doGrouping then - Result := ADateRange.GetValue(ADate) - else - Result := ADateRange.GetSortingValue(ADate); - end - else - Result := DateOf(AValue); -end; - -function TcxCustomGridTableViewData.HasCustomDataHandling(AField: TcxCustomDataField; - AOperation: TcxGridDataOperation): Boolean; -begin - Result := (AField.Item <> nil) and - HasCustomDataHandling(TcxCustomGridTableItem(AField.Item), AOperation); -end; - -function TcxCustomGridTableViewData.HasCustomDataHandling(AItem: TcxCustomGridTableItem; - AOperation: TcxGridDataOperation): Boolean; -begin - Result := - (AOperation = doGrouping) and AItem.SupportsGroupingDateRanges(False) or - (AOperation = doFiltering) and AItem.CanIgnoreTimeForFiltering; -end; - -function TcxCustomGridTableViewData.NeedsCustomDataComparison(AField: TcxCustomDataField; - AMode: TcxDataControllerComparisonMode): Boolean; -var - AItem: TcxCustomGridTableItem; - AItemGroupIndex: Integer; -begin - AItem := TcxCustomGridTableItem(AField.Item); - Result := (AItem <> nil) and ((AMode = dccmGrouping) or (AMode = dccmSorting)) and - HasCustomDataHandling(AField, doGrouping); - if Result and (AMode = dccmSorting) then - begin - AItemGroupIndex := AItem.GroupIndex; - Result := (AItemGroupIndex <> -1) and - ((AItemGroupIndex < GridView.GroupedItemCount - 1) or AItem.GroupingDateRanges.NeedSortingByTime); - end; -end; - -{ TcxCustomGridTableMovingObject } - -function TcxCustomGridTableMovingObject.GetController: TcxCustomGridTableController; -begin - Result := TcxCustomGridTableController(inherited Controller); -end; - -function TcxCustomGridTableMovingObject.GetCustomizationForm: TcxCustomGridTableCustomizationForm; -begin - Result := TcxCustomGridTableCustomizationForm(inherited CustomizationForm); -end; - -procedure TcxCustomGridTableMovingObject.DragAndDrop(const P: TPoint; var Accepted: Boolean); -begin - inherited; - Controller.CheckScrolling(P); -end; - -{ TcxGridItemContainerZone } - -constructor TcxGridItemContainerZone.Create(AItemIndex: Integer); -begin - inherited Create; - ItemIndex := AItemIndex; -end; - -function TcxGridItemContainerZone.IsEqual(Value: TcxGridItemContainerZone): Boolean; -begin - Result := (Value <> nil) and (ItemIndex = Value.ItemIndex); -end; - -{ TcxCustomGridTableItemMovingObject } - -constructor TcxCustomGridTableItemMovingObject.Create(AControl: TcxControl); -begin - inherited; - FDestItemContainerKind := ckNone; -end; - -destructor TcxCustomGridTableItemMovingObject.Destroy; -begin - DestZone := nil; - inherited; -end; - -procedure TcxCustomGridTableItemMovingObject.SetDestItemContainerKind(Value: TcxGridItemContainerKind); -begin - CheckDestItemContainerKind(Value); - if FDestItemContainerKind <> Value then - begin - Dirty := True; - FDestItemContainerKind := Value; - end; -end; - -procedure TcxCustomGridTableItemMovingObject.SetDestZone(Value: TcxGridItemContainerZone); -begin - if (FDestZone <> Value) and - ((FDestZone = nil) or not FDestZone.IsEqual(Value) or - (Value = nil) or not Value.IsEqual(FDestZone)) then - begin - Dirty := True; - FDestZone.Free; - FDestZone := Value; - end - else - Value.Free; -end; - -procedure TcxCustomGridTableItemMovingObject.CalculateDestParams(AHitTest: TcxCustomGridHitTest; - out AContainerKind: TcxGridItemContainerKind; out AZone: TcxGridItemContainerZone); -begin - if AHitTest.HitTestCode = htCustomizationForm then - AContainerKind := ckCustomizationForm - else - AContainerKind := ckNone; - AZone := nil; -end; - -procedure TcxCustomGridTableItemMovingObject.CheckDestItemContainerKind(var AValue: TcxGridItemContainerKind); -begin - if (SourceItemContainerKind <> ckCustomizationForm) and - (AValue = ckCustomizationForm) and not CanRemove then - AValue := ckNone; -end; - -function TcxCustomGridTableItemMovingObject.GetCustomizationFormListBox: TcxCustomGridItemsListBox; -begin - Result := CustomizationForm.ItemsListBox; -end; - -function TcxCustomGridTableItemMovingObject.IsSourceCustomizationForm: Boolean; -begin - Result := FSourceItemContainerKind = ckCustomizationForm; -end; - -procedure TcxCustomGridTableItemMovingObject.BeginDragAndDrop; -begin - if CustomizationForm <> nil then - with CustomizationForm do - ActivatePage(ItemsPage); - Controller.FMovingItem := SourceItem as TcxCustomGridTableItem; - inherited; -end; - -procedure TcxCustomGridTableItemMovingObject.DragAndDrop(const P: TPoint; var Accepted: Boolean); -var - AHitTest: TcxCustomGridHitTest; - ADestContainerKind: TcxGridItemContainerKind; - ADestZone: TcxGridItemContainerZone; -begin - AHitTest := ViewInfo.GetHitTest(P); - CalculateDestParams(AHitTest, ADestContainerKind, ADestZone); - DestZone := ADestZone; - DestItemContainerKind := ADestContainerKind; - Accepted := FDestItemContainerKind <> ckNone; - inherited; -end; - -procedure TcxCustomGridTableItemMovingObject.EndDragAndDrop(Accepted: Boolean); -begin - inherited; - Controller.FMovingItem := nil; -end; - -{ TcxCustomGridTableItemsListBox } - -function TcxCustomGridTableItemsListBox.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -procedure TcxCustomGridTableItemsListBox.RefreshItemsAsTableItems; -var - I: Integer; - AItem: TcxCustomGridTableItem; -begin - inherited; - with Items do - begin - BeginUpdate; - try - Clear; - for I := 0 to GridView.ItemCount - 1 do - begin - AItem := GridView.Items[I]; - if AItem.CanMove and AItem.VisibleForCustomization and not AItem.Visible then - AddObject(AItem.GetAlternateCaption, AItem); - end; - finally - EndUpdate; - end; - end; -end; - -{ TcxCustomGridTableCustomizationForm } - -procedure TcxCustomGridTableCustomizationForm.CreateControls; -begin - inherited; - FItemsListBox := GetItemsListBoxClass.Create(Self); - with FItemsListBox do - begin - Align := alClient; - Parent := FItemsPage; - RefreshItems; - end; -end; - -function TcxCustomGridTableCustomizationForm.GetItemsListBoxClass: TcxCustomGridTableItemsListBoxClass; -begin - Result := TcxCustomGridTableItemsListBox; -end; - -function TcxCustomGridTableCustomizationForm.GetItemsPageVisible: Boolean; -begin - Result := TcxCustomGridTableView(GridView).OptionsCustomize.ItemMoving; -end; - -procedure TcxCustomGridTableCustomizationForm.InitPageControl; -begin - inherited; - FItemsPage := CreatePage(GetItemsPageCaption, GetItemsPageVisible); -end; - -procedure TcxCustomGridTableCustomizationForm.RefreshData; -begin - inherited; - FItemsListBox.RefreshItems; -end; - -{ TcxGridFilterPopupListBox } - -function TcxGridFilterPopupListBox.GetPopup: TcxGridFilterPopup; -begin - Result := TcxGridFilterPopup(inherited Popup); -end; - -function TcxGridFilterPopupListBox.CanHaveCheck(AItemIndex: Integer): Boolean; -begin - Result := inherited CanHaveCheck(AItemIndex) and - not Popup.IsMRUItemsListSeparator(AItemIndex); -end; - -procedure TcxGridFilterPopupListBox.DrawItemContent(ACanvas: TcxCanvas; - AIndex: Integer; ARect: TRect; AState: TOwnerDrawState); - - procedure DrawMRUItemsListSeparator; - var - Y: Integer; - begin - with ACanvas do - begin - Pen.Color := clBtnShadow; - with ARect do - begin - Y := (Top + Bottom - 3) div 2; - MoveTo(Left, Y); - LineTo(Right, Y); - MoveTo(Left, Y + 2); - LineTo(Right, Y + 2); - end; - end; - end; - -begin - if Popup.IsMRUItemsListSeparator(AIndex) then - DrawMRUItemsListSeparator - else - inherited; -end; - -function TcxGridFilterPopupListBox.HasCheck(AItemIndex: Integer): Boolean; -begin - Result := Popup.IsCheck(AItemIndex); -end; - -{ TcxGridFilterPopup } - -constructor TcxGridFilterPopup.Create(AGridView: TcxCustomGridView); -begin - inherited; - AlignHorz := pahRight; - FListBoxItems := TStringList.Create; - FValueList := GridView.ViewData.CreateFilterValueList; - - FListBox := TcxGridFilterPopupListBox.Create(Self); - FListBox.OnAction := ListBoxAction; - - FButton := TcxButton.Create(Self); - FButton.Caption := cxGetResourceString(@scxGridFilterApplyButtonCaption); - FButton.LookAndFeel.MasterLookAndFeel := GridView.LookAndFeel; - FButton.ParentFont := True; - UpdateButtonEnabled; - FButton.OnClick := ButtonClicked; -end; - -destructor TcxGridFilterPopup.Destroy; -begin - FValueList.Free; - FListBoxItems.Free; - inherited; -end; - -function TcxGridFilterPopup.GetFilter: TcxDataFilterCriteria; -begin - Result := GridView.DataController.Filter; -end; - -function TcxGridFilterPopup.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -{function TcxGridFilterPopup.GetOwnerValue: IcxGridFilterPopupOwner; -begin - Result := IcxGridFilterPopupOwner(inherited Owner); -end; - -procedure TcxGridFilterPopup.SetOwnerValue(Value: IcxGridFilterPopupOwner); -begin - inherited Owner := Value; -end;} - -procedure TcxGridFilterPopup.SetFilterChangedByCheck(Value: Boolean); -begin - if FFilterChangedByCheck <> Value then - begin - FFilterChangedByCheck := Value; - UpdateButtonEnabled; - end; -end; - -procedure TcxGridFilterPopup.ButtonClicked(Sender: TObject); -begin - CloseUp; - ApplyFilterUsingCheckedItems(FListBox.CheckedIndexes); - GridView.Filtering.AddFilterToMRUItems; -end; - -procedure TcxGridFilterPopup.ListBoxAction(Sender: TcxGridPopupListBox; AItemIndex: Integer); -begin - if FListBox.IsCheck(AItemIndex) then - begin - if ImmediateFilterUsingChecks then - ApplyFilterUsingCheckedItems(FListBox.CheckedIndexes); - FilterChangedByCheck := True; - end - else - ApplyFilterUsingClickedItem(AItemIndex); -end; - -procedure TcxGridFilterPopup.AddListBoxItems; -begin - Item.DataBinding.GetFilterStrings(FListBoxItems, FValueList); -end; - -procedure TcxGridFilterPopup.AdjustListBoxSize; -begin - FListBox.VisibleItemCount := GridView.Filtering.ItemPopup.MaxDropDownItemCount; - FListBox.VisibleWidth := GridView.Filtering.ItemPopup.DropDownWidth; - FListBox.ShowChecks := SupportsChecks; - FListBox.AdjustBounds(FListBoxItems); -end; - -procedure TcxGridFilterPopup.ApplyFilterUsingCheckedItems(const AItemIndexes: TcxGridIndexes); -begin - Item.DataBinding.SetFilterActiveValueIndexes(FValueList, AItemIndexes); -end; - -procedure TcxGridFilterPopup.ApplyFilterUsingClickedItem(AItemIndex: Integer); -begin - FValueList.ApplyFilter(Item, AItemIndex, nil, True, True); - if not (FValueList[AItemIndex].Kind in [fviCustom, fviUser]) then - GridView.Filtering.AddFilterToMRUItems; -end; - -function TcxGridFilterPopup.GetImmediateFilterUsingChecks: Boolean; -begin - Result := GridView.Filtering.ItemPopup.ApplyMultiSelectChanges = fpacImmediately; -end; - -function TcxGridFilterPopup.GetListBoxCheckedItemIndexes: TcxGridIndexes; -var - AActiveValueIndexes: TcxGridIndexes; - I: Integer; -begin - Item.DataBinding.GetFilterActiveValueIndexes(FValueList, AActiveValueIndexes); - Result := nil; - for I := 0 to Length(AActiveValueIndexes) - 1 do - if IsCheck(AActiveValueIndexes[I]) then - begin - SetLength(Result, Length(Result) + 1); - Result[Length(Result) - 1] := AActiveValueIndexes[I]; - end; -end; - -function TcxGridFilterPopup.GetSelectedItemIndex: Integer; -begin - Result := FValueList.GetIndexByCriteriaItem(Item.DataBinding.FilterCriteriaItem); -end; - -procedure TcxGridFilterPopup.InitButton; -begin - if IsButtonVisible then - begin - FButton.Width := FListBox.Width; - FButton.Top := FListBox.BoundsRect.Bottom; - FButton.Parent := Self; - FButton.Height := FButton.GetOptimalSize.cy; - {with GetButtonPainterClass(FButton.LookAndFeel) do - FButton.Height := 2 * (ButtonBorderSize + ButtonTextOffset) + Canvas.FontHeight(FButton.Font);} - end - else - FButton.Parent := nil; -end; - -procedure TcxGridFilterPopup.InitListBox; -var - ACheckedIndexes: TcxGridIndexes; -begin - AddListBoxItems; - AdjustListBoxSize; - FListBox.Items := FListBoxItems; - if FListBox.ShowChecks then - ACheckedIndexes := GetListBoxCheckedItemIndexes - else - ACheckedIndexes := nil; - if ACheckedIndexes = nil then - FListBox.ItemIndex := SelectedItemIndex - else - FListBox.ItemIndex := -1; - FListBox.CheckedIndexes := ACheckedIndexes; -end; - -procedure TcxGridFilterPopup.InitPopup; -begin - FItem := (Owner as IcxGridFilterPopupOwner).GetItem; - ShowHourglassCursor; - try - inherited; - InitListBox; - InitButton; - FilterChangedByCheck := False; - finally - HideHourglassCursor; - end; -end; - -function TcxGridFilterPopup.IsButtonVisible: Boolean; -begin - Result := SupportsChecks and not ImmediateFilterUsingChecks; -end; - -function TcxGridFilterPopup.IsCheck(AItemIndex: Integer): Boolean; -begin - Result := FValueList[AItemIndex].Kind in [fviBlanks, fviValue, fviSpecial]; -end; - -function TcxGridFilterPopup.IsMRUItemsListSeparator(AItemIndex: Integer): Boolean; -begin - Result := FValueList[AItemIndex].Kind = fviMRUSeparator; -end; - -function TcxGridFilterPopup.SupportsChecks: Boolean; -begin - Result := Item.CanFilterUsingChecks; -end; - -procedure TcxGridFilterPopup.UpdateButtonEnabled; -begin - FButton.Enabled := FFilterChangedByCheck; -end; - -procedure TcxGridFilterPopup.CloseUp; -begin - inherited; - FListBox.Clear; - if FFilterChangedByCheck and ImmediateFilterUsingChecks then - GridView.Filtering.AddFilterToMRUItems; -end; - -{ TcxGridFilterMRUItemsPopup } - -constructor TcxGridFilterMRUItemsPopup.Create(AGridView: TcxCustomGridView); -begin - inherited; - FListBox := TcxGridPopupListBox.Create(Self); - FListBox.OnAction := ListBoxAction; -end; - -function TcxGridFilterMRUItemsPopup.GetFiltering: TcxCustomGridTableFiltering; -begin - Result := GridView.Filtering; -end; - -function TcxGridFilterMRUItemsPopup.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -procedure TcxGridFilterMRUItemsPopup.ListBoxAction(Sender: TcxGridPopupListBox; - AItemIndex: Integer); -begin - ApplyFilterMRUItem(AItemIndex); -end; - -procedure TcxGridFilterMRUItemsPopup.AddFilterMRUItems(AStrings: TStrings); -var - I: Integer; - AItem: TcxGridFilterMRUItem; -begin - AStrings.BeginUpdate; - try - AStrings.Clear; - for I := 0 to Filtering.MRUItems.VisibleCount - 1 do - begin - AItem := Filtering.MRUItems.VisibleItems[I]; - AStrings.AddObject(AItem.Caption, AItem); - end; - finally - AStrings.EndUpdate; - end; -end; - -procedure TcxGridFilterMRUItemsPopup.ApplyFilterMRUItem(AItemIndex: Integer); -begin - TcxGridFilterMRUItem(FListBox.Items.Objects[AItemIndex]).AssignTo(GridView.DataController.Filter); - Filtering.AddFilterToMRUItems; -end; - -function TcxGridFilterMRUItemsPopup.GetTextOffsetHorz: Integer; -begin - Result := FListBox.ItemTextOffsetLeft; -end; - -procedure TcxGridFilterMRUItemsPopup.InitPopup; -begin - inherited; - FListBox.ItemTextOffsetVert := 2; - FListBox.VisibleItemCount := GridView.FilterBox.MRUItemsListDropDownCount; - AddFilterMRUItems(FListBox.Items); - FListBox.AdjustBounds; -end; - -{ TcxCustomGridCustomizationPopup } - -constructor TcxCustomGridCustomizationPopup.Create(AGridView: TcxCustomGridView); -begin - inherited; - CreateCheckListBox; -end; - -function TcxCustomGridCustomizationPopup.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -procedure TcxCustomGridCustomizationPopup.SetScrollDirection(Value: TcxDirection); -begin - if FScrollDirection <> Value then - begin - FreeAndNil(FScrollTimer); - FScrollDirection := Value; - if FScrollDirection <> dirNone then - begin - FScrollTimer := TcxTimer.Create(nil); - FScrollTimer.Interval := CustomizationPopupCheckListBoxScrollTimeInterval; - FScrollTimer.OnTimer := ScrollTimerHandler; - end; - end; -end; - -procedure TcxCustomGridCustomizationPopup.CheckListBoxClick(Sender: TObject); -var - AItems: TList; -begin - if not GridView.IsDesigning then Exit; - AItems := TList.Create; - try - GetCheckListBoxSelectedItems(AItems); - GridView.Controller.DesignController.SelectObjects(AItems); - finally - AItems.Free; - end; -end; - -procedure TcxCustomGridCustomizationPopup.CheckListBoxCheckClick(Sender: TObject; - AIndex: Integer; APrevState, ANewState: TcxCheckBoxState); -begin - CheckClicked(AIndex, ANewState = cbsChecked); -end; - -procedure TcxCustomGridCustomizationPopup.CheckListBoxEndDrag(Sender, Target: TObject; - X, Y: Integer); -begin - ScrollDirection := dirNone; -end; - -procedure TcxCustomGridCustomizationPopup.CheckListBoxKeyDown(Sender: TObject; - var Key: Word; Shift: TShiftState); -begin - case Key of - VK_ESCAPE: - CloseUp; - end; -end; - -procedure TcxCustomGridCustomizationPopup.CheckListBoxMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - if Button = mbLeft then - CheckListBoxClick(Sender); -end; - -procedure TcxCustomGridCustomizationPopup.CheckListBoxStartDrag(Sender: TObject; - var DragObject: TDragObject); -begin - if CheckListBox.ItemAtPos(CheckListBox.ScreenToClient(GetMouseCursorPos), True) = -1 then - begin - DragObject := TDragObject(1); // to avoid DragObject creation in TcxControl.DoStartDrag - CancelDrag; - end - else - DragItemIndex := -1; -end; - -procedure TcxCustomGridCustomizationPopup.CheckListBoxDragOver(Sender, Source: TObject; - X, Y: Integer; State: TDragState; var Accept: Boolean); - - function GetArrowBounds(APlace: TcxGridArrowPlace): TRect; - const - ArrowOffset = 1; - begin - Result := CheckListBox.InnerCheckListBox.ItemRect(DragItemIndex); - Result.Bottom := Result.Top; - Result := GetDragAndDropArrowBounds(Result, cxEmptyRect, APlace); - if APlace = apLeft then - OffsetRect(Result, Result.Right - Result.Left + ArrowOffset, 0) - else - OffsetRect(Result, -(Result.Right - Result.Left + ArrowOffset), 0); - end; - - procedure HideInsertionMark; - var - R: TRect; - begin - if DragItemIndex = -1 then Exit; - R := GetArrowBounds(apLeft); - InvalidateRect(CheckListBox.InnerCheckListBox.Handle, @R, True); - R := GetArrowBounds(apRight); - InvalidateRect(CheckListBox.InnerCheckListBox.Handle, @R, True); - CheckListBox.InnerCheckListBox.Update; - end; - - procedure ShowInsertionMark; - begin - if DragItemIndex = -1 then Exit; - DrawDragAndDropArrow(CheckListBox.InnerCheckListBox.Canvas, - GetArrowBounds(apLeft), apLeft); - DrawDragAndDropArrow(CheckListBox.InnerCheckListBox.Canvas, - GetArrowBounds(apRight), apRight); - end; - - procedure CheckScrolling; - begin - if (DragItemIndex <> -1) and (CheckListBox.Columns > 1) then - if X < CustomizationPopupCheckListBoxScrollZoneWidth then - ScrollDirection := dirLeft - else - if X >= CheckListBox.ClientWidth - CustomizationPopupCheckListBoxScrollZoneWidth then - ScrollDirection := dirRight - else - ScrollDirection := dirNone - else - ScrollDirection := dirNone; - end; - -var - AItemIndex: Integer; -begin - AItemIndex := GetItemInsertionIndex(X, Y); - Accept := AItemIndex <> -1; - if State = dsDragLeave then - AItemIndex := -1; - if DragItemIndex <> AItemIndex then - begin - HideInsertionMark; - DragItemIndex := AItemIndex; - ShowInsertionMark; - end; - CheckScrolling; -end; - -procedure TcxCustomGridCustomizationPopup.CheckListBoxDragDrop(Sender, Source: TObject; - X, Y: Integer); - - procedure MoveItems(AItems: TList; AIndex: Integer); - var - I: Integer; - begin - GridView.BeginUpdate; - try - for I := 0 to AItems.Count - 1 do - begin - SetItemIndex(AItems[I], AIndex); - AIndex := GetItemIndex(AItems[I]) + 1; - end; - finally - GridView.EndUpdate; - end; - end; - -var - AIndex: Integer; - AItems: TList; -begin - AIndex := GetItemInsertionIndex(X, Y); - if AIndex = -1 then Exit; - if AIndex = CheckListBox.Count then - AIndex := GetItemIndex(CheckListBox.Items[AIndex - 1].ItemObject) + 1 - else - AIndex := GetItemIndex(CheckListBox.Items[AIndex].ItemObject); - - AItems := TList.Create; - try - GetCheckListBoxSelectedItems(AItems); - MoveItems(AItems, AIndex); - CheckListBox.ItemIndex := AIndex; - RefreshCheckListBoxItems; - SetCheckListBoxSelectedItems(AItems); - finally - AItems.Free; - end; -end; - -procedure TcxCustomGridCustomizationPopup.ScrollTimerHandler(Sender: TObject); -var - ATopIndex: Integer; - AAccept: Boolean; -begin - // cannot use WM_HSCROLL here - it does not scroll by one column - if ScrollDirection = dirLeft then - CheckListBox.TopIndex := CheckListBox.TopIndex - 1 - else - begin - ATopIndex := CheckListBox.TopIndex; - repeat - Inc(ATopIndex); - CheckListBox.TopIndex := ATopIndex; - until (CheckListBox.TopIndex = ATopIndex) or (ATopIndex >= CheckListBox.Items.Count); - end; - - AAccept := True; - with CheckListBox.ScreenToClient(GetMouseCursorPos) do - CheckListBoxDragOver(nil, nil, X, Y, dsDragMove, AAccept); -end; - -procedure TcxCustomGridCustomizationPopup.AdjustCheckListBoxSize(AFixedHeight: Boolean = False); -var - ADropDownCount: Integer; - - function CalculateClientWidth: Integer; - begin - if FCheckListBox.Columns > 1 then - Result := CheckListBoxColumnWidth * FCheckListBox.Columns - else - begin - Result := FCheckListBox.GetBestFitWidth; - if (ADropDownCount <> -1) and (FCheckListBox.Items.Count > ADropDownCount) then - Inc(Result, GetScrollBarSize.cx); - end; - end; - - function CalculateClientHeight: Integer; - begin - if ADropDownCount = -1 then - Result := FCheckListBox.ClientHeight + GetScrollBarSize.cy - else - Result := FCheckListBox.GetHeight(ADropDownCount); - end; - -begin - if AFixedHeight then - ADropDownCount := -1 - else - if FCheckListBox.Columns > 1 then - ADropDownCount := RoundDiv(FCheckListBox.Items.Count, FCheckListBox.Columns) - else - begin - ADropDownCount := GetDropDownCount; - if (ADropDownCount = 0) or (FCheckListBox.Items.Count < ADropDownCount) then - ADropDownCount := FCheckListBox.Items.Count; - end; - FCheckListBox.ClientWidth := CalculateClientWidth; - FCheckListBox.ClientHeight := CalculateClientHeight; -end; - -procedure TcxCustomGridCustomizationPopup.CheckClicked(AIndex: Integer; AChecked: Boolean); -begin - ItemClicked(CheckListBox.Items[AIndex].ItemObject, AChecked); -end; - -procedure TcxCustomGridCustomizationPopup.CreateCheckListBox; -begin - FCheckListBox := TcxCheckListBox.Create(Self); - with FCheckListBox do - begin - EditValueFormat := cvfIndices; - with Style do - begin - LookAndFeel.MasterLookAndFeel := GridView.LookAndFeel; - BorderStyle := cbsNone; - HotTrack := False; - TransparentBorder := False; - end; - StyleFocused.BorderStyle := cbsNone; - StyleHot.BorderStyle := cbsNone; - ParentFont := True; - Parent := Self; - OnClick := CheckListBoxClick; - OnClickCheck := CheckListBoxCheckClick; - OnDragDrop := CheckListBoxDragDrop; - OnDragOver := CheckListBoxDragOver; - OnEndDrag := CheckListBoxEndDrag; - OnKeyDown := CheckListBoxKeyDown; - OnMouseDown := CheckListBoxMouseDown; - OnStartDrag := CheckListBoxStartDrag; - end; -end; - -function TcxCustomGridCustomizationPopup.GetCheckListBoxColumnWidth: Integer; -begin - Result := CheckListBox.GetBestFitWidth + CustomizationPopupCheckListBoxColumnOffset; -end; - -function TcxCustomGridCustomizationPopup.GetItemInsertionIndex(X, Y: Integer): Integer; -var - R: TRect; -begin - Result := CheckListBox.ItemAtPos(Point(X, Y), True); - if Result = -1 then - begin - R := CheckListBox.ItemRect(CheckListBox.Count - 1); - R.Bottom := CheckListBox.ClientBounds.Bottom; - if PtInRect(R, Point(X, Y)) then - Result := CheckListBox.Count; - end - else - begin - R := CheckListBox.ItemRect(Result); - if Y > GetRangeCenter(R.Top, R.Bottom) then - Inc(Result); - end; -end; - -procedure TcxCustomGridCustomizationPopup.InitPopup; -begin - inherited; - with FCheckListBox do - begin - Canvas.Font := Font; - if SupportsItemMoving then - DragMode := dmAutomatic - else - DragMode := dmManual; - InnerCheckListBox.MultiSelect := DragMode = dmAutomatic; - end; - AddCheckListBoxItems; - AdjustCheckListBoxSize; -end; - -procedure TcxCustomGridCustomizationPopup.RefreshCheckListBoxItems; -begin - CheckListBox.Items.BeginUpdate; - try - CheckListBox.Clear; - AddCheckListBoxItems; - finally - CheckListBox.Items.EndUpdate; - end; -end; - -procedure TcxCustomGridCustomizationPopup.GetCheckListBoxSelectedItems(AItems: TList); -var - I: Integer; -begin - for I := 0 to CheckListBox.Count - 1 do - if CheckListBox.Selected[I] then - AItems.Add(CheckListBox.Items[I].ItemObject); -end; - -procedure TcxCustomGridCustomizationPopup.SetCheckListBoxSelectedItems(AItems: TList); -var - I, AIndex: Integer; -begin - for I := 0 to AItems.Count - 1 do - begin - AIndex := CheckListBox.Items.IndexOfObject(AItems[I]); - if AIndex <> -1 then - CheckListBox.Selected[AIndex] := True; - end; -end; - -procedure TcxCustomGridCustomizationPopup.CloseUp; -begin - inherited; - FCheckListBox.Clear; - FCheckListBox.Columns := 0; -end; - -procedure TcxCustomGridCustomizationPopup.CorrectBoundsWithDesktopWorkArea(var APosition: TPoint); -var - ADesktopWorkArea: TRect; - ADesktopSpace, AColumnCount: Integer; -begin - ADesktopWorkArea := GetDesktopWorkArea(OwnerScreenBounds.TopLeft); - - if APosition.Y < ADesktopWorkArea.Top then - ADesktopSpace := APosition.Y + Height - ADesktopWorkArea.Top - else - if APosition.Y + Height > ADesktopWorkArea.Bottom then - ADesktopSpace := ADesktopWorkArea.Bottom - APosition.Y - else - ADesktopSpace := 0; - - if ADesktopSpace <> 0 then - begin - AColumnCount := RoundDiv(CheckListBox.Height, ADesktopSpace - NCHeight); - repeat - RestoreControlsBounds; - CheckListBox.Columns := AColumnCount; - AdjustCheckListBoxSize; - CalculateSize; - APosition := CalculatePosition; - Inc(AColumnCount); - until (ADesktopWorkArea.Top <= APosition.Y - GetScrollBarSize.cy) and - (APosition.Y + Height + GetScrollBarSize.cy <= ADesktopWorkArea.Bottom); - - if APosition.X + Width > ADesktopWorkArea.Right then - begin - RestoreControlsBounds; - CheckListBox.Columns := - (ADesktopWorkArea.Right - APosition.X - NCWidth) div CheckListBoxColumnWidth; - AdjustCheckListBoxSize(True); - CalculateSize; - APosition := CalculatePosition; - end; - end; -end; - -procedure TcxCustomGridCustomizationPopup.Popup; -begin - GridView.Focused := True; // to prevent popup from closing because of viewinfo recalculation - inherited; -end; - -{ TcxCustomGridItemsCustomizationPopup } - -procedure TcxCustomGridItemsCustomizationPopup.AddCheckListBoxItems; -var - I: Integer; - AItem: TcxCustomGridTableItem; -begin - with CheckListBox.Items do - begin - BeginUpdate; - try - for I := 0 to GridView.ItemCount - 1 do - begin - AItem := GridView.Items[I]; - if AItem.VisibleInQuickCustomizationPopup then - with Add do - begin - Checked := AItem.Visible; - ItemObject := AItem; - Text := AItem.GetAlternateCaption; - end; - end; - finally - EndUpdate; - end; - end; -end; - -function TcxCustomGridItemsCustomizationPopup.GetDropDownCount: Integer; -begin - Result := GridView.OptionsCustomize.ItemsQuickCustomizationMaxDropDownCount; -end; - -function TcxCustomGridItemsCustomizationPopup.SupportsItemMoving: Boolean; -begin - Result := GridView.OptionsCustomize.SupportsItemsQuickCustomizationReordering; -end; - -procedure TcxCustomGridItemsCustomizationPopup.ItemClicked(AItem: TObject; AChecked: Boolean); -begin - TcxCustomGridTableItem(AItem).Visible := AChecked; - GridView.Controller.DesignerModified; -end; - -function TcxCustomGridItemsCustomizationPopup.GetItemIndex(AItem: TObject): Integer; -begin - Result := TcxCustomGridTableItem(AItem).Index; -end; - -procedure TcxCustomGridItemsCustomizationPopup.SetItemIndex(AItem: TObject; - AIndex: Integer); -begin - if TcxCustomGridTableItem(AItem).Index < AIndex then - Dec(AIndex); - TcxCustomGridTableItem(AItem).Index := AIndex; - GridView.Controller.DesignerModified; -end; - -{ TcxGridEditingController } - -constructor TcxGridEditingController.Create(AController: TcxCustomGridTableController); -begin - inherited Create; - FController := AController; - FEditList := TcxInplaceEditList.Create(Controller.GridView); -end; - -destructor TcxGridEditingController.Destroy; -begin - StopEditShowingTimer; - FEditList.Free; - inherited; -end; - -function TcxGridEditingController.GetEditingProperties: TcxCustomEditProperties; -begin - if FEditingItem = nil then - Result := nil - else - Result := FEditingItem.GetPropertiesForEdit; -end; - -function TcxGridEditingController.GetGridView: TcxCustomGridTableView; -begin - Result := FController.GridView; -end; - -function TcxGridEditingController.GetIsEditing: Boolean; -begin - Result := FEditingItem <> nil; -end; - -procedure TcxGridEditingController.SetEditingItem(Value: TcxCustomGridTableItem); -begin - if FEditingItem <> Value then - begin - if FEditingItemSetting then Exit; - FEditingItemSetting := True; - try - if Value <> nil then - begin - if not Value.CanEdit or not GridView.DoEditing(Value) then Exit; - Value.FocusWithSelection; - end; - HideEdit(False); - FEditingItem := Value; - if IsEditing then - try - ShowEdit(Value); - if not FEditPreparing and (FEdit = nil) then - FEditingItem := nil; - except - FEditingItem := nil; - raise; - end; - finally - FEditingItemSetting := False; - end; - end; -end; - -procedure TcxGridEditingController.EditShowingTimerHandler(Sender: TObject); -begin - StopEditShowingTimer; - FEditShowingTimerItem.Editing := True; -end; - -procedure TcxGridEditingController.AfterViewInfoCalculate; -begin - if IsEditing and (not FIsEditPlaced or FEditingItem.EditPartVisible) then - begin - CancelEditUpdatePost; - if not FEditPreparing then - FEdit.Left := cxGridInvisibleCoordinate; - end; -end; - -procedure TcxGridEditingController.BeforeViewInfoCalculate; -begin - FIsEditPlaced := False; -end; - -procedure TcxGridEditingController.CancelEditUpdatePost; -begin - FEditUpdateNeeded := False; -end; - -function TcxGridEditingController.CanInitEditing: Boolean; -begin - Result := EditingItem.CanInitEditing; -end; - -function TcxGridEditingController.CanRemoveEditFocus: Boolean; -begin - Result := not (IsEditing and FEdit.IsFocused and not FEditHiding); -end; - -function TcxGridEditingController.CanUpdateEditValue: Boolean; -begin - Result := not GridView.IsPattern and - IsEditing and not FEditHiding and not FInitiatingEditing and not FEdit.IsPosting; -end; - -procedure TcxGridEditingController.CheckEdit; -begin - if IsEditing and (FEditingItem.FocusedCellViewInfo = nil) then - HideEdit(False) - else - ShowEdit; -end; - -procedure TcxGridEditingController.CheckEditUpdatePost; -begin - if FEditUpdateNeeded then DoUpdateEdit; -end; - -procedure TcxGridEditingController.DoEditChanged; -begin -end; - -procedure TcxGridEditingController.DoEditKeyDown(var Key: Word; Shift: TShiftState); -var - AModified: Boolean; -begin - GridView.DoEditKeyDown(FEditingItem, FEdit, Key, Shift); - case Key of - VK_RETURN: - begin - HideEdit(True); - if GridView.OptionsBehavior.GoToNextCellOnEnter then - begin - FController.BlockRecordKeyboardHandling := True; - try - FController.DoKeyDown(Key, Shift); - finally - FController.BlockRecordKeyboardHandling := False; - end; - ShowEdit; - end - else - Controller.CheckEdit; - Key := 0; - end; - VK_ESCAPE: - begin - AModified := FEdit.EditModified; - HideEdit(False); - Controller.CheckEdit; - if AModified then Key := 0; - end; - VK_DELETE: - if Shift = [ssCtrl] then - Controller.DoKeyDown(Key, Shift); - end; -end; - -procedure TcxGridEditingController.DoUpdateEdit; -begin - CancelEditUpdatePost; - if (FEditingItem <> nil) and (FEditingItem.FocusedCellViewInfo <> nil) and - not FEditingItem.EditPartVisible then - begin - with FEditingItem.FocusedCellViewInfo do - begin - if IsRectEmpty(Bounds) then Exit; - FEdit.BoundsRect := EditBounds; - InitStyle; - FEdit.Style := Style; - end; - GridView.DoInitEdit(FEditingItem, FEdit); - end; -end; - -function TcxGridEditingController.GetHideEditOnExit: Boolean; -begin - Result := True{ - not GridView.OptionsBehavior.AlwaysShowEditor or - GridView.Control.IsFocused}; -end; - -function TcxGridEditingController.GetHideEditOnFocusedRecordChange: Boolean; -begin - Result := not GridView.OptionsBehavior.AlwaysShowEditor or - (FEditingItem <> nil) and - (FEditingItem.HasCustomPropertiesHandler or FEditingItem.HasCustomPropertiesForEditHandler or - FEditingItem.ShowButtons(False) or - (esoAlwaysHotTrack in FEditingItem.GetProperties.GetSupportedOperations)) or - Assigned(GridView.OnEditing) or Assigned(GridView.OnInitEdit); -end; - -procedure TcxGridEditingController.InitEdit; -begin - with FEdit.InternalProperties do - begin - FPrevEditOnChange := OnChange; - FPrevEditOnEditValueChanged := OnEditValueChanged; - OnChange := nil; - OnEditValueChanged := nil; - end; - FEdit.InplaceParams.Position := FEditingItem.FocusedCellViewInfo.GetInplaceEditPosition; - FEdit.Parent := FController.Site; - UpdateEdit; - UpdateEditValue; - AssignEditEvents; - //GridView.DoInitEdit(FEditingItem, FEdit); -end; - -procedure TcxGridEditingController.UninitEdit; -begin - UnassignEditEvents; -end; - -procedure TcxGridEditingController.PostEditingData; -begin - GridView.DataController.PostEditingData; -end; - -procedure TcxGridEditingController.PostEditUpdate; -begin - FEditUpdateNeeded := True; -end; - -function TcxGridEditingController.PrepareEdit(AItem: TcxCustomGridTableItem; - AOnMouseEvent: Boolean): Boolean; -var - AProperties: TcxCustomEditProperties; - AAssignRepositoryItem: Boolean; -begin - Result := False; - try - FController.CancelCheckEditPost; - if FEditPreparing or FEditHiding or - (AItem = nil) or (Controller.FocusedRecord = nil) then Exit; - FEditPreparing := True; - try - if AItem.Editing and not FEditingItemSetting then - begin - Result := (FEdit <> nil) and - (FController.Site.Focused and not FEdit.IsFocused or AOnMouseEvent); - if Result then - FEditingItem.FocusedCellViewInfo.Invalidate(True); - Exit; - end; - Result := FController.Site.Focused; - if not Result then Exit; - - AItem.Editing := True; - Result := AItem.Editing; - if not Result then Exit; - - Result := not AItem.EditPartVisible; - if not Result then - begin - AItem.Editing := False; - Exit; - end; - - try - AProperties := EditingProperties; - AAssignRepositoryItem := NeedAssignRepositoryItem(AItem.Properties, - AItem.RepositoryItem, AProperties); - - GridView.PatternGridView.IgnorePropertiesChanges := True; - try - FEdit := FEditList.GetEdit(AProperties); - if AAssignRepositoryItem then - FEdit.RepositoryItem := AItem.RepositoryItem; - finally - GridView.PatternGridView.IgnorePropertiesChanges := False; - end; - except - AItem.Editing := False; - Result := False; - raise; - end; - - FEditingItem.FocusedCellViewInfo.Invalidate(True); - InitEdit; - finally - FEditPreparing := False; - end; - finally - if Result then GridView.TabStop := False; - end; -end; - -procedure TcxGridEditingController.UpdateEditValue; -var - AValue: TcxEditValue; -begin - if CanUpdateEditValue then - begin - FEdit.LockChangeEvents(True); - try - AValue := EditingItem.EditValue; - GridView.DoInitEditValue(EditingItem, Edit, AValue); - FEdit.EditValue := AValue; - finally - FEdit.LockChangeEvents(False, False); - end; - FEdit.SelectAll; - end; -end; - -procedure TcxGridEditingController.UpdateValue; -begin - if IsEditing and FEdit.EditModified then - begin - FEdit.ValidateEdit(True); - FEditingItem.EditValue := FEdit.EditValue; - if FEdit <> nil then - FEdit.ModifiedAfterEnter := False; - end; -end; - -procedure TcxGridEditingController.AssignEditEvents; -begin - with FEdit do - begin - OnAfterKeyDown := EditAfterKeyDown; - OnEditing := EditEditing; - OnPostEditValue := EditPostEditValue; - OnExit := EditExit; - OnFocusChanged := EditFocusChanged; - OnKeyDown := EditKeyDown; - OnKeyPress := EditKeyPress; - OnKeyUp := EditKeyUp; - InternalProperties.OnChange := EditChanged; - InternalProperties.OnEditValueChanged := EditValueChanged; - end; -end; - -procedure TcxGridEditingController.UnassignEditEvents; -begin - with FEdit do - begin - OnAfterKeyDown := nil; - OnEditing := nil; - OnPostEditValue := nil; - OnExit := nil; - OnFocusChanged := nil; - OnKeyDown := nil; - OnKeyPress := nil; - OnKeyUp := nil; - InternalProperties.OnChange := FPrevEditOnChange; - InternalProperties.OnEditValueChanged := FPrevEditOnEditValueChanged; - end; -end; - -procedure TcxGridEditingController.EditAfterKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if FController.IsKeyForController(Key, Shift) then - FController.DoKeyDown(Key, Shift); -end; - -procedure TcxGridEditingController.EditChanged(Sender: TObject); -begin - DoEditChanged; - if Assigned(FPrevEditOnChange) then FPrevEditOnChange(Sender); - GridView.DoEditChanged(FEditingItem); -end; - -procedure TcxGridEditingController.EditEditing(Sender: TObject; var CanEdit: Boolean); -begin - FInitiatingEditing := True; - try - CanEdit := CanInitEditing; - finally - FInitiatingEditing := False; - end; -end; - -procedure TcxGridEditingController.EditExit(Sender: TObject); -begin - if HideEditOnExit then - try - HideEdit(not FController.CancelEditingOnExit); - except - if IsEditing then - begin - FEdit.SetFocus; - FIsErrorOnEditExit := True; - end; - raise; - end; -end; - -procedure TcxGridEditingController.EditFocusChanged(Sender: TObject); -begin - TcxControlAccess(FController.Site).FocusChanged; -end; - -procedure TcxGridEditingController.EditKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if not (Key in [VK_CONTROL, VK_SHIFT, VK_MENU]) then - FController.MakeFocusedItemVisible; - DoEditKeyDown(Key, Shift); -end; - -procedure TcxGridEditingController.EditKeyPress(Sender: TObject; var Key: Char); -begin - GridView.DoEditKeyPress(FEditingItem, FEdit, Key); -end; - -procedure TcxGridEditingController.EditKeyUp(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - GridView.DoEditKeyUp(FEditingItem, FEdit, Key, Shift); -end; - -procedure TcxGridEditingController.EditPostEditValue(Sender: TObject); -begin - UpdateValue; -end; - -procedure TcxGridEditingController.EditValueChanged(Sender: TObject); -begin - if Assigned(FPrevEditOnEditValueChanged) then FPrevEditOnEditValueChanged(Sender); - GridView.DoEditValueChanged(FEditingItem); -end; - -procedure TcxGridEditingController.HideEdit(Accept: Boolean); -var - APrevAllowCheckEdit: Boolean; -begin - FController.CancelCheckEditPost; - CancelEditUpdatePost; - StopEditShowingTimer; - if FEditHiding or not IsEditing then Exit; - FEditHiding := True; - try - if Accept then - begin - if not FEdit.Deactivate then raise EAbort.Create(''); - PostEditingData; - FEdit.ActiveProperties.Update(FEditingItem.GetProperties(Controller.FocusedRecord)); - end; - EditingItem := nil; - if GridView.Focused then GridView.TabStop := True; - if FEdit <> nil then - begin - UninitEdit; - if FEdit.Focused and GridView.Focused then - begin - FEdit.EditModified := False; - if not GridView.IsDestroying then - begin - APrevAllowCheckEdit := FController.AllowCheckEdit; - FController.AllowCheckEdit := False; - try - FController.DoSetFocus(False); - finally - FController.AllowCheckEdit := APrevAllowCheckEdit; - end; - end; - end - else - Controller.InvalidateFocusedRecord; - FEdit.Parent := nil; - FEdit.RepositoryItem := nil; - FEdit := nil; - end; - FIsErrorOnEditExit := False; - finally - FEditHiding := False; - end; -end; - -procedure TcxGridEditingController.RemoveEdit(AProperties: TcxCustomEditProperties); -begin - //if EditingProperties = AProperties then - if IsEditing and (Edit = FEditList.FindEdit(AProperties)) then - EditingItem := nil; - FEditList.RemoveItem(AProperties); -end; - -procedure TcxGridEditingController.ShowEdit(AItem: TcxCustomGridTableItem = nil); -begin - if AItem = nil then AItem := FController.FocusedItem; - if PrepareEdit(AItem, False) then FEdit.Activate(AItem.FEditData); -end; - -procedure TcxGridEditingController.ShowEdit(AItem: TcxCustomGridTableItem; Key: Char); -begin - if PrepareEdit(AItem, False) then FEdit.ActivateByKey(Key, AItem.FEditData); -end; - -procedure TcxGridEditingController.ShowEdit(AItem: TcxCustomGridTableItem; - Shift: TShiftState; X, Y: Integer); -begin - if PrepareEdit(AItem, True) then FEdit.ActivateByMouse(Shift, X, Y, AItem.FEditData); -end; - -procedure TcxGridEditingController.UpdateEdit; -var - ACellViewInfo: TcxGridTableDataCellViewInfo; -begin - if FEdit = nil then Exit; - ACellViewInfo := FEditingItem.FocusedCellViewInfo; - if ACellViewInfo = nil then Exit; - with ACellViewInfo do - begin - if IsRectEmpty(Bounds) then Exit; - if not FInitiatingEditing and FEditPreparing then - DoUpdateEdit - else - PostEditUpdate; - end; - FIsEditPlaced := True; -end; - -procedure TcxGridEditingController.StartEditShowingTimer(AItem: TcxCustomGridTableItem); -begin - StopEditShowingTimer; - FEditShowingTimerItem := AItem; - FEditShowingTimer := TcxTimer.Create(nil); - with FEditShowingTimer do - begin - Interval := GetDblClickInterval; - OnTimer := EditShowingTimerHandler; - end; -end; - -procedure TcxGridEditingController.StopEditShowingTimer; -begin - FreeAndNil(FEditShowingTimer); -end; - -(*{ TcxCustomGridDragOpenInfo } - -function TcxCustomGridDragOpenInfo.Equals(AInfo: TcxCustomGridDragOpenInfo): Boolean; -begin - Result := ClassType = AInfo.ClassType; -end; -*) -{ TcxGridDragOpenInfoExpand } - -constructor TcxGridDragOpenInfoExpand.Create(AGridRecord: TcxCustomGridRecord); -begin - inherited Create; - GridRecord := AGridRecord; -end; - -function TcxGridDragOpenInfoExpand.Equals(AInfo: TcxCustomGridDragOpenInfo): Boolean; -begin - Result := inherited Equals(AInfo) and - (GridRecord = TcxGridDragOpenInfoExpand(AInfo).GridRecord); -end; - -procedure TcxGridDragOpenInfoExpand.Run; -begin - GridRecord.Expand(False); -end; - -{ TcxCustomGridTableController } - -constructor TcxCustomGridTableController.Create(AGridView: TcxCustomGridView); -begin - inherited; - FAllowAppendRecord := True; - FAllowCheckEdit := True; - FEditingController := GetEditingControllerClass.Create(Self); - FFocusOnRecordFocusing := True; -end; - -destructor TcxCustomGridTableController.Destroy; -begin - FFilterPopup.Free; - FFilterMRUItemsPopup.Free; - FItemsCustomizationPopup.Free; - CancelGridModeBufferCountUpdate; - FreeAndNil(FEditingController); - inherited; -end; - -function TcxCustomGridTableController.GetEditingItem: TcxCustomGridTableItem; -begin - Result := FEditingController.EditingItem; -end; - -function TcxCustomGridTableController.GetFilterMRUItemsPopup: TcxGridFilterMRUItemsPopup; -begin - if FFilterMRUItemsPopup = nil then - FFilterMRUItemsPopup := GetFilterMRUItemsPopupClass.Create(GridView); - Result := FFilterMRUItemsPopup; -end; - -function TcxCustomGridTableController.GetFilterPopup: TcxGridFilterPopup; -begin - if FFilterPopup = nil then - FFilterPopup := GetFilterPopupClass.Create(GridView); - Result := FFilterPopup; -end; - -function TcxCustomGridTableController.GetFocusedItemIndex: Integer; -begin - if FFocusedItem = nil then - Result := -1 - else - Result := FFocusedItem.VisibleIndex; -end; - -function TcxCustomGridTableController.GetFocusedRecordIndex: Integer; -begin - Result := DataController.GetFocusedRowIndex; -end; - -function TcxCustomGridTableController.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -function TcxCustomGridTableController.GetIncSearchingItem: TcxCustomGridTableItem; -begin - if IsIncSearching then - Result := GridView.Items[DataController.Search.ItemIndex] - else - Result := nil; -end; - -function TcxCustomGridTableController.GetIncSearchingText: string; -begin - Result := DataController.Search.SearchText; -end; - -function TcxCustomGridTableController.GetIsEditing: Boolean; -begin - Result := FEditingController.IsEditing; -end; - -function TcxCustomGridTableController.GetIsIncSearching: Boolean; -begin - Result := DataController.Search.Searching; -end; - -function TcxCustomGridTableController.GetIsItemMoving: Boolean; -begin - Result := FMovingItem <> nil; -end; - -function TcxCustomGridTableController.GetItemsCustomizationPopup: TcxCustomGridItemsCustomizationPopup; -begin - if FItemsCustomizationPopup = nil then - FItemsCustomizationPopup := GetItemsCustomizationPopupClass.Create(GridView); - Result := FItemsCustomizationPopup; -end; - -function TcxCustomGridTableController.GetMasterController: TcxCustomGridTableController; -begin - if GridView.IsDetail then - Result := GridView.MasterGridView.Controller as TcxCustomGridTableController - else - Result := nil; -end; - -function TcxCustomGridTableController.GetMultiSelect: Boolean; -begin - Result := GridView.OptionsSelection.MultiSelect; -end; - -function TcxCustomGridTableController.GetNewItemRecordFocused: Boolean; -begin - Result := DataController.NewItemRowFocused; -end; - -function TcxCustomGridTableController.GetSelectedRecord(Index: Integer): TcxCustomGridRecord; -begin - Index := DataController.GetSelectedRowIndex(Index); - if Index = -1 then - Result := nil - else - Result := ViewData.Records[Index]; -end; - -function TcxCustomGridTableController.GetSelectedRecordCount: Integer; -begin - Result := DataController.GetSelectedCount; -end; - -function TcxCustomGridTableController.GetViewData: TcxCustomGridTableViewData; -begin - Result := TcxCustomGridTableViewData(inherited ViewData); -end; - -function TcxCustomGridTableController.GetViewInfo: TcxCustomGridTableViewInfo; -begin - Result := TcxCustomGridTableViewInfo(inherited ViewInfo); -end; - -procedure TcxCustomGridTableController.SetDragHighlightedRecord(Value: TcxCustomGridRecord); -var - APrevDragHighlightedRecord: TcxCustomGridRecord; -begin - if FDragHighlightedRecord <> Value then - begin - APrevDragHighlightedRecord := FDragHighlightedRecord; - FDragHighlightedRecord := Value; - if APrevDragHighlightedRecord <> nil then - APrevDragHighlightedRecord.Invalidate; - if FDragHighlightedRecord <> nil then - FDragHighlightedRecord.Invalidate; - end; -end; - -procedure TcxCustomGridTableController.SetEditingItem(Value: TcxCustomGridTableItem); -begin - FEditingController.EditingItem := Value; -end; - -procedure TcxCustomGridTableController.SetFocusedItem(Value: TcxCustomGridTableItem); -var - APrevFocusedItem: TcxCustomGridTableItem; -begin - if (Value <> nil) and not Value.CanFocus(FocusedRecord) then Exit; - if FFocusedItem <> Value then - begin - APrevFocusedItem := FFocusedItem; - if (FFocusedItem <> nil) and not FEditingController.FEditingItemSetting then - FEditingController.HideEdit(True); - FFocusedItem := Value; - FocusedItemChanged(APrevFocusedItem); - CheckEdit; - end - else - MakeFocusedItemVisible; -end; - -procedure TcxCustomGridTableController.SetFocusedItemIndex(Value: Integer); -begin - if (Value < -1) or (Value >= GridView.VisibleItemCount) then Exit; - if Value = -1 then - FocusedItem := nil - else - FocusedItem := GridView.VisibleItems[Value]; -end; - -procedure TcxCustomGridTableController.SetFocusedRecordIndex(Value: Integer); -var - AIndexesAreEqual: Boolean; -begin - if EditingController.IsErrorOnEditExit or - (0 <= Value) and (Value < ViewData.RecordCount) and not ViewData.Records[Value].CanFocus then - Exit; - AIndexesAreEqual := FocusedRecordIndex = Value; - if not DataController.ChangeFocusedRowIndex(Value) then Exit; - if FFocusOnRecordFocusing then - begin - if AIndexesAreEqual then MakeFocusedRecordVisible; - if FocusedRecord <> nil then GridView.Focused := True; - end; -end; - -procedure TcxCustomGridTableController.SetIncSearchingText(const Value: string); - - function GetItemIndex: Integer; - begin - if IsIncSearching then - Result := IncSearchingItem.Index - else - if ItemForIncSearching = nil then - Result := -1 - else - Result := ItemForIncSearching.Index; - end; - -begin - if (IncSearchingText <> Value) and (GetItemIndex <> -1) then - if Value = '' then - CancelIncSearching - else - DataController.Search.Locate(GetItemIndex, Value) -end; - -procedure TcxCustomGridTableController.SetInternalTopRecordIndex(Value: Integer); -var - ARecordCountDelta: Integer; - - //ft,lt: integer; - -begin - if FTopRecordIndex <> Value then - begin - - //ft:=gettickcount; - - ARecordCountDelta := Value - FTopRecordIndex; - FTopRecordIndex := Value; - ViewInfo.AllowCheckCoordinates := False; - try - if Value <> -1 then - if GridView.CanOffset(ARecordCountDelta) then - GridView.Offset(ARecordCountDelta, 0, 0) - else - if GridView.IsMaster then - GridView.SizeChanged(not GridView.IsDetail) - {begin - GridView.SizeChanged(True); - if GridView.IsDetail and (GridView.MasterGridRecord <> nil) and - (GridView.MasterGridRecord.ViewInfo <> nil) then - GridView.MasterGridRecord.ViewInfo.Recalculate; - end} - else - GridView.LayoutChanged; - finally - ViewInfo.AllowCheckCoordinates := True; - end; - GridView.DoTopRecordIndexChanged; - - {site.Update; - lt:=gettickcount; - application.MainForm.Caption := inttostr(lt-ft);} - - end; -end; - -procedure TcxCustomGridTableController.SetNewItemRecordFocused(Value: Boolean); -begin - DataController.NewItemRowFocused := Value; -end; - -procedure TcxCustomGridTableController.SetScrollDirection(Value: TcxDirection); -begin - if FScrollDirection <> Value then - begin - DestroyScrollTimer; - FScrollDirection := Value; - if FScrollDirection <> dirNone then - CreateScrollTimer; - end; -end; - -procedure TcxCustomGridTableController.SetTopRecordIndex(Value: Integer); -begin - CheckTopRecordIndex(Value); - InternalTopRecordIndex := Value; -end; - -procedure TcxCustomGridTableController.DragScrollTimerHandler(Sender: TObject); -begin - Site.ScrollContent(FDragScrollDirection); - Site.Update; -end; - -procedure TcxCustomGridTableController.GridModeBufferCountUpdateTimerHandler(Sender: TObject); -begin - CheckGridModeBufferCountUpdatePost; -end; - -procedure TcxCustomGridTableController.PullFocusingScrollingTimerHandler(Sender: TObject); -begin - DoPullFocusingScrolling(FPullFocusingScrollingDirection); - Site.Update; - SavePullFocusingPos; -end; - -procedure TcxCustomGridTableController.CreateScrollTimer; -begin - FScrollTimer := TcxTimer.Create(nil); - with FScrollTimer do - begin - Interval := GetScrollDataTimeInterval(FScrollDirection); - OnTimer := ScrollTimerHandler; - end; -end; - -procedure TcxCustomGridTableController.DestroyScrollTimer; -begin - FreeAndNil(FScrollTimer); -end; - -procedure TcxCustomGridTableController.ScrollTimerHandler(Sender: TObject); -var - AAccepted: Boolean; -begin - if CanScrollData(FScrollDirection) then - begin - if DragAndDropObject <> nil then - DragAndDropObject.BeforeScrolling; - ScrollData(FScrollDirection); - if DragAndDropObject <> nil then - begin - Site.Update; - DragAndDropObject.AfterScrolling; - TcxControlAccess(Site).DragAndDrop( - Site.ScreenToClient(Mouse.CursorPos), AAccepted); - end; - end; -end; - -procedure TcxCustomGridTableController.DoEnter; -begin - inherited; - PostCheckEdit; -end; - -procedure TcxCustomGridTableController.DoExit; -begin - if CancelEditingOnExit then - DataController.Cancel - else - DataController.PostEditingData; - inherited; -end; - -procedure TcxCustomGridTableController.AfterPaint; -begin - inherited; - ProcessCheckEditPost; -end; - -procedure TcxCustomGridTableController.BeforePaint; -begin - inherited; - FEditingController.CheckEditUpdatePost; -end; - -function TcxCustomGridTableController.CanFocusOnClick(X, Y: Integer): Boolean; -begin - Result := inherited CanFocusOnClick(X, Y); - if Result and Site.IsFocused and IsEditing and - (ViewInfo.GetHitTest(X, Y).HitTestCode = htNavigator) then - Result := False; -end; - -procedure TcxCustomGridTableController.DetailFocused(ADetail: TcxCustomGridView); -var - APrevFocusOnRecordFocusing: Boolean; -begin - APrevFocusOnRecordFocusing := FFocusOnRecordFocusing; - FFocusOnRecordFocusing := False; - try - inherited; - FocusedRecordIndex := ADetail.MasterGridRecordIndex; - finally - FFocusOnRecordFocusing := APrevFocusOnRecordFocusing; - end; -end; - -function TcxCustomGridTableController.MayFocus: Boolean; -begin - Result := inherited MayFocus and - ((Site <> nil) and not Site.IsFocused or not IsEditing or - not GridView.OptionsBehavior.AlwaysShowEditor and FEditingController.Edit.ValidateEdit(True)); -end; - -procedure TcxCustomGridTableController.RemoveFocus; -begin - inherited; - CheckFocusedRecordSelectionWhenExit(FocusedRecord); - InvalidateFocusedRecord; -end; - -procedure TcxCustomGridTableController.SetFocus(ANotifyMaster: Boolean); -begin - if not FEditingController.CanRemoveEditFocus then Exit; - inherited; - InvalidateFocusedRecord; - PostCheckEdit; -end; - -procedure TcxCustomGridTableController.AfterOffset; -begin - Site.PostMouseMove; - FEditingController.UpdateEdit; - FEditingController.AfterViewInfoCalculate; - UpdateScrollBars; -end; - -procedure TcxCustomGridTableController.BeforeKillFocus; -begin - FEditingController.HideEdit(not GridView.IsDestroying); - if not GridView.IsDestroying and DataController.IsEditing then - begin - GridView.DontMakeMasterRecordVisible := True; - try - DataController.CheckBrowseMode; - //DataController.Post; - finally - GridView.DontMakeMasterRecordVisible := False; - end; - end; - inherited; -end; - -procedure TcxCustomGridTableController.BeforeOffset; -begin - FEditingController.BeforeViewInfoCalculate; -end; - -function TcxCustomGridTableController.CanAppend(ACheckOptions: Boolean): Boolean; -begin - Result := AllowAppendRecord and (dceoAppend in DataController.EditOperations) and - (not ACheckOptions or GridView.OptionsData.Appending); -end; - -procedure TcxCustomGridTableController.CancelCheckEditPost; -begin - FCheckEditNeeded := False; -end; - -function TcxCustomGridTableController.CanDelete(ACheckOptions: Boolean): Boolean; -begin - Result := (dceoDelete in DataController.EditOperations) and - (not ACheckOptions or GridView.OptionsData.Deleting); -end; - -function TcxCustomGridTableController.CanEdit: Boolean; -begin - Result := (FocusedItem <> nil) and GridView.OptionsData.Editing and - ([dceoEdit, dceoShowEdit] * DataController.EditOperations = [dceoEdit, dceoShowEdit]); -end; - -function TcxCustomGridTableController.CanHScrollBarHide: Boolean; -begin - Result := not ViewInfo.NavigatorSiteViewInfo.Visible; -end; - -function TcxCustomGridTableController.CanInsert(ACheckOptions: Boolean): Boolean; -begin - Result := (dceoInsert in DataController.EditOperations) and - (not ACheckOptions or GridView.OptionsData.Inserting); -end; - -procedure TcxCustomGridTableController.CheckEdit; -begin - CancelCheckEditPost; - if FAllowCheckEdit and GridView.OptionsBehavior.AlwaysShowEditor then - if (GridView.Control <> nil) and TcxCustomGrid(GridView.Control).UpdateLocked then - PostCheckEdit - else - FEditingController.CheckEdit; -end; - -procedure TcxCustomGridTableController.CheckCoordinates; -begin - inherited; - TopRecordIndex := TopRecordIndex; -end; - -procedure TcxCustomGridTableController.CheckTopRecordIndex(var Value: Integer); - - function IsGridModeAndScrollable: Boolean; - begin - Result := DataController.IsGridMode and not (dceInsert in DataController.EditState) and - not IsCheckingCoordinates; - end; - -var - APrevAllowHideSite: Boolean; - AMaxValue: Integer; -begin - if FCheckingCoordinate then Exit; - FCheckingCoordinate := True; - APrevAllowHideSite := ViewInfo.AllowHideSite; - ViewInfo.AllowHideSite := False; - try - if Value < 0 then - begin - if IsGridModeAndScrollable and not DataController.IsBOF then - DataController.Scroll(Value); - Value := 0; - end; - if Value > ViewData.RecordCount - 1 then - begin - if DataController.IsGridMode and not DataController.IsEOF then - DataController.Scroll(Value - (ViewData.RecordCount - 1)); - Value := ViewData.RecordCount - 1; - end; - if (Value <= 0) or not DataController.IsGridMode and (Value = TopRecordIndex) and - (ViewInfo.VisibleRecordCount < ViewData.RecordCount - Value) then Exit; - AMaxValue := GetMaxTopRecordIndexValue; - if Value > AMaxValue then - begin - if IsGridModeAndScrollable and not DataController.IsEOF then - begin - DataController.Scroll(Value - AMaxValue); - AMaxValue := GetMaxTopRecordIndexValue; - end; - Value := AMaxValue; - end; - finally - ViewInfo.AllowHideSite := APrevAllowHideSite; - FCheckingCoordinate := False; - end; -end; - -function TcxCustomGridTableController.FindNextCustomItem(AFocusedItemIndex, AItemCount: Integer; - AGoForward, AGoOnCycle: Boolean; ACanFocus: TcxCustomGridTableCanItemFocus; - AData: TObject; var AItemIndex: Integer; out ACycleChanged: Boolean): Boolean; -var - AFromIndex: Integer; - - function GetFromIndex: Integer; - begin - if AFocusedItemIndex = -1 then - if AGoForward then - Result := 0 - else - if AGoOnCycle then - Result := AItemCount - 1 - else - Result := -1 - else - if AGoForward then - Result := AFocusedItemIndex + 1 - else - Result := AFocusedItemIndex - 1; - end; - - function CheckIndex(var AIndex: Integer): Boolean; - begin - Result := True; - if AGoForward then - if AIndex > AItemCount - 1 then - if AGoOnCycle then - begin - AIndex := 0; - ACycleChanged := True; - end - else - Result := False - else - else - if AIndex < 0 then - if AGoOnCycle then - begin - AIndex := AItemCount - 1; - ACycleChanged := True; - end - else - Result := False; - end; - - procedure GetNextIndex(var AIndex: Integer); - begin - if AGoForward then - Inc(AIndex) - else - Dec(AIndex); - end; - -begin - Result := False; - ACycleChanged := False; - if AItemCount = 0 then Exit; - AFromIndex := GetFromIndex; - AItemIndex := AFromIndex; - repeat - if not CheckIndex(AItemIndex) then Exit; - if (AItemIndex = AFocusedItemIndex) and not ACycleChanged then Exit; - Result := ACanFocus(GridView, AItemIndex, AData); - if Result or - ACycleChanged and ((AItemIndex = AFocusedItemIndex) or (AFocusedItemIndex = -1)) then Exit; - GetNextIndex(AItemIndex); - until (AItemIndex = AFromIndex) or (AItemIndex = -1) and (AFocusedItemIndex = -1); -end; - -procedure TcxCustomGridTableController.FocusedItemChanged(APrevFocusedItem: TcxCustomGridTableItem); -begin - if GridView.IsLoading or GridView.IsDestroying then Exit; - IsReadyForImmediateEditing := False; - CancelIncSearching; - MakeFocusedItemVisible; - if FocusedRecord <> nil then - begin - FocusedRecord.Invalidate(APrevFocusedItem); - FocusedRecord.Invalidate(FocusedItem); - end; - if (APrevFocusedItem = nil) or (FocusedItem = nil) then - GridView.RefreshNavigators; - GridView.FocusedItemChanged(APrevFocusedItem, FFocusedItem); -end; - -procedure TcxCustomGridTableController.FocusedRecordChanged(APrevFocusedRecordIndex, - AFocusedRecordIndex: Integer; ANewItemRecordFocusingChanged: Boolean); -begin - IsReadyForImmediateEditing := False; - with EditingController do - if HideEditOnFocusedRecordChange then HideEdit(True); - if not DataController.IsSelectionAnchorExist then - SetSelectionAnchor(AFocusedRecordIndex); - GridView.FocusedRecordChanged(APrevFocusedRecordIndex, AFocusedRecordIndex, ANewItemRecordFocusingChanged); -end; - -function TcxCustomGridTableController.GetCancelEditingOnExit: Boolean; -begin - Result := - GridView.OptionsData.CancelOnExit and - (DataController.EditState * [dceInsert, dceChanging, dceModified] = [dceInsert]); -end; - -function TcxCustomGridTableController.GetFilterMRUItemsPopupClass: TcxGridFilterMRUItemsPopupClass; -begin - Result := TcxGridFilterMRUItemsPopup; -end; - -function TcxCustomGridTableController.GetFilterPopupClass: TcxGridFilterPopupClass; -begin - Result := TcxGridFilterPopup; -end; - -function TcxCustomGridTableController.GetFocusedRecord: TcxCustomGridRecord; -begin - if (0 <= FocusedRecordIndex) and (FocusedRecordIndex < ViewData.RecordCount) then - Result := ViewData.Records[FocusedRecordIndex] - else - Result := nil; -end; - -function TcxCustomGridTableController.GetItemsCustomizationPopupClass: TcxCustomGridItemsCustomizationPopupClass; -begin - Result := TcxCustomGridItemsCustomizationPopup; -end; - -function TcxCustomGridTableController.GetMaxTopRecordIndexValue: Integer; -begin - Result := ViewData.RecordCount - - GetVisibleRecordCount(ViewData.RecordCount - 1, False); -end; - -function TcxCustomGridTableController.GetPatternObject(AObject: TPersistent): TPersistent; -begin - if AObject is TcxCustomGridTableItem then - Result := TcxCustomGridTableView(GridView.PatternGridView).FindItemByID(TcxCustomGridTableItem(AObject).ID) - else - Result := inherited GetPatternObject(AObject); -end; - -function TcxCustomGridTableController.GetScrollBarOffsetBegin: Integer; -begin - if DataController.IsGridMode then - Result := Ord(not DataController.IsBOF) - else - Result := 0; -end; - -function TcxCustomGridTableController.GetScrollBarOffsetEnd: Integer; -begin - if DataController.IsGridMode then - Result := Ord(not DataController.IsEOF) - else - Result := 0; -end; - -function TcxCustomGridTableController.GetScrollBarPos: Integer; -var - AIcxGridDataController: IcxGridDataController; -begin - if Supports(TObject(DataController), IcxGridDataController, AIcxGridDataController) then - Result := AIcxGridDataController.GetScrollBarPos - else - Result := -1; - if Result = -1 then - Result := ScrollBarOffsetBegin + TopRecordIndex; -end; - -function TcxCustomGridTableController.GetScrollBarRecordCount: Integer; -var - AIcxGridDataController: IcxGridDataController; -begin - if Supports(TObject(DataController), IcxGridDataController, AIcxGridDataController) then - Result := AIcxGridDataController.GetScrollBarRecordCount - else - Result := -1; - if Result = -1 then - Result := ViewData.RecordCount + ScrollBarOffsetBegin + ScrollBarOffsetEnd; -end; - -function TcxCustomGridTableController.GetVisibleRecordCount(AFirstRecordIndex: Integer; - ACalculateDown: Boolean = True): Integer; -var - AVisibleEqualHeightRecordCount: Integer; - AViewInfo: TcxCustomGridTableViewInfo; - - function CanCalculateVisibleEqualHeightRecordCount: Boolean; - begin - AVisibleEqualHeightRecordCount := ViewInfo.CalculateVisibleEqualHeightRecordCount; - Result := AVisibleEqualHeightRecordCount <> -1; - end; - -begin - if IsRectEmpty(ViewInfo.Bounds) then - Result := 0 - else - if GridView.IsEqualHeightRecords and CanCalculateVisibleEqualHeightRecordCount then - begin // -2-4 ms - Result := AVisibleEqualHeightRecordCount; - if ACalculateDown then - if AFirstRecordIndex + Result > ViewData.RecordCount then - Result := ViewData.RecordCount - AFirstRecordIndex - else - else - if AFirstRecordIndex - Result + 1 < 0 then - Result := AFirstRecordIndex + 1; - end - else - begin - ViewInfo.CalculateDown := ACalculateDown; - AViewInfo := TcxCustomGridTableViewInfo(GridView.CreateViewInfo); - try - AViewInfo.CalculateDown := ACalculateDown; - AViewInfo.FirstRecordIndex := AFirstRecordIndex; - AViewInfo.MainCalculate(ViewInfo.Bounds); - Result := AViewInfo.VisibleRecordCount; - finally - AViewInfo.Free; - ViewInfo.CalculateDown := True; - end; - end; -end; - -procedure TcxCustomGridTableController.PostCheckEdit; -begin - if FAllowCheckEdit then FCheckEditNeeded := True; -end; - -procedure TcxCustomGridTableController.ProcessCheckEditPost; -begin - if FCheckEditNeeded then CheckEdit; -end; - -procedure TcxCustomGridTableController.ScrollData(ADirection: TcxDirection); -begin -end; - -procedure TcxCustomGridTableController.SetFocusedRecord(Value: TcxCustomGridRecord); -begin - if Value = nil then - FocusedRecordIndex := -1 - else - FocusedRecordIndex := Value.Index; -end; - -procedure TcxCustomGridTableController.SetScrollBarPos(Value: Integer); -var - AIcxGridDataController: IcxGridDataController; -begin - if not Supports(TObject(DataController), IcxGridDataController, AIcxGridDataController) or - not AIcxGridDataController.SetScrollBarPos(Value) then - if DataController.IsGridMode then - TopRecordIndex := Value - ScrollBarOffsetBegin - else - InternalTopRecordIndex := Value; -end; - -procedure TcxCustomGridTableController.CancelGridModeBufferCountUpdate; -begin - FGridModeBufferCountUpdateNeeded := False; - FreeAndNil(FGridModeBufferCountUpdateTimer); -end; - -procedure TcxCustomGridTableController.CheckGridModeBufferCountUpdatePost; -begin - if FGridModeBufferCountUpdateNeeded and ViewInfo.Calculated then - begin - CancelGridModeBufferCountUpdate; - (DataController as IcxGridDataController).CheckGridModeBufferCount; - end; -end; - -procedure TcxCustomGridTableController.PostGridModeBufferCountUpdate; -begin - if DataController.IsGridMode and not FGridModeBufferCountUpdateNeeded then - begin - FGridModeBufferCountUpdateNeeded := True; - FGridModeBufferCountUpdateTimer := TcxTimer.Create(nil); - with FGridModeBufferCountUpdateTimer do - begin - Interval := 1; - OnTimer := GridModeBufferCountUpdateTimerHandler; - end; - end; -end; - -function TcxCustomGridTableController.CanScrollData(ADirection: TcxDirection): Boolean; -begin - Result := False; -end; - -function TcxCustomGridTableController.GetScrollDataTimeInterval(ADirection: TcxDirection): Integer; -begin - Result := ScrollTimeInterval; -end; - -function TcxCustomGridTableController.CanPostponeRecordSelection(AShift: TShiftState): Boolean; -begin - Result := not ((ssLeft in AShift) and IsEditing) and (not (ssDouble in AShift) or (ssRight in AShift)); -end; - -function TcxCustomGridTableController.CanProcessMultiSelect(AIsKeyboard: Boolean): Boolean; -begin - Result := MultiSelect and (not AIsKeyboard or GridView.Focused); -end; - -function TcxCustomGridTableController.CanProcessMultiSelect(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState): Boolean; -begin - Result := //not (ssDouble in AShift) and - CanProcessMultiSelect(False) and IsClickableRecordHitTest(AHitTest) and - (TcxGridRecordHitTest(AHitTest).GridRecord <> nil) and - TcxGridRecordHitTest(AHitTest).GridRecord.Focused; -end; - -function TcxCustomGridTableController.CanProcessMultiSelect(AKey: Word; - AShift: TShiftState; AFocusedRecordChanged: Boolean): Boolean; -begin - Result := CanProcessMultiSelect(True) and - IsKeyForMultiSelect(AKey, AShift, AFocusedRecordChanged); -end; - -procedure TcxCustomGridTableController.ChangeRecordSelection(ARecord: TcxCustomGridRecord; - Value: Boolean); -begin - if MultiSelect then - DataController.ChangeRowSelection(ARecord.Index, Value); -end; - -procedure TcxCustomGridTableController.CheckFocusedRecordSelectionWhenExit(ARecord: TcxCustomGridRecord); -begin - if GridView.OptionsSelection.UnselectFocusedRecordOnExit and - MultiSelect and (ARecord <> nil) and (SelectedRecordCount = 1) and ARecord.Selected then - ARecord.Selected := False; -end; - -procedure TcxCustomGridTableController.DoMouseNormalSelection(AHitTest: TcxCustomGridHitTest); -begin - DoNormalSelection; -end; - -procedure TcxCustomGridTableController.DoMouseRangeSelection(AClearSelection: Boolean = True; - AData: TObject = nil); -begin - DoRangeSelection(AClearSelection); -end; - -procedure TcxCustomGridTableController.DoNormalSelection; -begin - if (SelectedRecordCount = 1) and (SelectedRecords[0] = FocusedRecord) then - Exit; - BeginUpdate; - try - ClearSelection; - if FocusedRecord <> nil then - FocusedRecord.Selected := True; - finally - EndUpdate; - end; -end; - -procedure TcxCustomGridTableController.DoNormalSelectionWithAnchor(ASelect: Boolean = True); -begin - SetSelectionAnchor(FocusedRecordIndex); - if ASelect then DoNormalSelection; -end; - -procedure TcxCustomGridTableController.DoRangeSelection(AClearSelection: Boolean = True); -begin //!!! - if (FocusedRecordIndex <> -1) {and not (dceInsert in DataController.EditState) }then - DataController.SelectFromAnchor(FocusedRecordIndex, not AClearSelection); -end; - -procedure TcxCustomGridTableController.DoToggleRecordSelection; -begin - if FocusedRecord <> nil then - with FocusedRecord do - Selected := not Selected; -end; - -procedure TcxCustomGridTableController.FinishSelection; -begin - FIsRecordUnselecting := False; -end; - -procedure TcxCustomGridTableController.InvalidateFocusedRecord; -begin - if FocusedRecord <> nil then FocusedRecord.Invalidate; -end; - -procedure TcxCustomGridTableController.InvalidateSelection; -var - I: Integer; - ARecord: TcxCustomGridRecord; -begin - for I := 0 to SelectedRecordCount - 1 do - begin - ARecord := SelectedRecords[I]; - if ARecord <> nil then ARecord.Invalidate; - end; - InvalidateFocusedRecord; -end; - -function TcxCustomGridTableController.IsKeyForMultiSelect(AKey: Word; - AShift: TShiftState; AFocusedRecordChanged: Boolean): Boolean; -begin - Result := (AKey = VK_SPACE) or (AKey = VK_PRIOR) or (AKey = VK_NEXT) or - AFocusedRecordChanged and not (((AKey = VK_INSERT) or (AKey = Ord('C'))) and (AShift = [ssCtrl])); // for grid mode -end; - -function TcxCustomGridTableController.IsRecordSelected(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := DataController.IsRowSelected(ARecord.Index); -end; - -procedure TcxCustomGridTableController.MultiSelectKeyDown(var Key: Word; Shift: TShiftState); -begin - if (Shift = [ssCtrl]) and (Key = VK_SPACE) then - begin - DoToggleRecordSelection; - FEatKeyPress := True; - end - else - if (ssShift in Shift) and (Key <> 0) then - DoRangeSelection - else - DoNormalSelectionWithAnchor(Shift <> [ssCtrl]); -end; - -procedure TcxCustomGridTableController.MultiSelectMouseDown(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState); -var - APressedRecord: TcxCustomGridRecord; - ASelectionShift: TShiftState; - - procedure AssignSelectionAnchor; - begin - if (ASelectionShift = []) or (ASelectionShift = [ssCtrl]) then - SetSelectionAnchor(APressedRecord.Index); - end; - - function MustPostponeDoing: Boolean; - begin - Result := CanPostponeRecordSelection(AShift) and APressedRecord.Selected; - end; - - procedure PostponeDoing; - begin - FIsRecordUnselecting := True; - FUnselectingRecordIndex := APressedRecord.Index; - end; - - procedure ProcessRecordSelectionToggling; - begin - if MustPostponeDoing then - PostponeDoing - else - DoToggleRecordSelection; - end; - - procedure ProcessNormalSelection; - begin - if MustPostponeDoing then - PostponeDoing - else - DoMouseNormalSelection(AHitTest); - end; - -begin - APressedRecord := TcxGridRecordHitTest(AHitTest).GridRecord; - ASelectionShift := AShift - [ssLeft, ssRight, ssMiddle, ssDouble]; - AssignSelectionAnchor; - if (ASelectionShift = [ssCtrl]) and SupportsRecordSelectionToggling then - ProcessRecordSelectionToggling - else - if (ASelectionShift = [ssShift]) or (ASelectionShift = [ssCtrl, ssShift]) then - DoMouseRangeSelection(not (ssCtrl in AShift) or not SupportsAdditiveSelection, AHitTest) - else - ProcessNormalSelection; -end; - -procedure TcxCustomGridTableController.MultiSelectMouseUp(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState); -var - ASelectionShift: TShiftState; -begin - if FIsRecordUnselecting and (FUnselectingRecordIndex <> -1) and - (FUnselectingRecordIndex = TcxGridRecordHitTest(AHitTest).GridRecord.Index) then - begin - ASelectionShift := AShift - [ssLeft, ssRight, ssMiddle, ssDouble]; - if (ASelectionShift = [ssCtrl]) and SupportsRecordSelectionToggling then - DoToggleRecordSelection - else - DoNormalSelection; - end; -end; - -procedure TcxCustomGridTableController.SelectFocusedRecord; -begin - if CanProcessMultiSelect(True) then - DoNormalSelectionWithAnchor; -end; - -procedure TcxCustomGridTableController.SetSelectionAnchor(AGridRecordIndex: Integer); -begin - if AGridRecordIndex <> -1 then - DataController.SetSelectionAnchor(AGridRecordIndex); -end; - -function TcxCustomGridTableController.SupportsAdditiveSelection: Boolean; -begin - Result := True; -end; - -function TcxCustomGridTableController.SupportsRecordSelectionToggling: Boolean; -begin - Result := True; -end; - -function TcxCustomGridTableController.CanFocusNextItem(AFocusedItemIndex, ANextItemIndex: Integer; - AGoForward, AGoOnCycle, AGoToNextRecordOnCycle: Boolean): Boolean; -begin - Result := ANextItemIndex <> -1; -end; - -function TcxCustomGridTableController.FocusedRecordHasCells(ACheckCellSelectionAbility: Boolean): Boolean; -begin - Result := (FocusedRecord <> nil) and FocusedRecord.HasCells and - (not ACheckCellSelectionAbility or FocusedRecord.CanFocusCells); -end; - -procedure TcxCustomGridTableController.FocusNextPage(ASyncSelection: Boolean); -begin - MakeFocusedRecordVisible; - if FocusedRecordIndex = TopRecordIndex + ViewInfo.VisibleRecordCount - 1 then - ShowNextPage; - FocusRecord(TopRecordIndex + ViewInfo.VisibleRecordCount - 1, ASyncSelection); - if not MultiSelect then - Site.Update; -end; - -procedure TcxCustomGridTableController.FocusPrevPage(ASyncSelection: Boolean); -begin - MakeFocusedRecordVisible; - if FocusedRecordIndex = TopRecordIndex then - ShowPrevPage; - FocusRecord(TopRecordIndex, ASyncSelection); - if not MultiSelect then - Site.Update; -end; - -function TcxCustomGridTableController.IsKeyForController(AKey: Word; AShift: TShiftState): Boolean; -begin - Result := - (AKey = VK_TAB) or (AKey = VK_UP) or (AKey = VK_DOWN) or (AKey = VK_PRIOR) or - (AKey = VK_NEXT) or (AKey = VK_INSERT) or (AKey = VK_ESCAPE); - if not Result and GridView.OptionsBehavior.AlwaysShowEditor then - Result := (AKey = VK_LEFT) or (AKey = VK_RIGHT); -end; - -procedure TcxCustomGridTableController.ScrollPage(AForward: Boolean); -var - AIcxGridDataController: IcxGridDataController; -begin - if not Supports(TObject(DataController), IcxGridDataController, AIcxGridDataController) or - not AIcxGridDataController.DoScrollPage(AForward) then - if AForward then - ShowNextPage - else - ShowPrevPage; -end; - -procedure TcxCustomGridTableController.ScrollRecords(AForward: Boolean; ACount: Integer); -var - APrevAllowAppendRecord: Boolean; - AIcxGridDataController: IcxGridDataController; -begin - APrevAllowAppendRecord := AllowAppendRecord; - AllowAppendRecord := False; - try - if not Supports(TObject(DataController), IcxGridDataController, AIcxGridDataController) or - not AIcxGridDataController.DoScroll(AForward) then - if AForward then - TopRecordIndex := TopRecordIndex + ACount - else - TopRecordIndex := TopRecordIndex - ACount; - finally - AllowAppendRecord := APrevAllowAppendRecord; - end; -end; - -procedure TcxCustomGridTableController.ShowNextPage; -begin - TopRecordIndex := TopRecordIndex + ViewInfo.VisibleRecordCount; -end; - -procedure TcxCustomGridTableController.ShowPrevPage; -begin - TopRecordIndex := TopRecordIndex - ViewInfo.VisibleRecordCount; -end; - -procedure TcxCustomGridTableController.DoPullFocusing(AHitTest: TcxGridRecordHitTest); -begin - AHitTest.GridRecord.Focused := True; - if AHitTest is TcxGridRecordCellHitTest then - TcxGridRecordCellHitTest(AHitTest).Item.Focused := True; - if MultiSelect and IsPullFocusingPosChanged then - DoMouseRangeSelection(True, FPullFocusingOriginHitTest); -end; - -procedure TcxCustomGridTableController.DoPullFocusingScrolling(ADirection: TcxDirection); -var - APrevAllowAppendRecord: Boolean; -begin - if ADirection in [dirUp, dirDown] then - begin - case ADirection of - dirUp: - FocusedRecordIndex := TopRecordIndex; - dirDown: - FocusedRecordIndex := TopRecordIndex + ViewInfo.VisibleRecordCount - 1; - end; - APrevAllowAppendRecord := AllowAppendRecord; - AllowAppendRecord := False; - try - FocusNextRecord(FocusedRecordIndex, ADirection = dirDown, False, False, False); - finally - AllowAppendRecord := APrevAllowAppendRecord; - end; - end; - if MultiSelect and IsPullFocusingPosChanged then - DoMouseRangeSelection(True, FPullFocusingOriginHitTest); -end; - -function TcxCustomGridTableController.GetPullFocusingScrollingDirection(X, Y: Integer; - out ADirection: TcxDirection): Boolean; -var - R: TRect; -begin - Result := False; - R := ViewInfo.RecordsViewInfo.Bounds; - if IsRecordsScrollHorizontal and (X < R.Left) or - not IsRecordsScrollHorizontal and (Y < R.Top) then - begin - ADirection := dirUp; - Result := True; - end; - if IsRecordsScrollHorizontal and (X >= R.Right) or - not IsRecordsScrollHorizontal and (Y >= R.Bottom) then - begin - ADirection := dirDown; - Result := True; - end; -end; - -function TcxCustomGridTableController.IsPullFocusingPosChanged: Boolean; -begin - Result := (FPullFocusingRecordId <> DataController.GetRowId(FocusedRecordIndex)) or - (FPullFocusingItem <> FocusedItem); -end; - -procedure TcxCustomGridTableController.SavePullFocusingPos; -begin - FPullFocusingRecordId := DataController.GetRowId(FocusedRecordIndex); - FPullFocusingItem := FocusedItem; -end; - -procedure TcxCustomGridTableController.StartPullFocusing(AHitTest: TcxCustomGridHitTest); -begin - FIsPullFocusing := True; - FPullFocusingMousePos := ViewInfo.MousePos;// Point(-1, -1); - FPullFocusingOriginHitTest := AHitTest; - FPullFocusingRecordId := Null; -end; - -procedure TcxCustomGridTableController.StopPullFocusing; -begin - StopPullFocusingScrolling; - FPullFocusingRecordId := Null; - FPullFocusingItem := nil; - FIsPullFocusing := False; -end; - -procedure TcxCustomGridTableController.StartPullFocusingScrolling(ADirection: TcxDirection); -begin - FPullFocusingScrollingDirection := ADirection; - if FPullFocusingScrollingTimer <> nil then Exit; - FPullFocusingScrollingTimer := TcxTimer.Create(nil); - with FPullFocusingScrollingTimer do - begin - Interval := PullFocusingScrollingTimeInterval; - OnTimer := PullFocusingScrollingTimerHandler; - end; -end; - -procedure TcxCustomGridTableController.StopPullFocusingScrolling; -begin - FreeAndNil(FPullFocusingScrollingTimer); -end; - -function TcxCustomGridTableController.SupportsPullFocusing: Boolean; -begin - Result := GridView.OptionsBehavior.PullFocusing; -end; - -function TcxCustomGridTableController.GetDragScrollDirection(X, Y: Integer): TcxDirection; -const - ADirections: array[Boolean, Boolean] of TcxDirection = ((dirUp, dirDown), (dirLeft, dirRight)); -var - AHitTest: TcxCustomGridHitTest; - ARecord: TcxCustomGridRecord; -begin - Result := dirNone; - AHitTest := ViewInfo.GetHitTest(X, Y); - if AHitTest is TcxGridRecordHitTest then - begin - ARecord := TcxGridRecordHitTest(AHitTest).GridRecord; - if IsFirstRecordForDragScroll(ARecord) then - Result := ADirections[IsRecordsScrollHorizontal, False] - else - if IsLastRecordForDragScroll(ARecord) then - Result := ADirections[IsRecordsScrollHorizontal, True]; - end; -end; - -function TcxCustomGridTableController.GetDragScrollInterval: Integer; -begin - Result := 20; -end; - -function TcxCustomGridTableController.IsFirstRecordForDragScroll(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := ARecord.Index = TopRecordIndex; -end; - -function TcxCustomGridTableController.IsLastRecordForDragScroll(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := ARecord.ViewInfo.Index >= ViewInfo.RecordsViewInfo.VisibleCount - 1; -end; - -procedure TcxCustomGridTableController.ProcessDragFocusing(X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; -begin - AHitTest := ViewInfo.GetHitTest(X, Y); - if AHitTest is TcxGridRecordHitTest then - TcxGridRecordHitTest(AHitTest).GridRecord.Focused := True - else - if AHitTest is TcxCustomGridViewHitTest then - TcxCustomGridViewHitTest(AHitTest).GridView.Focused := True; -end; - -procedure TcxCustomGridTableController.StartDragScroll(ADirection: TcxDirection); -begin - FDragScrollDirection := ADirection; - if FDragScrollTimer <> nil then Exit; - FDragScrollTimer := TcxTimer.Create(nil); - with FDragScrollTimer do - begin - Interval := GetDragScrollInterval; - OnTimer := DragScrollTimerHandler; - end; -end; - -procedure TcxCustomGridTableController.StopDragScroll; -begin - FreeAndNil(FDragScrollTimer); -end; - -function TcxCustomGridTableController.IsDragScroll: Boolean; -begin - Result := FDragScrollTimer <> nil; -end; - -function TcxCustomGridTableController.GetDragOpenInfo(AHitTest: TcxCustomGridHitTest): TcxCustomGridDragOpenInfo; -begin - if AHitTest.HitTestCode = htExpandButton then - Result := TcxGridDragOpenInfoExpand.Create(TcxGridExpandButtonHitTest(AHitTest).GridRecord) - else - Result := nil; -end; - -function TcxCustomGridTableController.IsDragOpenHitTest(AHitTest: TcxCustomGridHitTest; - out ADragOpenInfo: TcxCustomGridDragOpenInfo): Boolean; -begin - ADragOpenInfo := GetDragOpenInfo(AHitTest); - Result := ADragOpenInfo <> nil; -end; - -function TcxCustomGridTableController.GetItemForIncSearching: TcxCustomGridTableItem; -begin - if GridView.OptionsSelection.CellSelect then - Result := FocusedItem - else - begin - Result := GridView.OptionsBehavior.IncSearchItem; - if (Result = nil) and (GridView.VisibleItemCount <> 0) then - Result := GridView.VisibleItems[0]; - end; -end; - -procedure TcxCustomGridTableController.IncSearchKeyDown(var Key: Word; Shift: TShiftState); -begin - case Key of - VK_ESCAPE: - begin - CancelIncSearching; - Key := 0; - end; - VK_BACK: - begin - IncSearchingText := Copy(IncSearchingText, 1, Length(IncSearchingText) - 1); - Key := 0; - end; - VK_UP, VK_DOWN: - if Shift = [ssCtrl] then - begin - DataController.Search.LocateNext(Key = VK_DOWN); - Key := 0; - end; - end; -end; - -function TcxCustomGridTableController.GetEditingControllerClass: TcxGridEditingControllerClass; -begin - Result := TcxGridEditingController; -end; - -procedure TcxCustomGridTableController.BeginDragAndDrop; -begin - FEditingController.HideEdit(True); - inherited; -end; - -procedure TcxCustomGridTableController.ControlFocusChanged; -begin - inherited; - InvalidateSelection; -end; - -procedure TcxCustomGridTableController.DoCancelMode; -begin - inherited; - ClickedCellViewInfo := nil; - StopPullFocusing; - FinishSelection; -end; - -procedure TcxCustomGridTableController.DoKeyDown(var Key: Word; Shift: TShiftState); -var - APrevTopRecordIndex, APrevFocusedRecordIndex: Integer; - AGridViewLink: TcxGridListenerLink; -begin - APrevTopRecordIndex := TopRecordIndex; - AGridViewLink := GridView.AddListenerLink; - try - try - if IsIncSearching then - begin - IncSearchKeyDown(Key, Shift); - if AGridViewLink.GridView = nil then Exit; - end; - APrevFocusedRecordIndex := FocusedRecordIndex; - inherited; - if AGridViewLink.GridView <> nil then - if CanProcessMultiSelect(Key, Shift, FocusedRecordIndex <> APrevFocusedRecordIndex) then - MultiSelectKeyDown(Key, Shift); - finally - if AGridViewLink.GridView <> nil then - begin - if TopRecordIndex <> APrevTopRecordIndex then - Site.Update; - end - else - Key := 0; - end; - finally - AGridViewLink.Free; - end; -end; - -procedure TcxCustomGridTableController.EndDragAndDrop(Accepted: Boolean); -begin - ScrollDirection := dirNone; - inherited; - CheckEdit; -end; - -function TcxCustomGridTableController.FindNextItem(AFocusedItemIndex: Integer; - AGoForward, AGoOnCycle, AFollowVisualOrder: Boolean; out ACycleChanged: Boolean; - ARecord: TcxCustomGridRecord): Integer; -begin - if not FindNextCustomItem(AFocusedItemIndex, GridView.VisibleItemCount, - AGoForward, AGoOnCycle, @cxCustomGridTableControllerCanFocusItem, ARecord, Result, ACycleChanged) then - Result := -1; -end; - -function TcxCustomGridTableController.FindNextRecord(AFocusedRecordIndex: Integer; - AGoForward, AGoOnCycle: Boolean; out ACycleChanged: Boolean): Integer; -begin - if DataController.IsGridMode then - if AGoForward then - if not DataController.IsEOF and (AFocusedRecordIndex = ViewData.RecordCount - 1) then - begin - DataController.Scroll(1); - if not DataController.IsEOF then - Dec(AFocusedRecordIndex); - end - else - else - if (AFocusedRecordIndex = 0) and not DataController.IsBOF then - begin - DataController.Scroll(-1); - if not DataController.IsBOF then - Inc(AFocusedRecordIndex); - end; - if not FindNextCustomItem(AFocusedRecordIndex, ViewData.RecordCount, AGoForward, - AGoOnCycle, @cxCustomGridTableControllerCanFocusRecord, nil, Result, ACycleChanged) then - Result := -1; -end; - -function TcxCustomGridTableController.HasFilterMRUItemsPopup: Boolean; -begin - Result := FFilterMRUItemsPopup <> nil; -end; - -function TcxCustomGridTableController.HasFilterPopup: Boolean; -begin - Result := FFilterPopup <> nil; -end; - -function TcxCustomGridTableController.HasFocusedControls: Boolean; -begin - Result := inherited HasFocusedControls or - {IsEditing}(FEditingController.Edit <> nil) and FEditingController.Edit.IsFocused; -end; - -function TcxCustomGridTableController.HasItemsCustomizationPopup: Boolean; -begin - Result := FItemsCustomizationPopup <> nil; -end; - -function TcxCustomGridTableController.IsClickableRecordHitTest(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := (AHitTest is TcxGridRecordHitTest) and TcxGridRecordHitTest(AHitTest).CanClick; -end; - -function TcxCustomGridTableController.IsDataFullyVisible(AIsCallFromMaster: Boolean = False): Boolean; -begin - Result := ViewInfo.VisibleRecordCount = ViewData.RecordCount; -end; - -procedure TcxCustomGridTableController.KeyDown(var Key: Word; Shift: TShiftState); -var - ARemoveFocus: Boolean; -begin - inherited; - if not FBlockRecordKeyboardHandling and (FocusedRecord <> nil) then - FocusedRecord.KeyDown(Key, Shift); - case Key of - VK_INSERT: - if (Shift = []) and CanInsert(True) then - CreateNewRecord(False) - else - if (Shift = [ssCtrl]) and not IsEditing then - GridView.CopyToClipboard(False); - VK_DELETE: - if ((Shift = []) or (Shift = [ssCtrl])) and CanDelete(True) then - begin - DeleteSelection; - Key := 0; - end; - VK_ESCAPE: - if DataController.IsEditing then - begin - DataController.Cancel; - if not DataController.IsEditing and MultiSelect and (FocusedRecord <> nil) then - FocusedRecord.Selected := True; - Key := 0; - end; - VK_RETURN, VK_TAB: - if (Key = VK_RETURN) and GridView.OptionsBehavior.GoToNextCellOnEnter or - (Key = VK_TAB) and GridView.OptionsBehavior.FocusCellOnTab then - begin - ARemoveFocus := False; - if Shift + [ssShift] = [ssShift] then - if FocusNextCell(Shift = [], False, True, False) or (Key = VK_RETURN) then - Key := 0 - else - ARemoveFocus := not EditingController.IsEditing - else - ARemoveFocus := (Key = VK_TAB) and (Shift + [ssShift, ssCtrl] = [ssShift, ssCtrl]); - if ARemoveFocus then - TcxCustomGrid(GridView.Control).RemoveFocus(not (ssShift in Shift)); - end; - VK_PRIOR: - FocusPrevPage(False); - VK_NEXT: - FocusNextPage(False); - Ord('A'): - if Shift = [ssCtrl] then SelectAll; - Ord('C'): - if (Shift = [ssCtrl]) and not IsEditing then - GridView.CopyToClipboard(False); - end; -end; - -procedure TcxCustomGridTableController.KeyPress(var Key: Char); -begin - inherited; - if FEatKeyPress then - begin - FEatKeyPress := False; - Exit; - end; - // inc search - if IsIncSearchStartChar(Key) and - (ItemForIncSearching <> nil) and ItemForIncSearching.CanIncSearch and - not DataController.IsEditing then - begin - if Key <> #8 then - IncSearchingText := IncSearchingText + Key; - Key := #0; - end; - // editing - if IsEditStartChar(Key) and - (FocusedRecord <> nil) and FocusedRecord.HasCells and (FocusedItem <> nil) then - begin - EditingController.ShowEdit(FocusedItem, Key); - Key := #0; - end; -end; - -procedure TcxCustomGridTableController.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; - AGridViewLink: TcxGridListenerLink; -begin - FEditingController.StopEditShowingTimer; - AHitTest := ViewInfo.GetHitTest(X, Y); - AGridViewLink := GridView.AddListenerLink; - try - try - inherited; - finally - //AHitTest := ViewInfo.GetHitTest(X, Y); - if AGridViewLink.GridView <> nil then - begin - if not (AHitTest is TcxCustomGridViewHitTest) or - (TcxCustomGridViewHitTest(AHitTest).GridView = AGridViewLink.GridView) then - begin - if CanProcessMultiSelect(AHitTest, Shift) then - MultiSelectMouseDown(AHitTest, Shift); - if (Shift = [ssLeft]) and IsClickableRecordHitTest(AHitTest) and - SupportsPullFocusing and Site.MouseCapture and (GridView.DragMode = dmManual) then - StartPullFocusing(AHitTest); - end; - end; - end; - finally - AGridViewLink.Free; - end; -end; - -procedure TcxCustomGridTableController.MouseMove(Shift: TShiftState; X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; - ADirection: TcxDirection; -begin - inherited; - if FIsPullFocusing then - begin - AHitTest := ViewInfo.GetHitTest(X, Y); - if (AHitTest is TcxGridRecordHitTest) and CanHandleHitTest(AHitTest) then - if (FPullFocusingMousePos.X <> X) or (FPullFocusingMousePos.Y <> Y) then - begin - StopPullFocusingScrolling; - DoPullFocusing(TcxGridRecordHitTest(AHitTest)); - SavePullFocusingPos; - Site.Update; - end - else - else - if GetPullFocusingScrollingDirection(X, Y, ADirection) then - StartPullFocusingScrolling(ADirection); - FPullFocusingMousePos := Point(X, Y); - end; -end; - -procedure TcxCustomGridTableController.MouseUp(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; -begin - inherited; - ClickedCellViewInfo := nil; - StopPullFocusing; - AHitTest := ViewInfo.GetHitTest(X, Y); - if (Button = mbLeft) and CanProcessMultiSelect(AHitTest, Shift) then - MultiSelectMouseUp(AHitTest, Shift); - FinishSelection; -end; - -function TcxCustomGridTableController.ProcessDetailDialogChar(ADetail: TcxCustomGridView; - ACharCode: Word): Boolean; -var - ARecord: TcxCustomGridRecord; -begin - Result := inherited ProcessDetailDialogChar(ADetail, ACharCode); - if not Result then - begin - ARecord := ViewData.GetRecordByIndex(ADetail.MasterGridRecordIndex); - Result := (ARecord <> nil) and (ARecord.ViewInfo <> nil) and - ARecord.ViewInfo.ProcessDialogChar(ACharCode); - end; -end; - -function TcxCustomGridTableController.ProcessDialogChar(ACharCode: Word): Boolean; -begin - Result := - (FocusedRecord <> nil) and (FocusedRecord.ViewInfo <> nil) and - FocusedRecord.ViewInfo.ProcessDialogChar(ACharCode) or - inherited ProcessDialogChar(ACharCode); -end; - -function TcxCustomGridTableController.SupportsTabAccelerators(AGridRecord: TcxCustomGridRecord): Boolean; -begin - Result := AGridRecord.Focused; -end; - -procedure TcxCustomGridTableController.BeforeStartDrag; -begin - inherited; - if DataController.IsEditing then - if dceModified in DataController.EditState then - DataController.Post - else - DataController.Cancel; -end; - -function TcxCustomGridTableController.CanDrag(X, Y: Integer): Boolean; -var - AHitTest: TcxCustomGridHitTest; -begin - Result := inherited CanDrag(X, Y); - if Result then - begin - AHitTest := ViewInfo.GetHitTest(X, Y); - Result := IsClickableRecordHitTest(AHitTest); - end; -end; - -procedure TcxCustomGridTableController.DragDrop(Source: TObject; X, Y: Integer); -begin - if GridView.OptionsBehavior.DragFocusing = dfDragDrop then - ProcessDragFocusing(X, Y); - inherited; -end; - -procedure TcxCustomGridTableController.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); - - procedure ProcessScrolling; - var - ADirection: TcxDirection; - begin - ADirection := GetDragScrollDirection(X, Y); - if (ADirection = dirNone) or (State = dsDragLeave) then - StopDragScroll - else - StartDragScroll(ADirection); - end; - - procedure ProcessOpening; - var - AHitTest: TcxCustomGridHitTest; - ADragOpenInfo: TcxCustomGridDragOpenInfo; - begin - AHitTest := ViewInfo.GetHitTest(X, Y); - if (State <> dsDragLeave) and IsDragOpenHitTest(AHitTest, ADragOpenInfo) then - TcxCustomGrid(Control).Controller.StartDragOpen(ADragOpenInfo) - else - TcxCustomGrid(Control).Controller.StopDragOpen; - end; - - procedure ProcessDragHighlighting; - var - AHitTest: TcxCustomGridHitTest; - begin - AHitTest := ViewInfo.GetHitTest(X, Y); - if (State <> dsDragLeave) and (AHitTest is TcxGridRecordHitTest) then - DragHighlightedRecord := TcxGridRecordHitTest(AHitTest).GridRecord - else - DragHighlightedRecord := nil; - end; - -begin - inherited; - if GridView.OptionsBehavior.DragScrolling then - ProcessScrolling; - if GridView.OptionsBehavior.DragOpening then - ProcessOpening; - if GridView.OptionsBehavior.DragHighlighting then - ProcessDragHighlighting; - if (State <> dsDragLeave) and (GridView.OptionsBehavior.DragFocusing = dfDragOver) then - ProcessDragFocusing(X, Y); -end; - -procedure TcxCustomGridTableController.DrawDragImage(ACanvas: TcxCanvas; R: TRect); -var - AParams: TcxViewParams; - - procedure DrawBorder(R: TRect); - var - I: Integer; - begin - for I := 1 to DragDropTextBorderSize do - begin - ACanvas.DrawFocusRect(R); - InflateRect(R, -1, -1); - end; - end; - - procedure DrawText(const R: TRect); - begin - with ACanvas do - begin - Font := AParams.Font; - Font.Color := AParams.TextColor; - Brush.Style := bsClear; - DrawText(FDragDropText, R, 0); - Brush.Style := bsSolid; - end; - end; - -begin - if FDragDropText = '' then Exit; - GetDragDropTextViewParams(AParams); - with ACanvas do - begin - Brush.Color := AParams.Color; - FillRect(R); - end; - Inc(R.Left, DragDropTextAreaOffset); - DrawBorder(R); - InflateRect(R, -DragDropTextIndent, -DragDropTextIndent); - DrawText(R); -end; - -procedure TcxCustomGridTableController.EndDrag(Target: TObject; X, Y: Integer); -begin - DragHighlightedRecord := nil; - TcxCustomGrid(Control).Controller.StopDragOpen; - StopDragScroll; - inherited; -end; - -function TcxCustomGridTableController.GetDragDropText(ADragObject: TDragObject): string; -begin - if GridView.OptionsBehavior.DragDropText then - Result := GridView.DoGetDragDropText(FocusedRecord, FocusedItem) - else - Result := ''; -end; - -procedure TcxCustomGridTableController.GetDragDropTextViewParams(out AParams: TcxViewParams); -begin - GridView.Styles.GetContentParams(nil, nil, AParams); -end; - -function TcxCustomGridTableController.GetDragImagesSize: TPoint; -var - AParams: TcxViewParams; - ACanvas: TcxCanvas; -begin - if FDragDropText = '' then - Result := Point(0, 0) - else - begin - GetDragDropTextViewParams(AParams); - ACanvas := ViewInfo.Canvas; - ACanvas.Font := AParams.Font; - Result := Point( - DragDropTextAreaOffset + DragDropTextIndent + ACanvas.TextWidth(FDragDropText) + DragDropTextIndent, - DragDropTextIndent + ACanvas.TextHeight(FDragDropText) + DragDropTextIndent); - end; -end; - -function TcxCustomGridTableController.HasDragImages: Boolean; -begin - Result := True; -end; - -procedure TcxCustomGridTableController.StartDrag(var DragObject: TDragObject); - - function GetCursor: TCursor; - begin - if SelectedRecordCount > 1 then - Result := crcxGridMultiDrag - else - Result := crcxGridDrag; - end; - -begin - inherited; - TControlAccess(Site).DragCursor := GetCursor; - FDragDropText := GetDragDropText(DragObject); -end; - -procedure TcxCustomGridTableController.CancelIncSearching; -begin - DataController.Search.Cancel; -end; - -function TcxCustomGridTableController.CheckEditing(var AFocusedRecordIndex: Integer; - AGoForward: Boolean): Boolean; -var - AGridViewLink: TcxGridListenerLink; -begin - Result := False; - //AGridView.BeginUpdate; - commented because of dialog calling in OnBeforePost - AGridViewLink := GridView.AddListenerLink; - try - try - if DataController.IsEditing then - begin - EditingController.UpdateValue; - if not (dceModified in DataController.EditState) then - begin - if DataController.EditState = [dceInsert] then - begin - Result := AGoForward xor DataController.IsEOF; - if Result then DataController.Cancel; - end; - Exit; - end; - DataController.Post; - if AGridViewLink.GridView = nil then Exit; - if AFocusedRecordIndex <> -1 then - AFocusedRecordIndex := FocusedRecordIndex; - end; - finally - if AGridViewLink.GridView = nil then - Result := True - else - begin - //AGridView.EndUpdate; - end; - end; - finally - AGridViewLink.Free; - end; -end; - -procedure TcxCustomGridTableController.CheckScrolling(const P: TPoint); -begin -end; - -procedure TcxCustomGridTableController.ClearSelection; -begin - DataController.ClearSelection; -end; - -procedure TcxCustomGridTableController.CreateNewRecord(AtEnd: Boolean); -var - AIsEditing: Boolean; -begin - GridView.Focused := True; - AIsEditing := IsEditing; - if AtEnd then - if CanAppend(False) then - DataController.Append - else - else - if CanInsert(False) then - begin - DataController.Insert; - if MultiSelect and (ViewData.EditingRecord <> nil) then - ViewData.EditingRecord.Selected := True; - end; - if (dceInsert in DataController.EditState) and - GridView.OptionsBehavior.FocusFirstCellOnNewRecord then - begin - FocusFirstAvailableItem; - if AIsEditing then - FEditingController.ShowEdit; - end; -end; - -procedure TcxCustomGridTableController.DeleteSelection; -var - AMultiSelect: Boolean; - - function GetConfirmationText: string; - begin - if AMultiSelect then - Result := cxGetResourceString(@scxGridDeletingSelectedConfirmationText) - else - Result := cxGetResourceString(@scxGridDeletingFocusedConfirmationText); - end; - -begin - if not CanDelete(False) then Exit; - AMultiSelect := MultiSelect and (SelectedRecordCount <> 0) and - ((SelectedRecordCount > 1) or (SelectedRecords[0] = nil) or - (FocusedRecordIndex <> SelectedRecords[0].Index)); - - if not GridView.OptionsData.DeletingConfirmation or - (cxMessageDlg(GetConfirmationText, - cxGetResourceString(@scxGridDeletingConfirmationCaption), - mtConfirmation, [mbOK, mbCancel], 0) = mrOk) - then - if AMultiSelect then - DataController.DeleteSelection - else - DataController.DeleteFocused; -end; - -function TcxCustomGridTableController.FocusFirstAvailableItem: Boolean; -begin - Result := FocusNextItem(-1, True, False, False, True); -end; - -function TcxCustomGridTableController.FocusNextCell(AGoForward: Boolean; - AProcessCellsOnly: Boolean = True; AAllowCellsCycle: Boolean = True; - AFollowVisualOrder: Boolean = True): Boolean; -begin - if FocusedRecordHasCells(True) then - Result := FocusNextItem(FocusedItemIndex, AGoForward, False, - AAllowCellsCycle and GridView.OptionsBehavior.FocusCellOnCycle, AFollowVisualOrder) - else - if AProcessCellsOnly or not GridView.OptionsBehavior.FocusCellOnCycle then - Result := False - else - begin - Result := FocusNextRecord(FocusedRecordIndex, AGoForward, False, False, False); - if FocusedRecordHasCells(True) then - FocusNextItem(-1, AGoForward, True, False, AFollowVisualOrder); - end; -end; - -function TcxCustomGridTableController.FocusNextItem(AFocusedItemIndex: Integer; - AGoForward, AGoOnCycle, AGoToNextRecordOnCycle, AFollowVisualOrder: Boolean): Boolean; -var - ANextItemIndex: Integer; - ACycleChanged: Boolean; -begin - ANextItemIndex := FindNextItem(AFocusedItemIndex, AGoForward, - AGoOnCycle or AGoToNextRecordOnCycle, AFollowVisualOrder, ACycleChanged, FocusedRecord); - Result := CanFocusNextItem(AFocusedItemIndex, ANextItemIndex, AGoForward, - AGoOnCycle, AGoToNextRecordOnCycle); - if Result then - begin - if ACycleChanged and AGoToNextRecordOnCycle then - if FocusedRecord.IsNewItemRecord then - begin - DataController.Post; - if ViewData.NewItemRecord <> nil then - ViewData.NewItemRecord.Focused := True; - Result := True; - end - else - Result := FocusNextRecord(FocusedRecordIndex, AGoForward, False, False, False){ and - FocusedRecordHasCells(True)} - else - Result := True; - if Result then - GridView.VisibleItems[ANextItemIndex].Focused := True; - end; -end; - -function TcxCustomGridTableController.FocusNextRecord(AFocusedRecordIndex: Integer; - AGoForward, AGoOnCycle, AGoIntoDetail, AGoOutOfDetail: Boolean): Boolean; -var - AGridViewLink: TcxGridListenerLink; - APrevFocused, ACycleChanged: Boolean; - APrevFocusedRecord, ANextRecord, AChildRecord: TcxCustomGridRecord; - ANextRecordIndex: Integer; - - procedure CheckGridMode; - begin - if DataController.IsGridMode and (AFocusedRecordIndex = -1) then - if AGoForward then - DataController.GotoFirst - else - if AGoOnCycle then - DataController.GotoLast; - end; - - procedure ProcessMultiSelect; - var - AFocusedView: TcxCustomGridView; - begin - if GridView.Focused = APrevFocused then Exit; - CheckFocusedRecordSelectionWhenExit(APrevFocusedRecord); - AFocusedView := TcxCustomGrid(Control).FocusedView; - if AFocusedView is TcxCustomGridTableView then - TcxCustomGridTableView(AFocusedView).Controller.SelectFocusedRecord; - end; - -begin - Result := CheckEditing(AFocusedRecordIndex, AGoForward); - if Result then Exit; - AGridViewLink := GridView.AddListenerLink; - try - CheckGridMode; - APrevFocused := GridView.Focused; - APrevFocusedRecord := FocusedRecord; - try - if AGoForward and AGoIntoDetail and GridView.IsMaster and - (AFocusedRecordIndex <> -1) then - ANextRecord := ViewData.Records[AFocusedRecordIndex].GetFirstFocusableChild - else - ANextRecord := nil; - if ANextRecord = nil then - begin - ANextRecordIndex := FindNextRecord(AFocusedRecordIndex, AGoForward, - AGoOnCycle, ACycleChanged); - if ANextRecordIndex <> -1 then - begin - ANextRecord := ViewData.Records[ANextRecordIndex]; - if not AGoForward and AGoIntoDetail and GridView.IsMaster then - begin - AChildRecord := ANextRecord.GetLastFocusableChild(True); - if AChildRecord <> nil then - ANextRecord := AChildRecord; - end; - end - else - if AGoForward and CanAppend(True) and (DataController.EditState <> [dceInsert]) then - begin - CreateNewRecord(True); - Result := True; - Exit; - end - else - if GridView.IsDetail and AGoOutOfDetail then - if not AGoForward and GridView.MasterGridRecord.CanFocus then - ANextRecord := GridView.MasterGridRecord - else - begin - Result := not DataController.IsGridMode and - MasterController.FocusNextRecord(GridView.MasterGridRecordIndex, - AGoForward, AGoOnCycle, not AGoForward, True); - Exit; - end; - end; - Result := ANextRecord <> nil; - if Result then - ANextRecord.Focused := True; - finally - if (AGridViewLink.GridView <> nil) and Result then - begin - ProcessMultiSelect; - //Site.Update; - end; - end; - finally - AGridViewLink.Free; - end; -end; - -function TcxCustomGridTableController.FocusNextRecordWithSelection(AFocusedRecordIndex: Integer; - AGoForward, AGoOnCycle, AGoIntoDetail: Boolean; ASyncSelection: Boolean = True): Boolean; -begin - Result := FocusNextRecord(AFocusedRecordIndex, AGoForward, AGoOnCycle, - AGoIntoDetail, AGoIntoDetail); - if Result and ASyncSelection then - SelectFocusedRecord; -end; - -function TcxCustomGridTableController.FocusRecord(AFocusedRecordIndex: Integer; - ASyncSelection: Boolean): Boolean; -begin - FocusedRecordIndex := AFocusedRecordIndex; - Result := FocusedRecordIndex = AFocusedRecordIndex; - if Result and ASyncSelection then - SelectFocusedRecord; -end; - -procedure TcxCustomGridTableController.MakeFocusedItemVisible; -begin - MakeItemVisible(FocusedItem); -end; - -procedure TcxCustomGridTableController.MakeFocusedRecordVisible; -begin - if not IsFocusing then - MakeRecordVisible(FocusedRecord); -end; - -procedure TcxCustomGridTableController.MakeRecordVisible(ARecord: TcxCustomGridRecord); -var - AFocusedView: TcxCustomGridView; - AIndex, APrevTopRecordIndex: Integer; -begin - if (ARecord = nil) or (GridView.Control = nil) then Exit; - AFocusedView := TcxCustomGrid(GridView.Control).FocusedView; - if (AFocusedView is TcxCustomGridTableView) and - not GridView.Focused and AFocusedView.HasAsMaster(GridView) and - TcxCustomGridTableView(AFocusedView).DontMakeMasterRecordVisible then Exit; - AIndex := ARecord.Index; - if AIndex <> -1 then - begin - if AIndex < TopRecordIndex then InternalTopRecordIndex := AIndex; - if ViewInfo.VisibleRecordCount = 0 then - if AIndex > TopRecordIndex then - InternalTopRecordIndex := AIndex - else - else - begin - Site.LockScrollBars; - try - while AIndex >= TopRecordIndex + ViewInfo.VisibleRecordCount do - begin - APrevTopRecordIndex := TopRecordIndex; - InternalTopRecordIndex := AIndex - GetVisibleRecordCount(AIndex, False) + 1; - if TopRecordIndex = APrevTopRecordIndex then Break; - end; - finally - Site.UnlockScrollBars; - end; - end; - end; - GridView.MakeMasterGridRecordVisible; -end; - -procedure TcxCustomGridTableController.SelectAll; -begin - SelectAllRecords; -end; - -procedure TcxCustomGridTableController.SelectAllRecords; -begin - DataController.SelectAll; -end; - -function TcxCustomGridTableController.GoToFirst(ASyncSelection: Boolean = True): Boolean; -begin - Result := FocusNextRecordWithSelection(-1, True, False, False, ASyncSelection); -end; - -function TcxCustomGridTableController.GoToLast(AGoIntoDetail: Boolean; - ASyncSelection: Boolean = True): Boolean; -begin - Result := FocusNextRecordWithSelection(-1, False, True, AGoIntoDetail, ASyncSelection); -end; - -function TcxCustomGridTableController.GoToNext(AGoIntoDetail: Boolean; - ASyncSelection: Boolean = True): Boolean; -begin - Result := FocusNextRecordWithSelection(FocusedRecordIndex, True, False, - AGoIntoDetail, ASyncSelection); -end; - -function TcxCustomGridTableController.GoToPrev(AGoIntoDetail: Boolean; - ASyncSelection: Boolean = True): Boolean; -begin - Result := FocusNextRecordWithSelection(FocusedRecordIndex, False, False, - AGoIntoDetail, ASyncSelection); -end; - -function TcxCustomGridTableController.IsFinish: Boolean; -var - ACycleChanged: Boolean; -begin - if DataController.IsGridMode then - Result := DataController.IsEOF - else - Result := FindNextRecord(FocusedRecordIndex, True, False, ACycleChanged) = -1; -end; - -function TcxCustomGridTableController.IsStart: Boolean; -var - ACycleChanged: Boolean; -begin - if DataController.IsGridMode then - Result := DataController.IsBOF - else - Result := FindNextRecord(FocusedRecordIndex, False, False, ACycleChanged) = -1; -end; - -{ TcxCustomGridFilterButtonPainter } - -function TcxCustomGridFilterButtonPainter.GetViewInfo: TcxCustomGridFilterButtonViewInfo; -begin - Result := TcxCustomGridFilterButtonViewInfo(inherited ViewInfo); -end; - -function TcxCustomGridFilterButtonPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridFilterCloseButtonPainter } - -procedure TcxGridFilterCloseButtonPainter.DrawContent; -begin - ViewInfo.LookAndFeelPainter.DrawFilterCloseButton(Canvas, ViewInfo.Bounds, - ViewInfo.ButtonState); -end; - -{ TcxGridFilterActivateButtonPainter } - -function TcxGridFilterActivateButtonPainter.GetViewInfo: TcxGridFilterActivateButtonViewInfo; -begin - Result := TcxGridFilterActivateButtonViewInfo(inherited ViewInfo); -end; - -procedure TcxGridFilterActivateButtonPainter.DrawContent; -begin - ViewInfo.LookAndFeelPainter.DrawFilterActivateButton(Canvas, ViewInfo.Bounds, - ViewInfo.ButtonState, ViewInfo.Checked); -end; - -{ TcxGridFilterDropDownButtonPainter } - -procedure TcxGridFilterDropDownButtonPainter.DrawContent; -begin - ViewInfo.LookAndFeelPainter.DrawFilterDropDownButton(Canvas, ViewInfo.Bounds, - ViewInfo.ButtonState, False); -end; - -{ TcxGridFilterCustomizeButtonPainter } - -procedure TcxGridFilterCustomizeButtonPainter.Paint; -begin - Canvas.Font := ViewInfo.Params.Font; - ViewInfo.LookAndFeelPainter.DrawButton(Canvas, ViewInfo.Bounds, ViewInfo.Text, - ViewInfo.ButtonState); -end; - -{ TcxGridFilterPainter } - -function TcxGridFilterPainter.GetViewInfo: TcxGridFilterViewInfo; -begin - Result := TcxGridFilterViewInfo(inherited ViewInfo); -end; - -procedure TcxGridFilterPainter.DrawBackground(const R: TRect); -begin - with ViewInfo do - LookAndFeelPainter.DrawFilterPanel(Canvas, R, Transparent, Params.Color, - BackgroundBitmap); -end; - -procedure TcxGridFilterPainter.DrawButtons; -var - I: Integer; -begin - with ViewInfo.ButtonsViewInfo do - for I := 0 to Count - 1 do - Items[I].Paint; -end; - -function TcxGridFilterPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -procedure TcxGridFilterPainter.Paint; -begin -// DrawButtons; - commented because of XP - inherited; - DrawButtons; -end; - -procedure TcxGridFilterPainter.PrepareCanvasForDrawText; -begin - inherited; - FTextWasUnderlined := False; - if ViewInfo.State in [gcsSelected, gcsPressed] then - with Canvas.Font do - if not (fsUnderline in Style) then - begin - Style := Style + [fsUnderline]; - FTextWasUnderlined := True; - end; -end; - -procedure TcxGridFilterPainter.UnprepareCanvasForDrawText; -begin - if FTextWasUnderlined then - with Canvas.Font do - Style := Style - [fsUnderline]; - inherited; -end; - -{ TcxGridTableDataCellPainter } - -function TcxGridTableDataCellPainter.GetViewInfo: TcxGridTableDataCellViewInfo; -begin - Result := TcxGridTableDataCellViewInfo(inherited ViewInfo); -end; - -procedure TcxGridTableDataCellPainter.DrawContent; -begin - if ViewInfo.Transparent and (ViewInfo.BackgroundBitmap <> nil) then - DrawBackground; - ViewInfo.EditViewInfo.Paint(Canvas); -end; - -procedure TcxGridTableDataCellPainter.DrawFocusRect; -begin - with ViewInfo do - if Focused and HasFocusRect then - GridViewInfo.Painter.DrawFocusRect(ContentBounds, GridView.OptionsSelection.HideFocusRectOnExit); -end; - -procedure TcxGridTableDataCellPainter.Paint; -begin - inherited; - DrawFocusRect; -end; - -{ TcxCustomGridRecordPainter } - -function TcxCustomGridRecordPainter.GetViewInfo: TcxCustomGridRecordViewInfo; -begin - Result := TcxCustomGridRecordViewInfo(inherited ViewInfo); -end; - -procedure TcxCustomGridRecordPainter.AfterPaint; -begin - DrawFocusRect; - if ViewInfo.GridRecord.Expandable and not DrawExpandButtonBeforePaint then - DrawExpandButton; - ViewInfo.GridViewInfo.Painter.ExcludeFromBackground(ViewInfo.Bounds); - inherited; -end; - -procedure TcxCustomGridRecordPainter.BeforePaint; -begin - inherited; - if ViewInfo.GridRecord.Expandable and DrawExpandButtonBeforePaint then - DrawExpandButton; - DrawBackground; -end; - -procedure TcxCustomGridRecordPainter.DrawBackground; -begin - if ViewInfo.Transparent then - DrawBackground(ViewInfo.BackgroundBitmapBounds); -end; - -procedure TcxCustomGridRecordPainter.DrawExpandButton; -var - AClipRegion: TcxRegion; -begin - AClipRegion := Canvas.GetClipRegion; - try - ViewInfo.GridViewInfo.LookAndFeelPainter.DrawExpandButton(Canvas, - ViewInfo.ExpandButtonBounds, ViewInfo.Expanded); - finally - Canvas.SetClipRegion(AClipRegion, roSet); // for speed - end; -end; - -function TcxCustomGridRecordPainter.DrawExpandButtonBeforePaint: Boolean; -begin - Result := False; // ViewInfo.GridViewInfo.LookAndFeelPainter.DrawExpandButtonFirst; - for speed -end; - -procedure TcxCustomGridRecordPainter.DrawFocusRect; -begin - with ViewInfo do - if Focused and HasFocusRect then - GridViewInfo.Painter.DrawFocusRect(FocusRectBounds, HideFocusRectOnExit); -end; - -procedure TcxCustomGridRecordPainter.Paint; -begin -end; - -{ TcxCustomGridRecordsPainter } - -constructor TcxCustomGridRecordsPainter.Create(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridRecordsViewInfo); -begin - inherited Create; - FCanvas := ACanvas; - FViewInfo := AViewInfo; -end; - -(*procedure TcxCustomGridRecordsPainter.BeforePaint; -begin {4} - with ViewInfo do //!!! cache bitmaps! - BackgroundBitmap := GetBackgroundBitmap; -end;*) - -procedure TcxCustomGridRecordsPainter.Paint; -var - I: Integer; -begin - with FViewInfo do - for I := 0 to Count - 1 do - with Items[I] do - if Calculated then Paint; -end; - -procedure TcxCustomGridRecordsPainter.MainPaint; -begin - //BeforePaint; - Paint; -end; - -{ TcxNavigatorSitePainter } - -function TcxNavigatorSitePainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxCustomGridTablePainter } - -function TcxCustomGridTablePainter.GetController: TcxCustomGridTableController; -begin - Result := TcxCustomGridTableController(inherited Controller); -end; - -function TcxCustomGridTablePainter.GetViewInfo: TcxCustomGridTableViewInfo; -begin - Result := TcxCustomGridTableViewInfo(inherited ViewInfo); -end; - -function TcxCustomGridTablePainter.CanOffset(AItemsOffset, DX, DY: Integer): Boolean; -begin - Result := not GridView.IsDesigning and // because of the DesignSelector - (ViewInfo.BackgroundBitmap = nil) and (ViewInfo.RecordsViewInfo.BackgroundBitmap = nil) and - not ViewInfo.NoDataInfoTextAreaVisible; -end; - -procedure TcxCustomGridTablePainter.DrawBackground; -begin - inherited; - if ViewInfo.NoDataInfoTextAreaVisible then - DrawInfoText; -end; - -procedure TcxCustomGridTablePainter.DrawFilterBar; -begin - ViewInfo.FilterViewInfo.Paint; -end; - -procedure TcxCustomGridTablePainter.DrawInfoText; -var - AParams: TcxViewParams; -begin - ViewInfo.GetNoDataInfoTextParams(AParams); - with Canvas do - begin - SetParams(AParams); - Brush.Style := bsClear; - DrawText(ViewInfo.NoDataInfoText, ViewInfo.NoDataInfoTextAreaBounds, - cxAlignCenter or cxWordBreak, True); - Brush.Style := bsSolid; - end; -end; - -procedure TcxCustomGridTablePainter.DrawNavigator; -begin - with ViewInfo do - if NavigatorSiteViewInfo.Visible then - begin - NavigatorViewInfo.Paint; - NavigatorSiteViewInfo.Paint; - end; -end; - -procedure TcxCustomGridTablePainter.DrawRecords; -begin - ViewInfo.RecordsViewInfo.Paint; -end; - -procedure TcxCustomGridTablePainter.Offset(AItemsOffset: Integer); -begin - GridView.ViewChanged; -end; - -procedure TcxCustomGridTablePainter.Offset(DX, DY: Integer); -begin - GridView.ViewChanged; -end; - -procedure TcxCustomGridTablePainter.PaintBefore; -begin - inherited; - DrawNavigator; -end; - -procedure TcxCustomGridTablePainter.PaintContent; -begin - inherited; - DrawRecords; -end; - -procedure TcxCustomGridTablePainter.DoOffset(AItemsOffset, DX, DY: Integer); -begin - if not Site.HandleAllocated then Exit; - if CanOffset(AItemsOffset, DX, DY) then - begin - Controller.BeforePaint; - try - if AItemsOffset = 0 then - Offset(DX, DY) - else - Offset(AItemsOffset); - finally - Controller.AfterPaint; - end; - end - else - GridView.ViewChanged; -end; - -procedure TcxCustomGridTablePainter.DrawFocusRect(const R: TRect; AHideFocusRect: Boolean); -begin - if ViewInfo.GridView.OptionsView.FocusRect then inherited; -end; - -{ TcxCustomGridPartViewInfo } - -constructor TcxCustomGridPartViewInfo.Create(AGridViewInfo: TcxCustomGridTableViewInfo); -begin - inherited Create(AGridViewInfo); - if IsPart then - GridViewInfo.AddPart(Self); -end; - -destructor TcxCustomGridPartViewInfo.Destroy; -begin - if IsPart then - GridViewInfo.RemovePart(Self); - inherited; -end; - -function TcxCustomGridPartViewInfo.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -function TcxCustomGridPartViewInfo.GetGridViewInfo: TcxCustomGridTableViewInfo; -begin - Result := TcxCustomGridTableViewInfo(inherited GridViewInfo); -end; - -function TcxCustomGridPartViewInfo.GetIndex: Integer; -begin - Result := GridViewInfo.FParts.IndexOf(Self); -end; - -procedure TcxCustomGridPartViewInfo.SetIndex(Value: Integer); -begin - if Index <> Value then - GridViewInfo.FParts.Move(Index, Value); -end; - -function TcxCustomGridPartViewInfo.CalculateBounds: TRect; -begin - Result := GridViewInfo.CalculatePartBounds(Self); -end; - -procedure TcxCustomGridPartViewInfo.CalculateInvisible; -begin - FHeight := 0; - inherited Calculate(0, 0, 0, 0); -end; - -procedure TcxCustomGridPartViewInfo.CalculateVisible; -begin - FHeight := CalculateHeight; - with CalculateBounds do - Calculate(Left, Top, Right - Left, Bottom - Top); -end; - -function TcxCustomGridPartViewInfo.CustomDrawBackground(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDrawBackground(ACanvas); - if not Result then - GridView.DoCustomDrawPartBackground(ACanvas, Self, Result); -end; - -{function TcxCustomGridPartViewInfo.GetHeight: Integer; -begin - Result := inherited GetHeight; - if Result = 0 then Result := FHeight; -end;} - -function TcxCustomGridPartViewInfo.GetIsPart: Boolean; -begin - Result := True; -end; - -function TcxCustomGridPartViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxCustomGridPartPainter; -end; - -function TcxCustomGridPartViewInfo.HasCustomDrawBackground: Boolean; -begin - Result := GridView.HasCustomDrawPartBackground; -end; - -procedure TcxCustomGridPartViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - GridViewInfo.InitHitTest(AHitTest); -end; - -procedure TcxCustomGridPartViewInfo.MainCalculate; -begin - if Visible then - CalculateVisible - else - CalculateInvisible; -end; - -{ TcxCustomGridFilterButtonViewInfo } - -constructor TcxCustomGridFilterButtonViewInfo.Create(AContainer: TcxGridFilterButtonsViewInfo); -begin - inherited Create(AContainer.FilterViewInfo.GridViewInfo); - FContainer := AContainer; -end; - -function TcxCustomGridFilterButtonViewInfo.GetFilter: TcxDataFilterCriteria; -begin - Result := FContainer.FilterViewInfo.Filter; -end; - -function TcxCustomGridFilterButtonViewInfo.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -function TcxCustomGridFilterButtonViewInfo.CaptureMouseOnPress: Boolean; -begin - Result := True; -end; - -function TcxCustomGridFilterButtonViewInfo.GetAlignment: TcxGridFilterButtonAlignment; -begin - Result := fbaLeft; -end; - -function TcxCustomGridFilterButtonViewInfo.GetCanvas: TcxCanvas; -begin - Result := FContainer.FilterViewInfo.Canvas; -end; - -function TcxCustomGridFilterButtonViewInfo.GetHotTrack: Boolean; -begin - Result := True; -end; - -function TcxCustomGridFilterButtonViewInfo.GetVisible: Boolean; -begin - Result := not Filter.IsEmpty; -end; - -{ TcxGridFilterCloseButtonViewInfo } - -function TcxGridFilterCloseButtonViewInfo.CalculateHeight: Integer; -begin - Result := LookAndFeelPainter.FilterCloseButtonSize.Y; -end; - -function TcxGridFilterCloseButtonViewInfo.CalculateWidth: Integer; -begin - Result := LookAndFeelPainter.FilterCloseButtonSize.X; -end; - -procedure TcxGridFilterCloseButtonViewInfo.Click; -begin - inherited; - Filter.Clear; -end; - -function TcxGridFilterCloseButtonViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridFilterCloseButtonHitTest; -end; - -function TcxGridFilterCloseButtonViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridFilterCloseButtonPainter; -end; - -{ TcxGridFilterActivateButtonViewInfo } - -function TcxGridFilterActivateButtonViewInfo.GetChecked: Boolean; -begin - Result := Filter.Active; -end; - -function TcxGridFilterActivateButtonViewInfo.CalculateHeight: Integer; -begin - Result := LookAndFeelPainter.FilterActivateButtonSize.Y; -end; - -function TcxGridFilterActivateButtonViewInfo.CalculateWidth: Integer; -begin - Result := LookAndFeelPainter.FilterActivateButtonSize.X; -end; - -procedure TcxGridFilterActivateButtonViewInfo.Click; -begin - inherited; - with Filter do - Active := not Active; -end; - -function TcxGridFilterActivateButtonViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridFilterActivateButtonHitTest; -end; - -function TcxGridFilterActivateButtonViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridFilterActivateButtonPainter; -end; - -{ TcxGridFilterDropDownButtonViewInfo } - -function TcxGridFilterDropDownButtonViewInfo.GetDropDownWindowValue: TcxGridFilterMRUItemsPopup; -begin - Result := TcxGridFilterMRUItemsPopup(inherited DropDownWindow); -end; - -procedure TcxGridFilterDropDownButtonViewInfo.BeforeStateChange; -begin - inherited; - if State = gcsPressed then - Container.FilterViewInfo.State := gcsNone; -end; - -function TcxGridFilterDropDownButtonViewInfo.CalculateHeight: Integer; -begin - Result := LookAndFeelPainter.FilterCloseButtonSize.Y; -end; - -function TcxGridFilterDropDownButtonViewInfo.CalculateWidth: Integer; -begin - Result := LookAndFeelPainter.FilterCloseButtonSize.X; -end; - -function TcxGridFilterDropDownButtonViewInfo.CaptureMouseOnPress: Boolean; -begin - Result := False; -end; - -function TcxGridFilterDropDownButtonViewInfo.GetAlignment: TcxGridFilterButtonAlignment; -begin - Result := fbaRight; -end; - -function TcxGridFilterDropDownButtonViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridFilterDropDownButtonHitTest; -end; - -function TcxGridFilterDropDownButtonViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridFilterDropDownButtonPainter; -end; - -function TcxGridFilterDropDownButtonViewInfo.GetVisible: Boolean; -begin - Result := GridView.Filtering.IsMRUItemsListAvailable; -end; - -function TcxGridFilterDropDownButtonViewInfo.DropDownWindowExists: Boolean; -begin - Result := GridView.Controller.HasFilterMRUItemsPopup; -end; - -function TcxGridFilterDropDownButtonViewInfo.GetDropDownWindow: TcxCustomGridPopup; -begin - Result := GridView.Controller.FilterMRUItemsPopup; -end; - -function TcxGridFilterDropDownButtonViewInfo.GetDropDownWindowOwnerBounds: TRect; -begin - Result := Bounds; - Result.Left := Container.FilterViewInfo.TextAreaBounds.Left - - (DropDownWindow.BorderWidths[bLeft] + DropDownWindow.TextOffsetHorz); -end; - -procedure TcxGridFilterDropDownButtonViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - ALeftBound := Min(ALeftBound, Container.FilterViewInfo.TextBounds.Right + - cxGridCellTextOffset + FilterTextOffset + FilterButtonsOffset); - inherited; -end; - -{ TcxGridFilterCustomizeButtonViewInfo } - -function TcxGridFilterCustomizeButtonViewInfo.CalculateHeight: Integer; -begin - Result := BorderWidth[bTop] + BorderWidth[bBottom] + TextHeightWithOffset + - 2 * LookAndFeelPainter.ButtonTextOffset; -end; - -function TcxGridFilterCustomizeButtonViewInfo.CalculateWidth: Integer; -begin - Result := BorderWidth[bLeft] + BorderWidth[bRight] + TextWidthWithOffset + - 2 * LookAndFeelPainter.ButtonTextOffset; -end; - -procedure TcxGridFilterCustomizeButtonViewInfo.Click; -begin - inherited; - GridView.Filtering.RunCustomizeDialog; -end; - -function TcxGridFilterCustomizeButtonViewInfo.GetAlignment: TcxGridFilterButtonAlignment; -begin - Result := fbaRight; -end; - -function TcxGridFilterCustomizeButtonViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := taCenter; -end; - -function TcxGridFilterCustomizeButtonViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridFilterCustomizeButtonViewInfo.GetBorders: TcxBorders; -begin - Result := [bLeft, bTop, bRight, bBottom]; -end; - -function TcxGridFilterCustomizeButtonViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := LookAndFeelPainter.ButtonBorderSize; -end; - -function TcxGridFilterCustomizeButtonViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridFilterCustomizeButtonHitTest; -end; - -function TcxGridFilterCustomizeButtonViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridFilterCustomizeButtonPainter; -end; - -function TcxGridFilterCustomizeButtonViewInfo.GetText: string; -begin - Result := cxGetResourceString(@scxGridFilterCustomizeButtonCaption); -end; - -procedure TcxGridFilterCustomizeButtonViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - AParams.Font := Container.FilterViewInfo.Params.Font; -end; - -function TcxGridFilterCustomizeButtonViewInfo.GetVisible: Boolean; -begin - Result := GridView.FilterBox.CustomizeDialog; -end; - -{ TcxGridFilterButtonsViewInfo } - -constructor TcxGridFilterButtonsViewInfo.Create(AFilterViewInfo: TcxGridFilterViewInfo); -begin - inherited Create; - FFilterViewInfo := AFilterViewInfo; - FItems := TList.Create; - AddItems; -end; - -destructor TcxGridFilterButtonsViewInfo.Destroy; -begin - DestroyItems; - FItems.Free; - inherited; -end; - -function TcxGridFilterButtonsViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridFilterButtonsViewInfo.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(FFilterViewInfo.GridView); -end; - -function TcxGridFilterButtonsViewInfo.GetHeight: Integer; -var - I, AItemHeight: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - if Items[I].Visible then - begin - AItemHeight := Items[I].CalculateHeight; - if Result < AItemHeight then Result := AItemHeight; - end; - if Result <> 0 then Inc(Result, 2 * FilterButtonsFirstOffset); -end; - -function TcxGridFilterButtonsViewInfo.GetItem(Index: Integer): TcxCustomGridFilterButtonViewInfo; -begin - Result := TcxCustomGridFilterButtonViewInfo(FItems[Index]); -end; - -function TcxGridFilterButtonsViewInfo.GetWidth(AAlignment: TcxGridFilterButtonAlignment): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - with Items[I] do - if Visible and (Alignment = AAlignment) then - Inc(Result, CalculateWidth + FilterButtonsOffset); - if Result <> 0 then - Inc(Result, 2 * FilterButtonsFirstOffset - FilterButtonsOffset); -end; - -function TcxGridFilterButtonsViewInfo.GetWidthLeftPart: Integer; -begin - Result := GetWidth(fbaLeft); -end; - -function TcxGridFilterButtonsViewInfo.GetWidthRightPart: Integer; -begin - Result := GetWidth(fbaRight); -end; - -procedure TcxGridFilterButtonsViewInfo.AddItems; -begin - AddItem(TcxGridFilterCloseButtonViewInfo); - AddItem(TcxGridFilterActivateButtonViewInfo); - AddItem(TcxGridFilterCustomizeButtonViewInfo); - FDropDownButtonViewInfo := AddItem(TcxGridFilterDropDownButtonViewInfo) as TcxGridFilterDropDownButtonViewInfo; -end; - -procedure TcxGridFilterButtonsViewInfo.DestroyItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do Items[I].Free; - FItems.Clear; - FDropDownButtonViewInfo := nil; -end; - -function TcxGridFilterButtonsViewInfo.AddItem(AItemClass: TcxCustomGridFilterButtonViewInfoClass): TcxCustomGridFilterButtonViewInfo; -begin - Result := AItemClass.Create(Self); - FItems.Add(Result); -end; - -procedure TcxGridFilterButtonsViewInfo.Calculate(const ABounds: TRect); -var - ALeftMargin, ARightMargin, ALeft, I: Integer; -begin - ALeftMargin := ABounds.Left + FilterButtonsFirstOffset; - ARightMargin := ABounds.Right - FilterButtonsFirstOffset; - for I := 0 to Count - 1 do - with Items[I], ABounds do - if Visible then - begin - if Alignment = fbaLeft then - ALeft := ALeftMargin - else - ALeft := ARightMargin - CalculateWidth; - Calculate(ALeft, MulDiv(Top + Bottom - CalculateHeight, 1, 2)); - if Alignment = fbaLeft then - ALeftMargin := Items[I].Bounds.Right + FilterButtonsOffset - else - ARightMargin := Items[I].Bounds.Left - FilterButtonsOffset; - end; -end; - -function TcxGridFilterButtonsViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - begin - Result := Items[I].GetHitTest(P); - if Result <> nil then Break; - end; -end; - -{ TcxGridFilterViewInfo } - -constructor TcxGridFilterViewInfo.Create(AGridViewInfo: TcxCustomGridTableViewInfo); -begin - inherited; - CreateButtonsViewInfo; -end; - -destructor TcxGridFilterViewInfo.Destroy; -begin - DestroyButtonsViewInfo; - inherited; -end; - -function TcxGridFilterViewInfo.GetFilter: TcxDataFilterCriteria; -begin - Result := GridView.DataController.Filter; -end; - -function TcxGridFilterViewInfo.GetFiltering: TcxCustomGridTableFiltering; -begin - Result := TcxCustomGridTableView(GridView).Filtering; -end; - -procedure TcxGridFilterViewInfo.CreateButtonsViewInfo; -begin - FButtonsViewInfo := GetButtonsViewInfoClass.Create(Self); -end; - -procedure TcxGridFilterViewInfo.DestroyButtonsViewInfo; -begin - FreeAndNil(FButtonsViewInfo); -end; - -function TcxGridFilterViewInfo.CalculateButtonsViewInfoBounds: TRect; -begin - Result := Bounds; -end; - -function TcxGridFilterViewInfo.CalculateHeight: Integer; -var - AButtonsHeight: Integer; -begin - Result := FilterTextOffset + TextHeightWithOffset + FilterTextOffset; - AButtonsHeight := FButtonsViewInfo.Height; - if Result < AButtonsHeight then Result := AButtonsHeight; -end; - -function TcxGridFilterViewInfo.CalculateWidth: Integer; -begin - Result := GridViewInfo.ClientWidth; -end; - -function TcxGridFilterViewInfo.GetAlignment: TcxGridPartAlignment; -begin - Result := TcxGridPartAlignment(GridView.FilterBox.Position); -end; - -function TcxGridFilterViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridFilterViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := GridView.BackgroundBitmaps.GetBitmap(bbFilterBox); -end; - -function TcxGridFilterViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridFilterHitTest; -end; - -function TcxGridFilterViewInfo.GetHotTrack: Boolean; -begin - Result := Filtering.IsMRUItemsListAvailable; -end; - -function TcxGridFilterViewInfo.GetIsAutoWidth: Boolean; -begin - Result := True; -end; - -function TcxGridFilterViewInfo.GetIsCheck: Boolean; -begin - Result := True; -end; - -function TcxGridFilterViewInfo.GetIsScrollable: Boolean; -begin - Result := False; -end; - -function TcxGridFilterViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridFilterPainter; -end; - -function TcxGridFilterViewInfo.GetText: string; -begin - Result := Filter.FilterCaption; - if Result = '' then - Result := cxGetResourceString(@scxGridFilterIsEmpty); -end; - -function TcxGridFilterViewInfo.GetTextAreaBounds: TRect; -begin - Result := inherited GetTextAreaBounds; - Inc(Result.Left, FButtonsViewInfo.WidthLeftPart); - Dec(Result.Right, FButtonsViewInfo.WidthRightPart); - InflateRect(Result, -FilterTextOffset, 0); -end; - -procedure TcxGridFilterViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetViewParams(vsFilterBox, nil, nil, AParams); -end; - -function TcxGridFilterViewInfo.GetVisible: Boolean; -begin - Result := (GridView.FilterBox.Visible = fvAlways) or - (GridView.FilterBox.Visible = fvNonEmpty) and not Filter.IsEmpty; -end; - -function TcxGridFilterViewInfo.HasMouse(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := inherited HasMouse(AHitTest) and PtInRect(TextBounds, AHitTest.Pos); -end; - -function TcxGridFilterViewInfo.InvalidateOnStateChange: Boolean; -begin - Result := False; -end; - -procedure TcxGridFilterViewInfo.StateChanged(APrevState: TcxGridCellState); -begin - if not IsDestroying then - GridView.ViewChanged(TextBounds); - inherited; - if State = gcsPressed then - FButtonsViewInfo.DropDownButtonViewInfo.State := gcsPressed; -end; - -function TcxGridFilterViewInfo.GetButtonsViewInfoClass: TcxGridFilterButtonsViewInfoClass; -begin - Result := TcxGridFilterButtonsViewInfo; -end; - -procedure TcxGridFilterViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - FButtonsViewInfo.Calculate(CalculateButtonsViewInfoBounds); -end; - -function TcxGridFilterViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := FButtonsViewInfo.GetHitTest(P); - if Result = nil then - Result := inherited GetHitTest(P); -end; - -{ TcxGridTableCellViewInfo } - -constructor TcxGridTableCellViewInfo.Create(ARecordViewInfo: TcxCustomGridRecordViewInfo); -begin - inherited Create(ARecordViewInfo.GridViewInfo); - FRecordViewInfo := ARecordViewInfo; -end; - -function TcxGridTableCellViewInfo.GetCacheItem: TcxCustomGridTableViewInfoCacheItem; -begin - Result := FRecordViewInfo.CacheItem; -end; - -function TcxGridTableCellViewInfo.GetController: TcxCustomGridTableController; -begin - Result := TcxCustomGridTableController(inherited Controller); -end; - -function TcxGridTableCellViewInfo.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -function TcxGridTableCellViewInfo.GetGridRecord: TcxCustomGridRecord; -begin - Result := FRecordViewInfo.GridRecord; -end; - -function TcxGridTableCellViewInfo.GetSelected: Boolean; -begin - if not FSelectedCalculated then - begin - FSelected := CalculateSelected; - FSelectedCalculated := True; - end; - Result := FSelected; -end; - -function TcxGridTableCellViewInfo.GetGridViewInfo: TcxCustomGridTableViewInfo; -begin - Result := FRecordViewInfo.GridViewInfo; -end; - -function TcxGridTableCellViewInfo.CalculateSelected: Boolean; -begin - Result := GridView.DrawDataCellSelected(GridRecord, nil, True, Self); -end; - -function TcxGridTableCellViewInfo.GetAlwaysSelected: Boolean; -begin - Result := False; -end; - -function TcxGridTableCellViewInfo.GetCanvas: TcxCanvas; -begin - Result := GridViewInfo.Canvas; -end; - -function TcxGridTableCellViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridRecordHitTest; -end; - -function TcxGridTableCellViewInfo.GetTransparent: Boolean; -begin {4} - Result := FRecordViewInfo.GetCellTransparent(Self); -end; - -procedure TcxGridTableCellViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - TcxGridRecordHitTest(AHitTest).GridRecord := GridRecord; -end; - -procedure TcxGridTableCellViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - FSelectedCalculated := False; - inherited; -end; - -function TcxGridTableCellViewInfo.CanDrawSelected: Boolean; -begin - Result := False; -end; - -function TcxGridTableCellViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -var - AGridViewLink: TcxGridListenerLink; -begin - AGridViewLink := GridView.AddListenerLink; - try - GridViewInfo.AddActiveViewInfo(Self); - try - Result := FRecordViewInfo.MouseDown(AHitTest, AButton, AShift); - if Result and TcxCustomGridTableView(AGridViewLink.GridView).ViewInfo.IsViewInfoActive(Self) then - inherited MouseDown(AHitTest, AButton, AShift); - finally - if AGridViewLink.GridView <> nil then - TcxCustomGridTableView(AGridViewLink.GridView).ViewInfo.RemoveActiveViewInfo(Self) - else - Result := False; - end; - finally - AGridViewLink.Free; - end; -end; - -{ TcxGridTableDataCellViewInfo } - -constructor TcxGridTableDataCellViewInfo.Create(ARecordViewInfo: TcxCustomGridRecordViewInfo; - AItem: TcxCustomGridTableItem); -begin - inherited Create(ARecordViewInfo); - FItem := AItem; - FItem.AddCell(Self); - FProperties := FItem.GetProperties(GridRecord); - FEditViewInfo := CreateEditViewInfo; - FStyle := FItem.GetCellStyle; -end; - -destructor TcxGridTableDataCellViewInfo.Destroy; -begin - if FItem <> nil then - begin - if FItem.Controller.ClickedCellViewInfo = Self then - FItem.Controller.ClickedCellViewInfo := nil; - if not GridView.IsDestroying then - FItem.ReleaseCellStyle; - FItem.RemoveCell(Self); - end; - FEditViewInfo.Free; - inherited; -end; - -function TcxGridTableDataCellViewInfo.GetEditing: Boolean; -begin - Result := FItem.Editing and Focused; -end; - -function TcxGridTableDataCellViewInfo.GetMousePos: TPoint; -begin - Result := GridViewInfo.MousePos; -end; - -function TcxGridTableDataCellViewInfo.GetProperties: TcxCustomEditProperties; -begin - Result := FProperties; - FItem.InitProperties(Result); -end; - -function TcxGridTableDataCellViewInfo.GetShowButtons: Boolean; -begin - Result := FItem.ShowButtons(RecordViewInfo.Focused); -end; - -procedure TcxGridTableDataCellViewInfo.AfterCustomDraw(ACanvas: TcxCanvas); -begin - FEditViewInfo.BackgroundColor := ACanvas.Brush.Color; - if FEditViewInfo is TcxCustomTextEditViewInfo then - with TcxCustomTextEditViewInfo(FEditViewInfo) do - begin - Font := ACanvas.Font; - TextColor := ACanvas.Font.Color; - end; -end; - -procedure TcxGridTableDataCellViewInfo.BeforeCustomDraw(ACanvas: TcxCanvas); -begin - ACanvas.Brush.Color := FEditViewInfo.BackgroundColor; - if FEditViewInfo is TcxCustomTextEditViewInfo then - with TcxCustomTextEditViewInfo(FEditViewInfo) do - begin - ACanvas.Font := Font; - ACanvas.Font.Color := TextColor; - end; -end; - -procedure TcxGridTableDataCellViewInfo.CalculateEditViewInfo(AEditViewInfo: TcxCustomEditViewInfo; - const AMousePos: TPoint); -begin - InitStyle; - CreateEditViewData; - try - FEditViewData.PaintOptions := []; - GetEditViewDataContentOffsets(FEditViewData.ContentOffset); - if AutoHeight or MultiLine then - begin - Include(FEditViewData.PaintOptions, epoAutoHeight); - FEditViewData.MaxLineCount := MaxLineCount; - end; - if ShowEndEllipsis then - Include(FEditViewData.PaintOptions, epoShowEndEllipsis); - FEditViewData.IsSelected := Selected; - AEditViewInfo.Transparent := Transparent; {4} - InitTextSelection; - FEditViewData.InplaceEditParams.Position := GetInplaceEditPosition; - FEditViewData.EditValueToDrawValue(Canvas, DisplayValue, AEditViewInfo); - FEditViewData.Calculate(Canvas, EditViewDataBounds, AMousePos, cxmbNone, [], AEditViewInfo, True); - finally - DestroyEditViewData; - end; -end; - -function TcxGridTableDataCellViewInfo.CalculateHeight: Integer; -var - AEditSizeProperties: TcxEditSizeProperties; -begin - CalculateParams; - if FItem.CanAutoHeight then - begin - CreateEditViewData; - try - SetRectEmpty(FEditViewData.ContentOffset); - Include(FEditViewData.PaintOptions, epoAllowZeroHeight); - with AEditSizeProperties do - begin - Height := -1; - MaxLineCount := Self.MaxLineCount; - with TextAreaBounds do - Width := Right - Left; - Inc(Width, 2 * (cxGridCellTextOffset - cxGridEditOffset)); - end; - if AEditSizeProperties.Width > 0 then - begin - FEditViewData.InplaceEditParams.Position := GetInplaceEditPosition; - Result := FEditViewData.GetEditSize(Canvas, DisplayValue, AEditSizeProperties).cy; - end - else - Result := 0; - if Result <> 0 then - Inc(Result, 2 * cxGridEditOffset) - else - if not SupportsZeroHeight then - Result := FItem.CalculateDefaultCellHeight(Canvas, Params.Font); - finally - DestroyEditViewData; - end; - end - else - Result := FItem.CalculateDefaultCellHeight(Canvas, Params.Font); - GridView.DoGetCellHeight(GridRecord, FItem, Self, Result); -end; - -function TcxGridTableDataCellViewInfo.CalculateSelected: Boolean; -begin - Result := GridView.DrawDataCellSelected(GridRecord, FItem, True, Self); -end; - -function TcxGridTableDataCellViewInfo.CanActivateEditOnMouseDown(AButton: TMouseButton): Boolean; -begin - Result := CanShowEdit and - ((AButton = mbLeft) and HotTrack or GridView.OptionsBehavior.AlwaysShowEditor); -end; - -function TcxGridTableDataCellViewInfo.CanShowEdit: Boolean; -begin - Result := True; -end; - -procedure TcxGridTableDataCellViewInfo.CheckEditHotTrack(const AMousePos: TPoint); -var - AEditViewInfo: TcxCustomEditViewInfo; -begin - if not GridView.Visible then Exit; - AEditViewInfo := CreateEditViewInfo; - try - CalculateEditViewInfo(AEditViewInfo, AMousePos); - if FEditViewInfo.Repaint(Control, AEditViewInfo) then - EditHotTrackChanged; - finally - AEditViewInfo.Free; - end; -end; - -function TcxGridTableDataCellViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDraw(ACanvas); - if not Result then - begin - FItem.DoCustomDrawCell(ACanvas, Self, Result); - if not Result then - GridView.DoCustomDrawCell(ACanvas, Self, Result); - end; -end; - -procedure TcxGridTableDataCellViewInfo.DoCalculateParams; -begin - inherited; - InitStyle; -end; - -procedure TcxGridTableDataCellViewInfo.EditHotTrackChanged; -var - AEditUpdateNeeded: Boolean; -begin - AEditUpdateNeeded := GridView.Controller.EditingController.EditUpdateNeeded; - Invalidate(True); - if not AEditUpdateNeeded then - GridView.Controller.EditingController.CancelEditUpdatePost; -end; - -function TcxGridTableDataCellViewInfo.GetAreaBounds: TRect; -begin - Result := RecordViewInfo.RecordsViewInfo.GetAreaBoundsForCell(Self); -end; - -function TcxGridTableDataCellViewInfo.GetAutoHeight: Boolean; -begin - Result := RecordViewInfo.AutoHeight; -end; - -function TcxGridTableDataCellViewInfo.GetDisplayValue: TcxEditValue; -begin - if Properties.GetEditValueSource(False) = evsValue then - Result := GridRecord.Values[FItem.Index] - else - Result := GridRecord.DisplayTexts[FItem.Index]; -end; - -function TcxGridTableDataCellViewInfo.GetEditBounds: TRect; -begin - Result := EditViewDataBounds; - InflateRect(Result, -cxGridEditOffset, -cxGridEditOffset); - if FItem.CanScroll then - with GridViewInfo.ScrollableAreaBoundsForEdit do - begin - //if Result.Left < Left then Result.Left := Left; - if Result.Right > Right then Result.Right := Right; - if Result.Bottom > Bottom then Result.Bottom := Bottom; - end; -end; - -function TcxGridTableDataCellViewInfo.GetEditViewDataBounds: TRect; -begin - Result := ContentBounds; -end; - -procedure TcxGridTableDataCellViewInfo.GetEditViewDataContentOffsets(var R: TRect); -begin - with R do - begin - Left := cxGridEditOffset; - Top := cxGridEditOffset; - Right := cxGridEditOffset; - Bottom := cxGridEditOffset; - end; -end; - -function TcxGridTableDataCellViewInfo.GetFocused: Boolean; -begin - Result := FItem.Focused and RecordViewInfo.Focused and (FItem.FocusedCellViewInfo = Self); -end; - -function TcxGridTableDataCellViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridRecordCellHitTest; -end; - -function TcxGridTableDataCellViewInfo.GetHotTrack: Boolean; -begin - Result := ShowButtons or (esoAlwaysHotTrack in Properties.GetSupportedOperations) and - (GridView.OptionsBehavior.ImmediateEditor or Focused); - //Result := ShowButtons or (esoAlwaysHotTrack in Properties.GetSupportedOperations); -end; - -function TcxGridTableDataCellViewInfo.GetMaxLineCount: Integer; -begin - Result := GridView.OptionsView.CellTextMaxLineCount; -end; - -function TcxGridTableDataCellViewInfo.GetMultiLine: Boolean; -begin - Result := RecordViewInfo.RecordsViewInfo.IsCellMultiLine(Item); -end; - -function TcxGridTableDataCellViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridTableDataCellPainter; -end; - -function TcxGridTableDataCellViewInfo.GetShowEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.CellEndEllipsis; -end; - -function TcxGridTableDataCellViewInfo.GetText: string; -begin - if FEditViewInfo is TcxCustomTextEditViewInfo then - Result := TcxCustomTextEditViewInfo(FEditViewInfo).Text - else - Result := ''; -end; - -function TcxGridTableDataCellViewInfo.GetValue: Variant; -begin - Result := GridRecord.Values[FItem.Index]; -end; - -procedure TcxGridTableDataCellViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetDataCellParams(GridRecord, FItem, Params, True, Self); -end; - -function TcxGridTableDataCellViewInfo.HasCustomDraw: Boolean; -begin - Result := FItem.HasCustomDrawCell or GridView.HasCustomDrawCell; -end; - -function TcxGridTableDataCellViewInfo.HasFocusRect: Boolean; -begin - Result := not GridView.OptionsSelection.InvertSelect and not Editing; -end; - -procedure TcxGridTableDataCellViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - TcxGridRecordCellHitTest(AHitTest).Item := Item; -end; - -procedure TcxGridTableDataCellViewInfo.InitTextSelection; -var - AIncSearchParams: TcxViewParams; -begin - with FEditViewData do - if IsTextSelected then - begin - SelStart := 0; - SelLength := Length(Controller.IncSearchingText); - GridView.Styles.GetViewParams(vsIncSearch, nil, nil, AIncSearchParams); - SelBackgroundColor := AIncSearchParams.Color; - SelTextColor := AIncSearchParams.TextColor; - end - else - SelLength := 0; -end; - -function TcxGridTableDataCellViewInfo.InvalidateOnStateChange: Boolean; -begin - Result := False; -end; - -function TcxGridTableDataCellViewInfo.IsTextSelected: Boolean; -begin - Result := RecordViewInfo.RecordsViewInfo.IncSearchingCellViewInfo = Self; -end; - -procedure TcxGridTableDataCellViewInfo.MouseLeave; -begin - inherited; - if HotTrack then - CheckEditHotTrack(Bounds.BottomRight); -end; - -procedure TcxGridTableDataCellViewInfo.Offset(DX, DY: Integer); -begin - inherited; - FEditViewInfo.Offset(DX, DY); -end; - -procedure TcxGridTableDataCellViewInfo.RestoreParams(const AParams: TcxViewParams); -begin - FEditViewInfo.BackgroundColor := AParams.Color; - if FEditViewInfo is TcxCustomTextEditViewInfo then - with TcxCustomTextEditViewInfo(FEditViewInfo) do - begin - Font := AParams.Font; - TextColor := AParams.TextColor; - end; -end; - -procedure TcxGridTableDataCellViewInfo.SaveParams(out AParams: TcxViewParams); -begin - AParams.Color := FEditViewInfo.BackgroundColor; - if FEditViewInfo is TcxCustomTextEditViewInfo then - with TcxCustomTextEditViewInfo(FEditViewInfo) do - begin - AParams.Font := Font; - AParams.TextColor := TextColor; - end; -end; - -procedure TcxGridTableDataCellViewInfo.StateChanged(APrevState: TcxGridCellState); -begin - inherited; - if State = gcsNone then EditHotTrackChanged; -end; - -function TcxGridTableDataCellViewInfo.SupportsZeroHeight: Boolean; -begin - Result := False; -end; - -function TcxGridTableDataCellViewInfo.CanShowAutoHint: Boolean; -begin - Result := GridView.OptionsBehavior.CellHints; -end; - -function TcxGridTableDataCellViewInfo.CanShowCustomHint: Boolean; -begin - Result := Item.HasCellHintHandler; -end; - -function TcxGridTableDataCellViewInfo.CanShowHint: Boolean; -begin - Result := (CanShowAutoHint or CanShowCustomHint) and not Editing; -end; - -function TcxGridTableDataCellViewInfo.GetCellBoundsForHint: TRect; -begin - Result := ContentBounds; -end; - -function TcxGridTableDataCellViewInfo.NeedShowHint(const AMousePos: TPoint; - out AHintText: TCaption; out AIsHintMultiLine: Boolean; out ATextRect: TRect): Boolean; -begin - if CanShowAutoHint then - if UseStandardNeedShowHint then - Result := inherited NeedShowHint(AMousePos, AHintText, AIsHintMultiLine, ATextRect) - else - Result := FEditViewInfo.NeedShowHint(Canvas, AMousePos, GetAreaBoundsForHint, - AHintText, AIsHintMultiLine, ATextRect) - else - Result := False; - - if CanShowCustomHint and (Result or HasHintPoint(AMousePos)) then - begin - if not Result then - begin - AHintText := ''; - AIsHintMultiLine := False; - ATextRect := GetHintTextRect(AMousePos); - end; - Item.DoGetCellHint(GridRecord, Self, AMousePos, AHintText, AIsHintMultiLine, ATextRect); - if not Result then - Result := AHintText <> ''; - end; -end; - -function TcxGridTableDataCellViewInfo.UseStandardNeedShowHint: Boolean; -begin - Result := False; -end; - -procedure TcxGridTableDataCellViewInfo.InitStyle; -begin - FItem.InitStyle(FStyle, Params, RecordViewInfo.Focused); -end; - -function TcxGridTableDataCellViewInfo.CreateEditViewInfo: TcxCustomEditViewInfo; -begin - Result := Properties.GetViewInfoClass.Create as TcxCustomEditViewInfo; -end; - -procedure TcxGridTableDataCellViewInfo.CreateEditViewData; -begin - FEditViewData := FItem.GetEditViewData(GetProperties, FIsLocalCopyOfEditViewData); - FEditViewData.Data := GridRecord; -end; - -procedure TcxGridTableDataCellViewInfo.DestroyEditViewData; -begin - FItem.ReleaseEditViewData(FEditViewData, FIsLocalCopyOfEditViewData); -end; - -procedure TcxGridTableDataCellViewInfo.UpdateEdit; -begin - if not Controller.EditingController.EditPreparing then - Controller.EditingController.UpdateEdit; -end; - -procedure TcxGridTableDataCellViewInfo.BeforeRecalculation; -begin - GridViewInfo.UpdateMousePos; - inherited; -end; - -procedure TcxGridTableDataCellViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - CalculateEditViewInfo(FEditViewInfo, MousePos); - Text := GetText; - if not GridViewInfo.IsInternalUse and Editing then UpdateEdit; -end; - -function TcxGridTableDataCellViewInfo.CanDrawSelected: Boolean; -begin - Result := True; -end; - -function TcxGridTableDataCellViewInfo.GetInplaceEditPosition: TcxInplaceEditPosition; -begin - Result.Item := FItem; - Result.RecordIndex := RecordViewInfo.GridRecord.RecordIndex; -end; - -procedure TcxGridTableDataCellViewInfo.Invalidate(ARecalculate: Boolean); -begin - if IsDestroying then Exit; - if ARecalculate then Recalculate; - inherited Invalidate; - {if ARecalculate then - GridRecord.Invalidate(FItem) - else - inherited Invalidate;} -end; - -function TcxGridTableDataCellViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -var - AGridViewLink: TcxGridListenerLink; - AItem: TcxCustomGridTableItem; - AActivateEdit, AHotTrack, APostCheckEdit: Boolean; -begin - FWasFocusedBeforeClick := Focused; - AGridViewLink := GridView.AddListenerLink; - try - AItem := FItem; - AActivateEdit := CanActivateEditOnMouseDown(AButton); - AHotTrack := HotTrack; - - APostCheckEdit := False; - Controller.AllowCheckEdit := False; - GridView.DontMakeMasterRecordVisible := True; - GridView.ViewInfo.AddActiveViewInfo(Self); - try - if ssDouble in AShift then - begin - Result := GridView.DoCellDblClick(Self, AButton, AShift); - if Result or not AItem.GridView.ViewInfo.IsViewInfoActive(Self) then - begin - Result := False; - Exit; - end; - end; - Result := inherited MouseDown(AHitTest, AButton, AShift); - if Result and not AItem.Controller.EditingController.IsErrorOnEditExit then - begin - AItem.Focused := True; - if AItem.Focused then - if (AButton <> mbMiddle) and (AShift * [ssCtrl, ssShift] = []) and AActivateEdit then - begin - AItem.GridView.Site.FinishDragAndDrop(False); - if AHotTrack then - AItem.Controller.EditingController.ShowEdit(AItem, AShift, AHitTest.Pos.X, AHitTest.Pos.Y) - else - AItem.Controller.EditingController.ShowEdit(AItem); - end - else - AItem.Controller.IsReadyForImmediateEditing := True - else - APostCheckEdit := True; - if AItem.GridView.ViewInfo.IsViewInfoActive(Self) and - (AItem.Controller.EditingItem <> AItem) then - AItem.Controller.ClickedCellViewInfo := Self; - end; - finally - if AGridViewLink.GridView <> nil then - begin - AItem.GridView.ViewInfo.RemoveActiveViewInfo(Self); - AItem.GridView.DontMakeMasterRecordVisible := False; - AItem.Controller.AllowCheckEdit := True; - if APostCheckEdit then - AItem.Controller.PostCheckEdit; - end; - end; - finally - AGridViewLink.Free; - end; -end; - -function TcxGridTableDataCellViewInfo.MouseMove(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState): Boolean; -begin - Result := inherited MouseMove(AHitTest, AShift); - if HotTrack then - CheckEditHotTrack(AHitTest.Pos); -end; - -function TcxGridTableDataCellViewInfo.MouseUp(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; - - procedure ShowEdit; - var - AGridView: TcxCustomGridTableView; - begin - AGridView := GridView; - AGridView.DontMakeMasterRecordVisible := True; - try - Controller.EditingController.ShowEdit(FItem, AShift, AHitTest.Pos.X, AHitTest.Pos.Y); - finally - AGridView.DontMakeMasterRecordVisible := False; - end; - end; - -begin - inherited MouseUp(AHitTest, AButton, AShift); - if FItem.Controller.ClickedCellViewInfo = Self then - begin - FItem.Controller.ClickedCellViewInfo := nil; - Result := GridView.DoCellClick(Self, AButton, AShift); - if Result then Exit; - end - else - Result := False; - if (AButton = mbLeft) and (AShift * [ssCtrl, ssShift] = []) and - Focused and CanShowEdit then - begin - if not Editing then - if GridView.OptionsBehavior.ImmediateEditor then - if Controller.IsReadyForImmediateEditing then - ShowEdit - else - else - if FWasFocusedBeforeClick and not Controller.IsDblClick then - Controller.EditingController.StartEditShowingTimer(FItem); - Result := True; - end; -end; - -{ TcxCustomGridRecordViewInfo } - -constructor TcxCustomGridRecordViewInfo.Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); -begin - inherited Create(ARecordsViewInfo.GridViewInfo); - FRecordsViewInfo := ARecordsViewInfo; - FRecord := ARecord; - if FRecord <> nil then - begin - FIsRecordViewInfoAssigned := FRecord.ViewInfo <> nil; - if not FIsRecordViewInfoAssigned then - FRecord.FViewInfo := Self; - end; -end; - -destructor TcxCustomGridRecordViewInfo.Destroy; -begin - if not FIsRecordViewInfoAssigned and (FRecord <> nil) then - FRecord.FViewInfo := nil; - inherited; -end; - -function TcxCustomGridRecordViewInfo.GetCacheItem: TcxCustomGridTableViewInfoCacheItem; -begin - if FRecord = nil then - Result := nil - else - Result := TcxCustomGridTableViewInfoCacheItem(GridView.ViewInfoCache[FRecord.Index]); -end; - -function TcxCustomGridRecordViewInfo.GetExpanded: Boolean; -begin - if not FExpandedCalculated then - begin - FExpanded := (FRecord <> nil) and FRecord.Expanded; - FExpandedCalculated := True; - end; - Result := FExpanded; -end; - -function TcxCustomGridRecordViewInfo.GetFocused: Boolean; -begin - Result := GridView.DrawRecordFocused(GridRecord); -end; - -function TcxCustomGridRecordViewInfo.GetGridView: TcxCustomGridTableView; -begin - Result := GridViewInfo.GridView; -end; - -function TcxCustomGridRecordViewInfo.GetGridViewInfo: TcxCustomGridTableViewInfo; -begin - Result := FRecordsViewInfo.GridViewInfo; -end; - -function TcxCustomGridRecordViewInfo.GetIndex: Integer; -begin - Result := FRecordsViewInfo.FItems.IndexOf(Self); -end; - -function TcxCustomGridRecordViewInfo.GetSelected: Boolean; -begin - if not FSelectedCalculated then - begin - FSelected := CalculateSelected; - FSelectedCalculated := True; - end; - Result := FSelected; -end; - -function TcxCustomGridRecordViewInfo.CalculateSelected: Boolean; -begin - Result := GridView.DrawRecordSelected(GridRecord); -end; - -function TcxCustomGridRecordViewInfo.CanGenerateExpandButtonHitTest: Boolean; -begin - Result := True; -end; - -procedure TcxCustomGridRecordViewInfo.ControlFocusChanged; -begin -end; - -function TcxCustomGridRecordViewInfo.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxCustomGridRecordViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := FRecordsViewInfo.BackgroundBitmap; -end; - -function TcxCustomGridRecordViewInfo.GetBackgroundBitmapBounds: TRect; -begin - Result := ContentBounds; -end; - -function TcxCustomGridRecordViewInfo.GetCanvas: TcxCanvas; -begin - Result := FRecordsViewInfo.Canvas; -end; - -function TcxCustomGridRecordViewInfo.GetCellTransparent(ACell: TcxGridTableCellViewInfo): Boolean; -begin - Result := Transparent; -end; - -function TcxCustomGridRecordViewInfo.GetContentBounds: TRect; -begin - Result := Bounds; -end; - -function TcxCustomGridRecordViewInfo.GetExpandButtonAreaBounds: TRect; -begin - Result := cxEmptyRect; -end; - -function TcxCustomGridRecordViewInfo.GetFocusRectBounds: TRect; -begin - Result := Bounds; -end; - -function TcxCustomGridRecordViewInfo.GetFullyVisible: Boolean; -begin - Result := Index < FRecordsViewInfo.VisibleCount; -end; - -function TcxCustomGridRecordViewInfo.GetHeight: Integer; -begin - if CacheItem.IsHeightAssigned then - Result := CacheItem.Height - else - begin - Result := CalculateHeight; - CacheItem.Height := Result; - end; -end; - -function TcxCustomGridRecordViewInfo.GetHideFocusRectOnExit: Boolean; -begin - Result := GridView.OptionsSelection.HideFocusRectOnExit; -end; - -function TcxCustomGridRecordViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridRecordHitTest; -end; - -function TcxCustomGridRecordViewInfo.GetVisible: Boolean; -begin - Result := Index < FRecordsViewInfo.VisibleCount; -end; - -function TcxCustomGridRecordViewInfo.HasFocusRect: Boolean; -begin - Result := not GridRecord.CanFocusCells or GridView.OptionsSelection.InvertSelect; -end; - -procedure TcxCustomGridRecordViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - (AHitTest as TcxGridRecordHitTest).GridRecord := GridRecord; -end; - -function TcxCustomGridRecordViewInfo.IsClickHitTest(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := TcxCustomGridTableController(Controller).IsClickableRecordHitTest(AHitTest); -end; - -function TcxCustomGridRecordViewInfo.IsDetailVisible(ADetail: TcxCustomGridView): Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridRecordViewInfo.Offset(DX, DY: Integer); -begin - inherited; - OffsetRect(FExpandButtonBounds, DX, DY); -end; - -procedure TcxCustomGridRecordViewInfo.VisibilityChanged(AVisible: Boolean); -begin -end; - -procedure TcxCustomGridRecordViewInfo.BeforeRecalculation; -begin - inherited; - FRecordsViewInfo.BeforeItemRecalculation; -end; - -function TcxCustomGridRecordViewInfo.Click(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -var - AGridViewLink: TcxGridListenerLink; -begin - Result := ssDouble in AShift; - if not Result then - begin - AGridViewLink := GridView.AddListenerLink; - try - GridViewInfo.Controller.FocusedRecord := GridRecord; - finally - Result := AGridViewLink.GridView <> nil; {!!!} - AGridViewLink.Free; - end; - end; -end; - -function TcxCustomGridRecordViewInfo.GetBoundsForInvalidate(AItem: TcxCustomGridTableItem): TRect; -begin - if AItem = nil then - Result := Bounds - else - Result := GetBoundsForItem(AItem); -end; - -function TcxCustomGridRecordViewInfo.GetBoundsForItem(AItem: TcxCustomGridTableItem): TRect; -begin - Result := Rect(0, 0, 0, 0); -end; - -function TcxCustomGridRecordViewInfo.GetCellViewInfoByItem(AItem: TcxCustomGridTableItem): TcxGridTableDataCellViewInfo; -begin - Result := nil; -end; - -{procedure TcxCustomGridRecordViewInfo.GetDataCellViewParams(AItem: TcxCustomGridTableItem; - ACellViewInfo: TcxGridTableCellViewInfo; var AParams: TcxViewParams); -begin - RecordsViewInfo.GetDataCellViewParams(GridRecord, AItem, ACellViewInfo, AParams); -end;} - -function TcxCustomGridRecordViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - if CanGenerateExpandButtonHitTest and - GridRecord.Expandable and PtInRect(ExpandButtonAreaBounds, P) then - begin - Result := TcxGridExpandButtonHitTest.Instance(P); - InitHitTest(Result); - end - else - Result := inherited GetHitTest(P); -end; - -procedure TcxCustomGridRecordViewInfo.MainCalculate(ALeftBound, ATopBound: Integer); -begin - FSelectedCalculated := False; - Calculate(ALeftBound, ATopBound, Width, Height); - if GridRecord.Expandable then - CalculateExpandButtonBounds(FExpandButtonBounds); -end; - -function TcxCustomGridRecordViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if not Result and (AButton = mbLeft) and (AHitTest.HitTestCode = htExpandButton) then - begin - GridRecord.ToggleExpanded; - Result := True; - end; - if not Result and (AButton <> mbMiddle) and IsClickHitTest(AHitTest) and - GridView.Site.IsFocused then - Result := Click(AHitTest, AButton, AShift); -end; - -function TcxCustomGridRecordViewInfo.ProcessDialogChar(ACharCode: Word): Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridRecordViewInfo.Recalculate; -begin - BeforeRecalculation; - MainCalculate(Bounds.Left, Bounds.Top); - AfterRecalculation; -end; - -{ TcxCustomGridRecordsViewInfo } - -constructor TcxCustomGridRecordsViewInfo.Create(AGridViewInfo: TcxCustomGridTableViewInfo); -begin - inherited Create; - FGridViewInfo := AGridViewInfo; - CreateItems; -end; - -destructor TcxCustomGridRecordsViewInfo.Destroy; -begin - DestroyItems; - inherited; -end; - -function TcxCustomGridRecordsViewInfo.GetCanvas: TcxCanvas; -begin - Result := FGridViewInfo.Canvas; -end; - -function TcxCustomGridRecordsViewInfo.GetController: TcxCustomGridTableController; -begin - Result := FGridViewInfo.Controller; -end; - -function TcxCustomGridRecordsViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxCustomGridRecordsViewInfo.GetFirstRecordIndex: Integer; -begin - Result := FGridViewInfo.FirstRecordIndex; -end; - -function TcxCustomGridRecordsViewInfo.GetGridView: TcxCustomGridTableView; -begin - Result := FGridViewInfo.GridView; -end; - -function TcxCustomGridRecordsViewInfo.GetIncSearchingCellViewInfo: TcxGridTableDataCellViewInfo; -begin - if not FIsIncSearchingCellViewInfoCalculated then - FIncSearchingCellViewInfo := CalculateIncSearchingCellViewInfo; - Result := FIncSearchingCellViewInfo; -end; - -function TcxCustomGridRecordsViewInfo.GetItem(Index: Integer): TcxCustomGridRecordViewInfo; -begin - if Index < Count then - begin - Result := TcxCustomGridRecordViewInfo(FItems[Index]); - if Result.GridRecord = nil then - Result := nil; - end - else - begin - Result := CreateRecordViewInfo(Index); - FItems.Add(Result); - end; -end; - -function TcxCustomGridRecordsViewInfo.GetMaxCount: Integer; -begin - if (FirstRecordIndex = -1) or (ViewData.RecordCount = 0) then - Result := 0 - else - if GridViewInfo.CalculateDown then - Result := ViewData.RecordCount - FirstRecordIndex - else - Result := FirstRecordIndex + 1; - if Result < 0 then Result := 0; -end; - -function TcxCustomGridRecordsViewInfo.GetTopRecordIndex: Integer; -begin - Result := GridViewInfo.Controller.TopRecordIndex; -end; - -function TcxCustomGridRecordsViewInfo.GetViewData: TcxCustomGridTableViewData; -begin - Result := FGridViewInfo.ViewData; -end; - -procedure TcxCustomGridRecordsViewInfo.CreateItems; -begin - FItems := TList.Create; -end; - -procedure TcxCustomGridRecordsViewInfo.DestroyItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do - TObject(FItems[I]).Free; - FItems.Free; -end; - -function TcxCustomGridRecordsViewInfo.CreateRecordViewInfo(AIndex: Integer): TcxCustomGridRecordViewInfo; -var - ARecord: TcxCustomGridRecord; -begin - ARecord := ViewData.Records[GetRecordIndex(AIndex)]; - Result := ARecord.GetViewInfoClass.Create(Self, ARecord); -end; - -procedure TcxCustomGridRecordsViewInfo.AfterCalculate; -begin - DestroyEditViewDatas; - if FGridViewInfo.Visible then - Controller.EditingController.AfterViewInfoCalculate; -end; - -procedure TcxCustomGridRecordsViewInfo.BeforeCalculate; -begin - FBackgroundBitmap := GetBackgroundBitmap; - if FGridViewInfo.Visible then - Controller.EditingController.BeforeViewInfoCalculate; - CreateEditViewDatas; -end; - -procedure TcxCustomGridRecordsViewInfo.BeforeItemRecalculation; -begin - GridViewInfo.UpdateMousePos; - FIsIncSearchingCellViewInfoCalculated := False; -end; - -procedure TcxCustomGridRecordsViewInfo.AfterOffset; -begin -end; - -procedure TcxCustomGridRecordsViewInfo.BeforeOffset; -begin - FIsIncSearchingCellViewInfoCalculated := False; -end; - -procedure TcxCustomGridRecordsViewInfo.Calculate; -begin - FBounds := CalculateBounds; - FContentBounds := CalculateContentBounds; -end; - -function TcxCustomGridRecordsViewInfo.CalculateBounds: TRect; -begin - Result := FGridViewInfo.ClientBounds; -end; - -function TcxCustomGridRecordsViewInfo.CalculateContentBounds: TRect; -begin - Result := Bounds; -end; - -function TcxCustomGridRecordsViewInfo.CalculateIncSearchingCellViewInfo: TcxGridTableDataCellViewInfo; -begin - if Controller.IsIncSearching then - begin - Result := Controller.IncSearchingItem.FocusedCellViewInfo; - FIsIncSearchingCellViewInfoCalculated := Result <> nil; - end - else - begin - Result := nil; - FIsIncSearchingCellViewInfoCalculated := True; - end; -end; - -procedure TcxCustomGridRecordsViewInfo.CalculateVisibleCount; -begin - FVisibleCount := 0; -end; - -procedure TcxCustomGridRecordsViewInfo.CreateEditViewDatas; -var - I: Integer; -begin - with GridView do - for I := 0 to ItemCount - 1 do - Items[I].DoCreateEditViewData; -end; - -procedure TcxCustomGridRecordsViewInfo.DestroyEditViewDatas; -var - I: Integer; -begin - with GridView do - for I := 0 to ItemCount - 1 do - Items[I].DoDestroyEditViewData; -end; - -function TcxCustomGridRecordsViewInfo.GetAreaBoundsForCell(ACellViewInfo: TcxGridTableDataCellViewInfo): TRect; -begin - Result := GridViewInfo.ScrollableAreaBounds; -end; - -function TcxCustomGridRecordsViewInfo.GetAutoDataCellHeight: Boolean; -begin - Result := AutoRecordHeight; -end; - -function TcxCustomGridRecordsViewInfo.GetAutoDataRecordHeight: Boolean; -begin - Result := AutoDataCellHeight; -end; - -function TcxCustomGridRecordsViewInfo.GetAutoRecordHeight: Boolean; -begin - Result := GridView.OptionsView.CellAutoHeight or GridView.IsGetCellHeightAssigned; -end; - -function TcxCustomGridRecordsViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := GridView.BackgroundBitmaps.GetBitmap(bbContent); -end; - -function TcxCustomGridRecordsViewInfo.GetRecordIndex(AViewInfoIndex: Integer): Integer; -begin - if FGridViewInfo.CalculateDown then - Result := FGridViewInfo.FirstRecordIndex + AViewInfoIndex - else - Result := FGridViewInfo.FirstRecordIndex - AViewInfoIndex; -end; - -function TcxCustomGridRecordsViewInfo.GetViewInfoIndex(ARecordIndex: Integer): Integer; -begin - if FGridViewInfo.CalculateDown then - Result := ARecordIndex - FGridViewInfo.FirstRecordIndex - else - Result := FGridViewInfo.FirstRecordIndex - ARecordIndex; - if (Result < -1) or (Result >= Count) then Result := -1 -end; - -function TcxCustomGridRecordsViewInfo.IsEmpty: Boolean; -begin - Result := Count = 0; -end; - -procedure TcxCustomGridRecordsViewInfo.ControlFocusChanged; -var - I: Integer; -begin - for I := 0 to Count - 1 do - if Items[I] <> nil then - Items[I].ControlFocusChanged; -end; - -procedure TcxCustomGridRecordsViewInfo.VisibilityChanged(AVisible: Boolean); -var - I: Integer; -begin - for I := 0 to Count - 1 do - if Items[I] <> nil then - Items[I].VisibilityChanged(AVisible); -end; - -function TcxCustomGridRecordsViewInfo.GetPainterClass: TcxCustomGridRecordsPainterClass; -begin - Result := TcxCustomGridRecordsPainter; -end; - -function TcxCustomGridRecordsViewInfo.CanOffset(AItemCountDelta: Integer): Boolean; -begin - Result := (Count <> 0) and (Abs(AItemCountDelta) < Count); -end; - -function TcxCustomGridRecordsViewInfo.GetCellHeight(ACellContentHeight: Integer): Integer; -begin - Result := ACellContentHeight; -end; - -function TcxCustomGridRecordsViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I].GetHitTest(P); - if Result <> nil then Exit; - end; - Result := nil; -end; - -function TcxCustomGridRecordsViewInfo.GetRealItem(ARecord: TcxCustomGridRecord): TcxCustomGridRecordViewInfo; -var - AIndex: Integer; -begin - AIndex := GetViewInfoIndex(ARecord.Index); - if AIndex = -1 then - Result := nil - else - Result := Items[AIndex]; -end; - -function TcxCustomGridRecordsViewInfo.IsCellMultiLine(AItem: TcxCustomGridTableItem): Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridRecordsViewInfo.MainCalculate; -begin - BeforeCalculate; - Calculate; - AfterCalculate; -end; - -procedure TcxCustomGridRecordsViewInfo.Offset(AItemCountDelta: Integer); -var - AMoveCount: Integer; - - procedure DeleteItems; - var - I: Integer; - begin - if AItemCountDelta < 0 then - I := Count + AItemCountDelta - else - I := 0; - for I := I to I + Abs(AItemCountDelta) - 1 do - Items[I].Free; - end; - - procedure OffsetItemsList; - var - AIndexFrom: Integer; - begin - if AItemCountDelta < 0 then - AIndexFrom := 0 - else - AIndexFrom := AItemCountDelta; - with FItems do - System.Move(List[AIndexFrom], List[AIndexFrom - AItemCountDelta], SizeOf(Pointer) * AMoveCount); - end; - - procedure OffsetItems; - var - AIndexFrom, I: Integer; - begin - if AItemCountDelta < 0 then - AIndexFrom := Abs(AItemCountDelta) - else - AIndexFrom := 0; - for I := AIndexFrom to AIndexFrom + AMoveCount - 1 do - OffsetItem(I, FItemsOffset); - end; - - procedure CreateItems; - var - I: Integer; - begin - if AItemCountDelta < 0 then - I := 0 - else - I := Count - AItemCountDelta; - if Count > MaxCount then - FItems.Count := MaxCount; - for I := I to I + Abs(AItemCountDelta) - 1 do - if I < Count then - begin - FItems[I] := CreateRecordViewInfo(I); - Items[I].MainCalculate(GetItemLeftBound(I), GetItemTopBound(I)); - end; - end; - - procedure CheckForAppearedItems; - var - I: Integer; - begin - for I := 0 to Count - 1 do - if not Items[I].Calculated then - Items[I].MainCalculate(GetItemLeftBound(I), GetItemTopBound(I)); - end; - -begin - FItemsOffset := 0; - if AItemCountDelta = 0 then Exit; - AMoveCount := Count - Abs(AItemCountDelta); - if AItemCountDelta > 0 then - FItemsOffset := GetItemsOffset(AItemCountDelta); - DeleteItems; - OffsetItemsList; - if AItemCountDelta > 0 then OffsetItems; - CreateItems; - if AItemCountDelta < 0 then - begin - FItemsOffset := GetItemsOffset(AItemCountDelta); - OffsetItems; - end; - CalculateVisibleCount; - CheckForAppearedItems; -end; - -procedure TcxCustomGridRecordsViewInfo.Offset(DX, DY: Integer); -begin - OffsetRect(FBounds, DX, DY); - OffsetRect(FContentBounds, DX, DY); -end; - -procedure TcxCustomGridRecordsViewInfo.Paint; -begin - with GetPainterClass.Create(Canvas, Self) do - try - MainPaint; - finally - Free; - end; -end; - -{ TcxNavigatorSiteViewInfo } - -destructor TcxNavigatorSiteViewInfo.Destroy; -begin - if State <> gcsNone then - MouseLeave; - inherited; -end; - -function TcxNavigatorSiteViewInfo.GetGridViewInfo: TcxCustomGridTableViewInfo; -begin - Result := TcxCustomGridTableViewInfo(inherited GridViewInfo); -end; - -function TcxNavigatorSiteViewInfo.GetNavigatorViewInfo: TcxNavigatorViewInfo; -begin - Result := GridViewInfo.NavigatorViewInfo; -end; - -function TcxNavigatorSiteViewInfo.CalculateHeight: Integer; -begin - Result := GridViewInfo.Site.HScrollBar.Height; -end; - -function TcxNavigatorSiteViewInfo.CalculateWidth: Integer; -begin - with GridViewInfo do - Result := NavigatorSize.X + NavigatorOffset; -end; - -function TcxNavigatorSiteViewInfo.GetHeight: Integer; -begin - Result := CalculateHeight; -end; - -function TcxNavigatorSiteViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridNavigatorHitTest; -end; - -function TcxNavigatorSiteViewInfo.GetHotTrack: Boolean; -begin - Result := True; -end; - -function TcxNavigatorSiteViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxNavigatorSitePainter; -end; - -function TcxNavigatorSiteViewInfo.GetVisible: Boolean; -begin - Result := GridViewInfo.GridView.OptionsView.Navigator; -end; - -procedure TcxNavigatorSiteViewInfo.MouseLeave; -begin - inherited; - NavigatorViewInfo.MouseMove(-1, -1); -end; - -procedure TcxNavigatorSiteViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - AParams.Color := LookAndFeelPainter.DefaultGridDetailsSiteColor; -end; - -function TcxNavigatorSiteViewInfo.GetWidth: Integer; -begin - Result := CalculateWidth; -end; - -function TcxNavigatorSiteViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - with AHitTest.Pos do - NavigatorViewInfo.MouseDown(X, Y); - Result := True; -end; - -function TcxNavigatorSiteViewInfo.MouseMove(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState): Boolean; -begin - inherited MouseMove(AHitTest, AShift); - with AHitTest.Pos do - NavigatorViewInfo.MouseMove(X, Y); - Result := True; -end; - -function TcxNavigatorSiteViewInfo.MouseUp(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - with AHitTest.Pos do - NavigatorViewInfo.MouseUp(X, Y); - Result := True; -end; - -{ TcxCustomGridTableViewInfo } - -constructor TcxCustomGridTableViewInfo.Create(AGridView: TcxCustomGridView); -begin - FParts := TList.Create; - inherited; - FCalculateDown := True; - FFirstRecordIndex := RecordIndexNone; -end; - -destructor TcxCustomGridTableViewInfo.Destroy; -begin - FreeAndNil(FParts);//.Free; - inherited; -end; - -function TcxCustomGridTableViewInfo.GetController: TcxCustomGridTableController; -begin - Result := TcxCustomGridTableController(inherited Controller); -end; - -function TcxCustomGridTableViewInfo.GetExpandButtonSize: Integer; -begin - Result := LookAndFeelPainter.ExpandButtonSize; -end; - -function TcxCustomGridTableViewInfo.GetFirstRecordIndex: Integer; -begin - if FirstRecordIndexAssigned then - Result := FFirstRecordIndex - else - Result := Controller.TopRecordIndex; -end; - -function TcxCustomGridTableViewInfo.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -function TcxCustomGridTableViewInfo.GetPart(Index: Integer): TcxCustomGridPartViewInfo; -begin - Result := TcxCustomGridPartViewInfo(FParts[Index]); -end; - -function TcxCustomGridTableViewInfo.GetPartCount: Integer; -begin - Result := FParts.Count; -end; - -function TcxCustomGridTableViewInfo.GetPartsBottomHeight: Integer; -begin - Result := GetPartsCustomHeight(gpaBottom); -end; - -function TcxCustomGridTableViewInfo.GetPartsCustomHeight(AAlignment: TcxGridPartAlignment): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to PartCount - 1 do - with Parts[I] do - if Alignment = AAlignment then Inc(Result, Height); -end; - -function TcxCustomGridTableViewInfo.GetPartsTopHeight: Integer; -begin - Result := GetPartsCustomHeight(gpaTop); -end; - -function TcxCustomGridTableViewInfo.GetScrollableAreaWidth: Integer; -begin - with ScrollableAreaBoundsHorz do - Result := Right - Left; -end; - -function TcxCustomGridTableViewInfo.GetViewData: TcxCustomGridTableViewData; -begin - Result := TcxCustomGridTableViewData(inherited ViewData); -end; - -function TcxCustomGridTableViewInfo.GetVisibleRecordCount: Integer; -begin - Result := FRecordsViewInfo.VisibleCount; -end; - -procedure TcxCustomGridTableViewInfo.AddPart(AItem: TcxCustomGridPartViewInfo); -begin - FParts.Add(AItem); -end; - -procedure TcxCustomGridTableViewInfo.RemovePart(AItem: TcxCustomGridPartViewInfo); -begin - FParts.Remove(AItem); -end; - -function TcxCustomGridTableViewInfo.GetNavigatorBounds: TRect; -begin - Result := GetNavigatorSiteBounds; - Result.Right := Result.Left + NavigatorSize.X; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorButtons: TcxCustomNavigatorButtons; -begin - Result := GridView.NavigatorButtons; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorCanvas: TCanvas; -begin - Result := Canvas.Canvas; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorControl: TWinControl; -begin - Result := Site; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorFocused: Boolean; -begin - Result := False; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorLookAndFeel: TcxLookAndFeel; -begin - Result := GridView.LookAndFeel; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorOwner: TComponent; -begin - Result := GridView; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorShowHint: Boolean; -begin - Result := GridView.OptionsBehavior.NavigatorHints; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorTabStop: Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridTableViewInfo.NavigatorButtonsStateChanged; -begin - FNavigatorViewInfo.UpdateButtonsEnabled; -end; - -procedure TcxCustomGridTableViewInfo.NavigatorChanged(AChangeType: TcxNavigatorChangeType); -const - ChangeKinds: array[TcxNavigatorChangeType] of TcxGridViewChangeKind = (vcProperty, vcLayout, vcLayout); -begin - GridView.Changed(ChangeKinds[AChangeType]); -end; - -procedure TcxCustomGridTableViewInfo.RefreshNavigator; -var - AHeight, AWidth: Integer; -begin - if GridView.IsPattern or (GridView.Control = nil) then Exit; - FNavigatorViewInfo.MakeIsDirty; - AWidth := FNavigatorSize.X; - AHeight := FNavigatorSize.Y; - FNavigatorViewInfo.CheckSize(AWidth, AHeight); - if (FNavigatorSize.X <> AWidth) or (FNavigatorSize.Y <> AHeight) then - GridView.LayoutChanged - else - GridView.ViewChanged; -end; - -procedure TcxCustomGridTableViewInfo.CreateViewInfos; -begin - FFilterViewInfo := GetFilterViewInfoClass.Create(Self); - inherited; - FNavigatorSiteViewInfo := GetNavigatorSiteViewInfoClass.Create(Self); - if FNavigatorViewInfo = nil then - FNavigatorViewInfo := GetNavigatorViewInfoClass.Create(Self); - FRecordsViewInfo := GetRecordsViewInfoClass.Create(Self); -end; - -procedure TcxCustomGridTableViewInfo.DestroyViewInfos(AIsRecreating: Boolean); -begin - FreeAndNil(FRecordsViewInfo); - FNavigatorSiteViewInfo.Free; - FNavigatorSiteViewInfo := nil; - if not AIsRecreating then - FreeAndNil(FNavigatorViewInfo); - inherited; - FreeAndNil(FFilterViewInfo); -end; - -procedure TcxCustomGridTableViewInfo.AdjustClientBounds(var ABounds: TRect); -begin - inherited; - if CalculateDown and NavigatorSiteViewInfo.Visible and not Site.HScrollBarVisible then - Dec(ABounds.Bottom, NavigatorSiteViewInfo.Height); -end; - -procedure TcxCustomGridTableViewInfo.AfterCalculating; -begin - inherited; - if Visible then Controller.PostCheckEdit; -end; - -procedure TcxCustomGridTableViewInfo.AfterOffset; -begin - FRecordsViewInfo.AfterOffset; -end; - -procedure TcxCustomGridTableViewInfo.BeforeOffset; -begin - FRecordsViewInfo.BeforeOffset; -end; - -procedure TcxCustomGridTableViewInfo.Calculate; -var - ANavigatorHeight, ANavigatorWidth: Integer; -begin - FRecordsViewInfo.MainCalculate; - inherited; - if FNavigatorSiteViewInfo.Visible then - begin - ANavigatorWidth := 0; - with GetNavigatorSiteBounds do - ANavigatorHeight := Bottom - Top; - FNavigatorViewInfo.CheckSize(ANavigatorWidth, ANavigatorHeight); - FNavigatorSize := Point(ANavigatorWidth, ANavigatorHeight); - FNavigatorSiteViewInfo.Calculate(GetNavigatorSiteBounds); - FNavigatorViewInfo.Calculate; - end; -end; - -function TcxCustomGridTableViewInfo.CalculateClientBounds: TRect; -begin - Result := inherited CalculateClientBounds; - Inc(Result.Top, PartsTopHeight); - Dec(Result.Bottom, PartsBottomHeight); -end; - -procedure TcxCustomGridTableViewInfo.CalculateHeight(const AMaxSize: TPoint; var AHeight: Integer; - var AFullyVisible: Boolean); -begin - if NavigatorSiteViewInfo.Visible and not Site.HScrollBarVisible then - Inc(AHeight, NavigatorSiteViewInfo.Height); - inherited; -end; - -function TcxCustomGridTableViewInfo.CalculatePartBounds(APart: TcxCustomGridPartViewInfo): TRect; -var - I: Integer; -begin - Result := ClientBounds; - if APart.IsAutoWidth then - begin - Result.Left := Bounds.Left; - Result.Right := Bounds.Right; - end - else - Result.Right := Result.Left + APart.CalculateWidth; - - for I := PartCount - 1 downto APart.Index do - case Parts[I].Alignment of - gpaTop: - Dec(Result.Top, Parts[I].Height); - gpaBottom: - Inc(Result.Bottom, Parts[I].Height); - end; - case APart.Alignment of - gpaTop: - Result.Bottom := Result.Top + APart.Height; - gpaBottom: - Result.Top := Result.Bottom - APart.Height; - end; -end; - -function TcxCustomGridTableViewInfo.CalculateVisibleEqualHeightRecordCount: Integer; -begin - Result := -1; -end; - -procedure TcxCustomGridTableViewInfo.ControlFocusChanged; -begin - inherited; - RecordsViewInfo.ControlFocusChanged; -end; - -function TcxCustomGridTableViewInfo.DoGetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; -begin - if PtInRect(Site.ClientBounds, P) then - begin - for I := 0 to PartCount - 1 do - if Parts[I].Visible then - begin - Result := Parts[I].GetHitTest(P); - if Result <> nil then Exit; - end; - Result := RecordsViewInfo.GetHitTest(P); - end - else - Result := FNavigatorSiteViewInfo.GetHitTest(P); - if Result = nil then - Result := inherited DoGetHitTest(P); -end; - -function TcxCustomGridTableViewInfo.GetDefaultGridModeBufferCount: Integer; -begin - Result := 0; -end; - -procedure TcxCustomGridTableViewInfo.GetHScrollBarBounds(var ABounds: TRect); -begin - inherited; - if FNavigatorSiteViewInfo.Visible then - Inc(ABounds.Left, FNavigatorSiteViewInfo.Width); -end; - -function TcxCustomGridTableViewInfo.GetFilterViewInfoClass: TcxGridFilterViewInfoClass; -begin - Result := TcxGridFilterViewInfo; -end; - -function TcxCustomGridTableViewInfo.GetIsInternalUse: Boolean; -begin - Result := inherited GetIsInternalUse or FirstRecordIndexAssigned; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorOffset: Integer; -begin - Result := GridView.OptionsView.NavigatorOffset; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorSiteBounds: TRect; -begin - if Site.HScrollBarVisible then - begin - Result := TcxControlAccess(Site).GetHScrollBarBounds; - with Result do - begin - Right := Left; - Left := Right - FNavigatorSiteViewInfo.Width; - end; - end - else - begin - Result := Site.ClientBounds; - if Site.VScrollBarVisible then - Inc(Result.Right, Site.VScrollBar.Width); - Result.Top := Result.Bottom; - Inc(Result.Bottom, NavigatorSiteViewInfo.Height); - end; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorSiteViewInfoClass: TcxNavigatorSiteViewInfoClass; -begin - Result := TcxNavigatorSiteViewInfo; -end; - -function TcxCustomGridTableViewInfo.GetNavigatorViewInfoClass: TcxNavigatorViewInfoClass; -begin - Result := TcxNavigatorViewInfo; -end; - -function TcxCustomGridTableViewInfo.GetNoDataInfoText: string; -begin - Result := GridView.OptionsView.GetNoDataToDisplayInfoText; -end; - -function TcxCustomGridTableViewInfo.GetNoDataInfoTextAreaBounds: TRect; -begin - if IsRectEmpty(RecordsViewInfo.ContentBounds) then - Result := ClientBounds - else - IntersectRect(Result, ClientBounds, RecordsViewInfo.ContentBounds); -end; - -procedure TcxCustomGridTableViewInfo.GetNoDataInfoTextParams(out AParams: TcxViewParams); -begin - GridView.Styles.GetViewParams(vsBackground, nil, nil, AParams); -end; - -function TcxCustomGridTableViewInfo.GetNoDataInfoTextAreaVisible: Boolean; -begin - Result := RecordsViewInfo.IsEmpty and (NoDataInfoText <> ''); -end; - -function TcxCustomGridTableViewInfo.GetNonRecordsAreaHeight(ACheckScrollBar: Boolean): Integer; -begin - Result := PartsTopHeight + PartsBottomHeight; - if ACheckScrollBar then - begin - AddScrollBarHeight(Result); - if NavigatorSiteViewInfo.Visible and not Site.HScrollBarVisible then - Inc(Result, NavigatorSiteViewInfo.Height); - end; -end; - -function TcxCustomGridTableViewInfo.GetScrollableAreaBounds: TRect; -begin - Result := ClientBounds; -end; - -function TcxCustomGridTableViewInfo.GetScrollableAreaBoundsForEdit: TRect; -begin - Result := ScrollableAreaBounds; -end; - -function TcxCustomGridTableViewInfo.GetScrollableAreaBoundsHorz: TRect; -begin - Result := ScrollableAreaBounds; -end; - -function TcxCustomGridTableViewInfo.GetScrollableAreaBoundsVert: TRect; -begin - Result := ScrollableAreaBounds; -end; - -function TcxCustomGridTableViewInfo.FirstRecordIndexAssigned: Boolean; -begin - Result := FFirstRecordIndex <> RecordIndexNone; -end; - -procedure TcxCustomGridTableViewInfo.Offset(ARecordCountDelta: Integer); -begin - RecordsViewInfo.Offset(ARecordCountDelta); -end; - -procedure TcxCustomGridTableViewInfo.Offset(DX, DY: Integer); -begin - RecordsViewInfo.Offset(DX, DY); -end; - -procedure TcxCustomGridTableViewInfo.VisibilityChanged(AVisible: Boolean); -begin - RecordsViewInfo.VisibilityChanged(AVisible); - inherited; // should be here for correct hiding (focus) -end; - -function TcxCustomGridTableViewInfo.CanOffset(ARecordCountDelta, DX, DY: Integer): Boolean; -begin - Result := True; -end; - -function TcxCustomGridTableViewInfo.CanOffsetView(ARecordCountDelta: Integer): Boolean; -begin - Result := RecordsViewInfo.CanOffset(ARecordCountDelta); -end; - -procedure TcxCustomGridTableViewInfo.DoOffset(ARecordCountDelta, DX, DY: Integer); -begin - if CanOffset(ARecordCountDelta, DX, DY) then - begin - Controller.BeforeOffset; - BeforeOffset; - if ARecordCountDelta <> 0 then - Offset(ARecordCountDelta) - else - Offset(DX, DY); - AfterOffset; - Controller.AfterOffset; - end - else - Recalculate; -end; - -function TcxCustomGridTableViewInfo.GetNearestPopupHeight(AHeight: Integer; - AAdditionalRecord: Boolean = False): Integer; -begin - Result := AHeight; -end; - -function TcxCustomGridTableViewInfo.GetPopupHeight(ADropDownRecordCount: Integer): Integer; -begin - Result := 0; -end; - -{ TcxCustomGridTableViewInfoCacheItem } - -function TcxCustomGridTableViewInfoCacheItem.GetGridRecord: TcxCustomGridRecord; -begin - Result := TcxCustomGridTableViewInfoCache(Owner).ViewData.Records[Index]; -end; - -procedure TcxCustomGridTableViewInfoCacheItem.SetHeight(Value: Integer); -begin - FHeight := Value; - FIsHeightAssigned := True; -end; - -procedure TcxCustomGridTableViewInfoCacheItem.UnassignValues(AKeepMaster: Boolean); -begin - inherited; - FIsHeightAssigned := False; -end; - -{ TcxCustomGridTableViewInfoCache } - -function TcxCustomGridTableViewInfoCache.GetViewData: TcxCustomGridTableViewData; -begin - Result := TcxCustomGridTableViewData(inherited ViewData); -end; - -function TcxCustomGridTableViewInfoCache.GetItemClass(Index: Integer): TcxCustomGridViewInfoCacheItemClass; -begin - Result := ViewData.Records[Index].GetViewInfoCacheItemClass; -end; - -{ TcxCustomGridTableItemCustomOptions } - -constructor TcxCustomGridTableItemCustomOptions.Create(AItem: TcxCustomGridTableItem); -begin - inherited Create; - FItem := AItem; -end; - -function TcxCustomGridTableItemCustomOptions.GetGridView: TcxCustomGridTableView; -begin - Result := FItem.GridView; -end; - -procedure TcxCustomGridTableItemCustomOptions.Changed(AChange: TcxGridTableItemChange = ticLayout); -begin - FItem.Changed(AChange); -end; - -procedure TcxCustomGridTableItemCustomOptions.Assign(Source: TPersistent); -begin - if not (Source is TcxCustomGridTableItemCustomOptions) then - inherited; -end; - -{ TcxCustomGridTableItemOptions } - -constructor TcxCustomGridTableItemOptions.Create(AItem: TcxCustomGridTableItem); -begin - inherited; - FEditing := True; - FFiltering := True; - FFilteringFilteredItemsList := True; - FFilteringMRUItemsList := True; - FFilteringPopup := True; - FFilteringPopupMultiSelect := True; - FFocusing := True; - FGrouping := True; - FIgnoreTimeForFiltering := True; - FIncSearch := True; - FMoving := True; - FShowCaption := True; - FSorting := True; -end; - -procedure TcxCustomGridTableItemOptions.SetEditing(Value: Boolean); -begin - if FEditing <> Value then - begin - FEditing := Value; - if not FEditing then FItem.Editing := False; - Changed(ticLayout); - end; -end; - -procedure TcxCustomGridTableItemOptions.SetFiltering(Value: Boolean); -begin - if FFiltering <> Value then - begin - FFiltering := Value; - GridView.RefreshFilterableItemsList; - Changed; - end; -end; - -procedure TcxCustomGridTableItemOptions.SetFilteringFilteredItemsList(Value: Boolean); -begin - if FFilteringFilteredItemsList <> Value then - begin - FFilteringFilteredItemsList := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItemOptions.SetFilteringMRUItemsList(Value: Boolean); -begin - if FFilteringMRUItemsList <> Value then - begin - FFilteringMRUItemsList := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItemOptions.SetFilteringPopup(Value: Boolean); -begin - if FFilteringPopup <> Value then - begin - FFilteringPopup := Value; - Changed(ticSize); - end; -end; - -procedure TcxCustomGridTableItemOptions.SetFilteringPopupMultiSelect(Value: Boolean); -begin - if FFilteringPopupMultiSelect <> Value then - begin - FFilteringPopupMultiSelect := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItemOptions.SetFocusing(Value: Boolean); -begin - if FFocusing <> Value then - begin - FFocusing := Value; - if not FFocusing then Item.Focused := False; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItemOptions.SetGrouping(Value: Boolean); -begin - if FGrouping <> Value then - begin - FGrouping := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItemOptions.SetIgnoreTimeForFiltering(Value: Boolean); -begin - if FIgnoreTimeForFiltering <> Value then - begin - FIgnoreTimeForFiltering := Value; - GridView.DataController.Refresh; - end; -end; - -procedure TcxCustomGridTableItemOptions.SetIncSearch(Value: Boolean); -begin - if FIncSearch <> Value then - begin - if not Value and Item.IncSearching then - GridView.Controller.CancelIncSearching; - FIncSearch := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItemOptions.SetMoving(Value: Boolean); -begin - if FMoving <> Value then - begin - FMoving := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItemOptions.SetShowCaption(Value: Boolean); -begin - if FShowCaption <> Value then - begin - BeforeShowCaptionChange; - FShowCaption := Value; - Changed(ticSize); - end; -end; - -procedure TcxCustomGridTableItemOptions.SetShowEditButtons(Value: TcxGridItemShowEditButtons); -begin - if FShowEditButtons <> Value then - begin - FShowEditButtons := Value; - Changed(ticSize); - end; -end; - -procedure TcxCustomGridTableItemOptions.SetSortByDisplayText(Value: TcxGridItemSortByDisplayText); -begin - if FSortByDisplayText <> Value then - begin - FSortByDisplayText := Value; - GridView.DataController.SortByDisplayTextChanged; - end; -end; - -procedure TcxCustomGridTableItemOptions.SetSorting(Value: Boolean); -begin - if FSorting <> Value then - begin - FSorting := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItemOptions.BeforeShowCaptionChange; -begin -end; - -procedure TcxCustomGridTableItemOptions.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridTableItemOptions then - with TcxCustomGridTableItemOptions(Source) do - begin - Self.Editing := Editing; - Self.Filtering := Filtering; - Self.FilteringFilteredItemsList := FilteringFilteredItemsList; - Self.FilteringMRUItemsList := FilteringMRUItemsList; - Self.FilteringPopup := FilteringPopup; - Self.FilteringPopupMultiSelect := FilteringPopupMultiSelect; - Self.Focusing := Focusing; - Self.Grouping := Grouping; - Self.IgnoreTimeForFiltering := IgnoreTimeForFiltering; - Self.IncSearch := IncSearch; - Self.Moving := Moving; - Self.ShowCaption := ShowCaption; - Self.ShowEditButtons := ShowEditButtons; - Self.SortByDisplayText := SortByDisplayText; - Self.Sorting := Sorting; - end; - inherited; -end; - -{ TcxCustomGridTableItemStyles } - -function TcxCustomGridTableItemStyles.GetGridViewValue: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -function TcxCustomGridTableItemStyles.GetItem: TcxCustomGridTableItem; -begin - Result := TcxCustomGridTableItem(GetOwner); -end; - -procedure TcxCustomGridTableItemStyles.SetOnGetContentStyle(Value: TcxGridGetCellStyleEvent); -begin - if @FOnGetContentStyle <> @Value then - begin - FOnGetContentStyle := Value; - Item.Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItemStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - case Index of - isContent: - GridView.Styles.GetRecordContentParams(TcxCustomGridRecord(AData), Item, AParams); - else - inherited; - end; -end; - -function TcxCustomGridTableItemStyles.GetGridView: TcxCustomGridView; -begin - Result := Item.GridView; -end; - -procedure TcxCustomGridTableItemStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxCustomGridTableItemStyles then - with TcxCustomGridTableItemStyles(Source) do - begin - Self.Content := Content; - Self.OnGetContentStyle := OnGetContentStyle; - end; -end; - -procedure TcxCustomGridTableItemStyles.GetContentParams(ARecord: TcxCustomGridRecord; - out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if (ARecord <> nil) and Assigned(FOnGetContentStyle) then - FOnGetContentStyle(GridView, ARecord, Item, AStyle); - GetViewParams(isContent, ARecord, AStyle, AParams); -end; - -{ TcxCustomGridTableItem } - -constructor TcxCustomGridTableItem.Create(AOwner: TComponent); -begin - inherited; - FCells := TList.Create; - FIndex := -1; - FMinWidth := cxGridItemDefaultMinWidth; - FVisibleIndex := -1; - FVisibleForCustomization := True; - CreateSubClasses; -end; - -destructor TcxCustomGridTableItem.Destroy; -var - I: Integer; -begin - if not GridView.IsDestroying and GridView.IsDesigning then - Controller.DesignController.UnselectObject(Self); - RepositoryItem := nil; - FGridView.RemoveItem(Self); - {if FLastUsedDefaultRepositoryItem <> nil then - ItemRemoved(FLastUsedDefaultRepositoryItem);} - DestroySubClasses; - FreeAndNil(FEditData); - FreeAndNil(FCellStyle); - for I := 0 to CellCount - 1 do Cells[I].FItem := nil; - FCells.Free; - inherited; -end; - -function TcxCustomGridTableItem.GetActualMinWidth: Integer; -begin - if HasFixedWidth then - Result := 0 - else - Result := FMinWidth; -end; - -function TcxCustomGridTableItem.GetCaption: string; -begin - if FIsCaptionAssigned then - Result := FCaption - else - Result := DefaultCaption; -end; - -function TcxCustomGridTableItem.GetCell(Index: Integer): TcxGridTableDataCellViewInfo; -begin - Result := TcxGridTableDataCellViewInfo(FCells[Index]); -end; - -function TcxCustomGridTableItem.GetCellCount: Integer; -begin - Result := FCells.Count; -end; - -function TcxCustomGridTableItem.GetController: TcxCustomGridTableController; -begin - Result := FGridView.Controller; -end; - -function TcxCustomGridTableItem.GetDataController: TcxCustomDataController; -begin - Result := FGridView.DataController; -end; - -function TcxCustomGridTableItem.GetEditing: Boolean; -begin - Result := Controller.EditingItem = Self; -end; - -function TcxCustomGridTableItem.GetEditingProperties: TcxCustomEditProperties; -begin - if Controller.EditingController.IsEditing then - Result := Controller.EditingController.Edit.ActiveProperties - else - Result := GetPropertiesForEdit; -end; - -function TcxCustomGridTableItem.GetFilterCaption: string; -begin - Result := GetAlternateCaption; -end; - -function TcxCustomGridTableItem.GetFiltered: Boolean; -begin - Result := FDataBinding.Filtered; -end; - -function TcxCustomGridTableItem.GetFocused: Boolean; -begin - Result := Controller.FocusedItem = Self; -end; - -function TcxCustomGridTableItem.GetGroupIndex: Integer; -begin - Result := DataController.Groups.ItemGroupIndex[Index]; -end; - -function TcxCustomGridTableItem.GetHeaderAlignmentHorz: TAlignment; -begin - if FIsHeaderAlignmentHorzAssigned then - Result := FHeaderAlignmentHorz - else - Result := DefaultHeaderAlignmentHorz; -end; - -function TcxCustomGridTableItem.GetHeaderAlignmentVert: TcxAlignmentVert; -begin - if FIsHeaderAlignmentVertAssigned then - Result := FHeaderAlignmentVert - else - Result := DefaultHeaderAlignmentVert; -end; - -function TcxCustomGridTableItem.GetHidden: Boolean; -begin - Result := not VisibleForCustomization; -end; - -function TcxCustomGridTableItem.GetIsLoading: Boolean; -begin - Result := not FIgnoreLoadingStatus and - ((csLoading in ComponentState) or FGridView.IsLoading); -end; - -function TcxCustomGridTableItem.GetIncSearching: Boolean; -begin - Result := Controller.IncSearchingItem = Self; -end; - -function TcxCustomGridTableItem.GetIsDestroying: Boolean; -begin - Result := csDestroying in ComponentState; -end; - -function TcxCustomGridTableItem.GetIsFirst: Boolean; -begin - Result := VisibleIndex = 0; -end; - -function TcxCustomGridTableItem.GetIsLast: Boolean; -begin - Result := VisibleIndex = FGridView.VisibleItemCount - 1; -end; - -function TcxCustomGridTableItem.GetIsReading: Boolean; -begin - Result := csReading in ComponentState; -end; - -function TcxCustomGridTableItem.GetIsUpdating: Boolean; -begin - Result := csUpdating in ComponentState; -end; - -function TcxCustomGridTableItem.GetMinWidth: Integer; -begin - if HasFixedWidth then - Result := Width - else - Result := FMinWidth; -end; - -function TcxCustomGridTableItem.GetPropertiesClassName: string; -begin - if FProperties = nil then - Result := '' - else - Result := FProperties.ClassName; -end; - -function TcxCustomGridTableItem.GetSortIndex: Integer; -begin - Result := DataController.GetItemSortingIndex(Index); -end; - -function TcxCustomGridTableItem.GetSortOrder: TcxGridSortOrder; -begin - Result := DataController.GetItemSortOrder(Index); -end; - -function TcxCustomGridTableItem.GetTag: TcxTag; -begin - Result := inherited Tag; -end; - -function TcxCustomGridTableItem.GetViewData: TcxCustomGridTableViewData; -begin - Result := FGridView.ViewData; -end; - -function TcxCustomGridTableItem.GetWidth: Integer; -begin - if FIsWidthAssigned then - Result := FWidth - else - Result := DefaultWidth; -end; - -procedure TcxCustomGridTableItem.SetAlternateCaption(const Value: string); -begin - if FAlternateCaption <> Value then - begin - FAlternateCaption := Value; - CaptionChanged; - end; -end; - -procedure TcxCustomGridTableItem.SetBestFitMaxWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FBestFitMaxWidth <> Value then - begin - FBestFitMaxWidth := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetCaption(const Value: string); -begin - if Caption <> Value then - begin - FCaption := Value; - FIsCaptionAssigned := True; - CaptionChanged; - end; -end; - -procedure TcxCustomGridTableItem.SetDataBinding(Value: TcxGridItemDataBinding); -begin - FDataBinding.Assign(Value); -end; - -procedure TcxCustomGridTableItem.SetDateTimeGrouping(Value: TcxGridDateTimeGrouping); -begin - if FDateTimeGrouping <> Value then - begin - FDateTimeGrouping := Value; - DateTimeGroupingChanged; - end; -end; - -procedure TcxCustomGridTableItem.SetEditing(Value: Boolean); -begin - if Value then - Controller.EditingItem := Self - else - if Editing then - Controller.EditingItem := nil; -end; - -procedure TcxCustomGridTableItem.SetFiltered(Value: Boolean); -begin - FDataBinding.Filtered := Value; -end; - -procedure TcxCustomGridTableItem.SetFocused(Value: Boolean); -begin - if Value then - Controller.FocusedItem := Self - else - if Focused then - if not Controller.FocusNextItem(VisibleIndex, True, True, False, True) then - Controller.FocusedItem := nil; -end; - -procedure TcxCustomGridTableItem.SetGroupIndex(Value: Integer); -begin - if FGridView.IsAssigningItems and (Value <> -1) then - FGridView.AssigningGroupedItems[Value] := Self - else - ChangeGroupIndex(Value); -end; - -procedure TcxCustomGridTableItem.SetHeaderAlignmentHorz(Value: TAlignment); -begin - if HeaderAlignmentHorz <> Value then - begin - FHeaderAlignmentHorz := Value; - FIsHeaderAlignmentHorzAssigned := True; - Changed(ticLayout); - end; -end; - -procedure TcxCustomGridTableItem.SetHeaderAlignmentVert(Value: TcxAlignmentVert); -begin - if HeaderAlignmentVert <> Value then - begin - FHeaderAlignmentVert := Value; - FIsHeaderAlignmentVertAssigned := True; - Changed(ticLayout); - end; -end; - -procedure TcxCustomGridTableItem.SetHidden(Value: Boolean); -begin - VisibleForCustomization := not Value; -end; - -procedure TcxCustomGridTableItem.SetIndex(Value: Integer); -begin - if FGridView.IsRestoring then - FGridView.RestoringItems[Value] := Self - else - FGridView.ChangeItemIndex(Self, Value); -end; - -procedure TcxCustomGridTableItem.SetMinWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FMinWidth <> Value then - begin - FMinWidth := Value; - if IsLoading then Exit; - if Width < FMinWidth then - Width := FMinWidth - else - Changed(ticSize); - end; -end; - -procedure TcxCustomGridTableItem.SetOnCustomDrawCell(Value: TcxGridTableDataCellCustomDrawEvent); -begin - if @FOnCustomDrawCell <> @Value then - begin - FOnCustomDrawCell := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnGetCellHint(Value: TcxGridGetCellHintEvent); -begin - if @FOnGetCellHint <> @Value then - begin - FOnGetCellHint := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnGetDataText(Value: TcxGridGetDataTextEvent); -begin - if @FOnGetDataText <> @Value then - begin - FOnGetDataText := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnGetDisplayText(Value: TcxGridGetDisplayTextEvent); -begin - if @FOnGetDisplayText <> @Value then - begin - FOnGetDisplayText := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnGetFilterDisplayText(Value: TcxGridGetFilterDisplayTextEvent); -begin - if @FOnGetFilterDisplayText <> @Value then - begin - FOnGetFilterDisplayText := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnGetFilterValues(Value: TcxGridGetFilterValuesEvent); -begin - if @FOnGetFilterValues <> @Value then - begin - FOnGetFilterValues := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnGetProperties(Value: TcxGridGetPropertiesEvent); -begin - if @FOnGetProperties <> @Value then - begin - FOnGetProperties := Value; - Changed(ticLayout); - end; -end; - -procedure TcxCustomGridTableItem.SetOnGetPropertiesForEdit(Value: TcxGridGetPropertiesEvent); -begin - if @FOnGetPropertiesForEdit <> @Value then - begin - FOnGetPropertiesForEdit := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnGetStoredProperties(Value: TcxGridTableItemGetStoredPropertiesEvent); -begin - if @FOnGetStoredProperties <> @Value then - begin - FOnGetStoredProperties := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnGetStoredPropertyValue(Value: TcxGridTableItemGetStoredPropertyValueEvent); -begin - if @FOnGetStoredPropertyValue <> @Value then - begin - FOnGetStoredPropertyValue := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnInitFilteringDateRanges(Value: TcxGridInitDateRangesEvent); -begin - if @FOnInitFilteringDateRanges <> @Value then - begin - FOnInitFilteringDateRanges := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnInitGroupingDateRanges(Value: TcxGridInitDateRangesEvent); -begin - if @FOnInitGroupingDateRanges <> @Value then - begin - FOnInitGroupingDateRanges := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnSetStoredPropertyValue(Value: TcxGridTableItemSetStoredPropertyValueEvent); -begin - if @FOnSetStoredPropertyValue <> @Value then - begin - FOnSetStoredPropertyValue := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOnUserFiltering(Value: TcxGridUserFilteringEvent); -begin - if @FOnUserFiltering <> @Value then - begin - FOnUserFiltering := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetOptions(Value: TcxCustomGridTableItemOptions); -begin - FOptions.Assign(Value); -end; - -procedure TcxCustomGridTableItem.SetProperties(Value: TcxCustomEditProperties); -begin - if (FProperties <> nil) and (Value <> nil) then FProperties.Assign(Value); -end; - -procedure TcxCustomGridTableItem.SetPropertiesClass(Value: TcxCustomEditPropertiesClass); -begin - if FPropertiesClass <> Value then - begin - if FProperties <> nil then - Controller.EditingController.RemoveEdit(FProperties); - FPropertiesClass := Value; - RecreateProperties; - PropertiesValueChanged; - PropertiesChanged; - end; -end; - -procedure TcxCustomGridTableItem.SetPropertiesClassName(const Value: string); -begin - PropertiesClass := TcxCustomEditPropertiesClass(GetRegisteredEditProperties.FindByClassName(Value)); -end; - -procedure TcxCustomGridTableItem.SetRepositoryItem(Value: TcxEditRepositoryItem); -begin - if FRepositoryItem <> Value then - begin - if FRepositoryItem <> nil then - begin - FRepositoryItem.RemoveListener(Self); - Controller.EditingController.RemoveEdit(FRepositoryItem.Properties); - end; - FRepositoryItem := Value; - if FRepositoryItem <> nil then - FRepositoryItem.AddListener(Self); - PropertiesValueChanged; - PropertiesChanged; - end; -end; - -procedure TcxCustomGridTableItem.SetSortIndex(Value: Integer); -begin - if FGridView.IsAssigningItems and (Value <> -1) then - FGridView.AssigningSortedItems[Value] := Self - else - ChangeSortIndex(Value); -end; - -procedure TcxCustomGridTableItem.SetSortOrder(Value: TcxGridSortOrder); -begin - if SortOrder <> Value then - begin - ShowHourglassCursor; - try - DataController.ChangeSorting(Index, Value); - finally - HideHourglassCursor; - end; - end; -end; - -procedure TcxCustomGridTableItem.SetStyles(Value: TcxCustomGridTableItemStyles); -begin - FStyles.Assign(Value); -end; - -procedure TcxCustomGridTableItem.SetTag(Value: TcxTag); -begin - if Tag <> Value then - begin - inherited Tag := Value; - Changed(ticProperty); - end; -end; - -procedure TcxCustomGridTableItem.SetVisible(Value: Boolean); -begin - if Visible <> Value then - begin - GridView.SaveItemVisibles; - FVisible := Value; - VisibleChanged; - GridView.CheckItemVisibles; - GridView.RefreshCustomizationForm; - end; -end; - -procedure TcxCustomGridTableItem.SetVisibleForCustomization(Value: Boolean); -begin - if VisibleForCustomization <> Value then - begin - FVisibleForCustomization := Value; - VisibleForCustomizationChanged; - end; -end; - -procedure TcxCustomGridTableItem.SetWidth(Value: Integer); -begin - CheckWidthValue(Value); - if IsLoading or (Width <> Value) then - begin - FWidth := Value; - FIsWidthAssigned := True; - Changed(ticSize); - end; -end; - -procedure TcxCustomGridTableItem.ReadHidden(Reader: TReader); -begin - Hidden := Reader.ReadBoolean; -end; - -procedure TcxCustomGridTableItem.ReadIsCaptionAssigned(Reader: TReader); -begin - FIsCaptionAssigned := Reader.ReadBoolean; -end; - -procedure TcxCustomGridTableItem.WriteIsCaptionAssigned(Writer: TWriter); -begin - Writer.WriteBoolean(FIsCaptionAssigned); -end; - -function TcxCustomGridTableItem.IsCaptionStored: Boolean; -begin - Result := FIsCaptionAssigned and (FCaption <> DefaultCaption); -end; - -function TcxCustomGridTableItem.IsSortOrderStored: Boolean; -begin - Result := (SortOrder <> soNone) and (SortIndex <> -1); -end; - -function TcxCustomGridTableItem.IsTagStored: Boolean; -begin - Result := Tag <> 0; -end; - -function TcxCustomGridTableItem.IsWidthStored: Boolean; -begin - Result := FIsWidthAssigned //and (FWidth <> DefaultWidth); -end; - -function TcxCustomGridTableItem.GetDataBindingClass: TcxGridItemDataBindingClass; -begin - Result := FGridView.GetItemDataBindingClass; -end; - -procedure TcxCustomGridTableItem.CreateProperties; -begin - if FPropertiesClass <> nil then - begin - FProperties := FPropertiesClass.Create(Self); - FProperties.OnPropertiesChanged := PropertiesChangedHandler; - end; -end; - -procedure TcxCustomGridTableItem.DestroyProperties; -begin - FreeAndNil(FProperties); -end; - -procedure TcxCustomGridTableItem.RecreateProperties; -begin - DestroyProperties; - CreateProperties; -end; - -procedure TcxCustomGridTableItem.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('Hidden', ReadHidden, nil, True); - Filer.DefineProperty('IsCaptionAssigned', ReadIsCaptionAssigned, WriteIsCaptionAssigned, - FIsCaptionAssigned and (Caption = '')); -end; - -procedure TcxCustomGridTableItem.SetParentComponent(AParent: TComponent); -begin - if AParent is TcxCustomGridTableView then - TcxCustomGridTableView(AParent).AddItem(Self); -end; - -procedure TcxCustomGridTableItem.ItemRemoved(Sender: TcxEditRepositoryItem); -begin - if Sender = FLastUsedDefaultRepositoryItem then - PropertiesValueChanged - else - RepositoryItem := nil; -end; - -procedure TcxCustomGridTableItem.RepositoryItemPropertiesChanged(Sender: TcxEditRepositoryItem); -begin - if not GridView.IsPattern then PropertiesChanged; -end; - -function TcxCustomGridTableItem.GetObjectName: string; -begin - if GridView.IsStoringNameMode then - Result := IntToStr(ID) - else - Result := Name; -end; - -function TcxCustomGridTableItem.GetStoredProperties(AProperties: TStrings): Boolean; -begin - with AProperties do - begin - if GetProperties <> nil then - Add('AlignmentHorz'); - Add('Index'); - Add('Visible'); - Add('SortOrder'); - Add('SortIndex'); - Add('WasVisibleBeforeGrouping'); - end; - if Assigned(FOnGetStoredProperties) then - FOnGetStoredProperties(Self, AProperties); - Result := True; -end; - -procedure TcxCustomGridTableItem.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'AlignmentHorz' then - AValue := Variant(GetProperties.Alignment.Horz) - else - if AName = 'Index' then - AValue := Index - else - if AName = 'Visible' then - AValue := Visible - else - if AName = 'SortOrder' then - AValue := Variant(SortOrder) - else - if AName = 'SortIndex' then - AValue := SortIndex - else - if AName = 'WasVisibleBeforeGrouping' then - AValue := WasVisibleBeforeGrouping - else - if Assigned(FOnGetStoredPropertyValue) then - FOnGetStoredPropertyValue(Self, AName, AValue); -end; - -procedure TcxCustomGridTableItem.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'AlignmentHorz' then - if GetProperties.Alignment.Horz <> TAlignment((AValue)) then - begin - if (FRepositoryItem = nil) and (FProperties = nil) then - PropertiesClass := TcxCustomEditPropertiesClass(GetProperties.ClassType); - GetProperties.Alignment.Horz := TAlignment((AValue)); - end - else - else - if AName = 'Index' then - Index := AValue - else - if AName = 'Visible' then - Visible := AValue - else - if AName = 'SortOrder' then - SortOrder := TcxDataSortOrder((AValue)) - else - if AName = 'SortIndex' then - SortIndex := AValue - else - if AName = 'WasVisibleBeforeGrouping' then - FWasVisibleBeforeGrouping := AValue - else - if Assigned(FOnSetStoredPropertyValue) then - FOnSetStoredPropertyValue(Self, AName, AValue); -end; - -procedure TcxCustomGridTableItem.CreateDataBinding; -begin - FDataBinding := GetDataBindingClass.Create(Self); - with FDataBinding do - ValueTypeClass := GetDefaultValueTypeClass; -end; - -procedure TcxCustomGridTableItem.DestroyDataBinding; -begin - FreeAndNil(FDataBinding); -end; - -procedure TcxCustomGridTableItem.CreateSubClasses; -begin - FFilteringDateRanges := GetFilteringDateRangesClass.Create; - FGroupingDateRanges := GetGroupingDateRangesClass.Create; - FOptions := GetOptionsClass.Create(Self); - FStyles := GetStylesClass.Create(Self); -end; - -procedure TcxCustomGridTableItem.DestroySubClasses; -begin - DestroyProperties; - FreeAndNil(FStyles); - FreeAndNil(FOptions); - FreeAndNil(FGroupingDateRanges); - FreeAndNil(FFilteringDateRanges); -end; - -function TcxCustomGridTableItem.GetFilteringDateRangesClass: TcxGridFilteringDateRangesClass; -begin - Result := TcxGridFilteringDateRanges; -end; - -function TcxCustomGridTableItem.GetGroupingDateRangesClass: TcxGridGroupingDateRangesClass; -begin - Result := TcxGridGroupingDateRanges; -end; - -function TcxCustomGridTableItem.GetOptionsClass: TcxCustomGridTableItemOptionsClass; -begin - Result := TcxCustomGridTableItemOptions; -end; - -function TcxCustomGridTableItem.GetStylesClass: TcxCustomGridTableItemStylesClass; -begin - Result := TcxCustomGridTableItemStyles; -end; - -function TcxCustomGridTableItem.IsHeaderAlignmentHorzStored: Boolean; -begin - Result := FIsHeaderAlignmentHorzAssigned and - (FHeaderAlignmentHorz <> DefaultHeaderAlignmentHorz); -end; - -function TcxCustomGridTableItem.IsHeaderAlignmentVertStored: Boolean; -begin - Result := FIsHeaderAlignmentVertAssigned and - (FHeaderAlignmentVert <> DefaultHeaderAlignmentVert); -end; - -procedure TcxCustomGridTableItem.BestFitApplied(AFireEvents: Boolean); -begin - Controller.DesignerModified; -end; - -function TcxCustomGridTableItem.CalculateBestFitWidth: Integer; -var - ACanvas: TcxCanvas; - AIsCalcByValue: Boolean; - AEditSizeProperties: TcxEditSizeProperties; - AParams: TcxViewParams; - AEditViewData: TcxCustomEditViewData; - I, AWidth: Integer; - ARecord: TcxCustomGridRecord; - AValue: Variant; - AEditMinContentSize: TSize; - - function GetFirstRecordIndex: Integer; - begin - Result := GridView.OptionsBehavior.BestFitMaxRecordCount; - if Result <> 0 then - begin - Result := Controller.TopRecordIndex; - if Result < 0 then Result := 0; - end; - end; - - function GetLastRecordIndex: Integer; - begin - Result := GridView.OptionsBehavior.BestFitMaxRecordCount; - if Result = 0 then - Result := ViewData.RecordCount - else - begin - Result := GetFirstRecordIndex + Result; - if Result > ViewData.RecordCount then - Result := ViewData.RecordCount; - end; - Dec(Result); - end; - -begin - Result := 0; - ACanvas := FGridView.Painter.Canvas; - AIsCalcByValue := GetProperties.GetEditValueSource(False) = evsValue; - with AEditSizeProperties do - begin - Height := -1; - MaxLineCount := 0; - Width := -1; - end; - AEditViewData := CreateEditViewData(GetProperties); - try - if GridView.ViewInfo.RecordsViewInfo.AutoDataCellHeight or - GridView.ViewInfo.RecordsViewInfo.IsCellMultiLine(Self) then - begin - Include(AEditViewData.PaintOptions, epoAutoHeight); - AEditViewData.MaxLineCount := GridView.OptionsView.CellTextMaxLineCount; - AEditSizeProperties.MaxLineCount := AEditViewData.MaxLineCount; - end; - AEditViewData.InplaceEditParams.Position.Item := Self; - - for I := GetFirstRecordIndex to GetLastRecordIndex do - begin - ARecord := ViewData.Records[I]; - if ARecord.HasCells then - begin - FStyles.GetContentParams(ARecord, AParams); - InitStyle(AEditViewData.Style, AParams, True); - if AIsCalcByValue then - AValue := ARecord.Values[FIndex] - else - AValue := ARecord.DisplayTexts[FIndex]; - AEditViewData.InplaceEditParams.Position.RecordIndex := ARecord.RecordIndex; - AEditViewData.Data := ARecord; - AWidth := AEditViewData.GetEditContentSize(ACanvas, AValue, AEditSizeProperties).cx; - if AWidth > Result then Result := AWidth; - end; - end; - - FStyles.GetContentParams(nil, AParams); - InitStyle(AEditViewData.Style, AParams, True); - AWidth := AEditViewData.GetEditConstantPartSize(ACanvas, AEditSizeProperties, - AEditMinContentSize).cx; - if Result < AEditMinContentSize.cx then - Result := AEditMinContentSize.cx; - Inc(Result, AWidth); - finally - DestroyEditViewData(AEditViewData); - end; - if Result <> 0 then - Inc(Result, 2 * cxGridEditOffset); -end; - -function TcxCustomGridTableItem.CanAutoHeight: Boolean; -begin - Result := esoAutoHeight in GetProperties.GetSupportedOperations; -end; - -function TcxCustomGridTableItem.CanEdit: Boolean; -begin - Result := CanFocus(Controller.FocusedRecord) and Editable and - (FocusedCellViewInfo <> nil) and (dceoShowEdit in DataController.EditOperations); -end; - -function TcxCustomGridTableItem.CanFilter(AVisually: Boolean): Boolean; -begin - Result := - (esoFiltering in GetProperties.GetSupportedOperations) and FOptions.Filtering and - (not AVisually or GridView.OptionsCustomize.ItemFiltering and FOptions.FilteringPopup); -end; - -function TcxCustomGridTableItem.CanFilterUsingChecks: Boolean; -begin - Result := GridView.Filtering.ItemPopup.MultiSelect and FOptions.FilteringPopupMultiSelect; -end; - -function TcxCustomGridTableItem.CanFilterMRUValueItems: Boolean; -begin - Result := GridView.Filtering.ItemMRUItemsList and FOptions.FilteringMRUItemsList and - not CanFilterUsingChecks; -end; - -function TcxCustomGridTableItem.CanFocus(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := ActuallyVisible and FOptions.Focusing and - ((ARecord = nil) and GridView.OptionsSelection.CellSelect or - (ARecord <> nil) and ARecord.CanFocusCells); -end; - -function TcxCustomGridTableItem.CanGroup: Boolean; -begin - Result := (esoSorting in GetProperties.GetSupportedOperations) and - GridView.OptionsCustomize.ItemGrouping and FOptions.Grouping; -end; - -function TcxCustomGridTableItem.CanHide: Boolean; -begin - Result := not (IsFirst and IsLast) and CanMove; -end; - -function TcxCustomGridTableItem.CanHorzSize: Boolean; -begin - Result := not HasFixedWidth; -end; - -function TcxCustomGridTableItem.CanIgnoreTimeForFiltering: Boolean; -begin - Result := IsDateTimeValueTypeClass(FDataBinding.ValueTypeClass) and - GridView.DateTimeHandling.IgnoreTimeForFiltering and FOptions.IgnoreTimeForFiltering; -end; - -function TcxCustomGridTableItem.CanIncSearch: Boolean; -begin - Result := (esoIncSearch in GetProperties.GetSupportedOperations) and - GridView.OptionsBehavior.IncSearch and FOptions.IncSearch; -end; - -function TcxCustomGridTableItem.CanInitEditing: Boolean; -begin - Result := DataController.CanInitEditing(Index); -end; - -function TcxCustomGridTableItem.CanMove: Boolean; -begin - Result := IsDesigning or GridView.OptionsCustomize.ItemMoving and Options.Moving; -end; - -function TcxCustomGridTableItem.CanScroll: Boolean; -begin - Result := True; -end; - -function TcxCustomGridTableItem.CanSort: Boolean; -begin - Result := (esoSorting in GetProperties.GetSupportedOperations) and - GridView.OptionsCustomize.ItemSorting and Options.Sorting; -end; - -procedure TcxCustomGridTableItem.CaptionChanged; -begin - GridView.ItemCaptionChanged(Self); -end; - -procedure TcxCustomGridTableItem.Changed(AChange: TcxGridTableItemChange); -begin - if GridView <> nil then - GridView.Changed(TcxGridViewChangeKind(AChange)); -end; - -procedure TcxCustomGridTableItem.ChangeGroupIndex(Value: Integer); -begin - if GroupIndex <> Value then - begin - ShowHourglassCursor; - try - if (GroupIndex = -1) and not GridView.IsAfterAssigningItems then - FWasVisibleBeforeGrouping := Visible; - DataController.Groups.ChangeGrouping(Index, Value); - finally - HideHourglassCursor; - end; - end; -end; - -procedure TcxCustomGridTableItem.ChangeSortIndex(Value: Integer); -begin - if SortIndex <> Value then - begin - ShowHourglassCursor; - try - DataController.ChangeItemSortingIndex(Index, Value); - finally - HideHourglassCursor; - end; - end; -end; - -procedure TcxCustomGridTableItem.CheckWidthValue(var Value: Integer); -begin - if Value < ActualMinWidth then Value := ActualMinWidth; -end; - -procedure TcxCustomGridTableItem.DataChanged; -begin - FDataBinding.Init; -end; - -procedure TcxCustomGridTableItem.DateTimeGroupingChanged; -begin - InitGroupingDateRanges; - DataController.Refresh; -end; - -procedure TcxCustomGridTableItem.ForceWidth(Value: Integer); -begin - Controller.ForcingWidthItem := Self; - try - Width := Value; - finally - Controller.ForcingWidthItem := nil; - end; -end; - -function TcxCustomGridTableItem.GetActuallyVisible: Boolean; -begin - Result := Visible; -end; - -function TcxCustomGridTableItem.GetBestFitWidth: Integer; -begin - Result := CalculateBestFitWidth; - if (FBestFitMaxWidth <> 0) and (Result > FBestFitMaxWidth) then - Result := FBestFitMaxWidth; -end; - -function TcxCustomGridTableItem.GetDateTimeFilters: TcxGridDateTimeFilters; -begin - Result := GridView.DateTimeHandling.Filters; -end; - -function TcxCustomGridTableItem.GetDateTimeGrouping: TcxGridDateTimeGrouping; -begin - Result := FDateTimeGrouping; - if Result = dtgDefault then - Result := GridView.DateTimeHandling.Grouping; -end; - -function TcxCustomGridTableItem.GetEditable: Boolean; -begin - Result := GridView.OptionsData.Editing and FOptions.Editing; -end; - -function TcxCustomGridTableItem.GetEditPartVisible: Boolean; -var - R: TRect; -begin - if CanScroll then - begin - R := GridView.ViewInfo.ScrollableAreaBoundsForEdit; - with FocusedCellViewInfo.EditBounds do - Result := - (Left < R.Left) or (Right > R.Right) or - (Top < R.Top) or (Bottom > R.Bottom); - end - else - Result := False; -end; - -function TcxCustomGridTableItem.GetEditValue: Variant; -begin - if Controller.FocusedRecord <> nil then - Result := DataController.GetEditValue(Index, EditingProperties.GetEditValueSource(True)) - else - Result := Unassigned; -end; - -function TcxCustomGridTableItem.GetFilterable: Boolean; -begin - Result := CanFilter(False); -end; - -procedure TcxCustomGridTableItem.GetFilterDisplayText(const AValue: Variant; - var ADisplayText: string); -begin - if Assigned(FOnGetFilterDisplayText) then - FOnGetFilterDisplayText(Self, AValue, ADisplayText); -end; - -function TcxCustomGridTableItem.GetFixed: Boolean; -begin - Result := (Controller.ForcingWidthItem = Self) or HasFixedWidth; -end; - -function TcxCustomGridTableItem.GetFocusedCellViewInfo: TcxGridTableDataCellViewInfo; -begin - with Controller do - if FocusedRecordHasCells(False) and (FocusedRecord.ViewInfo <> nil) then - Result := FocusedRecord.ViewInfo.GetCellViewInfoByItem(Self) - else - Result := nil; -end; - -function TcxCustomGridTableItem.GetPropertiesForEdit: TcxCustomEditProperties; -begin - Result := GetProperties(Controller.FocusedRecord); - DoGetPropertiesForEdit(Controller.FocusedRecord, Result); - InitProperties(Result); -end; - -function TcxCustomGridTableItem.GetPropertiesValue: TcxCustomEditProperties; -begin - if FLastUsedDefaultRepositoryItem <> nil then - begin - FLastUsedDefaultRepositoryItem.RemoveListener(Self); - FLastUsedDefaultRepositoryItem := nil; - end; - if FGridView = nil then // because of EditViewData - it needs Style which needs GridView - Result := nil - else - if UseOwnProperties then - Result := FProperties - else - if GetRepositoryItem = nil then - Result := nil - else - Result := GetRepositoryItem.Properties; -end; - -function TcxCustomGridTableItem.GetVisible: Boolean; -begin - Result := FVisible; -end; - -function TcxCustomGridTableItem.GetVisibleCaption: string; -begin - Result := Caption; -end; - -function TcxCustomGridTableItem.GetVisibleForCustomization: Boolean; -begin - Result := FVisibleForCustomization; -end; - -function TcxCustomGridTableItem.GetVisibleIndex: Integer; -begin - Result := FGridView.FVisibleItems.IndexOf(Self); -end; - -function TcxCustomGridTableItem.GetVisibleInQuickCustomizationPopup: Boolean; -begin - Result := VisibleForCustomization; -end; - -procedure TcxCustomGridTableItem.GroupingChanging; -begin - if SupportsGroupingDateRanges(True) then - InitGroupingDateRanges; -end; - -function TcxCustomGridTableItem.HasCustomDrawCell: Boolean; -begin - Result := Assigned(FOnCustomDrawCell); -end; - -function TcxCustomGridTableItem.HasFixedWidth: Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridTableItem.InitFilteringDateRanges; -begin - FilteringDateRanges.Init(GridView.DateTimeHandling, GetDateTimeFilters); - DoInitFilteringDateRanges; -end; - -procedure TcxCustomGridTableItem.InitGroupingDateRanges; -begin - GroupingDateRanges.Init(GridView.DateTimeHandling, GetDateTimeGrouping); - DoInitGroupingDateRanges; -end; - -procedure TcxCustomGridTableItem.InitProperties(AProperties: TcxCustomEditProperties); -begin - if AProperties <> nil then - with AProperties do - begin - LockUpdate(True); - IDefaultValuesProvider := GetDefaultValuesProvider(AProperties); - LockUpdate(False); - end; -end; - -function TcxCustomGridTableItem.IsSortingByDisplayText(ASortByDisplayText: Boolean): Boolean; -begin - if FOptions.SortByDisplayText = isbtDefault then - Result := HasDataTextHandler or ASortByDisplayText and - (esoSortingByDisplayText in GetProperties.GetSupportedOperations) - else - Result := FOptions.SortByDisplayText = isbtOn; -end; - -function TcxCustomGridTableItem.IsVisibleStored: Boolean; -begin - Result := True; -end; - -function TcxCustomGridTableItem.IsVisibleForCustomizationStored: Boolean; -begin - Result := not VisibleForCustomization; -end; - -procedure TcxCustomGridTableItem.PropertiesChanged; -begin - if GridView.PatternGridView.IgnorePropertiesChanges then Exit; - if not IsDestroying then - GridView.RefreshFilterableItemsList; - if FEditData <> nil then FEditData.Clear; - if not IsDestroying and not DataController.ItemPropertiesChanged(Index) then - Changed(ticSize); -end; - -procedure TcxCustomGridTableItem.PropertiesChangedHandler(Sender: TObject); -begin - if not GridView.IsPattern then PropertiesChanged; -end; - -procedure TcxCustomGridTableItem.PropertiesValueChanged; -begin - FPropertiesValue := GetPropertiesValue; - if not IsDestroying and (FPropertiesValue <> nil) then - DataController.SortByDisplayTextChanged; // for Options.SortByDisplayText = isbtDefault -end; - -procedure TcxCustomGridTableItem.RecalculateDefaultWidth; -begin - if not FIsWidthAssigned then - FWidth := DefaultWidth; -end; - -procedure TcxCustomGridTableItem.SetEditValue(const Value: Variant); -begin - DataController.SetEditValue(Index, Value, EditingProperties.GetEditValueSource(True)); -end; - -procedure TcxCustomGridTableItem.SetGridView(Value: TcxCustomGridTableView); -begin - FGridView := Value; - if Value <> nil then - CreateDataBinding - else - DestroyDataBinding; - PropertiesValueChanged; - if GridView <> nil then InitGroupingDateRanges; -end; - -function TcxCustomGridTableItem.ShowButtons(AFocused: Boolean): Boolean; -var - AGridShowEditButtons: TcxGridShowEditButtons; -begin - AGridShowEditButtons := FGridView.OptionsView.ShowEditButtons; - Result := - (FOptions.ShowEditButtons = isebAlways) or - (FOptions.ShowEditButtons = isebDefault) and - ((AGridShowEditButtons = gsebAlways) or - (AGridShowEditButtons = gsebForFocusedRecord) and AFocused); -end; - -function TcxCustomGridTableItem.ShowOnUngrouping: Boolean; -begin - Result := True; //!!! -end; - -function TcxCustomGridTableItem.SupportsDateTimeFilters(ARelativeFilters: Boolean): Boolean; -begin - Result := IsDateTimeValueTypeClass(FDataBinding.ValueTypeClass) and - (ARelativeFilters and (GetDateTimeFilters * DateTimeRelativeFilters <> []) or - not ARelativeFilters and - ((GetDateTimeFilters * DateTimeAbsoluteFilters <> []) or HasInitFilteringDateRangesHandlers)); -end; - -function TcxCustomGridTableItem.SupportsGroupingDateRanges(ACheckCustomHandlers: Boolean): Boolean; -begin - Result := IsDateTimeValueTypeClass(FDataBinding.ValueTypeClass) and - (ACheckCustomHandlers and HasInitGroupingDateRangesHandlers or - not ACheckCustomHandlers and not GroupingDateRanges.IsEmpty); -end; - -function TcxCustomGridTableItem.UseFilteredValuesForFilterValueList: Boolean; -begin - Result := GridView.Filtering.ItemFilteredItemsList and FOptions.FilteringFilteredItemsList; -end; - -function TcxCustomGridTableItem.UseOwnProperties: Boolean; -begin - Result := (FRepositoryItem = nil) and (FProperties <> nil); -end; - -procedure TcxCustomGridTableItem.ValueTypeClassChanged; -begin - FDataBinding.FilterMRUValueItems.ClearItems; - FDataBinding.Init; - PropertiesValueChanged; - if FProperties <> nil then - FProperties.Changed; -end; - -procedure TcxCustomGridTableItem.VisibleChanged; -begin -end; - -procedure TcxCustomGridTableItem.VisibleForCustomizationChanged; -begin - with FGridView do - begin - //RefreshFilterableItemsList; - RefreshCustomizationForm; - end; - Changed(ticProperty); -end; - -function TcxCustomGridTableItem.DefaultAlternateCaption: string; -begin - Result := Caption; -end; - -function TcxCustomGridTableItem.DefaultCaption: string; -begin - Result := FDataBinding.DefaultCaption; -end; - -function TcxCustomGridTableItem.DefaultHeaderAlignmentHorz: TAlignment; -begin - Result := taLeftJustify; -end; - -function TcxCustomGridTableItem.DefaultHeaderAlignmentVert: TcxAlignmentVert; -begin - Result := vaTop; -end; - -function TcxCustomGridTableItem.DefaultRepositoryItem: TcxEditRepositoryItem; -begin - if FDataBinding = nil then - Result := nil - else - Result := FDataBinding.DefaultRepositoryItem; -end; - -function TcxCustomGridTableItem.DefaultWidth: Integer; -begin - Result := FDataBinding.DefaultWidth; -end; - -function TcxCustomGridTableItem.GetCellStyle: TcxEditStyle; -begin - if FCellStyle = nil then - FCellStyle := CreateEditStyle; - Result := FCellStyle; - Inc(FCellStyleUseCounter); -end; - -procedure TcxCustomGridTableItem.InitStyle(AStyle: TcxCustomEditStyle; - const AParams: TcxViewParams; AFocused: Boolean); -begin - with AParams do - begin - AStyle.Color := Color; - AStyle.Font := Font; - AStyle.StyleData.FontColor := TextColor; - end; - with AStyle do - begin - if Self.ShowButtons(AFocused) then - ButtonTransparency := ebtNone - else - ButtonTransparency := ebtHideInactive; - HotTrack := True; - end; -end; - -procedure TcxCustomGridTableItem.ReleaseCellStyle; -begin - Dec(FCellStyleUseCounter); - if FCellStyleUseCounter = 0 then FreeAndNil(FCellStyle); -end; - -procedure TcxCustomGridTableItem.AddCell(ACell: TcxGridTableDataCellViewInfo); -begin - FCells.Add(ACell); -end; - -procedure TcxCustomGridTableItem.RemoveCell(ACell: TcxGridTableDataCellViewInfo); -begin - FCells.Remove(ACell); -end; - -function TcxCustomGridTableItem.CreateEditViewData(AProperties: TcxCustomEditProperties): TcxCustomEditViewData; -begin - if AProperties <> nil then - begin - Result := AProperties.CreateViewData(GetCellStyle, True); - Result.OnGetDisplayText := EditViewDataGetDisplayTextHandler; - end - else - Result := nil; -end; - -procedure TcxCustomGridTableItem.DestroyEditViewData(var AEditViewData: TcxCustomEditViewData); -begin - if AEditViewData <> nil then - begin - FreeAndNil(AEditViewData); - ReleaseCellStyle; - end; -end; - -procedure TcxCustomGridTableItem.DoCreateEditViewData; -begin - FEditViewData := CreateEditViewData(GetProperties); -end; - -procedure TcxCustomGridTableItem.DoDestroyEditViewData; -begin - DestroyEditViewData(FEditViewData); -end; - -procedure TcxCustomGridTableItem.EditViewDataGetDisplayTextHandler(Sender: TcxCustomEditViewData; - var AText: string); -var - AGridRecord: TcxCustomGridRecord; -begin - if Sender.Data is TcxCustomGridRecord then - AGridRecord := TcxCustomGridRecord(Sender.Data) - else - AGridRecord := nil; - DoGetDisplayText(AGridRecord, AText); -end; - -function TcxCustomGridTableItem.GetEditViewData(AProperties: TcxCustomEditProperties; - out AIsLocalCopy: Boolean): TcxCustomEditViewData; -begin - AIsLocalCopy := HasCustomPropertiesHandler or (FEditViewData = nil); - if AIsLocalCopy then - Result := CreateEditViewData(AProperties) - else - Result := FEditViewData; -end; - -procedure TcxCustomGridTableItem.ReleaseEditViewData(var AEditViewData: TcxCustomEditViewData; - AIsLocalCopy: Boolean); -begin - if AIsLocalCopy then - DestroyEditViewData(AEditViewData) - else - AEditViewData := nil; -end; - -procedure TcxCustomGridTableItem.CheckVisible; -begin - if ActuallyVisible <> FSavedVisible then - GridView.ItemVisibilityChanged(Self, ActuallyVisible); -end; - -procedure TcxCustomGridTableItem.SaveVisible; -begin - FSavedVisible := ActuallyVisible; -end; - -procedure TcxCustomGridTableItem.DoCustomDrawCell(ACanvas: TcxCanvas; - AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); -begin - if HasCustomDrawCell then - FOnCustomDrawCell(GridView, ACanvas, AViewInfo, ADone); -end; - -procedure TcxCustomGridTableItem.DoGetCellHint(ARecord: TcxCustomGridRecord; - ACellViewInfo: TcxGridTableDataCellViewInfo; const AMousePos: TPoint; - var AHintText: TCaption; var AIsHintMultiLine: Boolean; var AHintTextRect: TRect); -begin - if HasCellHintHandler then - FOnGetCellHint(Self, ARecord, ACellViewInfo, AMousePos, AHintText, AIsHintMultiLine, AHintTextRect); -end; - -procedure TcxCustomGridTableItem.DoGetDataText(ARecordIndex: Integer; - var AText: string); -begin - if HasDataTextHandler then FOnGetDataText(Self, ARecordIndex, AText); -end; - -procedure TcxCustomGridTableItem.DoGetDisplayText(ARecord: TcxCustomGridRecord; - var AText: string); -begin - if Assigned(FOnGetDisplayText) then FOnGetDisplayText(Self, ARecord, AText); -end; - -procedure TcxCustomGridTableItem.DoGetFilterValues(AValueList: TcxDataFilterValueList); -begin - if Assigned(FOnGetFilterValues) then FOnGetFilterValues(Self, AValueList); -end; - -function TcxCustomGridTableItem.DoGetProperties(ARecord: TcxCustomGridRecord): TcxCustomEditProperties; -begin - Result := FPropertiesValue; - if HasCustomPropertiesHandler then FOnGetProperties(Self, ARecord, Result); -end; - -procedure TcxCustomGridTableItem.DoGetPropertiesForEdit(ARecord: TcxCustomGridRecord; - var AProperties: TcxCustomEditProperties); -begin - if HasCustomPropertiesForEditHandler then - FOnGetPropertiesForEdit(Self, ARecord, AProperties); -end; - -procedure TcxCustomGridTableItem.DoInitFilteringDateRanges; -begin - GridView.DoInitFilteringDateRanges(Self); - if HasInitFilteringDateRangesHandler then - FOnInitFilteringDateRanges(Self, FilteringDateRanges); -end; - -procedure TcxCustomGridTableItem.DoInitGroupingDateRanges; -begin - GridView.DoInitGroupingDateRanges(Self); - if HasInitGroupingDateRangesHandler then - FOnInitGroupingDateRanges(Self, GroupingDateRanges); -end; - -procedure TcxCustomGridTableItem.DoUserFiltering(const AValue: Variant; const ADisplayText: string); -begin - if Assigned(FOnUserFiltering) then FOnUserFiltering(Self, AValue, ADisplayText); -end; - -function TcxCustomGridTableItem.HasCellHintHandler: Boolean; -begin - Result := Assigned(FOnGetCellHint); -end; - -function TcxCustomGridTableItem.HasCustomPropertiesForEditHandler: Boolean; -begin - Result := Assigned(FOnGetPropertiesForEdit); -end; - -function TcxCustomGridTableItem.HasCustomPropertiesHandler: Boolean; -begin - Result := Assigned(FOnGetProperties); -end; - -function TcxCustomGridTableItem.HasDataTextHandler: Boolean; -begin - Result := Assigned(FOnGetDataText); -end; - -function TcxCustomGridTableItem.HasInitFilteringDateRangesHandler: Boolean; -begin - Result := Assigned(FOnInitFilteringDateRanges); -end; - -function TcxCustomGridTableItem.HasInitFilteringDateRangesHandlers: Boolean; -begin - Result := GridView.HasInitFilteringDateRangesHandler or HasInitFilteringDateRangesHandler; -end; - -function TcxCustomGridTableItem.HasInitGroupingDateRangesHandler: Boolean; -begin - Result := Assigned(FOnInitGroupingDateRanges); -end; - -function TcxCustomGridTableItem.HasInitGroupingDateRangesHandlers: Boolean; -begin - Result := GridView.HasInitGroupingDateRangesHandler or HasInitGroupingDateRangesHandler; -end; - -procedure TcxCustomGridTableItem.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridTableItem then - with TcxCustomGridTableItem(Source) do - begin - Self.AlternateCaption := AlternateCaption; - Self.BestFitMaxWidth := BestFitMaxWidth; - Self.DataBinding := DataBinding; - Self.FIsCaptionAssigned := FIsCaptionAssigned; - Self.Caption := Caption; - Self.DateTimeGrouping := DateTimeGrouping; - Self.GroupIndex := GroupIndex; - Self.FIsHeaderAlignmentHorzAssigned := FIsHeaderAlignmentHorzAssigned; - Self.HeaderAlignmentHorz := HeaderAlignmentHorz; - Self.FIsHeaderAlignmentVertAssigned := FIsHeaderAlignmentVertAssigned; - Self.HeaderAlignmentVert := HeaderAlignmentVert; - Self.MinWidth := MinWidth; - Self.Options := Options; - Self.PropertiesClass := PropertiesClass; - Self.Properties := Properties; - Self.RepositoryItem := RepositoryItem; - Self.SortOrder := SortOrder; - Self.SortIndex := SortIndex; - Self.Styles := Styles; - Self.Tag := Tag; - Self.Visible := Visible; - Self.VisibleForCustomization := VisibleForCustomization; - Self.FIsWidthAssigned := FIsWidthAssigned; - Self.Width := Width; - Self.OnCustomDrawCell := OnCustomDrawCell; - Self.OnGetCellHint := OnGetCellHint; - Self.OnGetDataText := OnGetDataText; - Self.OnGetDisplayText := OnGetDisplayText; - Self.OnGetFilterDisplayText := OnGetFilterDisplayText; - Self.OnGetFilterValues := OnGetFilterValues; - Self.OnGetProperties := OnGetProperties; - Self.OnGetPropertiesForEdit := OnGetPropertiesForEdit; - Self.OnGetStoredProperties := OnGetStoredProperties; - Self.OnGetStoredPropertyValue := OnGetStoredPropertyValue; - Self.OnInitFilteringDateRanges := OnInitFilteringDateRanges; - Self.OnInitGroupingDateRanges := OnInitGroupingDateRanges; - Self.OnSetStoredPropertyValue := OnSetStoredPropertyValue; - Self.OnUserFiltering := OnUserFiltering; - end - else - inherited; -end; - -function TcxCustomGridTableItem.GetParentComponent: TComponent; -begin - Result := FGridView; -end; - -function TcxCustomGridTableItem.HasParent: Boolean; -begin - Result := FGridView <> nil; -end; - -procedure TcxCustomGridTableItem.ApplyBestFit(ACheckSizingAbility: Boolean = False; - AFireEvents: Boolean = False); -begin - if GridView.IsPattern or ACheckSizingAbility and not CanHorzSize then Exit; - ShowHourglassCursor; - try - ForceWidth(GetBestFitWidth); - Changed(ticSize); - finally - HideHourglassCursor; - BestFitApplied(AFireEvents); - end; -end; - -function TcxCustomGridTableItem.CalculateDefaultCellHeight(ACanvas: TcxCanvas; - AFont: TFont): Integer; -var - AEditStyle: TcxEditStyle; - AEditSizeProperties: TcxEditSizeProperties; -begin - AEditStyle := GetCellStyle; - try - AEditStyle.Font := AFont; - with AEditSizeProperties do - begin - Height := -1; - MaxLineCount := 0; - Width := -1; - end; - Result := GetProperties.GetEditSize(ACanvas, AEditStyle, True, Null, AEditSizeProperties).cy; - if Result <> 0 then - Inc(Result, 2 * cxGridEditOffset); - finally - ReleaseCellStyle; - end; -end; - -function TcxCustomGridTableItem.CreateEditStyle: TcxEditStyle; -begin - Result := GetProperties.GetStyleClass.Create(nil, True) as TcxEditStyle; - if GridView.Control <> nil then - Result.LookAndFeel.MasterLookAndFeel := GridView.LookAndFeel; -end; - -procedure TcxCustomGridTableItem.FocusWithSelection; -begin - Focused := True; -end; - -function TcxCustomGridTableItem.GetAlternateCaption: string; -begin - Result := FAlternateCaption; - if Result = '' then - Result := DefaultAlternateCaption; -end; - -function TcxCustomGridTableItem.GetDefaultValuesProvider(AProperties: TcxCustomEditProperties = nil): IcxEditDefaultValuesProvider; -begin - if FDataBinding = nil then - Result := nil - else - Result := FDataBinding.GetDefaultValuesProvider(AProperties); -end; - -function TcxCustomGridTableItem.GetProperties: TcxCustomEditProperties; -begin - Result := FPropertiesValue; - InitProperties(Result); -end; - -function TcxCustomGridTableItem.GetProperties(ARecord: TcxCustomGridRecord): TcxCustomEditProperties; -begin - Result := DoGetProperties(ARecord); - InitProperties(Result); -end; - -function TcxCustomGridTableItem.GetProperties(ARecordIndex: Integer): TcxCustomEditProperties; -var - ARecord: TcxCustomGridRecord; -begin - if HasCustomPropertiesHandler then - begin - ARecord := ViewData.GetRecordByRecordIndex(ARecordIndex); - if ARecord = nil then - Result := GetProperties - else - Result := GetProperties(ARecord); - end - else - Result := GetProperties; -end; - -function TcxCustomGridTableItem.GetRepositoryItem: TcxEditRepositoryItem; -begin - Result := FRepositoryItem; - if (Result = nil) and not IsDestroying then - begin - Result := DefaultRepositoryItem; - if Result <> nil then - begin - Result.AddListener(Self); - FLastUsedDefaultRepositoryItem := Result; - end; - end; -end; - -procedure TcxCustomGridTableItem.MakeVisible; -begin - Controller.MakeItemVisible(Self); -end; - -procedure TcxCustomGridTableItem.RestoreDefaults; -begin - FIsCaptionAssigned := False; - FIsHeaderAlignmentHorzAssigned := False; - FIsHeaderAlignmentVertAssigned := False; - FIsWidthAssigned := False; - Changed(ticSize); -end; - -{ TcxCustomGridTableBackgroundBitmaps } - -function TcxCustomGridTableBackgroundBitmaps.GetBitmapStyleIndex(Index: Integer): Integer; -begin - case Index of - bbContent: - Result := vsContent; - bbFilterBox: - Result := vsFilterBox; - else - Result := inherited GetBitmapStyleIndex(Index); - end; -end; - -procedure TcxCustomGridTableBackgroundBitmaps.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridTableBackgroundBitmaps then - with TcxCustomGridTableBackgroundBitmaps(Source) do - begin - Self.Content := Content; - Self.FilterBox := FilterBox; - end; - inherited; -end; - -{ TcxCustomGridTableDateTimeHandling } - -constructor TcxCustomGridTableDateTimeHandling.Create(AGridView: TcxCustomGridView); -begin - inherited; - FGrouping := dtgByDateAndTime; - FUseLongDateFormat := True; - FUseShortTimeFormat := True; -end; - -function TcxCustomGridTableDateTimeHandling.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -procedure TcxCustomGridTableDateTimeHandling.SetDateFormat(const Value: string); -begin - if FDateFormat <> Value then - begin - FDateFormat := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableDateTimeHandling.SetFilters(Value: TcxGridDateTimeFilters); -begin - if FFilters <> Value then - begin - FFilters := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableDateTimeHandling.SetGrouping(Value: TcxGridDateTimeGrouping); -begin - if Value = dtgDefault then Value := dtgByDateAndTime; - if FGrouping <> Value then - begin - FGrouping := Value; - GroupingChanged; - end; -end; - -procedure TcxCustomGridTableDateTimeHandling.SetHourFormat(const Value: string); -begin - if FHourFormat <> Value then - begin - FHourFormat := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableDateTimeHandling.SetIgnoreTimeForFiltering(Value: Boolean); -begin - if FIgnoreTimeForFiltering <> Value then - begin - FIgnoreTimeForFiltering := Value; - GridView.DataController.Refresh; - end; -end; - -procedure TcxCustomGridTableDateTimeHandling.SetMonthFormat(const Value: string); -begin - if FMonthFormat <> Value then - begin - FMonthFormat := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableDateTimeHandling.SetUseLongDateFormat(Value: Boolean); -begin - if FUseLongDateFormat <> Value then - begin - FUseLongDateFormat := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableDateTimeHandling.SetUseShortTimeFormat(Value: Boolean); -begin - if FUseShortTimeFormat <> Value then - begin - FUseShortTimeFormat := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableDateTimeHandling.SetYearFormat(const Value: string); -begin - if FYearFormat <> Value then - begin - FYearFormat := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableDateTimeHandling.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxCustomGridTableDateTimeHandling then - with TcxCustomGridTableDateTimeHandling(Source) do - begin - Self.DateFormat := DateFormat; - Self.Filters := Filters; - Self.Grouping := Grouping; - Self.HourFormat := HourFormat; - Self.IgnoreTimeForFiltering := IgnoreTimeForFiltering; - Self.MonthFormat := MonthFormat; - Self.UseLongDateFormat := UseLongDateFormat; - Self.UseShortTimeFormat := UseShortTimeFormat; - Self.YearFormat := YearFormat; - end; -end; - -function TcxCustomGridTableDateTimeHandling.GetDateFormat: string; -begin - Result := FDateFormat; - if Result = '' then - if UseLongDateFormat then - Result := LongDateFormat - else - Result := ''; -end; - -function TcxCustomGridTableDateTimeHandling.GetHourFormat: string; -begin - Result := FHourFormat; - if Result = '' then - if UseShortTimeFormat then - Result := ShortTimeFormat - else - Result := ''; -end; - -function TcxCustomGridTableDateTimeHandling.GetMonthFormat: string; -begin - Result := FMonthFormat; - if Result = '' then - Result := cxGetResourceString(@scxGridMonthFormat); -end; - -function TcxCustomGridTableDateTimeHandling.GetYearFormat: string; -begin - Result := FYearFormat; - if Result = '' then - Result := cxGetResourceString(@scxGridYearFormat); -end; - -procedure TcxCustomGridTableDateTimeHandling.GroupingChanged; -var - I: Integer; -begin - if GridView.ItemCount = 0 then - Changed(vcProperty) - else - begin - GridView.BeginUpdate; - try - for I := 0 to GridView.ItemCount - 1 do - GridView.Items[I].DateTimeGroupingChanged; - finally - GridView.EndUpdate; - end; - end; -end; - -{ TcxGridFilterMRUItem } - -function GetFilterStream(AFilter: TcxDataFilterCriteria): TMemoryStream; -begin - Result := TMemoryStream.Create; - AFilter.WriteData(Result); -end; - -constructor TcxGridFilterMRUItem.Create(AFilter: TcxDataFilterCriteria); -begin - inherited Create; - Filter := AFilter.DataController.CreateFilter; - Filter.Assign(AFilter); -end; - -destructor TcxGridFilterMRUItem.Destroy; -begin - Filter.Free; - inherited; -end; - -function TcxGridFilterMRUItem.GetCaption: string; -begin - Result := Filter.FilterCaption; -end; - -function TcxGridFilterMRUItem.StreamEquals(AStream: TMemoryStream): Boolean; -var - AOwnStream: TMemoryStream; -begin - AOwnStream := GetStream; - try - Result := StreamsEqual(AOwnStream, AStream); - finally - AStream.Free; - AOwnStream.Free; - end; -end; - -procedure TcxGridFilterMRUItem.AssignTo(AFilter: TcxDataFilterCriteria); -begin - AFilter.AssignItems(Filter); -end; - -function TcxGridFilterMRUItem.Equals(AItem: TcxMRUItem): Boolean; -begin - Result := StreamEquals(TcxGridFilterMRUItem(AItem).GetStream); -end; - -function TcxGridFilterMRUItem.FilterEquals(AFilter: TcxDataFilterCriteria): Boolean; -begin - Result := StreamEquals(GetFilterStream(AFilter)); -end; - -function TcxGridFilterMRUItem.GetStream: TMemoryStream; -begin - Result := GetFilterStream(Filter); -end; - -{ TcxGridFilterMRUItems } - -constructor TcxGridFilterMRUItems.Create(AFiltering: TcxCustomGridTableFiltering); -begin - inherited Create; - FFiltering := AFiltering; - FVisibleItems := TList.Create; -end; - -destructor TcxGridFilterMRUItems.Destroy; -begin - FVisibleItems.Free; - inherited; -end; - -function TcxGridFilterMRUItems.GetItem(Index: Integer): TcxGridFilterMRUItem; -begin - Result := TcxGridFilterMRUItem(inherited Items[Index]); -end; - -function TcxGridFilterMRUItems.GetVisibleCount: Integer; -begin - Result := FVisibleItems.Count; -end; - -function TcxGridFilterMRUItems.GetVisibleItem(Index: Integer): TcxGridFilterMRUItem; -begin - Result := TcxGridFilterMRUItem(FVisibleItems[Index]); -end; - -procedure TcxGridFilterMRUItems.DeleteEmptyItems; -var - APrevCount, I: Integer; -begin - APrevCount := Count; - for I := Count - 1 downto 0 do - if Items[I].Filter.IsEmpty then - Delete(I); - if Count <> APrevCount then - RefreshVisibleItemsList; -end; - -procedure TcxGridFilterMRUItems.FilterChanged; -begin - RefreshVisibleItemsList; -end; - -procedure TcxGridFilterMRUItems.RefreshVisibleItemsList; -var - APrevVisibleCount: Integer; - AFilter: TcxDataFilterCriteria; - I: Integer; - AItem: TcxGridFilterMRUItem; -begin - APrevVisibleCount := VisibleCount; - AFilter := FFiltering.GridView.DataController.Filter; - FVisibleItems.Clear; - for I := 0 to Count - 1 do - begin - AItem := Items[I]; - if not AItem.FilterEquals(AFilter) then FVisibleItems.Add(AItem); - end; - if VisibleCount <> APrevVisibleCount then - FFiltering.MRUItemsVisibleCountChanged(APrevVisibleCount, VisibleCount); -end; - -procedure TcxGridFilterMRUItems.Add(AFilter: TcxDataFilterCriteria); -begin - if not AFilter.IsEmpty then - begin - inherited Add(TcxGridFilterMRUItem.Create(AFilter)); - RefreshVisibleItemsList; - end; -end; - -{ TcxGridFilterBox } - -constructor TcxGridFilterBox.Create(AGridView: TcxCustomGridView); -begin - inherited; - FCustomizeDialog := True; - FPosition := fpBottom; - FVisible := fvNonEmpty; -end; - -procedure TcxGridFilterBox.SetCustomizeDialog(Value: Boolean); -begin - if FCustomizeDialog <> Value then - begin - FCustomizeDialog := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridFilterBox.SetMRUItemsListDropDownCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FMRUItemsListDropDownCount <> Value then - begin - FMRUItemsListDropDownCount := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridFilterBox.SetPosition(Value: TcxGridFilterPosition); -begin - if FPosition <> Value then - begin - FPosition := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridFilterBox.SetVisible(Value: TcxGridFilterVisible); -begin - if FVisible <> Value then - begin - FVisible := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridFilterBox.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridFilterBox then - with TcxGridFilterBox(Source) do - begin - Self.CustomizeDialog := CustomizeDialog; - Self.MRUItemsListDropDownCount := MRUItemsListDropDownCount; - Self.Position := Position; - Self.Visible := Visible; - end; -end; - -{ TcxGridItemFilterPopupOptions } - -constructor TcxGridItemFilterPopupOptions.Create(AGridView: TcxCustomGridView); -begin - inherited; - FMaxDropDownItemCount := cxGridFilterDefaultItemPopupMaxDropDownItemCount; - FMultiSelect := True; -end; - -procedure TcxGridItemFilterPopupOptions.SetApplyMultiSelectChanges(Value: TcxGridItemFilterPopupApplyChangesMode); -begin - if FApplyMultiSelectChanges <> Value then - begin - FApplyMultiSelectChanges := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridItemFilterPopupOptions.SetDropDownWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FDropDownWidth <> Value then - begin - FDropDownWidth := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridItemFilterPopupOptions.SetMaxDropDownItemCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FMaxDropDownItemCount <> Value then - begin - FMaxDropDownItemCount := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridItemFilterPopupOptions.SetMultiSelect(Value: Boolean); -begin - if FMultiSelect <> Value then - begin - FMultiSelect := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridItemFilterPopupOptions.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridItemFilterPopupOptions then - with TcxGridItemFilterPopupOptions(Source) do - begin - Self.ApplyMultiSelectChanges := ApplyMultiSelectChanges; - Self.DropDownWidth := DropDownWidth; - Self.MaxDropDownItemCount := MaxDropDownItemCount; - Self.MultiSelect := MultiSelect; - end; -end; - -{ TcxCustomGridTableFiltering } - -constructor TcxCustomGridTableFiltering.Create(AGridView: TcxCustomGridView); -begin - inherited; - FItemMRUItemsList := True; - FItemMRUItemsListCount := cxGridFilterDefaultItemMRUItemsListCount; - FItemPopup := GetItemPopupClass.Create(GridView); - FMRUItems := GetMRUItemsClass.Create(Self); - FMRUItemsList := True; - FMRUItemsListCount := cxGridFilterDefaultMRUItemsListCount; -end; - -destructor TcxCustomGridTableFiltering.Destroy; -begin - FMRUItems.Free; - FItemPopup.Free; - inherited; -end; - -function TcxCustomGridTableFiltering.GetCustomizeDialog: Boolean; -begin - Result := GridView.FilterBox.CustomizeDialog; -end; - -function TcxCustomGridTableFiltering.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -function TcxCustomGridTableFiltering.GetMRUItemsListDropDownCount: Integer; -begin - Result := GridView.FilterBox.MRUItemsListDropDownCount; -end; - -function TcxCustomGridTableFiltering.GetPosition: TcxGridFilterPosition; -begin - Result := GridView.FilterBox.Position; -end; - -function TcxCustomGridTableFiltering.GetVisible: TcxGridFilterVisible; -begin - Result := GridView.FilterBox.Visible; -end; - -procedure TcxCustomGridTableFiltering.SetCustomizeDialog(Value: Boolean); -begin - GridView.FilterBox.CustomizeDialog := Value; -end; - -procedure TcxCustomGridTableFiltering.SetItemFilteredItemsList(Value: Boolean); -begin - if FItemFilteredItemsList <> Value then - begin - FItemFilteredItemsList := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableFiltering.SetItemMRUItemsList(Value: Boolean); -begin - if FItemMRUItemsList <> Value then - begin - FItemMRUItemsList := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableFiltering.SetItemMRUItemsListCount(Value: Integer); -var - I: Integer; -begin - if Value < 0 then Value := 0; - if FItemMRUItemsListCount <> Value then - begin - FItemMRUItemsListCount := Value; - for I := 0 to GridView.ItemCount - 1 do - GridView.Items[I].DataBinding.FilterMRUValueItems.MaxCount := FItemMRUItemsListCount; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableFiltering.SetItemPopup(Value: TcxGridItemFilterPopupOptions); -begin - FItemPopup.Assign(Value); -end; - -procedure TcxCustomGridTableFiltering.SetMRUItemsList(Value: Boolean); -begin - if FMRUItemsList <> Value then - begin - FMRUItemsList := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableFiltering.SetMRUItemsListCount(Value: Integer); - - function GetMRUItemsMaxCount: Integer; - begin - Result := FMRUItemsListCount; - if Result <> 0 then Inc(Result); // for current filter - end; - -begin - if Value < 0 then Value := 0; - if FMRUItemsListCount <> Value then - begin - FMRUItemsListCount := Value; - FMRUItems.MaxCount := GetMRUItemsMaxCount; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableFiltering.SetMRUItemsListDropDownCount(Value: Integer); -begin - GridView.FilterBox.MRUItemsListDropDownCount := Value; -end; - -procedure TcxCustomGridTableFiltering.SetPosition(Value: TcxGridFilterPosition); -begin - GridView.FilterBox.Position := Value; -end; - -procedure TcxCustomGridTableFiltering.SetVisible(Value: TcxGridFilterVisible); -begin - GridView.FilterBox.Visible := Value; -end; - -procedure TcxCustomGridTableFiltering.FilterControlDialogApply(Sender: TObject); -begin - with GridView.DataController.Filter do - if not IsEmpty then Active := True; - AddFilterToMRUItems; -end; - -procedure TcxCustomGridTableFiltering.ReadCustomizeDialog(Reader: TReader); -begin - CustomizeDialog := Reader.ReadBoolean; -end; - -procedure TcxCustomGridTableFiltering.ReadMRUItemsListDropDownCount(Reader: TReader); -begin - MRUItemsListDropDownCount := Reader.ReadInteger; -end; - -procedure TcxCustomGridTableFiltering.ReadPosition(Reader: TReader); -begin - Position := TcxGridFilterPosition(GetEnumValue(TypeInfo(TcxGridFilterPosition), Reader.ReadIdent)); -end; - -procedure TcxCustomGridTableFiltering.ReadVisible(Reader: TReader); -begin - Visible := TcxGridFilterVisible(GetEnumValue(TypeInfo(TcxGridFilterVisible), Reader.ReadIdent)); -end; - -procedure TcxCustomGridTableFiltering.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('CustomizeDialog', ReadCustomizeDialog, nil, True); - Filer.DefineProperty('DropDownWidth', ReadItemPopupDropDownWidth, nil, True); - Filer.DefineProperty('MaxDropDownCount', ReadItemPopupMaxDropDownCount, nil, True); - Filer.DefineProperty('MRUItemsListDropDownCount', ReadMRUItemsListDropDownCount, nil, True); - Filer.DefineProperty('Position', ReadPosition, nil, True); - Filer.DefineProperty('Visible', ReadVisible, nil, True); -end; - -procedure TcxCustomGridTableFiltering.FilterChanged; -begin - FMRUItems.FilterChanged; -end; - -function TcxCustomGridTableFiltering.GetItemPopupClass: TcxGridItemFilterPopupOptionsClass; -begin - Result := TcxGridItemFilterPopupOptions; -end; - -function TcxCustomGridTableFiltering.GetMRUItemsClass: TcxGridFilterMRUItemsClass; -begin - Result := TcxGridFilterMRUItems; -end; - -function TcxCustomGridTableFiltering.IsMRUItemsListAvailable: Boolean; -begin - Result := FMRUItemsList and (FMRUItems.VisibleCount <> 0); -end; - -procedure TcxCustomGridTableFiltering.MRUItemsVisibleCountChanged(AOldCount, ANewCount: Integer); -begin - if FMRUItemsList and ((AOldCount = 0) or (ANewCount = 0)) then - Changed(vcSize); -end; - -function TcxCustomGridTableFiltering.GetItemPopupDropDownWidth: Integer; -begin - Result := FItemPopup.DropDownWidth; -end; - -function TcxCustomGridTableFiltering.GetItemPopupMaxDropDownItemCount: Integer; -begin - Result := FItemPopup.MaxDropDownItemCount; -end; - -procedure TcxCustomGridTableFiltering.SetItemPopupDropDownWidth(Value: Integer); -begin - FItemPopup.DropDownWidth := Value; -end; - -procedure TcxCustomGridTableFiltering.SetItemPopupMaxDropDownItemCount(Value: Integer); -begin - FItemPopup.MaxDropDownItemCount := Value; -end; - -procedure TcxCustomGridTableFiltering.ReadItemPopupDropDownWidth(Reader: TReader); -begin - DropDownWidth := Reader.ReadInteger; -end; - -procedure TcxCustomGridTableFiltering.ReadItemPopupMaxDropDownCount(Reader: TReader); -begin - MaxDropDownCount := Reader.ReadInteger; -end; - -procedure TcxCustomGridTableFiltering.AddFilterToMRUItems(AFilter: TcxDataFilterCriteria = nil); -begin - if AFilter = nil then - AFilter := GridView.DataController.Filter; - FMRUItems.Add(AFilter); -end; - -procedure TcxCustomGridTableFiltering.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridTableFiltering then - with TcxCustomGridTableFiltering(Source) do - begin - Self.ItemFilteredItemsList := ItemFilteredItemsList; - Self.ItemMRUItemsList := ItemMRUItemsList; - Self.ItemMRUItemsListCount := ItemMRUItemsListCount; - Self.ItemPopup := ItemPopup; - Self.MRUItemsList := MRUItemsList; - Self.MRUItemsListCount := MRUItemsListCount; - end - else - inherited; -end; - -procedure TcxCustomGridTableFiltering.RunCustomizeDialog(AItem: TcxCustomGridTableItem); -begin - if GridView.DoFilterDialogShow(AItem) then Exit; - if (AItem = nil) or IsFilterControlDialogNeeded(GridView.DataController.Filter) then - if not GridView.DoFilterCustomization then - ExecuteFilterControlDialog(GridView, GridView.LookAndFeel, - FilterControlDialogApply, GridView.OnFilterControlDialogShow, clDefault, - '', TcxCustomGrid(GridView.Control).Font) - else - else - if ShowFilterDialog(GridView.DataController.Filter, AItem, - AItem.GetProperties, AItem.FilterCaption, AItem.DataBinding.ValueTypeClass, - GridView.LookAndFeel, TcxCustomGrid(GridView.Control).Font) then - begin - GridView.DataController.Filter.Active := True; - AddFilterToMRUItems; - end; -end; - -{ TcxCustomGridTableOptionsBehavior } - -constructor TcxCustomGridTableOptionsBehavior.Create(AGridView: TcxCustomGridView); -begin - inherited; - FCopyCaptionsToClipboard := True; - FDragHighlighting := True; - FDragOpening := True; - FDragScrolling := True; - FImmediateEditor := True; -end; - -function TcxCustomGridTableOptionsBehavior.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -procedure TcxCustomGridTableOptionsBehavior.SetAlwaysShowEditor(Value: Boolean); -begin - if FAlwaysShowEditor <> Value then - begin - FAlwaysShowEditor := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetBestFitMaxRecordCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FBestFitMaxRecordCount <> Value then - begin - FBestFitMaxRecordCount := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetCellHints(Value: Boolean); -begin - if FCellHints <> Value then - begin - FCellHints := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetCopyCaptionsToClipboard(Value: Boolean); -begin - if FCopyCaptionsToClipboard <> Value then - begin - FCopyCaptionsToClipboard := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetDragDropText(Value: Boolean); -begin - if FDragDropText <> Value then - begin - FDragDropText := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetDragFocusing(Value: TcxGridDragFocusing); -begin - if FDragFocusing <> Value then - begin - FDragFocusing := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetDragHighlighting(Value: Boolean); -begin - if FDragHighlighting <> Value then - begin - FDragHighlighting := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetDragOpening(Value: Boolean); -begin - if FDragOpening <> Value then - begin - FDragOpening := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetDragScrolling(Value: Boolean); -begin - if FDragScrolling <> Value then - begin - FDragScrolling := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetFocusCellOnCycle(Value: Boolean); -begin - if FFocusCellOnCycle <> Value then - begin - FFocusCellOnCycle := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetFocusCellOnTab(Value: Boolean); -begin - if FFocusCellOnTab <> Value then - begin - FFocusCellOnTab := Value; - with GridView.Site do - if FFocusCellOnTab then - Keys := Keys + [kTab] - else - Keys := Keys - [kTab]; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetFocusFirstCellOnNewRecord(Value: Boolean); -begin - if FFocusFirstCellOnNewRecord <> Value then - begin - FFocusFirstCellOnNewRecord := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetGoToNextCellOnEnter(Value: Boolean); -begin - if FGoToNextCellOnEnter <> Value then - begin - FGoToNextCellOnEnter := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetImmediateEditor(Value: Boolean); -begin - if FImmediateEditor <> Value then - begin - FImmediateEditor := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetIncSearch(Value: Boolean); -begin - if FIncSearch <> Value then - begin - if not Value then - GridView.Controller.CancelIncSearching; - FIncSearch := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetIncSearchItem(Value: TcxCustomGridTableItem); -begin - if FIncSearchItem <> Value then - begin - FIncSearchItem := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetNavigatorHints(Value: Boolean); -begin - if FNavigatorHints <> Value then - begin - FNavigatorHints := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.SetPullFocusing(Value: Boolean); -begin - if FPullFocusing <> Value then - begin - FPullFocusing := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsBehavior.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridTableOptionsBehavior then - with TcxCustomGridTableOptionsBehavior(Source) do - begin - Self.AlwaysShowEditor := AlwaysShowEditor; - Self.BestFitMaxRecordCount := BestFitMaxRecordCount; - Self.CellHints := CellHints; - Self.CopyCaptionsToClipboard := CopyCaptionsToClipboard; - Self.DragDropText := DragDropText; - Self.DragFocusing := DragFocusing; - Self.DragHighlighting := DragHighlighting; - Self.DragOpening := DragOpening; - Self.DragScrolling := DragScrolling; - Self.FocusCellOnCycle := FocusCellOnCycle; - Self.FocusCellOnTab := FocusCellOnTab; - Self.FocusFirstCellOnNewRecord := FocusFirstCellOnNewRecord; - Self.GoToNextCellOnEnter := GoToNextCellOnEnter; - Self.ImmediateEditor := ImmediateEditor; - Self.IncSearch := IncSearch; - Self.IncSearchItem := IncSearchItem; - Self.NavigatorHints := NavigatorHints; - Self.PullFocusing := PullFocusing; - end; - inherited; -end; - -{ TcxCustomGridTableOptionsCustomize } - -constructor TcxCustomGridTableOptionsCustomize.Create(AGridView: TcxCustomGridView); -begin - inherited; - FItemFiltering := True; - FItemGrouping := True; - FItemMoving := True; - FItemSorting := True; -end; - -procedure TcxCustomGridTableOptionsCustomize.SetItemFiltering(Value: Boolean); -begin - if FItemFiltering <> Value then - begin - FItemFiltering := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableOptionsCustomize.SetItemGrouping(Value: Boolean); -begin - if FItemGrouping <> Value then - begin - FItemGrouping := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsCustomize.SetItemHiding(Value: Boolean); -begin - if FItemHiding <> Value then - begin - FItemHiding := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsCustomize.SetItemMoving(Value: Boolean); -begin - if FItemMoving <> Value then - begin - FItemMoving := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsCustomize.SetItemSorting(Value: Boolean); -begin - if FItemSorting <> Value then - begin - FItemSorting := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsCustomize.SetItemsQuickCustomization(Value: Boolean); -begin - if FItemsQuickCustomization <> Value then - begin - FItemsQuickCustomization := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableOptionsCustomize.SetItemsQuickCustomizationMaxDropDownCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FItemsQuickCustomizationMaxDropDownCount <> Value then - begin - FItemsQuickCustomizationMaxDropDownCount := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsCustomize.SetItemsQuickCustomizationReordering(Value: TcxGridQuickCustomizationReordering); -begin - if FItemsQuickCustomizationReordering <> Value then - begin - FItemsQuickCustomizationReordering := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsCustomize.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridTableOptionsCustomize then - with TcxCustomGridTableOptionsCustomize(Source) do - begin - Self.ItemFiltering := ItemFiltering; - Self.ItemGrouping := ItemGrouping; - Self.ItemHiding := ItemHiding; - Self.ItemMoving := ItemMoving; - Self.ItemSorting := ItemSorting; - Self.ItemsQuickCustomization := ItemsQuickCustomization; - Self.ItemsQuickCustomizationMaxDropDownCount := ItemsQuickCustomizationMaxDropDownCount; - Self.ItemsQuickCustomizationReordering := ItemsQuickCustomizationReordering; - end; - inherited; -end; - -function TcxCustomGridTableOptionsCustomize.SupportsItemsQuickCustomizationReordering: Boolean; -begin - Result := GridView.IsDesigning or - (ItemsQuickCustomizationReordering = qcrEnabled) or - (ItemsQuickCustomizationReordering = qcrDefault) and ItemMoving; -end; - -{ TcxCustomGridTableOptionsData } - -constructor TcxCustomGridTableOptionsData.Create(AGridView: TcxCustomGridView); -begin - inherited; - FCancelOnExit := True; - FDeleting := True; - FDeletingConfirmation := True; - FEditing := True; - FInserting := True; -end; - -function TcxCustomGridTableOptionsData.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -procedure TcxCustomGridTableOptionsData.SetAppending(Value: Boolean); -begin - if FAppending <> Value then - begin - FAppending := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsData.SetCancelOnExit(Value: Boolean); -begin - if FCancelOnExit <> Value then - begin - FCancelOnExit := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsData.SetDeleting(Value: Boolean); -begin - if FDeleting <> Value then - begin - FDeleting := Value; - GridView.RefreshNavigators; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsData.SetDeletingConfirmation(Value: Boolean); -begin - if FDeletingConfirmation <> Value then - begin - FDeletingConfirmation := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsData.SetEditing(Value: Boolean); -begin - if FEditing <> Value then - begin - FEditing := Value; - if not FEditing then - GridView.Controller.EditingItem := nil; - GridView.RefreshNavigators; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridTableOptionsData.SetInserting(Value: Boolean); -begin - if FInserting <> Value then - begin - FInserting := Value; - GridView.RefreshNavigators; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsData.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridTableOptionsData then - with TcxCustomGridTableOptionsData(Source) do - begin - Self.Appending := Appending; - Self.CancelOnExit := CancelOnExit; - Self.Deleting := Deleting; - Self.DeletingConfirmation := DeletingConfirmation; - Self.Editing := Editing; - Self.Inserting := Inserting; - end; - inherited; -end; - -{ TcxCustomGridTableOptionsSelection } - -constructor TcxCustomGridTableOptionsSelection.Create(AGridView: TcxCustomGridView); -begin - inherited; - FCellSelect := True; - FHideFocusRectOnExit := True; - FInvertSelect := True; - FUnselectFocusedRecordOnExit := True; -end; - -function TcxCustomGridTableOptionsSelection.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -function TcxCustomGridTableOptionsSelection.GetMultiSelect: Boolean; -begin - Result := GridView.DataController.MultiSelect; -end; - -procedure TcxCustomGridTableOptionsSelection.SetHideFocusRectOnExit(Value: Boolean); -begin - if FHideFocusRectOnExit <> Value then - begin - FHideFocusRectOnExit := Value; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridTableOptionsSelection.SetHideSelection(Value: Boolean); -begin - if FHideSelection <> Value then - begin - FHideSelection := Value; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridTableOptionsSelection.SetUnselectFocusedRecordOnExit(Value: Boolean); -begin - if FUnselectFocusedRecordOnExit <> Value then - begin - FUnselectFocusedRecordOnExit := Value; - Changed(vcProperty); - end; -end; - -function TcxCustomGridTableOptionsSelection.IsInvertSelectStored: Boolean; -begin - Result := not FInvertSelect; -end; - -function TcxCustomGridTableOptionsSelection.IsMultiSelectStored: Boolean; -begin - Result := MultiSelect; -end; - -procedure TcxCustomGridTableOptionsSelection.SetCellSelect(Value: Boolean); -begin - if FCellSelect <> Value then - begin - FCellSelect := Value; - if FCellSelect then - GridView.Controller.FocusFirstAvailableItem - else - GridView.Controller.FocusedItem := nil; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsSelection.SetInvertSelect(Value: Boolean); -begin - if FInvertSelect <> Value then - begin - FInvertSelect := Value; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridTableOptionsSelection.SetMultiSelect(Value: Boolean); -begin - if MultiSelect <> Value then - begin - GridView.DataController.MultiSelect := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableOptionsSelection.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridTableOptionsSelection then - with TcxCustomGridTableOptionsSelection(Source) do - begin - Self.CellSelect := CellSelect; - Self.HideFocusRectOnExit := HideFocusRectOnExit; - Self.HideSelection := HideSelection; - Self.InvertSelect := InvertSelect; - Self.MultiSelect := MultiSelect; - Self.UnselectFocusedRecordOnExit := UnselectFocusedRecordOnExit; - end; - inherited; -end; - -{ TcxCustomGridTableOptionsView } - -constructor TcxCustomGridTableOptionsView.Create(AGridView: TcxCustomGridView); -begin - inherited; - FFocusRect := True; - FNavigatorOffset := cxGridNavigatorDefaultOffset; - FNoDataToDisplayInfoText := scxGridNoDataInfoText; - FShowItemFilterButtons := sfbWhenSelected; -end; - -function TcxCustomGridTableOptionsView.GetGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GridView); -end; - -procedure TcxCustomGridTableOptionsView.SetCellAutoHeight(Value: Boolean); -begin - if FCellAutoHeight <> Value then - begin - FCellAutoHeight := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableOptionsView.SetCellEndEllipsis(Value: Boolean); -begin - if FCellEndEllipsis <> Value then - begin - FCellEndEllipsis := Value; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridTableOptionsView.SetCellTextMaxLineCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FCellTextMaxLineCount <> Value then - begin - FCellTextMaxLineCount := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableOptionsView.SetFocusRect(Value: Boolean); -begin - if FFocusRect <> Value then - begin - FFocusRect := Value; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridTableOptionsView.SetItemCaptionAutoHeight(Value: Boolean); -begin - if FItemCaptionAutoHeight <> Value then - begin - FItemCaptionAutoHeight := Value; - ItemCaptionAutoHeightChanged; - end; -end; - -procedure TcxCustomGridTableOptionsView.SetItemCaptionEndEllipsis(Value: Boolean); -begin - if FItemCaptionEndEllipsis <> Value then - begin - FItemCaptionEndEllipsis := Value; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridTableOptionsView.SetNavigator(Value: Boolean); -begin - if FNavigator <> Value then - begin - FNavigator := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableOptionsView.SetNavigatorOffset(Value: Integer); -begin - if Value < 0 then Value := 0; - if FNavigatorOffset <> Value then - begin - FNavigatorOffset := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableOptionsView.SetNoDataToDisplayInfoText(const Value: string); -begin - if FNoDataToDisplayInfoText <> Value then - begin - FNoDataToDisplayInfoText := Value; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridTableOptionsView.SetShowEditButtons(Value: TcxGridShowEditButtons); -begin - if FShowEditButtons <> Value then - begin - FShowEditButtons := Value; - Changed(vcSize); - end; -end; - -procedure TcxCustomGridTableOptionsView.SetShowItemFilterButtons(Value: TcxGridShowItemFilterButtons); -begin - if FShowItemFilterButtons <> Value then - begin - FShowItemFilterButtons := Value; - Changed(vcSize); - end; -end; - -function TcxCustomGridTableOptionsView.IsNoDataToDisplayInfoTextAssigned: Boolean; -begin - Result := FNoDataToDisplayInfoText <> scxGridNoDataInfoText; -end; - -procedure TcxCustomGridTableOptionsView.ItemCaptionAutoHeightChanged; -begin - Changed(vcSize); -end; - -procedure TcxCustomGridTableOptionsView.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridTableOptionsView then - with TcxCustomGridTableOptionsView(Source) do - begin - Self.CellAutoHeight := CellAutoHeight; - Self.CellEndEllipsis := CellEndEllipsis; - Self.CellTextMaxLineCount := CellTextMaxLineCount; - Self.FocusRect := FocusRect; - Self.ItemCaptionAutoHeight := ItemCaptionAutoHeight; - Self.ItemCaptionEndEllipsis := ItemCaptionEndEllipsis; - Self.Navigator := Navigator; - Self.NavigatorOffset := NavigatorOffset; - Self.NoDataToDisplayInfoText := NoDataToDisplayInfoText; - Self.ShowEditButtons := ShowEditButtons; - Self.ShowItemFilterButtons := ShowItemFilterButtons; - end; - inherited; -end; - -function TcxCustomGridTableOptionsView.GetNoDataToDisplayInfoText: string; -begin - if IsNoDataToDisplayInfoTextAssigned then - Result := FNoDataToDisplayInfoText - else - Result := cxGetResourceString(@scxGridNoDataInfoText); -end; - -{ TcxGridCellPos } - -constructor TcxGridCellPos.Create(AGridRecord: TcxCustomGridRecord; AItem: TObject); -begin - inherited Create; - GridRecord := AGridRecord; - Item := AItem; -end; - -{ TcxGridDataCellPos } - -constructor TcxGridDataCellPos.Create(AGridRecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem); -begin - inherited Create; - GridRecord := AGridRecord; - Item := AItem; -end; - -{ TcxCustomGridTableViewStyles } - -function TcxCustomGridTableViewStyles.GetGridViewValue: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited GetGridView); -end; - -procedure TcxCustomGridTableViewStyles.SetOnGetContentStyle(Value: TcxGridGetCellStyleEvent); -begin - if @FOnGetContentStyle <> @Value then - begin - FOnGetContentStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableViewStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -const - StyleIndexes: array[Boolean] of Integer = (vsContentEven, vsContentOdd); -begin - inherited; - with AParams, LookAndFeelPainter do - case Index of - vsContent: - begin - if AData is TcxCustomGridRecord then - GetDefaultViewParams(StyleIndexes[Odd(TcxCustomGridRecord(AData).Index)], - AData, AParams) - else - begin - Color := DefaultContentColor; - TextColor := DefaultContentTextColor; - end; - end; - vsContentEven: - begin - Color := DefaultContentEvenColor; - TextColor := DefaultContentTextColor; - end; - vsContentOdd: - begin - Color := DefaultContentOddColor; - TextColor := DefaultContentTextColor; - end; - vsFilterBox: - begin - Color := DefaultFilterBoxColor; - TextColor := DefaultFilterBoxTextColor; - end; - vsInactive: - begin - if AData <> nil then - with TcxGridCellPos(AData) do - GetCellContentParams(GridRecord, Item, AParams); - Color := DefaultInactiveColor; - TextColor := DefaultInactiveTextColor; - end; - vsIncSearch: - begin - Color := clDefault; - TextColor := clDefault; - end; - vsSelection: - begin - if AData <> nil then - with TcxGridCellPos(AData) do - GetCellContentParams(GridRecord, Item, AParams); - Color := DefaultSelectionColor; - TextColor := DefaultSelectionTextColor; - end; - end; -end; - -procedure TcxCustomGridTableViewStyles.GetSelectionParams(ARecord: TcxCustomGridRecord; - AItem: TObject; out AParams: TcxViewParams); -var - ACellPos: TcxGridCellPos; -begin - if ARecord <> nil then - ACellPos := TcxGridCellPos.Create(ARecord, AItem) - else - ACellPos := nil; - try - if GridView.DrawRecordActive(ARecord) then - GetViewParams(vsSelection, ACellPos, nil, AParams) - else - GetViewParams(vsInactive, ACellPos, nil, AParams); - finally - ACellPos.Free; - end; - AParams.Bitmap := nil; // to use selection color even if [content] bitmap is assigned -end; - -procedure TcxCustomGridTableViewStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxCustomGridTableViewStyles then - with TcxCustomGridTableViewStyles(Source) do - begin - Self.Content := Content; - Self.ContentEven := ContentEven; - Self.ContentOdd := ContentOdd; - Self.FilterBox := FilterBox; - Self.Inactive := Inactive; - Self.IncSearch := IncSearch; - Self.Selection := Selection; - Self.OnGetContentStyle := OnGetContentStyle; - end; -end; - -procedure TcxCustomGridTableViewStyles.GetCellContentParams(ARecord: TcxCustomGridRecord; - AItem: TObject; out AParams: TcxViewParams); -begin - if (AItem = nil) or (AItem is TcxCustomGridTableItem) then - GetDataCellContentParams(ARecord, TcxCustomGridTableItem(AItem), AParams); -end; - -procedure TcxCustomGridTableViewStyles.GetContentParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -const - StyleIndexes: array[Boolean] of Integer = (vsContentEven, vsContentOdd); -var - AStyle: TcxStyle; - ADataCellPos: TcxGridDataCellPos; -begin - AStyle := nil; - if (ARecord <> nil) and Assigned(FOnGetContentStyle) then - FOnGetContentStyle(GridView, ARecord, AItem, AStyle); - if (ARecord <> nil) and (GetValue(StyleIndexes[Odd(ARecord.Index)]) <> nil) then - begin - ADataCellPos := TcxGridDataCellPos.Create(ARecord, AItem); - try - GetViewParams(StyleIndexes[Odd(ARecord.Index)], ADataCellPos, AStyle, AParams); - finally - ADataCellPos.Free; - end; - end - else - GetViewParams(vsContent, ARecord, AStyle, AParams); -end; - -procedure TcxCustomGridTableViewStyles.GetDataCellContentParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -begin - if AItem = nil then - GetRecordContentParams(ARecord, AItem, AParams) - else - AItem.Styles.GetContentParams(ARecord, AParams); -end; - -procedure TcxCustomGridTableViewStyles.GetDataCellParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams; - AUseViewInfo: Boolean = False; ACellViewInfo: TcxGridTableCellViewInfo = nil; - AIgnoreSelection: Boolean = False); -begin - if not AIgnoreSelection and - (AUseViewInfo and ACellViewInfo.Selected or - not AUseViewInfo and GridView.DrawDataCellSelected(ARecord, AItem, False, nil)) then - GetSelectionParams(ARecord, AItem, AParams) - else - GetDataCellContentParams(ARecord, AItem, AParams); -end; - -procedure TcxCustomGridTableViewStyles.GetRecordContentParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -begin - GetContentParams(ARecord, AItem, AParams); -end; - -{ TcxGridOpenTableItemList } - -function TcxGridOpenTableItemList.GetItem(Index: Integer): TcxCustomGridTableItem; -begin - Result := TcxCustomGridTableItem(inherited Items[Index]); -end; - -procedure TcxGridOpenTableItemList.SetItem(Index: Integer; Value: TcxCustomGridTableItem); -begin - inherited Items[Index] := Value; -end; - -{ TcxCustomGridTableView } - -destructor TcxCustomGridTableView.Destroy; -begin - Controller.EditingController.EditingItem := nil; - inherited; -end; - -function TcxCustomGridTableView.GetBackgroundBitmaps: TcxCustomGridTableBackgroundBitmaps; -begin - Result := TcxCustomGridTableBackgroundBitmaps(inherited BackgroundBitmaps); -end; - -function TcxCustomGridTableView.GetController: TcxCustomGridTableController; -begin - Result := TcxCustomGridTableController(inherited Controller); -end; - -function TcxCustomGridTableView.GetFilterableItem(Index: Integer): TcxCustomGridTableItem; -begin - Result := TcxCustomGridTableItem(FFilterableItems[Index]); -end; - -function TcxCustomGridTableView.GetFilterableItemCount: Integer; -begin - Result := FFilterableItems.Count; -end; - -function TcxCustomGridTableView.GetGroupedItem(Index: Integer): TcxCustomGridTableItem; -begin - Result := Items[DataController.Groups.GroupingItemIndex[Index]]; -end; - -function TcxCustomGridTableView.GetGroupedItemCount: Integer; -begin - Result := DataController.Groups.GroupingItemCount; -end; - -function TcxCustomGridTableView.GetItem(Index: Integer): TcxCustomGridTableItem; -begin - Result := TcxCustomGridTableItem(FItems[Index]); -end; - -function TcxCustomGridTableView.GetItemCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxCustomGridTableView.GetMasterGridRecord: TcxCustomGridRecord; -begin - if MasterGridRecordIndex = -1 then - Result := nil - else - if (MasterGridView as TcxCustomGridTableView).ViewData.IsRecordIndexValid(MasterGridRecordIndex) then - Result := TcxCustomGridTableView(MasterGridView).ViewData.Records[MasterGridRecordIndex] - else - Result := nil; -end; - -function TcxCustomGridTableView.GetOptionsBehavior: TcxCustomGridTableOptionsBehavior; -begin - Result := TcxCustomGridTableOptionsBehavior(inherited OptionsBehavior); -end; - -function TcxCustomGridTableView.GetOptionsData: TcxCustomGridTableOptionsData; -begin - Result := TcxCustomGridTableOptionsData(inherited OptionsData); -end; - -function TcxCustomGridTableView.GetOptionsSelection: TcxCustomGridTableOptionsSelection; -begin - Result := TcxCustomGridTableOptionsSelection(inherited OptionsSelection); -end; - -function TcxCustomGridTableView.GetOptionsView: TcxCustomGridTableOptionsView; -begin - Result := TcxCustomGridTableOptionsView(inherited OptionsView); -end; - -function TcxCustomGridTableView.GetPainter: TcxCustomGridTablePainter; -begin - Result := TcxCustomGridTablePainter(inherited Painter); -end; - -function TcxCustomGridTableView.GetPatternGridView: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(inherited PatternGridView); -end; - -function TcxCustomGridTableView.GetNavigatorButtonsControl: IcxNavigator; -begin - Result := Self; -end; - -function TcxCustomGridTableView.GetSortedItem(Index: Integer): TcxCustomGridTableItem; -begin - Result := Items[DataController.GetSortingItemIndex(Index)]; -end; - -function TcxCustomGridTableView.GetSortedItemCount: Integer; -begin - Result := DataController.GetSortingItemCount; -end; - -function TcxCustomGridTableView.GetStyles: TcxCustomGridTableViewStyles; -begin - Result := TcxCustomGridTableViewStyles(inherited Styles); -end; - -function TcxCustomGridTableView.GetViewData: TcxCustomGridTableViewData; -begin - Result := TcxCustomGridTableViewData(inherited ViewData); -end; - -function TcxCustomGridTableView.GetViewInfo: TcxCustomGridTableViewInfo; -begin - Result := TcxCustomGridTableViewInfo(inherited ViewInfo); -end; - -function TcxCustomGridTableView.GetVisibleItem(Index: Integer): TcxCustomGridTableItem; -begin - Result := TcxCustomGridTableItem(FVisibleItems[Index]); -end; - -function TcxCustomGridTableView.GetVisibleItemCount: Integer; -begin - Result := FVisibleItems.Count; -end; - -procedure TcxCustomGridTableView.SetBackgroundBitmaps(Value: TcxCustomGridTableBackgroundBitmaps); -begin - inherited BackgroundBitmaps := Value; -end; - -procedure TcxCustomGridTableView.SetDateTimeHandling(Value: TcxCustomGridTableDateTimeHandling); -begin - FDateTimeHandling.Assign(Value); -end; - -procedure TcxCustomGridTableView.SetFilterBox(Value: TcxGridFilterBox); -begin - FFilterBox.Assign(Value); -end; - -procedure TcxCustomGridTableView.SetFiltering(Value: TcxCustomGridTableFiltering); -begin - FFiltering.Assign(Value); -end; - -procedure TcxCustomGridTableView.SetItem(Index: Integer; Value: TcxCustomGridTableItem); -begin - Items[Index].Assign(Value); -end; - -procedure TcxCustomGridTableView.SetNavigatorButtons(Value: TcxNavigatorControlButtons); -begin - FNavigatorButtons.Assign(Value); -end; - -procedure TcxCustomGridTableView.SetOnCanFocusRecord(Value: TcxGridAllowRecordOperationEvent); -begin - if @FOnCanFocusRecord <> @Value then - begin - FOnCanFocusRecord := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnCanSelectRecord(Value: TcxGridAllowRecordOperationEvent); -begin - if @FOnCanSelectRecord <> @Value then - begin - FOnCanSelectRecord := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnCellClick(Value: TcxGridCellClickEvent); -begin - if @FOnCellClick <> @Value then - begin - FOnCellClick := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnCellDblClick(Value: TcxGridCellClickEvent); -begin - if @FOnCellDblClick <> @Value then - begin - FOnCellDblClick := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnCustomDrawCell(Value: TcxGridTableDataCellCustomDrawEvent); -begin - if @FOnCustomDrawCell <> @Value then - begin - FOnCustomDrawCell := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnCustomDrawPartBackground(Value: TcxGridPartCustomDrawBackgroundEvent); -begin - if @FOnCustomDrawPartBackground <> @Value then - begin - FOnCustomDrawPartBackground := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnEditChanged(Value: TcxGridCustomTableItemEvent); -begin - if @FOnEditChanged <> @Value then - begin - FOnEditChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnEditing(Value: TcxGridEditingEvent); -begin - if @FOnEditing <> @Value then - begin - FOnEditing := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnEditKeyDown(Value: TcxGridEditKeyEvent); -begin - if @FOnEditKeyDown <> @Value then - begin - FOnEditKeyDown := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnEditKeyPress(Value: TcxGridEditKeyPressEvent); -begin - if @FOnEditKeyPress <> @Value then - begin - FOnEditKeyPress := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnEditKeyUp(Value: TcxGridEditKeyEvent); -begin - if @FOnEditKeyUp <> @Value then - begin - FOnEditKeyUp := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnEditValueChanged(Value: TcxGridCustomTableItemEvent); -begin - if @FOnEditValueChanged <> @Value then - begin - FOnEditValueChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnFilterControlDialogShow(Value: TNotifyEvent); -begin - if @FOnFilterControlDialogShow <> @Value then - begin - FOnFilterControlDialogShow := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnFilterCustomization(Value: TcxGridFilterCustomizationEvent); -begin - if @FOnFilterCustomization <> @Value then - begin - FOnFilterCustomization := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnFilterDialogShow(Value: TcxGridFilterDialogShowEvent); -begin - if @FOnFilterDialogShow <> @Value then - begin - FOnFilterDialogShow := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnFocusedItemChanged(Value: TcxGridFocusedItemChangedEvent); -begin - if @FOnFocusedItemChanged <> @Value then - begin - FOnFocusedItemChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnFocusedRecordChanged(Value: TcxGridFocusedRecordChangedEvent); -begin - if @FOnFocusedRecordChanged <> @Value then - begin - FOnFocusedRecordChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnGetCellHeight(Value: TcxGridGetCellHeightEvent); -begin - if @FOnGetCellHeight <> @Value then - begin - FOnGetCellHeight := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnGetDragDropText(Value: TcxGridGetDragDropTextEvent); -begin - if @FOnGetDragDropText <> @Value then - begin - FOnGetDragDropText := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnInitFilteringDateRanges(Value: TcxGridInitDateRangesEvent); -begin - if @FOnInitFilteringDateRanges <> @Value then - begin - FOnInitFilteringDateRanges := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnInitGroupingDateRanges(Value: TcxGridInitDateRangesEvent); -begin - if @FOnInitGroupingDateRanges <> @Value then - begin - FOnInitGroupingDateRanges := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnInitEdit(Value: TcxGridInitEditEvent); -begin - if @FOnInitEdit <> @Value then - begin - FOnInitEdit := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnInitEditValue(Value: TcxGridInitEditValueEvent); -begin - if @FOnInitEditValue <> @Value then - begin - FOnInitEditValue := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnSelectionChanged(Value: TcxGridCustomTableViewEvent); -begin - if @FOnSelectionChanged <> @Value then - begin - FOnSelectionChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOnTopRecordIndexChanged(Value: TNotifyEvent); -begin - if @FOnTopRecordIndexChanged <> @Value then - begin - FOnTopRecordIndexChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridTableView.SetOptionsBehavior(Value: TcxCustomGridTableOptionsBehavior); -begin - inherited OptionsBehavior := Value; -end; - -procedure TcxCustomGridTableView.SetOptionsCustomize(Value: TcxCustomGridTableOptionsCustomize); -begin - FOptionsCustomize.Assign(Value); -end; - -procedure TcxCustomGridTableView.SetOptionsData(Value: TcxCustomGridTableOptionsData); -begin - inherited OptionsData := Value; -end; - -procedure TcxCustomGridTableView.SetOptionsSelection(Value: TcxCustomGridTableOptionsSelection); -begin - inherited OptionsSelection := Value; -end; - -procedure TcxCustomGridTableView.SetOptionsView(Value: TcxCustomGridTableOptionsView); -begin - inherited OptionsView := Value; -end; - -procedure TcxCustomGridTableView.SetStyles(Value: TcxCustomGridTableViewStyles); -begin - inherited Styles := Value; -end; - -procedure TcxCustomGridTableView.CopyForEachRowProc(ARowIndex: Integer; ARowInfo: TcxRowInfo); -var - I, AIndex: Integer; -begin - for I := 0 to FCopyToClipboardItems.Count - 1 do - begin - AIndex := TcxCustomGridTableItem(FCopyToClipboardItems[I]).Index; - FCopyToClipboardStr := FCopyToClipboardStr + - DataController.GetRowDisplayText(ARowInfo, AIndex) + ColumnSeparator; - if ARowInfo.Level < DataController.Groups.GroupingItemCount then // it's a group row - Break; - end; - if FCopyToClipboardItems.Count <> 0 then - FCopyToClipboardStr := Copy(FCopyToClipboardStr, 1, - Length(FCopyToClipboardStr) - Length(ColumnSeparator)); - FCopyToClipboardStr := FCopyToClipboardStr + EndOfLine; -end; - -procedure TcxCustomGridTableView.RefreshItemIndexes; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].FIndex := I; -end; - -function TcxCustomGridTableView.GetFilterCaption(Index: Integer): string; -begin - Result := FilterableItems[Index].FilterCaption; -end; - -function TcxCustomGridTableView.GetFilterCount: Integer; -begin - Result := FilterableItemCount; -end; - -function TcxCustomGridTableView.GetFilterCriteria: TcxFilterCriteria; -begin - Result := DataController.Filter; -end; - -function TcxCustomGridTableView.GetFilterFieldName(Index: Integer): string; -begin - Result := FilterableItems[Index].DataBinding.FilterFieldName; -end; - -function TcxCustomGridTableView.GetFilterItemLink(Index: Integer): TObject; -begin - Result := FilterableItems[Index]; -end; - -function TcxCustomGridTableView.GetFilterItemLinkID(Index: Integer): Integer; -begin - Result := FilterableItems[Index].ID; -end; - -function TcxCustomGridTableView.GetFilterItemLinkName(Index: Integer): string; -begin - Result := FilterableItems[Index].Name; -end; - -function TcxCustomGridTableView.GetFilterProperties(Index: Integer): TcxCustomEditProperties; -begin - Result := FilterableItems[Index].GetProperties; -end; - -function TcxCustomGridTableView.GetFilterValueType(Index: Integer): cxDataStorage.TcxValueTypeClass; -begin - Result := FilterableItems[Index].DataBinding.ValueTypeClass; -end; - -function TcxCustomGridTableView.NavigatorIsActive: Boolean; -begin - Result := DataController.Active; -end; - -function TcxCustomGridTableView.NavigatorIsBof: Boolean; -var - AIcxGridDataController: IcxGridDataController; -begin - if Supports(TObject(DataController), IcxGridDataController, AIcxGridDataController) then - Result := AIcxGridDataController.GetNavigatorIsBof - else - Result := False; -end; - -function TcxCustomGridTableView.NavigatorIsEof: Boolean; -var - AIcxGridDataController: IcxGridDataController; -begin - if Supports(TObject(DataController), IcxGridDataController, AIcxGridDataController) then - Result := AIcxGridDataController.GetNavigatorIsEof - else - Result := False; -end; - -function TcxCustomGridTableView.NavigatorCanAppend: Boolean; -begin - Result := Controller.CanAppend(True); -end; - -function TcxCustomGridTableView.NavigatorCanEdit: Boolean; -begin - Result := Controller.CanEdit; -end; - -function TcxCustomGridTableView.NavigatorCanDelete: Boolean; -begin - Result := Controller.CanDelete(True); -end; - -function TcxCustomGridTableView.NavigatorCanInsert: Boolean; -begin - Result := Controller.CanInsert(True); -end; - -function TcxCustomGridTableView.NavigatorIsEditing: Boolean; -begin - Result := DataController.IsEditing; -end; - -procedure TcxCustomGridTableView.NavigatorClearBookmark; -begin - DataController.ClearBookmark; -end; - -function TcxCustomGridTableView.NavigatorIsBookmarkAvailable: Boolean; -begin - Result := DataController.IsBookmarkAvailable; -end; - -procedure TcxCustomGridTableView.NavigatorDoAction(AButtonIndex: Integer); -var - APrevAllowAppendRecord: Boolean; -begin - case AButtonIndex of - NBDI_FIRST: - Controller.GoToFirst; - NBDI_PRIORPAGE: - Controller.FocusPrevPage(True); - NBDI_PRIOR: - Controller.GoToPrev(False); - NBDI_NEXT: - begin - APrevAllowAppendRecord := Controller.AllowAppendRecord; - Controller.AllowAppendRecord := False; - try - Controller.GoToNext(False); - finally - Controller.AllowAppendRecord := APrevAllowAppendRecord; - end; - end; - NBDI_NEXTPAGE: - Controller.FocusNextPage(True); - NBDI_LAST: - Controller.GoToLast(False); - NBDI_INSERT, NBDI_APPEND: - Controller.CreateNewRecord(AButtonIndex = NBDI_APPEND); - NBDI_DELETE: - Controller.DeleteSelection; - NBDI_EDIT: - begin - DataController.Edit; - Controller.FocusedItem.Editing := True; - end; - NBDI_POST: - begin - Controller.EditingController.UpdateValue; - DataController.Post(True); - end; - NBDI_CANCEL: - DataController.Cancel; - NBDI_REFRESH: - DataController.RefreshExternalData; - NBDI_SAVEBOOKMARK: - DataController.SaveBookmark; - NBDI_GOTOBOOKMARK: - DataController.GotoBookmark; - NBDI_FILTER: - FFiltering.RunCustomizeDialog; - end; -end; - -function TcxCustomGridTableView.NavigatorGetNotifier: TcxNavigatorControlNotifier; -begin - Result := FNavigatorNotifier; -end; - -function TcxCustomGridTableView.NavigatorIsActionSupported(AButtonIndex: Integer): Boolean; -begin - Result := True; -end; - -function TcxCustomGridTableView.GetProperties(AProperties: TStrings): Boolean; - - procedure AddFilter; - var - I: Integer; - begin - with AProperties do - begin - Add('FilterActive'); - Add('Filter'); - if Filtering.MRUItemsList then - for I := Filtering.MRUItems.Count - 1 downto 0 do - Add(FilterMRUItemBaseName + IntToStr(I)); - end; - end; - -begin - if gsoUseFilter in StorageOptions then - AddFilter; - Result := inherited GetProperties(AProperties); -end; - -procedure TcxCustomGridTableView.GetPropertyValue(const AName: string; - var AValue: Variant); - - function GetFilter: Boolean; - var - AStream: TMemoryStream; - AIndex: Integer; - begin - Result := True; - if AName = 'FilterActive' then - AValue := DataController.Filter.Active - else - if AName = 'Filter' then - begin - AStream := TMemoryStream.Create; - try - DataController.Filter.WriteData(AStream); - AValue := StreamToString(AStream); - finally - AStream.Free; - end; - end - else - if Pos(FilterMRUItemBaseName, AName) = 1 then - begin - AIndex := StrToInt(Copy(AName, Length(FilterMRUItemBaseName) + 1, MaxInt)); - AStream := Filtering.MRUItems[AIndex].GetStream; - try - AValue := StreamToString(AStream); - finally - AStream.Free; - end; - end - else - Result := False; - end; - -begin - if (gsoUseFilter in StorageOptions) and GetFilter then Exit; - inherited; -end; - -procedure TcxCustomGridTableView.SetPropertyValue(const AName: string; - const AValue: Variant); - - function SetFilter: Boolean; - var - AStream: TMemoryStream; - AFilter: TcxDataFilterCriteria; - begin - Result := True; - if AName = 'FilterActive' then - DataController.Filter.Active := StringToBoolean(AValue) - else - if AName = 'Filter' then - begin - AStream := TMemoryStream.Create; - try - StringToStream(dxVariantToAnsiString(AValue), AStream); - AStream.Position := 0; - DataController.Filter.ReadData(AStream); - finally - AStream.Free; - end; - end - else - if Pos(FilterMRUItemBaseName, AName) = 1 then - begin - AFilter := DataController.CreateFilter; - try - AStream := TMemoryStream.Create; - try - StringToStream(dxVariantToAnsiString(AValue), AStream); - AStream.Position := 0; - AFilter.ReadData(AStream); - Filtering.MRUItems.Add(AFilter); - finally - AStream.Free; - end; - finally - AFilter.Free; - end; - end - else - Result := False; - end; - -begin - if (gsoUseFilter in StorageOptions) and SetFilter then Exit; - inherited; -end; - -function TcxCustomGridTableView.CreateStoredObject(const AObjectName, AClassName: string): TObject; - - function GetSummaryGroupIndex: Integer; - var - I: Integer; - AIndex: string; - begin - AIndex := ''; - I := Length('SummaryGroup') + 1; - while AObjectName[I] <> '_' do - begin - AIndex := AIndex + AObjectName[I]; - if I = Length(AObjectName) then - Break; - Inc(I); - end; - {$IFDEF DELPHI6} - if not TryStrToInt(AIndex, Result) then - Result := -1; - {$ELSE} - try - Result := StrToInt(AIndex); - except - on EConvertError do - Result := -1; - end; - {$ENDIF} - end; - - function CreateSummary: TObject; - var - ASummaryGroupIndex: Integer; - begin - Result := nil; - if Pos('FooterSummaryItem', AObjectName) = 1 then - Result := DataController.Summary.FooterSummaryItems.Add - else - if Pos('DefaultGroupSummaryItem', AObjectName) = 1 then - Result := DataController.Summary.DefaultGroupSummaryItems.Add - else - if Pos('SummaryGroup', AObjectName) = 1 then - begin - ASummaryGroupIndex := GetSummaryGroupIndex; - if ASummaryGroupIndex >= 0 then - if Pos('Item', AObjectName) <> 0 then - begin - if ASummaryGroupIndex < DataController.Summary.SummaryGroups.Count then - Result := DataController.Summary.SummaryGroups[ASummaryGroupIndex].SummaryItems.Add; - end - else - if Pos('Link', AObjectName) <> 0 then - begin - if ASummaryGroupIndex < DataController.Summary.SummaryGroups.Count then - Result := DataController.Summary.SummaryGroups[ASummaryGroupIndex].Links.Add; - end - else - Result := DataController.Summary.SummaryGroups.Add; - end; - end; - -begin - Result := nil; - if AClassName = GetItemClass.ClassName then - Result := CreateItem - else - if gsoUseSummary in StorageOptions then - Result := CreateSummary; - if Result = nil then - Result := inherited CreateStoredObject(AObjectName, AClassName); -end; - -procedure TcxCustomGridTableView.GetStoredChildren(AChildren: TStringList); -var - I: Integer; - - procedure AddSummary; - var - I, J: Integer; - begin - with DataController.Summary.FooterSummaryItems do - for I := 0 to Count - 1 do - AChildren.AddObject('FooterSummaryItem' + IntToStr(I), Items[I]); - with DataController.Summary.DefaultGroupSummaryItems do - for I := 0 to Count - 1 do - AChildren.AddObject('DefaultGroupSummaryItem' + IntToStr(I), Items[I]); - with DataController.Summary.SummaryGroups do - for I := 0 to Count - 1 do - begin - AChildren.AddObject('SummaryGroup' + IntToStr(I), Items[I]); - with Items[I].SummaryItems do - for J := 0 to Count - 1 do - AChildren.AddObject('SummaryGroup' + IntToStr(I) + '_Item' + IntToStr(J), Items[J]); - with Items[I].Links do - for J := 0 to Count - 1 do - AChildren.AddObject('SummaryGroup' + IntToStr(I) + '_Link' + IntToStr(J), Items[J]); - end; - end; - -begin - for I := 0 to ItemCount - 1 do - AChildren.AddObject('', Items[I]); - if gsoUseSummary in StorageOptions then - AddSummary; -end; - -procedure TcxCustomGridTableView.AssignLayout(ALayoutView: TcxCustomGridView); -var - I, ATag: Integer; - ALayoutItem, AItem: TcxCustomGridTableItem; -begin - inherited; - with ALayoutView as TcxCustomGridTableView do - begin - Self.BeginAssignItems; - try - for I := 0 to ItemCount - 1 do - begin - ALayoutItem := Items[I]; - AItem := TcxCustomGridTableItem(ALayoutItem.DataBinding.Data); - ATag := AItem.Tag; - AItem.Assign(ALayoutItem); - AItem.Tag := ATag; - AItem.Index := ALayoutItem.Index; - end; - finally - Self.EndAssignItems; - end; -{ - Self.DataController.Filter.AssignItems(DataController.Filter); - Self.DataController.Filter.Active := DataController.Filter.Active;} - end; -end; - -procedure TcxCustomGridTableView.BeforeEditLayout(ALayoutView: TcxCustomGridView); -var - I: Integer; -begin - inherited; - with ALayoutView as TcxCustomGridTableView do - begin - with OptionsData do - begin - Appending := True; - Deleting := True; - Editing := True; - Inserting := True; - end; - OptionsSelection.CellSelect := True; - OptionsView.Navigator := True; - - for I := 0 to ItemCount - 1 do - Items[I].DataBinding.Data := Self.Items[I]; - end; -end; - -function TcxCustomGridTableView.HasLayoutCustomizationForm: Boolean; -begin - Result := True; -end; - -procedure TcxCustomGridTableView.BeforeRestoring; -begin - inherited; - BeginAssignItems; - FRestoringItems := TcxGridOpenTableItemList.Create; -end; - -procedure TcxCustomGridTableView.AfterRestoring; -var - I: Integer; -begin - try - for I := 0 to FRestoringItems.Count - 1 do - if FRestoringItems[I] <> nil then - FRestoringItems[I].Index := I; - EndAssignItems; - finally - FRestoringItems.Free; - inherited; - end; -end; - -procedure TcxCustomGridTableView.ReadState(Reader: TReader); -begin - BeginAssignItems; - try - inherited; - finally - EndAssignItems; - end; -end; - -procedure TcxCustomGridTableView.BeginAssignItems; -begin - DoBeforeAssignItems; - FIsAssigningItems := True; -end; - -procedure TcxCustomGridTableView.DoBeforeAssignItems; -begin - FAssigningGroupedItems := TcxGridOpenTableItemList.Create; - FAssigningSortedItems := TcxGridOpenTableItemList.Create; -end; - -procedure TcxCustomGridTableView.DoItemsAssigned; -var - I: Integer; -begin - try - for I := 0 to FAssigningGroupedItems.Count - 1 do - if FAssigningGroupedItems[I] <> nil then // because of inherited forms - FAssigningGroupedItems[I].GroupIndex := I; - for I := 0 to FAssigningSortedItems.Count - 1 do - if FAssigningSortedItems[I] <> nil then // because of inherited forms - FAssigningSortedItems[I].SortIndex := I; - finally - FAssigningSortedItems.Free; - FAssigningGroupedItems.Free; - end; -end; - -procedure TcxCustomGridTableView.EndAssignItems; -begin - FIsAssigningItems := False; - FIsAfterAssigningItems := True; - try - DoItemsAssigned; - finally - FIsAfterAssigningItems := False; - end; -end; - -function TcxCustomGridTableView.CanOffset(ARecordCountDelta: Integer): Boolean; -begin - Result := not TcxCustomGrid(Control).UpdateLocked and Visible and - ViewInfo.CanOffsetView(ARecordCountDelta); -end; - -function TcxCustomGridTableView.CanSelectRecord(ARecordIndex: Integer): Boolean; -begin - Result := True; - if Assigned(FOnCanSelectRecord) then - FOnCanSelectRecord(Self, ViewData.GetRecordByIndex(ARecordIndex), Result); -end; - -function TcxCustomGridTableView.CanTabStop: Boolean; -begin - Result := inherited CanTabStop and not Controller.IsEditing; -end; - -procedure TcxCustomGridTableView.DetailVisibleChanged(ADetailLevel: TComponent; - APrevVisibleDetailCount, AVisibleDetailCount: Integer); -var - I: Integer; -begin - inherited; - if IsPattern then - begin - BeginUpdate; - try - for I := 0 to CloneCount - 1 do - TcxCustomGridViewAccess(Clones[I]).DetailVisibleChanged(ADetailLevel, - APrevVisibleDetailCount, AVisibleDetailCount); - finally - EndUpdate; - end; - end - else - if (APrevVisibleDetailCount = 0) or (AVisibleDetailCount = 0) then - DataChanged; -end; - -procedure TcxCustomGridTableView.DoAssign(ASource: TcxCustomGridView); - - procedure AssignItems; - var - I: Integer; - AItem: TcxCustomGridTableItem; - begin - with TcxCustomGridTableView(ASource) do - begin - Self.BeginAssignItems; - try - for I := 0 to ItemCount - 1 do - begin - AItem := Self.FindItemByID(Items[I].ID); - if AItem = nil then - begin - AItem := Self.CreateItem; - AItem.FID := Items[I].ID; - end; - AItem.Index := I; - AItem.Assign(Items[I]); - end; - for I := Self.ItemCount - 1 downto ItemCount do - Self.Items[I].Free; - finally - Self.EndAssignItems; - end; - Self.FNextID := FNextID; - end; - end; - -begin - if ASource is TcxCustomGridTableView then - begin - BeginUpdate; //!!! is it needed? - try - if not AssigningSettings then - AssignItems; - with TcxCustomGridTableView(ASource) do - begin - Self.DateTimeHandling := DateTimeHandling; - Self.FilterBox := FilterBox; - Self.Filtering := Filtering; - Self.NavigatorButtons := NavigatorButtons; - Self.OptionsCustomize := OptionsCustomize; - - Self.OnCanFocusRecord := OnCanFocusRecord; - Self.OnCanSelectRecord := OnCanSelectRecord; - Self.OnCellClick := OnCellClick; - Self.OnCellDblClick := OnCellDblClick; - Self.OnCustomDrawCell := OnCustomDrawCell; - Self.OnCustomDrawPartBackground := OnCustomDrawPartBackground; - Self.OnEditing := OnEditing; - Self.OnEditChanged := OnEditChanged; - Self.OnEditKeyDown := OnEditKeyDown; - Self.OnEditKeyPress := OnEditKeyPress; - Self.OnEditKeyUp := OnEditKeyUp; - Self.OnEditValueChanged := OnEditValueChanged; - Self.OnFilterControlDialogShow := OnFilterControlDialogShow; - Self.OnFilterCustomization := OnFilterCustomization; - Self.OnFilterDialogShow := OnFilterDialogShow; - Self.OnFocusedItemChanged := OnFocusedItemChanged; - Self.OnFocusedRecordChanged := OnFocusedRecordChanged; - Self.OnGetCellHeight := OnGetCellHeight; - Self.OnGetDragDropText := OnGetDragDropText; - Self.OnInitFilteringDateRanges := OnInitFilteringDateRanges; - Self.OnInitGroupingDateRanges := OnInitGroupingDateRanges; - Self.OnInitEdit := OnInitEdit; - Self.OnInitEditValue := OnInitEditValue; - //Self.OnRecordCreated := OnRecordCreated; - //Self.OnRecordDestroying := OnRecordDestroying; - Self.OnSelectionChanged := OnSelectionChanged; - Self.OnTopRecordIndexChanged := OnTopRecordIndexChanged; - end; - finally - EndUpdate; - end; - end; - inherited; -end; - -function TcxCustomGridTableView.FindItemByObjectName(const AObjectName: string): TcxCustomGridTableItem; -begin - if IsStoringNameMode then - if AObjectName = '' then - Result := nil - else - Result := FindItemByID(StrToInt(AObjectName)) - else - Result := FindItemByName(AObjectName); -end; - -procedure TcxCustomGridTableView.FocusEdit(AItemIndex: Integer; var ADone: Boolean); -begin - Items[AItemIndex].Editing := True; - ADone := Items[AItemIndex].Editing; -end; - -procedure TcxCustomGridTableView.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - I: Integer; -begin - inherited; - for I := 0 to ItemCount - 1 do - if Items[I].Owner = Root then Proc(Items[I]); -end; - -function TcxCustomGridTableView.GetDefaultActiveDetailIndex: Integer; -var - AAvailableLevel: TcxGridLevel; -begin - AAvailableLevel := TcxGridLevel(Level).GetAvailableItem; - if AAvailableLevel = nil then - Result := -1 - else - Result := AAvailableLevel.Index; -end; - -procedure TcxCustomGridTableView.GetFakeComponentLinks(AList: TList); -var - I: Integer; -begin - inherited; - for I := 0 to ItemCount - 1 do - Items[I].Styles.GetFakeComponentLinks(AList); -end; - -function TcxCustomGridTableView.GetIsControlFocused: Boolean; -begin - Result := inherited GetIsControlFocused or - Controller.EditingController.IsEditing and Controller.EditingController.Edit.IsFocused or - Controller.HasFilterMRUItemsPopup and Controller.FilterMRUItemsPopup.Visible or - Controller.HasFilterPopup and Controller.FilterPopup.Visible or - Controller.HasItemsCustomizationPopup and Controller.ItemsCustomizationPopup.Visible; -end; - -procedure TcxCustomGridTableView.GetItemsListForClipboard(AItems: TList; ACopyAll: Boolean); -begin - GetVisibleItemsList(AItems); -end; - -function TcxCustomGridTableView.GetItemSortByDisplayText(AItemIndex: Integer; - ASortByDisplayText: Boolean): Boolean; -begin - Result := Items[AItemIndex].IsSortingByDisplayText(ASortByDisplayText); -end; - -function TcxCustomGridTableView.GetItemValueSource(AItemIndex: Integer): TcxDataEditValueSource; -var - AProperties: TcxCustomEditProperties; -begin - AProperties := Items[AItemIndex].GetProperties; - if AProperties = nil then - Result := evsText //!!! - else - Result := AProperties.GetEditValueSource(True); -end; - -procedure TcxCustomGridTableView.GetVisibleItemsList(AItems: TList); -begin - CopyList(FVisibleItems, AItems); -end; - -function TcxCustomGridTableView.HasCustomDrawCell: Boolean; -begin - Result := Assigned(FOnCustomDrawCell); -end; - -function TcxCustomGridTableView.HasCustomDrawPartBackground: Boolean; -begin - Result := Assigned(FOnCustomDrawPartBackground); -end; - -procedure TcxCustomGridTableView.Init; -begin - inherited; - if Controller.FocusedItem = nil then - Controller.FocusFirstAvailableItem; -end; - -function TcxCustomGridTableView.IsDetailVisible(AGridView: TcxCustomGridView): Boolean; -var - AViewInfo: TcxCustomGridRecordViewInfo; -begin - if AGridView.MasterGridRecordIndex = -1 then - Result := False - else - begin - Result := ViewData.IsRecordIndexValid(AGridView.MasterGridRecordIndex); - if Result then - begin - AViewInfo := ViewData.Records[AGridView.MasterGridRecordIndex].ViewInfo; - Result := (AViewInfo <> nil) and AViewInfo.IsDetailVisible(AGridView); - end; - end; -end; - -function TcxCustomGridTableView.IsEqualHeightRecords: Boolean; -begin - Result := not ViewInfo.RecordsViewInfo.AutoDataRecordHeight; -end; - -function TcxCustomGridTableView.IsRecordHeightDependsOnData: Boolean; -begin - Result := ViewInfo.RecordsViewInfo.AutoRecordHeight or - ViewInfo.RecordsViewInfo.AutoDataRecordHeight or HasCustomProperties; -end; - -function TcxCustomGridTableView.IsRecordHeightDependsOnFocus: Boolean; -begin - Result := ViewInfo.RecordsViewInfo.AutoDataRecordHeight and - (OptionsView.ShowEditButtons = gsebForFocusedRecord); -end; - -procedure TcxCustomGridTableView.LoadingComplete; -begin - BeginUpdate; - try - inherited; - DataChanged; - finally - EndUpdate; - end; -end; - -procedure TcxCustomGridTableView.Offset(ARecordCountDelta, DX, DY: Integer); -begin - ViewInfo.DoOffset(ARecordCountDelta, DX, DY); - if ARecordCountDelta <> 0 then - Painter.DoOffset(ViewInfo.RecordsViewInfo.ItemsOffset, 0, 0) - else - Painter.DoOffset(0, DX, DY); -end; - -procedure TcxCustomGridTableView.SetChildOrder(Child: TComponent; Order: Integer); -begin - inherited; - if Child is TcxCustomGridTableItem then - TcxCustomGridTableItem(Child).Index := Order; -end; - -procedure TcxCustomGridTableView.SetName(const NewName: TComponentName); -var - AOldName: TComponentName; -begin - AOldName := Name; - inherited; - if Name <> AOldName then - RenameComponents(Self, Owner, Name, AOldName, ItemCount, - @cxCustomGridTableViewGetItem); -end; - -procedure TcxCustomGridTableView.UpdateControl(AInfo: TcxUpdateControlInfo); -begin - if IsDestroying then Exit; - if AInfo is TcxDataChangedInfo then - DataChanged - else - if AInfo is TcxLayoutChangedInfo then - DataLayoutChanged - else - if AInfo is TcxFocusedRecordChangedInfo then - with TcxFocusedRecordChangedInfo(AInfo) do - Controller.FocusedRecordChanged(PrevFocusedRowIndex, FocusedRowIndex, NewItemRowFocusingChanged) - else - if AInfo is TcxSelectionChangedInfo then - SelectionChanged(TcxSelectionChangedInfo(AInfo)) - else - if AInfo is TcxSearchChangedInfo then - SearchChanged - else - if AInfo is TcxUpdateRecordInfo then - RecordChanged(TcxUpdateRecordInfo(AInfo).RecordIndex) - else - if AInfo is TcxGroupingChangingInfo then - GroupingChanging; - RefreshNavigators; - inherited; -end; - -procedure TcxCustomGridTableView.UpdateDataController(AChange: TcxGridDataControllerChange; - AItem: TcxCustomGridTableItem); -begin - if {not IsDestroying and }(DataController <> nil) then - with DataController do - case AChange of - dccItemAdded: - AddItem(AItem); - dccItemRemoved: - RemoveItem(AItem); - dccIndexesChanged: - UpdateItemIndexes; - end; -end; - -procedure TcxCustomGridTableView.UpdateRecord; -begin - Controller.EditingController.UpdateValue; -end; - -procedure TcxCustomGridTableView.CreateHandlers; -begin - FItems := TList.Create; - FVisibleItems := TList.Create; - FFilterableItems := TList.Create; - FNavigatorNotifier := TcxNavigatorControlNotifier.Create; - inherited; - FNavigatorButtons := GetNavigatorButtonsClass.Create(ViewInfo); - FNavigatorButtons.OnGetControl := GetNavigatorButtonsControl; - FNavigatorButtons.ConfirmDelete := False; -end; - -procedure TcxCustomGridTableView.DestroyHandlers; -begin - ClearItems; - FreeAndNil(FNavigatorButtons); - inherited; - FreeAndNil(FNavigatorNotifier); - FreeAndNil(FFilterableItems); - FreeAndNil(FVisibleItems); - FreeAndNil(FItems); -end; - -procedure TcxCustomGridTableView.CreateOptions; -begin - inherited; - FDateTimeHandling := GetDateTimeHandlingClass.Create(Self); - FFilterBox := GetFilterBoxClass.Create(Self); - FFiltering := GetFilteringClass.Create(Self); - FOptionsCustomize := GetOptionsCustomizeClass.Create(Self); -end; - -procedure TcxCustomGridTableView.DestroyOptions; -begin - FreeAndNil(FOptionsCustomize); - FreeAndNil(FFiltering); - FreeAndNil(FFilterBox); - FreeAndNil(FDateTimeHandling); - inherited; -end; - -procedure TcxCustomGridTableView.AddItem(AItem: TcxCustomGridTableItem); -begin -{$IFDEF DELPHI6} - if csTransient in ComponentStyle then - AItem.FComponentStyle := AItem.FComponentStyle + [csTransient]; -{$ENDIF} - FItems.Add(AItem); - ItemIndexChanged(AItem, -1); - AItem.FID := GetNextID; - UpdateDataController(dccItemAdded, AItem); - AItem.SetGridView(Self); // needs Field - AItem.Visible := True; - RefreshFilterableItemsList; -end; - -procedure TcxCustomGridTableView.RemoveItem(AItem: TcxCustomGridTableItem); -var - AOldItemIndex: Integer; -begin - BeginUpdate; - try - if AItem = OptionsBehavior.IncSearchItem then - OptionsBehavior.IncSearchItem := nil; - AItem.Visible := False; - AOldItemIndex := AItem.Index; - FItems.Remove(AItem); - AItem.FIndex := -1; - ItemIndexChanged(AItem, AOldItemIndex); - UpdateDataController(dccItemRemoved, AItem); - finally - EndUpdate; - end; - AItem.SetGridView(nil); - //UpdateDataController(dccItemRemoved, AItem); - FFiltering.MRUItems.DeleteEmptyItems; - ReleaseID(AItem.ID); - RefreshFilterableItemsList; - RefreshCustomizationForm; - Synchronize; -end; - -procedure TcxCustomGridTableView.AssignVisibleItemsIndexes; -var - I: Integer; -begin - for I := 0 to VisibleItemCount - 1 do - with VisibleItems[I] do - FVisibleIndex := GetVisibleIndex; -end; - -procedure TcxCustomGridTableView.ChangeItemIndex(AItem: TcxCustomGridTableItem; - Value: Integer); -var - AOldItemIndex: Integer; -begin - if Value < 0 then Value := 0; - if Value >= ItemCount then Value := ItemCount - 1; - if AItem.Index <> Value then - begin - AOldItemIndex := AItem.Index; - FItems.Move(AItem.Index, Value); - ItemIndexChanged(AItem, AOldItemIndex); - if AItem.Visible then RefreshVisibleItemsList; - UpdateDataController(dccIndexesChanged, AItem); - end; -end; - -procedure TcxCustomGridTableView.CheckItemVisibles; -var - I: Integer; -begin - BeginUpdate; - try - for I := 0 to ItemCount - 1 do - Items[I].CheckVisible; - finally - EndUpdate; - end; -end; - -procedure TcxCustomGridTableView.SaveItemVisibles; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].SaveVisible; -end; - -procedure TcxCustomGridTableView.ItemIndexChanged(AItem: TcxCustomGridTableItem; - AOldIndex: Integer); -begin - RefreshItemIndexes; -end; - -procedure TcxCustomGridTableView.ItemVisibilityChanged(AItem: TcxCustomGridTableItem; - Value: Boolean); -begin - if Value then - begin - RefreshVisibleItemsList; - AItem.Changed(ticSize); - if Controller.FocusedItem = nil then - AItem.Focused := True; - end - else - begin - if AItem.IncSearching then Controller.CancelIncSearching; - //AItem.Focused := False; - RefreshVisibleItemsList; - AItem.Changed(ticSize); - AItem.Focused := False; - end; -end; - -procedure TcxCustomGridTableView.RefreshVisibleItemsList; -var - I: Integer; -begin - FVisibleItems.Clear; - for I := 0 to ItemCount - 1 do - if Items[I].ActuallyVisible then - Items[I].FVisibleIndex := FVisibleItems.Add(Items[I]) - else - Items[I].FVisibleIndex := -1; -end; - -function TcxCustomGridTableView.GetItemDataBindingClass: TcxGridItemDataBindingClass; -var - AIGridDataController: IcxGridDataController; -begin - if Supports(TObject(DataController), IcxGridDataController, AIGridDataController) then - Result := AIGridDataController.GetItemDataBindingClass - else - Result := nil; -end; - -function TcxCustomGridTableView.GetNextID: Integer; -begin - Result := FNextID; - Inc(FNextID); -end; - -procedure TcxCustomGridTableView.ReleaseID(AID: Integer); -begin - if AID = FNextID - 1 then Dec(FNextID); -end; - -procedure TcxCustomGridTableView.DataChanged; -var - I: Integer; -begin - Controller.DragHighlightedRecord := nil; - for I := 0 to ItemCount - 1 do - Items[I].DataChanged; - Changed(TcxGridDataChange.Create(Self)); - Controller.EditingController.UpdateEditValue; - //Controller.MakeFocusedRecordVisible; - because of expanding, but this code is needed for insert !!! - Synchronize; -end; - -procedure TcxCustomGridTableView.DataLayoutChanged; -begin - ViewData.RefreshRecords; - SizeChanged; - Controller.EditingController.UpdateEditValue; - Synchronize; -end; - -function TcxCustomGridTableView.DoCellClick(ACellViewInfo: TcxGridTableDataCellViewInfo; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := False; - if Assigned(FOnCellClick) then - FOnCellClick(Self, ACellViewInfo, AButton, AShift, Result); -end; - -function TcxCustomGridTableView.DoCellDblClick(ACellViewInfo: TcxGridTableDataCellViewInfo; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := False; - if Assigned(FOnCellDblClick) then - FOnCellDblClick(Self, ACellViewInfo, AButton, AShift, Result); -end; - -function TcxCustomGridTableView.DoEditing(AItem: TcxCustomGridTableItem): Boolean; -begin - Result := True; - if Assigned(FOnEditing) then FOnEditing(Self, AItem, Result); -end; - -procedure TcxCustomGridTableView.DoTopRecordIndexChanged; -begin - if Assigned(FOnTopRecordIndexChanged) then FOnTopRecordIndexChanged(Self); -end; - -procedure TcxCustomGridTableView.FilterChanged; -begin - FFiltering.FilterChanged; -end; - -procedure TcxCustomGridTableView.FocusedItemChanged(APrevFocusedItem, AFocusedItem: TcxCustomGridTableItem); -begin - if Assigned(OnFocusedItemChanged) then - FOnFocusedItemChanged(Self, APrevFocusedItem, AFocusedItem); -end; - -procedure TcxCustomGridTableView.FocusedRecordChanged(APrevFocusedRecordIndex, - AFocusedRecordIndex: Integer; ANewItemRecordFocusingChanged: Boolean); -begin - Changed(TcxGridFocusedRecordChange.Create(Self, APrevFocusedRecordIndex, - AFocusedRecordIndex, ANewItemRecordFocusingChanged)); -end; - -procedure TcxCustomGridTableView.GroupingChanging; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - Items[I].GroupingChanging; -end; - -procedure TcxCustomGridTableView.ItemCaptionChanged(AItem: TcxCustomGridTableItem); -begin - if (AItem = nil) or AItem.ActuallyVisible or (AItem.GroupIndex <> -1) or - AItem.DataBinding.Filtered then - Changed(vcSize) - else - Changed(vcProperty); - RefreshCustomizationForm; -end; - -procedure TcxCustomGridTableView.ItemValueTypeClassChanged(AItemIndex: Integer); -begin - Items[AItemIndex].ValueTypeClassChanged; -end; - -procedure TcxCustomGridTableView.RecalculateDefaultWidths; -var - I: Integer; -begin - BeginUpdate; - try - for I := 0 to ItemCount - 1 do - Items[I].RecalculateDefaultWidth; - finally - EndUpdate; - end; -end; - -procedure TcxCustomGridTableView.RecordChanged(ARecordIndex: Integer); -var - ARecord: TcxCustomGridRecord; -begin - ViewData.AssignEditingRecord; - if IsRecordHeightDependsOnData then - SizeChanged - else - begin - ARecord := ViewData.GetRecordByRecordIndex(ARecordIndex); - if ARecord = nil then - LayoutChanged - else - ARecord.Invalidate; - end; - Controller.EditingController.UpdateEditValue; -end; - -procedure TcxCustomGridTableView.RecordCountChanged; -begin - ViewInfoCache.Count := DataController.GetRowCount; - ViewData.Refresh(DataController.GetRowCount); - if Control <> nil then {7} - TcxCustomGrid(Control).SendNotifications(gnkRecordCountChanged); -end; - -procedure TcxCustomGridTableView.RefreshFilterableItemsList; -var - I: Integer; -begin - if IsDestroying then Exit; - FFilterableItems.Clear; - for I := 0 to ItemCount - 1 do - if Items[I].Filterable then - FFilterableItems.Add(Items[I]); -end; - -procedure TcxCustomGridTableView.RefreshNavigators; -begin - if ViewInfo.NavigatorSiteViewInfo.Visible then - ViewInfo.NavigatorButtonsStateChanged; - FNavigatorNotifier.RefreshNavigatorButtons; - if Focused then - TcxCustomGridAccess(Control).RefreshNavigators; -end; - -procedure TcxCustomGridTableView.SearchChanged; -begin - if Controller.FocusedRecord <> nil then - Controller.FocusedRecord.Invalidate(Controller.IncSearchingItem); -end; - -procedure TcxCustomGridTableView.SelectionChanged(AInfo: TcxSelectionChangedInfo); -var - I: Integer; - ARecord: TcxCustomGridRecord; -begin - if AInfo.Count = 0 then - LayoutChanged - else - for I := 0 to AInfo.Count - 1 do - begin - ARecord := ViewData.GetRecordByIndex(AInfo.RowIndexes[I]); - if ARecord <> nil then ARecord.Invalidate; - end; - if not IsLoading then DoSelectionChanged; -end; - -function TcxCustomGridTableView.CalculateDataCellSelected(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; AUseViewInfo: Boolean; ACellViewInfo: TcxGridTableCellViewInfo): Boolean; - - function GetRecordFocused: Boolean; - begin - if AUseViewInfo then - Result := ARecord.ViewInfo.Focused - else - Result := DrawRecordFocused(ARecord); - end; - -begin - if not (ARecord.HasCells and ARecord.CanFocusCells) then - Result := True - else - if OptionsSelection.InvertSelect then - Result := (AItem = nil) or not AItem.Focused or not GetRecordFocused - else - Result := (OptionsSelection.MultiSelect or - (AItem <> nil) and AItem.Focused and GetRecordFocused) and - (not (ACellViewInfo is TcxGridTableDataCellViewInfo) or - not TcxGridTableDataCellViewInfo(ACellViewInfo).Editing); -end; - -function TcxCustomGridTableView.DrawDataCellSelected(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; AUseViewInfo: Boolean = False; - ACellViewInfo: TcxGridTableCellViewInfo = nil): Boolean; - - function GetRecordSelected: Boolean; - begin - if AUseViewInfo then - Result := ARecord.ViewInfo.Selected - else - Result := DrawRecordSelected(ARecord); - end; - - function GetCellSelected: Boolean; - begin - if (ACellViewInfo <> nil) and ACellViewInfo.AlwaysSelected then - Result := True - else - Result := CalculateDataCellSelected(ARecord, AItem, AUseViewInfo, ACellViewInfo); - end; - -begin - Result := - ((ACellViewInfo = nil) or ACellViewInfo.CanDrawSelected) and - (ARecord <> nil) and GetRecordSelected and GetCellSelected and - DrawSelection; -end; - -function TcxCustomGridTableView.DrawRecordActive(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := IsControlFocused or ARecord.DragHighlighted; -end; - -function TcxCustomGridTableView.DrawRecordFocused(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := ARecord.Focused and Focused; -end; - -function TcxCustomGridTableView.DrawRecordSelected(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := - ARecord.Selected and (Focused or OptionsSelection.MultiSelect) or - ARecord.DragHighlighted; -end; - -function TcxCustomGridTableView.DrawSelection: Boolean; -begin - Result := IsControlFocused or not OptionsSelection.HideSelection; -end; - -function TcxCustomGridTableView.DoCanFocusRecord(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := True; - if Assigned(FOnCanFocusRecord) then FOnCanFocusRecord(Self, ARecord, Result); -end; - -procedure TcxCustomGridTableView.DoCustomDrawCell(ACanvas: TcxCanvas; - AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); -begin - if HasCustomDrawCell then - FOnCustomDrawCell(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxCustomGridTableView.DoCustomDrawPartBackground(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridCellViewInfo; var ADone: Boolean); -begin - if HasCustomDrawPartBackground then - FOnCustomDrawPartBackground(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxCustomGridTableView.DoEditChanged(AItem: TcxCustomGridTableItem); -begin - if Assigned(FOnEditChanged) then FOnEditChanged(Self, AItem); -end; - -procedure TcxCustomGridTableView.DoEditKeyDown(AItem: TcxCustomGridTableItem; - AEdit: TcxCustomEdit; var Key: Word; Shift: TShiftState); -begin - if Assigned(FOnEditKeyDown) then FOnEditKeyDown(Self, AItem, AEdit, Key, Shift); -end; - -procedure TcxCustomGridTableView.DoEditKeyPress(AItem: TcxCustomGridTableItem; - AEdit: TcxCustomEdit; var Key: Char); -begin - if Assigned(FOnEditKeyPress) then FOnEditKeyPress(Self, AItem, AEdit, Key); -end; - -procedure TcxCustomGridTableView.DoEditKeyUp(AItem: TcxCustomGridTableItem; - AEdit: TcxCustomEdit; var Key: Word; Shift: TShiftState); -begin - if Assigned(FOnEditKeyUp) then FOnEditKeyUp(Self, AItem, AEdit, Key, Shift); -end; - -procedure TcxCustomGridTableView.DoEditValueChanged(AItem: TcxCustomGridTableItem); -begin - if Assigned(FOnEditValueChanged) then FOnEditValueChanged(Self, AItem); -end; - -function TcxCustomGridTableView.DoFilterCustomization: Boolean; -begin - Result := False; - if Assigned(FOnFilterCustomization) then FOnFilterCustomization(Self, Result); -end; - -function TcxCustomGridTableView.DoFilterDialogShow(AItem: TcxCustomGridTableItem): Boolean; -begin - Result := False; - if Assigned(FOnFilterDialogShow) then FOnFilterDialogShow(Self, AItem, Result); -end; - -procedure TcxCustomGridTableView.DoFocusedRecordChanged(APrevFocusedRecordIndex, - AFocusedRecordIndex: Integer; ANewItemRecordFocusingChanged: Boolean); -begin - if Control <> nil then - TcxCustomGrid(Control).SendNotifications(gnkFocusedRecordChanged); - if Assigned(FOnFocusedRecordChanged) then - FOnFocusedRecordChanged(Self, ViewData.GetRecordByIndex(APrevFocusedRecordIndex), - ViewData.GetRecordByIndex(AFocusedRecordIndex), ANewItemRecordFocusingChanged); -end; - -procedure TcxCustomGridTableView.DoGetCellHeight(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; ACellViewInfo: TcxGridTableDataCellViewInfo; - var AHeight: Integer); -begin - if IsGetCellHeightAssigned then - FOnGetCellHeight(Self, ARecord, AItem, ACellViewInfo, AHeight); -end; - -function TcxCustomGridTableView.DoGetDragDropText(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem): string; -begin - if (ARecord <> nil) and (AItem <> nil) then - Result := ARecord.DisplayTexts[AItem.Index] - else - Result := ''; - if Assigned(FOnGetDragDropText) then - FOnGetDragDropText(Self, ARecord, AItem, Result); // for vic -end; - -procedure TcxCustomGridTableView.DoInitEdit(AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit); -begin - if Assigned(FOnInitEdit) then FOnInitEdit(Self, AItem, AEdit); -end; - -procedure TcxCustomGridTableView.DoInitEditValue(AItem: TcxCustomGridTableItem; - AEdit: TcxCustomEdit; var AValue: TcxEditValue); -begin - if Assigned(FOnInitEditValue) then FOnInitEditValue(Self, AItem, AEdit, AValue); -end; - -procedure TcxCustomGridTableView.DoInitFilteringDateRanges(AItem: TcxCustomGridTableItem); -begin - if HasInitFilteringDateRangesHandler then - FOnInitFilteringDateRanges(AItem, AItem.FilteringDateRanges); -end; - -procedure TcxCustomGridTableView.DoInitGroupingDateRanges(AItem: TcxCustomGridTableItem); -begin - if HasInitGroupingDateRangesHandler then - FOnInitGroupingDateRanges(AItem, AItem.GroupingDateRanges); -end; - -{procedure TcxCustomGridTableView.DoRecordCreated(ARecord: TcxCustomGridRecord); -begin - if Assigned(FOnRecordCreated) then FOnRecordCreated(Self, ARecord); -end; - -procedure TcxCustomGridTableView.DoRecordDestroying(ARecord: TcxCustomGridRecord); -begin - if Assigned(FOnRecordDestroying) then FOnRecordDestroying(Self, ARecord); -end;} - -procedure TcxCustomGridTableView.DoSelectionChanged; -begin - if Assigned(FOnSelectionChanged) then FOnSelectionChanged(Self); -end; - -function TcxCustomGridTableView.HasCustomProperties: Boolean; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - begin - Result := Items[I].HasCustomPropertiesHandler; - if Result then Exit; - end; - Result := False; -end; - -function TcxCustomGridTableView.HasInitFilteringDateRangesHandler: Boolean; -begin - Result := Assigned(FOnInitFilteringDateRanges); -end; - -function TcxCustomGridTableView.HasInitGroupingDateRangesHandler: Boolean; -begin - Result := Assigned(FOnInitGroupingDateRanges); -end; - -function TcxCustomGridTableView.IsGetCellHeightAssigned: Boolean; -begin - Result := Assigned(FOnGetCellHeight); -end; - -function TcxCustomGridTableView.GetControllerClass: TcxCustomGridControllerClass; -begin - Result := TcxCustomGridTableController; -end; - -function TcxCustomGridTableView.GetPainterClass: TcxCustomGridPainterClass; -begin - Result := TcxCustomGridTablePainter; -end; - -function TcxCustomGridTableView.GetViewDataClass: TcxCustomGridViewDataClass; -begin - Result := TcxCustomGridTableViewData; -end; - -function TcxCustomGridTableView.GetViewInfoCacheClass: TcxCustomGridViewInfoCacheClass; -begin - Result := TcxCustomGridTableViewInfoCache; -end; - -function TcxCustomGridTableView.GetViewInfoClass: TcxCustomGridViewInfoClass; -begin - Result := TcxCustomGridTableViewInfo; -end; - -function TcxCustomGridTableView.GetBackgroundBitmapsClass: TcxCustomGridBackgroundBitmapsClass; -begin - Result := TcxCustomGridTableBackgroundBitmaps; -end; - -function TcxCustomGridTableView.GetDateTimeHandlingClass: TcxCustomGridTableDateTimeHandlingClass; -begin - Result := TcxCustomGridTableDateTimeHandling; -end; - -function TcxCustomGridTableView.GetFilterBoxClass: TcxGridFilterBoxClass; -begin - Result := TcxGridFilterBox; -end; - -function TcxCustomGridTableView.GetFilteringClass: TcxCustomGridTableFilteringClass; -begin - Result := TcxCustomGridTableFiltering; -end; - -function TcxCustomGridTableView.GetNavigatorButtonsClass: TcxNavigatorControlButtonsClass; -begin - Result := TcxNavigatorControlButtons; -end; - -function TcxCustomGridTableView.GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; -begin - Result := TcxCustomGridTableOptionsBehavior; -end; - -function TcxCustomGridTableView.GetOptionsCustomizeClass: TcxCustomGridTableOptionsCustomizeClass; -begin - Result := TcxCustomGridTableOptionsCustomize; -end; - -function TcxCustomGridTableView.GetOptionsDataClass: TcxCustomGridOptionsDataClass; -begin - Result := TcxCustomGridTableOptionsData; -end; - -function TcxCustomGridTableView.GetOptionsSelectionClass: TcxCustomGridOptionsSelectionClass; -begin - Result := TcxCustomGridTableOptionsSelection; -end; - -function TcxCustomGridTableView.GetOptionsViewClass: TcxCustomGridOptionsViewClass; -begin - Result := TcxCustomGridTableOptionsView; -end; - -function TcxCustomGridTableView.GetStylesClass: TcxCustomGridViewStylesClass; -begin - Result := TcxCustomGridTableViewStyles; -end; - -procedure TcxCustomGridTableView.ApplyBestFit(AItem: TcxCustomGridTableItem = nil; - ACheckSizingAbility: Boolean = False; AFireEvents: Boolean = False); -var - I: Integer; -begin - if AItem = nil then - for I := 0 to VisibleItemCount - 1 do - VisibleItems[I].ApplyBestFit(ACheckSizingAbility, AFireEvents) - else - AItem.ApplyBestFit(ACheckSizingAbility, AFireEvents); -end; - -procedure TcxCustomGridTableView.ClearItems; -var - I: Integer; -begin - BeginUpdate; - try - for I := ItemCount - 1 downto 0 do Items[I].Free; - FNextID := 0; - finally - EndUpdate; - end; -end; - -procedure TcxCustomGridTableView.CopyToClipboard(ACopyAll: Boolean); - - procedure AddHeaders; - var - I: Integer; - begin - for I := 0 to FCopyToClipboardItems.Count - 1 do - FCopyToClipboardStr := FCopyToClipboardStr + - TcxCustomGridTableItem(FCopyToClipboardItems[I]).GetAlternateCaption + ColumnSeparator; - if FCopyToClipboardItems.Count <> 0 then - FCopyToClipboardStr := Copy(FCopyToClipboardStr, 1, - Length(FCopyToClipboardStr) - Length(ColumnSeparator)); - FCopyToClipboardStr := FCopyToClipboardStr + EndOfLine; - end; - -begin - FCopyToClipboardItems := TList.Create; - try - GetItemsListForClipboard(FCopyToClipboardItems, ACopyAll); - FCopyToClipboardStr := ''; - if OptionsBehavior.CopyCaptionsToClipboard then - AddHeaders; - - if Control <> nil then - TcxCustomGrid(Control).BeginUpdate; - try - DataController.ForEachRow(not ACopyAll, CopyForEachRowProc); - finally - if Control <> nil then - TcxCustomGrid(Control).EndUpdate; - end; - if DataController.IsGridMode then - Controller.MakeFocusedRecordVisible; - - if (Length(FCopyToClipboardStr) >= Length(EndOfLine)) and - (Copy(FCopyToClipboardStr, Length(FCopyToClipboardStr) - Length(EndOfLine) + 1, Length(EndOfLine)) = EndOfLine) then - SetLength(FCopyToClipboardStr, Length(FCopyToClipboardStr) - Length(EndOfLine)); - finally - FCopyToClipboardItems.Free; - end; - Clipboard.AsText := FCopyToClipboardStr; -end; - -function TcxCustomGridTableView.CreateItem: TcxCustomGridTableItem; -begin - Result := GetItemClass.Create(Owner); - AddItem(Result); -end; - -function TcxCustomGridTableView.FindItemByID(AID: Integer): TcxCustomGridTableItem; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - begin - Result := Items[I]; - if Result.ID = AID then Exit; - end; - Result := nil; -end; - -function TcxCustomGridTableView.FindItemByName(const AName: string): TcxCustomGridTableItem; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - begin - Result := Items[I]; - if Result.Name = AName then Exit; - end; - Result := nil; -end; - -function TcxCustomGridTableView.FindItemByTag(ATag: TcxTag): TcxCustomGridTableItem; -var - I: Integer; -begin - for I := 0 to ItemCount - 1 do - begin - Result := Items[I]; - if Result.Tag = ATag then Exit; - end; - Result := nil; -end; - -function TcxCustomGridTableView.IndexOfItem(AItem: TcxCustomGridTableItem): Integer; -begin - Result := FItems.IndexOf(AItem); -end; - -procedure TcxCustomGridTableView.MakeMasterGridRecordVisible; -begin - if IsDetail and (MasterGridRecord <> nil) and not DontMakeMasterRecordVisible and - not MasterGridView.DataController.IsDetailExpanding then - MasterGridRecord.MakeVisible; -end; - -procedure TcxCustomGridTableView.RestoreDefaults; -var - I: Integer; -begin - inherited; - BeginUpdate; - try - for I := 0 to ItemCount - 1 do - Items[I].RestoreDefaults; - finally - EndUpdate; - end; -end; - -class function TcxCustomGridTableView.CanBeLookupList: Boolean; -begin - Result := False; -end; - -function TcxCustomGridTableView.GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; -begin - Result := nil; -end; - -function TcxCustomGridTableView.GetSummaryItemClass: TcxDataSummaryItemClass; -begin - Result := nil; -end; - -{ TcxCustomGridTableControllerAccess } - -class procedure TcxCustomGridTableControllerAccess.FocusNextPage(AInstance: TcxCustomGridTableController; - ASyncSelection: Boolean); -begin - AInstance.FocusNextPage(ASyncSelection); -end; - -class procedure TcxCustomGridTableControllerAccess.FocusPrevPage(AInstance: TcxCustomGridTableController; - ASyncSelection: Boolean); -begin - AInstance.FocusPrevPage(ASyncSelection); -end; - -{ TcxCustomGridTableItemAccess } - -class function TcxCustomGridTableItemAccess.CanGroup(AInstance: TcxCustomGridTableItem): Boolean; -begin - Result := AInstance.CanGroup; -end; - -class function TcxCustomGridTableItemAccess.CanHide(AInstance: TcxCustomGridTableItem): Boolean; -begin - Result := AInstance.CanHide; -end; - -class function TcxCustomGridTableItemAccess.CanHorzSize(AInstance: TcxCustomGridTableItem): Boolean; -begin - Result := AInstance.CanHorzSize; -end; - -class function TcxCustomGridTableItemAccess.CanSort(AInstance: TcxCustomGridTableItem): Boolean; -begin - Result := AInstance.CanSort; -end; - -class procedure TcxCustomGridTableItemAccess.CheckWidthValue( - AInstance: TcxCustomGridTableItem; var Value: Integer); -begin - AInstance.CheckWidthValue(Value); -end; - -class procedure TcxCustomGridTableItemAccess.DoGetDataText( - AInstance: TcxCustomGridTableItem; ARecordIndex: Integer; var AText: string); -begin - AInstance.DoGetDataText(ARecordIndex, AText); -end; - -class procedure TcxCustomGridTableItemAccess.DoGetDisplayText( - AInstance: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; - var AText: string); -begin - AInstance.DoGetDisplayText(ARecord, AText); -end; - -class function TcxCustomGridTableItemAccess.GetGroupIndex( - AInstance: TcxCustomGridTableItem): Integer; -begin - Result := AInstance.GroupIndex; -end; - -class function TcxCustomGridTableItemAccess.GetFilterCaption( - AInstance: TcxCustomGridTableItem): string; -begin - Result := AInstance.FilterCaption; -end; - -{ TcxCustomGridTableOptionsBehaviorAccess } - -class function TcxCustomGridTableOptionsBehaviorAccess.GetPullFocusing( - AInstance: TcxCustomGridTableOptionsBehavior): Boolean; -begin - Result := AInstance.PullFocusing; -end; - -class procedure TcxCustomGridTableOptionsBehaviorAccess.SetPullFocusing( - AInstance: TcxCustomGridTableOptionsBehavior; Value: Boolean); -begin - AInstance.PullFocusing := Value; -end; - -{ TcxCustomGridTableOptionsViewAccess } - -class function TcxCustomGridTableOptionsViewAccess.GetCellAutoHeight( - AInstance: TcxCustomGridTableOptionsView): Boolean; -begin - Result := AInstance.CellAutoHeight; -end; - -{ TcxCustomGridTableViewAccess } - -class function TcxCustomGridTableViewAccess.CanSelectRecord( - AInstance: TcxCustomGridTableView; ARecordIndex: Integer): Boolean; -begin - Result := AInstance.CanSelectRecord(ARecordIndex); -end; - -class procedure TcxCustomGridTableViewAccess.FilterChanged( - AInstance: TcxCustomGridTableView); -begin - AInstance.FilterChanged; -end; - -class function TcxCustomGridTableViewAccess.FindItemByObjectName(AInstance: TcxCustomGridTableView; - const AObjectName: string): TcxCustomGridTableItem; -begin - Result := AInstance.FindItemByObjectName(AObjectName); -end; - -class procedure TcxCustomGridTableViewAccess.FocusEdit( - AInstance: TcxCustomGridTableView; AItemIndex: Integer; var ADone: Boolean); -begin - AInstance.FocusEdit(AItemIndex, ADone); -end; - -class function TcxCustomGridTableViewAccess.GetDefaultActiveDetailIndex( - AInstance: TcxCustomGridTableView): Integer; -begin - Result := AInstance.GetDefaultActiveDetailIndex; -end; - -class function TcxCustomGridTableViewAccess.GetItemClass(AInstance: TcxCustomGridTableView): TcxCustomGridTableItemClass; -begin - Result := AInstance.GetItemClass; -end; - -class function TcxCustomGridTableViewAccess.GetItemSortByDisplayText( - AInstance: TcxCustomGridTableView; AItemIndex: Integer; - ASortByDisplayText: Boolean): Boolean; -begin - Result := AInstance.GetItemSortByDisplayText(AItemIndex, ASortByDisplayText); -end; - -class function TcxCustomGridTableViewAccess.GetItemValueSource( - AInstance: TcxCustomGridTableView; AItemIndex: Integer): TcxDataEditValueSource; -begin - Result := AInstance.GetItemValueSource(AItemIndex); -end; - -class function TcxCustomGridTableViewAccess.GetSummaryGroupItemLinkClass( - AInstance: TcxCustomGridTableView): TcxDataSummaryGroupItemLinkClass; -begin - Result := AInstance.GetSummaryGroupItemLinkClass; -end; - -class function TcxCustomGridTableViewAccess.GetSummaryItemClass( - AInstance: TcxCustomGridTableView): TcxDataSummaryItemClass; -begin - Result := AInstance.GetSummaryItemClass; -end; - -class function TcxCustomGridTableViewAccess.IsEqualHeightRecords( - AInstance: TcxCustomGridTableView): Boolean; -begin - Result := AInstance.IsEqualHeightRecords; -end; - -class function TcxCustomGridTableViewAccess.IsGetCellHeightAssigned( - AInstance: TcxCustomGridTableView): Boolean; -begin - Result := AInstance.IsGetCellHeightAssigned; -end; - -class procedure TcxCustomGridTableViewAccess.ItemValueTypeClassChanged( - AInstance: TcxCustomGridTableView; AItemIndex: Integer); -begin - AInstance.ItemValueTypeClassChanged(AItemIndex); -end; - -class procedure TcxCustomGridTableViewAccess.RefreshNavigators( - AInstance: TcxCustomGridTableView); -begin - AInstance.RefreshNavigators; -end; - -class procedure TcxCustomGridTableViewAccess.UpdateRecord( - AInstance: TcxCustomGridTableView); -begin - AInstance.UpdateRecord; -end; - -{ TcxCustomGridTableViewInfoAccess } - -class function TcxCustomGridTableViewInfoAccess.GetDefaultGridModeBufferCount(AInstance: TcxCustomGridTableViewInfo): Integer; -begin - Result := AInstance.GetDefaultGridModeBufferCount; -end; - -initialization - RegisterClasses([TcxGridItemDataBinding]); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCustomView.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCustomView.pas deleted file mode 100644 index 58162a6d..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridCustomView.pas +++ /dev/null @@ -1,8447 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridCustomView; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, Classes, Graphics, Controls, Forms, StdCtrls, Menus, - cxClasses, cxControls, cxContainer, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, - cxStyles, cxStorage, cxGridCommon, cxCustomData, cxData, cxListBox, cxPC; - -const - cxGridCustomizationFormDefaultWidth = 180; - cxGridCustomizationFormDefaultHeight = 300; - - htError = -1; - htNone = 0; - htNavigator = 1; - htCustomizationForm = 2; - htDesignSelector = 3; - - ckNone = 0; - ckCustomizationForm = 1; - - bbCustomFirst = 0; - bbBackground = bbCustomFirst; - bbCustomLast = bbBackground; - - vsCustomFirst = 0; - vsBackground = vsCustomFirst; - vsCustomLast = vsBackground; - - StoringVersion = 1; - -type - TcxCustomGridDragAndDropObjectClass = class of TcxCustomGridDragAndDropObject; - TcxCustomGridItemsListBox = class; - TcxCustomGridCustomizationForm = class; - TcxGridPopupListBox = class; - TcxCustomGridController = class; - TcxCustomGridPainter = class; - TcxCustomGridViewData = class; - TcxCustomGridCellViewInfo = class; - TcxCustomGridViewCellViewInfo = class; - TcxGridDesignSelectorViewInfo = class; - TcxCustomGridViewInfo = class; - TcxCustomGridViewInfoCache = class; - TcxGridSite = class; - TcxCustomGridView = class; - - IcxGridViewLayoutEditorSupport = interface // it is here because of problem in CBuilder - ['{9C5EC9C0-A912-4822-BBD0-87AB45FDCC78}'] - procedure BeforeEditLayout(ALayoutView: TcxCustomGridView); - procedure DoAssignLayout(ALayoutView: TcxCustomGridView); - function GetLayoutCustomizationFormButtonCaption: string; - function HasLayoutCustomizationForm: Boolean; - function IsLayoutChangeable: Boolean; - procedure RunLayoutCustomizationForm; - end; - - { change } - - TcxCustomGridViewChange = class(TcxCustomGridChange) - private - FGridView: TcxCustomGridView; - public - constructor Create(AGridView: TcxCustomGridView); virtual; - property GridView: TcxCustomGridView read FGridView write FGridView; - function IsEqual(AChange: TcxCustomGridChange): Boolean; override; - end; - - TcxGridControlFocusChange = class(TcxCustomGridViewChange) - public - procedure Execute; override; - end; - - { hit tests } - - TcxCustomGridHitTestClass = class of TcxCustomGridHitTest; - - TcxCustomGridHitTest = class - private - FPos: TPoint; - FViewInfo: TcxCustomGridCellViewInfo; - procedure SetViewInfo(Value: TcxCustomGridCellViewInfo); - protected - class function GetHitTestCode: Integer; virtual; - procedure Init(const APos: TPoint); - public - destructor Destroy; override; - function Cursor: TCursor; virtual; - function DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; virtual; - class function HitTestCode: Integer; - class function Instance(const APos: TPoint): TcxCustomGridHitTest; - property Pos: TPoint read FPos; - property ViewInfo: TcxCustomGridCellViewInfo read FViewInfo write SetViewInfo; - end; - - TcxGridNoneHitTest = class(TcxCustomGridHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxCustomGridViewHitTest = class(TcxCustomGridHitTest) - private - FGridView: TcxCustomGridView; - public - property GridView: TcxCustomGridView read FGridView write FGridView; - end; - - TcxGridViewNoneHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridNavigatorHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridCustomizationFormHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridDesignSelectorHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - public - function Cursor: TCursor; override; - end; - - { custom handler } - - TcxGridViewHandler = class(TcxInterfacedPersistent) - private - FGridView: TcxCustomGridView; - function GetControl: TcxControl; - function GetController: TcxCustomGridController; - function GetDataController: TcxCustomDataController; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetPainter: TcxCustomGridPainter; - function GetSite: TcxGridSite; - function GetViewData: TcxCustomGridViewData; - function GetViewInfo: TcxCustomGridViewInfo; - protected - property Control: TcxControl read GetControl; - property Controller: TcxCustomGridController read GetController; - property DataController: TcxCustomDataController read GetDataController; - property ViewData: TcxCustomGridViewData read GetViewData; - public - constructor Create(AGridView: TcxCustomGridView); reintroduce; virtual; - procedure BeginUpdate; - procedure EndUpdate; - property GridView: TcxCustomGridView read FGridView; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property Painter: TcxCustomGridPainter read GetPainter; - property Site: TcxGridSite read GetSite; - property ViewInfo: TcxCustomGridViewInfo read GetViewInfo; - end; - - { contoller } - - // drag&drop objects - - TcxCustomGridDragAndDropObject = class(TcxDragAndDropObject) - private - function GetController: TcxCustomGridController; - function GetGridView: TcxCustomGridView; - function GetViewInfo: TcxCustomGridViewInfo; - protected - procedure AfterDragAndDrop(Accepted: Boolean); override; - procedure AfterPaint; virtual; - procedure BeforePaint; virtual; - property Controller: TcxCustomGridController read GetController; - property ViewInfo: TcxCustomGridViewInfo read GetViewInfo; - public - SourcePoint: TPoint; - procedure AfterScrolling; virtual; - procedure BeforeScrolling; virtual; - procedure AfterViewChange; virtual; - procedure BeforeViewChange; virtual; - procedure Init(const P: TPoint; AParams: TcxCustomGridHitTest); virtual; - property GridView: TcxCustomGridView read GetGridView; - end; - - TcxGridArrowNumber = (anFirst, anLast); - TcxGridArrowPlace = TcxArrowPlace; - - TcxCustomGridMovingObject = class(TcxCustomGridDragAndDropObject) - private - FDragImage: TcxDragImage; - FSourceItem: TObject; - function GetArrowPlace(AArrowNumber: TcxGridArrowNumber): TcxGridArrowPlace; - function GetCustomizationForm: TcxCustomGridCustomizationForm; - protected - Arrows: array[TcxGridArrowNumber] of TcxDragAndDropArrow; - - procedure DirtyChanged; override; - function GetDragAndDropCursor(Accepted: Boolean): TCursor; override; - - procedure ChangeArrowsPosition(AVisible: Boolean = True); - procedure ChangeDragImagePosition(AVisible: Boolean = True); - - function AreArrowsVertical: Boolean; virtual; - function CanRemove: Boolean; virtual; abstract; - function GetArrowAreaBounds(APlace: TcxGridArrowPlace): TRect; virtual; abstract; - function GetArrowClass: TcxDragAndDropArrowClass; virtual; - function GetArrowsClientRect: TRect; virtual; - function GetCustomizationFormListBox: TcxCustomGridItemsListBox; virtual; abstract; - function GetDragImageClass: TcxDragImageClass; virtual; - function GetSourceItemBounds: TRect; virtual; - function GetSourceItemViewInfo: TcxCustomGridCellViewInfo; virtual; - procedure InitDragImage; virtual; - procedure InitDragImageUsingCustomizationForm(ACanvas: TcxCanvas; - const R: TRect; AItem: TObject); virtual; - function IsSourceCustomizationForm: Boolean; virtual; abstract; - function IsValidDestination: Boolean; virtual; abstract; - - procedure BeginDragAndDrop; override; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - procedure EndDragAndDrop(Accepted: Boolean); override; - - property ArrowPlaces[AArrowNumber: TcxGridArrowNumber]: TcxGridArrowPlace read GetArrowPlace; - property ArrowsClientRect: TRect read GetArrowsClientRect; - property CustomizationForm: TcxCustomGridCustomizationForm read GetCustomizationForm; - property CustomizationFormListBox: TcxCustomGridItemsListBox read GetCustomizationFormListBox; - property DragImage: TcxDragImage read FDragImage; - property SourceItem: TObject read FSourceItem write FSourceItem; - property SourceItemBounds: TRect read GetSourceItemBounds; - property SourceItemViewInfo: TcxCustomGridCellViewInfo read GetSourceItemViewInfo; - public - procedure AfterScrolling; override; - end; - - // customization form - - TcxCustomGridItemsInnerListBox = class(TcxInnerListBox) - private - FDragAndDropItemIndex: Integer; - FMouseDownPos: TPoint; - function GetContainer: TcxCustomGridItemsListBox; - function GetDragAndDropItem: TObject; - function GetGridView: TcxCustomGridView; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - procedure WMCancelMode(var Message: TWMCancelMode); message WM_CANCELMODE; - procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; - procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure CreateWnd; override; - procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - - procedure CalculateBorderStyle; - procedure CalculateItemHeight; - - property Container: TcxCustomGridItemsListBox read GetContainer; - property DragAndDropItem: TObject read GetDragAndDropItem; - property DragAndDropItemIndex: Integer read FDragAndDropItemIndex; - property GridView: TcxCustomGridView read GetGridView; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - public - constructor Create(AOwner: TComponent); override; - end; - - TcxCustomGridItemsListBoxClass = class of TcxCustomGridItemsListBox; - - TcxCustomGridItemsListBox = class(TcxListBox) - private - function GetDragAndDropItem: TObject; - function GetGridView: TcxCustomGridView; - function GetInnerListBox: TcxCustomGridItemsInnerListBox; - protected - function CalculateItemHeight: Integer; virtual; abstract; - procedure DoRefreshItems; virtual; abstract; - function GetInnerListBoxClass: TcxInnerListBoxClass; override; - function GetDragAndDropParams: TcxCustomGridHitTest; virtual; abstract; - property DragAndDropItem: TObject read GetDragAndDropItem; - property GridView: TcxCustomGridView read GetGridView; - public - constructor Create(AOwner: TComponent); override; - function IndexOfItem(AItem: TObject): Integer; - procedure PaintDragAndDropItem(ACanvas: TcxCanvas; const R: TRect; AItem: TObject); - procedure PaintItem(ACanvas: TcxCanvas; R: TRect; AIndex: Integer; AFocused: Boolean); virtual; abstract; - procedure RefreshItems; - property InnerListBox: TcxCustomGridItemsInnerListBox read GetInnerListBox; - end; - - TcxCustomGridCustomizationFormClass = class of TcxCustomGridCustomizationForm; - - TcxCustomGridCustomizationForm = class(TForm) - private - FController: TcxCustomGridController; - FHookTimer: TcxTimer; - FOffset: Integer; - FPageControl: TcxPageControl; - function GetGridView: TcxCustomGridView; - function GetViewInfo: TcxCustomGridViewInfo; - procedure HookTimerHandler(Sender: TObject); - protected - procedure CreateParams(var Params: TCreateParams); override; - procedure DoClose(var Action: TCloseAction); override; - procedure DoShow; override; - - procedure CalculateConsts; virtual; - procedure CreateControls; virtual; - function CreatePage(const ACaption: string; AVisible: Boolean): TcxTabSheet; - procedure GridViewChanged; virtual; - - function GetContentBounds: TRect; virtual; - function GetPageControlBounds: TRect; virtual; - procedure InitPageControl; virtual; - - property ContentBounds: TRect read GetContentBounds; - property GridView: TcxCustomGridView read GetGridView; - property Offset: Integer read FOffset write FOffset; - property PageControl: TcxPageControl read FPageControl; - property ViewInfo: TcxCustomGridViewInfo read GetViewInfo; - public - constructor Create(AController: TcxCustomGridController); reintroduce; virtual; - destructor Destroy; override; - property Controller: TcxCustomGridController read FController; - procedure ActivatePage(APage: TcxTabSheet); - procedure RefreshData; virtual; - end; - - // popup - - (*$HPPEMIT 'namespace Cxgridcustomview'}*) - (*$HPPEMIT '{'}*) - (*$HPPEMIT '__interface IcxCustomGridPopupOwner;'}*) - (*$HPPEMIT '}'*) - - IcxCustomGridPopupOwner = interface - ['{ACF62D23-6871-4735-A4CE-3B0888DB8FC3}'] - function ClosePopupWhenNilOwner: Boolean; - function GetOwnerBounds: TRect; - procedure PopupClosed; - end; - - TcxCustomGridPopup = class(TcxCustomPopupWindow) - private - FGridView: TcxCustomGridView; - FOwner: IcxCustomGridPopupOwner; - procedure SetOwner(Value: IcxCustomGridPopupOwner); - protected - function CalculateOwnerBounds: TRect; virtual; - function GetClientMinWidth: Integer; virtual; - procedure InitPopup; override; - procedure Paint; override; - procedure VisibleChanged; override; - public - constructor Create(AGridView: TcxCustomGridView); reintroduce; virtual; - procedure CloseUp; override; - procedure Popup; reintroduce; virtual; - property BorderWidths; - property GridView: TcxCustomGridView read FGridView; - property ClientMinWidth: Integer read GetClientMinWidth; - property Owner: IcxCustomGridPopupOwner read FOwner write SetOwner; - end; - - TcxGridIndexes = array of Integer; - - TcxGridPopupListBoxActionEvent = procedure(Sender: TcxGridPopupListBox; - AItemIndex: Integer) of object; - - TcxGridPopupListBox = class(TcxListBox) - private - FCheckedIndexes: TList; - FItemTextOffsetLeft: Integer; - FItemTextOffsetRight: Integer; - FItemTextOffsetVert: Integer; - FMinWidth: Integer; - FPopup: TcxCustomGridPopup; - FPressedItemIndex: Integer; - FShowChecks: Boolean; - FVisibleItemCount: Integer; - FVisibleWidth: Integer; - FOnAction: TcxGridPopupListBoxActionEvent; - function GetChecked(Index: Integer): Boolean; - function GetCheckedIndexes: TcxGridIndexes; - function GetGridView: TcxCustomGridView; - procedure SetChecked(Index: Integer; Value: Boolean); - procedure SetCheckedIndexes(const Value: TcxGridIndexes); - procedure SetPressedItemIndex(Value: Integer); - procedure SetShowChecks(Value: Boolean); - protected - function DrawItem(ACanvas: TcxCanvas; AIndex: Integer; const ARect: TRect; - AState: TOwnerDrawState): Boolean; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseLeave(AControl: TControl); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - - function CalculateItemHeight: Integer; virtual; - procedure DoAction(AItemIndex: Integer); virtual; - procedure DrawItemCheck(ACanvas: TcxCanvas; AIndex: Integer; - const ACheckAreaRect: TRect; AState: TOwnerDrawState); virtual; - procedure DrawItemContent(ACanvas: TcxCanvas; AIndex: Integer; ARect: TRect; - AState: TOwnerDrawState); virtual; - function GetVisibleItemCount(AItems: TStrings): Integer; virtual; - procedure Init; virtual; - procedure InvalidateItem(AIndex: Integer); - - function CanHaveCheck(AItemIndex: Integer): Boolean; virtual; - procedure ChangeChecked(AItemIndex: Integer); virtual; - function GetCheckAreaHeight: Integer; - function GetCheckAreaWidth: Integer; - function HasCheck(AItemIndex: Integer): Boolean; virtual; - function IsCheck(AItemIndex: Integer): Boolean; - property Checked[Index: Integer]: Boolean read GetChecked write SetChecked; - property CheckedIndexes: TcxGridIndexes read GetCheckedIndexes write SetCheckedIndexes; - property PressedItemIndex: Integer read FPressedItemIndex write SetPressedItemIndex; - property ShowChecks: Boolean read FShowChecks write SetShowChecks; - public - constructor Create(APopup: TcxCustomGridPopup); reintroduce; virtual; - destructor Destroy; override; - procedure AdjustBounds(AItems: TStrings = nil); virtual; - - property GridView: TcxCustomGridView read GetGridView; - property ItemTextOffsetLeft: Integer read FItemTextOffsetLeft write FItemTextOffsetLeft; - property ItemTextOffsetRight: Integer read FItemTextOffsetRight write FItemTextOffsetRight; - property ItemTextOffsetVert: Integer read FItemTextOffsetVert write FItemTextOffsetVert; - property MinWidth: Integer read FMinWidth write FMinWidth; - property Popup: TcxCustomGridPopup read FPopup; - property VisibleItemCount: Integer read FVisibleItemCount write FVisibleItemCount; - property VisibleWidth: Integer read FVisibleWidth write FVisibleWidth; - property OnAction: TcxGridPopupListBoxActionEvent read FOnAction write FOnAction; - end; - - // controllers - - TcxCustomGridDesignController = class - protected - function GetControl: TcxControl; virtual; abstract; - function GetDesignObject(AObject: TPersistent): TPersistent; virtual; - public - function IsObjectSelected(AObject: TPersistent): Boolean; - procedure SelectObject(AObject: TPersistent; AClearSelection: Boolean); - procedure SelectObjects(AObjects: TList); - procedure UnselectObject(AObject: TPersistent); - property Control: TcxControl read GetControl; // TcxCustomGrid - end; - - TcxGridViewDesignControllerClass = class of TcxGridViewDesignController; - - TcxGridViewDesignController = class(TcxCustomGridDesignController) - private - FController: TcxCustomGridController; - protected - function GetControl: TcxControl; override; - function GetDesignObject(AObject: TPersistent): TPersistent; override; - public - constructor Create(AController: TcxCustomGridController); virtual; - property Controller: TcxCustomGridController read FController; - end; - - TcxCustomGridControllerClass = class of TcxCustomGridController; - - TcxCustomGridController = class(TcxGridViewHandler, IcxMouseTrackingCaller, - IcxMouseTrackingCaller2) - private - FCustomization: Boolean; - FCustomizationForm: TcxCustomGridCustomizationForm; - FCustomizationFormBounds: TRect; - FDesignController: TcxGridViewDesignController; - FHintAreaBounds: TRect; - FHintCellViewInfo: TcxCustomGridViewCellViewInfo; - FHintCheckerTimer: TcxTimer; - FHintTextRect: TRect; - FHintWindow: THintWindow; - FIsCheckingCoordinates: Boolean; - FIsDblClick: Boolean; - FIsFocusing: Boolean; - function GetDesignController: TcxGridViewDesignController; - function GetDragAndDropObject: TcxCustomGridDragAndDropObject; - function GetDragAndDropObjectClass: TcxDragAndDropObjectClass; - function GetDragImages: TcxDragImageList; - function GetIsDragging: Boolean; - function GetMouseCaptureViewInfo: TcxCustomGridCellViewInfo; - procedure SetCustomization(Value: Boolean); - procedure SetDragAndDropObjectClass(Value: TcxDragAndDropObjectClass); - procedure SetMouseCaptureViewInfo(Value: TcxCustomGridCellViewInfo); - procedure HintCheckerTimerHandler(Sender: TObject); - protected - { IcxMouseTrackingCaller2 } - procedure MouseLeave; virtual; - function PtInCaller(const P: TPoint): Boolean; virtual; - - procedure AfterPaint; virtual; - procedure BeforeKillFocus; virtual; - procedure BeforePaint; virtual; - function CanFocusOnClick(X, Y: Integer): Boolean; virtual; - function CanHandleHitTest(AHitTest: TcxCustomGridHitTest): Boolean; virtual; - procedure CheckCoordinates; virtual; - procedure DetailFocused(ADetail: TcxCustomGridView); virtual; - procedure DoEnter; virtual; - procedure DoExit; virtual; - procedure DoSetFocus(ANotifyMaster: Boolean); virtual; - function GetDesignControllerClass: TcxGridViewDesignControllerClass; virtual; - function GetDesignHitTest(AHitTest: TcxCustomGridHitTest): Boolean; virtual; - function GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; virtual; - function GetPatternObject(AObject: TPersistent): TPersistent; virtual; - procedure GridViewChanged; virtual; - function IsPixelScrollBar(AKind: TScrollBarKind): Boolean; virtual; - function MayFocus: Boolean; virtual; - procedure RemoveFocus; virtual; - procedure SetFocus(ANotifyMaster: Boolean); virtual; - procedure VisibilityChanged(AVisible: Boolean); virtual; - - // customization - procedure CheckCustomizationFormBounds(var R: TRect); virtual; - procedure CustomizationChanged; virtual; - function GetCustomizationFormBounds: TRect; - function GetCustomizationFormClass: TcxCustomGridCustomizationFormClass; virtual; - function GetCustomizationFormDefaultWidth: Integer; virtual; - function GetCustomizationFormDefaultHeight: Integer; virtual; - procedure HideCustomizationForm; - procedure ShowCustomizationForm; - - property DragAndDropObject: TcxCustomGridDragAndDropObject read GetDragAndDropObject; - property IsCheckingCoordinates: Boolean read FIsCheckingCoordinates; - property IsDragging: Boolean read GetIsDragging; - property IsFocusing: Boolean read FIsFocusing; - public - destructor Destroy; override; - procedure ControlFocusChanged; virtual; - procedure DesignerModified; - procedure DoCancelMode; virtual; - procedure DoCheckCoordinates; - procedure DoControlFocusChanged; - function GetCursor(X, Y: Integer): TCursor; virtual; - function HasFocusedControls: Boolean; virtual; - //function CanDrag(X, Y: Integer): Boolean; dynamic; - //function GetDragObjectClass: TDragControlObjectClass; dynamic; - - procedure InitScrollBarsParameters; virtual; - function IsDataFullyVisible(AIsCallFromMaster: Boolean = False): Boolean; virtual; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); virtual; - procedure SetScrollBarInfo(AScrollBarKind: TScrollBarKind; - AMin, AMax, AStep, APage, APos: Integer; AAllowShow, AAllowHide: Boolean); - procedure UpdateScrollBars(AIgnoreUpdateLock: Boolean = False); - - procedure BeginDragAndDrop; virtual; - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); virtual; - procedure EndDragAndDrop(Accepted: Boolean); virtual; - function StartDragAndDrop(const P: TPoint): Boolean; virtual; - - // delphi drag and drop - procedure BeforeStartDrag; virtual; - function CanDrag(X, Y: Integer): Boolean; virtual; - procedure DragDrop(Source: TObject; X, Y: Integer); virtual; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); virtual; - procedure DrawDragImage(ACanvas: TcxCanvas; R: TRect); virtual; - procedure EndDrag(Target: TObject; X, Y: Integer); virtual; - function GetDragImagesSize: TPoint; virtual; - function HasDragImages: Boolean; virtual; - procedure StartDrag(var DragObject: TDragObject); virtual; - property DragImages: TcxDragImageList read GetDragImages; - - // hints - function CanShowHint: Boolean; virtual; - procedure HideHint; - function GetHintWindowClass: THintWindowClass; virtual; - procedure ShowHint(const AHintAreaBounds, ATextRect: TRect; const AText: string; - AIsHintMultiLine: Boolean; AFont: TFont; AHintCellViewInfo: TcxCustomGridViewCellViewInfo); - procedure StartHintCheckerTimer; - procedure StopHintCheckerTimer; - property HintCellViewInfo: TcxCustomGridViewCellViewInfo read FHintCellViewInfo; - property HintWindow: THintWindow read FHintWindow; - - procedure DoKeyDown(var Key: Word; Shift: TShiftState); virtual; - procedure KeyDown(var Key: Word; Shift: TShiftState); virtual; - procedure KeyPress(var Key: Char); virtual; - procedure KeyUp(var Key: Word; Shift: TShiftState); virtual; - - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); virtual; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); virtual; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); virtual; - - function ProcessDetailDialogChar(ADetail: TcxCustomGridView; ACharCode: Word): Boolean; virtual; - function ProcessDialogChar(ACharCode: Word): Boolean; virtual; - - procedure WndProc(var Message: TMessage); virtual; - - procedure RefreshCustomizationForm; - - {procedure BeginCellMouseTracking(AViewInfo: TcxCustomGridCellViewInfo); - procedure EndCellMouseTracking(AViewInfo: TcxCustomGridCellViewInfo);} - - property Customization: Boolean read FCustomization write SetCustomization; - property CustomizationForm: TcxCustomGridCustomizationForm read FCustomizationForm; - property CustomizationFormBounds: TRect read FCustomizationFormBounds - write FCustomizationFormBounds; - property DesignController: TcxGridViewDesignController read GetDesignController; - property DragAndDropObjectClass: TcxDragAndDropObjectClass read GetDragAndDropObjectClass - write SetDragAndDropObjectClass; - property IsDblClick: Boolean read FIsDblClick; - property MouseCaptureViewInfo: TcxCustomGridCellViewInfo read GetMouseCaptureViewInfo - write SetMouseCaptureViewInfo; - end; - - { datacontroller } - - // sorting by summary - - TcxDataGroupNode = class - private - FChilds: TList; - FDataGroupInfo: TcxDataGroupInfo; - FParent: TcxDataGroupNode; - function GetChild(Index: Integer): TcxDataGroupNode; - function GetChildCount: Integer; - public - constructor Create(AParent: TcxDataGroupNode; ADataGroupInfo: TcxDataGroupInfo); - destructor Destroy; override; - function AddChild(ADataGroupInfo: TcxDataGroupInfo): TcxDataGroupNode; - - property ChildCount: Integer read GetChildCount; - property Childs[Index: Integer]: TcxDataGroupNode read GetChild; default; - property DataGroupInfo: TcxDataGroupInfo read FDataGroupInfo; - property Parent: TcxDataGroupNode read FParent; - end; - - TcxSortingBySummaryInfo = class - SortOrder: TcxDataSortOrder; - SummaryItemIndex: Integer; - end; - - TcxGridSortingBySummaryEngine = class(TcxSortingBySummaryEngine) - private - FInfos: TList; - FRootNode: TcxDataGroupNode; - function GetDataGroups: TcxDataGroups; - function GetInfo(Index: Integer): TcxSortingBySummaryInfo; - function GetInfoCount: Integer; - protected - procedure AddInfo(AInfo: TcxSortingBySummaryInfo); - procedure BuildNodes(AParentNode: TcxDataGroupNode; ALevel: Integer; var ACurIndex: Integer); - procedure ClearInfos; - function CompareGroupsBySummary(AInfo1, AInfo2: Pointer): Integer; - procedure RebuildDataGroupRecursive(AParentNode: TcxDataGroupNode; var ABeginRecordListIndex: Integer); - procedure RebuildDataGroups; - procedure SortNodeRecursive(ANode: TcxDataGroupNode; ALevel: Integer); - procedure SortNodes; - - property DataGroups: TcxDataGroups read GetDataGroups; - property InfoCount: Integer read GetInfoCount; - property Infos[Index: Integer]: TcxSortingBySummaryInfo read GetInfo; - public - constructor Create(ADataControllerInfo: TcxCustomDataControllerInfo); override; - destructor Destroy; override; - procedure Sort; override; - end; - - // interface to data controller - - IcxCustomGridDataController = interface - ['{B9ABDC6B-1A4A-4F11-A629-09B6FB9FB4BA}'] - procedure AssignData(ADataController: TcxCustomDataController); - procedure CreateAllItems(AMissingItemsOnly: Boolean); - procedure DeleteAllItems; - procedure GetFakeComponentLinks(AList: TList); - function GetGridView: TcxCustomGridView; - function HasAllItems: Boolean; - function IsDataChangeable: Boolean; - function IsDataLinked: Boolean; - function SupportsCreateAllItems: Boolean; - property GridView: TcxCustomGridView read GetGridView; - end; - - { painters } - - TcxCustomGridCellPainterClass = class of TcxCustomGridCellPainter; - - TcxCustomGridCellPainter = class - private - FCanvas: TcxCanvas; - FViewInfo: TcxCustomGridCellViewInfo; - function GetIsMainCanvasInUseValue: Boolean; - protected - procedure AfterPaint; virtual; - procedure BeforePaint; virtual; - function CanDrawDesignSelection: Boolean; virtual; - procedure DoExcludeFromClipRect; virtual; - procedure DrawBackground; overload; virtual; - procedure DrawBackground(const R: TRect); overload; virtual; - function DrawBackgroundHandler(ACanvas: TcxCanvas; const ABounds: TRect): Boolean; virtual; - procedure DrawBorder(ABorder: TcxBorder); virtual; - procedure DrawBorders; virtual; - procedure DrawContent; virtual; - class procedure DrawDesignSelection(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridCellViewInfo); virtual; - procedure DrawText; virtual; - function ExcludeFromClipRect: Boolean; virtual; - class function GetIsMainCanvasInUse(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo): Boolean; - function NeedsPainting: Boolean; virtual; - procedure Paint; virtual; - procedure PrepareCanvasForDrawText; virtual; - procedure UnprepareCanvasForDrawText; virtual; - property Canvas: TcxCanvas read FCanvas; - property IsMainCanvasInUse: Boolean read GetIsMainCanvasInUseValue; - property ViewInfo: TcxCustomGridCellViewInfo read FViewInfo; - public - constructor Create(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo); virtual; - class procedure DoDrawDesignSelection(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridCellViewInfo); virtual; - procedure MainPaint; virtual; - end; - - TcxGridDesignSelectorPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridDesignSelectorViewInfo; - protected - procedure DoExcludeFromClipRect; override; - procedure DrawSign(AColor: TColor); virtual; - function ExcludeFromClipRect: Boolean; override; - procedure Paint; override; - property ViewInfo: TcxGridDesignSelectorViewInfo read GetViewInfo; - end; - - TcxCustomGridPainterClass = class of TcxCustomGridPainter; - - TcxCustomGridPainter = class(TcxGridViewHandler) - private - FBackgroundRegion: TcxRegion; - FBeforePaintClipRegion: TcxRegion; - FCanvas: TcxCanvas; - FViewInfo: TcxCustomGridViewInfo; - function GetCanvas: TcxCanvas; - function GetViewInfo: TcxCustomGridViewInfo; - protected - procedure DrawBackground; virtual; - procedure PaintAfter; virtual; - procedure PaintBefore; virtual; - procedure PaintContent; virtual; - property Canvas: TcxCanvas read GetCanvas write FCanvas; - property ViewInfo: TcxCustomGridViewInfo read GetViewInfo write FViewInfo; - public - procedure DrawFocusRect(const R: TRect; AHideFocusRect: Boolean); virtual; - procedure ExcludeFromBackground(const R: TRect); - procedure Paint(ACanvas: TcxCanvas = nil; AViewInfo: TcxCustomGridViewInfo = nil); - procedure Invalidate; overload; - procedure Invalidate(const R: TRect); overload; - procedure Invalidate(ARegion: TcxRegion); overload; - end; - - { viewdata } - - TcxCustomGridViewDataClass = class of TcxCustomGridViewData; - - TcxCustomGridViewData = class(TcxGridViewHandler) - public - function GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; virtual; - function IsEmpty: Boolean; virtual; - function MakeDetailVisible(ADetailLevel: TComponent{TcxGridLevel}): TcxCustomGridView; virtual; - property DataController; - end; - - { viewinfos } - - TcxGridSiteClass = class of TcxGridSite; - - TcxGridSite = class(TcxControl) - private - FBoundsChangedTimer: TcxTimer; - FIgnoreUpdateLock: Boolean; - FSize: TPoint; - FViewInfo: TcxCustomGridViewInfo; - function GetContainer: TcxControl; - function GetController: TcxCustomGridController; - function GetGridView: TcxCustomGridView; - function GetPainter: TcxCustomGridPainter; - procedure SendKeyDownNotification(var Message: TWMKeyDown); - procedure CNKeyDown(var Message: TWMKeyDown); message CN_KEYDOWN; - procedure CNSysKeyDown(var Message: TWMKeyDown); message CN_SYSKEYDOWN; - procedure BoundsChangedTimerHandler(Sender: TObject); - protected - function AllowAutoDragAndDropAtDesignTime(X, Y: Integer; - Shift: TShiftState): Boolean; override; - function AllowDragAndDropWithoutFocus: Boolean; override; - procedure BeforeMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure BoundsChanged; override; - function CanDrag(X, Y: Integer): Boolean; override; - function CanFocusOnClick(X, Y: Integer): Boolean; override; - procedure DoCancelMode; override; - procedure DoContextPopup(MousePos: TPoint; var Handled: Boolean); override; - procedure DoEnter; override; - procedure DoExit; override; - procedure FocusChanged; override; - function FocusWhenChildIsClicked(AChild: TControl): Boolean; override; - function GetClientBounds: TRect; override; - function GetCursor(X, Y: Integer): TCursor; override; - function GetDesignHitTest(X, Y: Integer; Shift: TShiftState): Boolean; override; - function GetIsDesigning: Boolean; override; - function GetIsFocused: Boolean; override; - function GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; override; - function IsPixelScrollBar(AKind: TScrollBarKind): Boolean; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyPress(var Key: Char); override; - procedure KeyUp(var Key: Word; Shift: TShiftState); override; - function MayFocus: Boolean; override; - procedure MouseLeave(AControl: TControl); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure Paint; override; - procedure RequestAlign; override; - procedure SetParent(AParent: TWinControl); override; - function UpdateMousePositionIfControlMoved: Boolean; override; - procedure WndProc(var Message: TMessage); override; - - procedure DoEndDrag(Target: TObject; X, Y: Integer); override; - procedure DoStartDrag(var DragObject: TDragObject); override; - procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); override; - procedure DrawDragImage(ACanvas: TcxCanvas; const R: TRect); override; - function GetDragImagesSize: TPoint; override; - function HasDragImages: Boolean; override; - - function GetHScrollBarBounds: TRect; override; - procedure InitScrollBarsParameters; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - procedure UpdateScrollBars; override; - - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - procedure EndDragAndDrop(Accepted: Boolean); override; - function StartDragAndDrop(const P: TPoint): Boolean; override; - - procedure CancelPostBoundsChanged; - procedure InitTabStop(AParent: TWinControl); - procedure PostBoundsChanged; - procedure UpdateSize; - - property Controller: TcxCustomGridController read GetController; - property IgnoreUpdateLock: Boolean read FIgnoreUpdateLock write FIgnoreUpdateLock; - property Painter: TcxCustomGridPainter read GetPainter; - public - constructor Create(AViewInfo: TcxCustomGridViewInfo); reintroduce; virtual; - destructor Destroy; override; - procedure BeginDragAndDrop; override; - procedure DragDrop(Source: TObject; X, Y: Integer); override; - function ExecuteAction(Action: TBasicAction): Boolean; override; - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; - procedure SetFocus; override; - function UpdateAction(Action: TBasicAction): Boolean; override; - - property Container: TcxControl read GetContainer; - property GridView: TcxCustomGridView read GetGridView; - property HScrollBar; - property HScrollBarVisible; - property Keys; //!!! - property MouseCapture; - property ViewInfo: TcxCustomGridViewInfo read FViewInfo; - property VScrollBar; - property VScrollBarVisible; - end; - - TcxCustomGridCellViewInfoClass = class of TcxCustomGridCellViewInfo; - - TcxCustomGridCellViewInfo = class(TcxIUnknownObject, - IcxMouseCaptureObject, IcxMouseTrackingCaller, IcxMouseTrackingCaller2, - IcxCustomGridPopupOwner) - private - FCalculated: Boolean; - FCalculatingParams: Boolean; - FAlignmentHorz: TAlignment; - FAlignmentVert: TcxAlignmentVert; - FBorders: TcxBorders; - FIsDestroying: Boolean; - FLinkedHitTest: TcxCustomGridHitTest; - FParamsCalculated: Boolean; - FState: TcxGridCellState; - FText: string; - FVisible: Boolean; - function GetBorderSize(AIndex: TcxBorder): Integer; - function GetButtonState: TcxButtonState; - function GetClientBounds: TRect; - function GetContentBounds: TRect; - function GetTextBoundsValue: TRect; - function GetTextHeight: Integer; - function GetTextHeightWithOffset: Integer; - function GetTextWidth: Integer; - function GetTextWidthWithOffset: Integer; - procedure SetLinkedHitTest(Value: TcxCustomGridHitTest); - procedure SetState(Value: TcxGridCellState); - protected - FClientBounds: TRect; - FContentBounds: TRect; - - { IcxMouseCaptureObject } - procedure DoCancelMode; virtual; - { IcxMouseTrackingCaller2 } - procedure MouseLeave; virtual; - function PtInCaller(const P: TPoint): Boolean; virtual; - { IcxCustomGridPopupOwner } - function ClosePopupWhenNilOwner: Boolean; - function GetOwnerBounds: TRect; - procedure PopupClosed; - - procedure AfterCalculateBounds(var ABounds: TRect); virtual; - procedure AfterCustomDraw(ACanvas: TcxCanvas); virtual; - procedure BeforeCustomDraw(ACanvas: TcxCanvas); virtual; - procedure BeforeStateChange; virtual; - function CalculateClientBounds: TRect; virtual; - function CalculateContentBounds: TRect; virtual; - function CalculateTextWidth(AAngle: Integer = 0): Integer; - function CalculateTextHeight(AForPainting: Boolean; AAngle: Integer = 0): Integer; - procedure CalculateParams; - procedure CalculateParamsNeeded; - function CalculateHeight: Integer; virtual; - function CalculateWidth: Integer; virtual; - function CaptureMouseOnPress: Boolean; virtual; - procedure Click; virtual; - function CustomDraw(ACanvas: TcxCanvas): Boolean; virtual; - function CustomDrawBackground(ACanvas: TcxCanvas): Boolean; virtual; - procedure Destroying; - procedure DoCalculateParams; virtual; - procedure DoInvalidate; virtual; - function DoCustomDraw(ACanvas: TcxCanvas): Boolean; virtual; - function DoCustomDrawBackground(ACanvas: TcxCanvas): Boolean; virtual; - function GetActualState: TcxGridCellState; virtual; - function GetAlignmentHorz: TAlignment; virtual; - function GetAlignmentVert: TcxAlignmentVert; virtual; - function GetAreaBounds: TRect; virtual; - function GetBackgroundBitmap: TBitmap; virtual; - function GetBorderBounds(AIndex: TcxBorder): TRect; virtual; - function GetBorderColor(AIndex: TcxBorder): TColor; virtual; - function GetBorders: TcxBorders; virtual; - function GetBorderWidth(AIndex: TcxBorder): Integer; virtual; - function GetBounds: TRect; - function GetCanvas: TcxCanvas; virtual; abstract; - class function GetCellHeight(ATextHeight: Integer; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; virtual; - function GetContentHeight: Integer; virtual; - function GetContentWidth: Integer; virtual; - function GetControl: TcxControl; virtual; - function GetDesignSelectionBounds: TRect; virtual; - function GetDesignSelectionWidth: Integer; virtual; - function GetHeight: Integer; virtual; - function GetHitTestClass: TcxCustomGridHitTestClass; virtual; abstract; - function GetHotTrack: Boolean; virtual; - function GetIsCheck: Boolean; virtual; - function GetIsDesignSelected: Boolean; virtual; - function GetIsVisibleForPainting: Boolean; virtual; - function GetMouseCapture: Boolean; virtual; - function GetMultiLine: Boolean; virtual; - function GetMultiLinePainting: Boolean; virtual; - function GetPainterClass: TcxCustomGridCellPainterClass; virtual; - function GetShowEndEllipsis: Boolean; virtual; - function GetText: string; virtual; - function GetTextAreaBounds: TRect; virtual; - function GetTextAttributes(AForPainting: Boolean): Integer; virtual; - function GetTextBounds(AHorizontal, AVertical: Boolean): TRect; - function GetTextCellHeight(AGridViewInfo: TcxCustomGridViewInfo; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; virtual; - function GetTextForPainting: string; virtual; - function GetTransparent: Boolean; virtual; - procedure GetViewParams(var AParams: TcxViewParams); virtual; - function GetVisible: Boolean; virtual; - function GetVisibleForHitTest: Boolean; virtual; - function GetWidth: Integer; virtual; - function HasBackground: Boolean; virtual; - function HasCustomDraw: Boolean; virtual; - function HasCustomDrawBackground: Boolean; virtual; - function HasHitTestPoint(const P: TPoint): Boolean; virtual; - function HasMouse(AHitTest: TcxCustomGridHitTest): Boolean; virtual; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); virtual; - function InvalidateOnStateChange: Boolean; virtual; - procedure Offset(DX, DY: Integer); virtual; - procedure RestoreParams(const AParams: TcxViewParams); virtual; - procedure SaveParams(out AParams: TcxViewParams); virtual; - procedure SetHeight(Value: Integer); virtual; - procedure SetMouseCapture(Value: Boolean); virtual; - procedure SetWidth(Value: Integer); virtual; - procedure StateChanged(APrevState: TcxGridCellState); virtual; - - procedure DropDown; virtual; - procedure CloseUp; virtual; - function CloseDropDownWindowOnDestruction: Boolean; virtual; - function DropDownWindowExists: Boolean; virtual; - function GetDropDownWindow: TcxCustomGridPopup; virtual; - function GetDropDownWindowOwnerBounds: TRect; virtual; - function IsDropDownWindowOwner: Boolean; virtual; - property DropDownWindow: TcxCustomGridPopup read GetDropDownWindow; - - property BorderWidth[AIndex: TcxBorder]: Integer read GetBorderWidth; - property CalculatingParams: Boolean read FCalculatingParams; - property Canvas: TcxCanvas read GetCanvas; - property Control: TcxControl read GetControl; - property DesignSelectionBounds: TRect read GetDesignSelectionBounds; - property DesignSelectionWidth: Integer read GetDesignSelectionWidth; - property HotTrack: Boolean read GetHotTrack; - property IsCheck: Boolean read GetIsCheck; - property IsDesignSelected: Boolean read GetIsDesignSelected; - property IsDestroying: Boolean read FIsDestroying; - property IsVisibleForPainting: Boolean read GetIsVisibleForPainting; - property LinkedHitTest: TcxCustomGridHitTest read FLinkedHitTest write SetLinkedHitTest; - property ShowEndEllipsis: Boolean read GetShowEndEllipsis; - public - Bounds: TRect; - MultiLine: Boolean; - MultiLinePainting: Boolean; - Params: TcxViewParams; - - constructor Create; - destructor Destroy; override; - procedure AfterConstruction; override; - procedure AfterRecalculation; virtual; - procedure BeforeDestruction; override; - procedure BeforeRecalculation; virtual; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); overload; virtual; - procedure Calculate(const ABounds: TRect); overload; virtual; - function GetAreaBoundsForPainting: TRect; virtual; - function GetBestFitWidth: Integer; virtual; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - function HasPoint(const P: TPoint): Boolean; virtual; - procedure Invalidate; virtual; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; virtual; - function MouseMove(AHitTest: TcxCustomGridHitTest; AShift: TShiftState): Boolean; virtual; - function MouseUp(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; virtual; - procedure DoOffset(DX, DY: Integer); - procedure Paint(ACanvas: TcxCanvas = nil); virtual; - procedure Recalculate; - procedure ResetContentBounds; - procedure Update; - - property ActualState: TcxGridCellState read GetActualState; - property AlignmentHorz: TAlignment read FAlignmentHorz write FAlignmentHorz; - property AlignmentVert: TcxAlignmentVert read FAlignmentVert write FAlignmentVert; - property BackgroundBitmap: TBitmap read GetBackgroundBitmap; - property BorderBounds[AIndex: TcxBorder]: TRect read GetBorderBounds; - property BorderColor[AIndex: TcxBorder]: TColor read GetBorderColor; - property BorderSize[AIndex: TcxBorder]: Integer read GetBorderSize; - property Borders: TcxBorders read FBorders write FBorders; - property ButtonState: TcxButtonState read GetButtonState; - property Calculated: Boolean read FCalculated write FCalculated; - property ClientBounds: TRect read GetClientBounds; - property ContentBounds: TRect read GetContentBounds; - property ContentHeight: Integer read GetContentHeight; - property ContentWidth: Integer read GetContentWidth; - property Height: Integer read GetHeight write SetHeight; - property MouseCapture: Boolean read GetMouseCapture write SetMouseCapture; - property State: TcxGridCellState read FState write SetState; - property Text: string read FText write FText; - property TextBounds: TRect read GetTextBoundsValue; - property TextForPainting: string read GetTextForPainting; - property TextHeightWithOffset: Integer read GetTextHeightWithOffset; - property TextWidthWithOffset: Integer read GetTextWidthWithOffset; - property TextHeight: Integer read GetTextHeight; - property TextWidth: Integer read GetTextWidth; - property TextAreaBounds: TRect read GetTextAreaBounds; - property Transparent: Boolean read GetTransparent; - property Visible: Boolean read GetVisible write FVisible; - property VisibleForHitTest: Boolean read GetVisibleForHitTest; - property Width: Integer read GetWidth write SetWidth; - end; - - TcxCustomGridViewCellViewInfo = class(TcxCustomGridCellViewInfo) - private - FGridViewInfo: TcxCustomGridViewInfo; - function GetController: TcxCustomGridController; - function GetGridView: TcxCustomGridView; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - protected - procedure AfterCalculateBounds(var ABounds: TRect); override; - procedure DoInvalidate; override; - function EmulateMouseMoveAfterCalculate: Boolean; virtual; - function GetCanvas: TcxCanvas; override; - function GetControl: TcxControl; override; - function HasMouse(AHitTest: TcxCustomGridHitTest): Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - - function CanShowHint: Boolean; virtual; - procedure CheckHint(AHitTest: TcxCustomGridHitTest); - function GetAreaBoundsForHint: TRect; virtual; - function GetBoundsForHint: TRect; - function GetCellBoundsForHint: TRect; virtual; - function GetHintText: string; virtual; - function GetHintTextRect(const AMousePos: TPoint): TRect; virtual; - function HasHintPoint(const P: TPoint): Boolean; virtual; - procedure InitHint(const AMousePos: TPoint; out AHintText: TCaption; - out AIsHintMultiLine: Boolean; out ATextRect: TRect); virtual; - function IsHintForText: Boolean; virtual; - function IsHintMultiLine: Boolean; virtual; - function NeedShowHint(const AMousePos: TPoint; out AHintText: TCaption; - out AIsHintMultiLine: Boolean; out ATextRect: TRect): Boolean; virtual; - - property Controller: TcxCustomGridController read GetController; - public - constructor Create(AGridViewInfo: TcxCustomGridViewInfo); virtual; - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Invalidate; override; - function MouseMove(AHitTest: TcxCustomGridHitTest; AShift: TShiftState): Boolean; override; - property GridView: TcxCustomGridView read GetGridView; - property GridViewInfo: TcxCustomGridViewInfo read FGridViewInfo; - property HintText: string read GetHintText; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - end; - - TcxGridDesignSelectorViewInfoClass = class of TcxGridDesignSelectorViewInfo; - - TcxGridDesignSelectorViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FRegion: TcxRegion; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - - procedure CreateRegion; - procedure DestroyRegion; - property Region: TcxRegion read FRegion; - public - destructor Destroy; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function HasPoint(const P: TPoint): Boolean; override; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - end; - - TcxCustomGridViewInfoClass = class of TcxCustomGridViewInfo; - - TcxCustomGridViewInfo = class(TcxGridViewHandler) - private - FActiveViewInfos: TList; - FAllowCheckCoordinates: Boolean; - FAllowHideSite: Boolean; - FBounds: TRect; - FClientBounds: TRect; - FClientBoundsAssigned: Boolean; - FDesignSelectorViewInfo: TcxGridDesignSelectorViewInfo; - FIsCalculating: Boolean; - FIsInternalUse: Boolean; - FLock: TRTLCriticalSection; - FMousePos: TPoint; - FSite: TcxGridSite; - FSizeCalculating: Boolean; - FVisibilityChanging: Boolean; - - function GetCalculated: Boolean; - function GetCanvas: TcxCanvas; - function GetClientBounds: TRect; - function GetClientHeight: Integer; - function GetClientWidth: Integer; - //function GetIsCalculating: Boolean; - function GetIsInternalUseValue: Boolean; - procedure SetClientBounds(const Value: TRect); - protected - procedure CreateViewInfos; virtual; - procedure DestroyViewInfos(AIsRecreating: Boolean); virtual; - procedure RecreateViewInfos; virtual; - function GetDesignSelectorViewInfoClass: TcxGridDesignSelectorViewInfoClass; virtual; - - function CanHideSite: Boolean; virtual; - procedure CreateSite; - procedure DestroySite; - function GetSiteClass: TcxGridSiteClass; virtual; - function GetSiteParent: TWinControl; - - procedure AddActiveViewInfo(AViewInfo: TObject); - function IsViewInfoActive(AViewInfo: TObject): Boolean; - procedure RemoveActiveViewInfo(AViewInfo: TObject; ARemoveAll: Boolean = False); - - procedure AddScrollBarHeight(var AHeight: Integer); - procedure AdjustClientBounds(var ABounds: TRect); virtual; - procedure AfterCalculating; virtual; - procedure BeforeCalculating; virtual; - procedure Calculate; virtual; - function CalculateClientBounds: TRect; virtual; - procedure CalculateHeight(const AMaxSize: TPoint; var AHeight: Integer; - var AFullyVisible: Boolean); virtual; - procedure CalculateWidth(const AMaxSize: TPoint; var AWidth: Integer); virtual; - function CanCheckCoordinates: Boolean; virtual; - procedure ControlFocusChanged; virtual; - function DoGetHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - function GetAllowBoundsChangedNotification: Boolean; virtual; - function GetBackgroundBitmap: TBitmap; virtual; - function GetBackgroundColor: TColor; virtual; - //function GetContentBounds: TRect; virtual; - function GetDesignSelectorPos: TPoint; virtual; - procedure GetHScrollBarBounds(var ABounds: TRect); virtual; - function GetIsInternalUse: Boolean; virtual; - function GetVisible: Boolean; virtual; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); virtual; - procedure UpdateMousePos; - procedure VisibilityChanged(AVisible: Boolean); virtual; - - property AllowBoundsChangedNotification: Boolean read GetAllowBoundsChangedNotification; - property AllowCheckCoordinates: Boolean read FAllowCheckCoordinates write FAllowCheckCoordinates; - property ClientBoundsAssigned: Boolean read FClientBoundsAssigned write FClientBoundsAssigned; - property SizeCalculating: Boolean read FSizeCalculating; - property VisibilityChanging: Boolean read FVisibilityChanging; - property Visible: Boolean read GetVisible; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - procedure BeforeDestruction; override; - procedure DoVisibilityChanged(AVisible: Boolean); - function GetFontHeight(AFont: TFont): Integer; - procedure GetFontMetrics(AFont: TFont; out AMetrics: TTextMetric); - procedure GetHeight(const AMaxSize: TPoint; var AHeight: Integer; - var AFullyVisible: Boolean); - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; overload; virtual; - function GetHitTest(X, Y: Integer): TcxCustomGridHitTest; overload; virtual; - procedure GetWidth(const AMaxSize: TPoint; var AWidth: Integer); - procedure MainCalculate(const ABounds: TRect); - procedure Recalculate; - - property AllowHideSite: Boolean read FAllowHideSite write FAllowHideSite; - property BackgroundColor: TColor read GetBackgroundColor; - property BackgroundBitmap: TBitmap read GetBackgroundBitmap; - property Bounds: TRect read FBounds; - property Calculated: Boolean read GetCalculated; - property Canvas: TcxCanvas read GetCanvas; - property ClientBounds: TRect read GetClientBounds write SetClientBounds; - property ClientHeight: Integer read GetClientHeight; - property ClientWidth: Integer read GetClientWidth; - //property ContentBounds: TRect read GetContentBounds; - property DesignSelectorViewInfo: TcxGridDesignSelectorViewInfo read FDesignSelectorViewInfo; - property IsCalculating: Boolean read FIsCalculating; - property IsInternalUse: Boolean read GetIsInternalUseValue write FIsInternalUse; - property MousePos: TPoint read FMousePos; - property Site: TcxGridSite read FSite; - end; - - TcxCustomGridViewInfoCacheItemClass = class of TcxCustomGridViewInfoCacheItem; - - TcxCustomGridViewInfoCacheItem = class - private - FIndex: Integer; - FOwner: TcxCustomGridViewInfoCache; - protected - property Index: Integer read FIndex; - property Owner: TcxCustomGridViewInfoCache read FOwner; - public - constructor Create(AOwner: TcxCustomGridViewInfoCache; AIndex: Integer); virtual; - procedure UnassignValues(AKeepMaster: Boolean); virtual; - end; - - TcxCustomGridViewInfoCacheClass = class of TcxCustomGridViewInfoCache; - - TcxCustomGridViewInfoCache = class(TcxGridViewHandler) - private - FItems: TList; - FUnassigningValues: Boolean; - function GetCount: Integer; - function GetInternalItem(Index: Integer): TcxCustomGridViewInfoCacheItem; - function GetItem(Index: Integer): TcxCustomGridViewInfoCacheItem; - procedure SetCount(Value: Integer); - procedure DestroyItems; - protected - function GetItemClass(Index: Integer): TcxCustomGridViewInfoCacheItemClass; virtual; abstract; - property InternalItems[Index: Integer]: TcxCustomGridViewInfoCacheItem read GetInternalItem; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - procedure UnassignValues(AKeepMaster: Boolean = False); virtual; - property Count: Integer read GetCount write SetCount; - property Items[Index: Integer]: TcxCustomGridViewInfoCacheItem read GetItem; default; - end; - - { custom view } - - TcxGridViewChangeKind = (vcProperty, vcLayout, vcSize); - - TcxCustomGridOptions = class(TcxInterfacedPersistent) - private - FGridView: TcxCustomGridView; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - protected - procedure Changed(AChangeKind: TcxGridViewChangeKind); virtual; - function GetGridViewValue: TcxCustomGridView; virtual; - procedure Notification(AComponent: TComponent; AOperation: TOperation); virtual; - - procedure GetStoredProperties(AProperties: TStrings); virtual; - procedure GetStoredPropertyValue(const AName: string; var AValue: Variant); virtual; - procedure SetStoredPropertyValue(const AName: string; const AValue: Variant); virtual; - - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - public - constructor Create(AGridView: TcxCustomGridView); reintroduce; virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - property GridView: TcxCustomGridView read GetGridViewValue; - end; - - TcxCustomGridBackgroundBitmapsClass = class of TcxCustomGridBackgroundBitmaps; - - TcxCustomGridBackgroundBitmaps = class(TcxCustomGridOptions) - private - FItems: TList; - function GetCount: Integer; - procedure BitmapChanged(Sender: TObject); - protected - function GetBitmapStyleIndex(Index: Integer): Integer; virtual; - function GetDefaultBitmap(Index: Integer): TBitmap; virtual; - function GetValue(Index: Integer): TBitmap; - procedure SetValue(Index: Integer; Value: TBitmap); - property Count: Integer read GetCount; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function GetBitmap(Index: Integer): TBitmap; virtual; - property Values[Index: Integer]: TBitmap read GetValue write SetValue; default; - published - property Background: TBitmap index bbBackground read GetValue write SetValue; - end; - - TcxCustomGridOptionsBehaviorClass = class of TcxCustomGridOptionsBehavior; - - TcxCustomGridOptionsBehavior = class(TcxCustomGridOptions) - private - FPostponedSynchronization: Boolean; - function GetPostponedSynchronization: Boolean; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - published - property PostponedSynchronization: Boolean read GetPostponedSynchronization - write FPostponedSynchronization default True; // should be published in all descendants - end; - - TcxCustomGridOptionsDataClass = class of TcxCustomGridOptionsData; - - TcxCustomGridOptionsData = class(TcxCustomGridOptions); - - TcxCustomGridOptionsSelectionClass = class of TcxCustomGridOptionsSelection; - - TcxCustomGridOptionsSelection = class(TcxCustomGridOptions); - - TcxCustomGridOptionsViewClass = class of TcxCustomGridOptionsView; - - TcxCustomGridOptionsView = class(TcxCustomGridOptions) - private - function GetScrollBars: TScrollStyle; - procedure SetScrollBars(Value: TScrollStyle); - protected - property ScrollBars: TScrollStyle read GetScrollBars write SetScrollBars default ssBoth; - public - procedure Assign(Source: TPersistent); override; - end; - - TcxCustomGridStyles = class(TcxStyles) - private - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - protected - procedure Changed(AIndex: Integer); override; - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - procedure GetFakeComponentLinks(AList: TList); virtual; - function GetGridView: TcxCustomGridView; virtual; abstract; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - public - property GridView: TcxCustomGridView read GetGridView; - end; - - TcxCustomGridViewStylesClass = class of TcxCustomGridViewStyles; - - TcxCustomGridViewStyles = class(TcxCustomGridStyles) - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - function GetGridView: TcxCustomGridView; override; - public - procedure Assign(Source: TPersistent); override; - published - property Background: TcxStyle index vsBackground read GetValue write SetValue; - end; - - TcxGridListenerLink = class - private - FGridView: TcxCustomGridView; - public - constructor Create(AGridView: TcxCustomGridView); - destructor Destroy; override; - procedure Clear; - property GridView: TcxCustomGridView read FGridView; - end; - - TcxGridStorageOption = (gsoUseFilter, gsoUseSummary); - TcxGridStorageOptions = set of TcxGridStorageOption; - TcxGridViewChangeNotificationKind = (vcnName{, vsRemoved}); - - TcxGridInitStoredObjectEvent = procedure(Sender: TcxCustomGridView; AObject: TObject) of object; - TcxGridViewGetStoredPropertiesEvent = procedure(Sender: TcxCustomGridView; - AProperties: TStrings) of object; - TcxGridViewGetStoredPropertyValueEvent = procedure(Sender: TcxCustomGridView; - const AName: string; var AValue: Variant) of object; - TcxGridViewSetStoredPropertyValueEvent = procedure(Sender: TcxCustomGridView; - const AName: string; const AValue: Variant) of object; - - TcxCustomGridViewClass = class of TcxCustomGridView; - - TcxCustomGridView = class(TcxControlChildComponent, IcxStoredObject, IcxStoredParent, - IcxGridViewLayoutEditorSupport) - private - FAssigningPattern: Boolean; - FAssigningSettings: Boolean; - FBackgroundBitmaps: TcxCustomGridBackgroundBitmaps; - FClones: TList; - FController: TcxCustomGridController; - FIsChangeNotificationForControllerNeeded: Boolean; - FIsCustomizationFormRefreshNeeded: Boolean; - FIsRestoring: Boolean; - FIsSynchronizing: Boolean; - FLevel: TComponent; - FListenerLinks: TList; - FOptionsList: TList; - FOptionsBehavior: TcxCustomGridOptionsBehavior; - FOptionsData: TcxCustomGridOptionsData; - FOptionsSelection: TcxCustomGridOptionsSelection; - FOptionsView: TcxCustomGridOptionsView; - FPainter: TcxCustomGridPainter; - FPatternGridView: TcxCustomGridView; - FRepository: TComponent; - FStorageControl: TcxControl; - FStorageOptions: TcxGridStorageOptions; - FStoredVersion: Integer; - FStoringName: string; - FStyles: TcxCustomGridStyles; - FSynchronization: Boolean; - FSynchronizationAssignNeeded: Boolean; - FSynchronizationNeeded: Boolean; - FUpdateLockCount: Integer; - FViewData: TcxCustomGridViewData; - FViewInfo: TcxCustomGridViewInfo; - FViewInfoCache: TcxCustomGridViewInfoCache; - FOnCustomization: TNotifyEvent; - FOnGetStoredProperties: TcxGridViewGetStoredPropertiesEvent; - FOnGetStoredPropertyValue: TcxGridViewGetStoredPropertyValueEvent; - FOnInitStoredObject: TcxGridInitStoredObjectEvent; - FOnSetStoredPropertyValue: TcxGridViewSetStoredPropertyValueEvent; - - function GetClone(Index: Integer): TcxCustomGridView; - function GetCloneCount: Integer; - function GetDragMode: TDragMode; - function GetFocused: Boolean; - function GetIsControlFocusedValue: Boolean; - function GetIsDetail: Boolean; - function GetIsMaster: Boolean; - function GetIsPattern: Boolean; - function GetIsStoringNameMode: Boolean; - function GetIsUpdating: Boolean; - function GetLookAndFeel: TcxLookAndFeel; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetMasterGridView: TcxCustomGridView; - function GetMasterGridRecordIndex: Integer; - function GetMasterRecordIndex: Integer; - function GetOnDblClick: TNotifyEvent; - function GetOnDragDrop: TDragDropEvent; - function GetOnDragOver: TDragOverEvent; - function GetOnEndDrag: TEndDragEvent; - function GetOnKeyDown: TKeyEvent; - function GetOnKeyPress: TKeyPressEvent; - function GetOnKeyUp: TKeyEvent; - function GetOnMouseDown: TMouseEvent; - function GetOnMouseEnter: TNotifyEvent; - function GetOnMouseLeave: TNotifyEvent; - function GetOnMouseMove: TMouseMoveEvent; - function GetOnMouseUp: TMouseEvent; - function GetOnMouseWheel: TMouseWheelEvent; - function GetOnMouseWheelDown: TMouseWheelUpDownEvent; - function GetOnMouseWheelUp: TMouseWheelUpDownEvent; - function GetOnStartDrag: TStartDragEvent; - function GetPatternGridView: TcxCustomGridView; - function GetPopupMenu: TComponent; - function GetSite: TcxGridSite; - function GetSynchronization: Boolean; - procedure SetBackgroundBitmaps(Value: TcxCustomGridBackgroundBitmaps); - procedure SetDragMode(Value: TDragMode); - procedure SetFocused(Value: Boolean); - procedure SetIsRestoring(Value: Boolean); - procedure SetSynchronization(Value: Boolean); - procedure SetOnCustomization(Value: TNotifyEvent); - procedure SetOnDblClick(Value: TNotifyEvent); - procedure SetOnDragDrop(Value: TDragDropEvent); - procedure SetOnDragOver(Value: TDragOverEvent); - procedure SetOnEndDrag(Value: TEndDragEvent); - procedure SetOnGetStoredProperties(Value: TcxGridViewGetStoredPropertiesEvent); - procedure SetOnGetStoredPropertyValue(Value: TcxGridViewGetStoredPropertyValueEvent); - procedure SetOnInitStoredObject(Value: TcxGridInitStoredObjectEvent); - procedure SetOnKeyDown(Value: TKeyEvent); - procedure SetOnKeyPress(Value: TKeyPressEvent); - procedure SetOnKeyUp(Value: TKeyEvent); - procedure SetOnMouseDown(Value: TMouseEvent); - procedure SetOnMouseEnter(Value: TNotifyEvent); - procedure SetOnMouseLeave(Value: TNotifyEvent); - procedure SetOnMouseMove(Value: TMouseMoveEvent); - procedure SetOnMouseUp(Value: TMouseEvent); - procedure SetOnMouseWheel(Value: TMouseWheelEvent); - procedure SetOnMouseWheelDown(Value: TMouseWheelUpDownEvent); - procedure SetOnMouseWheelUp(Value: TMouseWheelUpDownEvent); - procedure SetOnSetStoredPropertyValue(Value: TcxGridViewSetStoredPropertyValueEvent); - procedure SetOnStartDrag(Value: TStartDragEvent); - procedure SetOptionsBehavior(Value: TcxCustomGridOptionsBehavior); - procedure SetOptionsData(Value: TcxCustomGridOptionsData); - procedure SetOptionsSelection(Value: TcxCustomGridOptionsSelection); - procedure SetOptionsView(Value: TcxCustomGridOptionsView); - procedure SetPopupMenu(Value: TComponent); - procedure SetStyles(Value: TcxCustomGridStyles); - - procedure ClearListenerLinks; - protected - FDataController: TcxCustomDataController; - FSubClassEvents: TNotifyEvent; - // IcxStoredObject - function GetObjectName: string; virtual; - function GetProperties(AProperties: TStrings): Boolean; virtual; - procedure GetPropertyValue(const AName: string; var AValue: Variant); virtual; - procedure SetPropertyValue(const AName: string; const AValue: Variant); virtual; - // IcxStoredParent - function CreateChild(const AObjectName, AClassName: string): TObject; - function CreateStoredObject(const AObjectName, AClassName: string): TObject; virtual; - procedure DeleteChild(const AObjectName: string; AObject: TObject); virtual; - procedure IcxStoredParent.GetChildren = GetStoredChildren; - procedure GetStoredChildren(AChildren: TStringList); virtual; - // IcxGridViewLayoutEditorSupport - for design-time layout editor - procedure AssignLayout(ALayoutView: TcxCustomGridView); virtual; - procedure BeforeEditLayout(ALayoutView: TcxCustomGridView); virtual; - procedure DoAssignLayout(ALayoutView: TcxCustomGridView); - function GetLayoutCustomizationFormButtonCaption: string; virtual; - function HasLayoutCustomizationForm: Boolean; virtual; - function IsLayoutChangeable: Boolean; virtual; - procedure RunLayoutCustomizationForm; virtual; - - procedure GetFakeComponentLinks(AList: TList); override; - function GetIsDestroying: Boolean; override; - procedure Loaded; override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure SetControl(Value: TcxControl); override; - procedure SetName(const NewName: TComponentName); override; - procedure Updated; override; - procedure Updating; override; - - procedure CreateHandlers; virtual; - procedure DestroyHandlers; virtual; - procedure InitDataController; virtual; - - procedure CreateOptions; virtual; - procedure DestroyOptions; virtual; - - procedure AddOptions(AOptions: TcxCustomGridOptions); - procedure RemoveOptions(AOptions: TcxCustomGridOptions); - procedure NotifyOptions(AComponent: TComponent; AOperation: TOperation); - - procedure AddClone(AClone: TcxCustomGridView); - procedure RemoveClone(AClone: TcxCustomGridView); - - function AddListenerLink: TcxGridListenerLink; - procedure RemoveListenerLink(ALink: TcxGridListenerLink); - - procedure Synchronize(ACheckUpdateLock: Boolean = True); overload; - procedure Synchronize(AView: TcxCustomGridView); overload; - property SynchronizationAssignNeeded: Boolean read FSynchronizationAssignNeeded; - property SynchronizationNeeded: Boolean read FSynchronizationNeeded; - - procedure AssignPattern(APattern: TcxCustomGridView); - procedure BeforeAssign(ASource: TcxCustomGridView); virtual; - procedure DoAssign(ASource: TcxCustomGridView); virtual; - procedure DoAssignSettings(ASource: TcxCustomGridView); virtual; - procedure AfterAssign(ASource: TcxCustomGridView); virtual; - property AssigningPattern: Boolean read FAssigningPattern; - property AssigningSettings: Boolean read FAssigningSettings; - - procedure BeforeRestoring; virtual; - procedure AfterRestoring; virtual; - property IsRestoring: Boolean read FIsRestoring write SetIsRestoring; - - //procedure BeforeLevelChange; virtual; - function CanFocus: Boolean; virtual; - function CanTabStop: Boolean; virtual; - procedure DetailDataChanged(ADetail: TcxCustomGridView); virtual; - procedure DetailVisibleChanged(ADetailLevel: TComponent; - APrevVisibleDetailCount, AVisibleDetailCount: Integer); virtual; - procedure DoChanged(AChangeKind: TcxGridViewChangeKind); virtual; - function GetChangeable: Boolean; virtual; - function GetCustomVisible(ALevelVisible: Boolean): Boolean; virtual; - function GetIsControlFocused: Boolean; virtual; - function GetResizeOnBoundsChange: Boolean; virtual; - function GetVisible: Boolean; virtual; - procedure Init; virtual; - function IsDetailVisible(AGridView: TcxCustomGridView): Boolean; virtual; - procedure FocusChanged(AFocused: Boolean); virtual; - procedure LoadingComplete; virtual; - procedure LookAndFeelChanged; virtual; - procedure NotifyControl(AChangeKind: TcxGridViewChangeNotificationKind); - procedure NotifyControllerAboutChange; - procedure RestoringComplete; virtual; - procedure SetLevel(Value: TComponent); virtual; - procedure SetTabStop(Value: Boolean); virtual; - procedure UpdateControl(AInfo: TcxUpdateControlInfo); virtual; - procedure UpdateUnlocked; virtual; - - function GetControllerClass: TcxCustomGridControllerClass; virtual; abstract; - function GetDataControllerClass: TcxCustomDataControllerClass; virtual; abstract; - function GetPainterClass: TcxCustomGridPainterClass; virtual; abstract; - function GetViewDataClass: TcxCustomGridViewDataClass; virtual; abstract; - function GetViewInfoCacheClass: TcxCustomGridViewInfoCacheClass; virtual; - function GetViewInfoClass: TcxCustomGridViewInfoClass; virtual; abstract; - - function GetBackgroundBitmapsClass: TcxCustomGridBackgroundBitmapsClass; virtual; - function GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; virtual; - function GetOptionsDataClass: TcxCustomGridOptionsDataClass; virtual; - function GetOptionsSelectionClass: TcxCustomGridOptionsSelectionClass; virtual; - function GetOptionsViewClass: TcxCustomGridOptionsViewClass; virtual; - function GetStylesClass: TcxCustomGridViewStylesClass; virtual; - - procedure Initialize; override; - - procedure RefreshCustomizationForm; - - procedure DoCustomization; virtual; - procedure DoInitStoredObject(AObject: TObject); virtual; - - property BackgroundBitmaps: TcxCustomGridBackgroundBitmaps read FBackgroundBitmaps - write SetBackgroundBitmaps; {4} - property Changeable: Boolean read GetChangeable; - property IsStoringNameMode: Boolean read GetIsStoringNameMode; - property IsSynchronizing: Boolean read FIsSynchronizing; - property IsUpdating: Boolean read GetIsUpdating; - property OptionsBehavior: TcxCustomGridOptionsBehavior read FOptionsBehavior - write SetOptionsBehavior; - property OptionsData: TcxCustomGridOptionsData read FOptionsData write SetOptionsData; - property OptionsSelection: TcxCustomGridOptionsSelection read FOptionsSelection - write SetOptionsSelection; - property OptionsView: TcxCustomGridOptionsView read FOptionsView write SetOptionsView; - property ResizeOnBoundsChange: Boolean read GetResizeOnBoundsChange; - property StoredVersion: Integer read FStoredVersion; - property Styles: TcxCustomGridStyles read FStyles write SetStyles; - property OnCustomization: TNotifyEvent read FOnCustomization write SetOnCustomization; - property OnInitStoredObject: TcxGridInitStoredObjectEvent read FOnInitStoredObject write SetOnInitStoredObject; - public - constructor CreateCloned(AControl: TcxControl); virtual; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - procedure AssignSettings(ASource: TcxCustomGridView); - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - function HasAsClone(AGridView: TcxCustomGridView): Boolean; - function HasAsMaster(AGridView: TcxCustomGridView): Boolean; - procedure Invalidate(AHardUpdate: Boolean = False); - procedure RestoreDefaults; virtual; - procedure SetParentComponent(Value: TComponent); override; - - procedure CheckSynchronizationAssignNeeded; - function IsSynchronization: Boolean; - - procedure BeginUpdate; - procedure CancelUpdate; - function Changed(AGridChange: TObject): Boolean; overload; {$IFDEF BCB}virtual;{$ENDIF} - procedure EndUpdate; - function IsUpdateLocked: Boolean; - - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; overload; {$IFDEF BCB}virtual;{$ENDIF} - function GetHitTest(X, Y: Integer): TcxCustomGridHitTest; overload; {$IFDEF BCB}virtual;{$ENDIF} - - procedure BoundsChanged(AUpdateSelfOnly: Boolean = False; AKeepMaster: Boolean = False); virtual; - procedure Changed(AChangeKind: TcxGridViewChangeKind); overload; {$IFDEF BCB}virtual;{$ENDIF} - procedure LayoutChanged(AUpdateSelfOnly: Boolean = True); - function SizeChanged(AUpdateSelfOnly: Boolean = False; AKeepMaster: Boolean = False): Boolean; - procedure ViewChanged; overload; {$IFDEF BCB}virtual;{$ENDIF} - procedure ViewChanged(const AUpdateRect: TRect); overload; {$IFDEF BCB}virtual;{$ENDIF} - procedure ViewChanged(ARegion: TcxRegion); overload; {$IFDEF BCB}virtual;{$ENDIF} - - procedure RestoreFromIniFile(const AStorageName: string; AChildrenCreating: Boolean = True{False}; - AChildrenDeleting: Boolean = False; AOptions: TcxGridStorageOptions = [gsoUseFilter, gsoUseSummary]{[]}; - const ARestoreViewName: string = ''); - procedure RestoreFromRegistry(const AStorageName: string; AChildrenCreating: Boolean = True{False}; - AChildrenDeleting: Boolean = False; AOptions: TcxGridStorageOptions = [gsoUseFilter, gsoUseSummary]{[]}; - const ARestoreViewName: string = ''); - procedure RestoreFromStream(AStream: TStream; AChildrenCreating: Boolean = True{False}; - AChildrenDeleting: Boolean = False; AOptions: TcxGridStorageOptions = [gsoUseFilter, gsoUseSummary]{[]}; - const ARestoreViewName: string = ''); - procedure RestoreFromStorage(const AStorageName: string; AReaderClass: TcxCustomReaderClass; - AChildrenCreating: Boolean = True; AChildrenDeleting: Boolean = False; - AOptions: TcxGridStorageOptions = [gsoUseFilter, gsoUseSummary]; - const ARestoreViewName: string = ''); - - procedure StoreToIniFile(const AStorageName: string; AReCreate: Boolean = True; - AOptions: TcxGridStorageOptions = []; const ASaveViewName: string = ''); - procedure StoreToRegistry(const AStorageName: string; AReCreate: Boolean = True; - AOptions: TcxGridStorageOptions = []; const ASaveViewName: string = ''); - procedure StoreToStream(AStream: TStream; AOptions: TcxGridStorageOptions = []; - const ASaveViewName: string = ''); - procedure StoreToStorage(const AStorageName: string; AWriterClass: TcxCustomWriterClass; - AReCreate: Boolean = True; AOptions: TcxGridStorageOptions = []; const ASaveViewName: string = ''); - - function CreateViewInfo: TcxCustomGridViewInfo; - - property Focused: Boolean read GetFocused write SetFocused; - property StorageOptions: TcxGridStorageOptions read FStorageOptions write FStorageOptions; - property StoringName: string read FStoringName write FStoringName; - property TabStop: Boolean write SetTabStop; - - property CloneCount: Integer read GetCloneCount; - property Clones[Index: Integer]: TcxCustomGridView read GetClone; - property IsControlFocused: Boolean read GetIsControlFocusedValue; - property IsDetail: Boolean read GetIsDetail; - property IsMaster: Boolean read GetIsMaster; - property IsPattern: Boolean read GetIsPattern; - property Level: TComponent read FLevel; // TcxGridLevel - property MasterGridView: TcxCustomGridView read GetMasterGridView; - property MasterGridRecordIndex: Integer read GetMasterGridRecordIndex; - property MasterRecordIndex: Integer read GetMasterRecordIndex; - property PatternGridView: TcxCustomGridView read GetPatternGridView; - property Repository: TComponent read FRepository write FRepository; {5} - - property Controller: TcxCustomGridController read FController; - property DataController: TcxCustomDataController read FDataController; - property LookAndFeel: TcxLookAndFeel read GetLookAndFeel; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property Painter: TcxCustomGridPainter read FPainter; - property Site: TcxGridSite read GetSite; - property StorageControl: TcxControl read FStorageControl; - property ViewData: TcxCustomGridViewData read FViewData; - property ViewInfo: TcxCustomGridViewInfo read FViewInfo; - property ViewInfoCache: TcxCustomGridViewInfoCache read FViewInfoCache; - property Visible: Boolean read GetVisible; - published - property DataControllerEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property DragMode: TDragMode read GetDragMode write SetDragMode default dmManual; - property PopupMenu: TComponent read GetPopupMenu write SetPopupMenu; - property StylesEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property Synchronization: Boolean read GetSynchronization write SetSynchronization default True{False}; - - property OnDblClick: TNotifyEvent read GetOnDblClick write SetOnDblClick; - property OnDragDrop: TDragDropEvent read GetOnDragDrop write SetOnDragDrop; - property OnDragOver: TDragOverEvent read GetOnDragOver write SetOnDragOver; - property OnEndDrag: TEndDragEvent read GetOnEndDrag write SetOnEndDrag; - property OnKeyDown: TKeyEvent read GetOnKeyDown write SetOnKeyDown; - property OnKeyPress: TKeyPressEvent read GetOnKeyPress write SetOnKeyPress; - property OnKeyUp: TKeyEvent read GetOnKeyUp write SetOnKeyUp; - property OnMouseDown: TMouseEvent read GetOnMouseDown write SetOnMouseDown; - property OnMouseEnter: TNotifyEvent read GetOnMouseEnter write SetOnMouseEnter; - property OnMouseLeave: TNotifyEvent read GetOnMouseLeave write SetOnMouseLeave; - property OnMouseMove: TMouseMoveEvent read GetOnMouseMove write SetOnMouseMove; - property OnMouseUp: TMouseEvent read GetOnMouseUp write SetOnMouseUp; - property OnMouseWheel: TMouseWheelEvent read GetOnMouseWheel write SetOnMouseWheel; - property OnMouseWheelDown: TMouseWheelUpDownEvent read GetOnMouseWheelDown write SetOnMouseWheelDown; - property OnMouseWheelUp: TMouseWheelUpDownEvent read GetOnMouseWheelUp write SetOnMouseWheelUp; - property OnStartDrag: TStartDragEvent read GetOnStartDrag write SetOnStartDrag; - - property OnGetStoredProperties: TcxGridViewGetStoredPropertiesEvent - read FOnGetStoredProperties write SetOnGetStoredProperties; - property OnGetStoredPropertyValue: TcxGridViewGetStoredPropertyValueEvent - read FOnGetStoredPropertyValue write SetOnGetStoredPropertyValue; - property OnSetStoredPropertyValue: TcxGridViewSetStoredPropertyValueEvent - read FOnSetStoredPropertyValue write SetOnSetStoredPropertyValue; - end; - - { TcxCustomGridViewAccess } - - TcxCustomGridViewAccess = class - class procedure AddClone(AInstance: TcxCustomGridView; AClone: TcxCustomGridView); - class procedure AssignPattern(AInstance: TcxCustomGridView; APattern: TcxCustomGridView); - class function CanFocus(AInstance: TcxCustomGridView): Boolean; - class procedure DetailVisibleChanged(AInstance: TcxCustomGridView; - ADetailLevel: TComponent; APrevVisibleDetailCount, AVisibleDetailCount: Integer); - class procedure FocusChanged(AInstance: TcxCustomGridView; AFocused: Boolean); - class procedure LookAndFeelChanged(AInstance: TcxCustomGridView); - class procedure SetLevel(AInstance: TcxCustomGridView; Value: TComponent); - - class function GetChangeable(AInstance: TcxCustomGridView): Boolean; - class function GetStyles(AInstance: TcxCustomGridView): TcxCustomGridStyles; - end; - -function GetGridViewDataController(AView: TcxCustomGridView): TcxCustomDataController; -function GetParentGridView(AControl: TControl): TcxCustomGridView; - -var - cxGridRegisteredViews: TcxRegisteredClasses; - -implementation - -uses - SysUtils, Math, ImgList, cxGeometry, cxScrollBar, cxVariants, cxLibraryConsts, - cxGrid, cxGridLevel, cxGridStrs; - -const - CheckOffset = 2; - - DesignSelectorWidth = 20; - DesignSelectorHeight = 20; - -type - TCustomFormAccess = class(TCustomForm); - TcxControlAccess = class(TcxControl); - TcxCustomGridAccess = class(TcxCustomGrid); - TcxGridViewRepositoryAccess = class(TcxGridViewRepository); - -{ TGridHitTests } - -type - TGridHitTests = class - private - FItems: TList; - function GetCount: Integer; - function GetInstance(AClass: TcxCustomGridHitTestClass): TcxCustomGridHitTest; - function GetItem(Index: Integer): TcxCustomGridHitTest; - protected - function GetObjectByClass(AClass: TcxCustomGridHitTestClass): TcxCustomGridHitTest; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxCustomGridHitTest read GetItem; - public - constructor Create; - destructor Destroy; override; - property Instances[AClass: TcxCustomGridHitTestClass]: TcxCustomGridHitTest read GetInstance; default; - end; - -var - GridHitTests: TGridHitTests; - -constructor TGridHitTests.Create; -begin - inherited; - FItems := TList.Create; -end; - -destructor TGridHitTests.Destroy; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Free; - FItems.Free; - inherited; -end; - -function TGridHitTests.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TGridHitTests.GetInstance(AClass: TcxCustomGridHitTestClass): TcxCustomGridHitTest; -begin - Result := GetObjectByClass(AClass); - if Result = nil then - begin - Result := AClass.Create; - FItems.Add(Result); - end; -end; - -function TGridHitTests.GetItem(Index: Integer): TcxCustomGridHitTest; -begin - Result := TcxCustomGridHitTest(FItems[Index]); -end; - -function TGridHitTests.GetObjectByClass(AClass: TcxCustomGridHitTestClass): TcxCustomGridHitTest; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.ClassType = AClass then Exit; - end; - Result := nil; -end; - -{ TcxCustomGridViewChange } - -constructor TcxCustomGridViewChange.Create(AGridView: TcxCustomGridView); -begin - inherited Create; - FGridView := AGridView; -end; - -function TcxCustomGridViewChange.IsEqual(AChange: TcxCustomGridChange): Boolean; -begin - Result := inherited IsEqual(AChange) and - (FGridView = TcxCustomGridViewChange(AChange).GridView); -end; - -{ TcxGridControlFocusChange } - -procedure TcxGridControlFocusChange.Execute; -begin - if GridView.Changeable then - GridView.Controller.ControlFocusChanged; -end; - -{ TcxCustomGridHitTest } - -destructor TcxCustomGridHitTest.Destroy; -begin - ViewInfo := nil; - inherited; -end; - -procedure TcxCustomGridHitTest.SetViewInfo(Value: TcxCustomGridCellViewInfo); -var - APrevViewInfo: TcxCustomGridCellViewInfo; -begin - if FViewInfo <> Value then - begin - APrevViewInfo := FViewInfo; - FViewInfo := Value; - if (APrevViewInfo <> nil) and (APrevViewInfo.LinkedHitTest = Self) then - APrevViewInfo.LinkedHitTest := nil; - if FViewInfo <> nil then - FViewInfo.LinkedHitTest := Self; - end; -end; - -class function TcxCustomGridHitTest.GetHitTestCode: Integer; -begin - Result := htError; -end; - -procedure TcxCustomGridHitTest.Init(const APos: TPoint); -begin - FPos := APos; -end; - -function TcxCustomGridHitTest.Cursor: TCursor; -begin - Result := crDefault; -end; - -function TcxCustomGridHitTest.DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; -begin - Result := nil; -end; - -class function TcxCustomGridHitTest.HitTestCode: Integer; -begin - Result := GetHitTestCode; -end; - -class function TcxCustomGridHitTest.Instance(const APos: TPoint): TcxCustomGridHitTest; -begin - Result := GridHitTests.Instances[Self]; - Result.Init(APos); -end; - -{ TcxGridHitTestNone } - -class function TcxGridNoneHitTest.GetHitTestCode: Integer; -begin - Result := htNone; -end; - -{ TcxGridViewNoneHitTest } - -class function TcxGridViewNoneHitTest.GetHitTestCode: Integer; -begin - Result := htNone; -end; - -{ TcxGridNavigatorHitTest } - -class function TcxGridNavigatorHitTest.GetHitTestCode: Integer; -begin - Result := htNavigator; -end; - -{ TcxGridCustomizationFormHitTest } - -class function TcxGridCustomizationFormHitTest.GetHitTestCode: Integer; -begin - Result := htCustomizationForm; -end; - -{ TcxGridDesignSelectorHitTest } - -class function TcxGridDesignSelectorHitTest.GetHitTestCode: Integer; -begin - Result := htDesignSelector; -end; - -function TcxGridDesignSelectorHitTest.Cursor: TCursor; -begin - Result := crcxHandPoint; -end; - -{ TcxGridViewHandler } - -constructor TcxGridViewHandler.Create(AGridView: TcxCustomGridView); -begin - inherited Create(nil); - FGridView := AGridView; -end; - -function TcxGridViewHandler.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := FGridView.LookAndFeelPainter; -end; - -function TcxGridViewHandler.GetControl: TcxControl; -begin - Result := FGridView.Control; -end; - -function TcxGridViewHandler.GetController: TcxCustomGridController; -begin - Result := FGridView.Controller; -end; - -function TcxGridViewHandler.GetDataController: TcxCustomDataController; -begin - Result := FGridView.DataController; -end; - -function TcxGridViewHandler.GetPainter: TcxCustomGridPainter; -begin - Result := FGridView.Painter; -end; - -function TcxGridViewHandler.GetSite: TcxGridSite; -begin - Result := FGridView.Site; -end; - -function TcxGridViewHandler.GetViewData: TcxCustomGridViewData; -begin - Result := FGridView.ViewData; -end; - -function TcxGridViewHandler.GetViewInfo: TcxCustomGridViewInfo; -begin - Result := FGridView.ViewInfo; -end; - -procedure TcxGridViewHandler.BeginUpdate; -begin - FGridView.BeginUpdate; -end; - -procedure TcxGridViewHandler.EndUpdate; -begin - FGridView.EndUpdate; -end; - -{ TcxCustomGridDragAndDropObject } - -function TcxCustomGridDragAndDropObject.GetController: TcxCustomGridController; -begin - Result := GridView.Controller; -end; - -function TcxCustomGridDragAndDropObject.GetGridView: TcxCustomGridView; -begin - Result := TcxGridSite(Control).GridView; -end; - -function TcxCustomGridDragAndDropObject.GetViewInfo: TcxCustomGridViewInfo; -begin - Result := GridView.ViewInfo; -end; - -procedure TcxCustomGridDragAndDropObject.AfterDragAndDrop(Accepted: Boolean); -begin - inherited; - if Accepted then Controller.DesignerModified; -end; - -procedure TcxCustomGridDragAndDropObject.AfterPaint; -begin - AfterViewChange; -end; - -procedure TcxCustomGridDragAndDropObject.BeforePaint; -begin - BeforeViewChange; -end; - -procedure TcxCustomGridDragAndDropObject.AfterScrolling; -begin -end; - -procedure TcxCustomGridDragAndDropObject.BeforeScrolling; -begin -end; - -procedure TcxCustomGridDragAndDropObject.AfterViewChange; -begin -end; - -procedure TcxCustomGridDragAndDropObject.BeforeViewChange; -begin -end; - -procedure TcxCustomGridDragAndDropObject.Init(const P: TPoint; AParams: TcxCustomGridHitTest); -begin - SourcePoint := P; -end; - -{ TcxCustomGridMovingObject } - -function TcxCustomGridMovingObject.GetArrowPlace(AArrowNumber: TcxGridArrowNumber): TcxGridArrowPlace; -begin - if AreArrowsVertical then - if AArrowNumber = anFirst then - Result := apTop - else - Result := apBottom - else - if AArrowNumber = anFirst then - Result := apLeft - else - Result := apRight; -end; - -function TcxCustomGridMovingObject.GetCustomizationForm: TcxCustomGridCustomizationForm; -begin - Result := Controller.CustomizationForm; -end; - -procedure TcxCustomGridMovingObject.DirtyChanged; -begin - inherited; - ChangeArrowsPosition(not Dirty); - ChangeDragImagePosition(not Dirty); -end; - -function TcxCustomGridMovingObject.GetDragAndDropCursor(Accepted: Boolean): TCursor; -begin - if Accepted then - Result := crArrow - else - if CanRemove then - Result := crcxGridRemove - else - Result := crcxGridNoDrop; -end; - -procedure TcxCustomGridMovingObject.ChangeArrowsPosition(AVisible: Boolean = True); -var - AArrowNumber: TcxGridArrowNumber; -begin - if AVisible and not IsValidDestination then - AVisible := False; - for AArrowNumber := Low(Arrows) to High(Arrows) do - begin - if AVisible then - Arrows[AArrowNumber].Init(GridView.Site, GetArrowAreaBounds(ArrowPlaces[AArrowNumber]), - ArrowsClientRect, ArrowPlaces[AArrowNumber]); - Arrows[AArrowNumber].Visible := AVisible; - end; -end; - -procedure TcxCustomGridMovingObject.ChangeDragImagePosition(AVisible: Boolean = True); -begin - if AVisible then - DragImage.MoveTo(Control.ClientToScreen(CurMousePos)); - DragImage.Visible := AVisible; -end; - -function TcxCustomGridMovingObject.AreArrowsVertical: Boolean; -begin - Result := True; -end; - -function TcxCustomGridMovingObject.GetArrowClass: TcxDragAndDropArrowClass; -begin - Result := TcxDragAndDropArrow; -end; - -function TcxCustomGridMovingObject.GetArrowsClientRect: TRect; -begin - Result := ViewInfo.Bounds; -end; - -function TcxCustomGridMovingObject.GetDragImageClass: TcxDragImageClass; -begin - Result := TcxDragImage; -end; - -function TcxCustomGridMovingObject.GetSourceItemBounds: TRect; -begin - if SourceItemViewInfo <> nil then - Result := SourceItemViewInfo.Bounds - else - if IsSourceCustomizationForm and (CustomizationFormListBox <> nil) then - with CustomizationFormListBox do - begin - Result := ItemRect(IndexOfItem(SourceItem)); - MapWindowRect(Handle, Control.Handle, Result); - end - else - Result := Rect(0, 0, 0, 0); -end; - -function TcxCustomGridMovingObject.GetSourceItemViewInfo: TcxCustomGridCellViewInfo; -begin - Result := nil; -end; - -procedure TcxCustomGridMovingObject.InitDragImage; - - procedure InitUsingSourceItemViewInfo; - var - AViewInfo: TcxCustomGridCellViewInfo; - begin - AViewInfo := SourceItemViewInfo; - with AViewInfo.Bounds.TopLeft do - SetViewportOrgEx(DragImage.Canvas.Handle, -X, -Y, nil); - AViewInfo.Paint(DragImage.Canvas); - end; - - procedure InitFromCustomizationForm; - var - R: TRect; - begin - R := SourceItemBounds; - with R do - OffsetRect(R, -Left, -Top); - InitDragImageUsingCustomizationForm(DragImage.Canvas, R, SourceItem); - end; - -begin - DragImage.Init(SourceItemBounds, SourcePoint); - if SourceItemViewInfo <> nil then - InitUsingSourceItemViewInfo - else - if IsSourceCustomizationForm then - InitFromCustomizationForm; -end; - -procedure TcxCustomGridMovingObject.InitDragImageUsingCustomizationForm(ACanvas: TcxCanvas; - const R: TRect; AItem: TObject); -begin - if CustomizationFormListBox <> nil then - CustomizationFormListBox.PaintDragAndDropItem(ACanvas, R, AItem); -end; - -procedure TcxCustomGridMovingObject.BeginDragAndDrop; -var - AArrowNumber: TcxGridArrowNumber; -begin - FDragImage := GetDragImageClass.Create; - InitDragImage; - for AArrowNumber := Low(Arrows) to High(Arrows) do - Arrows[AArrowNumber] := GetArrowClass.Create(DragImage.AlphaBlended); - GridView.Control.UpdateWithChildren; - inherited; -end; - -procedure TcxCustomGridMovingObject.DragAndDrop(const P: TPoint; var Accepted: Boolean); -begin - inherited; - ChangeDragImagePosition; -end; - -procedure TcxCustomGridMovingObject.EndDragAndDrop(Accepted: Boolean); -var - AArrowNumber: TcxGridArrowNumber; -begin - inherited; - for AArrowNumber := Low(Arrows) to High(Arrows) do - FreeAndNil(Arrows[AArrowNumber]); - FreeAndNil(FDragImage); -end; - -procedure TcxCustomGridMovingObject.AfterScrolling; -begin - ChangeArrowsPosition; - inherited; -end; - -{ TcxCustomGridItemsInnerListBox } - -constructor TcxCustomGridItemsInnerListBox.Create(AOwner: TComponent); -begin - inherited; - Sorted := True; - Style := lbOwnerDrawFixed; - CalculateBorderStyle; - FDragAndDropItemIndex := -1; -end; - -function TcxCustomGridItemsInnerListBox.GetContainer: TcxCustomGridItemsListBox; -begin - Result := TcxCustomGridItemsListBox(inherited Container); -end; - -function TcxCustomGridItemsInnerListBox.GetDragAndDropItem: TObject; -begin - Result := Items.Objects[FDragAndDropItemIndex]; -end; - -function TcxCustomGridItemsInnerListBox.GetGridView: TcxCustomGridView; -begin - Result := Container.GridView; -end; - -function TcxCustomGridItemsInnerListBox.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := LookAndFeel.Painter; -end; - -procedure TcxCustomGridItemsInnerListBox.WMCancelMode(var Message: TWMCancelMode); -begin - inherited; - FDragAndDropItemIndex := -1; -end; - -procedure TcxCustomGridItemsInnerListBox.WMNCCalcSize(var Message: TWMNCCalcSize); -begin - inherited; - if BorderStyle = bsNone then - InflateRect(Message.CalcSize_Params^.rgrc[0], -1, -1); -end; - -procedure TcxCustomGridItemsInnerListBox.WMNCPaint(var Message: TWMNCPaint); -var - R: TRect; - DC: HDC; -begin - inherited; - if BorderStyle = bsNone then - begin - R := cxGetWindowRect(Handle); - OffsetRect(R, -R.Left, -R.Top); - DC := GetWindowDC(Handle); - DrawEdge(DC, R, BDR_SUNKENOUTER, BF_RECT); - ReleaseDC(Handle, DC); - end; -end; - -procedure TcxCustomGridItemsInnerListBox.CreateParams(var Params: TCreateParams); -begin - inherited; - with Params do - WindowClass.Style := WindowClass.Style or CS_HREDRAW; -end; - -procedure TcxCustomGridItemsInnerListBox.CreateWnd; -begin - inherited; - CalculateItemHeight; -end; - -procedure TcxCustomGridItemsInnerListBox.DrawItem(Index: Integer; Rect: TRect; - State: TOwnerDrawState); -begin - Container.PaintItem(Canvas, Rect, Index, odFocused in State); - if odFocused in State then Canvas.DrawFocusRect(Rect); -end; - -procedure TcxCustomGridItemsInnerListBox.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited; - if Key = VK_ESCAPE then - GridView.Site.FinishDragAndDrop(False); -end; - -procedure TcxCustomGridItemsInnerListBox.LookAndFeelChanged(Sender: TcxLookAndFeel; - AChangedValues: TcxLookAndFeelValues); -begin - CalculateBorderStyle; - CalculateItemHeight; - inherited; -end; - -procedure TcxCustomGridItemsInnerListBox.MouseDown(Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -var - AItemIndex: Integer; -begin - inherited; - if Button = mbLeft then - begin - AItemIndex := ItemAtPos(Point(X, Y), True); - if AItemIndex <> -1 then - begin - FDragAndDropItemIndex := AItemIndex; - FMouseDownPos := Point(X, Y); - end; - end; -end; - -procedure TcxCustomGridItemsInnerListBox.MouseMove(Shift: TShiftState; X, Y: Integer); -var - AParams: TcxCustomGridHitTest; - P: TPoint; -begin - inherited; - if (FDragAndDropItemIndex <> -1) and - (not IsPointInDragDetectArea(FMouseDownPos, X, Y) or - (ItemAtPos(Point(X, Y), False) <> FDragAndDropItemIndex)) then - begin - ItemIndex := FDragAndDropItemIndex; - AParams := Container.GetDragAndDropParams; - with GridView do - begin - P := FMouseDownPos; - P := Site.ScreenToClient(ClientToScreen(P)); - Controller.DragAndDropObjectClass := AParams.DragAndDropObjectClass; - Controller.DragAndDropObject.Init(P, AParams); - Site.BeginDragAndDrop; - end; - FDragAndDropItemIndex := -1; - end; -end; - -procedure TcxCustomGridItemsInnerListBox.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited; - FDragAndDropItemIndex := -1; -end; - -procedure TcxCustomGridItemsInnerListBox.CalculateBorderStyle; -begin - if LookAndFeelPainter.HeaderBorderSize <= 1 then - BorderStyle := bsNone - else - BorderStyle := bsSingle; -end; - -procedure TcxCustomGridItemsInnerListBox.CalculateItemHeight; -begin - if HandleAllocated then - ItemHeight := Container.CalculateItemHeight; -end; - -{ TcxCustomGridItemsListBox } - -constructor TcxCustomGridItemsListBox.Create(AOwner: TComponent); -begin - inherited; - with Style do - begin - BorderStyle := cbsNone; - HotTrack := False; - LookAndFeel.MasterLookAndFeel := GridView.LookAndFeel; - TransparentBorder := False; - end; - StyleFocused.BorderStyle := cbsNone; - StyleHot.BorderStyle := cbsNone; - ParentFont := True; -end; - -function TcxCustomGridItemsListBox.GetDragAndDropItem: TObject; -begin - Result := InnerListBox.DragAndDropItem; -end; - -function TcxCustomGridItemsListBox.GetGridView: TcxCustomGridView; -begin - Result := (Owner as TcxCustomGridCustomizationForm).GridView; -end; - -function TcxCustomGridItemsListBox.GetInnerListBox: TcxCustomGridItemsInnerListBox; -begin - Result := TcxCustomGridItemsInnerListBox(inherited InnerListBox); -end; - -function TcxCustomGridItemsListBox.GetInnerListBoxClass: TcxInnerListBoxClass; -begin - Result := TcxCustomGridItemsInnerListBox; -end; - -function TcxCustomGridItemsListBox.IndexOfItem(AItem: TObject): Integer; -begin - Result := Items.IndexOfObject(AItem); -end; - -procedure TcxCustomGridItemsListBox.PaintDragAndDropItem(ACanvas: TcxCanvas; - const R: TRect; AItem: TObject); -begin - ACanvas.Brush.Color := Color; - ACanvas.Font := Font; - PaintItem(ACanvas, R, IndexOfItem(AItem), False); -end; - -procedure TcxCustomGridItemsListBox.RefreshItems; -var - ATopIndex, AItemIndex: Integer; -begin - InnerListBox.CalculateItemHeight; - - ATopIndex := TopIndex; - AItemIndex := ItemIndex; - Items.BeginUpdate; - try - DoRefreshItems; - TopIndex := ATopIndex; - ItemIndex := Min(AItemIndex, Items.Count - 1); - finally - Items.EndUpdate; - end; -end; - -{ TcxCustomGridCustomizationForm } - -// TODO: system menu - -constructor TcxCustomGridCustomizationForm.Create(AController: TcxCustomGridController); -begin - inherited CreateNew(nil); - FController := AController; - Caption := cxGetResourceString(@scxGridCustomizationFormCaption); - BorderStyle := bsSizeToolWin; - Font := TcxControlAccess(Controller.Control).Font; - CalculateConsts; - CreateControls; -end; - -destructor TcxCustomGridCustomizationForm.Destroy; -begin - FHookTimer.Free; - FController.Customization := False; - inherited; -end; - -function TcxCustomGridCustomizationForm.GetGridView: TcxCustomGridView; -begin - Result := FController.GridView; -end; - -function TcxCustomGridCustomizationForm.GetViewInfo: TcxCustomGridViewInfo; -begin - Result := FController.ViewInfo; -end; - -procedure TcxCustomGridCustomizationForm.HookTimerHandler(Sender: TObject); -begin - if IsIconic(Application.Handle) then - Visible := False - else - if not GridView.Visible or not IsWindowVisible(FController.Site.Handle) then - FController.Customization := False - else - if not Visible then - begin - ShowWindow(Handle, SW_SHOWNOACTIVATE); - Visible := True; - end; -end; - -procedure TcxCustomGridCustomizationForm.CreateParams(var Params: TCreateParams); -begin - inherited; - with Params do - begin - Style := Style or WS_POPUP; - WndParent := FController.Site.Handle; - end; -end; - -procedure TcxCustomGridCustomizationForm.DoClose(var Action: TCloseAction); -begin - FreeAndNil(FHookTimer); - Action := caFree; -end; - -procedure TcxCustomGridCustomizationForm.DoShow; -begin - if FHookTimer = nil then - begin - FHookTimer := TcxTimer.Create(nil); - with FHookTimer do - begin - Interval := 100; - OnTimer := HookTimerHandler; - end; - end; - inherited; -end; - -procedure TcxCustomGridCustomizationForm.CalculateConsts; -begin - FOffset := Canvas.TextHeight('Qq') div 6; -end; - -procedure TcxCustomGridCustomizationForm.CreateControls; -begin - FPageControl := TcxPageControl.Create(Self); - with FPageControl do - begin - Anchors := [akTop, akLeft, akRight, akBottom]; - BoundsRect := GetPageControlBounds; - Focusable := False; - HotTrack := True; - LookAndFeel.MasterLookAndFeel := GridView.LookAndFeel; - Parent := Self; - InitPageControl; - end; -end; - -function TcxCustomGridCustomizationForm.CreatePage(const ACaption: string; - AVisible: Boolean): TcxTabSheet; -begin - Result := TcxTabSheet.Create(FPageControl); - with Result do - begin - Caption := ACaption; - TabVisible := AVisible; - PageControl := FPageControl; - end; -end; - -procedure TcxCustomGridCustomizationForm.GridViewChanged; -begin -end; - -function TcxCustomGridCustomizationForm.GetContentBounds: TRect; -begin - Result := ClientRect; - InflateRect(Result, -Offset, -Offset); -end; - -function TcxCustomGridCustomizationForm.GetPageControlBounds: TRect; -begin - Result := ContentBounds; -end; - -procedure TcxCustomGridCustomizationForm.InitPageControl; -begin -end; - -procedure TcxCustomGridCustomizationForm.ActivatePage(APage: TcxTabSheet); -begin - if APage.TabVisible then - FPageControl.ActivePage := APage; -end; - -procedure TcxCustomGridCustomizationForm.RefreshData; -begin -end; - -{ TcxCustomGridPopup } - -constructor TcxCustomGridPopup.Create(AGridView: TcxCustomGridView); -begin - inherited Create(AGridView.Site); - FGridView := AGridView; - Color := clWindow; - IsTopMost := True; - OwnerParent := FGridView.Site; -end; - -procedure TcxCustomGridPopup.SetOwner(Value: IcxCustomGridPopupOwner); -begin - if FOwner <> Value then - begin - if (Value = nil) and Visible and FOwner.ClosePopupWhenNilOwner then - CloseUp; - FOwner := Value; - end; -end; - -function TcxCustomGridPopup.CalculateOwnerBounds: TRect; -begin - Result := FOwner.GetOwnerBounds; -end; - -function TcxCustomGridPopup.GetClientMinWidth: Integer; -begin - with Owner.GetOwnerBounds do - Result := Right - Left - NCWidth; -end; - -procedure TcxCustomGridPopup.InitPopup; -begin - inherited; - BorderStyle := GridView.LookAndFeelPainter.PopupBorderStyle; - Font := TcxControlAccess(FGridView.Control).Font; - OwnerBounds := CalculateOwnerBounds; -end; - -procedure TcxCustomGridPopup.Paint; -begin - DrawFrame; - Canvas.Brush.Color := Color; - Canvas.FillRect(ClientBounds); -end; - -procedure TcxCustomGridPopup.VisibleChanged; -begin - inherited; - if not Visible and (FOwner <> nil) then - begin - FOwner.PopupClosed; - end; -end; - -procedure TcxCustomGridPopup.CloseUp; -begin - inherited; - //TcxControlAccess(FGridView.Site).FocusChanged; -end; - -procedure TcxCustomGridPopup.Popup; -begin - SetCaptureControl(nil); - inherited Popup(FindNextControl(nil, True, True, False)); -end; - -{ TcxGridPopupListBox } - -constructor TcxGridPopupListBox.Create(APopup: TcxCustomGridPopup); -begin - inherited Create(APopup); - FItemTextOffsetLeft := cxGridCellTextOffset; - FItemTextOffsetRight := cxGridCellTextOffset; - FCheckedIndexes := TList.Create; - FPopup := APopup; - FPressedItemIndex := -1; - Init; - Parent := FPopup; -end; - -destructor TcxGridPopupListBox.Destroy; -begin - FCheckedIndexes.Free; - inherited; -end; - -function TcxGridPopupListBox.GetChecked(Index: Integer): Boolean; -begin - Result := FCheckedIndexes.IndexOf(TObject(Index)) <> -1; -end; - -function TcxGridPopupListBox.GetCheckedIndexes: TcxGridIndexes; -var - I: Integer; -begin - SetLength(Result, FCheckedIndexes.Count); - for I := 0 to FCheckedIndexes.Count - 1 do - Result[I] := Integer(FCheckedIndexes[I]); -end; - -function TcxGridPopupListBox.GetGridView: TcxCustomGridView; -begin - Result := FPopup.GridView; -end; - -procedure TcxGridPopupListBox.SetChecked(Index: Integer; Value: Boolean); -var - AChanged: Boolean; - I: Integer; -begin - AChanged := False; - I := FCheckedIndexes.IndexOf(TObject(Index)); - if Value then - if I = -1 then - begin - FCheckedIndexes.Add(TObject(Index)); - AChanged := True; - end - else - else - if I <> -1 then - begin - FCheckedIndexes.Delete(I); - AChanged := True; - end; - if AChanged then InvalidateItem(Index); -end; - -procedure TcxGridPopupListBox.SetCheckedIndexes(const Value: TcxGridIndexes); -var - I: Integer; -begin - FCheckedIndexes.Count := Length(Value); - for I := 0 to Length(Value) - 1 do - FCheckedIndexes[I] := TObject(Value[I]); -end; - -procedure TcxGridPopupListBox.SetPressedItemIndex(Value: Integer); -begin - if FPressedItemIndex <> Value then - begin - if FPressedItemIndex <> -1 then - InvalidateItem(FPressedItemIndex); - FPressedItemIndex := Value; - if FPressedItemIndex <> -1 then - InvalidateItem(FPressedItemIndex); - end; -end; - -procedure TcxGridPopupListBox.SetShowChecks(Value: Boolean); -begin - if FShowChecks <> Value then - begin - FShowChecks := Value; - FCheckedIndexes.Clear; - end; -end; - -function TcxGridPopupListBox.DrawItem(ACanvas: TcxCanvas; AIndex: Integer; - const ARect: TRect; AState: TOwnerDrawState): Boolean; -var - AContentRect, ACheckAreaRect: TRect; -begin - AContentRect := ARect; - if CanHaveCheck(AIndex) then - begin - Inc(AContentRect.Left, GetCheckAreaWidth); - ACheckAreaRect := ARect; - ACheckAreaRect.Right := AContentRect.Left; - if HasCheck(AIndex) and Checked[AIndex] then - begin - ACanvas.Brush.Color := LookAndFeelPainter.DefaultSelectionColor; - ACanvas.Font.Color := LookAndFeelPainter.DefaultSelectionTextColor; - end; - end; - DrawItemContent(ACanvas, AIndex, AContentRect, AState); - if IsCheck(AIndex) then - DrawItemCheck(ACanvas, AIndex, ACheckAreaRect, AState); - if odFocused in AState then ACanvas.DrawFocusRect(ARect); - Result := True; -end; - -procedure TcxGridPopupListBox.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited; - case Key of - VK_RETURN, VK_SPACE: - DoAction(ItemIndex); - VK_ESCAPE: - FPopup.CloseUp; - end; -end; - -procedure TcxGridPopupListBox.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - PressedItemIndex := ItemAtPos(Point(X, Y), True); - inherited; -end; - -procedure TcxGridPopupListBox.MouseLeave(AControl: TControl); -begin - inherited; - ItemIndex := -1; - PressedItemIndex := -1; -end; - -procedure TcxGridPopupListBox.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - ItemIndex := ItemAtPos(Point(X, Y), True); - if PressedItemIndex <> ItemIndex then - PressedItemIndex := -1; - inherited; -end; - -procedure TcxGridPopupListBox.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - AItemIndex: Integer; -begin - inherited; - AItemIndex := ItemAtPos(Point(X, Y), True); - if not IsCheck(AItemIndex) or (AItemIndex = PressedItemIndex) then - DoAction(AItemIndex); - PressedItemIndex := -1; -end; - -function TcxGridPopupListBox.GetVisibleItemCount(AItems: TStrings): Integer; -begin - Result := FVisibleItemCount; - if (Result = 0) or (Result > AItems.Count) then - Result := AItems.Count; -end; - -function TcxGridPopupListBox.CalculateItemHeight: Integer; -begin - Result := Canvas.TextHeight('Qq') + 2 * FItemTextOffsetVert; - if ShowChecks then - Result := Max(Result, GetCheckAreaHeight); -end; - -procedure TcxGridPopupListBox.DoAction(AItemIndex: Integer); -begin - if AItemIndex = -1 then Exit; - if IsCheck(AItemIndex) then - ChangeChecked(AItemIndex) - else - FPopup.CloseUp; - if Assigned(FOnAction) then FOnAction(Self, AItemIndex); -end; - -procedure TcxGridPopupListBox.DrawItemCheck(ACanvas: TcxCanvas; AIndex: Integer; - const ACheckAreaRect: TRect; AState: TOwnerDrawState); -var - R: TRect; - ACheckState: TcxButtonState; -begin - R := cxRectCenter(ACheckAreaRect, LookAndFeelPainter.CheckButtonSize); - if (odFocused in AState) and (odSelected in AState) then - if AIndex = PressedItemIndex then - ACheckState := cxbsPressed - else - ACheckState := cxbsHot - else - ACheckState := cxbsNormal; - ACanvas.FillRect(ACheckAreaRect, GetBackgroundColor); - LookAndFeelPainter.DrawCheckButton(ACanvas, R, ACheckState, Checked[AIndex]); -end; - -procedure TcxGridPopupListBox.DrawItemContent(ACanvas: TcxCanvas; AIndex: Integer; - ARect: TRect; AState: TOwnerDrawState); -begin - with ACanvas do - begin - FillRect(ARect); - Inc(ARect.Left, FItemTextOffsetLeft); - DrawText(Items[AIndex], ARect, cxSingleLine or cxAlignLeft or cxAlignVCenter); - end; -end; - -procedure TcxGridPopupListBox.Init; -begin - Style.LookAndFeel.MasterLookAndFeel := GridView.LookAndFeel; - ListStyle := lbOwnerDrawFixed; - with Style do - begin - BorderStyle := cbsNone; - HotTrack := False; - TransparentBorder := False; - end; - StyleFocused.BorderStyle := cbsNone; - StyleHot.BorderStyle := cbsNone; - ParentFont := True; -end; - -procedure TcxGridPopupListBox.InvalidateItem(AIndex: Integer); -var - R: TRect; -begin - R := InnerListBox.ItemRect(AIndex); - Windows.InvalidateRect(InnerListBox.Handle, @R, False); -end; - -function TcxGridPopupListBox.CanHaveCheck(AItemIndex: Integer): Boolean; -begin - Result := ShowChecks; -end; - -procedure TcxGridPopupListBox.ChangeChecked(AItemIndex: Integer); -begin - Checked[AItemIndex] := not Checked[AItemIndex]; -end; - -function TcxGridPopupListBox.GetCheckAreaHeight: Integer; -begin - Result := 2 * CheckOffset + LookAndFeelPainter.CheckButtonSize.cy; -end; - -function TcxGridPopupListBox.GetCheckAreaWidth: Integer; -begin - Result := 2 * CheckOffset + LookAndFeelPainter.CheckButtonSize.cx; -end; - -function TcxGridPopupListBox.HasCheck(AItemIndex: Integer): Boolean; -begin - Result := False; -end; - -function TcxGridPopupListBox.IsCheck(AItemIndex: Integer): Boolean; -begin - Result := (AItemIndex <> -1) and CanHaveCheck(AItemIndex) and HasCheck(AItemIndex); -end; - -procedure TcxGridPopupListBox.AdjustBounds(AItems: TStrings = nil); - - function CalculateClientHeight: Integer; - begin - Result := GetVisibleItemCount(AItems) * ItemHeight; - end; - - function CalculateClientWidth: Integer; - var - I: Integer; - begin - Result := 0; - for I := 0 to AItems.Count - 1 do - Result := Max(Result, Canvas.TextWidth(AItems[I])); - Inc(Result, FItemTextOffsetLeft + FItemTextOffsetRight); - if ShowChecks then - Inc(Result, GetCheckAreaWidth); - if FVisibleWidth <> 0 then - Result := Min(Result, FVisibleWidth); - if GetVisibleItemCount(AItems) < AItems.Count then - Inc(Result, GetScrollBarSize.cx); - end; - -begin - if AItems = nil then AItems := Items; - Canvas.Font := Font; - ItemHeight := CalculateItemHeight; - ClientHeight := CalculateClientHeight; - ClientWidth := CalculateClientWidth; - MinWidth := FPopup.ClientMinWidth; - if (FMinWidth <> 0) and (Width < FMinWidth) then - Width := FMinWidth; -end; - -{ TcxCustomGridDesignController } - -function TcxCustomGridDesignController.GetDesignObject(AObject: TPersistent): TPersistent; -begin - Result := AObject; -end; - -function TcxCustomGridDesignController.IsObjectSelected(AObject: TPersistent): Boolean; -begin -{$IFDEF DELPHI6} - if TcxCustomGrid(Control).StructureNavigator = nil then - Result := False - else - Result := TcxCustomGrid(Control).StructureNavigator.IsObjectSelected(GetDesignObject(AObject)); -{$ELSE} - Result := False; -{$ENDIF} -end; - -procedure TcxCustomGridDesignController.SelectObject(AObject: TPersistent; AClearSelection: Boolean); -begin - TcxCustomGrid(Control).StructureNavigator.SelectObject(GetDesignObject(AObject), AClearSelection); -end; - -procedure TcxCustomGridDesignController.SelectObjects(AObjects: TList); -var - I: Integer; -begin - for I := 0 to AObjects.Count - 1 do - AObjects[I] := GetDesignObject(AObjects[I]); - TcxCustomGrid(Control).StructureNavigator.SelectObjects(AObjects); -end; - -procedure TcxCustomGridDesignController.UnselectObject(AObject: TPersistent); -begin - if Control <> nil then - TcxCustomGrid(Control).StructureNavigator.UnselectObject(GetDesignObject(AObject)); -end; - -{ TcxGridViewDesignController } - -constructor TcxGridViewDesignController.Create(AController: TcxCustomGridController); -begin - inherited Create; - FController := AController; -end; - -function TcxGridViewDesignController.GetControl: TcxControl; -begin - Result := FController.Control; -end; - -function TcxGridViewDesignController.GetDesignObject(AObject: TPersistent): TPersistent; -begin - if FController.GridView.IsPattern then - Result := inherited GetDesignObject(AObject) - else - Result := FController.GetPatternObject(AObject); -end; - -{ TcxCustomGridController } - -destructor TcxCustomGridController.Destroy; -begin - HideHint; - FreeAndNil(FHintWindow); - FreeAndNil(FDesignController); - inherited; -end; - -function TcxCustomGridController.GetDesignController: TcxGridViewDesignController; -begin - if (FDesignController = nil) and GridView.IsDesigning then - FDesignController := GetDesignControllerClass.Create(Self); - Result := FDesignController; -end; - -function TcxCustomGridController.GetDragAndDropObject: TcxCustomGridDragAndDropObject; -begin - Result := Site.DragAndDropObject as TcxCustomGridDragAndDropObject; -end; - -function TcxCustomGridController.GetDragAndDropObjectClass: TcxDragAndDropObjectClass; -begin - Result := Site.DragAndDropObjectClass; -end; - -function TcxCustomGridController.GetDragImages: TcxDragImageList; -begin - Result := Site.DragImages; -end; - -function TcxCustomGridController.GetIsDragging: Boolean; -begin - Result := Site.DragAndDropState = ddsInProcess; -end; - -function TcxCustomGridController.GetMouseCaptureViewInfo: TcxCustomGridCellViewInfo; -begin - if Site.MouseCaptureObject is TcxCustomGridCellViewInfo then - Result := TcxCustomGridCellViewInfo(Site.MouseCaptureObject) - else - Result := nil; -end; - -procedure TcxCustomGridController.SetCustomization(Value: Boolean); -begin - if Value and (GridView.IsPattern or not Site.HandleAllocated) then Exit; - if FCustomization <> Value then - begin - FCustomization := Value; - CustomizationChanged; - end; -end; - -procedure TcxCustomGridController.SetDragAndDropObjectClass(Value: TcxDragAndDropObjectClass); -begin - Site.DragAndDropObjectClass := Value; -end; - -procedure TcxCustomGridController.SetMouseCaptureViewInfo(Value: TcxCustomGridCellViewInfo); -begin - Site.MouseCaptureObject := Value; -end; - -procedure TcxCustomGridController.HintCheckerTimerHandler(Sender: TObject); -begin - if not CanShowHint then HideHint; -end; - -procedure TcxCustomGridController.MouseLeave; -begin - HideHint; -end; - -function TcxCustomGridController.PtInCaller(const P: TPoint): Boolean; -begin - if FHintCellViewInfo = nil then - if IsRectEmpty(FHintAreaBounds) then - Result := PtInRect(Site.Bounds, P) - else - Result := PtInRect(FHintAreaBounds, P) - else - Result := FHintCellViewInfo.HasHintPoint(P); -end; - -procedure TcxCustomGridController.AfterPaint; -begin - if IsDragging then - DragAndDropObject.AfterPaint; -end; - -procedure TcxCustomGridController.BeforeKillFocus; -begin -end; - -procedure TcxCustomGridController.BeforePaint; -begin - if IsDragging then - DragAndDropObject.BeforePaint; -end; - -function TcxCustomGridController.CanFocusOnClick(X, Y: Integer): Boolean; -begin - Result := True; -end; - -function TcxCustomGridController.CanHandleHitTest(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := not (AHitTest is TcxCustomGridViewHitTest) or - (TcxCustomGridViewHitTest(AHitTest).GridView = FGridView); -end; - -procedure TcxCustomGridController.CheckCoordinates; -begin -end; - -procedure TcxCustomGridController.DetailFocused(ADetail: TcxCustomGridView); -begin -end; - -procedure TcxCustomGridController.DoEnter; -begin -end; - -procedure TcxCustomGridController.DoExit; -begin -end; - -procedure TcxCustomGridController.DoSetFocus(ANotifyMaster: Boolean); -begin - FIsFocusing := True; - try - SetFocus(ANotifyMaster); - finally - FIsFocusing := False; - end; -end; - -function TcxCustomGridController.GetDesignControllerClass: TcxGridViewDesignControllerClass; -begin - Result := TcxGridViewDesignController; -end; - -function TcxCustomGridController.GetDesignHitTest(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := (AHitTest.DragAndDropObjectClass <> nil) or - (AHitTest.HitTestCode = htDesignSelector); -end; - -function TcxCustomGridController.GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; -begin - Result := mwskNone; -end; - -function TcxCustomGridController.GetPatternObject(AObject: TPersistent): TPersistent; -begin - if AObject is TcxCustomGridView then - Result := TcxCustomGridView(AObject).PatternGridView - else - if AObject is TcxDataSummaryItem then - Result := DataController.Summary.GetPatternSummaryItems(GridView.PatternGridView.DataController.Summary, - TcxDataSummaryItem(AObject).SummaryItems)[TcxDataSummaryItem(AObject).Index] - else - Result := AObject; -end; - -procedure TcxCustomGridController.GridViewChanged; -begin - if CustomizationForm <> nil then - CustomizationForm.GridViewChanged; -end; - -function TcxCustomGridController.IsPixelScrollBar(AKind: TScrollBarKind): Boolean; -begin - Result := False; -end; - -function TcxCustomGridController.MayFocus: Boolean; -begin - Result := True; -end; - -procedure TcxCustomGridController.RemoveFocus; -begin - BeforeKillFocus; - GridView.TabStop := False; - if not GridView.Visible then - begin - Site.Parent := nil; - end; -end; - -procedure TcxCustomGridController.SetFocus(ANotifyMaster: Boolean); -begin - GridView.TabStop := True; - ViewInfo.DoVisibilityChanged(True); - if Control.IsFocused and Site.CanFocusEx then - Site.SetFocus; - if ANotifyMaster and GridView.IsDetail then - GridView.MasterGridView.Controller.DetailFocused(GridView); -end; - -procedure TcxCustomGridController.VisibilityChanged(AVisible: Boolean); -begin - if not AVisible then - Customization := False; -end; - -procedure TcxCustomGridController.CheckCustomizationFormBounds(var R: TRect); -begin -end; - -procedure TcxCustomGridController.CustomizationChanged; -begin - if Customization then - ShowCustomizationForm - else - HideCustomizationForm; - if Control <> nil then - TcxCustomGrid(Control).SendNotifications(gnkCustomization); - GridView.DoCustomization; -end; - -function TcxCustomGridController.GetCustomizationFormBounds: TRect; -begin - if IsRectEmpty(FCustomizationFormBounds) then - begin - Result.BottomRight := Site.ClientToScreen(Site.ClientRect.BottomRight); - Result.Left := Result.Right - GetCustomizationFormDefaultWidth; - Result.Top := Result.Bottom - GetCustomizationFormDefaultHeight; - CheckCustomizationFormBounds(Result); - end - else - Result := FCustomizationFormBounds; -end; - -function TcxCustomGridController.GetCustomizationFormClass: TcxCustomGridCustomizationFormClass; -begin - Result := TcxCustomGridCustomizationForm; -end; - -function TcxCustomGridController.GetCustomizationFormDefaultWidth: Integer; -begin - Result := cxGridCustomizationFormDefaultWidth; -end; - -function TcxCustomGridController.GetCustomizationFormDefaultHeight: Integer; -begin - Result := cxGridCustomizationFormDefaultHeight; -end; - -procedure TcxCustomGridController.HideCustomizationForm; -begin - if not (csDestroying in FCustomizationForm.ComponentState) then - FCustomizationForm.Free; - FCustomizationForm := nil; -end; - -procedure TcxCustomGridController.ShowCustomizationForm; -begin - FCustomizationForm := GetCustomizationFormClass.Create(Self); - FCustomizationForm.BoundsRect := GetCustomizationFormBounds; - FCustomizationForm.Show; -end; - -procedure TcxCustomGridController.ControlFocusChanged; -begin - ViewInfo.ControlFocusChanged; -end; - -procedure TcxCustomGridController.DesignerModified; -begin - Site.Modified; -end; - -procedure TcxCustomGridController.DoCancelMode; -begin -end; - -procedure TcxCustomGridController.DoCheckCoordinates; -var - APrevIsCheckingCoordinates: Boolean; -begin - APrevIsCheckingCoordinates := FIsCheckingCoordinates; - FIsCheckingCoordinates := True; - try - CheckCoordinates; - finally - FIsCheckingCoordinates := APrevIsCheckingCoordinates; - end; -end; - -procedure TcxCustomGridController.DoControlFocusChanged; -begin - GridView.Changed(TcxGridControlFocusChange.Create(GridView)); -end; - -function TcxCustomGridController.GetCursor(X, Y: Integer): TCursor; -var - AHitTest: TcxCustomGridHitTest; -begin - AHitTest := ViewInfo.GetHitTest(Point(X, Y)); - if CanHandleHitTest(AHitTest) then - Result := AHitTest.Cursor - else - Result := crDefault; -end; - -function TcxCustomGridController.HasFocusedControls: Boolean; -begin - Result := False; -end; - -{function TcxCustomGridController.CanDrag(X, Y: Integer): Boolean; -begin - Result := False; -end; - -function TcxCustomGridController.GetDragObjectClass: TDragControlObjectClass; -begin - Result := TcxDragControlObject; -end;} - -procedure TcxCustomGridController.InitScrollBarsParameters; -begin -end; - -function TcxCustomGridController.IsDataFullyVisible(AIsCallFromMaster: Boolean = False): Boolean; -begin - Result := True; -end; - -procedure TcxCustomGridController.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -begin -end; - -procedure TcxCustomGridController.SetScrollBarInfo(AScrollBarKind: TScrollBarKind; - AMin, AMax, AStep, APage, APos: Integer; AAllowShow, AAllowHide: Boolean); -begin - Site.SetScrollBarInfo(AScrollBarKind, AMin, AMax, AStep, APage, APos, AAllowShow, AAllowHide); -end; - -procedure TcxCustomGridController.UpdateScrollBars(AIgnoreUpdateLock: Boolean = False); -var - APrevIgnoreUpdateLock: Boolean; -begin - APrevIgnoreUpdateLock := Site.IgnoreUpdateLock; - Site.IgnoreUpdateLock := AIgnoreUpdateLock; - try - Site.UpdateScrollBars; - finally - Site.IgnoreUpdateLock := APrevIgnoreUpdateLock; - end; -end; - -procedure TcxCustomGridController.BeginDragAndDrop; -begin -end; - -procedure TcxCustomGridController.DragAndDrop(const P: TPoint; var Accepted: Boolean); -begin -end; - -procedure TcxCustomGridController.EndDragAndDrop(Accepted: Boolean); -begin -end; - -function TcxCustomGridController.StartDragAndDrop(const P: TPoint): Boolean; -var - AHitTest: TcxCustomGridHitTest; -begin - AHitTest := ViewInfo.GetHitTest(P); - Result := CanHandleHitTest(AHitTest); - if Result then - begin - Result := AHitTest.DragAndDropObjectClass <> nil; - if Result then - begin - HideHint; - DragAndDropObjectClass := AHitTest.DragAndDropObjectClass; - DragAndDropObject.Init(P, AHitTest); - end; - end; -end; - -procedure TcxCustomGridController.BeforeStartDrag; -begin -end; - -function TcxCustomGridController.CanDrag(X, Y: Integer): Boolean; -begin - Result := True; -end; - -procedure TcxCustomGridController.DragDrop(Source: TObject; X, Y: Integer); -begin -end; - -procedure TcxCustomGridController.DragOver(Source: TObject; X, Y: Integer; - State: TDragState; var Accept: Boolean); -begin -end; - -procedure TcxCustomGridController.DrawDragImage(ACanvas: TcxCanvas; R: TRect); -begin -end; - -procedure TcxCustomGridController.EndDrag(Target: TObject; X, Y: Integer); -begin -end; - -function TcxCustomGridController.GetDragImagesSize: TPoint; -begin - Result := Point(0, 0); -end; - -function TcxCustomGridController.HasDragImages: Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridController.StartDrag(var DragObject: TDragObject); -begin -end; - -function TcxCustomGridController.CanShowHint: Boolean; -var - AForm: TCustomForm; -begin - AForm := GetParentForm(Site); - Result := (AForm = nil) or Application.Active and - (AForm.Active or - (TCustomFormAccess(AForm).FormStyle = fsMDIForm)); - if Result then - Result := Site.HandleAllocated and IsWindowVisible(Site.Handle) and - (FindVCLWindow(GetMouseCursorPos) = Site); -end; - -procedure TcxCustomGridController.HideHint; -begin - StopHintCheckerTimer; - EndMouseTracking(Self); - FHintCellViewInfo := nil; - SetRectEmpty(FHintAreaBounds); - if (FHintWindow <> nil) and FHintWindow.HandleAllocated then - ShowWindow(FHintWindow.Handle, SW_HIDE); -end; - -function TcxCustomGridController.GetHintWindowClass: THintWindowClass; -begin - Result := HintWindowClass; -end; - -procedure TcxCustomGridController.ShowHint(const AHintAreaBounds, ATextRect: TRect; - const AText: string; AIsHintMultiLine: Boolean; AFont: TFont; - AHintCellViewInfo: TcxCustomGridViewCellViewInfo); - - function GetHintWindowRect: TRect; - - function GetMaxTextWidth: Integer; - begin - if AIsHintMultiLine then - Result := ATextRect.Right - ATextRect.Left - else - Result := MaxInt div 20; - end; - - function GetTextRectOffset: TPoint; - const - TextOffset: TPoint = (X: 2; Y: 2); - begin - with FHintWindow.ClientToScreen(Point(0, 0)) do - begin - Result.X := X - FHintWindow.Left + TextOffset.X; - Result.Y := Y - FHintWindow.Top + TextOffset.Y; - end; - end; - - begin - Result := FHintWindow.CalcHintRect(GetMaxTextWidth, AText, nil); - with Result do - begin - Inc(Right, -6); - Inc(Bottom, -2); - end; - with Site.ClientToScreen(ATextRect.TopLeft) do - OffsetRect(Result, X, Y); - with GetTextRectOffset do - InflateRect(Result, X, Y); - MakeVisibleOnDesktop(Result, Result.TopLeft); - Dec(Result.Bottom, 4); - end; - -begin - if not CanShowHint then Exit; - if (FHintWindow = nil) or (FHintWindow.ClassType <> GetHintWindowClass) then - begin - FHintWindow.Free; - FHintWindow := GetHintWindowClass.Create(nil); - FHintWindow.Color := Application.HintColor; - end - else - if IsWindowVisible(FHintWindow.Handle) then - begin - if (FHintWindow.Caption = AText) and EqualRect(FHintTextRect, ATextRect) then - Exit; - EndMouseTracking(Self); - end; - FHintTextRect := ATextRect; - FHintWindow.Canvas.Font := AFont; - cxActivateHint(FHintWindow, GetHintWindowRect, AText); - - FHintAreaBounds := AHintAreaBounds; - FHintCellViewInfo := AHintCellViewInfo; - BeginMouseTracking(Site, FHintAreaBounds, Self); - StartHintCheckerTimer; -end; - -procedure TcxCustomGridController.StartHintCheckerTimer; -begin - if FHintCheckerTimer <> nil then Exit; - FHintCheckerTimer := TcxTimer.Create(nil); - with FHintCheckerTimer do - begin - Interval := 100; - OnTimer := HintCheckerTimerHandler; - end; -end; - -procedure TcxCustomGridController.StopHintCheckerTimer; -begin - FreeAndNil(FHintCheckerTimer); -end; - -procedure TcxCustomGridController.DoKeyDown(var Key: Word; Shift: TShiftState); -begin - KeyDown(Key, Shift); -end; - -procedure TcxCustomGridController.KeyDown(var Key: Word; Shift: TShiftState); -begin -end; - -procedure TcxCustomGridController.KeyPress(var Key: Char); -begin -end; - -procedure TcxCustomGridController.KeyUp(var Key: Word; Shift: TShiftState); -begin -end; - -procedure TcxCustomGridController.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; -begin - FIsDblClick := ssDouble in Shift; - AHitTest := ViewInfo.GetHitTest(X, Y); - if AHitTest.ViewInfo <> nil then - AHitTest.ViewInfo.MouseDown(AHitTest, Button, Shift); -end; - -procedure TcxCustomGridController.MouseMove(Shift: TShiftState; X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; -begin - AHitTest := ViewInfo.GetHitTest(X, Y); - if MouseCaptureViewInfo <> nil then - MouseCaptureViewInfo.MouseMove(AHitTest, Shift) - else - if AHitTest.ViewInfo <> nil then - AHitTest.ViewInfo.MouseMove(AHitTest, Shift); -end; - -procedure TcxCustomGridController.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - AHitTest: TcxCustomGridHitTest; -begin - AHitTest := ViewInfo.GetHitTest(X, Y); - if MouseCaptureViewInfo <> nil then - MouseCaptureViewInfo.MouseUp(AHitTest, Button, Shift) - else - if AHitTest.ViewInfo <> nil then - AHitTest.ViewInfo.MouseUp(AHitTest, Button, Shift); -end; - -function TcxCustomGridController.ProcessDetailDialogChar(ADetail: TcxCustomGridView; - ACharCode: Word): Boolean; -begin - Result := False; -end; - -function TcxCustomGridController.ProcessDialogChar(ACharCode: Word): Boolean; -begin - Result := (GridView.MasterGridView <> nil) and - GridView.MasterGridView.Controller.ProcessDetailDialogChar(GridView, ACharCode); -end; - -procedure TcxCustomGridController.WndProc(var Message: TMessage); -begin - if (Message.Msg = CN_SYSCHAR) and ProcessDialogChar(Message.WParam) then - Message.Msg := WM_NULL; -end; - -procedure TcxCustomGridController.RefreshCustomizationForm; -begin - if CustomizationForm <> nil then - CustomizationForm.RefreshData; -end; - -{procedure TcxCustomGridController.BeginCellMouseTracking(AViewInfo: TcxCustomGridCellViewInfo); -begin - BeginMouseTracking(Site, AViewInfo.Bounds, AViewInfo); -end; - -procedure TcxCustomGridController.EndCellMouseTracking(AViewInfo: TcxCustomGridCellViewInfo); -begin - EndMouseTracking(AViewInfo); -end;} - -{ TcxDataGroupNode } - -constructor TcxDataGroupNode.Create(AParent: TcxDataGroupNode; ADataGroupInfo: TcxDataGroupInfo); -begin - inherited Create; - FChilds := TList.Create; - FDataGroupInfo := ADataGroupInfo; - FParent := AParent; -end; - -destructor TcxDataGroupNode.Destroy; -var - I: Integer; -begin - for I := 0 to ChildCount - 1 do - Childs[I].Free; - FChilds.Free; - inherited Destroy; -end; - -function TcxDataGroupNode.GetChild(Index: Integer): TcxDataGroupNode; -begin - Result := TcxDataGroupNode(FChilds[Index]); -end; - -function TcxDataGroupNode.GetChildCount: Integer; -begin - Result := FChilds.Count; -end; - -function TcxDataGroupNode.AddChild(ADataGroupInfo: TcxDataGroupInfo): TcxDataGroupNode; -begin - Result := TcxDataGroupNode.Create(Self, ADataGroupInfo); - FChilds.Add(Result); -end; - -{ TcxGridSortingBySummaryEngine } - -constructor TcxGridSortingBySummaryEngine.Create(ADataControllerInfo: TcxCustomDataControllerInfo); -begin - inherited; - FInfos := TList.Create; - FRootNode := TcxDataGroupNode.Create(nil, nil); -end; - -destructor TcxGridSortingBySummaryEngine.Destroy; -begin - FRootNode.Free; - ClearInfos; - FInfos.Free; - inherited Destroy; -end; - -function TcxGridSortingBySummaryEngine.GetDataGroups: TcxDataGroups; -begin - Result := DataControllerInfo.DataGroups; -end; - -function TcxGridSortingBySummaryEngine.GetInfo(Index: Integer): TcxSortingBySummaryInfo; -begin - Result := TcxSortingBySummaryInfo(FInfos[Index]); -end; - -function TcxGridSortingBySummaryEngine.GetInfoCount: Integer; -begin - Result := FInfos.Count; -end; - -procedure TcxGridSortingBySummaryEngine.AddInfo(AInfo: TcxSortingBySummaryInfo); -begin - FInfos.Add(AInfo); -end; - -procedure TcxGridSortingBySummaryEngine.BuildNodes(AParentNode: TcxDataGroupNode; ALevel: Integer; - var ACurIndex: Integer); -var - ANode: TcxDataGroupNode; -begin - while ACurIndex < DataGroups.Count do - if DataGroups[ACurIndex].Level = ALevel then - begin - ANode := AParentNode.AddChild(DataGroups[ACurIndex]); - Inc(ACurIndex); - if ALevel < DataGroups.LevelCount - 1 then // build childs - BuildNodes(ANode, ALevel + 1, ACurIndex); - end - else - Break; -end; - -procedure TcxGridSortingBySummaryEngine.ClearInfos; -var - I: Integer; -begin - for I := 0 to InfoCount - 1 do - Infos[I].Free; - FInfos.Clear; -end; - -function TcxGridSortingBySummaryEngine.CompareGroupsBySummary(AInfo1, AInfo2: - Pointer): Integer; -var - AInfo: TcxSortingBySummaryInfo; -begin - AInfo := Infos[TcxDataGroupNode(AInfo1).DataGroupInfo.Level]; - Result := VarCompare( - TcxDataGroupNode(AInfo1).DataGroupInfo.SummaryValues[AInfo.SummaryItemIndex], - TcxDataGroupNode(AInfo2).DataGroupInfo.SummaryValues[AInfo.SummaryItemIndex]); - if Result = 0 then - begin - Result := DataControllerInfo.CompareGroupRecords( - {DataControllerInfo.GetRowInfo(TcxDataGroupNode(AInfo1).DataGroupInfo.RowIndex).RecordIndex, - DataControllerInfo.GetRowInfo(TcxDataGroupNode(AInfo2).DataGroupInfo.RowIndex).RecordIndex,} - DataControllerInfo.GetInternalRecordIndex( - DataGroups.GetDataRecordListIndex(TcxDataGroupNode(AInfo1).DataGroupInfo)), - DataControllerInfo.GetInternalRecordIndex( - DataGroups.GetDataRecordListIndex(TcxDataGroupNode(AInfo2).DataGroupInfo)), - TcxDataGroupNode(AInfo1).DataGroupInfo.Level) - end - else - if AInfo.SortOrder = soDescending then - Result := -Result; -end; - -procedure TcxGridSortingBySummaryEngine.RebuildDataGroupRecursive(AParentNode: TcxDataGroupNode; - var ABeginRecordListIndex: Integer); -var - I: Integer; -begin - DataGroups.SetItem(ABeginRecordListIndex, AParentNode.DataGroupInfo); - Inc(ABeginRecordListIndex); - if AParentNode.DataGroupInfo.Level < (DataGroups.LevelCount - 1) then - begin - AParentNode.DataGroupInfo.BeginRecordListIndex := ABeginRecordListIndex; - for I := 0 to AParentNode.ChildCount - 1 do - RebuildDataGroupRecursive(AParentNode.Childs[I], ABeginRecordListIndex); - AParentNode.DataGroupInfo.EndRecordListIndex := ABeginRecordListIndex - 1; - end; -end; - -procedure TcxGridSortingBySummaryEngine.RebuildDataGroups; -var - I: Integer; - ABeginRecordListIndex: Integer; -begin - ABeginRecordListIndex := 0; - for I := 0 to FRootNode.ChildCount - 1 do - RebuildDataGroupRecursive(FRootNode.Childs[I], ABeginRecordListIndex); - DataGroups.Rebuild; -end; - -procedure TcxGridSortingBySummaryEngine.SortNodeRecursive(ANode: TcxDataGroupNode; ALevel: Integer); -var - I: Integer; -begin - if Infos[ALevel].SummaryItemIndex <> -1 then - QuickSortList(ANode.FChilds.List, 0, ANode.FChilds.Count - 1, CompareGroupsBySummary); - if (ALevel + 1) < DataGroups.LevelCount then // Last Level? - for I := 0 to ANode.ChildCount - 1 do - SortNodeRecursive(ANode.Childs[I], ALevel + 1); -end; - -procedure TcxGridSortingBySummaryEngine.SortNodes; -var - I: Integer; - AInfo: TcxSortingBySummaryInfo; - ASortedSummaryItem: TcxDataSummaryItem; -begin - ClearInfos; - for I := 0 to DataControllerInfo.GroupingFieldList.Count - 1 do - begin - AInfo := TcxSortingBySummaryInfo.Create; - ASortedSummaryItem := DataController.Summary.GroupSummaryItems[I].SortedSummaryItem; - if ASortedSummaryItem <> nil then - begin - AInfo.SummaryItemIndex := ASortedSummaryItem.Index; - if DataController.SortingBySummaryDataItemIndex <> -1 then - AInfo.SortOrder := DataController.GetItemSortOrder(DataController.SortingBySummaryDataItemIndex) - else - AInfo.SortOrder := DataControllerInfo.GroupingFieldList[I].SortOrder; - end - else - AInfo.SummaryItemIndex := -1; - AddInfo(AInfo); - end; - - SortNodeRecursive(FRootNode, 0); -end; - -procedure TcxGridSortingBySummaryEngine.Sort; -var - ACurIndex: Integer; -begin - if DataGroups.Count = 0 then Exit; - ACurIndex := 0; - BuildNodes(FRootNode, 0, ACurIndex); - SortNodes; - RebuildDataGroups; -end; - -{ TcxCustomGridCellPainter } - -constructor TcxCustomGridCellPainter.Create(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridCellViewInfo); -begin - inherited Create; - FCanvas := ACanvas; - FViewInfo := AViewInfo; -end; - -function TcxCustomGridCellPainter.GetIsMainCanvasInUseValue: Boolean; -begin - Result := GetIsMainCanvasInUse(FCanvas, FViewInfo); -end; - -procedure TcxCustomGridCellPainter.AfterPaint; -begin - if CanDrawDesignSelection then DoDrawDesignSelection(Canvas, ViewInfo); -end; - -procedure TcxCustomGridCellPainter.BeforePaint; -begin -end; - -function TcxCustomGridCellPainter.CanDrawDesignSelection: Boolean; -begin - Result := True; -end; - -procedure TcxCustomGridCellPainter.DoExcludeFromClipRect; -begin - Canvas.ExcludeClipRect(ViewInfo.Bounds); -end; - -procedure TcxCustomGridCellPainter.DrawBackground; -begin - DrawBackground(ViewInfo.ClientBounds); -end; - -procedure TcxCustomGridCellPainter.DrawBackground(const R: TRect); -begin - with Canvas, ViewInfo do - if not Transparent then - begin - Brush.Color := Params.Color; - FillRect(R); - end - else - if BackgroundBitmap <> nil then - FillRect(R, BackgroundBitmap); -end; - -function TcxCustomGridCellPainter.DrawBackgroundHandler(ACanvas: TcxCanvas; - const ABounds: TRect): Boolean; -begin {4} - Result := ViewInfo.BackgroundBitmap <> nil; - if Result then - ACanvas.FillRect(ABounds, ViewInfo.BackgroundBitmap); -end; - -procedure TcxCustomGridCellPainter.DrawBorder(ABorder: TcxBorder); -begin - with Canvas do - begin - SetBrushColor(ViewInfo.BorderColor[ABorder]); - FillRect(ViewInfo.BorderBounds[ABorder]); - end; -end; - -procedure TcxCustomGridCellPainter.DrawBorders; -var - ABorder: TcxBorder; -begin - for ABorder := Low(ABorder) to High(ABorder) do - if ABorder in ViewInfo.Borders then - DrawBorder(ABorder); -end; - -procedure TcxCustomGridCellPainter.DrawContent; -begin - if ViewInfo.HasBackground and not ViewInfo.DoCustomDrawBackground(Canvas) then - DrawBackground; - DrawText; -end; - -class procedure TcxCustomGridCellPainter.DrawDesignSelection(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridCellViewInfo); -begin - ACanvas.DrawDesignSelection(AViewInfo.DesignSelectionBounds, AViewInfo.DesignSelectionWidth); -end; - -procedure TcxCustomGridCellPainter.DrawText; -var - R: TRect; -begin - with Canvas, ViewInfo do - if TextForPainting <> '' then - begin - R := TextAreaBounds; // can call font change - Font := Params.Font; - Font.Color := Params.TextColor; - Brush.Style := bsClear; - PrepareCanvasForDrawText; - DrawText(TextForPainting, R, GetTextAttributes(True)); - UnprepareCanvasForDrawText; - Brush.Style := bsSolid; - end; -end; - -function TcxCustomGridCellPainter.ExcludeFromClipRect: Boolean; -begin - Result := False; -end; - -class function TcxCustomGridCellPainter.GetIsMainCanvasInUse(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridCellViewInfo): Boolean; -begin - Result := ACanvas = AViewInfo.Canvas; -end; - -function TcxCustomGridCellPainter.NeedsPainting: Boolean; -begin - Result := ViewInfo.Calculated and Canvas.RectVisible(ViewInfo.GetAreaBoundsForPainting); -end; - -procedure TcxCustomGridCellPainter.Paint; -var - ASavedParams: TcxViewParams; -begin - ViewInfo.SaveParams(ASavedParams); - try - if not ViewInfo.DoCustomDraw(Canvas) then - DrawContent; - finally - ViewInfo.RestoreParams(ASavedParams); - end; - DrawBorders; -end; - -procedure TcxCustomGridCellPainter.PrepareCanvasForDrawText; -begin -end; - -procedure TcxCustomGridCellPainter.UnprepareCanvasForDrawText; -begin -end; - -class procedure TcxCustomGridCellPainter.DoDrawDesignSelection(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridCellViewInfo); -begin - if AViewInfo.IsDesignSelected and GetIsMainCanvasInUse(ACanvas, AViewInfo) then - DrawDesignSelection(ACanvas, AViewInfo); -end; - -procedure TcxCustomGridCellPainter.MainPaint; -begin - if not NeedsPainting then Exit; - BeforePaint; - Paint; - AfterPaint; - if ExcludeFromClipRect then DoExcludeFromClipRect; -end; - -{ TcxGridDesignSelectorPainter } - -function TcxGridDesignSelectorPainter.GetViewInfo: TcxGridDesignSelectorViewInfo; -begin - Result := TcxGridDesignSelectorViewInfo(inherited ViewInfo); -end; - -procedure TcxGridDesignSelectorPainter.DoExcludeFromClipRect; -begin - Canvas.SetClipRegion(ViewInfo.Region, roSubtract, False); -end; - -procedure TcxGridDesignSelectorPainter.DrawSign(AColor: TColor); -const - SignOffsetStart = 3; - SignOffsetEnd = 8; - SignElementSize = 2; - SignLineWidth = 1; -var - R: TRect; - I: Integer; -begin - R := ViewInfo.Bounds; - with R do - begin - Inc(Left, SignOffsetStart); - Inc(Top, SignOffsetStart); - Dec(Right, SignOffsetEnd); - Dec(Bottom, SignOffsetEnd); - end; - Canvas.Brush.Color := AColor; - - Canvas.FillRect(Rect(R.Left, R.Top, R.Left + SignLineWidth, R.Bottom)); - Inc(R.Left, SignLineWidth); - for I := 0 to (R.Bottom - R.Top) div SignElementSize - 1 do - begin - R.Bottom := R.Top + SignLineWidth; - Canvas.FillRect(R); - R.Top := R.Bottom + SignElementSize - SignLineWidth; - Dec(R.Right, SignElementSize); - end; -end; - -function TcxGridDesignSelectorPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -procedure TcxGridDesignSelectorPainter.Paint; -var - AParams: TcxViewParams; -begin - ViewInfo.GetViewParams(AParams); - Canvas.DrawRegion(ViewInfo.Region, AParams.Color, AParams.TextColor); - DrawSign(AParams.TextColor); -end; - -{ TcxCustomGridPainter } - -function TcxCustomGridPainter.GetCanvas: TcxCanvas; -begin - if FCanvas = nil then - Result := ViewInfo.Canvas - else - Result := FCanvas; -end; - -function TcxCustomGridPainter.GetViewInfo: TcxCustomGridViewInfo; -begin - if FViewInfo = nil then - Result := inherited ViewInfo - else - Result := FViewInfo; -end; - -procedure TcxCustomGridPainter.DrawBackground; - - procedure DrawBackgroundUsingBrush; - begin - with Canvas do - begin - Brush.Color := ViewInfo.BackgroundColor; - FillRgn(Handle, FBackgroundRegion.Handle, Brush.Handle); - end; - end; - - procedure DrawBackgroundUsingBitmap; - var - AClipRegion: TcxRegion; - begin - with Canvas do - begin - AClipRegion := GetClipRegion; - SetClipRegion(FBackgroundRegion, roIntersect, False); - FillRect(ViewInfo.Bounds, ViewInfo.BackgroundBitmap); - SetClipRegion(AClipRegion, roSet); - end; - end; - -begin - if ViewInfo.BackgroundBitmap = nil then - DrawBackgroundUsingBrush - else - DrawBackgroundUsingBitmap; {4} - //Canvas.ExcludeClipRect(ViewInfo.Bounds); -end; - -procedure TcxCustomGridPainter.PaintAfter; -begin - DrawBackground; - FreeAndNil(FBackgroundRegion); - Canvas.SetClipRegion(FBeforePaintClipRegion, roSet); -end; - -procedure TcxCustomGridPainter.PaintBefore; -begin - FBeforePaintClipRegion := Canvas.GetClipRegion; - FBackgroundRegion := TcxRegion.Create(ViewInfo.Bounds); - if ViewInfo.DesignSelectorViewInfo <> nil then - ViewInfo.DesignSelectorViewInfo.Paint(Canvas); -end; - -procedure TcxCustomGridPainter.PaintContent; -begin -end; - -procedure TcxCustomGridPainter.DrawFocusRect(const R: TRect; AHideFocusRect: Boolean); -begin - if GridView.IsControlFocused then - Canvas.DrawFocusRect(R) - else - if not AHideFocusRect then - with Canvas, R do - begin - InvertRect(Rect(Left, Top, Right, Top + 1)); - InvertRect(Rect(Left, Bottom - 1, Right, Bottom)); - InvertRect(Rect(Left, Top + 1, Left + 1, Bottom - 1)); - InvertRect(Rect(Right - 1, Top + 1, Right, Bottom - 1)); - end; -end; - -procedure TcxCustomGridPainter.ExcludeFromBackground(const R: TRect); -begin - FBackgroundRegion.Combine(TcxRegion.Create(R), roSubtract); -end; - -procedure TcxCustomGridPainter.Paint(ACanvas: TcxCanvas = nil; - AViewInfo: TcxCustomGridViewInfo = nil); -{ -var i,ft,lt:integer; -} -begin -{ - ft:=gettickcount; - for i:=1 to 10 do - begin -} - ViewInfo := AViewInfo; - Canvas := ACanvas; - - Controller.BeforePaint; - PaintBefore; - PaintContent; - PaintAfter; - Controller.AfterPaint; - - Canvas := nil; - ViewInfo := nil; -{ - windows.SelectClipRgn(canvas.Handle, 0); - end; - lt:=gettickcount; - application.MainForm.caption := inttostr(lt-ft); -} -end; - -procedure TcxCustomGridPainter.Invalidate; -begin - Site.Invalidate; -end; - -procedure TcxCustomGridPainter.Invalidate(const R: TRect); -begin - Site.InvalidateRect(R, False); -end; - -procedure TcxCustomGridPainter.Invalidate(ARegion: TcxRegion); -begin - Site.InvalidateRgn(ARegion, False); -end; - -{ TcxCustomGridViewData } - -function TcxCustomGridViewData.GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; -begin - Result := TcxGridSortingBySummaryEngine; -end; - -function TcxCustomGridViewData.IsEmpty: Boolean; -begin - Result := DataController.RowCount = 0; -end; - -function TcxCustomGridViewData.MakeDetailVisible(ADetailLevel: TComponent{TcxGridLevel}): TcxCustomGridView; -begin - Result := nil; -end; - -{ TcxGridSite } - -constructor TcxGridSite.Create(AViewInfo: TcxCustomGridViewInfo); -begin - FViewInfo := AViewInfo; - inherited Create(nil); - ControlStyle := ControlStyle + [csNoDesignVisible]; - Keys := [kArrows, kChars]; - ParentColor := False; -{$IFDEF USETCXSCROLLBAR} - HScrollBar.UnlimitedTracking := True; - VScrollBar.UnlimitedTracking := True; -{$ENDIF} -end; - -destructor TcxGridSite.Destroy; -begin - CancelPostBoundsChanged; - //!!!!FViewInfo.FSite := nil; should always be nil here already; - inherited; -end; - -function TcxGridSite.GetContainer: TcxControl; -begin - Result := GridView.Control; -end; - -function TcxGridSite.GetController: TcxCustomGridController; -begin - Result := GridView.Controller; -end; - -function TcxGridSite.GetGridView: TcxCustomGridView; -begin - Result := FViewInfo.GridView; -end; - -function TcxGridSite.GetPainter: TcxCustomGridPainter; -begin - Result := GridView.Painter; -end; - -procedure TcxGridSite.SendKeyDownNotification(var Message: TWMKeyDown); -begin - TcxCustomGrid(GridView.Control).SendNotifications(gnkKeyDown, - @Message); -end; - -procedure TcxGridSite.CNKeyDown(var Message: TWMKeyDown); -begin - SendKeyDownNotification(Message); - if Message.Result = 0 then - inherited; -end; - -procedure TcxGridSite.CNSysKeyDown(var Message: TWMKeyDown); -begin - SendKeyDownNotification(Message); - if Message.Result = 0 then - inherited; -end; - -procedure TcxGridSite.BoundsChangedTimerHandler(Sender: TObject); -begin - CancelPostBoundsChanged; - GridView.BoundsChanged; -end; - -function TcxGridSite.AllowAutoDragAndDropAtDesignTime(X, Y: Integer; - Shift: TShiftState): Boolean; -begin - Result := False; -end; - -function TcxGridSite.AllowDragAndDropWithoutFocus: Boolean; -begin - if TcxCustomGridAccess(GridView.Control).IsPopupControl then {8} - Result := True - else - Result := inherited AllowDragAndDropWithoutFocus; -end; - -procedure TcxGridSite.BeforeMouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - inherited; - if HandleAllocated then - Controller.MouseDown(Button, Shift, X, Y); -end; - -procedure TcxGridSite.BoundsChanged; -var - APrevSize: TPoint; - - function AllowNotification: Boolean; - var - AGridView: TcxCustomGridView; - begin - AGridView := GridView; - repeat - Result := AGridView.ViewInfo.AllowBoundsChangedNotification; - AGridView := AGridView.MasterGridView; - until not Result or (AGridView = nil); - end; - -begin - if CreatingWindow then Exit; - APrevSize := FSize; - UpdateSize; - if ViewInfo.VisibilityChanging then Exit; - if ((APrevSize.X <> 0) or (APrevSize.Y <> 0)) and - ((APrevSize.X <> FSize.X) or (APrevSize.Y <> FSize.Y)) then - if AllowNotification then - GridView.BoundsChanged(True) - else - if UpdatingScrollBars then PostBoundsChanged; - {if AllowNotification and - ((APrevSize.X <> 0) or (APrevSize.Y <> 0)) and - ((APrevSize.X <> FSize.X) or (APrevSize.Y <> FSize.Y)) then - GridView.BoundsChanged(True);} - inherited; -end; - -function TcxGridSite.CanDrag(X, Y: Integer): Boolean; -begin - Result := inherited CanDrag(X, Y) and Controller.CanDrag(X, Y); -end; - -function TcxGridSite.CanFocusOnClick(X, Y: Integer): Boolean; -begin - Result := inherited CanFocusOnClick(X, Y) and Controller.CanFocusOnClick(X, Y); -end; - -procedure TcxGridSite.DoCancelMode; -begin - inherited; - Controller.DoCancelMode; -end; - -procedure TcxGridSite.DoContextPopup(MousePos: TPoint; var Handled: Boolean); -begin - inherited; - if not Handled and (GridView.Control <> nil) then - Handled := TcxCustomGrid(GridView.Control).SendNotifications(gnkContextMenu, - TObject((MousePos.X = -1) and (MousePos.Y = -1))); -end; - -procedure TcxGridSite.DoEnter; -begin - inherited; - Controller.DoEnter; -end; - -procedure TcxGridSite.DoExit; -begin - if not GridView.IsDestroying then - Controller.DoExit; - inherited; -end; - -procedure TcxGridSite.FocusChanged; -var - ALink: TcxObjectLink; -begin - ALink := cxAddObjectLink(Self); - try - inherited; - if IsFocused then - GridView.Focused := True; - if ALink.Ref = nil then Exit; - TcxCustomGridAccess(Container).UpdateFocusing(GridView.IsControlFocused); - finally - cxRemoveObjectLink(ALink); - end; -end; - -function TcxGridSite.FocusWhenChildIsClicked(AChild: TControl): Boolean; -begin - Result := inherited FocusWhenChildIsClicked(AChild) and not Container.IsFocused; -end; - -function TcxGridSite.GetClientBounds: TRect; -begin - Result := inherited GetClientBounds; - ViewInfo.AdjustClientBounds(Result); -end; - -function TcxGridSite.GetCursor(X, Y: Integer): TCursor; -begin - Result := Controller.GetCursor(X, Y); - if Result = crDefault then - Result := inherited GetCursor(X, Y); -end; - -function TcxGridSite.GetDesignHitTest(X, Y: Integer; Shift: TShiftState): Boolean; -var - AHitTest: TcxCustomGridHitTest; -begin - Result := inherited GetDesignHitTest(X, Y, Shift); - if not Result and not ((ssRight in Shift) or (Shift = []) and MouseRightButtonReleased) and - not TcxCustomGrid(Container).UpdateLocked then - begin - AHitTest := ViewInfo.GetHitTest(X, Y); - Result := Controller.GetDesignHitTest(AHitTest); - end; -end; - -function TcxGridSite.GetIsDesigning: Boolean; -begin - if Container = nil then - Result := GridView.IsDesigning - else - Result := Container.IsDesigning; -end; - -function TcxGridSite.GetIsFocused: Boolean; -begin - Result := (GridView.Control <> nil) and - TcxCustomGridAccess(GridView.Control).IsPopupControl or {8} - inherited GetIsFocused or Controller.HasFocusedControls; -end; - -function TcxGridSite.GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; -begin - Result := Controller.GetMouseWheelScrollingKind; -end; - -function TcxGridSite.IsPixelScrollBar(AKind: TScrollBarKind): Boolean; -begin - Result := Controller.IsPixelScrollBar(AKind); -end; - -procedure TcxGridSite.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited; - Controller.DoKeyDown(Key, Shift); -end; - -procedure TcxGridSite.KeyPress(var Key: Char); -begin - inherited; - Controller.KeyPress(Key); -end; - -procedure TcxGridSite.KeyUp(var Key: Word; Shift: TShiftState); -begin - inherited; - Controller.KeyUp(Key, Shift); -end; - -function TcxGridSite.MayFocus: Boolean; -begin - Result := inherited MayFocus and ((Parent = nil) or Controller.MayFocus); -end; - -procedure TcxGridSite.MouseLeave(AControl: TControl); -begin - inherited; - Controller.MouseLeave; -end; - -procedure TcxGridSite.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited; - if DragAndDropState = ddsNone then - Controller.MouseMove(Shift, X, Y); -end; - -procedure TcxGridSite.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -begin - if DragAndDropState = ddsNone then - begin - Controller.MouseUp(Button, Shift, X, Y); - inherited; - end - else - begin - inherited; - Controller.MouseUp(Button, Shift, X, Y); - end; -end; - -procedure TcxGridSite.Paint; -begin - if not FViewInfo.IsCalculating and (Left <> cxGridInvisibleCoordinate) then - begin - inherited; - Painter.Paint; - end; -end; - -procedure TcxGridSite.RequestAlign; -begin -end; - -procedure TcxGridSite.SetParent(AParent: TWinControl); -begin - if Parent <> AParent then - begin - if AParent <> nil then - LookAndFeel.MasterLookAndFeel := GridView.LookAndFeel; - InitTabStop(AParent); - if (AParent = nil) and GridView.Focused and - not (csDestroying in Parent.ComponentState) and Parent.CanFocus then - Parent.SetFocus; - end; - inherited; -end; - -function TcxGridSite.UpdateMousePositionIfControlMoved: Boolean; -begin - Result := False; -end; - -procedure TcxGridSite.WndProc(var Message: TMessage); -begin - {if (Message.Msg = WM_MOUSEACTIVATE) and IsDesigning then - Exit;} - Controller.WndProc(Message); - inherited WndProc(Message); -end; - -procedure TcxGridSite.DoEndDrag(Target: TObject; X, Y: Integer); -begin - Controller.EndDrag(Target, X, Y); - inherited; -end; - -procedure TcxGridSite.DoStartDrag(var DragObject: TDragObject); -begin - Controller.BeforeStartDrag; - inherited; - Controller.StartDrag(DragObject); -end; - -procedure TcxGridSite.DragOver(Source: TObject; X, Y: Integer; State: TDragState; - var Accept: Boolean); -begin - inherited; - Controller.DragOver(Source, X, Y, State, Accept); -end; - -procedure TcxGridSite.DrawDragImage(ACanvas: TcxCanvas; const R: TRect); -begin - Controller.DrawDragImage(ACanvas, R); -end; - -function TcxGridSite.GetDragImagesSize: TPoint; -begin - Result := Controller.GetDragImagesSize; -end; - -function TcxGridSite.HasDragImages: Boolean; -begin - Result := Controller.HasDragImages; -end; - -function TcxGridSite.GetHScrollBarBounds: TRect; -begin - Result := inherited GetHScrollBarBounds; - ViewInfo.GetHScrollBarBounds(Result); -end; - -procedure TcxGridSite.InitScrollBarsParameters; -begin - Controller.InitScrollBarsParameters; -end; - -procedure TcxGridSite.Scroll(AScrollBarKind: TScrollBarKind; - AScrollCode: TScrollCode; var AScrollPos: Integer); -begin - Controller.Scroll(AScrollBarKind, AScrollCode, AScrollPos); -end; - -procedure TcxGridSite.UpdateScrollBars; -begin - if not FViewInfo.IsCalculating and GridView.Visible and - (IgnoreUpdateLock or (Container <> nil) and not TcxCustomGrid(Container).UpdateLocked) then - inherited; -end; - -procedure TcxGridSite.DragAndDrop(const P: TPoint; var Accepted: Boolean); -begin - inherited; - Controller.DragAndDrop(P, Accepted); -end; - -procedure TcxGridSite.EndDragAndDrop(Accepted: Boolean); -begin - Controller.EndDragAndDrop(Accepted); - inherited; -end; - -function TcxGridSite.StartDragAndDrop(const P: TPoint): Boolean; -begin - Result := Controller.StartDragAndDrop(P); -end; - -procedure TcxGridSite.CancelPostBoundsChanged; -begin - FreeAndNil(FBoundsChangedTimer); -end; - -procedure TcxGridSite.InitTabStop(AParent: TWinControl); -begin - if (AParent <> nil) and (GridView.Level <> nil) then - GridView.TabStop := TcxGridLevel(GridView.Level).IsTop; -end; - -procedure TcxGridSite.PostBoundsChanged; -begin - if FBoundsChangedTimer <> nil then Exit; - FBoundsChangedTimer := TcxTimer.Create(nil); - with FBoundsChangedTimer do - begin - Interval := 1; - OnTimer := BoundsChangedTimerHandler; - end; -end; - -procedure TcxGridSite.UpdateSize; -begin - FSize := ClientBounds.BottomRight; -end; - -procedure TcxGridSite.BeginDragAndDrop; -begin - Controller.BeginDragAndDrop; - inherited; -end; - -procedure TcxGridSite.DragDrop(Source: TObject; X, Y: Integer); -begin - Controller.DragDrop(Source, X, Y); - inherited; -end; - -function TcxGridSite.ExecuteAction(Action: TBasicAction): Boolean; -begin - Result := inherited ExecuteAction(Action) or - GridView.Focused and GridView.DataController.ExecuteAction(Action); -end; - -procedure TcxGridSite.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); -var - APrevWidth, APrevHeight: Integer; -begin - APrevWidth := Width; - APrevHeight := Height; - inherited; - if (Width <> APrevWidth) or (Height <> APrevHeight) then - UpdateSize; -end; - -procedure TcxGridSite.SetFocus; -var - ALink: TcxObjectLink; -begin - ALink := cxAddObjectLink(Self); - try - if not GridView.Focused then - TcxCustomGrid(Container).FocusedView.Controller.BeforeKillFocus; - if ALink.Ref = nil then Exit; - inherited; - finally - cxRemoveObjectLink(ALink); - end; -end; - -function TcxGridSite.UpdateAction(Action: TBasicAction): Boolean; -begin - Result := inherited UpdateAction(Action) or - GridView.Focused and GridView.DataController.UpdateAction(Action); -end; - -{ TcxCustomGridCellViewInfo } - -constructor TcxCustomGridCellViewInfo.Create; -begin - inherited; - FVisible := True; -end; - -destructor TcxCustomGridCellViewInfo.Destroy; -begin - LinkedHitTest := nil; - if DropDownWindowExists and (DropDownWindow.Owner = IcxCustomGridPopupOwner(Self)) then - DropDownWindow.Owner := nil; - MouseCapture := False; - State := gcsNone; - inherited; -end; - -function TcxCustomGridCellViewInfo.GetBorderSize(AIndex: TcxBorder): Integer; -begin - if AIndex in Borders then - Result := BorderWidth[AIndex] - else - Result := 0; -end; - -function TcxCustomGridCellViewInfo.GetButtonState: TcxButtonState; -begin - Result := GridCellStateToButtonState(ActualState); -end; - -function TcxCustomGridCellViewInfo.GetClientBounds: TRect; -begin - if IsRectEmpty(FClientBounds) then - FClientBounds := CalculateClientBounds; - Result := FClientBounds; -end; - -function TcxCustomGridCellViewInfo.GetContentBounds: TRect; -begin - if IsRectEmpty(FContentBounds) then - FContentBounds := CalculateContentBounds; - Result := FContentBounds; -end; - -function TcxCustomGridCellViewInfo.GetTextBoundsValue: TRect; -begin - Result := GetTextBounds(True, True); -end; - -function TcxCustomGridCellViewInfo.GetTextHeight: Integer; -begin - Result := CalculateTextHeight(False); -end; - -function TcxCustomGridCellViewInfo.GetTextHeightWithOffset: Integer; -begin - Result := TextHeight; - GetCellTextAreaSize(Result); -end; - -function TcxCustomGridCellViewInfo.GetTextWidth: Integer; -begin - Result := CalculateTextWidth; -end; - -function TcxCustomGridCellViewInfo.GetTextWidthWithOffset: Integer; -begin - Result := TextWidth; - GetCellTextAreaSize(Result); -end; - -procedure TcxCustomGridCellViewInfo.SetLinkedHitTest(Value: TcxCustomGridHitTest); -var - APrevLinkedHitTest: TcxCustomGridHitTest; -begin - if FLinkedHitTest <> Value then - begin - APrevLinkedHitTest := FLinkedHitTest; - FLinkedHitTest := Value; - if (APrevLinkedHitTest <> nil) and (APrevLinkedHitTest.ViewInfo = Self) then - APrevLinkedHitTest.ViewInfo := nil; - if FLinkedHitTest <> nil then - FLinkedHitTest.ViewInfo := Self; - end; -end; - -procedure TcxCustomGridCellViewInfo.SetState(Value: TcxGridCellState); -var - APrevState: TcxGridCellState; -begin - if FState <> Value then - begin - BeforeStateChange; - APrevState := FState; - FState := Value; - StateChanged(APrevState); - end; -end; - -procedure TcxCustomGridCellViewInfo.DoCancelMode; -begin - State := gcsNone; -end; - -procedure TcxCustomGridCellViewInfo.MouseLeave; -begin - if not MouseCapture and - ((FState = gcsSelected) or not IsCheck and (FState = gcsPressed)) then - State := gcsNone; -end; - -function TcxCustomGridCellViewInfo.PtInCaller(const P: TPoint): Boolean; -begin - Result := HasPoint(P); -end; - -function TcxCustomGridCellViewInfo.ClosePopupWhenNilOwner: Boolean; -begin - Result := CloseDropDownWindowOnDestruction; -end; - -function TcxCustomGridCellViewInfo.GetOwnerBounds: TRect; -begin - Result := GetDropDownWindowOwnerBounds; -end; - -procedure TcxCustomGridCellViewInfo.PopupClosed; -begin - CloseUp; -end; - -procedure TcxCustomGridCellViewInfo.AfterCalculateBounds(var ABounds: TRect); -begin - ResetContentBounds; -end; - -procedure TcxCustomGridCellViewInfo.AfterCustomDraw(ACanvas: TcxCanvas); -begin - ACanvas.GetParams(Params); -end; - -procedure TcxCustomGridCellViewInfo.BeforeCustomDraw(ACanvas: TcxCanvas); -begin - ACanvas.SetParams(Params); -end; - -procedure TcxCustomGridCellViewInfo.BeforeStateChange; -begin -end; - -function TcxCustomGridCellViewInfo.CalculateClientBounds: TRect; -var - ABorder: TcxBorder; - ABorderSize: Integer; -begin - Result := Bounds; - for ABorder := Low(ABorder) to High(ABorder) do - begin - ABorderSize := BorderSize[ABorder]; - with Result do - case ABorder of - bLeft: - Inc(Left, ABorderSize); - bTop: - Inc(Top, ABorderSize); - bRight: - Dec(Right, ABorderSize); - bBottom: - Dec(Bottom, ABorderSize); - end; - end; -end; - -function TcxCustomGridCellViewInfo.CalculateContentBounds: TRect; -begin - Result := ClientBounds; -end; - -function TcxCustomGridCellViewInfo.CalculateTextWidth(AAngle: Integer = 0): Integer; -var - R: TRect; -begin - CalculateParams; - R := Rect(0, 0, MaxInt div 2, MaxInt div 2); - Canvas.Font := Params.Font; - if AAngle <> 0 then - Canvas.SetFontAngle(AAngle); -// Result := Canvas.TextWidth(Text); - Canvas.TextExtent(Text, R, - GetTextAttributes(False{AForPainting}) and not (cxAlignRight or cxAlignCenter) or cxAlignLeft); - if AAngle <> 0 then - Canvas.SetFontAngle(0); - Result := R.Right - R.Left; -end; - -function TcxCustomGridCellViewInfo.CalculateTextHeight(AForPainting: Boolean; - AAngle: Integer = 0): Integer; -var - R: TRect; -begin - CalculateParams; - R := TextAreaBounds; - Canvas.Font := Params.Font; - if AAngle <> 0 then - Canvas.SetFontAngle(AAngle); - Canvas.TextExtent(Text, R, - GetTextAttributes(AForPainting) and not (cxAlignBottom or cxAlignVCenter) or cxAlignTop); {1} - if AAngle <> 0 then - Canvas.SetFontAngle(0); - Result := R.Bottom - R.Top; -end; - -procedure TcxCustomGridCellViewInfo.CalculateParams; -begin - if FParamsCalculated or FCalculatingParams then Exit; - FCalculatingParams := True; - try - DoCalculateParams; - finally - FCalculatingParams := False; - FParamsCalculated := True; - end; -end; - -procedure TcxCustomGridCellViewInfo.CalculateParamsNeeded; -begin - FParamsCalculated := False; -end; - -function TcxCustomGridCellViewInfo.CalculateHeight: Integer; -begin - Result := Bounds.Bottom - Bounds.Top; -end; - -function TcxCustomGridCellViewInfo.CalculateWidth: Integer; -begin - Result := Bounds.Right - Bounds.Left; -end; - -function TcxCustomGridCellViewInfo.CaptureMouseOnPress: Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridCellViewInfo.Click; -begin -end; - -function TcxCustomGridCellViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := False; -end; - -function TcxCustomGridCellViewInfo.CustomDrawBackground(ACanvas: TcxCanvas): Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridCellViewInfo.Destroying; -begin - FIsDestroying := True; -end; - -procedure TcxCustomGridCellViewInfo.DoCalculateParams; -begin - AlignmentHorz := GetAlignmentHorz; - AlignmentVert := GetAlignmentVert; - GetViewParams(Params); - Borders := GetBorders; - Text := GetText; - MultiLine := GetMultiLine; - MultiLinePainting := GetMultiLinePainting; - Width := CalculateWidth; -end; - -procedure TcxCustomGridCellViewInfo.DoInvalidate; -begin - if Control <> nil then - Control.InvalidateRect(Bounds, False); -end; - -function TcxCustomGridCellViewInfo.DoCustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := HasCustomDraw; - if Result then - begin - BeforeCustomDraw(ACanvas); - Result := CustomDraw(ACanvas); - if not Result then - AfterCustomDraw(ACanvas); - end; -end; - -function TcxCustomGridCellViewInfo.DoCustomDrawBackground(ACanvas: TcxCanvas): Boolean; -begin - Result := HasCustomDrawBackground; - if Result then - begin - BeforeCustomDraw(ACanvas); - Result := CustomDrawBackground(ACanvas); - if not Result then - AfterCustomDraw(ACanvas); - end; -end; - -function TcxCustomGridCellViewInfo.GetActualState: TcxGridCellState; -begin - Result := FState; -end; - -function TcxCustomGridCellViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := taLeftJustify; -end; - -function TcxCustomGridCellViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaTop; -end; - -function TcxCustomGridCellViewInfo.GetAreaBounds: TRect; -begin - SetRectEmpty(Result); -end; - -function TcxCustomGridCellViewInfo.GetBackgroundBitmap: TBitmap; -begin {4} - Result := Params.Bitmap; - //Result := nil; -end; - -function TcxCustomGridCellViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := clDefault; -end; - -function TcxCustomGridCellViewInfo.GetBorderBounds(AIndex: TcxBorder): TRect; -begin - Result := ClientBounds; - with Result do - begin - case AIndex of - bLeft: - begin - Right := Left; - Dec(Left, BorderWidth[AIndex]); - end; - bTop: - begin - Bottom := Top; - Dec(Top, BorderWidth[AIndex]); - end; - bRight: - begin - Left := Right; - Inc(Right, BorderWidth[AIndex]); - end; - bBottom: - begin - Top := Bottom; - Inc(Bottom, BorderWidth[AIndex]); - end; - end; - if AIndex in [bLeft, bRight] then - begin - if bTop in Borders then - Dec(Top, BorderWidth[bTop]); - if bBottom in Borders then - Inc(Bottom, BorderWidth[bBottom]); - end; - end; -end; - -function TcxCustomGridCellViewInfo.GetBorders: TcxBorders; -begin - Result := []; -end; - -function TcxCustomGridCellViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := 0; -end; - -function TcxCustomGridCellViewInfo.GetBounds: TRect; -var - AArea: TRect; -begin - Result := Bounds; - AArea := GetAreaBounds; - if not IsRectEmpty(AArea) then - IntersectRect(Result, Result, AArea); -end; - -class function TcxCustomGridCellViewInfo.GetCellHeight(ATextHeight: Integer; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; -begin - Result := ATextHeight; - GetCellTextAreaSize(Result); -end; - -function TcxCustomGridCellViewInfo.GetContentHeight: Integer; -begin - with ContentBounds do - Result := Bottom - Top; -end; - -function TcxCustomGridCellViewInfo.GetContentWidth: Integer; -begin - with ContentBounds do - Result := Right - Left; -end; - -function TcxCustomGridCellViewInfo.GetControl: TcxControl; -begin - if (Canvas.Canvas is TControlCanvas) and - (TControlCanvas(Canvas.Canvas).Control is TcxControl) then - Result := TControlCanvas(Canvas.Canvas).Control as TcxControl - else - Result := nil; -end; - -function TcxCustomGridCellViewInfo.GetDesignSelectionBounds: TRect; -begin - Result := Bounds; - InflateRect(Result, -1, -1); -end; - -function TcxCustomGridCellViewInfo.GetDesignSelectionWidth: Integer; -begin - Result := cxDesignSelectionWidth; -end; - -function TcxCustomGridCellViewInfo.GetHeight: Integer; -begin - with Bounds do - Result := Bottom - Top; -end; - -function TcxCustomGridCellViewInfo.GetHotTrack: Boolean; -begin - Result := IsCheck; -end; - -function TcxCustomGridCellViewInfo.GetIsCheck: Boolean; -begin - Result := DropDownWindow <> nil; -end; - -function TcxCustomGridCellViewInfo.GetIsDesignSelected: Boolean; -begin - Result := False; -end; - -function TcxCustomGridCellViewInfo.GetIsVisibleForPainting: Boolean; -begin - Result := Visible; -end; - -function TcxCustomGridCellViewInfo.GetMouseCapture: Boolean; -begin - if Control = nil then - Result := False - else - Result := Control.MouseCaptureObject = Self; -end; - -function TcxCustomGridCellViewInfo.GetMultiLine: Boolean; -begin - Result := False; -end; - -function TcxCustomGridCellViewInfo.GetMultiLinePainting: Boolean; -begin - Result := MultiLine; -end; - -function TcxCustomGridCellViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxCustomGridCellPainter; -end; - -function TcxCustomGridCellViewInfo.GetShowEndEllipsis: Boolean; -begin - Result := False; -end; - -function TcxCustomGridCellViewInfo.GetText: string; -begin - Result := ''; -end; - -function TcxCustomGridCellViewInfo.GetTextAreaBounds: TRect; -begin - Result := ContentBounds; - InflateRect(Result, -cxGridCellTextOffset, -cxGridCellTextOffset); -end; - -function TcxCustomGridCellViewInfo.GetTextAttributes(AForPainting: Boolean): Integer; -const - MultiLines: array[Boolean] of Integer = (cxSingleLine, cxWordBreak); - ShowEndEllipsises: array[Boolean] of Integer = (0, cxShowEndEllipsis); -begin - Result := - cxAlignmentsHorz[AlignmentHorz] or cxAlignmentsVert[AlignmentVert] or - MultiLines[AForPainting and MultiLinePainting or not AForPainting and MultiLine] or - ShowEndEllipsises[ShowEndEllipsis]; -end; - -function TcxCustomGridCellViewInfo.GetTextBounds(AHorizontal, AVertical: Boolean): TRect; -var - ATextWidth, ATextHeight: Integer; -begin - Result := TextAreaBounds; - if AHorizontal then - begin - ATextWidth := TextWidth; - with Result do - begin - if MultiLinePainting and (ATextWidth > Right - Left) then Exit; - case AlignmentHorz of - taLeftJustify: - Right := Left + ATextWidth; - taRightJustify: - Left := Right - ATextWidth; - taCenter: - begin - Left := (Left + Right - ATextWidth) div 2; - Right := Left + ATextWidth; - end; - end; - end; - end; - if AVertical then - begin - ATextHeight := TextHeight; - with Result do - case AlignmentVert of - vaTop: - Bottom := Top + ATextHeight; - vaBottom: - Top := Bottom - ATextHeight; - vaCenter: - begin - Top := (Top + Bottom - ATextHeight) div 2; - Bottom := Top + ATextHeight; - end; - end; - end; -end; - -function TcxCustomGridCellViewInfo.GetTextCellHeight(AGridViewInfo: TcxCustomGridViewInfo; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; -begin - CalculateParams; - if MultiLine then - Result := TextHeight - else - Result := AGridViewInfo.GetFontHeight(Params.Font); - Result := GetCellHeight(Result, ALookAndFeelPainter); -end; - -function TcxCustomGridCellViewInfo.GetTextForPainting: string; -begin - Result := Text; -end; - -function TcxCustomGridCellViewInfo.GetTransparent: Boolean; -begin {4} - Result := BackgroundBitmap <> nil; -end; - -procedure TcxCustomGridCellViewInfo.GetViewParams(var AParams: TcxViewParams); -begin -end; - -function TcxCustomGridCellViewInfo.GetVisible: Boolean; -begin - Result := FVisible; -end; - -function TcxCustomGridCellViewInfo.GetVisibleForHitTest: Boolean; -begin - Result := Visible; -end; - -function TcxCustomGridCellViewInfo.GetWidth: Integer; -begin - with Bounds do - Result := Right - Left; -end; - -function TcxCustomGridCellViewInfo.HasBackground: Boolean; -begin - Result := True; -end; - -function TcxCustomGridCellViewInfo.HasCustomDraw: Boolean; -begin - Result := False; -end; - -function TcxCustomGridCellViewInfo.HasCustomDrawBackground: Boolean; -begin - Result := False; -end; - -function TcxCustomGridCellViewInfo.HasHitTestPoint(const P: TPoint): Boolean; -begin - Result := HasPoint(P); -end; - -function TcxCustomGridCellViewInfo.HasMouse(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := AHitTest is GetHitTestClass; -end; - -procedure TcxCustomGridCellViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - AHitTest.ViewInfo := Self; -end; - -function TcxCustomGridCellViewInfo.InvalidateOnStateChange: Boolean; -begin - Result := True; -end; - -procedure TcxCustomGridCellViewInfo.Offset(DX, DY: Integer); -begin - OffsetRect(Bounds, DX, DY); - if not IsRectEmpty(FClientBounds) then - OffsetRect(FClientBounds, DX, DY); - if not IsRectEmpty(FContentBounds) then - OffsetRect(FContentBounds, DX, DY); -end; - -procedure TcxCustomGridCellViewInfo.RestoreParams(const AParams: TcxViewParams); -begin - Params := AParams; -end; - -procedure TcxCustomGridCellViewInfo.SaveParams(out AParams: TcxViewParams); -begin - AParams := Params; -end; - -procedure TcxCustomGridCellViewInfo.SetHeight(Value: Integer); -begin - with Bounds do - Bottom := Top + Value; -end; - -procedure TcxCustomGridCellViewInfo.SetMouseCapture(Value: Boolean); -begin - if (Control <> nil) and (MouseCapture <> Value) then - if Value then - Control.MouseCaptureObject := Self - else - Control.MouseCaptureObject := nil; -end; - -procedure TcxCustomGridCellViewInfo.SetWidth(Value: Integer); -begin - with Bounds do - Right := Left + Value; -end; - -procedure TcxCustomGridCellViewInfo.StateChanged(APrevState: TcxGridCellState); -begin - if InvalidateOnStateChange then Invalidate; - case State of - gcsNone: - EndMouseTracking(Self); - gcsSelected: - if Control <> nil then - BeginMouseTracking(Control, Bounds, Self); - end; - if CaptureMouseOnPress then - case State of - gcsPressed: - MouseCapture := True; - {gcsNone: - MouseCapture := False; - commented because of the Offset happening during drag&drop} - end; - if (State = gcsPressed) and (DropDownWindow <> nil) then - DropDown; -end; - -procedure TcxCustomGridCellViewInfo.DropDown; -begin - if DropDownWindow.Visible then Exit; - DropDownWindow.Owner := Self; - DropDownWindow.Popup; -end; - -procedure TcxCustomGridCellViewInfo.CloseUp; -begin - State := gcsNone; -end; - -function TcxCustomGridCellViewInfo.CloseDropDownWindowOnDestruction: Boolean; -begin - Result := True; -end; - -function TcxCustomGridCellViewInfo.DropDownWindowExists: Boolean; -begin - Result := False; -end; - -function TcxCustomGridCellViewInfo.GetDropDownWindow: TcxCustomGridPopup; -begin - Result := nil; -end; - -function TcxCustomGridCellViewInfo.GetDropDownWindowOwnerBounds: TRect; -begin - Result := Bounds; -end; - -function TcxCustomGridCellViewInfo.IsDropDownWindowOwner: Boolean; -begin - Result := DropDownWindow.Owner = nil; -end; - -procedure TcxCustomGridCellViewInfo.AfterConstruction; -begin - inherited; - if not CloseDropDownWindowOnDestruction and DropDownWindowExists and - DropDownWindow.Visible and IsDropDownWindowOwner then - begin - DropDownWindow.Owner := Self; - State := gcsPressed; - end; -end; - -procedure TcxCustomGridCellViewInfo.AfterRecalculation; -begin -end; - -procedure TcxCustomGridCellViewInfo.BeforeDestruction; -begin - Destroying; - inherited; -end; - -procedure TcxCustomGridCellViewInfo.BeforeRecalculation; -begin - CalculateParamsNeeded; - //ResetContentBounds; -end; - -procedure TcxCustomGridCellViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - CalculateParams; - if AWidth = -1 then AWidth := CalculateWidth; - if AHeight = -1 then AHeight := CalculateHeight; - with Bounds do - begin - Left := ALeftBound; - Top := ATopBound; - Right := Left + AWidth; - Bottom := Top + AHeight; - end; - AfterCalculateBounds(Bounds); - FCalculated := True; -end; - -procedure TcxCustomGridCellViewInfo.Calculate(const ABounds: TRect); -begin - with ABounds do - Calculate(Left, Top, Max(0, Right - Left), Max(0, Bottom - Top)); -end; - -function TcxCustomGridCellViewInfo.GetAreaBoundsForPainting: TRect; -begin - Result := Bounds; -end; - -function TcxCustomGridCellViewInfo.GetBestFitWidth: Integer; -begin - Result := BorderSize[bLeft] + TextWidthWithOffset + BorderSize[bRight]; -end; - -function TcxCustomGridCellViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - if VisibleForHitTest and HasHitTestPoint(P) and (GetHitTestClass <> nil) then - begin - Result := GetHitTestClass.Instance(P); - InitHitTest(Result); - end - else - Result := nil; -end; - -function TcxCustomGridCellViewInfo.HasPoint(const P: TPoint): Boolean; -begin - Result := PtInRect(GetBounds, P); -end; - -procedure TcxCustomGridCellViewInfo.Invalidate; -begin - DoInvalidate; -end; - -function TcxCustomGridCellViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := False; - if (AButton = mbLeft) and HotTrack and HasMouse(AHitTest) then - begin - if IsCheck then - case FState of - gcsSelected: - State := gcsPressed; - gcsPressed: - State := gcsSelected; - end - else - State := gcsPressed; - Result := True; - end; -end; - -function TcxCustomGridCellViewInfo.MouseMove(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState): Boolean; -begin - Result := False; - if HotTrack then - if IsCheck then - if State <> gcsPressed then - begin - if HasMouse(AHitTest) then - State := gcsSelected - else - State := gcsNone; - Result := True; - end - else - else - begin - if HasMouse(AHitTest) then - if MouseCapture then - State := gcsPressed - else - State := gcsSelected - else - if MouseCapture then - State := gcsSelected - else - State := gcsNone; - Result := True; - end; -end; - -function TcxCustomGridCellViewInfo.MouseUp(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := False; - if (AButton = mbLeft) and not IsCheck then - begin - Result := State = gcsPressed; - State := gcsNone; - if Result then Click; - end; -end; - -procedure TcxCustomGridCellViewInfo.DoOffset(DX, DY: Integer); -begin - if not Calculated then - Exit; - Offset(DX, DY); - State := gcsNone; - MouseLeave; -end; - -procedure TcxCustomGridCellViewInfo.Paint(ACanvas: TcxCanvas = nil); -begin - {if ACanvas = nil then ACanvas := Canvas; - if Visible and ACanvas.RectVisible(Bounds) and (GetPainterClass <> nil) then - begin - with GetPainterClass.Create(ACanvas, Self) do - try - MainPaint; - finally - Free; - end; - end;} - if IsVisibleForPainting and (GetPainterClass <> nil) then - begin - if ACanvas = nil then ACanvas := Canvas; - with GetPainterClass.Create(ACanvas, Self) do - try - MainPaint; - finally - Free; - end; - end; -end; - -procedure TcxCustomGridCellViewInfo.Recalculate; -begin - BeforeRecalculation; - Calculate(Bounds); -end; - -procedure TcxCustomGridCellViewInfo.ResetContentBounds; -begin - SetRectEmpty(FClientBounds); - SetRectEmpty(FContentBounds); -end; - -procedure TcxCustomGridCellViewInfo.Update; -begin - Recalculate; - Invalidate; -end; - -{ TcxCustomGridViewCellViewInfo } - -constructor TcxCustomGridViewCellViewInfo.Create(AGridViewInfo: TcxCustomGridViewInfo); -begin - FGridViewInfo := AGridViewInfo; - inherited Create; -end; - -destructor TcxCustomGridViewCellViewInfo.Destroy; -begin - FGridViewInfo.RemoveActiveViewInfo(Self, True); - if Controller.HintCellViewInfo = Self then - Controller.HideHint; - inherited; -end; - -function TcxCustomGridViewCellViewInfo.GetController: TcxCustomGridController; -begin - Result := GridView.Controller; -end; - -function TcxCustomGridViewCellViewInfo.GetGridView: TcxCustomGridView; -begin - Result := FGridViewInfo.GridView; -end; - -function TcxCustomGridViewCellViewInfo.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := FGridViewInfo.LookAndFeelPainter; -end; - -function TcxCustomGridViewCellViewInfo.GetCanvas: TcxCanvas; -begin - Result := FGridViewInfo.Canvas; -end; - -procedure TcxCustomGridViewCellViewInfo.AfterCalculateBounds(var ABounds: TRect); -var - AHitTest: TcxCustomGridHitTest; -begin - inherited; - if EmulateMouseMoveAfterCalculate and HotTrack and - Control.HandleAllocated and GridViewInfo.Visible and - PtInRect(Bounds, GridViewInfo.MousePos) then - begin - AHitTest := GetHitTestClass.Instance(GridViewInfo.MousePos); - InitHitTest(AHitTest); - MouseMove(AHitTest, []); - end; -end; - -procedure TcxCustomGridViewCellViewInfo.DoInvalidate; -begin - GridView.ViewChanged(Bounds); -end; - -function TcxCustomGridViewCellViewInfo.EmulateMouseMoveAfterCalculate: Boolean; -begin - Result := False; -end; - -function TcxCustomGridViewCellViewInfo.GetControl: TcxControl; -begin - Result := GridView.Site; -end; - -function TcxCustomGridViewCellViewInfo.HasMouse(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := inherited HasMouse(AHitTest) and - (TcxCustomGridViewHitTest(AHitTest).GridView = GridView); -end; - -procedure TcxCustomGridViewCellViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - GridViewInfo.InitHitTest(AHitTest); -end; - -function TcxCustomGridViewCellViewInfo.CanShowHint: Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridViewCellViewInfo.CheckHint(AHitTest: TcxCustomGridHitTest); -var - AHintText: TCaption; - AIsHintMultiLine: Boolean; - ATextRect, R: TRect; -begin - if NeedShowHint(AHitTest.Pos, AHintText, AIsHintMultiLine, ATextRect) then - begin - R := GetAreaBoundsForHint; - if not IsRectEmpty(R) then - begin - IntersectRect(R, ATextRect, R); - if not IsRectEmpty(R) then ATextRect := R; - end; - Controller.ShowHint(GetBoundsForHint, ATextRect, AHintText, AIsHintMultiLine, - Params.Font, Self); - end - else - Controller.HideHint; -end; - -function TcxCustomGridViewCellViewInfo.GetAreaBoundsForHint: TRect; -begin - Result := GetAreaBounds; -end; - -function TcxCustomGridViewCellViewInfo.GetBoundsForHint: TRect; -var - R: TRect; -begin - Result := GetCellBoundsForHint; - R := GetAreaBoundsForHint; - if not IsRectEmpty(R) then - IntersectRect(Result, Result, R); -end; - -function TcxCustomGridViewCellViewInfo.GetCellBoundsForHint: TRect; -begin - Result := TextAreaBounds; -end; - -function TcxCustomGridViewCellViewInfo.GetHintText: string; -begin - Result := Text; -end; - -function TcxCustomGridViewCellViewInfo.GetHintTextRect(const AMousePos: TPoint): TRect; -begin - Result := TextAreaBounds; -end; - -function TcxCustomGridViewCellViewInfo.HasHintPoint(const P: TPoint): Boolean; -begin - Result := PtInRect(GetBoundsForHint, P); -end; - -procedure TcxCustomGridViewCellViewInfo.InitHint(const AMousePos: TPoint; - out AHintText: TCaption; out AIsHintMultiLine: Boolean; out ATextRect: TRect); -begin - AHintText := HintText; - AIsHintMultiLine := IsHintMultiLine; - ATextRect := GetHintTextRect(AMousePos); -end; - -function TcxCustomGridViewCellViewInfo.IsHintForText: Boolean; -begin - Result := True; -end; - -function TcxCustomGridViewCellViewInfo.IsHintMultiLine: Boolean; -begin - Result := MultiLinePainting; -end; - -function TcxCustomGridViewCellViewInfo.NeedShowHint(const AMousePos: TPoint; - out AHintText: TCaption; out AIsHintMultiLine: Boolean; out ATextRect: TRect): Boolean; -var - ATextBounds, R: TRect; -begin - Result := (HintText <> '') and HasHintPoint(AMousePos); - if Result then - begin - if IsHintForText then - begin - with TextAreaBounds do - Result := (CalculateTextHeight(True) > Bottom - Top) or - not MultiLinePainting and (TextWidth > Right - Left); - if not Result then - begin - ATextBounds := TextBounds; - IntersectRect(R, GetBoundsForHint, ATextBounds); - Result := not EqualRect(R, ATextBounds); - end; - end; - if Result then - InitHint(AMousePos, AHintText, AIsHintMultiLine, ATextRect); - end; -end; - -procedure TcxCustomGridViewCellViewInfo.BeforeRecalculation; -begin - GridViewInfo.UpdateMousePos; - inherited; -end; - -procedure TcxCustomGridViewCellViewInfo.Invalidate; -begin - if IsDestroying then Exit; - CalculateParams; - inherited; -end; - -function TcxCustomGridViewCellViewInfo.MouseMove(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState): Boolean; -begin - Result := inherited MouseMove(AHitTest, AShift); - if Visible and CanShowHint then - CheckHint(AHitTest); -end; - -{ TcxGridDesignSelectorViewInfo } - -destructor TcxGridDesignSelectorViewInfo.Destroy; -begin - DestroyRegion; - inherited; -end; - -function TcxGridDesignSelectorViewInfo.CalculateHeight: Integer; -begin - Result := DesignSelectorHeight; -end; - -function TcxGridDesignSelectorViewInfo.CalculateWidth: Integer; -begin - Result := DesignSelectorWidth; -end; - -function TcxGridDesignSelectorViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridDesignSelectorHitTest; -end; - -function TcxGridDesignSelectorViewInfo.GetHotTrack: Boolean; -begin - Result := True; -end; - -function TcxGridDesignSelectorViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridDesignSelectorPainter; -end; - -procedure TcxGridDesignSelectorViewInfo.GetViewParams(var AParams: TcxViewParams); -const - Colors: array[Boolean, Boolean] of TColor = - ((cxGridDesignViewColor, cxGridDesignViewHotColor), - (cxGridDesignSelectedColor, cxGridDesignSelectedHotColor)); - BorderColors: array[Boolean, Boolean] of TColor = - ((cxGridDesignViewBorderColor, cxGridDesignViewBorderColor), - (cxGridDesignSelectedBorderColor, cxGridDesignSelectedHotBorderColor)); -var - AObjectSelected: Boolean; -begin - AObjectSelected := GridView.Controller.DesignController.IsObjectSelected(GridView); - AParams.Color := GetRealColor(Colors[AObjectSelected, State = gcsSelected]); - AParams.TextColor := GetRealColor(BorderColors[AObjectSelected, State = gcsSelected]); -end; - -procedure TcxGridDesignSelectorViewInfo.CreateRegion; -var - Points: array[1..3] of TPoint; -begin - Points[1] := Point(0, 0); - Points[2] := Point(Width, 0); - Points[3] := Point(0, Height); - FRegion := TcxRegion.Create(CreatePolygonRgn(Points, Length(Points), WINDING)); - FRegion.Offset(Bounds.Left, Bounds.Top); -end; - -procedure TcxGridDesignSelectorViewInfo.DestroyRegion; -begin - FreeAndNil(FRegion); -end; - -procedure TcxGridDesignSelectorViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - DestroyRegion; - CreateRegion; -end; - -function TcxGridDesignSelectorViewInfo.HasPoint(const P: TPoint): Boolean; -begin - Result := Region.PtInRegion(P); -end; - -function TcxGridDesignSelectorViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - if AButton = mbLeft then - begin - GridView.Controller.DesignController.SelectObject(GridView, not (ssShift in AShift)); - Result := True; - end - else - Result := inherited MouseDown(AHitTest, AButton, AShift); -end; - -{ TcxCustomGridViewInfo } - -constructor TcxCustomGridViewInfo.Create(AGridView: TcxCustomGridView); -begin - inherited; - InitializeCriticalSection(FLock); - FActiveViewInfos := TList.Create; - FAllowCheckCoordinates := True; - FAllowHideSite := True; - CreateSite; - CreateViewInfos; -end; - -destructor TcxCustomGridViewInfo.Destroy; -begin - DestroySite; - FreeAndNil(FActiveViewInfos); - DeleteCriticalSection(FLock); - inherited; -end; - -function TcxCustomGridViewInfo.GetCalculated: Boolean; -begin - Result := not IsRectEmpty(Bounds); -end; - -function TcxCustomGridViewInfo.GetCanvas: TcxCanvas; -begin - Result := FSite.ActiveCanvas; -end; - -function TcxCustomGridViewInfo.GetClientBounds: TRect; -begin - if FClientBoundsAssigned then - Result := FClientBounds - else - Result := CalculateClientBounds; -end; - -function TcxCustomGridViewInfo.GetClientHeight: Integer; -begin - with ClientBounds do - Result := Bottom - Top; -end; - -function TcxCustomGridViewInfo.GetClientWidth: Integer; -begin - with ClientBounds do - Result := Right - Left; -end; - -{function TcxCustomGridViewInfo.GetIsCalculating: Boolean; -begin - Result := FIsCalculating or - GridView.IsDetail and GridView.MasterGridView.ViewInfo.IsCalculating; -end;} - -function TcxCustomGridViewInfo.GetIsInternalUseValue: Boolean; -begin - Result := GetIsInternalUse or - GridView.IsDetail and - (GridView.MasterGridView.ViewInfo <> nil) and - GridView.MasterGridView.ViewInfo.IsInternalUse; -end; - -procedure TcxCustomGridViewInfo.SetClientBounds(const Value: TRect); -begin - FClientBounds := Value; - FClientBoundsAssigned := True; -end; - -procedure TcxCustomGridViewInfo.CreateViewInfos; -begin - if GridView.IsDesigning then - FDesignSelectorViewInfo := GetDesignSelectorViewInfoClass.Create(Self); -end; - -procedure TcxCustomGridViewInfo.DestroyViewInfos(AIsRecreating: Boolean); -begin - FreeAndNil(FDesignSelectorViewInfo); -end; - -procedure TcxCustomGridViewInfo.RecreateViewInfos; -begin - FClientBoundsAssigned := False; - DestroyViewInfos(True); - CreateViewInfos; -end; - -function TcxCustomGridViewInfo.GetDesignSelectorViewInfoClass: TcxGridDesignSelectorViewInfoClass; -begin - Result := TcxGridDesignSelectorViewInfo; -end; - -function TcxCustomGridViewInfo.CanHideSite: Boolean; -var - AGrid: TcxCustomGrid; -begin - AGrid := TcxCustomGrid(Control); - Result := (Control = nil) or GridView.IsDestroying or - FAllowHideSite and not FSite.IsFocused and - ((AGrid.FocusedView = nil) or not FSite.ContainsControl(AGrid.FocusedView.Site)); -end; - -procedure TcxCustomGridViewInfo.CreateSite; -begin - FSite := GetSiteClass.Create(Self); -end; - -procedure TcxCustomGridViewInfo.DestroySite; -begin - FreeAndNil(FSite); -end; - -function TcxCustomGridViewInfo.GetSiteClass: TcxGridSiteClass; -begin - Result := TcxGridSite; -end; - -function TcxCustomGridViewInfo.GetSiteParent: TWinControl; -begin - if GridView.IsDetail then - Result := GridView.MasterGridView.Site - else - Result := Control; -end; - -procedure TcxCustomGridViewInfo.AddActiveViewInfo(AViewInfo: TObject); -begin - FActiveViewInfos.Add(AViewInfo); -end; - -function TcxCustomGridViewInfo.IsViewInfoActive(AViewInfo: TObject): Boolean; -begin - Result := FActiveViewInfos.IndexOf(AViewInfo) <> -1; -end; - -procedure TcxCustomGridViewInfo.RemoveActiveViewInfo(AViewInfo: TObject; - ARemoveAll: Boolean = False); -var - AIndex: Integer; -begin - repeat - AIndex := FActiveViewInfos.IndexOf(AViewInfo); - if AIndex = -1 then Break; - FActiveViewInfos.Delete(AIndex); - if not ARemoveAll then Break; - until False; -end; - -procedure TcxCustomGridViewInfo.AddScrollBarHeight(var AHeight: Integer); -begin - if Site.HScrollBarVisible then - Inc(AHeight, Site.HScrollBar.Height); -end; - -procedure TcxCustomGridViewInfo.AdjustClientBounds(var ABounds: TRect); -begin -end; - -procedure TcxCustomGridViewInfo.AfterCalculating; -begin - if not IsInternalUse then Controller.UpdateScrollBars(True); - if CanCheckCoordinates then Controller.DoCheckCoordinates; -end; - -procedure TcxCustomGridViewInfo.BeforeCalculating; -begin - UpdateMousePos; -end; - -procedure TcxCustomGridViewInfo.Calculate; -begin - if DesignSelectorViewInfo <> nil then - with GetDesignSelectorPos do - DesignSelectorViewInfo.Calculate(X, Y); -end; - -function TcxCustomGridViewInfo.CalculateClientBounds: TRect; -begin - Result := Bounds; -end; - -procedure TcxCustomGridViewInfo.CalculateHeight(const AMaxSize: TPoint; - var AHeight: Integer; var AFullyVisible: Boolean); -begin - AddScrollBarHeight(AHeight); -end; - -procedure TcxCustomGridViewInfo.CalculateWidth(const AMaxSize: TPoint; var AWidth: Integer); -begin - if Site.VScrollBarVisible then - Inc(AWidth, Site.VScrollBar.Width); - if AWidth > AMaxSize.X then AWidth := AMaxSize.X; -end; - -function TcxCustomGridViewInfo.CanCheckCoordinates: Boolean; -begin - Result := not IsInternalUse and FAllowCheckCoordinates; -end; - -procedure TcxCustomGridViewInfo.ControlFocusChanged; -begin -end; - -function TcxCustomGridViewInfo.DoGetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := TcxGridViewNoneHitTest.Instance(P); - InitHitTest(Result); -end; - -function TcxCustomGridViewInfo.GetAllowBoundsChangedNotification: Boolean; -begin - Result := not IsCalculating and not VisibilityChanging; -end; - -function TcxCustomGridViewInfo.GetBackgroundBitmap: TBitmap; -begin {4} - Result := GridView.BackgroundBitmaps.GetBitmap(bbBackground); -end; - -function TcxCustomGridViewInfo.GetBackgroundColor: TColor; -var - AParams: TcxViewParams; -begin - GridView.Styles.GetViewParams(vsBackground, nil, nil, AParams); - Result := AParams.Color; -end; - -function TcxCustomGridViewInfo.GetDesignSelectorPos: TPoint; -begin - Result := Bounds.TopLeft; -end; - -procedure TcxCustomGridViewInfo.GetHScrollBarBounds(var ABounds: TRect); -begin -end; - -function TcxCustomGridViewInfo.GetIsInternalUse: Boolean; -begin - Result := FIsInternalUse; -end; - -function TcxCustomGridViewInfo.GetVisible: Boolean; -begin - Result := not IsInternalUse and not FSizeCalculating and - not GridView.DataController.IsUpdatingItems; -end; - -procedure TcxCustomGridViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - (AHitTest as TcxCustomGridViewHitTest).GridView := GridView; -end; - -procedure TcxCustomGridViewInfo.UpdateMousePos; -begin - if FSite.Left = cxGridInvisibleCoordinate then Exit; - if FSite.HandleAllocated and not FSite.IsDesigning then - FMousePos := FSite.ScreenToClient(GetMouseCursorPos) - else - FMousePos := Point(MaxInt, MaxInt); -end; - -procedure TcxCustomGridViewInfo.VisibilityChanged(AVisible: Boolean); -begin - UpdateMousePos; - if AVisible then - FSite.Parent := GetSiteParent - else - if CanHideSite then - FSite.Parent := nil - else - FSite.Left := cxGridInvisibleCoordinate; -end; - -procedure TcxCustomGridViewInfo.BeforeDestruction; -begin - inherited; - DestroyViewInfos(False); -end; - -procedure TcxCustomGridViewInfo.DoVisibilityChanged(AVisible: Boolean); -begin - if Visible then - begin - FVisibilityChanging := True; - try - VisibilityChanged(AVisible and GridView.Visible); - finally - FVisibilityChanging := False; - end; - end; -end; - -function TcxCustomGridViewInfo.GetFontHeight(AFont: TFont): Integer; -begin - Canvas.Font := AFont; - Result := Canvas.TextHeight('Qq'); -end; - -procedure TcxCustomGridViewInfo.GetFontMetrics(AFont: TFont; out AMetrics: TTextMetric); -begin - Canvas.Font := AFont; - GetTextMetrics(Canvas.Handle, AMetrics); -end; - -procedure TcxCustomGridViewInfo.GetHeight(const AMaxSize: TPoint; var AHeight: Integer; - var AFullyVisible: Boolean); -begin - FSizeCalculating := True; - CalculateHeight(AMaxSize, AHeight, AFullyVisible); - FSizeCalculating := False; -end; - -function TcxCustomGridViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := nil; - if (Controller.CustomizationForm <> nil) and Site.HandleAllocated and - PtInRect(Controller.CustomizationForm.BoundsRect, Site.ClientToScreen(P)) then - begin - Result := TcxGridCustomizationFormHitTest.Instance(P); - InitHitTest(Result); - end - else - if DesignSelectorViewInfo <> nil then - Result := DesignSelectorViewInfo.GetHitTest(P); - if Result = nil then - Result := DoGetHitTest(P); -end; - -function TcxCustomGridViewInfo.GetHitTest(X, Y: Integer): TcxCustomGridHitTest; -begin - Result := GetHitTest(Point(X, Y)); -end; - -procedure TcxCustomGridViewInfo.GetWidth(const AMaxSize: TPoint; var AWidth: Integer); -begin - FSizeCalculating := True; - CalculateWidth(AMaxSize, AWidth); - FSizeCalculating := False; -end; - -procedure TcxCustomGridViewInfo.MainCalculate(const ABounds: TRect); - -//var ft,lt,i:integer; - -begin - if FIsCalculating {or GridView.IsPattern} then Exit; -{ - ft:=gettickcount; - for i:=1 to 1 + 9 * ord(not isinternaluse) do - begin -} - BeforeCalculating; - FIsCalculating := True; - try - FSite.BoundsRect := ABounds; - FBounds := FSite.ClientBounds; - Calculate; - finally - FIsCalculating := False; - AfterCalculating; - DoVisibilityChanged(True); - end; -{ - end; - lt:=gettickcount; - if not isinternaluse then - application.MainForm.Caption := inttostr(lt-ft) + ' - ' + application.MainForm.Caption; -} -end; - -procedure TcxCustomGridViewInfo.Recalculate; -begin - MainCalculate(FSite.BoundsRect); -end; - -{ TcxCustomGridViewInfoCacheItem } - -constructor TcxCustomGridViewInfoCacheItem.Create(AOwner: TcxCustomGridViewInfoCache; - AIndex: Integer); -begin - inherited Create; - FIndex := AIndex; - FOwner := AOwner; -end; - -procedure TcxCustomGridViewInfoCacheItem.UnassignValues(AKeepMaster: Boolean); -begin -end; - -{ TcxCustomGridViewInfoCache } - -constructor TcxCustomGridViewInfoCache.Create(AGridView: TcxCustomGridView); -begin - inherited; - FItems := TList.Create; -end; - -destructor TcxCustomGridViewInfoCache.Destroy; -begin - DestroyItems; - FItems.Free; - inherited; -end; - -function TcxCustomGridViewInfoCache.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxCustomGridViewInfoCache.GetInternalItem(Index: Integer): TcxCustomGridViewInfoCacheItem; -begin - Result := TcxCustomGridViewInfoCacheItem(FItems[Index]); -end; - -function TcxCustomGridViewInfoCache.GetItem(Index: Integer): TcxCustomGridViewInfoCacheItem; -begin - Result := InternalItems[Index]; - if Result = nil then - begin - Result := GetItemClass(Index).Create(Self, Index); - FItems[Index] := Result; - end; -end; - -procedure TcxCustomGridViewInfoCache.SetCount(Value: Integer); -begin - DestroyItems; - FItems.Count := Value; -end; - -procedure TcxCustomGridViewInfoCache.DestroyItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do TObject(FItems[I]).Free; - FItems.Clear; -end; - -procedure TcxCustomGridViewInfoCache.UnassignValues(AKeepMaster: Boolean = False); - - procedure ProcessItems; - var - I: Integer; - AItem: TcxCustomGridViewInfoCacheItem; - begin - for I := 0 to Count - 1 do - begin - AItem := InternalItems[I]; - if AItem <> nil then AItem.UnassignValues(AKeepMaster); - end; - end; - - procedure ProcessMasterItems; - var - AGridView: TcxCustomGridView; - AGridRecordIndex: Integer; - begin - AGridView := GridView; - while AGridView.IsDetail do - begin - AGridRecordIndex := AGridView.MasterGridRecordIndex; - AGridView := AGridView.MasterGridView; - if (AGridRecordIndex <> -1) and (AGridView.ViewInfoCache <> nil) then - AGridView.ViewInfoCache[AGridRecordIndex].UnassignValues(False); - end; - end; - -begin - if FUnassigningValues then Exit; - FUnassigningValues := True; - try - ProcessItems; - if not AKeepMaster then ProcessMasterItems; - finally - FUnassigningValues := False; - end; -end; - -{ TcxCustomGridOptions } - -constructor TcxCustomGridOptions.Create(AGridView: TcxCustomGridView); -begin - inherited Create(nil); - FGridView := AGridView; - if GridView <> nil then GridView.AddOptions(Self); -end; - -destructor TcxCustomGridOptions.Destroy; -begin - if GridView <> nil then GridView.RemoveOptions(Self); - inherited; -end; - -function TcxCustomGridOptions.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := GridView.LookAndFeelPainter; -end; - -procedure TcxCustomGridOptions.Changed(AChangeKind: TcxGridViewChangeKind); -begin - GridView.Changed(AChangeKind); -end; - -function TcxCustomGridOptions.GetGridViewValue: TcxCustomGridView; -begin - Result := FGridView; -end; - -procedure TcxCustomGridOptions.Notification(AComponent: TComponent; - AOperation: TOperation); -begin -end; - -procedure TcxCustomGridOptions.GetStoredProperties(AProperties: TStrings); -begin -end; - -procedure TcxCustomGridOptions.GetStoredPropertyValue(const AName: string; - var AValue: Variant); -begin -end; - -procedure TcxCustomGridOptions.SetStoredPropertyValue(const AName: string; - const AValue: Variant); -begin -end; - -procedure TcxCustomGridOptions.Assign(Source: TPersistent); -begin - if not (Source is TcxCustomGridOptions) then - inherited; -end; - -{ TcxCustomGridBackgroundBitmaps } - -constructor TcxCustomGridBackgroundBitmaps.Create(AGridView: TcxCustomGridView); -begin - inherited; - FItems := TList.Create; -end; - -destructor TcxCustomGridBackgroundBitmaps.Destroy; - - procedure ClearItems; - var - I: Integer; - begin - for I := 0 to Count - 1 do - if FItems[I] <> nil then TBitmap(FItems[I]).Free; - end; - -begin - ClearItems; - FItems.Free; - inherited; -end; - -function TcxCustomGridBackgroundBitmaps.GetCount: Integer; -begin - Result := FItems.Count; -end; - -procedure TcxCustomGridBackgroundBitmaps.BitmapChanged(Sender: TObject); -begin - Changed(vcLayout); -end; - -function TcxCustomGridBackgroundBitmaps.GetBitmapStyleIndex(Index: Integer): Integer; -begin - if Index = bbBackground then - Result := vsBackground - else - Result := -1; -end; - -function TcxCustomGridBackgroundBitmaps.GetDefaultBitmap(Index: Integer): TBitmap; -var - AStyleIndex: Integer; -begin - AStyleIndex := GetBitmapStyleIndex(Index); - if AStyleIndex = -1 then - Result := nil - else - Result := GridView.Styles.GetBitmap(AStyleIndex); -end; - -function TcxCustomGridBackgroundBitmaps.GetValue(Index: Integer): TBitmap; -begin - if Index >= Count then - FItems.Count := Index + 1; - if FItems[Index] = nil then - begin - FItems[Index] := TBitmap.Create; - TBitmap(FItems[Index]).OnChange := BitmapChanged; - end; - Result := TBitmap(FItems[Index]); -end; - -procedure TcxCustomGridBackgroundBitmaps.SetValue(Index: Integer; Value: TBitmap); -begin - Values[Index].Assign(Value); -end; - -procedure TcxCustomGridBackgroundBitmaps.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridBackgroundBitmaps then - with TcxCustomGridBackgroundBitmaps(Source) do - Self.Background := Background; - inherited; -end; - -function TcxCustomGridBackgroundBitmaps.GetBitmap(Index: Integer): TBitmap; -begin - Result := Values[Index]; - if Result.Empty then - Result := GetDefaultBitmap(Index); -end; - -{ TcxCustomGridOptionsBehavior } - -constructor TcxCustomGridOptionsBehavior.Create(AGridView: TcxCustomGridView); -begin - inherited; - FPostponedSynchronization := True; -end; - -function TcxCustomGridOptionsBehavior.GetPostponedSynchronization: Boolean; -begin - if GridView.PatternGridView = GridView then - Result := FPostponedSynchronization - else - Result := GridView.PatternGridView.OptionsBehavior.PostponedSynchronization; -end; - -procedure TcxCustomGridOptionsBehavior.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridOptionsBehavior then - PostponedSynchronization := TcxCustomGridOptionsBehavior(Source).PostponedSynchronization; - inherited; -end; - -{ TcxCustomGridOptionsView } - -function TcxCustomGridOptionsView.GetScrollBars: TScrollStyle; -begin - Result := GridView.Site.ScrollBars; -end; - -procedure TcxCustomGridOptionsView.SetScrollBars(Value: TScrollStyle); -begin - if ScrollBars <> Value then - begin - GridView.Site.ScrollBars := Value; - Changed(vcLayout); - end; -end; - -procedure TcxCustomGridOptionsView.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridOptionsView then - with TcxCustomGridOptionsView(Source) do - Self.ScrollBars := ScrollBars; - inherited; -end; - -{ TcxCustomGridStyles } - -function TcxCustomGridStyles.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := GridView.LookAndFeelPainter; -end; - -procedure TcxCustomGridStyles.Changed(AIndex: Integer); -begin - inherited; - if GridView <> nil then - begin - GridView.UpdateFakeLinks; - GridView.Changed(vcSize); - end; -end; - -procedure TcxCustomGridStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -var - AGrid: TcxCustomGrid; -begin - inherited; - AGrid := TcxCustomGrid(GridView.Control); - if AGrid = nil then - AParams.Font := GridView.Painter.Canvas.Font - else - AParams.Font := AGrid.Font; -end; - -procedure TcxCustomGridStyles.GetFakeComponentLinks(AList: TList); -var - I: Integer; - AOwner: TComponent; -begin - for I := 0 to Count - 1 do - begin - AOwner := Items[I].Item.Owner; - if (AOwner <> GridView.Owner) and (AList.IndexOf(AOwner) = -1) then - AList.Add(AOwner); - end; -end; - -{ TcxCustomGridViewStyles } - -procedure TcxCustomGridViewStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - inherited; - with AParams, LookAndFeelPainter do - case Index of - vsBackground: - begin - Color := DefaultContentColor; - TextColor := clGrayText; - end; - end; -end; - -function TcxCustomGridViewStyles.GetGridView: TcxCustomGridView; -begin - if GetOwner is TcxCustomGridView then - Result := TcxCustomGridView(GetOwner) - else - Result := nil; -end; - -procedure TcxCustomGridViewStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxCustomGridViewStyles then - with TcxCustomGridViewStyles(Source) do - Self.Background := Background; -end; - -{ TcxGridListenerLink } - -constructor TcxGridListenerLink.Create(AGridView: TcxCustomGridView); -begin - inherited Create; - FGridView := AGridView; -end; - -destructor TcxGridListenerLink.Destroy; -begin - if FGridView <> nil then - FGridView.RemoveListenerLink(Self); - inherited Destroy; -end; - -procedure TcxGridListenerLink.Clear; -begin - FGridView := nil; -end; - -{ TcxCustomGridView } - -constructor TcxCustomGridView.CreateCloned(AControl: TcxControl); -begin - CreateEx(AControl); -{$IFDEF DELPHI6} - FComponentStyle := FComponentStyle + [csTransient]; -{$ENDIF} -end; - -destructor TcxCustomGridView.Destroy; -begin - Focused := False; - if not IsPattern and (PatternGridView <> nil) then - PatternGridView.RemoveClone(Self); - if (FLevel <> nil) and (TcxGridLevel(FLevel).GridView = Self) then - TcxGridLevel(FLevel).GridView := nil; - if FRepository <> nil then - TcxGridViewRepositoryAccess(FRepository).RemoveItem(Self); {5} - DestroyHandlers; - DestroyOptions; - FClones.Free; - ClearListenerLinks; - FListenerLinks.Free; - inherited; -end; - -function TcxCustomGridView.GetClone(Index: Integer): TcxCustomGridView; -begin - Result := TcxCustomGridView(FClones[Index]); -end; - -function TcxCustomGridView.GetCloneCount: Integer; -begin - Result := FClones.Count; -end; - -function TcxCustomGridView.GetDragMode: TDragMode; -begin - Result := Site.DragMode; -end; - -function TcxCustomGridView.GetFocused: Boolean; -begin - Result := (Control <> nil){5} and (TcxCustomGrid(Control).FocusedView = Self); -end; - -function TcxCustomGridView.GetIsControlFocusedValue: Boolean; -var - AForm: TCustomForm; -begin - Result := not IsDesigning and (Control <> nil); - if Result then - begin - AForm := GetParentForm(Control); - if (AForm <> nil) and (TCustomFormAccess(AForm).FormStyle = fsMDIForm) then - Result := Control.IsFocused - else - Result := GetIsControlFocused; - end; -end; - -function TcxCustomGridView.GetIsDetail: Boolean; -begin - Result := (DataController <> nil) and DataController.IsDetailMode; -end; - -function TcxCustomGridView.GetIsMaster: Boolean; -begin - Result := (FLevel <> nil) and TcxGridLevel(FLevel).IsMaster; -end; - -function TcxCustomGridView.GetIsPattern: Boolean; -begin - Result := {(Level = nil) or }DataController.IsPattern; -end; - -function TcxCustomGridView.GetIsStoringNameMode: Boolean; -begin - Result := FStoringName <> ''; -end; - -function TcxCustomGridView.GetIsUpdating: Boolean; -begin - Result := csUpdating in ComponentState; -end; - -function TcxCustomGridView.GetLookAndFeel: TcxLookAndFeel; -begin - if Control = nil then - Result := nil - else - Result := TcxCustomGrid(Control).LookAndFeel; -end; - -function TcxCustomGridView.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - if Control = nil then - Result := TcxStandardLookAndFeelPainter - else - Result := TcxCustomGrid(Control).LookAndFeelPainter; -end; - -function TcxCustomGridView.GetMasterGridView: TcxCustomGridView; -begin - if IsDetail then - Result := (DataController.GetMasterDataController as IcxCustomGridDataController).GridView - else - Result := nil; -end; - -function TcxCustomGridView.GetMasterGridRecordIndex: Integer; -begin - if MasterRecordIndex <> -1 then - Result := MasterGridView.DataController.GetRowIndexByRecordIndex(MasterRecordIndex, False) - else - Result := -1; -end; - -function TcxCustomGridView.GetMasterRecordIndex: Integer; -begin - Result := DataController.GetMasterRecordIndex; -end; - -function TcxCustomGridView.GetOnDblClick: TNotifyEvent; -begin - Result := Site.OnDblClick; -end; - -function TcxCustomGridView.GetOnDragDrop: TDragDropEvent; -begin - Result := Site.OnDragDrop; -end; - -function TcxCustomGridView.GetOnDragOver: TDragOverEvent; -begin - Result := Site.OnDragOver; -end; - -function TcxCustomGridView.GetOnEndDrag: TEndDragEvent; -begin - Result := Site.OnEndDrag; -end; - -function TcxCustomGridView.GetOnKeyDown: TKeyEvent; -begin - Result := Site.OnKeyDown; -end; - -function TcxCustomGridView.GetOnKeyPress: TKeyPressEvent; -begin - Result := Site.OnKeyPress; -end; - -function TcxCustomGridView.GetOnKeyUp: TKeyEvent; -begin - Result := Site.OnKeyUp; -end; - -function TcxCustomGridView.GetOnMouseDown: TMouseEvent; -begin - Result := Site.OnMouseDown; -end; - -function TcxCustomGridView.GetOnMouseEnter: TNotifyEvent; -begin - Result := Site.OnMouseEnter; -end; - -function TcxCustomGridView.GetOnMouseLeave: TNotifyEvent; -begin - Result := Site.OnMouseLeave; -end; - -function TcxCustomGridView.GetOnMouseMove: TMouseMoveEvent; -begin - Result := Site.OnMouseMove; -end; - -function TcxCustomGridView.GetOnMouseUp: TMouseEvent; -begin - Result := Site.OnMouseUp; -end; - -function TcxCustomGridView.GetOnMouseWheel: TMouseWheelEvent; -begin - Result := Site.OnMouseWheel; -end; - -function TcxCustomGridView.GetOnMouseWheelDown: TMouseWheelUpDownEvent; -begin - Result := Site.OnMouseWheelDown; -end; - -function TcxCustomGridView.GetOnMouseWheelUp: TMouseWheelUpDownEvent; -begin - Result := Site.OnMouseWheelUp; -end; - -function TcxCustomGridView.GetOnStartDrag: TStartDragEvent; -begin - Result := Site.OnStartDrag; -end; - -function TcxCustomGridView.GetPatternGridView: TcxCustomGridView; -begin - Result := FPatternGridView; - if Result = nil then Result := Self; -end; - -function TcxCustomGridView.GetPopupMenu: TComponent; -begin - Result := Site.PopupMenu; -end; - -function TcxCustomGridView.GetSite: TcxGridSite; -begin - if FViewInfo = nil then - Result := nil - else - Result := FViewInfo.Site; -end; - -function TcxCustomGridView.GetSynchronization: Boolean; -begin - if PatternGridView = Self then - Result := FSynchronization - else - Result := PatternGridView.Synchronization; -end; - -procedure TcxCustomGridView.SetBackgroundBitmaps(Value: TcxCustomGridBackgroundBitmaps); -begin - FBackgroundBitmaps.Assign(Value); -end; - -procedure TcxCustomGridView.SetDragMode(Value: TDragMode); -begin - if DragMode <> Value then - begin - Site.DragMode := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetFocused(Value: Boolean); -begin - if Focused <> Value then - with TcxCustomGrid(Control) do - if Value then - FocusedView := Self - else - FocusedView := nil; -end; - -procedure TcxCustomGridView.SetIsRestoring(Value: Boolean); -begin - if FIsRestoring <> Value then - begin - FIsRestoring := Value; - if FIsRestoring then - BeforeRestoring - else - AfterRestoring; - end; -end; - -procedure TcxCustomGridView.SetSynchronization(Value: Boolean); -begin - if not IsPattern then Exit; - if FSynchronization <> Value then - begin - FSynchronization := Value; - if Value then - Synchronize - else - FSynchronizationNeeded := False; - end; -end; - -procedure TcxCustomGridView.SetOnCustomization(Value: TNotifyEvent); -begin - if @FOnCustomization <> @Value then - begin - FOnCustomization := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnDblClick(Value: TNotifyEvent); -begin - if @OnDblClick <> @Value then - begin - Site.OnDblClick := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnDragDrop(Value: TDragDropEvent); -begin - if @OnDragDrop <> @Value then - begin - Site.OnDragDrop := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnDragOver(Value: TDragOverEvent); -begin - if @OnDragOver <> @Value then - begin - Site.OnDragOver := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnEndDrag(Value: TEndDragEvent); -begin - if @OnEndDrag <> @Value then - begin - Site.OnEndDrag := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnGetStoredProperties(Value: TcxGridViewGetStoredPropertiesEvent); -begin - if @FOnGetStoredProperties <> @Value then - begin - FOnGetStoredProperties := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnGetStoredPropertyValue(Value: TcxGridViewGetStoredPropertyValueEvent); -begin - if @FOnGetStoredPropertyValue <> @Value then - begin - FOnGetStoredPropertyValue := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnInitStoredObject(Value: TcxGridInitStoredObjectEvent); -begin - if @FOnInitStoredObject <> @Value then - begin - FOnInitStoredObject := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnKeyDown(Value: TKeyEvent); -begin - if @OnKeyDown <> @Value then - begin - Site.OnKeyDown := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnKeyPress(Value: TKeyPressEvent); -begin - if @OnKeyPress <> @Value then - begin - Site.OnKeyPress := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnKeyUp(Value: TKeyEvent); -begin - if @OnKeyUp <> @Value then - begin - Site.OnKeyUp := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnMouseDown(Value: TMouseEvent); -begin - if @OnMouseDown <> @Value then - begin - Site.OnMouseDown := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnMouseEnter(Value: TNotifyEvent); -begin - if @OnMouseEnter <> @Value then - begin - Site.OnMouseEnter := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnMouseLeave(Value: TNotifyEvent); -begin - if @OnMouseLeave <> @Value then - begin - Site.OnMouseLeave := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnMouseMove(Value: TMouseMoveEvent); -begin - if @OnMouseMove <> @Value then - begin - Site.OnMouseMove := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnMouseUp(Value: TMouseEvent); -begin - if @OnMouseUp <> @Value then - begin - Site.OnMouseUp := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnMouseWheel(Value: TMouseWheelEvent); -begin - if @OnMouseWheel <> @Value then - begin - Site.OnMouseWheel := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnMouseWheelDown(Value: TMouseWheelUpDownEvent); -begin - if @OnMouseWheelDown <> @Value then - begin - Site.OnMouseWheelDown := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnMouseWheelUp(Value: TMouseWheelUpDownEvent); -begin - if @OnMouseWheelUp <> @Value then - begin - Site.OnMouseWheelUp := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnSetStoredPropertyValue(Value: TcxGridViewSetStoredPropertyValueEvent); -begin - if @FOnSetStoredPropertyValue <> @Value then - begin - FOnSetStoredPropertyValue := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOnStartDrag(Value: TStartDragEvent); -begin - if @OnStartDrag <> @Value then - begin - Site.OnStartDrag := Value; - Changed(vcProperty); - end; -end; - -procedure TcxCustomGridView.SetOptionsBehavior(Value: TcxCustomGridOptionsBehavior); -begin - FOptionsBehavior.Assign(Value); -end; - -procedure TcxCustomGridView.SetOptionsData(Value: TcxCustomGridOptionsData); -begin - FOptionsData.Assign(Value); -end; - -procedure TcxCustomGridView.SetOptionsSelection(Value: TcxCustomGridOptionsSelection); -begin - FOptionsSelection.Assign(Value); -end; - -procedure TcxCustomGridView.SetOptionsView(Value: TcxCustomGridOptionsView); -begin - FOptionsView.Assign(Value); -end; - -procedure TcxCustomGridView.SetPopupMenu(Value: TComponent); -begin - if PopupMenu <> Value then - begin - Site.PopupMenu := Value; - Changed(vcProperty) - end; -end; - -procedure TcxCustomGridView.SetStyles(Value: TcxCustomGridStyles); -begin - FStyles.Assign(Value); -end; - -procedure TcxCustomGridView.ClearListenerLinks; -var - I: Integer; -begin - for I := FListenerLinks.Count - 1 downto 0 do - RemoveListenerLink(TcxGridListenerLink(FListenerLinks[I])); -end; - -function TcxCustomGridView.GetObjectName: string; -begin - if IsStoringNameMode then - Result := FStoringName - else - Result := Name; -end; - -function TcxCustomGridView.GetProperties(AProperties: TStrings): Boolean; -begin - AProperties.Add('Version'); - if Assigned(FOnGetStoredProperties) then - FOnGetStoredProperties(Self, AProperties); - Result := True; -end; - -procedure TcxCustomGridView.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'Version' then - AValue := StoringVersion; - if Assigned(FOnGetStoredPropertyValue) then - FOnGetStoredPropertyValue(Self, AName, AValue); -end; - -procedure TcxCustomGridView.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'Version' then - FStoredVersion := AValue; - if Assigned(FOnSetStoredPropertyValue) then - FOnSetStoredPropertyValue(Self, AName, AValue); -end; - -function TcxCustomGridView.CreateChild(const AObjectName, AClassName: string): TObject; -begin - Result := CreateStoredObject(AObjectName, AClassName); - if not IsStoringNameMode and (Result is TComponent) then - TComponent(Result).Name := AObjectName; - DoInitStoredObject(Result); -end; - -function TcxCustomGridView.CreateStoredObject(const AObjectName, AClassName: string): TObject; -begin - Result := nil; -end; - -procedure TcxCustomGridView.DeleteChild(const AObjectName: string; AObject: TObject); -begin - AObject.Free; -end; - -procedure TcxCustomGridView.GetStoredChildren(AChildren: TStringList); -begin -end; - -procedure TcxCustomGridView.AssignLayout(ALayoutView: TcxCustomGridView); -begin -end; - -procedure TcxCustomGridView.BeforeEditLayout(ALayoutView: TcxCustomGridView); -begin -end; - -procedure TcxCustomGridView.DoAssignLayout(ALayoutView: TcxCustomGridView); -begin - BeginUpdate; - try - AssignLayout(ALayoutView); - finally - EndUpdate; - end; -end; - -function TcxCustomGridView.GetLayoutCustomizationFormButtonCaption: string; -begin - Result := ''; -end; - -function TcxCustomGridView.HasLayoutCustomizationForm: Boolean; -begin - Result := False; -end; - -function TcxCustomGridView.IsLayoutChangeable: Boolean; -begin - Result := True; -end; - -procedure TcxCustomGridView.RunLayoutCustomizationForm; -begin - Controller.Customization := True; -end; - -procedure TcxCustomGridView.GetFakeComponentLinks(AList: TList); -begin - inherited; - (FDataController as IcxCustomGridDataController).GetFakeComponentLinks(AList); - FStyles.GetFakeComponentLinks(AList); -end; - -function TcxCustomGridView.GetIsDestroying: Boolean; -begin - Result := inherited GetIsDestroying or - IsDetail and MasterGridView.IsDestroying; -end; - -procedure TcxCustomGridView.Loaded; -begin - inherited; - LoadingComplete; - DataController.Loaded; - Init; -end; - -procedure TcxCustomGridView.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited; - NotifyOptions(AComponent, Operation); -end; - -procedure TcxCustomGridView.SetControl(Value: TcxControl); -begin - if Control <> Value then - begin - if Control <> nil then - begin - TcxCustomGrid(Control).RemoveFontListener(FStyles); {5} - if Control.IsDesigning and (Site <> nil) then - Control.RemoveComponent(Site); - end; - inherited; - if Control <> nil then - begin - if (FStorageControl = nil) and (FRepository = nil) then - FStorageControl := Value; - if Control.IsDesigning then - Control.InsertComponent(Site); - TcxCustomGrid(Control).AddFontListener(FStyles); - end; - end; -end; - -procedure TcxCustomGridView.SetName(const NewName: TComponentName); -begin - inherited; - NotifyControl(vcnName); -end; - -procedure TcxCustomGridView.Updated; -begin - inherited; - EndUpdate; -end; - -procedure TcxCustomGridView.Updating; -begin - BeginUpdate; - inherited; -end; - -procedure TcxCustomGridView.CreateHandlers; -begin - FController := GetControllerClass.Create(Self); - FDataController := GetDataControllerClass.Create(Self); - InitDataController; - FPainter := GetPainterClass.Create(Self); - FViewData := GetViewDataClass.Create(Self); - FViewInfo := CreateViewInfo; - if GetViewInfoCacheClass <> nil then - FViewInfoCache := GetViewInfoCacheClass.Create(Self); -end; - -procedure TcxCustomGridView.DestroyHandlers; -begin - FDataController.Free; - FDataController := nil; -// FreeAndNil(FViewInfoCache); - if (Control <> nil) and Control.IsDesigning then - Control.RemoveComponent(Site); - FViewInfo.Free; - FViewInfo := nil; - FreeAndNil(FViewInfoCache); - FreeAndNil(FViewData); - FreeAndNil(FPainter); - FreeAndNil(FController); -end; - -procedure TcxCustomGridView.InitDataController; -begin - FDataController.OnUpdateControl := UpdateControl; -end; - -procedure TcxCustomGridView.CreateOptions; -begin - FOptionsList := TList.Create; - FBackgroundBitmaps := GetBackgroundBitmapsClass.Create(Self); - FOptionsBehavior := GetOptionsBehaviorClass.Create(Self); - FOptionsData := GetOptionsDataClass.Create(Self); - FOptionsSelection := GetOptionsSelectionClass.Create(Self); - FOptionsView := GetOptionsViewClass.Create(Self); - FStyles := GetStylesClass.Create(Self); -end; - -procedure TcxCustomGridView.DestroyOptions; -begin - if Control <> nil then {5} - TcxCustomGrid(Control).RemoveFontListener(FStyles); - FreeAndNil(FStyles); - FreeAndNil(FOptionsView); - FreeAndNil(FOptionsSelection); - FreeAndNil(FOptionsData); - FreeAndNil(FOptionsBehavior); - FreeAndNil(FBackgroundBitmaps); - FreeAndNil(FOptionsList); -end; - -procedure TcxCustomGridView.AddOptions(AOptions: TcxCustomGridOptions); -begin - FOptionsList.Add(AOptions); -end; - -procedure TcxCustomGridView.RemoveOptions(AOptions: TcxCustomGridOptions); -begin - FOptionsList.Remove(AOptions); -end; - -procedure TcxCustomGridView.NotifyOptions(AComponent: TComponent; - AOperation: TOperation); -var - I: Integer; -begin - if FOptionsList = nil then Exit; - for I := 0 to FOptionsList.Count - 1 do - TcxCustomGridOptions(FOptionsList[I]).Notification(AComponent, AOperation); -end; - -procedure TcxCustomGridView.AddClone(AClone: TcxCustomGridView); -begin - FClones.Add(AClone); - AClone.FPatternGridView := Self; -end; - -procedure TcxCustomGridView.RemoveClone(AClone: TcxCustomGridView); -begin - FClones.Remove(AClone); - AClone.FPatternGridView := nil; -end; - -function TcxCustomGridView.AddListenerLink: TcxGridListenerLink; -begin - Result := TcxGridListenerLink.Create(Self); - FListenerLinks.Add(Result); -end; - -procedure TcxCustomGridView.RemoveListenerLink(ALink: TcxGridListenerLink); -begin - ALink.Clear; - FListenerLinks.Remove(ALink); -end; - -procedure TcxCustomGridView.Synchronize(ACheckUpdateLock: Boolean = True); -var - I: Integer; -begin - if IsLoading or IsDestroying or (Control = nil) or - not IsSynchronization or FAssigningPattern or FSynchronizationAssignNeeded then - Exit; - if ACheckUpdateLock and IsUpdateLocked then - begin - FSynchronizationNeeded := True; - Exit; - end; - FIsSynchronizing := True; - try - if IsPattern then - begin - BeginUpdate; - try - for I := 0 to CloneCount - 1 do - Clones[I].Synchronize(Self); - finally - EndUpdate; - end; - end - else - PatternGridView.Synchronize(Self); - finally - FIsSynchronizing := False; - FSynchronizationNeeded := False; - end; -end; - -procedure TcxCustomGridView.Synchronize(AView: TcxCustomGridView); -begin - if not IsSynchronization or FIsSynchronizing or FAssigningPattern then Exit; - if OptionsBehavior.PostponedSynchronization and not IsPattern and not Visible then - begin - FSynchronizationAssignNeeded := True; - Exit; - end; - BeginUpdate; - try - AssignPattern(AView); - if IsPattern then Synchronize; - finally - EndUpdate; - FSynchronizationAssignNeeded := False; - end; -end; - -procedure TcxCustomGridView.AssignPattern(APattern: TcxCustomGridView); -begin - FAssigningPattern := True; - try - Assign(APattern); - finally - FAssigningPattern := False; - end; -end; - -procedure TcxCustomGridView.BeforeAssign(ASource: TcxCustomGridView); -begin - if not AssigningSettings then - DataController.Assign(ASource.DataController); -end; - -procedure TcxCustomGridView.DoAssign(ASource: TcxCustomGridView); -begin - with ASource do - begin - Self.BackgroundBitmaps := BackgroundBitmaps; - Self.DragMode := DragMode; - Self.OptionsBehavior := OptionsBehavior; - Self.OptionsData := OptionsData; - Self.OptionsSelection := OptionsSelection; - Self.OptionsView := OptionsView; - Self.PopupMenu := PopupMenu; - Self.Styles := Styles; - Self.Synchronization := Synchronization; - Self.OnCustomization := OnCustomization; - Self.OnDblClick := OnDblClick; - Self.OnDragDrop := OnDragDrop; - Self.OnDragOver := OnDragOver; - Self.OnEndDrag := OnEndDrag; - Self.OnGetStoredProperties := OnGetStoredProperties; - Self.OnGetStoredPropertyValue := OnGetStoredPropertyValue; - Self.OnInitStoredObject := OnInitStoredObject; - Self.OnKeyDown := OnKeyDown; - Self.OnKeyPress := OnKeyPress; - Self.OnKeyUp := OnKeyUp; - Self.OnMouseDown := OnMouseDown; - Self.OnMouseEnter := OnMouseEnter; - Self.OnMouseLeave := OnMouseLeave; - Self.OnMouseMove := OnMouseMove; - Self.OnMouseUp := OnMouseUp; - Self.OnMouseWheel := OnMouseWheel; - Self.OnMouseWheelDown := OnMouseWheelDown; - Self.OnMouseWheelUp := OnMouseWheelUp; - Self.OnSetStoredPropertyValue := OnSetStoredPropertyValue; - Self.OnStartDrag := OnStartDrag; - Self.Init; - end -end; - -procedure TcxCustomGridView.DoAssignSettings(ASource: TcxCustomGridView); -begin - Assign(ASource); -end; - -procedure TcxCustomGridView.AfterAssign(ASource: TcxCustomGridView); -begin - if not AssigningSettings then - DataController.Assign(ASource.DataController); -end; - -procedure TcxCustomGridView.BeforeRestoring; -begin -end; - -procedure TcxCustomGridView.AfterRestoring; -begin - RestoringComplete; -end; - -{procedure TcxCustomGridView.BeforeLevelChange; -begin -end;} - -function TcxCustomGridView.CanTabStop: Boolean; -begin - Result := TcxCustomGrid(Control).TabStop; -end; - -procedure TcxCustomGridView.DetailDataChanged(ADetail: TcxCustomGridView); -begin -end; - -procedure TcxCustomGridView.DetailVisibleChanged(ADetailLevel: TComponent; - APrevVisibleDetailCount, AVisibleDetailCount: Integer); -begin -end; - -procedure TcxCustomGridView.DoChanged(AChangeKind: TcxGridViewChangeKind); -begin - NotifyControllerAboutChange; -end; - -function TcxCustomGridView.GetChangeable: Boolean; -begin - Result := (Visible or IsPattern) and (Control <> nil); -end; - -function TcxCustomGridView.GetCustomVisible(ALevelVisible: Boolean): Boolean; -begin - Result := ALevelVisible and not IsPattern and - (not IsDetail or MasterGridView.Visible and MasterGridView.IsDetailVisible(Self)); -end; - -function TcxCustomGridView.GetIsControlFocused: Boolean; -begin - Result := Control.IsFocused; -end; - -function TcxCustomGridView.GetResizeOnBoundsChange: Boolean; -begin - Result := False; -end; - -function TcxCustomGridView.GetVisible: Boolean; -begin - Result := not IsDestroying and - GetCustomVisible((FLevel <> nil) and TcxGridLevel(FLevel).ActuallyVisible); -end; - -procedure TcxCustomGridView.Init; -begin -end; - -function TcxCustomGridView.IsDetailVisible(AGridView: TcxCustomGridView): Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridView.LoadingComplete; -begin - SizeChanged; -end; - -procedure TcxCustomGridView.NotifyControl(AChangeKind: TcxGridViewChangeNotificationKind); -begin - if Control <> nil then - TcxCustomGridAccess(Control).ViewChanged(Self, AChangeKind); -end; - -procedure TcxCustomGridView.NotifyControllerAboutChange; -begin - if IsUpdateLocked then - FIsChangeNotificationForControllerNeeded := True - else - begin - FIsChangeNotificationForControllerNeeded := False; - if Controller <> nil then - Controller.GridViewChanged; - end; -end; - -procedure TcxCustomGridView.RestoringComplete; -begin -end; - -procedure TcxCustomGridView.SetLevel(Value: TComponent); -begin - if FLevel <> Value then - begin - //BeforeLevelChange; - if FLevel <> nil then - Controller.VisibilityChanged(False); - FLevel := Value; - Site.InitTabStop(Site.Parent); - end; -end; - -procedure TcxCustomGridView.SetTabStop(Value: Boolean); -begin - Site.TabStop := Value and CanTabStop; -end; - -procedure TcxCustomGridView.UpdateControl(AInfo: TcxUpdateControlInfo); -begin - if not (IsLoading or IsDestroying or IsPattern) and (AInfo is TcxDataChangedInfo) then - if IsDetail then - if (MasterGridView <> nil) and not MasterGridView.IsUpdateLocked and - (MasterGridView.DataController.LockCount = 0) and - (PatternGridView <> nil) and PatternGridView.HasAsClone(Self) then - MasterGridView.DetailDataChanged(Self) - else - else - if Control <> nil then // ext lookup editor - TcxCustomGrid(Control).RootViewDataChanged(Self); -end; - -procedure TcxCustomGridView.UpdateUnlocked; -begin - if FIsChangeNotificationForControllerNeeded then - NotifyControllerAboutChange; - if FIsCustomizationFormRefreshNeeded then - RefreshCustomizationForm; -end; - -function TcxCustomGridView.GetViewInfoCacheClass: TcxCustomGridViewInfoCacheClass; -begin - Result := nil; -end; - -function TcxCustomGridView.GetBackgroundBitmapsClass: TcxCustomGridBackgroundBitmapsClass; -begin - Result := TcxCustomGridBackgroundBitmaps; -end; - -function TcxCustomGridView.GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; -begin - Result := TcxCustomGridOptionsBehavior; -end; - -function TcxCustomGridView.GetOptionsDataClass: TcxCustomGridOptionsDataClass; -begin - Result := TcxCustomGridOptionsData; -end; - -function TcxCustomGridView.GetOptionsSelectionClass: TcxCustomGridOptionsSelectionClass; -begin - Result := TcxCustomGridOptionsSelection; -end; - -function TcxCustomGridView.GetOptionsViewClass: TcxCustomGridOptionsViewClass; -begin - Result := TcxCustomGridOptionsView; -end; - -function TcxCustomGridView.GetStylesClass: TcxCustomGridViewStylesClass; -begin - Result := TcxCustomGridViewStyles; -end; - -procedure TcxCustomGridView.Initialize; -begin - inherited Initialize; - FListenerLinks := TList.Create; - FClones := TList.Create; - FSynchronization := True; - CreateOptions; - CreateHandlers; -end; - -procedure TcxCustomGridView.RefreshCustomizationForm; -begin - if IsUpdateLocked then - FIsCustomizationFormRefreshNeeded := True - else - begin - FIsCustomizationFormRefreshNeeded := False; - if Controller <> nil then - Controller.RefreshCustomizationForm; - end; -end; - -procedure TcxCustomGridView.DoCustomization; -begin - if Assigned(FOnCustomization) then FOnCustomization(Self); -end; - -procedure TcxCustomGridView.DoInitStoredObject(AObject: TObject); -begin - if (AObject <> nil) and Assigned(FOnInitStoredObject) then - FOnInitStoredObject(Self, AObject); -end; - -procedure TcxCustomGridView.Assign(Source: TPersistent); -begin - if Source is TcxCustomGridView then - begin - BeginUpdate; - try - BeforeAssign(TcxCustomGridView(Source)); - DoAssign(TcxCustomGridView(Source)); - AfterAssign(TcxCustomGridView(Source)); - finally - EndUpdate; - end; - end - else - inherited; -end; - -procedure TcxCustomGridView.AssignSettings(ASource: TcxCustomGridView); -begin - FAssigningSettings := True; - try - DoAssignSettings(ASource); - finally - FAssigningSettings := False; - end; -end; - -function TcxCustomGridView.CanFocus: Boolean; -begin - Result := GetCustomVisible((FLevel <> nil) and TcxGridLevel(FLevel).CanBeVisible); -end; - -function TcxCustomGridView.GetParentComponent: TComponent; -begin {5} - Result := FStorageControl; - if Result = nil then - Result := FRepository; -end; - -function TcxCustomGridView.HasParent: Boolean; -begin {5} - Result := (FStorageControl <> nil) or (FRepository <> nil); -end; - -function TcxCustomGridView.HasAsClone(AGridView: TcxCustomGridView): Boolean; -begin - Result := FClones.IndexOf(AGridView) <> -1; -end; - -function TcxCustomGridView.HasAsMaster(AGridView: TcxCustomGridView): Boolean; -begin - Result := (MasterGridView = AGridView) or - (MasterGridView <> nil) and MasterGridView.HasAsMaster(AGridView); -end; - -procedure TcxCustomGridView.Invalidate(AHardUpdate: Boolean = False); -var - I: Integer; -begin - if IsPattern then - for I := 0 to CloneCount - 1 do - Clones[I].Invalidate(AHardUpdate) - else - if AHardUpdate then - LayoutChanged - else - ViewChanged; -end; - -procedure TcxCustomGridView.RestoreDefaults; -begin -end; - -procedure TcxCustomGridView.SetParentComponent(Value: TComponent); -begin {5} - inherited; - if Value is TcxGridViewRepository then - TcxGridViewRepositoryAccess(Value).AddItem(Self); -end; - -procedure TcxCustomGridView.CheckSynchronizationAssignNeeded; -begin - if FSynchronizationAssignNeeded then - begin - BeginUpdate; - try - Synchronize(PatternGridView); - finally - CancelUpdate; - end; - end; -end; - -function TcxCustomGridView.IsSynchronization: Boolean; -begin - Result := Synchronization or IsDesigning; -end; - -procedure TcxCustomGridView.BeginUpdate; -begin - if Control <> nil then - TcxCustomGrid(Control).BeginUpdate; - Inc(FUpdateLockCount); - if DataController <> nil then - DataController.BeginUpdate; -end; - -procedure TcxCustomGridView.CancelUpdate; -begin - try - if DataController <> nil then - DataController.EndUpdate; - if IsUpdateLocked then - begin - Dec(FUpdateLockCount); - if not IsUpdateLocked then - FSynchronizationNeeded := False; - end; - finally - if Control <> nil then {5} - TcxCustomGrid(Control).CancelUpdate; - end; -end; - -function TcxCustomGridView.Changed(AGridChange: TObject): Boolean; -begin - Result := True; - if IsLoading or IsDestroying {or IsPattern} or - (FViewInfo = nil) or FViewInfo.IsCalculating then - begin - AGridChange.Free; - Result := False; - end - else - if Control = nil{5} then - try - with AGridChange as TcxCustomGridChange do {7} - begin - Control := nil; - Execute; - end - finally - AGridChange.Free; - end - else - TcxCustomGrid(Control).Changed(AGridChange as TcxCustomGridChange); -end; - -procedure TcxCustomGridView.EndUpdate; -begin - try - if DataController <> nil then - DataController.EndUpdate; - if IsUpdateLocked then - begin - if (FUpdateLockCount = 1) and FSynchronizationNeeded then - Synchronize(False); - Dec(FUpdateLockCount); - end; - if not IsUpdateLocked then - UpdateUnlocked; - finally - if Control <> nil then - TcxCustomGrid(Control).EndUpdate; - end; -end; - -function TcxCustomGridView.IsUpdateLocked: Boolean; -begin - Result := FUpdateLockCount > 0; -end; - -function TcxCustomGridView.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := ViewInfo.GetHitTest(P); -end; - -function TcxCustomGridView.GetHitTest(X, Y: Integer): TcxCustomGridHitTest; -begin - Result := ViewInfo.GetHitTest(X, Y); -end; - -procedure TcxCustomGridView.BoundsChanged(AUpdateSelfOnly: Boolean = False; - AKeepMaster: Boolean = False); -begin - if ResizeOnBoundsChange then - SizeChanged(AUpdateSelfOnly, AKeepMaster) - else - LayoutChanged(AUpdateSelfOnly); -end; - -procedure TcxCustomGridView.Changed(AChangeKind: TcxGridViewChangeKind); -begin - if (DataController <> nil) and DataController.IsDataLoading then Exit; - BeginUpdate; - try - case AChangeKind of - vcLayout: - LayoutChanged; - vcSize: - SizeChanged; - end; - Synchronize; - finally - EndUpdate; - end; - DoChanged(AChangeKind); -end; - -procedure TcxCustomGridView.FocusChanged(AFocused: Boolean); -begin - if AFocused then - begin - DataController.SetFocus; - Controller.DoSetFocus(True); - end - else - Controller.RemoveFocus; -end; - -procedure TcxCustomGridView.LayoutChanged(AUpdateSelfOnly: Boolean = True); - - function GetParameter: TcxCustomGridView; - begin - if AUpdateSelfOnly then - Result := Self - else - Result := nil; - end; - -begin - Changed(TcxGridLayoutChange.Create(GetParameter)); -end; - -procedure TcxCustomGridView.LookAndFeelChanged; -var - I: Integer; -begin - for I := 0 to CloneCount - 1 do - Clones[I].LookAndFeelChanged; -end; - -function TcxCustomGridView.SizeChanged(AUpdateSelfOnly: Boolean = False; - AKeepMaster: Boolean = False): Boolean; -begin - Result := Changed(TcxGridSizeChange.Create(Self, - AUpdateSelfOnly or (Control = nil){7}, AKeepMaster)); -end; - -procedure TcxCustomGridView.ViewChanged; -begin - Changed(TcxGridViewChange.Create(Self)); -end; - -procedure TcxCustomGridView.ViewChanged(const AUpdateRect: TRect); -begin - if not IsRectEmpty(AUpdateRect) then - Changed(TcxGridViewChange.Create(Self, AUpdateRect)); -end; - -procedure TcxCustomGridView.ViewChanged(ARegion: TcxRegion); -begin - if (ARegion <> nil) and not ARegion.IsEmpty then - Changed(TcxGridViewChange.Create(Self, ARegion)); -end; - -procedure TcxCustomGridView.RestoreFromIniFile(const AStorageName: string; - AChildrenCreating, AChildrenDeleting: Boolean; AOptions: TcxGridStorageOptions; - const ARestoreViewName: string); -var - AStorage: TcxStorage; - AModes: TcxStorageModes; -begin - FStoringName := ARestoreViewName; - AStorage := TcxStorage.Create(AStorageName); - try - if not IsStoringNameMode then - AStorage.NamePrefix := Owner.Name; - FStorageOptions := AOptions; - AModes := []; - if AChildrenCreating then - Include(AModes, smChildrenCreating); - if AChildrenDeleting then - Include(AModes, smChildrenDeleting); - AStorage.Modes := AModes; - BeginUpdate; - try - IsRestoring := True; - try - AStorage.RestoreFromIni(Self); - finally - IsRestoring := False; - end; - finally - EndUpdate; - end; - finally - AStorage.Free; - end; -end; - -procedure TcxCustomGridView.RestoreFromRegistry(const AStorageName: string; - AChildrenCreating, AChildrenDeleting: Boolean; AOptions: TcxGridStorageOptions; - const ARestoreViewName: string); -var - AStorage: TcxStorage; - AModes: TcxStorageModes; -begin - FStoringName := ARestoreViewName; - AStorage := TcxStorage.Create(AStorageName); - try - if not IsStoringNameMode then - AStorage.NamePrefix := Owner.Name; - FStorageOptions := AOptions; - AModes := []; - if AChildrenCreating then - Include(AModes, smChildrenCreating); - if AChildrenDeleting then - Include(AModes, smChildrenDeleting); - AStorage.Modes := AModes; - BeginUpdate; - try - IsRestoring := True; - try - AStorage.RestoreFromRegistry(Self); - finally - IsRestoring := False; - end; - finally - EndUpdate; - end; - finally - AStorage.Free; - end; -end; - -procedure TcxCustomGridView.RestoreFromStream(AStream: TStream; - AChildrenCreating, AChildrenDeleting: Boolean; AOptions: TcxGridStorageOptions; - const ARestoreViewName: string); -var - AStorage: TcxStorage; - AModes: TcxStorageModes; -begin - FStoringName := ARestoreViewName; - AStorage := TcxStorage.Create(AStream); - try - if not IsStoringNameMode then - AStorage.NamePrefix := Owner.Name; - FStorageOptions := AOptions; - AModes := []; - if AChildrenCreating then - Include(AModes, smChildrenCreating); - if AChildrenDeleting then - Include(AModes, smChildrenDeleting); - AStorage.Modes := AModes; - BeginUpdate; - try - IsRestoring := True; - try - AStorage.RestoreFromStream(Self); - finally - IsRestoring := False; - end; - finally - EndUpdate; - end; - finally - AStorage.Free; - end; -end; - -procedure TcxCustomGridView.RestoreFromStorage(const AStorageName: string; - AReaderClass: TcxCustomReaderClass; AChildrenCreating, AChildrenDeleting: Boolean; - AOptions: TcxGridStorageOptions; const ARestoreViewName: string); -var - AStorage: TcxStorage; - AModes: TcxStorageModes; -begin - FStoringName := ARestoreViewName; - AStorage := TcxStorage.Create(AStorageName); - try - if not IsStoringNameMode then - AStorage.NamePrefix := Owner.Name; - FStorageOptions := AOptions; - AModes := []; - if AChildrenCreating then - Include(AModes, smChildrenCreating); - if AChildrenDeleting then - Include(AModes, smChildrenDeleting); - AStorage.Modes := AModes; - BeginUpdate; - try - IsRestoring := True; - try - AStorage.RestoreFrom(Self, AReaderClass); - finally - IsRestoring := False; - end; - finally - EndUpdate; - end; - finally - AStorage.Free; - end; -end; - -procedure TcxCustomGridView.StoreToIniFile(const AStorageName: string; AReCreate: Boolean; - AOptions: TcxGridStorageOptions; const ASaveViewName: string); -var - AStorage: TcxStorage; -begin - FStoringName := ASaveViewName; - AStorage := TcxStorage.Create(AStorageName); - try - FStorageOptions := AOptions; - if ASaveViewName = '' then - AStorage.NamePrefix := Owner.Name; - AStorage.ReCreate := AReCreate; - AStorage.StoreToIni(Self); - finally - AStorage.Free; - end; -end; - -procedure TcxCustomGridView.StoreToRegistry(const AStorageName: string; AReCreate: Boolean; - AOptions: TcxGridStorageOptions; const ASaveViewName: string); -var - AStorage: TcxStorage; -begin - FStoringName := ASaveViewName; - AStorage := TcxStorage.Create(AStorageName); - try - FStorageOptions := AOptions; - if ASaveViewName = '' then - AStorage.NamePrefix := Owner.Name; - AStorage.ReCreate := AReCreate; - AStorage.StoreToRegistry(Self); - finally - AStorage.Free; - end; -end; - -procedure TcxCustomGridView.StoreToStream(AStream: TStream; AOptions: TcxGridStorageOptions; - const ASaveViewName: string); -var - AStorage: TcxStorage; -begin - FStoringName := ASaveViewName; - AStorage := TcxStorage.Create(AStream); - try - FStorageOptions := AOptions; - if ASaveViewName = '' then - AStorage.NamePrefix := Owner.Name; - AStorage.StoreToStream(Self); - finally - AStorage.Free; - end; -end; - -procedure TcxCustomGridView.StoreToStorage(const AStorageName: string; - AWriterClass: TcxCustomWriterClass; AReCreate: Boolean; - AOptions: TcxGridStorageOptions; const ASaveViewName: string); -var - AStorage: TcxStorage; -begin - FStoringName := ASaveViewName; - AStorage := TcxStorage.Create(AStorageName); - try - FStorageOptions := AOptions; - if ASaveViewName = '' then - AStorage.NamePrefix := Owner.Name; - AStorage.ReCreate := AReCreate; - AStorage.StoreTo(Self, AWriterClass); - finally - AStorage.Free; - end; -end; - -function TcxCustomGridView.CreateViewInfo: TcxCustomGridViewInfo; -begin - Result := GetViewInfoClass.Create(Self); -end; - -{ functions } - -function GetGridViewDataController(AView: TcxCustomGridView): TcxCustomDataController; -begin - Result := AView.FDataController; -end; - -function GetParentGridView(AControl: TControl): TcxCustomGridView; -begin - while (AControl <> nil) and not (AControl is TcxGridSite) do - AControl := AControl.Parent; - if AControl = nil then - Result := nil - else - Result := TcxGridSite(AControl).GridView; -end; - -procedure AddGridViewClone(AView, AClone: TcxCustomGridView); -begin - AView.AddClone(AClone); -end; - -procedure AssignGridViewPattern(AView, APattern: TcxCustomGridView); -begin - AView.AssignPattern(APattern); -end; - -procedure SetGridViewLevel(AView: TcxCustomGridView; Value: TComponent); -begin - AView.SetLevel(Value); -end; - -procedure SiteFocusChanged(ASite: TcxGridSite); -begin - ASite.FocusChanged; -end; - -{ TcxCustomGridViewAccess } - -class procedure TcxCustomGridViewAccess.AddClone(AInstance: TcxCustomGridView; - AClone: TcxCustomGridView); -begin - AInstance.AddClone(AClone); -end; - -class procedure TcxCustomGridViewAccess.AssignPattern(AInstance: TcxCustomGridView; - APattern: TcxCustomGridView); -begin - AInstance.AssignPattern(APattern); -end; - -class function TcxCustomGridViewAccess.CanFocus(AInstance: TcxCustomGridView): Boolean; -begin - Result := AInstance.CanFocus; -end; - -class procedure TcxCustomGridViewAccess.DetailVisibleChanged(AInstance: TcxCustomGridView; - ADetailLevel: TComponent; APrevVisibleDetailCount, AVisibleDetailCount: Integer); -begin - AInstance.DetailVisibleChanged(ADetailLevel, APrevVisibleDetailCount, AVisibleDetailCount); -end; - -class procedure TcxCustomGridViewAccess.FocusChanged(AInstance: TcxCustomGridView; - AFocused: Boolean); -begin - AInstance.FocusChanged(AFocused); -end; - -class procedure TcxCustomGridViewAccess.LookAndFeelChanged(AInstance: TcxCustomGridView); -begin - AInstance.LookAndFeelChanged; -end; - -class procedure TcxCustomGridViewAccess.SetLevel(AInstance: TcxCustomGridView; - Value: TComponent); -begin - AInstance.SetLevel(Value); -end; - -class function TcxCustomGridViewAccess.GetChangeable(AInstance: TcxCustomGridView): Boolean; -begin - Result := AInstance.Changeable; -end; - -class function TcxCustomGridViewAccess.GetStyles(AInstance: TcxCustomGridView): TcxCustomGridStyles; -begin - Result := AInstance.Styles; -end; - -{ TcxGridRegisteredViews } - -type - TcxGridRegisteredViews = class(TcxRegisteredClasses) - protected - function CompareItems(AIndex1, AIndex2: Integer): Integer; override; - public - constructor Create; - end; - -constructor TcxGridRegisteredViews.Create; -begin - inherited Create(True); - Sorted := True; -end; - -function TcxGridRegisteredViews.CompareItems(AIndex1, AIndex2: Integer): Integer; -var - AIsDBView1, AIsDBView2: Boolean; -begin - AIsDBView1 := Pos('DB', Descriptions[AIndex1]) = 1; - AIsDBView2 := Pos('DB', Descriptions[AIndex2]) = 1; - if not AIsDBView1 and AIsDBView2 then - Result := -1 - else - if AIsDBView1 and not AIsDBView2 then - Result := 1 - else - Result := inherited CompareItems(AIndex1, AIndex2); -end; - -initialization - GridHitTests := TGridHitTests.Create; - cxGridRegisteredViews := TcxGridRegisteredViews.Create; - -finalization - FreeAndNil(cxGridRegisteredViews); - FreeAndNil(GridHitTests); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBBandedTableView.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBBandedTableView.pas deleted file mode 100644 index c996123e..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBBandedTableView.pas +++ /dev/null @@ -1,145 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridDBBandedTableView; - -{$I cxVer.inc} - -interface - -uses - Classes, cxStorage, cxCustomData, cxDBData, - cxGridCustomTableView, cxGridDBDataDefinitions, cxGridBandedTableView; - -type - TcxGridDBBandedTableView = class; - - TcxGridDBBandedColumn = class(TcxGridBandedColumn) - private - function GetDataBinding: TcxGridItemDBDataBinding; - procedure SetDataBinding(Value: TcxGridItemDBDataBinding); - published - property DataBinding: TcxGridItemDBDataBinding read GetDataBinding write SetDataBinding; - end; - - TcxGridDBBandedTableView = class(TcxGridBandedTableView) - private - function GetColumn(Index: Integer): TcxGridDBBandedColumn; - function GetDataController: TcxGridDBDataController; - procedure SetColumn(Index: Integer; Value: TcxGridDBBandedColumn); - procedure SetDataController(Value: TcxGridDBDataController); - protected - function GetDataControllerClass: TcxCustomDataControllerClass; override; - function GetItemClass: TcxCustomGridTableItemClass; override; - function GetSummaryItemClass: TcxDataSummaryItemClass; override; - public - function CreateColumn: TcxGridDBBandedColumn; - function GetColumnByFieldName(const AFieldName: string): TcxGridDBBandedColumn; - property Columns[Index: Integer]: TcxGridDBBandedColumn read GetColumn write SetColumn; - published - property DataController: TcxGridDBDataController read GetDataController write SetDataController; - end; - -implementation - -uses - cxGridCustomView, cxGridDBTableView; - -{ TcxGridDBBandedColumn } - -function TcxGridDBBandedColumn.GetDataBinding: TcxGridItemDBDataBinding; -begin - Result := TcxGridItemDBDataBinding(inherited DataBinding); -end; - -procedure TcxGridDBBandedColumn.SetDataBinding(Value: TcxGridItemDBDataBinding); -begin - inherited DataBinding := Value; -end; - -{ TcxGridDBBandedTableView } - -function TcxGridDBBandedTableView.GetColumn(Index: Integer): TcxGridDBBandedColumn; -begin - Result := TcxGridDBBandedColumn(inherited Columns[Index]); -end; - -function TcxGridDBBandedTableView.GetDataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(FDataController); -end; - -procedure TcxGridDBBandedTableView.SetColumn(Index: Integer; Value: TcxGridDBBandedColumn); -begin - inherited Columns[Index] := Value; -end; - -procedure TcxGridDBBandedTableView.SetDataController(Value: TcxGridDBDataController); -begin - FDataController.Assign(Value); -end; - -function TcxGridDBBandedTableView.GetDataControllerClass: TcxCustomDataControllerClass; -begin - Result := TcxGridDBDataController; -end; - -function TcxGridDBBandedTableView.GetItemClass: TcxCustomGridTableItemClass; -begin - Result := TcxGridDBBandedColumn; -end; - -function TcxGridDBBandedTableView.GetSummaryItemClass: TcxDataSummaryItemClass; -begin - Result := TcxGridDBTableSummaryItem; -end; - -function TcxGridDBBandedTableView.CreateColumn: TcxGridDBBandedColumn; -begin - Result := TcxGridDBBandedColumn(inherited CreateColumn); -end; - -function TcxGridDBBandedTableView.GetColumnByFieldName(const AFieldName: string): TcxGridDBBandedColumn; -begin - Result := TcxGridDBBandedColumn(DataController.GetItemByFieldName(AFieldName)); -end; - -initialization - cxGridRegisteredViews.Register(TcxGridDBBandedTableView, 'DB Banded Table'); - Classes.RegisterClass(TcxGridDBBandedColumn); - -finalization - cxGridRegisteredViews.Unregister(TcxGridDBBandedTableView); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBCardView.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBCardView.pas deleted file mode 100644 index e5911b2e..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBCardView.pas +++ /dev/null @@ -1,190 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridDBCardView; - -interface - -uses - Classes, cxGridCustomTableView, cxGridCardView, cxGridDBDataDefinitions, - cxCustomData, cxDBData; - -type - TcxGridDBCardViewRow = class(TcxGridCardViewRow) - private - function GetDataBinding: TcxGridItemDBDataBinding; - procedure SetDataBinding(Value: TcxGridItemDBDataBinding); - protected - // IcxStoredObject - {function GetStoredProperties(AProperties: TStrings): Boolean; override; - procedure GetPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetPropertyValue(const AName: string; const AValue: Variant); override;} - published - property DataBinding: TcxGridItemDBDataBinding read GetDataBinding write SetDataBinding; - end; - - {TcxGridDBCardViewSummaryItem = class(TcxDBDataSummaryItem) - private - function GetRow: TcxGridDBCardViewRow; - procedure SetRow(Value: TcxGridDBCardViewRow); - published - property Row: TcxGridDBCardViewRow read GetRow write SetRow; - end;} - - TcxGridDBCardView = class(TcxGridCardView) - private - function GetDataController: TcxGridDBDataController; - function GetRow(Index: Integer): TcxGridDBCardViewRow; - procedure SetDataController(Value: TcxGridDBDataController); - procedure SetRow(Index: Integer; Value: TcxGridDBCardViewRow); - protected - function GetDataControllerClass: TcxCustomDataControllerClass; override; - function GetItemClass: TcxCustomGridTableItemClass; override; - //function GetSummaryItemClass: TcxDataSummaryItemClass; override; - public - function CreateRow: TcxGridDBCardViewRow; - function GetRowByFieldName(const AFieldName: string): TcxGridDBCardViewRow; - property Rows[Index: Integer]: TcxGridDBCardViewRow read GetRow write SetRow; - published - property DataController: TcxGridDBDataController read GetDataController write SetDataController; - end; - -implementation - -uses - cxGridCustomView; - -{ TcxGridDBCardViewRow } - -function TcxGridDBCardViewRow.GetDataBinding: TcxGridItemDBDataBinding; -begin - Result := TcxGridItemDBDataBinding(inherited DataBinding); -end; - -procedure TcxGridDBCardViewRow.SetDataBinding(Value: TcxGridItemDBDataBinding); -begin - inherited DataBinding := Value; -end; - -{function TcxGridDBCardViewRow.GetStoredProperties(AProperties: TStrings): Boolean; -begin - inherited GetStoredProperties(AProperties); - with AProperties do - Add('FieldName'); - Result := True; -end; - -procedure TcxGridDBCardViewRow.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'FieldName' then - AValue := DataBinding.FieldName - else - inherited; -end; - -procedure TcxGridDBCardViewRow.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'FieldName' then - DataBinding.FieldName := AValue - else - inherited; -end;} - -(*{ TcxGridDBCardViewSummaryItem } - -function TcxGridDBCardViewSummaryItem.GetRow: TcxGridDBCardViewRow; -begin - Result := TcxGridDBCardViewRow(ItemLink); -end; - -procedure TcxGridDBCardViewSummaryItem.SetRow(Value: TcxGridDBCardViewRow); -begin - ItemLink := Value; -end;*) - -{ TcxGridDBCardView } - -function TcxGridDBCardView.GetDataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(FDataController); -end; - -function TcxGridDBCardView.GetRow(Index: Integer): TcxGridDBCardViewRow; -begin - Result := TcxGridDBCardViewRow(inherited Rows[Index]); -end; - -procedure TcxGridDBCardView.SetDataController(Value: TcxGridDBDataController); -begin - FDataController.Assign(Value); -end; - -procedure TcxGridDBCardView.SetRow(Index: Integer; Value: TcxGridDBCardViewRow); -begin - inherited Rows[Index] := Value; -end; - -function TcxGridDBCardView.GetDataControllerClass: TcxCustomDataControllerClass; -begin - Result := TcxGridDBDataController; -end; - -function TcxGridDBCardView.GetItemClass: TcxCustomGridTableItemClass; -begin - Result := TcxGridDBCardViewRow; -end; - -{function TcxGridDBCardView.GetSummaryItemClass: TcxDataSummaryItemClass; -begin - Result := TcxGridDBCardViewSummaryItem; -end;} - -function TcxGridDBCardView.CreateRow: TcxGridDBCardViewRow; -begin - Result := TcxGridDBCardViewRow(inherited CreateRow); -end; - -function TcxGridDBCardView.GetRowByFieldName(const AFieldName: string): TcxGridDBCardViewRow; -begin - Result := TcxGridDBCardViewRow(DataController.GetItemByFieldName(AFieldName)); -end; - -initialization - cxGridRegisteredViews.Register(TcxGridDBCardView, 'DB Cards'); - Classes.RegisterClass(TcxGridDBCardViewRow); - -finalization - cxGridRegisteredViews.Unregister(TcxGridDBCardView); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBChartView.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBChartView.pas deleted file mode 100644 index de4f39d4..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBChartView.pas +++ /dev/null @@ -1,595 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridDBChartView; - -{$I cxVer.inc} - -interface - -uses - Classes, DB, cxCustomData, cxDataStorage, cxDBData, cxEdit, - cxGridCustomView, cxGridChartView; - -type - TcxGridDBChartView = class; - - TcxGridDBChartDataController = class(TcxDBDataController, IcxCustomGridDataController, - IcxGridChartViewItemsProvider) - private - function GetGridViewValue: TcxGridDBChartView; - function GetOnAfterSummary: TcxAfterSummaryEvent; - function GetOnSummary: TcxSummaryEvent; - procedure SetOnAfterSummary(Value: TcxAfterSummaryEvent); - procedure SetOnSummary(Value: TcxSummaryEvent); - protected - { IcxCustomGridDataController } - procedure AssignData(ADataController: TcxCustomDataController); - procedure CreateAllItems(AMissingItemsOnly: Boolean); - procedure DeleteAllItems; - procedure GetFakeComponentLinks(AList: TList); - function GetGridView: TcxCustomGridView; - function HasAllItems: Boolean; - function IsDataChangeable: Boolean; - function IsDataLinked: Boolean; - function SupportsCreateAllItems: Boolean; - { IcxGridChartViewItemsProvider } - function IcxGridChartViewItemsProvider.GetItem = GetChartItem; - function GetChartItem(AItemClass: TcxGridChartItemClass; AIndex: Integer): TcxGridChartItem; - procedure GetItemCaptions(AItemClass: TcxGridChartItemClass; ACaptions: TStringList); - procedure InitItem(AItem: TcxGridChartItem; AIndex: Integer); - - procedure DoDataSourceChanged; override; - procedure DoValueTypeClassChanged(AItemIndex: Integer); override; - //function GetChartViewItemIndex: Integer; override; - function GetItemID(AItem: TObject): Integer; override; - function GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; override; - procedure GetValidValueFields(AItemClass: TcxGridChartItemClass; AFields: TList); - procedure Unlocked; override; - public - procedure BeginFullUpdate; override; - procedure EndFullUpdate; override; - function GetItem(Index: Integer): TObject; override; - - property GridView: TcxGridDBChartView read GetGridViewValue; - published - property DataModeController; - property DataSource; - property DetailKeyFieldNames; - property KeyFieldNames; - property MasterKeyFieldNames; - property Options; - property OnAfterSummary: TcxAfterSummaryEvent read GetOnAfterSummary write SetOnAfterSummary; - property OnCompare; - property OnDataChanged; - property OnFilterRecord; - property OnSummary: TcxSummaryEvent read GetOnSummary write SetOnSummary; - end; - - TcxGridDBChartItemDataBinding = class(TcxGridChartItemDataBinding) - private - function GetDataController: TcxGridDBChartDataController; - function GetField: TField; - function GetFieldName: string; - procedure SetFieldName(const Value: string); - protected - function GetDefaultDisplayText: string; override; - function GetDefaultRepositoryItem: TcxEditRepositoryItem; override; - function GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; override; - function GetDefaultValueTypeClass: TcxValueTypeClass; override; - procedure InitDefaultValuesProvider(ADefaultValuesProvider: TcxCustomEditDefaultValuesProvider); override; - function IsValueTypeStored: Boolean; override; - public - procedure Assign(Source: TPersistent); override; - property DataController: TcxGridDBChartDataController read GetDataController; - property Field: TField read GetField; - published - property FieldName: string read GetFieldName write SetFieldName; - end; - - TcxGridDBChartCategories = class(TcxGridChartCategories) - private - function GetDataBinding: TcxGridDBChartItemDataBinding; - procedure SetDataBinding(Value: TcxGridDBChartItemDataBinding); - published - property DataBinding: TcxGridDBChartItemDataBinding read GetDataBinding write SetDataBinding; - end; - - TcxGridDBChartDataGroup = class(TcxGridChartDataGroup) - private - function GetDataBinding: TcxGridDBChartItemDataBinding; - procedure SetDataBinding(Value: TcxGridDBChartItemDataBinding); - published - property DataBinding: TcxGridDBChartItemDataBinding read GetDataBinding write SetDataBinding; - end; - - TcxGridDBChartSeries = class(TcxGridChartSeries) - private - function GetDataBinding: TcxGridDBChartItemDataBinding; - procedure SetDataBinding(Value: TcxGridDBChartItemDataBinding); - published - property DataBinding: TcxGridDBChartItemDataBinding read GetDataBinding write SetDataBinding; - end; - - TcxGridDBChartView = class(TcxGridChartView) - private - function GetCategories: TcxGridDBChartCategories; - function GetDataController: TcxGridDBChartDataController; - function GetDataGroup(Index: Integer): TcxGridDBChartDataGroup; - function GetSeries(Index: Integer): TcxGridDBChartSeries; - procedure SetCategories(Value: TcxGridDBChartCategories); - procedure SetDataController(Value: TcxGridDBChartDataController); - procedure SetDataGroup(Index: Integer; Value: TcxGridDBChartDataGroup); - procedure SetSeries(Index: Integer; Value: TcxGridDBChartSeries); - protected - function GetCategoriesClass: TcxGridChartCategoriesClass; override; - function GetDataControllerClass: TcxCustomDataControllerClass; override; - function GetItemDataBindingClass: TcxGridChartItemDataBindingClass; override; - - function FindItemByFieldName(AItemClass: TcxGridChartItemClass; const AFieldName: string): TcxGridChartItem; - public - function CreateDataGroup: TcxGridDBChartDataGroup; - function FindDataGroupByFieldName(const AFieldName: string): TcxGridDBChartDataGroup; - function GetDataGroupClass: TcxGridChartDataGroupClass; override; - property DataGroups[Index: Integer]: TcxGridDBChartDataGroup read GetDataGroup write SetDataGroup; - - function CreateSeries: TcxGridDBChartSeries; - function FindSeriesByFieldName(const AFieldName: string): TcxGridDBChartSeries; - function GetSeriesClass: TcxGridChartSeriesClass; override; - property Series[Index: Integer]: TcxGridDBChartSeries read GetSeries write SetSeries; - published - property Categories: TcxGridDBChartCategories read GetCategories write SetCategories; - property DataController: TcxGridDBChartDataController read GetDataController write SetDataController; - end; - -implementation - -uses - SysUtils, cxClasses, cxDBEdit, cxEditDBRegisteredRepositoryItems; - -type - TcxComponentAccess = class(TcxComponent); - -{ TcxGridDBChartDataController } - -function TcxGridDBChartDataController.GetGridViewValue: TcxGridDBChartView; -begin - Result := TcxGridDBChartView(GetOwner); -end; - -function TcxGridDBChartDataController.GetOnAfterSummary: TcxAfterSummaryEvent; -begin - Result := Summary.OnAfterSummary; -end; - -function TcxGridDBChartDataController.GetOnSummary: TcxSummaryEvent; -begin - Result := Summary.DefaultGroupSummaryItems.OnSummary; -end; - -procedure TcxGridDBChartDataController.SetOnAfterSummary(Value: TcxAfterSummaryEvent); -begin - Summary.OnAfterSummary := Value; -end; - -procedure TcxGridDBChartDataController.SetOnSummary(Value: TcxSummaryEvent); -begin - Summary.DefaultGroupSummaryItems.OnSummary := Value; -end; - -procedure TcxGridDBChartDataController.AssignData(ADataController: TcxCustomDataController); -begin -end; - -procedure TcxGridDBChartDataController.CreateAllItems(AMissingItemsOnly: Boolean); -begin -end; - -procedure TcxGridDBChartDataController.DeleteAllItems; -begin -end; - -procedure TcxGridDBChartDataController.GetFakeComponentLinks(AList: TList); -begin - if (DataSource <> nil) and (DataSource.Owner <> GridView.Owner) and - (AList.IndexOf(DataSource.Owner) = -1) then - AList.Add(DataSource.Owner); -end; - -function TcxGridDBChartDataController.GetGridView: TcxCustomGridView; -begin - Result := GridView; -end; - -function TcxGridDBChartDataController.HasAllItems: Boolean; -begin - Result := True; -end; - -function TcxGridDBChartDataController.IsDataChangeable: Boolean; -begin - Result := False; -end; - -function TcxGridDBChartDataController.IsDataLinked: Boolean; -begin - Result := DataSet <> nil; -end; - -function TcxGridDBChartDataController.SupportsCreateAllItems: Boolean; -begin - Result := False; -end; - -function TcxGridDBChartDataController.GetChartItem(AItemClass: TcxGridChartItemClass; - AIndex: Integer): TcxGridChartItem; -var - AFields: TList; -begin - AFields := TList.Create; - try - GetValidValueFields(AItemClass, AFields); - Result := GridView.FindItemByFieldName(AItemClass, TField(AFields[AIndex]).FieldName); - finally - AFields.Free; - end; -end; - -procedure TcxGridDBChartDataController.GetItemCaptions(AItemClass: TcxGridChartItemClass; - ACaptions: TStringList); -var - AFields: TList; - I: Integer; -begin - AFields := TList.Create; - try - GetValidValueFields(AItemClass, AFields); - for I := 0 to AFields.Count - 1 do - ACaptions.Add(TField(AFields[I]).DisplayName); - finally - AFields.Free; - end; -end; - -procedure TcxGridDBChartDataController.InitItem(AItem: TcxGridChartItem; AIndex: Integer); -var - AFields: TList; -begin - AFields := TList.Create; - try - GetValidValueFields(TcxGridChartItemClass(AItem.ClassType), AFields); - TcxGridDBChartItemDataBinding(AItem.DataBinding).FieldName := TField(AFields[AIndex]).FieldName; - finally - AFields.Free; - end; -end; - -procedure TcxGridDBChartDataController.DoDataSourceChanged; -begin - TcxComponentAccess(GridView).UpdateFakeLinks; -end; - -procedure TcxGridDBChartDataController.DoValueTypeClassChanged(AItemIndex: Integer); -var - AChartItem: IcxGridChartItem; -begin - inherited; - if Supports(GetItem(AItemIndex), IcxGridChartItem, AChartItem) then - AChartItem.ValueTypeClassChanged; -end; - -{function TcxGridDBChartDataController.GetChartViewItemIndex: Integer; -begin - if GridView.SortedSeries = nil then - Result := -1 - else - Result := GridView.SortedSeries.DataBinding.DataIndex; -end;} - -function TcxGridDBChartDataController.GetItemID(AItem: TObject): Integer; -var - AChartItem: IcxGridChartItem; -begin - if Supports(AItem, IcxGridChartItem, AChartItem) then - Result := AChartItem.GetID - else - Result := -1; -end; - -function TcxGridDBChartDataController.GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; -begin - Result := GridView.ViewData.GetSortingBySummaryEngineClass; -end; - -function CompareFields(Item1, Item2: Pointer): Integer; -begin - if TField(Item1).DisplayName < TField(Item2).DisplayName then - Result := -1 - else - if TField(Item1).DisplayName > TField(Item2).DisplayName then - Result := 1 - else - Result := 0; -end; - -procedure TcxGridDBChartDataController.GetValidValueFields(AItemClass: TcxGridChartItemClass; - AFields: TList); -var - I: Integer; - AField: TField; -begin - if DataSet = nil then Exit; - for I := 0 to DataSet.FieldCount - 1 do - begin - AField := DataSet.Fields[I]; - if not AItemClass.IsValue or - IsValueTypeClassValid(GetValueTypeClassByField(AField)) then - AFields.Add(AField); - end; - AFields.Sort(CompareFields); -end; - -procedure TcxGridDBChartDataController.Unlocked; -begin - inherited; - GridView.DataControllerUnlocked; -end; - -procedure TcxGridDBChartDataController.BeginFullUpdate; -begin - GridView.BeginUpdate; - inherited; -end; - -procedure TcxGridDBChartDataController.EndFullUpdate; -begin - inherited; - GridView.EndUpdate; -end; - -function TcxGridDBChartDataController.GetItem(Index: Integer): TObject; -begin - Result := Fields[Index].Item; -end; - -{ TcxGridDBChartItemDataBinding } - -function TcxGridDBChartItemDataBinding.GetDataController: TcxGridDBChartDataController; -begin - Result := TcxGridDBChartDataController(inherited DataController); -end; - -function TcxGridDBChartItemDataBinding.GetField: TField; -begin - Result := DataController.GetItemField(DataIndex); -end; - -function TcxGridDBChartItemDataBinding.GetFieldName: string; -begin - Result := DataController.GetItemFieldName(DataIndex); -end; - -procedure TcxGridDBChartItemDataBinding.SetFieldName(const Value: string); -begin - DataController.ChangeFieldName(DataIndex, Value); -end; - -function TcxGridDBChartItemDataBinding.GetDefaultDisplayText: string; -begin - if Field = nil then - Result := inherited GetDefaultDisplayText - else - Result := Field.DisplayName; -end; - -function TcxGridDBChartItemDataBinding.GetDefaultRepositoryItem: TcxEditRepositoryItem; -begin - Result := GetDefaultEditDBRepositoryItems.GetItemByField(Field); -end; - -function TcxGridDBChartItemDataBinding.GetDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; -begin - Result := TcxCustomDBEditDefaultValuesProvider; -end; - -function TcxGridDBChartItemDataBinding.GetDefaultValueTypeClass: TcxValueTypeClass; -begin - Result := nil; -end; - -procedure TcxGridDBChartItemDataBinding.InitDefaultValuesProvider(ADefaultValuesProvider: TcxCustomEditDefaultValuesProvider); -begin - inherited; - TcxCustomDBEditDefaultValuesProvider(ADefaultValuesProvider).DataSource := DataController.DataSource; - TcxCustomDBEditDefaultValuesProvider(ADefaultValuesProvider).Field := Field; -end; - -function TcxGridDBChartItemDataBinding.IsValueTypeStored: Boolean; -begin - Result := FieldName = ''; -end; - -procedure TcxGridDBChartItemDataBinding.Assign(Source: TPersistent); -begin - if Source is TcxGridDBChartItemDataBinding then - FieldName := TcxGridDBChartItemDataBinding(Source).FieldName; - inherited; -end; - -{ TcxGridDBChartCategories } - -function TcxGridDBChartCategories.GetDataBinding: TcxGridDBChartItemDataBinding; -begin - Result := TcxGridDBChartItemDataBinding(inherited DataBinding); -end; - -procedure TcxGridDBChartCategories.SetDataBinding(Value: TcxGridDBChartItemDataBinding); -begin - inherited DataBinding := Value; -end; - -{ TcxGridDBChartDataGroup } - -function TcxGridDBChartDataGroup.GetDataBinding: TcxGridDBChartItemDataBinding; -begin - Result := TcxGridDBChartItemDataBinding(inherited DataBinding); -end; - -procedure TcxGridDBChartDataGroup.SetDataBinding(Value: TcxGridDBChartItemDataBinding); -begin - inherited DataBinding := Value; -end; - -{ TcxGridDBChartSeries } - -function TcxGridDBChartSeries.GetDataBinding: TcxGridDBChartItemDataBinding; -begin - Result := TcxGridDBChartItemDataBinding(inherited DataBinding); -end; - -procedure TcxGridDBChartSeries.SetDataBinding(Value: TcxGridDBChartItemDataBinding); -begin - inherited DataBinding := Value; -end; - -{ TcxGridDBChartView } - -function TcxGridDBChartView.GetCategories: TcxGridDBChartCategories; -begin - Result := TcxGridDBChartCategories(inherited Categories); -end; - -function TcxGridDBChartView.GetDataController: TcxGridDBChartDataController; -begin - Result := TcxGridDBChartDataController(FDataController); -end; - -function TcxGridDBChartView.GetDataGroup(Index: Integer): TcxGridDBChartDataGroup; -begin - Result := TcxGridDBChartDataGroup(inherited DataGroups[Index]); -end; - -function TcxGridDBChartView.GetSeries(Index: Integer): TcxGridDBChartSeries; -begin - Result := TcxGridDBChartSeries(inherited Series[Index]); -end; - -procedure TcxGridDBChartView.SetCategories(Value: TcxGridDBChartCategories); -begin - inherited Categories := Value; -end; - -procedure TcxGridDBChartView.SetDataController(Value: TcxGridDBChartDataController); -begin - FDataController.Assign(Value); -end; - -procedure TcxGridDBChartView.SetDataGroup(Index: Integer; Value: TcxGridDBChartDataGroup); -begin - inherited DataGroups[Index] := Value; -end; - -procedure TcxGridDBChartView.SetSeries(Index: Integer; Value: TcxGridDBChartSeries); -begin - inherited Series[Index] := Value; -end; - -function TcxGridDBChartView.GetCategoriesClass: TcxGridChartCategoriesClass; -begin - Result := TcxGridDBChartCategories; -end; - -function TcxGridDBChartView.GetDataControllerClass: TcxCustomDataControllerClass; -begin - Result := TcxGridDBChartDataController; -end; - -function TcxGridDBChartView.GetItemDataBindingClass: TcxGridChartItemDataBindingClass; -begin - Result := TcxGridDBChartItemDataBinding; -end; - -function TcxGridDBChartView.FindItemByFieldName(AItemClass: TcxGridChartItemClass; - const AFieldName: string): TcxGridChartItem; -var - AItems: TList; - I: Integer; -begin - AItems := GetItemList(AItemClass); - for I := 0 to AItems.Count - 1 do - begin - Result := TcxGridChartItem(AItems[I]); - if SameText(TcxGridDBChartItemDataBinding(Result.DataBinding).FieldName, AFieldName) then Exit; - end; - Result := nil; -end; - -function TcxGridDBChartView.CreateDataGroup: TcxGridDBChartDataGroup; -begin - Result := TcxGridDBChartDataGroup(inherited CreateDataGroup); -end; - -function TcxGridDBChartView.FindDataGroupByFieldName(const AFieldName: string): TcxGridDBChartDataGroup; -begin - Result := TcxGridDBChartDataGroup(FindItemByFieldName(GetDataGroupClass, AFieldName)); -end; - -function TcxGridDBChartView.GetDataGroupClass: TcxGridChartDataGroupClass; -begin - Result := TcxGridDBChartDataGroup; -end; - -function TcxGridDBChartView.CreateSeries: TcxGridDBChartSeries; -begin - Result := TcxGridDBChartSeries(inherited CreateSeries); -end; - -function TcxGridDBChartView.FindSeriesByFieldName(const AFieldName: string): TcxGridDBChartSeries; -begin - Result := TcxGridDBChartSeries(FindItemByFieldName(GetSeriesClass, AFieldName)); -end; - -function TcxGridDBChartView.GetSeriesClass: TcxGridChartSeriesClass; -begin - Result := TcxGridDBChartSeries; -end; - -initialization - cxGridRegisteredViews.Register(TcxGridDBChartView, 'DB Chart'); - Classes.RegisterClasses([TcxGridDBChartDataGroup, TcxGridDBChartSeries]); - -finalization - cxGridRegisteredViews.Unregister(TcxGridDBChartView); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBDataDefinitions.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBDataDefinitions.pas deleted file mode 100644 index 23d98830..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBDataDefinitions.pas +++ /dev/null @@ -1,711 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridDBDataDefinitions; - -{$I cxVer.inc} - -interface - -uses - Classes, DB, cxGridCustomView, - cxCustomData, cxFilter, cxDBData, cxDataStorage, cxDataUtils, - cxEdit, cxDBEdit, cxGridCustomTableView; - -type - TcxGridDBDefaultValuesProvider = class(TcxCustomDBEditDefaultValuesProvider) - private - FFieldName: string; - public - function DefaultCanModify: Boolean; override; - function IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; override; - property FieldName: string read FFieldName write FFieldName; - end; - - TcxGridDBDataController = class(TcxDBDataController, - IcxCustomGridDataController, IcxGridDataController) - private - FPrevScrollBarPos: Integer; - function GetController: TcxCustomGridTableController; - function GetGridViewValue: TcxCustomGridTableView; - protected - { IcxCustomGridDataController } - procedure AssignData(ADataController: TcxCustomDataController); - procedure DeleteAllItems; - procedure GetFakeComponentLinks(AList: TList); - function GetGridView: TcxCustomGridView; - function HasAllItems: Boolean; - function IsDataChangeable: Boolean; - function IsDataLinked: Boolean; - function SupportsCreateAllItems: Boolean; - { IcxGridDataController } - procedure CheckGridModeBufferCount; - function DoScroll(AForward: Boolean): Boolean; - function DoScrollPage(AForward: Boolean): Boolean; - //function GetFilterPropertyValue(const AName: string; var AValue: Variant): Boolean; - function GetItemDataBindingClass: TcxGridItemDataBindingClass; - function GetItemDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; - function GetNavigatorIsBof: Boolean; - function GetNavigatorIsEof: Boolean; - function GetScrollBarPos: Integer; - function GetScrollBarRecordCount: Integer; - //function SetFilterPropertyValue(const AName: string; const AValue: Variant): Boolean; - function SetScrollBarPos(Value: Integer): Boolean; - - function CanSelectRow(ARowIndex: Integer): Boolean; override; - function CompareByField(ARecordIndex1, ARecordIndex2: Integer; - AField: TcxCustomDataField; AMode: TcxDataControllerComparisonMode): Integer; override; - procedure DoDataSetCurrentChanged(AIsCurrent: Boolean); override; - procedure DoDataSourceChanged; override; - procedure DoValueTypeClassChanged(AItemIndex: Integer); override; - procedure FilterChanged; override; - function GetDefaultActiveRelationIndex: Integer; override; - function GetDefaultGridModeBufferCount: Integer; override; - function GetFilterDisplayText(ARecordIndex, AItemIndex: Integer): string; override; - //function GetIncrementalSearchText(ARecordIndex, AItemIndex: Integer): string; override; - function GetItemID(AItem: TObject): Integer; override; - function GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; override; - function GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; override; - function GetSummaryItemClass: TcxDataSummaryItemClass; override; - function SupportsScrollBarParams: Boolean; virtual; - function SyncDetailsFocusWithMaster: Boolean; override; - procedure UpdateScrollBars; override; - public - procedure BeginFullUpdate; override; - procedure EndFullUpdate; override; - function CreateDetailLinkObject(ARelation: TcxCustomDataRelation; - ARecordIndex: Integer): TObject; override; - procedure FocusControl(AItemIndex: Integer; var Done: Boolean); override; - function GetDetailDataControllerByLinkObject(ALinkObject: TObject): TcxCustomDataController; override; - function GetDisplayText(ARecordIndex, AItemIndex: Integer): string; override; - function GetFilterDataValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; override; - function GetFilterItemFieldCaption(AItem: TObject): string; override; - function GetItem(Index: Integer): TObject; override; - function GetItemSortByDisplayText(AItemIndex: Integer; ASortByDisplayText: Boolean): Boolean; override; - function GetItemValueSource(AItemIndex: Integer): TcxDataEditValueSource; override; - procedure UpdateData; override; - - procedure CreateAllItems(AMissingItemsOnly: Boolean = False); // IcxCustomGridDataController - function GetItemByFieldName(const AFieldName: string): TcxCustomGridTableItem; - - property Controller: TcxCustomGridTableController read GetController; - property GridView: TcxCustomGridTableView read GetGridViewValue; - published - property DataModeController; - property DataSource; - property DetailKeyFieldNames; - property Filter; - property KeyFieldNames; - property MasterKeyFieldNames; - property Options; - property Summary; - property OnCompare; - property OnDataChanged; - property OnDetailCollapsing; - property OnDetailCollapsed; - property OnDetailExpanding; - property OnDetailExpanded; - property OnDetailHasChildren; - property OnFilterRecord; - property OnGroupingChanged; - property OnSortingChanged; - end; - - TcxGridItemDBDataBinding = class(TcxGridItemDataBinding) - private - function GetDataController: TcxGridDBDataController; - function GetField: TField; - function GetFieldName: string; - procedure SetFieldName(const Value: string); - protected - function GetDefaultValueTypeClass: TcxValueTypeClass; override; - function GetFilterFieldName: string; override; - procedure Init; override; - function IsValueTypeStored: Boolean; override; - public - procedure Assign(Source: TPersistent); override; - function DefaultCaption: string; override; - function DefaultRepositoryItem: TcxEditRepositoryItem; override; - function DefaultWidth(ATakeHeaderIntoAccount: Boolean = True): Integer; override; - property DataController: TcxGridDBDataController read GetDataController; - property Field: TField read GetField; - published - property FieldName: string read GetFieldName write SetFieldName; - end; - -implementation - -uses - SysUtils, cxClasses, cxGraphics, cxControls, cxLookAndFeelPainters, - cxEditDBRegisteredRepositoryItems, - cxStorage, cxGridCommon, cxGridLevel, Controls, Forms; - -type - TcxComponentAccess = class(TcxComponent); - -{ TcxGridDBDefaultValuesProvider } - -function TcxGridDBDefaultValuesProvider.DefaultCanModify: Boolean; -begin - Result := (FieldName = '') or inherited DefaultCanModify; -end; - -function TcxGridDBDefaultValuesProvider.IsDisplayFormatDefined(AIsCurrencyValueAccepted: Boolean): Boolean; -begin - Result := TcxGridItemDataBinding(Owner).IsDisplayFormatDefined(AIsCurrencyValueAccepted); -end; - -{ TcxGridDBDataController } - -function TcxGridDBDataController.GetController: TcxCustomGridTableController; -begin - Result := GridView.Controller; -end; - -function TcxGridDBDataController.GetGridViewValue: TcxCustomGridTableView; -begin - Result := TcxCustomGridTableView(GetGridView); -end; - -procedure TcxGridDBDataController.AssignData(ADataController: TcxCustomDataController); -begin -end; - -procedure TcxGridDBDataController.DeleteAllItems; -begin - GridView.ClearItems; -end; - -procedure TcxGridDBDataController.GetFakeComponentLinks(AList: TList); -begin - if (DataSource <> nil) and (DataSource.Owner <> GridView.Owner) and - (AList.IndexOf(DataSource.Owner) = -1) then - AList.Add(DataSource.Owner); -end; - -function TcxGridDBDataController.GetGridView: TcxCustomGridView; -begin - Result := TcxCustomGridView(GetOwner); -end; - -function TcxGridDBDataController.HasAllItems: Boolean; -var - I: Integer; -begin - Result := True; - with DataSet do - for I := 0 to FieldCount - 1 do - begin - Result := GetItemByFieldName(Fields[I].FieldName) <> nil; - if not Result then Break; - end; -end; - -function TcxGridDBDataController.IsDataChangeable: Boolean; -begin - Result := False; -end; - -function TcxGridDBDataController.IsDataLinked: Boolean; -begin - Result := DataSet <> nil; -end; - -function TcxGridDBDataController.SupportsCreateAllItems: Boolean; -begin - Result := True; -end; - -procedure TcxGridDBDataController.CheckGridModeBufferCount; -begin - UpdateGridModeBufferCount; -end; - -function TcxGridDBDataController.DoScroll(AForward: Boolean): Boolean; -begin - Result := SupportsScrollBarParams; - if Result then - if AForward then - Controller.GoToNext(False, False) - else - Controller.GoToPrev(False, False); -end; -{ -function TcxGridDBDataController.DoScroll(AForward: Boolean): Boolean; -var - AScrolled: Boolean; -begin - Result := SupportsScrollBarParams; - if Result then - begin - if AForward then - AScrolled := Controller.GoToNext(False, False) - else - AScrolled := Controller.GoToPrev(False, False); - if AScrolled then - SetSelectionAnchor(FocusedRowIndex); - end; -end; -} - -function TcxGridDBDataController.DoScrollPage(AForward: Boolean): Boolean; -begin - Result := SupportsScrollBarParams; - if Result then - if AForward then - TcxCustomGridTableControllerAccess.FocusNextPage(Controller, False) - else - TcxCustomGridTableControllerAccess.FocusPrevPage(Controller, False); -end; -{ -function TcxGridDBDataController.DoScrollPage(AForward: Boolean): Boolean; -var - APrevRecNo: Integer; -begin - Result := SupportsScrollBarParams; - if Result then - begin - APrevRecNo := RecNo; - if AForward then - TcxCustomGridTableControllerAccess.FocusNextPage(Controller, False) - else - TcxCustomGridTableControllerAccess.FocusPrevPage(Controller, False); - if RecNo <> APrevRecNo then - SetSelectionAnchor(FocusedRowIndex); - end; -end; -} - -{function TcxGridDBDataController.GetFilterPropertyValue(const AName: string; - var AValue: Variant): Boolean; -begin - Result := True; - if AName = 'FilterAutoDataSetFilter' then - AValue := Filter.AutoDataSetFilter - else - Result := False; -end;} - -function TcxGridDBDataController.GetItemDataBindingClass: TcxGridItemDataBindingClass; -begin - Result := TcxGridItemDBDataBinding; -end; - -function TcxGridDBDataController.GetItemDefaultValuesProviderClass: TcxCustomEditDefaultValuesProviderClass; -begin - Result := TcxGridDBDefaultValuesProvider; -end; - -function TcxGridDBDataController.GetNavigatorIsBof: Boolean; -begin - Result := GridView.Controller.IsStart; -end; - -function TcxGridDBDataController.GetNavigatorIsEof: Boolean; -begin - Result := GridView.Controller.IsFinish; -end; - -function TcxGridDBDataController.GetScrollBarPos: Integer; -begin - if SupportsScrollBarParams then - if dceInsert in EditState then - Result := FPrevScrollBarPos - else - Result := RecNo - 1 - else - Result := -1; - FPrevScrollBarPos := Result; -end; - -function TcxGridDBDataController.GetScrollBarRecordCount: Integer; -begin - if SupportsScrollBarParams then - Result := DataSetRecordCount + GridView.ViewInfo.VisibleRecordCount - 1 - else - Result := -1; -end; - -{function TcxGridDBDataController.SetFilterPropertyValue(const AName: string; - const AValue: Variant): Boolean; -begin - Result := True; - if AName = 'FilterAutoDataSetFilter' then - Filter.AutoDataSetFilter := StringToBoolean(AValue) - else - Result := False; -end;} - -function TcxGridDBDataController.SetScrollBarPos(Value: Integer): Boolean; -begin - Result := SupportsScrollBarParams; - if Result then - RecNo := Value + 1; -end; -{ -function TcxGridDBDataController.SetScrollBarPos(Value: Integer): Boolean; -begin - Result := SupportsScrollBarParams; - if Result and (RecNo <> Value + 1) then - begin - RecNo := Value + 1; - if RecNo = Value + 1 then - SetSelectionAnchor(FocusedRowIndex); - end; -end; -} - -function TcxGridDBDataController.CanSelectRow(ARowIndex: Integer): Boolean; -begin - Result := TcxCustomGridTableViewAccess.CanSelectRecord(GridView, ARowIndex); -end; - -function TcxGridDBDataController.CompareByField(ARecordIndex1, ARecordIndex2: Integer; - AField: TcxCustomDataField; AMode: TcxDataControllerComparisonMode): Integer; -begin - if GridView.ViewData.NeedsCustomDataComparison(AField, AMode) then - Result := GridView.ViewData.CustomCompareDataValues(AField, - GetComparedValue(ARecordIndex1, AField), GetComparedValue(ARecordIndex2, AField), AMode) - else - Result := inherited CompareByField(ARecordIndex1, ARecordIndex2, AField, AMode); -end; - -procedure TcxGridDBDataController.DoDataSetCurrentChanged(AIsCurrent: Boolean); -begin - inherited; - TcxCustomGridTableViewAccess.RefreshNavigators(GridView); -end; - -procedure TcxGridDBDataController.DoDataSourceChanged; -begin - TcxComponentAccess(GridView).UpdateFakeLinks; -end; - -procedure TcxGridDBDataController.DoValueTypeClassChanged(AItemIndex: Integer); -begin - inherited; - TcxCustomGridTableViewAccess.ItemValueTypeClassChanged(GridView, AItemIndex); -end; - -procedure TcxGridDBDataController.FilterChanged; -begin - inherited; - TcxCustomGridTableViewAccess.FilterChanged(GridView); -end; - -function TcxGridDBDataController.GetDefaultActiveRelationIndex: Integer; -begin - Result := TcxCustomGridTableViewAccess.GetDefaultActiveDetailIndex(GridView); -end; - -function TcxGridDBDataController.GetDefaultGridModeBufferCount: Integer; -begin - Result := TcxCustomGridTableViewInfoAccess.GetDefaultGridModeBufferCount(GridView.ViewInfo); - if Result = 0 then - Result := inherited GetDefaultGridModeBufferCount; -end; - -function TcxGridDBDataController.GetFilterDisplayText(ARecordIndex, AItemIndex: Integer): string; -begin - if GridView.ViewData.HasCustomDataHandling(Fields[AItemIndex], doFiltering) then - Result := GridView.ViewData.GetCustomDataDisplayText(ARecordIndex, AItemIndex, doFiltering) - else - Result := inherited GetFilterDisplayText(ARecordIndex, AItemIndex); -end; - -{function TcxGridDBDataController.GetIncrementalSearchText(ARecordIndex, AItemIndex: Integer): string; -begin - if not TcxCustomGridTableViewAccess(GridView).GetDisplayText(ARecordIndex, AItemIndex, Result) then - Result := inherited GetIncrementalSearchText(ARecordIndex, AItemIndex); -end;} - -function TcxGridDBDataController.GetItemID(AItem: TObject): Integer; -begin - if AItem is TcxCustomGridTableItem then - Result := TcxCustomGridTableItem(AItem).ID - else - Result := -1; -end; - -function TcxGridDBDataController.GetSortingBySummaryEngineClass: TcxSortingBySummaryEngineClass; -begin - Result := GridView.ViewData.GetSortingBySummaryEngineClass; -end; - -function TcxGridDBDataController.GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; -begin - Result := TcxCustomGridTableViewAccess.GetSummaryGroupItemLinkClass(GridView); - if Result = nil then - Result := inherited GetSummaryGroupItemLinkClass; -end; - -function TcxGridDBDataController.GetSummaryItemClass: TcxDataSummaryItemClass; -begin - Result := TcxCustomGridTableViewAccess.GetSummaryItemClass(GridView); - if Result = nil then - Result := inherited GetSummaryItemClass; -end; - -function TcxGridDBDataController.SupportsScrollBarParams: Boolean; -begin - Result := IsGridMode and IsSequenced and - TcxCustomGridTableViewAccess.IsEqualHeightRecords(GridView); -end; - -function TcxGridDBDataController.SyncDetailsFocusWithMaster: Boolean; -begin - Result := GridView.IsSynchronization; -end; - -procedure TcxGridDBDataController.UpdateScrollBars; -begin - inherited; - Controller.UpdateScrollBars; -end; - -procedure TcxGridDBDataController.BeginFullUpdate; -begin - GridView.BeginUpdate; - inherited; -end; - -procedure TcxGridDBDataController.EndFullUpdate; -begin - inherited; - GridView.EndUpdate; -end; - -function TcxGridDBDataController.CreateDetailLinkObject(ARelation: TcxCustomDataRelation; - ARecordIndex: Integer): TObject; -begin - Result := TcxGridLevelAccess.CreateLinkObject(TcxGridLevel(ARelation.Item), ARelation, ARecordIndex); -end; - -procedure TcxGridDBDataController.FocusControl(AItemIndex: Integer; var Done: Boolean); -begin - inherited; - TcxCustomGridTableViewAccess.FocusEdit(GridView, AItemIndex, Done); -end; - -function TcxGridDBDataController.GetDetailDataControllerByLinkObject(ALinkObject: TObject): TcxCustomDataController; -begin - Result := TcxCustomGridView(ALinkObject).DataController; -end; - -function TcxGridDBDataController.GetDisplayText(ARecordIndex, AItemIndex: Integer): string; -begin - if not GridView.ViewData.GetDisplayText(ARecordIndex, AItemIndex, Result) then - Result := inherited GetDisplayText(ARecordIndex, AItemIndex); - TcxCustomGridTableItemAccess.DoGetDataText(GridView.Items[AItemIndex], ARecordIndex, Result); -end; - -function TcxGridDBDataController.GetFilterDataValue(ARecordIndex: Integer; AField: TcxCustomDataField): Variant; -begin - Result := inherited GetFilterDataValue(ARecordIndex, AField); - if GridView.ViewData.HasCustomDataHandling(AField, doFiltering) then - Result := GridView.ViewData.GetCustomDataValue(AField, Result, doFiltering); -end; - -function TcxGridDBDataController.GetFilterItemFieldCaption(AItem: TObject): string; -begin - Result := TcxCustomGridTableItemAccess.GetFilterCaption(TcxCustomGridTableItem(AItem)); -end; - -function TcxGridDBDataController.GetItem(Index: Integer): TObject; -begin - Result := GridView.Items[Index]; -end; - -function TcxGridDBDataController.GetItemSortByDisplayText(AItemIndex: Integer; - ASortByDisplayText: Boolean): Boolean; -begin - Result := TcxCustomGridTableViewAccess.GetItemSortByDisplayText(GridView, - AItemIndex, ASortByDisplayText); -end; - -function TcxGridDBDataController.GetItemValueSource(AItemIndex: Integer): TcxDataEditValueSource; -begin - Result := TcxCustomGridTableViewAccess.GetItemValueSource(GridView, AItemIndex); -end; - -procedure TcxGridDBDataController.UpdateData; -begin - inherited; - TcxCustomGridTableViewAccess.UpdateRecord(GridView); -end; - -procedure TcxGridDBDataController.CreateAllItems(AMissingItemsOnly: Boolean = False); -var - I: Integer; - AItem: TcxCustomGridTableItem; -begin - if DataSet = nil then Exit; - ShowHourglassCursor; - try - GridView.BeginUpdate; - BeginUpdateFields; - try - with DataSet do - for I := 0 to FieldCount - 1 do - if not AMissingItemsOnly or (GetItemByFieldName(Fields[I].FieldName) = nil) then - begin - AItem := GridView.CreateItem; - with AItem do - begin - with DataBinding as TcxGridItemDBDataBinding do - FieldName := Fields[I].FieldName; - Name := CreateUniqueName(GridView.Owner, GridView, AItem, - ScxGridPrefixName, Fields[I].FieldName); - Visible := Fields[I].Visible; - end; - end; - finally - EndUpdateFields; - GridView.EndUpdate; - end; - finally - HideHourglassCursor; - end; -end; - -function TcxGridDBDataController.GetItemByFieldName(const AFieldName: string): TcxCustomGridTableItem; -begin - Result := TcxCustomGridTableItem(inherited GetItemByFieldName(AFieldName)); -end; - -{ TcxGridItemDBDataBinding } - -function TcxGridItemDBDataBinding.GetDataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(inherited DataController); -end; - -function TcxGridItemDBDataBinding.GetField: TField; -begin - Result := DataController.GetItemField(Item.Index); -end; - -function TcxGridItemDBDataBinding.GetFieldName: string; -begin - Result := DataController.GetItemFieldName(Item.Index); -end; - -procedure TcxGridItemDBDataBinding.SetFieldName(const Value: string); -begin - if FieldName <> Value then - begin - FilterMRUValueItems.ClearItems; - DataController.ChangeFieldName(Item.Index, Value); - end; -end; - -function TcxGridItemDBDataBinding.GetDefaultValueTypeClass: TcxValueTypeClass; -begin - Result := nil; -end; - -function TcxGridItemDBDataBinding.GetFilterFieldName: string; -begin - if Field = nil then - Result := '' - else - Result := Field.FieldName; -end; - -procedure TcxGridItemDBDataBinding.Init; -begin - inherited; - TcxGridDBDefaultValuesProvider(DefaultValuesProvider).DataSource := DataController.DataSource; - TcxGridDBDefaultValuesProvider(DefaultValuesProvider).Field := Field; - TcxGridDBDefaultValuesProvider(DefaultValuesProvider).FieldName := FieldName; -end; - -function TcxGridItemDBDataBinding.IsValueTypeStored: Boolean; -begin - Result := FieldName = ''; -end; - -procedure TcxGridItemDBDataBinding.Assign(Source: TPersistent); -begin - if Source is TcxGridItemDBDataBinding then - FieldName := TcxGridItemDBDataBinding(Source).FieldName; - inherited; -end; - -function TcxGridItemDBDataBinding.DefaultCaption: string; -var - AField: TField; -begin - AField := Field; - if AField = nil then - Result := FieldName - else - Result := AField.DisplayName; -end; - -function TcxGridItemDBDataBinding.DefaultRepositoryItem: TcxEditRepositoryItem; -begin - Result := GetDefaultEditDBRepositoryItems.GetItemByField(Field); -end; - -function TcxGridItemDBDataBinding.DefaultWidth(ATakeHeaderIntoAccount: Boolean = True): Integer; -var - AField: TField; - ACanvas: TcxCanvas; - AParams: TcxViewParams; - //W: Integer; -begin - AField := Field; - if AField = nil then - Result := inherited DefaultWidth(ATakeHeaderIntoAccount) - else - begin - ACanvas := GridView.ViewInfo.Canvas; - Item.Styles.GetContentParams(nil, AParams); - ACanvas.Font := AParams.Font; - Result := AField.DisplayWidth * ACanvas.TextWidth('0') + 2 * cxTextOffset; - {if ATakeHeaderIntoAccount then - begin - W := ACanvas.TextWidth(TcxCustomGridTableItemAccess(Item).Caption) + - 2 * (GridView.LookAndFeelPainter.HeaderBorderSize + cxTextOffset); - if W > Result then Result := W; - end;} - end; - TcxCustomGridTableItemAccess.CheckWidthValue(Item, Result); -end; - -initialization - RegisterClasses([TcxGridItemDBDataBinding]); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBTableView.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBTableView.pas deleted file mode 100644 index b8c703d2..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDBTableView.pas +++ /dev/null @@ -1,289 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridDBTableView; - -{$I cxVer.inc} - -interface - -uses - Classes, cxGridCustomTableView, cxGridTableView, cxGridDBDataDefinitions, - cxStorage, cxCustomData, cxDBData; - -type - TcxGridDBTableView = class; - - TcxGridDBColumn = class(TcxGridColumn) - private - function GetDataBinding: TcxGridItemDBDataBinding; - procedure SetDataBinding(Value: TcxGridItemDBDataBinding); - published - property DataBinding: TcxGridItemDBDataBinding read GetDataBinding write SetDataBinding; - end; - - TcxGridDBTableSummaryItem = class(TcxDBDataSummaryItem, - {$IFNDEF DELPHI6}IUnknown,{$ENDIF} IcxStoredObject, IcxGridSummaryItem) - private - FDisplayText: string; - FVisibleForCustomization: Boolean; - function GetColumn: TcxGridColumn; - function GetGridView: TcxGridTableView; - procedure SetColumn(Value: TcxGridColumn); - procedure SetDisplayText(const Value: string); - procedure SetVisibleForCustomization(Value: Boolean); - protected - // IInterface - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - // IcxStoredObject - function GetObjectName: string; - function GetProperties(AProperties: TStrings): Boolean; - procedure GetPropertyValue(const AName: string; var AValue: Variant); - procedure SetPropertyValue(const AName: string; const AValue: Variant); - // IcxGridSummaryItem - function GetDisplayText: string; - function GetVisibleForCustomization: Boolean; - - property GridView: TcxGridTableView read GetGridView; - public - constructor Create(Collection: TCollection); override; - procedure Assign(Source: TPersistent); override; - published - property Column: TcxGridColumn read GetColumn write SetColumn; - property DisplayText: string read FDisplayText write SetDisplayText; - property Sorted; - property VisibleForCustomization: Boolean read FVisibleForCustomization - write SetVisibleForCustomization default True; - end; - - TcxGridDBTableView = class(TcxGridTableView) - private - function GetColumn(Index: Integer): TcxGridDBColumn; - function GetDataController: TcxGridDBDataController; - procedure SetColumn(Index: Integer; Value: TcxGridDBColumn); - procedure SetDataController(Value: TcxGridDBDataController); - protected - function GetDataControllerClass: TcxCustomDataControllerClass; override; - function GetItemClass: TcxCustomGridTableItemClass; override; - function GetSummaryItemClass: TcxDataSummaryItemClass; override; - public - function CreateColumn: TcxGridDBColumn; - function GetColumnByFieldName(const AFieldName: string): TcxGridDBColumn; - property Columns[Index: Integer]: TcxGridDBColumn read GetColumn write SetColumn; - published - property DataController: TcxGridDBDataController read GetDataController write SetDataController; - end; - -implementation - -uses - cxGridCustomView; - -{ TcxGridDBColumn } - -function TcxGridDBColumn.GetDataBinding: TcxGridItemDBDataBinding; -begin - Result := TcxGridItemDBDataBinding(inherited DataBinding); -end; - -procedure TcxGridDBColumn.SetDataBinding(Value: TcxGridItemDBDataBinding); -begin - inherited DataBinding := Value; -end; - -{ TcxGridDBTableSummaryItem } - -constructor TcxGridDBTableSummaryItem.Create(Collection: TCollection); -begin - inherited; - FVisibleForCustomization := True; -end; - -function TcxGridDBTableSummaryItem.GetColumn: TcxGridColumn; -begin - Result := TcxGridColumn(ItemLink); -end; - -function TcxGridDBTableSummaryItem.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(TcxGridDBDataController(DataController).GridView); -end; - -procedure TcxGridDBTableSummaryItem.SetColumn(Value: TcxGridColumn); -begin - ItemLink := Value; -end; - -procedure TcxGridDBTableSummaryItem.SetDisplayText(const Value: string); -begin - if FDisplayText <> Value then - begin - FDisplayText := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridDBTableSummaryItem.SetVisibleForCustomization(Value: Boolean); -begin - if FVisibleForCustomization <> Value then - begin - FVisibleForCustomization := Value; - GridView.Changed(vcProperty); - end; -end; - -function TcxGridDBTableSummaryItem.QueryInterface(const IID: TGUID; out Obj): HResult; -const - E_NOINTERFACE = HResult($80004002); -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TcxGridDBTableSummaryItem._AddRef: Integer; -begin - Result := -1; -end; - -function TcxGridDBTableSummaryItem._Release: Integer; -begin - Result := -1; -end; - -function TcxGridDBTableSummaryItem.GetObjectName: string; -begin - Result := ''; -end; - -function TcxGridDBTableSummaryItem.GetProperties(AProperties: TStrings): Boolean; -begin - AProperties.Add('Column'); - Result := False; -end; - -procedure TcxGridDBTableSummaryItem.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'Column' then - if Column <> nil then - AValue := (Column as IcxStoredObject).GetObjectName - else - AValue := ''; -end; - -procedure TcxGridDBTableSummaryItem.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'Column' then - Column := TcxGridColumn(TcxCustomGridTableViewAccess.FindItemByObjectName(GridView, AValue)); -end; - -function TcxGridDBTableSummaryItem.GetDisplayText: string; -begin - Result := DisplayText; -end; - -function TcxGridDBTableSummaryItem.GetVisibleForCustomization: Boolean; -begin - Result := VisibleForCustomization; -end; - -procedure TcxGridDBTableSummaryItem.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridDBTableSummaryItem then - with TcxGridDBTableSummaryItem(Source) do - begin - Self.DisplayText := DisplayText; - Self.VisibleForCustomization := VisibleForCustomization; - end; -end; - -{ TcxGridDBTableView } - -function TcxGridDBTableView.GetColumn(Index: Integer): TcxGridDBColumn; -begin - Result := TcxGridDBColumn(inherited Columns[Index]); -end; - -function TcxGridDBTableView.GetDataController: TcxGridDBDataController; -begin - Result := TcxGridDBDataController(FDataController); -end; - -procedure TcxGridDBTableView.SetColumn(Index: Integer; Value: TcxGridDBColumn); -begin - inherited Columns[Index] := Value; -end; - -procedure TcxGridDBTableView.SetDataController(Value: TcxGridDBDataController); -begin - FDataController.Assign(Value); -end; - -function TcxGridDBTableView.GetDataControllerClass: TcxCustomDataControllerClass; -begin - Result := TcxGridDBDataController; -end; - -function TcxGridDBTableView.GetItemClass: TcxCustomGridTableItemClass; -begin - Result := TcxGridDBColumn; -end; - -function TcxGridDBTableView.GetSummaryItemClass: TcxDataSummaryItemClass; -begin - Result := TcxGridDBTableSummaryItem; -end; - -function TcxGridDBTableView.CreateColumn: TcxGridDBColumn; -begin - Result := TcxGridDBColumn(inherited CreateColumn); -end; - -function TcxGridDBTableView.GetColumnByFieldName(const AFieldName: string): TcxGridDBColumn; -begin - Result := TcxGridDBColumn(DataController.GetItemByFieldName(AFieldName)); -end; - -initialization - cxGridRegisteredViews.Register(TcxGridDBTableView, 'DB Table'); - Classes.RegisterClass(TcxGridDBColumn); - -finalization - cxGridRegisteredViews.Unregister(TcxGridDBTableView); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDetailsSite.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDetailsSite.pas deleted file mode 100644 index fefc000e..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridDetailsSite.pas +++ /dev/null @@ -1,2041 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridDetailsSite; - -{$I cxVer.inc} -{$I cxGridVer.inc} - -interface - -uses - Windows, Messages, Classes, Graphics, Controls, - cxClasses, cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters, -{$IFDEF USETABCONTROL} - cxPC, -{$ENDIF} - cxGridCommon, cxGridLevel, cxGridCustomView; - -const - htTab = 50; - - cxGridTabsRootSize: Integer = 1 + 3; - -type -{$IFNDEF USETABCONTROL} - TcxCustomGridDetailsSiteTabViewInfo = class; -{$ENDIF} - TcxCustomGridDetailsSiteTabsViewInfo = class; - TcxCustomGridDetailsSiteViewInfo = class; - - { hit tests } - - TcxGridDetailsSiteTabHitTestClass = class of TcxGridDetailsSiteTabHitTest; - - TcxGridDetailsSiteTabHitTest = class(TcxCustomGridHitTest) - private - FLevel: TcxGridLevel; - FOwner: TObject; - protected - class function GetHitTestCode: Integer; override; - public - property Level: TcxGridLevel read FLevel write FLevel; - property Owner: TObject read FOwner write FOwner; - end; - - { painters } - -{$IFNDEF USETABCONTROL} - - TcxGridDetailsSiteTabPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxCustomGridDetailsSiteTabViewInfo; - protected - procedure DrawBorder(ABorder: TcxBorder); override; - procedure DrawContent; override; - property ViewInfo: TcxCustomGridDetailsSiteTabViewInfo read GetViewInfo; - end; - -{$ENDIF} - - TcxGridDetailsSiteTabsPainterClass = class of TcxGridDetailsSiteTabsPainter; - - TcxGridDetailsSiteTabsPainter = class - private - FCanvas: TcxCanvas; - FViewInfo: TcxCustomGridDetailsSiteTabsViewInfo; - protected - {$IFNDEF USETABCONTROL} - procedure DrawBackground; virtual; - procedure DrawItems; virtual; - procedure DrawRoot; virtual; - {$ENDIF} - procedure Paint; virtual; - property Canvas: TcxCanvas read FCanvas; - property ViewInfo: TcxCustomGridDetailsSiteTabsViewInfo read FViewInfo; - public - constructor Create(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridDetailsSiteTabsViewInfo); virtual; - procedure MainPaint; - end; - - TcxGridDetailsSitePainterClass = class of TcxGridDetailsSitePainter; - - TcxGridDetailsSitePainter = class - private - FCanvas: TcxCanvas; - FViewInfo: TcxCustomGridDetailsSiteViewInfo; - protected - procedure DrawBackground; virtual; - procedure DrawFrame; virtual; - procedure DrawTabs; virtual; - property Canvas: TcxCanvas read FCanvas; - property ViewInfo: TcxCustomGridDetailsSiteViewInfo read FViewInfo; - public - constructor Create(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridDetailsSiteViewInfo); virtual; - procedure Paint; virtual; - end; - - { view infos } - - // custom tabs - -{$IFNDEF USETABCONTROL} - - TcxCustomGridDetailsSiteTabViewInfoClass = class of TcxCustomGridDetailsSiteTabViewInfo; - - TcxCustomGridDetailsSiteTabViewInfo = class(TcxCustomGridCellViewInfo) - private - FIndex: Integer; - FLevel: TcxGridLevel; - FTabsViewInfo: TcxCustomGridDetailsSiteTabsViewInfo; - function GetActive: Boolean; - function GetCaption: string; - function GetGrid: TcxControl; - function GetIsVertical: Boolean; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetSiteViewInfo: TcxCustomGridDetailsSiteViewInfo; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetCanvas: TcxCanvas; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetIsDesignSelected: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetStateForPaint: TcxGridCellState; virtual; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - function GetTextAttributes(AForPainting: Boolean): Integer; override; - function GetTextForPainting: string; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasFirstBorder: Boolean; - function HasLastBorder: Boolean; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - - property Grid: TcxControl read GetGrid; - property Index: Integer read FIndex; - property IsVertical: Boolean read GetIsVertical; - property Level: TcxGridLevel read FLevel; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property SiteViewInfo: TcxCustomGridDetailsSiteViewInfo read GetSiteViewInfo; - property TabsViewInfo: TcxCustomGridDetailsSiteTabsViewInfo read FTabsViewInfo; - public - constructor Create(ATabsViewInfo: TcxCustomGridDetailsSiteTabsViewInfo; - ALevel: TcxGridLevel); virtual; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - function ProcessDialogChar(ACharCode: Word): Boolean; virtual; - property Active: Boolean read GetActive; - property Caption: string read GetCaption; - property StateForPaint: TcxGridCellState read GetStateForPaint; - end; - -{$ENDIF} - -{$IFDEF USETABCONTROL} - - TcxGridLevelTabControlClass = class of TcxGridLevelTabControl; - - TcxGridLevelTabControl = class(TcxTabControl) - private - FSiteViewInfo: TcxCustomGridDetailsSiteViewInfo; - FUnderlineHotKeys: Boolean; - function GetActiveLevel: TcxGridLevel; - function GetLevel(Index: Integer): TcxGridLevel; - function GetLevelCount: Integer; - procedure SetActiveLevel(Value: TcxGridLevel); - procedure SetUnderlineHotKeys(Value: Boolean); - procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; - procedure CMDrag(var Message: TCMDrag); message CM_DRAG; - protected - FocusActiveViewOnChange: Boolean; - procedure AfterPaintTab(ACanvas: TcxCanvas; ATab: TcxTab; - AImageAndTextData: TcxPCOutTabImageAndTextData); override; - procedure Change; override; - function GetLevelDisplayText(ALevel: TcxGridLevel): string; virtual; - function GetTabHitTestClass: TcxGridDetailsSiteTabHitTestClass; virtual; - function HandleDialogChar(Key: Integer): Boolean; override; - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure Notification(AComponent: TComponent; AOperation: TOperation); override; - procedure PrepareTabCanvasFont(ATab: TcxTab; ACanvas: TcxCanvas); override; - procedure WndProc(var Message: TMessage); override; - - procedure DblClick; override; - function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - public - constructor Create(ASiteViewInfo: TcxCustomGridDetailsSiteViewInfo); reintroduce; virtual; - procedure AddLevel(ALevel: TcxGridLevel); - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - - property ActiveLevel: TcxGridLevel read GetActiveLevel write SetActiveLevel; - property LevelCount: Integer read GetLevelCount; - property Levels[Index: Integer]: TcxGridLevel read GetLevel; - property SiteViewInfo: TcxCustomGridDetailsSiteViewInfo read FSiteViewInfo; - property UnderlineHotKeys: Boolean read FUnderlineHotKeys write SetUnderlineHotKeys; - end; - -{$ENDIF} - - TcxCustomGridDetailsSiteTabsViewInfoClass = class of TcxCustomGridDetailsSiteTabsViewInfo; - - TcxCustomGridDetailsSiteTabsViewInfo = class - private - FHeight: Integer; - FSiteViewInfo: TcxCustomGridDetailsSiteViewInfo; - {$IFDEF USETABCONTROL} - FTabControl: TcxGridLevelTabControl; - {$ELSE} - FItems: TList; - {$ENDIF} - FWidth: Integer; - function GetActiveLevel: TcxGridLevel; - {$IFNDEF USETABCONTROL} - function GetCanvas: TcxCanvas; - function GetCount: Integer; - function GetItem(Index: Integer): TcxCustomGridDetailsSiteTabViewInfo; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetMainSize: Integer; - function GetTabSize: Integer; - {$ENDIF} - function GetHeight: Integer; - function GetLevel: TcxGridLevel; - function GetWidth: Integer; - {$IFNDEF USETABCONTROL} - procedure CreateItems; - procedure DestroyItems; - {$ENDIF} - protected - procedure AdjustBounds; virtual; abstract; - function CalculateHeight: Integer; virtual; - function CalculateWidth: Integer; virtual; - procedure CheckSiteViewInfoHeight(var AHeight: Integer); virtual; - procedure CheckSiteViewInfoWidth(var AWidth: Integer); virtual; - function GetBkColor: TColor; virtual; - function GetFirstVisibleTabIndex: Integer; virtual; - procedure SetFirstVisibleTabIndex(Value: Integer); virtual; - function GetIsVertical: Boolean; virtual; abstract; - {$IFNDEF USETABCONTROL} - function GetActiveTabOffset: Integer; virtual; abstract; - function GetItemClass: TcxCustomGridDetailsSiteTabViewInfoClass; virtual; abstract; - function GetItemHeight(AItem: TcxCustomGridDetailsSiteTabViewInfo): Integer; virtual; - function GetItemWidth(AItem: TcxCustomGridDetailsSiteTabViewInfo): Integer; virtual; - function GetRootBorders: TcxBorders; virtual; abstract; - function GetRootBounds: TRect; virtual; abstract; - {$ENDIF} - function GetPainterClass: TcxGridDetailsSiteTabsPainterClass; virtual; - {$IFDEF USETABCONTROL} - function AreTabsRotated: Boolean; virtual; - function GetTabControlBounds: TRect; virtual; - function GetTabControlClass: TcxGridLevelTabControlClass; virtual; - function GetTabPosition: TcxTabPosition; virtual; abstract; - procedure InitTabControl; virtual; - procedure InitTabControlData; virtual; - procedure InitTabControlHotKeyParams; virtual; - procedure InitTabControlLayout; virtual; - procedure InitTabControlStyle; virtual; - procedure InitTabsStyle; virtual; - {$ENDIF} - - property FirstVisibleTabIndex: Integer read GetFirstVisibleTabIndex write SetFirstVisibleTabIndex; - property IsVertical: Boolean read GetIsVertical; - property Level: TcxGridLevel read GetLevel; - {$IFNDEF USETABCONTROL} - property ActiveTabOffset: Integer read GetActiveTabOffset; - property Canvas: TcxCanvas read GetCanvas; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property MainSize: Integer read GetMainSize; - property TabSize: Integer read GetTabSize; - {$ENDIF} - public - Bounds: TRect; - constructor Create(ASiteViewInfo: TcxCustomGridDetailsSiteViewInfo); virtual; - destructor Destroy; override; - procedure BeforeRecalculation; virtual; - procedure Calculate(const ABounds: TRect); virtual; - procedure GetClientBounds(var AClientBounds: TRect); virtual; abstract; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - function ProcessDialogChar(ACharCode: Word): Boolean; virtual; - - property ActiveLevel: TcxGridLevel read GetActiveLevel; - property BkColor: TColor read GetBkColor; - {$IFDEF USETABCONTROL} - property TabControl: TcxGridLevelTabControl read FTabControl; - {$ELSE} - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxCustomGridDetailsSiteTabViewInfo read GetItem; - property RootBorders: TcxBorders read GetRootBorders; - property RootBounds: TRect read GetRootBounds; - {$ENDIF} - property Height: Integer read GetHeight; - property SiteViewInfo: TcxCustomGridDetailsSiteViewInfo read FSiteViewInfo; - property Width: Integer read GetWidth; - end; - - // left tabs - -{$IFNDEF USETABCONTROL} - - TcxGridDetailsSiteLeftTabViewInfo = class(TcxCustomGridDetailsSiteTabViewInfo) - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetBorders: TcxBorders; override; - public - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - end; - -{$ENDIF} - - TcxGridDetailsSiteLeftTabsViewInfo = class(TcxCustomGridDetailsSiteTabsViewInfo) - protected - procedure AdjustBounds; override; - procedure CheckSiteViewInfoHeight(var AHeight: Integer); override; - function GetIsVertical: Boolean; override; - {$IFDEF USETABCONTROL} - function GetTabPosition: TcxTabPosition; override; - {$ELSE} - function GetActiveTabOffset: Integer; override; - function GetItemClass: TcxCustomGridDetailsSiteTabViewInfoClass; override; - function GetRootBorders: TcxBorders; override; - function GetRootBounds: TRect; override; - {$ENDIF} - public - procedure GetClientBounds(var AClientBounds: TRect); override; - end; - - // top tabs - -{$IFNDEF USETABCONTROL} - - TcxGridDetailsSiteTopTabViewInfo = class(TcxCustomGridDetailsSiteTabViewInfo) - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetBorders: TcxBorders; override; - public - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - end; - -{$ENDIF} - - TcxGridDetailsSiteTopTabsViewInfo = class(TcxCustomGridDetailsSiteTabsViewInfo) - protected - procedure AdjustBounds; override; - procedure CheckSiteViewInfoWidth(var AWidth: Integer); override; - function GetIsVertical: Boolean; override; - {$IFDEF USETABCONTROL} - function GetTabPosition: TcxTabPosition; override; - {$ELSE} - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetActiveTabOffset: Integer; override; - function GetItemClass: TcxCustomGridDetailsSiteTabViewInfoClass; override; - function GetItemHeight(AItem: TcxCustomGridDetailsSiteTabViewInfo): Integer; override; - function GetItemWidth(AItem: TcxCustomGridDetailsSiteTabViewInfo): Integer; override; - function GetRootBorders: TcxBorders; override; - function GetRootBounds: TRect; override; - {$ENDIF} - public - procedure GetClientBounds(var AClientBounds: TRect); override; - end; - - // custom details site - - TcxCustomGridDetailsSiteViewInfoCachedInfoClass = class of TcxCustomGridDetailsSiteViewInfoCachedInfo; - - TcxCustomGridDetailsSiteViewInfoCachedInfo = class - FirstVisibleTabIndex: Integer; - end; - - TcxCustomGridDetailsSiteViewInfo = class(TcxComponent) - private - FActiveGridView: TcxCustomGridView; - FFullyVisible: Boolean; - FLevel: TcxGridLevel; - FNormalHeight: Integer; - FTabsViewInfo: TcxCustomGridDetailsSiteTabsViewInfo; - function GetClientHeight: Integer; - function GetClientWidth: Integer; - function GetControl: TcxControl; - function GetFrameBounds: TRect; - function GetInternalHeight: Integer; - function GetInternalWidth: Integer; - function GetIsActiveGridViewDestroying: Boolean; - function GetLookAndFeel: TcxLookAndFeel; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - function GetMaxDetailHeight: Integer; - function GetMaxDetailSize: TPoint; - function GetMaxDetailWidth: Integer; - function GetNonClientHeight: Integer; - function GetNonClientWidth: Integer; - function GetTabsPosition: TcxGridDetailTabsPosition; - protected - procedure Notification(AComponent: TComponent; AOperation: TOperation); override; - - function CalculateHeight: Integer; virtual; - function CalculateWidth: Integer; virtual; - function GetBkColor: TColor; virtual; - function GetCanvas: TcxCanvas; virtual; abstract; - function GetClientBounds: TRect; virtual; - function GetContainer: TcxControl; virtual; abstract; - function GetDesignController: TcxCustomGridDesignController; virtual; abstract; - function GetEmptyClientHeight: Integer; virtual; - function GetEmptyClientWidth: Integer; virtual; - function GetFrameColor: TColor; virtual; - function GetFrameWidth: Integer; virtual; - function GetFullyVisible: Boolean; virtual; - function GetHeight: Integer; virtual; - function GetMasterRecord: TObject; virtual; abstract; // TcxCustomGridRecord - function GetMaxHeight: Integer; virtual; abstract; - function GetMaxNormalHeight: Integer; virtual; - function GetMaxWidth: Integer; virtual; abstract; - function GetMinWidth: Integer; virtual; - function GetNormalHeight: Integer; virtual; - function GetWidth: Integer; virtual; - - function GetPainterClass: TcxGridDetailsSitePainterClass; virtual; - function GetTabsViewInfoClass: TcxCustomGridDetailsSiteTabsViewInfoClass; virtual; - - function GetActiveGridView: TcxCustomGridView; virtual; abstract; - function GetActiveGridViewExists: Boolean; virtual; - function GetActiveGridViewValue: TcxCustomGridView; virtual; - function GetActiveLevel: TcxGridLevel; virtual; abstract; - function GetVisible: Boolean; virtual; - - procedure GetLevelTabDefaultParams(var AParams: TcxViewParams); virtual; - procedure GetLevelTabParams(ALevel: TcxGridLevel; var AParams: TcxViewParams); virtual; - procedure InitTabHitTest(AHitTest: TcxGridDetailsSiteTabHitTest); virtual; abstract; - - procedure GetCachedInfo(var AInfo: TcxCustomGridDetailsSiteViewInfoCachedInfo); virtual; - function GetCachedInfoClass: TcxCustomGridDetailsSiteViewInfoCachedInfoClass; virtual; - procedure SetCachedInfo(var AInfo: TcxCustomGridDetailsSiteViewInfoCachedInfo); virtual; - - property ActiveGridView: TcxCustomGridView read GetActiveGridViewValue; - property ActiveGridViewExists: Boolean read GetActiveGridViewExists; - property Canvas: TcxCanvas read GetCanvas; - property ClientHeight: Integer read GetClientHeight; - property ClientWidth: Integer read GetClientWidth; - property Container: TcxControl read GetContainer; // grid or site - property Control: TcxControl read GetControl; // grid - property DesignController: TcxCustomGridDesignController read GetDesignController; - property EmptyClientHeight: Integer read GetEmptyClientHeight; - property EmptyClientWidth: Integer read GetEmptyClientWidth; - property InternalHeight: Integer read GetInternalHeight; - property InternalWidth: Integer read GetInternalWidth; - property IsActiveGridViewDestroying: Boolean read GetIsActiveGridViewDestroying; - property LookAndFeel: TcxLookAndFeel read GetLookAndFeel; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - property MaxDetailHeight: Integer read GetMaxDetailHeight; - property MaxDetailSize: TPoint read GetMaxDetailSize; - property MaxDetailWidth: Integer read GetMaxDetailWidth; - property MaxHeight: Integer read GetMaxHeight; - property MaxNormalHeight: Integer read GetMaxNormalHeight; - property MaxWidth: Integer read GetMaxWidth; - property MinWidth: Integer read GetMinWidth; - property NonClientHeight: Integer read GetNonClientHeight; - property NonClientWidth: Integer read GetNonClientWidth; - property TabsPosition: TcxGridDetailTabsPosition read GetTabsPosition; - public - Bounds: TRect; - constructor Create(ALevel: TcxGridLevel); reintroduce; virtual; - destructor Destroy; override; - procedure BeforeRecalculation; virtual; - procedure Calculate(ALeftBound, ATopBound: Integer); virtual; - procedure ChangeActiveTab(ALevel: TcxGridLevel; AFocusView: Boolean = False); virtual; abstract; - function DetailHasData(ALevel: TcxGridLevel): Boolean; virtual; abstract; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - function IsTabVisible(ALevel: TcxGridLevel): Boolean; virtual; - procedure Paint(ACanvas: TcxCanvas); - function ProcessDialogChar(ACharCode: Word): Boolean; - function SupportsTabAccelerators: Boolean; virtual; - procedure VisibilityChanged(AVisible: Boolean); virtual; - - property ActiveLevel: TcxGridLevel read GetActiveLevel; - property BkColor: TColor read GetBkColor; - property ClientBounds: TRect read GetClientBounds; - property FrameBounds: TRect read GetFrameBounds; - property FrameColor: TColor read GetFrameColor; - property FrameWidth: Integer read GetFrameWidth; - property FullyVisible: Boolean read GetFullyVisible; - property Height: Integer read GetHeight; - property Level: TcxGridLevel read FLevel; - property MasterRecord: TObject read GetMasterRecord; - property NormalHeight: Integer read GetNormalHeight; - property TabsViewInfo: TcxCustomGridDetailsSiteTabsViewInfo read FTabsViewInfo; - property Visible: Boolean read GetVisible; - property Width: Integer read GetWidth; - end; - -implementation - -uses - SysUtils, Math, Forms, Menus, cxPCPainters, cxGrid, cxGridCustomTableView; - -const - ActiveLeftTabOffset = 3; - ActiveTopTabOffset = 2; - TabsAreaOffset = 2; - TabTextOffset = 5; - -type - TWinControlAccess = class(TWinControl); - -{ TcxGridDetailsSiteTabHitTest } - -class function TcxGridDetailsSiteTabHitTest.GetHitTestCode: Integer; -begin - Result := htTab; -end; - -{$IFNDEF USETABCONTROL} - -{ TcxGridDetailsSiteTabPainter } - -function TcxGridDetailsSiteTabPainter.GetViewInfo: TcxCustomGridDetailsSiteTabViewInfo; -begin - Result := TcxCustomGridDetailsSiteTabViewInfo(inherited ViewInfo); -end; - -procedure TcxGridDetailsSiteTabPainter.DrawBorder(ABorder: TcxBorder); -begin - with ViewInfo do - LookAndFeelPainter.DrawTabBorder(Self.Canvas, BorderBounds[ABorder], ABorder, - Borders, IsVertical); -end; - -procedure TcxGridDetailsSiteTabPainter.DrawContent; -begin - with ViewInfo do - if LookAndFeelPainter.IsDrawTabImplemented(IsVertical) then - LookAndFeelPainter.DrawTab(Self.Canvas, Bounds, Borders, - TextForPainting, GridCellStateToButtonState(StateForPaint), IsVertical, Params.Font, - Params.TextColor, Params.Color, cxGridTabAccelSupport and SiteViewInfo.SupportsTabAccelerators) - else - inherited; -end; - -{$ENDIF} - -{ TcxGridDetailsSiteTabsPainter } - -constructor TcxGridDetailsSiteTabsPainter.Create(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridDetailsSiteTabsViewInfo); -begin - inherited Create; - FCanvas := ACanvas; - FViewInfo := AViewInfo; -end; - -{$IFNDEF USETABCONTROL} - -procedure TcxGridDetailsSiteTabsPainter.DrawBackground; -begin - Canvas.Brush.Color := ViewInfo.BkColor; - Canvas.FillRect(ViewInfo.Bounds); -end; - -procedure TcxGridDetailsSiteTabsPainter.DrawItems; -var - I: Integer; -begin - for I := 0 to FViewInfo.Count - 1 do - FViewInfo.Items[I].Paint; -end; - -procedure TcxGridDetailsSiteTabsPainter.DrawRoot; -begin - with ViewInfo do - LookAndFeelPainter.DrawTabsRoot(Self.Canvas, RootBounds, RootBorders, IsVertical); -end; - -{$ENDIF} - -procedure TcxGridDetailsSiteTabsPainter.Paint; -begin -{$IFDEF USETABCONTROL} - // to create handle and show control if it was recreated during form loading - ViewInfo.TabControl.UpdateControlState; -{$ELSE} - DrawBackground; - DrawRoot; - DrawItems; -{$ENDIF} -end; - -procedure TcxGridDetailsSiteTabsPainter.MainPaint; -var - AClipRegion, ARegion: TcxRegion; -begin - AClipRegion := Canvas.GetClipRegion; - ARegion := TcxRegion.Create(ViewInfo.Bounds); - Canvas.SetClipRegion(ARegion, roIntersect); - try - Paint; - finally - Canvas.SetClipRegion(AClipRegion, roSet); - end; -end; - -{ TcxGridDetailsSitePainter } - -constructor TcxGridDetailsSitePainter.Create(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridDetailsSiteViewInfo); -begin - inherited Create; - FCanvas := ACanvas; - FViewInfo := AViewInfo; -end; - -procedure TcxGridDetailsSitePainter.DrawBackground; -begin - Canvas.Brush.Color := ViewInfo.BkColor; - Canvas.FillRect(ViewInfo.ClientBounds); -end; - -procedure TcxGridDetailsSitePainter.DrawFrame; -begin - with ViewInfo do - Self.Canvas.FrameRect(FrameBounds, FrameColor, FrameWidth); -end; - -procedure TcxGridDetailsSitePainter.DrawTabs; -var - AViewInfo: TcxCustomGridDetailsSiteTabsViewInfo; -begin - AViewInfo := ViewInfo.TabsViewInfo; - if AViewInfo <> nil then - with AViewInfo.GetPainterClass.Create(Canvas, AViewInfo) do - try - MainPaint; - finally - Free; - end; -end; - -procedure TcxGridDetailsSitePainter.Paint; -begin - if ViewInfo.FrameWidth <> 0 then - DrawFrame; - DrawTabs; - DrawBackground; - //Canvas.ExcludeClipRect(ViewInfo.Bounds); -end; - -{$IFNDEF USETABCONTROL} - -{ TcxCustomGridDetailsSiteTabViewInfo } - -constructor TcxCustomGridDetailsSiteTabViewInfo.Create(ATabsViewInfo: TcxCustomGridDetailsSiteTabsViewInfo; - ALevel: TcxGridLevel); -begin - inherited Create; - FTabsViewInfo := ATabsViewInfo; - FLevel := ALevel; - FIndex := FLevel.VisibleIndex; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetActive: Boolean; -begin - Result := FTabsViewInfo.ActiveLevel = FLevel; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetCaption: string; -begin - Result := FLevel.Caption; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetGrid: TcxControl; -begin - Result := FLevel.Control; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetIsVertical: Boolean; -begin - Result := FTabsViewInfo.IsVertical; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := FTabsViewInfo.LookAndFeelPainter; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetSiteViewInfo: TcxCustomGridDetailsSiteViewInfo; -begin - Result := FTabsViewInfo.SiteViewInfo; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.CalculateHeight: Integer; -begin - Result := TextHeightWithOffset; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.CalculateWidth: Integer; -begin - Result := 2 * TabTextOffset + TextWidthWithOffset; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := LookAndFeelPainter.TabBorderSize(IsVertical); -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetCanvas: TcxCanvas; -begin - Result := FTabsViewInfo.Canvas; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridDetailsSiteTabHitTest; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetHotTrack: Boolean; -begin - Result := LookAndFeelPainter.IsTabHotTrack(IsVertical); -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetIsDesignSelected: Boolean; -begin - Result := Grid.IsDesigning and - TcxCustomGrid(Grid).StructureNavigator.IsObjectSelected(FLevel); -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridDetailsSiteTabPainter; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetStateForPaint: TcxGridCellState; -begin - if Active then - Result := gcsPressed - else - Result := State; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetText: string; -begin - Result := Caption; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetTextAreaBounds: TRect; -begin - Result := inherited GetTextAreaBounds; - InflateRect(Result, -TabTextOffset, 0); -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetTextAttributes(AForPainting: Boolean): Integer; -begin - Result := inherited GetTextAttributes(AForPainting); - if cxGridTabAccelSupport and SiteViewInfo.SupportsTabAccelerators then - Result := Result or cxShowPrefix; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.GetTextForPainting: string; -begin - if cxGridTabAccelSupport and not SiteViewInfo.SupportsTabAccelerators then - Result := FLevel.DisplayCaption - else - Result := inherited GetTextForPainting; -end; - -procedure TcxCustomGridDetailsSiteTabViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - FTabsViewInfo.Level.Styles.GetTabParams(TcxCustomGridRecord(SiteViewInfo.MasterRecord), - Level, AParams); -end; - -function TcxCustomGridDetailsSiteTabViewInfo.HasFirstBorder: Boolean; -begin - Result := (Index = 0) or not TabsViewInfo.Items[Index - 1].Active; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.HasLastBorder: Boolean; -begin - Result := (Index = TabsViewInfo.Count - 1) or not TabsViewInfo.Items[Index + 1].Active; -end; - -procedure TcxCustomGridDetailsSiteTabViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - TcxGridDetailsSiteTabHitTest(AHitTest).Level := FLevel; - SiteViewInfo.InitTabHitTest(TcxGridDetailsSiteTabHitTest(AHitTest)); -end; - -function TcxCustomGridDetailsSiteTabViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - inherited MouseDown(AHitTest, AButton, AShift); - if (AButton = mbLeft) and not (ssDouble in AShift) and Grid.IsDesigning then - TcxCustomGrid(Grid).StructureNavigator.SelectObject(FLevel, not (ssShift in AShift)); - SiteViewInfo.ChangeActiveTab(FLevel, False); - Result := True; -end; - -function TcxCustomGridDetailsSiteTabViewInfo.ProcessDialogChar(ACharCode: Word): Boolean; -begin - Result := cxGridTabAccelSupport and SiteViewInfo.SupportsTabAccelerators and - IsAccel(ACharCode, Caption); - if Result then - SiteViewInfo.ChangeActiveTab(FLevel, True); -end; - -{$ENDIF} - -{$IFDEF USETABCONTROL} - -{ TcxGridTabControl } - -constructor TcxGridLevelTabControl.Create(ASiteViewInfo: TcxCustomGridDetailsSiteViewInfo); -begin - inherited Create(nil); - Focusable := False; - IsTabsContainer := True; - Options := Options + [pcoFixedTabWidthWhenRotated]; - ParentBackground := False; - FSiteViewInfo := ASiteViewInfo; - FUnderlineHotKeys := True; -end; - -function TcxGridLevelTabControl.GetActiveLevel: TcxGridLevel; -begin - if TabIndex = -1 then - Result := nil - else - Result := Levels[TabIndex]; -end; - -function TcxGridLevelTabControl.GetLevel(Index: Integer): TcxGridLevel; -begin - Result := TcxGridLevel(Tabs.Objects[Index]); -end; - -function TcxGridLevelTabControl.GetLevelCount: Integer; -begin - Result := Tabs.Count; -end; - -procedure TcxGridLevelTabControl.SetActiveLevel(Value: TcxGridLevel); -var - ATabIndex: Integer; -begin - ATabIndex := Tabs.IndexOfObject(Value); - if ATabIndex = -1 then ATabIndex := 0; - TabIndex := ATabIndex; -end; - -procedure TcxGridLevelTabControl.SetUnderlineHotKeys(Value: Boolean); -var - I: Integer; -begin - if FUnderlineHotKeys <> Value then - begin - FUnderlineHotKeys := Value; - for I := 0 to Tabs.Count - 1 do - Tabs[I].Caption := GetLevelDisplayText(Levels[I]); - end; -end; - -procedure TcxGridLevelTabControl.CMDialogChar(var Message: TCMDialogChar); -begin - // no default handling -end; - -procedure TcxGridLevelTabControl.CMDrag(var Message: TCMDrag); -begin - // to restore correct handle after previous TabControl was destroyed as result of tab change - Message.DragRec.Source.DragHandle := Handle; - // no default behavior - message goes to parent in WndProc -end; - -procedure TcxGridLevelTabControl.AfterPaintTab(ACanvas: TcxCanvas; ATab: TcxTab; - AImageAndTextData: TcxPCOutTabImageAndTextData); - - function GetDesignSelectionBounds: TRect; - begin - Result := AImageAndTextData.TabTextRect; - InflateRect(Result, cxDesignSelectionWidth, cxDesignSelectionWidth); - if IsVerticalText(Self) then - InflateRect(Result, 0, 1) - else - InflateRect(Result, 1, 0); - end; - -begin - inherited; - if SiteViewInfo.Container.IsDesigning and - SiteViewInfo.DesignController.IsObjectSelected(Levels[ATab.Index]) then - ACanvas.DrawDesignSelection(GetDesignSelectionBounds); -end; - -procedure TcxGridLevelTabControl.Change; -begin - inherited; - SiteViewInfo.ChangeActiveTab(ActiveLevel, FocusActiveViewOnChange); -end; - -function TcxGridLevelTabControl.GetLevelDisplayText(ALevel: TcxGridLevel): string; - - procedure ConvertTextToDisplayText(var AText: string); - var - I: Integer; - begin - for I := Length(AText) downto 1 do - if AText[I] = cHotkeyPrefix then - Insert(cHotkeyPrefix, AText, I); - end; - -begin - Result := ALevel.Caption; - if cxGridTabAccelSupport then - if UnderlineHotKeys then - // nothing to do - else - begin - Result := StripHotkey(Result); - ConvertTextToDisplayText(Result); - end - else - ConvertTextToDisplayText(Result); -end; - -function TcxGridLevelTabControl.GetTabHitTestClass: TcxGridDetailsSiteTabHitTestClass; -begin - Result := TcxGridDetailsSiteTabHitTest; -end; - -function TcxGridLevelTabControl.HandleDialogChar(Key: Integer): Boolean; -begin - FocusActiveViewOnChange := (SiteViewInfo.ActiveGridView <> nil) and - SiteViewInfo.ActiveGridView.Focused; - try - Result := inherited HandleDialogChar(Key); - finally - FocusActiveViewOnChange := False; - end; -end; - -procedure TcxGridLevelTabControl.Notification(AComponent: TComponent; AOperation: TOperation); -var - ATabIndex: Integer; -begin - inherited; - if (AOperation = opRemove) and (AComponent is TcxGridLevel) then - begin - ATabIndex := Tabs.IndexOfObject(AComponent); - if ATabIndex <> -1 then - Tabs.Delete(ATabIndex); - end; -end; - -procedure TcxGridLevelTabControl.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - ATabIndex: Integer; - AParent: TWinControl; - P: TPoint; -begin - if (Button = mbLeft) and not (ssDouble in Shift) and SiteViewInfo.Container.IsDesigning then - begin - ATabIndex := IndexOfTabAt(X, Y); - if ATabIndex <> -1 then - SiteViewInfo.DesignController.SelectObject(Levels[ATabIndex], not (ssShift in Shift)); - end; - AParent := Parent; - P := AParent.ScreenToClient(ClientToScreen(Point(X, Y))); - inherited; - TWinControlAccess(AParent).MouseDown(Button, Shift, P.X, P.Y); -end; - -procedure TcxGridLevelTabControl.PrepareTabCanvasFont(ATab: TcxTab; ACanvas: TcxCanvas); -var - AParams: TcxViewParams; -begin - inherited; - if (Levels[ATab.Index] = nil) or (LookAndFeel.SkinPainter <> nil) then Exit; - SiteViewInfo.GetLevelTabParams(Levels[ATab.Index], AParams); - ACanvas.Font := AParams.Font; - ACanvas.Font.Color := AParams.TextColor; -end; - -procedure TcxGridLevelTabControl.WndProc(var Message: TMessage); -begin - inherited; - // TabControl is transparent for drag & drop: message goes to parent (site) - if Message.Msg = CM_DRAG then - with Message do - Result := Parent.Perform(Msg, WParam, LParam); -end; - -procedure TcxGridLevelTabControl.DblClick; -begin - inherited; - TWinControlAccess(Parent).DblClick; -end; - -function TcxGridLevelTabControl.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; - MousePos: TPoint): Boolean; -begin - Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); - if not Result then - Result := TWinControlAccess(Parent).DoMouseWheel(Shift, WheelDelta, MousePos); -end; - -procedure TcxGridLevelTabControl.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited; - with Parent.ScreenToClient(ClientToScreen(Point(X, Y))) do - TWinControlAccess(Parent).MouseMove(Shift, X, Y); -end; - -procedure TcxGridLevelTabControl.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - AParent: TWinControl; - P: TPoint; -begin - AParent := Parent; - P := AParent.ScreenToClient(ClientToScreen(Point(X, Y))); - inherited; - TWinControlAccess(AParent).MouseUp(Button, Shift, P.X, P.Y); -end; - -procedure TcxGridLevelTabControl.AddLevel(ALevel: TcxGridLevel); -var - ATabIndex: Integer; -begin - ATabIndex := Tabs.AddObject(GetLevelDisplayText(ALevel), ALevel); - Tabs[ATabIndex].ImageIndex := ALevel.ImageIndex; - ALevel.FreeNotification(Self); -end; - -function TcxGridLevelTabControl.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - ATabIndex: Integer; -begin - ATabIndex := IndexOfTabAt(P.X, P.Y); - if ATabIndex = -1 then - Result := nil - else - begin - Result := GetTabHitTestClass.Instance(P); - Result.ViewInfo := nil; - TcxGridDetailsSiteTabHitTest(Result).Level := Levels[ATabIndex]; - SiteViewInfo.InitTabHitTest(TcxGridDetailsSiteTabHitTest(Result)); - end; -end; - -{$ENDIF} - -{ TcxCustomGridDetailsSiteTabsViewInfo } - -constructor TcxCustomGridDetailsSiteTabsViewInfo.Create(ASiteViewInfo: TcxCustomGridDetailsSiteViewInfo); -begin - inherited Create; - FSiteViewInfo := ASiteViewInfo; -{$IFDEF USETABCONTROL} - FTabControl := GetTabControlClass.Create(FSiteViewInfo); - InitTabControl; -{$ELSE} - CreateItems; -{$ENDIF} -end; - -destructor TcxCustomGridDetailsSiteTabsViewInfo.Destroy; -begin -{$IFDEF USETABCONTROL} - TabControl.Parent := nil; - FreeAndNil(FTabControl); -{$ELSE} - DestroyItems; -{$ENDIF} - inherited; -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetActiveLevel: TcxGridLevel; -begin - Result := FSiteViewInfo.ActiveLevel; -end; - -{$IFNDEF USETABCONTROL} - -function TcxCustomGridDetailsSiteTabsViewInfo.GetCanvas: TcxCanvas; -begin - Result := FSiteViewInfo.Canvas; -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetItem(Index: Integer): TcxCustomGridDetailsSiteTabViewInfo; -begin - Result := TcxCustomGridDetailsSiteTabViewInfo(FItems[Index]); -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := FSiteViewInfo.LookAndFeelPainter; -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetMainSize: Integer; -begin - if IsVertical then - Result := Width - else - Result := Height; -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetTabSize: Integer; -begin - Result := MainSize - TabsAreaOffset - (cxGridTabsRootSize - 1); -end; - -{$ENDIF} - -function TcxCustomGridDetailsSiteTabsViewInfo.GetHeight: Integer; -begin - if FHeight = 0 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetLevel: TcxGridLevel; -begin - Result := FSiteViewInfo.Level; -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetWidth: Integer; -begin - if FWidth = 0 then - FWidth := CalculateWidth; - Result := FWidth; -end; - -{$IFNDEF USETABCONTROL} - -procedure TcxCustomGridDetailsSiteTabsViewInfo.CreateItems; -var - I: Integer; -begin - FItems := TList.Create; - for I := 0 to Level.VisibleCount - 1 do - FItems.Add(GetItemClass.Create(Self, Level.VisibleItems[I])); -end; - -procedure TcxCustomGridDetailsSiteTabsViewInfo.DestroyItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Free; - FItems.Free; -end; - -{$ENDIF} - -function TcxCustomGridDetailsSiteTabsViewInfo.CalculateHeight: Integer; -{$IFNDEF USETABCONTROL} -var - I: Integer; -{$ENDIF} -begin -{$IFDEF USETABCONTROL} - if IsVertical then - Result := TabControl.GetOptimalSize - else - Result := TabControl.DisplayRect.Top; -{$ELSE} - Result := 2 * TabsAreaOffset; - for I := 0 to Count - 1 do - Inc(Result, GetItemHeight(Items[I])); -{$ENDIF} -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.CalculateWidth: Integer; -{$IFNDEF USETABCONTROL} -var - I, AItemWidth: Integer; -{$ENDIF} -begin -{$IFDEF USETABCONTROL} - if IsVertical then - Result := TabControl.DisplayRect.Left - else - Result := TabControl.GetOptimalSize; -{$ELSE} - Result := 0; - for I := 0 to Count - 1 do - begin - AItemWidth := GetItemWidth(Items[I]); - if AItemWidth > Result then Result := AItemWidth; - end; - if Count > 1 then Inc(Result, ActiveTabOffset); - Inc(Result, TabsAreaOffset + cxGridTabsRootSize - 1); -{$ENDIF} -end; - -procedure TcxCustomGridDetailsSiteTabsViewInfo.CheckSiteViewInfoHeight(var AHeight: Integer); -begin -end; - -procedure TcxCustomGridDetailsSiteTabsViewInfo.CheckSiteViewInfoWidth(var AWidth: Integer); -begin -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetBkColor: TColor; -var - AParams: TcxViewParams; -begin - Level.Styles.GetViewParams(lsTabsBackground, nil, nil, AParams); - Result := AParams.Color; -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetFirstVisibleTabIndex: Integer; -begin -{$IFDEF USETABCONTROL} - Result := TabControl.FirstVisibleTab; -{$ELSE} - Result := 0; -{$ENDIF} -end; - -procedure TcxCustomGridDetailsSiteTabsViewInfo.SetFirstVisibleTabIndex(Value: Integer); -begin -{$IFDEF USETABCONTROL} - TabControl.FirstVisibleTab := Value; -{$ENDIF} -end; - -{$IFNDEF USETABCONTROL} - -function TcxCustomGridDetailsSiteTabsViewInfo.GetItemHeight(AItem: TcxCustomGridDetailsSiteTabViewInfo): Integer; -begin - Result := AItem.CalculateHeight; -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetItemWidth(AItem: TcxCustomGridDetailsSiteTabViewInfo): Integer; -begin - Result := AItem.CalculateWidth; -end; - -{$ENDIF} - -function TcxCustomGridDetailsSiteTabsViewInfo.GetPainterClass: TcxGridDetailsSiteTabsPainterClass; -begin - Result := TcxGridDetailsSiteTabsPainter; -end; - -{$IFDEF USETABCONTROL} - -function TcxCustomGridDetailsSiteTabsViewInfo.AreTabsRotated: Boolean; -begin - Result := IsVertical; -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetTabControlBounds: TRect; -begin - Result := Bounds; -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetTabControlClass: TcxGridLevelTabControlClass; -begin - Result := TcxGridLevelTabControl; -end; - -procedure TcxCustomGridDetailsSiteTabsViewInfo.InitTabControl; -begin - InitTabControlHotKeyParams; - InitTabControlData; - InitTabControlLayout; - InitTabControlStyle; -end; - -procedure TcxCustomGridDetailsSiteTabsViewInfo.InitTabControlData; -var - I: Integer; - AActiveLevel, ALevel: TcxGridLevel; -begin - AActiveLevel := ActiveLevel; - for I := 0 to Level.VisibleCount - 1 do - begin - ALevel := Level.VisibleItems[I]; - if (ALevel = AActiveLevel) or SiteViewInfo.IsTabVisible(ALevel) then - TabControl.AddLevel(ALevel); - end; - TabControl.ActiveLevel := AActiveLevel; -end; - -procedure TcxCustomGridDetailsSiteTabsViewInfo.InitTabControlHotKeyParams; -begin - TabControl.UnderlineHotKeys := SiteViewInfo.SupportsTabAccelerators; -end; - -procedure TcxCustomGridDetailsSiteTabsViewInfo.InitTabControlLayout; -begin - TabControl.Rotate := AreTabsRotated; - TabControl.TabPosition := GetTabPosition; -end; - -procedure TcxCustomGridDetailsSiteTabsViewInfo.InitTabControlStyle; -var - ATabsInfo: TcxGridLevelTabs; -begin - ATabsInfo := TcxCustomGrid(SiteViewInfo.Control).LevelTabs; - if BkColor <> clDefault then - TabControl.Color := BkColor; - TabControl.ImageBorder := ATabsInfo.ImageBorder; - TabControl.Images := ATabsInfo.Images; - TabControl.TabCaptionAlignment := ATabsInfo.CaptionAlignment; - TabControl.Style := ATabsInfo.Style; - TabControl.TabSlants := ATabsInfo.Slants; - TabControl.LookAndFeel.MasterLookAndFeel := SiteViewInfo.LookAndFeel; - InitTabsStyle; -end; - -procedure TcxCustomGridDetailsSiteTabsViewInfo.InitTabsStyle; -var - ATabDefaultParams, ATabParams: TcxViewParams; - I: Integer; -begin - SiteViewInfo.GetLevelTabDefaultParams(ATabDefaultParams); - for I := 0 to TabControl.Tabs.Count - 1 do - begin - SiteViewInfo.GetLevelTabParams(TabControl.Levels[I], ATabParams); - if ATabParams.Color <> ATabDefaultParams.Color then - TabControl.Tabs[I].Color := ATabParams.Color; - end; -end; - -{$ENDIF} - -procedure TcxCustomGridDetailsSiteTabsViewInfo.BeforeRecalculation; -begin -{$IFDEF USETABCONTROL} - InitTabControlHotKeyParams; -{$ENDIF} -end; - -procedure TcxCustomGridDetailsSiteTabsViewInfo.Calculate(const ABounds: TRect); -{$IFNDEF USETABCONTROL} -var - ATabLeft, ATabTop, ATabSize, I: Integer; - - procedure CalculateFirstTabPos; - begin - ATabLeft := Bounds.Left + TabsAreaOffset; - ATabTop := Bounds.Top + TabsAreaOffset; - if (Count <> 0) and Items[0].Active then - if IsVertical then - Dec(ATabTop, Items[0].BorderWidth[bTop]) - else - Dec(ATabLeft, Items[0].BorderWidth[bLeft]); - end; - - function GetTabWidth: Integer; - begin - if IsVertical then - Result := ATabSize - else - Result := -1; - end; - - function GetTabHeight: Integer; - begin - if IsVertical then - Result := -1 - else - Result := ATabSize; - end; - - procedure CalculateNextTabPos; - begin - if IsVertical then - Inc(ATabTop, Items[I].Height) - else - Inc(ATabLeft, Items[I].Width); - end; -{$ENDIF} -begin - Bounds := ABounds; - AdjustBounds; -{$IFDEF USETABCONTROL} - TabControl.BoundsRect := GetTabControlBounds; - TabControl.Parent := SiteViewInfo.Container; -{$ELSE} - CalculateFirstTabPos; - ATabSize := TabSize; - for I := 0 to Count - 1 do - begin - Items[I].Calculate(ATabLeft, ATabTop, GetTabWidth, GetTabHeight); - CalculateNextTabPos; - end; -{$ENDIF} -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -{$IFNDEF USETABCONTROL} -var - I: Integer; -{$ENDIF} -begin -{$IFDEF USETABCONTROL} - Result := TabControl.GetHitTest(TabControl.ScreenToClient(SiteViewInfo.Container.ClientToScreen(P))); -{$ELSE} - Result := nil; - for I := 0 to Count - 1 do - begin - Result := Items[I].GetHitTest(P); - if Result <> nil then Break; - end; -{$ENDIF} -end; - -function TcxCustomGridDetailsSiteTabsViewInfo.ProcessDialogChar(ACharCode: Word): Boolean; -{$IFNDEF USETABCONTROL} -var - I: Integer; -{$ENDIF} -begin -{$IFDEF USETABCONTROL} - Result := TabControl.HandleDialogChar(ACharCode); -{$ELSE} - for I := 0 to Count - 1 do - begin - Result := Items[I].Visible and Items[I].ProcessDialogChar(ACharCode); - if Result then Exit; - end; - Result := False; -{$ENDIF} -end; - -{$IFNDEF USETABCONTROL} - -{ TcxGridDetailsSiteLeftTabViewInfo } - -function TcxGridDetailsSiteLeftTabViewInfo.CalculateHeight: Integer; -begin - Result := inherited CalculateHeight; - if Active then Inc(Result, BorderWidth[bTop] + BorderWidth[bBottom]); - Inc(Result, BorderSize[bTop] + BorderSize[bBottom]); -end; - -function TcxGridDetailsSiteLeftTabViewInfo.CalculateWidth: Integer; -begin - Result := inherited CalculateWidth; - Inc(Result, BorderWidth[bLeft] + BorderWidth[bRight]); -end; - -function TcxGridDetailsSiteLeftTabViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridDetailsSiteLeftTabViewInfo.GetBorders: TcxBorders; -begin - Result := [bLeft]; - if Active then - Result := Result + [bTop, bBottom] - else - begin - Include(Result, bRight); - if HasFirstBorder then Include(Result, bTop); - if HasLastBorder then Include(Result, bBottom); - end; -end; - -procedure TcxGridDetailsSiteLeftTabViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - if not Active then - begin - Inc(ALeftBound, TabsViewInfo.ActiveTabOffset); - if AWidth <> -1 then Dec(AWidth, TabsViewInfo.ActiveTabOffset); - end; - inherited; -end; - -{$ENDIF} - -{ TcxGridDetailsSiteLeftTabsViewInfo } - -procedure TcxGridDetailsSiteLeftTabsViewInfo.AdjustBounds; -begin - Bounds.Right := Min(Bounds.Left + Width, Bounds.Right); -end; - -procedure TcxGridDetailsSiteLeftTabsViewInfo.CheckSiteViewInfoHeight(var AHeight: Integer); -begin - inherited; - if AHeight < Height then AHeight := Height; -end; - -function TcxGridDetailsSiteLeftTabsViewInfo.GetIsVertical: Boolean; -begin - Result := True; -end; - -{$IFDEF USETABCONTROL} - -function TcxGridDetailsSiteLeftTabsViewInfo.GetTabPosition: TcxTabPosition; -begin - Result := tpLeft; -end; - -{$ELSE} - -function TcxGridDetailsSiteLeftTabsViewInfo.GetActiveTabOffset: Integer; -begin - Result := ActiveLeftTabOffset; -end; - -function TcxGridDetailsSiteLeftTabsViewInfo.GetItemClass: TcxCustomGridDetailsSiteTabViewInfoClass; -begin - Result := TcxGridDetailsSiteLeftTabViewInfo; -end; - -function TcxGridDetailsSiteLeftTabsViewInfo.GetRootBorders: TcxBorders; -begin - Result := [bLeft, bTop, bBottom]; -end; - -function TcxGridDetailsSiteLeftTabsViewInfo.GetRootBounds: TRect; -begin - Result := Bounds; - Result.Left := Result.Right - cxGridTabsRootSize; -end; - -{$ENDIF} - -procedure TcxGridDetailsSiteLeftTabsViewInfo.GetClientBounds(var AClientBounds: TRect); -begin - Inc(AClientBounds.Left, Width); -end; - -{$IFNDEF USETABCONTROL} - -{ TcxGridDetailsSiteTopTabViewInfo } - -function TcxGridDetailsSiteTopTabViewInfo.CalculateHeight: Integer; -begin - Result := inherited CalculateHeight; - Inc(Result, BorderWidth[bTop] + BorderWidth[bBottom]); -end; - -function TcxGridDetailsSiteTopTabViewInfo.CalculateWidth: Integer; -begin - Result := inherited CalculateWidth; - if Active then Inc(Result, BorderWidth[bLeft] + BorderWidth[bRight]); - Inc(Result, BorderSize[bLeft] + BorderSize[bRight]); -end; - -function TcxGridDetailsSiteTopTabViewInfo.GetBorders: TcxBorders; -begin - Result := [bTop]; - if Active then - Result := Result + [bLeft, bRight] - else - begin - Include(Result, bBottom); - if HasFirstBorder then Include(Result, bLeft); - if HasLastBorder then Include(Result, bRight); - end; -end; - -procedure TcxGridDetailsSiteTopTabViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - if not Active then - begin - Inc(ATopBound, TabsViewInfo.ActiveTabOffset); - if AHeight <> -1 then Dec(AHeight, TabsViewInfo.ActiveTabOffset); - end; - inherited; -end; - -{$ENDIF} - -{ TcxGridDetailsSiteTopTabsViewInfo } - -procedure TcxGridDetailsSiteTopTabsViewInfo.AdjustBounds; -begin - Bounds.Bottom := Min(Bounds.Top + Height, Bounds.Bottom); -end; - -procedure TcxGridDetailsSiteTopTabsViewInfo.CheckSiteViewInfoWidth(var AWidth: Integer); -begin - inherited; - if AWidth < Width then AWidth := Width; -end; - -function TcxGridDetailsSiteTopTabsViewInfo.GetIsVertical: Boolean; -begin - Result := False; -end; - -{$IFDEF USETABCONTROL} - -function TcxGridDetailsSiteTopTabsViewInfo.GetTabPosition: TcxTabPosition; -begin - Result := tpTop; -end; - -{$ELSE} - -function TcxGridDetailsSiteTopTabsViewInfo.CalculateHeight: Integer; -begin - Result := inherited CalculateWidth; -end; - -function TcxGridDetailsSiteTopTabsViewInfo.CalculateWidth: Integer; -begin - Result := inherited CalculateHeight; -end; - -function TcxGridDetailsSiteTopTabsViewInfo.GetActiveTabOffset: Integer; -begin - Result := ActiveTopTabOffset; -end; - -function TcxGridDetailsSiteTopTabsViewInfo.GetItemClass: TcxCustomGridDetailsSiteTabViewInfoClass; -begin - Result := TcxGridDetailsSiteTopTabViewInfo; -end; - -function TcxGridDetailsSiteTopTabsViewInfo.GetItemHeight(AItem: TcxCustomGridDetailsSiteTabViewInfo): Integer; -begin - Result := inherited GetItemWidth(AItem); -end; - -function TcxGridDetailsSiteTopTabsViewInfo.GetItemWidth(AItem: TcxCustomGridDetailsSiteTabViewInfo): Integer; -begin - Result := inherited GetItemHeight(AItem); -end; - -function TcxGridDetailsSiteTopTabsViewInfo.GetRootBorders: TcxBorders; -begin - Result := [bLeft, bTop, bRight]; -end; - -function TcxGridDetailsSiteTopTabsViewInfo.GetRootBounds: TRect; -begin - Result := Bounds; - Result.Top := Result.Bottom - cxGridTabsRootSize; -end; - -{$ENDIF} - -procedure TcxGridDetailsSiteTopTabsViewInfo.GetClientBounds(var AClientBounds: TRect); -begin - Inc(AClientBounds.Top, Height); -end; - -{ TcxCustomGridDetailsSiteViewInfo } - -constructor TcxCustomGridDetailsSiteViewInfo.Create(ALevel: TcxGridLevel); -begin - inherited Create(nil); - FLevel := ALevel; - if GetTabsViewInfoClass <> nil then - FTabsViewInfo := GetTabsViewInfoClass.Create(Self); -end; - -destructor TcxCustomGridDetailsSiteViewInfo.Destroy; -begin - VisibilityChanged(False); - FTabsViewInfo.Free; - inherited; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetClientHeight: Integer; -begin - with ClientBounds do - Result := Bottom - Top; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetClientWidth: Integer; -begin - with ClientBounds do - Result := Right - Left; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetControl: TcxControl; -begin - Result := FLevel.Control; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetFrameBounds: TRect; -begin - Result := ClientBounds; - InflateRect(Result, FrameWidth, FrameWidth); -end; - -function TcxCustomGridDetailsSiteViewInfo.GetInternalHeight: Integer; -begin - with Bounds do - Result := Bottom - Top; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetInternalWidth: Integer; -begin - with Bounds do - Result := Right - Left; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetIsActiveGridViewDestroying: Boolean; -begin - Result := (FActiveGridView <> nil) and FActiveGridView.IsDestroying; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetLookAndFeel: TcxLookAndFeel; -begin - Result := TcxCustomGrid(Control).LookAndFeel; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := LookAndFeel.Painter; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetMaxDetailHeight: Integer; -begin - Result := MaxHeight - NonClientHeight; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetMaxDetailSize: TPoint; -begin - Result := Point(MaxDetailWidth, MaxDetailHeight); -end; - -function TcxCustomGridDetailsSiteViewInfo.GetMaxDetailWidth: Integer; -begin - Result := MaxWidth - NonClientWidth; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetNonClientHeight: Integer; -begin - Result := InternalHeight - ClientHeight; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetNonClientWidth: Integer; -begin - Result := InternalWidth - ClientWidth; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetTabsPosition: TcxGridDetailTabsPosition; -begin - Result := Level.Options.DetailTabsPosition; -end; - -procedure TcxCustomGridDetailsSiteViewInfo.Notification(AComponent: TComponent; - AOperation: TOperation); -begin - inherited; - if (AOperation = opRemove) and (AComponent = FActiveGridView) then - FActiveGridView := nil; -end; - -function TcxCustomGridDetailsSiteViewInfo.CalculateHeight: Integer; -begin - if ActiveGridView = nil then - begin - FFullyVisible := True; - Result := EmptyClientHeight; - end - else - begin - Result := 0; - FFullyVisible := False; - ActiveGridView.ViewInfo.GetHeight(MaxDetailSize, Result, FFullyVisible); - end; - Inc(Result, NonClientHeight); - if FTabsViewInfo <> nil then - FTabsViewInfo.CheckSiteViewInfoHeight(Result); - FNormalHeight := Result; - if FNormalHeight > MaxNormalHeight then FNormalHeight := MaxNormalHeight; - if not FullyVisible then - Result := MaxHeight - else - begin - if Result > MaxHeight then Result := MaxHeight; - if Result < 0 then Result := 0; - end; - if FNormalHeight < Result then FNormalHeight := Result; -end; - -function TcxCustomGridDetailsSiteViewInfo.CalculateWidth: Integer; -begin - if ActiveGridView = nil then - Result := EmptyClientWidth - else - ActiveGridView.ViewInfo.GetWidth(MaxDetailSize, Result); - Inc(Result, NonClientWidth); - if FTabsViewInfo <> nil then - FTabsViewInfo.CheckSiteViewInfoWidth(Result); - if Result < MinWidth then Result := MinWidth; - if Result > MaxWidth then Result := MaxWidth; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetBkColor: TColor; -begin - Result := LookAndFeelPainter.DefaultGridDetailsSiteColor; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetClientBounds: TRect; -begin - Result := Bounds; - if FTabsViewInfo <> nil then - FTabsViewInfo.GetClientBounds(Result); - InflateRect(Result, -FrameWidth, -FrameWidth); -end; - -function TcxCustomGridDetailsSiteViewInfo.GetEmptyClientHeight: Integer; -begin - Result := 100; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetEmptyClientWidth: Integer; -begin - Result := 200; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetFrameColor: TColor; -begin - Result := FLevel.Options.GetDetailFrameColor; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetFrameWidth: Integer; -begin - Result := Level.Options.DetailFrameWidth; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetFullyVisible: Boolean; -begin - Result := FFullyVisible; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetHeight: Integer; -begin - Result := CalculateHeight; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetMaxNormalHeight: Integer; -begin - Result := MaxInt; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetMinWidth: Integer; -begin - Result := MaxWidth; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetNormalHeight: Integer; -begin - Result := FNormalHeight; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetWidth: Integer; -begin - Result := CalculateWidth; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetPainterClass: TcxGridDetailsSitePainterClass; -begin - Result := TcxGridDetailsSitePainter; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetTabsViewInfoClass: TcxCustomGridDetailsSiteTabsViewInfoClass; -begin - case TabsPosition of - dtpLeft: - Result := TcxGridDetailsSiteLeftTabsViewInfo; - dtpTop: - Result := TcxGridDetailsSiteTopTabsViewInfo; - else - Result := nil; - end; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetActiveGridViewExists: Boolean; -begin - Result := (FActiveGridView <> nil) and not IsActiveGridViewDestroying; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetActiveGridViewValue: TcxCustomGridView; -begin - if FActiveGridView = nil then - begin - FActiveGridView := GetActiveGridView; - if FActiveGridView <> nil then - FActiveGridView.FreeNotification(Self); - end; - Result := FActiveGridView; - if IsActiveGridViewDestroying then - Result := nil; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetVisible: Boolean; -begin - Result := True; -end; - -procedure TcxCustomGridDetailsSiteViewInfo.GetLevelTabDefaultParams(var AParams: TcxViewParams); -begin - Level.Styles.GetTabDefaultParams(AParams); -end; - -procedure TcxCustomGridDetailsSiteViewInfo.GetLevelTabParams(ALevel: TcxGridLevel; - var AParams: TcxViewParams); -begin - Level.Styles.GetTabParams(TcxCustomGridRecord(MasterRecord), ALevel, AParams); -end; - -procedure TcxCustomGridDetailsSiteViewInfo.GetCachedInfo(var AInfo: TcxCustomGridDetailsSiteViewInfoCachedInfo); -begin - AInfo := GetCachedInfoClass.Create; - if TabsViewInfo <> nil then - AInfo.FirstVisibleTabIndex := TabsViewInfo.FirstVisibleTabIndex; -end; - -function TcxCustomGridDetailsSiteViewInfo.GetCachedInfoClass: TcxCustomGridDetailsSiteViewInfoCachedInfoClass; -begin - Result := TcxCustomGridDetailsSiteViewInfoCachedInfo; -end; - -procedure TcxCustomGridDetailsSiteViewInfo.SetCachedInfo(var AInfo: TcxCustomGridDetailsSiteViewInfoCachedInfo); -begin - if TabsViewInfo <> nil then - TabsViewInfo.FirstVisibleTabIndex := AInfo.FirstVisibleTabIndex; - FreeAndNil(AInfo); -end; - -procedure TcxCustomGridDetailsSiteViewInfo.BeforeRecalculation; -begin - if FTabsViewInfo <> nil then - FTabsViewInfo.BeforeRecalculation; -end; - -procedure TcxCustomGridDetailsSiteViewInfo.Calculate(ALeftBound, ATopBound: Integer); -begin - Bounds.Left := ALeftBound; - Bounds.Top := ATopBound; - Bounds.Right := Bounds.Left + Width; - Bounds.Bottom := Bounds.Top + Height; - - if FTabsViewInfo <> nil then - FTabsViewInfo.Calculate(Bounds); - - if ActiveGridView <> nil then - ActiveGridView.ViewInfo.MainCalculate(ClientBounds); -end; - -function TcxCustomGridDetailsSiteViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; - - function GetDetailP: TPoint; - begin - with ActiveGridView.Site do - begin - Result.X := P.X - Left; - Result.Y := P.Y - Top; - end; - end; - -begin - if FTabsViewInfo <> nil then - Result := FTabsViewInfo.GetHitTest(P) - else - Result := nil; - if (Result = nil) and (ActiveGridView <> nil) then - Result := ActiveGridView.ViewInfo.GetHitTest(GetDetailP); -end; - -function TcxCustomGridDetailsSiteViewInfo.IsTabVisible(ALevel: TcxGridLevel): Boolean; -begin - Result := Level.Options.TabsForEmptyDetails or DetailHasData(ALevel); -end; - -procedure TcxCustomGridDetailsSiteViewInfo.Paint(ACanvas: TcxCanvas); -begin - with GetPainterClass.Create(ACanvas, Self) do - try - Paint; - finally - Free; - end; -end; - -function TcxCustomGridDetailsSiteViewInfo.ProcessDialogChar(ACharCode: Word): Boolean; -begin - Result := (FTabsViewInfo <> nil) and FTabsViewInfo.ProcessDialogChar(ACharCode); -end; - -function TcxCustomGridDetailsSiteViewInfo.SupportsTabAccelerators: Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridDetailsSiteViewInfo.VisibilityChanged(AVisible: Boolean); -begin - if ActiveGridViewExists then - ActiveGridView.ViewInfo.DoVisibilityChanged(AVisible); -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridEditor.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridEditor.dfm deleted file mode 100644 index 5e7018c7..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridEditor.dfm +++ /dev/null @@ -1,339 +0,0 @@ -object cxGridEditor: TcxGridEditor - Left = 457 - Top = 105 - Width = 610 - Height = 435 - HorzScrollBar.Range = 4 - VertScrollBar.Range = 34 - BorderIcons = [biSystemMenu] - Caption = 'Editing' - Color = clBtnFace - ParentFont = True - OldCreateOrder = True - OnClose = FormClose - PixelsPerInch = 96 - TextHeight = 13 - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 594 - Height = 361 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Splitter1: TSplitter - Left = 240 - Top = 0 - Width = 8 - Height = 361 - end - object Panel4: TPanel - Left = 248 - Top = 0 - Width = 346 - Height = 361 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Panel11: TPanel - Left = 0 - Top = 8 - Width = 346 - Height = 23 - Align = alTop - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object Panel12: TPanel - Left = 1 - Top = 1 - Width = 344 - Height = 21 - Align = alClient - BevelOuter = bvNone - Color = clInfoBk - TabOrder = 0 - object Label1: TLabel - Left = 7 - Top = 4 - Width = 26 - Height = 13 - Caption = 'View:' - end - object LSelectedView: TLabel - Left = 38 - Top = 4 - Width = 72 - Height = 13 - Caption = '' - end - end - end - object Panel5: TPanel - Left = 0 - Top = 0 - Width = 346 - Height = 8 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - end - object Panel13: TPanel - Left = 0 - Top = 31 - Width = 346 - Height = 8 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - end - object Panel15: TPanel - Left = 0 - Top = 39 - Width = 346 - Height = 322 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - Constraints.MinWidth = 100 - TabOrder = 3 - object PViewFrame: TPanel - Left = 1 - Top = 1 - Width = 344 - Height = 320 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - end - end - end - object PLeft: TPanel - Left = 0 - Top = 0 - Width = 240 - Height = 361 - Align = alLeft - BevelOuter = bvNone - TabOrder = 1 - object Panel7: TPanel - Left = 0 - Top = 8 - Width = 8 - Height = 353 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - end - object Panel8: TPanel - Left = 0 - Top = 0 - Width = 240 - Height = 8 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - end - object Panel14: TPanel - Left = 8 - Top = 8 - Width = 232 - Height = 353 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - Constraints.MinHeight = 200 - Constraints.MinWidth = 189 - TabOrder = 2 - object PageControl1: TcxPageControl - Left = 1 - Top = 1 - Width = 230 - Height = 351 - ActivePage = tsLevels - Align = alClient - TabOrder = 0 - ClientRectBottom = 351 - ClientRectRight = 230 - ClientRectTop = 24 - object tsLevels: TcxTabSheet - BorderWidth = 8 - Caption = ' Structure ' - Color = clBtnFace - ParentColor = False - object PLevels: TPanel - Left = 0 - Top = 0 - Width = 214 - Height = 277 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - end - object Panel6: TPanel - Left = 0 - Top = 277 - Width = 214 - Height = 34 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BAddLevel: TcxButton - Left = 1 - Top = 8 - Width = 80 - Height = 24 - Caption = '&Add Level' - TabOrder = 0 - OnClick = BAddLevelClick - end - object BDeleteLevel: TcxButton - Left = 90 - Top = 8 - Width = 80 - Height = 24 - Caption = '&Delete Level' - TabOrder = 1 - OnClick = BDeleteLevelClick - end - end - end - object TabSheet2: TcxTabSheet - BorderWidth = 8 - Caption = ' Views ' - Color = clBtnFace - ImageIndex = 1 - ParentColor = False - object PViews: TPanel - Left = 0 - Top = 0 - Width = 214 - Height = 247 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBViews: TListBox - Left = 1 - Top = 1 - Width = 212 - Height = 245 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMViewList - TabOrder = 0 - OnClick = LBViewsClick - OnKeyPress = GridStructureControlKeyPress - end - end - object Panel9: TPanel - Left = 0 - Top = 247 - Width = 214 - Height = 64 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BAddView: TcxButton - Left = 1 - Top = 8 - Width = 80 - Height = 24 - Caption = 'Add &View...' - TabOrder = 0 - OnClick = BAddViewClick - end - object BDeleteView: TcxButton - Left = 90 - Top = 8 - Width = 80 - Height = 24 - Caption = 'D&elete View' - TabOrder = 1 - OnClick = BDeleteViewClick - end - object BEditView: TcxButton - Left = 1 - Top = 40 - Width = 169 - Height = 24 - Caption = 'Edit View &Layout and Data...' - TabOrder = 2 - OnClick = miEditLayoutClick - end - end - end - end - end - end - end - object Panel2: TPanel - Left = 0 - Top = 361 - Width = 602 - Height = 40 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object Panel3: TPanel - Left = 425 - Top = 0 - Width = 177 - Height = 40 - Align = alRight - BevelOuter = bvNone - TabOrder = 0 - object BClose: TcxButton - Left = 89 - Top = 8 - Width = 80 - Height = 24 - Cancel = True - Caption = '&Close' - TabOrder = 0 - OnClick = BCloseClick - end - end - end - object Panel10: TPanel - Left = 594 - Top = 0 - Width = 8 - Height = 361 - Align = alRight - BevelOuter = bvNone - TabOrder = 2 - end - object PMGridStructureControl: TPopupMenu - Left = 80 - Top = 64 - end - object PMViews: TPopupMenu - Left = 80 - Top = 96 - end - object PMViewList: TPopupMenu - Left = 80 - Top = 128 - object miDeleteView: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BDeleteViewClick - end - object N1: TMenuItem - Caption = '-' - end - object miEditLayout: TMenuItem - Caption = '&Edit Layout and Data...' - OnClick = miEditLayoutClick - end - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridEditor.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridEditor.pas deleted file mode 100644 index 122b2bcc..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridEditor.pas +++ /dev/null @@ -1,768 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridEditor; // TODO: Add Level and View... - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - DesignIntf, DesignWindows, ComponentDesigner, -{$ELSE} - DsgnIntf, LibIntf, -{$ENDIF} - Windows, Classes, SysUtils, Controls, Graphics, Forms, cxClasses, - StdCtrls, ExtCtrls, ComCtrls, Menus, - cxControls, cxDesignWindows, cxGridStructureNavigator, - cxGrid, cxGridLevel, cxGridCustomView, cxViewEditor, - cxGridViewLayoutEditor, cxLookAndFeelPainters, cxButtons, cxPC, cxLookAndFeels; - -type - TSelectionInfo = record - Level: TcxGridLevel; - View: TcxCustomGridView; - MultiSelect: Boolean; - end; - - TcxGridEditor = class(TcxDesignFormEditor) - Panel1: TPanel; - Panel2: TPanel; - Panel3: TPanel; - BClose: TcxButton; - Panel4: TPanel; - PLeft: TPanel; - Splitter1: TSplitter; - Panel7: TPanel; - Panel8: TPanel; - PMGridStructureControl: TPopupMenu; - PMViews: TPopupMenu; - Panel11: TPanel; - Panel10: TPanel; - PMViewList: TPopupMenu; - miDeleteView: TMenuItem; - N1: TMenuItem; - miEditLayout: TMenuItem; - Panel5: TPanel; - Panel12: TPanel; - Label1: TLabel; - LSelectedView: TLabel; - Panel13: TPanel; - Panel14: TPanel; - PageControl1: TcxPageControl; - tsLevels: TcxTabSheet; - PLevels: TPanel; - Panel6: TPanel; - BAddLevel: TcxButton; - BDeleteLevel: TcxButton; - TabSheet2: TcxTabSheet; - PViews: TPanel; - LBViews: TListBox; - Panel9: TPanel; - BAddView: TcxButton; - BDeleteView: TcxButton; - BEditView: TcxButton; - Panel15: TPanel; - PViewFrame: TPanel; - procedure BCloseClick(Sender: TObject); - procedure BDeleteLevelClick(Sender: TObject); - procedure BAddLevelClick(Sender: TObject); - procedure LBViewsClick(Sender: TObject); - procedure BAddViewClick(Sender: TObject); - procedure BDeleteViewClick(Sender: TObject); - procedure GridStructureControlKeyPress(Sender: TObject; var Key: Char); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure miEditLayoutClick(Sender: TObject); - private - FGridStructureControl: TcxGridStructureControl; - FGridStructureHelper: TcxGridStructureHelper; - FViewEditor: TcxViewEditor; - procedure CreateViewClick(Sender: TObject); - function GetGrid: TcxCustomGrid; - function GetView(Index: Integer): TcxCustomGridView; - function GetViewCount: Integer; - function GetViewRepository: TcxGridViewRepository; - procedure GridStructureControlSelectionChanged(Sender: TObject); - procedure HideViewFrame; - procedure ShowViewFrame(AView: TcxCustomGridView; AMultiView: Boolean; ARefreshNeeded: Boolean); - procedure UpdateButtons; - procedure UpdateDesigner(Sender: TObject); - procedure UpdateGridStructureControl; - procedure UpdateGridStructureControlSelection; - procedure UpdateViewFrame(ARefreshNeeded: Boolean); - procedure UpdateViewFrameCaption; - procedure UpdateViewList; - protected - function GetSelectionInfo: TSelectionInfo; - function GetViewEditorClass(AView: TcxCustomGridView): TcxViewEditorClass; virtual; - procedure InitFormEditor; override; - procedure InitIDESelection; virtual; - procedure InitLookAndFeel(AControl: TWinControl); - procedure LoadSettings; - procedure SaveSettings; - function UniqueName(Component: TComponent): string; override; - procedure UpdateContent; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure DoItemsModified; override; - function GetRegKey: string; - function GetRegSectionName: string; - procedure SelectionsChanged(const ASelection: TDesignerSelectionList); override; - property Grid: TcxCustomGrid read GetGrid; - property ViewCount: Integer read GetViewCount; - property ViewRepository: TcxGridViewRepository read GetViewRepository; - property Views[Index: Integer]: TcxCustomGridView read GetView; - end; - -procedure ShowGridEditor(ADesigner: IDesigner; AGrid: TcxCustomGrid); -procedure ShowViewRepositoryEditor(ADesigner: IDesigner; AViewRepository: TcxGridViewRepository); - -implementation - -uses - Messages, Registry; - -{$R *.dfm} - -procedure ShowGridEditor(ADesigner: IDesigner; AGrid: TcxCustomGrid); -begin - ShowFormEditorClass(ADesigner, AGrid, TcxGridEditor); -end; - -procedure ShowViewRepositoryEditor(ADesigner: IDesigner; AViewRepository: TcxGridViewRepository); -begin - ShowFormEditorClass(ADesigner, AViewRepository, TcxGridEditor); -end; - -{ TcxGridEditor } - -constructor TcxGridEditor.Create(AOwner: TComponent); -var - P: TPoint; -begin - inherited; -{$IFDEF DELPHI6} - P := {ComponentDesigner}ActiveDesigner.Environment.GetWorkspaceOrigin; -{$ELSE} - P := DelphiIDE.GetWorkspaceOrigin; -{$ENDIF} - Left := P.X + 10; - Top := P.Y + 10; -end; - -destructor TcxGridEditor.Destroy; -begin - FreeAndNil(FGridStructureHelper); - inherited Destroy; -end; - -procedure TcxGridEditor.DoItemsModified; -begin - inherited; - UpdateViewList; - UpdateViewFrame(True); -end; - -function TcxGridEditor.GetRegKey: string; -begin - Result := GetBaseRegKey{$IFDEF DELPHI6}(ComponentDesigner){$ENDIF} + '\TcxGridEditor'; -end; - -function TcxGridEditor.GetRegSectionName: string; -begin - Result := ComponentClassName; -end; - -procedure TcxGridEditor.SelectionsChanged(const ASelection: TDesignerSelectionList); -begin - if Closing then Exit; - UpdateGridStructureControlSelection; - ListBoxSynchronizeSelection(LBViews); - UpdateButtons; - UpdateViewFrame(False); -end; - -function TcxGridEditor.GetSelectionInfo: TSelectionInfo; - - procedure FindView(ASelection: TDesignerSelectionList; var AInfo: TSelectionInfo); - var - I: Integer; - begin - for I := 0 to ASelection.Count - 1 do - if (ASelection[I] is TcxCustomGridView) and - IsViewLinkedToComponent(TcxCustomGridView(ASelection[I]), Component) then - if AInfo.View = nil then - AInfo.View := TcxCustomGridView(ASelection[I]) - else - begin - AInfo.View := nil; - AInfo.MultiSelect := True; - Break; - end; - end; - - procedure FindLevel(ASelection: TDesignerSelectionList; var AInfo: TSelectionInfo); - var - I: Integer; - ALevel: TcxGridLevel; - begin - for I := 0 to ASelection.Count - 1 do - if ASelection[I] is TcxGridLevel then - begin - ALevel := TcxGridLevel(ASelection[I]); - if ALevel.Control = Grid then - if (AInfo.Level = nil) and (AInfo.View = nil) then - if ALevel.GridView = nil then - AInfo.Level := ALevel - else - AInfo.View := ALevel.GridView - else - begin - AInfo.Level := nil; - AInfo.View := nil; - AInfo.MultiSelect := True; - Break; - end; - end; - end; - - procedure FindViewItem(ASelection: TDesignerSelectionList; var AInfo: TSelectionInfo); - var - I: Integer; - AView: TcxCustomGridView; - begin - for I := 0 to ASelection.Count - 1 do - begin - AView := GetLinkedView(ASelection[I]); - if (AView <> nil) and IsViewLinkedToComponent(AView, Component) then - if AInfo.View = nil then - AInfo.View := AView - else - if AInfo.View <> AView then - begin - AInfo.View := nil; - AInfo.MultiSelect := True; - Break; - end; - end; - end; - -var - ASelectionList: TDesignerSelectionList; -begin - Result.Level := nil; - Result.View := nil; - Result.MultiSelect := False; - - ASelectionList := CreateDesignerSelectionList; - try - Designer.GetSelections(ASelectionList); - FindView(ASelectionList, Result); - if (Result.View = nil) and not Result.MultiSelect then - begin - FindLevel(ASelectionList, Result); - if (Result.Level = nil) and (Result.View = nil) and not Result.MultiSelect then - FindViewItem(ASelectionList, Result); - end; - finally - DeleteDesignerSelectionList(ASelectionList); - end; - - if (Result.Level <> nil) and Result.Level.IsDestroying then - Result.Level := nil; - if (Result.View <> nil) and Result.View.IsDestroying then - Result.View := nil; -end; - -function TcxGridEditor.GetViewEditorClass(AView: TcxCustomGridView): TcxViewEditorClass; -begin - Result := cxViewEditor.GetViewEditorClass(TcxCustomGridViewClass(AView.ClassType)); -end; - -procedure TcxGridEditor.InitFormEditor; -begin - inherited InitFormEditor; - FGridStructureControl := TcxGridStructureControl.Create(Self); - with FGridStructureControl do - begin - Align := alClient; - Grid := Self.Grid; - MayFocused := True; - MultiSelect := True; - Keys := [kChars]; - OnKeyPress := GridStructureControlKeyPress; - OnSelectionChanged := GridStructureControlSelectionChanged; - Parent := PLevels; - end; - FGridStructureHelper := TcxGridStructureHelper.Create(FGridStructureControl); - FGridStructureHelper.OnUpdateDesigner := UpdateDesigner; - tsLevels.TabVisible := Grid <> nil; - LSelectedView.Caption := ''; - LSelectedView.Font.Style := [fsBold]; - InitLookAndFeel(Self); -{$IFDEF DELPHI10} // should be DELPHI105 - MakeColoredControlsOpaque(Self); -{$ENDIF} - - UpdateViewList; - InitIDESelection; - UpdateSelection; - LoadSettings; -end; - -procedure TcxGridEditor.InitIDESelection; -var - ASelectionInfo: TSelectionInfo; -begin - if (Grid = nil) or (Grid.ActiveLevel = nil) {or Grid.ActiveLevel.IsMaster} then Exit; - ASelectionInfo := GetSelectionInfo; - if (ASelectionInfo.Level = nil) and (ASelectionInfo.View = nil) and not ASelectionInfo.MultiSelect then - if Grid.ActiveView = nil then - SelectComponent(Grid.ActiveLevel) - else - SelectComponent(Grid.ActiveView); -end; - -procedure TcxGridEditor.InitLookAndFeel(AControl: TWinControl); -begin - SetControlLookAndFeel(AControl, lfUltraFlat, False); -end; - -procedure TcxGridEditor.LoadSettings; -begin - with TRegIniFile.Create(GetRegKey) do - try - Left := ReadInteger(GetRegSectionName, 'Left', Left); - Top := ReadInteger(GetRegSectionName, 'Top', Top); - Width := ReadInteger(GetRegSectionName, 'Width', Width); - Height := ReadInteger(GetRegSectionName, 'Height', Height); - PLeft.Width := ReadInteger(GetRegSectionName, 'PLeft.Width', PLeft.Width); - // TODO: splitters - finally - Free; - end; - MakeVisibleOnDesktop(Self); -end; - -procedure TcxGridEditor.SaveSettings; -begin - with TRegIniFile.Create(GetRegKey) do - try - EraseSection(GetRegSectionName); - WriteInteger(GetRegSectionName, 'Left', Left); - WriteInteger(GetRegSectionName, 'Top', Top); - WriteInteger(GetRegSectionName, 'Width', Width); - WriteInteger(GetRegSectionName, 'Height', Height); - WriteInteger(GetRegSectionName, 'PLeft.Width', PLeft.Width); - // TODO: splitters - finally - Free; - end; -end; - -function TcxGridEditor.UniqueName(Component: TComponent): string; -begin - if Component is TcxGridLevel then - begin - if Grid <> nil then - Result := GenLevelName(Grid, Component as TcxGridLevel) - else - Result := inherited UniqueName(Component); // TODO - end - else - if Component is TcxCustomGridView then - Result := GenViewName(Self.Component, Component as TcxCustomGridView) - else - Result := inherited UniqueName(Component); // TODO -end; - -procedure TcxGridEditor.UpdateContent; -begin - inherited UpdateContent; - UpdateGridStructureControl; - UpdateViewList; - UpdateButtons; - UpdateViewFrame(True); -end; - -procedure TcxGridEditor.CreateViewClick(Sender: TObject); -var - AViewClass: TcxCustomGridViewClass; - AView: TcxCustomGridView; -begin - AViewClass := TcxCustomGridViewClass( - cxGridRegisteredViews[((Sender as TMenuItem).Tag)]); - FGridStructureControl.BeginUpdate; - try - ListBoxClearSelection(LBViews); - if Grid <> nil then - AView := Grid.CreateView(AViewClass) - else - AView := ViewRepository.CreateItem(AViewClass); - AView.Name := GenViewName(Component, AView); - RestoreViewFromTemplate(GetViewTemplateRegKey, AView); - UpdateViewList; - ListBoxSelectByObject(LBViews, AView); - UpdateDesigner(nil); - finally - FGridStructureControl.EndUpdate; - end; - LBViewsClick(nil); -end; - -function TcxGridEditor.GetGrid: TcxCustomGrid; -begin - if Component is TcxCustomGrid then - Result := TcxCustomGrid(Component) - else - Result := nil; -end; - -function TcxGridEditor.GetView(Index: Integer): TcxCustomGridView; -begin - if Grid <> nil then - Result := Grid.Views[Index] - else - Result := ViewRepository[Index]; -end; - -function TcxGridEditor.GetViewCount: Integer; -begin - if Grid <> nil then - Result := Grid.ViewCount - else - Result := ViewRepository.Count; -end; - -function TcxGridEditor.GetViewRepository: TcxGridViewRepository; -begin - if Component is TcxGridViewRepository then - Result := TcxGridViewRepository(Component) - else - Result := nil; -end; - -procedure TcxGridEditor.GridStructureControlKeyPress(Sender: TObject; var Key: Char); -begin - case Key of - #13, #33..#126: - begin - if Key = #13 then Key := #0; - ActivateInspector(Key); - Key := #0; - end; - end; -end; - -procedure TcxGridEditor.GridStructureControlSelectionChanged(Sender: TObject); -var - AList: TList; -begin - BeginUpdate; - try - AList := TList.Create; - try - FGridStructureControl.GetSelection(AList); - SelectComponents(AList, Component.Owner); - finally - AList.Free; - end; - finally - EndUpdate; - end; -end; - -procedure TcxGridEditor.HideViewFrame; -begin - if FViewEditor <> nil then - begin - FViewEditor.PViewEditor.Parent := FViewEditor; - FViewEditor.Release; - end; - FViewEditor := nil; -end; - -procedure TcxGridEditor.ShowViewFrame(AView: TcxCustomGridView; AMultiView: Boolean; - ARefreshNeeded: Boolean); - - function IsExist(AView: TcxCustomGridView): Boolean; - var - I: Integer; - begin - Result := False; - for I := 0 to ViewCount - 1 do - if Views[I] = AView then - begin - Result := True; - Break; - end; - end; - -var - AViewEditorClass: TcxViewEditorClass; -begin - if (FViewEditor <> nil) and - (AView <> nil) and (FViewEditor.ClassType = GetViewEditorClass(AView)) and - (FViewEditor.View = AView) then - FViewEditor.SetView(AView, ARefreshNeeded) - else - begin - SendMessage(PViewFrame.Handle, WM_SETREDRAW, 0, 0); - try - HideViewFrame; - if AView <> nil then - begin - AViewEditorClass := GetViewEditorClass(AView); - if AViewEditorClass <> nil then - begin - FViewEditor := AViewEditorClass.Create(Self); - InitLookAndFeel(FViewEditor); - FViewEditor.FormEditor := Self; - FViewEditor.SetView(AView, True); - FViewEditor.PViewEditor.Parent := PViewFrame; - {$IFDEF DELPHI10} // should be DELPHI105 - MakeColoredControlsOpaque(PViewFrame); - {$ENDIF} - end; - end; - finally - SendMessage(PViewFrame.Handle, WM_SETREDRAW, 1, 0); - RedrawWindow(PViewFrame.Handle, nil, 0, RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_UPDATENOW); - end; - end; - UpdateViewFrameCaption; -end; - -procedure TcxGridEditor.UpdateButtons; -var - ASelectionLevelCount: Integer; -begin - ASelectionLevelCount := FGridStructureControl.GetSelectionLevelCount; - BAddLevel.Enabled := CanAddComponent and (ASelectionLevelCount <= 1); - BDeleteLevel.Enabled := CanDeleteComponent(nil) and (ASelectionLevelCount > 0); - BAddView.Enabled := CanAddComponent; - BDeleteView.Enabled := CanDeleteComponent(nil) and (LBViews.SelCount > 0); - BEditView.Enabled := LBViews.SelCount = 1; - miDeleteView.Enabled := BDeleteView.Enabled; - miEditLayout.Enabled := BEditView.Enabled; - // TODO: Popup Menu -end; - -procedure TcxGridEditor.UpdateDesigner(Sender: TObject); -begin - Designer.Modified; -end; - -procedure TcxGridEditor.UpdateGridStructureControl; -begin - FGridStructureControl.Changed; -end; - -procedure TcxGridEditor.UpdateGridStructureControlSelection; -var - AList: TList; -begin - AList := TList.Create; - try - GetSelectionList(AList); - FGridStructureControl.SyncSelection(AList); - finally - AList.Free; - end; -end; - -procedure TcxGridEditor.UpdateViewFrame(ARefreshNeeded: Boolean); -var - ASelectionInfo: TSelectionInfo; -begin - ASelectionInfo := GetSelectionInfo; - ShowViewFrame(ASelectionInfo.View, ASelectionInfo.MultiSelect, ARefreshNeeded); -end; - -procedure TcxGridEditor.UpdateViewFrameCaption; -begin - if FViewEditor <> nil then - LSelectedView.Caption := FViewEditor.View.Name - else - LSelectedView.Caption := 'none'; -end; - -procedure TcxGridEditor.UpdateViewList; -var - I, AItemIndex, ATopIndex: Integer; - ASelection: TStringList; -begin - ListBoxSaveSelection(LBViews, ASelection, AItemIndex, ATopIndex); - try - LBViews.Items.Clear; - for I := 0 to ViewCount - 1 do - LBViews.Items.AddObject(Views[I].Name, Views[I]); - finally - ListBoxRestoreSelection(LBViews, ASelection, AItemIndex, ATopIndex); - end; -end; - -procedure TcxGridEditor.BCloseClick(Sender: TObject); -begin - Close; -end; - -// Levels - -procedure TcxGridEditor.BAddLevelClick(Sender: TObject); -var - ALevel: TcxGridLevel; -begin - if Grid = nil then Exit; - FGridStructureControl.BeginUpdate; - try - ALevel := FGridStructureControl.GetSelectedLevel; - if ALevel <> nil then - ALevel := ALevel.Add - else - ALevel := Grid.Levels.Add; - ALevel.Name := GenLevelName(Grid, ALevel); - UpdateDesigner(nil); - finally - FGridStructureControl.EndUpdate; - end; - GridStructureControlSelectionChanged(nil); -end; - -function LevelsCompare( - AItem1, AItem2: Pointer): Integer; -var - ALevel1, ALevel2: TcxGridLevel; -begin - ALevel1 := TcxGridLevel(AItem1); - ALevel2 := TcxGridLevel(AItem2); - Result := ALevel1.Level - ALevel2.Level; - if Result = 0 then - begin - if not ALevel1.IsTop then - Result := LevelsCompare(ALevel1.Parent, ALevel2.Parent); - if Result = 0 then - Result := ALevel1.Index - ALevel2.Index; - end; -end; - -procedure TcxGridEditor.BDeleteLevelClick(Sender: TObject); -var - AList: TList; - ALevel: TcxGridLevel; - I: Integer; -begin - AList := TList.Create; - try - FGridStructureControl.GetSelectionLevels(AList); - AList.Sort(LevelsCompare); - for I := AList.Count - 1 downto 0 do - begin - ALevel := TcxGridLevel(AList[I]); - if not CanDeleteComponent(ALevel) then - AList.Delete(I); - end; - if AList.Count > 0 then - begin - FGridStructureControl.BeginUpdate; - try - for I := AList.Count - 1 downto 0 do - TcxGridLevel(AList[I]).Free; - UpdateDesigner(nil); - finally - FGridStructureControl.EndUpdate; - end; - end; - finally - AList.Free; - end; - GridStructureControlSelectionChanged(nil); -end; - -// Views - -procedure TcxGridEditor.LBViewsClick(Sender: TObject); -begin - ListBoxApplySelection(LBViews, Component); -end; - -procedure TcxGridEditor.BAddViewClick(Sender: TObject); -var - P: TPoint; -begin - // TODO: cxButton - PMViews.Items.Clear; - FillRegisteredViewsMenu(PMViews.Items, CreateViewClick); - P.X := 0; - P.Y := BAddView.Height; - P := BAddView.ClientToScreen(P); - PMViews.Popup(P.X, P.Y); -end; - -procedure TcxGridEditor.BDeleteViewClick(Sender: TObject); -begin - if LBViews.SelCount > 0 then - begin - BeginUpdate; - try - ListBoxDeleteSelection(LBViews, True); - UpdateViewList; - LBViewsClick(nil); - UpdateDesigner(nil); - finally - EndUpdate; - end; - end; -end; - -procedure TcxGridEditor.miEditLayoutClick(Sender: TObject); -var - ASelectionInfo: TSelectionInfo; -begin - ASelectionInfo := GetSelectionInfo; - if not ASelectionInfo.MultiSelect and (ASelectionInfo.View <> nil) then - if ShowGridViewEditor(ASelectionInfo.View) then - UpdateDesigner(nil); -end; - -procedure TcxGridEditor.FormClose(Sender: TObject; - var Action: TCloseAction); -begin - SaveSettings; - inherited; -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridExportLink.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridExportLink.pas deleted file mode 100644 index 629c0c16..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridExportLink.pas +++ /dev/null @@ -1,3364 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit cxGridExportLink; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, Variants, FMTBcd, SqlTimSt, -{$ENDIF} - Windows, Classes, SysUtils, Graphics, DB, - dxCore, cxGeometry, cxControls, cxClasses, cxGraphics, - cxStyles, cxLookAndFeels, cxLookAndFeelPainters, - cxCustomData, cxDataStorage, cxDataUtils, cxDBData, cxVariants, cxExport, - cxEdit, cxImage, cxCalendar, cxCurrencyEdit, cxSpinEdit, - cxCalc, cxTimeEdit, cxMaskEdit, - cxGrid, cxGridCustomView, cxGridCustomTableView, cxGridTableView, - cxGridBandedTableView, cxGridCardView, cxGridLevel, - cxGridStrs, cxGridDBDataDefinitions, cxGridCommon, cxGridChartView; - -const - cxGridFooterCellIndent: Integer = 0; - -type - EcxGridExport = class(EdxException); - - { TcxGridCustomExport } - - TcxGridCustomExport = class - private - FColumns: TcxExportScale; - FDefaultRowHeight: Integer; - FDefaultStyle: TcxCacheCellStyle; - FDefaultStyleIndex: Integer; - FExpand: Boolean; - FExportType: Integer; - FFileName: string; - FGrid: TcxCustomGrid; - FGridView: TcxCustomGridView; - FInternalProvider: IcxCellInternalCache; - FInternalProviderSupported: Boolean; - FProvider: IcxExportProvider; - FRows: TcxExportScale; - FRecordsList: TList; - FSaveAll: Boolean; - FSaveGridModeFlag: Boolean; - FUseNativeFormat: Boolean; - FViewInfo: TcxCustomGridViewInfo; - function GetDataController: TcxCustomDataController; - function GetExpandButtonSize: Integer; - function GetRecord(ARecordIndex: Integer): TcxCustomGridRecord; - function GetRecordCount: Integer; - function GetViewInfo: TcxCustomGridViewInfo; - protected - procedure BeforeCommit; virtual; - function CalculateViewViewInfo(AGridView: TcxCustomGridView; ABounds: TRect): TcxCustomGridViewInfo; virtual; - function CheckNativeValue(AProperties: TcxCustomEditProperties; AItem: TcxCustomGridTableItem; const AValue: Variant): Variant; - procedure CreateExportCache; virtual; - procedure CreateExportCells; virtual; - procedure ExpandRecords(AFullExpand: Boolean); virtual; - procedure ExportCells; virtual; - procedure ExtractRowsForExport; virtual; - procedure FillArea(const ABounds: TRect; AStyleIndex: Integer; - ABorderColor: TColor = clDefault; ABorders: TcxBorders = cxBordersAll); - procedure FillRealArea(const ABounds: TRect; AStyleIndex: Integer; - ABorderColor: TColor = clDefault; ABorders: TcxBorders = cxBordersAll); - procedure Finalize; virtual; - function GetContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams; ABorders: TcxBorders = []; ABorderColor: TColor = clDefault): TcxCacheCellStyle; - function GetViewItemValue(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem): Variant; - function GetViewItemValueEx(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AProperties: TcxCustomEditProperties): Variant; virtual; - function HasSelectedChildren(ARecord: TcxCustomGridRecord): Boolean; - function HasSelectedRecords(AView: TcxCustomGridView): Boolean; - procedure Initialize; virtual; - function IsCurrencyItem(AItem: TcxCustomGridTableItem): Boolean; - function IsCurrencyProperties(AProperties: TcxCustomEditProperties): Boolean; - function IsEmpty: Boolean; - function IsNativeFormatProperties(AProperties: TcxCustomEditProperties; AItem: TcxCustomGridTableItem): Boolean; virtual; - procedure RealBoundsToLogicalBounds(const ABounds: TRect; out ALogicalBounds: TRect); - procedure RealBoundsToLogicalBoundsEx(const ABounds, ASearchArea: TRect; out ALogicalBounds: TRect); - function RegisterContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AParams: TcxViewParams): Integer; - function RegisterSolidStyle(AStyleIndex: Integer; AData: TObject = nil): Integer; - function RegisterSolidStyleEx(AColor: TColor): Integer; - procedure RegisterStyles; virtual; - function RegisterViewParams(const AViewParams: TcxViewParams; const AAlignment: TAlignment = taLeftJustify): Integer; - function SetCellAsGraphic(AColumn, ARow: Integer; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem): Boolean; - procedure SetCellValueAndStyle(AColumn, ARow: Integer; - const AValue: Variant; const AStyle: TcxCacheCellStyle); - procedure SetRealCellStyle(const ARealBounds, ASearchArea: TRect; AStyleIndex: Integer); - procedure SetRealCellStyleAndValue(const ARealBounds, ASearchArea: TRect; AStyleIndex: Integer; const AValue: Variant); - procedure SetRealCellStyleAndValueEx(const ARealBounds, ASearchArea: TRect; - AStyleIndex: Integer; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem); - function TextHeight(AFont: TFont): Integer; - function TextHeightEx(const AViewParams: TcxViewParams): Integer; - function TextWidth(AFont: TFont; const AText: string): Integer; - function TextWidthEx(const AViewParams: TcxViewParams; const AText: string): Integer; - procedure ViewParamsToExportStyle(const AViewParams: TcxViewParams; - var AExportStyle: TcxCacheCellStyle; const AAlignment: TAlignment = taLeftJustify; - ABorders: TcxBorders = []; ABorderColor: TColor = clDefault); - - property DataController: TcxCustomDataController read GetDataController; - property DefaultRowHeight: Integer read FDefaultRowHeight write FDefaultRowHeight; - property DefaultStyle: TcxCacheCellStyle read FDefaultStyle write FDefaultStyle; - property DefaultStyleIndex: Integer read FDefaultStyleIndex write FDefaultStyleIndex; - property ExportType: Integer read FExportType; - property RecordsList: TList read FRecordsList; - public - constructor Create(AFileName: string; AExportType: Integer; AGridView: TcxCustomGridView; - AGrid: TcxCustomGrid; AViewInfo: TcxCustomGridViewInfo); virtual; - constructor CreateFrom(AMasterExport: TcxGridCustomExport; - AGridView: TcxCustomGridView; AViewInfo: TcxCustomGridViewInfo); virtual; - destructor Destroy; override; - procedure AddSeparators(const ASeparators: array of string); - procedure DoExport; virtual; - - property Columns: TcxExportScale read FColumns; - property Expand: Boolean read FExpand write FExpand; - property ExpandButtonSize: Integer read GetExpandButtonSize; - property FileName: string read FFileName; - property Grid: TcxCustomGrid read FGrid; - property GridView: TcxCustomGridView read FGridView; - property InternalProvider: IcxCellInternalCache read FInternalProvider; - property InternalProviderSupported: Boolean read FInternalProviderSupported; - property Provider: IcxExportProvider read FProvider; - property RecordCount: Integer read GetRecordCount; - property Records[ARecordIndex: Integer]: TcxCustomGridRecord read GetRecord; - property Rows: TcxExportScale read FRows; - property SaveAll: Boolean read FSaveAll write FSaveAll; - property UseNativeFormat: Boolean read FUseNativeFormat write FUseNativeFormat; - property ViewInfo: TcxCustomGridViewInfo read GetViewInfo; - end; - - TcxGridCustomExportClass = class of TcxGridCustomExport; - - TcxExportVisualItem = class - public - Bounds: TRect; - Data: TObject; - Data2: TObject; - DisplayText: string; - Hidden: Boolean; - IsBackground: Boolean; - Style: Integer; - Slave: Boolean; - Value: Variant; - function GetBoundsRelativeTo(ATop, ALeft: Integer): TRect; - function IsColumn: Boolean; - end; - - TcxExportGroupSummaryItem = class - public - Alignment: TAlignment; - Bounds: TRect; - Column: TcxGridColumn; - Index: Integer; - SummaryItem: TcxGridTableSummaryItem; - Text: string; - Value: Variant; - ViewParams: TcxViewParams; - procedure InitWidth; - end; - - TcxExportVisualItemClass = class of TcxExportVisualItem; - - { TcxGridTableViewExport } - - TcxGridTableViewExport = class(TcxGridCustomExport) - private - FGroupSummaryItemsList: TcxObjectList; - FRecordHeight: Integer; - FRecordRowCount: Integer; - FRecordWidth: Integer; - FPatternsList: TcxObjectList; - FVisualItemsList: TcxObjectList; - function GetFooterCellBorderColor: TColor; - function GetGridLineColor: TColor; - function GetGridLines: TcxBorders; - function GetGridView: TcxGridTableView; - function GetGroupSummaryCount: Integer; - function GetGroupSummaryItem(AIndex: Integer): TcxExportGroupSummaryItem; - function GetHasPreview(ARow: TcxCustomGridRecord): Boolean; - function GetIndicatorWidth: Integer; - function GetLeftPos: Integer; - function GetOptionsView: TcxGridTableOptionsView; - function GetPattern(AIndex: Integer): TcxExportVisualItem; - function GetPatternCount: Integer; - function GetPreviewPlace: TcxGridPreviewPlace; - function GetStyles: TcxGridTableViewStyles; - function GetViewInfo: TcxGridTableViewInfo; - function GetVisualItem(AIndex: Integer): TcxExportVisualItem; - function GetVisualItemCount: Integer; - procedure SetLeftPos(AValue: Integer); - protected - procedure AddDataRow(var ATop, ALeft: Integer; ARow: TcxGridDataRow); virtual; - procedure AddFooterCells(var ATop, ALeft: Integer; ARow: TcxCustomGridRow; - ALevel, ADataLevel: Integer; AItems: TcxDataSummaryItems; AValues: PVariant; AIsFooter: Boolean); virtual; - procedure AddGroupRow(var ATop, ALeft: Integer; ARow: TcxGridGroupRow); virtual; - function AddIndents(ATop, ARowHeight: Integer; ARow: TcxCustomGridRecord; AHasButton: Boolean; ALevel: Integer = -1): Integer; virtual; - procedure AddMasterDataRow(var ATop, ALeft: Integer; ARow: TcxGridMasterDataRow); virtual; - procedure AddRowFooter(var ATop, ALeft: Integer; ADataLevel, ALevel: Integer; ARow: TcxCustomGridRecord); virtual; - procedure AddRowFooters(var ATop, ALeft: Integer; ARow: TcxCustomGridRecord); virtual; - procedure AddRowPreview(var ATop, ALeft: Integer; ARow: TcxCustomGridRecord); virtual; - function AddVisualDataItem(const AItemBounds: TRect; AStyle: Integer; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn): TcxExportVisualItem; - function AddVisualItem(AItemClass: TcxExportVisualItemClass; const ABounds: TRect): TcxExportVisualItem; virtual; - function AddVisualItemEx(const AItemBounds: TRect; const ADisplayText: string; - const AViewParams: TcxViewParams; AAlignment: TAlignment; ABorders: TcxBorders; - ABorderColor: TColor = clDefault; AIsBackground: Boolean = False): TcxExportVisualItem; overload; - function AddVisualItemEx(const AItemBounds: TRect; const ADisplayText: string; - AStyle: Integer; AIsBackground: Boolean = False): TcxExportVisualItem; overload; - function AddPattern(const ABounds: TRect; AData: TObject; AOffset: Integer = 0): TcxExportVisualItem; - function CanShowMultiSummaries(AIsFooter: Boolean): Boolean; - procedure CreateContent(var ATop, ALeft: Integer); virtual; - procedure CreateFooter(var ATop, ALeft: Integer); virtual; - procedure CreateHeader(var ATop, ALeft: Integer); virtual; - procedure CreateExportCells; override; - procedure CreateRecordFromPattern(var ATop, ALeft: Integer; ARecord: TcxCustomGridRecord); - function DoMergeCell(AMasterItem, ASlaveItem: TcxExportVisualItem): Boolean; - procedure ExportCells; override; - procedure ExportDetailCell(ACell: TcxExportVisualItem); virtual; - procedure Finalize; override; - function GetColumnOffset(AColumn: TcxGridColumn): Integer; virtual; - function GetExpandButtonParams(ABorders: TcxBorders): TcxCacheCellStyle; - function GetFooterCellCount(AItems: TcxDataSummaryItems): Integer; - function GetFooterItemBounds(AIndex, ALineIndex: Integer; const AOrigin: TRect; AIsFooter: Boolean): TRect; - function GetFooterLineCount(AItems: TcxDataSummaryItems): Integer; - function GetGroupRowColumnIntersection(const ARowBounds: TRect; AColumn: TcxGridColumn): TRect; - function GetIsSummaryUnderColumns: Boolean; virtual; - function GetPatternParams(ARecord: TcxCustomGridRecord; AItem: TcxExportVisualItem): TcxViewParams; virtual; - function GetPreviewHeight(ARow: TcxCustomGridRecord): Integer; - function HasFooter(ARow: TcxCustomGridRecord; var ALevel: Integer): Boolean; virtual; - procedure Initialize; override; - procedure MergeCells; virtual; - procedure ProcessGroupSummaryItem(ARow: TcxGridGroupRow; AValues: PVariant; - AIndex: Integer; const ABounds: TRect; const ARowViewParams: TcxViewParams); - procedure ProcessGroupSummaryItems(ARow: TcxGridGroupRow; ABounds: TRect); - procedure ProduceHeadersContainer(var ATop, ALeft: Integer; - AViewInfo: TcxGridColumnContainerViewInfo); - procedure SetPatternsBounds(ATop, ABottom: Integer); - - property GroupSummaryItemCount: Integer read GetGroupSummaryCount; - property GroupSummaryItems[Index: Integer]: TcxExportGroupSummaryItem read GetGroupSummaryItem; - property GroupSummaryItemsList: TcxObjectList read FGroupSummaryItemsList; - property LeftPos: Integer read GetLeftPos write SetLeftPos; - property PatternCount: Integer read GetPatternCount; - property Patterns[Index: Integer]: TcxExportVisualItem read GetPattern; - property PatternsList: TcxObjectList read FPatternsList; - public - property FooterCellBorderColor: TColor read GetFooterCellBorderColor; - property GridLineColor: TColor read GetGridLineColor; - property GridLines: TcxBorders read GetGridLines; - property GridView: TcxGridTableView read GetGridView; - property HasPreview[ARow: TcxCustomGridRecord]: Boolean read GetHasPreview; - property IndicatorWidth: Integer read GetIndicatorWidth; - property IsSummaryUnderColumns: Boolean read GetIsSummaryUnderColumns; - property OptionsView: TcxGridTableOptionsView read GetOptionsView; - property PreviewPlace: TcxGridPreviewPlace read GetPreviewPlace; - property RecordHeight: Integer read FRecordHeight write FRecordHeight; - property RecordRowCount: Integer read FRecordRowCount; - property RecordWidth: Integer read FRecordWidth write FRecordWidth; - property Styles: TcxGridTableViewStyles read GetStyles; - property ViewInfo: TcxGridTableViewInfo read GetViewInfo; - property VisualItemCount: Integer read GetVisualItemCount; - property VisualItems[Index: Integer]: TcxExportVisualItem read GetVisualItem; - property VisualItemsList: TcxObjectList read FVisualItemsList; - end; - - { TcxGridBandedTableViewExport } - - TcxGridBandedTableViewExport = class(TcxGridTableViewExport) - private - function GetGridView: TcxGridBandedTableView; - function GetOptionsView: TcxGridBandedTableOptionsView; - function GetViewInfo: TcxGridBandedTableViewInfo; - protected - procedure CreateBandHeaders(var ATop: Integer; AForRootBands: Boolean); virtual; - procedure CreateHeader(var ATop, ALeft: Integer); override; - function GetColumnOffset(AColumn: TcxGridColumn): Integer; override; - function GetContentOffset: TPoint; virtual; - function GetIsSummaryUnderColumns: Boolean; override; - function GetParentBandOffset(ABand: TcxGridBand): Integer; - function GetPatternByBand(ABand: TcxGridBand): TcxExportVisualItem; - function GetPatternParams(ARecord: TcxCustomGridRecord; AItem: TcxExportVisualItem): TcxViewParams; override; - function ProduceColumnsContainer(AContainer: TcxGridColumnContainerViewInfo; ATop, ALeft: Integer): Integer; - public - property ContentOffset: TPoint read GetContentOffset; - property GridView: TcxGridBandedTableView read GetGridView; - property OptionsView: TcxGridBandedTableOptionsView read GetOptionsView; - property ViewInfo: TcxGridBandedTableViewInfo read GetViewInfo; - end; - - { TcxGridCardViewExport } - - TcxExportCard = class; - TcxGridCardViewExport = class; - - TcxExportCardRow = class - private - FHasSeparator: Boolean; - FOwner: TcxExportCard; - function GetCaptionBounds: TRect; - function GetCaptionStyle: TcxViewParams; - function GetCard: TcxGridCard; - function GetCategoryIndent: Integer; - function GetDataAlignment: TAlignment; - function GetDataBounds: TRect; - function GetDataStyle: TcxViewParams; - function GetDataValue: Variant; - function GetHasIndent: Boolean; - function GetHasSeparator: Boolean; - function GetHeight: Integer; - function GetIndentBounds: TRect; - function GetIndentStyle: TcxViewParams; - function GetSeparatorBounds: TRect; - function GetSeparatorWidth: Integer; - function GetShowCaption: Boolean; - function GetShowData: Boolean; - function GetVisibleCaption: string; - function GetWidth: Integer; - procedure SetHeight(AValue: Integer); - procedure SetWidth(AValue: Integer); - protected - procedure AddToScales(AColumnScale, ARowScale: TcxExportScale); - public - Bounds: TRect; - CaptionStyleIndex: Integer; - CaptionWidth: Integer; - DataStyleIndex: Integer; - IndentStyleIndex: Integer; - Row: TcxGridCardViewRow; - constructor Create(AOwner: TcxExportCard); - - property CaptionBounds: TRect read GetCaptionBounds; - property CaptionStyle: TcxViewParams read GetCaptionStyle; - property Card: TcxGridCard read GetCard; - property CategoryIndent: Integer read GetCategoryIndent; - property DataAlignment: TAlignment read GetDataAlignment; - property DataBounds: TRect read GetDataBounds; - property DataStyle: TcxViewParams read GetDataStyle; - property DataValue: Variant read GetDataValue; - property HasIndent: Boolean read GetHasIndent; - property HasSeparator: Boolean read GetHasSeparator; - property Height: Integer read GetHeight write SetHeight; - property IndentBounds: TRect read GetIndentBounds; - property IndentStyle: TcxViewParams read GetIndentStyle; - property Owner: TcxExportCard read FOwner; - property SeparatorBounds: TRect read GetSeparatorBounds; - property SeparatorWidth: Integer read GetSeparatorWidth; - property ShowCaption: Boolean read GetShowCaption; - property ShowData: Boolean read GetShowData; - property VisibleCaption: string read GetVisibleCaption; - property Width: Integer read GetWidth write SetWidth; - end; - - TcxExportCard = class - protected - FBounds: TRect; - FCard: TcxGridCard; - FLayersList: TcxObjectList; - FOwner: TcxGridCardViewExport; - function GetBorderWidth: Integer; - function GetHasSeparators: Boolean; - function GetLayer(AIndex: Integer): TList; - function GetLayerCount: Integer; - function GetLayerSeparator(AIndex: Integer): TRect; - function GetRow(ALayerIndex, ARowIndex: Integer): TcxExportCardRow; - function GetRowCount(ALayerIndex: Integer): Integer; - function GetSeparatorWidth: Integer; - procedure SetBounds(const ABounds: TRect); - protected - function AddLayer: TList; - function AddRow(ALayerIndex: Integer; ARow: TcxGridCardViewRow): TcxExportCardRow; - procedure AddLayerSeparators; - procedure AdjustLayersWidthToWidth; - function AdjustRowsHeightInLayer(ALayer, ATop: Integer): Integer; - procedure AdjustRowsWidthToWidth(ALayer: Integer); - procedure CheckCategorySeparators(AHorizontalLayout: Boolean); - public - constructor Create(AOwner: TcxGridCardViewExport; ACard: TcxGridCard); - destructor Destroy; override; - procedure AddToScales(AColumnScale, ARowScale: TcxExportScale); - procedure CalculateLayersCaptionWidth(AWidths: TcxExportIntList; AFistRowInLayerOnly: Boolean); - function GetRowCaptionWidth(ALayerIndex, ARowIndex: Integer; AMaxWidth: Integer = 0): Integer; - procedure SetLayersCaptionWidth(AWidths: TcxExportIntList; AFistRowInLayerOnly: Boolean); - procedure SetRowCaptionWidth(ALayerIndex, ARowIndex, AWidth: Integer); - - property BorderWidth: Integer read GetBorderWidth; - property Bounds: TRect read FBounds write SetBounds; - property Card: TcxGridCard read FCard; - property HasSeparators: Boolean read GetHasSeparators; - property LayerCount: Integer read GetLayerCount; - property Layers[AIndex: Integer]: TList read GetLayer; - property LayerSeparators[Index: Integer]: TRect read GetLayerSeparator; - property LayersList: TcxObjectList read FLayersList; - property Owner: TcxGridCardViewExport read FOwner; - property RowCount[ALayerIndex: Integer]: Integer read GetRowCount; - property Rows[ALayerIndex, ARowIndex: Integer]: TcxExportCardRow read GetRow; - property SeparatorWidth: Integer read GetSeparatorWidth; - end; - - TcxExportCardLayoutBuilder = class - private - FExportCard: TcxExportCard; - FOwner: TcxGridCardViewExport; - FRowsList: TList; - protected - function GetLayerIndex(ARow: TcxGridCardViewRow): Integer; virtual; - procedure SplitRowsToLayers; virtual; - public - constructor Create(AOwner: TcxGridCardViewExport); - destructor Destroy; override; - procedure BuildLayout(ACard: TcxGridCard; AExportCard: TcxExportCard); - - property ExportCard: TcxExportCard read FExportCard; - property Owner: TcxGridCardViewExport read FOwner; - property RowsList: TList read FRowsList; - end; - - TcxGridCardViewExport = class(TcxGridCustomExport) - private - FCardBorderStyle: Integer; - FCardSeparators: TcxExportScale; - FCardSeparatorStyleIndex: Integer; - - FCategorySeparatorStyleIndex: Integer; - FColumnCardCount: Integer; - FKeepRowsSameHeight: Boolean; - FLayerSeparatorStyleIndex: Integer; - FLayoutBuilder: TcxExportCardLayoutBuilder; - FRowCardCount: Integer; - FExportCardsList: TcxObjectList; - function GetCard(AIndex: Integer): TcxGridCard; - function GetCardBorderWidth: Integer; - function GetCardCount: Integer; - function GetCardHeight: Integer; - function GetCardIndent: Integer; - function GetCardSeparator(AIndex: Integer): TRect; - function GetCardSeparatorCount: Integer; - function GetCardWidth: Integer; - function GetCategoryIndent: Integer; - function GetCategorySeparatorWidth: Integer; - function GetExportCard(AIndex: Integer): TcxExportCard; - function GetGridView: TcxGridCardView; - function GetInterCardHorzSpace: Integer; - function GetInterCardVertSpace: Integer; - function GetIsHorizontalRows: Boolean; - function GetIsSimpleLayout: Boolean; - function GetLayerSeparatorWidth: Integer; - function GetLayoutDirection: TcxGridCardViewLayoutDirection; - function GetOptionsView: TcxGridCardViewOptionsView; - protected - procedure AddCardSeparator(APosition: Integer); - function AddExportCard(AColumnPosition, ARowPosition: Integer; ACard: TcxGridCard): TcxExportCard; - procedure AdjustRowCaptionWidth; - procedure CalculateVisibleInfo; - function CreateCardLayoutBuilder: TcxExportCardLayoutBuilder; - procedure CreateExportCells; override; - procedure ExportCardRow(ACard: TcxExportCard; ARow: TcxExportCardRow; const ACardLogicalBounds: TRect); - procedure ExportCells; override; - procedure Finalize; override; - procedure RegisterStyles; override; - procedure SetRowSameHeight; virtual; - - property ExportCardsList: TcxObjectList read FExportCardsList; - public - property CardBorderStyle: Integer read FCardBorderStyle; - property CardBorderWidth: Integer read GetCardBorderWidth; - property CardCount: Integer read GetCardCount; - property CardHeight: Integer read GetCardHeight; - property CardIndent: Integer read GetCardIndent; - property Cards[Index: Integer]: TcxGridCard read GetCard; - property CardSeparatorCount: Integer read GetCardSeparatorCount; - property CardSeparators[Index: Integer]: TRect read GetCardSeparator; - property CardSeparatorStyleIndex: Integer read FCardSeparatorStyleIndex; - property CardWidth: Integer read GetCardWidth; - property CategoryIndent: Integer read GetCategoryIndent; - property CategorySeparatorStyleIndex: Integer read FCategorySeparatorStyleIndex; - property CategorySeparatorWidth: Integer read GetCategorySeparatorWidth; - property ColumnCardCount: Integer read FColumnCardCount write FColumnCardCount; - property ExportCards[Index: Integer]: TcxExportCard read GetExportCard; - property GridView: TcxGridCardView read GetGridView; - property InterCardHorzSpace: Integer read GetInterCardHorzSpace; - property InterCardVertSpace: Integer read GetInterCardVertSpace; - property IsHorizontalRows: Boolean read GetIsHorizontalRows; - property IsSimpleLayout: Boolean read GetIsSimpleLayout; - property KeepRowsSameHeight: Boolean read FKeepRowsSameHeight; - property LayerSeparatorStyleIndex: Integer read FLayerSeparatorStyleIndex; - property LayerSeparatorWidth: Integer read GetLayerSeparatorWidth; - property LayoutBuilder: TcxExportCardLayoutBuilder read FLayoutBuilder; - property LayoutDirection: TcxGridCardViewLayoutDirection read GetLayoutDirection; - property OptionsView: TcxGridCardViewOptionsView read GetOptionsView; - property RowCardCount: Integer read FRowCardCount write FRowCardCount; - end; - - { TcxGridChartViewExport } - - TcxGridChartViewExport = class(TcxGridCustomExport) - private - function GetGridView: TcxGridChartView; - protected - procedure CreateExportCache; override; - procedure ExportAsGraphic; virtual; - procedure ExportAsData; virtual; - public - property GridView: TcxGridChartView read GetGridView; - end; - -procedure ExportGridToHTML(const AFileName: string; AGrid: TcxGrid; - AExpand: Boolean = True; ASaveAll: Boolean = True; const AFileExt: string = 'html'); -procedure ExportGridToXML(const AFileName: string; AGrid: TcxGrid; - AExpand: Boolean = True; ASaveAll: Boolean = True; const AFileExt: string = 'xml'); -procedure ExportGridToExcel(const AFileName: string; AGrid: TcxGrid; - AExpand: Boolean = True; ASaveAll: Boolean = True; AUseNativeFormat: Boolean = True; - const AFileExt: string = 'xls'); -procedure ExportGridToText(const AFileName: string; AGrid: TcxGrid; - AExpand: Boolean = True; ASaveAll: Boolean = True; const ASeparator: string = ''; - const ABeginString: string = ''; const AEndString: string = ''; - const AFileExt: string = 'txt'); - -const - ExportImagesAsGraphic: Boolean = True; - -implementation - -uses - cxXLSExport, cxHtmlXmlTxtExport, Math; - -const - Alignment2ExportAlignment: array[TAlignment] of TcxAlignText = - (catLeft, catRight, catCenter); - - GridLines2Borders: array[TcxGridLines] of TcxBorders = - (cxBordersAll, [], [bRight, bLeft], [bTop, bBottom]); - - BorderWidths: array[Boolean] of Integer = (0, 1); - - ButtonTexts: array[Boolean] of string = ('+', '-'); - - CardRowDefaultWidth = 20; - cxDefaultRowHeight = 19; - -type - TcxCustomGridRecordAccess = class(TcxCustomGridRecord); - -function cxCompareGroupSummaryItems(AItem1, AItem2: TcxExportGroupSummaryItem): Integer; -begin - if AItem1.Column = AItem2.Column then - Result := AItem1.Index - AItem2.Index - else - if AItem1.Column = nil then - Result := -1 - else - if AItem2.Column = nil then - Result := 1 - else - Result := AItem1.Column.VisibleIndex - AItem2.Column.VisibleIndex; -end; - -function GetExportClassByGridView(AGridView: TcxCustomGridView): TcxGridCustomExportClass; -begin - if AGridView is TcxGridBandedTableView then - Result := TcxGridBandedTableViewExport - else - if AGridView is TcxGridTableView then - Result := TcxGridTableViewExport - else - if AGridView is TcxGridCardView then - Result := TcxGridCardViewExport - else - if AGridView is TcxGridChartView then - Result := TcxGridChartViewExport - else - raise EcxGridExport.Create(cxGetResourceString(@scxNotExistGridView)); -end; - -procedure CalculateCardRowWidths(var AWidths: array of Integer; AAvailableWidth: Integer); -var - AAutoWidths: TcxAutoWidthObject; - AAllFixed: Boolean; - I: Integer; -begin - AAutoWidths := TcxAutoWidthObject.Create(Length(AWidths)); - try - AAllFixed := True; - for I := 0 to High(AWidths) do - with AAutoWidths.AddItem do - begin - Width := AWidths[I]; - Fixed := Width <> 0; - AAllFixed := AAllFixed and Fixed; - if Width = 0 then Width := CardRowDefaultWidth; - end; - if AAllFixed or (AAutoWidths.Width > AAvailableWidth) then - for I := 0 to AAutoWidths.Count - 1 do - AAutoWidths[I].Fixed := False; - AAutoWidths.AvailableWidth := AAvailableWidth; - AAutoWidths.Calculate; - for I := 0 to High(AWidths) do - AWidths[I] := AAutoWidths[I].AutoWidth; - finally - AAutoWidths.Free; - end; -end; - -procedure ExportGridToFile(AFileName: string; AExportType: Integer; - AGrid: TcxGrid; AExpand, ASaveAll, AUseNativeFormat: Boolean; - const ASeparator, ABeginString, AEndString: string; const AFileExt: string); -var - AView: TcxCustomGridView; - AGridExport: TcxGridCustomExport; -begin - if AGrid <> nil then - begin - if AFileExt <> '' then - AFileName := ChangeFileExt(AFileName, '.' + AFileExt); - AView := AGrid.ActiveLevel.GridView; - AGridExport := GetExportClassByGridView(AGrid.FocusedView).Create(AFileName, AExportType, AView, AGrid, nil); - AGridExport.SaveAll := ASaveAll; - AGridExport.Expand := AExpand; - AGridExport.UseNativeFormat := AUseNativeFormat; - AGridExport.AddSeparators([ASeparator, ABeginString, AEndString]); - AGrid.BeginUpdate; - try - try - AGridExport.DoExport; - finally - AGridExport.Free; - end; - finally - AGrid.EndUpdate; - end; - end; -end; - -// *** - -{ TcxGridCustomExport } - -constructor TcxGridCustomExport.Create(AFileName: string; AExportType: Integer; - AGridView: TcxCustomGridView; AGrid: TcxCustomGrid; AViewInfo: TcxCustomGridViewInfo); -begin - try - {$IFDEF DELPHI5} - FProvider := TcxExport.Provider(AExportType, AFileName) as IcxExportProvider; - FInternalProviderSupported := Supports(FProvider, - IcxCellInternalCache, FInternalProvider); - {$ELSE} - TcxExport.Provider(AExportType, AFileName).GetInterface(IcxExportProvider, FProvider); - FInternalProviderSupported := (FExport.QueryInterface(IcxCellInternalCache, FInternalProvider) = S_OK); - {$ENDIF} - except - on EStreamError do - raise EcxGridExport.Create(cxGetResourceString(@scxCantCreateExportOutputFile)); - end; - FDefaultRowHeight := cxDefaultRowHeight; - FGridView := AGridView; - FGrid := AGrid; - FRecordsList := TList.Create; - FViewInfo := AViewInfo; - FFileName := AFileName; - FExportType := AExportType; - FColumns := TcxExportScale.Create; - FRows := TcxExportScale.Create; -end; - -constructor TcxGridCustomExport.CreateFrom(AMasterExport: TcxGridCustomExport; - AGridView: TcxCustomGridView; AViewInfo: TcxCustomGridViewInfo); -begin - Create(AMasterExport.FileName, AMasterExport.ExportType, - AGridView, AMasterExport.Grid, AViewInfo); - Expand := AMasterExport.Expand; - SaveAll := AMasterExport.SaveAll; -end; - -destructor TcxGridCustomExport.Destroy; -begin - FInternalProvider := nil; - FProvider := nil; - FreeAndNil(FRecordsList); - FreeAndNil(FColumns); - FreeAndNil(FRows); - inherited Destroy; -end; - -procedure TcxGridCustomExport.AddSeparators(const ASeparators: array of string); -var - I: Integer; - AExportWithSeparators: IcxExportWithSeparators; -begin -{$IFDEF DELPHI5} - if Supports(Provider, IcxExportWithSeparators, AExportWithSeparators) then -{$ELSE} - if (FExport.QueryInterface(IcxExportWithSeparators, AExportWithSeparators) = S_OK) then -{$ENDIF} - begin - for I := 0 to High(ASeparators) do - AExportWithSeparators.AddSeparator(ASeparators[I]); - end; -end; - -procedure TcxGridCustomExport.DoExport; -begin - CreateExportCache; - BeforeCommit; - Provider.Commit; -end; - -procedure TcxGridCustomExport.BeforeCommit; -begin -end; - -function TcxGridCustomExport.CalculateViewViewInfo(AGridView: TcxCustomGridView; - ABounds: TRect): TcxCustomGridViewInfo; -begin - Result := nil; - if not (AGridView is TcxCustomGridTableView) then Exit; - Result := AGridView.CreateViewInfo; - with Result as TcxCustomGridTableViewInfo do - begin - FirstRecordIndex := 0; - MainCalculate(ABounds); - end; -end; - -function TcxGridCustomExport.CheckNativeValue(AProperties: TcxCustomEditProperties; - AItem: TcxCustomGridTableItem; const AValue: Variant): Variant; -begin - try - if (IsCurrencyItem(AItem) and IsCurrencyProperties(AProperties)) or - (AProperties is TcxCurrencyEditProperties) then - VarCast(Result, AValue, varCurrency) - else - if (VarType(AValue) = varCurrency) and not IsCurrencyItem(AItem) and - not (AProperties is TcxCurrencyEditProperties) then - VarCast(Result, AValue, varDouble) - else - Result := AValue; - except - on EVariantError do - Result := AValue - else - raise; - end; -end; - -procedure TcxGridCustomExport.CreateExportCache; -begin - Initialize; - try - ExtractRowsForExport; - RegisterStyles; - CreateExportCells; - Columns.Arrange; - Rows.Arrange; - if not IsEmpty then - begin - Provider.SetRange(Columns.VisibleCount, Rows.VisibleCount, False); - ExportCells; - end; - finally - Finalize; - end; -end; - -procedure TcxGridCustomExport.CreateExportCells; -begin -end; - -procedure TcxGridCustomExport.ExpandRecords(AFullExpand: Boolean); -var - I: Integer; - ARecord: TcxCustomGridRecord; - AViewData: TcxCustomGridTableViewData; -begin - if not GridView.InheritsFrom(TcxCustomGridTableView) then Exit; - AViewData := (GridView as TcxCustomGridTableView).ViewData; - if AFullExpand then - AViewData.Expand(True) - else - begin - I := 0; - while I < AViewData.RecordCount - 1 do - begin - ARecord := AViewData.Records[I]; - if ARecord.Selected and ARecord.Expandable and not ARecord.Expanded then - ARecord.Expanded := True - else - Inc(I); - end; - end; -end; - -procedure TcxGridCustomExport.ExportCells; -var - I: Integer; -begin - for I := 0 to Columns.VisibleCount - 1 do - Provider.SetColumnWidth(I, Columns.Delta[I]); - for I := 0 to Rows.VisibleCount - 1 do - begin - if Rows.Delta[I] <> DefaultRowHeight then - Provider.SetRowHeight(I, Rows.Delta[I]); - end; - FillArea(Rect(0, 0, Columns.Count - 1, Rows.Count - 1), DefaultStyleIndex); -end; - -procedure TcxGridCustomExport.ExtractRowsForExport; -var - I: Integer; - ARecord: TcxCustomGridRecord; - AViewData: TcxCustomGridTableViewData; -begin - if not (GridView.ViewData is TcxCustomGridTableViewData) then Exit; - AViewData := GridView.ViewData as TcxCustomGridTableViewData; - SaveAll := SaveAll or not HasSelectedRecords(GridView); - Grid.BeginUpdate; - try - I := 0; - while I < AViewData.RecordCount do - begin - ARecord := AViewData.Records[I]; - Inc(I); - if not SaveAll and not HasSelectedChildren(ARecord) then Continue; - if Expand then - ARecord.Expanded := True; - RecordsList.Add(Pointer(I - 1)); - end; - for I := 0 to RecordCount - 1 do - RecordsList[I] := AViewData.Records[Integer(RecordsList[I])]; - finally - Grid.EndUpdate; - end; -end; - -procedure TcxGridCustomExport.FillArea(const ABounds: TRect; AStyleIndex: Integer; - ABorderColor: TColor = clDefault; ABorders: TcxBorders = cxBordersAll); -var - AStyle: TcxCacheCellStyle; - I, J, AActualStyleIndex: Integer; - - procedure SetBorderStyle(ASide: TcxBorder); - begin - AStyle.Borders[Integer(ASide)].IsDefault := False; - AStyle.Borders[Integer(ASide)].Width := 1; - AStyle.Borders[Integer(ASide)].Color := ColorToRgb(ABorderColor); - end; - -begin - for I := ABounds.Top to ABounds.Bottom - 1 do - for J := ABounds.Left to ABounds.Right - 1 do - begin - AActualStyleIndex := AStyleIndex; - if (ABorderColor <> clDefault) and (ABorders <> []) then - begin - AStyle := Provider.GetStyle(AStyleIndex)^; - if J = ABounds.Left then - SetBorderStyle(bLeft); - if I = ABounds.Top then - SetBorderStyle(bTop); - if J = ABounds.Right - 1 then - SetBorderStyle(bRight); - if I = ABounds.Bottom - 1 then - SetBorderStyle(bBottom); - AActualStyleIndex := Provider.RegisterStyle(AStyle); - end; - Provider.SetCellStyle(J, I, AActualStyleIndex); - end; -end; - -procedure TcxGridCustomExport.FillRealArea(const ABounds: TRect; AStyleIndex: Integer; - ABorderColor: TColor = clDefault; ABorders: TcxBorders = cxBordersAll); -var - ALogicalBounds: TRect; -begin - RealBoundsToLogicalBounds(ABounds, ALogicalBounds); - FillArea(ALogicalBounds, AStyleIndex, ABorderColor, ABorders); -end; - -procedure TcxGridCustomExport.Finalize; -begin - if FSaveGridModeFlag and (DataController is TcxDBDataController) then - begin - TcxDBDataController(DataController).DataModeController.GridMode := FSaveGridModeFlag; - DataController.RestoreDataSetPos; - end; -end; - -function TcxGridCustomExport.GetContentParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams; - ABorders: TcxBorders = []; ABorderColor: TColor = clDefault): TcxCacheCellStyle; -begin - AItem.Styles.GetContentParams(ARecord, AParams); - ViewParamsToExportStyle(AParams, Result, AItem.GetProperties.Alignment.Horz, - ABorders, ABorderColor); -end; - -function TcxGridCustomExport.GetViewItemValue( - ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem): Variant; -var - AProperties: TcxCustomEditProperties; -begin - Result := GetViewItemValueEx(ARecord, AItem, AProperties); -end; - -function TcxGridCustomExport.GetViewItemValueEx(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AProperties: TcxCustomEditProperties): Variant; -var - S: string; -begin - AProperties := AItem.GetProperties(ARecord); - if IsNativeFormatProperties(AProperties, AItem) then - Result := CheckNativeValue(AProperties, AItem, ARecord.Values[AItem.Index]) - else - begin - if AProperties.GetEditValueSource(False) = evsValue then - S := AProperties.GetDisplayText(ARecord.Values[AItem.Index], True) - else - S := ARecord.DisplayTexts[AItem.Index]; - TcxCustomGridTableItemAccess.DoGetDisplayText(AItem, ARecord, S); - Result := S; - end; -end; - -function TcxGridCustomExport.HasSelectedChildren(ARecord: TcxCustomGridRecord): Boolean; -begin - Result := ARecord.Selected or ARecord.Expanded and (ARecord is TcxGridMasterDataRow) and - (TcxGridMasterDataRow(ARecord).ActiveDetailGridView <> nil) and - HasSelectedRecords(TcxGridMasterDataRow(ARecord).ActiveDetailGridView) -end; - -function TcxGridCustomExport.HasSelectedRecords(AView: TcxCustomGridView): Boolean; -var - I: Integer; -begin - Result := False; - if AView is TcxCustomGridTableView then - begin - Result := TcxCustomGridTableView(AView).Controller.SelectedRecordCount > 0; - if Result then Exit; - for I := 0 to TcxCustomGridTableView(AView).ViewData.RecordCount - 1 do - if HasSelectedChildren(TcxCustomGridTableView(AView).ViewData.Records[I]) then - begin - Result := True; - Break; - end; - end; -end; - -procedure TcxGridCustomExport.Initialize; -begin - FSaveGridModeFlag := DataController.IsGridMode; - if FSaveGridModeFlag and (DataController is TcxDBDataController) then - begin - DataController.SaveDataSetPos; - TcxDBDataController(DataController).DataModeController.GridMode := False; - end; - Columns.Add(0); - Rows.Add(0); -end; - -function TcxGridCustomExport.IsCurrencyItem(AItem: TcxCustomGridTableItem): Boolean; -var - AField: TField; -begin - Result := AItem.DataBinding.ValueTypeClass = TcxCurrencyValueType; - if GridView.DataController is TcxGridDBDataController then - begin - AField := TcxGridDBDataController(GridView.DataController).GetItemField(AItem.Index); - if AField is TFloatField then - Result := TFloatField(AField).Currency - else - if AField is TBCDField then - Result := TBCDField(AField).Currency - {$IFDEF DELPHI5} - else - if AField is TAggregateField then - Result := TAggregateField(AField).Currency - {$ENDIF} - {$IFDEF DELPHI6} - else - if AField is TFMTBCDField then - Result := TFMTBCDField(AField).Currency - {$ENDIF} - end; -end; - -function TcxGridCustomExport.IsCurrencyProperties( - AProperties: TcxCustomEditProperties): Boolean; -begin - Result := ((AProperties is TcxMaskEditProperties) or - (AProperties is TcxCalcEditProperties) or - (AProperties is TcxCurrencyEditProperties)) and UseNativeFormat; -end; - -function TcxGridCustomExport.IsEmpty: Boolean; -begin - Result := (Columns.VisibleCount = 0) or (Rows.VisibleCount = 0); -end; - -function TcxGridCustomExport.IsNativeFormatProperties( - AProperties: TcxCustomEditProperties; AItem: TcxCustomGridTableItem): Boolean; -begin - Result := (AProperties is TcxDateEditProperties) or (AProperties is TcxSpinEditProperties) - or (AProperties is TcxTimeEditProperties) or IsCurrencyProperties(AProperties); - Result := Result and UseNativeFormat; -end; - -procedure TcxGridCustomExport.RealBoundsToLogicalBounds( - const ABounds: TRect; out ALogicalBounds: TRect); -begin - with ALogicalBounds do - begin - Columns.GetPosition(ABounds.Left, ABounds.Right, Left, Right); - Rows.GetPosition(ABounds.Top, ABounds.Bottom, Top, Bottom); - end; -end; - -procedure TcxGridCustomExport.RealBoundsToLogicalBoundsEx( - const ABounds, ASearchArea: TRect; out ALogicalBounds: TRect); -begin - with ALogicalBounds do - begin - Columns.GetPositionEx(ABounds.Left, ABounds.Right, - ASearchArea.Left, ASearchArea.Right, Left, Right); - Rows.GetPositionEx(ABounds.Top, ABounds.Bottom, - ASearchArea.Top, ASearchArea.Bottom, Top, Bottom); - end; -end; - -function TcxGridCustomExport.RegisterContentParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams): Integer; -begin - Result := Provider.RegisterStyle(GetContentParams(ARecord, AItem, AParams)); -end; - -function TcxGridCustomExport.RegisterSolidStyle( - AStyleIndex: Integer; AData: TObject = nil): Integer; -var - AParams: TcxViewParams; -begin - AParams.Color := clNone; - if GridView is TcxCustomGridTableView then - TcxCustomGridTableView(GridView).Styles.GetViewParams(AStyleIndex, AData, nil, AParams); - Result := RegisterSolidStyleEx(AParams.Color); -end; - -procedure TcxGridCustomExport.RegisterStyles; -var - AViewParams: TcxViewParams; -begin - if GridView is TcxCustomGridTableView then - with TcxCustomGridTableView(GridView).Styles do - begin - GetViewParams(vsBackground, nil, Background, AViewParams); - ViewParamsToExportStyle(AViewParams, FDefaultStyle); - end; - Provider.SetDefaultStyle(DefaultStyle); - DefaultStyleIndex := Provider.RegisterStyle(DefaultStyle); -end; - -function TcxGridCustomExport.RegisterSolidStyleEx(AColor: TColor): Integer; -var - AStyle: TcxCacheCellStyle; -begin - AStyle := DefaultStyle; - AStyle.BrushBkColor := ColorToRgb(AColor); - Result := Provider.RegisterStyle(AStyle); -end; - -function TcxGridCustomExport.RegisterViewParams( - const AViewParams: TcxViewParams; const AAlignment: TAlignment = taLeftJustify): Integer; -var - AStyle: TcxCacheCellStyle; -begin - ViewParamsToExportStyle(AViewParams, AStyle, AAlignment); - Result := Provider.RegisterStyle(AStyle) -end; - -function TcxGridCustomExport.SetCellAsGraphic(AColumn, ARow: Integer; - ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem): Boolean; -var - AGraphic: TGraphic; - APicture: TPicture; -begin - Result := (AItem.GetProperties is TcxImageProperties) and ExportImagesAsGraphic; - if not Result then Exit; - APicture := TPicture.Create; - try - LoadPicture(APicture, TcxImageProperties(AItem.GetProperties).GetGraphicClass( - AItem, ARecord.Index), ARecord.Values[AItem.Index]); - AGraphic := APicture.Graphic; - if AGraphic <> nil then - Provider.SetCellDataGraphic(AColumn, ARow, AGraphic); - finally - APicture.Free; - end -end; - -procedure TcxGridCustomExport.SetCellValueAndStyle( - AColumn, ARow: Integer; const AValue: Variant; const AStyle: TcxCacheCellStyle); -begin - Provider.SetCellValue(AColumn, ARow, AValue); - Provider.SetCellStyle(AColumn, ARow, AStyle); -end; - -procedure TcxGridCustomExport.SetRealCellStyle( - const ARealBounds, ASearchArea: TRect; AStyleIndex: Integer); -begin - SetRealCellStyleAndValue(ARealBounds, ASearchArea, AStyleIndex, Null); -end; - -procedure TcxGridCustomExport.SetRealCellStyleAndValue( - const ARealBounds, ASearchArea: TRect; AStyleIndex: Integer; const AValue: Variant); -var - R: TRect; -begin - RealBoundsToLogicalBoundsEx(ARealBounds, ASearchArea, R); - if not VarIsNull(AValue) then - Provider.SetCellValue(R.Left, R.Top, AValue); - Provider.SetCellStyleEx(R.Left, R.Top, R.Bottom - R.Top, R.Right - R.Left, AStyleIndex); -end; - -procedure TcxGridCustomExport.SetRealCellStyleAndValueEx( - const ARealBounds, ASearchArea: TRect; AStyleIndex: Integer; - ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem); -var - R: TRect; -begin - RealBoundsToLogicalBoundsEx(ARealBounds, ASearchArea, R); - if AItem <> nil then - begin - if not Provider.SupportGraphic or not SetCellAsGraphic(R.Left, R.Top, ARecord, AItem) then - Provider.SetCellValue(R.Left, R.Top, GetViewItemValue(ARecord, AItem)); - end; - Provider.SetCellStyleEx(R.Left, R.Top, R.Bottom - R.Top, R.Right - R.Left, AStyleIndex); -end; - -function TcxGridCustomExport.TextHeight(AFont: TFont): Integer; -begin - Result := cxTextHeight(AFont) + cxTextOffset * 2; -end; - -function TcxGridCustomExport.TextHeightEx( - const AViewParams: TcxViewParams): Integer; -begin - Result := TextHeight(AViewParams.Font); -end; - -function TcxGridCustomExport.TextWidth( - AFont: TFont; const AText: string): Integer; -begin - Result := cxTextWidth(AFont, AText) + cxTextOffset * 2; -end; - -function TcxGridCustomExport.TextWidthEx( - const AViewParams: TcxViewParams; const AText: string): Integer; -begin - Result := TextWidth(AViewParams.Font, AText); -end; - -procedure TcxGridCustomExport.ViewParamsToExportStyle( - const AViewParams: TcxViewParams; var AExportStyle: TcxCacheCellStyle; - const AAlignment: TAlignment = taLeftJustify; - ABorders: TcxBorders = []; ABorderColor: TColor = clDefault); -var - I: Integer; -begin - AExportStyle := DefaultCellStyle; - with AExportStyle do - begin - BrushBkColor := cxColorToRGB(AViewParams.Color); - FontColor := cxColorToRGB(AViewParams.TextColor); - FillChar(FontName, SizeOf(FontName), 0); - dxStringToBytes(AViewParams.Font.Name, FontName); - FontStyle := TcxFontStyles(AViewParams.Font.Style); - FontSize := AViewParams.Font.Size; - FontCharset := Integer(AViewParams.Font.Charset); - AlignText := Alignment2ExportAlignment[AAlignment]; - for I := 0 to 3 do - begin - Borders[I].IsDefault := (ABorderColor = clDefault) or not (TcxBorder(I) in ABorders); - Borders[I].Width := BorderWidths[not Borders[I].IsDefault]; - if not Borders[I].IsDefault then - Borders[I].Color := ColorToRgb(ABorderColor); - end; - end; -end; - -function TcxGridCustomExport.GetDataController: TcxCustomDataController; -begin - Result := GridView.DataController; -end; - -function TcxGridCustomExport.GetExpandButtonSize: Integer; -begin - Result := ViewInfo.LookAndFeelPainter.ExpandButtonSize; -end; - -function TcxGridCustomExport.GetRecord( - ARecordIndex: Integer): TcxCustomGridRecord; -begin - Result := TcxCustomGridRecord(RecordsList[ARecordIndex]); -end; - -function TcxGridCustomExport.GetRecordCount: Integer; -begin - Result := RecordsList.Count; -end; - -function TcxGridCustomExport.GetViewInfo: TcxCustomGridViewInfo; -begin - if FViewInfo = nil then - FViewInfo := GridView.ViewInfo; - Result := FViewInfo; -end; - -{ TcxExportVisualItem } - -function TcxExportVisualItem.GetBoundsRelativeTo(ATop, ALeft: Integer): TRect; -begin - Result := Bounds; - OffsetRect(Result, 0, ATop); - Result.Left := Max(Result.Left, ALeft); - Result.Right := Max(Result.Right, ALeft); -end; - -function TcxExportVisualItem.IsColumn: Boolean; -begin - Result := Data is TcxGridColumn; -end; - -{ TcxExportGroupSummaryItem } - -procedure TcxExportGroupSummaryItem.InitWidth; -begin - Bounds.Right := Min(Bounds.Right, Bounds.Left + - cxTextWidth(ViewParams.Font, Text) + cxTextOffset * 3); -end; - -{ TcxGridTableViewExport } - -procedure TcxGridTableViewExport.AddDataRow( - var ATop, ALeft: Integer; ARow: TcxGridDataRow); -begin - ALeft := AddIndents(ATop, RecordHeight + GetPreviewHeight(ARow), ARow, ARow.Expandable); - if (PreviewPlace = ppTop) and HasPreview[ARow] then - AddRowPreview(ATop, ALeft, ARow); - CreateRecordFromPattern(ATop, ALeft, ARow); - Inc(ATop, RecordHeight); - if (PreviewPlace = ppBottom) and HasPreview[ARow] then - AddRowPreview(ATop, ALeft, ARow); -end; - -procedure TcxGridTableViewExport.AddFooterCells(var ATop, ALeft: Integer; - ARow: TcxCustomGridRow; ALevel, ADataLevel: Integer; AItems: TcxDataSummaryItems; - AValues: PVariant; AIsFooter: Boolean); -var - R: TRect; - AValue: Variant; - AColumn: TcxGridColumn; - AParams: TcxViewParams; - AItem: TcxDataSummaryItem; - I, J, ACellCount, ALineIndex, ARowCount: Integer; - AFooterCell: TcxExportVisualItem; -begin - if CanShowMultiSummaries(AIsFooter) then - ARowCount := GetFooterLineCount(AItems) - else - ARowCount := RecordRowCount; - R.Bottom := ATop + ARowCount * (DefaultRowHeight + cxGridFooterCellIndent); - if ALevel <> 0 then - ALeft := AddIndents(ATop, R.Bottom - ATop, ARow, False, ALevel - 1); - R := Rect(ALeft, ATop, RecordWidth, R.Bottom); - Styles.GetFooterParams(TcxCustomGridRow(ARow), nil, ADataLevel, nil, AParams); - AddVisualItemEx(R, '', AParams, taLeftJustify, [], clDefault, True); - ATop := R.Bottom; - ACellCount := GetFooterCellCount(AItems); - for I := 0 to PatternCount - 1 do - begin - if ACellCount = 0 then Break; - ALineIndex := 0; - if Patterns[I].IsColumn then - begin - AColumn := TcxGridColumn(Patterns[I].Data); - for J := 0 to AItems.Count - 1 do - begin - AItem := AItems[J]; - if (AItem.ItemLink <> AColumn) or (AItem.Position <> spFooter) then Continue; - GridView.Styles.GetFooterCellParams(ARow, AColumn, ADataLevel, AItem, AParams); - if AIsFooter then - AValue := DataController.Summary.FooterSummaryValues[J] - else - AValue := AValues^[J]; - AFooterCell := AddVisualItemEx(GetFooterItemBounds(I, ALineIndex, R, AIsFooter), AItem.FormatValue( - AValue, True), AParams, AColumn.FooterAlignmentHorz, cxBordersAll, FooterCellBorderColor); - if UseNativeFormat and VarIsNumeric(AValue) then - begin - AFooterCell.Data2 := AItem; - AFooterCell.Value := AValue; - if UseNativeFormat and (AColumn <> nil) and (AItem.Format = '') then - AFooterCell.Value := CheckNativeValue(AColumn.GetProperties, AColumn, AValue); - end; - Dec(ACellCount); - Inc(ALineIndex); - if not CanShowMultiSummaries(AIsFooter) then Break; - end; - end; - end; -end; - -procedure TcxGridTableViewExport.AddGroupRow( - var ATop, ALeft: Integer; ARow: TcxGridGroupRow); -var - R: TRect; - S: string; - AValues: PVariant; - I, AHeight: Integer; - AViewParams: TcxViewParams; - AItems: TcxDataSummaryItems; - AItem: TcxExportGroupSummaryItem; - AExportItem: TcxExportVisualItem; -begin - AHeight := Viewinfo.RecordsViewInfo.GroupRowHeight; - R := Rect(0, ATop, RecordWidth, ATop + AHeight); - R.Left := AddIndents(ATop, AHeight, ARow, True); - Styles.GetGroupParams(ARow, ARow.Level, AViewParams); - AddVisualItemEx(R, '', AViewParams, taLeftJustify, [], clDefault, True); - if IsSummaryUnderColumns and ARow.GetGroupSummaryInfo(AItems, AValues) then - begin - GroupSummaryItemsList.Clear; - GroupSummaryItemsList.Capacity := 1024; - for I := 0 to AItems.Count - 1 do - ProcessGroupSummaryItem(ARow, AValues, I, R, AViewParams); - GroupSummaryItemsList.Sort(@cxCompareGroupSummaryItems); - ProcessGroupSummaryItems(ARow, R); - for I := 0 to GroupSummaryItemCount - 1 do - begin - AItem := GroupSummaryItems[I]; - AExportItem := AddVisualItemEx(AItem.Bounds, AItem.Text, AItem.ViewParams, - AItem.Alignment, GridLines - [bLeft, bRight], GridLineColor, False); - if UseNativeFormat and not VarIsNull(AItem.Value) then - begin - AExportItem.Data2 := AItem.SummaryItem; - AExportItem.Value := AItem.Value; - end; - end; - end - else - begin - S := ARow.DisplayText; - TcxCustomGridTableItemAccess.DoGetDisplayText(ARow.GroupedColumn, ARow, S); - AddVisualItemEx(R, S, AViewParams, - taLeftJustify, GridLines, GridLineColor, False); - end; - Inc(ATop, AHeight); -end; - -function TcxGridTableViewExport.AddIndents(ATop, ARowHeight: Integer; - ARow: TcxCustomGridRecord; AHasButton: Boolean; ALevel: Integer = -1): Integer; -var - R: TRect; - I: Integer; - AText: string; - AStyle: TcxCacheCellStyle; - AGridLines: TcxBorders; - AViewParams: TcxViewParams; -begin - if ALevel = -1 then - ALevel := ARow.Level - 1 + Byte(AHasButton); - while (ALevel >= 0) and (ALevel < ARow.Level) do - ARow := TcxGridDataRow(ARow).ParentRecord; - R := Rect(ALevel * ViewInfo.LevelIndent, ATop, - (ALevel + 1) * ViewInfo.LevelIndent, ATop + ARowHeight); - AGridLines := GridLines; - if not ARow.IsLast or AHasButton and ARow.Expanded then - AGridLines := GridLines - [bBottom]; - for I := ALevel downto 0 do - begin - AText := ''; - if AHasButton and (I = ALevel) then - begin - AText := ButtonTexts[ARow.Expanded]; - AStyle := GetExpandButtonParams(AGridLines); - end - else - begin - if ARow is TcxGridGroupRow then - Styles.GetGroupParams(ARow, I, AViewParams) - else - Styles.GetContentParams(ARow, nil, AViewParams); - ViewParamsToExportStyle(AViewParams, AStyle, taLeftJustify, AGridLines - [bTop], GridLineColor); - end; - ARow := ARow.ParentRecord; - AddVisualItemEx(R, AText, Provider.RegisterStyle(AStyle), False); - OffsetRect(R, -ViewInfo.LevelIndent, 0); - end; - Result := (ALevel + 1) * ViewInfo.LevelIndent; -end; - -procedure TcxGridTableViewExport.AddMasterDataRow( - var ATop, ALeft: Integer; ARow: TcxGridMasterDataRow); -var - ABounds: TRect; -begin - AddDataRow(ATop, ALeft, ARow); - if not ARow.Expanded or not InternalProviderSupported then Exit; - ALeft := AddIndents(ATop, DefaultRowHeight, ARow, False, ARow.Level); - ABounds := Rect(ALeft, ATop, RecordWidth, ATop + DefaultRowHeight); - with AddVisualDataItem(ABounds, DefaultStyleIndex, ARow, nil) do - Hidden := True; - ATop := ABounds.Bottom; -end; - -procedure TcxGridTableViewExport.AddRowFooter( - var ATop, ALeft: Integer; ADataLevel, ALevel: Integer; ARow: TcxCustomGridRecord); -var - AValues: PVariant; - AItems: TcxDataSummaryItems; -begin - ALeft := 0; - while ARow.Level > ADataLevel do - ARow := ARow.ParentRecord; - if DataController.Summary.GetGroupSummaryInfo(ARow.Index, AItems, AValues) then - begin - AddFooterCells(ATop, ALeft, TcxCustomGridRow(ARow), - ALevel, ADataLevel, AItems, AValues, False); - end; -end; - -procedure TcxGridTableViewExport.AddRowFooters( - var ATop, ALeft: Integer; ARow: TcxCustomGridRecord); -var - ALevel, ARealLevel: Integer; -begin - for ALevel := 0 to ARow.Level do - begin - ARealLevel := ALevel; - if HasFooter(ARow, ARealLevel) then - AddRowFooter(ATop, ALeft, ARealLevel, ARow.Level - ALevel, ARow); - end; -end; - -procedure TcxGridTableViewExport.AddRowPreview( - var ATop, ALeft: Integer; ARow: TcxCustomGridRecord); -var - R: TRect; - AColumn: TcxGridColumn; - AParams: TcxViewParams; -begin - AColumn := GridView.Preview.Column; - AColumn.Styles.GetContentParams(ARow, AParams); - R := Rect(ALeft, ATop, RecordWidth, ATop + GetPreviewHeight(ARow)); - AddVisualItemEx(R, VarToStr(GetViewItemValue(ARow, AColumn)), AParams, - AColumn.GetProperties.Alignment.Horz, GridLines, GridLineColor); - ATop := R.Bottom; -end; - -function TcxGridTableViewExport.AddVisualItem( - AItemClass: TcxExportVisualItemClass; const ABounds: TRect): TcxExportVisualItem; -begin - Result := AItemClass.Create(); - Result.Style := -1; - Result.Bounds := ABounds; - with ABounds do - begin - Columns.AddPairs(Left, Right); - Rows.AddPairs(Top, Bottom); - end; - with VisualItemsList do - if Capacity - Count < 2 then Capacity := Count * 2; - VisualItemsList.Add(Result); -end; - -function TcxGridTableViewExport.AddVisualDataItem( - const AItemBounds: TRect; AStyle: Integer; - ARecord: TcxCustomGridRecord; AColumn: TcxGridColumn): TcxExportVisualItem; -begin - Result := AddVisualItem(TcxExportVisualItem, AItemBounds); - Result.Style := AStyle; - Result.Data := ARecord; - Result.Data2 := AColumn; -end; - -function TcxGridTableViewExport.AddVisualItemEx( - const AItemBounds: TRect; const ADisplayText: string; const AViewParams: TcxViewParams; - AAlignment: TAlignment; ABorders: TcxBorders; ABorderColor: TColor = clDefault; - AIsBackground: Boolean = False): TcxExportVisualItem; -var - ASide: TcxBorder; - AStyle: TcxCacheCellStyle; -begin - ViewParamsToExportStyle(AViewParams, AStyle, AAlignment); - if ABorderColor <> clDefault then - begin - ABorderColor := ColorToRgb(ABorderColor); - for ASide := bLeft to bBottom do - if ASide in ABorders then - begin - AStyle.Borders[Integer(ASide)].IsDefault := False; - AStyle.Borders[Integer(ASide)].Color := ABorderColor; - AStyle.Borders[Integer(ASide)].Width := 1; - end; - end; - Result := AddVisualItemEx(AItemBounds, ADisplayText, - Provider.RegisterStyle(AStyle), AIsBackground); -end; - -function TcxGridTableViewExport.AddVisualItemEx( - const AItemBounds: TRect; const ADisplayText: string; - AStyle: Integer; AIsBackground: Boolean = False): TcxExportVisualItem; -begin - Result := AddVisualItem(TcxExportVisualItem, AItemBounds); - Result.Bounds := AItemBounds; - Result.IsBackground := AIsBackground; - Result.DisplayText := ADisplayText; - Result.Style := AStyle; -end; - -function TcxGridTableViewExport.AddPattern(const ABounds: TRect; - AData: TObject; AOffset: Integer = 0): TcxExportVisualItem; -begin - Result := TcxExportVisualItem.Create; - Result.Bounds := ABounds; - Result.Data := AData; - Result.Data2 := TObject(AOffset); - PatternsList.Add(Result); -end; - -function TcxGridTableViewExport.CanShowMultiSummaries(AIsFooter: Boolean): Boolean; -begin - if AIsFooter then - Result := OptionsView.CanShowFooterMultiSummaries - else - Result := OptionsView.CanShowGroupFooterMultiSummaries; -end; - -procedure TcxGridTableViewExport.CreateContent(var ATop, ALeft: Integer); -var - I: Integer; - ARow: TcxCustomGridRecord; -begin - for I := 0 to RecordCount - 1 do - begin - ALeft := 0; - ARow := Records[I]; - if ARow is TcxGridGroupRow then - AddGroupRow(ATop, ALeft, TcxGridGroupRow(ARow)) - else - if ARow is TcxGridMasterDataRow then - AddMasterDataRow(ATop, ALeft, TcxGridMasterDataRow(ARow)) - else - if ARow is TcxGridDataRow then - AddDataRow(ATop, ALeft, TcxGridDataRow(ARow)); - AddRowFooters(ATop, ALeft, ARow); - end; -end; - -procedure TcxGridTableViewExport.CreateFooter(var ATop, ALeft: Integer); -begin - if not OptionsView.Footer then Exit; - AddFooterCells(ATop, ALeft, nil, 0, -1, - DataController.Summary.FooterSummaryItems, nil, True); -end; - -procedure TcxGridTableViewExport.CreateHeader(var ATop, ALeft: Integer); -begin - FRecordWidth := ViewInfo.DataWidth; - ProduceHeadersContainer(ATop, ALeft, ViewInfo.HeaderViewInfo); -end; - -procedure TcxGridTableViewExport.CreateExportCells; -var - ATop, ALeft: Integer; -begin - ATop := 0; - ALeft := 0; - CreateHeader(ATop, ALeft); - CreateContent(ATop, ALeft); - ALeft := 0; - CreateFooter(ATop, ALeft); - MergeCells; -end; - -procedure TcxGridTableViewExport.CreateRecordFromPattern( - var ATop, ALeft: Integer; ARecord: TcxCustomGridRecord); -var - R: TRect; - I: Integer; - APattern: TcxExportVisualItem; - AViewParams: TcxViewParams; - AStyle: TcxCacheCellStyle; -begin - for I := 0 to PatternCount - 1 do - begin - APattern := Patterns[I]; - R := APattern.GetBoundsRelativeTo(ATop, ALeft); - if APattern.IsColumn then - begin - AStyle := GetContentParams(ARecord, TcxGridColumn(APattern.Data), - AViewParams, GridLines, GridLineColor); - AddVisualDataItem(R, Provider.RegisterStyle(AStyle), ARecord, TcxGridColumn(APattern.Data)); - end - else - AddVisualItemEx(R, '', GetPatternParams(ARecord, APattern), taLeftJustify, [], clDefault, True); - end; -end; - -function TcxGridTableViewExport.DoMergeCell( - AMasterItem, ASlaveItem: TcxExportVisualItem): Boolean; -var - AColumn: TcxGridColumn; - AMasterValue, ASlaveValue: Variant; - AMasterProperties, ASlaveProperties: TcxCustomEditProperties; -begin - Result := AMasterItem <> ASlaveItem; - with AMasterItem.Bounds do - begin - Result := Result and not TcxGridDataRow(AMasterItem.Data).Expanded and - (Bottom = ASlaveItem.Bounds.Top) and (Left = ASlaveItem.Bounds.Left) and - (Right = ASlaveItem.Bounds.Right); - end; - if Result then - begin - AColumn := TcxGridColumn(AMasterItem.Data2); - AMasterValue := GetViewItemValueEx( - TcxGridDataRow(AMasterItem.Data), AColumn, AMasterProperties); - ASlaveValue := GetViewItemValueEx( - TcxGridDataRow(ASlaveItem.Data), AColumn, ASlaveProperties); - Result := AColumn.DoCompareValuesForCellMerging(TcxGridDataRow(AMasterItem.Data), AMasterProperties, - AMasterValue, TcxGridDataRow(ASlaveItem.Data), ASlaveProperties, ASlaveValue); - end; - if Result then - begin - AMasterItem.Bounds.Bottom := ASlaveItem.Bounds.Bottom; - ASlaveItem.Hidden := True; - ASlaveItem.Slave := True; - end; -end; - -procedure TcxGridTableViewExport.ExportCells; -var - R: TRect; - I: Integer; - AItem: TcxExportVisualItem; -begin - inherited ExportCells; - R := Rect(0, 0, Columns.Count - 1, Rows.Count - 1); - for I := 0 to VisualItemCount - 1 do - begin - AItem := VisualItems[I]; - if cxRectIsEmpty(AItem.Bounds) then Continue; - if AItem.Slave then Continue; - if AItem.Hidden then - begin - if AItem.Data is TcxGridMasterDataRow and TcxGridMasterDataRow(AItem.Data).Expanded then - ExportDetailCell(AItem); - Continue; - end; - if AItem.IsBackground then - FillRealArea(AItem.Bounds, AItem.Style, clBtnShadow, GridLines) - else - begin - if AItem.Data2 is TcxGridColumn then - begin - SetRealCellStyleAndValueEx(AItem.Bounds, R, AItem.Style, - TcxCustomGridRecord(AItem.Data), TcxGridColumn(AItem.Data2)); - end - else - if AItem.Data2 is TcxDataSummaryItem then - SetRealCellStyleAndValue(AItem.Bounds, R, AItem.Style, AItem.Value) - else - SetRealCellStyleAndValue(AItem.Bounds, R, AItem.Style, AItem.DisplayText) - end; - end; -end; - -procedure TcxGridTableViewExport.ExportDetailCell(ACell: TcxExportVisualItem); -var - R: TRect; - AViewInfo: TcxCustomGridViewInfo; - AGridRow: TcxGridMasterDataRow; - ADetailExport: TcxGridCustomExport; - AParams: TcxViewParams; - AStyle: TcxCacheCellStyle; - AStyleIndex: Integer; -begin - AGridRow := TcxGridMasterDataRow(ACell.Data); - AViewInfo := CalculateViewViewInfo(AGridRow.ActiveDetailGridView, ViewInfo.Bounds); - try - ADetailExport := GetExportClassByGridView(AGridRow.ActiveDetailGridView).CreateFrom( - Self, AGridRow.ActiveDetailGridView, AViewInfo); - try - ADetailExport.CreateExportCache; - RealBoundsToLogicalBounds(ACell.Bounds, R); - Styles.GetContentParams(AGridRow, nil, AParams); - ViewParamsToExportStyle(AParams, AStyle, taLeftJustify, GridLines, GridLineColor); - AStyleIndex := Provider.RegisterStyle(AStyle); - Provider.SetCellStyleEx(R.Left, R.Top, R.Bottom - R.Top, R.Right - R.Left, AStyleIndex); - if not ADetailExport.IsEmpty then - InternalProvider.SetCacheIntoCell(R.Left, R.Top, ADetailExport.InternalProvider); - finally - ADetailExport.Free; - end; - finally - AViewInfo.Free; - end; -end; - -procedure TcxGridTableViewExport.Finalize; -begin - inherited Finalize; - FreeAndNil(FPatternsList); - FreeAndNil(FVisualItemsList); - FreeAndNil(FGroupSummaryItemsList); -end; - -function TcxGridTableViewExport.GetColumnOffset( - AColumn: TcxGridColumn): Integer; -begin - Result := LeftPos - IndicatorWidth; -end; - -function TcxGridTableViewExport.GetExpandButtonParams( - ABorders: TcxBorders): TcxCacheCellStyle; -var - ABorder: TcxBorder; -begin - Result := DefaultCellStyle; - for ABorder := bLeft to bBottom do - if ABorder in ABorders then - begin - Result.Borders[Integer(ABorder)].IsDefault := False; - Result.Borders[Integer(ABorder)].Width := 1; - Result.Borders[Integer(ABorder)].Color := ColorToRgb(GridLineColor); - end - else - begin - Result.Borders[Integer(ABorder)].IsDefault := True; - Result.Borders[Integer(ABorder)].Width := 0; - end; - Result.BrushBkColor := ColorToRgb(clBtnFace); -end; - -function TcxGridTableViewExport.GetFooterCellCount( - AItems: TcxDataSummaryItems): Integer; -var - I: Integer; -begin - Result := 0; - if AItems = nil then Exit; - for I := 0 to AItems.Count - 1 do - if AItems[I].Position = spFooter then - Inc(Result); -end; - -function TcxGridTableViewExport.GetFooterItemBounds( - AIndex, ALineIndex: Integer; const AOrigin: TRect; AIsFooter: Boolean): TRect; -var - H, LCount: Integer; -begin - with Patterns[AIndex] do - begin - H := DefaultRowHeight + cxGridFooterCellIndent; - Result.Left := Max(Bounds.Left, AOrigin.Left); - Result.Right := Min(Bounds.Right, AOrigin.Right); - Result.Top := AOrigin.Top + (Bounds.Top div DefaultRowHeight + ALineIndex) * H; - LCount := 1; - if not CanShowMultiSummaries(AIsFooter) then - LCount := Max(1, (Bounds.Bottom - Bounds.Top) div DefaultRowHeight); - Result.Bottom := Result.Top + LCount * H; - InflateRect(Result, -cxGridFooterCellIndent, -cxGridFooterCellIndent); - end; -end; - -function TcxGridTableViewExport.GetFooterLineCount( - AItems: TcxDataSummaryItems): Integer; - - function IsSameFooterItems(AItem1, AItem2: TcxDataSummaryItem): Boolean; - begin - Result := (AItem1.ItemLink = AItem2.ItemLink) and - (AItem1.Position = spFooter) and (AItem2.Position = spFooter); - end; - -var - I, J, ACount: Integer; -begin - Result := 1; - if AItems = nil then Exit; - for I := 0 to AItems.Count - 1 do - begin - ACount := 0; - for J := 0 to AItems.Count - 1 do - if IsSameFooterItems(AItems[I], AItems[J]) then - Inc(ACount); - Result := Max(Result, ACount); - end; -end; - -function TcxGridTableViewExport.GetGroupRowColumnIntersection( - const ARowBounds: TRect; AColumn: TcxGridColumn): TRect; -var - I: Integer; -begin - Result := ARowBounds; - if AColumn = nil then Exit; - for I := 0 to PatternCount - 1 do - begin - if Patterns[I].Data = AColumn then - begin - Result.Left := Max(Result.Left, Patterns[I].Bounds.Left); - Result.Right := Min(Result.Right, Patterns[I].Bounds.Right); - Break; - end; - end; -end; - -function TcxGridTableViewExport.GetIsSummaryUnderColumns: Boolean; -begin - Result := OptionsView.GroupSummaryLayout <> gslStandard; -end; - -function TcxGridTableViewExport.GetPatternParams( - ARecord: TcxCustomGridRecord; AItem: TcxExportVisualItem): TcxViewParams; -begin - if AItem.IsColumn then - TcxGridColumn(AItem.Data).Styles.GetContentParams(ARecord, Result) - else - FillChar(Result, SizeOf(Result), 0); -end; - -function TcxGridTableViewExport.GetPreviewHeight(ARow: TcxCustomGridRecord): Integer; -var - R: TRect; - AMaxLineCount: Integer; - AColumn: TcxGridColumn; - AParams: TcxViewParams; -begin - if HasPreview[ARow] then - begin - AMaxLineCount := GridView.Preview.MaxLineCount; - Result := AMaxLineCount * DefaultRowHeight; - if GridView.Preview.AutoHeight then - begin - AColumn := GridView.Preview.Column; - AColumn.Styles.GetContentParams(ARow, AParams); - R := Rect(0, 0, RecordWidth, Result); - with TcxScreenCanvas.Create do - try - TextExtent(VarToStr(GetViewItemValue(ARow, AColumn)), R, cxWordBreak and not cxSingleLine); - finally - Free; - end; - if AMaxLineCount = 0 then - Result := cxRectHeight(R) + cxTextOffset * 3 - else - Result := Min(Result, cxRectHeight(R) + cxTextOffset * 3); - end; - end - else - Result := 0; -end; - -function TcxGridTableViewExport.HasFooter( - ARow: TcxCustomGridRecord; var ALevel: Integer): Boolean; -begin - if OptionsView.GroupFooters = gfInvisible then - Result := False - else - begin - if OptionsView.GroupFooters = gfAlwaysVisible then - Dec(ALevel); - Result := (0 <= ALevel) and (ALevel < ARow.Level) and - TcxCustomGridRecordAccess(ARow).IsParentRecordLast[ALevel] and - TcxGridColumnAccess.CanShowGroupFooters(GridView.GroupedColumns[ARow.Level - 1 - ALevel]); - end; - if ARow is TcxGridGroupRow then - begin - Result := Result or - (OptionsView.GroupFooters = gfAlwaysVisible) and - (ALevel = -1) and not ARow.Expanded and - TcxGridColumnAccess.CanShowGroupFooters(TcxGridGroupRow(ARow).GroupedColumn); - end; - if Result then - ALevel := ARow.Level - ALevel - 1; -end; - -procedure TcxGridTableViewExport.Initialize; -const - ACapacitySize: array[Boolean] of Integer = - (1024 * 1024, 1024); -begin - inherited Initialize; - FRecordRowCount := 1; - FPatternsList := TcxObjectList.Create; - FVisualItemsList := TcxObjectList.Create; - FVisualItemsList.Capacity := ACapacitySize[InternalProviderSupported and GridView.IsDetail]; - FGroupSummaryItemsList := TcxObjectList.Create; - FGroupSummaryItemsList.Capacity := 1024; -end; - -procedure TcxGridTableViewExport.MergeCells; -var - I, J, AMasterRowIndex, ASlaveRowIndex: Integer; - AColumn: TcxGridColumn; - AMergedRowsList: TList; -begin - AMergedRowsList := TList.Create; - try - for I := 0 to PatternCount - 1 do - begin - if not Patterns[I].IsColumn then Continue; - AColumn := TcxGridColumn(Patterns[I].Data); - if not AColumn.Options.CellMerging then Continue; - AMergedRowsList.Clear; - for J := 0 to VisualItemCount - 1 do - begin - if VisualItems[J].Data2 = AColumn then - AMergedRowsList.Add(VisualItems[J]); - end; - AMasterRowIndex := 0; - while AMasterRowIndex < AMergedRowsList.Count do - begin - ASlaveRowIndex := AMasterRowIndex + 1; - while ASlaveRowIndex < AMergedRowsList.Count do - begin - if DoMergeCell(TcxExportVisualItem(AMergedRowsList[AMasterRowIndex]), - TcxExportVisualItem(AMergedRowsList[ASlaveRowIndex])) then - Inc(ASlaveRowIndex) - else - Break; - end; - AMasterRowIndex := ASlaveRowIndex; - end; - end; - finally - AMergedRowsList.Free; - end; -end; - -procedure TcxGridTableViewExport.ProcessGroupSummaryItem(ARow: TcxGridGroupRow; - AValues: PVariant; AIndex: Integer; const ABounds: TRect; const ARowViewParams: TcxViewParams); -var - ADisplayText: string; - ADisplayValue: Variant; - AItem: TcxExportGroupSummaryItem; - ASummaryItem: TcxGridTableSummaryItem; -begin - ASummaryItem := TcxGridTableSummaryItem(ARow.GroupSummaryItems[AIndex]); - if (ASummaryItem.Column <> nil) and not ASummaryItem.Column.Visible then Exit; - ADisplayText := ASummaryItem.FormatValue(AValues^[AIndex], False); - ADisplayValue := AValues^[AIndex]; - if (ASummaryItem.Position <> spGroup) or (ADisplayText = '') then Exit; - AItem := TcxExportGroupSummaryItem.Create; - AItem.Column := ASummaryItem.Column; - if (AItem.Column <> nil) and (AItem.Column.VisibleIndex < 0) then - AItem.Column := nil; - if AItem.Column <> nil then - begin - Styles.GetGroupSummaryCellContentParams(ARow, ASummaryItem, AItem.ViewParams); - AItem.ViewParams.Color := ARowViewParams.Color; - AItem.ViewParams.Bitmap := ARowViewParams.Bitmap; - end - else - AItem.ViewParams := ARowViewParams; - AItem.Bounds := GetGroupRowColumnIntersection(ABounds, AItem.Column); - AItem.Text := ADisplayText; - AItem.SummaryItem := ASummaryItem; - AItem.Value := ADisplayValue; - AItem.Index := AIndex; - GroupSummaryItemsList.Add(AItem); -end; - -procedure TcxGridTableViewExport.ProcessGroupSummaryItems( - ARow: TcxGridGroupRow; ABounds: TRect); -var - I: Integer; - AItem: TcxExportGroupSummaryItem; - AItems: TcxDataGroupSummaryItems; -begin - I := 0; - AItems := ARow.GroupSummaryItems; - while I < GroupSummaryItemCount do - begin - AItem := GroupSummaryItems[I]; - if (I < (GroupSummaryItemCount - 1)) and - (AItem.Column = GroupSummaryItems[I + 1].Column) then - begin - AItem.Text := AItem.Text + AItems.Separator + ' ' + GroupSummaryItems[I + 1].Text; - AItem.Value := Null; - GroupSummaryItemsList[I + 1].Free; - GroupSummaryItemsList.Delete(I + 1); - Continue; - end - else - Inc(I); - end; - if (GroupSummaryItemCount > 0) and (GroupSummaryItems[0].Column = nil) then - begin - GroupSummaryItems[0].Text := ARow.DisplayCaption + - AItems.BeginText + GroupSummaryItems[0].Text + AItems.EndText; - GroupSummaryItems[0].Value := Null; - end - else - begin - AItem := TcxExportGroupSummaryItem.Create; - AItem.Text := ARow.DisplayCaption; - if GroupSummaryItemCount = 0 then - begin - TcxCustomGridTableItemAccess.DoGetDisplayText(ARow.GroupedColumn, ARow, AItem.Text); - if AItem.Text <> ARow.DisplayCaption then - AItem.Value := Null; - end; - Styles.GetGroupParams(ARow, ARow.Level, AItem.ViewParams); - AItem.Bounds := ABounds; - GroupSummaryItemsList.Insert(0, AItem); - end; - GroupSummaryItemsList.Sort(@cxCompareGroupSummaryItems); - I := 0; - while I <= GroupSummaryItemCount - 2 do - begin - if (I = 0) and (GroupSummaryItems[I].Column = nil) then - GroupSummaryItems[I].InitWidth; - with GroupSummaryItems[I] do - begin - if (I = 0) and (Column = nil) and (Bounds.Left >= GroupSummaryItems[I + 1].Bounds.Left) then - GroupSummaryItems[I + 1].Bounds.Left := Bounds.Right - else - Bounds.Right := Min(Bounds.Right, GroupSummaryItems[I + 1].Bounds.Left); - if Bounds.Left >= Bounds.Right then - GroupSummaryItemsList.Delete(I) - else - Inc(I); - end; - end; -end; - -procedure TcxGridTableViewExport.ProduceHeadersContainer(var ATop, ALeft: Integer; - AViewInfo: TcxGridColumnContainerViewInfo); -var - R, AVisibleRect: TRect; - I, APrevTop, AOffsetY: Integer; - AItem: TcxGridColumnHeaderViewInfo; - AVisualItem: TcxExportVisualItem; -begin - AOffsetY := ATop - AViewInfo.Bounds.Top; - APrevTop := MaxInt; - for I := 0 to AViewInfo.Count - 1 do - begin - AItem := AViewInfo.Items[I]; - AItem.Recalculate; - R := cxRectOffset(AItem.RealBounds, GetColumnOffset(AItem.Column), AOffsetY); - APrevTop := Min(APrevTop, R.Top); - AVisibleRect := R; - if not AViewInfo.Visible or not OptionsView.Header then - AVisibleRect := cxNullRect; - AVisualItem := AddVisualItemEx(AVisibleRect, AItem.Text, - AItem.Params, AItem.AlignmentHorz, cxBordersAll, clBtnShadow); - AVisualItem.Bounds := R; - AVisualItem.Hidden := not OptionsView.Header; - ATop := Max(ATop, R.Bottom); - AVisualItem.Data := AItem.Column; - AddPattern(R, AVisualItem.Data); - end; - SetPatternsBounds(APrevTop, ATop - APrevTop); - if not OptionsView.Header then - ATop := 0; -end; - -procedure TcxGridTableViewExport.SetPatternsBounds(ATop, ABottom: Integer); -var - I: Integer; -begin - for I := 0 to PatternsList.Count - 1 do - with Patterns[I] do - begin - OffsetRect(Bounds, 0, -ATop); - Bounds.Top := Max(0, Bounds.Top); - Bounds.Bottom := Min(ABottom, Bounds.Bottom); - end; - RecordHeight := ABottom; - if RecordHeight = 0 then - RecordHeight := ViewInfo.RecordsViewInfo.RowHeight; - DefaultRowHeight := RecordHeight; -end; - -function TcxGridTableViewExport.GetFooterCellBorderColor: TColor; -begin - Result := Grid.LookAndFeelPainter.FooterSeparatorColor; -end; - -function TcxGridTableViewExport.GetGridLineColor: TColor; -begin - Result := OptionsView.GridLineColor; - if Result = clDefault then - Result := clBtnShadow; -end; - -function TcxGridTableViewExport.GetGridLines: TcxBorders; -begin - Result := GridLines2Borders[OptionsView.GridLines]; -end; - -function TcxGridTableViewExport.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridTableViewExport.GetGroupSummaryCount: Integer; -begin - Result := FGroupSummaryItemsList.Count; -end; - -function TcxGridTableViewExport.GetGroupSummaryItem( - AIndex: Integer): TcxExportGroupSummaryItem; -begin - Result := TcxExportGroupSummaryItem(FGroupSummaryItemsList[AIndex]); -end; - -function TcxGridTableViewExport.GetHasPreview( - ARow: TcxCustomGridRecord): Boolean; -begin - with GridView.Preview do - Result := Visible and (Column <> nil); -end; - -function TcxGridTableViewExport.GetIndicatorWidth: Integer; -begin - if ViewInfo.IndicatorViewInfo.Visible then - Result := OptionsView.IndicatorWidth - else - Result := 0; -end; - -function TcxGridTableViewExport.GetLeftPos: Integer; -begin - Result := GridView.Controller.LeftPos; -end; - -function TcxGridTableViewExport.GetOptionsView: TcxGridTableOptionsView; -begin - Result := GridView.OptionsView; -end; - -function TcxGridTableViewExport.GetPattern(AIndex: Integer): TcxExportVisualItem; -begin - Result := PatternsList[AIndex] as TcxExportVisualItem; -end; - -function TcxGridTableViewExport.GetPatternCount: Integer; -begin - Result := PatternsList.Count; -end; - -function TcxGridTableViewExport.GetPreviewPlace: TcxGridPreviewPlace; -begin - Result := GridView.Preview.Place; -end; - -function TcxGridTableViewExport.GetStyles: TcxGridTableViewStyles; -begin - Result := GridView.Styles; -end; - -function TcxGridTableViewExport.GetViewInfo: TcxGridTableViewInfo; -begin - Result := inherited ViewInfo as TcxGridTableViewInfo; -end; - -function TcxGridTableViewExport.GetVisualItem( - AIndex: Integer): TcxExportVisualItem; -begin - Result := VisualItemsList[AIndex] as TcxExportVisualItem; -end; - -function TcxGridTableViewExport.GetVisualItemCount: Integer; -begin - Result := VisualItemsList.Count; -end; - -procedure TcxGridTableViewExport.SetLeftPos(AValue: Integer); -begin - GridView.Controller.LeftPos := AValue; - ViewInfo.Recalculate; -end; - -{ TcxGridBandedTableViewExport } - -procedure TcxGridBandedTableViewExport.CreateBandHeaders( - var ATop: Integer; AForRootBands: Boolean); -var - R: TRect; - ABandViewInfo: TcxGridBandViewInfo; - ABandsViewInfo: TcxGridBandsViewInfo; - ABandHeader: TcxGridBandHeaderViewInfo; - AVisualItem: TcxExportVisualItem; - AHeight, I, AOffsetX, AOffsetY, AColsOffset: Integer; -begin - AHeight := 0; - AOffsetX := 0; - AOffsetY := ATop - ViewInfo.HeaderViewInfo.Bounds.Top; - ABandsViewInfo := ViewInfo.HeaderViewInfo.BandsViewInfo; - for I := 0 to ABandsViewInfo.Count - 1 do - begin - ABandViewInfo := ABandsViewInfo.Items[I]; - if (AForRootBands and (ABandViewInfo.Band.ParentBand <> nil)) or - (not AForRootBands and (ABandViewInfo.Band.ParentBand = nil)) then Continue; - if not AForRootBands then - AOffsetX := ABandViewInfo.Bounds.Left + GetParentBandOffset(ABandViewInfo.Band.ParentBand); - with cxRectSize(ABandViewInfo.Bounds) do - R := cxRectBounds(AOffsetX, ABandViewInfo.Bounds.Top + AOffsetY, cx, cy); - if not cxRectIsEmpty(R) then - begin - AddVisualItemEx(R, ABandViewInfo.Text, ABandViewInfo.Params, - ABandViewInfo.AlignmentHorz, [], clDefault, True); - end; - AColsOffset := AOffsetX - ABandViewInfo.Bounds.Left; - AddPattern(R, ABandViewInfo.Band, AColsOffset); - ABandHeader := ABandViewInfo.HeaderViewInfo; - R := cxRectOffset(cxRectSetLeft(ABandHeader.Bounds, AOffsetX), 0, AOffsetY); - AVisualItem := AddVisualItemEx(R, ABandHeader.Text, ABandHeader.Params, - ABandHeader.AlignmentHorz, cxBordersAll, clBtnShadow); - AVisualItem.Data := ABandHeader.Band; - AVisualItem.Hidden := not OptionsView.BandHeaders; - if OptionsView.BandHeaders then - AHeight := Max(AHeight, R.Bottom); - if AForRootBands then - Inc(AOffsetX, cxRectWidth(ABandViewInfo.Bounds)); - end; - ATop := AHeight; -end; - -procedure TcxGridBandedTableViewExport.CreateHeader(var ATop, ALeft: Integer); -var - ABandsViewInfo: TcxGridBandsViewInfo; - AHeight: Integer; -begin - AHeight := 0; - ABandsViewInfo := ViewInfo.HeaderViewInfo.BandsViewInfo; - CreateBandHeaders(AHeight, True); - AHeight := ATop; - CreateBandHeaders(AHeight, False); - inherited CreateHeader(ATop, ALeft); - if not OptionsView.Header and (ABandsViewInfo.Count > 0) then - ATop := AHeight; - FRecordRowCount := ABandsViewInfo.LineCount; - if RecordRowCount = 0 then - DefaultRowHeight := RecordHeight - else - DefaultRowHeight := RecordHeight div RecordRowCount; -end; - -function TcxGridBandedTableViewExport.GetColumnOffset( - AColumn: TcxGridColumn): Integer; -begin - Result := Integer(GetPatternByBand( - TcxGridBandedColumn(AColumn).Position.Band).Data2); -end; - -function TcxGridBandedTableViewExport.GetContentOffset: TPoint; -begin - Result := Point(0, 0); - if ViewInfo.GroupByBoxViewInfo.Visible then - Result.Y := -ViewInfo.GroupByBoxViewInfo.Bounds.Bottom; -end; - -function TcxGridBandedTableViewExport.GetIsSummaryUnderColumns: Boolean; -var - I: Integer; - ARowIndex: Integer; -begin - Result := inherited GetIsSummaryUnderColumns; - ARowIndex := -1; - for I := 0 to GridView.VisibleColumnCount - 1 do - with GridView.VisibleColumns[I] do - begin - if ARowIndex = -1 then - ARowIndex := Position.RowIndex - else - Result := Result and (ARowIndex = Position.RowIndex); - end; -end; - -function TcxGridBandedTableViewExport.GetParentBandOffset(ABand: TcxGridBand): Integer; -begin - while ABand.ParentBand <> nil do - ABand := ABand.ParentBand; - Result := Integer(GetPatternByBand(ABand).Data2); -end; - -function TcxGridBandedTableViewExport.GetPatternByBand( - ABand: TcxGridBand): TcxExportVisualItem; -var - I: Integer; -begin - Result := nil; - for I := 0 to PatternCount - 1 do - with Patterns[I] do - if not IsColumn and (Data = ABand) then - begin - Result := Patterns[I]; - Break; - end; -end; - -function TcxGridBandedTableViewExport.GetPatternParams( - ARecord: TcxCustomGridRecord; AItem: TcxExportVisualItem): TcxViewParams; -var - ACellPos: TcxGridDataCellPos; -begin - if AItem.IsColumn then - Result := inherited GetPatternParams(ARecord, AItem) - else - begin - ACellPos := TcxGridDataCellPos.Create(ARecord, nil); - try - TcxGridBand(AItem.Data).Styles.GetViewParams(bsContent, ACellPos, nil, Result); - finally - ACellPos.Free; - end; - end; -end; - -function TcxGridBandedTableViewExport.ProduceColumnsContainer( - AContainer: TcxGridColumnContainerViewInfo; ATop, ALeft: Integer): Integer; -var - R: TRect; - I: Integer; - AItem: TcxGridColumnHeaderViewInfo; - AVisualItem: TcxExportVisualItem; -begin - Result := 0; - if not AContainer.Visible then Exit; - Dec(ATop, AContainer.Bounds.Top); - Dec(ALeft, AContainer.Bounds.Left); - R := AContainer.Bounds; - AddVisualItemEx(cxRectOffset(AContainer.Bounds, ALeft, ATop), - AContainer.Text, AContainer.Params, AContainer.AlignmentHorz, [], clDefault, True); - Result := 0; - for I := 0 to AContainer.Count - 1 do - begin - AItem := AContainer.Items[I]; - if not AItem.Visible then - R := cxRectOffset(AItem.RealBounds, ALeft, ATop); - AVisualItem := AddVisualItemEx(R, AItem.Text, - AItem.Params, AItem.AlignmentHorz, cxBordersAll, clBtnShadow); - Result := Max(Result, R.Bottom); - AVisualItem.Data := AItem.Column; - end; -end; - -function TcxGridBandedTableViewExport.GetGridView: TcxGridBandedTableView; -begin - Result := TcxGridBandedTableView(inherited GridView); -end; - -function TcxGridBandedTableViewExport.GetViewInfo: TcxGridBandedTableViewInfo; -begin - Result := TcxGridBandedTableViewInfo(inherited ViewInfo); -end; - -function TcxGridBandedTableViewExport.GetOptionsView: TcxGridBandedTableOptionsView; -begin - Result := TcxGridBandedTableOptionsView(inherited OptionsView); -end; - -{ TcxExportCardRow } - -constructor TcxExportCardRow.Create(AOwner: TcxExportCard); -begin - FOwner := AOwner; -end; - -procedure TcxExportCardRow.AddToScales( - AColumnScale, ARowScale: TcxExportScale); -begin - AColumnScale.AddPairs(Bounds.Left, Bounds.Right); - if HasIndent then - AColumnScale.Add(Bounds.Left + CategoryIndent); - if HasSeparator then - ARowScale.Add(Bounds.Top + SeparatorWidth); - if ShowCaption then - AColumnScale.Add(Bounds.Left + CaptionWidth); - ARowScale.AddPairs(Bounds.Top, Bounds.Bottom); -end; - -function TcxExportCardRow.GetCaptionBounds: TRect; -begin - Result := Bounds; - if ShowData then - Result.Right := Result.Left + CaptionWidth; - if HasIndent then - Inc(Result.Left, CategoryIndent); - if HasSeparator then - Inc(Result.Top, SeparatorWidth); -end; - -function TcxExportCardRow.GetCaptionStyle: TcxViewParams; -begin - case Row.Kind of - rkCaption: - Row.Styles.GetCaptionRowParams(Card, Result); - rkCategory: - Row.Styles.GetCategoryRowParams(Card,Result); - else - Row.Styles.GetCaptionParams(Card, Result); - end; -end; - -function TcxExportCardRow.GetCard: TcxGridCard; -begin - Result := Owner.Card; -end; - -function TcxExportCardRow.GetCategoryIndent: Integer; -begin - if Row.HasExpandButton then - Result := Owner.Owner.ExpandButtonSize + cxTextOffset * 2 - else - Result := Owner.Owner.CategoryIndent; -end; - -function TcxExportCardRow.GetDataAlignment: TAlignment; -begin - Result := Row.GetProperties.Alignment.Horz; -end; - -function TcxExportCardRow.GetDataBounds: TRect; -begin - Result := Bounds; - if ShowCaption then - Inc(Result.Left, CaptionWidth) - else - if HasIndent then - Inc(Result.Left, CategoryIndent); - if HasSeparator then - Inc(Result.Top, SeparatorWidth); -end; - -function TcxExportCardRow.GetDataStyle: TcxViewParams; -begin - case Row.Kind of - rkCaption: - Row.Styles.GetCaptionRowParams(Card, Result); - rkCategory: - Row.Styles.GetCategoryRowParams(Card, Result); - else - Row.Styles.GetContentParams(Card, Result); - end; -end; - -function TcxExportCardRow.GetDataValue: Variant; -begin - Result := Owner.Owner.GetViewItemValue(Card, Row); -end; - -function TcxExportCardRow.GetHasIndent: Boolean; -begin - Result := Row.HasExpandButton or (Row.CategoryRow <> nil); - if Result and Owner.Owner.IsHorizontalRows then - Result := Row.Position.VisibleIndexInLayer = 0; -end; - -function TcxExportCardRow.GetHasSeparator: Boolean; -begin - Result := FHasSeparator; -end; - -function TcxExportCardRow.GetHeight: Integer; -begin - Result := Bounds.Bottom - Bounds.Top; -end; - -function TcxExportCardRow.GetIndentBounds: TRect; -begin - Result := Bounds; - Result.Right := Result.Left + CategoryIndent; - if HasSeparator then - Inc(Result.Top, SeparatorWidth); -end; - -function TcxExportCardRow.GetIndentStyle: TcxViewParams; -begin - if HasIndent then - begin - if Row.HasExpandButton or (Row.CategoryRow = nil) then - Result := CaptionStyle - else - Row.CategoryRow.Styles.GetCategoryRowParams(Card, Result); - end; -end; - -function TcxExportCardRow.GetSeparatorBounds: TRect; -begin - if Owner.Owner.IsHorizontalRows then - begin - Result := cxRectSetTop(Owner.Bounds, Bounds.Top, SeparatorWidth); - InflateRect(Result, -Owner.BorderWidth, 0); - end - else - Result := cxRectSetTop(Bounds, Bounds.Top, SeparatorWidth); -end; - -function TcxExportCardRow.GetSeparatorWidth: Integer; -begin - Result := Owner.Owner.OptionsView.CategorySeparatorWidth; -end; - -function TcxExportCardRow.GetShowCaption: Boolean; -begin - Result := Row.Options.ShowCaption; -end; - -function TcxExportCardRow.GetShowData: Boolean; -begin - Result := Row.Options.ShowData; -end; - -function TcxExportCardRow.GetVisibleCaption: string; -begin - Result := Row.VisibleCaption; -end; - -function TcxExportCardRow.GetWidth: Integer; -begin - Result := Bounds.Right - Bounds.Left; -end; - -procedure TcxExportCardRow.SetHeight(AValue: Integer); -begin - Bounds.Bottom := Bounds.Top + AValue; -end; - -procedure TcxExportCardRow.SetWidth(AValue: Integer); -begin - Bounds.Right := Bounds.Left + AValue; -end; - -{ TcxExportCard } - -constructor TcxExportCard.Create( - AOwner: TcxGridCardViewExport; ACard: TcxGridCard); -begin - FCard := ACard; - FLayersList := TcxObjectList.Create(); - FOwner := AOwner; -end; - -destructor TcxExportCard.Destroy; -begin - FreeAndNil(FLayersList); - inherited Destroy; -end; - -procedure TcxExportCard.AddToScales( - AColumnScale, ARowScale: TcxExportScale); -var - ALayerIndex, ARowIndex: Integer; -begin - for ALayerIndex := 0 to LayerCount - 1 do - for ARowIndex := 0 to RowCount[ALayerIndex] - 1 do - Rows[ALayerIndex, ARowIndex].AddToScales(AColumnScale, ARowScale); - if BorderWidth > 0 then - begin - AColumnScale.AddPairs(Bounds.Left, Bounds.Right); - ARowScale.AddPairs(Bounds.Top, Bounds.Bottom); - end; - if HasSeparators then - begin - for ALayerIndex := 0 to LayerCount - 2 do - with LayerSeparators[ALayerIndex] do - begin - AColumnScale.AddPairs(Left, Right); - ARowScale.AddPairs(Top, Bottom); - end; - end; -end; - -procedure TcxExportCard.CalculateLayersCaptionWidth( - AWidths: TcxExportIntList; AFistRowInLayerOnly: Boolean); -var - I, J: Integer; -begin - I := LayerCount; - if AFistRowInLayerOnly then - I := 1; - if AWidths.Count < I then - AWidths.Count := I; - for I := 0 to LayerCount - 1 do - begin - if AFistRowInLayerOnly then - AWidths[0] := GetRowCaptionWidth(I, 0, AWidths[0]) - else - for J := 0 to RowCount[I] - 1 do - AWidths[I] := GetRowCaptionWidth(I, J, AWidths[I]); - end; -end; - -function TcxExportCard.GetRowCaptionWidth( - ALayerIndex, ARowIndex: Integer; AMaxWidth: Integer = 0): Integer; -var - ARow: TcxExportCardRow; -begin - ARow := Rows[ALayerIndex, ARowIndex]; - if ARow.HasIndent then - Result := Owner.OptionsView.CategoryIndent - else - Result := 0; - if ARow.ShowCaption and ARow.ShowData then - Inc(Result, Owner.TextWidthEx(ARow.CaptionStyle, ARow.VisibleCaption) + cxTextOffset * 2); - Result := Max(Result, AMaxWidth); -end; - -procedure TcxExportCard.SetLayersCaptionWidth( - AWidths: TcxExportIntList; AFistRowInLayerOnly: Boolean); -var - ALayerIndex, ARowIndex, AWidth: Integer; -begin - for ALayerIndex := 0 to LayerCount - 1 do - for ARowIndex := 0 to RowCount[ALayerIndex] - 1 do - begin - if Owner.IsHorizontalRows then - begin - if (ARowIndex = 0) or not AFistRowInLayerOnly then - AWidth := AWidths[ARowIndex] - else - AWidth := GetRowCaptionWidth(ALayerIndex, ARowIndex); - SetRowCaptionWidth(ALayerIndex, ARowIndex, AWidth); - end - else - SetRowCaptionWidth(ALayerIndex, ARowIndex, AWidths[ALayerIndex]); - end; -end; - -procedure TcxExportCard.SetRowCaptionWidth( - ALayerIndex, ARowIndex, AWidth: Integer); -begin - Rows[ALayerIndex, ARowIndex].CaptionWidth := AWidth; -end; - -function TcxExportCard.AddLayer: TList; -begin - Result := TList.Create; - LayersList.Add(Result); -end; - -function TcxExportCard.AddRow( - ALayerIndex: Integer; ARow: TcxGridCardViewRow): TcxExportCardRow; -begin - Result := TcxExportCardRow.Create(Self); - Result.Row := ARow; - if ARow.Options.ShowCaption then - begin - Result.CaptionStyleIndex := - Owner.RegisterViewParams(Result.CaptionStyle, ARow.CaptionAlignmentHorz); - end; - Result.DataStyleIndex := Owner.RegisterViewParams(Result.DataStyle, Result.DataAlignment); - if Result.HasIndent then - Result.IndentStyleIndex := Owner.RegisterViewParams(Result.IndentStyle); - Result.Bounds := Rect(Bounds.Left, 0, Bounds.Left + ARow.Position.Width, - ARow.Position.LineCount * Owner.TextHeightEx(Result.DataStyle)); - Layers[ALayerIndex].Add(Result); -end; - -procedure TcxExportCard.AddLayerSeparators; -var - ALayerIndex, ARowIndex, AOffset: Integer; -begin - if not HasSeparators then Exit; - if Owner.IsHorizontalRows then - begin - AOffset := 0; - for ALayerIndex := 1 to LayerCount - 1 do - begin - Inc(AOffset, SeparatorWidth); - for ARowIndex := 0 to RowCount[ALayerIndex] - 1 do - OffsetRect(Rows[ALayerIndex, ARowIndex].Bounds, 0, AOffset); - end; - Inc(FBounds.Bottom, AOffset); - end; -end; - -procedure TcxExportCard.AdjustLayersWidthToWidth; -var - ALayer, ARowIndex, ALeft: Integer; - AWidths: array of Integer; -begin - SetLength(AWidths, LayerCount); - for ALayer := 0 to LayerCount - 1 do - for ARowIndex := 0 to RowCount[ALayer] - 1 do - AWidths[ALayer] := Max(AWidths[ALayer], Rows[ALayer, ARowIndex].Width); - CalculateCardRowWidths(AWidths, (Bounds.Right - Bounds.Left) - BorderWidth * 2); - ALeft := Bounds.Left + BorderWidth; - for ALayer := 0 to LayerCount - 1 do - begin - if HasSeparators and (ALayer > 0) then - begin - Inc(ALeft, SeparatorWidth); - Dec(AWidths[ALayer], SeparatorWidth); - end; - for ARowIndex := 0 to RowCount[ALayer] - 1 do - with Rows[ALayer, ARowIndex] do - Bounds := cxRectSetLeft(Bounds, ALeft, AWidths[ALayer]); - Inc(ALeft, AWidths[ALayer]); - end; -end; - -function TcxExportCard.AdjustRowsHeightInLayer( - ALayer, ATop: Integer): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to RowCount[ALayer] - 1 do - Result := Max(Rows[ALayer, I].Height, Result); - for I := 0 to RowCount[ALayer] - 1 do - with Rows[ALayer, I].Bounds do - begin - Top := ATop; - Bottom := Top + Result; - end; -end; - -procedure TcxExportCard.AdjustRowsWidthToWidth(ALayer: Integer); -var - I, ALeft, AWidth: Integer; - AWidths: array of Integer; -begin - AWidth := Bounds.Right - Bounds.Left - BorderWidth * 2; - if RowCount[ALayer] = 1 then - begin - Rows[ALayer, 0].Bounds.Left := Bounds.Left + BorderWidth; - Rows[ALayer, 0].Width := AWidth - end - else - begin - SetLength(AWidths, RowCount[ALayer]); - for I := 0 to RowCount[ALayer] - 1 do - AWidths[I] := Rows[ALayer, I].Width; - CalculateCardRowWidths(AWidths, AWidth); - ALeft := Bounds.Left + BorderWidth; - for I := 0 to RowCount[ALayer] - 1 do - with Rows[ALayer, I] do - begin - Bounds.Left := ALeft; - Inc(ALeft, AWidths[I]); - Bounds.Right := ALeft; - end; - end; -end; - -procedure TcxExportCard.CheckCategorySeparators(AHorizontalLayout: Boolean); -var - ARow: TcxExportCardRow; - ALayerIndex, ARowIndex, ACountRowsInLayer: Integer; -begin - if Owner.OptionsView.CategorySeparatorWidth = 0 then Exit; - for ALayerIndex := 1 to LayerCount - 1 do - begin - ACountRowsInLayer := RowCount[ALayerIndex]; - for ARowIndex := 0 to ACountRowsInLayer - 1 do - begin - ARow := Rows[ALayerIndex, ARowIndex]; - ARow.FHasSeparator := ARow.Row.Kind = rkCategory; - if ARow.FHasSeparator then - begin - if Owner.IsHorizontalRows then - ARow.FHasSeparator := ACountRowsInLayer = 1 - else - ARow.FHasSeparator := ARowIndex > 0 - end; - if ARow.HasSeparator then - Inc(ARow.Bounds.Bottom, SeparatorWidth); - end; - end; -end; - -function TcxExportCard.GetBorderWidth: Integer; -begin - Result := Owner.OptionsView.CardBorderWidth; -end; - -function TcxExportCard.GetHasSeparators: Boolean; -begin - Result := not Owner.IsSimpleLayout and (LayerCount > 1) and (SeparatorWidth > 0); -end; - -function TcxExportCard.GetLayer(AIndex: Integer): TList; -begin - Result := TList(LayersList[AIndex]) -end; - -function TcxExportCard.GetLayerCount: Integer; -begin - Result := LayersList.Count; -end; - -function TcxExportCard.GetLayerSeparator(AIndex: Integer): TRect; -begin - if Owner.IsHorizontalRows then - begin - Result := cxRectSetTop(Bounds, Rows[AIndex, 0].Bounds.Bottom, SeparatorWidth); - InflateRect(Result, -BorderWidth, 0); - end - else - begin - Result := cxRectSetLeft(Bounds, Rows[AIndex, 0].Bounds.Right, SeparatorWidth); - InflateRect(Result, 0, -BorderWidth); - end; -end; - -function TcxExportCard.GetRow(ALayerIndex, ARowIndex: Integer): TcxExportCardRow; -begin - Result := TcxExportCardRow(Layers[ALayerIndex][ARowIndex]); -end; - -function TcxExportCard.GetRowCount(ALayerIndex: Integer): Integer; -begin - Result := Layers[ALayerIndex].Count; -end; - -function TcxExportCard.GetSeparatorWidth: Integer; -begin - Result := Owner.OptionsView.LayerSeparatorWidth; -end; - -procedure TcxExportCard.SetBounds(const ABounds: TRect); -var - AOffset: TPoint; - ALayerIndex, ARowIndex: Integer; -begin - FBounds := ABounds; - AOffset := Point(ABounds.Left - FBounds.Left, ABounds.Top - FBounds.Top); - for ALayerIndex := 0 to LayerCount - 1 do - for ARowIndex := 0 to RowCount[ALayerIndex] - 1 do - OffsetRect(Rows[ALayerIndex, ARowIndex].Bounds, AOffset.X, AOffset.Y); -end; - -{ TcxExportCardLayoutBuilder } - -constructor TcxExportCardLayoutBuilder.Create(AOwner: TcxGridCardViewExport); -begin - FRowsList := TList.Create; - FOwner := AOwner; -end; - -destructor TcxExportCardLayoutBuilder.Destroy; -begin - FreeAndNil(FRowsList); - inherited Destroy; -end; - -procedure TcxExportCardLayoutBuilder.BuildLayout( - ACard: TcxGridCard; AExportCard: TcxExportCard); -var - ALayerIndex, ARowIndex, ATop: Integer; -begin - FExportCard := AExportCard; - ACard.GetVisibleRows(RowsList); - ATop := AExportCard.Bounds.Top + AExportCard.BorderWidth; - SplitRowsToLayers; - if Owner.IsHorizontalRows then - begin - for ALayerIndex := 0 to ExportCard.LayerCount - 1 do - begin - ExportCard.AdjustRowsWidthToWidth(ALayerIndex); - Inc(ATop, ExportCard.AdjustRowsHeightInLayer(ALayerIndex, ATop)); - AExportCard.FBounds.Bottom := ATop + AExportCard.BorderWidth; - end; - ExportCard.AddLayerSeparators; - end - else - begin - ExportCard.AdjustLayersWidthToWidth(); - for ALayerIndex := 0 to ExportCard.LayerCount - 1 do - begin - ATop := ExportCard.Bounds.Top + ExportCard.BorderWidth; - for ARowIndex := 0 to ExportCard.RowCount[ALayerIndex] - 1 do - with ExportCard.Rows[ALayerIndex, ARowIndex] do - begin - Bounds := cxRectSetTop(Bounds, ATop); - ATop := Bounds.Bottom; - end; - ExportCard.FBounds.Bottom := Max(ExportCard.FBounds.Bottom, ATop + ExportCard.BorderWidth); - end; - end; -end; - -function TcxExportCardLayoutBuilder.GetLayerIndex(ARow: TcxGridCardViewRow): Integer; -begin - if Owner.IsHorizontalRows then - Result := ARow.Position.RowIndex - else - Result := ARow.Position.ColIndex; -end; - -procedure TcxExportCardLayoutBuilder.SplitRowsToLayers; -var - ARow: TcxGridCardViewRow; - I, ACurrentLayerIndex: Integer; -begin - ACurrentLayerIndex := -1; - for I := 0 to RowsList.Count - 1 do - begin - ARow := TcxGridCardViewRow(RowsList[I]); - if GetLayerIndex(ARow) <> ACurrentLayerIndex then - begin - ACurrentLayerIndex := GetLayerIndex(ARow); - ExportCard.AddLayer(); - end; - ExportCard.AddRow(ExportCard.LayerCount - 1, ARow); - end; - ExportCard.CheckCategorySeparators(Owner.IsHorizontalRows); -end; - -{ TcxGridCardViewExport } - -procedure TcxGridCardViewExport.AddCardSeparator(APosition: Integer); -begin - if LayoutDirection = ldHorizontal then - Columns.AddPairs(APosition, APosition + OptionsView.SeparatorWidth) - else - Rows.AddPairs(APosition, APosition + OptionsView.SeparatorWidth); - FCardSeparators.AddPairs(APosition, APosition + OptionsView.SeparatorWidth); -end; - -function TcxGridCardViewExport.AddExportCard( - AColumnPosition, ARowPosition: Integer; ACard: TcxGridCard): TcxExportCard; -begin - Result := TcxExportCard.Create(Self, ACard); - Result.Bounds := cxRectBounds(AColumnPosition, ARowPosition, CardWidth, 0); - LayoutBuilder.BuildLayout(ACard, Result); - FExportCardsList.Add(Result); -end; - -procedure TcxGridCardViewExport.AdjustRowCaptionWidth; -var - I: Integer; - AWidths: TcxExportIntList; - AAutoWidth: Boolean; -begin - AWidths := TcxExportIntList.Create; - try - AAutoWidth := (GridView.OptionsView.CaptionWidth = 0); - if AAutoWidth then - begin - for I := 0 to CardCount - 1 do - ExportCards[I].CalculateLayersCaptionWidth(AWidths, IsHorizontalRows); - end - else - begin - for I := 0 to CardCount - 1 do - AWidths.Count := Max(AWidths.Count, ExportCards[I].LayerCount); - for I := 0 to AWidths.Count - 1 do - AWidths[I] := GridView.OptionsView.CaptionWidth; - end; - for I := 0 to CardCount - 1 do - ExportCards[I].SetLayersCaptionWidth(AWidths, AAutoWidth); - finally - AWidths.Free; - end; -end; - -procedure TcxGridCardViewExport.CalculateVisibleInfo; -begin - FCardSeparators := TcxExportScale.Create; - FExportCardsList := TcxObjectList.Create; - FLayoutBuilder := CreateCardLayoutBuilder; - RowCardCount := 1; - ColumnCardCount := 1; - with GridView.ViewInfo do - try - if LayoutDirection = ldVertical then - ColumnCardCount := Min(CardCount, Max(1, (Bounds.Right - Bounds.Left) div CardWidth)) - else - RowCardCount := Min(CardCount, Max(1, (Bounds.Bottom - Bounds.Top) div CardHeight)); - - except - on EDivByZero do; - end; - if LayoutDirection = ldHorizontal then - ColumnCardCount := Ceil(CardCount / RowCardCount) - else - RowCardCount := Ceil(CardCount / ColumnCardCount) -end; - -function TcxGridCardViewExport.CreateCardLayoutBuilder: TcxExportCardLayoutBuilder; -begin - Result := TcxExportCardLayoutBuilder.Create(Self); -end; - -procedure TcxGridCardViewExport.CreateExportCells; -var - AIndex, AColumnPosition, ARowPosition, ARowHeight, ACount: Integer; -begin - CalculateVisibleInfo; - ACount := CardCount; - AColumnPosition := CardIndent; - ARowPosition := CardIndent; - ARowHeight := 0; - for AIndex := 0 to ACount - 1 do - begin - ARowHeight := Max(ARowHeight, - cxRectHeight(AddExportCard(AColumnPosition, ARowPosition, Cards[AIndex]).Bounds)); - if LayoutDirection = ldHorizontal then - begin - Inc(ARowPosition, ARowHeight + InterCardVertSpace); - if (AIndex + 1) mod RowCardCount = 0 then - begin - AddCardSeparator(AColumnPosition + CardWidth + CardIndent); - Inc(AColumnPosition, CardWidth + InterCardHorzSpace); - ARowPosition := CardIndent; - end; - end - else - begin - Inc(AColumnPosition, CardWidth + InterCardHorzSpace); - if (AIndex + 1) mod ColumnCardCount = 0 then - begin - AddCardSeparator(AColumnPosition + ARowHeight + CardIndent); - Inc(ARowPosition, ARowHeight + InterCardVertSpace); - AColumnPosition := CardIndent; - end; - end; - end; - AdjustRowCaptionWidth; - if KeepRowsSameHeight then - SetRowSameHeight; - for AIndex := 0 to ACount - 1 do - ExportCards[AIndex].AddToScales(Columns, Rows); - Columns.Arrange; - Columns.Add(Columns.Last + CardIndent); - Rows.Arrange; - Rows.Add(Rows.Last + CardIndent); -end; - -procedure TcxGridCardViewExport.ExportCardRow(ACard: TcxExportCard; - ARow: TcxExportCardRow; const ACardLogicalBounds: TRect); -var - ARowLogicalBounds: TRect; -begin - RealBoundsToLogicalBoundsEx(ARow.Bounds, ACardLogicalBounds, ARowLogicalBounds); - if ARow.HasIndent then - SetRealCellStyle(ARow.IndentBounds, ARowLogicalBounds, ARow.IndentStyleIndex); - if ARow.HasSeparator then - SetRealCellStyle(ARow.SeparatorBounds, ARowLogicalBounds, CategorySeparatorStyleIndex); - if ARow.ShowCaption then - SetRealCellStyleAndValue(ARow.CaptionBounds, ARowLogicalBounds, ARow.CaptionStyleIndex, ARow.VisibleCaption); - if ARow.Row.Options.ShowData then - SetRealCellStyleAndValueEx(ARow.DataBounds, ARowLogicalBounds, ARow.DataStyleIndex, ACard.Card, ARow.Row); -end; - -procedure TcxGridCardViewExport.ExportCells; -var - ACard: TcxExportCard; - ALogicalBounds: TRect; - AParams: TcxViewParams; - I, ALayerIndex, ARowIndex: Integer; -begin - inherited ExportCells; - for I := 0 to CardCount - 1 do - begin - ACard := ExportCards[I]; - RealBoundsToLogicalBounds(ACard.Bounds, ALogicalBounds); - FillArea(ALogicalBounds, CardBorderStyle); - RealBoundsToLogicalBounds(cxRectInflate(ACard.Bounds, - -CardBorderWidth, -CardBorderWidth), ALogicalBounds); - GridView.Styles.GetContentParams(ACard.Card, nil, AParams); - FillArea(ALogicalBounds, RegisterViewParams(AParams)); - for ALayerIndex := 0 to ACard.LayerCount - 1 do - begin - for ARowIndex := 0 to ACard.RowCount[ALayerIndex] - 1 do - ExportCardRow(ACard, ACard.Rows[ALayerIndex, ARowIndex], ALogicalBounds); - if ACard.HasSeparators and (ALayerIndex < (ACard.LayerCount - 1)) then - SetRealCellStyle(ACard.LayerSeparators[ALayerIndex], - ALogicalBounds, LayerSeparatorStyleIndex); - end; - end; - for I := 0 to CardSeparatorCount - 1 do - FillArea(CardSeparators[I], CardSeparatorStyleIndex); -end; - -procedure TcxGridCardViewExport.Finalize; -begin - FreeAndNil(FCardSeparators); - FreeAndNil(FLayoutBuilder); - FreeAndNil(FExportCardsList); - inherited Finalize; -end; - -procedure TcxGridCardViewExport.RegisterStyles; -begin - inherited RegisterStyles; - FCardSeparatorStyleIndex := RegisterSolidStyleEx(OptionsView.SeparatorColor); - FCategorySeparatorStyleIndex := RegisterSolidStyle(vsCategorySeparator); - FLayerSeparatorStyleIndex := RegisterSolidStyle(vsLayerSeparator); - FCardBorderStyle := RegisterSolidStyle(vsCardBorder); -end; - -procedure TcxGridCardViewExport.SetRowSameHeight; -begin -end; - -function TcxGridCardViewExport.GetCard(AIndex: Integer): TcxGridCard; -begin - Result := Records[AIndex] as TcxGridCard; -end; - -function TcxGridCardViewExport.GetCardBorderWidth: Integer; -begin - Result := OptionsView.CardBorderWidth; -end; - -function TcxGridCardViewExport.GetCardCount: Integer; -begin - Result := RecordCount; -end; - -function TcxGridCardViewExport.GetCardHeight: Integer; -begin - Result := GridView.ViewInfo.RecordsViewInfo.RowHeight; -end; - -function TcxGridCardViewExport.GetCardIndent: Integer; -begin - Result := OptionsView.CardIndent; -end; - -function TcxGridCardViewExport.GetCardSeparatorCount: Integer; -begin - Result := FCardSeparators.Count div 2; -end; - -function TcxGridCardViewExport.GetCardSeparator(AIndex: Integer): TRect; -var - AIndex1, AIndex2: Integer; -begin - if LayoutDirection = ldHorizontal then - begin - Columns.GetPosition(FCardSeparators[AIndex * 2], - FCardSeparators[AIndex * 2 + 1], AIndex1, AIndex2); - Result := Rect(AIndex1, 1, AIndex2, Rows.Count - 1); - end - else - begin - Rows.GetPosition(FCardSeparators[AIndex * 2], - FCardSeparators[AIndex * 2 + 1], AIndex1, AIndex2); - Result := Rect(1, AIndex1, Columns.Count - 1, AIndex2); - end; -end; - -function TcxGridCardViewExport.GetCardWidth: Integer; -var - R: TRect; -begin - Result := OptionsView.CardWidth; - if OptionsView.CardAutoWidth then - begin - R := GridView.ViewInfo.Bounds; - Result := Max(1, (R.Right - R.Left) div (Result + InterCardHorzSpace)); - Result := (R.Right - R.Left) div Result; - end; -end; - -function TcxGridCardViewExport.GetCategoryIndent: Integer; -begin - Result := OptionsView.CategoryIndent; -end; - -function TcxGridCardViewExport.GetCategorySeparatorWidth: Integer; -begin - Result := GridView.OptionsView.CategorySeparatorWidth; -end; - -function TcxGridCardViewExport.GetExportCard(AIndex: Integer): TcxExportCard; -begin - Result := ExportCardsList[AIndex] as TcxExportCard; -end; - -function TcxGridCardViewExport.GetGridView: TcxGridCardView; -begin - Result := TcxGridCardView(inherited GridView); -end; - -function TcxGridCardViewExport.GetInterCardHorzSpace: Integer; -begin - Result := CardIndent * 2; - if LayoutDirection = ldHorizontal then - Inc(Result, OptionsView.SeparatorWidth); -end; - -function TcxGridCardViewExport.GetInterCardVertSpace: Integer; -begin - Result := CardIndent * 2; - if LayoutDirection = ldVertical then - Inc(Result, OptionsView.SeparatorWidth); -end; - -function TcxGridCardViewExport.GetIsHorizontalRows: Boolean; -begin - Result := GridView.RowLayout = rlHorizontal; -end; - -function TcxGridCardViewExport.GetIsSimpleLayout: Boolean; -begin - Result := GridView.RowLayoutController.IsSimpleLayout or - (LayerSeparatorWidth = 0); -end; - -function TcxGridCardViewExport.GetLayerSeparatorWidth: Integer; -begin - Result := GridView.OptionsView.LayerSeparatorWidth; -end; - -function TcxGridCardViewExport.GetLayoutDirection: TcxGridCardViewLayoutDirection; -begin - Result := GridView.LayoutDirection; -end; - -function TcxGridCardViewExport.GetOptionsView: TcxGridCardViewOptionsView; -begin - Result := GridView.OptionsView; -end; - -{ TcxGridChartViewExport } - -procedure TcxGridChartViewExport.CreateExportCache; -begin - if Provider.SupportGraphic then - ExportAsGraphic - else - ExportAsData; -end; - -procedure TcxGridChartViewExport.ExportAsGraphic; -var - AGraphic: TGraphic; -begin - Provider.SetRange(1, 1, False); - if SupportGraphic(cxExportGraphicClass) then - AGraphic := GridView.CreateImage(cxExportGraphicClass) - else - AGraphic := GridView.CreateImage(TBitmap); - try - Provider.SetCellDataGraphic(0, 0, AGraphic); - finally - AGraphic.Free; - end; -end; - -procedure TcxGridChartViewExport.ExportAsData; -var - AColCount, ARowCount, C, R: Integer; - ASeries: TcxGridChartSeries; - AHeaderStyle, AStyle: TcxCacheCellStyle; -begin - AStyle := DefaultCellStyle; - for C := 0 to 3 do - with AStyle.Borders[C] do - begin - IsDefault := False; - Width := 1; - Color := clBlack; - end; - AHeaderStyle := AStyle; - AHeaderStyle.BrushStyle := cbsSolid; - AHeaderStyle.BrushBkColor := cxColorToRGB(clBtnFace); - Provider.SetDefaultStyle(DefaultCellStyle); - AColCount := Max(GridView.VisibleSeriesCount + 1, 1); - ARowCount := GridView.ViewData.VisibleCategoryCount + 1; - Provider.SetRange(AColCount, ARowCount, False); - for C := 0 to AColCount - 1 do - begin - if C = 0 then - begin - Provider.SetCellDataWideString(C, 0, 'Category'); - for R := 0 to GridView.ViewData.VisibleCategoryCount - 1 do - SetCellValueAndStyle(C, R + 1, GridView.ViewData.VisibleCategories[R], AStyle); - end - else - begin - ASeries := GridView.VisibleSeries[C - 1]; - Provider.SetCellDataWideString(C, 0, ASeries.GetDisplayText); - for R := 0 to ASeries.VisibleValueCount - 1 do - SetCellValueAndStyle(C, R + 1, ASeries.VisibleValues[R], AStyle); - end; - Provider.SetCellStyle(C, 0, AHeaderStyle); - end; -end; - -function TcxGridChartViewExport.GetGridView: TcxGridChartView; -begin - Result := TcxGridChartView(FGridView); -end; - -// *** - -procedure ExportGridToHTML(const AFileName: string; AGrid: TcxGrid; - AExpand: Boolean; ASaveAll: Boolean; const AFileExt: string); -begin - ExportGridToFile(AFileName, cxExportToHtml, AGrid, AExpand, ASaveAll, False, '', '', '', AFileExt); -end; - -procedure ExportGridToXML(const AFileName: string; AGrid: TcxGrid; - AExpand: Boolean; ASaveAll: Boolean; const AFileExt: string); -begin - ExportGridToFile(AFileName, cxExportToXml, AGrid, AExpand, ASaveAll, False, '', '', '', AFileExt); -end; - -procedure ExportGridToExcel(const AFileName: string; AGrid: TcxGrid; - AExpand: Boolean; ASaveAll: Boolean; AUseNativeFormat: Boolean; const AFileExt: string); -begin - ExportGridToFile(AFileName, cxExportToExcel, AGrid, AExpand, ASaveAll, AUseNativeFormat, '', '', '', AFileExt); -end; - -procedure ExportGridToText(const AFileName: string; AGrid: TcxGrid; - AExpand: Boolean; ASaveAll: Boolean; const ASeparator: string; - const ABeginString: string; const AEndString: string; const AFileExt: string); -begin - ExportGridToFile(AFileName, cxExportToText, AGrid, AExpand, ASaveAll, False, - ASeparator, ABeginString, AEndString, AFileExt); -end; - -initialization - cxExportInit(TcxGetResourceStringProc(@cxGetResourceString), @ColorToRGB, True ); - -end. - - diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridFilterHelpers.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridFilterHelpers.pas deleted file mode 100644 index c8cd0c5e..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridFilterHelpers.pas +++ /dev/null @@ -1,108 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridFilterHelpers; - -{$I cxVer.inc} - -interface - -uses - cxGridCustomTableView, cxDataStorage, cxEdit, cxDropDownEdit, cxFilterControlUtils; - -type - { TcxFilterExtLookupComboBoxHelper } - - TcxFilterExtLookupComboBoxHelper = class(TcxFilterComboBoxHelper) - public - class function GetFilterEditClass: TcxCustomEditClass; override; - class function GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; - AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; override; - class procedure InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); override; - end; - -implementation - -uses - cxDBLookupComboBox, cxDBExtLookupComboBox, cxGridDBDataDefinitions, - cxDBLookupEdit, cxDBData; - -{ TcxFilterExtLookupComboBoxHelper } - -class function TcxFilterExtLookupComboBoxHelper.GetFilterEditClass: TcxCustomEditClass; -begin - Result := TcxLookupComboBox; -end; - -class function TcxFilterExtLookupComboBoxHelper.GetSupportedFilterOperators( - AProperties: TcxCustomEditProperties; AValueTypeClass: TcxValueTypeClass; - AExtendedSet: Boolean = False): TcxFilterControlOperators; -begin - Result := [fcoEqual, fcoNotEqual, fcoBlanks, fcoNonBlanks]; -end; - -class procedure TcxFilterExtLookupComboBoxHelper.InitializeProperties(AProperties, - AEditProperties: TcxCustomEditProperties; AHasButtons: Boolean); -var - AView: TcxCustomGridTableView; -begin - inherited InitializeProperties(AProperties, AEditProperties, AHasButtons); - with TcxLookupComboBoxProperties(AProperties) do - begin - DropDownAutoSize := False; - DropDownListStyle := lsFixedList; - AView := TcxExtLookupComboBoxProperties(AEditProperties).View; - if (AView <> nil) and (TcxExtLookupComboBoxProperties(AEditProperties).ListFieldItem <> nil) then - begin - ListSource := TcxDBDataController(AView.DataController).DataSource; - KeyFieldNames := TcxExtLookupComboBoxProperties(AEditProperties).KeyFieldNames; - ListFieldNames := TcxGridItemDBDataBinding(TcxExtLookupComboBoxProperties(AEditProperties).ListFieldItem.DataBinding).FieldName; - DropDownSizeable := True; - IncrementalFiltering := True; - end; - end; -end; - -initialization - FilterEditsController.Register(TcxExtLookupComboBoxProperties, - TcxFilterExtLookupComboBoxHelper); - -finalization - FilterEditsController.Unregister(TcxExtLookupComboBoxProperties, - TcxFilterExtLookupComboBoxHelper); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridFooterPopupMenuItems.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridFooterPopupMenuItems.pas deleted file mode 100644 index aa2bf29c..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridFooterPopupMenuItems.pas +++ /dev/null @@ -1,198 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridFooterPopupMenuItems; - -{$I cxVer.inc} - -interface - -uses - cxCustomData, cxGridTableView, cxGridMenuOperations; - -type - TcxGridFooterSummaryOperation = class(TcxGridTableColumnMenuOperation) - private - FKind: TcxSummaryKind; - function GetFooterViewInfo: TcxGridFooterViewInfo; - function GetMultipleSummaries: Boolean; - function GetSummaryItems: TcxDataSummaryItems; - procedure SetKind(Value: TcxSummaryKind); - protected - procedure Execute(Sender: TObject); override; - function GetDown: Boolean; override; - function GetEnabled: Boolean; override; - function GetImageResourceName: string; override; - property FooterViewInfo: TcxGridFooterViewInfo read GetFooterViewInfo; - property MultipleSummaries: Boolean read GetMultipleSummaries; - property SummaryItems: TcxDataSummaryItems read GetSummaryItems; - public - property Kind: TcxSummaryKind read FKind write SetKind; - end; - - TcxGridFooterPopupMenuOperations = class(TcxGridPopupMenuOperations) - protected - procedure AddItems; override; - end; - -implementation - -uses - cxDataStorage, cxLookupEdit, cxGridCustomView, - cxGridCustomPopupMenu, cxGridPopupMenu, cxGridPopupMenuConsts; - -{ TcxGridFooterSummaryOperation } - -function TcxGridFooterSummaryOperation.GetFooterViewInfo: TcxGridFooterViewInfo; -begin - if GridPopupMenu.HitTest.ViewInfo is TcxGridFooterCellViewInfo then - Result := TcxGridFooterCellViewInfo(GridPopupMenu.HitTest.ViewInfo).Container - else - if GridPopupMenu.HitTest.ViewInfo is TcxGridFooterViewInfo then - Result := TcxGridFooterViewInfo(GridPopupMenu.HitTest.ViewInfo) - else - Result := nil; -end; - -function TcxGridFooterSummaryOperation.GetMultipleSummaries: Boolean; -begin - Result := FooterViewInfo.CanShowMultipleSummaries; -end; - -function TcxGridFooterSummaryOperation.GetSummaryItems: TcxDataSummaryItems; -begin - Result := FooterViewInfo.SummaryItems; -end; - -procedure TcxGridFooterSummaryOperation.SetKind(Value: TcxSummaryKind); -begin - FKind := Value; - ResCaption := GetSummaryName(Kind); - UpdateImage; -end; - -procedure TcxGridFooterSummaryOperation.Execute(Sender: TObject); -var - ASummaryItems: TcxDataSummaryItems; - ASummaryItem: TcxDataSummaryItem; -begin - ASummaryItems := SummaryItems; - if MultipleSummaries then - if Kind <> skNone then - if Down then - ASummaryItems.GetDataItem(HitColumn.Index, spFooter, True, Kind).Free - else - Params.Add(ASummaryItems.Add(HitColumn, spFooter, Kind)) - else - if not Down then - ASummaryItems.DeleteItems(HitColumn, spFooter) - else - else - begin - ASummaryItems.SetDataItemKind(HitColumn.Index, spFooter, Kind); - ASummaryItem := ASummaryItems.GetDataItem(HitColumn.Index, spFooter, True, Kind); - if ASummaryItem <> nil then Params.Add(ASummaryItem); - end; -end; - -function TcxGridFooterSummaryOperation.GetDown: Boolean; -var - ASummaryItem: TcxDataSummaryItem; -begin - if Kind = skNone then - Result := SummaryItems.GetDataItem(HitColumn.Index, spFooter) = nil - else - if MultipleSummaries then - Result := SummaryItems.GetDataItem(HitColumn.Index, spFooter, True, Kind) <> nil - else - begin - ASummaryItem := SummaryItems.GetDataItem(HitColumn.Index, spFooter); - Result := (ASummaryItem <> nil) and (ASummaryItem.Kind = Kind); - end; -end; - -function TcxGridFooterSummaryOperation.GetEnabled: Boolean; - -{$IFDEF DELPHI6} - function GetFMTBcdVarType: Integer; - begin - Result := TcxFMTBcdValueType.GetVarType; - end; -{$ENDIF} - -const - NumberVarTypes = [varSmallint, varInteger, varSmallint, varSingle, varByte, - varDouble, varCurrency, varDate - {$IFDEF DELPHI6}, varLongWord, varWord, varInt64, varShortInt{$ENDIF}]; - TimeVarTypes = [varDate]; -var - AVarType: Integer; -begin - Result := Kind in [skCount, skNone]; - if Result then Exit; - - Result := not HitColumn.GetProperties.InheritsFrom(TcxCustomLookupEditProperties); - if not Result then Exit; - - Result := HitColumn.DataBinding.ValueTypeClass <> nil; - if not Result then Exit; - - AVarType := HitColumn.DataBinding.ValueTypeClass.GetVarType; - Result := (AVarType in NumberVarTypes){$IFDEF DELPHI6} or (AVarType = GetFMTBcdVarType){$ENDIF}; - if Result and (Kind in [skSum, skAverage]) then - Result := not (AVarType in TimeVarTypes); -end; - -function TcxGridFooterSummaryOperation.GetImageResourceName: string; -begin - Result := GetSummaryImageResourceName(Kind); -end; - -{ TcxGridFooterPopupMenuOperations } - -procedure TcxGridFooterPopupMenuOperations.AddItems; -var - ASummaryKind: TcxSummaryKind; -begin - for ASummaryKind := Low(ASummaryKind) to High(ASummaryKind) do - if ASummaryKind <> skNone then - TcxGridFooterSummaryOperation(AddItem(TcxGridFooterSummaryOperation)).Kind := ASummaryKind; - with TcxGridFooterSummaryOperation(AddItem(TcxGridFooterSummaryOperation)) do - begin - BeginGroup := True; - Kind := skNone; - end; -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridGroupRowPopupMenuItems.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridGroupRowPopupMenuItems.pas deleted file mode 100644 index 07d5dd29..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridGroupRowPopupMenuItems.pas +++ /dev/null @@ -1,183 +0,0 @@ -unit cxGridGroupRowPopupMenuItems; - -{$I cxVer.inc} - -interface - -uses - cxCustomData, cxGridCustomView, cxGridTableView, cxGridMenuOperations; - -type - TcxGridGroupRowPopupMenuOperation = class(TcxGridTablePopupMenuOperation) - private - function GetHitRow: TcxGridGroupRow; - public - property HitRow: TcxGridGroupRow read GetHitRow; - end; - - TcxGridGroupRowSortByGroupValuesOperation = class(TcxGridGroupRowPopupMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetDown: Boolean; override; - public - constructor Create; override; - end; - - TcxGridGroupRowSortBySummaryCaptionOperation = class(TcxGridGroupRowPopupMenuOperation) - public - constructor Create; override; - end; - - TcxGridGroupRowSortBySummaryOperation = class(TcxGridGroupRowPopupMenuOperation) - private - FSummaryItem: TcxDataSummaryItem; - procedure SetSummaryItem(Value: TcxDataSummaryItem); - protected - procedure Execute(Sender: TObject); override; - function GetCaption: string; override; - function GetDown: Boolean; override; - function GetImageResourceName: string; override; - public - constructor Create; override; - property SummaryItem: TcxDataSummaryItem read FSummaryItem write SetSummaryItem; - end; - - TcxGridGroupRowPopupMenuOperations = class(TcxGridPopupMenuOperations) - private - FGroupRow: TcxGridGroupRow; - procedure SetGroupRow(Value: TcxGridGroupRow); - protected - procedure AddItems; override; - public - function CanProcess(AHitTest: TcxCustomGridHitTest): Boolean; override; - property GroupRow: TcxGridGroupRow read FGroupRow write SetGroupRow; - end; - -implementation - -uses - SysUtils, cxClasses, cxGridCustomTableView, cxGridPopupMenuConsts; - -{ TcxGridGroupRowPopupMenuOperation } - -function TcxGridGroupRowPopupMenuOperation.GetHitRow: TcxGridGroupRow; -begin - if (GridPopupMenu.HitTest is TcxGridRecordHitTest) and - (TcxGridRecordHitTest(GridPopupMenu.HitTest).GridRecord is TcxGridGroupRow) then - Result := TcxGridGroupRow(TcxGridRecordHitTest(GridPopupMenu.HitTest).GridRecord) - else - Result := nil; -end; - -{ TcxGridGroupRowSortByGroupValuesOperation } - -constructor TcxGridGroupRowSortByGroupValuesOperation.Create; -begin - inherited; - ResCaption := @cxSGridSortByGroupValues; -end; - -procedure TcxGridGroupRowSortByGroupValuesOperation.Execute(Sender: TObject); -begin - if HitRow.GroupSummaryItems.SortedSummaryItem <> nil then - HitRow.GroupSummaryItems.SortedSummaryItem.Sorted := False; -end; - -function TcxGridGroupRowSortByGroupValuesOperation.GetDown: Boolean; -begin - Result := HitRow.GroupSummaryItems.SortedSummaryItem = nil; -end; - -{ TcxGridGroupRowSortBySummaryCaptionOperation } - -constructor TcxGridGroupRowSortBySummaryCaptionOperation.Create; -begin - inherited; - ResCaption := @cxSGridSortBySummaryCaption; -end; - -{ TcxGridGroupRowSortBySummaryOperation } - -constructor TcxGridGroupRowSortBySummaryOperation.Create; -begin - inherited; - ResCaption := @cxSGridSortBySummary; -end; - -procedure TcxGridGroupRowSortBySummaryOperation.SetSummaryItem(Value: TcxDataSummaryItem); -begin - if FSummaryItem <> Value then - begin - FSummaryItem := Value; - UpdateImage; - end; -end; - -procedure TcxGridGroupRowSortBySummaryOperation.Execute(Sender: TObject); -begin - SummaryItem.Sorted := True; -end; - -function TcxGridGroupRowSortBySummaryOperation.GetCaption: string; -var - AGridSummaryItem: IcxGridSummaryItem; -begin - if Supports(SummaryItem, IcxGridSummaryItem, AGridSummaryItem) then - Result := AGridSummaryItem.DisplayText - else - Result := ''; - if Result = '' then - begin - Result := cxGetResourceString(GetSummaryName(SummaryItem.Kind)); - if SummaryItem.ItemLink <> nil then - Result := Format(inherited GetCaption, - [Result, (SummaryItem.ItemLink as TcxGridColumn).GetAlternateCaption]); - end; - Result := ' ' + Result; -end; - -function TcxGridGroupRowSortBySummaryOperation.GetDown: Boolean; -begin - Result := SummaryItem.Sorted; -end; - -function TcxGridGroupRowSortBySummaryOperation.GetImageResourceName: string; -begin - if SummaryItem <> nil then - Result := GetSummaryImageResourceName(SummaryItem.Kind) - else - Result := inherited GetImageResourceName; -end; - -{ TcxGridGroupRowPopupMenuOperations } - -procedure TcxGridGroupRowPopupMenuOperations.SetGroupRow(Value: TcxGridGroupRow); -begin - FGroupRow := Value; - RecreateItems; -end; - -procedure TcxGridGroupRowPopupMenuOperations.AddItems; -var - ASummaryItems: TcxDataGroupSummaryItems; - I: Integer; - AGridSummaryItem: IcxGridSummaryItem; -begin - if GroupRow = nil then Exit; - ASummaryItems := GroupRow.GroupSummaryItems; - if ASummaryItems.Count = 0 then Exit; - AddItem(TcxGridGroupRowSortByGroupValuesOperation); - AddItem(TcxGridGroupRowSortBySummaryCaptionOperation).BeginGroup := True; - for I := 0 to ASummaryItems.Count - 1 do - if not Supports(ASummaryItems[I], IcxGridSummaryItem, AGridSummaryItem) or - AGridSummaryItem.VisibleForCustomization then - TcxGridGroupRowSortBySummaryOperation(AddItem(TcxGridGroupRowSortBySummaryOperation)).SummaryItem := ASummaryItems[I]; -end; - -function TcxGridGroupRowPopupMenuOperations.CanProcess(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := inherited CanProcess(AHitTest) and (AHitTest is TcxGridRecordHitTest) and - (TcxGridRecordHitTest(AHitTest).GridRecord is TcxGridGroupRow); -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridHeaderPopupMenuItems.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridHeaderPopupMenuItems.pas deleted file mode 100644 index a55806af..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridHeaderPopupMenuItems.pas +++ /dev/null @@ -1,650 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridHeaderPopupMenuItems; - -{$I cxVer.inc} - -interface - -uses - Classes, cxGridMenuOperations; - -type - TcxGridHeaderPopupMenuOperation = class(TcxGridTableColumnMenuOperation); - - TcxGridSortingMenuOperation = class(TcxGridHeaderPopupMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetVisible: Boolean; override; - function IsSorted: Boolean; - end; - - TcxGridSortColumn = class(TcxGridSortingMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetDown: Boolean; override; - function GetEnabled: Boolean; override; - end; - - TcxGridSortColumnAsc = class(TcxGridSortColumn) - protected - function GetImageResourceName: string; override; - public - constructor Create; override; - end; - - TcxGridSortColumnDesc = class(TcxGridSortColumn) - protected - function GetImageResourceName: string; override; - public - constructor Create; override; - end; - - TcxGridClearSorting = class(TcxGridSortingMenuOperation) - protected - function GetEnabled: Boolean; override; - public - constructor Create; override; - end; - - TcxGridGroupByThisField = class(TcxGridHeaderPopupMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetCaption: string; override; - function GetEnabled: Boolean; override; - function GetImageResourceName: string; override; - function GetVisible: Boolean; override; - public - constructor Create; override; - end; - - TcxGridGroupByBox = class(TcxGridHeaderPopupMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetDown: Boolean; override; - function GetImageResourceName: string; override; - function GetVisible: Boolean; override; - public - constructor Create; override; - end; - - TcxGridAlignmentSubMenu = class(TcxGridHeaderPopupMenuOperation) - protected - function GetVisible: Boolean; override; - public - constructor Create; override; - end; - - TcxGridAlign = class(TcxGridHeaderPopupMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetDown: Boolean; Override; - function GetEnabled: Boolean; override; - public - class function GetParentOperationClass: TcxGridPopupMenuOperationClass; override; - end; - - TcxGridAlignLeft = class(TcxGridAlign) - protected - function GetImageResourceName: string; override; - public - constructor Create; override; - end; - - TcxGridAlignRight = class(TcxGridAlign) - protected - function GetImageResourceName: string; override; - public - constructor Create; override; - end; - - TcxGridAlignCenter = class(TcxGridAlign) - protected - function GetImageResourceName: string; override; - public - constructor Create; override; - end; - - TcxGridBestFit = class(TcxGridHeaderPopupMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetEnabled: Boolean; override; - function GetImageResourceName: string; override; - function GetVisible: Boolean; override; - public - constructor Create; override; - end; - - TcxGridBestFitAllColumns = class(TcxGridHeaderPopupMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetVisible: Boolean; override; - public - constructor Create; override; - end; - - TcxGridRemoveColumn = class(TcxGridHeaderPopupMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetVisible: Boolean; override; - public - constructor Create; override; - end; - - TcxGridFieldChooser = class(TcxGridHeaderPopupMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetDown: Boolean; override; - function GetImageResourceName: string; override; - public - constructor Create; override; - end; - - TcxGridShowFooter = class(TcxGridHeaderPopupMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetDown: Boolean; Override; - function GetImageResourceName: string; override; - public - constructor Create; override; - end; - - TcxGridShowGroupFooter = class(TcxGridHeaderPopupMenuOperation) - protected - procedure Execute(Sender: TObject); override; - function GetDown: Boolean; override; - function GetEnabled: Boolean; override; - function GetImageResourceName: string; override; - function GetVisible: Boolean; override; - public - constructor Create; override; - end; - - TcxGridHeaderPopupMenuOperations = class(TcxGridPopupMenuOperations) - protected - procedure AddItems; override; - end; - -implementation - -uses - cxCustomData, cxEdit, cxGridCustomTableView, cxGridTableView, cxGridPopupMenuConsts; - -const - AImageName = 'HdrImg'; - -{ TcxGridSortingMenuOperation } - -procedure TcxGridSortingMenuOperation.Execute(Sender: TObject); -begin - if IsSorted then - HitGridView.DataController.ClearSorting(True); -end; - -function TcxGridSortingMenuOperation.GetVisible: Boolean; -begin - Result := HitGridView.OptionsCustomize.ColumnSorting; -end; - -function TcxGridSortingMenuOperation.IsSorted: Boolean; -var - I: Integer; -begin - Result := False; - with HitGridView do - if SortedItemCount > 0 then - for I := 0 to SortedItemCount - 1 do - if TcxCustomGridTableItemAccess.GetGroupIndex(SortedItems[I]) = -1 then - begin - Result := True; - Break; - end; -end; - -{ TcxGridSortColumn } - -procedure TcxGridSortColumn.Execute(Sender: TObject); -var - ASortOrder: TcxDataSortOrder; -begin - HitGridView.BeginUpdate; - try - inherited; - case Tag of - 0: ASortOrder := soAscending; - 1: ASortOrder := soDescending; - else - ASortOrder := soNone; - end; - HitColumn.SortOrder := ASortOrder; - finally - HitGridView.EndUpdate; - end; -end; - -function TcxGridSortColumn.GetDown: Boolean; -begin - if Tag = 0 then - Result := HitColumn.SortOrder = soAscending - else - Result := HitColumn.SortOrder = soDescending; -end; - -function TcxGridSortColumn.GetEnabled: Boolean; -begin - Result := TcxCustomGridTableItemAccess.CanSort(HitColumn); -end; - -{ TcxGridSortColumnAsc } - -constructor TcxGridSortColumnAsc.Create; -begin - inherited; - ResCaption := @cxSGridSortColumnAsc; - Tag := 0; -end; - -function TcxGridSortColumnAsc.GetImageResourceName: string; -begin - Result := AImageName + '1'; -end; - -{ TcxGridSortColumnDesc } - -constructor TcxGridSortColumnDesc.Create; -begin - inherited; - ResCaption := @cxSGridSortColumnDesc; - Tag := 1; -end; - -function TcxGridSortColumnDesc.GetImageResourceName: string; -begin - Result := AImageName + '2'; -end; - -{ TcxGridClearSorting } - -constructor TcxGridClearSorting.Create; -begin - inherited; - ResCaption := @cxSGridClearSorting; -end; - -function TcxGridClearSorting.GetEnabled: Boolean; -begin - Result := IsSorted; -end; - -{ TcxGridGroupBy } - -constructor TcxGridGroupByThisField.Create; -begin - inherited; - ResCaption := @cxSGridGroupByThisField; -end; - -procedure TcxGridGroupByThisField.Execute(Sender: TObject); -var - AGroupIndex: Integer; -begin - HitGridView.BeginUpdate; - try - HitGridView.OptionsView.GroupByBox := True; - if HitColumn.GroupIndex <> -1 then - AGroupIndex := -1 - else - AGroupIndex := HitGridView.GroupedColumnCount; - HitColumn.GroupBy(AGroupIndex); - finally - HitGridView.EndUpdate; - end; - TcxGridTableViewAccess.DoColumnPosChanged(HitGridView, HitColumn); -end; - -function TcxGridGroupByThisField.GetCaption: string; -begin - if HitColumn.GroupIndex <> -1 then - ResCaption := @cxSGridRemoveThisGroupItem - else - ResCaption := @cxSGridGroupByThisField; - Result := inherited GetCaption; -end; - -function TcxGridGroupByThisField.GetEnabled: Boolean; -begin - Result := TcxCustomGridTableItemAccess.CanGroup(HitColumn); -end; - -function TcxGridGroupByThisField.GetImageResourceName: string; -begin - Result := AImageName + '3'; -end; - -function TcxGridGroupByThisField.GetVisible: Boolean; -begin - Result := HitGridView.OptionsCustomize.ColumnGrouping; -end; - -{ TcxGridGroupByBox } - -constructor TcxGridGroupByBox.Create; -begin - inherited; - ResCaption := @cxSGridGroupByBox; -end; - -procedure TcxGridGroupByBox.Execute(Sender: TObject); -begin - GridOperationHelper.DoShowGroupingPanel(not GridOperationHelper.IsGroupingPanelShowing); -end; - -function TcxGridGroupByBox.GetDown: Boolean; -begin - Result := GridOperationHelper.IsGroupingPanelShowing; -end; - -function TcxGridGroupByBox.GetImageResourceName: string; -begin - Result := AImageName + '7'; -end; - -function TcxGridGroupByBox.GetVisible: Boolean; -begin - Result := HitGridView.OptionsCustomize.ColumnGrouping; -end; - -{ TcxGridAligmentSubMenu } - -constructor TcxGridAlignmentSubMenu.Create; -begin - inherited; - ResCaption := @cxSGridAlignmentSubMenu; -end; - -function TcxGridAlignmentSubMenu.GetVisible: Boolean; -begin - Result := HitColumn.Properties <> nil; -end; - -{ TcxGridAlignLeft } - -procedure TcxGridAlign.Execute(Sender: TObject); -begin - case Tag of - 0: HitColumn.GetProperties.Alignment.Horz := taLeftJustify; - 1: HitColumn.GetProperties.Alignment.Horz := taRightJustify; - 2: HitColumn.GetProperties.Alignment.Horz := taCenter; - end; -end; - -function TcxGridAlign.GetDown: Boolean; -var - AProperties: TcxCustomEditProperties; -begin - AProperties := HitColumn.GetProperties; - case Tag of - 0: Result := AProperties.Alignment.Horz = taLeftJustify; - 1: Result := AProperties.Alignment.Horz = taRightJustify; - else - Result := AProperties.Alignment.Horz = taCenter; - end; -end; - -function TcxGridAlign.GetEnabled: Boolean; -begin - Result := esoHorzAlignment in HitColumn.GetProperties.GetSupportedOperations; -end; - -class function TcxGridAlign.GetParentOperationClass: TcxGridPopupMenuOperationClass; -begin - Result := TcxGridAlignmentSubMenu; -end; - -{ TcxGridAlignLeft } - -constructor TcxGridAlignLeft.Create; -begin - inherited; - ResCaption := @cxSGridAlignLeft; - Tag := 0; -end; - -function TcxGridAlignLeft.GetImageResourceName: string; -begin - Result := AImageName + '4'; -end; - -{ TcxGridAlignRight } - -constructor TcxGridAlignRight.Create; -begin - inherited; - ResCaption := @cxSGridAlignRight; - Tag := 1; -end; - -function TcxGridAlignRight.GetImageResourceName: string; -begin - Result := AImageName + '5'; -end; - -{ TcxGridAlignCenter } - -constructor TcxGridAlignCenter.Create; -begin - inherited; - ResCaption := @cxSGridAlignCenter; - Tag := 2; -end; - -function TcxGridAlignCenter.GetImageResourceName: string; -begin - Result := AImageName + '6'; -end; - -{ TcxGridBestFit } - -constructor TcxGridBestFit.Create; -begin - inherited; - ResCaption := @cxSGridBestFit; -end; - -procedure TcxGridBestFit.Execute(Sender: TObject); -begin - HitColumn.ApplyBestFit(True, True); -end; - -function TcxGridBestFit.GetEnabled: Boolean; -begin - Result := TcxCustomGridTableItemAccess.CanHorzSize(HitColumn); -end; - -function TcxGridBestFit.GetImageResourceName: string; -begin - Result := AImageName + '9'; -end; - -function TcxGridBestFit.GetVisible: Boolean; -begin - Result := HitGridView.OptionsCustomize.ColumnHorzSizing; -end; - -{ TcxGridBestFitAllColumns } - -constructor TcxGridBestFitAllColumns.Create; -begin - inherited; - ResCaption := @cxSGridBestFitAllColumns; -end; - -procedure TcxGridBestFitAllColumns.Execute(Sender: TObject); -begin - TcxCustomGridTableView(HitGridView).ApplyBestFit(nil, True, True); -end; - -function TcxGridBestFitAllColumns.GetVisible: Boolean; -begin - Result := HitGridView.OptionsCustomize.ColumnHorzSizing; -end; - -{ TcxGridCustColumns } - -constructor TcxGridRemoveColumn.Create; -begin - inherited; - ResCaption := @cxSGridRemoveColumn; -end; - -procedure TcxGridRemoveColumn.Execute(Sender: TObject); -begin - HitColumn.Visible := False; - TcxGridTableViewAccess.DoColumnPosChanged(HitGridView, HitColumn); -end; - -function TcxGridRemoveColumn.GetVisible: Boolean; -begin - Result := HitColumn.VisibleForCustomization and TcxCustomGridTableItemAccess.CanHide(HitColumn); -end; - -{ TcxGridFieldChoozer } - -constructor TcxGridFieldChooser.Create; -begin - inherited; - ResCaption := @cxSGridFieldChooser; -end; - -procedure TcxGridFieldChooser.Execute(Sender: TObject); -begin - GridOperationHelper.DoShowColumnCustomizing( - not GridOperationHelper.IsColumnsCustomizingShowing); -end; - -function TcxGridFieldChooser.GetDown: Boolean; -begin - Result := GridOperationHelper.IsColumnsCustomizingShowing; -end; - -function TcxGridFieldChooser.GetImageResourceName: string; -begin - Result := AImageName + '8'; -end; - -{ TcxGridShowFooter } - -constructor TcxGridShowFooter.Create; -begin - inherited; - ResCaption := @cxSGridShowFooter; -end; - -procedure TcxGridShowFooter.Execute(Sender: TObject); -begin - GridOperationHelper.DoShowSummaryFooter( - not GridOperationHelper.IsSummaryFooterShowing); -end; - -function TcxGridShowFooter.GetDown: Boolean; -begin - Result := GridOperationHelper.IsSummaryFooterShowing; -end; - -function TcxGridShowFooter.GetImageResourceName: string; -begin - Result := AImageName + '10'; -end; - -{ TcxGridShowGroupFooter } - -constructor TcxGridShowGroupFooter.Create; -begin - inherited; - ResCaption := @cxSGridShowGroupFooter; -end; - -procedure TcxGridShowGroupFooter.Execute(Sender: TObject); -begin - with HitGridView.OptionsView do - if GroupFooters = gfInvisible then - GroupFooters := PrevGroupFooters - else - GroupFooters := gfInvisible; -end; - -function TcxGridShowGroupFooter.GetDown: Boolean; -begin - Result := HitGridView.OptionsView.GroupFooters <> gfInvisible; -end; - -function TcxGridShowGroupFooter.GetEnabled: Boolean; -begin - Result := HitGridView.GroupedColumnCount <> 0; -end; - -function TcxGridShowGroupFooter.GetImageResourceName: string; -begin - Result := AImageName + '11'; -end; - -function TcxGridShowGroupFooter.GetVisible: Boolean; -begin - with HitGridView do - Result := (GroupedColumnCount <> 0) or OptionsCustomize.ColumnGrouping; -end; - -{ TcxGridHeaderPopupMenuOperations } - -procedure TcxGridHeaderPopupMenuOperations.AddItems; -begin - AddItem(TcxGridSortColumnAsc); - AddItem(TcxGridSortColumnDesc); - AddItem(TcxGridClearSorting); - AddItem(TcxGridGroupByThisField).BeginGroup := True; - AddItem(TcxGridGroupByBox); - AddItem(TcxGridShowFooter).BeginGroup := True; - AddItem(TcxGridShowGroupFooter); - AddItem(TcxGridRemoveColumn).BeginGroup := True; - AddItem(TcxGridFieldChooser); - AddItem(TcxGridAlignmentSubMenu).BeginGroup := True; - AddItem(TcxGridAlignLeft); - AddItem(TcxGridAlignRight); - AddItem(TcxGridAlignCenter); - AddItem(TcxGridBestFit); - AddItem(TcxGridBestFitAllColumns).BeginGroup := True; -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridImportDialog.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridImportDialog.dfm deleted file mode 100644 index 3e08ec17..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridImportDialog.dfm +++ /dev/null @@ -1,237 +0,0 @@ -object ImportDialog: TImportDialog - Left = 0 - Top = 0 - BorderStyle = bsDialog - Caption = 'Import' - ClientHeight = 368 - ClientWidth = 694 - Color = clBtnFace - ParentFont = True - KeyPreview = True - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - OnDestroy = FormDestroy - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object Panel1: TPanel - Left = 237 - Top = 0 - Width = 80 - Height = 368 - Align = alLeft - BevelOuter = bvNone - TabOrder = 1 - object btnImport: TcxButton - Left = 0 - Top = 8 - Width = 80 - Height = 24 - Caption = 'Import ->' - Enabled = False - TabOrder = 0 - OnClick = btnImportClick - end - object btnClose: TcxButton - Left = 0 - Top = 40 - Width = 80 - Height = 24 - Cancel = True - Caption = 'Close' - TabOrder = 1 - OnClick = btnCloseClick - end - end - object Panel2: TPanel - Left = 317 - Top = 0 - Width = 377 - Height = 368 - Align = alClient - BevelOuter = bvNone - BorderWidth = 8 - TabOrder = 2 - object Panel6: TPanel - Left = 8 - Top = 8 - Width = 361 - Height = 352 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object PageControl1: TcxPageControl - Left = 1 - Top = 1 - Width = 359 - Height = 350 - ActivePage = TabSheet1 - Align = alClient - Color = clBtnFace - ParentColor = False - TabOrder = 0 - ClientRectBottom = 350 - ClientRectRight = 359 - ClientRectTop = 24 - object TabSheet1: TcxTabSheet - BorderWidth = 8 - Caption = ' Levels ' - Color = clBtnFace - ParentColor = False - object cbDeleteAllSublevels: TcxCheckBox - Left = 0 - Top = 289 - Align = alBottom - Caption = 'Delete All Sublevels' - State = cbsChecked - TabOrder = 3 - Width = 343 - end - object Panel7: TPanel - Left = 0 - Top = 0 - Width = 343 - Height = 13 - Align = alTop - AutoSize = True - BevelOuter = bvNone - TabOrder = 0 - object lblLevelName: TLabel - Left = 89 - Top = 0 - Width = 254 - Height = 13 - Align = alClient - end - object Label1: TLabel - Left = 0 - Top = 0 - Width = 89 - Height = 13 - Align = alLeft - Caption = 'Destination Level: ' - end - end - object pnlStructureControlSite: TPanel - Left = 0 - Top = 21 - Width = 343 - Height = 260 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 1 - end - object Panel3: TPanel - Left = 0 - Top = 13 - Width = 343 - Height = 8 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - end - object Panel8: TPanel - Left = 0 - Top = 281 - Width = 343 - Height = 8 - Align = alBottom - BevelOuter = bvNone - TabOrder = 4 - end - end - object TabSheet2: TcxTabSheet - BorderWidth = 8 - Caption = ' Styles ' - Color = clBtnFace - ImageIndex = 1 - ParentColor = False - object cbImportStyles: TcxCheckBox - Left = 0 - Top = 0 - Align = alTop - Caption = 'Import Styles' - State = cbsChecked - TabOrder = 0 - OnClick = cbImportStylesClick - Width = 343 - end - object rbCreateNewStyleRepository: TcxRadioButton - Left = 12 - Top = 29 - Width = 169 - Height = 17 - Caption = 'Create New StyleRepository' - Checked = True - TabOrder = 1 - TabStop = True - OnClick = rbStyleRepositoryClick - end - object rbUseExistingStyleRepository: TcxRadioButton - Left = 12 - Top = 87 - Width = 173 - Height = 17 - Caption = 'Use Existing StyleRepository' - TabOrder = 3 - TabStop = True - OnClick = rbStyleRepositoryClick - end - object edNewStyleRepository: TcxTextEdit - Left = 36 - Top = 52 - TabOrder = 2 - Width = 290 - end - object cbStyleRepositories: TcxComboBox - Left = 36 - Top = 110 - Properties.DropDownListStyle = lsFixedList - TabOrder = 4 - Width = 290 - end - end - end - end - end - object Panel4: TPanel - Left = 0 - Top = 0 - Width = 237 - Height = 368 - Align = alLeft - BevelOuter = bvNone - BorderWidth = 8 - TabOrder = 0 - object Panel5: TPanel - Left = 8 - Top = 8 - Width = 221 - Height = 352 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object lbComponentsForImport: TListBox - Left = 1 - Top = 1 - Width = 219 - Height = 350 - Style = lbOwnerDrawVariable - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - TabOrder = 0 - OnClick = lbComponentsForImportClick - OnDblClick = lbComponentsForImportDblClick - OnMeasureItem = lbComponentsForImportMeasureItem - end - end - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridImportDialog.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridImportDialog.pas deleted file mode 100644 index cc93f2b0..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridImportDialog.pas +++ /dev/null @@ -1,426 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxGridImportDialog; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - DesignIntf, Variants, -{$ELSE} - DsgnIntf, -{$ENDIF} - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, ExtCtrls, StdCtrls, cxConverterFactory, cxGridConverter, cxGrid, TypInfo, - cxGridStructureNavigator, cxGridLevel, cxGridCustomView, ComCtrls, cxStyles, - Menus, cxLookAndFeelPainters, cxButtons, cxControls, cxPC, cxContainer, - cxEdit, cxCheckBox, cxRadioGroup, cxGraphics, cxMaskEdit, cxDropDownEdit, - cxTextEdit, cxDesignWindows; - -type - TImportDialog = class(TForm) - Panel1: TPanel; - btnImport: TcxButton; - btnClose: TcxButton; - Panel2: TPanel; - Panel4: TPanel; - Panel5: TPanel; - lbComponentsForImport: TListBox; - Panel6: TPanel; - PageControl1: TcxPageControl; - TabSheet1: TcxTabSheet; - cbDeleteAllSublevels: TcxCheckBox; - TabSheet2: TcxTabSheet; - cbImportStyles: TcxCheckBox; - Panel7: TPanel; - lblLevelName: TLabel; - Label1: TLabel; - pnlStructureControlSite: TPanel; - Panel3: TPanel; - Panel8: TPanel; - rbCreateNewStyleRepository: TcxRadioButton; - rbUseExistingStyleRepository: TcxRadioButton; - edNewStyleRepository: TcxTextEdit; - cbStyleRepositories: TcxComboBox; - procedure btnCloseClick(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure btnImportClick(Sender: TObject); - procedure lbComponentsForImportClick(Sender: TObject); - procedure lbComponentsForImportDblClick(Sender: TObject); - procedure FormDestroy(Sender: TObject); - procedure cbImportStylesClick(Sender: TObject); - procedure rbStyleRepositoryClick(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure lbComponentsForImportMeasureItem(Control: TWinControl; Index: Integer; - var Height: Integer); - private - { Private declarations } - FGrid: TcxCustomGrid; - FDesigner: IDesigner; - FGridStructureControl: TcxGridStructureControl; - FGridStructureHelper: TcxGridStructureHelper; - FIntermediaryList: TStringList; - FLevel: TcxGridLevel; - function GetComponent: TComponent; - procedure SetGrid(Value: TcxCustomGrid); - procedure SetLevel(Value: TcxGridLevel); - - function GetConverterClass(ASource: TObject): TcxCustomGridConverterClass; - procedure LoadComponentForImport(const S: string); - procedure LoadIntermediary(const S: string); - procedure LoadStyleRepository(const S: string); - procedure DoImport; - procedure DisableStylesOptions; - procedure EnableStylesOptions; - function GetIntermediaryComponent: TComponent; - procedure StructureControlSelectionChanged(Sender: TObject); - procedure UpdateDesigner(Sender: TObject); - procedure UpdateStyleRepositoryEdits; - protected - property Component: TComponent read GetComponent; - property Level: TcxGridLevel read FLevel write SetLevel; - public - { Public declarations } - property Grid: TcxCustomGrid read FGrid write SetGrid; - property Designer: IDesigner read FDesigner write FDesigner; - end; - - procedure ShowGridImportDialog(ADesigner: IDesigner; AGrid: TcxCustomGrid); - -implementation - -{$R *.dfm} - -uses - cxLookAndFeels; - -procedure ShowGridImportDialog(ADesigner: IDesigner; AGrid: TcxCustomGrid); -var - ADialog: TImportDialog; -begin - ADialog := TImportDialog.Create(Application); - try - ADialog.Grid := AGrid; - ADialog.Designer := ADesigner; - ADialog.ShowModal; - finally - ADialog.Free; - end; -end; - -procedure TImportDialog.btnCloseClick(Sender: TObject); -begin - Close; -end; - -procedure TImportDialog.FormShow(Sender: TObject); -begin - FDesigner.GetComponentNames(GetTypeData(PTypeInfo(TComponent.ClassInfo)), - LoadComponentForImport); - - UpdateStyleRepositoryEdits; - EnableStylesOptions; -end; - -procedure TImportDialog.btnImportClick(Sender: TObject); -begin - DoImport; -end; - -function TImportDialog.GetComponent: TComponent; -begin - if lbComponentsForImport.ItemIndex = -1 then - Result := nil - else - Result := lbComponentsForImport.Items.Objects[lbComponentsForImport.ItemIndex] as TComponent; -end; - -procedure TImportDialog.SetGrid(Value: TcxCustomGrid); -var - AList: TList; -begin - if FGrid <> Value then - begin - FGrid := Value; - FGridStructureControl.Grid := FGrid; - if FGrid <> nil then - begin - AList := TList.Create; - try - AList.Add(FGrid); - FGridStructureControl.SyncSelection(AList); - finally - AList.Free; - end; - Level := nil; - end; - end; -end; - -procedure TImportDialog.SetLevel(Value: TcxGridLevel); -begin - FLevel := Value; - if FLevel = nil then - lblLevelName.Caption := Grid.Name - else - lblLevelName.Caption := FLevel.Name; -end; - -function TImportDialog.GetConverterClass(ASource: TObject): TcxCustomGridConverterClass; -var - AConverterClass: TcxCustomConverterWithStylesClass; -begin - AConverterClass := ConverterFactory(cxGridGroupConverterName).FindConverter(ASource); - if (AConverterClass <> nil) and AConverterClass.InheritsFrom(TcxCustomGridConverter) then - Result := TcxCustomGridConverterClass(AConverterClass) - else - Result := nil; -end; - -procedure TImportDialog.LoadComponentForImport(const S: string); -var - AComponent: TComponent; -begin - AComponent := FDesigner.GetComponent(S); - if (AComponent <> nil) and (GetConverterClass(AComponent) <> nil) then - lbComponentsForImport.Items.AddObject(S, AComponent); -end; - -procedure TImportDialog.LoadIntermediary(const S: string); -var - AComponent: TComponent; - AConverterClass: TcxCustomGridConverterClass; -begin - AComponent := FDesigner.GetComponent(S); - if AComponent <> nil then - begin - AConverterClass := GetConverterClass(Component); - if (AConverterClass <> nil) and - (AConverterClass.GetIntermediaryClassName = AComponent.ClassName) then - FIntermediaryList.AddObject(AComponent.ClassName, AComponent); - end; -end; - -procedure TImportDialog.LoadStyleRepository(const S: string); -var - AComponent: TComponent; -begin - AComponent := FDesigner.GetComponent(S); - if (AComponent <> nil) and (AComponent is TcxStyleRepository) then - cbStyleRepositories.Properties.Items.AddObject(S, AComponent); -end; - -procedure TImportDialog.DoImport; -var - AConverter: TcxCustomGridConverter; -begin - if Component = nil then Exit; - - btnImport.Enabled := False; - - AConverter := GetConverterClass(Component).Create(FGrid); - try - AConverter.Intermediary := GetIntermediaryComponent; - AConverter.Designer_ := Designer; - AConverter.DestinationLevel := Level; - AConverter.DeleteAllSublevels := cbDeleteAllSublevels.Checked; - AConverter.ConvertWithStyles := cbImportStyles.Checked; - if cbImportStyles.Checked then - if rbCreateNewStyleRepository.Checked then - AConverter.NameOfNewStyleRepository := edNewStyleRepository.Text - else - AConverter.StyleRepository := cbStyleRepositories.ItemObject as TcxStyleRepository; - AConverter.ImportFrom(Component); - finally - AConverter.Free; - - if FGridStructureControl <> nil then - FGridStructureControl.Changed; - if rbCreateNewStyleRepository.Checked then - UpdateStyleRepositoryEdits; - if cbImportStyles.Checked then - EnableStylesOptions; - - btnImport.Enabled := True; - - Designer.Modified; - end; -end; - -procedure EnableEdit(AEdit: TcxCustomEdit; AEnable: Boolean); -begin - AEdit.Enabled := AEnable; - if AEnable then - AEdit.Style.Color := clWindow - else - AEdit.Style.Color := clBtnFace; -end; - -procedure TImportDialog.DisableStylesOptions; -begin - rbCreateNewStyleRepository.Enabled := False; - rbUseExistingStyleRepository.Enabled := False; - EnableEdit(edNewStyleRepository, False); - EnableEdit(cbStyleRepositories, False); -end; - -procedure TImportDialog.EnableStylesOptions; -begin - rbCreateNewStyleRepository.Enabled := True; - rbUseExistingStyleRepository.Enabled := cbStyleRepositories.Properties.Items.Count <> 0; - if not rbUseExistingStyleRepository.Enabled then - rbCreateNewStyleRepository.Checked := True; - EnableEdit(edNewStyleRepository, rbCreateNewStyleRepository.Checked); - EnableEdit(cbStyleRepositories, rbUseExistingStyleRepository.Checked); -end; - -function TImportDialog.GetIntermediaryComponent: TComponent; -begin - Result := nil; - FIntermediaryList := TStringList.Create; - try - FDesigner.GetComponentNames(GetTypeData(PTypeInfo(TComponent.ClassInfo)), LoadIntermediary); - if FIntermediaryList.Count <> 0 then - Result := FIntermediaryList.Objects[0] as TComponent; - finally - FIntermediaryList.Free; - end; -end; - -procedure TImportDialog.StructureControlSelectionChanged(Sender: TObject); -var - AList: TList; - AObject: TObject; -begin - AList := TList.Create; - try - FGridStructureControl.GetSelection(AList); - if AList.Count = 0 then Exit; - AObject := TObject(AList[0]); - if AObject is TcxGridLevel then - Level := TcxGridLevel(AObject) - else - if AObject is TcxCustomGrid then - Level := nil - else - if AObject is TcxCustomGridView then - Level := TcxGridLevel(TcxCustomGridView(AObject).Level); - finally - AList.Free; - end; -end; - -procedure TImportDialog.UpdateDesigner(Sender: TObject); -begin - Designer.Modified; -end; - -procedure TImportDialog.UpdateStyleRepositoryEdits; -var - AIndex: Integer; -begin - edNewStyleRepository.Text := FDesigner.UniqueName(TcxStyleRepository.ClassName); - - if cbStyleRepositories.Properties.Items.Count <> 0 then - AIndex := cbStyleRepositories.ItemIndex - else - AIndex := 0; - cbStyleRepositories.Clear; - FDesigner.GetComponentNames(GetTypeData(PTypeInfo(TComponent.ClassInfo)), LoadStyleRepository); - if cbStyleRepositories.Properties.Items.Count <> 0 then - cbStyleRepositories.ItemIndex := AIndex; -end; - -procedure TImportDialog.lbComponentsForImportClick(Sender: TObject); -begin - btnImport.Enabled := Component <> nil; -end; - -procedure TImportDialog.lbComponentsForImportDblClick(Sender: TObject); -begin - DoImport; -end; - -procedure TImportDialog.lbComponentsForImportMeasureItem(Control: TWinControl; - Index: Integer; var Height: Integer); -begin - Height := lbComponentsForImport.Canvas.TextHeight('Qq') + 2 * 2; -end; - -procedure TImportDialog.FormCreate(Sender: TObject); -begin - with lblLevelName.Font do - begin - Color := clNavy; - Style := [fsBold]; - end; - FGridStructureControl := TcxGridStructureControl.Create(Self); - with FGridStructureControl do - begin - Align := alClient; - MayFocused := True; - OnSelectionChanged := StructureControlSelectionChanged; - Parent := pnlStructureControlSite; - end; - FGridStructureHelper := TcxGridStructureHelper.Create(FGridStructureControl); - FGridStructureHelper.OnUpdateDesigner := UpdateDesigner; - SetControlLookAndFeel(Self, lfUltraFlat, False); -{$IFDEF DELPHI10} // should be DELPHI105 - MakeColoredControlsOpaque(Self); -{$ENDIF} -end; - -procedure TImportDialog.FormDestroy(Sender: TObject); -begin - FGridStructureHelper.Free; - FGridStructureControl.Free; -end; - -procedure TImportDialog.cbImportStylesClick(Sender: TObject); -begin - if cbImportStyles.Checked then - EnableStylesOptions - else - DisableStylesOptions; -end; - -procedure TImportDialog.rbStyleRepositoryClick(Sender: TObject); -begin - EnableStylesOptions; -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridLevel.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridLevel.pas deleted file mode 100644 index 6278ad58..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridLevel.pas +++ /dev/null @@ -1,949 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridLevel; - -{$I cxVer.inc} -{$I cxGridVer.inc} - -interface - -uses - Classes, Graphics, ImgList, - dxCore, cxClasses, cxControls, cxGraphics, cxLookAndFeelPainters, cxStyles, - cxCustomData, - cxGridCustomView, cxGridCustomTableView; - -type - TcxGridDetailTabsPosition = (dtpNone, dtpLeft, dtpTop); - -const - cxGridLevelDefaultDetailFrameWidth = 1; - cxGridLevelDefaultDetailTabsPosition = dtpNone; - - lsFirst = 0; - lsTab = lsFirst; - lsTabsBackground = lsFirst + 1; - lsLast = lsTabsBackground; - -type - TcxGridLevel = class; - - TcxGridLevelOptionsClass = class of TcxGridLevelOptions; - - TcxGridLevelOptions = class(TPersistent) - private - FDetailFrameColor: TColor; - FDetailFrameWidth: Integer; - FDetailTabsPosition: TcxGridDetailTabsPosition; - FLevel: TcxGridLevel; - FTabsForEmptyDetails: Boolean; - procedure SetDetailFrameColor(Value: TColor); - procedure SetDetailFrameWidth(Value: Integer); - procedure SetDetailTabsPosition(Value: TcxGridDetailTabsPosition); - procedure SetTabsForEmptyDetails(Value: Boolean); - protected - procedure Changed(AHardChange: Boolean = True); - property Level: TcxGridLevel read FLevel; - public - constructor Create(ALevel: TcxGridLevel); virtual; - function GetDetailFrameColor: TColor; - published - property DetailFrameColor: TColor read FDetailFrameColor write SetDetailFrameColor - default clDefault; - property DetailFrameWidth: Integer read FDetailFrameWidth write SetDetailFrameWidth - default cxGridLevelDefaultDetailFrameWidth; - property DetailTabsPosition: TcxGridDetailTabsPosition read FDetailTabsPosition - write SetDetailTabsPosition default cxGridLevelDefaultDetailTabsPosition; - property TabsForEmptyDetails: Boolean read FTabsForEmptyDetails write SetTabsForEmptyDetails default True; - end; - - TcxGridLevelGetOwnTabStyleEvent = procedure(Sender: TcxGridLevel; - AMasterRecord: TcxCustomGridRecord; var AStyle: TcxStyle) of object; - TcxGridLevelGetTabStyleEvent = procedure(Sender, ATabLevel: TcxGridLevel; - {$IFDEF BCB}var{$ELSE}out{$ENDIF} AStyle: TcxStyle) of object; - - TcxGridLevelStylesClass = class of TcxGridLevelStyles; - - TcxGridLevelStyles = class(TcxStyles) - private - FOnGetOwnTabStyle: TcxGridLevelGetOwnTabStyleEvent; - FOnGetTabStyle: TcxGridLevelGetTabStyleEvent; - function GetLevel: TcxGridLevel; - function GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; - protected - procedure Changed(AIndex: Integer); override; - procedure DoGetOwnTabStyle(AMasterRecord: TcxCustomGridRecord; var AStyle: TcxStyle); virtual; - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - property LookAndFeelPainter: TcxCustomLookAndFeelPainterClass read GetLookAndFeelPainter; - public - property Level: TcxGridLevel read GetLevel; - procedure GetTabDefaultParams(out AParams: TcxViewParams); - procedure GetTabParams(ARecord: TcxCustomGridRecord; ATabLevel: TcxGridLevel; - out AParams: TcxViewParams); virtual; - published - property Tab: TcxStyle index lsTab read GetValue write SetValue; - property TabsBackground: TcxStyle index lsTabsBackground read GetValue write SetValue; - property OnGetOwnTabStyle: TcxGridLevelGetOwnTabStyleEvent read FOnGetOwnTabStyle write FOnGetOwnTabStyle; - property OnGetTabStyle: TcxGridLevelGetTabStyleEvent read FOnGetTabStyle write FOnGetTabStyle; - end; - - TcxGridLevelGetGridViewEvent = procedure(Sender: TcxGridLevel; AMasterRecord: TcxCustomGridRecord; - var AGridView: TcxCustomGridView) of object; - - TcxGridLevelChangeKind = (lcName, lcCaption, lcGridView, lcStructure, lcVisibility); - - TcxGridLevelClass = class of TcxGridLevel; - - TcxGridLevel = class(TcxComponent) - private - FCaption: string; - FControl: TcxControl; // TcxCustomGrid; - FDataRelation: TcxCustomDataRelation; - FGridView: TcxCustomGridView; - FImageIndex: TImageIndex; - FItems: TList; - FMaxDetailHeight: Integer; - FOptions: TcxGridLevelOptions; - FParent: TcxGridLevel; - FStyles: TcxGridLevelStyles; - FVisible: Boolean; - FVisibleItems: TList; - FSubClassEvents: TNotifyEvent; - FOnGetGridView: TcxGridLevelGetGridViewEvent; - - function GetActive: Boolean; - function GetActuallyVisible: Boolean; - function GetCanBeVisible: Boolean; - function GetCount: Integer; - function GetIndex: Integer; - function GetIsLoading: Boolean; - function GetIsMaster: Boolean; - function GetIsRoot: Boolean; - function GetIsTop: Boolean; - function GetItem(Index: Integer): TcxGridLevel; - function GetLevel: Integer; - function GetVisibleCount: Integer; - function GetVisibleIndex: Integer; - function GetVisibleItem(Index: Integer): TcxGridLevel; - procedure SetActive(Value: Boolean); - procedure SetCaption(const Value: string); - procedure SetGridView(Value: TcxCustomGridView); - procedure SetImageIndex(Value: TImageIndex); - procedure SetIndex(Value: Integer); - procedure SetMaxDetailHeight(Value: Integer); - procedure SetParent(Value: TcxGridLevel); - procedure SetStyles(Value: TcxGridLevelStyles); - procedure SetVisible(Value: Boolean); - - procedure AddItem(AItem: TcxGridLevel); - procedure RemoveItem(AItem: TcxGridLevel); - procedure ChangeItemIndex(AItem: TcxGridLevel; Value: Integer); - function GetItemIndex(AItem: TcxGridLevel): Integer; - procedure DestroyItems; - procedure RefreshVisibleItemsList; - - procedure AddDataRelation(AItem: TcxGridLevel); - procedure MoveDataRelation(AItem: TcxGridLevel; AIndex: Integer); - procedure RemoveDataRelation(AItem: TcxGridLevel); - protected - procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; - procedure SetChildOrder(Child: TComponent; Order: Integer); override; - procedure SetName(const NewName: TComponentName); override; - procedure SetParentComponent(Value: TComponent); override; - - function CreateLinkObject(ARelation: TcxCustomDataRelation; - ARecordIndex: Integer): TcxCustomGridView; virtual; - procedure Changed(AHardChange: Boolean = True); virtual; - procedure CheckHeight(var Value: Integer); virtual; - function GetDisplayCaption: string; virtual; - function GetItemClass: TcxGridLevelClass; virtual; - function GetOptionsClass: TcxGridLevelOptionsClass; virtual; - function GetStylesClass: TcxGridLevelStylesClass; virtual; - procedure ItemVisibleChanged(AItem: TcxGridLevel); virtual; - procedure NotifyControl(AChangeKind: TcxGridLevelChangeKind); - procedure SetupMasterRelation(AVisible, AIsPattern: Boolean); - - property IsLoading: Boolean read GetIsLoading; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function GetParentComponent: TComponent; override; - function HasParent: Boolean; override; - - function Add: TcxGridLevel; - function GetAvailableItem: TcxGridLevel; - function HasAsChild(ALevel: TcxGridLevel): Boolean; - function MakeVisible: TcxCustomGridView; - - property Active: Boolean read GetActive write SetActive; - property ActuallyVisible: Boolean read GetActuallyVisible; - property CanBeVisible: Boolean read GetCanBeVisible; - property Control: TcxControl read FControl write FControl; - property Count: Integer read GetCount; - property DataRelation: TcxCustomDataRelation read FDataRelation; - property DisplayCaption: string read GetDisplayCaption; - property Index: Integer read GetIndex write SetIndex; - property IsMaster: Boolean read GetIsMaster; - property IsRoot: Boolean read GetIsRoot; - property IsTop: Boolean read GetIsTop; - property Items[Index: Integer]: TcxGridLevel read GetItem; default; - property Level: Integer read GetLevel; - property Parent: TcxGridLevel read FParent write SetParent; - property VisibleCount: Integer read GetVisibleCount; - property VisibleIndex: Integer read GetVisibleIndex; - property VisibleItems[Index: Integer]: TcxGridLevel read GetVisibleItem; - published - property Caption: string read FCaption write SetCaption; - property GridView: TcxCustomGridView read FGridView write SetGridView; - property ImageIndex: TImageIndex read FImageIndex write SetImageIndex default -1; - property MaxDetailHeight: Integer read FMaxDetailHeight write SetMaxDetailHeight default 0; - property Options: TcxGridLevelOptions read FOptions write FOptions; - property Styles: TcxGridLevelStyles read FStyles write SetStyles; - property Visible: Boolean read FVisible write SetVisible default True; - property StylesEvents: TNotifyEvent read FSubClassEvents write FSubClassEvents; - property OnGetGridView: TcxGridLevelGetGridViewEvent read FOnGetGridView write FOnGetGridView; - end; - - { TcxGridLevelAccess } - - TcxGridLevelAccess = class - public - class procedure CheckHeight(AInstance: TcxGridLevel; var Value: Integer); - class function CreateLinkObject(AInstance: TcxGridLevel; - ARelation: TcxCustomDataRelation; ARecordIndex: Integer): TcxCustomGridView; - end; - -var - cxGridTabAccelSupport: Boolean = True; - -implementation - -uses - SysUtils, Menus, cxGrid, cxGridStrs; - -type - TcxCustomGridAccess = class(TcxCustomGrid); - TcxCustomGridViewAccess = class(TcxCustomGridView); - -{ TcxGridLevelOptions } - -constructor TcxGridLevelOptions.Create(ALevel: TcxGridLevel); -begin - inherited Create; - FLevel := ALevel; - FDetailFrameColor := clDefault; - FDetailFrameWidth := cxGridLevelDefaultDetailFrameWidth; - FDetailTabsPosition := cxGridLevelDefaultDetailTabsPosition; - FTabsForEmptyDetails := True; -end; - -procedure TcxGridLevelOptions.SetDetailFrameColor(Value: TColor); -begin - if FDetailFrameColor <> Value then - begin - FDetailFrameColor := Value; - Changed(False); - end; -end; - -procedure TcxGridLevelOptions.SetDetailFrameWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FDetailFrameWidth <> Value then - begin - FDetailFrameWidth := Value; - Changed; - end; -end; - -procedure TcxGridLevelOptions.SetDetailTabsPosition(Value: TcxGridDetailTabsPosition); -begin - if FDetailTabsPosition <> Value then - begin - FDetailTabsPosition := Value; - Changed; - end; -end; - -procedure TcxGridLevelOptions.SetTabsForEmptyDetails(Value: Boolean); -begin - if FTabsForEmptyDetails <> Value then - begin - FTabsForEmptyDetails := Value; - Changed; - end; -end; - -procedure TcxGridLevelOptions.Changed(AHardChange: Boolean = True); -begin - FLevel.Changed(AHardChange); -end; - -function TcxGridLevelOptions.GetDetailFrameColor: TColor; -begin - Result := FDetailFrameColor; - if Result = clDefault then - Result := TcxCustomGrid(FLevel.Control).LookAndFeelPainter.DefaultFixedSeparatorColor; -end; - -{ TcxGridLevelStyles } - -function TcxGridLevelStyles.GetLevel: TcxGridLevel; -begin - Result := TcxGridLevel(GetOwner); -end; - -function TcxGridLevelStyles.GetLookAndFeelPainter: TcxCustomLookAndFeelPainterClass; -begin - Result := TcxCustomGrid(Level.Control).LookAndFeelPainter;; -end; - -procedure TcxGridLevelStyles.Changed(AIndex: Integer); -begin - inherited; - Level.Changed; -end; - -procedure TcxGridLevelStyles.DoGetOwnTabStyle(AMasterRecord: TcxCustomGridRecord; - var AStyle: TcxStyle); -begin - if Assigned(FOnGetOwnTabStyle) then - FOnGetOwnTabStyle(Level, AMasterRecord, AStyle); -end; - -procedure TcxGridLevelStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - inherited; - AParams.Font := TcxCustomGrid(Level.Control).Font; - with LookAndFeelPainter, AParams do - case Index of - lsTab: - begin - Color := DefaultTabColor; - TextColor := DefaultTabTextColor; - end; - lsTabsBackground: - Color := {$IFDEF USETABCONTROL}clDefault{$ELSE}DefaultTabsBackgroundColor{$ENDIF}; - end; -end; - -procedure TcxGridLevelStyles.GetTabDefaultParams(out AParams: TcxViewParams); -begin - GetDefaultViewParams(lsTab, nil, AParams); -end; - -procedure TcxGridLevelStyles.GetTabParams(ARecord: TcxCustomGridRecord; - ATabLevel: TcxGridLevel; out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if Assigned(FOnGetTabStyle) then FOnGetTabStyle(Level, ATabLevel, AStyle); - ATabLevel.Styles.DoGetOwnTabStyle(ARecord, AStyle); - GetViewParams(lsTab, nil, AStyle, AParams); -end; - -{ TcxGridLevel } - -constructor TcxGridLevel.Create(AOwner: TComponent); -begin - inherited; - FImageIndex := -1; - FItems := TList.Create; - FOptions := GetOptionsClass.Create(Self); - FStyles := GetStylesClass.Create(Self); - FVisible := True; - FVisibleItems := TList.Create; -end; - -destructor TcxGridLevel.Destroy; -begin - if not (FControl.IsLoading or FControl.IsDestroying) and IsDesigning then - TcxCustomGrid(FControl).StructureNavigator.UnselectObject(Self); - DestroyItems; - GridView := nil; - if FParent <> nil then - FParent.RemoveItem(Self); - FVisibleItems.Free; - FItems.Free; - FStyles.Free; - FOptions.Free; - inherited; -end; - -function TcxGridLevel.GetActive: Boolean; -begin - Result := TcxCustomGrid(FControl).ActiveLevel = Self; -end; - -function TcxGridLevel.GetActuallyVisible: Boolean; -begin - Result := FVisible and (not IsTop or Active) and - ((FParent = nil) or FParent.ActuallyVisible); -end; - -function TcxGridLevel.GetCanBeVisible: Boolean; -begin - Result := FVisible and ((FParent = nil) or FParent.CanBeVisible); -end; - -function TcxGridLevel.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridLevel.GetIndex: Integer; -begin - Result := FParent.GetItemIndex(Self); -end; - -function TcxGridLevel.GetIsLoading: Boolean; -begin - Result := csLoading in ComponentState; -end; - -function TcxGridLevel.GetIsMaster: Boolean; -begin - Result := VisibleCount <> 0; -end; - -function TcxGridLevel.GetIsRoot: Boolean; -begin - Result := TcxCustomGrid(FControl).Levels = Self; -end; - -function TcxGridLevel.GetIsTop: Boolean; -begin - Result := FParent = TcxCustomGrid(FControl).Levels; -end; - -function TcxGridLevel.GetItem(Index: Integer): TcxGridLevel; -begin - Result := TcxGridLevel(FItems[Index]); -end; - -function TcxGridLevel.GetLevel: Integer; -var - AParent: TcxGridLevel; -begin - Result := -1; - AParent := Parent; - while AParent <> nil do - begin - Inc(Result); - AParent := AParent.Parent; - end; -end; - -function TcxGridLevel.GetVisibleCount: Integer; -begin - Result := FVisibleItems.Count; -end; - -function TcxGridLevel.GetVisibleIndex: Integer; -begin - Result := FParent.FVisibleItems.IndexOf(Self); -end; - -function TcxGridLevel.GetVisibleItem(Index: Integer): TcxGridLevel; -begin - Result := TcxGridLevel(FVisibleItems[Index]); -end; - -procedure TcxGridLevel.SetActive(Value: Boolean); -begin - if Active <> Value then - if Value then - if IsTop then - TcxCustomGrid(FControl).ActiveLevel := Self - else - else - TcxCustomGrid(FControl).ActiveLevel := nil; -end; - -procedure TcxGridLevel.SetCaption(const Value: string); -begin - if FCaption <> Value then - begin - FCaption := Value; - Changed; - NotifyControl(lcCaption); - end; -end; - -procedure TcxGridLevel.SetGridView(Value: TcxCustomGridView); -var - I: Integer; - APrevGridView: TcxCustomGridView; - - procedure CheckFocusedGridView; - begin - if FGridView <> nil then - if (APrevGridView = nil) and (TcxCustomGrid(FControl).FocusedView = nil) or - (APrevGridView <> nil) and APrevGridView.Focused then - FGridView.Focused := True - else - else - APrevGridView.Focused := False; - end; - -begin - if FGridView <> Value then - begin - if (Value <> nil) and (Value.Level <> nil) then - TcxGridLevel(Value.Level).GridView := nil; - if FGridView <> nil then - begin - FGridView.BeginUpdate; - try - for I := 0 to Count - 1 do - RemoveDataRelation(Items[I]); - finally - //FGridView.EndUpdate; - FGridView.CancelUpdate; - end; - TcxCustomGridViewAccess(FGridView).SetLevel(nil); - end; - APrevGridView := FGridView; - FGridView := Value; - if FGridView <> nil then - FGridView.Control := Control; {5} - if FParent <> nil then - FParent.RefreshVisibleItemsList; - - if FGridView <> nil then FGridView.BeginUpdate; - try - if APrevGridView <> nil then - APrevGridView.DataController.SetMasterMode(nil, True); - if FGridView <> nil then - begin - TcxCustomGridViewAccess(FGridView).SetLevel(Self); - SetupMasterRelation(FVisible, not IsTop); - for I := 0 to Count - 1 do - AddDataRelation(Items[I]); - end; - Changed(False); {5} - finally - if FGridView <> nil then FGridView.EndUpdate; - - CheckFocusedGridView; - if APrevGridView <> nil then - APrevGridView.Control := APrevGridView.StorageControl; - NotifyControl(lcGridView); - end; - end; -end; - -procedure TcxGridLevel.SetImageIndex(Value: TImageIndex); -begin - if Value < -1 then Value := -1; - if FImageIndex <> Value then - begin - FImageIndex := Value; - Changed; - end; -end; - -procedure TcxGridLevel.SetIndex(Value: Integer); -begin - FParent.ChangeItemIndex(Self, Value); -end; - -procedure TcxGridLevel.SetMaxDetailHeight(Value: Integer); -begin - if Value < 0 then Value := 0; - if FMaxDetailHeight <> Value then - begin - FMaxDetailHeight := Value; - Changed; - end; -end; - -procedure TcxGridLevel.SetParent(Value: TcxGridLevel); -begin - if FParent <> Value then - begin - TcxCustomGrid(Control).BeginUpdate; - try - if (Value <> nil) and ((Value = Self) or HasAsChild(Value)) then - raise EdxException.Create(scxGridRecursiveLevels); - if FParent <> nil then - FParent.RemoveItem(Self); - if Value <> nil then - Value.AddItem(Self); - finally - TcxCustomGrid(Control).EndUpdate; - end; - end; -end; - -procedure TcxGridLevel.SetStyles(Value: TcxGridLevelStyles); -begin - FStyles.Assign(Value); -end; - -procedure TcxGridLevel.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - {if Value and (FGridView <> nil) then - SetupMasterRelation(Value, not IsTop);} - FVisible := Value; - if Value and (FGridView <> nil) then - SetupMasterRelation(Value, not IsTop); - if FParent <> nil then - FParent.ItemVisibleChanged(Self); - if FVisible then - if TcxCustomGrid(FControl).ActiveLevel = nil then - Active := True - else - else - Active := False; - Changed; - TcxCustomGrid(Control).CheckFocusedView; - if not Value and (FGridView <> nil) then - SetupMasterRelation(Value, not IsTop); - NotifyControl(lcVisibility); - end; -end; - -procedure TcxGridLevel.AddItem(AItem: TcxGridLevel); -begin - TcxCustomGrid(Control).BeginUpdate; - try - FItems.Add(AItem); - AItem.FControl := FControl; - AItem.FParent := Self; - RefreshVisibleItemsList; - AddDataRelation(AItem); - if IsRoot and (TcxCustomGrid(FControl).ActiveLevel = nil) then - TcxCustomGrid(FControl).ActiveLevel := GetAvailableItem; - Changed; - finally - TcxCustomGrid(Control).EndUpdate; - end; - NotifyControl(lcStructure); -end; - -procedure TcxGridLevel.RemoveItem(AItem: TcxGridLevel); -begin - TcxCustomGrid(Control).BeginUpdate; - try - FItems.Remove(AItem); - FVisibleItems.Remove(AItem); - AItem.FParent := nil; - RemoveDataRelation(AItem); - AItem.Active := False; - Changed; - finally - TcxCustomGrid(Control).EndUpdate; - end; - NotifyControl(lcStructure); -end; - -procedure TcxGridLevel.ChangeItemIndex(AItem: TcxGridLevel; Value: Integer); -begin - if Value < 0 then Value := 0; - if Value >= Count then Value := Count - 1; - FItems.Move(AItem.Index, Value); - RefreshVisibleItemsList; - MoveDataRelation(AItem, Value); - Changed; - NotifyControl(lcStructure); -end; - -function TcxGridLevel.GetItemIndex(AItem: TcxGridLevel): Integer; -begin - Result := FItems.IndexOf(AItem); -end; - -procedure TcxGridLevel.DestroyItems; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Items[I].Free; -end; - -procedure TcxGridLevel.RefreshVisibleItemsList; -var - I: Integer; -begin - FVisibleItems.Clear; - for I := 0 to Count - 1 do - if Items[I].Visible then - FVisibleItems.Add(Items[I]); -end; - -procedure TcxGridLevel.AddDataRelation(AItem: TcxGridLevel); -begin - if FGridView <> nil then - begin - AItem.FDataRelation := FGridView.DataController.Relations.Add(AItem); - with AItem do - if GridView <> nil then - SetupMasterRelation(Visible, GridView.DataController.IsPattern); - end; -end; - -procedure TcxGridLevel.MoveDataRelation(AItem: TcxGridLevel; AIndex: Integer); -begin - if FGridView <> nil then - FGridView.DataController.Relations.Move(AItem.DataRelation.Index, AIndex); -end; - -procedure TcxGridLevel.RemoveDataRelation(AItem: TcxGridLevel); -begin - FreeAndNil(AItem.FDataRelation); -end; - -procedure TcxGridLevel.GetChildren(Proc: TGetChildProc; Root: TComponent); -var - I: Integer; -begin - inherited; - for I := 0 to Count - 1 do - if Items[I].Owner = Root then - Proc(Items[I]); -end; - -procedure TcxGridLevel.SetChildOrder(Child: TComponent; Order: Integer); -begin - inherited; - if Child is TcxGridLevel then - TcxGridLevel(Child).Index := Order; -end; - -procedure TcxGridLevel.SetName(const NewName: TComponentName); -begin - inherited; - NotifyControl(lcName); -end; - -procedure TcxGridLevel.SetParentComponent(Value: TComponent); -begin - inherited; - if Value is TcxCustomGrid then - TcxCustomGrid(Value).Levels.AddItem(Self) - else - if Value is TcxGridLevel then - TcxGridLevel(Value).AddItem(Self); -end; - -procedure TcxGridLevel.Changed(AHardChange: Boolean); -begin - if FControl = nil then Exit; - if AHardChange then - TcxCustomGrid(FControl).SizeChanged - else - TcxCustomGrid(FControl).LayoutChanged -end; - -function TcxGridLevel.GetItemClass: TcxGridLevelClass; -begin - Result := TcxGridLevel; -end; - -function TcxGridLevel.GetOptionsClass: TcxGridLevelOptionsClass; -begin - Result := TcxGridLevelOptions; -end; - -function TcxGridLevel.GetStylesClass: TcxGridLevelStylesClass; -begin - Result := TcxGridLevelStyles; -end; - -procedure TcxGridLevel.ItemVisibleChanged(AItem: TcxGridLevel); -var - APrevVisibleCount: Integer; -begin - APrevVisibleCount := VisibleCount; - RefreshVisibleItemsList; - if FGridView <> nil then - TcxCustomGridViewAccess(FGridView).DetailVisibleChanged(AItem, - APrevVisibleCount, VisibleCount); -end; - -procedure TcxGridLevel.NotifyControl(AChangeKind: TcxGridLevelChangeKind); -begin - TcxCustomGridAccess(FControl).LevelChanged(Self, AChangeKind); -end; - -procedure TcxGridLevel.SetupMasterRelation(AVisible, AIsPattern: Boolean); -begin - if AVisible then - FGridView.DataController.SetMasterMode(FDataRelation, AIsPattern) - else - FGridView.DataController.SetMasterMode(nil, True); -end; - -function TcxGridLevel.GetParentComponent: TComponent; -begin - if IsTop then - Result := FControl - else - Result := FParent; -end; - -function TcxGridLevel.HasParent: Boolean; -begin - Result := True; -end; - -function TcxGridLevel.Add: TcxGridLevel; -begin - Result := GetItemClass.Create(FControl.Owner); - AddItem(Result); -end; - -function TcxGridLevel.GetAvailableItem: TcxGridLevel; -begin - if (VisibleCount = 0) or Control.IsDestroying then - Result := nil - else - Result := VisibleItems[0]; -end; - -function TcxGridLevel.HasAsChild(ALevel: TcxGridLevel): Boolean; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := (Items[I] = ALevel) or Items[I].HasAsChild(ALevel); - if Result then Exit; - end; - Result := False; -end; - -function TcxGridLevel.MakeVisible: TcxCustomGridView; -var - AParentView: TcxCustomGridView; -begin - if IsTop then - begin - Active := True; - if Active then - Result := GridView - else - Result := nil; - end - else - begin - AParentView := Parent.MakeVisible; - if AParentView = nil then - Result := nil - else - Result := AParentView.ViewData.MakeDetailVisible(Self); - end; -end; - -procedure TcxGridLevel.CheckHeight(var Value: Integer); -begin - if Value < 0 then Value := 0; - if (FMaxDetailHeight <> 0) and (Value > FMaxDetailHeight) then - Value := FMaxDetailHeight; -end; - -function TcxGridLevel.GetDisplayCaption: string; -begin - Result := Caption; - if cxGridTabAccelSupport then - Result := StripHotkey(Result); -end; - -function TcxGridLevel.CreateLinkObject(ARelation: TcxCustomDataRelation; - ARecordIndex: Integer): TcxCustomGridView; -var - AGridView: TcxCustomGridView; - - function GetMasterRecord: TcxCustomGridRecord; - var - AGridView: TcxCustomGridTableView; - begin - AGridView := (ARelation.DataController as IcxCustomGridDataController).GridView as TcxCustomGridTableView; - Result := AGridView.ViewData.GetRecordByRecordIndex(ARecordIndex); - end; - - function GetRelationsGridView: TcxCustomGridView; - begin - Result := FGridView; - if Result = nil then - Result := AGridView; - end; - -begin - AGridView := FGridView; - if Assigned(FOnGetGridView) then FOnGetGridView(Self, GetMasterRecord, AGridView); - if (AGridView = nil) or not Visible then - Result := nil - else - begin - Result := TcxCustomGridViewClass(AGridView.ClassType).CreateCloned(FControl); - Result.BeginUpdate; - try - TcxCustomGridViewAccess(Result).AssignPattern(AGridView); - Result.DataController.Relations.BeginUpdate; - try - Result.DataController.Relations.Assign(GetRelationsGridView.DataController.Relations); - Result.DataController.SetMasterRelation(ARelation, ARecordIndex); - finally - Result.DataController.Relations.EndUpdate; - end; - TcxCustomGridViewAccess(Result).SetLevel(Self); - finally - Result.CancelUpdate; - end; - TcxCustomGridViewAccess(AGridView).AddClone(Result); - end; -end; - -{ TcxGridLevelAccess } - -class procedure TcxGridLevelAccess.CheckHeight(AInstance: TcxGridLevel; - var Value: Integer); -begin - AInstance.CheckHeight(Value); -end; - -class function TcxGridLevelAccess.CreateLinkObject(AInstance: TcxGridLevel; - ARelation: TcxCustomDataRelation; ARecordIndex: Integer): TcxCustomGridView; -begin - Result := AInstance.CreateLinkObject(ARelation, ARecordIndex); -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridMenuOperations.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridMenuOperations.pas deleted file mode 100644 index 9cc0e29d..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridMenuOperations.pas +++ /dev/null @@ -1,393 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridMenuOperations; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, -{$ENDIF} - Classes, ImgList, cxClasses, cxCustomData, cxGridCustomView, cxGridTableView, - cxGridCustomPopupMenu, cxGridPopupMenu, cxGridUIHelper; - -type - TcxGridPopupMenuOperation = class; - - TcxGridPopupMenuOperationClass = class of TcxGridPopupMenuOperation; - - TcxGridPopupMenuOperationState = (pmoDefault, pmoTrue, pmoFalse); - - TcxGetStateFunc = function : Boolean of object; - - TcxGridPopupMenuOperation = class - private - FBeginGroup: Boolean; - FDownState: TcxGridPopupMenuOperationState; - FEnabledState: TcxGridPopupMenuOperationState; - FImageIndex: Integer; - FParams: TList; - FResCaption: TcxResourceStringID; - FTag: Integer; - FVisibleState: TcxGridPopupMenuOperationState; - function GetGridOperationHelper: TcxGridOperationHelper; - function GetGridPopupMenu: TcxGridPopupMenu; - function GetHitGridView: TcxCustomGridView; - function GetState(AState: TcxGridPopupMenuOperationState; - AGetFunc: TcxGetStateFunc): boolean; - protected - procedure Execute(Sender: TObject); virtual; - function GetImageIndex: Integer; virtual; - function GetImageResourceName: string; virtual; - procedure UpdateImage; - - function GetCaption: string; virtual; - - function GetDown: Boolean; virtual; - function GetCheckedState: Boolean; virtual; - - function GetEnabled: Boolean; virtual; - function GetEnabledState: Boolean; virtual; - - function GetVisible: Boolean; virtual; - function GetVisibleState: Boolean; virtual; - - property GridOperationHelper: TcxGridOperationHelper read GetGridOperationHelper; - - property Params: TList read FParams; - property ResCaption: TcxResourceStringID read FResCaption write FResCaption; - property Tag: Integer read FTag write FTag; - public - constructor Create; virtual; - procedure DoExecute(Sender: TObject); - class function GetParentOperationClass: TcxGridPopupMenuOperationClass; virtual; - - property BeginGroup: Boolean read FBeginGroup write FBeginGroup; - property Caption: string read GetCaption; - property Down: Boolean read GetCheckedState; - property Enabled: Boolean read GetEnabledState; - property ImageIndex: Integer read FImageIndex write FImageIndex; - property Visible: Boolean read GetVisibleState; - - property DownState: TcxGridPopupMenuOperationState read FDownState write FDownState default pmoDefault; - property EnabledState: TcxGridPopupMenuOperationState read FEnabledState write FEnabledState default pmoDefault; - property HitGridView: TcxCustomGridView read GetHitGridView; - property GridPopupMenu: TcxGridPopupMenu read GetGridPopupMenu; - property VisibleState: TcxGridPopupMenuOperationState read FVisibleState write FVisibleState default pmoDefault; - end; - - TcxGridTablePopupMenuOperation = class(TcxGridPopupMenuOperation) - private - function GetHitGridView: TcxGridTableView; - public - property HitGridView: TcxGridTableView read GetHitGridView; - end; - - TcxGridTableColumnMenuOperation = class(TcxGridTablePopupMenuOperation) - private - function GetHitColumn: TcxGridColumn; - public - property HitColumn: TcxGridColumn read GetHitColumn; - end; - - TcxGridPopupMenuOperationsClass = class of TcxGridPopupMenuOperations; - - TcxGridPopupMenuOperations = class - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxGridPopupMenuOperation; - protected - function AddItem(AItemClass: TcxGridPopupMenuOperationClass): TcxGridPopupMenuOperation; - procedure AddItems; virtual; abstract; - procedure ClearItems; - procedure RecreateItems; - public - constructor Create; virtual; - destructor Destroy; override; - function CanProcess(AHitTest: TcxCustomGridHitTest): Boolean; virtual; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxGridPopupMenuOperation read GetItem; default; - end; - -var - cxGridPopupMenuImages: TCustomImageList; - -function GetSummaryImageResourceName(ASummaryKind: TcxSummaryKind): string; - -implementation - -{$R cxGridMenuOperations.res} - -uses - SysUtils, Graphics, cxGridPopupMenuConsts; - -type - TcxGridPopupMenuAccess = class(TcxGridPopupMenu); - -var - FOperationImageResourceNames: TStringList; - -function OperationImageResourceNames: TStringList; -begin - if FOperationImageResourceNames = nil then - FOperationImageResourceNames := TStringList.Create; - Result := FOperationImageResourceNames; -end; - -function GetSummaryImageResourceName(ASummaryKind: TcxSummaryKind): string; -begin - if ASummaryKind = skNone then - Result := '' - else - Result := 'FtrImg' + IntToStr(Ord(ASummaryKind)); -end; - -{ TcxGridPopupMenuOperation } - -constructor TcxGridPopupMenuOperation.Create; -begin - inherited; - FDownState := pmoDefault; - FEnabledState := pmoDefault; - UpdateImage; - FVisibleState := pmoDefault; - FResCaption := @cxSGridNone; -end; - -procedure TcxGridPopupMenuOperation.DoExecute(Sender: TObject); -var - AHandled: Boolean; - AHandler: TNotifyEvent; -begin - AHandled := True; - AHandler := Execute; - FParams := TList.Create; - try - if Assigned(GridPopupMenu.OnMenuItemClick) then - GridPopupMenu.OnMenuItemClick(Sender, GridPopupMenu.HitTest, AHandler, - FParams, AHandled); - if AHandled then AHandler(Sender); - finally - FreeAndNil(FParams); - end; -end; - -procedure TcxGridPopupMenuOperation.Execute(Sender: TObject); -begin -end; - -function TcxGridPopupMenuOperation.GetImageIndex: Integer; -var - B: TBitmap; -begin - Result := -1; - if GetImageResourceName = '' then Exit; - Result := OperationImageResourceNames.IndexOf(GetImageResourceName); - if Result = -1 then - begin - B := TBitmap.Create; - try - B.LoadFromResourceName(HInstance, GetImageResourceName); - if cxGridPopupMenuImages = nil then - cxGridPopupMenuImages := TCustomImageList.CreateSize(B.Width, B.Height); - cxGridPopupMenuImages.AddMasked(B, clDefault); - finally - B.Free; - end; - Result := cxGridPopupMenuImages.Count - 1; - - while OperationImageResourceNames.Count < Result + 1 do - OperationImageResourceNames.Add(''); - OperationImageResourceNames[Result] := GetImageResourceName; - end; -end; - -function TcxGridPopupMenuOperation.GetImageResourceName: string; -begin - Result := ''; -end; - -procedure TcxGridPopupMenuOperation.UpdateImage; -begin - FImageIndex := GetImageIndex; -end; - -class function TcxGridPopupMenuOperation.GetParentOperationClass: TcxGridPopupMenuOperationClass; -begin - Result := nil; -end; - -function TcxGridPopupMenuOperation.GetDown: Boolean; -begin - Result := False; -end; - -function TcxGridPopupMenuOperation.GetCheckedState: Boolean; -begin - Result := GetState(FDownState, GetDown); -end; - -function TcxGridPopupMenuOperation.GetEnabled: Boolean; -begin - Result := True; -end; - -function TcxGridPopupMenuOperation.GetEnabledState: Boolean; -begin - Result := GetState(FEnabledState, GetEnabled); -end; - -function TcxGridPopupMenuOperation.GetVisible: Boolean; -begin - Result := True; -end; - -function TcxGridPopupMenuOperation.GetVisibleState: Boolean; -begin - Result := GetState(FVisibleState, GetVisible); -end; - -function TcxGridPopupMenuOperation.GetCaption: string; -begin - Result := cxGetResourceString(FResCaption); -end; - -function TcxGridPopupMenuOperation.GetGridOperationHelper: TcxGridOperationHelper; -begin - Result := TcxGridPopupMenuAccess(GridPopupMenu).GridOperationHelper; -end; - -function TcxGridPopupMenuOperation.GetGridPopupMenu: TcxGridPopupMenu; -begin - Result := TcxGridPopupMenu(ActiveGridPopupMenu); -end; - -function TcxGridPopupMenuOperation.GetHitGridView: TcxCustomGridView; -begin - Result := GridPopupMenu.HitGridView; -end; - -function TcxGridPopupMenuOperation.GetState(AState: TcxGridPopupMenuOperationState; - AGetFunc: TcxGetStateFunc): boolean; -begin - case AState of - pmoTrue: - Result := True; - pmoFalse: - Result := False; - else - Result := AGetFunc; - end; -end; - -{ TcxGridTablePopupMenuOperation } - -function TcxGridTablePopupMenuOperation.GetHitGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited HitGridView); -end; - -{ TcxGridTableColumnMenuOperation } - -function TcxGridTableColumnMenuOperation.GetHitColumn: TcxGridColumn; -begin - if GridPopupMenu.HitTest is TcxCustomGridColumnHitTest then - Result := TcxCustomGridColumnHitTest(GridPopupMenu.HitTest).Column - else - Result := nil; -end; - -{ TcxGridPopupMenuOperations } - -constructor TcxGridPopupMenuOperations.Create; -begin - inherited; - FItems := TList.Create; - AddItems; -end; - -destructor TcxGridPopupMenuOperations.Destroy; -begin - ClearItems; - FItems.Free; - inherited; -end; - -function TcxGridPopupMenuOperations.GetItem(Index: Integer): TcxGridPopupMenuOperation; -begin - Result := TcxGridPopupMenuOperation(FItems[Index]); -end; - -function TcxGridPopupMenuOperations.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridPopupMenuOperations.AddItem(AItemClass: TcxGridPopupMenuOperationClass): TcxGridPopupMenuOperation; -begin - Result := AItemClass.Create; - FItems.Add(Result); -end; - -procedure TcxGridPopupMenuOperations.ClearItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].Free; - FItems.Clear; -end; - -procedure TcxGridPopupMenuOperations.RecreateItems; -begin - ClearItems; - AddItems; -end; - -function TcxGridPopupMenuOperations.CanProcess(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := True; -end; - -initialization - -finalization - FreeAndNil(FOperationImageResourceNames); - FreeAndNil(cxGridPopupMenuImages); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridMenuOperations.res b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridMenuOperations.res deleted file mode 100644 index d726fd87..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridMenuOperations.res and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenu.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenu.pas deleted file mode 100644 index 4feb2a99..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenu.pas +++ /dev/null @@ -1,481 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridPopupMenu; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, -{$IFDEF DELPHI6} - Types, -{$ENDIF} - SysUtils, Classes, Controls, cxGrid, cxGridCustomView, - cxGridUIHelper, cxGridUICustomTableHelper, cxGridUITableHelper, - cxGridUIBandedTableHelper, cxGridUICardHelper, cxGridCustomPopupMenu; - -type - TcxGridPopupMenu = class(TcxCustomGridPopupMenu) - private - FAlwaysFireOnPopup: Boolean; - FGrid: TcxGrid; - FGridDefaultPopupMenu: TcxGridDefaultPopupMenu; - FGridOperationHelper: TcxGridOperationHelper; - FHitGridView: TcxCustomGridView; - FHitPoint: TPoint; - FHitTest: TcxCustomGridHitTest; - FHitType: TcxGridViewHitType; - FMouseupNotification: TcxCustomGridNotification; - FOnClick: TcxGridPopupMenuItemClickProc; - FOnPopup: TcxGridBeforePopupProc; - FUseBuiltInPopupMenus: Boolean; - procedure CreateBuiltInPopupMenus; - procedure FreeBuiltInPopupMenus; - function GetPopupMenus: TcxPopupMenuInfos; - procedure SetUseBuiltInPopupMenus(const Value: Boolean); - procedure SetGrid(const AValue: TcxGrid); - procedure SetPopupMenus(const AValue: TcxPopupMenuInfos); - function TryPopupAsIcxPopupMenuIntf(APopupMenu: TComponent; - AHitTest: TcxCustomGridHitTest; APoint: TPoint): Boolean; - function TryPopupAsIDoPopupIntf(APopupMenu: TComponent; - AHitTest: TcxCustomGridHitTest; APoint: TPoint): Boolean; - function TryPopupAsVCLPopupMenu(APopupMenu: TComponent; - AHitTest: TcxCustomGridHitTest; APoint: TPoint): Boolean; - protected - function DoOnPopup(ASenderMenu: TComponent; - AHitTest: TcxCustomGridHitTest; X,Y: Integer): Boolean; virtual; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - function DoPopup(AAPPSKeyPressed: Boolean): Boolean; virtual; - function GetPopupMenuInfo(const AMenu: TComponent; const AView: TcxCustomGridView; - SearchDefault: Boolean = True): TcxPopupMenuInfo; override; - property GridOperationHelper: TcxGridOperationHelper read FGridOperationHelper; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function CheckShortCuts(var Message: TWMKeyDown): Boolean; override; - function FindPopupMenuInfo(const AView: TcxCustomGridView; - AHitType: TcxGridViewHitType; AHitTest: TcxCustomGridHitTest): TcxPopupMenuInfo; override; - function GetBuiltInPopupMenuByClass(const AMenuClass: TcxPopupMenuClass): TComponent; - procedure RegisterPopupMenu(const AMenu: TComponent; AHitTypes: TcxGridViewHitTypes; - ADoPopupProc: TcxGridOnPopupProc; const AView: TcxCustomGridView); overload; virtual; - procedure RegisterPopupMenu(const AMenu: TComponent; AHitTypes: TcxGridViewHitTypes; - ADoPopupProc: TcxGridOnPopupProc; AViewClass: TcxCustomGridViewClass); overload; virtual; - procedure UnregisterPopupMenu(const AMenu: TComponent; const AGridView: TcxCustomGridView; - AHitTypes: TcxGridViewHitTypes = []); overload; virtual; - procedure UnregisterPopupMenu(const AMenu: TComponent; AGridViewClass: TcxCustomGridViewClass; - AHitTypes: TcxGridViewHitTypes = []); overload; virtual; - property BuiltInPopupMenus: TcxGridDefaultPopupMenu read FGridDefaultPopupMenu; - property HitGridView: TcxCustomGridView read FHitGridView; - property HitPoint: TPoint read FHitPoint; - property HitTest: TcxCustomGridHitTest read FHitTest; - property HitType: TcxGridViewHitType read FHitType; - published - property Grid: TcxGrid read FGrid write SetGrid; - property PopupMenus: TcxPopupMenuInfos read GetPopupMenus write SetPopupMenus; - property UseBuiltInPopupMenus: Boolean read FUseBuiltInPopupMenus write - SetUseBuiltInPopupMenus default True; - property OnMenuItemClick: TcxGridPopupMenuItemClickProc read FOnClick write FOnClick; - property OnPopup: TcxGridBeforePopupProc read FOnPopup write FOnPopup; - property AlwaysFireOnPopup: Boolean read FAlwaysFireOnPopup write FAlwaysFireOnPopup default False; - end; - -var - ActiveGridPopupMenu: TcxGridPopupMenu; - -implementation - -uses - Forms, cxGridLevel, Dialogs, cxGridStdPopupMenu, Menus, cxGridCustomTableView, cxControls; - -type - TcxGridContextPopupNotification = class(TcxCustomGridNotification) - private - FGridPopupMenu: TcxGridPopupMenu; - protected - procedure Notify(AKind: TcxGridNotificationKind; AData: TObject; var AHandled: Boolean); override; - function NotificationKinds: TcxGridNotificationKinds; override; - end; - - PWMKeyDown = ^TWMKeyDown; - TcxCustomGridCellViewInfoAccess = class(TcxCustomGridCellViewInfo); - TcxCustomGridViewInfoAccess = class(TcxCustomGridViewInfo); - -procedure TcxGridContextPopupNotification.Notify(AKind: TcxGridNotificationKind; - AData: TObject; var AHandled: Boolean); -begin - case (AKind) of - gnkContextMenu: - begin - Application.ProcessMessages; - AHandled := FGridPopupMenu.DoPopup(Boolean(AData)); - end; - gnkKeyDown: - begin - FGridPopupMenu.CheckShortCuts(PWMKeyDown(AData)^); - end; - end; -end; - -function TcxGridContextPopupNotification.NotificationKinds: TcxGridNotificationKinds; -begin - Result := [gnkContextMenu, gnkKeyDown]; -end; - -{TcxGridPopupMenu} - -constructor TcxGridPopupMenu.Create (AOwner: TComponent); -begin - inherited Create(AOwner); - FAlwaysFireOnPopup := False; - FGridDefaultPopupMenu := TcxGridDefaultPopupMenu.Create(Self); - FUseBuiltInPopupMenus := True; - CreateBuiltInPopupMenus; - FGridOperationHelper := TcxGridOperationHelper.Create(Self); - FMouseupNotification := TcxGridContextPopupNotification.Create; - TcxGridContextPopupNotification(FMouseupNotification).FGridPopupMenu := self; -end; - -destructor TcxGridPopupMenu.Destroy; -begin - FreeBuiltInPopupMenus; - FreeAndNil(FGridOperationHelper); - FreeAndNil(FGridDefaultPopupMenu); - if Grid <> nil then - Grid.UnregisterNotification(FMouseupNotification); - FreeAndNil(FMouseupNotification); - inherited Destroy; -end; - -function TcxGridPopupMenu.CheckShortCuts(var Message: TWMKeyDown): Boolean; -begin - Result := inherited CheckShortCuts(Message); - if not Result then - Result := FGridDefaultPopupMenu.CheckShortCuts(Message); -end; - -function TcxGridPopupMenu.GetBuiltInPopupMenuByClass( - const AMenuClass: TcxPopupMenuClass): TComponent; -var - I: Integer; -begin - Result := nil; - for I := 0 to FGridDefaultPopupMenu.Count - 1 do - if Assigned(FGridDefaultPopupMenu[i].PopupMenu) and - (FGridDefaultPopupMenu[i].PopupMenu.ClassType = AMenuClass) then - begin - Result := FGridDefaultPopupMenu[i].PopupMenu; - break; - end; -end; - -function TcxGridPopupMenu.FindPopupMenuInfo(const AView: TcxCustomGridView; - AHitType: TcxGridViewHitType; AHitTest: TcxCustomGridHitTest): TcxPopupMenuInfo; -begin - Result := inherited FindPopupMenuInfo(AView, AHitType, AHitTest); - if Result = nil then - Result := FGridDefaultPopupMenu.FindPopupMenuInfo(AView, AHitType, AHitTest); -end; - -function TcxGridPopupMenu.GetPopupMenuInfo(const AMenu: TComponent; - const AView: TcxCustomGridView; SearchDefault: Boolean = True): TcxPopupMenuInfo; -var - I : Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - If (AMenu = MenuInfos[I].PopupMenu) and (AView = MenuInfos[I].GridView) then - begin - Result := MenuInfos[I]; - Result.Index := I; - break; - end; - if SearchDefault and not Assigned(Result) then - Result := FGridDefaultPopupMenu.GetPopupMenuInfo(AMenu, - TcxCustomGridViewClass(AView.ClassType)); -end; - -procedure TcxGridPopupMenu.Notification(AComponent: TComponent; Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = Grid) then - FGrid := nil; -end; - -procedure TcxGridPopupMenu.RegisterPopupMenu(const AMenu: TComponent; - AHitTypes: TcxGridViewHitTypes; ADoPopupProc: TcxGridOnPopupProc; - const AView: TcxCustomGridView); -begin - if not Assigned(AView) then exit; - AdjustMenuInfo(GetPopupMenuInfo(AMenu, AView), AMenu, AHitTypes, ADoPopupProc, - nil, AView); -end; - -procedure TcxGridPopupMenu.RegisterPopupMenu(const AMenu: TComponent; - AHitTypes: TcxGridViewHitTypes; ADoPopupProc: TcxGridOnPopupProc; - AViewClass: TcxCustomGridViewClass); -begin - FGridDefaultPopupMenu.RegisterPopupMenu(AMenu, AHitTypes, ADoPopupProc, AViewClass); -end; - -procedure TcxGridPopupMenu.UnregisterPopupMenu(const AMenu: TComponent; - const AGridView: TcxCustomGridView; AHitTypes: TcxGridViewHitTypes); -var - AMenuInfo: TcxPopupMenuInfo; -begin - AMenuInfo := GetPopupMenuInfo(AMenu, AGridView, false); - If (AMenuInfo <> nil) then - If AMenuInfo.HitTypes = AHitTypes then - AMenuInfo.Free - else - AMenuInfo.HitTypes := AMenuInfo.HitTypes - AHitTypes; -end; - -procedure TcxGridPopupMenu.UnregisterPopupMenu(const AMenu: TComponent; - AGridViewClass: TcxCustomGridViewClass; AHitTypes: TcxGridViewHitTypes = []); -begin - FGridDefaultPopupMenu.UnRegisterPopupMenu(AMenu, AGridViewClass, AHitTypes); -end; - -function TcxGridPopupMenu.DoOnPopup(ASenderMenu: TComponent; - AHitTest: TcxCustomGridHitTest; X, - Y: Integer): Boolean; -begin - Result := True; - if Assigned(FOnPopup) then - FOnPopup(ASenderMenu, AHitTest, X, Y, Result); -end; - -function TcxGridPopupMenu.DoPopup(AAPPSKeyPressed: Boolean): Boolean; - - function DoAutoPopup(AMenuInfo:TcxPopupMenuInfo; AHitTest: TcxCustomGridHitTest; - APoint: TPoint): Boolean; - begin - Result := Assigned(AMenuInfo.PopupMenu); - if Result then - Result := TryPopupAsIDoPopupIntf(AMenuInfo.PopupMenu, AHitTest, APoint) or - TryPopupAsIcxPopupMenuIntf(AMenuInfo.PopupMenu, AHitTest, APoint) or - TryPopupAsVCLPopupMenu(AMenuInfo.PopupMenu, AHitTest, APoint); - end; - - function DoPopupByAPPSKey(var AHitCode: Integer; var APoint: TPoint): Boolean; - var - AViewInfo: TcxCustomGridCellViewInfo; - ABounds: TRect; - begin - Result := FHitGridView is TcxCustomGridTableView; - if not Result then Exit; - with TcxCustomGridTableView(FHitGridView).Controller do - begin - if (FocusedRecord <> nil) then - begin - if not FocusedRecord.Visible then - MakeFocusedRecordVisible; - if (FocusedItem <> nil) and (FocusedItem.FocusedCellViewInfo <> nil) then - begin - ABounds := FocusedItem.FocusedCellViewInfo.ContentBounds; - AViewInfo := FocusedItem.FocusedCellViewInfo; - end - else - begin - ABounds := FocusedRecord.ViewInfo.ContentBounds; - if ABounds.Left < 0 then - ABounds.Left := 0; - AViewInfo := FocusedRecord.ViewInfo; - end; - with ABounds do - APoint := Point(Left, Bottom); - FHitTest := TcxCustomGridCellViewInfoAccess(AViewInfo).GetHitTestClass.Instance(APoint); - TcxCustomGridCellViewInfoAccess(AViewInfo).InitHitTest(FHitTest); - end - else - begin - APoint := Point(0,0); - FHitTest := TcxGridViewNoneHitTest.Instance(APoint); - TcxCustomGridViewInfoAccess(FHitGridView.Site.ViewInfo).InitHitTest(FHitTest); - end; - AHitCode := FHitTest.HitTestCode; - FHitPoint := APoint; - APoint := FHitGridView.Site.ClientToScreen(APoint); - end; - end; - - function InternalPopup(AHitType: TcxGridViewHitType; APoint: TPoint; - AHitTest: TcxCustomGridHitTest): Boolean; - var - AMenuInfo: TcxPopupMenuInfo; - begin - Result := False; - if FHitGridView = nil then Exit; - AMenuInfo := FindPopupMenuInfo(FHitGridView.PatternGridView, AHitType, AHitTest); - if AMenuInfo = nil then - Exit; - if Assigned(AMenuInfo.OnPopup) then - begin - if Assigned(AMenuInfo.PopupMenu) or FAlwaysFireOnPopup then - begin - if DoOnPopup(AMenuInfo.PopupMenu, AHitTest, APoint.X, APoint.Y) then - AMenuInfo.OnPopup(AMenuInfo.PopupMenu, AHitTest, APoint.X, APoint.Y); - Result := True; - end; - end - else - Result := DoAutoPopup(AMenuInfo, AHitTest, APoint); - end; - -var - AHitCode: Integer; - APoint: TPoint; -begin - Result := True; - FHitGridView := Grid.FocusedView; - ActiveGridPopupMenu := Self; - AHitCode := 0; - if AAPPSKeyPressed then - Result := DoPopupByAPPSKey(AHitCode, APoint) - else - begin - GetCursorPos(APoint); - FHitPoint := Grid.ScreenToClient(APoint); - FHitTest := Grid.ViewInfo.GetHitTest(FHitPoint.X, FHitPoint.Y); - AHitCode := FHitTest.HitTestCode; - if (FHitGridView = nil) or - not PtInRect(FHitGridView.Site.ClientRect, FHitGridView.Site.ScreenToClient(APoint)) then - AHitCode := AHitCode + cxhtGridBase; - end; - if Result then - begin - FHitType := GetHitTypeByHitCode(AHitCode); - Result := InternalPopup(FHitType, APoint, FHitTest); - end; -end; - -procedure TcxGridPopupMenu.CreateBuiltInPopupMenus; -begin - BuiltInPopupMenuList.RegisterItemsTo(FGridDefaultPopupMenu); -end; - -procedure TcxGridPopupMenu.FreeBuiltInPopupMenus; -var - I: Integer; -begin - for I := FGridDefaultPopupMenu.Count - 1 downto 0 do - if FGridDefaultPopupMenu[I].IsBuiltIn then - FGridDefaultPopupMenu[I].Free; -end; - -function TcxGridPopupMenu.GetPopupMenus: TcxPopupMenuInfos; -begin - Result := PopupMenuInfos; -end; - -procedure TcxGridPopupMenu.SetUseBuiltInPopupMenus(const Value: Boolean); -begin - if FUseBuiltInPopupMenus <> Value then - if Value then - CreateBuiltInPopupMenus - else - FreeBuiltInPopupMenus; - FUseBuiltInPopupMenus := Value; -end; - -procedure TcxGridPopupMenu.SetGrid(const AValue: TcxGrid); -begin - if FGrid <> AValue then - begin - FGridOperationHelper.Grid := AValue; - if (FGrid <> nil) and not (csDestroying in FGrid.ComponentState) then - begin - FGrid.UnregisterNotification(FMouseupNotification); - FGrid.RemoveFreeNotification(self); - ClearMenuInfosGridView; - end; - FGrid := AValue; - if FGrid <> nil then - begin - FGrid.FreeNotification(self); - FGrid.RegisterNotification(FMouseupNotification); - end; - end; -end; - -procedure TcxGridPopupMenu.SetPopupMenus(const AValue: TcxPopupMenuInfos); -begin - PopupMenuInfos.Assign(AValue); -end; - -function TcxGridPopupMenu.TryPopupAsIcxPopupMenuIntf(APopupMenu: TComponent; - AHitTest: TcxCustomGridHitTest; APoint: TPoint): Boolean; -var - AIcxPopupMenuIntf: IcxPopupMenu; -begin - Result := False; - if APopupMenu = nil then - Exit; - Result := Supports(APopupMenu, IcxPopupMenu, AIcxPopupMenuIntf); - if Result and DoOnPopup(APopupMenu, AHitTest, APoint.X, APoint.Y) then - AIcxPopupMenuIntf.Popup(APoint.X, APoint.Y); -end; - -function TcxGridPopupMenu.TryPopupAsIDoPopupIntf(APopupMenu: TComponent; - AHitTest: TcxCustomGridHitTest; APoint: TPoint): Boolean; -var - AIDoPopupIntf: IDoPopup; -begin - Result := False; - if APopupMenu = nil then - Exit; - Result := Supports(APopupMenu, IDoPopup, AIDoPopupIntf); - if Result and DoOnPopup(APopupMenu, AHitTest, APoint.X, APoint.Y) then - TcxGridOnPopupProc(AIDoPopupIntf.GetPopupHandler)( - APopupMenu, AHitTest, APoint.X, APoint.Y); -end; - -function TcxGridPopupMenu.TryPopupAsVCLPopupMenu(APopupMenu: TComponent; - AHitTest: TcxCustomGridHitTest; APoint: TPoint): Boolean; -begin - Result := False; - if APopupMenu = nil then - Exit; - Result := - (APopupMenu is TPopupMenu) or (APopupMenu.InheritsFrom(TPopupMenu)); - if Result and DoOnPopup(APopupMenu, AHitTest, APoint.X, APoint.Y) then - begin - TPopupMenu(APopupMenu).PopupComponent := FHitGridView; - TPopupMenu(APopupMenu).Popup(APoint.X, APoint.Y); - end; -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenuConsts.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenuConsts.pas deleted file mode 100644 index beac5ee5..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenuConsts.pas +++ /dev/null @@ -1,141 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridPopupMenuConsts; - -{$I cxVer.inc} - -interface - -uses - cxClasses, cxCustomData, dxCore; - -resourcestring - cxSGridNone = 'None'; - - // Header popup menu item captions - - cxSGridSortColumnAsc = 'Sort Ascending'; - cxSGridSortColumnDesc = 'Sort Descending'; - cxSGridClearSorting = 'Clear Sorting'; - cxSGridGroupByThisField = 'Group By This Field'; - cxSGridRemoveThisGroupItem = 'Remove from grouping'; - cxSGridGroupByBox = 'Group By Box'; - cxSGridAlignmentSubMenu = 'Alignment'; - cxSGridAlignLeft = 'Align Left'; - cxSGridAlignRight = 'Align Right'; - cxSGridAlignCenter = 'Align Center'; - cxSGridRemoveColumn = 'Remove This Column'; - cxSGridFieldChooser = 'Field Chooser'; - cxSGridBestFit = 'Best Fit'; - cxSGridBestFitAllColumns = 'Best Fit (all columns)'; - cxSGridShowFooter = 'Footer'; - cxSGridShowGroupFooter = 'Group Footers'; - - // Footer popup menu item captions - - cxSGridNoneMenuItem = 'None'; - cxSGridSumMenuItem = 'Sum'; - cxSGridMinMenuItem = 'Min'; - cxSGridMaxMenuItem = 'Max'; - cxSGridCountMenuItem = 'Count'; - cxSGridAvgMenuItem = 'Average'; - - // Group row popup menu item captions - - cxSGridSortByGroupValues = 'Sort by Group Value'; - cxSGridSortBySummaryCaption = 'Sort by Group Summary:'; - cxSGridSortBySummary = '%s for %s'; - -function GetSummaryName(ASummaryKind: TcxSummaryKind): TcxResourceStringID; - -implementation - -function GetSummaryName(ASummaryKind: TcxSummaryKind): TcxResourceStringID; -const - SummaryNames: array[TcxSummaryKind] of TcxResourceStringID = ( - @cxSGridNoneMenuItem, - @cxSGridSumMenuItem, - @cxSGridMinMenuItem, - @cxSGridMaxMenuItem, - @cxSGridCountMenuItem, - @cxSGridAvgMenuItem); -begin - Result := SummaryNames[ASummaryKind]; -end; - -procedure AddcxGridPopupMenuResourceStringNames(AProduct: TdxProductResourceStrings); - - procedure InternalAdd(const AResourceStringName: string; AAdress: Pointer); - begin - AProduct.Add(AResourceStringName, AAdress); - end; - -begin - InternalAdd('cxSGridNone', @cxSGridNone); - InternalAdd('cxSGridSortColumnAsc', @cxSGridSortColumnAsc); - InternalAdd('cxSGridSortColumnDesc', @cxSGridSortColumnDesc); - InternalAdd('cxSGridClearSorting', @cxSGridClearSorting); - InternalAdd('cxSGridGroupByThisField', @cxSGridGroupByThisField); - InternalAdd('cxSGridRemoveThisGroupItem', @cxSGridRemoveThisGroupItem); - InternalAdd('cxSGridGroupByBox', @cxSGridGroupByBox); - InternalAdd('cxSGridAlignmentSubMenu', @cxSGridAlignmentSubMenu); - InternalAdd('cxSGridAlignLeft', @cxSGridAlignLeft); - InternalAdd('cxSGridAlignRight', @cxSGridAlignRight); - InternalAdd('cxSGridAlignCenter', @cxSGridAlignCenter); - InternalAdd('cxSGridRemoveColumn', @cxSGridRemoveColumn); - InternalAdd('cxSGridFieldChooser', @cxSGridFieldChooser); - InternalAdd('cxSGridBestFit', @cxSGridBestFit); - InternalAdd('cxSGridBestFitAllColumns', @cxSGridBestFitAllColumns); - InternalAdd('cxSGridShowFooter', @cxSGridShowFooter); - InternalAdd('cxSGridShowGroupFooter', @cxSGridShowGroupFooter); - InternalAdd('cxSGridNoneMenuItem', @cxSGridNoneMenuItem); - InternalAdd('cxSGridSumMenuItem', @cxSGridSumMenuItem); - InternalAdd('cxSGridMinMenuItem', @cxSGridMinMenuItem); - InternalAdd('cxSGridMaxMenuItem', @cxSGridMaxMenuItem); - InternalAdd('cxSGridCountMenuItem', @cxSGridCountMenuItem); - InternalAdd('cxSGridAvgMenuItem', @cxSGridAvgMenuItem); - InternalAdd('cxSGridSortByGroupValues', @cxSGridSortByGroupValues); - InternalAdd('cxSGridSortBySummaryCaption', @cxSGridSortBySummaryCaption); - InternalAdd('cxSGridSortBySummary', @cxSGridSortBySummary); -end; - -initialization - dxResourceStringsRepository.RegisterProduct('cxGridPopupMenu', @AddcxGridPopupMenuResourceStringNames); - -finalization - dxResourceStringsRepository.UnRegisterProduct('cxGridPopupMenu'); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenuReg.dcr b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenuReg.dcr deleted file mode 100644 index af5c58f5..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenuReg.dcr and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenuReg.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenuReg.pas deleted file mode 100644 index d9b5bd99..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPopupMenuReg.pas +++ /dev/null @@ -1,116 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridPopupMenuReg; - -{$I cxVer.inc} - -interface - -procedure Register; - -implementation - -uses -{$IFDEF DELPHI6} - DesignIntf, DesignEditors, - Types, -{$ELSE} - DsgnIntf, cxClasses, -{$ENDIF} - Windows, Classes, Messages, SysUtils, cxGridPopupMenu, cxGridCustomPopupMenu, - cxGridReg, TypInfo, Dialogs; - -type - TcxGridPopupMenuEditor = class(TComponentEditor) - public - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - end; - - TcxGridPopupMenuProperty = class(TComponentProperty) - private - FGetValuesStrProc: TGetStrProc; - protected - procedure ReceiveComponentNames(const S: string); - public - procedure GetValues(Proc: TGetStrProc); override; - end; - -procedure Register; -begin - RegisterPropertyEditor(TypeInfo(TComponent), TcxPopupMenuInfo, 'PopupMenu', TcxGridPopupMenuProperty); - RegisterComponentEditor(TcxGridPopupMenu, TcxGridPopupMenuEditor); - RegisterComponents('Dev Express', [TcxGridPopupMenu]); -end; - -{ TcxGridPopupMenuEditor } - -function TcxGridPopupMenuEditor.GetVerb(Index: Integer): string; -begin - case Index of - 0: Result := 'ExpressQuantumGrid Suite ' + cxGridVersion; - 1: Result := 'www.devexpress.com'; - end; -end; - -function TcxGridPopupMenuEditor.GetVerbCount: Integer; -begin - Result := 2; -end; - -{ TcxGridPopupMenuProperty } - -procedure TcxGridPopupMenuProperty.GetValues(Proc: TGetStrProc); -begin - FGetValuesStrProc := Proc; - try - Designer.GetComponentNames(GetTypeData(GetPropType), ReceiveComponentNames); - finally - FGetValuesStrProc := nil; - end; -end; - -procedure TcxGridPopupMenuProperty.ReceiveComponentNames(const S: string); -var - AComponent: TComponent; -begin - AComponent := Designer.GetComponent(S); - if Assigned(FGetValuesStrProc) and Assigned(AComponent) and - (Supports(AComponent, IDoPopup) or (AComponent.ClassName = 'TPopupMenu') or - (AComponent.ClassName = 'TdxBarPopupMenu')) then - FGetValuesStrProc(S); -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPredefinedStyles.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPredefinedStyles.dfm deleted file mode 100644 index bf3a1f73..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPredefinedStyles.dfm +++ /dev/null @@ -1,4857 +0,0 @@ -object cxdmGridPredefinedStyles: TcxdmGridPredefinedStyles - OldCreateOrder = False - Left = 262 - Top = 123 - Height = 253 - Width = 356 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 160 - Top = 96 - object ClassicBackground: TcxStyle - AssignedValues = [svColor] - Color = 15451300 - end - object ClassicContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 16247513 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object ClassicContentEven: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16247513 - TextColor = clBlack - end - object ClassicContentOdd: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16247513 - TextColor = clBlack - end - object ClassicFilterBox: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14811135 - TextColor = clBlack - end - object ClassicFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14811135 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clNavy - end - object ClassicGroup: TcxStyle - AssignedValues = [svColor] - Color = 14872561 - end - object ClassicGroupByBox: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 4707838 - TextColor = clBlack - end - object ClassicHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12937777 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object ClassicInactive: TcxStyle - AssignedValues = [svColor] - Color = 15451300 - end - object ClassicIncSearch: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 4707838 - TextColor = clBlack - end - object ClassicIndicator: TcxStyle - AssignedValues = [svColor] - Color = 15451300 - end - object ClassicPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14811135 - Font.Charset = DEFAULT_CHARSET - Font.Color = clNavy - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clNavy - end - object ClassicSelection: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 12937777 - TextColor = clWhite - end - object cxStyle1: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8894686 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle2: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8894686 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -12 - Font.Name = 'Arial Narrow' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle3: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -12 - Font.Name = 'Arial Narrow' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle4: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 1262987 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Arial' - Font.Style = [] - TextColor = clWhite - end - object cxStyle5: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlue - end - object cxStyle6: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 15136253 - Font.Charset = DEFAULT_CHARSET - Font.Color = 7346457 - Font.Height = -12 - Font.Name = 'Arial Narrow' - Font.Style = [] - TextColor = 7346457 - end - object cxStyle7: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16436871 - TextColor = clBlack - end - object cxStyle8: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 8036607 - TextColor = clBlack - end - object cxStyle9: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12180223 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle10: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -12 - Font.Name = 'Arial Narrow' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle11: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8894686 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Arial Narrow' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle12: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9157775 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle13: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9157775 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -12 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle14: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4615972 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle15: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5737262 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Arial Black' - Font.Style = [] - TextColor = clBlack - end - object cxStyle16: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlue - end - object cxStyle17: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle18: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 9234160 - TextColor = clBlack - end - object cxStyle19: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 11788021 - TextColor = clBlack - end - object cxStyle20: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11193702 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clBlack - end - object cxStyle21: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5736750 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle22: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9157775 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle23: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13749760 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle24: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13749760 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -12 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle25: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 166 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -12 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle26: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8519755 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 14481663 - end - object cxStyle27: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlue - end - object cxStyle28: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle29: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16775416 - TextColor = clBlack - end - object cxStyle30: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16443110 - TextColor = clBlack - end - object cxStyle31: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14599344 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle32: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 191 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -12 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle33: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13749760 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle34: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6908265 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle35: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6908265 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle36: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 85 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle37: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle38: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlue - end - object cxStyle39: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle40: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle41: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15461355 - TextColor = clBlack - end - object cxStyle42: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle43: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 85 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle44: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6908265 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle45: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10862530 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle46: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10862530 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle47: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6392205 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle48: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 66 - Font.Charset = DEFAULT_CHARSET - Font.Color = 13820129 - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13820129 - end - object cxStyle49: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clMaroon - end - object cxStyle50: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle51: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 10862530 - TextColor = clBlack - end - object cxStyle52: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13820129 - TextColor = clBlack - end - object cxStyle53: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6392205 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 13820129 - end - object cxStyle54: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6392205 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle55: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10862530 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle56: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12307669 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle57: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12307669 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle58: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle59: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6852002 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle60: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clTeal - end - object cxStyle61: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle62: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 12307669 - TextColor = clBlack - end - object cxStyle63: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14542570 - TextColor = clBlack - end - object cxStyle64: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6852002 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle65: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle66: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12307669 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle67: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11055248 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle68: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11055248 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle69: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 7897176 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle70: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4194368 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle71: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = 7897176 - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = 7897176 - end - object cxStyle72: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle73: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 11055248 - TextColor = clBlack - end - object cxStyle74: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14211272 - TextColor = clBlack - end - object cxStyle75: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 7897176 - Font.Charset = DEFAULT_CHARSET - Font.Color = 524288 - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = 524288 - end - object cxStyle76: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 7897176 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle77: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11055248 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle78: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14264494 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle79: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14264494 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Garamond' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle80: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11619930 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle81: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle82: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = 11619930 - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 11619930 - end - object cxStyle83: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Garamond' - Font.Style = [] - TextColor = clBlack - end - object cxStyle84: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14264494 - TextColor = clBlack - end - object cxStyle85: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15521240 - TextColor = clBlack - end - object cxStyle86: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11619930 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle87: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11619930 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle88: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14264494 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle89: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11458790 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle90: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11458790 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle91: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4630214 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle92: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle93: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clMaroon - end - object cxStyle94: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle95: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 11458790 - TextColor = clBlack - end - object cxStyle96: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14150898 - TextColor = clBlack - end - object cxStyle97: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4630214 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 14150898 - end - object cxStyle98: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4630214 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle99: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11458790 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle100: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12107912 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle101: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12107912 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle102: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6053956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle103: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4673068 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle104: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14213320 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clNavy - end - object cxStyle105: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14213320 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle106: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 12107912 - TextColor = clBlack - end - object cxStyle107: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14213320 - TextColor = clBlack - end - object cxStyle108: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8949832 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clSilver - end - object cxStyle109: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6053956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle110: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12107912 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle111: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9476264 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle112: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9476264 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle113: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4210816 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 13160664 - end - object cxStyle114: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4204608 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle115: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160664 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 6307912 - end - object cxStyle116: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160664 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle117: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 10266296 - TextColor = clBlack - end - object cxStyle118: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14476524 - TextColor = clBlack - end - object cxStyle119: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5791864 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 9476264 - end - object cxStyle120: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4210816 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 13160664 - end - object cxStyle121: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9476264 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle122: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10343916 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle123: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10343916 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle124: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4944971 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle125: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4325442 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle126: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 3122647 - end - object cxStyle127: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle128: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 10343916 - TextColor = clBlack - end - object cxStyle129: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13626101 - TextColor = clBlack - end - object cxStyle130: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3122647 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 13626101 - end - object cxStyle131: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4944971 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle132: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10343916 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle133: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11639171 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle134: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11639171 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle135: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8217935 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle136: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle137: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 8217935 - end - object cxStyle138: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle139: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 11639171 - TextColor = clBlack - end - object cxStyle140: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14273729 - TextColor = clBlack - end - object cxStyle141: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8217935 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 14273729 - end - object cxStyle142: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8217935 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle143: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11639171 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle144: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clBlack - end - object cxStyle145: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle146: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clMaroon - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clWhite - end - object cxStyle147: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4325376 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle148: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clMaroon - end - object cxStyle149: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clBlack - end - object cxStyle150: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle151: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle152: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clSilver - end - object cxStyle153: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clMaroon - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clWhite - end - object cxStyle154: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle155: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13158655 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle156: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13158655 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle157: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5855675 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle158: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3552892 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle159: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 7364767 - end - object cxStyle160: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 15461375 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle161: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15461375 - TextColor = clBlack - end - object cxStyle162: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15461375 - TextColor = clBlack - end - object cxStyle163: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3552892 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 14540253 - end - object cxStyle164: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5855675 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle165: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13158655 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clBlack - end - object cxStyle166: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12103888 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle167: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13158655 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Arial' - Font.Style = [] - TextColor = clBlack - end - object cxStyle168: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5855675 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -16 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle169: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3552892 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clWhite - end - object cxStyle170: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 7364768 - end - object cxStyle171: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 15461375 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Arial' - Font.Style = [] - TextColor = clBlack - end - object cxStyle172: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15461375 - TextColor = clBlack - end - object cxStyle173: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle174: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3552892 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 14540253 - end - object cxStyle175: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5855675 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -16 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle176: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12103888 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clBlack - end - object cxStyle177: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13154717 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle178: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13154717 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle179: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9928789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle180: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4276545 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle181: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 9928789 - end - object cxStyle182: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle183: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13154717 - TextColor = clBlack - end - object cxStyle184: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14933198 - TextColor = clBlack - end - object cxStyle185: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9928789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clSilver - end - object cxStyle186: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9928789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle187: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13154717 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle188: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11126946 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle189: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11126946 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle190: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6592345 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle191: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 2178849 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle192: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 6592345 - end - object cxStyle193: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle194: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 11126946 - TextColor = clBlack - end - object cxStyle195: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13886416 - TextColor = clBlack - end - object cxStyle196: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6592345 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 13886416 - end - object cxStyle197: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6592345 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle198: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11126946 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle199: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle200: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle201: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4194432 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle202: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle203: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clPurple - end - object cxStyle204: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle205: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle206: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle207: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clSilver - end - object cxStyle208: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4194432 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle209: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle210: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle211: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle212: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle213: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4210688 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle214: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clTeal - end - object cxStyle215: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle216: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle217: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle218: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle219: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle220: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle221: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10542814 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle222: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10542814 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle223: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clOlive - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle224: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 1916928 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle225: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clOlive - end - object cxStyle226: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle227: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 10542814 - TextColor = clBlack - end - object cxStyle228: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13692654 - TextColor = clBlack - end - object cxStyle229: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4308156 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle230: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clOlive - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle231: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10542814 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle232: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle233: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle234: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle235: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10841658 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle236: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clNavy - end - object cxStyle237: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle238: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle239: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle240: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clSilver - end - object cxStyle241: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle242: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle243: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle244: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle245: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle246: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10841658 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle247: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clNavy - end - object cxStyle248: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle249: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14671839 - TextColor = clBlack - end - object cxStyle250: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle251: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clSilver - end - object cxStyle252: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle253: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle254: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle255: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle256: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6956042 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle257: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10841658 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle258: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 6956042 - end - object cxStyle259: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle260: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13160660 - TextColor = clBlack - end - object cxStyle261: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle262: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13160660 - end - object cxStyle263: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6956042 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle264: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle265: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle266: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle267: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6956042 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle268: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10841658 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle269: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 6956042 - end - object cxStyle270: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle271: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13160660 - TextColor = clBlack - end - object cxStyle272: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle273: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13160660 - end - object cxStyle274: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6956042 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle275: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle276: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle277: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle278: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 206 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle279: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clSilver - Font.Height = -11 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clSilver - end - object cxStyle280: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlue - end - object cxStyle281: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clYellow - end - object cxStyle282: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle283: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle284: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle285: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 206 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle286: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle287: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle288: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle289: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 206 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle290: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle291: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlue - end - object cxStyle292: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clYellow - end - object cxStyle293: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle294: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle295: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle296: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 206 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle297: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle298: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clYellow - end - object cxStyle299: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clYellow - end - object cxStyle300: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle301: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle302: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clAqua - end - object cxStyle303: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle304: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle305: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle306: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle307: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle308: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle309: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clYellow - end - object cxStyle310: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clYellow - end - object cxStyle311: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle312: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle313: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clAqua - end - object cxStyle314: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle315: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle316: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle317: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle318: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle319: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle320: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle321: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle322: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clPurple - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle323: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle324: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clPurple - end - object cxStyle325: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle326: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle327: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clWhite - end - object cxStyle328: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle329: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clPurple - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle330: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle331: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle332: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle333: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clPurple - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle334: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle335: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clPurple - end - object cxStyle336: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle337: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle338: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clWhite - end - object cxStyle339: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle340: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clPurple - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle341: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle342: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle343: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle344: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle345: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clSilver - Font.Height = -11 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clSilver - end - object cxStyle346: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle347: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle348: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle349: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15658734 - TextColor = clBlack - end - object cxStyle350: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle351: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle352: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle353: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle354: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle355: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle356: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clSilver - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clSilver - end - object cxStyle357: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle358: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle359: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle360: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15658734 - TextColor = clBlack - end - object cxStyle361: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle362: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle363: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object ClassicRowCaption: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16749885 - TextColor = clWhite - end - object cxStyle364: TcxStyle - AssignedValues = [svColor] - Color = clSilver - end - object cxStyle365: TcxStyle - AssignedValues = [svColor] - Color = 13160660 - end - object cxStyle366: TcxStyle - AssignedValues = [svColor] - Color = 13160660 - end - object GridTableViewStyleSheetDevExpress: TcxGridTableViewStyleSheet - Caption = 'DevExpress' - Styles.Background = ClassicBackground - Styles.Content = ClassicContent - Styles.ContentEven = ClassicContentEven - Styles.ContentOdd = ClassicContentOdd - Styles.FilterBox = ClassicFilterBox - Styles.Inactive = ClassicInactive - Styles.IncSearch = ClassicIncSearch - Styles.Selection = ClassicSelection - Styles.Footer = ClassicFooter - Styles.Group = ClassicGroup - Styles.GroupByBox = ClassicGroupByBox - Styles.Header = ClassicHeader - Styles.Indicator = ClassicIndicator - Styles.Preview = ClassicPreview - BuiltIn = True - end - object GridBandedTableViewStyleSheetDevExpress: TcxGridBandedTableViewStyleSheet - Caption = 'DevExpress' - Styles.Background = ClassicBackground - Styles.Content = ClassicContent - Styles.ContentEven = ClassicContentEven - Styles.ContentOdd = ClassicContentOdd - Styles.FilterBox = ClassicFilterBox - Styles.Inactive = ClassicInactive - Styles.IncSearch = ClassicIncSearch - Styles.Selection = ClassicSelection - Styles.Footer = ClassicFooter - Styles.Group = ClassicGroup - Styles.GroupByBox = ClassicGroupByBox - Styles.Header = ClassicHeader - Styles.Indicator = ClassicIndicator - Styles.Preview = ClassicPreview - Styles.BandBackground = ClassicBackground - Styles.BandHeader = ClassicHeader - BuiltIn = True - end - object GridCardViewStyleSheetDevExpress: TcxGridCardViewStyleSheet - Caption = 'DevExpress' - Styles.Background = ClassicBackground - Styles.Content = ClassicContent - Styles.ContentEven = ClassicContentOdd - Styles.ContentOdd = ClassicContentEven - Styles.Inactive = ClassicInactive - Styles.IncSearch = ClassicIncSearch - Styles.Selection = ClassicSelection - Styles.CaptionRow = ClassicHeader - Styles.CardBorder = ClassicHeader - Styles.RowCaption = ClassicRowCaption - BuiltIn = True - end - object GridTableViewStyleSheetUserFormat1: TcxGridTableViewStyleSheet - Caption = 'UserFormat1' - Styles.Content = cxStyle6 - Styles.ContentEven = cxStyle7 - Styles.ContentOdd = cxStyle8 - Styles.Inactive = cxStyle10 - Styles.Selection = cxStyle3 - Styles.Footer = cxStyle1 - Styles.Group = cxStyle9 - Styles.GroupByBox = cxStyle4 - Styles.Header = cxStyle2 - Styles.Indicator = cxStyle11 - Styles.Preview = cxStyle5 - BuiltIn = True - end - object GridBandedTableViewStyleSheetUserFormat1: TcxGridBandedTableViewStyleSheet - Caption = 'UserFormat1' - Styles.Content = cxStyle6 - Styles.ContentEven = cxStyle7 - Styles.ContentOdd = cxStyle8 - Styles.Inactive = cxStyle10 - Styles.Selection = cxStyle3 - Styles.Footer = cxStyle1 - Styles.Group = cxStyle9 - Styles.GroupByBox = cxStyle4 - Styles.Header = cxStyle2 - Styles.Indicator = cxStyle11 - Styles.Preview = cxStyle5 - Styles.BandHeader = cxStyle2 - BuiltIn = True - end - object GridCardViewStyleSheetUserFormat1: TcxGridCardViewStyleSheet - Caption = 'UserFormat1' - Styles.Content = cxStyle6 - Styles.ContentEven = cxStyle7 - Styles.ContentOdd = cxStyle8 - Styles.Inactive = cxStyle10 - Styles.Selection = cxStyle3 - Styles.CaptionRow = cxStyle2 - Styles.RowCaption = cxStyle2 - BuiltIn = True - end - object GridTableViewStyleSheetUserFormat2: TcxGridTableViewStyleSheet - Caption = 'UserFormat2' - Styles.Content = cxStyle17 - Styles.ContentEven = cxStyle18 - Styles.ContentOdd = cxStyle19 - Styles.Inactive = cxStyle21 - Styles.Selection = cxStyle14 - Styles.Footer = cxStyle12 - Styles.Group = cxStyle20 - Styles.GroupByBox = cxStyle15 - Styles.Header = cxStyle13 - Styles.Indicator = cxStyle22 - Styles.Preview = cxStyle16 - BuiltIn = True - end - object GridBandedTableViewStyleSheetUserFormat2: TcxGridBandedTableViewStyleSheet - Caption = 'UserFormat2' - Styles.Content = cxStyle17 - Styles.ContentEven = cxStyle18 - Styles.ContentOdd = cxStyle19 - Styles.Inactive = cxStyle21 - Styles.Selection = cxStyle14 - Styles.Footer = cxStyle12 - Styles.Group = cxStyle20 - Styles.GroupByBox = cxStyle15 - Styles.Header = cxStyle13 - Styles.Indicator = cxStyle22 - Styles.Preview = cxStyle16 - Styles.BandHeader = cxStyle13 - BuiltIn = True - end - object GridCardViewStyleSheetUserFormat2: TcxGridCardViewStyleSheet - Caption = 'UserFormat2' - Styles.Content = cxStyle17 - Styles.ContentEven = cxStyle18 - Styles.ContentOdd = cxStyle19 - Styles.Inactive = cxStyle21 - Styles.Selection = cxStyle14 - Styles.CaptionRow = cxStyle13 - Styles.RowCaption = cxStyle13 - BuiltIn = True - end - object GridTableViewStyleSheetUserFormat3: TcxGridTableViewStyleSheet - Caption = 'UserFormat3' - Styles.Content = cxStyle28 - Styles.ContentEven = cxStyle29 - Styles.ContentOdd = cxStyle30 - Styles.Inactive = cxStyle32 - Styles.Selection = cxStyle25 - Styles.Footer = cxStyle23 - Styles.Group = cxStyle31 - Styles.GroupByBox = cxStyle26 - Styles.Header = cxStyle24 - Styles.Indicator = cxStyle33 - Styles.Preview = cxStyle27 - BuiltIn = True - end - object GridBandedTableViewStyleSheetUserFormat3: TcxGridBandedTableViewStyleSheet - Caption = 'UserFormat3' - Styles.Content = cxStyle28 - Styles.ContentEven = cxStyle29 - Styles.ContentOdd = cxStyle30 - Styles.Inactive = cxStyle32 - Styles.Selection = cxStyle25 - Styles.Footer = cxStyle23 - Styles.Group = cxStyle31 - Styles.GroupByBox = cxStyle26 - Styles.Header = cxStyle24 - Styles.Indicator = cxStyle33 - Styles.Preview = cxStyle27 - Styles.BandHeader = cxStyle24 - BuiltIn = True - end - object GridCardViewStyleSheetUserFormat3: TcxGridCardViewStyleSheet - Caption = 'UserFormat3' - Styles.Content = cxStyle28 - Styles.ContentEven = cxStyle29 - Styles.ContentOdd = cxStyle30 - Styles.Inactive = cxStyle32 - Styles.Selection = cxStyle25 - Styles.CaptionRow = cxStyle24 - Styles.RowCaption = cxStyle24 - BuiltIn = True - end - object GridTableViewStyleSheetUserFormat4: TcxGridTableViewStyleSheet - Caption = 'UserFormat4' - Styles.Content = cxStyle39 - Styles.ContentEven = cxStyle40 - Styles.ContentOdd = cxStyle41 - Styles.Inactive = cxStyle43 - Styles.Selection = cxStyle36 - Styles.Footer = cxStyle34 - Styles.Group = cxStyle42 - Styles.GroupByBox = cxStyle37 - Styles.Header = cxStyle35 - Styles.Indicator = cxStyle44 - Styles.Preview = cxStyle38 - BuiltIn = True - end - object GridBandedTableViewStyleSheetUserFormat4: TcxGridBandedTableViewStyleSheet - Caption = 'UserFormat4' - Styles.Content = cxStyle39 - Styles.ContentEven = cxStyle40 - Styles.ContentOdd = cxStyle41 - Styles.Inactive = cxStyle43 - Styles.Selection = cxStyle36 - Styles.Footer = cxStyle34 - Styles.Group = cxStyle42 - Styles.GroupByBox = cxStyle37 - Styles.Header = cxStyle35 - Styles.Indicator = cxStyle44 - Styles.Preview = cxStyle38 - Styles.BandHeader = cxStyle35 - BuiltIn = True - end - object GridCardViewStyleSheetUserFormat4: TcxGridCardViewStyleSheet - Caption = 'UserFormat4' - Styles.Content = cxStyle39 - Styles.ContentEven = cxStyle40 - Styles.ContentOdd = cxStyle41 - Styles.Inactive = cxStyle43 - Styles.Selection = cxStyle36 - Styles.CaptionRow = cxStyle35 - Styles.RowCaption = cxStyle35 - BuiltIn = True - end - object GridTableViewStyleSheetBrick: TcxGridTableViewStyleSheet - Caption = 'Brick' - Styles.Content = cxStyle50 - Styles.ContentEven = cxStyle51 - Styles.ContentOdd = cxStyle52 - Styles.Inactive = cxStyle54 - Styles.Selection = cxStyle47 - Styles.Footer = cxStyle45 - Styles.Group = cxStyle53 - Styles.GroupByBox = cxStyle48 - Styles.Header = cxStyle46 - Styles.Indicator = cxStyle55 - Styles.Preview = cxStyle49 - BuiltIn = True - end - object GridBandedTableViewStyleSheetBrick: TcxGridBandedTableViewStyleSheet - Caption = 'Brick' - Styles.Content = cxStyle50 - Styles.ContentEven = cxStyle51 - Styles.ContentOdd = cxStyle52 - Styles.Inactive = cxStyle54 - Styles.Selection = cxStyle47 - Styles.Footer = cxStyle45 - Styles.Group = cxStyle53 - Styles.GroupByBox = cxStyle48 - Styles.Header = cxStyle46 - Styles.Indicator = cxStyle55 - Styles.Preview = cxStyle49 - Styles.BandHeader = cxStyle46 - BuiltIn = True - end - object GridCardViewStyleSheetBrick: TcxGridCardViewStyleSheet - Caption = 'Brick' - Styles.Content = cxStyle50 - Styles.ContentEven = cxStyle51 - Styles.ContentOdd = cxStyle52 - Styles.Inactive = cxStyle54 - Styles.Selection = cxStyle47 - Styles.CaptionRow = cxStyle46 - Styles.RowCaption = cxStyle46 - BuiltIn = True - end - object GridTableViewStyleSheetDesert: TcxGridTableViewStyleSheet - Caption = 'Desert' - Styles.Content = cxStyle61 - Styles.ContentEven = cxStyle62 - Styles.ContentOdd = cxStyle63 - Styles.Inactive = cxStyle65 - Styles.Selection = cxStyle58 - Styles.Footer = cxStyle56 - Styles.Group = cxStyle64 - Styles.GroupByBox = cxStyle59 - Styles.Header = cxStyle57 - Styles.Indicator = cxStyle66 - Styles.Preview = cxStyle60 - BuiltIn = True - end - object GridBandedTableViewStyleSheetDesert: TcxGridBandedTableViewStyleSheet - Caption = 'Desert' - Styles.Content = cxStyle61 - Styles.ContentEven = cxStyle62 - Styles.ContentOdd = cxStyle63 - Styles.Inactive = cxStyle65 - Styles.Selection = cxStyle58 - Styles.Footer = cxStyle56 - Styles.Group = cxStyle64 - Styles.GroupByBox = cxStyle59 - Styles.Header = cxStyle57 - Styles.Indicator = cxStyle66 - Styles.Preview = cxStyle60 - Styles.BandHeader = cxStyle57 - BuiltIn = True - end - object GridCardViewStyleSheetDesert: TcxGridCardViewStyleSheet - Caption = 'Desert' - Styles.Content = cxStyle61 - Styles.ContentEven = cxStyle62 - Styles.ContentOdd = cxStyle63 - Styles.Inactive = cxStyle65 - Styles.Selection = cxStyle58 - Styles.CaptionRow = cxStyle57 - Styles.RowCaption = cxStyle57 - BuiltIn = True - end - object GridTableViewStyleSheetEggplant: TcxGridTableViewStyleSheet - Caption = 'Eggplant' - Styles.Content = cxStyle72 - Styles.ContentEven = cxStyle73 - Styles.ContentOdd = cxStyle74 - Styles.Inactive = cxStyle76 - Styles.Selection = cxStyle69 - Styles.Footer = cxStyle67 - Styles.Group = cxStyle75 - Styles.GroupByBox = cxStyle70 - Styles.Header = cxStyle68 - Styles.Indicator = cxStyle77 - Styles.Preview = cxStyle71 - BuiltIn = True - end - object GridBandedTableViewStyleSheetEggplant: TcxGridBandedTableViewStyleSheet - Caption = 'Eggplant' - Styles.Content = cxStyle72 - Styles.ContentEven = cxStyle73 - Styles.ContentOdd = cxStyle74 - Styles.Inactive = cxStyle76 - Styles.Selection = cxStyle69 - Styles.Footer = cxStyle67 - Styles.Group = cxStyle75 - Styles.GroupByBox = cxStyle70 - Styles.Header = cxStyle68 - Styles.Indicator = cxStyle77 - Styles.Preview = cxStyle71 - Styles.BandBackground = cxStyle68 - BuiltIn = True - end - object GridCardViewStyleSheetEggplant: TcxGridCardViewStyleSheet - Caption = 'Eggplant' - Styles.Content = cxStyle72 - Styles.ContentEven = cxStyle73 - Styles.ContentOdd = cxStyle74 - Styles.Inactive = cxStyle76 - Styles.Selection = cxStyle69 - Styles.CaptionRow = cxStyle68 - Styles.RowCaption = cxStyle68 - BuiltIn = True - end - object GridTableViewStyleSheetLilac: TcxGridTableViewStyleSheet - Caption = 'Lilac' - Styles.Content = cxStyle83 - Styles.ContentEven = cxStyle84 - Styles.ContentOdd = cxStyle85 - Styles.Inactive = cxStyle87 - Styles.Selection = cxStyle80 - Styles.Footer = cxStyle78 - Styles.Group = cxStyle86 - Styles.GroupByBox = cxStyle81 - Styles.Header = cxStyle79 - Styles.Indicator = cxStyle88 - Styles.Preview = cxStyle82 - BuiltIn = True - end - object GridBandedTableViewStyleSheetLilac: TcxGridBandedTableViewStyleSheet - Caption = 'Lilac' - Styles.Content = cxStyle83 - Styles.ContentEven = cxStyle84 - Styles.ContentOdd = cxStyle85 - Styles.Inactive = cxStyle87 - Styles.Selection = cxStyle80 - Styles.Footer = cxStyle78 - Styles.Group = cxStyle86 - Styles.GroupByBox = cxStyle81 - Styles.Header = cxStyle79 - Styles.Indicator = cxStyle88 - Styles.Preview = cxStyle82 - Styles.BandHeader = cxStyle79 - BuiltIn = True - end - object GridCardViewStyleSheetLilac: TcxGridCardViewStyleSheet - Caption = 'Lilac' - Styles.Content = cxStyle83 - Styles.ContentEven = cxStyle84 - Styles.ContentOdd = cxStyle85 - Styles.Inactive = cxStyle87 - Styles.Selection = cxStyle80 - Styles.CaptionRow = cxStyle79 - Styles.RowCaption = cxStyle79 - BuiltIn = True - end - object GridTableViewStyleSheetMaple: TcxGridTableViewStyleSheet - Caption = 'Maple' - Styles.Content = cxStyle94 - Styles.ContentEven = cxStyle95 - Styles.ContentOdd = cxStyle96 - Styles.Inactive = cxStyle98 - Styles.Selection = cxStyle91 - Styles.Footer = cxStyle89 - Styles.Group = cxStyle97 - Styles.GroupByBox = cxStyle92 - Styles.Header = cxStyle90 - Styles.Indicator = cxStyle99 - Styles.Preview = cxStyle93 - BuiltIn = True - end - object GridBandedTableViewStyleSheetMaple: TcxGridBandedTableViewStyleSheet - Caption = 'Maple' - Styles.Content = cxStyle94 - Styles.ContentEven = cxStyle95 - Styles.ContentOdd = cxStyle96 - Styles.Inactive = cxStyle98 - Styles.Selection = cxStyle91 - Styles.Footer = cxStyle89 - Styles.Group = cxStyle97 - Styles.GroupByBox = cxStyle92 - Styles.Header = cxStyle90 - Styles.Indicator = cxStyle99 - Styles.Preview = cxStyle93 - Styles.BandHeader = cxStyle90 - BuiltIn = True - end - object GridCardViewStyleSheetMaple: TcxGridCardViewStyleSheet - Caption = 'Maple' - Styles.Content = cxStyle94 - Styles.ContentEven = cxStyle95 - Styles.ContentOdd = cxStyle96 - Styles.Inactive = cxStyle98 - Styles.Selection = cxStyle91 - Styles.CaptionRow = cxStyle90 - Styles.RowCaption = cxStyle90 - BuiltIn = True - end - object GridTableViewStyleSheetMarinehighcolor: TcxGridTableViewStyleSheet - Caption = 'Marine (high color)' - Styles.Content = cxStyle105 - Styles.ContentEven = cxStyle106 - Styles.ContentOdd = cxStyle107 - Styles.Inactive = cxStyle109 - Styles.Selection = cxStyle102 - Styles.Footer = cxStyle100 - Styles.Group = cxStyle108 - Styles.GroupByBox = cxStyle103 - Styles.Header = cxStyle101 - Styles.Indicator = cxStyle110 - Styles.Preview = cxStyle104 - BuiltIn = True - end - object GridBandedTableViewStyleSheetMarinehighcolor: TcxGridBandedTableViewStyleSheet - Caption = 'Marine (high color)' - Styles.Content = cxStyle105 - Styles.ContentEven = cxStyle106 - Styles.ContentOdd = cxStyle107 - Styles.Inactive = cxStyle109 - Styles.Selection = cxStyle102 - Styles.Footer = cxStyle100 - Styles.Group = cxStyle108 - Styles.GroupByBox = cxStyle103 - Styles.Header = cxStyle101 - Styles.Indicator = cxStyle110 - Styles.Preview = cxStyle104 - Styles.BandHeader = cxStyle101 - BuiltIn = True - end - object GridCardViewStyleSheetMarinehighcolor: TcxGridCardViewStyleSheet - Caption = 'Marine (high color)' - Styles.Content = cxStyle105 - Styles.ContentEven = cxStyle106 - Styles.ContentOdd = cxStyle107 - Styles.Inactive = cxStyle109 - Styles.Selection = cxStyle102 - Styles.CaptionRow = cxStyle101 - Styles.RowCaption = cxStyle101 - BuiltIn = True - end - object GridTableViewStyleSheetPlumhighcolor: TcxGridTableViewStyleSheet - Caption = 'Plum (high color)' - Styles.Content = cxStyle116 - Styles.ContentEven = cxStyle117 - Styles.ContentOdd = cxStyle118 - Styles.Inactive = cxStyle120 - Styles.Selection = cxStyle113 - Styles.Footer = cxStyle111 - Styles.Group = cxStyle119 - Styles.GroupByBox = cxStyle114 - Styles.Header = cxStyle112 - Styles.Indicator = cxStyle121 - Styles.Preview = cxStyle115 - BuiltIn = True - end - object GridBandedTableViewStyleSheetPlumhighcolor: TcxGridBandedTableViewStyleSheet - Caption = 'Plum (high color)' - Styles.Content = cxStyle116 - Styles.ContentEven = cxStyle117 - Styles.ContentOdd = cxStyle118 - Styles.Inactive = cxStyle120 - Styles.Selection = cxStyle113 - Styles.Footer = cxStyle111 - Styles.Group = cxStyle119 - Styles.GroupByBox = cxStyle114 - Styles.Header = cxStyle112 - Styles.Indicator = cxStyle121 - Styles.Preview = cxStyle115 - Styles.BandHeader = cxStyle112 - BuiltIn = True - end - object GridCardViewStyleSheetPlumhighcolor: TcxGridCardViewStyleSheet - Caption = 'Plum (high color)' - Styles.Content = cxStyle116 - Styles.ContentEven = cxStyle117 - Styles.ContentOdd = cxStyle118 - Styles.Inactive = cxStyle120 - Styles.Selection = cxStyle113 - Styles.CaptionRow = cxStyle112 - Styles.CardBorder = cxStyle112 - Styles.RowCaption = cxStyle112 - BuiltIn = True - end - object GridTableViewStyleSheetPumpkinlarge: TcxGridTableViewStyleSheet - Caption = 'Pumpkin (large)' - Styles.Content = cxStyle127 - Styles.ContentEven = cxStyle128 - Styles.ContentOdd = cxStyle129 - Styles.Inactive = cxStyle131 - Styles.Selection = cxStyle124 - Styles.Footer = cxStyle122 - Styles.Group = cxStyle130 - Styles.GroupByBox = cxStyle125 - Styles.Header = cxStyle123 - Styles.Indicator = cxStyle132 - Styles.Preview = cxStyle126 - BuiltIn = True - end - object GridBandedTableViewStyleSheetPumpkinlarge: TcxGridBandedTableViewStyleSheet - Caption = 'Pumpkin (large)' - Styles.Content = cxStyle127 - Styles.ContentEven = cxStyle128 - Styles.ContentOdd = cxStyle129 - Styles.Inactive = cxStyle131 - Styles.Selection = cxStyle124 - Styles.Footer = cxStyle122 - Styles.Group = cxStyle130 - Styles.GroupByBox = cxStyle125 - Styles.Header = cxStyle123 - Styles.Indicator = cxStyle132 - Styles.Preview = cxStyle126 - Styles.BandHeader = cxStyle123 - BuiltIn = True - end - object GridCardViewStyleSheetPumpkinlarge: TcxGridCardViewStyleSheet - Caption = 'Pumpkin (large)' - Styles.Content = cxStyle127 - Styles.ContentEven = cxStyle128 - Styles.ContentOdd = cxStyle129 - Styles.Inactive = cxStyle131 - Styles.Selection = cxStyle124 - Styles.CaptionRow = cxStyle123 - Styles.RowCaption = cxStyle123 - BuiltIn = True - end - object GridTableViewStyleSheetRainyDay: TcxGridTableViewStyleSheet - Caption = 'Rainy Day' - Styles.Content = cxStyle138 - Styles.ContentEven = cxStyle139 - Styles.ContentOdd = cxStyle140 - Styles.Inactive = cxStyle142 - Styles.Selection = cxStyle135 - Styles.Footer = cxStyle133 - Styles.Group = cxStyle141 - Styles.GroupByBox = cxStyle136 - Styles.Header = cxStyle134 - Styles.Indicator = cxStyle143 - Styles.Preview = cxStyle137 - BuiltIn = True - end - object GridBandedTableViewStyleSheetRainyDay: TcxGridBandedTableViewStyleSheet - Caption = 'Rainy Day' - Styles.Content = cxStyle138 - Styles.ContentEven = cxStyle139 - Styles.ContentOdd = cxStyle140 - Styles.Inactive = cxStyle142 - Styles.Selection = cxStyle135 - Styles.Footer = cxStyle133 - Styles.Group = cxStyle141 - Styles.GroupByBox = cxStyle136 - Styles.Header = cxStyle134 - Styles.Indicator = cxStyle143 - Styles.Preview = cxStyle137 - Styles.BandHeader = cxStyle134 - BuiltIn = True - end - object GridCardViewStyleSheetRainyDay: TcxGridCardViewStyleSheet - Caption = 'Rainy Day' - Styles.Content = cxStyle138 - Styles.ContentEven = cxStyle139 - Styles.ContentOdd = cxStyle140 - Styles.Inactive = cxStyle142 - Styles.Selection = cxStyle135 - Styles.CaptionRow = cxStyle134 - Styles.RowCaption = cxStyle134 - BuiltIn = True - end - object GridTableViewStyleSheetRedWhiteandBlueVGA: TcxGridTableViewStyleSheet - Caption = 'Red, White, and Blue (VGA)' - Styles.Content = cxStyle149 - Styles.ContentEven = cxStyle150 - Styles.ContentOdd = cxStyle151 - Styles.Inactive = cxStyle153 - Styles.Selection = cxStyle146 - Styles.Footer = cxStyle144 - Styles.Group = cxStyle152 - Styles.GroupByBox = cxStyle147 - Styles.Header = cxStyle145 - Styles.Indicator = cxStyle154 - Styles.Preview = cxStyle148 - BuiltIn = True - end - object GridBandedTableViewStyleSheetRedWhiteandBlueVGA: TcxGridBandedTableViewStyleSheet - Caption = 'Red, White, and Blue (VGA)' - Styles.Content = cxStyle149 - Styles.ContentEven = cxStyle150 - Styles.ContentOdd = cxStyle151 - Styles.Inactive = cxStyle153 - Styles.Selection = cxStyle146 - Styles.Footer = cxStyle144 - Styles.Group = cxStyle152 - Styles.GroupByBox = cxStyle147 - Styles.Header = cxStyle145 - Styles.Indicator = cxStyle154 - Styles.Preview = cxStyle148 - Styles.BandHeader = cxStyle145 - BuiltIn = True - end - object GridCardViewStyleSheetRedWhiteandBlueVGA: TcxGridCardViewStyleSheet - Caption = 'Red, White, and Blue (VGA)' - Styles.Content = cxStyle149 - Styles.ContentEven = cxStyle150 - Styles.ContentOdd = cxStyle151 - Styles.Inactive = cxStyle153 - Styles.Selection = cxStyle146 - Styles.CaptionRow = cxStyle145 - Styles.RowCaption = cxStyle145 - BuiltIn = True - end - object GridTableViewStyleSheetRose: TcxGridTableViewStyleSheet - Caption = 'Rose' - Styles.Content = cxStyle160 - Styles.ContentEven = cxStyle161 - Styles.ContentOdd = cxStyle162 - Styles.Inactive = cxStyle164 - Styles.Selection = cxStyle157 - Styles.Footer = cxStyle155 - Styles.Group = cxStyle163 - Styles.GroupByBox = cxStyle158 - Styles.Header = cxStyle156 - Styles.Indicator = cxStyle165 - Styles.Preview = cxStyle159 - BuiltIn = True - end - object GridBandedTableViewStyleSheetRose: TcxGridBandedTableViewStyleSheet - Caption = 'Rose' - Styles.Content = cxStyle160 - Styles.ContentEven = cxStyle161 - Styles.ContentOdd = cxStyle162 - Styles.Inactive = cxStyle164 - Styles.Selection = cxStyle157 - Styles.Footer = cxStyle155 - Styles.Group = cxStyle163 - Styles.GroupByBox = cxStyle158 - Styles.Header = cxStyle156 - Styles.Indicator = cxStyle165 - Styles.Preview = cxStyle159 - Styles.BandHeader = cxStyle156 - BuiltIn = True - end - object GridCardViewStyleSheetRose: TcxGridCardViewStyleSheet - Caption = 'Rose' - Styles.Content = cxStyle160 - Styles.ContentEven = cxStyle161 - Styles.ContentOdd = cxStyle162 - Styles.Inactive = cxStyle164 - Styles.Selection = cxStyle157 - Styles.CaptionRow = cxStyle156 - Styles.RowCaption = cxStyle156 - BuiltIn = True - end - object GridTableViewStyleSheetRoselarge: TcxGridTableViewStyleSheet - Caption = 'Rose (large)' - Styles.Content = cxStyle171 - Styles.ContentEven = cxStyle172 - Styles.ContentOdd = cxStyle173 - Styles.Inactive = cxStyle175 - Styles.Selection = cxStyle168 - Styles.Footer = cxStyle166 - Styles.Group = cxStyle174 - Styles.GroupByBox = cxStyle169 - Styles.Header = cxStyle167 - Styles.Indicator = cxStyle176 - Styles.Preview = cxStyle170 - BuiltIn = True - end - object GridBandedTableViewStyleSheetRoselarge: TcxGridBandedTableViewStyleSheet - Caption = 'Rose (large)' - Styles.Content = cxStyle171 - Styles.ContentEven = cxStyle172 - Styles.ContentOdd = cxStyle173 - Styles.Inactive = cxStyle175 - Styles.Selection = cxStyle168 - Styles.Footer = cxStyle166 - Styles.Group = cxStyle174 - Styles.GroupByBox = cxStyle169 - Styles.Header = cxStyle167 - Styles.Indicator = cxStyle176 - Styles.Preview = cxStyle170 - Styles.BandHeader = cxStyle167 - BuiltIn = True - end - object GridCardViewStyleSheetRoselarge: TcxGridCardViewStyleSheet - Caption = 'Rose (large)' - Styles.Content = cxStyle171 - Styles.ContentEven = cxStyle172 - Styles.ContentOdd = cxStyle173 - Styles.Inactive = cxStyle175 - Styles.Selection = cxStyle168 - Styles.CaptionRow = cxStyle167 - Styles.RowCaption = cxStyle167 - BuiltIn = True - end - object GridTableViewStyleSheetSlate: TcxGridTableViewStyleSheet - Caption = 'Slate' - Styles.Content = cxStyle182 - Styles.ContentEven = cxStyle183 - Styles.ContentOdd = cxStyle184 - Styles.Inactive = cxStyle186 - Styles.Selection = cxStyle179 - Styles.Footer = cxStyle177 - Styles.Group = cxStyle185 - Styles.GroupByBox = cxStyle180 - Styles.Header = cxStyle178 - Styles.Indicator = cxStyle187 - Styles.Preview = cxStyle181 - BuiltIn = True - end - object GridBandedTableViewStyleSheetSlate: TcxGridBandedTableViewStyleSheet - Caption = 'Slate' - Styles.Content = cxStyle182 - Styles.ContentEven = cxStyle183 - Styles.ContentOdd = cxStyle184 - Styles.Inactive = cxStyle186 - Styles.Selection = cxStyle179 - Styles.Footer = cxStyle177 - Styles.Group = cxStyle185 - Styles.GroupByBox = cxStyle180 - Styles.Header = cxStyle178 - Styles.Indicator = cxStyle187 - Styles.Preview = cxStyle181 - Styles.BandHeader = cxStyle178 - BuiltIn = True - end - object GridCardViewStyleSheetSlate: TcxGridCardViewStyleSheet - Caption = 'Slate' - Styles.Content = cxStyle182 - Styles.ContentEven = cxStyle183 - Styles.ContentOdd = cxStyle184 - Styles.Inactive = cxStyle186 - Styles.Selection = cxStyle179 - Styles.CaptionRow = cxStyle178 - Styles.RowCaption = cxStyle178 - BuiltIn = True - end - object GridTableViewStyleSheetSpruce: TcxGridTableViewStyleSheet - Caption = 'Spruce' - Styles.Content = cxStyle193 - Styles.ContentEven = cxStyle194 - Styles.ContentOdd = cxStyle195 - Styles.Inactive = cxStyle197 - Styles.Selection = cxStyle190 - Styles.Footer = cxStyle188 - Styles.Group = cxStyle196 - Styles.GroupByBox = cxStyle191 - Styles.Header = cxStyle189 - Styles.Indicator = cxStyle198 - Styles.Preview = cxStyle192 - BuiltIn = True - end - object GridBandedTableViewStyleSheetSpruce: TcxGridBandedTableViewStyleSheet - Caption = 'Spruce' - Styles.Content = cxStyle193 - Styles.ContentEven = cxStyle194 - Styles.ContentOdd = cxStyle195 - Styles.Inactive = cxStyle197 - Styles.Selection = cxStyle190 - Styles.Footer = cxStyle188 - Styles.Group = cxStyle196 - Styles.GroupByBox = cxStyle191 - Styles.Header = cxStyle189 - Styles.Indicator = cxStyle198 - Styles.Preview = cxStyle192 - Styles.BandHeader = cxStyle189 - BuiltIn = True - end - object GridCardViewStyleSheetSpruce: TcxGridCardViewStyleSheet - Caption = 'Spruce' - Styles.Content = cxStyle193 - Styles.ContentEven = cxStyle194 - Styles.ContentOdd = cxStyle195 - Styles.Inactive = cxStyle197 - Styles.Selection = cxStyle190 - Styles.CaptionRow = cxStyle189 - Styles.RowCaption = cxStyle189 - BuiltIn = True - end - object GridTableViewStyleSheetStormVGA: TcxGridTableViewStyleSheet - Caption = 'Storm (VGA)' - Styles.Content = cxStyle204 - Styles.ContentEven = cxStyle205 - Styles.ContentOdd = cxStyle206 - Styles.Inactive = cxStyle208 - Styles.Selection = cxStyle201 - Styles.Footer = cxStyle199 - Styles.Group = cxStyle207 - Styles.GroupByBox = cxStyle202 - Styles.Header = cxStyle200 - Styles.Indicator = cxStyle209 - Styles.Preview = cxStyle203 - BuiltIn = True - end - object GridBandedTableViewStyleSheetStormVGA: TcxGridBandedTableViewStyleSheet - Caption = 'Storm (VGA)' - Styles.Content = cxStyle204 - Styles.ContentEven = cxStyle205 - Styles.ContentOdd = cxStyle206 - Styles.Inactive = cxStyle208 - Styles.Selection = cxStyle201 - Styles.Footer = cxStyle199 - Styles.Group = cxStyle207 - Styles.GroupByBox = cxStyle202 - Styles.Header = cxStyle200 - Styles.Indicator = cxStyle209 - Styles.Preview = cxStyle203 - Styles.BandHeader = cxStyle200 - BuiltIn = True - end - object GridCardViewStyleSheetStormVGA: TcxGridCardViewStyleSheet - Caption = 'Storm (VGA)' - Styles.Content = cxStyle204 - Styles.ContentEven = cxStyle205 - Styles.ContentOdd = cxStyle206 - Styles.Inactive = cxStyle208 - Styles.Selection = cxStyle201 - Styles.CaptionRow = cxStyle200 - Styles.RowCaption = cxStyle200 - BuiltIn = True - end - object GridTableViewStyleSheetTealVGA: TcxGridTableViewStyleSheet - Caption = 'Teal (VGA)' - Styles.Content = cxStyle215 - Styles.ContentEven = cxStyle216 - Styles.ContentOdd = cxStyle217 - Styles.Inactive = cxStyle219 - Styles.Selection = cxStyle212 - Styles.Footer = cxStyle210 - Styles.Group = cxStyle218 - Styles.GroupByBox = cxStyle213 - Styles.Header = cxStyle211 - Styles.Indicator = cxStyle220 - Styles.Preview = cxStyle214 - BuiltIn = True - end - object GridBandedTableViewStyleSheetTealVGA: TcxGridBandedTableViewStyleSheet - Caption = 'Teal (VGA)' - Styles.Content = cxStyle215 - Styles.ContentEven = cxStyle216 - Styles.ContentOdd = cxStyle217 - Styles.Inactive = cxStyle219 - Styles.Selection = cxStyle212 - Styles.Footer = cxStyle210 - Styles.Group = cxStyle218 - Styles.GroupByBox = cxStyle213 - Styles.Header = cxStyle211 - Styles.Indicator = cxStyle220 - Styles.Preview = cxStyle214 - Styles.BandHeader = cxStyle211 - BuiltIn = True - end - object GridCardViewStyleSheetTealVGA: TcxGridCardViewStyleSheet - Caption = 'Teal (VGA)' - Styles.Content = cxStyle215 - Styles.ContentEven = cxStyle216 - Styles.ContentOdd = cxStyle217 - Styles.Inactive = cxStyle219 - Styles.Selection = cxStyle212 - Styles.CaptionRow = cxStyle211 - Styles.CardBorder = cxStyle364 - Styles.RowCaption = cxStyle211 - BuiltIn = True - end - object GridTableViewStyleSheetWheat: TcxGridTableViewStyleSheet - Caption = 'Wheat' - Styles.Content = cxStyle226 - Styles.ContentEven = cxStyle227 - Styles.ContentOdd = cxStyle228 - Styles.Inactive = cxStyle230 - Styles.Selection = cxStyle223 - Styles.Footer = cxStyle221 - Styles.Group = cxStyle229 - Styles.GroupByBox = cxStyle224 - Styles.Header = cxStyle222 - Styles.Indicator = cxStyle231 - Styles.Preview = cxStyle225 - BuiltIn = True - end - object GridBandedTableViewStyleSheetWheat: TcxGridBandedTableViewStyleSheet - Caption = 'Wheat' - Styles.Content = cxStyle226 - Styles.ContentEven = cxStyle227 - Styles.ContentOdd = cxStyle228 - Styles.Inactive = cxStyle230 - Styles.Selection = cxStyle223 - Styles.Footer = cxStyle221 - Styles.Group = cxStyle229 - Styles.GroupByBox = cxStyle224 - Styles.Header = cxStyle222 - Styles.Indicator = cxStyle231 - Styles.Preview = cxStyle225 - Styles.BandHeader = cxStyle222 - BuiltIn = True - end - object GridCardViewStyleSheetWheat: TcxGridCardViewStyleSheet - Caption = 'Wheat' - Styles.Content = cxStyle226 - Styles.ContentEven = cxStyle227 - Styles.ContentOdd = cxStyle228 - Styles.Inactive = cxStyle230 - Styles.Selection = cxStyle223 - Styles.CaptionRow = cxStyle222 - Styles.RowCaption = cxStyle222 - BuiltIn = True - end - object GridTableViewStyleSheetWindowsClassic: TcxGridTableViewStyleSheet - Caption = 'Windows Classic' - Styles.Content = cxStyle237 - Styles.ContentEven = cxStyle238 - Styles.ContentOdd = cxStyle239 - Styles.Inactive = cxStyle241 - Styles.Selection = cxStyle234 - Styles.Footer = cxStyle232 - Styles.Group = cxStyle240 - Styles.GroupByBox = cxStyle235 - Styles.Header = cxStyle233 - Styles.Indicator = cxStyle242 - Styles.Preview = cxStyle236 - BuiltIn = True - end - object GridBandedTableViewStyleSheetWindowsClassic: TcxGridBandedTableViewStyleSheet - Caption = 'Windows Classic' - Styles.Content = cxStyle237 - Styles.ContentEven = cxStyle238 - Styles.ContentOdd = cxStyle239 - Styles.Inactive = cxStyle241 - Styles.Selection = cxStyle234 - Styles.Footer = cxStyle232 - Styles.Group = cxStyle240 - Styles.GroupByBox = cxStyle235 - Styles.Header = cxStyle233 - Styles.Indicator = cxStyle242 - Styles.Preview = cxStyle236 - Styles.BandHeader = cxStyle233 - BuiltIn = True - end - object GridCardViewStyleSheetWindowsClassic: TcxGridCardViewStyleSheet - Caption = 'Windows Classic' - Styles.Content = cxStyle237 - Styles.ContentEven = cxStyle238 - Styles.ContentOdd = cxStyle239 - Styles.Inactive = cxStyle241 - Styles.Selection = cxStyle234 - Styles.CaptionRow = cxStyle233 - Styles.RowCaption = cxStyle233 - BuiltIn = True - end - object GridTableViewStyleSheetWindowsClassiclarge: TcxGridTableViewStyleSheet - Caption = 'Windows Classic (large)' - Styles.Content = cxStyle248 - Styles.ContentEven = cxStyle249 - Styles.ContentOdd = cxStyle250 - Styles.Inactive = cxStyle252 - Styles.Selection = cxStyle245 - Styles.Footer = cxStyle243 - Styles.Group = cxStyle251 - Styles.GroupByBox = cxStyle246 - Styles.Header = cxStyle244 - Styles.Indicator = cxStyle253 - Styles.Preview = cxStyle247 - BuiltIn = True - end - object GridBandedTableViewStyleSheetWindowsClassiclarge: TcxGridBandedTableViewStyleSheet - Caption = 'Windows Classic (large)' - Styles.Content = cxStyle248 - Styles.ContentEven = cxStyle249 - Styles.ContentOdd = cxStyle250 - Styles.Inactive = cxStyle252 - Styles.Selection = cxStyle245 - Styles.Footer = cxStyle243 - Styles.Group = cxStyle251 - Styles.GroupByBox = cxStyle246 - Styles.Header = cxStyle244 - Styles.Indicator = cxStyle253 - Styles.Preview = cxStyle247 - Styles.BandHeader = cxStyle244 - BuiltIn = True - end - object GridCardViewStyleSheetWindowsClassiclarge: TcxGridCardViewStyleSheet - Caption = 'Windows Classic (large)' - Styles.Content = cxStyle248 - Styles.ContentEven = cxStyle249 - Styles.ContentOdd = cxStyle250 - Styles.Inactive = cxStyle252 - Styles.Selection = cxStyle245 - Styles.CaptionRow = cxStyle244 - Styles.RowCaption = cxStyle244 - BuiltIn = True - end - object GridTableViewStyleSheetWindowsStandard: TcxGridTableViewStyleSheet - Caption = 'Windows Standard' - Styles.Content = cxStyle259 - Styles.ContentEven = cxStyle260 - Styles.ContentOdd = cxStyle261 - Styles.Inactive = cxStyle263 - Styles.Selection = cxStyle256 - Styles.Footer = cxStyle254 - Styles.Group = cxStyle262 - Styles.GroupByBox = cxStyle257 - Styles.Header = cxStyle255 - Styles.Indicator = cxStyle264 - Styles.Preview = cxStyle258 - BuiltIn = True - end - object GridBandedTableViewStyleSheetWindowsStandard: TcxGridBandedTableViewStyleSheet - Caption = 'Windows Standard' - Styles.Content = cxStyle259 - Styles.ContentEven = cxStyle260 - Styles.ContentOdd = cxStyle261 - Styles.Inactive = cxStyle263 - Styles.Selection = cxStyle256 - Styles.Footer = cxStyle254 - Styles.Group = cxStyle262 - Styles.GroupByBox = cxStyle257 - Styles.Header = cxStyle255 - Styles.Indicator = cxStyle264 - Styles.Preview = cxStyle258 - Styles.BandHeader = cxStyle255 - BuiltIn = True - end - object GridCardViewStyleSheetWindowsStandard: TcxGridCardViewStyleSheet - Caption = 'Windows Standard' - Styles.Content = cxStyle259 - Styles.ContentEven = cxStyle260 - Styles.ContentOdd = cxStyle261 - Styles.Inactive = cxStyle263 - Styles.Selection = cxStyle256 - Styles.CaptionRow = cxStyle255 - Styles.CardBorder = cxStyle365 - Styles.RowCaption = cxStyle255 - BuiltIn = True - end - object GridTableViewStyleSheetWindowsStandardlarge: TcxGridTableViewStyleSheet - Caption = 'Windows Standard (large)' - Styles.Content = cxStyle270 - Styles.ContentEven = cxStyle271 - Styles.ContentOdd = cxStyle272 - Styles.Inactive = cxStyle274 - Styles.Selection = cxStyle267 - Styles.Footer = cxStyle265 - Styles.Group = cxStyle273 - Styles.GroupByBox = cxStyle268 - Styles.Header = cxStyle266 - Styles.Indicator = cxStyle275 - Styles.Preview = cxStyle269 - BuiltIn = True - end - object GridBandedTableViewStyleSheetWindowsStandardlarge: TcxGridBandedTableViewStyleSheet - Caption = 'Windows Standard (large)' - Styles.Content = cxStyle270 - Styles.ContentEven = cxStyle271 - Styles.ContentOdd = cxStyle272 - Styles.Inactive = cxStyle274 - Styles.Selection = cxStyle267 - Styles.Footer = cxStyle265 - Styles.Group = cxStyle273 - Styles.GroupByBox = cxStyle268 - Styles.Header = cxStyle266 - Styles.Indicator = cxStyle275 - Styles.Preview = cxStyle269 - Styles.BandHeader = cxStyle266 - BuiltIn = True - end - object GridCardViewStyleSheetWindowsStandardlarge: TcxGridCardViewStyleSheet - Caption = 'Windows Standard (large)' - Styles.Content = cxStyle270 - Styles.ContentEven = cxStyle271 - Styles.ContentOdd = cxStyle272 - Styles.Inactive = cxStyle274 - Styles.Selection = cxStyle267 - Styles.CaptionRow = cxStyle266 - Styles.CardBorder = cxStyle366 - Styles.RowCaption = cxStyle266 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrast1: TcxGridTableViewStyleSheet - Caption = 'High Contrast #1' - Styles.Content = cxStyle281 - Styles.ContentEven = cxStyle282 - Styles.ContentOdd = cxStyle283 - Styles.Inactive = cxStyle285 - Styles.Selection = cxStyle278 - Styles.Footer = cxStyle276 - Styles.Group = cxStyle284 - Styles.GroupByBox = cxStyle279 - Styles.Header = cxStyle277 - Styles.Indicator = cxStyle286 - Styles.Preview = cxStyle280 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrast1: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast #1' - Styles.Content = cxStyle281 - Styles.ContentEven = cxStyle282 - Styles.ContentOdd = cxStyle283 - Styles.Inactive = cxStyle285 - Styles.Selection = cxStyle278 - Styles.Footer = cxStyle276 - Styles.Group = cxStyle284 - Styles.GroupByBox = cxStyle279 - Styles.Header = cxStyle277 - Styles.Indicator = cxStyle286 - Styles.Preview = cxStyle280 - Styles.BandHeader = cxStyle286 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrast1: TcxGridCardViewStyleSheet - Caption = 'High Contrast #1' - Styles.Content = cxStyle281 - Styles.ContentEven = cxStyle282 - Styles.ContentOdd = cxStyle283 - Styles.Inactive = cxStyle285 - Styles.Selection = cxStyle278 - Styles.CaptionRow = cxStyle277 - Styles.RowCaption = cxStyle277 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrast1large: TcxGridTableViewStyleSheet - Caption = 'High Contrast #1 (large)' - Styles.Content = cxStyle292 - Styles.ContentEven = cxStyle293 - Styles.ContentOdd = cxStyle294 - Styles.Inactive = cxStyle296 - Styles.Selection = cxStyle289 - Styles.Footer = cxStyle287 - Styles.Group = cxStyle295 - Styles.GroupByBox = cxStyle290 - Styles.Header = cxStyle288 - Styles.Indicator = cxStyle297 - Styles.Preview = cxStyle291 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrast1large: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast #1 (large)' - Styles.Content = cxStyle292 - Styles.ContentEven = cxStyle293 - Styles.ContentOdd = cxStyle294 - Styles.Inactive = cxStyle296 - Styles.Selection = cxStyle289 - Styles.Footer = cxStyle287 - Styles.Group = cxStyle295 - Styles.GroupByBox = cxStyle290 - Styles.Header = cxStyle288 - Styles.Indicator = cxStyle297 - Styles.Preview = cxStyle291 - Styles.BandHeader = cxStyle297 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrast1large: TcxGridCardViewStyleSheet - Caption = 'High Contrast #1 (large)' - Styles.Content = cxStyle292 - Styles.ContentEven = cxStyle293 - Styles.ContentOdd = cxStyle294 - Styles.Inactive = cxStyle296 - Styles.Selection = cxStyle289 - Styles.CaptionRow = cxStyle288 - Styles.RowCaption = cxStyle288 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrast2: TcxGridTableViewStyleSheet - Caption = 'High Contrast #2' - Styles.Content = cxStyle303 - Styles.ContentEven = cxStyle304 - Styles.ContentOdd = cxStyle305 - Styles.Inactive = cxStyle307 - Styles.Selection = cxStyle300 - Styles.Footer = cxStyle298 - Styles.Group = cxStyle306 - Styles.GroupByBox = cxStyle301 - Styles.Header = cxStyle299 - Styles.Indicator = cxStyle308 - Styles.Preview = cxStyle302 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrast2: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast #2' - Styles.Content = cxStyle303 - Styles.ContentEven = cxStyle304 - Styles.ContentOdd = cxStyle305 - Styles.Inactive = cxStyle307 - Styles.Selection = cxStyle300 - Styles.Footer = cxStyle298 - Styles.Group = cxStyle306 - Styles.GroupByBox = cxStyle301 - Styles.Header = cxStyle299 - Styles.Indicator = cxStyle308 - Styles.Preview = cxStyle302 - Styles.BandHeader = cxStyle308 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrast2: TcxGridCardViewStyleSheet - Caption = 'High Contrast #2' - Styles.Content = cxStyle303 - Styles.ContentEven = cxStyle304 - Styles.ContentOdd = cxStyle305 - Styles.Inactive = cxStyle307 - Styles.Selection = cxStyle300 - Styles.CaptionRow = cxStyle299 - Styles.RowCaption = cxStyle299 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrast2large: TcxGridTableViewStyleSheet - Caption = 'High Contrast #2 (large)' - Styles.Content = cxStyle314 - Styles.ContentEven = cxStyle315 - Styles.ContentOdd = cxStyle316 - Styles.Inactive = cxStyle318 - Styles.Selection = cxStyle311 - Styles.Footer = cxStyle309 - Styles.Group = cxStyle317 - Styles.GroupByBox = cxStyle312 - Styles.Header = cxStyle310 - Styles.Indicator = cxStyle319 - Styles.Preview = cxStyle313 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrast2large: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast #2 (large)' - Styles.Content = cxStyle314 - Styles.ContentEven = cxStyle315 - Styles.ContentOdd = cxStyle316 - Styles.Inactive = cxStyle318 - Styles.Selection = cxStyle311 - Styles.Footer = cxStyle309 - Styles.Group = cxStyle317 - Styles.GroupByBox = cxStyle312 - Styles.Header = cxStyle310 - Styles.Indicator = cxStyle319 - Styles.Preview = cxStyle313 - Styles.BandHeader = cxStyle319 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrast2large: TcxGridCardViewStyleSheet - Caption = 'High Contrast #2 (large)' - Styles.Content = cxStyle314 - Styles.ContentEven = cxStyle315 - Styles.ContentOdd = cxStyle316 - Styles.Inactive = cxStyle318 - Styles.Selection = cxStyle311 - Styles.CaptionRow = cxStyle310 - Styles.RowCaption = cxStyle310 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrastBlack: TcxGridTableViewStyleSheet - Caption = 'High Contrast Black' - Styles.Content = cxStyle325 - Styles.ContentEven = cxStyle326 - Styles.ContentOdd = cxStyle327 - Styles.Inactive = cxStyle329 - Styles.Selection = cxStyle322 - Styles.Footer = cxStyle320 - Styles.Group = cxStyle328 - Styles.GroupByBox = cxStyle323 - Styles.Header = cxStyle321 - Styles.Indicator = cxStyle330 - Styles.Preview = cxStyle324 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrastBlack: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast Black' - Styles.Content = cxStyle325 - Styles.ContentEven = cxStyle326 - Styles.ContentOdd = cxStyle327 - Styles.Inactive = cxStyle329 - Styles.Selection = cxStyle322 - Styles.Footer = cxStyle320 - Styles.Group = cxStyle328 - Styles.GroupByBox = cxStyle323 - Styles.Header = cxStyle321 - Styles.Indicator = cxStyle330 - Styles.Preview = cxStyle324 - Styles.BandHeader = cxStyle330 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrastBlack: TcxGridCardViewStyleSheet - Caption = 'High Contrast Black' - Styles.Content = cxStyle325 - Styles.ContentEven = cxStyle326 - Styles.ContentOdd = cxStyle327 - Styles.Inactive = cxStyle329 - Styles.Selection = cxStyle322 - Styles.CaptionRow = cxStyle321 - Styles.RowCaption = cxStyle321 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrastBlacklarge: TcxGridTableViewStyleSheet - Caption = 'High Contrast Black (large)' - Styles.Content = cxStyle336 - Styles.ContentEven = cxStyle337 - Styles.ContentOdd = cxStyle338 - Styles.Inactive = cxStyle340 - Styles.Selection = cxStyle333 - Styles.Footer = cxStyle331 - Styles.Group = cxStyle339 - Styles.GroupByBox = cxStyle334 - Styles.Header = cxStyle332 - Styles.Indicator = cxStyle341 - Styles.Preview = cxStyle335 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrastBlacklarge: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast Black (large)' - Styles.Content = cxStyle336 - Styles.ContentEven = cxStyle337 - Styles.ContentOdd = cxStyle338 - Styles.Inactive = cxStyle340 - Styles.Selection = cxStyle333 - Styles.Footer = cxStyle331 - Styles.Group = cxStyle339 - Styles.GroupByBox = cxStyle334 - Styles.Header = cxStyle332 - Styles.Indicator = cxStyle341 - Styles.Preview = cxStyle335 - Styles.BandHeader = cxStyle341 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrastBlacklarge: TcxGridCardViewStyleSheet - Caption = 'High Contrast Black (large)' - Styles.Content = cxStyle336 - Styles.ContentEven = cxStyle337 - Styles.ContentOdd = cxStyle338 - Styles.Inactive = cxStyle340 - Styles.Selection = cxStyle333 - Styles.CaptionRow = cxStyle332 - Styles.RowCaption = cxStyle332 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrastWhite: TcxGridTableViewStyleSheet - Caption = 'High Contrast White' - Styles.Content = cxStyle347 - Styles.ContentEven = cxStyle348 - Styles.ContentOdd = cxStyle349 - Styles.Inactive = cxStyle351 - Styles.Selection = cxStyle344 - Styles.Footer = cxStyle342 - Styles.Group = cxStyle350 - Styles.GroupByBox = cxStyle345 - Styles.Header = cxStyle343 - Styles.Indicator = cxStyle352 - Styles.Preview = cxStyle346 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrastWhite: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast White' - Styles.Content = cxStyle347 - Styles.ContentEven = cxStyle348 - Styles.ContentOdd = cxStyle349 - Styles.Inactive = cxStyle351 - Styles.Selection = cxStyle344 - Styles.Footer = cxStyle342 - Styles.Group = cxStyle350 - Styles.GroupByBox = cxStyle345 - Styles.Header = cxStyle343 - Styles.Indicator = cxStyle352 - Styles.Preview = cxStyle346 - Styles.BandHeader = cxStyle343 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrastWhite: TcxGridCardViewStyleSheet - Caption = 'High Contrast White' - Styles.Content = cxStyle347 - Styles.ContentEven = cxStyle348 - Styles.ContentOdd = cxStyle349 - Styles.Inactive = cxStyle351 - Styles.Selection = cxStyle344 - Styles.CaptionRow = cxStyle343 - Styles.RowCaption = cxStyle343 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrastWhitelarge: TcxGridTableViewStyleSheet - Caption = 'High Contrast White (large)' - Styles.Content = cxStyle358 - Styles.ContentEven = cxStyle359 - Styles.ContentOdd = cxStyle360 - Styles.Inactive = cxStyle362 - Styles.Selection = cxStyle355 - Styles.Footer = cxStyle353 - Styles.Group = cxStyle361 - Styles.GroupByBox = cxStyle356 - Styles.Header = cxStyle354 - Styles.Indicator = cxStyle363 - Styles.Preview = cxStyle357 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrastWhitelarge: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast White (large)' - Styles.Content = cxStyle358 - Styles.ContentEven = cxStyle359 - Styles.ContentOdd = cxStyle360 - Styles.Inactive = cxStyle362 - Styles.Selection = cxStyle355 - Styles.Footer = cxStyle353 - Styles.Group = cxStyle361 - Styles.GroupByBox = cxStyle356 - Styles.Header = cxStyle354 - Styles.Indicator = cxStyle363 - Styles.Preview = cxStyle357 - Styles.BandHeader = cxStyle354 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrastWhitelarge: TcxGridCardViewStyleSheet - Caption = 'High Contrast White (large)' - Styles.Content = cxStyle358 - Styles.ContentEven = cxStyle359 - Styles.ContentOdd = cxStyle360 - Styles.Inactive = cxStyle362 - Styles.Selection = cxStyle355 - Styles.CaptionRow = cxStyle354 - Styles.RowCaption = cxStyle354 - BuiltIn = True - end - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPredefinedStyles.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPredefinedStyles.pas deleted file mode 100644 index c1839158..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridPredefinedStyles.pas +++ /dev/null @@ -1,568 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridPredefinedStyles; - -{$I cxVer.inc} - -interface - -uses - SysUtils, Classes, Forms, cxClasses, cxStyles, - cxGridTableView, cxGridBandedTableView, cxGridCardView; - -type - TcxdmGridPredefinedStyles = class(TDataModule) - StyleRepository: TcxStyleRepository; - cxStyle1: TcxStyle; - cxStyle2: TcxStyle; - cxStyle3: TcxStyle; - cxStyle4: TcxStyle; - cxStyle5: TcxStyle; - cxStyle6: TcxStyle; - cxStyle7: TcxStyle; - cxStyle8: TcxStyle; - cxStyle9: TcxStyle; - cxStyle10: TcxStyle; - cxStyle11: TcxStyle; - cxStyle12: TcxStyle; - cxStyle13: TcxStyle; - cxStyle14: TcxStyle; - cxStyle15: TcxStyle; - cxStyle16: TcxStyle; - cxStyle17: TcxStyle; - cxStyle18: TcxStyle; - cxStyle19: TcxStyle; - cxStyle20: TcxStyle; - cxStyle21: TcxStyle; - cxStyle22: TcxStyle; - cxStyle23: TcxStyle; - cxStyle24: TcxStyle; - cxStyle25: TcxStyle; - cxStyle26: TcxStyle; - cxStyle27: TcxStyle; - cxStyle28: TcxStyle; - cxStyle29: TcxStyle; - cxStyle30: TcxStyle; - cxStyle31: TcxStyle; - cxStyle32: TcxStyle; - cxStyle33: TcxStyle; - cxStyle34: TcxStyle; - cxStyle35: TcxStyle; - cxStyle36: TcxStyle; - cxStyle37: TcxStyle; - cxStyle38: TcxStyle; - cxStyle39: TcxStyle; - cxStyle40: TcxStyle; - cxStyle41: TcxStyle; - cxStyle42: TcxStyle; - cxStyle43: TcxStyle; - cxStyle44: TcxStyle; - cxStyle45: TcxStyle; - cxStyle46: TcxStyle; - cxStyle47: TcxStyle; - cxStyle48: TcxStyle; - cxStyle49: TcxStyle; - cxStyle50: TcxStyle; - cxStyle51: TcxStyle; - cxStyle52: TcxStyle; - cxStyle53: TcxStyle; - cxStyle54: TcxStyle; - cxStyle55: TcxStyle; - cxStyle56: TcxStyle; - cxStyle57: TcxStyle; - cxStyle58: TcxStyle; - cxStyle59: TcxStyle; - cxStyle60: TcxStyle; - cxStyle61: TcxStyle; - cxStyle62: TcxStyle; - cxStyle63: TcxStyle; - cxStyle64: TcxStyle; - cxStyle65: TcxStyle; - cxStyle66: TcxStyle; - cxStyle67: TcxStyle; - cxStyle68: TcxStyle; - cxStyle69: TcxStyle; - cxStyle70: TcxStyle; - cxStyle71: TcxStyle; - cxStyle72: TcxStyle; - cxStyle73: TcxStyle; - cxStyle74: TcxStyle; - cxStyle75: TcxStyle; - cxStyle76: TcxStyle; - cxStyle77: TcxStyle; - cxStyle78: TcxStyle; - cxStyle79: TcxStyle; - cxStyle80: TcxStyle; - cxStyle81: TcxStyle; - cxStyle82: TcxStyle; - cxStyle83: TcxStyle; - cxStyle84: TcxStyle; - cxStyle85: TcxStyle; - cxStyle86: TcxStyle; - cxStyle87: TcxStyle; - cxStyle88: TcxStyle; - cxStyle89: TcxStyle; - cxStyle90: TcxStyle; - cxStyle91: TcxStyle; - cxStyle92: TcxStyle; - cxStyle93: TcxStyle; - cxStyle94: TcxStyle; - cxStyle95: TcxStyle; - cxStyle96: TcxStyle; - cxStyle97: TcxStyle; - cxStyle98: TcxStyle; - cxStyle99: TcxStyle; - cxStyle100: TcxStyle; - cxStyle101: TcxStyle; - cxStyle102: TcxStyle; - cxStyle103: TcxStyle; - cxStyle104: TcxStyle; - cxStyle105: TcxStyle; - cxStyle106: TcxStyle; - cxStyle107: TcxStyle; - cxStyle108: TcxStyle; - cxStyle109: TcxStyle; - cxStyle110: TcxStyle; - cxStyle111: TcxStyle; - cxStyle112: TcxStyle; - cxStyle113: TcxStyle; - cxStyle114: TcxStyle; - cxStyle115: TcxStyle; - cxStyle116: TcxStyle; - cxStyle117: TcxStyle; - cxStyle118: TcxStyle; - cxStyle119: TcxStyle; - cxStyle120: TcxStyle; - cxStyle121: TcxStyle; - cxStyle122: TcxStyle; - cxStyle123: TcxStyle; - cxStyle124: TcxStyle; - cxStyle125: TcxStyle; - cxStyle126: TcxStyle; - cxStyle127: TcxStyle; - cxStyle128: TcxStyle; - cxStyle129: TcxStyle; - cxStyle130: TcxStyle; - cxStyle131: TcxStyle; - cxStyle132: TcxStyle; - cxStyle133: TcxStyle; - cxStyle134: TcxStyle; - cxStyle135: TcxStyle; - cxStyle136: TcxStyle; - cxStyle137: TcxStyle; - cxStyle138: TcxStyle; - cxStyle139: TcxStyle; - cxStyle140: TcxStyle; - cxStyle141: TcxStyle; - cxStyle142: TcxStyle; - cxStyle143: TcxStyle; - cxStyle144: TcxStyle; - cxStyle145: TcxStyle; - cxStyle146: TcxStyle; - cxStyle147: TcxStyle; - cxStyle148: TcxStyle; - cxStyle149: TcxStyle; - cxStyle150: TcxStyle; - cxStyle151: TcxStyle; - cxStyle152: TcxStyle; - cxStyle153: TcxStyle; - cxStyle154: TcxStyle; - cxStyle155: TcxStyle; - cxStyle156: TcxStyle; - cxStyle157: TcxStyle; - cxStyle158: TcxStyle; - cxStyle159: TcxStyle; - cxStyle160: TcxStyle; - cxStyle161: TcxStyle; - cxStyle162: TcxStyle; - cxStyle163: TcxStyle; - cxStyle164: TcxStyle; - cxStyle165: TcxStyle; - cxStyle166: TcxStyle; - cxStyle167: TcxStyle; - cxStyle168: TcxStyle; - cxStyle169: TcxStyle; - cxStyle170: TcxStyle; - cxStyle171: TcxStyle; - cxStyle172: TcxStyle; - cxStyle173: TcxStyle; - cxStyle174: TcxStyle; - cxStyle175: TcxStyle; - cxStyle176: TcxStyle; - cxStyle177: TcxStyle; - cxStyle178: TcxStyle; - cxStyle179: TcxStyle; - cxStyle180: TcxStyle; - cxStyle181: TcxStyle; - cxStyle182: TcxStyle; - cxStyle183: TcxStyle; - cxStyle184: TcxStyle; - cxStyle185: TcxStyle; - cxStyle186: TcxStyle; - cxStyle187: TcxStyle; - cxStyle188: TcxStyle; - cxStyle189: TcxStyle; - cxStyle190: TcxStyle; - cxStyle191: TcxStyle; - cxStyle192: TcxStyle; - cxStyle193: TcxStyle; - cxStyle194: TcxStyle; - cxStyle195: TcxStyle; - cxStyle196: TcxStyle; - cxStyle197: TcxStyle; - cxStyle198: TcxStyle; - cxStyle199: TcxStyle; - cxStyle200: TcxStyle; - cxStyle201: TcxStyle; - cxStyle202: TcxStyle; - cxStyle203: TcxStyle; - cxStyle204: TcxStyle; - cxStyle205: TcxStyle; - cxStyle206: TcxStyle; - cxStyle207: TcxStyle; - cxStyle208: TcxStyle; - cxStyle209: TcxStyle; - cxStyle210: TcxStyle; - cxStyle211: TcxStyle; - cxStyle212: TcxStyle; - cxStyle213: TcxStyle; - cxStyle214: TcxStyle; - cxStyle215: TcxStyle; - cxStyle216: TcxStyle; - cxStyle217: TcxStyle; - cxStyle218: TcxStyle; - cxStyle219: TcxStyle; - cxStyle220: TcxStyle; - cxStyle221: TcxStyle; - cxStyle222: TcxStyle; - cxStyle223: TcxStyle; - cxStyle224: TcxStyle; - cxStyle225: TcxStyle; - cxStyle226: TcxStyle; - cxStyle227: TcxStyle; - cxStyle228: TcxStyle; - cxStyle229: TcxStyle; - cxStyle230: TcxStyle; - cxStyle231: TcxStyle; - cxStyle232: TcxStyle; - cxStyle233: TcxStyle; - cxStyle234: TcxStyle; - cxStyle235: TcxStyle; - cxStyle236: TcxStyle; - cxStyle237: TcxStyle; - cxStyle238: TcxStyle; - cxStyle239: TcxStyle; - cxStyle240: TcxStyle; - cxStyle241: TcxStyle; - cxStyle242: TcxStyle; - cxStyle243: TcxStyle; - cxStyle244: TcxStyle; - cxStyle245: TcxStyle; - cxStyle246: TcxStyle; - cxStyle247: TcxStyle; - cxStyle248: TcxStyle; - cxStyle249: TcxStyle; - cxStyle250: TcxStyle; - cxStyle251: TcxStyle; - cxStyle252: TcxStyle; - cxStyle253: TcxStyle; - cxStyle254: TcxStyle; - cxStyle255: TcxStyle; - cxStyle256: TcxStyle; - cxStyle257: TcxStyle; - cxStyle258: TcxStyle; - cxStyle259: TcxStyle; - cxStyle260: TcxStyle; - cxStyle261: TcxStyle; - cxStyle262: TcxStyle; - cxStyle263: TcxStyle; - cxStyle264: TcxStyle; - cxStyle265: TcxStyle; - cxStyle266: TcxStyle; - cxStyle267: TcxStyle; - cxStyle268: TcxStyle; - cxStyle269: TcxStyle; - cxStyle270: TcxStyle; - cxStyle271: TcxStyle; - cxStyle272: TcxStyle; - cxStyle273: TcxStyle; - cxStyle274: TcxStyle; - cxStyle275: TcxStyle; - cxStyle276: TcxStyle; - cxStyle277: TcxStyle; - cxStyle278: TcxStyle; - cxStyle279: TcxStyle; - cxStyle280: TcxStyle; - cxStyle281: TcxStyle; - cxStyle282: TcxStyle; - cxStyle283: TcxStyle; - cxStyle284: TcxStyle; - cxStyle285: TcxStyle; - cxStyle286: TcxStyle; - cxStyle287: TcxStyle; - cxStyle288: TcxStyle; - cxStyle289: TcxStyle; - cxStyle290: TcxStyle; - cxStyle291: TcxStyle; - cxStyle292: TcxStyle; - cxStyle293: TcxStyle; - cxStyle294: TcxStyle; - cxStyle295: TcxStyle; - cxStyle296: TcxStyle; - cxStyle297: TcxStyle; - cxStyle298: TcxStyle; - cxStyle299: TcxStyle; - cxStyle300: TcxStyle; - cxStyle301: TcxStyle; - cxStyle302: TcxStyle; - cxStyle303: TcxStyle; - cxStyle304: TcxStyle; - cxStyle305: TcxStyle; - cxStyle306: TcxStyle; - cxStyle307: TcxStyle; - cxStyle308: TcxStyle; - cxStyle309: TcxStyle; - cxStyle310: TcxStyle; - cxStyle311: TcxStyle; - cxStyle312: TcxStyle; - cxStyle313: TcxStyle; - cxStyle314: TcxStyle; - cxStyle315: TcxStyle; - cxStyle316: TcxStyle; - cxStyle317: TcxStyle; - cxStyle318: TcxStyle; - cxStyle319: TcxStyle; - cxStyle320: TcxStyle; - cxStyle321: TcxStyle; - cxStyle322: TcxStyle; - cxStyle323: TcxStyle; - cxStyle324: TcxStyle; - cxStyle325: TcxStyle; - cxStyle326: TcxStyle; - cxStyle327: TcxStyle; - cxStyle328: TcxStyle; - cxStyle329: TcxStyle; - cxStyle330: TcxStyle; - cxStyle331: TcxStyle; - cxStyle332: TcxStyle; - cxStyle333: TcxStyle; - cxStyle334: TcxStyle; - cxStyle335: TcxStyle; - cxStyle336: TcxStyle; - cxStyle337: TcxStyle; - cxStyle338: TcxStyle; - cxStyle339: TcxStyle; - cxStyle340: TcxStyle; - cxStyle341: TcxStyle; - cxStyle342: TcxStyle; - cxStyle343: TcxStyle; - cxStyle344: TcxStyle; - cxStyle345: TcxStyle; - cxStyle346: TcxStyle; - cxStyle347: TcxStyle; - cxStyle348: TcxStyle; - cxStyle349: TcxStyle; - cxStyle350: TcxStyle; - cxStyle351: TcxStyle; - cxStyle352: TcxStyle; - cxStyle353: TcxStyle; - cxStyle354: TcxStyle; - cxStyle355: TcxStyle; - cxStyle356: TcxStyle; - cxStyle357: TcxStyle; - cxStyle358: TcxStyle; - cxStyle359: TcxStyle; - cxStyle360: TcxStyle; - cxStyle361: TcxStyle; - cxStyle362: TcxStyle; - cxStyle363: TcxStyle; - GridTableViewStyleSheetDevExpress: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetDevExpress: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetDevExpress: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetUserFormat1: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetUserFormat1: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetUserFormat1: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetUserFormat2: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetUserFormat2: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetUserFormat2: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetUserFormat3: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetUserFormat3: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetUserFormat3: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetUserFormat4: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetUserFormat4: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetUserFormat4: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetBrick: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetBrick: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetBrick: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetDesert: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetDesert: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetDesert: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetEggplant: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetEggplant: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetEggplant: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetLilac: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetLilac: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetLilac: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetMaple: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetMaple: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetMaple: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetMarinehighcolor: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetMarinehighcolor: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetMarinehighcolor: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetPlumhighcolor: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetPlumhighcolor: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetPlumhighcolor: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetPumpkinlarge: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetPumpkinlarge: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetPumpkinlarge: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetRainyDay: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetRainyDay: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetRainyDay: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetRedWhiteandBlueVGA: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetRedWhiteandBlueVGA: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetRedWhiteandBlueVGA: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetRose: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetRose: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetRose: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetRoselarge: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetRoselarge: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetRoselarge: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetSlate: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetSlate: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetSlate: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetSpruce: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetSpruce: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetSpruce: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetStormVGA: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetStormVGA: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetStormVGA: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetTealVGA: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetTealVGA: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetTealVGA: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetWheat: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetWheat: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetWheat: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetWindowsClassic: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetWindowsClassic: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetWindowsClassic: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetWindowsClassiclarge: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetWindowsClassiclarge: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetWindowsClassiclarge: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetWindowsStandard: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetWindowsStandard: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetWindowsStandard: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetWindowsStandardlarge: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetWindowsStandardlarge: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetWindowsStandardlarge: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetHighContrast1: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetHighContrast1: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetHighContrast1: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetHighContrast1large: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetHighContrast1large: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetHighContrast1large: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetHighContrast2: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetHighContrast2: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetHighContrast2: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetHighContrast2large: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetHighContrast2large: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetHighContrast2large: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetHighContrastBlack: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetHighContrastBlack: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetHighContrastBlack: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetHighContrastBlacklarge: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetHighContrastBlacklarge: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetHighContrastBlacklarge: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetHighContrastWhite: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetHighContrastWhite: TcxGridBandedTableViewStyleSheet; - GridCardViewStyleSheetHighContrastWhite: TcxGridCardViewStyleSheet; - GridTableViewStyleSheetHighContrastWhitelarge: TcxGridTableViewStyleSheet; - GridBandedTableViewStyleSheetHighContrastWhitelarge: TcxGridBandedTableViewStyleSheet; - ClassicRowCaption: TcxStyle; - cxStyle364: TcxStyle; - cxStyle365: TcxStyle; - cxStyle366: TcxStyle; - private - { Private declarations } - public - { Public declarations } - end; - -implementation - -{$R *.dfm} - -uses - cxStyleSheetsLoad; - -type -TcxGridPredefinedStyleSheets = class(TcxPredefinedStyleSheets) -private - FData: TcxdmGridPredefinedStyles; -protected - procedure AddStyleSheets; override; -public - constructor Create; override; - destructor Destroy; override; -end; - -{ TcxGridPredefinedStyleSheets } -constructor TcxGridPredefinedStyleSheets.Create; -begin - inherited Create; - FData := TcxdmGridPredefinedStyles.Create(nil); - AddStyleSheets; -end; - -destructor TcxGridPredefinedStyleSheets.Destroy; -begin - FData.Free; - inherited Destroy; -end; - -procedure TcxGridPredefinedStyleSheets.AddStyleSheets; -var - I: Integer; -begin - for I := 0 to FData.StyleRepository.StyleSheetCount - 1 do - AddStyleSheet(FData.StyleRepository.StyleSheets[I]); -end; - -initialization - RegisterPredefinedStyleSheets(TcxGridPredefinedStyleSheets); - -finalization - UnregisterPredefinedStyleSheets(TcxGridPredefinedStyleSheets); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridReg.dcr b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridReg.dcr deleted file mode 100644 index ca8ab260..00000000 Binary files a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridReg.dcr and /dev/null differ diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridReg.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridReg.pas deleted file mode 100644 index 6956bc7e..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridReg.pas +++ /dev/null @@ -1,1331 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridReg; - -{$I cxVer.inc} - -interface - -const - cxGridVersion = '6.46'; - -procedure Register; - -implementation - -uses - Windows, -{$IFDEF DELPHI6} - DesignEditors, DesignIntf, DesignMenus, VCLEditors, - Types, -{$ELSE} - DsgnIntf, -{$ENDIF} -{$IFNDEF NONDB} - DB, cxDBData, cxDBExtLookupComboBox, cxGridDBBandedTableView, - cxGridDBCardView, cxGridDBDataDefinitions, cxGridDBTableView, cxGridDBChartView, -{$ENDIF} - cxGridImportDialog, - Classes, Controls, ExtCtrls, Graphics, Menus, SysUtils, TypInfo, ImgList, cxControls, - cxCustomData, cxDataStorage, cxEdit, cxEditPropEditors, dxCore, - cxEditRepositoryEditor, cxEditRepositoryItems, cxGrid, cxGridBandedTableView, - cxGridCardView, cxGridCommon, cxGridCustomTableView, cxGridCustomView, cxGridChartView, - cxGridEditor, cxGridLevel, cxGridStrs, cxGridStructureNavigator, - cxGridTableView, cxImageComboBox, cxImageComboBoxItemsEditor, dxCoreReg, cxLibraryReg, - cxPropEditors, cxStyles, cxViewEditor, cxBandedTableViewEditor, cxCardViewEditor, - cxChartViewEditor, cxGridPredefinedStyles, cxGridStyleSheetsPreview, cxGridExportLink; - -const - UnitNamePrefix = ''; - -{ TGridEditor } - -const - GridEditorVerbs: array [0..4] of string = ( - 'Editor...', - 'Import...', - '-', - 'ExpressQuantumGrid Suite ' + cxGridVersion, - 'www.devexpress.com' - ); - - AddOnInsertPosition = 2; - -type - TViewMenuItemAction = (vmiaExecute, vmiaGetCaption, vmiaPrepare); - - TGridEditor = class(TComponentEditor) - private - FViewMenuProvider: TcxCustomGridViewMenuProvider; - function GetGrid: TcxCustomGrid; - function GetGridView: TcxCustomGridView; - protected - function GetViewMenuItemCount: Integer; - function ProcessViewMenuItem(var AIndex: Integer; AAction: TViewMenuItemAction; - const ADesignMenuItem: TDesignMenuItem = nil): Boolean; - - property Grid: TcxCustomGrid read GetGrid; - property GridView: TcxCustomGridView read GetGridView; - property ViewMenuProvider: TcxCustomGridViewMenuProvider read FViewMenuProvider; - public - destructor Destroy; override; - procedure ExecuteVerb(Index: Integer); override; - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - procedure PrepareItem(Index: Integer; const AItem: TDesignMenuItem); override; - end; - -destructor TGridEditor.Destroy; -begin - FViewMenuProvider.Free; - inherited; -end; - -function TGridEditor.GetGrid: TcxCustomGrid; -begin - Result := TcxCustomGrid(Component); -end; - -function TGridEditor.GetGridView: TcxCustomGridView; -begin - Result := Grid.ActiveView; - if (Result <> nil) and Result.IsMaster then - Result := nil; -end; - -function TGridEditor.GetViewMenuItemCount: Integer; -begin - if ViewMenuProvider = nil then - Result := 0 - else - Result := 1 + ViewMenuProvider.Items.Count; // 1 - for separator -end; - -function TGridEditor.ProcessViewMenuItem(var AIndex: Integer; - AAction: TViewMenuItemAction; const ADesignMenuItem: TDesignMenuItem = nil): Boolean; -var - AMenuProviderItem: TcxGridViewMenuItem; -begin - Result := False; - if (AIndex >= AddOnInsertPosition) and (ViewMenuProvider <> nil) then - if AIndex - AddOnInsertPosition < GetViewMenuItemCount then - begin - if AIndex = AddOnInsertPosition then // separator - AMenuProviderItem := nil - else - AMenuProviderItem := ViewMenuProvider.Items[AIndex - AddOnInsertPosition - 1]; - case AAction of - vmiaExecute: - if AMenuProviderItem <> nil then - AMenuProviderItem.DoAction; - vmiaGetCaption: ; - vmiaPrepare: - if AMenuProviderItem = nil then - ADesignMenuItem.Caption := cxGridViewMenuSeparatorCaption - else - AMenuProviderItem.Prepare(ADesignMenuItem); - end; - Result := True; - end - else - Dec(AIndex, GetViewMenuItemCount); -end; - -procedure TGridEditor.ExecuteVerb(Index: Integer); -begin - inherited; - if ProcessViewMenuItem(Index, vmiaExecute) then Exit; - case Index of - 0: ShowGridEditor(Designer, Grid); - 1: ShowGridImportDialog(Designer, Grid); - end; -end; - -function TGridEditor.GetVerb(Index: Integer): string; -begin - if ProcessViewMenuItem(Index, vmiaGetCaption) then - Result := '' - else - if (Index >= 0) and (Index <= High(GridEditorVerbs)) then - Result := GridEditorVerbs[Index] - else - Result := ''; -end; - -function TGridEditor.GetVerbCount: Integer; -begin - FViewMenuProvider.Free; - if GridView <> nil then - FViewMenuProvider := CreateViewMenuProvider(GridView); - - Result := Length(GridEditorVerbs) + GetViewMenuItemCount; -end; - -procedure TGridEditor.PrepareItem(Index: Integer; const AItem: TDesignMenuItem); -begin - inherited; - ProcessViewMenuItem(Index, vmiaPrepare, AItem); -end; - -{ TGridViewRepositoryEditor } - -type - TGridViewRepositoryEditor = class(TComponentEditor) - private - function GetGridViewRepository: TcxGridViewRepository; - protected - property GridViewRepository: TcxGridViewRepository read GetGridViewRepository; - public - procedure ExecuteVerb(Index: Integer); override; - function GetVerb(Index: Integer): string; override; - function GetVerbCount: Integer; override; - end; - -function TGridViewRepositoryEditor.GetGridViewRepository: TcxGridViewRepository; -begin - Result := TcxGridViewRepository(Component); -end; - -procedure TGridViewRepositoryEditor.ExecuteVerb(Index: Integer); -begin - inherited; - case Index of - //0: GridViewRepository.CreateItem(TcxGridDBTableView).Name := Designer.UniqueName('cxGridDBTableView'); - 0: ShowViewRepositoryEditor(Designer, GridViewRepository); - end; -end; - -function TGridViewRepositoryEditor.GetVerb(Index: Integer): string; -begin - case Index of - //0: Result := 'Create TcxGridDBTableView'; - 0: Result := 'Editor...'; - 1: Result := '-'; - 2: Result := 'ExpressQuantumGrid Suite ' + cxGridVersion; - 3: Result := 'www.devexpress.com'; - end; -end; - -function TGridViewRepositoryEditor.GetVerbCount: Integer; -begin - Result := 4; -end; - -{ TcxGridRootLevelStylesEventsProperty } - -type - TcxGridRootLevelStylesEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridRootLevelStylesEventsProperty.GetInstance: TPersistent; -begin - Result := TcxCustomGrid(GetComponent(0)).RootLevelStyles; -end; - -{ TcxGridTableItemPropertiesEventsProperty } - -type - TcxGridTableItemPropertiesEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridTableItemPropertiesEventsProperty.GetInstance: TPersistent; -begin - Result := TcxCustomGridTableItem(GetComponent(0)).Properties; -end; - -{ TcxGridTableItemStylesEventsProperty } - -type - TcxGridTableItemStylesEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridTableItemStylesEventsProperty.GetInstance: TPersistent; -begin - Result := TcxCustomGridTableItem(GetComponent(0)).Styles; -end; - -{ TcxGridDataControllerEventsProperty } - -type - TcxGridDataControllerEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridDataControllerEventsProperty.GetInstance: TPersistent; -begin - Result := TcxCustomGridView(GetComponent(0)).DataController; -end; - -{ TcxGridViewStylesEventsProperty } - -type - TcxGridViewStylesEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridViewStylesEventsProperty.GetInstance: TPersistent; -begin - Result := TcxCustomGridViewAccess.GetStyles(TcxCustomGridView(GetComponent(0))); -end; - -{ TcxGridViewNavigatorButtonsEventsProperty } - -type - TcxGridViewNavigatorButtonsEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridViewNavigatorButtonsEventsProperty.GetInstance: TPersistent; -begin - Result := TcxCustomGridTableView(GetComponent(0)).NavigatorButtons; -end; - -{ TcxGridLevelStylesEventsProperty } - -type - TcxGridLevelStylesEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridLevelStylesEventsProperty.GetInstance: TPersistent; -begin - Result := TcxGridLevel(GetComponent(0)).Styles; -end; - -{ TcxGridBandStylesEventsProperty } - -type - TcxGridBandStylesEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridBandStylesEventsProperty.GetInstance: TPersistent; -begin - Result := TcxGridBand(GetComponent(0)).Styles; -end; - -{ TcxGridChartSeriesStylesEventsProperty } - -type - TcxGridChartSeriesStylesEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridChartSeriesStylesEventsProperty.GetInstance: TPersistent; -begin - Result := TcxGridChartSeries(GetComponent(0)).Styles; -end; - -{ TcxGridChartHistogramValuesEventsProperty } - -type - TcxGridChartHistogramValuesEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridChartHistogramValuesEventsProperty.GetInstance: TPersistent; -begin - Result := TcxGridChartHistogram(GetComponent(0)).Values; -end; - -{ TcxGridChartCategoriesEventsProperty } - -type - TcxGridChartCategoriesEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridChartCategoriesEventsProperty.GetInstance: TPersistent; -begin - Result := TcxGridChartView(GetComponent(0)).Categories; -end; - -{ TcxGridChartAreaDiagramEventsProperty } - -type - TcxGridChartAreaDiagramEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridChartAreaDiagramEventsProperty.GetInstance: TPersistent; -begin - Result := TcxGridChartView(GetComponent(0)).DiagramArea; -end; - -{ TcxGridChartBarDiagramEventsProperty } - -type - TcxGridChartBarDiagramEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridChartBarDiagramEventsProperty.GetInstance: TPersistent; -begin - Result := TcxGridChartView(GetComponent(0)).DiagramBar; -end; - -{ TcxGridChartColumnDiagramEventsProperty } - -type - TcxGridChartColumnDiagramEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridChartColumnDiagramEventsProperty.GetInstance: TPersistent; -begin - Result := TcxGridChartView(GetComponent(0)).DiagramColumn; -end; - -{ TcxGridChartLineDiagramEventsProperty } - -type - TcxGridChartLineDiagramEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridChartLineDiagramEventsProperty.GetInstance: TPersistent; -begin - Result := TcxGridChartView(GetComponent(0)).DiagramLine; -end; - -{ TcxGridChartPieDiagramEventsProperty } - -type - TcxGridChartPieDiagramEventsProperty = class(TcxNestedEventProperty) - protected - function GetInstance: TPersistent; override; - end; - -function TcxGridChartPieDiagramEventsProperty.GetInstance: TPersistent; -begin - Result := TcxGridChartView(GetComponent(0)).DiagramPie; -end; - -{ TcxGridLevelGridViewProperty } - -type - TcxGridLevelGridViewProperty = class(TComponentProperty) - private - function GetLevel: TcxGridLevel; - protected - property Level: TcxGridLevel read GetLevel; - public - function GetAttributes: TPropertyAttributes; override; - procedure GetValues(Proc: TGetStrProc); override; - end; - -function TcxGridLevelGridViewProperty.GetLevel: TcxGridLevel; -begin - Result := TcxGridLevel(GetComponent(0)); -end; - -function TcxGridLevelGridViewProperty.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes - [paMultiSelect]; -end; - -procedure TcxGridLevelGridViewProperty.GetValues(Proc: TGetStrProc); -var - AViewList: TcxGridLevelViewList; - I: Integer; -begin - AViewList := TcxGridLevelViewList.Create(Level); - try - for I := 0 to AViewList.ViewNames.Count - 1 do - Proc(AViewList.ViewNames[I]); - finally - AViewList.Free; - end; -end; - -{ TcxGridLevelImageIndexProperty } - -type - TcxGridLevelImageIndexProperty = class(TImageIndexProperty) - public - function GetImages: TCustomImageList; override; - end; - -function TcxGridLevelImageIndexProperty.GetImages: TCustomImageList; -begin - Result := TcxCustomGrid(TcxGridLevel(GetComponent(0)).Control).LevelTabs.Images; -end; - -{ TcxCustomGridTableItemPropertiesProperty } - -type - TcxCustomGridTableItemPropertiesProperty = class(TClassProperty) - protected - function HasSubProperties: Boolean; - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - end; - -function TcxCustomGridTableItemPropertiesProperty.HasSubProperties: Boolean; -var - I: Integer; -begin - for I := 0 to PropCount - 1 do - begin - Result := TcxCustomGridTableItem(GetComponent(I)).Properties <> nil; - if not Result then Exit; - end; - Result := True; -end; - -function TcxCustomGridTableItemPropertiesProperty.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes; - if not HasSubProperties then - Exclude(Result, paSubProperties); - Result := Result - [paReadOnly] + - [paValueList, paSortList, paRevertable{$IFDEF DELPHI6}, paVolatileSubProperties{$ENDIF}]; -end; - -function TcxCustomGridTableItemPropertiesProperty.GetValue: string; -begin - if HasSubProperties then - Result := GetRegisteredEditProperties.GetDescriptionByClass( - TcxCustomGridTableItem(GetComponent(0)).Properties.ClassType) - else - Result := ''; -end; - -procedure TcxCustomGridTableItemPropertiesProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to GetRegisteredEditProperties.Count - 1 do - Proc(GetRegisteredEditProperties.Descriptions[I]); -end; - -procedure TcxCustomGridTableItemPropertiesProperty.SetValue(const Value: string); -var - APropertiesClass: TcxCustomEditPropertiesClass; - I: Integer; -begin - APropertiesClass := TcxCustomEditPropertiesClass(GetRegisteredEditProperties.FindByClassName(Value)); - if APropertiesClass = nil then - APropertiesClass := TcxCustomEditPropertiesClass(GetRegisteredEditProperties.FindByDescription(Value)); -{$IFNDEF DELPHI7} - if GetValue <> Value then - ObjectInspectorCollapseProperty; -{$ENDIF} - for I := 0 to PropCount - 1 do - TcxCustomGridTableItem(GetComponent(I)).PropertiesClass := APropertiesClass; - Modified; -end; - -{$IFNDEF NONDB} - -type - TcxDBDataSummaryItemFieldNameProperty = class(TFieldNameProperty) - public - function GetDataSource: TDataSource; override; - end; - -function TcxDBDataSummaryItemFieldNameProperty.GetDataSource: TDataSource; -begin - Result := (GetComponent(0) as TcxDBDataSummaryItem).DataController.DataSource; -end; - -type - TcxGridItemDBDataBindingFieldNameProperty = class(TFieldNameProperty) - public - function GetDataSource: TDataSource; override; - end; - -function TcxGridItemDBDataBindingFieldNameProperty.GetDataSource: TDataSource; -begin - Result := TcxGridItemDBDataBinding(GetComponent(0)).DataController.DataSource; -end; - -type - TMasterKeyFieldNamesProperty = class(TFieldNameProperty) - function GetDataSource: TDataSource; override; - end; - -function TMasterKeyFieldNamesProperty.GetDataSource: TDataSource; -var - AIDataController: IcxCustomGridDataController; - AParentLevel: TcxGridLevel; -begin - Result := nil; - if Supports(GetComponent(0), IcxCustomGridDataController, AIDataController) then - begin - AParentLevel := AIDataController.GridView.Level as TcxGridLevel; - if AParentLevel <> nil then - AParentLevel := AParentLevel.Parent; - if (AParentLevel <> nil) and (AParentLevel.GridView <> nil) and - (AParentLevel.GridView.DataController is TcxDBDataController) then - Result := TcxDBDataController(AParentLevel.GridView.DataController).DataSource; - end; -end; - -{ TcxGridDBChartItemDataBindingFieldNameProperty } - -type - TcxGridDBChartItemDataBindingFieldNameProperty = class(TFieldNameProperty) - public - function GetDataSource: TDataSource; override; - procedure GetValueList(AList: TStrings); override; - end; - -function TcxGridDBChartItemDataBindingFieldNameProperty.GetDataSource: TDataSource; -begin - Result := TcxGridDBChartItemDataBinding(GetComponent(0)).DataController.DataSource; -end; - -procedure TcxGridDBChartItemDataBindingFieldNameProperty.GetValueList(AList: TStrings); -var - I, J: Integer; - AField: TField; - AValueTypeClass: TcxValueTypeClass; -begin - inherited; - for I := AList.Count - 1 downto 0 do - begin - AField := GetDataSource.DataSet.FindField(AList[I]); - if AField = nil then - AList.Delete(I) - else - begin - AValueTypeClass := GetValueTypeClassByField(AField); - for J := 0 to PropCount - 1 do - if not (GetComponent(J) as TcxGridDBChartItemDataBinding).IsValueTypeClassValid(AValueTypeClass) then - begin - AList.Delete(I); - Break; - end; - end; - end; -end; - -{$ENDIF} - -{ TcxCustomGridBandIndexProperty } - -const - sNoBand = ''; - sIndexCaptionSeparator = ' - '; - -type - TcxCustomGridBandIndexProperty = class(TIntegerProperty) - private - function GetGridView: TcxGridBandedTableView; - protected - function GetGridViewForComponent(AIndex: Integer): TcxGridBandedTableView; virtual; abstract; - function GetValueForBandIndex(AIndex: Integer): string; - function IsSameGridView: Boolean; - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - property GridView: TcxGridBandedTableView read GetGridView; - end; - -function TcxCustomGridBandIndexProperty.GetGridView: TcxGridBandedTableView; -begin - Result := GetGridViewForComponent(0); -end; - -function TcxCustomGridBandIndexProperty.GetValueForBandIndex(AIndex: Integer): string; -begin - if AIndex = -1 then - Result := sNoBand - else - begin - Result := IntToStr(AIndex); - if GridView.Bands[AIndex].Caption <> '' then - Result := Result + sIndexCaptionSeparator + GridView.Bands[AIndex].Caption; - end; -end; - -function TcxCustomGridBandIndexProperty.IsSameGridView: Boolean; -var - I: Integer; -begin - Result := True; - for I := 1 to PropCount - 1 do - begin - Result := GetGridViewForComponent(I) = GridView; - if not Result then Break; - end; -end; - -function TcxCustomGridBandIndexProperty.GetAttributes: TPropertyAttributes; -begin - Result := inherited GetAttributes; - if IsSameGridView then Include(Result, paValueList); -end; - -function TcxCustomGridBandIndexProperty.GetValue: string; -begin - if IsSameGridView or (GetOrdValue = -1) then - Result := GetValueForBandIndex(GetOrdValue) - else - Result := inherited GetValue; -end; - -procedure TcxCustomGridBandIndexProperty.GetValues(Proc: TGetStrProc); -begin - Proc(GetValueForBandIndex(-1)); -end; - -procedure TcxCustomGridBandIndexProperty.SetValue(const Value: string); -var - P: Integer; -begin - if Value = sNoBand then - SetOrdValue(-1) - else - begin - P := Pos(sIndexCaptionSeparator, Value); - if P = 0 then - inherited SetValue(Value) - else - inherited SetValue(Copy(Value, 1, P - 1)); - end; -end; - -{ TcxGridBandedColumnBandIndexProperty } - -type - TcxGridBandedColumnBandIndexProperty = class(TcxCustomGridBandIndexProperty) - protected - function GetGridViewForComponent(AIndex: Integer): TcxGridBandedTableView; override; - public - procedure GetValues(Proc: TGetStrProc); override; - end; - -function TcxGridBandedColumnBandIndexProperty.GetGridViewForComponent(AIndex: Integer): TcxGridBandedTableView; -begin - Result := TcxGridBandedColumnPosition(GetComponent(AIndex)).GridView; -end; - -procedure TcxGridBandedColumnBandIndexProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - inherited; - for I := 0 to GridView.Bands.BottomItemCount - 1 do - Proc(GetValueForBandIndex(GridView.Bands.BottomItems[I].Index)); -end; - -{ TcxGridBandBandIndexProperty } - -type - TcxGridBandBandIndexProperty = class(TcxCustomGridBandIndexProperty) - protected - function GetGridViewForComponent(AIndex: Integer): TcxGridBandedTableView; override; - public - procedure GetValues(Proc: TGetStrProc); override; - end; - -function TcxGridBandBandIndexProperty.GetGridViewForComponent(AIndex: Integer): TcxGridBandedTableView; -begin - Result := TcxGridBandPosition(GetComponent(AIndex)).GridView; -end; - -procedure TcxGridBandBandIndexProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; - - function IsBandSelected(ABandIndex: Integer): Boolean; - var - ABand: TcxGridBand; - I: Integer; - begin - ABand := GridView.Bands[ABandIndex]; - for I := 0 to PropCount - 1 do - begin - Result := TcxGridBandPosition(GetComponent(I)).Band = ABand; - if Result then Exit; - end; - Result := False; - end; - -begin - inherited; - for I := 0 to GridView.Bands.Count - 1 do - if not IsBandSelected(I) then - Proc(GetValueForBandIndex(I)); -end; - -{ TcxCustomGridTableItemProperty } - -type - TcxCustomGridTableItemProperty = class(TComponentProperty) - protected - function GetGridView: TcxCustomGridView; - procedure GetGridViewItemNames(AGridView: TcxCustomGridView; Proc: TGetStrProc); virtual; - function InternalGetGridView(APersistent: TPersistent): TcxCustomGridView; virtual; abstract; - public - procedure GetValues(Proc: TGetStrProc); override; - end; - -procedure TcxCustomGridTableItemProperty.GetValues(Proc: TGetStrProc); -var - AGridView: TcxCustomGridView; -begin - AGridView := GetGridView; - if AGridView <> nil then - GetGridViewItemNames(AGridView, Proc); -end; - -function TcxCustomGridTableItemProperty.GetGridView: TcxCustomGridView; -var - I: Integer; -begin - Result := InternalGetGridView(GetComponent(0)); - for I := 1 to PropCount - 1 do - if InternalGetGridView(GetComponent(I)) <> Result then - begin - Result := nil; - Break; - end; -end; - -procedure TcxCustomGridTableItemProperty.GetGridViewItemNames(AGridView: TcxCustomGridView; - Proc: TGetStrProc); -var - I: Integer; -begin - if AGridView is TcxCustomGridTableView then - with AGridView as TcxCustomGridTableView do - for I := 0 to ItemCount - 1 do - Proc(Designer.GetComponentName(Items[I])); -end; - -{ TcxGridIncSearchItemProperty } - -type - TcxGridIncSearchItemProperty = class(TcxCustomGridTableItemProperty) - protected - function InternalGetGridView(APersistent: TPersistent): TcxCustomGridView; override; - end; - -function TcxGridIncSearchItemProperty.InternalGetGridView(APersistent: TPersistent): - TcxCustomGridView; -begin - Result := TcxCustomGridTableOptionsBehavior(APersistent).GridView; -end; - -{ TcxGridPreviewColumnProperty } - -type - TcxGridPreviewColumnProperty = class(TcxCustomGridTableItemProperty) - protected - function InternalGetGridView(APersistent: TPersistent): TcxCustomGridView; override; - end; - -function TcxGridPreviewColumnProperty.InternalGetGridView(APersistent: TPersistent): - TcxCustomGridView; -begin - Result := TcxGridPreview(APersistent).GridView; -end; - -{ TcxGridTableSummaryItemColumnProperty } - -type - TcxGridTableSummaryItemColumnProperty = class(TcxCustomGridTableItemProperty) - protected - function InternalGetGridView(APersistent: TPersistent): TcxCustomGridView; override; - end; - -function TcxGridTableSummaryItemColumnProperty.InternalGetGridView(APersistent: TPersistent): - TcxCustomGridView; -begin - Result := (TcxCustomDataSummaryItem(APersistent).DataController as - IcxCustomGridDataController).GridView; -end; - -{ TcxGridChartItemValueTypeProperty } - -type - TcxGridChartItemValueTypeProperty = class(TcxValueTypeProperty) - protected - function IsValueTypeClassValid(AValueTypeClass: TcxValueTypeClass): Boolean; override; - end; - -function TcxGridChartItemValueTypeProperty.IsValueTypeClassValid(AValueTypeClass: TcxValueTypeClass): Boolean; -var - I: Integer; -begin - Result := inherited IsValueTypeClassValid(AValueTypeClass); - if Result then - for I := 0 to PropCount - 1 do - begin - Result := (GetComponent(I) as TcxGridChartItemDataBinding).IsValueTypeClassValid(AValueTypeClass); - if not Result then Break; - end; -end; - -{ TcxGridChartActiveDiagramProperty } - -type - TcxGridChartActiveDiagramProperty = class(TPropertyEditor) - private - function GetGridView: TcxGridChartView; - public - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - procedure GetValues(Proc: TGetStrProc); override; - procedure SetValue(const Value: string); override; - property GridView: TcxGridChartView read GetGridView; - end; - -function TcxGridChartActiveDiagramProperty.GetGridView: TcxGridChartView; -begin - Result := GetComponent(0) as TcxGridChartView; -end; - -function TcxGridChartActiveDiagramProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paValueList]; -end; - -function TcxGridChartActiveDiagramProperty.GetValue: string; -begin - if GridView.ActiveDiagram = nil then - Result := 'All diagrams are disabled' - else - Result := GridView.ActiveDiagram.DisplayText; -end; - -procedure TcxGridChartActiveDiagramProperty.GetValues(Proc: TGetStrProc); -var - I: Integer; -begin - for I := 0 to GridView.AvailableDiagramCount - 1 do - Proc(GridView.AvailableDiagrams[I].DisplayText); -end; - -procedure TcxGridChartActiveDiagramProperty.SetValue(const Value: string); -var - I: Integer; -begin - for I := 0 to GridView.AvailableDiagramCount - 1 do - if GridView.AvailableDiagrams[I].DisplayText = Value then - begin - GridView.AvailableDiagrams[I].Active := True; - Modified; - Break; - end; -end; - -{$IFNDEF NONDB} - -{ Ext Lookup } - -type - TcxExtLookupComboBoxPropertiesFieldNameProperty = class(TFieldNameProperty) - public - function GetDataSource: TDataSource; override; - end; - - TcxExtLookupComboBoxPropertiesItemColumnProperty = class(TcxCustomGridTableItemProperty) - protected - function InternalGetGridView(APersistent: TPersistent): TcxCustomGridView; override; - end; - - TcxExtLookupComboBoxPropertiesViewProperty = class(TComponentProperty) - private - FProc: TGetStrProc; - procedure CheckComponent(const Value: string); - public - procedure GetValues(Proc: TGetStrProc); override; - end; - -function TcxExtLookupComboBoxPropertiesFieldNameProperty.GetDataSource: TDataSource; -var - AProperties: TcxExtLookupComboBoxProperties; -begin - AProperties := GetComponent(0) as TcxExtLookupComboBoxProperties; - if AProperties.DataController <> nil then - Result := AProperties.DataController.DataSource - else - Result := nil; -end; - -function TcxExtLookupComboBoxPropertiesItemColumnProperty.InternalGetGridView(APersistent: TPersistent): TcxCustomGridView; -var - AProperties: TcxExtLookupComboBoxProperties; -begin - AProperties := APersistent as TcxExtLookupComboBoxProperties; - Result := AProperties.View; -end; - -procedure TcxExtLookupComboBoxPropertiesViewProperty.GetValues(Proc: TGetStrProc); -begin - FProc := Proc; - inherited GetValues(CheckComponent); -end; - -procedure TcxExtLookupComboBoxPropertiesViewProperty.CheckComponent(const Value: string); -var - AView: TcxCustomGridTableView; -begin - AView := TcxCustomGridTableView(Designer.GetComponent(Value)); - if (AView <> nil) and TcxExtLookupComboBoxProperties.IsViewSupported(AView) then - FProc(Value); -end; - -{$ENDIF} - -{$IFDEF DELPHI6} - -type - TcxGridSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - - TcxGridLevelSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - - TcxCustomTableViewSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - - TcxCustomDBTableViewSelectionEditor = class(TcxCustomTableViewSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - - TcxCustomGridTableItemSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - -procedure TcxGridSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc(UnitNamePrefix + 'cxStyles'); -end; - -procedure TcxGridLevelSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc(UnitNamePrefix + 'cxStyles'); -end; - -procedure TcxCustomTableViewSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - Proc(UnitNamePrefix + 'cxStyles'); - Proc('cxCustomData'); - Proc(UnitNamePrefix + 'cxGraphics'); - Proc('cxFilter'); - Proc('cxData'); - Proc('cxDataStorage'); - Proc(UnitNamePrefix + 'cxEdit'); -end; - -procedure TcxCustomDBTableViewSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - inherited RequiresUnits(Proc); - Proc('DB'); - Proc('cxDBData'); -end; - -procedure TcxCustomGridTableItemSelectionEditor.RequiresUnits(Proc: TGetStrProc); -var - I: Integer; - AComponent: TComponent; - AItem: TcxCustomGridTableItem; -begin - for I := 0 to Designer.Root.ComponentCount - 1 do - begin - AComponent := Designer.Root.Components[I]; - if AComponent is TcxCustomGridTableItem then - begin - AItem := TcxCustomGridTableItem(AComponent); - if AItem.Properties <> nil then - Proc(dxShortStringToString(GetTypeData(PTypeInfo(AItem.Properties.ClassType.ClassInfo)).UnitName)); - end; - end; -end; - -{ TcxGridChartViewSelectionEditor } - -type - TcxGridChartViewSelectionEditor = class(TSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - -procedure TcxGridChartViewSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - inherited; - Proc('cxStyles'); - Proc('cxCustomData'); - Proc('cxGraphics'); -end; - -{$IFNDEF NONDB} - -{ TcxGridDBChartViewSelectionEditor } - -type - TcxGridDBChartViewSelectionEditor = class(TcxGridChartViewSelectionEditor) - public - procedure RequiresUnits(Proc: TGetStrProc); override; - end; - -procedure TcxGridDBChartViewSelectionEditor.RequiresUnits(Proc: TGetStrProc); -begin - inherited; - Proc('DB'); - Proc('cxDBData'); -end; - -{$ENDIF} - -{$ENDIF} - -type - -{ TcxImageComboBoxItemsProperty } - - TcxImageComboBoxItemsProperty = class(TPropertyEditor) - public - procedure Edit; override; - function GetAttributes: TPropertyAttributes; override; - function GetValue: string; override; - end; - -procedure TcxImageComboBoxItemsProperty.Edit; -var - S: string; - AProperties: TcxImageComboBoxProperties; -begin - S := 'Properties' + '.' + GetName; - AProperties := TcxImageComboBoxProperties(GetComponent(0)); - if (AProperties.Owner <> nil) and (AProperties.Owner is TComponent) then - S := TComponent(AProperties.Owner).Name + '.' + S; - with TfmImageComboBoxItemsEditor.Create( - AProperties.Items, AProperties.Images, AProperties.LargeImages) do - try - Caption := S; - if ShowModal = mrOk then - Self.Designer.Modified; - finally - Free; - end; -end; - -function TcxImageComboBoxItemsProperty.GetAttributes: TPropertyAttributes; -begin - Result := [paDialog, paReadOnly]; -end; - -function TcxImageComboBoxItemsProperty.GetValue: string; -begin - FmtStr(Result, '(%s)', [GetPropType^.Name]); -end; - -procedure Register; -begin -{$IFDEF DELPHI9} - ForceDemandLoadState(dlDisable); -{$ENDIF} - - RegisterComponentEditor(TcxGrid, TGridEditor); - RegisterComponentEditor(TcxGridViewRepository, TGridViewRepositoryEditor); - - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomGrid, 'RootLevelStylesEvents', - TcxGridRootLevelStylesEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomGridTableItem, 'PropertiesEvents', - TcxGridTableItemPropertiesEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomGridTableItem, 'StylesEvents', - TcxGridTableItemStylesEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomGridView, 'DataControllerEvents', - TcxGridDataControllerEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomGridView, 'StylesEvents', - TcxGridViewStylesEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxCustomGridTableView, 'NavigatorButtonsEvents', - TcxGridViewNavigatorButtonsEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxGridLevel, 'StylesEvents', - TcxGridLevelStylesEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxGridBand, 'StylesEvents', - TcxGridBandStylesEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxGridChartSeries, 'StylesEvents', - TcxGridChartSeriesStylesEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxGridChartHistogram, 'ValuesEvents', - TcxGridChartHistogramValuesEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxGridChartView, 'CategoriesEvents', - TcxGridChartCategoriesEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxGridChartView, 'DiagramAreaEvents', - TcxGridChartAreaDiagramEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxGridChartView, 'DiagramBarEvents', - TcxGridChartBarDiagramEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxGridChartView, 'DiagramColumnEvents', - TcxGridChartColumnDiagramEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxGridChartView, 'DiagramLineEvents', - TcxGridChartLineDiagramEventsProperty); - RegisterPropertyEditor(TypeInfo(TNotifyEvent), TcxGridChartView, 'DiagramPieEvents', - TcxGridChartPieDiagramEventsProperty); - - RegisterPropertyEditor(TypeInfo(TcxCustomGridView), TcxGridLevel, 'GridView', - TcxGridLevelGridViewProperty); - RegisterPropertyEditor(TypeInfo(TImageIndex), TcxGridLevel, 'ImageIndex', - TcxGridLevelImageIndexProperty); - RegisterPropertyEditor(TypeInfo(string), TcxCustomGridTableItem, 'PropertiesClassName', nil); - RegisterPropertyEditor(TypeInfo(TcxCustomEditProperties), TcxCustomGridTableItem, - 'Properties', TcxCustomGridTableItemPropertiesProperty); - RegisterPropertyEditor(TypeInfo(string), TcxGridItemDataBinding, 'ValueType', - TcxValueTypeProperty); - RegisterPropertyEditor(TypeInfo(TComponent), TcxCustomGridView, 'PopupMenu', - TcxControlPopupMenuProperty); - RegisterPropertyEditor(TypeInfo(Boolean), TcxCustomGridTableOptionsSelection, 'HideFocusRect', nil); - RegisterPropertyEditor(TypeInfo(TAlignment), TcxGridBand, 'Alignment', nil); - RegisterPropertyEditor(TypeInfo(Integer), TcxGridBandedColumnPosition, 'BandIndex', - TcxGridBandedColumnBandIndexProperty); - RegisterPropertyEditor(TypeInfo(Integer), TcxGridBandPosition, 'BandIndex', - TcxGridBandBandIndexProperty); - RegisterPropertyEditor(TypeInfo(string), TcxGridChartItemDataBinding, 'ValueType', - TcxGridChartItemValueTypeProperty); - RegisterPropertyEditor(TypeInfo(TcxGridChartDiagram), TcxGridChartView, 'ActiveDiagram', - TcxGridChartActiveDiagramProperty); - - RegisterPropertyEditor(TypeInfo(TcxCustomGridTableItem), TcxCustomGridTableOptionsBehavior, - 'IncSearchItem', TcxGridIncSearchItemProperty); - RegisterPropertyEditor(TypeInfo(TcxCustomGridTableItem), TcxGridPreview, - 'Column', TcxGridPreviewColumnProperty); - RegisterPropertyEditor(TypeInfo(TcxCustomGridTableItem), TcxGridTableSummaryItem, - 'Column', TcxGridTableSummaryItemColumnProperty); -{$IFNDEF NONDB} - RegisterPropertyEditor(TypeInfo(TcxCustomGridTableItem), TcxGridDBTableSummaryItem, - 'Column', TcxGridTableSummaryItemColumnProperty); -{$ENDIF} - RegisterPropertyEditor(TypeInfo(TcxCustomGridTableItem), TcxGridTableSummaryGroupItemLink, - 'Column', TcxGridTableSummaryItemColumnProperty); - -{$IFNDEF NONDB} - RegisterPropertyEditor(TypeInfo(string), TcxDBDataController, 'DetailKeyFieldNames', TFieldNameProperty); - RegisterPropertyEditor(TypeInfo(string), TcxDBDataController, 'KeyFieldNames', TFieldNameProperty); - RegisterPropertyEditor(TypeInfo(string), TcxDBDataController, 'MasterKeyFieldNames', TMasterKeyFieldNamesProperty); - RegisterPropertyEditor(TypeInfo(string), TcxDBDataSummaryItem, 'FieldName', TcxDBDataSummaryItemFieldNameProperty); - RegisterPropertyEditor(TypeInfo(string), TcxGridItemDBDataBinding, 'FieldName', TcxGridItemDBDataBindingFieldNameProperty); - RegisterPropertyEditor(TypeInfo(string), TcxGridDBChartItemDataBinding, 'FieldName', TcxGridDBChartItemDataBindingFieldNameProperty); -{$ENDIF} - - RegisterNoIcon([TcxGridLevel, - TcxGridTableView, {$IFNDEF NONDB}TcxGridDBTableView,{$ENDIF} - TcxGridBandedTableView, {$IFNDEF NONDB}TcxGridDBBandedTableView,{$ENDIF} - TcxGridChartView, {$IFNDEF NONDB}TcxGridDBChartView,{$ENDIF} - TcxGridCardView{$IFNDEF NONDB}, TcxGridDBCardView{$ENDIF}]); - RegisterNoIcon([ - TcxGridColumn, {$IFNDEF NONDB}TcxGridDBColumn,{$ENDIF} - TcxGridBandedColumn, {$IFNDEF NONDB}TcxGridDBBandedColumn,{$ENDIF} - TcxGridCardViewRow, {$IFNDEF NONDB}TcxGridDBCardViewRow,{$ENDIF} - TcxGridChartDataGroup, {$IFNDEF NONDB}TcxGridDBChartDataGroup,{$ENDIF} - TcxGridChartSeries{$IFNDEF NONDB}, TcxGridDBChartSeries{$ENDIF}]); - RegisterNoIcon([TcxGridTableViewStyleSheet, TcxGridBandedTableViewStyleSheet, TcxGridCardViewStyleSheet]); - RegisterComponents('Dev Express', [TcxGrid, TcxGridViewRepository]); -{$IFNDEF NONDB} - // Ext Lookup - RegisterComponents('Express Editors 6', [TcxExtLookupComboBox]); - RegisterComponents('Express DBEditors 6', [TcxDBExtLookupComboBox]); - RegisterEditRepositoryItem(TcxEditRepositoryExtLookupComboBoxItem, cxSEditRepositoryExtLookupComboBoxItem); - RegisterPropertyEditor(TypeInfo(string), TcxExtLookupComboBoxProperties, 'KeyFieldNames', TcxExtLookupComboBoxPropertiesFieldNameProperty); - RegisterPropertyEditor(TypeInfo(TcxCustomGridTableItem), TcxExtLookupComboBoxProperties, 'ListFieldItem', TcxExtLookupComboBoxPropertiesItemColumnProperty); - RegisterPropertyEditor(TypeInfo(TcxCustomGridTableView), TcxExtLookupComboBoxProperties, 'View', TcxExtLookupComboBoxPropertiesViewProperty); - RegisterPropertyEditor(TypeInfo(TShortCut), TcxExtLookupComboBoxProperties, 'ClearKey', TShortCutProperty); -{$ENDIF} - -{$IFDEF DELPHI6} - RegisterSelectionEditor(TcxCustomGrid, TcxGridSelectionEditor); - RegisterSelectionEditor(TcxGridLevel, TcxGridLevelSelectionEditor); - RegisterSelectionEditor(TcxCustomGridTableView, TcxCustomTableViewSelectionEditor); - RegisterSelectionEditor(TcxGridChartView, TcxGridChartViewSelectionEditor); -{$IFNDEF NONDB} - RegisterSelectionEditor(TcxGridDBTableView, TcxCustomDBTableViewSelectionEditor); - RegisterSelectionEditor(TcxGridDBBandedTableView, TcxCustomDBTableViewSelectionEditor); - RegisterSelectionEditor(TcxGridDBCardView, TcxCustomDBTableViewSelectionEditor); - RegisterSelectionEditor(TcxGridDBChartView, TcxGridDBChartViewSelectionEditor); -{$ENDIF} - RegisterSelectionEditor(TcxCustomGridTableItem, TcxCustomGridTableItemSelectionEditor); -{$ENDIF} - - RegisterPropertyEditor(TypeInfo(TcxImageComboBoxItems), - TcxImageComboBoxProperties, 'Items', TcxImageComboBoxItemsProperty); - -end; - -initialization -{$IFDEF DELPHI6} - StartClassGroup(TControl); - GroupDescendentsWith(TcxGrid, TControl); - GroupDescendentsWith(TcxGridViewRepository, TControl); - GroupDescendentsWith(TcxGridLevel, TControl); - GroupDescendentsWith(TcxCustomGridView, TControl); - GroupDescendentsWith(TcxCustomGridTableItem, TControl); - GroupDescendentsWith(TcxGridItemDataBinding, TControl); - GroupDescendentsWith(TcxGridChartItem, TControl); -{$ENDIF} - RegisterStyleSheetClass(TcxGridTableViewStyleSheet); - RegisterStyleSheetClass(TcxGridBandedTableViewStyleSheet); - RegisterStyleSheetClass(TcxGridCardViewStyleSheet); - -finalization - UnregisterStyleSheetClass(TcxGridCardViewStyleSheet); - UnregisterStyleSheetClass(TcxGridBandedTableViewStyleSheet); - UnregisterStyleSheetClass(TcxGridTableViewStyleSheet); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridRows.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridRows.pas deleted file mode 100644 index 32df3af5..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridRows.pas +++ /dev/null @@ -1,3404 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridRows; - -{$I cxVer.inc} -{$I cxGridVer.inc} - -interface - -uses - Windows, Classes, Graphics, Controls, - dxCore, cxClasses, cxControls, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, cxCustomData, cxPC, - cxGridCommon, cxGridLevel, cxGridCustomView, - cxGridCustomTableView, cxGridTableView, - cxGridDetailsSite; - -const - htPreview = htGridBase + 31; - -type - TcxGridDataCellViewInfoClass = class of TcxGridDataCellViewInfo; - TcxGridDataCellViewInfo = class; - TcxGridDataRowCellsAreaViewInfo = class; - TcxGridDataRowViewInfo = class; - TcxGridNewItemRowViewInfo = class; - TcxGridGroupCellViewInfo = class; - TcxGridGroupSummaryCellViewInfo = class; - TcxGridGroupRowViewInfo = class; -{$IFDEF USETABCONTROL} - TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo = class; -{$ENDIF} - TcxGridDetailsSiteViewInfo = class; - TcxGridExpandButtonCellViewInfo = class; - TcxGridMasterDataRowViewInfo = class; - - { hit tests } - - TcxGridPreviewHitTest = class(TcxGridRecordCellHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - { painters } - - TcxGridDataCellPainter = class(TcxGridTableDataCellPainter) - private - function GetViewInfo: TcxGridDataCellViewInfo; - protected - procedure DrawBorder(ABorder: TcxBorder); override; - function ExcludeFromClipRect: Boolean; override; - property ViewInfo: TcxGridDataCellViewInfo read GetViewInfo; - end; - - TcxGridDataRowPainter = class(TcxCustomGridRowPainter) - private - function GetViewInfo: TcxGridDataRowViewInfo; - protected - procedure DrawCells; virtual; - function GetShowCells: Boolean; virtual; - procedure Paint; override; - property ShowCells: Boolean read GetShowCells; - property ViewInfo: TcxGridDataRowViewInfo read GetViewInfo; - end; - - TcxGridNewItemRowPainter = class(TcxGridDataRowPainter) - private - function GetViewInfo: TcxGridNewItemRowViewInfo; - protected - procedure DrawBackground; override; - procedure DrawSeparator; override; - function GetShowCells: Boolean; override; - procedure Paint; override; - property ViewInfo: TcxGridNewItemRowViewInfo read GetViewInfo; - end; - -{$IFDEF USETABCONTROL} - - TcxGridMasterDataRowDetailsSiteTabsPainter = class(TcxGridDetailsSiteTabsPainter) - private - function GetViewInfo: TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo; - protected - procedure DrawBottomGridLine; virtual; - procedure Paint; override; - property ViewInfo: TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo read GetViewInfo; - end; - -{$ENDIF} - - TcxGridExpandButtonCellPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridExpandButtonCellViewInfo; - protected - procedure DrawBorder(ABorder: TcxBorder); override; - property ViewInfo: TcxGridExpandButtonCellViewInfo read GetViewInfo; - end; - - TcxGridMasterDataRowPainter = class(TcxGridDataRowPainter) - private - function GetViewInfo: TcxGridMasterDataRowViewInfo; - protected - procedure DrawCells; override; - procedure DrawDetailsSite; virtual; - //procedure DrawDetailsArea; virtual; - procedure DrawExpandButtonCell; virtual; - function NeedsPainting: Boolean; override; - procedure Paint; override; - property ViewInfo: TcxGridMasterDataRowViewInfo read GetViewInfo; - end; - - TcxGridGroupCellPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridGroupCellViewInfo; - protected - procedure DrawBorder(ABorder: TcxBorder); override; - property ViewInfo: TcxGridGroupCellViewInfo read GetViewInfo; - end; - - TcxGridGroupSummaryCellPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridGroupSummaryCellViewInfo; - protected - procedure Paint; override; - property ViewInfo: TcxGridGroupSummaryCellViewInfo read GetViewInfo; - end; - - TcxGridGroupRowPainter = class(TcxCustomGridRowPainter) - private - function GetViewInfo: TcxGridGroupRowViewInfo; - protected - procedure DrawBackground; override; - procedure DrawSeparator; override; - procedure DrawSummaryCells; virtual; - procedure Paint; override; - property ViewInfo: TcxGridGroupRowViewInfo read GetViewInfo; - end; - - { view infos } - - TcxGridCellViewInfo = class(TcxGridTableCellViewInfo) - private - function GetGridView: TcxGridTableView; - function GetGridLines: TcxGridLines; - function GetGridRecord: TcxCustomGridRow; - function GetGridViewInfo: TcxGridTableViewInfo; - function GetRecordViewInfo: TcxCustomGridRowViewInfo; - protected - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - property GridLines: TcxGridLines read GetGridLines; - public - property GridRecord: TcxCustomGridRow read GetGridRecord; - property GridView: TcxGridTableView read GetGridView; - property GridViewInfo: TcxGridTableViewInfo read GetGridViewInfo; - property RecordViewInfo: TcxCustomGridRowViewInfo read GetRecordViewInfo; - end; - - // data row - - TcxGridDataCellViewInfo = class(TcxGridTableDataCellViewInfo) - private - FIsMerged: Boolean; - FIsMerging: Boolean; - FMergedCells: TList; - FMergingCell: TcxGridDataCellViewInfo; - FOriginalHeight: Integer; - function GetCacheItem: TcxGridTableViewInfoCacheItem; - function GetGridView: TcxGridTableView; - function GetGridViewInfo: TcxGridTableViewInfo; - function GetItem: TcxGridColumn; - function GetMergedCell(Index: Integer): TcxGridDataCellViewInfo; - function GetMergedCellCount: Integer; - function GetMergedCellOfFocusedRow: TcxGridDataCellViewInfo; - function GetRecordViewInfo: TcxGridDataRowViewInfo; - protected - OriginalBounds: TRect; - procedure AfterRowsViewInfoCalculate; virtual; - procedure AfterRowsViewInfoOffset; virtual; - function CalculateSelected: Boolean; override; - function CalculateWidth: Integer; override; - function CanBeMergingCell: Boolean; virtual; - function CanCellMerging: Boolean; virtual; - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetFocused: Boolean; override; - function GetMultiLine: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetVisible: Boolean; override; - function GetVisibleForHitTest: Boolean; override; - function HasHitTestPoint(const P: TPoint): Boolean; override; - procedure Offset(DX, DY: Integer); override; - procedure RemoveMergedCell(ACellViewInfo: TcxGridDataCellViewInfo); - - property CacheItem: TcxGridTableViewInfoCacheItem read GetCacheItem; - property MergedCellOfFocusedRow: TcxGridDataCellViewInfo read GetMergedCellOfFocusedRow; - property GridView: TcxGridTableView read GetGridView; - property GridViewInfo: TcxGridTableViewInfo read GetGridViewInfo; - property OriginalHeight: Integer read FOriginalHeight; - public - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function MouseMove(AHitTest: TcxCustomGridHitTest; AShift: TShiftState): Boolean; override; - procedure Paint(ACanvas: TcxCanvas = nil); override; - - property IsMerged: Boolean read FIsMerged; - property IsMerging: Boolean read FIsMerging; - property Item: TcxGridColumn read GetItem; - property MergedCellCount: Integer read GetMergedCellCount; - property MergedCells[Index: Integer]: TcxGridDataCellViewInfo read GetMergedCell; - property MergingCell: TcxGridDataCellViewInfo read FMergingCell; - property RecordViewInfo: TcxGridDataRowViewInfo read GetRecordViewInfo; - end; - - TcxGridDataRowCellsAreaViewInfoClass = class of TcxGridDataRowCellsAreaViewInfo; - - TcxGridDataRowCellsAreaViewInfo = class(TcxGridCellViewInfo) - private - function GetRecordViewInfo: TcxGridDataRowViewInfo; - protected - function CalculateHeight: Integer; override; - function CalculateVisible: Boolean; virtual; - function CalculateWidth: Integer; override; - function GetBorders: TcxBorders; override; - function GetIsBottom: Boolean; virtual; - public - constructor Create(ARecordViewInfo: TcxCustomGridRecordViewInfo); override; - function CanDrawSelected: Boolean; override; - function DrawMergedCells: Boolean; virtual; - property IsBottom: Boolean read GetIsBottom; - property RecordViewInfo: TcxGridDataRowViewInfo read GetRecordViewInfo; - end; - - TcxGridPreviewCellViewInfoClass = class of TcxGridPreviewCellViewInfo; - - TcxGridPreviewCellViewInfo = class(TcxGridDataCellViewInfo) - private - function GetPreview: TcxGridPreview; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAutoHeight: Boolean; override; - function GetBackgroundBitmap: TBitmap; override; - function GetBorders: TcxBorders; override; - procedure GetEditViewDataContentOffsets(var R: TRect); override; - function GetHeight: Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetMaxLineCount: Integer; override; - function GetMultiLine: Boolean; override; - function GetTextAreaBounds: TRect; override; - function SupportsZeroHeight: Boolean; override; - property Preview: TcxGridPreview read GetPreview; - end; - - TcxGridDataRowViewInfo = class(TcxCustomGridRowViewInfo) - private - FCellHeight: Integer; - FCellsAreaBounds: TRect; - FCellsAreaViewInfo: TcxGridDataRowCellsAreaViewInfo; - FCellViewInfos: TList; - FPreviewViewInfo: TcxGridPreviewCellViewInfo; - function GetCellViewInfo(Index: Integer): TcxGridDataCellViewInfo; - function GetCellViewInfoCount: Integer; - function GetGridRecord: TcxGridDataRow; - function GetHasPreview: Boolean; - function GetInternalCellViewInfo(Index: Integer): TcxGridDataCellViewInfo; - procedure CreateViewInfos; - procedure DestroyViewInfos; - protected - procedure AfterRowsViewInfoCalculate; override; - procedure AfterRowsViewInfoOffset; override; - procedure ApplyMergedCellsBounds(var R: TRect; AItem: TcxCustomGridTableItem); - procedure ApplyMergingCellsBounds(var R: TRect); - procedure CalculateCellViewInfo(AIndex: Integer); virtual; - function CalculateHeight: Integer; override; - function CanSize: Boolean; override; - procedure CheckRowHeight(var AValue: Integer); override; - function GetAutoHeight: Boolean; override; - function GetBackgroundBitmapBounds: TRect; override; - function GetBaseHeight: Integer; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - procedure Offset(DX, DY: Integer); override; - procedure SetRowHeight(Value: Integer); override; - - function GetCellHeight(AIndex: Integer): Integer; reintroduce; virtual; - function GetCellHeightValue: Integer; virtual; - function GetCellLeftBound(AIndex: Integer): Integer; virtual; - function GetCellTopBound(AIndex: Integer): Integer; virtual; - function GetCellsAreaBounds: TRect; virtual; - function GetCellsAreaViewInfoClass: TcxGridDataRowCellsAreaViewInfoClass; virtual; - function GetCellViewInfoClass(AIndex: Integer): TcxGridDataCellViewInfoClass; virtual; - function GetCellWidth(AIndex: Integer): Integer; virtual; - function GetPreviewViewInfoClass: TcxGridPreviewCellViewInfoClass; virtual; - function GetShowPreview: Boolean; virtual; - function IsCellVisible(AIndex: Integer): Boolean; virtual; - - property CellHeight: Integer read GetCellHeightValue; - property ShowPreview: Boolean read GetShowPreview; - public - constructor Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); override; - destructor Destroy; override; - procedure BeforeCellRecalculation(ACell: TcxGridTableCellViewInfo); virtual; - procedure BeforeRecalculation; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function GetAreaBoundsForPainting: TRect; override; - function GetBoundsForInvalidate(AItem: TcxCustomGridTableItem): TRect; override; - function GetBoundsForItem(AItem: TcxCustomGridTableItem): TRect; override; - function GetCellBorders(AIsRight, AIsBottom: Boolean): TcxBorders; virtual; - function GetCellViewInfoByItem(AItem: TcxCustomGridTableItem): TcxGridTableDataCellViewInfo; override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - - property CellsAreaBounds: TRect read GetCellsAreaBounds; - property CellsAreaViewInfo: TcxGridDataRowCellsAreaViewInfo read FCellsAreaViewInfo; - property CellViewInfoCount: Integer read GetCellViewInfoCount; - property CellViewInfos[Index: Integer]: TcxGridDataCellViewInfo read GetCellViewInfo; - property GridRecord: TcxGridDataRow read GetGridRecord; - property HasPreview: Boolean read GetHasPreview; - property InternalCellViewInfos[Index: Integer]: TcxGridDataCellViewInfo read GetInternalCellViewInfo; - property PreviewViewInfo: TcxGridPreviewCellViewInfo read FPreviewViewInfo; - end; - - // new item row - - TcxGridNewItemRowViewInfo = class(TcxGridDataRowViewInfo) - private - FHeight: Integer; - protected - function CalculateSelected: Boolean; override; - function GetAlignmentHorz: TAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetAutoHeight: Boolean; override; - function GetCellLeftBound(AIndex: Integer): Integer; override; - function GetCellWidth(AIndex: Integer): Integer; override; - function GetHeight: Integer; override; - function GetInfoText: string; virtual; - function GetOptions: TcxGridSpecialRowOptions; virtual; - function GetSeparatorColor: TColor; override; - function GetSeparatorWidth: Integer; override; - function GetShowInfoText: Boolean; virtual; - function GetShowPreview: Boolean; override; - function GetStyleIndex: Integer; virtual; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasFooters: Boolean; override; - function HasLastHorzGridLine: Boolean; override; - - function GetPainterClass: TcxCustomGridCellPainterClass; override; - - property InfoText: string read GetInfoText; - property Options: TcxGridSpecialRowOptions read GetOptions; - property ShowInfoText: Boolean read GetShowInfoText; - end; - - // filtering row - - TcxGridFilterRowViewInfo = class(TcxGridNewItemRowViewInfo) - private - function GetGridRecord: TcxGridFilterRow; - protected - function GetOptions: TcxGridSpecialRowOptions; override; - function GetShowInfoText: Boolean; override; - function GetStyleIndex: Integer; override; - public - property GridRecord: TcxGridFilterRow read GetGridRecord; - end; - - // details site - -{$IFDEF USETABCONTROL} - - TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo = class(TcxGridDetailsSiteLeftTabsViewInfo) - private - function GetBottomGridLineColor: TColor; - function GetBottomGridLineWidth: Integer; - function GetSiteViewInfo: TcxGridDetailsSiteViewInfo; - protected - function CalculateHeight: Integer; override; - function GetBottomGridLineBounds: TRect; virtual; - function GetPainterClass: TcxGridDetailsSiteTabsPainterClass; override; - function GetTabControlBounds: TRect; override; - property BottomGridLineWidth: Integer read GetBottomGridLineWidth; - public - function HasBottomGridLine: Boolean; virtual; - property BottomGridLineBounds: TRect read GetBottomGridLineBounds; - property BottomGridLineColor: TColor read GetBottomGridLineColor; - property SiteViewInfo: TcxGridDetailsSiteViewInfo read GetSiteViewInfo; - end; - -{$ENDIF} - - TcxGridDetailsSiteViewInfoClass = class of TcxGridDetailsSiteViewInfo; - - TcxGridDetailsSiteViewInfo = class(TcxCustomGridDetailsSiteViewInfo) - private - FMasterDataRowViewInfo: TcxGridMasterDataRowViewInfo; - function GetCacheItem: TcxGridMasterTableViewInfoCacheItem; - function GetMasterGridView: TcxGridTableView; - function GetMasterGridViewInfo: TcxGridTableViewInfo; - protected - procedure ControlFocusChanged; virtual; - function GetActiveGridView: TcxCustomGridView; override; - function GetActiveGridViewExists: Boolean; override; - function GetActiveGridViewValue: TcxCustomGridView; override; - function GetActiveLevel: TcxGridLevel; override; - function GetCanvas: TcxCanvas; override; - function GetContainer: TcxControl; override; - function GetDesignController: TcxCustomGridDesignController; override; - function GetFullyVisible: Boolean; override; - function GetHeight: Integer; override; - function GetMasterRecord: TObject; override; - function GetMaxHeight: Integer; override; - function GetMaxNormalHeight: Integer; override; - function GetMaxWidth: Integer; override; - function GetNormalHeight: Integer; override; - {$IFDEF USETABCONTROL} - function GetTabsViewInfoClass: TcxCustomGridDetailsSiteTabsViewInfoClass; override; - {$ENDIF} - function GetVisible: Boolean; override; - function GetWidth: Integer; override; - procedure InitTabHitTest(AHitTest: TcxGridDetailsSiteTabHitTest); override; - - property CacheItem: TcxGridMasterTableViewInfoCacheItem read GetCacheItem; - property MasterGridView: TcxGridTableView read GetMasterGridView; - property MasterGridViewInfo: TcxGridTableViewInfo read GetMasterGridViewInfo; - property MasterDataRowViewInfo: TcxGridMasterDataRowViewInfo read FMasterDataRowViewInfo; - public - constructor Create(AMasterDataRowViewInfo: TcxGridMasterDataRowViewInfo); reintroduce; virtual; - destructor Destroy; override; - procedure ChangeActiveTab(ALevel: TcxGridLevel; AFocusView: Boolean = False); override; - function DetailHasData(ALevel: TcxGridLevel): Boolean; override; - function HasMaxHeight: Boolean; - function SupportsTabAccelerators: Boolean; override; - end; - - // master data row - - TcxGridExpandButtonCellViewInfoClass = class of TcxGridExpandButtonCellViewInfo; - - TcxGridExpandButtonCellViewInfo = class(TcxGridCellViewInfo) - private - function GetRecordViewInfo: TcxGridMasterDataRowViewInfo; - function GetRightBorderRestSpaceBounds: TRect; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetBackgroundBitmap: TBitmap; override; - function GetBaseWidth: Integer; virtual; - function GetBorderBounds(AIndex: TcxBorder): TRect; override; - function GetBorders: TcxBorders; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - - property BaseWidth: Integer read GetBaseWidth; - property RightBorderRestSpaceBounds: TRect read GetRightBorderRestSpaceBounds; - public - property RecordViewInfo: TcxGridMasterDataRowViewInfo read GetRecordViewInfo; - end; - - TcxGridDetailsAreaViewInfoClass = class of TcxGridDetailsAreaViewInfo; - - TcxGridDetailsAreaViewInfo = class(TcxGridCellViewInfo) - private - function GetRecordViewInfo: TcxGridMasterDataRowViewInfo; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetBorders: TcxBorders; override; - public - property RecordViewInfo: TcxGridMasterDataRowViewInfo read GetRecordViewInfo; - end; - - TcxGridMasterDataRowViewInfo = class(TcxGridDataRowViewInfo) - private - FDetailsAreaViewInfo: TcxGridDetailsAreaViewInfo; - FDetailsSiteViewInfo: TcxGridDetailsSiteViewInfo; - FExpandButtonCellViewInfo: TcxGridExpandButtonCellViewInfo; - FRestHeight: Integer; - function GetCacheItem: TcxGridMasterTableViewInfoCacheItem; - function GetDetailsSiteIndentBounds: TRect; - function GetGridRecord: TcxGridMasterDataRow; - protected - procedure CalculateExpandButtonBounds(var ABounds: TRect); override; - function CalculateHeight: Integer; override; - function CalculateRestHeight(ARowHeight: Integer): Integer; virtual; - procedure ControlFocusChanged; override; - function GetDataHeight: Integer; override; - function GetDataIndent: Integer; override; - function GetDataWidth: Integer; override; - function GetDetailsSiteVisible: Boolean; virtual; - function GetExpandButtonAreaBounds: TRect; override; - function GetMaxHeight: Integer; override; - function IsDetailVisible(ADetail: TcxCustomGridView): Boolean; override; - function IsFullyVisible: Boolean; override; - procedure VisibilityChanged(AVisible: Boolean); override; - - function GetPainterClass: TcxCustomGridCellPainterClass; override; - - function GetDetailsAreaViewInfoClass: TcxGridDetailsAreaViewInfoClass; virtual; - function GetDetailsSiteViewInfoClass: TcxGridDetailsSiteViewInfoClass; virtual; - function GetExpandButtonCellViewInfoClass: TcxGridExpandButtonCellViewInfoClass; virtual; - - property CacheItem: TcxGridMasterTableViewInfoCacheItem read GetCacheItem; - property DetailsAreaViewInfo: TcxGridDetailsAreaViewInfo read FDetailsAreaViewInfo; - property DetailsSiteIndentBounds: TRect read GetDetailsSiteIndentBounds; - property ExpandButtonCellViewInfo: TcxGridExpandButtonCellViewInfo read FExpandButtonCellViewInfo; - property RestHeight: Integer read FRestHeight write FRestHeight; - public - constructor Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); override; - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function ProcessDialogChar(ACharCode: Word): Boolean; override; - function SupportsTabAccelerators: Boolean; virtual; - property DetailsSiteViewInfo: TcxGridDetailsSiteViewInfo read FDetailsSiteViewInfo; - property DetailsSiteVisible: Boolean read GetDetailsSiteVisible; - property GridRecord: TcxGridMasterDataRow read GetGridRecord; - end; - - // group row - - TcxGridGroupCellViewInfo = class(TcxGridCellViewInfo) - private - function GetExpandedAreaBounds: TRect; - function GetGridRecord: TcxGridGroupRow; - function GetRecordViewInfo: TcxGridGroupRowViewInfo; - function GetRowStyle: TcxGridGroupRowStyle; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetAlwaysSelected: Boolean; override; - function GetBackgroundBitmap: TBitmap; override; - function GetBorderBounds(AIndex: TcxBorder): TRect; override; - function GetBorderColor(AIndex: TcxBorder): TColor; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasCustomDraw: Boolean; override; - - property ExpandedAreaBounds: TRect read GetExpandedAreaBounds; - property RowStyle: TcxGridGroupRowStyle read GetRowStyle; - public - function CanDrawSelected: Boolean; override; - property GridRecord: TcxGridGroupRow read GetGridRecord; - property RecordViewInfo: TcxGridGroupRowViewInfo read GetRecordViewInfo; - end; - - TcxGridGroupRowSpacerViewInfoClass = class of TcxGridGroupRowSpacerViewInfo; - - TcxGridGroupRowSpacerViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FRowViewInfo: TcxGridGroupRowViewInfo; - function GetGridView: TcxGridTableView; - protected - function CalculateWidth: Integer; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetWidth: Integer; override; - function HasBackground: Boolean; override; - public - constructor Create(ARowViewInfo: TcxGridGroupRowViewInfo; const AText: string); reintroduce; virtual; - property GridView: TcxGridTableView read GetGridView; - property RowViewInfo: TcxGridGroupRowViewInfo read FRowViewInfo; - end; - - TcxGridGroupSummaryCellViewInfoClass = class of TcxGridGroupSummaryCellViewInfo; - - TcxGridGroupSummaryCellViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FIsLast: Boolean; - FRowViewInfo: TcxGridGroupRowViewInfo; - FSeparatorViewInfo: TcxGridGroupRowSpacerViewInfo; - FSummaryItem: TcxDataSummaryItem; - FTextWidth: Integer; - FValue: Variant; - function GetColumn: TcxGridColumn; - function GetGridView: TcxGridTableView; - procedure SetIsLast(Value: Boolean); - protected - function CalculateWidth: Integer; override; - function CanAlignWithColumn: Boolean; - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - function GetAlignmentHorz: TAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetDesignSelectionBounds: TRect; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIsDesignSelected: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetSeparatorBounds: TRect; virtual; - function GetSeparatorText: string; virtual; - function GetShowEndEllipsis: Boolean; override; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasBackground: Boolean; override; - function HasCustomDraw: Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - procedure Offset(DX, DY: Integer); override; - public - constructor Create(ARowViewInfo: TcxGridGroupRowViewInfo; - ASummaryItem: TcxDataSummaryItem; const AValue: Variant); reintroduce; virtual; - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - property Column: TcxGridColumn read GetColumn; - property GridView: TcxGridTableView read GetGridView; - property IsLast: Boolean read FIsLast write SetIsLast; - property RowViewInfo: TcxGridGroupRowViewInfo read FRowViewInfo; - property SeparatorViewInfo: TcxGridGroupRowSpacerViewInfo read FSeparatorViewInfo; - property SummaryItem: TcxDataSummaryItem read FSummaryItem; - property Value: Variant read FValue; - end; - - TcxGridGroupRowViewInfo = class(TcxCustomGridRowViewInfo) - private - FCellViewInfo: TcxGridGroupCellViewInfo; - FSummaryBeginningSpacerViewInfo: TcxGridGroupRowSpacerViewInfo; - FSummaryCellsWithoutColumns: TList; - FSummaryCellViewInfos: TList; - FSummaryEndingSpacerViewInfo: TcxGridGroupRowSpacerViewInfo; - function GetGridRecord: TcxGridGroupRow; - function GetRowStyle: TcxGridGroupRowStyle; - function GetSummaryCellLayout: TcxGridGroupSummaryLayout; - function GetSummaryCellViewInfo(Index: Integer): TcxGridGroupSummaryCellViewInfo; - function GetSummaryCellViewInfoCount: Integer; - protected - procedure CalculateExpandButtonBounds(var ABounds: TRect); override; - function CalculateHeight: Integer; override; - function CanSize: Boolean; override; - procedure CheckRowHeight(var AValue: Integer); override; - function GetAutoHeight: Boolean; override; - function GetBackgroundBitmap: TBitmap; override; - function GetExpandButtonAreaBounds: TRect; override; - function GetFocusRectBounds: TRect; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetSeparatorBounds: TRect; override; - function GetSeparatorIndentBounds: TRect; virtual; - function GetShowSeparator: Boolean; override; - function HasFocusRect: Boolean; override; - function HasFooter(ALevel: Integer): Boolean; override; - procedure Offset(DX, DY: Integer); override; - procedure SetRowHeight(Value: Integer); override; - - function CreateSpacerViewInfo(const AText: string): TcxGridGroupRowSpacerViewInfo; - procedure CreateSpacerViewInfos; virtual; - procedure DestroySpacerViewInfos; virtual; - function GetSpacerViewInfoClass: TcxGridGroupRowSpacerViewInfoClass; virtual; - - function AddSummaryCellViewInfo(ASummaryItem: TcxDataSummaryItem; - const AValue: Variant): TcxGridGroupSummaryCellViewInfo; - procedure CreateSummaryCellViewInfos; virtual; - procedure DestroySummaryCellViewInfos; virtual; - function GetSummaryCellViewInfoClass: TcxGridGroupSummaryCellViewInfoClass; virtual; - - procedure CalculateSummaryCells; overload; virtual; - procedure CalculateSummaryCells(ACellViewInfos: TList; - const AAreaBounds: TRect; AAlignment: TAlignment; AAutoWidth: Boolean); overload; virtual; - function CalculateSummaryCellWidths(ACellViewInfos: TList; AAvailableWidth: Integer; - AAutoWidth: Boolean): TcxAutoWidthObject; virtual; - function GetColumnSummaryCellsAreaBounds(AColumnHeaderViewInfo: TcxGridColumnHeaderViewInfo): TRect; virtual; - procedure GetColumnSummaryCellViewInfos(AColumn: TcxGridColumn; AList: TList); - function GetSummaryBeginningSpacerBounds: TRect; virtual; - function GetSummaryEndingSpacerBounds: TRect; virtual; - function GetSummaryBeginningSpacerText: string; virtual; - function GetSummaryEndingSpacerText: string; virtual; - function GetSummaryCellAutoWidth: Boolean; virtual; - function GetSummaryCellsAreaBounds(AForAlignableCells: Boolean): TRect; virtual; - function GetSummaryCellsBounds(const AAreaBounds: TRect; - AWidths: TcxAutoWidthObject; AAlignment: TAlignment; AAutoWidth: Boolean): TRect; virtual; - function GetUnalignableSummaryCells: TList; virtual; - function HasUnalignableSummaryCells: Boolean; virtual; - - property SummaryBeginningSpacerViewInfo: TcxGridGroupRowSpacerViewInfo read FSummaryBeginningSpacerViewInfo; - property SummaryEndingSpacerViewInfo: TcxGridGroupRowSpacerViewInfo read FSummaryEndingSpacerViewInfo; - property SummaryCellAutoWidth: Boolean read GetSummaryCellAutoWidth; - property SummaryCellLayout: TcxGridGroupSummaryLayout read GetSummaryCellLayout; - property SummaryCells: TList read FSummaryCellViewInfos; - property SummaryCellsWithoutColumns: TList read FSummaryCellsWithoutColumns; - property UnalignableSummaryCells: TList read GetUnalignableSummaryCells; - - property RowStyle: TcxGridGroupRowStyle read GetRowStyle; - public - constructor Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); override; - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - property CellViewInfo: TcxGridGroupCellViewInfo read FCellViewInfo; - property GridRecord: TcxGridGroupRow read GetGridRecord; - property SeparatorIndentBounds: TRect read GetSeparatorIndentBounds; - property SummaryCellViewInfoCount: Integer read GetSummaryCellViewInfoCount; - property SummaryCellViewInfos[Index: Integer]: TcxGridGroupSummaryCellViewInfo read GetSummaryCellViewInfo; - end; - -implementation - -uses - SysUtils, Math, Forms, cxVariants, cxGrid, cxEdit, dxOffice11; - -{ TcxGridPreviewHitTest } - -class function TcxGridPreviewHitTest.GetHitTestCode: Integer; -begin - Result := htPreview; -end; - -{ TcxGridDataCellPainter } - -function TcxGridDataCellPainter.GetViewInfo: TcxGridDataCellViewInfo; -begin - Result := TcxGridDataCellViewInfo(inherited ViewInfo); -end; - -procedure TcxGridDataCellPainter.DrawBorder(ABorder: TcxBorder); -begin - if ExcludeFromClipRect then - inherited - else - TcxGridTablePainter(ViewInfo.GridViewInfo.Painter).AddGridLine(ViewInfo.BorderBounds[ABorder]); -end; - -function TcxGridDataCellPainter.ExcludeFromClipRect: Boolean; -begin - Result := ViewInfo.RecordViewInfo.CellsAreaViewInfo.Visible; -end; - -{ TcxGridDataRowPainter } - -function TcxGridDataRowPainter.GetViewInfo: TcxGridDataRowViewInfo; -begin - Result := TcxGridDataRowViewInfo(inherited ViewInfo); -end; - -procedure TcxGridDataRowPainter.DrawCells; -begin - ViewInfo.RecordsViewInfo.PainterClass.DrawDataRowCells(ViewInfo); - with ViewInfo do - if HasPreview and (PreviewViewInfo.Height <> 0) then - PreviewViewInfo.Paint; -end; - -function TcxGridDataRowPainter.GetShowCells: Boolean; -begin - Result := True; -end; - -procedure TcxGridDataRowPainter.Paint; -var - AClipRegion: TcxRegion; -begin - if ShowCells then - begin - AClipRegion := Canvas.GetClipRegion; - try - DrawCells; - finally - Canvas.SetClipRegion(AClipRegion, roSet); - end; - end; - inherited; -end; - -{ TcxGridNewItemRowPainter } - -function TcxGridNewItemRowPainter.GetViewInfo: TcxGridNewItemRowViewInfo; -begin - Result := TcxGridNewItemRowViewInfo(inherited ViewInfo); -end; - -procedure TcxGridNewItemRowPainter.DrawBackground; -begin - if not ShowCells and not ViewInfo.Transparent then - DrawBackground(ViewInfo.ContentBounds) - else - inherited; -end; - -procedure TcxGridNewItemRowPainter.DrawSeparator; -begin - ViewInfo.LookAndFeelPainter.DrawHeader(Canvas, ViewInfo.SeparatorBounds, - ViewInfo.SeparatorBounds, [], cxBordersAll, cxbsNormal, taLeftJustify, vaTop, - False, False, '', nil, ViewInfo.LookAndFeelPainter.DefaultHeaderTextColor, - ViewInfo.SeparatorColor); -end; - -function TcxGridNewItemRowPainter.GetShowCells: Boolean; -begin - Result := ViewInfo.Text = ''; -end; - -procedure TcxGridNewItemRowPainter.Paint; -begin - inherited; - DrawText; -end; - -{$IFDEF USETABCONTROL} - -{ TcxGridMasterDataRowDetailsSiteTabsPainter } - -function TcxGridMasterDataRowDetailsSiteTabsPainter.GetViewInfo: TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo; -begin - Result := TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo(inherited ViewInfo); -end; - -procedure TcxGridMasterDataRowDetailsSiteTabsPainter.DrawBottomGridLine; -begin - Canvas.Brush.Color := ViewInfo.BottomGridLineColor; - Canvas.FillRect(ViewInfo.BottomGridLineBounds); -end; - -procedure TcxGridMasterDataRowDetailsSiteTabsPainter.Paint; -begin - inherited; - if ViewInfo.HasBottomGridLine then DrawBottomGridLine; -end; - -{$ENDIF} - -{ TcxGridExpandButtonCellPainter } - -function TcxGridExpandButtonCellPainter.GetViewInfo: TcxGridExpandButtonCellViewInfo; -begin - Result := TcxGridExpandButtonCellViewInfo(inherited ViewInfo); -end; - -procedure TcxGridExpandButtonCellPainter.DrawBorder(ABorder: TcxBorder); -begin - inherited; - if (ABorder = bRight) and not ViewInfo.Transparent then - DrawBackground(ViewInfo.RightBorderRestSpaceBounds); -end; - -{ TcxGridMasterDataRowPainter } - -function TcxGridMasterDataRowPainter.GetViewInfo: TcxGridMasterDataRowViewInfo; -begin - Result := TcxGridMasterDataRowViewInfo(inherited ViewInfo); -end; - -procedure TcxGridMasterDataRowPainter.DrawCells; -begin - inherited; - DrawExpandButtonCell; -end; - -procedure TcxGridMasterDataRowPainter.DrawDetailsSite; -begin - ViewInfo.DetailsSiteViewInfo.Paint(Canvas); - ViewInfo.GridViewInfo.Painter.ExcludeFromBackground(ViewInfo.DetailsSiteViewInfo.Bounds); -end; - -{procedure TcxGridMasterDataRowPainter.DrawDetailsArea; -begin - ViewInfo.DetailsAreaViewInfo.Paint; -end;} - -procedure TcxGridMasterDataRowPainter.DrawExpandButtonCell; -var - AClipRegion: TcxRegion; -begin - AClipRegion := Canvas.GetClipRegion; - try - Canvas.ExcludeClipRect(ViewInfo.CellsAreaBounds); - ViewInfo.ExpandButtonCellViewInfo.Paint; - finally - Canvas.SetClipRegion(AClipRegion, roSet); - end; -end; - -function TcxGridMasterDataRowPainter.NeedsPainting: Boolean; -begin - Result := inherited NeedsPainting or - ViewInfo.DetailsSiteVisible and Canvas.RectVisible(ViewInfo.DetailsAreaViewInfo.GetAreaBoundsForPainting); -end; - -procedure TcxGridMasterDataRowPainter.Paint; -begin - if ViewInfo.DetailsSiteVisible then - begin - DrawDetailsSite; - //DrawDetailsArea; - end; - inherited; -end; - -{ TcxGridGroupCellPainter } - -function TcxGridGroupCellPainter.GetViewInfo: TcxGridGroupCellViewInfo; -begin - Result := TcxGridGroupCellViewInfo(inherited ViewInfo); -end; - -procedure TcxGridGroupCellPainter.DrawBorder(ABorder: TcxBorder); -begin - inherited; - with Canvas, ViewInfo do - if (ABorder = bBottom) and GridRecord.Expanded then - if GridViewInfo.LevelIndentBackgroundBitmap = nil then - begin - Brush.Color := GridViewInfo.LevelIndentColors[GridRecord.Level]; - FillRect(ExpandedAreaBounds); - end - else - FillRect(ExpandedAreaBounds, GridViewInfo.LevelIndentBackgroundBitmap); -end; - -{ TcxGridGroupSummaryCellPainter } - -function TcxGridGroupSummaryCellPainter.GetViewInfo: TcxGridGroupSummaryCellViewInfo; -begin - Result := TcxGridGroupSummaryCellViewInfo(inherited ViewInfo); -end; - -procedure TcxGridGroupSummaryCellPainter.Paint; -begin - inherited; - ViewInfo.SeparatorViewInfo.Paint(Canvas); -end; - -{ TcxGridGroupRowPainter } - -function TcxGridGroupRowPainter.GetViewInfo: TcxGridGroupRowViewInfo; -begin - Result := TcxGridGroupRowViewInfo(inherited ViewInfo); -end; - -procedure TcxGridGroupRowPainter.DrawBackground; -begin -end; - -procedure TcxGridGroupRowPainter.DrawSeparator; -var - R: TRect; -begin - R := ViewInfo.SeparatorIndentBounds; - if not IsRectEmpty(R) then - DrawIndentPart(ViewInfo.Level, R); - inherited; -end; - -procedure TcxGridGroupRowPainter.DrawSummaryCells; -var - I: Integer; -begin - if ViewInfo.SummaryBeginningSpacerViewInfo <> nil then - ViewInfo.SummaryBeginningSpacerViewInfo.Paint(Canvas); - for I := 0 to ViewInfo.SummaryCellViewInfoCount - 1 do - ViewInfo.SummaryCellViewInfos[I].Paint(Canvas); - if ViewInfo.SummaryEndingSpacerViewInfo <> nil then - ViewInfo.SummaryEndingSpacerViewInfo.Paint(Canvas); -end; - -procedure TcxGridGroupRowPainter.Paint; -begin - ViewInfo.CellViewInfo.Paint; - DrawSummaryCells; - inherited; -end; - -{ TcxGridCellViewInfo } - -function TcxGridCellViewInfo.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridCellViewInfo.GetGridLines: TcxGridLines; -begin - Result := RecordViewInfo.GridLines; -end; - -function TcxGridCellViewInfo.GetGridRecord: TcxCustomGridRow; -begin - Result := TcxCustomGridRow(inherited GridRecord); -end; - -function TcxGridCellViewInfo.GetGridViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited GridViewInfo); -end; - -function TcxGridCellViewInfo.GetRecordViewInfo: TcxCustomGridRowViewInfo; -begin - Result := TcxCustomGridRowViewInfo(inherited RecordViewInfo); -end; - -function TcxGridCellViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := GridViewInfo.GridLineColor; -end; - -function TcxGridCellViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := GridViewInfo.GridLineWidth; -end; - -procedure TcxGridCellViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetDataCellParams(GridRecord, nil, AParams, True, Self); -end; - -{ TcxGridDataCellViewInfo } - -destructor TcxGridDataCellViewInfo.Destroy; -var - I: Integer; -begin - if FIsMerging then - begin - for I := 0 to MergedCellCount - 1 do - MergedCells[I].FMergingCell := nil; - FMergedCells.Free; - end - else - if FIsMerged and (FMergingCell <> nil) then - FMergingCell.RemoveMergedCell(Self); - inherited; -end; - -function TcxGridDataCellViewInfo.GetCacheItem: TcxGridTableViewInfoCacheItem; -begin - Result := TcxGridTableViewInfoCacheItem(inherited CacheItem); -end; - -function TcxGridDataCellViewInfo.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridDataCellViewInfo.GetGridViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited GridViewInfo); -end; - -function TcxGridDataCellViewInfo.GetItem: TcxGridColumn; -begin - Result := TcxGridColumn(inherited Item); -end; - -function TcxGridDataCellViewInfo.GetMergedCell(Index: Integer): TcxGridDataCellViewInfo; -begin - Result := TcxGridDataCellViewInfo(FMergedCells[Index]); -end; - -function TcxGridDataCellViewInfo.GetMergedCellCount: Integer; -begin - Result := FMergedCells.Count; -end; - -function TcxGridDataCellViewInfo.GetMergedCellOfFocusedRow: TcxGridDataCellViewInfo; -var - I: Integer; -begin - for I := 0 to MergedCellCount - 1 do - begin - Result := MergedCells[I]; - if Result.RecordViewInfo.Focused then Exit; - end; - Result := nil; -end; - -function TcxGridDataCellViewInfo.GetRecordViewInfo: TcxGridDataRowViewInfo; -begin - Result := TcxGridDataRowViewInfo(inherited RecordViewInfo); -end; - -procedure TcxGridDataCellViewInfo.AfterRowsViewInfoCalculate; -var - AProperties: TcxCustomEditProperties; - AValue: TcxEditValue; - I: Integer; - ARowViewInfo: TcxCustomGridRowViewInfo; - ACellViewInfo: TcxGridDataCellViewInfo; - - procedure UpdateBounds; - begin - if FIsMerging then - begin - Bounds.Bottom := MergedCells[MergedCellCount - 1].Bounds.Bottom; - Recalculate; - end - else - if Height <> FOriginalHeight then - begin - Bounds.Bottom := Bounds.Top + FOriginalHeight; - Recalculate; - end; - end; - -begin - if FIsMerged then - begin - UpdateBounds; - Exit; - end; - if not CanCellMerging or GridViewInfo.IsInternalUse then Exit; - AProperties := Properties; - AValue := DisplayValue; - for I := RecordViewInfo.Index + 1 to RecordViewInfo.RecordsViewInfo.Count - 1 do - begin - ARowViewInfo := RecordViewInfo.RecordsViewInfo[I]; - if ARowViewInfo is TcxGridDataRowViewInfo then - begin - ACellViewInfo := TcxGridDataRowViewInfo(ARowViewInfo).InternalCellViewInfos[Item.VisibleIndex]; - if Item.DoCompareValuesForCellMerging( - RecordViewInfo.GridRecord, AProperties, AValue, - TcxGridDataRowViewInfo(ARowViewInfo).GridRecord, ACellViewInfo.Properties, ACellViewInfo.DisplayValue) then - begin - if not FIsMerging then - begin - FIsMerging := True; - FMergedCells := TList.Create; - end; - FMergedCells.Add(ACellViewInfo); - ACellViewInfo.FIsMerged := True; - ACellViewInfo.FMergingCell := Self; - if not ACellViewInfo.CanBeMergingCell then Break; - end - else - Break; - end - else - Break; - end; - UpdateBounds; -end; - -procedure TcxGridDataCellViewInfo.AfterRowsViewInfoOffset; -begin - FIsMerging := False; - FIsMerged := False; - FreeAndNil(FMergedCells); - FMergingCell := nil; -end; - -function TcxGridDataCellViewInfo.CalculateSelected: Boolean; -var - AMergedCellOfFocusedRow: TcxGridDataCellViewInfo; - - procedure CheckMergedCells; - var - I: Integer; - begin - if not Result and GridView.OptionsSelection.MultiSelect then - for I := 0 to MergedCellCount - 1 do - begin - Result := MergedCells[I].Selected; - if Result then Break; - end; - end; - -begin - Result := inherited CalculateSelected; - if FIsMerging then - if not GridView.OptionsSelection.MultiSelect or - GridView.OptionsSelection.InvertSelect or Item.Focused then - if not RecordViewInfo.Focused then - begin - AMergedCellOfFocusedRow := MergedCellOfFocusedRow; - if AMergedCellOfFocusedRow <> nil then - Result := AMergedCellOfFocusedRow.Selected - else - CheckMergedCells; - end - else - else - CheckMergedCells; -end; - -function TcxGridDataCellViewInfo.CalculateWidth: Integer; -begin - Result := RecordViewInfo.GetCellWidth(Item.VisibleIndex); -end; - -function TcxGridDataCellViewInfo.CanBeMergingCell: Boolean; -begin - Result := not RecordViewInfo.Expanded; -end; - -function TcxGridDataCellViewInfo.CanCellMerging: Boolean; -begin - Result := CanBeMergingCell and TcxGridColumnAccess.CanCellMerging(Item); -end; - -function TcxGridDataCellViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - Result := GridViewInfo.GridLineColor; -end; - -function TcxGridDataCellViewInfo.GetBorders: TcxBorders; -begin - Result := RecordViewInfo.GetCellBorders(Item.IsMostRight, - Item.IsMostBottom and RecordViewInfo.CellsAreaViewInfo.IsBottom); -end; - -function TcxGridDataCellViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := GridViewInfo.GridLineWidth; -end; - -function TcxGridDataCellViewInfo.GetFocused: Boolean; -var - AMergedCellOfFocusedRow: TcxGridDataCellViewInfo; -begin - Result := inherited GetFocused; - if FIsMerging and not RecordViewInfo.Focused then - begin - AMergedCellOfFocusedRow := MergedCellOfFocusedRow; - if AMergedCellOfFocusedRow <> nil then - Result := AMergedCellOfFocusedRow.Focused; - end; -end; - -function TcxGridDataCellViewInfo.GetMultiLine: Boolean; -begin - Result := inherited GetMultiLine or RecordViewInfo.AutoHeight; -end; - -function TcxGridDataCellViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridDataCellPainter; -end; - -function TcxGridDataCellViewInfo.GetVisible: Boolean; -begin - Result := not FIsMerged and inherited GetVisible; -end; - -function TcxGridDataCellViewInfo.GetVisibleForHitTest: Boolean; -begin - Result := inherited GetVisible; -end; - -function TcxGridDataCellViewInfo.HasHitTestPoint(const P: TPoint): Boolean; -begin - if IsMerging then - Result := PtInRect(OriginalBounds, P) - else - Result := inherited HasHitTestPoint(P); -end; - -procedure TcxGridDataCellViewInfo.Offset(DX, DY: Integer); -begin - inherited; - OffsetRect(OriginalBounds, DX, DY); -end; - -procedure TcxGridDataCellViewInfo.RemoveMergedCell(ACellViewInfo: TcxGridDataCellViewInfo); -begin - FMergedCells.Remove(ACellViewInfo); -end; - -procedure TcxGridDataCellViewInfo.BeforeRecalculation; -begin - inherited; - RecordViewInfo.BeforeCellRecalculation(Self); -end; - -procedure TcxGridDataCellViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - if not FIsMerging then - begin - OriginalBounds := Bounds; - FOriginalHeight := Height; - end; - if FIsMerged and (FMergingCell <> nil) then - FMergingCell.Recalculate; -end; - -function TcxGridDataCellViewInfo.MouseMove(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState): Boolean; -begin - if IsMerged then - Result := MergingCell.MouseMove(AHitTest, AShift) - else - Result := inherited MouseMove(AHitTest, AShift); -end; - -procedure TcxGridDataCellViewInfo.Paint(ACanvas: TcxCanvas = nil); -begin - inherited; - if FIsMerged and RecordViewInfo.CellsAreaViewInfo.DrawMergedCells then - FMergingCell.Paint(ACanvas); -end; - -{ TcxGridDataRowCellsAreaViewInfo } - -constructor TcxGridDataRowCellsAreaViewInfo.Create(ARecordViewInfo: TcxCustomGridRecordViewInfo); -begin - inherited; - Visible := CalculateVisible; -end; - -function TcxGridDataRowCellsAreaViewInfo.GetRecordViewInfo: TcxGridDataRowViewInfo; -begin - Result := TcxGridDataRowViewInfo(inherited RecordViewInfo); -end; - -function TcxGridDataRowCellsAreaViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TcxGridDataRowCellsAreaViewInfo.CalculateVisible: Boolean; -begin - Result := RecordViewInfo.GridViewInfo.HeaderViewInfo.Count = 0; -end; - -function TcxGridDataRowCellsAreaViewInfo.CalculateWidth: Integer; -begin - Result := 0; -end; - -function TcxGridDataRowCellsAreaViewInfo.GetBorders: TcxBorders; -begin - Result := GridViewInfo.GetCellBorders(True, IsBottom); -end; - -function TcxGridDataRowCellsAreaViewInfo.GetIsBottom: Boolean; -begin - Result := - not RecordViewInfo.HasPreview or (GridView.Preview.Place = ppTop) or - (RecordViewInfo.PreviewViewInfo.Height = 0); -end; - -function TcxGridDataRowCellsAreaViewInfo.CanDrawSelected: Boolean; -begin - Result := True; -end; - -function TcxGridDataRowCellsAreaViewInfo.DrawMergedCells: Boolean; -begin - Result := RecordViewInfo.Transparent; -end; - -{ TcxGridPreviewCellViewInfo } - -function TcxGridPreviewCellViewInfo.GetPreview: TcxGridPreview; -begin - Result := GridView.Preview; -end; - -function TcxGridPreviewCellViewInfo.CalculateHeight: Integer; - - function GetMaxValue: Integer; - begin - if Preview.MaxLineCount = 0 then - Result := 0 - else - begin - Result := Preview.MaxLineCount * GridViewInfo.GetFontHeight(Params.Font); - GetCellTextAreaSize(Result); - end; - end; - -begin - if CacheItem.IsPreviewHeightAssigned then - Result := Height - else - begin - if AutoHeight then - Result := inherited CalculateHeight - else - begin - CalculateParams; - Result := GetMaxValue; - end; - if Result <> 0 then - Result := RecordViewInfo.RecordsViewInfo.GetCellHeight(Result); - end; -end; - -function TcxGridPreviewCellViewInfo.CalculateWidth: Integer; -begin - Result := RecordViewInfo.DataWidth; -end; - -function TcxGridPreviewCellViewInfo.GetAutoHeight: Boolean; -begin - Result := Preview.AutoHeight; -end; - -function TcxGridPreviewCellViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := GridView.BackgroundBitmaps.GetBitmap(bbPreview); -end; - -function TcxGridPreviewCellViewInfo.GetBorders: TcxBorders; -begin - Result := GridViewInfo.GetCellBorders(True, - (Preview.Place = ppBottom) or (RecordViewInfo.CellViewInfoCount = 0)); -end; - -procedure TcxGridPreviewCellViewInfo.GetEditViewDataContentOffsets(var R: TRect); -begin - inherited; - R.Left := Preview.LeftIndent - (cxGridCellTextOffset - cxGridEditOffset); - R.Right := Preview.RightIndent - (cxGridCellTextOffset - cxGridEditOffset); -end; - -function TcxGridPreviewCellViewInfo.GetHeight: Integer; -begin - if CacheItem.IsPreviewHeightAssigned then - Result := CacheItem.PreviewHeight - else - begin - Result := CalculateHeight; - CacheItem.PreviewHeight := Result; - end; -end; - -function TcxGridPreviewCellViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridPreviewHitTest; -end; - -function TcxGridPreviewCellViewInfo.GetMaxLineCount: Integer; -begin - Result := Preview.MaxLineCount; -end; - -function TcxGridPreviewCellViewInfo.GetMultiLine: Boolean; -begin - Result := True; -end; - -function TcxGridPreviewCellViewInfo.GetTextAreaBounds: TRect; -begin - Result := inherited GetTextAreaBounds; - InflateRect(Result, cxGridCellTextOffset, 0); - Inc(Result.Left, Preview.LeftIndent); - Dec(Result.Right, Preview.RightIndent); -end; - -function TcxGridPreviewCellViewInfo.SupportsZeroHeight: Boolean; -begin - Result := True; -end; - -{ TcxGridDataRowViewInfo } - -constructor TcxGridDataRowViewInfo.Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); -begin - inherited; - CreateViewInfos; -end; - -destructor TcxGridDataRowViewInfo.Destroy; -begin - DestroyViewInfos; - inherited; -end; - -function TcxGridDataRowViewInfo.GetCellViewInfo(Index: Integer): TcxGridDataCellViewInfo; -begin - Result := InternalCellViewInfos[Index]; - if Result = nil then - begin - Result := GetCellViewInfoClass(Index).Create(Self, GridView.VisibleColumns[Index]); - FCellViewInfos[Index] := Result; - end; -end; - -function TcxGridDataRowViewInfo.GetCellViewInfoCount: Integer; -begin - Result := FCellViewInfos.Count; -end; - -function TcxGridDataRowViewInfo.GetGridRecord: TcxGridDataRow; -begin - Result := TcxGridDataRow(inherited GridRecord); -end; - -function TcxGridDataRowViewInfo.GetHasPreview: Boolean; -begin - Result := FPreviewViewInfo <> nil; -end; - -function TcxGridDataRowViewInfo.GetInternalCellViewInfo(Index: Integer): TcxGridDataCellViewInfo; -begin - Result := TcxGridDataCellViewInfo(FCellViewInfos[Index]); -end; - -procedure TcxGridDataRowViewInfo.CreateViewInfos; -begin - FCellViewInfos := TList.Create; - FCellViewInfos.Count := GridViewInfo.HeaderViewInfo.Count; - FCellsAreaViewInfo := GetCellsAreaViewInfoClass.Create(Self); - if ShowPreview then - FPreviewViewInfo := GetPreviewViewInfoClass.Create(Self, GridView.Preview.Column); -end; - -procedure TcxGridDataRowViewInfo.DestroyViewInfos; -var - I: Integer; -begin - FPreviewViewInfo.Free; - FCellsAreaViewInfo.Free; - for I := 0 to CellViewInfoCount - 1 do - InternalCellViewInfos[I].Free; - FCellViewInfos.Free; -end; - -procedure TcxGridDataRowViewInfo.AfterRowsViewInfoCalculate; -var - I: Integer; - ACellViewInfo: TcxGridDataCellViewInfo; -begin - inherited; - for I := 0 to CellViewInfoCount - 1 do - begin - ACellViewInfo := InternalCellViewInfos[I]; - if (ACellViewInfo <> nil) and ACellViewInfo.Calculated then - ACellViewInfo.AfterRowsViewInfoCalculate; - end; -end; - -procedure TcxGridDataRowViewInfo.AfterRowsViewInfoOffset; -var - I: Integer; - ACellViewInfo: TcxGridDataCellViewInfo; -begin - inherited; - for I := 0 to CellViewInfoCount - 1 do - begin - ACellViewInfo := InternalCellViewInfos[I]; - if ACellViewInfo <> nil then - ACellViewInfo.AfterRowsViewInfoOffset; - end; -end; - -procedure TcxGridDataRowViewInfo.ApplyMergedCellsBounds(var R: TRect; - AItem: TcxCustomGridTableItem); -var - I: Integer; - - procedure ProcessCell(ACellViewInfo: TcxGridDataCellViewInfo); - begin - if (ACellViewInfo <> nil) and ACellViewInfo.IsMerged then - with ACellViewInfo.MergingCell do - begin - if Bounds.Top < R.Top then - R.Top := Bounds.Top; - if Bounds.Bottom > R.Bottom then - R.Bottom := Bounds.Bottom; - end; - end; - -begin - if AItem = nil then - for I := 0 to CellViewInfoCount - 1 do - ProcessCell(InternalCellViewInfos[I]) - else - ProcessCell(InternalCellViewInfos[AItem.VisibleIndex]); -end; - -procedure TcxGridDataRowViewInfo.ApplyMergingCellsBounds(var R: TRect); -var - I: Integer; - ACellViewInfo: TcxGridDataCellViewInfo; -begin - for I := 0 to CellViewInfoCount - 1 do - begin - ACellViewInfo := InternalCellViewInfos[I]; - if (ACellViewInfo <> nil) and - ACellViewInfo.IsMerging and (ACellViewInfo.Bounds.Bottom > R.Bottom) then - R.Bottom := ACellViewInfo.Bounds.Bottom; - end; -end; - -procedure TcxGridDataRowViewInfo.CalculateCellViewInfo(AIndex: Integer); -begin - CellViewInfos[AIndex].Calculate(GetCellLeftBound(AIndex), GetCellTopBound(AIndex), - -1, GetCellHeight(AIndex)); -end; - -function TcxGridDataRowViewInfo.CalculateHeight: Integer; -var - I, AHeight: Integer; -begin - if AutoHeight then - begin - Result := 0; - for I := 0 to CellViewInfoCount - 1 do - begin - AHeight := CellViewInfos[I].CalculateHeight; - if AHeight > Result then Result := AHeight; - end; - Result := RecordsViewInfo.GetCellHeight(Result); - if not TcxCustomGridTableViewAccess.IsGetCellHeightAssigned(GridView) then - with RecordsViewInfo do - if Result < DataRowHeight then Result := DataRowHeight; - end - else - Result := RecordsViewInfo.DataRowHeight; - if HasPreview then - Inc(Result, PreviewViewInfo.Height); - Inc(Result, inherited CalculateHeight); -end; - -function TcxGridDataRowViewInfo.CanSize: Boolean; -begin - Result := RecordsViewInfo.CanDataRowSize; -end; - -procedure TcxGridDataRowViewInfo.CheckRowHeight(var AValue: Integer); -begin - Dec(AValue, NonBaseHeight); - inherited; - GridView.OptionsView.CheckDataRowHeight(AValue); - Inc(AValue, NonBaseHeight); -end; - -function TcxGridDataRowViewInfo.GetAutoHeight: Boolean; -begin - Result := RecordsViewInfo.AutoDataRecordHeight; -end; - -function TcxGridDataRowViewInfo.GetBackgroundBitmapBounds: TRect; -begin - Result := inherited GetBackgroundBitmapBounds; - if HasPreview and (FPreviewViewInfo.BackgroundBitmap <> nil) then - with CellsAreaBounds do - begin - Result.Top := Top; - Result.Bottom := Bottom; - end; -end; - -function TcxGridDataRowViewInfo.GetBaseHeight: Integer; -begin - Result := inherited GetBaseHeight; - if HasPreview then - Dec(Result, PreviewViewInfo.Height); -end; - -function TcxGridDataRowViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridDataRowPainter; -end; - -procedure TcxGridDataRowViewInfo.Offset(DX, DY: Integer); - - procedure OffsetCells; - var - I: Integer; - ACellViewInfo: TcxGridDataCellViewInfo; - begin - for I := 0 to CellViewInfoCount - 1 do - begin - ACellViewInfo := InternalCellViewInfos[I]; - if IsCellVisible(I) then - if (ACellViewInfo = nil) or not ACellViewInfo.Calculated then - CalculateCellViewInfo(I) - else - ACellViewInfo.DoOffset(DX, DY) - else - if (DX <> 0) and (ACellViewInfo <> nil) then - begin - ACellViewInfo.Free; - FCellViewInfos[I] := nil; - end; - end; - end; - -begin - inherited; - OffsetRect(FCellsAreaBounds, DX, DY); - OffsetCells; - FCellsAreaViewInfo.DoOffset(DX, DY); - if FPreviewViewInfo <> nil then - FPreviewViewInfo.DoOffset(DX, DY); -end; - -procedure TcxGridDataRowViewInfo.SetRowHeight(Value: Integer); -begin - if RowHeight <> Value then - GridView.OptionsView.DataRowHeight := Value - NonBaseHeight; -end; - -function TcxGridDataRowViewInfo.GetCellHeight(AIndex: Integer): Integer; -begin - if CellViewInfos[AIndex].IsMerging then - Result := InternalCellViewInfos[AIndex].Height - else - Result := GridViewInfo.GetCellHeight(AIndex, FCellHeight); -end; - -function TcxGridDataRowViewInfo.GetCellHeightValue: Integer; -begin - if AutoHeight then - begin - Result := DataHeight; - if HasPreview then Dec(Result, PreviewViewInfo.Height); - end - else - Result := RecordsViewInfo.RowHeight; -end; - -function TcxGridDataRowViewInfo.GetCellLeftBound(AIndex: Integer): Integer; -begin - Result := GridViewInfo.HeaderViewInfo[AIndex].DataOffset; -end; - -function TcxGridDataRowViewInfo.GetCellTopBound(AIndex: Integer): Integer; -begin - Result := FCellsAreaBounds.Top + GridViewInfo.GetCellTopOffset(AIndex, FCellHeight); -end; - -function TcxGridDataRowViewInfo.GetCellsAreaBounds: TRect; -begin - with Result do - begin - Left := DataIndent; - Right := Left + DataWidth; - Top := Bounds.Top; - Bottom := Top + DataHeight; - if HasPreview then - if PreviewViewInfo.Preview.Place = ppTop then - Inc(Top, PreviewViewInfo.Height) - else - Dec(Bottom, PreviewViewInfo.Height); - end; -end; - -function TcxGridDataRowViewInfo.GetCellsAreaViewInfoClass: TcxGridDataRowCellsAreaViewInfoClass; -begin - Result := TcxGridDataRowCellsAreaViewInfoClass(RecordsViewInfo.GetDataRowCellsAreaViewInfoClass); -end; - -function TcxGridDataRowViewInfo.GetCellViewInfoClass(AIndex: Integer): TcxGridDataCellViewInfoClass; -begin - Result := TcxGridDataCellViewInfo; -end; - -function TcxGridDataRowViewInfo.GetCellWidth(AIndex: Integer): Integer; -begin - Result := GridViewInfo.HeaderViewInfo[AIndex].RealWidth; -end; - -function TcxGridDataRowViewInfo.GetPreviewViewInfoClass: TcxGridPreviewCellViewInfoClass; -begin - Result := TcxGridPreviewCellViewInfo; -end; - -function TcxGridDataRowViewInfo.GetShowPreview: Boolean; -begin - Result := GridView.Preview.Active; -end; - -function TcxGridDataRowViewInfo.IsCellVisible(AIndex: Integer): Boolean; -begin - Result := GridViewInfo.HeaderViewInfo[AIndex].Visible; -end; - -procedure TcxGridDataRowViewInfo.BeforeCellRecalculation(ACell: TcxGridTableCellViewInfo); -begin -end; - -procedure TcxGridDataRowViewInfo.BeforeRecalculation; -var - I: Integer; -begin - inherited; - FCellsAreaViewInfo.BeforeRecalculation; - for I := 0 to CellViewInfoCount - 1 do - if InternalCellViewInfos[I] <> nil then - InternalCellViewInfos[I].BeforeRecalculation; - if FPreviewViewInfo <> nil then - FPreviewViewInfo.BeforeRecalculation; -end; - -procedure TcxGridDataRowViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -var - I: Integer; - - procedure CalculatePreview; - - function GetTopBound: Integer; - begin - if PreviewViewInfo.Preview.Place = ppTop then - Result := ATopBound - else - Result := FCellsAreaBounds.Bottom; - end; - - begin - PreviewViewInfo.Calculate(FCellsAreaBounds.Left, GetTopBound); - end; - -begin - inherited; - FCellsAreaBounds := CellsAreaBounds; - if HasPreview then CalculatePreview; - FCellHeight := CellHeight; - for I := 0 to CellViewInfoCount - 1 do - if IsCellVisible(I) then CalculateCellViewInfo(I); - if FCellsAreaViewInfo.Visible then - FCellsAreaViewInfo.Calculate(FCellsAreaBounds); -end; - -function TcxGridDataRowViewInfo.GetAreaBoundsForPainting: TRect; -begin - Result := inherited GetAreaBoundsForPainting; - ApplyMergingCellsBounds(Result); -end; - -function TcxGridDataRowViewInfo.GetBoundsForInvalidate(AItem: TcxCustomGridTableItem): TRect; -begin - Result := inherited GetBoundsForInvalidate(AItem); - if AItem = nil then - ApplyMergingCellsBounds(Result); - ApplyMergedCellsBounds(Result, AItem); -end; - -function TcxGridDataRowViewInfo.GetBoundsForItem(AItem: TcxCustomGridTableItem): TRect; -begin - if InternalCellViewInfos[AItem.VisibleIndex] = nil then - Result := inherited GetBoundsForItem(AItem) - else - Result := InternalCellViewInfos[AItem.VisibleIndex].Bounds; -end; - -function TcxGridDataRowViewInfo.GetCellBorders(AIsRight, AIsBottom: Boolean): TcxBorders; -begin - Result := GridViewInfo.GetCellBorders(AIsRight, AIsBottom); -end; - -function TcxGridDataRowViewInfo.GetCellViewInfoByItem(AItem: TcxCustomGridTableItem): TcxGridTableDataCellViewInfo; -begin - if TcxGridColumn(AItem).IsPreview then - Result := FPreviewViewInfo - else - if (AItem.VisibleIndex = -1) or TcxCustomGrid(GridView.Control).UpdateLocked then - Result := nil - else - Result := InternalCellViewInfos[AItem.VisibleIndex]; -end; - -function TcxGridDataRowViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; - ACellViewInfo: TcxGridDataCellViewInfo; - AHitTest: TcxCustomGridHitTest; -begin - Result := inherited GetHitTest(P); - if (Result <> nil) and (Result.ClassType = GetHitTestClass) then - begin - for I := 0 to CellViewInfoCount - 1 do - begin - ACellViewInfo := InternalCellViewInfos[I]; - if ACellViewInfo <> nil then - begin - AHitTest := ACellViewInfo.GetHitTest(P); - if AHitTest <> nil then - begin - Result := AHitTest; - Exit; - end; - end; - end; - if HasPreview then - begin - AHitTest := FPreviewViewInfo.GetHitTest(P); - if AHitTest <> nil then - begin - Result := AHitTest; - Exit; - end; - end; - end; -end; - -{ TcxGridNewItemRowViewInfo } - -function TcxGridNewItemRowViewInfo.CalculateSelected: Boolean; -begin - Result := GridRecord.Selected; -end; - -function TcxGridNewItemRowViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := taCenter; -end; - -function TcxGridNewItemRowViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridNewItemRowViewInfo.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxGridNewItemRowViewInfo.GetCellLeftBound(AIndex: Integer): Integer; -begin - Result := GridViewInfo.HeaderViewInfo[AIndex].RealBounds.Left; -end; - -function TcxGridNewItemRowViewInfo.GetCellWidth(AIndex: Integer): Integer; -begin - Result := GridViewInfo.HeaderViewInfo[AIndex].Width; -end; - -function TcxGridNewItemRowViewInfo.GetHeight: Integer; -begin - if FHeight = 0 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TcxGridNewItemRowViewInfo.GetInfoText: string; -begin - Result := Options.InfoText; -end; - -function TcxGridNewItemRowViewInfo.GetOptions: TcxGridSpecialRowOptions; -begin - Result := GridView.NewItemRow; -end; - -function TcxGridNewItemRowViewInfo.GetSeparatorColor: TColor; -begin - Result := Options.GetSeparatorColor; -end; - -function TcxGridNewItemRowViewInfo.GetSeparatorWidth: Integer; -begin - Result := Options.SeparatorWidth; -end; - -function TcxGridNewItemRowViewInfo.GetShowInfoText: Boolean; -begin - Result := not Focused; -end; - -function TcxGridNewItemRowViewInfo.GetShowPreview: Boolean; -begin - Result := False; -end; - -function TcxGridNewItemRowViewInfo.GetStyleIndex: Integer; -begin - Result := vsNewItemRowInfoText; -end; - -function TcxGridNewItemRowViewInfo.GetText: string; -begin - if ShowInfoText then - Result := InfoText - else - Result := inherited GetText; -end; - -function TcxGridNewItemRowViewInfo.GetTextAreaBounds: TRect; -begin - Result := ContentBounds; - with GridViewInfo.ScrollableAreaBoundsHorz do - begin - Result.Left := Left; - if Result.Right > Right then - Result.Right := Right; - end; -end; - -procedure TcxGridNewItemRowViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetViewParams(GetStyleIndex, GridRecord, nil, AParams); -end; - -function TcxGridNewItemRowViewInfo.HasFooters: Boolean; -begin - Result := False; -end; - -function TcxGridNewItemRowViewInfo.HasLastHorzGridLine: Boolean; -begin - Result := False; -end; - -function TcxGridNewItemRowViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridNewItemRowPainter; -end; - -{ TcxGridFilterRowViewInfo } - -function TcxGridFilterRowViewInfo.GetGridRecord: TcxGridFilterRow; -begin - Result := TcxGridFilterRow(inherited GridRecord); -end; - -function TcxGridFilterRowViewInfo.GetOptions: TcxGridSpecialRowOptions; -begin - Result := GridView.FilterRow; -end; - -function TcxGridFilterRowViewInfo.GetShowInfoText: Boolean; -begin - Result := inherited GetShowInfoText and GridRecord.IsEmpty; -end; - -function TcxGridFilterRowViewInfo.GetStyleIndex: Integer; -begin - Result := vsFilterRowInfoText; -end; - -{$IFDEF USETABCONTROL} - -{ TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo } - -function TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo.GetBottomGridLineColor: TColor; -begin - Result := SiteViewInfo.MasterGridViewInfo.GridLineColor; -end; - -function TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo.GetBottomGridLineWidth: Integer; -begin - Result := SiteViewInfo.MasterGridViewInfo.GridLineWidth; -end; - -function TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo.GetSiteViewInfo: TcxGridDetailsSiteViewInfo; -begin - Result := TcxGridDetailsSiteViewInfo(inherited SiteViewInfo); -end; - -function TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo.CalculateHeight: Integer; -begin - Result := inherited CalculateHeight; - if HasBottomGridLine then - Inc(Result, BottomGridLineWidth); -end; - -function TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo.GetBottomGridLineBounds: TRect; -begin - Result := Bounds; - Result.Top := Result.Bottom - BottomGridLineWidth; -end; - -function TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo.GetPainterClass: TcxGridDetailsSiteTabsPainterClass; -begin - Result := TcxGridMasterDataRowDetailsSiteTabsPainter; -end; - -function TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo.GetTabControlBounds: TRect; -begin - Result := inherited GetTabControlBounds; - if HasBottomGridLine then - Dec(Result.Bottom, BottomGridLineWidth); -end; - -function TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo.HasBottomGridLine: Boolean; -begin - Result := bBottom in SiteViewInfo.MasterGridViewInfo.GetCellBorders(False, True); -end; - -{$ENDIF} - -{ TcxGridDetailsSiteViewInfo } - -constructor TcxGridDetailsSiteViewInfo.Create(AMasterDataRowViewInfo: TcxGridMasterDataRowViewInfo); -begin - FMasterDataRowViewInfo := AMasterDataRowViewInfo; - inherited Create(TcxGridLevel(FMasterDataRowViewInfo.GridView.Level)); - if CacheItem.IsDetailsSiteCachedInfoAssigned then - SetCachedInfo(CacheItem.DetailsSiteCachedInfo); -end; - -destructor TcxGridDetailsSiteViewInfo.Destroy; -begin - if not MasterGridViewInfo.IsInternalUse and (CacheItem <> nil) then - begin - if CacheItem.IsDetailsSiteCachedInfoAssigned then - raise EdxException.Create('CacheItem.IsDetailsSiteCachedInfoAssigned'); //!!! - GetCachedInfo(CacheItem.DetailsSiteCachedInfo); - end; - inherited; -end; - -function TcxGridDetailsSiteViewInfo.GetCacheItem: TcxGridMasterTableViewInfoCacheItem; -begin - Result := FMasterDataRowViewInfo.CacheItem; -end; - -function TcxGridDetailsSiteViewInfo.GetMasterGridView: TcxGridTableView; -begin - Result := FMasterDataRowViewInfo.GridView; -end; - -function TcxGridDetailsSiteViewInfo.GetMasterGridViewInfo: TcxGridTableViewInfo; -begin - Result := FMasterDataRowViewInfo.GridViewInfo; -end; - -procedure TcxGridDetailsSiteViewInfo.ControlFocusChanged; -begin - if ActiveGridViewExists then - ActiveGridView.Controller.ControlFocusChanged; -end; - -function TcxGridDetailsSiteViewInfo.GetActiveGridView: TcxCustomGridView; -begin - Result := FMasterDataRowViewInfo.GridRecord.ActiveDetailGridView; - if Result <> nil then - Result.CheckSynchronizationAssignNeeded; -end; - -function TcxGridDetailsSiteViewInfo.GetActiveGridViewExists: Boolean; -var - AMasterGridRecord: TcxGridMasterDataRow; -begin - Result := inherited GetActiveGridViewExists; - if not Result and not IsActiveGridViewDestroying and not (csDestroying in ComponentState) then - begin - AMasterGridRecord := FMasterDataRowViewInfo.GridRecord; - Result := - (AMasterGridRecord <> nil) and AMasterGridRecord.ActiveDetailGridViewExists and - not AMasterGridRecord.ActiveDetailGridView.IsDestroying; - end; -end; - -function TcxGridDetailsSiteViewInfo.GetActiveGridViewValue: TcxCustomGridView; -begin - Result := inherited GetActiveGridViewValue; - if (Result <> nil) and (Result.ViewInfo <> nil) then - Result.ViewInfo.IsInternalUse := MasterGridViewInfo.IsInternalUse; -end; - -function TcxGridDetailsSiteViewInfo.GetActiveLevel: TcxGridLevel; -begin - Result := FMasterDataRowViewInfo.GridRecord.ActiveDetailLevel; -end; - -function TcxGridDetailsSiteViewInfo.GetCanvas: TcxCanvas; -begin - Result := MasterGridViewInfo.Canvas; -end; - -function TcxGridDetailsSiteViewInfo.GetContainer: TcxControl; -begin - Result := MasterGridViewInfo.Site; -end; - -function TcxGridDetailsSiteViewInfo.GetDesignController: TcxCustomGridDesignController; -begin - Result := MasterGridView.Controller.DesignController; -end; - -function TcxGridDetailsSiteViewInfo.GetFullyVisible: Boolean; -begin - if CacheItem.IsDetailsSiteFullyVisibleAssigned then - Result := CacheItem.DetailsSiteFullyVisible - else - begin - Result := inherited GetFullyVisible; - CacheItem.DetailsSiteFullyVisible := Result; - end; -end; - -function TcxGridDetailsSiteViewInfo.GetHeight: Integer; -begin - if CacheItem.IsDetailsSiteHeightAssigned then - Result := CacheItem.DetailsSiteHeight - else - begin - Result := inherited GetHeight; - CacheItem.DetailsSiteHeight := Result; - end; -end; - -function TcxGridDetailsSiteViewInfo.GetMasterRecord: TObject; -begin - Result := MasterDataRowViewInfo.GridRecord; -end; - -function TcxGridDetailsSiteViewInfo.GetMaxHeight: Integer; -begin - Result := FMasterDataRowViewInfo.RestHeight; - TcxGridLevelAccess.CheckHeight(Level, Result); -end; - -function TcxGridDetailsSiteViewInfo.GetMaxNormalHeight: Integer; -begin - Result := inherited GetMaxNormalHeight; - TcxGridLevelAccess.CheckHeight(Level, Result); -end; - -function TcxGridDetailsSiteViewInfo.GetMaxWidth: Integer; -begin - Result := MasterGridViewInfo.ClientWidth - - FMasterDataRowViewInfo.LevelIndent - - FMasterDataRowViewInfo.ExpandButtonCellViewInfo.BaseWidth; -end; - -function TcxGridDetailsSiteViewInfo.GetNormalHeight: Integer; -begin - if CacheItem.IsDetailsSiteNormalHeightAssigned then - Result := CacheItem.DetailsSiteNormalHeight - else - begin - Result := inherited GetNormalHeight; - CacheItem.DetailsSiteNormalHeight := Result; - end; -end; - -{$IFDEF USETABCONTROL} - -function TcxGridDetailsSiteViewInfo.GetTabsViewInfoClass: TcxCustomGridDetailsSiteTabsViewInfoClass; -begin - if TabsPosition = dtpLeft then - Result := TcxGridMasterDataRowDetailsSiteLeftTabsViewInfo - else - Result := inherited GetTabsViewInfoClass; -end; - -{$ENDIF} - -function TcxGridDetailsSiteViewInfo.GetVisible: Boolean; -begin - Result := FMasterDataRowViewInfo.DetailsSiteVisible; -end; - -function TcxGridDetailsSiteViewInfo.GetWidth: Integer; -begin - if CacheItem.IsDetailsSiteWidthAssigned then - Result := CacheItem.DetailsSiteWidth - else - begin - Result := inherited GetWidth; - CacheItem.DetailsSiteWidth := Result; - end; -end; - -procedure TcxGridDetailsSiteViewInfo.InitTabHitTest(AHitTest: TcxGridDetailsSiteTabHitTest); -begin - AHitTest.Owner := MasterDataRowViewInfo.GridRecord; -end; - -procedure TcxGridDetailsSiteViewInfo.ChangeActiveTab(ALevel: TcxGridLevel; - AFocusView: Boolean = False); -var - ARow: TcxGridMasterDataRow; -begin - ARow := MasterDataRowViewInfo.GridRecord; - ARow.ActiveDetailIndex := ALevel.Index; - if AFocusView and (ARow.ActiveDetailGridView <> nil) then - ARow.ActiveDetailGridView.Focused := True; -end; - -function TcxGridDetailsSiteViewInfo.DetailHasData(ALevel: TcxGridLevel): Boolean; -begin - Result := TcxGridMasterDataRow(MasterRecord).DetailGridViewHasData[ALevel.Index]; -end; - -function TcxGridDetailsSiteViewInfo.HasMaxHeight: Boolean; -begin - Result := (Level.MaxDetailHeight <> 0) and (Height = Level.MaxDetailHeight); -end; - -function TcxGridDetailsSiteViewInfo.SupportsTabAccelerators: Boolean; -begin - Result := MasterDataRowViewInfo.SupportsTabAccelerators; -end; - -{ TcxGridExpandButtonCellViewInfo } - -function TcxGridExpandButtonCellViewInfo.GetRecordViewInfo: TcxGridMasterDataRowViewInfo; -begin - Result := TcxGridMasterDataRowViewInfo(inherited RecordViewInfo); -end; - -function TcxGridExpandButtonCellViewInfo.GetRightBorderRestSpaceBounds: TRect; -begin - Result := inherited GetBorderBounds(bRight); - Result.Bottom := BorderBounds[bRight].Top; -end; - -function TcxGridExpandButtonCellViewInfo.CalculateHeight: Integer; -begin - Result := RecordViewInfo.DataHeight; - if RecordViewInfo.DetailsSiteVisible then - Inc(Result, RecordViewInfo.DetailsAreaViewInfo.CalculateHeight); -end; - -function TcxGridExpandButtonCellViewInfo.CalculateWidth: Integer; -begin - Result := GridViewInfo.ClientBounds.Left + RecordViewInfo.LevelIndent + - BaseWidth - RecordViewInfo.ContentIndent; -end; - -function TcxGridExpandButtonCellViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := RecordViewInfo.BackgroundBitmap; -end; - -function TcxGridExpandButtonCellViewInfo.GetBaseWidth: Integer; -begin - Result := GridViewInfo.LevelIndent; -end; - -function TcxGridExpandButtonCellViewInfo.GetBorderBounds(AIndex: TcxBorder): TRect; -begin - Result := inherited GetBorderBounds(AIndex); - if AIndex = bRight then - begin - Inc(Result.Top, RecordViewInfo.DataHeight); - if bBottom in Borders then - Dec(Result.Top, BorderWidth[bBottom]); - end; -end; - -function TcxGridExpandButtonCellViewInfo.GetBorders: TcxBorders; -begin - Result := GridViewInfo.GetCellBorders(False, True); - if RecordViewInfo.Expanded and (bBottom in Result) then - Include(Result, bRight) - else - Exclude(Result, bRight); -end; - -function TcxGridExpandButtonCellViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridExpandButtonCellPainter; -end; - -{ TcxGridDetailsAreaViewInfo } - -function TcxGridDetailsAreaViewInfo.GetRecordViewInfo: TcxGridMasterDataRowViewInfo; -begin - Result := TcxGridMasterDataRowViewInfo(inherited RecordViewInfo); -end; - -function TcxGridDetailsAreaViewInfo.CalculateHeight: Integer; -begin - Result := RecordViewInfo.DetailsSiteViewInfo.Height; -end; - -function TcxGridDetailsAreaViewInfo.CalculateWidth: Integer; -begin - Result := RecordViewInfo.DetailsSiteViewInfo.MaxWidth; -end; - -function TcxGridDetailsAreaViewInfo.GetBorders: TcxBorders; -begin - if GridLines in [glBoth, glHorizontal] then - Result := [bBottom] - else - Result := []; -end; - -{ TcxGridMasterDataRowViewInfo } - -constructor TcxGridMasterDataRowViewInfo.Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); -begin - inherited; - if DetailsSiteVisible then - begin - FDetailsAreaViewInfo := GetDetailsAreaViewInfoClass.Create(Self); - FDetailsSiteViewInfo := GetDetailsSiteViewInfoClass.Create(Self); - end; - FExpandButtonCellViewInfo := GetExpandButtonCellViewInfoClass.Create(Self); -end; - -destructor TcxGridMasterDataRowViewInfo.Destroy; -begin - FExpandButtonCellViewInfo.Free; - FDetailsSiteViewInfo.Free; - FDetailsAreaViewInfo.Free; - inherited; -end; - -function TcxGridMasterDataRowViewInfo.GetCacheItem: TcxGridMasterTableViewInfoCacheItem; -begin - Result := TcxGridMasterTableViewInfoCacheItem(inherited CacheItem); -end; - -function TcxGridMasterDataRowViewInfo.GetDetailsSiteIndentBounds: TRect; -begin - with DetailsSiteViewInfo.Bounds do - Result := Rect(ContentIndent, Top, Left, Bottom); -end; - -function TcxGridMasterDataRowViewInfo.GetGridRecord: TcxGridMasterDataRow; -begin - Result := TcxGridMasterDataRow(inherited GridRecord); -end; - -procedure TcxGridMasterDataRowViewInfo.CalculateExpandButtonBounds(var ABounds: TRect); -begin - ABounds := ExpandButtonAreaBounds; - inherited; -end; - -function TcxGridMasterDataRowViewInfo.CalculateHeight: Integer; -begin - Result := inherited CalculateHeight; - if DetailsSiteVisible then - begin - FRestHeight := CalculateRestHeight(Result); - Inc(Result, DetailsSiteViewInfo.Height); - end; -end; - -function TcxGridMasterDataRowViewInfo.CalculateRestHeight(ARowHeight: Integer): Integer; -begin - Result := RecordsViewInfo.GetRestHeight(Bounds.Top) - ARowHeight; -end; - -procedure TcxGridMasterDataRowViewInfo.ControlFocusChanged; -begin - inherited; - if DetailsSiteVisible then - DetailsSiteViewInfo.ControlFocusChanged; -end; - -function TcxGridMasterDataRowViewInfo.GetDataHeight: Integer; -begin - Result := inherited GetDataHeight; - if DetailsSiteVisible then - Dec(Result, DetailsSiteViewInfo.Height); -end; - -function TcxGridMasterDataRowViewInfo.GetDataIndent: Integer; -begin - Result := inherited GetDataIndent + GridViewInfo.LevelIndent; -end; - -function TcxGridMasterDataRowViewInfo.GetDataWidth: Integer; -begin - Result := inherited GetDataWidth - GridViewInfo.LevelIndent; -end; - -function TcxGridMasterDataRowViewInfo.GetDetailsSiteVisible: Boolean; -begin - Result := Expanded; -end; - -function TcxGridMasterDataRowViewInfo.GetExpandButtonAreaBounds: TRect; -begin - Result := Rect(ContentIndent, Bounds.Top, DataIndent, Bounds.Top + DataHeight); -end; - -function TcxGridMasterDataRowViewInfo.GetMaxHeight: Integer; -begin - Result := inherited GetMaxHeight; - if DetailsSiteVisible then - if not DetailsSiteViewInfo.FullyVisible and not GridViewInfo.CalculateDown and - (Index > 0) and not DetailsSiteViewInfo.HasMaxHeight then - Result := MaxInt div 2 - else - Result := Result - DetailsSiteViewInfo.Height + DetailsSiteViewInfo.NormalHeight; -end; - -function TcxGridMasterDataRowViewInfo.IsDetailVisible(ADetail: TcxCustomGridView): Boolean; -begin - Result := DetailsSiteVisible and (DetailsSiteViewInfo <> nil) and - (DetailsSiteViewInfo.ActiveLevel = ADetail.Level); -end; - -function TcxGridMasterDataRowViewInfo.IsFullyVisible: Boolean; -begin - Result := inherited IsFullyVisible and - (not DetailsSiteVisible or DetailsSiteViewInfo.HasMaxHeight or DetailsSiteViewInfo.FullyVisible); -end; - -procedure TcxGridMasterDataRowViewInfo.VisibilityChanged(AVisible: Boolean); -begin - inherited; - if DetailsSiteVisible then - DetailsSiteViewInfo.VisibilityChanged(AVisible); -end; - -function TcxGridMasterDataRowViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridMasterDataRowPainter; -end; - -function TcxGridMasterDataRowViewInfo.GetDetailsAreaViewInfoClass: TcxGridDetailsAreaViewInfoClass; -begin - Result := TcxGridDetailsAreaViewInfo; -end; - -function TcxGridMasterDataRowViewInfo.GetDetailsSiteViewInfoClass: TcxGridDetailsSiteViewInfoClass; -begin - Result := TcxGridDetailsSiteViewInfo; -end; - -function TcxGridMasterDataRowViewInfo.GetExpandButtonCellViewInfoClass: TcxGridExpandButtonCellViewInfoClass; -begin - Result := TcxGridExpandButtonCellViewInfo; -end; - -procedure TcxGridMasterDataRowViewInfo.BeforeRecalculation; -begin - inherited; - if DetailsSiteVisible then - begin - FDetailsSiteViewInfo.BeforeRecalculation; - FDetailsAreaViewInfo.BeforeRecalculation; - end; - FExpandButtonCellViewInfo.BeforeRecalculation; -end; - -procedure TcxGridMasterDataRowViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -var - ADetailLeftBound, ADetailTopBound: Integer; - - function NeedCalculateDetail: Boolean; - begin - Result := DetailsSiteVisible and - (GridViewInfo.IsCalculating or - DetailsSiteViewInfo.ActiveGridViewExists and - (DetailsSiteViewInfo.ActiveGridView.Site.Left = cxGridInvisibleCoordinate)); - end; - -begin - inherited; - ExpandButtonCellViewInfo.Calculate(ContentIndent, ATopBound); - if NeedCalculateDetail then - begin - ADetailLeftBound := ExpandButtonCellViewInfo.Bounds.Right; - ADetailTopBound := ATopBound + DataHeight; - DetailsSiteViewInfo.Calculate(ADetailLeftBound, ADetailTopBound); - DetailsAreaViewInfo.Calculate(ADetailLeftBound, ADetailTopBound); - end; -end; - -function TcxGridMasterDataRowViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - if DetailsSiteVisible and PtInRect(DetailsSiteViewInfo.Bounds, P) then - Result := DetailsSiteViewInfo.GetHitTest(P) - else - Result := inherited GetHitTest(P); -end; - -function TcxGridMasterDataRowViewInfo.ProcessDialogChar(ACharCode: Word): Boolean; -begin - Result := inherited ProcessDialogChar(ACharCode); - if not Result and DetailsSiteVisible then - Result := DetailsSiteViewInfo.ProcessDialogChar(ACharCode); -end; - -function TcxGridMasterDataRowViewInfo.SupportsTabAccelerators: Boolean; -begin - Result := GridView.Controller.SupportsTabAccelerators(GridRecord); -end; - -{ TcxGridGroupCellViewInfo } - -function TcxGridGroupCellViewInfo.GetExpandedAreaBounds: TRect; -begin - Result := inherited GetBorderBounds(bBottom); - Result.Right := BorderBounds[bBottom].Left; -end; - -function TcxGridGroupCellViewInfo.GetGridRecord: TcxGridGroupRow; -begin - Result := TcxGridGroupRow(inherited GridRecord); -end; - -function TcxGridGroupCellViewInfo.GetRecordViewInfo: TcxGridGroupRowViewInfo; -begin - Result := TcxGridGroupRowViewInfo(inherited RecordViewInfo); -end; - -function TcxGridGroupCellViewInfo.GetRowStyle: TcxGridGroupRowStyle; -begin - Result := RecordViewInfo.RowStyle; -end; - -function TcxGridGroupCellViewInfo.CalculateHeight: Integer; -begin - Result := RecordViewInfo.DataHeight; -end; - -function TcxGridGroupCellViewInfo.CalculateWidth: Integer; -begin - with RecordViewInfo, Bounds do - Result := Right - Left - LevelIndent; -end; - -function TcxGridGroupCellViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDraw(ACanvas); - if not Result then - TcxGridTableViewAccess.DoCustomDrawGroupCell(GridView, ACanvas, Self, Result); -end; - -function TcxGridGroupCellViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - if RowStyle = grsStandard then - Result := vaCenter - else - Result := vaBottom; -end; - -function TcxGridGroupCellViewInfo.GetAlwaysSelected: Boolean; -begin - Result := True; -end; - -function TcxGridGroupCellViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := RecordViewInfo.BackgroundBitmap; -end; - -function TcxGridGroupCellViewInfo.GetBorderBounds(AIndex: TcxBorder): TRect; -begin - Result := inherited GetBorderBounds(AIndex); - if (AIndex = bBottom) and (RowStyle = grsStandard) and GridRecord.Expanded then - Result.Left := RecordViewInfo.LevelIndentVertLineBounds[GridRecord.Level].Left; -end; - -function TcxGridGroupCellViewInfo.GetBorderColor(AIndex: TcxBorder): TColor; -begin - if (AIndex = bBottom) and (RowStyle = grsOffice11) then - Result := dxOffice11GroupRowSeparatorColor - else - Result := GridViewInfo.GridLineColor; -end; - -function TcxGridGroupCellViewInfo.GetBorders: TcxBorders; -begin - Result := GridViewInfo.GetCellBorders(True, True); - if RowStyle = grsOffice11 then - Include(Result, bBottom); -end; - -function TcxGridGroupCellViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - if (AIndex = bBottom) and (RowStyle = grsOffice11) then - Result := RecordViewInfo.RecordsViewInfo.GroupRowSeparatorWidth - else - Result := GridViewInfo.GridLineWidth; -end; - -function TcxGridGroupCellViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridGroupCellPainter; -end; - -function TcxGridGroupCellViewInfo.GetText: string; -begin - Result := GridRecord.DisplayCaption; - TcxCustomGridTableItemAccess.DoGetDisplayText(GridRecord.GroupedColumn, GridRecord, Result); -end; - -function TcxGridGroupCellViewInfo.GetTextAreaBounds: TRect; -begin - Result := inherited GetTextAreaBounds; - if GridRecord.Expandable then - Inc(Result.Left, GridViewInfo.LevelIndent); -end; - -procedure TcxGridGroupCellViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetDataCellParams(GridRecord, nil, AParams, True, Self); -end; - -function TcxGridGroupCellViewInfo.HasCustomDraw: Boolean; -begin - Result := TcxGridTableViewAccess.HasCustomDrawGroupCell(GridView); -end; - -function TcxGridGroupCellViewInfo.CanDrawSelected: Boolean; -begin - Result := True; -end; - -{ TcxGridGroupRowSpacerViewInfo } - -constructor TcxGridGroupRowSpacerViewInfo.Create(ARowViewInfo: TcxGridGroupRowViewInfo; - const AText: string); -begin - inherited Create(ARowViewInfo.GridViewInfo); - FRowViewInfo := ARowViewInfo; - Text := AText; -end; - -function TcxGridGroupRowSpacerViewInfo.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridGroupRowSpacerViewInfo.CalculateWidth: Integer; -begin - Result := TextWidth; -end; - -function TcxGridGroupRowSpacerViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := FRowViewInfo.CellViewInfo.AlignmentVert; -end; - -function TcxGridGroupRowSpacerViewInfo.GetText: string; -begin - Result := Text; -end; - -function TcxGridGroupRowSpacerViewInfo.GetTextAreaBounds: TRect; -begin - Result := ContentBounds; - InflateRect(Result, 0, -cxGridCellTextOffset); -end; - -procedure TcxGridGroupRowSpacerViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetGroupSummaryCellParams(RowViewInfo.GridRecord, nil, AParams); -end; - -function TcxGridGroupRowSpacerViewInfo.GetWidth: Integer; -begin - CalculateParams; - Result := inherited GetWidth; -end; - -function TcxGridGroupRowSpacerViewInfo.HasBackground: Boolean; -begin - Result := False; -end; - -{ TcxGridGroupSummaryCellViewInfo } - -constructor TcxGridGroupSummaryCellViewInfo.Create(ARowViewInfo: TcxGridGroupRowViewInfo; - ASummaryItem: TcxDataSummaryItem; const AValue: Variant); -begin - inherited Create(ARowViewInfo.GridViewInfo); - FRowViewInfo := ARowViewInfo; - FSummaryItem := ASummaryItem; - FValue := AValue; - FSeparatorViewInfo := FRowViewInfo.CreateSpacerViewInfo(GetSeparatorText); - FTextWidth := -1; -end; - -destructor TcxGridGroupSummaryCellViewInfo.Destroy; -begin - FSeparatorViewInfo.Free; - inherited; -end; - -function TcxGridGroupSummaryCellViewInfo.GetColumn: TcxGridColumn; -begin - Result := FSummaryItem.ItemLink as TcxGridColumn; -end; - -function TcxGridGroupSummaryCellViewInfo.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -procedure TcxGridGroupSummaryCellViewInfo.SetIsLast(Value: Boolean); -begin - if FIsLast <> Value then - begin - FIsLast := Value; - FSeparatorViewInfo.Text := GetSeparatorText; - end; -end; - -function TcxGridGroupSummaryCellViewInfo.CalculateWidth: Integer; -begin - Result := TextWidth + FSeparatorViewInfo.Width; -end; - -function TcxGridGroupSummaryCellViewInfo.CanAlignWithColumn: Boolean; -begin - Result := Column <> nil; -end; - -function TcxGridGroupSummaryCellViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDraw(ACanvas); - if not Result then - begin - if Column <> nil then - TcxGridColumnAccess.DoCustomDrawGroupSummaryCell(Column, ACanvas, Self, Result); - if not Result then - TcxGridTableViewAccess.DoCustomDrawGroupSummaryCell(GridView, ACanvas, Self, Result); - end; -end; - -function TcxGridGroupSummaryCellViewInfo.GetAlignmentHorz: TAlignment; -begin - if CanAlignWithColumn and FRowViewInfo.SummaryCellAutoWidth then - Result := Column.GroupSummaryAlignment - else - Result := taLeftJustify; -end; - -function TcxGridGroupSummaryCellViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := FRowViewInfo.CellViewInfo.AlignmentVert; -end; - -function TcxGridGroupSummaryCellViewInfo.GetDesignSelectionBounds: TRect; -begin - Result := Bounds; - InflateRect(Result, 0, -1); -end; - -function TcxGridGroupSummaryCellViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridGroupSummaryHitTest; -end; - -function TcxGridGroupSummaryCellViewInfo.GetIsDesignSelected: Boolean; -begin - Result := GridView.IsDesigning and - GridView.Controller.DesignController.IsObjectSelected(SummaryItem); -end; - -function TcxGridGroupSummaryCellViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridGroupSummaryCellPainter; -end; - -function TcxGridGroupSummaryCellViewInfo.GetSeparatorBounds: TRect; -begin - Result := Bounds; - Result.Left := Min(GetTextBounds(True, False).Right, TextAreaBounds.Right); -end; - -function TcxGridGroupSummaryCellViewInfo.GetSeparatorText: string; -begin - if IsLast then - Result := '' - else - Result := (FSummaryItem.SummaryItems as TcxDataGroupSummaryItems).Separator + ' '; -end; - -function TcxGridGroupSummaryCellViewInfo.GetShowEndEllipsis: Boolean; -begin - Result := True; -end; - -function TcxGridGroupSummaryCellViewInfo.GetText: string; -begin - try - Result := FSummaryItem.FormatValue(FValue, False); - except - Application.HandleException(Self); - end; -end; - -function TcxGridGroupSummaryCellViewInfo.GetTextAreaBounds: TRect; -begin - Result := ContentBounds; - InflateRect(Result, 0, -cxGridCellTextOffset); - Dec(Result.Right, FSeparatorViewInfo.Width); - if Result.Right < Result.Left then - Result.Right := Result.Left; -end; - -procedure TcxGridGroupSummaryCellViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetGroupSummaryCellParams(RowViewInfo.GridRecord, SummaryItem, AParams); -end; - -function TcxGridGroupSummaryCellViewInfo.HasBackground: Boolean; -begin - Result := False; -end; - -function TcxGridGroupSummaryCellViewInfo.HasCustomDraw: Boolean; -begin - Result := inherited HasCustomDraw or - (Column <> nil) and TcxGridColumnAccess.HasCustomDrawGroupSummaryCell(Column) or - TcxGridTableViewAccess.HasCustomDrawGroupSummaryCell(GridView); -end; - -procedure TcxGridGroupSummaryCellViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - with TcxGridGroupSummaryHitTest(AHitTest) do - begin - if not GridView.IsDesigning then - ViewInfo := Self.RowViewInfo; - GridRecord := Self.RowViewInfo.GridRecord; - SummaryItem := Self.SummaryItem; - end; -end; - -procedure TcxGridGroupSummaryCellViewInfo.Offset(DX, DY: Integer); -begin - inherited; - FSeparatorViewInfo.DoOffset(DX, DY); -end; - -procedure TcxGridGroupSummaryCellViewInfo.BeforeRecalculation; -begin - inherited; - FSeparatorViewInfo.BeforeRecalculation; -end; - -procedure TcxGridGroupSummaryCellViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - FSeparatorViewInfo.Calculate(GetSeparatorBounds); -end; - -function TcxGridGroupSummaryCellViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if GridView.IsDesigning and (AButton = mbLeft) then - begin - GridView.Controller.DesignController.SelectObject(SummaryItem, not (ssShift in AShift)); - Result := True; - end; -end; - -{ TcxGridGroupRowViewInfo } - -constructor TcxGridGroupRowViewInfo.Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); -begin - inherited; - FCellViewInfo := TcxGridGroupCellViewInfo.Create(Self); - FSummaryCellViewInfos := TList.Create; - FSummaryCellsWithoutColumns := TList.Create; - CreateSummaryCellViewInfos; - GetColumnSummaryCellViewInfos(nil, FSummaryCellsWithoutColumns); - CreateSpacerViewInfos; -end; - -destructor TcxGridGroupRowViewInfo.Destroy; -begin - DestroySpacerViewInfos; - DestroySummaryCellViewInfos; - FSummaryCellsWithoutColumns.Free; - FSummaryCellViewInfos.Free; - FCellViewInfo.Free; - inherited; -end; - -function TcxGridGroupRowViewInfo.GetGridRecord: TcxGridGroupRow; -begin - Result := TcxGridGroupRow(inherited GridRecord); -end; - -function TcxGridGroupRowViewInfo.GetRowStyle: TcxGridGroupRowStyle; -begin - Result := GridView.OptionsView.GroupRowStyle; -end; - -function TcxGridGroupRowViewInfo.GetSummaryCellLayout: TcxGridGroupSummaryLayout; -begin - Result := GridView.OptionsView.GetGroupSummaryLayout; -end; - -function TcxGridGroupRowViewInfo.GetSummaryCellViewInfo(Index: Integer): TcxGridGroupSummaryCellViewInfo; -begin - Result := TcxGridGroupSummaryCellViewInfo(FSummaryCellViewInfos[Index]); -end; - -function TcxGridGroupRowViewInfo.GetSummaryCellViewInfoCount: Integer; -begin - Result := FSummaryCellViewInfos.Count; -end; - -procedure TcxGridGroupRowViewInfo.CalculateExpandButtonBounds(var ABounds: TRect); -begin - ABounds := FCellViewInfo.ContentBounds; - if RowStyle = grsOffice11 then - with ABounds do - Top := Bottom - FCellViewInfo.TextHeightWithOffset; - inherited; -end; - -function TcxGridGroupRowViewInfo.CalculateHeight: Integer; -begin - if AutoHeight then - begin - CellViewInfo.CalculateParams; - Result := RecordsViewInfo.CalculateCustomGroupRowHeight(False, CellViewInfo.Params); - end - else - Result := RecordsViewInfo.GroupRowHeight; - Inc(Result, inherited CalculateHeight); -end; - -function TcxGridGroupRowViewInfo.CanSize: Boolean; -begin - Result := GridView.OptionsCustomize.GroupRowSizing; -end; - -procedure TcxGridGroupRowViewInfo.CheckRowHeight(var AValue: Integer); -begin - Dec(AValue, NonBaseHeight); - inherited; - GridView.OptionsView.CheckGroupRowHeight(AValue); - Inc(AValue, NonBaseHeight); -end; - -function TcxGridGroupRowViewInfo.GetAutoHeight: Boolean; -begin - Result := inherited GetAutoHeight and (GridView.OptionsView.GroupRowHeight = 0); -end; - -function TcxGridGroupRowViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := RecordsViewInfo.GroupBackgroundBitmap; -end; - -function TcxGridGroupRowViewInfo.GetExpandButtonAreaBounds: TRect; -begin - Result := FCellViewInfo.ContentBounds; - Result.Right := Result.Left + GridViewInfo.LevelIndent; -end; - -function TcxGridGroupRowViewInfo.GetFocusRectBounds: TRect; -begin - Result := inherited GetFocusRectBounds; - Result.Bottom := FCellViewInfo.ContentBounds.Bottom; -end; - -function TcxGridGroupRowViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridGroupRowPainter; -end; - -function TcxGridGroupRowViewInfo.GetSeparatorBounds: TRect; -begin - Result := inherited GetSeparatorBounds; - if Expanded then Inc(Result.Left, GridViewInfo.LevelIndent); -end; - -function TcxGridGroupRowViewInfo.GetSeparatorIndentBounds: TRect; -begin - Result := inherited GetSeparatorBounds; - Result.Right := SeparatorBounds.Left; -end; - -function TcxGridGroupRowViewInfo.GetShowSeparator: Boolean; -begin - if RowStyle = grsStandard then - Result := inherited GetShowSeparator - else - Result := False; -end; - -function TcxGridGroupRowViewInfo.HasFocusRect: Boolean; -begin - Result := True; -end; - -function TcxGridGroupRowViewInfo.HasFooter(ALevel: Integer): Boolean; -begin - Result := inherited HasFooter(ALevel) or - (GridView.OptionsView.GroupFooters = gfAlwaysVisible) and - (ALevel = 0) and not GridRecord.Expanded and - TcxGridColumnAccess.CanShowGroupFooters(GridRecord.GroupedColumn); -end; - -procedure TcxGridGroupRowViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - inherited; - FCellViewInfo.DoOffset(DX, DY); - if FSummaryBeginningSpacerViewInfo <> nil then - FSummaryBeginningSpacerViewInfo.DoOffset(DX, DY); - for I := 0 to SummaryCellViewInfoCount - 1 do - SummaryCellViewInfos[I].DoOffset(DX, DY); - if FSummaryEndingSpacerViewInfo <> nil then - FSummaryEndingSpacerViewInfo.DoOffset(DX, DY); -end; - -procedure TcxGridGroupRowViewInfo.SetRowHeight(Value: Integer); -begin - if RowHeight <> Value then - GridView.OptionsView.GroupRowHeight := Value - NonBaseHeight; -end; - -function TcxGridGroupRowViewInfo.CreateSpacerViewInfo(const AText: string): TcxGridGroupRowSpacerViewInfo; -begin - Result := GetSpacerViewInfoClass.Create(Self, AText); -end; - -procedure TcxGridGroupRowViewInfo.CreateSpacerViewInfos; -begin - if HasUnalignableSummaryCells then - begin - FSummaryBeginningSpacerViewInfo := CreateSpacerViewInfo(GetSummaryBeginningSpacerText); - FSummaryEndingSpacerViewInfo := CreateSpacerViewInfo(GetSummaryEndingSpacerText); - end; -end; - -procedure TcxGridGroupRowViewInfo.DestroySpacerViewInfos; -begin - FSummaryEndingSpacerViewInfo.Free; - FSummaryBeginningSpacerViewInfo.Free; -end; - -function TcxGridGroupRowViewInfo.GetSpacerViewInfoClass: TcxGridGroupRowSpacerViewInfoClass; -begin - Result := TcxGridGroupRowSpacerViewInfo; -end; - -function TcxGridGroupRowViewInfo.AddSummaryCellViewInfo(ASummaryItem: TcxDataSummaryItem; - const AValue: Variant): TcxGridGroupSummaryCellViewInfo; -begin - Result := GetSummaryCellViewInfoClass.Create(Self, ASummaryItem, AValue); - FSummaryCellViewInfos.Add(Result); -end; - -procedure TcxGridGroupRowViewInfo.CreateSummaryCellViewInfos; -var - ASummaryItems: TcxDataSummaryItems; - ASummaryValues: PVariant; - I: Integer; -begin - if not GridRecord.GetGroupSummaryInfo(ASummaryItems, ASummaryValues) then Exit; - for I := 0 to ASummaryItems.Count - 1 do - if ASummaryItems[I].Position = spGroup then - AddSummaryCellViewInfo(ASummaryItems[I], ASummaryValues^[I]); -end; - -procedure TcxGridGroupRowViewInfo.DestroySummaryCellViewInfos; -var - I: Integer; -begin - for I := 0 to SummaryCellViewInfoCount - 1 do - SummaryCellViewInfos[I].Free; -end; - -function TcxGridGroupRowViewInfo.GetSummaryCellViewInfoClass: TcxGridGroupSummaryCellViewInfoClass; -begin - Result := TcxGridGroupSummaryCellViewInfo; -end; - -procedure TcxGridGroupRowViewInfo.CalculateSummaryCells; -var - I: Integer; - AColumnHeaderViewInfo: TcxGridColumnHeaderViewInfo; - ACellViewInfos: TList; -begin - if SummaryCellViewInfoCount = 0 then Exit; - - if HasUnalignableSummaryCells then - begin - SummaryBeginningSpacerViewInfo.Calculate(GetSummaryBeginningSpacerBounds); - TcxGridGroupSummaryCellViewInfo(UnalignableSummaryCells.Last).IsLast := True; - CalculateSummaryCells(UnalignableSummaryCells, GetSummaryCellsAreaBounds(False), - taLeftJustify, False); - SummaryEndingSpacerViewInfo.Calculate(GetSummaryEndingSpacerBounds); - end; - - if SummaryCellLayout <> gslStandard then - begin - ACellViewInfos := TList.Create; - try - for I := 0 to GridViewInfo.HeaderViewInfo.Count - 1 do - begin - AColumnHeaderViewInfo := GridViewInfo.HeaderViewInfo[I]; - GetColumnSummaryCellViewInfos(AColumnHeaderViewInfo.Column, ACellViewInfos); - if ACellViewInfos.Count <> 0 then - begin - TcxGridGroupSummaryCellViewInfo(ACellViewInfos.Last).IsLast := True; - CalculateSummaryCells(ACellViewInfos, - GetColumnSummaryCellsAreaBounds(AColumnHeaderViewInfo), - AColumnHeaderViewInfo.Column.GroupSummaryAlignment, SummaryCellAutoWidth); - end; - end; - finally - ACellViewInfos.Free; - end; - end; -end; - -procedure TcxGridGroupRowViewInfo.CalculateSummaryCells(ACellViewInfos: TList; - const AAreaBounds: TRect; AAlignment: TAlignment; AAutoWidth: Boolean); -var - AWidths: TcxAutoWidthObject; - ABounds: TRect; - I: Integer; -begin - AWidths := CalculateSummaryCellWidths(ACellViewInfos, AAreaBounds.Right - AAreaBounds.Left, - AAutoWidth); - try - ABounds := GetSummaryCellsBounds(AAreaBounds, AWidths, AAlignment, AAutoWidth); - for I := 0 to ACellViewInfos.Count - 1 do - begin - ABounds.Right := Min(ABounds.Left + AWidths[I].AutoWidth, AAreaBounds.Right); - TcxGridGroupSummaryCellViewInfo(ACellViewInfos[I]).Calculate(ABounds); - ABounds.Left := ABounds.Right; - end; - finally - AWidths.Free; - end; -end; - -function TcxGridGroupRowViewInfo.CalculateSummaryCellWidths(ACellViewInfos: TList; - AAvailableWidth: Integer; AAutoWidth: Boolean): TcxAutoWidthObject; -var - I: Integer; -begin - Result := TcxAutoWidthObject.Create(ACellViewInfos.Count); - Result.AvailableWidth := AAvailableWidth; - for I := 0 to ACellViewInfos.Count - 1 do - with Result.AddItem do - begin - Width := TcxGridGroupSummaryCellViewInfo(ACellViewInfos[I]).CalculateWidth; - MinWidth := Width; - Fixed := False; - if not AAutoWidth then AutoWidth := Width; - end; - if AAutoWidth then Result.Calculate; -end; - -function TcxGridGroupRowViewInfo.GetColumnSummaryCellsAreaBounds(AColumnHeaderViewInfo: TcxGridColumnHeaderViewInfo): TRect; -begin - Result := GetSummaryCellsAreaBounds(True); - Result.Left := Max(Result.Left, AColumnHeaderViewInfo.DataOffset + cxGridCellTextOffset); - Result.Right := Min(Result.Right, AColumnHeaderViewInfo.Bounds.Right - cxGridCellTextOffset); -end; - -procedure TcxGridGroupRowViewInfo.GetColumnSummaryCellViewInfos(AColumn: TcxGridColumn; AList: TList); -var - I: Integer; -begin - AList.Clear; - for I := 0 to SummaryCellViewInfoCount - 1 do - if SummaryCellViewInfos[I].Column = AColumn then - AList.Add(SummaryCellViewInfos[I]); -end; - -function TcxGridGroupRowViewInfo.GetSummaryBeginningSpacerBounds: TRect; -begin - Result := GetSummaryCellsAreaBounds(False); - Result.Right := Result.Left; - Dec(Result.Left, SummaryBeginningSpacerViewInfo.Width); - Result.Right := Min(Result.Right, CellViewInfo.TextAreaBounds.Right); -end; - -function TcxGridGroupRowViewInfo.GetSummaryEndingSpacerBounds: TRect; -begin - Result := GetSummaryCellsAreaBounds(False); - Result.Left := TcxGridGroupSummaryCellViewInfo(UnalignableSummaryCells.Last).Bounds.Right; - Result.Right := Result.Left + SummaryEndingSpacerViewInfo.Width; - Result.Right := Min(Result.Right, CellViewInfo.TextAreaBounds.Right); -end; - -function TcxGridGroupRowViewInfo.GetSummaryBeginningSpacerText: string; -begin - Result := ' ' + GridRecord.GroupSummaryItems.BeginText; -end; - -function TcxGridGroupRowViewInfo.GetSummaryEndingSpacerText: string; -begin - Result := GridRecord.GroupSummaryItems.EndText; -end; - -function TcxGridGroupRowViewInfo.GetSummaryCellAutoWidth: Boolean; -begin - Result := SummaryCellLayout = gslAlignWithColumnsAndDistribute; -end; - -function TcxGridGroupRowViewInfo.GetSummaryCellsAreaBounds(AForAlignableCells: Boolean): TRect; -begin - Result := CellViewInfo.ContentBounds; - Result.Right := CellViewInfo.TextAreaBounds.Right; - Result.Left := Min(CellViewInfo.GetTextBounds(True, False).Right, Result.Right); - if AForAlignableCells then - begin - if HasUnalignableSummaryCells then - Result.Left := SummaryEndingSpacerViewInfo.Bounds.Right; - Inc(Result.Left, 2 * cxGridCellTextOffset); - end - else - begin - Inc(Result.Left, SummaryBeginningSpacerViewInfo.Width); - Dec(Result.Right, SummaryEndingSpacerViewInfo.Width); - if Result.Right < Result.Left then - Result.Right := Result.Left; - end; -end; - -function TcxGridGroupRowViewInfo.GetSummaryCellsBounds(const AAreaBounds: TRect; - AWidths: TcxAutoWidthObject; AAlignment: TAlignment; AAutoWidth: Boolean): TRect; -begin - Result := AAreaBounds; - if not AAutoWidth and (AWidths.Width < AWidths.AvailableWidth) then - case AAlignment of - taRightJustify: - Result.Left := Result.Right - AWidths.Width; - taCenter: - Result.Left := (Result.Left + Result.Right - AWidths.Width) div 2; - end; -end; - -function TcxGridGroupRowViewInfo.GetUnalignableSummaryCells: TList; -begin - if SummaryCellLayout = gslStandard then - Result := SummaryCells - else - Result := SummaryCellsWithoutColumns; -end; - -function TcxGridGroupRowViewInfo.HasUnalignableSummaryCells: Boolean; -begin - Result := (SummaryCellLayout = gslStandard) or (SummaryCellsWithoutColumns.Count <> 0); -end; - -procedure TcxGridGroupRowViewInfo.BeforeRecalculation; -var - I: Integer; -begin - inherited; - FCellViewInfo.BeforeRecalculation; - if FSummaryBeginningSpacerViewInfo <> nil then - FSummaryBeginningSpacerViewInfo.BeforeRecalculation; - for I := 0 to SummaryCellViewInfoCount - 1 do - SummaryCellViewInfos[I].BeforeRecalculation; - if FSummaryEndingSpacerViewInfo <> nil then - FSummaryEndingSpacerViewInfo.BeforeRecalculation; -end; - -procedure TcxGridGroupRowViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - FCellViewInfo.Calculate(ALeftBound + LevelIndent, ATopBound); - CalculateSummaryCells; -end; - -function TcxGridGroupRowViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; - AHitTest: TcxCustomGridHitTest; -begin - Result := inherited GetHitTest(P); - if Result <> nil then - for I := 0 to SummaryCellViewInfoCount - 1 do - begin - AHitTest := SummaryCellViewInfos[I].GetHitTest(P); - if AHitTest <> nil then - begin - Result := AHitTest; - Break; - end; - end; -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStdPopupMenu.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStdPopupMenu.pas deleted file mode 100644 index 9dfa9aba..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStdPopupMenu.pas +++ /dev/null @@ -1,385 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridStdPopupMenu; - -{$I cxVer.inc} - -interface - -uses - Windows, Classes, Graphics, ImgList, Menus, cxGridMenuOperations, cxGridCustomPopupMenu, - cxGridCustomView; - -type - TcxGridPopupMenuItem = class(TMenuItem) - private - FOperation: TcxGridPopupMenuOperation; - public - constructor Create(AOwner: TComponent; AOperation: TcxGridPopupMenuOperation); reintroduce; virtual; - property Operation: TcxGridPopupMenuOperation read FOperation; - end; - - TcxGridStdPopupMenu = class(TPopupMenu, {$IFNDEF DELPHI6}IUnknown,{$ENDIF} IDoPopup, IcxGridPopupMenu) - private - FOperations: TcxGridPopupMenuOperations; - protected - // IDoPopup - function GetPopupHandler: TcxGridOnPopupProc; - // IcxGridPopupMenu - function CanPopup(AHitTest: TcxCustomGridHitTest): Boolean; - - {$IFDEF DELPHI7} - procedure AdvancedDrawItem(Sender: TObject; ACanvas: TCanvas; - ARect: TRect; State: TOwnerDrawState); virtual; - {$ENDIF} - procedure CreateMenuItems; virtual; - procedure DoPopup(Sender: TObject); override; - procedure GridMenuPopup(ASenderMenu: TComponent; AHitTest: TcxCustomGridHitTest; - X,Y: Integer); virtual; - function HasDynamicContent: Boolean; virtual; - procedure InitItems(AItems: TMenuItem); - - function GetOperationsClass: TcxGridPopupMenuOperationsClass; virtual; abstract; - property Operations: TcxGridPopupMenuOperations read FOperations; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - end; - - TcxGridStdHeaderMenu = class(TcxGridStdPopupMenu) - protected - function GetOperationsClass: TcxGridPopupMenuOperationsClass; override; - end; - - TcxGridStdFooterMenu = class(TcxGridStdPopupMenu) - protected - function GetOperationsClass: TcxGridPopupMenuOperationsClass; override; - end; - - TcxGridStdGroupRowMenu = class(TcxGridStdPopupMenu) - protected - function GetOperationsClass: TcxGridPopupMenuOperationsClass; override; - procedure GridMenuPopup(ASenderMenu: TComponent; AHitTest: TcxCustomGridHitTest; - X,Y: Integer); override; - function HasDynamicContent: Boolean; override; - end; - -function cxGetGridPopupMenuOperation(AMenuItem: TComponent): TcxGridPopupMenuOperation; - -implementation - -uses - Types, -{$IFDEF DELPHI7} - Themes, -{$ENDIF} - SysUtils, cxGraphics, cxGeometry, cxLookAndFeelPainters, cxGridCustomTableView, cxGridTableView, - cxGridHeaderPopupMenuItems, cxGridFooterPopupMenuItems, cxGridGroupRowPopupMenuItems; - -function cxGetGridPopupMenuOperation(AMenuItem: TComponent): TcxGridPopupMenuOperation; -begin - if AMenuItem is TcxGridPopupMenuItem then - Result := TcxGridPopupMenuItem(AMenuItem).Operation - else - Result := nil; -end; - -{ TcxGridPopupMenuItem } - -constructor TcxGridPopupMenuItem.Create(AOwner: TComponent; AOperation: TcxGridPopupMenuOperation); -begin - inherited Create(AOwner); - FOperation := AOperation; -end; - -{ TcxGridStdPopupMenu } - -constructor TcxGridStdPopupMenu.Create(AOwner: TComponent); -begin - inherited; - FOperations := GetOperationsClass.Create; - if not HasDynamicContent then - CreateMenuItems; -end; - -destructor TcxGridStdPopupMenu.Destroy; -begin - FOperations.Free; - inherited; -end; - -function TcxGridStdPopupMenu.GetPopupHandler: TcxGridOnPopupProc; -begin - Result := GridMenuPopup; -end; - -function TcxGridStdPopupMenu.CanPopup(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := Operations.CanProcess(AHitTest); -end; - -{$IFDEF DELPHI7} - -procedure TcxGridStdPopupMenu.AdvancedDrawItem(Sender: TObject; - ACanvas: TCanvas; ARect: TRect; State: TOwnerDrawState); -var - AMenuItem: TcxGridPopupMenuItem; - AImages: TCustomImageList; - ASelected, AHasImage: Boolean; - AImageAreaRect, AImageRect, ACheckRect: TRect; - AcxCanvas: TcxCanvas; -begin - AMenuItem := TcxGridPopupMenuItem(Sender); - AImages := AMenuItem.GetParentMenu.Images; - ASelected := odSelected in State; - AHasImage := (0 <= AMenuItem.ImageIndex) and (AMenuItem.ImageIndex < AImages.Count); - - // draw background - if ASelected then - begin - if ThemeServices.ThemesEnabled then - ACanvas.Brush.Color := clMenuHighlight - else - ACanvas.Brush.Color := clHighlight; - ACanvas.Font.Color := clHighlightText; - end; - ACanvas.FillRect(ARect); - - // draw image - AImageAreaRect := ARect; - AImageAreaRect.Right := AImageAreaRect.Left + cxRectHeight(AImageAreaRect); - AImageRect := Bounds(AImageAreaRect.Left + 1, AImageAreaRect.Top + 1, - AImages.Width, AImages.Height); - if AMenuItem.Checked then - begin - ACanvas.Brush.Color := clBtnShadow; - ACanvas.FrameRect(AImageAreaRect); - InflateRect(AImageAreaRect, -1, -1); - ACanvas.Brush.Color := clBtnFace; - ACanvas.FillRect(AImageAreaRect); - InflateRect(AImageAreaRect, 1, 1); - if not AHasImage then - begin - ACheckRect := cxRectCenter(AImageAreaRect, TcxCustomLookAndFeelPainter.CheckButtonSize); - InflateRect(ACheckRect, -TcxCustomLookAndFeelPainter.CheckBorderSize, - -TcxCustomLookAndFeelPainter.CheckBorderSize); - AcxCanvas := TcxCanvas.Create(ACanvas); - try - AcxCanvas.Brush.Style := bsClear; - TcxCustomLookAndFeelPainter.DrawCheck(AcxCanvas, ACheckRect, cxbsNormal, - True, clBtnText); - AcxCanvas.Brush.Style := bsSolid; - finally - AcxCanvas.Free; - end; - end; - end; - if AHasImage then - AImages.Draw(ACanvas, AImageRect.Left, AImageRect.Top, AMenuItem.ImageIndex, - AMenuItem.Enabled); - - // draw text - ARect.Left := AImageAreaRect.Right + 3; - Dec(ARect.Right); - AMenuItem.DoDrawText(ACanvas, AMenuItem.Caption, ARect, ASelected, - DT_SINGLELINE or DT_EXPANDTABS or DT_LEFT or DT_VCENTER); - if AMenuItem.ShortCut <> 0 then - begin - Dec(ARect.Right, 10); - AMenuItem.DoDrawText(ACanvas, ShortCutToText(AMenuItem.ShortCut), ARect, - ASelected, DT_SINGLELINE or DT_RIGHT or DT_VCENTER); - end; -end; - -{$ENDIF} - -procedure TcxGridStdPopupMenu.CreateMenuItems; - - procedure InsertNewGroup(AItems: TMenuItem); - var - AItem: TcxGridPopupMenuItem; - begin - AItem := TcxGridPopupMenuItem.Create(Self, nil); - AItem.Caption := '-'; - AItems.Add(AItem); - end; - - function GetMenuItemByOperationClass(const AItems: TMenuItem; - AClass: TcxGridPopupMenuOperationClass): TMenuItem; - var - I: Integer; - AOperation: TcxGridPopupMenuOperation; - begin - for I := 0 to AItems.Count - 1 do - begin - Result := AItems[I]; - AOperation := cxGetGridPopupMenuOperation(Result); - if (AOperation <> nil) and (AOperation.ClassType = AClass) then - Exit - else - begin - Result := GetMenuItemByOperationClass(Result, AClass); - if Result <> nil then Exit; - end; - end; - Result := nil; - end; - -var - I: Integer; - AOperation: TcxGridPopupMenuOperation; - AMenuItem, AParentMenuItem: TMenuItem; -begin - for I := 0 to Operations.Count - 1 do - begin - AOperation := Operations[I]; - AMenuItem := TcxGridPopupMenuItem.Create(Self, AOperation); - - if AOperation.GetParentOperationClass = nil then - AParentMenuItem := nil - else - AParentMenuItem := GetMenuItemByOperationClass(Items, AOperation.GetParentOperationClass); - if AParentMenuItem = nil then - AParentMenuItem := Items; - - if AOperation.BeginGroup then - InsertNewGroup(AParentMenuItem); - AParentMenuItem.Add(AMenuItem); - end; -end; - -procedure TcxGridStdPopupMenu.DoPopup(Sender: TObject); -begin - if HasDynamicContent then - begin - Items.Clear; - CreateMenuItems; - end; - Images := cxGridPopupMenuImages; - InitItems(Items); - inherited DoPopup(Sender); -end; - -procedure TcxGridStdPopupMenu.GridMenuPopup(ASenderMenu: TComponent; - AHitTest: TcxCustomGridHitTest; X, Y: Integer); -begin - Popup(X, Y); -end; - -function TcxGridStdPopupMenu.HasDynamicContent: Boolean; -begin - Result := False; -end; - -procedure TcxGridStdPopupMenu.InitItems(AItems: TMenuItem); -var -{$IFDEF DELPHI7} - ACustomDrawNeeded: Boolean; -{$ENDIF} - I: Integer; - AOperation: TcxGridPopupMenuOperation; -begin -{$IFDEF DELPHI7} - ACustomDrawNeeded := (Win32MajorVersion >= 5) and (Win32MinorVersion >= 1) and - (Images <> nil) and not IsRightToLeft; -{$ENDIF} - for I := 0 to AItems.Count - 1 do - begin - AOperation := cxGetGridPopupMenuOperation(AItems[I]); - if AOperation <> nil then - begin - AItems[I].Caption := AOperation.Caption; - AItems[I].Checked := AOperation.Down; - AItems[I].Enabled := AOperation.Enabled; - AItems[I].ImageIndex := AOperation.ImageIndex; - AItems[I].Visible := AOperation.Visible; - AItems[I].OnClick := AOperation.DoExecute; - {$IFDEF DELPHI7} - if ACustomDrawNeeded then - AItems[I].OnAdvancedDrawItem := AdvancedDrawItem; - {$ENDIF} - end; - InitItems(AItems[I]); - end; -end; - -{ TcxGridStdHeaderMenu } - -function TcxGridStdHeaderMenu.GetOperationsClass: TcxGridPopupMenuOperationsClass; -begin - Result := TcxGridHeaderPopupMenuOperations; -end; - -{ TcxGridStdFooterMenu } - -function TcxGridStdFooterMenu.GetOperationsClass: TcxGridPopupMenuOperationsClass; -begin - Result := TcxGridFooterPopupMenuOperations; -end; - -{ TcxGridStdGroupRowMenu } - -function TcxGridStdGroupRowMenu.GetOperationsClass: TcxGridPopupMenuOperationsClass; -begin - Result := TcxGridGroupRowPopupMenuOperations; -end; - -procedure TcxGridStdGroupRowMenu.GridMenuPopup(ASenderMenu: TComponent; - AHitTest: TcxCustomGridHitTest; X, Y: Integer); -begin - TcxGridGroupRowPopupMenuOperations(Operations).GroupRow := - (AHitTest as TcxGridRecordHitTest).GridRecord as TcxGridGroupRow; - inherited; -end; - -function TcxGridStdGroupRowMenu.HasDynamicContent: Boolean; -begin - Result := True; -end; - -initialization - RegisterPopupMenuClass(TcxGridStdHeaderMenu, [gvhtColumnHeader], TcxGridTableView); - RegisterPopupMenuClass(TcxGridStdFooterMenu, [gvhtFooterCell, gvhtGroupFooterCell], - TcxGridTableView); - RegisterPopupMenuClass(TcxGridStdGroupRowMenu, [gvhtRecord, gvhtGroupSummary], - TcxGridTableView); - -finalization - UnregisterPopupMenuClass(TcxGridStdGroupRowMenu); - UnregisterPopupMenuClass(TcxGridStdFooterMenu); - UnregisterPopupMenuClass(TcxGridStdHeaderMenu); - -end. - diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStrs.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStrs.pas deleted file mode 100644 index 129dab34..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStrs.pas +++ /dev/null @@ -1,266 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridStrs; - -{$I cxVer.inc} - -interface - -resourcestring - scxGridRecursiveLevels = 'You cannot create recursive levels'; - - scxGridDeletingConfirmationCaption = 'Confirm'; - scxGridDeletingFocusedConfirmationText = 'Delete record?'; - scxGridDeletingSelectedConfirmationText = 'Delete all selected records?'; - - scxGridNoDataInfoText = ''; - - scxGridFilterRowInfoText = 'Click here to define a filter'; - scxGridNewItemRowInfoText = 'Click here to add a new row'; - - scxGridFilterIsEmpty = ''; - - scxGridCustomizationFormCaption = 'Customization'; - scxGridCustomizationFormColumnsPageCaption = 'Columns'; - scxGridGroupByBoxCaption = 'Drag a column header here to group by that column'; - scxGridFilterApplyButtonCaption = 'Apply Filter'; - scxGridFilterCustomizeButtonCaption = 'Customize...'; - scxGridColumnsQuickCustomizationHint = 'Click here to show/hide/move columns'; - - scxGridCustomizationFormBandsPageCaption = 'Bands'; - scxGridBandsQuickCustomizationHint = 'Click here to show/hide/move bands'; - - scxGridCustomizationFormRowsPageCaption = 'Rows'; - - scxGridConverterIntermediaryMissing = 'Missing an intermediary component!'#13#10'Please add a %s component to the form.'; - scxGridConverterNotExistGrid = 'cxGrid does not exist'; - scxGridConverterNotExistComponent = 'Component does not exist'; - scxImportErrorCaption = 'Import error'; - - scxNotExistGridView = 'Grid view does not exist'; - scxNotExistGridLevel = 'Active grid level does not exist'; - scxCantCreateExportOutputFile = 'Can''t create the export output file'; - - cxSEditRepositoryExtLookupComboBoxItem = 'ExtLookupComboBox|Represents an ultra-advanced lookup using the QuantumGrid as its drop down control'; - - // date ranges - - scxGridYesterday = 'Yesterday'; - scxGridToday = 'Today'; - scxGridTomorrow = 'Tomorrow'; - scxGridLast30Days = 'Last 30 days'; - scxGridLast14Days = 'Last 14 days'; - scxGridLast7Days = 'Last 7 days'; - scxGridNext7Days = 'Next 7 days'; - scxGridNext14Days = 'Next 14 days'; - scxGridNext30Days = 'Next 30 days'; - scxGridLastTwoWeeks = 'Last two weeks'; - scxGridLastWeek = 'Last week'; - scxGridThisWeek = 'This week'; - scxGridNextWeek = 'Next week'; - scxGridNextTwoWeeks = 'Next two weeks'; - scxGridLastMonth = 'Last month'; - scxGridThisMonth = 'This month'; - scxGridNextMonth = 'Next month'; - scxGridLastYear = 'Last year'; - scxGridThisYear = 'This year'; - scxGridNextYear = 'Next year'; - scxGridPast = 'Past'; - scxGridFuture = 'Future'; - - scxGridMonthFormat = 'mmmm yyyy'; - scxGridYearFormat = 'yyyy'; - - // ChartView - - scxGridChartCategoriesDisplayText = 'Data'; - - scxGridChartValueHintFormat = '%s for %s is %s'; // series display text, category, value - scxGridChartPercentValueTickMarkLabelFormat = '0%'; - - scxGridChartToolBoxDataLevels = 'Data Levels:'; - scxGridChartToolBoxDataLevelSelectValue = 'select value'; - scxGridChartToolBoxCustomizeButtonCaption = 'Customize Chart'; - - scxGridChartNoneDiagramDisplayText = 'No diagram'; - scxGridChartColumnDiagramDisplayText = 'Column diagram'; - scxGridChartBarDiagramDisplayText = 'Bar diagram'; - scxGridChartLineDiagramDisplayText = 'Line diagram'; - scxGridChartAreaDiagramDisplayText = 'Area diagram'; - scxGridChartPieDiagramDisplayText = 'Pie diagram'; - - scxGridChartCustomizationFormSeriesPageCaption = 'Series'; - scxGridChartCustomizationFormSortBySeries = 'Sort by:'; - scxGridChartCustomizationFormNoSortedSeries = ''; - scxGridChartCustomizationFormDataGroupsPageCaption = 'Data Groups'; - scxGridChartCustomizationFormOptionsPageCaption = 'Options'; - - scxGridChartLegend = 'Legend'; - scxGridChartLegendKeyBorder = 'Key Border'; - scxGridChartPosition = 'Position'; - scxGridChartPositionDefault = 'Default'; - scxGridChartPositionNone = 'None'; - scxGridChartPositionLeft = 'Left'; - scxGridChartPositionTop = 'Top'; - scxGridChartPositionRight = 'Right'; - scxGridChartPositionBottom = 'Bottom'; - scxGridChartAlignment = 'Alignment'; - scxGridChartAlignmentDefault = 'Default'; - scxGridChartAlignmentStart = 'Start'; - scxGridChartAlignmentCenter = 'Center'; - scxGridChartAlignmentEnd = 'End'; - scxGridChartOrientation = 'Orientation'; - scxGridChartOrientationDefault = 'Default'; - scxGridChartOrientationHorizontal = 'Horizontal'; - scxGridChartOrientationVertical = 'Vertical'; - scxGridChartBorder = 'Border'; - scxGridChartTitle = 'Title'; - scxGridChartToolBox = 'ToolBox'; - scxGridChartDiagramSelector = 'Diagram Selector'; - scxGridChartOther = 'Other'; - scxGridChartValueHints = 'Value Hints'; - -implementation - -uses - dxCore; - -procedure AddcxGridResourceStringNames(AProduct: TdxProductResourceStrings); - - procedure InternalAdd(const AResourceStringName: string; AAdress: Pointer); - begin - AProduct.Add(AResourceStringName, AAdress); - end; - -begin - InternalAdd('scxGridRecursiveLevels', @scxGridRecursiveLevels); - InternalAdd('scxGridDeletingConfirmationCaption', @scxGridDeletingConfirmationCaption); - InternalAdd('scxGridDeletingFocusedConfirmationText', @scxGridDeletingFocusedConfirmationText); - InternalAdd('scxGridDeletingSelectedConfirmationText', @scxGridDeletingSelectedConfirmationText); - InternalAdd('scxGridNoDataInfoText', @scxGridNoDataInfoText); - InternalAdd('scxGridFilterRowInfoText', @scxGridFilterRowInfoText); - InternalAdd('scxGridNewItemRowInfoText', @scxGridNewItemRowInfoText); - InternalAdd('scxGridFilterIsEmpty', @scxGridFilterIsEmpty); - InternalAdd('scxGridCustomizationFormCaption', @scxGridCustomizationFormCaption); - InternalAdd('scxGridCustomizationFormColumnsPageCaption', @scxGridCustomizationFormColumnsPageCaption); - InternalAdd('scxGridGroupByBoxCaption', @scxGridGroupByBoxCaption); - InternalAdd('scxGridFilterApplyButtonCaption', @scxGridFilterApplyButtonCaption); - InternalAdd('scxGridFilterCustomizeButtonCaption', @scxGridFilterCustomizeButtonCaption); - InternalAdd('scxGridColumnsQuickCustomizationHint', @scxGridColumnsQuickCustomizationHint); - InternalAdd('scxGridCustomizationFormBandsPageCaption', @scxGridCustomizationFormBandsPageCaption); - InternalAdd('scxGridBandsQuickCustomizationHint', @scxGridBandsQuickCustomizationHint); - InternalAdd('scxGridCustomizationFormRowsPageCaption', @scxGridCustomizationFormRowsPageCaption); - InternalAdd('scxGridConverterIntermediaryMissing', @scxGridConverterIntermediaryMissing); - InternalAdd('scxGridConverterNotExistGrid', @scxGridConverterNotExistGrid); - InternalAdd('scxGridConverterNotExistComponent', @scxGridConverterNotExistComponent); - InternalAdd('scxImportErrorCaption', @scxImportErrorCaption); - InternalAdd('scxNotExistGridView', @scxNotExistGridView); - InternalAdd('scxNotExistGridLevel', @scxNotExistGridLevel); - InternalAdd('scxCantCreateExportOutputFile', @scxCantCreateExportOutputFile); - InternalAdd('cxSEditRepositoryExtLookupComboBoxItem', @cxSEditRepositoryExtLookupComboBoxItem); - InternalAdd('scxGridYesterday', @scxGridYesterday); - InternalAdd('scxGridToday', @scxGridToday); - InternalAdd('scxGridTomorrow', @scxGridTomorrow); - InternalAdd('scxGridLast30Days', @scxGridLast30Days); - InternalAdd('scxGridLast14Days', @scxGridLast14Days); - InternalAdd('scxGridLast7Days', @scxGridLast7Days); - InternalAdd('scxGridNext7Days', @scxGridNext7Days); - InternalAdd('scxGridNext14Days', @scxGridNext14Days); - InternalAdd('scxGridNext30Days', @scxGridNext30Days); - InternalAdd('scxGridLastTwoWeeks', @scxGridLastTwoWeeks); - InternalAdd('scxGridLastWeek', @scxGridLastWeek); - InternalAdd('scxGridThisWeek', @scxGridThisWeek); - InternalAdd('scxGridNextWeek', @scxGridNextWeek); - InternalAdd('scxGridNextTwoWeeks', @scxGridNextTwoWeeks); - InternalAdd('scxGridLastMonth', @scxGridLastMonth); - InternalAdd('scxGridThisMonth', @scxGridThisMonth); - InternalAdd('scxGridNextMonth', @scxGridNextMonth); - InternalAdd('scxGridLastYear', @scxGridLastYear); - InternalAdd('scxGridThisYear', @scxGridThisYear); - InternalAdd('scxGridNextYear', @scxGridNextYear); - InternalAdd('scxGridPast', @scxGridPast); - InternalAdd('scxGridFuture', @scxGridFuture); - InternalAdd('scxGridMonthFormat', @scxGridMonthFormat); - InternalAdd('scxGridYearFormat', @scxGridYearFormat); - InternalAdd('scxGridChartCategoriesDisplayText', @scxGridChartCategoriesDisplayText); - InternalAdd('scxGridChartValueHintFormat', @scxGridChartValueHintFormat); - InternalAdd('scxGridChartPercentValueTickMarkLabelFormat', @scxGridChartPercentValueTickMarkLabelFormat); - InternalAdd('scxGridChartToolBoxDataLevels', @scxGridChartToolBoxDataLevels); - InternalAdd('scxGridChartToolBoxDataLevelSelectValue', @scxGridChartToolBoxDataLevelSelectValue); - InternalAdd('scxGridChartToolBoxCustomizeButtonCaption', @scxGridChartToolBoxCustomizeButtonCaption); - InternalAdd('scxGridChartNoneDiagramDisplayText', @scxGridChartNoneDiagramDisplayText); - InternalAdd('scxGridChartColumnDiagramDisplayText', @scxGridChartColumnDiagramDisplayText); - InternalAdd('scxGridChartBarDiagramDisplayText', @scxGridChartBarDiagramDisplayText); - InternalAdd('scxGridChartLineDiagramDisplayText', @scxGridChartLineDiagramDisplayText); - InternalAdd('scxGridChartAreaDiagramDisplayText', @scxGridChartAreaDiagramDisplayText); - InternalAdd('scxGridChartPieDiagramDisplayText', @scxGridChartPieDiagramDisplayText); - InternalAdd('scxGridChartCustomizationFormSeriesPageCaption', @scxGridChartCustomizationFormSeriesPageCaption); - InternalAdd('scxGridChartCustomizationFormSortBySeries', @scxGridChartCustomizationFormSortBySeries); - InternalAdd('scxGridChartCustomizationFormNoSortedSeries', @scxGridChartCustomizationFormNoSortedSeries); - InternalAdd('scxGridChartCustomizationFormDataGroupsPageCaption', @scxGridChartCustomizationFormDataGroupsPageCaption); - InternalAdd('scxGridChartCustomizationFormOptionsPageCaption', @scxGridChartCustomizationFormOptionsPageCaption); - InternalAdd('scxGridChartLegend', @scxGridChartLegend); - InternalAdd('scxGridChartLegendKeyBorder', @scxGridChartLegendKeyBorder); - InternalAdd('scxGridChartPosition', @scxGridChartPosition); - InternalAdd('scxGridChartPositionDefault', @scxGridChartPositionDefault); - InternalAdd('scxGridChartPositionNone', @scxGridChartPositionNone); - InternalAdd('scxGridChartPositionLeft', @scxGridChartPositionLeft); - InternalAdd('scxGridChartPositionTop', @scxGridChartPositionTop); - InternalAdd('scxGridChartPositionRight', @scxGridChartPositionRight); - InternalAdd('scxGridChartPositionBottom', @scxGridChartPositionBottom); - InternalAdd('scxGridChartAlignment', @scxGridChartAlignment); - InternalAdd('scxGridChartAlignmentDefault', @scxGridChartAlignmentDefault); - InternalAdd('scxGridChartAlignmentStart', @scxGridChartAlignmentStart); - InternalAdd('scxGridChartAlignmentCenter', @scxGridChartAlignmentCenter); - InternalAdd('scxGridChartAlignmentEnd', @scxGridChartAlignmentEnd); - InternalAdd('scxGridChartOrientation', @scxGridChartOrientation); - InternalAdd('scxGridChartOrientationDefault', @scxGridChartOrientationDefault); - InternalAdd('scxGridChartOrientationHorizontal', @scxGridChartOrientationHorizontal); - InternalAdd('scxGridChartOrientationVertical', @scxGridChartOrientationVertical); - InternalAdd('scxGridChartBorder', @scxGridChartBorder); - InternalAdd('scxGridChartTitle', @scxGridChartTitle); - InternalAdd('scxGridChartToolBox', @scxGridChartToolBox); - InternalAdd('scxGridChartDiagramSelector', @scxGridChartDiagramSelector); - InternalAdd('scxGridChartOther', @scxGridChartOther); - InternalAdd('scxGridChartValueHints', @scxGridChartValueHints); -end; - -initialization - dxResourceStringsRepository.RegisterProduct('ExpressQuantumGrid', @AddcxGridResourceStringNames); - -finalization - dxResourceStringsRepository.UnRegisterProduct('ExpressQuantumGrid'); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStructureNavigator.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStructureNavigator.pas deleted file mode 100644 index 13439ea0..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStructureNavigator.pas +++ /dev/null @@ -1,1890 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridStructureNavigator; // TODO transparency - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - DesignIntf, -{$ELSE} - DsgnIntf, -{$ENDIF} - Windows, Messages, TypInfo, Classes, SysUtils, Controls, Graphics, Forms, - Menus, ExtCtrls, Buttons, - cxControls, cxClasses, cxGraphics, cxDesignWindows, - cxGridCommon, cxGrid, cxGridLevel, cxGridCustomView, cxViewEditor; - -const - CM_DeferUpdate = WM_DX + 25; - -type - TcxGridStructureControl = class; - TcxGridStructureNavigator = class; - - TcxGridColorIndex = (ciGrid, ciLevel, ciView); - - { TcxGridStructureControlViewInfo } - - TcxGridStructureControlRowViewInfo = class - Bounds: TRect; - - LevelBounds: TRect; - LevelContentBounds: TRect; - LevelHighlighted: Boolean; - LevelSelected: Boolean; - LevelText: string; - LevelTextArea: TRect; - - ViewBounds: TRect; - ViewContentBounds: TRect; - ViewHighlighted: Boolean; - ViewSelected: Boolean; - ViewText: string; - ViewTextArea: TRect; - - TreeLineVertCount: Integer; - TreeLineIsParent: Boolean; - TreeLineIsLast: Boolean; - end; - - TcxGridStructureControlRowsViewInfo = class(TcxObjectList) - private - function GetItem(Index: Integer): TcxGridStructureControlRowViewInfo; - public - property Items[Index: Integer]: TcxGridStructureControlRowViewInfo read GetItem; default; - end; - - TcxGridStructureControlViewInfo = class - private - FCanvas: TcxCanvas; - FStructureControl: TcxGridStructureControl; - FTextHeight: Integer; - FRowHeight: Integer; - FRows: TcxGridStructureControlRowsViewInfo; - function GetCanvas: TcxCanvas; - function GetGrid: TcxCustomGrid; - function GetLevelByIndex(AIndex: Integer): TcxGridLevel; - procedure GetLevelInfo(AIndex: Integer; var ALevelText, AViewText: string; var ALevelIndex: Integer; var AIsParent, AIsLast: Boolean); - function GetRowCount: Integer; - public - Bounds: TRect; - constructor Create(AStructureControl: TcxGridStructureControl); - destructor Destroy; override; - procedure Calculate; - - function GetContentColor: TColor; - function GetContentFont: TFont; - function GetContentFontColor: TColor; - function GetGridColor(AHighlighted: Boolean): TColor; - function GetHighlightedFontColor: TColor; - function GetLevelColor(AHighlighted: Boolean): TColor; - function GetRowBorderColor(AColorIndex: TcxGridColorIndex; ASelected, AHighlighted: Boolean): TColor; - function GetRowColor(AColorIndex: TcxGridColorIndex; ASelected, AHighlighted: Boolean): TColor; - function GetRowTextColor(AColorIndex: TcxGridColorIndex; ASelected, AHighlighted: Boolean): TColor; - function GetSelectedColor(AHighlighted: Boolean): TColor; - function GetSelectedFontColor: TColor; - function GetViewColor(AHighlighted: Boolean): TColor; - - procedure Paint; - - property Canvas: TcxCanvas read GetCanvas; - property Grid: TcxCustomGrid read GetGrid; - property StructureControl: TcxGridStructureControl read FStructureControl; - property Rows: TcxGridStructureControlRowsViewInfo read FRows; - end; - - { TcxGridStructureControl } - - TcxGridStructureControlSelectComponentEvent = procedure(AObject: TPersistent; - AClearSelection: Boolean) of object; - - TcxGridStructureControlHitTest = (htNowhere, htLevel, htView); - - TcxGridStructureControlHitInfo = record - HitTest: TcxGridStructureControlHitTest; - RowIndex: Integer; - end; - - TcxGridStructureControl = class(TcxControl) - private - FGrid: TcxCustomGrid; - FHitInfo: TcxGridStructureControlHitInfo; - FLockCount: Integer; - FMayFocused: Boolean; - FMouseDownHitInfo: TcxGridStructureControlHitInfo; - FMousePressed: Boolean; - FMultiSelect: Boolean; - FViewInfo: TcxGridStructureControlViewInfo; - FOnDrawBackground: TNotifyEvent; - FOnSelectComponent: TcxGridStructureControlSelectComponentEvent; - FOnSelectionChanged: TNotifyEvent; - procedure ClearSelection; - procedure SetGrid(Value: TcxCustomGrid); - procedure SetMultiSelect(Value: Boolean); - protected - procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - procedure Paint; override; - - procedure AddToSelection(AObject: TPersistent; AClearSelection: Boolean); - procedure CancelPressed(P: TPoint); - procedure CheckMousePos(P: TPoint); - procedure BoundsChanged; override; - procedure DoDrawBackground; virtual; - procedure FontChanged; override; - function GetComponentByHitInfo(AHitInfo: TcxGridStructureControlHitInfo): TComponent; - function GetCursor(X, Y: Integer): TCursor; override; - function MayFocus: Boolean; override; - procedure MouseLeave(AControl: TControl); override; - procedure SelectComponent(AObject: TPersistent; AClearSelection: Boolean = True); - procedure SelectionChanged; virtual; - procedure SetPressed(APressed: Boolean); - procedure UpdateContent; virtual; - procedure UpdateHighlighted; - property LockCount: Integer read FLockCount; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure BeginUpdate; - procedure Changed; - procedure EndUpdate; - function GetHitInfo(P: TPoint): TcxGridStructureControlHitInfo; - function GetLevelByRowIndex(ARowIndex: Integer): TcxGridLevel; - function GetSelectedLevel: TcxGridLevel; - procedure GetSelection(ASelectionList: TList); - procedure GetSelectionLevels(ASelectionList: TList); - function GetSelectionLevelCount: Integer; -// function GetSelectedView: TcxCustomGridView; - procedure GetSelectionViews(ASelectionList: TList); - function GetSelectionViewCount: Integer; - procedure SyncSelection(ASelectionList: TList); - property Grid: TcxCustomGrid read FGrid write SetGrid; - property Keys; - property MayFocused: Boolean read FMayFocused write FMayFocused; - property MultiSelect: Boolean read FMultiSelect write SetMultiSelect; - property ViewInfo: TcxGridStructureControlViewInfo read FViewInfo; - property OnKeyPress; - property OnDrawBackground: TNotifyEvent read FOnDrawBackground write FOnDrawBackground; - property OnSelectComponent: TcxGridStructureControlSelectComponentEvent read FOnSelectComponent write FOnSelectComponent; - property OnSelectionChanged: TNotifyEvent read FOnSelectionChanged write FOnSelectionChanged; - end; - - { TcxGridStructureHelper } - - TcxGridLevelViewList = class(TcxGridViewList) - private - FLevel: TcxGridLevel; - protected - procedure GetViewNames; override; - public - constructor Create(ALevel: TcxGridLevel); - property Level: TcxGridLevel read FLevel; - end; - - TcxGridStructureHelper = class - private - FPopupMenu: TPopupMenu; - FPopupMenuLevel: TcxGridLevel; - FStructureControl: TcxGridStructureControl; - FOnUpdateDesigner: TNotifyEvent; - procedure CreateLevelClick(Sender: TObject); - procedure CreateViewClick(Sender: TObject); - procedure SelectViewClick(Sender: TObject); - procedure DeleteLevelClick(Sender: TObject); - procedure MoveLevelClick(Sender: TObject); - protected - FPopupMenuView: TcxCustomGridView; - FViewMenuProvider: TcxCustomGridViewMenuProvider; - function CanAddComponent: Boolean; - function CanDeleteComponent(AComponent: TComponent): Boolean; - procedure ExecuteLevelViewsMenuItem(ALevel: TcxGridLevel; AMenuItem: TMenuItem); - procedure FillLevelViewsMenu(AMenu: TMenuItem; ALevel: TcxGridLevel; AOnClick: TNotifyEvent); - procedure StructureControlMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - procedure UpdateDesigner; - public - constructor Create(AStructureControl: TcxGridStructureControl); virtual; - destructor Destroy; override; - property StructureControl: TcxGridStructureControl read FStructureControl; - property OnUpdateDesigner: TNotifyEvent read FOnUpdateDesigner write FOnUpdateDesigner; - end; - - { TcxGridStructureNavigator } - - TcxGridStructureNavigator = class(TcxCustomGridStructureNavigator) - private - FCloseButton: TSpeedButton; - FCustomizeButton: TSpeedButton; - FDefaultLevel: TcxGridLevel; - FDefaultView: TcxCustomGridView; - FDesignHelper: TcxDesignHelper; - FMakeSelectionVisible: Boolean; - FSeparator: TBevel; - FStructureControl: TcxGridStructureControl; - FStructureHelper: TcxGridStructureHelper; - procedure CloseButtonClick(Sender: TObject); - procedure CustomizeButtonClick(Sender: TObject); - procedure UpdateDesigner(Sender: TObject); - procedure CMDeferUpdate(var Message: TMessage); message CM_DeferUpdate; - protected - procedure Paint; override; - procedure Calculate; - function CalculateBoundsRect: TRect; override; - procedure Changed; override; - procedure CreateDefaultComponents; - procedure DrawBackground(ACanvas: TcxCanvas); virtual; - procedure DrawStructureControlBackground(Sender: TObject); - function GetClientBounds: TRect; override; - function GetDefaultViewClass: TcxCustomGridViewClass; virtual; - function GetDesigner: IDesigner; - procedure NotifyEditors; - procedure SelectComponent(AObject: TPersistent; AClearSelection: Boolean); - property MakeSelectionVisible: Boolean read FMakeSelectionVisible write FMakeSelectionVisible; - public - constructor Create(AGrid: TcxCustomGrid); override; - destructor Destroy; override; - procedure BeforeGridLoading; override; - function IsObjectSelected(AObject: TPersistent): Boolean; override; - procedure SelectionChanged(ASelection: TList); override; - procedure SelectObject(AObject: TPersistent; AClearSelection: Boolean); override; - procedure SelectObjects(AObjects: TList); override; - procedure UnselectObject(AObject: TPersistent); override; - end; - -function GenLevelName(AGrid: TcxCustomGrid; ALevel: TcxGridLevel): string; -function GenViewName(AOwnerComponent: TComponent; AView: TcxCustomGridView): string; -procedure FillRegisteredViewsMenu(AMenu: TMenuItem; AOnClick: TNotifyEvent); - -implementation - -uses - Math, dxOffice11, cxLookAndFeelPainters, cxCustomData, cxGridDBTableView, - cxGridEditor, cxLibraryConsts; - -const - ButtonBorderSize = 1; - ButtonOffset = 2; - CloseButtonHeight = 13; - CloseButtonWidth = 14; - FrameBorderSize = 1; - LevelIndent = 16; - RowBorderWidth = 1; - RowOffset = 2; - TextOffset = 2; - NavigatorOffset = 12; - // strings - SCustomizeText = 'Customize...'; // TODO res - SSubStr = 'TcxGrid'; - - cxGridDesignLevelColor = 15851215{16248036}; - cxGridDesignLevelHotColor = 13747387; - cxGridDesignLevelBorderColor = 13547166; - cxGridDesignLevelHotBorderColor = 12033927; - cxGridDesignGridColor = 12639424; - cxGridDesignGridHotColor = 10800292; - cxGridDesignGridBorderColor = 10526880; - cxGridDesignGridHotBorderColor = clDkGray; - -type - TcxCustomGridAccess = class(TcxCustomGrid); - -function GenLevelName(AGrid: TcxCustomGrid; ALevel: TcxGridLevel): string; -begin - Result := CreateUniqueName(AGrid.Owner, AGrid, ALevel, ScxGridPrefixName, ''); -end; - -function GenViewName(AOwnerComponent: TComponent; AView: TcxCustomGridView): string; -begin - Result := CreateUniqueName(AOwnerComponent.Owner, AOwnerComponent, AView, ScxGridPrefixName, ''); -end; - -procedure FillRegisteredViewsMenu(AMenu: TMenuItem; AOnClick: TNotifyEvent); -var - I: Integer; -begin - for I := 0 to cxGridRegisteredViews.Count - 1 do - begin - if (I <> 0) and (Pos('DB', cxGridRegisteredViews.Descriptions[I]) = 1) and - (Pos('DB', cxGridRegisteredViews.Descriptions[I - 1]) <> 1) then - AMenu.Add(CreateMenuItem(AMenu.Owner, '-')); - AMenu.Add(CreateMenuItem(AMenu.Owner, cxGridRegisteredViews.Descriptions[I], - AOnClick, True, I)); - end; -end; - -procedure CreateCloseBitmap(ABitmap: TBitmap); -var - ACanvas: TcxCanvas; - R: TRect; -begin - R := Rect(0, 0, CloseButtonWidth, CloseButtonHeight); - with ABitmap do - begin - Width := R.Right - R.Left; - Height := R.Bottom - R.Top; - Canvas.Brush.Color := clBtnFace; - Canvas.FillRect(R); - ACanvas := TcxCanvas.Create(Canvas); - try - TcxUltraFlatLookAndFeelPainter.DrawButtonCross(ACanvas, R, clBtnText, cxbsNormal); - finally - ACanvas.Free; - end; - end; -end; - -{$IFDEF DELPHI6} - -{ TDesignNotificationHandler } - -type - TDesignNotificationHandler = class(TInterfacedPersistent, IDesignNotification) - private - FGrids: TList; - protected - // IDesignNotification - procedure ItemDeleted(const ADesigner: IDesigner; AItem: TPersistent); - procedure ItemInserted(const ADesigner: IDesigner; AItem: TPersistent); - procedure ItemsModified(const ADesigner: IDesigner); - procedure SelectionChanged(const ADesigner: IDesigner; const ASelection: IDesignerSelections); - procedure DesignerOpened(const ADesigner: IDesigner; AResurrecting: Boolean); - procedure DesignerClosed(const ADesigner: IDesigner; AGoingDormant: Boolean); - public - constructor Create; virtual; - destructor Destroy; override; - procedure RegisterGrid(AGrid: TcxCustomGrid); - procedure UnregisterGrid(AGrid: TcxCustomGrid); - end; - -var - DesignNotificationHandler: TDesignNotificationHandler; - -constructor TDesignNotificationHandler.Create; -begin - inherited; - FGrids := TList.Create; - RegisterDesignNotification(Self); -end; - -destructor TDesignNotificationHandler.Destroy; -begin - UnregisterDesignNotification(Self); - FGrids.Free; - inherited; -end; - -procedure TDesignNotificationHandler.ItemDeleted(const ADesigner: IDesigner; - AItem: TPersistent); -begin -end; - -procedure TDesignNotificationHandler.ItemInserted(const ADesigner: IDesigner; - AItem: TPersistent); -begin -end; - -procedure TDesignNotificationHandler.ItemsModified(const ADesigner: IDesigner); -begin -end; - -procedure TDesignNotificationHandler.SelectionChanged(const ADesigner: IDesigner; - const ASelection: IDesignerSelections); -var - ASelectionList: TList; - I: Integer; -begin - ASelectionList := TList.Create; - try - ConvertSelectionToList(ASelection, ASelectionList); - for I := 0 to FGrids.Count - 1 do - TcxCustomGrid(FGrids[I]).StructureNavigator.SelectionChanged(ASelectionList); - finally - ASelectionList.Free; - end; -end; - -procedure TDesignNotificationHandler.DesignerOpened(const ADesigner: IDesigner; - AResurrecting: Boolean); -begin -end; - -procedure TDesignNotificationHandler.DesignerClosed(const ADesigner: IDesigner; - AGoingDormant: Boolean); -begin -end; - -procedure TDesignNotificationHandler.RegisterGrid(AGrid: TcxCustomGrid); -begin - FGrids.Add(AGrid); -end; - -procedure TDesignNotificationHandler.UnregisterGrid(AGrid: TcxCustomGrid); -begin - FGrids.Remove(AGrid); -end; - -{$ENDIF} - -{ TcxGridStructureControlRowsViewInfo } - -function TcxGridStructureControlRowsViewInfo.GetItem(Index: Integer): TcxGridStructureControlRowViewInfo; -begin - Result := TcxGridStructureControlRowViewInfo(inherited Items[Index]); -end; - -{ TcxGridStructureControlViewInfo } - -constructor TcxGridStructureControlViewInfo.Create(AStructureControl: TcxGridStructureControl); -begin - inherited Create; - FStructureControl := AStructureControl; - FRows := TcxGridStructureControlRowsViewInfo.Create; -end; - -destructor TcxGridStructureControlViewInfo.Destroy; -begin - FRows.Free; - FreeAndNil(FCanvas); - inherited Destroy; -end; - -procedure TcxGridStructureControlViewInfo.Calculate; -var - ASelection: TList; - W, H: Integer; - I, ALevelOffset, ATop: Integer; - ARow: TcxGridStructureControlRowViewInfo; -begin - // TODO: ref - if Grid = nil then Exit; - ASelection := TList.Create; - try - // save selection - StructureControl.GetSelection(ASelection); - // Init - Canvas.Font := GetContentFont; - FTextHeight := Canvas.TextHeight('Wg'); - FRowHeight := 2 * RowOffset + 2 * RowBorderWidth + 2 * TextOffset + FTextHeight; - // Rows - FRows.Clear; - H := GetRowCount * FRowHeight; - Bounds := Rect(0, 0, 0, H); - ATop := 0; - for I := 0 to GetRowCount - 1 do - begin - ARow := TcxGridStructureControlRowViewInfo.Create; - GetLevelInfo(I, ARow.LevelText, ARow.ViewText, ARow.TreeLineVertCount, - ARow.TreeLineIsParent, ARow.TreeLineIsLast); - // Level - ARow.LevelTextArea := Rect(0, ATop, Canvas.TextWidth(ARow.LevelText), ATop + FTextHeight); - OffsetRect(ARow.LevelTextArea, TextOffset, TextOffset); - ARow.LevelContentBounds := ARow.LevelTextArea; - InflateRect(ARow.LevelContentBounds, TextOffset, TextOffset); - OffsetRect(ARow.LevelTextArea, RowBorderWidth, RowBorderWidth); - OffsetRect(ARow.LevelContentBounds, RowBorderWidth, RowBorderWidth); - ARow.LevelBounds := ARow.LevelContentBounds; - InflateRect(ARow.LevelBounds, RowBorderWidth, RowBorderWidth); - ARow.Bounds := ARow.LevelBounds; - OffsetRect(ARow.LevelBounds, RowOffset, RowOffset); - OffsetRect(ARow.LevelContentBounds, RowOffset, RowOffset); - OffsetRect(ARow.LevelTextArea, RowOffset, RowOffset); - //InflateRect(ARow.Bounds, RowOffset, RowOffset); - OffsetRect(ARow.Bounds, RowOffset, RowOffset); - // Indent - ALevelOffset := ARow.TreeLineVertCount * (LevelIndent + RowOffset); - OffsetRect(ARow.LevelBounds, ALevelOffset, 0); - OffsetRect(ARow.LevelContentBounds, ALevelOffset, 0); - OffsetRect(ARow.LevelTextArea, ALevelOffset, 0); - OffsetRect(ARow.Bounds, ALevelOffset, 0); - // View - if (I > 0) and (ARow.ViewText <> '') then - begin - W := 2 * RowBorderWidth + 2 * TextOffset + Canvas.TextWidth(ARow.ViewText); - ARow.ViewBounds := Rect(ARow.LevelBounds.Right - RowBorderWidth, ARow.LevelBounds.Top, - ARow.LevelBounds.Right - RowBorderWidth + W, ARow.LevelBounds.Bottom); - ARow.ViewContentBounds := ARow.ViewBounds; - InflateRect(ARow.ViewContentBounds, -RowBorderWidth, -RowBorderWidth); - ARow.ViewTextArea := ARow.ViewContentBounds; - InflateRect(ARow.ViewTextArea, -TextOffset, -TextOffset); - Inc(ARow.Bounds.Right, W - RowBorderWidth); - end; - FRows.Add(ARow); - Bounds.Right := Max(Bounds.Right, ARow.Bounds.Right + RowOffset); - Inc(ATop, FRowHeight); - end; - Bounds.Bottom := ATop; - // restore selection - StructureControl.SyncSelection(ASelection); - finally - ASelection.Free; - end; -end; - -function TcxGridStructureControlViewInfo.GetContentColor: TColor; -begin - Result := clWhite; -end; - -function TcxGridStructureControlViewInfo.GetContentFont: TFont; -begin - Result := StructureControl.Font; -end; - -function TcxGridStructureControlViewInfo.GetContentFontColor: TColor; -begin - Result := clBlack; -end; - -function TcxGridStructureControlViewInfo.GetGridColor(AHighlighted: Boolean): TColor; -begin - if AHighlighted then - Result := cxGridDesignGridHotColor - else - Result := cxGridDesignGridColor; -end; - -function TcxGridStructureControlViewInfo.GetHighlightedFontColor: TColor; -begin - Result := GetContentFontColor; -end; - -function TcxGridStructureControlViewInfo.GetLevelColor(AHighlighted: Boolean): TColor; -begin - if AHighlighted then - Result := cxGridDesignLevelHotColor - else - Result := cxGridDesignLevelColor; -end; - -function TcxGridStructureControlViewInfo.GetRowBorderColor(AColorIndex: TcxGridColorIndex; - ASelected, AHighlighted: Boolean): TColor; -begin - if ASelected then - if AHighlighted then - Result := cxGridDesignSelectedHotBorderColor - else - Result := cxGridDesignSelectedBorderColor - else - case AColorIndex of - ciLevel: - if AHighlighted then - Result := cxGridDesignLevelHotBorderColor - else - Result := cxGridDesignLevelBorderColor; - ciView: - Result := cxGridDesignViewBorderColor; - else - if AHighlighted then - Result := cxGridDesignGridHotBorderColor - else - Result := cxGridDesignGridBorderColor; - end; -end; - -function TcxGridStructureControlViewInfo.GetRowColor(AColorIndex: TcxGridColorIndex; - ASelected, AHighlighted: Boolean): TColor; -begin - if ASelected then - Result := GetSelectedColor(AHighlighted) - else - case AColorIndex of - ciLevel: - Result := GetLevelColor(AHighlighted); - ciView: - Result := GetViewColor(AHighlighted); - else - Result := GetGridColor(AHighlighted); - end; -end; - -function TcxGridStructureControlViewInfo.GetRowTextColor(AColorIndex: TcxGridColorIndex; - ASelected, AHighlighted: Boolean): TColor; -begin - if ASelected then - Result := GetSelectedFontColor - else - if AHighlighted then - Result := GetHighlightedFontColor - else - Result := GetContentFontColor; -end; - -function TcxGridStructureControlViewInfo.GetSelectedColor(AHighlighted: Boolean): TColor; -begin - if AHighlighted then - Result := cxGridDesignSelectedHotColor - else - Result := cxGridDesignSelectedColor; -end; - -function TcxGridStructureControlViewInfo.GetSelectedFontColor: TColor; -begin - Result := GetContentFontColor; -end; - -function TcxGridStructureControlViewInfo.GetViewColor(AHighlighted: Boolean): TColor; -begin - if AHighlighted then - Result := cxGridDesignViewHotColor - else - Result := cxGridDesignViewColor; -end; - -procedure TcxGridStructureControlViewInfo.Paint; - - procedure SetFontAndBrush(ASelected, AHighlighted: Boolean; AColorIndex: TcxGridColorIndex); - begin - Canvas.Brush.Color := GetRealColor(GetRowColor(AColorIndex, ASelected, AHighlighted)); - Canvas.Font.Color := GetRealColor(GetRowTextColor(AColorIndex, ASelected, AHighlighted)); - {if AHighlighted then - Canvas.Font.Style := Canvas.Font.Style + [fsUnderline] - else - Canvas.Font.Style := Canvas.Font.Style - [fsUnderline];} - end; - - procedure DrawCell(ACellRect, ATextRect: TRect; const AText: string); - begin - Canvas.FillRect(ACellRect); - Canvas.Brush.Style := bsClear; - Canvas.DrawText(AText, ATextRect, cxAlignLeft or cxAlignVCenter or cxSingleLine); - Canvas.Brush.Style := bsSolid; - end; - - procedure DrawRows; - var - I: Integer; - ARow: TcxGridStructureControlRowViewInfo; - AColorIndex: TcxGridColorIndex; - begin - for I := 0 to Rows.Count - 1 do - begin - ARow := Rows[I]; - // Level - if I = 0 then - AColorIndex := ciGrid - else - AColorIndex := ciLevel; - Canvas.FrameRect(ARow.LevelBounds, - GetRealColor(GetRowBorderColor(AColorIndex, ARow.LevelSelected, ARow.LevelHighlighted)), - RowBorderWidth); - SetFontAndBrush(ARow.LevelSelected, ARow.LevelHighlighted, AColorIndex); - DrawCell(ARow.LevelContentBounds, ARow.LevelTextArea, ARow.LevelText); - // View - if not IsRectEmpty(ARow.ViewBounds) then - begin - Canvas.FrameRect(ARow.ViewBounds, - GetRealColor(GetRowBorderColor(ciView, ARow.ViewSelected, ARow.ViewHighlighted)), - RowBorderWidth); - SetFontAndBrush(ARow.ViewSelected, ARow.ViewHighlighted, ciView); - DrawCell(ARow.ViewContentBounds, ARow.ViewTextArea, ARow.ViewText); - end; - Canvas.ExcludeClipRect(ARow.Bounds); - end; - end; - -begin - // Rows - Canvas.Font := GetContentFont; - DrawRows; - // Background - StructureControl.DoDrawBackground; -end; - -function TcxGridStructureControlViewInfo.GetCanvas: TcxCanvas; -begin - if StructureControl.HandleAllocated then - begin - if FCanvas <> nil then - FreeAndNil(FCanvas); - Result := StructureControl.Canvas; - end - else - begin - if FCanvas = nil then - FCanvas := TcxScreenCanvas.Create; - Result := FCanvas; - end; -end; - -function TcxGridStructureControlViewInfo.GetGrid: TcxCustomGrid; -begin - Result := StructureControl.Grid; -end; - -function TcxGridStructureControlViewInfo.GetLevelByIndex(AIndex: Integer): TcxGridLevel; -var - ACurrent: Integer; - - procedure CalculateCount(ALevel: TcxGridLevel); - var - I: Integer; - begin - if ALevel = nil then Exit; - if ACurrent = AIndex then - Result := ALevel - else - begin - Inc(ACurrent); - for I := 0 to ALevel.Count - 1 do - begin - CalculateCount(ALevel[I]); - if Result <> nil then - Break; - end; - end; - end; - -begin - Result := nil; - ACurrent := 0; - if (Grid <> nil) and (Grid.Levels <> nil) then - CalculateCount(Grid.Levels); -end; - -procedure TcxGridStructureControlViewInfo.GetLevelInfo(AIndex: Integer; - var ALevelText, AViewText: string; var ALevelIndex: Integer; - var AIsParent, AIsLast: Boolean); - - function GetCompName(AComponent: TComponent): string; - begin - Result := AComponent.Name; - if Result = '' then - Result := '< >'; - end; - -var - ALevel: TcxGridLevel; -begin - ALevelText := ''; - AViewText := ''; - ALevelIndex := 0; - AIsParent := False; - AIsLast := False; - ALevel := GetLevelByIndex(AIndex); - if ALevel <> nil then - begin - AIsParent := ALevel.Count > 0; - AIsLast := (ALevel.Parent <> nil) and - (ALevel.Parent[ALevel.Parent.Count - 1] = ALevel); - if ALevel.IsRoot then // TODO: IsRoot - ALevelText := GetCompName(Grid) - else - begin - ALevelText := GetCompName(ALevel); - if ALevel.GridView <> nil then - AViewText := GetCompName(ALevel.GridView); - end; - end; - ALevelIndex := 0; - while ALevel <> nil do - begin - if ALevel.IsRoot then // TODO: IsRoot - Break - else - begin - Inc(ALevelIndex); - ALevel := ALevel.Parent; - end; - end; -end; - -function TcxGridStructureControlViewInfo.GetRowCount: Integer; - - procedure CalculateCount(ALevel: TcxGridLevel); - var - I: Integer; - begin - Inc(Result, ALevel.Count); - for I := 0 to ALevel.Count - 1 do - CalculateCount(ALevel[I]); - end; - -begin - if Grid = nil then - Result := 0 - else - begin - Result := 1; // Root - if Grid.Levels <> nil then - CalculateCount(Grid.Levels); - end; -end; - -{ TcxGridStructureControl } - -constructor TcxGridStructureControl.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FViewInfo := TcxGridStructureControlViewInfo.Create(Self); -end; - -destructor TcxGridStructureControl.Destroy; -begin - FreeAndNil(FViewInfo); - inherited Destroy; -end; - -procedure TcxGridStructureControl.BeginUpdate; -begin - Inc(FLockCount); -end; - -procedure TcxGridStructureControl.Changed; -begin - if LockCount = 0 then - UpdateContent; -end; - -procedure TcxGridStructureControl.EndUpdate; -begin - Dec(FLockCount); - Changed; -end; - -function TcxGridStructureControl.GetHitInfo(P: TPoint): TcxGridStructureControlHitInfo; -var - I: Integer; -begin - Result.HitTest := htNowhere; - Result.RowIndex := -1; - for I := 0 to ViewInfo.Rows.Count - 1 do - if PtInRect(ViewInfo.Rows[I].Bounds, P) then - begin - Result.RowIndex := I; - if PtInRect(ViewInfo.Rows[I].LevelBounds, P) then - begin - Result.HitTest := htLevel; - Break; - end - else - if PtInRect(ViewInfo.Rows[I].ViewBounds, P) then - begin - Result.HitTest := htView; - Break; - end; - end; -end; - -function TcxGridStructureControl.GetLevelByRowIndex(ARowIndex: Integer): TcxGridLevel; -begin - Result := ViewInfo.GetLevelByIndex(ARowIndex); -end; - -function TcxGridStructureControl.GetSelectedLevel: TcxGridLevel; -var - ASelectionList: TList; -begin - Result := nil; - ASelectionList := TList.Create; - try - GetSelectionLevels(ASelectionList); - if ASelectionList.Count = 1 then - Result := TcxGridLevel(ASelectionList[0]); - finally - ASelectionList.Free; - end; -end; - -procedure TcxGridStructureControl.GetSelection(ASelectionList: TList); -var - I: Integer; - ALevel: TcxGridLevel; -begin - ASelectionList.Clear; - for I := 0 to ViewInfo.Rows.Count - 1 do - begin - ALevel := ViewInfo.GetLevelByIndex(I); - if Assigned(ALevel) then - begin - if ViewInfo.Rows[I].LevelSelected then - begin - if ALevel.IsRoot then // TODO: IsRoot - ASelectionList.Add(Grid) - else - ASelectionList.Add(ALevel); - end; - if ViewInfo.Rows[I].ViewSelected and (ALevel.GridView <> nil) then - ASelectionList.Add(ALevel.GridView); - end; - end; -end; - -procedure TcxGridStructureControl.GetSelectionLevels(ASelectionList: TList); -var - I: Integer; -begin - GetSelection(ASelectionList); - for I := ASelectionList.Count - 1 downto 0 do - if not (TObject(ASelectionList[I]) is TcxGridLevel) then - ASelectionList.Delete(I); -end; - -function TcxGridStructureControl.GetSelectionLevelCount: Integer; -var - ASelectionList: TList; -begin - ASelectionList := TList.Create; - try - GetSelectionLevels(ASelectionList); - Result := ASelectionList.Count; - finally - ASelectionList.Free; - end; -end; - -procedure TcxGridStructureControl.GetSelectionViews(ASelectionList: TList); -var - I: Integer; -begin - GetSelection(ASelectionList); - for I := ASelectionList.Count - 1 downto 0 do - if not (TObject(ASelectionList[I]) is TcxCustomGridView) then - ASelectionList.Delete(I); -end; - -function TcxGridStructureControl.GetSelectionViewCount: Integer; -var - ASelectionList: TList; -begin - ASelectionList := TList.Create; - try - GetSelectionViews(ASelectionList); - Result := ASelectionList.Count; - finally - ASelectionList.Free; - end; -end; - -procedure TcxGridStructureControl.SyncSelection(ASelectionList: TList); - - procedure CheckLevel(ARow: TcxGridStructureControlRowViewInfo; AComponent: TComponent); - var - ASelected: Boolean; - begin - ASelected := ASelectionList.IndexOf(AComponent) <> -1; - if ARow.LevelSelected <> ASelected then - begin - ARow.LevelSelected := ASelected; - InvalidateRect(ARow.LevelBounds, False); - end; - end; - - procedure CheckView(ARow: TcxGridStructureControlRowViewInfo; AComponent: TComponent); - var - ASelected: Boolean; - begin - ASelected := ASelectionList.IndexOf(AComponent) <> -1; - if ARow.ViewSelected <> ASelected then - begin - ARow.ViewSelected := ASelected; - InvalidateRect(ARow.ViewBounds, False); - end; - end; - -var - I: Integer; - ALevel: TcxGridLevel; -begin - for I := 0 to ViewInfo.Rows.Count - 1 do - begin - ALevel := ViewInfo.GetLevelByIndex(I); - if Assigned(ALevel) then - if ALevel.IsRoot then // TODO: IsRoot - CheckLevel(ViewInfo.Rows[I], Grid) - else - begin - CheckLevel(ViewInfo.Rows[I], ALevel); - if ALevel.GridView <> nil then - CheckView(ViewInfo.Rows[I], ALevel.GridView); - end; - end; -end; - -procedure TcxGridStructureControl.MouseDown(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); -var - AComponent: TComponent; -begin - FMouseDownHitInfo := GetHitInfo(Point(X, Y)); - if Button in [mbLeft, mbRight] then - begin - AComponent := GetComponentByHitInfo(FMouseDownHitInfo); - if AComponent <> nil then - SelectComponent(AComponent, (Button = mbRight) or not MultiSelect or not (ssShift in Shift)); - SetPressed(True); - CheckMousePos(Point(X, Y)); - end; - inherited; -end; - -procedure TcxGridStructureControl.MouseMove(Shift: TShiftState; X, Y: Integer); -begin - inherited; - CheckMousePos(Point(X, Y)); -end; - -procedure TcxGridStructureControl.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -begin - inherited; - if Button in [mbLeft, mbRight] then - CancelPressed(Point(X, Y)); -end; - -procedure TcxGridStructureControl.Paint; -begin - ViewInfo.Paint; -end; - -procedure TcxGridStructureControl.AddToSelection(AObject: TPersistent; AClearSelection: Boolean); - - function IsEquals(AList1, AList2: TList): Boolean; - var - I: Integer; - begin - Result := AList1.Count = AList2.Count; - if Result then - for I := 0 to AList1.Count - 1 do - if AList1[I] <> AList2[I] then - begin - Result := False; - Break; - end; - end; - -var - APrevSelection, ASelection: TList; -begin - APrevSelection := TList.Create; - ASelection := TList.Create; - try - GetSelection(APrevSelection); - if not AClearSelection then - GetSelection(ASelection); - if (AObject <> nil) and (ASelection.Remove(AObject) = -1) then - ASelection.Add(AObject); - if not IsEquals(ASelection, APrevSelection) then - begin - SyncSelection(ASelection); - SelectionChanged; - end; - finally - ASelection.Free; - APrevSelection.Free; - end; -end; - -procedure TcxGridStructureControl.CancelPressed(P: TPoint); -begin - SetPressed(False); - CheckMousePos(P); -end; - -procedure TcxGridStructureControl.CheckMousePos(P: TPoint); -begin - FHitInfo := GetHitInfo(P); - UpdateHighlighted; -end; - -procedure TcxGridStructureControl.BoundsChanged; -begin - inherited; - Changed; -end; - -procedure TcxGridStructureControl.DoDrawBackground; -begin - if Assigned(FOnDrawBackground) then - FOnDrawBackground(Self) - else - begin - Canvas.Brush.Color := ViewInfo.GetContentColor; - Canvas.FillRect(ClientRect); - end; -end; - -procedure TcxGridStructureControl.FontChanged; -begin - inherited; - Changed; -end; - -function TcxGridStructureControl.GetComponentByHitInfo(AHitInfo: TcxGridStructureControlHitInfo): TComponent; -var - ALevel: TcxGridLevel; -begin - Result := nil; - if AHitInfo.RowIndex = -1 then Exit; - ALevel := ViewInfo.GetLevelByIndex(AHitInfo.RowIndex); - if ALevel = nil then Exit; - if AHitInfo.HitTest = htLevel then - begin - if ALevel.IsRoot then // TODO - Result := Grid - else - Result := ALevel; - end - else - if AHitInfo.HitTest = htView then - begin - if ALevel.GridView <> nil then - Result := ALevel.GridView; - end; -end; - -function TcxGridStructureControl.GetCursor(X, Y: Integer): TCursor; -begin - if GetHitInfo(Point(X, Y)).HitTest in [htLevel, htView] then - Result := crcxHandPoint - else - Result := inherited GetCursor(X, Y); -end; - -function TcxGridStructureControl.MayFocus: Boolean; -begin - Result := FMayFocused; -end; - -procedure TcxGridStructureControl.MouseLeave(AControl: TControl); -begin - CheckMousePos(Point(-1, -1)); -end; - -procedure TcxGridStructureControl.SelectComponent(AObject: TPersistent; - AClearSelection: Boolean = True); -begin -{$IFNDEF DELPHI6} - if not Assigned(FOnSelectComponent) then -{$ENDIF} - AddToSelection(AObject, AClearSelection); - if Assigned(FOnSelectComponent) then - FOnSelectComponent(AObject, AClearSelection); -end; - -procedure TcxGridStructureControl.SelectionChanged; -begin - if Assigned(FOnSelectionChanged) then - FOnSelectionChanged(Self); -end; - -procedure TcxGridStructureControl.SetPressed(APressed: Boolean); -begin - if FMousePressed <> APressed then - begin - FMousePressed := APressed; - // TODO - end; -end; - -procedure TcxGridStructureControl.UpdateContent; -begin - ViewInfo.Calculate; - Invalidate; -end; - -procedure TcxGridStructureControl.UpdateHighlighted; - - procedure CheckLevel(ARow: TcxGridStructureControlRowViewInfo; AHighlighted: Boolean); - begin - if ARow.LevelHighlighted <> AHighlighted then - begin - ARow.LevelHighlighted := AHighlighted; - InvalidateRect(ARow.LevelBounds, False); - end; - end; - - procedure CheckView(ARow: TcxGridStructureControlRowViewInfo; AHighlighted: Boolean); - begin - if ARow.ViewHighlighted <> AHighlighted then - begin - ARow.ViewHighlighted := AHighlighted; - InvalidateRect(ARow.ViewBounds, False); - end; - end; - -var - I: Integer; - AHitInfo: TcxGridStructureControlHitInfo; -begin - for I := 0 to ViewInfo.Rows.Count - 1 do - begin - if FMousePressed then - AHitInfo := FMouseDownHitInfo - else - AHitInfo := FHitInfo; - if AHitInfo.HitTest = htLevel then - begin - CheckLevel(ViewInfo.Rows[I], (AHitInfo.RowIndex = I)); - CheckView(ViewInfo.Rows[I], False); - end - else - if AHitInfo.HitTest = htView then - begin - CheckLevel(ViewInfo.Rows[I], False); - CheckView(ViewInfo.Rows[I], (AHitInfo.RowIndex = I)); - end - else - begin - CheckLevel(ViewInfo.Rows[I], False); - CheckView(ViewInfo.Rows[I], False); - end; - end; -end; - -procedure TcxGridStructureControl.ClearSelection; -begin - AddToSelection(nil, True); -end; - -procedure TcxGridStructureControl.SetGrid(Value: TcxCustomGrid); -begin - if FGrid <> Value then - begin - FGrid := Value; - Changed; - end; -end; - -procedure TcxGridStructureControl.SetMultiSelect(Value: Boolean); -begin - if FMultiSelect <> Value then - begin - FMultiSelect := Value; - ClearSelection; - end; -end; - -{ TcxGridLevelViewList } - -constructor TcxGridLevelViewList.Create(ALevel: TcxGridLevel); -begin - FLevel := ALevel; - inherited Create(GetObjectDesigner(ALevel)); -end; - -procedure TcxGridLevelViewList.GetViewNames; -var - I: Integer; - AView: TcxCustomGridView; -begin - inherited; - for I := ViewNames.Count - 1 downto 0 do - begin - AView := Views[I]; - if (AView.Repository = nil) and (AView.StorageControl <> Level.Control) then - ViewNames.Delete(I); - end; -end; - -{ TcxGridStructureHelper } - -constructor TcxGridStructureHelper.Create(AStructureControl: TcxGridStructureControl); -begin - inherited Create; - FStructureControl := AStructureControl; - FStructureControl.OnMouseDown := StructureControlMouseDown; -end; - -destructor TcxGridStructureHelper.Destroy; -begin - FViewMenuProvider.Free; - FreeAndNil(FPopupMenu); - inherited Destroy; -end; - -function TcxGridStructureHelper.CanAddComponent: Boolean; -begin - Result := cxDesignWindows.CanAddComponent(StructureControl.Grid.Owner); -end; - -function TcxGridStructureHelper.CanDeleteComponent(AComponent: TComponent): Boolean; -var - AOwner: TComponent; -begin - if AComponent = nil then - AOwner := StructureControl.Grid.Owner - else - AOwner := AComponent.Owner; - Result := cxDesignWindows.CanDeleteComponent(AOwner, AComponent); -end; - -procedure TcxGridStructureHelper.ExecuteLevelViewsMenuItem(ALevel: TcxGridLevel; AMenuItem: TMenuItem); -var - ALevelViewList: TcxGridLevelViewList; - AView: TcxCustomGridView; -begin - ALevelViewList := TcxGridLevelViewList.Create(ALevel); - try - AView := ALevelViewList.Views[AMenuItem.MenuIndex]; - if ALevel.GridView <> AView then - begin - ALevel.GridView := AView; - UpdateDesigner; - end; - finally - ALevelViewList.Free; - end; -end; - -procedure TcxGridStructureHelper.FillLevelViewsMenu(AMenu: TMenuItem; - ALevel: TcxGridLevel; AOnClick: TNotifyEvent); -var - ALevelViewList: TcxGridLevelViewList; - I: Integer; -begin - ALevelViewList := TcxGridLevelViewList.Create(ALevel); - try - for I := 0 to ALevelViewList.ViewNames.Count - 1 do - AMenu.Add(CreateMenuItem(AMenu.Owner, ALevelViewList.ViewNames[I], AOnClick)); - if ALevel.GridView <> nil then - AMenu[ALevelViewList.GetViewIndex(ALevel.GridView)].Checked := True; - finally - ALevelViewList.Free; - end; - AMenu.Add(CreateMenuItem(AMenu.Owner, '-')); - AMenu.Add(CreateMenuItem(AMenu.Owner, 'None', AOnClick, True, -1, ALevel.GridView = nil)); -end; - -procedure TcxGridStructureHelper.StructureControlMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - - function IsViewEmpty(AView: TcxCustomGridView): Boolean; - begin - Result := AView.DataController.ItemCount = 0; - end; - - procedure PrepareGridMenu; - begin - FPopupMenu.Items.Add(CreateMenuItem(FPopupMenu, 'Add Level', CreateLevelClick, - CanAddComponent)); - end; - - procedure PrepareLevelMenu; - var - AMenuItem: TMenuItem; - begin - AMenuItem := CreateMenuItem(FPopupMenu, 'Create View', nil, CanAddComponent); - FPopupMenu.Items.Add(AMenuItem); - FillRegisteredViewsMenu(AMenuItem, CreateViewClick); - - AMenuItem := CreateMenuItem(FPopupMenu, 'Select View'); - FPopupMenu.Items.Add(AMenuItem); - FillLevelViewsMenu(AMenuItem, FPopupMenuLevel, SelectViewClick); - - PrepareGridMenu; - FPopupMenu.Items.Add(CreateMenuItem(FPopupMenu, '-')); - FPopupMenu.Items.Add(CreateMenuItem(FPopupMenu, 'Delete Level', - DeleteLevelClick, CanDeleteComponent(FPopupMenuLevel))); - FPopupMenu.Items.Add(CreateMenuItem(FPopupMenu, '-')); - FPopupMenu.Items.Add(CreateMenuItem(FPopupMenu, 'Move Level Up', MoveLevelClick, - FPopupMenuLevel.Index > 0, -1)); - FPopupMenu.Items.Add(CreateMenuItem(FPopupMenu, 'Move Level Down', MoveLevelClick, - FPopupMenuLevel.Index < FPopupMenuLevel.Parent.Count - 1, 1)); - end; - - function PrepareViewMenu(AView: TcxCustomGridView): TcxCustomGridViewMenuProvider; - var - I: Integer; - AMenuItem: TMenuItem; - begin - FPopupMenuView := AView; - Result := CreateViewMenuProvider(AView); - if Result = nil then Exit; - for I := 0 to Result.Items.Count - 1 do - begin - AMenuItem := CreateMenuItem(FPopupMenu, ''); - Result.Items[I].Prepare(AMenuItem); - FPopupMenu.Items.Add(AMenuItem); - end; - end; - -var - AHitInfo: TcxGridStructureControlHitInfo; - P: TPoint; -begin - if Button <> mbRight then Exit; - P := Point(X, Y); - AHitInfo := FStructureControl.GetHitInfo(P); - if AHitInfo.HitTest <> htNowhere then - begin - if FPopupMenu = nil then - FPopupMenu := TPopupMenu.Create(nil); - while FPopupMenu.Items.Count > 0 do - FPopupMenu.Items[0].Free; - - FPopupMenuLevel := FStructureControl.GetLevelByRowIndex(AHitInfo.RowIndex); - if FPopupMenuLevel <> nil then - begin - if FPopupMenuLevel.IsRoot then - PrepareGridMenu - else - if AHitInfo.HitTest = htLevel then - PrepareLevelMenu - else - begin - FViewMenuProvider.Free; - FViewMenuProvider := PrepareViewMenu(FPopupMenuLevel.GridView); - end; - P := FStructureControl.ClientToScreen(P); - FPopupMenu.Popup(P.X, P.Y); - FStructureControl.CancelPressed(Point(-1, -1)); - end; - end; -end; - -procedure TcxGridStructureHelper.UpdateDesigner; -begin - if Assigned(FOnUpdateDesigner) then - FOnUpdateDesigner(Self); -end; - -procedure TcxGridStructureHelper.CreateLevelClick(Sender: TObject); -var - ALevel: TcxGridLevel; -begin - StructureControl.BeginUpdate; - try - ALevel := FPopupMenuLevel.Add; - ALevel.Name := GenLevelName(StructureControl.Grid, ALevel); - StructureControl.SelectComponent(ALevel); - UpdateDesigner; - finally - StructureControl.EndUpdate; - end; -end; - -procedure TcxGridStructureHelper.CreateViewClick(Sender: TObject); -var - AViewClass: TcxCustomGridViewClass; - AView: TcxCustomGridView; -begin - AViewClass := TcxCustomGridViewClass( - cxGridRegisteredViews[((Sender as TMenuItem).Tag)]); - StructureControl.BeginUpdate; - try - AView := StructureControl.Grid.CreateView(AViewClass); - AView.Name := GenViewName(StructureControl.Grid, AView); - RestoreViewFromTemplate(GetViewTemplateRegKey, AView); - FPopupMenuLevel.GridView := AView; - StructureControl.SelectComponent(AView); - UpdateDesigner; - finally - StructureControl.EndUpdate; - end; -end; - -procedure TcxGridStructureHelper.SelectViewClick(Sender: TObject); -begin - ExecuteLevelViewsMenuItem(FPopupMenuLevel, Sender as TMenuItem); -end; - -procedure TcxGridStructureHelper.DeleteLevelClick(Sender: TObject); -begin - StructureControl.BeginUpdate; - try - StructureControl.SelectComponent(FPopupMenuLevel.GetParentComponent); - FPopupMenuLevel.Free; - UpdateDesigner; - finally - StructureControl.EndUpdate; - end; -end; - -procedure TcxGridStructureHelper.MoveLevelClick(Sender: TObject); -var - ASelection: TList; -begin - ASelection := TList.Create; - try - StructureControl.GetSelection(ASelection); - FPopupMenuLevel.Index := FPopupMenuLevel.Index + Integer(TMenuItem(Sender).Tag); - UpdateDesigner; - StructureControl.SyncSelection(ASelection); - finally - ASelection.Free; - end; -end; - -{ TcxGridStructureNavigator } - -constructor TcxGridStructureNavigator.Create(AGrid: TcxCustomGrid); -begin - inherited; - FMakeSelectionVisible := True; - FStructureControl := TcxGridStructureControl.Create(Self); - with FStructureControl do - begin - SetBounds(0, 0, 0, 0); - Grid := Self.Grid; - {$IFDEF DELPHI6} - MultiSelect := True; - {$ENDIF} - OnDrawBackground := DrawStructureControlBackground; - OnSelectComponent := Self.SelectComponent; - Parent := Self; - end; - FStructureHelper := TcxGridStructureHelper.Create(FStructureControl); - FStructureHelper.OnUpdateDesigner := UpdateDesigner; - FCloseButton := TSpeedButton.Create(Self); - with FCloseButton do - begin - CreateCloseBitmap(Glyph); - Flat := True; - SetBounds(0, 0, 0, 0); - OnClick := CloseButtonClick; - Parent := Self; - end; - FCustomizeButton := TSpeedButton.Create(Self); - with FCustomizeButton do - begin - Caption := SCustomizeText; - Flat := True; - SetBounds(0, 0, 0, 0); - OnClick := CustomizeButtonClick; - Parent := Self; - end; - FSeparator := TBevel.Create(Self); - with FSeparator do - begin - Shape := bsTopLine; - SetBounds(0, 0, 0, 0); - Parent := Self; - end; - CreateDefaultComponents; - FDesignHelper := TcxDesignHelper.Create(Grid); -{$IFDEF DELPHI6} - DesignNotificationHandler.RegisterGrid(Grid); -{$ENDIF} -end; - -destructor TcxGridStructureNavigator.Destroy; -begin -{$IFDEF DELPHI6} - DesignNotificationHandler.UnregisterGrid(Grid); -{$ENDIF} - FreeAndNil(FDesignHelper); - FreeAndNil(FStructureHelper); - inherited Destroy; -end; - -procedure TcxGridStructureNavigator.Paint; -begin - // Border - Canvas.FrameRect(ClientRect, clWindowFrame, FrameBorderSize); - // Background - DrawBackground(Canvas); -end; - -(* -procedure TcxGridStructureNavigator.Calculate; -var - R: TRect; - ACanvas: TcxCanvas; - ACloseButtonSize: TSize; - ACloseButtonArea: TRect; - ACustomizeButtonArea: TRect; - ASeparatorArea: TRect; - ASeparatorHeight: Integer; -begin - FStructureControl.ViewInfo.Calculate; - R := FStructureControl.ViewInfo.Bounds; - OffsetRect(R, FrameBorderSize, FrameBorderSize); - FStructureControl.BoundsRect := R; - // Calc Customize Button - ASeparatorHeight := ButtonOffset * 2; - ACanvas := FStructureControl.ViewInfo.Canvas; - ACanvas.Font := FCustomizeButton.Font; - ACloseButtonSize.cx := 2 * TextOffset + ACanvas.TextWidth(SCustomizeText) + 2 * ButtonBorderSize; - ACloseButtonSize.cy := 2 * TextOffset + ACanvas.TextHeight(SCustomizeText) + 2 * ButtonBorderSize; - ACustomizeButtonArea := Rect(R.Left, R.Bottom + ASeparatorHeight, R.Left + 2 * ButtonOffset + ACloseButtonSize.cx, - R.Bottom + ASeparatorHeight + 2 * ButtonOffset + ACloseButtonSize.cy); - FCustomizeButton.SetBounds(ACustomizeButtonArea.Left + ButtonOffset, - ACustomizeButtonArea.Top + ButtonOffset, ACloseButtonSize.cx, ACloseButtonSize.cy); - ASeparatorArea := Rect(ACustomizeButtonArea.Left, ACustomizeButtonArea.Top - ASeparatorHeight, - ACustomizeButtonArea.Right, ACustomizeButtonArea.Top); - if R.Right < ACustomizeButtonArea.Right then - R.Right := ACustomizeButtonArea.Right; - FSeparator.BoundsRect := Rect(ASeparatorArea.Left + ButtonOffset, - ASeparatorArea.Top + ButtonOffset, R.Right - ButtonOffset, - ASeparatorArea.Bottom); - // Calc Close Button - ACloseButtonArea := Rect(R.Right, R.Top, - R.Right + 2 * ButtonOffset + CloseButtonWidth + 2 * ButtonBorderSize, - R.Top + 2 * ButtonOffset + CloseButtonHeight + 2 * ButtonBorderSize); - FCloseButton.SetBounds(ACloseButtonArea.Left + ButtonOffset, - ACloseButtonArea.Top + ButtonOffset, CloseButtonWidth + 2 * ButtonBorderSize, - CloseButtonHeight + 2 * ButtonBorderSize); - if R.Bottom < ACloseButtonArea.Bottom then - R.Bottom := ACloseButtonArea.Bottom; - // Total Area - R.Right := ACloseButtonArea.Right; - R.Bottom := ACustomizeButtonArea.Bottom; - InflateRect(R, FrameBorderSize, FrameBorderSize); - SetBounds(Left, Top, R.Right - R.Left, R.Bottom - R.Top); -end; -*) - -procedure TcxGridStructureNavigator.Calculate; -var - R: TRect; - ACanvas: TcxCanvas; - ACloseButtonSize: TSize; -// ACloseButtonArea: TRect; - ACustomizeButtonArea: TRect; - ASeparatorArea: TRect; - ASeparatorHeight: Integer; -begin - FStructureControl.ViewInfo.Calculate; - R := FStructureControl.ViewInfo.Bounds; - OffsetRect(R, FrameBorderSize, FrameBorderSize); - FStructureControl.BoundsRect := R; - // Calc Customize Button - ASeparatorHeight := ButtonOffset * 2; - ACanvas := FStructureControl.ViewInfo.Canvas; - ACanvas.Font := FCustomizeButton.Font; - ACloseButtonSize.cx := 2 * TextOffset + ACanvas.TextWidth(SCustomizeText) + 2 * ButtonBorderSize; - ACloseButtonSize.cy := 2 * TextOffset + ACanvas.TextHeight(SCustomizeText) + 2 * ButtonBorderSize; - ACustomizeButtonArea := Rect(R.Left, R.Bottom + ASeparatorHeight, R.Left + 2 * ButtonOffset + ACloseButtonSize.cx, - R.Bottom + ASeparatorHeight + 2 * ButtonOffset + ACloseButtonSize.cy); - FCustomizeButton.SetBounds(ACustomizeButtonArea.Left + ButtonOffset, - ACustomizeButtonArea.Top + ButtonOffset, ACloseButtonSize.cx, ACloseButtonSize.cy); - ASeparatorArea := Rect(ACustomizeButtonArea.Left, ACustomizeButtonArea.Top - ASeparatorHeight, - ACustomizeButtonArea.Right, ACustomizeButtonArea.Top); - if R.Right < ACustomizeButtonArea.Right then - R.Right := ACustomizeButtonArea.Right; - FSeparator.BoundsRect := Rect(ASeparatorArea.Left + ButtonOffset, - ASeparatorArea.Top + ButtonOffset, R.Right - ButtonOffset, - ASeparatorArea.Bottom); - {// Calc Close Button - ACloseButtonArea := Rect(R.Right, R.Top, - R.Right + 2 * ButtonOffset + CloseButtonWidth + 2 * ButtonBorderSize, - R.Top + 2 * ButtonOffset + CloseButtonHeight + 2 * ButtonBorderSize); - FCloseButton.SetBounds(ACloseButtonArea.Left + ButtonOffset, - ACloseButtonArea.Top + ButtonOffset, CloseButtonWidth + 2 * ButtonBorderSize, - CloseButtonHeight + 2 * ButtonBorderSize); - if R.Bottom < ACloseButtonArea.Bottom then - R.Bottom := ACloseButtonArea.Bottom; - // Total Area - R.Right := ACloseButtonArea.Right; - } - R.Bottom := ACustomizeButtonArea.Bottom; - InflateRect(R, FrameBorderSize, FrameBorderSize); - SetBounds(Left, Top, R.Right - R.Left, R.Bottom - R.Top); -end; - -function TcxGridStructureNavigator.CalculateBoundsRect: TRect; -begin - Result := Rect(0, 0, Width, Height); - OffsetRect(Result, Grid.ClientBounds.Right - Result.Right - NavigatorOffset, - Grid.ClientBounds.Bottom - Result.Bottom - NavigatorOffset); -end; - -procedure TcxGridStructureNavigator.Changed; -begin - if FStructureControl = nil then Exit; - Calculate; - inherited Changed; - FStructureControl.Invalidate; - NotifyEditors; -end; - -procedure TcxGridStructureNavigator.CreateDefaultComponents; -var - AViewClass: TcxCustomGridViewClass; -begin - if Grid.ViewCount <> 0 then Exit; - AViewClass := GetDefaultViewClass; - if AViewClass <> nil then - begin - FDefaultView := Grid.CreateView(AViewClass); - FDefaultView.Name := GenViewName(Grid, FDefaultView); - RestoreViewFromTemplate(GetViewTemplateRegKey, FDefaultView); - // TODO: load default - FDefaultLevel := Grid.Levels.Add; - FDefaultLevel.Name := GenLevelName(Grid, FDefaultLevel); - FDefaultLevel.GridView := FDefaultView; - end; -end; - -procedure TcxGridStructureNavigator.DrawBackground(ACanvas: TcxCanvas); -begin - FillTubeGradientRect(ACanvas.Handle, ClientBounds, clWhite, {16248293}16115935{15785423}, False); -end; - -procedure TcxGridStructureNavigator.DrawStructureControlBackground(Sender: TObject); -begin - MoveWindowOrg(FStructureControl.Canvas.Handle, -FStructureControl.Left, -FStructureControl.Top); - DrawBackground(FStructureControl.Canvas); - MoveWindowOrg(FStructureControl.Canvas.Handle, FStructureControl.Left, FStructureControl.Top); -end; - -function TcxGridStructureNavigator.GetClientBounds: TRect; -begin - Result := inherited GetClientBounds; - InflateRect(Result, -FrameBorderSize, -FrameBorderSize); -end; - -function TcxGridStructureNavigator.GetDefaultViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridAccess(Grid).GetDefaultViewClass; - if Result = nil then - Result := TcxGridDBTableView; -end; - -function TcxGridStructureNavigator.GetDesigner: IDesigner; -begin - Result := GetObjectDesigner(Grid); -end; - -procedure TcxGridStructureNavigator.NotifyEditors; -var - Msg: TMsg; -begin - if not HandleAllocated then Exit; - if not PeekMessage(Msg, Handle, CM_DeferUpdate, CM_DeferUpdate, PM_NOREMOVE) then - PostMessage(Handle, CM_DeferUpdate, 0, 0); -end; - -procedure TcxGridStructureNavigator.CloseButtonClick(Sender: TObject); -begin - // TODO: -// Visible := False; -end; - -procedure TcxGridStructureNavigator.CustomizeButtonClick(Sender: TObject); -begin - // TODO: - if GetDesigner <> nil then - ShowGridEditor(GetDesigner, Grid); -end; - -procedure TcxGridStructureNavigator.SelectComponent(AObject: TPersistent; - AClearSelection: Boolean); -begin - if AClearSelection then - FDesignHelper.SelectObject(AObject, True, False) - else - FDesignHelper.ChangeSelection(AObject); -end; - -procedure TcxGridStructureNavigator.UpdateDesigner(Sender: TObject); -begin - if GetDesigner <> nil then - GetDesigner.Modified; -end; - -procedure TcxGridStructureNavigator.CMDeferUpdate(var Message: TMessage); -begin - UpdateDesignFormEditors(Grid); -end; - -procedure TcxGridStructureNavigator.BeforeGridLoading; -begin - FreeAndNil(FDefaultLevel); - FreeAndNil(FDefaultView); -end; - -function TcxGridStructureNavigator.IsObjectSelected(AObject: TPersistent): Boolean; -begin - Result := FDesignHelper.IsObjectSelected(AObject); -end; - -procedure TcxGridStructureNavigator.SelectionChanged(ASelection: TList); - - procedure MakeObjectVisible(AObject: TPersistent); - begin - //!!! columns/rows/bands/chartitems? - if (AObject is TcxGridLevel) or (AObject is TcxCustomGridView) then - begin - if AObject is TcxCustomGridView then - AObject := TcxCustomGridView(AObject).Level; - if (AObject <> nil) and (TcxGridLevel(AObject).Control = Grid) then - TcxGridLevel(AObject).MakeVisible; - end; - end; - -begin - if MakeSelectionVisible and (ASelection.Count = 1) then - MakeObjectVisible(ASelection[0]); - FStructureControl.SyncSelection(ASelection); - if Grid.HandleAllocated then - RedrawWindow(Grid.Handle, nil, 0, RDW_INVALIDATE or RDW_ALLCHILDREN); -end; - -procedure TcxGridStructureNavigator.SelectObject(AObject: TPersistent; - AClearSelection: Boolean); -begin - MakeSelectionVisible := False; - try - SelectComponent(AObject, AClearSelection); - finally - MakeSelectionVisible := True; - end; -end; - -procedure TcxGridStructureNavigator.SelectObjects(AObjects: TList); -begin - MakeSelectionVisible := False; - try - FDesignHelper.SetSelection(AObjects); - finally - MakeSelectionVisible := True; - end; -end; - -procedure TcxGridStructureNavigator.UnselectObject(AObject: TPersistent); -begin - MakeSelectionVisible := False; - try - FDesignHelper.UnselectObject(AObject); - finally - MakeSelectionVisible := True; - end; -end; - -initialization - cxGridStructureNavigatorClass := TcxGridStructureNavigator; -{$IFDEF DELPHI6} - DesignNotificationHandler := TDesignNotificationHandler.Create; -{$ENDIF} - -finalization -{$IFDEF DELPHI6} - FreeAndNil(DesignNotificationHandler); -{$ENDIF} - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStyleSheetsPreview.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStyleSheetsPreview.pas deleted file mode 100644 index 32d14af0..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridStyleSheetsPreview.pas +++ /dev/null @@ -1,311 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridStyleSheetsPreview; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, Classes, Controls, SysUtils, cxStyles, cxGridCustomView, - cxGridLevel, cxGrid; - -implementation - -uses - cxStyleSheetEditor, cxCustomData, cxGridTableView, cxDataStorage, - cxGridCustomTableView, cxGridBandedTableView, cxGridCardView; - -type -TcxCustomViewStyleSheetEditorPreview = class(TcxStyleSheetEditorPreview) -private - FGrid: TcxGrid; -protected - RootLevel: TcxGridLevel; -public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Control: TWinControl; override; -end; - -TcxCustomTableViewStyleSheetEditorPreview = class(TcxCustomViewStyleSheetEditorPreview) -protected - procedure CreateData; virtual; - function TableView: TcxGridTableView; virtual; abstract; - procedure SetupView; virtual; -end; - -TcxTableViewStyleSheetEditorPreview = class(TcxCustomTableViewStyleSheetEditorPreview) -private - FTableView: TcxGridTableView; -protected - function TableView: TcxGridTableView; override; -public - constructor Create(AOwner: TComponent); override; - class function GetStyleSheetClass: TcxCustomStyleSheetClass; override; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); override; -end; - -TcxBandedTableViewStyleSheetEditorPreview = class(TcxCustomTableViewStyleSheetEditorPreview) -private - FBandedTableView: TcxGridBandedTableView; -protected - function TableView: TcxGridTableView; override; -public - constructor Create(AOwner: TComponent); override; - class function GetStyleSheetClass: TcxCustomStyleSheetClass; override; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); override; -end; - -TcxCardViewStyleSheetEditorPreview = class(TcxCustomViewStyleSheetEditorPreview) -protected - FCardView: TcxGridCardView; - procedure CreateData; - procedure SetupView; -public - constructor Create(AOwner: TComponent); override; - class function GetStyleSheetClass: TcxCustomStyleSheetClass; override; - procedure SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); override; -end; - -{ TcxCustomViewStyleSheetEditorPreview } -constructor TcxCustomViewStyleSheetEditorPreview.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FGrid := TcxGrid.Create(AOwner); - RootLevel := FGrid.Levels.Add; -end; - -destructor TcxCustomViewStyleSheetEditorPreview.Destroy; -begin - FGrid.Free; - inherited Destroy; -end; - -function TcxCustomViewStyleSheetEditorPreview.Control: TWinControl; -begin - Result := FGrid; -end; - -{ TcxCustomTableViewStyleSheetEditorPreview } -procedure TcxCustomTableViewStyleSheetEditorPreview.CreateData; -var - I: Integer; -begin - TableView.CreateColumn; - TableView.CreateColumn; - TableView.CreateColumn; - TableView.CreateColumn; - TableView.Columns[0].Caption := 'Text'; - TableView.Columns[1].Caption := 'Currency'; - TableView.Columns[2].Caption := 'Date'; - TableView.Columns[0].DataBinding.ValueTypeClass := TcxStringValueType; - TableView.Columns[1].DataBinding.ValueTypeClass := TcxCurrencyValueType; - TableView.Columns[2].DataBinding.ValueTypeClass := TcxDateTimeValueType; - TableView.Columns[3].DataBinding.ValueTypeClass := TcxStringValueType; - TableView.Columns[2].GroupIndex := 0; - TableView.Columns[3].Visible := False; - TableView.Preview.Visible := True; - TableView.Preview.Column := TableView.Columns[3]; - - with TableView.DataController as TcxGridDataController do - begin - BeginUpdate; - RecordCount := 3; - try - for I := 0 to 2 do - begin - Values[I, 0] := 'ABC'; - Values[I, 1] := (I + 1) * 100; - Values[I, 2] := Date - I; - Values[I, 3] := 'Check the preview style'; - end; - finally - EndUpdate; - end; - end; - TableView.DataController.Groups.FullExpand; - TableView.DataController.Summary.FooterSummaryItems.Add; - TableView.DataController.Summary.FooterSummaryItems.Items[0].Kind := skSum; - TableView.DataController.Summary.FooterSummaryItems.Items[0].ItemLink := TableView.Columns[1]; -end; - -procedure TcxCustomTableViewStyleSheetEditorPreview.SetupView; -begin - TableView.OptionsView.ColumnAutoWidth := True; - TableView.OptionsView.Footer := True; - TableView.OptionsView.Indicator := True; - TableView.OptionsData.Deleting := False; - TableView.OptionsData.Editing := False; - TableView.OptionsData.Appending := False; - TableView.OptionsData.Inserting := False; - TableView.OptionsBehavior.IncSearch := True; -end; - -{ TcxTableViewStyleSheetEditorPreview } - -constructor TcxTableViewStyleSheetEditorPreview.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FTableView := TcxGridTableView(FGrid.CreateView(TcxGridTableView)); - RootLevel.GridView := FTableView; - SetupView; - CreateData; -end; - -function TcxTableViewStyleSheetEditorPreview.TableView: TcxGridTableView; -begin - Result := FTableView; -end; - -class function TcxTableViewStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := TcxGridTableViewStyleSheet; -end; - -procedure TcxTableViewStyleSheetEditorPreview.SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); -begin - FTableView.Styles.StyleSheet := AStyleSheet; -end; - -{ TcxBandedTableViewStyleSheetEditorPreview } - -constructor TcxBandedTableViewStyleSheetEditorPreview.Create(AOwner: TComponent); -var - I: Integer; -begin - inherited Create(AOwner); - FBandedTableView := TcxGridBandedTableView(FGrid.CreateView(TcxGridBandedTableView)); - RootLevel.GridView := FBandedTableView; - SetupView; - CreateData; - FBandedTableView.OptionsView.BandHeaders := True; - FBandedTableView.Bands.Add; - FBandedTableView.Bands[0].Caption := 'Band'; - for I := 0 to FBandedTableView.ColumnCount - 1 do - FBandedTableView.Columns[I].Position.BandIndex := 0; -end; - -function TcxBandedTableViewStyleSheetEditorPreview.TableView: TcxGridTableView; -begin - Result := FBandedTableView; -end; - -class function TcxBandedTableViewStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := TcxGridBandedTableViewStyleSheet; -end; - -procedure TcxBandedTableViewStyleSheetEditorPreview.SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); -begin - FBandedTableView.Styles.StyleSheet := AStyleSheet; -end; - -{ TcxCardViewStyleSheetEditorPreview } -constructor TcxCardViewStyleSheetEditorPreview.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FCardView := TcxGridCardView(FGrid.CreateView(TcxGridCardView)); - RootLevel.GridView := FCardView; - SetupView; - CreateData; -end; - -class function TcxCardViewStyleSheetEditorPreview.GetStyleSheetClass: TcxCustomStyleSheetClass; -begin - Result := TcxGridCardViewStyleSheet; -end; - -procedure TcxCardViewStyleSheetEditorPreview.CreateData; -var - I: Integer; -begin - FCardView.CreateRow; - FCardView.CreateRow; - FCardView.CreateRow; - FCardView.CreateRow; - FCardView.Rows[0].Caption := 'Caption'; - FCardView.Rows[0].Kind := rkCaption; - FCardView.Rows[1].Caption := 'Text'; - FCardView.Rows[2].Caption := 'Currency'; - FCardView.Rows[3].Caption := 'Date'; - FCardView.Rows[0].DataBinding.ValueTypeClass := TcxStringValueType; - FCardView.Rows[1].DataBinding.ValueTypeClass := TcxStringValueType; - FCardView.Rows[2].DataBinding.ValueTypeClass := TcxCurrencyValueType; - FCardView.Rows[3].DataBinding.ValueTypeClass := TcxDateTimeValueType; - - with FCardView.DataController as TcxGridDataController do - begin - BeginUpdate; - RecordCount := 3; - try - for I := 0 to 2 do - begin - Values[I, 0] := 'Caption'; - Values[I, 1] := 'ABC'; - Values[I, 2] := (I + 1) * 100; - Values[I, 3] := Date - I; - end; - finally - EndUpdate; - end; - end; -end; - -procedure TcxCardViewStyleSheetEditorPreview.SetupView; -begin - FCardView.OptionsData.Deleting := False; - FCardView.OptionsData.Editing := False; - FCardView.OptionsData.Appending := False; - FCardView.OptionsData.Inserting := False; - FCardView.OptionsBehavior.IncSearch := True; -end; - -procedure TcxCardViewStyleSheetEditorPreview.SetStyleSheet(AStyleSheet: TcxCustomStyleSheet); -begin - FCardView.Styles.StyleSheet := AStyleSheet; -end; - -initialization - RegisterStyleSheetEditorPreview(TcxTableViewStyleSheetEditorPreview); - RegisterStyleSheetEditorPreview(TcxBandedTableViewStyleSheetEditorPreview); - RegisterStyleSheetEditorPreview(TcxCardViewStyleSheetEditorPreview); - -finalization - UnregisterStyleSheetEditorPreview(TcxCardViewStyleSheetEditorPreview); - UnregisterStyleSheetEditorPreview(TcxBandedTableViewStyleSheetEditorPreview); - UnregisterStyleSheetEditorPreview(TcxTableViewStyleSheetEditorPreview); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridTableView.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridTableView.pas deleted file mode 100644 index b0015d7f..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridTableView.pas +++ /dev/null @@ -1,14171 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridTableView; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Messages, - Classes, Graphics, Controls, ImgList, Forms, Buttons, StdCtrls, ExtCtrls, ComCtrls, - cxClasses, cxControls, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, cxStyles, - cxStorage, cxPC, cxListBox, - cxContainer, cxEdit, cxTextEdit, - cxGrid, cxGridCommon, cxGridLevel, cxGridCustomView, cxGridCustomTableView, cxGridDetailsSite, - cxCustomData, cxData, cxDataStorage, cxFilter; - -const - htGridBase = 200; - htGroupByBox = htGridBase + 1; - htColumnHeader = htGridBase + 2; - htColumnHeaderHorzSizingEdge = htGridBase + 3; - htColumnHeaderFilterButton = htGridBase + 4; - htFooter = htGridBase + 5; - htFooterCell = htGridBase + 6; - htGroupFooter = htGridBase + 7; - htGroupFooterCell = htGridBase + 8; - htRowIndicator = htGridBase + 9; - htRowSizingEdge = htGridBase + 10; - htIndicator = htGridBase + 11; - htIndicatorHeader = htGridBase + 12; - htRowLevelIndent = htGridBase + 13; - htHeader = htGridBase + 14; - htGroupSummary = htGridBase + 15; - - ckHeader = 2; - ckGroupByBox = 3; - ckFooter = 4; - - cxGridDefaultIndicatorWidth = 12; - - cxGridCustomRowSeparatorDefaultWidth = 6; - cxGridCustomRowSeparatorMinWidth = 2; - - cxGridPreviewDefaultLeftIndent = 20; - cxGridPreviewDefaultMaxLineCount = 3; - cxGridPreviewDefaultRightIndent = 5; - - cxGridHeaderSizingEdgeSize = 8; - cxGridRowSizingEdgeSize = 8; - - cxGridOffice11GroupRowSeparatorWidth: Integer = 2; - - // record kind - rkFiltering = 2; - - isColumnFirst = isCustomItemLast + 1; - isFooter = isColumnFirst; - isGroupSummary = isColumnFirst + 1; - isHeader = isColumnFirst + 2; - isColumnLast = isHeader; - - bbTableFirst = bbCustomTableLast + 1; - bbFooter = bbTableFirst; - bbHeader = bbTableFirst + 1; - bbGroup = bbTableFirst + 2; - bbGroupByBox = bbTableFirst + 3; - bbIndicator = bbTableFirst + 4; - bbPreview = bbTableFirst + 5; - bbTableLast = bbPreview; - - vsTableFirst = vsCustomTableLast + 1; - vsFilterRowInfoText = vsTableFirst; - vsFooter = vsTableFirst + 1; - vsGroup = vsTableFirst + 2; - vsGroupByBox = vsTableFirst + 3; - vsGroupFooterSortedSummary = vsTableFirst + 4; - vsGroupSortedSummary = vsTableFirst + 5; - vsGroupSummary = vsTableFirst + 6; - vsHeader = vsTableFirst + 7; - vsNewItemRowInfoText = vsTableFirst + 8; - vsIndicator = vsTableFirst + 9; - vsPreview = vsTableFirst + 10; - vsTableLast = vsPreview; - -{$IFDEF BCB} - siFooter = 0; - siGroupFooter = 1; - siGroup = 2; -{$ENDIF} - -type - TcxGridTableCustomizationForm = class; - TcxGridTableController = class; - TcxCustomGridRow = class; - TcxGridMasterDataRow = class; - TcxGridGroupRow = class; - TcxGridViewData = class; - TcxGridColumnHeaderAreaPainterClass = class of TcxGridColumnHeaderAreaPainter; - TcxGridColumnContainerViewInfo = class; - TcxGridColumnHeaderAreaViewInfoClass = class of TcxGridColumnHeaderAreaViewInfo; - TcxGridColumnHeaderAreaViewInfo = class; - TcxGridColumnHeaderFilterButtonViewInfo = class; - TcxGridColumnHeaderGlyphViewInfo = class; - TcxGridColumnHeaderViewInfoClass = class of TcxGridColumnHeaderViewInfo; - TcxGridColumnHeaderViewInfo = class; - TcxGridHeaderViewInfo = class; - TcxGridGroupByBoxViewInfo = class; - TcxGridFooterViewInfo = class; - TcxCustomGridIndicatorItemViewInfo = class; - TcxGridIndicatorHeaderItemViewInfo = class; - TcxGridIndicatorRowItemViewInfo = class; - TcxGridIndicatorFooterItemViewInfo = class; - TcxGridIndicatorViewInfo = class; - TcxGridRowFooterViewInfo = class; - TcxGridRowFootersViewInfo = class; - TcxCustomGridRowViewInfo = class; - TcxGridRowsViewInfo = class; - TcxGridTableViewInfo = class; - TcxGridTableViewInfoCacheItem = class; - TcxGridColumn = class; - TcxGridTableView = class; - - TcxGridColumnContainerKind = Integer; - - { hit tests } - - // custom column - - TcxCustomGridColumnHitTest = class(TcxCustomGridViewHitTest) - public - Column: TcxGridColumn; - ColumnContainerKind: TcxGridColumnContainerKind; - end; - - // group by box - - TcxGridGroupByBoxHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - // column header - - TcxGridColumnHeaderHitTest = class(TcxCustomGridColumnHitTest) - protected - class function GetHitTestCode: Integer; override; - public - function DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; override; - end; - - TcxGridColumnHeaderHorzSizingEdgeHitTest = class(TcxCustomGridColumnHitTest) - protected - class function GetHitTestCode: Integer; override; - public - function Cursor: TCursor; override; - function DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; override; - end; - - TcxGridColumnHeaderFilterButtonHitTest = class(TcxCustomGridColumnHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - // header - - TcxGridHeaderHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - // footer - - TcxGridFooterHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridFooterCellHitTest = class(TcxCustomGridColumnHitTest) - protected - class function GetHitTestCode: Integer; override; - public - SummaryItem: TcxDataSummaryItem; - end; - - TcxGridGroupFooterHitTest = class(TcxGridFooterHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridGroupFooterCellHitTest = class(TcxGridFooterCellHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - // indicator - - TcxGridRowIndicatorHitTest = class(TcxGridRecordHitTest) - protected - class function GetHitTestCode: Integer; override; - public - MultiSelect: Boolean; - function Cursor: TCursor; override; - end; - - TcxGridRowSizingEdgeHitTest = class(TcxGridRecordHitTest) - protected - class function GetHitTestCode: Integer; override; - public - function Cursor: TCursor; override; - function DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; override; - end; - - TcxGridIndicatorHitTest = class(TcxCustomGridViewHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - TcxGridIndicatorHeaderHitTest = class(TcxGridIndicatorHitTest) - protected - class function GetHitTestCode: Integer; override; - end; - - // row - - TcxGridRowLevelIndentHitTest = class(TcxGridRecordHitTest) - protected - class function GetHitTestCode: Integer; override; - public - class function CanClick: Boolean; override; - end; - - TcxGridGroupSummaryHitTest = class(TcxGridRecordHitTest) - private - function GetColumn: TcxGridColumn; - protected - class function GetHitTestCode: Integer; override; - public - SummaryItem: TcxDataSummaryItem; - property Column: TcxGridColumn read GetColumn; - end; - - { view data } - - TcxCustomGridRowClass = class of TcxCustomGridRow; - - TcxCustomGridRow = class(TcxCustomGridRecord) - private - function GetAsGroupRow: TcxGridGroupRow; - function GetAsMasterDataRow: TcxGridMasterDataRow; - function GetGridView: TcxGridTableView; - function GetGridViewLevel: TcxGridLevel; - function GetIsFilterRow: Boolean; - function GetIsNewItemRow: Boolean; - function GetViewData: TcxGridViewData; - protected - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - public - function ExpandOnDblClick: Boolean; virtual; - function SupportsCellMultiSelect: Boolean; virtual; - - property AsGroupRow: TcxGridGroupRow read GetAsGroupRow; - property AsMasterDataRow: TcxGridMasterDataRow read GetAsMasterDataRow; - property GridView: TcxGridTableView read GetGridView; - property GridViewLevel: TcxGridLevel read GetGridViewLevel; - property IsFilterRow: Boolean read GetIsFilterRow; - property IsNewItemRow: Boolean read GetIsNewItemRow; - property ViewData: TcxGridViewData read GetViewData; - end; - - TcxGridDataRow = class(TcxCustomGridRow) - protected - function GetHasCells: Boolean; override; - function GetViewInfoCacheItemClass: TcxCustomGridViewInfoCacheItemClass; override; - function GetViewInfoClass: TcxCustomGridRecordViewInfoClass; override; - public - function SupportsCellMultiSelect: Boolean; override; - end; - - TcxGridNewItemRowClass = class of TcxGridNewItemRow; - - TcxGridNewItemRow = class(TcxGridDataRow) - public - function SupportsCellMultiSelect: Boolean; override; - end; - - TcxGridFilterRowClass = class of TcxGridFilterRow; - - TcxGridFilterRow = class(TcxGridNewItemRow) - private - FSelected: Boolean; - function GetFilterCriteriaItem(Index: Integer): TcxFilterCriteriaItem; - protected - procedure RefreshRecordInfo; override; - - function GetSelected: Boolean; override; - function GetVisible: Boolean; override; - procedure SetSelected(Value: Boolean); override; - - function GetDisplayText(Index: Integer): string; override; - function GetValue(Index: Integer): Variant; override; - procedure SetDisplayText(Index: Integer; const Value: string); override; - procedure SetValue(Index: Integer; const Value: Variant); override; - - function GetDisplayTextForValue(AIndex: Integer; const AValue: Variant): string; virtual; - function GetFilterOperatorKind(const AValue: Variant; ACheckMask: Boolean): TcxFilterOperatorKind; virtual; - function IsFilterOperatorSupported(AKind: TcxFilterOperatorKind; const AValue: Variant): Boolean; virtual; - - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - - property FilterCriteriaItems[Index: Integer]: TcxFilterCriteriaItem read GetFilterCriteriaItem; - property InternalSelected: Boolean read FSelected write FSelected; - public - destructor Destroy; override; - function CanFocusCells: Boolean; override; - function IsEmpty: Boolean; - end; - - TcxGridMasterDataRow = class(TcxGridDataRow) - private - function GetActiveDetailGridView: TcxCustomGridView; - function GetActiveDetailGridViewExists: Boolean; - function GetActiveDetailIndex: Integer; - function GetActiveDetailLevel: TcxGridLevel; - function GetDetailGridView(Index: Integer): TcxCustomGridView; - function GetDetailGridViewCount: Integer; - function GetDetailGridViewExists(Index: Integer): Boolean; - function GetDetailGridViewHasData(Index: Integer): Boolean; - function GetInternalActiveDetailGridView: TcxCustomGridView; - function GetInternalActiveDetailGridViewExists: Boolean; - function GetInternalActiveDetailIndex: Integer; - procedure SetActiveDetailIndex(Value: Integer); - procedure SetActiveDetailLevel(Value: TcxGridLevel); - protected - procedure DoCollapse(ARecurse: Boolean); override; - procedure DoExpand(ARecurse: Boolean); override; - function GetExpandable: Boolean; override; - function GetExpanded: Boolean; override; - function GetHasChildren: Boolean; virtual; - function GetViewInfoCacheItemClass: TcxCustomGridViewInfoCacheItemClass; override; - function GetViewInfoClass: TcxCustomGridRecordViewInfoClass; override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - procedure ToggleExpanded; override; - property InternalActiveDetailGridView: TcxCustomGridView read GetInternalActiveDetailGridView; - property InternalActiveDetailGridViewExists: Boolean read GetInternalActiveDetailGridViewExists; - property InternalActiveDetailIndex: Integer read GetInternalActiveDetailIndex; - public - function ExpandOnDblClick: Boolean; override; - function GetFirstFocusableChild: TcxCustomGridRecord; override; - function GetLastFocusableChild(ARecursive: Boolean): TcxCustomGridRecord; override; - - property ActiveDetailGridView: TcxCustomGridView read GetActiveDetailGridView; - property ActiveDetailGridViewExists: Boolean read GetActiveDetailGridViewExists; - property ActiveDetailIndex: Integer read GetActiveDetailIndex write SetActiveDetailIndex; - property ActiveDetailLevel: TcxGridLevel read GetActiveDetailLevel write SetActiveDetailLevel; - property DetailGridViewCount: Integer read GetDetailGridViewCount; - property DetailGridViewExists[Index: Integer]: Boolean read GetDetailGridViewExists; - property DetailGridViewHasData[Index: Integer]: Boolean read GetDetailGridViewHasData; - property DetailGridViews[Index: Integer]: TcxCustomGridView read GetDetailGridView; - property HasChildren: Boolean read GetHasChildren; - end; - - TcxGridGroupRow = class(TcxCustomGridRow) - private - function GetGroupedColumn: TcxGridColumn; - function GetGroupSummaryItems: TcxDataGroupSummaryItems; - protected - procedure DoCollapse(ARecurse: Boolean); override; - procedure DoExpand(ARecurse: Boolean); override; - //function GetDestroyingOnExpanding: Boolean; override; - function GetExpandable: Boolean; override; - function GetExpanded: Boolean; override; - - function GetDisplayCaption: string; virtual; - function GetDisplayText(Index: Integer): string; override; - function GetDisplayTextValue: string; virtual; - function GetIsData: Boolean; override; - function GetIsParent: Boolean; override; - function GetValue: Variant; reintroduce; virtual; - function GetViewInfoCacheItemClass: TcxCustomGridViewInfoCacheItemClass; override; - function GetViewInfoClass: TcxCustomGridRecordViewInfoClass; override; - procedure SetDisplayText(Index: Integer; const Value: string); override; - procedure SetValue(Index: Integer; const Value: Variant); override; - public - function GetGroupSummaryInfo(var ASummaryItems: TcxDataSummaryItems; - var ASummaryValues: PVariant): Boolean; - - property DisplayCaption: string read GetDisplayCaption; - property DisplayText: string read GetDisplayTextValue; - property GroupedColumn: TcxGridColumn read GetGroupedColumn; - property GroupSummaryItems: TcxDataGroupSummaryItems read GetGroupSummaryItems; - property Value: Variant read GetValue; - end; - - TcxGridViewData = class(TcxCustomGridTableViewData) - private - FFilterRow: TcxGridFilterRow; - function GetNewItemRow: TcxGridNewItemRow; - function GetRow(Index: Integer): TcxCustomGridRow; - function GetRowCount: Integer; - protected - function GetFirstVisibleExpandedMasterRow: TcxGridMasterDataRow; virtual; - function GetNewItemRecordClass: TcxCustomGridRecordClass; override; - function GetRecordByKind(AKind, AIndex: Integer): TcxCustomGridRecord; override; - function GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; override; - function GetRecordKind(ARecord: TcxCustomGridRecord): Integer; override; - - procedure CreateFilterRow; - procedure DestroyFilterRow; - procedure CheckFilterRow; - //procedure RecreateFilterRow; - function GetFilterRowClass: TcxGridFilterRowClass; virtual; - public - destructor Destroy; override; - procedure Collapse(ARecurse: Boolean); override; - procedure Expand(ARecurse: Boolean); override; - function HasFilterRow: Boolean; virtual; - function HasNewItemRecord: Boolean; override; - function MakeDetailVisible(ADetailLevel: TComponent{TcxGridLevel}): TcxCustomGridView; override; - //procedure Refresh(ARecordCount: Integer); override; - - property FilterRow: TcxGridFilterRow read FFilterRow; - property NewItemRow: TcxGridNewItemRow read GetNewItemRow; - property RowCount: Integer read GetRowCount; - property Rows[Index: Integer]: TcxCustomGridRow read GetRow; - end; - - { controller } - - // drag&drop objects - - TcxGridColumnHeaderMovingObjectClass = class of TcxGridColumnHeaderMovingObject; - - TcxGridColumnHeaderMovingObject = class(TcxCustomGridTableItemMovingObject) - private - FOriginalDestColumnContainerKind: TcxGridColumnContainerKind; - - function GetGridView: TcxGridTableView; - function GetSourceItem: TcxGridColumn; - function GetViewInfo: TcxGridTableViewInfo; - procedure SetSourceItem(Value: TcxGridColumn); - protected - procedure CalculateDestParams(AHitTest: TcxCustomGridHitTest; - out AContainerKind: TcxGridItemContainerKind; out AZone: TcxGridItemContainerZone); override; - function CanRemove: Boolean; override; - procedure CheckDestItemContainerKind(var AValue: TcxGridItemContainerKind); override; - procedure DoColumnMoving; virtual; - function GetArrowAreaBounds(APlace: TcxGridArrowPlace): TRect; override; - function GetArrowAreaBoundsForHeader(APlace: TcxGridArrowPlace): TRect; virtual; - function GetArrowsClientRect: TRect; override; - function GetSourceItemViewInfo: TcxCustomGridCellViewInfo; override; - function IsValidDestination: Boolean; override; - function IsValidDestinationForVisibleSource: Boolean; virtual; - - procedure EndDragAndDrop(Accepted: Boolean); override; - - property GridView: TcxGridTableView read GetGridView; - property OriginalDestColumnContainerKind: TcxGridColumnContainerKind - read FOriginalDestColumnContainerKind write FOriginalDestColumnContainerKind; - property SourceItem: TcxGridColumn read GetSourceItem write SetSourceItem; - property ViewInfo: TcxGridTableViewInfo read GetViewInfo; - public - procedure Init(const P: TPoint; AParams: TcxCustomGridHitTest); override; - end; - - TcxCustomGridSizingObject = class(TcxCustomGridDragAndDropObject) - private - FDestPointX: Integer; - FDestPointY: Integer; - FOriginalSize: Integer; - function GetController: TcxGridTableController; - function GetGridView: TcxGridTableView; - function GetViewInfo: TcxGridTableViewInfo; - procedure SetDestPointX(Value: Integer); - procedure SetDestPointY(Value: Integer); - protected - procedure DirtyChanged; override; - function GetCurrentSize: Integer; virtual; - function GetDeltaSize: Integer; virtual; - function GetDragAndDropCursor(Accepted: Boolean): TCursor; override; - function GetHorzSizingMarkBounds: TRect; virtual; - function GetImmediateStart: Boolean; override; - function GetIsHorizontalSizing: Boolean; virtual; - function GetSizingItemBounds: TRect; virtual; abstract; - function GetSizingMarkBounds: TRect; virtual; - function GetSizingMarkWidth: Integer; virtual; abstract; - function GetVertSizingMarkBounds: TRect; virtual; - - procedure DragAndDrop(const P: TPoint; var Accepted: Boolean); override; - - property Controller: TcxGridTableController read GetController; - property CurrentSize: Integer read GetCurrentSize; - property DeltaSize: Integer read GetDeltaSize; - property DestPointX: Integer read FDestPointX write SetDestPointX; - property DestPointY: Integer read FDestPointY write SetDestPointY; - property GridView: TcxGridTableView read GetGridView; - property IsHorizontalSizing: Boolean read GetIsHorizontalSizing; - property OriginalSize: Integer read FOriginalSize write FOriginalSize; - property SizingItemBounds: TRect read GetSizingItemBounds; - property SizingMarkBounds: TRect read GetSizingMarkBounds; - property SizingMarkWidth: Integer read GetSizingMarkWidth; - property ViewInfo: TcxGridTableViewInfo read GetViewInfo; - public - procedure Init(const P: TPoint; AParams: TcxCustomGridHitTest); override; - end; - - TcxCustomGridColumnSizingObject = class(TcxCustomGridSizingObject) - private - FColumn: TcxGridColumn; - function GetColumnHeaderViewInfo: TcxGridColumnHeaderViewInfo; - protected - function GetSizingItemBounds: TRect; override; - function GetSizingMarkWidth: Integer; override; - property Column: TcxGridColumn read FColumn write FColumn; - property ColumnHeaderViewInfo: TcxGridColumnHeaderViewInfo read GetColumnHeaderViewInfo; - public - procedure Init(const P: TPoint; AParams: TcxCustomGridHitTest); override; - end; - - TcxGridColumnHorzSizingObject = class(TcxCustomGridColumnSizingObject) - protected - procedure BeginDragAndDrop; override; - procedure EndDragAndDrop(Accepted: Boolean); override; - function GetCurrentSize: Integer; override; - end; - - TcxGridRowSizingObject = class(TcxCustomGridSizingObject) - private - FRow: TcxCustomGridRow; - function GetRowViewInfo: TcxCustomGridRowViewInfo; - protected - procedure BeginDragAndDrop; override; - procedure EndDragAndDrop(Accepted: Boolean); override; - function GetCurrentSize: Integer; override; - function GetIsHorizontalSizing: Boolean; override; - function GetSizingItemBounds: TRect; override; - function GetSizingMarkWidth: Integer; override; - property Row: TcxCustomGridRow read FRow; - property RowViewInfo: TcxCustomGridRowViewInfo read GetRowViewInfo; - public - procedure Init(const P: TPoint; AParams: TcxCustomGridHitTest); override; - end; - - // customization form - - TcxGridTableItemsListBox = class(TcxCustomGridTableItemsListBox) - private - function GetGridView: TcxGridTableView; - protected - function CalculateItemHeight: Integer; override; - function DrawItemDrawBackgroundHandler(ACanvas: TcxCanvas; const ABounds: TRect): Boolean; virtual; abstract; - function GetItemEndEllipsis: Boolean; virtual; abstract; - property GridView: TcxGridTableView read GetGridView; - public - constructor Create(AOwner: TComponent); override; - procedure PaintItem(ACanvas: TcxCanvas; R: TRect; AIndex: Integer; AFocused: Boolean); override; - end; - - TcxGridTableColumnsListBox = class(TcxGridTableItemsListBox) - protected - procedure DoRefreshItems; override; - function DrawItemDrawBackgroundHandler(ACanvas: TcxCanvas; const ABounds: TRect): Boolean; override; - function GetDragAndDropParams: TcxCustomGridHitTest; override; - function GetItemEndEllipsis: Boolean; override; - end; - - TcxGridTableCustomizationForm = class(TcxCustomGridTableCustomizationForm) - private - function GetColumnsListBox: TcxGridTableColumnsListBox; - function GetColumnsPage: TcxTabSheet; - function GetController: TcxGridTableController; - function GetGridView: TcxGridTableView; - function GetViewInfo: TcxGridTableViewInfo; - protected - function GetItemsListBoxClass: TcxCustomGridTableItemsListBoxClass; override; - function GetItemsPageCaption: string; override; - - property ColumnsListBox: TcxGridTableColumnsListBox read GetColumnsListBox; - property GridView: TcxGridTableView read GetGridView; - property ViewInfo: TcxGridTableViewInfo read GetViewInfo; - public - property Controller: TcxGridTableController read GetController; - property ColumnsPage: TcxTabSheet read GetColumnsPage; - end; - - // drag open info - - TcxGridDragOpenInfoMasterDataRowTab = class(TcxGridDragOpenInfoTab) - public - GridRow: TcxGridMasterDataRow; - constructor Create(ALevel: TcxGridLevel; AGridRow: TcxGridMasterDataRow); reintroduce; virtual; - function Equals(AInfo: TcxCustomGridDragOpenInfo): Boolean; override; - procedure Run; override; - end; - - // popup - - TcxGridColumnsCustomizationPopup = class(TcxCustomGridItemsCustomizationPopup) - private - function GetGridView: TcxGridTableView; - protected - procedure ItemClicked(AItem: TObject; AChecked: Boolean); override; - procedure SetItemIndex(AItem: TObject; AIndex: Integer); override; - public - property GridView: TcxGridTableView read GetGridView; - end; - - // controllers - - TcxGridTableEditingController = class(TcxGridEditingController) - private - FApplyingImmediateFiltering: Boolean; - function GetController: TcxGridTableController; - function GetGridView: TcxGridTableView; - protected - function CanInitEditing: Boolean; override; - function CanUpdateEditValue: Boolean; override; - procedure DoEditChanged; override; - procedure DoEditKeyDown(var Key: Word; Shift: TShiftState); override; - function GetHideEditOnFocusedRecordChange: Boolean; override; - procedure InitEdit; override; - procedure PostEditingData; override; - property ApplyingImmediateFiltering: Boolean read FApplyingImmediateFiltering write FApplyingImmediateFiltering; - public - property Controller: TcxGridTableController read GetController; - property GridView: TcxGridTableView read GetGridView; - end; - - TcxGridTableController = class(TcxCustomGridTableController) - private - FCellSelectionAnchor: TcxGridColumn; - FHorzSizingColumn: TcxGridColumn; - FIsFilterPopupOpenedFromHeader: Boolean; - FKeepFilterRowFocusing: Boolean; - FLeftPos: Integer; - FPressedColumn: TcxGridColumn; - FSelectedColumns: TList; - - function GetColumnsCustomizationPopup: TcxGridColumnsCustomizationPopup; - function GetCustomizationForm: TcxGridTableCustomizationForm; - function GetEditingController: TcxGridTableEditingController; - function GetFocusedColumn: TcxGridColumn; - function GetFocusedColumnIndex: Integer; - function GetFocusedRow: TcxCustomGridRow; - function GetFocusedRowIndex: Integer; - function GetGridView: TcxGridTableView; - function GetIsColumnHorzSizing: Boolean; - function GetSelectedColumn(Index: Integer): TcxGridColumn; - function GetSelectedColumnCount: Integer; - function GetSelectedRow(Index: Integer): TcxCustomGridRow; - function GetSelectedRowCount: Integer; - function GetTopRowIndex: Integer; - function GetViewData: TcxGridViewData; - function GetViewInfo: TcxGridTableViewInfo; - procedure SetFocusedColumn(Value: TcxGridColumn); - procedure SetFocusedColumnIndex(Value: Integer); - procedure SetFocusedRow(Value: TcxCustomGridRow); - procedure SetFocusedRowIndex(Value: Integer); - procedure SetLeftPos(Value: Integer); - procedure SetPressedColumn(Value: TcxGridColumn); - procedure SetTopRowIndex(Value: Integer); - - procedure AddSelectedColumn(AColumn: TcxGridColumn); - procedure RemoveSelectedColumn(AColumn: TcxGridColumn); - protected - function CanAppend(ACheckOptions: Boolean): Boolean; override; - function CanDelete(ACheckOptions: Boolean): Boolean; override; - function CanEdit: Boolean; override; - function CanInsert(ACheckOptions: Boolean): Boolean; override; - procedure CheckCoordinates; override; - procedure CheckLeftPos(var Value: Integer); - procedure FocusedItemChanged(APrevFocusedItem: TcxCustomGridTableItem); override; - procedure FocusedRecordChanged(APrevFocusedRecordIndex, AFocusedRecordIndex: Integer; - ANewItemRecordFocusingChanged: Boolean); override; - function GetDesignHitTest(AHitTest: TcxCustomGridHitTest): Boolean; override; - function GetFocusedRecord: TcxCustomGridRecord; override; - function GetIsRecordsScrollHorizontal: Boolean; override; - function GetItemsCustomizationPopupClass: TcxCustomGridItemsCustomizationPopupClass; override; - function GetMaxTopRecordIndexValue: Integer; override; - function GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; override; - function GetScrollBarRecordCount: Integer; override; - function IsColumnFixedDuringHorzSizing(AColumn: TcxGridColumn): Boolean; virtual; - function IsKeyForMultiSelect(AKey: Word; AShift: TShiftState; - AFocusedRecordChanged: Boolean): Boolean; override; - function IsPixelScrollBar(AKind: TScrollBarKind): Boolean; override; - procedure LeftPosChanged; virtual; - function NeedsAdditionalRowsScrolling(AIsCallFromMaster: Boolean = False): Boolean; virtual; - procedure RemoveFocus; override; - procedure ScrollData(ADirection: TcxDirection); override; - procedure SetFocusedRecord(Value: TcxCustomGridRecord); override; - procedure ShowNextPage; override; - procedure ShowPrevPage; override; - - // internal draganddrop data scrolling - function CanScrollData(ADirection: TcxDirection): Boolean; override; - - // selection - function CanPostponeRecordSelection(AShift: TShiftState): Boolean; override; - function CanProcessMultiSelect(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState): Boolean; override; - procedure DoMouseNormalSelection(AHitTest: TcxCustomGridHitTest); override; - procedure DoMouseRangeSelection(AClearSelection: Boolean = True; AData: TObject = nil); override; - procedure DoNormalSelection; override; - procedure MultiSelectKeyDown(var Key: Word; Shift: TShiftState); override; - function SupportsAdditiveSelection: Boolean; override; - function SupportsRecordSelectionToggling: Boolean; override; - - // special row focusing - function DefocusSpecialRow: Boolean; virtual; - function FocusSpecialRow: Boolean; virtual; - procedure FilterRowFocusChanged; virtual; - procedure FilterRowFocusChanging(AValue: Boolean); virtual; - - // pull focusing - procedure DoPullFocusingScrolling(ADirection: TcxDirection); override; - function GetPullFocusingScrollingDirection(X, Y: Integer; out ADirection: TcxDirection): Boolean; override; - function SupportsPullFocusing: Boolean; override; - - // delphi drag and drop - function GetDragOpenInfo(AHitTest: TcxCustomGridHitTest): TcxCustomGridDragOpenInfo; override; - function GetDragScrollDirection(X, Y: Integer): TcxDirection; override; - - // customization - procedure CheckCustomizationFormBounds(var R: TRect); override; - function GetColumnHeaderDragAndDropObjectClass: TcxGridColumnHeaderMovingObjectClass; virtual; - function GetCustomizationFormClass: TcxCustomGridCustomizationFormClass; override; - - // cells selection - function CanProcessCellMultiSelect(APrevFocusedColumn: TcxGridColumn): Boolean; virtual; - procedure CellMultiSelectKeyDown(var Key: Word; Shift: TShiftState); virtual; - procedure DoNormalCellSelection; - procedure DoRangeCellSelection; - function GetCellMultiSelect: Boolean; virtual; - property CellMultiSelect: Boolean read GetCellMultiSelect; - - // BeginsWith mask - procedure AddBeginsWithMask(var AValue: Variant); - procedure RemoveBeginsWithMask(var AValue: Variant); - function GetBeginsWithMaskPos(const AValue: string): Integer; - - function GetEditingControllerClass: TcxGridEditingControllerClass; override; - - property IsFilterPopupOpenedFromHeader: Boolean read FIsFilterPopupOpenedFromHeader - write FIsFilterPopupOpenedFromHeader; - property KeepFilterRowFocusing: Boolean read FKeepFilterRowFocusing write FKeepFilterRowFocusing; - property ViewData: TcxGridViewData read GetViewData; - property ViewInfo: TcxGridTableViewInfo read GetViewInfo; - public - constructor Create(AGridView: TcxCustomGridView); override; - destructor Destroy; override; - procedure CheckScrolling(const P: TPoint); override; - procedure ClearGrouping; - procedure ClearSelection; override; - procedure DoCancelMode; override; - function IsFilterRowFocused: Boolean; - function IsNewItemRowFocused: Boolean; - function IsSpecialRowFocused: Boolean; virtual; - procedure MakeItemVisible(AItem: TcxCustomGridTableItem); override; - procedure SelectAll; override; - - procedure InitScrollBarsParameters; override; - function IsDataFullyVisible(AIsCallFromMaster: Boolean = False): Boolean; override; - procedure Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); override; - - procedure EndDragAndDrop(Accepted: Boolean); override; - - procedure DoKeyDown(var Key: Word; Shift: TShiftState); override; - procedure KeyDown(var Key: Word; Shift: TShiftState); override; - - procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; - - // cells selection - procedure ClearCellSelection; - procedure SelectAllColumns; - procedure SelectCells(AFromColumn, AToColumn: TcxGridColumn; - AFromRowIndex, AToRowIndex: Integer); - procedure SelectColumns(AFromColumn, AToColumn: TcxGridColumn); - - property CellSelectionAnchor: TcxGridColumn read FCellSelectionAnchor write FCellSelectionAnchor; - property ColumnsCustomizationPopup: TcxGridColumnsCustomizationPopup read GetColumnsCustomizationPopup; - property CustomizationForm: TcxGridTableCustomizationForm read GetCustomizationForm; - property EditingController: TcxGridTableEditingController read GetEditingController; - property FocusedColumn: TcxGridColumn read GetFocusedColumn write SetFocusedColumn; - property FocusedColumnIndex: Integer read GetFocusedColumnIndex write SetFocusedColumnIndex; - property FocusedRow: TcxCustomGridRow read GetFocusedRow write SetFocusedRow; - property FocusedRowIndex: Integer read GetFocusedRowIndex write SetFocusedRowIndex; - property GridView: TcxGridTableView read GetGridView; - property HorzSizingColumn: TcxGridColumn read FHorzSizingColumn; - property IsColumnHorzSizing: Boolean read GetIsColumnHorzSizing; - property LeftPos: Integer read FLeftPos write SetLeftPos; - property PressedColumn: TcxGridColumn read FPressedColumn write SetPressedColumn; - property SelectedColumnCount: Integer read GetSelectedColumnCount; - property SelectedColumns[Index: Integer]: TcxGridColumn read GetSelectedColumn; - property SelectedRowCount: Integer read GetSelectedRowCount; - property SelectedRows[Index: Integer]: TcxCustomGridRow read GetSelectedRow; - property TopRowIndex: Integer read GetTopRowIndex write SetTopRowIndex; - end; - - { painters } - - // column container - - TcxGridColumnContainerPainter = class(TcxCustomGridPartPainter) - private - function GetViewInfo: TcxGridColumnContainerViewInfo; - protected - procedure DrawContent; override; - procedure DrawItems; virtual; - function DrawItemsFirst: Boolean; virtual; - function ExcludeFromClipRect: Boolean; override; - property ViewInfo: TcxGridColumnContainerViewInfo read GetViewInfo; - end; - - // header - - TcxGridColumnHeaderAreaPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridColumnHeaderAreaViewInfo; - protected - function ExcludeFromClipRect: Boolean; override; - property ViewInfo: TcxGridColumnHeaderAreaViewInfo read GetViewInfo; - end; - - TcxGridColumnHeaderSortingMarkPainter = class(TcxGridColumnHeaderAreaPainter) - protected - procedure Paint; override; - end; - - TcxGridColumnHeaderFilterButtonPainter = class(TcxGridColumnHeaderAreaPainter) - private - function GetViewInfo: TcxGridColumnHeaderFilterButtonViewInfo; - protected - procedure Paint; override; - property ViewInfo: TcxGridColumnHeaderFilterButtonViewInfo read GetViewInfo; - end; - - TcxGridColumnHeaderGlyphPainter = class(TcxGridColumnHeaderAreaPainter) - private - function GetViewInfo: TcxGridColumnHeaderGlyphViewInfo; - protected - procedure Paint; override; - property ViewInfo: TcxGridColumnHeaderGlyphViewInfo read GetViewInfo; - end; - - TcxGridColumnHeaderPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridColumnHeaderViewInfo; - protected - procedure DrawAreas; virtual; - procedure DrawBorders; override; - procedure DrawContent; override; - procedure DrawPressed; virtual; - function ExcludeFromClipRect: Boolean; override; - procedure Paint; override; - property ViewInfo: TcxGridColumnHeaderViewInfo read GetViewInfo; - end; - - TcxGridHeaderPainter = class(TcxGridColumnContainerPainter) - protected - function DrawItemsFirst: Boolean; override; - end; - - // group by box - - TcxGridGroupByBoxPainter = class(TcxGridColumnContainerPainter) - protected - procedure DrawBackground(const R: TRect); override; - procedure DrawContent; override; - function DrawItemsFirst: Boolean; override; - end; - - // footer - - TcxGridFooterCellPainter = class(TcxGridColumnHeaderPainter) - protected - procedure DrawBorders; override; - procedure DrawContent; override; - end; - - TcxGridFooterPainterClass = class of TcxGridFooterPainter; - - TcxGridFooterPainter = class(TcxGridColumnContainerPainter) - private - function GetViewInfo: TcxGridFooterViewInfo; - protected - procedure DrawBackground(const R: TRect); override; - procedure DrawBorders; override; - function DrawItemsFirst: Boolean; override; - procedure DrawSeparator; virtual; - property ViewInfo: TcxGridFooterViewInfo read GetViewInfo; - end; - - // indicator - - TcxCustomGridIndicatorItemPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxCustomGridIndicatorItemViewInfo; - protected - function ExcludeFromClipRect: Boolean; override; - property ViewInfo: TcxCustomGridIndicatorItemViewInfo read GetViewInfo; - end; - - TcxGridIndicatorHeaderItemPainter = class(TcxCustomGridIndicatorItemPainter) - private - function GetViewInfo: TcxGridIndicatorHeaderItemViewInfo; - protected - function DrawBackgroundHandler(ACanvas: TcxCanvas; const ABounds: TRect): Boolean; override; - procedure DrawContent; override; - procedure DrawQuickCustomizationMark; virtual; - property ViewInfo: TcxGridIndicatorHeaderItemViewInfo read GetViewInfo; - end; - - TcxGridIndicatorRowItemPainter = class(TcxCustomGridIndicatorItemPainter) - private - function GetViewInfo: TcxGridIndicatorRowItemViewInfo; - protected - procedure DrawContent; override; - property ViewInfo: TcxGridIndicatorRowItemViewInfo read GetViewInfo; - end; - - TcxGridIndicatorFooterItemPainter = class(TcxCustomGridIndicatorItemPainter) - private - function GetViewInfo: TcxGridIndicatorFooterItemViewInfo; - protected - procedure DrawContent; override; - procedure DrawBorders; override; - property ViewInfo: TcxGridIndicatorFooterItemViewInfo read GetViewInfo; - end; - - TcxGridIndicatorPainter = class(TcxCustomGridCellPainter) - private - function GetViewInfo: TcxGridIndicatorViewInfo; - protected - procedure DrawContent; override; - procedure DrawItems; virtual; - function DrawItemsFirst: Boolean; virtual; - function ExcludeFromClipRect: Boolean; override; - property ViewInfo: TcxGridIndicatorViewInfo read GetViewInfo; - end; - - // custom row - - TcxCustomGridRowPainter = class(TcxCustomGridRecordPainter) - private - function GetViewInfo: TcxCustomGridRowViewInfo; - protected - procedure DrawFooters; virtual; - procedure DrawIndent; virtual; - procedure DrawIndentPart(ALevel: Integer; const ABounds: TRect); virtual; - procedure DrawLastHorzGridLine; virtual; - procedure DrawSeparator; virtual; - procedure Paint; override; - property ViewInfo: TcxCustomGridRowViewInfo read GetViewInfo; - end; - - // rows - - TcxGridRowsPainterClass = class of TcxGridRowsPainter; - - TcxGridRowsPainter = class(TcxCustomGridRecordsPainter) - private - function GetViewInfo: TcxGridRowsViewInfo; - protected - procedure Paint; override; - property ViewInfo: TcxGridRowsViewInfo read GetViewInfo; - public - class procedure DrawDataRowCells(ARowViewInfo: TcxCustomGridRowViewInfo); virtual; - end; - - // table - - TcxGridTablePainter = class(TcxCustomGridTablePainter) - private - FGridLines: TList; - function GetController: TcxGridTableController; - function GetGridView: TcxGridTableView; - function GetViewInfo: TcxGridTableViewInfo; - protected - function CanOffset(AItemsOffset, DX, DY: Integer): Boolean; override; - procedure DrawFooter; virtual; - procedure DrawGroupByBox; virtual; - procedure DrawHeader; virtual; - procedure DrawIndicator; virtual; - procedure DrawRecords; override; - procedure Offset(AItemsOffset: Integer); override; - procedure Offset(DX, DY: Integer); override; - procedure PaintContent; override; - public - procedure AddGridLine(const R: TRect); - property Controller: TcxGridTableController read GetController; - property GridView: TcxGridTableView read GetGridView; - property ViewInfo: TcxGridTableViewInfo read GetViewInfo; - end; - - { view infos } - - // column container - - TcxGridColumnContainerViewInfo = class(TcxCustomGridPartViewInfo) - private - FItemHeight: Integer; - FItems: TList; - function GetController: TcxGridTableController; - function GetCount: Integer; - function GetGridView: TcxGridTableView; - function GetGridViewInfo: TcxGridTableViewInfo; - function GetInternalItem(Index: Integer): TcxGridColumnHeaderViewInfo; - function GetItem(Index: Integer): TcxGridColumnHeaderViewInfo; - function GetItemHeight: Integer; - protected - function CreateItem(AIndex: Integer): TcxGridColumnHeaderViewInfo; virtual; - procedure CreateItems; virtual; - procedure DestroyItems; virtual; - function GetColumn(Index: Integer): TcxGridColumn; virtual; abstract; - function GetColumnCount: Integer; virtual; abstract; - function GetItemClass: TcxGridColumnHeaderViewInfoClass; virtual; - - function CalculateItemHeight: Integer; virtual; - function GetAutoHeight: Boolean; virtual; - function GetColumnAdditionalWidth(AColumn: TcxGridColumn): Integer; - function GetColumnMinWidth(AColumn: TcxGridColumn): Integer; virtual; - function GetColumnNeighbors(AColumn: TcxGridColumn): TcxNeighbors; virtual; - function GetColumnWidth(AColumn: TcxGridColumn): Integer; virtual; - function GetItemAreaBounds(AItem: TcxGridColumnHeaderViewInfo): TRect; virtual; - function GetItemMultiLinePainting(AItem: TcxGridColumnHeaderViewInfo): Boolean; virtual; - function GetItemsAreaBounds: TRect; virtual; - function GetItemsHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - function GetKind: TcxGridColumnContainerKind; virtual; abstract; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetZonesAreaBounds: TRect; virtual; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - procedure Offset(DX, DY: Integer); override; - - property AutoHeight: Boolean read GetAutoHeight; - property ColumnCount: Integer read GetColumnCount; - property Columns[Index: Integer]: TcxGridColumn read GetColumn; - property Controller: TcxGridTableController read GetController; - property ZonesAreaBounds: TRect read GetZonesAreaBounds; - public - constructor Create(AGridViewInfo: TcxCustomGridTableViewInfo); override; - destructor Destroy; override; - procedure BeforeRecalculation; override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function GetZone(const P: TPoint): TcxGridItemContainerZone; virtual; - property Count: Integer read GetCount; - property GridView: TcxGridTableView read GetGridView; - property GridViewInfo: TcxGridTableViewInfo read GetGridViewInfo; - property InternalItems[Index: Integer]: TcxGridColumnHeaderViewInfo read GetInternalItem; - property ItemHeight: Integer read GetItemHeight; - property Items[Index: Integer]: TcxGridColumnHeaderViewInfo read GetItem; default; - property ItemsAreaBounds: TRect read GetItemsAreaBounds; - property Kind: TcxGridColumnContainerKind read GetKind; - end; - - // column header areas - - TcxGridColumnHeaderAreaViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FColumnHeaderViewInfo: TcxGridColumnHeaderViewInfo; - function GetColumn: TcxGridColumn; - function GetGridView: TcxGridTableView; - function GetGridViewInfo: TcxGridTableViewInfo; - protected - function GetAlignmentVert: TcxAlignmentVert; override; - function GetCanvas: TcxCanvas; override; - function GetHeight: Integer; override; - function GetWidth: Integer; override; - function HasMouse(AHitTest: TcxCustomGridHitTest): Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - //procedure Invalidate; virtual; - function NeedsContainerHotTrack: Boolean; virtual; - function OccupiesSpace: Boolean; virtual; - function ResidesInContent: Boolean; virtual; - - property Column: TcxGridColumn read GetColumn; - property GridView: TcxGridTableView read GetGridView; - property GridViewInfo: TcxGridTableViewInfo read GetGridViewInfo; - public - constructor Create(AColumnHeaderViewInfo: TcxGridColumnHeaderViewInfo); reintroduce; virtual; - procedure Calculate(const ABounds: TRect; var ATextAreaBounds: TRect); reintroduce; virtual; - property AlignmentHorz: TAlignment read GetAlignmentHorz; - property AlignmentVert: TcxAlignmentVert read GetAlignmentVert; - property ColumnHeaderViewInfo: TcxGridColumnHeaderViewInfo read FColumnHeaderViewInfo; - property Height: Integer read GetHeight; - property Width: Integer read GetWidth; - end; - - TcxGridColumnHeaderSortingMarkViewInfo = class(TcxGridColumnHeaderAreaViewInfo) - private - function GetSortOrder: TcxGridSortOrder; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAlignmentHorz: TAlignment; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - property SortOrder: TcxGridSortOrder read GetSortOrder; - end; - - TcxGridColumnHeaderHorzSizingEdgeViewInfo = class(TcxGridColumnHeaderAreaViewInfo) - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAlignmentHorz: TAlignment; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function OccupiesSpace: Boolean; override; - function ResidesInContent: Boolean; override; - public - procedure Calculate(const ABounds: TRect; var ATextAreaBounds: TRect); override; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - end; - - TcxGridColumnHeaderFilterButtonViewInfo = class(TcxGridColumnHeaderAreaViewInfo, - IcxGridFilterPopupOwner) - private - function GetActive: Boolean; - function GetDropDownWindowValue: TcxGridFilterPopup; - protected - { IcxGridFilterPopupOwner } - function GetItem: TcxCustomGridTableItem; - - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - procedure DropDown; override; - function EmulateMouseMoveAfterCalculate: Boolean; override; - function GetAlignmentHorz: TAlignment; override; - function GetAlwaysVisible: Boolean; virtual; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetVisible: Boolean; override; - function NeedsContainerHotTrack: Boolean; override; - function OccupiesSpace: Boolean; override; - procedure StateChanged(APrevState: TcxGridCellState); override; - - function CloseDropDownWindowOnDestruction: Boolean; override; - function DropDownWindowExists: Boolean; override; - function GetDropDownWindow: TcxCustomGridPopup; override; - function GetDropDownWindowOwnerBounds: TRect; override; - function IsDropDownWindowOwner: Boolean; override; - property DropDownWindow: TcxGridFilterPopup read GetDropDownWindowValue; - - property AlwaysVisible: Boolean read GetAlwaysVisible; - public - function MouseMove(AHitTest: TcxCustomGridHitTest; AShift: TShiftState): Boolean; override; - property Active: Boolean read GetActive; - end; - - TcxGridColumnHeaderGlyphViewInfo = class(TcxGridColumnHeaderAreaViewInfo) - private - function GetGlyph: TBitmap; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAlignmentHorz: TAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - public - property Glyph: TBitmap read GetGlyph; - end; - - // column header - - TcxGridColumnHeaderViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FAdditionalHeightAtTop: Integer; - FAdditionalWidthAtLeft: Integer; - FAreaViewInfos: TList; - FColumn: TcxGridColumn; - FContainer: TcxGridColumnContainerViewInfo; - FNeighbors: TcxNeighbors; - FRealWidth: Integer; - FTextAreaBounds: TRect; - FWidth: Integer; - - function GetAreaViewInfoCount: Integer; - function GetAreaViewInfo(Index: Integer): TcxGridColumnHeaderAreaViewInfo; - function GetGridView: TcxGridTableView; - function GetGridViewInfo: TcxGridTableViewInfo; - function GetHasTextOffsetLeft: Boolean; - function GetHasTextOffsetRight: Boolean; - function GetIndex: Integer; - function GetIsFixed: Boolean; - function GetRealBounds: TRect; - function GetRealWidth: Integer; - - procedure EnumAreaViewInfoClasses(AClass: TClass); - procedure CreateAreaViewInfos; - procedure DestroyAreaViewInfos; - protected - function AreasNeedHotTrack: Boolean; - function CalculateHasTextOffset(ASide: TAlignment): Boolean; virtual; - function CalculateHeight: Integer; override; - function CalculateRealWidth(Value: Integer): Integer; - procedure CalculateTextAreaBounds; virtual; - procedure CalculateVisible(ALeftBound, AWidth: Integer); virtual; - function CalculateWidth: Integer; override; - function CanFilter: Boolean; virtual; - function CanHorzSize: Boolean; virtual; - function CanPress: Boolean; virtual; - function CanShowHint: Boolean; override; - function CanSort: Boolean; virtual; - procedure CheckWidth(var Value: Integer); virtual; - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - procedure DoCalculateParams; override; - function GetAlignmentHorz: TAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetAreaBounds: TRect; override; - procedure GetAreaViewInfoClasses(AProc: TcxGridClassEnumeratorProc); virtual; - function GetBackgroundBitmap: TBitmap; override; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetCanvas: TcxCanvas; override; - function GetCaption: string; virtual; - class function GetCellBorderWidth(ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; virtual; - class function GetCellHeight(ATextHeight: Integer; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; override; - function GetDataOffset: Integer; virtual; - function GetHeight: Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetIsDesignSelected: Boolean; override; - function GetIsPressed: Boolean; virtual; - function GetMaxWidth: Integer; virtual; - function GetMinWidth: Integer; virtual; - function GetMultiLine: Boolean; override; - function GetMultiLinePainting: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetShowEndEllipsis: Boolean; override; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetWidth: Integer; override; - function HasCustomDraw: Boolean; override; - function HasFixedContentSpace: Boolean; virtual; - function HasGlyph: Boolean; virtual; - function HasHeaderAsContainer: Boolean; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - procedure Offset(DX, DY: Integer); override; - procedure SetWidth(Value: Integer); override; - procedure StateChanged(APrevState: TcxGridCellState); override; - - property AdditionalWidthAtLeft: Integer read FAdditionalWidthAtLeft write FAdditionalWidthAtLeft; - property Caption: string read GetCaption; - property GridView: TcxGridTableView read GetGridView; - property GridViewInfo: TcxGridTableViewInfo read GetGridViewInfo; - property HasTextOffsetLeft: Boolean read GetHasTextOffsetLeft; - property HasTextOffsetRight: Boolean read GetHasTextOffsetRight; - public - constructor Create(AContainer: TcxGridColumnContainerViewInfo; - AColumn: TcxGridColumn); reintroduce; virtual; - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function GetBestFitWidth: Integer; override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - procedure InitAutoWidthItem(AAutoWidthItem: TcxAutoWidthItem); - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - - property AreaViewInfoCount: Integer read GetAreaViewInfoCount; - property AreaViewInfos[Index: Integer]: TcxGridColumnHeaderAreaViewInfo read GetAreaViewInfo; - property Column: TcxGridColumn read FColumn; - property Container: TcxGridColumnContainerViewInfo read FContainer; - property DataOffset: Integer read GetDataOffset; - property Index: Integer read GetIndex; - property IsFixed: Boolean read GetIsFixed; - property IsPressed: Boolean read GetIsPressed; - property MaxWidth: Integer read GetMaxWidth; - property MinWidth: Integer read GetMinWidth; - property Neighbors: TcxNeighbors read FNeighbors write FNeighbors; - property RealBounds: TRect read GetRealBounds; - property RealWidth: Integer read GetRealWidth; - end; - - // header - - TcxGridHeaderViewInfoSpecificClass = class of TcxGridHeaderViewInfoSpecific; - - TcxGridHeaderViewInfoSpecific = class - private - FContainerViewInfo: TcxGridHeaderViewInfo; - function GetGridViewInfo: TcxGridTableViewInfo; - function GetItemHeight: Integer; - protected - function CalculateHeight: Integer; virtual; - function GetHeight: Integer; virtual; - public - constructor Create(AContainerViewInfo: TcxGridHeaderViewInfo); virtual; - property ContainerViewInfo: TcxGridHeaderViewInfo read FContainerViewInfo; - property GridViewInfo: TcxGridTableViewInfo read GetGridViewInfo; - property Height: Integer read GetHeight; - property ItemHeight: Integer read GetItemHeight; - end; - - TcxGridHeaderViewInfoClass = class of TcxGridHeaderViewInfo; - - TcxGridHeaderViewInfo = class(TcxGridColumnContainerViewInfo) - private - FSpecific: TcxGridHeaderViewInfoSpecific; - protected - function GetColumn(Index: Integer): TcxGridColumn; override; - function GetColumnCount: Integer; override; - - procedure AddIndicatorItems(AIndicatorViewInfo: TcxGridIndicatorViewInfo; ATopBound: Integer); virtual; - procedure CalculateColumnAutoWidths; virtual; - procedure CalculateColumnWidths; virtual; - function CalculateHeight: Integer; override; - procedure CalculateInvisible; override; - function CalculateItemHeight: Integer; override; - procedure CalculateItems; virtual; - procedure CalculateVisible; override; - function CalculateWidth: Integer; override; - function CanCalculateAutoWidths: Boolean; virtual; - function DrawColumnBackgroundHandler(ACanvas: TcxCanvas; const ABounds: TRect): Boolean; virtual; - function GetAlignment: TcxGridPartAlignment; override; - function GetAutoHeight: Boolean; override; - function GetColumnBackgroundBitmap: TBitmap; virtual; - function GetColumnNeighbors(AColumn: TcxGridColumn): TcxNeighbors; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIsAutoWidth: Boolean; override; - function GetIsScrollable: Boolean; override; - function GetItemMultiLinePainting(AItem: TcxGridColumnHeaderViewInfo): Boolean; override; - function GetKind: TcxGridColumnContainerKind; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - function GetWidth: Integer; override; - function GetZonesAreaBounds: TRect; override; - function IsAlwaysVisibleForCalculation: Boolean; virtual; - function IsHeightAssigned: Boolean; virtual; - procedure Offset(DX, DY: Integer); override; - procedure RecalculateItemVisibles; - - property ColumnBackgroundBitmap: TBitmap read GetColumnBackgroundBitmap; - public - constructor Create(AGridViewInfo: TcxCustomGridTableViewInfo); override; - destructor Destroy; override; - procedure AssignColumnWidths; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - property Specific: TcxGridHeaderViewInfoSpecific read FSpecific; - end; - - // group by box - - TcxGridGroupByBoxColumnHeaderViewInfo = class(TcxGridColumnHeaderViewInfo) - private - function GetContainer: TcxGridGroupByBoxViewInfo; - protected - function CalculateHeight: Integer; override; - function GetCaption: string; override; - function HasFixedContentSpace: Boolean; override; - function InheritedCalculateHeight: Integer; - public - property Container: TcxGridGroupByBoxViewInfo read GetContainer; - end; - - TcxGridGroupByBoxViewInfoClass = class of TcxGridGroupByBoxViewInfo; - - TcxGridGroupByBoxViewInfo = class(TcxGridColumnContainerViewInfo) - private - FCalculatingColumnWidth: Boolean; - function GetGroupByBoxVerOffset: Integer; - function GetLinkLineBounds(Index: Integer; Horizontal: Boolean): TRect; - protected - function GetColumn(Index: Integer): TcxGridColumn; override; - function GetColumnCount: Integer; override; - function GetItemClass: TcxGridColumnHeaderViewInfoClass; override; - - function CalculateHeight: Integer; override; - function CalculateItemHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAlignment: TcxGridPartAlignment; override; - function GetAlignmentVert: TcxAlignmentVert; override; - function GetBackgroundBitmap: TBitmap; override; - function GetColumnWidth(AColumn: TcxGridColumn): Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIsAutoWidth: Boolean; override; - function GetIsScrollable: Boolean; override; - function GetItemAreaBounds(AItem: TcxGridColumnHeaderViewInfo): TRect; override; - function GetKind: TcxGridColumnContainerKind; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - function GetTextAreaBounds: TRect; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - - property CalculatingColumnWidth: Boolean read FCalculatingColumnWidth; - property GroupByBoxVerOffset: Integer read GetGroupByBoxVerOffset; - public - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - property LinkLineBounds[Index: Integer; Horizontal: Boolean]: TRect read GetLinkLineBounds; - end; - - // footer - - TcxGridFooterCellViewInfoClass = class of TcxGridFooterCellViewInfo; - - TcxGridFooterCellViewInfo = class(TcxGridColumnHeaderViewInfo) - private - FSummaryItem: TcxDataSummaryItem; - function GetContainer: TcxGridFooterViewInfo; - function GetSummary: TcxDataSummary; - protected - procedure AfterCalculateBounds(var ABounds: TRect); override; - function CanPress: Boolean; override; - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - function GetAlignmentHorz: TAlignment; override; - function GetBackgroundBitmap: TBitmap; override; - procedure GetAreaViewInfoClasses(AProc: TcxGridClassEnumeratorProc); override; - function GetBorders: TcxBorders; override; - class function GetCellBorderWidth(ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIsDesignSelected: Boolean; override; - function GetIsPressed: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasCustomDraw: Boolean; override; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - property Summary: TcxDataSummary read GetSummary; - public - constructor Create(AContainer: TcxGridColumnContainerViewInfo; - ASummaryItem: TcxDataSummaryItem); reintroduce; virtual; - function GetBestFitWidth: Integer; override; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - property Container: TcxGridFooterViewInfo read GetContainer; - property SummaryItem: TcxDataSummaryItem read FSummaryItem; - end; - - TcxGridFooterViewInfoClass = class of TcxGridFooterViewInfo; - - TcxGridFooterViewInfo = class(TcxGridHeaderViewInfo) - private - FRowCount: Integer; - FSummaryItems: TList; - function GetMultipleSummaries: Boolean; - function GetRowCount: Integer; - function GetRowHeight: Integer; - protected - function CreateItem(AIndex: Integer): TcxGridColumnHeaderViewInfo; override; - procedure CreateItems; override; - procedure DestroyItems; override; - function GetColumn(Index: Integer): TcxGridColumn; override; - function GetColumnCount: Integer; override; - function GetItemClass: TcxGridColumnHeaderViewInfoClass; override; - procedure PrepareSummaryItems(ASummaryItems: TList); virtual; - - function CalculateBounds: TRect; override; - function CalculateHeight: Integer; override; - function CalculateItemHeight: Integer; override; - procedure CalculateItem(AIndex: Integer); virtual; - procedure CalculateItems; override; - function CalculateRowCount: Integer; virtual; - function CanCalculateAutoWidths: Boolean; override; - function GetAlignment: TcxGridPartAlignment; override; - function GetAutoHeight: Boolean; override; - function GetBackgroundBitmap: TBitmap; override; - function GetBordersBounds: TRect; virtual; - function GetBorders: TcxBorders; override; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetColumnWidth(AColumn: TcxGridColumn): Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIsAutoWidth: Boolean; override; - function GetIsScrollable: Boolean; override; - function GetItemAreaBounds(AItem: TcxGridColumnHeaderViewInfo): TRect; override; - function GetItemHeight(AColumn: TcxGridColumn): Integer; overload; virtual; - function GetItemHeight(AIndex: Integer): Integer; overload; - function GetItemHitTestClass: TcxCustomGridHitTestClass; virtual; - function GetItemLeftBound(AColumn: TcxGridColumn): Integer; overload; virtual; - function GetItemLeftBound(AIndex: Integer): Integer; overload; - function GetItemRowIndex(AIndex: Integer): Integer; virtual; - function GetItemsAreaBounds: TRect; override; - function GetItemTopBound(AColumn: TcxGridColumn): Integer; overload; virtual; - function GetItemTopBound(AIndex: Integer): Integer; overload; virtual; - function GetKind: TcxGridColumnContainerKind; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetSeparatorBounds: TRect; virtual; - function GetSeparatorWidth: Integer; virtual; - function GetSummaryItems: TcxDataSummaryItems; virtual; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - function HasSeparator: Boolean; virtual; - function IsAlwaysVisibleForCalculation: Boolean; override; - function IsColumnOnFirstLayer(AColumnIndex: Integer): Boolean; virtual; - function IsHeightAssigned: Boolean; override; - function IsItemVisible(AIndex: Integer): Boolean; virtual; - function IsMultilayerLayout: Boolean; virtual; - procedure Offset(DX, DY: Integer); override; - - property SummaryItemsList: TList read FSummaryItems; - public - function CanShowMultipleSummaries: Boolean; virtual; - function GetCellBestFitWidth(AColumn: TcxGridColumn): Integer; virtual; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - - property BordersBounds: TRect read GetBordersBounds; - property MultipleSummaries: Boolean read GetMultipleSummaries; - property RowCount: Integer read GetRowCount; - property RowHeight: Integer read GetRowHeight; - property SeparatorBounds: TRect read GetSeparatorBounds; - property SeparatorWidth: Integer read GetSeparatorWidth; - property SummaryItems: TcxDataSummaryItems read GetSummaryItems; - end; - - // indicator - - TcxCustomGridIndicatorItemViewInfoClass = class of TcxCustomGridIndicatorItemViewInfo; - - TcxCustomGridIndicatorItemViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FContainer: TcxGridIndicatorViewInfo; - function GetGridView: TcxGridTableView; - function GetGridViewInfo: TcxGridTableViewInfo; - protected - function CalculateWidth: Integer; override; - function CustomDraw(ACanvas: TcxCanvas): Boolean; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function HasCustomDraw: Boolean; override; - public - constructor Create(AContainer: TcxGridIndicatorViewInfo); reintroduce; virtual; - destructor Destroy; override; - property Container: TcxGridIndicatorViewInfo read FContainer; - property GridView: TcxGridTableView read GetGridView; - property GridViewInfo: TcxGridTableViewInfo read GetGridViewInfo; - end; - - TcxGridIndicatorHeaderItemViewInfo = class(TcxCustomGridIndicatorItemViewInfo) - private - function GetDropDownWindowValue: TcxCustomGridCustomizationPopup; - protected - function CalculateHeight: Integer; override; - function CanShowHint: Boolean; override; - function GetCellBoundsForHint: TRect; override; - function GetHintTextRect(const AMousePos: TPoint): TRect; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetHotTrack: Boolean; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetText: string; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function IsHintForText: Boolean; override; - function IsHintMultiLine: Boolean; override; - function SupportsQuickCustomization: Boolean; virtual; - - function CloseDropDownWindowOnDestruction: Boolean; override; - function DropDownWindowExists: Boolean; override; - function GetDropDownWindow: TcxCustomGridPopup; override; - property DropDownWindow: TcxCustomGridCustomizationPopup read GetDropDownWindowValue; - end; - - TcxGridIndicatorRowItemViewInfoClass = class of TcxGridIndicatorRowItemViewInfo; - - TcxGridIndicatorRowItemViewInfo = class(TcxCustomGridIndicatorItemViewInfo) - private - FRowViewInfo: TcxCustomGridRowViewInfo; - function GetGridRecord: TcxCustomGridRow; - function GetGridView: TcxGridTableView; - protected - function CalculateHeight: Integer; override; - function GetBackgroundBitmap: TBitmap; override; - function GetIndicatorKind: TcxIndicatorKind; virtual; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetRowSizingEdgeBounds: TRect; virtual; - procedure InitHitTest(AHitTest: TcxCustomGridHitTest); override; - property RowSizingEdgeBounds: TRect read GetRowSizingEdgeBounds; - public - destructor Destroy; override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function MouseDown(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - property GridRecord: TcxCustomGridRow read GetGridRecord; - property GridView: TcxGridTableView read GetGridView; - property IndicatorKind: TcxIndicatorKind read GetIndicatorKind; - property RowViewInfo: TcxCustomGridRowViewInfo read FRowViewInfo write FRowViewInfo; - end; - - TcxGridIndicatorFooterItemViewInfo = class(TcxCustomGridIndicatorItemViewInfo) - private - function GetSeparatorWidth: Integer; - protected - function CalculateHeight: Integer; override; - function GetBackgroundBitmap: TBitmap; override; - function GetBorders: TcxBorders; override; - function GetBordersBounds: TRect; virtual; - function GetBorderWidth(AIndex: TcxBorder): Integer; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetSeparatorBounds: TRect; virtual; - function HasSeparator: Boolean; - public - property BordersBounds: TRect read GetBordersBounds; - property SeparatorBounds: TRect read GetSeparatorBounds; - property SeparatorWidth: Integer read GetSeparatorWidth; - end; - - TcxGridIndicatorViewInfoClass = class of TcxGridIndicatorViewInfo; - - TcxGridIndicatorViewInfo = class(TcxCustomGridViewCellViewInfo) - private - FItems: TList; - function GetCount: Integer; - function GetGridView: TcxGridTableView; - function GetGridViewInfo: TcxGridTableViewInfo; - function GetItem(Index: Integer): TcxCustomGridIndicatorItemViewInfo; - procedure DestroyItems; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetAlwaysVisible: Boolean; virtual; - function GetBackgroundBitmap: TBitmap; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetPainterClass: TcxCustomGridCellPainterClass; override; - function GetRowItemClass(ARowViewInfo: TcxCustomGridRowViewInfo): TcxGridIndicatorRowItemViewInfoClass; virtual; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - function GetWidth: Integer; override; - public - constructor Create(AGridViewInfo: TcxGridTableViewInfo); reintroduce; virtual; - destructor Destroy; override; - function AddItem(AItemClass: TcxCustomGridIndicatorItemViewInfoClass): TcxCustomGridIndicatorItemViewInfo; overload; - function AddItem(ATopBound, AHeight: Integer; - AItemClass: TcxCustomGridIndicatorItemViewInfoClass): TcxCustomGridIndicatorItemViewInfo; overload; - function AddRowItem(ARowViewInfo: TcxCustomGridRowViewInfo): TcxCustomGridIndicatorItemViewInfo; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - procedure CalculateRowItem(ARowViewInfo: TcxCustomGridRowViewInfo; - AItem: TcxCustomGridIndicatorItemViewInfo); - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function GetRowItemBounds(AGridRecord: TcxCustomGridRow): TRect; - - property AlwaysVisible: Boolean read GetAlwaysVisible; - property Count: Integer read GetCount; - property GridView: TcxGridTableView read GetGridView; - property GridViewInfo: TcxGridTableViewInfo read GetGridViewInfo; - property Items[Index: Integer]: TcxCustomGridIndicatorItemViewInfo read GetItem; - end; - - // custom row - - TcxGridRowFooterCellViewInfo = class(TcxGridFooterCellViewInfo) - private - function GetContainer: TcxGridRowFooterViewInfo; - function GetGridRecord: TcxCustomGridRow; - protected - function GetText: string; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - public - property Container: TcxGridRowFooterViewInfo read GetContainer; - property GridRecord: TcxCustomGridRow read GetGridRecord; - end; - - TcxGridRowFooterViewInfoClass = class of TcxGridRowFooterViewInfo; - - TcxGridRowFooterViewInfo = class(TcxGridFooterViewInfo) - private - FContainer: TcxGridRowFootersViewInfo; - FLevel: Integer; - function GetIndent: Integer; - function GetGridRecord: TcxCustomGridRow; - function GetGroupLevel: Integer; - function GetRowViewInfo: TcxCustomGridRowViewInfo; - protected - function CalculateHeight: Integer; override; - function CalculateWidth: Integer; override; - function GetColumnWidth(AColumn: TcxGridColumn): Integer; override; - function GetHitTestClass: TcxCustomGridHitTestClass; override; - function GetIsPart: Boolean; override; - function GetItemAreaBounds(AItem: TcxGridColumnHeaderViewInfo): TRect; override; - function GetItemClass: TcxGridColumnHeaderViewInfoClass; override; - function GetItemHitTestClass: TcxCustomGridHitTestClass; override; - function GetItemMultiLinePainting(AItem: TcxGridColumnHeaderViewInfo): Boolean; override; - function GetSummaryItems: TcxDataSummaryItems; override; - procedure GetViewParams(var AParams: TcxViewParams); override; - function GetVisible: Boolean; override; - function GetVisualLevel: Integer; virtual; - function HasSeparator: Boolean; override; - procedure PrepareSummaryItems(ASummaryItems: TList); override; - property Indent: Integer read GetIndent; - public - constructor Create(AContainer: TcxGridRowFootersViewInfo; ALevel: Integer); reintroduce; virtual; - function CanShowMultipleSummaries: Boolean; override; - property Container: TcxGridRowFootersViewInfo read FContainer; - property GridRecord: TcxCustomGridRow read GetGridRecord; - property GroupLevel: Integer read GetGroupLevel; - property Level: Integer read FLevel; - property RowViewInfo: TcxCustomGridRowViewInfo read GetRowViewInfo; - property VisualLevel: Integer read GetVisualLevel; - end; - - TcxGridRowFootersViewInfoClass = class of TcxGridRowFootersViewInfo; - - TcxGridRowFootersViewInfo = class - private - FHeight: Integer; - FItems: TList; - FRowViewInfo: TcxCustomGridRowViewInfo; - function GetCount: Integer; - function GetGridViewInfo: TcxGridTableViewInfo; - function GetHeight: Integer; - function GetItem(Index: Integer): TcxGridRowFooterViewInfo; - function GetVisibleItem(ALevel: Integer): TcxGridRowFooterViewInfo; - procedure CreateItems; - procedure DestroyItems; - protected - procedure BeforeRecalculation; virtual; - procedure Calculate(ALeftBound, ATopBound: Integer); virtual; - function CalculateHeight: Integer; virtual; - function GetItemClass: TcxGridRowFooterViewInfoClass; virtual; - public - constructor Create(ARowViewInfo: TcxCustomGridRowViewInfo); virtual; - destructor Destroy; override; - function GetCellBestFitWidth(AColumn: TcxGridColumn): Integer; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; virtual; - function GetTopBound(ALevel: Integer; var ATopBound: Integer): Boolean; - procedure Offset(DX, DY: Integer); virtual; - procedure Paint; - - property Count: Integer read GetCount; - property GridViewInfo: TcxGridTableViewInfo read GetGridViewInfo; - property Items[Index: Integer]: TcxGridRowFooterViewInfo read GetItem; default; - property Height: Integer read GetHeight; - property RowViewInfo: TcxCustomGridRowViewInfo read FRowViewInfo; - property VisibleItems[ALevel: Integer]: TcxGridRowFooterViewInfo read GetVisibleItem; - end; - - TcxCustomGridRowViewInfoClass = class of TcxCustomGridRowViewInfo; - - TcxCustomGridRowViewInfo = class(TcxCustomGridRecordViewInfo) - private - FFootersViewInfo: TcxGridRowFootersViewInfo; - FIndicatorItem: TcxCustomGridIndicatorItemViewInfo; - function GetCacheItem: TcxGridTableViewInfoCacheItem; - function GetGridView: TcxGridTableView; - function GetGridLines: TcxGridLines; - function GetGridRecord: TcxCustomGridRow; - function GetGridViewInfo: TcxGridTableViewInfo; - function GetLevel: Integer; - function GetLevelIndent: Integer; - function GetLevelIndentBounds(Index: Integer): TRect; - function GetLevelIndentHorzLineBounds(Index: Integer): TRect; - function GetLevelIndentSpaceBounds(Index: Integer): TRect; - function GetLevelIndentVertLineBounds(Index: Integer): TRect; - function GetRecordsViewInfo: TcxGridRowsViewInfo; - function GetVisualLevel: Integer; - procedure CreateFootersViewInfo; - procedure DestroyFootersViewInfo; - procedure RecreateFootersViewInfo; - protected - procedure AfterRowsViewInfoCalculate; virtual; - procedure AfterRowsViewInfoOffset; virtual; - procedure CalculateExpandButtonBounds(var ABounds: TRect); override; - function CalculateHeight: Integer; override; - function CalculateLevelIndentHorzLineBounds(ALevel: Integer; const ABounds: TRect): TRect; - function CalculateLevelIndentSpaceBounds(ALevel: Integer; const ABounds: TRect): TRect; - function CalculateLevelIndentVertLineBounds(ALevel: Integer; const ABounds: TRect): TRect; - function CalculateWidth: Integer; override; - function CanSize: Boolean; virtual; - procedure CheckRowHeight(var AValue: Integer); virtual; - function GetAutoHeight: Boolean; override; - function GetBaseHeight: Integer; virtual; - function GetBottomPartHeight: Integer; virtual; - function GetCellTransparent(ACell: TcxGridTableCellViewInfo): Boolean; override; - function GetContentBounds: TRect; override; - function GetContentIndent: Integer; virtual; - function GetContentWidth: Integer; override; - function GetDataHeight: Integer; virtual; - function GetDataIndent: Integer; virtual; - function GetDataWidth: Integer; virtual; - function GetFocusRectBounds: TRect; override; - function GetFootersViewInfoClass: TcxGridRowFootersViewInfoClass; virtual; - function GetLastHorzGridLineBounds: TRect; virtual; - function GetMaxHeight: Integer; virtual; - function GetNonBaseHeight: Integer; virtual; - function GetRowHeight: Integer; virtual; - function GetSeparatorBounds: TRect; virtual; - function GetSeparatorColor: TColor; virtual; - function GetSeparatorWidth: Integer; virtual; - function GetShowSeparator: Boolean; virtual; - function GetVisible: Boolean; override; - function GetWidth: Integer; override; - function HasAnyFooter(ALevel: Integer): Boolean; - function HasFooter(ALevel: Integer): Boolean; virtual; - function HasFooters: Boolean; virtual; - function HasLastHorzGridLine: Boolean; virtual; - function IsFullyVisible: Boolean; virtual; - procedure Offset(DX, DY: Integer); override; - procedure SetRowHeight(Value: Integer); virtual; abstract; - - property BaseHeight: Integer read GetBaseHeight; - property BottomPartHeight: Integer read GetBottomPartHeight; - property CacheItem: TcxGridTableViewInfoCacheItem read GetCacheItem; - property IndicatorItem: TcxCustomGridIndicatorItemViewInfo read FIndicatorItem; - property LastHorzGridLineBounds: TRect read GetLastHorzGridLineBounds; - property Level: Integer read GetLevel; - property LevelIndent: Integer read GetLevelIndent; - property NonBaseHeight: Integer read GetNonBaseHeight; - property RowHeight: Integer read GetRowHeight write SetRowHeight; - property ShowSeparator: Boolean read GetShowSeparator; - public - constructor Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); override; - destructor Destroy; override; - procedure BeforeRecalculation; override; - procedure Calculate(ALeftBound, ATopBound: Integer; AWidth: Integer = -1; - AHeight: Integer = -1); override; - function Click(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; override; - function GetBoundsForInvalidate(AItem: TcxCustomGridTableItem): TRect; override; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function HasSeparator: Boolean; - - property ContentIndent: Integer read GetContentIndent; - property DataHeight: Integer read GetDataHeight; - property DataIndent: Integer read GetDataIndent; - property DataWidth: Integer read GetDataWidth; - property FootersViewInfo: TcxGridRowFootersViewInfo read FFootersViewInfo; - property GridView: TcxGridTableView read GetGridView; - property GridLines: TcxGridLines read GetGridLines; - property GridRecord: TcxCustomGridRow read GetGridRecord; - property GridViewInfo: TcxGridTableViewInfo read GetGridViewInfo; - property LevelIndentBounds[Index: Integer]: TRect read GetLevelIndentBounds; - property LevelIndentHorzLineBounds[Index: Integer]: TRect read GetLevelIndentHorzLineBounds; - property LevelIndentSpaceBounds[Index: Integer]: TRect read GetLevelIndentSpaceBounds; - property LevelIndentVertLineBounds[Index: Integer]: TRect read GetLevelIndentVertLineBounds; - property MaxHeight: Integer read GetMaxHeight; - property RecordsViewInfo: TcxGridRowsViewInfo read GetRecordsViewInfo; - property SeparatorBounds: TRect read GetSeparatorBounds; - property SeparatorColor: TColor read GetSeparatorColor; - property SeparatorWidth: Integer read GetSeparatorWidth; - property VisualLevel: Integer read GetVisualLevel; - end; - - // rows - - TcxGridRowsViewInfoClass = class of TcxGridRowsViewInfo; - - TcxGridRowsViewInfo = class(TcxCustomGridRecordsViewInfo) - private - FDataRowHeight: Integer; - FFilterRowViewInfo: TcxCustomGridRowViewInfo; - FGroupRowHeight: Integer; - FNewItemRowViewInfo: TcxCustomGridRowViewInfo; - FRestHeight: Integer; - FRowHeight: Integer; - function GetFilterRowViewInfo: TcxCustomGridRowViewInfo; - function GetGridView: TcxGridTableView; - function GetGridLines: TcxGridLines; - function GetGridViewInfo: TcxGridTableViewInfo; - function GetHeaderViewInfo: TcxGridHeaderViewInfo; - function GetItem(Index: Integer): TcxCustomGridRowViewInfo; - function GetNewItemRowViewInfo: TcxCustomGridRowViewInfo; - function GetPainterClassValue: TcxGridRowsPainterClass; - function GetViewData: TcxGridViewData; - protected - FIsFirstRowFullyVisible: Boolean; - FPartVisibleCount: Integer; - procedure AfterCalculate; override; - procedure AfterOffset; override; - procedure Calculate; override; - function CalculateBounds: TRect; override; - procedure CalculateConsts; virtual; - function CalculateContentBounds: TRect; override; - function CalculateDataRowHeight: Integer; virtual; - function CalculateGroupRowDefaultHeight(AMinHeight: Boolean): Integer; virtual; - function CalculateGroupRowHeight: Integer; virtual; - function CalculateRestHeight(ATopBound: Integer): Integer; virtual; - function CalculateRowDefaultHeight: Integer; virtual; - function CalculateRowHeight: Integer; virtual; - procedure CalculateVisibleCount; override; - function GetAutoDataCellHeight: Boolean; override; - function GetCommonDataRowHeight: Integer; virtual; - function GetFilterRowViewInfoClass: TcxCustomGridRowViewInfoClass; virtual; - function GetGroupBackgroundBitmap: TBitmap; virtual; - function GetGroupRowSeparatorWidth: Integer; virtual; - function GetItemLeftBound(AIndex: Integer): Integer; override; - function GetItemsOffset(AItemCountDelta: Integer): Integer; override; - function GetItemTopBound(AIndex: Integer): Integer; override; - function GetIsScrollable: Boolean; virtual; - function GetNewItemRowViewInfoClass: TcxCustomGridRowViewInfoClass; virtual; - function GetPainterClass: TcxCustomGridRecordsPainterClass; override; - function GetRowWidth: Integer; virtual; - function GetSeparatorWidth: Integer; virtual; - function HasFilterRow: Boolean; - function HasLastHorzGridLine(ARowViewInfo: TcxCustomGridRowViewInfo): Boolean; virtual; - function HasNewItemRow: Boolean; - function IsFilterRowVisible: Boolean; virtual; - function IsNewItemRowVisible: Boolean; virtual; - procedure NotifyItemsCalculationFinished; - procedure OffsetItem(AIndex, AOffset: Integer); override; - - property GridView: TcxGridTableView read GetGridView; - property GridViewInfo: TcxGridTableViewInfo read GetGridViewInfo; - property HeaderViewInfo: TcxGridHeaderViewInfo read GetHeaderViewInfo; - property IsScrollable: Boolean read GetIsScrollable; - property ViewData: TcxGridViewData read GetViewData; - public - destructor Destroy; override; - procedure AfterConstruction; override; - function CalculateCustomGroupRowHeight(AMinHeight: Boolean; AParams: TcxViewParams): Integer; virtual; - function CanDataRowSize: Boolean; virtual; - function GetCellHeight(ACellContentHeight: Integer): Integer; override; - function GetDataRowCellsAreaViewInfoClass: TClass; virtual; - function GetFooterCellBestFitWidth(AColumn: TcxGridColumn): Integer; - function GetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function GetRealItem(ARecord: TcxCustomGridRecord): TcxCustomGridRecordViewInfo; override; - function GetRestHeight(ATopBound: Integer): Integer; virtual; - function IsCellMultiLine(AItem: TcxCustomGridTableItem): Boolean; override; - function IsDataRowHeightAssigned: Boolean; virtual; - procedure Offset(DX, DY: Integer); override; - - property CommonDataRowHeight: Integer read GetCommonDataRowHeight; - property DataRowHeight: Integer read FDataRowHeight; - property FilterRowViewInfo: TcxCustomGridRowViewInfo read GetFilterRowViewInfo; - property GridLines: TcxGridLines read GetGridLines; - property GroupBackgroundBitmap: TBitmap read GetGroupBackgroundBitmap; - property GroupRowHeight: Integer read FGroupRowHeight write FGroupRowHeight; - property GroupRowSeparatorWidth: Integer read GetGroupRowSeparatorWidth; - property IsFirstRowFullyVisible: Boolean read FIsFirstRowFullyVisible; - property Items[Index: Integer]: TcxCustomGridRowViewInfo read GetItem; default; - property NewItemRowViewInfo: TcxCustomGridRowViewInfo read GetNewItemRowViewInfo; - property PainterClass: TcxGridRowsPainterClass read GetPainterClassValue; - property PartVisibleCount: Integer read FPartVisibleCount; - property RowHeight: Integer read FRowHeight write FRowHeight; - property RowWidth: Integer read GetRowWidth; - property SeparatorWidth: Integer read GetSeparatorWidth; - end; - - // table - - TcxGridTableViewInfo = class(TcxCustomGridTableViewInfo) - private - FDataWidth: Integer; - FExpandButtonIndent: Integer; - FFooterViewInfo: TcxGridFooterViewInfo; - FGroupByBoxViewInfo: TcxGridGroupByBoxViewInfo; - FHeaderViewInfo: TcxGridHeaderViewInfo; - FIndicatorViewInfo: TcxGridIndicatorViewInfo; - FLevelIndent: Integer; - FPrevDataRowHeight: Integer; - - function GetController: TcxGridTableController; - function GetDataWidth: Integer; - function GetGridView: TcxGridTableView; - function GetGridLineColor: TColor; - function GetGridLines: TcxGridLines; - function GetLeftPos: Integer; - function GetLevelIndentBackgroundBitmap: TBitmap; - function GetLevelIndentColor(Index: Integer): TColor; - function GetRecordsViewInfo: TcxGridRowsViewInfo; - function GetViewData: TcxGridViewData; - protected - procedure AfterCalculating; override; - procedure BeforeCalculating; override; - procedure CreateViewInfos; override; - procedure DestroyViewInfos(AIsRecreating: Boolean); override; - procedure Calculate; override; - function CalculateClientBounds: TRect; override; - function CalculateDataWidth: Integer; virtual; - procedure CalculateExpandButtonParams; virtual; - procedure CalculateHeight(const AMaxSize: TPoint; var AHeight: Integer; - var AFullyVisible: Boolean); override; - function CalculatePartBounds(APart: TcxCustomGridPartViewInfo): TRect; override; - procedure CalculateParts; virtual; - function CalculateVisibleEqualHeightRecordCount: Integer; override; - procedure CalculateWidth(const AMaxSize: TPoint; var AWidth: Integer); override; - function DoGetHitTest(const P: TPoint): TcxCustomGridHitTest; override; - function GetDefaultGridModeBufferCount: Integer; override; - function GetFirstItemAdditionalWidth: Integer; virtual; - function GetGridLineWidth: Integer; virtual; - function GetLevelSeparatorColor: TColor; virtual; - function GetNonRecordsAreaHeight(ACheckScrollBar: Boolean): Integer; override; - function GetScrollableAreaBoundsHorz: TRect; override; - function GetScrollableAreaBoundsVert: TRect; override; - function GetVisualLevelCount: Integer; virtual; - procedure Offset(DX, DY: Integer); override; - procedure RecreateViewInfos; override; - function SupportsAutoHeight: Boolean; virtual; - function SupportsGroupSummariesAlignedWithColumns: Boolean; virtual; - function SupportsMultipleFooterSummaries: Boolean; virtual; - - function GetFooterPainterClass: TcxGridFooterPainterClass; virtual; - function GetFooterViewInfoClass: TcxGridFooterViewInfoClass; virtual; - function GetGroupByBoxViewInfoClass: TcxGridGroupByBoxViewInfoClass; virtual; - function GetHeaderViewInfoClass: TcxGridHeaderViewInfoClass; virtual; - function GetIndicatorViewInfoClass: TcxGridIndicatorViewInfoClass; virtual; - function GetHeaderViewInfoSpecificClass: TcxGridHeaderViewInfoSpecificClass; virtual; - function GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; override; - - property Controller: TcxGridTableController read GetController; - property ViewData: TcxGridViewData read GetViewData; - public - function GetCellBorders(AIsRight, AIsBottom: Boolean): TcxBorders; virtual; - function GetCellHeight(AIndex, ACellHeight: Integer): Integer; virtual; - function GetCellTopOffset(AIndex, ACellHeight: Integer): Integer; virtual; - function GetOffsetBounds(AItemsOffset: Integer; out AUpdateBounds: TRect): TRect; overload; virtual; - function GetOffsetBounds(DX, DY: Integer; out AUpdateBounds: TRect): TRect; overload; virtual; - function GetVisualLevel(ALevel: Integer): Integer; virtual; - - // for extended lookup edit - function GetNearestPopupHeight(AHeight: Integer; AAdditionalRecord: Boolean = False): Integer; override; - function GetPopupHeight(ADropDownRowCount: Integer): Integer; override; - - property DataWidth: Integer read GetDataWidth; - property ExpandButtonIndent: Integer read FExpandButtonIndent write FExpandButtonIndent; - property FirstItemAdditionalWidth: Integer read GetFirstItemAdditionalWidth; - property FooterViewInfo: TcxGridFooterViewInfo read FFooterViewInfo; - property GridLineColor: TColor read GetGridLineColor; - property GridLines: TcxGridLines read GetGridLines; - property GridLineWidth: Integer read GetGridLineWidth; - property GridView: TcxGridTableView read GetGridView; - property GroupByBoxViewInfo: TcxGridGroupByBoxViewInfo read FGroupByBoxViewInfo; - property HeaderViewInfo: TcxGridHeaderViewInfo read FHeaderViewInfo; - property IndicatorViewInfo: TcxGridIndicatorViewInfo read FIndicatorViewInfo; - property LeftPos: Integer read GetLeftPos; - property LevelIndent: Integer read FLevelIndent write FLevelIndent; - property LevelIndentBackgroundBitmap: TBitmap read GetLevelIndentBackgroundBitmap; - property LevelIndentColors[Index: Integer]: TColor read GetLevelIndentColor; - property LevelSeparatorColor: TColor read GetLevelSeparatorColor; - property RecordsViewInfo: TcxGridRowsViewInfo read GetRecordsViewInfo; - property VisualLevelCount: Integer read GetVisualLevelCount; - end; - - // cache - - TcxGridTableViewInfoCacheItem = class(TcxCustomGridTableViewInfoCacheItem) - private - FIsPreviewHeightAssigned: Boolean; - FPreviewHeight: Integer; - procedure SetPreviewHeight(Value: Integer); - public - procedure UnassignValues(AKeepMaster: Boolean); override; - property IsPreviewHeightAssigned: Boolean read FIsPreviewHeightAssigned - write FIsPreviewHeightAssigned; - property PreviewHeight: Integer read FPreviewHeight write SetPreviewHeight; - end; - - TcxGridMasterTableViewInfoCacheItem = class(TcxGridTableViewInfoCacheItem) - private - FIsDetailsSiteFullyVisibleAssigned: Boolean; - FIsDetailsSiteHeightAssigned: Boolean; - FIsDetailsSiteNormalHeightAssigned: Boolean; - FIsDetailsSiteWidthAssigned: Boolean; - FDetailsSiteFullyVisible: Boolean; - FDetailsSiteHeight: Integer; - FDetailsSiteNormalHeight: Integer; - FDetailsSiteWidth: Integer; - FUnassigningValues: Boolean; - function GetGridRecord: TcxGridMasterDataRow; - function GetIsDetailsSiteCachedInfoAssigned: Boolean; - procedure SetDetailsSiteFullyVisible(Value: Boolean); - procedure SetDetailsSiteHeight(Value: Integer); - procedure SetDetailsSiteNormalHeight(Value: Integer); - procedure SetDetailsSiteWidth(Value: Integer); - protected - property GridRecord: TcxGridMasterDataRow read GetGridRecord; - public - DetailsSiteCachedInfo: TcxCustomGridDetailsSiteViewInfoCachedInfo; - destructor Destroy; override; - procedure UnassignValues(AKeepMaster: Boolean); override; - property IsDetailsSiteCachedInfoAssigned: Boolean read GetIsDetailsSiteCachedInfoAssigned; - property IsDetailsSiteFullyVisibleAssigned: Boolean read FIsDetailsSiteFullyVisibleAssigned write FIsDetailsSiteFullyVisibleAssigned; - property IsDetailsSiteHeightAssigned: Boolean read FIsDetailsSiteHeightAssigned write FIsDetailsSiteHeightAssigned; - property IsDetailsSiteNormalHeightAssigned: Boolean read FIsDetailsSiteNormalHeightAssigned write FIsDetailsSiteNormalHeightAssigned; - property IsDetailsSiteWidthAssigned: Boolean read FIsDetailsSiteWidthAssigned write FIsDetailsSiteWidthAssigned; - property DetailsSiteFullyVisible: Boolean read FDetailsSiteFullyVisible write SetDetailsSiteFullyVisible; - property DetailsSiteHeight: Integer read FDetailsSiteHeight write SetDetailsSiteHeight; - property DetailsSiteNormalHeight: Integer read FDetailsSiteNormalHeight write SetDetailsSiteNormalHeight; - property DetailsSiteWidth: Integer read FDetailsSiteWidth write SetDetailsSiteWidth; - end; - - { view } - - // column - - TcxGridColumnOptions = class(TcxCustomGridTableItemOptions) - private - FCellMerging: Boolean; - FGroupFooters: Boolean; - FHorzSizing: Boolean; - function GetGridView: TcxGridTableView; - procedure SetCellMerging(Value: Boolean); - procedure SetGroupFooters(Value: Boolean); - procedure SetHorzSizing(Value: Boolean); - protected - property GridView: TcxGridTableView read GetGridView; - public - constructor Create(AItem: TcxCustomGridTableItem); override; - procedure Assign(Source: TPersistent); override; - published - property CellMerging: Boolean read FCellMerging write SetCellMerging default False; - property GroupFooters: Boolean read FGroupFooters write SetGroupFooters default True; - property Grouping; - property HorzSizing: Boolean read FHorzSizing write SetHorzSizing default True; - property Moving; - property ShowCaption; - property SortByDisplayText; - property Sorting; - end; - - TcxGridGetFooterStyleExEvent = procedure(Sender: TcxGridTableView; ARow: TcxCustomGridRow; - AColumn: TcxGridColumn; AFooterGroupLevel: Integer; var AStyle: TcxStyle) of object; - TcxGridGetFooterSummaryStyleEvent = procedure(AView: TcxGridTableView; ARow: TcxCustomGridRow; - AColumn: TcxGridColumn; AFooterGroupLevel: Integer; ASummaryItem: TcxDataSummaryItem; var AStyle: TcxStyle) of object; - TcxGridGetGroupSummaryStyleEvent = procedure(Sender: TcxGridTableView; ARow: TcxGridGroupRow; - AColumn: TcxGridColumn; ASummaryItem: TcxDataSummaryItem; var AStyle: TcxStyle) of object; - TcxGridGetHeaderStyleEvent = procedure(Sender: TcxGridTableView; - AColumn: TcxGridColumn; {$IFDEF BCB}var{$ELSE}out{$ENDIF} AStyle: TcxStyle) of object; - - TcxGridColumnStyles = class(TcxCustomGridTableItemStyles) - private - FOnGetFooterStyle: TcxGridGetCellStyleEvent; - FOnGetFooterStyleEx: TcxGridGetFooterStyleExEvent; - FOnGetFooterSummaryStyle: TcxGridGetFooterSummaryStyleEvent; - FOnGetGroupSummaryStyle: TcxGridGetGroupSummaryStyleEvent; - FOnGetHeaderStyle: TcxGridGetHeaderStyleEvent; - function GetGridViewValue: TcxGridTableView; - function GetItem: TcxGridColumn; - procedure SetOnGetFooterStyle(Value: TcxGridGetCellStyleEvent); - procedure SetOnGetFooterStyleEx(Value: TcxGridGetFooterStyleExEvent); - procedure SetOnGetFooterSummaryStyle(Value: TcxGridGetFooterSummaryStyleEvent); - procedure SetOnGetGroupSummaryStyle(Value: TcxGridGetGroupSummaryStyleEvent); - procedure SetOnGetHeaderStyle(Value: TcxGridGetHeaderStyleEvent); - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - public - procedure Assign(Source: TPersistent); override; - procedure GetFooterParams(ARow: TcxCustomGridRow; AFooterGroupLevel: Integer; - ASummaryItem: TcxDataSummaryItem; out AParams: TcxViewParams); virtual; - procedure GetGroupSummaryParams(ARow: TcxGridGroupRow; ASummaryItem: TcxDataSummaryItem; - out AParams: TcxViewParams); virtual; - procedure GetHeaderParams(out AParams: TcxViewParams); virtual; - property GridView: TcxGridTableView read GetGridViewValue; - property Item: TcxGridColumn read GetItem; - published - property Footer: TcxStyle index isFooter read GetValue write SetValue; - property GroupSummary: TcxStyle index isGroupSummary read GetValue write SetValue; - property Header: TcxStyle index isHeader read GetValue write SetValue; - property OnGetFooterStyle: TcxGridGetCellStyleEvent read FOnGetFooterStyle write SetOnGetFooterStyle; - property OnGetFooterStyleEx: TcxGridGetFooterStyleExEvent read FOnGetFooterStyleEx write SetOnGetFooterStyleEx; - property OnGetFooterSummaryStyle: TcxGridGetFooterSummaryStyleEvent read FOnGetFooterSummaryStyle write SetOnGetFooterSummaryStyle; - property OnGetGroupSummaryStyle: TcxGridGetGroupSummaryStyleEvent read FOnGetGroupSummaryStyle write SetOnGetGroupSummaryStyle; - property OnGetHeaderStyle: TcxGridGetHeaderStyleEvent read FOnGetHeaderStyle write SetOnGetHeaderStyle; - end; - -{$IFNDEF BCB} - TcxGridSummariesIndex = (siFooter, siGroupFooter, siGroup); -{$ELSE} - TcxGridSummariesIndex = Integer; -{$ENDIF} - - TcxGridColumnSummaryClass = class of TcxGridColumnSummary; - - TcxGridColumnSummary = class(TcxCustomGridTableItemCustomOptions) - private - function GetDataController: TcxCustomDataController; - function GetFormat(Index: TcxGridSummariesIndex): string; - function GetKind(Index: TcxGridSummariesIndex): TcxSummaryKind; - function GetSortByGroupFooterSummary: Boolean; - function GetSortByGroupSummary: Boolean; - procedure SetFormat(Index: TcxGridSummariesIndex; const Value: string); - procedure SetKind(Index: TcxGridSummariesIndex; Value: TcxSummaryKind); - procedure SetSortByGroupFooterSummary(Value: Boolean); - procedure SetSortByGroupSummary(Value: Boolean); - protected - function GetSummaryItems(AIndex: TcxGridSummariesIndex): TcxDataSummaryItems; - function GetSummaryItemsPosition(AIndex: TcxGridSummariesIndex): TcxSummaryPosition; - property DataController: TcxCustomDataController read GetDataController; - public - procedure Assign(Source: TPersistent); override; - published - property FooterKind: TcxSummaryKind index siFooter read GetKind write SetKind stored False; - property FooterFormat: string index siFooter read GetFormat write SetFormat stored False; - property GroupFooterKind: TcxSummaryKind index siGroupFooter read GetKind write SetKind stored False; - property GroupFooterFormat: string index siGroupFooter read GetFormat write SetFormat stored False; - property GroupKind: TcxSummaryKind index siGroup read GetKind write SetKind stored False; - property GroupFormat: string index siGroup read GetFormat write SetFormat stored False; - property SortByGroupFooterSummary: Boolean read GetSortByGroupFooterSummary write SetSortByGroupFooterSummary stored False; - property SortByGroupSummary: Boolean read GetSortByGroupSummary write SetSortByGroupSummary stored False; - end; - - TcxGridColumnCompareRowValuesEvent = procedure(Sender: TcxGridColumn; - ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: TcxEditValue; - ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: TcxEditValue; - var AAreEqual: Boolean) of object; - TcxGridColumnCompareValuesEvent = procedure(Sender: TcxGridColumn; - AProperties1: TcxCustomEditProperties; const AValue1: TcxEditValue; - AProperties2: TcxCustomEditProperties; const AValue2: TcxEditValue; var AAreEqual: Boolean) of object; - TcxGridColumnCustomDrawHeaderEvent = procedure(Sender: TcxGridTableView; ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean) of object; - TcxGridGroupSummaryCellCustomDrawEvent = procedure(Sender: TObject; ACanvas: TcxCanvas; - ARow: TcxGridGroupRow; AColumn: TcxGridColumn; ASummaryItem: TcxDataSummaryItem; - AViewInfo: TcxCustomGridViewCellViewInfo; var ADone: Boolean) of object; - - TcxGridColumn = class(TcxCustomGridTableItem) - private - FFooterAlignmentHorz: TAlignment; - FGroupSummaryAlignment: TAlignment; - FHeaderGlyph: TBitmap; - FHeaderGlyphAlignmentHorz: TAlignment; - FHeaderGlyphAlignmentVert: TcxAlignmentVert; - FIsFooterAlignmentHorzAssigned: Boolean; - FIsGroupSummaryAlignmentAssigned: Boolean; - FSelected: Boolean; - FSummary: TcxGridColumnSummary; - FOnCompareRowValuesForCellMerging: TcxGridColumnCompareRowValuesEvent; - FOnCompareValuesForCellMerging: TcxGridColumnCompareValuesEvent; - FOnCustomDrawFooterCell: TcxGridColumnCustomDrawHeaderEvent; - FOnCustomDrawGroupSummaryCell: TcxGridGroupSummaryCellCustomDrawEvent; - FOnCustomDrawHeader: TcxGridColumnCustomDrawHeaderEvent; - FOnHeaderClick: TNotifyEvent; - - function GetController: TcxGridTableController; - function GetFooterAlignmentHorz: TAlignment; - function GetGridView: TcxGridTableView; - function GetGroupSummaryAlignment: TAlignment; - function GetIsPreview: Boolean; - function GetOptions: TcxGridColumnOptions; - function GetStyles: TcxGridColumnStyles; - function GetViewData: TcxGridViewData; - procedure SetFooterAlignmentHorz(Value: TAlignment); - procedure SetGroupSummaryAlignment(Value: TAlignment); - procedure SetHeaderGlyph(Value: TBitmap); - procedure SetHeaderGlyphAlignmentHorz(Value: TAlignment); - procedure SetHeaderGlyphAlignmentVert(Value: TcxAlignmentVert); - procedure SetIsPreview(Value: Boolean); - procedure SetOnCompareRowValuesForCellMerging(Value: TcxGridColumnCompareRowValuesEvent); - procedure SetOnCompareValuesForCellMerging(Value: TcxGridColumnCompareValuesEvent); - procedure SetOnCustomDrawFooterCell(Value: TcxGridColumnCustomDrawHeaderEvent); - procedure SetOnCustomDrawGroupSummaryCell(Value: TcxGridGroupSummaryCellCustomDrawEvent); - procedure SetOnCustomDrawHeader(Value: TcxGridColumnCustomDrawHeaderEvent); - procedure SetOnHeaderClick(Value: TNotifyEvent); - procedure SetOptions(Value: TcxGridColumnOptions); - procedure SetSelected(Value: Boolean); - procedure SetStyles(Value: TcxGridColumnStyles); - procedure SetSummary(Value: TcxGridColumnSummary); - - function IsFooterAlignmentHorzStored: Boolean; - function IsGroupSummaryAlignmentStored: Boolean; - - procedure HeaderGlyphChanged(Sender: TObject); - protected - // IcxStoredObject - function GetStoredProperties(AProperties: TStrings): Boolean; override; - procedure GetPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetPropertyValue(const AName: string; const AValue: Variant); override; - - procedure CreateSubClasses; override; - procedure DestroySubClasses; override; - function GetOptionsClass: TcxCustomGridTableItemOptionsClass; override; - function GetStylesClass: TcxCustomGridTableItemStylesClass; override; - function GetSummaryClass: TcxGridColumnSummaryClass; virtual; - - procedure AssignColumnWidths; virtual; - procedure BestFitApplied(AFireEvents: Boolean); override; - function CalculateBestFitWidth: Integer; override; - function CanCellMerging: Boolean; virtual; - function CanEdit: Boolean; override; - function CanFocus(ARecord: TcxCustomGridRecord): Boolean; override; - function CanHorzSize: Boolean; override; - function CanShowGroupFooters: Boolean; virtual; - procedure ForceWidth(Value: Integer); override; - function GetEditValue: Variant; override; - procedure SetEditValue(const Value: Variant); override; - function GetFixed: Boolean; override; - function GetIsBottom: Boolean; virtual; - function GetIsLeft: Boolean; virtual; - function GetIsMostBottom: Boolean; virtual; - function GetIsMostLeft: Boolean; virtual; - function GetIsMostRight: Boolean; virtual; - function GetIsRight: Boolean; virtual; - function GetIsTop: Boolean; virtual; - function GetVisible: Boolean; override; - function GetVisibleForCustomization: Boolean; override; - function HasFixedWidth: Boolean; override; - function HideOnGrouping: Boolean; virtual; - function IsVisibleStored: Boolean; override; - function IsVisibleForCustomizationStored: Boolean; override; - function SupportsBeginsWithFilterOperator(ARow: TcxCustomGridRow): Boolean; - //procedure VisibleChanged; dynamic; - - function GetHeaderViewInfoClass: TcxGridColumnHeaderViewInfoClass; - - procedure DoCustomDrawFooterCell(ACanvas: TcxCanvas; AViewInfo: TcxGridColumnHeaderViewInfo; - var ADone: Boolean); virtual; - procedure DoCustomDrawGroupSummaryCell(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridViewCellViewInfo; - var ADone: Boolean); virtual; - procedure DoCustomDrawHeader(ACanvas: TcxCanvas; AViewInfo: TcxGridColumnHeaderViewInfo; - var ADone: Boolean); virtual; - procedure DoHeaderClick; virtual; - function HasCustomDrawFooterCell: Boolean; - function HasCustomDrawGroupSummaryCell: Boolean; - function HasCustomDrawHeader: Boolean; - - property Controller: TcxGridTableController read GetController; - property ViewData: TcxGridViewData read GetViewData; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Assign(Source: TPersistent); override; - function DoCompareValuesForCellMerging( - ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: TcxEditValue; - ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: TcxEditValue): Boolean; - procedure FocusWithSelection; override; - function GroupBy(AGroupIndex: Integer; ACanShow: Boolean = True): Boolean; - - property GridView: TcxGridTableView read GetGridView; - property GroupingDateRanges; - property Hidden; // obsolete, use VisibleForCustomization - property IsBottom: Boolean read GetIsBottom; - property IsLeft: Boolean read GetIsLeft; - property IsMostBottom: Boolean read GetIsMostBottom; - property IsMostLeft: Boolean read GetIsMostLeft; - property IsMostRight: Boolean read GetIsMostRight; - property IsPreview: Boolean read GetIsPreview write SetIsPreview; - property IsRight: Boolean read GetIsRight; - property IsTop: Boolean read GetIsTop; - property Selected: Boolean read FSelected write SetSelected; - published - property BestFitMaxWidth; - property DateTimeGrouping; - property FooterAlignmentHorz: TAlignment read GetFooterAlignmentHorz write SetFooterAlignmentHorz stored IsFooterAlignmentHorzStored; - property GroupIndex; - property GroupSummaryAlignment: TAlignment read GetGroupSummaryAlignment write SetGroupSummaryAlignment stored IsGroupSummaryAlignmentStored; - property HeaderAlignmentHorz; - property HeaderAlignmentVert; - property HeaderGlyph: TBitmap read FHeaderGlyph write SetHeaderGlyph; - property HeaderGlyphAlignmentHorz: TAlignment read FHeaderGlyphAlignmentHorz write SetHeaderGlyphAlignmentHorz default taLeftJustify; - property HeaderGlyphAlignmentVert: TcxAlignmentVert read FHeaderGlyphAlignmentVert write SetHeaderGlyphAlignmentVert default vaCenter; - property MinWidth; - property Options: TcxGridColumnOptions read GetOptions write SetOptions; - property SortIndex; - property SortOrder; - property Styles: TcxGridColumnStyles read GetStyles write SetStyles; - property Summary: TcxGridColumnSummary read FSummary write SetSummary; - property VisibleForCustomization; - property Width; - property OnCompareRowValuesForCellMerging: TcxGridColumnCompareRowValuesEvent read FOnCompareRowValuesForCellMerging write SetOnCompareRowValuesForCellMerging; - property OnCompareValuesForCellMerging: TcxGridColumnCompareValuesEvent read FOnCompareValuesForCellMerging write SetOnCompareValuesForCellMerging; - property OnCustomDrawFooterCell: TcxGridColumnCustomDrawHeaderEvent read FOnCustomDrawFooterCell write SetOnCustomDrawFooterCell; - property OnCustomDrawGroupSummaryCell: TcxGridGroupSummaryCellCustomDrawEvent read FOnCustomDrawGroupSummaryCell write SetOnCustomDrawGroupSummaryCell; - property OnCustomDrawHeader: TcxGridColumnCustomDrawHeaderEvent read FOnCustomDrawHeader write SetOnCustomDrawHeader; - property OnHeaderClick: TNotifyEvent read FOnHeaderClick write SetOnHeaderClick; - property OnInitGroupingDateRanges; - end; - - // options - - TcxGridTableBackgroundBitmaps = class(TcxCustomGridTableBackgroundBitmaps) - protected - function GetBitmapStyleIndex(Index: Integer): Integer; override; - public - procedure Assign(Source: TPersistent); override; - published - property Footer: TBitmap index bbFooter read GetValue write SetValue; - property Header: TBitmap index bbHeader read GetValue write SetValue; - property Group: TBitmap index bbGroup read GetValue write SetValue; - property GroupByBox: TBitmap index bbGroupByBox read GetValue write SetValue; - property Indicator: TBitmap index bbIndicator read GetValue write SetValue; - property Preview: TBitmap index bbPreview read GetValue write SetValue; - end; - - TcxGridTableDateTimeHandling = class(TcxCustomGridTableDateTimeHandling) - published - property DateFormat; - property Grouping; - property HourFormat; - property UseLongDateFormat; - property UseShortTimeFormat; - end; - - // behavior - - TcxGridTableOptionsBehavior = class(TcxCustomGridTableOptionsBehavior) - private - FColumnHeaderHints: Boolean; - FCopyPreviewToClipboard: Boolean; - FExpandMasterRowOnDblClick: Boolean; - procedure SetColumnHeaderHints(Value: Boolean); - procedure SetCopyPreviewToClipboard(Value: Boolean); - procedure SetExpandMasterRowOnDblClick(Value: Boolean); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - published - property BestFitMaxRecordCount; - property ColumnHeaderHints: Boolean read FColumnHeaderHints write SetColumnHeaderHints default True; - property CopyPreviewToClipboard: Boolean read FCopyPreviewToClipboard write SetCopyPreviewToClipboard default True; - property ExpandMasterRowOnDblClick: Boolean read FExpandMasterRowOnDblClick write SetExpandMasterRowOnDblClick default True; - property FocusCellOnCycle; - property PullFocusing; - end; - - // filter - - TcxGridTableFiltering = class(TcxCustomGridTableFiltering) - private - function GetColumnFilteredItemsList: Boolean; - function GetColumnMRUItemsList: Boolean; - function GetColumnMRUItemsListCount: Integer; - function GetColumnPopup: TcxGridItemFilterPopupOptions; - procedure SetColumnFilteredItemsList(Value: Boolean); - procedure SetColumnMRUItemsList(Value: Boolean); - procedure SetColumnMRUItemsListCount(Value: Integer); - procedure SetColumnPopup(Value: TcxGridItemFilterPopupOptions); - protected - procedure DefineProperties(Filer: TFiler); override; - public - // obsolete - use ColumnPopup.DropDownWidth - property ColumnPopupDropDownWidth: Integer read GetItemPopupDropDownWidth write SetItemPopupDropDownWidth; - property DropDownWidth; - // obsolete - use ColumnPopup.MaxDropDownItemCount - property ColumnPopupMaxDropDownItemCount: Integer read GetItemPopupMaxDropDownItemCount write SetItemPopupMaxDropDownItemCount; - property MaxDropDownCount; - published - property ColumnFilteredItemsList: Boolean read GetColumnFilteredItemsList - write SetColumnFilteredItemsList default False; - property ColumnMRUItemsList: Boolean read GetColumnMRUItemsList write SetColumnMRUItemsList default True; - property ColumnMRUItemsListCount: Integer read GetColumnMRUItemsListCount - write SetColumnMRUItemsListCount default cxGridFilterDefaultItemMRUItemsListCount; - property ColumnPopup: TcxGridItemFilterPopupOptions read GetColumnPopup write SetColumnPopup; - end; - - // customize - - TcxGridTableOptionsCustomize = class(TcxCustomGridTableOptionsCustomize) - private - FColumnHidingOnGrouping: Boolean; - FColumnHorzSizing: Boolean; - FDataRowSizing: Boolean; - FGroupBySorting: Boolean; - FGroupRowSizing: Boolean; - function GetColumnFiltering: Boolean; - function GetColumnGrouping: Boolean; - function GetColumnHiding: Boolean; - function GetColumnMoving: Boolean; - function GetColumnSorting: Boolean; - function GetColumnsQuickCustomization: Boolean; - function GetColumnsQuickCustomizationMaxDropDownCount: Integer; - function GetColumnsQuickCustomizationReordering: TcxGridQuickCustomizationReordering; - function GetGridView: TcxGridTableView; - procedure SetColumnFiltering(Value: Boolean); - procedure SetColumnGrouping(Value: Boolean); - procedure SetColumnHiding(Value: Boolean); - procedure SetColumnHidingOnGrouping(Value: Boolean); - procedure SetColumnHorzSizing(Value: Boolean); - procedure SetColumnMoving(Value: Boolean); - procedure SetColumnSorting(Value: Boolean); - procedure SetColumnsQuickCustomization(Value: Boolean); - procedure SetColumnsQuickCustomizationMaxDropDownCount(Value: Integer); - procedure SetColumnsQuickCustomizationReordering(Value: TcxGridQuickCustomizationReordering); - procedure SetDataRowSizing(Value: Boolean); - procedure SetGroupBySorting(Value: Boolean); - procedure SetGroupRowSizing(Value: Boolean); - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - property GridView: TcxGridTableView read GetGridView; - published - property ColumnFiltering: Boolean read GetColumnFiltering write SetColumnFiltering default True; - property ColumnGrouping: Boolean read GetColumnGrouping write SetColumnGrouping default True; - property ColumnHiding: Boolean read GetColumnHiding write SetColumnHiding default False; - property ColumnHidingOnGrouping: Boolean read FColumnHidingOnGrouping write SetColumnHidingOnGrouping default True; - property ColumnHorzSizing: Boolean read FColumnHorzSizing write SetColumnHorzSizing default True; - property ColumnMoving: Boolean read GetColumnMoving write SetColumnMoving default True; - property ColumnSorting: Boolean read GetColumnSorting write SetColumnSorting default True; - property ColumnsQuickCustomization: Boolean read GetColumnsQuickCustomization - write SetColumnsQuickCustomization default False; - property ColumnsQuickCustomizationMaxDropDownCount: Integer read GetColumnsQuickCustomizationMaxDropDownCount - write SetColumnsQuickCustomizationMaxDropDownCount default 0; - property ColumnsQuickCustomizationReordering: TcxGridQuickCustomizationReordering - read GetColumnsQuickCustomizationReordering write SetColumnsQuickCustomizationReordering default qcrDefault; - property DataRowSizing: Boolean read FDataRowSizing write SetDataRowSizing default False; - property GroupBySorting: Boolean read FGroupBySorting write SetGroupBySorting default False; - property GroupRowSizing: Boolean read FGroupRowSizing write SetGroupRowSizing default False; - end; - - // data - - TcxGridTableOptionsData = class(TcxCustomGridTableOptionsData); - - // selection - - TcxGridTableOptionsSelection = class(TcxCustomGridTableOptionsSelection) - private - FCellMultiSelect: Boolean; - procedure SetCellMultiSelect(Value: Boolean); - function IsCellSelectStored: Boolean; - protected - function IsInvertSelectStored: Boolean; override; - function IsMultiSelectStored: Boolean; override; - procedure SetCellSelect(Value: Boolean); override; - procedure SetInvertSelect(Value: Boolean); override; - procedure SetMultiSelect(Value: Boolean); override; - public - procedure Assign(Source: TPersistent); override; - published - property CellMultiSelect: Boolean read FCellMultiSelect write SetCellMultiSelect default False; - property CellSelect stored IsCellSelectStored; - end; - - // view - - TcxGridSpecialRowOptions = class(TcxCustomGridOptions) - private - FInfoText: string; - FIsInfoTextAssigned: Boolean; - FSeparatorColor: TColor; - FSeparatorWidth: Integer; - FVisible: Boolean; - function GetGridView: TcxGridTableView; - function GetInfoText: string; - procedure SetInfoText(const Value: string); - procedure SetSeparatorColor(Value: TColor); - procedure SetSeparatorWidth(Value: Integer); - procedure SetVisible(Value: Boolean); - function IsInfoTextStored: Boolean; - protected - function DefaultInfoText: string; virtual; abstract; - function DefaultSeparatorColor: TColor; virtual; - procedure VisibleChanged; virtual; abstract; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - function GetSeparatorColor: TColor; - property GridView: TcxGridTableView read GetGridView; - published - property InfoText: string read GetInfoText write SetInfoText stored IsInfoTextStored; - property SeparatorColor: TColor read FSeparatorColor write SetSeparatorColor default clDefault; - property SeparatorWidth: Integer read FSeparatorWidth write SetSeparatorWidth default cxGridCustomRowSeparatorDefaultWidth; - property Visible: Boolean read FVisible write SetVisible default False; - end; - - TcxGridFilterRowApplyChangesMode = (fracOnCellExit, fracImmediately); - - TcxGridFilterRowOptionsClass = class of TcxGridFilterRowOptions; - - TcxGridFilterRowOptions = class(TcxGridSpecialRowOptions) - private - FApplyChanges: TcxGridFilterRowApplyChangesMode; - procedure SetApplyChanges(Value: TcxGridFilterRowApplyChangesMode); - protected - function DefaultInfoText: string; override; - procedure VisibleChanged; override; - public - procedure Assign(Source: TPersistent); override; - published - property ApplyChanges: TcxGridFilterRowApplyChangesMode read FApplyChanges - write SetApplyChanges default fracOnCellExit; - end; - - TcxGridNewItemRowOptionsClass = class of TcxGridNewItemRowOptions; - - TcxGridNewItemRowOptions = class(TcxGridSpecialRowOptions) - protected - function DefaultInfoText: string; override; - procedure VisibleChanged; override; - end; - - TcxGridGroupFootersMode = (gfInvisible, gfVisibleWhenExpanded, gfAlwaysVisible); - TcxGridGroupRowStyle = (grsStandard, grsOffice11); - TcxGridGroupSummaryLayout = (gslStandard, gslAlignWithColumns, - gslAlignWithColumnsAndDistribute); - - TcxGridTableOptionsView = class(TcxCustomGridTableOptionsView) - private - FColumnAutoWidth: Boolean; - FDataRowHeight: Integer; - FExpandButtonsForEmptyDetails: Boolean; - FFooter: Boolean; - FFooterAutoHeight: Boolean; - FFooterMultiSummaries: Boolean; - FGridLineColor: TColor; - FGridLines: TcxGridLines; - FGroupByBox: Boolean; - FGroupFooterMultiSummaries: Boolean; - FGroupFooters: TcxGridGroupFootersMode; - FGroupRowHeight: Integer; - FGroupRowStyle: TcxGridGroupRowStyle; - FGroupSummaryLayout: TcxGridGroupSummaryLayout; - FHeader: Boolean; - FHeaderHeight: Integer; - FIndicator: Boolean; - FIndicatorWidth: Integer; - FPrevGroupFooters: TcxGridGroupFootersMode; - FRowSeparatorColor: TColor; - FRowSeparatorWidth: Integer; - function GetExpandButtonsForEmptyDetails: Boolean; - function GetGridView: TcxGridTableView; - function GetHeaderAutoHeight: Boolean; - function GetHeaderEndEllipsis: Boolean; - function GetNewItemRow: Boolean; - function GetNewItemRowInfoText: string; - function GetNewItemRowSeparatorColor: TColor; - function GetNewItemRowSeparatorWidth: Integer; - function GetShowColumnFilterButtons: TcxGridShowItemFilterButtons; - procedure SetColumnAutoWidth(Value: Boolean); - procedure SetDataRowHeight(Value: Integer); - procedure SetExpandButtonsForEmptyDetails(Value: Boolean); - procedure SetFooter(Value: Boolean); - procedure SetFooterAutoHeight(Value: Boolean); - procedure SetFooterMultiSummaries(Value: Boolean); - procedure SetGridLineColor(Value: TColor); - procedure SetGridLines(Value: TcxGridLines); - procedure SetGroupByBox(Value: Boolean); - procedure SetGroupFooterMultiSummaries(Value: Boolean); - procedure SetGroupFooters(Value: TcxGridGroupFootersMode); - procedure SetGroupRowHeight(Value: Integer); - procedure SetGroupRowStyle(Value: TcxGridGroupRowStyle); - procedure SetGroupSummaryLayout(Value: TcxGridGroupSummaryLayout); - procedure SetHeader(Value: Boolean); - procedure SetHeaderAutoHeight(Value: Boolean); - procedure SetHeaderEndEllipsis(Value: Boolean); - procedure SetHeaderHeight(Value: Integer); - procedure SetIndicator(Value: Boolean); - procedure SetIndicatorWidth(Value: Integer); - procedure SetNewItemRow(Value: Boolean); - procedure SetNewItemRowInfoText(const Value: string); - procedure SetNewItemRowSeparatorColor(Value: TColor); - procedure SetNewItemRowSeparatorWidth(Value: Integer); - procedure SetRowSeparatorColor(Value: TColor); - procedure SetRowSeparatorWidth(Value: Integer); - procedure SetShowColumnFilterButtons(Value: TcxGridShowItemFilterButtons); - procedure ReadNewItemRow(Reader: TReader); - procedure ReadNewItemRowInfoText(Reader: TReader); - procedure ReadNewItemRowSeparatorColor(Reader: TReader); - procedure ReadNewItemRowSeparatorWidth(Reader: TReader); - protected - procedure DefineProperties(Filer: TFiler); override; - procedure ItemCaptionAutoHeightChanged; override; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - function CanShowFooterMultiSummaries: Boolean; - function CanShowGroupFooterMultiSummaries: Boolean; - procedure CheckDataRowHeight(var AValue: Integer); virtual; - procedure CheckGroupRowHeight(var AValue: Integer); virtual; - function GetGridLineColor: TColor; - function GetGroupSummaryLayout: TcxGridGroupSummaryLayout; - function GetRowSeparatorColor: TColor; - - property GridView: TcxGridTableView read GetGridView; - // obsolete - use GridView.NewItemRow - property NewItemRow: Boolean read GetNewItemRow write SetNewItemRow; - property NewItemRowInfoText: string read GetNewItemRowInfoText write SetNewItemRowInfoText; - property NewItemRowSeparatorColor: TColor read GetNewItemRowSeparatorColor write SetNewItemRowSeparatorColor; - property NewItemRowSeparatorWidth: Integer read GetNewItemRowSeparatorWidth write SetNewItemRowSeparatorWidth; - property PrevGroupFooters: TcxGridGroupFootersMode read FPrevGroupFooters; - published - property CellAutoHeight; - property CellTextMaxLineCount; - property ColumnAutoWidth: Boolean read FColumnAutoWidth write SetColumnAutoWidth default False; - property DataRowHeight: Integer read FDataRowHeight write SetDataRowHeight default 0; - property ExpandButtonsForEmptyDetails: Boolean read GetExpandButtonsForEmptyDetails - write SetExpandButtonsForEmptyDetails default True; - property Footer: Boolean read FFooter write SetFooter default False; - property FooterAutoHeight: Boolean read FFooterAutoHeight write SetFooterAutoHeight default False; - property FooterMultiSummaries: Boolean read FFooterMultiSummaries write SetFooterMultiSummaries default False; - property GridLineColor: TColor read FGridLineColor write SetGridLineColor default clDefault; - property GridLines: TcxGridLines read FGridLines write SetGridLines default glBoth; - property GroupByBox: Boolean read FGroupByBox write SetGroupByBox default True; - property GroupFooterMultiSummaries: Boolean read FGroupFooterMultiSummaries write SetGroupFooterMultiSummaries default False; - property GroupFooters: TcxGridGroupFootersMode read FGroupFooters write SetGroupFooters default gfInvisible; - property GroupRowHeight: Integer read FGroupRowHeight write SetGroupRowHeight default 0; - property GroupRowStyle: TcxGridGroupRowStyle read FGroupRowStyle write SetGroupRowStyle default grsStandard; - property GroupSummaryLayout: TcxGridGroupSummaryLayout read FGroupSummaryLayout - write SetGroupSummaryLayout default gslStandard; - property Header: Boolean read FHeader write SetHeader default True; - property HeaderAutoHeight: Boolean read GetHeaderAutoHeight write SetHeaderAutoHeight default False; - property HeaderEndEllipsis: Boolean read GetHeaderEndEllipsis write SetHeaderEndEllipsis default False; - property HeaderHeight: Integer read FHeaderHeight write SetHeaderHeight default 0; - property Indicator: Boolean read FIndicator write SetIndicator default False; - property IndicatorWidth: Integer read FIndicatorWidth write SetIndicatorWidth default cxGridDefaultIndicatorWidth; - property RowSeparatorColor: TColor read FRowSeparatorColor write SetRowSeparatorColor default clDefault; - property RowSeparatorWidth: Integer read FRowSeparatorWidth write SetRowSeparatorWidth default 0; - property ShowColumnFilterButtons: TcxGridShowItemFilterButtons read GetShowColumnFilterButtons - write SetShowColumnFilterButtons default sfbWhenSelected; - end; - - // preview - - TcxGridPreviewPlace = (ppBottom, ppTop); - - TcxGridPreviewClass = class of TcxGridPreview; - - TcxGridPreview = class(TcxCustomGridOptions) - private - FAutoHeight: Boolean; - FColumn: TcxGridColumn; - FLeftIndent: Integer; - FMaxLineCount: Integer; - FPlace: TcxGridPreviewPlace; - FRightIndent: Integer; - FVisible: Boolean; - function GetActive: Boolean; - function GetGridView: TcxGridTableView; - procedure SetAutoHeight(Value: Boolean); - procedure SetColumn(Value: TcxGridColumn); - procedure SetLeftIndent(Value: Integer); - procedure SetMaxLineCount(Value: Integer); - procedure SetPlace(Value: TcxGridPreviewPlace); - procedure SetRightIndent(Value: Integer); - procedure SetVisible(Value: Boolean); - protected - procedure Notification(AComponent: TComponent; AOperation: TOperation); override; - procedure PropertyChanged; - public - constructor Create(AGridView: TcxCustomGridView); override; - procedure Assign(Source: TPersistent); override; - property Active: Boolean read GetActive; - property GridView: TcxGridTableView read GetGridView; - published - property AutoHeight: Boolean read FAutoHeight write SetAutoHeight default True; - property Column: TcxGridColumn read FColumn write SetColumn; - property LeftIndent: Integer read FLeftIndent write SetLeftIndent - default cxGridPreviewDefaultLeftIndent; - property MaxLineCount: Integer read FMaxLineCount write SetMaxLineCount - default cxGridPreviewDefaultMaxLineCount; - property Place: TcxGridPreviewPlace read FPlace write SetPlace default ppBottom; - property RightIndent: Integer read FRightIndent write SetRightIndent - default cxGridPreviewDefaultRightIndent; - property Visible: Boolean read FVisible write SetVisible default False; - end; - - // styles - - TcxGridGetGroupStyleEvent = procedure(Sender: TcxGridTableView; ARecord: TcxCustomGridRecord; - ALevel: Integer; {$IFDEF BCB}var{$ELSE}out{$ENDIF} AStyle: TcxStyle) of object; - - TcxGridTableViewStyles = class(TcxCustomGridTableViewStyles) - private - FProcessingGroupSortedSummary: Boolean; - FOnGetFooterStyle: TcxGridGetCellStyleEvent; - FOnGetFooterStyleEx: TcxGridGetFooterStyleExEvent; - FOnGetFooterSummaryStyle: TcxGridGetFooterSummaryStyleEvent; - FOnGetGroupStyle: TcxGridGetGroupStyleEvent; - FOnGetGroupSummaryStyle: TcxGridGetGroupSummaryStyleEvent; - FOnGetHeaderStyle: TcxGridGetHeaderStyleEvent; - FOnGetPreviewStyle: TcxGridGetCellStyleEvent; - function GetGridViewValue: TcxGridTableView; - procedure SetOnGetFooterStyle(Value: TcxGridGetCellStyleEvent); - procedure SetOnGetFooterStyleEx(Value: TcxGridGetFooterStyleExEvent); - procedure SetOnGetFooterSummaryStyle(Value: TcxGridGetFooterSummaryStyleEvent); - procedure SetOnGetGroupStyle(Value: TcxGridGetGroupStyleEvent); - procedure SetOnGetGroupSummaryStyle(Value: TcxGridGetGroupSummaryStyleEvent); - procedure SetOnGetHeaderStyle(Value: TcxGridGetHeaderStyleEvent); - procedure SetOnGetPreviewStyle(Value: TcxGridGetCellStyleEvent); - protected - procedure GetDefaultViewParams(Index: Integer; AData: TObject; out AParams: TcxViewParams); override; - public - procedure Assign(Source: TPersistent); override; - procedure GetCellContentParams(ARecord: TcxCustomGridRecord; AItem: TObject; - out AParams: TcxViewParams); override; - procedure GetContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); override; - procedure GetFooterCellParams(ARow: TcxCustomGridRow; AColumn: TcxGridColumn; - AFooterGroupLevel: Integer; ASummaryItem: TcxDataSummaryItem; out AParams: TcxViewParams); virtual; - procedure GetFooterParams(ARow: TcxCustomGridRow; AColumn: TcxGridColumn; - AFooterGroupLevel: Integer; ASummaryItem: TcxDataSummaryItem; out AParams: TcxViewParams); virtual; - procedure GetGroupParams(ARecord: TcxCustomGridRecord; ALevel: Integer; - out AParams: TcxViewParams); virtual; - procedure GetGroupSummaryCellContentParams(ARow: TcxGridGroupRow; - ASummaryItem: TcxDataSummaryItem; out AParams: TcxViewParams); virtual; - procedure GetGroupSummaryCellParams(ARow: TcxGridGroupRow; - ASummaryItem: TcxDataSummaryItem; out AParams: TcxViewParams); virtual; - procedure GetGroupSummaryParams(ARow: TcxGridGroupRow; ASummaryItem: TcxDataSummaryItem; - out AParams: TcxViewParams); virtual; - procedure GetHeaderParams(AItem: TcxGridColumn; out AParams: TcxViewParams); virtual; - procedure GetPreviewParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); virtual; - procedure GetRecordContentParams(ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; - out AParams: TcxViewParams); override; - property GridView: TcxGridTableView read GetGridViewValue; - published - property FilterRowInfoText: TcxStyle index vsFilterRowInfoText read GetValue write SetValue; - property Footer: TcxStyle index vsFooter read GetValue write SetValue; - property Group: TcxStyle index vsGroup read GetValue write SetValue; - property GroupByBox: TcxStyle index vsGroupByBox read GetValue write SetValue; - property GroupFooterSortedSummary: TcxStyle index vsGroupFooterSortedSummary read GetValue write SetValue; - property GroupSortedSummary: TcxStyle index vsGroupSortedSummary read GetValue write SetValue; - property GroupSummary: TcxStyle index vsGroupSummary read GetValue write SetValue; - property Header: TcxStyle index vsHeader read GetValue write SetValue; - property Indicator: TcxStyle index vsIndicator read GetValue write SetValue; - property NewItemRowInfoText: TcxStyle index vsNewItemRowInfoText read GetValue write SetValue; - property Preview: TcxStyle index vsPreview read GetValue write SetValue; - property StyleSheet; - property OnGetFooterStyle: TcxGridGetCellStyleEvent read FOnGetFooterStyle write SetOnGetFooterStyle; - property OnGetFooterStyleEx: TcxGridGetFooterStyleExEvent read FOnGetFooterStyleEx write SetOnGetFooterStyleEx; - property OnGetFooterSummaryStyle: TcxGridGetFooterSummaryStyleEvent read FOnGetFooterSummaryStyle write SetOnGetFooterSummaryStyle; - property OnGetGroupStyle: TcxGridGetGroupStyleEvent read FOnGetGroupStyle write SetOnGetGroupStyle; - property OnGetGroupSummaryStyle: TcxGridGetGroupSummaryStyleEvent read FOnGetGroupSummaryStyle write SetOnGetGroupSummaryStyle; - property OnGetHeaderStyle: TcxGridGetHeaderStyleEvent read FOnGetHeaderStyle write SetOnGetHeaderStyle; - property OnGetPreviewStyle: TcxGridGetCellStyleEvent read FOnGetPreviewStyle write SetOnGetPreviewStyle; - end; - - TcxGridTableViewStyleSheet = class(TcxCustomStyleSheet) - private - function GetStylesValue: TcxGridTableViewStyles; - procedure SetStylesValue(Value: TcxGridTableViewStyles); - public - class function GetStylesClass: TcxCustomStylesClass; override; - published - property Styles: TcxGridTableViewStyles read GetStylesValue write SetStylesValue; - end; - - // grid view - - TcxGridTableSummaryGroupItemLink = class(TcxDataSummaryGroupItemLink, - {$IFNDEF DELPHI6}IUnknown,{$ENDIF} IcxStoredObject) - private - function GetColumn: TcxGridColumn; - procedure SetColumn(Value: TcxGridColumn); - function GetGridView: TcxGridTableView; - protected - // IInterface - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - // IcxStoredObject - function GetObjectName: string; - function GetProperties(AProperties: TStrings): Boolean; - procedure GetPropertyValue(const AName: string; var AValue: Variant); - procedure SetPropertyValue(const AName: string; const AValue: Variant); - property GridView: TcxGridTableView read GetGridView; - published - property Column: TcxGridColumn read GetColumn write SetColumn; - end; - - IcxGridSummaryItem = interface - ['{6F9A0C3E-E33F-4E77-9357-82F1D19CDB67}'] - function GetDisplayText: string; - function GetVisibleForCustomization: Boolean; - property DisplayText: string read GetDisplayText; - property VisibleForCustomization: Boolean read GetVisibleForCustomization; - end; - - TcxGridTableSummaryItem = class(TcxDataSummaryItem, - {$IFNDEF DELPHI6}IUnknown,{$ENDIF} IcxStoredObject, IcxGridSummaryItem) - private - FDisplayText: string; - FVisibleForCustomization: Boolean; - function GetColumn: TcxGridColumn; - function GetGridView: TcxGridTableView; - procedure SetColumn(Value: TcxGridColumn); - procedure SetDisplayText(const Value: string); - procedure SetVisibleForCustomization(Value: Boolean); - protected - // IInterface - function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - // IcxStoredObject - function GetObjectName: string; - function GetProperties(AProperties: TStrings): Boolean; - procedure GetPropertyValue(const AName: string; var AValue: Variant); - procedure SetPropertyValue(const AName: string; const AValue: Variant); - // IcxGridSummaryItem - function GetDisplayText: string; - function GetVisibleForCustomization: Boolean; - - property GridView: TcxGridTableView read GetGridView; - public - constructor Create(Collection: TCollection); override; - procedure Assign(Source: TPersistent); override; - published - property Column: TcxGridColumn read GetColumn write SetColumn; - property DisplayText: string read FDisplayText write SetDisplayText; - property Sorted; - property VisibleForCustomization: Boolean read FVisibleForCustomization - write SetVisibleForCustomization default True; - end; - - TcxGridColumnEvent = procedure(Sender: TcxGridTableView; AColumn: TcxGridColumn) of object; - TcxGridIndicatorCellCustomDrawEvent = procedure(Sender: TcxGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean) of object; - - TcxGridTableView = class(TcxCustomGridTableView) - private - FAllowCellMerging: Boolean; - FFilterRow: TcxGridFilterRowOptions; - FNewItemRow: TcxGridNewItemRowOptions; - FPreview: TcxGridPreview; - FOnColumnHeaderClick: TcxGridColumnEvent; - FOnColumnPosChanged: TcxGridColumnEvent; - FOnColumnSizeChanged: TcxGridColumnEvent; - FOnCustomDrawColumnHeader: TcxGridColumnCustomDrawHeaderEvent; - FOnCustomDrawFooterCell: TcxGridColumnCustomDrawHeaderEvent; - FOnCustomDrawGroupCell: TcxGridTableCellCustomDrawEvent; - FOnCustomDrawGroupSummaryCell: TcxGridGroupSummaryCellCustomDrawEvent; - FOnCustomDrawIndicatorCell: TcxGridIndicatorCellCustomDrawEvent; - FOnLeftPosChanged: TNotifyEvent; - - function GetBackgroundBitmaps: TcxGridTableBackgroundBitmaps; - function GetColumn(Index: Integer): TcxGridColumn; - function GetColumnCount: Integer; - function GetController: TcxGridTableController; - function GetDataController: TcxGridDataController; - function GetDateTimeHandling: TcxGridTableDateTimeHandling; - function GetFiltering: TcxGridTableFiltering; - function GetGroupedColumn(Index: Integer): TcxGridColumn; - function GetGroupedColumnCount: Integer; - function GetOptionsBehavior: TcxGridTableOptionsBehavior; - function GetOptionsCustomize: TcxGridTableOptionsCustomize; - function GetOptionsData: TcxGridTableOptionsData; - function GetOptionsSelection: TcxGridTableOptionsSelection; - function GetOptionsView: TcxGridTableOptionsView; - function GetPainter: TcxGridTablePainter; - function GetStyles: TcxGridTableViewStyles; - function GetViewData: TcxGridViewData; - function GetViewInfo: TcxGridTableViewInfo; - function GetVisibleColumn(Index: Integer): TcxGridColumn; - function GetVisibleColumnCount: Integer; - procedure SetBackgroundBitmaps(Value: TcxGridTableBackgroundBitmaps); - procedure SetColumn(Index: Integer; Value: TcxGridColumn); - procedure SetDataController(Value: TcxGridDataController); - procedure SetDateTimeHandling(Value: TcxGridTableDateTimeHandling); - procedure SetFiltering(Value: TcxGridTableFiltering); - procedure SetFilterRow(Value: TcxGridFilterRowOptions); - procedure SetNewItemRow(Value: TcxGridNewItemRowOptions); - procedure SetOnColumnHeaderClick(Value: TcxGridColumnEvent); - procedure SetOnColumnPosChanged(Value: TcxGridColumnEvent); - procedure SetOnColumnSizeChanged(Value: TcxGridColumnEvent); - procedure SetOnCustomDrawColumnHeader(Value: TcxGridColumnCustomDrawHeaderEvent); - procedure SetOnCustomDrawFooterCell(Value: TcxGridColumnCustomDrawHeaderEvent); - procedure SetOnCustomDrawGroupCell(Value: TcxGridTableCellCustomDrawEvent); - procedure SetOnCustomDrawGroupSummaryCell(Value: TcxGridGroupSummaryCellCustomDrawEvent); - procedure SetOnCustomDrawIndicatorCell(Value: TcxGridIndicatorCellCustomDrawEvent); - procedure SetOnLeftPosChanged(Value: TNotifyEvent); - procedure SetOptionsBehavior(Value: TcxGridTableOptionsBehavior); - procedure SetOptionsCustomize(Value: TcxGridTableOptionsCustomize); - procedure SetOptionsData(Value: TcxGridTableOptionsData); - procedure SetOptionsSelection(Value: TcxGridTableOptionsSelection); - procedure SetOptionsView(Value: TcxGridTableOptionsView); - procedure SetPreview(Value: TcxGridPreview); - procedure SetStyles(Value: TcxGridTableViewStyles); - - protected - // IcxStoredObject - function GetProperties(AProperties: TStrings): Boolean; override; - procedure GetPropertyValue(const AName: string; var AValue: Variant); override; - procedure SetPropertyValue(const AName: string; const AValue: Variant); override; - // IcxGridViewLayoutEditorSupport - for design-time layout editor - procedure AssignLayout(ALayoutView: TcxCustomGridView); override; - procedure BeforeEditLayout(ALayoutView: TcxCustomGridView); override; - function GetLayoutCustomizationFormButtonCaption: string; override; - - procedure CreateOptions; override; - procedure DestroyOptions; override; - - function CanCellMerging: Boolean; virtual; - function CanOffset(ARecordCountDelta: Integer): Boolean; override; - function CanOffsetHorz: Boolean; virtual; - procedure DetailDataChanged(ADetail: TcxCustomGridView); override; - procedure DoAssign(ASource: TcxCustomGridView); override; - procedure GetItemsListForClipboard(AItems: TList; ACopyAll: Boolean); override; - function GetResizeOnBoundsChange: Boolean; override; - function HasCellMerging: Boolean; - function IsEqualHeightRecords: Boolean; override; - function IsRecordHeightDependsOnData: Boolean; override; - function UpdateOnDetailDataChange(ADetail: TcxCustomGridView): Boolean; virtual; - - function GetControllerClass: TcxCustomGridControllerClass; override; - function GetDataControllerClass: TcxCustomDataControllerClass; override; - function GetPainterClass: TcxCustomGridPainterClass; override; - function GetViewDataClass: TcxCustomGridViewDataClass; override; - function GetViewInfoClass: TcxCustomGridViewInfoClass; override; - - function GetBackgroundBitmapsClass: TcxCustomGridBackgroundBitmapsClass; override; - function GetDateTimeHandlingClass: TcxCustomGridTableDateTimeHandlingClass; override; - function GetFilteringClass: TcxCustomGridTableFilteringClass; override; - function GetFilterRowOptionsClass: TcxGridFilterRowOptionsClass; virtual; - function GetNewItemRowOptionsClass: TcxGridNewItemRowOptionsClass; virtual; - function GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; override; - function GetOptionsCustomizeClass: TcxCustomGridTableOptionsCustomizeClass; override; - function GetOptionsDataClass: TcxCustomGridOptionsDataClass; override; - function GetOptionsSelectionClass: TcxCustomGridOptionsSelectionClass; override; - function GetOptionsViewClass: TcxCustomGridOptionsViewClass; override; - function GetPreviewClass: TcxGridPreviewClass; virtual; - function GetStylesClass: TcxCustomGridViewStylesClass; override; - - function GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; override; - function GetSummaryItemClass: TcxDataSummaryItemClass; override; - - function GetItemClass: TcxCustomGridTableItemClass; override; - procedure ItemVisibilityChanged(AItem: TcxCustomGridTableItem; Value: Boolean); override; - - function CalculateDataCellSelected(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; AUseViewInfo: Boolean; - ACellViewInfo: TcxGridTableCellViewInfo): Boolean; override; - - procedure DoColumnHeaderClick(AColumn: TcxGridColumn); virtual; - procedure DoColumnPosChanged(AColumn: TcxGridColumn); virtual; - procedure DoColumnSizeChanged(AColumn: TcxGridColumn); virtual; - procedure DoCustomDrawColumnHeader(ACanvas: TcxCanvas; AViewInfo: TcxGridColumnHeaderViewInfo; - var ADone: Boolean); virtual; - procedure DoCustomDrawFooterCell(ACanvas: TcxCanvas; AViewInfo: TcxGridColumnHeaderViewInfo; - var ADone: Boolean); virtual; - procedure DoCustomDrawGroupCell(ACanvas: TcxCanvas; AViewInfo: TcxGridTableCellViewInfo; - var ADone: Boolean); virtual; - procedure DoCustomDrawGroupSummaryCell(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridViewCellViewInfo; - var ADone: Boolean); virtual; - procedure DoCustomDrawIndicatorCell(ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; - var ADone: Boolean); virtual; - procedure DoLeftPosChanged; virtual; - function HasCustomDrawColumnHeader: Boolean; - function HasCustomDrawFooterCell: Boolean; - function HasCustomDrawGroupCell: Boolean; - function HasCustomDrawGroupSummaryCell: Boolean; - function HasCustomDrawIndicatorCell: Boolean; - - property AllowCellMerging: Boolean read FAllowCellMerging write FAllowCellMerging; - public - constructor Create(AOwner: TComponent); override; - - function CreateColumn: TcxGridColumn; - - // for extended lookup edit - class function CanBeLookupList: Boolean; override; - - property ColumnCount: Integer read GetColumnCount; - property Columns[Index: Integer]: TcxGridColumn read GetColumn write SetColumn; - property Controller: TcxGridTableController read GetController; - property GroupedColumnCount: Integer read GetGroupedColumnCount; - property GroupedColumns[Index: Integer]: TcxGridColumn read GetGroupedColumn; - property Painter: TcxGridTablePainter read GetPainter; - property ViewData: TcxGridViewData read GetViewData; - property ViewInfo: TcxGridTableViewInfo read GetViewInfo; - property VisibleColumnCount: Integer read GetVisibleColumnCount; - property VisibleColumns[Index: Integer]: TcxGridColumn read GetVisibleColumn; - published - property BackgroundBitmaps: TcxGridTableBackgroundBitmaps read GetBackgroundBitmaps write SetBackgroundBitmaps; - property DataController: TcxGridDataController read GetDataController write SetDataController; - property DateTimeHandling: TcxGridTableDateTimeHandling read GetDateTimeHandling write SetDateTimeHandling; - property Filtering: TcxGridTableFiltering read GetFiltering write SetFiltering; - property FilterRow: TcxGridFilterRowOptions read FFilterRow write SetFilterRow; - property NewItemRow: TcxGridNewItemRowOptions read FNewItemRow write SetNewItemRow; - property OptionsBehavior: TcxGridTableOptionsBehavior read GetOptionsBehavior write SetOptionsBehavior; - property OptionsCustomize: TcxGridTableOptionsCustomize read GetOptionsCustomize write SetOptionsCustomize; - property OptionsData: TcxGridTableOptionsData read GetOptionsData write SetOptionsData; - property OptionsSelection: TcxGridTableOptionsSelection read GetOptionsSelection write SetOptionsSelection; - property OptionsView: TcxGridTableOptionsView read GetOptionsView write SetOptionsView; - property Preview: TcxGridPreview read FPreview write SetPreview; - property Styles: TcxGridTableViewStyles read GetStyles write SetStyles ; - - property OnColumnHeaderClick: TcxGridColumnEvent read FOnColumnHeaderClick write SetOnColumnHeaderClick; - property OnColumnPosChanged: TcxGridColumnEvent read FOnColumnPosChanged write SetOnColumnPosChanged; - property OnColumnSizeChanged: TcxGridColumnEvent read FOnColumnSizeChanged write SetOnColumnSizeChanged; - property OnCustomDrawColumnHeader: TcxGridColumnCustomDrawHeaderEvent read FOnCustomDrawColumnHeader write SetOnCustomDrawColumnHeader; - property OnCustomDrawFooterCell: TcxGridColumnCustomDrawHeaderEvent read FOnCustomDrawFooterCell write SetOnCustomDrawFooterCell; - property OnCustomDrawGroupCell: TcxGridTableCellCustomDrawEvent read FOnCustomDrawGroupCell write SetOnCustomDrawGroupCell; - property OnCustomDrawGroupSummaryCell: TcxGridGroupSummaryCellCustomDrawEvent read FOnCustomDrawGroupSummaryCell write SetOnCustomDrawGroupSummaryCell; - property OnCustomDrawIndicatorCell: TcxGridIndicatorCellCustomDrawEvent read FOnCustomDrawIndicatorCell write SetOnCustomDrawIndicatorCell; - property OnCustomization; - property OnInitGroupingDateRanges; - property OnLeftPosChanged: TNotifyEvent read FOnLeftPosChanged write SetOnLeftPosChanged; - end; - - { TcxGridColumnAccess } - - TcxGridColumnAccess = class - public - class function CanCellMerging(AInstance: TcxGridColumn): Boolean; - class function CanShowGroupFooters(AInstance: TcxGridColumn): Boolean; - class procedure DoCustomDrawGroupSummaryCell(AInstance: TcxGridColumn; - ACanvas: TcxCanvas; AViewInfo: TcxCustomGridViewCellViewInfo; var ADone: Boolean); virtual; - class function HasCustomDrawGroupSummaryCell(AInstance: TcxGridColumn): Boolean; - end; - - { TcxGridTableViewAccess } - - TcxGridTableViewAccess = class - public - class procedure DoColumnPosChanged(AInstance: TcxGridTableView; - AColumn: TcxGridColumn); - class procedure DoCustomDrawGroupCell(AInstance: TcxGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridTableCellViewInfo; var ADone: Boolean); - class procedure DoCustomDrawGroupSummaryCell(AInstance: TcxGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxCustomGridViewCellViewInfo; var ADone: Boolean); virtual; - class function HasCustomDrawGroupCell(AInstance: TcxGridTableView): Boolean; - class function HasCustomDrawGroupSummaryCell(AInstance: TcxGridTableView): Boolean; - end; - -implementation - -uses - SysUtils, Math, dxOffice11, cxVariants, cxDataUtils, cxFilterControlUtils, - cxLibraryConsts, cxGridRows, cxGridStrs; - -const - GroupByBoxLeftOffset = 6; - GroupByBoxTopOffset = 8; - GroupByBoxHorOffset = 4; - GroupByBoxLineVerOffset = 4; - GroupByBoxColumnWidth = 100; - GroupByBoxLineWidth = 1; - GroupByBoxLineColor = clBtnText; - HScrollDelta = 10; - - FooterSeparatorWidth = 1; - - TopIndexNone = -2; - RowIndexNone = -1; - - ColumnHeaderHitTestCodes = [htColumnHeader]; - - ColumnHeaderMovingZoneSize = 15; - - ColumnSizingMarkWidth = 1; - RowSizingMarkWidth = 1; - - ScrollHotZoneWidth = 15; - -type - TcxCustomGridAccess = class(TcxCustomGrid); - -{ TcxGridGroupByBoxHitTest } - -class function TcxGridGroupByBoxHitTest.GetHitTestCode: Integer; -begin - Result := htGroupByBox; -end; - -{ TcxGridColumnHeaderHitTest } - -class function TcxGridColumnHeaderHitTest.GetHitTestCode: Integer; -begin - Result := htColumnHeader; -end; - -function TcxGridColumnHeaderHitTest.DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; -begin - if Column.CanMove then - Result := TcxGridTableView(GridView).Controller.GetColumnHeaderDragAndDropObjectClass - else - Result := nil; -end; - -{ TcxGridColumnHeaderHorzSizingEdgeHitTest } - -class function TcxGridColumnHeaderHorzSizingEdgeHitTest.GetHitTestCode: Integer; -begin - Result := htColumnHeaderHorzSizingEdge; -end; - -function TcxGridColumnHeaderHorzSizingEdgeHitTest.Cursor: TCursor; -begin - Result := crcxGridHorzSize; -end; - -function TcxGridColumnHeaderHorzSizingEdgeHitTest.DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; -begin - Result := TcxGridColumnHorzSizingObject; -end; - -{ TcxGridColumnHeaderFilterButtonHitTest } - -class function TcxGridColumnHeaderFilterButtonHitTest.GetHitTestCode: Integer; -begin - Result := htColumnHeaderFilterButton; -end; - -{ TcxGridHeaderHitTest } - -class function TcxGridHeaderHitTest.GetHitTestCode: Integer; -begin - Result := htHeader; -end; - -{ TcxGridFooterHitTest } - -class function TcxGridFooterHitTest.GetHitTestCode: Integer; -begin - Result := htFooter; -end; - -{ TcxGridFooterCellHitTest } - -class function TcxGridFooterCellHitTest.GetHitTestCode: Integer; -begin - Result := htFooterCell; -end; - -{ TcxGridGroupFooterHitTest } - -class function TcxGridGroupFooterHitTest.GetHitTestCode: Integer; -begin - Result := htGroupFooter; -end; - -{ TcxGridGroupFooterCellHitTest } - -class function TcxGridGroupFooterCellHitTest.GetHitTestCode: Integer; -begin - Result := htGroupFooterCell; -end; - -{ TcxGridRowIndicatorHitTest } - -class function TcxGridRowIndicatorHitTest.GetHitTestCode: Integer; -begin - Result := htRowIndicator; -end; - -function TcxGridRowIndicatorHitTest.Cursor: TCursor; -begin - if MultiSelect then - Result := crcxGridSelectRow - else - Result := inherited Cursor; -end; - -{ TcxGridRowSizingEdgeHitTest } - -class function TcxGridRowSizingEdgeHitTest.GetHitTestCode: Integer; -begin - Result := htRowSizingEdge; -end; - -function TcxGridRowSizingEdgeHitTest.Cursor: TCursor; -begin - Result := crcxGridVertSize; -end; - -function TcxGridRowSizingEdgeHitTest.DragAndDropObjectClass: TcxCustomGridDragAndDropObjectClass; -begin - Result := TcxGridRowSizingObject; -end; - -{ TcxGridIndicatorHitTest } - -class function TcxGridIndicatorHitTest.GetHitTestCode: Integer; -begin - Result := htIndicator; -end; - -{ TcxGridIndicatorHeaderHitTest } - -class function TcxGridIndicatorHeaderHitTest.GetHitTestCode: Integer; -begin - Result := htIndicatorHeader; -end; - -{ TcxGridRowLevelIndentHitTest } - -class function TcxGridRowLevelIndentHitTest.GetHitTestCode: Integer; -begin - Result := htRowLevelIndent; -end; - -class function TcxGridRowLevelIndentHitTest.CanClick: Boolean; -begin - Result := False; -end; - -{ TcxGridGroupSummaryHitTest } - -function TcxGridGroupSummaryHitTest.GetColumn: TcxGridColumn; -begin - if SummaryItem = nil then - Result := nil - else - Result := SummaryItem.ItemLink as TcxGridColumn; -end; - -class function TcxGridGroupSummaryHitTest.GetHitTestCode: Integer; -begin - Result := htGroupSummary; -end; - -{ TcxCustomGridRow } - -function TcxCustomGridRow.GetAsGroupRow: TcxGridGroupRow; -begin - Result := Self as TcxGridGroupRow; -end; - -function TcxCustomGridRow.GetAsMasterDataRow: TcxGridMasterDataRow; -begin - Result := Self as TcxGridMasterDataRow; -end; - -function TcxCustomGridRow.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxCustomGridRow.GetGridViewLevel: TcxGridLevel; -begin - Result := TcxGridLevel(GridView.Level); -end; - -function TcxCustomGridRow.GetIsFilterRow: Boolean; -begin - Result := ViewData.FilterRow = Self; -end; - -function TcxCustomGridRow.GetIsNewItemRow: Boolean; -begin - Result := IsNewItemRecord; -end; - -function TcxCustomGridRow.GetViewData: TcxGridViewData; -begin - Result := TcxGridViewData(inherited ViewData); -end; - -procedure TcxCustomGridRow.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited; - case Key of - VK_LEFT: - if Expandable and Expanded then - begin - Expanded := False; - Key := 0; - end; - VK_RIGHT: - if Expandable and not Expanded then - begin - Expanded := True; - Key := 0; - end; - VK_MULTIPLY: - if Expandable then - begin - GridView.Controller.EatKeyPress := True; - Expand(True); - Key := 0; - end; - end; -end; - -function TcxCustomGridRow.ExpandOnDblClick: Boolean; -begin - Result := Expandable; -end; - -function TcxCustomGridRow.SupportsCellMultiSelect: Boolean; -begin - Result := False; -end; - -{ TcxGridDataRow } - -function TcxGridDataRow.GetHasCells: Boolean; -begin - Result := True; -end; - -function TcxGridDataRow.GetViewInfoCacheItemClass: TcxCustomGridViewInfoCacheItemClass; -begin - Result := TcxGridTableViewInfoCacheItem; -end; - -function TcxGridDataRow.GetViewInfoClass: TcxCustomGridRecordViewInfoClass; -begin - Result := TcxGridDataRowViewInfo; -end; - -function TcxGridDataRow.SupportsCellMultiSelect: Boolean; -begin - Result := True; -end; - -{ TcxGridNewItemRow } - -function TcxGridNewItemRow.SupportsCellMultiSelect: Boolean; -begin - Result := False; -end; - -{ TcxGridFilterRow } - -destructor TcxGridFilterRow.Destroy; -begin - Selected := False; - inherited; -end; - -function TcxGridFilterRow.GetFilterCriteriaItem(Index: Integer): TcxFilterCriteriaItem; -begin - Result := GridView.Columns[Index].DataBinding.FilterCriteriaItem; - if (Result <> nil) and not IsFilterOperatorSupported(Result.OperatorKind, Result.Value) then - Result := nil; -end; - -procedure TcxGridFilterRow.RefreshRecordInfo; -begin - with RecordInfo do - begin - Expanded := False; - Level := 0; - RecordIndex := -1; - end -end; - -function TcxGridFilterRow.GetSelected: Boolean; -begin - Result := FSelected; -end; - -function TcxGridFilterRow.GetVisible: Boolean; -begin - Result := True; -end; - -procedure TcxGridFilterRow.SetSelected(Value: Boolean); -begin - if FSelected <> Value then - begin - GridView.Controller.FilterRowFocusChanging(Value); - FSelected := Value; - Invalidate; - GridView.Controller.FilterRowFocusChanged; - end; -end; - -function TcxGridFilterRow.GetDisplayText(Index: Integer): string; -var - AFilterCriteriaItem: TcxFilterCriteriaItem; -begin - AFilterCriteriaItem := FilterCriteriaItems[Index]; - if AFilterCriteriaItem = nil then - Result := '' - else - Result := AFilterCriteriaItem.DisplayValue; -end; - -function TcxGridFilterRow.GetValue(Index: Integer): Variant; -var - AFilterCriteriaItem: TcxFilterCriteriaItem; -begin - AFilterCriteriaItem := FilterCriteriaItems[Index]; - if AFilterCriteriaItem = nil then - Result := Null - else - Result := AFilterCriteriaItem.Value; -end; - -procedure TcxGridFilterRow.SetDisplayText(Index: Integer; const Value: string); -var - AFilterCriteriaItem: TcxFilterCriteriaItem; -begin - AFilterCriteriaItem := FilterCriteriaItems[Index]; - if AFilterCriteriaItem <> nil then - AFilterCriteriaItem.DisplayValue := Value; -end; - -procedure TcxGridFilterRow.SetValue(Index: Integer; const Value: Variant); -var - AGridView: TcxGridTableView; -begin - AGridView := GridView; - AGridView.Controller.KeepFilterRowFocusing := True; - try - if VarIsSoftNull(Value) then - AGridView.Columns[Index].DataBinding.Filtered := False - else - begin - DataController.Filter.BeginUpdate; - try - DataController.Filter.Active := True; - AGridView.Columns[Index].DataBinding.AddToFilter(nil, - GetFilterOperatorKind(Value, True), Value, - GetDisplayTextForValue(Index, Value), True); - finally - DataController.Filter.EndUpdate; - end; - end; - finally - AGridView.Controller.KeepFilterRowFocusing := False; - end; -end; - -function TcxGridFilterRow.GetDisplayTextForValue(AIndex: Integer; const AValue: Variant): string; -var - AValueList: TcxGridFilterValueList; - AValueIndex: Integer; -begin - AValueList := ViewData.CreateFilterValueList; - try - GridView.Columns[AIndex].DataBinding.GetFilterValues(AValueList); - AValueIndex := AValueList.FindItemByValue(AValue); - if AValueIndex = -1 then - Result := GridView.Columns[AIndex].GetProperties(Self).GetDisplayText(AValue) - else - Result := AValueList[AValueIndex].DisplayText; - finally - AValueList.Free; - end; -end; - -function TcxGridFilterRow.GetFilterOperatorKind(const AValue: Variant; ACheckMask: Boolean): TcxFilterOperatorKind; - - function HasMask(const AValue: string): Boolean; - begin - Result := - (Pos(DataController.Filter.PercentWildcard, AValue) <> 0) or - (Pos(DataController.Filter.UnderscoreWildcard, AValue) <> 0); - end; - -begin - if VarIsStr(AValue) and (not ACheckMask or HasMask(AValue)) then - Result := foLike - else - Result := foEqual; -end; - -function TcxGridFilterRow.IsFilterOperatorSupported(AKind: TcxFilterOperatorKind; - const AValue: Variant): Boolean; -begin - Result := (AKind = foEqual) or (GetFilterOperatorKind(AValue, False) = AKind); -end; - -procedure TcxGridFilterRow.KeyDown(var Key: Word; Shift: TShiftState); -begin - inherited; - if Key = VK_ESCAPE then - begin - Focused := False; - Key := 0; - end; -end; - -function TcxGridFilterRow.CanFocusCells: Boolean; -begin - Result := True; -end; - -function TcxGridFilterRow.IsEmpty: Boolean; -{var - I: Integer;} -begin -{ for I := 0 to ValueCount - 1 do - begin - Result := FilterCriteriaItems[I] = nil; - if not Result then Exit; - end; - Result := True;} - Result := DataController.Filter.IsEmpty; -end; - -{ TcxGridMasterDataRow } - -function TcxGridMasterDataRow.GetActiveDetailGridView: TcxCustomGridView; -begin - if ActiveDetailIndex = -1 then - Result := nil - else - Result := DetailGridViews[ActiveDetailIndex]; -end; - -function TcxGridMasterDataRow.GetActiveDetailGridViewExists: Boolean; -begin - Result := IsValid and (ActiveDetailIndex <> -1) and DetailGridViewExists[ActiveDetailIndex]; -end; - -function TcxGridMasterDataRow.GetActiveDetailIndex: Integer; -begin - Result := InternalActiveDetailIndex; - if (Result <> -1) and not GridView.IsDestroying then - if not GridViewLevel[Result].Visible then - begin - GridView.BeginUpdate; - try - Result := GridView.GetDefaultActiveDetailIndex; - ActiveDetailIndex := Result; - finally - GridView.CancelUpdate; - end; - end - else - if not GridViewLevel.Options.TabsForEmptyDetails and not DetailGridViewHasData[Result] then - begin - GridView.BeginUpdate; - try - for Result := 0 to DetailGridViewCount - 1 do - if DetailGridViewHasData[Result] then - begin - ActiveDetailIndex := Result; - Exit; - end; - Result := -1; - finally - GridView.CancelUpdate; - end; - end; -end; - -function TcxGridMasterDataRow.GetActiveDetailLevel: TcxGridLevel; -begin - if ActiveDetailIndex = -1 then - Result := nil - else - Result := GridViewLevel[ActiveDetailIndex]; -end; - -function TcxGridMasterDataRow.GetDetailGridView(Index: Integer): TcxCustomGridView; -begin - Result := DataController.GetDetailLinkObject(RecordIndex, Index) as TcxCustomGridView; -end; - -function TcxGridMasterDataRow.GetDetailGridViewCount: Integer; -begin - Result := DataController.Relations.Count; -end; - -function TcxGridMasterDataRow.GetDetailGridViewExists(Index: Integer): Boolean; -begin - Result := DataController.IsDetailDataControllerExist(RecordIndex, Index); -end; - -function TcxGridMasterDataRow.GetDetailGridViewHasData(Index: Integer): Boolean; -begin - Result := DataController.GetDetailHasChildren(RecordIndex, Index); -end; - -function TcxGridMasterDataRow.GetInternalActiveDetailGridView: TcxCustomGridView; -begin - if InternalActiveDetailIndex = -1 then - Result := nil - else - Result := DetailGridViews[InternalActiveDetailIndex]; -end; - -function TcxGridMasterDataRow.GetInternalActiveDetailGridViewExists: Boolean; -begin - Result := IsValid and (InternalActiveDetailIndex <> -1) and DetailGridViewExists[InternalActiveDetailIndex]; -end; - -function TcxGridMasterDataRow.GetInternalActiveDetailIndex: Integer; -begin - Result := DataController.GetDetailActiveRelationIndex(RecordIndex); -end; - -procedure TcxGridMasterDataRow.SetActiveDetailIndex(Value: Integer); -var - AGridView: TcxCustomGridTableView; - APrevValue: Integer; - ANewActiveDetailLevel: TcxGridLevel; -begin - AGridView := GridView; - APrevValue := InternalActiveDetailIndex; - if APrevValue <> Value then - begin - ANewActiveDetailLevel := GridViewLevel.Items[Value]; - DataController.ChangeDetailActiveRelationIndex(RecordIndex, Value); - //if InternalActiveDetailIndex <> APrevValue then - TcxCustomGridAccess(AGridView.Control).DoActiveTabChanged(ANewActiveDetailLevel); - end; -end; - -procedure TcxGridMasterDataRow.SetActiveDetailLevel(Value: TcxGridLevel); -begin - if Value.Parent = GridViewLevel then - ActiveDetailIndex := Value.Index; -end; - -procedure TcxGridMasterDataRow.DoCollapse(ARecurse: Boolean); -var - I: Integer; - AGridView: TcxCustomGridView; -begin - //GridView.BeginUpdate; - try - if Expanded and ARecurse then - for I := 0 to DetailGridViewCount - 1 do - if DetailGridViewExists[I] then - begin - AGridView := DetailGridViews[I]; - if AGridView is TcxCustomGridTableView then - TcxCustomGridTableView(AGridView).ViewData.Collapse(ARecurse); - end; - DataController.ChangeDetailExpanding(RecordIndex, False); - finally - //GridView.EndUpdate; - end; -end; - -procedure TcxGridMasterDataRow.DoExpand(ARecurse: Boolean); -var - AViewData: TcxGridViewData; - ARecordIndex, I: Integer; - ARecord: TcxCustomGridRecord; - AGridView: TcxCustomGridView; -begin - AViewData := ViewData; - ARecordIndex := RecordIndex; - if not DataController.ChangeDetailExpanding(RecordIndex, True) then Exit; - ARecord := AViewData.GetRecordByRecordIndex(ARecordIndex); - if Self <> ARecord then - if ARecord is TcxGridMasterDataRow then - TcxGridMasterDataRow(ARecord).DoExpand(ARecurse) - else - else - if Expanded and ARecurse then - for I := 0 to DetailGridViewCount - 1 do - begin - AGridView := DetailGridViews[I]; - if AGridView is TcxCustomGridTableView then - TcxCustomGridTableView(AGridView).ViewData.Expand(ARecurse); - end; -end; - -function TcxGridMasterDataRow.GetExpandable: Boolean; -begin - Result := GridView.OptionsView.ExpandButtonsForEmptyDetails or - HasChildren or Expanded; -end; - -function TcxGridMasterDataRow.GetExpanded: Boolean; -begin - Result := DataController.GetDetailExpanding(RecordInfo.RecordIndex); -end; - -function TcxGridMasterDataRow.GetHasChildren: Boolean; -var - I: Integer; - ADataRelation: TcxCustomDataRelation; -begin - for I := 0 to GridViewLevel.VisibleCount - 1 do - begin - ADataRelation := GridViewLevel.VisibleItems[I].DataRelation; - //if ADataRelation <> nil then //!!! - begin - Result := DetailGridViewHasData[ADataRelation.Index]; - if Result then Exit; - end; - end; - Result := False; -end; - -function TcxGridMasterDataRow.GetViewInfoCacheItemClass: TcxCustomGridViewInfoCacheItemClass; -begin - Result := TcxGridMasterTableViewInfoCacheItem; -end; - -function TcxGridMasterDataRow.GetViewInfoClass: TcxCustomGridRecordViewInfoClass; -begin - Result := TcxGridMasterDataRowViewInfo; -end; - -procedure TcxGridMasterDataRow.KeyDown(var Key: Word; Shift: TShiftState); -begin - //if not ((Key = VK_LEFT) or (Key = VK_RIGHT)) then - AS5427 - inherited; -end; - -procedure TcxGridMasterDataRow.ToggleExpanded; -var - AGridView: TcxGridTableView; - AGridRecordIndex: Integer; -begin - if DataController.IsGridMode and not Expanded and not Focused then - begin - AGridView := GridView; - AGridRecordIndex := RecordIndex; - inherited; - if (AGridView.DataController.FocusedRecordIndex = AGridRecordIndex) then - AGridView.Controller.SelectFocusedRecord; - end - else - inherited; -end; - -function TcxGridMasterDataRow.ExpandOnDblClick: Boolean; -begin - Result := inherited ExpandOnDblClick and - GridView.OptionsBehavior.ExpandMasterRowOnDblClick; -end; - -function TcxGridMasterDataRow.GetFirstFocusableChild: TcxCustomGridRecord; -var - AGridView: TcxCustomGridView; - AGridRecordIndex: Integer; - ACycleChanged: Boolean; -begin - Result := inherited GetFirstFocusableChild; - if Expanded then - begin - AGridView := ActiveDetailGridView; - if (AGridView is TcxGridTableView) and TcxGridTableView(AGridView).ViewData.HasFilterRow then - Result := TcxGridTableView(AGridView).ViewData.FilterRow - else - if AGridView is TcxCustomGridTableView then - with TcxCustomGridTableView(AGridView) do - if ViewData.HasNewItemRecord then - Result := ViewData.NewItemRecord - else - begin - AGridRecordIndex := Controller.FindNextRecord(-1, True, False, ACycleChanged); - if AGridRecordIndex <> -1 then - Result := ViewData.Records[AGridRecordIndex]; - end; - end; -end; - -function TcxGridMasterDataRow.GetLastFocusableChild(ARecursive: Boolean): TcxCustomGridRecord; -var - AGridView: TcxCustomGridView; - AGridRecordIndex: Integer; - AGridRecord: TcxCustomGridRecord; - ACycleChanged: Boolean; -begin - Result := inherited GetLastFocusableChild(ARecursive); - if Expanded then - begin - AGridView := ActiveDetailGridView; - if AGridView is TcxCustomGridTableView then - with TcxCustomGridTableView(AGridView) do - begin - AGridRecordIndex := Controller.FindNextRecord(-1, False, True, ACycleChanged); - if AGridRecordIndex <> -1 then - begin - Result := ViewData.Records[AGridRecordIndex]; - if ARecursive then - begin - AGridRecord := Result.GetLastFocusableChild(ARecursive); - if AGridRecord <> nil then Result := AGridRecord; - end; - end - else - if ViewData.HasNewItemRecord then - Result := ViewData.NewItemRecord - else - if (AGridView is TcxGridTableView) and - TcxGridTableView(AGridView).ViewData.HasFilterRow then - Result := TcxGridTableView(AGridView).ViewData.FilterRow; - end; - end; -end; - -{ TcxGridGroupRow } - -function TcxGridGroupRow.GetGroupedColumn: TcxGridColumn; -begin - Result := GridView.GroupedColumns[Level]; -end; - -function TcxGridGroupRow.GetGroupSummaryItems: TcxDataGroupSummaryItems; -begin - Result := DataController.Summary.GroupSummaryItems[Level]; -end; - -procedure TcxGridGroupRow.DoCollapse(ARecurse: Boolean); -begin - if ARecurse or Expanded then //!!! - DataController.Groups.ChangeExpanding(Index, False, ARecurse); -end; - -procedure TcxGridGroupRow.DoExpand(ARecurse: Boolean); -begin - if ARecurse or not Expanded then //!!! - DataController.Groups.ChangeExpanding(Index, True, ARecurse); -end; - -{function TcxGridGroupRow.GetDestroyingOnExpanding: Boolean; -begin - Result := True; -end;} - -function TcxGridGroupRow.GetExpandable: Boolean; -begin - Result := not (dcoGroupsAlwaysExpanded in DataController.Options); -end; - -function TcxGridGroupRow.GetExpanded: Boolean; -begin - Result := RecordInfo.Expanded; -end; - -function TcxGridGroupRow.GetDisplayCaption: string; -begin - Result := GroupedColumn.GetAlternateCaption; - if Result <> '' then - Result := Result + ' : '; - Result := Result + DisplayTexts[-1]; -end; - -function TcxGridGroupRow.GetDisplayText(Index: Integer): string; -begin - if ViewData.HasCustomDataHandling(GroupedColumn, doGrouping) then - Result := ViewData.GetCustomDataDisplayText(RecordIndex, GroupedColumn.Index, doGrouping) - else - Result := inherited GetDisplayText(Index); -end; - -function TcxGridGroupRow.GetDisplayTextValue: string; -var - S: string; -begin - Result := DisplayCaption; - S := DataController.Summary.GroupSummaryText[Index]; - if S <> '' then - Result := Result + ' ' + S; -end; - -function TcxGridGroupRow.GetIsData: Boolean; -begin - Result := False; -end; - -function TcxGridGroupRow.GetIsParent: Boolean; -begin - Result := RecordInfo.Level < DataController.Groups.GroupingItemCount; //!!! -end; - -function TcxGridGroupRow.GetValue: Variant; -begin - Result := Values[-1]; - if ViewData.HasCustomDataHandling(GroupedColumn, doGrouping) then - Result := ViewData.GetCustomDataValue(GroupedColumn, Result, doGrouping); -end; - -function TcxGridGroupRow.GetViewInfoCacheItemClass: TcxCustomGridViewInfoCacheItemClass; -begin - Result := TcxGridTableViewInfoCacheItem; -end; - -function TcxGridGroupRow.GetViewInfoClass: TcxCustomGridRecordViewInfoClass; -begin - Result := TcxGridGroupRowViewInfo; -end; - -procedure TcxGridGroupRow.SetDisplayText(Index: Integer; const Value: string); -begin -end; - -procedure TcxGridGroupRow.SetValue(Index: Integer; const Value: Variant); -begin -end; - -function TcxGridGroupRow.GetGroupSummaryInfo(var ASummaryItems: TcxDataSummaryItems; - var ASummaryValues: PVariant): Boolean; -begin - Result := DataController.Summary.GetGroupSummaryInfo(Index, ASummaryItems, ASummaryValues); -end; - -{ TcxGridViewData } - -destructor TcxGridViewData.Destroy; -begin - DestroyFilterRow; - inherited; -end; - -function TcxGridViewData.GetNewItemRow: TcxGridNewItemRow; -begin - Result := TcxGridNewItemRow(NewItemRecord); -end; - -function TcxGridViewData.GetRow(Index: Integer): TcxCustomGridRow; -begin - Result := TcxCustomGridRow(Records[Index]); -end; - -function TcxGridViewData.GetRowCount: Integer; -begin - Result := RecordCount; -end; - -function TcxGridViewData.GetFirstVisibleExpandedMasterRow: TcxGridMasterDataRow; - - function GetExistingVisibleExpandedMasterRowIndex: Integer; - begin - for Result := Controller.TopRecordIndex to Controller.TopRecordIndex + ViewInfo.RecordsViewInfo.VisibleCount - 1 do - if (Rows[Result] is TcxGridMasterDataRow) and Rows[Result].Expanded then - Exit; - Result := -1; - end; - - function FindMasterRowAndMakeItExpandedAndVisible: Integer; - begin - Result := Controller.TopRecordIndex; - if Rows[Result] is TcxGridGroupRow then - begin - Rows[Result].Expand(True); - while (Result < RowCount) and not (Rows[Result] is TcxGridMasterDataRow) do - Inc(Result); - end; - if Result < RowCount then - Rows[Result].Expanded := True - else - Result := -1; - end; - -var - ARowIndex: Integer; -begin - if (RowCount = 0) or not GridView.IsMaster then - Result := nil - else - begin - ARowIndex := GetExistingVisibleExpandedMasterRowIndex; - if ARowIndex = -1 then - ARowIndex := FindMasterRowAndMakeItExpandedAndVisible; - if ARowIndex = -1 then - Result := nil - else - Result := Rows[ARowIndex].AsMasterDataRow; - end; -end; - -function TcxGridViewData.GetNewItemRecordClass: TcxCustomGridRecordClass; -begin - Result := TcxGridNewItemRow; -end; - -function TcxGridViewData.GetRecordByKind(AKind, AIndex: Integer): TcxCustomGridRecord; -begin - if AKind = rkFiltering then - if HasFilterRow then - Result := FilterRow - else - Result := nil - else - Result := inherited GetRecordByKind(AKind, AIndex); -end; - -function TcxGridViewData.GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; -begin - if ARecordInfo.Level < DataController.Groups.GroupingItemCount then - Result := TcxGridGroupRow - else - if GridView.IsMaster then - Result := TcxGridMasterDataRow - else - Result := TcxGridDataRow; -end; - -function TcxGridViewData.GetRecordKind(ARecord: TcxCustomGridRecord): Integer; -begin - if HasFilterRow and (ARecord = FilterRow) then - Result := rkFiltering - else - Result := inherited GetRecordKind(ARecord); -end; - -procedure TcxGridViewData.CreateFilterRow; -var - ARowInfo: TcxRowInfo; -begin - FFilterRow := GetFilterRowClass.Create(Self, -1, ARowInfo); - FFilterRow.RefreshRecordInfo; -end; - -procedure TcxGridViewData.DestroyFilterRow; -begin - FFilterRow.Free; - FFilterRow := nil; -end; - -procedure TcxGridViewData.CheckFilterRow; -begin - if HasFilterRow then - CreateFilterRow - else - DestroyFilterRow; -end; - -{procedure TcxGridViewData.RecreateFilterRow; -var - ASelected: Boolean; -begin - if HasFilterRow then - begin - ASelected := FilterRow.InternalSelected; - DestroyFilterRow; - CreateFilterRow; - FilterRow.InternalSelected := ASelected; - end; -end;} - -function TcxGridViewData.GetFilterRowClass: TcxGridFilterRowClass; -begin - Result := TcxGridFilterRow; -end; - -procedure TcxGridViewData.Collapse(ARecurse: Boolean); -begin - if ARecurse then - begin - BeginUpdate; - try - DataController.Groups.FullCollapse; - DataController.CollapseDetails; - finally - EndUpdate; - end; - end - else - inherited; -end; - -procedure TcxGridViewData.Expand(ARecurse: Boolean); -begin - DataController.Groups.FullExpand; - inherited; -end; - -function TcxGridViewData.HasFilterRow: Boolean; -begin - Result := TcxGridTableView(GridView).FilterRow.Visible; -end; - -function TcxGridViewData.HasNewItemRecord: Boolean; -begin - Result := TcxGridTableView(GridView).NewItemRow.Visible; -end; - -function TcxGridViewData.MakeDetailVisible(ADetailLevel: TComponent{TcxGridLevel}): TcxCustomGridView; -var - ARow: TcxGridMasterDataRow; -begin - Result := inherited MakeDetailVisible(ADetailLevel); - ARow := GetFirstVisibleExpandedMasterRow; - if ARow <> nil then - begin - ARow.ActiveDetailLevel := TcxGridLevel(ADetailLevel); - if ARow.ActiveDetailLevel = ADetailLevel then - Result := ARow.ActiveDetailGridView; - ARow.MakeVisible; - end; -end; - -{procedure TcxGridViewData.Refresh(ARecordCount: Integer); -begin - RecreateFilterRow; - inherited; -end;} - -{ TcxGridColumnHeaderMovingObject } - -function TcxGridColumnHeaderMovingObject.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridColumnHeaderMovingObject.GetSourceItem: TcxGridColumn; -begin - Result := TcxGridColumn(inherited SourceItem); -end; - -function TcxGridColumnHeaderMovingObject.GetViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited ViewInfo); -end; - -procedure TcxGridColumnHeaderMovingObject.SetSourceItem(Value: TcxGridColumn); -begin - inherited SourceItem := Value; -end; - -procedure TcxGridColumnHeaderMovingObject.CalculateDestParams(AHitTest: TcxCustomGridHitTest; - out AContainerKind: TcxGridItemContainerKind; out AZone: TcxGridItemContainerZone); -begin - inherited; - if AContainerKind = ckNone then - begin - AZone := ViewInfo.GroupByBoxViewInfo.GetZone(AHitTest.Pos); - if AZone = nil then - begin - AZone := ViewInfo.HeaderViewInfo.GetZone(AHitTest.Pos); - if AZone <> nil then - AContainerKind := ckHeader; - end - else - AContainerKind := ckGroupByBox; - end; -end; - -function TcxGridColumnHeaderMovingObject.CanRemove: Boolean; -begin - Result := SourceItem.VisibleForCustomization and - ((SourceItemContainerKind = ckGroupByBox) and SourceItem.CanGroup or - (SourceItemContainerKind = ckHeader) and SourceItem.CanHide and - (FOriginalDestColumnContainerKind <> ckGroupByBox) and - (GridView.Controller.Customization or GridView.OptionsCustomize.ColumnHiding)); -end; - -procedure TcxGridColumnHeaderMovingObject.CheckDestItemContainerKind(var AValue: TcxGridItemContainerKind); -begin - if (AValue = ckGroupByBox) and not SourceItem.CanGroup then - AValue := ckNone; - inherited; -end; - -procedure TcxGridColumnHeaderMovingObject.DoColumnMoving; -var - AIndex: Integer; -begin - with SourceItem do - begin - if DestZone.ItemIndex = GridView.VisibleColumnCount then - AIndex := GridView.ColumnCount - 1 - else - begin - AIndex := GridView.VisibleColumns[DestZone.ItemIndex].Index; - if Index < AIndex then Dec(AIndex); - end; - Index := AIndex; - end; -end; - -function TcxGridColumnHeaderMovingObject.GetArrowAreaBounds(APlace: TcxGridArrowPlace): TRect; - - procedure CalculateForGroupByBox; - begin - with ViewInfo.GroupByBoxViewInfo do - if DestZone.ItemIndex = Count then - if Count = 0 then - begin - Result := Bounds; - Inc(Result.Left, GroupByBoxLeftOffset); - InflateRect(Result, 0, -GroupByBoxTopOffset); - end - else - begin - Result := Items[Count - 1].Bounds; - Result.Left := Result.Right + GroupByBoxHorOffset div 2; - end - else - begin - Result := Items[DestZone.ItemIndex].Bounds; - Dec(Result.Left, GroupByBoxHorOffset div 2); - if DestZone.ItemIndex <> 0 then - OffsetRect(Result, 0, -GroupByBoxVerOffset div 2); - end; - end; - -begin - if DestItemContainerKind = ckGroupByBox then - CalculateForGroupByBox - else - Result := GetArrowAreaBoundsForHeader(APlace); -end; - -function TcxGridColumnHeaderMovingObject.GetArrowAreaBoundsForHeader(APlace: TcxGridArrowPlace): TRect; -begin - with ViewInfo.HeaderViewInfo do - if DestZone.ItemIndex = Count then - if Count = 0 then - Result := Bounds - else - begin - Result := Items[Count - 1].Bounds; - Result.Left := Result.Right; - end - else - Result := Items[DestZone.ItemIndex].Bounds; -end; - -function TcxGridColumnHeaderMovingObject.GetArrowsClientRect: TRect; -begin - Result := inherited GetArrowsClientRect; - with ViewInfo.ClientBounds do - begin - Result.Left := Left; - Result.Right := Right; - end; -end; - -function TcxGridColumnHeaderMovingObject.GetSourceItemViewInfo: TcxCustomGridCellViewInfo; -begin - case SourceItemContainerKind of - ckGroupByBox: - Result := ViewInfo.GroupByBoxViewInfo[SourceItem.GroupIndex]; - ckHeader: - Result := ViewInfo.HeaderViewInfo[SourceItem.VisibleIndex]; - else - Result := inherited GetSourceItemViewInfo; - end; -end; - -function TcxGridColumnHeaderMovingObject.IsValidDestination: Boolean; -begin - Result := DestItemContainerKind in [ckGroupByBox, ckHeader]; - if Result then - begin - case DestItemContainerKind of - ckGroupByBox: - Result := SourceItem.GroupIndex = -1; - ckHeader: - Result := not SourceItem.Visible; - end; - Result := Result or IsValidDestinationForVisibleSource; - end; -end; - -function TcxGridColumnHeaderMovingObject.IsValidDestinationForVisibleSource: Boolean; -begin - case DestItemContainerKind of - ckGroupByBox: - Result := - (DestZone.ItemIndex < SourceItem.GroupIndex) or - (SourceItem.GroupIndex + 1 < DestZone.ItemIndex); - ckHeader: - Result := - (SourceItemContainerKind = ckGroupByBox) or - (DestZone.ItemIndex < SourceItem.VisibleIndex) or - (SourceItem.VisibleIndex + 1 < DestZone.ItemIndex); - else - Result := False; - end; -end; - -procedure TcxGridColumnHeaderMovingObject.EndDragAndDrop(Accepted: Boolean); -var - APrevGroupIndex: Integer; - AColumnPosChanged: Boolean; - - procedure DoColumnGrouping; - begin - if IsValidDestination then - AColumnPosChanged := SourceItem.GroupBy(DestZone.ItemIndex - - Byte((SourceItem.GroupIndex <> -1) and (SourceItem.GroupIndex < DestZone.ItemIndex))); - end; - - procedure DoColumnRemoving; - begin - if not CanRemove then Exit; - with SourceItem do - case SourceItemContainerKind of - ckGroupByBox: - AColumnPosChanged := SourceItem.GroupBy(-1, - (DestItemContainerKind <> ckCustomizationForm) and - (not GridView.OptionsCustomize.ColumnHiding or not CanHide) and - not Controller.Customization); - ckHeader: - if CanHide then - begin - Visible := False; - AColumnPosChanged := True; - end; - end; - end; - -begin - inherited; - if Accepted then - begin - AColumnPosChanged := False; - APrevGroupIndex := SourceItem.GroupIndex; - TcxCustomGrid(GridView.Control){GridView}.BeginUpdate; - try - case DestItemContainerKind of - ckGroupByBox: - DoColumnGrouping; - ckHeader: - if IsValidDestination then - begin - DoColumnMoving; - with SourceItem do - begin - if (SourceItemContainerKind = ckGroupByBox) and CanGroup then - GroupIndex := -1; - Visible := True; - end; - AColumnPosChanged := True; - end; - else - DoColumnRemoving; - end; - finally - TcxCustomGrid(GridView.Control){GridView}.EndUpdate; - end; - if SourceItem.GroupIndex <> APrevGroupIndex then - Controller.MakeFocusedRecordVisible; - if AColumnPosChanged then - GridView.DoColumnPosChanged(SourceItem); - end; -end; - -procedure TcxGridColumnHeaderMovingObject.Init(const P: TPoint; AParams: TcxCustomGridHitTest); -begin - inherited; - with AParams as TcxGridColumnHeaderHitTest do - begin - SourceItem := Column; - SourceItemContainerKind := ColumnContainerKind; - end; -end; - -{ TcxCustomGridSizingObject } - -function TcxCustomGridSizingObject.GetController: TcxGridTableController; -begin - Result := TcxGridTableController(inherited Controller); -end; - -function TcxCustomGridSizingObject.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxCustomGridSizingObject.GetViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited ViewInfo); -end; - -procedure TcxCustomGridSizingObject.SetDestPointX(Value: Integer); -begin - if FDestPointX <> Value then - begin - Dirty := True; - FDestPointX := Value; - end; -end; - -procedure TcxCustomGridSizingObject.SetDestPointY(Value: Integer); -begin - if FDestPointY <> Value then - begin - Dirty := True; - FDestPointY := Value; - end; -end; - -procedure TcxCustomGridSizingObject.DirtyChanged; -begin - Canvas.InvertRect(SizingMarkBounds); -end; - -function TcxCustomGridSizingObject.GetCurrentSize: Integer; -begin - Result := OriginalSize + DeltaSize; -end; - -function TcxCustomGridSizingObject.GetDeltaSize: Integer; -begin - if IsHorizontalSizing then - Result := DestPointX - SourcePoint.X - else - Result := DestPointY - SourcePoint.Y; -end; - -function TcxCustomGridSizingObject.GetDragAndDropCursor(Accepted: Boolean): TCursor; -begin - if IsHorizontalSizing then - Result := crcxGridHorzSize - else - Result := crcxGridVertSize; -end; - -function TcxCustomGridSizingObject.GetHorzSizingMarkBounds: TRect; -begin - with Result do - begin - Right := SizingItemBounds.Left + CurrentSize; - Left := Right - SizingMarkWidth; - Top := SizingItemBounds.Top; - Bottom := ViewInfo.Bounds.Bottom - ViewInfo.PartsBottomHeight; - end; -end; - -function TcxCustomGridSizingObject.GetImmediateStart: Boolean; -begin - Result := True; -end; - -function TcxCustomGridSizingObject.GetIsHorizontalSizing: Boolean; -begin - Result := True; -end; - -function TcxCustomGridSizingObject.GetSizingMarkBounds: TRect; -begin - if IsHorizontalSizing then - Result := GetHorzSizingMarkBounds - else - Result := GetVertSizingMarkBounds; -end; - -function TcxCustomGridSizingObject.GetVertSizingMarkBounds: TRect; -begin - with Result do - begin - Left := ViewInfo.Bounds.Left; - Right := ViewInfo.Bounds.Right; - Bottom := SizingItemBounds.Top + CurrentSize; - Top := Bottom - SizingMarkWidth; - end; -end; - -procedure TcxCustomGridSizingObject.DragAndDrop(const P: TPoint; var Accepted: Boolean); -begin - if IsHorizontalSizing then - DestPointX := P.X - else - DestPointY := P.Y; - Accepted := True; - inherited; -end; - -procedure TcxCustomGridSizingObject.Init(const P: TPoint; AParams: TcxCustomGridHitTest); -begin - inherited; - FDestPointX := SourcePoint.X; - FDestPointY := SourcePoint.Y; -end; - -{ TcxCustomGridColumnSizingObject } - -function TcxCustomGridColumnSizingObject.GetColumnHeaderViewInfo: TcxGridColumnHeaderViewInfo; -begin - Result := ViewInfo.HeaderViewInfo[Column.VisibleIndex]; -end; - -function TcxCustomGridColumnSizingObject.GetSizingItemBounds: TRect; -begin - Result := ColumnHeaderViewInfo.Bounds; -end; - -function TcxCustomGridColumnSizingObject.GetSizingMarkWidth: Integer; -begin - Result := ColumnSizingMarkWidth; -end; - -procedure TcxCustomGridColumnSizingObject.Init(const P: TPoint; AParams: TcxCustomGridHitTest); -begin - inherited; - Column := (AParams as TcxCustomGridColumnHitTest).Column; -end; - -{ TcxGridColumnHorzSizingObject } - -procedure TcxGridColumnHorzSizingObject.BeginDragAndDrop; -begin - OriginalSize := ColumnHeaderViewInfo.Width; - Controller.FHorzSizingColumn := Column; - inherited; -end; - -procedure TcxGridColumnHorzSizingObject.EndDragAndDrop(Accepted: Boolean); -begin - inherited; - Controller.FHorzSizingColumn := nil; - if Accepted and (CurrentSize <> OriginalSize) then - begin - Column.ForceWidth(ColumnHeaderViewInfo.CalculateRealWidth(CurrentSize)); - GridView.DoColumnSizeChanged(Column); - end; -end; - -function TcxGridColumnHorzSizingObject.GetCurrentSize: Integer; -begin - Result := inherited GetCurrentSize; - ColumnHeaderViewInfo.CheckWidth(Result); -end; - -{ TcxGridRowSizingObject } - -function TcxGridRowSizingObject.GetRowViewInfo: TcxCustomGridRowViewInfo; -begin - Result := TcxCustomGridRowViewInfo(FRow.ViewInfo); -end; - -procedure TcxGridRowSizingObject.BeginDragAndDrop; -begin - OriginalSize := RowViewInfo.RowHeight; - inherited; -end; - -procedure TcxGridRowSizingObject.EndDragAndDrop(Accepted: Boolean); -begin - inherited; - if Accepted then - RowViewInfo.RowHeight := CurrentSize; -end; - -function TcxGridRowSizingObject.GetCurrentSize: Integer; -begin - Result := inherited GetCurrentSize; - RowViewInfo.CheckRowHeight(Result); -end; - -function TcxGridRowSizingObject.GetIsHorizontalSizing: Boolean; -begin - Result := False; -end; - -function TcxGridRowSizingObject.GetSizingItemBounds: TRect; -begin //!!! - Result := RowViewInfo.Bounds; -end; - -function TcxGridRowSizingObject.GetSizingMarkWidth: Integer; -begin - Result := RowSizingMarkWidth; -end; - -procedure TcxGridRowSizingObject.Init(const P: TPoint; AParams: TcxCustomGridHitTest); -begin - inherited; - FRow := TcxCustomGridRow((AParams as TcxGridRowSizingEdgeHitTest).GridRecord); -end; - -{ TcxGridTableItemsListBox } - -constructor TcxGridTableItemsListBox.Create(AOwner: TComponent); -begin - inherited; - Style.Color := clBtnFace; -end; - -function TcxGridTableItemsListBox.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridTableItemsListBox.CalculateItemHeight: Integer; -begin - Result := 2 * (LookAndFeelPainter.HeaderBorderSize + cxGridCellTextOffset) + - Canvas.TextHeight('Qq'); -end; - -procedure TcxGridTableItemsListBox.PaintItem(ACanvas: TcxCanvas; R: TRect; - AIndex: Integer; AFocused: Boolean); -const - States: array[Boolean] of TcxButtonState = (cxbsNormal, cxbsHot); -var - ATextR, ASelectionR: TRect; -begin - ACanvas.Font.Color := clBtnText; - ASelectionR := R; - with LookAndFeelPainter do - begin - InflateRect(ASelectionR, -HeaderBorderSize, -HeaderBorderSize); - ATextR := ASelectionR; - InflateRect(ATextR, -cxGridCellTextOffset, 0); - DrawHeader(ACanvas, R, ATextR, [], - cxBordersAll, States[AFocused], taLeftJustify, vaCenter, False, - GetItemEndEllipsis, Items[AIndex], ACanvas.Font, - clBtnText, clBtnFace, DrawItemDrawBackgroundHandler); - if AFocused then - DrawHeaderPressed(ACanvas, ASelectionR); - end; -end; - -{ TcxGridTableColumnsListBox } - -procedure TcxGridTableColumnsListBox.DoRefreshItems; -begin - inherited; - RefreshItemsAsTableItems; -end; - -function TcxGridTableColumnsListBox.DrawItemDrawBackgroundHandler(ACanvas: TcxCanvas; - const ABounds: TRect): Boolean; -begin - Result := GridView.ViewInfo.HeaderViewInfo.DrawColumnBackgroundHandler(ACanvas, ABounds); -end; - -function TcxGridTableColumnsListBox.GetDragAndDropParams: TcxCustomGridHitTest; -begin - Result := TcxGridColumnHeaderHitTest.Instance(Point(-1, -1)); - with TcxGridColumnHeaderHitTest(Result) do - begin - GridView := Self.GridView; - Column := TcxGridColumn(DragAndDropItem); - ColumnContainerKind := ckCustomizationForm; - end; -end; - -function TcxGridTableColumnsListBox.GetItemEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.HeaderEndEllipsis; -end; - -{ TcxGridTableCustomizationForm } - -function TcxGridTableCustomizationForm.GetColumnsListBox: TcxGridTableColumnsListBox; -begin - Result := TcxGridTableColumnsListBox(ItemsListBox); -end; - -function TcxGridTableCustomizationForm.GetColumnsPage: TcxTabSheet; -begin - Result := ItemsPage; -end; - -function TcxGridTableCustomizationForm.GetController: TcxGridTableController; -begin - Result := TcxGridTableController(inherited Controller); -end; - -function TcxGridTableCustomizationForm.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridTableCustomizationForm.GetViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited ViewInfo); -end; - -function TcxGridTableCustomizationForm.GetItemsListBoxClass: TcxCustomGridTableItemsListBoxClass; -begin - Result := TcxGridTableColumnsListBox; -end; - -function TcxGridTableCustomizationForm.GetItemsPageCaption: string; -begin - Result := cxGetResourceString(@scxGridCustomizationFormColumnsPageCaption); -end; - -{ TcxGridDragOpenInfoMasterDataRowTab } - -constructor TcxGridDragOpenInfoMasterDataRowTab.Create(ALevel: TcxGridLevel; - AGridRow: TcxGridMasterDataRow); -begin - inherited Create(ALevel); - GridRow := AGridRow; -end; - -function TcxGridDragOpenInfoMasterDataRowTab.Equals(AInfo: TcxCustomGridDragOpenInfo): Boolean; -begin - Result := inherited Equals(AInfo) and - (GridRow = TcxGridDragOpenInfoMasterDataRowTab(AInfo).GridRow); -end; - -procedure TcxGridDragOpenInfoMasterDataRowTab.Run; -begin - GridRow.ActiveDetailIndex := Level.Index; -end; - -{ TcxGridColumnsCustomizationPopup } - -function TcxGridColumnsCustomizationPopup.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -procedure TcxGridColumnsCustomizationPopup.ItemClicked(AItem: TObject; AChecked: Boolean); -begin - inherited; - GridView.DoColumnPosChanged(TcxGridColumn(AItem)); -end; - -procedure TcxGridColumnsCustomizationPopup.SetItemIndex(AItem: TObject; AIndex: Integer); -begin - inherited; - GridView.DoColumnPosChanged(TcxGridColumn(AItem)); -end; - -{ TcxGridTableEditingController } - -function TcxGridTableEditingController.GetController: TcxGridTableController; -begin - Result := TcxGridTableController(inherited Controller); -end; - -function TcxGridTableEditingController.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridTableEditingController.CanInitEditing: Boolean; -begin - if Controller.IsFilterRowFocused then - Result := True - else - Result := inherited CanInitEditing; -end; - -function TcxGridTableEditingController.CanUpdateEditValue: Boolean; -begin - Result := inherited CanUpdateEditValue and not ApplyingImmediateFiltering; -end; - -procedure TcxGridTableEditingController.DoEditChanged; -begin - inherited; - if Controller.IsFilterRowFocused and (GridView.FilterRow.ApplyChanges = fracImmediately) then - begin - ApplyingImmediateFiltering := True; - try - EditingItem.EditValue := Edit.EditingValue; - finally - ApplyingImmediateFiltering := False; - end; - end; -end; - -procedure TcxGridTableEditingController.DoEditKeyDown(var Key: Word; Shift: TShiftState); -begin - if Controller.IsFilterRowFocused and (GridView.FilterRow.ApplyChanges = fracImmediately) and - (Key = VK_ESCAPE) then - Edit.Reset; - inherited; -end; - -function TcxGridTableEditingController.GetHideEditOnFocusedRecordChange: Boolean; -begin - Result := inherited GetHideEditOnFocusedRecordChange or - GridView.ViewData.HasFilterRow; -end; - -procedure TcxGridTableEditingController.InitEdit; - - procedure AddFilterValues(AStrings: TStrings); - var - AValueList: TcxGridFilterValueList; - I: Integer; - begin - AValueList := Controller.ViewData.CreateFilterValueList; - try - EditingItem.DataBinding.GetFilterValues(AValueList, True, False, True); - with AStrings do - begin - BeginUpdate; - try - for I := 0 to AValueList.Count - 1 do - Add(AValueList[I].Value); - finally - EndUpdate; - end; - end; - finally - AValueList.Free; - end; - end; - -begin - inherited; - if Controller.IsFilterRowFocused then - begin - // won't work if both Properties and RepositoryItem are assigned to column - Edit.InternalProperties.ReadOnly := False; - if (GridView.FilterRow.ApplyChanges = fracOnCellExit) and - (Edit is TcxCustomTextEdit) and (Edit.ActiveProperties = TcxCustomTextEdit(Edit).Properties) then - AddFilterValues(TcxCustomTextEdit(Edit).Properties.LookupItems); - end; -end; - -procedure TcxGridTableEditingController.PostEditingData; -begin - if Controller.IsFilterRowFocused then - UpdateValue - else - inherited; -end; - -{ TcxGridTableController } - -constructor TcxGridTableController.Create(AGridView: TcxCustomGridView); -begin - inherited; - FSelectedColumns := TList.Create; -end; - -destructor TcxGridTableController.Destroy; -begin - FreeAndNil(FSelectedColumns); - inherited; -end; - -function TcxGridTableController.GetColumnsCustomizationPopup: TcxGridColumnsCustomizationPopup; -begin - Result := TcxGridColumnsCustomizationPopup(ItemsCustomizationPopup); -end; - -function TcxGridTableController.GetCustomizationForm: TcxGridTableCustomizationForm; -begin - Result := TcxGridTableCustomizationForm(inherited CustomizationForm); -end; - -function TcxGridTableController.GetEditingController: TcxGridTableEditingController; -begin - Result := TcxGridTableEditingController(inherited EditingController); -end; - -function TcxGridTableController.GetFocusedColumn: TcxGridColumn; -begin - Result := TcxGridColumn(FocusedItem); -end; - -function TcxGridTableController.GetFocusedColumnIndex: Integer; -begin - Result := FocusedItemIndex; -end; - -function TcxGridTableController.GetFocusedRow: TcxCustomGridRow; -begin - Result := TcxCustomGridRow(FocusedRecord); -end; - -function TcxGridTableController.GetFocusedRowIndex: Integer; -begin - Result := FocusedRecordIndex; -end; - -function TcxGridTableController.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridTableController.GetIsColumnHorzSizing: Boolean; -begin - Result := FHorzSizingColumn <> nil; -end; - -function TcxGridTableController.GetSelectedColumn(Index: Integer): TcxGridColumn; -begin - Result := TcxGridColumn(FSelectedColumns[Index]); -end; - -function TcxGridTableController.GetSelectedColumnCount: Integer; -begin - Result := FSelectedColumns.Count; -end; - -function TcxGridTableController.GetSelectedRow(Index: Integer): TcxCustomGridRow; -begin - Result := TcxCustomGridRow(SelectedRecords[Index]); -end; - -function TcxGridTableController.GetSelectedRowCount: Integer; -begin - Result := SelectedRecordCount; -end; - -function TcxGridTableController.GetTopRowIndex: Integer; -begin - Result := TopRecordIndex; -end; - -function TcxGridTableController.GetViewData: TcxGridViewData; -begin - Result := TcxGridViewData(inherited ViewData); -end; - -function TcxGridTableController.GetViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited ViewInfo); -end; - -procedure TcxGridTableController.SetFocusedColumn(Value: TcxGridColumn); -begin - FocusedItem := Value; -end; - -procedure TcxGridTableController.SetFocusedColumnIndex(Value: Integer); -begin - FocusedItemIndex := Value; -end; - -procedure TcxGridTableController.SetFocusedRow(Value: TcxCustomGridRow); -begin - FocusedRecord := Value; -end; - -procedure TcxGridTableController.SetFocusedRowIndex(Value: Integer); -begin - FocusedRecordIndex := Value; -end; - -procedure TcxGridTableController.SetLeftPos(Value: Integer); -var - APrevLeftPos: Integer; - -//var ft,lt:integer; - -begin - CheckLeftPos(Value); - if FLeftPos <> Value then - begin - - //ft:=gettickcount; - - APrevLeftPos := FLeftPos; - FLeftPos := Value; - if GridView.CanOffsetHorz then - GridView.Offset(0, APrevLeftPos - FLeftPos, 0) - else - LeftPosChanged; - GridView.DoLeftPosChanged; - - {site.Update; - lt := gettickcount; - application.MainForm.Caption := inttostr(lt-ft);} - - end; -end; - -procedure TcxGridTableController.SetPressedColumn(Value: TcxGridColumn); -var - R1, R2: TRect; - - procedure GetUpdateRects; - - function GetUpdateRect(AContainerViewInfo: TcxGridColumnContainerViewInfo; - AIndex: Integer): TRect; - begin - if AIndex <> -1 then - Result := AContainerViewInfo[AIndex].Bounds - else - Result := Rect(0, 0, 0, 0); - end; - - begin - R1 := GetUpdateRect(ViewInfo.GroupByBoxViewInfo, FPressedColumn.GroupIndex); - R2 := GetUpdateRect(ViewInfo.HeaderViewInfo, FPressedColumn.VisibleIndex); - end; - - procedure InvalidateRects; - begin - GridView.ViewChanged(R1); - GridView.ViewChanged(R2); - end; - -begin - if FPressedColumn <> Value then - if ViewInfo.IsCalculating then - FPressedColumn := Value - else - begin - if Value = nil then GetUpdateRects; - FPressedColumn := Value; - if Value <> nil then GetUpdateRects; - InvalidateRects; - end; -end; - -procedure TcxGridTableController.SetTopRowIndex(Value: Integer); -begin - TopRecordIndex := Value; -end; - -procedure TcxGridTableController.AddSelectedColumn(AColumn: TcxGridColumn); -begin - AColumn.FSelected := True; - FSelectedColumns.Add(AColumn); - //GridView.LayoutChanged; - InvalidateSelection; -end; - -procedure TcxGridTableController.RemoveSelectedColumn(AColumn: TcxGridColumn); -begin - AColumn.FSelected := False; - FSelectedColumns.Remove(AColumn); - //GridView.LayoutChanged; - InvalidateSelection; -end; - -function TcxGridTableController.CanAppend(ACheckOptions: Boolean): Boolean; -begin - Result := inherited CanAppend(ACheckOptions) and not ViewData.HasNewItemRecord; -end; - -function TcxGridTableController.CanDelete(ACheckOptions: Boolean): Boolean; -begin - Result := inherited CanDelete(ACheckOptions) and - not IsFilterRowFocused and not IsNewItemRowFocused; -end; - -function TcxGridTableController.CanEdit: Boolean; -begin - Result := inherited CanEdit and not IsFilterRowFocused; -end; - -function TcxGridTableController.CanInsert(ACheckOptions: Boolean): Boolean; -begin - Result := inherited CanInsert(ACheckOptions) and not IsFilterRowFocused; -end; - -procedure TcxGridTableController.CheckCoordinates; -begin - inherited; - LeftPos := LeftPos; -end; - -procedure TcxGridTableController.CheckLeftPos(var Value: Integer); -begin - if Value > ViewInfo.DataWidth - ViewInfo.ClientWidth then - Value := ViewInfo.DataWidth - ViewInfo.ClientWidth; - if Value < 0 then Value := 0; -end; - -procedure TcxGridTableController.FocusedItemChanged(APrevFocusedItem: TcxCustomGridTableItem); -begin - if CellSelectionAnchor = nil then - CellSelectionAnchor := FocusedColumn; - inherited; -end; - -procedure TcxGridTableController.FocusedRecordChanged(APrevFocusedRecordIndex, AFocusedRecordIndex: Integer; - ANewItemRecordFocusingChanged: Boolean); -begin - if IsFilterRowFocused and KeepFilterRowFocusing then Exit; - inherited; - if ViewData.HasFilterRow and - ((AFocusedRecordIndex <> APrevFocusedRecordIndex) or ANewItemRecordFocusingChanged) then - ViewData.FilterRow.Focused := False; -end; - -function TcxGridTableController.GetDesignHitTest(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := inherited GetDesignHitTest(AHitTest); - if not Result then - if AHitTest is TcxGridFooterCellHitTest then - Result := TcxGridFooterCellHitTest(AHitTest).SummaryItem <> nil - else - Result := AHitTest.HitTestCode in [htColumnHeader, htExpandButton, htTab, - htIndicatorHeader, htGroupSummary]; -end; - -function TcxGridTableController.GetFocusedRecord: TcxCustomGridRecord; -begin - if ViewData.HasFilterRow and ViewData.FilterRow.Selected then - Result := ViewData.FilterRow - else - begin - Result := inherited GetFocusedRecord; - if (Result = nil) and ViewData.HasNewItemRecord and ViewData.NewItemRow.Selected then - Result := ViewData.NewItemRow; - end; -end; - -function TcxGridTableController.GetIsRecordsScrollHorizontal: Boolean; -begin - Result := False; -end; - -function TcxGridTableController.GetItemsCustomizationPopupClass: TcxCustomGridItemsCustomizationPopupClass; -begin - Result := TcxGridColumnsCustomizationPopup; -end; - -function TcxGridTableController.GetMaxTopRecordIndexValue: Integer; -begin - if NeedsAdditionalRowsScrolling then - Result := TopRowIndex + 1 - else - Result := inherited GetMaxTopRecordIndexValue; -end; - -function TcxGridTableController.GetMouseWheelScrollingKind: TcxMouseWheelScrollingKind; -begin - Result := mwskVertical; -end; - -function TcxGridTableController.GetScrollBarRecordCount: Integer; -begin - Result := inherited GetScrollBarRecordCount; - if NeedsAdditionalRowsScrolling then Inc(Result); -end; - -function TcxGridTableController.IsColumnFixedDuringHorzSizing(AColumn: TcxGridColumn): Boolean; -begin - Result := - (AColumn = ForcingWidthItem) or - not ForcingWidthItem.IsLast and (AColumn.VisibleIndex < ForcingWidthItem.VisibleIndex); -end; - -function TcxGridTableController.IsKeyForMultiSelect(AKey: Word; AShift: TShiftState; - AFocusedRecordChanged: Boolean): Boolean; -begin - Result := inherited IsKeyForMultiSelect(AKey, AShift, AFocusedRecordChanged) or - (AKey = VK_UP) or (AKey = VK_DOWN) or - ((AKey = VK_HOME) or (AKey = VK_END)) and - (not GridView.OptionsSelection.CellSelect or (FocusedRecord = nil) or not FocusedRecord.HasCells); -end; - -function TcxGridTableController.IsPixelScrollBar(AKind: TScrollBarKind): Boolean; -begin - Result := AKind = sbHorizontal; -end; - -procedure TcxGridTableController.LeftPosChanged; -begin - GridView.LayoutChanged; -end; - -function TcxGridTableController.NeedsAdditionalRowsScrolling(AIsCallFromMaster: Boolean = False): Boolean; -var - ALastRow: TcxGridMasterDataRow; -begin - Result := False; - if GridView.IsMaster and (ViewData.RowCount <> 0) and - ((ViewInfo.VisibleRecordCount > 1) or AIsCallFromMaster) and - ((ScrollBarPos = inherited GetScrollBarRecordCount - ViewInfo.VisibleRecordCount) or - AIsCallFromMaster and (ViewData.RowCount = 1)) and - (ViewData.Rows[ViewData.RowCount - 1] is TcxGridMasterDataRow) then - begin - ALastRow := ViewData.Rows[ViewData.RowCount - 1].AsMasterDataRow; - if ALastRow.Expanded and ALastRow.ActiveDetailGridViewExists then - Result := - not ALastRow.ActiveDetailGridView.Controller.IsDataFullyVisible(True) and - TcxGridMasterDataRowViewInfo(ALastRow.ViewInfo).DetailsSiteVisible and - not TcxGridMasterDataRowViewInfo(ALastRow.ViewInfo).DetailsSiteViewInfo.HasMaxHeight; - end; -end; - -procedure TcxGridTableController.RemoveFocus; -begin - with ViewData do - begin - if HasFilterRow then - FilterRow.Focused := False; - if HasNewItemRecord then - NewItemRow.Focused := False; - end; - inherited; -end; - -procedure TcxGridTableController.ScrollData(ADirection: TcxDirection); -begin - case ADirection of - dirLeft: - LeftPos := LeftPos - HScrollDelta; - dirRight: - LeftPos := LeftPos + HScrollDelta; - dirUp: - ScrollRecords(False, 1); - dirDown: - ScrollRecords(True, 1); - end; -end; - -procedure TcxGridTableController.SetFocusedRecord(Value: TcxCustomGridRecord); -var - AIndex: Integer; -begin - if (FocusedRecord <> Value) and ViewData.HasNewItemRecord then - if Value = ViewData.NewItemRow then - begin - Value.Selected := True; - Value := ViewData.NewItemRow; - end - else - if (FocusedRecord = ViewData.NewItemRow) and (Value = nil) then - FocusedRecord.Selected := False; - - if ViewData.HasFilterRow then - if Value = ViewData.FilterRow then - if FocusedRecord = Value then - Exit - else - begin - ViewData.FilterRow.Selected := True; - Value := ViewData.GetRecordByIndex(FocusedRecordindex); - end - else - if FocusedRow = ViewData.FilterRow then - begin - if Value = nil then - AIndex := -1 - else - AIndex := Value.Index; - FocusedRow.Selected := False; - if AIndex = -1 then - Exit - else - Value := ViewData.GetRecordByIndex(AIndex); - end; - - inherited; -end; - -procedure TcxGridTableController.ShowNextPage; -begin - if TopRecordIndex <> -1 then - TopRecordIndex := TopRecordIndex + Max(1, ViewInfo.VisibleRecordCount - 1); -end; - -procedure TcxGridTableController.ShowPrevPage; -var - AVisibleRowCount: Integer; -begin - if TopRecordIndex = -1 then Exit; - if TopRecordIndex = 0 then - if DataController.IsGridMode then - AVisibleRowCount := ViewInfo.VisibleRecordCount - else - Exit - else - begin - AVisibleRowCount := GetVisibleRecordCount(TopRecordIndex, False); - if DataController.IsGridMode and (TopRecordIndex - (AVisibleRowCount - 1) = 0) and - (AVisibleRowCount < ViewInfo.VisibleRecordCount) then - AVisibleRowCount := ViewInfo.VisibleRecordCount; - end; - if AVisibleRowCount = 1 then - TopRecordIndex := TopRecordIndex - 1 - else - if DataController.IsGridMode then - TopRecordIndex := TopRecordIndex - (AVisibleRowCount - 1) - else - InternalTopRecordIndex := TopRecordIndex - (AVisibleRowCount - 1); -end; - -function TcxGridTableController.CanScrollData(ADirection: TcxDirection): Boolean; -var - Value: Integer; -begin - case ADirection of - dirLeft: - Result := LeftPos <> 0; - dirRight: - begin - Value := LeftPos + HScrollDelta; - CheckLeftPos(Value); - Result := LeftPos <> Value; - end; - dirUp: - Result := TopRowIndex <> 0; - dirDown: - begin - Value := TopRowIndex + 1; - CheckTopRecordIndex(Value); - Result := TopRowIndex <> Value; - end; - else - Result := False; - end; -end; - -function TcxGridTableController.CanPostponeRecordSelection(AShift: TShiftState): Boolean; -begin - Result := inherited CanPostponeRecordSelection(AShift) and not CellMultiSelect; -end; - -function TcxGridTableController.CanProcessMultiSelect(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState): Boolean; -begin - Result := inherited CanProcessMultiSelect(AHitTest, AShift) and - not (IsClickableRecordHitTest(AHitTest) and - TcxCustomGridRow(TcxGridRecordHitTest(AHitTest).GridRecord).IsFilterRow) and - (not CellMultiSelect or (ssLeft in AShift) or - not (AHitTest.ViewInfo is TcxGridTableDataCellViewInfo) or - not TcxGridTableDataCellViewInfo(AHitTest.ViewInfo).Selected); -end; - -procedure TcxGridTableController.DoMouseNormalSelection(AHitTest: TcxCustomGridHitTest); -begin - inherited; - if CellMultiSelect and (AHitTest is TcxGridRowIndicatorHitTest) then - SelectAllColumns; -end; - -procedure TcxGridTableController.DoMouseRangeSelection(AClearSelection: Boolean = True; - AData: TObject = nil); -begin - inherited; - if CellMultiSelect then - if AData is TcxGridRowIndicatorHitTest then - SelectAllColumns - else - DoRangeCellSelection; -end; - -procedure TcxGridTableController.DoNormalSelection; -var - ASelectionChanged: Boolean; -begin - ASelectionChanged := False; - BeginUpdate; - try - inherited; - if CellMultiSelect then - begin - if (SelectedColumnCount = 1) and SelectedColumns[0].Focused then Exit; - ClearCellSelection; - if FocusedColumn <> nil then - begin - FocusedColumn.Selected := True; - CellSelectionAnchor := FocusedColumn; - end; - ASelectionChanged := True; - end; - finally - EndUpdate; - end; - if ASelectionChanged then GridView.DoSelectionChanged; -end; - -procedure TcxGridTableController.MultiSelectKeyDown(var Key: Word; Shift: TShiftState); -begin - if CellMultiSelect then - if ssShift in Shift then - DoRangeSelection - else - DoNormalSelectionWithAnchor - else - inherited; -end; - -function TcxGridTableController.SupportsAdditiveSelection: Boolean; -begin - Result := not CellMultiSelect; -end; - -function TcxGridTableController.SupportsRecordSelectionToggling: Boolean; -begin - Result := not CellMultiSelect; -end; - -function TcxGridTableController.DefocusSpecialRow: Boolean; - - function FocusTopRow: Boolean; - begin - if TopRecordIndex <> -1 then - begin - FocusedRecordIndex := TopRecordIndex; - Result := FocusedRecordIndex = TopRecordIndex; - end - else - Result := False; - end; - -begin - Result := IsFilterRowFocused; - if Result then - if ViewData.HasNewItemRecord then - begin - ViewData.NewItemRow.Focused := True; - Result := ViewData.NewItemRow.Focused; - end - else - begin - Result := FocusTopRow; - if Result then - ViewData.FilterRow.Focused := False; - end - else - Result := IsNewItemRowFocused and FocusTopRow; -end; - -function TcxGridTableController.FocusSpecialRow: Boolean; -begin - Result := ViewData.HasNewItemRecord and not ViewData.NewItemRow.Focused; - if Result then - begin - Result := not IsFilterRowFocused and IsStart; - if Result then - ViewData.NewItemRow.Focused := True; - end - else - begin - Result := ViewData.HasFilterRow and not ViewData.FilterRow.Focused; - if Result then - begin - Result := ViewData.HasNewItemRecord or IsStart; - if Result then - ViewData.FilterRow.Focused := True; - end; - end; -end; - -procedure TcxGridTableController.FilterRowFocusChanged; -begin - inherited FocusedRecordChanged(FocusedRecordIndex, FocusedRecordIndex, - NewItemRecordFocused); - GridView.RefreshNavigators; -end; - -procedure TcxGridTableController.FilterRowFocusChanging(AValue: Boolean); -var - AFocusedRecordIndex: Integer; -begin - if AValue then - begin - AFocusedRecordIndex := -1; - CheckEditing(AFocusedRecordIndex, False); - end - else - EditingController.HideEdit(not GridView.IsDestroying); -end; - -procedure TcxGridTableController.DoPullFocusingScrolling(ADirection: TcxDirection); -begin - if ADirection in [dirLeft, dirRight] then - FocusNextCell(ADirection = dirRight, True, False); - inherited; -end; - -function TcxGridTableController.GetPullFocusingScrollingDirection(X, Y: Integer; - out ADirection: TcxDirection): Boolean; -var - R: TRect; -begin - Result := inherited GetPullFocusingScrollingDirection(X, Y, ADirection); - if not Result then - begin - R := ViewInfo.ScrollableAreaBoundsVert; - if X < R.Left then - begin - ADirection := dirLeft; - Result := True; - end; - if X >= R.Right then - begin - ADirection := dirRight; - Result := True; - end; - end; -end; - -function TcxGridTableController.SupportsPullFocusing: Boolean; -begin - Result := inherited SupportsPullFocusing or CellMultiSelect; -end; - -function TcxGridTableController.GetDragOpenInfo(AHitTest: TcxCustomGridHitTest): TcxCustomGridDragOpenInfo; -begin - Result := inherited GetDragOpenInfo(AHitTest); - if (Result = nil) and (AHitTest.HitTestCode = htTab) then - with TcxGridDetailsSiteTabHitTest(AHitTest) do - Result := TcxGridDragOpenInfoMasterDataRowTab.Create(Level, Owner as TcxGridMasterDataRow); -end; - -function TcxGridTableController.GetDragScrollDirection(X, Y: Integer): TcxDirection; -var - R: TRect; -begin - Result := dirNone; - - R := ViewInfo.ScrollableAreaBoundsVert; - if PtInRect(R, Point(X, Y)) then - if Y < R.Top + ScrollHotZoneWidth then - Result := dirUp - else - if Y >= R.Bottom - ScrollHotZoneWidth then - Result := dirDown; - - if Result = dirNone then - begin - R := ViewInfo.ScrollableAreaBoundsHorz; - if PtInRect(R, Point(X, Y)) then - if X < R.Left + ScrollHotZoneWidth then - Result := dirLeft - else - if X >= R.Right - ScrollHotZoneWidth then - Result := dirRight; - end; -end; - -procedure TcxGridTableController.CheckCustomizationFormBounds(var R: TRect); -var - AHeaderBottomBound: Integer; -begin - inherited; - AHeaderBottomBound := Site.ClientToScreen(ViewInfo.HeaderViewInfo.Bounds.BottomRight).Y; - if R.Top < AHeaderBottomBound then - OffsetRect(R, 0, AHeaderBottomBound - R.Top); -end; - -function TcxGridTableController.GetColumnHeaderDragAndDropObjectClass: TcxGridColumnHeaderMovingObjectClass; -begin - Result := TcxGridColumnHeaderMovingObject; -end; - -function TcxGridTableController.GetCustomizationFormClass: TcxCustomGridCustomizationFormClass; -begin - Result := TcxGridTableCustomizationForm; -end; - -function TcxGridTableController.CanProcessCellMultiSelect(APrevFocusedColumn: TcxGridColumn): Boolean; -begin - Result := CellMultiSelect and (FocusedColumn <> APrevFocusedColumn); -end; - -procedure TcxGridTableController.CellMultiSelectKeyDown(var Key: Word; Shift: TShiftState); -begin - if ssShift in Shift then - DoRangeCellSelection - else - DoNormalCellSelection; -end; - -procedure TcxGridTableController.DoNormalCellSelection; -begin - DoNormalSelection; - SetSelectionAnchor(FocusedRowIndex); - //GridView.DoSelectionChanged; -end; - -procedure TcxGridTableController.DoRangeCellSelection; -begin - SelectColumns(FCellSelectionAnchor, FocusedColumn); -end; - -function TcxGridTableController.GetCellMultiSelect: Boolean; -begin - Result := GridView.OptionsSelection.CellMultiSelect; -end; - -procedure TcxGridTableController.AddBeginsWithMask(var AValue: Variant); -begin - if VarIsStr(AValue) and (AValue <> '') and (GetBeginsWithMaskPos(AValue) = 0) then - AValue := AValue + DataController.Filter.PercentWildcard; -end; - -procedure TcxGridTableController.RemoveBeginsWithMask(var AValue: Variant); -var - APos: Integer; - S: string; -begin - if VarIsStr(AValue) then - begin - APos := GetBeginsWithMaskPos(AValue); - if APos <> 0 then - begin - S := AValue; - Delete(S, APos, Length(DataController.Filter.PercentWildcard)); - AValue := S; - end; - end; -end; - -function TcxGridTableController.GetBeginsWithMaskPos(const AValue: string): Integer; -begin - if (Length(AValue) = 0) or (AValue[Length(AValue)] <> DataController.Filter.PercentWildcard) then - Result := 0 - else - Result := Length(AValue); -end; - -function TcxGridTableController.GetEditingControllerClass: TcxGridEditingControllerClass; -begin - Result := TcxGridTableEditingController; -end; - -procedure TcxGridTableController.CheckScrolling(const P: TPoint); -var - R: TRect; -begin - R := ViewInfo.ScrollableAreaBoundsHorz; - if PtInRect(R, P) then - if P.X < R.Left + ScrollHotZoneWidth then - ScrollDirection := dirLeft - else - if R.Right - ScrollHotZoneWidth <= P.X then - ScrollDirection := dirRight - else - ScrollDirection := dirNone - else - ScrollDirection := dirNone; -end; - -procedure TcxGridTableController.ClearGrouping; -var - I: Integer; -begin - BeginUpdate; - try - for I := 0 to GridView.GroupedColumnCount - 1 do - GridView.GroupedColumns[I].Visible := True; - DataController.Groups.ClearGrouping; - finally - EndUpdate; - end; -end; - -procedure TcxGridTableController.ClearSelection; -begin - ClearCellSelection; - inherited; -end; - -procedure TcxGridTableController.DoCancelMode; -begin - inherited; - PressedColumn := nil; -end; - -function TcxGridTableController.IsFilterRowFocused: Boolean; -begin - Result := ViewData.HasFilterRow and ViewData.FilterRow.Focused; -end; - -function TcxGridTableController.IsNewItemRowFocused: Boolean; -begin - Result := ViewData.HasNewItemRecord and ViewData.NewItemRow.Focused; -end; - -function TcxGridTableController.IsSpecialRowFocused: Boolean; -begin - Result := IsFilterRowFocused or IsNewItemRowFocused; -end; - -procedure TcxGridTableController.MakeItemVisible(AItem: TcxCustomGridTableItem); -var - R: TRect; - - function GetColumnBounds: TRect; - begin - Result := ViewInfo.HeaderViewInfo[AItem.VisibleIndex].Bounds; - end; - -begin - if (AItem = nil) or (AItem.VisibleIndex = -1) or - (AItem.VisibleIndex >= ViewInfo.HeaderViewInfo.Count){!!!} then - Exit; - MakeFocusedRecordVisible; - if TcxGridColumn(AItem).CanScroll then - begin - R := GetColumnBounds; - with ViewInfo.ScrollableAreaBoundsHorz do - if R.Right - R.Left >= Right - Left then - LeftPos := LeftPos - (Left - R.Left) - else - begin - if R.Right > Right then - begin - LeftPos := LeftPos + (R.Right - Right); - R := GetColumnBounds; - end; - if R.Left < Left then - LeftPos := LeftPos - (Left - R.Left); - end; - end; -end; - -procedure TcxGridTableController.SelectAll; -begin - BeginUpdate; - try - inherited; - if CellMultiSelect then - SelectAllColumns; - finally - EndUpdate; - end; -end; - -procedure TcxGridTableController.InitScrollBarsParameters; -var - APos: Integer; -begin - if ViewInfo.ScrollableAreaWidth > 0 then - APos := LeftPos - else - APos := -1; - Controller.SetScrollBarInfo(sbHorizontal, 0, ViewInfo.DataWidth - 1, - HScrollDelta, ViewInfo.ClientWidth, APos, True, CanHScrollBarHide); - Controller.SetScrollBarInfo(sbVertical, 0, ScrollBarRecordCount - 1, - 1, ViewInfo.VisibleRecordCount, ScrollBarPos, True, True); -end; - -function TcxGridTableController.IsDataFullyVisible(AIsCallFromMaster: Boolean = False): Boolean; -begin - Result := inherited IsDataFullyVisible(AIsCallFromMaster) and - ViewInfo.RecordsViewInfo.IsFirstRowFullyVisible; - if Result and GridView.IsMaster then - Result := not NeedsAdditionalRowsScrolling(AIsCallFromMaster); -end; - -procedure TcxGridTableController.Scroll(AScrollBarKind: TScrollBarKind; AScrollCode: TScrollCode; - var AScrollPos: Integer); - - procedure ScrollHorizontal; - begin - case AScrollCode of - scLineUp: - ScrollData(dirLeft); - scLineDown: - ScrollData(dirRight); - scPageUp: - LeftPos := LeftPos - ViewInfo.ScrollableAreaWidth; - scPageDown: - LeftPos := LeftPos + ViewInfo.ScrollableAreaWidth; - scTrack: - LeftPos := AScrollPos; - end; - AScrollPos := LeftPos; - end; - - procedure ScrollVertical; - begin - case AScrollCode of - scLineUp: - ScrollData(dirUp); - scLineDown: - ScrollData(dirDown); - scPageUp: - ScrollPage(False); - scPageDown: - ScrollPage(True); - scTrack: - if not DataController.IsGridMode then - ScrollBarPos := AScrollPos; - scPosition: - if DataController.IsGridMode then - ScrollBarPos := AScrollPos; - end; - AScrollPos := ScrollBarPos; - end; - -begin - case AScrollBarKind of - sbHorizontal: - ScrollHorizontal; - sbVertical: - ScrollVertical; - end; -end; - -procedure TcxGridTableController.EndDragAndDrop(Accepted: Boolean); -begin - PressedColumn := nil; - inherited; -end; - -procedure TcxGridTableController.DoKeyDown(var Key: Word; Shift: TShiftState); -var - AFocusedColumn: TcxGridColumn; -begin - AFocusedColumn := FocusedColumn; - inherited; - if (Key <> 0) and CanProcessCellMultiSelect(AFocusedColumn) then - CellMultiSelectKeyDown(Key, Shift); -end; - -procedure TcxGridTableController.KeyDown(var Key: Word; Shift: TShiftState); -var - AGridViewLink: TcxGridListenerLink; - AFocusedRowIndex: Integer; -begin - case Key of - VK_LEFT, VK_RIGHT: - if FocusNextCell(Key = VK_RIGHT) then Exit;//Key := 0; - VK_PRIOR: - if FocusSpecialRow then - Exit - else - if IsSpecialRowFocused then - begin - Key := 0; - Exit; - end; - VK_NEXT: - if DefocusSpecialRow then Exit; - end; - inherited; - AGridViewLink := GridView.AddListenerLink; - try - case Key of - VK_LEFT: - ScrollData(dirLeft); - VK_RIGHT: - ScrollData(dirRight); - VK_UP: - if not FocusSpecialRow then - begin - if IsSpecialRowFocused then - AFocusedRowIndex := -1 - else - AFocusedRowIndex := FocusedRowIndex; - if not FocusNextRecord(AFocusedRowIndex, False, False, not (ssShift in Shift), - not (ssShift in Shift)) and IsSpecialRowFocused then - Key := 0; - if (AGridViewLink.GridView <> nil) and not MultiSelect then - Site.Update; - end; - VK_DOWN: - if not DefocusSpecialRow then - begin - FocusNextRecord(FocusedRowIndex, True, False, not (ssShift in Shift), not (ssShift in Shift)); - if (AGridViewLink.GridView <> nil) and not MultiSelect then - Site.Update; - end; - VK_HOME: - if (ssCtrl in Shift) or not FocusedRecordHasCells(True) then - GoToFirst(False) - else - FocusNextItem(-1, True, False, False, True); - VK_END: - if (ssCtrl in Shift) or not FocusedRecordHasCells(True) then - GoToLast(False, False) - else - FocusNextItem(-1, False, True, False, True); - end; - finally - AGridViewLink.Free; - end; -end; - -procedure TcxGridTableController.MouseUp(Button: TMouseButton; Shift: TShiftState; - X, Y: Integer); - - procedure ProcessSorting; - - procedure RemoveColumnSorting; - var - I: Integer; - begin - if GridView.OptionsCustomize.GroupBySorting then - with PressedColumn do - if (GroupIndex = 0) and CanGroup then - begin - GroupIndex := -1; - Visible := True; - end; - PressedColumn.SortOrder := soNone; - if GridView.OptionsCustomize.GroupBySorting then - for I := 0 to GridView.SortedItemCount - 1 do - with TcxGridColumn(GridView.SortedItems[I]) do - if CanGroup then - begin - GroupIndex := 0; - Break; - end; - end; - - procedure AddColumnSorting; - var - ASortOrder: TcxGridSortOrder; - begin - if PressedColumn.SortOrder = soAscending then - ASortOrder := soDescending - else - ASortOrder := soAscending; - if not (ssShift in Shift) and (PressedColumn.GroupIndex = -1) then - begin - if GridView.OptionsCustomize.GroupBySorting and PressedColumn.CanGroup then - ClearGrouping; - DataController.ClearSorting(True); - end; - PressedColumn.SortOrder := ASortOrder; - if GridView.OptionsCustomize.GroupBySorting and (PressedColumn.SortIndex = 0) and - (GridView.GroupedColumnCount = 0) and PressedColumn.CanGroup then - PressedColumn.GroupIndex := 0; - end; - - begin - if not PressedColumn.CanSort then Exit; - try - ShowHourglassCursor; - BeginUpdate; - try - if ssCtrl in Shift then - RemoveColumnSorting - else - AddColumnSorting; - finally - EndUpdate; - HideHourglassCursor; - end; - finally - MakeFocusedRecordVisible; - DesignerModified; - end; - end; - -begin - inherited; - if Site.IsMouseInPressedArea(X, Y) and (PressedColumn <> nil) then - ProcessSorting; - PressedColumn := nil; -end; - -procedure TcxGridTableController.ClearCellSelection; -var - I: Integer; -begin - BeginUpdate; - try - for I := SelectedColumnCount - 1 downto 0 do - SelectedColumns[I].Selected := False; - finally - EndUpdate; - end; -end; - -procedure TcxGridTableController.SelectAllColumns; -begin - SelectColumns(nil, nil); -end; - -procedure TcxGridTableController.SelectCells(AFromColumn, AToColumn: TcxGridColumn; - AFromRowIndex, AToRowIndex: Integer); -begin - BeginUpdate; - try - if AFromRowIndex = -1 then AFromRowIndex := 0; - if AToRowIndex = -1 then AToRowIndex := DataController.RowCount - 1; - DataController.ClearSelection; - DataController.SelectRows(AFromRowIndex, AToRowIndex); - - SelectColumns(AFromColumn, AToColumn); - finally - EndUpdate; - end; -end; - -procedure TcxGridTableController.SelectColumns(AFromColumn, AToColumn: TcxGridColumn); - - procedure GetNewSelectedColumns(AColumns: TList); - var - AStartIndex, AFinishIndex, I: Integer; - begin - AStartIndex := AColumns.IndexOf(AFromColumn); - if AStartIndex = -1 then AStartIndex := 0; - AFinishIndex := AColumns.IndexOf(AToColumn); - if AFinishIndex = -1 then - AFinishIndex := AColumns.Count - 1; - if (AStartIndex > AFinishIndex) and (AFinishIndex <> -1) then - begin - I := AStartIndex; - AStartIndex := AFinishIndex; - AFinishIndex := I; - end; - - AColumns.Count := AFinishIndex + 1; - for I := 0 to AStartIndex - 1 do - AColumns.Delete(0); - end; - - function IsSelectionChanged(ANewSelectedColumns: TList): Boolean; - var - I: Integer; - begin - Result := ANewSelectedColumns.Count <> SelectedColumnCount; - if not Result then - for I := 0 to ANewSelectedColumns.Count - 1 do - begin - Result := not TcxGridColumn(ANewSelectedColumns[I]).Selected; - if Result then Break; - end; - end; - -var - ASelectionChanged: Boolean; - AColumns: TList; - I: Integer; -begin - ASelectionChanged := False; - BeginUpdate; - AColumns := TList.Create; - try - GridView.GetVisibleItemsList(AColumns); - GetNewSelectedColumns(AColumns); - ASelectionChanged := IsSelectionChanged(AColumns); - - if ASelectionChanged then - begin - ClearCellSelection; - for I := 0 to AColumns.Count - 1 do - TcxGridColumn(AColumns[I]).Selected := True; - end; - finally - AColumns.Free; - EndUpdate; - if ASelectionChanged then - GridView.DoSelectionChanged; - end; -end; - -{ TcxGridColumnContainerPainter } - -function TcxGridColumnContainerPainter.GetViewInfo: TcxGridColumnContainerViewInfo; -begin - Result := TcxGridColumnContainerViewInfo(inherited ViewInfo); -end; - -procedure TcxGridColumnContainerPainter.DrawContent; -var - AClipRegion: TcxRegion; -begin - AClipRegion := Canvas.GetClipRegion; - try - Canvas.IntersectClipRect(ViewInfo.Bounds); - if DrawItemsFirst then - begin - DrawItems; - inherited; - end - else - begin - inherited; - DrawItems; - end - finally - Canvas.SetClipRegion(AClipRegion, roSet); - end; -end; - -procedure TcxGridColumnContainerPainter.DrawItems; -var - I: Integer; - AViewInfo: TcxGridColumnHeaderViewInfo; -begin - for I := 0 to ViewInfo.Count - 1 do - begin - AViewInfo := ViewInfo.InternalItems[I]; - if AViewInfo <> nil then AViewInfo.Paint; - end; -end; - -function TcxGridColumnContainerPainter.DrawItemsFirst: Boolean; -begin - Result := True; -end; - -function TcxGridColumnContainerPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridColumnHeaderAreaPainter } - -function TcxGridColumnHeaderAreaPainter.GetViewInfo: TcxGridColumnHeaderAreaViewInfo; -begin - Result := TcxGridColumnHeaderAreaViewInfo(inherited ViewInfo); -end; - -function TcxGridColumnHeaderAreaPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridColumnHeaderSortingMarkPainter } - -procedure TcxGridColumnHeaderSortingMarkPainter.Paint; -begin - ViewInfo.LookAndFeelPainter.DrawSortingMark(Canvas, ViewInfo.Bounds, - TcxGridColumnHeaderSortingMarkViewInfo(ViewInfo).SortOrder = soAscending); -end; - -{ TcxGridColumnHeaderFilterButtonPainter } - -function TcxGridColumnHeaderFilterButtonPainter.GetViewInfo: TcxGridColumnHeaderFilterButtonViewInfo; -begin - Result := TcxGridColumnHeaderFilterButtonViewInfo(inherited ViewInfo); -end; - -procedure TcxGridColumnHeaderFilterButtonPainter.Paint; -begin - ViewInfo.LookAndFeelPainter.DrawFilterDropDownButton(Canvas, ViewInfo.Bounds, - ViewInfo.ButtonState, ViewInfo.Active); -end; - -{ TcxGridColumnHeaderGlyphPainter } - -function TcxGridColumnHeaderGlyphPainter.GetViewInfo: TcxGridColumnHeaderGlyphViewInfo; -begin - Result := TcxGridColumnHeaderGlyphViewInfo(inherited ViewInfo); -end; - -procedure TcxGridColumnHeaderGlyphPainter.Paint; -begin - cxDrawImage(Canvas.Handle, ViewInfo.Bounds, ViewInfo.Bounds, - ViewInfo.Glyph, nil, -1, idmNormal); -end; - -{ TcxGridColumnHeaderPainter } - -function TcxGridColumnHeaderPainter.GetViewInfo: TcxGridColumnHeaderViewInfo; -begin - Result := TcxGridColumnHeaderViewInfo(inherited ViewInfo); -end; - -procedure TcxGridColumnHeaderPainter.DrawAreas; -var - AClipRegion: TcxRegion; - I: Integer; -begin - AClipRegion := Canvas.GetClipRegion; - try - for I := 0 to ViewInfo.AreaViewInfoCount - 1 do - ViewInfo.AreaViewInfos[I].Paint(Canvas); - finally - Canvas.SetClipRegion(AClipRegion, roSet); - end; -end; - -procedure TcxGridColumnHeaderPainter.DrawBorders; -begin - // inherited; -end; - -procedure TcxGridColumnHeaderPainter.DrawContent; -const - States: array[TcxGridCellState] of TcxButtonState = (cxbsNormal, cxbsHot, cxbsPressed); -var - AState: TcxButtonState; -begin - with ViewInfo do - begin - if IsMainCanvasInUse then - begin - AState := States[State]; - if IsPressed then AState := cxbsPressed; - end - else - AState := cxbsNormal; - LookAndFeelPainter.DrawHeader(Self.Canvas, Bounds, TextAreaBounds, Neighbors, - Borders, AState, AlignmentHorz, AlignmentVert, MultiLinePainting, ShowEndEllipsis, - Text, Params.Font, Params.TextColor, Params.Color, - ViewInfo.GridViewInfo.HeaderViewInfo.DrawColumnBackgroundHandler, Column.IsMostRight, - ViewInfo.Container.Kind = ckGroupByBox); - end; - DrawAreas; -end; - -procedure TcxGridColumnHeaderPainter.DrawPressed; -begin - with ViewInfo do - LookAndFeelPainter.DrawHeaderPressed(Self.Canvas, Bounds); -end; - -function TcxGridColumnHeaderPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -procedure TcxGridColumnHeaderPainter.Paint; -begin - inherited; - if ViewInfo.IsPressed and IsMainCanvasInUse then DrawPressed; -end; - -{ TcxGridHeaderPainter } - -function TcxGridHeaderPainter.DrawItemsFirst: Boolean; -begin - Result := ViewInfo.LookAndFeelPainter.GridDrawHeaderCellsFirst; -end; - -{ TcxGridGroupByBoxPainter } - -procedure TcxGridGroupByBoxPainter.DrawBackground(const R: TRect); -begin - with ViewInfo do - LookAndFeelPainter.DrawGroupByBox(Canvas, R, Transparent, Params.Color, - BackgroundBitmap); -end; - -procedure TcxGridGroupByBoxPainter.DrawContent; -var - I: Integer; - J: Boolean; - R: TRect; -begin - inherited; - Canvas.Brush.Color := GroupByBoxLineColor; - for I := 0 to ViewInfo.Count - 2 do - for J := Low(J) to High(J) do - begin - R := TcxGridGroupByBoxViewInfo(ViewInfo).LinkLineBounds[I, J]; - with Canvas do - begin - FillRect(R); - //ExcludeClipRect(R); - end; - end; -end; - -function TcxGridGroupByBoxPainter.DrawItemsFirst: Boolean; -begin - Result := ViewInfo.LookAndFeelPainter.HeaderDrawCellsFirst; -end; - -{ TcxGridFooterCellPainter } - -procedure TcxGridFooterCellPainter.DrawBorders; -begin - // inherited; -end; - -procedure TcxGridFooterCellPainter.DrawContent; -begin - with ViewInfo do - LookAndFeelPainter.DrawFooterCell(Self.Canvas, Bounds, AlignmentHorz, - AlignmentVert, MultiLinePainting, Text, Params.Font, Params.TextColor, Params.Color, - DrawBackgroundHandler); -end; - -{ TcxGridFooterPainter } - -function TcxGridFooterPainter.GetViewInfo: TcxGridFooterViewInfo; -begin - Result := TcxGridFooterViewInfo(inherited ViewInfo); -end; - -procedure TcxGridFooterPainter.DrawBackground(const R: TRect); -begin - ViewInfo.LookAndFeelPainter.DrawFooterContent(Canvas, R, ViewInfo.Params); -end; - -procedure TcxGridFooterPainter.DrawBorders; -begin - if ViewInfo.HasSeparator then DrawSeparator; - ViewInfo.LookAndFeelPainter.DrawFooterBorder(Canvas, ViewInfo.BordersBounds); -end; - -function TcxGridFooterPainter.DrawItemsFirst: Boolean; -begin - Result := ViewInfo.LookAndFeelPainter.FooterDrawCellsFirst; -end; - -procedure TcxGridFooterPainter.DrawSeparator; -begin - ViewInfo.LookAndFeelPainter.DrawFooterSeparator(Canvas, ViewInfo.SeparatorBounds); -end; - -{ TcxCustomGridIndicatorItemPainter } - -function TcxCustomGridIndicatorItemPainter.GetViewInfo: TcxCustomGridIndicatorItemViewInfo; -begin - Result := TcxCustomGridIndicatorItemViewInfo(inherited ViewInfo); -end; - -function TcxCustomGridIndicatorItemPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxGridIndicatorHeaderItemPainter } - -function TcxGridIndicatorHeaderItemPainter.GetViewInfo: TcxGridIndicatorHeaderItemViewInfo; -begin - Result := TcxGridIndicatorHeaderItemViewInfo(inherited ViewInfo); -end; - -function TcxGridIndicatorHeaderItemPainter.DrawBackgroundHandler(ACanvas: TcxCanvas; - const ABounds: TRect): Boolean; -begin - Result := ViewInfo.GridViewInfo.HeaderViewInfo.DrawColumnBackgroundHandler(ACanvas, ABounds); -end; - -procedure TcxGridIndicatorHeaderItemPainter.DrawContent; -begin - with ViewInfo do - begin - LookAndFeelPainter.DrawHeader(Self.Canvas, Bounds, Bounds, [nRight], cxBordersAll, - GridCellStateToButtonState(State), taLeftJustify, vaTop, False, - False, '', nil, clNone, Params.Color, DrawBackgroundHandler); - if SupportsQuickCustomization then - DrawQuickCustomizationMark; - if State = gcsPressed then - LookAndFeelPainter.DrawHeaderPressed(Self.Canvas, Bounds); - end; -end; - -procedure TcxGridIndicatorHeaderItemPainter.DrawQuickCustomizationMark; -begin - with ViewInfo do - LookAndFeelPainter.DrawIndicatorCustomizationMark(Canvas, Bounds, Params.TextColor); -end; - -{ TcxGridIndicatorRowItemPainter } - -function TcxGridIndicatorRowItemPainter.GetViewInfo: TcxGridIndicatorRowItemViewInfo; -begin - Result := TcxGridIndicatorRowItemViewInfo(inherited ViewInfo); -end; - -procedure TcxGridIndicatorRowItemPainter.DrawContent; -begin - with ViewInfo do - LookAndFeelPainter.DrawIndicatorItem(Self.Canvas, Bounds, IndicatorKind, Params.Color, - DrawBackgroundHandler); -end; - -{ TcxGridIndicatorFooterItemPainter } - -function TcxGridIndicatorFooterItemPainter.GetViewInfo: TcxGridIndicatorFooterItemViewInfo; -begin - Result := TcxGridIndicatorFooterItemViewInfo(inherited ViewInfo); -end; - -procedure TcxGridIndicatorFooterItemPainter.DrawBorders; -begin - with Canvas, ViewInfo do - begin - if HasSeparator then - LookAndFeelPainter.DrawFooterSeparator(Self.Canvas, SeparatorBounds); - LookAndFeelPainter.DrawFooterBorder(Self.Canvas, BordersBounds); - end; -end; - -procedure TcxGridIndicatorFooterItemPainter.DrawContent; -begin - if ViewInfo.GridView.LookAndFeel.SkinPainter = nil then - inherited DrawContent - else - with ViewInfo do - LookAndFeelPainter.DrawHeader(Canvas, Bounds, Bounds, [], [], cxbsNormal, - taLeftJustify, vaTop, False, False, '', nil, clNone, Params.Color, DrawBackgroundHandler); -end; - -{ TcxGridIndicatorPainter } - -function TcxGridIndicatorPainter.GetViewInfo: TcxGridIndicatorViewInfo; -begin - Result := TcxGridIndicatorViewInfo(inherited ViewInfo); -end; - -procedure TcxGridIndicatorPainter.DrawContent; -begin - if DrawItemsFirst then - begin - DrawItems; - inherited; - end - else - begin - inherited; - DrawItems; - end; -end; - -procedure TcxGridIndicatorPainter.DrawItems; -var - I: Integer; -begin - with ViewInfo do - for I := 0 to Count - 1 do - Items[I].Paint; -end; - -function TcxGridIndicatorPainter.DrawItemsFirst: Boolean; -begin - Result := ViewInfo.LookAndFeelPainter.IndicatorDrawItemsFirst; -end; - -function TcxGridIndicatorPainter.ExcludeFromClipRect: Boolean; -begin - Result := True; -end; - -{ TcxCustomGridRowPainter } - -function TcxCustomGridRowPainter.GetViewInfo: TcxCustomGridRowViewInfo; -begin - Result := TcxCustomGridRowViewInfo(inherited ViewInfo); -end; - -procedure TcxCustomGridRowPainter.DrawFooters; -begin - ViewInfo.FootersViewInfo.Paint; -end; - -procedure TcxCustomGridRowPainter.DrawIndent; -var - I: Integer; -begin - for I := 0 to ViewInfo.VisualLevel - 1 do - DrawIndentPart(I, ViewInfo.LevelIndentBounds[I]); -end; - -procedure TcxCustomGridRowPainter.DrawIndentPart(ALevel: Integer; const ABounds: TRect); -begin - with Canvas, ViewInfo do - begin - if GridViewInfo.LevelIndentBackgroundBitmap = nil then - begin - Brush.Color := GridViewInfo.LevelIndentColors[ALevel]; - FillRect(CalculateLevelIndentSpaceBounds(ALevel, ABounds)); - end - else - FillRect(CalculateLevelIndentSpaceBounds(ALevel, ABounds), - GridViewInfo.LevelIndentBackgroundBitmap); - - Brush.Color := GridViewInfo.LevelSeparatorColor; - FillRect(CalculateLevelIndentVertLineBounds(ALevel, ABounds)); - - Brush.Color := GridViewInfo.GridLineColor; - FillRect(CalculateLevelIndentHorzLineBounds(ALevel, ABounds)); - end; -end; - -procedure TcxCustomGridRowPainter.DrawLastHorzGridLine; -begin - with Canvas do - begin - Brush.Color := ViewInfo.GridViewInfo.GridLineColor; - FillRect(ViewInfo.LastHorzGridLineBounds); - end; -end; - -procedure TcxCustomGridRowPainter.DrawSeparator; -begin - Canvas.Brush.Color := ViewInfo.SeparatorColor; - Canvas.FillRect(ViewInfo.SeparatorBounds); -end; - -procedure TcxCustomGridRowPainter.Paint; -begin - if ViewInfo.HasFooters then DrawFooters; - DrawIndent; - if ViewInfo.HasLastHorzGridLine then DrawLastHorzGridLine; - if ViewInfo.HasSeparator then DrawSeparator; - inherited; -end; - -{ TcxGridRowsPainter } - -function TcxGridRowsPainter.GetViewInfo: TcxGridRowsViewInfo; -begin - Result := TcxGridRowsViewInfo(inherited ViewInfo); -end; - -procedure TcxGridRowsPainter.Paint; -begin - with ViewInfo do - begin - if HasFilterRow then - FilterRowViewInfo.Paint; - if HasNewItemRow then - NewItemRowViewInfo.Paint; - end; - inherited; -end; - -class procedure TcxGridRowsPainter.DrawDataRowCells(ARowViewInfo: TcxCustomGridRowViewInfo); -var - I: Integer; - ACellViewInfo: TcxGridDataCellViewInfo; -begin - with ARowViewInfo as TcxGridDataRowViewInfo do - begin - for I := 0 to CellViewInfoCount - 1 do - begin - ACellViewInfo := InternalCellViewInfos[I]; - if ACellViewInfo <> nil then ACellViewInfo.Paint; - end; - CellsAreaViewInfo.Paint; - end; -end; - -{ TcxGridTablePainter } - -function TcxGridTablePainter.GetController: TcxGridTableController; -begin - Result := TcxGridTableController(inherited Controller); -end; - -function TcxGridTablePainter.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridTablePainter.GetViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited ViewInfo); -end; - -function TcxGridTablePainter.CanOffset(AItemsOffset, DX, DY: Integer): Boolean; -begin - Result := inherited CanOffset(AItemsOffset, DX, DY) and - ((AItemsOffset <> 0) or not GridView.IsMaster) and - (ViewInfo.RecordsViewInfo.GroupBackgroundBitmap = nil) and - ((AItemsOffset <> 0) or (ViewInfo.HeaderViewInfo.ColumnBackgroundBitmap = nil)) and - (ViewInfo.FooterViewInfo.BackgroundBitmap = nil) and - ((AItemsOffset <> 0) or not GridView.FilterRow.Visible or - (GridView.FilterRow.InfoText = '')) and - ((AItemsOffset <> 0) or not GridView.NewItemRow.Visible or - (GridView.NewItemRow.InfoText = '')) and - ((AItemsOffset = 0) or not GridView.HasCellMerging); -end; - -procedure TcxGridTablePainter.DrawFooter; -begin - ViewInfo.FooterViewInfo.Paint; -end; - -procedure TcxGridTablePainter.DrawGroupByBox; -begin - ViewInfo.GroupByBoxViewInfo.Paint; -end; - -procedure TcxGridTablePainter.DrawHeader; -begin - ViewInfo.HeaderViewInfo.Paint; -end; - -procedure TcxGridTablePainter.DrawIndicator; -begin - ViewInfo.IndicatorViewInfo.Paint; -end; - -procedure TcxGridTablePainter.DrawRecords; - - procedure DrawGridLines; - var - I: Integer; - N: array of DWORD; - P: array of TPoint; - R: TRect; - begin - SetLength(P, FGridLines.Count * 2); - SetLength(N, FGridLines.Count); - for I := 0 to FGridLines.Count - 1 do - begin - R := PRect(FGridLines[I])^; - P[2 * I] := R.TopLeft; - if R.Bottom = R.Top + 1 then - P[2 * I + 1] := Point(R.Right, R.Top) - else - P[2 * I + 1] := Point(R.Left, R.Bottom); - N[I] := 2; - end; - with Canvas do - begin - Pen.Color := ViewInfo.GridLineColor; - PolyPolyLine(Handle, P[0], N[0], FGridLines.Count); - end; - N := nil; - P := nil; - end; - - procedure ClearGridLines; - var - I: Integer; - begin - for I := 0 to FGridLines.Count - 1 do - Dispose(PRect(FGridLines[I])); - end; - -begin - FGridLines := TList.Create; - try - inherited; - DrawGridLines; - finally - ClearGridLines; - FreeAndNil(FGridLines); - end; -end; - -procedure TcxGridTablePainter.Offset(AItemsOffset: Integer); -var - R, AUpdateBounds: TRect; -begin - R := ViewInfo.GetOffsetBounds(AItemsOffset, AUpdateBounds); - Site.ScrollWindow(0, AItemsOffset, R); - Site.InvalidateRect(AUpdateBounds, True); - Controller.InvalidateFocusedRecord; - if Controller.IsEditing then - RedrawWindow(Controller.EditingController.Edit.Handle, nil, 0, RDW_INVALIDATE or RDW_ALLCHILDREN); -end; - -procedure TcxGridTablePainter.Offset(DX, DY: Integer); -var - R, AUpdateBounds: TRect; -begin - R := ViewInfo.GetOffsetBounds(DX, DY, AUpdateBounds); - if not IsRectEmpty(R) then - Site.ScrollWindow(DX, 0, R); - if not IsRectEmpty(AUpdateBounds) then - Site.InvalidateRect(AUpdateBounds, True); - Controller.InvalidateFocusedRecord; - Site.Update; -end; - -procedure TcxGridTablePainter.PaintContent; -//var -// ft,lt{,i}:integer; -begin - {ft:=gettickcount; - for I:=1 to 10 do - begin} - DrawGroupByBox; - DrawFilterBar; - DrawIndicator; - DrawHeader; - DrawFooter; - inherited; - {end; - lt:=gettickcount; - application.mainform.caption := - inttostr(lt-ft);} -end; - -procedure TcxGridTablePainter.AddGridLine(const R: TRect); -var - AR: PRect; -begin - New(AR); - AR^ := R; - FGridLines.Add(AR); -end; - -{ TcxGridColumnContainerViewInfo } - -constructor TcxGridColumnContainerViewInfo.Create(AGridViewInfo: TcxCustomGridTableViewInfo); -begin - inherited; - FItemHeight := -1; - CreateItems; -end; - -destructor TcxGridColumnContainerViewInfo.Destroy; -begin - DestroyItems; - inherited; -end; - -function TcxGridColumnContainerViewInfo.GetController: TcxGridTableController; -begin - Result := GridView.Controller; -end; - -function TcxGridColumnContainerViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridColumnContainerViewInfo.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridColumnContainerViewInfo.GetGridViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited GridViewInfo); -end; - -function TcxGridColumnContainerViewInfo.GetInternalItem(Index: Integer): TcxGridColumnHeaderViewInfo; -begin - Result := TcxGridColumnHeaderViewInfo(FItems[Index]); -end; - -function TcxGridColumnContainerViewInfo.GetItem(Index: Integer): TcxGridColumnHeaderViewInfo; -begin - Result := InternalItems[Index]; - if Result = nil then - begin - Result := CreateItem(Index); - FItems[Index] := Result; - end; -end; - -function TcxGridColumnContainerViewInfo.GetItemHeight: Integer; -begin - if FItemHeight = -1 then - FItemHeight := CalculateItemHeight; - Result := FItemHeight; -end; - -function TcxGridColumnContainerViewInfo.CreateItem(AIndex: Integer): TcxGridColumnHeaderViewInfo; -begin - Result := GetItemClass.Create(Self, Columns[AIndex]); -end; - -procedure TcxGridColumnContainerViewInfo.CreateItems; -begin - FItems := TList.Create; - FItems.Count := ColumnCount; -end; - -procedure TcxGridColumnContainerViewInfo.DestroyItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do InternalItems[I].Free; - FreeAndNil(FItems); -end; - -function TcxGridColumnContainerViewInfo.GetItemClass: TcxGridColumnHeaderViewInfoClass; -begin - Result := TcxGridColumnHeaderViewInfo; -end; - -function TcxGridColumnContainerViewInfo.CalculateItemHeight: Integer; -begin - CalculateParams; - Result := GetItemClass.GetCellHeight( - GridViewInfo.GetFontHeight(Params.Font), LookAndFeelPainter); -end; - -function TcxGridColumnContainerViewInfo.GetAutoHeight: Boolean; -begin - Result := False; -end; - -function TcxGridColumnContainerViewInfo.GetColumnAdditionalWidth(AColumn: TcxGridColumn): Integer; -begin - if AColumn.IsMostLeft then - Result := GridViewInfo.FirstItemAdditionalWidth - else - Result := 0; -end; - -function TcxGridColumnContainerViewInfo.GetColumnMinWidth(AColumn: TcxGridColumn): Integer; -begin - Result := AColumn.MinWidth + GetColumnAdditionalWidth(AColumn); -end; - -function TcxGridColumnContainerViewInfo.GetColumnNeighbors(AColumn: TcxGridColumn): TcxNeighbors; -begin - Result := []; -end; - -function TcxGridColumnContainerViewInfo.GetColumnWidth(AColumn: TcxGridColumn): Integer; -begin - Result := AColumn.Width + GetColumnAdditionalWidth(AColumn); -end; - -function TcxGridColumnContainerViewInfo.GetItemAreaBounds(AItem: TcxGridColumnHeaderViewInfo): TRect; -begin - Result := GridViewInfo.ScrollableAreaBoundsHorz; -end; - -function TcxGridColumnContainerViewInfo.GetItemMultiLinePainting(AItem: TcxGridColumnHeaderViewInfo): Boolean; -begin - Result := False; -end; - -function TcxGridColumnContainerViewInfo.GetItemsAreaBounds: TRect; -begin - Result := Bounds; -end; - -function TcxGridColumnContainerViewInfo.GetItemsHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I].GetHitTest(P); - if Result <> nil then Exit; - end; - Result := nil; -end; - -function TcxGridColumnContainerViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridColumnContainerPainter; -end; - -function TcxGridColumnContainerViewInfo.GetZonesAreaBounds: TRect; -begin - Result := Bounds; - Result.Right := GridViewInfo.ClientBounds.Right; -end; - -procedure TcxGridColumnContainerViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - if AHitTest is TcxCustomGridColumnHitTest then - TcxCustomGridColumnHitTest(AHitTest).ColumnContainerKind := Kind; -end; - -procedure TcxGridColumnContainerViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - inherited; - for I := 0 to Count - 1 do - Items[I].DoOffset(DX, DY); -end; - -procedure TcxGridColumnContainerViewInfo.BeforeRecalculation; -var - I: Integer; -begin - inherited; - for I := 0 to Count - 1 do - Items[I].BeforeRecalculation; -end; - -function TcxGridColumnContainerViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := GetItemsHitTest(P); - if Result = nil then - Result := inherited GetHitTest(P); -end; - -function TcxGridColumnContainerViewInfo.GetZone(const P: TPoint): TcxGridItemContainerZone; -var - R: TRect; - ALastBound, I: Integer; -begin - Result := nil; - if not Visible then Exit; - R := ZonesAreaBounds; - if not PtInRect(R, P) then Exit; - ALastBound := R.Right; - for I := 0 to Count do - begin - if I = Count then - R.Right := ALastBound - else - with Items[I] do - R.Right := (Bounds.Left + Bounds.Right) div 2; - if PtInRect(R, P) then - begin - Result := TcxGridItemContainerZone.Create(I); - Break; - end; - R.Left := R.Right; - end; -end; - -{ TcxGridColumnHeaderAreaViewInfo } - -constructor TcxGridColumnHeaderAreaViewInfo.Create(AColumnHeaderViewInfo: TcxGridColumnHeaderViewInfo); -begin - inherited Create(AColumnHeaderViewInfo.GridViewInfo); - FColumnHeaderViewInfo := AColumnHeaderViewInfo; -end; - -function TcxGridColumnHeaderAreaViewInfo.GetColumn: TcxGridColumn; -begin - Result := FColumnHeaderViewInfo.Column; -end; - -function TcxGridColumnHeaderAreaViewInfo.GetGridView: TcxGridTableView; -begin - Result := FColumnHeaderViewInfo.GridView; -end; - -function TcxGridColumnHeaderAreaViewInfo.GetGridViewInfo: TcxGridTableViewInfo; -begin - Result := FColumnHeaderViewInfo.GridViewInfo; -end; - -function TcxGridColumnHeaderAreaViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridColumnHeaderAreaViewInfo.GetCanvas: TcxCanvas; -begin - Result := GridViewInfo.Canvas; -end; - -function TcxGridColumnHeaderAreaViewInfo.GetHeight: Integer; -begin - Result := CalculateHeight; -end; - -function TcxGridColumnHeaderAreaViewInfo.GetWidth: Integer; -begin - Result := CalculateWidth; -end; - -function TcxGridColumnHeaderAreaViewInfo.HasMouse(AHitTest: TcxCustomGridHitTest): Boolean; -begin - Result := inherited HasMouse(AHitTest); - if Result then - with TcxCustomGridColumnHitTest(AHitTest) do - Result := (Column = Self.Column) and - (ColumnContainerKind = ColumnHeaderViewInfo.Container.Kind); -end; - -procedure TcxGridColumnHeaderAreaViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - FColumnHeaderViewInfo.InitHitTest(AHitTest); - inherited; -end; - -{procedure TcxGridColumnHeaderAreaViewInfo.Invalidate; -begin - if GridView <> nil then - GridView.ViewChanged(Bounds); -end;} - -function TcxGridColumnHeaderAreaViewInfo.NeedsContainerHotTrack: Boolean; -begin - Result := False; -end; - -function TcxGridColumnHeaderAreaViewInfo.OccupiesSpace: Boolean; -begin - Result := True; -end; - -function TcxGridColumnHeaderAreaViewInfo.ResidesInContent: Boolean; -begin - Result := True; -end; - -procedure TcxGridColumnHeaderAreaViewInfo.Calculate(const ABounds: TRect; - var ATextAreaBounds: TRect); - - procedure AlignHorizontally; - var - AAreaAndTextWidth: Integer; - begin - case AlignmentHorz of - taLeftJustify: - begin - Bounds.Right := Bounds.Left + Width; - if OccupiesSpace then - ATextAreaBounds.Left := Bounds.Right; - end; - taRightJustify: - begin - Bounds.Left := Bounds.Right - Width; - if OccupiesSpace then - ATextAreaBounds.Right := Bounds.Left; - end; - taCenter: - if OccupiesSpace and (ColumnHeaderViewInfo.AlignmentHorz = taCenter) and - not ((AlignmentVert = vaTop) and (ColumnHeaderViewInfo.AlignmentVert = vaBottom) or - (AlignmentVert = vaBottom) and (ColumnHeaderViewInfo.AlignmentVert = vaTop)) then - begin - AAreaAndTextWidth := Width + ColumnHeaderViewInfo.TextWidthWithOffset; - if AAreaAndTextWidth < Bounds.Right - Bounds.Left then - Inc(Bounds.Left, (Bounds.Right - Bounds.Left - AAreaAndTextWidth) div 2); - Bounds.Right := Bounds.Left + Width; - - ATextAreaBounds.Left := Bounds.Right; - ATextAreaBounds.Right := - Min(ATextAreaBounds.Right, ATextAreaBounds.Left + ColumnHeaderViewInfo.TextWidthWithOffset); - end - else - begin - Inc(Bounds.Left, (Bounds.Right - Bounds.Left - Width) div 2); - Bounds.Right := Bounds.Left + Width; - end; - end; - end; - - procedure AlignVertically; - begin - case AlignmentVert of - vaTop: - Bounds.Bottom := Bounds.Top + Height; - vaBottom: - Bounds.Top := Bounds.Bottom - Height; - vaCenter: - begin - Inc(Bounds.Top, (Bounds.Bottom - Bounds.Top - Height) div 2); - Bounds.Bottom := Bounds.Top + Height; - end; - end; - end; - -begin - if ResidesInContent then - Bounds := ATextAreaBounds - else - Bounds := ABounds; - if Width <> 0 then AlignHorizontally; - if Height <> 0 then AlignVertically; - with Bounds do - inherited Calculate(Left, Top, Right - Left, Bottom - Top); -end; - -{ TcxGridColumnHeaderSortingMarkViewInfo } - -function TcxGridColumnHeaderSortingMarkViewInfo.GetSortOrder: TcxGridSortOrder; -begin - Result := Column.SortOrder; -end; - -function TcxGridColumnHeaderSortingMarkViewInfo.CalculateHeight: Integer; -begin - Result := LookAndFeelPainter.SortingMarkAreaSize.Y; -end; - -function TcxGridColumnHeaderSortingMarkViewInfo.CalculateWidth: Integer; -begin - Result := LookAndFeelPainter.SortingMarkAreaSize.X; -end; - -function TcxGridColumnHeaderSortingMarkViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := taRightJustify; -end; - -function TcxGridColumnHeaderSortingMarkViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := nil; -end; - -function TcxGridColumnHeaderSortingMarkViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridColumnHeaderSortingMarkPainter; -end; - -{ TcxGridColumnHeaderHorzSizingEdgeViewInfo } - -function TcxGridColumnHeaderHorzSizingEdgeViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TcxGridColumnHeaderHorzSizingEdgeViewInfo.CalculateWidth: Integer; -begin - Result := cxGridHeaderSizingEdgeSize; -end; - -function TcxGridColumnHeaderHorzSizingEdgeViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := taRightJustify; -end; - -function TcxGridColumnHeaderHorzSizingEdgeViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridColumnHeaderHorzSizingEdgeHitTest; -end; - -function TcxGridColumnHeaderHorzSizingEdgeViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := nil; -end; - -function TcxGridColumnHeaderHorzSizingEdgeViewInfo.OccupiesSpace: Boolean; -begin - Result := False; -end; - -function TcxGridColumnHeaderHorzSizingEdgeViewInfo.ResidesInContent: Boolean; -begin - Result := False; -end; - -procedure TcxGridColumnHeaderHorzSizingEdgeViewInfo.Calculate(const ABounds: TRect; - var ATextAreaBounds: TRect); -begin - inherited; - OffsetRect(Bounds, Width div 2, 0); -end; - -function TcxGridColumnHeaderHorzSizingEdgeViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -var - AColumn: TcxGridColumn; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if (AButton = mbLeft) and (ssDouble in AShift) then - begin - AColumn := Column; - AColumn.ApplyBestFit(True, True); - Result := True; - end; -end; - -{ TcxGridColumnHeaderFilterButtonViewInfo } - -function TcxGridColumnHeaderFilterButtonViewInfo.GetActive: Boolean; -begin - Result := Column.Filtered; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.GetDropDownWindowValue: TcxGridFilterPopup; -begin - Result := TcxGridFilterPopup(inherited DropDownWindow); -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.GetItem: TcxCustomGridTableItem; -begin - Result := Column; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.CalculateHeight: Integer; -begin - Result := LookAndFeelPainter.FilterDropDownButtonSize.Y; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.CalculateWidth: Integer; -begin - Result := LookAndFeelPainter.FilterDropDownButtonSize.X; -end; - -procedure TcxGridColumnHeaderFilterButtonViewInfo.DropDown; -begin - GridView.Controller.IsFilterPopupOpenedFromHeader := ColumnHeaderViewInfo.HasHeaderAsContainer; - inherited; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.EmulateMouseMoveAfterCalculate: Boolean; -begin - Result := True; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := taRightJustify; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.GetAlwaysVisible: Boolean; -begin - Result := GridView.OptionsView.ShowColumnFilterButtons = sfbAlways; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - if GridView.IsDesigning then - Result := nil - else - Result := TcxGridColumnHeaderFilterButtonHitTest; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridColumnHeaderFilterButtonPainter; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.GetVisible: Boolean; -begin - Result := AlwaysVisible or - (ColumnHeaderViewInfo.State <> gcsNone) or (State = gcsPressed); -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.NeedsContainerHotTrack: Boolean; -begin - Result := not AlwaysVisible; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.OccupiesSpace: Boolean; -begin - Result := ColumnHeaderViewInfo.HasFixedContentSpace or Visible; -end; - -procedure TcxGridColumnHeaderFilterButtonViewInfo.StateChanged(APrevState: TcxGridCellState); -begin - if not IsDestroying and not Visible then - ColumnHeaderViewInfo.Update; - inherited; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.CloseDropDownWindowOnDestruction: Boolean; -begin - Result := False; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.DropDownWindowExists: Boolean; -begin - Result := GridView.Controller.HasFilterPopup; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.GetDropDownWindow: TcxCustomGridPopup; -begin - Result := GridView.Controller.FilterPopup; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.GetDropDownWindowOwnerBounds: TRect; -begin - Result := Bounds; - with ColumnHeaderViewInfo.Bounds do - begin - Result.Left := Left; - Result.Right := Right; - end; -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.IsDropDownWindowOwner: Boolean; -begin - Result := inherited IsDropDownWindowOwner and (DropDownWindow.Item = Column) and - (GridView.Controller.IsFilterPopupOpenedFromHeader = ColumnHeaderViewInfo.HasHeaderAsContainer); -end; - -function TcxGridColumnHeaderFilterButtonViewInfo.MouseMove(AHitTest: TcxCustomGridHitTest; - AShift: TShiftState): Boolean; -begin - Result := inherited MouseMove(AHitTest, AShift); - if State = gcsPressed then - ColumnHeaderViewInfo.State := gcsSelected; -end; - -{ TcxGridColumnHeaderGlyphViewInfo } - -function TcxGridColumnHeaderGlyphViewInfo.GetGlyph: TBitmap; -begin - Result := Column.HeaderGlyph; -end; - -function TcxGridColumnHeaderGlyphViewInfo.CalculateHeight: Integer; -begin - Result := Glyph.Height; -end; - -function TcxGridColumnHeaderGlyphViewInfo.CalculateWidth: Integer; -begin - Result := Glyph.Width; -end; - -function TcxGridColumnHeaderGlyphViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := Column.HeaderGlyphAlignmentHorz; -end; - -function TcxGridColumnHeaderGlyphViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := Column.HeaderGlyphAlignmentVert; -end; - -function TcxGridColumnHeaderGlyphViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := nil; -end; - -function TcxGridColumnHeaderGlyphViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridColumnHeaderGlyphPainter; -end; - -{ TcxGridColumnHeaderViewInfo } - -constructor TcxGridColumnHeaderViewInfo.Create(AContainer: TcxGridColumnContainerViewInfo; - AColumn: TcxGridColumn); -begin - inherited Create(AContainer.GridViewInfo); - FAreaViewInfos := TList.Create; - FContainer := AContainer; - FColumn := AColumn; - FWidth := -1; - Width := -1; - CreateAreaViewInfos; -end; - -destructor TcxGridColumnHeaderViewInfo.Destroy; -begin - DestroyAreaViewInfos; - FAreaViewInfos.Free; - inherited; -end; - -function TcxGridColumnHeaderViewInfo.GetAreaViewInfoCount: Integer; -begin - Result := FAreaViewInfos.Count; -end; - -function TcxGridColumnHeaderViewInfo.GetAreaViewInfo(Index: Integer): TcxGridColumnHeaderAreaViewInfo; -begin - Result := TcxGridColumnHeaderAreaViewInfo(FAreaViewInfos[Index]); -end; - -function TcxGridColumnHeaderViewInfo.GetGridView: TcxGridTableView; -begin - Result := FContainer.GridView; -// if Result.IsDestroying then Result := nil; -end; - -function TcxGridColumnHeaderViewInfo.GetGridViewInfo: TcxGridTableViewInfo; -begin - Result := FContainer.GridViewInfo; -end; - -function TcxGridColumnHeaderViewInfo.GetHasTextOffsetLeft: Boolean; -begin - Result := CalculateHasTextOffset(taLeftJustify); -end; - -function TcxGridColumnHeaderViewInfo.GetHasTextOffsetRight: Boolean; -begin - Result := CalculateHasTextOffset(taRightJustify); -end; - -function TcxGridColumnHeaderViewInfo.GetIndex: Integer; -begin - Result := FColumn.VisibleIndex; -end; - -function TcxGridColumnHeaderViewInfo.GetIsFixed: Boolean; -begin - Result := FColumn.Fixed; -end; - -function TcxGridColumnHeaderViewInfo.GetRealBounds: TRect; -begin - Result := Bounds; - Inc(Result.Left, FAdditionalWidthAtLeft); - Inc(Result.Top, FAdditionalHeightAtTop); -end; - -function TcxGridColumnHeaderViewInfo.GetRealWidth: Integer; -begin - if FRealWidth = 0 then - FRealWidth := CalculateRealWidth(Width); - Result := FRealWidth; -end; - -procedure TcxGridColumnHeaderViewInfo.EnumAreaViewInfoClasses(AClass: TClass); -begin - FAreaViewInfos.Add(TcxGridColumnHeaderAreaViewInfoClass(AClass).Create(Self)); -end; - -procedure TcxGridColumnHeaderViewInfo.CreateAreaViewInfos; -begin - GetAreaViewInfoClasses(EnumAreaViewInfoClasses); -end; - -procedure TcxGridColumnHeaderViewInfo.DestroyAreaViewInfos; -var - I: Integer; -begin - for I := 0 to AreaViewInfoCount - 1 do - AreaViewInfos[I].Free; -end; - -function TcxGridColumnHeaderViewInfo.AreasNeedHotTrack: Boolean; -var - I: Integer; -begin - for I := 0 to AreaViewInfoCount - 1 do - begin - Result := AreaViewInfos[I].NeedsContainerHotTrack; - if Result then Exit; - end; - Result := False; -end; - -function TcxGridColumnHeaderViewInfo.CalculateHasTextOffset(ASide: TAlignment): Boolean; -var - I: Integer; -begin - if Text <> '' then - begin - Result := True; - for I := 0 to AreaViewInfoCount - 1 do - with AreaViewInfos[I] do - if OccupiesSpace and (AlignmentHorz = ASide) then Exit; - end; - Result := False; -end; - -function TcxGridColumnHeaderViewInfo.CalculateHeight: Integer; -begin - Result := GetTextCellHeight(GridViewInfo, LookAndFeelPainter); -end; - -function TcxGridColumnHeaderViewInfo.CalculateRealWidth(Value: Integer): Integer; -begin - Result := Value - FContainer.GetColumnAdditionalWidth(Column); -end; - -procedure TcxGridColumnHeaderViewInfo.CalculateTextAreaBounds; -var - I: Integer; -begin - FTextAreaBounds := inherited GetTextAreaBounds; - for I := 0 to AreaViewInfoCount - 1 do - AreaViewInfos[I].Calculate(Bounds, FTextAreaBounds); - if HasTextOffsetLeft then - Inc(FTextAreaBounds.Left, cxGridCellTextOffset); - if HasTextOffsetRight then - Dec(FTextAreaBounds.Right, cxGridCellTextOffset); -end; - -procedure TcxGridColumnHeaderViewInfo.CalculateVisible(ALeftBound, AWidth: Integer); -begin - with GridViewInfo.ClientBounds do - Visible := (ALeftBound < Right) and (ALeftBound + AWidth > Left); -end; - -function TcxGridColumnHeaderViewInfo.CalculateWidth: Integer; -begin - if FWidth = -1 then - FWidth := FContainer.GetColumnWidth(Column); - Result := FWidth; -end; - -function TcxGridColumnHeaderViewInfo.CanFilter: Boolean; -begin - Result := FColumn.CanFilter(True); -end; - -function TcxGridColumnHeaderViewInfo.CanHorzSize: Boolean; -begin - Result := FColumn.CanHorzSize and (Container.Kind = ckHeader); -end; - -function TcxGridColumnHeaderViewInfo.CanPress: Boolean; -begin - Result := True; -end; - -function TcxGridColumnHeaderViewInfo.CanShowHint: Boolean; -begin - Result := GridView.OptionsBehavior.ColumnHeaderHints; -end; - -function TcxGridColumnHeaderViewInfo.CanSort: Boolean; -begin - Result := FColumn.SortOrder <> soNone; -end; - -procedure TcxGridColumnHeaderViewInfo.CheckWidth(var Value: Integer); -begin - if Value < MinWidth then Value := MinWidth; - if Value > MaxWidth then Value := MaxWidth; -end; - -function TcxGridColumnHeaderViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDraw(ACanvas); - if not Result then - begin - FColumn.DoCustomDrawHeader(ACanvas, Self, Result); - if not Result then - GridView.DoCustomDrawColumnHeader(ACanvas, Self, Result); - end; -end; - -procedure TcxGridColumnHeaderViewInfo.DoCalculateParams; -begin - FNeighbors := FContainer.GetColumnNeighbors(Column); - inherited; - CalculateTextAreaBounds; -end; - -function TcxGridColumnHeaderViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := FColumn.HeaderAlignmentHorz; -end; - -function TcxGridColumnHeaderViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := FColumn.HeaderAlignmentVert; -end; - -function TcxGridColumnHeaderViewInfo.GetAreaBounds: TRect; -begin - Result := Container.GetItemAreaBounds(Self); -end; - -procedure TcxGridColumnHeaderViewInfo.GetAreaViewInfoClasses(AProc: TcxGridClassEnumeratorProc); -begin - if CanHorzSize then AProc(TcxGridColumnHeaderHorzSizingEdgeViewInfo); - if CanFilter then AProc(TcxGridColumnHeaderFilterButtonViewInfo); - if CanSort then AProc(TcxGridColumnHeaderSortingMarkViewInfo); - if HasGlyph then AProc(TcxGridColumnHeaderGlyphViewInfo); -end; - -function TcxGridColumnHeaderViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := GridViewInfo.HeaderViewInfo.ColumnBackgroundBitmap; -end; - -function TcxGridColumnHeaderViewInfo.GetBorders: TcxBorders; -begin - Result := LookAndFeelPainter.HeaderBorders(Neighbors); -end; - -function TcxGridColumnHeaderViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := GetCellBorderWidth(LookAndFeelPainter); -end; - -function TcxGridColumnHeaderViewInfo.GetCanvas: TcxCanvas; -begin - Result := GridViewInfo.Canvas; -end; - -function TcxGridColumnHeaderViewInfo.GetCaption: string; -begin - Result := Column.VisibleCaption; -end; - -class function TcxGridColumnHeaderViewInfo.GetCellBorderWidth(ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; -begin - Result := ALookAndFeelPainter.HeaderBorderSize; -end; - -class function TcxGridColumnHeaderViewInfo.GetCellHeight(ATextHeight: Integer; - ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; -begin - Result := inherited GetCellHeight(ATextHeight, ALookAndFeelPainter); - Inc(Result, 2 * GetCellBorderWidth(ALookAndFeelPainter)); -end; - -function TcxGridColumnHeaderViewInfo.GetDataOffset: Integer; -begin - Result := Bounds.Right - RealWidth; -end; - -function TcxGridColumnHeaderViewInfo.GetHeight: Integer; -begin - Result := inherited GetHeight - FAdditionalHeightAtTop; -end; - -function TcxGridColumnHeaderViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridColumnHeaderHitTest; -end; - -function TcxGridColumnHeaderViewInfo.GetHotTrack: Boolean; -begin - Result := LookAndFeelPainter.IsHeaderHotTrack or AreasNeedHotTrack; -end; - -function TcxGridColumnHeaderViewInfo.GetIsDesignSelected: Boolean; -begin - Result := GridView.IsDesigning and - GridView.Controller.DesignController.IsObjectSelected(FColumn); -end; - -function TcxGridColumnHeaderViewInfo.GetIsPressed: Boolean; -begin - Result := (State = gcsPressed) or (GridViewInfo.Controller.PressedColumn = Column); -end; - -function TcxGridColumnHeaderViewInfo.GetMaxWidth: Integer; -var - AIndex, I: Integer; -begin - if GridView.OptionsView.ColumnAutoWidth then - begin - Result := GridViewInfo.ClientWidth; - AIndex := Column.VisibleIndex; - if AIndex = FContainer.Count - 1 then - for I := 0 to AIndex - 1 do - Dec(Result, FContainer[I].MinWidth) - else - for I := 0 to FContainer.Count - 1 do - begin - if I < AIndex then - Dec(Result, FContainer[I].Width); - if I > AIndex then - Dec(Result, FContainer[I].MinWidth); - end; - if Result < MinWidth then Result := MinWidth; - end - else - Result := MaxInt; -end; - -function TcxGridColumnHeaderViewInfo.GetMinWidth: Integer; -begin - if IsFixed then - Result := CalculateWidth - else - Result := FContainer.GetColumnMinWidth(Column); -end; - -function TcxGridColumnHeaderViewInfo.GetMultiLine: Boolean; -begin - Result := FContainer.AutoHeight; -end; - -function TcxGridColumnHeaderViewInfo.GetMultiLinePainting: Boolean; -begin - Result := inherited GetMultiLinePainting or FContainer.GetItemMultiLinePainting(Self); -end; - -function TcxGridColumnHeaderViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridColumnHeaderPainter; -end; - -function TcxGridColumnHeaderViewInfo.GetShowEndEllipsis: Boolean; -begin - Result := GridView.OptionsView.HeaderEndEllipsis; -end; - -function TcxGridColumnHeaderViewInfo.GetText: string; -begin - if Column.Options.ShowCaption then - Result := Caption - else - Result := ''; -end; - -function TcxGridColumnHeaderViewInfo.GetTextAreaBounds: TRect; -begin - Result := FTextAreaBounds; -end; - -procedure TcxGridColumnHeaderViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - Column.Styles.GetHeaderParams(AParams); -end; - -function TcxGridColumnHeaderViewInfo.GetWidth: Integer; -begin - Result := inherited GetWidth - FAdditionalWidthAtLeft; -end; - -function TcxGridColumnHeaderViewInfo.HasCustomDraw: Boolean; -begin - Result := Column.HasCustomDrawHeader or GridView.HasCustomDrawColumnHeader; -end; - -function TcxGridColumnHeaderViewInfo.HasFixedContentSpace: Boolean; -begin - Result := False; -end; - -function TcxGridColumnHeaderViewInfo.HasGlyph: Boolean; -begin - Result := not FColumn.HeaderGlyph.Empty; -end; - -function TcxGridColumnHeaderViewInfo.HasHeaderAsContainer: Boolean; -begin - Result := FContainer = GridViewInfo.HeaderViewInfo; -end; - -procedure TcxGridColumnHeaderViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - FContainer.InitHitTest(AHitTest); - inherited; - (AHitTest as TcxCustomGridColumnHitTest).Column := Column; -end; - -procedure TcxGridColumnHeaderViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - inherited; - OffsetRect(FTextAreaBounds, DX, DY); - for I := 0 to AreaViewInfoCount - 1 do - AreaViewInfos[I].DoOffset(DX, DY); -end; - -procedure TcxGridColumnHeaderViewInfo.SetWidth(Value: Integer); -begin - inherited; - FWidth := Value; -end; - -procedure TcxGridColumnHeaderViewInfo.StateChanged(APrevState: TcxGridCellState); -begin - if not IsDestroying and AreasNeedHotTrack then - Recalculate; - inherited; -end; - -procedure TcxGridColumnHeaderViewInfo.BeforeRecalculation; -begin - inherited; - Bounds := RealBounds; -end; - -procedure TcxGridColumnHeaderViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); - - procedure CheckHiddenBorders(var AAdditionalWidthAtLeft, AAdditionalHeightAtTop: Integer); - var - AHiddenBorders: TcxBorders; - begin - CalculateParams; - AHiddenBorders := cxBordersAll - Borders; - if AHiddenBorders <> [] then - begin - if bLeft in AHiddenBorders then - begin - Dec(ALeftBound, BorderWidth[bLeft]); - Inc(AWidth, BorderWidth[bLeft]); - Inc(AAdditionalWidthAtLeft, BorderWidth[bLeft]); - end; - if bTop in AHiddenBorders then - begin - Dec(ATopBound, BorderWidth[bTop]); - Inc(AHeight, BorderWidth[bTop]); - Inc(AAdditionalHeightAtTop, BorderWidth[bTop]); - end; - Borders := cxBordersAll; - end; - end; - -begin - FAdditionalWidthAtLeft := 0; - FAdditionalHeightAtTop := 0; - if AWidth = -1 then - AWidth := CalculateWidth; - CalculateVisible(ALeftBound, AWidth); - CheckHiddenBorders(FAdditionalWidthAtLeft, FAdditionalHeightAtTop); - inherited; - {if Visible then }CalculateTextAreaBounds; -end; - -function TcxGridColumnHeaderViewInfo.GetBestFitWidth: Integer; -var - I: Integer; -begin - Result := inherited GetBestFitWidth - FAdditionalWidthAtLeft; - if HasTextOffsetLeft then Inc(Result, cxGridCellTextOffset); - if HasTextOffsetRight then Inc(Result, cxGridCellTextOffset); - for I := 0 to AreaViewInfoCount - 1 do - with AreaViewInfos[I] do - if OccupiesSpace then Inc(Result, Width); -end; - -function TcxGridColumnHeaderViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; -begin - for I := 0 to AreaViewInfoCount - 1 do - begin - Result := AreaViewInfos[I].GetHitTest(P); - if Result <> nil then Exit; - end; - Result := inherited GetHitTest(P); -end; - -procedure TcxGridColumnHeaderViewInfo.InitAutoWidthItem(AAutoWidthItem: TcxAutoWidthItem); -begin - AAutoWidthItem.MinWidth := MinWidth; - AAutoWidthItem.Width := CalculateWidth; - AAutoWidthItem.Fixed := IsFixed; -end; - -function TcxGridColumnHeaderViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if (AButton = mbLeft) and not (ssDouble in AShift) and CanPress then - begin - if GridView.IsDesigning then - GridView.Controller.DesignController.SelectObject(FColumn, not (ssShift in AShift)) - else - begin - GridView.Controller.PressedColumn := FColumn; - FColumn.DoHeaderClick; - end; - Result := True; - end; -end; - -{ TcxGridHeaderViewInfoSpecific } - -constructor TcxGridHeaderViewInfoSpecific.Create(AContainerViewInfo: TcxGridHeaderViewInfo); -begin - inherited Create; - FContainerViewInfo := AContainerViewInfo; -end; - -function TcxGridHeaderViewInfoSpecific.GetGridViewInfo: TcxGridTableViewInfo; -begin - Result := FContainerViewInfo.GridViewInfo; -end; - -function TcxGridHeaderViewInfoSpecific.GetItemHeight: Integer; -begin - Result := FContainerViewInfo.ItemHeight; -end; - -function TcxGridHeaderViewInfoSpecific.CalculateHeight: Integer; -begin - Result := ItemHeight; -end; - -function TcxGridHeaderViewInfoSpecific.GetHeight: Integer; -begin - Result := CalculateHeight; -end; - -{ TcxGridHeaderViewInfo } - -constructor TcxGridHeaderViewInfo.Create(AGridViewInfo: TcxCustomGridTableViewInfo); -begin - inherited; - FSpecific := GridViewInfo.GetHeaderViewInfoSpecificClass.Create(Self); -end; - -destructor TcxGridHeaderViewInfo.Destroy; -begin - FSpecific.Free; - inherited; -end; - -function TcxGridHeaderViewInfo.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := GridView.VisibleColumns[Index]; -end; - -function TcxGridHeaderViewInfo.GetColumnCount: Integer; -begin - Result := GridView.VisibleColumnCount; -end; - -procedure TcxGridHeaderViewInfo.AddIndicatorItems(AIndicatorViewInfo: TcxGridIndicatorViewInfo; - ATopBound: Integer); -begin - AIndicatorViewInfo.AddItem(ATopBound, Height, TcxGridIndicatorHeaderItemViewInfo); -end; - -procedure TcxGridHeaderViewInfo.CalculateColumnAutoWidths; -var - AAutoWidthObject: TcxAutoWidthObject; - I: Integer; -begin - AAutoWidthObject := TcxAutoWidthObject.Create(Count); - try - for I := 0 to Count - 1 do - Items[I].InitAutoWidthItem(AAutoWidthObject.AddItem); - AAutoWidthObject.AvailableWidth := GridViewInfo.ClientWidth; - AAutoWidthObject.Calculate; - for I := 0 to Count - 1 do - Items[I].Width := AAutoWidthObject[I].AutoWidth; - finally - AAutoWidthObject.Free; - end; -end; - -procedure TcxGridHeaderViewInfo.CalculateColumnWidths; -begin - if CanCalculateAutoWidths then CalculateColumnAutoWidths; -end; - -function TcxGridHeaderViewInfo.CalculateHeight: Integer; -begin - Result := FSpecific.Height; -end; - -procedure TcxGridHeaderViewInfo.CalculateInvisible; -begin - if IsAlwaysVisibleForCalculation then - begin - CalculateVisible; - Height := 0; - Bounds := Rect(0, 0, 0, 0); - end - else - inherited; -end; - -function TcxGridHeaderViewInfo.CalculateItemHeight: Integer; -var - I, AColumnHeight: Integer; -begin - if IsHeightAssigned then - Result := GridView.OptionsView.HeaderHeight - else - begin - Result := 0; - CalculateParams; - for I := 0 to Count - 1 do - if Items[I].Visible then - begin - AColumnHeight := Items[I].CalculateHeight; - if AColumnHeight > Result then Result := AColumnHeight; - end; - if Result = 0 then - Result := inherited CalculateItemHeight; - end; -end; - -procedure TcxGridHeaderViewInfo.CalculateItems; -var - ALeftBound, ATopBound, I, AWidth: Integer; - AItem: TcxGridColumnHeaderViewInfo; -begin - with ItemsAreaBounds do - begin - ALeftBound := Left; - ATopBound := Top; - end; - for I := 0 to Count - 1 do - begin - AItem := Items[I]; - AWidth := AItem.CalculateWidth; - AItem.Calculate(ALeftBound, ATopBound, AWidth, ItemHeight); - Inc(ALeftBound, AWidth); - end; -end; - -procedure TcxGridHeaderViewInfo.CalculateVisible; -begin - CalculateColumnWidths; - inherited; -end; - -function TcxGridHeaderViewInfo.CalculateWidth: Integer; -begin - Result := GridViewInfo.RecordsViewInfo.RowWidth; -end; - -function TcxGridHeaderViewInfo.CanCalculateAutoWidths: Boolean; -begin - Result := GridView.OptionsView.ColumnAutoWidth; -end; - -function TcxGridHeaderViewInfo.DrawColumnBackgroundHandler(ACanvas: TcxCanvas; - const ABounds: TRect): Boolean; -begin - Result := ColumnBackgroundBitmap <> nil; - if Result then - ACanvas.FillRect(ABounds, ColumnBackgroundBitmap); -end; - -function TcxGridHeaderViewInfo.GetAlignment: TcxGridPartAlignment; -begin - Result := gpaTop; -end; - -function TcxGridHeaderViewInfo.GetAutoHeight: Boolean; -begin - Result := GridViewInfo.SupportsAutoHeight and GridView.OptionsView.HeaderAutoHeight; -end; - -function TcxGridHeaderViewInfo.GetColumnBackgroundBitmap: TBitmap; -begin - Result := GridView.BackgroundBitmaps.GetBitmap(bbHeader); -end; - -function TcxGridHeaderViewInfo.GetColumnNeighbors(AColumn: TcxGridColumn): TcxNeighbors; -begin - Result := []; - if not AColumn.IsLeft then Include(Result, nLeft); - if not AColumn.IsRight then Include(Result, nRight); -end; - -function TcxGridHeaderViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridHeaderHitTest; -end; - -function TcxGridHeaderViewInfo.GetIsAutoWidth: Boolean; -begin - Result := False; -end; - -function TcxGridHeaderViewInfo.GetIsScrollable: Boolean; -begin - Result := True; -end; - -function TcxGridHeaderViewInfo.GetItemMultiLinePainting(AItem: TcxGridColumnHeaderViewInfo): Boolean; -begin - Result := inherited GetItemMultiLinePainting(AItem) or IsHeightAssigned; -end; - -function TcxGridHeaderViewInfo.GetKind: TcxGridColumnContainerKind; -begin - Result := ckHeader; -end; - -function TcxGridHeaderViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridHeaderPainter; -end; - -procedure TcxGridHeaderViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetHeaderParams(nil, AParams); -end; - -function TcxGridHeaderViewInfo.GetVisible: Boolean; -begin - Result := GridView.OptionsView.Header; -end; - -function TcxGridHeaderViewInfo.GetWidth: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - Inc(Result, Items[I].CalculateWidth); -end; - -function TcxGridHeaderViewInfo.GetZonesAreaBounds: TRect; -begin - Result := inherited GetZonesAreaBounds; - Result.Left := GridViewInfo.ClientBounds.Left; - InflateRect(Result, 0, ColumnHeaderMovingZoneSize); -end; - -function TcxGridHeaderViewInfo.IsAlwaysVisibleForCalculation: Boolean; -begin - Result := True; -end; - -function TcxGridHeaderViewInfo.IsHeightAssigned: Boolean; -begin - Result := GridView.OptionsView.HeaderHeight <> 0; -end; - -procedure TcxGridHeaderViewInfo.Offset(DX, DY: Integer); -begin - inherited; - RecalculateItemVisibles; -end; - -procedure TcxGridHeaderViewInfo.RecalculateItemVisibles; -var - I: Integer; -begin - for I := 0 to Count - 1 do - with Items[I] do - CalculateVisible(Bounds.Left, Bounds.Right - Bounds.Left); -end; - -procedure TcxGridHeaderViewInfo.AssignColumnWidths; -var - I: Integer; -begin - GridView.BeginUpdate; - try - for I := 0 to Count - 1 do - with Items[I] do - Column.Width := RealWidth; - finally - GridView.EndUpdate; - end; -end; - -procedure TcxGridHeaderViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - CalculateItems; -end; - -{ TcxGridGroupByBoxColumnHeaderViewInfo } - -function TcxGridGroupByBoxColumnHeaderViewInfo.GetContainer: TcxGridGroupByBoxViewInfo; -begin - Result := TcxGridGroupByBoxViewInfo(inherited Container); -end; - -function TcxGridGroupByBoxColumnHeaderViewInfo.CalculateHeight: Integer; -begin - Result := TcxGridGroupByBoxViewInfo(Container).ItemHeight; -end; - -function TcxGridGroupByBoxColumnHeaderViewInfo.GetCaption: string; -begin - Result := Column.GetAlternateCaption; -end; - -function TcxGridGroupByBoxColumnHeaderViewInfo.HasFixedContentSpace: Boolean; -begin - Result := Container.CalculatingColumnWidth; -end; - -function TcxGridGroupByBoxColumnHeaderViewInfo.InheritedCalculateHeight: Integer; -begin - Result := inherited CalculateHeight; -end; - -{ TcxGridGroupByBoxViewInfo } - -function TcxGridGroupByBoxViewInfo.GetGroupByBoxVerOffset: Integer; -begin - Result := ItemHeight div 2; -end; - -function TcxGridGroupByBoxViewInfo.GetLinkLineBounds(Index: Integer; - Horizontal: Boolean): TRect; -begin - Result := Items[Index].Bounds; - Result.Left := Result.Right - 2 * GroupByBoxHorOffset; - Result.Top := Result.Bottom; - Inc(Result.Bottom, GroupByBoxLineVerOffset); - if Horizontal then - begin - Result.Top := Result.Bottom - GroupByBoxLineWidth; - Inc(Result.Right, GroupByBoxHorOffset); - end - else - Result.Right := Result.Left + GroupByBoxLineWidth; -end; - -function TcxGridGroupByBoxViewInfo.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := GridView.GroupedColumns[Index]; -end; - -function TcxGridGroupByBoxViewInfo.GetColumnCount: Integer; -begin - Result := GridView.GroupedColumnCount; -end; - -function TcxGridGroupByBoxViewInfo.GetItemClass: TcxGridColumnHeaderViewInfoClass; -begin - Result := TcxGridGroupByBoxColumnHeaderViewInfo; -end; - -function TcxGridGroupByBoxViewInfo.CalculateHeight: Integer; - - function TextHeight: Integer; - begin - CalculateParams; - Result := GridViewInfo.GetFontHeight(Params.Font); - GetCellTextAreaSize(Result); - Inc(Result, 2); - end; - -begin - Result := ColumnCount; - if Result = 0 then - Result := 2 * GroupByBoxTopOffset + TextHeight - else - Result := 2 * GroupByBoxTopOffset + - ItemHeight div 2 * (Result + 1) + Byte(Odd(ItemHeight)); -end; - -function TcxGridGroupByBoxViewInfo.CalculateItemHeight: Integer; -var - I, AColumnHeight: Integer; -begin - Result := 0; - CalculateParams; - for I := 0 to Count - 1 do - begin - AColumnHeight := TcxGridGroupByBoxColumnHeaderViewInfo(Items[I]).InheritedCalculateHeight; - if AColumnHeight > Result then Result := AColumnHeight; - end; - if Result = 0 then - Result := inherited CalculateItemHeight; -end; - -function TcxGridGroupByBoxViewInfo.CalculateWidth: Integer; -begin - Result := GridViewInfo.ClientWidth; -end; - -function TcxGridGroupByBoxViewInfo.GetAlignment: TcxGridPartAlignment; -begin - Result := gpaTop; -end; - -function TcxGridGroupByBoxViewInfo.GetAlignmentVert: TcxAlignmentVert; -begin - Result := vaCenter; -end; - -function TcxGridGroupByBoxViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := GridView.BackgroundBitmaps.GetBitmap(bbGroupByBox); -end; - -function TcxGridGroupByBoxViewInfo.GetColumnWidth(AColumn: TcxGridColumn): Integer; -begin - FCalculatingColumnWidth := True; - Result := Items[AColumn.GroupIndex].GetBestFitWidth; - FCalculatingColumnWidth := False; -end; - -function TcxGridGroupByBoxViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridGroupByBoxHitTest; -end; - -function TcxGridGroupByBoxViewInfo.GetIsAutoWidth: Boolean; -begin - Result := True; -end; - -function TcxGridGroupByBoxViewInfo.GetIsScrollable: Boolean; -begin - Result := False; -end; - -function TcxGridGroupByBoxViewInfo.GetItemAreaBounds(AItem: TcxGridColumnHeaderViewInfo): TRect; -begin - SetRectEmpty(Result); -end; - -function TcxGridGroupByBoxViewInfo.GetKind: TcxGridColumnContainerKind; -begin - Result := ckGroupByBox; -end; - -function TcxGridGroupByBoxViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridGroupByBoxPainter; -end; - -function TcxGridGroupByBoxViewInfo.GetText: string; -begin - if Count = 0 then - Result := cxGetResourceString(@scxGridGroupByBoxCaption) - else - Result := ''; -end; - -function TcxGridGroupByBoxViewInfo.GetTextAreaBounds: TRect; -begin - Result := inherited GetTextAreaBounds; - Inc(Result.Left, GroupByBoxLeftOffset); -end; - -procedure TcxGridGroupByBoxViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetViewParams(vsGroupByBox, nil, nil, AParams); -end; - -function TcxGridGroupByBoxViewInfo.GetVisible: Boolean; -begin - Result := GridView.OptionsView.GroupByBox; -end; - -procedure TcxGridGroupByBoxViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -var - I: Integer; - AColumnHeaderViewInfo: TcxGridColumnHeaderViewInfo; -begin - inherited; - with Bounds do - begin - ALeftBound := Left + GroupByBoxLeftOffset; - ATopBound := Top + GroupByBoxTopOffset; - end; - for I := 0 to Count - 1 do - begin - AColumnHeaderViewInfo := Items[I]; - AColumnHeaderViewInfo.Calculate(ALeftBound, ATopBound); - Inc(ALeftBound, AColumnHeaderViewInfo.Width + GroupByBoxHorOffset); - Inc(ATopBound, GroupByBoxVerOffset); - end; -end; - -{ TcxGridFooterCellViewInfo } - -constructor TcxGridFooterCellViewInfo.Create(AContainer: TcxGridColumnContainerViewInfo; - ASummaryItem: TcxDataSummaryItem); -begin - inherited Create(AContainer, TcxGridColumn(ASummaryItem.ItemLink)); - FSummaryItem := ASummaryItem; -end; - -function TcxGridFooterCellViewInfo.GetContainer: TcxGridFooterViewInfo; -begin - Result := TcxGridFooterViewInfo(inherited Container); -end; - -function TcxGridFooterCellViewInfo.GetSummary: TcxDataSummary; -begin - Result := SummaryItem.SummaryItems.Summary; -end; - -procedure TcxGridFooterCellViewInfo.AfterCalculateBounds(var ABounds: TRect); -begin - inherited; - with LookAndFeelPainter do - InflateRect(ABounds, -FooterCellOffset, -FooterCellOffset); -end; - -function TcxGridFooterCellViewInfo.CanPress: Boolean; -begin - Result := False; -end; - -function TcxGridFooterCellViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := False; - Column.DoCustomDrawFooterCell(ACanvas, Self, Result); - if not Result then - GridView.DoCustomDrawFooterCell(ACanvas, Self, Result); -end; - -function TcxGridFooterCellViewInfo.GetAlignmentHorz: TAlignment; -begin - Result := Column.FooterAlignmentHorz; -end; - -function TcxGridFooterCellViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := Container.BackgroundBitmap; -end; - -procedure TcxGridFooterCellViewInfo.GetAreaViewInfoClasses(AProc: TcxGridClassEnumeratorProc); -begin -end; - -function TcxGridFooterCellViewInfo.GetBorders: TcxBorders; -begin - Result := cxBordersAll; -end; - -class function TcxGridFooterCellViewInfo.GetCellBorderWidth(ALookAndFeelPainter: TcxCustomLookAndFeelPainterClass): Integer; -begin - Result := ALookAndFeelPainter.FooterCellBorderSize; -end; - -function TcxGridFooterCellViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := Container.GetItemHitTestClass; -end; - -function TcxGridFooterCellViewInfo.GetIsDesignSelected: Boolean; -begin - Result := GridView.IsDesigning and - GridView.Controller.DesignController.IsObjectSelected(SummaryItem); -end; - -function TcxGridFooterCellViewInfo.GetIsPressed: Boolean; -begin - Result := False; -end; - -function TcxGridFooterCellViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridFooterCellPainter; -end; - -function TcxGridFooterCellViewInfo.GetText: string; -begin - try - Result := Summary.FooterSummaryTexts[SummaryItem.Index]; - except - Application.HandleException(Self); - end; -end; - -procedure TcxGridFooterCellViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetFooterCellParams(nil, Column, -1, SummaryItem, AParams); -end; - -function TcxGridFooterCellViewInfo.HasCustomDraw: Boolean; -begin - Result := Column.HasCustomDrawFooterCell or GridView.HasCustomDrawFooterCell; -end; - -procedure TcxGridFooterCellViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - (AHitTest as TcxGridFooterCellHitTest).SummaryItem := SummaryItem; -end; - -function TcxGridFooterCellViewInfo.GetBestFitWidth: Integer; -begin - Result := inherited GetBestFitWidth + 2 * LookAndFeelPainter.FooterCellOffset; -end; - -function TcxGridFooterCellViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if GridView.IsDesigning and (AButton = mbLeft) then - begin - GridView.Controller.DesignController.SelectObject(SummaryItem, not (ssShift in AShift)); - Result := True; - end; -end; - -{ TcxGridFooterViewInfo } - -function TcxGridFooterViewInfo.GetMultipleSummaries: Boolean; -begin - Result := RowCount > 1; -end; - -function TcxGridFooterViewInfo.GetRowCount: Integer; -begin - if FRowCount = 0 then - FRowCount := CalculateRowCount; - Result := FRowCount; -end; - -function TcxGridFooterViewInfo.GetRowHeight: Integer; -begin - if MultipleSummaries then - Result := ItemHeight - else - Result := inherited CalculateHeight; -end; - -function TcxGridFooterViewInfo.CreateItem(AIndex: Integer): TcxGridColumnHeaderViewInfo; -begin - Result := TcxGridFooterCellViewInfoClass(GetItemClass).Create(Self, FSummaryItems[AIndex]); -end; - -procedure TcxGridFooterViewInfo.CreateItems; -var - AColumnHasSummaries: array of Boolean; - I, AColumnVisibleIndex: Integer; - ASummaryItem: TcxDataSummaryItem; -begin - FSummaryItems := TList.Create; - SetLength(AColumnHasSummaries, GridView.VisibleColumnCount); - for I := 0 to SummaryItems.Count - 1 do - begin - ASummaryItem := SummaryItems[I]; - if (ASummaryItem.Position = spFooter) and (ASummaryItem.ItemLink is TcxGridColumn) then - begin - AColumnVisibleIndex := TcxGridColumn(ASummaryItem.ItemLink).VisibleIndex; - if (AColumnVisibleIndex <> -1) and - (CanShowMultipleSummaries or not AColumnHasSummaries[AColumnVisibleIndex]) then - begin - FSummaryItems.Add(ASummaryItem); - AColumnHasSummaries[AColumnVisibleIndex] := True; - end; - end; - end; - PrepareSummaryItems(FSummaryItems); - inherited; -end; - -procedure TcxGridFooterViewInfo.DestroyItems; -begin - inherited; - FreeAndNil(FSummaryItems); -end; - -function TcxGridFooterViewInfo.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := TcxGridColumn(TcxDataSummaryItem(FSummaryItems[Index]).ItemLink); -end; - -function TcxGridFooterViewInfo.GetColumnCount: Integer; -begin - Result := FSummaryItems.Count; -end; - -function TcxGridFooterViewInfo.GetItemClass: TcxGridColumnHeaderViewInfoClass; -begin - Result := TcxGridFooterCellViewInfo; -end; - -procedure TcxGridFooterViewInfo.PrepareSummaryItems(ASummaryItems: TList); -begin -end; - -function TcxGridFooterViewInfo.CalculateBounds: TRect; -begin - Result := inherited CalculateBounds; - with GridViewInfo.HeaderViewInfo.CalculateBounds do - begin - Result.Left := Left; - Result.Right := Right; - end; -end; - -function TcxGridFooterViewInfo.CalculateHeight: Integer; -begin - CalculateParams; - Result := BorderSize[bTop] + RowCount * RowHeight + BorderSize[bBottom]; - Inc(Result, SeparatorWidth); -end; - -function TcxGridFooterViewInfo.CalculateItemHeight: Integer; -begin - Result := inherited CalculateItemHeight + 2 * LookAndFeelPainter.FooterCellOffset; -end; - -procedure TcxGridFooterViewInfo.CalculateItem(AIndex: Integer); -begin - Items[AIndex].Calculate(GetItemLeftBound(AIndex), GetItemTopBound(AIndex), - -1, GetItemHeight(AIndex)); -end; - -procedure TcxGridFooterViewInfo.CalculateItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do - if IsItemVisible(I) then CalculateItem(I); -end; - -function TcxGridFooterViewInfo.CalculateRowCount: Integer; -var - I: Integer; - ItemCount: array of Integer; -begin - Result := 1; - if Count = 0 then Exit; - SetLength(ItemCount, GridView.VisibleItemCount); - for I := 0 to Count - 1 do - Inc(ItemCount[Items[I].Column.VisibleIndex]); - for I := 0 to Length(ItemCount) - 1 do - Result := Max(Result, ItemCount[I]); -end; - -function TcxGridFooterViewInfo.CanCalculateAutoWidths: Boolean; -begin - Result := False; -end; - -function TcxGridFooterViewInfo.GetAlignment: TcxGridPartAlignment; -begin - Result := gpaBottom; -end; - -function TcxGridFooterViewInfo.GetAutoHeight: Boolean; -begin - Result := GridViewInfo.SupportsAutoHeight and - GridView.OptionsView.FooterAutoHeight and not MultipleSummaries; -end; - -function TcxGridFooterViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := GridView.BackgroundBitmaps.GetBitmap(bbFooter); -end; - -function TcxGridFooterViewInfo.GetBordersBounds: TRect; -begin - Result := Bounds; - Inc(Result.Top, SeparatorWidth); -end; - -function TcxGridFooterViewInfo.GetBorders: TcxBorders; -begin - Result := LookAndFeelPainter.FooterBorders; -end; - -function TcxGridFooterViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := LookAndFeelPainter.FooterBorderSize; -end; - -function TcxGridFooterViewInfo.GetColumnWidth(AColumn: TcxGridColumn): Integer; -begin - Result := GridViewInfo.HeaderViewInfo[AColumn.VisibleIndex].Width; - if AColumn.IsMostLeft then - Dec(Result, BorderSize[bLeft]); - if AColumn.IsMostRight then - Dec(Result, BorderSize[bRight]); -end; - -function TcxGridFooterViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridFooterHitTest; -end; - -function TcxGridFooterViewInfo.GetIsAutoWidth: Boolean; -begin - Result := GridViewInfo.HeaderViewInfo.IsAutoWidth; -end; - -function TcxGridFooterViewInfo.GetIsScrollable: Boolean; -begin - Result := GridViewInfo.HeaderViewInfo.IsScrollable; -end; - -function TcxGridFooterViewInfo.GetItemAreaBounds(AItem: TcxGridColumnHeaderViewInfo): TRect; -begin - Result := GridViewInfo.HeaderViewInfo.GetItemAreaBounds(AItem); -end; - -function TcxGridFooterViewInfo.GetItemHeight(AColumn: TcxGridColumn): Integer; -begin - if MultipleSummaries then - Result := ItemHeight - else - Result := GridViewInfo.GetCellHeight(AColumn.VisibleIndex, ItemHeight); -end; - -function TcxGridFooterViewInfo.GetItemHeight(AIndex: Integer): Integer; -begin - Result := GetItemHeight(Items[AIndex].Column); -end; - -function TcxGridFooterViewInfo.GetItemHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridFooterCellHitTest; -end; - -function TcxGridFooterViewInfo.GetItemLeftBound(AColumn: TcxGridColumn): Integer; -begin - if AColumn.IsMostLeft then - Result := ItemsAreaBounds.Left - else - Result := GridViewInfo.HeaderViewInfo[AColumn.VisibleIndex].RealBounds.Left; -end; - -function TcxGridFooterViewInfo.GetItemLeftBound(AIndex: Integer): Integer; -begin - Result := GetItemLeftBound(Items[AIndex].Column); -end; - -function TcxGridFooterViewInfo.GetItemRowIndex(AIndex: Integer): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to AIndex - 1 do - if Items[I].Column = Items[AIndex].Column then - Inc(Result); -end; - -function TcxGridFooterViewInfo.GetItemsAreaBounds: TRect; -begin - Result := BordersBounds; - with Result do - begin - Inc(Left, BorderSize[bLeft]); - Inc(Top, BorderSize[bTop]); - Dec(Right, BorderSize[bRight]); - Dec(Bottom, BorderSize[bBottom]); - end; -end; - -function TcxGridFooterViewInfo.GetItemTopBound(AColumn: TcxGridColumn): Integer; -begin - Result := ItemsAreaBounds.Top + GridViewInfo.GetCellTopOffset(AColumn.VisibleIndex, ItemHeight); -end; - -function TcxGridFooterViewInfo.GetItemTopBound(AIndex: Integer): Integer; -begin - Result := GetItemTopBound(Items[AIndex].Column) + GetItemRowIndex(AIndex) * RowHeight; -end; - -function TcxGridFooterViewInfo.GetKind: TcxGridColumnContainerKind; -begin - Result := ckFooter; -end; - -function TcxGridFooterViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := GridViewInfo.GetFooterPainterClass; -end; - -function TcxGridFooterViewInfo.GetSeparatorBounds: TRect; -begin - Result := Bounds; - Result.Bottom := Result.Top + SeparatorWidth; -end; - -function TcxGridFooterViewInfo.GetSeparatorWidth: Integer; -begin - if HasSeparator then - Result := LookAndFeelPainter.FooterSeparatorSize - else - Result := 0; -end; - -function TcxGridFooterViewInfo.GetSummaryItems: TcxDataSummaryItems; -begin - Result := GridView.FDataController.Summary.FooterSummaryItems; -end; - -procedure TcxGridFooterViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetFooterParams(nil, nil, -1, nil, AParams); -end; - -function TcxGridFooterViewInfo.GetVisible: Boolean; -begin - Result := GridView.OptionsView.Footer; -end; - -function TcxGridFooterViewInfo.HasSeparator: Boolean; -begin - Result := True; -end; - -function TcxGridFooterViewInfo.IsAlwaysVisibleForCalculation: Boolean; -begin - Result := False; -end; - -function TcxGridFooterViewInfo.IsColumnOnFirstLayer(AColumnIndex: Integer): Boolean; -begin - Result := False; -end; - -function TcxGridFooterViewInfo.IsHeightAssigned: Boolean; -begin - Result := False; -end; - -function TcxGridFooterViewInfo.IsItemVisible(AIndex: Integer): Boolean; -begin - Result := GridViewInfo.HeaderViewInfo[Items[AIndex].Column.VisibleIndex].Visible; -end; - -function TcxGridFooterViewInfo.IsMultilayerLayout: Boolean; -begin - Result := False; -end; - -procedure TcxGridFooterViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - inherited; - if DX <> 0 then - for I := 0 to Count - 1 do - if IsItemVisible(I) then - if not Items[I].Calculated then - CalculateItem(I) - else - else - Items[I].Calculated := False; -end; - -function TcxGridFooterViewInfo.CanShowMultipleSummaries: Boolean; -begin - Result := GridView.OptionsView.CanShowFooterMultiSummaries; -end; - -function TcxGridFooterViewInfo.GetCellBestFitWidth(AColumn: TcxGridColumn): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - if Items[I].Column = AColumn then - Result := Max(Result, Items[I].GetBestFitWidth); -end; - -function TcxGridFooterViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; - - function GetCellBounds(AColumn: TcxGridColumn): TRect; - begin - Result.Left := GetItemLeftBound(AColumn); - Result.Right := Result.Left + GetColumnWidth(AColumn); - if MultipleSummaries then - with ItemsAreaBounds do - begin - Result.Top := Top; - Result.Bottom := Bottom; - end - else - begin - Result.Top := GetItemTopBound(AColumn); - Result.Bottom := Result.Top + GetItemHeight(AColumn); - end; - end; - -var - I: Integer; - AColumn: TcxGridColumn; - ColumnNotFound: Boolean; -begin - Result := GetItemsHitTest(P); - ColumnNotFound := True; - if Result = nil then - begin - Result := inherited GetHitTest(P); - if Result <> nil then - for I := 0 to GridView.VisibleColumnCount - 1 do - begin - AColumn := GridView.VisibleColumns[I]; - if PtInRect(GetCellBounds(AColumn), P) and - (ColumnNotFound or IsColumnOnFirstLayer(I)) then - begin - Result := GetItemHitTestClass.Instance(P); - InitHitTest(Result); - TcxGridFooterCellHitTest(Result).Column := AColumn; - TcxGridFooterCellHitTest(Result).SummaryItem := nil; - ColumnNotFound := False; - if not IsMultilayerLayout then - Break; - end; - end; - end; -end; - -{ TcxCustomGridIndicatorItemViewInfo } - -constructor TcxCustomGridIndicatorItemViewInfo.Create(AContainer: TcxGridIndicatorViewInfo); -begin - inherited Create(AContainer.GridViewInfo); - FContainer := AContainer; -end; - -destructor TcxCustomGridIndicatorItemViewInfo.Destroy; -begin - FContainer.FItems.Remove(Self); - inherited; -end; - -function TcxCustomGridIndicatorItemViewInfo.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxCustomGridIndicatorItemViewInfo.GetGridViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited GridViewInfo); -end; - -function TcxCustomGridIndicatorItemViewInfo.CalculateWidth: Integer; -begin - Result := FContainer.Width; -end; - -function TcxCustomGridIndicatorItemViewInfo.CustomDraw(ACanvas: TcxCanvas): Boolean; -begin - Result := inherited CustomDraw(ACanvas); - if not Result then - GridView.DoCustomDrawIndicatorCell(ACanvas, Self, Result); -end; - -function TcxCustomGridIndicatorItemViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridIndicatorHitTest; -end; - -function TcxCustomGridIndicatorItemViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxCustomGridIndicatorItemPainter; -end; - -procedure TcxCustomGridIndicatorItemViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetViewParams(vsIndicator, nil, nil, AParams); -end; - -function TcxCustomGridIndicatorItemViewInfo.HasCustomDraw: Boolean; -begin - Result := GridView.HasCustomDrawIndicatorCell; -end; - -{ TcxGridIndicatorHeaderItemViewInfo } - -function TcxGridIndicatorHeaderItemViewInfo.GetDropDownWindowValue: TcxCustomGridCustomizationPopup; -begin - Result := TcxCustomGridCustomizationPopup(inherited DropDownWindow); -end; - -function TcxGridIndicatorHeaderItemViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TcxGridIndicatorHeaderItemViewInfo.CanShowHint: Boolean; -begin - Result := SupportsQuickCustomization; -end; - -function TcxGridIndicatorHeaderItemViewInfo.GetCellBoundsForHint: TRect; -begin - Result := Bounds; -end; - -function TcxGridIndicatorHeaderItemViewInfo.GetHintTextRect(const AMousePos: TPoint): TRect; -begin - Result := Bounds; - OffsetRect(Result, 0, Height + 5); -end; - -function TcxGridIndicatorHeaderItemViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridIndicatorHeaderHitTest; -end; - -function TcxGridIndicatorHeaderItemViewInfo.GetHotTrack: Boolean; -begin - Result := SupportsQuickCustomization; -end; - -function TcxGridIndicatorHeaderItemViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridIndicatorHeaderItemPainter; -end; - -function TcxGridIndicatorHeaderItemViewInfo.GetText: string; -begin - Result := cxGetResourceString(@scxGridColumnsQuickCustomizationHint); -end; - -procedure TcxGridIndicatorHeaderItemViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetHeaderParams(nil, AParams); -end; - -function TcxGridIndicatorHeaderItemViewInfo.IsHintForText: Boolean; -begin - Result := False; -end; - -function TcxGridIndicatorHeaderItemViewInfo.IsHintMultiLine: Boolean; -begin - Result := False; -end; - -function TcxGridIndicatorHeaderItemViewInfo.SupportsQuickCustomization: Boolean; -begin - Result := GridView.OptionsCustomize.ColumnsQuickCustomization; -end; - -function TcxGridIndicatorHeaderItemViewInfo.CloseDropDownWindowOnDestruction: Boolean; -begin - Result := False; -end; - -function TcxGridIndicatorHeaderItemViewInfo.DropDownWindowExists: Boolean; -begin - Result := GridView.Controller.HasItemsCustomizationPopup; -end; - -function TcxGridIndicatorHeaderItemViewInfo.GetDropDownWindow: TcxCustomGridPopup; -begin - Result := GridView.Controller.ItemsCustomizationPopup; -end; - -{ TcxGridIndicatorRowItemViewInfo } - -destructor TcxGridIndicatorRowItemViewInfo.Destroy; -begin - FRowViewInfo.FIndicatorItem := nil; - inherited; -end; - -function TcxGridIndicatorRowItemViewInfo.GetGridRecord: TcxCustomGridRow; -begin - Result := FRowViewInfo.GridRecord; -end; - -function TcxGridIndicatorRowItemViewInfo.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridIndicatorRowItemViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TcxGridIndicatorRowItemViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := GridView.BackgroundBitmaps.GetBitmap(bbIndicator); -end; - -function TcxGridIndicatorRowItemViewInfo.GetIndicatorKind: TcxIndicatorKind; -var - ARecordSelected: Boolean; -begin - if GridRecord.IsFilterRow then - Result := ikFilter - else - if GridRecord.IsNewItemRow then - Result := ikInsert - else - if GridRecord.IsEditing then - if dceInsert in GridView.FDataController.EditState then - Result := ikInsert - else - Result := ikEdit - else - begin - ARecordSelected := GridView.OptionsSelection.MultiSelect and GridRecord.Selected; - if GridRecord.Focused then - if ARecordSelected then - Result := ikMultiArrow - else - Result := ikArrow - else - if ARecordSelected then - Result := ikMultiDot - else - Result := ikNone; - end; -end; - -function TcxGridIndicatorRowItemViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridRowIndicatorHitTest; -end; - -function TcxGridIndicatorRowItemViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridIndicatorRowItemPainter; -end; - -function TcxGridIndicatorRowItemViewInfo.GetRowSizingEdgeBounds: TRect; -begin - Result := Bounds; - with Result do - begin - Top := Bottom - cxGridRowSizingEdgeSize div 2; - Inc(Bottom, cxGridRowSizingEdgeSize div 2); - end; -end; - -procedure TcxGridIndicatorRowItemViewInfo.InitHitTest(AHitTest: TcxCustomGridHitTest); -begin - inherited; - TcxGridRecordHitTest(AHitTest).GridRecord := GridRecord; - if AHitTest is TcxGridRowIndicatorHitTest then - begin - AHitTest.ViewInfo := GridRecord.ViewInfo; - TcxGridRowIndicatorHitTest(AHitTest).MultiSelect := GridView.Controller.MultiSelect; - end; -end; - -function TcxGridIndicatorRowItemViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - if RowViewInfo.CanSize and PtInRect(RowSizingEdgeBounds, P) then - begin - Result := TcxGridRowSizingEdgeHitTest.Instance(P); - InitHitTest(Result); - end - else - Result := inherited GetHitTest(P); -end; - -function TcxGridIndicatorRowItemViewInfo.MouseDown(AHitTest: TcxCustomGridHitTest; - AButton: TMouseButton; AShift: TShiftState): Boolean; -begin - Result := inherited MouseDown(AHitTest, AButton, AShift); - if (AButton = mbLeft) and (ssDouble in AShift) and - (AHitTest.HitTestCode = htRowSizingEdge) then - RowViewInfo.RowHeight := 0; -end; - -{ TcxGridIndicatorFooterItemViewInfo } - -function TcxGridIndicatorFooterItemViewInfo.GetSeparatorWidth: Integer; -begin - Result := GridViewInfo.FooterViewInfo.SeparatorWidth; -end; - -function TcxGridIndicatorFooterItemViewInfo.CalculateHeight: Integer; -begin - Result := 0; -end; - -function TcxGridIndicatorFooterItemViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := GridViewInfo.FooterViewInfo.BackgroundBitmap; -end; - -function TcxGridIndicatorFooterItemViewInfo.GetBorders: TcxBorders; -begin - Result := LookAndFeelPainter.FooterBorders; -end; - -function TcxGridIndicatorFooterItemViewInfo.GetBordersBounds: TRect; -begin - Result := Bounds; - Inc(Result.Top, SeparatorWidth); -end; - -function TcxGridIndicatorFooterItemViewInfo.GetBorderWidth(AIndex: TcxBorder): Integer; -begin - Result := LookAndFeelPainter.FooterBorderSize; - if AIndex = bTop then Inc(Result, SeparatorWidth); -end; - -function TcxGridIndicatorFooterItemViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridIndicatorFooterItemPainter; -end; - -function TcxGridIndicatorFooterItemViewInfo.GetSeparatorBounds: TRect; -begin - Result := Bounds; - Result.Bottom := Result.Top + SeparatorWidth; -end; - -function TcxGridIndicatorFooterItemViewInfo.HasSeparator: Boolean; -begin - Result := GridViewInfo.FooterViewInfo.HasSeparator; -end; - -{ TcxGridIndicatorViewInfo } - -constructor TcxGridIndicatorViewInfo.Create(AGridViewInfo: TcxGridTableViewInfo); -begin - inherited Create(AGridViewInfo); - FItems := TList.Create; -end; - -destructor TcxGridIndicatorViewInfo.Destroy; -begin - DestroyItems; - FItems.Free; - inherited; -end; - -function TcxGridIndicatorViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridIndicatorViewInfo.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridIndicatorViewInfo.GetGridViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited GridViewInfo); -end; - -function TcxGridIndicatorViewInfo.GetItem(Index: Integer): TcxCustomGridIndicatorItemViewInfo; -begin - Result := TcxCustomGridIndicatorItemViewInfo(FItems[Index]); -end; - -procedure TcxGridIndicatorViewInfo.DestroyItems; -var - I: Integer; -begin - for I := Count - 1 downto 0 do Items[I].Free; -end; - -function TcxGridIndicatorViewInfo.CalculateHeight: Integer; -begin - with GridViewInfo do - Result := HeaderViewInfo.Height + ClientHeight + FooterViewInfo.Height; -end; - -function TcxGridIndicatorViewInfo.CalculateWidth: Integer; -begin - if Visible then - Result := GridView.OptionsView.IndicatorWidth - else - Result := 0; -end; - -function TcxGridIndicatorViewInfo.GetAlwaysVisible: Boolean; -begin - Result := GridView.OptionsCustomize.ColumnsQuickCustomization; -end; - -function TcxGridIndicatorViewInfo.GetBackgroundBitmap: TBitmap; -begin - Result := GridViewInfo.BackgroundBitmap; -end; - -function TcxGridIndicatorViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridIndicatorHitTest; -end; - -function TcxGridIndicatorViewInfo.GetPainterClass: TcxCustomGridCellPainterClass; -begin - Result := TcxGridIndicatorPainter; -end; - -function TcxGridIndicatorViewInfo.GetRowItemClass(ARowViewInfo: TcxCustomGridRowViewInfo): TcxGridIndicatorRowItemViewInfoClass; -begin - Result := TcxGridIndicatorRowItemViewInfo; -end; - -procedure TcxGridIndicatorViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - AParams.Color := GridViewInfo.BackgroundColor; -end; - -function TcxGridIndicatorViewInfo.GetVisible: Boolean; -begin - Result := GridView.OptionsView.Indicator or AlwaysVisible; -end; - -function TcxGridIndicatorViewInfo.GetWidth: Integer; -begin - Result := CalculateWidth; -end; - -function TcxGridIndicatorViewInfo.AddItem(AItemClass: TcxCustomGridIndicatorItemViewInfoClass): TcxCustomGridIndicatorItemViewInfo; -begin - Result := AItemClass.Create(Self); - FItems.Add(Result); -end; - -function TcxGridIndicatorViewInfo.AddItem(ATopBound, AHeight: Integer; - AItemClass: TcxCustomGridIndicatorItemViewInfoClass): TcxCustomGridIndicatorItemViewInfo; -begin - Result := AddItem(AItemClass); - Result.Calculate(Bounds.Left, ATopBound, Width, AHeight); -end; - -function TcxGridIndicatorViewInfo.AddRowItem(ARowViewInfo: TcxCustomGridRowViewInfo): TcxCustomGridIndicatorItemViewInfo; -begin - Result := AddItem(GetRowItemClass(ARowViewInfo)); - TcxGridIndicatorRowItemViewInfo(Result).RowViewInfo := ARowViewInfo; -end; - -procedure TcxGridIndicatorViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - inherited; - if GridViewInfo.HeaderViewInfo.Visible then - GridViewInfo.HeaderViewInfo.AddIndicatorItems(Self, Bounds.Top); - if GridViewInfo.FooterViewInfo.Visible then - AddItem(Bounds.Bottom - GridViewInfo.FooterViewInfo.Height, - GridViewInfo.FooterViewInfo.Height, TcxGridIndicatorFooterItemViewInfo); -end; - -procedure TcxGridIndicatorViewInfo.CalculateRowItem(ARowViewInfo: TcxCustomGridRowViewInfo; - AItem: TcxCustomGridIndicatorItemViewInfo); -begin - AItem.Calculate(Bounds.Left, ARowViewInfo.Bounds.Top, Width, ARowViewInfo.Height); -end; - -function TcxGridIndicatorViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I].GetHitTest(P); - if Result <> nil then Exit; - end; - Result := inherited GetHitTest(P); -end; - -function TcxGridIndicatorViewInfo.GetRowItemBounds(AGridRecord: TcxCustomGridRow): TRect; -var - I: Integer; -begin - for I := 0 to Count - 1 do - if (Items[I] is TcxGridIndicatorRowItemViewInfo) and - (TcxGridIndicatorRowItemViewInfo(Items[I]).GridRecord = AGridRecord) then - begin - Result := Items[I].Bounds; - Exit; - end; - Result := Rect(0, 0, 0, 0); -end; - -{ TcxGridRowFooterCellViewInfo } - -function TcxGridRowFooterCellViewInfo.GetContainer: TcxGridRowFooterViewInfo; -begin - Result := TcxGridRowFooterViewInfo(inherited Container); -end; - -function TcxGridRowFooterCellViewInfo.GetGridRecord: TcxCustomGridRow; -begin - Result := Container.GridRecord; -end; - -function TcxGridRowFooterCellViewInfo.GetText: string; -begin - try - Result := Summary.GroupFooterSummaryTexts[GridRecord.Index, Container.GroupLevel, - SummaryItem.Index]; - except - Application.HandleException(Self); - end; -end; - -procedure TcxGridRowFooterCellViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetFooterCellParams(GridRecord, Column, Container.GroupLevel, - SummaryItem, AParams); -end; - -{ TcxGridRowFooterViewInfo } - -constructor TcxGridRowFooterViewInfo.Create(AContainer: TcxGridRowFootersViewInfo; - ALevel: Integer); -begin - FContainer := AContainer; - FLevel := ALevel; - inherited Create(AContainer.GridViewInfo); -end; - -function TcxGridRowFooterViewInfo.GetIndent: Integer; -begin - Result := VisualLevel * GridViewInfo.LevelIndent; -end; - -function TcxGridRowFooterViewInfo.GetGridRecord: TcxCustomGridRow; -begin - Result := RowViewInfo.GridRecord; -end; - -function TcxGridRowFooterViewInfo.GetGroupLevel: Integer; -begin - Result := RowViewInfo.Level - FLevel; - if GridView.OptionsView.GroupFooters = gfVisibleWhenExpanded then - Dec(Result); -end; - -function TcxGridRowFooterViewInfo.GetRowViewInfo: TcxCustomGridRowViewInfo; -begin - Result := FContainer.RowViewInfo; -end; - -function TcxGridRowFooterViewInfo.CalculateHeight: Integer; -begin - Result := inherited CalculateHeight; - Height := Result; -end; - -function TcxGridRowFooterViewInfo.CalculateWidth: Integer; -begin - Result := inherited CalculateWidth - Indent; -end; - -function TcxGridRowFooterViewInfo.GetColumnWidth(AColumn: TcxGridColumn): Integer; -begin - Result := inherited GetColumnWidth(AColumn); - if AColumn.IsMostLeft then Dec(Result, Indent); -end; - -function TcxGridRowFooterViewInfo.GetHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridGroupFooterHitTest; -end; - -function TcxGridRowFooterViewInfo.GetIsPart: Boolean; -begin - Result := False; -end; - -function TcxGridRowFooterViewInfo.GetItemAreaBounds(AItem: TcxGridColumnHeaderViewInfo): TRect; -begin - Result := Container.GridViewInfo.FooterViewInfo.GetItemAreaBounds(AItem); -end; - -function TcxGridRowFooterViewInfo.GetItemClass: TcxGridColumnHeaderViewInfoClass; -begin - Result := TcxGridRowFooterCellViewInfo; -end; - -function TcxGridRowFooterViewInfo.GetItemHitTestClass: TcxCustomGridHitTestClass; -begin - Result := TcxGridGroupFooterCellHitTest; -end; - -function TcxGridRowFooterViewInfo.GetItemMultiLinePainting(AItem: TcxGridColumnHeaderViewInfo): Boolean; -begin - Result := GridViewInfo.FooterViewInfo.GetItemMultiLinePainting(AItem); -end; - -function TcxGridRowFooterViewInfo.GetSummaryItems: TcxDataSummaryItems; -begin - Result := GridView.FDataController.Summary.GroupSummaryItems[GroupLevel]; -end; - -procedure TcxGridRowFooterViewInfo.GetViewParams(var AParams: TcxViewParams); -begin - GridView.Styles.GetFooterParams(GridRecord, nil, GroupLevel, nil, AParams); -end; - -function TcxGridRowFooterViewInfo.GetVisible: Boolean; -begin - Result := True; -end; - -function TcxGridRowFooterViewInfo.GetVisualLevel: Integer; -begin - Result := Container.GridViewInfo.GetVisualLevel(RowViewInfo.Level - FLevel); -end; - -function TcxGridRowFooterViewInfo.HasSeparator: Boolean; -begin - Result := False; -end; - -procedure TcxGridRowFooterViewInfo.PrepareSummaryItems(ASummaryItems: TList); -begin - GridViewInfo.FooterViewInfo.PrepareSummaryItems(ASummaryItems); -end; - -function TcxGridRowFooterViewInfo.CanShowMultipleSummaries: Boolean; -begin - Result := GridView.OptionsView.CanShowGroupFooterMultiSummaries; -end; - -{ TcxGridRowFootersViewInfo } - -constructor TcxGridRowFootersViewInfo.Create(ARowViewInfo: TcxCustomGridRowViewInfo); -begin - inherited Create; - FRowViewInfo := ARowViewInfo; - FHeight := -1; - CreateItems; -end; - -destructor TcxGridRowFootersViewInfo.Destroy; -begin - DestroyItems; - inherited; -end; - -function TcxGridRowFootersViewInfo.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridRowFootersViewInfo.GetGridViewInfo: TcxGridTableViewInfo; -begin - Result := FRowViewInfo.GridViewInfo; -end; - -function TcxGridRowFootersViewInfo.GetHeight: Integer; -begin - if FHeight = -1 then - FHeight := CalculateHeight; - Result := FHeight; -end; - -function TcxGridRowFootersViewInfo.GetItem(Index: Integer): TcxGridRowFooterViewInfo; -begin - Result := TcxGridRowFooterViewInfo(FItems[Index]); -end; - -function TcxGridRowFootersViewInfo.GetVisibleItem(ALevel: Integer): TcxGridRowFooterViewInfo; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I]; - if Result.Level = ALevel then Exit; - end; - Result := nil; -end; - -procedure TcxGridRowFootersViewInfo.CreateItems; -var - I: Integer; -begin - FItems := TList.Create; - for I := 0 to FRowViewInfo.Level do - if FRowViewInfo.HasFooter(I) then - FItems.Add(GetItemClass.Create(Self, I)); -end; - -procedure TcxGridRowFootersViewInfo.DestroyItems; -var - I: Integer; -begin - for I := 0 to Count - 1 do Items[I].Free; - FItems.Free; -end; - -procedure TcxGridRowFootersViewInfo.BeforeRecalculation; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].BeforeRecalculation; -end; - -procedure TcxGridRowFootersViewInfo.Calculate(ALeftBound, ATopBound: Integer); -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Items[I].Calculate(ALeftBound + Items[I].Indent, ATopBound); - Inc(ATopBound, Items[I].Height); - end; -end; - -function TcxGridRowFootersViewInfo.CalculateHeight: Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - Inc(Result, Items[I].CalculateHeight); -end; - -function TcxGridRowFootersViewInfo.GetItemClass: TcxGridRowFooterViewInfoClass; -begin - Result := TcxGridRowFooterViewInfo; -end; - -function TcxGridRowFootersViewInfo.GetCellBestFitWidth(AColumn: TcxGridColumn): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - Result := Max(Result, Items[I].GetCellBestFitWidth(AColumn)); -end; - -function TcxGridRowFootersViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -var - I: Integer; -begin - Result := nil; - for I := 0 to Count - 1 do - begin - Result := Items[I].GetHitTest(P); - if Result <> nil then Break; - end; -end; - -function TcxGridRowFootersViewInfo.GetTopBound(ALevel: Integer; var ATopBound: Integer): Boolean; -var - I: Integer; -begin - for I := 0 to Count - 1 do - begin - Result := Items[I].Level >= ALevel; - if Result then - begin - ATopBound := Items[I].Bounds.Top; - Exit; - end; - end; - Result := False; -end; - -procedure TcxGridRowFootersViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].DoOffset(DX, DY); -end; - -procedure TcxGridRowFootersViewInfo.Paint; -var - I: Integer; -begin - for I := 0 to Count - 1 do Items[I].Paint; -end; - -{ TcxCustomGridRowViewInfo } - -constructor TcxCustomGridRowViewInfo.Create(ARecordsViewInfo: TcxCustomGridRecordsViewInfo; - ARecord: TcxCustomGridRecord); -begin - inherited; - FIndicatorItem := GridViewInfo.IndicatorViewInfo.AddRowItem(Self); - CreateFootersViewInfo; -end; - -destructor TcxCustomGridRowViewInfo.Destroy; -begin - DestroyFootersViewInfo; - FIndicatorItem.Free; - inherited; -end; - -function TcxCustomGridRowViewInfo.GetCacheItem: TcxGridTableViewInfoCacheItem; -begin - Result := TcxGridTableViewInfoCacheItem(inherited CacheItem); -end; - -function TcxCustomGridRowViewInfo.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxCustomGridRowViewInfo.GetGridLines: TcxGridLines; -begin - Result := RecordsViewInfo.GridLines; -end; - -function TcxCustomGridRowViewInfo.GetGridRecord: TcxCustomGridRow; -begin - Result := TcxCustomGridRow(inherited GridRecord); -end; - -function TcxCustomGridRowViewInfo.GetGridViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited GridViewInfo); -end; - -function TcxCustomGridRowViewInfo.GetLevel: Integer; -begin - Result := GridRecord.Level; -end; - -function TcxCustomGridRowViewInfo.GetLevelIndent: Integer; -begin - Result := VisualLevel * GridViewInfo.LevelIndent; -end; - -function TcxCustomGridRowViewInfo.GetLevelIndentBounds(Index: Integer): TRect; -begin - Result := Bounds; - if Index = -1 then - Result.Right := ContentIndent - else - begin - Inc(Result.Left, GridViewInfo.LevelIndent * Index); - Result.Right := Result.Left + GridViewInfo.LevelIndent; - FootersViewInfo.GetTopBound(Level - Index, Result.Bottom); - end; -end; - -function TcxCustomGridRowViewInfo.GetLevelIndentHorzLineBounds(Index: Integer): TRect; -begin - Result := CalculateLevelIndentHorzLineBounds(Index, LevelIndentBounds[Index]); -end; - -function TcxCustomGridRowViewInfo.GetLevelIndentSpaceBounds(Index: Integer): TRect; -begin - Result := CalculateLevelIndentSpaceBounds(Index, LevelIndentBounds[Index]); -end; - -function TcxCustomGridRowViewInfo.GetLevelIndentVertLineBounds(Index: Integer): TRect; -begin - Result := CalculateLevelIndentVertLineBounds(Index, LevelIndentBounds[Index]); -end; - -function TcxCustomGridRowViewInfo.GetRecordsViewInfo: TcxGridRowsViewInfo; -begin - Result := TcxGridRowsViewInfo(inherited RecordsViewInfo); -end; - -function TcxCustomGridRowViewInfo.GetVisualLevel: Integer; -begin - Result := GridViewInfo.GetVisualLevel(Level); -end; - -procedure TcxCustomGridRowViewInfo.CreateFootersViewInfo; -begin - if HasFooters then - FFootersViewInfo := GetFootersViewInfoClass.Create(Self); -end; - -procedure TcxCustomGridRowViewInfo.DestroyFootersViewInfo; -begin - FFootersViewInfo.Free; -end; - -procedure TcxCustomGridRowViewInfo.RecreateFootersViewInfo; -begin - DestroyFootersViewInfo; - CreateFootersViewInfo; -end; - -procedure TcxCustomGridRowViewInfo.AfterRowsViewInfoCalculate; -begin -end; - -procedure TcxCustomGridRowViewInfo.AfterRowsViewInfoOffset; -begin -end; - -procedure TcxCustomGridRowViewInfo.CalculateExpandButtonBounds(var ABounds: TRect); -begin - if IsRectEmpty(Bounds) then - ABounds := Rect(0, 0, 0, 0) - else - with ABounds do - begin - Inc(Left, GridViewInfo.ExpandButtonIndent); - Right := Left + GridViewInfo.ExpandButtonSize; - Top := (Top + Bottom - GridViewInfo.ExpandButtonSize) div 2; - Bottom := Top + GridViewInfo.ExpandButtonSize; - end; -end; - -function TcxCustomGridRowViewInfo.CalculateHeight: Integer; -begin - Result := BottomPartHeight; -end; - -function TcxCustomGridRowViewInfo.CalculateLevelIndentHorzLineBounds(ALevel: Integer; - const ABounds: TRect): TRect; -begin - Result := ABounds; - with Result do - begin - Top := CalculateLevelIndentSpaceBounds(ALevel, ABounds).Bottom; - Bottom := Top + GridViewInfo.GridLineWidth; - if Bottom > ABounds.Bottom then Bottom := ABounds.Bottom; - end; -end; - -function TcxCustomGridRowViewInfo.CalculateLevelIndentSpaceBounds(ALevel: Integer; - const ABounds: TRect): TRect; -var - AIsParentRecordLast: Boolean; -begin - AIsParentRecordLast := GridRecord.IsParentRecordLast[Level - ALevel - 1]; - Result := ABounds; - if GridLines in [glBoth, glHorizontal] then - Dec(Result.Right, GridViewInfo.GridLineWidth); - if (GridLines <> glNone) and ((GridLines <> glVertical) and AIsParentRecordLast) then - Dec(Result.Bottom, GridViewInfo.GridLineWidth); - if AIsParentRecordLast and not HasAnyFooter(Level - ALevel) then - Dec(Result.Bottom, SeparatorWidth); -end; - -function TcxCustomGridRowViewInfo.CalculateLevelIndentVertLineBounds(ALevel: Integer; - const ABounds: TRect): TRect; -begin - Result := ABounds; - with CalculateLevelIndentSpaceBounds(ALevel, ABounds) do - begin - Result.Left := Right; - Result.Bottom := Bottom; - end; -end; - -function TcxCustomGridRowViewInfo.CalculateWidth: Integer; -begin - Result := 0{Width}; -end; - -function TcxCustomGridRowViewInfo.CanSize: Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridRowViewInfo.CheckRowHeight(var AValue: Integer); -begin - if AValue < 1 then AValue := 1; -end; - -function TcxCustomGridRowViewInfo.GetAutoHeight: Boolean; -begin - Result := RecordsViewInfo.AutoRecordHeight; -end; - -function TcxCustomGridRowViewInfo.GetBaseHeight: Integer; -begin - Result := DataHeight; -end; - -function TcxCustomGridRowViewInfo.GetBottomPartHeight: Integer; -begin - Result := SeparatorWidth; - if HasFooters then - Inc(Result, FFootersViewInfo.Height); - if HasLastHorzGridLine then - Inc(Result, GridViewInfo.GridLineWidth); -end; - -function TcxCustomGridRowViewInfo.GetCellTransparent(ACell: TcxGridTableCellViewInfo): Boolean; -begin - Result := inherited GetCellTransparent(ACell) and not ACell.Selected; -end; - -function TcxCustomGridRowViewInfo.GetContentBounds: TRect; -begin - Result := inherited GetContentBounds; - Result.Left := ContentIndent; - Result.Bottom := Result.Top + DataHeight; -end; - -function TcxCustomGridRowViewInfo.GetContentIndent: Integer; -begin - Result := Bounds.Left + LevelIndent; -end; - -function TcxCustomGridRowViewInfo.GetContentWidth: Integer; -begin - Result := Width - LevelIndent; -end; - -function TcxCustomGridRowViewInfo.GetDataHeight: Integer; -begin - Result := Height - BottomPartHeight; -end; - -function TcxCustomGridRowViewInfo.GetDataIndent: Integer; -begin - Result := ContentIndent; -end; - -function TcxCustomGridRowViewInfo.GetDataWidth: Integer; -begin - Result := ContentWidth; -end; - -function TcxCustomGridRowViewInfo.GetFocusRectBounds: TRect; -begin - Result := inherited GetFocusRectBounds; - Result.Left := DataIndent; - if GridLines <> glNone then - Dec(Result.Right, GridViewInfo.GridLineWidth); - Result.Bottom := Result.Top + DataHeight; - if GridLines in [glBoth, glHorizontal] then - Dec(Result.Bottom, GridViewInfo.GridLineWidth); -end; - -function TcxCustomGridRowViewInfo.GetFootersViewInfoClass: TcxGridRowFootersViewInfoClass; -begin - Result := TcxGridRowFootersViewInfo; -end; - -function TcxCustomGridRowViewInfo.GetLastHorzGridLineBounds: TRect; -begin - Result := Bounds; - Result.Top := Result.Bottom - GridViewInfo.GridLineWidth; -end; - -function TcxCustomGridRowViewInfo.GetMaxHeight: Integer; -begin - Result := Height; -end; - -function TcxCustomGridRowViewInfo.GetNonBaseHeight: Integer; -begin - Result := Height - BaseHeight; -end; - -function TcxCustomGridRowViewInfo.GetRowHeight: Integer; -begin - Result := Height; -end; - -function TcxCustomGridRowViewInfo.GetSeparatorBounds: TRect; -var - ASeparatorVisualLevel: Integer; -begin - with Result do - begin - Left := ContentIndent; - Right := Left + ContentWidth; - ASeparatorVisualLevel := - GridViewInfo.GetVisualLevel(Level - GridRecord.LastParentRecordCount); - Dec(Left, (VisualLevel - ASeparatorVisualLevel) * GridViewInfo.LevelIndent); - Bottom := Bounds.Bottom; - Top := Bottom - SeparatorWidth; - end; -end; - -function TcxCustomGridRowViewInfo.GetSeparatorColor: TColor; -begin - Result := GridView.OptionsView.GetRowSeparatorColor; -end; - -function TcxCustomGridRowViewInfo.GetSeparatorWidth: Integer; -begin - if ShowSeparator then - Result := RecordsViewInfo.SeparatorWidth - else - Result := 0; -end; - -function TcxCustomGridRowViewInfo.GetShowSeparator: Boolean; -begin - Result := True; -end; - -function TcxCustomGridRowViewInfo.GetVisible: Boolean; -begin - Result := Index < RecordsViewInfo.PartVisibleCount; -end; - -function TcxCustomGridRowViewInfo.GetWidth: Integer; -begin - Result := RecordsViewInfo.RowWidth; -end; - -function TcxCustomGridRowViewInfo.HasAnyFooter(ALevel: Integer): Boolean; -var - AFooterTopBound: Integer; -begin - Result := FootersViewInfo.GetTopBound(ALevel, AFooterTopBound); -end; - -function TcxCustomGridRowViewInfo.HasFooter(ALevel: Integer): Boolean; -begin - if GridView.OptionsView.GroupFooters = gfInvisible then - Result := False - else - begin - if GridView.OptionsView.GroupFooters = gfAlwaysVisible then - Dec(ALevel); - Result := (0 <= ALevel) and (ALevel < Level) and - GridRecord.IsParentRecordLast[ALevel] and - GridView.GroupedColumns[Level - 1 - ALevel].CanShowGroupFooters; - end; -end; - -function TcxCustomGridRowViewInfo.HasFooters: Boolean; -begin - Result := True; -end; - -function TcxCustomGridRowViewInfo.HasLastHorzGridLine: Boolean; -begin - Result := RecordsViewInfo.HasLastHorzGridLine(Self) and GridRecord.IsLast; -end; - -function TcxCustomGridRowViewInfo.IsFullyVisible: Boolean; -begin - Result := Height = MaxHeight; -end; - -procedure TcxCustomGridRowViewInfo.Offset(DX, DY: Integer); -begin - inherited; - FIndicatorItem.DoOffset(0, DY); - if HasFooters then - FFootersViewInfo.Offset(DX, DY); -end; - -procedure TcxCustomGridRowViewInfo.BeforeRecalculation; -begin - inherited; - if HasFooters then - FFootersViewInfo.BeforeRecalculation; -end; - -procedure TcxCustomGridRowViewInfo.Calculate(ALeftBound, ATopBound: Integer; - AWidth: Integer = -1; AHeight: Integer = -1); -begin - RecreateFootersViewInfo; - inherited; - GridViewInfo.IndicatorViewInfo.CalculateRowItem(Self, FIndicatorItem); - if HasFooters then - FFootersViewInfo.Calculate(Bounds.Left, ATopBound + Height - BottomPartHeight); -end; - -function TcxCustomGridRowViewInfo.Click(AHitTest: TcxCustomGridHitTest; AButton: TMouseButton; - AShift: TShiftState): Boolean; -var - AGridRecord: TcxCustomGridRow; -begin - AGridRecord := GridRecord; - Result := inherited Click(AHitTest, AButton, AShift); - if Result and (ssDouble in AShift) and AGridRecord.ExpandOnDblClick then - AGridRecord.ToggleExpanded; -end; - -function TcxCustomGridRowViewInfo.GetBoundsForInvalidate(AItem: TcxCustomGridTableItem): TRect; -var - R: TRect; -begin - Result := inherited GetBoundsForInvalidate(AItem); - if AItem = nil then - with GridViewInfo.IndicatorViewInfo do - if Visible then - begin - R := GetRowItemBounds(GridRecord); - if R.Left < Result.Left then Result.Left := R.Left; - end; -end; - -function TcxCustomGridRowViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - if HasFooters then - Result := FFootersViewInfo.GetHitTest(P) - else - Result := nil; - if Result = nil then - begin - Result := inherited GetHitTest(P); - if (Result <> nil) and PtInRect(LevelIndentBounds[-1], P) then - begin - Result := TcxGridRowLevelIndentHitTest.Instance(P); - InitHitTest(Result); - end; - end; -end; - -function TcxCustomGridRowViewInfo.HasSeparator: Boolean; -begin - Result := SeparatorWidth <> 0; -end; - -{ TcxGridRowsViewInfo } - -destructor TcxGridRowsViewInfo.Destroy; -begin - FFilterRowViewInfo.Free; - FNewItemRowViewInfo.Free; - inherited; -end; - -function TcxGridRowsViewInfo.GetFilterRowViewInfo: TcxCustomGridRowViewInfo; -begin - Result := FFilterRowViewInfo; - if (Result <> nil) and (Result.GridRecord = nil) then - Result := nil; -end; - -function TcxGridRowsViewInfo.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridRowsViewInfo.GetGridLines: TcxGridLines; -begin - Result := GridViewInfo.GridLines; -end; - -function TcxGridRowsViewInfo.GetGridViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited GridViewInfo); -end; - -function TcxGridRowsViewInfo.GetHeaderViewInfo: TcxGridHeaderViewInfo; -begin - Result := GridViewInfo.HeaderViewInfo; -end; - -function TcxGridRowsViewInfo.GetItem(Index: Integer): TcxCustomGridRowViewInfo; -begin - Result := TcxCustomGridRowViewInfo(inherited Items[Index]); -end; - -function TcxGridRowsViewInfo.GetNewItemRowViewInfo: TcxCustomGridRowViewInfo; -begin - Result := FNewItemRowViewInfo; - if (Result <> nil) and (Result.GridRecord = nil) then - Result := nil; -end; - -function TcxGridRowsViewInfo.GetPainterClassValue: TcxGridRowsPainterClass; -begin - Result := TcxGridRowsPainterClass(GetPainterClass); -end; - -function TcxGridRowsViewInfo.GetViewData: TcxGridViewData; -begin - Result := TcxGridViewData(inherited ViewData); -end; - -procedure TcxGridRowsViewInfo.AfterCalculate; -begin - NotifyItemsCalculationFinished; - inherited; -end; - -procedure TcxGridRowsViewInfo.AfterOffset; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].AfterRowsViewInfoOffset; - NotifyItemsCalculationFinished; - inherited; -end; - -procedure TcxGridRowsViewInfo.Calculate; - - procedure CalculateItems; - var - I: Integer; - begin - for I := 0 to FPartVisibleCount - 1 do - Items[I].MainCalculate(GetItemLeftBound(I), GetItemTopBound(I)); - end; - -var - ATopBound: Integer; -begin - CalculateConsts; - inherited; - if GridViewInfo.CalculateDown then - begin - ATopBound := Bounds.Top; - if HasFilterRow then - begin - FilterRowViewInfo.MainCalculate(ContentBounds.Left, ATopBound); - Inc(ATopBound, FilterRowViewInfo.Height); - end; - if HasNewItemRow then - NewItemRowViewInfo.MainCalculate(ContentBounds.Left, ATopBound); - end; - CalculateVisibleCount; - if GridViewInfo.CalculateDown and (FirstRecordIndex <> -1) then - CalculateItems; -end; - -function TcxGridRowsViewInfo.CalculateBounds: TRect; -begin - Result := inherited CalculateBounds; - if IsScrollable then - Dec(Result.Left, GridViewInfo.LeftPos); - Result.Right := Result.Left + RowWidth; -end; - -procedure TcxGridRowsViewInfo.CalculateConsts; -begin - FRowHeight := CalculateRowHeight; - FDataRowHeight := CalculateDataRowHeight; - FGroupRowHeight := CalculateGroupRowHeight; -end; - -function TcxGridRowsViewInfo.CalculateContentBounds: TRect; -begin - Result := inherited CalculateContentBounds; - if HasFilterRow then - Inc(Result.Top, FilterRowViewInfo.Height); - if HasNewItemRow then - Inc(Result.Top, NewItemRowViewInfo.Height); -end; - -function TcxGridRowsViewInfo.CalculateDataRowHeight: Integer; -begin - Result := FRowHeight; -end; - -function TcxGridRowsViewInfo.CalculateGroupRowDefaultHeight(AMinHeight: Boolean): Integer; -var - AParams: TcxViewParams; -begin - GridView.Styles.GetGroupParams(nil, 0, AParams); - Result := CalculateCustomGroupRowHeight(AMinHeight, AParams); -end; - -function TcxGridRowsViewInfo.CalculateGroupRowHeight: Integer; -begin - Result := GridView.OptionsView.GroupRowHeight; - if Result = 0 then - Result := CalculateGroupRowDefaultHeight(False); -end; - -function TcxGridRowsViewInfo.CalculateRestHeight(ATopBound: Integer): Integer; -begin - Result := ContentBounds.Bottom - ATopBound; - {if not GridViewInfo.IsCalculating or GridViewInfo.CalculateDown then - Result := ContentBounds.Bottom - ATopBound - else - Result := MaxInt - 100000;} -end; - -function TcxGridRowsViewInfo.CalculateRowDefaultHeight: Integer; -var - I, AFontHeight: Integer; - AParams: TcxViewParams; -begin - if GridView.VisibleColumnCount = 0 then - begin - GridView.Styles.GetContentParams(nil, nil, AParams); - Result := GridViewInfo.GetFontHeight(AParams.Font); - GetCellTextAreaSize(Result); - end - else - begin - Result := 0; - for I := 0 to HeaderViewInfo.Count - 1 do - begin - GridView.Styles.GetDataCellParams(nil, HeaderViewInfo[I].Column, AParams); - AFontHeight := HeaderViewInfo[I].Column.CalculateDefaultCellHeight(Canvas, AParams.Font); - if AFontHeight > Result then Result := AFontHeight; - end; - end; - Result := GetCellHeight(Result); -end; - -function TcxGridRowsViewInfo.CalculateRowHeight: Integer; -begin - if IsDataRowHeightAssigned then - Result := GridView.OptionsView.DataRowHeight - else - Result := CalculateRowDefaultHeight; -end; - -procedure TcxGridRowsViewInfo.CalculateVisibleCount; -var - ALastBottom, I, AHeight: Integer; -begin - inherited; - FPartVisibleCount := 0; - FIsFirstRowFullyVisible := True; - if FirstRecordIndex = -1 then Exit; - - ALastBottom := ContentBounds.Top; - for I := 0 to MaxCount - 1 do - begin - Inc(FPartVisibleCount); - FRestHeight := CalculateRestHeight(ALastBottom); - AHeight := Items[I].MaxHeight; - Inc(ALastBottom, AHeight); - if ALastBottom > ContentBounds.Bottom then Break; - Inc(FVisibleCount); - if ALastBottom = ContentBounds.Bottom then Break; - end; - - if MaxCount > 0 then - begin - if (FVisibleCount = FPartVisibleCount) and - (GridViewInfo.CalculateDown and not Items[FVisibleCount - 1].IsFullyVisible or - not GridViewInfo.CalculateDown and not Items[0].IsFullyVisible) then - Dec(FVisibleCount); - if FVisibleCount = 0 then - begin - FVisibleCount := 1; - FIsFirstRowFullyVisible := False; - end; - end; -end; - -function TcxGridRowsViewInfo.GetAutoDataCellHeight: Boolean; -begin - Result := inherited GetAutoDataCellHeight and - GridViewInfo.SupportsAutoHeight and - (not IsDataRowHeightAssigned or GridView.IsGetCellHeightAssigned); -end; - -function TcxGridRowsViewInfo.GetCommonDataRowHeight: Integer; -begin - Result := FDataRowHeight + SeparatorWidth; -end; - -function TcxGridRowsViewInfo.GetFilterRowViewInfoClass: TcxCustomGridRowViewInfoClass; -begin - Result := TcxGridFilterRowViewInfo; -end; - -function TcxGridRowsViewInfo.GetGroupBackgroundBitmap: TBitmap; -begin - Result := GridView.BackgroundBitmaps.GetBitmap(bbGroup); -end; - -function TcxGridRowsViewInfo.GetGroupRowSeparatorWidth: Integer; -begin - if GridView.OptionsView.GroupRowStyle = grsOffice11 then - Result := cxGridOffice11GroupRowSeparatorWidth - else - Result := 0; -end; - -function TcxGridRowsViewInfo.GetItemLeftBound(AIndex: Integer): Integer; -begin - Result := ContentBounds.Left; -end; - -function TcxGridRowsViewInfo.GetItemsOffset(AItemCountDelta: Integer): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Abs(AItemCountDelta) - 1 do - Inc(Result, Items[I].Height); - if AItemCountDelta > 0 then - Result := -Result; -end; - -function TcxGridRowsViewInfo.GetItemTopBound(AIndex: Integer): Integer; -begin - if AIndex = 0 then - Result := ContentBounds.Top - else - Result := Items[AIndex - 1].Bounds.Bottom; -end; - -function TcxGridRowsViewInfo.GetIsScrollable: Boolean; -begin - Result := HeaderViewInfo.IsScrollable; -end; - -function TcxGridRowsViewInfo.GetNewItemRowViewInfoClass: TcxCustomGridRowViewInfoClass; -begin - Result := TcxGridNewItemRowViewInfo; -end; - -function TcxGridRowsViewInfo.GetPainterClass: TcxCustomGridRecordsPainterClass; -begin - Result := TcxGridRowsPainter; -end; - -function TcxGridRowsViewInfo.GetRowWidth: Integer; -begin - Result := GridViewInfo.DataWidth; -end; - -function TcxGridRowsViewInfo.GetSeparatorWidth: Integer; -begin - Result := GridView.OptionsView.RowSeparatorWidth; -end; - -function TcxGridRowsViewInfo.HasFilterRow: Boolean; -begin - Result := FilterRowViewInfo <> nil; -end; - -function TcxGridRowsViewInfo.HasLastHorzGridLine(ARowViewInfo: TcxCustomGridRowViewInfo): Boolean; -begin - Result := (GridLines = glVertical) and - ((ARowViewInfo = nil) and (SeparatorWidth = 0) or - (ARowViewInfo <> nil) and not ARowViewInfo.HasSeparator); -end; - -function TcxGridRowsViewInfo.HasNewItemRow: Boolean; -begin - Result := NewItemRowViewInfo <> nil; -end; - -function TcxGridRowsViewInfo.IsFilterRowVisible: Boolean; -begin - Result := GridView.FilterRow.Visible; -end; - -function TcxGridRowsViewInfo.IsNewItemRowVisible: Boolean; -begin - Result := GridView.NewItemRow.Visible; -end; - -procedure TcxGridRowsViewInfo.NotifyItemsCalculationFinished; -var - I: Integer; -begin - for I := 0 to Count - 1 do - Items[I].AfterRowsViewInfoCalculate; -end; - -procedure TcxGridRowsViewInfo.OffsetItem(AIndex, AOffset: Integer); -begin - Items[AIndex].DoOffset(0, AOffset); -end; - -procedure TcxGridRowsViewInfo.AfterConstruction; -begin - inherited; - if IsFilterRowVisible then - FFilterRowViewInfo := GetFilterRowViewInfoClass.Create(Self, ViewData.FilterRow); - if IsNewItemRowVisible then - FNewItemRowViewInfo := GetNewItemRowViewInfoClass.Create(Self, ViewData.NewItemRow); -end; - -function TcxGridRowsViewInfo.CalculateCustomGroupRowHeight(AMinHeight: Boolean; - AParams: TcxViewParams): Integer; -begin - Result := Max(GridViewInfo.GetFontHeight(AParams.Font), GridViewInfo.ExpandButtonSize); - GetCellTextAreaSize(Result); - if GridView.OptionsView.GroupRowStyle = grsStandard then - Result := GetCellHeight(Result) - else - begin - if not AMinHeight then - Result := 2 * Result; - Inc(Result, GroupRowSeparatorWidth); - end; -end; - -function TcxGridRowsViewInfo.CanDataRowSize: Boolean; -begin - Result := GridViewInfo.SupportsAutoHeight and GridView.OptionsCustomize.DataRowSizing; -end; - -function TcxGridRowsViewInfo.GetCellHeight(ACellContentHeight: Integer): Integer; -begin - Result := inherited GetCellHeight(ACellContentHeight); - if GridLines in [glBoth, glHorizontal] then - Inc(Result, GridViewInfo.GridLineWidth); -end; - -function TcxGridRowsViewInfo.GetDataRowCellsAreaViewInfoClass: TClass; -begin - Result := TcxGridDataRowCellsAreaViewInfo; -end; - -function TcxGridRowsViewInfo.GetFooterCellBestFitWidth(AColumn: TcxGridColumn): Integer; -var - I: Integer; -begin - Result := 0; - for I := 0 to Count - 1 do - if Items[I].HasFooters then - Result := Max(Result, Items[I].FootersViewInfo.GetCellBestFitWidth(AColumn)); -end; - -function TcxGridRowsViewInfo.GetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - Result := inherited GetHitTest(P); - if Result = nil then - begin - if HasFilterRow then - Result := FilterRowViewInfo.GetHitTest(P); - if (Result = nil) and HasNewItemRow then - Result := NewItemRowViewInfo.GetHitTest(P); - end; -end; - -function TcxGridRowsViewInfo.GetRealItem(ARecord: TcxCustomGridRecord): TcxCustomGridRecordViewInfo; -begin - if ViewData.HasFilterRow and (ARecord = ViewData.FilterRow) then - Result := FilterRowViewInfo - else - if ViewData.HasNewItemRecord and ARecord.IsNewItemRecord then - Result := NewItemRowViewInfo - else - Result := inherited GetRealItem(ARecord); -end; - -function TcxGridRowsViewInfo.GetRestHeight(ATopBound: Integer): Integer; -begin - if GridViewInfo.IsCalculating then - Result := FRestHeight - else - Result := CalculateRestHeight(ATopBound); -end; - -function TcxGridRowsViewInfo.IsCellMultiLine(AItem: TcxCustomGridTableItem): Boolean; -begin - Result := inherited IsCellMultiLine(AItem) or IsDataRowHeightAssigned; -end; - -function TcxGridRowsViewInfo.IsDataRowHeightAssigned: Boolean; -begin - Result := GridViewInfo.SupportsAutoHeight and (GridView.OptionsView.DataRowHeight <> 0); -end; - -procedure TcxGridRowsViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - inherited; - if HasFilterRow then - FilterRowViewInfo.DoOffset(DX, 0); - if HasNewItemRow then - NewItemRowViewInfo.DoOffset(DX, 0); - for I := 0 to Count - 1 do - Items[I].DoOffset(DX, 0); -end; - -{ TcxGridTableViewInfo } - -function TcxGridTableViewInfo.GetController: TcxGridTableController; -begin - Result := TcxGridTableController(inherited Controller); -end; - -function TcxGridTableViewInfo.GetDataWidth: Integer; -begin - if FDataWidth = 0 then - FDataWidth := CalculateDataWidth; - Result := FDataWidth; -end; - -function TcxGridTableViewInfo.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridTableViewInfo.GetGridLineColor: TColor; -begin - Result := GridView.OptionsView.GetGridLineColor; -end; - -function TcxGridTableViewInfo.GetGridLines: TcxGridLines; -begin - Result := GridView.OptionsView.GridLines; -end; - -function TcxGridTableViewInfo.GetLeftPos: Integer; -begin - Result := Controller.LeftPos; -end; - -function TcxGridTableViewInfo.GetLevelIndentBackgroundBitmap: TBitmap; -begin - Result := RecordsViewInfo.GroupBackgroundBitmap; -end; - -function TcxGridTableViewInfo.GetLevelIndentColor(Index: Integer): TColor; -var - AParams: TcxViewParams; -begin - GridView.Styles.GetGroupParams(nil, Index, AParams); - Result := AParams.Color; -end; - -function TcxGridTableViewInfo.GetRecordsViewInfo: TcxGridRowsViewInfo; -begin - Result := TcxGridRowsViewInfo(inherited RecordsViewInfo); -end; - -function TcxGridTableViewInfo.GetViewData: TcxGridViewData; -begin - Result := TcxGridViewData(inherited ViewData); -end; - -procedure TcxGridTableViewInfo.AfterCalculating; -begin - if Visible and (RecordsViewInfo.DataRowHeight <> FPrevDataRowHeight) then - Controller.PostGridModeBufferCountUpdate; - inherited; -end; - -procedure TcxGridTableViewInfo.BeforeCalculating; -begin - inherited; - CalculateExpandButtonParams; - if Visible then - FPrevDataRowHeight := RecordsViewInfo.DataRowHeight; -end; - -procedure TcxGridTableViewInfo.CreateViewInfos; - - function GetFilterViewInfoIndex: Integer; - begin - if FilterViewInfo.Alignment = gpaTop then - Result := FHeaderViewInfo.Index - else - Result := FFooterViewInfo.Index; - end; - -begin -// inherited; - because of new item row view info in banded view - FGroupByBoxViewInfo := GetGroupByBoxViewInfoClass.Create(Self); - FHeaderViewInfo := GetHeaderViewInfoClass.Create(Self); - FFooterViewInfo := GetFooterViewInfoClass.Create(Self); - FIndicatorViewInfo := GetIndicatorViewInfoClass.Create(Self); - inherited; - FilterViewInfo.Index := GetFilterViewInfoIndex; -end; - -procedure TcxGridTableViewInfo.DestroyViewInfos(AIsRecreating: Boolean); -begin - inherited; - FreeAndNil(FIndicatorViewInfo); - FreeAndNil(FFooterViewInfo); - FreeAndNil(FHeaderViewInfo); - FreeAndNil(FGroupByBoxViewInfo); -// inherited; -end; - -{var - max: integer;} - -procedure TcxGridTableViewInfo.Calculate; -(*var - ft,lt{,i}: Integer;*) -begin - //ft := gettickcount; - -//for I := 1 to 10 do - - try - RecreateViewInfos; - CalculateParts; - ClientBounds := CalculateClientBounds; - IndicatorViewInfo.Calculate(Bounds.Left, ClientBounds.Top - HeaderViewInfo.Height); - finally - inherited; - end; - -(*if CalculateDown then -begin - lt := gettickcount; - //if lt - ft > max then max := lt - ft; - //if TcxGridLevel(GridView.Level).IsTop then - application.MainForm.Caption := - //inttostr(max); - inttostr(lt - ft); -end;*) -end; - -function TcxGridTableViewInfo.CalculateClientBounds: TRect; -begin - Result := inherited CalculateClientBounds; - Inc(Result.Left, IndicatorViewInfo.Width); -end; - -function TcxGridTableViewInfo.CalculateDataWidth: Integer; -begin - Result := HeaderViewInfo.Width; - if (Result = 0) and GridView.OptionsView.ColumnAutoWidth then - Result := ClientWidth; -end; - -procedure TcxGridTableViewInfo.CalculateExpandButtonParams; -begin - FExpandButtonIndent := 3; - FLevelIndent := FExpandButtonIndent + ExpandButtonSize + FExpandButtonIndent; -end; - -procedure TcxGridTableViewInfo.CalculateHeight(const AMaxSize: TPoint; - var AHeight: Integer; var AFullyVisible: Boolean); -begin - MainCalculate(Classes.Bounds( - cxGridInvisibleCoordinate, 0, AMaxSize.X, AMaxSize.Y)); - if VisibleRecordCount = 0 then - AHeight := GetNonRecordsAreaHeight(False) + RecordsViewInfo.DataRowHeight - else - AHeight := RecordsViewInfo.Items[RecordsViewInfo.Count - 1].Bounds.Bottom + - PartsBottomHeight; - AFullyVisible := (VisibleRecordCount = 0) or - (VisibleRecordCount = ViewData.RowCount - FirstRecordIndex) and - Controller.IsDataFullyVisible(True); - inherited; -end; - -function TcxGridTableViewInfo.CalculatePartBounds(APart: TcxCustomGridPartViewInfo): TRect; -begin - Result := inherited CalculatePartBounds(APart); - if APart.IsScrollable then - OffsetRect(Result, -LeftPos, 0); -end; - -procedure TcxGridTableViewInfo.CalculateParts; -begin - GroupByBoxViewInfo.MainCalculate; - FilterViewInfo.MainCalculate; - HeaderViewInfo.MainCalculate; - FooterViewInfo.MainCalculate; -end; - -function TcxGridTableViewInfo.CalculateVisibleEqualHeightRecordCount: Integer; -begin - Result := (Bounds.Bottom - Bounds.Top - GetNonRecordsAreaHeight(False)) div - RecordsViewInfo.CommonDataRowHeight; -end; - -procedure TcxGridTableViewInfo.CalculateWidth(const AMaxSize: TPoint; var AWidth: Integer); -begin - if GridView.OptionsView.ColumnAutoWidth then - with Site.ClientBounds do - AWidth := Right - Left - else - AWidth := IndicatorViewInfo.Width + DataWidth; - inherited; -end; - -function TcxGridTableViewInfo.DoGetHitTest(const P: TPoint): TcxCustomGridHitTest; -begin - if PtInRect(Site.ClientBounds, P) then - begin - Result := IndicatorViewInfo.GetHitTest(P); - if Result <> nil then Exit; - end; - Result := inherited DoGetHitTest(P); -end; - -function TcxGridTableViewInfo.GetDefaultGridModeBufferCount: Integer; -begin - if RecordsViewInfo.DataRowHeight = 0 then - begin - Controller.PostGridModeBufferCountUpdate; - Result := 0; - end - else - Result := Screen.Height div RecordsViewInfo.DataRowHeight + 2; -end; - -function TcxGridTableViewInfo.GetFirstItemAdditionalWidth: Integer; -begin - Result := VisualLevelCount * LevelIndent; -end; - -function TcxGridTableViewInfo.GetGridLineWidth: Integer; -begin - Result := 1; -end; - -function TcxGridTableViewInfo.GetLevelSeparatorColor: TColor; -begin - Result := GridLineColor; -end; - -function TcxGridTableViewInfo.GetNonRecordsAreaHeight(ACheckScrollBar: Boolean): Integer; -begin - Result := inherited GetNonRecordsAreaHeight(ACheckScrollBar); - with RecordsViewInfo do - begin - if HasFilterRow then - Inc(Result, FilterRowViewInfo.Height); - if HasNewItemRow then - Inc(Result, NewItemRowViewInfo.Height); - end; -end; - -function TcxGridTableViewInfo.GetScrollableAreaBoundsHorz: TRect; -begin - Result := inherited GetScrollableAreaBoundsHorz; - Dec(Result.Top, HeaderViewInfo.Height); - Inc(Result.Bottom, FooterViewInfo.Height); -end; - -function TcxGridTableViewInfo.GetScrollableAreaBoundsVert: TRect; -begin - Result := inherited GetScrollableAreaBoundsVert; - Dec(Result.Left, IndicatorViewInfo.Width); - Result.Top := RecordsViewInfo.ContentBounds.Top; -end; - -function TcxGridTableViewInfo.GetVisualLevelCount: Integer; -begin - Result := GridView.GroupedColumnCount; - if (Result <> 0) and (GridView.OptionsView.GroupRowStyle = grsOffice11) then - Dec(Result); - if GridView.IsMaster then Inc(Result); -end; - -procedure TcxGridTableViewInfo.Offset(DX, DY: Integer); -var - I: Integer; -begin - for I := 0 to PartCount - 1 do - with Parts[I] do - if IsScrollable then DoOffset(DX, 0); - inherited; -end; - -procedure TcxGridTableViewInfo.RecreateViewInfos; -begin - FDataWidth := 0; - inherited; -end; - -function TcxGridTableViewInfo.SupportsAutoHeight: Boolean; -begin - Result := True; -end; - -function TcxGridTableViewInfo.SupportsGroupSummariesAlignedWithColumns: Boolean; -begin - Result := True; -end; - -function TcxGridTableViewInfo.SupportsMultipleFooterSummaries: Boolean; -begin - Result := True; -end; - -function TcxGridTableViewInfo.GetFooterPainterClass: TcxGridFooterPainterClass; -begin - Result := TcxGridFooterPainter; -end; - -function TcxGridTableViewInfo.GetFooterViewInfoClass: TcxGridFooterViewInfoClass; -begin - Result := TcxGridFooterViewInfo; -end; - -function TcxGridTableViewInfo.GetGroupByBoxViewInfoClass: TcxGridGroupByBoxViewInfoClass; -begin - Result := TcxGridGroupByBoxViewInfo; -end; - -function TcxGridTableViewInfo.GetHeaderViewInfoClass: TcxGridHeaderViewInfoClass; -begin - Result := TcxGridHeaderViewInfo; -end; - -function TcxGridTableViewInfo.GetIndicatorViewInfoClass: TcxGridIndicatorViewInfoClass; -begin - Result := TcxGridIndicatorViewInfo; -end; - -function TcxGridTableViewInfo.GetHeaderViewInfoSpecificClass: TcxGridHeaderViewInfoSpecificClass; -begin - Result := TcxGridHeaderViewInfoSpecific; -end; - -function TcxGridTableViewInfo.GetRecordsViewInfoClass: TcxCustomGridRecordsViewInfoClass; -begin - Result := TcxGridRowsViewInfo; -end; - -function TcxGridTableViewInfo.GetCellBorders(AIsRight, AIsBottom: Boolean): TcxBorders; -begin - case GridLines of - glBoth: - Result := [bRight, bBottom]; - glNone: - Result := []; - glVertical: - Result := [bRight]; - glHorizontal: - begin - if AIsRight then - Result := [bRight] - else - Result := []; - Include(Result, bBottom); - end; - end; -end; - -function TcxGridTableViewInfo.GetCellHeight(AIndex, ACellHeight: Integer): Integer; -begin - Result := ACellHeight; -end; - -function TcxGridTableViewInfo.GetCellTopOffset(AIndex, ACellHeight: Integer): Integer; -begin - Result := 0; -end; - -function TcxGridTableViewInfo.GetOffsetBounds(AItemsOffset: Integer; out AUpdateBounds: TRect): TRect; -begin - Result := ScrollableAreaBoundsVert; - AUpdateBounds := Result; - if AItemsOffset < 0 then - begin - Inc(Result.Top, -AItemsOffset); - with RecordsViewInfo do - if VisibleCount >= 2 then - Result.Bottom := Items[VisibleCount - 2].Bounds.Bottom; - AUpdateBounds.Top := Result.Bottom + AItemsOffset; - end - else - begin - Dec(Result.Bottom, AItemsOffset); - with RecordsViewInfo do - if PartVisibleCount >= 2 then - Result.Top := Items[1].Bounds.Top; - AUpdateBounds.Bottom := Result.Top + AItemsOffset; - end; -end; - -function TcxGridTableViewInfo.GetOffsetBounds(DX, DY: Integer; out AUpdateBounds: TRect): TRect; -begin - Result := ScrollableAreaBoundsHorz; - AUpdateBounds := Result; - if DX < 0 then - begin - Inc(Result.Left, -DX); - AUpdateBounds.Left := Max(AUpdateBounds.Left, AUpdateBounds.Right + DX); - end - else - begin - Dec(Result.Right, DX); - AUpdateBounds.Right := Min(AUpdateBounds.Left + DX, AUpdateBounds.Right); - end; -end; - -function TcxGridTableViewInfo.GetVisualLevel(ALevel: Integer): Integer; -begin - Result := ALevel; - if (Result <> 0) and (Result = GridView.GroupedColumnCount) and - (GridView.OptionsView.GroupRowStyle = grsOffice11) then - Dec(Result); -end; - -function TcxGridTableViewInfo.GetNearestPopupHeight(AHeight: Integer; - AAdditionalRecord: Boolean = False): Integer; -var - ARowCount: Integer; -begin - ARowCount := (AHeight - GetNonRecordsAreaHeight(True)) div RecordsViewInfo.DataRowHeight; - if ARowCount < 1 then ARowCount := 1; - if ARowCount > ViewData.RowCount + Ord(AAdditionalRecord) then - ARowCount := ViewData.RowCount + Ord(AAdditionalRecord); - Result := GetNonRecordsAreaHeight(True) + ARowCount * RecordsViewInfo.DataRowHeight; -end; - -function TcxGridTableViewInfo.GetPopupHeight(ADropDownRowCount: Integer): Integer; -begin - Result := GetNonRecordsAreaHeight(True) + ADropDownRowCount * RecordsViewInfo.DataRowHeight; - if GridLines in [glNone, glVertical] then - Inc(Result, GridLineWidth); -end; - -{ TcxGridTableViewInfoCacheItem } - -procedure TcxGridTableViewInfoCacheItem.SetPreviewHeight(Value: Integer); -begin - FPreviewHeight := Value; - IsPreviewHeightAssigned := True; -end; - -procedure TcxGridTableViewInfoCacheItem.UnassignValues(AKeepMaster: Boolean); -begin - inherited; - IsPreviewHeightAssigned := False; -end; - -{ TcxGridMasterTableViewInfoCacheItem } - -destructor TcxGridMasterTableViewInfoCacheItem.Destroy; -begin - if IsDetailsSiteCachedInfoAssigned then - FreeAndNil(DetailsSiteCachedInfo); - inherited; -end; - -function TcxGridMasterTableViewInfoCacheItem.GetGridRecord: TcxGridMasterDataRow; -begin - Result := TcxGridMasterDataRow(inherited GridRecord); -end; - -function TcxGridMasterTableViewInfoCacheItem.GetIsDetailsSiteCachedInfoAssigned: Boolean; -begin - Result := DetailsSiteCachedInfo <> nil; -end; - -procedure TcxGridMasterTableViewInfoCacheItem.SetDetailsSiteFullyVisible(Value: Boolean); -begin - FDetailsSiteFullyVisible := Value; - IsDetailsSiteFullyVisibleAssigned := True; -end; - -procedure TcxGridMasterTableViewInfoCacheItem.SetDetailsSiteHeight(Value: Integer); -begin - FDetailsSiteHeight := Value; - IsDetailsSiteHeightAssigned := True; -end; - -procedure TcxGridMasterTableViewInfoCacheItem.SetDetailsSiteNormalHeight(Value: Integer); -begin - FDetailsSiteNormalHeight := Value; - IsDetailsSiteNormalHeightAssigned := True; -end; - -procedure TcxGridMasterTableViewInfoCacheItem.SetDetailsSiteWidth(Value: Integer); -begin - FDetailsSiteWidth := Value; - IsDetailsSiteWidthAssigned := True; -end; - -procedure TcxGridMasterTableViewInfoCacheItem.UnassignValues(AKeepMaster: Boolean); -begin - if FUnassigningValues then Exit; - FUnassigningValues := True; - try - inherited; - IsDetailsSiteFullyVisibleAssigned := False; - IsDetailsSiteHeightAssigned := False; - IsDetailsSiteNormalHeightAssigned := False; - IsDetailsSiteWidthAssigned := False; - if GridRecord.InternalActiveDetailGridViewExists and - (GridRecord.InternalActiveDetailGridView.ViewInfoCache <> nil) then - GridRecord.InternalActiveDetailGridView.ViewInfoCache.UnassignValues(AKeepMaster); - finally - FUnassigningValues := False; - end; -end; - -{ TcxGridColumnOptions } - -constructor TcxGridColumnOptions.Create(AItem: TcxCustomGridTableItem); -begin - inherited; - FGroupFooters := True; - FHorzSizing := True; -end; - -function TcxGridColumnOptions.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -procedure TcxGridColumnOptions.SetCellMerging(Value: Boolean); -begin - if FCellMerging <> Value then - begin - FCellMerging := Value; - Changed; - end; -end; - -procedure TcxGridColumnOptions.SetGroupFooters(Value: Boolean); -begin - if FGroupFooters <> Value then - begin - FGroupFooters := Value; - Changed(ticSize); - end; -end; - -procedure TcxGridColumnOptions.SetHorzSizing(Value: Boolean); -begin - if FHorzSizing <> Value then - begin - FHorzSizing := Value; - Changed; - end; -end; - -procedure TcxGridColumnOptions.Assign(Source: TPersistent); -begin - if Source is TcxGridColumnOptions then - with TcxGridColumnOptions(Source) do - begin - Self.CellMerging := CellMerging; - Self.GroupFooters := GroupFooters; - Self.HorzSizing := HorzSizing; - end; - inherited; -end; - -{ TcxGridRowFooterCellPos } - -type - TcxGridRowFooterCellPos = class - public - Column: TcxGridColumn; - FooterGroupLevel: Integer; - Row: TcxCustomGridRow; - SummaryItem: TcxDataSummaryItem; - constructor Create(ARow: TcxCustomGridRow; AColumn: TcxGridColumn; - AFooterGroupLevel: Integer; ASummaryItem: TcxDataSummaryItem); - end; - -constructor TcxGridRowFooterCellPos.Create(ARow: TcxCustomGridRow; AColumn: TcxGridColumn; - AFooterGroupLevel: Integer; ASummaryItem: TcxDataSummaryItem); -begin - inherited Create; - Row := ARow; - Column := AColumn; - FooterGroupLevel := AFooterGroupLevel; - SummaryItem := ASummaryItem; -end; - -{ TcxGridGroupSummaryInfo } - -type - TcxGridGroupSummaryInfo = class - public - Row: TcxGridGroupRow; - SummaryItem: TcxDataSummaryItem; - constructor Create(ARow: TcxGridGroupRow; ASummaryItem: TcxDataSummaryItem); - end; - -constructor TcxGridGroupSummaryInfo.Create(ARow: TcxGridGroupRow; ASummaryItem: TcxDataSummaryItem); -begin - inherited Create; - Row := ARow; - SummaryItem := ASummaryItem; -end; - -{ TcxGridColumnStyles } - -function TcxGridColumnStyles.GetGridViewValue: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridColumnStyles.GetItem: TcxGridColumn; -begin - Result := TcxGridColumn(inherited Item); -end; - -procedure TcxGridColumnStyles.SetOnGetFooterStyle(Value: TcxGridGetCellStyleEvent); -begin - if @FOnGetFooterStyle <> @Value then - begin - FOnGetFooterStyle := Value; - Item.Changed(ticProperty); - end; -end; - -procedure TcxGridColumnStyles.SetOnGetFooterStyleEx(Value: TcxGridGetFooterStyleExEvent); -begin - if @FOnGetFooterStyleEx <> @Value then - begin - FOnGetFooterStyleEx := Value; - Item.Changed(ticProperty); - end; -end; - -procedure TcxGridColumnStyles.SetOnGetFooterSummaryStyle(Value: TcxGridGetFooterSummaryStyleEvent); -begin - if @FOnGetFooterSummaryStyle <> @Value then - begin - FOnGetFooterSummaryStyle := Value; - Item.Changed(ticProperty); - end; -end; - -procedure TcxGridColumnStyles.SetOnGetGroupSummaryStyle(Value: TcxGridGetGroupSummaryStyleEvent); -begin - if @FOnGetGroupSummaryStyle <> @Value then - begin - FOnGetGroupSummaryStyle := Value; - Item.Changed(ticProperty); - end; -end; - -procedure TcxGridColumnStyles.SetOnGetHeaderStyle(Value: TcxGridGetHeaderStyleEvent); -begin - if @FOnGetHeaderStyle <> @Value then - begin - FOnGetHeaderStyle := Value; - Item.Changed(ticProperty); - end; -end; - -procedure TcxGridColumnStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); -begin - case Index of - isFooter: - GridView.Styles.GetFooterParams(TcxGridRowFooterCellPos(AData).Row, Item, - TcxGridRowFooterCellPos(AData).FooterGroupLevel, - TcxGridRowFooterCellPos(AData).SummaryItem, AParams); - isGroupSummary: - GridView.Styles.GetGroupSummaryParams(TcxGridGroupSummaryInfo(AData).Row, - TcxGridGroupSummaryInfo(AData).SummaryItem, AParams); - isHeader: - GridView.Styles.GetHeaderParams(Item, AParams); - else - inherited; - end; -end; - -procedure TcxGridColumnStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridColumnStyles then - with TcxGridColumnStyles(Source) do - begin - Self.Footer := Footer; - Self.GroupSummary := GroupSummary; - Self.Header := Header; - Self.OnGetFooterStyle := OnGetFooterStyle; - Self.OnGetFooterStyleEx := OnGetFooterStyleEx; - Self.OnGetFooterSummaryStyle := OnGetFooterSummaryStyle; - Self.OnGetGroupSummaryStyle := OnGetGroupSummaryStyle; - Self.OnGetHeaderStyle := OnGetHeaderStyle; - end; -end; - -procedure TcxGridColumnStyles.GetFooterParams(ARow: TcxCustomGridRow; - AFooterGroupLevel: Integer; ASummaryItem: TcxDataSummaryItem; out AParams: TcxViewParams); -var - AStyle: TcxStyle; - ARowFooterCellPos: TcxGridRowFooterCellPos; -begin - AStyle := nil; - if Assigned(FOnGetFooterStyle) then - FOnGetFooterStyle(GridView, ARow, Item, AStyle); - if Assigned(FOnGetFooterStyleEx) then - FOnGetFooterStyleEx(GridView, ARow, Item, AFooterGroupLevel, AStyle); - if Assigned(FOnGetFooterSummaryStyle) and (ASummaryItem <> nil) then - FOnGetFooterSummaryStyle(GridView, ARow, Item, AFooterGroupLevel, ASummaryItem, AStyle); - ARowFooterCellPos := TcxGridRowFooterCellPos.Create(ARow, Item, AFooterGroupLevel, ASummaryItem); - try - GetViewParams(isFooter, ARowFooterCellPos, AStyle, AParams); - finally - ARowFooterCellPos.Free; - end; -end; - -procedure TcxGridColumnStyles.GetGroupSummaryParams(ARow: TcxGridGroupRow; - ASummaryItem: TcxDataSummaryItem; out AParams: TcxViewParams); -var - AStyle: TcxStyle; - ASummaryInfo: TcxGridGroupSummaryInfo; -begin - AStyle := nil; - if (ARow <> nil) and Assigned(FOnGetGroupSummaryStyle) then - FOnGetGroupSummaryStyle(GridView, ARow, Item, ASummaryItem, AStyle); - ASummaryInfo := TcxGridGroupSummaryInfo.Create(ARow, ASummaryItem); - try - GetViewParams(isGroupSummary, ASummaryInfo, AStyle, AParams); - finally - ASummaryInfo.Free; - end; -end; - -procedure TcxGridColumnStyles.GetHeaderParams(out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if Assigned(FOnGetHeaderStyle) then - FOnGetHeaderStyle(GridView, Item, AStyle); - GetViewParams(isHeader, nil, AStyle, AParams); -end; - -{ TcxGridColumnSummary } - -function TcxGridColumnSummary.GetDataController: TcxCustomDataController; -begin - Result := TcxGridTableView(GridView).FDataController; -end; - -function TcxGridColumnSummary.GetFormat(Index: TcxGridSummariesIndex): string; -begin - Result := GetSummaryItems(Index).GetDataItemFormat(Item.Index, GetSummaryItemsPosition(Index)); -end; - -function TcxGridColumnSummary.GetKind(Index: TcxGridSummariesIndex): TcxSummaryKind; -begin - Result := GetSummaryItems(Index).GetDataItemKind(Item.Index, GetSummaryItemsPosition(Index)); -end; - -function TcxGridColumnSummary.GetSortByGroupFooterSummary: Boolean; -begin - Result := GetSummaryItems(siGroup).GetDataItemSorted(Item.Index, spFooter); -end; - -function TcxGridColumnSummary.GetSortByGroupSummary: Boolean; -begin - Result := GetSummaryItems(siGroup).GetDataItemSorted(Item.Index, spGroup); -end; - -procedure TcxGridColumnSummary.SetFormat(Index: TcxGridSummariesIndex; const Value: string); -begin - GetSummaryItems(Index).SetDataItemFormat(Item.Index, GetSummaryItemsPosition(Index), Value); -end; - -procedure TcxGridColumnSummary.SetKind(Index: TcxGridSummariesIndex; Value: TcxSummaryKind); -begin - GetSummaryItems(Index).SetDataItemKind(Item.Index, GetSummaryItemsPosition(Index), Value); -end; - -procedure TcxGridColumnSummary.SetSortByGroupFooterSummary(Value: Boolean); -begin - GetSummaryItems(siGroup).SetDataItemSorted(Item.Index, spFooter, Value); -end; - -procedure TcxGridColumnSummary.SetSortByGroupSummary(Value: Boolean); -begin - GetSummaryItems(siGroup).SetDataItemSorted(Item.Index, spGroup, Value); -end; - -function TcxGridColumnSummary.GetSummaryItems(AIndex: TcxGridSummariesIndex): TcxDataSummaryItems; -begin - with DataController.Summary do - if AIndex = siFooter then - Result := FooterSummaryItems - else - Result := DefaultGroupSummaryItems; -end; - -function TcxGridColumnSummary.GetSummaryItemsPosition(AIndex: TcxGridSummariesIndex): TcxSummaryPosition; -begin - if AIndex = siGroup then - Result := spGroup - else - Result := spFooter; -end; - -procedure TcxGridColumnSummary.Assign(Source: TPersistent); -begin - if Source is TcxGridColumnSummary then - with TcxGridColumnSummary(Source) do - begin - Self.FooterFormat := FooterFormat; - Self.FooterKind := FooterKind; - Self.GroupFooterFormat := GroupFooterFormat; - Self.GroupFooterKind := GroupFooterKind; - Self.GroupFormat := GroupFormat; - Self.GroupKind := GroupKind; - Self.SortByGroupFooterSummary := SortByGroupFooterSummary; - Self.SortByGroupSummary := SortByGroupSummary; - end; - inherited; -end; - -{ TcxGridColumn } - -constructor TcxGridColumn.Create(AOwner: TComponent); -begin - inherited; - FHeaderGlyphAlignmentVert := vaCenter; -end; - -destructor TcxGridColumn.Destroy; -begin - Selected := False; - IsPreview := False; - inherited; -end; - -function TcxGridColumn.GetController: TcxGridTableController; -begin - Result := TcxGridTableController(inherited Controller); -end; - -function TcxGridColumn.GetFooterAlignmentHorz: TAlignment; -begin - if FIsFooterAlignmentHorzAssigned then - Result := FFooterAlignmentHorz - else - Result := GetDefaultValuesProvider.DefaultAlignment; -end; - -function TcxGridColumn.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridColumn.GetGroupSummaryAlignment: TAlignment; -begin - if FIsGroupSummaryAlignmentAssigned then - Result := FGroupSummaryAlignment - else - Result := GetDefaultValuesProvider.DefaultAlignment; -end; - -function TcxGridColumn.GetIsPreview: Boolean; -begin - Result := GridView.Preview.Column = Self; -end; - -function TcxGridColumn.GetOptions: TcxGridColumnOptions; -begin - Result := TcxGridColumnOptions(inherited Options); -end; - -function TcxGridColumn.GetStyles: TcxGridColumnStyles; -begin - Result := TcxGridColumnStyles(inherited Styles); -end; - -function TcxGridColumn.GetViewData: TcxGridViewData; -begin - Result := TcxGridViewData(inherited ViewData); -end; - -procedure TcxGridColumn.SetFooterAlignmentHorz(Value: TAlignment); -begin - if (FooterAlignmentHorz <> Value) or IsLoading then - begin - FFooterAlignmentHorz := Value; - FIsFooterAlignmentHorzAssigned := True; - Changed(ticLayout); - end; -end; - -procedure TcxGridColumn.SetGroupSummaryAlignment(Value: TAlignment); -begin - if (GroupSummaryAlignment <> Value) or IsLoading then - begin - FGroupSummaryAlignment := Value; - FIsGroupSummaryAlignmentAssigned := True; - Changed(ticLayout); - end; -end; - -procedure TcxGridColumn.SetHeaderGlyph(Value: TBitmap); -begin - FHeaderGlyph.Assign(Value); -end; - -procedure TcxGridColumn.SetHeaderGlyphAlignmentHorz(Value: TAlignment); -begin - if FHeaderGlyphAlignmentHorz <> Value then - begin - FHeaderGlyphAlignmentHorz := Value; - Changed(ticLayout); - end; -end; - -procedure TcxGridColumn.SetHeaderGlyphAlignmentVert(Value: TcxAlignmentVert); -begin - if FHeaderGlyphAlignmentVert <> Value then - begin - FHeaderGlyphAlignmentVert := Value; - Changed(ticLayout); - end; -end; - -procedure TcxGridColumn.SetIsPreview(Value: Boolean); -begin - if IsPreview <> Value then - if Value then - GridView.Preview.Column := Self - else - GridView.Preview.Column := nil; -end; - -procedure TcxGridColumn.SetOnCompareRowValuesForCellMerging(Value: TcxGridColumnCompareRowValuesEvent); -begin - if @FOnCompareRowValuesForCellMerging <> @Value then - begin - FOnCompareRowValuesForCellMerging := Value; - Changed(ticProperty); - end; -end; - -procedure TcxGridColumn.SetOnCompareValuesForCellMerging(Value: TcxGridColumnCompareValuesEvent); -begin - if @FOnCompareValuesForCellMerging <> @Value then - begin - FOnCompareValuesForCellMerging := Value; - Changed(ticProperty); - end; -end; - -procedure TcxGridColumn.SetOnCustomDrawFooterCell(Value: TcxGridColumnCustomDrawHeaderEvent); -begin - if @FOnCustomDrawFooterCell <> @Value then - begin - FOnCustomDrawFooterCell := Value; - Changed(ticProperty); - end; -end; - -procedure TcxGridColumn.SetOnCustomDrawGroupSummaryCell(Value: TcxGridGroupSummaryCellCustomDrawEvent); -begin - if @FOnCustomDrawGroupSummaryCell <> @Value then - begin - FOnCustomDrawGroupSummaryCell := Value; - Changed(ticProperty); - end; -end; - -procedure TcxGridColumn.SetOnCustomDrawHeader(Value: TcxGridColumnCustomDrawHeaderEvent); -begin - if @FOnCustomDrawHeader <> @Value then - begin - FOnCustomDrawHeader := Value; - Changed(ticProperty); - end; -end; - -procedure TcxGridColumn.SetOnHeaderClick(Value: TNotifyEvent); -begin - if @FOnHeaderClick <> @Value then - begin - FOnHeaderClick := Value; - Changed(ticProperty); - end; -end; - -procedure TcxGridColumn.SetOptions(Value: TcxGridColumnOptions); -begin - inherited Options := Value; -end; - -procedure TcxGridColumn.SetSelected(Value: Boolean); -begin - if FSelected <> Value then - if Value then - Controller.AddSelectedColumn(Self) - else - Controller.RemoveSelectedColumn(Self); -end; - -procedure TcxGridColumn.SetStyles(Value: TcxGridColumnStyles); -begin - inherited Styles := Value; -end; - -procedure TcxGridColumn.SetSummary(Value: TcxGridColumnSummary); -begin - FSummary.Assign(Value); -end; - -function TcxGridColumn.IsFooterAlignmentHorzStored: Boolean; -begin - Result := FIsFooterAlignmentHorzAssigned and - (FFooterAlignmentHorz <> GetDefaultValuesProvider.DefaultAlignment); -end; - -function TcxGridColumn.IsGroupSummaryAlignmentStored: Boolean; -begin - Result := FIsGroupSummaryAlignmentAssigned and - (FGroupSummaryAlignment <> GetDefaultValuesProvider.DefaultAlignment); -end; - -procedure TcxGridColumn.HeaderGlyphChanged(Sender: TObject); -begin - Changed(ticLayout); -end; - -function TcxGridColumn.GetStoredProperties(AProperties: TStrings): Boolean; -begin - with AProperties do - begin - Add('GroupIndex'); - Add('Width'); - end; - Result := inherited GetStoredProperties(AProperties); -end; - -procedure TcxGridColumn.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'Width' then - AValue := Width - else - if AName = 'GroupIndex' then - AValue := GroupIndex - else - inherited; -end; - -procedure TcxGridColumn.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'Width' then - Width := AValue - else - if AName = 'GroupIndex' then - GroupIndex := AValue - else - inherited; -end; - -procedure TcxGridColumn.CreateSubClasses; -begin - inherited; - FHeaderGlyph := TBitmap.Create; - FHeaderGlyph.OnChange := HeaderGlyphChanged; - FSummary := GetSummaryClass.Create(Self); -end; - -procedure TcxGridColumn.DestroySubClasses; -begin - FreeAndNil(FSummary); - FreeAndNil(FHeaderGlyph); - inherited; -end; - -function TcxGridColumn.GetOptionsClass: TcxCustomGridTableItemOptionsClass; -begin - Result := TcxGridColumnOptions; -end; - -function TcxGridColumn.GetStylesClass: TcxCustomGridTableItemStylesClass; -begin - Result := TcxGridColumnStyles; -end; - -function TcxGridColumn.GetSummaryClass: TcxGridColumnSummaryClass; -begin - Result := TcxGridColumnSummary; -end; - -procedure TcxGridColumn.AssignColumnWidths; -begin - with GridView do - if OptionsView.ColumnAutoWidth then - ViewInfo.HeaderViewInfo.AssignColumnWidths; -end; - -procedure TcxGridColumn.BestFitApplied(AFireEvents: Boolean); -begin - inherited; - if AFireEvents then - GridView.DoColumnSizeChanged(Self); -end; - -function TcxGridColumn.CalculateBestFitWidth: Integer; -var - ABorders: TcxBorders; -begin - Result := inherited CalculateBestFitWidth; - ABorders := GridView.ViewInfo.GetCellBorders(IsMostRight, False); - Inc(Result, (Ord(bLeft in ABorders) + Ord(bRight in ABorders)) * GridView.ViewInfo.GridLineWidth); - if (VisibleIndex <> -1) and GridView.Visible then - begin - if GridView.OptionsView.Header then - Result := Max(Result, GridView.ViewInfo.HeaderViewInfo[VisibleIndex].GetBestFitWidth); - if GridView.OptionsView.Footer then - Result := Max(Result, GridView.ViewInfo.FooterViewInfo.GetCellBestFitWidth(Self)); - Result := Max(Result, GridView.ViewInfo.RecordsViewInfo.GetFooterCellBestFitWidth(Self)); - end; -end; - -function TcxGridColumn.CanCellMerging: Boolean; -begin - Result := Options.CellMerging and GridView.CanCellMerging; -end; - -function TcxGridColumn.CanEdit: Boolean; -begin - if Controller.IsFilterRowFocused then - Result := CanFocus(Controller.FocusedRecord) and (FocusedCellViewInfo <> nil) - else - Result := inherited CanEdit and not CanCellMerging; -end; - -function TcxGridColumn.CanFocus(ARecord: TcxCustomGridRecord): Boolean; -begin - if ViewData.HasFilterRow and (ARecord = ViewData.FilterRow) then - Result := ActuallyVisible and CanFilter(False) - else - Result := inherited CanFocus(ARecord); -end; - -function TcxGridColumn.CanHorzSize: Boolean; -begin - Result := inherited CanHorzSize and GridView.OptionsCustomize.ColumnHorzSizing; -end; - -function TcxGridColumn.CanShowGroupFooters: Boolean; -begin - Result := Options.GroupFooters; -end; - -procedure TcxGridColumn.ForceWidth(Value: Integer); -begin - AssignColumnWidths; - inherited; - AssignColumnWidths; - Changed(ticSize); -end; - -function TcxGridColumn.GetEditValue: Variant; -begin - if Controller.IsFilterRowFocused then - begin - Result := ViewData.FilterRow.Values[Index]; - if (GridView.FilterRow.ApplyChanges = fracImmediately) and - SupportsBeginsWithFilterOperator(ViewData.FilterRow) then - Controller.RemoveBeginsWithMask(Result); - end - else - Result := inherited GetEditValue; -end; - -procedure TcxGridColumn.SetEditValue(const Value: Variant); -var - AValue: Variant; -begin - if Controller.IsFilterRowFocused then - begin - AValue := Value; - if (GridView.FilterRow.ApplyChanges = fracImmediately) and - SupportsBeginsWithFilterOperator(ViewData.FilterRow) then - Controller.AddBeginsWithMask(AValue); - ViewData.FilterRow.Values[Index] := AValue; - if not Controller.EditingController.ApplyingImmediateFiltering then - GridView.Filtering.AddFilterToMRUItems; - end - else - inherited SetEditValue(Value); -end; - -function TcxGridColumn.GetFixed: Boolean; -begin - Result := inherited GetFixed or - (Controller.ForcingWidthItem <> nil) and - Controller.IsColumnFixedDuringHorzSizing(Self); -end; - -function TcxGridColumn.GetIsBottom: Boolean; -begin - Result := True; -end; - -function TcxGridColumn.GetIsLeft: Boolean; -begin - Result := IsFirst; -end; - -function TcxGridColumn.GetIsMostBottom: Boolean; -begin - Result := IsBottom; -end; - -function TcxGridColumn.GetIsMostLeft: Boolean; -begin - Result := IsLeft; -end; - -function TcxGridColumn.GetIsMostRight: Boolean; -begin - Result := IsRight; -end; - -function TcxGridColumn.GetIsRight: Boolean; -begin - Result := IsLast; -end; - -function TcxGridColumn.GetIsTop: Boolean; -begin - Result := True; -end; - -function TcxGridColumn.GetVisible: Boolean; -begin - Result := inherited GetVisible and not IsPreview; -end; - -function TcxGridColumn.GetVisibleForCustomization: Boolean; -begin - Result := inherited GetVisibleForCustomization and not IsPreview; -end; - -function TcxGridColumn.HasFixedWidth: Boolean; -begin - Result := not Options.HorzSizing; -end; - -function TcxGridColumn.HideOnGrouping: Boolean; -begin - Result := GridView.OptionsCustomize.ColumnHidingOnGrouping; -end; - -function TcxGridColumn.IsVisibleStored: Boolean; -begin - Result := inherited IsVisibleStored and not IsPreview; -end; - -function TcxGridColumn.IsVisibleForCustomizationStored: Boolean; -begin - Result := inherited IsVisibleForCustomizationStored and not IsPreview; -end; - -function TcxGridColumn.SupportsBeginsWithFilterOperator(ARow: TcxCustomGridRow): Boolean; -var - AProperties: TcxCustomEditProperties; - AFilterHelper: TcxCustomFilterEditHelperClass; -begin - if ARow = nil then - AProperties := GetProperties - else - AProperties := GetProperties(ARow); - AFilterHelper := FilterEditsController.FindHelper(AProperties.ClassType); - Result := (AFilterHelper <> nil) and - (fcoLike in AFilterHelper.GetSupportedFilterOperators(AProperties, DataBinding.ValueTypeClass)); -end; - -{procedure TcxGridColumn.VisibleChanged; -begin - //FGridView.RefreshVisibleColumnsList; - //FGridView.RefreshCustomizationForm; -end;} - -function TcxGridColumn.GetHeaderViewInfoClass: TcxGridColumnHeaderViewInfoClass; -begin - Result := TcxGridColumnHeaderViewInfo; -end; - -procedure TcxGridColumn.DoCustomDrawFooterCell(ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); -begin - if HasCustomDrawFooterCell then - FOnCustomDrawFooterCell(GridView, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridColumn.DoCustomDrawGroupSummaryCell(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridViewCellViewInfo; var ADone: Boolean); -var - ACell: TcxGridGroupSummaryCellViewInfo; -begin - if HasCustomDrawGroupSummaryCell then - begin - ACell := TcxGridGroupSummaryCellViewInfo(AViewInfo); - FOnCustomDrawGroupSummaryCell(Self, ACanvas, ACell.RowViewInfo.GridRecord, - Self, ACell.SummaryItem, AViewInfo, ADone); - end; -end; - -procedure TcxGridColumn.DoCustomDrawHeader(ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); -begin - if HasCustomDrawHeader then - FOnCustomDrawHeader(GridView, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridColumn.DoHeaderClick; -begin - if Assigned(FOnHeaderClick) then FOnHeaderClick(Self); - GridView.DoColumnHeaderClick(Self); -end; - -function TcxGridColumn.HasCustomDrawFooterCell: Boolean; -begin - Result := Assigned(FOnCustomDrawFooterCell); -end; - -function TcxGridColumn.HasCustomDrawGroupSummaryCell: Boolean; -begin - Result := Assigned(FOnCustomDrawGroupSummaryCell); -end; - -function TcxGridColumn.HasCustomDrawHeader: Boolean; -begin - Result := Assigned(FOnCustomDrawHeader); -end; - -procedure TcxGridColumn.Assign(Source: TPersistent); -begin - if Source is TcxGridColumn then - with TcxGridColumn(Source) do - begin - Self.FooterAlignmentHorz := FooterAlignmentHorz; - Self.GroupSummaryAlignment := GroupSummaryAlignment; - Self.HeaderGlyph := HeaderGlyph; - Self.HeaderGlyphAlignmentHorz := HeaderGlyphAlignmentHorz; - Self.HeaderGlyphAlignmentVert := HeaderGlyphAlignmentVert; - Self.Summary := Summary; - Self.OnCompareRowValuesForCellMerging := OnCompareRowValuesForCellMerging; - Self.OnCompareValuesForCellMerging := OnCompareValuesForCellMerging; - Self.OnCustomDrawFooterCell := OnCustomDrawFooterCell; - Self.OnCustomDrawGroupSummaryCell := OnCustomDrawGroupSummaryCell; - Self.OnCustomDrawHeader := OnCustomDrawHeader; - Self.OnHeaderClick := OnHeaderClick; - end; - inherited; -end; - -function TcxGridColumn.DoCompareValuesForCellMerging( - ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: TcxEditValue; - ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: TcxEditValue): Boolean; -begin - Result := (AProperties1 = AProperties2) and AProperties1.CompareDisplayValues(AValue1, AValue2); - if Assigned(FOnCompareValuesForCellMerging) then - FOnCompareValuesForCellMerging(Self, AProperties1, AValue1, AProperties2, AValue2, Result); - if Assigned(FOnCompareRowValuesForCellMerging) then - FOnCompareRowValuesForCellMerging(Self, ARow1, AProperties1, AValue1, - ARow2, AProperties2, AValue2, Result); -end; - -procedure TcxGridColumn.FocusWithSelection; -begin - if not Focused then - begin - GridView.BeginUpdate; - try - Controller.ClearCellSelection; - Selected := True; - Controller.CellSelectionAnchor := Self; - finally - GridView.EndUpdate; - end; - end; - inherited; -end; - -function TcxGridColumn.GroupBy(AGroupIndex: Integer; ACanShow: Boolean = True): Boolean; -begin - Result := CanGroup; - if not Result then Exit; - GroupIndex := AGroupIndex; - if AGroupIndex = -1 then - if ACanShow and ShowOnUngrouping and WasVisibleBeforeGrouping then - Visible := True - else - else - if HideOnGrouping and CanHide then - Visible := False; -end; - -{ TcxGridTableBackgroundBitmaps } - -function TcxGridTableBackgroundBitmaps.GetBitmapStyleIndex(Index: Integer): Integer; -begin - case Index of - bbFooter: - Result := vsFooter; - bbHeader: - Result := vsHeader; - bbGroup: - Result := vsGroup; - bbGroupByBox: - Result := vsGroupByBox; - bbIndicator: - Result := vsIndicator; - bbPreview: - Result := vsPreview; - else - Result := inherited GetBitmapStyleIndex(Index); - end; -end; - -procedure TcxGridTableBackgroundBitmaps.Assign(Source: TPersistent); -begin - if Source is TcxGridTableBackgroundBitmaps then - with TcxGridTableBackgroundBitmaps(Source) do - begin - Self.Footer := Footer; - Self.Header := Header; - Self.Group := Group; - Self.GroupByBox := GroupByBox; - Self.Indicator := Indicator; - Self.Preview := Preview; - end; - inherited; -end; - -{ TcxGridTableOptionsBehavior } - -constructor TcxGridTableOptionsBehavior.Create(AGridView: TcxCustomGridView); -begin - inherited; - FColumnHeaderHints := True; - FCopyPreviewToClipboard := True; - FExpandMasterRowOnDblClick := True; -end; - -procedure TcxGridTableOptionsBehavior.SetColumnHeaderHints(Value: Boolean); -begin - if FColumnHeaderHints <> Value then - begin - FColumnHeaderHints := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableOptionsBehavior.SetCopyPreviewToClipboard(Value: Boolean); -begin - if FCopyPreviewToClipboard <> Value then - begin - FCopyPreviewToClipboard := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableOptionsBehavior.SetExpandMasterRowOnDblClick(Value: Boolean); -begin - if FExpandMasterRowOnDblClick <> Value then - begin - FExpandMasterRowOnDblClick := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableOptionsBehavior.Assign(Source: TPersistent); -begin - if Source is TcxGridTableOptionsBehavior then - with TcxGridTableOptionsBehavior(Source) do - begin - Self.ColumnHeaderHints := ColumnHeaderHints; - Self.CopyPreviewToClipboard := CopyPreviewToClipboard; - Self.ExpandMasterRowOnDblClick := ExpandMasterRowOnDblClick; - end; - inherited; -end; - -{ TcxGridTableFiltering } - -function TcxGridTableFiltering.GetColumnFilteredItemsList: Boolean; -begin - Result := ItemFilteredItemsList; -end; - -function TcxGridTableFiltering.GetColumnMRUItemsList: Boolean; -begin - Result := ItemMRUItemsList; -end; - -function TcxGridTableFiltering.GetColumnMRUItemsListCount: Integer; -begin - Result := ItemMRUItemsListCount; -end; - -function TcxGridTableFiltering.GetColumnPopup: TcxGridItemFilterPopupOptions; -begin - Result := ItemPopup; -end; - -procedure TcxGridTableFiltering.SetColumnFilteredItemsList(Value: Boolean); -begin - ItemFilteredItemsList := Value; -end; - -procedure TcxGridTableFiltering.SetColumnMRUItemsList(Value: Boolean); -begin - ItemMRUItemsList := Value; -end; - -procedure TcxGridTableFiltering.SetColumnMRUItemsListCount(Value: Integer); -begin - ItemMRUItemsListCount := Value; -end; - -procedure TcxGridTableFiltering.SetColumnPopup(Value: TcxGridItemFilterPopupOptions); -begin - ItemPopup := Value; -end; - -procedure TcxGridTableFiltering.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('ColumnPopupDropDownWidth', ReadItemPopupDropDownWidth, nil, True); - Filer.DefineProperty('ColumnPopupMaxDropDownItemCount', ReadItemPopupMaxDropDownCount, nil, True); -end; - -{ TcxGridTableOptionsCustomize } - -constructor TcxGridTableOptionsCustomize.Create(AGridView: TcxCustomGridView); -begin - inherited; - FColumnHidingOnGrouping := True; - FColumnHorzSizing := True; -end; - -function TcxGridTableOptionsCustomize.GetColumnFiltering: Boolean; -begin - Result := ItemFiltering; -end; - -function TcxGridTableOptionsCustomize.GetColumnGrouping: Boolean; -begin - Result := ItemGrouping; -end; - -function TcxGridTableOptionsCustomize.GetColumnHiding: Boolean; -begin - Result := ItemHiding; -end; - -function TcxGridTableOptionsCustomize.GetColumnMoving: Boolean; -begin - Result := ItemMoving; -end; - -function TcxGridTableOptionsCustomize.GetColumnSorting: Boolean; -begin - Result := ItemSorting; -end; - -function TcxGridTableOptionsCustomize.GetColumnsQuickCustomization: Boolean; -begin - Result := ItemsQuickCustomization; -end; - -function TcxGridTableOptionsCustomize.GetColumnsQuickCustomizationMaxDropDownCount: Integer; -begin - Result := ItemsQuickCustomizationMaxDropDownCount; -end; - -function TcxGridTableOptionsCustomize.GetColumnsQuickCustomizationReordering: TcxGridQuickCustomizationReordering; -begin - Result := ItemsQuickCustomizationReordering; -end; - -function TcxGridTableOptionsCustomize.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -procedure TcxGridTableOptionsCustomize.SetColumnFiltering(Value: Boolean); -begin - ItemFiltering := Value; -end; - -procedure TcxGridTableOptionsCustomize.SetColumnGrouping(Value: Boolean); -begin - ItemGrouping := Value; -end; - -procedure TcxGridTableOptionsCustomize.SetColumnHiding(Value: Boolean); -begin - ItemHiding := Value; -end; - -procedure TcxGridTableOptionsCustomize.SetColumnHidingOnGrouping(Value: Boolean); -begin - if FColumnHidingOnGrouping <> Value then - begin - FColumnHidingOnGrouping := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableOptionsCustomize.SetColumnHorzSizing(Value: Boolean); -begin - if FColumnHorzSizing <> Value then - begin - FColumnHorzSizing := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridTableOptionsCustomize.SetColumnMoving(Value: Boolean); -begin - ItemMoving := Value; -end; - -procedure TcxGridTableOptionsCustomize.SetColumnSorting(Value: Boolean); -begin - ItemSorting := Value; -end; - -procedure TcxGridTableOptionsCustomize.SetColumnsQuickCustomization(Value: Boolean); -begin - ItemsQuickCustomization := Value; -end; - -procedure TcxGridTableOptionsCustomize.SetColumnsQuickCustomizationMaxDropDownCount(Value: Integer); -begin - ItemsQuickCustomizationMaxDropDownCount := Value; -end; - -procedure TcxGridTableOptionsCustomize.SetColumnsQuickCustomizationReordering(Value: TcxGridQuickCustomizationReordering); -begin - ItemsQuickCustomizationReordering := Value; -end; - -procedure TcxGridTableOptionsCustomize.SetDataRowSizing(Value: Boolean); -begin - if FDataRowSizing <> Value then - begin - FDataRowSizing := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableOptionsCustomize.SetGroupBySorting(Value: Boolean); -begin - if FGroupBySorting <> Value then - begin - FGroupBySorting := Value; - GridView.BeginUpdate; - try - GridView.Controller.ClearGrouping; - GridView.FDataController.ClearSorting(False); - Changed(vcProperty); - finally - GridView.EndUpdate; - end; - end; -end; - -procedure TcxGridTableOptionsCustomize.SetGroupRowSizing(Value: Boolean); -begin - if FGroupRowSizing <> Value then - begin - FGroupRowSizing := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableOptionsCustomize.Assign(Source: TPersistent); -begin - if Source is TcxGridTableOptionsCustomize then - with TcxGridTableOptionsCustomize(Source) do - begin - Self.ColumnHidingOnGrouping := ColumnHidingOnGrouping; - Self.ColumnHorzSizing := ColumnHorzSizing; - Self.DataRowSizing := DataRowSizing; - Self.GroupBySorting := GroupBySorting; - Self.GroupRowSizing := GroupRowSizing; - end; - inherited; -end; - -{ TcxGridTableOptionsSelection } - -procedure TcxGridTableOptionsSelection.SetCellMultiSelect(Value: Boolean); -begin - if FCellMultiSelect <> Value then - begin - FCellMultiSelect := Value; - CellSelect := True; - InvertSelect := not Value; - MultiSelect := Value; - Changed(vcProperty); - end; -end; - -function TcxGridTableOptionsSelection.IsCellSelectStored: Boolean; -begin - Result := not FCellMultiSelect; -end; - -function TcxGridTableOptionsSelection.IsInvertSelectStored: Boolean; -begin - Result := not FCellMultiSelect and inherited IsInvertSelectStored; -end; - -function TcxGridTableOptionsSelection.IsMultiSelectStored: Boolean; -begin - Result := not FCellMultiSelect and inherited IsMultiSelectStored; -end; - -procedure TcxGridTableOptionsSelection.SetCellSelect(Value: Boolean); -begin - if not FCellMultiSelect or Value then - inherited; -end; - -procedure TcxGridTableOptionsSelection.SetInvertSelect(Value: Boolean); -begin - if not FCellMultiSelect or not Value then - inherited; -end; - -procedure TcxGridTableOptionsSelection.SetMultiSelect(Value: Boolean); -begin - if not FCellMultiSelect or Value then - inherited; -end; - -procedure TcxGridTableOptionsSelection.Assign(Source: TPersistent); -begin - if Source is TcxGridTableOptionsSelection then - with TcxGridTableOptionsSelection(Source) do - Self.CellMultiSelect := CellMultiSelect; - inherited; -end; - -{ TcxGridSpecialRowOptions } - -constructor TcxGridSpecialRowOptions.Create(AGridView: TcxCustomGridView); -begin - inherited; - FInfoText := DefaultInfoText; - FSeparatorColor := clDefault; - FSeparatorWidth := cxGridCustomRowSeparatorDefaultWidth; -end; - -function TcxGridSpecialRowOptions.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridSpecialRowOptions.GetInfoText: string; -begin - if FIsInfoTextAssigned then - Result := FInfoText - else - Result := DefaultInfoText; -end; - -procedure TcxGridSpecialRowOptions.SetInfoText(const Value: string); -begin - if FInfoText <> Value then - begin - FInfoText := Value; - FIsInfoTextAssigned := Value <> DefaultInfoText; - Changed(vcLayout); - end; -end; - -procedure TcxGridSpecialRowOptions.SetSeparatorColor(Value: TColor); -begin - if FSeparatorColor <> Value then - begin - FSeparatorColor := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridSpecialRowOptions.SetSeparatorWidth(Value: Integer); -begin - if Value < cxGridCustomRowSeparatorMinWidth then - Value := cxGridCustomRowSeparatorMinWidth; - if FSeparatorWidth <> Value then - begin - FSeparatorWidth := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridSpecialRowOptions.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - FVisible := Value; - VisibleChanged; - end; -end; - -function TcxGridSpecialRowOptions.IsInfoTextStored: Boolean; -begin - Result := FIsInfoTextAssigned; -end; - -function TcxGridSpecialRowOptions.DefaultSeparatorColor: TColor; -begin - Result := LookAndFeelPainter.DefaultHeaderColor; -end; - -procedure TcxGridSpecialRowOptions.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridSpecialRowOptions then - with TcxGridSpecialRowOptions(Source) do - begin - Self.InfoText := InfoText; - Self.SeparatorColor := SeparatorColor; - Self.SeparatorWidth := SeparatorWidth; - Self.Visible := Visible; - end; -end; - -function TcxGridSpecialRowOptions.GetSeparatorColor: TColor; -begin - Result := FSeparatorColor; - if Result = clDefault then - Result := DefaultSeparatorColor; -end; - -{ TcxGridFilterRowOptions } - -procedure TcxGridFilterRowOptions.SetApplyChanges(Value: TcxGridFilterRowApplyChangesMode); -begin - if FApplyChanges <> Value then - begin - FApplyChanges := Value; - Changed(vcProperty); - end; -end; - -function TcxGridFilterRowOptions.DefaultInfoText: string; -begin - Result := cxGetResourceString(@scxGridFilterRowInfoText); -end; - -procedure TcxGridFilterRowOptions.VisibleChanged; -begin - GridView.ViewData.CheckFilterRow; - Changed(vcSize); -end; - -procedure TcxGridFilterRowOptions.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridFilterRowOptions then - ApplyChanges := TcxGridFilterRowOptions(Source).ApplyChanges; -end; - -{ TcxGridNewItemRowOptions } - -function TcxGridNewItemRowOptions.DefaultInfoText: string; -begin - Result := cxGetResourceString(@scxGridNewItemRowInfoText); -end; - -procedure TcxGridNewItemRowOptions.VisibleChanged; -begin - GridView.ViewData.CheckNewItemRecord; - GridView.FDataController.UseNewItemRowForEditing := Visible; -end; - -{ TcxGridTableOptionsView } - -constructor TcxGridTableOptionsView.Create(AGridView: TcxCustomGridView); -begin - inherited; - FExpandButtonsForEmptyDetails := True; - FGridLineColor := clDefault; - FGroupByBox := True; - FHeader := True; - FIndicatorWidth := cxGridDefaultIndicatorWidth; - FPrevGroupFooters := gfVisibleWhenExpanded; - FRowSeparatorColor := clDefault; -end; - -function TcxGridTableOptionsView.GetExpandButtonsForEmptyDetails: Boolean; -begin - Result := FExpandButtonsForEmptyDetails and - ((GridView.Level = nil) or TcxGridLevel(GridView.Level).Options.TabsForEmptyDetails); -end; - -function TcxGridTableOptionsView.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -function TcxGridTableOptionsView.GetHeaderAutoHeight: Boolean; -begin - Result := ItemCaptionAutoHeight; -end; - -function TcxGridTableOptionsView.GetHeaderEndEllipsis: Boolean; -begin - Result := ItemCaptionEndEllipsis; -end; - -function TcxGridTableOptionsView.GetNewItemRow: Boolean; -begin - Result := GridView.NewItemRow.Visible; -end; - -function TcxGridTableOptionsView.GetNewItemRowInfoText: string; -begin - Result := GridView.NewItemRow.InfoText; -end; - -function TcxGridTableOptionsView.GetNewItemRowSeparatorColor: TColor; -begin - Result := GridView.NewItemRow.SeparatorColor; -end; - -function TcxGridTableOptionsView.GetNewItemRowSeparatorWidth: Integer; -begin - Result := GridView.NewItemRow.SeparatorWidth; -end; - -function TcxGridTableOptionsView.GetShowColumnFilterButtons: TcxGridShowItemFilterButtons; -begin - Result := ShowItemFilterButtons; -end; - -procedure TcxGridTableOptionsView.SetColumnAutoWidth(Value: Boolean); -begin - if FColumnAutoWidth <> Value then - begin - FColumnAutoWidth := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetDataRowHeight(Value: Integer); -begin - CheckDataRowHeight(Value); - if FDataRowHeight <> Value then - begin - FDataRowHeight := Value; - Changed(vcSize); - GridView.Controller.DesignerModified; - end; -end; - -procedure TcxGridTableOptionsView.SetExpandButtonsForEmptyDetails(Value: Boolean); -begin - if FExpandButtonsForEmptyDetails <> Value then - begin - FExpandButtonsForEmptyDetails := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridTableOptionsView.SetFooter(Value: Boolean); -begin - if FFooter <> Value then - begin - FFooter := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetFooterAutoHeight(Value: Boolean); -begin - if FFooterAutoHeight <> Value then - begin - FFooterAutoHeight := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetFooterMultiSummaries(Value: Boolean); -begin - if FFooterMultiSummaries <> Value then - begin - FFooterMultiSummaries := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetGridLineColor(Value: TColor); -begin - if FGridLineColor <> Value then - begin - FGridLineColor := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridTableOptionsView.SetGridLines(Value: TcxGridLines); -begin - if FGridLines <> Value then - begin - FGridLines := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetGroupByBox(Value: Boolean); -begin - if FGroupByBox <> Value then - begin - FGroupByBox := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetGroupFooterMultiSummaries(Value: Boolean); -begin - if FGroupFooterMultiSummaries <> Value then - begin - FGroupFooterMultiSummaries := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetGroupFooters(Value: TcxGridGroupFootersMode); -begin - if FGroupFooters <> Value then - begin - FPrevGroupFooters := FGroupFooters; - FGroupFooters := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetGroupRowHeight(Value: Integer); -begin - CheckGroupRowHeight(Value); - if FGroupRowHeight <> Value then - begin - FGroupRowHeight := Value; - Changed(vcSize); - GridView.Controller.DesignerModified; - end; -end; - -procedure TcxGridTableOptionsView.SetGroupRowStyle(Value: TcxGridGroupRowStyle); -begin - if FGroupRowStyle <> Value then - begin - FGroupRowStyle := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetGroupSummaryLayout(Value: TcxGridGroupSummaryLayout); -begin - if FGroupSummaryLayout <> Value then - begin - FGroupSummaryLayout := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetHeader(Value: Boolean); -begin - if FHeader <> Value then - begin - FHeader := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetHeaderAutoHeight(Value: Boolean); -begin - ItemCaptionAutoHeight := Value; -end; - -procedure TcxGridTableOptionsView.SetHeaderEndEllipsis(Value: Boolean); -begin - ItemCaptionEndEllipsis := Value; -end; - -procedure TcxGridTableOptionsView.SetHeaderHeight(Value: Integer); -begin - if Value < 0 then Value := 0; - if FHeaderHeight <> Value then - begin - FHeaderHeight := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetIndicator(Value: Boolean); -begin - if FIndicator <> Value then - begin - FIndicator := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetIndicatorWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FIndicatorWidth <> Value then - begin - FIndicatorWidth := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetNewItemRow(Value: Boolean); -begin - GridView.NewItemRow.Visible := Value; -end; - -procedure TcxGridTableOptionsView.SetNewItemRowInfoText(const Value: string); -begin - GridView.NewItemRow.InfoText := Value; -end; - -procedure TcxGridTableOptionsView.SetNewItemRowSeparatorColor(Value: TColor); -begin - GridView.NewItemRow.SeparatorColor := Value; -end; - -procedure TcxGridTableOptionsView.SetNewItemRowSeparatorWidth(Value: Integer); -begin - GridView.NewItemRow.SeparatorWidth := Value; -end; - -procedure TcxGridTableOptionsView.SetRowSeparatorColor(Value: TColor); -begin - if FRowSeparatorColor <> Value then - begin - FRowSeparatorColor := Value; - Changed(vcLayout); - end; -end; - -procedure TcxGridTableOptionsView.SetRowSeparatorWidth(Value: Integer); -begin - if Value < 0 then Value := 0; - if FRowSeparatorWidth <> Value then - begin - FRowSeparatorWidth := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridTableOptionsView.SetShowColumnFilterButtons(Value: TcxGridShowItemFilterButtons); -begin - ShowItemFilterButtons := Value; -end; - -procedure TcxGridTableOptionsView.ReadNewItemRow(Reader: TReader); -begin - NewItemRow := Reader.ReadBoolean; -end; - -procedure TcxGridTableOptionsView.ReadNewItemRowInfoText(Reader: TReader); -begin - NewItemRowInfoText := Reader.ReadString; -end; - -procedure TcxGridTableOptionsView.ReadNewItemRowSeparatorColor(Reader: TReader); -begin - if Reader.NextValue = vaIdent then - NewItemRowSeparatorColor := StringToColor(Reader.ReadIdent) - else - NewItemRowSeparatorColor := Reader.ReadInteger; -end; - -procedure TcxGridTableOptionsView.ReadNewItemRowSeparatorWidth(Reader: TReader); -begin - NewItemRowSeparatorWidth := Reader.ReadInteger; -end; - -procedure TcxGridTableOptionsView.DefineProperties(Filer: TFiler); -begin - inherited; - Filer.DefineProperty('NewItemRow', ReadNewItemRow, nil, True); - Filer.DefineProperty('NewItemRowInfoText', ReadNewItemRowInfoText, nil, True); - Filer.DefineProperty('NewItemRowSeparatorColor', ReadNewItemRowSeparatorColor, nil, True); - Filer.DefineProperty('NewItemRowSeparatorWidth', ReadNewItemRowSeparatorWidth, nil, True); -end; - -procedure TcxGridTableOptionsView.ItemCaptionAutoHeightChanged; -begin - Changed(vcLayout); -end; - -procedure TcxGridTableOptionsView.Assign(Source: TPersistent); -begin - if Source is TcxGridTableOptionsView then - with TcxGridTableOptionsView(Source) do - begin - Self.ColumnAutoWidth := ColumnAutoWidth; - Self.DataRowHeight := DataRowHeight; - Self.ExpandButtonsForEmptyDetails := ExpandButtonsForEmptyDetails; - Self.Footer := Footer; - Self.FooterAutoHeight := FooterAutoHeight; - Self.FooterMultiSummaries := FooterMultiSummaries; - Self.GridLineColor := GridLineColor; - Self.GridLines := GridLines; - Self.GroupByBox := GroupByBox; - Self.GroupFooterMultiSummaries := GroupFooterMultiSummaries; - Self.GroupFooters := GroupFooters; - Self.GroupRowHeight := GroupRowHeight; - Self.GroupRowStyle := GroupRowStyle; - Self.GroupSummaryLayout := GroupSummaryLayout; - Self.Header := Header; - Self.HeaderHeight := HeaderHeight; - Self.Indicator := Indicator; - Self.IndicatorWidth := IndicatorWidth; - Self.FPrevGroupFooters := FPrevGroupFooters; - Self.RowSeparatorColor := RowSeparatorColor; - Self.RowSeparatorWidth := RowSeparatorWidth; - end; - inherited; -end; - -function TcxGridTableOptionsView.CanShowFooterMultiSummaries: Boolean; -begin - Result := GridView.ViewInfo.SupportsMultipleFooterSummaries and FooterMultiSummaries; -end; - -function TcxGridTableOptionsView.CanShowGroupFooterMultiSummaries: Boolean; -begin - Result := GridView.ViewInfo.SupportsMultipleFooterSummaries and GroupFooterMultiSummaries; -end; - -procedure TcxGridTableOptionsView.CheckDataRowHeight(var AValue: Integer); -var - AMinValue: Integer; -begin - if AValue < 0 then AValue := 0; - if AValue > 0 then - begin - AMinValue := GridView.ViewInfo.RecordsViewInfo.CalculateRowDefaultHeight; - if AValue < AMinValue then AValue := AMinValue; - end; -end; - -procedure TcxGridTableOptionsView.CheckGroupRowHeight(var AValue: Integer); -var - AMinValue: Integer; -begin - if AValue < 0 then AValue := 0; - if AValue > 0 then - begin - AMinValue := - GridView.ViewInfo.RecordsViewInfo.CalculateGroupRowDefaultHeight(True); - if AValue < AMinValue then AValue := AMinValue; - end; -end; - -function TcxGridTableOptionsView.GetGridLineColor: TColor; -begin - Result := FGridLineColor; - if Result = clDefault then - Result := LookAndFeelPainter.DefaultGridLineColor; -end; - -function TcxGridTableOptionsView.GetGroupSummaryLayout: TcxGridGroupSummaryLayout; -begin - if GridView.ViewInfo.SupportsGroupSummariesAlignedWithColumns then - Result := FGroupSummaryLayout - else - Result := gslStandard; -end; - -function TcxGridTableOptionsView.GetRowSeparatorColor: TColor; -begin - Result := FRowSeparatorColor; - if Result = clDefault then - Result := LookAndFeelPainter.DefaultRecordSeparatorColor; -end; - -{ TcxGridPreview } - -constructor TcxGridPreview.Create(AGridView: TcxCustomGridView); -begin - inherited; - FAutoHeight := True; - FLeftIndent := cxGridPreviewDefaultLeftIndent; - FMaxLineCount := cxGridPreviewDefaultMaxLineCount; - FRightIndent := cxGridPreviewDefaultRightIndent; -end; - -function TcxGridPreview.GetActive: Boolean; -begin - Result := FVisible and (FColumn <> nil); -end; - -function TcxGridPreview.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -procedure TcxGridPreview.SetAutoHeight(Value: Boolean); -begin - if FAutoHeight <> Value then - begin - FAutoHeight := Value; - PropertyChanged; - end; -end; - -procedure TcxGridPreview.SetColumn(Value: TcxGridColumn); - - procedure ColumnVisibilityChanged(AColumn: TcxGridColumn); - begin - AColumn.VisibleChanged; - GridView.ItemVisibilityChanged(AColumn, AColumn.ActuallyVisible); - AColumn.VisibleForCustomizationChanged; - end; - -var - APrevColumn: TcxGridColumn; -begin - if (Value <> nil) and (Value.GridView <> GridView) then Value := nil; - if FColumn <> Value then - begin - APrevColumn := FColumn; - FColumn := Value; - GridView.BeginUpdate; - try - if APrevColumn <> nil then - ColumnVisibilityChanged(APrevColumn); - if FColumn <> nil then - ColumnVisibilityChanged(FColumn); - finally - GridView.EndUpdate; - end; - end; -end; - -procedure TcxGridPreview.SetLeftIndent(Value: Integer); -begin - if Value < 0 then Value := 0; - if FLeftIndent <> Value then - begin - FLeftIndent := Value; - PropertyChanged; - end; -end; - -procedure TcxGridPreview.SetMaxLineCount(Value: Integer); -begin - if Value < 0 then Value := 0; - if FMaxLineCount <> Value then - begin - FMaxLineCount := Value; - PropertyChanged; - end; -end; - -procedure TcxGridPreview.SetPlace(Value: TcxGridPreviewPlace); -begin - if FPlace <> Value then - begin - FPlace := Value; - PropertyChanged; - end; -end; - -procedure TcxGridPreview.SetRightIndent(Value: Integer); -begin - if Value < 0 then Value := 0; - if FRightIndent <> Value then - begin - FRightIndent := Value; - PropertyChanged; - end; -end; - -procedure TcxGridPreview.SetVisible(Value: Boolean); -begin - if FVisible <> Value then - begin - FVisible := Value; - Changed(vcSize); - end; -end; - -procedure TcxGridPreview.Notification(AComponent: TComponent; - AOperation: TOperation); -begin - inherited; - if (AOperation = opRemove) and (AComponent = Column) then - Column := nil; -end; - -procedure TcxGridPreview.PropertyChanged; -begin - if FVisible then - Changed(vcSize) - else - Changed(vcProperty); -end; - -procedure TcxGridPreview.Assign(Source: TPersistent); -begin - if Source is TcxGridPreview then - with TcxGridPreview(Source) do - begin - Self.AutoHeight := AutoHeight; - if not Self.GridView.AssigningSettings then - if Column <> nil then - Self.Column := TcxGridColumn(Self.GridView.FindItemByID(Column.ID)) - else - Self.Column := Column; - Self.LeftIndent := LeftIndent; - Self.MaxLineCount := MaxLineCount; - Self.Place := Place; - Self.RightIndent := RightIndent; - Self.Visible := Visible; - end; - inherited; -end; - -{ TcxGridTableViewStyles } - -function TcxGridTableViewStyles.GetGridViewValue: TcxGridTableView; -begin - Result := TcxGridTableView(inherited GridView); -end; - -procedure TcxGridTableViewStyles.SetOnGetFooterStyle(Value: TcxGridGetCellStyleEvent); -begin - if @FOnGetFooterStyle <> @Value then - begin - FOnGetFooterStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridTableViewStyles.SetOnGetFooterStyleEx(Value: TcxGridGetFooterStyleExEvent); -begin - if @FOnGetFooterStyleEx <> @Value then - begin - FOnGetFooterStyleEx := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridTableViewStyles.SetOnGetFooterSummaryStyle(Value: TcxGridGetFooterSummaryStyleEvent); -begin - if @FOnGetFooterSummaryStyle <> @Value then - begin - FOnGetFooterSummaryStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridTableViewStyles.SetOnGetGroupStyle(Value: TcxGridGetGroupStyleEvent); -begin - if @FOnGetGroupStyle <> @Value then - begin - FOnGetGroupStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridTableViewStyles.SetOnGetGroupSummaryStyle(Value: TcxGridGetGroupSummaryStyleEvent); -begin - if @FOnGetGroupSummaryStyle <> @Value then - begin - FOnGetGroupSummaryStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridTableViewStyles.SetOnGetHeaderStyle(Value: TcxGridGetHeaderStyleEvent); -begin - if @FOnGetHeaderStyle <> @Value then - begin - FOnGetHeaderStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridTableViewStyles.SetOnGetPreviewStyle(Value: TcxGridGetCellStyleEvent); -begin - if @FOnGetPreviewStyle <> @Value then - begin - FOnGetPreviewStyle := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridTableViewStyles.GetDefaultViewParams(Index: Integer; AData: TObject; - out AParams: TcxViewParams); - - procedure GetGroupDefaultViewParams; - begin - with AParams, LookAndFeelPainter do - begin - inherited GetContentParams(TcxCustomGridRecord(AData), nil, AParams); - if GridView.OptionsView.GroupRowStyle = grsStandard then - begin - Color := DefaultGroupColor; - TextColor := DefaultGroupTextColor; - end - else - if AData = nil then - Color := dxOffice11GroupIndentColor - else - begin - Color := clWindow; - TextColor := dxOffice11GroupRowTextColor; - end; - end; - end; - -begin - inherited; - with AParams, LookAndFeelPainter do - case Index of - vsFooter: - begin - Color := DefaultFooterColor; - TextColor := DefaultFooterTextColor; - end; - vsGroup: - GetGroupDefaultViewParams; - vsGroupByBox: - begin - Color := DefaultGroupByBoxColor; - TextColor := DefaultGroupByBoxTextColor; - end; - vsGroupFooterSortedSummary: - if AData <> nil then - TcxGridRowFooterCellPos(AData).Column.Styles.GetFooterParams( - TcxGridRowFooterCellPos(AData).Row, - TcxGridRowFooterCellPos(AData).FooterGroupLevel, - TcxGridRowFooterCellPos(AData).SummaryItem, AParams) - else - GetFooterParams(nil, nil, -1, nil, AParams); - vsGroupSortedSummary: - if AData <> nil then - GetGroupSummaryCellContentParams(TcxGridGroupSummaryInfo(AData).Row, - TcxGridGroupSummaryInfo(AData).SummaryItem, AParams) - else - GetGroupSummaryCellContentParams(nil, nil, AParams); - vsGroupSummary: - GetRecordContentParams(TcxCustomGridRecord(AData), nil, AParams); - vsHeader, vsIndicator: - begin - Color := DefaultHeaderColor; - TextColor := DefaultHeaderTextColor; - end; - vsFilterRowInfoText, vsNewItemRowInfoText: - begin - GetContentParams(TcxCustomGridRecord(AData), nil, AParams); - TextColor := clGrayText; - end; - vsPreview: - begin - inherited GetContentParams(TcxCustomGridRecord(AData), GridView.Preview.Column, AParams); - TextColor := DefaultPreviewTextColor; - end; - end; -end; - -procedure TcxGridTableViewStyles.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridTableViewStyles then - with TcxGridTableViewStyles(Source) do - begin - Self.FilterRowInfoText := FilterRowInfoText; - Self.Footer := Footer; - Self.Group := Group; - Self.GroupByBox := GroupByBox; - Self.GroupFooterSortedSummary := GroupFooterSortedSummary; - Self.GroupSortedSummary := GroupSortedSummary; - Self.GroupSummary := GroupSummary; - Self.Header := Header; - Self.Indicator := Indicator; - Self.NewItemRowInfoText := NewItemRowInfoText; - Self.Preview := Preview; - Self.OnGetFooterStyle := OnGetFooterStyle; - Self.OnGetFooterStyleEx := OnGetFooterStyleEx; - Self.OnGetFooterSummaryStyle := OnGetFooterSummaryStyle; - Self.OnGetGroupStyle := OnGetGroupStyle; - Self.OnGetGroupSummaryStyle := OnGetGroupSummaryStyle; - Self.OnGetHeaderStyle := OnGetHeaderStyle; - Self.OnGetPreviewStyle := OnGetPreviewStyle; - end; -end; - -procedure TcxGridTableViewStyles.GetCellContentParams(ARecord: TcxCustomGridRecord; - AItem: TObject; out AParams: TcxViewParams); -begin - if (AItem is TcxDataSummaryItem) or (AItem is TcxDataSummaryItems) then - begin - if AItem is TcxDataSummaryItems then - AItem := nil; - GetGroupSummaryCellContentParams(ARecord as TcxGridGroupRow, TcxDataSummaryItem(AItem), AParams); - end - else - inherited; -end; - -procedure TcxGridTableViewStyles.GetContentParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -begin - if (AItem <> nil) and TcxGridColumn(AItem).IsPreview then - GetPreviewParams(ARecord, AItem, AParams) - else - inherited; -end; - -procedure TcxGridTableViewStyles.GetFooterCellParams(ARow: TcxCustomGridRow; - AColumn: TcxGridColumn; AFooterGroupLevel: Integer; ASummaryItem: TcxDataSummaryItem; - out AParams: TcxViewParams); -var - AFooterCellPos: TcxGridRowFooterCellPos; -begin - if (AFooterGroupLevel <> -1) and (ASummaryItem <> nil) and ASummaryItem.Sorted then - begin - AFooterCellPos := TcxGridRowFooterCellPos.Create(ARow, AColumn, AFooterGroupLevel, ASummaryItem); - try - GetViewParams(vsGroupFooterSortedSummary, AFooterCellPos, nil, AParams); - finally - AFooterCellPos.Free; - end; - end - else - AColumn.Styles.GetFooterParams(ARow, AFooterGroupLevel, ASummaryItem, AParams); -end; - -procedure TcxGridTableViewStyles.GetFooterParams(ARow: TcxCustomGridRow; - AColumn: TcxGridColumn; AFooterGroupLevel: Integer; ASummaryItem: TcxDataSummaryItem; - out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if Assigned(FOnGetFooterStyle) then - FOnGetFooterStyle(GridView, ARow, AColumn, AStyle); - if Assigned(FOnGetFooterStyleEx) then - FOnGetFooterStyleEx(GridView, ARow, AColumn, AFooterGroupLevel, AStyle); - if Assigned(FOnGetFooterSummaryStyle) and (ASummaryItem <> nil) then - FOnGetFooterSummaryStyle(GridView, ARow, AColumn, AFooterGroupLevel, ASummaryItem, AStyle); - GetViewParams(vsFooter, nil, AStyle, AParams); - AParams.Bitmap := GridView.BackgroundBitmaps.GetBitmap(bbFooter); -end; - -procedure TcxGridTableViewStyles.GetGroupParams(ARecord: TcxCustomGridRecord; - ALevel: Integer; out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if Assigned(FOnGetGroupStyle) then - begin - if ARecord <> nil then ALevel := ARecord.Level; - FOnGetGroupStyle(GridView, ARecord, ALevel, AStyle); - end; - GetViewParams(vsGroup, ARecord, AStyle, AParams); -end; - -procedure TcxGridTableViewStyles.GetGroupSummaryCellContentParams(ARow: TcxGridGroupRow; - ASummaryItem: TcxDataSummaryItem; out AParams: TcxViewParams); -var - ASummaryInfo: TcxGridGroupSummaryInfo; -begin - if not FProcessingGroupSortedSummary and - (ASummaryItem <> nil) and (ASummaryItem = ARow.GroupSummaryItems.SortedSummaryItem) then - begin - FProcessingGroupSortedSummary := True; - ASummaryInfo := TcxGridGroupSummaryInfo.Create(ARow, ASummaryItem); - try - GetViewParams(vsGroupSortedSummary, ASummaryInfo, nil, AParams); - finally - ASummaryInfo.Free; - FProcessingGroupSortedSummary := False; - end; - end - else - if (ASummaryItem = nil) or (ASummaryItem.ItemLink = nil) then - GetGroupSummaryParams(ARow, ASummaryItem, AParams) - else - TcxGridColumn(ASummaryItem.ItemLink).Styles.GetGroupSummaryParams(ARow, ASummaryItem, AParams); -end; - -procedure TcxGridTableViewStyles.GetGroupSummaryCellParams(ARow: TcxGridGroupRow; - ASummaryItem: TcxDataSummaryItem; out AParams: TcxViewParams); -begin - if GridView.DrawDataCellSelected(ARow, nil) then - if ASummaryItem = nil then - GetSelectionParams(ARow, ARow.GroupSummaryItems, AParams) - else - GetSelectionParams(ARow, ASummaryItem, AParams) - else - GetGroupSummaryCellContentParams(ARow, ASummaryItem, AParams); -end; - -procedure TcxGridTableViewStyles.GetGroupSummaryParams(ARow: TcxGridGroupRow; - ASummaryItem: TcxDataSummaryItem; out AParams: TcxViewParams); -var - AStyle: TcxStyle; - AColumn: TcxGridColumn; -begin - AStyle := nil; - if (ARow <> nil) and Assigned(FOnGetGroupSummaryStyle) then - begin - if ASummaryItem = nil then - AColumn := nil - else - AColumn := ASummaryItem.ItemLink as TcxGridColumn; - FOnGetGroupSummaryStyle(GridView, ARow, AColumn, ASummaryItem, AStyle); - end; - GetViewParams(vsGroupSummary, ARow, AStyle, AParams); -end; - -procedure TcxGridTableViewStyles.GetHeaderParams(AItem: TcxGridColumn; - out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if Assigned(FOnGetHeaderStyle) then - FOnGetHeaderStyle(GridView, AItem, AStyle); - GetViewParams(vsHeader, nil, AStyle, AParams); -end; - -procedure TcxGridTableViewStyles.GetPreviewParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -var - AStyle: TcxStyle; -begin - AStyle := nil; - if Assigned(FOnGetPreviewStyle) then - FOnGetPreviewStyle(GridView, ARecord, AItem, AStyle); - GetViewParams(vsPreview, ARecord, AStyle, AParams); -end; - -procedure TcxGridTableViewStyles.GetRecordContentParams(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; out AParams: TcxViewParams); -begin - if ARecord is TcxGridGroupRow then - GetGroupParams(ARecord, -1, AParams) - else - inherited; -end; - -{ TcxGridTableViewStyleSheet } - -function TcxGridTableViewStyleSheet.GetStylesValue: TcxGridTableViewStyles; -begin - Result := TcxGridTableViewStyles(GetStyles); -end; - -procedure TcxGridTableViewStyleSheet.SetStylesValue(Value: TcxGridTableViewStyles); -begin - SetStyles(Value); -end; - -class function TcxGridTableViewStyleSheet.GetStylesClass: TcxCustomStylesClass; -begin - Result := TcxGridTableViewStyles; -end; - -{ TcxGridTableSummaryGroupItemLink } - -function TcxGridTableSummaryGroupItemLink.GetColumn: TcxGridColumn; -begin - Result := TcxGridColumn(ItemLink); -end; - -procedure TcxGridTableSummaryGroupItemLink.SetColumn(Value: TcxGridColumn); -begin - ItemLink := Value; -end; - -function TcxGridTableSummaryGroupItemLink.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView((DataController as IcxCustomGridDataController).GridView); -end; - -function TcxGridTableSummaryGroupItemLink.QueryInterface(const IID: TGUID; out Obj): HResult; -const - E_NOINTERFACE = HResult($80004002); -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TcxGridTableSummaryGroupItemLink._AddRef: Integer; -begin - Result := -1; -end; - -function TcxGridTableSummaryGroupItemLink._Release: Integer; -begin - Result := -1; -end; - -function TcxGridTableSummaryGroupItemLink.GetObjectName: string; -begin - Result := ''; -end; - -function TcxGridTableSummaryGroupItemLink.GetProperties(AProperties: TStrings): Boolean; -begin - AProperties.Add('Column'); - Result := True; -end; - -procedure TcxGridTableSummaryGroupItemLink.GetPropertyValue(const AName: string; - var AValue: Variant); -begin - if AName = 'Column' then - if Column <> nil then - AValue := Column.GetObjectName - else - AValue := ''; -end; - -procedure TcxGridTableSummaryGroupItemLink.SetPropertyValue(const AName: string; - const AValue: Variant); -begin - if AName = 'Column' then - Column := TcxGridColumn(GridView.FindItemByObjectName(AValue)); -end; - -{ TcxGridTableSummaryItem } - -constructor TcxGridTableSummaryItem.Create(Collection: TCollection); -begin - inherited; - FVisibleForCustomization := True; -end; - -function TcxGridTableSummaryItem.GetColumn: TcxGridColumn; -begin - Result := TcxGridColumn(ItemLink); -end; - -function TcxGridTableSummaryItem.GetGridView: TcxGridTableView; -begin - Result := TcxGridTableView((DataController as IcxCustomGridDataController).GridView); -end; - -procedure TcxGridTableSummaryItem.SetColumn(Value: TcxGridColumn); -begin - ItemLink := Value; -end; - -procedure TcxGridTableSummaryItem.SetDisplayText(const Value: string); -begin - if FDisplayText <> Value then - begin - FDisplayText := Value; - GridView.Changed(vcProperty); - end; -end; - -procedure TcxGridTableSummaryItem.SetVisibleForCustomization(Value: Boolean); -begin - if FVisibleForCustomization <> Value then - begin - FVisibleForCustomization := Value; - GridView.Changed(vcProperty); - end; -end; - -function TcxGridTableSummaryItem.QueryInterface(const IID: TGUID; out Obj): HResult; -const - E_NOINTERFACE = HResult($80004002); -begin - if GetInterface(IID, Obj) then - Result := 0 - else - Result := E_NOINTERFACE; -end; - -function TcxGridTableSummaryItem._AddRef: Integer; -begin - Result := -1; -end; - -function TcxGridTableSummaryItem._Release: Integer; -begin - Result := -1; -end; - -function TcxGridTableSummaryItem.GetObjectName: string; -begin - Result := ''; -end; - -function TcxGridTableSummaryItem.GetProperties(AProperties: TStrings): Boolean; -begin - AProperties.Add('Column'); - Result := False; -end; - -procedure TcxGridTableSummaryItem.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'Column' then - if Column <> nil then - AValue := Column.GetObjectName - else - AValue := ''; -end; - -procedure TcxGridTableSummaryItem.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'Column' then - Column := TcxGridColumn(GridView.FindItemByObjectName(AValue)); -end; - -function TcxGridTableSummaryItem.GetDisplayText: string; -begin - Result := DisplayText; -end; - -function TcxGridTableSummaryItem.GetVisibleForCustomization: Boolean; -begin - Result := VisibleForCustomization; -end; - -procedure TcxGridTableSummaryItem.Assign(Source: TPersistent); -begin - inherited; - if Source is TcxGridTableSummaryItem then - with TcxGridTableSummaryItem(Source) do - begin - Self.DisplayText := DisplayText; - Self.VisibleForCustomization := VisibleForCustomization; - end; -end; - -{ TcxGridTableView } - -constructor TcxGridTableView.Create(AOwner: TComponent); -begin - inherited; - FAllowCellMerging := True; -end; - -function TcxGridTableView.GetBackgroundBitmaps: TcxGridTableBackgroundBitmaps; -begin - Result := TcxGridTableBackgroundBitmaps(inherited BackgroundBitmaps); -end; - -function TcxGridTableView.GetColumn(Index: Integer): TcxGridColumn; -begin - Result := TcxGridColumn(Items[Index]); -end; - -function TcxGridTableView.GetColumnCount: Integer; -begin - Result := ItemCount; -end; - -function TcxGridTableView.GetController: TcxGridTableController; -begin - Result := TcxGridTableController(inherited Controller); -end; - -function TcxGridTableView.GetDataController: TcxGridDataController; -begin - Result := TcxGridDataController(FDataController); -end; - -function TcxGridTableView.GetDateTimeHandling: TcxGridTableDateTimeHandling; -begin - Result := TcxGridTableDateTimeHandling(inherited DateTimeHandling); -end; - -function TcxGridTableView.GetFiltering: TcxGridTableFiltering; -begin - Result := TcxGridTableFiltering(inherited Filtering); -end; - -function TcxGridTableView.GetGroupedColumn(Index: Integer): TcxGridColumn; -begin - Result := TcxGridColumn(GroupedItems[Index]); -end; - -function TcxGridTableView.GetGroupedColumnCount: Integer; -begin - Result := GroupedItemCount; -end; - -function TcxGridTableView.GetOptionsBehavior: TcxGridTableOptionsBehavior; -begin - Result := TcxGridTableOptionsBehavior(inherited OptionsBehavior); -end; - -function TcxGridTableView.GetOptionsCustomize: TcxGridTableOptionsCustomize; -begin - Result := TcxGridTableOptionsCustomize(inherited OptionsCustomize); -end; - -function TcxGridTableView.GetOptionsData: TcxGridTableOptionsData; -begin - Result := TcxGridTableOptionsData(inherited OptionsData); -end; - -function TcxGridTableView.GetOptionsSelection: TcxGridTableOptionsSelection; -begin - Result := TcxGridTableOptionsSelection(inherited OptionsSelection); -end; - -function TcxGridTableView.GetOptionsView: TcxGridTableOptionsView; -begin - Result := TcxGridTableOptionsView(inherited OptionsView); -end; - -function TcxGridTableView.GetPainter: TcxGridTablePainter; -begin - Result := TcxGridTablePainter(inherited Painter); -end; - -function TcxGridTableView.GetStyles: TcxGridTableViewStyles; -begin - Result := TcxGridTableViewStyles(inherited Styles); -end; - -function TcxGridTableView.GetViewData: TcxGridViewData; -begin - Result := TcxGridViewData(inherited ViewData); -end; - -function TcxGridTableView.GetViewInfo: TcxGridTableViewInfo; -begin - Result := TcxGridTableViewInfo(inherited ViewInfo); -end; - -function TcxGridTableView.GetVisibleColumn(Index: Integer): TcxGridColumn; -begin - Result := TcxGridColumn(VisibleItems[Index]); -end; - -function TcxGridTableView.GetVisibleColumnCount: Integer; -begin - Result := VisibleItemCount; -end; - -procedure TcxGridTableView.SetBackgroundBitmaps(Value: TcxGridTableBackgroundBitmaps); -begin - inherited BackgroundBitmaps := Value; -end; - -procedure TcxGridTableView.SetColumn(Index: Integer; Value: TcxGridColumn); -begin - Items[Index] := Value; -end; - -procedure TcxGridTableView.SetDataController(Value: TcxGridDataController); -begin - FDataController.Assign(Value); -end; - -procedure TcxGridTableView.SetDateTimeHandling(Value: TcxGridTableDateTimeHandling); -begin - inherited DateTimeHandling := Value; -end; - -procedure TcxGridTableView.SetFiltering(Value: TcxGridTableFiltering); -begin - inherited Filtering := Value; -end; - -procedure TcxGridTableView.SetFilterRow(Value: TcxGridFilterRowOptions); -begin - FFilterRow.Assign(Value); -end; - -procedure TcxGridTableView.SetNewItemRow(Value: TcxGridNewItemRowOptions); -begin - FNewItemRow.Assign(Value); -end; - -procedure TcxGridTableView.SetOnColumnHeaderClick(Value: TcxGridColumnEvent); -begin - if @FOnColumnHeaderClick <> @Value then - begin - FOnColumnHeaderClick := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableView.SetOnColumnPosChanged(Value: TcxGridColumnEvent); -begin - if @FOnColumnPosChanged <> @Value then - begin - FOnColumnPosChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableView.SetOnColumnSizeChanged(Value: TcxGridColumnEvent); -begin - if @FOnColumnSizeChanged <> @Value then - begin - FOnColumnSizeChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableView.SetOnCustomDrawColumnHeader(Value: TcxGridColumnCustomDrawHeaderEvent); -begin - if @FOnCustomDrawColumnHeader <> @Value then - begin - FOnCustomDrawColumnHeader := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableView.SetOnCustomDrawFooterCell(Value: TcxGridColumnCustomDrawHeaderEvent); -begin - if @FOnCustomDrawFooterCell <> @Value then - begin - FOnCustomDrawFooterCell := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableView.SetOnCustomDrawGroupCell(Value: TcxGridTableCellCustomDrawEvent); -begin - if @FOnCustomDrawGroupCell <> @Value then - begin - FOnCustomDrawGroupCell := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableView.SetOnCustomDrawGroupSummaryCell(Value: TcxGridGroupSummaryCellCustomDrawEvent); -begin - if @FOnCustomDrawGroupSummaryCell <> @Value then - begin - FOnCustomDrawGroupSummaryCell := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableView.SetOnCustomDrawIndicatorCell(Value: TcxGridIndicatorCellCustomDrawEvent); -begin - if @FOnCustomDrawIndicatorCell <> @Value then - begin - FOnCustomDrawIndicatorCell := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableView.SetOnLeftPosChanged(Value: TNotifyEvent); -begin - if @FOnLeftPosChanged <> @Value then - begin - FOnLeftPosChanged := Value; - Changed(vcProperty); - end; -end; - -procedure TcxGridTableView.SetOptionsBehavior(Value: TcxGridTableOptionsBehavior); -begin - inherited OptionsBehavior := Value; -end; - -procedure TcxGridTableView.SetOptionsCustomize(Value: TcxGridTableOptionsCustomize); -begin - inherited OptionsCustomize := Value; -end; - -procedure TcxGridTableView.SetOptionsData(Value: TcxGridTableOptionsData); -begin - inherited OptionsData := Value; -end; - -procedure TcxGridTableView.SetOptionsSelection(Value: TcxGridTableOptionsSelection); -begin - inherited OptionsSelection := Value; -end; - -procedure TcxGridTableView.SetOptionsView(Value: TcxGridTableOptionsView); -begin - inherited OptionsView := Value; -end; - -procedure TcxGridTableView.SetPreview(Value: TcxGridPreview); -begin - FPreview.Assign(Value); -end; - -procedure TcxGridTableView.SetStyles(Value: TcxGridTableViewStyles); -begin - inherited Styles := Value; -end; - -function TcxGridTableView.GetProperties(AProperties: TStrings): Boolean; -begin - with AProperties do - begin - Add('Footer'); - Add('GroupByBox'); - Add('GroupFooters'); - Add('NewItemRow'); - end; - Result := inherited GetProperties(AProperties); -end; - -procedure TcxGridTableView.GetPropertyValue(const AName: string; var AValue: Variant); -begin - if AName = 'Footer' then - AValue := OptionsView.Footer - else - if AName = 'GroupByBox' then - AValue := OptionsView.GroupByBox - else - if AName = 'GroupFooters' then - AValue := Variant(OptionsView.GroupFooters) - else - if AName = 'NewItemRow' then - AValue := NewItemRow.Visible - else - inherited; -end; - -procedure TcxGridTableView.SetPropertyValue(const AName: string; const AValue: Variant); -begin - if AName = 'Footer' then - OptionsView.Footer := AValue - else - if AName = 'GroupByBox' then - OptionsView.GroupByBox := AValue - else - if AName = 'GroupFooters' then - if VarIsStr(AValue) then // version 4 - if AValue then - OptionsView.GroupFooters := gfVisibleWhenExpanded - else - OptionsView.GroupFooters := gfInvisible - else // version > 4 - OptionsView.GroupFooters := TcxGridGroupFootersMode((AValue)) - else - if AName = 'NewItemRow' then - NewItemRow.Visible := AValue - else - inherited; -end; - -procedure TcxGridTableView.AssignLayout(ALayoutView: TcxCustomGridView); -begin - inherited; - with (ALayoutView as TcxGridTableView).OptionsView do - begin - Self.OptionsView.DataRowHeight := DataRowHeight; - Self.OptionsView.Footer := Footer; - Self.OptionsView.GroupByBox := GroupByBox; - Self.OptionsView.GroupFooters := GroupFooters; - Self.OptionsView.GroupRowHeight := GroupRowHeight; - end; -end; - -procedure TcxGridTableView.BeforeEditLayout(ALayoutView: TcxCustomGridView); -begin - inherited; - (ALayoutView as TcxGridTableView).AllowCellMerging := False; -end; - -function TcxGridTableView.GetLayoutCustomizationFormButtonCaption: string; -begin - Result := 'Columns customization'; -end; - -procedure TcxGridTableView.CreateOptions; -begin - inherited; - FFilterRow := GetFilterRowOptionsClass.Create(Self); - FNewItemRow := GetNewItemRowOptionsClass.Create(Self); - FPreview := GetPreviewClass.Create(Self); -end; - -procedure TcxGridTableView.DestroyOptions; -begin - FreeAndNil(FPreview); - FreeAndNil(FNewItemRow); - FreeAndNil(FFilterRow); - inherited; -end; - -function TcxGridTableView.CanCellMerging: Boolean; -begin - Result := AllowCellMerging and not FPreview.Active and (OptionsView.RowSeparatorWidth = 0); -end; - -function TcxGridTableView.CanOffset(ARecordCountDelta: Integer): Boolean; -begin - Result := inherited CanOffset(ARecordCountDelta) and not IsMaster; -end; - -function TcxGridTableView.CanOffsetHorz: Boolean; -begin - Result := not TcxCustomGrid(Control).UpdateLocked and - (not IsMaster or (GroupedColumnCount = 0)); -end; - -procedure TcxGridTableView.DetailDataChanged(ADetail: TcxCustomGridView); -begin - inherited; - if UpdateOnDetailDataChange(ADetail) then - SizeChanged; -end; - -procedure TcxGridTableView.DoAssign(ASource: TcxCustomGridView); -begin - if ASource is TcxGridTableView then - with TcxGridTableView(ASource) do - begin - Self.OnColumnHeaderClick := OnColumnHeaderClick; - Self.OnColumnPosChanged := OnColumnPosChanged; - Self.OnColumnSizeChanged := OnColumnSizeChanged; - Self.OnCustomDrawColumnHeader := OnCustomDrawColumnHeader; - Self.OnCustomDrawFooterCell := OnCustomDrawFooterCell; - Self.OnCustomDrawGroupCell := OnCustomDrawGroupCell; - Self.OnCustomDrawGroupSummaryCell := OnCustomDrawGroupSummaryCell; - Self.OnCustomDrawIndicatorCell := OnCustomDrawIndicatorCell; - Self.OnLeftPosChanged := OnLeftPosChanged; - end; - inherited; - if ASource is TcxGridTableView then - with TcxGridTableView(ASource) do - begin - Self.FilterRow := FilterRow; - Self.NewItemRow := NewItemRow; - Self.Preview := Preview; - end; -end; - -procedure TcxGridTableView.GetItemsListForClipboard(AItems: TList; ACopyAll: Boolean); -var - I: Integer; -begin - if ACopyAll or not Controller.CellMultiSelect then - inherited GetVisibleItemsList(AItems) - else - begin - inherited; - for I := AItems.Count - 1 downto 0 do - if not TcxGridColumn(AItems[I]).Selected then - AItems.Delete(I); - end; - if OptionsBehavior.CopyPreviewToClipboard then - if FPreview.Active then AItems.Add(FPreview.Column); -end; - -function TcxGridTableView.GetResizeOnBoundsChange: Boolean; -begin - Result := inherited GetResizeOnBoundsChange or - OptionsView.ColumnAutoWidth or Preview.Active or IsMaster; -end; - -function TcxGridTableView.HasCellMerging: Boolean; -var - I: Integer; -begin - for I := 0 to VisibleColumnCount - 1 do - begin - Result := VisibleColumns[I].CanCellMerging; - if Result then Exit; - end; - Result := False; -end; - -function TcxGridTableView.IsEqualHeightRecords: Boolean; -begin - Result := inherited IsEqualHeightRecords and - not ViewInfo.RecordsViewInfo.HasLastHorzGridLine(nil) and - not Preview.Active and (GroupedColumnCount = 0) and not IsMaster; -end; - -function TcxGridTableView.IsRecordHeightDependsOnData: Boolean; -begin - Result := inherited IsRecordHeightDependsOnData or - Preview.Active and Preview.AutoHeight; -end; - -function TcxGridTableView.UpdateOnDetailDataChange(ADetail: TcxCustomGridView): Boolean; -begin - Result := not OptionsView.ExpandButtonsForEmptyDetails; -end; - -function TcxGridTableView.GetControllerClass: TcxCustomGridControllerClass; -begin - Result := TcxGridTableController; -end; - -function TcxGridTableView.GetDataControllerClass: TcxCustomDataControllerClass; -begin - Result := TcxGridDataController; -end; - -function TcxGridTableView.GetPainterClass: TcxCustomGridPainterClass; -begin - Result := TcxGridTablePainter; -end; - -function TcxGridTableView.GetViewDataClass: TcxCustomGridViewDataClass; -begin - Result := TcxGridViewData; -end; - -function TcxGridTableView.GetViewInfoClass: TcxCustomGridViewInfoClass; -begin - Result := TcxGridTableViewInfo; -end; - -function TcxGridTableView.GetBackgroundBitmapsClass: TcxCustomGridBackgroundBitmapsClass; -begin - Result := TcxGridTableBackgroundBitmaps; -end; - -function TcxGridTableView.GetDateTimeHandlingClass: TcxCustomGridTableDateTimeHandlingClass; -begin - Result := TcxGridTableDateTimeHandling; -end; - -function TcxGridTableView.GetFilteringClass: TcxCustomGridTableFilteringClass; -begin - Result := TcxGridTableFiltering; -end; - -function TcxGridTableView.GetFilterRowOptionsClass: TcxGridFilterRowOptionsClass; -begin - Result := TcxGridFilterRowOptions; -end; - -function TcxGridTableView.GetNewItemRowOptionsClass: TcxGridNewItemRowOptionsClass; -begin - Result := TcxGridNewItemRowOptions; -end; - -function TcxGridTableView.GetOptionsBehaviorClass: TcxCustomGridOptionsBehaviorClass; -begin - Result := TcxGridTableOptionsBehavior; -end; - -function TcxGridTableView.GetOptionsCustomizeClass: TcxCustomGridTableOptionsCustomizeClass; -begin - Result := TcxGridTableOptionsCustomize; -end; - -function TcxGridTableView.GetOptionsDataClass: TcxCustomGridOptionsDataClass; -begin - Result := TcxGridTableOptionsData; -end; - -function TcxGridTableView.GetOptionsSelectionClass: TcxCustomGridOptionsSelectionClass; -begin - Result := TcxGridTableOptionsSelection; -end; - -function TcxGridTableView.GetOptionsViewClass: TcxCustomGridOptionsViewClass; -begin - Result := TcxGridTableOptionsView; -end; - -function TcxGridTableView.GetPreviewClass: TcxGridPreviewClass; -begin - Result := TcxGridPreview; -end; - -function TcxGridTableView.GetStylesClass: TcxCustomGridViewStylesClass; -begin - Result := TcxGridTableViewStyles; -end; - -function TcxGridTableView.GetSummaryGroupItemLinkClass: TcxDataSummaryGroupItemLinkClass; -begin - Result := TcxGridTableSummaryGroupItemLink; -end; - -function TcxGridTableView.GetSummaryItemClass: TcxDataSummaryItemClass; -begin - Result := TcxGridTableSummaryItem; -end; - -function TcxGridTableView.GetItemClass: TcxCustomGridTableItemClass; -begin - Result := TcxGridColumn; -end; - -procedure TcxGridTableView.ItemVisibilityChanged(AItem: TcxCustomGridTableItem; - Value: Boolean); -begin - if not Value and (AItem = Controller.CellSelectionAnchor) then - Controller.CellSelectionAnchor := Controller.FocusedColumn; - inherited; -end; - -function TcxGridTableView.CalculateDataCellSelected(ARecord: TcxCustomGridRecord; - AItem: TcxCustomGridTableItem; AUseViewInfo: Boolean; - ACellViewInfo: TcxGridTableCellViewInfo): Boolean; -begin - if Controller.CellMultiSelect and TcxCustomGridRow(ARecord).SupportsCellMultiSelect then - Result := (AItem <> nil) and TcxGridColumn(AItem).Selected and - (not (ACellViewInfo is TcxGridTableDataCellViewInfo) or - not TcxGridTableDataCellViewInfo(ACellViewInfo).Editing) - else - Result := inherited CalculateDataCellSelected(ARecord, AItem, AUseViewInfo, ACellViewInfo); -end; - -procedure TcxGridTableView.DoColumnHeaderClick(AColumn: TcxGridColumn); -begin - if Assigned(FOnColumnHeaderClick) then FOnColumnHeaderClick(Self, AColumn); -end; - -procedure TcxGridTableView.DoColumnPosChanged(AColumn: TcxGridColumn); -begin - if Assigned(FOnColumnPosChanged) then FOnColumnPosChanged(Self, AColumn); -end; - -procedure TcxGridTableView.DoColumnSizeChanged(AColumn: TcxGridColumn); -begin - if Assigned(FOnColumnSizeChanged) then FOnColumnSizeChanged(Self, AColumn); -end; - -procedure TcxGridTableView.DoCustomDrawColumnHeader(ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); -begin - if HasCustomDrawColumnHeader then - FOnCustomDrawColumnHeader(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridTableView.DoCustomDrawFooterCell(ACanvas: TcxCanvas; - AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); -begin - if HasCustomDrawFooterCell then - FOnCustomDrawFooterCell(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridTableView.DoCustomDrawGroupCell(ACanvas: TcxCanvas; - AViewInfo: TcxGridTableCellViewInfo; var ADone: Boolean); -begin - if HasCustomDrawGroupCell then - FOnCustomDrawGroupCell(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridTableView.DoCustomDrawGroupSummaryCell(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridViewCellViewInfo; var ADone: Boolean); -var - ACell: TcxGridGroupSummaryCellViewInfo; -begin - if HasCustomDrawGroupSummaryCell then - begin - ACell := TcxGridGroupSummaryCellViewInfo(AViewInfo); - FOnCustomDrawGroupSummaryCell(Self, ACanvas, ACell.RowViewInfo.GridRecord, - ACell.Column, ACell.SummaryItem, AViewInfo, ADone); - end; -end; - -procedure TcxGridTableView.DoCustomDrawIndicatorCell(ACanvas: TcxCanvas; - AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean); -begin - if HasCustomDrawIndicatorCell then - FOnCustomDrawIndicatorCell(Self, ACanvas, AViewInfo, ADone); -end; - -procedure TcxGridTableView.DoLeftPosChanged; -begin - if Assigned(FOnLeftPosChanged) then FOnLeftPosChanged(Self); -end; - -function TcxGridTableView.HasCustomDrawColumnHeader: Boolean; -begin - Result := Assigned(FOnCustomDrawColumnHeader); -end; - -function TcxGridTableView.HasCustomDrawFooterCell: Boolean; -begin - Result := Assigned(FOnCustomDrawFooterCell); -end; - -function TcxGridTableView.HasCustomDrawGroupCell: Boolean; -begin - Result := Assigned(FOnCustomDrawGroupCell); -end; - -function TcxGridTableView.HasCustomDrawGroupSummaryCell: Boolean; -begin - Result := Assigned(FOnCustomDrawGroupSummaryCell); -end; - -function TcxGridTableView.HasCustomDrawIndicatorCell: Boolean; -begin - Result := Assigned(FOnCustomDrawIndicatorCell); -end; - -function TcxGridTableView.CreateColumn: TcxGridColumn; -begin - Result := TcxGridColumn(CreateItem); -end; - -class function TcxGridTableView.CanBeLookupList: Boolean; -begin - Result := True; -end; - -{ TcxGridColumnAccess } - -class function TcxGridColumnAccess.CanCellMerging(AInstance: TcxGridColumn): Boolean; -begin - Result := AInstance.CanCellMerging; -end; - -class function TcxGridColumnAccess.CanShowGroupFooters(AInstance: TcxGridColumn): Boolean; -begin - Result := AInstance.CanShowGroupFooters; -end; - -class procedure TcxGridColumnAccess.DoCustomDrawGroupSummaryCell(AInstance: TcxGridColumn; - ACanvas: TcxCanvas; AViewInfo: TcxCustomGridViewCellViewInfo; var ADone: Boolean); -begin - AInstance.DoCustomDrawGroupSummaryCell(ACanvas, AViewInfo, ADone); -end; - -class function TcxGridColumnAccess.HasCustomDrawGroupSummaryCell(AInstance: TcxGridColumn): Boolean; -begin - Result := AInstance.HasCustomDrawGroupSummaryCell; -end; - -{ TcxGridTableViewAccess } - -class procedure TcxGridTableViewAccess.DoColumnPosChanged(AInstance: TcxGridTableView; - AColumn: TcxGridColumn); -begin - AInstance.DoColumnPosChanged(AColumn); -end; - -class procedure TcxGridTableViewAccess.DoCustomDrawGroupCell(AInstance: TcxGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridTableCellViewInfo; var ADone: Boolean); -begin - AInstance.DoCustomDrawGroupCell(ACanvas, AViewInfo, ADone); -end; - -class procedure TcxGridTableViewAccess.DoCustomDrawGroupSummaryCell(AInstance: TcxGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxCustomGridViewCellViewInfo; var ADone: Boolean); -begin - AInstance.DoCustomDrawGroupSummaryCell(ACanvas, AViewInfo, ADone); -end; - -class function TcxGridTableViewAccess.HasCustomDrawGroupCell(AInstance: TcxGridTableView): Boolean; -begin - Result := AInstance.HasCustomDrawGroupCell; -end; - -class function TcxGridTableViewAccess.HasCustomDrawGroupSummaryCell(AInstance: TcxGridTableView): Boolean; -begin - Result := AInstance.HasCustomDrawGroupSummaryCell; -end; - -initialization - cxGridRegisteredViews.Register(TcxGridTableView, 'Table'); - Classes.RegisterClasses([TcxGridColumn, TcxGridTableViewStyleSheet]); - -finalization - cxGridRegisteredViews.Unregister(TcxGridTableView); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUIBandedTableHelper.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUIBandedTableHelper.pas deleted file mode 100644 index ae4a30c3..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUIBandedTableHelper.pas +++ /dev/null @@ -1,83 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridUIBandedTableHelper; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils, cxGrid, cxGridCustomView, cxGridUIHelper, - cxGridCustomTableView, cxGridUICustomTableHelper, cxGridUITableHelper; - -type - TcxGridBandedTableViewOperationHelper = class(TcxGridTableViewOperationHelper) - protected - procedure RegisterOperations; override; - procedure DoShowBands(const AParameter: TcxCustomGridOperationHelperParameters); - public - class function GetViewClass: TcxCustomGridViewClass; override; - end; - -implementation - -uses - cxGridBandedTableView; - -{ TcxGridBandedTableViewOperationHelper } - -procedure TcxGridBandedTableViewOperationHelper.RegisterOperations; -begin - inherited RegisterOperations; - RegisterOperation(GROP_SHOWBANDS,DoShowBands); -end; - -procedure TcxGridBandedTableViewOperationHelper.DoShowBands( - const AParameter: TcxCustomGridOperationHelperParameters); -begin - If AParameter.IsPerform then - (AParameter.View as TcxGridBandedTableView).OptionsView.BandHeaders := GetShowProperty(AParameter) - else SetShowProperty(AParameter, (AParameter.View as TcxGridBandedTableView).OptionsView.BandHeaders); -end; - -class function TcxGridBandedTableViewOperationHelper.GetViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridBandedTableView; -end; - -initialization - RegisterGridViewOperationHelper(TcxGridBandedTableViewOperationHelper); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUICardHelper.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUICardHelper.pas deleted file mode 100644 index 844bf303..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUICardHelper.pas +++ /dev/null @@ -1,97 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridUICardHelper; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils, cxGrid, cxGridCustomView, cxGridUIHelper, - cxGridCustomTableView, cxGridUICustomTableHelper, cxGridCardView; - -type - TcxGridCardViewOperationHelper = class(TcxGridCustomTableViewOperationHelper) - protected - function GetCardViewFromParameter(const AParameter: TcxCustomGridOperationHelperParameters): TcxGridCardView; - procedure RegisterOperations; override; - procedure DoLayoutDirection(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoShowColumnsCustomizing(const AParameter: TcxCustomGridOperationHelperParameters); - public - class function GetViewClass: TcxCustomGridViewClass; override; - end; - -implementation - -function TcxGridCardViewOperationHelper.GetCardViewFromParameter(const AParameter: TcxCustomGridOperationHelperParameters): TcxGridCardView; -begin - Result := AParameter.View as TcxGridCardView; -end; - -procedure TcxGridCardViewOperationHelper.RegisterOperations; -begin - inherited RegisterOperations; - RegisterOperation(GROP_LAYOUTDIRECTION, DoLayoutDirection); - RegisterOperation(GROP_SHOWCOLUMNCUSTOMIZING, DoShowColumnsCustomizing); -end; - -procedure TcxGridCardViewOperationHelper.DoLayoutDirection( - const AParameter: TcxCustomGridOperationHelperParameters); -const - BoolToLayoutDirection: Array[Boolean] of TcxGridCardViewLayoutDirection = (ldHorizontal, ldVertical); - LayoutDirectionToBool: Array[TcxGridCardViewLayoutDirection] of Boolean = (False,True); -begin - If AParameter.IsPerform then - GetCardViewFromParameter(AParameter).LayoutDirection := - BoolToLayoutDirection[GetShowProperty(AParameter)] - else - SetShowProperty(AParameter,LayoutDirectionToBool[GetCardViewFromParameter(AParameter).LayoutDirection]); -end; - -procedure TcxGridCardViewOperationHelper.DoShowColumnsCustomizing(const AParameter: TcxCustomGridOperationHelperParameters); -begin - if AParameter.IsPerform then - GetCardViewFromParameter(AParameter).Controller.Customization := GetShowProperty(AParameter) - else SetShowProperty(AParameter, GetCardViewFromParameter(AParameter).Controller.Customization); -end; - -class function TcxGridCardViewOperationHelper.GetViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridCardView; -end; - -initialization - RegisterGridViewOperationHelper(TcxGridCardViewOperationHelper); -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUICustomTableHelper.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUICustomTableHelper.pas deleted file mode 100644 index 6f1558d7..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUICustomTableHelper.pas +++ /dev/null @@ -1,99 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridUICustomTableHelper; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils, cxGrid, cxGridCustomView, cxGridUIHelper, - cxGridCustomTableView; - -type - TcxGridCustomTableViewOperationHelper = class(TcxCustomGridViewOperationHelper) - protected - procedure RegisterOperations; override; - procedure DoCopyToClipboard(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoShowEditButtons(const AParameter: TcxCustomGridOperationHelperParameters); - public - class function GetViewClass: TcxCustomGridViewClass; override; - end; - -implementation - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - cxGridTableView, DB, cxGridDBDataDefinitions; - -{ TcxGridCustomTableViewOperationHelper } -procedure TcxGridCustomTableViewOperationHelper.RegisterOperations; -begin - inherited RegisterOperations; - RegisterOperation(GROP_SHOWEDITBUTTONS, DoShowEditButtons); - RegisterOperation(GROP_COPYTOCLIPBOARD, DoCopyToClipboard); -end; - -procedure TcxGridCustomTableViewOperationHelper.DoCopyToClipboard( - const AParameter: TcxCustomGridOperationHelperParameters); -begin - TcxCustomGridTableView(AParameter.View).CopyToClipboard(False); -end; - -procedure TcxGridCustomTableViewOperationHelper.DoShowEditButtons( - const AParameter: TcxCustomGridOperationHelperParameters); -const - ShowEditButtonsToBool: Array[TcxGridShowEditButtons] of Boolean = (False, False, True); - BoolToShowEditButtons: Array[Boolean] of TcxGridShowEditButtons = (gsebNever, gsebAlways); -begin - if AParameter.IsPerform then - TcxCustomGridTableView(AParameter.View).OptionsView.ShowEditButtons := - BoolToShowEditButtons[GetShowProperty(AParameter)] - else - SetShowProperty(AParameter, - ShowEditButtonsToBool[TcxCustomGridTableView(AParameter.View).OptionsView.ShowEditButtons]); -end; - -class function TcxGridCustomTableViewOperationHelper.GetViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridTableView; -end; - -initialization - RegisterGridViewOperationHelper(TcxGridCustomTableViewOperationHelper); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUIHelper.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUIHelper.pas deleted file mode 100644 index 5cee0497..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUIHelper.pas +++ /dev/null @@ -1,748 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridUIHelper; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils, cxGrid, cxGridCustomView; - -const - GROP_FIRST = 0; - GROP_LAST = 1; - GROP_PREV = 2; - GROP_NEXT = 3; - GROP_INSERT = 4; - GROP_DELETE = 5; - GROP_COPYTOCLIPBOARD = 6; - - GROP_SHOWCOLUMNCUSTOMIZING = 100; - GROP_SHOWGROUPINGPANEL = 101; - GROP_SHOWINDICATOR = 102; - GROP_INVERTSELECT = 103; - GROP_SHOWHEADERS = 104; - GROP_SHOWSUMMARYFOOTER = 105; - GROP_SHOWBANDS = 106; - GROP_SHOWGRID = 107; - GROP_COLUMNAUTOWIDTH = 108; - GROP_SHOWPREVIEW = 109; - GROP_SHOWEDITBUTTONS = 110; - GROP_LAYOUTDIRECTION = 111; - -type - TcxCustomGridOperationHelperParameters = class - private - FView: TcxCustomGridView; - FIsPerform: Boolean; - public - constructor Create(AView: TcxCustomGridView; AIsPerform: Boolean = True); virtual; - property View: TcxCustomGridView read FView; - property IsPerform: Boolean read FIsPerform; - end; - - TcxShowingGridOperationHelperParameters = class(TcxCustomGridOperationHelperParameters) - private - FShowing: Boolean; - public - property Showing: Boolean read FShowing write FShowing; - end; - - TcxGridOperationHelperProc = procedure(const AParameter: TcxCustomGridOperationHelperParameters) of object; - - TcxCustomGridViewOperationHelper = class - private - FList: TList; - protected - procedure RegisterOperation(AOperationIndex: Integer; const AProc: TcxGridOperationHelperProc); - procedure RegisterOperations; virtual; - function GetShowProperty(const AParameter: TcxCustomGridOperationHelperParameters): Boolean; - procedure SetShowProperty(const AParameter: TcxCustomGridOperationHelperParameters; AShow: Boolean); - - procedure DoFirst(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoLast(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoNext(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoPrev(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoInsert(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoDelete(const AParameter: TcxCustomGridOperationHelperParameters); - public - constructor Create; virtual; - destructor Destroy; override; - - class function GetViewClass: TcxCustomGridViewClass; virtual; - function IsOperationAccessible(AOperationIndex: Integer): Boolean; virtual; - function IsOperationEnabled(AView: TcxCustomGridView; AOperationIndex: Integer): Boolean; virtual; - procedure PerformOperation(AOperationIndex: Integer; const AParameter: TcxCustomGridOperationHelperParameters); virtual; - end; - - TcxCustomGridViewOperationHelperClass = class of TcxCustomGridViewOperationHelper; - - TcxCustomGridOperationHelper = class(TComponent) - private - FFocusedViewChangedNotification: TcxCustomGridNotification; - FGrid: TcxGrid; - FOnUpdateOperations: TNotifyEvent; - FOnFocusedRecordChanged: TNotifyEvent; - FOnCustomizationFormVisibleChanged: TNotifyEvent; - - function GetIsOperationAccessible(AOperationIndex: Integer): Boolean; - function GetIsOperationEnabled(AOperationIndex: Integer): Boolean; - function GetIsOperationShowing(AOperationIndex: Integer): Boolean; - procedure SetGrid(const Value: TcxGrid); - - //TODO Sender should be TObject?? - procedure DoFocusedViewChanged; - protected - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - procedure DoUpdateOperations; dynamic; - procedure DoFocusedRecordChanged; dynamic; - procedure DoCustomizationFormVisibleChanged; dynamic; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - - function FocusedView: TcxCustomGridView; - function FocusedViewClass: TcxCustomGridViewClass; - - procedure PerformOperation(AOperationIndex: Integer; const AParameters: TcxCustomGridOperationHelperParameters); - procedure PerformStarndardOperation(AOperationIndex: Integer); - procedure PerformShowingOperation(AOperationIndex: Integer; AShow: Boolean); - - property IsOperationAccessible[AOperationIndex: Integer]: Boolean read GetIsOperationAccessible; - property IsOperationEnabled[AOperationIndex: Integer]: Boolean read GetIsOperationEnabled; - property IsOperationShowing[AOperationIndex: Integer]: Boolean read GetIsOperationShowing; - public - procedure DoFirst; - procedure DoLast; - procedure DoNext; - procedure DoPrev; - procedure DoInsert; - procedure DoDelete; - procedure CopyToClipboard; - - procedure DoShowColumnCustomizing(AShow: Boolean); - procedure DoShowGroupingPanel(AShow: Boolean); - procedure DoShowHeaders(AShow: Boolean); - procedure DoShowBands(AShow: Boolean); - procedure DoShowSummaryFooter(AShow: Boolean); - procedure DoShowGrid(AShow: Boolean); - procedure DoColumnAutoWidth(AShow: Boolean); - procedure DoShowPreview(AShow: Boolean); - procedure DoShowEditButtons(AShow: Boolean); - procedure DoLayoutDirection(AShow: Boolean); - procedure DoInvertSelect(AShow: Boolean); - procedure DoShowIndicator(AShow: Boolean); - - function IsColumnsCustomizingShowing: Boolean; - function IsGroupingPanelShowing: Boolean; - function IsHeadersShowing: Boolean; - function IsBandsShowing: Boolean; - function IsSummaryFooterShowing: Boolean; - function IsGridShowing: Boolean; - function IsColumnAutoWidth: Boolean; - function IsShowPreview: Boolean; - function IsShowEditButtons: Boolean; - function IsVertLayoutDirection: Boolean; - function IsInvertSelect: Boolean; - function IsShowIndicator: Boolean; - - property Grid: TcxGrid read FGrid write SetGrid; - property OnUpdateOperations: TNotifyEvent read FOnUpdateOperations write FOnUpdateOperations; - property onFocusedRecordChanged: TNotifyEvent read FOnFocusedRecordChanged write FOnFocusedRecordChanged; - property OnCustomizationFormVisibleChanged: TNotifyEvent read FOnCustomizationFormVisibleChanged - write FOnCustomizationFormVisibleChanged; - end; - - TcxGridOperationHelper = class(TcxCustomGridOperationHelper) - published - property Grid; - property OnUpdateOperations; - end; - - procedure RegisterGridViewOperationHelper(AGridViewOperationHelperClass: TcxCustomGridViewOperationHelperClass); - procedure UnregisterGridViewOperationHelper(AGridViewOperationHelperClass: TcxCustomGridViewOperationHelperClass); - function GetGridViewOperationHelperByGridViewClass(const AGridViewClass: TcxCustomGridViewClass): TcxCustomGridViewOperationHelper; - -implementation - -uses - cxCustomData, cxGridCustomTableView; - -type - TcxCustomGridViewOperationHelperRec = record - Index: Integer; - Proc: TcxGridOperationHelperProc; - end; - - PcxCustomGridViewOperationHelperRec = ^TcxCustomGridViewOperationHelperRec; - - TcxGridNotifications = class(TcxCustomGridNotification) - private - FGridOperationHelper: TcxCustomGridOperationHelper; - protected - procedure Notify(AKind: TcxGridNotificationKind; AData: TObject; var AHandled: Boolean); override; - function NotificationKinds: TcxGridNotificationKinds; override; - end; - - procedure TcxGridNotifications.Notify(AKind: TcxGridNotificationKind; AData: TObject; - var AHandled: Boolean); - begin - case AKind of - gnkFocusedViewChanged: - FGridOperationHelper.DoFocusedViewChanged; - gnkFocusedRecordChanged, gnkRecordCountChanged: - FGridOperationHelper.DoFocusedRecordChanged; - gnkCustomization: - FGridOperationHelper.DoCustomizationFormVisibleChanged; - end; - end; - - function TcxGridNotifications.NotificationKinds: TcxGridNotificationKinds; - begin - Result := [gnkFocusedViewChanged, gnkFocusedRecordChanged, gnkRecordCountChanged, gnkCustomization]; - end; - -{ TcxCustomGridOperationHelperParameters } -constructor TcxCustomGridOperationHelperParameters.Create( - AView: TcxCustomGridView; AIsPerform: Boolean = True); -begin - inherited Create; - FView := AView; - FIsPerform := AIsPerform; -end; - -{ TcxCustomGridViewOperationHelper } -constructor TcxCustomGridViewOperationHelper.Create; -begin - inherited Create; - FList := TList.Create; - RegisterOperations; -end; - -destructor TcxCustomGridViewOperationHelper.Destroy; -var - I: Integer; -begin - for I := 0 to FList.Count - 1 do - Dispose(PcxCustomGridViewOperationHelperRec(FList[I])); - FList.Free; - inherited Destroy; -end; - -class function TcxCustomGridViewOperationHelper.GetViewClass: TcxCustomGridViewClass; -begin - Result := TcxCustomGridView; -end; - -procedure TcxCustomGridViewOperationHelper.RegisterOperation(AOperationIndex: Integer; const AProc: TcxGridOperationHelperProc); -var - ARec: PcxCustomGridViewOperationHelperRec; -begin - New(ARec); - ARec.Index := AOperationIndex; - ARec.Proc := AProc; - FList.Add(ARec); -end; - -procedure TcxCustomGridViewOperationHelper.RegisterOperations; -begin - RegisterOperation(GROP_FIRST, DoFirst); - RegisterOperation(GROP_LAST, DoLast); - RegisterOperation(GROP_NEXT, DoNext); - RegisterOperation(GROP_PREV, DoPrev); - RegisterOperation(GROP_INSERT, DoInsert); - RegisterOperation(GROP_DELETE, DoDelete); -end; - -function TcxCustomGridViewOperationHelper.IsOperationAccessible(AOperationIndex: Integer): Boolean; -var - I: Integer; -begin - Result := False; - for I := 0 to FList.Count - 1 do - if PcxCustomGridViewOperationHelperRec(FList[I]).Index = AOperationIndex then - begin - Result := True; - break; - end; -end; - -function TcxCustomGridViewOperationHelper.IsOperationEnabled(AView: TcxCustomGridView; AOperationIndex: Integer): Boolean; - - function CanDelete: Boolean; - begin - Result := dceoDelete in AView.DataController.EditOperations; - if Result and (AView is TcxCustomGridTableView) then - Result := TcxCustomGridTableView(AView).OptionsData.Deleting; - end; - - function CanInsert: Boolean; - begin - Result := dceoInsert in AView.DataController.EditOperations;; - if Result and (AView is TcxCustomGridTableView) then - Result := TcxCustomGridTableView(AView).OptionsData.Inserting; - end; - -begin - Result := True; - case AOperationIndex of - GROP_FIRST, GROP_PREV: - Result := AView.DataController.Active and not AView.DataController.IsBOF; - GROP_LAST, GROP_NEXT: - Result := AView.DataController.Active and not AView.DataController.IsEOF; - GROP_INSERT: - Result := AView.DataController.Active and CanInsert; - GROP_DELETE: - Result := AView.DataController.Active and CanDelete; - end; -end; - -procedure TcxCustomGridViewOperationHelper.PerformOperation(AOperationIndex: Integer; const AParameter: TcxCustomGridOperationHelperParameters); -var - I: Integer; -begin - for I := 0 to FList.Count - 1 do - if PcxCustomGridViewOperationHelperRec(FList[I]).Index = AOperationIndex then - begin - PcxCustomGridViewOperationHelperRec(FList[I]).Proc(AParameter); - break; - end; -end; - -function TcxCustomGridViewOperationHelper.GetShowProperty( - const AParameter: TcxCustomGridOperationHelperParameters): Boolean; -begin - if AParameter is TcxShowingGridOperationHelperParameters then - Result := (AParameter as TcxShowingGridOperationHelperParameters).Showing - else Result := False; -end; - -procedure TcxCustomGridViewOperationHelper.SetShowProperty( - const AParameter: TcxCustomGridOperationHelperParameters; AShow: Boolean); -begin - if AParameter is TcxShowingGridOperationHelperParameters then - (AParameter as TcxShowingGridOperationHelperParameters).Showing := AShow; -end; - -procedure TcxCustomGridViewOperationHelper.DoFirst(const AParameter: TcxCustomGridOperationHelperParameters); -begin - AParameter.View.DataController.GotoFirst; -end; - -procedure TcxCustomGridViewOperationHelper.DoLast(const AParameter: TcxCustomGridOperationHelperParameters); -begin - AParameter.View.DataController.GotoLast; -end; - -procedure TcxCustomGridViewOperationHelper.DoNext(const AParameter: TcxCustomGridOperationHelperParameters); -begin - AParameter.View.DataController.GotoNext; -end; - -procedure TcxCustomGridViewOperationHelper.DoPrev(const AParameter: TcxCustomGridOperationHelperParameters); -begin - AParameter.View.DataController.GotoPrev; -end; - -procedure TcxCustomGridViewOperationHelper.DoInsert(const AParameter: TcxCustomGridOperationHelperParameters); -begin - AParameter.View.DataController.Insert; -end; - -procedure TcxCustomGridViewOperationHelper.DoDelete(const AParameter: TcxCustomGridOperationHelperParameters); -begin - if AParameter.View.DataController.GetSelectedCount > 0 then - AParameter.View.DataController.DeleteSelection - else AParameter.View.DataController.DeleteFocused; -end; - -{ TcxCustomGridToolBarHelper } -constructor TcxCustomGridOperationHelper.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FFocusedViewChangedNotification := TcxGridNotifications.Create; - TcxGridNotifications(FFocusedViewChangedNotification).FGridOperationHelper := Self; -end; - -destructor TcxCustomGridOperationHelper.Destroy; -begin - Grid := nil; - FreeAndNil(FFocusedViewChangedNotification); - inherited Destroy; -end; - -procedure TcxCustomGridOperationHelper.Notification(AComponent: TComponent; - Operation: TOperation); -begin - inherited Notification(AComponent, Operation); - if (Operation = opRemove) and (AComponent = Grid) then - FGrid := nil; -end; - -procedure TcxCustomGridOperationHelper.DoUpdateOperations; -begin - if Assigned(FOnUpdateOperations) then - FOnUpdateOperations(self); -end; - -procedure TcxCustomGridOperationHelper.DoFocusedRecordChanged; -begin - if Assigned(FOnFocusedRecordChanged) then - FOnFocusedRecordChanged(self); -end; - -procedure TcxCustomGridOperationHelper.DoCustomizationFormVisibleChanged; -begin - if Assigned(FonCustomizationFormVisibleChanged) then - FonCustomizationFormVisibleChanged(self); -end; - -function TcxCustomGridOperationHelper.FocusedView: TcxCustomGridView; -begin - if Grid <> nil then - Result := Grid.FocusedView - else Result := nil; -end; - -function TcxCustomGridOperationHelper.FocusedViewClass: TcxCustomGridViewClass; -begin - if FocusedView <> nil then - Result := TcxCustomGridViewClass(FocusedView.ClassType) - else Result := nil; -end; - -procedure TcxCustomGridOperationHelper.PerformOperation(AOperationIndex: Integer; - const AParameters: TcxCustomGridOperationHelperParameters); -begin - if IsOperationEnabled[AOperationIndex] then - GetGridViewOperationHelperByGridViewClass( - FocusedViewClass).PerformOperation(AOperationIndex, AParameters); -end; - -function TcxCustomGridOperationHelper.GetIsOperationAccessible(AOperationIndex: Integer): Boolean; -var - AGridViewHelper: TcxCustomGridViewOperationHelper; -begin - if FocusedView <> nil then - begin - AGridViewHelper := GetGridViewOperationHelperByGridViewClass(FocusedViewClass); - Result := (AGridViewHelper <> nil) and AGridViewHelper.IsOperationAccessible(AOperationIndex); - end else Result := False; -end; - -function TcxCustomGridOperationHelper.GetIsOperationEnabled(AOperationIndex: Integer): Boolean; -begin - Result := IsOperationAccessible[AOperationIndex] and - GetGridViewOperationHelperByGridViewClass( - FocusedViewClass).IsOperationEnabled(FocusedView, AOperationIndex); -end; - -procedure TcxCustomGridOperationHelper.DoFocusedViewChanged; -begin - if not (csDestroying in ComponentState) and not (csDesigning in ComponentState) and - (Grid <> nil) and not (csDestroying in Grid.ComponentState) then - DoUpdateOperations; -end; - -procedure TcxCustomGridOperationHelper.SetGrid(const Value: TcxGrid); -begin - if FGrid <> Value then - begin - if (FGrid <> nil) and not (csDestroying in FGrid.ComponentState) then - begin - FGrid.RemoveFreeNotification(self); - FGrid.UnregisterNotification(FFocusedViewChangedNotification); - end; - FGrid := Value; - if FGrid <> nil then - begin - FGrid.FreeNotification(self); - FGrid.RegisterNotification(FFocusedViewChangedNotification); - end; - end; -end; - -procedure TcxCustomGridOperationHelper.PerformStarndardOperation(AOperationIndex: Integer); -var - AParameters: TcxCustomGridOperationHelperParameters; -begin - AParameters := TcxCustomGridOperationHelperParameters.Create(FocusedView); - try - PerformOperation(AOperationIndex, AParameters); - finally - AParameters.Free; - end; -end; - -procedure TcxCustomGridOperationHelper.PerformShowingOperation(AOperationIndex: Integer; AShow: Boolean); -var - AParameters: TcxShowingGridOperationHelperParameters; -begin - AParameters := TcxShowingGridOperationHelperParameters.Create(FocusedView); - AParameters.Showing := AShow; - try - PerformOperation(AOperationIndex, AParameters); - finally - AParameters.Free; - end; -end; - -function TcxCustomGridOperationHelper.GetIsOperationShowing(AOperationIndex: Integer): Boolean; -var - AParameters: TcxShowingGridOperationHelperParameters; -begin - AParameters := TcxShowingGridOperationHelperParameters.Create(FocusedView, False); - try - PerformOperation(AOperationIndex, AParameters); - Result := AParameters.Showing; - finally - AParameters.Free; - end; -end; - -procedure TcxCustomGridOperationHelper.DoFirst; -begin - PerformStarndardOperation(GROP_FIRST); -end; - -procedure TcxCustomGridOperationHelper.DoLast; -begin - PerformStarndardOperation(GROP_LAST); -end; - -procedure TcxCustomGridOperationHelper.DoNext; -begin - PerformStarndardOperation(GROP_NEXT); -end; - -procedure TcxCustomGridOperationHelper.DoPrev; -begin - PerformStarndardOperation(GROP_PREV); -end; - -procedure TcxCustomGridOperationHelper.DoInsert; -begin - PerformStarndardOperation(GROP_INSERT); -end; - -procedure TcxCustomGridOperationHelper.DoDelete; -begin - PerformStarndardOperation(GROP_DELETE); -end; - -procedure TcxCustomGridOperationHelper.CopyToClipboard; -begin - PerformStarndardOperation(GROP_COPYTOCLIPBOARD); -end; - -procedure TcxCustomGridOperationHelper.DoShowColumnCustomizing(AShow: Boolean); -begin - PerformShowingOperation(GROP_SHOWCOLUMNCUSTOMIZING, AShow); -end; - -procedure TcxCustomGridOperationHelper.DoShowGroupingPanel(AShow: Boolean); -begin - PerformShowingOperation(GROP_SHOWGROUPINGPANEL, AShow); -end; - -procedure TcxCustomGridOperationHelper.DoShowHeaders(AShow: Boolean); -begin - PerformShowingOperation(GROP_SHOWHEADERS, AShow); -end; - -procedure TcxCustomGridOperationHelper.DoShowBands(AShow: Boolean); -begin - PerformShowingOperation(GROP_SHOWBANDS, AShow); -end; - -procedure TcxCustomGridOperationHelper.DoShowSummaryFooter(AShow: Boolean); -begin - PerformShowingOperation(GROP_SHOWSUMMARYFOOTER, AShow); -end; - -procedure TcxCustomGridOperationHelper.DoShowGrid(AShow: Boolean); -begin - PerformShowingOperation(GROP_SHOWGRID, AShow); -end; - -procedure TcxCustomGridOperationHelper.DoColumnAutoWidth(AShow: Boolean); -begin - PerformShowingOperation(GROP_COLUMNAUTOWIDTH, AShow); -end; - -procedure TcxCustomGridOperationHelper.DoShowPreview(AShow: Boolean); -begin - PerformShowingOperation(GROP_SHOWPREVIEW, AShow); -end; - -procedure TcxCustomGridOperationHelper.DoShowEditButtons(AShow: Boolean); -begin - PerformShowingOperation(GROP_SHOWEDITBUTTONS, AShow); -end; - -procedure TcxCustomGridOperationHelper.DoLayoutDirection(AShow: Boolean); -begin - PerformShowingOperation(GROP_LAYOUTDIRECTION, AShow); -end; - -procedure TcxCustomGridOperationHelper.DoInvertSelect(AShow: Boolean); -begin - PerformShowingOperation(GROP_INVERTSELECT, AShow); -end; - -procedure TcxCustomGridOperationHelper.DoShowIndicator(AShow: Boolean); -begin - PerformShowingOperation(GROP_SHOWINDICATOR, AShow); -end; - -function TcxCustomGridOperationHelper.IsColumnsCustomizingShowing: Boolean; -begin - Result := IsOperationShowing[GROP_SHOWCOLUMNCUSTOMIZING]; -end; - -function TcxCustomGridOperationHelper.IsGroupingPanelShowing: Boolean; -begin - Result := IsOperationShowing[GROP_SHOWGROUPINGPANEL]; -end; - -function TcxCustomGridOperationHelper.IsHeadersShowing: Boolean; -begin - Result := IsOperationShowing[GROP_SHOWHEADERS]; -end; - -function TcxCustomGridOperationHelper.IsBandsShowing: Boolean; -begin - Result := IsOperationShowing[GROP_SHOWBANDS]; -end; - -function TcxCustomGridOperationHelper.IsSummaryFooterShowing: Boolean; -begin - Result := IsOperationShowing[GROP_SHOWSUMMARYFOOTER]; -end; - -function TcxCustomGridOperationHelper.IsGridShowing: Boolean; -begin - Result := IsOperationShowing[GROP_SHOWGRID]; -end; - -function TcxCustomGridOperationHelper.IsColumnAutoWidth: Boolean; -begin - Result := IsOperationShowing[GROP_COLUMNAUTOWIDTH]; -end; - -function TcxCustomGridOperationHelper.IsShowPreview: Boolean; -begin - Result := IsOperationShowing[GROP_SHOWPREVIEW]; -end; - -function TcxCustomGridOperationHelper.IsShowEditButtons: Boolean; -begin - Result := IsOperationShowing[GROP_SHOWEDITBUTTONS]; -end; - -function TcxCustomGridOperationHelper.IsVertLayoutDirection: Boolean; -begin - Result := IsOperationShowing[GROP_LAYOUTDIRECTION]; -end; - -function TcxCustomGridOperationHelper.IsInvertSelect: Boolean; -begin - Result := IsOperationShowing[GROP_INVERTSELECT]; -end; - -function TcxCustomGridOperationHelper.IsShowIndicator: Boolean; -begin - Result := IsOperationShowing[GROP_SHOWINDICATOR]; -end; - -var - FGridViewOperationHelperList: TList = nil; - -procedure RegisterGridViewOperationHelper(AGridViewOperationHelperClass: TcxCustomGridViewOperationHelperClass); -begin - FGridViewOperationHelperList.Add(AGridViewOperationHelperClass.Create); -end; - -procedure UnregisterGridViewOperationHelper(AGridViewOperationHelperClass: TcxCustomGridViewOperationHelperClass); -var - I: Integer; -begin - for I := 0 to FGridViewOperationHelperList.Count - 1 do - if TcxCustomGridViewOperationHelper(FGridViewOperationHelperList[I]).ClassType = AGridViewOperationHelperClass then - begin - TcxCustomGridViewOperationHelper(FGridViewOperationHelperList[I]).Free; - FGridViewOperationHelperList.Delete(I); - end; -end; - -function GetGridViewOperationHelperByGridViewClass(const AGridViewClass: TcxCustomGridViewClass): TcxCustomGridViewOperationHelper; -var - AItem: TcxCustomGridViewOperationHelper; - I: Integer; -begin - Result := nil; - for I := 0 to FGridViewOperationHelperList.Count - 1 do - begin - AItem := TcxCustomGridViewOperationHelper(FGridViewOperationHelperList[I]); - if AItem.GetViewClass = AGridViewClass then - begin - Result := AItem; - break; - end; - if AGridViewClass.InheritsFrom(AItem.GetViewClass) then - if (Result = nil) or not Result.InheritsFrom(AItem.GetViewClass) then - Result := AItem; - end; -end; - -procedure ClearGridViewOperationHelperList; -var - I: Integer; -begin - for I := 0 to FGridViewOperationHelperList.Count - 1 do - TcxCustomGridViewOperationHelper(FGridViewOperationHelperList[I]).Free; - FGridViewOperationHelperList.Clear; -end; - -initialization - FGridViewOperationHelperList := TList.Create; - RegisterGridViewOperationHelper(TcxCustomGridViewOperationHelper); - -finalization - ClearGridViewOperationHelperList; - FGridViewOperationHelperList.Free; - FGridViewOperationHelperList := nil; -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUITableHelper.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUITableHelper.pas deleted file mode 100644 index 7b29436d..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridUITableHelper.pas +++ /dev/null @@ -1,197 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid Utils } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridUITableHelper; - -{$I cxVer.inc} - -interface - -uses - Classes, SysUtils, cxGrid, cxGridCustomView, cxGridUIHelper, - cxGridCustomTableView, cxGridUICustomTableHelper; - -type - TcxGridTableViewOperationHelper = class(TcxGridCustomTableViewOperationHelper) - protected - procedure RegisterOperations; override; - procedure DoShowColumnsCustomizing(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoShowGroupingPanel(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoShowSummaryFooter(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoShowGrid(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoColumnAutoWidth(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoShowPreview(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoShowHeaders(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoShowColumnCustomize(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoInvertSelect(const AParameter: TcxCustomGridOperationHelperParameters); - procedure DoShowIndicator(const AParameter: TcxCustomGridOperationHelperParameters); - public - class function GetViewClass: TcxCustomGridViewClass; override; - function IsOperationEnabled(AView: TcxCustomGridView; AOperationIndex: Integer): Boolean; override; - end; - -implementation - -uses - cxGridTableView, cxGraphics; - -//TODO move SHow/Hide to public - -{ TcxGridTableViewOperationHelper } -procedure TcxGridTableViewOperationHelper.RegisterOperations; -begin - inherited RegisterOperations; - RegisterOperation(GROP_SHOWCOLUMNCUSTOMIZING, DoShowColumnsCustomizing); - RegisterOperation(GROP_SHOWGROUPINGPANEL, DoShowGroupingPanel); - RegisterOperation(GROP_SHOWSUMMARYFOOTER, DoShowSummaryFooter); - RegisterOperation(GROP_SHOWGRID, DoShowGrid); - RegisterOperation(GROP_COLUMNAUTOWIDTH, DoColumnAutoWidth); - RegisterOperation(GROP_SHOWPREVIEW, DoShowPreview); - RegisterOperation(GROP_SHOWHEADERS, DoShowHeaders); - RegisterOperation(GROP_SHOWCOLUMNCUSTOMIZING, DoShowColumnCustomize); - RegisterOperation(GROP_INVERTSELECT, DoInvertSelect); - RegisterOperation(GROP_SHOWINDICATOR, DoShowIndicator); -end; - -procedure TcxGridTableViewOperationHelper.DoShowColumnsCustomizing( - const AParameter: TcxCustomGridOperationHelperParameters); -begin - if AParameter.IsPerform then - (AParameter.View as TcxGridTableView).Controller.Customization := GetShowProperty(AParameter) - else SetShowProperty(AParameter, (AParameter.View as TcxGridTableView).Controller.Customization); -end; - -procedure TcxGridTableViewOperationHelper.DoShowGroupingPanel( - const AParameter: TcxCustomGridOperationHelperParameters); -begin - if AParameter.IsPerform then - (AParameter.View as TcxGridTableView).OptionsView.GroupByBox := GetShowProperty(AParameter) - else SetShowProperty(AParameter, (AParameter.View as TcxGridTableView).OptionsView.GroupByBox); -end; - -procedure TcxGridTableViewOperationHelper.DoShowSummaryFooter( - const AParameter: TcxCustomGridOperationHelperParameters); -begin - if AParameter.IsPerform then - (AParameter.View as TcxGridTableView).OptionsView.Footer := GetShowProperty(AParameter) - else SetShowProperty(AParameter, (AParameter.View as TcxGridTableView).OptionsView.Footer); -end; - -procedure TcxGridTableViewOperationHelper.DoShowGrid( - const AParameter: TcxCustomGridOperationHelperParameters); -const - GridLinesToBool: Array[TcxGridLines] of Boolean = (True, False, False, False); - BoolToGridLines: Array[Boolean] of TcxGridLines = (glNone, glBoth); -begin - if AParameter.IsPerform then - (AParameter.View as TcxGridTableView).OptionsView.GridLines := BoolToGridLines[GetShowProperty(AParameter)] - else SetShowProperty(AParameter, GridLinesToBool[(AParameter.View as TcxGridTableView).OptionsView.GridLines]); -end; - -procedure TcxGridTableViewOperationHelper.DoColumnAutoWidth( - const AParameter: TcxCustomGridOperationHelperParameters); -begin - if AParameter.IsPerform then - (AParameter.View as TcxGridTableView).OptionsView.ColumnAutoWidth := GetShowProperty(AParameter) - else SetShowProperty(AParameter, (AParameter.View as TcxGridTableView).OptionsView.ColumnAutoWidth); -end; - -procedure TcxGridTableViewOperationHelper.DoShowPreview( - const AParameter: TcxCustomGridOperationHelperParameters); -begin - if AParameter.IsPerform then - (AParameter.View as TcxGridTableView).Preview.Visible := GetShowProperty(AParameter) - else SetShowProperty(AParameter, (AParameter.View as TcxGridTableView).Preview.Visible); -end; - -procedure TcxGridTableViewOperationHelper.DoShowHeaders( - const AParameter: TcxCustomGridOperationHelperParameters); -begin - if AParameter.IsPerform then - (AParameter.View as TcxGridTableView).OptionsView.Header := GetShowProperty(AParameter) - else SetShowProperty(AParameter, (AParameter.View as TcxGridTableView).OptionsView.Header); -end; - -class function TcxGridTableViewOperationHelper.GetViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridTableView; -end; - -function TcxGridTableViewOperationHelper.IsOperationEnabled(AView: TcxCustomGridView; - AOperationIndex: Integer): Boolean; -begin - case AOperationIndex of - GROP_SHOWINDICATOR: - Result := not (AView as TcxGridTableView).ViewInfo.IndicatorViewInfo.AlwaysVisible; - GROP_SHOWPREVIEW: - Result := (AView as TcxGridTableView).Preview.Column <> nil; - else - Result := inherited IsOperationEnabled(AView, AOperationIndex); - end; -end; - -procedure TcxGridTableViewOperationHelper.DoShowColumnCustomize( - const AParameter: TcxCustomGridOperationHelperParameters); -begin - if AParameter.IsPerform then - TcxGridTableView(AParameter.View).Controller.Customization := - TcxShowingGridOperationHelperParameters(AParameter).Showing - else SetShowProperty(AParameter, - TcxGridTableView(AParameter.View).Controller.Customization); -end; - -procedure TcxGridTableViewOperationHelper.DoInvertSelect( - const AParameter: TcxCustomGridOperationHelperParameters); -begin - if AParameter.IsPerform then - TcxGridTableView(AParameter.View).OptionsSelection.InvertSelect := - TcxShowingGridOperationHelperParameters(AParameter).Showing - else SetShowProperty(AParameter, - TcxGridTableView(AParameter.View).OptionsSelection.InvertSelect); -end; - -procedure TcxGridTableViewOperationHelper.DoShowIndicator( - const AParameter: TcxCustomGridOperationHelperParameters); -begin - if AParameter.IsPerform then - TcxGridTableView(AParameter.View).OptionsView.Indicator := - TcxShowingGridOperationHelperParameters(AParameter).Showing - else SetShowProperty(AParameter, - TcxGridTableView(AParameter.View).OptionsView.Indicator); -end; - -initialization - RegisterGridViewOperationHelper(TcxGridTableViewOperationHelper); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridVer.inc b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridVer.inc deleted file mode 100644 index b2c3e840..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridVer.inc +++ /dev/null @@ -1 +0,0 @@ -{$DEFINE USETABCONTROL} diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridViewLayoutEditor.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridViewLayoutEditor.dfm deleted file mode 100644 index f4520c95..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridViewLayoutEditor.dfm +++ /dev/null @@ -1,110 +0,0 @@ -object cxGridViewLayoutEditor: TcxGridViewLayoutEditor - Left = 350 - Top = 204 - BorderIcons = [biSystemMenu] - Caption = 'Layout and Data Editor' - ClientHeight = 466 - ClientWidth = 692 - Color = clBtnFace - ParentFont = True - OldCreateOrder = False - Position = poScreenCenter - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object pnlBottom: TPanel - Left = 0 - Top = 432 - Width = 692 - Height = 34 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - object pnlButtons: TPanel - Left = 523 - Top = 0 - Width = 169 - Height = 34 - Align = alRight - BevelOuter = bvNone - TabOrder = 2 - object btnOK: TcxButton - Left = 4 - Top = 5 - Width = 75 - Height = 24 - Caption = 'OK' - ModalResult = 1 - TabOrder = 0 - end - object btnCancel: TcxButton - Left = 89 - Top = 5 - Width = 75 - Height = 24 - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - end - object pnlLayoutCustomization: TPanel - Left = 0 - Top = 0 - Width = 153 - Height = 34 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object btnLayoutCustomization: TcxButton - Left = 8 - Top = 5 - Width = 134 - Height = 24 - TabOrder = 0 - OnClick = btnLayoutCustomizationClick - end - end - object pnlSaveOptions: TPanel - Left = 153 - Top = 0 - Width = 192 - Height = 34 - Align = alLeft - BevelOuter = bvNone - TabOrder = 1 - object chbSaveLayout: TcxCheckBox - Left = 11 - Top = 7 - Caption = 'Save layout' - State = cbsChecked - TabOrder = 0 - Width = 81 - end - object chbSaveData: TcxCheckBox - Left = 107 - Top = 7 - Caption = 'Save data' - State = cbsChecked - TabOrder = 1 - Width = 81 - end - end - end - object pnlClient: TPanel - Left = 0 - Top = 0 - Width = 692 - Height = 432 - Align = alClient - BevelOuter = bvNone - BorderWidth = 3 - Constraints.MinHeight = 200 - Constraints.MinWidth = 300 - TabOrder = 1 - end - object pmGrid: TcxGridPopupMenu - PopupMenus = <> - Left = 400 - Top = 319 - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridViewLayoutEditor.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridViewLayoutEditor.pas deleted file mode 100644 index 45656ad1..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxGridViewLayoutEditor.pas +++ /dev/null @@ -1,165 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxGridViewLayoutEditor; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, ExtCtrls, StdCtrls, cxStyles, cxGridLevel, cxControls, cxGrid, - cxGridCustomView, cxGridCustomPopupMenu, cxGridPopupMenu, Menus, - cxLookAndFeelPainters, cxContainer, cxEdit, cxCheckBox, cxButtons; - -type - TcxGridViewLayoutEditor = class(TForm) - pnlBottom: TPanel; - pnlClient: TPanel; - pnlButtons: TPanel; - btnOK: TcxButton; - btnCancel: TcxButton; - pnlLayoutCustomization: TPanel; - btnLayoutCustomization: TcxButton; - pnlSaveOptions: TPanel; - chbSaveLayout: TcxCheckBox; - chbSaveData: TcxCheckBox; - pmGrid: TcxGridPopupMenu; - procedure btnLayoutCustomizationClick(Sender: TObject); - procedure FormShow(Sender: TObject); - private - FOriginalView: TcxCustomGridView; - FView: TcxCustomGridView; - function GetDataControllerSupport: IcxCustomGridDataController; - function GetViewSupport: IcxGridViewLayoutEditorSupport; - public - constructor Create(AView: TcxCustomGridView); reintroduce; virtual; - procedure Load; - procedure Save; - property DataControllerSupport: IcxCustomGridDataController read GetDataControllerSupport; - property ViewSupport: IcxGridViewLayoutEditorSupport read GetViewSupport; - end; - -function ShowGridViewEditor(AView: TcxCustomGridView): Boolean; - -implementation - -{$R *.dfm} - -uses - cxLookAndFeels, cxData; - -const - CloseButtonCaption = 'Close'; - -function ShowGridViewEditor(AView: TcxCustomGridView): Boolean; -var - AForm: TcxGridViewLayoutEditor; -begin - AForm := TcxGridViewLayoutEditor.Create(AView); - try - Result := AForm.ShowModal = mrOK; - if Result then AForm.Save; - finally - AForm.Free; - end; -end; - -{ TcxGridViewLayoutEditor } - -constructor TcxGridViewLayoutEditor.Create(AView: TcxCustomGridView); -var - AGrid: TcxGrid; -begin - inherited Create(nil); - FOriginalView := AView; - SetControlLookAndFeel(Self, lfUltraFlat, False); - - AGrid := TcxGrid.Create(Self); - AGrid.Parent := pnlClient; - AGrid.Align := alClient; - if FOriginalView.LookAndFeel <> nil then - AGrid.LookAndFeel := FOriginalView.LookAndFeel; - FView := AGrid.CreateView(TcxCustomGridViewClass(FOriginalView.ClassType)); - AGrid.Levels.Add.GridView := FView; - ActiveControl := AGrid; - - Load; -end; - -function TcxGridViewLayoutEditor.GetDataControllerSupport: IcxCustomGridDataController; -begin - Result := FOriginalView.DataController as IcxCustomGridDataController; -end; - -function TcxGridViewLayoutEditor.GetViewSupport: IcxGridViewLayoutEditorSupport; -begin - Result := FOriginalView as IcxGridViewLayoutEditorSupport; -end; - -procedure TcxGridViewLayoutEditor.Load; -begin - FView.Assign(FOriginalView); - (FView.DataController as IcxCustomGridDataController).AssignData(FOriginalView.DataController); - ViewSupport.BeforeEditLayout(FView); -end; - -procedure TcxGridViewLayoutEditor.Save; -begin - if ViewSupport.IsLayoutChangeable and chbSaveLayout.Checked then - ViewSupport.DoAssignLayout(FView); - if DataControllerSupport.IsDataChangeable and chbSaveData.Checked then - DataControllerSupport.AssignData(FView.DataController); -end; - -procedure TcxGridViewLayoutEditor.btnLayoutCustomizationClick(Sender: TObject); -begin - (FView as IcxGridViewLayoutEditorSupport).RunLayoutCustomizationForm; -end; - -procedure TcxGridViewLayoutEditor.FormShow(Sender: TObject); -begin - Caption := Caption + ' - ' + FOriginalView.Name; - pnlLayoutCustomization.Visible := ViewSupport.HasLayoutCustomizationForm; - btnLayoutCustomization.Caption := ViewSupport.GetLayoutCustomizationFormButtonCaption; - chbSaveLayout.Visible := ViewSupport.IsLayoutChangeable; - chbSaveData.Visible := DataControllerSupport.IsDataChangeable; - btnOK.Visible := ViewSupport.IsLayoutChangeable or DataControllerSupport.IsDataChangeable; - if not btnOK.Visible then - btnCancel.Caption := CloseButtonCaption; - pmGrid.Grid := TcxGrid(FView.Control); -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxImageComboBoxItemsEditor.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxImageComboBoxItemsEditor.dfm deleted file mode 100644 index 81727b1d..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxImageComboBoxItemsEditor.dfm +++ /dev/null @@ -1,222 +0,0 @@ -object fmImageComboBoxItemsEditor: TfmImageComboBoxItemsEditor - Left = 287 - Top = 190 - AutoScroll = False - Caption = 'fmImageComboBoxItemsEditor' - ClientHeight = 266 - ClientWidth = 573 - Color = clBtnFace - Constraints.MinHeight = 300 - Constraints.MinWidth = 581 - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object Panel1: TPanel - Left = 480 - Top = 0 - Width = 93 - Height = 266 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object Bevel1: TBevel - Left = 0 - Top = 0 - Width = 6 - Height = 266 - Align = alLeft - Shape = bsLeftLine - end - object btnAdd: TcxButton - Left = 6 - Top = 12 - Width = 83 - Height = 22 - Anchors = [akTop, akRight] - Caption = '&Add' - TabOrder = 0 - OnClick = btnAddClick - LookAndFeel.NativeStyle = True - end - object btnDelete: TcxButton - Left = 6 - Top = 76 - Width = 83 - Height = 22 - Anchors = [akTop, akRight] - Caption = '&Delete' - TabOrder = 2 - OnClick = btnDeleteClick - LookAndFeel.NativeStyle = True - end - object btnInsert: TcxButton - Left = 6 - Top = 44 - Width = 83 - Height = 22 - Anchors = [akTop, akRight] - Caption = '&Insert' - TabOrder = 1 - OnClick = btnInsertClick - LookAndFeel.NativeStyle = True - end - object btnOk: TcxButton - Left = 6 - Top = 201 - Width = 83 - Height = 22 - Anchors = [akRight, akBottom] - Caption = '&OK' - ModalResult = 1 - TabOrder = 5 - OnClick = btnOkClick - LookAndFeel.NativeStyle = True - end - object btnCancel: TcxButton - Left = 6 - Top = 233 - Width = 83 - Height = 22 - Anchors = [akRight, akBottom] - Caption = '&Cancel' - ModalResult = 2 - TabOrder = 6 - LookAndFeel.NativeStyle = True - end - object btnSelectAll: TcxButton - Left = 6 - Top = 108 - Width = 83 - Height = 22 - Anchors = [akTop, akRight] - Caption = '&Select All' - TabOrder = 3 - OnClick = btnSelectAllClick - LookAndFeel.NativeStyle = True - end - object btnValueType: TcxButton - Left = 6 - Top = 140 - Width = 83 - Height = 22 - Anchors = [akTop, akRight] - Caption = 'Set Value&Type' - TabOrder = 4 - DropDownMenu = mnuValueTypes - Kind = cxbkDropDown - LookAndFeel.NativeStyle = True - end - end - object Panel3: TPanel - Left = 0 - Top = 0 - Width = 480 - Height = 266 - Align = alClient - BevelOuter = bvNone - Caption = 'Panel3' - TabOrder = 0 - object cxgImageComboBoxItems: TcxGrid - Left = 0 - Top = 0 - Width = 480 - Height = 266 - Align = alClient - TabOrder = 0 - LookAndFeel.NativeStyle = True - object tvImageComboBoxItems: TcxGridTableView - OnKeyDown = tvImageComboBoxItemsKeyDown - NavigatorButtons.ConfirmDelete = False - OnEditKeyDown = tvImageComboBoxItemsEditKeyDown - DataController.Summary.DefaultGroupSummaryItems = <> - DataController.Summary.FooterSummaryItems = <> - DataController.Summary.SummaryGroups = <> - DataController.OnRecordChanged = tvImageComboBoxItemsDataControllerRecordChanged - DataController.Data = { - 960000000F00000044617461436F6E74726F6C6C657231050000001300000054 - 6378496E746567657256616C75655479706512000000546378537472696E6756 - 616C75655479706512000000546378537472696E6756616C7565547970651200 - 0000546378537472696E6756616C75655479706513000000546378496E746567 - 657256616C756554797065010000000001010001000000300101} - OptionsBehavior.CellHints = True - OptionsBehavior.ImmediateEditor = False - OptionsBehavior.ColumnHeaderHints = False - OptionsCustomize.ColumnFiltering = False - OptionsCustomize.ColumnGrouping = False - OptionsCustomize.ColumnHidingOnGrouping = False - OptionsCustomize.ColumnMoving = False - OptionsData.DeletingConfirmation = False - OptionsData.Inserting = False - OptionsSelection.MultiSelect = True - OptionsSelection.UnselectFocusedRecordOnExit = False - OptionsView.CellEndEllipsis = True - OptionsView.ShowEditButtons = gsebAlways - OptionsView.ColumnAutoWidth = True - OptionsView.ExpandButtonsForEmptyDetails = False - OptionsView.GroupByBox = False - object clnImage: TcxGridColumn - Caption = 'Image' - DataBinding.ValueType = 'Integer' - PropertiesClassName = 'TcxImageComboBoxProperties' - Properties.Items = < - item - end> - Properties.ShowDescriptions = False - MinWidth = 36 - Options.HorzSizing = False - Width = 36 - end - object clnDescription: TcxGridColumn - Caption = 'Description' - Width = 168 - end - object clnValue: TcxGridColumn - Caption = 'Value' - PropertiesClassName = 'TcxTextEditProperties' - Width = 109 - end - object clnValueType: TcxGridColumn - Caption = 'ValueType' - PropertiesClassName = 'TcxComboBoxProperties' - Properties.DropDownListStyle = lsFixedList - Properties.ImmediatePost = True - Properties.OnEditValueChanged = clnValueTypePropertiesEditValueChanged - Width = 117 - end - object clnTag: TcxGridColumn - Caption = 'Tag' - DataBinding.ValueType = 'Integer' - PropertiesClassName = 'TcxMaskEditProperties' - Properties.MaskKind = emkRegExprEx - Properties.EditMask = '\d+' - Width = 51 - end - end - object lvImageComboBoxItems: TcxGridLevel - GridView = tvImageComboBoxItems - end - end - end - object mnuValueTypes: TPopupMenu - Left = 390 - Top = 138 - object miAdd: TMenuItem - Caption = '&Add' - OnClick = miValueTypeClick - end - object miInsert: TMenuItem - Caption = '&Insert' - end - object miDelete: TMenuItem - Caption = '&Delete' - end - object N1: TMenuItem - Caption = '-' - end - object miHelp: TMenuItem - Caption = '&Help' - end - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxImageComboBoxItemsEditor.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxImageComboBoxItemsEditor.pas deleted file mode 100644 index 3092431f..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxImageComboBoxItemsEditor.pas +++ /dev/null @@ -1,598 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressEditors } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSEDITORS AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxImageComboBoxItemsEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, - cxDataStorage, cxEdit, cxImageComboBox, cxLookAndFeels, - cxGridCustomTableView, cxGridTableView, cxControls, cxGridCustomView, - cxClasses, cxGridLevel, cxGrid, Menus, StdCtrls, ExtCtrls, cxTextEdit, - cxMaskEdit, cxDropDownEdit, cxContainer, cxGroupBox, - cxLookAndFeelPainters, cxButtons, cxCalendar, ImgList; - -type - TfmImageComboBoxItemsEditor = class(TForm) - Panel1: TPanel; - btnAdd: TcxButton; - btnDelete: TcxButton; - btnInsert: TcxButton; - mnuValueTypes: TPopupMenu; - miAdd: TMenuItem; - miInsert: TMenuItem; - miDelete: TMenuItem; - N1: TMenuItem; - miHelp: TMenuItem; - Panel3: TPanel; - cxgImageComboBoxItems: TcxGrid; - tvImageComboBoxItems: TcxGridTableView; - clnImage: TcxGridColumn; - clnValue: TcxGridColumn; - clnDescription: TcxGridColumn; - clnTag: TcxGridColumn; - lvImageComboBoxItems: TcxGridLevel; - Bevel1: TBevel; - btnOk: TcxButton; - btnCancel: TcxButton; - clnValueType: TcxGridColumn; - btnSelectAll: TcxButton; - btnValueType: TcxButton; - procedure FormCreate(Sender: TObject); - procedure btnAddClick(Sender: TObject); - procedure btnDeleteClick(Sender: TObject); - procedure btnInsertClick(Sender: TObject); - procedure btnOkClick(Sender: TObject); - procedure btnSelectAllClick(Sender: TObject); - procedure clnValueTypePropertiesEditValueChanged(Sender: TObject); - procedure miValueTypeClick(Sender: TObject); - procedure tvImageComboBoxItemsKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure tvImageComboBoxItemsDataControllerRecordChanged( - ADataController: TcxCustomDataController; ARecordIndex, - AItemIndex: Integer); - procedure tvImageComboBoxItemsEditKeyDown(Sender: TcxCustomGridTableView; - AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit; var Key: Word; - Shift: TShiftState); - private - { Private declarations } - FImageComboBoxItems: TcxImageComboBoxItems; - FImages, FLargeImages: TCustomImageList; - procedure FillGridViewRecords(AImageComboBoxItems: TcxImageComboBoxItems); - procedure FocusAndSelectRecord(ARecordIndex: Integer); - function GetVarTypeName(AVarType: Word): string; - function GetVarTypeByName(AVarTypeName: string): Word; - procedure InitNewRecord(ARecordIndex: Integer); - procedure PopulateImages(AImages, ALargeImages: TCustomImageList); - procedure PopulateValueTypeNames; - procedure SetItemValueType(ARecordIndex: Integer; AValueType: Word); - procedure SetSelectionValueType(AValueType: Word); - function ValueToValueType(var AValue: Variant; AValueType: Word): Boolean; - public - { Public declarations } - constructor Create(AItems: TcxImageComboBoxItems; - AImages, ALargeImages: TCustomImageList); reintroduce; overload; - end; - -implementation - -uses - cxVariants, TypInfo; - -{$R *.dfm} - -const - cxImageComboErrorVarTypeName = 'ERROR'; - cxImageComboNullValue = '(Null)'; - cxImageComboOleStrVarTypeName = 'OleStr'; - cxImageComboStringVarTypeName = 'String'; - cxImageComboUnknownVarTypeName = '(Unknown)'; - -var - cxImageComboVarTypeNames: array[varEmpty..{$IFDEF DELPHI6}varInt64{$ELSE}varByte{$ENDIF}] - of string = ( - 'Unassigned', // varEmpty - 'Null', // varNull - 'Smallint', // varSmallint - 'Integer', // varInteger - 'Single', // varSingle - 'Double', // varDouble - 'Currency', // varCurrency - 'Date', // varDate - 'OleStr', // varOleStr - '', // varDispatch - '', // varError - 'Boolean', // varBoolean - '', // varVariant - '', // varUnknown - '', // [varDecimal] - '', // [undefined] -{$IFDEF DELPHI6} - 'Shortint', // varShortInt -{$ELSE} - '', -{$ENDIF} - 'Byte' // varByte -{$IFDEF DELPHI6} - ,'Word', // varWord - 'LongWord', // varLongWord - 'Int64' // varInt64 -{$ENDIF} - ); - -constructor TfmImageComboBoxItemsEditor.Create(AItems: TcxImageComboBoxItems; - AImages, ALargeImages: TCustomImageList); -begin - FImageComboBoxItems := AItems; - FImages := AImages; - FLargeImages := ALargeImages; - inherited Create(Application); -end; - -procedure TfmImageComboBoxItemsEditor.FormCreate(Sender: TObject); -begin - PopulateValueTypeNames; - PopulateImages(FImages, FLargeImages); - FillGridViewRecords(FImageComboBoxItems); - clnImage.ApplyBestFit; - tvImageComboBoxItems.Controller.GoToLast(False); -end; - -procedure TfmImageComboBoxItemsEditor.btnAddClick(Sender: TObject); -begin - tvImageComboBoxItems.DataController.Post; - tvImageComboBoxItems.BeginUpdate; - try - tvImageComboBoxItems.DataController.AppendRecord; - InitNewRecord(tvImageComboBoxItems.DataController.RecordCount - 1); - finally - tvImageComboBoxItems.EndUpdate; - end; - FocusAndSelectRecord(tvImageComboBoxItems.DataController.RecordCount - 1); -end; - -procedure TfmImageComboBoxItemsEditor.btnDeleteClick(Sender: TObject); -var - AIndex: Integer; -begin - if tvImageComboBoxItems.DataController.RecordCount = 0 then - Exit; - AIndex := tvImageComboBoxItems.Controller.FocusedRecordIndex; - tvImageComboBoxItems.DataController.DeleteSelection; - if tvImageComboBoxItems.DataController.RecordCount > AIndex then - begin - tvImageComboBoxItems.Controller.FocusedRecordIndex := AIndex; - tvImageComboBoxItems.Controller.FocusedRecord.Selected := True; - end - else - tvImageComboBoxItems.Controller.GoToLast(False); -end; - -procedure TfmImageComboBoxItemsEditor.btnOkClick(Sender: TObject); - - procedure InitImageComboBoxItem(AItem: TcxImageComboBoxItem; - ARecord: TcxCustomGridRecord); - - function VarToInteger(AValue: Variant): Integer; - begin - if VarIsNull(AValue) then - Result := 0 - else - Result := AValue; - end; - - var - AValue: Variant; - AVarType: Word; - begin - AItem.Description := VarToStr(ARecord.Values[clnDescription.Index]); - AItem.Tag := VarToInteger(ARecord.Values[clnTag.Index]); - AItem.ImageIndex := VarToInteger(ARecord.Values[clnImage.Index]); - AValue := ARecord.Values[clnValue.Index]; - AVarType := GetVarTypeByName(ARecord.Values[clnValueType.Index]); - case AVarType of - varNull: - AValue := Null; - varEmpty: - VarClear(AValue); - varError: - begin - AValue := Null; - raise EVariantError.Create('Invalid value type'); - end; - else - VarCast(AValue, AValue, AVarType); - end; - AItem.Value := AValue; - end; - -var - I: Integer; -begin - FImageComboBoxItems.Clear; - for I := 0 to tvImageComboBoxItems.ViewData.RecordCount - 1 do - InitImageComboBoxItem( - FImageComboBoxItems.Add as TcxImageComboBoxItem, - tvImageComboBoxItems.ViewData.Records[I]); -end; - -procedure TfmImageComboBoxItemsEditor.btnInsertClick(Sender: TObject); - - function InsertRecordBeforeFocused: Integer; - begin - Result := tvImageComboBoxItems.DataController.InsertRecord( - tvImageComboBoxItems.Controller.FocusedRecord.Index); - end; - -var - ARecordIndex: Integer; -begin - tvImageComboBoxItems.DataController.Post; - if tvImageComboBoxItems.Controller.FocusedRecord = nil then - btnAddClick(nil) - else - begin - tvImageComboBoxItems.BeginUpdate; - try - ARecordIndex := InsertRecordBeforeFocused; - InitNewRecord(ARecordIndex); - finally - tvImageComboBoxItems.EndUpdate; - end; - FocusAndSelectRecord(ARecordIndex); - end; -end; - -procedure TfmImageComboBoxItemsEditor.btnSelectAllClick(Sender: TObject); -begin - tvImageComboBoxItems.DataController.SelectAll; -end; - -procedure TfmImageComboBoxItemsEditor.clnValueTypePropertiesEditValueChanged( - Sender: TObject); -begin - SetItemValueType(tvImageComboBoxItems.DataController.FocusedRecordIndex, - GetVarTypeByName(TcxComboBox(Sender).Text)); -end; - -procedure TfmImageComboBoxItemsEditor.miValueTypeClick(Sender: TObject); -begin - SetSelectionValueType(TMenuItem(Sender).Tag); -end; - -procedure TfmImageComboBoxItemsEditor.FillGridViewRecords( - AImageComboBoxItems: TcxImageComboBoxItems); - - function ValueToStr(AValue: Variant): string; - begin - if VarIsNull(AValue) then - Result := cxImageComboNullValue - else - case VarType(AValue) of - varBoolean: - Result := BooleanIdents[AValue = True]; - varCurrency: - Result := CurrToStr(AValue); - varDispatch: - Result := cxImageComboErrorVarTypeName; - else - Result := VarToStr(AValue); - end; - end; - - procedure InitRecord(ARecordIndex: Integer; - AImageComboBoxItem: TcxImageComboBoxItem); - var - ARec: TcxCustomGridRecord; - begin - ARec := tvImageComboBoxItems.ViewData.Records[ARecordIndex]; - tvImageComboBoxItems.BeginUpdate; - try - ARec.Values[clnImage.Index] := AImageComboBoxItem.ImageIndex; - ARec.Values[clnValue.Index] := ValueToStr(AImageComboBoxItem.Value); - ARec.Values[clnValueType.Index] := - GetVarTypeName(VarType(AImageComboBoxItem.Value)); - ARec.Values[clnDescription.Index] := AImageComboBoxItem.Description; - ARec.Values[clnTag.Index] := AImageComboBoxItem.Tag; - finally - tvImageComboBoxItems.EndUpdate; - end; - end; - -var - I: Integer; -begin - tvImageComboBoxItems.DataController.RecordCount := - AImageComboBoxItems.Count; - if tvImageComboBoxItems.DataController.RecordCount > 0 then - begin - tvImageComboBoxItems.BeginUpdate; - try - for I := 0 to tvImageComboBoxItems.DataController.RecordCount - 1 do - InitRecord(I, AImageComboBoxItems[I]) - finally - tvImageComboBoxItems.EndUpdate; - end; - end - else - begin - tvImageComboBoxItems.DataController.RecordCount := 1; - InitNewRecord(0); - end; -end; - -procedure TfmImageComboBoxItemsEditor.FocusAndSelectRecord(ARecordIndex: Integer); -begin - tvImageComboBoxItems.DataController.ClearSelection; - tvImageComboBoxItems.DataController.FocusedRecordIndex := - ARecordIndex; - tvImageComboBoxItems.Controller.FocusedRecord.Selected := True; -end; - -function TfmImageComboBoxItemsEditor.GetVarTypeName(AVarType: Word): string; -begin - AVarType := AVarType and varTypeMask; - case AVarType of - Low(cxImageComboVarTypeNames)..High(cxImageComboVarTypeNames): - Result := cxImageComboVarTypeNames[AVarType]; - varString: - Result := cxImageComboStringVarTypeName; - else - Result := cxImageComboUnknownVarTypeName; - end; -end; - -function TfmImageComboBoxItemsEditor.GetVarTypeByName(AVarTypeName: string): Word; -var - I: Integer; -begin - Result := varError; - if AVarTypeName = cxImageComboStringVarTypeName then - Result := varString - else - for I := Low(cxImageComboVarTypeNames) to High(cxImageComboVarTypeNames) do - if cxImageComboVarTypeNames[I] = AVarTypeName then - begin - Result := I; - Break; - end; -end; - -procedure TfmImageComboBoxItemsEditor.InitNewRecord(ARecordIndex: Integer); -begin - tvImageComboBoxItems.BeginUpdate; - try - SetItemValueType(ARecordIndex, varNull); - tvImageComboBoxItems.DataController.Values[ARecordIndex, clnTag.Index] := 0; - if ARecordIndex < - TcxImageComboBoxProperties(clnImage.Properties).Items.Count then - tvImageComboBoxItems.DataController.Values[ARecordIndex, clnImage.Index] := ARecordIndex - else - tvImageComboBoxItems.DataController.Values[ARecordIndex, clnImage.Index] := -1; - finally - tvImageComboBoxItems.EndUpdate; - end; -end; - -procedure TfmImageComboBoxItemsEditor.PopulateImages(AImages, ALargeImages: TCustomImageList); -var - I: Integer; - ACurrentImages: TCustomImageList; - AImageComboBoxProperties: TcxImageComboBoxProperties; -begin - if (AImages = nil) and (ALargeImages = nil) then - Exit; - AImageComboBoxProperties := TcxImageComboBoxProperties(clnImage.Properties); - AImageComboBoxProperties.Images := AImages; - AImageComboBoxProperties.LargeImages := ALargeImages; - if ALargeImages <> nil then - ACurrentImages := ALargeImages - else - ACurrentImages := AImages; - AImageComboBoxProperties.Items.Clear; - with TcxImageComboBoxItem(AImageComboBoxProperties.Items.Add) do - begin - ImageIndex := -1; - Value := -1; - end; - for I := 0 to ACurrentImages.Count - 1 do - with TcxImageComboBoxItem(AImageComboBoxProperties.Items.Add) do - begin - ImageIndex := I; - Value := I; - end; -end; - -procedure TfmImageComboBoxItemsEditor.PopulateValueTypeNames; - - procedure AddValueTypeToDropDownMenu(AValuetypeName: string; AValue: Integer); - var - AMenuItem: TMenuItem; - begin - AMenuItem := TMenuItem.Create(mnuValueTypes); - AMenuItem.Caption := AValuetypeName; - AMenuItem.OnClick := miValueTypeClick; - AMenuItem.Tag := AValue; - mnuValueTypes.Items.Add(AMenuItem); - end; - - procedure AddValueTypeToValueTypeColumn(AValuetypeName: string; AValue: Integer); - var - AComboBoxProperties: TcxComboBoxProperties; - begin - AComboBoxProperties := - TcxComboBoxProperties(clnValueType.Properties); - AComboBoxProperties.Items.AddObject(AValuetypeName, TObject(AValue)); - end; - -var - I: Integer; -begin - TcxComboBoxProperties(clnValueType.Properties).Items.Clear; - mnuValueTypes.Items.Clear; - for I := Low(cxImageComboVarTypeNames) to High(cxImageComboVarTypeNames) do - if cxImageComboVarTypeNames[I] <> '' then - begin - AddValueTypeToDropDownMenu(cxImageComboVarTypeNames[I], I); - AddValueTypeToValueTypeColumn(cxImageComboVarTypeNames[I], I); - end; - AddValueTypeToDropDownMenu(cxImageComboStringVarTypeName, varString); - AddValueTypeToValueTypeColumn(cxImageComboStringVarTypeName, varString); -end; - -procedure TfmImageComboBoxItemsEditor.SetItemValueType(ARecordIndex: Integer; AValueType: Word); -var - AValue: Variant; -begin - tvImageComboBoxItems.BeginUpdate; - try - tvImageComboBoxItems.DataController.Values[ARecordIndex, clnValueType.Index] := - GetVarTypeName(AValueType); - AValue := tvImageComboBoxItems.DataController.Values[ARecordIndex, clnValue.Index]; - ValueToValueType(AValue, AValueType); - tvImageComboBoxItems.DataController.Values[ARecordIndex, clnValue.Index] := AValue; - finally - tvImageComboBoxItems.EndUpdate; - end; -end; - -procedure TfmImageComboBoxItemsEditor.SetSelectionValueType(AValueType: Word); -var - I: Integer; -begin - tvImageComboBoxItems.BeginUpdate; - try - for I := 0 to tvImageComboBoxItems.Controller.SelectedRecordCount -1 do - SetItemValueType( - tvImageComboBoxItems.Controller.SelectedRecords[I].RecordIndex, AValueType); - finally - tvImageComboBoxItems.EndUpdate; - end; -end; - -function TfmImageComboBoxItemsEditor.ValueToValueType(var AValue: Variant; AValueType: Word): Boolean; -var - AStringValue: string; -begin - Result := True; - case AValueType of - varEmpty: - if not VarIsSoftNull(AValue) then - begin - Result := False; - VarClear(AValue); - end; - varNull: - if not VarEquals(AValue, cxImageComboNullValue) then - begin - AValue := cxImageComboNullValue; - Result := False; - end; - varString, varOleStr: - if VarEquals(AValue, cxImageComboNullValue) or VarIsNull(AValue) then - AValue := ''; - else - if Result then - try - AStringValue := VarToStr(AValue); - VarCast(AValue, AValue, AValueType); - Result := (AValueType in [varDate, varCurrency, varDouble, varBoolean]) or - (VarToStr(AValue) = AStringValue); - except - Result := False; - VarClear(AValue); - VarCast(AValue, AValue, AValueType); - end; - end; -end; - -procedure TfmImageComboBoxItemsEditor.tvImageComboBoxItemsKeyDown( - Sender: TObject; var Key: Word; Shift: TShiftState); -begin - if (Key = VK_INSERT) and (Shift = []) then - begin - btnInsertClick(Self); - Key := 0; - end; -end; - -procedure TfmImageComboBoxItemsEditor.tvImageComboBoxItemsDataControllerRecordChanged( - ADataController: TcxCustomDataController; ARecordIndex, - AItemIndex: Integer); - - function GetFocusedItemValueType: Word; - begin - Result := GetVarTypeByName(ADataController.GetValue(ARecordIndex, clnValueType.Index)); - end; - -var - AValue: Variant; -begin - if AItemIndex = clnValue.Index then - begin - ADataController.OnRecordChanged := nil; - try - AValue := clnValue.EditValue; - if VarIsSoftNull(AValue) then - ADataController.SetValue(ARecordIndex, clnValueType.Index, GetVarTypeName(varEmpty)) - else - if VarEquals(AValue, cxImageComboNullValue) then - ADataController.SetValue(ARecordIndex, clnValueType.Index, GetVarTypeName(varNull)) - else - if not ValueToValueType(AValue, GetFocusedItemValueType) then - ADataController.SetValue(ARecordIndex, clnValueType.Index, cxImageComboStringVarTypeName) - else - ADataController.SetValue(ARecordIndex, clnValue.Index, VarToStr(AValue)); - finally - ADataController.OnRecordChanged := tvImageComboBoxItemsDataControllerRecordChanged; - end; - end; -end; - -procedure TfmImageComboBoxItemsEditor.tvImageComboBoxItemsEditKeyDown( - Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem; - AEdit: TcxCustomEdit; var Key: Word; Shift: TShiftState); -begin - tvImageComboBoxItemsKeyDown(Sender, Key, Shift); -end; - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxTableViewEditor.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxTableViewEditor.dfm deleted file mode 100644 index 51dc89be..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxTableViewEditor.dfm +++ /dev/null @@ -1,12 +0,0 @@ -inherited cxTableViewEditor: TcxTableViewEditor - Caption = 'cxTableViewEditor' - PixelsPerInch = 96 - TextHeight = 13 - inherited PViewEditor: TPanel - inherited PageControl1: TcxPageControl - inherited TSItems: TcxTabSheet - Caption = ' Columns ' - end - end - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxTableViewEditor.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxTableViewEditor.pas deleted file mode 100644 index 393780d3..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxTableViewEditor.pas +++ /dev/null @@ -1,136 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxTableViewEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Variants, -{$ENDIF} - SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, Menus, StdCtrls, ComCtrls, ExtCtrls, - cxViewEditor, cxCustomTableViewEditor, cxGridCustomView, cxGridTableView, - cxLookAndFeelPainters, cxButtons, cxPC, cxControls; - -type - TcxTableViewEditor = class(TcxCustomTableViewEditor); - - TcxGridTableViewStorage = class(TcxCustomGridTableViewStorage) - private - function GetFiltering: TcxGridTableFiltering; - function GetOptionsBehavior: TcxGridTableOptionsBehavior; - function GetOptionsCustomize: TcxGridTableOptionsCustomize; - function GetOptionsData: TcxGridTableOptionsData; - function GetOptionsSelection: TcxGridTableOptionsSelection; - function GetOptionsView: TcxGridTableOptionsView; - function GetPreview: TcxGridPreview; - protected - function TableView: TcxGridTableView; - public - class function GetViewClass: TcxCustomGridViewClass; override; - published - property Filtering: TcxGridTableFiltering read GetFiltering; - property OptionsBehavior: TcxGridTableOptionsBehavior read GetOptionsBehavior; - property OptionsCustomize: TcxGridTableOptionsCustomize read GetOptionsCustomize; - property OptionsData: TcxGridTableOptionsData read GetOptionsData; - property OptionsSelection: TcxGridTableOptionsSelection read GetOptionsSelection; - property OptionsView: TcxGridTableOptionsView read GetOptionsView; - property Preview: TcxGridPreview read GetPreview; - end; - -implementation - -{$R *.dfm} - -{ TcxGridTableViewStorage } - -function TcxGridTableViewStorage.GetFiltering: TcxGridTableFiltering; -begin - Result := TableView.Filtering; -end; - -function TcxGridTableViewStorage.GetOptionsBehavior: TcxGridTableOptionsBehavior; -begin - Result := TableView.OptionsBehavior; -end; - -function TcxGridTableViewStorage.GetOptionsCustomize: TcxGridTableOptionsCustomize; -begin - Result := TableView.OptionsCustomize; -end; - -function TcxGridTableViewStorage.GetOptionsData: TcxGridTableOptionsData; -begin - Result := TableView.OptionsData; -end; - -function TcxGridTableViewStorage.GetOptionsSelection: TcxGridTableOptionsSelection; -begin - Result := TableView.OptionsSelection; -end; - -function TcxGridTableViewStorage.GetOptionsView: TcxGridTableOptionsView; -begin - Result := TableView.OptionsView; -end; - -function TcxGridTableViewStorage.GetPreview: TcxGridPreview; -begin - Result := TableView.Preview; -end; - -function TcxGridTableViewStorage.TableView: TcxGridTableView; -begin - Result := inherited View as TcxGridTableView; -end; - -class function TcxGridTableViewStorage.GetViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridTableView; -end; - -initialization - RegisterViewEditorClass(TcxGridTableView, TcxTableViewEditor); - RegisterDefaultViewStorage(TcxGridTableViewStorage); - -finalization - UnregisterDefaultViewStorage(TcxGridTableViewStorage); - UnregisterViewEditorClass(TcxGridTableView, TcxTableViewEditor); - -end. - diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxVer.inc b/internal/x.46/ExpressQuantumGrid 6/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxViewEditor.dfm b/internal/x.46/ExpressQuantumGrid 6/Sources/cxViewEditor.dfm deleted file mode 100644 index c7de9646..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxViewEditor.dfm +++ /dev/null @@ -1,21 +0,0 @@ -object cxViewEditor: TcxViewEditor - Left = 742 - Top = 104 - Caption = 'cxViewEditor' - ClientHeight = 313 - ClientWidth = 343 - Color = clBtnFace - OldCreateOrder = True - OnKeyPress = FormKeyPress - PixelsPerInch = 96 - TextHeight = 13 - object PViewEditor: TPanel - Left = 0 - Top = 0 - Width = 343 - Height = 313 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - end -end diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxViewEditor.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxViewEditor.pas deleted file mode 100644 index 814c0c5b..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxViewEditor.pas +++ /dev/null @@ -1,965 +0,0 @@ -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit cxViewEditor; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - DesignIntf, DesignMenus, -{$ELSE} - DsgnIntf, -{$ENDIF} -{$IFDEF DELPHI6} - Variants, -{$ENDIF} -{$IFNDEF NONDB} - DB, -{$ENDIF} - Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Menus, - Dialogs, ExtCtrls, dxCoreReg, cxLibraryReg, - cxClasses, cxStorage, cxDesignWindows, cxCustomData, cxGridCommon, cxGridCustomView; - -const - cxGridViewMenuSeparatorCaption = '-'; - -type - { TcxViewEditor } - - TcxViewEditor = class(TForm) - PViewEditor: TPanel; - procedure FormKeyPress(Sender: TObject; var Key: Char); - private - FView: TcxCustomGridView; - function GetDataController: TcxCustomDataController; - function GetOwnerForm: TComponent; - protected - procedure BeginUpdate; - function CanAddComponent: Boolean; - function CanDeleteComponent(AComponent: TComponent): Boolean; - procedure EndUpdate; - procedure GetSelectionList(AList: TList); - procedure SelectComponent(AComponent: TPersistent); - function UniqueName(AComponent: TComponent; - const ATruncateClassName: string = ScxGridPrefixName): string; virtual; - procedure UpdateDesigner; virtual; - procedure UpdateEditor; virtual; - procedure UpdateSelection; virtual; - property DataController: TcxCustomDataController read GetDataController; - public - FormEditor: TcxDesignFormEditor; - class function GetViewByObject(APersistent: TPersistent): TcxCustomGridView; virtual; - procedure SetView(Value: TcxCustomGridView; ARefreshNeeded: Boolean); - property OwnerForm: TComponent read GetOwnerForm; - property View: TcxCustomGridView read FView; - end; - - TcxViewEditorClass = class of TcxViewEditor; - - { TcxCustomGridViewStorage } - - TcxCustomGridViewStorage = class(TcxInterfacedPersistent, IcxStoredObject) - private - FView: TcxCustomGridView; - protected - // IcxStoredObject - function GetObjectName: string; - function GetProperties(AProperties: TStrings): Boolean; - procedure GetPropertyValue(const AName: string; var AValue: Variant); - procedure SetPropertyValue(const AName: string; const AValue: Variant); - property View: TcxCustomGridView read FView; - public - constructor Create(AView: TcxCustomGridView); reintroduce; virtual; - class function GetViewClass: TcxCustomGridViewClass; virtual; - end; - - TcxCustomGridViewStorageClass = class of TcxCustomGridViewStorage; - - { View Menu Provider } - - TcxGridViewMenuItem = class; - - TcxGridViewMenuItemActionEvent = procedure(Sender: TcxGridViewMenuItem) of object; - - TcxGridViewMenuItems = class - private - FItems: TList; - function GetCount: Integer; - function GetItem(Index: Integer): TcxGridViewMenuItem; - protected - procedure ClearItems; - public - constructor Create; - destructor Destroy; override; - function AddItem(const ACaption: string; AOnClick: TcxGridViewMenuItemActionEvent = nil; - AEnabled: Boolean = True; AChecked: Boolean = False; AData: TObject = nil): TcxGridViewMenuItem; - function AddSeparator: TcxGridViewMenuItem; - procedure Delete(AIndex: Integer); - procedure Prepare(AMenuItem: TMenuItem); overload; virtual; - {$IFDEF DELPHI6} - procedure Prepare(const AMenuItem: TDesignMenuItem); overload; virtual; - {$ENDIF} - procedure RemoveExcessSeparators; - property Count: Integer read GetCount; - property Items[Index: Integer]: TcxGridViewMenuItem read GetItem; default; - end; - - TcxGridViewMenuItem = class(TcxGridViewMenuItems) - private - procedure MenuItemClick(Sender: TObject); - protected - OnAction: TcxGridViewMenuItemActionEvent; - public - Caption: string; - Checked: Boolean; - Data: TObject; - Enabled: Boolean; - constructor Create(const ACaption: string; AEnabled: Boolean; - AChecked: Boolean; AData: TObject; AOnAction: TcxGridViewMenuItemActionEvent); - procedure DoAction; - function IsSeparator: Boolean; - procedure Prepare(AMenuItem: TMenuItem); overload; override; - {$IFDEF DELPHI6} - procedure Prepare(const AMenuItem: TDesignMenuItem); overload; override; - {$ENDIF} - end; - - TcxCustomGridViewMenuProviderClass = class of TcxCustomGridViewMenuProvider; - - TcxCustomGridViewMenuProvider = class - private - FDesigner: IDesigner; - FDesignHelper: TcxDesignHelper; - FGridView: TcxCustomGridView; - FItems: TcxGridViewMenuItems; - {$IFNDEF NONDB} - FDataSourceNames: TStringList; - procedure GetDataSourceName(const S: string); - function GetDBGridView: TcxCustomGridView; - function GetViewDataSource: TDataSource; - procedure SetViewDataSource(Value: TDataSource); - {$ENDIF} - protected - procedure DesignerModified; - procedure ObjectCreated(AObject: TPersistent); - procedure SelectObject(AObject: TPersistent); - - procedure InitAdditionalItems; virtual; - procedure InitCopySettingsFromViewItem; virtual; - {$IFNDEF NONDB} - procedure InitDataBindingItems; virtual; - {$ENDIF} - procedure InitItems; virtual; - procedure InitLayoutItems; virtual; - procedure InitStructureItems; virtual; - - procedure CopySettings(Sender: TcxGridViewMenuItem); - procedure DeleteView(Sender: TcxGridViewMenuItem); - procedure EditLayoutAndData(Sender: TcxGridViewMenuItem); - procedure SetAsDefault(Sender: TcxGridViewMenuItem); - {$IFNDEF NONDB} - function GetDataSourceNames: TStringList; - procedure LinkToDataSource(Sender: TcxGridViewMenuItem); - {$ENDIF} - - {$IFNDEF NONDB} - property ViewDataSource: TDataSource read GetViewDataSource write SetViewDataSource; - property DBGridView: TcxCustomGridView read GetDBGridView; - {$ENDIF} - property Designer: IDesigner read FDesigner; - property DesignHelper: TcxDesignHelper read FDesignHelper; - public - constructor Create(AGridView: TcxCustomGridView); virtual; - destructor Destroy; override; - property GridView: TcxCustomGridView read FGridView; - property Items: TcxGridViewMenuItems read FItems; - end; - - { TcxGridViewList } - - TcxGridViewList = class - private - FDesigner: IDesigner; - FViewNames: TStringList; - function GetView(Index: Integer): TcxCustomGridView; - procedure AddViewName(const S: string); - protected - procedure GetViewNames; virtual; - public - constructor Create(ADesigner: IDesigner); - destructor Destroy; override; - function GetViewIndex(AView: TcxCustomGridView): Integer; - property Designer: IDesigner read FDesigner; - property ViewNames: TStringList read FViewNames; - property Views[Index: Integer]: TcxCustomGridView read GetView; - end; - -function GetViewEditorClass(AViewClass: TcxCustomGridViewClass): TcxViewEditorClass; -procedure RegisterViewEditorClass(AViewClass: TcxCustomGridViewClass; AViewEditorClass: TcxViewEditorClass); -procedure UnregisterViewEditorClass(AViewClass: TcxCustomGridViewClass; AViewEditorClass: TcxViewEditorClass); -function GetLinkedView(APersistent: TPersistent): TcxCustomGridView; -function IsViewLinkedToComponent(AView: TcxCustomGridView; AComponent: TComponent): Boolean; - -function GetViewTemplateRegKey: string; -procedure RegisterDefaultViewStorage(AStorageClass: TcxCustomGridViewStorageClass); -procedure UnregisterDefaultViewStorage(AStorageClass: TcxCustomGridViewStorageClass); -function GetDefaultViewStorageByViewClass(AGridView: TcxCustomGridView): TcxCustomGridViewStorage; - -procedure RestoreViewFromTemplate(const ARegPath: string; AView: TcxCustomGridView); -procedure SaveViewToTemplate(const ARegPath: string; AView: TcxCustomGridView); - -function CreateViewMenuProvider(AView: TcxCustomGridView): TcxCustomGridViewMenuProvider; -function GetViewMenuProviderClass(AView: TcxCustomGridView): TcxCustomGridViewMenuProviderClass; -procedure RegisterViewMenuProviderClass(AViewClass: TcxCustomGridViewClass; - AViewMenuProviderClass: TcxCustomGridViewMenuProviderClass); -procedure UnregisterViewMenuProviderClass(AViewClass: TcxCustomGridViewClass; - AViewMenuProviderClass: TcxCustomGridViewMenuProviderClass); - -function GetViewItemUniqueName(AView: TcxCustomGridView; AItem: TComponent; - const AItemName: string): string; - -implementation - -{$R *.dfm} - -uses -{$IFNDEF NONDB} - TypInfo, cxDBData, -{$ENDIF} - cxGrid, cxGridLevel, cxGridViewLayoutEditor; - -type - TcxDesignWindowAccess = class(TcxDesignWindow); - -var - ViewEditorClassList: TcxRegisteredClassList; - DefaultViewStorages: TList; - ViewMenuProviderClassList: TcxRegisteredClassList; - -function GetViewEditorClass(AViewClass: TcxCustomGridViewClass): TcxViewEditorClass; -begin - Result := TcxViewEditorClass(ViewEditorClassList.FindClass(AViewClass)); -end; - -procedure RegisterViewEditorClass(AViewClass: TcxCustomGridViewClass; AViewEditorClass: TcxViewEditorClass); -begin - ViewEditorClassList.Register(AViewClass, AViewEditorClass); -end; - -procedure UnregisterViewEditorClass(AViewClass: TcxCustomGridViewClass; AViewEditorClass: TcxViewEditorClass); -begin - ViewEditorClassList.Unregister(AViewClass, AViewEditorClass); -end; - -function GetLinkedView(APersistent: TPersistent): TcxCustomGridView; -var - I: Integer; - AViewEditorClass: TcxViewEditorClass; -begin - Result := nil; - for I := 0 to ViewEditorClassList.Count - 1 do - begin - AViewEditorClass := TcxViewEditorClass(ViewEditorClassList[I].RegisteredClass); - Result := AViewEditorClass.GetViewByObject(APersistent); - if Result <> nil then - Break; - end; -end; - -function IsViewLinkedToComponent(AView: TcxCustomGridView; AComponent: TComponent): Boolean; - - function CheckLevels(ALevel: TcxGridLevel): Boolean; - var - I: Integer; - begin - Result := False; - for I := 0 to ALevel.Count - 1 do - if (ALevel[I].GridView = AView) or CheckLevels(ALevel[I]) then - begin - Result := True; - Break; - end; - end; - -begin - Result := AView.GetParentComponent = AComponent; - if not Result and (AComponent is TcxCustomGrid) then // check Levels (from Repository) - Result := CheckLevels(TcxCustomGrid(AComponent).Levels); -end; - -function GetViewTemplateRegKey: string; -begin - Result := TcxDesignWindow.GetBaseRegKey + '\TcxGridViewTemplate'; -end; - -procedure RegisterDefaultViewStorage(AStorageClass: TcxCustomGridViewStorageClass); -begin - if DefaultViewStorages = nil then - DefaultViewStorages := TList.Create; - if DefaultViewStorages.IndexOf((AStorageClass)) < 0 then - DefaultViewStorages.Add((AStorageClass)); -end; - -procedure UnregisterDefaultViewStorage(AStorageClass: TcxCustomGridViewStorageClass); -begin - if DefaultViewStorages <> nil then - DefaultViewStorages.Remove((AStorageClass)); -end; - -function GetDefaultViewStorageByViewClass(AGridView: TcxCustomGridView): TcxCustomGridViewStorage; -var - I: Integer; - ACurrent, AStorageClass: TcxCustomGridViewStorageClass; -begin - Result := nil; - AStorageClass := nil; - if (DefaultViewStorages <> nil) and (AGridView <> nil) then - begin - for I := 0 to DefaultViewStorages.Count - 1 do - begin - ACurrent := TcxCustomGridViewStorageClass(DefaultViewStorages[I]); - - if AGridView.InheritsFrom(ACurrent.GetViewClass) then - if (AStorageClass = nil) or - not AStorageClass.GetViewClass.InheritsFrom(ACurrent.GetViewClass) then - AStorageClass := ACurrent; - - if (AStorageClass <> nil) and - (AStorageClass.GetViewClass = AGridView.ClassType) then - Break; - end; - end; - if AStorageClass <> nil then - Result := AStorageClass.Create(AGridView); -end; - -procedure RestoreViewFromTemplate(const ARegPath: string; AView: TcxCustomGridView); -var - AStorage: TcxStorage; - AViewStorage: TcxCustomGridViewStorage; -begin - AViewStorage := GetDefaultViewStorageByViewClass(AView); - if AViewStorage = nil then Exit; - try - AStorage := TcxStorage.Create(ARegPath{ + '\' + AViewStorage.GetObjectName}); - try - AStorage.Modes := AStorage.Modes + [smSavePublishedClassProperties]; - AStorage.RestoreFromRegistry(AViewStorage); - finally - AStorage.Free; - end; - finally - AViewStorage.Free; - end; -end; - -procedure SaveViewToTemplate(const ARegPath: string; AView: TcxCustomGridView); -var - AStorage: TcxStorage; - AViewStorage: TcxCustomGridViewStorage; -begin - AViewStorage := GetDefaultViewStorageByViewClass(AView); - if AViewStorage = nil then Exit; - try - AStorage := TcxStorage.Create(ARegPath{ + '\' + AViewStorage.GetObjectName}); - try - AStorage.Modes := AStorage.Modes + [smSavePublishedClassProperties]; - AStorage.Recreate := False; - AStorage.StoreToRegistry(AViewStorage); - finally - AStorage.Free; - end; - finally - AViewStorage.Free; - end; -end; - -function CreateViewMenuProvider(AView: TcxCustomGridView): TcxCustomGridViewMenuProvider; -var - AClass: TcxCustomGridViewMenuProviderClass; -begin - AClass := GetViewMenuProviderClass(AView); - if AClass = nil then - Result := nil - else - Result := AClass.Create(AView); -end; - -function GetViewMenuProviderClass(AView: TcxCustomGridView): TcxCustomGridViewMenuProviderClass; -begin - Result := TcxCustomGridViewMenuProviderClass(ViewMenuProviderClassList.FindClass(AView.ClassType)); -end; - -procedure RegisterViewMenuProviderClass(AViewClass: TcxCustomGridViewClass; - AViewMenuProviderClass: TcxCustomGridViewMenuProviderClass); -begin - ViewMenuProviderClassList.Register(AViewClass, AViewMenuProviderClass); -end; - -procedure UnregisterViewMenuProviderClass(AViewClass: TcxCustomGridViewClass; - AViewMenuProviderClass: TcxCustomGridViewMenuProviderClass); -begin - ViewMenuProviderClassList.Unregister(AViewClass, AViewMenuProviderClass); -end; - -function GetViewItemUniqueName(AView: TcxCustomGridView; AItem: TComponent; - const AItemName: string): string; -begin - Result := CreateUniqueName(AView.Owner{!!!}, AView, AItem, - Copy(AItem.ClassName, 1, Pos(AItemName, AItem.ClassName) - 1), ''); -end; - -{ TcxCustomGridViewStorage } - -constructor TcxCustomGridViewStorage.Create(AView: TcxCustomGridView); -begin - inherited Create(AView); - FView := AView; -end; - -class function TcxCustomGridViewStorage.GetViewClass: TcxCustomGridViewClass; -begin - Result := nil; -end; - -function TcxCustomGridViewStorage.GetObjectName: string; -begin - Result := GetViewClass.ClassName; -end; - -function TcxCustomGridViewStorage.GetProperties(AProperties: TStrings): Boolean; -begin - Result := False; -end; - -procedure TcxCustomGridViewStorage.GetPropertyValue(const AName: string; var AValue: Variant); -begin -end; - -procedure TcxCustomGridViewStorage.SetPropertyValue(const AName: string; const AValue: Variant); -begin -end; - -{ TcxViewEditor } - -class function TcxViewEditor.GetViewByObject(APersistent: TPersistent): TcxCustomGridView; -begin - Result := nil; -end; - -procedure TcxViewEditor.SetView(Value: TcxCustomGridView; ARefreshNeeded: Boolean); -begin - FView := Value; - if ARefreshNeeded then - UpdateEditor; - UpdateSelection; -end; - -procedure TcxViewEditor.BeginUpdate; -begin - FormEditor.BeginUpdate; -end; - -function TcxViewEditor.CanAddComponent: Boolean; -begin - Result := FormEditor.CanAddComponent; -end; - -function TcxViewEditor.CanDeleteComponent(AComponent: TComponent): Boolean; -begin - Result := FormEditor.CanDeleteComponent(AComponent); -end; - -procedure TcxViewEditor.EndUpdate; -begin - FormEditor.EndUpdate; -end; - -procedure TcxViewEditor.GetSelectionList(AList: TList); -begin - FormEditor.GetSelectionList(AList); -end; - -procedure TcxViewEditor.SelectComponent(AComponent: TPersistent); -begin - FormEditor.SelectComponent(AComponent); -end; - -function TcxViewEditor.UniqueName(AComponent: TComponent; - const ATruncateClassName: string = ScxGridPrefixName): string; -begin - Result := CreateUniqueName(OwnerForm, View, AComponent, ATruncateClassName, ''); -end; - -procedure TcxViewEditor.UpdateDesigner; -begin - FormEditor.Designer.Modified; -end; - -procedure TcxViewEditor.UpdateEditor; -begin -end; - -procedure TcxViewEditor.UpdateSelection; -begin -end; - -function TcxViewEditor.GetDataController: TcxCustomDataController; -begin - Result := FView.DataController; -end; - -function TcxViewEditor.GetOwnerForm: TComponent; -begin - Result := FormEditor.Component.Owner; -end; - -procedure TcxViewEditor.FormKeyPress(Sender: TObject; var Key: Char); -begin - case Key of - #13, #33..#126: - begin - if Key = #13 then Key := #0; - TcxDesignWindowAccess(FormEditor).ActivateInspector(Key); - Key := #0; - end; - end; -end; - -{ TcxGridViewMenuItems } - -constructor TcxGridViewMenuItems.Create; -begin - inherited; - FItems := TList.Create; -end; - -destructor TcxGridViewMenuItems.Destroy; -begin - ClearItems; - FItems.Free; - inherited; -end; - -function TcxGridViewMenuItems.GetCount: Integer; -begin - Result := FItems.Count; -end; - -function TcxGridViewMenuItems.GetItem(Index: Integer): TcxGridViewMenuItem; -begin - Result := TcxGridViewMenuItem(FItems[Index]); -end; - -procedure TcxGridViewMenuItems.ClearItems; -var - I: Integer; -begin - for I := Count - 1 downto 0 do - Delete(I); -end; - -function TcxGridViewMenuItems.AddItem(const ACaption: string; - AOnClick: TcxGridViewMenuItemActionEvent = nil; AEnabled: Boolean = True; - AChecked: Boolean = False; AData: TObject = nil): TcxGridViewMenuItem; -begin - Result := TcxGridViewMenuItem.Create(ACaption, AEnabled, AChecked, AData, AOnClick); - FItems.Add(Result); -end; - -function TcxGridViewMenuItems.AddSeparator: TcxGridViewMenuItem; -begin - Result := AddItem(cxGridViewMenuSeparatorCaption); -end; - -procedure TcxGridViewMenuItems.Delete(AIndex: Integer); -begin - Items[AIndex].Free; - FItems.Delete(AIndex); -end; - -procedure TcxGridViewMenuItems.Prepare(AMenuItem: TMenuItem); -var - I: Integer; - AChildMenuItem: TMenuItem; -begin - for I := 0 to Count - 1 do - begin - AChildMenuItem := CreateMenuItem(AMenuItem.Owner, ''); - Items[I].Prepare(AChildMenuItem); - AMenuItem.Add(AChildMenuItem); - end; -end; - -{$IFDEF DELPHI6} - -procedure TcxGridViewMenuItems.Prepare(const AMenuItem: TDesignMenuItem); -var - I: Integer; - AChildMenuItem: TDesignMenuItem; -begin - for I := 0 to Count - 1 do - begin - AChildMenuItem := AMenuItem.AddItem('', 0, False, True, Items[I].MenuItemClick); - Items[I].Prepare(AChildMenuItem); - end; -end; - -{$ENDIF} - -procedure TcxGridViewMenuItems.RemoveExcessSeparators; -var - APrevItemIsSeparator: Boolean; - I: Integer; -begin - APrevItemIsSeparator := True; - for I := Count - 1 downto 0 do - if Items[I].IsSeparator then - if APrevItemIsSeparator then - Delete(I) - else - APrevItemIsSeparator := True - else - begin - APrevItemIsSeparator := False; - Items[I].RemoveExcessSeparators; - end; -end; - -{ TcxGridViewMenuItem } - -constructor TcxGridViewMenuItem.Create(const ACaption: string; - AEnabled, AChecked: Boolean; AData: TObject; AOnAction: TcxGridViewMenuItemActionEvent); -begin - inherited Create; - Caption := ACaption; - Enabled := AEnabled; - Checked := AChecked; - Data := AData; - OnAction := AOnAction; -end; - -procedure TcxGridViewMenuItem.MenuItemClick(Sender: TObject); -begin - DoAction; -end; - -procedure TcxGridViewMenuItem.DoAction; -begin - if Assigned(OnAction) then OnAction(Self); -end; - -function TcxGridViewMenuItem.IsSeparator: Boolean; -begin - Result := Caption = cxGridViewMenuSeparatorCaption; -end; - -procedure TcxGridViewMenuItem.Prepare(AMenuItem: TMenuItem); -begin - AMenuItem.Caption := Caption; - AMenuItem.Enabled := Enabled; - AMenuItem.Checked := Checked; - if not Assigned(AMenuItem.OnClick) then - AMenuItem.OnClick := MenuItemClick; - inherited; -end; - -{$IFDEF DELPHI6} - -procedure TcxGridViewMenuItem.Prepare(const AMenuItem: TDesignMenuItem); -begin - AMenuItem.Caption := Caption; - AMenuItem.Enabled := Enabled; - AMenuItem.Checked := Checked; - inherited; -end; - -{$ENDIF} - -{ TcxCustomGridViewMenuProvider } - -constructor TcxCustomGridViewMenuProvider.Create(AGridView: TcxCustomGridView); -begin - inherited Create; - FGridView := AGridView; - FDesigner := GetObjectDesigner(GridView); - FDesignHelper := TcxDesignHelper.Create(GridView.Control); - FItems := TcxGridViewMenuItems.Create; - InitItems; - Items.RemoveExcessSeparators; -end; - -destructor TcxCustomGridViewMenuProvider.Destroy; -begin - FItems.Free; - FDesignHelper.Free; - inherited; -end; - -{$IFNDEF NONDB} - -procedure TcxCustomGridViewMenuProvider.GetDataSourceName(const S: string); -begin - FDataSourceNames.Add(S); -end; - -function TcxCustomGridViewMenuProvider.GetDBGridView: TcxCustomGridView; -begin - Result := GridView; - if not (Result.DataController is TcxDBDataController) then - Result := nil; -end; - -function TcxCustomGridViewMenuProvider.GetViewDataSource: TDataSource; -begin - Result := TcxDBDataController(DBGridView.DataController).DataSource; -end; - -procedure TcxCustomGridViewMenuProvider.SetViewDataSource(Value: TDataSource); -begin - TcxDBDataController(DBGridView.DataController).DataSource := Value; -end; - -{$ENDIF} - -procedure TcxCustomGridViewMenuProvider.DesignerModified; -begin - Designer.Modified; -end; - -procedure TcxCustomGridViewMenuProvider.ObjectCreated(AObject: TPersistent); -begin - SelectObject(AObject); - DesignerModified; -end; - -procedure TcxCustomGridViewMenuProvider.SelectObject(AObject: TPersistent); -begin - DesignHelper.SelectObject(AObject, True, False); -end; - -procedure TcxCustomGridViewMenuProvider.InitAdditionalItems; -begin - Items.AddItem('Edit Layout and Data...', EditLayoutAndData); - InitCopySettingsFromViewItem; - Items.AddItem('Set As Default', SetAsDefault); -end; - -procedure TcxCustomGridViewMenuProvider.InitCopySettingsFromViewItem; -var - AViewList: TcxGridViewList; - AItem: TcxGridViewMenuItem; - I: Integer; -begin - AViewList := TcxGridViewList.Create(Designer); - try - if AViewList.ViewNames.Count = 1 then Exit; - AItem := Items.AddItem('Copy Settings from View'); - for I := 0 to AViewList.ViewNames.Count - 1 do - if AViewList.Views[I] <> GridView then - AItem.AddItem(AViewList.ViewNames[I], CopySettings, True, False, AViewList.Views[I]); - finally - AViewList.Free; - end; -end; - -{$IFNDEF NONDB} - -procedure TcxCustomGridViewMenuProvider.InitDataBindingItems; -var - I: Integer; - AItem: TcxGridViewMenuItem; - ADataSourceNames: TStringList; - - function IsDataSourceLinked(AIndex: Integer): Boolean; - begin - Result := Designer.GetComponent(ADataSourceNames[AIndex]) = ViewDataSource; - end; - -begin - ADataSourceNames := GetDataSourceNames; - try - if ADataSourceNames.Count = 0 then Exit; - if ADataSourceNames.Count = 1 then - Items.AddItem('Link to ' + ADataSourceNames[0], LinkToDataSource, True, - IsDataSourceLinked(0), TObject(0)) - else - begin - AItem := Items.AddItem('Link to DataSource', nil, True, False); - for I := 0 to ADataSourceNames.Count - 1 do - AItem.AddItem(ADataSourceNames[I], LinkToDataSource, True, - IsDataSourceLinked(I), TObject(I)); - end; - finally - ADataSourceNames.Free; - end; -end; - -{$ENDIF} - -procedure TcxCustomGridViewMenuProvider.InitItems; -begin -{$IFNDEF NONDB} - if DBGridView <> nil then - begin - InitDataBindingItems; - Items.AddSeparator; - end; -{$ENDIF} - InitStructureItems; - Items.AddSeparator; - InitLayoutItems; - Items.AddSeparator; - InitAdditionalItems; -end; - -procedure TcxCustomGridViewMenuProvider.InitLayoutItems; -begin -end; - -procedure TcxCustomGridViewMenuProvider.InitStructureItems; -begin - Items.AddItem('Delete View', DeleteView, CanDeleteComponent(GridView.Owner, GridView)); -end; - -procedure TcxCustomGridViewMenuProvider.CopySettings(Sender: TcxGridViewMenuItem); -begin - GridView.AssignSettings(Sender.Data as TcxCustomGridView); - DesignerModified; -end; - -procedure TcxCustomGridViewMenuProvider.DeleteView(Sender: TcxGridViewMenuItem); -begin - SelectObject(GridView.Level); - GridView.Free; - DesignerModified; -end; - -procedure TcxCustomGridViewMenuProvider.EditLayoutAndData(Sender: TcxGridViewMenuItem); -begin - if ShowGridViewEditor(GridView) then - DesignerModified; -end; - -procedure TcxCustomGridViewMenuProvider.SetAsDefault(Sender: TcxGridViewMenuItem); -begin - SaveViewToTemplate(GetViewTemplateRegKey, GridView); -end; - -{$IFNDEF NONDB} - -function TcxCustomGridViewMenuProvider.GetDataSourceNames: TStringList; -begin - Result := TStringList.Create; - FDataSourceNames := Result; - Designer.GetComponentNames(GetTypeData(TypeInfo(TDataSource)), GetDataSourceName); - FDataSourceNames := nil; - Result.Sort; -end; - -procedure TcxCustomGridViewMenuProvider.LinkToDataSource(Sender: TcxGridViewMenuItem); -var - ADataSourceNames: TStringList; - ADataSource: TDataSource; -begin - ADataSourceNames := GetDataSourceNames; - try - ADataSource := TDataSource(Designer.GetComponent(ADataSourceNames[Integer(Sender.Data)])); - (DBGridView.DataController as IcxCustomGridDataController).DeleteAllItems; - ViewDataSource := ADataSource; - (DBGridView.DataController as IcxCustomGridDataController).CreateAllItems(False); - DesignerModified; - finally - ADataSourceNames.Free; - end; -end; - -{$ENDIF} - -{ TcxGridViewList } - -constructor TcxGridViewList.Create(ADesigner: IDesigner); -begin - inherited Create; - FDesigner := ADesigner; - FViewNames := TStringList.Create; - GetViewNames; - FViewNames.Sorted := True; -end; - -destructor TcxGridViewList.Destroy; -begin - FViewNames.Free; - inherited; -end; - -function TcxGridViewList.GetView(Index: Integer): TcxCustomGridView; -begin - if (0 <= Index) and (Index < ViewNames.Count) then - Result := Designer.GetComponent(ViewNames[Index]) as TcxCustomGridView - else - Result := nil; -end; - -procedure TcxGridViewList.AddViewName(const S: string); -begin - FViewNames.Add(S); -end; - -procedure TcxGridViewList.GetViewNames; -begin - ViewNames.Clear; - Designer.GetComponentNames(GetTypeData(PTypeInfo(TcxCustomGridView.ClassInfo)), AddViewName); -end; - -function TcxGridViewList.GetViewIndex(AView: TcxCustomGridView): Integer; -begin - Result := ViewNames.IndexOf(Designer.GetComponentName(AView)); -end; - -initialization - ViewEditorClassList := TcxRegisteredClassList.Create; - ViewMenuProviderClassList := TcxRegisteredClassList.Create; - RegisterViewMenuProviderClass(TcxCustomGridView, TcxCustomGridViewMenuProvider); - -finalization - UnregisterViewMenuProviderClass(TcxCustomGridView, TcxCustomGridViewMenuProvider); - FreeAndNil(ViewMenuProviderClassList); - FreeAndNil(ViewEditorClassList); - FreeAndNil(DefaultViewStorages); - -end. diff --git a/internal/x.46/ExpressQuantumGrid 6/Sources/cxWWGridConverter.pas b/internal/x.46/ExpressQuantumGrid 6/Sources/cxWWGridConverter.pas deleted file mode 100644 index a3f96a64..00000000 --- a/internal/x.46/ExpressQuantumGrid 6/Sources/cxWWGridConverter.pas +++ /dev/null @@ -1,1077 +0,0 @@ -{*******************************************************************} -{ } -{ Developer Express Cross Platform Component Library } -{ ExpressQuantumGrid } -{ } -{ Copyright (c) 2001-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSQUANTUMGRID AND ALL } -{ ACCOMPANYING VCL AND CLX CONTROLS AS PART OF AN EXECUTABLE } -{ PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} -unit cxWWGridConverter; - -interface - -{$I cxVer.inc} - -uses - Classes, SysUtils, cxConverterFactory, cxGridConverter, cxGridDBBandedTableView, cxGridCustomView, - DB, cxGraphics, cxCheckBox, Graphics, cxHyperLinkEdit, cxTextEdit, cxImage, cxSpinEdit, - StdCtrls, cxImageComboBox, cxButtonEdit, cxEdit, cxDBLookupComboBox, cxGrid, cxLookupDBGrid, - cxDropDownEdit, cxMRUEdit, cxMemo, cxCalendar, Controls, cxGridCustomTableView, cxStyles, - cxConverterUtils, cxCustomConverter; - -type - { TcxWWGridConverter } - TcxWWGridConverter = class(TcxCustomGridConverter) - private - FColor: Integer; - FFont: TFont; - FTitleColor: Integer; - FTitleFont: TFont; - function ExtractData(const AData: string; var AResultData: string; - AStartIndex: Integer; ASeparator: Char): Integer; - function GetCharCase(const ACharCase: string): TEditCharCase; - function GetcxGridView: TcxGridDBBandedTableView; - procedure GetFieldNames(AList: TStringList); - function GetFontWidth(AFont: TFont): Integer; - procedure ImportColumnCheckBox(AcxColumn: TcxGridDBBandedColumn; const AColumnData: string; - const AReadOnly: Boolean); - procedure ImportColumnCustomEdit(AcxColumn: TcxGridDBBandedColumn; const AColumnData: string); - procedure ImportColumnImage(AcxColumn: TcxGridDBBandedColumn; const AColumnData: string; - const AReadOnly: Boolean); - procedure ImportColumnRichEdit(AcxColumn: TcxGridDBBandedColumn; const AColumnData: string); - procedure ImportColumnText(AcxColumn: TcxGridDBBandedColumn; const AReadOnly: Boolean); - procedure ImportColumnUrlLink(AcxColumn: TcxGridDBBandedColumn; const AReadOnly: Boolean); - procedure ImportBands; - procedure ImportColumns; - procedure ImportGrid; - procedure ImportGridStyles; - procedure ImportWWCheckBox(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - procedure ImportWWComboBox(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - procedure ImportWWComboDlg(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - procedure ImportWWDateTimePicker(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - procedure ImportWWExpandButton(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - procedure ImportWWLookupCombo(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - procedure ImportWWLookupComboDlg(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - procedure ImportWWMonthCalendar(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - procedure ImportWWOptions; - procedure ImportWWRadioGroup(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - procedure ImportWWSpinEdit(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - procedure ImportWWTextEdit(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - function IsColumnDefault(const AFieldName: string): string; - function Pass(const AData: string; AStartIndex: Integer; AFieldCount: Integer; - ASeparator: Char): Integer; - protected - procedure DoRealImport; override; - procedure DoImportStyles; override; - function GetGridViewClass: TcxCustomGridViewClass; override; - property cxGridView: TcxGridDBBandedTableView read GetcxGridView; - public - class function GetSourceClassName: string; override; - end; - -implementation - -uses cxGridTableView; - -{ TcxWWGridConverter } - -class function TcxWWGridConverter.GetSourceClassName: string; -begin - Result := 'TwwDBGrid'; -end; - -procedure TcxWWGridConverter.DoRealImport; -begin - cxGridView.DataController.DataSource := GetClassProperty(nil, 'DataSource') as TDataSource; - ImportBands; - ImportColumns; - ImportGrid; -end; - -procedure TcxWWGridConverter.DoImportStyles; -begin - ImportGridStyles; -end; - -function TcxWWGridConverter.GetGridViewClass: TcxCustomGridViewClass; -begin - Result := TcxGridDBBandedTableView; -end; - -function TcxWWGridConverter.ExtractData(const AData: string; var AResultData: string; - AStartIndex: Integer; ASeparator: Char): Integer; -begin - Result := AStartIndex; - AResultData := ''; - while Result <= Length(AData) do - begin - if AData[Result] = ASeparator then - begin - Inc(Result); - Break; - end; - AResultData := AResultData + AData[Result]; - Inc(Result); - end; -end; - -function TcxWWGridConverter.GetCharCase(const ACharCase: string): TEditCharCase; -begin - if ACharCase = 'ecNormal' then - Result := ecNormal - else if ACharCase = 'ecUpperCase' then - Result := ecUpperCase - else if ACharCase = 'ecLowerCase' then - Result := ecLowerCase - else - Result := ecNormal; -end; - -function TcxWWGridConverter.GetcxGridView: TcxGridDBBandedTableView; -begin - Result := inherited cxGridView as TcxGridDBBandedTableView; -end; - -procedure TcxWWGridConverter.GetFieldNames(AList: TStringList); -var - ADataSource: TDataSource; - I: Integer; -begin - ADataSource := GetClassProperty(nil, 'DataSource') as TDataSource; - if ADataSource <> nil then - if ADataSource.DataSet <> nil then - with ADataSource.DataSet do - for I := 0 to Fields.Count - 1 do - AList.Add(Fields[I].FieldName + ';' + IntToStr(Fields[I].DisplayWidth)); -end; - -function TcxWWGridConverter.GetFontWidth(AFont: TFont): Integer; -var - APrevFont: TFont; -begin - Result := 0; - if AFont = nil then - Exit; - with Destination.Canvas do - begin - APrevFont := TFont.Create; - try - APrevFont.Assign(Font); - Canvas.Font := AFont; - Result := Canvas.TextWidth('X'); - Canvas.Font := APrevFont; - finally - APrevFont.Free; - end; - end; -end; - -procedure TcxWWGridConverter.ImportColumnCheckBox(AcxColumn: TcxGridDBBandedColumn; - const AColumnData: string; const AReadOnly: Boolean); -var - AValueChecked: string; - AValueUnchecked: string; - AIndex: Integer; -begin - AcxColumn.PropertiesClass := TcxCheckBoxProperties; - with TcxCheckBoxProperties(AcxColumn.Properties) do - begin - ReadOnly := AReadOnly; - AIndex := Pass(AColumnData, 1, 2, ';'); - AIndex := ExtractData(AColumnData, AValueChecked, AIndex, ';'); - ExtractData(AColumnData, AValueUnchecked, AIndex, ';'); - ValueChecked := AValueChecked; - ValueUnchecked := AValueUnchecked; - NullStyle := nssUnchecked; - end; -end; - -procedure TcxWWGridConverter.ImportColumnCustomEdit(AcxColumn: TcxGridDBBandedColumn; const AColumnData: string); -var - AComponentName: string; - AComponent: TComponent; - AIndex: Integer; -begin - AIndex := Pass(AColumnData, 1, 2, ';'); - ExtractData(AColumnData, AComponentName, AIndex, ';'); - ///////////////////////////////////////////////////////////////////// - //AComponent := Source.Owner.FindComponent(AComponentName); - ///////////////////////////////////////////////////////////////////// - AComponent := Designer_.GetComponent(AComponentName); - if AComponent <> nil then - begin - if AComponent.ClassName = 'TwwDBSpinEdit' then - ImportWWSpinEdit(AcxColumn, AComponent) - else if AComponent.ClassName = 'TwwDBEdit' then - ImportWWTextEdit(AcxColumn, AComponent) - else if AComponent.ClassName = 'TwwDBComboBox' then - ImportWWComboBox(AcxColumn, AComponent) - else if AComponent.ClassName = 'TwwDBComboDlg' then - ImportWWComboDlg(AcxColumn, AComponent) - else if AComponent.ClassName = 'TwwDBLookupCombo' then - ImportWWLookupCombo(AcxColumn, AComponent) - else if AComponent.ClassName = 'TwwDBLookupComboDlg' then - ImportWWLookupComboDlg(AcxColumn, AComponent) - else if AComponent.ClassName = 'TwwDBMonthCalendar' then - ImportWWMonthCalendar(AcxColumn, AComponent) - else if AComponent.ClassName = 'TwwDBDateTimePicker' then - ImportWWDateTimePicker(AcxColumn, AComponent) - else if AComponent.ClassName = 'TwwCheckBox' then - ImportWWCheckBox(AcxColumn, AComponent) - else if AComponent.ClassName = 'TwwExpandButton' then - ImportWWExpandButton(AcxColumn, AComponent) - else if AComponent.ClassName = 'TwwRadioGroup' then - ImportWWRadioGroup(AcxColumn, AComponent); - end; -end; - -procedure TcxWWGridConverter.ImportColumnImage(AcxColumn: TcxGridDBBandedColumn; - const AColumnData: string; const AReadOnly: Boolean); -var - AIndex: Integer; - AValue1: string; -begin - AcxColumn.PropertiesClass := TcxImageProperties; - with TcxImageProperties(AcxColumn.Properties) do - begin - ReadOnly := AReadOnly; - AIndex := Pass(AColumnData, 1, 2, ';'); - ExtractData(AColumnData, AValue1, AIndex, ';'); - Stretch := AValue1 = 'Stretch To Fit'; - end; -end; - -procedure TcxWWGridConverter.ImportColumnRichEdit(AcxColumn: TcxGridDBBandedColumn; - const AColumnData: string); -var - AComponentName: string; - AComponent: TComponent; - AIndex: Integer; -begin - AIndex := Pass(AColumnData, 1, 2, ';'); - ExtractData(AColumnData, AComponentName, AIndex, ';'); - ///////////////////////////////////////////////////////////////////// - //AComponent := Source.Owner.FindComponent(AComponentName); - ///////////////////////////////////////////////////////////////////// - AComponent := Designer_.GetComponent(AComponentName); - if AComponent <> nil then - begin - AcxColumn.PropertiesClass := TcxMemoProperties; - with TcxMemoProperties(AcxColumn.Properties) do - begin - Alignment := ConvertAlignment(GetEnumProperty(AComponent, 'Alignment')); - ReadOnly := GetBooleanProperty(AComponent, 'ReadOnly', ReadOnly); - AutoSelect := GetBooleanProperty(AComponent, 'AutoSelect', AutoSelect); - HideSelection := GetBooleanProperty(AComponent, 'HideSelection', HideSelection); - MaxLength := GetIntegerProperty(AComponent, 'MaxLength', MaxLength); - ScrollBars := ConvertScrollStyle(GetEnumProperty(AComponent, 'ScrollBars')); - WantReturns := GetBooleanProperty(AComponent, 'WantReturns', WantReturns); - WantTabs := GetBooleanProperty(AComponent, 'WantTabs', WantTabs); - WordWrap := GetBooleanProperty(AComponent, 'WordWrap', WordWrap); - end; - end; -end; - -procedure TcxWWGridConverter.ImportColumnText(AcxColumn: TcxGridDBBandedColumn; - const AReadOnly: Boolean); -begin - AcxColumn.PropertiesClass := TcxTextEditProperties; - with TcxTextEditProperties(AcxColumn.Properties) do - ReadOnly := AReadOnly; -end; - -procedure TcxWWGridConverter.ImportColumnUrlLink(AcxColumn: TcxGridDBBandedColumn; - const AReadOnly: Boolean); -begin - AcxColumn.PropertiesClass := TcxHyperLinkEditProperties; - with TcxHyperLinkEditProperties(AcxColumn.Properties) do - ReadOnly := AReadOnly; -end; - -procedure TcxWWGridConverter.ImportBands; -begin - cxGridView.OptionsView.BandHeaders := False; - cxGridView.Bands.Add; -end; - -procedure TcxWWGridConverter.ImportColumns; -var - AColumns: TStringList; - AColumnsNeedFree: Boolean; - AcxColumn: TcxGridDBBandedColumn; - I: Integer; - AFieldName: string; - AWidth: string; - AHeader: string; - AReadOnlyString: string; - AReadOnly: Boolean; - AColumnData: string; - AControlType: string; - AIndex: Integer; - AFontWidth: Integer; - AFieldColumns: Boolean; - ASelected: TStringList; -begin - AColumnsNeedFree := False; - ASelected := GetClassProperty(nil, 'Selected') as TStringList; - if ASelected <> nil then - begin - if ASelected.Count = 0 then - begin - AColumns := TStringList.Create; - AColumnsNeedFree := True; - GetFieldNames(AColumns); - AFieldColumns := True; - end - else - begin - AFieldColumns := False; - if cxGridView.DataController.DataSource <> nil then - AColumns := ASelected - else - begin - AColumns := TStringList.Create; - AColumnsNeedFree := True; - end; - end; - end - else - begin - AColumns := TStringList.Create; - AColumnsNeedFree := True; - GetFieldNames(AColumns); - AFieldColumns := True; - end; - try - AFontWidth := GetFontWidth(GetClassProperty(nil, 'Font') as TFont); - for I := 0 to AColumns.Count - 1 do - begin - if AFieldColumns then - begin - AIndex := ExtractData(AColumns[I], AFieldName, 1, ';'); - ExtractData(AColumns[I], AWidth, AIndex, ';'); - AHeader := AFieldName; - AReadOnly := False; - end - else - begin - AIndex := ExtractData(AColumns[I], AFieldName, 1, #9); - AIndex := ExtractData(AColumns[I], AWidth, AIndex, #9); - AIndex := ExtractData(AColumns[I], AHeader, AIndex, #9); - ExtractData(AColumns[I], AReadOnlyString, AIndex, #9); - AReadOnly := AReadOnlyString = 'T'; - end; - AcxColumn := cxGridView.CreateColumn; - AcxColumn.DataBinding.FieldName := AFieldName; - AcxColumn.Name := UniqueColumnName(AcxColumn, AcxColumn.DataBinding.FieldName); - AcxColumn.Width := StrToInt(AWidth) * AFontWidth; - AcxColumn.Caption := AHeader; - AcxColumn.HeaderAlignmentHorz := ConvertAlignment(GetEnumProperty(nil, 'TitleAlignment')); - AColumnData := IsColumnDefault(AFieldName); - if AColumnData <> '' then - begin - AIndex := Pass(AColumnData, 1, 1, ';'); - ExtractData(AColumnData, AControlType, AIndex, ';'); - if AControlType = 'Bitmap' then - ImportColumnImage(AcxColumn, AColumnData, AReadOnly) - else if AControlType = 'CheckBox' then - ImportColumnCheckBox(AcxColumn, AColumnData, AReadOnly) - else if AControlType = 'CustomEdit' then - begin - if Designer_ <> nil then - ImportColumnCustomEdit(AcxColumn, AColumnData); - end - else if AControlType = 'ImageIndex' then - else if AControlType = 'URL-Link' then - ImportColumnUrlLink(AcxColumn, AReadOnly) - else if AControlType = 'RichEdit' then - begin - if Designer_ <> nil then - ImportColumnRichEdit(AcxColumn, AColumnData); - end - end - else - if AReadOnly then - ImportColumnText(AcxColumn, AReadOnly); - AcxColumn.Position.BandIndex := 0; - end; - finally - if AColumnsNeedFree then - AColumns.Free; - end; -end; - -procedure TcxWWGridConverter.ImportGrid; -begin - ImportWWOptions; -end; - -procedure TcxWWGridConverter.ImportGridStyles; -var - AStyle: TcxCustomStyle; - AObject: TObject; - AHighligntColor: Integer; - AShadowColor: Integer; - AAlternatingRowColor: Integer; - AActiveRecordColor: Integer; -begin - FColor := GetIntegerProperty(nil, 'Color'); - FFont := GetClassProperty(nil, 'Font') as TFont; - if (FColor <> clWindow) or not DefaultFont(FFont) then - begin - AStyle := CreateStyleItem; - (AStyle as TcxStyle).Color := FColor; - (AStyle as TcxStyle).Font.Assign(FFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - cxGridView.Styles.Content := AStyle as TcxStyle; - end; - FTitleColor := GetIntegerProperty(nil, 'TitleColor'); - FTitleFont := GetClassProperty(nil, 'TitleFont') as TFont; - if (FTitleColor <> clBtnFace) or not DefaultFont(FTitleFont) then - begin - AStyle := CreateStyleItem; - (AStyle as TcxStyle).Color := FTitleColor; - (AStyle as TcxStyle).Font.Assign(FTitleFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - cxGridView.Styles.Header := AStyle as TcxStyle; - cxGridView.Styles.Footer := AStyle as TcxStyle; - cxGridView.Styles.Background := AStyle as TcxStyle; - cxGridView.Styles.Indicator := AStyle as TcxStyle; - end; - AObject := GetClassProperty(nil, 'LineColors'); - if AObject <> nil then - begin - AHighligntColor := GetIntegerProperty(AObject, 'HighlightColor'); - if AHighligntColor <> clBtnHighlight then - cxGridView.OptionsView.GridLineColor := AHighligntColor - else - begin - AShadowColor := GetIntegerProperty(AObject, 'ShadowColor'); - if AShadowColor <> clBtnShadow then - cxGridView.OptionsView.GridLineColor := AShadowColor; - end; - end; - AObject := GetClassProperty(nil, 'PaintOptions'); - if AObject <> nil then - begin - AAlternatingRowColor := GetIntegerProperty(AObject, 'AlternatingRowColor'); - if AAlternatingRowColor <> clNone then - begin - AStyle := CreateStyleItem; - (AStyle as TcxStyle).Color := AAlternatingRowColor; - (AStyle as TcxStyle).Font.Assign(FFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - cxGridView.Styles.ContentOdd := AStyle as TcxStyle; - end; - AActiveRecordColor := GetIntegerProperty(AObject, 'ActiveRecordColor'); - if AActiveRecordColor <> clNone then - begin - AStyle := CreateStyleItem; - (AStyle as TcxStyle).Color := AActiveRecordColor; - (AStyle as TcxStyle).Font.Assign(FFont); - (AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color; - cxGridView.Styles.Selection := AStyle as TcxStyle; - end; - end; -end; - -procedure TcxWWGridConverter.ImportWWCheckBox(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - function GetNullStyle(const AStyle: string): TcxCheckBoxNullValueShowingStyle; - begin - if AStyle = 'cbGrayed' then - Result := nssGrayedChecked - else if AStyle = 'cbUnchecked' then - Result := nssUnchecked - else - Result := nssInactive; - end; -begin - AcxColumn.PropertiesClass := TcxCheckBoxProperties; - with TcxCheckBoxProperties(AcxColumn.Properties) do - begin - Alignment := ConvertAlignment(GetEnumProperty(AComponent, 'Alignment')); - AllowGrayed := GetBooleanProperty(AComponent, 'AllowGrayed', AllowGrayed); -// Caption := GetStringProperty(AComponent, 'Caption', Caption); - DisplayChecked := GetStringProperty(AComponent, 'DisplayValueChecked', DisplayChecked); - DisplayUnchecked := GetStringProperty(AComponent, 'DisplayValueUnchecked', DisplayUnchecked); - FullFocusRect := GetBooleanProperty(AComponent, 'ShowFocusRect', FullFocusRect); - NullStyle := GetNullStyle(GetEnumProperty(AComponent, 'NullAndBlankState')); - ReadOnly := GetBooleanProperty(AComponent, 'ReadOnly', ReadOnly); - ValueChecked := GetStringProperty(AComponent, 'ValueChecked', ValueChecked); - ValueUnchecked := GetStringProperty(AComponent, 'ValueUnchecked', ValueUnchecked); - end; -end; - -procedure TcxWWGridConverter.ImportWWComboBox(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); -var - AwwItems: TStringList; - AValue: string; - AIndex: Integer; - - procedure ImportToImageComboBox; - var - I: Integer; - AItem: TcxImageComboBoxItem; - ADescription: string; - begin - AcxColumn.PropertiesClass := TcxImageComboBoxProperties; - with TcxImageComboBoxProperties(AcxColumn.Properties) do - begin - ReadOnly := GetBooleanProperty(AComponent, 'ReadOnly', ReadOnly); - AwwItems := GetClassProperty(AComponent, 'Items') as TStringList; - if AwwItems <> nil then - begin - for I := 0 to AwwItems.Count - 1 do - begin - AItem := Items.Add as TcxImageComboBoxItem; - AIndex := ExtractData(AwwItems[I], ADescription, 1, #9); - ExtractData(AwwItems[I], AValue, AIndex, #9); - AItem.Description := ADescription; - AItem.Value := AValue; - end; - end; - if GetEnumProperty(AComponent, 'ButtonStyle') = 'cbsCustom' then - ButtonGlyph.Assign(GetClassProperty(AComponent, 'ButtonGlyph') as TBitmap); - ImmediateDropDown := GetBooleanProperty(AComponent, 'AutoDropDown', ImmediateDropDown); - DropDownRows := GetIntegerProperty(AComponent, 'DropDownCount', DropDownRows); - end; - end; - - procedure ImportToMRUEdit; - var - I: Integer; - begin - AcxColumn.PropertiesClass := TcxMRUEditProperties; - with TcxMRUEditProperties(AcxColumn.Properties) do - begin - ReadOnly := GetBooleanProperty(AComponent, 'ReadOnly', ReadOnly); - AwwItems := GetClassProperty(AComponent, 'Items') as TStringList; - if AwwItems <> nil then - begin - for I := 0 to AwwItems.Count - 1 do - begin - AIndex := Pass(AwwItems[I], 1, 1, #9); - ExtractData(AwwItems[I], AValue, AIndex, #9); - LookupItems.Add(AValue); - end; - end; - if GetEnumProperty(AComponent, 'ButtonStyle') = 'cbsCustom' then - ButtonGlyph.Assign(GetClassProperty(AComponent, 'ButtonGlyph') as TBitmap); - ImmediateDropDown := GetBooleanProperty(AComponent, 'AutoDropDown', ImmediateDropDown); - DropDownRows := GetIntegerProperty(AComponent, 'DropDownCount', DropDownRows); - ShowEllipsis := False; - end; - end; -var - AWWHistory: TObject; -begin - AWWHistory := GetClassProperty(AComponent, 'HistoryList'); - if AWWHistory <> nil then - begin - if GetBooleanProperty(AWWHistory, 'Enabled', False) then - ImportToMRUEdit - else - ImportToImageComboBox; - end - else - ImportToImageComboBox; -end; - -procedure TcxWWGridConverter.ImportWWComboDlg(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); -var - AButton: TcxEditButton; - AButtonStyle: string; -begin - AcxColumn.PropertiesClass := TcxButtonEditProperties; - with TcxButtonEditProperties(AcxColumn.Properties) do - begin - Buttons.Clear; - AButton := Buttons.Add; - AButton.Glyph.Assign(GetClassProperty(AComponent, 'ButtonGlyph') as TBitmap); - AButtonStyle := GetEnumProperty(AComponent, 'ButtonStyle'); - if AButtonStyle = 'cbsCustom' then - AButton.Kind := bkGlyph - else if AButtonStyle = 'cbsEllipsis' then - AButton.Kind := bkEllipsis - else if AButtonStyle = 'cbsDownArrow' then - AButton.Kind := bkDown; - AButton.Width := GetIntegerProperty(AComponent, 'ButtonWidth', AButton.Width); - CharCase := GetCharCase(GetEnumProperty(AComponent, 'CharCase')); - MaxLength := GetIntegerProperty(AComponent, 'MaxLength', MaxLength); - ReadOnly := GetBooleanProperty(AComponent, 'ReadOnly', ReadOnly); - AButton.Visible := GetBooleanProperty(AComponent, 'ShowButton', AButton.Visible); - end; -end; - -procedure TcxWWGridConverter.ImportWWDateTimePicker(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); - function GetCalendarAlignment(const AValue: string): TAlignment; - begin - if AValue = 'wwdtaCenter' then - Result := taCenter - else if AValue = 'wwdtaLeft' then - Result := taLeftJustify - else if AValue = 'wwdtaRight' then - Result := taRightJustify - else - Result := taCenter; - end; -var - AWWCalendarAttributes: TObject; - ADateButtons: TDateButtons; - AWWOptions: TStringList; - I: Integer; -begin - AcxColumn.PropertiesClass := TcxDateEditProperties; - with TcxDateEditProperties(AcxColumn.Properties) do - begin - AWWCalendarAttributes := GetClassProperty(AComponent, 'CalendarAttributes'); - if AWWCalendarAttributes <> nil then - Alignment.Horz := GetCalendarAlignment(GetEnumProperty(AWWCalendarAttributes, 'Alignment')); - ButtonGlyph.Assign(GetClassProperty(AComponent, 'ButtonGlyph') as TBitmap); - ADateButtons := [btnClear]; - if AWWCalendarAttributes <> nil then - begin - AWWOptions := TStringList.Create; - try - EnablePropertyException; - try - GetSetProperty(AWWCalendarAttributes, 'Options', AWWOptions); - if not AWWOptions.Find('mdoNoToday', I) then - Include(ADateButtons, btnToday); - DateButtons := ADateButtons; - except - on EcxUnknownProperty do; - end; - finally - AWWOptions.Free; - DisablePropertyException; - end; - end; - end; -end; - -procedure TcxWWGridConverter.ImportWWExpandButton(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); -begin -end; - -procedure TcxWWGridConverter.ImportWWLookupCombo(AcxColumn: TcxGridDBBandedColumn; - AComponent: TComponent); -var - AListDataSource: TDataSource; - AListTable: TObject; - AIndex: Integer; - ASelected: TStringList; - I: Integer; - AListFieldName: string; - AListFieldWidth: string; - AListFieldCaption: string; - AcxLookupColumn: TcxLookupDBGridColumn; - AWWOptions: TStringList; - AString: string; - AWWSeqSearchOptions: TStringList; -begin - AcxColumn.PropertiesClass := TcxLookupComboBoxProperties; - with TcxLookupComboBoxProperties(AcxColumn.Properties) do - begin - AListTable := GetClassProperty(AComponent, 'LookupTable'); - if AListTable <> nil then - begin - AListDataSource := TDataSource.Create(cxGridView); - AListDataSource.DataSet := AListTable as TDataSet; - ListSource := AListDataSource; - KeyFieldNames := GetStringProperty(AComponent, 'LookupField', ''); - ASelected := GetClassProperty(AComponent, 'Selected') as TStringList; - if ASelected <> nil then - begin - for I := 0 to ASelected.Count - 1 do - begin - AIndex := ExtractData(ASelected[I], AListFieldName, 1, #9); - AIndex := ExtractData(ASelected[I], AListFieldWidth, AIndex, #9); - ExtractData(ASelected[I], AListFieldCaption, AIndex, #9); - AcxLookupColumn := ListColumns.Add; - AcxLookupColumn.FieldName := AListFieldName; - AcxLookupColumn.Caption := AListFieldCaption; - AcxLookupColumn.Width := StrToInt(AListFieldWidth) * - GetFontWidth(GetClassProperty(nil, 'Font') as TFont); - end; - end; - DropDownWidth := GetIntegerProperty(AComponent, 'DropDownWidth', DropDownWidth); - if DropDownWidth = 0 then - begin - for I := 0 to ListColumns.Count - 1 do - DropDownWidth := DropDownWidth + ListColumns[I].Width; - end; - DropDownRows := GetIntegerProperty(AComponent, 'DropDownCount', DropDownRows); - if GetEnumProperty(AComponent, 'ButtonStyle') = 'cbsCustom' then - ButtonGlyph.Assign(GetClassProperty(AComponent, 'ButtonGlyph') as TBitmap); - ReadOnly := GetBooleanProperty(AComponent, 'ReadOnly', ReadOnly); - PopupAlignment := ConvertAlignment(GetEnumProperty(AComponent, 'DropDownAlignment')); - AString := GetEnumProperty(AComponent, 'Style'); - if AString = 'csDropDown' then - DropDownListStyle := lsEditList - else - DropDownListStyle := lsFixedList; - ImmediateDropDown := GetBooleanProperty(AComponent, 'AutoDropDown', ImmediateDropDown); - AWWSeqSearchOptions := TStringList.Create; - try - EnablePropertyException; - try - GetSetProperty(AComponent, 'SeqSearchOptions', AWWSeqSearchOptions); - AWWSeqSearchOptions.Sort; - IncrementalFiltering := AWWSeqSearchOptions.Find('ssoEnabled', I); - ListOptions.CaseInsensitive := not AWWSeqSearchOptions.Find('ssoCaseSensitive', I); - except - on EcxUnknownProperty do; - end; - finally - AWWSeqSearchOptions.Free; - DisablePropertyException; - end; - AWWOptions := TStringList.Create; - try - EnablePropertyException; - try - GetSetProperty(AComponent, 'Options', AWWOptions); - AWWOptions.Sort; - if AWWOptions.Find('loColLines', I) then - begin - if AWWOptions.Find('loRowLines', I) then - ListOptions.GridLines := glBoth - else - ListOptions.GridLines := glVertical; - end - else - begin - if AWWOptions.Find('loRowLines', I) then - ListOptions.GridLines := glHorizontal - else - ListOptions.GridLines := glNone; - end; - ListOptions.ShowHeader := AWWOptions.Find('loTitles', I); - except - on EcxUnknownProperty do; - end; - finally - AWWOptions.Free; - DisablePropertyException; - end; - end; - end; -end; - -procedure TcxWWGridConverter.ImportWWLookupComboDlg(AcxColumn: TcxGridDBBandedColumn; - AComponent: TComponent); -var - AListDataSource: TDataSource; - AListTable: TObject; - AIndex: Integer; - ASelected: TStringList; - I: Integer; - AListFieldName: string; - AListFieldWidth: string; - AListFieldCaption: string; - AcxLookupColumn: TcxLookupDBGridColumn; - AString: string; - AWWSeqSearchOptions: TStringList; - AWWGridOptions: TStringList; -begin - AcxColumn.PropertiesClass := TcxLookupComboBoxProperties; - with TcxLookupComboBoxProperties(AcxColumn.Properties) do - begin - AListTable := GetClassProperty(AComponent, 'LookupTable'); - if AListTable <> nil then - begin - AListDataSource := TDataSource.Create(cxGridView); - AListDataSource.DataSet := AListTable as TDataSet; - ListSource := AListDataSource; - KeyFieldNames := GetStringProperty(AComponent, 'LookupField', ''); - ASelected := GetClassProperty(AComponent, 'Selected') as TStringList; - if ASelected <> nil then - begin - for I := 0 to ASelected.Count - 1 do - begin - AIndex := ExtractData(ASelected[I], AListFieldName, 1, #9); - AIndex := ExtractData(ASelected[I], AListFieldWidth, AIndex, #9); - ExtractData(ASelected[I], AListFieldCaption, AIndex, #9); - AcxLookupColumn := ListColumns.Add; - AcxLookupColumn.FieldName := AListFieldName; - AcxLookupColumn.Caption := AListFieldCaption; - AcxLookupColumn.Width := StrToInt(AListFieldWidth) * - GetFontWidth(GetClassProperty(nil, 'Font') as TFont); - end; - end; - DropDownWidth := 0; - for I := 0 to ListColumns.Count - 1 do - DropDownWidth := DropDownWidth + ListColumns[I].Width; - if GetEnumProperty(AComponent, 'ButtonStyle') = 'cbsCustom' then - ButtonGlyph.Assign(GetClassProperty(AComponent, 'ButtonGlyph') as TBitmap); - ReadOnly := GetBooleanProperty(AComponent, 'ReadOnly', ReadOnly); - AString := GetEnumProperty(AComponent, 'Style'); - if AString = 'csDropDown' then - DropDownListStyle := lsEditList - else - DropDownListStyle := lsFixedList; - ImmediateDropDown := GetBooleanProperty(AComponent, 'AutoDropDown', ImmediateDropDown); - AWWSeqSearchOptions := TStringList.Create; - try - EnablePropertyException; - try - GetSetProperty(AComponent, 'SeqSearchOptions', AWWSeqSearchOptions); - AWWSeqSearchOptions.Sort; - IncrementalFiltering := AWWSeqSearchOptions.Find('ssoEnabled', I); - ListOptions.CaseInsensitive := not AWWSeqSearchOptions.Find('ssoCaseSensitive', I); - except - on EcxUnknownProperty do; - end; - finally - AWWSeqSearchOptions.Free; - DisablePropertyException; - end; - AWWGridOptions := TStringList.Create; - try - EnablePropertyException; - try - GetSetProperty(AComponent, 'GridOptions', AWWGridOptions); - AWWGridOptions.Sort; - if AWWGridOptions.Find('dgColLines', I) then - begin - if AWWGridOptions.Find('dgRowLines', I) then - ListOptions.GridLines := glBoth - else - ListOptions.GridLines := glVertical; - end - else - begin - if AWWGridOptions.Find('dgRowLines', I) then - ListOptions.GridLines := glHorizontal - else - ListOptions.GridLines := glNone; - end; - ListOptions.ShowHeader := AWWGridOptions.Find('dgTitles', I); - except - on EcxUnknownProperty do; - end; - finally - AWWGridOptions.Free; - DisablePropertyException; - end; - end; - end; -end; - -procedure TcxWWGridConverter.ImportWWMonthCalendar(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); -var - AWWOptions: TStringList; - ADateButtons: TDateButtons; - I: Integer; -begin - AcxColumn.PropertiesClass := TcxDateEditProperties; - with TcxDateEditProperties(AcxColumn.Properties) do - begin - AWWOptions := TStringList.Create; - try - EnablePropertyException; - try - GetSetProperty(AComponent, 'Options', AWWOptions); - ADateButtons := [btnClear]; - if not AWWOptions.Find('mdoNoToday', I) then - Include(ADateButtons, btnToday); - DateButtons := ADateButtons; - except - on EcxUnknownProperty do; - end; - finally - AWWOptions.Free; - DisablePropertyException; - end; - DateOnError := deToday; - end; -end; - -procedure TcxWWGridConverter.ImportWWOptions; -var - AOptions: TStringList; - I: Integer; -begin - AOptions := TStringList.Create; - try - EnablePropertyException; - try - GetSetProperty(nil, 'Options', AOptions); - AOptions.Sort; - with cxGridView do - begin - OptionsBehavior.AlwaysShowEditor := AOptions.Find('dgAlwaysShowEditor', I); - OptionsData.Editing := AOptions.Find('dgEditing', I); - OptionsView.Header := AOptions.Find('dgTitles', I); - OptionsView.Indicator := AOptions.Find('dgIndicator', I); - OptionsCustomize.ColumnHorzSizing := AOptions.Find('dgColumnResize', I); - if AOptions.Find('dgColLines', I) then - begin - if AOptions.Find('dgRowLines', I) then - OptionsView.GridLines := glBoth - else - OptionsView.GridLines := glVertical; - end - else - begin - if AOptions.Find('dgRowLines', I) then - OptionsView.GridLines := glHorizontal - else - OptionsView.GridLines := glNone; - end; - OptionsBehavior.FocusCellOnTab := AOptions.Find('dgTabs', I); - OptionsSelection.CellSelect := not AOptions.Find('dgRowSelect', I); - OptionsSelection.HideSelection := not AOptions.Find('dgAlwaysShowSelection', I); - OptionsData.DeletingConfirmation := AOptions.Find('dgConfirmDelete', I); - OptionsData.CancelOnExit := AOptions.Find('dgCancelOnExit', I); - OptionsSelection.MultiSelect := AOptions.Find('dgMultiSelect', I); - OptionsView.Footer := AOptions.Find('dgShowFooter', I); - OptionsBehavior.FocusCellOnCycle := not AOptions.Find('dgTabExitsOnLastCol', I); - end; - AOptions.Clear; - GetSetProperty(nil, 'KeyOptions', AOptions); - AOptions.Sort; - with cxGridView do - begin - OptionsBehavior.GoToNextCellOnEnter := AOptions.Find('dgEnterToTab', I); - OptionsData.Deleting := AOptions.Find('dgAllowDelete', I); - OptionsData.Inserting := AOptions.Find('dgAllowInsert', I); - end; - except - on EcxUnknownProperty do; - end; - finally - AOptions.Free; - DisablePropertyException; - end; -end; - -procedure TcxWWGridConverter.ImportWWRadioGroup(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); -var - AWWItems: TStringList; - AWWValues: TStringList; - AcxItem: TcxImageComboBoxItem; - I: Integer; -begin - AcxColumn.PropertiesClass := TcxImageComboBoxProperties; - with TcxImageComboBoxProperties(AcxColumn.Properties) do - begin - AWWItems := GetClassProperty(AComponent, 'Items') as TStringList; - AWWValues := GetClassProperty(AComponent, 'Values') as TStringList; - if (AWWItems <> nil) and (AWWValues <> nil) then - begin - for I := 0 to AWWItems.Count - 1 do - begin - AcxItem := Items.Add as TcxImageComboBoxItem; - AcxItem.Description := AWWItems[I]; - if I < AWWValues.Count then - AcxItem.Value := AWWValues[I]; - end; - end; - ReadOnly := GetBooleanProperty(AComponent, 'ReadOnly', ReadOnly); - Images := GetClassProperty(AComponent, 'GlyphImages') as TImageList; - ShowDescriptions := GetBooleanProperty(AComponent, 'ShowText', ShowDescriptions); - end; - AcxColumn.Options.ShowEditButtons := isebAlways; -end; - -procedure TcxWWGridConverter.ImportWWSpinEdit(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); -begin - AcxColumn.PropertiesClass := TcxSpinEditProperties; - with TcxSpinEditProperties(AcxColumn.Properties) do - begin - AutoSelect := GetBooleanProperty(AComponent, 'AutoSelect', AutoSelect); - ReadOnly := GetBooleanProperty(AComponent, 'ReadOnly', ReadOnly); - MaxValue := GetFloatProperty(AComponent, 'MaxValue', MaxValue); - MinValue := GetFloatProperty(AComponent, 'MinValue', MinValue); - Increment := GetFloatProperty(AComponent, 'Increment', Increment); - end; -end; - -procedure TcxWWGridConverter.ImportWWTextEdit(AcxColumn: TcxGridDBBandedColumn; AComponent: TComponent); -begin - AcxColumn.PropertiesClass := TcxTextEditProperties; - with TcxTextEditProperties(AcxColumn.Properties) do - begin - AutoSelect := GetBooleanProperty(AComponent, 'AutoSelect', AutoSelect); - ReadOnly := GetBooleanProperty(AComponent, 'ReadOnly', ReadOnly); - CharCase := GetCharCase(GetEnumProperty(AComponent, 'CharCase')); - MaxLength := GetIntegerProperty(AComponent, 'MaxLength', MaxLength); - end; -end; - -function TcxWWGridConverter.IsColumnDefault(const AFieldName: string): string; -var - AControlType: TStringList; - ADataFieldName: string; - I: Integer; -begin - Result := ''; - AControlType := GetClassProperty(nil, 'ControlType') as TStringList; - if AControlType <> nil then - begin - for I := 0 to AControlType.Count - 1 do - begin - ExtractData(AControlType[I], ADataFieldName, 1, ';'); - if ADataFieldName = AFieldName then - begin - Result := AControlType[I]; - Break; - end; - end; - end; -end; - -function TcxWWGridConverter.Pass(const AData: string; AStartIndex: Integer; - AFieldCount: Integer; ASeparator: Char): Integer; -var - ACount: Integer; -begin - Result := AStartIndex; - ACount := 0; - while Result <= Length(AData) do - begin - if AData[Result] = ASeparator then - begin - Inc(ACount); - if ACount = AFieldCount then - begin - Inc(Result); - Break; - end; - end; - Inc(Result); - end; -end; - -initialization - ConverterFactory(cxGridGroupConverterName).RegisterConverter('WW InfoPower Grid Converter', TcxWWGridConverter); - -end. diff --git a/internal/x.46/Lib/D11/cxADOAdapters.dcu b/internal/x.46/Lib/D11/cxADOAdapters.dcu deleted file mode 100644 index d6b15402..00000000 Binary files a/internal/x.46/Lib/D11/cxADOAdapters.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxADOAdaptersD11.dcp b/internal/x.46/Lib/D11/cxADOAdaptersD11.dcp deleted file mode 100644 index e4d07d6a..00000000 Binary files a/internal/x.46/Lib/D11/cxADOAdaptersD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxAccessibility.dcu b/internal/x.46/Lib/D11/cxAccessibility.dcu deleted file mode 100644 index 8031addb..00000000 Binary files a/internal/x.46/Lib/D11/cxAccessibility.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxBDEAdapters.dcu b/internal/x.46/Lib/D11/cxBDEAdapters.dcu deleted file mode 100644 index d35bcb76..00000000 Binary files a/internal/x.46/Lib/D11/cxBDEAdapters.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxBDEAdaptersD11.dcp b/internal/x.46/Lib/D11/cxBDEAdaptersD11.dcp deleted file mode 100644 index 43428f16..00000000 Binary files a/internal/x.46/Lib/D11/cxBDEAdaptersD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxBandedTableViewEditor.dcu b/internal/x.46/Lib/D11/cxBandedTableViewEditor.dcu deleted file mode 100644 index 64f1eb1d..00000000 Binary files a/internal/x.46/Lib/D11/cxBandedTableViewEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxBandedTableViewEditor.dfm b/internal/x.46/Lib/D11/cxBandedTableViewEditor.dfm deleted file mode 100644 index 4e144072..00000000 --- a/internal/x.46/Lib/D11/cxBandedTableViewEditor.dfm +++ /dev/null @@ -1,127 +0,0 @@ -inherited cxBandedTableViewEditor: TcxBandedTableViewEditor - Left = 477 - Caption = 'cxBandedTableViewEditor' - PixelsPerInch = 96 - TextHeight = 13 - inherited PViewEditor: TPanel - inherited PageControl1: TcxPageControl - ActivePage = TSBands - object TSBands: TcxTabSheet [0] - BorderWidth = 8 - Caption = ' Bands ' - object Panel22: TPanel - Left = 209 - Top = 0 - Width = 118 - Height = 273 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object BAddBand: TcxButton - Left = 8 - Top = 0 - Width = 110 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BAddBandClick - end - object BDeleteBand: TcxButton - Left = 8 - Top = 32 - Width = 110 - Height = 24 - Caption = 'Delete' - TabOrder = 1 - OnClick = BDeleteBandClick - end - object BBandMoveDown: TcxButton - Left = 8 - Top = 104 - Width = 110 - Height = 24 - Caption = 'Move &Down' - TabOrder = 2 - OnClick = BBandMoveDownClick - end - object BBandMoveUp: TcxButton - Left = 8 - Top = 72 - Width = 110 - Height = 24 - Caption = 'Move &Up' - TabOrder = 3 - OnClick = BBandMoveUpClick - end - end - object Panel20: TPanel - Left = 0 - Top = 0 - Width = 209 - Height = 273 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBBands: TListBox - Left = 1 - Top = 1 - Width = 207 - Height = 271 - Style = lbOwnerDrawFixed - Align = alClient - BorderStyle = bsNone - DragMode = dmAutomatic - ItemHeight = 16 - MultiSelect = True - PopupMenu = PMBands - TabOrder = 0 - OnClick = LBBandsClick - OnDragDrop = LBBandsDragDrop - OnDragOver = LBBandsDragOver - OnDrawItem = LBBandsDrawItem - OnEndDrag = LBBandsEndDrag - OnKeyPress = FormKeyPress - OnStartDrag = LBBandsStartDrag - end - end - end - end - end - object PMBands: TPopupMenu - Left = 230 - Top = 90 - object MIBandsAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BAddBandClick - end - object MIBandsDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BDeleteBandClick - end - object MenuItem4: TMenuItem - Caption = '-' - end - object MIBandsMoveUp: TMenuItem - Caption = 'Move Up' - ShortCut = 16422 - OnClick = BBandMoveUpClick - end - object MIBandsMoveDown: TMenuItem - Caption = 'Move Down' - ShortCut = 16424 - OnClick = BBandMoveDownClick - end - object MenuItem7: TMenuItem - Caption = '-' - end - object MIBandsSelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MIBandsSelectAllClick - end - end -end diff --git a/internal/x.46/Lib/D11/cxBlobEdit.dcu b/internal/x.46/Lib/D11/cxBlobEdit.dcu deleted file mode 100644 index 64fab7ea..00000000 Binary files a/internal/x.46/Lib/D11/cxBlobEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxButtonEdit.dcu b/internal/x.46/Lib/D11/cxButtonEdit.dcu deleted file mode 100644 index 26c458ab..00000000 Binary files a/internal/x.46/Lib/D11/cxButtonEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxButtons.dcu b/internal/x.46/Lib/D11/cxButtons.dcu deleted file mode 100644 index fb7cca39..00000000 Binary files a/internal/x.46/Lib/D11/cxButtons.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCalc.dcu b/internal/x.46/Lib/D11/cxCalc.dcu deleted file mode 100644 index f69af61b..00000000 Binary files a/internal/x.46/Lib/D11/cxCalc.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCalendar.dcu b/internal/x.46/Lib/D11/cxCalendar.dcu deleted file mode 100644 index ba2231a9..00000000 Binary files a/internal/x.46/Lib/D11/cxCalendar.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCardViewEditor.dcu b/internal/x.46/Lib/D11/cxCardViewEditor.dcu deleted file mode 100644 index c70c03db..00000000 Binary files a/internal/x.46/Lib/D11/cxCardViewEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCardViewEditor.dfm b/internal/x.46/Lib/D11/cxCardViewEditor.dfm deleted file mode 100644 index 8c648579..00000000 --- a/internal/x.46/Lib/D11/cxCardViewEditor.dfm +++ /dev/null @@ -1,15 +0,0 @@ -inherited cxCardViewEditor: TcxCardViewEditor - Caption = 'cxCardViewEditor' - PixelsPerInch = 96 - TextHeight = 13 - inherited PViewEditor: TPanel - inherited PageControl1: TcxPageControl - inherited TSItems: TcxTabSheet - Caption = ' Rows ' - end - inherited TSSummary: TcxTabSheet - TabVisible = False - end - end - end -end diff --git a/internal/x.46/Lib/D11/cxChartViewEditor.dcu b/internal/x.46/Lib/D11/cxChartViewEditor.dcu deleted file mode 100644 index ae18e2b4..00000000 Binary files a/internal/x.46/Lib/D11/cxChartViewEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxChartViewEditor.dfm b/internal/x.46/Lib/D11/cxChartViewEditor.dfm deleted file mode 100644 index dccf7e97..00000000 --- a/internal/x.46/Lib/D11/cxChartViewEditor.dfm +++ /dev/null @@ -1,165 +0,0 @@ -inherited cxChartViewEditor: TcxChartViewEditor - Left = 543 - Top = 157 - Caption = 'cxChartViewEditor' - ClientHeight = 291 - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - inherited PViewEditor: TPanel - Height = 291 - Constraints.MinHeight = 210 - Constraints.MinWidth = 200 - object tcMain: TcxTabControl - Left = 0 - Top = 0 - Width = 343 - Height = 291 - Align = alClient - TabOrder = 0 - Tabs.Strings = ( - ' Series ' - ' DataGroups ') - OnChange = tcMainChange - OnChanging = tcMainChanging - ClientRectBottom = 291 - ClientRectRight = 343 - ClientRectTop = 24 - object Panel1: TPanel - Left = 0 - Top = 24 - Width = 343 - Height = 267 - Align = alClient - BevelOuter = bvNone - BorderWidth = 8 - TabOrder = 0 - object Panel2: TPanel - Left = 217 - Top = 8 - Width = 118 - Height = 251 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btnItemAdd: TcxButton - Left = 8 - Top = 0 - Width = 110 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = btnItemAddClick - end - object btnItemDelete: TcxButton - Left = 8 - Top = 32 - Width = 110 - Height = 24 - Caption = 'Delete' - TabOrder = 1 - OnClick = btnItemDeleteClick - end - object btnItemMoveUp: TcxButton - Left = 8 - Top = 72 - Width = 110 - Height = 24 - Caption = 'Move &Up' - TabOrder = 2 - OnClick = btnItemMoveUpClick - end - object btnItemMoveDown: TcxButton - Left = 8 - Top = 104 - Width = 110 - Height = 24 - Caption = 'Move &Down' - TabOrder = 3 - OnClick = btnItemMoveDownClick - end - object btnItemSelectAll: TcxButton - Left = 8 - Top = 144 - Width = 110 - Height = 24 - Caption = 'Select All' - TabOrder = 4 - OnClick = btnItemSelectAllClick - end - end - object Panel9: TPanel - Left = 8 - Top = 8 - Width = 209 - Height = 251 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object lbItems: TListBox - Left = 1 - Top = 1 - Width = 207 - Height = 249 - Style = lbOwnerDrawFixed - Align = alClient - BorderStyle = bsNone - DragMode = dmAutomatic - ItemHeight = 13 - MultiSelect = True - PopupMenu = pmItems - TabOrder = 0 - OnClick = lbItemsClick - OnDragDrop = lbItemsDragDrop - OnDragOver = lbItemsDragOver - OnDrawItem = lbItemsDrawItem - OnEndDrag = lbItemsEndDrag - OnKeyPress = FormKeyPress - OnStartDrag = lbItemsStartDrag - end - end - end - end - end - object pmItems: TPopupMenu - Left = 140 - Top = 74 - object miItemAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = btnItemAddClick - end - object miItemDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = btnItemDeleteClick - end - object N2: TMenuItem - Caption = '-' - end - object miItemMoveUp: TMenuItem - Caption = 'Move Up' - ShortCut = 16422 - OnClick = btnItemMoveUpClick - end - object miItemMoveDown: TMenuItem - Caption = 'Move Down' - ShortCut = 16424 - OnClick = btnItemMoveDownClick - end - object N1: TMenuItem - Caption = '-' - end - object miItemSelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = btnItemSelectAllClick - end - end - object pmItemsAdd: TPopupMenu - Left = 140 - Top = 112 - end -end diff --git a/internal/x.46/Lib/D11/cxCheckBox.dcu b/internal/x.46/Lib/D11/cxCheckBox.dcu deleted file mode 100644 index 551f3f51..00000000 Binary files a/internal/x.46/Lib/D11/cxCheckBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCheckComboBox.dcu b/internal/x.46/Lib/D11/cxCheckComboBox.dcu deleted file mode 100644 index f64de576..00000000 Binary files a/internal/x.46/Lib/D11/cxCheckComboBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCheckGroup.dcu b/internal/x.46/Lib/D11/cxCheckGroup.dcu deleted file mode 100644 index 82731eb4..00000000 Binary files a/internal/x.46/Lib/D11/cxCheckGroup.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCheckGroupStatesEditor.dcu b/internal/x.46/Lib/D11/cxCheckGroupStatesEditor.dcu deleted file mode 100644 index 1c0fa9f9..00000000 Binary files a/internal/x.46/Lib/D11/cxCheckGroupStatesEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCheckGroupStatesEditor.dfm b/internal/x.46/Lib/D11/cxCheckGroupStatesEditor.dfm deleted file mode 100644 index 238c8b53..00000000 --- a/internal/x.46/Lib/D11/cxCheckGroupStatesEditor.dfm +++ /dev/null @@ -1,65 +0,0 @@ -object cxCheckGroupStatesEditorDlg: TcxCheckGroupStatesEditorDlg - Left = 260 - Top = 283 - BorderStyle = bsDialog - Caption = 'cxCheckGroup - CheckStates editor' - ClientHeight = 238 - ClientWidth = 436 - Color = clBtnFace - OldCreateOrder = False - OnShow = FormShow - PixelsPerInch = 96 - Position = poScreenCenter - TextHeight = 13 - AutoScroll = False - object clbStates: TcxCheckListBox - Left = 0 - Top = 0 - Width = 346 - Height = 238 - Align = alClient - Columns = 0 - EditValue = 0 - EditValueFormat = cvfCaptions - Items = <> - ParentColor = False - ScrollWidth = 0 - Style.LookAndFeel.Kind = lfUltraFlat - Style.LookAndFeel.NativeStyle = True - TabOrder = 0 - TabWidth = 0 - end - object Panel1: TPanel - Left = 346 - Top = 0 - Width = 90 - Height = 238 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btnOK: TcxButton - Left = 8 - Top = 8 - Width = 75 - Height = 25 - Caption = 'OK' - ModalResult = 1 - TabOrder = 0 - LookAndFeel.Kind = lfUltraFlat - LookAndFeel.NativeStyle = True - UseSystemPaint = False - end - object btnCancel: TcxButton - Left = 8 - Top = 40 - Width = 75 - Height = 25 - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - LookAndFeel.Kind = lfUltraFlat - LookAndFeel.NativeStyle = True - UseSystemPaint = False - end - end -end diff --git a/internal/x.46/Lib/D11/cxCheckListBox.dcu b/internal/x.46/Lib/D11/cxCheckListBox.dcu deleted file mode 100644 index 0a82e294..00000000 Binary files a/internal/x.46/Lib/D11/cxCheckListBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxClasses.dcu b/internal/x.46/Lib/D11/cxClasses.dcu deleted file mode 100644 index b481f127..00000000 Binary files a/internal/x.46/Lib/D11/cxClasses.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxClassesReg.dcu b/internal/x.46/Lib/D11/cxClassesReg.dcu deleted file mode 100644 index 6815f0f4..00000000 Binary files a/internal/x.46/Lib/D11/cxClassesReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxColorComboBox.dcu b/internal/x.46/Lib/D11/cxColorComboBox.dcu deleted file mode 100644 index 0abc8c34..00000000 Binary files a/internal/x.46/Lib/D11/cxColorComboBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxComponentCollectionEditor.dcu b/internal/x.46/Lib/D11/cxComponentCollectionEditor.dcu deleted file mode 100644 index 965babc0..00000000 Binary files a/internal/x.46/Lib/D11/cxComponentCollectionEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxComponentCollectionEditor.dfm b/internal/x.46/Lib/D11/cxComponentCollectionEditor.dfm deleted file mode 100644 index 16fcf157..00000000 --- a/internal/x.46/Lib/D11/cxComponentCollectionEditor.dfm +++ /dev/null @@ -1,466 +0,0 @@ -object frmComponentCollectionEditor: TfrmComponentCollectionEditor - Left = 534 - Top = 162 - HelpContext = 26150 - HorzScrollBar.Increment = 10 - VertScrollBar.Increment = 11 - BorderIcons = [biSystemMenu] - BorderStyle = bsSizeToolWin - Caption = 'CollectionEditor' - ClientHeight = 152 - ClientWidth = 183 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = True - Position = poDesigned - ShowHint = True - OnClose = FormClose - OnDestroy = FormDestroy - OnKeyDown = FormKeyDown - OnKeyPress = FormKeyPress - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object ToolBar1: TToolBar - Left = 0 - Top = 0 - Width = 183 - Height = 28 - AutoSize = True - ButtonHeight = 24 - ButtonWidth = 24 - EdgeBorders = [ebTop, ebBottom] - Images = ImageList - PopupMenu = PopupMenu2 - TabOrder = 1 - Wrapable = False - object ToolButton1: TToolButton - Left = 0 - Top = 0 - Action = acAdd - end - object ToolButton2: TToolButton - Left = 24 - Top = 0 - Action = acDelete - end - object ToolButton3: TToolButton - Left = 48 - Top = 0 - Width = 8 - Caption = 'ToolButton3' - ImageIndex = 2 - Style = tbsSeparator - end - object ToolButton4: TToolButton - Left = 56 - Top = 0 - Action = acMoveUp - end - object ToolButton5: TToolButton - Left = 80 - Top = 0 - Action = acMoveDown - end - end - object Panel: TPanel - Left = 0 - Top = 28 - Width = 183 - Height = 124 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object ListView1: TListView - Left = 0 - Top = 0 - Width = 183 - Height = 124 - Align = alClient - Columns = < - item - AutoSize = True - end> - ColumnClick = False - DragMode = dmAutomatic - HideSelection = False - MultiSelect = True - ReadOnly = True - RowSelect = True - PopupMenu = PopupMenu1 - ShowColumnHeaders = False - TabOrder = 0 - ViewStyle = vsReport - OnChange = ListView1Change - OnDragDrop = ListView1DragDrop - OnDragOver = ListView1DragOver - OnKeyDown = ListView1KeyDown - OnKeyPress = ListView1KeyPress - end - end - object ImageList: TImageList - Left = 40 - Top = 40 - Bitmap = { - 494C010104000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400848484000000000000000000848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 0000FFFFFF0000FFFF0000000000848484000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 0000FFFFFF0000FFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6 - C60000000000FFFFFF000000000084848400848484000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6 - C60000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF - FF00C6C6C6000000000000000000848484000000840000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF - FF00C6C6C6000000000000000000848484000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 000000000000000000000000000084848400000084000000840000FFFF00FFFF - FF0000FFFF00FFFFFF00848484000000840000FFFF00FFFFFF00000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000000000FFFFFF008484 - 840000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00000000008484840084848400000084008484840000FF - FF00FFFFFF00848484000000840084848400FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000848484000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 0000000000000000000000000000000000008484840000FFFF0000FFFF008484 - 8400FFFFFF0000FFFF008484840000FFFF00FFFFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000848484000000000000008400000084008484 - 840000FFFF000000840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 0000000000000000000000000000000000000000000084848400FFFFFF008484 - 840000FFFF008484840000FFFF00FFFFFF0000FFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000848484000000000084848400000084000000 - 84000000840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000848484000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 000000000000000000000000000000000000848484008484840084848400FFFF - FF0084848400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000848484000000000084848400000084000000 - 840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF008484840000FF - FF00FFFFFF008484840084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000008484840000008400000084000000 - 8400000084008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 000000000000000000000000000000000000000000008484840000FFFF008484 - 840000FFFF008484840000FFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000840000008400848484000000 - 0000000084000000840084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000008484840000FFFF00000000008484 - 8400FFFFFF00000000008484840000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000840000008400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000FFFF0000000000000000008484 - 840000FFFF000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000008400000084008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFC000C000FFFFFFFF - 80008000FFFFFFFF80008000FFFFFFFF80000000F83FFEFF80000000F83FFC7F - 80000000F83FF83F00000000F83FF01F00008000C007E00F80008000E00FC007 - 00008000F01FF83F00010001F83FF83F81FF11FFFC7FF83F24FFF8FFFEFFF83F - 66FFFC7FFFFFFFFFE7FFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object ActionList: TActionList - Images = ImageList - Left = 8 - Top = 40 - object acAdd: TAction - Caption = '&Add' - Hint = 'Add New' - ImageIndex = 0 - ShortCut = 45 - OnExecute = acAddExecute - end - object acDelete: TAction - Caption = '&Delete' - Enabled = False - Hint = 'Delete Selected' - ImageIndex = 1 - ShortCut = 46 - OnExecute = acDeleteExecute - OnUpdate = SelectionUpdate - end - object acMoveUp: TAction - Caption = 'Move &Up' - Enabled = False - Hint = 'Move Selected Up' - ImageIndex = 2 - ShortCut = 16422 - OnExecute = acMoveUpExecute - OnUpdate = SelectionUpdate - end - object acMoveDown: TAction - Caption = 'Move Dow&n' - Enabled = False - Hint = 'Move Selected Down' - ImageIndex = 3 - ShortCut = 16424 - OnExecute = acMoveDownExecute - OnUpdate = SelectionUpdate - end - object acSelectAll: TAction - Caption = '&Select All' - Enabled = False - ShortCut = 16449 - OnExecute = acSelectAllExecute - OnUpdate = SelectAllCommandUpdate - end - object acToolbar: TAction - Caption = '&Toolbar' - Checked = True - OnExecute = acToolbarExecute - OnUpdate = acToolbarUpdate - end - object acTextLabels: TAction - Caption = 'Text &Labels' - OnExecute = acTextLabelsExecute - end - end - object PopupMenu1: TPopupMenu - Images = ImageList - Left = 72 - Top = 40 - object miAdd: TMenuItem - Action = acAdd - end - object miDelete: TMenuItem - Action = acDelete - end - object miMoveUp: TMenuItem - Action = acMoveUp - end - object miMoveDown: TMenuItem - Action = acMoveDown - end - object SelectAll1: TMenuItem - Action = acSelectAll - end - object N1: TMenuItem - Caption = '-' - end - object miToolbar: TMenuItem - Action = acToolbar - end - end - object PopupMenu2: TPopupMenu - Left = 104 - Top = 40 - object miTextLabels: TMenuItem - Action = acTextLabels - end - end -end diff --git a/internal/x.46/Lib/D11/cxContainer.dcu b/internal/x.46/Lib/D11/cxContainer.dcu deleted file mode 100644 index 8f1e6243..00000000 Binary files a/internal/x.46/Lib/D11/cxContainer.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxControls.dcu b/internal/x.46/Lib/D11/cxControls.dcu deleted file mode 100644 index d9691bf9..00000000 Binary files a/internal/x.46/Lib/D11/cxControls.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxControls.res b/internal/x.46/Lib/D11/cxControls.res deleted file mode 100644 index 96959d18..00000000 Binary files a/internal/x.46/Lib/D11/cxControls.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxConverterFactory.dcu b/internal/x.46/Lib/D11/cxConverterFactory.dcu deleted file mode 100644 index 3c4a0c2b..00000000 Binary files a/internal/x.46/Lib/D11/cxConverterFactory.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxConverterUtils.dcu b/internal/x.46/Lib/D11/cxConverterUtils.dcu deleted file mode 100644 index 43e47599..00000000 Binary files a/internal/x.46/Lib/D11/cxConverterUtils.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCurrencyEdit.dcu b/internal/x.46/Lib/D11/cxCurrencyEdit.dcu deleted file mode 100644 index d4cb788f..00000000 Binary files a/internal/x.46/Lib/D11/cxCurrencyEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCustomConverter.dcu b/internal/x.46/Lib/D11/cxCustomConverter.dcu deleted file mode 100644 index e5239918..00000000 Binary files a/internal/x.46/Lib/D11/cxCustomConverter.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCustomData.dcu b/internal/x.46/Lib/D11/cxCustomData.dcu deleted file mode 100644 index f0335d80..00000000 Binary files a/internal/x.46/Lib/D11/cxCustomData.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCustomTableViewEditor.dcu b/internal/x.46/Lib/D11/cxCustomTableViewEditor.dcu deleted file mode 100644 index 77f38f27..00000000 Binary files a/internal/x.46/Lib/D11/cxCustomTableViewEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxCustomTableViewEditor.dfm b/internal/x.46/Lib/D11/cxCustomTableViewEditor.dfm deleted file mode 100644 index fc545584..00000000 --- a/internal/x.46/Lib/D11/cxCustomTableViewEditor.dfm +++ /dev/null @@ -1,766 +0,0 @@ -inherited cxCustomTableViewEditor: TcxCustomTableViewEditor - Left = 556 - Top = 316 - ActiveControl = PageControl1 - Caption = 'cxCustomTableViewEditor' - ClientHeight = 319 - ClientWidth = 344 - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - inherited PViewEditor: TPanel - Width = 344 - Height = 319 - Constraints.MinHeight = 282 - Constraints.MinWidth = 344 - object PageControl1: TcxPageControl - Left = 0 - Top = 0 - Width = 344 - Height = 319 - ActivePage = TSItems - Align = alClient - TabOrder = 0 - ClientRectBottom = 319 - ClientRectRight = 344 - ClientRectTop = 24 - object TSItems: TcxTabSheet - BorderWidth = 8 - object Panel1: TPanel - Left = 200 - Top = 0 - Width = 128 - Height = 279 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object BColumnAdd: TcxButton - Left = 8 - Top = 0 - Width = 120 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BColumnAddClick - end - object BColumnDelete: TcxButton - Left = 8 - Top = 32 - Width = 120 - Height = 24 - Caption = 'Delete' - TabOrder = 1 - OnClick = BColumnDeleteClick - end - object BColumnAddAll: TcxButton - Left = 8 - Top = 176 - Width = 120 - Height = 24 - Caption = 'Retrieve &Fields' - TabOrder = 5 - Visible = False - OnClick = BColumnAddAllClick - end - object BColumnRestore: TcxButton - Left = 8 - Top = 64 - Width = 120 - Height = 24 - Caption = '&Restore Defaults' - TabOrder = 2 - OnClick = BColumnRestoreClick - end - object BColumnMoveUp: TcxButton - Left = 8 - Top = 104 - Width = 120 - Height = 24 - Caption = 'Move &Up' - TabOrder = 3 - OnClick = BColumnMoveUpClick - end - object BColumnMoveDown: TcxButton - Left = 8 - Top = 136 - Width = 120 - Height = 24 - Caption = 'Move &Down' - TabOrder = 4 - OnClick = BColumnMoveDownClick - end - object BColumnAddMissing: TcxButton - Left = 8 - Top = 208 - Width = 120 - Height = 24 - Caption = 'Retrieve &Missing Fields' - TabOrder = 6 - Visible = False - OnClick = BColumnAddMissingClick - end - end - object Panel8: TPanel - Left = 0 - Top = 0 - Width = 200 - Height = 279 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBColumns: TListBox - Left = 1 - Top = 1 - Width = 198 - Height = 277 - Style = lbOwnerDrawFixed - Align = alClient - BorderStyle = bsNone - DragMode = dmAutomatic - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMColumns - TabOrder = 0 - OnClick = LBColumnsClick - OnDragDrop = LBColumnsDragDrop - OnDragOver = LBColumnsDragOver - OnDrawItem = LBColumnsDrawItem - OnEndDrag = LBColumnsEndDrag - OnKeyPress = FormKeyPress - OnStartDrag = LBColumnsStartDrag - end - end - end - object TSSummary: TcxTabSheet - BorderWidth = 8 - Caption = ' Summary ' - ImageIndex = 1 - object PageControl2: TcxPageControl - Left = 0 - Top = 0 - Width = 328 - Height = 279 - ActivePage = TSFooterSummaryItems - Align = alClient - TabOrder = 0 - ClientRectBottom = 279 - ClientRectRight = 328 - ClientRectTop = 24 - object TSFooterSummaryItems: TcxTabSheet - Caption = ' Footer ' - object Panel2: TPanel - Left = 0 - Top = 0 - Width = 185 - Height = 255 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object Panel3: TPanel - Left = 0 - Top = 220 - Width = 185 - Height = 35 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BAddFooterSummaryItem: TcxButton - Left = 13 - Top = 8 - Width = 75 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BAddFooterSummaryItemClick - end - object BDeleteFooterSummaryItem: TcxButton - Left = 97 - Top = 8 - Width = 75 - Height = 24 - Caption = '&Delete' - TabOrder = 1 - OnClick = BDeleteFooterSummaryItemClick - end - end - object Panel4: TPanel - Left = 0 - Top = 0 - Width = 185 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object Label1: TLabel - Left = 4 - Top = 4 - Width = 28 - Height = 13 - Caption = 'Items:' - end - end - object Panel9: TPanel - Left = 0 - Top = 20 - Width = 185 - Height = 200 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBFooterSummary: TListBox - Left = 1 - Top = 1 - Width = 183 - Height = 198 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMFooterSummary - TabOrder = 0 - OnClick = LBFooterSummaryClick - OnKeyPress = FormKeyPress - end - end - end - end - object TSDefaultGroupSummaryItems: TcxTabSheet - Caption = ' Default For Groups ' - ImageIndex = 1 - object Panel5: TPanel - Left = 0 - Top = 0 - Width = 185 - Height = 255 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object Panel6: TPanel - Left = 0 - Top = 220 - Width = 185 - Height = 35 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BDefaultGroupSummaryAdd: TcxButton - Left = 13 - Top = 8 - Width = 75 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BDefaultGroupSummaryAddClick - end - object BDefaultGroupSummaryDelete: TcxButton - Left = 97 - Top = 8 - Width = 75 - Height = 24 - Caption = '&Delete' - TabOrder = 1 - OnClick = BDefaultGroupSummaryDeleteClick - end - end - object Panel7: TPanel - Left = 0 - Top = 0 - Width = 185 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object Label2: TLabel - Left = 4 - Top = 4 - Width = 28 - Height = 13 - Caption = 'Items:' - end - end - object Panel10: TPanel - Left = 0 - Top = 20 - Width = 185 - Height = 200 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBDefaultGroupsSummary: TListBox - Left = 1 - Top = 1 - Width = 183 - Height = 198 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMDefaultGroupsSummary - TabOrder = 0 - OnClick = LBDefaultGroupsSummaryClick - OnKeyPress = FormKeyPress - end - end - end - end - object TabSheet3: TcxTabSheet - Caption = ' Groups ' - ImageIndex = 2 - object Splitter2: TSplitter - Left = 0 - Top = 137 - Width = 328 - Height = 5 - Cursor = crVSplit - Align = alBottom - Beveled = True - end - object PSummaryGroups: TPanel - Left = 0 - Top = 0 - Width = 328 - Height = 137 - Align = alClient - BevelOuter = bvNone - Constraints.MinHeight = 100 - TabOrder = 0 - OnResize = PSummaryGroupsResize - object PGroupItems: TPanel - Left = 166 - Top = 0 - Width = 162 - Height = 137 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object Panel11: TPanel - Left = 0 - Top = 103 - Width = 162 - Height = 34 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BGroupSummaryItemAdd: TcxButton - Left = 4 - Top = 6 - Width = 75 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BGroupSummaryItemAddClick - end - object BGroupSummaryItemDelete: TcxButton - Left = 83 - Top = 6 - Width = 75 - Height = 24 - Caption = '&Delete' - TabOrder = 1 - OnClick = BGroupSummaryItemDeleteClick - end - end - object Panel12: TPanel - Left = 0 - Top = 0 - Width = 162 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object Label4: TLabel - Left = 4 - Top = 4 - Width = 28 - Height = 13 - Caption = 'Items:' - end - end - object Panel16: TPanel - Left = 0 - Top = 20 - Width = 162 - Height = 83 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBGroupSummaryItems: TListBox - Left = 1 - Top = 1 - Width = 160 - Height = 81 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMGroupSummaryItems - TabOrder = 0 - OnClick = LBGroupSummaryItemsClick - OnKeyPress = FormKeyPress - end - end - end - object PGroups: TPanel - Left = 0 - Top = 0 - Width = 162 - Height = 137 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object Panel14: TPanel - Left = 0 - Top = 103 - Width = 162 - Height = 34 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BSummaryGroupAdd: TcxButton - Left = 4 - Top = 6 - Width = 75 - Height = 24 - Caption = '&Add' - TabOrder = 0 - OnClick = BSummaryGroupAddClick - end - object BSummaryGroupDelete: TcxButton - Left = 83 - Top = 6 - Width = 75 - Height = 24 - Caption = '&Delete' - TabOrder = 1 - OnClick = BSummaryGroupDeleteClick - end - end - object Panel15: TPanel - Left = 0 - Top = 0 - Width = 162 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object Label5: TLabel - Left = 4 - Top = 4 - Width = 37 - Height = 13 - Caption = 'Groups:' - end - end - object Panel13: TPanel - Left = 0 - Top = 20 - Width = 162 - Height = 83 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBSummaryGroups: TListBox - Left = 1 - Top = 1 - Width = 160 - Height = 81 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMSummaryGroups - TabOrder = 0 - OnClick = LBSummaryGroupsClick - OnKeyPress = FormKeyPress - end - end - end - object PGSeparator: TPanel - Left = 162 - Top = 0 - Width = 4 - Height = 137 - Align = alLeft - BevelOuter = bvNone - TabOrder = 2 - end - end - object PLinks: TPanel - Left = 0 - Top = 142 - Width = 328 - Height = 113 - Align = alBottom - BevelOuter = bvNone - Constraints.MinHeight = 100 - TabOrder = 1 - OnResize = PLinksResize - object PUnlinkedColumns: TPanel - Left = 0 - Top = 0 - Width = 147 - Height = 113 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object Panel19: TPanel - Left = 0 - Top = 0 - Width = 147 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object Label6: TLabel - Left = 4 - Top = 4 - Width = 88 - Height = 13 - Caption = 'Unlinked Columns:' - end - end - object Panel17: TPanel - Left = 0 - Top = 20 - Width = 147 - Height = 93 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 1 - object LBUnlinkedColumns: TListBox - Left = 1 - Top = 1 - Width = 145 - Height = 91 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - TabOrder = 0 - OnClick = LBUnlinkedColumnsClick - OnKeyPress = FormKeyPress - end - end - end - object PLinkUnlink: TPanel - Left = 147 - Top = 0 - Width = 35 - Height = 113 - Align = alLeft - BevelOuter = bvNone - TabOrder = 1 - object BColumnLink: TcxButton - Left = 5 - Top = 34 - Width = 25 - Height = 25 - Caption = '>' - TabOrder = 0 - OnClick = BColumnLinkClick - end - object BColumnUnlink: TcxButton - Left = 5 - Top = 68 - Width = 25 - Height = 25 - Caption = '<' - TabOrder = 1 - OnClick = BColumnUnlinkClick - end - end - object PLinkedColumns: TPanel - Left = 182 - Top = 0 - Width = 146 - Height = 113 - Align = alClient - BevelOuter = bvNone - TabOrder = 2 - object Panel23: TPanel - Left = 0 - Top = 0 - Width = 146 - Height = 20 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object Label7: TLabel - Left = 4 - Top = 4 - Width = 78 - Height = 13 - Caption = 'Linked Columns:' - end - end - object Panel18: TPanel - Left = 0 - Top = 20 - Width = 146 - Height = 93 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 1 - object LBLinkedColumns: TListBox - Left = 1 - Top = 1 - Width = 144 - Height = 91 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - TabOrder = 0 - OnClick = LBUnlinkedColumnsClick - OnKeyPress = FormKeyPress - end - end - end - end - end - end - end - end - end - object PMColumns: TPopupMenu - Left = 228 - Top = 6 - object MIColumnAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BColumnAddClick - end - object MIColumnDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BColumnDeleteClick - end - object MIColumnRestore: TMenuItem - Caption = 'Rest&ore Defaults' - OnClick = BColumnRestoreClick - end - object N2: TMenuItem - Caption = '-' - end - object MIColumnMoveUp: TMenuItem - Caption = 'Move Up' - ShortCut = 16422 - OnClick = BColumnMoveUpClick - end - object MIColumnMoveDown: TMenuItem - Caption = 'Move Down' - ShortCut = 16424 - OnClick = BColumnMoveDownClick - end - object N1: TMenuItem - Caption = '-' - end - object MIColumnSelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MIColumnSelectAllClick - end - end - object PMFooterSummary: TPopupMenu - Left = 230 - Top = 90 - object MIFooterSummaryAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BAddFooterSummaryItemClick - end - object MIFooterSummaryDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BDeleteFooterSummaryItemClick - end - object MenuItem4a: TMenuItem - Caption = '-' - end - object MIFooterSummarySelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MIFooterSummarySelectAllClick - end - end - object PMDefaultGroupsSummary: TPopupMenu - Left = 230 - Top = 130 - object MIDefaultGroupSummaryAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BDefaultGroupSummaryAddClick - end - object MIDefaultGroupSummaryDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BDefaultGroupSummaryDeleteClick - end - object MenuItem3b: TMenuItem - Caption = '-' - end - object MIDefaultGroupSummarySelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MIDefaultGroupSummarySelectAllClick - end - end - object PMSummaryGroups: TPopupMenu - Left = 230 - Top = 170 - object MISummaryGroupAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BSummaryGroupAddClick - end - object MISummaryGroupDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BSummaryGroupDeleteClick - end - object MenuItem5d: TMenuItem - Caption = '-' - end - object MISummaryGroupSelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MISummaryGroupSelectAllClick - end - end - object PMGroupSummaryItems: TPopupMenu - Left = 230 - Top = 210 - object MIGroupSummaryItemsAdd: TMenuItem - Caption = '&Add' - ShortCut = 45 - OnClick = BGroupSummaryItemAddClick - end - object MIGroupSummaryItemsDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BGroupSummaryItemDeleteClick - end - object MenuItem6c: TMenuItem - Caption = '-' - end - object MIGroupSummaryItemsSelectAll: TMenuItem - Caption = '&Select All' - ShortCut = 16449 - OnClick = MIGroupSummaryItemsSelectAllClick - end - end -end diff --git a/internal/x.46/Lib/D11/cxDB.dcu b/internal/x.46/Lib/D11/cxDB.dcu deleted file mode 100644 index 72117e45..00000000 Binary files a/internal/x.46/Lib/D11/cxDB.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBCheckComboBox.dcu b/internal/x.46/Lib/D11/cxDBCheckComboBox.dcu deleted file mode 100644 index 85a5e097..00000000 Binary files a/internal/x.46/Lib/D11/cxDBCheckComboBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBCheckGroup.dcu b/internal/x.46/Lib/D11/cxDBCheckGroup.dcu deleted file mode 100644 index c97c302a..00000000 Binary files a/internal/x.46/Lib/D11/cxDBCheckGroup.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBCheckListBox.dcu b/internal/x.46/Lib/D11/cxDBCheckListBox.dcu deleted file mode 100644 index c439af95..00000000 Binary files a/internal/x.46/Lib/D11/cxDBCheckListBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBColorComboBox.dcu b/internal/x.46/Lib/D11/cxDBColorComboBox.dcu deleted file mode 100644 index aa337647..00000000 Binary files a/internal/x.46/Lib/D11/cxDBColorComboBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBData.dcu b/internal/x.46/Lib/D11/cxDBData.dcu deleted file mode 100644 index 1be86f0c..00000000 Binary files a/internal/x.46/Lib/D11/cxDBData.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBEdit.dcu b/internal/x.46/Lib/D11/cxDBEdit.dcu deleted file mode 100644 index 2d762f18..00000000 Binary files a/internal/x.46/Lib/D11/cxDBEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBEditRepository.dcu b/internal/x.46/Lib/D11/cxDBEditRepository.dcu deleted file mode 100644 index 49fa2354..00000000 Binary files a/internal/x.46/Lib/D11/cxDBEditRepository.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBExtLookupComboBox.dcu b/internal/x.46/Lib/D11/cxDBExtLookupComboBox.dcu deleted file mode 100644 index 5d2b137e..00000000 Binary files a/internal/x.46/Lib/D11/cxDBExtLookupComboBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBFilter.dcu b/internal/x.46/Lib/D11/cxDBFilter.dcu deleted file mode 100644 index 7a43ff9e..00000000 Binary files a/internal/x.46/Lib/D11/cxDBFilter.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBFilterControl.dcu b/internal/x.46/Lib/D11/cxDBFilterControl.dcu deleted file mode 100644 index bcd3f49d..00000000 Binary files a/internal/x.46/Lib/D11/cxDBFilterControl.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBFontNameComboBox.dcu b/internal/x.46/Lib/D11/cxDBFontNameComboBox.dcu deleted file mode 100644 index cf309ea0..00000000 Binary files a/internal/x.46/Lib/D11/cxDBFontNameComboBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBGridConverter.dcu b/internal/x.46/Lib/D11/cxDBGridConverter.dcu deleted file mode 100644 index 351b1bfa..00000000 Binary files a/internal/x.46/Lib/D11/cxDBGridConverter.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBLabel.dcu b/internal/x.46/Lib/D11/cxDBLabel.dcu deleted file mode 100644 index 0d7bcb5a..00000000 Binary files a/internal/x.46/Lib/D11/cxDBLabel.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBLookupComboBox.dcu b/internal/x.46/Lib/D11/cxDBLookupComboBox.dcu deleted file mode 100644 index 6f38488f..00000000 Binary files a/internal/x.46/Lib/D11/cxDBLookupComboBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBLookupEdit.dcu b/internal/x.46/Lib/D11/cxDBLookupEdit.dcu deleted file mode 100644 index bf1ea423..00000000 Binary files a/internal/x.46/Lib/D11/cxDBLookupEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBNavigator.dcu b/internal/x.46/Lib/D11/cxDBNavigator.dcu deleted file mode 100644 index 900b37dd..00000000 Binary files a/internal/x.46/Lib/D11/cxDBNavigator.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBProgressBar.dcu b/internal/x.46/Lib/D11/cxDBProgressBar.dcu deleted file mode 100644 index 23579f25..00000000 Binary files a/internal/x.46/Lib/D11/cxDBProgressBar.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBRichEdit.dcu b/internal/x.46/Lib/D11/cxDBRichEdit.dcu deleted file mode 100644 index 866d2b51..00000000 Binary files a/internal/x.46/Lib/D11/cxDBRichEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBShellComboBox.dcu b/internal/x.46/Lib/D11/cxDBShellComboBox.dcu deleted file mode 100644 index aaf8e387..00000000 Binary files a/internal/x.46/Lib/D11/cxDBShellComboBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDBTrackBar.dcu b/internal/x.46/Lib/D11/cxDBTrackBar.dcu deleted file mode 100644 index 292314c9..00000000 Binary files a/internal/x.46/Lib/D11/cxDBTrackBar.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDWMApi.dcu b/internal/x.46/Lib/D11/cxDWMApi.dcu deleted file mode 100644 index 911de701..00000000 Binary files a/internal/x.46/Lib/D11/cxDWMApi.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDXGridConverter.dcu b/internal/x.46/Lib/D11/cxDXGridConverter.dcu deleted file mode 100644 index 99f3c1ad..00000000 Binary files a/internal/x.46/Lib/D11/cxDXGridConverter.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxData.dcu b/internal/x.46/Lib/D11/cxData.dcu deleted file mode 100644 index be225b8c..00000000 Binary files a/internal/x.46/Lib/D11/cxData.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDataConsts.dcu b/internal/x.46/Lib/D11/cxDataConsts.dcu deleted file mode 100644 index 1fafa32b..00000000 Binary files a/internal/x.46/Lib/D11/cxDataConsts.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDataD11.dcp b/internal/x.46/Lib/D11/cxDataD11.dcp deleted file mode 100644 index 94f5eda8..00000000 Binary files a/internal/x.46/Lib/D11/cxDataD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDataStorage.dcu b/internal/x.46/Lib/D11/cxDataStorage.dcu deleted file mode 100644 index b56f6021..00000000 Binary files a/internal/x.46/Lib/D11/cxDataStorage.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDataUtils.dcu b/internal/x.46/Lib/D11/cxDataUtils.dcu deleted file mode 100644 index 951f93d4..00000000 Binary files a/internal/x.46/Lib/D11/cxDataUtils.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDateUtils.dcu b/internal/x.46/Lib/D11/cxDateUtils.dcu deleted file mode 100644 index 9eb65139..00000000 Binary files a/internal/x.46/Lib/D11/cxDateUtils.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDesignWindow.dfm b/internal/x.46/Lib/D11/cxDesignWindow.dfm deleted file mode 100644 index e3cb823d..00000000 --- a/internal/x.46/Lib/D11/cxDesignWindow.dfm +++ /dev/null @@ -1,10 +0,0 @@ -object cxDesignWindow: TcxDesignWindow - Left = 612 - Top = 120 - Width = 320 - Height = 240 - Color = clBtnFace - OldCreateOrder = True - PixelsPerInch = 96 - TextHeight = 13 -end diff --git a/internal/x.46/Lib/D11/cxDesignWindows.dcu b/internal/x.46/Lib/D11/cxDesignWindows.dcu deleted file mode 100644 index fd3511d0..00000000 Binary files a/internal/x.46/Lib/D11/cxDesignWindows.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDesignWindows.dfm b/internal/x.46/Lib/D11/cxDesignWindows.dfm deleted file mode 100644 index 0028f632..00000000 --- a/internal/x.46/Lib/D11/cxDesignWindows.dfm +++ /dev/null @@ -1,13 +0,0 @@ -object cxDesignFormEditor: TcxDesignFormEditor - Left = 612 - Top = 120 - Width = 320 - Height = 240 - Color = clBtnFace - OldCreateOrder = True - OnClose = FormClose - OnCreate = FormCreate - OnDestroy = FormDestroy - PixelsPerInch = 96 - TextHeight = 13 -end diff --git a/internal/x.46/Lib/D11/cxDrawTextUtils.dcu b/internal/x.46/Lib/D11/cxDrawTextUtils.dcu deleted file mode 100644 index 6dfb9c44..00000000 Binary files a/internal/x.46/Lib/D11/cxDrawTextUtils.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxDropDownEdit.dcu b/internal/x.46/Lib/D11/cxDropDownEdit.dcu deleted file mode 100644 index c30f63c1..00000000 Binary files a/internal/x.46/Lib/D11/cxDropDownEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEdit.dcu b/internal/x.46/Lib/D11/cxEdit.dcu deleted file mode 100644 index d50306f2..00000000 Binary files a/internal/x.46/Lib/D11/cxEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEdit.res b/internal/x.46/Lib/D11/cxEdit.res deleted file mode 100644 index 81cce5f1..00000000 Binary files a/internal/x.46/Lib/D11/cxEdit.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditConsts.dcu b/internal/x.46/Lib/D11/cxEditConsts.dcu deleted file mode 100644 index 9062ea33..00000000 Binary files a/internal/x.46/Lib/D11/cxEditConsts.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditDBRegisteredRepositoryItems.dcu b/internal/x.46/Lib/D11/cxEditDBRegisteredRepositoryItems.dcu deleted file mode 100644 index 2d5188a8..00000000 Binary files a/internal/x.46/Lib/D11/cxEditDBRegisteredRepositoryItems.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditDataRegisteredRepositoryItems.dcu b/internal/x.46/Lib/D11/cxEditDataRegisteredRepositoryItems.dcu deleted file mode 100644 index 1ba01273..00000000 Binary files a/internal/x.46/Lib/D11/cxEditDataRegisteredRepositoryItems.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditMaskEditor.dcu b/internal/x.46/Lib/D11/cxEditMaskEditor.dcu deleted file mode 100644 index cb778bae..00000000 Binary files a/internal/x.46/Lib/D11/cxEditMaskEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditMaskEditor.dfm b/internal/x.46/Lib/D11/cxEditMaskEditor.dfm deleted file mode 100644 index 18d1fc99..00000000 --- a/internal/x.46/Lib/D11/cxEditMaskEditor.dfm +++ /dev/null @@ -1,266 +0,0 @@ -object cxEditMaskEditorDlg: TcxEditMaskEditorDlg - Left = 353 - Top = 212 - BorderStyle = bsDialog - Caption = 'Input Mask Editor' - ClientHeight = 322 - ClientWidth = 543 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Label1: TLabel - Left = 8 - Top = 8 - Width = 49 - Height = 13 - Caption = 'Mask kind' - Transparent = True - end - object Bevel1: TBevel - Left = 7 - Top = 37 - Width = 266 - Height = 2 - end - object cxMaskKindPickEdit1: TcxComboBox - Tag = 4 - Left = 64 - Top = 4 - Properties.DropDownListStyle = lsFixedList - Properties.Items.Strings = ( - 'Standard' - 'Regular expression' - 'Extended regular expression') - Properties.OnChange = cxMaskKindPickEdit1PropertiesChange - TabOrder = 0 - Width = 193 - end - object ButtonsPanel: TPanel - Left = 0 - Top = 281 - Width = 543 - Height = 41 - Align = alBottom - BevelOuter = bvNone - TabOrder = 3 - object CancelButton: TcxButton - Left = 440 - Top = 5 - Width = 93 - Height = 25 - Caption = 'Cancel' - TabOrder = 2 - OnClick = CancelButtonClick - end - object OKButton: TcxButton - Left = 336 - Top = 5 - Width = 93 - Height = 25 - Caption = 'OK' - TabOrder = 1 - OnClick = OKButtonClick - end - object MasksButton: TcxButton - Left = 8 - Top = 5 - Width = 93 - Height = 25 - Caption = 'Masks...' - TabOrder = 0 - OnClick = MasksButtonClick - end - end - object RegExprMaskPanel: TPanel - Left = 0 - Top = 42 - Width = 543 - Height = 239 - Align = alBottom - BevelOuter = bvNone - TabOrder = 2 - Visible = False - object Label2: TLabel - Left = 4 - Top = 12 - Width = 55 - Height = 13 - Caption = 'Input mask:' - Transparent = True - end - object Label3: TLabel - Left = 4 - Top = 48 - Width = 50 - Height = 13 - Caption = 'Test input:' - Transparent = True - end - object Label4: TLabel - Left = 12 - Top = 96 - Width = 38 - Height = 13 - Caption = 'Sample:' - Transparent = True - end - object Label5: TLabel - Left = 192 - Top = 96 - Width = 56 - Height = 13 - Caption = 'Description:' - Transparent = True - end - object Bevel2: TBevel - Left = 8 - Top = 80 - Width = 529 - Height = 2 - end - object cxEditMaskEdit: TcxTextEdit - Tag = 7 - Left = 64 - Top = 8 - TabOrder = 0 - OnKeyDown = cxEditMaskEditKeyDown - Width = 473 - end - object cxMaskEdit1: TcxMaskEdit - Tag = 4 - Left = 64 - Top = 44 - Properties.IgnoreMaskBlank = True - Properties.MaskKind = emkRegExprEx - Properties.MaxLength = 0 - TabOrder = 1 - OnEnter = cxMaskEdit1Enter - Width = 473 - end - object Memo1: TcxMemo - Left = 192 - Top = 112 - TabOrder = 2 - Height = 121 - Width = 345 - end - object ListBox1: TcxListBox - Left = 8 - Top = 112 - Width = 177 - Height = 121 - ItemHeight = 13 - TabOrder = 3 - OnClick = ListBox1Click - OnExit = ListBox1Exit - end - end - object StandardMaskPanel: TPanel - Left = 0 - Top = 42 - Width = 543 - Height = 239 - BevelOuter = bvNone - TabOrder = 1 - object Bevel3: TBevel - Left = 4 - Top = 188 - Width = 261 - Height = 2 - end - object Label6: TLabel - Left = 8 - Top = 4 - Width = 55 - Height = 13 - Caption = 'Input mask:' - Transparent = True - end - object Label7: TLabel - Left = 8 - Top = 196 - Width = 51 - Height = 13 - Caption = 'Test Input:' - Transparent = True - end - object Label8: TLabel - Left = 272 - Top = 4 - Width = 66 - Height = 13 - Caption = 'Sample mask:' - Transparent = True - end - object Label9: TLabel - Left = 140 - Top = 64 - Width = 98 - Height = 13 - Caption = 'Character for blanks:' - Transparent = True - end - object cxTextEdit1: TcxTextEdit - Tag = 21 - Left = 8 - Top = 20 - TabOrder = 0 - OnExit = cxTextEdit1Exit - OnKeyDown = cxTextEdit1KeyDown - Width = 253 - end - object cxMaskEdit2: TcxMaskEdit - Tag = 22 - Left = 8 - Top = 212 - Properties.IgnoreMaskBlank = True - TabOrder = 3 - Width = 253 - end - object cxTextEdit2: TcxTextEdit - Tag = 23 - Left = 244 - Top = 60 - Properties.MaxLength = 1 - Properties.OnChange = cxTextEdit2PropertiesChange - TabOrder = 1 - OnExit = cxTextEdit2Exit - Width = 17 - end - object cxCheckBox1: TcxCheckBox - Left = 4 - Top = 160 - Caption = 'Save literal characters' - Properties.OnChange = cxCheckBox1PropertiesChange - TabOrder = 2 - Transparent = True - Width = 153 - end - object ListView1: TListView - Left = 272 - Top = 20 - Width = 261 - Height = 213 - Columns = < - item - AutoSize = True - Caption = 'Description' - end - item - AutoSize = True - Caption = 'Sample' - end> - ReadOnly = True - RowSelect = True - TabOrder = 4 - ViewStyle = vsReport - OnSelectItem = ListView1SelectItem - end - end -end diff --git a/internal/x.46/Lib/D11/cxEditPaintUtils.dcu b/internal/x.46/Lib/D11/cxEditPaintUtils.dcu deleted file mode 100644 index 33a439d0..00000000 Binary files a/internal/x.46/Lib/D11/cxEditPaintUtils.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditPropEditors.dcu b/internal/x.46/Lib/D11/cxEditPropEditors.dcu deleted file mode 100644 index d051bbe4..00000000 Binary files a/internal/x.46/Lib/D11/cxEditPropEditors.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditReg.dcu b/internal/x.46/Lib/D11/cxEditReg.dcu deleted file mode 100644 index 7d3e6421..00000000 Binary files a/internal/x.46/Lib/D11/cxEditReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditRegisteredRepositoryItems.dcu b/internal/x.46/Lib/D11/cxEditRegisteredRepositoryItems.dcu deleted file mode 100644 index 45c93962..00000000 Binary files a/internal/x.46/Lib/D11/cxEditRegisteredRepositoryItems.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditRepositoryEditor.dcu b/internal/x.46/Lib/D11/cxEditRepositoryEditor.dcu deleted file mode 100644 index a08fde9f..00000000 Binary files a/internal/x.46/Lib/D11/cxEditRepositoryEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditRepositoryEditor.dfm b/internal/x.46/Lib/D11/cxEditRepositoryEditor.dfm deleted file mode 100644 index bcca2512..00000000 --- a/internal/x.46/Lib/D11/cxEditRepositoryEditor.dfm +++ /dev/null @@ -1,87 +0,0 @@ -inherited cxEditRepositoryEditor: TcxEditRepositoryEditor - Left = 363 - Top = 194 - Width = 353 - Height = 416 - Caption = 'EditRepository editor' - Constraints.MinHeight = 200 - Constraints.MinWidth = 350 - PopupMenu = PopupMenu1 - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object LBItems: TListBox - Left = 0 - Top = 0 - Width = 258 - Height = 382 - Align = alClient - ItemHeight = 13 - MultiSelect = True - Sorted = True - TabOrder = 0 - OnClick = LBItemsClick - end - object Panel1: TPanel - Left = 258 - Top = 0 - Width = 87 - Height = 382 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btAdd: TButton - Left = 6 - Top = 8 - Width = 75 - Height = 25 - Caption = '&Add...' - TabOrder = 0 - OnClick = btAddClick - end - object btDelete: TButton - Left = 6 - Top = 40 - Width = 75 - Height = 25 - Caption = '&Delete' - TabOrder = 1 - OnClick = btDeleteClick - end - object btClose: TButton - Left = 6 - Top = 356 - Width = 75 - Height = 25 - Anchors = [akLeft, akBottom] - Caption = '&Close' - TabOrder = 2 - OnClick = btCloseClick - end - end - object PopupMenu1: TPopupMenu - Left = 32 - Top = 16 - object miAdd: TMenuItem - Caption = 'Add' - ShortCut = 45 - OnClick = miAddClick - end - object miDelete: TMenuItem - Caption = 'Delete' - Enabled = False - ShortCut = 46 - OnClick = miDeleteClick - end - object N1: TMenuItem - Caption = '-' - end - object miSelectAll: TMenuItem - Caption = 'Select all' - Enabled = False - ShortCut = 16449 - OnClick = miSelectAllClick - end - end -end diff --git a/internal/x.46/Lib/D11/cxEditRepositoryItems.dcu b/internal/x.46/Lib/D11/cxEditRepositoryItems.dcu deleted file mode 100644 index 1cfe3b1d..00000000 Binary files a/internal/x.46/Lib/D11/cxEditRepositoryItems.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditUtils.dcu b/internal/x.46/Lib/D11/cxEditUtils.dcu deleted file mode 100644 index a55a6a68..00000000 Binary files a/internal/x.46/Lib/D11/cxEditUtils.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxEditorsD11.dcp b/internal/x.46/Lib/D11/cxEditorsD11.dcp deleted file mode 100644 index 1d92f4f5..00000000 Binary files a/internal/x.46/Lib/D11/cxEditorsD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxExport.dcu b/internal/x.46/Lib/D11/cxExport.dcu deleted file mode 100644 index 3c0ce7fa..00000000 Binary files a/internal/x.46/Lib/D11/cxExport.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxExportD11.dcp b/internal/x.46/Lib/D11/cxExportD11.dcp deleted file mode 100644 index 8b824071..00000000 Binary files a/internal/x.46/Lib/D11/cxExportD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxExportStrs.dcu b/internal/x.46/Lib/D11/cxExportStrs.dcu deleted file mode 100644 index 61f4d053..00000000 Binary files a/internal/x.46/Lib/D11/cxExportStrs.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxExtEditConsts.dcu b/internal/x.46/Lib/D11/cxExtEditConsts.dcu deleted file mode 100644 index 7d68988b..00000000 Binary files a/internal/x.46/Lib/D11/cxExtEditConsts.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxExtEditReg.dcu b/internal/x.46/Lib/D11/cxExtEditReg.dcu deleted file mode 100644 index 065acb6d..00000000 Binary files a/internal/x.46/Lib/D11/cxExtEditReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxExtEditRepositoryItems.dcu b/internal/x.46/Lib/D11/cxExtEditRepositoryItems.dcu deleted file mode 100644 index cd04997c..00000000 Binary files a/internal/x.46/Lib/D11/cxExtEditRepositoryItems.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxExtEditUtils.dcu b/internal/x.46/Lib/D11/cxExtEditUtils.dcu deleted file mode 100644 index 78d82ee6..00000000 Binary files a/internal/x.46/Lib/D11/cxExtEditUtils.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxExtEditorsD11.dcp b/internal/x.46/Lib/D11/cxExtEditorsD11.dcp deleted file mode 100644 index 9cef7991..00000000 Binary files a/internal/x.46/Lib/D11/cxExtEditorsD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxFilter.dcu b/internal/x.46/Lib/D11/cxFilter.dcu deleted file mode 100644 index 45194d7c..00000000 Binary files a/internal/x.46/Lib/D11/cxFilter.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxFilterConsts.dcu b/internal/x.46/Lib/D11/cxFilterConsts.dcu deleted file mode 100644 index deeba452..00000000 Binary files a/internal/x.46/Lib/D11/cxFilterConsts.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxFilterControl.dcu b/internal/x.46/Lib/D11/cxFilterControl.dcu deleted file mode 100644 index bd902200..00000000 Binary files a/internal/x.46/Lib/D11/cxFilterControl.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxFilterControlDialog.dcu b/internal/x.46/Lib/D11/cxFilterControlDialog.dcu deleted file mode 100644 index 48e4be66..00000000 Binary files a/internal/x.46/Lib/D11/cxFilterControlDialog.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxFilterControlDialog.dfm b/internal/x.46/Lib/D11/cxFilterControlDialog.dfm deleted file mode 100644 index b41e13c4..00000000 --- a/internal/x.46/Lib/D11/cxFilterControlDialog.dfm +++ /dev/null @@ -1,107 +0,0 @@ -object fmFilterControlDialog: TfmFilterControlDialog - Left = 360 - Top = 200 - BorderIcons = [biSystemMenu] - Caption = 'fmFilterControlDialog' - AutoScroll = False - ClientHeight = 316 - ClientWidth = 552 - Color = clBtnFace - Constraints.MinHeight = 165 - Constraints.MinWidth = 560 - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000008 - 8EEE8FFFF8FF000888888888888800088EEE8FFFF8FF00088888888888880008 - 8E6677FFF8FF0007700007777777000780F607888788000770F6077777770008 - 80F807888888000880F807888888000808886070000000706888660700000706 - 8F88866070000068F88888660700068FFF88886660000000000000000000C000 - 0000C0000000C0000000C0000000C0000000C0000000C0000000C0000000C000 - 0000C0000000C0000000C00F000080070000800300000003000000030000} - KeyPreview = True - Position = poDefaultPosOnly - OldCreateOrder = False - OnClose = FormClose - OnKeyDown = FormKeyDown - OnKeyPress = FormKeyPress - PixelsPerInch = 96 - TextHeight = 13 - object pnlBottom: TPanel - Left = 0 - Top = 278 - Width = 552 - Height = 38 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - object btOpen: TcxButton - Left = 6 - Top = 8 - Width = 100 - Height = 23 - Hint = 'Open|Opens an existing filter' - Caption = '&Open...' - TabOrder = 0 - OnClick = acOpenExecute - end - object btSave: TcxButton - Left = 112 - Top = 8 - Width = 100 - Height = 23 - Hint = 'Save As|Saves the active filter with a new name' - Caption = 'Save &As...' - TabOrder = 1 - OnClick = acSaveExecute - end - object pnlBottomRight: TPanel - Left = 234 - Top = 0 - Width = 318 - Height = 38 - Align = alRight - BevelOuter = bvNone - TabOrder = 2 - object btApply: TcxButton - Left = 212 - Top = 8 - Width = 100 - Height = 23 - Caption = 'Apply' - TabOrder = 2 - OnClick = acApplyExecute - end - object btCancel: TcxButton - Left = 106 - Top = 8 - Width = 100 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - object btOk: TcxButton - Left = 0 - Top = 8 - Width = 100 - Height = 23 - Caption = 'Ok' - ModalResult = 1 - TabOrder = 0 - OnClick = acOkExecute - end - end - end - object OpenDialog: TOpenDialog - Left = 240 - Top = 8 - end - object SaveDialog: TSaveDialog - Options = [ofOverwritePrompt, ofHideReadOnly, ofEnableSizing] - Left = 272 - Top = 8 - end -end diff --git a/internal/x.46/Lib/D11/cxFilterControlReg.dcu b/internal/x.46/Lib/D11/cxFilterControlReg.dcu deleted file mode 100644 index 8c0b92f1..00000000 Binary files a/internal/x.46/Lib/D11/cxFilterControlReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxFilterControlStrs.dcu b/internal/x.46/Lib/D11/cxFilterControlStrs.dcu deleted file mode 100644 index 3dc9c36b..00000000 Binary files a/internal/x.46/Lib/D11/cxFilterControlStrs.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxFilterControlUtils.dcu b/internal/x.46/Lib/D11/cxFilterControlUtils.dcu deleted file mode 100644 index 10400b39..00000000 Binary files a/internal/x.46/Lib/D11/cxFilterControlUtils.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxFilterDialog.dcu b/internal/x.46/Lib/D11/cxFilterDialog.dcu deleted file mode 100644 index f5671e07..00000000 Binary files a/internal/x.46/Lib/D11/cxFilterDialog.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxFilterDialog.dfm b/internal/x.46/Lib/D11/cxFilterDialog.dfm deleted file mode 100644 index b4e859b6..00000000 --- a/internal/x.46/Lib/D11/cxFilterDialog.dfm +++ /dev/null @@ -1,135 +0,0 @@ -object cxFilterDialog: TcxFilterDialog - Left = 421 - Top = 148 - HorzScrollBar.Visible = False - VertScrollBar.Visible = False - ActiveControl = cbOperator1 - BorderIcons = [biSystemMenu] - BorderStyle = bsDialog - Caption = 'Custom Filter' - ClientHeight = 206 - ClientWidth = 414 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - object lblTitle: TLabel - Left = 8 - Top = 8 - Width = 87 - Height = 13 - Caption = 'Show rows where:' - Transparent = True - end - object bvlLine: TBevel - Left = 8 - Top = 34 - Width = 396 - Height = 4 - Shape = bsTopLine - end - object lblColumnCaption: TLabel - Left = 8 - Top = 27 - Width = 71 - Height = 13 - Caption = 'ColumnCaption' - Transparent = True - end - object lblSingle: TLabel - Left = 8 - Top = 134 - Width = 185 - Height = 13 - Caption = 'Use ? to represent any single character' - Transparent = True - end - object lblSeries: TLabel - Left = 8 - Top = 153 - Width = 200 - Height = 13 - Caption = 'Use * to represent any series of characters' - Transparent = True - end - object lblEdit1PlaceHolder: TLabel - Left = 208 - Top = 46 - Width = 193 - Height = 21 - AutoSize = False - Color = clGreen - ParentColor = False - Visible = False - end - object lblEdit2PlaceHolder: TLabel - Left = 208 - Top = 96 - Width = 193 - Height = 21 - AutoSize = False - Color = clGreen - ParentColor = False - Visible = False - end - object cbOperator1: TcxComboBox - Left = 8 - Top = 46 - Properties.DropDownListStyle = lsFixedList - TabOrder = 0 - OnClick = cbOperator1Click - Width = 193 - end - object cbOperator2: TcxComboBox - Left = 8 - Top = 96 - Properties.DropDownListStyle = lsFixedList - Properties.OnChange = cbOperator2PropertiesChange - TabOrder = 3 - Width = 193 - end - object btnOK: TcxButton - Left = 248 - Top = 176 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 4 - end - object btnCancel: TcxButton - Left = 330 - Top = 176 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 5 - end - object rbAnd: TcxRadioButton - Tag = 1 - Left = 56 - Top = 74 - Width = 60 - Height = 17 - Caption = '&And' - Checked = True - TabOrder = 1 - TabStop = True - Transparent = True - end - object rbOr: TcxRadioButton - Tag = 1 - Left = 120 - Top = 74 - Width = 65 - Height = 17 - Caption = '&Or' - TabOrder = 2 - Transparent = True - end -end diff --git a/internal/x.46/Lib/D11/cxFontNameComboBox.dcu b/internal/x.46/Lib/D11/cxFontNameComboBox.dcu deleted file mode 100644 index ea01d847..00000000 Binary files a/internal/x.46/Lib/D11/cxFontNameComboBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxFontNameComboBox.res b/internal/x.46/Lib/D11/cxFontNameComboBox.res deleted file mode 100644 index 4dd46661..00000000 Binary files a/internal/x.46/Lib/D11/cxFontNameComboBox.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxFormats.dcu b/internal/x.46/Lib/D11/cxFormats.dcu deleted file mode 100644 index d6566972..00000000 Binary files a/internal/x.46/Lib/D11/cxFormats.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGeometry.dcu b/internal/x.46/Lib/D11/cxGeometry.dcu deleted file mode 100644 index 8ebe902e..00000000 Binary files a/internal/x.46/Lib/D11/cxGeometry.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGraphics.dcu b/internal/x.46/Lib/D11/cxGraphics.dcu deleted file mode 100644 index 87509ff6..00000000 Binary files a/internal/x.46/Lib/D11/cxGraphics.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGrid.dcu b/internal/x.46/Lib/D11/cxGrid.dcu deleted file mode 100644 index a99bed0f..00000000 Binary files a/internal/x.46/Lib/D11/cxGrid.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGrid.res b/internal/x.46/Lib/D11/cxGrid.res deleted file mode 100644 index 04b9d5d7..00000000 Binary files a/internal/x.46/Lib/D11/cxGrid.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridBandedTableView.dcu b/internal/x.46/Lib/D11/cxGridBandedTableView.dcu deleted file mode 100644 index 409badfd..00000000 Binary files a/internal/x.46/Lib/D11/cxGridBandedTableView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridCardView.dcu b/internal/x.46/Lib/D11/cxGridCardView.dcu deleted file mode 100644 index ca48100e..00000000 Binary files a/internal/x.46/Lib/D11/cxGridCardView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridChartView.dcu b/internal/x.46/Lib/D11/cxGridChartView.dcu deleted file mode 100644 index 1287331d..00000000 Binary files a/internal/x.46/Lib/D11/cxGridChartView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridChartView.res b/internal/x.46/Lib/D11/cxGridChartView.res deleted file mode 100644 index 6c0eb144..00000000 Binary files a/internal/x.46/Lib/D11/cxGridChartView.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridCommon.dcu b/internal/x.46/Lib/D11/cxGridCommon.dcu deleted file mode 100644 index 745869e3..00000000 Binary files a/internal/x.46/Lib/D11/cxGridCommon.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridConverter.dcu b/internal/x.46/Lib/D11/cxGridConverter.dcu deleted file mode 100644 index 63609e94..00000000 Binary files a/internal/x.46/Lib/D11/cxGridConverter.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridCustomPopupMenu.dcu b/internal/x.46/Lib/D11/cxGridCustomPopupMenu.dcu deleted file mode 100644 index d1bd5497..00000000 Binary files a/internal/x.46/Lib/D11/cxGridCustomPopupMenu.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridCustomTableView.dcu b/internal/x.46/Lib/D11/cxGridCustomTableView.dcu deleted file mode 100644 index 99457a95..00000000 Binary files a/internal/x.46/Lib/D11/cxGridCustomTableView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridCustomView.dcu b/internal/x.46/Lib/D11/cxGridCustomView.dcu deleted file mode 100644 index 23828a0a..00000000 Binary files a/internal/x.46/Lib/D11/cxGridCustomView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridD11.dcp b/internal/x.46/Lib/D11/cxGridD11.dcp deleted file mode 100644 index ab7f7634..00000000 Binary files a/internal/x.46/Lib/D11/cxGridD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridDBBandedTableView.dcu b/internal/x.46/Lib/D11/cxGridDBBandedTableView.dcu deleted file mode 100644 index ce4a1bc0..00000000 Binary files a/internal/x.46/Lib/D11/cxGridDBBandedTableView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridDBCardView.dcu b/internal/x.46/Lib/D11/cxGridDBCardView.dcu deleted file mode 100644 index dda1cc91..00000000 Binary files a/internal/x.46/Lib/D11/cxGridDBCardView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridDBChartView.dcu b/internal/x.46/Lib/D11/cxGridDBChartView.dcu deleted file mode 100644 index 3f2729a8..00000000 Binary files a/internal/x.46/Lib/D11/cxGridDBChartView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridDBDataDefinitions.dcu b/internal/x.46/Lib/D11/cxGridDBDataDefinitions.dcu deleted file mode 100644 index 44571747..00000000 Binary files a/internal/x.46/Lib/D11/cxGridDBDataDefinitions.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridDBTableView.dcu b/internal/x.46/Lib/D11/cxGridDBTableView.dcu deleted file mode 100644 index 95694d83..00000000 Binary files a/internal/x.46/Lib/D11/cxGridDBTableView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridDetailsSite.dcu b/internal/x.46/Lib/D11/cxGridDetailsSite.dcu deleted file mode 100644 index 9cde0298..00000000 Binary files a/internal/x.46/Lib/D11/cxGridDetailsSite.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridEditor.dcu b/internal/x.46/Lib/D11/cxGridEditor.dcu deleted file mode 100644 index 37070bca..00000000 Binary files a/internal/x.46/Lib/D11/cxGridEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridEditor.dfm b/internal/x.46/Lib/D11/cxGridEditor.dfm deleted file mode 100644 index 5e7018c7..00000000 --- a/internal/x.46/Lib/D11/cxGridEditor.dfm +++ /dev/null @@ -1,339 +0,0 @@ -object cxGridEditor: TcxGridEditor - Left = 457 - Top = 105 - Width = 610 - Height = 435 - HorzScrollBar.Range = 4 - VertScrollBar.Range = 34 - BorderIcons = [biSystemMenu] - Caption = 'Editing' - Color = clBtnFace - ParentFont = True - OldCreateOrder = True - OnClose = FormClose - PixelsPerInch = 96 - TextHeight = 13 - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 594 - Height = 361 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Splitter1: TSplitter - Left = 240 - Top = 0 - Width = 8 - Height = 361 - end - object Panel4: TPanel - Left = 248 - Top = 0 - Width = 346 - Height = 361 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Panel11: TPanel - Left = 0 - Top = 8 - Width = 346 - Height = 23 - Align = alTop - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object Panel12: TPanel - Left = 1 - Top = 1 - Width = 344 - Height = 21 - Align = alClient - BevelOuter = bvNone - Color = clInfoBk - TabOrder = 0 - object Label1: TLabel - Left = 7 - Top = 4 - Width = 26 - Height = 13 - Caption = 'View:' - end - object LSelectedView: TLabel - Left = 38 - Top = 4 - Width = 72 - Height = 13 - Caption = '' - end - end - end - object Panel5: TPanel - Left = 0 - Top = 0 - Width = 346 - Height = 8 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - end - object Panel13: TPanel - Left = 0 - Top = 31 - Width = 346 - Height = 8 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - end - object Panel15: TPanel - Left = 0 - Top = 39 - Width = 346 - Height = 322 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - Constraints.MinWidth = 100 - TabOrder = 3 - object PViewFrame: TPanel - Left = 1 - Top = 1 - Width = 344 - Height = 320 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - end - end - end - object PLeft: TPanel - Left = 0 - Top = 0 - Width = 240 - Height = 361 - Align = alLeft - BevelOuter = bvNone - TabOrder = 1 - object Panel7: TPanel - Left = 0 - Top = 8 - Width = 8 - Height = 353 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - end - object Panel8: TPanel - Left = 0 - Top = 0 - Width = 240 - Height = 8 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - end - object Panel14: TPanel - Left = 8 - Top = 8 - Width = 232 - Height = 353 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - Constraints.MinHeight = 200 - Constraints.MinWidth = 189 - TabOrder = 2 - object PageControl1: TcxPageControl - Left = 1 - Top = 1 - Width = 230 - Height = 351 - ActivePage = tsLevels - Align = alClient - TabOrder = 0 - ClientRectBottom = 351 - ClientRectRight = 230 - ClientRectTop = 24 - object tsLevels: TcxTabSheet - BorderWidth = 8 - Caption = ' Structure ' - Color = clBtnFace - ParentColor = False - object PLevels: TPanel - Left = 0 - Top = 0 - Width = 214 - Height = 277 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - end - object Panel6: TPanel - Left = 0 - Top = 277 - Width = 214 - Height = 34 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BAddLevel: TcxButton - Left = 1 - Top = 8 - Width = 80 - Height = 24 - Caption = '&Add Level' - TabOrder = 0 - OnClick = BAddLevelClick - end - object BDeleteLevel: TcxButton - Left = 90 - Top = 8 - Width = 80 - Height = 24 - Caption = '&Delete Level' - TabOrder = 1 - OnClick = BDeleteLevelClick - end - end - end - object TabSheet2: TcxTabSheet - BorderWidth = 8 - Caption = ' Views ' - Color = clBtnFace - ImageIndex = 1 - ParentColor = False - object PViews: TPanel - Left = 0 - Top = 0 - Width = 214 - Height = 247 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object LBViews: TListBox - Left = 1 - Top = 1 - Width = 212 - Height = 245 - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - PopupMenu = PMViewList - TabOrder = 0 - OnClick = LBViewsClick - OnKeyPress = GridStructureControlKeyPress - end - end - object Panel9: TPanel - Left = 0 - Top = 247 - Width = 214 - Height = 64 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object BAddView: TcxButton - Left = 1 - Top = 8 - Width = 80 - Height = 24 - Caption = 'Add &View...' - TabOrder = 0 - OnClick = BAddViewClick - end - object BDeleteView: TcxButton - Left = 90 - Top = 8 - Width = 80 - Height = 24 - Caption = 'D&elete View' - TabOrder = 1 - OnClick = BDeleteViewClick - end - object BEditView: TcxButton - Left = 1 - Top = 40 - Width = 169 - Height = 24 - Caption = 'Edit View &Layout and Data...' - TabOrder = 2 - OnClick = miEditLayoutClick - end - end - end - end - end - end - end - object Panel2: TPanel - Left = 0 - Top = 361 - Width = 602 - Height = 40 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object Panel3: TPanel - Left = 425 - Top = 0 - Width = 177 - Height = 40 - Align = alRight - BevelOuter = bvNone - TabOrder = 0 - object BClose: TcxButton - Left = 89 - Top = 8 - Width = 80 - Height = 24 - Cancel = True - Caption = '&Close' - TabOrder = 0 - OnClick = BCloseClick - end - end - end - object Panel10: TPanel - Left = 594 - Top = 0 - Width = 8 - Height = 361 - Align = alRight - BevelOuter = bvNone - TabOrder = 2 - end - object PMGridStructureControl: TPopupMenu - Left = 80 - Top = 64 - end - object PMViews: TPopupMenu - Left = 80 - Top = 96 - end - object PMViewList: TPopupMenu - Left = 80 - Top = 128 - object miDeleteView: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = BDeleteViewClick - end - object N1: TMenuItem - Caption = '-' - end - object miEditLayout: TMenuItem - Caption = '&Edit Layout and Data...' - OnClick = miEditLayoutClick - end - end -end diff --git a/internal/x.46/Lib/D11/cxGridExportLink.dcu b/internal/x.46/Lib/D11/cxGridExportLink.dcu deleted file mode 100644 index 050ad30f..00000000 Binary files a/internal/x.46/Lib/D11/cxGridExportLink.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridFilterHelpers.dcu b/internal/x.46/Lib/D11/cxGridFilterHelpers.dcu deleted file mode 100644 index 992c884b..00000000 Binary files a/internal/x.46/Lib/D11/cxGridFilterHelpers.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridFooterPopupMenuItems.dcu b/internal/x.46/Lib/D11/cxGridFooterPopupMenuItems.dcu deleted file mode 100644 index ba1e5372..00000000 Binary files a/internal/x.46/Lib/D11/cxGridFooterPopupMenuItems.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridGroupRowPopupMenuItems.dcu b/internal/x.46/Lib/D11/cxGridGroupRowPopupMenuItems.dcu deleted file mode 100644 index eb52631a..00000000 Binary files a/internal/x.46/Lib/D11/cxGridGroupRowPopupMenuItems.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridHeaderPopupMenuItems.dcu b/internal/x.46/Lib/D11/cxGridHeaderPopupMenuItems.dcu deleted file mode 100644 index 99a68f7d..00000000 Binary files a/internal/x.46/Lib/D11/cxGridHeaderPopupMenuItems.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridImportDialog.dcu b/internal/x.46/Lib/D11/cxGridImportDialog.dcu deleted file mode 100644 index ea665267..00000000 Binary files a/internal/x.46/Lib/D11/cxGridImportDialog.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridImportDialog.dfm b/internal/x.46/Lib/D11/cxGridImportDialog.dfm deleted file mode 100644 index 3e08ec17..00000000 --- a/internal/x.46/Lib/D11/cxGridImportDialog.dfm +++ /dev/null @@ -1,237 +0,0 @@ -object ImportDialog: TImportDialog - Left = 0 - Top = 0 - BorderStyle = bsDialog - Caption = 'Import' - ClientHeight = 368 - ClientWidth = 694 - Color = clBtnFace - ParentFont = True - KeyPreview = True - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - OnDestroy = FormDestroy - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object Panel1: TPanel - Left = 237 - Top = 0 - Width = 80 - Height = 368 - Align = alLeft - BevelOuter = bvNone - TabOrder = 1 - object btnImport: TcxButton - Left = 0 - Top = 8 - Width = 80 - Height = 24 - Caption = 'Import ->' - Enabled = False - TabOrder = 0 - OnClick = btnImportClick - end - object btnClose: TcxButton - Left = 0 - Top = 40 - Width = 80 - Height = 24 - Cancel = True - Caption = 'Close' - TabOrder = 1 - OnClick = btnCloseClick - end - end - object Panel2: TPanel - Left = 317 - Top = 0 - Width = 377 - Height = 368 - Align = alClient - BevelOuter = bvNone - BorderWidth = 8 - TabOrder = 2 - object Panel6: TPanel - Left = 8 - Top = 8 - Width = 361 - Height = 352 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object PageControl1: TcxPageControl - Left = 1 - Top = 1 - Width = 359 - Height = 350 - ActivePage = TabSheet1 - Align = alClient - Color = clBtnFace - ParentColor = False - TabOrder = 0 - ClientRectBottom = 350 - ClientRectRight = 359 - ClientRectTop = 24 - object TabSheet1: TcxTabSheet - BorderWidth = 8 - Caption = ' Levels ' - Color = clBtnFace - ParentColor = False - object cbDeleteAllSublevels: TcxCheckBox - Left = 0 - Top = 289 - Align = alBottom - Caption = 'Delete All Sublevels' - State = cbsChecked - TabOrder = 3 - Width = 343 - end - object Panel7: TPanel - Left = 0 - Top = 0 - Width = 343 - Height = 13 - Align = alTop - AutoSize = True - BevelOuter = bvNone - TabOrder = 0 - object lblLevelName: TLabel - Left = 89 - Top = 0 - Width = 254 - Height = 13 - Align = alClient - end - object Label1: TLabel - Left = 0 - Top = 0 - Width = 89 - Height = 13 - Align = alLeft - Caption = 'Destination Level: ' - end - end - object pnlStructureControlSite: TPanel - Left = 0 - Top = 21 - Width = 343 - Height = 260 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 1 - end - object Panel3: TPanel - Left = 0 - Top = 13 - Width = 343 - Height = 8 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - end - object Panel8: TPanel - Left = 0 - Top = 281 - Width = 343 - Height = 8 - Align = alBottom - BevelOuter = bvNone - TabOrder = 4 - end - end - object TabSheet2: TcxTabSheet - BorderWidth = 8 - Caption = ' Styles ' - Color = clBtnFace - ImageIndex = 1 - ParentColor = False - object cbImportStyles: TcxCheckBox - Left = 0 - Top = 0 - Align = alTop - Caption = 'Import Styles' - State = cbsChecked - TabOrder = 0 - OnClick = cbImportStylesClick - Width = 343 - end - object rbCreateNewStyleRepository: TcxRadioButton - Left = 12 - Top = 29 - Width = 169 - Height = 17 - Caption = 'Create New StyleRepository' - Checked = True - TabOrder = 1 - TabStop = True - OnClick = rbStyleRepositoryClick - end - object rbUseExistingStyleRepository: TcxRadioButton - Left = 12 - Top = 87 - Width = 173 - Height = 17 - Caption = 'Use Existing StyleRepository' - TabOrder = 3 - TabStop = True - OnClick = rbStyleRepositoryClick - end - object edNewStyleRepository: TcxTextEdit - Left = 36 - Top = 52 - TabOrder = 2 - Width = 290 - end - object cbStyleRepositories: TcxComboBox - Left = 36 - Top = 110 - Properties.DropDownListStyle = lsFixedList - TabOrder = 4 - Width = 290 - end - end - end - end - end - object Panel4: TPanel - Left = 0 - Top = 0 - Width = 237 - Height = 368 - Align = alLeft - BevelOuter = bvNone - BorderWidth = 8 - TabOrder = 0 - object Panel5: TPanel - Left = 8 - Top = 8 - Width = 221 - Height = 352 - Align = alClient - BevelOuter = bvNone - BorderWidth = 1 - Color = clBtnShadow - TabOrder = 0 - object lbComponentsForImport: TListBox - Left = 1 - Top = 1 - Width = 219 - Height = 350 - Style = lbOwnerDrawVariable - Align = alClient - BorderStyle = bsNone - ItemHeight = 13 - TabOrder = 0 - OnClick = lbComponentsForImportClick - OnDblClick = lbComponentsForImportDblClick - OnMeasureItem = lbComponentsForImportMeasureItem - end - end - end -end diff --git a/internal/x.46/Lib/D11/cxGridLevel.dcu b/internal/x.46/Lib/D11/cxGridLevel.dcu deleted file mode 100644 index 9c17cd6f..00000000 Binary files a/internal/x.46/Lib/D11/cxGridLevel.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridMenuOperations.dcu b/internal/x.46/Lib/D11/cxGridMenuOperations.dcu deleted file mode 100644 index 700c730c..00000000 Binary files a/internal/x.46/Lib/D11/cxGridMenuOperations.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridMenuOperations.res b/internal/x.46/Lib/D11/cxGridMenuOperations.res deleted file mode 100644 index d726fd87..00000000 Binary files a/internal/x.46/Lib/D11/cxGridMenuOperations.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridPopupMenu.dcu b/internal/x.46/Lib/D11/cxGridPopupMenu.dcu deleted file mode 100644 index 65e092ac..00000000 Binary files a/internal/x.46/Lib/D11/cxGridPopupMenu.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridPopupMenuConsts.dcu b/internal/x.46/Lib/D11/cxGridPopupMenuConsts.dcu deleted file mode 100644 index 64433123..00000000 Binary files a/internal/x.46/Lib/D11/cxGridPopupMenuConsts.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridPopupMenuReg.dcu b/internal/x.46/Lib/D11/cxGridPopupMenuReg.dcu deleted file mode 100644 index 30cd486e..00000000 Binary files a/internal/x.46/Lib/D11/cxGridPopupMenuReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridPredefinedStyles.dcu b/internal/x.46/Lib/D11/cxGridPredefinedStyles.dcu deleted file mode 100644 index 80469e23..00000000 Binary files a/internal/x.46/Lib/D11/cxGridPredefinedStyles.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridPredefinedStyles.dfm b/internal/x.46/Lib/D11/cxGridPredefinedStyles.dfm deleted file mode 100644 index bf3a1f73..00000000 --- a/internal/x.46/Lib/D11/cxGridPredefinedStyles.dfm +++ /dev/null @@ -1,4857 +0,0 @@ -object cxdmGridPredefinedStyles: TcxdmGridPredefinedStyles - OldCreateOrder = False - Left = 262 - Top = 123 - Height = 253 - Width = 356 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 160 - Top = 96 - object ClassicBackground: TcxStyle - AssignedValues = [svColor] - Color = 15451300 - end - object ClassicContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 16247513 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object ClassicContentEven: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16247513 - TextColor = clBlack - end - object ClassicContentOdd: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16247513 - TextColor = clBlack - end - object ClassicFilterBox: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14811135 - TextColor = clBlack - end - object ClassicFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14811135 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clNavy - end - object ClassicGroup: TcxStyle - AssignedValues = [svColor] - Color = 14872561 - end - object ClassicGroupByBox: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 4707838 - TextColor = clBlack - end - object ClassicHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12937777 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object ClassicInactive: TcxStyle - AssignedValues = [svColor] - Color = 15451300 - end - object ClassicIncSearch: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 4707838 - TextColor = clBlack - end - object ClassicIndicator: TcxStyle - AssignedValues = [svColor] - Color = 15451300 - end - object ClassicPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14811135 - Font.Charset = DEFAULT_CHARSET - Font.Color = clNavy - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clNavy - end - object ClassicSelection: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 12937777 - TextColor = clWhite - end - object cxStyle1: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8894686 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle2: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8894686 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -12 - Font.Name = 'Arial Narrow' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle3: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -12 - Font.Name = 'Arial Narrow' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle4: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 1262987 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Arial' - Font.Style = [] - TextColor = clWhite - end - object cxStyle5: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlue - end - object cxStyle6: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 15136253 - Font.Charset = DEFAULT_CHARSET - Font.Color = 7346457 - Font.Height = -12 - Font.Name = 'Arial Narrow' - Font.Style = [] - TextColor = 7346457 - end - object cxStyle7: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16436871 - TextColor = clBlack - end - object cxStyle8: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 8036607 - TextColor = clBlack - end - object cxStyle9: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12180223 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle10: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -12 - Font.Name = 'Arial Narrow' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle11: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8894686 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Arial Narrow' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle12: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9157775 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle13: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9157775 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -12 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle14: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4615972 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle15: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5737262 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Arial Black' - Font.Style = [] - TextColor = clBlack - end - object cxStyle16: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlue - end - object cxStyle17: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle18: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 9234160 - TextColor = clBlack - end - object cxStyle19: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 11788021 - TextColor = clBlack - end - object cxStyle20: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11193702 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clBlack - end - object cxStyle21: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5736750 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle22: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9157775 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle23: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13749760 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle24: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13749760 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -12 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle25: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 166 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -12 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle26: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8519755 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 14481663 - end - object cxStyle27: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlue - end - object cxStyle28: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle29: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16775416 - TextColor = clBlack - end - object cxStyle30: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16443110 - TextColor = clBlack - end - object cxStyle31: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14599344 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle32: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 191 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -12 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle33: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13749760 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle34: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6908265 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle35: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6908265 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle36: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 85 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle37: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle38: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlue - end - object cxStyle39: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle40: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle41: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15461355 - TextColor = clBlack - end - object cxStyle42: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle43: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 85 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle44: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6908265 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle45: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10862530 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle46: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10862530 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle47: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6392205 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle48: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 66 - Font.Charset = DEFAULT_CHARSET - Font.Color = 13820129 - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13820129 - end - object cxStyle49: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clMaroon - end - object cxStyle50: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle51: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 10862530 - TextColor = clBlack - end - object cxStyle52: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13820129 - TextColor = clBlack - end - object cxStyle53: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6392205 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 13820129 - end - object cxStyle54: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6392205 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle55: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10862530 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle56: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12307669 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle57: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12307669 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle58: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle59: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6852002 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle60: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clTeal - end - object cxStyle61: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle62: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 12307669 - TextColor = clBlack - end - object cxStyle63: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14542570 - TextColor = clBlack - end - object cxStyle64: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6852002 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle65: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle66: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12307669 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle67: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11055248 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle68: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11055248 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle69: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 7897176 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle70: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4194368 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle71: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = 7897176 - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = 7897176 - end - object cxStyle72: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle73: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 11055248 - TextColor = clBlack - end - object cxStyle74: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14211272 - TextColor = clBlack - end - object cxStyle75: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 7897176 - Font.Charset = DEFAULT_CHARSET - Font.Color = 524288 - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = 524288 - end - object cxStyle76: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 7897176 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle77: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11055248 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle78: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14264494 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle79: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14264494 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Garamond' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle80: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11619930 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle81: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle82: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = 11619930 - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 11619930 - end - object cxStyle83: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Garamond' - Font.Style = [] - TextColor = clBlack - end - object cxStyle84: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14264494 - TextColor = clBlack - end - object cxStyle85: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15521240 - TextColor = clBlack - end - object cxStyle86: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11619930 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle87: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11619930 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle88: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14264494 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle89: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11458790 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle90: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11458790 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle91: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4630214 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle92: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle93: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clMaroon - end - object cxStyle94: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle95: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 11458790 - TextColor = clBlack - end - object cxStyle96: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14150898 - TextColor = clBlack - end - object cxStyle97: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4630214 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 14150898 - end - object cxStyle98: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4630214 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle99: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11458790 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle100: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12107912 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle101: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12107912 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle102: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6053956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle103: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4673068 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle104: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14213320 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clNavy - end - object cxStyle105: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14213320 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle106: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 12107912 - TextColor = clBlack - end - object cxStyle107: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14213320 - TextColor = clBlack - end - object cxStyle108: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8949832 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clSilver - end - object cxStyle109: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6053956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle110: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12107912 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle111: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9476264 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle112: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9476264 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle113: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4210816 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 13160664 - end - object cxStyle114: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4204608 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle115: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160664 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 6307912 - end - object cxStyle116: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160664 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle117: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 10266296 - TextColor = clBlack - end - object cxStyle118: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14476524 - TextColor = clBlack - end - object cxStyle119: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5791864 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 9476264 - end - object cxStyle120: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4210816 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 13160664 - end - object cxStyle121: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9476264 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle122: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10343916 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle123: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10343916 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle124: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4944971 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle125: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4325442 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle126: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 3122647 - end - object cxStyle127: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle128: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 10343916 - TextColor = clBlack - end - object cxStyle129: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13626101 - TextColor = clBlack - end - object cxStyle130: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3122647 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 13626101 - end - object cxStyle131: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4944971 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle132: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10343916 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle133: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11639171 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle134: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11639171 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle135: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8217935 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle136: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle137: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 8217935 - end - object cxStyle138: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle139: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 11639171 - TextColor = clBlack - end - object cxStyle140: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14273729 - TextColor = clBlack - end - object cxStyle141: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8217935 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 14273729 - end - object cxStyle142: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8217935 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle143: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11639171 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle144: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clBlack - end - object cxStyle145: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle146: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clMaroon - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clWhite - end - object cxStyle147: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4325376 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle148: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clMaroon - end - object cxStyle149: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clBlack - end - object cxStyle150: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle151: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle152: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clSilver - end - object cxStyle153: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clMaroon - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clWhite - end - object cxStyle154: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle155: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13158655 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle156: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13158655 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle157: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5855675 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle158: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3552892 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle159: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 7364767 - end - object cxStyle160: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 15461375 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle161: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15461375 - TextColor = clBlack - end - object cxStyle162: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15461375 - TextColor = clBlack - end - object cxStyle163: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3552892 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 14540253 - end - object cxStyle164: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5855675 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle165: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13158655 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clBlack - end - object cxStyle166: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12103888 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle167: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13158655 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Arial' - Font.Style = [] - TextColor = clBlack - end - object cxStyle168: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5855675 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -16 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle169: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3552892 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -15 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clWhite - end - object cxStyle170: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 7364768 - end - object cxStyle171: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 15461375 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Arial' - Font.Style = [] - TextColor = clBlack - end - object cxStyle172: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15461375 - TextColor = clBlack - end - object cxStyle173: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle174: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3552892 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 14540253 - end - object cxStyle175: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 5855675 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -16 - Font.Name = 'Arial' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle176: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12103888 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Times New Roman' - Font.Style = [] - TextColor = clBlack - end - object cxStyle177: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13154717 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle178: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13154717 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle179: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9928789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle180: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4276545 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle181: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 9928789 - end - object cxStyle182: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle183: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13154717 - TextColor = clBlack - end - object cxStyle184: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14933198 - TextColor = clBlack - end - object cxStyle185: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9928789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clSilver - end - object cxStyle186: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9928789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle187: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13154717 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle188: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11126946 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle189: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11126946 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle190: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6592345 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle191: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 2178849 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle192: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 6592345 - end - object cxStyle193: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle194: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 11126946 - TextColor = clBlack - end - object cxStyle195: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13886416 - TextColor = clBlack - end - object cxStyle196: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6592345 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = 13886416 - end - object cxStyle197: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6592345 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle198: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11126946 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle199: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle200: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle201: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4194432 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle202: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle203: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clPurple - end - object cxStyle204: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle205: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle206: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle207: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clSilver - end - object cxStyle208: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4194432 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle209: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle210: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle211: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle212: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle213: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4210688 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle214: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clTeal - end - object cxStyle215: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle216: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle217: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle218: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle219: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle220: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle221: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10542814 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle222: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10542814 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle223: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clOlive - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle224: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 1916928 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle225: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clOlive - end - object cxStyle226: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle227: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 10542814 - TextColor = clBlack - end - object cxStyle228: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13692654 - TextColor = clBlack - end - object cxStyle229: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4308156 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle230: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clOlive - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle231: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10542814 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle232: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle233: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle234: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle235: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10841658 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle236: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clNavy - end - object cxStyle237: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle238: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle239: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle240: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clSilver - end - object cxStyle241: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle242: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle243: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle244: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle245: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle246: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10841658 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle247: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clNavy - end - object cxStyle248: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle249: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 14671839 - TextColor = clBlack - end - object cxStyle250: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle251: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clSilver - end - object cxStyle252: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clNavy - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle253: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle254: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle255: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle256: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6956042 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle257: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10841658 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle258: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 6956042 - end - object cxStyle259: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle260: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13160660 - TextColor = clBlack - end - object cxStyle261: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle262: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13160660 - end - object cxStyle263: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6956042 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle264: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle265: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle266: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle267: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6956042 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle268: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 10841658 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle269: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 6956042 - end - object cxStyle270: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle271: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 13160660 - TextColor = clBlack - end - object cxStyle272: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle273: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13160660 - end - object cxStyle274: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6956042 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle275: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13160660 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle276: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle277: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle278: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 206 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle279: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clSilver - Font.Height = -11 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clSilver - end - object cxStyle280: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlue - end - object cxStyle281: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clYellow - end - object cxStyle282: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle283: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle284: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle285: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 206 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle286: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle287: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle288: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle289: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 206 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle290: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle291: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlue - end - object cxStyle292: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clYellow - end - object cxStyle293: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle294: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle295: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle296: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 206 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle297: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle298: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clYellow - end - object cxStyle299: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clYellow - end - object cxStyle300: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle301: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle302: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clAqua - end - object cxStyle303: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle304: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle305: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle306: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle307: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle308: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle309: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clYellow - end - object cxStyle310: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clYellow - end - object cxStyle311: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle312: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle313: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clAqua - end - object cxStyle314: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle315: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle316: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle317: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle318: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clTeal - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle319: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle320: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle321: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle322: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clPurple - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle323: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle324: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clPurple - end - object cxStyle325: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle326: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle327: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clWhite - end - object cxStyle328: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle329: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clPurple - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clWhite - end - object cxStyle330: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle331: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle332: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle333: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clPurple - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle334: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle335: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clPurple - end - object cxStyle336: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle337: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clWhite - TextColor = clBlack - end - object cxStyle338: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clWhite - end - object cxStyle339: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle340: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clPurple - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object cxStyle341: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle342: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle343: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle344: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle345: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clSilver - Font.Height = -11 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clSilver - end - object cxStyle346: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [] - TextColor = clBlack - end - object cxStyle347: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle348: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle349: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15658734 - TextColor = clBlack - end - object cxStyle350: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle351: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle352: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Microsoft Sans Serif' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle353: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle354: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle355: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle356: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clSilver - Font.Height = -15 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clSilver - end - object cxStyle357: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object cxStyle358: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle359: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = clSilver - TextColor = clBlack - end - object cxStyle360: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 15658734 - TextColor = clBlack - end - object cxStyle361: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clGray - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object cxStyle362: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object cxStyle363: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -17 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object ClassicRowCaption: TcxStyle - AssignedValues = [svColor, svTextColor] - Color = 16749885 - TextColor = clWhite - end - object cxStyle364: TcxStyle - AssignedValues = [svColor] - Color = clSilver - end - object cxStyle365: TcxStyle - AssignedValues = [svColor] - Color = 13160660 - end - object cxStyle366: TcxStyle - AssignedValues = [svColor] - Color = 13160660 - end - object GridTableViewStyleSheetDevExpress: TcxGridTableViewStyleSheet - Caption = 'DevExpress' - Styles.Background = ClassicBackground - Styles.Content = ClassicContent - Styles.ContentEven = ClassicContentEven - Styles.ContentOdd = ClassicContentOdd - Styles.FilterBox = ClassicFilterBox - Styles.Inactive = ClassicInactive - Styles.IncSearch = ClassicIncSearch - Styles.Selection = ClassicSelection - Styles.Footer = ClassicFooter - Styles.Group = ClassicGroup - Styles.GroupByBox = ClassicGroupByBox - Styles.Header = ClassicHeader - Styles.Indicator = ClassicIndicator - Styles.Preview = ClassicPreview - BuiltIn = True - end - object GridBandedTableViewStyleSheetDevExpress: TcxGridBandedTableViewStyleSheet - Caption = 'DevExpress' - Styles.Background = ClassicBackground - Styles.Content = ClassicContent - Styles.ContentEven = ClassicContentEven - Styles.ContentOdd = ClassicContentOdd - Styles.FilterBox = ClassicFilterBox - Styles.Inactive = ClassicInactive - Styles.IncSearch = ClassicIncSearch - Styles.Selection = ClassicSelection - Styles.Footer = ClassicFooter - Styles.Group = ClassicGroup - Styles.GroupByBox = ClassicGroupByBox - Styles.Header = ClassicHeader - Styles.Indicator = ClassicIndicator - Styles.Preview = ClassicPreview - Styles.BandBackground = ClassicBackground - Styles.BandHeader = ClassicHeader - BuiltIn = True - end - object GridCardViewStyleSheetDevExpress: TcxGridCardViewStyleSheet - Caption = 'DevExpress' - Styles.Background = ClassicBackground - Styles.Content = ClassicContent - Styles.ContentEven = ClassicContentOdd - Styles.ContentOdd = ClassicContentEven - Styles.Inactive = ClassicInactive - Styles.IncSearch = ClassicIncSearch - Styles.Selection = ClassicSelection - Styles.CaptionRow = ClassicHeader - Styles.CardBorder = ClassicHeader - Styles.RowCaption = ClassicRowCaption - BuiltIn = True - end - object GridTableViewStyleSheetUserFormat1: TcxGridTableViewStyleSheet - Caption = 'UserFormat1' - Styles.Content = cxStyle6 - Styles.ContentEven = cxStyle7 - Styles.ContentOdd = cxStyle8 - Styles.Inactive = cxStyle10 - Styles.Selection = cxStyle3 - Styles.Footer = cxStyle1 - Styles.Group = cxStyle9 - Styles.GroupByBox = cxStyle4 - Styles.Header = cxStyle2 - Styles.Indicator = cxStyle11 - Styles.Preview = cxStyle5 - BuiltIn = True - end - object GridBandedTableViewStyleSheetUserFormat1: TcxGridBandedTableViewStyleSheet - Caption = 'UserFormat1' - Styles.Content = cxStyle6 - Styles.ContentEven = cxStyle7 - Styles.ContentOdd = cxStyle8 - Styles.Inactive = cxStyle10 - Styles.Selection = cxStyle3 - Styles.Footer = cxStyle1 - Styles.Group = cxStyle9 - Styles.GroupByBox = cxStyle4 - Styles.Header = cxStyle2 - Styles.Indicator = cxStyle11 - Styles.Preview = cxStyle5 - Styles.BandHeader = cxStyle2 - BuiltIn = True - end - object GridCardViewStyleSheetUserFormat1: TcxGridCardViewStyleSheet - Caption = 'UserFormat1' - Styles.Content = cxStyle6 - Styles.ContentEven = cxStyle7 - Styles.ContentOdd = cxStyle8 - Styles.Inactive = cxStyle10 - Styles.Selection = cxStyle3 - Styles.CaptionRow = cxStyle2 - Styles.RowCaption = cxStyle2 - BuiltIn = True - end - object GridTableViewStyleSheetUserFormat2: TcxGridTableViewStyleSheet - Caption = 'UserFormat2' - Styles.Content = cxStyle17 - Styles.ContentEven = cxStyle18 - Styles.ContentOdd = cxStyle19 - Styles.Inactive = cxStyle21 - Styles.Selection = cxStyle14 - Styles.Footer = cxStyle12 - Styles.Group = cxStyle20 - Styles.GroupByBox = cxStyle15 - Styles.Header = cxStyle13 - Styles.Indicator = cxStyle22 - Styles.Preview = cxStyle16 - BuiltIn = True - end - object GridBandedTableViewStyleSheetUserFormat2: TcxGridBandedTableViewStyleSheet - Caption = 'UserFormat2' - Styles.Content = cxStyle17 - Styles.ContentEven = cxStyle18 - Styles.ContentOdd = cxStyle19 - Styles.Inactive = cxStyle21 - Styles.Selection = cxStyle14 - Styles.Footer = cxStyle12 - Styles.Group = cxStyle20 - Styles.GroupByBox = cxStyle15 - Styles.Header = cxStyle13 - Styles.Indicator = cxStyle22 - Styles.Preview = cxStyle16 - Styles.BandHeader = cxStyle13 - BuiltIn = True - end - object GridCardViewStyleSheetUserFormat2: TcxGridCardViewStyleSheet - Caption = 'UserFormat2' - Styles.Content = cxStyle17 - Styles.ContentEven = cxStyle18 - Styles.ContentOdd = cxStyle19 - Styles.Inactive = cxStyle21 - Styles.Selection = cxStyle14 - Styles.CaptionRow = cxStyle13 - Styles.RowCaption = cxStyle13 - BuiltIn = True - end - object GridTableViewStyleSheetUserFormat3: TcxGridTableViewStyleSheet - Caption = 'UserFormat3' - Styles.Content = cxStyle28 - Styles.ContentEven = cxStyle29 - Styles.ContentOdd = cxStyle30 - Styles.Inactive = cxStyle32 - Styles.Selection = cxStyle25 - Styles.Footer = cxStyle23 - Styles.Group = cxStyle31 - Styles.GroupByBox = cxStyle26 - Styles.Header = cxStyle24 - Styles.Indicator = cxStyle33 - Styles.Preview = cxStyle27 - BuiltIn = True - end - object GridBandedTableViewStyleSheetUserFormat3: TcxGridBandedTableViewStyleSheet - Caption = 'UserFormat3' - Styles.Content = cxStyle28 - Styles.ContentEven = cxStyle29 - Styles.ContentOdd = cxStyle30 - Styles.Inactive = cxStyle32 - Styles.Selection = cxStyle25 - Styles.Footer = cxStyle23 - Styles.Group = cxStyle31 - Styles.GroupByBox = cxStyle26 - Styles.Header = cxStyle24 - Styles.Indicator = cxStyle33 - Styles.Preview = cxStyle27 - Styles.BandHeader = cxStyle24 - BuiltIn = True - end - object GridCardViewStyleSheetUserFormat3: TcxGridCardViewStyleSheet - Caption = 'UserFormat3' - Styles.Content = cxStyle28 - Styles.ContentEven = cxStyle29 - Styles.ContentOdd = cxStyle30 - Styles.Inactive = cxStyle32 - Styles.Selection = cxStyle25 - Styles.CaptionRow = cxStyle24 - Styles.RowCaption = cxStyle24 - BuiltIn = True - end - object GridTableViewStyleSheetUserFormat4: TcxGridTableViewStyleSheet - Caption = 'UserFormat4' - Styles.Content = cxStyle39 - Styles.ContentEven = cxStyle40 - Styles.ContentOdd = cxStyle41 - Styles.Inactive = cxStyle43 - Styles.Selection = cxStyle36 - Styles.Footer = cxStyle34 - Styles.Group = cxStyle42 - Styles.GroupByBox = cxStyle37 - Styles.Header = cxStyle35 - Styles.Indicator = cxStyle44 - Styles.Preview = cxStyle38 - BuiltIn = True - end - object GridBandedTableViewStyleSheetUserFormat4: TcxGridBandedTableViewStyleSheet - Caption = 'UserFormat4' - Styles.Content = cxStyle39 - Styles.ContentEven = cxStyle40 - Styles.ContentOdd = cxStyle41 - Styles.Inactive = cxStyle43 - Styles.Selection = cxStyle36 - Styles.Footer = cxStyle34 - Styles.Group = cxStyle42 - Styles.GroupByBox = cxStyle37 - Styles.Header = cxStyle35 - Styles.Indicator = cxStyle44 - Styles.Preview = cxStyle38 - Styles.BandHeader = cxStyle35 - BuiltIn = True - end - object GridCardViewStyleSheetUserFormat4: TcxGridCardViewStyleSheet - Caption = 'UserFormat4' - Styles.Content = cxStyle39 - Styles.ContentEven = cxStyle40 - Styles.ContentOdd = cxStyle41 - Styles.Inactive = cxStyle43 - Styles.Selection = cxStyle36 - Styles.CaptionRow = cxStyle35 - Styles.RowCaption = cxStyle35 - BuiltIn = True - end - object GridTableViewStyleSheetBrick: TcxGridTableViewStyleSheet - Caption = 'Brick' - Styles.Content = cxStyle50 - Styles.ContentEven = cxStyle51 - Styles.ContentOdd = cxStyle52 - Styles.Inactive = cxStyle54 - Styles.Selection = cxStyle47 - Styles.Footer = cxStyle45 - Styles.Group = cxStyle53 - Styles.GroupByBox = cxStyle48 - Styles.Header = cxStyle46 - Styles.Indicator = cxStyle55 - Styles.Preview = cxStyle49 - BuiltIn = True - end - object GridBandedTableViewStyleSheetBrick: TcxGridBandedTableViewStyleSheet - Caption = 'Brick' - Styles.Content = cxStyle50 - Styles.ContentEven = cxStyle51 - Styles.ContentOdd = cxStyle52 - Styles.Inactive = cxStyle54 - Styles.Selection = cxStyle47 - Styles.Footer = cxStyle45 - Styles.Group = cxStyle53 - Styles.GroupByBox = cxStyle48 - Styles.Header = cxStyle46 - Styles.Indicator = cxStyle55 - Styles.Preview = cxStyle49 - Styles.BandHeader = cxStyle46 - BuiltIn = True - end - object GridCardViewStyleSheetBrick: TcxGridCardViewStyleSheet - Caption = 'Brick' - Styles.Content = cxStyle50 - Styles.ContentEven = cxStyle51 - Styles.ContentOdd = cxStyle52 - Styles.Inactive = cxStyle54 - Styles.Selection = cxStyle47 - Styles.CaptionRow = cxStyle46 - Styles.RowCaption = cxStyle46 - BuiltIn = True - end - object GridTableViewStyleSheetDesert: TcxGridTableViewStyleSheet - Caption = 'Desert' - Styles.Content = cxStyle61 - Styles.ContentEven = cxStyle62 - Styles.ContentOdd = cxStyle63 - Styles.Inactive = cxStyle65 - Styles.Selection = cxStyle58 - Styles.Footer = cxStyle56 - Styles.Group = cxStyle64 - Styles.GroupByBox = cxStyle59 - Styles.Header = cxStyle57 - Styles.Indicator = cxStyle66 - Styles.Preview = cxStyle60 - BuiltIn = True - end - object GridBandedTableViewStyleSheetDesert: TcxGridBandedTableViewStyleSheet - Caption = 'Desert' - Styles.Content = cxStyle61 - Styles.ContentEven = cxStyle62 - Styles.ContentOdd = cxStyle63 - Styles.Inactive = cxStyle65 - Styles.Selection = cxStyle58 - Styles.Footer = cxStyle56 - Styles.Group = cxStyle64 - Styles.GroupByBox = cxStyle59 - Styles.Header = cxStyle57 - Styles.Indicator = cxStyle66 - Styles.Preview = cxStyle60 - Styles.BandHeader = cxStyle57 - BuiltIn = True - end - object GridCardViewStyleSheetDesert: TcxGridCardViewStyleSheet - Caption = 'Desert' - Styles.Content = cxStyle61 - Styles.ContentEven = cxStyle62 - Styles.ContentOdd = cxStyle63 - Styles.Inactive = cxStyle65 - Styles.Selection = cxStyle58 - Styles.CaptionRow = cxStyle57 - Styles.RowCaption = cxStyle57 - BuiltIn = True - end - object GridTableViewStyleSheetEggplant: TcxGridTableViewStyleSheet - Caption = 'Eggplant' - Styles.Content = cxStyle72 - Styles.ContentEven = cxStyle73 - Styles.ContentOdd = cxStyle74 - Styles.Inactive = cxStyle76 - Styles.Selection = cxStyle69 - Styles.Footer = cxStyle67 - Styles.Group = cxStyle75 - Styles.GroupByBox = cxStyle70 - Styles.Header = cxStyle68 - Styles.Indicator = cxStyle77 - Styles.Preview = cxStyle71 - BuiltIn = True - end - object GridBandedTableViewStyleSheetEggplant: TcxGridBandedTableViewStyleSheet - Caption = 'Eggplant' - Styles.Content = cxStyle72 - Styles.ContentEven = cxStyle73 - Styles.ContentOdd = cxStyle74 - Styles.Inactive = cxStyle76 - Styles.Selection = cxStyle69 - Styles.Footer = cxStyle67 - Styles.Group = cxStyle75 - Styles.GroupByBox = cxStyle70 - Styles.Header = cxStyle68 - Styles.Indicator = cxStyle77 - Styles.Preview = cxStyle71 - Styles.BandBackground = cxStyle68 - BuiltIn = True - end - object GridCardViewStyleSheetEggplant: TcxGridCardViewStyleSheet - Caption = 'Eggplant' - Styles.Content = cxStyle72 - Styles.ContentEven = cxStyle73 - Styles.ContentOdd = cxStyle74 - Styles.Inactive = cxStyle76 - Styles.Selection = cxStyle69 - Styles.CaptionRow = cxStyle68 - Styles.RowCaption = cxStyle68 - BuiltIn = True - end - object GridTableViewStyleSheetLilac: TcxGridTableViewStyleSheet - Caption = 'Lilac' - Styles.Content = cxStyle83 - Styles.ContentEven = cxStyle84 - Styles.ContentOdd = cxStyle85 - Styles.Inactive = cxStyle87 - Styles.Selection = cxStyle80 - Styles.Footer = cxStyle78 - Styles.Group = cxStyle86 - Styles.GroupByBox = cxStyle81 - Styles.Header = cxStyle79 - Styles.Indicator = cxStyle88 - Styles.Preview = cxStyle82 - BuiltIn = True - end - object GridBandedTableViewStyleSheetLilac: TcxGridBandedTableViewStyleSheet - Caption = 'Lilac' - Styles.Content = cxStyle83 - Styles.ContentEven = cxStyle84 - Styles.ContentOdd = cxStyle85 - Styles.Inactive = cxStyle87 - Styles.Selection = cxStyle80 - Styles.Footer = cxStyle78 - Styles.Group = cxStyle86 - Styles.GroupByBox = cxStyle81 - Styles.Header = cxStyle79 - Styles.Indicator = cxStyle88 - Styles.Preview = cxStyle82 - Styles.BandHeader = cxStyle79 - BuiltIn = True - end - object GridCardViewStyleSheetLilac: TcxGridCardViewStyleSheet - Caption = 'Lilac' - Styles.Content = cxStyle83 - Styles.ContentEven = cxStyle84 - Styles.ContentOdd = cxStyle85 - Styles.Inactive = cxStyle87 - Styles.Selection = cxStyle80 - Styles.CaptionRow = cxStyle79 - Styles.RowCaption = cxStyle79 - BuiltIn = True - end - object GridTableViewStyleSheetMaple: TcxGridTableViewStyleSheet - Caption = 'Maple' - Styles.Content = cxStyle94 - Styles.ContentEven = cxStyle95 - Styles.ContentOdd = cxStyle96 - Styles.Inactive = cxStyle98 - Styles.Selection = cxStyle91 - Styles.Footer = cxStyle89 - Styles.Group = cxStyle97 - Styles.GroupByBox = cxStyle92 - Styles.Header = cxStyle90 - Styles.Indicator = cxStyle99 - Styles.Preview = cxStyle93 - BuiltIn = True - end - object GridBandedTableViewStyleSheetMaple: TcxGridBandedTableViewStyleSheet - Caption = 'Maple' - Styles.Content = cxStyle94 - Styles.ContentEven = cxStyle95 - Styles.ContentOdd = cxStyle96 - Styles.Inactive = cxStyle98 - Styles.Selection = cxStyle91 - Styles.Footer = cxStyle89 - Styles.Group = cxStyle97 - Styles.GroupByBox = cxStyle92 - Styles.Header = cxStyle90 - Styles.Indicator = cxStyle99 - Styles.Preview = cxStyle93 - Styles.BandHeader = cxStyle90 - BuiltIn = True - end - object GridCardViewStyleSheetMaple: TcxGridCardViewStyleSheet - Caption = 'Maple' - Styles.Content = cxStyle94 - Styles.ContentEven = cxStyle95 - Styles.ContentOdd = cxStyle96 - Styles.Inactive = cxStyle98 - Styles.Selection = cxStyle91 - Styles.CaptionRow = cxStyle90 - Styles.RowCaption = cxStyle90 - BuiltIn = True - end - object GridTableViewStyleSheetMarinehighcolor: TcxGridTableViewStyleSheet - Caption = 'Marine (high color)' - Styles.Content = cxStyle105 - Styles.ContentEven = cxStyle106 - Styles.ContentOdd = cxStyle107 - Styles.Inactive = cxStyle109 - Styles.Selection = cxStyle102 - Styles.Footer = cxStyle100 - Styles.Group = cxStyle108 - Styles.GroupByBox = cxStyle103 - Styles.Header = cxStyle101 - Styles.Indicator = cxStyle110 - Styles.Preview = cxStyle104 - BuiltIn = True - end - object GridBandedTableViewStyleSheetMarinehighcolor: TcxGridBandedTableViewStyleSheet - Caption = 'Marine (high color)' - Styles.Content = cxStyle105 - Styles.ContentEven = cxStyle106 - Styles.ContentOdd = cxStyle107 - Styles.Inactive = cxStyle109 - Styles.Selection = cxStyle102 - Styles.Footer = cxStyle100 - Styles.Group = cxStyle108 - Styles.GroupByBox = cxStyle103 - Styles.Header = cxStyle101 - Styles.Indicator = cxStyle110 - Styles.Preview = cxStyle104 - Styles.BandHeader = cxStyle101 - BuiltIn = True - end - object GridCardViewStyleSheetMarinehighcolor: TcxGridCardViewStyleSheet - Caption = 'Marine (high color)' - Styles.Content = cxStyle105 - Styles.ContentEven = cxStyle106 - Styles.ContentOdd = cxStyle107 - Styles.Inactive = cxStyle109 - Styles.Selection = cxStyle102 - Styles.CaptionRow = cxStyle101 - Styles.RowCaption = cxStyle101 - BuiltIn = True - end - object GridTableViewStyleSheetPlumhighcolor: TcxGridTableViewStyleSheet - Caption = 'Plum (high color)' - Styles.Content = cxStyle116 - Styles.ContentEven = cxStyle117 - Styles.ContentOdd = cxStyle118 - Styles.Inactive = cxStyle120 - Styles.Selection = cxStyle113 - Styles.Footer = cxStyle111 - Styles.Group = cxStyle119 - Styles.GroupByBox = cxStyle114 - Styles.Header = cxStyle112 - Styles.Indicator = cxStyle121 - Styles.Preview = cxStyle115 - BuiltIn = True - end - object GridBandedTableViewStyleSheetPlumhighcolor: TcxGridBandedTableViewStyleSheet - Caption = 'Plum (high color)' - Styles.Content = cxStyle116 - Styles.ContentEven = cxStyle117 - Styles.ContentOdd = cxStyle118 - Styles.Inactive = cxStyle120 - Styles.Selection = cxStyle113 - Styles.Footer = cxStyle111 - Styles.Group = cxStyle119 - Styles.GroupByBox = cxStyle114 - Styles.Header = cxStyle112 - Styles.Indicator = cxStyle121 - Styles.Preview = cxStyle115 - Styles.BandHeader = cxStyle112 - BuiltIn = True - end - object GridCardViewStyleSheetPlumhighcolor: TcxGridCardViewStyleSheet - Caption = 'Plum (high color)' - Styles.Content = cxStyle116 - Styles.ContentEven = cxStyle117 - Styles.ContentOdd = cxStyle118 - Styles.Inactive = cxStyle120 - Styles.Selection = cxStyle113 - Styles.CaptionRow = cxStyle112 - Styles.CardBorder = cxStyle112 - Styles.RowCaption = cxStyle112 - BuiltIn = True - end - object GridTableViewStyleSheetPumpkinlarge: TcxGridTableViewStyleSheet - Caption = 'Pumpkin (large)' - Styles.Content = cxStyle127 - Styles.ContentEven = cxStyle128 - Styles.ContentOdd = cxStyle129 - Styles.Inactive = cxStyle131 - Styles.Selection = cxStyle124 - Styles.Footer = cxStyle122 - Styles.Group = cxStyle130 - Styles.GroupByBox = cxStyle125 - Styles.Header = cxStyle123 - Styles.Indicator = cxStyle132 - Styles.Preview = cxStyle126 - BuiltIn = True - end - object GridBandedTableViewStyleSheetPumpkinlarge: TcxGridBandedTableViewStyleSheet - Caption = 'Pumpkin (large)' - Styles.Content = cxStyle127 - Styles.ContentEven = cxStyle128 - Styles.ContentOdd = cxStyle129 - Styles.Inactive = cxStyle131 - Styles.Selection = cxStyle124 - Styles.Footer = cxStyle122 - Styles.Group = cxStyle130 - Styles.GroupByBox = cxStyle125 - Styles.Header = cxStyle123 - Styles.Indicator = cxStyle132 - Styles.Preview = cxStyle126 - Styles.BandHeader = cxStyle123 - BuiltIn = True - end - object GridCardViewStyleSheetPumpkinlarge: TcxGridCardViewStyleSheet - Caption = 'Pumpkin (large)' - Styles.Content = cxStyle127 - Styles.ContentEven = cxStyle128 - Styles.ContentOdd = cxStyle129 - Styles.Inactive = cxStyle131 - Styles.Selection = cxStyle124 - Styles.CaptionRow = cxStyle123 - Styles.RowCaption = cxStyle123 - BuiltIn = True - end - object GridTableViewStyleSheetRainyDay: TcxGridTableViewStyleSheet - Caption = 'Rainy Day' - Styles.Content = cxStyle138 - Styles.ContentEven = cxStyle139 - Styles.ContentOdd = cxStyle140 - Styles.Inactive = cxStyle142 - Styles.Selection = cxStyle135 - Styles.Footer = cxStyle133 - Styles.Group = cxStyle141 - Styles.GroupByBox = cxStyle136 - Styles.Header = cxStyle134 - Styles.Indicator = cxStyle143 - Styles.Preview = cxStyle137 - BuiltIn = True - end - object GridBandedTableViewStyleSheetRainyDay: TcxGridBandedTableViewStyleSheet - Caption = 'Rainy Day' - Styles.Content = cxStyle138 - Styles.ContentEven = cxStyle139 - Styles.ContentOdd = cxStyle140 - Styles.Inactive = cxStyle142 - Styles.Selection = cxStyle135 - Styles.Footer = cxStyle133 - Styles.Group = cxStyle141 - Styles.GroupByBox = cxStyle136 - Styles.Header = cxStyle134 - Styles.Indicator = cxStyle143 - Styles.Preview = cxStyle137 - Styles.BandHeader = cxStyle134 - BuiltIn = True - end - object GridCardViewStyleSheetRainyDay: TcxGridCardViewStyleSheet - Caption = 'Rainy Day' - Styles.Content = cxStyle138 - Styles.ContentEven = cxStyle139 - Styles.ContentOdd = cxStyle140 - Styles.Inactive = cxStyle142 - Styles.Selection = cxStyle135 - Styles.CaptionRow = cxStyle134 - Styles.RowCaption = cxStyle134 - BuiltIn = True - end - object GridTableViewStyleSheetRedWhiteandBlueVGA: TcxGridTableViewStyleSheet - Caption = 'Red, White, and Blue (VGA)' - Styles.Content = cxStyle149 - Styles.ContentEven = cxStyle150 - Styles.ContentOdd = cxStyle151 - Styles.Inactive = cxStyle153 - Styles.Selection = cxStyle146 - Styles.Footer = cxStyle144 - Styles.Group = cxStyle152 - Styles.GroupByBox = cxStyle147 - Styles.Header = cxStyle145 - Styles.Indicator = cxStyle154 - Styles.Preview = cxStyle148 - BuiltIn = True - end - object GridBandedTableViewStyleSheetRedWhiteandBlueVGA: TcxGridBandedTableViewStyleSheet - Caption = 'Red, White, and Blue (VGA)' - Styles.Content = cxStyle149 - Styles.ContentEven = cxStyle150 - Styles.ContentOdd = cxStyle151 - Styles.Inactive = cxStyle153 - Styles.Selection = cxStyle146 - Styles.Footer = cxStyle144 - Styles.Group = cxStyle152 - Styles.GroupByBox = cxStyle147 - Styles.Header = cxStyle145 - Styles.Indicator = cxStyle154 - Styles.Preview = cxStyle148 - Styles.BandHeader = cxStyle145 - BuiltIn = True - end - object GridCardViewStyleSheetRedWhiteandBlueVGA: TcxGridCardViewStyleSheet - Caption = 'Red, White, and Blue (VGA)' - Styles.Content = cxStyle149 - Styles.ContentEven = cxStyle150 - Styles.ContentOdd = cxStyle151 - Styles.Inactive = cxStyle153 - Styles.Selection = cxStyle146 - Styles.CaptionRow = cxStyle145 - Styles.RowCaption = cxStyle145 - BuiltIn = True - end - object GridTableViewStyleSheetRose: TcxGridTableViewStyleSheet - Caption = 'Rose' - Styles.Content = cxStyle160 - Styles.ContentEven = cxStyle161 - Styles.ContentOdd = cxStyle162 - Styles.Inactive = cxStyle164 - Styles.Selection = cxStyle157 - Styles.Footer = cxStyle155 - Styles.Group = cxStyle163 - Styles.GroupByBox = cxStyle158 - Styles.Header = cxStyle156 - Styles.Indicator = cxStyle165 - Styles.Preview = cxStyle159 - BuiltIn = True - end - object GridBandedTableViewStyleSheetRose: TcxGridBandedTableViewStyleSheet - Caption = 'Rose' - Styles.Content = cxStyle160 - Styles.ContentEven = cxStyle161 - Styles.ContentOdd = cxStyle162 - Styles.Inactive = cxStyle164 - Styles.Selection = cxStyle157 - Styles.Footer = cxStyle155 - Styles.Group = cxStyle163 - Styles.GroupByBox = cxStyle158 - Styles.Header = cxStyle156 - Styles.Indicator = cxStyle165 - Styles.Preview = cxStyle159 - Styles.BandHeader = cxStyle156 - BuiltIn = True - end - object GridCardViewStyleSheetRose: TcxGridCardViewStyleSheet - Caption = 'Rose' - Styles.Content = cxStyle160 - Styles.ContentEven = cxStyle161 - Styles.ContentOdd = cxStyle162 - Styles.Inactive = cxStyle164 - Styles.Selection = cxStyle157 - Styles.CaptionRow = cxStyle156 - Styles.RowCaption = cxStyle156 - BuiltIn = True - end - object GridTableViewStyleSheetRoselarge: TcxGridTableViewStyleSheet - Caption = 'Rose (large)' - Styles.Content = cxStyle171 - Styles.ContentEven = cxStyle172 - Styles.ContentOdd = cxStyle173 - Styles.Inactive = cxStyle175 - Styles.Selection = cxStyle168 - Styles.Footer = cxStyle166 - Styles.Group = cxStyle174 - Styles.GroupByBox = cxStyle169 - Styles.Header = cxStyle167 - Styles.Indicator = cxStyle176 - Styles.Preview = cxStyle170 - BuiltIn = True - end - object GridBandedTableViewStyleSheetRoselarge: TcxGridBandedTableViewStyleSheet - Caption = 'Rose (large)' - Styles.Content = cxStyle171 - Styles.ContentEven = cxStyle172 - Styles.ContentOdd = cxStyle173 - Styles.Inactive = cxStyle175 - Styles.Selection = cxStyle168 - Styles.Footer = cxStyle166 - Styles.Group = cxStyle174 - Styles.GroupByBox = cxStyle169 - Styles.Header = cxStyle167 - Styles.Indicator = cxStyle176 - Styles.Preview = cxStyle170 - Styles.BandHeader = cxStyle167 - BuiltIn = True - end - object GridCardViewStyleSheetRoselarge: TcxGridCardViewStyleSheet - Caption = 'Rose (large)' - Styles.Content = cxStyle171 - Styles.ContentEven = cxStyle172 - Styles.ContentOdd = cxStyle173 - Styles.Inactive = cxStyle175 - Styles.Selection = cxStyle168 - Styles.CaptionRow = cxStyle167 - Styles.RowCaption = cxStyle167 - BuiltIn = True - end - object GridTableViewStyleSheetSlate: TcxGridTableViewStyleSheet - Caption = 'Slate' - Styles.Content = cxStyle182 - Styles.ContentEven = cxStyle183 - Styles.ContentOdd = cxStyle184 - Styles.Inactive = cxStyle186 - Styles.Selection = cxStyle179 - Styles.Footer = cxStyle177 - Styles.Group = cxStyle185 - Styles.GroupByBox = cxStyle180 - Styles.Header = cxStyle178 - Styles.Indicator = cxStyle187 - Styles.Preview = cxStyle181 - BuiltIn = True - end - object GridBandedTableViewStyleSheetSlate: TcxGridBandedTableViewStyleSheet - Caption = 'Slate' - Styles.Content = cxStyle182 - Styles.ContentEven = cxStyle183 - Styles.ContentOdd = cxStyle184 - Styles.Inactive = cxStyle186 - Styles.Selection = cxStyle179 - Styles.Footer = cxStyle177 - Styles.Group = cxStyle185 - Styles.GroupByBox = cxStyle180 - Styles.Header = cxStyle178 - Styles.Indicator = cxStyle187 - Styles.Preview = cxStyle181 - Styles.BandHeader = cxStyle178 - BuiltIn = True - end - object GridCardViewStyleSheetSlate: TcxGridCardViewStyleSheet - Caption = 'Slate' - Styles.Content = cxStyle182 - Styles.ContentEven = cxStyle183 - Styles.ContentOdd = cxStyle184 - Styles.Inactive = cxStyle186 - Styles.Selection = cxStyle179 - Styles.CaptionRow = cxStyle178 - Styles.RowCaption = cxStyle178 - BuiltIn = True - end - object GridTableViewStyleSheetSpruce: TcxGridTableViewStyleSheet - Caption = 'Spruce' - Styles.Content = cxStyle193 - Styles.ContentEven = cxStyle194 - Styles.ContentOdd = cxStyle195 - Styles.Inactive = cxStyle197 - Styles.Selection = cxStyle190 - Styles.Footer = cxStyle188 - Styles.Group = cxStyle196 - Styles.GroupByBox = cxStyle191 - Styles.Header = cxStyle189 - Styles.Indicator = cxStyle198 - Styles.Preview = cxStyle192 - BuiltIn = True - end - object GridBandedTableViewStyleSheetSpruce: TcxGridBandedTableViewStyleSheet - Caption = 'Spruce' - Styles.Content = cxStyle193 - Styles.ContentEven = cxStyle194 - Styles.ContentOdd = cxStyle195 - Styles.Inactive = cxStyle197 - Styles.Selection = cxStyle190 - Styles.Footer = cxStyle188 - Styles.Group = cxStyle196 - Styles.GroupByBox = cxStyle191 - Styles.Header = cxStyle189 - Styles.Indicator = cxStyle198 - Styles.Preview = cxStyle192 - Styles.BandHeader = cxStyle189 - BuiltIn = True - end - object GridCardViewStyleSheetSpruce: TcxGridCardViewStyleSheet - Caption = 'Spruce' - Styles.Content = cxStyle193 - Styles.ContentEven = cxStyle194 - Styles.ContentOdd = cxStyle195 - Styles.Inactive = cxStyle197 - Styles.Selection = cxStyle190 - Styles.CaptionRow = cxStyle189 - Styles.RowCaption = cxStyle189 - BuiltIn = True - end - object GridTableViewStyleSheetStormVGA: TcxGridTableViewStyleSheet - Caption = 'Storm (VGA)' - Styles.Content = cxStyle204 - Styles.ContentEven = cxStyle205 - Styles.ContentOdd = cxStyle206 - Styles.Inactive = cxStyle208 - Styles.Selection = cxStyle201 - Styles.Footer = cxStyle199 - Styles.Group = cxStyle207 - Styles.GroupByBox = cxStyle202 - Styles.Header = cxStyle200 - Styles.Indicator = cxStyle209 - Styles.Preview = cxStyle203 - BuiltIn = True - end - object GridBandedTableViewStyleSheetStormVGA: TcxGridBandedTableViewStyleSheet - Caption = 'Storm (VGA)' - Styles.Content = cxStyle204 - Styles.ContentEven = cxStyle205 - Styles.ContentOdd = cxStyle206 - Styles.Inactive = cxStyle208 - Styles.Selection = cxStyle201 - Styles.Footer = cxStyle199 - Styles.Group = cxStyle207 - Styles.GroupByBox = cxStyle202 - Styles.Header = cxStyle200 - Styles.Indicator = cxStyle209 - Styles.Preview = cxStyle203 - Styles.BandHeader = cxStyle200 - BuiltIn = True - end - object GridCardViewStyleSheetStormVGA: TcxGridCardViewStyleSheet - Caption = 'Storm (VGA)' - Styles.Content = cxStyle204 - Styles.ContentEven = cxStyle205 - Styles.ContentOdd = cxStyle206 - Styles.Inactive = cxStyle208 - Styles.Selection = cxStyle201 - Styles.CaptionRow = cxStyle200 - Styles.RowCaption = cxStyle200 - BuiltIn = True - end - object GridTableViewStyleSheetTealVGA: TcxGridTableViewStyleSheet - Caption = 'Teal (VGA)' - Styles.Content = cxStyle215 - Styles.ContentEven = cxStyle216 - Styles.ContentOdd = cxStyle217 - Styles.Inactive = cxStyle219 - Styles.Selection = cxStyle212 - Styles.Footer = cxStyle210 - Styles.Group = cxStyle218 - Styles.GroupByBox = cxStyle213 - Styles.Header = cxStyle211 - Styles.Indicator = cxStyle220 - Styles.Preview = cxStyle214 - BuiltIn = True - end - object GridBandedTableViewStyleSheetTealVGA: TcxGridBandedTableViewStyleSheet - Caption = 'Teal (VGA)' - Styles.Content = cxStyle215 - Styles.ContentEven = cxStyle216 - Styles.ContentOdd = cxStyle217 - Styles.Inactive = cxStyle219 - Styles.Selection = cxStyle212 - Styles.Footer = cxStyle210 - Styles.Group = cxStyle218 - Styles.GroupByBox = cxStyle213 - Styles.Header = cxStyle211 - Styles.Indicator = cxStyle220 - Styles.Preview = cxStyle214 - Styles.BandHeader = cxStyle211 - BuiltIn = True - end - object GridCardViewStyleSheetTealVGA: TcxGridCardViewStyleSheet - Caption = 'Teal (VGA)' - Styles.Content = cxStyle215 - Styles.ContentEven = cxStyle216 - Styles.ContentOdd = cxStyle217 - Styles.Inactive = cxStyle219 - Styles.Selection = cxStyle212 - Styles.CaptionRow = cxStyle211 - Styles.CardBorder = cxStyle364 - Styles.RowCaption = cxStyle211 - BuiltIn = True - end - object GridTableViewStyleSheetWheat: TcxGridTableViewStyleSheet - Caption = 'Wheat' - Styles.Content = cxStyle226 - Styles.ContentEven = cxStyle227 - Styles.ContentOdd = cxStyle228 - Styles.Inactive = cxStyle230 - Styles.Selection = cxStyle223 - Styles.Footer = cxStyle221 - Styles.Group = cxStyle229 - Styles.GroupByBox = cxStyle224 - Styles.Header = cxStyle222 - Styles.Indicator = cxStyle231 - Styles.Preview = cxStyle225 - BuiltIn = True - end - object GridBandedTableViewStyleSheetWheat: TcxGridBandedTableViewStyleSheet - Caption = 'Wheat' - Styles.Content = cxStyle226 - Styles.ContentEven = cxStyle227 - Styles.ContentOdd = cxStyle228 - Styles.Inactive = cxStyle230 - Styles.Selection = cxStyle223 - Styles.Footer = cxStyle221 - Styles.Group = cxStyle229 - Styles.GroupByBox = cxStyle224 - Styles.Header = cxStyle222 - Styles.Indicator = cxStyle231 - Styles.Preview = cxStyle225 - Styles.BandHeader = cxStyle222 - BuiltIn = True - end - object GridCardViewStyleSheetWheat: TcxGridCardViewStyleSheet - Caption = 'Wheat' - Styles.Content = cxStyle226 - Styles.ContentEven = cxStyle227 - Styles.ContentOdd = cxStyle228 - Styles.Inactive = cxStyle230 - Styles.Selection = cxStyle223 - Styles.CaptionRow = cxStyle222 - Styles.RowCaption = cxStyle222 - BuiltIn = True - end - object GridTableViewStyleSheetWindowsClassic: TcxGridTableViewStyleSheet - Caption = 'Windows Classic' - Styles.Content = cxStyle237 - Styles.ContentEven = cxStyle238 - Styles.ContentOdd = cxStyle239 - Styles.Inactive = cxStyle241 - Styles.Selection = cxStyle234 - Styles.Footer = cxStyle232 - Styles.Group = cxStyle240 - Styles.GroupByBox = cxStyle235 - Styles.Header = cxStyle233 - Styles.Indicator = cxStyle242 - Styles.Preview = cxStyle236 - BuiltIn = True - end - object GridBandedTableViewStyleSheetWindowsClassic: TcxGridBandedTableViewStyleSheet - Caption = 'Windows Classic' - Styles.Content = cxStyle237 - Styles.ContentEven = cxStyle238 - Styles.ContentOdd = cxStyle239 - Styles.Inactive = cxStyle241 - Styles.Selection = cxStyle234 - Styles.Footer = cxStyle232 - Styles.Group = cxStyle240 - Styles.GroupByBox = cxStyle235 - Styles.Header = cxStyle233 - Styles.Indicator = cxStyle242 - Styles.Preview = cxStyle236 - Styles.BandHeader = cxStyle233 - BuiltIn = True - end - object GridCardViewStyleSheetWindowsClassic: TcxGridCardViewStyleSheet - Caption = 'Windows Classic' - Styles.Content = cxStyle237 - Styles.ContentEven = cxStyle238 - Styles.ContentOdd = cxStyle239 - Styles.Inactive = cxStyle241 - Styles.Selection = cxStyle234 - Styles.CaptionRow = cxStyle233 - Styles.RowCaption = cxStyle233 - BuiltIn = True - end - object GridTableViewStyleSheetWindowsClassiclarge: TcxGridTableViewStyleSheet - Caption = 'Windows Classic (large)' - Styles.Content = cxStyle248 - Styles.ContentEven = cxStyle249 - Styles.ContentOdd = cxStyle250 - Styles.Inactive = cxStyle252 - Styles.Selection = cxStyle245 - Styles.Footer = cxStyle243 - Styles.Group = cxStyle251 - Styles.GroupByBox = cxStyle246 - Styles.Header = cxStyle244 - Styles.Indicator = cxStyle253 - Styles.Preview = cxStyle247 - BuiltIn = True - end - object GridBandedTableViewStyleSheetWindowsClassiclarge: TcxGridBandedTableViewStyleSheet - Caption = 'Windows Classic (large)' - Styles.Content = cxStyle248 - Styles.ContentEven = cxStyle249 - Styles.ContentOdd = cxStyle250 - Styles.Inactive = cxStyle252 - Styles.Selection = cxStyle245 - Styles.Footer = cxStyle243 - Styles.Group = cxStyle251 - Styles.GroupByBox = cxStyle246 - Styles.Header = cxStyle244 - Styles.Indicator = cxStyle253 - Styles.Preview = cxStyle247 - Styles.BandHeader = cxStyle244 - BuiltIn = True - end - object GridCardViewStyleSheetWindowsClassiclarge: TcxGridCardViewStyleSheet - Caption = 'Windows Classic (large)' - Styles.Content = cxStyle248 - Styles.ContentEven = cxStyle249 - Styles.ContentOdd = cxStyle250 - Styles.Inactive = cxStyle252 - Styles.Selection = cxStyle245 - Styles.CaptionRow = cxStyle244 - Styles.RowCaption = cxStyle244 - BuiltIn = True - end - object GridTableViewStyleSheetWindowsStandard: TcxGridTableViewStyleSheet - Caption = 'Windows Standard' - Styles.Content = cxStyle259 - Styles.ContentEven = cxStyle260 - Styles.ContentOdd = cxStyle261 - Styles.Inactive = cxStyle263 - Styles.Selection = cxStyle256 - Styles.Footer = cxStyle254 - Styles.Group = cxStyle262 - Styles.GroupByBox = cxStyle257 - Styles.Header = cxStyle255 - Styles.Indicator = cxStyle264 - Styles.Preview = cxStyle258 - BuiltIn = True - end - object GridBandedTableViewStyleSheetWindowsStandard: TcxGridBandedTableViewStyleSheet - Caption = 'Windows Standard' - Styles.Content = cxStyle259 - Styles.ContentEven = cxStyle260 - Styles.ContentOdd = cxStyle261 - Styles.Inactive = cxStyle263 - Styles.Selection = cxStyle256 - Styles.Footer = cxStyle254 - Styles.Group = cxStyle262 - Styles.GroupByBox = cxStyle257 - Styles.Header = cxStyle255 - Styles.Indicator = cxStyle264 - Styles.Preview = cxStyle258 - Styles.BandHeader = cxStyle255 - BuiltIn = True - end - object GridCardViewStyleSheetWindowsStandard: TcxGridCardViewStyleSheet - Caption = 'Windows Standard' - Styles.Content = cxStyle259 - Styles.ContentEven = cxStyle260 - Styles.ContentOdd = cxStyle261 - Styles.Inactive = cxStyle263 - Styles.Selection = cxStyle256 - Styles.CaptionRow = cxStyle255 - Styles.CardBorder = cxStyle365 - Styles.RowCaption = cxStyle255 - BuiltIn = True - end - object GridTableViewStyleSheetWindowsStandardlarge: TcxGridTableViewStyleSheet - Caption = 'Windows Standard (large)' - Styles.Content = cxStyle270 - Styles.ContentEven = cxStyle271 - Styles.ContentOdd = cxStyle272 - Styles.Inactive = cxStyle274 - Styles.Selection = cxStyle267 - Styles.Footer = cxStyle265 - Styles.Group = cxStyle273 - Styles.GroupByBox = cxStyle268 - Styles.Header = cxStyle266 - Styles.Indicator = cxStyle275 - Styles.Preview = cxStyle269 - BuiltIn = True - end - object GridBandedTableViewStyleSheetWindowsStandardlarge: TcxGridBandedTableViewStyleSheet - Caption = 'Windows Standard (large)' - Styles.Content = cxStyle270 - Styles.ContentEven = cxStyle271 - Styles.ContentOdd = cxStyle272 - Styles.Inactive = cxStyle274 - Styles.Selection = cxStyle267 - Styles.Footer = cxStyle265 - Styles.Group = cxStyle273 - Styles.GroupByBox = cxStyle268 - Styles.Header = cxStyle266 - Styles.Indicator = cxStyle275 - Styles.Preview = cxStyle269 - Styles.BandHeader = cxStyle266 - BuiltIn = True - end - object GridCardViewStyleSheetWindowsStandardlarge: TcxGridCardViewStyleSheet - Caption = 'Windows Standard (large)' - Styles.Content = cxStyle270 - Styles.ContentEven = cxStyle271 - Styles.ContentOdd = cxStyle272 - Styles.Inactive = cxStyle274 - Styles.Selection = cxStyle267 - Styles.CaptionRow = cxStyle266 - Styles.CardBorder = cxStyle366 - Styles.RowCaption = cxStyle266 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrast1: TcxGridTableViewStyleSheet - Caption = 'High Contrast #1' - Styles.Content = cxStyle281 - Styles.ContentEven = cxStyle282 - Styles.ContentOdd = cxStyle283 - Styles.Inactive = cxStyle285 - Styles.Selection = cxStyle278 - Styles.Footer = cxStyle276 - Styles.Group = cxStyle284 - Styles.GroupByBox = cxStyle279 - Styles.Header = cxStyle277 - Styles.Indicator = cxStyle286 - Styles.Preview = cxStyle280 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrast1: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast #1' - Styles.Content = cxStyle281 - Styles.ContentEven = cxStyle282 - Styles.ContentOdd = cxStyle283 - Styles.Inactive = cxStyle285 - Styles.Selection = cxStyle278 - Styles.Footer = cxStyle276 - Styles.Group = cxStyle284 - Styles.GroupByBox = cxStyle279 - Styles.Header = cxStyle277 - Styles.Indicator = cxStyle286 - Styles.Preview = cxStyle280 - Styles.BandHeader = cxStyle286 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrast1: TcxGridCardViewStyleSheet - Caption = 'High Contrast #1' - Styles.Content = cxStyle281 - Styles.ContentEven = cxStyle282 - Styles.ContentOdd = cxStyle283 - Styles.Inactive = cxStyle285 - Styles.Selection = cxStyle278 - Styles.CaptionRow = cxStyle277 - Styles.RowCaption = cxStyle277 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrast1large: TcxGridTableViewStyleSheet - Caption = 'High Contrast #1 (large)' - Styles.Content = cxStyle292 - Styles.ContentEven = cxStyle293 - Styles.ContentOdd = cxStyle294 - Styles.Inactive = cxStyle296 - Styles.Selection = cxStyle289 - Styles.Footer = cxStyle287 - Styles.Group = cxStyle295 - Styles.GroupByBox = cxStyle290 - Styles.Header = cxStyle288 - Styles.Indicator = cxStyle297 - Styles.Preview = cxStyle291 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrast1large: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast #1 (large)' - Styles.Content = cxStyle292 - Styles.ContentEven = cxStyle293 - Styles.ContentOdd = cxStyle294 - Styles.Inactive = cxStyle296 - Styles.Selection = cxStyle289 - Styles.Footer = cxStyle287 - Styles.Group = cxStyle295 - Styles.GroupByBox = cxStyle290 - Styles.Header = cxStyle288 - Styles.Indicator = cxStyle297 - Styles.Preview = cxStyle291 - Styles.BandHeader = cxStyle297 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrast1large: TcxGridCardViewStyleSheet - Caption = 'High Contrast #1 (large)' - Styles.Content = cxStyle292 - Styles.ContentEven = cxStyle293 - Styles.ContentOdd = cxStyle294 - Styles.Inactive = cxStyle296 - Styles.Selection = cxStyle289 - Styles.CaptionRow = cxStyle288 - Styles.RowCaption = cxStyle288 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrast2: TcxGridTableViewStyleSheet - Caption = 'High Contrast #2' - Styles.Content = cxStyle303 - Styles.ContentEven = cxStyle304 - Styles.ContentOdd = cxStyle305 - Styles.Inactive = cxStyle307 - Styles.Selection = cxStyle300 - Styles.Footer = cxStyle298 - Styles.Group = cxStyle306 - Styles.GroupByBox = cxStyle301 - Styles.Header = cxStyle299 - Styles.Indicator = cxStyle308 - Styles.Preview = cxStyle302 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrast2: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast #2' - Styles.Content = cxStyle303 - Styles.ContentEven = cxStyle304 - Styles.ContentOdd = cxStyle305 - Styles.Inactive = cxStyle307 - Styles.Selection = cxStyle300 - Styles.Footer = cxStyle298 - Styles.Group = cxStyle306 - Styles.GroupByBox = cxStyle301 - Styles.Header = cxStyle299 - Styles.Indicator = cxStyle308 - Styles.Preview = cxStyle302 - Styles.BandHeader = cxStyle308 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrast2: TcxGridCardViewStyleSheet - Caption = 'High Contrast #2' - Styles.Content = cxStyle303 - Styles.ContentEven = cxStyle304 - Styles.ContentOdd = cxStyle305 - Styles.Inactive = cxStyle307 - Styles.Selection = cxStyle300 - Styles.CaptionRow = cxStyle299 - Styles.RowCaption = cxStyle299 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrast2large: TcxGridTableViewStyleSheet - Caption = 'High Contrast #2 (large)' - Styles.Content = cxStyle314 - Styles.ContentEven = cxStyle315 - Styles.ContentOdd = cxStyle316 - Styles.Inactive = cxStyle318 - Styles.Selection = cxStyle311 - Styles.Footer = cxStyle309 - Styles.Group = cxStyle317 - Styles.GroupByBox = cxStyle312 - Styles.Header = cxStyle310 - Styles.Indicator = cxStyle319 - Styles.Preview = cxStyle313 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrast2large: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast #2 (large)' - Styles.Content = cxStyle314 - Styles.ContentEven = cxStyle315 - Styles.ContentOdd = cxStyle316 - Styles.Inactive = cxStyle318 - Styles.Selection = cxStyle311 - Styles.Footer = cxStyle309 - Styles.Group = cxStyle317 - Styles.GroupByBox = cxStyle312 - Styles.Header = cxStyle310 - Styles.Indicator = cxStyle319 - Styles.Preview = cxStyle313 - Styles.BandHeader = cxStyle319 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrast2large: TcxGridCardViewStyleSheet - Caption = 'High Contrast #2 (large)' - Styles.Content = cxStyle314 - Styles.ContentEven = cxStyle315 - Styles.ContentOdd = cxStyle316 - Styles.Inactive = cxStyle318 - Styles.Selection = cxStyle311 - Styles.CaptionRow = cxStyle310 - Styles.RowCaption = cxStyle310 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrastBlack: TcxGridTableViewStyleSheet - Caption = 'High Contrast Black' - Styles.Content = cxStyle325 - Styles.ContentEven = cxStyle326 - Styles.ContentOdd = cxStyle327 - Styles.Inactive = cxStyle329 - Styles.Selection = cxStyle322 - Styles.Footer = cxStyle320 - Styles.Group = cxStyle328 - Styles.GroupByBox = cxStyle323 - Styles.Header = cxStyle321 - Styles.Indicator = cxStyle330 - Styles.Preview = cxStyle324 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrastBlack: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast Black' - Styles.Content = cxStyle325 - Styles.ContentEven = cxStyle326 - Styles.ContentOdd = cxStyle327 - Styles.Inactive = cxStyle329 - Styles.Selection = cxStyle322 - Styles.Footer = cxStyle320 - Styles.Group = cxStyle328 - Styles.GroupByBox = cxStyle323 - Styles.Header = cxStyle321 - Styles.Indicator = cxStyle330 - Styles.Preview = cxStyle324 - Styles.BandHeader = cxStyle330 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrastBlack: TcxGridCardViewStyleSheet - Caption = 'High Contrast Black' - Styles.Content = cxStyle325 - Styles.ContentEven = cxStyle326 - Styles.ContentOdd = cxStyle327 - Styles.Inactive = cxStyle329 - Styles.Selection = cxStyle322 - Styles.CaptionRow = cxStyle321 - Styles.RowCaption = cxStyle321 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrastBlacklarge: TcxGridTableViewStyleSheet - Caption = 'High Contrast Black (large)' - Styles.Content = cxStyle336 - Styles.ContentEven = cxStyle337 - Styles.ContentOdd = cxStyle338 - Styles.Inactive = cxStyle340 - Styles.Selection = cxStyle333 - Styles.Footer = cxStyle331 - Styles.Group = cxStyle339 - Styles.GroupByBox = cxStyle334 - Styles.Header = cxStyle332 - Styles.Indicator = cxStyle341 - Styles.Preview = cxStyle335 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrastBlacklarge: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast Black (large)' - Styles.Content = cxStyle336 - Styles.ContentEven = cxStyle337 - Styles.ContentOdd = cxStyle338 - Styles.Inactive = cxStyle340 - Styles.Selection = cxStyle333 - Styles.Footer = cxStyle331 - Styles.Group = cxStyle339 - Styles.GroupByBox = cxStyle334 - Styles.Header = cxStyle332 - Styles.Indicator = cxStyle341 - Styles.Preview = cxStyle335 - Styles.BandHeader = cxStyle341 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrastBlacklarge: TcxGridCardViewStyleSheet - Caption = 'High Contrast Black (large)' - Styles.Content = cxStyle336 - Styles.ContentEven = cxStyle337 - Styles.ContentOdd = cxStyle338 - Styles.Inactive = cxStyle340 - Styles.Selection = cxStyle333 - Styles.CaptionRow = cxStyle332 - Styles.RowCaption = cxStyle332 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrastWhite: TcxGridTableViewStyleSheet - Caption = 'High Contrast White' - Styles.Content = cxStyle347 - Styles.ContentEven = cxStyle348 - Styles.ContentOdd = cxStyle349 - Styles.Inactive = cxStyle351 - Styles.Selection = cxStyle344 - Styles.Footer = cxStyle342 - Styles.Group = cxStyle350 - Styles.GroupByBox = cxStyle345 - Styles.Header = cxStyle343 - Styles.Indicator = cxStyle352 - Styles.Preview = cxStyle346 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrastWhite: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast White' - Styles.Content = cxStyle347 - Styles.ContentEven = cxStyle348 - Styles.ContentOdd = cxStyle349 - Styles.Inactive = cxStyle351 - Styles.Selection = cxStyle344 - Styles.Footer = cxStyle342 - Styles.Group = cxStyle350 - Styles.GroupByBox = cxStyle345 - Styles.Header = cxStyle343 - Styles.Indicator = cxStyle352 - Styles.Preview = cxStyle346 - Styles.BandHeader = cxStyle343 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrastWhite: TcxGridCardViewStyleSheet - Caption = 'High Contrast White' - Styles.Content = cxStyle347 - Styles.ContentEven = cxStyle348 - Styles.ContentOdd = cxStyle349 - Styles.Inactive = cxStyle351 - Styles.Selection = cxStyle344 - Styles.CaptionRow = cxStyle343 - Styles.RowCaption = cxStyle343 - BuiltIn = True - end - object GridTableViewStyleSheetHighContrastWhitelarge: TcxGridTableViewStyleSheet - Caption = 'High Contrast White (large)' - Styles.Content = cxStyle358 - Styles.ContentEven = cxStyle359 - Styles.ContentOdd = cxStyle360 - Styles.Inactive = cxStyle362 - Styles.Selection = cxStyle355 - Styles.Footer = cxStyle353 - Styles.Group = cxStyle361 - Styles.GroupByBox = cxStyle356 - Styles.Header = cxStyle354 - Styles.Indicator = cxStyle363 - Styles.Preview = cxStyle357 - BuiltIn = True - end - object GridBandedTableViewStyleSheetHighContrastWhitelarge: TcxGridBandedTableViewStyleSheet - Caption = 'High Contrast White (large)' - Styles.Content = cxStyle358 - Styles.ContentEven = cxStyle359 - Styles.ContentOdd = cxStyle360 - Styles.Inactive = cxStyle362 - Styles.Selection = cxStyle355 - Styles.Footer = cxStyle353 - Styles.Group = cxStyle361 - Styles.GroupByBox = cxStyle356 - Styles.Header = cxStyle354 - Styles.Indicator = cxStyle363 - Styles.Preview = cxStyle357 - Styles.BandHeader = cxStyle354 - BuiltIn = True - end - object GridCardViewStyleSheetHighContrastWhitelarge: TcxGridCardViewStyleSheet - Caption = 'High Contrast White (large)' - Styles.Content = cxStyle358 - Styles.ContentEven = cxStyle359 - Styles.ContentOdd = cxStyle360 - Styles.Inactive = cxStyle362 - Styles.Selection = cxStyle355 - Styles.CaptionRow = cxStyle354 - Styles.RowCaption = cxStyle354 - BuiltIn = True - end - end -end diff --git a/internal/x.46/Lib/D11/cxGridReg.dcu b/internal/x.46/Lib/D11/cxGridReg.dcu deleted file mode 100644 index 7a769f19..00000000 Binary files a/internal/x.46/Lib/D11/cxGridReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridRows.dcu b/internal/x.46/Lib/D11/cxGridRows.dcu deleted file mode 100644 index 0a26de71..00000000 Binary files a/internal/x.46/Lib/D11/cxGridRows.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridStdPopupMenu.dcu b/internal/x.46/Lib/D11/cxGridStdPopupMenu.dcu deleted file mode 100644 index bb898eb8..00000000 Binary files a/internal/x.46/Lib/D11/cxGridStdPopupMenu.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridStrs.dcu b/internal/x.46/Lib/D11/cxGridStrs.dcu deleted file mode 100644 index cc1d74f7..00000000 Binary files a/internal/x.46/Lib/D11/cxGridStrs.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridStructureNavigator.dcu b/internal/x.46/Lib/D11/cxGridStructureNavigator.dcu deleted file mode 100644 index 25a52430..00000000 Binary files a/internal/x.46/Lib/D11/cxGridStructureNavigator.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridStyleSheetsPreview.dcu b/internal/x.46/Lib/D11/cxGridStyleSheetsPreview.dcu deleted file mode 100644 index 97466c94..00000000 Binary files a/internal/x.46/Lib/D11/cxGridStyleSheetsPreview.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridTableView.dcu b/internal/x.46/Lib/D11/cxGridTableView.dcu deleted file mode 100644 index 68c5e783..00000000 Binary files a/internal/x.46/Lib/D11/cxGridTableView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridUIBandedTableHelper.dcu b/internal/x.46/Lib/D11/cxGridUIBandedTableHelper.dcu deleted file mode 100644 index 4685d48f..00000000 Binary files a/internal/x.46/Lib/D11/cxGridUIBandedTableHelper.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridUICardHelper.dcu b/internal/x.46/Lib/D11/cxGridUICardHelper.dcu deleted file mode 100644 index c05d9e8d..00000000 Binary files a/internal/x.46/Lib/D11/cxGridUICardHelper.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridUICustomTableHelper.dcu b/internal/x.46/Lib/D11/cxGridUICustomTableHelper.dcu deleted file mode 100644 index 08f67922..00000000 Binary files a/internal/x.46/Lib/D11/cxGridUICustomTableHelper.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridUIHelper.dcu b/internal/x.46/Lib/D11/cxGridUIHelper.dcu deleted file mode 100644 index 2f3c5c4c..00000000 Binary files a/internal/x.46/Lib/D11/cxGridUIHelper.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridUITableHelper.dcu b/internal/x.46/Lib/D11/cxGridUITableHelper.dcu deleted file mode 100644 index 139fd9d3..00000000 Binary files a/internal/x.46/Lib/D11/cxGridUITableHelper.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridVer.inc b/internal/x.46/Lib/D11/cxGridVer.inc deleted file mode 100644 index b2c3e840..00000000 --- a/internal/x.46/Lib/D11/cxGridVer.inc +++ /dev/null @@ -1 +0,0 @@ -{$DEFINE USETABCONTROL} diff --git a/internal/x.46/Lib/D11/cxGridViewLayoutEditor.dcu b/internal/x.46/Lib/D11/cxGridViewLayoutEditor.dcu deleted file mode 100644 index 49f8e3ba..00000000 Binary files a/internal/x.46/Lib/D11/cxGridViewLayoutEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxGridViewLayoutEditor.dfm b/internal/x.46/Lib/D11/cxGridViewLayoutEditor.dfm deleted file mode 100644 index f4520c95..00000000 --- a/internal/x.46/Lib/D11/cxGridViewLayoutEditor.dfm +++ /dev/null @@ -1,110 +0,0 @@ -object cxGridViewLayoutEditor: TcxGridViewLayoutEditor - Left = 350 - Top = 204 - BorderIcons = [biSystemMenu] - Caption = 'Layout and Data Editor' - ClientHeight = 466 - ClientWidth = 692 - Color = clBtnFace - ParentFont = True - OldCreateOrder = False - Position = poScreenCenter - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object pnlBottom: TPanel - Left = 0 - Top = 432 - Width = 692 - Height = 34 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - object pnlButtons: TPanel - Left = 523 - Top = 0 - Width = 169 - Height = 34 - Align = alRight - BevelOuter = bvNone - TabOrder = 2 - object btnOK: TcxButton - Left = 4 - Top = 5 - Width = 75 - Height = 24 - Caption = 'OK' - ModalResult = 1 - TabOrder = 0 - end - object btnCancel: TcxButton - Left = 89 - Top = 5 - Width = 75 - Height = 24 - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - end - object pnlLayoutCustomization: TPanel - Left = 0 - Top = 0 - Width = 153 - Height = 34 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object btnLayoutCustomization: TcxButton - Left = 8 - Top = 5 - Width = 134 - Height = 24 - TabOrder = 0 - OnClick = btnLayoutCustomizationClick - end - end - object pnlSaveOptions: TPanel - Left = 153 - Top = 0 - Width = 192 - Height = 34 - Align = alLeft - BevelOuter = bvNone - TabOrder = 1 - object chbSaveLayout: TcxCheckBox - Left = 11 - Top = 7 - Caption = 'Save layout' - State = cbsChecked - TabOrder = 0 - Width = 81 - end - object chbSaveData: TcxCheckBox - Left = 107 - Top = 7 - Caption = 'Save data' - State = cbsChecked - TabOrder = 1 - Width = 81 - end - end - end - object pnlClient: TPanel - Left = 0 - Top = 0 - Width = 692 - Height = 432 - Align = alClient - BevelOuter = bvNone - BorderWidth = 3 - Constraints.MinHeight = 200 - Constraints.MinWidth = 300 - TabOrder = 1 - end - object pmGrid: TcxGridPopupMenu - PopupMenus = <> - Left = 400 - Top = 319 - end -end diff --git a/internal/x.46/Lib/D11/cxGroupBox.dcu b/internal/x.46/Lib/D11/cxGroupBox.dcu deleted file mode 100644 index 4b151b57..00000000 Binary files a/internal/x.46/Lib/D11/cxGroupBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxHeader.dcu b/internal/x.46/Lib/D11/cxHeader.dcu deleted file mode 100644 index 37bc805c..00000000 Binary files a/internal/x.46/Lib/D11/cxHeader.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxHint.dcu b/internal/x.46/Lib/D11/cxHint.dcu deleted file mode 100644 index e692b4d7..00000000 Binary files a/internal/x.46/Lib/D11/cxHint.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxHintEditor.dcu b/internal/x.46/Lib/D11/cxHintEditor.dcu deleted file mode 100644 index bf31fc26..00000000 Binary files a/internal/x.46/Lib/D11/cxHintEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxHintEditor.dfm b/internal/x.46/Lib/D11/cxHintEditor.dfm deleted file mode 100644 index 9978878d..00000000 --- a/internal/x.46/Lib/D11/cxHintEditor.dfm +++ /dev/null @@ -1,582 +0,0 @@ -object cxHintStyleEditor: TcxHintStyleEditor - Left = 195 - Top = 125 - BorderStyle = bsDialog - ClientHeight = 440 - ClientWidth = 576 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - ShowHint = True - OnActivate = FormActivate - OnCreate = FormCreate - OnDestroy = FormDestroy - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object lblHintColour: TLabel - Left = 8 - Top = 412 - Width = 46 - Height = 13 - Caption = 'Hint Color' - end - object cxBtnOk: TcxButton - Left = 415 - Top = 408 - Width = 75 - Height = 25 - Hint = 'Accept you changes and return to the Grep Demo' - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 9 - end - object cxBtnCancel: TcxButton - Left = 495 - Top = 408 - Width = 75 - Height = 25 - Hint = 'Discard your changes and return to the grep demo' - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 10 - end - object cxCbStandard: TcxCheckBox - Left = 304 - Top = 408 - Width = 105 - Height = 21 - Hint = 'Check to display hints in the standard Windows way' - Properties.DisplayUnchecked = 'False' - Properties.Caption = 'Standard Hints' - TabOrder = 7 - OnClick = cxCbStandardClick - end - object cxGbHintFont: TcxGroupBox - Left = 8 - Top = 8 - Width = 185 - Height = 185 - Alignment = alTopLeft - Caption = ' Hint Font ' - TabOrder = 0 - object Label1: TLabel - Left = 12 - Top = 80 - Width = 23 - Height = 13 - Caption = 'Style' - end - object Label2: TLabel - Left = 124 - Top = 80 - Width = 20 - Height = 13 - Caption = 'Size' - end - object Label3: TLabel - Left = 12 - Top = 40 - Width = 24 - Height = 13 - Caption = 'Color' - end - object cxFnHint: TcxFontNameComboBox - Left = 12 - Top = 16 - Width = 161 - Height = 21 - Hint = 'Font for the hint windows' - Properties.FontPreview.Visible = False - Properties.OnChange = cxFnHintPropertiesChange - TabOrder = 0 - OnClick = cxFnHintClick - end - object cxClbHintFontStyles: TcxCheckListBox - Left = 12 - Top = 96 - Width = 105 - Height = 81 - Hint = 'Font Style for Hints' - Columns = 0 - EditValue = 0 - Items = < - item - Tag = 0 - Text = 'Bold' - end - item - Tag = 0 - Text = 'Italics' - end - item - Tag = 0 - Text = 'Underline' - end - item - Tag = 0 - Text = 'Strike Thro' - end> - ParentColor = False - ScrollWidth = 0 - TabOrder = 2 - TabWidth = 0 - OnClickCheck = cxClbHintFontStylesClickCheck - end - object cxLbHfSize: TcxListBox - Left = 124 - Top = 96 - Width = 49 - Height = 81 - Hint = 'Font Size for Hints' - ExtendedSelect = False - ItemHeight = 13 - ParentColor = False - TabOrder = 3 - OnClick = cxLbHfSizeClick - end - object cxCcbHintFontColour: TcxColorComboBox - Left = 12 - Top = 56 - Width = 161 - Height = 21 - Properties.DefaultDescription = 'Color not selected' - Properties.Items = <> - Properties.PrepareInfo = '' - TabOrder = 1 - OnClick = cxCcbHintFontColourClick - end - end - object cxgbHintCapFont: TcxGroupBox - Left = 200 - Top = 8 - Width = 185 - Height = 185 - Alignment = alTopLeft - Caption = ' Hint Caption Font ' - TabOrder = 1 - object Label4: TLabel - Left = 12 - Top = 80 - Width = 23 - Height = 13 - Caption = 'Style' - end - object Label5: TLabel - Left = 124 - Top = 80 - Width = 20 - Height = 13 - Caption = 'Size' - end - object Label6: TLabel - Left = 12 - Top = 40 - Width = 24 - Height = 13 - Caption = 'Color' - end - object cxFnHinCap: TcxFontNameComboBox - Left = 12 - Top = 16 - Width = 161 - Height = 21 - Hint = 'Font for the hint windows' - Properties.FontPreview.Visible = False - Properties.OnChange = cxFnHinCapPropertiesChange - TabOrder = 0 - OnClick = cxFnHinCapClick - end - object cxClbHintCapFontStyles: TcxCheckListBox - Tag = 1 - Left = 12 - Top = 96 - Width = 105 - Height = 81 - Hint = 'Font Style for Hint Captions' - Columns = 0 - EditValue = 0 - Items = < - item - Tag = 0 - Text = 'Bold' - end - item - Tag = 0 - Text = 'Italics' - end - item - Tag = 0 - Text = 'Underline' - end - item - Tag = 0 - Text = 'Strike Thro' - end> - ParentColor = False - ScrollWidth = 0 - TabOrder = 2 - TabWidth = 0 - OnClickCheck = cxClbHintFontStylesClickCheck - end - object cxLbHcfSize: TcxListBox - Left = 124 - Top = 96 - Width = 49 - Height = 81 - Hint = 'Font Size for Hint Caption' - ItemHeight = 13 - ParentColor = False - TabOrder = 3 - OnClick = cxLbHcfSizeClick - end - object cxCcbHintCapColor: TcxColorComboBox - Left = 12 - Top = 56 - Width = 161 - Height = 21 - Properties.DefaultDescription = 'Color not selected' - Properties.Items = <> - Properties.PrepareInfo = '' - TabOrder = 1 - OnClick = cxCcbHintCapColorClick - end - end - object cxGbHintShape: TcxGroupBox - Left = 392 - Top = 8 - Width = 177 - Height = 89 - Alignment = alTopLeft - Caption = ' Shape ' - ParentFont = False - TabOrder = 2 - object Label7: TLabel - Left = 8 - Top = 14 - Width = 72 - Height = 13 - Caption = 'Callout Position' - end - object Label8: TLabel - Left = 8 - Top = 64 - Width = 68 - Height = 13 - Caption = 'Round Radius' - end - object cxCbHintCalloutPos: TcxComboBox - Left = 8 - Top = 32 - Width = 161 - Height = 21 - Hint = 'The '#39'Callout'#39' position' - Properties.DropDownListStyle = lsFixedList - Properties.Items.Strings = ( - 'None' - 'Auto' - 'Left Bottom' - 'Left Top' - 'Top Left' - 'Top Right' - 'Right Bottom' - 'Right Top' - 'Bottom Right' - 'Bottom Left') - TabOrder = 0 - OnClick = cxCbHintCalloutPosClick - end - object cxcbHintRounded: TcxCheckBox - Left = 96 - Top = 10 - Width = 75 - Height = 21 - Hint = 'Rounded corners on the hint windows' - ParentBackground = False - Properties.DisplayUnchecked = 'False' - Properties.OnChange = cxcbHintRoundedPropertiesChange - Properties.Caption = 'Rounded' - TabOrder = 1 - end - object cxSeHintRadius: TcxSpinEdit - Left = 88 - Top = 60 - Width = 81 - Height = 21 - Hint = 'Radius of the rounded corners if enabled' - Properties.MaxValue = 100 - Properties.MinValue = 5 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeHintRadiusPropertiesChange - TabOrder = 2 - Value = 11 - end - end - object cxGbHintIcons: TcxGroupBox - Left = 8 - Top = 200 - Width = 185 - Height = 97 - Alignment = alTopLeft - Caption = ' Icons ' - TabOrder = 4 - object Label11: TLabel - Left = 8 - Top = 16 - Width = 48 - Height = 13 - Caption = 'Icon Type' - end - object cxCbHintIconType: TcxComboBox - Left = 8 - Top = 32 - Width = 169 - Height = 21 - Hint = 'The Icon type that will be displayed in the hint window' - ParentFont = False - Properties.DropDownListStyle = lsFixedList - Properties.Items.Strings = ( - 'None' - 'Application' - 'Information' - 'Warning' - 'Error' - 'Question' - 'WinLogo' - 'CurrentApplication') - TabOrder = 0 - OnClick = cxCbHintIconTypeClick - end - object cxRbHIDef: TcxRadioButton - Left = 8 - Top = 64 - Width = 57 - Height = 17 - Hint = 'Default Icon Size' - Caption = 'Default' - TabOrder = 1 - OnClick = cxRbHIDefClick - ParentBackground = False - end - object cxRbHILarge: TcxRadioButton - Tag = 1 - Left = 72 - Top = 64 - Width = 49 - Height = 17 - Hint = 'Large Icon Size' - Caption = 'Large' - TabOrder = 2 - OnClick = cxRbHIDefClick - ParentBackground = False - end - object cxRbHISmall: TcxRadioButton - Tag = 2 - Left = 128 - Top = 64 - Width = 49 - Height = 17 - Hint = 'Small Icon Size' - Caption = 'Small' - TabOrder = 3 - OnClick = cxRbHIDefClick - ParentBackground = False - end - end - object cxGbHintPause: TcxGroupBox - Left = 8 - Top = 304 - Width = 185 - Height = 97 - Alignment = alTopLeft - Caption = ' Timings ' - TabOrder = 5 - object Label18: TLabel - Left = 8 - Top = 24 - Width = 77 - Height = 13 - Caption = 'Hint Hide Pause' - end - object Label19: TLabel - Left = 8 - Top = 48 - Width = 52 - Height = 13 - Caption = 'Hint Pause' - end - object Label20: TLabel - Left = 8 - Top = 72 - Width = 80 - Height = 13 - Caption = 'Hint Short Pause' - end - object cxSeHintHidePause: TcxSpinEdit - Left = 96 - Top = 20 - Width = 81 - Height = 21 - Hint = 'The animation delay' - Properties.Increment = 100 - Properties.LargeIncrement = 500 - Properties.MaxValue = 10000 - Properties.MinValue = 500 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeHintHidePausePropertiesChange - TabOrder = 0 - Value = 2500 - end - object cxSeHintPause: TcxSpinEdit - Left = 96 - Top = 44 - Width = 81 - Height = 21 - Hint = 'The animation delay' - Properties.Increment = 10 - Properties.LargeIncrement = 100 - Properties.MaxValue = 1000 - Properties.MinValue = 50 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeHintPausePropertiesChange - TabOrder = 1 - Value = 500 - end - object cxSeShortHintPause: TcxSpinEdit - Left = 96 - Top = 68 - Width = 81 - Height = 21 - Hint = 'The animation delay' - Properties.Increment = 5 - Properties.MaxValue = 1000 - Properties.MinValue = 10 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeHintDelayPropertiesChange - Properties.OnEditValueChanged = cxSeShortHintPausePropertiesEditValueChanged - TabOrder = 2 - Value = 50 - end - end - object cxCcbHintColour: TcxColorComboBox - Left = 72 - Top = 408 - Width = 225 - Height = 21 - Hint = 'Background Color for the hint windows' - Properties.AllowSelectColor = True - Properties.DefaultDescription = 'Color not selected' - Properties.ImmediatePost = True - Properties.OnEditValueChanged = cxCcbHintColourPropertiesEditValueChanged - Properties.Items = <> - Properties.PrepareInfo = '' - TabOrder = 6 - end - object cxGbHintAnimation: TcxGroupBox - Left = 392 - Top = 104 - Width = 177 - Height = 89 - Alignment = alTopLeft - Caption = ' Animation ' - TabOrder = 3 - object Label9: TLabel - Left = 8 - Top = 16 - Width = 72 - Height = 13 - Caption = 'Animation Style' - end - object Label10: TLabel - Left = 8 - Top = 64 - Width = 30 - Height = 13 - Caption = 'Delay ' - end - object cxCbHintAniStyle: TcxComboBox - Left = 8 - Top = 32 - Width = 161 - Height = 21 - Hint = 'The animation style used to display hints' - Properties.DropDownListStyle = lsFixedList - Properties.Items.Strings = ( - 'Slide From Left' - 'Slide From Right' - 'Slide Downward' - 'Slide Upward' - 'Slide From Center' - 'Hide' - 'Activate' - 'Fade In' - 'Auto' - 'None') - Properties.OnChange = cxCbHintAniStylePropertiesChange - TabOrder = 0 - end - object cxSeHintDelay: TcxSpinEdit - Left = 88 - Top = 60 - Width = 81 - Height = 21 - Hint = 'The animation delay' - Properties.MaxValue = 1000 - Properties.MinValue = 50 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeHintDelayPropertiesChange - TabOrder = 1 - Value = 100 - end - end - object cxGbPreview: TcxGroupBox - Left = 200 - Top = 200 - Width = 369 - Height = 201 - Alignment = alTopLeft - Caption = ' Preview ' - TabOrder = 8 - object pnlPreview: TPanel - Left = 2 - Top = 16 - Width = 365 - Height = 183 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - end - end - object cxHsc: TcxHintStyleController - Global = False - HintStyle.CaptionFont.Charset = DEFAULT_CHARSET - HintStyle.CaptionFont.Color = clWindowText - HintStyle.CaptionFont.Height = -13 - HintStyle.CaptionFont.Name = 'MS Sans Serif' - HintStyle.CaptionFont.Style = [fsBold] - HintStyle.Font.Charset = DEFAULT_CHARSET - HintStyle.Font.Color = clWindowText - HintStyle.Font.Height = -11 - HintStyle.Font.Name = 'MS Sans Serif' - HintStyle.Font.Style = [] - HintStyle.RoundRadius = 15 - HintPause = 700 - Left = 216 - Top = 216 - end - object cxEditStyleController1: TcxEditStyleController - Style.LookAndFeel.Kind = lfFlat - Style.LookAndFeel.NativeStyle = True - StyleDisabled.LookAndFeel.Kind = lfFlat - StyleDisabled.LookAndFeel.NativeStyle = True - StyleFocused.LookAndFeel.Kind = lfFlat - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.Kind = lfFlat - StyleHot.LookAndFeel.NativeStyle = True - Left = 216 - Top = 248 - end -end diff --git a/internal/x.46/Lib/D11/cxHtmlXmlTxtExport.dcu b/internal/x.46/Lib/D11/cxHtmlXmlTxtExport.dcu deleted file mode 100644 index bf52c8a4..00000000 Binary files a/internal/x.46/Lib/D11/cxHtmlXmlTxtExport.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxHyperLinkEdit.dcu b/internal/x.46/Lib/D11/cxHyperLinkEdit.dcu deleted file mode 100644 index 2c58f207..00000000 Binary files a/internal/x.46/Lib/D11/cxHyperLinkEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxIBXAdapters.dcu b/internal/x.46/Lib/D11/cxIBXAdapters.dcu deleted file mode 100644 index b2aa7263..00000000 Binary files a/internal/x.46/Lib/D11/cxIBXAdapters.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxIBXAdaptersD11.dcp b/internal/x.46/Lib/D11/cxIBXAdaptersD11.dcp deleted file mode 100644 index 48a089a8..00000000 Binary files a/internal/x.46/Lib/D11/cxIBXAdaptersD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxImage.dcu b/internal/x.46/Lib/D11/cxImage.dcu deleted file mode 100644 index ee59ed04..00000000 Binary files a/internal/x.46/Lib/D11/cxImage.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxImageComboBox.dcu b/internal/x.46/Lib/D11/cxImageComboBox.dcu deleted file mode 100644 index 2b92a5c3..00000000 Binary files a/internal/x.46/Lib/D11/cxImageComboBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxImageComboBoxItemsEditor.dcu b/internal/x.46/Lib/D11/cxImageComboBoxItemsEditor.dcu deleted file mode 100644 index 83309ff7..00000000 Binary files a/internal/x.46/Lib/D11/cxImageComboBoxItemsEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxImageComboBoxItemsEditor.dfm b/internal/x.46/Lib/D11/cxImageComboBoxItemsEditor.dfm deleted file mode 100644 index 81727b1d..00000000 --- a/internal/x.46/Lib/D11/cxImageComboBoxItemsEditor.dfm +++ /dev/null @@ -1,222 +0,0 @@ -object fmImageComboBoxItemsEditor: TfmImageComboBoxItemsEditor - Left = 287 - Top = 190 - AutoScroll = False - Caption = 'fmImageComboBoxItemsEditor' - ClientHeight = 266 - ClientWidth = 573 - Color = clBtnFace - Constraints.MinHeight = 300 - Constraints.MinWidth = 581 - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object Panel1: TPanel - Left = 480 - Top = 0 - Width = 93 - Height = 266 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object Bevel1: TBevel - Left = 0 - Top = 0 - Width = 6 - Height = 266 - Align = alLeft - Shape = bsLeftLine - end - object btnAdd: TcxButton - Left = 6 - Top = 12 - Width = 83 - Height = 22 - Anchors = [akTop, akRight] - Caption = '&Add' - TabOrder = 0 - OnClick = btnAddClick - LookAndFeel.NativeStyle = True - end - object btnDelete: TcxButton - Left = 6 - Top = 76 - Width = 83 - Height = 22 - Anchors = [akTop, akRight] - Caption = '&Delete' - TabOrder = 2 - OnClick = btnDeleteClick - LookAndFeel.NativeStyle = True - end - object btnInsert: TcxButton - Left = 6 - Top = 44 - Width = 83 - Height = 22 - Anchors = [akTop, akRight] - Caption = '&Insert' - TabOrder = 1 - OnClick = btnInsertClick - LookAndFeel.NativeStyle = True - end - object btnOk: TcxButton - Left = 6 - Top = 201 - Width = 83 - Height = 22 - Anchors = [akRight, akBottom] - Caption = '&OK' - ModalResult = 1 - TabOrder = 5 - OnClick = btnOkClick - LookAndFeel.NativeStyle = True - end - object btnCancel: TcxButton - Left = 6 - Top = 233 - Width = 83 - Height = 22 - Anchors = [akRight, akBottom] - Caption = '&Cancel' - ModalResult = 2 - TabOrder = 6 - LookAndFeel.NativeStyle = True - end - object btnSelectAll: TcxButton - Left = 6 - Top = 108 - Width = 83 - Height = 22 - Anchors = [akTop, akRight] - Caption = '&Select All' - TabOrder = 3 - OnClick = btnSelectAllClick - LookAndFeel.NativeStyle = True - end - object btnValueType: TcxButton - Left = 6 - Top = 140 - Width = 83 - Height = 22 - Anchors = [akTop, akRight] - Caption = 'Set Value&Type' - TabOrder = 4 - DropDownMenu = mnuValueTypes - Kind = cxbkDropDown - LookAndFeel.NativeStyle = True - end - end - object Panel3: TPanel - Left = 0 - Top = 0 - Width = 480 - Height = 266 - Align = alClient - BevelOuter = bvNone - Caption = 'Panel3' - TabOrder = 0 - object cxgImageComboBoxItems: TcxGrid - Left = 0 - Top = 0 - Width = 480 - Height = 266 - Align = alClient - TabOrder = 0 - LookAndFeel.NativeStyle = True - object tvImageComboBoxItems: TcxGridTableView - OnKeyDown = tvImageComboBoxItemsKeyDown - NavigatorButtons.ConfirmDelete = False - OnEditKeyDown = tvImageComboBoxItemsEditKeyDown - DataController.Summary.DefaultGroupSummaryItems = <> - DataController.Summary.FooterSummaryItems = <> - DataController.Summary.SummaryGroups = <> - DataController.OnRecordChanged = tvImageComboBoxItemsDataControllerRecordChanged - DataController.Data = { - 960000000F00000044617461436F6E74726F6C6C657231050000001300000054 - 6378496E746567657256616C75655479706512000000546378537472696E6756 - 616C75655479706512000000546378537472696E6756616C7565547970651200 - 0000546378537472696E6756616C75655479706513000000546378496E746567 - 657256616C756554797065010000000001010001000000300101} - OptionsBehavior.CellHints = True - OptionsBehavior.ImmediateEditor = False - OptionsBehavior.ColumnHeaderHints = False - OptionsCustomize.ColumnFiltering = False - OptionsCustomize.ColumnGrouping = False - OptionsCustomize.ColumnHidingOnGrouping = False - OptionsCustomize.ColumnMoving = False - OptionsData.DeletingConfirmation = False - OptionsData.Inserting = False - OptionsSelection.MultiSelect = True - OptionsSelection.UnselectFocusedRecordOnExit = False - OptionsView.CellEndEllipsis = True - OptionsView.ShowEditButtons = gsebAlways - OptionsView.ColumnAutoWidth = True - OptionsView.ExpandButtonsForEmptyDetails = False - OptionsView.GroupByBox = False - object clnImage: TcxGridColumn - Caption = 'Image' - DataBinding.ValueType = 'Integer' - PropertiesClassName = 'TcxImageComboBoxProperties' - Properties.Items = < - item - end> - Properties.ShowDescriptions = False - MinWidth = 36 - Options.HorzSizing = False - Width = 36 - end - object clnDescription: TcxGridColumn - Caption = 'Description' - Width = 168 - end - object clnValue: TcxGridColumn - Caption = 'Value' - PropertiesClassName = 'TcxTextEditProperties' - Width = 109 - end - object clnValueType: TcxGridColumn - Caption = 'ValueType' - PropertiesClassName = 'TcxComboBoxProperties' - Properties.DropDownListStyle = lsFixedList - Properties.ImmediatePost = True - Properties.OnEditValueChanged = clnValueTypePropertiesEditValueChanged - Width = 117 - end - object clnTag: TcxGridColumn - Caption = 'Tag' - DataBinding.ValueType = 'Integer' - PropertiesClassName = 'TcxMaskEditProperties' - Properties.MaskKind = emkRegExprEx - Properties.EditMask = '\d+' - Width = 51 - end - end - object lvImageComboBoxItems: TcxGridLevel - GridView = tvImageComboBoxItems - end - end - end - object mnuValueTypes: TPopupMenu - Left = 390 - Top = 138 - object miAdd: TMenuItem - Caption = '&Add' - OnClick = miValueTypeClick - end - object miInsert: TMenuItem - Caption = '&Insert' - end - object miDelete: TMenuItem - Caption = '&Delete' - end - object N1: TMenuItem - Caption = '-' - end - object miHelp: TMenuItem - Caption = '&Help' - end - end -end diff --git a/internal/x.46/Lib/D11/cxImageListEditor.dcu b/internal/x.46/Lib/D11/cxImageListEditor.dcu deleted file mode 100644 index dbb1796a..00000000 Binary files a/internal/x.46/Lib/D11/cxImageListEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxImageListEditorView.dcu b/internal/x.46/Lib/D11/cxImageListEditorView.dcu deleted file mode 100644 index f1f4f8b7..00000000 Binary files a/internal/x.46/Lib/D11/cxImageListEditorView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxImageListEditorView.dfm b/internal/x.46/Lib/D11/cxImageListEditorView.dfm deleted file mode 100644 index d1971e92..00000000 --- a/internal/x.46/Lib/D11/cxImageListEditorView.dfm +++ /dev/null @@ -1,676 +0,0 @@ -object cxImageListEditorForm: TcxImageListEditorForm - Left = 327 - Top = 272 - Anchors = [akLeft, akTop, akRight, akBottom] - AutoScroll = False - BorderIcons = [biSystemMenu] - Caption = 'cxImageListEditorForm' - ClientHeight = 287 - ClientWidth = 550 - Color = clBtnFace - OldCreateOrder = False - OnCreate = FormCreate - OnDestroy = FormDestroy - PixelsPerInch = 96 - TextHeight = 13 - object lblManifestWarning: TLabel - Left = 51 - Top = 249 - Width = 246 - Height = 32 - Anchors = [akLeft, akBottom] - AutoSize = False - Caption = 'Manifest Warning' - Transparent = True - Visible = False - WordWrap = True - end - object imgWarning: TImage - Left = 13 - Top = 249 - Width = 32 - Height = 32 - Anchors = [akLeft, akBottom] - AutoSize = True - Picture.Data = { - 055449636F6E0000010001002020000001002000A81000001600000028000000 - 2000000040000000010020000000000080100000000000000000000000000000 - 00000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 - FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 - FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 - FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 - FFFFFF00414141003B3B3B5D383838B2343434CA313131CA2D2D2DCA292929CA - 262626CA222222CA1F1F1FCA1D1D1DCA191919CA161616CA141414CA101010CA - 0E0E0ECA0B0B0BCA090909CA070707CA050505CA030303CA010101CA000000CA - 000000CA000000CA000000CA000000CA000000CA000000CA000000B20000005D - 00000000434343403F3F3FE83B3B3BFF373737FF343434FF313131FF2D2D2DFF - 292929FF252525FF222222FF1F1F1FFF1B1B1BFF191919FF161616FF121212FF - 101010FF0D0D0DFF0B0B0BFF080808FF060606FF040404FF020202FF000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000E8 - 00000040484848BC434343FF404040FF3C3C3CFF363332FF302927FF2C2523FF - 29221FFF251D1BFF221A18FF1F1714FF1B1310FF18100DFF140C09FF120A06FF - 0F0703FF0C0400FF090000FF070000FF050000FF020000FF000000FF000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF - 000000BC4C4C4CEA484848FF454545FF3F3D3DFF70AABAFF86DBF3FF89E4FFFF - 85E2FFFF81E0FFFF7FDEFFFF7BDDFFFF79DCFFFF76DAFFFF73D9FFFF71D7FFFF - 6FD6FFFF6CD4FFFF6BD4FFFF68D3FFFF68D2FFFF67D1FFFF67D1FFFF67D0FFFF - 66D0FFFF66CFFFFF65CFFFFF63CBFAFF5492A5FF000000FF000000FF000000FF - 000000EA515151CA4C4C4CFF494949FF443F3DFF73B8C9FF63EEFFFF56E5FFFF - 52E3FFFF4CE0FFFF48DCFFFF43DAFFFF3ED8FFFF39D5FFFF34D3FFFF48DDFFFF - 4ED4FFFF4AD3FFFF3ED8FFFF21C9FFFF20C8FFFF20C7FFFF20C7FFFF1FC6FFFF - 1FC5FFFF1EC5FFFF1DC4FFFF25CBFFFF398FB6FF000000FF000000FF000000FF - 000000CA5252526B4F4F4FFF4C4C4CFF444140FF8EB4BDFF96F1FFFF74E2FFFF - 5FDDFFFF4FD8FFFF40D3FFFF3BCFFFFF38CEFFFF31CAFFFF48D4FFFF559DB7FF - 2D3A3FFF2A373CFF4D98B5FF35CBFFFF14BAFFFF16BAFFFF15B9FFFF14B8FFFF - 14B7FFFF13B6FFFF10B5FFFF1EC2FFFF3582A5FF000000FF000000FF000000FF - 0000006B6B6B6B0B696969D5646464FF585756FF7A7E7FFFD4F7FCFFC2F5FFFF - AFEEFFFF98EAFFFF79E1FFFF5AD9FFFF41D2FFFF37D1FFFF55C5ECFF32393CFF - 1F1714FF1B1310FF283135FF44BCEAFF1BC0FFFF17BBFFFF17BAFFFF17B9FFFF - 16B9FFFF15B8FFFF11B7FFFF35C1FCFF1B333EFF000000FF000000FF000000D5 - 0000000B7B7B7B007B7B7B5C757575FF6E6E6EFF656363FFB0C6CCFFC9FCFFFF - BAF2FFFFB3EFFFFFAAECFFFF9BE9FFFF7EE2FFFF5BDDFFFF59C0E3FF303537FF - 24201EFF211C1AFF292D2FFF44B6E3FF1FC3FFFF1ABDFFFF18BBFFFF17BAFFFF - 17BAFFFF14B8FFFF1FC4FFFF3A8AAEFF040302FF030202FF020202FF0000005C - 000000007D7D7D007D7D7D087A7A7AC7747474FF696868FF818688FFCCF4FBFF - BCF4FFFFB3F0FFFFABEDFFFFA1EBFFFF98E9FFFF8BE5FFFF8CE8FDFF5C808DFF - 2C3031FF2A2D2EFF4B7C8DFF48D2FEFF1FC0FFFF1EBFFFFF1ABDFFFF18BBFFFF - 17BBFFFF13BBFFFF39C1FAFF1E343EFF050100FF050606FF040404C702020208 - 0202020080808000808080007F7F7F4C7A7A7AFE737373FF6A6868FFADC2C6FF - C8FCFFFFB7F1FFFFAFF0FFFFA5EDFFFF9BEAFFFF8FE7FFFF89E6FFFF91E8FFFF - 75BCD3FF5DB2CEFF54D5FFFF2EC9FFFF24C3FFFF22C2FFFF1EBFFFFF1ABDFFFF - 16BBFFFF23C7FFFF3C86A5FF0C0705FF0A0909FF090909FE0606064C05050500 - 05050500828282008282820082828200808080B67A7A7AFF6F6F6EFF818687FF - C9F1F9FFBCF5FFFFB3F1FFFFAAEFFFFF9FECFFFF95E9FFFF88E5FFFF8CF0FFFF - 6D929DFF537581FF4FD7FFFF2AC9FFFF2AC7FFFF26C5FFFF21C1FFFF1DBFFFFF - 16BFFFFF3DC1F5FF25363CFF0E0A08FF0E0E0EFF0B0B0BB60909090009090900 - 09090900838383008383830083838300838383397F7F7FFA797979FF6F6D6CFF - ACC0C5FFC7FCFFFFB5F2FFFFAEF0FFFFA4EDFFFF9AEBFFFF8FE8FFFF97F0FFFF - 5A6E73FF4A5558FF71DAFBFF38D0FFFF2EC9FFFF2AC7FFFF26C4FFFF1EC1FFFF - 2ACCFFFF4087A2FF160F0DFF141514FF111111FA0E0E0E390B0B0B000B0B0B00 - 0B0B0B0086868600868686008686860086868600858585A37F7F7FFF757474FF - 838788FFC8F0F6FFBCF5FFFFB2F1FFFFA9EFFFFF9FECFFFF95EDFFFF9AE3F6FF - 515C5FFF434748FF80D3ECFF55DBFFFF36CDFFFF2FCAFFFF2AC8FFFF23C7FFFF - 45C4F1FF2D3A3FFF181412FF181818FF141414A3121212001212120012121200 - 12121200888888008888880088888800888888008888882B858585F17F7F7FFF - 747171FFABBFC3FFC6FBFFFFB5F2FFFFADF1FFFFA4EEFFFF9DF1FFFF9CD8E6FF - 484A4AFF3D3938FF80C1D4FF6BE3FFFF49D4FFFF34CEFFFF2DC9FFFF38D4FFFF - 4A89A0FF201916FF1F1F1FFF1B1B1BF11818182B171717001717170017171700 - 171717008B8B8B008B8B8B008B8B8B008B8B8B008B8B8B008A8A8A94848484FF - 7C7B7AFF86898AFFC7EEF6FFBBF6FFFFB0F1FFFFA8EFFFFFA7F6FFFF93BFC9FF - 43403FFF403C3AFF739EAAFF7AE8FFFF59D9FFFF3ED2FFFF33D0FFFF53CAF1FF - 364145FF242120FF232323FF202020941D1D1D001D1D1D001D1D1D001D1D1D00 - 1D1D1D008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008D8D8D1D898989EB - 848484FF797877FFABBDC0FFC6FCFFFFB5F3FFFFACF1FFFFB1F9FFFF7E979CFF - 474444FF43403FFF64787DFF87EDFFFF64DDFFFF4BD6FFFF4BDDFFFF558D9FFF - 2B2624FF2A2A2AFF272727EB2323231D22222200222222002222220022222200 - 222222008F8F8F008F8F8F008F8F8F008F8F8F008F8F8F008F8F8F008F8F8F7C - 898989FF818080FF8B8E8EFFC6EEF5FFBAF6FFFFB0F2FFFFB8F8FFFF6E787AFF - 4B4948FF494645FF596264FF8DE2F6FF6DE3FFFF57DEFFFF63D1F1FF414C4FFF - 312E2DFF2F2F2FFF2C2C2C7C2929290029292900292929002929290029292900 - 2929290092929200929292009292920092929200929292009292920092929214 - 8E8E8EDE898989FF7F7D7DFFADBFC2FFC6FCFFFFB6F7FFFFB4E8F2FF666B6CFF - 51504FFF4F4D4DFF545656FF8ACEDEFF76E8FFFF71EAFFFF6196A3FF393331FF - 373737FF333333DE303030143030300030303000303030003030300030303000 - 3030300093939300939393009393930093939300939393009393930093939300 - 929292698E8E8EFF868585FF8D8F90FFC6EEF3FFBEFDFFFFB0DDE6FF646667FF - 565555FF545353FF52514FFF88C3D1FF80F2FFFF83DAEEFF4C5457FF3D3A39FF - 3C3C3CFF37373769333333003333330033333300333333003333330033333300 - 3333330095959500959595009595950095959500959595009595950095959500 - 95959509939393D28E8E8EFF848181FFADBEC2FFC8FEFFFFBEEEF5FF6F7475FF - 585656FF565454FF5C5E5FFF96D7E4FF90F6FFFF759DA6FF433E3DFF444444FF - 404040D23C3C3C093B3B3B003B3B3B003B3B3B003B3B3B003B3B3B003B3B3B00 - 3B3B3B0097979700979797009797970097979700979797009797970097979700 - 9797970097979759929292FF8B8A8AFF909292FFC6EBF2FFC9FFFFFFA5BFC3FF - 656565FF5F5E5DFF8DA9B0FFA5F8FFFF98DFEFFF5E6264FF4B4949FF484848FF - 4444445943434300434343004343430043434300434343004343430043434300 - 4343430099999900999999009999990099999900999999009999990099999900 - 9999990099999906979797C2929292FF898786FFADBDC0FFC8FBFFFFC3FAFFFF - B7E7EFFFB0E3EDFFAEF3FFFFA4F7FFFF86A5ABFF585553FF525252FF4C4C4CC2 - 4949490649494900494949004949490049494900494949004949490049494900 - 494949009A9A9A009A9A9A009A9A9A009A9A9A009A9A9A009A9A9A009A9A9A00 - 9A9A9A009A9A9A009A9A9A45969797FC909090FF929393FFC6E9EFFFBEF9FFFF - B6F8FFFFAEF7FFFFA6F6FFFFA8E0EBFF6E7071FF616160FF575757FC50505045 - 4F4F4F004F4F4F004F4F4F004F4F4F004F4F4F004F4F4F004F4F4F004F4F4F00 - 4F4F4F009C9C9C009C9C9C009C9C9C009C9C9C009C9C9C009C9C9C009C9C9C00 - 9C9C9C009C9C9C009C9C9C009B9B9BAF969696FF8E8C8CFFADBABDFFCAFCFFFF - B9F5FFFFB1F4FFFFB6FAFFFF93A9ACFF6A6665FF686869FF5C5C5CAF54545400 - 5555550055555500555555005555550055555500555555005555550055555500 - 555555009E9E9E009E9E9E009E9E9E009E9E9E009E9E9E009E9E9E009E9E9E00 - 9E9E9E009E9E9E009E9E9E009D9D9D359A9A9AF8949494FF959595FFC7E8EDFF - C0F9FFFFB9F9FFFFB7E4EBFF7C7E7DFF717070FF6D6D6DF85F5F5F355A5A5A00 - 5B5B5B005B5B5B005B5B5B005B5B5B005B5B5B005B5B5B005B5B5B005B5B5B00 - 5B5B5B00A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000 - A0A0A000A0A0A000A0A0A000A0A0A0009E9E9EA09A9A9AFF918F8FFFADB9BBFF - D0FFFFFFCAFFFFFF9EAFB2FF797676FF787878FF717171A06666660066666600 - 6767670067676700676767006767670067676700676767006767670067676700 - 67676700A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000A0A0A000 - A0A0A000A0A0A000A0A0A000A0A0A000A0A0A0289D9D9DF0999898FF979797FF - ACB7B8FFA7B3B5FF888989FF818181FF7D7D7DF0747474286B6B6B006C6C6C00 - 6C6C6C006C6C6C006C6C6C006C6C6C006C6C6C006C6C6C006C6C6C006C6C6C00 - 6C6C6C00A2A2A200A2A2A200A2A2A200A2A2A200A2A2A200A2A2A200A2A2A200 - A2A2A200A2A2A200A2A2A200A2A2A200A2A2A200A1A1A18D9E9E9EFF989898FF - 908E8EFF8C8A8AFF8C8B8BFF878787FF8181818D7E7E7E007D7D7D007D7D7D00 - 7D7D7D007D7D7D007D7D7D007D7D7D007D7D7D007D7D7D007D7D7D007D7D7D00 - 7D7D7D00A3A3A300A3A3A300A3A3A300A3A3A300A3A3A300A3A3A300A3A3A300 - A3A3A300A3A3A300A3A3A300A3A3A300A3A3A300A3A3A31AA1A1A1DE9D9D9DFF - 989898FF949494FF909090FF8B8B8BDE8686861A868686008686860086868600 - 8686860086868600868686008686860086868600868686008686860086868600 - 86868600A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400 - A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A3A3A342A1A1A1EA - 9D9D9DFF989898FF959595EA8F8F8F428D8D8D008E8E8E008E8E8E008E8E8E00 - 8E8E8E008E8E8E008E8E8E008E8E8E008E8E8E008E8E8E008E8E8E008E8E8E00 - 8E8E8E00A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400 - A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A4A4A400A2A2A25F - 9F9F9FB59B9B9BB59797975F9292920091919100919191009191910091919100 - 9191910091919100919191009191910091919100919191009191910091919100 - 91919100FFFFFFFF800000010000000000000000000000000000000000000000 - 000000008000000180000001C0000003E0000007E0000007F000000FF000000F - F800001FF800001FFC00003FFC00003FFE00007FFE00007FFF0000FFFF0000FF - FF8001FFFFC003FFFFC003FFFFE007FFFFE007FFFFF00FFFFFF00FFFFFF81FFF - FFFC3FFF} - Visible = False - end - object btnOK: TButton - Left = 303 - Top = 250 - Width = 75 - Height = 25 - Action = actOK - Anchors = [akRight, akBottom] - Default = True - ModalResult = 1 - TabOrder = 0 - end - object btnCancel: TButton - Left = 383 - Top = 250 - Width = 75 - Height = 25 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - object btnApply: TButton - Left = 463 - Top = 250 - Width = 75 - Height = 25 - Action = actApply - Anchors = [akRight, akBottom] - TabOrder = 2 - end - object gbSelectedImage: TGroupBox - Left = 359 - Top = 7 - Width = 180 - Height = 231 - Anchors = [akTop, akRight, akBottom] - Caption = 'Selected Image' - TabOrder = 3 - object pbPreview: TPaintBox - Left = 10 - Top = 15 - Width = 160 - Height = 160 - Anchors = [akLeft, akTop, akRight] - OnMouseDown = pbPreviewMouseDown - OnMouseMove = pbPreviewMouseMove - OnMouseUp = pbPreviewMouseUp - OnPaint = pbPreviewPaint - end - object lbTransparentColor: TLabel - Left = 9 - Top = 186 - Width = 87 - Height = 13 - Anchors = [akLeft, akBottom] - Caption = 'Transparent Color:' - end - object cbTransparentColor: TComboBox - Left = 10 - Top = 201 - Width = 161 - Height = 21 - Anchors = [akLeft, akRight, akBottom] - ItemHeight = 13 - TabOrder = 0 - OnChange = cbTransparentColorChange - OnExit = cbTransparentColorExit - end - end - object gbImages: TGroupBox - Left = 12 - Top = 7 - Width = 340 - Height = 231 - Anchors = [akLeft, akTop, akRight, akBottom] - Caption = 'Images' - TabOrder = 4 - object lvImages: TListView - Left = 10 - Top = 15 - Width = 320 - Height = 178 - Hint = 'Add image' - Anchors = [akLeft, akTop, akRight, akBottom] - Columns = <> - Constraints.MinHeight = 150 - Constraints.MinWidth = 228 - DragMode = dmAutomatic - HideSelection = False - IconOptions.AutoArrange = True - MultiSelect = True - ReadOnly = True - PopupMenu = pmCommands - ShowColumnHeaders = False - TabOrder = 0 - OnEndDrag = lvImagesEndDrag - OnDragOver = lvImagesDragOver - OnKeyDown = lvImagesKeyDown - OnStartDrag = lvImagesStartDrag - end - object pnlToolBarSubstrate: TPanel - Left = 10 - Top = 200 - Width = 183 - Height = 22 - Anchors = [akLeft, akBottom] - BevelOuter = bvNone - TabOrder = 1 - object tbCommands: TToolBar - Left = 0 - Top = 0 - Width = 183 - Height = 22 - Align = alClient - Caption = 'tbCommands' - EdgeBorders = [] - Flat = True - Images = imglSmall - ParentShowHint = False - ShowHint = True - TabOrder = 0 - object tbbAdd: TToolButton - Left = 0 - Top = 0 - Action = actAdd - end - object tbbReplace: TToolButton - Left = 23 - Top = 0 - Action = actReplace - end - object tbbDelete: TToolButton - Left = 46 - Top = 0 - Action = actDelete - end - object tbbClear: TToolButton - Left = 69 - Top = 0 - Action = actClear - end - object tbbExport: TToolButton - Left = 92 - Top = 0 - Action = actExport - DropdownMenu = pmExport - end - object tbbImport: TToolButton - Left = 115 - Top = 0 - Action = actImport - DropdownMenu = pmImageLists - end - end - end - object cbImagesSize: TComboBox - Left = 260 - Top = 200 - Width = 70 - Height = 21 - Style = csDropDownList - Anchors = [akRight, akBottom] - ItemHeight = 13 - TabOrder = 2 - OnChange = cbImagesSizeChange - Items.Strings = ( - '16x16' - '24x24' - '32x32' - '48x48' - '64x64' - '128x128') - end - end - object pmImageLists: TPopupMenu - Images = imglSmall - Left = 64 - Top = 40 - end - object pmCommands: TPopupMenu - Images = imglSmall - Left = 152 - Top = 40 - object miAdd: TMenuItem - Action = actAdd - end - object miReplace: TMenuItem - Action = actReplace - end - object miDelete: TMenuItem - Action = actDelete - end - object miClear: TMenuItem - Action = actClear - end - object miExport: TMenuItem - Action = actExport - object AsBitmap1: TMenuItem - Action = actExportAsBitmap - end - object AsPNG1: TMenuItem - Action = actExportAsPNG - end - end - object miImport: TMenuItem - Action = actImport - end - end - object imglSmall: TcxImageList - CompressData = True - FormatVersion = 1 - DesignInfo = 1572992 - ImageInfo = < - item - Image.Data = { - 860200005844424D0100823604020084424D3604060081360300812803008110 - 03008110030083010020060081045200034E8100034D8100034D8100034B8100 - 034B810003488100034781000347810003458100034381000343810003431100 - 0351A9006BCE7D006BCE7D0069CF7F0068CF800068D0810067D1830067D18400 - 65D2860065D2860064D38800034511000354A90064D388002FC562002EC76500 - 2EC765002DC869002DC869002ECA6D002ECA6D0030CB700064D9950003471100 - 0357A90068D9960041CF7A004CD181005CD68C0072DB9C0085E1A900A1E7BB00 - BDEDCD00E4F1DB00F2F5E600034B11000359A900D1EFD400E4F1DB00F6F1DD00 - F9F2DF00FDF3E100FDF3E100FDF4E200FFF4E600FFF4E600FFF8EE00034D1100 - 035CB000FFF6EA00FFF3E300FFF3E300FFF3E100FFF2DF00FFF1DE00FFF1DE00 - FFF1DD00FFF1DD0003531900034F1800034F180D00035EB000FFF0DA00FFEBCE - 00FFEACC00FFEACC00FFE9CA00FFE9C800FFE8C700FFE7C400FFE7C40002591B - 000FCD69000353190D000361B000FFE8C700FFDFB300FFDEB000FFDEB000FFDD - AE00FFDDAD00FFDCAB00FFDBAA00FFDAA600025E1D000FCD690002561A0D0003 - 64BD00FFDEB000FFDDAE00FFDDAD00FFDDAD00FFDCAB00FFDBAA000375280003 - 7025000269220002641F0027D87C00025E1D0002591B0002561A000353190003 - 66810003668100036481000363810003638100036181000361A400037C2C006F - F0B0006FF0B00053E89C003CE08A0027D87C000FCD69000FCD690002561A1D00 - A30387330003873300037C2C000375280053E89C000269220002641F00025E1D - 0002591B29008B037C2C006FF0B00003702535008B0387330087F6C100037C2C - 35008B04943A00038733000387334D00} - Mask.Data = { - 670000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF810002FF0300810F0300810F - 0300810F0300810F0300810F0300810703008107030081070A0081FE030082FF - C7020082FFC7020082FFC7020002FF0200} - end - item - Image.Data = { - 580300005844424D0100823604020084424D3604060081360300812803008110 - 0300811003008301002006008104460083A559060900037A8100037A81000377 - 8100037781000377810003758100037581000375810003738100037081000370 - 050090A5590600A5590600A5590600CCB59200037DA5008FDA9D008FDA9D008F - DA9D008EDBA0008DDCA1008DDCA1008CDDA4008CDDA4008CDDA400037309008C - A5590600D3CFC200A5590600037DA5008BDEA50062D3890062D3890062D58C00 - 62D58C0061D7900061D7900061D790008CE3AF000375110084A55906000381A5 - 008CE3AF0072DB9C0078DCA00085E1A90095E4B400A1E7BB00BDEDCD00D1EFD4 - 00EDF6E7000377150003819100E4F1DB00EDF6E700F9F5E600F9F5E600034E81 - 00034D8100034D8100034B8100034B8100034881000347810003478100034581 - 00034381000343810003859100FFF8EE00FFF6EA00FFF6EA00FFF6EA000351A5 - 006BCE7D006BCE7D0069CF7F0068CF800068D0810067D1830067D1840065D286 - 0065D286000345810003859100FFF3E300FFF0DA00FFF0DA00FFF0DA000354A5 - 0064D388002FC562002EC765002EC765002DC869002DC869002ECA6D002ECA6D - 0064D995000348810003899100FFEDD300FFE7C600FFE7C400FFE7C4000357A5 - 0068D9960041CF7A004CD181005CD68C0072DB9C0085E1A900A1E7BB00BDEDCD - 00EDF6E700034B8100038A9100FFE6C200FFE6C200FFE6C200FFE6C2000359A5 - 00D1EFD400E4F1DB00F6F1DD00F9F2DF00FDF3E100FDF3E100FDF4E200FFF4E6 - 00FFF8EE00034E8100038D8100038A8100038A8100038A810003898100035CA5 - 00FFF6EA00FFF3E300FFF3E300FFF3E100FFF2DF00FFF1DE00FFF1DE00FFF1DD - 00FFF4E60003511500035EA500FFF0DA00FFEBCE00FFEACC00FFEACC00FFE9CA - 00FFE9C800FFE8C700FFE7C400FFEDD30003548400C6731B11000361A500FFE8 - C700FFDFB300FFDEB000FFDEB000FFDDAE00FFDDAD00FFDCAB00FFDBAA00FFE4 - BB0003578C00C9761D00DAD4C600C6731B09000364A500FFDEB000FFDDAE00FF - DDAD00FFDDAD00FFDCAB00FFDBAA00FFDBAA00FFDAA600FFDAA60003599000D8 - C3A600CB781E00C9761D00C6731B050003668100036681000364810003638100 - 036381000361810003618100035E8100035E8100035E8100035C090083CB781E - 3500} - Mask.Data = { - 550000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF8300FFFB0300811003008118 - 0300811E0300811F1A0081F8030081780300811803008108030082DFFF0200} - end - item - Image.Data = { - AE0200005844424D0100823604020084424D3604060081360300812803008110 - 03008110030083010020060081045200034E8100034D8100034D8100034B8100 - 034B810003488100034781000347810003458100034381000343810003431100 - 0351A9006BCE7D006BCE7D0069CF7F0068CF800068D0810067D1830067D18400 - 65D2860065D2860064D38800034511000354A90064D388002FC562002EC76500 - 2EC765002DC869002DC869002ECA6D002ECA6D0030CB700064D9950003471100 - 0357A90068D9960041CF7A004CD181005CD68C0072DB9C0085E1A900A1E7BB00 - BDEDCD00E4F1DB00F2F5E600034B11000359A900D1EFD400E4F1DB00F6F1DD00 - F9F2DF00FDF3E100FDF3E100FDF4E200FFF4E600FFF4E600FFF8EE00034D0900 - 83969FD30500035CA900FFF6EA00FFF3E300FFF3E300FFF3E100FFF2DF00EFE2 - DC00FFF1DE00FFF1DD00FFF1DD00FFF3E300034E050087969FD300929BD10500 - 035EA900FFF0DA00FFEBCE00FFEACC00FFEACC00FFE9CA00B7A8CA00E7D3C600 - FFE7C400FFE7C400FFEDD30003538800C9D5EB005B60BD09000361A900FFE8C7 - 00FFDFB300FFDEB000FFDEB000FFDDAE00C4ABB6008B78B700FADAAB00FFDAA6 - 00FFE4BB00035388006469CA00969FD309000364A900FFDEB000FFDDAE00FFDD - AD00FFDDAD00FFDBAA00FADAAB008B78B7008B78B700FFDAA600FFDAA600022A - 8594006469CA0D00036681000366810003648100036381000363810003618100 - 036181000259826600022A829400022A829400022A829400022A8194310088AE - B8E5000A0BCC00020585C9007C84D92900A7C9D5EB007D84E4002C2FD7006D73 - DD006D73DD001011CA001F21CD005D62D6008991DA00C9D5EB19008B7D84E400 - 383AD6009BA4E309008CAEB8E5004E52D9001011CA00020585C500474BD31900 - 87C9D5EB00C9D5EB15008BB5C0E7007D84E4008B93E24100} - Mask.Data = { - 6F0000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF810002FF0300810F0300810F - 0300810F0300810F0300810D030081090300810303008103030081070300810F - 020082FF0F020081FC030082FC60020082FCF8020002FF0200} - end - item - Image.Data = { - DB0100005844424D0100823604020084424D3604060081360300812803008110 - 03008110030083010020060081044600835B60BD39008799A2D3005B60BD0900 - 83C9D5EB2D00874B4FB40099A2D30900838991DA2900878A92CF004B4FB40D00 - 877C84D900A4ADE421008BB5C0E7002C2EAF00929BD10D0087AEB8E5005D62D6 - 2100875B60BD005B60BD1500876D73DD005D62D619008B7178CF002C2EAF00AE - B8E51900873F42D200646AD81100847C84D900021585BC008991DA1D008B9BA4 - E3001F21CD00585CD60900847C84D900021585BC007177D4250090858DE10010 - 11CA00383AD600474BD300020B85C500646AD82D0088646AD8000A0BCC000205 - 89C9002E30CE00A4ADE4290090858DE1002C2FD7000A0BCC001A1BCD0002058D - C9001A1BCD005D62D6009BA4E3190088A4ADE4004E52D900020892D5003033D5 - 008B93E200A4ADE4004E52D900020582C900020582C600020591C6002E30CE00 - 5D62D600838ADB00A4ADE40500845D63E200020882D500020889D5005E63DF00 - B5C0E70D0088858DE100383AD600020582C900020582C600020582C500020582 - C500020591C0007C84D9007D84E4005D63E200959EE71D008C858DE100474BD3 - 001011CA00020582C600020585C5001F21C7310090B5C0E700858DE1005D62D6 - 009BA4E300} - Mask.Data = { - 7A0000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF8300FFFB020082FFF3020082 - 7FF30200827FE70200823FC70200823FCF0200829F8F020082CF1F020082C63F - 020082E07F020082F07F020082E01F0200828001020081070300821FC0020082 - FFF00200} - end - item - Image.Data = { - 520300005844424D0100823604020084424D3604060081360300812803008110 - 030081100300830100200600810456008CC5A67B00B26C3400CA8B5800032481 - 0003248100031981000319810003198100030F8100030F8100030F8C00BA7743 - 00A1551A00B78E5D09008CBA774300EFCA9100EBC58800033481000332810003 - 2C8100032C810003248900E2B97A00E2B97A0003198C00E2B97A00DAA65600A1 - 551A09008CC17E4800F2CE9600EFCA91000345810003418100033C8100033781 - 0003348900E5BD7D00E4BA7C0003248C00E2B97A00DAA65600A1551A09008CC6 - 834E00F4D19D00F2CE96000359810003538100034E81000348810003458900E7 - BD8300E5BD7D0003378C00E2B97A00DAA65600A85E2409008CCA8B5800F6D5A5 - 00F4D19D00036B81000366810003618100035C81000357810003538100034D81 - 0003488C00E5BD7D00DAA65600A85E240900B7CA8B5800FADAAB00F6D5A500F4 - D19D00EFCA9100EFCA9100EBC58800EBC58800EBC58800E7BD8300E7BD8300E7 - BD8300E1AE5F00A85E240900B7D1915D00FBDDB100F2CE9600F3C88600F3C886 - 00EDC07A00ECBC7200E9B86D00E6B56900E6B56900E3B16400E3B16400E1AE5F - 00B26C340900B7D99B6800FFE4BB00E3AF7900E3AF7900E3B27500E3B27500E4 - AF6E00E4AF6E00E2AD6800E2AD6800E2AD6800E2AD6800E3B16400B26C340900 - 8CD99B6800FFE4BB00E3AF790003FC810003FC810003FA810003FA810003F881 - 0003F8810003F6810003F68C00E2AD6800E6B56900B26C3409008CDFA47100FF - E6C200DFA4710003FE810003D6810003D6810003D6810003D6810003D2810003 - D2810003F88C00E0A96A00E6B56900BA774309008CDFA47100FFECC900DFA471 - 0003FF810003FF810003FE810003FE810003FC810003FC810003FA810003FA8C - 00E0A96A00E9B86D00BA774309008CE4A77500FFEFCF00D99B680003FF810003 - D9810003D9810003D9810003D9810003D6810003D6810003FC8C00E0A96A00EC - BC7200C17E4809008CE4A77500FFF4D400DFAE850003FF810003FF810003FF81 - 0003FF810003FF810003FF810003FF810003FC8C00E7BD8300EFCA9100C6834E - 09008CE2CFB000E4A77500E4A7750003D9810003D9810003D9810003D9810003 - D9810003D9810003D9810003D98C00D1915D00CA8B5800CCB5924500} - Mask.Data = { - 7A0000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF810002FF0200828001020082 - 8001020082800102008280010200828001020082800102008280010200828001 - 0200828001020082800102008280010200828001020082800102008280010200 - 02FF0200} - end - item - Image.Data = { - E10200005844424D0100823604020084424D3604060081360300812803008110 - 03008110030083010020060081045E000366810003618100035C810003578100 - 03518100034D81000347810003418100033C81000337810003348100032C1100 - 036B810003E3810003FF810003FF810003FF810003FF810003FF810003FF8100 - 03FF810003FF810003FF810003321100036B810003E3810003FF810003FF8100 - 03FF810003FF810003FF810003FF810003FF810003FF810003FF810003341100 - 0370810003E3810003FF810003FF8500BF611B0003FF810003FF810003FF8100 - 03FF810003FF810003FF8100033711000373810003E3810003FF810003FF8900 - C5631B00C5631B0003FF810003FF810003FF810003FF810003FF8100033C0900 - A4E07A2E00DD762A00DA722600D6712600D46C2200D16B1F00CB661C00CB661C - 00C5631B0003FF810003FF810003FF810003FF8100033C0900A8E8833A00E37E - 3400E37E3400E07A2E00DD762A00DA722600D6712600D16B1F00CE691F00CB66 - 1C0003FF810003FF810003FF810003410900A4EE8D4600EE8D4600E8833A00E8 - 833A00E37E3400E37E3400E07A2E00DD762A00D671260003FF810003FF810003 - FF810003FF8100034511000381810003E3810003FF810003FF8900E8833A00E3 - 7E340003FF810003FF810003FF810003FF810003FF8100034811000381810003 - E3810003FF810003FF8500EE8D460003FF810003FF810003FF810003FF810003 - FF810003FF8100034B11000385810003E3810003FF810003FF810003FF810003 - FF810003FF810003FF810003FF810003FF810003FF8100034E11000389810003 - E3810003FF810003FF810003FF810003FF810003FF810003FF810003FF810003 - FF810003FF810003531100038A810003E3810003E3810003E3810003E3810003 - E3810003E3810003E3810003E3810003E3810003E3810003571100038D810003 - 8981000385810003818100037D81000377810003738100037081000366810003 - 648100035E810003594500} - Mask.Data = { - 7A0000005844424D0100817E030083424D7E0700813E03008128030081100300 - 8110030083010001050081400B0081020B0003FF810002FF020082E001020082 - E001020082E001020082E001020082E001020082800102008280010200828001 - 020082E001020082E001020082E001020082E001020082E001020082E0010200 - 02FF0200} - end> - end - object spdSave: TSavePictureDialog - DefaultExt = '*.bmp' - Filter = 'Bitmaps (*.bmp)|*.bmp' - Left = 201 - Top = 24 - end - object actlCommands: TActionList - Images = imglSmall - Left = 128 - Top = 80 - object actAdd: TAction - Caption = '&Add' - Hint = 'Add image' - ImageIndex = 0 - ShortCut = 45 - OnExecute = actAddExecute - end - object actInsert: TAction - Caption = 'Insert' - ShortCut = 8237 - OnExecute = actInsertExecute - end - object actReplace: TAction - Caption = '&Replace' - Hint = 'Replace image' - ImageIndex = 1 - ShortCut = 16466 - OnExecute = actReplaceExecute - end - object actDelete: TAction - Caption = '&Delete' - Hint = 'Delete image' - ImageIndex = 2 - ShortCut = 46 - OnExecute = actDeleteExecute - end - object actClear: TAction - Caption = '&Clear' - Hint = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnExecute = actClearExecute - end - object actImport: TAction - Caption = '&Import' - Hint = 'Import images' - ImageIndex = 5 - OnExecute = actImportExecute - end - object actApply: TAction - Caption = 'Apply' - OnExecute = actApplyExecute - end - object actOK: TAction - Caption = 'OK' - OnExecute = actOKExecute - end - object actExportAsBitmap: TAction - Caption = 'as &Bitmap...' - Hint = 'Export as bitmap' - ImageIndex = 4 - ShortCut = 16450 - OnExecute = actExportAsBitmapExecute - end - object actExportAsPNG: TAction - Caption = 'as &PNG...' - Hint = 'Export as PNG' - ImageIndex = 4 - ShortCut = 16464 - OnExecute = actExportAsPNGExecute - end - object actExport: TAction - Caption = '&Export' - Hint = 'Export images' - ImageIndex = 4 - OnExecute = actExportExecute - end - end - object opdOpen: TOpenPictureDialog - Filter = - 'All (*.bmp, *.ico)|*.bmp;*.ico|Bitmaps (*.bmp)|*.bmp|Icons (*.ic' + - 'o)|*.ico' - FilterIndex = 0 - Options = [ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing] - Left = 198 - Top = 80 - end - object pmExport: TPopupMenu - Images = imglSmall - Left = 224 - Top = 144 - object AsBitmap2: TMenuItem - Action = actExportAsBitmap - Caption = 'Export as &Bitmap...' - end - object AsPNG2: TMenuItem - Action = actExportAsPNG - Caption = 'Export as &PNG...' - end - end -end diff --git a/internal/x.46/Lib/D11/cxImportDialog.dcu b/internal/x.46/Lib/D11/cxImportDialog.dcu deleted file mode 100644 index 3325b6a8..00000000 Binary files a/internal/x.46/Lib/D11/cxImportDialog.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxImportDialog.dfm b/internal/x.46/Lib/D11/cxImportDialog.dfm deleted file mode 100644 index 9eb24247..00000000 --- a/internal/x.46/Lib/D11/cxImportDialog.dfm +++ /dev/null @@ -1,146 +0,0 @@ -object cxImportDialogForm: TcxImportDialogForm - Left = 288 - Top = 203 - BorderIcons = [biSystemMenu] - BorderStyle = bsSingle - Caption = 'Import' - ClientHeight = 367 - ClientWidth = 546 - Color = clBtnFace - OldCreateOrder = False - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Panel1: TPanel - Left = 141 - Top = 0 - Width = 113 - Height = 367 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object Button1: TButton - Left = 12 - Top = 8 - Width = 89 - Height = 25 - Caption = 'Import' - Enabled = False - TabOrder = 0 - OnClick = Button1Click - end - object Button2: TButton - Left = 12 - Top = 40 - Width = 89 - Height = 25 - Cancel = True - Caption = 'Close' - ModalResult = 2 - TabOrder = 1 - end - object Button3: TButton - Left = 12 - Top = 332 - Width = 89 - Height = 25 - Caption = 'Options >>' - TabOrder = 2 - OnClick = Button3Click - end - end - object ListBox1: TListBox - Left = 0 - Top = 0 - Width = 141 - Height = 367 - Align = alLeft - ItemHeight = 13 - TabOrder = 1 - OnClick = ListBox1Click - OnDblClick = ListBox1DblClick - end - object StylesPane: TPanel - Left = 254 - Top = 0 - Width = 292 - Height = 367 - Align = alClient - TabOrder = 2 - object PageControl1: TPageControl - Left = 1 - Top = 1 - Width = 290 - Height = 365 - ActivePage = TabSheet2 - Align = alClient - TabOrder = 0 - TabStop = False - object TabSheet2: TTabSheet - Caption = 'Styles' - ImageIndex = 1 - OnShow = TabSheet2Show - object GroupBox2: TGroupBox - Left = 0 - Top = 36 - Width = 282 - Height = 301 - Align = alBottom - Caption = ' StyleRepository Options ' - TabOrder = 1 - object RadioButton1: TRadioButton - Left = 16 - Top = 28 - Width = 169 - Height = 17 - Caption = 'Create New StyleRepository' - Checked = True - TabOrder = 0 - TabStop = True - OnClick = RadioButton1Click - end - object RadioButton2: TRadioButton - Left = 16 - Top = 100 - Width = 173 - Height = 17 - Caption = 'Use Existing StyleRepository' - TabOrder = 2 - OnClick = RadioButton2Click - end - object Edit1: TEdit - Left = 36 - Top = 52 - Width = 229 - Height = 21 - TabOrder = 1 - end - object ComboBox1: TComboBox - Left = 36 - Top = 124 - Width = 229 - Height = 21 - Style = csDropDownList - Color = clBtnFace - Enabled = False - ItemHeight = 13 - TabOrder = 3 - end - end - object cbImportStyles: TCheckBox - Left = 4 - Top = 8 - Width = 97 - Height = 17 - Caption = 'Import Styles' - Checked = True - State = cbChecked - TabOrder = 0 - OnClick = cbImportStylesClick - end - end - end - end -end diff --git a/internal/x.46/Lib/D11/cxInplaceContainer.dcu b/internal/x.46/Lib/D11/cxInplaceContainer.dcu deleted file mode 100644 index 4afe3e3f..00000000 Binary files a/internal/x.46/Lib/D11/cxInplaceContainer.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxInplaceContainerReg.dcu b/internal/x.46/Lib/D11/cxInplaceContainerReg.dcu deleted file mode 100644 index 5725b5c5..00000000 Binary files a/internal/x.46/Lib/D11/cxInplaceContainerReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLabel.dcu b/internal/x.46/Lib/D11/cxLabel.dcu deleted file mode 100644 index 8fc306b8..00000000 Binary files a/internal/x.46/Lib/D11/cxLabel.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLibraryConsts.dcu b/internal/x.46/Lib/D11/cxLibraryConsts.dcu deleted file mode 100644 index 3ce64d2f..00000000 Binary files a/internal/x.46/Lib/D11/cxLibraryConsts.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLibraryD11.dcp b/internal/x.46/Lib/D11/cxLibraryD11.dcp deleted file mode 100644 index 89e065db..00000000 Binary files a/internal/x.46/Lib/D11/cxLibraryD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLibraryReg.dcu b/internal/x.46/Lib/D11/cxLibraryReg.dcu deleted file mode 100644 index 12a9cdf9..00000000 Binary files a/internal/x.46/Lib/D11/cxLibraryReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLibraryStrs.dcu b/internal/x.46/Lib/D11/cxLibraryStrs.dcu deleted file mode 100644 index e28c851f..00000000 Binary files a/internal/x.46/Lib/D11/cxLibraryStrs.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLike.dcu b/internal/x.46/Lib/D11/cxLike.dcu deleted file mode 100644 index a71edec5..00000000 Binary files a/internal/x.46/Lib/D11/cxLike.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxListBox.dcu b/internal/x.46/Lib/D11/cxListBox.dcu deleted file mode 100644 index 69e34924..00000000 Binary files a/internal/x.46/Lib/D11/cxListBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxListView.dcu b/internal/x.46/Lib/D11/cxListView.dcu deleted file mode 100644 index 0131f9b1..00000000 Binary files a/internal/x.46/Lib/D11/cxListView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLocalization.dcu b/internal/x.46/Lib/D11/cxLocalization.dcu deleted file mode 100644 index 9baa5aaf..00000000 Binary files a/internal/x.46/Lib/D11/cxLocalization.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLookAndFeelPainters.dcu b/internal/x.46/Lib/D11/cxLookAndFeelPainters.dcu deleted file mode 100644 index ac5b1a43..00000000 Binary files a/internal/x.46/Lib/D11/cxLookAndFeelPainters.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLookAndFeelPainters.res b/internal/x.46/Lib/D11/cxLookAndFeelPainters.res deleted file mode 100644 index f380b79f..00000000 Binary files a/internal/x.46/Lib/D11/cxLookAndFeelPainters.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLookAndFeels.dcu b/internal/x.46/Lib/D11/cxLookAndFeels.dcu deleted file mode 100644 index 11cd8c72..00000000 Binary files a/internal/x.46/Lib/D11/cxLookAndFeels.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLookupDBGrid.dcu b/internal/x.46/Lib/D11/cxLookupDBGrid.dcu deleted file mode 100644 index 95160ca9..00000000 Binary files a/internal/x.46/Lib/D11/cxLookupDBGrid.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLookupEdit.dcu b/internal/x.46/Lib/D11/cxLookupEdit.dcu deleted file mode 100644 index b4b742c9..00000000 Binary files a/internal/x.46/Lib/D11/cxLookupEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxLookupGrid.dcu b/internal/x.46/Lib/D11/cxLookupGrid.dcu deleted file mode 100644 index 5ce735e9..00000000 Binary files a/internal/x.46/Lib/D11/cxLookupGrid.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxMCListBox.dcu b/internal/x.46/Lib/D11/cxMCListBox.dcu deleted file mode 100644 index 1bc802ac..00000000 Binary files a/internal/x.46/Lib/D11/cxMCListBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxMRUEdit.dcu b/internal/x.46/Lib/D11/cxMRUEdit.dcu deleted file mode 100644 index 1561618f..00000000 Binary files a/internal/x.46/Lib/D11/cxMRUEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxMaskEdit.dcu b/internal/x.46/Lib/D11/cxMaskEdit.dcu deleted file mode 100644 index ba78a41f..00000000 Binary files a/internal/x.46/Lib/D11/cxMaskEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxMaskEditTextEditor.dcu b/internal/x.46/Lib/D11/cxMaskEditTextEditor.dcu deleted file mode 100644 index ab0039bc..00000000 Binary files a/internal/x.46/Lib/D11/cxMaskEditTextEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxMaskEditTextEditor.dfm b/internal/x.46/Lib/D11/cxMaskEditTextEditor.dfm deleted file mode 100644 index b1593d36..00000000 --- a/internal/x.46/Lib/D11/cxMaskEditTextEditor.dfm +++ /dev/null @@ -1,71 +0,0 @@ -object cxMaskEditTextEditorDlg: TcxMaskEditTextEditorDlg - Left = 327 - Top = 323 - BorderStyle = bsDialog - Caption = 'Masked Text Editor' - ClientHeight = 151 - ClientWidth = 466 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = False - OnKeyDown = FormKeyDown - OnShow = FormShow - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Label1: TLabel - Left = 8 - Top = 24 - Width = 47 - Height = 13 - Caption = 'Input text:' - end - object Label2: TLabel - Left = 8 - Top = 62 - Width = 49 - Height = 13 - Caption = 'Edit mask:' - end - object Label3: TLabel - Left = 64 - Top = 62 - Width = 3 - Height = 13 - end - object Bevel1: TBevel - Left = 8 - Top = 96 - Width = 449 - Height = 2 - end - object cxMaskEdit1: TcxMaskEdit - Tag = 25 - Left = 64 - Top = 20 - Width = 391 - Height = 21 - Properties.IgnoreMaskBlank = True - Properties.MaxLength = 0 - TabOrder = 0 - end - object cxButton2: TButton - Left = 352 - Top = 112 - Width = 105 - Height = 25 - Caption = 'Cancel' - TabOrder = 1 - OnClick = cxButton2Click - end - object cxButton1: TButton - Left = 240 - Top = 112 - Width = 105 - Height = 25 - Caption = 'OK' - TabOrder = 2 - OnClick = cxButton1Click - end -end diff --git a/internal/x.46/Lib/D11/cxMemo.dcu b/internal/x.46/Lib/D11/cxMemo.dcu deleted file mode 100644 index ceec58a6..00000000 Binary files a/internal/x.46/Lib/D11/cxMemo.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxNavigator.dcu b/internal/x.46/Lib/D11/cxNavigator.dcu deleted file mode 100644 index 876da0ec..00000000 Binary files a/internal/x.46/Lib/D11/cxNavigator.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPC.dcu b/internal/x.46/Lib/D11/cxPC.dcu deleted file mode 100644 index 35500523..00000000 Binary files a/internal/x.46/Lib/D11/cxPC.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPCConsts.dcu b/internal/x.46/Lib/D11/cxPCConsts.dcu deleted file mode 100644 index e830ab53..00000000 Binary files a/internal/x.46/Lib/D11/cxPCConsts.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPCGoDialog.dcu b/internal/x.46/Lib/D11/cxPCGoDialog.dcu deleted file mode 100644 index 227c5b2f..00000000 Binary files a/internal/x.46/Lib/D11/cxPCGoDialog.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPCPainters.dcu b/internal/x.46/Lib/D11/cxPCPainters.dcu deleted file mode 100644 index 0323728d..00000000 Binary files a/internal/x.46/Lib/D11/cxPCPainters.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPCPaintersFactory.dcu b/internal/x.46/Lib/D11/cxPCPaintersFactory.dcu deleted file mode 100644 index d77313df..00000000 Binary files a/internal/x.46/Lib/D11/cxPCPaintersFactory.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPCReg.dcu b/internal/x.46/Lib/D11/cxPCReg.dcu deleted file mode 100644 index ff4f054f..00000000 Binary files a/internal/x.46/Lib/D11/cxPCReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPageControlD11.dcp b/internal/x.46/Lib/D11/cxPageControlD11.dcp deleted file mode 100644 index 9eaa7524..00000000 Binary files a/internal/x.46/Lib/D11/cxPageControlD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxProgressBar.dcu b/internal/x.46/Lib/D11/cxProgressBar.dcu deleted file mode 100644 index dfeaca00..00000000 Binary files a/internal/x.46/Lib/D11/cxProgressBar.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPropEditors.dcu b/internal/x.46/Lib/D11/cxPropEditors.dcu deleted file mode 100644 index 206c013f..00000000 Binary files a/internal/x.46/Lib/D11/cxPropEditors.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPropertiesConverters.dcu b/internal/x.46/Lib/D11/cxPropertiesConverters.dcu deleted file mode 100644 index b4fd4e50..00000000 Binary files a/internal/x.46/Lib/D11/cxPropertiesConverters.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPropertiesStore.dcu b/internal/x.46/Lib/D11/cxPropertiesStore.dcu deleted file mode 100644 index 9cae5e62..00000000 Binary files a/internal/x.46/Lib/D11/cxPropertiesStore.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPropertiesStoreEditor.dcu b/internal/x.46/Lib/D11/cxPropertiesStoreEditor.dcu deleted file mode 100644 index 0c01ecf6..00000000 Binary files a/internal/x.46/Lib/D11/cxPropertiesStoreEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxPropertiesStoreEditor.dfm b/internal/x.46/Lib/D11/cxPropertiesStoreEditor.dfm deleted file mode 100644 index 2b463aa8..00000000 --- a/internal/x.46/Lib/D11/cxPropertiesStoreEditor.dfm +++ /dev/null @@ -1,1113 +0,0 @@ -object frmPropertiesStoreEditor: TfrmPropertiesStoreEditor - Left = 412 - Top = 178 - Width = 393 - Height = 553 - Caption = 'PropertiesStore Editor' - Color = clBtnFace - Constraints.MinHeight = 553 - Constraints.MinWidth = 393 - OldCreateOrder = False - OnCreate = FormCreate - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlClient: TPanel - Left = 0 - Top = 33 - Width = 385 - Height = 486 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object pnlLeftTree: TPanel - Left = 0 - Top = 0 - Width = 272 - Height = 486 - Align = alClient - BevelOuter = bvNone - BorderWidth = 4 - TabOrder = 0 - object pnlLeftTreeTop: TPanel - Left = 4 - Top = 4 - Width = 264 - Height = 29 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblFindComponent: TLabel - Left = 7 - Top = 6 - Width = 80 - Height = 13 - Caption = 'Find Component:' - end - object edFindComponent: TEdit - Left = 96 - Top = 4 - Width = 165 - Height = 21 - TabOrder = 0 - OnKeyDown = edFindComponentKeyDown - end - end - object Tree: TTreeView - Left = 4 - Top = 33 - Width = 264 - Height = 449 - Align = alClient - Indent = 19 - ReadOnly = True - RightClickSelect = True - TabOrder = 0 - OnContextPopup = TreeContextPopup - OnCustomDrawItem = TreeCustomDrawItem - OnDeletion = TreeDeletion - OnKeyDown = TreeKeyDown - end - end - object pnlButtons: TPanel - Left = 272 - Top = 0 - Width = 113 - Height = 486 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object Panel1: TPanel - Left = 0 - Top = 348 - Width = 113 - Height = 138 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - end - object Panel2: TPanel - Left = 0 - Top = 0 - Width = 113 - Height = 348 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object btnOK: TButton - Left = 4 - Top = 32 - Width = 105 - Height = 25 - Caption = 'OK' - TabOrder = 0 - OnClick = btnOKClick - end - object btnCancel: TButton - Left = 4 - Top = 64 - Width = 105 - Height = 25 - Caption = 'Cancel' - TabOrder = 1 - OnClick = btnCancelClick - end - end - end - end - object ToolBar: TToolBar - Left = 0 - Top = 0 - Width = 385 - Height = 33 - ButtonHeight = 30 - ButtonWidth = 31 - Caption = 'ToolBar' - Flat = True - Images = ImageList1 - TabOrder = 1 - object btnGroupByComponents: TToolButton - Left = 0 - Top = 0 - Hint = 'Group by components' - Action = actGroupByComponents - ImageIndex = 0 - ParentShowHint = False - ShowHint = True - end - object btnGroupByProperties: TToolButton - Left = 31 - Top = 0 - Hint = 'Group by properties' - Action = actGroupByProperties - ImageIndex = 1 - ParentShowHint = False - ShowHint = True - end - object ToolButton3: TToolButton - Left = 62 - Top = 0 - Width = 8 - Caption = 'ToolButton3' - ImageIndex = 2 - Style = tbsSeparator - end - object btnReset: TToolButton - Left = 70 - Top = 0 - Hint = 'Reset' - Caption = 'btnReset' - ImageIndex = 2 - ParentShowHint = False - ShowHint = True - OnClick = btnResetClick - end - object btnCheckAll: TToolButton - Left = 101 - Top = 0 - Hint = 'Check all' - Caption = 'btnCheckAll' - ImageIndex = 3 - ParentShowHint = False - ShowHint = True - OnClick = btnCheckAllClick - end - object btnUncheckAll: TToolButton - Left = 132 - Top = 0 - Hint = 'Uncheck all' - Caption = 'btnUncheckAll' - ImageIndex = 4 - ParentShowHint = False - ShowHint = True - OnClick = btnUncheckAllClick - end - object btnInvertChecking: TToolButton - Left = 163 - Top = 0 - Hint = 'Invert checking' - Caption = 'btnInvertChecking' - ImageIndex = 5 - ParentShowHint = False - ShowHint = True - OnClick = btnInvertCheckingClick - end - end - object ActionList1: TActionList - Left = 356 - Top = 4 - object actGroupByComponents: TAction - Caption = 'GroupByComponents' - OnExecute = actGroupByComponentsExecute - end - object actGroupByProperties: TAction - Caption = 'GroupByProperties' - OnExecute = actGroupByPropertiesExecute - end - end - object ImageList1: TImageList - Height = 24 - Width = 24 - Left = 324 - Top = 4 - Bitmap = { - 494C010106000900040018001800FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 000000000000360000002800000060000000480000000100200000000000006C - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF0000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 00008000000080000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000008080800000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 00008000000080000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF0000000000000080808000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FFFFFF00FF0000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FFFFFF00FF000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF0000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000808080000000000080808000FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 00000080000000000000000000000000000080808000FFFFFF00800000008000 - 0000800000008000000080000000800000008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000008000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000080 - 00000080000000800000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000080 - 0000008000000080000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000000000000000000000000000008000000080 - 00000080000000800000008000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000000000000000000000000000008000000080 - 0000008000000080000000800000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FFFFFF00FF00000000000000000000000000000000000000000000000000 - 00000080000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FFFFFF00FF00000000000000000000000000000000000000000000000000 - 0000008000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000008000000000000000000000000000000080 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000008000000000000000000000000000000080 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800000000000000000000080000000800000008000000000 - 0000000000000000000000000000000000008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800000000000000000000080000000800000008000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FF0000000000000000000000000000000000 - 00000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000FF0000000000000000000000000000000000 - 0000FFFFFF0000000000FFFFFF000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FF000000FF00000000000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 000080000000800000008000000080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000FF000000FF00000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C0C0 - C00000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000FF000000FF000000FF000000FF000000FF000000FF000000000000000000 - 0000FFFFFF0000000000FFFFFF000000000000000000FFFFFF0000000000C0C0 - C00000000000000000000000000000000000000000000000000000000000FF00 - 0000000000000000000000000000FF000000FF00000000000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000FF0000000000000000000000FF000000FF00000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C0C0 - C00000000000808080000000000000000000000000000000000000000000FF00 - 0000000000000000000000000000FF0000000000000000000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000FF0000000000000000000000FF0000000000000000000000000000000000 - 0000FFFFFF00FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000C0C0 - C00000000000808080000000000000000000000000000000000000000000FF00 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000C0C0C000C0C0 - C000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 00008000000080000000FFFFFF00000000000000000000000000000000000000 - 0000FF0000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000FFFFFF0000000000FFFFFF000000000000000000C0C0 - C00080000000808080000000000000000000000000000000000000000000FF00 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000800000C0C0C000C0C0C00000800000008000000080 - 00000080000000800000C0C0C000C0C0C0000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080000000FFFFFF00000000000000000000000000000000000000 - 0000FF0000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF0000000000FFFFFF00FFFFFF000000 - 0000800000008000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C0C0C000C0C0C000C0C0C000C0C0C0000000 - 0000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000800000008000000080000000800000008000000000 - 0000000000000000000000800000C0C0C000C0C0C00000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 00008000000080000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000C0C0C00000000000FFFFFF00FFFFFF00FFFFFF000000 - 0000800000008000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000800000008000000080000000800000000000000000 - 0000000000000000000000000000008000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF008000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000800000008000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000800000008000000080000000800000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF008000 - 000080000000800000008000000080000000800000008000000080000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 00000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000008080800080808000808080008080 - 8000808080008080800000000000000000000000000000000000FFFFFF000000 - 000000000000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000800000008000000080000000800000008000000000 - 00000000000000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C0000000000000000000000000000000000080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000000000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080000000800000008000000080000000800000C0C0C000C0C0 - C0000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF0000000000000000000000000000000000000000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 000000000000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000800000008000000080000000800000C0C0C000C0C0 - C0000000000000000000000000000000000080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FFFFFF00FF00000000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000080000000000000000000000000 - 0000000000000000000000800000008000000080000000800000C0C0C0000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF000000FF00000000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000800000000000000000 - 0000000000000080000000800000008000000080000000800000C0C0C0000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 800080808000808080008080800000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF0000000000FFFFFF0000000000FFFFFF0000000000FFFFFF00000000000000 - 0000000000008000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008000000080 - 0000008000000080000000800000C0C0C0000000000000800000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 000000800000000000000000000000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFF - FF00000000008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000080 - 00000080000000800000000000000000000000000000000000000000000000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000000000000000000000000000008000000080 - 00000080000000800000008000000000000000000000000000000000000000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FFFFFF00FF00000000000000000000000000000000000000000000000000 - 0000008000000000000000000000000000000000000000000000000000000000 - 00000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF000000FF00000000000000008000000000000000000000000000000080 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800000000000000000000080000000800000008000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000060000000480000000100010000000000600300000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFF000000000000FF8000FF - 8000000000000000FF8000FF8000000000000000FF8000FF8000000000000000 - FF8000FF8000000000000000FF8000FF8000000000000000FF8000FF80000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000001F700 - 01F70000000000000001E30001E30000000000000001C10001C1000000000000 - 0001F70001F70000000000000000EF0000EF00000000000000011F00011F0000 - 00000000FFFFFFFFFFFF000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFE01FFF - F87FFFFFFFFF8000FFE01FFEF03FFFFFFFFF8000FEE007FE601FFFFFFFFF8000 - FE6007E0200FFFFFFFFF8000F02001EE6007FFFFFFFF8000F66001EEE003FFFF - FFFF8000F6E001EFF001FFC1FF000000F7E001EFF801FC00FF000000F7E001FF - FC01FC1C7F000000FFF801800E01FC3EFF000000F87801800F03FC3FFF000000 - E01E01800F87FC1C0F000000C00E01800FFFFFF80F000000C00FFF800FFFFFFC - 0F0000008007FF800FFFFF7C1F0000008007FF800FFFFFB81F0000008007FF80 - 0BFFFFC0BF0001F78007FF8001FFFFFFFF0001E3C00FFF8001FFFFFFFF0001C1 - C00FFFFE01FFFFFFFF0001F7E01FFFFF09FFFFFFFF0000EFF87FFFFFFFFFFFFF - FF00011FFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/cxRadioGroup.dcu b/internal/x.46/Lib/D11/cxRadioGroup.dcu deleted file mode 100644 index e98c3a32..00000000 Binary files a/internal/x.46/Lib/D11/cxRadioGroup.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxRegExpr.dcu b/internal/x.46/Lib/D11/cxRegExpr.dcu deleted file mode 100644 index cb791186..00000000 Binary files a/internal/x.46/Lib/D11/cxRegExpr.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxRichEdit.dcu b/internal/x.46/Lib/D11/cxRichEdit.dcu deleted file mode 100644 index 5e7c47d8..00000000 Binary files a/internal/x.46/Lib/D11/cxRichEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxScrollBar.dcu b/internal/x.46/Lib/D11/cxScrollBar.dcu deleted file mode 100644 index 0848c165..00000000 Binary files a/internal/x.46/Lib/D11/cxScrollBar.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxScrollCursors.res b/internal/x.46/Lib/D11/cxScrollCursors.res deleted file mode 100644 index fa3a5867..00000000 Binary files a/internal/x.46/Lib/D11/cxScrollCursors.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxSelectEditRepositoryItem.dcu b/internal/x.46/Lib/D11/cxSelectEditRepositoryItem.dcu deleted file mode 100644 index b59366af..00000000 Binary files a/internal/x.46/Lib/D11/cxSelectEditRepositoryItem.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxSelectEditRepositoryItem.dfm b/internal/x.46/Lib/D11/cxSelectEditRepositoryItem.dfm deleted file mode 100644 index 5bcaf4af..00000000 --- a/internal/x.46/Lib/D11/cxSelectEditRepositoryItem.dfm +++ /dev/null @@ -1,71 +0,0 @@ -object cxSelectRepositoryItem: TcxSelectRepositoryItem - Left = 403 - Top = 209 - BorderStyle = bsDialog - Caption = 'Select EditRepositoryItem' - ClientHeight = 392 - ClientWidth = 346 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Label1: TLabel - Left = 10 - Top = 320 - Width = 56 - Height = 13 - Caption = 'Description:' - end - object lbItems: TListBox - Left = 8 - Top = 8 - Width = 233 - Height = 305 - ItemHeight = 13 - Sorted = True - TabOrder = 0 - OnClick = lbItemsClick - OnMouseDown = lbItemsMouseDown - end - object Panel1: TPanel - Left = 8 - Top = 335 - Width = 329 - Height = 49 - BevelInner = bvLowered - Color = clInfoBk - TabOrder = 3 - object lbHint: TLabel - Left = 4 - Top = 4 - Width = 321 - Height = 41 - AutoSize = False - Caption = 'LongHint' - WordWrap = True - end - end - object btOk: TButton - Left = 256 - Top = 8 - Width = 75 - Height = 25 - Caption = '&Ok' - Default = True - Enabled = False - ModalResult = 1 - TabOrder = 1 - end - object btCancel: TButton - Left = 256 - Top = 40 - Width = 75 - Height = 25 - Cancel = True - Caption = '&Cancel' - ModalResult = 2 - TabOrder = 2 - end -end diff --git a/internal/x.46/Lib/D11/cxShellBrowser.dcu b/internal/x.46/Lib/D11/cxShellBrowser.dcu deleted file mode 100644 index 8dfd33eb..00000000 Binary files a/internal/x.46/Lib/D11/cxShellBrowser.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxShellBrowser.dfm b/internal/x.46/Lib/D11/cxShellBrowser.dfm deleted file mode 100644 index 6e0e45c0..00000000 --- a/internal/x.46/Lib/D11/cxShellBrowser.dfm +++ /dev/null @@ -1,68 +0,0 @@ -object cxShellBrowserDlg: TcxShellBrowserDlg - Left = 455 - Top = 160 - ActiveControl = cxStv - AutoScroll = False - BorderIcons = [biSystemMenu] - Caption = 'Browse for Folder' - ClientHeight = 358 - ClientWidth = 308 - Color = clBtnFace - Constraints.MinHeight = 300 - Constraints.MinWidth = 250 - OldCreateOrder = True - Position = poScreenCenter - OnCreate = FormCreate - OnPaint = FormPaint - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - object lblFolder: TcxLabel - Left = 12 - Top = 8 - Caption = 'Current Folder' - Transparent = True - end - object cxStv: TcxShellTreeView - Left = 12 - Top = 56 - Width = 284 - Height = 261 - Anchors = [akLeft, akTop, akRight, akBottom] - HideSelection = False - Indent = 19 - Options.ShowNonFolders = False - RightClickSelect = True - TabOrder = 0 - OnChange = cxStvChange - end - object cxTeFolder: TcxTextEdit - Left = 12 - Top = 24 - Anchors = [akLeft, akTop, akRight, akBottom] - Properties.ReadOnly = True - TabOrder = 1 - Width = 284 - end - object cxButton1: TcxButton - Left = 139 - Top = 323 - Width = 75 - Height = 25 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object cxButton2: TcxButton - Left = 219 - Top = 323 - Width = 75 - Height = 25 - Anchors = [akRight, akBottom] - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 3 - end -end diff --git a/internal/x.46/Lib/D11/cxShellBrowserDialog.dcu b/internal/x.46/Lib/D11/cxShellBrowserDialog.dcu deleted file mode 100644 index 6dbc0fe7..00000000 Binary files a/internal/x.46/Lib/D11/cxShellBrowserDialog.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxShellComboBox.dcu b/internal/x.46/Lib/D11/cxShellComboBox.dcu deleted file mode 100644 index ca713b0b..00000000 Binary files a/internal/x.46/Lib/D11/cxShellComboBox.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxShellCommon.dcu b/internal/x.46/Lib/D11/cxShellCommon.dcu deleted file mode 100644 index 065f33c4..00000000 Binary files a/internal/x.46/Lib/D11/cxShellCommon.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxShellControls.dcu b/internal/x.46/Lib/D11/cxShellControls.dcu deleted file mode 100644 index f4d8bcc1..00000000 Binary files a/internal/x.46/Lib/D11/cxShellControls.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxShellDlgs.dcu b/internal/x.46/Lib/D11/cxShellDlgs.dcu deleted file mode 100644 index 64a5f93c..00000000 Binary files a/internal/x.46/Lib/D11/cxShellDlgs.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxShellEditRepositoryItems.dcu b/internal/x.46/Lib/D11/cxShellEditRepositoryItems.dcu deleted file mode 100644 index 7b17e9ec..00000000 Binary files a/internal/x.46/Lib/D11/cxShellEditRepositoryItems.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxShellEditorsReg.dcu b/internal/x.46/Lib/D11/cxShellEditorsReg.dcu deleted file mode 100644 index 209a04ec..00000000 Binary files a/internal/x.46/Lib/D11/cxShellEditorsReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxShellListView.dcu b/internal/x.46/Lib/D11/cxShellListView.dcu deleted file mode 100644 index 6a5c6a70..00000000 Binary files a/internal/x.46/Lib/D11/cxShellListView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxShellTreeView.dcu b/internal/x.46/Lib/D11/cxShellTreeView.dcu deleted file mode 100644 index 91a3d594..00000000 Binary files a/internal/x.46/Lib/D11/cxShellTreeView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxSpinButton.dcu b/internal/x.46/Lib/D11/cxSpinButton.dcu deleted file mode 100644 index 5efb964b..00000000 Binary files a/internal/x.46/Lib/D11/cxSpinButton.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxSpinEdit.dcu b/internal/x.46/Lib/D11/cxSpinEdit.dcu deleted file mode 100644 index 33eadd82..00000000 Binary files a/internal/x.46/Lib/D11/cxSpinEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxSplitter.dcu b/internal/x.46/Lib/D11/cxSplitter.dcu deleted file mode 100644 index fd8bf8ac..00000000 Binary files a/internal/x.46/Lib/D11/cxSplitter.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxSplitterEditor.dcu b/internal/x.46/Lib/D11/cxSplitterEditor.dcu deleted file mode 100644 index 976b9d67..00000000 Binary files a/internal/x.46/Lib/D11/cxSplitterEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxSplitterEditor.dfm b/internal/x.46/Lib/D11/cxSplitterEditor.dfm deleted file mode 100644 index 90cec4f1..00000000 --- a/internal/x.46/Lib/D11/cxSplitterEditor.dfm +++ /dev/null @@ -1,255 +0,0 @@ -object cxSplitEditor: TcxSplitEditor - Left = 224 - Top = 210 - ActiveControl = cxCbAhd - BorderStyle = bsDialog - ClientHeight = 383 - ClientWidth = 466 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object cxGroupBox1: TcxGroupBox - Left = 8 - Top = 200 - Width = 449 - Height = 145 - Caption = ' Preview ' - TabOrder = 0 - object Panel1: TPanel - Left = 8 - Top = 16 - Width = 426 - Height = 121 - BevelOuter = bvNone - TabOrder = 0 - object cxListBox1: TcxListBox - Left = 0 - Top = 0 - Width = 145 - Height = 121 - TabStop = False - Align = alLeft - ItemHeight = 13 - TabOrder = 0 - end - object cxSplit: TcxSplitter - Left = 145 - Top = 0 - Width = 8 - Height = 121 - AutoPosition = False - AutoSnap = True - Control = cxListBox1 - end - object cxListBox2: TcxListBox - Left = 153 - Top = 0 - Width = 273 - Height = 121 - TabStop = False - Align = alClient - ItemHeight = 13 - TabOrder = 2 - end - end - end - object cxGroupBox2: TcxGroupBox - Left = 8 - Top = 8 - Width = 153 - Height = 189 - Caption = ' Operation ' - TabOrder = 1 - object Label1: TLabel - Left = 27 - Top = 119 - Width = 40 - Height = 13 - Caption = 'Min Size' - end - object Label2: TLabel - Left = 28 - Top = 61 - Width = 88 - Height = 13 - Caption = 'Position after open' - end - object cxCbAhd: TcxCheckBox - Left = 8 - Top = 16 - Width = 121 - Height = 21 - Caption = 'Allow HotZone Drag' - TabOrder = 0 - OnClick = cxCbAhdClick - end - object cxCbAp: TcxCheckBox - Left = 8 - Top = 40 - Width = 105 - Height = 21 - Caption = 'Auto Position' - TabOrder = 1 - OnClick = cxCbApClick - end - object cxCbSnap: TcxCheckBox - Left = 8 - Top = 99 - Width = 105 - Height = 21 - Caption = 'Auto Snap' - TabOrder = 3 - OnClick = cxCbSnapClick - end - object cxCbRu: TcxCheckBox - Left = 8 - Top = 161 - Width = 105 - Height = 21 - Caption = 'Resize Update' - TabOrder = 5 - OnClick = cxCbRuClick - end - object cxSeMs: TcxSpinEdit - Left = 27 - Top = 133 - Width = 89 - Height = 21 - Properties.MaxValue = 145.000000000000000000 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSeMsPropertiesChange - TabOrder = 4 - Value = 30 - end - object cxSePao: TcxSpinEdit - Left = 28 - Top = 75 - Width = 89 - Height = 21 - Properties.MaxValue = 200.000000000000000000 - Properties.MinValue = 1.000000000000000000 - Properties.SpinButtons.ShowFastButtons = True - Properties.OnChange = cxSePaoPropertiesChange - TabOrder = 2 - Value = 200 - end - end - object cxGroupBox3: TcxGroupBox - Left = 168 - Top = 8 - Width = 289 - Height = 189 - Caption = ' Hot Zone ' - TabOrder = 2 - object Label3: TLabel - Left = 9 - Top = 120 - Width = 73 - Height = 13 - Caption = 'HotZone Width' - end - object cxRbHzNone: TcxRadioButton - Left = 9 - Top = 40 - Width = 113 - Height = 17 - Caption = 'None' - Checked = True - TabOrder = 1 - TabStop = True - OnClick = cxRbHzNoneClick - end - object cxRbHzMp8: TcxRadioButton - Left = 9 - Top = 65 - Width = 96 - Height = 17 - Hint = 'MediaPlayer8' - Caption = 'Media Player 8' - TabOrder = 2 - OnClick = cxRbHzMp8Click - end - object cxRbHzMp9: TcxRadioButton - Left = 106 - Top = 65 - Width = 113 - Height = 17 - Hint = 'MediaPlayer9' - Caption = 'Media Player 9' - TabOrder = 3 - OnClick = cxRbHzMp8Click - end - object cxRbHzSimple: TcxRadioButton - Left = 106 - Top = 90 - Width = 113 - Height = 17 - Hint = 'Simple' - Caption = 'Simple' - TabOrder = 4 - OnClick = cxRbHzMp8Click - end - object cxRbHzXp: TcxRadioButton - Left = 9 - Top = 90 - Width = 96 - Height = 17 - Hint = 'XPTaskBar' - Caption = 'XP Task Bar' - TabOrder = 5 - OnClick = cxRbHzMp8Click - end - object cxCbHzVisible: TcxCheckBox - Left = 9 - Top = 16 - Width = 121 - Height = 21 - Caption = 'Visible' - Enabled = False - Properties.OnChange = cxCbHzVisiblePropertiesChange - TabOrder = 0 - end - object cxTbHzWidth: TcxTrackBar - Left = 8 - Top = 136 - Width = 273 - Height = 49 - Position = 10 - Properties.Frequency = 5 - Properties.Min = 10 - Properties.Max = 100 - Properties.SelectionStart = 30 - Properties.SelectionEnd = 60 - Properties.SelectionColor = clGreen - Properties.OnChange = cxTbHzWidthPropertiesChange - TabOrder = 6 - end - end - object cxBtnOK: TcxButton - Left = 304 - Top = 352 - Width = 75 - Height = 25 - Caption = 'OK' - ModalResult = 1 - TabOrder = 3 - end - object cxBtnCancel: TcxButton - Left = 384 - Top = 352 - Width = 75 - Height = 25 - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 4 - end - object cxLookAndFeelController1: TcxLookAndFeelController - Kind = lfFlat - NativeStyle = True - Left = 200 - Top = 344 - end -end diff --git a/internal/x.46/Lib/D11/cxStandardMask.dcu b/internal/x.46/Lib/D11/cxStandardMask.dcu deleted file mode 100644 index 27ad519e..00000000 Binary files a/internal/x.46/Lib/D11/cxStandardMask.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxStorage.dcu b/internal/x.46/Lib/D11/cxStorage.dcu deleted file mode 100644 index d4cc2ba9..00000000 Binary files a/internal/x.46/Lib/D11/cxStorage.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxStyleRepositoryEditor.dcu b/internal/x.46/Lib/D11/cxStyleRepositoryEditor.dcu deleted file mode 100644 index 008f1eff..00000000 Binary files a/internal/x.46/Lib/D11/cxStyleRepositoryEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxStyleRepositoryEditor.dfm b/internal/x.46/Lib/D11/cxStyleRepositoryEditor.dfm deleted file mode 100644 index 93e31b5c..00000000 --- a/internal/x.46/Lib/D11/cxStyleRepositoryEditor.dfm +++ /dev/null @@ -1,233 +0,0 @@ -inherited cxStyleRepositoryEditor: TcxStyleRepositoryEditor - Left = 333 - Top = 185 - Width = 317 - Height = 412 - Caption = 'StyleRepository editor' - Constraints.MinHeight = 350 - Constraints.MinWidth = 300 - Position = poDefaultPosOnly - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 0 - Top = 0 - Width = 309 - Height = 378 - ActivePage = tsStyles - Align = alClient - TabOrder = 0 - object tsStyles: TTabSheet - Caption = 'Styles' - object lbStyles: TListBox - Left = 0 - Top = 0 - Width = 210 - Height = 350 - Align = alClient - ItemHeight = 13 - MultiSelect = True - PopupMenu = pmStyles - TabOrder = 0 - OnClick = lbStylesClick - end - object pnlStyles: TPanel - Left = 210 - Top = 0 - Width = 91 - Height = 350 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btStyleAdd: TButton - Left = 9 - Top = 8 - Width = 75 - Height = 25 - Caption = '&Add' - TabOrder = 0 - OnClick = btStyleAddClick - end - object btStyleDelete: TButton - Left = 9 - Top = 40 - Width = 75 - Height = 25 - Caption = '&Delete' - TabOrder = 1 - OnClick = btStyleDeleteClick - end - object btClose: TButton - Left = 9 - Top = 316 - Width = 75 - Height = 26 - Anchors = [akLeft, akBottom] - Caption = '&Close' - TabOrder = 2 - OnClick = btCloseClick - end - end - end - object tsStyleSheets: TTabSheet - Caption = 'Style Sheets' - ImageIndex = 1 - object lbStyleSheets: TListBox - Left = 0 - Top = 0 - Width = 201 - Height = 350 - Align = alClient - ItemHeight = 13 - MultiSelect = True - PopupMenu = pmStyleSheets - TabOrder = 0 - OnClick = lbStyleSheetsClick - end - object pnlStyleSheets: TPanel - Left = 201 - Top = 0 - Width = 100 - Height = 350 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btStyleSheetAdd: TButton - Left = 9 - Top = 8 - Width = 85 - Height = 25 - Caption = '&Add...' - TabOrder = 0 - OnClick = btStyleSheetAddClick - end - object btStyleSheetDelete: TButton - Left = 9 - Top = 38 - Width = 85 - Height = 25 - Caption = '&Delete' - TabOrder = 1 - OnClick = btStyleSheetDeleteClick - end - object Button3: TButton - Left = 9 - Top = 316 - Width = 85 - Height = 26 - Anchors = [akLeft, akBottom] - Caption = '&Close' - TabOrder = 2 - OnClick = btCloseClick - end - object btnStyleSheetEdit: TButton - Left = 9 - Top = 68 - Width = 85 - Height = 25 - Caption = '&Edit...' - TabOrder = 3 - OnClick = btnStyleSheetEditClick - end - object btnStyleSheetsSave: TButton - Left = 9 - Top = 104 - Width = 85 - Height = 25 - Caption = '&Save to ini...' - TabOrder = 4 - OnClick = btnStyleSheetsSaveClick - end - object btnStyleSheetsLoad: TButton - Left = 9 - Top = 133 - Width = 85 - Height = 25 - Caption = '&Load from ini...' - TabOrder = 5 - OnClick = btnStyleSheetsLoadClick - end - object btnStyleSheetsPredefine: TButton - Left = 9 - Top = 163 - Width = 85 - Height = 25 - Caption = '&Predefined...' - TabOrder = 6 - OnClick = btnStyleSheetsPredefineClick - end - end - end - end - object pmStyles: TPopupMenu - Left = 40 - Top = 88 - object miStyleAdd: TMenuItem - Caption = 'Add' - ShortCut = 45 - OnClick = btStyleAddClick - end - object miStyleDelete: TMenuItem - Caption = 'Delete' - Enabled = False - ShortCut = 46 - OnClick = btStyleDeleteClick - end - object N1: TMenuItem - Caption = '-' - end - object miStyleSelectAll: TMenuItem - Caption = 'Select all' - Enabled = False - ShortCut = 16449 - OnClick = miStyleSelectAllClick - end - end - object pmStyleSheets: TPopupMenu - Left = 72 - Top = 168 - object miStyleSheetAdd: TMenuItem - Caption = 'Add...' - ShortCut = 45 - OnClick = btStyleSheetAddClick - end - object miStyleSheetDelete: TMenuItem - Caption = 'Delete' - Enabled = False - ShortCut = 46 - OnClick = btStyleSheetDeleteClick - end - object imStyleSheetEdit: TMenuItem - Caption = 'Edit...' - OnClick = btnStyleSheetEditClick - end - object MenuItem3: TMenuItem - Caption = '-' - end - object miStyleSheetSelectAll: TMenuItem - Caption = 'Select all' - Enabled = False - ShortCut = 16449 - OnClick = miStyleSheetSelectAllClick - end - end - object pmAddStyleSheet: TPopupMenu - Left = 128 - Top = 48 - end - object SaveDialog: TSaveDialog - DefaultExt = 'ini' - FileName = 'cxstyles.ini' - Filter = 'Ini files|*.ini' - Left = 160 - Top = 120 - end - object OpenDialog: TOpenDialog - DefaultExt = 'ini' - FileName = 'cxstyles.ini' - Filter = 'Ini files|*.ini' - Left = 160 - Top = 176 - end -end diff --git a/internal/x.46/Lib/D11/cxStyleSheetEditor.dcu b/internal/x.46/Lib/D11/cxStyleSheetEditor.dcu deleted file mode 100644 index 6b0703ce..00000000 Binary files a/internal/x.46/Lib/D11/cxStyleSheetEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxStyleSheetEditor.dfm b/internal/x.46/Lib/D11/cxStyleSheetEditor.dfm deleted file mode 100644 index 7e8310cf..00000000 --- a/internal/x.46/Lib/D11/cxStyleSheetEditor.dfm +++ /dev/null @@ -1,218 +0,0 @@ -object frmcxStyleSheetEditor: TfrmcxStyleSheetEditor - Left = 377 - Top = 147 - AutoScroll = False - BorderIcons = [biSystemMenu] - Caption = 'StyleSheet Editor' - ClientHeight = 338 - ClientWidth = 319 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - object pnlBottom: TPanel - Left = 0 - Top = 303 - Width = 319 - Height = 35 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - object Bevel: TBevel - Left = 0 - Top = 0 - Width = 319 - Height = 2 - Align = alTop - end - object pnlButtons: TPanel - Left = 150 - Top = 2 - Width = 169 - Height = 33 - Align = alRight - BevelOuter = bvNone - TabOrder = 0 - object btnOK: TButton - Left = 7 - Top = 4 - Width = 75 - Height = 25 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 0 - end - object bntCancel: TButton - Left = 88 - Top = 4 - Width = 75 - Height = 25 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - end - end - object pnlClient: TPanel - Left = 0 - Top = 0 - Width = 319 - Height = 303 - Align = alClient - BevelOuter = bvNone - BorderWidth = 4 - TabOrder = 1 - object pnlStyles: TPanel - Left = 4 - Top = 4 - Width = 163 - Height = 295 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object pnlStylesCaption: TPanel - Left = 0 - Top = 0 - Width = 163 - Height = 21 - Align = alTop - Alignment = taLeftJustify - BevelOuter = bvNone - Caption = 'Styles' - TabOrder = 0 - end - object pnlStylesClient: TPanel - Left = 0 - Top = 21 - Width = 163 - Height = 274 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object lbStyles: TListBox - Left = 0 - Top = 0 - Width = 163 - Height = 186 - Style = lbOwnerDrawVariable - Align = alClient - ItemHeight = 16 - MultiSelect = True - TabOrder = 0 - OnClick = lbStylesClick - OnDrawItem = lbStylesDrawItem - OnMeasureItem = lbStylesMeasureItem - end - object pnlStylesButtons: TPanel - Left = 0 - Top = 186 - Width = 163 - Height = 88 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object cbColor: TCheckBox - Left = 35 - Top = 33 - Width = 119 - Height = 25 - Caption = '&Color' - TabOrder = 0 - OnClick = cbClick - end - object btnBitmap: TButton - Left = 2 - Top = 4 - Width = 25 - Height = 25 - Caption = '...' - TabOrder = 1 - OnClick = btnBitmapClick - end - object btnColor1: TButton - Left = 2 - Top = 33 - Width = 25 - Height = 25 - Caption = '...' - TabOrder = 2 - OnClick = btnColor1Click - end - object btnFont1: TButton - Left = 2 - Top = 62 - Width = 25 - Height = 25 - Caption = '...' - TabOrder = 3 - OnClick = btnFont1Click - end - object cbFont: TCheckBox - Left = 35 - Top = 62 - Width = 119 - Height = 25 - Caption = '&Font' - TabOrder = 4 - OnClick = cbClick - end - object cbBitmap: TCheckBox - Left = 35 - Top = 4 - Width = 117 - Height = 25 - Caption = '&Bitmap' - TabOrder = 5 - OnClick = cbClick - end - end - end - end - object pnlPreview: TPanel - Left = 171 - Top = 4 - Width = 144 - Height = 295 - Align = alRight - Anchors = [akLeft, akTop, akRight, akBottom] - BevelOuter = bvNone - TabOrder = 1 - object pnlPreviewCaption: TPanel - Left = 0 - Top = 0 - Width = 144 - Height = 21 - Align = alTop - Alignment = taLeftJustify - BevelOuter = bvNone - Caption = 'Preview' - TabOrder = 0 - end - object pnlPreviewClient: TPanel - Left = 0 - Top = 21 - Width = 144 - Height = 274 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - end - end - end - object FontDialog: TFontDialog - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'MS Sans Serif' - Font.Style = [] - Left = 76 - Top = 28 - end - object ColorDialog: TColorDialog - Left = 44 - Top = 28 - end -end diff --git a/internal/x.46/Lib/D11/cxStyleSheetsLoad.dcu b/internal/x.46/Lib/D11/cxStyleSheetsLoad.dcu deleted file mode 100644 index 96fbc10b..00000000 Binary files a/internal/x.46/Lib/D11/cxStyleSheetsLoad.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxStyleSheetsLoad.dfm b/internal/x.46/Lib/D11/cxStyleSheetsLoad.dfm deleted file mode 100644 index 8cce4060..00000000 --- a/internal/x.46/Lib/D11/cxStyleSheetsLoad.dfm +++ /dev/null @@ -1,167 +0,0 @@ -object frmcxStyleSheetsLoad: TfrmcxStyleSheetsLoad - Left = 303 - Top = 129 - AutoScroll = False - BorderIcons = [biSystemMenu] - Caption = 'Predefined StyleSheets' - ClientHeight = 329 - ClientWidth = 659 - Color = clBtnFace - Constraints.MinHeight = 296 - Constraints.MinWidth = 315 - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object pnlBottom: TPanel - Left = 0 - Top = 294 - Width = 659 - Height = 35 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - object Bevel: TBevel - Left = 0 - Top = 0 - Width = 659 - Height = 2 - Align = alTop - end - object btnLoad: TButton - Left = 497 - Top = 8 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'Load' - Default = True - ModalResult = 1 - TabOrder = 0 - end - object btnClose: TButton - Left = 580 - Top = 8 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Close' - ModalResult = 2 - TabOrder = 1 - end - end - object pnlClient: TPanel - Left = 0 - Top = 0 - Width = 659 - Height = 294 - Align = alClient - BevelOuter = bvNone - BorderWidth = 5 - TabOrder = 1 - object pnlStyles: TPanel - Left = 5 - Top = 5 - Width = 297 - Height = 284 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object pnlStyleSheetClasses: TPanel - Left = 0 - Top = 0 - Width = 297 - Height = 25 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lbStyleSheetClass: TLabel - Left = 3 - Top = 1 - Width = 94 - Height = 18 - AutoSize = False - Caption = 'Style Sheet Class:' - Layout = tlCenter - end - object cbStyleSheetClasses: TComboBox - Left = 96 - Top = 0 - Width = 201 - Height = 21 - Style = csDropDownList - Anchors = [akTop, akRight] - DropDownCount = 10 - ItemHeight = 13 - TabOrder = 0 - end - end - object lbStyleSheets: TListBox - Left = 0 - Top = 25 - Width = 297 - Height = 259 - Align = alClient - ItemHeight = 13 - MultiSelect = True - TabOrder = 1 - end - end - object pnlPreview: TPanel - Left = 302 - Top = 5 - Width = 352 - Height = 284 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object Panel2: TPanel - Left = 0 - Top = 0 - Width = 5 - Height = 284 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - end - object Panel1: TPanel - Left = 5 - Top = 0 - Width = 347 - Height = 284 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object Panel3: TPanel - Left = 0 - Top = 0 - Width = 347 - Height = 25 - Align = alTop - Alignment = taLeftJustify - BevelOuter = bvNone - TabOrder = 0 - object lbPreview: TLabel - Left = 0 - Top = 0 - Width = 61 - Height = 21 - AutoSize = False - Caption = 'Preview' - Layout = tlCenter - end - end - object pnlPreviewClient: TPanel - Left = 0 - Top = 25 - Width = 347 - Height = 259 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - end - end - end - end -end diff --git a/internal/x.46/Lib/D11/cxStyles.dcu b/internal/x.46/Lib/D11/cxStyles.dcu deleted file mode 100644 index 2a04f6b4..00000000 Binary files a/internal/x.46/Lib/D11/cxStyles.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxTableViewEditor.dcu b/internal/x.46/Lib/D11/cxTableViewEditor.dcu deleted file mode 100644 index 025669ef..00000000 Binary files a/internal/x.46/Lib/D11/cxTableViewEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxTableViewEditor.dfm b/internal/x.46/Lib/D11/cxTableViewEditor.dfm deleted file mode 100644 index 51dc89be..00000000 --- a/internal/x.46/Lib/D11/cxTableViewEditor.dfm +++ /dev/null @@ -1,12 +0,0 @@ -inherited cxTableViewEditor: TcxTableViewEditor - Caption = 'cxTableViewEditor' - PixelsPerInch = 96 - TextHeight = 13 - inherited PViewEditor: TPanel - inherited PageControl1: TcxPageControl - inherited TSItems: TcxTabSheet - Caption = ' Columns ' - end - end - end -end diff --git a/internal/x.46/Lib/D11/cxTextEdit.dcu b/internal/x.46/Lib/D11/cxTextEdit.dcu deleted file mode 100644 index 32b9638f..00000000 Binary files a/internal/x.46/Lib/D11/cxTextEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxTimeEdit.dcu b/internal/x.46/Lib/D11/cxTimeEdit.dcu deleted file mode 100644 index 887eaf7b..00000000 Binary files a/internal/x.46/Lib/D11/cxTimeEdit.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxTrackBar.dcu b/internal/x.46/Lib/D11/cxTrackBar.dcu deleted file mode 100644 index 97b90cf9..00000000 Binary files a/internal/x.46/Lib/D11/cxTrackBar.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxTreeView.dcu b/internal/x.46/Lib/D11/cxTreeView.dcu deleted file mode 100644 index 2752dfd0..00000000 Binary files a/internal/x.46/Lib/D11/cxTreeView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxVariants.dcu b/internal/x.46/Lib/D11/cxVariants.dcu deleted file mode 100644 index 22f74f6a..00000000 Binary files a/internal/x.46/Lib/D11/cxVariants.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxVer.inc b/internal/x.46/Lib/D11/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/Lib/D11/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/Lib/D11/cxViewEditor.dcu b/internal/x.46/Lib/D11/cxViewEditor.dcu deleted file mode 100644 index d6446c97..00000000 Binary files a/internal/x.46/Lib/D11/cxViewEditor.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxViewEditor.dfm b/internal/x.46/Lib/D11/cxViewEditor.dfm deleted file mode 100644 index c7de9646..00000000 --- a/internal/x.46/Lib/D11/cxViewEditor.dfm +++ /dev/null @@ -1,21 +0,0 @@ -object cxViewEditor: TcxViewEditor - Left = 742 - Top = 104 - Caption = 'cxViewEditor' - ClientHeight = 313 - ClientWidth = 343 - Color = clBtnFace - OldCreateOrder = True - OnKeyPress = FormKeyPress - PixelsPerInch = 96 - TextHeight = 13 - object PViewEditor: TPanel - Left = 0 - Top = 0 - Width = 343 - Height = 313 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - end -end diff --git a/internal/x.46/Lib/D11/cxWWGridConverter.dcu b/internal/x.46/Lib/D11/cxWWGridConverter.dcu deleted file mode 100644 index d5a5f4d7..00000000 Binary files a/internal/x.46/Lib/D11/cxWWGridConverter.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/cxXLSExport.dcu b/internal/x.46/Lib/D11/cxXLSExport.dcu deleted file mode 100644 index 2df87c23..00000000 Binary files a/internal/x.46/Lib/D11/cxXLSExport.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dclcxEditorsD11.bpl b/internal/x.46/Lib/D11/dclcxEditorsD11.bpl deleted file mode 100644 index b678b845..00000000 Binary files a/internal/x.46/Lib/D11/dclcxEditorsD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dclcxEditorsD11.dcp b/internal/x.46/Lib/D11/dclcxEditorsD11.dcp deleted file mode 100644 index fc0161aa..00000000 Binary files a/internal/x.46/Lib/D11/dclcxEditorsD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dclcxExtEditorsD11.bpl b/internal/x.46/Lib/D11/dclcxExtEditorsD11.bpl deleted file mode 100644 index 717778cf..00000000 Binary files a/internal/x.46/Lib/D11/dclcxExtEditorsD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dclcxExtEditorsD11.dcp b/internal/x.46/Lib/D11/dclcxExtEditorsD11.dcp deleted file mode 100644 index d4eeb783..00000000 Binary files a/internal/x.46/Lib/D11/dclcxExtEditorsD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dclcxGridD11.bpl b/internal/x.46/Lib/D11/dclcxGridD11.bpl deleted file mode 100644 index f904d920..00000000 Binary files a/internal/x.46/Lib/D11/dclcxGridD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dclcxGridD11.dcp b/internal/x.46/Lib/D11/dclcxGridD11.dcp deleted file mode 100644 index 3547babc..00000000 Binary files a/internal/x.46/Lib/D11/dclcxGridD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dclcxLibraryD11.bpl b/internal/x.46/Lib/D11/dclcxLibraryD11.bpl deleted file mode 100644 index 3ce51425..00000000 Binary files a/internal/x.46/Lib/D11/dclcxLibraryD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dclcxLibraryD11.dcp b/internal/x.46/Lib/D11/dclcxLibraryD11.dcp deleted file mode 100644 index a781317b..00000000 Binary files a/internal/x.46/Lib/D11/dclcxLibraryD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dclcxPageControlD11.bpl b/internal/x.46/Lib/D11/dclcxPageControlD11.bpl deleted file mode 100644 index 744f9217..00000000 Binary files a/internal/x.46/Lib/D11/dclcxPageControlD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dclcxPageControlD11.dcp b/internal/x.46/Lib/D11/dclcxPageControlD11.dcp deleted file mode 100644 index 486b6ea3..00000000 Binary files a/internal/x.46/Lib/D11/dclcxPageControlD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dcldxCoreD11.bpl b/internal/x.46/Lib/D11/dcldxCoreD11.bpl deleted file mode 100644 index 8724d0f3..00000000 Binary files a/internal/x.46/Lib/D11/dcldxCoreD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dcldxCoreD11.dcp b/internal/x.46/Lib/D11/dcldxCoreD11.dcp deleted file mode 100644 index 1076c4b3..00000000 Binary files a/internal/x.46/Lib/D11/dcldxCoreD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dcldxLayoutControlD11.bpl b/internal/x.46/Lib/D11/dcldxLayoutControlD11.bpl deleted file mode 100644 index 13cd7d50..00000000 Binary files a/internal/x.46/Lib/D11/dcldxLayoutControlD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dcldxLayoutControlD11.dcp b/internal/x.46/Lib/D11/dcldxLayoutControlD11.dcp deleted file mode 100644 index 310960f3..00000000 Binary files a/internal/x.46/Lib/D11/dcldxLayoutControlD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dcldxPSCoreD11.bpl b/internal/x.46/Lib/D11/dcldxPSCoreD11.bpl deleted file mode 100644 index 15a4ba61..00000000 Binary files a/internal/x.46/Lib/D11/dcldxPSCoreD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dcldxPSCoreD11.dcp b/internal/x.46/Lib/D11/dcldxPSCoreD11.dcp deleted file mode 100644 index 50cbb1a9..00000000 Binary files a/internal/x.46/Lib/D11/dcldxPSCoreD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxBase.dcu b/internal/x.46/Lib/D11/dxBase.dcu deleted file mode 100644 index 9e409589..00000000 Binary files a/internal/x.46/Lib/D11/dxBase.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxBkgnd.dcu b/internal/x.46/Lib/D11/dxBkgnd.dcu deleted file mode 100644 index f0a76c2d..00000000 Binary files a/internal/x.46/Lib/D11/dxBkgnd.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxBrhDlg.dcu b/internal/x.46/Lib/D11/dxBrhDlg.dcu deleted file mode 100644 index fa327457..00000000 Binary files a/internal/x.46/Lib/D11/dxBrhDlg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxBrhDlg.dfm b/internal/x.46/Lib/D11/dxBrhDlg.dfm deleted file mode 100644 index 6e90cb0d..00000000 --- a/internal/x.46/Lib/D11/dxBrhDlg.dfm +++ /dev/null @@ -1,71 +0,0 @@ -object dxBrushDlg: TdxBrushDlg - Left = 363 - Top = 214 - BorderStyle = bsDialog - Caption = 'Setup Brush properties' - ClientHeight = 120 - ClientWidth = 229 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object GroupBox1: TGroupBox - Left = 4 - Top = 1 - Width = 222 - Height = 85 - TabOrder = 0 - object lblColor: TLabel - Left = 6 - Top = 21 - Width = 29 - Height = 13 - Caption = '&Color:' - OnClick = lblClick - end - object lblStyle: TLabel - Left = 6 - Top = 53 - Width = 28 - Height = 13 - Caption = '&Style:' - OnClick = lblClick - end - object bvlColorHolder: TBevel - Left = 38 - Top = 16 - Width = 178 - Height = 23 - Visible = False - end - object bvlStyleHolder: TBevel - Left = 38 - Top = 48 - Width = 178 - Height = 22 - Visible = False - end - end - object btnOK: TButton - Left = 70 - Top = 93 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 151 - Top = 93 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end -end diff --git a/internal/x.46/Lib/D11/dxCommon.dcu b/internal/x.46/Lib/D11/dxCommon.dcu deleted file mode 100644 index e6bf55d9..00000000 Binary files a/internal/x.46/Lib/D11/dxCommon.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxComnD11.dcp b/internal/x.46/Lib/D11/dxComnD11.dcp deleted file mode 100644 index 66f6dc6e..00000000 Binary files a/internal/x.46/Lib/D11/dxComnD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxCore.dcu b/internal/x.46/Lib/D11/dxCore.dcu deleted file mode 100644 index 21467034..00000000 Binary files a/internal/x.46/Lib/D11/dxCore.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxCoreD11.dcp b/internal/x.46/Lib/D11/dxCoreD11.dcp deleted file mode 100644 index 3e68de31..00000000 Binary files a/internal/x.46/Lib/D11/dxCoreD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxCoreReg.dcu b/internal/x.46/Lib/D11/dxCoreReg.dcu deleted file mode 100644 index 93e47785..00000000 Binary files a/internal/x.46/Lib/D11/dxCoreReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxExtCtrls.dcu b/internal/x.46/Lib/D11/dxExtCtrls.dcu deleted file mode 100644 index cbf4e2cd..00000000 Binary files a/internal/x.46/Lib/D11/dxExtCtrls.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxExtCtrlsStrs.dcu b/internal/x.46/Lib/D11/dxExtCtrlsStrs.dcu deleted file mode 100644 index 4e3e45fe..00000000 Binary files a/internal/x.46/Lib/D11/dxExtCtrlsStrs.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxFEFDlg.dcu b/internal/x.46/Lib/D11/dxFEFDlg.dcu deleted file mode 100644 index 907fb9e0..00000000 Binary files a/internal/x.46/Lib/D11/dxFEFDlg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxFEFDlg.dfm b/internal/x.46/Lib/D11/dxFEFDlg.dfm deleted file mode 100644 index c59d4172..00000000 --- a/internal/x.46/Lib/D11/dxFEFDlg.dfm +++ /dev/null @@ -1,745 +0,0 @@ -object dxFEFDialog: TdxFEFDialog - Left = 446 - Top = 168 - ActiveControl = dgTexture - BorderStyle = bsDialog - Caption = 'Fill Effects' - ClientHeight = 301 - ClientWidth = 392 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - ShowHint = True - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object lblSample: TLabel - Left = 307 - Top = 214 - Width = 44 - Height = 13 - Caption = 'Sample : ' - end - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 297 - Height = 292 - ActivePage = tshTexture - TabOrder = 0 - OnChange = PageControl1Change - object tshTexture: TTabSheet - Caption = '&Texture' - object dgTexture: TDrawGrid - Left = 4 - Top = 4 - Width = 280 - Height = 198 - BorderStyle = bsNone - ColCount = 4 - Ctl3D = True - DefaultColWidth = 65 - DefaultRowHeight = 65 - DefaultDrawing = False - FixedCols = 0 - RowCount = 6 - FixedRows = 0 - Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goThumbTracking] - ParentCtl3D = False - ScrollBars = ssVertical - TabOrder = 0 - OnClick = dgTextureClick - OnDblClick = dgTextureDblClick - OnDrawCell = dgTextureDrawCell - OnMouseMove = dgTextureMouseMove - end - object pnlTextureName: TPanel - Left = 4 - Top = 205 - Width = 280 - Height = 24 - BevelOuter = bvLowered - TabOrder = 1 - end - object btnOtherTexture: TButton - Left = 150 - Top = 237 - Width = 134 - Height = 23 - Caption = '&Other Texture ...' - TabOrder = 2 - OnClick = btnOtherTextureClick - end - end - object tshPattern: TTabSheet - Caption = '&Pattern' - object lblForeground: TLabel - Left = 5 - Top = 191 - Width = 66 - Height = 13 - Caption = '&Foreground : ' - OnClick = lblForegroundClick - end - object lblBackground: TLabel - Left = 160 - Top = 191 - Width = 66 - Height = 13 - Caption = '&Background : ' - OnClick = lblForegroundClick - end - object bvlForeColorHolder: TBevel - Left = 4 - Top = 208 - Width = 124 - Height = 21 - Visible = False - end - object bvlBackColorHolder: TBevel - Left = 160 - Top = 208 - Width = 125 - Height = 21 - Visible = False - end - object dgPattern: TDrawGrid - Left = 4 - Top = 4 - Width = 280 - Height = 156 - BorderStyle = bsNone - ColCount = 8 - DefaultColWidth = 34 - DefaultRowHeight = 25 - DefaultDrawing = False - FixedCols = 0 - RowCount = 6 - FixedRows = 0 - Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine] - ParentShowHint = False - ScrollBars = ssNone - ShowHint = True - TabOrder = 0 - OnClick = dgPatternClick - OnDblClick = dgPatternDblClick - OnDrawCell = dgPatternDrawCell - OnMouseMove = dgPatternMouseMove - end - object pnlPatternName: TPanel - Left = 4 - Top = 163 - Width = 281 - Height = 23 - BevelOuter = bvLowered - TabOrder = 1 - end - object btnInvert: TButton - Left = 4 - Top = 237 - Width = 281 - Height = 23 - Caption = 'I&nvert colors' - TabOrder = 2 - OnClick = btnInvertClick - end - end - object tshPicture: TTabSheet - Caption = 'P&icture' - object lblPaintMode: TLabel - Left = 7 - Top = 210 - Width = 53 - Height = 13 - Caption = 'Paint &mode' - FocusControl = cbxPaintMode - OnClick = lblPaintModeClick - end - object Bevel4: TBevel - Left = 64 - Top = 216 - Width = 217 - Height = 3 - Shape = bsBottomLine - end - object sbxPicture: TScrollBox - Left = 4 - Top = 4 - Width = 279 - Height = 145 - HorzScrollBar.Tracking = True - VertScrollBar.Tracking = True - PopupMenu = pmPicture - TabOrder = 0 - TabStop = True - object pnlPicture: TPanel - Left = 0 - Top = 0 - Width = 273 - Height = 138 - BevelOuter = bvNone - TabOrder = 0 - object pbxPicture: TPaintBox - Left = 0 - Top = 0 - Width = 273 - Height = 138 - Align = alClient - OnPaint = pbxPicturePaint - end - object pnlNoPicture: TPanel - Left = 48 - Top = 58 - Width = 185 - Height = 25 - BevelOuter = bvNone - Caption = 'There is no Picture to display' - TabOrder = 0 - end - end - end - object pnlPictureName: TPanel - Left = 4 - Top = 152 - Width = 279 - Height = 24 - BevelOuter = bvLowered - TabOrder = 1 - end - object btnSelectPicture: TButton - Left = 146 - Top = 181 - Width = 137 - Height = 23 - Caption = 'Se&lect Picture ...' - TabOrder = 3 - OnClick = SelectPictureClick - end - object cbxPaintMode: TComboBox - Left = 6 - Top = 228 - Width = 129 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 4 - OnChange = cbxPaintModeChange - Items.Strings = ( - 'Center' - 'Stretch' - 'Tile' - 'Proportional') - end - object btnPreview: TButton - Left = 4 - Top = 181 - Width = 137 - Height = 23 - Caption = 'Pre&view ...' - TabOrder = 2 - OnClick = PicturePreviewClick - end - end - end - object pnlPreview: TPanel - Left = 316 - Top = 229 - Width = 65 - Height = 65 - BevelOuter = bvNone - BorderStyle = bsSingle - TabOrder = 5 - object pbxPreview: TPaintBox - Left = 0 - Top = 0 - Width = 61 - Height = 61 - Align = alClient - OnPaint = pbxPreviewPaint - end - end - object btnHelp: TButton - Left = 308 - Top = 112 - Width = 80 - Height = 23 - Caption = '&Help' - TabOrder = 4 - end - object btnApply: TButton - Left = 308 - Top = 83 - Width = 80 - Height = 23 - Caption = '&Apply' - TabOrder = 3 - OnClick = btnApplyClick - end - object btnCancel: TButton - Left = 308 - Top = 54 - Width = 80 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnOK: TButton - Left = 308 - Top = 25 - Width = 80 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object pmPicture: TPopupMenu - OnPopup = pmPicturePopup - Left = 340 - Top = 146 - object miPreview: TMenuItem - Caption = 'Pre&view...' - OnClick = PicturePreviewClick - end - object N3: TMenuItem - Caption = '-' - end - object miLoad: TMenuItem - Caption = '&Load...' - ShortCut = 45 - OnClick = SelectPictureClick - end - object miDelete: TMenuItem - Caption = '&Delete' - ShortCut = 46 - OnClick = miDeleteClick - end - object N2: TMenuItem - Caption = '-' - end - object miCut: TMenuItem - Caption = 'Cu&t' - ShortCut = 16472 - OnClick = miCutClick - end - object miCopy: TMenuItem - Caption = '&Copy' - ShortCut = 16451 - OnClick = miCopyClick - end - object miPaste: TMenuItem - Caption = '&Paste' - ShortCut = 16470 - OnClick = miPasteClick - end - end - object ilMenu: TImageList - Left = 312 - Top = 146 - Bitmap = { - 494C010106000A00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF008400000084000000840000008400 - 00008400000084000000FFFFFF00840000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00840000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00840000008400000084000000FFFF - FF00840000008400000084000000840000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0084000000FFFFFF0084000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000840000008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840000848400848484000084840084848400008484008484 - 8400008484000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484000000 - 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600000000008484 - 8400008484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 84000000000000FFFF00000000000000000000FFFF0000000000848484000084 - 8400848484000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000FFFF0000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000008400 - 0000000000000000000084000000000000000000000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000008484000084 - 8400008484000084840000848400008484000084840000848400008484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000FF000000FF000000FF000000FF000000FFFF - FF00000000000000000000000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000FFFF00000000000084 - 8400008484000084840000848400008484000084840000848400008484000084 - 8400000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF00840000000000000000000000FFFFFF0000FFFF000000 - 0000008484000084840000848400008484000084840000848400008484000084 - 8400008484000000000000000000000000008484840084848400848484000000 - 000000000000FF000000FF000000FF000000FF000000FF000000FF000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000840000008400000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000084840000848400008484000084840000848400008484000084 - 84000084840000848400000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000084000000840000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF00840000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00840000008400 - 000000000000FF000000FF000000FF000000FF000000FF000000FF000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000FFFFFF008400 - 00008400000084000000840000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF00840000008400 - 00008400000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000FFFFFF008400000000000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000084848400848484008484840084848400848484008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00840000008400 - 000084000000840000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000084000000840000008400000084000000840000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00C6C6C6000000000000000000000000000000 - 0000FFFFFF00FFFFFF0084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00840000008400 - 00008400000084000000FFFFFF00C6C6C600FFFFFF0084000000840000008400 - 0000840000008400000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFF00000000FC00FFFF00000000 - 8000FFF9000000000000E7FF000000000000C3F3000000000000C3E700000000 - 0001E1C7000000000003F08F000000000003F81F000000000003FC3F00000000 - 0003F81F000000000003F09F000000000003C1C700000000800783E300000000 - F87F8FF100000000FFFFFFFF00000000FFFFFFFEFFFFFFFFFFFFFF0CF3FFFFFF - 001FFC00ED9FFC01000FF805ED6FFC010007F805ED6FFC0100030006F16F0001 - 00010006FD1F000100000006FC7F0001001F0006FEFF0001001F0005FC7F0003 - 001F0005FD7F00078FF10001F93F000FFFF90001FBBF00FFFF750001FBBF01FF - FF8F0001FBBF03FFFFFF0001FFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxFading.dcu b/internal/x.46/Lib/D11/dxFading.dcu deleted file mode 100644 index 06597d57..00000000 Binary files a/internal/x.46/Lib/D11/dxFading.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxGDIPlusAPI.dcu b/internal/x.46/Lib/D11/dxGDIPlusAPI.dcu deleted file mode 100644 index 1a669d33..00000000 Binary files a/internal/x.46/Lib/D11/dxGDIPlusAPI.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxGDIPlusClasses.dcu b/internal/x.46/Lib/D11/dxGDIPlusClasses.dcu deleted file mode 100644 index 09a91e83..00000000 Binary files a/internal/x.46/Lib/D11/dxGDIPlusClasses.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxGDIPlusD11.dcp b/internal/x.46/Lib/D11/dxGDIPlusD11.dcp deleted file mode 100644 index 9169bdb6..00000000 Binary files a/internal/x.46/Lib/D11/dxGDIPlusD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutCommon.dcu b/internal/x.46/Lib/D11/dxLayoutCommon.dcu deleted file mode 100644 index 3f777677..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutCommon.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutControl.dcu b/internal/x.46/Lib/D11/dxLayoutControl.dcu deleted file mode 100644 index 1b8e7358..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutControl.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutControl.res b/internal/x.46/Lib/D11/dxLayoutControl.res deleted file mode 100644 index 5313bf49..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutControl.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutControlAdapters.dcu b/internal/x.46/Lib/D11/dxLayoutControlAdapters.dcu deleted file mode 100644 index ca1e4fe5..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutControlAdapters.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutControlD11.dcp b/internal/x.46/Lib/D11/dxLayoutControlD11.dcp deleted file mode 100644 index c072f352..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutControlD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutControlReg.dcu b/internal/x.46/Lib/D11/dxLayoutControlReg.dcu deleted file mode 100644 index aae64011..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutControlReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutCustomizeForm.dcu b/internal/x.46/Lib/D11/dxLayoutCustomizeForm.dcu deleted file mode 100644 index a568d0e5..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutCustomizeForm.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutCustomizeForm.dfm b/internal/x.46/Lib/D11/dxLayoutCustomizeForm.dfm deleted file mode 100644 index 8ad799e2..00000000 --- a/internal/x.46/Lib/D11/dxLayoutCustomizeForm.dfm +++ /dev/null @@ -1,1473 +0,0 @@ -object dxLayoutControlCustomizeForm: TdxLayoutControlCustomizeForm - Left = 114 - Top = 225 - ActiveControl = btnClose - AutoScroll = False - BorderIcons = [biSystemMenu] - ClientHeight = 463 - ClientWidth = 427 - Color = clBtnFace - OldCreateOrder = False - ShowHint = True - OnClose = FormClose - OnKeyDown = FormKeyDown - OnShortCut = FormShortCut - PixelsPerInch = 96 - TextHeight = 13 - object lcMain: TdxLayoutControl - Left = 0 - Top = 0 - Width = 427 - Height = 463 - Align = alClient - TabOrder = 0 - TabStop = False - HighlightRoot = False - object tvItems: TcxTreeView - Left = 22 - Top = 84 - Width = 200 - Height = 369 - PopupMenu = pmTreeViewActions - Style.TransparentBorder = False - TabOrder = 10 - OnKeyDown = FormKeyDown - OnMouseDown = tvItemsMouseDown - OnMouseMove = ItemsMouseMove - OnMouseUp = ItemsMouseUp - OnContextPopup = tvItemsContextPopup - HideSelection = False - Images = ilItems - MultiSelect = True - MultiSelectStyle = [msControlSelect, msShiftSelect] - RightClickSelect = True - OnChange = tvItemsChange - OnChanging = tvItemsChanging - OnCustomDrawItem = tvItemsCustomDrawItem - OnEditing = tvItemsEditing - OnEdited = tvItemsEdited - end - object tvAvailableItems: TcxTreeView - Left = 229 - Top = 84 - Width = 200 - Height = 369 - PopupMenu = pmAvailableItemsActions - Style.TransparentBorder = False - TabOrder = 17 - OnKeyDown = FormKeyDown - OnMouseDown = tvItemsMouseDown - OnMouseMove = ItemsMouseMove - OnMouseUp = ItemsMouseUp - OnContextPopup = tvAvailableItemsContextPopup - HideSelection = False - Images = ilItems - MultiSelect = True - MultiSelectStyle = [msControlSelect, msShiftSelect] - RightClickSelect = True - OnChange = tvItemsChange - OnChanging = tvItemsChanging - OnCustomDrawItem = tvItemsCustomDrawItem - OnEditing = tvItemsEditing - OnEdited = tvItemsEdited - end - object btnClose: TcxButton - Left = 342 - Top = 428 - Width = 75 - Height = 25 - Action = acClose - TabOrder = 19 - end - object cbTabbedView: TcxCheckBox - Left = 10 - Top = 432 - Action = acTabbedView - Style.TransparentBorder = False - TabOrder = 18 - Transparent = True - Width = 121 - end - object btnShowDesignSelectors: TcxButton - Left = 130 - Top = 10 - Width = 23 - Height = 22 - Action = acShowDesignSelectors - TabOrder = 5 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.GroupIndex = 2 - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnHighlightRoot: TcxButton - Left = 107 - Top = 10 - Width = 23 - Height = 22 - Action = acHighlightRoot - TabOrder = 4 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.GroupIndex = 1 - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnRestore: TcxButton - Left = 84 - Top = 10 - Width = 23 - Height = 22 - Action = acRestore - TabOrder = 3 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnStore: TcxButton - Left = 61 - Top = 10 - Width = 23 - Height = 22 - Action = acStore - TabOrder = 2 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnRedo: TcxButton - Left = 33 - Top = 10 - Width = 23 - Height = 22 - Action = acRedo - TabOrder = 1 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnUndo: TcxButton - Left = 10 - Top = 10 - Width = 23 - Height = 22 - Action = acUndo - TabOrder = 0 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAlignBy: TcxButton - Left = 101 - Top = 56 - Width = 23 - Height = 22 - Action = acAlignBy - TabOrder = 9 - DropDownMenu = pmAlign - Kind = cxbkDropDown - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnTreeViewItemsDelete: TcxButton - Left = 73 - Top = 56 - Width = 23 - Height = 22 - Action = acTreeViewItemsDelete - TabOrder = 8 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnTreeViewCollapseAll: TcxButton - Left = 45 - Top = 56 - Width = 23 - Height = 22 - Action = acTreeViewCollapseAll - TabOrder = 7 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnTreeViewExpandAll: TcxButton - Left = 22 - Top = 56 - Width = 23 - Height = 22 - Action = acTreeViewExpandAll - TabOrder = 6 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAvailableItemsViewAsList: TcxButton - Left = 354 - Top = 56 - Width = 23 - Height = 22 - Action = acAvailableItemsViewAsList - TabOrder = 16 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.GroupIndex = 3 - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.AllowAllUp = True - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAvailableItemsDelete: TcxButton - Left = 326 - Top = 56 - Width = 23 - Height = 22 - Action = acAvailableItemsDelete - TabOrder = 15 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAddItem: TcxButton - Left = 303 - Top = 56 - Width = 23 - Height = 22 - Action = acAddItem - TabOrder = 14 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAddGroup: TcxButton - Left = 280 - Top = 56 - Width = 23 - Height = 22 - Action = acAddGroup - TabOrder = 13 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAvailableItemsCollapseAll: TcxButton - Left = 252 - Top = 56 - Width = 23 - Height = 22 - Action = acAvailableItemsCollapseAll - TabOrder = 12 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object btnAvailableItemsExpandAll: TcxButton - Left = 229 - Top = 56 - Width = 23 - Height = 22 - Action = acAvailableItemsExpandAll - TabOrder = 11 - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - SpeedButtonOptions.CanBeFocused = False - SpeedButtonOptions.Flat = True - SpeedButtonOptions.Transparent = True - end - object lcMainGroup_Root: TdxLayoutGroup - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Visible = False - Hidden = True - ShowBorder = False - object lcMainGroup2: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - LayoutDirection = ldHorizontal - ShowBorder = False - UseIndent = False - object liUndo: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnUndo - ControlOptions.ShowBorder = False - end - object liRedo: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnRedo - ControlOptions.ShowBorder = False - end - object lgSeparator1: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - ShowBorder = False - end - object liStore: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnStore - ControlOptions.ShowBorder = False - end - object liRestore: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnRestore - ControlOptions.ShowBorder = False - end - object liHighlightRoot: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnHighlightRoot - ControlOptions.ShowBorder = False - end - object liShowDesignSelectors: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnShowDesignSelectors - ControlOptions.ShowBorder = False - end - end - object lcMainGroup1: TdxLayoutGroup - AlignVert = avClient - CaptionOptions.Text = 'New Group' - CaptionOptions.Visible = False - LayoutDirection = ldHorizontal - ShowBorder = False - object lcgTreeView: TdxLayoutGroup - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Text = '&Layout Tree View' - object lgTreeView: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - LayoutDirection = ldHorizontal - ShowBorder = False - UseIndent = False - object lcMainItem10: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnTreeViewExpandAll - ControlOptions.ShowBorder = False - end - object lcMainItem9: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnTreeViewCollapseAll - ControlOptions.ShowBorder = False - end - object lgSeparator2: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - ShowBorder = False - end - object lcMainItem7: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnTreeViewItemsDelete - ControlOptions.ShowBorder = False - end - object lgSeparator3: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - ShowBorder = False - end - object lcMainItem2: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAlignBy - ControlOptions.ShowBorder = False - end - end - object lcMainItem6: TdxLayoutItem - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Text = 'cxTreeView1' - CaptionOptions.Visible = False - Control = tvItems - ControlOptions.ShowBorder = False - end - end - object lcgAvailableItems: TdxLayoutGroup - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Text = '&Available Items' - object lgAvailableItems: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - LayoutDirection = ldHorizontal - ShowBorder = False - UseIndent = False - object lcMainItem15: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAvailableItemsExpandAll - ControlOptions.ShowBorder = False - end - object lcMainItem14: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAvailableItemsCollapseAll - ControlOptions.ShowBorder = False - end - object lgSeparator4: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - ShowBorder = False - end - object lcMainItem13: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAddGroup - ControlOptions.ShowBorder = False - end - object liAddItem: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAddItem - ControlOptions.ShowBorder = False - end - object lcMainItem11: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAvailableItemsDelete - ControlOptions.ShowBorder = False - end - object lgSeparator5: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - ShowBorder = False - end - object lcMainItem3: TdxLayoutItem - AlignHorz = ahLeft - CaptionOptions.Visible = False - Control = btnAvailableItemsViewAsList - ControlOptions.ShowBorder = False - end - end - object lcMainItem8: TdxLayoutItem - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Text = 'cxTreeView2' - CaptionOptions.Visible = False - Control = tvAvailableItems - ControlOptions.ShowBorder = False - end - end - end - object lcMainGroup3: TdxLayoutGroup - AlignVert = avBottom - Hidden = True - LayoutDirection = ldHorizontal - ShowBorder = False - object lcMainItem4: TdxLayoutItem - AlignHorz = ahLeft - AlignVert = avCenter - CaptionOptions.Text = 'cxCheckBox1' - CaptionOptions.Visible = False - Control = cbTabbedView - ControlOptions.ShowBorder = False - end - object lcMainItem1: TdxLayoutItem - AlignHorz = ahRight - AlignVert = avCenter - CaptionOptions.Text = 'cxButton1' - CaptionOptions.Visible = False - Control = btnClose - ControlOptions.ShowBorder = False - end - end - end - end - object pmAlign: TPopupMenu - Left = 48 - Top = 360 - object Left1: TMenuItem - Action = acAlignLeftSide - end - object Right1: TMenuItem - Tag = 2 - Action = acAlignRightSide - end - object miSeparator3: TMenuItem - Caption = '-' - end - object op1: TMenuItem - Tag = 1 - Action = acAlignTopSide - end - object Bottom1: TMenuItem - Tag = 3 - Action = acAlignBottomSide - end - object miSeparator4: TMenuItem - Caption = '-' - end - object None1: TMenuItem - Tag = -1 - Action = acAlignNone - end - end - object alMain: TActionList - Images = ilActions - Left = 16 - Top = 360 - object acAddGroup: TAction - Category = 'Buttons' - Caption = 'Add &Group' - Hint = 'Add Group' - ImageIndex = 6 - ShortCut = 32839 - OnExecute = acAddGroupExecute - end - object acAddItem: TAction - Category = 'Buttons' - Caption = 'Add &Item' - Hint = 'Add Item' - ImageIndex = 5 - ShortCut = 32841 - OnExecute = acAddItemExecute - end - object acAvailableItemsDelete: TAction - Category = 'Buttons' - Caption = 'Delete' - Hint = 'Delete' - ImageIndex = 2 - OnExecute = acAvailableItemsDeleteExecute - end - object acTreeViewItemsDelete: TAction - Category = 'Buttons' - Caption = 'Delete' - Hint = 'Delete' - ImageIndex = 2 - OnExecute = acTreeViewItemsDeleteExecute - end - object acClose: TAction - Category = 'Buttons' - Caption = '&Close' - Hint = 'Close' - ShortCut = 27 - OnExecute = acCloseExecute - end - object acAvailableItemsExpandAll: TAction - Category = 'Buttons' - Caption = 'Expand All' - Hint = 'Expand All' - ImageIndex = 3 - OnExecute = acAvailableItemsExpandAllExecute - end - object acAvailableItemsCollapseAll: TAction - Category = 'Buttons' - Caption = 'Callapse All' - Hint = 'Collapse All' - ImageIndex = 1 - OnExecute = acAvailableItemsCollapseAllExecute - end - object acTreeViewExpandAll: TAction - Category = 'Buttons' - Caption = 'Expand All' - Hint = 'Expand All' - ImageIndex = 3 - OnExecute = acTreeViewExpandAllExecute - end - object acTreeViewCollapseAll: TAction - Category = 'Buttons' - Caption = 'Callapse All' - Hint = 'Collapse All' - ImageIndex = 1 - OnExecute = acTreeViewCollapseAllExecute - end - object acAlignLeftSide: TAction - Category = 'Aligns' - Caption = 'Left Side' - OnExecute = AlignExecute - end - object acAlignRightSide: TAction - Tag = 2 - Category = 'Aligns' - Caption = 'Right Side' - OnExecute = AlignExecute - end - object acAlignTopSide: TAction - Tag = 1 - Category = 'Aligns' - Caption = 'Top Side' - OnExecute = AlignExecute - end - object acAlignBottomSide: TAction - Tag = 3 - Category = 'Aligns' - Caption = 'Bottom Side' - OnExecute = AlignExecute - end - object acAlignNone: TAction - Tag = -1 - Category = 'Aligns' - Caption = 'None' - OnExecute = AlignExecute - end - object acAvailableItemsViewAsList: TAction - Category = 'Buttons' - AutoCheck = True - Caption = 'ViewAsList' - Hint = 'ViewAsList' - ImageIndex = 8 - OnExecute = acAvailableItemsViewAsListExecute - end - object acTabbedView: TAction - Category = 'Buttons' - AutoCheck = True - Caption = 'Tabbed View' - Hint = 'Tabbed View' - ImageIndex = 9 - OnExecute = acTabbedViewExecute - end - object acHighlightRoot: TAction - Category = 'Buttons' - AutoCheck = True - Caption = 'acHighlightRoot' - Hint = 'Highlight Root' - ImageIndex = 4 - OnExecute = acHighlightRootExecute - end - object acShowDesignSelectors: TAction - Category = 'Buttons' - AutoCheck = True - Caption = 'acHighlightControlSelectors' - Hint = 'Show Design Selectors' - ImageIndex = 7 - OnExecute = acShowDesignSelectorsExecute - end - object acStore: TAction - Category = 'Buttons' - Caption = 'Store' - ImageIndex = 9 - OnExecute = acStoreExecute - end - object acRestore: TAction - Category = 'Buttons' - Caption = 'acRestore' - ImageIndex = 10 - OnExecute = acRestoreExecute - end - object acTreeViewItemRename: TAction - Category = 'Buttons' - Caption = 'Rename' - Hint = 'Rename' - ImageIndex = 13 - OnExecute = acTreeViewItemRenameExecute - end - object acAvailableItemRename: TAction - Category = 'Buttons' - Caption = 'Rename' - Hint = 'Rename' - ImageIndex = 13 - OnExecute = acAvailableItemRenameExecute - end - object acUndo: TAction - Category = 'Buttons' - Caption = 'Undo' - Hint = 'Undo' - ImageIndex = 11 - OnExecute = acUndoExecute - end - object acRedo: TAction - Category = 'Buttons' - Caption = 'Redo' - Hint = 'Redo' - ImageIndex = 12 - OnExecute = acRedoExecute - end - object acAlignBy: TAction - Category = 'Aligns' - Caption = 'acAlignBy' - Hint = 'Align By' - ImageIndex = 0 - OnExecute = acAlignByExecute - end - end - object ilActions: TcxImageList - FormatVersion = 1 - DesignInfo = 25690128 - ImageInfo = < - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000302017FF00000002000000090000000F00000011000000120000000D0000 - 0003000000000000000000000000000000000000000000000000000000000000 - 0000332319FF0000000650433ABE6C594CFF675447FF645143FF46382FC30000 - 000C000000000000000000000000000000000000000000000000000000000000 - 000036251BFF00000006766257FFF4E3D3FFE5C3A0FFE2BE9BFF635044FF0000 - 0010000000000000000000000000000000000000000000000000000000000000 - 000039291FFF000000047B675CFFFAEEE2FFF9EBDFFFF3E1D0FF675447FF0000 - 000D000000000000000000000000000000000000000000000000000000000000 - 00003E2C22FF000000015E4F47BF7A675CFF766256FF715D51FF504139C30000 - 0007000000000000000000000000000000000000000000000000000000000000 - 0000423125FF0000000000000003000000070000000A0000000E0000000F0000 - 000F0000000F0000001100000013000000150000000F00000004000000000000 - 0000463529FF000000005C4F47B87D695EFF79655AFF766256FF725E52FF6E5B - 4FFF6B584CFF685548FF655244FF634F42FF46382FC60000000F000000000000 - 00004B392DFF00000000836F65FFF6E6D6FFEBCBA9FFE9C7A6FFE7C5A3FFE5C2 - A0FFE3BF9CFFE1BD98FFDFBB96FFDEB893FF635043FF00000014000000000000 - 00004F3D31FF00000000867267FFFCF0E4FFFBEFE2FFFAEDE1FFF9ECDFFFF7EA - DDFFF6E8DAFFF5E6D8FFF3E5D6FFEFDDCAFF655245FF00000011000000000000 - 0000544135FF0000000065574FBD867268FF837065FF806C61FF7D695EFF7966 - 5BFF766256FF715E53FF6E5B4EFF6B584BFF4D3F36C60000000A000000000000 - 0000574438FF000000000000000300000007000000090000000C000000100000 - 001300000017000000140000000B000000090000000700000002000000000000 - 00005B483BFF00000001584A41B9766257FF725E52FF6E5A4EFF6A564AFF6653 - 46FF645043FF46382EC50000000E000000000000000000000000000000000000 - 00005E4A3EFF000000007F6B61FFF6E6D6FFEBCBA9FFE9C8A6FFE7C4A3FFE4C1 - 9EFFE2BE99FF645144FF00000012000000000000000000000000000000000000 - 0000614D40FF00000000836F65FFFBF0E4FFFBEFE3FFFAEEE1FFF9ECDEFFF7EA - DCFFF1E0CEFF685548FF0000000F000000000000000000000000000000000000 - 0000634F42FF0000000064554EBD847066FF816C62FF7D695EFF796559FF7461 - 55FF705C50FF504239C300000008000000000000000000000000000000000000 - 0000634F42FF0000000000000000000000000000000000000000000000010000 - 0003000000040000000400000001000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 000000000000000000030000000900000010000000170000001A000000190000 - 00140000000D0000000400000001000000000000000000000000000000000000 - 000100000007000701280022067D00370ABD00480DE7005010FC00450DE80034 - 0AC2001E0687000601320000000C000000020000000000000000000000010000 - 000700190456003F0BC0126D22FF0D741DFF107C22FF138123FF10791EFF0B6D - 19FF055E14FF00360ACA001404660000000F0000000200000000000000040019 - 0452095415D7218432FF1D9A32FF1E9D30FF1D9E2FFF1B962CFF189026FF1588 - 23FF127D20FF096818FF02430EDF001404650000000B000000010008011F0144 - 0ABB2D903FFF26AC3DFF21A036FF1E9732FF1D992FFF1C9B2EFF1B942BFF198C - 26FF168522FF137F20FF096818FF00360BC900060131000000040028066D2384 - 34FF43BD5CFF25AB3FFF85BF8FFFF4F4F3FF8BBE93FF1B8E2CFF8CBE93FFFFFF - FFFF8AC090FF168824FF127E20FF065E14FF001E06830000000B01450BAE46A8 - 59FF37BD55FF22A13CFF17832CFF81B28AFFF6F5F5FF84B18BFFFFFFFFFF88B7 - 8EFF198D29FF1B9729FF158723FF0B6C1AFF01330ABE00000011015D0EDE62C4 - 79FF31BD51FF2CB94BFF22A13CFF17832CFF82B38BFFF6F6F6FF87B88FFF1C96 - 2DFF1D9D2EFF1B9C2DFF189027FF10791EFF00460DE600000014016C10FB74D6 - 8DFF3CC35FFF2EBA4FFF2AB048FF1F9537FF167C2AFF85B98EFF1E9232FF1E96 - 31FF1D9B2FFF1D9D2EFF1A962CFF138123FF005210FC0000001400610EDD65C9 - 7FFF4DCB70FF31BC53FF84C293FFECEBEBFF88BA93FF209437FF8FC398FFFFFF - FFFF8CC595FF1E9F30FF1D9E2FFF117E22FF00480DE400000011004A0BA84BB2 - 63FF64D483FF2CAF4EFF1D8C39FF7FB28BFFECECEBFF83B28DFFFAFAFAFF8ABC - 93FF1F9B35FF20A434FF1E9F2FFF0D751EFF00380AB60000000B002D06642994 - 3DFF79DA95FF56CE77FF2BAE4DFF1D8C38FF7FB28BFFECECECFF86B890FF23A2 - 3DFF25AC3CFF23A93AFF1C9B32FF126E22FF0022067400000006000A01150150 - 0CB044AD5CFF75DA92FF55CE77FF2BAF4EFF1D8C39FF82B98FFF28AA45FF29B2 - 45FF26B042FF26AD3EFF218532FF003F0BBA000701200000000200000000001F - 04430B671ACE44AC5CFF79DA95FF64D483FF3FB35EFF3ABE5BFF2FBC50FF37BD - 54FF43BD5CFF2D903FFF095516D30019044D0000000400000000000000000000 - 0000001F044301500BB029953DFF4BB263FF66C87EFF74D58DFF61C479FF46A9 - 59FF238534FF01450BB5001A044A000000030000000000000000000000000000 - 000000000000000A0115002D0763014B0AA701610FDC016D10FB005E0EDD0046 - 0BA9002906670008011900000002000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000100000003000000010000000000000000000000000000 - 0000000000010000000400000001000000000000000000000000000000000000 - 00000000000300000011040315480000000F0000000200000000000000000000 - 0003000000130303135000000019000000050000000000000000000000000000 - 0003000000140C0B41AA14136EFD060624780000001100000002000000020000 - 0014050522820E0D64FD080738B6000000210000000500000000000000010000 - 000D0C0C42A6151573FF071EC9FF14136EFD0606247800000013000000140505 - 237E0F0F67FD061BC7FF0E0D65FF080738B60000001800000001000000020504 - 173F181675FA0B28CEFF0625DCFF071EC9FF121479FD0606247E060624801011 - 74FD061BC7FF041DD8FF061BC5FF0E0D63FC0302134F00000004000000010000 - 00080808286B181774FB0A28CEFF0525DCFF071ECAFF121479FE121378FE061B - C7FF041DD8FF061BC6FF100E66FC0504227F0000001200000001000000000000 - 0001000000090808276A171A7EFB0A28CEFF0625DCFF061ECBFF061CCAFF041D - D8FF061BC6FF101171FB0505237C000000120000000200000000000000000000 - 0000000000010000000A0908286D171A7FFC0929CFFF0627DDFF0420DAFF061C - C9FF121376FD0605247E00000012000000020000000000000000000000000000 - 000000000001000000080908286A181B82FE0C2ED4FF072CE0FF0625DCFF071E - CCFF121479FE0606247A00000011000000020000000000000000000000000000 - 00010000000609092A631A1E86FD0E3CDAFF0B39E7FF6379E3FF6175E0FF0625 - DCFF071ECAFF121478FD060524740000000F0000000200000000000000000000 - 00030A0A2B5E1D1C7EFC1348DFFF0F49EFFF6580E7FF181B80FC161A7FFC6175 - DFFF0625DCFF071ECAFF14136FFD060624730000000C00000001000000000504 - 13281E1E83FC4E7BEBFF1356F4FF6789EAFF191D84FA090828680808276A1719 - 7EFA6275DFFF0625DCFF071EC9FF14136EFD0302103700000002000000000000 - 00020E0D3A751F1E85FF88A7F1FF1B2087FA09092A6100000007000000080808 - 286717197EFA6175DFFF161573FF090832870000000C00000001000000000000 - 0000000000030E0D3A751C238CFA0A092B5D0000000500000001000000010000 - 00070808286517197EFA0A0933820000000D0000000200000000000000000000 - 0000000000000000000204041327000000030000000000000000000000000000 - 0001000000050404112E00000008000000010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000100000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 000000000000000000030000000900000010000000170000001A000000190000 - 00140000000D0000000400000001000000000000000000000000000000000000 - 000100000007000A0128002D067D014B0ABD01610EE7016E10FC005D0EE80046 - 0BC201290687000801320000000C000000020000000000000000000000010000 - 0007001F045601500BC0137F22FF0D7E1EFF118222FF138222FF107D1EFF0B76 - 1AFF066E15FF01450BCA001A04660000000F000000020000000000000004001F - 0552096316D7218E33FF1C9A31FF1E9F30FF1D9A2EFF19912BFF188E26FF1587 - 23FF127F20FF0A7118FF02500EDF001904650000000B00000001000A011F0150 - 0CBB2D983FFF26AD3EFF23AA3AFF21A334FF1C942EFF8CC293FF198D29FF1B97 - 29FF178C24FF138020FF096F18FF003F0BC90007013100000004002D066D238D - 34FF43BC5CFF26B141FF25AB3CFF209B35FF89B990FFFFFFFFFF89BC90FF198F - 29FF1B972AFF178C25FF127F20FF056515FF002206830000000B004B0AAE46AC - 59FF37BD55FF29B345FF23A23CFF85B68DFFFBFAFAFF86B38DFFFFFFFFFF89BC - 90FF198D29FF1B972AFF158723FF0B6F1AFF00380ABE0000001100610EDE62C5 - 79FF31BE52FF2BB44AFF7FB78BFFEDEDEEFF88B891FF137425FF8BBB93FFFFFF - FFFF8BC392FF1B982CFF189026FF10791EFF00480EE600000014016C10FB74D6 - 8DFF3CC35FFF27A744FF1C8C34FF1F9437FF219939FF88BC91FF147826FF1989 - 2BFF1D9B2FFF1D9D2EFF1B962CFF138122FF005210FC00000014015E0EDD66C7 - 7FFF4ECB70FF31C155FF2EBB4FFF28AA45FF7FB28AFFF0F0F0FF89BE92FF209B - 35FF20A435FF1FA132FF1D9E2FFF117D21FF00460DE40000001101450BA84BAF - 63FF64D383FF34C35BFF2DB04FFF84B68FFFF4F4F4FF86B590FFFFFFFFFF8DC2 - 96FF209B34FF20A435FF1E9D30FF0D701EFF01330AB60000000B00280664288C - 3CFF79DA95FF54CA74FF7EB88DFFE2E3E3FF86B992FF198130FF8CBE96FFFFFF - FFFF8EC998FF22A437FF1D9B32FF136721FF001E067400000006000801150144 - 0AB044A55BFF60C07BFF359A4FFF29A148FF2FB752FF26A543FF1C8C34FF1F96 - 38FF24A83FFF26AC3DFF217E32FF00360BBA0006012000000002000000000019 - 04430B5719CE44A25BFF79D995FF64D383FF4ECC70FF3CC35EFF31BD51FF37BD - 54FF43BC5CFF2D883EFF094816D30014044D0000000400000000000000000000 - 000000180443003F0AB028833CFF4BA763FF66C57EFF74D58CFF61C079FF46A0 - 59FF237533FF00360BB50014044A000000030000000000000000000000000000 - 000000000000000701150022066300370AA700480DDC005010FB00450DDD0034 - 0AA9001E06670006011900000002000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000030201036638196C000000000B06030C6F3D - 1C75000000000000000000000000000000000000000000000000000000000000 - 000000000000301A0C3300000000140B0515EE823BFC391F0E3C7D441F84CC70 - 33D80000000028160A2A44251148000000000000000000000000000000000000 - 0000000000009C5527A5965225A01F110828402310530F080425100904283C21 - 0F5228160A35CC7033DB4F2B1454000000000000000000000000000000000000 - 0000000000003A200E3F48271259321C06735B330CBE764410ED744310EE5530 - 0CC32D1A067D4425115D0F08041422130824412410450000000000000000AD5F - 2BB7AF602CBA301A0C3D48290A92A3662CFFC88952FFE9A975FFEAAC76FFC88B - 56FF9C632DFF3E24099F3B200F53D17234E04124104500000000000000000905 - 02096035186A351F076AA6662AFFD58E58FFEA9B5FFFEE9957FFF09B59FFF0A0 - 64FFD7935DFF9A602BFF2D1A067B3C210F490000000000000000090502094425 - 11482213092A633A0DB4BF7940FFDD864AFFE18646FFE38B4CFFE68D4CFFE58A - 4BFFE38C4FFFBB7944FF56310CC1321B0D46914F2499603518666F3D1C75E07B - 38ED130B051A874F12E9CA7A43FFD3763AFFD97C3EFFDC7F41FFDB8344FFDC81 - 41FFD87B3EFFCE7E46FF744311ED120A05279652259F1F110821000000000603 - 01060A06030F894F11E8C46930FFD1753EFFDC8952FFE49561FFE59661FFDF8B - 54FFD57B42FFC56E34FF764411EC0C06031F0B06030C00000000000000007741 - 1E7E43251149663B0DAFB15D20FFDF9D76FFEAB999FFEBB999FFEBB99AFFEABA - 9AFFE09F79FFAC5B22FF59330CBB40231051DA7836E73C210F3F361E0D39914F - 2499522D145737200760A25918FFDFB296FFF2D9CBFFF2D9CBFFF2D9CBFFF2D9 - CBFFDFB396FF985417FF321C076F341C0D3D301A0C3311090412000000000000 - 00001C10071E4828124E4D2C0A83B57D48FFD8B194FFEFDACDFFEFDACDFFD7B0 - 94FFB17948FF4729098E48281257613518680000000000000000000000000000 - 00008E4E23969A5426A3201108233720075F673C0EAE894F11E8884E12E8633B - 0DB2351E0766190D06225E331765BB662FC61A0E061B00000000000000000000 - 00002D190B3000000000321B0C35874A228F23130926120A051611090416150B - 051A8448218E67381A6D00000000000000000000000000000000000000000000 - 00000000000000000000412410459C5527A503020103A45A29AE9C5527A50000 - 00004A28124E8046208700000000000000000000000000000000000000000000 - 000000000000000000000B06030C0000000000000000391F0E3C3E2210420000 - 0000000000000302010300000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000004D0FFF004D0FFF004D0FFF000000000000000000000000000000000000 - 000000000001000000050000000E0000001800000020000000210000001B0000 - 001100550FFF40D077FF00550FFF000000000000000000000000000000000000 - 000100000009100B05383E29129465431ED2825626F36B461FF6005E10FF005D - 10FF005D0FFF41D179FF005D10FF005E10FF015D10FF00000000000000000000 - 00082015095462401CC8AD6F36FFC87F41FFDC8B49FFAD6D39FF016610FF43D4 - 7EFF43D47EFF44D47DFF43D47EFF43D47EFF006610FF0000000000000003100A - 053162411BC4B77538FFE08C49FFE08C49FFE08C4AFFBA743DFF016F11FF016F - 10FF017011FF47D781FF016F10FF016F11FF016F10FF00000000000000073F28 - 1186AB6B31FFDB8545FFDB8645FFDB8544FFDA8644FFD18042FFB66F39FF8753 - 2AFF017611FF48DB86FF017711FF0000001100000000000000000000000A6942 - 1AC4BF7336FFD67F40FFD57F40FFD67F40FFD67F40FFD57F3FFFD67F40FFB16A - 34FF017C11FF017C11FF017C11FF0000001A00000000000000000000000B8855 - 20EECA7538FFCF783AFFD78348FFDE8C54FFE3935DFFE3935DFFDE8C54FFCD7D - 45FFAD6430FF9E5C2CFF71451CF50000001F0000000000000000000000098954 - 20EDC46F32FFD78751FFE9A678FFE9A678FFE9A578FFE9A679FFE9A678FFE9A5 - 77FFD78751FFC46F33FF8A541FF30000001E0000000000000000000000066C41 - 17BFB5662AFFE6AC86FFEFBD9BFFEFBD9BFFEFBC9AFFEFBD9BFFEEBC9BFFEFBC - 9BFFE6AC85FFB5652AFF6D4118CF000000160000000000000000000000034327 - 0E79A75E23FFEABFA3FFF5D6C1FFF6D6C1FFF5D6C1FFF6D6C1FFF5D6C1FFF5D6 - C1FFEABFA3FFA75E23FF43280E910000000C000000000000000000000001120A - 03226B3F15B6B97B4BFFFAECE3FFFBEDE4FFFBEDE4FFFBEDE3FFFBEDE4FFFAEC - E3FFB97B4AFF6B3E15C5120A0335000000040000000000000000000000000000 - 00012314073E6C3E14B6B06F3AFFCFA381FFEFDFD2FFEFDED2FFCFA381FFAF6F - 3AFF6C3E14C12314065000000008000000000000000000000000000000000000 - 000000000001120A032146280C77724013BD915319ED915219ED724114C24627 - 0C81120A032D0000000600000001000000000000000000000000000000000000 - 0000000000000000000000000002000000040000000700000008000000080000 - 0005000000020000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 000000000002000000080000000E000000140000001400000010000000090000 - 000200000000004D0FFF004D0FFF004D0FFF0000000000000000000000000000 - 00020000000F01200774023A0DBE034D11ED034B11ED02380DC0011E07780000 - 00130000000300550FFF40D077FF00550FFF0000000000000000000000010000 - 000D022F0A93167326FF2F943FFF44B054FF44AF54FF2F923FFF125B20FF005E - 10FF005D10FF005D0FFF41D179FF005D10FF005E10FF015D10FF000000050123 - 066D167726FF32A544FF29AF3DFF18A92EFF18A92EFF29AF3DFF278035FF0166 - 10FF43D47EFF43D47EFF44D47DFF43D47EFF43D47EFF006610FF000000070243 - 0CB7259035FF1BA32DFF0F9D22FF0F9E22FF0F9D23FF0F9E23FF168726FF016F - 11FF016F10FF017011FF47D781FF016F10FF016F11FF016F10FF00000009035C - 11EA229530FF0D931DFF0D931CFF0D911CFF0D931CFF0D911CFF0C8A1BFF1C7A - 27FF07320CFE017611FF48DB86FF017711FF000000030000000000000008035E - 10E911861CFF1B942CFF34AA4DFF48BD68FF48BD68FF34AB4DFF1C952CFF1182 - 1CFF104A16FF017C11FF017C11FF017C11FF0100001300000002000000050247 - 0CB3077211FF64B774FF8DD1A0FF8DD2A0FF8DD2A0FF8DD1A0FF65B774FF076C - 11FF3C5E23FFBE8053FFAA764DFF83552BFF2F1D0A7800000009000000020127 - 0665046C11FF8AC091FFC4E3CAFFC4E3CAFFC4E3CAFFC4E3CAFF89BF91FF0461 - 11FF7F6F34FFDF8B4FFFE39156FFBE7E4BFF593512C000000010000000000000 - 000602360989398B43FF88BA8DFFC7E0C9FFC7DFCAFF88B98DFF398544FF5E66 - 28FFCF8147FFDB8547FFDA8046FFD0824DFF794819ED00000014000000000000 - 0001000000060126076502470CB50F6513FD136515FF3E6620FF807439FFD991 - 60FFE49864FFE08E59FFD78049FFC8743CFF7B4918ED00000013000000000000 - 000000000000000000020000000A663E12B5AE6028FFD99C77FFE6B798FFEBB9 - 9BFFEBBB9DFFEBBB9DFFE1A37DFFB0622BFF5D3812BD0000000E000000000000 - 000000000000000000000000000239220A65A66021FFE0B59AFFF2DACCFFF2DA - CCFFF2DACCFFF3DACCFFE0B59AFF9D5A20FF341F0A7200000007000000000000 - 0000000000000000000000000000010000064F2F0E88B9824FFFDAB498FFF0DC - CFFFF0DCCFFFD9B398FFB47F4FFF492C0E920100000E00000002000000000000 - 0000000000000000000000000000000000010100000639230A64694014B38D55 - 1AE98B551BEA663F13B636210A6C0100000C0000000200000000000000000000 - 0000000000000000000000000000000000000000000000000002000000050000 - 0007000000080000000700000004000000010000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000030000 - 000E0000001400000016000000180000001A0000001C0000001E000000200000 - 002200000024000000260000002700000029000000210000000A0000000B036B - 0EFF02690EFF03680EFF03670EFF02650EFF03640EFF02630EFF02600EFF025F - 0EFF025E0EFF025E0EFF035C0EFF035B0EFF025A0EFF000000210000000B036C - 0EFF60C27EFF2BAE54FF219945FF27AB4FFF25AB4DFF1A943EFF20A948FF1FA8 - 45FF158E37FF1AA640FF18A43FFF0F8830FF025A0EFF0000002900000009026D - 0EFF68D08BFF2BAB53FF33BE5FFF31BD5DFF25A44CFF2CBB58FF29BA55FF1E9C - 44FF24B750FF22B54CFF17953BFF18A43EFF025C0EFF0000002700000008026F - 0EFF61C380FF39C166FF36C063FF2AA951FF31BD5DFF2FBC5AFF22A249FF28B9 - 54FF27B852FF1B9A41FF22B54CFF1BA540FF025E0EFF00000025000000060371 - 0EFF6CD18EFF3CC268FF2EAD56FF36C063FF33BF5FFF27A64EFF2EBC5AFF2CBA - 58FF209F46FF26B852FF24B750FF158D37FF025E0EFF00000023000000050371 - 0EFF6ED290FF32B15AFF3CC268FF39C166FF2CAB54FF33BE5FFF31BD5EFF25A4 - 4CFF2CBB58FF29B954FF1E9C44FF1FA745FF025F0EFF00000020000000040373 - 0EFF66C785FF3FC56EFF3EC36BFF30AF58FF39C165FF35BF63FF29A951FF31BD - 5DFF2EBB5BFF22A249FF28BA55FF21A848FF03620EFF0000001E000000030374 - 0EFF71D494FF41C570FF34B35DFF3DC36BFF3CC268FF2EAD56FF36BF63FF33BE - 5FFF26A74EFF2EBC5BFF2CBB58FF1A943EFF03630EFF0000001C000000030375 - 0EFF73D495FF37B660FF42C56FFF40C46EFF32B15AFF3BC268FF39C166FF2BAB - 53FF34BE60FF31BD5DFF24A54BFF25AB4DFF02640EFF0000001A000000020377 - 0EFF69CA88FF47C774FF45C772FF35B45FFF3FC46EFF3EC46BFF30B058FF39C1 - 66FF35C063FF29A951FF31BD5EFF28AC4FFF02650EFF00000017000000010378 - 0EFF75D598FF48C775FF38B862FF45C772FF42C670FF34B35CFF3EC36AFF3BC2 - 68FF2DAE56FF35BF64FF34BF60FF219A45FF02670EFF00000015000000000379 - 0EFF77D79AFF3AB964FF49C776FF47C774FF37B660FF42C56FFF40C56EFF32B1 - 5BFF3BC268FF39C166FF2BAB53FF2BAE54FF03680EFF00000013000000000379 - 0EFF6ACA8AFF77D69AFF75D698FF69CA88FF72D495FF71D494FF65C685FF6DD2 - 90FF6BD18EFF62C280FF68D08BFF5FC17EFF03690EFF0000001000000000037B - 0EFF03790EFF03790EFF03780EFF03770EFF03750EFF03740EFF03730EFF0371 - 0EFF02710EFF03700EFF036D0EFF026C0EFF026C0EFF0000000B000000000000 - 0000000000000000000000000000000000010000000100000002000000030000 - 0003000000040000000500000006000000080000000800000003} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000021732 - 68BB1E4190FF1B3E8DFF193D8AFF183989FF102861C30000000C000000000000 - 0000000000000000000000000000000000000000000000000000000000022148 - 94FF86D8FBFF43BFF5FF39B9F2FF31B4EEFF183989FF0000000F000000000000 - 0000000000005C5C5CFF565656FF515051FF4B4B4AFF464645FF414140FF244A - 97FF8CDCFEFF4DC5F9FF52C4F7FF79D0F6FF193B8AFF0000000D000000000000 - 000000000000636262FF0000000000000000000000000000000000000000264E - 98FF90DEFFFF70B5E3FF204592FF1D4190FF142E69C300000007000000000000 - 000000000000686969FF00000000000000000000000000000000000000001E3D - 73BD264E99FF1B3970BE00000004000000040000000400000001000000000000 - 0000000000006F6F6FFF00000000000000000000000000000000000000010000 - 00070000000E0000001200000016000000180000001200000005000000000000 - 000000000000767575FF00000000000000000000000000000000000000031731 - 68BC1E4190FF1B3E8DFF193D8AFF183989FF102761C900000012000000000000 - 0000000000007C7B7BFF00000000000000000000000000000000000000022148 - 94FF86D8FBFF43BFF5FF39B9F2FF31B4EEFF183989FF00000017000000000000 - 000000000000828282FF7C7C7CFF757675FF6F6F6FFF686868FF636263FF244A - 97FF8CDCFEFF4DC5F9FF52C4F7FF79D0F6FF193B8AFF00000014000000000000 - 000000000000888888FF0000000000000000000000000000000000000000264E - 98FF90DEFFFF70B5E3FF204592FF1D4190FF142E68C60000000B000000010000 - 00070000000E8E8E8EFF00000016000000180000001200000005000000001E3D - 73BD264E99FF1B3970BE00000006000000060000000600000002000000031731 - 68BC1E4190FF1B3E8DFF193D8AFF183989FF102761C900000012000000000000 - 0000000000000000000000000000000000000000000000000000000000022148 - 94FF86D8FBFF43BFF5FF39B9F2FF31B4EEFF183989FF00000017000000000000 - 000000000000000000000000000000000000000000000000000000000000244A - 97FF8CDCFEFF4DC5F9FF52C4F7FF79D0F6FF193B8AFF00000014000000000000 - 000000000000000000000000000000000000000000000000000000000000264E - 98FF90DEFFFF70B5E3FF204592FF1D4190FF142E68C60000000B000000000000 - 0000000000000000000000000000000000000000000000000000000000001E3D - 73BD264E99FF1B3970BE00000006000000060000000600000002000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000020000 - 0010000000220000002C0000002F0000002F0000003100000032000000320000 - 00330000003400000035000000340000002A00000014000000030000000D744E - 26CA9F6B33FF9D6932FF4C453FFF453E38FF3C352FFF332C27FF2A231EFF211B - 16FF1F1914FF1F1914FF8A5824FF895723FF613E18D0000000120000001CA46F - 37FFF1CBA2FFEAB77FFF5D564FFFE4AC70FFE2AA6DFF433C36FF37302BFF2A24 - 1FFF211B16FF1F1914FFD99E5FFFD99D5EFF885723FF0000002900000021A671 - 39FFFCD7B1FFFAC790FF6E665FFFF9BF81FFF8BD7FFF564F48FF49423CFF3B35 - 2FFF2E2722FF221C17FFF3B575FFDA9E60FF8A5824FF000000330000001EA873 - 3AFFFCDAB4FFFBC992FF79716AFFF9C184FFF9BF81FF655E57FF5A534CFF4C45 - 3FFF3C3630FF2E2722FFF4B673FFDCA063FF8C5A25FF000000320000001BAB75 - 3BFFFEDCB8FFFCCB95FF877F77FF7D756DFF787069FF716A62FF686059FF5B54 - 4DFF4C453FFF3C3530FFF4B777FFDCA264FF8D5C26FF0000003000000018AD77 - 3DFFFEDEBCFFFDCC98FFFCC589FFFBC387FFFAC285FFF9C084FFF9BF81FFF8BD - 7FFFF6BC7DFFF6B97AFFF5B878FFDFA466FF8F5D28FF0000002E00000016AF79 - 3FFFFEE0BFFFFBCB97FFF1BB80FFEAB57BFFE7B176FFE4AE73FFE2AB71FFE1A9 - 6EFFDFA76CFFE3AB6EFFF0B477FFE1A669FF915F29FF0000002C00000014B17A - 40FFFFE1C1FFF6C694FFBE8D57FFB98955FFB48552FFAF814FFFAB7C4BFFA678 - 48FFA17444FF9E7141FFE3AB6EFFE4A96CFF93612AFF0000002900000012B37C - 41FFFFE3C5FFF6C795FFC1905AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFA37544FFDFA76CFFE5AD6FFF96632CFF0000002600000010B47E - 42FFFFE5C8FFF8CB9BFFC4915CFFFFFFFFFFA9A9A8FFA3A2A3FF9B9B9BFF9393 - 93FFFFFFFFFFA87A49FFE1AA6EFFE9B073FF98652EFF000000230000000EB57F - 44FFFFE6CAFFF9CD9EFFC4915CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFAF7F4EFFE2AC6FFFECB376FF9A6730FF000000200000000DB780 - 44FFFFE7CDFFFBD5ACFFC4915CFFFFFFFFFFA8A8A8FFA3A3A2FF9B9B9BFF9494 - 93FFFFFFFFFFB58551FFE4B27BFFEFBC86FF9D6931FF0000001C00000009B881 - 45FFFFEBD6FFFCE4C9FFC4915CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFBA8B56FFE7C199FFF6D0A8FF9F6B33FF00000014000000038860 - 33C1B88246FFB68044FFC4915CFFC4915CFFC4915CFFC4915CFFC4915CFFC491 - 5CFFC3905BFFBF8E59FFA26E35FFA47037FF775128C600000008000000000000 - 0003000000070000000A0000000B0000000C0000000D0000000E0000000F0000 - 00100000001100000011000000110000000E0000000600000001} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 00000000000000000000000000020000000700000010000000170000001A0000 - 0017000000120000000900000002000000000000000000000000000000000000 - 000000000000000000020000000F2E1C0C61693F1BB68F5625E5A5632AFC8C54 - 22E5653C19B9341F0C7300000015000000050000000100000000000000000000 - 0000000000010100000B4E2F158AA6672EF4AB682CFFA7642AFFAA672CFFAE6A - 2EFFB06C2FFFA76429FE553112AA0D0803300000000500000000000000000000 - 0000000000031F1308408C5628D23D240F790F0904350100001F211308544C2D - 1299995B25F1B26C2FFFA8642AFF502C0FAA0000001500000002000000000000 - 00000402010B553215861E1107400000000B0000000300000002000000050000 - 0011331D0B73935621F1AD692DFF985720FE2C1707730000000A000000010000 - 00070000000D000000140000001400000014000000130000000B000000020000 - 00020000001146260D989D5A21FFA15D24FF552C0EB80000001100000009C170 - 2DFFB76828FFAE5F22FFA2571DFF9C521AFF975018FF48270C8D000000060000 - 0000000000061C0F0553904D19FFA66228FF784016E4000000160000000CC776 - 32FFD58D4DFFC57636FFBE6E2FFFB16428FF5D310FAB00000011000000020000 - 0000000000040F0702398C4815FFA96429FF955523FC000000190000000BCC7B - 36FFDD9552FFD0823EFFC77635FFB46527FF2F19085F00000007000000000000 - 0000000000062311055C934F1CFFA76329FF8B5527E3000000150000000AD07F - 39FFDF9B55FFDB914CFFD28844FFC17332FF6135139D0000000E000000050000 - 00050000001147230A99A35D26FFA9662DFF6D4725B40000000F00000009D182 - 3EFFD98F48FFDA914DFFDD9654FFD38746FFBB7031F66236139C2A1608542815 - 0656562D0FA0A15D28F5B26C32FFB37239FE3D29166C0000000800000007D185 - 44FF67401F8B955D2BBDD78E49FFDF9856FFD78D4BFFC77839FFB8692AFFB163 - 28FFB76C32FFC2783FFFC0783FFF684424A00000000F00000001000000046844 - 258400000008130C052071461F95D18540FDD68B49FFD98F51FFD99053FFD388 - 4BFFC97E44FFBF783EFE6742219D120C07270000000300000000000000010000 - 00020000000100000001000000064329125C7D4B21A5A8622ADCBE6E2FFBA15F - 2ADD734620A93D2713620000000B000000030000000100000000000000000000 - 0000000000000000000000000000000000020000000500000007000000080000 - 0008000000070000000400000001000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000080000001E00000027000000200000000900000000000000000000 - 0000000000000000000000000002000000040000000200000000000000000000 - 00000000001C176126FF176126FF176026FF0000001F00000000000000000000 - 000000000000000000020000000D071E0C600000000A00000000000000000000 - 00020104012F1A6529FF4CA967FF175F26FD0000002400000000000000000000 - 0000000000010000000A071F0B68176426FF0000001400000000000000000000 - 0009071B0A6F2C7A3EFF31974DFF135120E90000001E00000000000000000000 - 000100000008071F0C632E8142FF176526FF0000001900000003000000080103 - 012310411ABF2C8C46FF1A8236FF0E3B17BD0000001500000000000000010000 - 0006071F0B5E2F8443FF37B461FF176526FF061C0B6601040126061C0B651141 - 1ABB30904AFF229A47FF247838FE07200C770000000B0000000000000004071F - 0C59308644FF3DBA67FF39B763FF176626FF176526FF186728FF1E7733FF2A90 - 46FF41AC61FF388F4EFF0D3615A900000015000000020000000007200C52378A - 4AFF7ED39BFF69CB8BFF3CB866FF39B562FF76CB92FF72C68EFF63B77CFF4D9E - 63FF338146FE0C3615A40209032D000000040000000000000000000000030720 - 0B5536894AFF7DD29BFF69C98AFF176726FF176626FE176425FB135520DF0E3E - 17AE07210C690000000F00000004000000000000000000000000000000000000 - 000307200C5436894AFF7DD29AFF176825FF000000120000000B0000000B0000 - 0009000000050000000100000000000000000000000000000000000000000000 - 00000000000307200B54368949FF176825FF0000000800000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000207200B54176826FF0000000600000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000207200B500000000200000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000040000 - 000F000000140000001100000005000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000C1766 - 25FF176526FF176525FF00000011000000000000000000000000000000020000 - 00050000000200000000000000000000000000000000000000000000000C1764 - 25FB69C88AFF196828FF010401210000000200000000000000000000000B071D - 0C63000000110000000200000000000000000000000000000000000000091357 - 20DD60BC7EFF267F3BFF071C0B5D000000060000000000000000000000151762 - 26FF071D0B730000001100000002000000000000000000000000000000050E40 - 17A64DA666FF43A25EFF0F421AB20103011900000006000000030000001A1762 - 26FF2B7B3EFF071D0B7300000011000000020000000000000000000000020722 - 0C5B348848FD6CCC8DFF3C9F58FF0F431AB1071C0A5D01040223061B0B671763 - 25FF59B675FF1A732FFF071D0B73000000110000000200000000000000000000 - 00050D381494469F5FFF6BCA8CFF41A05DFF257C3BFF186728FF176326FF1763 - 26FF27A24DFF229E47FF19722FFF071D0C720000001000000002000000000000 - 00010209031C0D381494338847FD4AA363FF5CB879FF64C283FF63C181FF60BE - 7EFF5DBB7AFF26A14BFF229D46FF257738FF071D0C6300000005000000000000 - 0000000000010000000407210C5B0E3E17A5135620DC176325FB176526FE1764 - 25FF5EBD7CFF28A34EFF26793AFF071E0B6C0000000E00000002000000000000 - 000000000000000000000000000200000004000000070000000A000000161764 - 26FF61BE7EFF287C3CFF071E0B680000000C0000000200000000000000000000 - 00000000000000000000000000000000000000000000000000000000000B1765 - 26FF2E8141FF071E0C630000000A000000010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000071765 - 26FF071F0B5D0000000800000001000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000003071F - 0B53000000050000000100000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0001000000010000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000442717FF4427 - 17FF140B074D422516FF422516FF000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000442717FF0000000000000000000000000000000000000000000000070000 - 000B0000000E0000000F00000011000000120000001400000016000000170000 - 0019452819FF0000001C0000001E0000001E0000001400000005883C0EBDBA53 - 13FFB95012FFB74F11FFB44E10FFB24C10FFB14A0FFFAE490EFFAC480EFFAB46 - 0DFF4B2B1AFF937967FF907866FF8F7665FF665447CC00000014BF5614FFD68D - 48FFD38B47FFD28945FFD08743FFCE8541FFCE8440FFCC833EFFCB823DFFCA80 - 3CFF4C2E1EFFF8F2EAFFF7F0E7FFF7EFE4FF8F7463FF0000001DC05816FFD78E - 4AFFFFFFFFFFD48B46FFD28844FFDEAB7CFFFFFFFFFFFFFFFFFFFFFFFFFFCA81 - 3DFF503120FFF8F3ECFFF8F2EAFFF7F0E7FF8F7663FF0000001DC25916FFD88F - 4BFFFFFFFFFFD58B47FFD38A46FFFFFFFFFFD08742FFCE8541FFCC833FFFCB82 - 3DFF553424FFF9F5EEFFF8F3EBFFF8F2EAFF907866FF0000001CC45A16FFDA91 - 4CFFFFFFFFFFD68D49FFD58B47FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCD83 - 3FFF593727FFF9F5F0FFF8F5EEFFF8F2EBFF927967FF0000001AC55B18FFDB91 - 4EFFFFFFFFFFFFFFFFFFE2AF80FFFFFFFFFFD28944FFD18743FFFFFFFFFFCD84 - 40FF5C3C2AFFFAF6F2FFF9F5F0FFF9F4EEFF937969FF00000018C75D18FFDB93 - 4FFFFFFFFFFFD98F4CFFFFFFFFFFE2AF7FFFFFFFFFFFFFFFFFFFDEAB7CFFCE85 - 41FF603D2EFFFBF8F3FFFAF6F2FFF9F5F0FF947A69FF00000016C85F19FFDD94 - 50FFDC924EFFDA914DFFD88F4BFFD68D49FFD48B47FFD38A46FFD18844FFD087 - 42FF654231FFFBF8F5FFFAF7F3FFFAF6F2FF947C6AFF00000013964613BDC85E - 19FFC75B18FFC45A17FFC05816FFC05815FFBD5414FFBC5413FFB95213FFB750 - 11FF674534FF9D8474FF998171FF98806EFF6F5C50C80000000C000000000000 - 0000000000000000000100000002000000020000000400000005000000060000 - 00086B4737FF0000000B0000000C0000000D0000000A00000003000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00006E4B3AFF0000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000724E3DFF724E - 3DFF2218124D704B3CFF6E4B3AFF000000000000000000000000} - end> - end - object ilItems: TcxImageList - FormatVersion = 1 - DesignInfo = 23593072 - ImageInfo = < - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000100B051D3E29127065431DB7815526EA815526EA6543 - 1DB73E291270100B051D00000000000000000000000000000000000000000000 - 0000000000002015093962401CB0AD6F36FFC87F41FFDC8B49FFDC8B49FFC87F - 41FFAD7035FF62401CB020150939000000000000000000000000000000000000 - 0000100A051D63401BB0B77538FFE08C49FFE08C49FFE08C4AFFE08B49FFE08C - 4AFFE08B4AFFB87438FF63401CB0100B051D0000000000000000000000000000 - 00003F281170AB6B31FFDB8545FFDB8645FFDB8544FFDA8644FFDB8645FFDB86 - 44FFDB8644FFDA8645FFAB6B31FF402911700000000000000000000000000000 - 000069421AB7BF7336FFD67F40FFD57F40FFD67F40FFD67F40FFD57F3FFFD67F - 40FFD57F3FFFD57F3FFFBF7336FF69421BB70000000000000000000000000000 - 0000885420EACA7538FFCF783AFFD78348FFDE8C54FFE3935DFFE3935DFFDE8C - 54FFD78348FFD0783AFFCA7538FF885421EA0000000000000000000000000000 - 000089541FEAC46F32FFD78751FFE9A678FFE9A678FFE9A578FFE9A679FFE9A6 - 78FFE9A577FFD78751FFC46F33FF8A541FEA0000000000000000000000000000 - 00006C4117B7B5662AFFE6AC86FFEFBD9BFFEFBD9BFFEFBC9AFFEFBD9BFFEEBC - 9BFFEFBC9BFFE6AC85FFB5652AFF6D4118B70000000000000000000000000000 - 000043280E70A75E23FFEABFA3FFF5D6C1FFF6D6C1FFF5D6C1FFF6D6C1FFF5D6 - C1FFF5D6C1FFEABFA3FFA75E23FF43280E700000000000000000000000000000 - 0000120A031D6B3F15B0B97B4BFFFAECE3FFFBEDE4FFFBEDE4FFFBEDE3FFFBED - E4FFFAECE3FFB97B4AFF6B3E15B0120A031D0000000000000000000000000000 - 000000000000231406396C3E14B0B06F3AFFCFA381FFEFDFD2FFEFDED2FFCFA3 - 81FFAF6F3AFF6C3E13B023140639000000000000000000000000000000000000 - 00000000000000000000120A031D46280C70724013B7915319EA915219EA7241 - 13B746280C70120A031D00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000020000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00010120075C023A0DAB034E11E6034C11E602380DAB021E075D301D09695D37 - 12AC7B4A18E6794A18E6583512AB2F1D095C010000010000000000000001022F - 0A80167326FF2F943FFF44B054FF44AF54FF2F923FFF166D26FF42531EFFBB84 - 53FFE8AC7AFFEAAF7CFFCA905CFFA06935FF41280E80010000010123065C1677 - 26FF32A544FF29AF3DFF18A92EFF18A92EFF29AF3DFF32A344FF166D26FF7D72 - 3CFFE7975BFFF09F60FFF1A36AFFD99762FF9D6634FF2F1D0A5C02430CAB2590 - 35FF1BA32DFF0F9D22FF0F9E22FF0F9D23FF0F9E23FF1BA22EFF258B35FF3959 - 1FFFD6874EFFE79153FFE68F52FFE39156FFBE7E4BFF593612AB035C10E62295 - 30FF0D931DFF0D931CFF0D911CFF0D931CFF0D911CFF0D911CFF22932FFF1254 - 16FFCB7942FFDC884BFFDD8648FFDA8046FFD0824DFF794919E6035E10E61186 - 1CFF1B942CFF34AA4DFF48BD68FF48BD68FF34AB4DFF1C952CFF11821CFF1256 - 17FFD28B5DFFE69965FFE08E59FFD78049FFC8743CFF7B4A18E602470CAB0772 - 11FF64B774FF8DD1A0FF8DD2A0FF8DD2A0FF8DD1A0FF65B774FF076C11FF3B67 - 32FFDDAE92FFEBBB9DFFEBBB9DFFE1A37DFFB0622BFF5D3812AB0127065C046C - 11FF8AC091FFC4E3CAFFC4E3CAFFC4E3CAFFC4E3CAFF89BF91FF046111FF8093 - 72FFE9D2C5FFF2DACCFFF3DACCFFE0B59AFF9D5A20FF341F0A5C000000010236 - 0980398B43FF88BA8DFFC7E0C9FFC7DFCAFF88B98DFF398544FF496128FFCAA7 - 8DFFEEDACDFFF0DCCFFFD9B398FFB47F4FFF492C0E8001000001000000000000 - 00010127075C02470CAB035E11E6035C10E602430DAB0223075D35210969693F - 14AC8D5519E68B551AE6663F13AB36210A5C0100000100000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 00000000000000000000000000010120075C023A0DAB034E11E6034C11E60238 - 0DAB011E075C0000000100000000000000000000000000000000000000000000 - 00000000000000000001022F0A80167326FF2F943FFF44B054FF44AF54FF2F92 - 3FFF166D26FF022A0A8000000001000000000000000000000000000000000000 - 0000000000000123065C167726FF32A544FF29AF3DFF18A92EFF18A92EFF29AF - 3DFF32A344FF166D26FF011E075C000000000000000000000000000000000000 - 00000000000002430CAB259035FF1BA32DFF0F9D22FF0F9E22FF0F9D23FF0F9E - 23FF1BA22EFF258B35FF02380DAB000000000000000000000000000000000000 - 000000000000035C10E6229530FF0D931DFF0D931CFF0D911CFF0D931CFF0D91 - 1CFF0D911CFF22932FFF044C11E6000000000000000000000000000000000000 - 000000000000035E10E611861CFF1B942CFF34AA4DFF48BD68FF48BD68FF34AB - 4DFF1C952CFF11821CFF034D11E6000000000000000000000000000000000000 - 00000000000002470CAB077211FF64B774FF8DD1A0FF8DD2A0FF8DD2A0FF8DD1 - A0FF65B774FF076C11FF023A0DAB000000000000000000000000000000000000 - 0000000000000227075D046C11FF8AC091FFC4E3CAFFC4E3CAFFC4E3CAFFC4E3 - CAFF89BF91FF046111FF0120075D000000000000000000000000000000000000 - 00000000000036220A5D43601CFF398B43FF88BA8DFFC7E0C9FFC7DFCAFF88B9 - 8DFF398544FF3F571EFF2F1D0A5D000000000000000000000000000000000000 - 000000000000663E13ABB37543FF766F31FF39691FFF126717FF126616FF3A66 - 21FF796F34FFB07546FF593612AB000000000000000000000000000000000000 - 0000000000008B551AE6CB7E49FFCD7740FFCC7942FFCB7942FFCA7D45FFCF7E - 43FFD27B44FFCE814CFF794919E6000000000000000000000000000000000000 - 0000000000008D5519E6C67037FFD37A45FFDE8D57FFE59865FFE69965FFE08E - 59FFD78049FFC8743CFF7B4A18E6000000000000000000000000000000000000 - 000000000000694013ABB46329FFE0A17BFFEBBB9BFFECBA9CFFEBBB9DFFEBBB - 9DFFE1A37DFFB0622BFF5D3812AB000000000000000000000000000000000000 - 00000000000039230A5CA66021FFE0B59AFFF2DACCFFF2DACCFFF2DACCFFF3DA - CCFFE0B59AFF9D5A20FF341F0A5C000000000000000000000000000000000000 - 000000000000010000014F2F0F80B9824FFFDAB498FFF0DCCFFFF0DCCFFFD9B3 - 98FFB47F4FFF492C0E8001000001000000000000000000000000000000000000 - 000000000000000000000100000139220A5C694013AB8D5519E68B551AE6663F - 13AB36210A5C0100000100000000000000000000000000000000} - end - item - Image.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000301F10489A62 - 30E7A86A33FFA66731FDA5662FFFA5642CFFA3632AFFA26229FFA15F27FFA05F - 25FF9F5E23FF9E5C22FF9D5B21FF9D5A20FF96571FF32D1A0A489B6434E4DCA4 - 75FFE7A065FFE59D62FFE39A5FFFE0975CFFDE9559FFDD9257FFDA8F54FFD88C - 51FFD78A4FFFD5884CFFD38649FFD18548FFC2773BFF8D511EE4AD723CFFF6C1 - 96FFF3AB71FFF1A96EFFEFA66BFFEEA469FFECA166FFEB9F64FFE99D61FFE89A - 5FFFE6985CFFE5965AFFE49458FFDE8F52FFD18447FF9D5A20FFAF733EFFF8C5 - 9BFFF4AD73FFF3AA70FFF0A86EFFF0A56BFFEEA368FFECA166FFEB9E63FFE99C - 61FFE89A5FFFE6985CFFE5955AFFE39458FFD38549FF9D5B21FFB17641FFF9C8 - 9EFFF5AE74FFF4AC72FFF2AA70FFF1A86EFFEFA66BFFEEA368FFECA165FFEB9E - 63FFE99D60FFE7995EFFE6975CFFE49659FFD4874CFF9E5C22FFB27842FFFACB - A3FFF6B077FFF5AF74FFF3AC72FFF2AA6FFFF1A86DFFEFA56AFFEDA368FFECA0 - 65FFEB9F62FFE99B60FFE79A5EFFE6975BFFD6894EFF9F5D23FFB37944FFFBCC - A5FFF7B279FFF6B076FFF5AF74FFF4AC72FFF2A970FFF0A76DFFEFA46AFFEEA3 - 68FFECA066FFEA9E62FFE99C60FFE7995DFFD88B50FFA05E25FFB47B47FFFCCF - A8FFF8B47BFFF7B278FFF6B076FFF4AE74FFF3AB71FFF2A96FFFF0A76CFFEFA4 - 6AFFEDA367FFEBA065FFEA9D62FFE99B60FFDA8E52FFA15F27FFB57C48FFFCD0 - ACFFFAB57DFFF8B47AFFF8B278FFF6B076FFF4AE73FFF6C399FFF5C095FFF4BD - 92FFF3BB8EFFF1B78AFFEFB485FFEEB282FFD29463FF935925E7B67D4AFFFDD3 - AFFFFBB87EFFFAB67CFFF8B47AFFF7B278FFAF743EFFAD723CFFAD703AFFAB6E - 38FFAA6C35FFA86A33FFA76830FFA5662EFF915828E028180A3FB77F4CFFFDD5 - B1FFFCBF8BFFFBB77EFFFAB57CFFF8B37AFFB07540FFDFDEDEFFCDCDCDFFBCBE - BEFF8A8A8AFF6A6A6AFF00000000000000000000000000000000A67446E7ECBF - 9AFFFED5B2FFFDD3B0FFFCD1ADFFE9B990FFB58050FFEFEFEFFFE7E7E7FFD6D6 - D6FFA5A5A4FF616162E7000000000000000000000000000000002D20133F9166 - 3DC9B77F4CFFB67E4AFFB57C48FFA27041E86F6153D66F6F70FF6E6E6FFF6E6E - 6EFF606160E01B1B1B3F00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - end> - end - object pmTreeViewActions: TPopupMenu - Images = ilActions - Left = 80 - Top = 360 - object Undo1: TMenuItem - Action = acUndo - end - object Redo1: TMenuItem - Action = acRedo - end - object N1: TMenuItem - Caption = '-' - end - object miExpandAll: TMenuItem - Action = acTreeViewExpandAll - end - object miCallapseAll: TMenuItem - Action = acTreeViewCollapseAll - end - object miSeparator1: TMenuItem - Caption = '-' - end - object miTreeViewDelete: TMenuItem - Action = acTreeViewItemsDelete - end - object miSeparator2: TMenuItem - Caption = '-' - end - object miAlignBy: TMenuItem - Action = acAlignBy - end - object Rename1: TMenuItem - Action = acTreeViewItemRename - end - end - object pmAvailableItemsActions: TPopupMenu - Images = ilActions - Left = 78 - Top = 392 - object Undo2: TMenuItem - Action = acUndo - end - object Redo2: TMenuItem - Action = acRedo - end - object N2: TMenuItem - Caption = '-' - end - object AddGroup1: TMenuItem - Action = acAddGroup - end - object AddItem1: TMenuItem - Action = acAddItem - end - object Delete1: TMenuItem - Action = acAvailableItemsDelete - SubMenuImages = ilActions - end - object Rename2: TMenuItem - Action = acAvailableItemRename - end - end - object ilHelper: TcxImageList - FormatVersion = 1 - DesignInfo = 25690224 - end -end diff --git a/internal/x.46/Lib/D11/dxLayoutDragAndDrop.dcu b/internal/x.46/Lib/D11/dxLayoutDragAndDrop.dcu deleted file mode 100644 index a98c7384..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutDragAndDrop.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutEditForm.dcu b/internal/x.46/Lib/D11/dxLayoutEditForm.dcu deleted file mode 100644 index dc7d85c5..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutEditForm.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutEditForm.dfm b/internal/x.46/Lib/D11/dxLayoutEditForm.dfm deleted file mode 100644 index 4e4b4d5e..00000000 --- a/internal/x.46/Lib/D11/dxLayoutEditForm.dfm +++ /dev/null @@ -1,82 +0,0 @@ -object LayoutEditForm: TLayoutEditForm - Left = 233 - Top = 209 - BorderStyle = bsDialog - Caption = 'LayoutEditForm' - ClientHeight = 88 - ClientWidth = 282 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object LayoutControl: TdxLayoutControl - Left = 0 - Top = 0 - Width = 282 - Height = 88 - Align = alClient - TabOrder = 0 - TabStop = False - AutoContentSizes = [acsWidth] - object edMain: TEdit - Left = 12 - Top = 30 - Width = 121 - Height = 17 - BorderStyle = bsNone - TabOrder = 0 - Text = 'edMain' - end - object btnOK: TButton - Left = 116 - Top = 55 - Width = 75 - Height = 23 - Caption = 'btnOK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 197 - Top = 55 - Width = 75 - Height = 23 - Cancel = True - Caption = 'btnCancel' - ModalResult = 2 - TabOrder = 2 - end - object TdxLayoutGroup - ShowCaption = False - Hidden = True - ShowBorder = False - object LayoutControlItemEdit: TdxLayoutItem - Caption = 'Edit1' - CaptionOptions.Layout = clTop - Control = edMain - end - object dxLayoutControl1Group1: TdxLayoutGroup - AutoAligns = [aaVertical] - AlignHorz = ahRight - ShowCaption = False - LayoutDirection = ldHorizontal - ShowBorder = False - object dxLayoutControl1Item2: TdxLayoutItem - Caption = 'Button1' - ShowCaption = False - Control = btnOK - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item3: TdxLayoutItem - Caption = 'Button2' - ShowCaption = False - Control = btnCancel - ControlOptions.ShowBorder = False - end - end - end - end -end diff --git a/internal/x.46/Lib/D11/dxLayoutLookAndFeelListDesignForm.dcu b/internal/x.46/Lib/D11/dxLayoutLookAndFeelListDesignForm.dcu deleted file mode 100644 index 18267207..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutLookAndFeelListDesignForm.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutLookAndFeelListDesignForm.dfm b/internal/x.46/Lib/D11/dxLayoutLookAndFeelListDesignForm.dfm deleted file mode 100644 index c31faac6..00000000 --- a/internal/x.46/Lib/D11/dxLayoutLookAndFeelListDesignForm.dfm +++ /dev/null @@ -1,650 +0,0 @@ -object dxLayoutLookAndFeelListDesignForm: TdxLayoutLookAndFeelListDesignForm - Left = 532 - Top = 129 - AutoScroll = False - ClientHeight = 474 - ClientWidth = 357 - Color = clBtnFace - OldCreateOrder = False - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lcMain: TdxLayoutControl - Left = 0 - Top = 0 - Width = 357 - Height = 474 - Align = alClient - TabOrder = 0 - TabStop = False - object lbItems: TListBox - Left = 12 - Top = 40 - Width = 331 - Height = 121 - Style = lbOwnerDrawFixed - BorderStyle = bsNone - ItemHeight = 13 - MultiSelect = True - TabOrder = 1 - OnClick = lbItemsClick - OnKeyDown = lbItemsKeyDown - end - object tlbGroups: TToolBar - Left = 10 - Top = 10 - Width = 46 - Height = 22 - Align = alNone - AutoSize = True - Caption = 'Commands' - EdgeInner = esNone - EdgeOuter = esNone - Flat = True - Images = ilMain - ParentShowHint = False - ShowHint = True - TabOrder = 0 - object tbAddItem: TToolButton - Left = 0 - Top = 0 - Action = acAdd - DropdownMenu = PopupMenu1 - end - object tbDelete: TToolButton - Left = 23 - Top = 0 - Action = acDelete - end - end - object lcPreview: TdxLayoutControl - Left = 22 - Top = 220 - Width = 277 - Height = 232 - BevelKind = bkSoft - TabOrder = 2 - TabStop = False - AutoSize = True - object cxTextEdit1: TcxTextEdit - Left = 84 - Top = 101 - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 1 - Text = 'cxTextEdit1' - Width = 186 - end - object cxMemo1: TcxMemo - Left = 10000 - Top = 10000 - Lines.Strings = ( - 'cxMemo1') - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 9 - Visible = False - Height = 75 - Width = 169 - end - object cxCheckBox3: TcxCheckBox - Left = 22 - Top = 155 - Caption = 'cxCheckBox1' - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 3 - Transparent = True - Width = 248 - end - object cxTextEdit2: TcxTextEdit - Left = 84 - Top = 128 - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 2 - Text = 'cxTextEdit2' - Width = 186 - end - object cxRichEdit1: TcxRichEdit - Left = 10000 - Top = 10000 - Lines.Strings = ( - 'cxRichEdit1') - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 5 - Visible = False - Height = 65 - Width = 186 - end - object cxButton1: TcxButton - Left = 10000 - Top = 10000 - Width = 72 - Height = 25 - Caption = 'cxButton1' - TabOrder = 6 - Visible = False - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - end - object cxButton2: TcxButton - Left = 10000 - Top = 10000 - Width = 72 - Height = 25 - Caption = 'cxButton2' - TabOrder = 7 - Visible = False - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - end - object cxButton3: TcxButton - Left = 10000 - Top = 10000 - Width = 72 - Height = 25 - Caption = 'cxButton3' - TabOrder = 8 - Visible = False - LookAndFeel.Kind = lfStandard - LookAndFeel.NativeStyle = False - LookAndFeel.SkinName = '' - end - object cxCheckBox1: TcxCheckBox - Left = 22 - Top = 182 - Caption = 'cxCheckBox2' - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.HotTrack = False - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = False - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = False - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = False - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = False - StyleHot.LookAndFeel.SkinName = '' - TabOrder = 4 - Transparent = True - Width = 121 - end - object TdxLayoutGroup - AlignHorz = ahParentManaged - AlignVert = avParentManaged - CaptionOptions.Visible = False - Hidden = True - ShowBorder = False - object lcPreviewGroup4: TdxLayoutGroup - CaptionOptions.Text = 'New Group' - LayoutLookAndFeel = dxLayoutWebLookAndFeel2 - ShowBorder = False - UseIndent = False - object liWarning: TdxLayoutItem - CaptionOptions.Text = - 'This preview is built using editors shipped with the ExpressEdit' + - 'ors Library. We recommend that you use our editors to avoid pain' + - 'ting issues with standard VCL editors.' - CaptionOptions.Glyph.Data = { - 36100000424D3610000000000000360000002800000020000000200000000100 - 2000000000000010000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001515 - 155D262626B2282828CA252525CA232323CA202020CA1D1D1DCA191919CA1818 - 18CA151515CA121212CA111111CA0E0E0ECA0C0C0CCA0A0A0ACA080808CA0606 - 06CA050505CA020202CA020202CA000000CA000000CA000000CA000000CA0000 - 00CA000000CA000000CA000000CA000000B20000005D00000000101010403838 - 38E83B3B3BFF373737FF343434FF313131FF2D2D2DFF292929FF252525FF2222 - 22FF1F1F1FFF1B1B1BFF191919FF161616FF121212FF101010FF0D0D0DFF0B0B - 0BFF080808FF060606FF040404FF020202FF000000FF000000FF000000FF0000 - 00FF000000FF000000FF000000FF000000FF000000E800000040343434BC4343 - 43FF404040FF3C3C3CFF363332FF302927FF2C2523FF29221FFF251D1BFF221A - 18FF1F1714FF1B1310FF18100DFF140C09FF120A06FF0F0703FF0C0400FF0900 - 00FF070000FF050000FF020000FF000000FF000000FF000000FF000000FF0000 - 00FF000000FF000000FF000000FF000000FF000000FF000000BC454545EA4848 - 48FF454545FF3F3D3DFF70AABAFF86DBF3FF89E4FFFF85E2FFFF81E0FFFF7FDE - FFFF7BDDFFFF79DCFFFF76DAFFFF73D9FFFF71D7FFFF6FD6FFFF6CD4FFFF6BD4 - FFFF68D3FFFF68D2FFFF67D1FFFF67D1FFFF67D0FFFF66D0FFFF66CFFFFF65CF - FFFF63CBFAFF5492A5FF000000FF000000FF000000FF000000EA3F3F3FCA4C4C - 4CFF494949FF443F3DFF73B8C9FF63EEFFFF56E5FFFF52E3FFFF4CE0FFFF48DC - FFFF43DAFFFF3ED8FFFF39D5FFFF34D3FFFF48DDFFFF4ED4FFFF4AD3FFFF3ED8 - FFFF21C9FFFF20C8FFFF20C7FFFF20C7FFFF1FC6FFFF1FC5FFFF1EC5FFFF1DC4 - FFFF25CBFFFF398FB6FF000000FF000000FF000000FF000000CA2222226B4F4F - 4FFF4C4C4CFF444140FF8EB4BDFF96F1FFFF74E2FFFF5FDDFFFF4FD8FFFF40D3 - FFFF3BCFFFFF38CEFFFF31CAFFFF48D4FFFF559DB7FF2D3A3FFF2A373CFF4D98 - B5FF35CBFFFF14BAFFFF16BAFFFF15B9FFFF14B8FFFF14B7FFFF13B6FFFF10B5 - FFFF1EC2FFFF3582A5FF000000FF000000FF000000FF0000006B0404040B5757 - 57D5646464FF585756FF7A7E7FFFD4F7FCFFC2F5FFFFAFEEFFFF98EAFFFF79E1 - FFFF5AD9FFFF41D2FFFF37D1FFFF55C5ECFF32393CFF1F1714FF1B1310FF2831 - 35FF44BCEAFF1BC0FFFF17BBFFFF17BAFFFF17B9FFFF16B9FFFF15B8FFFF11B7 - FFFF35C1FCFF1B333EFF000000FF000000FF000000D50000000B000000002C2C - 2C5C757575FF6E6E6EFF656363FFB0C6CCFFC9FCFFFFBAF2FFFFB3EFFFFFAAEC - FFFF9BE9FFFF7EE2FFFF5BDDFFFF59C0E3FF303537FF24201EFF211C1AFF292D - 2FFF44B6E3FF1FC3FFFF1ABDFFFF18BBFFFF17BAFFFF17BAFFFF14B8FFFF1FC4 - FFFF3A8AAEFF040302FF030202FF020202FF0000005C00000000000000000303 - 03085E5E5EC7747474FF696868FF818688FFCCF4FBFFBCF4FFFFB3F0FFFFABED - FFFFA1EBFFFF98E9FFFF8BE5FFFF8CE8FDFF5C808DFF2C3031FF2A2D2EFF4B7C - 8DFF48D2FEFF1FC0FFFF1EBFFFFF1ABDFFFF18BBFFFF17BBFFFF13BBFFFF39C1 - FAFF1E343EFF050100FF050606FF020202C70000000800000000000000000000 - 00002525254C797979FE737373FF6A6868FFADC2C6FFC8FCFFFFB7F1FFFFAFF0 - FFFFA5EDFFFF9BEAFFFF8FE7FFFF89E6FFFF91E8FFFF75BCD3FF5DB2CEFF54D5 - FFFF2EC9FFFF24C3FFFF22C2FFFF1EBFFFFF1ABDFFFF16BBFFFF23C7FFFF3C86 - A5FF0C0705FF0A0909FF080808FE0101014C0000000000000000000000000000 - 0000000000005B5B5BB67A7A7AFF6F6F6EFF818687FFC9F1F9FFBCF5FFFFB3F1 - FFFFAAEFFFFF9FECFFFF95E9FFFF88E5FFFF8CF0FFFF6D929DFF537581FF4FD7 - FFFF2AC9FFFF2AC7FFFF26C5FFFF21C1FFFF1DBFFFFF16BFFFFF3DC1F5FF2536 - 3CFF0E0A08FF0E0E0EFF060606B6000000000000000000000000000000000000 - 0000000000001D1D1D397C7C7CFA797979FF6F6D6CFFACC0C5FFC7FCFFFFB5F2 - FFFFAEF0FFFFA4EDFFFF9AEBFFFF8FE8FFFF97F0FFFF5A6E73FF4A5558FF71DA - FBFF38D0FFFF2EC9FFFF2AC7FFFF26C4FFFF1EC1FFFF2ACCFFFF4087A2FF160F - 0DFF141514FF101010FA03030339000000000000000000000000000000000000 - 00000000000000000000545454A37F7F7FFF757474FF838788FFC8F0F6FFBCF5 - FFFFB2F1FFFFA9EFFFFF9FECFFFF95EDFFFF9AE3F6FF515C5FFF434748FF80D3 - ECFF55DBFFFF36CDFFFF2FCAFFFF2AC8FFFF23C7FFFF45C4F1FF2D3A3FFF1814 - 12FF181818FF0C0C0CA300000000000000000000000000000000000000000000 - 000000000000000000001616162B7D7D7DF17F7F7FFF747171FFABBFC3FFC6FB - FFFFB5F2FFFFADF1FFFFA4EEFFFF9DF1FFFF9CD8E6FF484A4AFF3D3938FF80C1 - D4FF6BE3FFFF49D4FFFF34CEFFFF2DC9FFFF38D4FFFF4A89A0FF201916FF1F1F - 1FFF191919F10404042B00000000000000000000000000000000000000000000 - 000000000000000000000000000050505094848484FF7C7B7AFF86898AFFC7EE - F6FFBBF6FFFFB0F1FFFFA8EFFFFFA7F6FFFF93BFC9FF43403FFF403C3AFF739E - AAFF7AE8FFFF59D9FFFF3ED2FFFF33D0FFFF53CAF1FF364145FF242120FF2323 - 23FF121212940000000000000000000000000000000000000000000000000000 - 00000000000000000000000000001010101D7D7D7DEB848484FF797877FFABBD - C0FFC6FCFFFFB5F3FFFFACF1FFFFB1F9FFFF7E979CFF474444FF43403FFF6478 - 7DFF87EDFFFF64DDFFFF4BD6FFFF4BDDFFFF558D9FFF2B2624FF2A2A2AFF2222 - 22EB0303031D0000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000004545457C898989FF818080FF8B8E - 8EFFC6EEF5FFBAF6FFFFB0F2FFFFB8F8FFFF6E787AFF4B4948FF494645FF5962 - 64FF8DE2F6FF6DE3FFFF57DEFFFF63D1F1FF414C4FFF312E2DFF2F2F2FFF1515 - 157C000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000B0B0B147B7B7BDE898989FF7F7D - 7DFFADBFC2FFC6FCFFFFB6F7FFFFB4E8F2FF666B6CFF51504FFF4F4D4DFF5456 - 56FF8ACEDEFF76E8FFFF71EAFFFF6196A3FF393331FF373737FF2C2C2CDE0303 - 0314000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000003C3C3C698E8E8EFF8685 - 85FF8D8F90FFC6EEF3FFBEFDFFFFB0DDE6FF646667FF565555FF545353FF5251 - 4FFF88C3D1FF80F2FFFF83DAEEFF4C5457FF3D3A39FF3C3C3CFF161616690000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000005050509787878D28E8E - 8EFF848181FFADBEC2FFC8FEFFFFBEEEF5FF6F7475FF585656FF565454FF5C5E - 5FFF96D7E4FF90F6FFFF759DA6FF433E3DFF444444FF343434D2020202090000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000343434599292 - 92FF8B8A8AFF909292FFC6EBF2FFC9FFFFFFA5BFC3FF656565FF5F5E5DFF8DA9 - B0FFA5F8FFFF98DFEFFF5E6264FF4B4949FF484848FF17171759000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000030303067171 - 71C2929292FF898786FFADBDC0FFC8FBFFFFC3FAFFFFB7E7EFFFB0E3EDFFAEF3 - FFFFA4F7FFFF86A5ABFF585553FF525252FF383838C201010106000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000002929 - 2945939494FC909090FF929393FFC6E9EFFFBEF9FFFFB6F8FFFFAEF7FFFFA6F6 - FFFFA8E0EBFF6E7071FF616160FF555555FC1515154500000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00006A6A6AAF969696FF8E8C8CFFADBABDFFCAFCFFFFB9F5FFFFB1F4FFFFB6FA - FFFF93A9ACFF6A6665FF686869FF3E3E3EAF0000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000020202035959595F8949494FF959595FFC7E8EDFFC0F9FFFFB9F9FFFFB7E4 - EBFF7C7E7DFF717070FF696969F8131313350000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000636363A09A9A9AFF918F8FFFADB9BBFFD0FFFFFFCAFFFFFF9EAF - B2FF797676FF787878FF464646A0000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000019191928939393F0999898FF979797FFACB7B8FFA7B3B5FF8889 - 89FF818181FF757575F012121228000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000005858588D9E9E9EFF989898FF908E8EFF8C8A8AFF8C8B - 8BFF878787FF4747478D00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000001010101A8B8B8BDE9D9D9DFF989898FF949494FF9090 - 90FF787878DE0D0D0D1A00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000002A2A2A42939393EA9D9D9DFF989898FF8888 - 88EA252525420000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000003C3C3C5F6F6F6FB56D6D6DB53838 - 385F000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000} - CaptionOptions.Width = 235 - end - end - object lcPreviewGroup2: TdxLayoutGroup - AlignVert = avClient - CaptionOptions.Text = 'New Group' - LayoutDirection = ldTabbed - ShowBorder = False - object dxLayoutGroup1: TdxLayoutGroup - AlignHorz = ahClient - AlignVert = avClient - CaptionOptions.Text = 'Group 1' - object lcPreviewItem1: TdxLayoutItem - CaptionOptions.Text = 'cxTextEdit1' - Control = cxTextEdit1 - ControlOptions.ShowBorder = False - end - object lcPreviewItem8: TdxLayoutItem - CaptionOptions.Text = 'cxTextEdit2' - Control = cxTextEdit2 - ControlOptions.ShowBorder = False - end - object lcPreviewItem2: TdxLayoutItem - CaptionOptions.Text = 'cxCheckBox3' - CaptionOptions.Visible = False - Control = cxCheckBox3 - ControlOptions.ShowBorder = False - end - object lcPreviewItem10: TdxLayoutItem - CaptionOptions.Text = 'cxCheckBox1' - CaptionOptions.Visible = False - Control = cxCheckBox1 - ControlOptions.ShowBorder = False - end - end - object dxLayoutControl1Group2: TdxLayoutGroup - AlignVert = avClient - CaptionOptions.Text = 'Group2' - object lcPreviewItem3: TdxLayoutItem - AlignVert = avClient - CaptionOptions.Text = 'cxRichEdit1' - Control = cxRichEdit1 - ControlOptions.ShowBorder = False - end - object lcPreviewGroup1: TdxLayoutGroup - Hidden = True - LayoutDirection = ldHorizontal - ShowBorder = False - object lcPreviewItem4: TdxLayoutItem - CaptionOptions.Text = 'cxButton1' - CaptionOptions.Visible = False - Control = cxButton1 - ControlOptions.ShowBorder = False - end - object lcPreviewItem6: TdxLayoutItem - CaptionOptions.Text = 'cxButton2' - CaptionOptions.Visible = False - Control = cxButton2 - ControlOptions.ShowBorder = False - end - object lcPreviewItem9: TdxLayoutItem - CaptionOptions.Text = 'cxButton3' - CaptionOptions.Visible = False - Control = cxButton3 - ControlOptions.ShowBorder = False - end - end - end - object dxLayoutControl1Group3: TdxLayoutGroup - AlignVert = avClient - CaptionOptions.Text = 'Group3' - object lcPreviewItem5: TdxLayoutItem - AlignVert = avClient - CaptionOptions.Text = 'cxMemo1' - Control = cxMemo1 - ControlOptions.ShowBorder = False - end - end - end - end - end - object TdxLayoutGroup - AlignHorz = ahParentManaged - AlignVert = avParentManaged - CaptionOptions.Visible = False - Hidden = True - ShowBorder = False - object lcMainItem5: TdxLayoutItem - CaptionOptions.Visible = False - Control = tlbGroups - ControlOptions.AutoColor = True - ControlOptions.ShowBorder = False - end - object lcMainItem1: TdxLayoutItem - AlignHorz = ahClient - AlignVert = avClient - Control = lbItems - end - object lcMainGroup3: TdxLayoutGroup - CaptionOptions.Text = 'Preview' - object lcMainItem2: TdxLayoutItem - CaptionOptions.Text = 'lcPreview' - CaptionOptions.Visible = False - Control = lcPreview - ControlOptions.ShowBorder = False - end - end - end - end - object lflMain: TdxLayoutLookAndFeelList - Left = 256 - Top = 116 - end - object alMain: TActionList - Left = 8 - Top = 296 - object acAdd: TAction - Category = 'Buttons' - Caption = '&Add' - Hint = 'Add' - ImageIndex = 0 - OnExecute = btnAddClick - end - object acDelete: TAction - Category = 'Buttons' - Caption = '&Delete' - Hint = 'Delete' - ImageIndex = 1 - OnExecute = acDeleteExecute - end - object acClose: TAction - Category = 'Buttons' - Caption = '&Close' - Hint = 'Close' - ImageIndex = 2 - end - end - object PopupMenu1: TPopupMenu - Left = 72 - Top = 32 - end - object ilMain: TcxImageList - CompressData = True - FormatVersion = 1 - DesignInfo = 13631640 - ImageInfo = < - item - Image.Data = { - 920200005844424D020004023604850000424D36040000000000003600000028 - 0000000210000000830100200000000000000400001900000000860000000400 - 0000120000001D0000001F00000015000000050A00000000860000000F2E703C - FF00550FFF00520FFF2A6739FF000000150A00000000860000001601590FFF3E - 9D53FF04811DFF00520FFF0000001F0A000000008600000015015C10FF57BC71 - FF069727FF00540FFF0000001F06000000008A00000002000000080000000E00 - 00001100000022005F10FF59BF76FF089C2EFF00570FFF00000033020000001F - 82000000150000000502000000008E00000006378947FF016A10FF006810FF00 - 6510FF01620FFF0DA73DFF0BA235FF005910FF005710FF005410FF00520FFF2A - 6739FF0000001502000000008E00000008017010FF47B86EFF2AC367FF14B952 - FF12B34BFF0FAD43FF0DA83DFF0BA135FF099C2EFF069727FF04811DFF00520F - FF0000001F02000000008E00000006007210FF4ABE74FF63D692FF61D38EFF60 - D08AFF5ECB84FF0FAD43FF0DA73CFF59BF76FF58BC71FF409F55FF01540FFF00 - 00001D02000000008E00000003358F45FF017211FF017011FF016D10FF016A10 - FF60CF8AFF12B34BFF006210FF015F10FF005B10FF015910FF296D39FF000000 - 1202000000008E0000000100000003000000060000000800000011016E10FF62 - D38EFF14B852FF006410FF000000220000001500000016000000100000000406 - 000000008600000008017011FF63D692FF29C367FF006810FF000000110A0000 - 00008600000006017211FF4ABF74FF4ABB70FF006B10FF0000000E0A00000000 - 8600000003358F45FF017311FF007010FF328642FF000000090A000000008600 - 00000100000003000000060000000800000006000000021500000000} - end - item - Image.Data = { - 9E0300005844424D020004023604850000424D36040000000000003600000028 - 0000000210000000830100200000000000000400000700000000830000000100 - 0000030000000104000000008300000001000000040000000105000000008500 - 00000300000011040315480000000F0000000202000000008500000003000000 - 1303031350000000190000000503000000008600000003000000140C0B41AA14 - 136EFD06062478000000110200000002C600000014050522820E0D64FD080738 - B6000000210000000500000000000000010000000D0C0C42A6151573FF071EC9 - FF14136EFD0606247800000013000000140505237E0F0F67FD061BC7FF0E0D65 - FF080738B60000001800000001000000020504173F181675FA0B28CEFF0625DC - FF071EC9FF121479FD0606247E06062480101174FD061BC7FF041DD8FF061BC5 - FF0E0D63FC0302134F0000000400000001000000080808286B181774FB0A28CE - FF0525DCFF071ECAFF121479FE121378FE061BC7FF041DD8FF061BC6FF100E66 - FC0504227F00000012000000010000000000000001000000090808276A171A7E - FB0A28CEFF0625DCFF061ECBFF061CCAFF041DD8FF061BC6FF101171FB050523 - 7C000000120000000203000000008C000000010000000A0908286D171A7FFC09 - 29CFFF0627DDFF0420DAFF061CC9FF121376FD0605247E000000120000000204 - 000000008C00000001000000080908286A181B82FE0C2ED4FF072CE0FF0625DC - FF071ECCFF121479FE0606247A000000110000000203000000008E0000000100 - 00000609092A631A1E86FD0E3CDAFF0B39E7FF6379E3FF6175E0FF0625DCFF07 - 1ECAFF121478FD060524740000000F000000020200000000AF000000030A0A2B - 5E1D1C7EFC1348DFFF0F49EFFF6580E7FF181B80FC161A7FFC6175DFFF0625DC - FF071ECAFF14136FFD060624730000000C0000000100000000050413281E1E83 - FC4E7BEBFF1356F4FF6789EAFF191D84FA090828680808276A17197EFA6275DF - FF0625DCFF071EC9FF14136EFD030210370000000200000000000000020E0D3A - 751F1E85FF88A7F1FF1B2087FA09092A6100000007000000080808286717197E - FA6175DFFF161573FF090832870000000C00000001020000000085000000030E - 0D3A751C238CFA0A092B5D00000005020000000186000000070808286517197E - FA0A0933820000000D0000000204000000008300000002040413270000000303 - 000000008500000001000000050404112E00000008000000010D000000008100 - 0000010400000000} - end> - end - object ilMainDisabled: TcxImageList - CompressData = True - FormatVersion = 1 - DesignInfo = 13631672 - ImageInfo = < - item - Image.Data = { - 920200005844424D020004023604850000424D36040000000000003600000028 - 0000000210000000830100200000000000000400001900000000860000000400 - 0000120000001D0000001F00000015000000050A00000000860000000F2E703C - FF00550FFF00520FFF2A6739FF000000150A00000000860000001601590FFF3E - 9D53FF04811DFF00520FFF0000001F0A000000008600000015015C10FF57BC71 - FF069727FF00540FFF0000001F06000000008A00000002000000080000000E00 - 00001100000022005F10FF59BF76FF089C2EFF00570FFF00000033020000001F - 82000000150000000502000000008E00000006378947FF016A10FF006810FF00 - 6510FF01620FFF0DA73DFF0BA235FF005910FF005710FF005410FF00520FFF2A - 6739FF0000001502000000008E00000008017010FF47B86EFF2AC367FF14B952 - FF12B34BFF0FAD43FF0DA83DFF0BA135FF099C2EFF069727FF04811DFF00520F - FF0000001F02000000008E00000006007210FF4ABE74FF63D692FF61D38EFF60 - D08AFF5ECB84FF0FAD43FF0DA73CFF59BF76FF58BC71FF409F55FF01540FFF00 - 00001D02000000008E00000003358F45FF017211FF017011FF016D10FF016A10 - FF60CF8AFF12B34BFF006210FF015F10FF005B10FF015910FF296D39FF000000 - 1202000000008E0000000100000003000000060000000800000011016E10FF62 - D38EFF14B852FF006410FF000000220000001500000016000000100000000406 - 000000008600000008017011FF63D692FF29C367FF006810FF000000110A0000 - 00008600000006017211FF4ABF74FF4ABB70FF006B10FF0000000E0A00000000 - 8600000003358F45FF017311FF007010FF328642FF000000090A000000008600 - 00000100000003000000060000000800000006000000021500000000} - end - item - Image.Data = { - 9E0300005844424D020004023604850000424D36040000000000003600000028 - 0000000210000000830100200000000000000400000700000000830000000100 - 0000030000000104000000008300000001000000040000000105000000008500 - 00000300000011040315480000000F0000000202000000008500000003000000 - 1303031350000000190000000503000000008600000003000000140C0B41AA14 - 136EFD06062478000000110200000002C600000014050522820E0D64FD080738 - B6000000210000000500000000000000010000000D0C0C42A6151573FF071EC9 - FF14136EFD0606247800000013000000140505237E0F0F67FD061BC7FF0E0D65 - FF080738B60000001800000001000000020504173F181675FA0B28CEFF0625DC - FF071EC9FF121479FD0606247E06062480101174FD061BC7FF041DD8FF061BC5 - FF0E0D63FC0302134F0000000400000001000000080808286B181774FB0A28CE - FF0525DCFF071ECAFF121479FE121378FE061BC7FF041DD8FF061BC6FF100E66 - FC0504227F00000012000000010000000000000001000000090808276A171A7E - FB0A28CEFF0625DCFF061ECBFF061CCAFF041DD8FF061BC6FF101171FB050523 - 7C000000120000000203000000008C000000010000000A0908286D171A7FFC09 - 29CFFF0627DDFF0420DAFF061CC9FF121376FD0605247E000000120000000204 - 000000008C00000001000000080908286A181B82FE0C2ED4FF072CE0FF0625DC - FF071ECCFF121479FE0606247A000000110000000203000000008E0000000100 - 00000609092A631A1E86FD0E3CDAFF0B39E7FF6379E3FF6175E0FF0625DCFF07 - 1ECAFF121478FD060524740000000F000000020200000000AF000000030A0A2B - 5E1D1C7EFC1348DFFF0F49EFFF6580E7FF181B80FC161A7FFC6175DFFF0625DC - FF071ECAFF14136FFD060624730000000C0000000100000000050413281E1E83 - FC4E7BEBFF1356F4FF6789EAFF191D84FA090828680808276A17197EFA6275DF - FF0625DCFF071EC9FF14136EFD030210370000000200000000000000020E0D3A - 751F1E85FF88A7F1FF1B2087FA09092A6100000007000000080808286717197E - FA6175DFFF161573FF090832870000000C00000001020000000085000000030E - 0D3A751C238CFA0A092B5D00000005020000000186000000070808286517197E - FA0A0933820000000D0000000204000000008300000002040413270000000303 - 000000008500000001000000050404112E00000008000000010D000000008100 - 0000010400000000} - end> - end - object dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList - object dxLayoutWebLookAndFeel2: TdxLayoutWebLookAndFeel - GroupOptions.Color = clInfoBk - ItemOptions.CaptionOptions.TextColor = clInfoText - end - end -end diff --git a/internal/x.46/Lib/D11/dxLayoutLookAndFeels.dcu b/internal/x.46/Lib/D11/dxLayoutLookAndFeels.dcu deleted file mode 100644 index 202dc958..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutLookAndFeels.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutPainters.dcu b/internal/x.46/Lib/D11/dxLayoutPainters.dcu deleted file mode 100644 index 7b0eee6d..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutPainters.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutSelection.dcu b/internal/x.46/Lib/D11/dxLayoutSelection.dcu deleted file mode 100644 index d37604f0..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutSelection.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutStrs.dcu b/internal/x.46/Lib/D11/dxLayoutStrs.dcu deleted file mode 100644 index 998fae80..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutStrs.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxLayoutcxEditAdapters.dcu b/internal/x.46/Lib/D11/dxLayoutcxEditAdapters.dcu deleted file mode 100644 index d3c136e3..00000000 Binary files a/internal/x.46/Lib/D11/dxLayoutcxEditAdapters.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxOffice11.dcu b/internal/x.46/Lib/D11/dxOffice11.dcu deleted file mode 100644 index af264511..00000000 Binary files a/internal/x.46/Lib/D11/dxOffice11.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxOffice11.res b/internal/x.46/Lib/D11/dxOffice11.res deleted file mode 100644 index 680cef5f..00000000 Binary files a/internal/x.46/Lib/D11/dxOffice11.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPPAttr.dcu b/internal/x.46/Lib/D11/dxPPAttr.dcu deleted file mode 100644 index b470fa0d..00000000 Binary files a/internal/x.46/Lib/D11/dxPPAttr.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSAutoHFTextMnuBld.dcu b/internal/x.46/Lib/D11/dxPSAutoHFTextMnuBld.dcu deleted file mode 100644 index 206aeab6..00000000 Binary files a/internal/x.46/Lib/D11/dxPSAutoHFTextMnuBld.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSBaseGridLnk.dcu b/internal/x.46/Lib/D11/dxPSBaseGridLnk.dcu deleted file mode 100644 index 1c3fad30..00000000 Binary files a/internal/x.46/Lib/D11/dxPSBaseGridLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSCPDsg.dcu b/internal/x.46/Lib/D11/dxPSCPDsg.dcu deleted file mode 100644 index 8e4cc0d5..00000000 Binary files a/internal/x.46/Lib/D11/dxPSCPDsg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSCPDsg.dfm b/internal/x.46/Lib/D11/dxPSCPDsg.dfm deleted file mode 100644 index ff7d55b8..00000000 --- a/internal/x.46/Lib/D11/dxPSCPDsg.dfm +++ /dev/null @@ -1,627 +0,0 @@ -object dxfmCPDesigner: TdxfmCPDesigner - Left = 519 - Top = 331 - ActiveControl = btnAdd - BorderStyle = bsDialog - Caption = 'Component Printer Designer' - ClientHeight = 289 - ClientWidth = 454 - Color = clBtnFace - Constraints.MinHeight = 316 - Constraints.MinWidth = 462 - KeyPreview = True - OldCreateOrder = False - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - OnKeyDown = FormKeyDown - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnClose: TButton - Left = 271 - Top = 261 - Width = 86 - Height = 23 - Caption = 'Close' - ModalResult = 1 - TabOrder = 0 - end - object btnHelp: TButton - Left = 363 - Top = 261 - Width = 86 - Height = 23 - Caption = '&Help' - TabOrder = 1 - end - object pcItems: TPageControl - Left = 5 - Top = 7 - Width = 444 - Height = 247 - ActivePage = tbsItems - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 2 - object tbsItems: TTabSheet - Caption = 'Items' - OnResize = tbsItemsResize - object lvItems: TListView - Left = 0 - Top = 0 - Width = 307 - Height = 219 - Align = alClient - Columns = <> - ColumnClick = False - MultiSelect = True - RowSelect = True - PopupMenu = pmItems - TabOrder = 0 - ViewStyle = vsReport - OnChange = lvItemsChange - OnDblClick = lvItemsDblClick - OnEdited = lvItemsEdited - OnEditing = lvItemsEditing - end - object pnlButtons: TPanel - Left = 307 - Top = 0 - Width = 129 - Height = 219 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btnDesign: TButton - Left = 6 - Top = 103 - Width = 120 - Height = 23 - Caption = 'Desi&gn...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = DesignClick - end - object btnAdd: TButton - Left = 6 - Top = 3 - Width = 120 - Height = 23 - Caption = '&Add...' - TabOrder = 0 - OnClick = AddClick - end - object btnDelete: TButton - Left = 6 - Top = 63 - Width = 120 - Height = 23 - Caption = '&Delete...' - TabOrder = 2 - OnClick = DeleteClick - end - object btnPageSetup: TButton - Left = 6 - Top = 133 - Width = 120 - Height = 23 - Caption = 'Pa&ge Setup...' - TabOrder = 4 - OnClick = PageSetupClick - end - object btnPrintPreview: TButton - Left = 6 - Top = 163 - Width = 120 - Height = 23 - Caption = 'Pre&view...' - TabOrder = 5 - OnClick = PrintPreviewClick - end - object btnPrint: TButton - Left = 6 - Top = 193 - Width = 120 - Height = 23 - Caption = '&Print...' - TabOrder = 6 - OnClick = PrintClick - end - object btnAddComposition: TButton - Left = 6 - Top = 33 - Width = 120 - Height = 23 - Caption = 'Add Composition' - TabOrder = 1 - OnClick = AddCompositionClick - end - end - object pnlNoItems: TPanel - Left = 12 - Top = 83 - Width = 289 - Height = 22 - BevelOuter = bvNone - Caption = 'There are no Items to display' - Color = clWindow - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnShadow - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - TabOrder = 2 - end - end - end - object pmItems: TPopupMenu - Images = ilItems - OnPopup = pmItemsPopup - Left = 20 - Top = 198 - object miAdd: TMenuItem - Caption = '&Add...' - ImageIndex = 1 - ShortCut = 45 - OnClick = AddClick - end - object miAddComposition: TMenuItem - Caption = 'Add Composition' - ImageIndex = 6 - OnClick = AddCompositionClick - end - object miDelete: TMenuItem - Caption = '&Delete' - ImageIndex = 2 - ShortCut = 46 - OnClick = DeleteClick - end - object miRename: TMenuItem - Caption = '&Rename' - ShortCut = 113 - OnClick = RenameClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miDesign: TMenuItem - Caption = 'Desi&gn...' - Default = True - ImageIndex = 0 - ShortCut = 16397 - OnClick = DesignClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miPageSetup: TMenuItem - Caption = 'Pa&ge Setup...' - ImageIndex = 3 - OnClick = PageSetupClick - end - object miPrintPreview: TMenuItem - Caption = 'Pre&view...' - ImageIndex = 4 - OnClick = PrintPreviewClick - end - object miPrint: TMenuItem - Caption = '&Print...' - ImageIndex = 5 - ShortCut = 16464 - OnClick = PrintClick - end - end - object ilItems: TImageList - Left = 48 - Top = 198 - Bitmap = { - 494C010107000A00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0000000 - 0000C0C0C000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C0C0C0000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000C0C0C000C0C0C0008080 - 80000000000080808000000000000000000000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C00000FFFF0000FFFF0000FFFF00C0C0C000C0C0 - C00000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000080808000C0C0C000C0C0C000FFFF00008080 - 80008080800000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000808080008080800080808000C0C0C000C0C0 - C00000000000C0C0C0000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF0000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000C0C0C000C0C0C000C0C0C000C0C0C0008080 - 8000C0C0C0000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C0C0C000C0C0C00000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF0000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000C0C0C000FFFF0000C0C0C000C0C0C0008080 - 8000C0C0C00000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0000000 - 0000C0C0C00000000000C0C0C00000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000080808000FFFF0000FFFF0000C0C0C0008080 - 8000808080000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C00000000000C0C0C0000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFF - FF0000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000080808000C0C0C000C0C0C0008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C0C0C00000000000C0C0C00000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000000000FFFFFF000000 - 0000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C0C0C000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000008000000080000000800000008000000080000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000000000008080800000000000C0C0C0000000000000000000000000000000 - 000080808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008000000080000000800000008000 - 0000800000008000000080000000800000008000000080000000800000008000 - 000080000000800000008000000000000000000000000000000080808000C0C0 - C000C0C0C0008080800080808000808080008080800080808000808080008080 - 800000000000808080000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000008000000080000000800000008000 - 000080000000800000008080800080000000FFFFFF0080000000800000008000 - 000080000000800000008000000000000000000000000000000000000000C0C0 - C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000FFFFFF00C0C0C0008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000000000008080800080808000C0C0 - C000C0C0C000C0C0C000C0C0C000000000008080800080808000FFFFFF008080 - 800000000000808080008080800000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000808080000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000000000008080800080808000C0C0C0008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080000000800000000000000080808000C0C0C000C0C0C000FFFF - FF00808080000000000000000000000000000000000000000000C0C0C0008080 - 8000C0C0C000808080000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000808080000000000000000000FFFF - FF0080808000C0C0C000FFFFFF0000000000C0C0C000C0C0C000C0C0C0008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000000000000000000000000000C0C0 - C0000000000080808000C0C0C00000000000C0C0C000C0C0C000C0C0C0008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000000000000000000000000000C0C0 - C000FFFFFF00000000008080800080808000C0C0C000C0C0C000C0C0C0008080 - 800000000000808080000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000008000000080000000808080008080 - 800080808000808080008080800080000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00800000008000000000000000000000000000000080808000C0C0 - C000C0C0C000C0C0C000FFFFFF00FFFFFF00FFFFFF00C0C0C000808080008080 - 800000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000008000000080000000808080008080 - 80008080800080808000800000000000000080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008000000080000000000000000000000000000000000000008080 - 8000000000000000000000000000C0C0C0000000000080808000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000080000000800000008000 - 0000800000008000000000000000000000000000000080000000800000008000 - 0000800000008000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C0C0C0000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFC01F0000000CC007C01F0000 - 00088003C007000000010001C007000000030001C001000000030001C0010000 - 00030000C001000000030000C001000000038000C00100000007C000C0010000 - 000FE001C0010000000FE007F0010000000FF007F0030000001FF003FC070000 - 003FF803FC0F0000007FFFFFFFFF0000FFFFFFFFFFFFFFFFFE3FFFFFFFFFFFFF - FC3FC007FFF9F83FE027C007E7FF0001C003C007C3F30001E007C007C3E70001 - 8001C007E1C700010001C007F08F00010001C007F81F00010001C007FC3F0001 - E007C007F81F0001E003C007F09F0001C007C00FC1C70101E42FC01F83E38383 - FC3FC03F8FF1FFFFFC3FFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPSChLbxLnk.dcu b/internal/x.46/Lib/D11/dxPSChLbxLnk.dcu deleted file mode 100644 index e0f3f2b3..00000000 Binary files a/internal/x.46/Lib/D11/dxPSChLbxLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSChLbxLnk.dfm b/internal/x.46/Lib/D11/dxPSChLbxLnk.dfm deleted file mode 100644 index 0f66dab5..00000000 --- a/internal/x.46/Lib/D11/dxPSChLbxLnk.dfm +++ /dev/null @@ -1,365 +0,0 @@ -object dxChlbxReportLinkDesignWindow: TdxChlbxReportLinkDesignWindow - Left = 548 - Top = 365 - BorderStyle = bsDialog - Caption = 'dxCLbReportLinkDesigner' - ClientHeight = 243 - ClientWidth = 552 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 3 - Width = 544 - Height = 204 - ActivePage = tshColor - MultiLine = True - TabOrder = 1 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 536 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Bevel11: TBevel - Left = 41 - Top = 18 - Width = 207 - Height = 4 - Shape = bsBottomLine - end - object Bevel4: TBevel - Left = 79 - Top = 90 - Width = 167 - Height = 4 - Shape = bsBottomLine - end - object Image5: TImage - Left = 10 - Top = 109 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F77777777777777777777 - F07DD0F0000FF7F0000000FF000F07DDDDDDDDDDDD0F7FFF77777FF77777FFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F77777777777777777777 - F07DD0777777777777777777777707DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F77777777777777777777 - F07DD0F0000FF7F00000000000FF07DDDDDDDDDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F7F000FFF7F00000F00F7 - F07DD0777777777777777777777707DDCDDDDCDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDCCCCDCCDDD0F7F00000F7F00000000F7 - F07DD0F00000F7F0000000FF000F07DDCCCCCCCCDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDCCCCDCCDDD0F77777777777777777777 - F07DD0777777777777777777777707DDCDDDDCDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F7FFFFFFF7F000000FFF7 - F07DD0F00FFFF7F000000000000F07DDDDDDDDDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F7FFFFFFF7F0000F000F7 - F07DD0F00000F7F00000000F000F07DDDDDDDDDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDDDDDDDDDDD0F7F00000F7F00000000F7 - F07DD0777777777777777777777707DDDDDDDDDDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDCDDDDCDDDD0F7F00F00F7F000000FFF7 - F07DD0F00FFFF7F000000FF000FF07DDCCCCDCCDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDCCCCCCCCDD0F7F00000F7F00000000F7 - F07DD0F00000F7F000000000000F07DDCCCCDCCDDD0F7FFFFFFF7FFFFFFFFFF7 - F07DD0FFFFFFF7FFFFFFFFFFFFFF07DDCDDDDCDDDD0F77777777777777777777 - F07DD0000000000000000000000007DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD0888888808888888888888807DDDDDDDDDDDD0F77777777777777777777 - F07DD0880000808800000088888807DDDDDDDDDDDD0F77777777777777777777 - F07DD0888888808888888888888807DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgGrid: TImage - Left = 10 - Top = 34 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblShow: TLabel - Left = 6 - Top = 14 - Width = 26 - Height = 13 - Caption = 'Show' - end - object lblMiscellaneous: TLabel - Left = 6 - Top = 85 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object chbxShowBorders: TCheckBox - Left = 95 - Top = 31 - Width = 148 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxShowBordersClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 95 - Top = 54 - Width = 148 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxShowBordersClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 95 - Top = 107 - Width = 148 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 2 - OnClick = chbxShowBordersClick - end - object chbxRowAutoHeight: TCheckBox - Left = 95 - Top = 153 - Width = 148 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 4 - OnClick = chbxRowAutoHeightClick - end - object lblPreview: TStaticText - Left = 256 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 5 - end - object chbxAutoWidth: TCheckBox - Left = 95 - Top = 130 - Width = 148 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 3 - OnClick = chbxAutoWidthClick - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 536 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 14 - Top = 143 - Width = 79 - Height = 13 - Caption = 'Grid Lines color: ' - OnClick = lblComboClick - end - object bvlLineColorHolder: TBevel - Left = 100 - Top = 137 - Width = 126 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 6 - Top = 13 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - OnClick = lblComboClick - end - object gbxTransparent: TGroupBox - Left = 6 - Top = 45 - Width = 232 - Height = 82 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 9 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblComboClick - end - object bvlColorHolder: TBevel - Left = 94 - Top = 20 - Width = 126 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 9 - Top = 50 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - OnClick = lblComboClick - end - object bvlEvenColorHolder: TBevel - Left = 94 - Top = 46 - Width = 126 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 42 - Width = 15 - Height = 17 - Caption = 'T&ransparent' - TabOrder = 1 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 77 - Top = 8 - Width = 161 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 43 - Width = 69 - Height = 17 - Caption = ' Transparent ' - FocusControl = chbxTransparent - TabOrder = 3 - OnClick = stTransparentClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 536 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 37 - Width = 231 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - Text = 'edFont' - end - object btnEvenFont: TButton - Tag = 1 - Left = 9 - Top = 70 - Width = 110 - Height = 23 - Caption = 'E&ven Font ...' - TabOrder = 2 - OnClick = btnFontClick - end - object edEvenFont: TEdit - Left = 9 - Top = 98 - Width = 231 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - Text = 'edFont' - end - end - end - end - object pnlPreview: TPanel - Left = 265 - Top = 46 - Width = 273 - Height = 150 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 0 - end -end diff --git a/internal/x.46/Lib/D11/dxPSCompsProvider.dcu b/internal/x.46/Lib/D11/dxPSCompsProvider.dcu deleted file mode 100644 index 8227ab47..00000000 Binary files a/internal/x.46/Lib/D11/dxPSCompsProvider.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSContainerLnk.dcu b/internal/x.46/Lib/D11/dxPSContainerLnk.dcu deleted file mode 100644 index 030243c5..00000000 Binary files a/internal/x.46/Lib/D11/dxPSContainerLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSContainerLnk.dfm b/internal/x.46/Lib/D11/dxPSContainerLnk.dfm deleted file mode 100644 index a98f1a9b..00000000 --- a/internal/x.46/Lib/D11/dxPSContainerLnk.dfm +++ /dev/null @@ -1,880 +0,0 @@ -object dxfmCustomContainerDesignWindow: TdxfmCustomContainerDesignWindow - Left = 456 - Top = 379 - BorderStyle = bsDialog - Caption = 'dxfmCustomContainerDesignWindow' - ClientHeight = 315 - ClientWidth = 582 - Color = clBtnFace - Constraints.MinHeight = 342 - Constraints.MinWidth = 588 - OldCreateOrder = False - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 9 - Width = 574 - Height = 271 - ActivePage = tshReportLinks - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - OnChange = PageControl1Change - OnChanging = PageControl1Changing - object tshOptions: TTabSheet - Caption = 'Options' - object imgExpanding: TImage - Left = 9 - Top = 26 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD7777777777777777777777777DDDDDDDDDDDD0000000000000000000000 - 000DDF888888888888888888888887DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - FF0DDF877777777777777777777787DDDDDDDDDDDD0F00000000000000000000 - 0F0DDF8F8888888888888888888787DDCDDDCDDDDD0F0FFFFFFFFFFFFFFFFFFF - 0F0DDF8F8000000000000000008787DDCCCDCCDDDD0F0F00000000000000000F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDCCCCCCCDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDCCCDCCDDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDCDDDCDDDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDDDDDDDDDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDDDDDDDDDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F80FFFFFFFFFFFFFFF08787DDDDDDDDDDDD0F0F0FFFFFFFFFFFFFFF0F - 0F0DDF8F8000000000000000008787DDDDDDDDDDDD0F0F00000000000000000F - 0F0DDF8F8888888888888888888787DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFFF - 0F0DDF8F8000000888888888888787DDDDDDDDDDDD0F0F000000FFFFFFFFFFFF - 0F0DDF8F8888888888888888888787DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFFF - 0F0DDF8F8000000888888888888787DDDDDDDDDDDD0F0F000000FFFFFFFFFFFF - 0F0DDF8F8888888888888888888787DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFFF - 0F0DDF8FFFFFFFFFFFFFFFFFFFF787DDDDDDDDDDDD0F00000000000000000000 - 0F0DDF888888888888888888888887DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - FF0DDF8FFFFFFFFFFFFF8777777787DDDDDDDDDDDD0F0000000000000F000000 - 0F0DDF8788888888888F8F88888787DDDDDDDDDDDD0F0FFFFFFFFFFF0F0FFFFF - 0F0DDF8788888888888F8F88888787DDDDDDDDDDDD0F0FFFFFFFFFFF0F0FFFFF - 0F0DDF8777777777777F8F88888787DDCDDDCDDDDD0F0000000000000F0FFFFF - 0F0DDF888888888888888F88888787DDCCCDCCDDDD0FFFFFFFFFFFFFFF0FFFFF - 0F0DDF8FFFFFFFFFFFFF8F88888787DDCCCCCCCDDD0F0000000000000F0FFFFF - 0F0DDF8788888888888F8F80088787DDCCCDCCDDDD0F0FFFFFFFFFFF0F0F00FF - 0F0DDF8788888888888F8F88888787DDCDDDCDDDDD0F0FFFFFFFFFFF0F0FFFFF - 0F0DDF8777777777777F8FFFFFF787DDDDDDDDDDDD0F0000000000000F000000 - 0F0DDF888888888888888888888887DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - FF0DDFFFFFFFFFFFFFFFFFFFFFFFF7DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlTransparents: TBevel - Left = 76 - Top = 10 - Width = 480 - Height = 4 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object imgPagination: TImage - Left = 9 - Top = 131 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD0000000000000000000000007DDDDDDDDDDDD77777777777777770DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7F7777777777777F0DDDDD - DDDDD0888000000000000000088F07DDDDDDDDDDDD7F78887F88F7FF7F07770D - DDDDD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78887FFFF7FF7F0FFF0D - DDDDD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7F7777777777777F077F0D - DDDDD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78887F88F7FF7F0F7F07 - 770DD098F0000000000000000F8907DDDDDDDDDDDD7F78887FFFF7FF7F0F7F0F - FF0DD099FFFFFFFFFFFFFFFFFF9907DDCDDDDCDDDD7F7777777777777F0F7F07 - 7F0DD0999999999999999999999907DDCCCCDCCDDD7F78887FFFF7FF7F0F7F0F - 7F0DD099F0000000000000000F9907DDCCCCCCCCDD7F78787F88F7FF7F0F7F0F - 7F0DD098F088887FFFF8FFFF0F8907DDCCCCDCCDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887F88F8F88F0F8F07DDCDDDDCDDDD7F7777777777777F0F7F0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78787F88F7FF7F0F7F0F - 7F0DD098F0000000000000000F8907DDCDDDDCDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD099FFFFFFFFFFFFFFFFFF9907DDCCCCDCCDDD7F7777777777777F0F7F0F - 7F0DD0999999999999999999999907DDCCCCCCCCDD7F78887FFFF7FF7F0F7F0F - 7F0DD099F0000000000000000F9907DDCCCCDCCDDD7F78787F88F7FF7F0F7F0F - 7F0DD098F088887FFFF8FFFF0F8907DDCDDDDCDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887F88F8F88F0F8F07DDDDDDDDDDDD7F7777777777777F0F7F0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0F7F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD00000000000000000F7F0F - 7F0DD0F8F0777778888888880F8F07DDDDDDDDDDDDDDDD7F7777777777777F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDDDDDD7FFFFFFFFFFFFFFF0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDDDDDD00000000000000000F - 7F0DD0F8F088887FFFF8FFFF0F8807DDDDDDDDDDDDDDDDDDDD7F777777777777 - 7F0DD0888000000000000000088F07DDDDDDDDDDDDDDDDDDDD7FFFFFFFFFFFFF - FF0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD00000000000000 - 000DD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel1: TBevel - Left = 64 - Top = 115 - Width = 492 - Height = 4 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object bvlSize: TBevel - Left = 31 - Top = 183 - Width = 525 - Height = 4 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object imgSize: TImage - Left = 9 - Top = 199 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088807DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFFFFFFFFFFFF0FFF0F07DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFF0 - F07DD0F0F777777777777F0FFF8F07DDDDDDDDDDDD0F0F7777777777777777F0 - F07DD0F0F7FFFFFFFFFF7F0FFF0F07DDDDDDDDDDDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F777777777777F0FFF8F07DDDDDDDDDDDD0F0F7777777777777777F0 - F07DD0F0FFFFFFFFFFFFFF0FFF0F07DDCDDDDCDDDD0F0FFFFFFFFFFFFFFFFFF0 - F07DD0F0F777777777777F0FFF8F07DDCCCCDCCDDD0F0F7777777777777777F0 - F07DD0F0F7FFFFFFFFFF7F0FFF0F07DDCCCCCCCCDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F777777777777F0FFF8F07DDCCCCDCCDDD0F0F7777777777777777F0 - F07DD0F0FFFFFFFFFFFFFF0FFF0F07DDCDDDDCDDDD0F0FFFFFFFFFFFFFFFFFF0 - F07DD0F0F777777777777F0FFF8F07DDDDDDDDDDDD0F0F7777777777777777F0 - F07DD0F0F7FFFFFFFFFF7F0FFF0F07DDDDDDDDDDDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F7FFFFFFFFFF7F0FFF8F07DDCDDDDCDDDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F7F888888F8F7F0FFF0F07DDCCCCDCCDDD0F0F7F88888F8F8888F7F0 - F07DD0F0F7FFFFFFFFFF7F0FFF8F07DDCCCCCCCCDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F7F88F888F8F7F0FFF0F07DDCCCCDCCDDD0F0F7F88F888F8F888F7F0 - F07DD0F0F7FFFFFFFFFF7F0FFF8F07DDCDDDDCDDDD0F0F7FFFFFFFFFFFFFF7F0 - F07DD0F0F777777777777F0FFF0F07DDDDDDDDDDDD0F0F7777777777777777F0 - F07DD0F0FFFFFFFFFFFFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFF0 - F07DD0F0F7777777F7777F0FFF0F07DDDDDDDDDDDD0F0F777777777F777777F0 - F07DD0F0F7FFFFF7F7FF7F0FFF8F07DDDDDDDDDDDD0F0F7FFFFFFF7F7FFFF7F0 - F07DD0F0F7777777F7777F0FFF0F07DDDDDDDDDDDD0F0F777777777F777777F0 - F07DD0F0FFFFFFFFFFFFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFFFFFFFFFFFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblTransparents: TLabel - Left = 5 - Top = 5 - Width = 64 - Height = 13 - Caption = 'Transparents' - end - object lblPagination: TLabel - Left = 5 - Top = 110 - Width = 50 - Height = 13 - Caption = 'Pagination' - end - object lblSize: TLabel - Left = 5 - Top = 178 - Width = 19 - Height = 13 - Caption = 'Size' - end - object chbxTransparentRoot: TCheckBox - Left = 90 - Top = 26 - Width = 166 - Height = 17 - Caption = '&Root' - TabOrder = 0 - OnClick = TransparentClick - end - object chbxTransparentControls: TCheckBox - Tag = 1 - Left = 90 - Top = 47 - Width = 166 - Height = 17 - Caption = 'Controls' - TabOrder = 1 - OnClick = TransparentClick - end - object chbxTransparentContainers: TCheckBox - Tag = 2 - Left = 90 - Top = 67 - Width = 166 - Height = 17 - Caption = 'Containers' - TabOrder = 2 - OnClick = TransparentClick - end - object chbxTransparentGraphics: TCheckBox - Tag = 3 - Left = 90 - Top = 88 - Width = 166 - Height = 17 - Caption = '&Graphics' - TabOrder = 3 - OnClick = TransparentClick - end - object chbxTransparentGroups: TCheckBox - Tag = 4 - Left = 270 - Top = 26 - Width = 166 - Height = 17 - Caption = '&Groups' - TabOrder = 4 - OnClick = TransparentClick - end - object chbxTransparentItems: TCheckBox - Tag = 5 - Left = 270 - Top = 47 - Width = 166 - Height = 17 - Caption = '&Items' - TabOrder = 5 - OnClick = TransparentClick - end - object chbxPaginateByControlDetails: TCheckBox - Left = 90 - Top = 131 - Width = 166 - Height = 17 - Caption = 'Control Details' - TabOrder = 6 - OnClick = PaginationClick - end - object chbxPaginateByControls: TCheckBox - Tag = 1 - Left = 90 - Top = 152 - Width = 166 - Height = 17 - Caption = 'Controls' - TabOrder = 7 - OnClick = PaginationClick - end - object chbxPaginateByGroups: TCheckBox - Tag = 2 - Left = 270 - Top = 131 - Width = 166 - Height = 17 - Caption = '&Groups' - TabOrder = 8 - OnClick = PaginationClick - end - object chbxPaginateByItems: TCheckBox - Tag = 3 - Left = 270 - Top = 152 - Width = 166 - Height = 17 - Caption = '&Items' - TabOrder = 9 - OnClick = PaginationClick - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 199 - Width = 166 - Height = 17 - Caption = 'Auto Width' - TabOrder = 10 - OnClick = SizeClick - end - end - object tshReportLinks: TTabSheet - Caption = 'Aggregated Links' - ImageIndex = 1 - OnResize = tshReportLinksResize - object pnlBtnSite: TPanel - Left = 474 - Top = 0 - Width = 92 - Height = 243 - Align = alRight - BevelOuter = bvNone - TabOrder = 1 - object btnLinksDesign: TButton - Left = 7 - Top = 22 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Design...' - TabOrder = 0 - OnClick = DesignClick - end - object btnLinksRemoveInconsistents: TButton - Left = 7 - Top = 50 - Width = 80 - Height = 37 - Caption = 'Remove Unneeded' - TabOrder = 1 - OnClick = btnLinksRemoveInconsistentsClick - end - end - object pnlLinkListsSite: TPanel - Left = 0 - Top = 0 - Width = 474 - Height = 243 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object pnlAvailableLinksSite: TPanel - Left = 0 - Top = 0 - Width = 216 - Height = 243 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object lblAvailableLinks: TLabel - Left = 1 - Top = 5 - Width = 73 - Height = 13 - Caption = '&Available Links:' - FocusControl = lbxAvailableLinks - end - object lbxAvailableLinks: TListBox - Left = 0 - Top = 22 - Width = 216 - Height = 221 - Style = lbOwnerDrawFixed - Align = alBottom - Anchors = [akLeft, akTop, akRight, akBottom] - DragMode = dmAutomatic - ItemHeight = 15 - MultiSelect = True - TabOrder = 0 - OnClick = lbxAggregatedLinksClick - OnDblClick = lbxAvailableLinksDblClick - OnDragDrop = lbxAvailableLinksDragDrop - OnDragOver = lbxAvailableLinksDragOver - OnDrawItem = lbxAggregatedLinksDrawItem - OnKeyDown = lbxAvailableLinksKeyDown - end - end - object pnlMoveButtonsSite: TPanel - Left = 216 - Top = 0 - Width = 42 - Height = 243 - Align = alLeft - BevelOuter = bvNone - TabOrder = 1 - object sbtnRemove: TSpeedButton - Left = 8 - Top = 133 - Width = 26 - Height = 26 - Glyph.Data = { - F6000000424DF600000000000000760000002800000010000000100000000100 - 0400000000008000000000000000000000001000000000000000000000000000 - 8000008000000080800080000000800080008080000080808000C0C0C0000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00DDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0DD - DDDDDDDDDDDD00DDDDDDDDDDDDD000DDDDDDDDDDDD0000DDDDDDDDDDD00000DD - DDDDDDDDDD0000DDDDDDDDDDDDD000DDDDDDDDDDDDDD00DDDDDDDDDDDDDDD0DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD} - OnClick = sbtnRemoveClick - end - object sbtnAdd: TSpeedButton - Left = 8 - Top = 98 - Width = 26 - Height = 26 - Glyph.Data = { - F6000000424DF600000000000000760000002800000010000000100000000100 - 0400000000008000000000000000000000001000000000000000000000000000 - 8000008000000080800080000000800080008080000080808000C0C0C0000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00DDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0DDDDD - DDDDDDDDDD00DDDDDDDDDDDDDD000DDDDDDDDDDDDD0000DDDDDDDDDDDD00000D - DDDDDDDDDD0000DDDDDDDDDDDD000DDDDDDDDDDDDD00DDDDDDDDDDDDDD0DDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD} - OnClick = sbtnAddClick - end - end - object pnlAggregatedLinksSite: TPanel - Left = 258 - Top = 0 - Width = 216 - Height = 243 - Align = alClient - BevelOuter = bvNone - TabOrder = 2 - object lblAggregatedLinks: TLabel - Left = 1 - Top = 5 - Width = 87 - Height = 13 - Caption = 'A&ggregated Links:' - FocusControl = lbxAggregatedLinks - end - object lbxAggregatedLinks: TListBox - Left = 0 - Top = 22 - Width = 216 - Height = 221 - Style = lbOwnerDrawFixed - Align = alBottom - Anchors = [akLeft, akTop, akRight, akBottom] - DragMode = dmAutomatic - ItemHeight = 15 - MultiSelect = True - TabOrder = 0 - OnClick = lbxAggregatedLinksClick - OnDblClick = lbxAggregatedLinksDblClick - OnDragDrop = lbxAggregatedLinksDragDrop - OnDragOver = lbxAggregatedLinksDragOver - OnDrawItem = lbxAggregatedLinksDrawItem - OnKeyDown = lbxAggregatedLinksKeyDown - end - end - end - end - object tshControls: TTabSheet - Caption = 'Controls' - ImageIndex = 2 - object btnControlsCheckAll: TButton - Left = 481 - Top = 4 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Check All' - TabOrder = 1 - OnClick = TreeViewCheckAllClick - end - object btnControlsExpandAll: TButton - Left = 481 - Top = 32 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = 'E&xpand All' - TabOrder = 2 - OnClick = TreeViewExpandAllClick - end - object tvControls: TTreeView - Left = 0 - Top = 0 - Width = 474 - Height = 243 - Align = alLeft - Anchors = [akLeft, akTop, akRight, akBottom] - HideSelection = False - Indent = 19 - ReadOnly = True - StateImages = ilControls - TabOrder = 0 - OnChange = TreeViewChange - OnClick = TreeViewClick - OnCustomDrawItem = TreeViewCustomDrawItem - OnKeyDown = TreeViewKeyDown - OnKeyPress = TreeViewKeyPress - OnMouseUp = TreeViewMouseUp - end - end - object tshHiddenControls: TTabSheet - Caption = 'Hidden Controls' - ImageIndex = 3 - object tvHiddenControls: TTreeView - Left = 0 - Top = 0 - Width = 474 - Height = 243 - Align = alLeft - Anchors = [akLeft, akTop, akRight, akBottom] - HideSelection = False - Indent = 19 - ReadOnly = True - StateImages = ilControls - TabOrder = 0 - OnChange = TreeViewChange - OnClick = TreeViewClick - OnCustomDrawItem = TreeViewCustomDrawItem - OnKeyDown = TreeViewKeyDown - OnKeyPress = TreeViewKeyPress - OnMouseUp = TreeViewMouseUp - end - object btnHiddenControlsCheckAll: TButton - Left = 481 - Top = 4 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Check All' - TabOrder = 1 - OnClick = TreeViewCheckAllClick - end - object btnHiddenControlsExpandAll: TButton - Left = 481 - Top = 32 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = 'E&xpand All' - TabOrder = 2 - OnClick = TreeViewExpandAllClick - end - end - end - object pmControls: TPopupMenu - Images = ilControlsPopup - OnPopup = pmControlsPopup - Left = 4 - Top = 285 - object miControlsCheckAll: TMenuItem - Caption = 'Check All' - ImageIndex = 0 - OnClick = TreeViewCheckAllClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miControlsCheckStandardControls: TMenuItem - Caption = 'Check Standard Unprintable Controls' - Visible = False - OnClick = UnhideStandardControlsClick - end - object miControlsUncheckStandardControls: TMenuItem - Caption = 'Uncheck Standard Unprintable Controls' - Visible = False - OnClick = HideStandardControlsClick - end - object miLine2: TMenuItem - Caption = '-' - Visible = False - end - object miControlsCheckAllChildren: TMenuItem - Caption = 'Check All Children' - OnClick = TreeViewCheckAllChildrenClick - end - object miControlsUncheckAllChildren: TMenuItem - Caption = 'Uncheck All Children' - OnClick = TreeViewUncheckAllChildrenClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miControlsExpandAll: TMenuItem - Caption = 'Expand All' - ImageIndex = 1 - OnClick = TreeViewExpandAllClick - end - end - object ilControls: TImageList - Left = 32 - Top = 285 - end - object ilControlsPopup: TImageList - Left = 60 - Top = 285 - Bitmap = { - 494C010105000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F00000000007F7F - 7F007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F00000000000000000000000000000000000000000000000000000000000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00000000000000000000BFBFBF00BFBFBF00BFBFBF0000000000000000000000 - 000000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF00BFBFBF00000000007F7F7F00BFBF - BF0000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00BFBFBF007F7F7F0000000000BFBFBF007F7F7F007F7F - 7F007F7F7F007F7F7F007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00BFBFBF0000000000FFFFFF00FFFFFF0000000000BFBFBF000000 - 00000000000000000000000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF000000 - 0000BFBFBF0000000000BFBFBF00BFBFBF00BFBFBF00FFFFFF007F7F7F000000 - 0000BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF00BFBF - BF00FFFFFF00000000007F7F7F0000000000BFBFBF00FFFFFF007F7F7F00BFBF - BF00BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000000000000000 - 0000FFFFFF00000000007F7F7F007F7F7F00BFBFBF0000000000BFBFBF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00FFFFFF00000000000000000000000000BFBFBF00BFBFBF000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00FFFFFF00FFFFFF00BFBFBF00BFBFBF007F7F7F007F7F - 7F007F7F7F00000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF000000000000000000BFBFBF00BFBF - BF00000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00007F7F7F0000000000BFBFBF00BFBFBF00BFBFBF00000000007F7F7F000000 - 00007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F0000000000000000000000000000000000000000007F7F7F00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF0000800000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000808080000000000000000000FFFFFF00FFFFFF00FFFFFF0000800000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000808080000000000000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C000000000000000000000000000000000008080 - 8000000000000000000000000000FFFFFF00FFFFFF0000800000008000000080 - 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF00FFFFFF0000800000008000000080 - 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF0000000000FFFFFF000080000000800000008000000080 - 000000800000FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF000080000000800000008000000080 - 000000800000FFFFFF00FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF0000000000FFFFFF000080000000800000FFFFFF000080 - 00000080000000800000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF000080000000800000FFFFFF000080 - 00000080000000800000FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C000000000008080800000000000000000000000 - 0000FFFFFF00FFFFFF0000000000FFFFFF0000800000FFFFFF00FFFFFF00FFFF - FF000080000000800000FFFFFF00000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000800000FFFFFF00FFFFFF00FFFF - FF000080000000800000FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C0000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF000080000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000800000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000800000FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00C0C0C0000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF000080000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C0000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF000080000080808000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0080808000000000000000000000000000000000000000 - 0000000000000000000000000000808080000000000000000000000000000000 - 000000000000C0C0C00080808000000000000000000000000000000000000000 - 00000000000000000000000000008080800000000000FFFFFF00008000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000800000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C00000000000000000000000000000000000FFFFFF00008000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 00000000000080808000000000000000000000000000FFFFFF00008000008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000800000FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000008080800000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF00FC7F000000000000FC27000000000000 - EC23000000000000C4010000000000008001000000000000C001000000000000 - E000000000000000000000000000000000000000000000000003000000000000 - E003000000000000C0010000000000008003000000000000C407000000000000 - EC3F000000000000FC7F000000000000FC00BBFFBC00BC00FC00BB00BC00BC00 - FC00B800B000B000E000BB0080008000E000BBFFB000B000E000B003B000B000 - 00008003B000B0000000B003B000B0000000BFFFB000B0000000B00380008000 - 00078003B003B0030007B003B003B0030007BFFFBFFFBFFF003F003F00030003 - 003F003F00030003003F003F0003000300000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPSCore.dcu b/internal/x.46/Lib/D11/dxPSCore.dcu deleted file mode 100644 index d4b78da9..00000000 Binary files a/internal/x.46/Lib/D11/dxPSCore.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSCoreD11.dcp b/internal/x.46/Lib/D11/dxPSCoreD11.dcp deleted file mode 100644 index be432008..00000000 Binary files a/internal/x.46/Lib/D11/dxPSCoreD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDBBasedXplorer.dcu b/internal/x.46/Lib/D11/dxPSDBBasedXplorer.dcu deleted file mode 100644 index 1132a0ff..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDBBasedXplorer.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDBBasedXplorerReg.dcu b/internal/x.46/Lib/D11/dxPSDBBasedXplorerReg.dcu deleted file mode 100644 index 39ef3f6e..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDBBasedXplorerReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDBCtrlLnkReg.dcu b/internal/x.46/Lib/D11/dxPSDBCtrlLnkReg.dcu deleted file mode 100644 index 0056d98e..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDBCtrlLnkReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDBCtrlLnks.dcu b/internal/x.46/Lib/D11/dxPSDBCtrlLnks.dcu deleted file mode 100644 index eec17da6..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDBCtrlLnks.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDBCtrlProducers.dcu b/internal/x.46/Lib/D11/dxPSDBCtrlProducers.dcu deleted file mode 100644 index 1f86f250..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDBCtrlProducers.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDBTCLnk.dcu b/internal/x.46/Lib/D11/dxPSDBTCLnk.dcu deleted file mode 100644 index f35a99b9..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDBTCLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDBTCLnkReg.dcu b/internal/x.46/Lib/D11/dxPSDBTCLnkReg.dcu deleted file mode 100644 index 71c81a48..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDBTCLnkReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDBTeeChartD11.bpl b/internal/x.46/Lib/D11/dxPSDBTeeChartD11.bpl deleted file mode 100644 index 9204b780..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDBTeeChartD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDBTeeChartD11.dcp b/internal/x.46/Lib/D11/dxPSDBTeeChartD11.dcp deleted file mode 100644 index 0007d583..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDBTeeChartD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDsgImgs.res b/internal/x.46/Lib/D11/dxPSDsgImgs.res deleted file mode 100644 index 31c9e507..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDsgImgs.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDsgProxies.dcu b/internal/x.46/Lib/D11/dxPSDsgProxies.dcu deleted file mode 100644 index d0f4d470..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDsgProxies.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSDsgUtils.dcu b/internal/x.46/Lib/D11/dxPSDsgUtils.dcu deleted file mode 100644 index 9b69aa14..00000000 Binary files a/internal/x.46/Lib/D11/dxPSDsgUtils.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSESys.dcu b/internal/x.46/Lib/D11/dxPSESys.dcu deleted file mode 100644 index 19faa450..00000000 Binary files a/internal/x.46/Lib/D11/dxPSESys.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSEdgePatterns.dcu b/internal/x.46/Lib/D11/dxPSEdgePatterns.dcu deleted file mode 100644 index b513a3ed..00000000 Binary files a/internal/x.46/Lib/D11/dxPSEdgePatterns.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSEngn.dcu b/internal/x.46/Lib/D11/dxPSEngn.dcu deleted file mode 100644 index 1c49d20e..00000000 Binary files a/internal/x.46/Lib/D11/dxPSEngn.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSEvnt.dcu b/internal/x.46/Lib/D11/dxPSEvnt.dcu deleted file mode 100644 index b1595994..00000000 Binary files a/internal/x.46/Lib/D11/dxPSEvnt.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSExcelEdgePatterns.dcu b/internal/x.46/Lib/D11/dxPSExcelEdgePatterns.dcu deleted file mode 100644 index 798c1e0d..00000000 Binary files a/internal/x.46/Lib/D11/dxPSExcelEdgePatterns.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSExcelFillPatterns.dcu b/internal/x.46/Lib/D11/dxPSExcelFillPatterns.dcu deleted file mode 100644 index fbfd9785..00000000 Binary files a/internal/x.46/Lib/D11/dxPSExcelFillPatterns.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSExtDlgs.dcu b/internal/x.46/Lib/D11/dxPSExtDlgs.dcu deleted file mode 100644 index 3db38e10..00000000 Binary files a/internal/x.46/Lib/D11/dxPSExtDlgs.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSExtDlgs.res b/internal/x.46/Lib/D11/dxPSExtDlgs.res deleted file mode 100644 index 3c35386c..00000000 Binary files a/internal/x.46/Lib/D11/dxPSExtDlgs.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSFileBasedXplorer.dcu b/internal/x.46/Lib/D11/dxPSFileBasedXplorer.dcu deleted file mode 100644 index ffb5353a..00000000 Binary files a/internal/x.46/Lib/D11/dxPSFileBasedXplorer.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSFillPatterns.dcu b/internal/x.46/Lib/D11/dxPSFillPatterns.dcu deleted file mode 100644 index da78313d..00000000 Binary files a/internal/x.46/Lib/D11/dxPSFillPatterns.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSForm.dcu b/internal/x.46/Lib/D11/dxPSForm.dcu deleted file mode 100644 index 1bbd4f78..00000000 Binary files a/internal/x.46/Lib/D11/dxPSForm.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSGlbl.dcu b/internal/x.46/Lib/D11/dxPSGlbl.dcu deleted file mode 100644 index 6406612f..00000000 Binary files a/internal/x.46/Lib/D11/dxPSGlbl.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSGrLnks.dcu b/internal/x.46/Lib/D11/dxPSGrLnks.dcu deleted file mode 100644 index f16bd668..00000000 Binary files a/internal/x.46/Lib/D11/dxPSGrLnks.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSGraphicLnk.dcu b/internal/x.46/Lib/D11/dxPSGraphicLnk.dcu deleted file mode 100644 index d2a605f6..00000000 Binary files a/internal/x.46/Lib/D11/dxPSGraphicLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSHFToolBarBld.dcu b/internal/x.46/Lib/D11/dxPSHFToolBarBld.dcu deleted file mode 100644 index 56ce5a3d..00000000 Binary files a/internal/x.46/Lib/D11/dxPSHFToolBarBld.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSImgLnk.dcu b/internal/x.46/Lib/D11/dxPSImgLnk.dcu deleted file mode 100644 index 6761a92e..00000000 Binary files a/internal/x.46/Lib/D11/dxPSImgLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSImgs.dcu b/internal/x.46/Lib/D11/dxPSImgs.dcu deleted file mode 100644 index db563121..00000000 Binary files a/internal/x.46/Lib/D11/dxPSImgs.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSImgs.res b/internal/x.46/Lib/D11/dxPSImgs.res deleted file mode 100644 index 4084eab3..00000000 Binary files a/internal/x.46/Lib/D11/dxPSImgs.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSLVLnk.dcu b/internal/x.46/Lib/D11/dxPSLVLnk.dcu deleted file mode 100644 index fb1c80ed..00000000 Binary files a/internal/x.46/Lib/D11/dxPSLVLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSLVLnk.dfm b/internal/x.46/Lib/D11/dxPSLVLnk.dfm deleted file mode 100644 index 7a2ea1ed..00000000 --- a/internal/x.46/Lib/D11/dxPSLVLnk.dfm +++ /dev/null @@ -1,695 +0,0 @@ -object dxfmLVReportLinkDesignWindow: TdxfmLVReportLinkDesignWindow - Left = 489 - Top = 374 - BorderStyle = bsDialog - Caption = 'dxfmLVReportLinkDesignWindow' - ClientHeight = 354 - ClientWidth = 555 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 38 - Width = 547 - Height = 281 - ActivePage = tshColor - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = 'Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 539 - Height = 253 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 5 - Top = 12 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 40 - Top = 17 - Width = 194 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 6 - Top = 37 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel1: TBevel - Left = 89 - Top = 98 - Width = 145 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 147 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object Image1: TImage - Left = 6 - Top = 174 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel10: TBevel - Left = 83 - Top = 152 - Width = 151 - Height = 4 - Shape = bsBottomLine - end - object chbxShowVertLines: TCheckBox - Tag = 2 - Left = 95 - Top = 73 - Width = 143 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 2 - OnClick = chbxShowBordersClick - end - object chbxShowBorders: TCheckBox - Left = 95 - Top = 30 - Width = 143 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxShowBordersClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 95 - Top = 51 - Width = 143 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxShowBordersClick - end - object chbxShowColumnHeaders: TCheckBox - Left = 95 - Top = 114 - Width = 143 - Height = 17 - Caption = '&Column Headers' - TabOrder = 3 - OnClick = chbxShowColumnHeadersClick - end - object chbxHeadersOnEveryPage: TCheckBox - Left = 95 - Top = 168 - Width = 143 - Height = 17 - Caption = 'Headers' - TabOrder = 4 - OnClick = chbxHeadersOnEveryPageClick - end - object lblPreview: TStaticText - Left = 244 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 5 - end - end - end - object tshColor: TTabSheet - Caption = 'Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 539 - Height = 253 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 6 - Top = 217 - Width = 81 - Height = 13 - Caption = '&Grid Lines Color: ' - end - object bvlGridLineColorHost: TBevel - Left = 91 - Top = 213 - Width = 128 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 5 - Top = 16 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - end - object gbxTransparentHeaders: TGroupBox - Left = 5 - Top = 141 - Width = 225 - Height = 58 - Caption = ' ' - TabOrder = 4 - object lblHeadersColor: TLabel - Left = 6 - Top = 24 - Width = 75 - Height = 13 - Caption = 'Headers Color: ' - end - object bvlHeadersColorHost: TBevel - Left = 86 - Top = 22 - Width = 128 - Height = 21 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 50 - Width = 225 - Height = 84 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 6 - Top = 26 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - end - object bvlColorHost: TBevel - Left = 86 - Top = 22 - Width = 128 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 6 - Top = 53 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - end - object bvlEvenColorHost: TBevel - Left = 86 - Top = 49 - Width = 128 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 48 - Width = 15 - Height = 17 - TabOrder = 1 - OnClick = chbxTransparentClick - end - object chbxTransparentHeaders: TCheckBox - Tag = 1 - Left = 18 - Top = 139 - Width = 15 - Height = 17 - Caption = 'T&ransparent Headers' - TabOrder = 3 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 69 - Top = 11 - Width = 162 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 50 - Width = 69 - Height = 17 - Caption = ' Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stTransparentHeaders: TStaticText - Left = 33 - Top = 140 - Width = 112 - Height = 17 - Caption = ' Transaprent Headers ' - FocusControl = chbxTransparentHeaders - TabOrder = 6 - OnClick = stTransparentHeadersClick - end - end - end - object tshFont: TTabSheet - Caption = 'Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 539 - Height = 253 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 23 - Caption = 'Fo&nt...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 38 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnHeadersFont: TButton - Tag = 2 - Left = 8 - Top = 129 - Width = 110 - Height = 23 - Caption = 'Headers Font...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 4 - OnClick = btnFontClick - end - object edFixedFont: TEdit - Left = 8 - Top = 158 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 5 - end - object btnEvenFont: TButton - Tag = 1 - Left = 8 - Top = 69 - Width = 110 - Height = 23 - Caption = 'E&ven Font...' - TabOrder = 2 - OnClick = btnFontClick - end - object edEvenFont: TEdit - Left = 8 - Top = 98 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 539 - Height = 253 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Image3: TImage - Left = 7 - Top = 35 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblSelection: TLabel - Left = 5 - Top = 12 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object Bevel3: TBevel - Left = 53 - Top = 17 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 83 - Width = 67 - Height = 13 - Caption = 'Look And Feel' - end - object Bevel15: TBevel - Left = 85 - Top = 87 - Width = 149 - Height = 4 - Shape = bsBottomLine - end - object Image8: TImage - Left = 7 - Top = 106 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblMiscellaneous: TLabel - Left = 5 - Top = 151 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object Bevel4: TBevel - Left = 78 - Top = 156 - Width = 156 - Height = 4 - Shape = bsBottomLine - end - object Image5: TImage - Left = 7 - Top = 174 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxIncludeFixed: TCheckBox - Left = 95 - Top = 55 - Width = 143 - Height = 17 - Caption = '&Including fixed cells' - TabOrder = 1 - OnClick = chbxIncludeFixedClick - end - object chbxOnlySelected: TCheckBox - Left = 95 - Top = 32 - Width = 143 - Height = 17 - Caption = 'Only &selected cells' - TabOrder = 0 - OnClick = chbxOnlySelectedClick - end - object chbxUse3DEffects: TCheckBox - Tag = 12 - Left = 95 - Top = 104 - Width = 143 - Height = 17 - Caption = '&Use 3D Effects' - TabOrder = 2 - OnClick = chbxUse3DEffectsClick - end - object chbxUseSoft3D: TCheckBox - Tag = 13 - Left = 95 - Top = 127 - Width = 143 - Height = 17 - Caption = 'Soft &3D' - TabOrder = 3 - OnClick = chbxUseSoft3DClick - end - object chbxRowAutoHeight: TCheckBox - Left = 95 - Top = 199 - Width = 136 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 5 - OnClick = chbxRowAutoHeightClick - end - object chbxAutoWidth: TCheckBox - Left = 95 - Top = 176 - Width = 136 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 4 - OnClick = chbxAutoWidthClick - end - end - end - end - object pnlPreview: TPanel - Left = 252 - Top = 81 - Width = 290 - Height = 229 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - end - object pnlHint: TPanel - Left = 4 - Top = 5 - Width = 547 - Height = 27 - Alignment = taLeftJustify - BevelOuter = bvNone - BorderStyle = bsSingle - Color = clInfoBk - Ctl3D = False - ParentCtl3D = False - TabOrder = 2 - object imgHint: TImage - Left = 7 - Top = 5 - Width = 16 - Height = 16 - Transparent = True - end - object lblHint: TLabel - Left = 30 - Top = 6 - Width = 370 - Height = 13 - Caption = ' Most Options Are Being Taken Into Account Only In Detailed View' - Font.Charset = DEFAULT_CHARSET - Font.Color = clInfoText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - Transparent = True - end - end -end diff --git a/internal/x.46/Lib/D11/dxPSLbxLnk.dcu b/internal/x.46/Lib/D11/dxPSLbxLnk.dcu deleted file mode 100644 index c422cb10..00000000 Binary files a/internal/x.46/Lib/D11/dxPSLbxLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSLbxLnk.dfm b/internal/x.46/Lib/D11/dxPSLbxLnk.dfm deleted file mode 100644 index 6dae66f6..00000000 --- a/internal/x.46/Lib/D11/dxPSLbxLnk.dfm +++ /dev/null @@ -1,734 +0,0 @@ -object dxLBxReportLinkDesignWindow: TdxLBxReportLinkDesignWindow - Left = 441 - Top = 302 - BorderStyle = bsDialog - Caption = 'dxLbxReportLinkDesigner' - ClientHeight = 253 - ClientWidth = 553 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 545 - Height = 214 - ActivePage = tshColor - MultiLine = True - TabOrder = 1 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 186 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 5 - Top = 13 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 39 - Top = 17 - Width = 209 - Height = 4 - Shape = bsBottomLine - end - object Bevel4: TBevel - Left = 91 - Top = 84 - Width = 156 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 10 - Top = 35 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object chbxPaintItemGraphics: TCheckBox - Left = 90 - Top = 103 - Width = 159 - Height = 17 - Caption = '&Paint item graphics' - TabOrder = 2 - OnClick = chbxPaintItemGraphicsClick - end - object chbxShowBorders: TCheckBox - Left = 90 - Top = 32 - Width = 159 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxShowBordersClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 90 - Top = 54 - Width = 159 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxShowBordersClick - end - object chbxTransparentGraphics: TCheckBox - Tag = 1 - Left = 90 - Top = 127 - Width = 159 - Height = 17 - Caption = '&Transparent Graphics' - TabOrder = 3 - OnClick = chbxTransparentGraphicsClick - end - object lblPreview: TStaticText - Left = 257 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 4 - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 186 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 15 - Top = 150 - Width = 84 - Height = 13 - Caption = '&Grid Lines Color : ' - OnClick = lblComboClick - end - object bvlLineColorHolder: TBevel - Left = 97 - Top = 146 - Width = 135 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 5 - Top = 13 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - OnClick = lblComboClick - end - object gbxTransparent: TGroupBox - Left = 6 - Top = 46 - Width = 237 - Height = 86 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 9 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblComboClick - end - object bvlColorHolder: TBevel - Left = 90 - Top = 20 - Width = 135 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 9 - Top = 48 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - OnClick = lblComboClick - end - object bvlEvenColorHolder: TBevel - Left = 90 - Top = 49 - Width = 135 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 44 - Width = 15 - Height = 17 - Caption = 'T&ransparent' - TabOrder = 1 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 95 - Top = 8 - Width = 148 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 45 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 3 - OnClick = stTransparentClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 186 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 37 - Width = 233 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnEvenFont: TButton - Tag = 1 - Left = 8 - Top = 68 - Width = 110 - Height = 23 - Caption = 'E&ven Font ...' - TabOrder = 2 - OnClick = btnFontClick - end - object edEvenFont: TEdit - Left = 8 - Top = 97 - Width = 233 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 186 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Image3: TImage - Left = 10 - Top = 35 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblSelection: TLabel - Left = 5 - Top = 13 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object Bevel3: TBevel - Left = 54 - Top = 16 - Width = 194 - Height = 5 - Shape = bsBottomLine - end - object lblMiscellaneous: TLabel - Left = 5 - Top = 88 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object imgMiscellaneous: TImage - Left = 10 - Top = 110 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel1: TBevel - Left = 79 - Top = 92 - Width = 169 - Height = 4 - Shape = bsBottomLine - end - object chbxOnlySelected: TCheckBox - Left = 90 - Top = 32 - Width = 148 - Height = 17 - Caption = 'Only &selected cells' - TabOrder = 0 - OnClick = chbxOnlySelectedClick - end - object chbxRowAutoHeight: TCheckBox - Left = 90 - Top = 130 - Width = 148 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 2 - OnClick = chbxRowAutoHeightClick - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 106 - Width = 148 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 1 - OnClick = chbxAutoWidthClick - end - end - end - end - object pnlPreview: TPanel - Left = 265 - Top = 47 - Width = 273 - Height = 160 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 0 - end - object ilPreview: TImageList - Left = 5 - Top = 223 - Bitmap = { - 494C010101000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000084000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000840000008400000084000000FF000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000840000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF0000FF0000FFFFFF0000FF000000FF000000840000008400000084 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF0000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000084 - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF00FFFFFF0000FF000000FF000000FF000000840000008400000084 - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF000000FF000000FF000000FF000000FF000000FF0000008400000084 - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF - 0000008400000084000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000084000000FF000000FF000000FF000000FF000000FF0000008400000084 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000084000000FF000000FF00000084000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000840000008400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFF000000000000FFFF000000000000 - FF3F000000000000F81F000000000000E00F000000000000C007000000000000 - C003000000000000C003000000000000C003000000000000C003000000000000 - C003000000000000E003000000000000F00F000000000000F83F000000000000 - FCFF000000000000FFFF00000000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPSLnkReg.dcu b/internal/x.46/Lib/D11/dxPSLnkReg.dcu deleted file mode 100644 index 4386f40b..00000000 Binary files a/internal/x.46/Lib/D11/dxPSLnkReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSLnksD11.bpl b/internal/x.46/Lib/D11/dxPSLnksD11.bpl deleted file mode 100644 index 024ed0fe..00000000 Binary files a/internal/x.46/Lib/D11/dxPSLnksD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSLnksD11.dcp b/internal/x.46/Lib/D11/dxPSLnksD11.dcp deleted file mode 100644 index 9ef7d238..00000000 Binary files a/internal/x.46/Lib/D11/dxPSLnksD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSPgsMnuBld.dcu b/internal/x.46/Lib/D11/dxPSPgsMnuBld.dcu deleted file mode 100644 index b6ea454c..00000000 Binary files a/internal/x.46/Lib/D11/dxPSPgsMnuBld.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSPopupMan.dcu b/internal/x.46/Lib/D11/dxPSPopupMan.dcu deleted file mode 100644 index 959b5c16..00000000 Binary files a/internal/x.46/Lib/D11/dxPSPopupMan.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSPrVwAdv.dfm b/internal/x.46/Lib/D11/dxPSPrVwAdv.dfm deleted file mode 100644 index 27f20c70..00000000 --- a/internal/x.46/Lib/D11/dxPSPrVwAdv.dfm +++ /dev/null @@ -1,3482 +0,0 @@ -object dxfmPreviewWdxBar: TdxfmPreviewWdxBar - Left = 352 - Top = 204 - Width = 893 - Height = 461 - Caption = 'Print Preview' - Color = clBtnFace - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000FFFFFFFFFF000000FFFFFFF000070000FFF - FFF0788707000FFFFF0788E770000FFFFF08888780000FFFFF08E88780000FFF - FF07EE8770000FFFFFF0788700000FFFFFFF000000000FFFFFFFFFF000000FFF - FFFF000000000FFFFFFF080000000FFFFFFF000000000000000000000000FFFF - 0000000C00000008000000010000000300000003000000030000000300000003 - 000000070000000F0000000F0000000F0000001F0000003F0000007F0000} - KeyPreview = True - OldCreateOrder = True - Position = poDefault - ShowHint = True - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object dxBarManager: TdxBarManager - AutoHideEmptyBars = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - Bars = < - item - Caption = 'MenuBar' - DockedDockingStyle = dsTop - DockedLeft = 0 - DockedTop = 0 - DockingStyle = dsTop - FloatLeft = 0 - FloatTop = 0 - FloatClientWidth = 0 - FloatClientHeight = 0 - IsMainMenu = True - ItemLinks = < - item - Item = bbFile - Visible = True - end - item - Item = bbExplorer - Visible = True - end - item - Item = bbEdit - Visible = True - end - item - Item = bbView - Visible = True - end - item - Item = bbInsert - Visible = True - end - item - Item = bbFormat - Visible = True - end - item - Item = bbGoToPage - Visible = True - end - item - Item = bbTools - Visible = True - end - item - Item = bbHelp - Visible = True - end> - MultiLine = True - Name = 'Build-In Menus' - OneOnRow = True - Row = 0 - UseOwnFont = False - Visible = True - WholeRow = False - end - item - Caption = 'Standard' - DockedDockingStyle = dsTop - DockedLeft = 0 - DockedTop = 23 - DockingStyle = dsTop - FloatLeft = 332 - FloatTop = 321 - FloatClientWidth = 554 - FloatClientHeight = 22 - ItemLinks = < - item - Item = bbFileDesign - Visible = True - end - item - BeginGroup = True - Item = bbFileLoad - Visible = True - end - item - Item = bbFileClose - Visible = True - end - item - Item = bbFileSave - Visible = True - end - item - BeginGroup = True - Item = bbFilePrint - Visible = True - end - item - Item = bbFilePrintDialog - Visible = True - end - item - Item = bbFilePageSetup - Visible = True - end - item - BeginGroup = True - Item = bbViewExplorer - Visible = True - end - item - Item = bbViewThumbnails - Visible = True - end - item - BeginGroup = True - Item = bbFormatTitle - Visible = True - end - item - BeginGroup = True - Item = bbZoomPercent100 - Visible = True - end - item - Item = bbZoomPageWidth - Visible = True - end - item - Item = bbZoomWholePage - Visible = True - end - item - Item = bbZoomTwoPages - Visible = True - end - item - Item = bbZoomMultiplePages - Visible = True - end - item - Item = cbxPredefinedZoom - Visible = True - end - item - BeginGroup = True - Item = bbFormatPageBackground - Visible = True - end - item - Item = bbFormatShrinkToPageWidth - Visible = True - end - item - BeginGroup = True - Item = bbGoToFirstPage - Visible = True - end - item - Item = bbGoToPrevPage - Visible = True - end - item - Item = seActivePage - UserDefine = [udWidth] - UserWidth = 63 - Visible = True - end - item - Item = bbGoToNextPage - Visible = True - end - item - Item = bbGoToLastPage - Visible = True - end - item - BeginGroup = True - Item = bbFileExit - Visible = True - end> - Name = 'Standard' - OneOnRow = True - Row = 1 - UseOwnFont = False - Visible = True - WholeRow = False - end - item - AllowClose = False - Caption = 'Header and Footer' - DockedDockingStyle = dsTop - DockedLeft = 50 - DockedTop = 0 - DockingStyle = dsNone - FloatLeft = 523 - FloatTop = 228 - FloatClientWidth = 601 - FloatClientHeight = 22 - Hidden = True - ItemLinks = < - item - Item = bsiInsertAutoText - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFPageNumber - UserDefine = [udPaintStyle] - Visible = True - end - item - Item = bbInsertHFTotalPages - UserDefine = [udPaintStyle] - Visible = True - end - item - Item = bbInsertHFPageOfPages - Visible = True - end - item - Item = bbFormatPageNumbering - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFDateTime - Visible = True - end - item - Item = bbInsertHFDate - Visible = True - end - item - Item = bbInsertHFTime - Visible = True - end - item - Item = bbFormatDateTime - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFUserName - Visible = True - end - item - Item = bbInsertHFMachineName - UserDefine = [udPaintStyle] - Visible = True - end - item - BeginGroup = True - Item = bbFormatHFClear - Visible = True - end - item - BeginGroup = True - Item = bbFormatHFBackground - Visible = True - end - item - BeginGroup = True - Item = bbFilePageSetup - Visible = True - end - item - Item = bbViewHFSwitchHeaderFooter - Visible = True - end - item - Item = bbViewSwitchToLeftPart - Visible = True - end - item - Item = bbViewSwitchToCenterPart - Visible = True - end - item - Item = bbViewSwitchToRightPart - Visible = True - end - item - BeginGroup = True - Item = bbViewHFClose - Visible = True - end> - Name = 'Header and Footer' - OneOnRow = True - Row = 0 - UseOwnFont = False - Visible = False - WholeRow = False - end - item - Caption = 'Shortcut Menus' - DockedDockingStyle = dsTop - DockedLeft = 0 - DockedTop = 0 - DockingStyle = dsNone - FloatLeft = 293 - FloatTop = 319 - FloatClientWidth = 188 - FloatClientHeight = 19 - Hidden = True - ItemLinks = < - item - Item = bsiShortcutPreview - Visible = True - end - item - Item = bsiShortCutExplorer - Visible = True - end - item - Item = bsiShortcutThumbnails - Visible = True - end> - Name = 'Shortcut Menus' - NotDocking = [dsLeft, dsTop, dsRight, dsBottom] - OneOnRow = False - Row = 0 - UseOwnFont = False - Visible = False - WholeRow = False - end - item - Caption = 'AutoText' - DockedDockingStyle = dsTop - DockedLeft = 0 - DockedTop = 0 - DockingStyle = dsNone - FloatLeft = 460 - FloatTop = 288 - FloatClientWidth = 124 - FloatClientHeight = 22 - ItemLinks = < - item - Item = bbInsertEditAutoText - Visible = True - end - item - BeginGroup = True - Item = bsiInsertAutoText - Visible = True - end> - Name = 'AutoText' - OneOnRow = False - Row = 0 - UseOwnFont = False - Visible = False - WholeRow = False - end - item - Caption = 'Explorer' - DockedDockingStyle = dsTop - DockedLeft = 0 - DockedTop = 49 - DockingStyle = dsTop - FloatLeft = 461 - FloatTop = 349 - FloatClientWidth = 23 - FloatClientHeight = 22 - ItemLinks = < - item - Item = bbExplorerCreateNewFolder - Visible = True - end - item - Item = bbExplorerDelete - Visible = True - end - item - Item = bbExplorerProperties - Visible = True - end> - Name = 'Explorer' - OneOnRow = True - Row = 2 - UseOwnFont = False - Visible = False - WholeRow = False - end> - Categories.Strings = ( - 'File' - 'Explorer' - 'Edit' - 'Insert' - 'View' - 'Format' - 'Zoom' - 'Tools' - 'Go' - 'Help' - 'Built-in Menus' - 'Shortcut Menus' - 'New Menu') - Categories.ItemsVisibles = ( - 2 - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2) - Categories.Visibles = ( - True - True - True - True - True - True - True - True - True - True - True - False - True) - Images = ilToolBar - LargeImages = ilToolBar - MenusShowRecentItemsFirst = False - PopupMenuLinks = < - item - PopupMenu = pmPreview - end - item - PopupMenu = pmThumbnails - end> - ShowShortCutInHint = True - StoreInRegistry = True - StretchGlyphs = False - Style = bmsFlat - UseSystemFont = True - OnBarVisibleChange = dxBarManagerBarVisibleChange - OnHideCustomizingForm = dxBarManagerHideCustomizingForm - OnShowCustomizingForm = dxBarManagerShowCustomizingForm - Left = 63 - Top = 197 - DockControlHeights = ( - 0 - 0 - 49 - 0) - object bbFile: TdxBarSubItem - Caption = '&File' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbFileDesign - Visible = True - end - item - Item = bbFileRebuild - Visible = True - end - item - BeginGroup = True - Item = bbFileLoad - Visible = True - end - item - Item = bbFileClose - Visible = True - end - item - BeginGroup = True - Item = bbFileSave - Visible = True - end - item - BeginGroup = True - Item = bbFilePrintDialog - Visible = True - end - item - Item = bbFilePageSetup - Visible = True - end - item - BeginGroup = True - Item = bbFileExit - Visible = True - end> - end - object bbFileDesign: TdxBarButton - Caption = '&Design...' - Category = 0 - Hint = 'ReportDesign|' - Visible = ivNever - ImageIndex = 0 - ShortCut = 16452 - OnClick = DesignClick - end - object bbFileRebuild: TdxBarButton - Caption = 'Rebuild' - Category = 0 - Hint = 'Rebuild' - Visible = ivAlways - ShortCut = 16500 - OnClick = bbFileRebuildClick - end - object bbViewMargins: TdxBarButton - Caption = '&Margins' - Category = 4 - Hint = 'Margins' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - ShortCut = 16461 - OnClick = bbViewMarginsClick - end - object bbZoomPercent100: TdxBarButton - Caption = '&Percent 100' - Category = 6 - Hint = 'Zoom 100 %' - Visible = ivAlways - ImageIndex = 5 - ShortCut = 16604 - OnClick = ZoomClick - end - object bbZoomPageWidth: TdxBarButton - Tag = 1 - Caption = '&Fit To Window' - Category = 6 - Hint = 'Zoom Page Width' - Visible = ivAlways - ImageIndex = 6 - ShortCut = 16432 - OnClick = ZoomClick - end - object bbZoomWholePage: TdxBarButton - Tag = 2 - Caption = '&One Page' - Category = 6 - Hint = 'Zoom One Page' - Visible = ivAlways - ImageIndex = 7 - ShortCut = 16433 - OnClick = ZoomClick - end - object bbZoomTwoPages: TdxBarButton - Tag = 3 - Caption = '&Two Page' - Category = 6 - Hint = 'Zoom Two Page' - Visible = ivAlways - ImageIndex = 8 - ShortCut = 16434 - OnClick = ZoomClick - end - object bbExplorer: TdxBarSubItem - Caption = 'E&xplorer' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbExplorerCreateNewFolder - Visible = True - end - item - BeginGroup = True - Item = bbExplorerDelete - Visible = True - end - item - Item = bbExplorerRename - Visible = True - end - item - BeginGroup = True - Item = bbExplorerProperties - Visible = True - end> - end - object bbGoToFirstPage: TdxBarButton - Caption = '&First Page' - Category = 8 - Hint = 'Go to First Page' - Visible = ivAlways - ImageIndex = 13 - ShortCut = 36 - OnClick = GoToPageClick - end - object bbGoToPrevPage: TdxBarButton - Tag = 1 - Caption = '&Previous Page' - Category = 8 - Hint = 'Go to Prev Page' - Visible = ivAlways - ImageIndex = 14 - ShortCut = 33 - OnClick = GoToPageClick - end - object bbGoToNextPage: TdxBarButton - Tag = 2 - Caption = '&Next Page' - Category = 8 - Hint = 'Go to Next Page' - Visible = ivAlways - ImageIndex = 15 - ShortCut = 34 - OnClick = GoToPageClick - end - object bbGoToLastPage: TdxBarButton - Tag = 3 - Caption = '&Last Page' - Category = 8 - Hint = 'Go to Last Page' - Visible = ivAlways - ImageIndex = 16 - ShortCut = 35 - OnClick = GoToPageClick - end - object bbEdit: TdxBarSubItem - Caption = '&Edit' - Category = 10 - Visible = ivNever - ItemLinks = < - item - Item = bbEditFind - Visible = True - end - item - Item = bbEditFindNext - Visible = True - end - item - BeginGroup = True - Item = bbEditReplace - Visible = True - end> - end - object bbZoomFourPages: TdxBarButton - Tag = 4 - Caption = 'Four Page' - Category = 6 - Hint = 'Zoom Four Page' - Visible = ivAlways - ImageIndex = 9 - ShortCut = 16436 - OnClick = ZoomClick - end - object bbZoomMultiplePages: TdxBarButton - Caption = '&Multiple Pages' - Category = 6 - Hint = 'Multiple Pages' - Visible = ivAlways - ImageIndex = 10 - OnClick = bbZoomMultiplePagesClick - end - object bbZoomWidenToSourceWidth: TdxBarButton - Tag = 5 - Caption = 'Widen To Source Width' - Category = 6 - Hint = 'Widen to source width' - Visible = ivAlways - ImageIndex = 11 - OnClick = ZoomClick - end - object seActivePage: TdxBarSpinEdit - Caption = '&Active Page :' - Category = 8 - Hint = 'Active Page :' - Visible = ivAlways - OnChange = seActivePageChange - Width = 100 - OnButtonClick = seActivePageButtonClick - end - object cbxPredefinedZoom: TdxBarImageCombo - Caption = '&Zoom :' - Category = 6 - Hint = 'Zoom :' - Visible = ivAlways - Text = '100%' - OnChange = cbxPredefinedZoomChange - Glyph.Data = { - F6000000424DF600000000000000760000002800000010000000100000000100 - 0400000000008000000000000000000000001000000010000000000000000000 - 8000008000000080800080000000800080008080000080808000C0C0C0000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00888888888888 - 8888008888888888888800088888888888888000888888888888880008700007 - 88888880000888800888888807EE88887088888708E88888807888808E888888 - 88088880888888888808888088888888E808888088888888E80888870888888E - E078888807888EEE708888888008888008888888887000078888} - Width = 100 - OnClick = cbxPredefinedZoomClick - ShowEditor = True - Images = ilToolBar - Items.Strings = ( - '500%' - '200%' - '150%' - '100%' - '75%' - '50%' - '25%' - '10%' - 'Page Width' - 'Whole Page' - 'Two Pages' - 'Four Pages' - 'Widen To Source Width') - ItemIndex = 3 - ImageIndexes = ( - -1 - -1 - -1 - 5 - -1 - -1 - -1 - -1 - 6 - 7 - 8 - 9 - 11) - end - object bbFileLoad: TdxBarButton - Caption = '&Load...' - Category = 0 - Hint = 'Load' - Visible = ivAlways - ImageIndex = 43 - ShortCut = 16463 - OnClick = ExplorerLoadDataClick - end - object bbZoomSetup: TdxBarButton - Caption = '&Setup ...' - Category = 6 - Hint = 'Setup ' - Visible = ivAlways - PaintStyle = psCaption - OnClick = bbZoomSetupClick - end - object bbToolsOptions: TdxBarButton - Caption = '&Options...' - Category = 7 - Hint = 'Options' - Visible = ivAlways - OnClick = bbToolsOptionsClick - end - object bbViewMarginBar: TdxBarButton - Caption = 'MarginBar' - Category = 4 - Hint = 'Margin Bar' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - OnClick = bbViewMarginBarClick - end - object bbFileSave: TdxBarButton - Caption = '&Save...' - Category = 0 - Hint = 'Save' - Visible = ivAlways - ImageIndex = 38 - ShortCut = 16467 - OnClick = FileSaveClick - end - object bbViewStatusBar: TdxBarButton - Caption = 'StatusBar' - Category = 4 - Hint = 'StatusBar' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - OnClick = bbViewStatusBarClick - end - object bbHelpTopics: TdxBarButton - Caption = '&Help Topics...' - Category = 9 - Hint = 'Help' - Visible = ivAlways - ImageIndex = 17 - OnClick = HelpClick - end - object bbViewExplorer: TdxBarButton - Caption = 'E&xplorer' - Category = 4 - Hint = 'Explorer' - Visible = ivAlways - ButtonStyle = bsChecked - ImageIndex = 48 - ShortCut = 16472 - OnClick = bbViewExplorerClick - end - object bsiShortcutPreview: TdxBarSubItem - Caption = 'Preview' - Category = 11 - Visible = ivInCustomizing - ItemLinks = <> - end - object bsiInsertHFAutoText: TdxBarSubItem - Caption = 'AutoText' - Category = 3 - Visible = ivAlways - Detachable = True - DetachingBar = 4 - ItemLinks = < - item - Item = bbInsertEditAutoText - Visible = True - end - item - BeginGroup = True - Item = bliInsertAutoTextEntries - Visible = True - end> - end - object bbInsertEditAutoText: TdxBarButton - Caption = 'AutoTe&xt...' - Category = 3 - Hint = 'AutoText' - Visible = ivAlways - ImageIndex = 33 - end - object bsiInsertAutoText: TdxBarSubItem - Caption = 'Insert AutoText' - Category = 3 - Visible = ivAlways - ItemLinks = < - item - Item = bliInsertAutoTextEntries - Visible = True - end> - end - object bliInsertAutoTextEntries: TdxBarListItem - Caption = 'List of AutoText Entries' - Category = 3 - Visible = ivAlways - ShowNumbers = False - end - object bbInsertHFPageNumber: TdxBarButton - Caption = '&Page Number' - Category = 3 - Hint = 'Insert Page Number' - Visible = ivAlways - ImageIndex = 19 - ShortCut = 41040 - OnClick = InsertHFClick - end - object bbInsertHFTotalPages: TdxBarButton - Tag = 1 - Caption = '&Number of Pages' - Category = 3 - Hint = 'Insert Number of Pages' - Visible = ivAlways - ImageIndex = 21 - OnClick = InsertHFClick - end - object bbInsertHFPageOfPages: TdxBarButton - Tag = 2 - Caption = 'Page Number Of Pages' - Category = 3 - Hint = 'Insert Page Number Of Pages' - Visible = ivAlways - ImageIndex = 20 - OnClick = InsertHFClick - end - object bbInsertHFDateTime: TdxBarButton - Tag = 3 - Caption = 'Date and Time' - Category = 3 - Hint = 'Insert Date and Time' - Visible = ivAlways - ImageIndex = 23 - OnClick = InsertHFClick - end - object bbInsertHFDate: TdxBarButton - Tag = 4 - Caption = '&Date' - Category = 3 - Hint = 'Insert Date' - Visible = ivAlways - ImageIndex = 24 - ShortCut = 41028 - OnClick = InsertHFClick - end - object bbInsertHFTime: TdxBarButton - Tag = 5 - Caption = '&Time' - Category = 3 - Hint = 'Insert Time' - Visible = ivAlways - ImageIndex = 25 - ShortCut = 41044 - OnClick = InsertHFClick - end - object bbInsertHFUserName: TdxBarButton - Tag = 6 - Caption = '&User Name' - Category = 3 - Hint = 'Insert User Name' - Visible = ivAlways - ImageIndex = 27 - OnClick = InsertHFClick - end - object bbInsert: TdxBarSubItem - Caption = '&Insert' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bsiInsertHFAutoText - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFPageNumber - Visible = True - end - item - Item = bbInsertHFTotalPages - Visible = True - end - item - Item = bbInsertHFPageOfPages - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFDateTime - Visible = True - end - item - Item = bbInsertHFDate - Visible = True - end - item - Item = bbInsertHFTime - Visible = True - end - item - BeginGroup = True - Item = bbInsertHFUserName - Visible = True - end - item - Item = bbInsertHFMachineName - Visible = True - end> - end - object bbView: TdxBarSubItem - Caption = '&View' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbViewMargins - Visible = True - end - item - BeginGroup = True - Item = bbViewMarginBar - Visible = True - end - item - Item = bbViewStatusBar - Visible = True - end - item - Item = bbViewExplorer - Visible = True - end - item - Item = bbViewThumbnails - Visible = True - end - item - BeginGroup = True - Item = bbViewToolbars - Visible = True - end - item - BeginGroup = True - Item = bbFormatHeaderAndFooter - Visible = True - end - item - BeginGroup = True - Item = bbViewZoom - Visible = True - end - item - BeginGroup = True - Item = bbViewPageHeaders - Visible = True - end - item - Item = bbViewPageFooters - Visible = True - end> - end - object bbViewZoom: TdxBarSubItem - Caption = 'Zoom' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbZoomPercent100 - Visible = True - end - item - BeginGroup = True - Item = bbZoomPageWidth - Visible = True - end - item - Item = bbZoomWholePage - Visible = True - end - item - Item = bbZoomTwoPages - Visible = True - end - item - Item = bbZoomFourPages - Visible = True - end - item - Item = bbZoomMultiplePages - Visible = True - end - item - BeginGroup = True - Item = bbZoomWidenToSourceWidth - Visible = True - end - item - BeginGroup = True - Item = bbZoomSetup - Visible = True - end> - end - object bbFormatHeaderAndFooter: TdxBarButton - Caption = '&Header and Footer' - Category = 5 - Hint = 'Header and Footer' - Visible = ivAlways - AllowAllUp = True - ButtonStyle = bsChecked - ImageIndex = 36 - OnClick = bbFormatHeaderAndFooterClick - end - object bbFormatDateTime: TdxBarButton - Caption = 'Date and &Time...' - Category = 5 - Hint = 'Date and Time' - Visible = ivAlways - ImageIndex = 26 - OnClick = bbFormatDateTimeClick - end - object bbFormatPageNumbering: TdxBarButton - Caption = 'Page &Numbering...' - Category = 5 - Hint = 'Page Numbering' - Visible = ivAlways - ImageIndex = 22 - OnClick = bbFormatPageNumbersClick - end - object bbEditFind: TdxBarButton - Caption = 'Find...' - Category = 2 - Hint = 'Find' - Visible = ivNever - ShortCut = 16454 - end - object bbFormatPageBackground: TdxBarButton - Caption = 'Page Bac&kground...' - Category = 5 - Hint = 'Background' - Visible = ivAlways - ImageIndex = 4 - ShortCut = 16459 - OnClick = PageBackgroundClick - end - object bbFormatShrinkToPageWidth: TdxBarButton - Caption = '&Shrink To Page' - Category = 5 - Hint = 'Shrink To Page' - Visible = ivAlways - AllowAllUp = True - ButtonStyle = bsChecked - ImageIndex = 12 - OnClick = bbFormatShrinkToPageWidthClick - end - object bbEditFindNext: TdxBarButton - Caption = 'Find &Next' - Category = 2 - Hint = 'Find Next' - Visible = ivNever - ShortCut = 114 - end - object bbEditReplace: TdxBarButton - Caption = '&Replace...' - Category = 2 - Hint = 'Replace' - Visible = ivNever - ShortCut = 16466 - end - object bbFormatShowHideEmptyPages: TdxBarButton - Caption = 'Show/Hide EmptyPages' - Category = 5 - Hint = 'Show/Hide Empty Pages' - Visible = ivAlways - ButtonStyle = bsChecked - OnClick = bbFormatShowHideEmptyPagesClick - end - object bbViewThumbnails: TdxBarButton - Caption = 'Th&umbnails' - Category = 4 - Hint = 'Thumbnails' - Visible = ivAlways - ButtonStyle = bsChecked - ImageIndex = 49 - ShortCut = 16469 - OnClick = bbViewThumbnailsClick - end - object bbFormatHFBackground: TdxBarButton - Caption = 'Header and Footer Background ...' - Category = 5 - Hint = 'Header and Footer Background ' - Visible = ivAlways - ImageIndex = 34 - OnClick = bbFormatHFBackgroundClick - end - object bbThumbnailsSmall: TdxBarButton - Caption = '&Small Thumbnails' - Category = 4 - Hint = 'Small Thumbnails' - Visible = ivAlways - ButtonStyle = bsChecked - OnClick = bbThumbnailsSizeClick - end - object bbToolsCustomize: TdxBarButton - Caption = '&Customize...' - Category = 7 - Hint = 'Customize' - Visible = ivAlways - OnClick = bbToolsCustomizeClick - end - object bbThumbnailsLarge: TdxBarButton - Tag = 1 - Caption = '&Large Thumbnails' - Category = 4 - Hint = 'Large Thumbnails' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - OnClick = bbThumbnailsSizeClick - end - object bbViewPages: TdxBarSubItem - Caption = 'Pages' - Category = 10 - Visible = ivNever - ItemLinks = <> - end - object bbViewToolbars: TdxBarToolbarsListItem - Caption = '&Toolbars' - Category = 4 - Visible = ivAlways - end - object bbHelpAbout: TdxBarButton - Caption = '&About...' - Category = 9 - Hint = 'About' - Visible = ivNever - end - object bbViewPageHeaders: TdxBarButton - Caption = 'Page &Headers' - Category = 4 - Hint = 'Page Headers' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - OnClick = bbViewPageHeadersClick - end - object bbViewPageFooters: TdxBarButton - Caption = 'Page &Footers' - Category = 4 - Hint = 'Page Footers' - Visible = ivAlways - ButtonStyle = bsChecked - Down = True - OnClick = bbViewPageFootersClick - end - object bbViewSwitchToLeftPart: TdxBarButton - Caption = 'Switch To Left Part' - Category = 4 - Hint = 'Switch To Left Part' - Visible = ivAlways - ButtonStyle = bsChecked - GroupIndex = 1 - Down = True - ImageIndex = 30 - OnClick = SwitchPartClick - end - object bbFormat: TdxBarSubItem - Caption = '&Format' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbFormatTitle - Visible = True - end - item - BeginGroup = True - Item = bbFormatPageNumbering - Visible = True - end - item - Item = bbFormatDateTime - Visible = True - end - item - BeginGroup = True - Item = bbFormatShrinkToPageWidth - Visible = True - end - item - Item = bbFormatShowHideEmptyPages - Visible = True - end - item - BeginGroup = True - Item = bbFormatPageBackground - Visible = True - end> - end - object bbGoToPage: TdxBarSubItem - Caption = '&Go' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbGoToFirstPage - Visible = True - end - item - Item = bbGoToPrevPage - Visible = True - end - item - BeginGroup = True - Item = seActivePage - Visible = True - end - item - BeginGroup = True - Item = bbGoToNextPage - Visible = True - end - item - Item = bbGoToLastPage - Visible = True - end> - end - object bbFormatHFClear: TdxBarButton - Caption = 'Clea&r Text' - Category = 5 - Hint = 'Clear Text' - Visible = ivAlways - OnClick = bbFormatHFClearClick - end - object bsiNewMenuNewMenu: TdxBarSubItem - Caption = 'New Item' - Category = 12 - Visible = ivAlways - ItemLinks = <> - end - object bbFileClose: TdxBarButton - Caption = '&Unload' - Category = 0 - Hint = 'Unload' - Visible = ivAlways - ImageIndex = 44 - ShortCut = 16499 - OnClick = bbFileCloseClick - end - object bbFilePrint: TdxBarButton - Caption = 'Print' - Category = 0 - Hint = 'Print' - Visible = ivNever - ImageIndex = 1 - OnClick = PrintClick - end - object bbInsertHFMachineName: TdxBarButton - Tag = 7 - Caption = '&Machine Name' - Category = 3 - Hint = 'Insert Machine Name' - Visible = ivAlways - ImageIndex = 28 - OnClick = InsertHFClick - end - object bbFilePrintDialog: TdxBarButton - Tag = 1 - Caption = '&Print...' - Category = 0 - Hint = 'Print Dialog' - Visible = ivNever - ImageIndex = 2 - ShortCut = 16464 - OnClick = PrintClick - end - object bbTools: TdxBarSubItem - Caption = '&Tools' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbToolsCustomize - Visible = True - end - item - Item = bbToolsOptions - Visible = True - end> - end - object bbExplorerCreateNewFolder: TdxBarButton - Caption = 'Create &Folder...' - Category = 1 - Hint = 'Create Folder' - Visible = ivAlways - ImageIndex = 40 - ShortCut = 32821 - OnClick = ExplorerCreateNewFolderClick - end - object bbHelp: TdxBarSubItem - Caption = '&Help' - Category = 10 - Visible = ivAlways - ItemLinks = < - item - Item = bbHelpTopics - Visible = True - end - item - BeginGroup = True - Item = bbHelpAbout - Visible = True - end> - end - object bbFilePageSetup: TdxBarButton - Tag = 2 - Caption = 'Page set&up...' - Category = 0 - Hint = 'Page Setup ' - Visible = ivNever - ButtonStyle = bsDropDown - DropDownMenu = pmPrintStyles - ImageIndex = 3 - OnClick = PageSetupClick - end - object bbViewSwitchToCenterPart: TdxBarButton - Tag = 1 - Caption = 'Switch To Center Part' - Category = 4 - Hint = 'Switch To Center Part' - Visible = ivAlways - ButtonStyle = bsChecked - GroupIndex = 1 - ImageIndex = 31 - OnClick = SwitchPartClick - end - object bliPrintStyles: TdxBarListItem - Caption = 'Print Styles' - Category = 0 - Visible = ivAlways - ShowCheck = True - ShowNumbers = False - end - object bsiShortCutExplorer: TdxBarSubItem - Caption = 'Explorer' - Category = 11 - Visible = ivAlways - ItemLinks = <> - end - object bbDefinePrintStyles: TdxBarButton - Caption = 'Define Print Styles...' - Category = 0 - Hint = 'Define Print Styles' - Visible = ivAlways - end - object bbExplorerDelete: TdxBarButton - Caption = '&Delete...' - Category = 1 - Hint = 'Delete' - Visible = ivAlways - ImageIndex = 39 - ShortCut = 46 - OnClick = ExplorerDeleteItemClick - end - object bbExplorerRename: TdxBarButton - Caption = '&Rename...' - Category = 1 - Hint = 'Rename' - Visible = ivAlways - ShortCut = 113 - OnClick = ExplorerRenameItemClick - end - object bbFormatTitle: TdxBarButton - Caption = 'Title...' - Category = 5 - Hint = 'Title' - Visible = ivAlways - ImageIndex = 45 - OnClick = bbFormatTitleClick - end - object bbViewSwitchToRightPart: TdxBarButton - Tag = 2 - Caption = 'Switch To Right Part' - Category = 4 - Hint = 'Switch To Right Part' - Visible = ivAlways - ButtonStyle = bsChecked - GroupIndex = 1 - ImageIndex = 32 - OnClick = SwitchPartClick - end - object bbViewHFSwitchHeaderFooter: TdxBarButton - Caption = '&Show Header/Footer' - Category = 4 - Hint = 'Show Header/Footer' - Visible = ivAlways - AllowAllUp = True - ButtonStyle = bsChecked - ImageIndex = 29 - OnClick = bbViewHFSwitchHeaderFooterClick - end - object bbViewHFClose: TdxBarButton - Caption = '&Close' - Category = 4 - Hint = 'Close Header and Footer' - Visible = ivAlways - OnClick = bbViewHFCloseClick - end - object bsiShortcutThumbnails: TdxBarSubItem - Caption = 'Thumbnails' - Category = 11 - Visible = ivAlways - ItemLinks = <> - end - object bbExplorerProperties: TdxBarButton - Caption = '&Properties...' - Category = 1 - Hint = 'P&roperties' - Visible = ivAlways - ImageIndex = 46 - ShortCut = 32781 - OnClick = bbExplorerPropertiesClick - end - object bbFileExit: TdxBarButton - Caption = '&Close' - Category = 0 - Hint = 'Close' - Visible = ivAlways - OnClick = CloseClick - end - end - object ilToolBar: TImageList - AllocBy = 48 - Left = 35 - Top = 197 - Bitmap = { - 494C010132003600040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 000000000000360000002800000040000000E0000000010020000000000000E0 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FFFF000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FFFF00008000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800000808000008080000080 - 8000008080000080800000808000008080000080800000808000FF000000FFFF - 0000800000000080800000808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00FF000000FFFF00008000 - 000000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF00C0C0C000000000000000000000000000C0C0C0008000000000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF00C0C0C00000000000FFFF0000C0C0C000FFFF000000000000C0C0C00000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000FFFF0000C0C0C000FFFF0000C0C0C000FFFF00000000000000FF - FF0000FFFF0000FFFF0000808000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000C0C0C000FFFF0000C0C0C000FFFF0000C0C0C0000000000000FF - FF0000FFFF0000FFFF0000808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000FFFF0000C0C0C000FFFF0000C0C0C000FFFF00000000000000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF00C0C0C00000000000FFFF0000C0C0C000FFFF000000000000C0C0C00000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF00C0C0C000000000000000000000000000C0C0C00000FFFF0000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000808000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000FFFF000000 - 0000FFFFFF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000FFFF - FF00000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF0000000000000000FFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000FFFF - FF00808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF0000FFFF00FFFFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF00FFFFFF00FFFFFF0000000000C0C0C00000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000808080000000000000000000FFFFFF0000000000C0C0 - C00000000000FFFFFF0000000000C0C0C00000000000C0C0C000000000000000 - 000000000000000000008000000080000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000808080000000000000000000000000000000000000000000FFFF - FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000 - FF00FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF000000 - 0000C0C0C00000000000C0C0C00000000000C0C0C00000000000C0C0C000C0C0 - C000C0C0C0000000000080000000800000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 000000000000000000000000000080000000000000000000000000000000FFFF - FF000000FF000000000000000000000000000000000000000000000000000000 - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C00000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C00080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000080000000000000000000000000000000FFFF - FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000 - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 00000000000000000000C0C0C00000000000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000800000008000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000080000000000000008000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C0000000000080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000800000008000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000800000008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00000000000000000000000000000000000000000000000000FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0080000000800000008000000080000000800000008000 - 0000FFFFFF00FFFFFF0000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFFFF00FFFF - FF0080000000FFFFFF00000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 80000080800000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF0080000000FFFFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF008080800000FFFF00FFFFFF0000FFFF008080 - 800000FFFF0000FFFF0000FFFF00808080000000000000FFFF00FFFFFF000000 - 000000000000000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF008080800000FFFF0000FFFF008080 - 800000FFFF00FFFFFF008080800000FFFF0000000000FFFFFF0000FFFF00FFFF - FF00000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF0080000000FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF008080800000FFFF008080 - 8000FFFFFF008080800000FFFF00000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF0080000000FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF0080808000808080008080800080808000FFFF - FF008080800080808000808080008080800000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00800000008000000080000000800000008000000080000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF008080800000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF0000000000000000008080800000FFFF008080 - 800000FFFF008080800000FFFF0000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800000FFFF00000000008080 - 8000FFFFFF00000000008080800000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000008080800000FFFF0000000000000000008080 - 8000808080000000000000000000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000008000 - 8000800080008000800080008000800080008000800080008000800080008000 - 8000800080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF0000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 00000000000000000000000000000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0008000 - 8000C0C0C0000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000000000000000 - 0000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000008000 - 800080008000800080008000800080008000800080008000800000000000C0C0 - C000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C000C0C0C00080008000C0C0C000C0C0C000C0C0C000C0C0C000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000FFFF0000FFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840000FFFF00848484008484 - 840000FFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400FFFFFF008484 - 8400FFFFFF00FFFFFF0000FFFF000000000000FFFF0000FFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840000FFFF0000FFFF0000FF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000084848400000000008484 - 840000000000FFFFFF0000FFFF00000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840084848400848484008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000848484008484 - 84008484840000000000FFFFFF00FFFFFF0000FFFF0084848400FFFFFF00FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C6C6C600C6C6C600C6C6 - C600848484008484840000000000FFFFFF00FFFFFF008400000084848400FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00C6C6C600C6C6C600C6C6 - C600C6C6C60084848400848484000000000000FFFF008400000084000000FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00C6C6C600C6C6 - C600C6C6C600C6C6C6008484840084848400840000008400000084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF000000 - 0000FFFFFF0000000000FFFFFF0000000000C6C6C600FFFFFF00FFFFFF00C6C6 - C60000000000C6C6C600C6C6C60084848400840000008400000084000000FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000848400008484000000 - 0000FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF0000000000FFFF - FF0000000000FFFFFF00000000000000000000000000C6C6C600FFFFFF000000 - 00008400000000000000C6C6C60084000000840000008400000084848400FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF00000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF000000000000848400008484000000000000000000FFFFFF000000 - 0000FFFFFF000000000000000000000000000000000000000000C6C6C600FFFF - FF0084000000C6C6C60084848400840000008400000084848400FFFFFF0000FF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000C6C6C600FFFFFF00C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840084848400848484008484 - 84008484840000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000008484000000000000000000000000008400000000000000C6C6 - C60084000000848484000000000084848400FFFFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00C6C6 - C600000000000000000000000000C6C6C600FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840000FFFF0000FFFF0000FF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF000084 - 8400FFFFFF0000848400FFFFFF0000848400FFFFFF0000848400FFFFFF000084 - 8400FFFFFF000084840000000000000000000000000084000000C6C6C6000000 - 0000840000000000000084848400000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00848484008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840000FFFF00848484008484 - 840000FFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000084840000000000000000000000000084000000C6C6C600C6C6 - C600840000008484840000FFFF000000000000FFFF0000FFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000084 - 8400FFFFFF0000848400FFFFFF0000848400FFFFFF0000848400FFFFFF000084 - 8400FFFFFF000000000000000000000000000000000084848400840000008400 - 00008484840084848400848484000000000000FFFF0000FFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000FFFF008484 - 84008484840000FFFF0084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008484840000FFFF00848484008484840000FFFF0084848400FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000848484008484840084848400848484008484840000000000000000000000 - 0000848484008484840084848400848484000000000000000000000000000000 - 0000FFFFFF008484840084848400848484008484840084848400848484008484 - 84008484840000FFFF000000000000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008484840000FFFF0000FFFF0000FFFF0000FFFF0084848400FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00C6C6C600C6C6C600848484000000000000000000FFFF - FF00848484008484840084848400848484000000000084848400848484000000 - 000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000848484008484 - 8400848484008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00848484008484840084848400848484008484840084848400FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF000000000000000000848484008484840000000000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF000000000000000000848484008484840000000000FFFFFF00848484008484 - 840084848400848484008484840084848400FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400840000008400 - 00008400000084000000840000008400000084000000FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00848484008484840000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400840000008400 - 00008400000084000000840000008400000084000000FFFFFF0000000000FFFF - FF000000000000000000848484008484840000000000FFFFFF00848484008484 - 840084848400848484008484840084848400FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400840000008400 - 00008400000084000000840000008400000084000000FFFFFF0000000000FFFF - FF000000000000000000848484008484840000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400840000008400 - 00008400000084000000840000008400000084000000FFFFFF0000000000FFFF - FF008484840084848400848484008484840000000000FFFFFF00848484008484 - 840084848400848484008484840084848400FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400840000008400 - 00008400000084000000840000008400000084000000FFFFFF0000000000FFFF - FF008484840084848400848484008484840000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008484 - 8400848484008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00848484008484840084848400848484008484840084848400FFFF - FF00FFFFFF000000000000000000000000000000000084848400848484008484 - 840084848400848484008484840084848400848484008484840000000000FFFF - FF00848484008484840084848400848484000000000084848400848484008484 - 840084848400848484008484840084848400848484000000000000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000FFFF0000FF - FF0000FFFF0000FFFF0084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008484840000FFFF0000FFFF0000FFFF0000FFFF0084848400FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008484 - 84008484840000FFFF000000000000000000000000000000000000FFFF008484 - 84008484840000FFFF0084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008484840000FFFF00848484008484840000FFFF0084848400FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00C6C6C600FFFFFF00C6C6C600FFFFFF00C6C6 - C600FFFFFF00C6C6C600FFFFFF00000000000000000000000000000000000000 - 000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000C6C6C600000000000000000000000000000000000000 - 00000000000000000000C6C6C6000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000008400000084000000840000008400 - 0000840000008400000000000000FFFFFF0000FFFF00FFFFFF0000000000FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600FFFFFF00C6C6 - C600FFFFFF0000000000FFFFFF00C6C6C600FFFFFF00C6C6C600FFFFFF00C6C6 - C600FFFFFF00C6C6C600FFFFFF0000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF0000000000000000000000000084000000FFFFFF00C6C6C600FFFF - FF00C6C6C600FFFFFF000000000000FFFF00FFFFFF0000FFFF000000000000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600C6C6C60000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 00000000000000000000C6C6C600FFFFFF00C6C6C6000000840000008400FFFF - FF00C6C6C600FFFFFF00C6C6C600000000000000000000000000FFFFFF0000FF - FF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000000000000000000084000000C6C6C600FFFFFF000000 - 8400FFFFFF0000008400000084000000000000FFFF00FFFFFF0000000000FFFF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C6000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600FFFFFF00C6C6 - C600FFFFFF0000000000FFFFFF00C6C6C600FFFFFF000000840000008400C6C6 - C600FFFFFF00C6C6C600FFFFFF000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000084000000FFFFFF00C6C6C6000000 - 8400C6C6C60000008400C6C6C600FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6C6000000 - 00000000000000000000000000000000000000000000FFFFFF00848484000000 - 84000000840000000000C6C6C600FFFFFF00C6C6C600FFFFFF00000084000000 - 8400C6C6C600FFFFFF00C6C6C600000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00000000000000000084000000C6C6C600000084000000 - 8400FFFFFF00C6C6C60000008400C6C6C600C6C6C60000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000C6C6C600C6C6C600C6C6C6000000 - 00000000000000000000000000000000000000000000C6C6C600000084000000 - 8400FFFFFF0000000000FFFFFF00C6C6C600FFFFFF00C6C6C600FFFFFF000000 - 840000008400C6C6C600FFFFFF000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000000000000000 - 000000000000FFFFFF00000000000000000084000000FFFFFF00C6C6C6000000 - 8400C6C6C60084000000FFFFFF0084000000C6C6C600C6C6C600000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6C600C6C6 - C6000000000000000000000000000000000000000000FFFFFF00848484000000 - 84000000840000000000C6C6C600FFFFFF000000840000008400000084000000 - 840000008400FFFFFF00C6C6C600000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00000000000000000084000000C6C6C600FFFFFF00C6C6 - C600FFFFFF00C6C6C600FFFFFF00C6C6C600C6C6C60000000000C6C6C6000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600C6C6C600C6C6C600000000000000 - 00000000000000000000000000000000000000000000C6C6C600000084000000 - 8400FFFFFF0000000000FFFFFF00C6C6C600FFFFFF00C6C6C600FFFFFF00C6C6 - C600FFFFFF00C6C6C600FFFFFF000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000008400000084000000840000008400 - 0000840000000000000000000000C6C6C60000000000C6C6C60000000000C6C6 - C600000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600C6C6C6000000 - 00000000000000000000000000000000000000000000FFFFFF00848484000000 - 8400000084000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000000000000000000084000000FF00000084000000FF00 - 0000FF00000000000000C6C6C60000000000C6C6C60000000000C6C6C6000000 - 0000C6C6C600C6C6C60000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C6000000000000000000000000000000000000000000C6C6C600FFFFFF00C6C6 - C600FFFFFF000000000084000000840000008400000084000000840000008400 - 000084000000840000008400000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000000000000000008400000084000000840000008400 - 0000840000008400000000000000C6C6C60000000000C6C6C60000000000C6C6 - C600C6C6C600C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000000FF - FF00FFFFFF0000FFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000C6C6C60000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084000000840000008400 - 0000840000008400000084000000840000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000FFFF00FFFFFF0000000000FFFF - FF0000FFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF008400000084000000840000008400000084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF008400 - 0000FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00840000008400000084000000840000008400 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF0084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00840000008400 - 000084000000840000008400000084000000FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF00000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0084000000FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000008400000084000000840000008400 - 0000840000008400000000000000FFFFFF0000FFFF00FFFFFF0000000000FFFF - FF0000FFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF008400 - 00008400000084000000840000008400000084000000FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000084000000FFFFFF00C6C6C600FFFF - FF00C6C6C600FFFFFF000000000000FFFF00FFFFFF0000FFFF000000000000FF - FF00FFFFFF0000FFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000FFFFFF0084000000FFFFFF00FFFFFF00000000000000 - 00000000000000000000000000000000000084000000C6C6C600FFFFFF000000 - 8400FFFFFF0000008400000084000000000000FFFF00FFFFFF0000000000FFFF - FF0000FFFF00000000000000000000000000000000000000000000000000FFFF - FF008400000084000000840000008400000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF0084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000000000000000 - 00000000000000000000000000000000000084000000FFFFFF00C6C6C6000000 - 8400C6C6C60000008400C6C6C600FFFFFF000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF008400000084000000840000008400000084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000FFFFFF000000000000000000000000000000 - 00000000000000000000000000008400000084000000C6C6C600000084000000 - 8400FFFFFF00C6C6C60000008400C6C6C6008400000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000008400000084000000FFFFFF00C6C6C6000000 - 8400C6C6C6000000840000008400FFFFFF008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 00000000000000000000000000008400000084000000C6C6C600FFFFFF00C6C6 - C600FFFFFF00C6C6C600FFFFFF00C6C6C6008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000840000008400000084000000840000008400 - 0000840000008400000084000000840000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000008400000084000000FF00000084000000FF00 - 0000FF000000FF00000084000000FF0000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000840000008400000084000000840000008400 - 0000840000008400000084000000840000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 840084848400848484008484840084848400848484000000000000FFFF000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000848484008484840000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 8400848484008484840000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000000000000000000000000000FFFF - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF008400000084000000FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000FFFF00008484840000000000FFFF - 0000FFFF00000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400000000000000000000FFFF0000FFFF0000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000FFFF - 0000FFFF0000FFFF000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF008400000084848400FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF0084000000840000008400000084000000840000008400000084000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF008484840084000000C6C6C600FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0084848400000000000000 - 000000000000848484008484840084848400000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000FFFF - 0000FFFF0000FFFF000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF0084848400840000008484840000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000FFFF00008484840000000000FFFF - 0000FFFF00000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008400000084848400FFFFFF00FFFFFF008400000084000000FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0084848400000000000000 - 000000000000848484008484840084848400000000000000000000000000FFFF - FF00FFFFFF008400000084000000840000008400000084000000840000008400 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000000000000000000000000000FFFF - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00840000008400000000FFFF00C6C6C600840000008400000000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 8400848484000000000000FFFF0000FFFF0000FFFF0000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00C6C6C60084000000840000008400000084000000C6C6C600FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 84000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF0084000000FFFFFF00FFFFFF0084000000FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFF0000000000000000000000000000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - 0000FFFF00000000000084848400FFFF0000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000FFFF00000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600FF000000FF000000FF00000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000FFFF0000FFFF - 0000FFFF000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFF0000FFFF0000FFFF - 000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000008484000000000000C6C6 - C600FF000000FF000000FF000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFF0000FFFF - 0000FFFF000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C6000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000FFFF00000000000084848400FFFF0000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000FFFF00000000 - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600FF000000FF000000FF000000C6C6C6000000000000000000000000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000FFFF0000000000000000000000000000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000000000000000 - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C6000000000000000000000000000000 - 0000000000008400000084000000840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000848400008484 - 0000848400008484000000000000000000000000000000000000840000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 0000000000000000000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 84008484000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 00008484840084840000848484000000000000000000FFFFFF00FFFFFF000000 - 000000000000FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF0000000000FFFFFF00FFFFFF0000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000000000000000 - 000000000000FFFFFF0000000000848400008484840000000000000000000000 - 0000FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000008484840000000000000000000000000084840000000000000000 - 00000000000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00000000008484000000000000FFFFFF00000000008484840000000000FFFF - FF000000000084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400000000000000 - 000000000000FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00000000008484840000000000FFFFFF00000000008484000000000000FFFF - FF000000000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000000000000000 - 0000FFFFFF000000000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000084840000000000000000 - 0000000000008484000000000000000000000000000084840000000000000000 - 00000000000084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484840000000000FFFF - FF00000000000000000000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 84008484000084848400848400000000000000000000FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF000000 - 0000FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 0000000000000000000084840000000000000000000084840000000000000000 - 0000000000008484000000000000000000000000000084840000000000000000 - 0000000000008484000084848400000000008484840000000000FF000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FF0000000000000084848400000000008484840000000000FFFF - FF0000000000FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF00000000008484840000000000000000008484840000000000FFFF - FF00000000008484840000000000FFFFFF00000000008484840000000000FFFF - FF000000000084848400848400000000000000000000FF000000FF0000000000 - 0000FFFFFF00FF000000000000000000000000000000FFFFFF00FF000000FFFF - FF0000000000FF000000FF00000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF000000000084848400000000000000000084848400000000000000 - 000000000000FFFFFF0000000000848484008484000000000000000000000000 - 0000FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00000000008484000000000000FFFFFF00000000008484000000000000FFFF - FF00000000008484000084848400000000008484840000000000FF000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FF00000000000000848484000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 000000000000000000008484000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000008484840000000000000000000000000084848400000000000000 - 00000000000084848400848400000000000000000000FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 0000000000000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 00008484840084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 840084840000848484008484000000000000000000000000000084848400FFFF - FF000000000000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000848484008484000084848400000000000000000000000000848484000000 - 00008484840000000000FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484840084840000000000000000000000000000000000008484 - 8400848484008484840000000000FFFFFF00FFFFFF0000FFFF0084848400FFFF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000C6C6C600C6C6 - C600C6C6C600848484008484840000000000FFFFFF00FFFFFF00840000008484 - 8400FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF00840000008400000084000000840000008400000084000000FFFF - FF000000000084848400848400000000000000000000FFFFFF00C6C6C600C6C6 - C600C6C6C600C6C6C60084848400848484000000000000FFFF00840000008400 - 0000FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0000000000848400008484840000000000C6C6C600FFFFFF00FFFFFF00C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084000000840000008400 - 0000FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF0000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF0084000000840000008400000084000000FFFFFF00FFFFFF00FFFF - FF000000000084848400848400000000000000000000C6C6C600FFFFFF00FFFF - FF00C6C6C60000000000C6C6C600C6C6C6008484840084000000840000008400 - 0000FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000000000FF00 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FF00000000000000FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000C6C6C600FFFF - FF00000000008400000000000000C6C6C6008400000084000000840000008484 - 8400FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000FF000000FF00 - 000000000000FFFFFF0000000000FF000000FF00000000000000FFFFFF000000 - 0000FF000000FF00000000000000000000000000000084848400848400000000 - 0000FFFFFF00840000008400000084000000840000008400000084000000FFFF - FF0000000000848484008484000000000000000000000000000000000000C6C6 - C600FFFFFF0084000000C6C6C60084848400840000008400000084848400FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000000000FF00 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FF00000000000000FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000840000000000 - 0000C6C6C60084000000848484000000000084848400FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF0000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000848484008484000000000000000000000000000084000000C6C6 - C60000000000840000000000000084848400FFFFFF0000FFFF00FFFFFF008484 - 8400C6C6C60000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 000084848400848400008484840000000000000000000000000084000000C6C6 - C600C6C6C600840000008484840000FFFF00FFFFFF00FFFFFF00FFFFFF008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008400 - 0000840000008484840084848400848484008484840084848400848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400000000008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000008484840000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484000000 - 00000000000000000000C6C6C600C6C6C600C6C6C60000000000000000000000 - 0000000000000000000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C60000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C60000000000000000000000000000000000000000000000 - 000000000000FFFFFF008484840000000000FFFFFF0000000000000000000000 - 000000000000000000000000000000000000000000008484840000000000C6C6 - C600848484000000000000000000C6C6C600C6C6C6000000000084848400C6C6 - C6000000000000000000848484000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C60000FFFF0000FFFF0000FFFF00C6C6C600C6C6 - C6000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C60000FFFF0000FFFF0000FFFF00C6C6C600C6C6 - C600000000000000000000000000000000000000000084848400FFFFFF00FFFF - FF00FFFFFF00848484008484840000000000FFFFFF00FFFFFF00848484008484 - 840084848400848484000000000000000000000000000000000084848400C6C6 - C60084848400C6C6C600C6C6C6008484840000000000C6C6C600848484008484 - 84008484840084848400000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400C6C6C600C6C6 - C60000000000C6C6C600000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400C6C6C600C6C6 - C60000000000C6C6C60000000000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000000000000000000000000000000000 - 0000C6C6C600C6C6C60000000000FFFFFF00FFFFFF0000000000C6C6C6000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C600C6C6C600000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000C6C6C6000000 - 0000C6C6C60000000000C6C6C600C6C6C600C6C6C600FFFFFF00848484000000 - 0000C6C6C600C6C6C600000000008484840000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C60000000000C6C6C6000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C60000000000C6C6C600000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000C6C6C600C6C6 - C600FFFFFF00000000008484840000000000C6C6C600FFFFFF0084848400C6C6 - C600C6C6C600C6C6C60000000000848484000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C60000000000C6C6C60000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C60000000000C6C6C60000000000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000000000000000 - 0000FFFFFF00000000008484840084848400C6C6C60000000000C6C6C6000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C6C6C60000000000C6C6C60000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C6C6C60000000000C6C6C600848484000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000000000000000000000000000000000 - 0000C6C6C600FFFFFF00000000000000000000000000C6C6C600C6C6C6000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00848484000000000000000000000000000000000084848400C6C6 - C60084848400C6C6C600FFFFFF00FFFFFF00C6C6C600C6C6C600848484008484 - 8400848484000000000084848400000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00848484000000000000000000000000008484840000000000C6C6 - C600848484000000000000000000C6C6C6000000000000000000C6C6C600C6C6 - C600000000008484840000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000FFFF00008484 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000000000000000000000000000000000000000000084848400FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000848484000000 - 00008484840000000000C6C6C600C6C6C600C6C6C60000000000848484000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00848484008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000E00000000100010000000000000700000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFF18000000000008000800000000000 - 0000800000000000000080000000000000008000000000000000800000000000 - 0000800000000000000080000000000000008000000000000000800000000000 - 0000800000000000000080000000000000018000000000008007800000000000 - C007800000000000E007FFFF00000000FFFFE001FFFFFFFFFFFFC001000F8000 - 8003C001000F80008003C001000F80008003C001000F80008003C001000F8000 - 8003C001000F80008003C001000F80008003C001000F80008003C00100048000 - 8003C00100008000C1FEC00100008001E3FEC001F800C07FFFF5C001FC00E0FF - FFF3C003FE04FFFFFFF1FFFFFFFFFFFFFFFFFFFFC001FFFF00010001C001FFFF - 00010001C001001F00010001C001000F00010001C001000700010001C0010003 - 00010001C001000100000001C001000000000001C001001F00010001C001001F - 00000001C001001F00000003C0018FF1808180FFC001FFF9C124C1FFC003FF75 - FE66FFFFC007FF8FFFE7FFFFC00FFFFFC001FFFFFFFFFFFFC001C003C001FFFF - C001C0038031FFF9C001C0038031E7FFC001C0038031C3F3C001C0038001C3E7 - C001C0038001E1C7C001C0038001F08FC001C0038FF1F81FC001C0038FF1FC3F - C001C0038FF1F81FC001C0038FF1F09FC003C0038FF1C1C7C007C0078FF183E3 - C00FC00F80018FF1FFFFC01FFFFFFFFFFFFFFFFFFE0080008003FFFF80000000 - 8003FF81800000008003FF00800000008003FE00800300008003FE0000030000 - 8003FC80000300008003FA000003000080038000000300008003000100030000 - 8003000180030000800300018003000080030001800000008003000180000000 - 8003000580000000FFFF8003FE0000018001FFFFFFFFFFFF8001E00180038003 - DFFBE00180038003F070000180038003E060000180038003802C000180038003 - 000C003F800380030000003F80038003000C003F800380030000003F80038003 - 0000003F80038003000000018003800300000001800380030000000180038003 - FFFFE00180038003FFFFE001FFFFFFFFFFFFFFFFFC01FFFFF800F83FFC01FFFF - F800E00F8001F7DF0000C0070001F63F000080030001F83F000080030003FC1F - 000000010007F80F00000001003FF00F00000001000FF00700000001000FF00F - 000000010003F00F000080030001F007000080030000F8070000C007FE00FC1F - 001FE00FFE00FFFF001FF83FFF80FFFFFFFFFFFFFFFFFFFFC003C003000FFF07 - C003C003000FFE03C003C003140FFC01C003C003000FFC01C003C003000F8001 - C003C003000F0001C003C003000F0001C003C003000F0003C003C003052F0007 - C003C0030052003FC003C00302AC003FC003C003815E003FE003E003C0BE003F - F003F003E07C003FF803F803FF82007FFFFFFFEFFDFFFFFFFFFFFFCFF9FFFFFF - FFFFE007F1FFC003FDDFC003E1FFC003FCCF80030007C003FC478003C03FC003 - 00038003C037C00300018003C027C00300008003C000C00300018003C000C003 - 00038003C000C003FC478003C027C003FCCF8003C037C003FDDF8003C03FE003 - FFFF8003C03FF003FFFFC007FFFFF803FFFFFFFFFFFFFFFFFE03FFFFFFFFFFFF - FE03FFFFFFFFFFFFFE03FBBFFEFFFF7FFE03F33FFCFFFF3FC003E23FF8FFFF1F - C003C000F003C00F00038000E003C00700030000C003C00300038000E003C007 - 007FC000F003C00F007DE23FF8FFFF1F0078F33FFCFFFF3F007DFBBFFEFFFF7F - 01DDFFFFFFFFFFFF01E3FFFFFFFFFFFFFFFF8001FFFFFFFF8001000080018081 - 0000000000000080000000000000008000000000000000800000000000000100 - 0000000000000100000000000000018000000000000000800000000000000000 - 0000000000000100000000000000018000000000000000800000000000000080 - 8001000080018081FFFF8001FFFFFFFFFFFFFFFFFFFFFFFFC001800180018001 - C001000000000000C001000000000000C001000000000000C001000000000000 - 8001000000000000000100000000000000010000000000000001000000000000 - 8001000000000000C001000000000000C001000000000000C003000000000000 - C007800180018001C00FFFFFFFFFFFFFFC7FFFFFFFFFFFFFFC27C007C007FFFF - EC2380038003F83FC4010001000100018001000100010001C003000100010001 - E000000000000001000000000000000100008000800000010003C000C0000001 - E001E001E0000001C001E007800000018003F00780070101C407F00380008383 - EC3FF803F000FFFFFC7FFFFFF800FFFF00000000000000000000000000000000 - 000000000000} - end - object pmPreview: TdxBarPopupMenu - BarManager = dxBarManager - ItemLinks = < - item - Item = bbFileDesign - Visible = True - end - item - BeginGroup = True - Item = bbFilePageSetup - Visible = True - end - item - BeginGroup = True - Item = bbFormatShrinkToPageWidth - Visible = True - end - item - BeginGroup = True - Item = cbxPredefinedZoom - Visible = True - end - item - Item = bbZoomWholePage - Visible = True - end - item - BeginGroup = True - Item = bbGoToFirstPage - Visible = True - end - item - Item = bbGoToPrevPage - Visible = True - end - item - BeginGroup = True - Item = seActivePage - Visible = True - end - item - BeginGroup = True - Item = bbGoToNextPage - Visible = True - end - item - Item = bbGoToLastPage - Visible = True - end> - UseOwnFont = False - Left = 91 - Top = 197 - end - object pmPrintStyles: TdxBarPopupMenu - BarManager = dxBarManager - ItemLinks = < - item - Item = bliPrintStyles - Visible = True - end - item - BeginGroup = True - Item = bbDefinePrintStyles - Visible = True - end> - UseOwnFont = False - Left = 119 - Top = 197 - end - object TimerHint: TTimer - Enabled = False - OnTimer = TimerHintTimer - Left = 8 - Top = 246 - end - object pmExplorer: TdxBarPopupMenu - BarManager = dxBarManager - ItemLinks = < - item - Item = bbFileLoad - Visible = True - end - item - Item = bbFileClose - Visible = True - end - item - BeginGroup = True - Item = bbExplorerCreateNewFolder - Visible = True - end - item - BeginGroup = True - Item = bbExplorerDelete - Visible = True - end - item - Item = bbExplorerRename - Visible = True - end - item - BeginGroup = True - Item = bbExplorerProperties - Visible = True - end> - UseOwnFont = False - OnPopup = pmExplorerPopup - Left = 147 - Top = 197 - end - object pmThumbnails: TdxBarPopupMenu - BarManager = dxBarManager - ItemLinks = < - item - Item = bbThumbnailsSmall - Visible = True - end - item - Item = bbThumbnailsLarge - Visible = True - end> - UseOwnFont = False - Left = 175 - Top = 197 - end -end diff --git a/internal/x.46/Lib/D11/dxPSPrVwDsg.dcu b/internal/x.46/Lib/D11/dxPSPrVwDsg.dcu deleted file mode 100644 index a87a459b..00000000 Binary files a/internal/x.46/Lib/D11/dxPSPrVwDsg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSPrVwOpt.dcu b/internal/x.46/Lib/D11/dxPSPrVwOpt.dcu deleted file mode 100644 index 29f493b3..00000000 Binary files a/internal/x.46/Lib/D11/dxPSPrVwOpt.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSPrVwOpt.dfm b/internal/x.46/Lib/D11/dxPSPrVwOpt.dfm deleted file mode 100644 index 1cb0cfaa..00000000 --- a/internal/x.46/Lib/D11/dxPSPrVwOpt.dfm +++ /dev/null @@ -1,177 +0,0 @@ -object dxfmOptions: TdxfmOptions - Left = 310 - Top = 187 - ActiveControl = chbxShowMargins - BorderStyle = bsDialog - Caption = 'Preferences' - ClientHeight = 247 - ClientWidth = 536 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 5 - Top = 4 - Width = 526 - Height = 207 - ActivePage = tshGeneral - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - TabStop = False - object tshGeneral: TTabSheet - Caption = 'General' - object gbxShow: TGroupBox - Left = 6 - Top = 4 - Width = 250 - Height = 104 - Caption = ' &Show ' - TabOrder = 0 - object chbxShowMargins: TCheckBox - Left = 10 - Top = 22 - Width = 230 - Height = 17 - Caption = '&Margins' - TabOrder = 0 - OnClick = FormChanged - end - object chbxShowMarginsHints: TCheckBox - Left = 10 - Top = 49 - Width = 230 - Height = 17 - Caption = 'Margins &hints' - TabOrder = 1 - OnClick = FormChanged - end - object chbxShowMarginsHintsWhileDragging: TCheckBox - Left = 10 - Top = 75 - Width = 230 - Height = 17 - Caption = 'Margins hints while &dragging' - TabOrder = 2 - OnClick = FormChanged - end - end - object gbxMeasurementUnits: TGroupBox - Left = 6 - Top = 109 - Width = 250 - Height = 61 - TabOrder = 2 - object lblMeasurementUnits: TLabel - Left = 8 - Top = 12 - Width = 95 - Height = 13 - Caption = '&Measurement units:' - FocusControl = cbxMeasurementUnits - OnClick = lblMeasurementUnitsClick - end - object cbxMeasurementUnits: TComboBox - Left = 8 - Top = 28 - Width = 232 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 0 - OnChange = FormChanged - Items.Strings = ( - 'Default' - 'Inches' - 'Millimeters') - end - end - object gbxMarginsColor: TGroupBox - Left = 261 - Top = 109 - Width = 250 - Height = 61 - TabOrder = 3 - object lblMarginsColor: TLabel - Left = 8 - Top = 12 - Width = 67 - Height = 13 - Caption = '&Margins color:' - OnClick = lblMarginsColorClick - end - object bvlMarginColorHolder: TBevel - Left = 8 - Top = 28 - Width = 231 - Height = 21 - Visible = False - end - end - object gbxZoomOpt: TGroupBox - Left = 261 - Top = 4 - Width = 250 - Height = 104 - TabOrder = 1 - object lblZoomStep: TLabel - Left = 10 - Top = 54 - Width = 58 - Height = 13 - Caption = 'Zoom &Step :' - OnClick = lblZoomStepClick - end - object bvlZoomStepHolder: TBevel - Left = 103 - Top = 50 - Width = 67 - Height = 21 - Visible = False - end - object chbxZoomOnRoll: TCheckBox - Left = 10 - Top = 22 - Width = 230 - Height = 17 - Caption = '&Zoom on roll with IntelliMouse' - TabOrder = 0 - OnClick = FormChanged - end - end - end - end - object btnOk: TButton - Left = 294 - Top = 218 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 375 - Top = 218 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 456 - Top = 218 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Help' - TabOrder = 3 - end -end diff --git a/internal/x.46/Lib/D11/dxPSPrVwStd.dcu b/internal/x.46/Lib/D11/dxPSPrVwStd.dcu deleted file mode 100644 index 882cdf7e..00000000 Binary files a/internal/x.46/Lib/D11/dxPSPrVwStd.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSPrVwStd.dfm b/internal/x.46/Lib/D11/dxPSPrVwStd.dfm deleted file mode 100644 index 94729782..00000000 --- a/internal/x.46/Lib/D11/dxPSPrVwStd.dfm +++ /dev/null @@ -1,2326 +0,0 @@ -object dxfmStdPreview: TdxfmStdPreview - Left = 260 - Top = 90 - Width = 1004 - Height = 492 - Caption = 'Preview' - Color = clBtnFace - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000FFFFFFFFFF000000FFFFFFF000070000FFF - FFF0788707000FFFFF0788E770000FFFFF08888780000FFFFF08E88780000FFF - FF07EE8770000FFFFFF0788700000FFFFFFF000000000FFFFFFFFFF000000FFF - FFFF000000000FFFFFFF080000000FFFFFFF000000000000000000000000FFFF - 0000000C00000008000000010000000300000003000000030000000300000003 - 000000070000000F0000000F0000000F0000001F0000003F0000007F0000} - KeyPreview = True - Menu = MainMenu1 - OldCreateOrder = True - Position = poDefault - PixelsPerInch = 96 - TextHeight = 13 - object ToolBar: TToolBar - Left = 0 - Top = 0 - Width = 996 - Height = 36 - AutoSize = True - BorderWidth = 2 - ButtonHeight = 24 - ButtonWidth = 28 - EdgeBorders = [ebTop, ebBottom] - Flat = True - Images = ilToolBarSmall - Indent = 4 - ParentShowHint = False - PopupMenu = pmToolBar - ShowHint = True - TabOrder = 0 - Wrapable = False - object tbReportDesigner: TToolButton - Left = 4 - Top = 0 - Hint = 'Ctrl+D' - Caption = 'Design' - ImageIndex = 0 - OnClick = DesignClick - end - object tbFileLoad: TToolButton - Left = 32 - Top = 0 - Hint = 'Ctrl+O' - Caption = 'tbFileLoad' - ImageIndex = 23 - OnClick = FileLoadClick - end - object tbFileUnload: TToolButton - Left = 60 - Top = 0 - Caption = 'tbFileUnload' - ImageIndex = 24 - OnClick = FileCloseClick - end - object tbFileSave: TToolButton - Left = 88 - Top = 0 - Hint = 'Ctrl+S' - Caption = 'tbFileSave' - ImageIndex = 19 - OnClick = FileSaveClick - end - object tbSeparator1: TToolButton - Left = 116 - Top = 0 - Width = 8 - Caption = 'tbSeparator1' - ImageIndex = 0 - Style = tbsSeparator - end - object tbPrint: TToolButton - Left = 124 - Top = 0 - Caption = 'Print' - ImageIndex = 1 - OnClick = PrintClick - end - object tbPrintDialog: TToolButton - Tag = 1 - Left = 152 - Top = 0 - Hint = 'Ctrl+P' - Caption = 'PrintDialog' - ImageIndex = 2 - OnClick = PrintClick - end - object tbPageSetup: TToolButton - Tag = 2 - Left = 180 - Top = 0 - Caption = 'PageSetup' - DropdownMenu = pmPrintStyles - ImageIndex = 3 - Style = tbsDropDown - OnClick = PageSetupClick - end - object tbSeparator3: TToolButton - Left = 221 - Top = 0 - Width = 8 - Caption = 'tbSeparator3' - ImageIndex = 0 - Style = tbsSeparator - end - object tbViewExplorer: TToolButton - Left = 229 - Top = 0 - Caption = 'tbViewExplorer' - ImageIndex = 30 - Style = tbsCheck - OnClick = ViewExplorerClick - end - object tbViewThumbnails: TToolButton - Left = 257 - Top = 0 - Caption = 'tbViewThumbnails' - ImageIndex = 31 - Style = tbsCheck - OnClick = ViewThumbnailsClick - end - object tbSeparator2: TToolButton - Left = 285 - Top = 0 - Width = 8 - Caption = 'tbSeparator2' - ImageIndex = 0 - Style = tbsSeparator - end - object tbShrinkToPageWidth: TToolButton - Left = 293 - Top = 0 - AllowAllUp = True - Caption = 'tbShrinkToPageWidth' - Grouped = True - ImageIndex = 12 - OnClick = ShrinkToPageWidthClick - end - object tbPageBackground: TToolButton - Left = 321 - Top = 0 - Hint = 'Ctrl+K' - Caption = 'PageBackground' - ImageIndex = 4 - OnClick = PageBackgroundClick - end - object ToolButton5: TToolButton - Left = 349 - Top = 0 - Width = 8 - Caption = 'ToolButton5' - ImageIndex = 19 - Style = tbsSeparator - end - object tbPercent100: TToolButton - Left = 357 - Top = 0 - Hint = 'Ctrl+\' - Caption = '100 percent' - ImageIndex = 5 - OnClick = ZoomClick - end - object tbPageWidth: TToolButton - Tag = 1 - Left = 385 - Top = 0 - Hint = 'Ctrl+0' - Caption = 'Page Width' - ImageIndex = 6 - OnClick = ZoomClick - end - object tbOnePage: TToolButton - Tag = 2 - Left = 413 - Top = 0 - Hint = 'Ctrl+1' - Caption = 'Whole Page' - ImageIndex = 7 - OnClick = ZoomClick - end - object tbTwoPage: TToolButton - Tag = 3 - Left = 441 - Top = 0 - Hint = 'Ctrl+2' - Caption = 'Two Pages' - ImageIndex = 8 - OnClick = ZoomClick - end - object tbFourPage: TToolButton - Tag = 4 - Left = 469 - Top = 0 - Hint = 'Ctrl+4' - Caption = 'Four Pages' - ImageIndex = 9 - OnClick = ZoomClick - end - object tbMultiplePages: TToolButton - Left = 497 - Top = 0 - Caption = 'tbMultiplePages' - ImageIndex = 10 - OnClick = tbMultiplePagesClick - end - object tbWidenToSourceWidth: TToolButton - Tag = 5 - Left = 525 - Top = 0 - Hint = 'Ctrl+W' - Caption = 'Source Width' - ImageIndex = 11 - OnClick = ZoomClick - end - object tbSeparator4: TToolButton - Left = 553 - Top = 0 - Width = 8 - Caption = 'tbSeparator4' - ImageIndex = 18 - Style = tbsSeparator - end - object pnlZoomCbx: TPanel - Left = 561 - Top = 0 - Width = 138 - Height = 24 - BevelOuter = bvNone - TabOrder = 0 - OnResize = pnlZoomCbxResize - end - object tbSeparator5: TToolButton - Left = 699 - Top = 0 - Width = 8 - Caption = 'tbSeparator5' - ImageIndex = 19 - Style = tbsSeparator - end - object tbGotoFirstPage: TToolButton - Left = 707 - Top = 0 - Caption = 'First Page' - ImageIndex = 13 - OnClick = GoToPageClick - end - object tbGotoPrevPage: TToolButton - Tag = 1 - Left = 735 - Top = 0 - Caption = 'Prev Page' - ImageIndex = 14 - OnClick = GoToPageClick - end - object ToolButton2: TToolButton - Left = 763 - Top = 0 - Width = 8 - Caption = 'ToolButton2' - ImageIndex = 20 - Style = tbsSeparator - end - object pnlCurrentPage: TPanel - Left = 771 - Top = 0 - Width = 59 - Height = 24 - BevelOuter = bvNone - TabOrder = 1 - OnResize = pnlCurrentPageResize - end - object ToolButton1: TToolButton - Left = 830 - Top = 0 - Width = 8 - Caption = 'ToolButton1' - ImageIndex = 19 - Style = tbsSeparator - end - object tbGotoNextPage: TToolButton - Tag = 2 - Left = 838 - Top = 0 - Caption = 'Next Page' - ImageIndex = 15 - OnClick = GoToPageClick - end - object tbGotoLastPage: TToolButton - Tag = 3 - Left = 866 - Top = 0 - Caption = 'Last Page' - ImageIndex = 16 - OnClick = GoToPageClick - end - object tbSeparator8: TToolButton - Left = 894 - Top = 0 - Width = 8 - Caption = 'tbSeparator8' - ImageIndex = 0 - Style = tbsSeparator - end - object tbHelp: TToolButton - Left = 902 - Top = 0 - Hint = 'F1' - Caption = 'Help' - ImageIndex = 17 - OnClick = HelpClick - end - object tbClose: TToolButton - Left = 930 - Top = 0 - Caption = 'Close' - ImageIndex = 18 - OnClick = CloseClick - end - end - object pmToolBar: TPopupMenu - OnPopup = pmToolBarPopup - Left = 47 - Top = 56 - object pmiFlatBtns: TMenuItem - Caption = '&Flat Buttons' - Checked = True - GroupIndex = 2 - OnClick = pmiFlatBtnsClick - end - object pmiLargeBtns: TMenuItem - Caption = '&Large Buttons' - Checked = True - GroupIndex = 2 - OnClick = pmiLargeBtnsClick - end - end - object MainMenu1: TMainMenu - Left = 19 - Top = 56 - object miFile: TMenuItem - Caption = '&File' - object miFileDesign: TMenuItem - Caption = '&Design...' - ShortCut = 16452 - OnClick = DesignClick - end - object miFileRebuild: TMenuItem - Caption = 'Rebuild' - ShortCut = 16500 - OnClick = miFileRebuildClick - end - object miLine32: TMenuItem - Caption = '-' - end - object miFileLoad: TMenuItem - Caption = 'Load...' - ShortCut = 16463 - OnClick = FileLoadClick - end - object miFileClose: TMenuItem - Caption = 'Unload' - ShortCut = 16499 - OnClick = FileCloseClick - end - object miLine30: TMenuItem - Caption = '-' - end - object miFileSave: TMenuItem - Caption = '&Save...' - ShortCut = 16467 - OnClick = FileSaveClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miFilePrint: TMenuItem - Tag = 1 - Caption = '&Print...' - ShortCut = 16464 - OnClick = PrintClick - end - object miFilePageSetup: TMenuItem - Tag = 2 - Caption = 'Page Set&up...' - OnClick = PageSetupClick - end - object miFilePrintStyles: TMenuItem - Caption = 'Print Styles' - end - object miLine3: TMenuItem - Caption = '-' - end - object miFilePreferences: TMenuItem - Caption = 'Pre&ferences...' - OnClick = OptionsClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miFileExit: TMenuItem - Caption = '&Close' - OnClick = CloseClick - end - end - object miExplorer: TMenuItem - Caption = 'E&xplorer' - object miExplorerCreateNewFolder: TMenuItem - Caption = 'New &Folder' - ShortCut = 32821 - OnClick = ExplorerCreateNewFolderClick - end - object miLine31: TMenuItem - Caption = '-' - end - object miExplorerDelete: TMenuItem - Caption = '&Delete...' - ShortCut = 46 - OnClick = ExplorerDeleteClick - end - object miExplorerRename: TMenuItem - Caption = '&Rename' - ShortCut = 113 - OnClick = ExplorerRenameClick - end - object miLine39: TMenuItem - Caption = '-' - end - object miExplorerProperties: TMenuItem - Caption = 'P&roperties...' - ShortCut = 32889 - OnClick = ExplorerPropertiesClick - end - end - object miEdit: TMenuItem - Caption = '&Edit' - Visible = False - object miEditFind: TMenuItem - Caption = '&Find ...' - ShortCut = 16454 - end - object miEditFindNext: TMenuItem - Caption = 'Find Ne&xt' - ShortCut = 114 - end - object N6: TMenuItem - Caption = '-' - end - object miEditReplace: TMenuItem - Caption = '&Replace ...' - ShortCut = 16466 - end - end - object miView: TMenuItem - Caption = '&View' - object miViewMargins: TMenuItem - Caption = '&Margins' - Checked = True - ShortCut = 16461 - OnClick = miViewMarginsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miViewFlatTBtns: TMenuItem - Caption = '&Flat toolbar buttons' - Checked = True - OnClick = pmiFlatBtnsClick - end - object miViewLargeTBtns: TMenuItem - Caption = '&Large toolbar buttons' - Checked = True - OnClick = pmiLargeBtnsClick - end - object miLine5: TMenuItem - Caption = '-' - end - object miViewToolBar: TMenuItem - Caption = '&Toolbar' - Checked = True - Visible = False - end - object miViewMarginBar: TMenuItem - Caption = '&MarginBar' - Checked = True - OnClick = miViewMarginBarClick - end - object miViewStatusBar: TMenuItem - Caption = '&StatusBar' - Checked = True - OnClick = miViewStatusBarClick - end - object miViewExplorer: TMenuItem - Caption = 'E&xplorer' - ShortCut = 16472 - OnClick = ViewExplorerClick - end - object miViewThumbnails: TMenuItem - Caption = 'Th&umbnails' - ShortCut = 16469 - OnClick = ViewThumbnailsClick - end - object N1: TMenuItem - Caption = '-' - end - object miViewZoom: TMenuItem - Caption = '&Zoom' - object miZoomPercent100: TMenuItem - Caption = '&Percent 100' - ShortCut = 16604 - OnClick = ZoomClick - end - object miLine6: TMenuItem - Caption = '-' - end - object miZoomPageWidth: TMenuItem - Tag = 1 - Caption = 'Page &Width' - ShortCut = 16432 - OnClick = ZoomClick - end - object miZoomWholePage: TMenuItem - Tag = 2 - Caption = 'W&hole Page' - ShortCut = 16433 - OnClick = ZoomClick - end - object miZoomTwoPages: TMenuItem - Tag = 3 - Caption = '&Two Pages' - ShortCut = 16434 - OnClick = ZoomClick - end - object miZoomFourPages: TMenuItem - Tag = 4 - Caption = '&Four Pages ' - ShortCut = 16436 - OnClick = ZoomClick - end - object miLine7: TMenuItem - Caption = '-' - end - object miZoomWidenToSourceWidth: TMenuItem - Tag = 5 - Caption = '&Widen to source width' - ShortCut = 16471 - OnClick = ZoomClick - end - object miLine20: TMenuItem - Caption = '-' - end - object miZoomSetup: TMenuItem - Caption = '&Setup ...' - OnClick = miZoomSetupClick - end - end - object N5: TMenuItem - Caption = '-' - end - object miViewPageHeaders: TMenuItem - Caption = 'Page &Headers' - Checked = True - OnClick = miViewPageHeadersClick - end - object miViewPageFooters: TMenuItem - Caption = '&Page Footers' - Checked = True - OnClick = miViewPageFootersClick - end - end - object miFormat: TMenuItem - Caption = '&Format' - object miFormatAutoText: TMenuItem - Caption = '&AutoText...' - OnClick = miFormatAutoTextClick - end - object miLine14: TMenuItem - Caption = '-' - end - object miFormatTitle: TMenuItem - Caption = 'Title...' - OnClick = miFormatTitleClick - end - object N7: TMenuItem - Caption = '-' - Hint = 'miLine38' - end - object miFormatDateTime: TMenuItem - Caption = 'Date And &Time ...' - OnClick = miFormatDateTimeClick - end - object miFormatPageNumbering: TMenuItem - Caption = 'Page &Numbering ...' - OnClick = miFormatPageNumberingClick - end - object N4: TMenuItem - Caption = '-' - end - object miFormatShowHideEmptyPages: TMenuItem - Caption = 'Show/Hide Empty Pages' - Checked = True - OnClick = miFormatShowHideEmptyPagesClick - end - object miFormatShrinkToPageWidth: TMenuItem - Caption = '&Shrink To Page' - Checked = True - OnClick = ShrinkToPageWidthClick - end - object miLine13: TMenuItem - Caption = '-' - end - object miFormatPageBackground: TMenuItem - Caption = 'Page bac&kground ...' - ShortCut = 16459 - OnClick = PageBackgroundClick - end - end - object miGoToPage: TMenuItem - Caption = '&Go' - object miGoToFirstPage: TMenuItem - Caption = '&First Page' - ShortCut = 36 - OnClick = GoToPageClick - end - object miGoToPrevPage: TMenuItem - Tag = 1 - Caption = '&Previous Page' - ShortCut = 33 - OnClick = GoToPageClick - end - object miLine8: TMenuItem - Caption = '-' - end - object miGoToNextPage: TMenuItem - Tag = 2 - Caption = '&Next Page' - ShortCut = 34 - OnClick = GoToPageClick - end - object miGoToLastPage: TMenuItem - Tag = 3 - Caption = '&Last Page' - ShortCut = 35 - OnClick = GoToPageClick - end - end - object miHelp: TMenuItem - Caption = '&Help' - object miHelpTopics: TMenuItem - Caption = '&Help Topics ...' - OnClick = HelpClick - end - object N3: TMenuItem - Caption = '-' - Visible = False - end - object miHelpAbout: TMenuItem - Caption = '&About ..' - Visible = False - end - end - end - object pmPreview: TPopupMenu - OnPopup = pmPreviewPopup - Left = 75 - Top = 56 - object pmiReportDesign: TMenuItem - Caption = '&Design ...' - Default = True - ShortCut = 16452 - OnClick = DesignClick - end - object miLine11: TMenuItem - Caption = '-' - end - object pmiPageSetup: TMenuItem - Caption = 'Page Set&up ...' - OnClick = PageSetupClick - end - object pmiFilePrintStyles: TMenuItem - Caption = 'Print Styles' - end - object pmiReportShrinkToPageWidth: TMenuItem - Caption = '&Shrink To Page' - Checked = True - OnClick = ShrinkToPageWidthClick - end - object miLine10: TMenuItem - Caption = '-' - end - object pmiZoom: TMenuItem - Caption = '&Zoom ' - object pmiZoomPercent100: TMenuItem - Caption = '&Percent 100' - ShortCut = 16604 - OnClick = ZoomClick - end - object miLine12: TMenuItem - Caption = '-' - end - object pmiZoomPageWidth: TMenuItem - Tag = 1 - Caption = 'Page &Width' - ShortCut = 16432 - OnClick = ZoomClick - end - object pmiZoomWholePage: TMenuItem - Tag = 2 - Caption = 'W&hole Page' - ShortCut = 16433 - OnClick = ZoomClick - end - object pmiZoomTwoPages: TMenuItem - Tag = 3 - Caption = '&Two Pages' - ShortCut = 16434 - OnClick = ZoomClick - end - object pmiZoomFourPages: TMenuItem - Tag = 4 - Caption = '&Four Pages' - ShortCut = 16436 - OnClick = ZoomClick - end - object miLine9: TMenuItem - Caption = '-' - end - object pmiZoomWidenToSourceWidth: TMenuItem - Tag = 5 - Caption = 'Widen to &source width' - ShortCut = 16471 - OnClick = ZoomClick - end - end - object N2: TMenuItem - Caption = '-' - end - object pmiGoToFirstPage: TMenuItem - Caption = 'First Page' - ShortCut = 36 - OnClick = GoToPageClick - end - object pmiGoToPrevPage: TMenuItem - Tag = 1 - Caption = 'Previous Page' - ShortCut = 33 - OnClick = GoToPageClick - end - object pmiGoToNextPage: TMenuItem - Tag = 2 - Caption = 'Next Page' - ShortCut = 34 - OnClick = GoToPageClick - end - object pmiGoToLastPage: TMenuItem - Tag = 3 - Caption = 'Last Page' - ShortCut = 35 - OnClick = GoToPageClick - end - end - object ilToolBarSmall: TImageList - AllocBy = 29 - Left = 47 - Top = 107 - Bitmap = { - 494C010120002200040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000009000000001002000000000000090 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FFFF000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FFFF00008000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 00000000000000000000000000000000000000FFFF00FFFFFF0000000000FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000008080800000808000008080000080 - 8000008080000080800000808000008080000080800000808000FF000000FFFF - 0000800000000080800000808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 000000000000000000000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00C0C0 - C000FFFFFF00C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00FF000000FFFF00008000 - 000000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF008000 - 0000FFFFFF0080000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF00C0C0C000000000000000000000000000C0C0C0008000000000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF00800000008000 - 000080000000800000008000000080000000FFFFFF00FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF00C0C0C00000000000FFFF0000C0C0C000FFFF000000000000C0C0C00000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF000000000080808000000000008000000080000000800000008000 - 0000800000008000000000000000FFFFFF0000FFFF00FFFFFF0000000000FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080000000FFFFFF0080000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000FFFF0000C0C0C000FFFF0000C0C0C000FFFF00000000000000FF - FF0000FFFF0000FFFF0000808000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000808080000000000080000000FFFFFF00C0C0C000FFFF - FF00C0C0C000FFFFFF000000000000FFFF00FFFFFF0000FFFF000000000000FF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF008000 - 00008000000080000000800000008000000080000000FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000C0C0C000FFFF0000C0C0C000FFFF0000C0C0C0000000000000FF - FF0000FFFF0000FFFF0000808000000000000000000000000000808080000000 - 0000000000000000000080808000000000000000000000000000808080000000 - 00000000000000000000808080000000000080000000C0C0C000FFFFFF000000 - 8000FFFFFF0000008000000080000000000000FFFF00FFFFFF0000000000FFFF - FF0000FFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080000000FFFFFF0080000000FFFFFF00FFFFFF00000000000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF0000000000FFFF0000C0C0C000FFFF0000C0C0C000FFFF00000000000000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF0000000000808080000000000080000000FFFFFF00C0C0C0000000 - 8000C0C0C00000008000C0C0C000FFFFFF000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF0000000000C0C0C0000000 - 00000000000000000000000000000000000080808000FFFFFF0000FFFF0000FF - FF00C0C0C00000000000FFFF0000C0C0C000FFFF000000000000C0C0C00000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF0000000000808080000000000080000000C0C0C000000080000000 - 8000FFFFFF00C0C0C00000008000C0C0C0008000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000FFFFFF0000000000C0C0C00000000000C0C0 - C0000000000000000000000000008000000080808000FFFFFF0000FFFF0000FF - FF0000FFFF00C0C0C000000000000000000000000000C0C0C00000FFFF0000FF - FF0000FFFF0000FFFF000080800000000000000000000000000080808000FFFF - FF00FFFFFF000000000080808000FFFFFF00FFFFFF000000000080808000FFFF - FF00FFFFFF0000000000808080000000000080000000FFFFFF00C0C0C0000000 - 8000C0C0C0000000800000008000FFFFFF008000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000C0C0C00000000000C0C0C00000000000C0C0C0000000 - 0000C0C0C000C0C0C000000000008000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000808000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000808080000000000080000000C0C0C000FFFFFF00C0C0 - C000FFFFFF00C0C0C000FFFFFF00C0C0C0008000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000FFFFFF00FFFFFF0000000000C0C0C00000000000C0C0C00000000000C0C0 - C000C0C0C000C0C0C000C0C0C000800000008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008000000080000000800000008000 - 0000800000008000000080000000800000008000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF0000000000C0C0C00000000000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C00080000000000000008080800000FFFF000000 - 0000FFFFFF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000FFFF - FF00000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF0000000000000000FFFF000000000080000000FF00000080000000FF00 - 0000FF000000FF00000080000000FF0000008000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C00000000000800000000000000000000000808080000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008000000080000000800000008000 - 0000800000008000000080000000800000008000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000800000000000000000000000000000000000 - 0000FFFFFF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000FFFF - FF00808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0080000000800000008000000080000000800000008000 - 0000FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFFFF00FFFF - FF0080000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF0080000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000FFFFFF00FFFFFF00C0C0C000FFFFFF00C0C0C000FFFFFF00C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF0080000000FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000FFFFFF0000000000808080000000000000000000FFFFFF00000000000000 - 0000FFFFFF00FFFFFF00FFFFFF0000000000C0C0C00000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 800000808000000000000000000000000000000000000000000000000000FFFF - FF0080000000FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000808080000000000000000000FFFFFF0000000000C0C0 - C00000000000FFFFFF0000000000C0C0C00000000000C0C0C000000000000000 - 0000000000000000000080000000800000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000808080000000000000000000000000000000000000000000FFFF - FF00FFFFFF00800000008000000080000000800000008000000080000000FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000 - FF00FFFFFF0000000000808080000000000000000000FFFFFF00FFFFFF000000 - 0000C0C0C00000000000C0C0C00000000000C0C0C00000000000C0C0C000C0C0 - C000C0C0C000000000008000000080000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 000000000000000000000000000080000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008000000080000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000000000000000000000000000000000000FFFF - FF000000FF000000000000000000000000000000000000000000000000000000 - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 000000000000C0C0C00000000000C0C0C00000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C00080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000080000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080000000FFFFFF00FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000 - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 00000000000000000000C0C0C00000000000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C00080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000080000000000000008000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000080808000000000000000000000000000000000000000 - 0000000000000000000000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C0000000000080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000080000000800000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080000000800000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000800000008000000080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00000000000000000000000000000000000000000000000000FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 80000080800000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF008080800000FFFF00FFFFFF0000FFFF008080 - 800000FFFF0000FFFF0000FFFF00808080000000000000FFFF00FFFFFF000000 - 000000000000000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF008080800000FFFF0000FFFF008080 - 800000FFFF00FFFFFF008080800000FFFF0000000000FFFFFF0000FFFF00FFFF - FF00000000000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF008080800000FFFF008080 - 8000FFFFFF008080800000FFFF00000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF0080808000808080008080800080808000FFFF - FF008080800080808000808080008080800000000000FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF - FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000FFFF008080800000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF0000000000000000008080800000FFFF008080 - 800000FFFF008080800000FFFF0000000000000000000000000000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080800000FFFF00000000008080 - 8000FFFFFF00000000008080800000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000008080800000FFFF0000000000000000008080 - 8000808080000000000000000000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 840084848400848484008484840084848400848484000000000000FFFF000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000848484008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 8400848484008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000000000000000000000000000FFFF - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF008400000084000000FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000FFFF00008484840000000000FFFF - 0000FFFF00000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400000000000000000000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 80000080800000808000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000FFFF - 0000FFFF0000FFFF000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF008400000084848400FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 00000080800000808000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF008484840084000000C6C6C600FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0084848400000000000000 - 0000000000008484840084848400848484000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000808000000000000000000000000000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000FFFF - 0000FFFF0000FFFF000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF0084848400840000008484840000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000FFFF00008484840000000000FFFF - 0000FFFF00000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF008400000084848400FFFFFF00FFFFFF008400000084000000FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 840084848400848484000000000000FFFF0000FFFF0084848400000000000000 - 0000000000008484840084848400848484000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFF0000000000000000000000000000FFFF - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00840000008400000000FFFF00C6C6C600840000008400000000FF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 8400848484000000000000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00C6C6C60084000000840000008400000084000000C6C6C600FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000008484 - 84000000000000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C0C0C00000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFF0000000000000000000000000000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - 0000FFFF00000000000084848400FFFF0000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000FFFF00000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600FF000000FF000000FF00000000000000FFFFFF00FF000000FF000000FF00 - 0000FFFFFF000000000000000000000000000000000000000000FFFF0000FFFF - 0000FFFF000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFF0000FFFF0000FFFF - 000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000008484000000000000C6C6 - C600FF000000FF000000FF000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFF0000FFFF - 0000FFFF000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000FFFF0000000000000000000000000000000000000000000000000000FFFF - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C6000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000FFFF00000000000084848400FFFF0000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000FFFF00000000 - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600FF000000FF000000FF000000C6C6C6000000000000000000000000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000FFFF0000000000000000000000000000FFFF000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFF0000000000000000 - 000000000000000000000000000000000000000000008484000000000000C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C6000000000000000000000000000000 - 0000000000008400000084000000840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000848400008484 - 0000848400008484000000000000000000000000000000000000840000000000 - 0000000000000000000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 0000000000000000000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 84008484000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 00008484840084840000848484000000000000000000FFFFFF00FFFFFF000000 - 000000000000FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF0000000000FFFFFF00FFFFFF0000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000000000000000 - 000000000000FFFFFF0000000000848400008484840000000000000000000000 - 0000FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000008484840000000000000000000000000084840000000000000000 - 00000000000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00FFFFFF00FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00000000008484000000000000FFFFFF00000000008484840000000000FFFF - FF000000000084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400000000000000 - 000000000000FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000000000000000 - 0000000000000000000000000000848400008484840000000000000000000000 - 000000000000000000008484840000000000000000008484840000000000FFFF - FF00000000008484840000000000FFFFFF00000000008484000000000000FFFF - FF000000000084848400848400000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000000000000000 - 0000FFFFFF000000000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 8400848400008484840084840000000000000000000084840000000000000000 - 0000000000008484000000000000000000000000000084840000000000000000 - 00000000000084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000000000000000008484840000000000FFFF - FF00000000000000000000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 84008484000084848400848400000000000000000000FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF0000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF000000 - 0000FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 0000000000000000000084840000000000000000000084840000000000000000 - 0000000000008484000000000000000000000000000084840000000000000000 - 0000000000008484000084848400000000008484840000000000FF000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FF0000000000000084848400000000008484840000000000FFFF - FF0000000000FFFFFF0000000000848484008484000000000000FFFFFF00FFFF - FF00FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF00000000008484840000000000000000008484840000000000FFFF - FF00000000008484840000000000FFFFFF00000000008484840000000000FFFF - FF000000000084848400848400000000000000000000FF000000FF0000000000 - 0000FFFFFF00FF000000000000000000000000000000FFFFFF00FF000000FFFF - FF0000000000FF000000FF00000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF000000000084848400000000000000000084848400000000000000 - 000000000000FFFFFF0000000000848484008484000000000000000000000000 - 0000FFFFFF00000000008484000000000000000000008484000000000000FFFF - FF00000000008484000000000000FFFFFF00000000008484000000000000FFFF - FF00000000008484000084848400000000008484840000000000FF000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FF00000000000000848484000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 000000000000000000008484000000000000000000008484000000000000FFFF - FF00FFFFFF00FFFFFF0000000000848400008484840000000000FFFFFF00FFFF - FF00FFFFFF000000000084848400000000000000000084848400000000000000 - 0000000000008484840000000000000000000000000084848400000000000000 - 00000000000084848400848400000000000000000000FFFFFF0000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000084848400000000000000 - 0000000000000000000000000000848484008484000000000000000000000000 - 0000000000000000000084840000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 00008484840084840000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 0000848484008484000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400848400008484 - 8400848400008484840084840000848484008484000084848400848400008484 - 840084840000848484008484000000000000000000000000000084848400FFFF - FF000000000000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000848484008484000084848400000000000000000000000000848484000000 - 00008484840000000000FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484840084840000000000000000000000000000000000008484 - 8400848484008484840000000000FFFFFF00FFFFFF0000FFFF0084848400FFFF - FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000C6C6C600C6C6 - C600C6C6C600848484008484840000000000FFFFFF00FFFFFF00840000008484 - 8400FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF00840000008400000084000000840000008400000084000000FFFF - FF000000000084848400848400000000000000000000FFFFFF00C6C6C600C6C6 - C600C6C6C600C6C6C60084848400848484000000000000FFFF00840000008400 - 0000FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0000000000848400008484840000000000C6C6C600FFFFFF00FFFFFF00C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084000000840000008400 - 0000FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF0000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000FFFFFF0084000000840000008400000084000000FFFFFF00FFFFFF00FFFF - FF000000000084848400848400000000000000000000C6C6C600FFFFFF00FFFF - FF00C6C6C60000000000C6C6C600C6C6C6008484840084000000840000008400 - 0000FFFFFF0000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000000000FF00 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FF00000000000000FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000C6C6C600FFFF - FF00000000008400000000000000C6C6C6008400000084000000840000008484 - 8400FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000FF000000FF00 - 000000000000FFFFFF0000000000FF000000FF00000000000000FFFFFF000000 - 0000FF000000FF00000000000000000000000000000084848400848400000000 - 0000FFFFFF00840000008400000084000000840000008400000084000000FFFF - FF0000000000848484008484000000000000000000000000000000000000C6C6 - C600FFFFFF0084000000C6C6C60084848400840000008400000084848400FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000000000FF00 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FF00000000000000FFFFFF00000000000000000084840000848484000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000008484000084848400000000000000000000000000840000000000 - 0000C6C6C60084000000848484000000000084848400FFFFFF00FFFFFF000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF0000000000FFFFFF00FFFFFF00000000000000000084848400848400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000848484008484000000000000000000000000000084000000C6C6 - C60000000000840000000000000084848400FFFFFF0000FFFF00FFFFFF008484 - 8400C6C6C60000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848484008484 - 0000848484008484000084848400848400008484840084840000848484008484 - 000084848400848400008484840000000000000000000000000084000000C6C6 - C600C6C6C600840000008484840000FFFF00FFFFFF00FFFFFF00FFFFFF008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008400 - 0000840000008484840084848400848484008484840084848400848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400000000008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000008484840000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484000000 - 00000000000000000000C6C6C600C6C6C600C6C6C60000000000000000000000 - 0000000000000000000084848400000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C60000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C60000000000000000000000000000000000000000000000 - 000000000000FFFFFF008484840000000000FFFFFF0000000000000000000000 - 000000000000000000000000000000000000000000008484840000000000C6C6 - C600848484000000000000000000C6C6C600C6C6C6000000000084848400C6C6 - C6000000000000000000848484000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C60000FFFF0000FFFF0000FFFF00C6C6C600C6C6 - C6000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C60000FFFF0000FFFF0000FFFF00C6C6C600C6C6 - C600000000000000000000000000000000000000000084848400FFFFFF00FFFF - FF00FFFFFF00848484008484840000000000FFFFFF00FFFFFF00848484008484 - 840084848400848484000000000000000000000000000000000084848400C6C6 - C60084848400C6C6C600C6C6C6008484840000000000C6C6C600848484008484 - 84008484840084848400000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400C6C6C600C6C6 - C60000000000C6C6C600000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400C6C6C600C6C6 - C60000000000C6C6C60000000000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000000000000000000000000000000000 - 0000C6C6C600C6C6C60000000000FFFFFF00FFFFFF0000000000C6C6C6000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C600C6C6C600000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000C6C6C6000000 - 0000C6C6C60000000000C6C6C600C6C6C600C6C6C600FFFFFF00848484000000 - 0000C6C6C600C6C6C600000000008484840000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C60000000000C6C6C6000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C60000000000C6C6C600000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000C6C6C600C6C6 - C600FFFFFF00000000008484840000000000C6C6C600FFFFFF0084848400C6C6 - C600C6C6C600C6C6C60000000000848484000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C60000000000C6C6C60000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C60000000000C6C6C60000000000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000008484840000000000000000000000 - 0000FFFFFF00000000008484840084848400C6C6C60000000000C6C6C6000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C6C6C60000000000C6C6C60000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C6C6C60000000000C6C6C600848484000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000000000000000000000000000000000 - 0000C6C6C600FFFFFF00000000000000000000000000C6C6C600C6C6C6000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00848484000000000000000000000000000000000084848400C6C6 - C60084848400C6C6C600FFFFFF00FFFFFF00C6C6C600C6C6C600848484008484 - 8400848484000000000084848400000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000084848400FFFFFF008484 - 840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00848484000000000000000000000000008484840000000000C6C6 - C600848484000000000000000000C6C6C6000000000000000000C6C6C600C6C6 - C600000000008484840000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000FFFF00008484 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000000000000000000000000000000000000000000084848400FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000848484000000 - 00008484840000000000C6C6C600C6C6C600C6C6C60000000000848484000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00848484008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000900000000100010000000000800400000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFF18000FF07000F80008000 - FE03000F00008000FC01000F00008000FC01000F000080008001000F00008000 - 0001000F000080000001000F000080000003000F000080000007000F00008000 - 003F000200008000003F000000008000003F800000018000003FC00080078000 - 003FE000C0078000007FFF82E007FFFFFFFFC001E001FFFFFFFFC001C001000F - 8003C001C001000F8003C001C001000F8003C001C001000F8003C001C001000F - 8003C001C001000F8003C001C001000F8003C001C001000F8003C001C0010004 - 8003C001C0010000C1FEC001C0010000E3FEC001C001F800FFF5C003C001FC00 - FFF3C007C003FE04FFF1C00FFFFFFFFFFFFFFFFFFFFFFFFF00010001FFFFFFFF - 00010001FFF9001F00010001E7FF000F00010001C3F3000700010001C3E70003 - 00010001E1C7000100000001F08F000000000001F81F001F00010001FC3F001F - 00000001F81F001F00000003F09F8FF1808180FFC1C7FFF9C124C1FF83E3FF75 - FE66FFFF8FF1FF8FFFE7FFFFFFFFFFFFFFFFFFEFFDFFFFFFFFFFFFCFF9FFC001 - FFFFE007F1FF8031FDDFC003E1FF8031FCCF800300078031FC478003C03F8001 - 00038003C037800100018003C027800100008003C0008FF100018003C0008FF1 - 00038003C0008FF1FC478003C0278FF1FCCF8003C0378FF1FDDF8003C03F8FF1 - FFFF8003C03F8001FFFFC007FFFFFFFFFFFFFFFFFFFFFFFFFE03FFFFFFFFFFFF - FE03FFFFFFFFFFFFFE03FBBFFEFFFF7FFE03F33FFCFFFF3FC003E23FF8FFFF1F - C003C000F003C00F00038000E003C00700030000C003C00300038000E003C007 - 007FC000F003C00F007DE23FF8FFFF1F0078F33FFCFFFF3F007DFBBFFEFFFF7F - 01DDFFFFFFFFFFFF01E3FFFFFFFFFFFFFFFF8001FFFFFFFF8001000080018081 - 0000000000000080000000000000008000000000000000800000000000000100 - 0000000000000100000000000000018000000000000000800000000000000000 - 0000000000000100000000000000018000000000000000800000000000000080 - 8001000080018081FFFF8001FFFFFFFFFFFFFFFFFFFFFFFFC001800180018001 - C001000000000000C001000000000000C001000000000000C001000000000000 - 8001000000000000000100000000000000010000000000000001000000000000 - 8001000000000000C001000000000000C001000000000000C003000000000000 - C007800180018001C00FFFFFFFFFFFFFFC7FFFFFFFFFFFFFFC27C007C007FFFF - EC2380038003F83FC4010001000100018001000100010001C003000100010001 - E000000000000001000000000000000100008000800000010003C000C0000001 - E001E001E0000001C001E007800000018003F00780070101C407F00380008383 - EC3FF803F000FFFFFC7FFFFFF800FFFF00000000000000000000000000000000 - 000000000000} - end - object ilStub: TImageList - AllocBy = 2 - Left = 19 - Top = 107 - Bitmap = { - 494C010102000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400000000000000000000000000000000008484 - 84000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000084848400FFFF0000FFFF00000000000000000000000000000000 - 00008484840000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 84000000000000000000FFFF0000000000000000000000000000000000000000 - 00000000000000000000848484000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFF000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF00000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFF000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000C6C6C600FFFFFF00C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFF000000000000000000000000000000000000FFFFFF00FFFFFF00C6C6 - C600000000000000000000000000C6C6C600FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 840000000000000000000000000000000000000000000000000000000000FFFF - 0000FFFF000000000000848484000000000000000000FFFFFF00FFFFFF00FFFF - FF00848484008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000084848400000000000000000000000000FFFF0000FFFF0000FFFF - 00008484840000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFF8000000000003FFF000000000000 - 1FFF0000000000008FFF000000000000C40F000000000000E1E7000000000000 - F0F3000000000000E5F9000000000000EBFD000000000000EFFD000000000000 - EFF5000000000000EFF5000000000000E7E1000000000000F383000000000000 - F9E7000000000000FC0F00010000000000000000000000000000000000000000 - 000000000000} - end - object pmPrintStyles: TPopupMenu - OnPopup = pmPrintStylesPopup - Left = 103 - Top = 56 - end - object pmDesigners: TPopupMenu - Left = 131 - Top = 56 - end - object Timer1: TTimer - Enabled = False - OnTimer = Timer1Timer - Left = 19 - Top = 159 - end - object pmExplorer: TPopupMenu - OnPopup = pmExplorerPopup - Left = 159 - Top = 56 - object pmiExplorerLoadData: TMenuItem - Caption = 'Load' - Default = True - ShortCut = 16397 - OnClick = FileLoadClick - end - object pmiExplorerUnloadData: TMenuItem - Caption = 'Unload' - ShortCut = 16499 - OnClick = FileCloseClick - end - object miLine33: TMenuItem - Caption = '-' - end - object pmiExplorerCreateFolder: TMenuItem - Caption = 'New Folder' - ShortCut = 32821 - OnClick = ExplorerCreateNewFolderClick - end - object miLine34: TMenuItem - Caption = '-' - end - object pmiExplorerDelete: TMenuItem - Caption = '&Delete...' - ShortCut = 46 - OnClick = ExplorerDeleteClick - end - object pmiExplorerRename: TMenuItem - Caption = '&Rename' - ShortCut = 113 - OnClick = ExplorerRenameClick - end - object miLine40: TMenuItem - Caption = '-' - end - object pmiExplorerProperties: TMenuItem - Caption = '&Properties...' - ShortCut = 32781 - OnClick = ExplorerPropertiesClick - end - end - object pmThumbnails: TPopupMenu - OnPopup = pmThumbnailsPopup - Left = 187 - Top = 56 - object pmiSmallThumbnails: TMenuItem - Caption = '&Small Thumbnails' - Checked = True - GroupIndex = 1 - RadioItem = True - OnClick = pmiThumbnailsSizeClick - end - object pmiLargeThumbnails: TMenuItem - Tag = 1 - Caption = '&Large Thumbnails' - GroupIndex = 1 - RadioItem = True - OnClick = pmiThumbnailsSizeClick - end - end -end diff --git a/internal/x.46/Lib/D11/dxPSPrvw.dcu b/internal/x.46/Lib/D11/dxPSPrvw.dcu deleted file mode 100644 index 968da299..00000000 Binary files a/internal/x.46/Lib/D11/dxPSPrvw.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSRELnk.dcu b/internal/x.46/Lib/D11/dxPSRELnk.dcu deleted file mode 100644 index 65f67d43..00000000 Binary files a/internal/x.46/Lib/D11/dxPSRELnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSReg.dcu b/internal/x.46/Lib/D11/dxPSReg.dcu deleted file mode 100644 index 9d53ad3f..00000000 Binary files a/internal/x.46/Lib/D11/dxPSReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSRes.dcu b/internal/x.46/Lib/D11/dxPSRes.dcu deleted file mode 100644 index 6bdc7f89..00000000 Binary files a/internal/x.46/Lib/D11/dxPSRes.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSShapes.dcu b/internal/x.46/Lib/D11/dxPSShapes.dcu deleted file mode 100644 index 289ffaa7..00000000 Binary files a/internal/x.46/Lib/D11/dxPSShapes.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSSngltn.dcu b/internal/x.46/Lib/D11/dxPSSngltn.dcu deleted file mode 100644 index a115e924..00000000 Binary files a/internal/x.46/Lib/D11/dxPSSngltn.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSStandardFillPatterns.dcu b/internal/x.46/Lib/D11/dxPSStandardFillPatterns.dcu deleted file mode 100644 index d57099e5..00000000 Binary files a/internal/x.46/Lib/D11/dxPSStandardFillPatterns.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSStdGrLnk.dcu b/internal/x.46/Lib/D11/dxPSStdGrLnk.dcu deleted file mode 100644 index b7a5ab76..00000000 Binary files a/internal/x.46/Lib/D11/dxPSStdGrLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSStdGrLnk.dfm b/internal/x.46/Lib/D11/dxPSStdGrLnk.dfm deleted file mode 100644 index 066eb4f5..00000000 --- a/internal/x.46/Lib/D11/dxPSStdGrLnk.dfm +++ /dev/null @@ -1,672 +0,0 @@ -object dxGridReportLinkDesignWindow: TdxGridReportLinkDesignWindow - Left = 346 - Top = 298 - BorderStyle = bsDialog - Caption = 'dxGridReportLinkDesigner' - ClientHeight = 314 - ClientWidth = 579 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 6 - Width = 571 - Height = 273 - ActivePage = tshColor - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 563 - Height = 245 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 5 - Top = 13 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 40 - Top = 18 - Width = 210 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 6 - Top = 32 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblOnEveryPage: TLabel - Left = 8 - Top = 151 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object Image1: TImage - Left = 10 - Top = 172 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel10: TBevel - Left = 88 - Top = 156 - Width = 162 - Height = 4 - Shape = bsBottomLine - end - object chbxShowVertLines: TCheckBox - Tag = 2 - Left = 90 - Top = 75 - Width = 161 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 2 - OnClick = chbxShowBordersClick - end - object chbxShowFixedHorzLines: TCheckBox - Tag = 3 - Left = 90 - Top = 98 - Width = 161 - Height = 17 - Caption = 'Fixed &Horizontal Lines' - TabOrder = 3 - OnClick = chbxShowBordersClick - end - object chbxShowFixedVertLines: TCheckBox - Tag = 4 - Left = 90 - Top = 121 - Width = 161 - Height = 17 - Caption = 'Fixed &Vertical Lines' - TabOrder = 4 - OnClick = chbxShowBordersClick - end - object chbxShowBorders: TCheckBox - Left = 90 - Top = 30 - Width = 161 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxShowBordersClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 90 - Top = 52 - Width = 161 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxShowBordersClick - end - object chbxFixedRowsOnEveryPage: TCheckBox - Left = 91 - Top = 173 - Width = 161 - Height = 17 - Caption = 'Fi&xed Rows' - TabOrder = 5 - OnClick = chbxFixedRowsOnEveryPageClick - end - object lblPreview: TStaticText - Left = 264 - Top = 2 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 6 - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 563 - Height = 245 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 6 - Top = 218 - Width = 79 - Height = 13 - Caption = '&Grid lines color : ' - OnClick = lblColorClick - end - object bvlLineColorHolder: TBevel - Left = 91 - Top = 214 - Width = 146 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 5 - Top = 21 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - OnClick = lblColorClick - end - object gbxFixedTransparent: TGroupBox - Left = 5 - Top = 144 - Width = 243 - Height = 58 - Caption = ' ' - TabOrder = 4 - object lblFixedColor: TLabel - Left = 6 - Top = 24 - Width = 62 - Height = 13 - Caption = 'F&ixed color : ' - OnClick = lblColorClick - end - object bvlFixedColorHolder: TBevel - Left = 86 - Top = 22 - Width = 146 - Height = 21 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 52 - Width = 243 - Height = 84 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 6 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblColorClick - end - object bvlColorHolder: TBevel - Left = 86 - Top = 20 - Width = 146 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 6 - Top = 51 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - OnClick = lblColorClick - end - object bvlEvenColorHolder: TBevel - Left = 86 - Top = 47 - Width = 146 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 50 - Width = 15 - Height = 17 - Caption = 'T&ransparent' - TabOrder = 1 - OnClick = chbxTransparentClick - end - object chbxFixedTransparent: TCheckBox - Tag = 1 - Left = 18 - Top = 142 - Width = 15 - Height = 17 - Caption = 'Fixed T&ransparent' - TabOrder = 3 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 69 - Top = 16 - Width = 179 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 51 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stFixedTransparent: TStaticText - Left = 33 - Top = 143 - Width = 105 - Height = 17 - Caption = ' Fixed T&ransparent ' - FocusControl = chbxFixedTransparent - TabOrder = 6 - OnClick = stFixedTransparentClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 563 - Height = 245 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 38 - Width = 239 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnFixedFont: TButton - Tag = 2 - Left = 8 - Top = 133 - Width = 110 - Height = 23 - Caption = 'Fi&xed Font ...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 4 - OnClick = btnFontClick - end - object edFixedFont: TEdit - Left = 8 - Top = 162 - Width = 239 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 5 - end - object btnEvenFont: TButton - Tag = 1 - Left = 7 - Top = 71 - Width = 110 - Height = 23 - Caption = 'E&ven Font ...' - TabOrder = 2 - OnClick = btnFontClick - end - object edEvenFont: TEdit - Left = 8 - Top = 100 - Width = 239 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 563 - Height = 245 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Image3: TImage - Left = 7 - Top = 34 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblSelection: TLabel - Left = 5 - Top = 13 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object Bevel3: TBevel - Left = 55 - Top = 18 - Width = 195 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 85 - Width = 67 - Height = 13 - Caption = 'Look And Feel' - end - object Bevel15: TBevel - Left = 84 - Top = 89 - Width = 166 - Height = 4 - Shape = bsBottomLine - end - object Image8: TImage - Left = 7 - Top = 106 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlMiscellaneous: TBevel - Left = 81 - Top = 160 - Width = 169 - Height = 3 - Shape = bsBottomLine - end - object lblMiscellaneous: TLabel - Left = 5 - Top = 154 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object imgMiscellaneous: TImage - Left = 7 - Top = 177 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxIncludeFixed: TCheckBox - Left = 90 - Top = 52 - Width = 161 - Height = 17 - Caption = '&Including fixed cells' - TabOrder = 1 - OnClick = chbxIncludeFixedClick - end - object chbxOnlySelected: TCheckBox - Left = 90 - Top = 30 - Width = 161 - Height = 17 - Caption = 'Only &selected cells' - TabOrder = 0 - OnClick = chbxOnlySelectedClick - end - object chbxUse3DEffects: TCheckBox - Tag = 12 - Left = 91 - Top = 100 - Width = 161 - Height = 17 - Caption = '&Use 3D Effects' - TabOrder = 2 - OnClick = chbxUse3DEffectsClick - end - object chbxUseSoft3D: TCheckBox - Tag = 13 - Left = 91 - Top = 122 - Width = 161 - Height = 17 - Caption = 'Soft &3D' - TabOrder = 3 - OnClick = chbxUseSoft3DClick - end - object chbxRowAutoHeight: TCheckBox - Left = 90 - Top = 200 - Width = 161 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 5 - OnClick = chbxRowAutoHeightClick - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 178 - Width = 161 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 4 - OnClick = chbxAutoWidthClick - end - end - end - end - object pnlPreview: TPanel - Left = 272 - Top = 50 - Width = 294 - Height = 215 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 1 - end -end diff --git a/internal/x.46/Lib/D11/dxPSTCLnk.dcu b/internal/x.46/Lib/D11/dxPSTCLnk.dcu deleted file mode 100644 index 9d93dc1b..00000000 Binary files a/internal/x.46/Lib/D11/dxPSTCLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSTCLnkReg.dcu b/internal/x.46/Lib/D11/dxPSTCLnkReg.dcu deleted file mode 100644 index 8b16e634..00000000 Binary files a/internal/x.46/Lib/D11/dxPSTCLnkReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSTVLnk.dcu b/internal/x.46/Lib/D11/dxPSTVLnk.dcu deleted file mode 100644 index cb52179f..00000000 Binary files a/internal/x.46/Lib/D11/dxPSTVLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSTVLnk.dfm b/internal/x.46/Lib/D11/dxPSTVLnk.dfm deleted file mode 100644 index 02a7167b..00000000 --- a/internal/x.46/Lib/D11/dxPSTVLnk.dfm +++ /dev/null @@ -1,926 +0,0 @@ -object dxfmTVReportLinkDesignWindow: TdxfmTVReportLinkDesignWindow - Left = 370 - Top = 405 - ActiveControl = chbxTransparent - BorderStyle = bsDialog - Caption = 'dxfmTVReportLinkDesignWindow' - ClientHeight = 279 - ClientWidth = 582 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 574 - Height = 240 - ActivePage = tshColors - Anchors = [akLeft, akTop, akRight, akBottom] - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 566 - Height = 212 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 6 - Top = 12 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 41 - Top = 17 - Width = 207 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 6 - Top = 36 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel2: TBevel - Left = 63 - Top = 80 - Width = 185 - Height = 4 - Shape = bsBottomLine - end - object Bevel3: TBevel - Left = 63 - Top = 147 - Width = 185 - Height = 4 - Shape = bsBottomLine - end - object chbxShowBorders: TCheckBox - Left = 63 - Top = 30 - Width = 113 - Height = 17 - Caption = '&Border' - TabOrder = 0 - OnClick = chbxShowClick - end - object chbxShowGrid: TCheckBox - Tag = 1 - Left = 63 - Top = 51 - Width = 113 - Height = 17 - Caption = '&Grid' - TabOrder = 1 - OnClick = chbxShowClick - end - object chbxShowStateImages: TCheckBox - Tag = 2 - Left = 63 - Top = 163 - Width = 113 - Height = 17 - Caption = 'State Images' - TabOrder = 4 - OnClick = chbxShowClick - end - object chbxShowImages: TCheckBox - Tag = 3 - Left = 63 - Top = 184 - Width = 113 - Height = 17 - Caption = 'Images' - TabOrder = 5 - OnClick = chbxShowClick - end - object chbxShowTreeLines: TCheckBox - Tag = 4 - Left = 63 - Top = 98 - Width = 113 - Height = 17 - Caption = 'TreeLines' - TabOrder = 2 - OnClick = chbxShowClick - end - object chbxShowButtons: TCheckBox - Tag = 5 - Left = 63 - Top = 119 - Width = 113 - Height = 17 - Caption = 'Buttons' - TabOrder = 3 - OnClick = chbxShowClick - end - object lblPreview: TStaticText - Left = 264 - Top = 2 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 6 - end - end - end - object tshColors: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 566 - Height = 212 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 10 - Top = 88 - Width = 81 - Height = 13 - Caption = '&Grid Lines Color: ' - OnClick = lblColorClick - end - object bvlGridLineColorHost: TBevel - Left = 91 - Top = 84 - Width = 150 - Height = 21 - Visible = False - end - object bvlTreeLineColorHost: TBevel - Left = 91 - Top = 114 - Width = 150 - Height = 21 - end - object lblTreeLinesColor: TLabel - Left = 10 - Top = 118 - Width = 78 - Height = 13 - Caption = 'TreeLines Color:' - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 13 - Width = 247 - Height = 59 - Caption = ' ' - TabOrder = 1 - object lblColor: TLabel - Left = 6 - Top = 24 - Width = 32 - Height = 13 - Caption = 'Co&lor: ' - OnClick = lblColorClick - end - object bvlColorHost: TBevel - Left = 86 - Top = 20 - Width = 150 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 11 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = chbxTransparentClick - end - object stTransparent: TStaticText - Left = 33 - Top = 12 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 2 - OnClick = stTransparentClick - end - end - end - object tshFonts: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 566 - Height = 212 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 16 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 47 - Width = 235 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - Text = 'edFont' - end - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object pnlBehaviors: TPanel - Left = 0 - Top = 0 - Width = 566 - Height = 212 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblExpanding: TLabel - Left = 5 - Top = 12 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object Bevel13: TBevel - Left = 65 - Top = 17 - Width = 173 - Height = 4 - Shape = bsBottomLine - end - object bvlExpandLevelHolder: TBevel - Left = 163 - Top = 61 - Width = 69 - Height = 21 - Visible = False - end - object lblExpandLevel: TLabel - Left = 89 - Top = 65 - Width = 71 - Height = 13 - Caption = 'Expand &level : ' - OnClick = lblExpandLevelClick - end - object Image4: TImage - Left = 7 - Top = 40 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F877778880F87777777778078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel1: TBevel - Left = 81 - Top = 99 - Width = 157 - Height = 4 - Shape = bsBottomLine - end - object lblMiscellaneous: TLabel - Left = 6 - Top = 94 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object Image5: TImage - Left = 7 - Top = 121 - Width = 32 - Height = 32 - Picture.Data = { - 055449636F6E0000010003001010000000000000680500003600000020200000 - 00000000A80800009E0500003030000000000000A80E0000460E000028000000 - 1000000020000000010008000000000040010000000000000000000000010000 - 00000000FFFFFF00000080000080800080800000C0C0C000C0DCC000F0CAA600 - 4080800040400000FF800000804000000040800080FFFF00FFFF8000FF808000 - 4080FF0081818100000081000081810081810000000033000000660000009900 - 0000CC0000333300003366000033FF000066CC000066FF000099FF0000CCCC00 - 3300330033006600330099003300CC0033330000333333003333660033339900 - 3333CC003333FF00336666003366990074CAFF003366FF003399000033993300 - 33996600339999003399CC003399FF0033CC330033CC990033CCCC0033CCFF00 - 33FFFF0066000000663300006633330066336600663399006633FF0066660000 - 6666330066666600666699006666CC0066990000669933006699660066999900 - 6699CC006699FF0066CC330066CC990066CCCC004CCEFF0066FF330066FFCC00 - 999900009933990099333300996600009966330099336600996699009966CC00 - 9999330099996600999999009999CC009999FF0099CC000099CC330066CC6600 - 99CC990099CCCC0099CCFF0099CC660099FF990099FFFF00CC009900CC333300 - CC336600CC339900CC660000CC66330099666600CC669900CC66CC00CC990000 - CC993300CC996600CC999900CC99CC00CC99FF00CCCC0000CCCC3300CCCC6600 - CCCC9900CCCCCC00CCCCFF00CCFF0000CCFF330099FF6600CCFF9900CCFFCC00 - CCFFFF00FF333300FF336600FF660000FF663300CC666600FF669900FF66CC00 - FF990000FF993300FF996600FF999900FF99CC00FF99FF00FFCC0000FFCC3300 - FFCC6600FFCC9900FFCCCC00FFCCFF00FFFF3300FFFF9900FFFFCC006666FF00 - 66FFFF00FFFF6600C1C1C1005F5F5F00777777008686860096969600CBCBCB00 - B2B2B200D7D7D700DDDDDD00E3E3E300EAEAEA00F1F1F100F8F8F800F0FBFF00 - A4A0A000808080000000FF0000FF0000FF00FF00FFFF00007AE9FF007D780000 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 00000000FFFFFFFFFFFFFFFF9B40FFFFFFFFFFFFFFFFFFFF9B9AFFFF4747FFFF - 9C40FFFFFF242424A7309A6B36369A9C3607FFFFFF789C9C4B36313636363636 - 36FFFFFFFFA2A09A9A4736364B290736079A9AFFFFA2A04B363636614B022936 - 363636FFFFA2A0A0613536644B02293624FFFFFFFFA2409F463636644B022936 - 0724FFFFFFA2409F0061780C4B02294636FFFFFFFFA2404040A078640C4B2924 - FFFFFFFFFFA2A0A0A0A09F9F4A789B24FFFFFFFFFFA2409F00A0787878789B24 - FFFFFFFFFFA2409F00A09F9F9F789B24FFFFFFFFFFA2404040A0787878789B24 - FFFFFFFFFFA2A0A0A0A0A0A0A0A09B24FFFFFFFFFFA2A2A2A2A2A2A2A2A2A29A - FFFFFFFFFF3FFFFFF333FFFF8003FFFF8007FFFF8001FFFF8001FFFF8007FFFF - 8003FFFF8007FFFF800FFFFF800FFFFF800FFFFF800FFFFF800FFFFF800FFFFF - 800FFFFF28000000200000004000000001000800000000008004000000000000 - 000000000001000000000000FFFFFF00000080000080800080800000C0C0C000 - C0DCC000F0CAA6004080800040400000FF800000804000000040800080FFFF00 - FFFF8000FF8080004080FF008181810000008100008181008181000000003300 - 00006600000099000000CC0000333300003366000033FF000066CC000066FF00 - 0099FF0000CCCC003300330033006600330099003300CC003333000033333300 - 33336600333399003333CC003333FF00336666003366990074CAFF003366FF00 - 339900003399330033996600339999003399CC003399FF0033CC330033CC9900 - 33CCCC0033CCFF0033FFFF006600000066330000663333006633660066339900 - 6633FF00666600006666330066666600666699006666CC006699000066993300 - 66996600669999006699CC006699FF0066CC330066CC990066CCCC004CCEFF00 - 66FF330066FFCC00999900009933990099333300996600009966330099336600 - 996699009966CC009999330099996600999999009999CC009999FF0099CC0000 - 99CC330066CC660099CC990099CCCC0099CCFF0099CC660099FF990099FFFF00 - CC009900CC333300CC336600CC339900CC660000CC66330099666600CC669900 - CC66CC00CC990000CC993300CC996600CC999900CC99CC00CC99FF00CCCC0000 - CCCC3300CCCC6600CCCC9900CCCCCC00CCCCFF00CCFF0000CCFF330099FF6600 - CCFF9900CCFFCC00CCFFFF00FF333300FF336600FF660000FF663300CC666600 - FF669900FF66CC00FF990000FF993300FF996600FF999900FF99CC00FF99FF00 - FFCC0000FFCC3300FFCC6600FFCC9900FFCCCC00FFCCFF00FFFF3300FFFF9900 - FFFFCC006666FF0066FFFF00FFFF6600C1C1C1005F5F5F007777770086868600 - 96969600CBCBCB00B2B2B200D7D7D700DDDDDD00E3E3E300EAEAEA00F1F1F100 - F8F8F800F0FBFF00A4A0A000808080000000FF0000FF0000FF00FF00FFFF0000 - 7AE9FF007D7800007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF409C40 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9B9AFFFFFF9B469B - FFFFFF9B4040FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9D9B9A9AFFFF473647 - FFFF9B9D9B9A9AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9D079A409A9B473647 - 9A9A9BA707079AFFFFFFFFFFFFFFFFFFFFFF24242424244B363107409B343647 - 9A404631353646FFFFFFFFFFFFFFFFFFFFFF789C9C9C9C4B3636363636363636 - 3636363635FFFFFFFFFFFFFFFFFFFFFFFFFFA1A09C409A9A4736363661616161 - 4C363635409A9AFFFFFFFFFFFFFFFFFFFFFFA1A040409A404636364C4B460229 - 4C363635409A9A9AFFFFFFFFFFFFFFFFFFFFA1A04C47303031364C644C4B3002 - 074C363636363635FFFFFFFFFFFFFFFFFFFFA1A0A061363636364C644C4B3002 - 29313636074747FFFFFFFFFFFFFFFFFFFFFFA140A1A3A007303636644C4B3002 - 2936362924FFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA20430353636644C4B3002 - 293636302924FFFFFFFFFFFFFFFFFFFFFFFFA1409F00A261364C60644C4B3002 - 294C35363607FFFFFFFFFFFFFFFFFFFFFFFFA1409F0000A16104A0644C4B3002 - 299A476135FFFFFFFFFFFFFFFFFFFFFFFFFFA1404040404004A0A06461644B30 - 079A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A078640C644B - 469A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A078A04A4A4A - A09A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA140A1A2A1A1A2A0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409F04A700A2A0A09F9F9F9F9F - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA7009DA2A0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA0A0A0A2A0A09F9F9F9F9F - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA140404040409CA0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A0A0A0A0 - A09A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2A2A2A2A2A2A2A2A2A2A2A2 - A2A19AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8FFFFFF38E3F - FFE18C1FFFE0001FFC00001FFC00007FFC00001FFC00000FFC00000FFC00001F - FC00007FFC00003FFC00003FFC00007FFC0001FFFC0001FFFC0001FFFC0001FF - FC0001FFFC0001FFFC0001FFFC0001FFFC0001FFFC0001FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFF2800000030000000600000000100080000000000 - 800A000000000000000000000001000000000000FFFFFF000000800000808000 - 80800000C0C0C000C0DCC000F0CAA6004080800040400000FF80000080400000 - 0040800080FFFF00FFFF8000FF8080004080FF00818181000000810000818100 - 818100000000330000006600000099000000CC0000333300003366000033FF00 - 0066CC000066FF000099FF0000CCCC003300330033006600330099003300CC00 - 333300003333330033336600333399003333CC003333FF003366660033669900 - 74CAFF003366FF00339900003399330033996600339999003399CC003399FF00 - 33CC330033CC990033CCCC0033CCFF0033FFFF00660000006633000066333300 - 66336600663399006633FF00666600006666330066666600666699006666CC00 - 669900006699330066996600669999006699CC006699FF0066CC330066CC9900 - 66CCCC004CCEFF0066FF330066FFCC0099990000993399009933330099660000 - 9966330099336600996699009966CC009999330099996600999999009999CC00 - 9999FF0099CC000099CC330066CC660099CC990099CCCC0099CCFF0099CC6600 - 99FF990099FFFF00CC009900CC333300CC336600CC339900CC660000CC663300 - 99666600CC669900CC66CC00CC990000CC993300CC996600CC999900CC99CC00 - CC99FF00CCCC0000CCCC3300CCCC6600CCCC9900CCCCCC00CCCCFF00CCFF0000 - CCFF330099FF6600CCFF9900CCFFCC00CCFFFF00FF333300FF336600FF660000 - FF663300CC666600FF669900FF66CC00FF990000FF993300FF996600FF999900 - FF99CC00FF99FF00FFCC0000FFCC3300FFCC6600FFCC9900FFCCCC00FFCCFF00 - FFFF3300FFFF9900FFFFCC006666FF0066FFFF00FFFF6600C1C1C1005F5F5F00 - 777777008686860096969600CBCBCB00B2B2B200D7D7D700DDDDDD00E3E3E300 - EAEAEA00F1F1F100F8F8F800F0FBFF00A4A0A000808080000000FF0000FF0000 - FF00FF00FFFF00007AE9FF007D7800007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F0000000000FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF409B9B - 40FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFF9B9B9B9BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C9B9AFFFFFFFF9B4646 - 9BFFFFFFFF9B4040FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFA79D9B9A9AFFFFFF47363647FFFFFF9B9D9B409AFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA79D079A9A9A409B473636 - 479A9A9B9D9D07079AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF24 - 2424242424A73636309A9A409B463636479A9A9B9D46353607FFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF789C9C9C9C9C4B36363631400746353636 - 479A9A073536363546FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A79D9D4C36363636363636363636363636363635FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A09C409A9A9A473636363661616161 - 614C36363635409A9A9AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0789B409A9A9A46363636614C460202294C363636359A9A9A9A9AFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A047463030303136364C614B4B3030 - 02074C3636363030303030FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A04C4C3636363636364C644C4B30300229313636363636363636FFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0616161616136364C0C4C4B3030 - 02293636363607474747FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09BA3A3A3A00730363636974C4B303002293636362924FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9FA2A2040707363636974C4B3030 - 0229363636302424FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09B9F000078303636364C0C4C4B303002294C4C36360724FFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9F0000A24C364C60780C4C4B3030 - 02299B4736363607FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09B9F000000A16178A0780C4C4B303002299B24476135FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9B9B9B9B9B04A0A078644C64604B - 30299B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A078647F0C4C4E4B079B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A07805640C0C4B - 4B469B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A07878784A4A4A4A789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A040A2A2A2A2A2A2A0A0787878787878 - 78789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0409F009D00A1A2A0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0409F9D789DA1A2A0A09F9F9F9F9F9F - 9F789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0409F00009DA1A2A0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0409FA0A0A0A0A2A0A09F9F9F9F9F9F - 9F789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A04040404040409CA0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A0787878787878 - 78789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A09B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2 - A2A2A29AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF87FFFFFFFFFFFFFF87FFFFFFFFFFFFC787 - 8FFFFFFFFFFF838707FFFFFFFFFF800007FFFFFFFFE0000007FFFFFFFFE00000 - 07FFFFFFFFE000001FFFFFFFFFE0000003FFFFFFFFE0000001FFFFFFFFE00000 - 01FFFFFFFFE0000001FFFFFFFFE0000003FFFFFFFFE000001FFFFFFFFFE00000 - 0FFFFFFFFFE000000FFFFFFFFFE000000FFFFFFFFFE000001FFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF} - end - object chbxAutoNodesExpand: TCheckBox - Left = 88 - Top = 37 - Width = 154 - Height = 17 - Caption = '&Auto Node Expanded' - TabOrder = 0 - OnClick = chbxAutoNodesExpandClick - end - object chbxNodeAutoHeight: TCheckBox - Left = 88 - Top = 140 - Width = 111 - Height = 17 - Caption = '&Node Auto Height' - TabOrder = 1 - OnClick = chbxNodeAutoHeightClick - end - object chbxAutoWidth: TCheckBox - Left = 88 - Top = 117 - Width = 97 - Height = 17 - Caption = 'Auto &Width' - TabOrder = 2 - OnClick = chbxAutoWidthClick - end - end - end - end - object pnlPreview: TPanel - Left = 272 - Top = 46 - Width = 295 - Height = 185 - Anchors = [akLeft, akTop, akRight, akBottom] - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - end - object ilPreview: TImageList - Left = 5 - Top = 247 - Bitmap = { - 494C010102000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000084000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000840000008400000084000000FF000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000848484008484840084848400C6C6C60084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000840000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 840084848400FFFFFF00C6C6C600FFFFFF00C6C6C60084848400848484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF0000FF0000FFFFFF0000FF000000FF000000840000008400000084 - 000000000000000000000000000000000000000000000000000084848400C6C6 - C600FFFFFF00C6C6C600FFFFFF00C6C6C600C6C6C60084848400848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF0000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000084 - 000000840000000000000000000000000000000000000000000084848400FFFF - FF00C6C6C600FFFFFF00C6C6C600FFFFFF00C6C6C60084848400848484008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF00FFFFFF0000FF000000FF000000FF000000840000008400000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600FFFFFF00FFFFFF00C6C6C600C6C6C600C6C6C60084848400848484008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF000000FF000000FF000000FF000000FF000000FF0000008400000084 - 000000840000000000000000000000000000000000000000000084848400FFFF - FF00C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600848484008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF - 0000008400000084000000000000000000000000000000000000000000008484 - 8400C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6 - C600848484008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000084000000FF000000FF000000FF000000FF000000FF0000008400000084 - 0000000000000000000000000000000000000000000000000000000000000000 - 000084848400C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000084000000FF000000FF00000084000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000084848400C6C6C600C6C6C6008484840084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000840000008400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFF00000000FFFFFFFF00000000 - FF3FFF3F00000000F81FF81F00000000E00FE00F00000000C007C00700000000 - C003C00300000000C003C00300000000C003C00300000000C003C00300000000 - C003C00300000000E003E00300000000F00FF00F00000000F83FF83F00000000 - FCFFFCFF00000000FFFFFFFF0000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPSTeeChartD11.bpl b/internal/x.46/Lib/D11/dxPSTeeChartD11.bpl deleted file mode 100644 index c4817f7d..00000000 Binary files a/internal/x.46/Lib/D11/dxPSTeeChartD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSTeeChartD11.dcp b/internal/x.46/Lib/D11/dxPSTeeChartD11.dcp deleted file mode 100644 index 3a3981cd..00000000 Binary files a/internal/x.46/Lib/D11/dxPSTeeChartD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSTextLnk.dcu b/internal/x.46/Lib/D11/dxPSTextLnk.dcu deleted file mode 100644 index 7bf95ce5..00000000 Binary files a/internal/x.46/Lib/D11/dxPSTextLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSTextLnk.dfm b/internal/x.46/Lib/D11/dxPSTextLnk.dfm deleted file mode 100644 index 9c2f3103..00000000 --- a/internal/x.46/Lib/D11/dxPSTextLnk.dfm +++ /dev/null @@ -1,524 +0,0 @@ -object dxfmTextReportLinkDesignWindow: TdxfmTextReportLinkDesignWindow - Left = 480 - Top = 279 - BorderStyle = bsDialog - Caption = 'dxfmTextReportLinkDesignWindow' - ClientHeight = 285 - ClientWidth = 580 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 7 - Width = 572 - Height = 243 - ActivePage = tshOptions - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - object tshOptions: TTabSheet - Caption = 'Options' - object lblLineSpacing: TLabel - Left = 9 - Top = 65 - Width = 63 - Height = 13 - Caption = '&Line Spacing:' - end - object lblAlignment: TLabel - Left = 9 - Top = 28 - Width = 51 - Height = 13 - Caption = '&Alignment:' - FocusControl = cbxAlignment - end - object bvlLineSpacingSite: TBevel - Left = 100 - Top = 60 - Width = 140 - Height = 21 - Visible = False - end - object Bevel2: TBevel - Left = 319 - Top = 8 - Width = 236 - Height = 4 - Shape = bsBottomLine - end - object lblPreview: TLabel - Left = 267 - Top = 3 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object Bevel1: TBevel - Left = 10 - Top = 99 - Width = 231 - Height = 4 - Shape = bsBottomLine - end - object pnlPreview: TPanel - Left = 267 - Top = 23 - Width = 290 - Height = 183 - Anchors = [akLeft, akTop, akRight, akBottom] - BevelOuter = bvLowered - Color = clWindow - TabOrder = 0 - object pbxPreview: TPaintBox - Left = 1 - Top = 1 - Width = 288 - Height = 181 - Align = alClient - OnPaint = pbxPreviewPaint - end - end - object btnFont: TButton - Left = 9 - Top = 123 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 2 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 9 - Top = 151 - Width = 231 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - object cbxAlignment: TComboBox - Left = 100 - Top = 23 - Width = 140 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 1 - OnClick = cbxAlignmentClick - OnDrawItem = cbxAlignmentDrawItem - end - end - end - object ilAlignments: TImageList - Left = 13 - Top = 254 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFF003FC00FF0030003FFFFFFFFFFFFFFFF0003000300030003 - FFFFFFFFFFFFFFFF003FC00FF0030003FFFFFFFFFFFFFFFF0003000300030003 - FFFFFFFFFFFFFFFF003FC00FF0030003FFFFFFFFFFFFFFFF0003000300030003 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPSUtl.dcu b/internal/x.46/Lib/D11/dxPSUtl.dcu deleted file mode 100644 index eaebb5ea..00000000 Binary files a/internal/x.46/Lib/D11/dxPSUtl.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSXplorerTreeView.dcu b/internal/x.46/Lib/D11/dxPSXplorerTreeView.dcu deleted file mode 100644 index daa0a32d..00000000 Binary files a/internal/x.46/Lib/D11/dxPSXplorerTreeView.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxCheckListBoxLnk.dcu b/internal/x.46/Lib/D11/dxPScxCheckListBoxLnk.dcu deleted file mode 100644 index 0468f017..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxCheckListBoxLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxCheckListBoxLnk.dfm b/internal/x.46/Lib/D11/dxPScxCheckListBoxLnk.dfm deleted file mode 100644 index f4ab0890..00000000 --- a/internal/x.46/Lib/D11/dxPScxCheckListBoxLnk.dfm +++ /dev/null @@ -1,554 +0,0 @@ -object cxfmCheckListBoxDesignWindow: TcxfmCheckListBoxDesignWindow - Left = 393 - Top = 324 - BorderStyle = bsDialog - Caption = 'cxfmCheckListBoxDesignWindow' - ClientHeight = 243 - ClientWidth = 553 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 3 - Width = 545 - Height = 204 - ActivePage = tshColor - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 6 - Top = 13 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 41 - Top = 17 - Width = 207 - Height = 4 - Shape = bsBottomLine - end - object lblMiscellaneous: TLabel - Left = 6 - Top = 82 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object Bevel4: TBevel - Left = 79 - Top = 86 - Width = 170 - Height = 4 - Shape = bsBottomLine - end - object Image5: TImage - Left = 10 - Top = 107 - Width = 32 - Height = 32 - Picture.Data = { - 055449636F6E0000010003001010000000000000680500003600000020200000 - 00000000A80800009E0500003030000000000000A80E0000460E000028000000 - 1000000020000000010008000000000040010000000000000000000000010000 - 00000000FFFFFF00000080000080800080800000C0C0C000C0DCC000F0CAA600 - 4080800040400000FF800000804000000040800080FFFF00FFFF8000FF808000 - 4080FF0081818100000081000081810081810000000033000000660000009900 - 0000CC0000333300003366000033FF000066CC000066FF000099FF0000CCCC00 - 3300330033006600330099003300CC0033330000333333003333660033339900 - 3333CC003333FF00336666003366990074CAFF003366FF003399000033993300 - 33996600339999003399CC003399FF0033CC330033CC990033CCCC0033CCFF00 - 33FFFF0066000000663300006633330066336600663399006633FF0066660000 - 6666330066666600666699006666CC0066990000669933006699660066999900 - 6699CC006699FF0066CC330066CC990066CCCC004CCEFF0066FF330066FFCC00 - 999900009933990099333300996600009966330099336600996699009966CC00 - 9999330099996600999999009999CC009999FF0099CC000099CC330066CC6600 - 99CC990099CCCC0099CCFF0099CC660099FF990099FFFF00CC009900CC333300 - CC336600CC339900CC660000CC66330099666600CC669900CC66CC00CC990000 - CC993300CC996600CC999900CC99CC00CC99FF00CCCC0000CCCC3300CCCC6600 - CCCC9900CCCCCC00CCCCFF00CCFF0000CCFF330099FF6600CCFF9900CCFFCC00 - CCFFFF00FF333300FF336600FF660000FF663300CC666600FF669900FF66CC00 - FF990000FF993300FF996600FF999900FF99CC00FF99FF00FFCC0000FFCC3300 - FFCC6600FFCC9900FFCCCC00FFCCFF00FFFF3300FFFF9900FFFFCC006666FF00 - 66FFFF00FFFF6600C1C1C1005F5F5F00777777008686860096969600CBCBCB00 - B2B2B200D7D7D700DDDDDD00E3E3E300EAEAEA00F1F1F100F8F8F800F0FBFF00 - A4A0A000808080000000FF0000FF0000FF00FF00FFFF00007AE9FF007D780000 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 00000000FFFFFFFFFFFFFFFF9B40FFFFFFFFFFFFFFFFFFFF9B9AFFFF4747FFFF - 9C40FFFFFF242424A7309A6B36369A9C3607FFFFFF789C9C4B36313636363636 - 36FFFFFFFFA2A09A9A4736364B290736079A9AFFFFA2A04B363636614B022936 - 363636FFFFA2A0A0613536644B02293624FFFFFFFFA2409F463636644B022936 - 0724FFFFFFA2409F0061780C4B02294636FFFFFFFFA2404040A078640C4B2924 - FFFFFFFFFFA2A0A0A0A09F9F4A789B24FFFFFFFFFFA2409F00A0787878789B24 - FFFFFFFFFFA2409F00A09F9F9F789B24FFFFFFFFFFA2404040A0787878789B24 - FFFFFFFFFFA2A0A0A0A0A0A0A0A09B24FFFFFFFFFFA2A2A2A2A2A2A2A2A2A29A - FFFFFFFFFF3FFFFFF333FFFF8003FFFF8007FFFF8001FFFF8001FFFF8007FFFF - 8003FFFF8007FFFF800FFFFF800FFFFF800FFFFF800FFFFF800FFFFF800FFFFF - 800FFFFF28000000200000004000000001000800000000008004000000000000 - 000000000001000000000000FFFFFF00000080000080800080800000C0C0C000 - C0DCC000F0CAA6004080800040400000FF800000804000000040800080FFFF00 - FFFF8000FF8080004080FF008181810000008100008181008181000000003300 - 00006600000099000000CC0000333300003366000033FF000066CC000066FF00 - 0099FF0000CCCC003300330033006600330099003300CC003333000033333300 - 33336600333399003333CC003333FF00336666003366990074CAFF003366FF00 - 339900003399330033996600339999003399CC003399FF0033CC330033CC9900 - 33CCCC0033CCFF0033FFFF006600000066330000663333006633660066339900 - 6633FF00666600006666330066666600666699006666CC006699000066993300 - 66996600669999006699CC006699FF0066CC330066CC990066CCCC004CCEFF00 - 66FF330066FFCC00999900009933990099333300996600009966330099336600 - 996699009966CC009999330099996600999999009999CC009999FF0099CC0000 - 99CC330066CC660099CC990099CCCC0099CCFF0099CC660099FF990099FFFF00 - CC009900CC333300CC336600CC339900CC660000CC66330099666600CC669900 - CC66CC00CC990000CC993300CC996600CC999900CC99CC00CC99FF00CCCC0000 - CCCC3300CCCC6600CCCC9900CCCCCC00CCCCFF00CCFF0000CCFF330099FF6600 - CCFF9900CCFFCC00CCFFFF00FF333300FF336600FF660000FF663300CC666600 - FF669900FF66CC00FF990000FF993300FF996600FF999900FF99CC00FF99FF00 - FFCC0000FFCC3300FFCC6600FFCC9900FFCCCC00FFCCFF00FFFF3300FFFF9900 - FFFFCC006666FF0066FFFF00FFFF6600C1C1C1005F5F5F007777770086868600 - 96969600CBCBCB00B2B2B200D7D7D700DDDDDD00E3E3E300EAEAEA00F1F1F100 - F8F8F800F0FBFF00A4A0A000808080000000FF0000FF0000FF00FF00FFFF0000 - 7AE9FF007D7800007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF409C40 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9B9AFFFFFF9B469B - FFFFFF9B4040FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9D9B9A9AFFFF473647 - FFFF9B9D9B9A9AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9D079A409A9B473647 - 9A9A9BA707079AFFFFFFFFFFFFFFFFFFFFFF24242424244B363107409B343647 - 9A404631353646FFFFFFFFFFFFFFFFFFFFFF789C9C9C9C4B3636363636363636 - 3636363635FFFFFFFFFFFFFFFFFFFFFFFFFFA1A09C409A9A4736363661616161 - 4C363635409A9AFFFFFFFFFFFFFFFFFFFFFFA1A040409A404636364C4B460229 - 4C363635409A9A9AFFFFFFFFFFFFFFFFFFFFA1A04C47303031364C644C4B3002 - 074C363636363635FFFFFFFFFFFFFFFFFFFFA1A0A061363636364C644C4B3002 - 29313636074747FFFFFFFFFFFFFFFFFFFFFFA140A1A3A007303636644C4B3002 - 2936362924FFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA20430353636644C4B3002 - 293636302924FFFFFFFFFFFFFFFFFFFFFFFFA1409F00A261364C60644C4B3002 - 294C35363607FFFFFFFFFFFFFFFFFFFFFFFFA1409F0000A16104A0644C4B3002 - 299A476135FFFFFFFFFFFFFFFFFFFFFFFFFFA1404040404004A0A06461644B30 - 079A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A078640C644B - 469A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A078A04A4A4A - A09A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA140A1A2A1A1A2A0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409F04A700A2A0A09F9F9F9F9F - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA7009DA2A0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1409FA0A0A0A2A0A09F9F9F9F9F - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA140404040409CA0A07878787878 - 789A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A0A0A0A0 - A09A24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2A2A2A2A2A2A2A2A2A2A2A2 - A2A19AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8FFFFFF38E3F - FFE18C1FFFE0001FFC00001FFC00007FFC00001FFC00000FFC00000FFC00001F - FC00007FFC00003FFC00003FFC00007FFC0001FFFC0001FFFC0001FFFC0001FF - FC0001FFFC0001FFFC0001FFFC0001FFFC0001FFFC0001FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFF2800000030000000600000000100080000000000 - 800A000000000000000000000001000000000000FFFFFF000000800000808000 - 80800000C0C0C000C0DCC000F0CAA6004080800040400000FF80000080400000 - 0040800080FFFF00FFFF8000FF8080004080FF00818181000000810000818100 - 818100000000330000006600000099000000CC0000333300003366000033FF00 - 0066CC000066FF000099FF0000CCCC003300330033006600330099003300CC00 - 333300003333330033336600333399003333CC003333FF003366660033669900 - 74CAFF003366FF00339900003399330033996600339999003399CC003399FF00 - 33CC330033CC990033CCCC0033CCFF0033FFFF00660000006633000066333300 - 66336600663399006633FF00666600006666330066666600666699006666CC00 - 669900006699330066996600669999006699CC006699FF0066CC330066CC9900 - 66CCCC004CCEFF0066FF330066FFCC0099990000993399009933330099660000 - 9966330099336600996699009966CC009999330099996600999999009999CC00 - 9999FF0099CC000099CC330066CC660099CC990099CCCC0099CCFF0099CC6600 - 99FF990099FFFF00CC009900CC333300CC336600CC339900CC660000CC663300 - 99666600CC669900CC66CC00CC990000CC993300CC996600CC999900CC99CC00 - CC99FF00CCCC0000CCCC3300CCCC6600CCCC9900CCCCCC00CCCCFF00CCFF0000 - CCFF330099FF6600CCFF9900CCFFCC00CCFFFF00FF333300FF336600FF660000 - FF663300CC666600FF669900FF66CC00FF990000FF993300FF996600FF999900 - FF99CC00FF99FF00FFCC0000FFCC3300FFCC6600FFCC9900FFCCCC00FFCCFF00 - FFFF3300FFFF9900FFFFCC006666FF0066FFFF00FFFF6600C1C1C1005F5F5F00 - 777777008686860096969600CBCBCB00B2B2B200D7D7D700DDDDDD00E3E3E300 - EAEAEA00F1F1F100F8F8F800F0FBFF00A4A0A000808080000000FF0000FF0000 - FF00FF00FFFF00007AE9FF007D7800007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F00 - 7F7F7F007F7F7F007F7F7F007F7F7F0000000000FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF409B9B - 40FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFF9B9B9B9BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C9B9AFFFFFFFF9B4646 - 9BFFFFFFFF9B4040FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFA79D9B9A9AFFFFFF47363647FFFFFF9B9D9B409AFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA79D079A9A9A409B473636 - 479A9A9B9D9D07079AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF24 - 2424242424A73636309A9A409B463636479A9A9B9D46353607FFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF789C9C9C9C9C4B36363631400746353636 - 479A9A073536363546FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A79D9D4C36363636363636363636363636363635FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A09C409A9A9A473636363661616161 - 614C36363635409A9A9AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0789B409A9A9A46363636614C460202294C363636359A9A9A9A9AFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A047463030303136364C614B4B3030 - 02074C3636363030303030FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A04C4C3636363636364C644C4B30300229313636363636363636FFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0616161616136364C0C4C4B3030 - 02293636363607474747FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09BA3A3A3A00730363636974C4B303002293636362924FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9FA2A2040707363636974C4B3030 - 0229363636302424FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09B9F000078303636364C0C4C4B303002294C4C36360724FFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9F0000A24C364C60780C4C4B3030 - 02299B4736363607FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A09B9F000000A16178A0780C4C4B303002299B24476135FFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A09B9B9B9B9B9B04A0A078644C64604B - 30299B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A078647F0C4C4E4B079B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A07805640C0C4B - 4B469B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A07878784A4A4A4A789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A040A2A2A2A2A2A2A0A0787878787878 - 78789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0409F009D00A1A2A0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0409F9D789DA1A2A0A09F9F9F9F9F9F - 9F789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0409F00009DA1A2A0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0409FA0A0A0A0A2A0A09F9F9F9F9F9F - 9F789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A04040404040409CA0A078787878787878789B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1A0A0A0A0A0A0A0A0A0A0787878787878 - 78789B24FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1 - A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A09B24FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2 - A2A2A29AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF87FFFFFFFFFFFFFF87FFFFFFFFFFFFC787 - 8FFFFFFFFFFF838707FFFFFFFFFF800007FFFFFFFFE0000007FFFFFFFFE00000 - 07FFFFFFFFE000001FFFFFFFFFE0000003FFFFFFFFE0000001FFFFFFFFE00000 - 01FFFFFFFFE0000001FFFFFFFFE0000003FFFFFFFFE000001FFFFFFFFFE00000 - 0FFFFFFFFFE000000FFFFFFFFFE000000FFFFFFFFFE000001FFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000FFFFFFFFFFE00000 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF} - end - object imgGrid: TImage - Left = 10 - Top = 33 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object chbxShowBorders: TCheckBox - Left = 95 - Top = 30 - Width = 147 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxOptionsClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 95 - Top = 52 - Width = 147 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxOptionsClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 95 - Top = 104 - Width = 147 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 2 - OnClick = chbxOptionsClick - end - object chbxRowAutoHeight: TCheckBox - Left = 95 - Top = 150 - Width = 147 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 4 - OnClick = chbxRowAutoHeightClick - end - object lblPreview: TStaticText - Left = 258 - Top = 2 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 5 - end - object chbxAutoWidth: TCheckBox - Left = 95 - Top = 127 - Width = 147 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 3 - OnClick = chbxAutoWidthClick - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 14 - Top = 143 - Width = 81 - Height = 13 - Caption = 'Grid Lines Color: ' - end - object bvlLineColorHolder: TBevel - Left = 98 - Top = 140 - Width = 126 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 6 - Top = 18 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - end - object gbxTransparent: TGroupBox - Left = 6 - Top = 47 - Width = 230 - Height = 82 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 9 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - end - object bvlColorHolder: TBevel - Left = 92 - Top = 20 - Width = 126 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 9 - Top = 52 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - end - object bvlEvenColorHolder: TBevel - Left = 92 - Top = 48 - Width = 126 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 19 - Top = 45 - Width = 15 - Height = 17 - TabOrder = 1 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 77 - Top = 13 - Width = 159 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 46 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 3 - OnClick = stTransparentClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 537 - Height = 176 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 11 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 39 - Width = 230 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - Text = 'edFont' - end - object btnEvenFont: TButton - Tag = 1 - Left = 9 - Top = 71 - Width = 110 - Height = 23 - Caption = 'E&ven Font ...' - TabOrder = 2 - OnClick = btnFontClick - end - object edEvenFont: TEdit - Left = 9 - Top = 100 - Width = 230 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - Text = 'edFont' - end - end - end - end - object pnlPreview: TPanel - Left = 265 - Top = 46 - Width = 273 - Height = 150 - BevelOuter = bvLowered - BorderWidth = 1 - Color = clWindow - TabOrder = 1 - end -end diff --git a/internal/x.46/Lib/D11/dxPScxCommon.dcu b/internal/x.46/Lib/D11/dxPScxCommon.dcu deleted file mode 100644 index c445fbb8..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxCommon.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxCommonD11.bpl b/internal/x.46/Lib/D11/dxPScxCommonD11.bpl deleted file mode 100644 index 00f06269..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxCommonD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxCommonD11.dcp b/internal/x.46/Lib/D11/dxPScxCommonD11.dcp deleted file mode 100644 index ae302214..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxCommonD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxCommonReg.dcu b/internal/x.46/Lib/D11/dxPScxCommonReg.dcu deleted file mode 100644 index 06254352..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxCommonReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxDBEditorLnkReg.dcu b/internal/x.46/Lib/D11/dxPScxDBEditorLnkReg.dcu deleted file mode 100644 index 27db40d5..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxDBEditorLnkReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxDBEditorLnks.dcu b/internal/x.46/Lib/D11/dxPScxDBEditorLnks.dcu deleted file mode 100644 index a3024853..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxDBEditorLnks.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxEditorLnkReg.dcu b/internal/x.46/Lib/D11/dxPScxEditorLnkReg.dcu deleted file mode 100644 index e1f7122e..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxEditorLnkReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxEditorLnks.dcu b/internal/x.46/Lib/D11/dxPScxEditorLnks.dcu deleted file mode 100644 index bf4e0f84..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxEditorLnks.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxEditorProducers.dcu b/internal/x.46/Lib/D11/dxPScxEditorProducers.dcu deleted file mode 100644 index 5319bde3..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxEditorProducers.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxExtComCtrlsLnk.dcu b/internal/x.46/Lib/D11/dxPScxExtComCtrlsLnk.dcu deleted file mode 100644 index ebb20f7b..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxExtComCtrlsLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxExtCommon.dcu b/internal/x.46/Lib/D11/dxPScxExtCommon.dcu deleted file mode 100644 index 0d2de64d..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxExtCommon.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxExtCommonD11.bpl b/internal/x.46/Lib/D11/dxPScxExtCommonD11.bpl deleted file mode 100644 index 4c278239..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxExtCommonD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxExtCommonD11.dcp b/internal/x.46/Lib/D11/dxPScxExtCommonD11.dcp deleted file mode 100644 index f2faf1da..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxExtCommonD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxExtDBEditorLnkReg.dcu b/internal/x.46/Lib/D11/dxPScxExtDBEditorLnkReg.dcu deleted file mode 100644 index efde6b3f..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxExtDBEditorLnkReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxExtDBEditorLnks.dcu b/internal/x.46/Lib/D11/dxPScxExtDBEditorLnks.dcu deleted file mode 100644 index c7f201a9..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxExtDBEditorLnks.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxExtEditorLnkReg.dcu b/internal/x.46/Lib/D11/dxPScxExtEditorLnkReg.dcu deleted file mode 100644 index 054d2e20..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxExtEditorLnkReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxExtEditorProducers.dcu b/internal/x.46/Lib/D11/dxPScxExtEditorProducers.dcu deleted file mode 100644 index 26b82ca7..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxExtEditorProducers.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxGrid4Lnk.dfm b/internal/x.46/Lib/D11/dxPScxGrid4Lnk.dfm deleted file mode 100644 index fab0ba12..00000000 --- a/internal/x.46/Lib/D11/dxPScxGrid4Lnk.dfm +++ /dev/null @@ -1,2086 +0,0 @@ -object dxfmGridReportLinkDesignWindow: TdxfmGridReportLinkDesignWindow - Left = 463 - Top = 133 - BorderStyle = bsDialog - Caption = 'fmdxGridDesignWindow' - ClientHeight = 437 - ClientWidth = 648 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 642 - Height = 399 - ActivePage = tshFormatting - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 9 - Top = 37 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 12 - Width = 266 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 164 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object imgOnEveryPage: TImage - Left = 9 - Top = 189 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlOnEveryPage: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object bvlWarningHost: TBevel - Left = 4 - Top = 289 - Width = 313 - Height = 77 - Visible = False - end - object chbxShowBands: TCheckBox - Tag = 1 - Left = 90 - Top = 42 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 1 - OnClick = OptionsViewClick - end - object chbxShowHeaders: TCheckBox - Tag = 2 - Left = 90 - Top = 63 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowFooters: TCheckBox - Tag = 3 - Left = 90 - Top = 84 - Width = 200 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 3 - OnClick = OptionsViewClick - end - object chbxShowGroupFooters: TCheckBox - Tag = 4 - Left = 90 - Top = 104 - Width = 200 - Height = 17 - Caption = 'G&roup Footers' - TabOrder = 4 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 5 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 5 - OnClick = OptionsViewClick - end - object chbxBandsOnEveryPage: TCheckBox - Tag = 1 - Left = 90 - Top = 202 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 8 - OnClick = OptionsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Tag = 2 - Left = 90 - Top = 223 - Width = 200 - Height = 17 - Caption = 'Headers' - TabOrder = 9 - OnClick = OptionsOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Tag = 3 - Left = 90 - Top = 245 - Width = 200 - Height = 17 - Caption = 'Footers' - TabOrder = 10 - OnClick = OptionsOnEveryPageClick - end - object chbxFilterBarOnEveryPage: TCheckBox - Tag = 4 - Left = 90 - Top = 266 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 11 - OnClick = OptionsOnEveryPageClick - end - object chbxCaptionsOnEveryPage: TCheckBox - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 7 - OnClick = OptionsOnEveryPageClick - end - object chbxShowCaptions: TCheckBox - Left = 90 - Top = 22 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowFilterBar: TCheckBox - Tag = 6 - Left = 90 - Top = 146 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 6 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 323 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 12 - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblSelection: TLabel - Left = 5 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object imgSelection: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlSelection: TBevel - Left = 56 - Top = 12 - Width = 255 - Height = 4 - Shape = bsBottomLine - end - object lblExpanding: TLabel - Left = 5 - Top = 74 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 9 - Top = 95 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 79 - Width = 248 - Height = 4 - Shape = bsBottomLine - end - object lblDetails: TLabel - Left = 5 - Top = 218 - Width = 32 - Height = 13 - Caption = 'Details' - end - object bvlDetails: TBevel - Left = 47 - Top = 223 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object imgDetails: TImage - Left = 9 - Top = 239 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0889999999999999999999907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897F78FF7FF77777788F907DDDDDDDDDDDD0FF777FFFF7FFF7777FFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF77777777F - F07DD0889777777777777777777907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F777F7FF7777888FF907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCCCCCDD0FF7777FFF7FF7777777FF - F07DD0889777777777777777777907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F788F7FF77778FFFF907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF777777777 - F07DD0889777777777777777777907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0777777777777777777777 - 707DD08897F888F7FF7777788FF907DDCCCCCCCCDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0FF77777FF7FF7777777FF - F07DD0889000000000000000000907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897888880F8888888888907DDDDDDDDDDDD0777777777777777777777 - 707DD08897F77780F8777777778907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFF80FFFFFFFFFFF907DDDDDDDDDDDD0FF7777FFF7FF7777777FF - F07DD0889000000000000000000907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0889999999999999999999907DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0F0F777777FF77777777FFF07DDDDDDDDDDDD0FF77777FF7FF77777777F - F07DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F888888880F8888888888807DDDDDDDDDDDD0F888888880F8888888888 - 807DD0F877778880F8777777777807DDDDDDDDDDDD0F877777880F8777777778 - 807DD0FFFFFFFFF0FFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF0FFFFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgLevels: TImage - Left = 9 - Top = 306 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0888888888888888888888807DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F000FF8F000FF8FCCCC44F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F77F7F8FCC99F - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F666CCCF07DDDDDDDDDDDDD0F7F77F8F777FF8FCC99F - 7F07D0F0000F8F00F0F8F999999F07DDCDDDDCDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7888888888888888888 - 7F07D0888888888888888888888807DDCCCCCCCCDDD0F7F77F8F777FF8FC99CF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F00FFF8F0000F8F9999CCF07DDCDDDDCDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F99AAACF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F0000F8F000FF8F9999CCF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F0000000000000000000 - 0F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F0000F8F000FF8FB99944F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0777777777777777777777707DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F000087F800087F800000807DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF7FFFFFF7FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0000000000000000000000007DDCDDDDCDDDDD0F7888888888888888888 - 7F07D7F88880777777777777777778DDCCCCDCCDDDD0F7777777777777777777 - 7F07D7F00080F87777788088888888DDCCCCCCCCDDD0F7777777777777777777 - 7F07D7F77780FFFFFFFFF088888888DDCCCCDCCDDDD0F0000000000000000000 - 0F07D7FFFFF0777777777088888888DDCDDDDCDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D7777770888888888888888888DDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblLevels: TLabel - Left = 5 - Top = 285 - Width = 30 - Height = 13 - Caption = 'Levels' - end - object bvlLevels: TBevel - Left = 47 - Top = 290 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object lblGridSize: TLabel - Left = 5 - Top = 150 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlGridSize: TBevel - Left = 33 - Top = 154 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 9 - Top = 172 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxProcessSelection: TCheckBox - Left = 90 - Top = 25 - Width = 200 - Height = 17 - Caption = 'Process Selection' - TabOrder = 0 - OnClick = OptionsSelectionClick - end - object chbxProcessExactSelection: TCheckBox - Tag = 1 - Left = 90 - Top = 46 - Width = 200 - Height = 17 - Caption = 'Process Exact Selection' - TabOrder = 1 - OnClick = OptionsSelectionClick - end - object chbxExpandGroupRows: TCheckBox - Left = 90 - Top = 89 - Width = 200 - Height = 17 - Caption = 'Groups' - TabOrder = 2 - OnClick = OptionsExpandingClick - end - object chbxExpandMasterRows: TCheckBox - Tag = 1 - Left = 90 - Top = 111 - Width = 200 - Height = 17 - Caption = 'Details' - TabOrder = 3 - OnClick = OptionsExpandingClick - end - object chbxStartFromActiveView: TCheckBox - Left = 90 - Top = 236 - Width = 200 - Height = 17 - Caption = 'Start From Active Details' - TabOrder = 6 - OnClick = OptionsDetailsClick - end - object chbxOnlyActiveView: TCheckBox - Tag = 1 - Left = 90 - Top = 258 - Width = 200 - Height = 17 - Caption = 'Only Active Details' - TabOrder = 7 - OnClick = OptionsDetailsClick - end - object chbxLevelsUnwrap: TCheckBox - Left = 90 - Top = 303 - Width = 200 - Height = 17 - Caption = '&Unwrap' - TabOrder = 8 - OnClick = OptionsLevelsClick - end - object chbxLevelsUnwrapTopLevel: TCheckBox - Tag = 1 - Left = 90 - Top = 326 - Width = 200 - Height = 17 - Caption = 'Unwrap Top Level' - TabOrder = 9 - OnClick = OptionsLevelsClick - end - object chbxLevelsRiseActiveLevelOntoTop: TCheckBox - Tag = 2 - Left = 90 - Top = 349 - Width = 200 - Height = 17 - Caption = 'Rise Active Level onto Top' - TabOrder = 10 - OnClick = OptionsLevelsClick - end - object chbxGridAutoWidth: TCheckBox - Left = 90 - Top = 169 - Width = 200 - Height = 17 - Caption = '&Auto Width' - TabOrder = 5 - OnClick = OptionsSizeClick - end - object chbxExpandCards: TCheckBox - Tag = 2 - Left = 90 - Top = 132 - Width = 200 - Height = 17 - Caption = 'Cards' - TabOrder = 4 - OnClick = OptionsExpandingClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 12 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 9 - Top = 95 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 74 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 79 - Width = 241 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object lblPagination: TLabel - Left = 5 - Top = 229 - Width = 50 - Height = 13 - Caption = 'Pagination' - end - object bvlPagination: TBevel - Left = 64 - Top = 234 - Width = 247 - Height = 4 - Shape = bsBottomLine - end - object imgPagination: TImage - Left = 8 - Top = 251 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD0000000000000000000000007DDDDDDDDDDDD77777777777777770DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7F8888888888888F0DDDDD - DDDDD0888000000000000000088F07DDDDDDDDDDDD7F8777877778778F07770D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8888888888888F0FFF0D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0D - DDDDD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8888888888888F078F07 - 770DD0F990FFFF8FFFF8FFFF099F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0F - FF0DD0F99999999999999999999F07DDCDDDDCDDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCDCCDDD7F8888888888888F088F07 - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F8F0FFFF8F00F8F00F0F8F07DDCDDDDCDDDD7F8888888888888F088F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCDDDDCDDDD7F8888888888888F088F0F - 8F0DD0F99999999999999999999F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCDCCDDD7F8888888888888F088F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCDDDDCDDDD7F8777877778778F0F8F08 - 8F0DD0F8F0F00F8F00F8F00F0F8F07DDDDDDDDDDDD7F8888888888888F0F8F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF088F0F - 8F0DD0F8F0777777777777770F8F07DDDDDDDDDDDD0000000000000000078F08 - 8F0DD0F8F0F8887F8887F8880F8F07DDDDDDDDDDDDDDDD7F8888888888888F0F - 8F0DD0F8F0F0087F0087F0080F8F07DDDDDDDDDDDDDDDD7FFFFFFFFFFFFFFF08 - 8F0DD0F8F0FFFF7FFFF7FFFF0F8F07DDDDDDDDDDDDDDDD00000000000000000F - 8F0DD0888000000000000000088807DDDDDDDDDDDDDDDDDDDD7F888888888888 - 8F0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD7FFFFFFFFFFFFF - FF0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD00000000000000 - 000DD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 33 - Width = 212 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 0 - OnClick = LookAndFeelClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 142 - Width = 200 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 119 - Width = 200 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 96 - Width = 200 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Suppress Background Images' - TabOrder = 4 - OnClick = OptionsFormatingClick - end - object chbxConsumeSelectionStyle: TCheckBox - Tag = 2 - Left = 90 - Top = 203 - Width = 200 - Height = 17 - Caption = 'Consume Selection Style' - TabOrder = 5 - OnClick = OptionsFormatingClick - end - object chbxPaginateOneGroupPerPage: TCheckBox - Tag = 1 - Left = 90 - Top = 274 - Width = 200 - Height = 17 - Caption = 'One Group Per Page' - TabOrder = 7 - OnClick = OptionsPaginationClick - end - object chbxPaginateByTopLevelGroups: TCheckBox - Left = 90 - Top = 251 - Width = 200 - Height = 17 - Caption = 'By TopLevel Groups' - TabOrder = 6 - OnClick = OptionsPaginationClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 5 - object bvlStyles: TBevel - Left = 118 - Top = 12 - Width = 191 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 295 - Width = 237 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 291 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 219 - end - object Label1: TLabel - Left = 76 - Top = 135 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 14 - Height = 17 - TabOrder = 0 - OnClick = OptionsFormatingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 311 - Width = 302 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 343 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = StyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 83 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = StyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 160 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = StyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 237 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = StyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 2 - object lblPreviewOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPreviewOptions: TBevel - Left = 50 - Top = 12 - Width = 261 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewMaxLineCount: TLabel - Left = 91 - Top = 73 - Width = 78 - Height = 13 - Caption = 'Max Line Count:' - end - object bvlPreviewMaxLineCountHost: TBevel - Left = 229 - Top = 69 - Width = 68 - Height = 21 - Visible = False - end - object imgPreview: TImage - Left = 9 - Top = 28 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F888F7FF888F7F8888F7F07DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7F888F7FF888F7FF888F7F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxPreviewVisible: TCheckBox - Left = 90 - Top = 28 - Width = 150 - Height = 17 - Caption = 'Visible' - TabOrder = 0 - OnClick = PreviewVisibleClick - end - object chbxPreviewAutoHeight: TCheckBox - Left = 90 - Top = 49 - Width = 150 - Height = 17 - Caption = 'Auto Height' - TabOrder = 1 - OnClick = PreviewAutoHeightClick - end - end - object tshCards: TTabSheet - Caption = 'Cards' - ImageIndex = 3 - object bvlCardSpaceVertHost: TBevel - Left = 231 - Top = 140 - Width = 75 - Height = 21 - Visible = False - end - object bvlCardSpaceHorzHost: TBevel - Left = 231 - Top = 112 - Width = 75 - Height = 21 - Visible = False - end - object lblCardSpaceVert: TLabel - Left = 90 - Top = 145 - Width = 39 - Height = 13 - Caption = 'Vertical:' - end - object lblCardSpaceHorz: TLabel - Left = 90 - Top = 116 - Width = 52 - Height = 13 - Caption = 'Horizontal:' - end - object imgCardSpacing: TImage - Left = 9 - Top = 112 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDD000000000000000000000000000000DDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD7DD0DDDDDD707000DDDDDD0DD7DDDDDDDDDDDDDDD - DDDDDDDDD0000000000000000000DDDDDD0D0D0DDDDDD0000000000000000000 - 0DDDDDDD77777777777777777770DDDDD00D0D0DDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDD0D000DDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF77777FF70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF77FFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF77FFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD7777777777777777777 - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardSpacing: TLabel - Left = 5 - Top = 92 - Width = 37 - Height = 13 - Caption = 'Spacing' - end - object bvlCardSpacing: TBevel - Left = 51 - Top = 97 - Width = 260 - Height = 4 - Shape = bsBottomLine - end - object bvlCardSizes: TBevel - Left = 34 - Top = 12 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object lblCardSizes: TLabel - Left = 5 - Top = 8 - Width = 24 - Height = 13 - Caption = 'Sizes' - end - object imgCardSizes: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDD000000000000DDDDDDDDDDDDDDDDDDDDDDDD000000000000DD00000000 - 0000D7777777777770DDDDDDDDDDDDDDDDDDDDDDD7777777777770D777777777 - 7770D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DD0000000000DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D77777777770DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8FFF70DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8F7F70DDDDDDDDDDD7FFFFF8F77F70D7FFFFF8F7 - FF70D7F777F8FFFF70D7FFFF8FFF70DDDDDDDDDDD7F777F8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - 7F70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F777F8FFFF70D7F77F8F7F70DDDDDDDDDDD7F777F8FFFF70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDCCCCDCCDD7F777F8F77F70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDCCCCDCCDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F7FFF8FFFF70D7F7FF8F7F70DDDDDDDDDDD7F7FFF8FFFF70D7F7FFF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D777777777777DD7777777777DDDDDDDDDDDD777777777777DD777777777 - 777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgCardFraming: TImage - Left = 9 - Top = 189 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD00000000000000000 - 00DDDDDDD88888888888888888887DDDDDDDDDDDDDDDDD000000000000000000 - 00DDDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF - 00DDDDD778FFFFFFF8FFF9999FF87DDDDDDDDDDDDDDD000FFFFFFF0FFF9999FF - 00DDDD8888FFFFFFF8FFF9999FF87DDDDDDDDDDDDDD0000FFFFFFF0FFF9999FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCDDDDCDDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCCCCDCCDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCCCCCDDD0FF0F77777F0FCCCCFFFF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCDCCDDDD0FF0F77777F0FCCCCFFFF - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF77777FF87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF77FFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF77FFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDCDDDDCDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCCCCDCCDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDCCCCCCCCDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDCCCCDCCDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F78888888888888888888DDDDDDDDDDDDDDD0F7000000000000000000 - 0DDDDD8F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDDDDD0F7FFFFF0FF7FFFFFF00D - DDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF00D - DDDDDD8888888888888888888DDDDDDDDDDDDDDDDDD0000000000000000000DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardFraming: TLabel - Left = 5 - Top = 171 - Width = 38 - Height = 13 - Caption = 'Framing' - end - object bvlCardFraming: TBevel - Left = 49 - Top = 176 - Width = 262 - Height = 4 - Shape = bsBottomLine - end - object bvlCardShadowColorHost: TBevel - Left = 177 - Top = 276 - Width = 129 - Height = 21 - Visible = False - end - object lblCardShadowDepth: TLabel - Left = 90 - Top = 308 - Width = 33 - Height = 13 - Caption = 'Depth:' - end - object bvlCardShadow: TBevel - Left = 48 - Top = 260 - Width = 263 - Height = 4 - Shape = bsBottomLine - end - object lblCardShadow: TLabel - Left = 5 - Top = 255 - Width = 38 - Height = 13 - Caption = 'Shadow' - end - object lblCardShadowColor: TLabel - Left = 90 - Top = 280 - Width = 29 - Height = 13 - Caption = 'Color:' - end - object bvlCardShadowDepthHost: TBevel - Left = 177 - Top = 304 - Width = 129 - Height = 21 - Visible = False - end - object imgCardShadow: TImage - Left = 9 - Top = 276 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF77777FFFFF7DDDDCDDDDCDDDDD7F77777F7FF77777FFFFF - 700DDD7F7FFFFF7FF77FFFFFFFF7DDDDCCCCDCCDDDD7F7FFFFF7FF77FFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDCCCCDCCDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 7DDDDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 7DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxCardsKeepSameHeight: TCheckBox - Tag = 2 - Left = 90 - Top = 70 - Width = 200 - Height = 17 - Caption = 'Keep Same Height' - TabOrder = 2 - OnClick = OptionsCardsClick - end - object chbxCardsKeepSameWidth: TCheckBox - Tag = 1 - Left = 90 - Top = 49 - Width = 200 - Height = 17 - Caption = 'Keep Same Width' - TabOrder = 1 - OnClick = OptionsCardsClick - end - object chbxCardsAutoWidth: TCheckBox - Left = 90 - Top = 28 - Width = 200 - Height = 17 - Caption = 'Auto Width' - TabOrder = 0 - OnClick = OptionsCardsClick - end - object chbxCardsVertLines: TCheckBox - Tag = 5 - Left = 90 - Top = 231 - Width = 200 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 5 - OnClick = OptionsCardsClick - end - object chbxCardsHorzLines: TCheckBox - Tag = 4 - Left = 90 - Top = 210 - Width = 200 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 4 - OnClick = OptionsCardsClick - end - object chbxCardsBorder: TCheckBox - Tag = 3 - Left = 90 - Top = 189 - Width = 200 - Height = 17 - Caption = 'Border' - TabOrder = 3 - OnClick = OptionsCardsClick - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 44 - Width = 306 - Height = 350 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewGrid: TcxGrid - Left = 5 - Top = 7 - Width = 296 - Height = 337 - TabOrder = 0 - LookAndFeel.NativeStyle = False - RootLevelOptions.DetailTabsPosition = dtpTop - object PreviewBandedView: TcxGridBandedTableView - DataController.Summary.DefaultGroupSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Position = spFooter - Column = colVendorName - end> - DataController.Summary.FooterSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Column = colVendorName - end> - DataController.Summary.SummaryGroups = <> - NavigatorButtons.ConfirmDelete = False - Filtering.CustomizeDialog = False - Filtering.Visible = fvAlways - OptionsView.ScrollBars = ssNone - OptionsView.CellAutoHeight = True - OptionsView.ColumnAutoWidth = True - OptionsView.Footer = True - OptionsView.GroupByBox = False - OptionsView.GroupFooters = gfAlwaysVisible - Preview.Column = colVendorCountry - Preview.Visible = True - OnCustomDrawColumnHeader = PreviewBandedViewCustomDrawColumnHeader - OnCustomDrawFooterCell = PreviewBandedViewCustomDrawFooterCell - Bands = < - item - Caption = 'Vendor Data' - Width = 150 - end - item - Caption = 'Car Data' - end> - OnCustomDrawBandHeader = PreviewBandedViewCustomDrawBandHeader - object colVendorName: TcxGridBandedColumn - Caption = 'Name' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colVendorLogo: TcxGridBandedColumn - Caption = 'Logo' - PropertiesClassName = 'TcxImageProperties' - Properties.GraphicTransparency = gtTransparent - OnCustomDrawCell = VendorLogoCustomDrawCell - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - object colVendorCountry: TcxGridBandedColumn - PropertiesClassName = 'TcxTextEditProperties' - Position.BandIndex = 0 - Position.ColIndex = 2 - Position.RowIndex = 0 - end - object colCarModel: TcxGridBandedColumn - Caption = 'Model' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 1 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colIsSUVModel: TcxGridBandedColumn - Caption = 'SUV' - PropertiesClassName = 'TcxCheckBoxProperties' - Properties.ValueGrayed = #39#39 - OnCustomDrawCell = IsSUVModelCustomDrawCell - HeaderAlignmentHorz = taCenter - Options.Filtering = False - Width = 30 - Position.BandIndex = 1 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - end - object PreviewGridLevel: TcxGridLevel - Caption = 'Cars' - end - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 4 - Top = 408 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 32 - Top = 408 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxStyleRepository1: TcxStyleRepository - Left = 60 - Top = 408 - object styleCardShadow: TcxStyle - end - object styleCardBorder: TcxStyle - AssignedValues = [svColor] - Color = clWindow - end - end -end diff --git a/internal/x.46/Lib/D11/dxPScxGrid4LnkPredefinedStyleSheets.dfm b/internal/x.46/Lib/D11/dxPScxGrid4LnkPredefinedStyleSheets.dfm deleted file mode 100644 index aa92920a..00000000 --- a/internal/x.46/Lib/D11/dxPScxGrid4LnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,352 +0,0 @@ -object dxdmPScxGridLnkPredefinedStyles: TdxdmPScxGridLnkPredefinedStyles - OldCreateOrder = False - Left = 352 - Top = 156 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 37 - Top = 12 - object styleProfessionalFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3355443 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6582120 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalCaptionRow: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14541789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGreenFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGreenFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12778719 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14154698 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenSelected: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4949549 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11328403 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentBandHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsItalic] - TextColor = clBlack - end - object styleTransparentLevelCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFilterBar: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentCaptionRow: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13816275 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TdxGridReportLinkStyleSheet - Caption = 'Professional' - Styles.BandHeader = styleProfessionalFixed - Styles.Caption = styleProfessionalFixed - Styles.CardCaptionRow = styleProfessionalCaptionRow - Styles.CardRowCaption = styleProfessionalRowCaption - Styles.Content = styleNoneContent - Styles.ContentEven = styleProfessionalContentEven - Styles.ContentOdd = styleProfessionalContentOdd - Styles.FilterBar = styleProfessionalFixed - Styles.Footer = styleProfessionalFixed - Styles.Group = styleProfessionalGroup - Styles.Header = styleProfessionalFixed - Styles.Preview = styleProfessionalPreview - Styles.Selection = styleProfessionalSelection - BuiltIn = True - end - object ssGreen: TdxGridReportLinkStyleSheet - Caption = 'Green' - Styles.BandHeader = styleGreenFixed - Styles.Caption = styleGreenFixed - Styles.CardCaptionRow = styleGreenFixed - Styles.CardRowCaption = styleGreenFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleGreenLightContent - Styles.ContentOdd = styleNoneContent - Styles.FilterBar = styleGreenFixed - Styles.Footer = styleGreenFixed - Styles.Group = styleGreenGroup - Styles.Header = styleGreenFixed - Styles.Preview = styleGreenLightPreview - Styles.Selection = styleGreenSelected - BuiltIn = True - end - object ssTransparent: TdxGridReportLinkStyleSheet - Caption = 'Transparent' - Styles.BandHeader = styleTransparentBandHeader - Styles.Caption = styleTransparentLevelCaption - Styles.CardCaptionRow = styleTransparentCaptionRow - Styles.CardRowCaption = styleTransparentRowCaption - Styles.Content = styleTransparentContent - Styles.ContentEven = styleTransparentContentEven - Styles.ContentOdd = styleTransparentContentOdd - Styles.FilterBar = styleTransparentFilterBar - Styles.Footer = styleTransparentFooter - Styles.Group = styleTransparentGroup - Styles.Header = styleTransparentHeader - Styles.Preview = styleTransparentPreview - Styles.Selection = styleTransparentSelection - BuiltIn = True - end - end -end diff --git a/internal/x.46/Lib/D11/dxPScxGrid6Lnk.dcu b/internal/x.46/Lib/D11/dxPScxGrid6Lnk.dcu deleted file mode 100644 index af0fadea..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxGrid6Lnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxGrid6Lnk.dfm b/internal/x.46/Lib/D11/dxPScxGrid6Lnk.dfm deleted file mode 100644 index b27d54ec..00000000 --- a/internal/x.46/Lib/D11/dxPScxGrid6Lnk.dfm +++ /dev/null @@ -1,1961 +0,0 @@ -object dxfmGridReportLinkDesignWindow: TdxfmGridReportLinkDesignWindow - Left = 438 - Top = 133 - BorderStyle = bsDialog - Caption = 'fmdxGridDesignWindow' - ClientHeight = 450 - ClientWidth = 648 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 5 - Top = 5 - Width = 639 - Height = 405 - ActivePage = tshBehaviors - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 9 - Top = 37 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 12 - Width = 266 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 164 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object imgOnEveryPage: TImage - Left = 9 - Top = 189 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlOnEveryPage: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object bvlWarningHost: TBevel - Left = 4 - Top = 289 - Width = 313 - Height = 76 - Visible = False - end - object chbxShowBands: TCheckBox - Tag = 1 - Left = 90 - Top = 42 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 1 - OnClick = OptionsViewClick - end - object chbxShowHeaders: TCheckBox - Tag = 2 - Left = 90 - Top = 63 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowFooters: TCheckBox - Tag = 3 - Left = 90 - Top = 84 - Width = 200 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 3 - OnClick = OptionsViewClick - end - object chbxShowGroupFooters: TCheckBox - Tag = 4 - Left = 90 - Top = 104 - Width = 200 - Height = 17 - Caption = 'G&roup Footers' - TabOrder = 4 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 5 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 5 - OnClick = OptionsViewClick - end - object chbxBandsOnEveryPage: TCheckBox - Tag = 1 - Left = 90 - Top = 202 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 8 - OnClick = OptionsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Tag = 2 - Left = 90 - Top = 223 - Width = 200 - Height = 17 - Caption = 'Headers' - TabOrder = 9 - OnClick = OptionsOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Tag = 3 - Left = 90 - Top = 245 - Width = 200 - Height = 17 - Caption = 'Footers' - TabOrder = 10 - OnClick = OptionsOnEveryPageClick - end - object chbxFilterBarOnEveryPage: TCheckBox - Tag = 4 - Left = 90 - Top = 266 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 11 - OnClick = OptionsOnEveryPageClick - end - object chbxCaptionsOnEveryPage: TCheckBox - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 7 - OnClick = OptionsOnEveryPageClick - end - object chbxShowCaptions: TCheckBox - Left = 90 - Top = 22 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowFilterBar: TCheckBox - Tag = 6 - Left = 90 - Top = 146 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 6 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 323 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 12 - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblSelection: TLabel - Left = 5 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object imgSelection: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlSelection: TBevel - Left = 56 - Top = 12 - Width = 255 - Height = 4 - Shape = bsBottomLine - end - object lblExpanding: TLabel - Left = 5 - Top = 67 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 9 - Top = 88 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 72 - Width = 248 - Height = 4 - Shape = bsBottomLine - end - object lblDetails: TLabel - Left = 5 - Top = 204 - Width = 32 - Height = 13 - Caption = 'Details' - end - object bvlDetails: TBevel - Left = 47 - Top = 209 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object imgDetails: TImage - Left = 9 - Top = 225 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0889999999999999999999907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897F78FF7FF77777788F907DDDDDDDDDDDD0FF777FFFF7FFF7777FFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF77777777F - F07DD0889777777777777777777907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F777F7FF7777888FF907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCCCCCDD0FF7777FFF7FF7777777FF - F07DD0889777777777777777777907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F788F7FF77778FFFF907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF777777777 - F07DD0889777777777777777777907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0777777777777777777777 - 707DD08897F888F7FF7777788FF907DDCCCCCCCCDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0FF77777FF7FF7777777FF - F07DD0889000000000000000000907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897888880F8888888888907DDDDDDDDDDDD0777777777777777777777 - 707DD08897F77780F8777777778907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFF80FFFFFFFFFFF907DDDDDDDDDDDD0FF7777FFF7FF7777777FF - F07DD0889000000000000000000907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0889999999999999999999907DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0F0F777777FF77777777FFF07DDDDDDDDDDDD0FF77777FF7FF77777777F - F07DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F888888880F8888888888807DDDDDDDDDDDD0F888888880F8888888888 - 807DD0F877778880F8777777777807DDDDDDDDDDDD0F877777880F8777777778 - 807DD0FFFFFFFFF0FFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF0FFFFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgLevels: TImage - Left = 9 - Top = 288 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0888888888888888888888807DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F000FF8F000FF8FCCCC44F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F77F7F8FCC99F - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F666CCCF07DDDDDDDDDDDDD0F7F77F8F777FF8FCC99F - 7F07D0F0000F8F00F0F8F999999F07DDCDDDDCDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7888888888888888888 - 7F07D0888888888888888888888807DDCCCCCCCCDDD0F7F77F8F777FF8FC99CF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F00FFF8F0000F8F9999CCF07DDCDDDDCDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F99AAACF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F0000F8F000FF8F9999CCF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F0000000000000000000 - 0F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F0000F8F000FF8FB99944F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0777777777777777777777707DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F000087F800087F800000807DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF7FFFFFF7FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0000000000000000000000007DDCDDDDCDDDDD0F7888888888888888888 - 7F07D7F88880777777777777777778DDCCCCDCCDDDD0F7777777777777777777 - 7F07D7F00080F87777788088888888DDCCCCCCCCDDD0F7777777777777777777 - 7F07D7F77780FFFFFFFFF088888888DDCCCCDCCDDDD0F0000000000000000000 - 0F07D7FFFFF0777777777088888888DDCDDDDCDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D7777770888888888888888888DDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblLevels: TLabel - Left = 5 - Top = 267 - Width = 30 - Height = 13 - Caption = 'Levels' - end - object bvlLevels: TBevel - Left = 47 - Top = 272 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object lblGridSize: TLabel - Left = 5 - Top = 140 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlGridSize: TBevel - Left = 33 - Top = 144 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 9 - Top = 162 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxProcessSelection: TCheckBox - Left = 90 - Top = 25 - Width = 200 - Height = 17 - Caption = 'Process Selection' - TabOrder = 0 - OnClick = OptionsSelectionClick - end - object chbxProcessExactSelection: TCheckBox - Tag = 1 - Left = 90 - Top = 46 - Width = 200 - Height = 17 - Caption = 'Process Exact Selection' - TabOrder = 1 - OnClick = OptionsSelectionClick - end - object chbxExpandGroupRows: TCheckBox - Left = 90 - Top = 82 - Width = 200 - Height = 17 - Caption = 'Groups' - TabOrder = 2 - OnClick = OptionsExpandingClick - end - object chbxExpandMasterRows: TCheckBox - Tag = 1 - Left = 90 - Top = 104 - Width = 200 - Height = 17 - Caption = 'Details' - TabOrder = 3 - OnClick = OptionsExpandingClick - end - object chbxStartFromActiveView: TCheckBox - Left = 90 - Top = 222 - Width = 200 - Height = 17 - Caption = 'Start From Active Details' - TabOrder = 6 - OnClick = OptionsDetailsClick - end - object chbxOnlyActiveView: TCheckBox - Tag = 1 - Left = 90 - Top = 244 - Width = 200 - Height = 17 - Caption = 'Only Active Details' - TabOrder = 7 - OnClick = OptionsDetailsClick - end - object chbxLevelsUnwrap: TCheckBox - Left = 90 - Top = 285 - Width = 200 - Height = 17 - Caption = '&Unwrap' - TabOrder = 8 - OnClick = OptionsLevelsClick - end - object chbxLevelsUnwrapTopLevel: TCheckBox - Tag = 1 - Left = 90 - Top = 308 - Width = 200 - Height = 17 - Caption = 'Unwrap Top Level' - TabOrder = 9 - OnClick = OptionsLevelsClick - end - object chbxLevelsRiseActiveLevelOntoTop: TCheckBox - Tag = 2 - Left = 90 - Top = 331 - Width = 200 - Height = 17 - Caption = 'Rise Active Level onto Top' - TabOrder = 10 - OnClick = OptionsLevelsClick - end - object chbxGridAutoWidth: TCheckBox - Left = 90 - Top = 159 - Width = 200 - Height = 17 - Caption = '&Auto Width' - TabOrder = 5 - OnClick = OptionsSizeClick - end - object chbxExpandCards: TCheckBox - Tag = 2 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = 'Cards' - TabOrder = 4 - OnClick = OptionsExpandingClick - end - object chbxLevelsSkipEmptyViews: TCheckBox - Tag = 3 - Left = 90 - Top = 353 - Width = 200 - Height = 17 - Caption = 'Skip Empty Views' - TabOrder = 11 - OnClick = OptionsLevelsClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 12 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 9 - Top = 95 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 74 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 79 - Width = 241 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object lblPagination: TLabel - Left = 5 - Top = 229 - Width = 50 - Height = 13 - Caption = 'Pagination' - end - object bvlPagination: TBevel - Left = 64 - Top = 234 - Width = 247 - Height = 4 - Shape = bsBottomLine - end - object imgPagination: TImage - Left = 8 - Top = 251 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD0000000000000000000000007DDDDDDDDDDDD77777777777777770DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7F8888888888888F0DDDDD - DDDDD0888000000000000000088F07DDDDDDDDDDDD7F8777877778778F07770D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8888888888888F0FFF0D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0D - DDDDD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8888888888888F078F07 - 770DD0F990FFFF8FFFF8FFFF099F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0F - FF0DD0F99999999999999999999F07DDCDDDDCDDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCDCCDDD7F8888888888888F088F07 - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F8F0FFFF8F00F8F00F0F8F07DDCDDDDCDDDD7F8888888888888F088F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCDDDDCDDDD7F8888888888888F088F0F - 8F0DD0F99999999999999999999F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCDCCDDD7F8888888888888F088F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCDDDDCDDDD7F8777877778778F0F8F08 - 8F0DD0F8F0F00F8F00F8F00F0F8F07DDDDDDDDDDDD7F8888888888888F0F8F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF088F0F - 8F0DD0F8F0777777777777770F8F07DDDDDDDDDDDD0000000000000000078F08 - 8F0DD0F8F0F8887F8887F8880F8F07DDDDDDDDDDDDDDDD7F8888888888888F0F - 8F0DD0F8F0F0087F0087F0080F8F07DDDDDDDDDDDDDDDD7FFFFFFFFFFFFFFF08 - 8F0DD0F8F0FFFF7FFFF7FFFF0F8F07DDDDDDDDDDDDDDDD00000000000000000F - 8F0DD0888000000000000000088807DDDDDDDDDDDDDDDDDDDD7F888888888888 - 8F0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD7FFFFFFFFFFFFF - FF0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD00000000000000 - 000DD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 33 - Width = 212 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnClick = LookAndFeelClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 142 - Width = 200 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 119 - Width = 200 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 96 - Width = 200 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Suppress Background Images' - TabOrder = 4 - OnClick = OptionsFormatingClick - end - object chbxConsumeSelectionStyle: TCheckBox - Tag = 2 - Left = 90 - Top = 203 - Width = 200 - Height = 17 - Caption = 'Consume Selection Style' - TabOrder = 5 - OnClick = OptionsFormatingClick - end - object chbxPaginateOneGroupPerPage: TCheckBox - Tag = 1 - Left = 90 - Top = 274 - Width = 200 - Height = 17 - Caption = 'One Group Per Page' - TabOrder = 7 - OnClick = OptionsPaginationClick - end - object chbxPaginateByTopLevelGroups: TCheckBox - Left = 90 - Top = 251 - Width = 200 - Height = 17 - Caption = 'By TopLevel Groups' - TabOrder = 6 - OnClick = OptionsPaginationClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 5 - object bvlStyles: TBevel - Left = 118 - Top = 12 - Width = 191 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 295 - Width = 237 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 291 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 219 - end - object Label1: TLabel - Left = 76 - Top = 135 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 14 - Height = 17 - TabOrder = 0 - OnClick = OptionsFormatingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 311 - Width = 302 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 343 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = StyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 83 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = StyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 160 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = StyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 237 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = StyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 2 - object lblPreviewOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPreviewOptions: TBevel - Left = 50 - Top = 12 - Width = 261 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewMaxLineCount: TLabel - Left = 91 - Top = 73 - Width = 78 - Height = 13 - Caption = 'Max Line Count:' - end - object bvlPreviewMaxLineCountHost: TBevel - Left = 229 - Top = 69 - Width = 68 - Height = 21 - Visible = False - end - object imgPreview: TImage - Left = 9 - Top = 28 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F888F7FF888F7F8888F7F07DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7F888F7FF888F7FF888F7F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxPreviewVisible: TCheckBox - Left = 90 - Top = 28 - Width = 150 - Height = 17 - Caption = 'Visible' - TabOrder = 0 - OnClick = PreviewVisibleClick - end - object chbxPreviewAutoHeight: TCheckBox - Left = 90 - Top = 49 - Width = 150 - Height = 17 - Caption = 'Auto Height' - TabOrder = 1 - OnClick = PreviewAutoHeightClick - end - end - object tshCards: TTabSheet - Caption = 'Cards' - ImageIndex = 3 - object bvlCardSpaceVertHost: TBevel - Left = 231 - Top = 140 - Width = 75 - Height = 21 - Visible = False - end - object bvlCardSpaceHorzHost: TBevel - Left = 231 - Top = 112 - Width = 75 - Height = 21 - Visible = False - end - object lblCardSpaceVert: TLabel - Left = 90 - Top = 145 - Width = 39 - Height = 13 - Caption = 'Vertical:' - end - object lblCardSpaceHorz: TLabel - Left = 90 - Top = 116 - Width = 52 - Height = 13 - Caption = 'Horizontal:' - end - object imgCardSpacing: TImage - Left = 9 - Top = 112 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDD000000000000000000000000000000DDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD7DD0DDDDDD707000DDDDDD0DD7DDDDDDDDDDDDDDD - DDDDDDDDD0000000000000000000DDDDDD0D0D0DDDDDD0000000000000000000 - 0DDDDDDD77777777777777777770DDDDD00D0D0DDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDD0D000DDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF77777FF70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF77FFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF77FFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD7777777777777777777 - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardSpacing: TLabel - Left = 5 - Top = 92 - Width = 37 - Height = 13 - Caption = 'Spacing' - end - object bvlCardSpacing: TBevel - Left = 51 - Top = 97 - Width = 260 - Height = 4 - Shape = bsBottomLine - end - object bvlCardSizes: TBevel - Left = 34 - Top = 12 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object lblCardSizes: TLabel - Left = 5 - Top = 8 - Width = 24 - Height = 13 - Caption = 'Sizes' - end - object imgCardSizes: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDD000000000000DDDDDDDDDDDDDDDDDDDDDDDD000000000000DD00000000 - 0000D7777777777770DDDDDDDDDDDDDDDDDDDDDDD7777777777770D777777777 - 7770D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DD0000000000DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D77777777770DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8FFF70DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8F7F70DDDDDDDDDDD7FFFFF8F77F70D7FFFFF8F7 - FF70D7F777F8FFFF70D7FFFF8FFF70DDDDDDDDDDD7F777F8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - 7F70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F777F8FFFF70D7F77F8F7F70DDDDDDDDDDD7F777F8FFFF70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDCCCCDCCDD7F777F8F77F70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDCCCCDCCDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F7FFF8FFFF70D7F7FF8F7F70DDDDDDDDDDD7F7FFF8FFFF70D7F7FFF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D777777777777DD7777777777DDDDDDDDDDDD777777777777DD777777777 - 777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgCardFraming: TImage - Left = 9 - Top = 189 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD00000000000000000 - 00DDDDDDD88888888888888888887DDDDDDDDDDDDDDDDD000000000000000000 - 00DDDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF - 00DDDDD778FFFFFFF8FFF9999FF87DDDDDDDDDDDDDDD000FFFFFFF0FFF9999FF - 00DDDD8888FFFFFFF8FFF9999FF87DDDDDDDDDDDDDD0000FFFFFFF0FFF9999FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCDDDDCDDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCCCCDCCDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCCCCCDDD0FF0F77777F0FCCCCFFFF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCDCCDDDD0FF0F77777F0FCCCCFFFF - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF77777FF87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF77FFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF77FFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDCDDDDCDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCCCCDCCDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDCCCCCCCCDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDCCCCDCCDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F78888888888888888888DDDDDDDDDDDDDDD0F7000000000000000000 - 0DDDDD8F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDDDDD0F7FFFFF0FF7FFFFFF00D - DDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF00D - DDDDDD8888888888888888888DDDDDDDDDDDDDDDDDD0000000000000000000DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardFraming: TLabel - Left = 5 - Top = 171 - Width = 38 - Height = 13 - Caption = 'Framing' - end - object bvlCardFraming: TBevel - Left = 49 - Top = 176 - Width = 262 - Height = 4 - Shape = bsBottomLine - end - object bvlCardShadowColorHost: TBevel - Left = 177 - Top = 276 - Width = 129 - Height = 21 - Visible = False - end - object lblCardShadowDepth: TLabel - Left = 90 - Top = 308 - Width = 33 - Height = 13 - Caption = 'Depth:' - end - object bvlCardShadow: TBevel - Left = 48 - Top = 260 - Width = 263 - Height = 4 - Shape = bsBottomLine - end - object lblCardShadow: TLabel - Left = 5 - Top = 255 - Width = 38 - Height = 13 - Caption = 'Shadow' - end - object lblCardShadowColor: TLabel - Left = 90 - Top = 280 - Width = 29 - Height = 13 - Caption = 'Color:' - end - object bvlCardShadowDepthHost: TBevel - Left = 177 - Top = 304 - Width = 129 - Height = 21 - Visible = False - end - object imgCardShadow: TImage - Left = 9 - Top = 276 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF77777FFFFF7DDDDCDDDDCDDDDD7F77777F7FF77777FFFFF - 700DDD7F7FFFFF7FF77FFFFFFFF7DDDDCCCCDCCDDDD7F7FFFFF7FF77FFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDCCCCDCCDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 7DDDDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 7DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxCardsKeepSameHeight: TCheckBox - Tag = 2 - Left = 90 - Top = 70 - Width = 200 - Height = 17 - Caption = 'Keep Same Height' - TabOrder = 2 - OnClick = OptionsCardsClick - end - object chbxCardsKeepSameWidth: TCheckBox - Tag = 1 - Left = 90 - Top = 49 - Width = 200 - Height = 17 - Caption = 'Keep Same Width' - TabOrder = 1 - OnClick = OptionsCardsClick - end - object chbxCardsAutoWidth: TCheckBox - Left = 90 - Top = 28 - Width = 200 - Height = 17 - Caption = 'Auto Width' - TabOrder = 0 - OnClick = OptionsCardsClick - end - object chbxCardsVertLines: TCheckBox - Tag = 5 - Left = 90 - Top = 231 - Width = 200 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 5 - OnClick = OptionsCardsClick - end - object chbxCardsHorzLines: TCheckBox - Tag = 4 - Left = 90 - Top = 210 - Width = 200 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 4 - OnClick = OptionsCardsClick - end - object chbxCardsBorder: TCheckBox - Tag = 3 - Left = 90 - Top = 189 - Width = 200 - Height = 17 - Caption = 'Border' - TabOrder = 3 - OnClick = OptionsCardsClick - end - end - object tshCharts: TTabSheet - Caption = 'Charts' - ImageIndex = 6 - object lblChartsOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object imgCharts: TImage - Left = 9 - Top = 28 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDD777777777777777777777777DDDDDDD000000000000000000000000 - 7DDDDDDD0887FFFFFFFFFFFFFFFFFFF07DDDDDDD0887F8888888888888888880 - 7DDDDDDD0887F8FC491A2FFC491A2FF07DDDDDDD0887F8FC491A2FFC491A2FF0 - 7DDDDDDD0887F8FC4FFA2FFC491A2FF07DDDDDDD0887F8FC4FFA2FFC4FFA2FF0 - 7DDDDDDD0887F8FFFFFFFFFFFFFFFFF07DDDDDDD088777777777777777777770 - 7DDDDDDD0888888888888888888888807DDDDDDD087807777777788888888880 - 7DDDDDDD0888888888888888888888807DDDDDDD077777777777777777777770 - 7DDDDDDD0887FFFFFFFFFFFFFFFFFFF07DDDDDDD0887F8888888888888888880 - 7DDDDDDD0887F8FC491A2FFC491A2FF07DDDDDDD0887F8FC491A2FFC491A2FF0 - 7DDDDDDD0887F8FC491FFFFC491A2FF07DDDDDDD0887F8FFF91FFFFC4FFA2FF0 - 7DDDDDDD0887F8FFFFFFFFFFFFFFFFF07DDDDDDD088777777777777777777770 - 7DDDDDDD0888888888888888888888807DDDDDDD087800777777788888888880 - 7DDDDDDD0888888888888888888888807DDDDDDD077777777777777777777770 - 7DDDDDDD0F8888887F888888888888807DDDDDDD0F8000087F80000000088880 - 7DDDDDDD0F8888887F888888888888807DDDDDDD0FFFFFFF7FFFFFFFFFFFFFF0 - 7DDDDDDD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlChartsOptions: TBevel - Left = 57 - Top = 12 - Width = 254 - Height = 4 - Shape = bsBottomLine - end - object chbxChartsTransparent: TCheckBox - Left = 90 - Top = 28 - Width = 200 - Height = 17 - Caption = 'Transparent' - TabOrder = 0 - OnClick = chbxChartsTransparentClick - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 44 - Width = 306 - Height = 350 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewGrid: TcxGrid - Left = 5 - Top = 7 - Width = 296 - Height = 337 - TabOrder = 0 - LookAndFeel.NativeStyle = False - RootLevelOptions.DetailTabsPosition = dtpTop - object PreviewBandedView: TcxGridBandedTableView - NavigatorButtons.ConfirmDelete = False - FilterBox.CustomizeDialog = False - FilterBox.Visible = fvAlways - DataController.Summary.DefaultGroupSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Position = spFooter - Column = colVendorName - end> - DataController.Summary.FooterSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Column = colVendorName - end> - DataController.Summary.SummaryGroups = <> - OptionsView.ScrollBars = ssNone - OptionsView.CellAutoHeight = True - OptionsView.ColumnAutoWidth = True - OptionsView.Footer = True - OptionsView.GroupByBox = False - OptionsView.GroupFooters = gfAlwaysVisible - Preview.Column = colVendorCountry - Preview.Visible = True - OnCustomDrawColumnHeader = PreviewBandedViewCustomDrawColumnHeader - OnCustomDrawFooterCell = PreviewBandedViewCustomDrawFooterCell - Bands = < - item - Caption = 'Vendor Data' - Width = 150 - end - item - Caption = 'Car Data' - end> - OnCustomDrawBandHeader = PreviewBandedViewCustomDrawBandHeader - object colVendorName: TcxGridBandedColumn - Caption = 'Name' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colVendorLogo: TcxGridBandedColumn - Caption = 'Logo' - PropertiesClassName = 'TcxImageProperties' - Properties.GraphicTransparency = gtTransparent - OnCustomDrawCell = VendorLogoCustomDrawCell - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - object colVendorCountry: TcxGridBandedColumn - PropertiesClassName = 'TcxTextEditProperties' - Position.BandIndex = 0 - Position.ColIndex = 2 - Position.RowIndex = 0 - end - object colCarModel: TcxGridBandedColumn - Caption = 'Model' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 1 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colIsSUVModel: TcxGridBandedColumn - Caption = 'SUV' - PropertiesClassName = 'TcxCheckBoxProperties' - Properties.ValueGrayed = #39#39 - OnCustomDrawCell = IsSUVModelCustomDrawCell - HeaderAlignmentHorz = taCenter - Options.Filtering = False - Width = 30 - Position.BandIndex = 1 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - end - object PreviewGridLevel: TcxGridLevel - Caption = 'Cars' - end - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 4 - Top = 408 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 32 - Top = 408 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001001000000000000018 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000420042000000000000 - 0000000000001863186300000042000000000000000000000000000000000000 - 0000000000000000000000000000FF7F00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000420042004200420042 - 0042004200420042000000000000000000000000000000420042000000000000 - 0000000000001863186300000042000000000000000000000000FF7F00000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000E07F00000042004200420042 - 0042004200420042004200000000000000000000000000420042000000000000 - 00000000000018631863000000420000000000000000000000000000FF7F0000 - 000000000000000000000000FF7F000000000000000000001042104210421042 - 1042104200000000000000000000000000000000FF7FE07F0000004200420042 - 0042004200420042004200420000000000000000000000420042000000000000 - 00000000000000000000000000420000000000000000000000000000FF7F0000 - 00000000000000000000FF7F0000000000000000000000000000000010421042 - 0000000000000000000000000000000000000000E07FFF7F1042000000420042 - 0042004200420042004200420042000000000000000000420042004200420042 - 004200420042004200420042004200000000000000000000000000000000FF7F - 00000000000000000000FF7F0000000000000000000000000000000010420000 - 0000000000000000000000000000000000000000FF7FE07F1042FF7F00000000 - 0000000000000000000000000000000000000000000000420042000000000000 - 0000000000000000000000420042000000000000000000000000000000000000 - FF7F000000000000FF7F00000000000000000000000000000000000010420000 - 0000000000000000000000000000000000000000E07FFF7F1042FF7FFF03FF7F - FF03FF7FFF03FF7FFF03FF7FFF7F000000000000000000420000186318631863 - 1863186318631863186300000042000000000000000000000000000000000000 - 000000000000FF7F000000000000000000000000000000000000000010420000 - 0000000000000000000000000000000000000000FF7FE07F1042FF7FFF7FFF03 - FF7FFF03FF7FFF03FF7FFF03FF7F000000000000000000420000186318631863 - 1863186318631863186300000042000000000000000000000000000000000000 - 00000000FF7F0000000000000000000000000000000010420000000010420000 - 0000000000000000000000000000000000000000E07FFF7F1042FF7FFF031863 - FF03FF7FFF03FF7FFF03FF7FFF7F000000000000000000420000186318631863 - 1863186318631863186300000042000000000000000000000000000000000000 - 000000000000FF7F000000000000000000000000000010420000000010421042 - 0000000010420000000000000000000000000000000000001042FF7F1863E07F - 1863FF03FF7FFF03FF7FFF03FF7F000000000000000000420000186318631863 - 1863186318631863186300000042000000000000000000000000000000000000 - FF7F00000000FF7F000000000000000000000000000010421042000010421042 - 0000104210420000000000000000000000000000000000001042FF7FFF031863 - FF03FF7FFF03FF7FFF03FF7FFF7F000000000000000000420000186318631863 - 186318631863186318630000000000000000000000000000000000000000FF7F - 00000000000000000000FF7F0000000000000000000010421042104210421042 - 1042104210420000000000000000000000000000000000001042FF7FFF7FFF7F - FF7FFF7FFF7FFF7FFF7FFF7FFF7F000000000000000000420000186318631863 - 18631863186318631863000018630000000000000000000000000000FF7F0000 - 000000000000000000000000FF7F000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000001042104210421042 - 1042104210421042104210421042104200000000000000000000000000000000 - 000000000000000000000000000000000000000000000000FF7F000000000000 - 0000000000000000000000000000FF7F00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxStyleRepository1: TcxStyleRepository - Left = 60 - Top = 408 - object styleCardShadow: TcxStyle - end - object styleCardBorder: TcxStyle - AssignedValues = [svColor] - Color = clWindow - end - end -end diff --git a/internal/x.46/Lib/D11/dxPScxGrid6LnkD11.bpl b/internal/x.46/Lib/D11/dxPScxGrid6LnkD11.bpl deleted file mode 100644 index 77d18227..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxGrid6LnkD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxGrid6LnkD11.dcp b/internal/x.46/Lib/D11/dxPScxGrid6LnkD11.dcp deleted file mode 100644 index 904c3eea..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxGrid6LnkD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxGrid6LnkPredefinedStyleSheets.dcu b/internal/x.46/Lib/D11/dxPScxGrid6LnkPredefinedStyleSheets.dcu deleted file mode 100644 index 8b0038b2..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxGrid6LnkPredefinedStyleSheets.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxGrid6LnkPredefinedStyleSheets.dfm b/internal/x.46/Lib/D11/dxPScxGrid6LnkPredefinedStyleSheets.dfm deleted file mode 100644 index aa92920a..00000000 --- a/internal/x.46/Lib/D11/dxPScxGrid6LnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,352 +0,0 @@ -object dxdmPScxGridLnkPredefinedStyles: TdxdmPScxGridLnkPredefinedStyles - OldCreateOrder = False - Left = 352 - Top = 156 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 37 - Top = 12 - object styleProfessionalFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3355443 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6582120 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalCaptionRow: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14541789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGreenFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGreenFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12778719 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14154698 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenSelected: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4949549 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11328403 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentBandHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsItalic] - TextColor = clBlack - end - object styleTransparentLevelCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFilterBar: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentCaptionRow: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13816275 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TdxGridReportLinkStyleSheet - Caption = 'Professional' - Styles.BandHeader = styleProfessionalFixed - Styles.Caption = styleProfessionalFixed - Styles.CardCaptionRow = styleProfessionalCaptionRow - Styles.CardRowCaption = styleProfessionalRowCaption - Styles.Content = styleNoneContent - Styles.ContentEven = styleProfessionalContentEven - Styles.ContentOdd = styleProfessionalContentOdd - Styles.FilterBar = styleProfessionalFixed - Styles.Footer = styleProfessionalFixed - Styles.Group = styleProfessionalGroup - Styles.Header = styleProfessionalFixed - Styles.Preview = styleProfessionalPreview - Styles.Selection = styleProfessionalSelection - BuiltIn = True - end - object ssGreen: TdxGridReportLinkStyleSheet - Caption = 'Green' - Styles.BandHeader = styleGreenFixed - Styles.Caption = styleGreenFixed - Styles.CardCaptionRow = styleGreenFixed - Styles.CardRowCaption = styleGreenFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleGreenLightContent - Styles.ContentOdd = styleNoneContent - Styles.FilterBar = styleGreenFixed - Styles.Footer = styleGreenFixed - Styles.Group = styleGreenGroup - Styles.Header = styleGreenFixed - Styles.Preview = styleGreenLightPreview - Styles.Selection = styleGreenSelected - BuiltIn = True - end - object ssTransparent: TdxGridReportLinkStyleSheet - Caption = 'Transparent' - Styles.BandHeader = styleTransparentBandHeader - Styles.Caption = styleTransparentLevelCaption - Styles.CardCaptionRow = styleTransparentCaptionRow - Styles.CardRowCaption = styleTransparentRowCaption - Styles.Content = styleTransparentContent - Styles.ContentEven = styleTransparentContentEven - Styles.ContentOdd = styleTransparentContentOdd - Styles.FilterBar = styleTransparentFilterBar - Styles.Footer = styleTransparentFooter - Styles.Group = styleTransparentGroup - Styles.Header = styleTransparentHeader - Styles.Preview = styleTransparentPreview - Styles.Selection = styleTransparentSelection - BuiltIn = True - end - end -end diff --git a/internal/x.46/Lib/D11/dxPScxGrid6LnkReg.dcu b/internal/x.46/Lib/D11/dxPScxGrid6LnkReg.dcu deleted file mode 100644 index f094dfe2..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxGrid6LnkReg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxGridLnk.dfm b/internal/x.46/Lib/D11/dxPScxGridLnk.dfm deleted file mode 100644 index 7d2c3cce..00000000 --- a/internal/x.46/Lib/D11/dxPScxGridLnk.dfm +++ /dev/null @@ -1,2143 +0,0 @@ -object dxfmGridReportLinkDesignWindow: TdxfmGridReportLinkDesignWindow - Left = 463 - Top = 133 - BorderStyle = bsDialog - Caption = 'fmdxGridDesignWindow' - ClientHeight = 437 - ClientWidth = 648 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 5 - Top = 5 - Width = 642 - Height = 396 - ActivePage = tshCharts - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 9 - Top = 37 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 12 - Width = 266 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 164 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object imgOnEveryPage: TImage - Left = 9 - Top = 189 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlOnEveryPage: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object bvlWarningHost: TBevel - Left = 4 - Top = 289 - Width = 313 - Height = 77 - Visible = False - end - object chbxShowBands: TCheckBox - Tag = 1 - Left = 90 - Top = 42 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 1 - OnClick = OptionsViewClick - end - object chbxShowHeaders: TCheckBox - Tag = 2 - Left = 90 - Top = 63 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowFooters: TCheckBox - Tag = 3 - Left = 90 - Top = 84 - Width = 200 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 3 - OnClick = OptionsViewClick - end - object chbxShowGroupFooters: TCheckBox - Tag = 4 - Left = 90 - Top = 104 - Width = 200 - Height = 17 - Caption = 'G&roup Footers' - TabOrder = 4 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 5 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 5 - OnClick = OptionsViewClick - end - object chbxBandsOnEveryPage: TCheckBox - Tag = 1 - Left = 90 - Top = 202 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 8 - OnClick = OptionsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Tag = 2 - Left = 90 - Top = 223 - Width = 200 - Height = 17 - Caption = 'Headers' - TabOrder = 9 - OnClick = OptionsOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Tag = 3 - Left = 90 - Top = 245 - Width = 200 - Height = 17 - Caption = 'Footers' - TabOrder = 10 - OnClick = OptionsOnEveryPageClick - end - object chbxFilterBarOnEveryPage: TCheckBox - Tag = 4 - Left = 90 - Top = 266 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 11 - OnClick = OptionsOnEveryPageClick - end - object chbxCaptionsOnEveryPage: TCheckBox - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 7 - OnClick = OptionsOnEveryPageClick - end - object chbxShowCaptions: TCheckBox - Left = 90 - Top = 22 - Width = 200 - Height = 17 - Caption = 'Captions' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowFilterBar: TCheckBox - Tag = 6 - Left = 90 - Top = 146 - Width = 200 - Height = 17 - Caption = 'FilterBar' - TabOrder = 6 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 323 - Top = 1 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 12 - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblSelection: TLabel - Left = 5 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object imgSelection: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlSelection: TBevel - Left = 56 - Top = 12 - Width = 255 - Height = 4 - Shape = bsBottomLine - end - object lblExpanding: TLabel - Left = 5 - Top = 74 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 9 - Top = 95 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 79 - Width = 248 - Height = 4 - Shape = bsBottomLine - end - object lblDetails: TLabel - Left = 5 - Top = 218 - Width = 32 - Height = 13 - Caption = 'Details' - end - object bvlDetails: TBevel - Left = 47 - Top = 223 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object imgDetails: TImage - Left = 9 - Top = 239 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0889999999999999999999907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897F78FF7FF77777788F907DDDDDDDDDDDD0FF777FFFF7FFF7777FFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF77777777F - F07DD0889777777777777777777907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F777F7FF7777888FF907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCCCCCDD0FF7777FFF7FF7777777FF - F07DD0889777777777777777777907DDCCCCDCCDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCDDDDCDDDD0777777777777777777777 - 707DD08897F788F7FF77778FFFF907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDDDDDDDDDDD0FF777777F7FF777777777 - F07DD0889777777777777777777907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0777777777777777777777 - 707DD08897F888F7FF7777788FF907DDCCCCCCCCDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFFF7FFFFFFFFFFF907DDCCCCDCCDDD0FF77777FF7FF7777777FF - F07DD0889000000000000000000907DDCDDDDCDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897888880F8888888888907DDDDDDDDDDDD0777777777777777777777 - 707DD08897F77780F8777777778907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD08897FFFF80FFFFFFFFFFF907DDDDDDDDDDDD0FF7777FFF7FF7777777FF - F07DD0889000000000000000000907DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0889999999999999999999907DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0F0F777777FF77777777FFF07DDDDDDDDDDDD0FF77777FF7FF77777777F - F07DD0FFFFFFFFFFFFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF7FFFFFFFFFFF - F07DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F888888880F8888888888807DDDDDDDDDDDD0F888888880F8888888888 - 807DD0F877778880F8777777777807DDDDDDDDDDDD0F877777880F8777777778 - 807DD0FFFFFFFFF0FFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFF0FFFFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgLevels: TImage - Left = 9 - Top = 306 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0888888888888888888888807DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F000FF8F000FF8FCCCC44F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F77F7F8FCC99F - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F666CCCF07DDDDDDDDDDDDD0F7F77F8F777FF8FCC99F - 7F07D0F0000F8F00F0F8F999999F07DDCDDDDCDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7888888888888888888 - 7F07D0888888888888888888888807DDCCCCCCCCDDD0F7F77F8F777FF8FC99CF - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDCCCCDCCDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F00FFF8F0000F8F9999CCF07DDCDDDDCDDDDD0F7888888888888888888 - 7F07D0FFFFFF8FFFFFF8F99AAACF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F0000F8F000FF8F9999CCF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0888888888888888888888807DDDDDDDDDDDDD0F0000000000000000000 - 0F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D0F0000F8F000FF8FB99944F07DDDDDDDDDDDDD0F7777777777777777777 - 7F07D0FFFFFF8FFFFFF8FFFFFFFF07DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0777777777777777777777707DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0F000087F800087F800000807DDDDDDDDDDDDD0F7F77F8F7777F8F777FF - 7F07D0F888887F888887F888888807DDDDDDDDDDDDD0F7FFFF8FFFFFF8FFFFFF - 7F07D0FFFFFF7FFFFFF7FFFFFFFF07DDDDDDDDDDDDD0F7888888888888888888 - 7F07D0000000000000000000000007DDCDDDDCDDDDD0F7888888888888888888 - 7F07D7F88880777777777777777778DDCCCCDCCDDDD0F7777777777777777777 - 7F07D7F00080F87777788088888888DDCCCCCCCCDDD0F7777777777777777777 - 7F07D7F77780FFFFFFFFF088888888DDCCCCDCCDDDD0F0000000000000000000 - 0F07D7FFFFF0777777777088888888DDCDDDDCDDDDD0FFFFFFFFFFFFFFFFFFFF - FF07D7777770888888888888888888DDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblLevels: TLabel - Left = 5 - Top = 285 - Width = 30 - Height = 13 - Caption = 'Levels' - end - object bvlLevels: TBevel - Left = 47 - Top = 290 - Width = 265 - Height = 4 - Shape = bsBottomLine - end - object lblGridSize: TLabel - Left = 5 - Top = 150 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlGridSize: TBevel - Left = 33 - Top = 154 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 9 - Top = 172 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxProcessSelection: TCheckBox - Left = 90 - Top = 25 - Width = 200 - Height = 17 - Caption = 'Process Selection' - TabOrder = 0 - OnClick = OptionsSelectionClick - end - object chbxProcessExactSelection: TCheckBox - Tag = 1 - Left = 90 - Top = 46 - Width = 200 - Height = 17 - Caption = 'Process Exact Selection' - TabOrder = 1 - OnClick = OptionsSelectionClick - end - object chbxExpandGroupRows: TCheckBox - Left = 90 - Top = 89 - Width = 200 - Height = 17 - Caption = 'Groups' - TabOrder = 2 - OnClick = OptionsExpandingClick - end - object chbxExpandMasterRows: TCheckBox - Tag = 1 - Left = 90 - Top = 111 - Width = 200 - Height = 17 - Caption = 'Details' - TabOrder = 3 - OnClick = OptionsExpandingClick - end - object chbxStartFromActiveView: TCheckBox - Left = 90 - Top = 236 - Width = 200 - Height = 17 - Caption = 'Start From Active Details' - TabOrder = 6 - OnClick = OptionsDetailsClick - end - object chbxOnlyActiveView: TCheckBox - Tag = 1 - Left = 90 - Top = 258 - Width = 200 - Height = 17 - Caption = 'Only Active Details' - TabOrder = 7 - OnClick = OptionsDetailsClick - end - object chbxLevelsUnwrap: TCheckBox - Left = 90 - Top = 303 - Width = 200 - Height = 17 - Caption = '&Unwrap' - TabOrder = 8 - OnClick = OptionsLevelsClick - end - object chbxLevelsUnwrapTopLevel: TCheckBox - Tag = 1 - Left = 90 - Top = 326 - Width = 200 - Height = 17 - Caption = 'Unwrap Top Level' - TabOrder = 9 - OnClick = OptionsLevelsClick - end - object chbxLevelsRiseActiveLevelOntoTop: TCheckBox - Tag = 2 - Left = 90 - Top = 349 - Width = 200 - Height = 17 - Caption = 'Rise Active Level onto Top' - TabOrder = 10 - OnClick = OptionsLevelsClick - end - object chbxGridAutoWidth: TCheckBox - Left = 90 - Top = 169 - Width = 200 - Height = 17 - Caption = '&Auto Width' - TabOrder = 5 - OnClick = OptionsSizeClick - end - object chbxExpandCards: TCheckBox - Tag = 2 - Left = 90 - Top = 132 - Width = 200 - Height = 17 - Caption = 'Cards' - TabOrder = 4 - OnClick = OptionsExpandingClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 12 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 9 - Top = 95 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 74 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 79 - Width = 241 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object lblPagination: TLabel - Left = 5 - Top = 229 - Width = 50 - Height = 13 - Caption = 'Pagination' - end - object bvlPagination: TBevel - Left = 64 - Top = 234 - Width = 247 - Height = 4 - Shape = bsBottomLine - end - object imgPagination: TImage - Left = 8 - Top = 251 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD0000000000000000000000007DDDDDDDDDDDD77777777777777770DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7F8888888888888F0DDDDD - DDDDD0888000000000000000088F07DDDDDDDDDDDD7F8777877778778F07770D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8888888888888F0FFF0D - DDDDD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0D - DDDDD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8888888888888F078F07 - 770DD0F990FFFF8FFFF8FFFF099F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F088F0F - FF0DD0F99999999999999999999F07DDCDDDDCDDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCDCCDDD7F8888888888888F088F07 - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F8F0FFFF8F00F8F00F0F8F07DDCDDDDCDDDD7F8888888888888F088F08 - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0F00F8F00F8F00F0F9F07DDDDDDDDDDDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCDDDDCDDDD7F8888888888888F088F0F - 8F0DD0F99999999999999999999F07DDCCCCDCCDDD7F8FFF8FFFF8FF8F0F8F08 - 8F0DD0F990FFFF8FFFF8FFFF099F07DDCCCCCCCCDD7F8FFF8FFFF8FF8F0F8F0F - 8F0DD0F9F0FFFF8F00F8F00F0F9F07DDCCCCDCCDDD7F8888888888888F088F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDCDDDDCDDDD7F8777877778778F0F8F08 - 8F0DD0F8F0F00F8F00F8F00F0F8F07DDDDDDDDDDDD7F8888888888888F0F8F0F - 8F0DD0F8F0FFFF8FFFF8FFFF0F8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF088F0F - 8F0DD0F8F0777777777777770F8F07DDDDDDDDDDDD0000000000000000078F08 - 8F0DD0F8F0F8887F8887F8880F8F07DDDDDDDDDDDDDDDD7F8888888888888F0F - 8F0DD0F8F0F0087F0087F0080F8F07DDDDDDDDDDDDDDDD7FFFFFFFFFFFFFFF08 - 8F0DD0F8F0FFFF7FFFF7FFFF0F8F07DDDDDDDDDDDDDDDD00000000000000000F - 8F0DD0888000000000000000088807DDDDDDDDDDDDDDDDDDDD7F888888888888 - 8F0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD7FFFFFFFFFFFFF - FF0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD00000000000000 - 000DD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 33 - Width = 212 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnClick = LookAndFeelClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 142 - Width = 200 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 119 - Width = 200 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 96 - Width = 200 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Suppress Background Images' - TabOrder = 4 - OnClick = OptionsFormatingClick - end - object chbxConsumeSelectionStyle: TCheckBox - Tag = 2 - Left = 90 - Top = 203 - Width = 200 - Height = 17 - Caption = 'Consume Selection Style' - TabOrder = 5 - OnClick = OptionsFormatingClick - end - object chbxPaginateOneGroupPerPage: TCheckBox - Tag = 1 - Left = 90 - Top = 274 - Width = 200 - Height = 17 - Caption = 'One Group Per Page' - TabOrder = 7 - OnClick = OptionsPaginationClick - end - object chbxPaginateByTopLevelGroups: TCheckBox - Left = 90 - Top = 251 - Width = 200 - Height = 17 - Caption = 'By TopLevel Groups' - TabOrder = 6 - OnClick = OptionsPaginationClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 5 - object bvlStyles: TBevel - Left = 118 - Top = 12 - Width = 191 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 295 - Width = 237 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 291 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 219 - end - object Label1: TLabel - Left = 76 - Top = 135 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 14 - Height = 17 - TabOrder = 0 - OnClick = OptionsFormatingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 311 - Width = 302 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 343 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = StyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 83 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = StyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 160 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = StyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 237 - Top = 343 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = StyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 259 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 2 - object lblPreviewOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPreviewOptions: TBevel - Left = 50 - Top = 12 - Width = 261 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewMaxLineCount: TLabel - Left = 91 - Top = 73 - Width = 78 - Height = 13 - Caption = 'Max Line Count:' - end - object bvlPreviewMaxLineCountHost: TBevel - Left = 229 - Top = 69 - Width = 68 - Height = 21 - Visible = False - end - object imgPreview: TImage - Left = 9 - Top = 28 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F888F7FF888F7F8888F7F07DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7F888F7FF888F7FF888F7F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxPreviewVisible: TCheckBox - Left = 90 - Top = 28 - Width = 150 - Height = 17 - Caption = 'Visible' - TabOrder = 0 - OnClick = PreviewVisibleClick - end - object chbxPreviewAutoHeight: TCheckBox - Left = 90 - Top = 49 - Width = 150 - Height = 17 - Caption = 'Auto Height' - TabOrder = 1 - OnClick = PreviewAutoHeightClick - end - end - object tshCards: TTabSheet - Caption = 'Cards' - ImageIndex = 3 - object bvlCardSpaceVertHost: TBevel - Left = 231 - Top = 140 - Width = 75 - Height = 21 - Visible = False - end - object bvlCardSpaceHorzHost: TBevel - Left = 231 - Top = 112 - Width = 75 - Height = 21 - Visible = False - end - object lblCardSpaceVert: TLabel - Left = 90 - Top = 145 - Width = 39 - Height = 13 - Caption = 'Vertical:' - end - object lblCardSpaceHorz: TLabel - Left = 90 - Top = 116 - Width = 52 - Height = 13 - Caption = 'Horizontal:' - end - object imgCardSpacing: TImage - Left = 9 - Top = 112 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDDDDD0DD0DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDD000000000000000000000000000000DDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD00D0DDDDDDDDDDDDDDDDDD0D00DDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDD7DD0DDDDDD707000DDDDDD0DD7DDDDDDDDDDDDDDD - DDDDDDDDD0000000000000000000DDDDDD0D0D0DDDDDD0000000000000000000 - 0DDDDDDD77777777777777777770DDDDD00D0D0DDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDD0D000DDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FFF9999FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFF9999FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7FFFFFFF7FCCCC99FF70DDDDDDDDDDDDDDDDD7FFFFFFF7FCCCC99FF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7F77777F7FCCCCFFFF70DDDDDDDDDDDDDDDDD7F77777F7FCCCCFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF77777FF70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF77FFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF77FFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD77777777777777777770DDDDDDDDDDDDDDDDD7777777777777777777 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7F77777F7FF777777F70DDDDDDDDDDDDDDDDD7F77777F7FF777777F7 - 0DDDDDDD7F7FFFFF7FF7FFFFFF70DDDDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFF7 - 0DDDDDDD7FFFFFFF7FFFFFFFFF70DDDDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFF7 - 0DDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD7777777777777777777 - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardSpacing: TLabel - Left = 5 - Top = 92 - Width = 37 - Height = 13 - Caption = 'Spacing' - end - object bvlCardSpacing: TBevel - Left = 51 - Top = 97 - Width = 260 - Height = 4 - Shape = bsBottomLine - end - object bvlCardSizes: TBevel - Left = 34 - Top = 12 - Width = 277 - Height = 4 - Shape = bsBottomLine - end - object lblCardSizes: TLabel - Left = 5 - Top = 8 - Width = 24 - Height = 13 - Caption = 'Sizes' - end - object imgCardSizes: TImage - Left = 9 - Top = 28 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDD000000000000DDDDDDDDDDDDDDDDDDDDDDDD000000000000DD00000000 - 0000D7777777777770DDDDDDDDDDDDDDDDDDDDDDD7777777777770D777777777 - 7770D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DDDDDDDDDDDDDDDDDDDDDDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70DDDDDDDDDDDDDDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70DD0000000000DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D77777777770DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8FFF70DDCCCCDCCDD7FFFFF8F77F70D7FFFFF8FF - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7FFFFF8F77F70D7FFFF8F7F70DDDDDDDDDDD7FFFFF8F77F70D7FFFFF8F7 - FF70D7F777F8FFFF70D7FFFF8FFF70DDDDDDDDDDD7F777F8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - 7F70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F777F8FFFF70D7F77F8F7F70DDDDDDDDDDD7F777F8FFFF70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDDDDDDDDDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDCCCCDCCDD7F777F8F77F70D7F77FF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDCCCCCCCCD7FFFFF8FFFF70D7FFFFF8FF - FF70D7888888888870D78888888870DDCCCCDCCDD7888888888870D788888888 - 8870D7FFFFF8FFFF70D7FFFF8FFF70DDCDDDDCDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D7F777F8F77F70D7F77F8F7F70DDDDDDDDDDD7F777F8F77F70D7F77FF8F7 - FF70D7F7FFF8FFFF70D7F7FF8F7F70DDDDDDDDDDD7F7FFF8FFFF70D7F7FFF8F7 - FF70D7FFFFF8FFFF70D7FFFF8FFF70DDDDDDDDDDD7FFFFF8FFFF70D7FFFFF8FF - FF70D777777777777DD7777777777DDDDDDDDDDDD777777777777DD777777777 - 777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgCardFraming: TImage - Left = 9 - Top = 189 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD00000000000000000 - 00DDDDDDD88888888888888888887DDDDDDDDDDDDDDDDD000000000000000000 - 00DDDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF - 00DDDDD778FFFFFFF8FFF9999FF87DDDDDDDDDDDDDDD000FFFFFFF0FFF9999FF - 00DDDD8888FFFFFFF8FFF9999FF87DDDDDDDDDDDDDD0000FFFFFFF0FFF9999FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCDDDDCDDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCCCCDCCDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCCCCCDDD0FF0F77777F0FCCCCFFFF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCDCCDDDD0FF0F77777F0FCCCCFFFF - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF77777FF87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF77FFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF77FFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDCDDDDCDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCCCCDCCDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDCCCCCCCCDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDCCCCDCCDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F78888888888888888888DDDDDDDDDDDDDDD0F7000000000000000000 - 0DDDDD8F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDDDDD0F7FFFFF0FF7FFFFFF00D - DDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF00D - DDDDDD8888888888888888888DDDDDDDDDDDDDDDDDD0000000000000000000DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardFraming: TLabel - Left = 5 - Top = 171 - Width = 38 - Height = 13 - Caption = 'Framing' - end - object bvlCardFraming: TBevel - Left = 49 - Top = 176 - Width = 262 - Height = 4 - Shape = bsBottomLine - end - object bvlCardShadowColorHost: TBevel - Left = 177 - Top = 276 - Width = 129 - Height = 21 - Visible = False - end - object lblCardShadowDepth: TLabel - Left = 90 - Top = 308 - Width = 33 - Height = 13 - Caption = 'Depth:' - end - object bvlCardShadow: TBevel - Left = 48 - Top = 260 - Width = 263 - Height = 4 - Shape = bsBottomLine - end - object lblCardShadow: TLabel - Left = 5 - Top = 255 - Width = 38 - Height = 13 - Caption = 'Shadow' - end - object lblCardShadowColor: TLabel - Left = 90 - Top = 280 - Width = 29 - Height = 13 - Caption = 'Color:' - end - object bvlCardShadowDepthHost: TBevel - Left = 177 - Top = 304 - Width = 129 - Height = 21 - Visible = False - end - object imgCardShadow: TImage - Left = 9 - Top = 276 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD0000000000000000000 - 000DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FFF9999FFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFF9999FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCCCCDCCDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7FFFFFFF7FCCCC99FFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FCCCC99FFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7F77777F7FCCCCFFFFFFF7DDDDDDDDDDDDDDD7F77777F7FCCCCFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF77777FFFFF7DDDDCDDDDCDDDDD7F77777F7FF77777FFFFF - 700DDD7F7FFFFF7FF77FFFFFFFF7DDDDCCCCDCCDDDD7F7FFFFF7FF77FFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCCCCCCCCDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7777777777777777777777DDDDCCCCDCCDDDD777777777777777777777 - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDCDDDDCDDDDD7FFFFFFF7FFFFFFFFFFFF - 700DDD7F77777F7FF777777FFFF7DDDDDDDDDDDDDDD7F77777F7FF777777FFFF - 700DDD7F7FFFFF7FF7FFFFFFFFF7DDDDDDDDDDDDDDD7F7FFFFF7FF7FFFFFFFFF - 700DDD7FFFFFFF7FFFFFFFFFFFF7DDDDDDDDDDDDDDD7FFFFFFF7FFFFFFFFFFFF - 7DDDDD7777777777777777777777DDDDDDDDDDDDDDD777777777777777777777 - 7DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxCardsKeepSameHeight: TCheckBox - Tag = 2 - Left = 90 - Top = 70 - Width = 200 - Height = 17 - Caption = 'Keep Same Height' - TabOrder = 2 - OnClick = OptionsCardsClick - end - object chbxCardsKeepSameWidth: TCheckBox - Tag = 1 - Left = 90 - Top = 49 - Width = 200 - Height = 17 - Caption = 'Keep Same Width' - TabOrder = 1 - OnClick = OptionsCardsClick - end - object chbxCardsAutoWidth: TCheckBox - Left = 90 - Top = 28 - Width = 200 - Height = 17 - Caption = 'Auto Width' - TabOrder = 0 - OnClick = OptionsCardsClick - end - object chbxCardsVertLines: TCheckBox - Tag = 5 - Left = 90 - Top = 231 - Width = 200 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 5 - OnClick = OptionsCardsClick - end - object chbxCardsHorzLines: TCheckBox - Tag = 4 - Left = 90 - Top = 210 - Width = 200 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 4 - OnClick = OptionsCardsClick - end - object chbxCardsBorder: TCheckBox - Tag = 3 - Left = 90 - Top = 189 - Width = 200 - Height = 17 - Caption = 'Border' - TabOrder = 3 - OnClick = OptionsCardsClick - end - end - object tshCharts: TTabSheet - Caption = 'Charts' - ImageIndex = 6 - object lblChartsOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object imgCharts: TImage - Left = 9 - Top = 28 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDD777777777777777777777777DDDDDDD000000000000000000000000 - 7DDDDDDD0887FFFFFFFFFFFFFFFFFFF07DDDDDDD0887F8888888888888888880 - 7DDDDDDD0887F8FC491A2FFC491A2FF07DDDDDDD0887F8FC491A2FFC491A2FF0 - 7DDDDDDD0887F8FC4FFA2FFC491A2FF07DDDDDDD0887F8FC4FFA2FFC4FFA2FF0 - 7DDDDDDD0887F8FFFFFFFFFFFFFFFFF07DDDDDDD088777777777777777777770 - 7DDDDDDD0888888888888888888888807DDDDDDD087807777777788888888880 - 7DDDDDDD0888888888888888888888807DDDDDDD077777777777777777777770 - 7DDDDDDD0887FFFFFFFFFFFFFFFFFFF07DDDDDDD0887F8888888888888888880 - 7DDDDDDD0887F8FC491A2FFC491A2FF07DDDDDDD0887F8FC491A2FFC491A2FF0 - 7DDDDDDD0887F8FC491FFFFC491A2FF07DDDDDDD0887F8FFF91FFFFC4FFA2FF0 - 7DDDDDDD0887F8FFFFFFFFFFFFFFFFF07DDDDDDD088777777777777777777770 - 7DDDDDDD0888888888888888888888807DDDDDDD087800777777788888888880 - 7DDDDDDD0888888888888888888888807DDDDDDD077777777777777777777770 - 7DDDDDDD0F8888887F888888888888807DDDDDDD0F8000087F80000000088880 - 7DDDDDDD0F8888887F888888888888807DDDDDDD0FFFFFFF7FFFFFFFFFFFFFF0 - 7DDDDDDD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlChartsOptions: TBevel - Left = 57 - Top = 12 - Width = 254 - Height = 4 - Shape = bsBottomLine - end - object chbxChartsTransparent: TCheckBox - Left = 90 - Top = 28 - Width = 200 - Height = 17 - Caption = 'Transparent' - TabOrder = 0 - OnClick = chbxChartsTransparentClick - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 44 - Width = 306 - Height = 350 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewGrid: TcxGrid - Left = 5 - Top = 7 - Width = 296 - Height = 337 - TabOrder = 0 - LookAndFeel.NativeStyle = False - RootLevelOptions.DetailTabsPosition = dtpTop - object PreviewBandedView: TcxGridBandedTableView - NavigatorButtons.ConfirmDelete = False - DataController.Summary.DefaultGroupSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Position = spFooter - Column = colVendorName - end> - DataController.Summary.FooterSummaryItems = < - item - Format = 'Count = 0' - Kind = skCount - Column = colVendorName - end> - DataController.Summary.SummaryGroups = <> - Filtering.CustomizeDialog = False - Filtering.Visible = fvAlways - OptionsView.ScrollBars = ssNone - OptionsView.CellAutoHeight = True - OptionsView.ColumnAutoWidth = True - OptionsView.Footer = True - OptionsView.GroupByBox = False - OptionsView.GroupFooters = gfAlwaysVisible - Preview.Column = colVendorCountry - Preview.Visible = True - OnCustomDrawColumnHeader = PreviewBandedViewCustomDrawColumnHeader - OnCustomDrawFooterCell = PreviewBandedViewCustomDrawFooterCell - Bands = < - item - Caption = 'Vendor Data' - Width = 150 - end - item - Caption = 'Car Data' - end> - OnCustomDrawBandHeader = PreviewBandedViewCustomDrawBandHeader - object colVendorName: TcxGridBandedColumn - Caption = 'Name' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colVendorLogo: TcxGridBandedColumn - Caption = 'Logo' - PropertiesClassName = 'TcxImageProperties' - Properties.GraphicTransparency = gtTransparent - OnCustomDrawCell = VendorLogoCustomDrawCell - Options.Filtering = False - Position.BandIndex = 0 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - object colVendorCountry: TcxGridBandedColumn - PropertiesClassName = 'TcxTextEditProperties' - Position.BandIndex = 0 - Position.ColIndex = 2 - Position.RowIndex = 0 - end - object colCarModel: TcxGridBandedColumn - Caption = 'Model' - PropertiesClassName = 'TcxTextEditProperties' - Options.Filtering = False - Position.BandIndex = 1 - Position.ColIndex = 0 - Position.RowIndex = 0 - end - object colIsSUVModel: TcxGridBandedColumn - Caption = 'SUV' - PropertiesClassName = 'TcxCheckBoxProperties' - Properties.ValueGrayed = #39#39 - OnCustomDrawCell = IsSUVModelCustomDrawCell - HeaderAlignmentHorz = taCenter - Options.Filtering = False - Width = 30 - Position.BandIndex = 1 - Position.ColIndex = 1 - Position.RowIndex = 0 - end - end - object PreviewGridLevel: TcxGridLevel - Caption = 'Cars' - end - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 4 - Top = 408 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 32 - Top = 408 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxStyleRepository1: TcxStyleRepository - Left = 60 - Top = 408 - object styleCardShadow: TcxStyle - end - object styleCardBorder: TcxStyle - AssignedValues = [svColor] - Color = clWindow - end - end -end diff --git a/internal/x.46/Lib/D11/dxPScxGridLnkPredefinedStyleSheets.dfm b/internal/x.46/Lib/D11/dxPScxGridLnkPredefinedStyleSheets.dfm deleted file mode 100644 index aa92920a..00000000 --- a/internal/x.46/Lib/D11/dxPScxGridLnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,352 +0,0 @@ -object dxdmPScxGridLnkPredefinedStyles: TdxdmPScxGridLnkPredefinedStyles - OldCreateOrder = False - Left = 352 - Top = 156 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 37 - Top = 12 - object styleProfessionalFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3355443 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6582120 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalCaptionRow: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14541789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGreenFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGreenFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12778719 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14154698 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenSelected: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4949549 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 11328403 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentBandHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsItalic] - TextColor = clBlack - end - object styleTransparentLevelCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFilterBar: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentCaptionRow: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13816275 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TdxGridReportLinkStyleSheet - Caption = 'Professional' - Styles.BandHeader = styleProfessionalFixed - Styles.Caption = styleProfessionalFixed - Styles.CardCaptionRow = styleProfessionalCaptionRow - Styles.CardRowCaption = styleProfessionalRowCaption - Styles.Content = styleNoneContent - Styles.ContentEven = styleProfessionalContentEven - Styles.ContentOdd = styleProfessionalContentOdd - Styles.FilterBar = styleProfessionalFixed - Styles.Footer = styleProfessionalFixed - Styles.Group = styleProfessionalGroup - Styles.Header = styleProfessionalFixed - Styles.Preview = styleProfessionalPreview - Styles.Selection = styleProfessionalSelection - BuiltIn = True - end - object ssGreen: TdxGridReportLinkStyleSheet - Caption = 'Green' - Styles.BandHeader = styleGreenFixed - Styles.Caption = styleGreenFixed - Styles.CardCaptionRow = styleGreenFixed - Styles.CardRowCaption = styleGreenFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleGreenLightContent - Styles.ContentOdd = styleNoneContent - Styles.FilterBar = styleGreenFixed - Styles.Footer = styleGreenFixed - Styles.Group = styleGreenGroup - Styles.Header = styleGreenFixed - Styles.Preview = styleGreenLightPreview - Styles.Selection = styleGreenSelected - BuiltIn = True - end - object ssTransparent: TdxGridReportLinkStyleSheet - Caption = 'Transparent' - Styles.BandHeader = styleTransparentBandHeader - Styles.Caption = styleTransparentLevelCaption - Styles.CardCaptionRow = styleTransparentCaptionRow - Styles.CardRowCaption = styleTransparentRowCaption - Styles.Content = styleTransparentContent - Styles.ContentEven = styleTransparentContentEven - Styles.ContentOdd = styleTransparentContentOdd - Styles.FilterBar = styleTransparentFilterBar - Styles.Footer = styleTransparentFooter - Styles.Group = styleTransparentGroup - Styles.Header = styleTransparentHeader - Styles.Preview = styleTransparentPreview - Styles.Selection = styleTransparentSelection - BuiltIn = True - end - end -end diff --git a/internal/x.46/Lib/D11/dxPScxImgLnk.dcu b/internal/x.46/Lib/D11/dxPScxImgLnk.dcu deleted file mode 100644 index f6511b07..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxImgLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxListBoxLnk.dcu b/internal/x.46/Lib/D11/dxPScxListBoxLnk.dcu deleted file mode 100644 index 2790e8ca..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxListBoxLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxMCListBoxLnk.dcu b/internal/x.46/Lib/D11/dxPScxMCListBoxLnk.dcu deleted file mode 100644 index a574b875..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxMCListBoxLnk.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxMCListBoxLnk.dfm b/internal/x.46/Lib/D11/dxPScxMCListBoxLnk.dfm deleted file mode 100644 index 0bcc7906..00000000 --- a/internal/x.46/Lib/D11/dxPScxMCListBoxLnk.dfm +++ /dev/null @@ -1,656 +0,0 @@ -object cxfmMCListBoxDesignWindow: TcxfmMCListBoxDesignWindow - Left = 391 - Top = 313 - BorderIcons = [biSystemMenu, biMinimize, biMaximize, biHelp] - BorderStyle = bsDialog - Caption = 'cxfmMCListBoxDesignWindow' - ClientHeight = 293 - ClientWidth = 558 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 6 - Width = 549 - Height = 251 - ActivePage = tshColor - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 223 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblShow: TLabel - Left = 5 - Top = 12 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel11: TBevel - Left = 40 - Top = 17 - Width = 194 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 7 - Top = 34 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 125 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object Image1: TImage - Left = 7 - Top = 149 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel10: TBevel - Left = 84 - Top = 129 - Width = 150 - Height = 4 - Shape = bsBottomLine - end - object chbxShowVertLines: TCheckBox - Tag = 2 - Left = 95 - Top = 75 - Width = 137 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 2 - OnClick = ShowClick - end - object chbxShowBorders: TCheckBox - Left = 95 - Top = 29 - Width = 137 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = ShowClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 95 - Top = 51 - Width = 137 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = ShowClick - end - object chbxShowColumnHeaders: TCheckBox - Tag = 3 - Left = 95 - Top = 99 - Width = 137 - Height = 17 - Caption = '&Column Headers' - TabOrder = 3 - OnClick = ShowClick - end - object chbxHeadersOnEveryPage: TCheckBox - Left = 95 - Top = 148 - Width = 137 - Height = 17 - Caption = 'Headers' - TabOrder = 4 - OnClick = HeadersOnEveryPageClick - end - object lblPreview: TStaticText - Left = 244 - Top = 2 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 5 - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 223 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 6 - Top = 200 - Width = 79 - Height = 13 - Caption = '&Grid lines color : ' - end - object bvlGridLineColorHost: TBevel - Left = 91 - Top = 196 - Width = 127 - Height = 21 - Visible = False - end - object lblDrawMode: TLabel - Left = 5 - Top = 17 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - end - object gbxTransparentHeaders: TGroupBox - Left = 5 - Top = 131 - Width = 223 - Height = 55 - Caption = ' ' - TabOrder = 4 - object lblHeadersColor: TLabel - Left = 6 - Top = 24 - Width = 78 - Height = 13 - Caption = 'Headers Color : ' - end - object bvlHeadersColorHost: TBevel - Left = 86 - Top = 22 - Width = 127 - Height = 21 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 45 - Width = 223 - Height = 80 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 6 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - end - object bvlColorHost: TBevel - Left = 86 - Top = 20 - Width = 127 - Height = 21 - Visible = False - end - object lblEvenColor: TLabel - Left = 6 - Top = 51 - Width = 59 - Height = 13 - Caption = 'E&ven Color: ' - end - object bvlEvenColorHost: TBevel - Left = 86 - Top = 47 - Width = 127 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 43 - Width = 15 - Height = 17 - Caption = 'T&ransparent' - TabOrder = 1 - OnClick = TransparentClick - end - object chbxTransparentHeaders: TCheckBox - Tag = 1 - Left = 18 - Top = 129 - Width = 15 - Height = 17 - Caption = 'T&ransparent Headers' - TabOrder = 3 - OnClick = TransparentClick - end - object cbxDrawMode: TComboBox - Left = 69 - Top = 12 - Width = 159 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = DrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Chess' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 33 - Top = 44 - Width = 69 - Height = 17 - Caption = ' Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stTransparentHeaders: TStaticText - Left = 33 - Top = 130 - Width = 112 - Height = 17 - Caption = ' Transparent Headers ' - FocusControl = chbxTransparentHeaders - TabOrder = 6 - OnClick = stTransparentHeadersClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 223 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 21 - Caption = 'Fo&nt...' - TabOrder = 0 - OnClick = FontClick - end - object edFont: TEdit - Left = 8 - Top = 34 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnHeadersFont: TButton - Tag = 2 - Left = 8 - Top = 122 - Width = 110 - Height = 21 - Caption = 'Headers Font...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 4 - OnClick = FontClick - end - object edFixedFont: TEdit - Left = 8 - Top = 147 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 5 - end - object btnEvenFont: TButton - Tag = 1 - Left = 8 - Top = 65 - Width = 110 - Height = 21 - Caption = 'E&ven Font...' - TabOrder = 2 - OnClick = FontClick - end - object edEvenFont: TEdit - Left = 8 - Top = 90 - Width = 221 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 223 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Image3: TImage - Left = 7 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblSelection: TLabel - Left = 5 - Top = 12 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object Bevel3: TBevel - Left = 53 - Top = 17 - Width = 179 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 81 - Width = 67 - Height = 13 - Caption = 'Look And Feel' - end - object Bevel15: TBevel - Left = 81 - Top = 85 - Width = 151 - Height = 4 - Shape = bsBottomLine - end - object Image8: TImage - Left = 7 - Top = 101 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblMiscellaneous: TLabel - Left = 6 - Top = 147 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object Bevel4: TBevel - Left = 80 - Top = 152 - Width = 152 - Height = 4 - Shape = bsBottomLine - end - object Image5: TImage - Left = 7 - Top = 167 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxIncludeFixed: TCheckBox - Left = 95 - Top = 51 - Width = 139 - Height = 17 - Caption = '&Including fixed cells' - TabOrder = 1 - OnClick = IncludeFixedClick - end - object chbxOnlySelected: TCheckBox - Left = 95 - Top = 29 - Width = 139 - Height = 17 - Caption = 'Only &selected cells' - TabOrder = 0 - OnClick = OnlySelectedClick - end - object chbxUse3DEffects: TCheckBox - Tag = 12 - Left = 95 - Top = 96 - Width = 139 - Height = 17 - Caption = '3D Effects' - TabOrder = 2 - OnClick = Use3DEffectsClick - end - object chbxUseSoft3D: TCheckBox - Tag = 13 - Left = 95 - Top = 118 - Width = 139 - Height = 17 - Caption = 'Soft &3D' - TabOrder = 3 - OnClick = UseSoft3DClick - end - object chbxRowAutoHeight: TCheckBox - Left = 95 - Top = 185 - Width = 139 - Height = 17 - Caption = '&Row Auto Height' - TabOrder = 5 - OnClick = RowAutoHeightClick - end - object chbxAutoWidth: TCheckBox - Left = 95 - Top = 163 - Width = 139 - Height = 17 - Caption = 'AutoWidth' - TabOrder = 4 - OnClick = chbxAutoWidthClick - end - end - end - end - object pnlPreview: TPanel - Left = 252 - Top = 49 - Width = 293 - Height = 200 - BevelOuter = bvLowered - TabOrder = 1 - end -end diff --git a/internal/x.46/Lib/D11/dxPScxPCProdD11.bpl b/internal/x.46/Lib/D11/dxPScxPCProdD11.bpl deleted file mode 100644 index 49966456..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxPCProdD11.bpl and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxPCProdD11.dcp b/internal/x.46/Lib/D11/dxPScxPCProdD11.dcp deleted file mode 100644 index eeca58bf..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxPCProdD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxPageControlProducer.dcu b/internal/x.46/Lib/D11/dxPScxPageControlProducer.dcu deleted file mode 100644 index 27713681..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxPageControlProducer.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxPivotGrid2Lnk.dfm b/internal/x.46/Lib/D11/dxPScxPivotGrid2Lnk.dfm deleted file mode 100644 index b2c22c72..00000000 --- a/internal/x.46/Lib/D11/dxPScxPivotGrid2Lnk.dfm +++ /dev/null @@ -1,1247 +0,0 @@ -object cxfmPivotGridReportLinkDesignWindow: TcxfmPivotGridReportLinkDesignWindow - Left = 349 - Top = 253 - BorderStyle = bsDialog - Caption = 'cxfmPivotGridReportLinkDesignWindow' - ClientHeight = 398 - ClientWidth = 702 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 0 - Top = 0 - Width = 702 - Height = 363 - ActivePage = tshView - TabOrder = 0 - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object bvlShow: TBevel - Left = 43 - Top = 13 - Width = 253 - Height = 4 - Shape = bsBottomLine - end - object Bevel1: TBevel - Left = 56 - Top = 171 - Width = 240 - Height = 4 - Shape = bsBottomLine - end - object Image1: TImage - Left = 9 - Top = 37 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object imgCardFraming: TImage - Left = 9 - Top = 195 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD00000000000000000 - 00DDDDDDD88888888888888888887DDDDDDDDDDDDDDDDD000000000000000000 - 00DDDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF - 00DDDDD778FFFFFFF8FFF9999FF87DDDDDDDDDDDDDDD000FFFFFFF0FFF9999FF - 00DDDD8888FFFFFFF8FFF9999FF87DDDDDDDDDDDDDD0000FFFFFFF0FFF9999FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCDDDDCDDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCCCCDCCDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCCCCCDDD0FF0F77777F0FCCCCFFFF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCDCCDDDD0FF0F77777F0FCCCCFFFF - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF77777FF87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF77FFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF77FFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDCDDDDCDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCCCCDCCDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDCCCCCCCCDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDCCCCDCCDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F78888888888888888888DDDDDDDDDDDDDDD0F7000000000000000000 - 0DDDDD8F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDDDDD0F7FFFFF0FF7FFFFFF00D - DDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF00D - DDDDDD8888888888888888888DDDDDDDDDDDDDDDDDD0000000000000000000DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardFraming: TLabel - Left = 5 - Top = 165 - Width = 38 - Height = 13 - Caption = 'Framing' - end - object chbxColumnFields: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = '&Column Fields' - TabOrder = 0 - OnClick = chbxOptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 4 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = '&Expand Buttons' - TabOrder = 4 - OnClick = chbxOptionsViewClick - end - object chbxHorizontalLines: TCheckBox - Tag = 1 - Left = 90 - Top = 187 - Width = 200 - Height = 17 - Caption = '&Horizontal Lines' - TabOrder = 6 - OnClick = chbxOptionsViewClick - end - object chbxVerticalLines: TCheckBox - Tag = 2 - Left = 90 - Top = 211 - Width = 200 - Height = 17 - Caption = '&Vertical Lines' - TabOrder = 7 - OnClick = chbxOptionsViewClick - end - object chbxBorders: TCheckBox - Tag = 3 - Left = 90 - Top = 235 - Width = 200 - Height = 17 - Caption = '&Borders' - TabOrder = 8 - OnClick = chbxOptionsViewClick - end - object chbxDataFields: TCheckBox - Left = 90 - Top = 53 - Width = 200 - Height = 17 - Caption = '&Data Fields' - TabOrder = 1 - OnClick = chbxOptionsViewClick - end - object chbxFilterFields: TCheckBox - Left = 90 - Top = 77 - Width = 200 - Height = 17 - Caption = '&Filter Fields' - TabOrder = 2 - OnClick = chbxOptionsViewClick - end - object chbxRowFields: TCheckBox - Left = 90 - Top = 101 - Width = 200 - Height = 17 - Caption = '&Row Fields' - TabOrder = 3 - OnClick = chbxOptionsViewClick - end - object chbxPrefilter: TCheckBox - Tag = 5 - Left = 90 - Top = 149 - Width = 200 - Height = 17 - Caption = '&Prefilter' - TabOrder = 5 - OnClick = chbxOptionsViewClick - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblExpanding: TLabel - Left = 5 - Top = 8 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object bvlExpanding: TBevel - Left = 62 - Top = 13 - Width = 234 - Height = 4 - Shape = bsBottomLine - end - object imgExpanding: TImage - Left = 9 - Top = 31 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object chbxExpandRows: TCheckBox - Tag = 1 - Left = 90 - Top = 53 - Width = 200 - Height = 17 - Caption = 'Rows' - TabOrder = 1 - OnClick = chbxExpandOptionsClick - end - object chbxExpandColumns: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = 'Columns' - TabOrder = 0 - OnClick = chbxExpandOptionsClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 211 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D0887777787787FFFFFFFFFFF07DDDDDDDDDDD0F87777787787FFFFFFFFF - FF07D0888888888887F000FF0000F07DDDDDDDDDDD0F88888888887F000FF000 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000080087F00000000FF07DDDDDDDDDDD0F80000080087F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000000F07DCCCCDCCDDD0F80000000887F00000000 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000F00F07DDDDDDDDDDD0F80000000887F000000F0 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000008887F00000FF00F07DCCCCDCCDDD0F80000008887F00000FF0 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F00000000FF07DDDDDDDDDDD0F80000000887F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 8 - Top = 102 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF7FFFFFFF07DDCCCCDCCDDD0888888888887FF777777F - F07DD0888888888887FF70888FFF07DDCCCCCCCCDD0888888888887FF7FFFF7F - F07DD0880000000887FF70FF8FFF07DDCCCCDCCDDD0880000000887FF7F00F7F - F07DD0888888888887FF70FF8FFF07DDCDDDDCDDDD0888888888887FF7F00F7F - F07DD0880008888887FF70000FFF07DDDDDDDDDDDD0880008888887FF7FFFF7F - F07DD0888888888887FF777777FF07DDDDDDDDDDDD0888888888887FF777777F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCCCCCCCCDD0888888888887FFFFFFFFF - F07DD0880000000887FCCCCCCCFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0880000000887F9999999FF07DDDDDDDDDDDD0880000000887F88888FFF - F07DD0888888888887FF99999FFF07DDDDDDDDDDDD0888888888887F888888FF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF888FFFFF07DDDDDDDDDDDD0888888888887FF888FFFF - F07DD0880000888887FFFFFFFFFF07DDDDDDDDDDDD0880000888887FFFFFFFFF - F07DD0880000000087FF888888FF07DDDDDDDDDDDD0880000000087FF888888F - F07DD0888888888887FF888888FF07DDDDDDDDDDDD0888888888887FF888888F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 82 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 206 - Height = 4 - Shape = bsBottomLine - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 37 - Width = 202 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnChange = cbxLookAndFeelChange - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = 'Suppress Background Textures' - TabOrder = 4 - OnClick = OptionsFormattingChanged - end - object chbxSuppressContentColoration: TCheckBox - Tag = 2 - Left = 90 - Top = 205 - Width = 200 - Height = 17 - Caption = 'Suppress Content Coloration' - TabOrder = 5 - OnClick = OptionsFormattingChanged - end - object chbxTransparentGraphics: TCheckBox - Tag = 3 - Left = 90 - Top = 96 - Width = 200 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsFormattingChanged - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 4 - Left = 90 - Top = 119 - Width = 200 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsFormattingChanged - end - object chbxFlatCheckMarks: TCheckBox - Tag = 5 - Left = 90 - Top = 142 - Width = 200 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsFormattingChanged - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 4 - object bvlStyles: TBevel - Left = 115 - Top = 13 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 259 - Width = 224 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 255 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 214 - Height = 183 - end - object Label1: TLabel - Left = 77 - Top = 118 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 228 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = btnStyleColorClick - end - object btnStyleFont: TButton - Left = 228 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = btnStyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 228 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = btnStyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 15 - Height = 17 - TabStop = False - Caption = '&Use Native Styles' - TabOrder = 0 - OnClick = OptionsFormattingChanged - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 307 - Width = 68 - Height = 23 - Caption = '&New...' - TabOrder = 7 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 79 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Copy...' - TabOrder = 8 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 153 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Delete...' - TabOrder = 9 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 116 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = btnStylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 226 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Rename...' - TabOrder = 10 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 228 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Clear' - TabOrder = 4 - OnClick = btnStyleClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Restore Defaults' - TabOrder = 5 - OnClick = btnStyleRestoreDefaultsClick - end - object cbxStyleSheets: TComboBox - Left = 9 - Top = 274 - Width = 288 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 11 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - end - end - object pnlPreview: TPanel - Left = 309 - Top = 39 - Width = 382 - Height = 315 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewPivotGrid: TcxPivotGrid - Left = 5 - Top = 5 - Width = 371 - Height = 302 - Enabled = False - Groups = < - item - IsCaptionAssigned = True - Caption = 'FieldsGroup 1' - end> - TabOrder = 0 - object pgfPurchaseQuarter: TcxPivotGridField - Area = faColumn - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Purchase Quarter' - DataBinding.ValueType = 'DateTime' - GroupIndex = 0 - GroupInterval = giDateQuarter - Visible = True - end - object pgfPurchaseMonth: TcxPivotGridField - Area = faColumn - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Purchase Month' - DataBinding.ValueType = 'DateTime' - GroupIndex = 0 - GroupExpanded = False - GroupInterval = giDateMonth - Visible = True - end - object pgfPaymentType: TcxPivotGridField - Tag = 1 - Area = faRow - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Payment Type' - DataBinding.ValueType = 'String' - Visible = True - Width = 90 - end - object pgfQuantity: TcxPivotGridField - Tag = 2 - Area = faData - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Quantity' - DataBinding.ValueType = 'Integer' - Visible = True - Width = 62 - end - object pgfCarName: TcxPivotGridField - Tag = 3 - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Car Name' - DataBinding.ValueType = 'String' - Visible = True - end - object pgfUnitPrice: TcxPivotGridField - Tag = 4 - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Unit Price' - DataBinding.ValueType = 'Currency' - Visible = True - end - object pgfCompanyName: TcxPivotGridField - Tag = 5 - Area = faRow - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Company Name' - DataBinding.ValueType = 'String' - Visible = True - Width = 90 - end - object pgfPaymentAmount: TcxPivotGridField - Tag = 6 - Area = faData - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Payment Amount' - DataBinding.ValueType = 'Currency' - Visible = True - end - end - end - object lblPreviewWindow: TStaticText - Left = 314 - Top = 24 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 2 - end - object cxStyleRepository1: TcxStyleRepository - Left = 4 - Top = 368 - PixelsPerInch = 96 - object styleCategory: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWindowText - end - object styleHeader: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - object styleContent: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 32 - Top = 368 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - ShortCut = 16454 - OnClick = btnStyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - ShortCut = 16451 - OnClick = btnStyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - OnClick = btnStyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = btnStyleClearClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = btnStyleRestoreDefaultsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = btnStylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 60 - Top = 368 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPScxPivotGrid2Lnk.res b/internal/x.46/Lib/D11/dxPScxPivotGrid2Lnk.res deleted file mode 100644 index aab165c7..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxPivotGrid2Lnk.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxPivotGridLnk.dfm b/internal/x.46/Lib/D11/dxPScxPivotGridLnk.dfm deleted file mode 100644 index e84c6db9..00000000 --- a/internal/x.46/Lib/D11/dxPScxPivotGridLnk.dfm +++ /dev/null @@ -1,1200 +0,0 @@ -object cxfmPivotGridReportLinkDesignWindow: TcxfmPivotGridReportLinkDesignWindow - Left = 349 - Top = 253 - BorderStyle = bsDialog - Caption = 'cxfmPivotGridReportLinkDesignWindow' - ClientHeight = 398 - ClientWidth = 702 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 0 - Top = 0 - Width = 702 - Height = 363 - ActivePage = tshView - TabOrder = 0 - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object bvlShow: TBevel - Left = 43 - Top = 13 - Width = 253 - Height = 4 - Shape = bsBottomLine - end - object Bevel1: TBevel - Left = 56 - Top = 147 - Width = 240 - Height = 4 - Shape = bsBottomLine - end - object Image1: TImage - Left = 9 - Top = 37 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object imgCardFraming: TImage - Left = 9 - Top = 173 - Width = 64 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDD7777777777777777777DDDDDDDDDDDDDDDDDD00000000000000000 - 00DDDDDDD88888888888888888887DDDDDDDDDDDDDDDDD000000000000000000 - 00DDDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF - 00DDDDD778FFFFFFF8FFF9999FF87DDDDDDDDDDDDDDD000FFFFFFF0FFF9999FF - 00DDDD8888FFFFFFF8FFF9999FF87DDDDDDDDDDDDDD0000FFFFFFF0FFF9999FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCDDDDCDDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8FFFFFFF8FCCCC99FF87DDDCCCCDCCDDDD0FF0FFFFFFF0FCCCC99FF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCCCCCDDD0FF0F77777F0FCCCCFFFF - 00DDDD8FF8F77777F8FCCCCFFFF87DDDCCCCDCCDDDD0FF0F77777F0FCCCCFFFF - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDDDDDDDDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF77777FF87DDDDDDDDDDDDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF77FFFFF87DDDDDDDDDDDDDD0000F7FFFFF0FF77FFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F788888888888888888887DDDCDDDDCDDDDD0F7000000000000000000 - 00DDDD8F78FFFFFFF8FFFFFFFFF87DDDCCCCDCCDDDD0F70FFFFFFF0FFFFFFFFF - 00DDDD8FF8F77777F8FF777777F87DDDCCCCCCCCDDD0FF0F77777F0FF777777F - 00DDDD8888F7FFFFF8FF7FFFFFF87DDDCCCCDCCDDDD0000F7FFFFF0FF7FFFFFF - 00DDDD8FF8FFFFFFF8FFFFFFFFF87DDDCDDDDCDDDDD0FF0FFFFFFF0FFFFFFFFF - 00DDDD8F78888888888888888888DDDDDDDDDDDDDDD0F7000000000000000000 - 0DDDDD8F7FFFFF8FF7FFFFFF87DDDDDDDDDDDDDDDDD0F7FFFFF0FF7FFFFFF00D - DDDDDD8FFFFFFF8FFFFFFFFF87DDDDDDDDDDDDDDDDD0FFFFFFF0FFFFFFFFF00D - DDDDDD8888888888888888888DDDDDDDDDDDDDDDDDD0000000000000000000DD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblCardFraming: TLabel - Left = 5 - Top = 141 - Width = 38 - Height = 13 - Caption = 'Framing' - end - object chbxColumnFields: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = '&Column Fields' - TabOrder = 0 - OnClick = chbxOptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 4 - Left = 90 - Top = 125 - Width = 200 - Height = 17 - Caption = '&Expand Buttons' - TabOrder = 4 - OnClick = chbxOptionsViewClick - end - object chbxHorizontalLines: TCheckBox - Tag = 1 - Left = 90 - Top = 157 - Width = 200 - Height = 17 - Caption = '&Horizontal Lines' - TabOrder = 5 - OnClick = chbxOptionsViewClick - end - object chbxVerticalLines: TCheckBox - Tag = 2 - Left = 90 - Top = 181 - Width = 200 - Height = 17 - Caption = '&Vertical Lines' - TabOrder = 6 - OnClick = chbxOptionsViewClick - end - object chbxBorders: TCheckBox - Tag = 3 - Left = 90 - Top = 205 - Width = 200 - Height = 17 - Caption = '&Borders' - TabOrder = 7 - OnClick = chbxOptionsViewClick - end - object chbxDataFields: TCheckBox - Left = 90 - Top = 53 - Width = 200 - Height = 17 - Caption = '&Data Fields' - TabOrder = 1 - OnClick = chbxOptionsViewClick - end - object chbxFilterFields: TCheckBox - Left = 90 - Top = 77 - Width = 200 - Height = 17 - Caption = '&Filter Fields' - TabOrder = 2 - OnClick = chbxOptionsViewClick - end - object chbxRowFields: TCheckBox - Left = 90 - Top = 101 - Width = 200 - Height = 17 - Caption = '&Row Fields' - TabOrder = 3 - OnClick = chbxOptionsViewClick - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblExpanding: TLabel - Left = 5 - Top = 8 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object bvlExpanding: TBevel - Left = 62 - Top = 13 - Width = 234 - Height = 4 - Shape = bsBottomLine - end - object imgExpanding: TImage - Left = 9 - Top = 31 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object chbxExpandRows: TCheckBox - Tag = 1 - Left = 90 - Top = 53 - Width = 200 - Height = 17 - Caption = 'Rows' - TabOrder = 1 - OnClick = chbxExpandOptionsClick - end - object chbxExpandColumns: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = 'Columns' - TabOrder = 0 - OnClick = chbxExpandOptionsClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 211 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D0887777787787FFFFFFFFFFF07DDDDDDDDDDD0F87777787787FFFFFFFFF - FF07D0888888888887F000FF0000F07DDDDDDDDDDD0F88888888887F000FF000 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000080087F00000000FF07DDDDDDDDDDD0F80000080087F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000000F07DCCCCDCCDDD0F80000000887F00000000 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000F00F07DDDDDDDDDDD0F80000000887F000000F0 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000008887F00000FF00F07DCCCCDCCDDD0F80000008887F00000FF0 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F00000000FF07DDDDDDDDDDD0F80000000887F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF7FFFFFFF07DDCCCCDCCDDD0888888888887FF777777F - F07DD0888888888887FF70888FFF07DDCCCCCCCCDD0888888888887FF7FFFF7F - F07DD0880000000887FF70FF8FFF07DDCCCCDCCDDD0880000000887FF7F00F7F - F07DD0888888888887FF70FF8FFF07DDCDDDDCDDDD0888888888887FF7F00F7F - F07DD0880008888887FF70000FFF07DDDDDDDDDDDD0880008888887FF7FFFF7F - F07DD0888888888887FF777777FF07DDDDDDDDDDDD0888888888887FF777777F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCCCCCCCCDD0888888888887FFFFFFFFF - F07DD0880000000887FCCCCCCCFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0880000000887F9999999FF07DDDDDDDDDDDD0880000000887F88888FFF - F07DD0888888888887FF99999FFF07DDDDDDDDDDDD0888888888887F888888FF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF888FFFFF07DDDDDDDDDDDD0888888888887FF888FFFF - F07DD0880000888887FFFFFFFFFF07DDDDDDDDDDDD0880000888887FFFFFFFFF - F07DD0880000000087FF888888FF07DDDDDDDDDDDD0880000000087FF888888F - F07DD0888888888887FF888888FF07DDDDDDDDDDDD0888888888887FF888888F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 82 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 37 - Width = 202 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnChange = cbxLookAndFeelChange - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 97 - Width = 200 - Height = 17 - Caption = 'Suppress Background Textures' - TabOrder = 1 - OnClick = OptionsFormattingChanged - end - object chbxSuppressContentColoration: TCheckBox - Tag = 2 - Left = 90 - Top = 121 - Width = 200 - Height = 17 - Caption = 'Suppress Content Coloration' - TabOrder = 2 - OnClick = OptionsFormattingChanged - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 4 - object bvlStyles: TBevel - Left = 115 - Top = 13 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 259 - Width = 224 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 255 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 214 - Height = 183 - end - object Label1: TLabel - Left = 77 - Top = 118 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 228 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = btnStyleColorClick - end - object btnStyleFont: TButton - Left = 228 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = btnStyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 228 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = btnStyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 15 - Height = 17 - TabStop = False - Caption = '&Use Native Styles' - TabOrder = 0 - OnClick = OptionsFormattingChanged - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 307 - Width = 68 - Height = 23 - Caption = '&New...' - TabOrder = 7 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 79 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Copy...' - TabOrder = 8 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 153 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Delete...' - TabOrder = 9 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 116 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = btnStylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 226 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Rename...' - TabOrder = 10 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 228 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Clear' - TabOrder = 4 - OnClick = btnStyleClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Restore Defaults' - TabOrder = 5 - OnClick = btnStyleRestoreDefaultsClick - end - object cbxStyleSheets: TComboBox - Left = 9 - Top = 274 - Width = 288 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 11 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - end - end - object pnlPreview: TPanel - Left = 309 - Top = 39 - Width = 382 - Height = 315 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewPivotGrid: TcxPivotGrid - Left = 5 - Top = 5 - Width = 371 - Height = 302 - Enabled = False - Groups = < - item - IsCaptionAssigned = True - Caption = 'FieldsGroup 1' - end> - TabOrder = 0 - TabStop = True - object pgfPurchaseQuarter: TcxPivotGridField - Area = faColumn - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Purchase Quarter' - DataBinding.ValueType = 'DateTime' - GroupIndex = 0 - GroupInterval = giDateQuarter - Visible = True - end - object pgfPurchaseMonth: TcxPivotGridField - Area = faColumn - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Purchase Month' - DataBinding.ValueType = 'DateTime' - GroupIndex = 0 - GroupExpanded = False - GroupInterval = giDateMonth - Visible = True - end - object pgfPaymentType: TcxPivotGridField - Tag = 1 - Area = faRow - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Payment Type' - DataBinding.ValueType = 'String' - Visible = True - Width = 90 - end - object pgfQuantity: TcxPivotGridField - Tag = 2 - Area = faData - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Quantity' - DataBinding.ValueType = 'Integer' - Visible = True - Width = 62 - end - object pgfCarName: TcxPivotGridField - Tag = 3 - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Car Name' - DataBinding.ValueType = 'String' - Visible = True - end - object pgfUnitPrice: TcxPivotGridField - Tag = 4 - AreaIndex = 0 - IsCaptionAssigned = True - Caption = 'Unit Price' - DataBinding.ValueType = 'Currency' - Visible = True - end - object pgfCompanyName: TcxPivotGridField - Tag = 5 - Area = faRow - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Company Name' - DataBinding.ValueType = 'String' - Visible = True - Width = 90 - end - object pgfPaymentAmount: TcxPivotGridField - Tag = 6 - Area = faData - AreaIndex = 1 - IsCaptionAssigned = True - Caption = 'Payment Amount' - DataBinding.ValueType = 'Currency' - Visible = True - end - end - end - object lblPreviewWindow: TStaticText - Left = 314 - Top = 24 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 2 - end - object cxStyleRepository1: TcxStyleRepository - Left = 4 - Top = 368 - object styleCategory: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWindowText - end - object styleHeader: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - object styleContent: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 32 - Top = 368 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - ShortCut = 16454 - OnClick = btnStyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - ShortCut = 16451 - OnClick = btnStyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - OnClick = btnStyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = btnStyleClearClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = btnStyleRestoreDefaultsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = btnStylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 60 - Top = 368 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPScxPivotGridLnk.res b/internal/x.46/Lib/D11/dxPScxPivotGridLnk.res deleted file mode 100644 index aab165c7..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxPivotGridLnk.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxSSLnk.dfm b/internal/x.46/Lib/D11/dxPScxSSLnk.dfm deleted file mode 100644 index d21b8119..00000000 --- a/internal/x.46/Lib/D11/dxPScxSSLnk.dfm +++ /dev/null @@ -1,506 +0,0 @@ -object fmdxSpreadSheetDesignWindow: TfmdxSpreadSheetDesignWindow - Left = 551 - Top = 286 - BorderStyle = bsDialog - Caption = 'SpreadSheet DesignWindow' - ClientHeight = 263 - ClientWidth = 557 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pgctrlMain: TPageControl - Left = 4 - Top = 6 - Width = 549 - Height = 221 - ActivePage = tshOptions - MultiLine = True - TabOrder = 1 - OnChange = pgctrlMainChange - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 193 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Bevel11: TBevel - Left = 40 - Top = 10 - Width = 194 - Height = 4 - Shape = bsBottomLine - end - object Bevel4: TBevel - Left = 79 - Top = 83 - Width = 156 - Height = 5 - Shape = bsBottomLine - end - object Image5: TImage - Left = 7 - Top = 102 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D7AAAAAA9AAAAA7AAAAA9AAAA07DCDDDDCDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7AAAAAA9AAAAA7AAAAA9AAAA07DCCCCDCCDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7A77AAA9A777A7A777A9A77A07DCCCCCCCCDD7F77FFF8F777F8F777F8F7 - 7F07D7AAAAAA9AAAAA7AAAAA9AAAA07DCCCCDCCDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D79999999777777777779999907DCDDDDCDDDD7888888888888888888888 - 8807D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7C77CCC9B77BB7B777B9C77C07DDDDDDDDDDD7F77FFF8F77FF8F777F8F7 - 7F07D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777779777777777779777707DDDDDDDDDDD7888888888888888888888 - 8807D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7C7777C9B77BB7B77BB9C7CC07DDDDDDDDDDD7F7777F8F77FF8F77FF8F7 - FF07D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777779777777777779777707DDDDDDDDDDD7888888888888888888888 - 8807D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7C777CC9B777B7B777B9C7CC07DDDDDDDDDDD7F777FF8F777F8F777F8F7 - FF07D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D79999999777777777779999907DDDDDDDDDDD7888888888888888888888 - 8807D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7C777CC9B777B7B77BB9C77C07DDDDDDDDDDD7F777FF8F777F8F77FF8F7 - 7F07D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777779777777777779777707DDDDDDDDDDD7888888888888888888888 - 8807D7CCCCCC9BBBBB7BBBBB9CCCC07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7C777CC9B7B7B7B777B9C77C07DDDDDDDDDDD7F777FF8F7F7F8F777F8F7 - 7F07D7CCCCCC9BBBBB7BBBBB9CCCC07DCDDDDCDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DCCCCDCCDDD7777777777777777777777 - 7707D7F888887F88887F88887F88807DCCCCCCCCDD7888888788888788888788 - 8807D7F777787F77787F77787F77807DCCCCDCCDDD7877778787778787778787 - 7807D7FFFFFF7FFFFF7FFFFF7FFFF07DCDDDDCDDDD7888888788888788888788 - 8807D7777777777777777777777770DDDDDDDDDDDD7777777777777777777777 - 770DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgGrid: TImage - Left = 6 - Top = 31 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D7FFFFFF7FFFFF7FFFFF7FFFF07DCDDDDCDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7FFFFFF7FFFFF7FFFFF7FFFF07DCCCCDCCDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F7777F7F777F7F777F7F7FF07DCCCCCCCCDD7F7777F8F777F8F777F8F7 - FF07D7FFFFFF7FFFFF7FFFFF7FFFF07DCCCCDCCDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DCDDDDCDDDD7888888888888888888888 - 8807D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F77F7F7F77FF7F7F7F7F77F07DDDDDDDDDDD7F77F7F8F77FF8F7F7F8F7 - 7F07D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DDDDDDDDDDD7888888888888888888888 - 8807D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F7F7FF7F77FF7F777F7F77F07DDDDDDDDDDD7F7F7FF8F77FF8F777F8F7 - 7F07D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DDDDDDDDDDD7888888888888888888888 - 8807D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F77FFF7F7F7F7F777F7F77F07DDDDDDDDDDD7F77FFF8F7F7F8F777F8F7 - 7F07D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DDDDDDDDDDD7888888888888888888888 - 8807D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F7777F7F77FF7F77FF7F77F07DDDDDDDDDDD7F7777F8F77FF8F77FF8F7 - 7F07D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DDDDDDDDDDD7888888888888888888888 - 8807D7FFFFFF7FFFFF7FFFFF7FFFF07DDDDDDDDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7F7777F7F77FF7F77FF7F77F07DDDDDDDDDDD7F7778F8F77FF8F77FF8F7 - 7F07D7FFFFFF7FFFFF7FFFFF7FFFF07DCDDDDCDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D77777777777777777777777707DCCCCDCCDDD7888888888888888888888 - 8807D78888887888887888887888807DCCCCCCCCDD7FFFFFF8FFFFF8FFFFF8FF - FF07D78777787877787877787877807DCCCCDCCDDD7F7777F8F777F8F777F8F7 - 7F07D78888887888887888887888807DCDDDDCDDDD7FFFFFF8FFFFF8FFFFF8FF - FF07D7777777777777777777777770DDDDDDDDDDDD7777777777777777777777 - 770DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblShow: TLabel - Left = 5 - Top = 6 - Width = 26 - Height = 13 - Caption = 'Show' - end - object lblMiscellaneous: TLabel - Left = 5 - Top = 78 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - end - object chbxRowAutoHeight: TCheckBox - Left = 88 - Top = 105 - Width = 150 - Height = 17 - Caption = '&Row AutoHeight' - TabOrder = 2 - OnClick = chbxRowAutoHeightClick - end - object chbxShowRowAndColumnHeadings: TCheckBox - Left = 88 - Top = 27 - Width = 150 - Height = 17 - Caption = 'Row and column headings' - TabOrder = 0 - OnClick = chbxShowRowAndColumnHeadingsClick - end - object chbxShowGridlines: TCheckBox - Left = 88 - Top = 50 - Width = 150 - Height = 17 - Caption = 'Gridlines' - TabOrder = 1 - OnClick = chbxShowGridlinesClick - end - object chbxSuppressSourceFormats: TCheckBox - Left = 88 - Top = 128 - Width = 150 - Height = 17 - Caption = '&Suppress source formats' - TabOrder = 3 - OnClick = chbxSuppressSourceFormatsClick - end - object lblPreview: TStaticText - Left = 243 - Top = 3 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 4 - end - end - end - object tshColor: TTabSheet - Caption = '&Color' - object pnlColor: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 193 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblGridLinesColor: TLabel - Left = 6 - Top = 144 - Width = 79 - Height = 13 - Caption = '&Grid lines color : ' - OnClick = lblColorClick - end - object bvlLineColorHolder: TBevel - Left = 91 - Top = 140 - Width = 134 - Height = 21 - Visible = False - end - object gbxFixedTransparent: TGroupBox - Left = 5 - Top = 74 - Width = 231 - Height = 54 - Caption = ' ' - TabOrder = 3 - object lblFixedColor: TLabel - Left = 6 - Top = 24 - Width = 62 - Height = 13 - Caption = 'F&ixed color : ' - OnClick = lblColorClick - end - object bvlFixedColorHolder: TBevel - Left = 86 - Top = 20 - Width = 134 - Height = 21 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 8 - Width = 231 - Height = 54 - Caption = ' ' - TabOrder = 1 - object lblColor: TLabel - Left = 6 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblColorClick - end - object bvlColorHolder: TBevel - Left = 86 - Top = 20 - Width = 134 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 6 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = chbxFixedTransparentClick - end - object chbxFixedTransparent: TCheckBox - Tag = 1 - Left = 18 - Top = 72 - Width = 15 - Height = 17 - TabOrder = 2 - OnClick = chbxFixedTransparentClick - end - object stTransparent: TStaticText - Left = 33 - Top = 7 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 4 - OnClick = stTransparentClick - end - object stFixedTransparent: TStaticText - Left = 33 - Top = 73 - Width = 98 - Height = 17 - Caption = ' Fixed Transparent ' - FocusControl = chbxFixedTransparent - TabOrder = 5 - OnClick = stFixedTransparentClick - end - end - end - object tshFont: TTabSheet - Caption = '&Font' - object pnlFont: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 193 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object btnFont: TButton - Left = 8 - Top = 9 - Width = 110 - Height = 23 - Caption = 'Fo&nt...' - TabOrder = 0 - OnClick = btnFixedFontClick - end - object edFont: TEdit - Left = 8 - Top = 38 - Width = 224 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnFixedFont: TButton - Tag = 1 - Left = 8 - Top = 70 - Width = 110 - Height = 23 - Caption = 'Fi&xed Font...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnFixedFontClick - end - object edFixedFont: TEdit - Left = 8 - Top = 99 - Width = 224 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 541 - Height = 193 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Image3: TImage - Left = 7 - Top = 102 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel3: TBevel - Left = 56 - Top = 83 - Width = 178 - Height = 4 - Shape = bsBottomLine - end - object Image1: TImage - Left = 22 - Top = 31 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Bevel10: TBevel - Left = 83 - Top = 10 - Width = 150 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 6 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object lblSelection: TLabel - Left = 5 - Top = 78 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object chbxOnlySelected: TCheckBox - Left = 88 - Top = 102 - Width = 150 - Height = 17 - Caption = 'Only &selected cells' - TabOrder = 1 - OnClick = chbxOnlySelectedClick - end - object chbxFixedRowsOnEveryPage: TCheckBox - Left = 88 - Top = 29 - Width = 150 - Height = 17 - Caption = 'Fi&xed Rows On Every Page' - TabOrder = 0 - OnClick = chbxFixedRowsOnEveryPageClick - end - end - end - end - object pnlPreview: TPanel - Left = 253 - Top = 50 - Width = 289 - Height = 165 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 0 - end -end diff --git a/internal/x.46/Lib/D11/dxPScxScheduler2Lnk.dfm b/internal/x.46/Lib/D11/dxPScxScheduler2Lnk.dfm deleted file mode 100644 index 611ba107..00000000 --- a/internal/x.46/Lib/D11/dxPScxScheduler2Lnk.dfm +++ /dev/null @@ -1,1630 +0,0 @@ -object cxfmSchedulerReportLinkDesignWindow: TcxfmSchedulerReportLinkDesignWindow - Left = 296 - Top = 90 - BorderStyle = bsDialog - Caption = 'cxfmSchedulerReportLinkDesignWindow' - ClientHeight = 446 - ClientWidth = 618 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 610 - Height = 404 - ActivePage = tshPrintStyles - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - OnChange = PageControl1Change - object tshPrintRange: TTabSheet - Caption = 'Print Range' - ImageIndex = 3 - object lblPrintRangeStart: TLabel - Left = 17 - Top = 22 - Width = 28 - Height = 13 - Caption = '&Start:' - end - object lblPrintRangeEnd: TLabel - Left = 18 - Top = 54 - Width = 22 - Height = 13 - Caption = '&End:' - end - object lblPrintRangesMiscellaneous: TLabel - Left = 5 - Top = 91 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - Visible = False - end - object Bevel1: TBevel - Left = 80 - Top = 95 - Width = 231 - Height = 4 - Shape = bsBottomLine - Visible = False - end - object dePrintRangeStart: TcxDateEdit - Left = 70 - Top = 18 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeStartEditValueChanged - TabOrder = 0 - Width = 235 - end - object dePrintRangeEnd: TcxDateEdit - Left = 70 - Top = 50 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeEndEditValueChanged - TabOrder = 1 - Width = 235 - end - object chbxHideDetailsOfPrivateAppointments: TcxCheckBox - Left = 66 - Top = 113 - Caption = 'Hide Details of Private Appointments' - TabOrder = 2 - Visible = False - Width = 236 - end - end - object tshPrintStyles: TTabSheet - Caption = 'Print Styles' - object lblPrintStylesOptions: TLabel - Left = 5 - Top = 48 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPrintStyleOptions: TBevel - Left = 50 - Top = 52 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewWindow: TStaticText - Left = 324 - Top = 0 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 0 - end - object cbxPrintStyles: TcxImageComboBox - Left = 6 - Top = 7 - Properties.Alignment.Vert = taVCenter - Properties.Items = <> - TabOrder = 1 - OnClick = cbxPrintStylesClick - Width = 303 - end - object pcPrintStyleOptions: TPageControl - Left = 4 - Top = 62 - Width = 314 - Height = 313 - ActivePage = tshYearly - Style = tsButtons - TabOrder = 2 - TabStop = False - object tshDaily: TTabSheet - Caption = 'Daily' - TabVisible = False - object lblPrintStyleDailyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleDailyLayout - end - object lblPrintStyleDailyInclude: TLabel - Left = 14 - Top = 64 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleDailyPrintFrom: TLabel - Left = 14 - Top = 136 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleDailyPrintFrom - end - object lblPrintStyleDailyPrintTo: TLabel - Left = 14 - Top = 165 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleDailyPrintTo - end - object lblPrintStyleDailyResourceCountPerPage: TLabel - Left = 14 - Top = 34 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleDailyResourceCountPerPage - end - object Bevel2: TBevel - Left = 0 - Top = 192 - Width = 306 - Height = 4 - Shape = bsBottomLine - end - object cbxPrintStyleDailyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 0 - OnClick = cbxPrintStyleDailyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleDailyTaskPad: TcxCheckBox - Left = 111 - Top = 61 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleDailyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 82 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleDailyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 103 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object tePrintStyleDailyPrintFrom: TcxTimeEdit - Left = 114 - Top = 132 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 5 - Width = 100 - end - object tePrintStyleDailyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 161 - EditValue = 0.000000000000000000 - Properties.ImmediatePost = True - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 6 - Width = 100 - end - object sePrintStyleDailyResourceCountPerPage: TcxSpinEdit - Left = 115 - Top = 30 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - Width = 100 - end - object chbxPrintStyleDailyShowResourceImages: TcxCheckBox - Left = -1 - Top = 201 - Caption = 'Show resource images' - TabOrder = 7 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - object chbxPrintStyleDailyShowEventImages: TcxCheckBox - Left = -1 - Top = 222 - Caption = 'Show event images' - TabOrder = 8 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - end - object tshWeekly: TTabSheet - Caption = 'Weekly' - ImageIndex = 1 - TabVisible = False - object lblPrintStyleWeeklyPrintTo: TLabel - Left = 14 - Top = 212 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleWeeklyPrintTo - end - object lblPrintStyleWeeklyPrintFrom: TLabel - Left = 14 - Top = 183 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleWeeklyPrintFrom - end - object lblPrintStyleWeeklyInclude: TLabel - Left = 14 - Top = 119 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleWeeklyLayout: TLabel - Left = 14 - Top = 33 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleWeeklyLayout - end - object lblPrintStyleWeeklyArrange: TLabel - Left = 14 - Top = 4 - Width = 43 - Height = 13 - Caption = '&Arrange:' - FocusControl = cbxPrintStyleWeeklyArrange - end - object lblPrintStyleWeeklyResourceCountPerPage: TLabel - Left = 14 - Top = 94 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleWeeklyResourceCountPerPage - end - object lblPrintStyleWeeklyDaysLayout: TLabel - Left = 14 - Top = 63 - Width = 61 - Height = 13 - Caption = '&Days layout:' - FocusControl = cbxPrintStyleWeeklyDaysLayout - end - object Bevel3: TBevel - Left = 0 - Top = 237 - Width = 306 - Height = 4 - Shape = bsBottomLine - end - object tePrintStyleWeeklyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 207 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 8 - Width = 100 - end - object tePrintStyleWeeklyPrintFrom: TcxTimeEdit - Left = 114 - Top = 178 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 7 - Width = 100 - end - object chbxPrintStyleWeeklyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 152 - Caption = 'Notes Area (&Lined)' - TabOrder = 6 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleWeeklyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 134 - Caption = 'Notes Area (&Blank)' - TabOrder = 5 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object cbxPrintStyleWeeklyArrange: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Top to Bottom' - 'Left to Right') - TabOrder = 0 - OnClick = cbxPrintStyleWeeklyArrangeClick - Height = 23 - Width = 186 - end - object cbxPrintStyleWeeklyLayout: TcxComboBox - Left = 115 - Top = 29 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 1 - OnClick = cbxPrintStyleWeeklyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleWeeklyTaskPad: TcxCheckBox - Left = 111 - Top = 116 - Caption = 'TaskPad' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleWeeklyDontPrintWeekends: TcxCheckBox - Left = -1 - Top = 243 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 9 - OnClick = chbxPrintStyleWeeklyDontPrintWeekendsClick - Width = 285 - end - object sePrintStyleWeeklyResourceCountPerPage: TcxSpinEdit - Tag = 1 - Left = 115 - Top = 90 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 3 - Width = 100 - end - object cbxPrintStyleWeeklyDaysLayout: TcxComboBox - Left = 115 - Top = 59 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Two columns' - 'One column') - TabOrder = 2 - OnClick = cbxPrintStyleWeeklyDaysLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleWeeklyShowEventImages: TcxCheckBox - Left = -1 - Top = 283 - Caption = 'Show event images' - TabOrder = 11 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - object chbxPrintStyleWeeklyShowResourceImages: TcxCheckBox - Left = -1 - Top = 263 - Caption = 'Show resource images' - TabOrder = 10 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - end - object tshMonthly: TTabSheet - Caption = 'Monthly' - ImageIndex = 2 - TabVisible = False - object lblPrintStyleMonthlyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleMonthlyLayout - end - object lblPrintStyleMonthlyInclude: TLabel - Left = 14 - Top = 62 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleMonthlyResourceCountPerPage: TLabel - Left = 14 - Top = 34 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleMonthlyResourceCountPerPage - end - object Bevel4: TBevel - Left = 0 - Top = 127 - Width = 314 - Height = 4 - Shape = bsBottomLine - end - object cbxPrintStyleMonthlyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/month' - '2 pages/month') - TabOrder = 0 - OnClick = cbxPrintStyleMonthlyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleMonthlyTaskPad: TcxCheckBox - Left = 111 - Top = 59 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 80 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 101 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyDontPrintWeekends: TcxCheckBox - Left = -1 - Top = 136 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 5 - OnClick = chbxPrintStyleMonthlyDontPrintWeekendsClick - Width = 285 - end - object chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage: TcxCheckBox - Left = -1 - Top = 156 - Caption = 'Print Exactly One Month Per Page' - TabOrder = 6 - OnClick = chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick - Width = 285 - end - object sePrintStyleMonthlyResourceCountPerPage: TcxSpinEdit - Tag = 2 - Left = 115 - Top = 29 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - Width = 100 - end - object chbxPrintStyleMonthlyShowEventImages: TcxCheckBox - Left = -1 - Top = 198 - Caption = 'Show event images' - TabOrder = 7 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - object chbxPrintStyleMonthlyShowResourceImages: TcxCheckBox - Left = -1 - Top = 177 - Caption = 'Show resource images' - TabOrder = 8 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - end - object tshTrifold: TTabSheet - Caption = 'Tri-fold' - ImageIndex = 3 - TabVisible = False - object lblPrintStyleTrifoldSectionLeft: TLabel - Left = 14 - Top = 4 - Width = 61 - Height = 13 - Caption = '&Left Section:' - FocusControl = cbxPrintStyleTrifoldSectionLeft - end - object lblPrintStyleTrifoldSectionMiddle: TLabel - Left = 14 - Top = 38 - Width = 72 - Height = 13 - Caption = '&Middle Section:' - FocusControl = cbxPrintStyleTrifoldSectionMiddle - end - object lblPrintStyleTrifoldSectionRight: TLabel - Left = 14 - Top = 71 - Width = 67 - Height = 13 - Caption = '&Right Section:' - FocusControl = cbxPrintStyleTrifoldSectionRight - end - object cbxPrintStyleTrifoldSectionLeft: TcxComboBox - Left = 100 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 0 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - object cbxPrintStyleTrifoldSectionMiddle: TcxComboBox - Tag = 1 - Left = 100 - Top = 33 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 1 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - object cbxPrintStyleTrifoldSectionRight: TcxComboBox - Tag = 2 - Left = 100 - Top = 66 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 2 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - end - object tshDetails: TTabSheet - Caption = 'Details' - ImageIndex = 4 - TabVisible = False - object chbxPrintStyleDetailsUsePagination: TcxCheckBox - Left = 14 - Top = 0 - Caption = 'Start a New Page Each:' - TabOrder = 0 - OnClick = chbxPrintStyleDetailsUsePaginationClick - Width = 187 - end - object cbxPrintStyleDetailsPagination: TcxComboBox - Left = 203 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Day' - 'Week' - 'Month') - TabOrder = 1 - OnClick = cbxPrintStyleDetailsPaginationClick - Height = 23 - Width = 98 - end - end - object tshMemo: TTabSheet - Caption = 'Memo' - ImageIndex = 5 - TabVisible = False - object chbxPrintStyleMemoStartEachItemOnNewPage: TcxCheckBox - Left = 14 - Top = 1 - Caption = 'Start Each Item On New Page' - TabOrder = 0 - OnClick = chbxPrintStyleMemoStartEachItemOnNewPageClick - Width = 187 - end - object chbxPrintStyleMemoPrintOnlySelectedEvents: TcxCheckBox - Left = 14 - Top = 25 - Caption = 'Print Only Selected Events' - State = cbsChecked - TabOrder = 1 - OnClick = chbxPrintStyleMemoPrintOnlySelectedEventsClick - Width = 187 - end - end - object tshYearly: TTabSheet - ImageIndex = 6 - TabVisible = False - object lblPrintStyleYearlyMonthPerPage: TLabel - Left = 14 - Top = 38 - Width = 67 - Height = 13 - Caption = '&Months/Page:' - FocusControl = cbxPrintStyleYearlyMonthPerPage - end - object lblPrintStyleYearlyResourceCountPerPage: TLabel - Left = 14 - Top = 72 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleYearlyResourceCountPerPage - Visible = False - end - object lblPrintStyleYearlyInclude: TLabel - Left = 14 - Top = 102 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleYearlyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleYearlyLayout - end - object Bevel5: TBevel - Left = 0 - Top = 168 - Width = 306 - Height = 4 - Shape = bsBottomLine - end - object cbxPrintStyleYearlyMonthPerPage: TcxComboBox - Left = 115 - Top = 33 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/year' - '2 pages/year' - '3 pages/year' - '4 pages/year' - '6 pages/year' - '12 pages/year') - TabOrder = 1 - Text = '12 pages/year' - OnClick = cbxPrintStyleYearlyMonthPagesPerYearClick - Height = 23 - Width = 186 - end - object sePrintStyleYearlyResourceCountPerPage: TcxSpinEdit - Tag = 3 - Left = 115 - Top = 68 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 2 - Visible = False - Width = 100 - end - object chbxPrintStyleYearlyTaskPad: TcxCheckBox - Left = 111 - Top = 99 - Caption = 'Task&Pad' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleYearlyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 120 - Caption = 'Notes Area (&Blank)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleYearlyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 141 - Caption = 'Notes Area (&Lined)' - TabOrder = 5 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object cbxPrintStyleYearlyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/month' - '2 pages/month') - TabOrder = 0 - Text = '1 page/month' - OnClick = cbxPrintStyleYearlyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrimaryPageHeadersOnly: TcxCheckBox - Left = -1 - Top = 178 - Caption = 'Primary page headers only' - TabOrder = 6 - OnClick = chbxPrimaryPageHeadersOnlyClick - Width = 153 - end - object chbxPrintStyleYearlyShowEventImages: TcxCheckBox - Left = -1 - Top = 199 - Caption = 'Show event images' - TabOrder = 7 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - end - end - object pnlPrintStylesPreview: TPanel - Left = 323 - Top = 17 - Width = 275 - Height = 356 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 3 - object pbxPrintStylesPreview: TPaintBox - Left = 1 - Top = 1 - Width = 273 - Height = 354 - Align = alClient - OnPaint = pbxPrintStylesPreviewPaint - end - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 2 - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF78888877787807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0888877787878888877787807DDDDDDDDDDDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF0DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 75 - Top = 82 - Width = 236 - Height = 4 - Shape = bsBottomLine - end - object imgRefinements: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FAFAFAFAFA788888777CC807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0AFAFAFAFAF78888888888807DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0AFAFAFAFAF7FAFAFAFAFAF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FEFEFEFEFE7EFEFEFEFEFE07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0EFEFEFEFEF7FEFEFEFEFEF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0EFEFEFEFEF7FEFEFEFEFEF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FEFEFEFEFE7EFEFEFEFEFE07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FBFBFBFBFB7BFBFBFBFBFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FBFBFBFBFB7BFBFBFBFBFB07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDDDDDDDDDDD088887778787888887778 - 7807D088888888887888888888880DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TcxComboBox - Left = 90 - Top = 37 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.OnChange = cbxLookAndFeelPropertiesChange - TabOrder = 0 - OnClick = LookAndFeelChange - Height = 23 - Width = 215 - end - object chbxSuppressBackgroundBitmaps: TcxCheckBox - Tag = 1 - Left = 90 - Top = 104 - Caption = 'Suppress Background Textures' - TabOrder = 1 - OnClick = OptionsFormattingClick - Width = 200 - end - object chbxSuppressContentColoration: TcxCheckBox - Tag = 2 - Left = 90 - Top = 130 - Caption = 'Suppress Content Coloration' - TabOrder = 2 - OnClick = OptionsFormattingClick - Width = 200 - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 1 - object bvlStyles: TBevel - Left = 118 - Top = 13 - Width = 193 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 302 - Width = 239 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 298 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 222 - end - object Label1: TLabel - Left = 85 - Top = 140 - Width = 64 - Height = 13 - Caption = '[ Styles Site ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 0 - OnClick = btnStyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = btnStyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 2 - OnClick = btnStyleBackgroundBitmapClick - end - object cbxStyleSheets: TcxComboBox - Left = 6 - Top = 318 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 20 - Properties.OnDrawItem = cbxStyleSheetsPropertiesDrawItem - TabOrder = 3 - OnClick = cbxStyleSheetsClick - OnKeyDown = cbxStyleSheetsKeyDown - Height = 24 - Width = 305 - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 350 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 4 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 84 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 5 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 162 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 6 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 7 - OnClick = btnStylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 240 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 8 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 9 - OnClick = btnStyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 10 - OnClick = btnStyleRestoreDefaultsClick - end - object chbxUseNativeStyles: TcxCheckBox - Left = 3 - Top = 6 - TabOrder = 11 - OnClick = OptionsFormattingClick - Width = 22 - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 46 - Width = 275 - Height = 356 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object Panel1: TPanel - Left = 1 - Top = 1 - Width = 273 - Height = 354 - Align = alClient - Color = clWindow - TabOrder = 0 - object pbPreview: TPaintBox - Left = 1 - Top = 1 - Width = 271 - Height = 352 - Align = alClient - OnPaint = pbPreviewPaint - end - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 6 - Top = 417 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = btnStyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = btnStyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = btnStyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = btnStyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = btnStyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = btnStylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 34 - Top = 417 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxEditStyleController1: TcxEditStyleController - OnStyleChanged = StyleController1StyleChanged - Left = 64 - Top = 416 - end -end diff --git a/internal/x.46/Lib/D11/dxPScxScheduler3Lnk.dfm b/internal/x.46/Lib/D11/dxPScxScheduler3Lnk.dfm deleted file mode 100644 index 664ea869..00000000 --- a/internal/x.46/Lib/D11/dxPScxScheduler3Lnk.dfm +++ /dev/null @@ -1,1884 +0,0 @@ -object cxfmSchedulerReportLinkDesignWindow: TcxfmSchedulerReportLinkDesignWindow - Left = 349 - Top = 267 - BorderStyle = bsDialog - Caption = 'cxfmSchedulerReportLinkDesignWindow' - ClientHeight = 487 - ClientWidth = 618 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 610 - Height = 445 - ActivePage = tshPrintStyles - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - OnChange = PageControl1Change - object tshPrintRange: TTabSheet - Caption = 'Print Range' - ImageIndex = 3 - object lblPrintRangeStart: TLabel - Left = 17 - Top = 22 - Width = 28 - Height = 13 - Caption = '&Start:' - end - object lblPrintRangeEnd: TLabel - Left = 18 - Top = 54 - Width = 22 - Height = 13 - Caption = '&End:' - end - object lblPrintRangesMiscellaneous: TLabel - Left = 5 - Top = 91 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - Visible = False - end - object Bevel1: TBevel - Left = 80 - Top = 95 - Width = 231 - Height = 4 - Shape = bsBottomLine - Visible = False - end - object dePrintRangeStart: TcxDateEdit - Left = 70 - Top = 18 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeStartEditValueChanged - TabOrder = 0 - Width = 235 - end - object dePrintRangeEnd: TcxDateEdit - Left = 70 - Top = 50 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeEndEditValueChanged - TabOrder = 1 - Width = 235 - end - object chbxHideDetailsOfPrivateAppointments: TcxCheckBox - Left = 66 - Top = 113 - Caption = 'Hide Details of Private Appointments' - TabOrder = 2 - Visible = False - Width = 236 - end - end - object tshPrintStyles: TTabSheet - Caption = 'Print Styles' - object lblPrintStylesOptions: TLabel - Left = 5 - Top = 48 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPrintStyleOptions: TBevel - Left = 50 - Top = 52 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewWindow: TStaticText - Left = 324 - Top = 0 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 0 - end - object cbxPrintStyles: TcxImageComboBox - Left = 6 - Top = 7 - Properties.Alignment.Vert = taVCenter - Properties.Items = <> - TabOrder = 1 - OnClick = cbxPrintStylesClick - Width = 303 - end - object pcPrintStyleOptions: TPageControl - Left = 4 - Top = 64 - Width = 314 - Height = 348 - ActivePage = tshTimeLine - Style = tsButtons - TabOrder = 2 - TabStop = False - object tshDaily: TTabSheet - Caption = 'Daily' - TabVisible = False - object lblPrintStyleDailyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleDailyLayout - end - object lblPrintStyleDailyInclude: TLabel - Left = 14 - Top = 64 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleDailyPrintFrom: TLabel - Left = 14 - Top = 136 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleDailyPrintFrom - end - object lblPrintStyleDailyPrintTo: TLabel - Left = 14 - Top = 165 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleDailyPrintTo - end - object lblPrintStyleDailyResourceCountPerPage: TLabel - Left = 14 - Top = 34 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleDailyResourceCountPerPage - end - object Bevel2: TBevel - Left = 32 - Top = 194 - Width = 274 - Height = 4 - Shape = bsBottomLine - end - object lbViewDaily: TLabel - Left = 1 - Top = 190 - Width = 22 - Height = 13 - Caption = 'View' - end - object Bevel7: TBevel - Left = 48 - Top = 237 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object lbImagesDaily: TLabel - Left = 3 - Top = 232 - Width = 38 - Height = 13 - Caption = 'Images ' - end - object cbxPrintStyleDailyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 0 - OnClick = cbxPrintStyleDailyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleDailyTaskPad: TcxCheckBox - Left = 111 - Top = 61 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleDailyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 82 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleDailyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 103 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object tePrintStyleDailyPrintFrom: TcxTimeEdit - Left = 114 - Top = 132 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 5 - Width = 100 - end - object tePrintStyleDailyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 161 - EditValue = 0.000000000000000000 - Properties.ImmediatePost = True - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 6 - Width = 100 - end - object sePrintStyleDailyResourceCountPerPage: TcxSpinEdit - Left = 115 - Top = 30 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - Width = 100 - end - object chbxPrintStyleDailyShowResourceImages: TcxCheckBox - Left = 15 - Top = 206 - Caption = 'Show resource images' - TabOrder = 7 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - object chbxPrintStyleDailyShowEventImages: TcxCheckBox - Left = 15 - Top = 251 - Caption = 'Show event images' - TabOrder = 8 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - end - object tshWeekly: TTabSheet - Caption = 'Weekly' - ImageIndex = 1 - TabVisible = False - object lblPrintStyleWeeklyPrintTo: TLabel - Left = 14 - Top = 218 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleWeeklyPrintTo - end - object lblPrintStyleWeeklyPrintFrom: TLabel - Left = 14 - Top = 189 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleWeeklyPrintFrom - end - object lblPrintStyleWeeklyInclude: TLabel - Left = 14 - Top = 119 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleWeeklyLayout: TLabel - Left = 14 - Top = 33 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleWeeklyLayout - end - object lblPrintStyleWeeklyArrange: TLabel - Left = 14 - Top = 4 - Width = 43 - Height = 13 - Caption = '&Arrange:' - FocusControl = cbxPrintStyleWeeklyArrange - end - object lblPrintStyleWeeklyResourceCountPerPage: TLabel - Left = 14 - Top = 94 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleWeeklyResourceCountPerPage - end - object lblPrintStyleWeeklyDaysLayout: TLabel - Left = 14 - Top = 63 - Width = 61 - Height = 13 - Caption = '&Days layout:' - FocusControl = cbxPrintStyleWeeklyDaysLayout - end - object Bevel3: TBevel - Left = 32 - Top = 245 - Width = 274 - Height = 4 - Shape = bsBottomLine - end - object Label5: TLabel - Left = 1 - Top = 241 - Width = 22 - Height = 13 - Caption = 'View' - end - object Bevel8: TBevel - Left = 48 - Top = 287 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object Label6: TLabel - Left = 3 - Top = 282 - Width = 38 - Height = 13 - Caption = 'Images ' - end - object tePrintStyleWeeklyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 213 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 8 - Width = 100 - end - object tePrintStyleWeeklyPrintFrom: TcxTimeEdit - Left = 114 - Top = 184 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 7 - Width = 100 - end - object chbxPrintStyleWeeklyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 158 - Caption = 'Notes Area (&Lined)' - TabOrder = 6 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleWeeklyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 137 - Caption = 'Notes Area (&Blank)' - TabOrder = 5 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object cbxPrintStyleWeeklyArrange: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Top to Bottom' - 'Left to Right') - TabOrder = 0 - OnClick = cbxPrintStyleWeeklyArrangeClick - Height = 23 - Width = 186 - end - object cbxPrintStyleWeeklyLayout: TcxComboBox - Left = 115 - Top = 29 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 1 - OnClick = cbxPrintStyleWeeklyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleWeeklyTaskPad: TcxCheckBox - Left = 111 - Top = 116 - Caption = 'TaskPad' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleWeeklyDontPrintWeekends: TcxCheckBox - Left = 15 - Top = 257 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 9 - OnClick = chbxPrintStyleWeeklyDontPrintWeekendsClick - Width = 285 - end - object sePrintStyleWeeklyResourceCountPerPage: TcxSpinEdit - Tag = 1 - Left = 115 - Top = 90 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 3 - Width = 100 - end - object cbxPrintStyleWeeklyDaysLayout: TcxComboBox - Left = 115 - Top = 59 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Two columns' - 'One column') - TabOrder = 2 - OnClick = cbxPrintStyleWeeklyDaysLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleWeeklyShowEventImages: TcxCheckBox - Left = 15 - Top = 320 - Caption = 'Show Event Images' - TabOrder = 11 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - object chbxPrintStyleWeeklyShowResourceImages: TcxCheckBox - Left = 15 - Top = 299 - Caption = 'Show Resource Images' - TabOrder = 10 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - end - object tshMonthly: TTabSheet - Caption = 'Monthly' - ImageIndex = 2 - TabVisible = False - object lblPrintStyleMonthlyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleMonthlyLayout - end - object lblPrintStyleMonthlyInclude: TLabel - Left = 14 - Top = 62 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleMonthlyResourceCountPerPage: TLabel - Left = 14 - Top = 34 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleMonthlyResourceCountPerPage - end - object Bevel9: TBevel - Left = 32 - Top = 129 - Width = 274 - Height = 4 - Shape = bsBottomLine - end - object Label7: TLabel - Left = 1 - Top = 125 - Width = 22 - Height = 13 - Caption = 'View' - end - object Bevel10: TBevel - Left = 48 - Top = 191 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object Label8: TLabel - Left = 3 - Top = 186 - Width = 38 - Height = 13 - Caption = 'Images ' - end - object cbxPrintStyleMonthlyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/month' - '2 pages/month') - TabOrder = 0 - OnClick = cbxPrintStyleMonthlyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrintStyleMonthlyTaskPad: TcxCheckBox - Left = 111 - Top = 59 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 80 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 101 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleMonthlyDontPrintWeekends: TcxCheckBox - Left = 15 - Top = 141 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 5 - OnClick = chbxPrintStyleDontPrintWeekEndsClick - Width = 285 - end - object chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage: TcxCheckBox - Left = 15 - Top = 162 - Caption = 'Print Exactly One Month Per Page' - TabOrder = 6 - OnClick = chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick - Width = 285 - end - object sePrintStyleMonthlyResourceCountPerPage: TcxSpinEdit - Tag = 2 - Left = 115 - Top = 29 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - Width = 100 - end - object chbxPrintStyleMonthlyShowEventImages: TcxCheckBox - Left = 15 - Top = 224 - Caption = 'Show Event Images' - TabOrder = 7 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - object chbxPrintStyleMonthlyShowResourceImages: TcxCheckBox - Left = 15 - Top = 203 - Caption = 'Show Resource Images' - TabOrder = 8 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - end - object tshTrifold: TTabSheet - Caption = 'Tri-fold' - ImageIndex = 3 - TabVisible = False - object lblPrintStyleTrifoldSectionLeft: TLabel - Left = 14 - Top = 4 - Width = 61 - Height = 13 - Caption = '&Left Section:' - FocusControl = cbxPrintStyleTrifoldSectionLeft - end - object lblPrintStyleTrifoldSectionMiddle: TLabel - Left = 14 - Top = 38 - Width = 72 - Height = 13 - Caption = '&Middle Section:' - FocusControl = cbxPrintStyleTrifoldSectionMiddle - end - object lblPrintStyleTrifoldSectionRight: TLabel - Left = 14 - Top = 71 - Width = 67 - Height = 13 - Caption = '&Right Section:' - FocusControl = cbxPrintStyleTrifoldSectionRight - end - object cbxPrintStyleTrifoldSectionLeft: TcxComboBox - Left = 100 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 0 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - object cbxPrintStyleTrifoldSectionMiddle: TcxComboBox - Tag = 1 - Left = 100 - Top = 33 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 1 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - object cbxPrintStyleTrifoldSectionRight: TcxComboBox - Tag = 2 - Left = 100 - Top = 66 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 2 - OnClick = cbxPrintStyleTrifoldSectionModeClick - Height = 23 - Width = 201 - end - end - object tshDetails: TTabSheet - Caption = 'Details' - ImageIndex = 4 - TabVisible = False - object chbxPrintStyleDetailsUsePagination: TcxCheckBox - Left = 14 - Top = 0 - Caption = 'Start a New Page Each:' - TabOrder = 0 - OnClick = chbxPrintStyleDetailsUsePaginationClick - Width = 187 - end - object cbxPrintStyleDetailsPagination: TcxComboBox - Left = 203 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Day' - 'Week' - 'Month') - TabOrder = 1 - OnClick = cbxPrintStyleDetailsPaginationClick - Height = 23 - Width = 98 - end - end - object tshMemo: TTabSheet - Caption = 'Memo' - ImageIndex = 5 - TabVisible = False - object chbxPrintStyleMemoStartEachItemOnNewPage: TcxCheckBox - Left = 14 - Top = 0 - Caption = 'Start Each Item On New Page' - TabOrder = 0 - OnClick = chbxPrintStyleMemoStartEachItemOnNewPageClick - Width = 187 - end - object chbxPrintStyleMemoPrintOnlySelectedEvents: TcxCheckBox - Left = 14 - Top = 22 - Caption = 'Print Only Selected Events' - State = cbsChecked - TabOrder = 1 - OnClick = chbxPrintStyleMemoPrintOnlySelectedEventsClick - Width = 187 - end - end - object tshYearly: TTabSheet - Caption = 'Yearly' - ImageIndex = 6 - TabVisible = False - object lblPrintStyleYearlyMonthPerPage: TLabel - Left = 14 - Top = 38 - Width = 67 - Height = 13 - Caption = '&Months/Page:' - FocusControl = cbxPrintStyleYearlyMonthPerPage - end - object lblPrintStyleYearlyResourceCountPerPage: TLabel - Left = 14 - Top = 72 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleYearlyResourceCountPerPage - Visible = False - end - object lblPrintStyleYearlyInclude: TLabel - Left = 14 - Top = 102 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleYearlyLayout: TLabel - Left = 14 - Top = 4 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleYearlyLayout - end - object Bevel4: TBevel - Left = 32 - Top = 171 - Width = 274 - Height = 4 - Shape = bsBottomLine - end - object Label9: TLabel - Left = 1 - Top = 167 - Width = 22 - Height = 13 - Caption = 'View' - end - object Bevel5: TBevel - Left = 48 - Top = 216 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object Label10: TLabel - Left = 3 - Top = 211 - Width = 38 - Height = 13 - Caption = 'Images ' - end - object cbxPrintStyleYearlyMonthPerPage: TcxComboBox - Left = 115 - Top = 33 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/year' - '2 pages/year' - '3 pages/year' - '4 pages/year' - '6 pages/year' - '12 pages/year') - TabOrder = 1 - Text = '12 pages/year' - OnClick = cbxPrintStyleYearlyMonthPagesPerYearClick - Height = 23 - Width = 186 - end - object sePrintStyleYearlyResourceCountPerPage: TcxSpinEdit - Tag = 3 - Left = 115 - Top = 68 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 2 - Visible = False - Width = 100 - end - object chbxPrintStyleYearlyTaskPad: TcxCheckBox - Left = 111 - Top = 99 - Caption = 'Task&Pad' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleYearlyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 120 - Caption = 'Notes Area (&Blank)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleYearlyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 141 - Caption = 'Notes Area (&Lined)' - TabOrder = 5 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object cbxPrintStyleYearlyLayout: TcxComboBox - Left = 115 - Top = -1 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/month' - '2 pages/month') - TabOrder = 0 - Text = '1 page/month' - OnClick = cbxPrintStyleYearlyLayoutClick - Height = 23 - Width = 186 - end - object chbxPrimaryPageHeadersOnly: TcxCheckBox - Left = 15 - Top = 184 - Caption = 'Primary Page Headers Only' - TabOrder = 6 - OnClick = chbxPrimaryPageHeadersOnlyClick - Width = 153 - end - object chbxPrintStyleYearlyShowEventImages: TcxCheckBox - Left = 15 - Top = 230 - Caption = 'Show Event Images' - TabOrder = 7 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - end - object tshTimeLine: TTabSheet - Caption = 'TimeLine' - ImageIndex = 7 - TabVisible = False - object lblPrintStyleTimeLineResourceCountPerPage: TLabel - Left = 14 - Top = 3 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleTimeLineResourceCountPerPage - end - object lblPrintStyleTimeLineInclude: TLabel - Left = 14 - Top = 33 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleTimeLinePrintFrom: TLabel - Left = 14 - Top = 106 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleTimeLinePrintFrom - end - object lblPrintStyleTimeLinePrintTo: TLabel - Left = 14 - Top = 135 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleTimeLinePrintTo - end - object Bevel6: TBevel - Left = 32 - Top = 165 - Width = 274 - Height = 4 - Shape = bsBottomLine - end - object bvlTimeLineImages: TBevel - Left = 48 - Top = 274 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object Label2: TLabel - Left = 1 - Top = 161 - Width = 22 - Height = 13 - Caption = 'View' - end - object lbTimeLineImages: TLabel - Left = 3 - Top = 269 - Width = 38 - Height = 13 - Caption = 'Images ' - end - object sePrintStyleTimeLineResourceCountPerPage: TcxSpinEdit - Tag = 4 - Left = 115 - Top = -1 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 0 - Width = 100 - end - object chbxPrintStyleTimeLineTaskPad: TcxCheckBox - Left = 111 - Top = 30 - Caption = 'Task&Pad' - TabOrder = 1 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleTimeLineNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 51 - Caption = 'Notes Area (&Blank)' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object chbxPrintStyleTimeLineNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 72 - Caption = 'Notes Area (&Lined)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - Width = 190 - end - object tePrintStyleTimeLinePrintFrom: TcxTimeEdit - Left = 114 - Top = 101 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 4 - Width = 100 - end - object tePrintStyleTimeLinePrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 130 - EditValue = 0.000000000000000000 - Properties.ImmediatePost = True - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 5 - Width = 100 - end - object chbxPrintStyleTimeLineShowResourceImages: TcxCheckBox - Left = 15 - Top = 288 - Caption = 'Show Resource Images' - TabOrder = 10 - OnClick = chbxPrintStyleShowResourceImagesClick - Width = 306 - end - object chbxPrintStyleTimeLineShowEventImages: TcxCheckBox - Left = 15 - Top = 309 - Caption = 'Show Event Images' - TabOrder = 11 - OnClick = chbxPrintStyleShowEventImagesClick - Width = 306 - end - object chbxPrintStyleTimeLinePrimaryPageHeadersOnly: TcxCheckBox - Left = 15 - Top = 201 - Caption = 'Primary Page Headers Only' - TabOrder = 7 - OnClick = chbxPrimaryPageHeadersOnlyClick - Width = 170 - end - object chbxPrintStyleTimeLinePrimaryPageScalesOnly: TcxCheckBox - Left = 15 - Top = 180 - Caption = 'Primary Page Scales Only' - TabOrder = 6 - OnClick = chbxPrimaryPageScalesOnlyClick - Width = 162 - end - object chbxPrintStyleTimeLineDontPrintWeekends: TcxCheckBox - Left = 15 - Top = 222 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 8 - OnClick = chbxPrintStyleDontPrintWeekEndsClick - Width = 194 - end - object chbxPrintStyleTimeLineWorkTimeOnly: TcxCheckBox - Left = 15 - Top = 243 - Caption = 'W&ork Time Only' - TabOrder = 9 - OnClick = chbxPrintStyleWorkTimeOnlyClick - Width = 194 - end - end - end - object pnlPrintStylesPreview: TPanel - Left = 323 - Top = 17 - Width = 275 - Height = 356 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 3 - object pbxPrintStylesPreview: TPaintBox - Left = 1 - Top = 1 - Width = 273 - Height = 354 - Align = alClient - OnPaint = pbxPrintStylesPreviewPaint - end - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 2 - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF78888877787807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0888877787878888877787807DDDDDDDDDDDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF0DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 75 - Top = 82 - Width = 236 - Height = 4 - Shape = bsBottomLine - end - object imgRefinements: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FAFAFAFAFA788888777CC807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0AFAFAFAFAF78888888888807DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0AFAFAFAFAF7FAFAFAFAFAF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FEFEFEFEFE7EFEFEFEFEFE07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0EFEFEFEFEF7FEFEFEFEFEF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0EFEFEFEFEF7FEFEFEFEFEF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FEFEFEFEFE7EFEFEFEFEFE07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FBFBFBFBFB7BFBFBFBFBFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FBFBFBFBFB7BFBFBFBFBFB07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDDDDDDDDDDD088887778787888887778 - 7807D088888888887888888888880DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TcxComboBox - Left = 90 - Top = 37 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.OnChange = cbxLookAndFeelPropertiesChange - TabOrder = 0 - OnClick = LookAndFeelChange - Height = 23 - Width = 215 - end - object chbxSuppressBackgroundBitmaps: TcxCheckBox - Tag = 1 - Left = 90 - Top = 104 - Caption = 'Suppress Background Textures' - TabOrder = 1 - OnClick = OptionsFormattingClick - Width = 200 - end - object chbxSuppressContentColoration: TcxCheckBox - Tag = 2 - Left = 90 - Top = 130 - Caption = 'Suppress Content Coloration' - TabOrder = 2 - OnClick = OptionsFormattingClick - Width = 200 - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 1 - object bvlStyles: TBevel - Left = 118 - Top = 13 - Width = 193 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 302 - Width = 239 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 298 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 222 - end - object Label1: TLabel - Left = 85 - Top = 140 - Width = 64 - Height = 13 - Caption = '[ Styles Site ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 0 - OnClick = btnStyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = btnStyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 2 - OnClick = btnStyleBackgroundBitmapClick - end - object cbxStyleSheets: TcxComboBox - Left = 6 - Top = 318 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 20 - Properties.OnDrawItem = cbxStyleSheetsPropertiesDrawItem - TabOrder = 3 - OnClick = cbxStyleSheetsClick - OnKeyDown = cbxStyleSheetsKeyDown - Height = 24 - Width = 305 - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 350 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 4 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 84 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 5 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 162 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 6 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 7 - OnClick = btnStylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 240 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 8 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 9 - OnClick = btnStyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 10 - OnClick = btnStyleRestoreDefaultsClick - end - object chbxUseNativeStyles: TcxCheckBox - Left = 3 - Top = 6 - TabOrder = 11 - OnClick = OptionsFormattingClick - Width = 22 - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 46 - Width = 275 - Height = 395 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object Panel1: TPanel - Left = 1 - Top = 1 - Width = 273 - Height = 393 - Align = alClient - Color = clWindow - TabOrder = 0 - object pbPreview: TPaintBox - Left = 1 - Top = 1 - Width = 271 - Height = 391 - Align = alClient - OnPaint = pbPreviewPaint - end - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 6 - Top = 441 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = btnStyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = btnStyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = btnStyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = btnStyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = btnStyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = btnStylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 34 - Top = 441 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxEditStyleController1: TcxEditStyleController - OnStyleChanged = StyleController1StyleChanged - Left = 64 - Top = 440 - end -end diff --git a/internal/x.46/Lib/D11/dxPScxScheduler3Lnk.res b/internal/x.46/Lib/D11/dxPScxScheduler3Lnk.res deleted file mode 100644 index 3008a815..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxScheduler3Lnk.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxSchedulerLnk.dfm b/internal/x.46/Lib/D11/dxPScxSchedulerLnk.dfm deleted file mode 100644 index 7c04f6f1..00000000 --- a/internal/x.46/Lib/D11/dxPScxSchedulerLnk.dfm +++ /dev/null @@ -1,1429 +0,0 @@ -object cxfmSchedulerReportLinkDesignWindow: TcxfmSchedulerReportLinkDesignWindow - Left = 138 - Top = 193 - BorderStyle = bsDialog - Caption = 'cxfmSchedulerReportLinkDesignWindow' - ClientHeight = 446 - ClientWidth = 618 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 610 - Height = 404 - ActivePage = tshPrintStyles - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - OnChange = PageControl1Change - object tshPrintRange: TTabSheet - Caption = 'Print Range' - ImageIndex = 3 - object lblPrintRangeStart: TLabel - Left = 17 - Top = 22 - Width = 28 - Height = 13 - Caption = '&Start:' - end - object lblPrintRangeEnd: TLabel - Left = 18 - Top = 54 - Width = 22 - Height = 13 - Caption = '&End:' - end - object lblPrintRangesMiscellaneous: TLabel - Left = 5 - Top = 91 - Width = 65 - Height = 13 - Caption = 'Miscellaneous' - Visible = False - end - object Bevel1: TBevel - Left = 80 - Top = 95 - Width = 231 - Height = 4 - Shape = bsBottomLine - Visible = False - end - object dePrintRangeStart: TcxDateEdit - Left = 70 - Top = 18 - Width = 235 - Height = 21 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeStartEditValueChanged - TabOrder = 0 - end - object dePrintRangeEnd: TcxDateEdit - Left = 70 - Top = 50 - Width = 235 - Height = 21 - EditValue = 38187d - Properties.OnEditValueChanged = dePrintRangeEndEditValueChanged - TabOrder = 1 - end - object chbxHideDetailsOfPrivateAppointments: TcxCheckBox - Left = 66 - Top = 113 - Width = 236 - Height = 21 - Caption = 'Hide Details of Private Appointments' - TabOrder = 2 - Visible = False - end - end - object tshPrintStyles: TTabSheet - Caption = 'Print Styles' - object lblPrintStylesOptions: TLabel - Left = 5 - Top = 72 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPrintStyleOptions: TBevel - Left = 50 - Top = 76 - Width = 258 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewWindow: TStaticText - Left = 324 - Top = 0 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 0 - end - object cbxPrintStyles: TcxImageComboBox - Left = 6 - Top = 18 - Width = 299 - Height = 21 - Properties.Alignment.Vert = taVCenter - Properties.Items = <> - TabOrder = 1 - OnClick = cbxPrintStylesClick - end - object pcPrintStyleOptions: TPageControl - Left = 4 - Top = 90 - Width = 314 - Height = 284 - ActivePage = tshWeekly - Style = tsButtons - TabOrder = 2 - object tshDaily: TTabSheet - Caption = 'Daily' - TabVisible = False - object lblPrintStyleDailyLayout: TLabel - Left = 14 - Top = 7 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleDailyLayout - end - object lblPrintStyleDailyInclude: TLabel - Left = 14 - Top = 67 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleDailyPrintFrom: TLabel - Left = 14 - Top = 139 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleDailyPrintFrom - end - object lblPrintStyleDailyPrintTo: TLabel - Left = 14 - Top = 168 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleDailyPrintTo - end - object lblPrintStyleDailyResourceCountPerPage: TLabel - Left = 14 - Top = 37 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleDailyResourceCountPerPage - end - object cbxPrintStyleDailyLayout: TcxComboBox - Left = 115 - Top = 2 - Width = 186 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 0 - OnClick = cbxPrintStyleDailyLayoutClick - end - object chbxPrintStyleDailyTaskPad: TcxCheckBox - Left = 111 - Top = 64 - Width = 190 - Height = 21 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleDailyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 85 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleDailyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 106 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - end - object tePrintStyleDailyPrintFrom: TcxTimeEdit - Left = 114 - Top = 135 - Width = 100 - Height = 21 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 5 - end - object tePrintStyleDailyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 164 - Width = 100 - Height = 21 - EditValue = 0.000000000000000000 - Properties.ImmediatePost = True - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 6 - end - object sePrintStyleDailyResourceCountPerPage: TcxSpinEdit - Left = 115 - Top = 33 - Width = 100 - Height = 21 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - end - end - object tshWeekly: TTabSheet - Caption = 'Weekly' - ImageIndex = 1 - TabVisible = False - object lblPrintStyleWeeklyPrintTo: TLabel - Left = 14 - Top = 199 - Width = 41 - Height = 13 - Caption = 'Print &To:' - FocusControl = tePrintStyleWeeklyPrintTo - end - object lblPrintStyleWeeklyPrintFrom: TLabel - Left = 14 - Top = 170 - Width = 53 - Height = 13 - Caption = 'Print &From:' - FocusControl = tePrintStyleWeeklyPrintFrom - end - object lblPrintStyleWeeklyInclude: TLabel - Left = 14 - Top = 97 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleWeeklyLayout: TLabel - Left = 14 - Top = 36 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleWeeklyLayout - end - object lblPrintStyleWeeklyArrange: TLabel - Left = 14 - Top = 7 - Width = 43 - Height = 13 - Caption = '&Arrange:' - FocusControl = cbxPrintStyleWeeklyArrange - end - object lblPrintStyleWeeklyResourceCountPerPage: TLabel - Left = 14 - Top = 67 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleWeeklyResourceCountPerPage - end - object tePrintStyleWeeklyPrintTo: TcxTimeEdit - Tag = 1 - Left = 114 - Top = 194 - Width = 100 - Height = 21 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 7 - end - object tePrintStyleWeeklyPrintFrom: TcxTimeEdit - Left = 114 - Top = 165 - Width = 100 - Height = 21 - EditValue = 0.000000000000000000 - Properties.TimeFormat = tfHourMin - Properties.OnChange = tePrintStylePrintRangePropertiesChange - Properties.OnEditValueChanged = tePrintStylePrintRangePropertiesEditValueChanged - TabOrder = 6 - end - object chbxPrintStyleWeeklyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 136 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Lined)' - TabOrder = 5 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleWeeklyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 115 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Blank)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - end - object cbxPrintStyleWeeklyArrange: TcxComboBox - Left = 115 - Top = 2 - Width = 186 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Top to Bottom' - 'Left to Right') - TabOrder = 0 - OnClick = cbxPrintStyleWeeklyArrangeClick - end - object cbxPrintStyleWeeklyLayout: TcxComboBox - Left = 115 - Top = 32 - Width = 186 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/day' - '2 pages/day') - TabOrder = 1 - OnClick = cbxPrintStyleWeeklyLayoutClick - end - object chbxPrintStyleWeeklyTaskPad: TcxCheckBox - Left = 111 - Top = 94 - Width = 190 - Height = 21 - Caption = 'TaskPad' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleWeeklyDontPrintWeekends: TcxCheckBox - Left = 9 - Top = 223 - Width = 285 - Height = 21 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 8 - OnClick = chbxPrintStyleWeeklyDontPrintWeekendsClick - end - object sePrintStyleWeeklyResourceCountPerPage: TcxSpinEdit - Tag = 1 - Left = 115 - Top = 63 - Width = 100 - Height = 21 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 2 - end - end - object tshMonthly: TTabSheet - Caption = 'Monthly' - ImageIndex = 2 - TabVisible = False - object lblPrintStyleMonthlyLayout: TLabel - Left = 14 - Top = 7 - Width = 37 - Height = 13 - Caption = 'La&yout:' - FocusControl = cbxPrintStyleMonthlyLayout - end - object lblPrintStyleMonthlyInclude: TLabel - Left = 14 - Top = 67 - Width = 39 - Height = 13 - Caption = 'Include:' - end - object lblPrintStyleMonthlyResourceCountPerPage: TLabel - Left = 14 - Top = 37 - Width = 82 - Height = 13 - Caption = 'Resources/Page:' - FocusControl = sePrintStyleMonthlyResourceCountPerPage - end - object cbxPrintStyleMonthlyLayout: TcxComboBox - Left = 115 - Top = 2 - Width = 186 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - '1 page/month' - '2 pages/month') - TabOrder = 0 - OnClick = cbxPrintStyleMonthlyLayoutClick - end - object chbxPrintStyleMonthlyTaskPad: TcxCheckBox - Left = 111 - Top = 64 - Width = 190 - Height = 21 - Caption = 'Task&Pad' - TabOrder = 2 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleMonthlyNotesAreaBlank: TcxCheckBox - Tag = 1 - Left = 111 - Top = 85 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Blank)' - TabOrder = 3 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleMonthlyNotesAreaLined: TcxCheckBox - Tag = 2 - Left = 111 - Top = 106 - Width = 190 - Height = 21 - Caption = 'Notes Area (&Lined)' - TabOrder = 4 - OnClick = chbxPrintStyleOptionsViewClick - end - object chbxPrintStyleMonthlyDontPrintWeekends: TcxCheckBox - Left = 9 - Top = 144 - Width = 285 - Height = 21 - Caption = 'Don'#39't Print &Weekends' - TabOrder = 5 - OnClick = chbxPrintStyleMonthlyDontPrintWeekendsClick - end - object chbxPrintStyleMonthlyPrintExactlyOneMonthPerPage: TcxCheckBox - Left = 9 - Top = 167 - Width = 285 - Height = 21 - Caption = 'Print Exactly One Month Per Page' - TabOrder = 6 - OnClick = chbxPrintStyleMonthlyPrintExactlyOneMonthPerPageClick - end - object sePrintStyleMonthlyResourceCountPerPage: TcxSpinEdit - Tag = 2 - Left = 115 - Top = 33 - Width = 100 - Height = 21 - Properties.OnChange = sePrintStyleResourceCountPerPagePropertiesChanged - Properties.OnEditValueChanged = sePrintStyleResourceCountPerPagePropertiesEditValueChanged - TabOrder = 1 - end - end - object tshTrifold: TTabSheet - Caption = 'Tri-fold' - ImageIndex = 3 - TabVisible = False - object lblPrintStyleTrifoldSectionLeft: TLabel - Left = 14 - Top = 7 - Width = 61 - Height = 13 - Caption = '&Left Section:' - FocusControl = cbxPrintStyleTrifoldSectionLeft - end - object lblPrintStyleTrifoldSectionMiddle: TLabel - Left = 14 - Top = 41 - Width = 72 - Height = 13 - Caption = '&Middle Section:' - FocusControl = cbxPrintStyleTrifoldSectionMiddle - end - object lblPrintStyleTrifoldSectionRight: TLabel - Left = 14 - Top = 74 - Width = 67 - Height = 13 - Caption = '&Right Section:' - FocusControl = cbxPrintStyleTrifoldSectionRight - end - object cbxPrintStyleTrifoldSectionLeft: TcxComboBox - Left = 100 - Top = 2 - Width = 200 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 0 - OnClick = cbxPrintStyleTrifoldSectionModeClick - end - object cbxPrintStyleTrifoldSectionMiddle: TcxComboBox - Tag = 1 - Left = 100 - Top = 36 - Width = 200 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 1 - OnClick = cbxPrintStyleTrifoldSectionModeClick - end - object cbxPrintStyleTrifoldSectionRight: TcxComboBox - Tag = 2 - Left = 100 - Top = 69 - Width = 200 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - TabOrder = 2 - OnClick = cbxPrintStyleTrifoldSectionModeClick - end - end - object tshDetails: TTabSheet - Caption = 'Details' - ImageIndex = 4 - TabVisible = False - object chbxPrintStyleDetailsUsePagination: TcxCheckBox - Left = 14 - Top = 3 - Width = 187 - Height = 21 - Caption = 'Start a New Page Each:' - TabOrder = 0 - OnClick = chbxPrintStyleDetailsUsePaginationClick - end - object cbxPrintStyleDetailsPagination: TcxComboBox - Left = 203 - Top = 2 - Width = 97 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.Items.Strings = ( - 'Day' - 'Week' - 'Month') - TabOrder = 1 - OnClick = cbxPrintStyleDetailsPaginationClick - end - end - object tshMemo: TTabSheet - Caption = 'Memo' - ImageIndex = 5 - TabVisible = False - object chbxPrintStyleMemoStartEachItemOnNewPage: TcxCheckBox - Left = 14 - Top = 3 - Width = 187 - Height = 21 - Caption = 'Start Each Item On New Page' - TabOrder = 0 - OnClick = chbxPrintStyleMemoStartEachItemOnNewPageClick - end - object chbxPrintStyleMemoPrintOnlySelectedEvents: TcxCheckBox - Left = 14 - Top = 27 - Width = 187 - Height = 21 - Caption = 'Print Only Selected Events' - State = cbsChecked - TabOrder = 1 - OnClick = chbxPrintStyleMemoPrintOnlySelectedEventsClick - end - end - end - object pnlPrintStylesPreview: TPanel - Left = 323 - Top = 17 - Width = 275 - Height = 356 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 3 - object pbxPrintStylesPreview: TPaintBox - Left = 1 - Top = 1 - Width = 273 - Height = 354 - Align = alClient - OnPaint = pbxPrintStylesPreviewPaint - end - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 2 - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF78888877787807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D0888877787878888877787807DDDCCCCDCCDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF07DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FFFFFFFFFF7FFFFFFFFFFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0888877787878888877787807DDDDDDDDDDDDD088887778787888887778 - 7807D0FFFFFFFFFF7FFFFFFFFFFF0DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 75 - Top = 82 - Width = 236 - Height = 4 - Shape = bsBottomLine - end - object imgRefinements: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000000000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDD77777777777777777777 - 7777D0000000000000000000000007DDDDDDDDDDDDD000000000000000000000 - 0007D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0FAFAFAFAFA788888777CC807DDDDDDDDDDDDD0FFFFFFFFFF7888887778 - 7807D0AFAFAFAFAF78888888888807DDDDDDDDDDDDD0FFFFFFFFFF7888888888 - 8807D0888888888877777777777707DDDDDDDDDDDDD088888888887777777777 - 7707D0AFAFAFAFAF7FAFAFAFAFAF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FAFAFAFAFA7AFAFAFAFAFA07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCDDDDCDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCCCCCCCCDD088888888887888888888 - 8807D0777777777777777777777707DDDCCCCDCCDDD077777777777777777777 - 7707D0FEFEFEFEFE7EFEFEFEFEFE07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0EFEFEFEFEF7FEFEFEFEFEF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0EFEFEFEFEF7FEFEFEFEFEF07DDDCDDDDCDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FEFEFEFEFE7EFEFEFEFEFE07DDDCCCCDCCDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDCCCCCCCCDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDCCCCDCCDDD088887778787888887778 - 7807D0888888888878888888888807DDDCDDDDCDDDD088888888887888888888 - 8807D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D0FBFBFBFBFB7BFBFBFBFBFF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0888888888878888888888807DDDDDDDDDDDDD088888888887888888888 - 8807D0BFBFBFBFBF7FBFBFBFBFBF07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0FBFBFBFBFB7BFBFBFBFBFB07DDDDDDDDDDDDD0FFFFFFFFFF7FFFFFFFFF - FF07D0777777777777777777777707DDDDDDDDDDDDD077777777777777777777 - 7707D08888777CC8788888777CC807DDDDDDDDDDDDD088887778787888887778 - 7807D088888888887888888888880DDDDDDDDDDDDDD088888888887888888888 - 8807D000000000000000000000000DDDDDDDDDDDDDD000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TcxComboBox - Left = 90 - Top = 37 - Width = 215 - Height = 23 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 15 - Properties.OnChange = cbxLookAndFeelPropertiesChange - TabOrder = 0 - OnClick = LookAndFeelChange - end - object chbxSuppressBackgroundBitmaps: TcxCheckBox - Tag = 1 - Left = 90 - Top = 104 - Width = 200 - Height = 21 - Caption = 'Suppress Background Textures' - TabOrder = 1 - OnClick = OptionsFormattingClick - end - object chbxSuppressContentColoration: TcxCheckBox - Tag = 2 - Left = 90 - Top = 130 - Width = 200 - Height = 21 - Caption = 'Suppress Content Coloration' - TabOrder = 2 - OnClick = OptionsFormattingClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 1 - object bvlStyles: TBevel - Left = 118 - Top = 13 - Width = 193 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 302 - Width = 239 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 298 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 228 - Height = 222 - end - object Label1: TLabel - Left = 85 - Top = 140 - Width = 64 - Height = 13 - Caption = '[ Styles Site ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 243 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 0 - OnClick = btnStyleColorClick - end - object btnStyleFont: TButton - Left = 243 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = btnStyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 243 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 2 - OnClick = btnStyleBackgroundBitmapClick - end - object cbxStyleSheets: TcxComboBox - Left = 6 - Top = 318 - Width = 305 - Height = 24 - AutoSize = False - Properties.DropDownListStyle = lsFixedList - Properties.ItemHeight = 20 - Properties.OnDrawItem = cbxStyleSheetsPropertiesDrawItem - TabOrder = 3 - OnClick = cbxStyleSheetsClick - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 350 - Width = 71 - Height = 23 - Caption = '&New...' - TabOrder = 4 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 84 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Copy...' - TabOrder = 5 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 162 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Delete...' - TabOrder = 6 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 123 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Save &As...' - TabOrder = 7 - OnClick = btnStylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 240 - Top = 350 - Width = 71 - Height = 23 - Caption = '&Rename...' - TabOrder = 8 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 243 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Cle&ar' - TabOrder = 9 - OnClick = btnStyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 263 - Width = 112 - Height = 23 - Caption = 'Rest&ore Defaults' - TabOrder = 10 - OnClick = btnStyleRestoreDefaultsClick - end - object chbxUseNativeStyles: TcxCheckBox - Left = 3 - Top = 6 - Width = 22 - Height = 21 - TabOrder = 11 - OnClick = OptionsFormattingClick - end - end - end - object pnlPreview: TPanel - Left = 331 - Top = 46 - Width = 275 - Height = 356 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object pbPreview: TPaintBox - Left = 1 - Top = 1 - Width = 273 - Height = 354 - Align = alClient - OnPaint = pbPreviewPaint - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 6 - Top = 417 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - OnClick = btnStyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = btnStyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - ShortCut = 16463 - OnClick = btnStyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = btnStyleBackgroundBitmapClearClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = btnStyleRestoreDefaultsClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = btnStylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 34 - Top = 417 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end - object cxEditStyleController1: TcxEditStyleController - OnStyleChanged = StyleController1StyleChanged - Left = 64 - Top = 416 - end -end diff --git a/internal/x.46/Lib/D11/dxPScxSchedulerLnk.res b/internal/x.46/Lib/D11/dxPScxSchedulerLnk.res deleted file mode 100644 index 574c0437..00000000 Binary files a/internal/x.46/Lib/D11/dxPScxSchedulerLnk.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPScxTL5Lnk.dfm b/internal/x.46/Lib/D11/dxPScxTL5Lnk.dfm deleted file mode 100644 index 33fc186c..00000000 --- a/internal/x.46/Lib/D11/dxPScxTL5Lnk.dfm +++ /dev/null @@ -1,1587 +0,0 @@ -object dxfmTreeListReportLinkDesignWindow: TdxfmTreeListReportLinkDesignWindow - Left = 426 - Top = 272 - BorderStyle = bsDialog - Caption = 'Property Sheets' - ClientHeight = 391 - ClientWidth = 624 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 618 - Height = 353 - ActivePage = tshStyles - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 8 - Top = 34 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 12 - Width = 253 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 166 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object imgOnEveryPage: TImage - Left = 8 - Top = 192 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlOnEveryPage: TBevel - Left = 90 - Top = 171 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object bvlWarningHost: TBevel - Left = 5 - Top = 251 - Width = 293 - Height = 70 - Visible = False - end - object Bevel2: TBevel - Left = 90 - Top = 91 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object chbxShowBands: TCheckBox - Left = 90 - Top = 26 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowHeaders: TCheckBox - Tag = 1 - Left = 90 - Top = 47 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 1 - OnClick = OptionsViewClick - end - object chbxShowFooters: TCheckBox - Tag = 2 - Left = 90 - Top = 68 - Width = 200 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 3 - Left = 90 - Top = 124 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 4 - OnClick = OptionsViewClick - end - object chbxBandsOnEveryPage: TCheckBox - Left = 90 - Top = 184 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 6 - OnClick = OptionsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Tag = 1 - Left = 90 - Top = 205 - Width = 200 - Height = 17 - Caption = 'Headers' - TabOrder = 7 - OnClick = OptionsOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Tag = 2 - Left = 90 - Top = 226 - Width = 200 - Height = 17 - Caption = 'Footers' - TabOrder = 8 - OnClick = OptionsOnEveryPageClick - end - object chbxShowTreeLines: TCheckBox - Tag = 4 - Left = 90 - Top = 145 - Width = 200 - Height = 17 - Caption = 'TreeLines' - TabOrder = 5 - OnClick = OptionsViewClick - end - object chbxShowBorders: TCheckBox - Tag = 5 - Left = 90 - Top = 103 - Width = 200 - Height = 17 - Caption = 'Borders' - TabOrder = 3 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 305 - Top = 0 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 9 - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object pnlBehaviors: TPanel - Left = 0 - Top = 0 - Width = 299 - Height = 325 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object pnlSelection: TPanel - Left = 0 - Top = 0 - Width = 299 - Height = 75 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblSelection: TLabel - Left = 5 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object imgSelection: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlSelection: TBevel - Left = 57 - Top = 12 - Width = 239 - Height = 4 - Shape = bsBottomLine - end - object chbxProcessSelection: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = 'Process Selection' - TabOrder = 0 - OnClick = OptionsSelectionClick - end - object chbxProcessExactSelection: TCheckBox - Tag = 1 - Left = 90 - Top = 51 - Width = 205 - Height = 17 - Caption = 'Process Exact Selection' - TabOrder = 1 - OnClick = OptionsSelectionClick - end - end - object pnlExpanding: TPanel - Left = 0 - Top = 75 - Width = 299 - Height = 70 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblExpanding: TLabel - Left = 5 - Top = 8 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 13 - Width = 234 - Height = 4 - Shape = bsBottomLine - end - object chbxExpandNodes: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = 'Nodes' - TabOrder = 0 - OnClick = OptionsExpandingClick - end - object chbxExplicitlyExpandNodes: TCheckBox - Tag = 1 - Left = 90 - Top = 51 - Width = 205 - Height = 17 - Caption = 'Explicitly Expand Nodes' - TabOrder = 1 - OnClick = OptionsExpandingClick - end - end - object pnlSize: TPanel - Left = 0 - Top = 145 - Width = 299 - Height = 68 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object lblSize: TLabel - Left = 5 - Top = 8 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlSize: TBevel - Left = 33 - Top = 13 - Width = 262 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = '&Auto Width' - TabOrder = 0 - OnClick = OptionsSizeClick - end - end - object pnlSeparators: TPanel - Left = 0 - Top = 213 - Width = 299 - Height = 94 - Align = alTop - BevelOuter = bvNone - TabOrder = 3 - object lblSeparators: TLabel - Left = 5 - Top = 8 - Width = 53 - Height = 13 - Caption = 'Separators' - end - object bvlSeparator: TBevel - Left = 68 - Top = 13 - Width = 229 - Height = 4 - Shape = bsBottomLine - end - object lblSeparatorsThickness: TLabel - Left = 90 - Top = 38 - Width = 50 - Height = 13 - Caption = 'Thickness:' - end - object lblSeparatorsColor: TLabel - Left = 90 - Top = 67 - Width = 29 - Height = 13 - Caption = 'Color:' - end - object bvlSeparatorThicknessHost: TBevel - Left = 152 - Top = 34 - Width = 80 - Height = 21 - end - object bvlSeparatorColorHost: TBevel - Left = 152 - Top = 62 - Width = 143 - Height = 21 - end - object imgSeparators: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000000000F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0F77FFF8F777F8F777F0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F00FFF8F00FF8F000F0 - F07DD0F08888888888888888880F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F0000F8F000F8F000F0 - F07DD0F0F00FFF8F00FF8F00FF0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCDCCDDD0F00000000000000000000 - F07DD0F08888888888888888880F07DDCCCCCCCCDD0F00000000000000000000 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8F000F8F000F0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F000FF8F000F8F00FF0 - F07DD0F0F00FFF8F000F8F000F0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCDDDDCDDDD0F00000000000000000000 - F07DD0F08888888888888888880F07DDCCCCDCCDDD0F00000000000000000000 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8F0FFF8F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00FFF8F000F8F000F0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F07777777777777777770F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F888887F88887F88880F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F800087F80087F80080F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFFFF7FFFFF7FFFFF0F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000000000807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - end - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 12 - Width = 211 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 7 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 83 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 37 - Width = 202 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnChange = LookAndFeelChange - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 145 - Width = 210 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementsClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 122 - Width = 210 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementsClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 100 - Width = 210 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementsClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 210 - Height = 17 - Caption = 'Suppress Background Textures' - TabOrder = 4 - OnClick = OptionsFormattingClick - end - object chbxConsumeSelectionStyle: TCheckBox - Tag = 2 - Left = 90 - Top = 204 - Width = 210 - Height = 17 - Caption = 'Consume Selection Style' - TabOrder = 5 - OnClick = OptionsFormattingClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 4 - object bvlStyles: TBevel - Left = 115 - Top = 13 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 249 - Width = 224 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 246 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 214 - Height = 173 - end - object Label1: TLabel - Left = 79 - Top = 110 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 229 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 229 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 229 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Texture...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = OptionsFormattingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 265 - Width = 288 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 297 - Width = 68 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 79 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 153 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 116 - Top = 213 - Width = 104 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 226 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 229 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Clear' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 213 - Width = 105 - Height = 23 - Caption = 'Restore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 2 - object lblPreviewOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPreviewOptions: TBevel - Left = 54 - Top = 12 - Width = 242 - Height = 5 - Shape = bsBottomLine - end - object lblPreviewMaxLineCount: TLabel - Left = 90 - Top = 75 - Width = 78 - Height = 13 - Caption = 'Max Line Count:' - end - object bvlPreviewMaxLineCountHost: TBevel - Left = 215 - Top = 71 - Width = 68 - Height = 21 - Visible = False - end - object imgPreview: TImage - Left = 8 - Top = 33 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F07DDDDDD0F7FC9F77777777777777F7F0 - 7DDDDDD0F7F9CF77777777777777F7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FC9F77777777777777F7F07DDDDDD0F7F9CF77777777777777F7F0 - 7DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxPreviewVisible: TCheckBox - Left = 90 - Top = 30 - Width = 207 - Height = 17 - Caption = 'Visible' - TabOrder = 0 - OnClick = PreviewVisibleClick - end - object chbxPreviewAutoHeight: TCheckBox - Left = 90 - Top = 51 - Width = 207 - Height = 17 - Caption = 'Auto Height' - TabOrder = 1 - OnClick = PreviewAutoHeightClick - end - end - end - object pnlPreview: TPanel - Left = 313 - Top = 44 - Width = 300 - Height = 304 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewTreeList: TcxTreeList - Left = 5 - Top = 5 - Width = 291 - Height = 294 - Bands = < - item - Caption.Text = 'Manufacturer Data' - Width = 173 - end - item - Caption.Text = 'Car Data' - Width = 116 - end> - DefaultRowHeight = 17 - Enabled = False - OptionsView.CellAutoHeight = True - OptionsView.ScrollBars = ssNone - OptionsView.Bands = True - OptionsView.ColumnAutoWidth = True - OptionsView.GridLines = tlglBoth - OptionsView.UseNodeColorForIndent = False - Preview.Column = colManufacturerCountry - TabOrder = 0 - OnCustomDrawBandHeaderCell = PreviewTreeListCustomDrawBandHeaderCell - OnCustomDrawDataCell = PreviewTreeListCustomDrawDataCell - OnCustomDrawFooterCell = PreviewTreeListCustomDrawFooterCell - OnCustomDrawHeaderCell = PreviewTreeListCustomDrawHeaderCell - object colManufacturerName: TcxTreeListColumn - Caption.Text = 'Name' - DataBinding.ValueType = 'String' - Width = 113 - Position.ColIndex = 0 - Position.RowIndex = 0 - Position.BandIndex = 0 - Summary.FooterSummaryItems = <> - Summary.GroupFooterSummaryItems = <> - end - object colManufacturerLogo: TcxTreeListColumn - Caption.Text = 'Logo' - DataBinding.ValueType = 'String' - Width = 60 - Position.ColIndex = 1 - Position.RowIndex = 0 - Position.BandIndex = 0 - Summary.FooterSummaryItems = <> - Summary.GroupFooterSummaryItems = <> - end - object colManufacturerCountry: TcxTreeListColumn - Caption.Text = 'Country' - DataBinding.ValueType = 'String' - Width = 167 - Position.ColIndex = 2 - Position.RowIndex = 0 - Position.BandIndex = 0 - Summary.FooterSummaryItems = <> - Summary.GroupFooterSummaryItems = <> - end - object colCarModel: TcxTreeListColumn - Caption.Text = 'Model' - DataBinding.ValueType = 'String' - Width = 86 - Position.ColIndex = 0 - Position.RowIndex = 0 - Position.BandIndex = 1 - Summary.FooterSummaryItems = <> - Summary.GroupFooterSummaryItems = <> - end - object colCarIsSUV: TcxTreeListColumn - Caption.Text = 'SUV' - DataBinding.ValueType = 'String' - Width = 30 - Position.ColIndex = 1 - Position.RowIndex = 0 - Position.BandIndex = 1 - Summary.FooterSummaryItems = <> - Summary.GroupFooterSummaryItems = <> - end - end - end - object cxStyleRepository1: TcxStyleRepository - Left = 4 - Top = 362 - PixelsPerInch = 96 - object styleBandHeaders: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - end - object styleStandard: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object stylePreview: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlue - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object styleCardShadow: TcxStyle - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 32 - Top = 362 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - ShortCut = 16454 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Texture...' - ImageIndex = 1 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 60 - Top = 362 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPScxTL5LnkPredefinedStyleSheets.dfm b/internal/x.46/Lib/D11/dxPScxTL5LnkPredefinedStyleSheets.dfm deleted file mode 100644 index 03ee2d9d..00000000 --- a/internal/x.46/Lib/D11/dxPScxTL5LnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,299 +0,0 @@ -object dxdmPScxTreeListLnkPredefinedStyles: TdxdmPScxTreeListLnkPredefinedStyles - OldCreateOrder = False - Left = 483 - Top = 307 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 37 - Top = 12 - PixelsPerInch = 96 - object styleProfessionalFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3355443 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6582120 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalCaptionRow: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 536870912 - end - object styleProfessionalPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14541789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGreenFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGreenFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12778719 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14154698 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenSelected: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6005301 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenGroup: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentBandHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFooterRow: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsItalic] - TextColor = clBlack - end - object styleTransparentSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13816275 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TcxTreeListReportLinkStyleSheet - Caption = 'Professional' - Styles.BandHeader = styleProfessionalFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleProfessionalContentEven - Styles.ContentOdd = styleProfessionalContentOdd - Styles.Footer = styleProfessionalFixed - Styles.FooterRow = styleProfessionalFixed - Styles.Header = styleProfessionalFixed - Styles.Preview = styleProfessionalPreview - Styles.Selection = styleProfessionalSelection - BuiltIn = True - end - object ssGreen: TcxTreeListReportLinkStyleSheet - Caption = 'Green' - Styles.BandHeader = styleGreenFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleGreenLightContent - Styles.ContentOdd = styleNoneContent - Styles.Footer = styleGreenFixed - Styles.FooterRow = styleGreenFixed - Styles.Header = styleGreenFixed - Styles.Preview = styleGreenLightPreview - Styles.Selection = styleGreenSelected - BuiltIn = True - end - object ssTransparent: TcxTreeListReportLinkStyleSheet - Caption = 'Transparent' - Styles.BandHeader = styleTransparentBandHeader - Styles.Content = styleTransparentContent - Styles.ContentEven = styleTransparentContentEven - Styles.ContentOdd = styleTransparentContentOdd - Styles.Footer = styleTransparentFooter - Styles.FooterRow = styleTransparentFooterRow - Styles.Header = styleTransparentHeader - Styles.Preview = styleTransparentPreview - Styles.Selection = styleTransparentSelection - BuiltIn = True - end - end -end diff --git a/internal/x.46/Lib/D11/dxPScxTLLnk.dfm b/internal/x.46/Lib/D11/dxPScxTLLnk.dfm deleted file mode 100644 index 9c1251f2..00000000 --- a/internal/x.46/Lib/D11/dxPScxTLLnk.dfm +++ /dev/null @@ -1,1579 +0,0 @@ -object dxfmTreeListReportLinkDesignWindow: TdxfmTreeListReportLinkDesignWindow - Left = 426 - Top = 272 - BorderStyle = bsDialog - Caption = 'Property Sheets' - ClientHeight = 391 - ClientWidth = 624 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 618 - Height = 353 - ActivePage = tshStyles - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 8 - Top = 34 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 12 - Width = 253 - Height = 4 - Shape = bsBottomLine - end - object lblOnEveryPage: TLabel - Left = 5 - Top = 166 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object imgOnEveryPage: TImage - Left = 8 - Top = 192 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlOnEveryPage: TBevel - Left = 90 - Top = 171 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object bvlWarningHost: TBevel - Left = 5 - Top = 251 - Width = 293 - Height = 70 - Visible = False - end - object Bevel2: TBevel - Left = 90 - Top = 91 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object chbxShowBands: TCheckBox - Left = 90 - Top = 26 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowHeaders: TCheckBox - Tag = 1 - Left = 90 - Top = 47 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 1 - OnClick = OptionsViewClick - end - object chbxShowFooters: TCheckBox - Tag = 2 - Left = 90 - Top = 68 - Width = 200 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 3 - Left = 90 - Top = 124 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 4 - OnClick = OptionsViewClick - end - object chbxBandsOnEveryPage: TCheckBox - Left = 90 - Top = 184 - Width = 200 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 6 - OnClick = OptionsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Tag = 1 - Left = 90 - Top = 205 - Width = 200 - Height = 17 - Caption = 'Headers' - TabOrder = 7 - OnClick = OptionsOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Tag = 2 - Left = 90 - Top = 226 - Width = 200 - Height = 17 - Caption = 'Footers' - TabOrder = 8 - OnClick = OptionsOnEveryPageClick - end - object chbxShowTreeLines: TCheckBox - Tag = 4 - Left = 90 - Top = 145 - Width = 200 - Height = 17 - Caption = 'TreeLines' - TabOrder = 5 - OnClick = OptionsViewClick - end - object chbxShowBorders: TCheckBox - Tag = 5 - Left = 90 - Top = 103 - Width = 200 - Height = 17 - Caption = 'Borders' - TabOrder = 3 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 305 - Top = 0 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 9 - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object pnlBehaviors: TPanel - Left = 0 - Top = 0 - Width = 299 - Height = 325 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object pnlSelection: TPanel - Left = 0 - Top = 0 - Width = 299 - Height = 75 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblSelection: TLabel - Left = 5 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object imgSelection: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlSelection: TBevel - Left = 57 - Top = 12 - Width = 239 - Height = 4 - Shape = bsBottomLine - end - object chbxProcessSelection: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = 'Process Selection' - TabOrder = 0 - OnClick = OptionsSelectionClick - end - object chbxProcessExactSelection: TCheckBox - Tag = 1 - Left = 90 - Top = 51 - Width = 205 - Height = 17 - Caption = 'Process Exact Selection' - TabOrder = 1 - OnClick = OptionsSelectionClick - end - end - object pnlExpanding: TPanel - Left = 0 - Top = 75 - Width = 299 - Height = 70 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblExpanding: TLabel - Left = 5 - Top = 8 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 13 - Width = 234 - Height = 4 - Shape = bsBottomLine - end - object chbxExpandNodes: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = 'Nodes' - TabOrder = 0 - OnClick = OptionsExpandingClick - end - object chbxExplicitlyExpandNodes: TCheckBox - Tag = 1 - Left = 90 - Top = 51 - Width = 205 - Height = 17 - Caption = 'Explicitly Expand Nodes' - TabOrder = 1 - OnClick = OptionsExpandingClick - end - end - object pnlSize: TPanel - Left = 0 - Top = 145 - Width = 299 - Height = 68 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object lblSize: TLabel - Left = 5 - Top = 8 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlSize: TBevel - Left = 33 - Top = 13 - Width = 262 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0FFFF8FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F0F77FFF8F777F8F777F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCDDDDCDDDD0F0F00FFF8F00FF8F00FF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCCCCCDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCDDDDCDDDD0F0FFFFFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0888888888888880FFF0F07DDCCCCDCCDDD0F08888888888888888880 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFF8F00F8F00F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00F8F00F8F00F0FFF0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFF8FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F8887F8887F8880FFF8F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F0087F0087F0080FFF0F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFF7FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 26 - Width = 205 - Height = 17 - Caption = '&Auto Width' - TabOrder = 0 - OnClick = OptionsSizeClick - end - end - object pnlSeparators: TPanel - Left = 0 - Top = 213 - Width = 299 - Height = 94 - Align = alTop - BevelOuter = bvNone - TabOrder = 3 - object lblSeparators: TLabel - Left = 5 - Top = 8 - Width = 53 - Height = 13 - Caption = 'Separators' - end - object bvlSeparator: TBevel - Left = 68 - Top = 13 - Width = 229 - Height = 4 - Shape = bsBottomLine - end - object lblSeparatorsThickness: TLabel - Left = 90 - Top = 38 - Width = 50 - Height = 13 - Caption = 'Thickness:' - end - object lblSeparatorsColor: TLabel - Left = 90 - Top = 67 - Width = 29 - Height = 13 - Caption = 'Color:' - end - object bvlSeparatorThicknessHost: TBevel - Left = 152 - Top = 34 - Width = 80 - Height = 21 - end - object bvlSeparatorColorHost: TBevel - Left = 152 - Top = 62 - Width = 143 - Height = 21 - end - object imgSeparators: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000000000F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F0F77FFF8F777F8F777F0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F00FFF8F00FF8F000F0 - F07DD0F08888888888888888880F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F0000F8F000F8F000F0 - F07DD0F0F00FFF8F00FF8F00FF0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCDCCDDD0F00000000000000000000 - F07DD0F08888888888888888880F07DDCCCCCCCCDD0F00000000000000000000 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCDCCDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8F000F8F000F0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0F000FF8F000F8F00FF0 - F07DD0F0F00FFF8F000F8F000F0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCDDDDCDDDD0F00000000000000000000 - F07DD0F08888888888888888880F07DDCCCCDCCDDD0F00000000000000000000 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCCCCCCCCDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0FFFFFF8F0FFF8F0FFF0F07DDCCCCDCCDDD0F0FFFFFF8F0FFF8F0FFF0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDCDDDDCDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F0F00FFF8F000F8F000F0F07DDDDDDDDDDDD0F0F00FFF8F000F8F000F0 - F07DD0F0FFFFFF8FFFFF8FFFFF0F07DDDDDDDDDDDD0F0FFFFFF8FFFFF8FFFFF0 - F07DD0F07777777777777777770F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F0F888887F88887F88880F07DDDDDDDDDDDD0F0F888887F88887F88880 - F07DD0F0F800087F80087F80080F07DDDDDDDDDDDD0F0F800087F80087F80080 - F07DD0F0FFFFFF7FFFFF7FFFFF0F07DDDDDDDDDDDD0F0FFFFFF7FFFFF7FFFFF0 - F07DD0800000000000000000000807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - end - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 12 - Width = 211 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 7 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 83 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object bvlRefinementsSeparator: TBevel - Left = 90 - Top = 168 - Width = 205 - Height = 4 - Shape = bsBottomLine - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 37 - Width = 202 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnChange = LookAndFeelChange - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 145 - Width = 210 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementsClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 122 - Width = 210 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementsClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 100 - Width = 210 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementsClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 181 - Width = 210 - Height = 17 - Caption = 'Suppress Background Textures' - TabOrder = 4 - OnClick = OptionsFormattingClick - end - object chbxConsumeSelectionStyle: TCheckBox - Tag = 2 - Left = 90 - Top = 204 - Width = 210 - Height = 17 - Caption = 'Consume Selection Style' - TabOrder = 5 - OnClick = OptionsFormattingClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 4 - object bvlStyles: TBevel - Left = 115 - Top = 13 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 249 - Width = 224 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 246 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 214 - Height = 173 - end - object Label1: TLabel - Left = 79 - Top = 110 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 24 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 229 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 229 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 229 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Texture...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = OptionsFormattingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 265 - Width = 288 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 297 - Width = 68 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 79 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 153 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 116 - Top = 213 - Width = 104 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 226 - Top = 297 - Width = 68 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 229 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Clear' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 213 - Width = 105 - Height = 23 - Caption = 'Restore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 2 - object lblPreviewOptions: TLabel - Left = 5 - Top = 8 - Width = 37 - Height = 13 - Caption = 'Options' - end - object bvlPreviewOptions: TBevel - Left = 54 - Top = 12 - Width = 242 - Height = 5 - Shape = bsBottomLine - end - object lblPreviewMaxLineCount: TLabel - Left = 90 - Top = 75 - Width = 78 - Height = 13 - Caption = 'Max Line Count:' - end - object bvlPreviewMaxLineCountHost: TBevel - Left = 215 - Top = 71 - Width = 68 - Height = 21 - Visible = False - end - object imgPreview: TImage - Left = 8 - Top = 33 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F07DDDDDD0F7FC9F77777777777777F7F0 - 7DDDDDD0F7F9CF77777777777777F7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7F7FFCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FC9F77777777777777F7F07DDDDDD0F7F9CF77777777777777F7F0 - 7DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxPreviewVisible: TCheckBox - Left = 90 - Top = 30 - Width = 207 - Height = 17 - Caption = 'Visible' - TabOrder = 0 - OnClick = PreviewVisibleClick - end - object chbxPreviewAutoHeight: TCheckBox - Left = 90 - Top = 51 - Width = 207 - Height = 17 - Caption = 'Auto Height' - TabOrder = 1 - OnClick = PreviewAutoHeightClick - end - end - end - object pnlPreview: TPanel - Left = 313 - Top = 44 - Width = 300 - Height = 304 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewTreeList: TcxTreeList - Left = 5 - Top = 5 - Width = 291 - Height = 294 - Bands = < - item - Caption.Text = 'Manufacturer Data' - Width = 173 - end - item - Caption.Text = 'Car Data' - Width = 116 - end> - BufferedPaint = False - DefaultRowHeight = 17 - Enabled = False - OptionsBehavior.AutomateLeftMostIndent = False - OptionsView.CellAutoHeight = True - OptionsView.ScrollBars = ssNone - OptionsView.Bands = True - OptionsView.ColumnAutoWidth = True - OptionsView.GridLines = tlglBoth - OptionsView.UseNodeColorForIndent = False - Preview.Column = colManufacturerCountry - TabOrder = 0 - OnCustomDrawBandHeader = PreviewTreeListCustomDrawBandHeader - OnCustomDrawCell = PreviewTreeListCustomDrawCell - OnCustomDrawFooterCell = PreviewTreeListCustomDrawFooterCell - OnCustomDrawHeaderCell = PreviewTreeListCustomDrawHeader - object colManufacturerName: TcxTreeListColumn - Caption.Text = 'Name' - DataBinding.ValueType = 'String' - Width = 113 - Position.ColIndex = 0 - Position.RowIndex = 0 - Position.BandIndex = 0 - end - object colManufacturerLogo: TcxTreeListColumn - Caption.Text = 'Logo' - DataBinding.ValueType = 'String' - Width = 60 - Position.ColIndex = 1 - Position.RowIndex = 0 - Position.BandIndex = 0 - end - object colManufacturerCountry: TcxTreeListColumn - Caption.Text = 'Country' - DataBinding.ValueType = 'String' - Width = 167 - Position.ColIndex = 2 - Position.RowIndex = 0 - Position.BandIndex = 0 - end - object colCarModel: TcxTreeListColumn - Caption.Text = 'Model' - DataBinding.ValueType = 'String' - Width = 86 - Position.ColIndex = 0 - Position.RowIndex = 0 - Position.BandIndex = 1 - end - object colCarIsSUV: TcxTreeListColumn - Caption.Text = 'SUV' - DataBinding.ValueType = 'String' - Width = 30 - Position.ColIndex = 1 - Position.RowIndex = 0 - Position.BandIndex = 1 - end - end - end - object cxStyleRepository1: TcxStyleRepository - Left = 4 - Top = 362 - PixelsPerInch = 96 - object styleBandHeaders: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - end - object styleStandard: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object stylePreview: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlue - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object styleCardShadow: TcxStyle - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 32 - Top = 362 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - ShortCut = 16454 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Texture...' - ImageIndex = 1 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 60 - Top = 362 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPScxTLLnkPredefinedStyleSheets.dfm b/internal/x.46/Lib/D11/dxPScxTLLnkPredefinedStyleSheets.dfm deleted file mode 100644 index 350de1af..00000000 --- a/internal/x.46/Lib/D11/dxPScxTLLnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,298 +0,0 @@ -object dxdmPScxTreeListLnkPredefinedStyles: TdxdmPScxTreeListLnkPredefinedStyles - OldCreateOrder = False - Left = 483 - Top = 307 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 37 - Top = 12 - object styleProfessionalFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 3355443 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalGroup: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalRowCaption: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6582120 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalCaptionRow: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = 13033414 - end - object styleProfessionalContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 13033414 - end - object styleProfessionalContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 4214088 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = 536870912 - end - object styleProfessionalPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14541789 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleProfessionalSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGreenFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGreenFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 9358956 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 12778719 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenLightPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 14154698 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenSelected: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6005301 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleGreenGroup: TcxStyle - AssignedValues = [svFont] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneFixed: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentBandHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentEven: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContentOdd: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentFooter: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentFooterRow: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentPreview: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsItalic] - TextColor = clBlack - end - object styleTransparentSelection: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 13816275 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TcxTreeListReportLinkStyleSheet - Caption = 'Professional' - Styles.BandHeader = styleProfessionalFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleProfessionalContentEven - Styles.ContentOdd = styleProfessionalContentOdd - Styles.Footer = styleProfessionalFixed - Styles.FooterRow = styleProfessionalFixed - Styles.Header = styleProfessionalFixed - Styles.Preview = styleProfessionalPreview - Styles.Selection = styleProfessionalSelection - BuiltIn = True - end - object ssGreen: TcxTreeListReportLinkStyleSheet - Caption = 'Green' - Styles.BandHeader = styleGreenFixed - Styles.Content = styleNoneContent - Styles.ContentEven = styleGreenLightContent - Styles.ContentOdd = styleNoneContent - Styles.Footer = styleGreenFixed - Styles.FooterRow = styleGreenFixed - Styles.Header = styleGreenFixed - Styles.Preview = styleGreenLightPreview - Styles.Selection = styleGreenSelected - BuiltIn = True - end - object ssTransparent: TcxTreeListReportLinkStyleSheet - Caption = 'Transparent' - Styles.BandHeader = styleTransparentBandHeader - Styles.Content = styleTransparentContent - Styles.ContentEven = styleTransparentContentEven - Styles.ContentOdd = styleTransparentContentOdd - Styles.Footer = styleTransparentFooter - Styles.FooterRow = styleTransparentFooterRow - Styles.Header = styleTransparentHeader - Styles.Preview = styleTransparentPreview - Styles.Selection = styleTransparentSelection - BuiltIn = True - end - end -end diff --git a/internal/x.46/Lib/D11/dxPScxVGridLnk.dfm b/internal/x.46/Lib/D11/dxPScxVGridLnk.dfm deleted file mode 100644 index 7dc1dc4e..00000000 --- a/internal/x.46/Lib/D11/dxPScxVGridLnk.dfm +++ /dev/null @@ -1,1293 +0,0 @@ -object cxfmVerticalGridReportLinkDesignWindow: TcxfmVerticalGridReportLinkDesignWindow - Left = 397 - Top = 325 - BorderStyle = bsDialog - Caption = 'cxfmVerticalGridReportLinkDesignWindow' - ClientHeight = 405 - ClientWidth = 644 - Color = clBtnFace - OldCreateOrder = False - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 636 - Height = 363 - ActivePage = tshView - TabOrder = 0 - OnChange = PageControl1Change - object tshView: TTabSheet - Caption = 'View' - object lblShow: TLabel - Left = 5 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object imgShow: TImage - Left = 8 - Top = 34 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDCDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDCCCDDDDDDDDDDDDDDDDDDDDDDDDDDDDCCCCCDDDDDDDDDDDDDDDDDD - DDDDD00000CCC0000000000000000000000DD08888CCC8888887FFFFFFFFFFFF - FF0DD08007CCC7000887F000000000000F0DD088888888888887FFFFFFFFFFFF - FF0DD077777777777777777777777777770DD088888888888887FFFFFFFFFFFF - FF0DD088888888888887FFFFFFFFFFFFFF0DD080000880000887F00000FF0000 - FF0DD088888888888887FFFFFFFFFFFFFF0DD077777777777777777777777777 - 770DD088888888888887FFFFFFFFFFFFFF0DD088888888888887F88888888FFF - FF0DD080000000008887F00000000000FF0DD088888888888887FFFFFFFFFFFF - FF0DD077777777777777777777777777770DD088888888888887FFFFFFFFFFFF - FF0DD088888888888887F88888FFFFFFFF0DD080000000008887F00000000000 - FF0DD088888888888887FFFFFFFFFFFFFF0DD077777777777777777777777777 - 770DD088888888888887FFFFFFFFFFFFFF0DD087777777788887F888888FFFFF - FF0DD08007CCC7000087F0000000F888FF0DD08888CCC8888887FFFFFFFFFFFF - FF0DD00000CCC0000000000000000000000DDDDDDCCCCCDDDDDDDDDDDDDDDDDD - DDDDDDDDDDCCCDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDCDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlShow: TBevel - Left = 43 - Top = 13 - Width = 253 - Height = 4 - Shape = bsBottomLine - end - object bvlMultipleRecords: TBevel - Left = 89 - Top = 101 - Width = 208 - Height = 4 - Shape = bsBottomLine - end - object lblPrintMode: TLabel - Left = 91 - Top = 117 - Width = 33 - Height = 13 - Caption = 'Mode: ' - FocusControl = cbxPrintMode - end - object chbxShowHeaders: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = '&Headers' - TabOrder = 0 - OnClick = OptionsViewClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 1 - Left = 90 - Top = 75 - Width = 200 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 2 - OnClick = OptionsViewClick - end - object chbxShowBorders: TCheckBox - Tag = 2 - Left = 90 - Top = 52 - Width = 200 - Height = 17 - Caption = 'Borders' - TabOrder = 1 - OnClick = OptionsViewClick - end - object lblPreviewWindow: TStaticText - Left = 306 - Top = 0 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 3 - end - object cbxPrintMode: TComboBox - Left = 156 - Top = 114 - Width = 140 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 4 - OnChange = cbxPrintModeChange - Items.Strings = ( - 'Current Record' - 'Loaded Records' - 'All Recods') - end - end - object tshBehaviors: TTabSheet - Caption = 'Behaviors' - ImageIndex = 1 - object lblExpanding: TLabel - Left = 5 - Top = 8 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object imgExpanding: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0888777777777777777777707DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD08887888887FFFFFFFFFFFF07DDDDDDDDDDDD0F77777777777777777777 - F07DD08887800087F00000000FFF07DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD08887888887FFFFFFFFFFFF07DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD0888777777777777777777707DDDDDDDDDDDD0F78887800087F00000FF7 - F07DD08887888887FFFFFFFFFFFF07DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD08887800087F0000000000F07DDDDDDDDDDDD0F78887777777777777777 - F07DD08887888887FFFFFFFFFFFF07DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD0888777777777777777777707DDDDDDDDDDDD0F78887800087F000000F7 - F07DD0888888888888888888888807DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD0808887777777777778888807DDDDDDDDDDDD0F78887777777777777777 - F07DD0888888888888888888888807DDDDDDDDDDDD0F78888888888888888887 - F07DD0777777777777777777777707DDCDDDDCDDDD0F78089C80000000088887 - F07DD0888888888888888888888807DDCCCCDCCDDD0F78888888888888888887 - F07DD0808998000000000008888807DDCCCCCCCCDD0F77777777777777777777 - F07DD0888888888888888888888807DDCCCCDCCDDD0F78887888887FFFFFFFF7 - F07DD0777777777777777777777707DDCDDDDCDDDD0F78887800087F000000F7 - F07DD0888888888888888888888807DDDDDDDDDDDD0F78887888887FFFFFFFF7 - F07DD08089C8000000000088888807DDDDDDDDDDDD0F78887777777777777777 - F07DD0888888888888888888888807DDCDDDDCDDDD0F78887888887FFFFFFFF7 - F07DD0777777777777777777777707DDCCCCDCCDDD0F78887800087F00000FF7 - F07DD0888888888888888888888807DDCCCCCCCCDD0F78887888887FFFFFFFF7 - F07DD0808998000000888888888807DDCCCCDCCDDD0F78887777777777777777 - F07DD0888888888888888888888807DDCDDDDCDDDD0F78888888888888888887 - F07DD0777777777777777777777707DDDDDDDDDDDD0F78089980000008888887 - F07DD08888888887FFFFFFFFFFFF07DDDDDDDDDDDD0F78888888888888888887 - F07DD08800008887FF000000000F07DDDDDDDDDDDD0F77777777777777777777 - F07DD08888888887FFFFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFFFFFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object bvlExpanding: TBevel - Left = 62 - Top = 13 - Width = 234 - Height = 4 - Shape = bsBottomLine - end - object lblSize: TLabel - Left = 5 - Top = 78 - Width = 19 - Height = 13 - Caption = 'Size' - end - object bvlSize: TBevel - Left = 33 - Top = 82 - Width = 263 - Height = 4 - Shape = bsBottomLine - end - object imgGridSize: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0800000000000000008088F07DDDDDDDDDDDD0800000000000000000000 - 807DD0F088887FFFF8FFFF0FFF0F07DDDDDDDDDDDD0F08778887F777F7F777F0 - F07DD0F088887FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0F080087F00F8F00F0FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F088887FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0F0777777777777770FFF0F07DDCDDDDCDDDD0F08008887F00FF7F00FF0 - F07DD0F088887FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F08888887FFFFF7FFFFF0 - F07DD0F088887F00F8F00F0FFF0F07DDCCCCCCCCDD0F07777777777777777770 - F07DD0F088887FFFF8FFFF0FFF8F07DDCCCCDCCDDD0F08888887FFFFF7FFFFF0 - F07DD0F088887F00F8F00F0FFF0F07DDCDDDDCDDDD0F08888887F000F7F000F0 - F07DD0F088887FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0F080087F00F8F00F0FFF0F07DDDDDDDDDDDD0F08008887F000F7F000F0 - F07DD0F088887FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F08888887FFFFF7FFFFF0 - F07DD0F0777777777777770FFF0F07DDCCCCDCCDDD0F07777777777777777770 - F07DD0F088887FFFF8FFFF0FFF8F07DDCCCCCCCCDD0F08888887FFFFF7FFFFF0 - F07DD0F088887F00F8F00F0FFF0F07DDCCCCDCCDDD0F08888887F0FFF7F0FFF0 - F07DD0F088887FFFF8FFFF0FFF8F07DDCDDDDCDDDD0F08888887FFFFF7FFFFF0 - F07DD0F080087F00F8F00F0FFF0F07DDDDDDDDDDDD0F08008887F000F7F000F0 - F07DD0F088887FFFF8FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0F0777777777777770FFF0F07DDDDDDDDDDDD0F07777777777777777770 - F07DD0F088887FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0F080087F00F7F00F0FFF0F07DDDDDDDDDDDD0F08008887F00FF7F00FF0 - F07DD0F088887FFFF7FFFF0FFF8F07DDDDDDDDDDDD0F08888887FFFFF7FFFFF0 - F07DD0800000000000000008080807DDDDDDDDDDDD0800000000000000000000 - 807DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD0F8FFFFFFFFFFFFFFFFFF8 - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxExpandRows: TCheckBox - Left = 90 - Top = 29 - Width = 200 - Height = 17 - Caption = 'Rows' - TabOrder = 0 - OnClick = OptionsExpandingClick - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 100 - Width = 200 - Height = 17 - Caption = '&Auto Width' - TabOrder = 1 - OnClick = OptionsSizeClick - end - object chbxBestFit: TCheckBox - Tag = 1 - Left = 90 - Top = 123 - Width = 200 - Height = 17 - Caption = 'BestFit' - TabOrder = 2 - OnClick = OptionsSizeClick - end - object chbxWrapRecords: TCheckBox - Tag = 3 - Left = 90 - Top = 169 - Width = 200 - Height = 17 - Caption = '&Wrap Records' - TabOrder = 4 - OnClick = OptionsSizeClick - end - object chbxKeepSameRecordWidths: TCheckBox - Tag = 2 - Left = 90 - Top = 146 - Width = 200 - Height = 17 - Caption = 'Keep Equal Record Widths' - TabOrder = 3 - OnClick = OptionsSizeClick - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblLookAndFeel: TLabel - Left = 5 - Top = 8 - Width = 66 - Height = 13 - Caption = 'Look and Feel' - end - object bvlLookAndFeel: TBevel - Left = 85 - Top = 13 - Width = 211 - Height = 4 - Shape = bsBottomLine - end - object imgLookAndFeel: TImage - Left = 8 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D0887777787787FFFFFFFFFFF07DDDDDDDDDDD0F87777787787FFFFFFFFF - FF07D0888888888887F000FF0000F07DDDDDDDDDDD0F88888888887F000FF000 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000080087F00000000FF07DDDDDDDDDDD0F80000080087F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000000F07DCCCCDCCDDD0F80000000887F00000000 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F000000F00F07DDDDDDDDDDD0F80000000887F000000F0 - 0F07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DCCCCDCCDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DCCCCCCCCDD0F88888888887FFFFFFFFF - FF07D0880000008887F00000FF00F07DCCCCDCCDDD0F80000008887F00000FF0 - 0F07D0888888888887FFFFFFFFFFF07DCDDDDCDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0880000000887F00000000FF07DDDDDDDDDDD0F80000000887F00000000 - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0F88888888887FFFFFFFFF - FF07D0888888888887FFFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - FF07D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object imgRefinements: TImage - Left = 8 - Top = 100 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF7FFFFFFF07DDCCCCDCCDDD0888888888887FF777777F - F07DD0888888888887FF70888FFF07DDCCCCCCCCDD0888888888887FF7FFFF7F - F07DD0880000000887FF70FF8FFF07DDCCCCDCCDDD0880000000887FF7F00F7F - F07DD0888888888887FF70FF8FFF07DDCDDDDCDDDD0888888888887FF7F00F7F - F07DD0880008888887FF70000FFF07DDDDDDDDDDDD0880008888887FF7FFFF7F - F07DD0888888888887FF777777FF07DDDDDDDDDDDD0888888888887FF777777F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCCCCCCCCDD0888888888887FFFFFFFFF - F07DD0880000000887FCCCCCCCFF07DDCCCCDCCDDD0888888888887FFFFFFFFF - F07DD0888888888887FFCCCCCFFF07DDCDDDDCDDDD0888888888887FFFFFFFFF - F07DD0880000000887F9999999FF07DDDDDDDDDDDD0880000000887F88888FFF - F07DD0888888888887FF99999FFF07DDDDDDDDDDDD0888888888887F888888FF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777888888888 - 807DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD0888888888887FF888FFFFF07DDDDDDDDDDDD0888888888887FF888FFFF - F07DD0880000888887FFFFFFFFFF07DDDDDDDDDDDD0880000888887FFFFFFFFF - F07DD0880000000087FF888888FF07DDDDDDDDDDDD0880000000087FF888888F - F07DD0888888888887FF888888FF07DDDDDDDDDDDD0888888888887FF888888F - F07DD0888888888887FFFFFFFFFF07DDDDDDDDDDDD0888888888887FFFFFFFFF - F07DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblRefinements: TLabel - Left = 5 - Top = 78 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 70 - Top = 82 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object lblPagination: TLabel - Left = 5 - Top = 190 - Width = 50 - Height = 13 - Caption = 'Pagination' - end - object bvlPagination: TBevel - Left = 64 - Top = 195 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object imgPagination: TImage - Left = 8 - Top = 212 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDD0000000000000000000000007DDDDDDDDDDDD77777777777777770DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0DDDDD - DDDDD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDD7F7777777777777F0DDDDD - DDDDD0888000000000000000088F07DDDDDDDDDDDD7F78887F88F7FF7F07770D - DDDDD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78887FFFF7FF7F0FFF0D - DDDDD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7F7777777777777F077F0D - DDDDD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78887F88F7FF7F0F7F07 - 770DD098F0000000000000000F8907DDDDDDDDDDDD7F78887FFFF7FF7F0F7F0F - FF0DD099FFFFFFFFFFFFFFFFFF9907DDCDDDDCDDDD7F7777777777777F0F7F07 - 7F0DD0999999999999999999999907DDCCCCDCCDDD7F78887FFFF7FF7F0F7F0F - 7F0DD099F0000000000000000F9907DDCCCCCCCCDD7F78787F88F7FF7F0F7F0F - 7F0DD098F088887FFFF8FFFF0F8907DDCCCCDCCDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887F88F8F88F0F8F07DDCDDDDCDDDD7F7777777777777F0F7F0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD7F78787F88F7FF7F0F7F0F - 7F0DD098F0000000000000000F8907DDCDDDDCDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD099FFFFFFFFFFFFFFFFFF9907DDCCCCDCCDDD7F7777777777777F0F7F0F - 7F0DD0999999999999999999999907DDCCCCCCCCDD7F78887FFFF7FF7F0F7F0F - 7F0DD099F0000000000000000F9907DDCCCCDCCDDD7F78787F88F7FF7F0F7F0F - 7F0DD098F088887FFFF8FFFF0F8907DDCDDDDCDDDD7F78887FFFF7FF7F0F7F0F - 7F0DD0F8F088887F88F8F88F0F8F07DDDDDDDDDDDD7F7777777777777F0F7F0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDD7FFFFFFFFFFFFFFF0F7F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDD00000000000000000F7F0F - 7F0DD0F8F0777778888888880F8F07DDDDDDDDDDDDDDDD7F7777777777777F0F - 7F0DD0F8F088887FFFF8FFFF0F8F07DDDDDDDDDDDDDDDD7FFFFFFFFFFFFFFF0F - 7F0DD0F8F080087F00F8F00F0F8F07DDDDDDDDDDDDDDDD00000000000000000F - 7F0DD0F8F088887FFFF8FFFF0F8807DDDDDDDDDDDDDDDDDDDD7F777777777777 - 7F0DD0888000000000000000088F07DDDDDDDDDDDDDDDDDDDD7FFFFFFFFFFFFF - FF0DD0F8FFFFFFFFFFFFFFFFFF8F07DDDDDDDDDDDDDDDDDDDD00000000000000 - 000DD000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object cbxLookAndFeel: TComboBox - Left = 90 - Top = 37 - Width = 202 - Height = 21 - Style = csDropDownList - ItemHeight = 0 - TabOrder = 0 - OnChange = LookAndFeelChange - end - object chbxFlatCheckMarks: TCheckBox - Tag = 2 - Left = 90 - Top = 146 - Width = 200 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 3 - OnClick = OptionsRefinementsClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 1 - Left = 90 - Top = 123 - Width = 200 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = OptionsRefinementsClick - end - object chbxTransparentGraphics: TCheckBox - Left = 90 - Top = 100 - Width = 200 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 1 - OnClick = OptionsRefinementsClick - end - object chbxSuppressBackgroundBitmaps: TCheckBox - Tag = 1 - Left = 90 - Top = 169 - Width = 200 - Height = 17 - Caption = 'Suppress Background Textures' - TabOrder = 4 - OnClick = OptionsFormattingClick - end - object chbxPaginateByRows: TCheckBox - Left = 90 - Top = 213 - Width = 200 - Height = 17 - Caption = 'By Rows' - TabOrder = 5 - OnClick = OptionsPaginationClick - end - object chbxPaginateByWrapping: TCheckBox - Tag = 1 - Left = 90 - Top = 236 - Width = 200 - Height = 17 - Caption = 'By Wrapping' - TabOrder = 6 - OnClick = OptionsPaginationClick - end - object chbxOneWrappingPerPage: TCheckBox - Tag = 2 - Left = 90 - Top = 259 - Width = 200 - Height = 17 - Caption = 'One Wrapping Per Page' - TabOrder = 7 - OnClick = OptionsPaginationClick - end - end - object tshStyles: TTabSheet - Caption = 'Styles' - ImageIndex = 4 - object bvlStyles: TBevel - Left = 115 - Top = 13 - Width = 181 - Height = 4 - Shape = bsBottomLine - end - object bvlStyleSheets: TBevel - Left = 72 - Top = 259 - Width = 224 - Height = 5 - Shape = bsBottomLine - end - object lblStyleSheets: TLabel - Left = 6 - Top = 255 - Width = 60 - Height = 13 - Caption = 'Style Sheets' - end - object bvlStylesHost: TBevel - Left = 6 - Top = 33 - Width = 214 - Height = 183 - end - object Label1: TLabel - Left = 77 - Top = 118 - Width = 68 - Height = 13 - Caption = '[ Styles Host ]' - Visible = False - end - object lblUseNativeStyles: TLabel - Left = 23 - Top = 9 - Width = 84 - Height = 13 - Caption = '&Use Native Styles' - FocusControl = chbxUseNativeStyles - OnClick = lblUseNativeStylesClick - end - object btnStyleColor: TButton - Left = 228 - Top = 61 - Width = 68 - Height = 23 - Caption = 'Co&lor...' - TabOrder = 2 - OnClick = StyleColorClick - end - object btnStyleFont: TButton - Left = 228 - Top = 33 - Width = 68 - Height = 23 - Caption = '&Font...' - TabOrder = 1 - OnClick = StyleFontClick - end - object btnStyleBackgroundBitmap: TButton - Left = 228 - Top = 97 - Width = 68 - Height = 23 - Caption = '&Bitmap...' - TabOrder = 3 - OnClick = StyleBackgroundBitmapClick - end - object chbxUseNativeStyles: TCheckBox - Left = 5 - Top = 8 - Width = 15 - Height = 17 - Caption = '&Use Native Styles' - TabOrder = 0 - OnClick = OptionsFormattingClick - end - object cbxStyleSheets: TComboBox - Left = 6 - Top = 275 - Width = 288 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 7 - OnClick = cbxStyleSheetsClick - OnDrawItem = cbxStyleSheetsDrawItem - OnKeyDown = cbxStyleSheetsKeyDown - end - object btnStyleSheetNew: TButton - Left = 6 - Top = 307 - Width = 68 - Height = 23 - Caption = '&New...' - TabOrder = 8 - OnClick = btnStyleSheetNewClick - end - object btnStyleSheetCopy: TButton - Left = 79 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Copy...' - TabOrder = 9 - OnClick = btnStyleSheetCopyClick - end - object btnStyleSheetDelete: TButton - Left = 153 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Delete...' - TabOrder = 10 - OnClick = btnStyleSheetDeleteClick - end - object btnStylesSaveAs: TButton - Left = 116 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Save &As...' - TabOrder = 6 - OnClick = StylesSaveAsClick - end - object btnStyleSheetRename: TButton - Left = 226 - Top = 307 - Width = 68 - Height = 23 - Caption = '&Rename...' - TabOrder = 11 - OnClick = btnStyleSheetRenameClick - end - object btnStyleBackgroundBitmapClear: TButton - Left = 228 - Top = 125 - Width = 68 - Height = 23 - Caption = 'Clear' - TabOrder = 4 - OnClick = StyleBackgroundBitmapClearClick - end - object btnStyleRestoreDefaults: TButton - Left = 6 - Top = 223 - Width = 105 - Height = 23 - Caption = 'Restore Defaults' - TabOrder = 5 - OnClick = StyleRestoreDefaultsClick - end - end - end - object pnlPreview: TPanel - Left = 313 - Top = 44 - Width = 318 - Height = 315 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object PreviewVGrid: TcxVerticalGrid - Left = 6 - Top = 8 - Width = 307 - Height = 303 - BorderStyle = cxcbsNone - OptionsView.ScrollBars = ssNone - OptionsView.RowHeaderWidth = 112 - OptionsView.ValueWidth = 150 - TabOrder = 0 - OnDrawValue = PreviewVGridDrawValue - object rowLuxurySedan: TcxCategoryRow - Properties.Caption = 'Luxury sedans' - Properties.HeaderAlignmentVert = vaCenter - object rowManufacturer: TcxEditorRow - Properties.Caption = 'Manufacturer' - Properties.HeaderAlignmentVert = vaCenter - Properties.EditPropertiesClassName = 'TcxTextEditProperties' - Properties.EditProperties.MaxLength = 0 - Properties.DataBinding.ValueType = 'String' - Properties.Value = 'BMW' - end - object rowModel: TcxEditorRow - Properties.Caption = 'Model' - Properties.HeaderAlignmentVert = vaCenter - Properties.EditPropertiesClassName = 'TcxTextEditProperties' - Properties.EditProperties.MaxLength = 0 - Properties.DataBinding.ValueType = 'String' - Properties.Value = '760 Li V12' - end - object rowPicture: TcxEditorRow - Height = 116 - Properties.Caption = 'Picture' - Properties.HeaderAlignmentVert = vaCenter - Properties.EditPropertiesClassName = 'TcxImageProperties' - Properties.DataBinding.ValueType = 'String' - Properties.Value = Null - end - object rowEngine: TcxEditorRow - Height = 57 - Properties.Caption = 'Engine' - Properties.EditPropertiesClassName = 'TcxMemoProperties' - Properties.EditProperties.MaxLength = 0 - Properties.DataBinding.ValueType = 'String' - Properties.Value = - '6.0L DOHC V12 438 HP 48V DI Valvetronic 12-cylinder engine with ' + - '6.0-liter displacement, dual overhead cam valvetrain' - end - object rowTransmission: TcxEditorRow - Height = 17 - Properties.Caption = 'Transmission' - Properties.DataBinding.ValueType = 'String' - Properties.Value = 'Elec 6-Speed Automatic w/Steptronic' - end - object rowTires: TcxEditorRow - Height = 44 - Properties.Caption = 'Tires' - Properties.EditPropertiesClassName = 'TcxMemoProperties' - Properties.EditProperties.MaxLength = 0 - Properties.DataBinding.ValueType = 'String' - Properties.Value = - 'P245/45R19 Fr - P275/40R19 Rr Performance. Low Profile tires wit' + - 'h 245mm width, 19.0" rim' - end - end - end - end - object cxStyleRepository1: TcxStyleRepository - Left = 4 - Top = 373 - object styleCategory: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWindowText - end - object styleHeader: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - object styleContent: TcxStyle - AssignedValues = [svFont, svTextColor] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWindowText - end - end - object pmStyles: TPopupMenu - Images = ilStylesPopup - OnPopup = pmStylesPopup - Left = 32 - Top = 373 - object miStyleFont: TMenuItem - Caption = '&Font...' - ImageIndex = 0 - ShortCut = 16454 - OnClick = StyleFontClick - end - object miStyleColor: TMenuItem - Caption = '&Color...' - ShortCut = 16451 - OnClick = StyleColorClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miStyleBackgroundBitmap: TMenuItem - Caption = '&Bitmap...' - ImageIndex = 1 - OnClick = StyleBackgroundBitmapClick - end - object miStyleBackgroundBitmapClear: TMenuItem - Caption = 'Clear' - ImageIndex = 3 - ShortCut = 16430 - OnClick = StyleBackgroundBitmapClearClick - end - object milLine: TMenuItem - Caption = '-' - end - object miStylesSelectAll: TMenuItem - Caption = 'Select A&ll' - ShortCut = 16449 - OnClick = miStylesSelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miStyleRestoreDefaults: TMenuItem - Caption = 'Restore Defaults' - OnClick = StyleRestoreDefaultsClick - end - object miLine4: TMenuItem - Caption = '-' - end - object miStylesSaveAs: TMenuItem - Caption = 'Save &As...' - ImageIndex = 2 - ShortCut = 16467 - OnClick = StylesSaveAsClick - end - end - object ilStylesPopup: TImageList - Left = 60 - Top = 373 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF000000 - 0000008080000080800000808000008080000080800000808000008080000080 - 8000008080000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000080800000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000000000000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008080000080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000008080000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF0000FFFF008080 - 8000FFFFFF00FFFFFF00FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00FFFFFF008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080000000 - 0000000000008080800080808000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00C0C0C00000FFFF00C0C0C000FFFF0000FFFFFF00FFFF0000FFFF - FF00FFFF0000FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000000000008080800080808000000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFF0000C0C0C000FFFF0000FFFFFF00FFFF0000FFFFFF00FFFF - 0000FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000008080000000 - 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0 - C00000000000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF - FE07001F8001FFF9FF9F000F8001E7FFFF9F00078001C3F3E01F00038001C3E7 - F99F00018001E1C7F99B00008001F08FF99B00018001F81FF89300018001FC3F - D80300018001F81FD9BF80018001F09FC93FE0018001C1C7C03FE001800183E3 - FFFFE00180018FF1FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPScxVGridLnkPredefinedStyleSheets.dfm b/internal/x.46/Lib/D11/dxPScxVGridLnkPredefinedStyleSheets.dfm deleted file mode 100644 index 864f94ce..00000000 --- a/internal/x.46/Lib/D11/dxPScxVGridLnkPredefinedStyleSheets.dfm +++ /dev/null @@ -1,113 +0,0 @@ -object cxdmPScxVGridLnkPredefinedStyles: TcxdmPScxVGridLnkPredefinedStyles - OldCreateOrder = False - Left = 435 - Top = 202 - Height = 150 - Width = 215 - AutoScroll = False - object StyleRepository: TcxStyleRepository - Left = 63 - Top = 28 - object styleProfessionalCategory: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clWhite - end - object styleProfessionalHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 7566195 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clWhite - end - object styleGrayCategory: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 6579300 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleGrayHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = 8559005 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleNoneContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentCategory: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - TextColor = clBlack - end - object styleTransparentHeader: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object styleTransparentContent: TcxStyle - AssignedValues = [svColor, svFont, svTextColor] - Color = clWhite - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - TextColor = clBlack - end - object ssProfessional: TcxVerticalGridReportLinkStyleSheet - Caption = 'Professional' - Styles.Category = styleProfessionalCategory - Styles.Content = styleNoneContent - Styles.Header = styleProfessionalHeader - BuiltIn = True - end - object ssGray: TcxVerticalGridReportLinkStyleSheet - Caption = 'Gray' - Styles.Category = styleGrayCategory - Styles.Content = styleNoneContent - Styles.Header = styleGrayHeader - BuiltIn = True - end - object ssTransparent: TcxVerticalGridReportLinkStyleSheet - Caption = 'Transparent' - Styles.Category = styleTransparentCategory - Styles.Content = styleTransparentContent - Styles.Header = styleTransparentHeader - BuiltIn = True - end - end -end diff --git a/internal/x.46/Lib/D11/dxPSdxFCLnk.dfm b/internal/x.46/Lib/D11/dxPSdxFCLnk.dfm deleted file mode 100644 index 34784412..00000000 --- a/internal/x.46/Lib/D11/dxPSdxFCLnk.dfm +++ /dev/null @@ -1,410 +0,0 @@ -object dxFCReportLinkDesignWindow: TdxFCReportLinkDesignWindow - Left = 372 - Top = 310 - ActiveControl = chbxTransparent - BorderStyle = bsDialog - Caption = 'Report Designer' - ClientHeight = 319 - ClientWidth = 552 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 3 - Width = 544 - Height = 280 - ActivePage = tshOptions - MultiLine = True - TabOrder = 0 - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 536 - Height = 252 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblPreview: TLabel - Left = 242 - Top = 2 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 14 - Width = 226 - Height = 51 - Caption = ' ' - TabOrder = 1 - object lblColor: TLabel - Left = 7 - Top = 24 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblColorClick - end - object bvlColorHolder: TBevel - Left = 86 - Top = 20 - Width = 132 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 17 - Top = 12 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = chbxTransparentClick - end - object gbxBorder: TGroupBox - Left = 5 - Top = 75 - Width = 226 - Height = 51 - Caption = ' ' - TabOrder = 3 - object lblGridLinesColor: TLabel - Left = 7 - Top = 24 - Width = 67 - Height = 13 - Caption = '&Border Color: ' - OnClick = lblColorClick - end - object bvlLineColorHolder: TBevel - Left = 86 - Top = 20 - Width = 132 - Height = 21 - Visible = False - end - end - object chbxDrawBorder: TCheckBox - Left = 17 - Top = 73 - Width = 15 - Height = 17 - TabOrder = 2 - OnClick = chbxDrawBorderClick - end - object stTransparent: TStaticText - Left = 32 - Top = 13 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 4 - OnClick = stTransparentClick - end - object stDrawBorder: TStaticText - Left = 32 - Top = 74 - Width = 70 - Height = 17 - Caption = ' Draw Border ' - FocusControl = chbxDrawBorder - TabOrder = 5 - OnClick = stDrawBorderClick - end - end - end - end - object pnlPreview: TPanel - Left = 250 - Top = 46 - Width = 288 - Height = 226 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 1 - end - object ilFlowChart: TImageList - Left = 36 - Top = 197 - Bitmap = { - 494C010101000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484008484840084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000FF00000000000000FF000000FF000000FF0000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000FFFF0000840000000084000000000000840000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000084000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000084000000000084848400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000008400000000000000000000848484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000FF000000FFFF0000FF000000840000000000000084 - 0000008400008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FF00000084 - 000000FF000000FF000000FF000000FF0000008400000084000000FF000000FF - 0000008400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000FF000000FF - 000000FF000000FF000000FF000000FF000000FF00000084000000FF000000FF - FF00008400008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000000FF - 0000000000000084000000FF000000FF000000FF000000FF000000FF00000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000FF000000FF00000084000000FF000000FF000000FF000000FF000000FF - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000008484840000FFFF000084000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000FF000000840000848484000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFF000000000000FC3F000000000000 - F00F000000000000F00F000000000000FE7F000000000000FF7F000000000000 - FC3F000000000000F81F000000000000C0030000000000008003000000000000 - 8003000000000000C007000000000000F007000000000000F01F000000000000 - FE1F000000000000FFFF00000000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPSdxInsLnk.dfm b/internal/x.46/Lib/D11/dxPSdxInsLnk.dfm deleted file mode 100644 index ede334e4..00000000 --- a/internal/x.46/Lib/D11/dxPSdxInsLnk.dfm +++ /dev/null @@ -1,2318 +0,0 @@ -object dxInspectorDesignWindow: TdxInspectorDesignWindow - Left = 353 - Top = 289 - BorderStyle = bsDialog - Caption = 'dxInspectorDesignWindow' - ClientHeight = 341 - ClientWidth = 585 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 577 - Height = 300 - ActivePage = tshOptions - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object lblShow: TLabel - Left = 6 - Top = 6 - Width = 26 - Height = 13 - Caption = 'Show' - end - object bvlShow: TBevel - Left = 40 - Top = 10 - Width = 222 - Height = 4 - Shape = bsBottomLine - end - object imgGrid: TImage - Left = 6 - Top = 32 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblBehaviors: TLabel - Left = 6 - Top = 142 - Width = 47 - Height = 13 - Caption = 'Behaviors' - end - object bvlBehaviors: TBevel - Left = 66 - Top = 147 - Width = 196 - Height = 4 - Shape = bsBottomLine - end - object Image4: TImage - Left = 6 - Top = 166 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F877778880F87777777778078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object chbxShowBorders: TCheckBox - Left = 90 - Top = 29 - Width = 169 - Height = 17 - Caption = 'Border' - TabOrder = 0 - OnClick = chbxOptionsClick - end - object chbxShowHorzLines: TCheckBox - Tag = 1 - Left = 90 - Top = 51 - Width = 169 - Height = 17 - Caption = 'Horizontal Lines' - TabOrder = 1 - OnClick = chbxOptionsClick - end - object chbxShowVertLines: TCheckBox - Tag = 2 - Left = 90 - Top = 73 - Width = 169 - Height = 17 - Caption = 'Vertical Lines' - TabOrder = 2 - OnClick = chbxOptionsClick - end - object chbxShowImages: TCheckBox - Tag = 5 - Left = 90 - Top = 117 - Width = 169 - Height = 17 - Caption = 'Images' - TabOrder = 4 - OnClick = chbxOptionsClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 8 - Left = 90 - Top = 95 - Width = 169 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 3 - OnClick = chbxOptionsClick - end - object chbxAutoNodesExpand: TCheckBox - Left = 90 - Top = 167 - Width = 169 - Height = 17 - Caption = '&Auto Node Expand' - TabOrder = 5 - OnClick = chbxAutoNodesExpandClick - end - object chbxAutoWidth: TCheckBox - Left = 90 - Top = 189 - Width = 169 - Height = 17 - Caption = '&Auto &Width' - TabOrder = 6 - OnClick = chbxAutoWidthClick - end - object lblPreview: TStaticText - Left = 275 - Top = 3 - Width = 42 - Height = 17 - Caption = 'Preview' - TabOrder = 7 - end - end - object tshColors: TTabSheet - Caption = '&Color' - object lblGridLinesColor: TLabel - Left = 10 - Top = 219 - Width = 79 - Height = 13 - Caption = '&Grid lines color : ' - end - object bvlGridLineColorHolder: TBevel - Left = 91 - Top = 215 - Width = 168 - Height = 21 - Visible = False - end - object gbxCaptionTransparent: TGroupBox - Left = 5 - Top = 73 - Width = 262 - Height = 61 - Caption = ' ' - TabOrder = 3 - object lblCaptionColor: TLabel - Left = 6 - Top = 29 - Width = 72 - Height = 13 - Caption = 'Caption Color: ' - end - object bvlFixedColorHolder: TBevel - Left = 86 - Top = 25 - Width = 168 - Height = 21 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 7 - Width = 262 - Height = 60 - Caption = ' ' - TabOrder = 1 - object lblColor: TLabel - Left = 6 - Top = 29 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - end - object bvlColorHolder: TBevel - Left = 86 - Top = 25 - Width = 168 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 18 - Top = 5 - Width = 15 - Height = 17 - TabOrder = 0 - OnClick = chbxTransparentClick - end - object chbxCaptionTransparent: TCheckBox - Tag = 1 - Left = 18 - Top = 70 - Width = 15 - Height = 17 - TabOrder = 2 - OnClick = chbxTransparentClick - end - object gbxGroupTransparent: TGroupBox - Left = 5 - Top = 141 - Width = 262 - Height = 61 - Caption = ' ' - TabOrder = 5 - object lblGroupColor: TLabel - Left = 6 - Top = 29 - Width = 64 - Height = 13 - Caption = '&Group Color: ' - end - object bvlGroupColorHolder: TBevel - Left = 86 - Top = 25 - Width = 168 - Height = 21 - Visible = False - end - end - object chbxGroupTransparent: TCheckBox - Tag = 2 - Left = 18 - Top = 139 - Width = 15 - Height = 17 - TabOrder = 4 - OnClick = chbxTransparentClick - end - object stTransparent: TStaticText - Left = 33 - Top = 6 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 6 - OnClick = stTransparentClick - end - object stCaptionTransparent: TStaticText - Left = 33 - Top = 71 - Width = 109 - Height = 17 - Caption = ' Caption Transparent ' - FocusControl = chbxCaptionTransparent - TabOrder = 7 - OnClick = stCaptionTransparentClick - end - object stGroupTransparent: TStaticText - Left = 33 - Top = 140 - Width = 101 - Height = 17 - Caption = ' Group Transparent ' - FocusControl = chbxGroupTransparent - TabOrder = 8 - OnClick = stGroupTransparentClick - end - end - object tshFonts: TTabSheet - Caption = '&Font' - object btnFont: TButton - Left = 8 - Top = 14 - Width = 110 - Height = 23 - Caption = 'Fo&nt ...' - TabOrder = 0 - OnClick = btnFontClick - end - object edFont: TEdit - Left = 8 - Top = 42 - Width = 256 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnGroupFont: TButton - Tag = 2 - Left = 8 - Top = 130 - Width = 110 - Height = 23 - Caption = 'Grou&p Font ...' - TabOrder = 4 - OnClick = btnFontClick - end - object edGroupFont: TEdit - Left = 9 - Top = 158 - Width = 256 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 5 - end - object btnFixedFont: TButton - Tag = 1 - Left = 8 - Top = 72 - Width = 110 - Height = 23 - Caption = 'Fi&xed Font ...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - OnClick = btnFontClick - end - object edFixedFont: TEdit - Left = 8 - Top = 100 - Width = 256 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 3 - end - end - object tshFormatting: TTabSheet - Caption = 'Formatting' - ImageIndex = 4 - object lblRefinements: TLabel - Left = 6 - Top = 6 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlAppearance: TBevel - Left = 79 - Top = 10 - Width = 183 - Height = 4 - Shape = bsBottomLine - end - object imgGraphics: TImage - Left = 6 - Top = 32 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object chbxFlatCheckMarks: TCheckBox - Tag = 3 - Left = 90 - Top = 29 - Width = 169 - Height = 17 - Caption = 'Flat CheckMarks' - TabOrder = 0 - OnClick = chbxOptionsClick - end - object chbxCheckMarksAsText: TCheckBox - Tag = 4 - Left = 90 - Top = 51 - Width = 169 - Height = 17 - Caption = 'Display Check Marks as Text' - TabOrder = 1 - OnClick = chbxOptionsClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 7 - Left = 90 - Top = 73 - Width = 171 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 2 - OnClick = chbxOptionsClick - end - object chbxTransparentColumnGraphics: TCheckBox - Tag = 6 - Left = 90 - Top = 95 - Width = 171 - Height = 17 - Caption = 'Transparent Column &Graphics' - TabOrder = 3 - OnClick = chbxOptionsClick - end - end - end - object pnlPreview: TPanel - Left = 283 - Top = 50 - Width = 290 - Height = 246 - BevelOuter = bvLowered - Color = clWindow - TabOrder = 1 - object pnlPreviewHost: TPanel - Left = 5 - Top = 5 - Width = 279 - Height = 234 - BevelOuter = bvNone - BorderStyle = bsSingle - Ctl3D = False - ParentCtl3D = False - TabOrder = 0 - object insPreview: TdxInspector - Left = 0 - Top = 0 - Width = 279 - Height = 234 - BorderStyle = bsNone - Color = clWindow - Ctl3D = False - Enabled = False - ParentCtl3D = False - TabOrder = 0 - DividerPos = 133 - GridColor = clBtnFace - Flat = True - Images = ilVendorLogos - PaintStyle = ipsNET - Data = { - DB0000000200000008000000030000000E00000069724D657273656465734265 - 6E7A08000000000000000900000069724D424D6F64656C080000000000000007 - 00000069724D4253555608000000000000000900000069724D4250686F746F08 - 00000003000000050000006972424D5708000000000000000A0000006972424D - 574D6F64656C0800000000000000080000006972424D57535556080000000000 - 00000A0000006972424D5750686F746F02000000080000006C46080A0E000000 - 69724D6572736564657342656E7A08000000FCF9080A050000006972424D57} - object irMersedesBenz: TdxInspectorTextRow - Caption = 'Mersedes-Benz' - ImageIndex = 0 - IsCategory = True - RowHeight = 22 - OnDrawCaption = InspectorDrawCaption - end - object irMBPhoto: TdxInspectorTextGraphicRow - Caption = 'Photo' - RowHeight = 44 - OnDrawCaption = InspectorDrawCaption - OnDrawValue = irMBPhotoDrawValue - end - object irMBSUV: TdxInspectorTextCheckRow - Caption = 'SUV' - OnDrawCaption = InspectorDrawCaption - OnDrawValue = irMBSUVDrawValue - ValueChecked = 'True' - ValueUnchecked = 'False' - Text = 'False' - end - object irMBModel: TdxInspectorTextRow - Caption = 'Model' - OnDrawCaption = InspectorDrawCaption - OnDrawValue = InspectorDrawValue - Text = 'S600' - end - object irBMW: TdxInspectorTextRow - Caption = 'BMW' - ImageIndex = 1 - IsCategory = True - RowHeight = 22 - OnDrawCaption = InspectorDrawCaption - end - object irBMWModel: TdxInspectorTextRow - Caption = 'Model' - OnDrawCaption = InspectorDrawCaption - OnDrawValue = InspectorDrawValue - Text = 'X5 4WD' - end - object irBMWSUV: TdxInspectorTextCheckRow - Caption = 'SUV' - OnDrawCaption = InspectorDrawCaption - OnDrawValue = irMBSUVDrawValue - ValueChecked = 'True' - ValueUnchecked = 'False' - Text = 'True' - end - object irBMWPhoto: TdxInspectorTextGraphicRow - Caption = 'Photo' - RowHeight = 44 - OnDrawCaption = InspectorDrawCaption - OnDrawValue = irMBPhotoDrawValue - end - end - end - end - object ilVendorLogos: TImageList - AllocBy = 2 - Height = 21 - Width = 22 - Left = 4 - Top = 310 - Bitmap = { - 494C010102000400040016001500FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 000000000000360000002800000058000000150000000100180000000000A815 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000C0C0C0A6C4A5737273615F5FA2A9A2D2BCD10000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000C2C5C27B7C795D595B696165746C716359 - 6065676693969600000000000000000000000000000000000000000000000000 - 00000000000000000000000000008D6A8D366A35000000000000000000000000 - 0000000000001C441C7BB07B0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000D6D4D55F6560989394E3E3E4FFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFC9C5C6424848A1A1A10000000000000000000000 - 00000000000000000000000000000000A18EA1384538000D0000000003020702 - 0000000000000000000000000000000000000000282E26A69FA5000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000B4B3B54D4248EAE9E7FF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9B9799656A69 - 00000000000000000000000000000000000000000091AA91000D000000000706 - 040808060000000302001F1F1C25242E23262A04070D00000002020000000000 - 0E00647063000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000C7C9C85B58 - 5BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFB7B2B8676C6B000000000000000000000000000000C0C0C0161C16 - 0000001C1C1A1616120000001F1F1E93908D808080DFC285C5C1C07D81871115 - 2200000003030800000008180BAEBAAF00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - C0C0C0695F65FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF928B8FBBB9BA00000000000000000000 - 00008190800403042A2928262425000000637362D6D6D5F6F4F1808080BE9B37 - B18414C09F4AA1947F2F31390000000706040000005A62590000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000ACA0A595A096A1A0A1E7E3E6FFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2EEEFA1A0A1CCD4CF433E400000 - 00000000000000E0DBE12329202022203E3C3D141112668164FFFFFFFDFAFEF4 - F7EE808080C5A336B98F00BE9500C69B20A69777181F2F000000000000121513 - B1DCB10000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000737172FFFFFFC6C2C3655C63828983CD - C8C9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCDCDCC757577616866D2D2CF - FFFFFF9E9D9DC5C8C5000000000000A2AEA113131248494A272627384736FFFF - FFFFFFFFECF9ECF5F1EC808080CFA93AC49D00C5A100BB9400C7A1247B7C7C00 - 000D0000000000006C8F6B000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000C0C0C0959192FFFFFFFFFF - FFE3EBE7A5A2A27472773831377D7A7DE3E1E3E8E3E68E8E8C443E44575A5CAA - ABAAEEF1EEFFFFFFFFFFFFEAEBE9877D82000000C0C0C0767D772E312B5B5A59 - 383738959495FFFFFFF9FFFBF4FFF6FFFFFF808080D8AD37CDA200D0A700C8A1 - 00C59900BEA46424273A0000000000003C3F3CC0C0C000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000CDD0CE - B5B1B5FFFFFFFFFFFFFFFFFFEBECECB6BCB8C2BCBD2F3C38000000332C344849 - 4DBDB6BABBB9B9F1EEEEFFFFFFFFFFFFFFFFFFFCFFFF716C6F000000C0C0C06A - 74695050506362626D6A6BCAC9CAF3F5F3EDEEF0ECEFF0F6EEF2808080D2B54E - C59F18CBA728C5A327C29D1FCFAD60454D6503090E000000292929C0C0C00000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000BEB8BEC5C6C4FFFFFFFFFFFFFFFFFFFFFFFFF8F8F7A9A5A9EAE7E6 - 969496969196E0E0DEABAEAAF5F7F4FFFFFFFFFFFFFFFFFFFFFFFFFCFFFF776E - 74000000C0C0C076817467656479797A827F7BC8B78FDCC487D1BA7FD0B574D6 - BB63B8A351D7D5C9DADCD1D9D8D4D5D4D1D8D6D2E1DFDA43464B060607000000 - 242524C0C0C00000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000C5BFC4B9C2BBFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFA0A1A0E6ECE83A3639A2A4A2FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFF9F9F7767F78000000C0C0C0969D957A7873989792818388B2A383F2D3 - 7BE1C26ADFBA5CE2B642B9AB00808080FDFFFFF8FAFFF1F3FAFFFFFFE3E5E812 - 110E080908000000333232C0C0C0000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000C0C0C093898FFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFD4CED1CECACC222022DEDBDBFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFDEDEDE908D8D000000C0C0C0B9C2B6898782A5A29F - 8D8E95918F8DEDD498EBCC87E0C581E8C471BCC233808080FCFFFFF5FAF4F4FC - F2FFFFFF90918D000000000000000000546A54C0C0C000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 5E585CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE3E1E1B9B7B72F443FF2EE - F0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF999D98C1BDC0000000000000E2 - E2E192918BA5A19F808080808080A8A18EFBE69DEBD18AEDCC84C2C94B808080 - FFFFFFFFFFFFFFFFFF8080804954478080807574750E0C0D8EBB8DC0C0C00000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000676766E6E5E4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3F0F1 - A0989D575658FAFBFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFD545A550000 - 00000000000000F9C8F9BCC4B9D7D4D48080808080809FA0A6B0AB99F2DEA5FF - E39DCEDA5F808080FFFFFFFFFFFF808080707A707A637A808080808080818C80 - D7CDD70000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000C0C0C0444749FFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFF98A49B70666CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - 8E8C8CB6AFB5000000000000000000000000E2FFE1C6C4C48080808080808080 - 8084868D929290E0DAB5CAD876808080808080AB8FAB2945248A878880808080 - 808080808088A988808080000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000ACABA97D87 - 85FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF958F93878787FFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFBEB5BC585256000000000000000000000000000000000000C5F0C3 - DBDADB808080808080808080A0A1A17F90888DA68D55695980A07B474644625E - 5E373937808080B1B3B1728672C0C0C000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008F858C797A78FFFFFFFFFFFFFFFFFFFFFFFFA9A7A99E9F9EFFFF - FFFFFFFFFFFFFFFFFFFFABADAA5C605D00000000000000000000000000000000 - 0000000000000000C3D6C0A8AFA2ABA8A2B8B5B4B1AAAA808080808080472F3F - 8080805E825D646263423F3F192318A0AC9EC6D3C50000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000B7B8B7424645BFBBBDFFFFFFFFFFFF - CFCCCBC5C3C4FFFFFFFFFFFFD8D8D77875768B898A0000000000000000000000 - 00000000000000000000000000000000000000C0C0C0B7D0B3A1B29B8E9087D3 - C8CFAE9EAFC0C0C08080802237233345323C553CC0C0C0C0C0C0000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000009B - A09D525052706B6E7C75798C89888782836E6D6D8E898BC0C0C0000000000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C0C0C0C0A8D5A6AECBAB718670534951B8B7B7527450808080D88CD800000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C00000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000424D3E000000 - 000000003E0000002800000058000000150000000100010000000000FC000000 - 0000000000000000000000000000000000000000FFFFFF00FF87FFFC0FF00000 - 00000000FE01FFF003F0000000000000F8007FC000F0000000000000F0003F80 - 0070000000000000E0001F000030000000000000C0000F000030000000000000 - C0000E000010000000000000C000060000100000000000008000040000000000 - 0000000080000400000000000000000080000400000000000000000080000400 - 0000000000000000800004000000000000000000C00006000000000000000000 - C0000E000010000000000000C0000F000010000000000000E0001F8000300000 - 00000000F0003FC00070000000000000F8007FE000F0000000000000FE00FFF0 - 03F0000000000000FF83FFFC0FF0000000000000000000000000000000000000 - 00000000000000000000} - end - object ilCarPhotos: TImageList - AllocBy = 2 - Height = 44 - Width = 87 - Left = 32 - Top = 310 - Bitmap = { - 494C010102000400040057002C00FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 00000000000036000000280000005C0100002C000000010018000000000070B3 - 000000000000000000000000000000000000000000FDCBFF6D5D8FA47AD38A6D - BD8A6AC18B72C07D62B2665B9B6C5BA26E609B654E9767599369549565579664 - 559362538F655C92695B9469589567559360579262599564548C6254895F528C - 5E4E895D4A885B50885954875D54895D5489555483584F7E5F477C5A457A554A - 7B5850774B4D642E3B481F2A2E1D261B1F271C2229231E29201B281D1A261D1C - 241E1A231D16221D19231E18241B18221A19221A1129150F2A1415281915301A - 162F181C261D1E2325192420152B16182F18152B19152C1A162F1B192A1B0F30 - 181B2A1B253027222A20242F1426321A24320E142508333F18111E1D24351F33 - 3E32332B293333302526022E40302435193F402C07080B000000727689656C7D - 666C80646A7C666A7D6A6D81696C7F65687C6C6F83686E7E6B717E6E75836E72 - 7C6F727F72778371768270737E69707C68727D68727F6A71816B7484686F8068 - 6D7E666B7C6C717B6B6E7C6D737E73747F7674807374807475826F717D747681 - 70727E71737C6F737D6E747E73737E74758074758074768176768275747F7775 - 8173747F7576817476806F707B6E6F7A6D717B65737B69767E6C737C69707A69 - 707C6C7180686C7D696F7F6C6E816E6D7E686F7869707B6B717C6E737D6B707A - 6F747D70757F71757F73737E73758074758172748173757F72717C73737E7475 - 7E75777F76778076748074737E72727C73727D75737F85838E4A4C4E00000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000007000EFCC8FF53466C8764BB785C9E7A5FAB6C5F9E57427C6751 - 93644A8E574783584687584E855540825F4E8C5A458562508863508B594E8753 - 4A865C4F855C4B845C4C7F57477D56458250407D55467C594A7E55447D503D79 - 523D79503F734B3F6C463F6B49436A4A446C403E5A2622221316001E26111920 - 2C09161C0B180E111D18142219111E19081F120C2C0D142C140D1C150D1C1616 - 221A16231B111F160F1F120F22140C23160B20140C1F151A251D20241F132018 - 1C2F1F1B271F15251912261914231A18261B13231B0D1E0E2938251B240E1628 - 0E202C1A19251116270D1D2C181929141A20142E3F271E1F201829113C393906 - 2A0000120033301E1B180F687382B7C5E4A7B5CFABBBD3AABAD1AABCD3A6BAD1 - AABBD3AFBCD4AFBDD4AFBCD6AFBBD6B0BDD7B3BBD5B5BED8B1BBD4B5C0D7B9C4 - DBBEC6DBBEC4D8BFC5D9BEC1D6BFC3D7B9C1D5B9C1D6B3BCD1B0BCD7B2BCD6B3 - BFD7B8C0D8BBC2D9BCC2D8BFC4DABEC3D9BEC2D9BDC3D9C6C7DCBABDD3BFC5D9 - C5C6DCC5C6DAC2C9DDBFC5D8C0C5D9C3C7DBC2C6DBC5CADFC3C5DAC7CAE0C2C3 - DAC3C5DAC2C4D8C4C5DABFBFD4BBBDD4BEC0D5BFC3D7B9C1D5BAC1D4BDC4D9B7 - BFD7B1BBD2B5BDD9B4BDD8B2BCD5B3BED5B2BDD5BABED7B9BED6B9BDD5BCBFD6 - C0C3DBB8BFD6B7C3D7BDC5DBC3C5D9C3C8DDC9C6DAC7C6DACBC7DCC6C5DAC7C5 - DCC5C2D8C9C3DBC6C1D7D6D1E57F7F8500000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000009150FEBADFF - 524873805EAC765DA16C549C59468D665088664F95543E815E52875942855944 - 855C448864558F645289594582614F8C62528A5B4C855545825B477D594F7A55 - 497E55438053437A55457B55487C5044794D42735043735044744C406D493C6A - 48406C4437532F31442E5591465EC03A315B1E1F00192519181C240E1614091C - 130F20131D2A1D152E1D0B2518132218121E13141F1619261E13221B18231A19 - 2016121D1512221F11201B1B261C2327201A231F2329220E201819231F202625 - 1E251F23291F2024261A241F192B0F1928181B2C1F242F1C1C2F20272F201A2A - 2013240F162812222E222F361C021F201D2400464B2C0622004B394A00060861 - 6A75A5AFCD9AA4BB97A2BA97A1BB9BA8C399A7C197A3BD9EA7C09CA5C09BA4BC - 9CA7BE9DA9C1A0A8C0A1ACC2A0AAC1A1AAC39A9FB795A0B897A1B99AA3BC9FA7 - BCA1AAC0A7AEC2ABB2C4ABADC3AAAFC3B0B5C8AAB1C6A3ABBFA8AFC3A4ABBDA1 - A8BAA8AFC1A9AEC1ADB2C5B1B5C5A8ADBDA9AFBEACAEBFADAFBFADB3C3AEB4C4 - B2B5C5B1B7C5A4AAB9B6BAC9B2B1C2B0B0C2AEB3C2ABAFBEAFB0C1B8B5C8B9B6 - C8B7B6C5B6B4C4B4B2C2B3B2C4B1AEBFB1AFC1B1B1C4B5B6C7B2B2C5ACB0C4A7 - ADC0AAB1C3A8B0C3ADB0C3ACB0C2AAAFC2A7AEC0A5AABEA7AFC2A8ADC2A8ACC0 - B0B4C2AFB3C3AEAEC0B4B3C5B0B1C2B2B5C5B3B7C6B6B6C6B9B5C5B4B0C1C5C1 - D0706E7700000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000001509D097FF52476F7F65A36A4E986D5E8F - 634D8C573C8F57447E5B4E85573C7E5C468958438761548B5940845A4C895943 - 845D4B885D4D815E477E5C4A815848845246794C407657467B55467C5347794A - 40704A3C6F4F42715046734E44734C406F483E6D403557302B52313C877A76B9 - C5C6EF84A6F00728620F0C00232012031115001400031600001B0B001F150725 - 1D18291C0E1B07001502031C0E02190B00180900190B021A06001208000C0202 - 1600001904001404061F08001200000F080B1A0B02190300140200130D152511 - 001E001329141A23131B2A1218250F19291E2731280015041622082A2E1B031E - 0B1B3A00392C3B3A254B3D33397D7A7C000406616572A0A6C4969FB497A2BA9B - A6BD9DA8BF96A1B997A2BA9EA8C09CA6BE98A6BD96A8BD8DA4BBA0A7BF9DA8C1 - 95A6B9A9B1C2A9A5B99AA3BA98A3BC99A5BC9AA6BE96A1BB94A2B794A0B5A2A6 - BD9DA5BB9DA5BBA5A8BBA6A9BAAAAFC1B0B2C5ADACC1ABAFC3AAAFC4A8ADC1A9 - AEBFAEB2C4B0B5C6A9B2C1ABB4C3A8ABBCADB3C5ACAFC0B0B0C3B2B0C4B5B3C5 - B9B4C6B5B0C4B7B5C5C0BECFC0BED0B8B6C7B5B5C7B4B0C0C1BDCDC0BCCCC1BE - CEB9B6C7B7B6C5B9B8C8B2B1C2ACABBCAEB1C2B3B0C2BFB7C8B8B3C5B5B5C6B1 - B0C1B3B3C5B1B2C3A9AABCAAADC2AFB2C7B9B5C9ADAEBFB2B3C4B5B7C8BDBDCD - B3B4C5B6B7C8B3B4C5B6B5C5B5B0C2B7B3C5CFC9D97C79860000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000012D5B0FF4B3B696D57987251995C548C644F8A543E87624F7F5F4E87 - 5440845E468A6250835C5C88513D845645885B51835850825E4B7E5E4A7C5047 - 7458487E5A4C80554777514873544977534574534472494073404572484B6F46 - 456E44477046496536324D1E2865616DACDED4DEFFFFFCECEFFF6E7CB5000B27 - 0012000C2E09433D54724C8364436A54395A55385E583E5B513F4F4438443F31 - 434A344A543E4C594551574553563D47574B5F605276664D6E634B665E496262 - 4C655F4B635F496961566C615463564057453D4C36373D3E3746453520082222 - 0D3202241D00002B18082E11031D001F3427543D5B3E4C404D455E6B506E3831 - 47AAA0BD1D00126C707DB5BED8A4A9C0A1A6BF9EA5BEA1A4B9A6A9BDA0A3BA9D - A5B8A0A6BCA7ACC4A9ADC7A9B2CAA1ADC6A6B3CBA5AFC69FABC19BABC3A0ACC5 - A2ADC4A0ABC29DA9C19CA7BF9EACC49CAAC29FABC29CA9BF9AA7BFA3B0C89CA9 - C4A1ADC7A3AEC1ABB5C6A9B0C4ABB2C6AEB5C9B2B5C7B4B6C8B5B7C9B9BACCB9 - B9CAB6BCCFADB5C6AFB4C8ACB3C7A8AFC5A6AFC2A6B0BFAAB2C3ABB3C3A1A7B7 - 9EA0AFA5A4B49FA2B0B8B3C1B6B1C0B0AEBDB6B5C5B9B7C8C0BECFBFBACBC5BF - D0C8C5D4C3C1D0BEBBCAC0B9C8C2BAC8C5BDCCC6BECEC4BDCCC3BECEC5C1CFC1 - C1D0B9B8C6C0BECEBDBBCCBCBBCBBEB9CBB6B2C5B8B6C7BFBCCDBDBBCCBEBBCC - BFBBCEBAB6C9CBC6D97973810000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000060813C197FF46355B65 - 5098705592584284655890543E886754875B44865B478B5F4E8C5F5082604B8A - 5949855E4784574B7B5C4A7E58427B55457A55487653467B55447B5142774D43 - 6F4E45734F44744E4073483F7147406C453E68453F66454460353E4815284932 - 3F81B0B0C8EADAEBA594D6B9B1EEC4C7EE3A40690000001A2023836EA7B387D2 - 9A72AC9269A19266A08D6294895781844870814B6D784D657549606A42575627 - 3F995D76CD8DB3AD78AC735677483C483A2C3B45324747384B45364A483A4E46 - 394C433C4B4436434931455C4E5D5C43596743606E546A583D504A4348381F39 - 00220000000059646E745C84603E686855643C2940B387B1150E0B636A78A3B1 - C997A4BA96A2B99DA5BD9DA2B69FA6B8929CAF8A95A7939CB28189A060667947 - 4B604F5257595B675258675057664E54664552683E4F644C586F555F73586075 - 5460754B596E4F5E72566175626E805F6880626D865C6880526078555F795560 - 79515D7557647D4D596F50607449586D4651674753694B566C485166444E643C - 485F3A496137445A36425835475C2E3B51161D2B0C14260D13281113262B2A34 - 292936282836303347282C4632374D3D46583D455845475C50546A575D705962 - 716164746A6A7970717F7C7B8A7D7D8F9090A1A09DACA6A2B0ABA9B7B8AEBDBA - B1C0BDB4C2B5B5C2ADA8B5B0ADBDB2AEBFAFABBDB2AEC0B4B0C2C8C5D878737E - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000081109BD87FF362A5B6B4D926B508D6B5B9158428A4C - 38836F5E935E448A5D4688614E8A58497F654D845B467B5844785C457D5A4878 - 52437B59437B5848765042765342795140745047725243724C3D714C39704B3E - 6B453B644337623F39593B37492E2B3A00004543428BE0D4E3CFC3EB9296D8D3 - D2F8DBD3FF64688E000000322739AD93D0BCA3E59B88C2977EB89971AE97619A - 9352828D4E73653D571C1B1B001400000D00000000492F3F8E577A7D4868361F - 2E14120D1B1D141F180F201D0D1A151814160C091F00001300000D0000180000 - 190000000013000C061E0B3434446E4C5A7B43659058867E5D5E111312242044 - 7C586F7B4E6945394EB586AE150018676C78AEB5CD9CA5BA99A1B8A1A4BE9CA2 - B89AA6B8919FB398A0B593A1B2141F33242736333444030B1300000804001800 - 000C000000313340616B824D5A6F3A44542E354A161F370B1830020F2800031E - 00031E00001600001800001D000820141C3300031E0000150000160000180000 - 1800041E0C122F00021D00001606091F070C24090E270D1A3012182E282A3F00 - 001918152B4E5360868893464B5800041400001600001300000C00000031394B - 3A3E50353E4E3B43533A43563843563D42553E44543E4857424958424B58474E - 5D606676444A59131423222230262732312F3935334337343E4A4D55968B9680 - 7987817A89827C888A86908D8793A196A3605A63000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000E11 - 0DB27FF446345C7960A06035865E50845B4E8B654F8758518A633E856A528C68 - 4C885B437B5B44766643805E477D5644735E47795A4876574375554074534071 - 5642734E3F7146466D4B3E704B386C493866473E60463C5738324C2C2942332C - 3E292E3C0003465A5293F0EAF6E0DFFACFD7F0EBF3FFD1CDFF726FA10000003A - 2F46B09BE0B49DDD9678B28C67A5885C93814B7A7543666F425C523346220F1F - 1902152919253C3745423A4A40293C53304C633E5C623F595F445A5D38535E3C - 5964445C64465C5C3F5E5B3C635D3E5561405062354B503F4F4B3238533E4326 - 1A19000000544755AD6EAF251C006A484D63376455605185386F4F324AAC92B0 - 19001272737DC3C4D8B1B0C4B7B6CBAFACC1B1B0C5B0B2C5AAACC1C8C5D62F33 - 40565D6BC7C5CFE5DAE2B3ABB22B354200001D09081F03090C0000008D919CB2 - B6CCA1A7BEA1A6BD9AA1B4979EB09199AD8C92A9878DA57F889F717C8E6F7B8D - 7D8795191E2B02000F0E07150B06140B04151106160703123642517E8B9F7881 - 9769798E6C7A8D6A78896E788A8188994F5261001220BDBBC7F9EBEF948E97C7 - BFC998979B00001A03081B0C0D1A06021227263A959BA7878F9B8089938C8897 - 8C8B988B8B988C8E9B838A988A8C9B8C8B9BA8A6B577707803000606001C0003 - 1F00001A03001D03001E00001B000007504F59B0ABBA9C97A59D97A6A5A0ADA3 - 9CA7B4AAB76B656F000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000110706BF8BFF523562665F946243 - 845C45826F5F8D5E4282594D836C4686613E8162487E64487C5843795A47775E - 48765748765C467A5944785542765A3F74524473503B724C3F6D4A476A43396A - 453A5E403A54362F4C2C2E42292C3C2F2A3F2F2E39111A230000397472A3FBF7 - FFEDE9FAE0E1EFEAF5FFDCDEFF7E7DA80000004F455FBDA9F5B095DB9774B192 - 6AA98962998558857A486A6E395B703860743E657242647444667845697B3D66 - 793B6373446871486B6E3F6574426979456D76496B72426A6E376070405F784C - 657344676C45656A396468486663465C6645576F405E543E563B334F78516B00 - 1A000000009D5A775F5E727A4B6F502C48C78FB70B0C0E726F7ABDB5CBACA8B9 - ABA9BBACABBCAEABBAAEABBBC3BDD0887F8D293440E3D7E3DCC7D23E2F3D524F - 5DADA9AE1E1F31000013070B11020203020406BDBBCDA19EB6A2A5BAA0A2B59B - A1B1A1A6B89BA0B5A3AABDA3A2B9AAACBEB6B7C644445000000D0F0F1E0C0B1C - 0606190808120306120C0B14000000323A4A9CA4B88A96AA8B92A88F97AC8393 - A88B96AA1415278C8D97C5B5B4483844CBB7C99A8B98928E9A6C697400000309 - 0B19090916020211767786B1B3C8A0A1B5A1A4BAA0A2B8A5A8BEA0A3B8A7A8BD - A1A3BAB2B1C585839100000003061D0D081D0B061B0D0C19040615060B1A0B09 - 1F0D0E260000085A5D6FBBBBCDA9A8BDA6A9BCA8A8B9B9BBCC6C727D00000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000F041AC797EE4B3C6C633A876D5C866A52896850885D43826648 - 7A65458161407C5F4782654B7B5B4B785B49775B4277573D7C604E7856427757 - 3E775B4B75493F6C493E6B4B3B674D3F643E375739314B362F4429263B232636 - 2A283C1D20260C1A0606081F0C07508B90A7FFFFFFE1E1F9D4D2EDF2F8FEE5E8 - FF7776A0000009685F84CBBDFFAD9BE69E87C7A18CC6977AB893619C8C4F7E80 - 466B7E45687F446D7F4472834871874D7B804B7E794D7F85558A87588B80528B - 89578F8D5F958D64968D62938D60968C6295886095885D938A5A8E905E868356 - 858B527C824A7181527581517C73405F71545F6D40713E2733504860000000AD - 7F93844075D698BD1A09127B737FCDC4D8BCB4C6BFB5C6B9B0C2BCB0C3B7ABC0 - D6C9D93C3A4887969FD5BCC5F5E9F15E5F69282630C6B6BE3C3D4E00000F090B - 110C070C000000878490D3CADEBAB8C9BCBBCDB8B6C9B9B8CABCB8C9BBB9CAB5 - AFC3C7C4D68C89950C090902071208091A0706160E0B1B0E0C1604040F090914 - 0F0D1C000000898D9FBDB9CAACAEBEA9AEBEB3B6C5797C8C353942E1CAD45855 - 5A000000F1ECF284818A000000C1B4BB00000806091A0B0B0F0403131D1D2C68 - 68777C7D8C787B9082869888879C8F8B9F938FA29397A89B9BA827273200000B - 0D0E1D090D19000000685F6A4F505900000E080818090E24060B2911162BA7A1 - B5BFB7CBB5B2C2B4ADBBC5BFD076717E00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000070D19CC87E3 - 423C6673458C6C5982654E7F6138825F4D7E694C7D6847806746805E457C624B - 77634B7B5540735E467A5F467D57426E4F3D6F523E704D3966534570473B6640 - 345640324C372C4730273C2E293622232C13201E000800040606574A6E855EB8 - 3D287B7B808BFDFFF9BABEEE9596CFEFF1F6EBF2FF5A6398000028847CA6D9D1 - FFC8C0F1C5BDE9B2A4E59884D59880C49B76A79C64909B608F9B67959B6E9F9D - 79AFA083BAA98BC2AC91C6A891C7AA98CAAF9BCAAB87BCAF91C5B79CCFB99AD0 - B497CEAF96CCA893C9A88AC7B08FC7A888BAA58EBFA987C1A180B89C76AC9672 - 9E985D88955A878C5881955B7D945E7E55495D691E4D987776EA94CC1A06147D - 737DD2C5DAC0B6C8BAB1C3BFB6C7C4B7C8C5B4C6C8BACB222532DCD0D9472E37 - 969E9FF1EFF2B6ABB5EDDCE686808A0000150B090E0E0E0400000038354C8F87 - 986A6670635B6C5A5164544E5E534E5D514C594C495953515E29273702000F09 - 09190B09190806180B081A070713040311060613060B1C00000D231F369F9BAA - 787687706E836E6B7D32354064626CC3ABB5E1D4DCA39FA4D8D4DB8E89916B67 - 7BC5AFB5191E3002031806080707071103001600000E00001100000900000F02 - 000F0B07110C0913080B0F0F111303000B07081307081208091302030C272426 - 2C2E320603140706160B071B08041F000019756F83C0BACCB0A7B5B0A5B2BFB4 - C4756C7700000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000200F19C587E54B326B7A58875D3C6463437C - 6848836B5182663D79724B8768467D604C786A4C6E563D7959477F5C46725D47 - 735240694E406B4C3E674D3C61503D574C3D4E362B3B2A2C2E222623201B241C - 1D1300110000000023133C784CA3B086D39A85BB2C2555525666F7F9F3D8DDF6 - A7B2D8EEF4FADEE0FC46458311073BB0AAC6FFFFFF9293D70003B16174D4F6FD - FEF9F8FFD0B2D0C47E98BC788EBE8299BE7E96BA7993B97E92BC818FBB788DB7 - 6C85C06C84BD7181C46E84CF6B88D37389D17A8DD2758AD77A8ADD8190DB7E93 - DC7F97D48099CB839EC5819BC786A5C591B4CFACD4AA93C0BA95C1A56292A774 - 989A578EBE6A87575A59500230FFC7EA280318777681C9C3DDB4AEC3B6B1C2B6 - B1C3B5AEBFD2C3D5C7C2D031313EDDCBD7534E59ABA1ABB4A0A7ACA1A7635C63 - 73707706061A0303080E0C0908061800001202030D00001200000D00000F0000 - 0F00001100001100000B00000E0000110906160B081607021503001304021400 - 001202001202001202061500001800001807070900000C00000300000600000E - 7C7484BFB3BCCFC1C5FFE0E8897E84837A82FFEAF9493D454B4D58000012030B - 0D0B081808041F0406190006190D0B180B091807041404031606001406040E06 - 060F0809140708120808130909140B0B1504030D02001408041A07041609071B - 0D041E040B2212112C5A5A71A69FAE98919FB5ABBA69646E0000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000015D29EE54D3855664078704F80674A7F775D84654F7B7A568A6A3F80 - 5F3D7262517660437E5D486B52366D5E397C54446E583F6C533D684838573B3A - 392B3333282730201C1F0C0B0D070B1300180703110035163F744C9AA282CEB1 - A1D4D1D6F6C8C8F5342B5E1E202BD7D8DBFFFFFFF3F9FBEDEFFFA8A8E226245B - 383C64E6E9EEE8ECFE5C6BCE737CD0EFEAF6F4DBE1C6879DC05D73C56279C468 - 7ABD6675BB687CC57285C77587C57389BB6A83C1747FD18895C67A9AB77196AD - 78919E71919F66879A718E86668A825D85845B86906686996984A76F7AAF7090 - BC6C8DBA6176BC5C77DD889FAA616CD2B2D6C5A4BEC38EA7A9809FE57CB03B11 - 1BF6B8F92F0D2367646AB4A8BCA4A0B39B98ABA3A2B3AAA4B57B7C8D4E4A5D32 - 3848D3C5CFFFEDF7CBAEBCB5A5B0A79EA711141980797C09090F0707120B0611 - 110D25070B1503031904031F02021A00021A00021B02031C03021C080B1E0B0D - 1B0B0D1E0B0B1D09091D0F12220E0D1E0D0D1E120F22130F220F11220C122212 - 142914192E12182F151A30292B400002140B0B1F8E7D8D726871151C2CB0A8B4 - AF9EA2C4B1B5887980C7B9C140394200001208081408041B07091B0304130607 - 160B070F0907110706140708160704150909110908120708120B091309091308 - 09120909130708120906190906150907150808190C041C070C24000222000000 - D1D0DEB5B3C0C6C2D273737C0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000080213CD8ED947294E76 - 5188744F7C7555856E4C81755281644677643A776A507B5A4970563C6F5D3D6B - 573E67543D6B50485A43344E4230462F1F36231C1D1A18150D12160F0C16090D - 030000023522446F43888E69B6AC9ED2BBBAE0C5CAF2CDC9FFA08FD42015360F - 1316ACABCDF9F4FFE1E3F8D3D8FF8488C2020048605E84F4F7F9FFFFFFFFFFFD - FDFCFEF1EDF8E4D4E6DDABC1CE809BB36379A4657CB78AA7B690A9B08099C99E - B4CCB2C8B399B6B297ACAA839FA87DA9A18EB79D86AC937695938FA6A5A3B9B3 - A4B99685A1B7AEC5A29DB98777979C80A291809BAC94B4C7A0C97D465DC29BBD - DEBBD7A36480BC7B98CE98B8CCA9D8D57F814F1E3AFFCAFF2A152366636EA8A7 - B79796A7928CA1ADA3B56C667600192F060E20201E38D4C9D38175795C59647A - 7F8BC5B5C1968F9DA798A004020E0800120F1223242639232A3C383D4F393F4F - 3C3F503C3F513A3D4F333D4F333C4D30394B30394D343C4E3C4253343F523A44 - 563942543740533842533842523742533842543B46573F4556444658383D4F3E - 4A5A0000020F0F236D66766E7279524E5E848293787F8778747E0000003C4249 - 3C3A4900001407041402092007091D0906190D0B1C04030F0603130404130404 - 130604130708140708160806140E09160F09150907160606130403110B041308 - 000E08061604021508081506091E0D0E270000076D6D78B5B5C6C2C0D36F7279 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000161213CA82D7472C4D825E9377547D7552826C467B67 - 3E736E56816742766956755B43715B2E6F5B49725C4B704B39531C1E2012040F - 110C00140808140026001100000B000000001C12286A4687805CAA9487C5C6CC - F3CFD1F8ABA1DB9E8ED6B3A1EE9F8DC92F274900001B586187C8D0EEEEEEFFCE - CCF747477E00002CA4A2B3FFFFFFFEFFFEEBEDF1E9F0F3FEFFFFE2D5E3B490B5 - AE6F90C17F92D9C1D2D5DEF6CAC2E2C7A1BEAB8294C5A1B3E6BAD0C496B5AC87 - AECD96B7A388947D797C7B6D77726175716C777A797F545A5DA99FAF6E556D6F - 6D6E826F876B7076807C867A6575D4B4D1874E86C8B0E7CDBBCEC2A5C1935484 - C486A6C56D6F484B71FFDBFF29041B7B717DC5BDD0B1AABCB3A8BDC5B6C73C3E - 4F1622390D0F23131327A59DAA34343F5558658E898F595363DECED7796A7A00 - 0D190E001400021C0B1129585E707278867278867377857678867679876F7886 - 6D7685727B87737D89767D8A767A887A818E79838E79818E7B84907C85917C84 - 917C84927D84917C84927F82908083908487946069780000030B0D1F464653B2 - AEB6D2C2CC81757D4C4F59A8A7B434384D7F7A8303060F0E0E230402120B1125 - 11152B1113290308230E08190B081D0B071A0B061A0C0318070B1D121B29090D - 1E09091C08091C08061A00021609061602031400021302001500001400001300 - 001409092306082000000E585B6FCFC8DD767680000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000E00 - 00DC98F25F4260705487764F84745A846442747151816C43766550815B3F725E - 38676A58850F181D14000000000000000012130C35303E29293C131E2732182A - 3000407350949778C6A49AD2CCCDEFD6D8FFAA9EE0917EC8988ACEADA3E2CCC5 - FFB1A8D6392F4E0000282024546A6E88B2B3E06C6FA0000023474767E8E6EDFF - FFFFE6E6F0F2F4FAFFFFFED9C9D6C4ACC9D2C6ECC1A6D4A96287B16880C2819A - BB7F9DAB819EA2738FB96D83BD7786B084A3DD9DC0CB8CA07A6B787666777568 - 6F726A6B796A727A6576534B5AA598AA857F867B72838D8088676157A1749903 - 1502C3BFC7C97AA3D7D9FF730748A68193F8EEFFEDB2A66F225C877395FFC9F2 - 31092A827783DCCADECFB8C9D1C0D23133451E2E3C242A3E00000E2C32434443 - 53ACA7B8DFD0E094878D08090BB1ABB1363A5307142004000E000219666B7C8C - 909F8083908184927F84937F84927E82917B808D787D8B7F8390818392828591 - 7E83907E84927F83908185938084928084927F83907E828F7F85927F85918282 - 917F818E8184917079850000000C0F20151B279C919EBEB4B93530304C4A4EBF - B8C0C5B9C249444608111E00081508091D00001100091D00061C000007000008 - 00000700000F00000E07041D06061C0F12270606190B081B0404180F0D1D6C34 - 428784886B666A7268736A616C635D676B676F4C47530000150B0C2700002232 - 3444C7C3D37A7882000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000001C0D0EDC9AEE5029577561877148 - 766643786F517F724D775F407662517D4E4075704367352F755E83B800000024 - 1A000000000207004636555C477F4D33666F4889856AAEAEA1D9C4C4ECCACCF7 - B2A7E89686D09C8ED4AC9FE1B2A5E3BCB4E5D4D5FFC0C0ED433E4D00000B3D3C - 8225245B0000300F09591C14578E8CA1FBFBFBFFFFFFFEFDFCFFFFFFEFF5F2D6 - D0DFCAA2C3C596B4CDA7C0E1BACAD3A4B7BD839ED8B5C6FFF9FFF0D5E5B17792 - 9A6783D69AB5E9A3BA846173594A56735A67755F6E6F6073775E727358675F52 - 5FB387A266666E756774746176775C72A299A1433B3DA7A2B3D8A4CFD4B5D19B - 6AA0BA89A1D0D5FFFF96A82A495DA34A89F5CAF92402187A737ED1C2D4C2B8C8 - 8A8795878796B1B1BE51525E00000F070F25333748827A87AE9AA7CBBDC42C2E - 376D6A75222C3F00000D0000155154649597A3838693888A9887889685869584 - 8596848596848692848794878796878795878795878995878895868894878896 - 878795878996878996878996888A978688958787948787968787967579890000 - 000C0D231216292A2A39C5B4C13A3F48777075A198A25857600B131F1F243009 - 0D180000006666785C5C6753505F57505E4044503D3F4B3E3A483B34451E2C36 - 07041B00001408021A06041B02001A001923B53249747C81AC9AA6877B7CB2A7 - AA998E929C949780767C0000120800200E1323A19DA6DDD0E06D6B7300000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000160011DAA1DF593362675475714A76704A7B714E7C6043775F45 - 7C5C457D5B4072602E5B3E3FAAFFFFFF524D610000000013000200025533717A - 4F9F785BA7A29ACBCACDF3C3C4F2ABA1DCA08DD49C8DD4ABA0DCB5AFE6B5AEE8 - B4ABDFBFBBDFD7DEFACFD4FB62617B0000002423455C5EAD5657A11812502F2E - 51CFCFD4FFFFFFFAF9FAFCFAFAFCFFFFDDE6F4C4A1C1BD5E78D59DA4EEE3EEC8 - A7C5A07598AB84A0E1B7C8F9DCEAB18BA8925173BA7C92F6A6C0C5879760565C - 5B505B6C4F5D6A5A625F5C676A5A673E4652454E5B9662764459624444505246 - 553C5B567C6E7E2025377B898DFFDBF8AF5D9675505AC088BDFBE6FFC387A059 - 4368995C84FCD4FF2E09207A7480CDC1D4A9A0AF9E94A3AB9EAEBBABB8777282 - 0000190402153235443134464848578480895655621C24351F1D32000007242E - 439293A1898A9887879687889584849186839387859586859583829084859287 - 869385859184859184859283859283849181839081829080828F828491828491 - 85859187879480818E8483908F8F9F85879800000408031E1D23351C222C241E - 31646676706E7D504E590D0B1928394B07072000000C060618F9EFFFC9C0CDC5 - B8C5B8A7B8B5A5B1B5A6B5786B71B8A1ACC8B6C1726B7816152400061B00001B - 00001900091C51182E72697660556163576871606B65565E72686F4F46510003 - 1A060B1A7D707AB4AAB5D5CCDC7D747E00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000001B0E1AD38DCD - 4B3155734C7E724C6D714F79673E7A684C7C5E3B7A744D7D96608D994F83263B - A9FFFFFF8E93C2000000140D18B886F06C559E9C96C5D2DAF9D4CFFDA598DB96 - 83CFA991D4B1A5DFB8B3E9BCB5EDB7B8E7C2C6E6DBDAEBDADEEED4D8F9DFDFFF - A0A1BF151A1F04000031253D0E09380C0D259D9DA3FFFFFFFEFAFEF7F2F9FFFF - FFF6F8F9C5C1D6C7ACCDDCBAD1CFB4D2C49EC8AF7090B3677BBA8597B2839BA5 - 5D76AE5C70D691A1DD92A7BB718AB7758DCF899ED48FA0CA8C9CD190A0D195A8 - D593A4C7939DC88C95D7879ABB8C97C88894C58794C08D98CF8E9EA28783D697 - ADBA5A7EBFC0E8C87F8EAA4668FFB39D6F4278A588BF6D4D75EDBFFF1F0D207B - 727ED2C5D7B1A2B3A79BA8AB9BACB0A2B2A197A714132402071F090B1E303244 - 2E334623253823293929293D090218000008777D8B928F9D8A88968C8B998F8E - 9D8E8D9C938D9B948E9C948E9C95909E9993A19993A19794A29996A39C99A59D - 9BA7A19CA9A19AA7A29EABA8A0AEA8A0AEA8A1AEADA5B0B0A3B0AEA4B2ABA3B2 - BBB1BEC5BCC600000806022502021C2324392B30431D22371B1F321B26352E35 - 4809182803001A0000079491A1DECAD9C8BDC8C5B8C3B1A1AEAC96A3B29DA940 - 3E473B424DAD9EA9A4969F8D8489666169504D5A4C485740444F3C4252343740 - 3C3744373443342F3B33333D31354031304020263966697589797FAC9CAAD4C6 - D677717B00000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000001B1113C288BC563054835587754A72655175 - 673A7774447A8163909A6091B47A9FA0498B376FB9FFFFFF929ED8000000764F - AFDAD0FFC0C9DED4D6FFAB99E18A76BF9D88CFABA1E1B6B4E7B5B5E8B6B5E6C9 - D0EAE2E6F3E9ECFAD4D9F4C0C5EEC0C5EFDEE4FFE7EEFC74738D000000000000 - 04040E838196FFFDFFFDF8FDF4EDF6F9F4FAFFFCFFF3F3F7C7BBD8AC7FAC8F46 - 6CA14F6DBD75859F616D8B5367985A6FAB566BCB6980E191A6CF879AC76F7CC7 - 6978BF6A84BF6B88BD6E88B96886B86983BF7286BD7B8FBB7A93C57A95BA718A - C58093C18092CD809CC48293C27799D2818DB57FAADE949A871227FFE9FFB898 - AEFFB4C54F356D9885AD463B6DF2CDFF090C1D686470B8AEC0B5A9B8AE9FB1A6 - 98AAAA9DABBEB1BE333544000011040D2500061E0F14291C20350E1E2F02091E - 00000081808DE0CFDBD4C5D0D6C7D2DBCBD5E1CDDBE1CFDCE1D1DCE5D4E0E7D6 - E1E6D4E0E5D6E1EAD5E1EBD6E1EAD5E1ECD6E2EDD7E1ECD8E4EADAE5EDDBE5ED - DDE6EBDCE6EBDCE6EDD7E4EED6E4EDD5E1E5D3DFD4C5D2E9DEE343404A000003 - 09092503021F0F152E22293C2B37481D2B3C0214280E081E00000058626FF9F3 - FCE7D5DEE3CAD2DBBAC4C6A4AFBE9099BC979FB58C95A5808AC2909DBC919BB9 - 939BBD97A1C6A0A8B08E98B3919BB591A1B5949BB08B97B18C97AE8B94B39099 - B18C959F8A909D8A8EAD8E997B646D9D8E9BDBCCDE7F79840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000070E00ED93E0623E5B7C4681664A77765478875786875C8E95618DA26D95 - AA75977B1973749FD5FFFFFFB5BBDE000000FFFFFFD8E1FEA699E09587CE9488 - CCAB98DBB1A6E5BBB5E6BFBEE6CCD1ECEAF0F8E9EBF4D4D6F4C3CEF2B8BBEEBA - B8ECC3C7F0CAD5F7EFF8FFF4F5F377748C2F2B52ABA9BAFFFCFFF5E2F5E8D9EC - F6F0F8F2ECF6F5EEFCF8EFFFCAA3C09245668D4054A26570BB707CCE6F7FD372 - 85D57487DA8093DA899ECF7C8FC5697CC86B7CCD7082CD7182CB6C7ECD6C83CD - 6982CB6E7BCD6F81D1697CBE627DC1687BCA6B7ECF6E84C86F81C76C7DCE6E80 - C66F7FCA7281DA93A6C5668BE8877A884B6FFFEFFFAC869F775088888DA65749 - 77E1E9FF00061C6B6973B0A6B9AEA5B3FEFAF9F8EEF0F3E4EEE7D8E2C6BFC809 - 0E2600061B00092003091F00081F000019000C1E797789FFEEFAE9D4E0EADCE5 - F4E2ECF4E4EEF2E5EEF3E5F0F3E7F0F2E6EFF3E6EFF8E9F3F4E6F0F3E6EFF2E6 - F0F3E6EFF2E7EFF4EAF0F8EBF2F9E8F0F9E9F2F9E8F1F8E9F1F5E7F0F1E8F3F3 - E5F1EFE7F1F2E6EEF3E4EEEEDFE5D3CCD2060C2000001500001C000019000018 - 00001200001A00001A02081C6C7881F2EDF3EDE0E8E9D6DDE1D0D2C8B3B5B093 - 98AE8D90A58C90AC8B8DB5969996858A8B7378A78A8D9B7E848D727C97888C85 - 777A83727882787895888C877D7F86797A8E7C7F937B80BF8A91CB8C94CA8C95 - EFB7C3CEBBC5CBC2D1716D770000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000D0E02FFA0F94D2B5072 - 5278845584895885875686925F919D65929E6C98AC6E9677125A6F98D2FFFFFF - A6B5D4000000FFFFFF9186D99782CBAEA5E1B3AAE3A3A0E1B9BDE7DFE1F4ECED - F7E8ECF9D4D7F0C7CAF0BABDF0B4B5ECB9BBE7C2C5EDC9D2F6CDD8F7DBE3F4F1 - F7F8FEFFFEFFFFFFF9EFF9E8D4E9E7D7E7F3ECF5F3EFFBEDE6F9E4D3E8D8A4BB - CE7C91CA8596CF92A5D98599D97687D37888D47E91D58294D17F90CE7386CC6C - 80CE7082CF7687CD7687CD7687CB7484CE7387D07387CE7885D57889CB677CC4 - 879FCD8899D07887D18193D27D93D78094D27F8FE08A9AD0A1AECD7C96C17D88 - F2AEC2F06065A05F7F5281AA6F74A0568A9B534F8095EDFF00021E6A646DAAA0 - B0887F86AC9ABAD0BBCBD3C1C8D9CAD5F8E7F1D2C7D368727D3E46583542573C - 4D61666773B5AEBCF9E8F4F0E1EBF7EAF4F7EBF7F9EAF7FAECF7F9EBF5F8E9F4 - F6E6F3F1E2EEF5E5F1F3E4F0F1E4F0F4E2EEF3E0EEF5E1EEF1E1EBF1E1EAEEE0 - E7E9DDE6E9DEE5ECDEE6EADDE5E4D7E1E7D7E1E6D7E1DFD2DCE6DAE4E9DBE6F9 - EBF6FAEEF8B9B5BC444652161F330D182B121C301F293C303C4C515F69AAABB7 - FFFFFFFFF7FBFFF2FAF9F0F9C7C2D2C5B4C0CDB6C57E6A77625864342A397E71 - 8268666E03091C322F3C5C4C5AA69BA4605F643E3A4047454B494B50968B9248 - 484F463D425A4E54A1929E998C948D828787777AB4ADBCB6A7BACEBCCD766E79 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000C110EE98BE0523258886A868C5986794873865F8A91 - 66909A64959C6592AE6A9397357B004A7CFFFFFF7F8EC7000029FEE1FF9EA0DF - B6AFE7ADA5E1B4B3DAE1E7F6F3F9FBE2E8F7D3DBF6C3C6EEB7BCF0B9BAEEBEBC - EEBBC0EFBFC2EEC8CEF1D1DAF9D4DEF8E0E7F5F6F9FAFFFFFBFAF5F7EEE1F0EA - DFEFF2EAF7F1EDFBE9DDF3DEB6CBCF869ACB7689D48D9CD997A5D97E93D37288 - D08490D48897CF7B91CE7489D37687D17786D07887D2798BD2798AD07A8AD27D - 8BD07A8BD47C8DD47B8DD48091D7778DD4798BCB94ADD594AAD48193D6899CD8 - 8D9EDA8A9BDF9CACD2A4B5C77F98DE929CF892A9E5797E57789F6477A83580A3 - 5E819F268BA21F437A7AF4FF11091466626BA197ACB0A5893831D79387DFFAED - E7F9EFFDF9F3FDFFF8FFFBF2F9E9E1EAE5DDE5EAE3ECF2E3EAFFF4FAF8ECF5F9 - EDF7FAEFF9FCF1FCF5E7F3EADAE5E4D5E0DFD2DCDDCED9DECDD9DCCCDAD7C8D4 - D6C7D4D7C6D3D8C8D4D6C5D2D4C5D0D4C4CFD2C4CED0C3CED0C2CCD3C2CED1C0 - CDD0C1CDD1C3CDCFC1CBD3C4CDD9C8D4D8C8D4E1D3DDFAF0F9FCF4FAE9E5ECC0 - BEC8B0B5B9B5BABFC6CACFDCDFE1EFF2F1FFFFFFFAF2F9F9ECF8FFFCFEC5C3CC - 9793B2C5B8C8C5B6C46A676D59555E201622838293A197952B2B380307127D67 - 71BEAFB53A3E3E635C60766B71534E53A190966461676865665F6265AA95A1AB - 9DA3AA929BAF9397AEA2AFAFA4B4C5B7C8716A75000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000C00 - 12CFA1D06435588F59877448748D61898E5E8D9563868D5B8E996491AA5D80BA - 95E500001DFFFFFF8C91BE130064FFFFFF958ED4B4B2E1DBE0F2F9FFFCE5E8F9 - CBCEF2BCC5EEB8BBEBB8BAECBABBEEBDC2EEBFC6EFC3C7F0C6CCF2CBD3F7D3DD - F7DFE9F2F2F8F7FCFEFAFAF8F9F9F2F9F8F0FAF1EFFDEBE5F7E2C1D8D592A6CF - 798AD48294D78D9FD28594D17D8CD08392D08796D27D91CF7286CE7586CF7889 - D27A8CD57B8FD47C8ED47E8ED47D90D67C8ED48091D48595D48394D38591D985 - 98D78C99DB8A99D3899BD38797D98CA1D68F9EE19AA8E4AFC0D2ACBAD88D96FB - 96ABD78FA59C6B950074A44A899E427EA3557596457DA3357BA136547185E6FF - 181414665E66A399ACA1978E4B3AC8B9B8FDFFFCF6FDEFFEF9EFF9FBF2FDFFF5 - FEFFFAFFFEF8FFFCF4FCF5F1F9F9F2FBFDF2FAF9F5F9FFF6FCEFE0EBD6C5D1CE - BECACEC0CBCFC1CCCAC0CBCCC3CECABFCBCDBCC9CDBDCAD3C3D0D0C3CDD3C3CF - D0C3CFD2C5D1D3C4D0D5C5D3D7C8D5DBC8D4DAC9D4DAC6D4DEC7D5DEC8D6E2CC - D7E7D6E1E3D4DEF2E3F0F2E4F0FBF0FAFFF7FEFFFCFFFFFDFFFFFDFFFFFCFFFF - FAFFFBF5F9F6EEF5F5EEF2F9F2F9FDF6FDE1DCE3A4A6B99890A1927781514749 - 4F3E444533395D51549E787F46313691767BD7A8B0BF9EA20B120F3B47461B38 - 3957575AC9A0A648484643464D33353EBC97A5BE9EA6AF8A8FC9A2ADA69DAAAD - A3B4C5B7C6736A74000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000190013D89BCD623D6481578D924F - 7D996E99985D8E996593A66D969D5C86BA689CA3A4F7000000FFFFFFA9A3CE3A - 2393F9F5FFDBDFEBF9FEFDDEE6F3C3C8F2B7BEEFB8BBEEB9BAEBBCBDEABCBCEE - BFC4EEC4CBF0C6CAF3C8CFF5C9D4F4D4DBF2EEF1F6FEFFFAFFFDF9FAF5F9F6F0 - F9F4EEFDEEE6F9E0C7DDD799AFD28093D08592D48996D48597D5869AD4879BD1 - 8395CD7A8BCB7588D0768CD67D90D58091D37C8ED37C8DD57F90D68193D68696 - D88696D78695D68796D58897D68997D98C9ADD91A2DC94A5D48F9CDC90A1DA97 - A3D89DA6E1ABBAE5B6CED6A4BAE28FAADB86A340869F1983AB2083A43472A55D - 7F97337F9D4B76A24A7D9C5093AC31566F7EE5FF0608136A5F6BA9A0B3989687 - A28BE0C7C5FBFFFFFDFAEEFBFAF1F9EFF1F2EDEAEEF5F1F6FFFBFFF9F3F9FEFD - FFFFFBFFFEFFFFFFFAFFF1DEE9DAC8D4E0CDD9E1D0DCE0CCD8DFCCD8DFCBD8E1 - CCD8E0CBD7E1CFDAE0D0DCE3D2DFDDC8D5DFCCD8DCCCD8E0CFDCDDCDD9DECEDA - DBCCD6D6CBD5D5CAD4D2C6D1CEC2CECBC1CBCEC1CCC9C3CCCAC3CDCCC2CAD9D0 - D7FAF4FBFBF8FBFCF7FAFAF3F9F9F4F9F9F2F8F8F0F8F9F1F8FAF5F9FFFDFFFC - FBFFFBF6FAFDF9FDFAE8EDE6BFC4E1AAB0ECB4BDEDB7BEEEB9C1E7B0B9D8AAB1 - F4BCC5E6AEB6CA919BD39AA3D9A0ABCE909BC5929BE098A3C58D95B88A92B480 - 89C89197DE97A0D89194D9949DB899A4A399A6AB9FAEB6A9BA6F667000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000EA9FE067305E7C4C78AB76A6A26794A56997A05F93A76C - 94AD6B8AAF68A0B1B8FF000000253288868ED6ECE8F5FFFFFFCCD3EDC2C0EFB7 - BAF1B1B9EEBBB9EEBFBEEFC0C4EEC0C6F0C4C9F1C5CAF2C8CEF0CED7F4DEE6F9 - EEF3F9F9FAF9FFFEFBFBF8FAF9F2FAF7F2FDEAE2F5DEC5DDD8A1B5D47F92D07D - 90D3879AD9879CD8879BD38599CF7E94CE778CD1788CD57D91D68094D78596D7 - 8799D78799D68799D88A9BD98A9ADA8A9ADA8E9ED88F9EDB909DDC919FD993A1 - DB96A2E096A5DE9FADDB99A7D6A0B1E1ADBFEBBACDE8B4C5D994ADB88AAA997D - A3537CA3007BA14B7FAE4D84A944839A587FA9207B9E5E82A8558AA42B739237 - 77A633526953CBFF1207006A5F69AFA1B49E9197AF9DC4F2F3FFFFFDFFFDF3FF - FDF3FCF0E5EFF2E7F1ECE5ECF1EFF1F1EDF1EEEBEDE8E5E7E1DBE3D9C6D4D2C1 - CED5C7D4D4C5D3D2C4D0D6C5D2D4C4D0D0C5D1D0C5CFCDC1CDCBC3CEBEB3BEB0 - A9B4A8A1ADC5BFC9D1C7D1D4C7D3D4CAD4D4CAD4D8CED9D9CFDAD9D0DAD8CDD7 - D9CAD6D5C7D3E4D6E1E5DDE6E7E0E8F3ECF1FAF6FAFBF7FBFBFBFBF9F9FAFCF7 - FCFEFCFFFFFDFFFEFEFFFCF9FEF7F4F5EDE3E8E4D5DADAC1C5C79CA4C38E96C0 - 8892BD8893BF8B90BD8A90BA8B90C08C92C49197C6929ACB8F97CC929CCD949D - C89099CD949CC5989CBB878CD4919DDC939FE69DA1E8A4A8E4A8AFD9A3AFC4A2 - AFA49EAAA59AA7A599A9B8AABB6D646F00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000070F00E48EDD - 68254EA17199A777A1AB709FA2638EA8759CAA6895A15A789F76BECEDDFF0000 - 00000050817CC9FFFFFFB0B3E9A6A7EBBBC0EEBABBECBAB9EEBEBFF0C1C5EFC3 - C8F1BEC5EFC3C9F0D5DBF6E8ECF9F6FAF9FFFFF9FEFCF9F9F9F9F9F8FCF3F4FF - EDE8FBE5CBE1D5A0B8CD899CD28A96D78A9AD5879AD68596D58395D38294D481 - 94D48194D58294D88495D88696D78795DA8C99DC8F9ED9909DD98E9ADC8E9EDB - 929FDC909DDE8D9FDD93A0DD99A4DE9AA8DD9BADDB9FB2D7A4B7DAA9BBE7C7D5 - F9D0E1EAADC2CA8EA6AB6C9465749B487CA01885A24585A74881A55A85A5457B - A33F759A36779B306F993971953D69982A697F236B9011507568D0FF190C0870 - 636EBAA8BAA293A4AD9EA8EAE2E6DED4DCDDD6DFDCD4DDD3CAD4DDD4DED4CAD4 - D8CFD8D6CDD5DFD0DBD3C7D1B0A6B3A39AA5DED2DEDED1DEDED1E0E0D4E1E2D7 - E1E4D7E2E9DCE6EDDFE9EEE1ECEEE1EDECE0E8B9B0B7E1D6E0F9F2FAFBF0FAFC - F3FBFEF5FDFFFAFFFFFDFFFFFFFFFFFFFFFFFFFFF0DAE5EDD8E2FFF5FBFEF9FC - F7F1F6FAFFFFFCFFFFFFFFFFFFFFFFFEFFFFFAF8FCF0EBEDE7DADEE5CED3D8BF - C5D7A8B2D099A2CB919BC68B94CE8A95CE929CC9929BC7919BC9939DCE919DD4 - 919BD8949CDA919AD6939BD8929CD7929AD48D96D58F98E0959BE5999EECA0A3 - F5A3AAEAA5B0D4A8AEC3A4ACB09EAAA99BADA89CACA59DADA196A5A397A7B5A8 - B76A646E00000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000F0000D58DCA935887C395C4AE748B9E6091 - AE7B9DAA7295AA75A3A35E798367C7FFFFFF14130B000000E1DCFAFFFFFF8487 - E1C5C9EEBCBCEEBBBEEFC0C4EDBFC5F0C5CCF7C5C9F6D4D9F3F5F8F9FFFFFBFE - FEFAFDFFFAFEFEFFE8E6FBD1CAEDE2D3E7EDCCDCDBA6BBCF8EA2CD8597D58797 - D6899CD4869AD58497D98798DD8D9CDD91A1E096A5E39BA8E19DACE2A1B1E2A4 - B3E1A4B5E3A6B7E3AAB7E2ADB8E6B0BEE8B0C3E4B4C5E2B9CAE3BBCEE5C0D1E4 - C6D6E6CCE1E7CCDFE6CBDFEBD4EDF8E6F9F3ACC8AA628D6C628A3E769B1A86A7 - 3885A74A82A13B789F2B719B4478A1266A8E2F6F9A2E6C8C1560863B72922C69 - 842F79A11D72965484AA454C6D4AD2FF130D0F70626EB7A3B59D90A1A89CADFF - FEFEF8F4F8F8F6F8F9F7F9F0EAF3E5DFE9EEE2EDFEF1FCF9E9F6FFFAFFFFFCFF - E8E4EBF9F2F9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFCF7FAF8F1F5EFE9ECE1DCE1CBCBD2C0 - C3C6B5B8BC9F9FA64B4758656172DCD6DCFFFEFFF7F3F8FBEFF3F5DCE2E2CFD4 - DBBEC3D5B3B9D9A6AFD49BA6D49BA6CC959DD4929ED499A1DBA0A7DFA1A8E5A5 - ACD4969DD3979FD998A1DC969FE2949FE196A1E29AA4E09DA4E0A1A6DE9CA2E1 - A0A6E9A7ADF5B4B8F8AFB6F4B2B7E6B2B9D6AAB7AB97A19D96A59F92A49F92A3 - 9E91A3A89BABA69BACA7A0AFAAA0AFA49BAABAACBD6C66700000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000FFB1FF976482995D89A76697A46B889D5F96A86B97AE7696720963 - CED1F6FFFFFF8A80E41A1200FFFFFFC7CCFC9FA1E0CACDF1BFBEEEC1C5F0CAD1 - F7D4D8F9DAE0EDF2F1F3FFFFFFFFFFFFFFFFFFFFFFFFFDFBFEC6BCE38975BDB2 - 95C5DAB9D3D59AABC67A8BCC7A94DA849CDC889DDE90A1DF95A1DF94A1DA8999 - D48191D17C8ECB778CC8768BC9758ACB7387CB7288CC778FCE7F93D08396D182 - 98CF7D95C97E92C6798EC7728CC67A92C78799B86F85AE6282C382A1B9788FD5 - 7886A14C7A184E810E76A21875A41F6F9B5379AD3875A63C729C196FA1326A97 - 3E709E356FA81D6B99396E9B3E749D27749B3D73A62B6AA11A6F95457EA2253C - 7278DFFF0007196B636DB7A4B6A192A1938A98FFFFFFFBF2FAFAF1FCFCF3FDF4 - F2F4F1EDF0E8E4E8E4DEE3E1D9E0DBD3D8DDD8DBDBD7D7D1CBCECBC6CCC5BFC3 - BEB8BDBDB7BAB7ADB2AFA6A9A8A1A4A1999C928A8C6360695C5A616862656C66 - 686A6465625F58625F595C5C536864669D91A3736D7F847D8D6F667600000B00 - 0000595964FFFFFFFBE7EEE8BBC4C3969FC89BA3C796A1C996A1CC99A1D49CA3 - D59B9FD99CA5DE9CA2C79698B48788A77C7FAE7E84CA949BE7ACB3EAAFB5EAA5 - ADE8B0B4E2B5B4D0A1A1C6979CC999A1E6B5BFE4B5BCD8A9B6C5A0ACB09CA4A5 - 95A19C91A18B88989A90A29D93A39D92A2A29AA99E97A4A69CABA89FAEA69DAC - A89EADAEA0AFBAAEBC6F67710000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000020611FFB1FF643F4A94 - 5D8C8E5D818F57789F679FA269A08A5D786A1E54B5AECBB6B8FF9881DFFFFFFF - F6FCFCB2ADE4C5C4F2BEBEEECDD2F2DEE3F8F7FFFEFDFBF9C5B5D0BAA4CCFFFF - FFF4F3F1CEC5CBC5BBCAA794B76E4B8F8871B0E3E5FFF1D8F0B66C7F69253263 - 3445854C5888545E8A56628650587C464D7B3F497A39467B38487E3E4A773E42 - 703D497540627236536B343B70464B78545A775255673D4552262E4F201E5E29 - 3272333D85565C6D3C5099475DB16F855F48556F1622425F8B118CC23378A946 - 6CA5366FA81E79A7276DA14674A73974B0336DA2356AA24774B1356DA131679B - 507CAC1E6BA13273A34A70A02A70A1427EAE2F4F7966C9FF000D1E68616AAFA1 - B29E91A18C8492ECE6EDFFFDFFFFFDFFD4CBD382797EA2999C8E87878F898980 - 79775A56635E59647A7477878483868182706B6C837B7E8881838E83868A7F83 - 8885858B8989807B7E4A4C5C4042526F73718184808386838B88858986837F7F - 788C8E8FFFF9FFDCB4BCDAB1B9E3B7BFA1848E4B4454888C96FFFFFFD7BFC56A - 5B5D332E2C372E323028302A262F35333F3D3037523E406F585C7B5D638C6869 - 8E6A6D8B6A6C8363657A5A5B826064805F6494676C916A6D8D686B9964669A73 - 779C909AA694A3A0909F9B8F9F998EA0908D9B968EA09A8EA19E91A1A092A39C - 91A1A195A6A196A6A397A8A398A9A497A8A59CABA69DACA397A8B0A5B66A646E - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000080D14E292C0563C3D7E4480814A67865E739249A184 - 4C4C50355AA77FB89775BA767DE1E9D8F6EEEAEEC5CEF2B5B0EECDDBEDF2EEFB - F4F9F9FAFEFBFDFFF9FDFDFAE4E1F6EEE1F9F8F1F5615189130040673869784D - 83A1648EB87787D4B0C6F1C4E2984D5D11000000030006080406040604000200 - 0000090B0D26282E1D221F090802180E0D0F0C06000007201C3F342C4E2A191E - 290E0F2913242B1D2A3C2F2C451F2850193266364E64526455485B9E5C7AF38C - A83E363F653B37D13A46475F931484BA337FAC3474AA2971AA2972A63974AA43 - 70AB3375AE2E71AB4C78AA3770A10D699B4871A1336A98257195556FAA377EA5 - 2B7FB54080B633618272D4FF00041169616BA8A0B19D94A4938A9CADA5B3FAFA - FBFFFFFFB5B0B5756A71B7A9A7B6ABA5B1A9A2B7ADA467677864636F756E7997 - 8E958F8989827B7D8D87898E878893878A92888B8E8A8A8C898A8B87886A616C - 665D697F7C7C7B7A777876747A78737876726F6B68898C8EE4DBDEDDB1B8D5AE - B5E1BFC4C8B4BA80788CE9EDEFEBD1D2523F403E34354D3A3F473A3B4A38384E - 3D3E5A53595F565A6E626393897F7E726B6C5456765F607C686678645F886D6A - 9A867F91807888655FA06B69B46666AD6B6EC794A19990A49A8D9F9A91A19B91 - A1998F9D928F9B9991A1988E9F9A91A19890A09F90A19F93A4A195A7A196A59E - 92A3A093A4A69AABA199A89C98A8B1AABA686670000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 06C588A1502A435B4254834E72703D74573E376D3860B29DE08B78A960357893 - 93E6E7E2FFC2ABE7D5E9F4E1E5EAF5E2F2FFFFFFF7FCF7FBF9FBFFF9FDF7EBF6 - E9DBECD9CADFD9DAE8DFCFE8C06F94B85676C27787B13F55A81F46D49DBEEABC - D36E24320000000B1E192F18242C0E1D29161E2715192C181E34233034253129 - 19202718182E231D2C141D230011260D16381D224422284C293B502E44572B37 - 7040507D5E7672697C5D54678F5E7BE693B16C4F515D313BE46379FF8191487E - AB0073AE297AAD3684B22684B2397FB24280B12B71A92876A63976A934739F3E - 769F3A71A13C7A9A4C7CAA2A71AB458BA82875AB5583B0066FA73D547565D9FF - 200F1669616BB2A4B69F95A49B92A19A8B9EC3BBC5FFFFFFCBC8CC6B626E9D93 - 909B8D909F9395A397908C8A8979728350515DB8B0B6A79F9E948A8D90878F99 - 8E8E95908F9891908E898A8780838781826969737A7C877E7878837B7A8F8887 - 9F9792A7A3A3C5C1C2CBC5C4C0B7BAB9B5B9B7B8B8E0D8D4B2A5A8AFB0BAFFFF - FF53394032242554454538383F4A3F465645455D484C513F40736D6C857B817E - 6D6C86776776615F8A74728F78749B847EB9A397AA958796716BBB7F7FB96762 - 7A666CA993A6A491A2958D9A968D9E998E9F9A8F9E988E9C988F9D988A9A998A - 9BA293A39B8F9FA092A39F94A2988F9E9A91A19E96A5A49AA9A298A7A39AA6A7 - 99A7B1A3B56C606B000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000070213BC819D542A466145549C5F - 804A15306E5468BFA0E0A788CC6860872E0022A193F6E5E8FFE9F2EEFFFFFFDD - D5E79582ADFFFFFFF9EEF9F3E1F1E5D2E4E0CCE1D9D9E2D9DFE7DCE6E8F1E6EB - CC7C93BD5974CB7F8DCD9FA7D9D5E2EFDAF3CD7A96440009000000161A162F16 - 222A131E29161B2813162A1522311F302F1F2928141C281519281B14280F112A - 0D1B2C1C28382430422029441D274E263F583D5862536D645F7857556D805874 - D28AA4AF5E616F3E4B526A95507CB21878AD167DB03981B7347BB33180B23182 - B61674A61F73A53C7EA94276AA3974A32F6D9C35709D4273A33D799D3C76A13C - 7DB5237CA94D7BA818689C397EA33552676AC9FF030C0B6B636DB0A2B49991A0 - A098A7A696A8968796C8BFC7FFFFFF928E929F939CC0B3B3BCB2B0C1B4B6C3BF - BF988D9A938D9F8B8790E8D8DDB5A7AFB7AEBBC9BDC2CBBFC4D1C4CAC9BEC5C0 - B6BDCABDC59594A988889DC6BFC3D3CACCD0C6C9C6BFC1BAB4B3D3C8C5AAA0A1 - 9792969A9096938C8CC5B5B4ACABB0FFFFFF8E686B0000003F313C42353C4543 - 4454464A5243454F393E523F3E928875988C7C8D80758F7D7BA39382AA9586B0 - 9B8FB5A197A07E79926462B5797199555D716F819A94A4958C9B96909D998D9B - 968B9B988D9F9A8F9F958D9A998F9E988D9D968A9C958B99948D9D968F9F9990 - A09F94A39E95A39D98A7A397A9A59AA8A096A59A8D9CACA1B26C626D00000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000D0C0EBA7C97672F5B87566F915D7A380700C69CE7B59AD78C73 - A03F304E3B00169479D4FFFFFFFAFFF8FFFDF9F8F4F9EADEF1FDF2F9D6CBDFE0 - D8E8E9E4EBF8F8F6FBFFFFE4EAF2D4D0DBF7F6F2FFFEFFF0ECF3F2EEF6F0F4FB - F5FEFFF2D2EAB5506B3000000004001F18152B1416240D0D200F091C0F0C180F - 0F1B1216361D313F2334200C0F1A0B1E36184C3F1B4B37222F3B28273D161F40 - 192C57455C67597560587650566B755573CD84A6C0666C7B474E456C993171B0 - 2E6A9F366EA2277BB01E7EB4327EB52873AD3777AF3B7DAD2A70A33C76A72C73 - A33968A144709F3A719D27649439689E2A6695325E8746678C3C6A8F34748A4F - 7E9A3B526C42C4FF1E141666626CB1A3B5A096A5A196A5A296A6A797A89E8C9C - D2C7D1FFFFFF9B959DCCC4C5DED2D0D2C5C7D3C6C7AFAAB1978B9E8E8897B5AB - B1BBB2B4ACA5A8C5BAB6BEB2B1BAAFAEB8ADADB4A8A8B5AAA98F8694746C7FA4 - 9B9EAFA2A6B0A3A8A79EA0B8ACA9D0C1BFB7ABAEAFA9ABB2A9AAB3A7A3A29B9D - E6E1E6C3A4AC1815195B4E4D514445352C35453B3B4437394F40425342457563 - 5FA08E8397877C9A8B81A18D83A59185AD998CAF93889A746C9B625FAC706F91 - 64658779909D99A898909C978C99978A99978C9B968C9B998E9F998E9D9D91A0 - 958B9998909F968E9E958E9D97909F9F97A79B93A29F97A6A098A6A097A7A094 - A49E92A198919E9E91A1B4A7B6695F6A00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000001C0712EA9BBA - 945B7EA355824C2330653456B6A2E7A791B24D2B69513B4056223D1A0046FFFF - FFFFFFFFFFF9FFF8EDF8C5BCC7BABBCBFFFFFFEDEAEEFFFFFFF9FBFBFFFFFEE7 - E4F2C3BED3E6E1E3FFFFFFEEE9F6EAE3F3E5DDEEF0E4F9E9B7D597394F150000 - 0011071F110E1A00001F0C00200712200F261E1D131D140D29122F2B1A1E1B13 - 002C1B45492A7947275F3E273A3B26243912184C293D62536B615B7653536C6F - 5775C17E97C46264894E5E377AAD1383C33771AC3B6C9D3A69A23377AB296DA4 - 3D75A9357FAE237BB53480AF377DA9407AA72B77A34374A63A73A6286E9D3E69 - 971D678D487F9E34607B436580295B81535F7B3D5D8B1B5C616FB3FF1D132B69 - 626BB6A2B5A398A6A397A7A196A6A495A6A594A7998799CDC8CEF8F8F9A3A0A3 - BCB2B5E5D2D2D4C8C8D4CACCAB9FAA91889CA496A2CCC3C5AAA1A6CFC1C0C3B6 - B7C5B8B8C3B6B7C5B8BBBDB0AF9E94A17E7788B3AEAEBDB4B5C5B9BBD6CBC8DC - CCCBDECDCCC8BBBABFB3B4CDBFC3B1A8AAC7C6CEDFC3C9473B3B867C7191867A - 695C582C1F225443455C474F664F5265494F907B779B8A7F9F8D7DA48E84AE98 - 8DB49D93A18178996963A45D5DA065618C6C75998C9F9A909E958B9894899894 - 8B9A958A9A928899978D9A968F9C978D9A9A8C9D92889897909F9A93A3948E9C - 9B92A09E95A29C93A4A29AAB9F96A6A295A69D93A29E93A1998E9D9E92A0B6A5 - B46E5F6C00000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000001B0D1BFFB1D587557AAC77995A081E92566F - AF9FF1B383BE3022286B3B3E705A75400018593D87FFFFFFF5EFF7FFFFFFD4D4 - DB818AA2FFFFFFE1DCE3FFFFFFF7F0F4FBF9FCEAE9F5C7BFD6D8CDDCFCF9FFE9 - DFF1E3D4E9E6D3EAECDDF2E1A6C382293C0300000007002F2920544759624D6C - 4D39582F1F3A1A11081A13040E16290B1924231A163B244E482E7B4731684434 - 4A351F22381512583740604F68544E6F6C5272B97289D1657292576F3582B509 - 8FC52678AB3969A3366A99355E913D66973A659C2C6193386C953A70A11F79A9 - 3481B15082B02777A93D85B12681B72A79B0487395376D9827648950697E1F64 - 9562558D445C89346D913125477195ED07091B6C6670B5A4B6A196A5A69DADA6 - 9BABA398A8A498A8A499A9928795CDC0C8FAF9FBACA8ACAEA1A3EBD7D7E7D5D0 - DBC7CC968C9E918694BEB3B9A498A1DECECED4C7C8D6C7C8D5C7C8D8CACAD9C9 - C9B8AEB9857B8D9E979AB9AFB0B2A6A7C5B6B6D4C2C1CFC0BEB5A6A4A2939491 - 8486BDBDC6F6E3EE644946827460948774998D7E968A786E5E575E43506B5156 - 70535978565D816669A4908AAD9E91B5A195B494889A6D6BAA6362AB635F8B55 - 538076879693A2978E9B958C97958C9A918996948A9A988D9E948B9C988E9B98 - 8E9B948A999A91A18F8A989891A19893A295909E9C91A09B92A19C90A1A194A5 - A396A69D91A3988FA1988A9BA494A3A18FA0B5A4B36D606D0000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000019030DFFB1DA794259AF77A9994F606D273ED8BCEDF6D8FF71588A300000 - 7F4B7576535F52344E000000470057D1C6DCFFFFFFD2CFDFC5C4D3F6F2F5FFFF - FFF2EBF4F6F1FBF5ECF8C6B7D3B8A6C3FCF0FDF5E4F9DDC4DBDFC9DEECD2EAD8 - 8BAA520F1F0000001D1C0D4A31455E4E79655482463F6526224425162932242F - 3C273C42203A4926355235404D3254401E4B3F18313C1A204B2C3463485D614B - 6C754A70BD6E85D46F7680637F3477B51384C31B80B23277AA2C70A622639533 - 547E4950723858782C51814458873C52834458872A568B3A5F98305A88345C85 - 3B639048678E3C4E7E3B4475404D7D4E488648659C37508E556392473F742832 - 5B5B72B51103116C6771B9A8BAA297A6A397A8A095A59C91A1A195A5A398A7A5 - 9BA9918695D2C7D1FFFFFFD1D2D3948791B1A0ABD0C2BEBBAEB894869B918893 - A0979EBFB3B6D1BEBEC8B7B8C5B6B9C7B7BBC8B9BBB5A7B19A899A8C8384C2B6 - B6BAAAAAB5A9A6B2ACAABEB1AFB7AFAE969498BEB6C0F8D7E14B2B3203040729 - 24293325284034374B40425A4A4C6B4F5573585F70595D826B678C786F93746D - 8C6664874E5288524AA05C5D9A56607F6A768D8F9D9B94A6908794958C999A90 - A1978B9B9C8FA0998D9D978A9B968999938A9A8F8998928C9C9B92A29891A19A - 91A19A8F9F988F9E9C93A19F96A49C93A19B8F9FA395A39B92A19F93A2A396A6 - 9B8E9D9F93A1ADA4B4645F680000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000191213D07FB062364593 - 5574A3718B772C60522E2EA78CBFB299DB705978452044614055654E4E6C4F69 - 52305C350047A9A3BCFFFFFFD9D2DEC5BECFF4EAF9FFFEFFEADFEEF3E9F8DAC6 - DDAF97B3DCCBDCF5E1F5DAB5CAE5C8DAEEC8E5C3718E340003000B08392E333B - 2732403B4E594C734C436827283F29193B421F4C4B26404E2C3355373754373B - 462E3C391D34361524391C28503049623D617A4060B05C68C268777A50792F4A - 8A3A569B35568E37558C3E5D933B5D9232457C453F673D536C3B53844A50733B - 3B531C233B39334C3C395939396531355A393951302E4F3B39622F4D81424278 - 4D4A7B5F4C8B39458233447740457A4B508318354E7582C00700166C6670B8A9 - B9A195A4A195A5A195A7A197A7A195A6A095A5A095A49B93A1A591A0C3A6B3E1 - C9D6ECD7DFCFBBC6B49DA9B5A4ABAC9FA4AC9AA5A3979EADA1A7BFAEB6B6A6AF - B8A7ACB8A9ADB7A8ACAFA2A7958A957C717AA5989F9D8E96A0969EA59DA3AA9D - A3AB99A1D8BDC6F1BFC9B17C838C65698B5C6A7D505F724F5475555A7E5C6088 - 5E6387595E8E5D6297646A9B6269996068995D65A4686EB1737AB17D81AF8194 - 8687939694A2958D9C938C9B928998938997958D9A948B9B968C9D928A998C87 - 95938C9B998D9E948E9F9791A19A92A19790A09A94A39992A19F97A79E94A39A - 91A09991A09F94A3A293A2A395A5A198A79E98A4A399A89A92A0ACA3B3615D67 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000060008B272974C304866393D6E466C885B745E3A5A36 - 191A6D496F7C609A67598767496F5E475967465F674A695F435B360032AD96BA - FFFFFFDED4E1A38CA9FFFFFFE7DCEFEADCF0EBD4EEB899B5B398AFEDD1E4E1B5 - C5E1C0D2EEC4E1A5556A1600000609122E242C0C1D0E0E190D261F29181E1F00 - 150B030C0F0406080000000B00070B001300070B00070012040732091E421528 - 5B2A318F474BBB5F6FB06182605080283A793A2E712A315D2F3E684F46874947 - 8540386E4D3B724346873D4673424B6E38435227323E303544282F3F4A446244 - 4272493F673C3D632936483A3F5837405E3B38733642705053803E38854C647C - 4042754653850818368387BF03001268646EB7A7B8A49AA79D93A3A195A5A59A - A9A397A8A599A9A298A59D92A19B91A1948B9A8F87959E8898A691A1B59DACAF - 979DB69FA6B7A0ACBDA8B0BBA3ABB0939CCAAFB5CDB1B7D0B4BACCAFB7D2B1B8 - D4B2BBD6B4BADAB6BDD1ACB5D8AEB7C99FA8B99AA1B99BA1D09BA1DC9BA4E4A1 - A8F2ACB2F5B2B7F6B3B8F1B4B9EBAEB5E5AAB2D8A4ABD7A3ACD1A1A7C79EA1B5 - 9099B5959BB7969FB99FA9AE9CABA39BAC9491A1928B9A948A98948B9A988D9E - 978E9D958C9A9289978C87969189998F8B9A8788968C8D9B988E9E9691A19994 - A29C93A39790A09893A19994A39B95A59E94A29A909F9A8E9E9D93A2A093A3A3 - 94A39F98A695919E9E97A49A94A2ACA3B465616B000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000180C - 15995C6F3F324D714751592C3C58384E643E636F4A615F3A424C354952235361 - 3C6F70596967476367486D705F7A5944571D00296A4F71FFFFFFF5F1F8B79FC1 - F0DFEFEDD6EBF1D6EED4B3CB9D788FC598ADE6BCD1DCC4DFDCADC78C35423100 - 002E161C441C25360E1D3307183111183D16204A091E4A0614520B195F192F67 - 313D75393C8A38469B455AA95F6FBF7887D38B98E09AA8CB97B57D77AA2E4C8D - 22366C2E33602C39623B466A474876393469383061473F73544B8545517C2335 - 541D2239263436151F372B2B442F3A5F38466F394270241F2B28323E4451583D - 44664245664D4A7F455476364C74464F8E495787405A8C4B5C870D24458691C0 - 00000D6C646FB3A5B6A49AA9A59AA9A69DABA497A7A195A5A195A49F92A29B8F - 9E9D91A19D91A19F93A39187999A8EA09990A19991A09C909D9E8EA0968B9B90 - 8993847B87988D99968692978693998994928992988B95988992968B929D9099 - 9E8F988A848C8F8A92979199A496A1A4929E9387918D858E887D878279857E78 - 8377747E73747E70727D7D7E8885808C88808D7A76838B8491938A9F928A9D8F - 8A998E8796958D9C958D9B948D9B978D98A08C9B9589978F8998878390888496 - 8C88998B89999193A190909F938F9F9893A29692A19B92A19B94A39D95A49D95 - A496909F9A91A0A193A2A491A3A495A69A96A59994A29993A197909F9F98A59E - 97A3AFA4B46A656F000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000D0000A775873C1D35604946552B - 3F52334352314B58434D57373D52385351404D573F37582F535B3B574F385A59 - 4A6A694F856A537D3E1B4D2F0442E6E6EEFFFFFFC9B5D1D3B7D0E0C2D8D9BBD3 - C194B5BD9BB8EBD8ECDDAFC8BE6783C55A74D9788DD6758CD66F86DB758AD97C - 8FDC7F8FDF8294E189A3E495ADE79EB1E6A2B1E29FB0E19EB7D8A2C1C99AB6B8 - 8DA6A281957762803D3C7A1C32842F3A834D3E7E463F732F3C663036623B3873 - 2C34612E2E3F3E344330313D242B4C3449533342552B2C5551506A191B2F0000 - 00000E07000000242F2B14231D253850473C67383D5F2C42543D4A724A4F763E - 5B782E53763F4C77405E7B266287433D625E9AC90C00096E6670BAACBDA197A5 - A399A9A195A6A29AA8A39BAB9D95A59B93A3A196A89D94A69E95A8958CA0A29A - A99D95A4A196A9A499AB9F99A7A196ACA399AE9D97A9A79FB4A195AAA89DB1A1 - 97AAA19AADA895AB9D93A89E96AA9E96AE9D96ABA097AAA69BAFA494A7A69AA9 - 9B94A59690A39595A79392A49C8EA19992A79A92A4908B9F938D9F9D8D9E9C8B - 9BA194A59B92A39791A1968E9F948D9C978F9D968D9C958D9C938A99938A9994 - 8B9A9286968C8794938FA19190A29495A79791A28E8C9D908D9D8E89989791A2 - 9B95A59690A0948F9F9A93A29890A0978D9E9B91A19F92A3A395A39C95A19B92 - A29891A19D96A59893A19E97A59C95A3A199A79D97A4B3A9B868636C00000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000180025B186C3403244643A695F455E593B4C57385758354B5038 - 4053344E4832444E324B50384A4934404A3C474E3D4C4F36315440555B4B6452 - 34592000315A4B70C2C0CBD4C1D6D5B5D3D1C0D4D3C5DDCBB2CEC5A1BAC7A6BB - CEB7C9C6BACEBAAEC7B8A7C7B5ADCBAFACC9ABA3C1AAA1C1A49CBE9A8DAC8C80 - 9F76739C4E5797253D8506284E00090B00000000082500071D000006221C373B - 2F4431222F28274B3136632932552E306039366A20223C1D192F23303C1E3625 - 3639443F4871454E8B35476E152E321A20241D20221D2A253543464A49635E52 - 85524C814342734F4F6F424F5F5D4E814C49823A4982504D74454F5600365248 - 56711F285A5D859B09110B6D636DB5A6B8A59BA9A397A6A299A79B94A6A19BAC - A29CADA19BAD9C96A8A196ABA199AD9E95AA9F99A6A19AA9A197AAA59EAE9996 - A5A29AA99C96A39A96A39993A7A299ACA497ADA496ADA193A99C97A39E98A69A - 92A39E95A69B92A3A39BA9948F9F9694A19A95A29D94A3958D9C948E9C948F9C - 938F9E91909C8F89978C87948D8996918B9890909D8F8C97948B98918C999B90 - A2958F9B958F9B948A99988E9C968D9A988F9C968FA0918EA58A8BA08788998A - 8D9D8B90A0938E9D918E9C948F9E938D9B9892A1968F9E9A94A39A94A2948F9D - 958F9D9B909D9F91A0A193A19A909E9D95A1918E9C9792A19C95A39C94A29C95 - A2A19AA79C95A19D95A2B3A8B76A616C00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000070B09936CC5 - 493C586246816757936B4A8B66598D6A4290625A7B5E477F5B457B5F4B785B4E - 715846685C44685848685C4B6352455B583D5761435B614A624B28523C183F53 - 3B585F49655C4A60594B62594A62574D655851695148604A3D5A513F65503E67 - 493B5B4A39584B38614B3B684C345D572F515E39583B3D620C3B6A1F49813251 - 73202F3C2C29443A4667243337030B00020D0E0C1F0D041600080C0E12020D1B - 091335304F2837572536403232472E2E452F344B4744775052933E4F7F3F3660 - 142923153B3038425D504A7B5A5A8D4F4A80404E6E45466F4948854B52875454 - 8A4E4B7F535F84333C6D4A447049467527546D42446B164467727E9611091B76 - 6D7AC5B8CDB3A5B9B3A5B9ADA6B9AEA8BCB2ABBEAFA9BDAEA7BCAEA8BCB5AABF - B1A7BDB3A8BDAFA9BCB0A8BEADA7BAB2ABBDAEA7BAB0A7BBB1A7BCB0A7BBB0A7 - BDB3A9BFB0A5BBADA2B8B2A7BDB0A5B7ADA6B8ACA4B8AFA7B9A8A2B4ADA3B8AA - A1B5ABA2B6A9A1B4ABA1B6A6A1B0A49DADA59EAEA19EAD9C96A59992A19D96A6 - 9991A19F95A69B95A69F98AAA398ADA196ABA396A9A299AC9993A69694A39997 - A79E99AA9A98A89E9BADA09DB3A5A1B6A09EB1A1A0B19F9DAFA6A0B0A29CADA9 - A2B4A59DAEA8A2B1A59DADA49EAEA49BABAA9DAFA69AAAA299A8A59BA9A8A0AD - A19DADA8A1B2A8A2B3AEA9B8ADA8B7ACA4B5AFA8B9B3AAB9B3A8B6B0A5B5C5B8 - C579717A00000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000030202493F4F00001342360640004B152F31 - 1837453318652A2B472F2C553027593228582C4053322C523B24572C2E4F2C2F - 45312A502A2C453032452E2A443A31493E344E342F472B203730243730283331 - 252F3A2334311D3519223226273629222B2B1E2638252F2A2731332739432640 - 382C3B292A33302B3830304315263919263A2B314C272B42232B45253151201D - 281E09031D07121A061B220C1A22150B0413000612182A234631395525315C23 - 2F531E2529241F2F180C3C25132A2B28300026300F29311D1B372B2748383259 - 282A461D252C1B253F292A2C202840112047333E4D2C325E15264E080D002614 - 193231481B24522B283E352C3B2B426E1B0D1C433F45726C7869636E6A657066 - 667166656D66636C68666F67627167647169646F69636E6A636E67646D67636E - 69667068626F65636F68616D65606A66606C6A667169636F66636D64616D6560 - 6B69606B67636E696470635D68645D6967616D645E6A68636C615C68635D6A5F - 5A64645D67635D685F5D665C576354545D56555D55565F52586157535B5C5662 - 5856625B58635D575F54545A56575F5A57615E5B665C59605F5C645A58625C5B - 685A5D68605E6A62606B5D5C685D5B63605C65615C66645F6766626B625E675D - 58625E5962625D675E5A645D5A635F5961635F67665F6A656069615D6764626B - 68656F69636D67626B69646C6C646B69646A7771794644480000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000424D3E000000000000003E000000280000005C0100002C00000001000100 - 00000000900700000000000000000000000000000000000000000000FFFFFF00 - 8000000000000000000001000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPSdxMVLnk.dfm b/internal/x.46/Lib/D11/dxPSdxMVLnk.dfm deleted file mode 100644 index a7f199f9..00000000 --- a/internal/x.46/Lib/D11/dxPSdxMVLnk.dfm +++ /dev/null @@ -1,828 +0,0 @@ -object dxMVReportLinkDesignWindow: TdxMVReportLinkDesignWindow - Left = 386 - Top = 219 - BorderStyle = bsDialog - Caption = 'dxMVReportLinkDesignWindow' - ClientHeight = 414 - ClientWidth = 597 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 5 - Width = 589 - Height = 373 - ActivePage = tshColors - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object Bevel11: TBevel - Left = 40 - Top = 13 - Width = 242 - Height = 4 - Shape = bsBottomLine - end - object imgShow: TImage - Left = 9 - Top = 34 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblShow: TLabel - Left = 6 - Top = 8 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel16: TBevel - Left = 90 - Top = 102 - Width = 193 - Height = 4 - Shape = bsBottomLine - end - object chbxShowGrid: TCheckBox - Tag = 3 - Left = 90 - Top = 119 - Width = 173 - Height = 17 - Caption = '&Grid' - TabOrder = 3 - OnClick = ShowClick - end - object chbxShowGroupFooterGrid: TCheckBox - Tag = 5 - Left = 90 - Top = 163 - Width = 173 - Height = 17 - Caption = 'Group Footers Grid' - TabOrder = 5 - OnClick = ShowClick - end - object chbxShowHeaders: TCheckBox - Left = 90 - Top = 31 - Width = 173 - Height = 17 - Caption = '&Headers' - TabOrder = 0 - OnClick = ShowClick - end - object chbxShowFooters: TCheckBox - Tag = 1 - Left = 90 - Top = 53 - Width = 173 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 1 - OnClick = ShowClick - end - object chbxShowPreviewGrid: TCheckBox - Tag = 4 - Left = 90 - Top = 141 - Width = 173 - Height = 17 - Caption = 'Nodes Grid' - TabOrder = 4 - OnClick = ShowClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 12 - Left = 90 - Top = 75 - Width = 173 - Height = 17 - Caption = 'ExpandButtons' - TabOrder = 2 - OnClick = ShowClick - end - object lblPreviewWindow: TStaticText - Left = 295 - Top = 0 - Width = 88 - Height = 12 - AutoSize = False - Caption = 'Preview' - TabOrder = 6 - end - end - object tshColors: TTabSheet - Caption = '&Color' - object lblGridLineColor: TLabel - Left = 11 - Top = 304 - Width = 74 - Height = 13 - Caption = '&Grid Line color :' - end - object bvlGridLineColorHolder: TBevel - Left = 129 - Top = 299 - Width = 152 - Height = 22 - Visible = False - end - object lblDrawMode: TLabel - Left = 8 - Top = 21 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - end - object gbxFixedTransparent: TGroupBox - Left = 6 - Top = 164 - Width = 283 - Height = 126 - Caption = ' ' - TabOrder = 4 - object lblHeaderColor: TLabel - Left = 5 - Top = 49 - Width = 71 - Height = 13 - Caption = '&Header color : ' - end - object lblFooterColor: TLabel - Left = 5 - Top = 75 - Width = 65 - Height = 13 - Caption = 'Footer color :' - end - object bvlHeaderColorHolder: TBevel - Left = 123 - Top = 44 - Width = 152 - Height = 22 - Visible = False - end - object bvlFooterColorHolder: TBevel - Left = 123 - Top = 70 - Width = 152 - Height = 22 - Visible = False - end - object lblGroupNodeColor: TLabel - Left = 5 - Top = 101 - Width = 87 - Height = 13 - Caption = 'Group&Node color :' - end - object bvlGroupNodeColorHolder: TBevel - Left = 123 - Top = 96 - Width = 152 - Height = 22 - Visible = False - end - object lblLevelCaptionColor: TLabel - Left = 5 - Top = 23 - Width = 100 - Height = 13 - Caption = 'CaptionNode Color : ' - end - object bvlCaptionColorHolder: TBevel - Left = 123 - Top = 18 - Width = 152 - Height = 22 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 6 - Top = 53 - Width = 283 - Height = 104 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 5 - Top = 23 - Width = 29 - Height = 13 - Caption = 'C&olor:' - end - object bvlColorHolder: TBevel - Left = 123 - Top = 18 - Width = 152 - Height = 22 - Visible = False - end - object lblPreviewColor: TLabel - Left = 5 - Top = 77 - Width = 71 - Height = 13 - Caption = '&Preview color :' - end - object bvlPreviewColorHolder: TBevel - Tag = 1 - Left = 123 - Top = 72 - Width = 152 - Height = 22 - Visible = False - end - object lblEvenColor: TLabel - Left = 5 - Top = 47 - Width = 59 - Height = 13 - Caption = 'Even Color :' - end - object bvlEvenColorHolder: TBevel - Left = 123 - Top = 43 - Width = 152 - Height = 22 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 17 - Top = 51 - Width = 15 - Height = 17 - Caption = ' Tr&ansparent ' - TabOrder = 1 - OnClick = chbxTransparentClick - end - object chbxFixedTransparent: TCheckBox - Tag = 1 - Left = 17 - Top = 163 - Width = 15 - Height = 17 - Caption = ' Fi&xed transparent ' - TabOrder = 3 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 89 - Top = 15 - Width = 193 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 0 - OnClick = cbxDrawModeClick - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 32 - Top = 52 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stFixedTransparent: TStaticText - Left = 32 - Top = 164 - Width = 98 - Height = 17 - Caption = ' Fixed Transparent ' - FocusControl = chbxFixedTransparent - TabOrder = 6 - OnClick = stFixedTransparentClick - end - end - object tshFonts: TTabSheet - Caption = '&Font' - object btnChangeFont: TButton - Left = 6 - Top = 170 - Width = 116 - Height = 23 - Caption = 'Change Fo&nt ...' - TabOrder = 1 - OnClick = btnChangeFontClick - end - object lbxFonts: TListBox - Left = 6 - Top = 15 - Width = 282 - Height = 148 - Style = lbOwnerDrawFixed - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ItemHeight = 16 - MultiSelect = True - ParentFont = False - ParentShowHint = False - PopupMenu = pmChangeFont - ShowHint = True - TabOrder = 0 - OnClick = lbxFontsClick - OnDblClick = lbxFontsDblClick - OnDrawItem = lbxFontsDrawItem - OnKeyDown = lbxFontsKeyDown - OnMouseMove = lbxFontsMouseMove - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Bevel12: TBevel - Left = 57 - Top = 12 - Width = 228 - Height = 4 - Shape = bsBottomLine - end - object Bevel13: TBevel - Left = 92 - Top = 83 - Width = 192 - Height = 4 - Shape = bsBottomLine - end - object imgSelection: TImage - Left = 9 - Top = 30 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object imgNodeExpanding: TImage - Left = 9 - Top = 104 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F877778880F87777777778078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblSelection: TLabel - Left = 6 - Top = 8 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object lblExpanding: TLabel - Left = 6 - Top = 79 - Width = 78 - Height = 13 - Caption = 'Node Expanding' - end - object lblRefinements: TLabel - Left = 7 - Top = 215 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlGraphic: TBevel - Left = 76 - Top = 220 - Width = 208 - Height = 4 - Shape = bsBottomLine - end - object imgGraphics: TImage - Left = 9 - Top = 241 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FF7FFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF777777F - F07DD0F77777777FF7FF70888FFF07DDCCCCCCCCDD0F77777777FF7FF7FFFF7F - F07DD0FFFFFFFFFFF7FF70FF8FFF07DDCCCCDCCDDD0FFFFFFFFFFF7FF7F00F7F - F07DD0F777777FFFF7FF70FF8FFF07DDCDDDDCDDDD0F777777FFFF7FF7F00F7F - F07DD0FFFFFFFFFFF7FF70000FFF07DDDDDDDDDDDD0FFFFFFFFFFF7FF7FFFF7F - F07DD0F77777777FF7FF777777FF07DDDDDDDDDDDD0F77777777FF7FF777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCFFF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCCCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FFCCCCCFFF07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7F9999999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FF99999FFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblLookAndFeel: TLabel - Left = 6 - Top = 148 - Width = 67 - Height = 13 - Caption = 'Look And Feel' - end - object img3DEffects: TImage - Left = 9 - Top = 172 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel15: TBevel - Left = 83 - Top = 152 - Width = 200 - Height = 4 - Shape = bsBottomLine - end - object chbxTransparentColumnGraphic: TCheckBox - Tag = 7 - Left = 90 - Top = 239 - Width = 188 - Height = 17 - Caption = 'Transparent Column &Graphics' - TabOrder = 5 - OnClick = ShowClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 8 - Left = 90 - Top = 261 - Width = 188 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 6 - OnClick = ShowClick - end - object chbxOnlySelected: TCheckBox - Left = 90 - Top = 31 - Width = 188 - Height = 17 - Caption = 'Only &selected' - TabOrder = 0 - OnClick = chbxOnlySelectedClick - end - object chbxExtendedSelect: TCheckBox - Left = 90 - Top = 53 - Width = 188 - Height = 17 - Caption = '&Extended select' - TabOrder = 1 - OnClick = chbxExtendedSelectClick - end - object chbxAutoNodesExpand: TCheckBox - Left = 90 - Top = 102 - Width = 188 - Height = 17 - Caption = '&Auto Node Expanded' - TabOrder = 2 - OnClick = chbxAutoNodesExpandClick - end - object chbxUse3DEffects: TCheckBox - Tag = 9 - Left = 90 - Top = 171 - Width = 188 - Height = 17 - Caption = '&Use 3D Effects' - TabOrder = 3 - OnClick = ShowClick - end - object chbxUseSoft3D: TCheckBox - Tag = 10 - Left = 90 - Top = 193 - Width = 188 - Height = 17 - Caption = 'Soft &3D' - TabOrder = 4 - OnClick = ShowClick - end - object chbxCheckMarksAsText: TCheckBox - Tag = 11 - Left = 90 - Top = 305 - Width = 173 - Height = 17 - Caption = 'Display CheckMarks as Text' - TabOrder = 8 - OnClick = ShowClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 6 - Left = 90 - Top = 283 - Width = 173 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 7 - OnClick = ShowClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - ImageIndex = 4 - object lblPreviewLineCount: TLabel - Left = 90 - Top = 82 - Width = 99 - Height = 13 - Caption = 'Preview &Line Count: ' - end - object bvlPreviewLineCountHolder: TBevel - Left = 193 - Top = 78 - Width = 81 - Height = 21 - Visible = False - end - object lblPreview: TLabel - Left = 6 - Top = 8 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object Bevel1: TBevel - Left = 52 - Top = 13 - Width = 226 - Height = 4 - Shape = bsBottomLine - end - object imgPreview: TImage - Left = 9 - Top = 30 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F888F7FF888F7F8888F7F07DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7F888F7FF888F7FF888F7F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxShowPreview: TCheckBox - Tag = 2 - Left = 90 - Top = 31 - Width = 97 - Height = 17 - Caption = 'Pre&view' - TabOrder = 0 - OnClick = ShowClick - end - object chbxAutoCalcPreviewLines: TCheckBox - Left = 90 - Top = 53 - Width = 169 - Height = 17 - Caption = '&Auto Calc Preview Lines' - TabOrder = 1 - OnClick = chbxAutoCalcPreviewLinesClick - end - end - end - object pnlPreview: TPanel - Left = 303 - Top = 44 - Width = 281 - Height = 324 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 1 - object dxMVPreview: TdxMasterView - Left = 5 - Top = 5 - Width = 271 - Height = 313 - Enabled = False - TabOrder = 0 - Visible = False - OptionsView = [movAutoColumnWidth, movHideFocusRect, movHideSelection, movKeepColumnWidths, movTransparentDragAndDrop, movUseBitmap, movUseBitmapToDrawPreview] - ScrollBars = sbNone - object mvsCaptionStyle: TdxMasterViewStyle - end - object mvsContentStyle: TdxMasterViewStyle - end - object mvsFooterStyle: TdxMasterViewStyle - end - object mvsGroupStyle: TdxMasterViewStyle - end - object mvsHeaderStyle: TdxMasterViewStyle - end - object mvsPreviewStyle: TdxMasterViewStyle - end - object mvsAnotherContentStyle: TdxMasterViewStyle - end - end - end - object pmChangeFont: TPopupMenu - OnPopup = pmChangeFontPopup - Left = 4 - Top = 383 - object miChangeFont: TMenuItem - Caption = 'Change Fo&nt ...' - Default = True - ShortCut = 16454 - OnClick = btnChangeFontClick - end - end -end diff --git a/internal/x.46/Lib/D11/dxPSdxOCLnk.dfm b/internal/x.46/Lib/D11/dxPSdxOCLnk.dfm deleted file mode 100644 index 39cc1458..00000000 --- a/internal/x.46/Lib/D11/dxPSdxOCLnk.dfm +++ /dev/null @@ -1,166 +0,0 @@ -object dxOCReportLinkDesignWindow: TdxOCReportLinkDesignWindow - Left = 518 - Top = 415 - ActiveControl = chbxFullExpand - BorderStyle = bsDialog - Caption = 'Report Designer' - ClientHeight = 293 - ClientWidth = 552 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 544 - Height = 254 - ActivePage = tshOptions - MultiLine = True - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object pnlOptions: TPanel - Left = 0 - Top = 0 - Width = 536 - Height = 226 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object lblPreview: TLabel - Left = 241 - Top = 2 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object chbxFullExpand: TCheckBox - Left = 17 - Top = 10 - Width = 216 - Height = 17 - Caption = 'Full &Expand' - TabOrder = 0 - OnClick = chbxFullExpandClick - end - object gbxTransparent: TGroupBox - Left = 5 - Top = 43 - Width = 231 - Height = 56 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 7 - Top = 26 - Width = 35 - Height = 13 - Caption = 'Co&lor : ' - OnClick = lblColorClick - end - object bvlColorHolder: TBevel - Left = 86 - Top = 22 - Width = 138 - Height = 21 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 17 - Top = 41 - Width = 15 - Height = 17 - TabOrder = 1 - OnClick = chbxTransparentClick - end - object gbxBorder: TGroupBox - Left = 5 - Top = 109 - Width = 231 - Height = 56 - Caption = ' ' - TabOrder = 4 - object lblGridLinesColor: TLabel - Left = 7 - Top = 26 - Width = 67 - Height = 13 - Caption = '&Border Color: ' - OnClick = lblColorClick - end - object bvlLineColorHolder: TBevel - Left = 86 - Top = 22 - Width = 138 - Height = 21 - Visible = False - end - end - object chbxDrawBorder: TCheckBox - Left = 17 - Top = 107 - Width = 15 - Height = 17 - TabOrder = 3 - OnClick = chbxDrawBorderClick - end - object stTransparent: TStaticText - Left = 32 - Top = 42 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stDrawBorder: TStaticText - Left = 32 - Top = 108 - Width = 70 - Height = 17 - Caption = ' Draw Border ' - FocusControl = chbxDrawBorder - TabOrder = 6 - OnClick = stDrawBorderClick - end - end - end - end - object pnlPreview: TPanel - Left = 250 - Top = 46 - Width = 290 - Height = 201 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - TabOrder = 1 - object ocPreview: TdxOrgChart - Left = 6 - Top = 5 - Width = 279 - Height = 192 - DefaultImageAlign = iaLT - BorderStyle = bsNone - Options = [ocDblClick, ocEdit, ocCanDrag, ocShowDrag, ocRect3D] - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - Visible = False - Items = { - 000001005A000000FFFFFF1F01000200011600436F72706F7261746520486561 - 647175617274657273020050000000FFFFFF1F0100010001130053616C657320 - 616E64204D61726B6574696E67010050000000FFFFFF1F010003000117004669 - 656C64204F66666963653A2043616E6164610D0A09000050000000FFFFFF1F01 - 000000010B00456E67696E656572696E670000} - end - end -end diff --git a/internal/x.46/Lib/D11/dxPSdxTLLnk.dfm b/internal/x.46/Lib/D11/dxPSdxTLLnk.dfm deleted file mode 100644 index 22eddc6d..00000000 --- a/internal/x.46/Lib/D11/dxPSdxTLLnk.dfm +++ /dev/null @@ -1,1464 +0,0 @@ -object dxTLReportLinkDesignWindow: TdxTLReportLinkDesignWindow - Left = 485 - Top = 220 - BorderStyle = bsDialog - Caption = 'dxTLReportLinkDesigner' - ClientHeight = 434 - ClientWidth = 582 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object PageControl1: TPageControl - Left = 4 - Top = 4 - Width = 574 - Height = 395 - ActivePage = tshColors - TabOrder = 0 - OnChange = PageControl1Change - object tshOptions: TTabSheet - Caption = '&Options' - object Bevel11: TBevel - Left = 46 - Top = 13 - Width = 221 - Height = 4 - Shape = bsBottomLine - end - object imgShow: TImage - Left = 9 - Top = 35 - Width = 32 - Height = 32 - Center = True - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888888888888888888888888888888 - 8888888888000000000000000000000888888888880FFFFFFFFFFFFFFFFFFFC8 - 8C888888880F77777700000077777FCC8CC88888880F77777777777777777FCC - CCCC8888880FFFFFFFFFFFFFFFFFFFCC8CC88888880F77777777777777777FC8 - 8C888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000FFF7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F0000000F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F77777777777777777F08 - 88888888880F7FFFFF7FFFFFFFFF7F0888888888880F7F000F7F00000F0F7F08 - 88888888880F7FFFFF7FFFFFFFFF7F08888888C888CF77777777777777777F08 - 88888CC8CCCFFFFFFFFFFFFFFFFFFF088888CCCCCCCF70000000770000007F08 - 88888CC8CCCF77777777777777777F08888888C888CFFFFFFFFFFFFFFFFFFF08 - 8888888888000000000000000000000888888888888888888888888888888888 - 8888888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblShow: TLabel - Left = 6 - Top = 9 - Width = 26 - Height = 13 - Caption = 'Show' - end - object Bevel16: TBevel - Left = 89 - Top = 107 - Width = 178 - Height = 4 - Shape = bsBottomLine - end - object bvlShowImages: TBevel - Left = 89 - Top = 223 - Width = 178 - Height = 4 - Shape = bsBottomLine - end - object Bevel2: TBevel - Left = 89 - Top = 164 - Width = 178 - Height = 3 - Shape = bsBottomLine - end - object Bevel10: TBevel - Left = 90 - Top = 282 - Width = 177 - Height = 4 - Shape = bsBottomLine - end - object Image1: TImage - Left = 9 - Top = 303 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00888888888888888888888888888888888777777777777777708888888888 - 888887FFFFFFFFFFFFFFF08888888888888887F7777777777777F07777708888 - 888887F7777777777777F0FFFFF08888888887F7777777777777F07777F07777 - 708887FFFFFFFFFFFFFFF07777F0FFFFF08887F777777777777FF07777F07777 - F08887FFFFFFFFFFFFFFF0FFFFF07777F08887F77777777777FFF077FFF07777 - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777777FFFFF0777FF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F777777FFFFFFFF07FFFF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF0777FF0777F - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777FFFF077FFF07FFF - F08887FFFFFFFFFFFFFFF0FFFFF0FFFFF08887F7777777777777F077FFF077FF - F08887F7777777777777F0FFFFF0FFFFF08887F7777777777777F0FFFFF07FFF - F08887FFFFFFFFFFFFFFF07777F0FFFFF0888000000000000000007777F077FF - F08888888887F7777777777777F0FFFFF08888888887FFFFFFFFFFFFFFF07777 - F0888888888000000000000000007777F08888888888888887F7777777777777 - F08888888888888887FFFFFFFFFFFFFFF0888888888888888000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblOnEveryPage: TLabel - Left = 8 - Top = 278 - Width = 72 - Height = 13 - Caption = 'On Every Page' - end - object chbxShowGrid: TCheckBox - Tag = 6 - Left = 90 - Top = 177 - Width = 165 - Height = 17 - Caption = '&Grid Lines' - TabOrder = 6 - OnClick = chbxShowClick - end - object chbxShowNodeGrid: TCheckBox - Tag = 5 - Left = 90 - Top = 198 - Width = 165 - Height = 17 - Caption = 'Node Grid Lines' - TabOrder = 7 - OnClick = chbxShowClick - end - object chbxShowBands: TCheckBox - Left = 90 - Top = 23 - Width = 165 - Height = 17 - Caption = 'Ba&nds' - TabOrder = 0 - OnClick = chbxShowClick - end - object chbxShowHeaders: TCheckBox - Tag = 1 - Left = 90 - Top = 43 - Width = 165 - Height = 17 - Caption = '&Headers' - TabOrder = 1 - OnClick = chbxShowClick - end - object chbxShowFooters: TCheckBox - Tag = 2 - Left = 90 - Top = 64 - Width = 165 - Height = 17 - Caption = 'Foo&ters' - TabOrder = 2 - OnClick = chbxShowClick - end - object chbxShowGroupFooters: TCheckBox - Tag = 3 - Left = 90 - Top = 84 - Width = 165 - Height = 17 - Caption = 'G&roup Footers' - TabOrder = 3 - OnClick = chbxShowClick - end - object chbxShowStateImages: TCheckBox - Tag = 9 - Left = 90 - Top = 236 - Width = 165 - Height = 17 - Caption = 'State Images' - TabOrder = 8 - OnClick = chbxShowClick - end - object chbxShowImages: TCheckBox - Tag = 8 - Left = 90 - Top = 256 - Width = 165 - Height = 17 - Caption = 'Images' - TabOrder = 9 - OnClick = chbxShowClick - end - object chbxShowExpandButtons: TCheckBox - Tag = 17 - Left = 90 - Top = 119 - Width = 165 - Height = 17 - Caption = 'Expand Buttons' - TabOrder = 4 - OnClick = chbxShowClick - end - object chbxShowTreeLines: TCheckBox - Tag = 16 - Left = 90 - Top = 140 - Width = 165 - Height = 17 - Caption = 'TreeLines' - TabOrder = 5 - OnClick = chbxShowClick - end - object chbxBandsOnEveryPage: TCheckBox - Left = 90 - Top = 300 - Width = 165 - Height = 17 - Caption = 'Ba&nds On Every Page' - TabOrder = 10 - OnClick = chbxBandsOnEveryPageClick - end - object chbxHeadersOnEveryPage: TCheckBox - Left = 90 - Top = 322 - Width = 165 - Height = 17 - Caption = 'Headers On Every &Page' - TabOrder = 11 - OnClick = chbxHeadersOnEveryPageClick - end - object chbxFootersOnEveryPage: TCheckBox - Left = 90 - Top = 344 - Width = 165 - Height = 17 - Caption = 'Footers On E&very Page' - TabOrder = 12 - OnClick = chbxFootersOnEveryPageClick - end - object lblPreviewWindow: TStaticText - Left = 279 - Top = 0 - Width = 82 - Height = 14 - AutoSize = False - Caption = 'Preview' - TabOrder = 13 - end - end - object tshColors: TTabSheet - Caption = '&Color' - object lblGridlineColor: TLabel - Left = 9 - Top = 296 - Width = 74 - Height = 13 - Caption = '&Grid Line color :' - OnClick = lblColorClick - end - object bvlGridLineColorHolder: TBevel - Left = 122 - Top = 291 - Width = 145 - Height = 22 - Visible = False - end - object bvlTreeLineColorHolder: TBevel - Left = 122 - Top = 320 - Width = 145 - Height = 22 - end - object lblTreeLineColor: TLabel - Left = 9 - Top = 325 - Width = 78 - Height = 13 - Caption = 'TreeLines Color:' - end - object lblDrawMode: TLabel - Left = 7 - Top = 21 - Width = 58 - Height = 13 - Caption = 'Draw &Mode:' - FocusControl = cbxDrawMode - OnClick = lblDrawModeClick - end - object gbxFixedTransparent: TGroupBox - Left = 4 - Top = 162 - Width = 269 - Height = 121 - Caption = ' ' - TabOrder = 4 - object lblBandColor: TLabel - Left = 5 - Top = 23 - Width = 60 - Height = 13 - Caption = '&Band color : ' - OnClick = lblColorClick - end - object lblHeaderColor: TLabel - Left = 5 - Top = 47 - Width = 71 - Height = 13 - Caption = '&Header color : ' - OnClick = lblColorClick - end - object lblRowFooterColor: TLabel - Left = 5 - Top = 96 - Width = 94 - Height = 13 - Caption = 'Gro&upFooter color :' - OnClick = lblColorClick - end - object bvlBandColorHolder: TBevel - Tag = 2 - Left = 118 - Top = 17 - Width = 145 - Height = 22 - Visible = False - end - object bvlHeaderColorHolder: TBevel - Left = 118 - Top = 42 - Width = 145 - Height = 22 - Visible = False - end - object bvlRowFooterColorHolder: TBevel - Left = 118 - Top = 92 - Width = 145 - Height = 22 - Visible = False - end - object lblGroupNodeColor: TLabel - Left = 5 - Top = 72 - Width = 87 - Height = 13 - Caption = 'Group&Node color :' - OnClick = lblColorClick - end - object bvlGroupNodeColorHolder: TBevel - Left = 118 - Top = 67 - Width = 145 - Height = 22 - Visible = False - end - end - object gbxTransparent: TGroupBox - Left = 4 - Top = 51 - Width = 269 - Height = 104 - Caption = ' ' - TabOrder = 2 - object lblColor: TLabel - Left = 5 - Top = 23 - Width = 29 - Height = 13 - Caption = 'C&olor:' - OnClick = lblColorClick - end - object bvlColorHolder: TBevel - Left = 118 - Top = 18 - Width = 145 - Height = 22 - Visible = False - end - object lblPreviewColor: TLabel - Left = 5 - Top = 77 - Width = 71 - Height = 13 - Caption = '&Preview color :' - OnClick = lblColorClick - end - object bvlPreviewColorHolder: TBevel - Tag = 1 - Left = 118 - Top = 72 - Width = 145 - Height = 22 - Visible = False - end - object lblEvenColor: TLabel - Left = 5 - Top = 47 - Width = 59 - Height = 13 - Caption = 'Even Color :' - OnClick = lblColorClick - end - object bvlEvenColorHolder: TBevel - Left = 118 - Top = 43 - Width = 145 - Height = 22 - Visible = False - end - end - object chbxTransparent: TCheckBox - Left = 15 - Top = 49 - Width = 15 - Height = 17 - Caption = ' Tr&ansparent ' - TabOrder = 1 - OnClick = chbxTransparentClick - end - object chbxFixedTransparent: TCheckBox - Tag = 1 - Left = 15 - Top = 160 - Width = 15 - Height = 17 - TabOrder = 3 - OnClick = chbxTransparentClick - end - object cbxDrawMode: TComboBox - Left = 104 - Top = 15 - Width = 169 - Height = 25 - Style = csOwnerDrawFixed - ItemHeight = 19 - TabOrder = 0 - OnChange = cbxDrawModeChange - OnDrawItem = cbxDrawModeDrawItem - Items.Strings = ( - 'Simpe' - 'Odd\Even Rows Mode' - 'Borrow From Source') - end - object stTransparent: TStaticText - Left = 30 - Top = 50 - Width = 76 - Height = 17 - Caption = ' &Transparent ' - FocusControl = chbxTransparent - TabOrder = 5 - OnClick = stTransparentClick - end - object stFixedTransparent: TStaticText - Left = 30 - Top = 161 - Width = 98 - Height = 17 - Caption = ' Fixed Transparent ' - FocusControl = chbxFixedTransparent - TabOrder = 6 - OnClick = stFixedTransparentClick - end - end - object tshFonts: TTabSheet - Caption = '&Font' - object btnChangeFont: TButton - Left = 6 - Top = 189 - Width = 116 - Height = 23 - Caption = 'Change Fo&nt ...' - TabOrder = 0 - OnClick = btnChangeFontClick - end - object lbxFonts: TListBox - Left = 6 - Top = 16 - Width = 268 - Height = 167 - Style = lbOwnerDrawFixed - ItemHeight = 16 - MultiSelect = True - ParentShowHint = False - PopupMenu = pmChangeFont - ShowHint = True - TabOrder = 1 - OnClick = lbxFontsClick - OnDblClick = lbxFontsDblClick - OnDrawItem = lbxFontsDrawItem - OnKeyDown = FontsKeyDown - OnMouseMove = FontsMouseMove - end - end - object tshBehaviors: TTabSheet - Caption = '&Behaviors' - object Bevel12: TBevel - Left = 57 - Top = 13 - Width = 210 - Height = 4 - Shape = bsBottomLine - end - object Bevel13: TBevel - Left = 63 - Top = 85 - Width = 204 - Height = 4 - Shape = bsBottomLine - end - object Image3: TImage - Left = 9 - Top = 33 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 77788000000000000000000000000788C8888C88880000000000000000000000 - 00788088888887888888888888880788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788088888887887777778888880788CCCCCCCC880F77777777777777777777 - F0788087777787887777777777880788CCCC8CC8880F7FFF77777FF77777FFF7 - F0788088888887888888888888880788C8888C88880F77777777777777777777 - F078807777777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F00000F7FF0000000000FF078888888888880F7F8888888888F7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F078808888888788888888888888078888888888880F7F888888888FF7F888F7 - F0788087777887887777777788880788C8888C88880F7FFFFFFFFFFFF7FFFFF7 - F0788088888887888888888888880788CCCC8CC8880F77777777777777777777 - F0788077777777777777777777770788CCCCCCCC880F7F888888888FF7F888F7 - F0788088888887888888888888880788CCCC8CC8880F7FFFFFFFFFFFF7FFFFF7 - F0788087777787887777777788880788C8888C88880F77777777777777777777 - F078808888888788888888888888078888888888880F7F8888888888F7F888F7 - F078807777777777777777777777078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F0000FF7FF0000000000FF078888888888880F7F888888888FF7F888F7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F078807777777777777777777777078888888888880F77777777777777777777 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F7F888888888FF7F888F7 - F07880F00000F7FF0000000000FF078888888888880F7FFFFFFFFFFFF7FFFFF7 - F07880FFFFFFF7FFFFFFFFFFFFFF078888888888880F77777777777777777777 - F0788000000000000000000000000788C8888C88880FFFFFFFFFFFFFFFFFFFFF - F07880F8888880F88888888888880788CCCC8CC8880F77777777777777777777 - F07880F8000080F80000008888880788CCCCCCCC880F77777777777777777777 - F07880FFFFFFF0FFFFFFFFFFFFFF0788CCCC8CC8880FFFFFFFFFFFFFFFFFFFFF - F0788000000000000000000000000888C8888C88880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object Image4: TImage - Left = 9 - Top = 104 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00887777777777777777777777778888888888888777777777777777777777 - 7778800000000000000000000000078888888888880000000000000000000000 - 007880FFF7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7FF777777FFF77777FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7777777777777777777078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F8F7FFFFF7FFFFFFFFFFFF078888888888880F77777777777777777777 - F07880F8F7F777F7F777777777FF078888888888880F7F7F8888FF7F88888FF7 - F07880FFF7FFFFF7FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F8F7777777777777777777078888888888880F7F7F888FFF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F777777777777777777 - F0788077777777777777777777770788C8888C88880F7FF888888FFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880F0F7777777FFFFFFFFFFFF0788CCCCCCCC880F77777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCC8CC8880F7F7F8888FF7F88888FF7 - F0788077777777777777777777770788C8888C88880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF078888888888880F7F7F8888FF7F888888F7 - F07880F0F7777777FFFFFFFFFFFF078888888888880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F7F7F8888FF7F888888F7 - F0788077777777777777777777770788CCCC8CC8880F7F777777777777777777 - F07880FFFFFFFFFFFFFFFFFFFFFF0788CCCCCCCC880F7FF88888FFFFFFFFFFF7 - F07880F0F777777FFFFFFFFFFFFF0788CCCC8CC8880F7FFFFFFFFFFFFFFFFFF7 - F07880FFFFFFFFFFFFFFFFFFFFFF0788C8888C88880F77777777777777777777 - F078800000000000000000000000078888888888880FFFFFFFFFFFFFFFFFFFFF - F07880F888888880F88888888888078888888888880F77777777777777777777 - F07880F800008880F80000000008078888888888880F77777777777777777777 - F07880FFFFFFFFF0FFFFFFFFFFFF078888888888880FFFFFFFFFFFFFFFFFFFFF - F078800000000000000000000000088888888888880000000000000000000000 - 0088888888888888888888888888888888888888888888888888888888888888 - 8888} - Transparent = True - end - object lblExpandLevel: TLabel - Left = 90 - Top = 124 - Width = 68 - Height = 13 - Caption = 'Expand &level: ' - OnClick = lblExpandLevelClick - end - object bvlExpandLevelHolder: TBevel - Left = 210 - Top = 122 - Width = 58 - Height = 21 - Visible = False - end - object lblSelection: TLabel - Left = 6 - Top = 9 - Width = 43 - Height = 13 - Caption = 'Selection' - end - object lblExpanding: TLabel - Left = 6 - Top = 81 - Width = 50 - Height = 13 - Caption = 'Expanding' - end - object lblRefinements: TLabel - Left = 7 - Top = 225 - Width = 60 - Height = 13 - Caption = 'Refinements' - end - object bvlRefinements: TBevel - Left = 73 - Top = 230 - Width = 194 - Height = 4 - Shape = bsBottomLine - end - object imgRefinements: TImage - Left = 9 - Top = 248 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD777777777777777777777777DDDDDDDDDDDDD777777777777777777777 - 777DD0000000000000000000000007DDDDDDDDDDDD0000000000000000000000 - 007DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFF99999FF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F77777777FF7FCC99999FF07DDCCCCCCCCDD0F77777777FF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCC99999FF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777FFFF7FCC99999FF07DDCDDDDCDDDD0F777777FFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FCC99999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F77777777FF7FCCCCCFFFF07DDDDDDDDDDDD0F77777777FF7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0FFFFFFFFFFF7FFFFFFFFFF07DDCDDDDCDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFCCCCCCCF07DDCCCCCCCCDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFFCCCCCFF07DDCCCCDCCDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F7777777FFF7FF9999999F07DDCDDDDCDDDD0F7777777FFF7FFFFFFFFF - F07DD0FFFFFFFFFFF7FFF99999FF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0F777777777F7FFFFFFFFFF07DDDDDDDDDDDD0F777777777F7F7777777F - F07DD0FFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - F07DD0777777777777777777777707DDDDDDDDDDDD0777777777777777777777 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0F80000888887F88888888707DDDDDDDDDDDD0F80000888887F88888888 - 707DD0F80000000087F80000008707DDDDDDDDDDDD0F80000000087F80000008 - 707DD0F88888888887F88888888707DDDDDDDDDDDD0F88888888887F88888888 - 707DD0FFFFFFFFFFF7FFFFFFFFF707DDDDDDDDDDDD0FFFFFFFFFFF7FFFFFFFFF - 707DD000000000000000000000000DDDDDDDDDDDDD0000000000000000000000 - 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object lblLookAndFeel: TLabel - Left = 6 - Top = 152 - Width = 67 - Height = 13 - Caption = 'Look And Feel' - end - object Image8: TImage - Left = 9 - Top = 174 - Width = 64 - Height = 32 - Picture.Data = { - 07544269746D617076040000424D760400000000000076000000280000004000 - 0000200000000100040000000000000400000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DD7777777777777777777777777DDDDDDDDDDDD777777777777777777777 - 7777D00000000000000000000000007DDDDDDDDDDD0000000000000000000000 - 0007D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D08777777777780877777788807DCCCCDCCDDD0877777777778787777788 - 8F07D08888888888880888888888807DCCCCCCCCDD0888888888888788888888 - 8F07D00000000000000000000000007DCCCCDCCDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F7777777FF07DDDDDDDDDDD0F777777777FF7F7777777 - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F777777FFF07DDDDDDDDDDD0F777777FFFFF7F777777F - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F7777777777F7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F77777777FFF7F77777FFFF07DDDDDDDDDDD0F77777777FFF7F77777FF - FF07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D07777777777777777777777707DDDDDDDDDDD0777777777777777777777 - 7707D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D0F777777FFFFF7F77777777F07DDDDDDDDDDD0F777777FFFFF7F7777777 - 7F07D0FFFFFFFFFFFF7FFFFFFFFFF07DDDDDDDDDDD0FFFFFFFFFFFF7FFFFFFFF - FF07D00000000000000000000000007DCDDDDCDDDD0000000000000000000000 - 0007D08888888888880888888888807DCCCCDCCDDD0777777777777777777777 - 7707D08888888888880888888888807DCCCCCCCCDD0F88888888888788888888 - 8707D08000000008880880000000807DCCCCDCCDDD0F00000000888788000000 - 8707D08888888888880888888888807DCDDDDCDDDD0FFFFFFFFFFFF7FFFFFFFF - F707D0000000000000000000000000DDDDDDDDDDDD0000000000000000000000 - 000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel15: TBevel - Left = 82 - Top = 156 - Width = 185 - Height = 4 - Shape = bsBottomLine - end - object chbxTransparentColumnGraphic: TCheckBox - Tag = 10 - Left = 90 - Top = 246 - Width = 179 - Height = 17 - Caption = 'Transparent &Graphics' - TabOrder = 5 - OnClick = chbxShowClick - end - object chbxDisplayGraphicsAsText: TCheckBox - Tag = 11 - Left = 90 - Top = 268 - Width = 179 - Height = 17 - Caption = 'Display Graphics As &Text' - TabOrder = 6 - OnClick = chbxShowClick - end - object chbxOnlySelected: TCheckBox - Left = 90 - Top = 31 - Width = 179 - Height = 17 - Caption = 'Only &selected' - TabOrder = 0 - OnClick = chbxOnlySelectedClick - end - object chbxExtendedSelect: TCheckBox - Left = 90 - Top = 53 - Width = 179 - Height = 17 - Caption = '&Extended select' - TabOrder = 1 - OnClick = chbxExtendedSelectClick - end - object chbxAutoNodesExpand: TCheckBox - Left = 90 - Top = 98 - Width = 179 - Height = 17 - Caption = '&Auto Node Expanded' - TabOrder = 2 - OnClick = chbxAutoNodesExpandClick - end - object chbxUse3DEffects: TCheckBox - Tag = 12 - Left = 90 - Top = 172 - Width = 179 - Height = 17 - Caption = '&Use 3D Effects' - TabOrder = 3 - OnClick = chbxShowClick - end - object chbxUseSoft3D: TCheckBox - Tag = 13 - Left = 90 - Top = 194 - Width = 179 - Height = 17 - Caption = 'Soft &3D' - TabOrder = 4 - OnClick = chbxShowClick - end - object chbxCheckMarksAsText: TCheckBox - Tag = 15 - Left = 90 - Top = 312 - Width = 179 - Height = 17 - Caption = 'Display Check Marks as Text' - TabOrder = 8 - OnClick = chbxShowClick - end - object chbxFlatCheckMarks: TCheckBox - Tag = 7 - Left = 90 - Top = 290 - Width = 179 - Height = 17 - Caption = 'Flat Check &Marks' - TabOrder = 7 - OnClick = chbxShowClick - end - end - object tshPreview: TTabSheet - Caption = 'Preview' - object Bevel9: TBevel - Left = 54 - Top = 13 - Width = 213 - Height = 4 - Shape = bsBottomLine - end - object lblPreviewLineCount: TLabel - Left = 90 - Top = 69 - Width = 99 - Height = 13 - Caption = 'Preview &Line Count: ' - OnClick = lblExpandLevelClick - end - object bvlPreviewLineCountHolder: TBevel - Left = 196 - Top = 66 - Width = 67 - Height = 21 - Visible = False - end - object lblPreview: TLabel - Left = 6 - Top = 9 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object imgPreview: TImage - Left = 9 - Top = 33 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDD7777777777777777777777777DDDDDD0000000000000000000000000 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F888F7FF888F7F8888F7F07DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCFFCCCCFFCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFCCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCFCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCFCCFCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCFFCCCFCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F7FCCCCCCCCCCCCCCCCCF7F07DDDDDD0F7FFFFFFFFFFFFFFFFFFF7F0 - 7DDDDDD0F777777777777777777777F07DDDDDD0F7F888F7FF888F7FF888F7F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0F7F88887F888887F888887F07DDDDDD0F7F00087F000087F000087F0 - 7DDDDDD0F7FFFFF7FFFFFF7FFFFFF7F07DDDDDD0F777777777777777777777F0 - 7DDDDDD0FFFFFFFFFFFFFFFFFFFFFFF07DDDDDD0000000000000000000000000 - DDDD} - Transparent = True - end - object chbxShowPreview: TCheckBox - Tag = 4 - Left = 90 - Top = 23 - Width = 169 - Height = 17 - Caption = 'Pre&view' - TabOrder = 0 - OnClick = chbxShowClick - end - object chbxAutoCalcPreviewLines: TCheckBox - Left = 90 - Top = 43 - Width = 169 - Height = 17 - Caption = '&Auto Calc Preview Lines' - TabOrder = 1 - OnClick = chbxAutoCalcPreviewLinesClick - end - end - end - object pnlPreview: TPanel - Left = 287 - Top = 44 - Width = 282 - Height = 343 - BevelInner = bvLowered - BevelOuter = bvNone - Color = clWindow - Ctl3D = True - ParentCtl3D = False - TabOrder = 1 - object dxTLPreview: TdxTreeList - Left = 7 - Top = 4 - Width = 268 - Height = 330 - Bands = < - item - Caption = 'Item Data' - Width = 201 - end> - DefaultLayout = False - HeaderPanelRowCount = 1 - BorderStyle = bsNone - Ctl3D = True - Enabled = False - ParentCtl3D = False - TabOrder = 0 - Visible = False - Images = ilTLImages - LookAndFeel = lfFlat - Options = [aoColumnSizing, aoColumnMoving, aoEditing, aoTabThrough, aoRowSelect, aoPreview, aoAutoWidth] - OptionsEx = [aoBandHeaderWidth, aoAutoCalcPreviewLines, aoBandSizing, aoBandMoving, aoDragScroll, aoDragExpand] - PaintStyle = psOutlook - StateImages = ilTLImages - TreeLineColor = clGrayText - ScrollBars = ssNone - ShowBands = True - ShowButtons = False - ShowGrid = True - ShowRowFooter = True - ShowFooter = True - OnCustomDrawBand = dxTLPreviewCustomDrawBand - OnCustomDrawColumnHeader = dxTLPreviewCustomDrawColumnHeader - OnCustomDrawCell = dxTLPreviewCustomDrawCell - OnCustomDrawFooterNode = dxTLPreviewCustomDrawFooterNode - OnCustomDrawFooter = dxTLPreviewCustomDrawFooter - OnCustomDrawPreviewCell = dxTLPreviewCustomDrawPreviewCell - OnGetFooterCellText = dxTLPreviewGetFooterCellText - OnGetPreviewLineCount = dxTLPreviewGetPreviewLineCount - OnGetPreviewText = dxTLPreviewGetPreviewText - OnIsExistRowFooterCell = dxTLPreviewIsExistRowFooterCell - OnIsExistFooterCell = dxTLPreviewIsExistFooterCell - OnIsLevelFooter = dxTLPreviewIsLevelFooter - Data = { - FFFFFFFF03000000180000000000000000000000010000000000000000000000 - 020000000D0000004E6F6465203120436F6C2023310D0000004E6F6465203120 - 436F6C2023331800000000000000000000000100000000000000020000000200 - 00000D0000004E6F6465203220436F6C20233104000000547275651800000000 - 0000000000000001000000000000000000000002000000090000005375624E6F - 6465203100000000180000000000000000000000010000000000000000000000 - 01000000090000005375624E6F64652032180000000000000000000000010000 - 000000000001000000020000000D0000004E6F6465203320436F6C2023310400 - 0000547275651800000000000000000000000100000000000000000000000200 - 0000090000005375624E6F64652033090000005375624E6F64652033} - object dxTLPreviewColumn1: TdxTreeListColumn - Alignment = taLeftJustify - Width = 117 - BandIndex = 0 - RowIndex = 0 - end - object dxTLPreviewColumn3: TdxTreeListCheckColumn - Caption = 'Axisymmetric' - Width = 83 - BandIndex = 0 - RowIndex = 0 - OnCustomDrawCell = dxTLPreviewColumn3CustomDrawCell - AllowGrayed = True - ShowNullFieldStyle = nsInactive - ValueChecked = 'True' - ValueUnchecked = 'False' - end - object dxTLPreviewColumn4: TdxTreeListImageColumn - Alignment = taLeftJustify - Caption = 'Shape' - MinWidth = 16 - Width = 68 - BandIndex = 0 - RowIndex = 0 - OnCustomDrawCell = dxTLPreviewColumn4CustomDrawCell - Images = ilTLImages - ImageIndexes.Strings = ( - '0' - '1' - '2' - '3' - '4' - '5' - '6') - Values.Strings = ( - '' - '' - '2' - '3' - '4' - '5' - '6') - end - end - end - object ilTLImages: TImageList - Left = 5 - Top = 404 - Bitmap = { - 494C010107000A00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000000000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FF000000FF000000000000008400000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000000000008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000FF0000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000000000008400000084000000840000008400 - 0000840000008400000000000000000000000000000000000000FF000000FF00 - 0000FF00000000000000FF000000FF000000FF00000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000FF000000FF00 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000000000008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000FF000000FF00 - 0000FF00000000000000FF000000FF000000FF00000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000FF000000FF00 - 0000FF0000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000000000008400000084000000840000008400 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000000084000000000000008400FF000000FF000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000FF000000FF00 - 0000FF000000FF00000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000000000008400000084000000840000008400 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000000084000000840000000000000084000000840000008400000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF0000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FF000000FF000000000000008400000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000000000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000000000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000840000008400000084000000000000008400000084000000 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FF000000FF000000FF000000FF00000084000000840000000000 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000000000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000008400000084000000840000000000000084000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF000000FF00000084000000840000008400 - 0000000000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000000000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000FF0000008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FF0000008400000084000000840000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000084000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF00000084000000FF00000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF00000084000000FF000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000840000008400000084000000FF000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000848484008484840084848400C6C6C60084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF0000008400000084000000000000008400 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000840000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 840084848400FFFFFF00C6C6C600FFFFFF00C6C6C60084848400848484000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF0000008400000084000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF0000FF0000FFFFFF0000FF000000FF000000840000008400000084 - 000000000000000000000000000000000000000000000000000084848400C6C6 - C600FFFFFF00C6C6C600FFFFFF00C6C6C600C6C6C60084848400848484008484 - 840000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF00000084000000FF0000008400000084000000840000008400 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF0000FFFFFF0000FF0000FFFFFF0000FF000000840000008400000084 - 000000840000000000000000000000000000000000000000000084848400FFFF - FF00C6C6C600FFFFFF00C6C6C600FFFFFF00C6C6C60084848400848484008484 - 840084848400000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF0000008400000084000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 0000FFFFFF00FFFFFF0000FF000000FF000000FF000000840000008400000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600FFFFFF00FFFFFF00C6C6C600C6C6C600C6C6C60084848400848484008484 - 840084848400000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF0000008400000084000000000000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 000000000000000000000000000000000000000000000000000000840000FFFF - FF0000FF000000FF000000FF000000FF000000FF000000FF0000008400000084 - 000000840000000000000000000000000000000000000000000084848400FFFF - FF00C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600848484008484 - 840084848400000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FF000000FF000000FF000000FF0000008400000000000000840000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6008484 - 840084848400000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF00000084000000FF0000008400000084000000840000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF0000008400000084000000000000000000 - 00000000000000000000000000000000000000000000000000000084000000FF - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF00000084 - 000000840000000000000000000000000000000000000000000084848400C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6008484 - 840084848400000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF00000084000000FF00000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF0000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000084 - 000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF - 0000008400000084000000000000000000000000000000000000000000008484 - 8400C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6 - C60084848400848484000000000000000000000000000000000000000000FF00 - 0000FF0000000000000000000000000000000000000000000000000000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000FF0000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000084000000FF000000FF000000FF000000FF000000FF0000008400000084 - 0000000000000000000000000000000000000000000000000000000000000000 - 000084848400C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF000000FF000000FF000000FF0000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FF000000FF0000008400000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000084000000FF000000FF00000084000000840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000084848400C6C6C600C6C6C6008484840084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FF00 - 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 - 0000FF0000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000840000008400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FF000000FF000000FF000000FF000000FF000000FF0000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFF0000FC7F003FFFFF0000 - F01F7FDF803F0000C0077FEF801F000000010077800F00000001003B80070000 - 8003003D80030000C007400180010000C007401D80010000E00F600DC0010000 - F01F7001E0010000F01FB805F0010000F83FDC0DF8010000FC7FEDFDFC010000 - FC7FF5FDFE010000FEFFF801FFFF0000FFFFFFFFFFFFFFFFFFFFFFFFF81FF83F - FF3FFF3FE007E00FF81FF81FC003C007E00FE00FC003C007C007C007C003C007 - C003C003C003C007C003C003C003E00FC003C003C003E00FC003C003C003F01F - C003C003C003F01FE003E003C003F83FF00FF00FC003F83FF83FF83FC003FC7F - FCFFFCFFE007FC7FFFFFFFFFF81FFEFF00000000000000000000000000000000 - 000000000000} - end - object pmChangeFont: TPopupMenu - OnPopup = pmChangeFontPopup - Left = 33 - Top = 404 - object miChangeFont: TMenuItem - Caption = 'Change Fo&nt ...' - Default = True - ShortCut = 16454 - OnClick = btnChangeFontClick - end - end -end diff --git a/internal/x.46/Lib/D11/dxPSfmAutoHFTextFmt.dcu b/internal/x.46/Lib/D11/dxPSfmAutoHFTextFmt.dcu deleted file mode 100644 index cb8dbf0c..00000000 Binary files a/internal/x.46/Lib/D11/dxPSfmAutoHFTextFmt.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSfmAutoHFTextFmt.dfm b/internal/x.46/Lib/D11/dxPSfmAutoHFTextFmt.dfm deleted file mode 100644 index 41ca70e3..00000000 --- a/internal/x.46/Lib/D11/dxPSfmAutoHFTextFmt.dfm +++ /dev/null @@ -1,124 +0,0 @@ -object dxfmAutoText: TdxfmAutoText - Left = 467 - Top = 306 - BorderStyle = bsDialog - Caption = 'AutoText' - ClientHeight = 358 - ClientWidth = 394 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object gbxEnterAutoTextEntriesHere: TGroupBox - Left = 4 - Top = 4 - Width = 387 - Height = 317 - Caption = ' Enter A&utoText Entries Here: ' - TabOrder = 0 - object lblPreview: TLabel - Left = 9 - Top = 215 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object ToolBar: TToolBar - Left = 9 - Top = 176 - Width = 275 - Height = 30 - Align = alNone - ButtonHeight = 24 - ButtonWidth = 25 - EdgeBorders = [ebLeft, ebTop, ebRight, ebBottom] - EdgeInner = esLowered - ParentShowHint = False - ShowHint = True - TabOrder = 3 - end - object btnAdd: TButton - Left = 289 - Top = 20 - Width = 90 - Height = 23 - Caption = '&Add' - Default = True - TabOrder = 1 - OnClick = btnAddClick - end - object btnDelete: TButton - Left = 289 - Top = 47 - Width = 90 - Height = 23 - Caption = '&Delete' - TabOrder = 2 - OnClick = btnDeleteClick - end - object cbxAutoEntries: TComboBox - Left = 9 - Top = 20 - Width = 274 - Height = 154 - Style = csSimple - ItemHeight = 13 - Sorted = True - TabOrder = 0 - OnChange = NewAutoTextChange - OnClick = AutoEntriesClick - OnEnter = cbxAutoEntriesEnter - OnExit = cbxAutoEntriesExit - OnKeyDown = NewAutoTextKeyDown - end - object Panel1: TPanel - Left = 9 - Top = 231 - Width = 370 - Height = 76 - BevelOuter = bvNone - Color = clWindow - TabOrder = 4 - object pbxPreview: TPaintBox - Left = 0 - Top = 0 - Width = 370 - Height = 76 - Align = alClient - Color = clBtnFace - ParentColor = False - OnPaint = pbxPreviewPaint - end - end - end - object btnOK: TButton - Left = 146 - Top = 329 - Width = 79 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 229 - Top = 329 - Width = 79 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 312 - Top = 329 - Width = 79 - Height = 23 - Caption = '&Help' - TabOrder = 3 - end -end diff --git a/internal/x.46/Lib/D11/dxPSfmCompositionAdd.dcu b/internal/x.46/Lib/D11/dxPSfmCompositionAdd.dcu deleted file mode 100644 index 95c3c175..00000000 Binary files a/internal/x.46/Lib/D11/dxPSfmCompositionAdd.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSfmCompositionAdd.dfm b/internal/x.46/Lib/D11/dxPSfmCompositionAdd.dfm deleted file mode 100644 index a2aa78c2..00000000 --- a/internal/x.46/Lib/D11/dxPSfmCompositionAdd.dfm +++ /dev/null @@ -1,106 +0,0 @@ -object dxfmCompositionAddItems: TdxfmCompositionAddItems - Left = 426 - Top = 382 - ActiveControl = lvItems - BorderStyle = bsDialog - Caption = 'Add Items to Composition' - ClientHeight = 381 - ClientWidth = 329 - Color = clBtnFace - Constraints.MinHeight = 250 - Constraints.MinWidth = 337 - OldCreateOrder = True - Position = poScreenCenter - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 87 - Top = 352 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 168 - Top = 352 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 249 - Top = 352 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = '&Help' - TabOrder = 3 - end - object pgctrlItems: TPageControl - Left = 5 - Top = 7 - Width = 319 - Height = 339 - ActivePage = tshItems - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - TabStop = False - object tshItems: TTabSheet - Caption = 'Available Items' - object lvItems: TListView - Left = 0 - Top = 0 - Width = 311 - Height = 280 - Align = alTop - Anchors = [akLeft, akTop, akRight, akBottom] - Columns = <> - ColumnClick = False - MultiSelect = True - ReadOnly = True - TabOrder = 0 - OnDblClick = lvItemsDblClick - end - object pnlNoItems: TPanel - Tag = 20 - Left = 19 - Top = 33 - Width = 277 - Height = 22 - BevelOuter = bvNone - Caption = 'There are no Items do Display' - Color = clWindow - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnShadow - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - TabOrder = 1 - end - object chbxHideIncludedItems: TCheckBox - Left = 2 - Top = 287 - Width = 303 - Height = 17 - Anchors = [akLeft, akRight, akBottom] - Caption = 'Hide Already Included Items' - Checked = True - State = cbChecked - TabOrder = 2 - OnClick = chbxHideIncludedItemsClick - end - end - end -end diff --git a/internal/x.46/Lib/D11/dxPSfmCompositionDsg.dcu b/internal/x.46/Lib/D11/dxPSfmCompositionDsg.dcu deleted file mode 100644 index 89cdf8bd..00000000 Binary files a/internal/x.46/Lib/D11/dxPSfmCompositionDsg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSfmCompositionDsg.dfm b/internal/x.46/Lib/D11/dxPSfmCompositionDsg.dfm deleted file mode 100644 index f827aaac..00000000 --- a/internal/x.46/Lib/D11/dxPSfmCompositionDsg.dfm +++ /dev/null @@ -1,610 +0,0 @@ -object dxfmCompositionDesignWindow: TdxfmCompositionDesignWindow - Left = 380 - Top = 267 - ActiveControl = lvItems - BorderStyle = bsDialog - Caption = 'Composition Designer' - ClientHeight = 279 - ClientWidth = 454 - Color = clBtnFace - Constraints.MinHeight = 278 - Constraints.MinWidth = 462 - KeyPreview = True - OldCreateOrder = True - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - OnKeyDown = FormKeyDown - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnClose: TButton - Left = 271 - Top = 251 - Width = 86 - Height = 23 - Caption = 'Close' - ModalResult = 1 - TabOrder = 1 - end - object pcItems: TPageControl - Left = 5 - Top = 7 - Width = 444 - Height = 237 - ActivePage = tbsItems - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - TabStop = False - object tbsItems: TTabSheet - Caption = 'Items' - OnResize = tbsItemsResize - object lvItems: TListView - Left = 0 - Top = 0 - Width = 347 - Height = 209 - Align = alLeft - Anchors = [akLeft, akTop, akRight, akBottom] - Columns = <> - ColumnClick = False - DragMode = dmAutomatic - MultiSelect = True - RowSelect = True - PopupMenu = pmItems - TabOrder = 0 - ViewStyle = vsReport - OnChange = lvItemsChange - OnDblClick = DesignerClick - OnEdited = lvItemsEdited - OnEditing = lvItemsEditing - OnDragDrop = lvItemsDragDrop - OnDragOver = lvItemsDragOver - OnStartDrag = lvItemsStartDrag - end - object btnMoveDown: TButton - Left = 353 - Top = 134 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = 'Move Down' - TabOrder = 5 - OnClick = MoveDownClick - end - object btnMoveUp: TButton - Left = 353 - Top = 106 - Width = 79 - Height = 23 - Anchors = [akTop, akRight] - Caption = 'Move Up' - TabOrder = 4 - OnClick = MoveUpClick - end - object btnDesign: TButton - Left = 353 - Top = 69 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = 'Desi&gn...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - OnClick = DesignerClick - end - object btnDelete: TButton - Left = 353 - Top = 32 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Delete...' - TabOrder = 2 - OnClick = DeleteClick - end - object btnAdd: TButton - Left = 353 - Top = 5 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Add...' - TabOrder = 1 - OnClick = AddClick - end - object pnlNoItems: TPanel - Left = 60 - Top = 99 - Width = 248 - Height = 23 - BevelOuter = bvNone - Caption = 'There are no Items to dispay' - Color = clWindow - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnShadow - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - TabOrder = 6 - end - end - end - object btnHelp: TButton - Left = 363 - Top = 251 - Width = 86 - Height = 23 - Caption = '&Help' - TabOrder = 2 - end - object pmItems: TPopupMenu - Images = ilItems - OnPopup = pmItemsPopup - Left = 4 - Top = 248 - object miAdd: TMenuItem - Caption = '&Add...' - ImageIndex = 1 - ShortCut = 45 - OnClick = AddClick - end - object miDelete: TMenuItem - Caption = '&Delete' - ImageIndex = 2 - ShortCut = 46 - OnClick = DeleteClick - end - object N1: TMenuItem - Caption = '-' - end - object miRename: TMenuItem - Caption = 'Rena&me' - ShortCut = 113 - OnClick = RenameClick - end - object miSelectAll: TMenuItem - Caption = 'Select All' - ShortCut = 16449 - OnClick = SelectAllClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miDesign: TMenuItem - Caption = 'Desi&gn...' - Default = True - ImageIndex = 0 - ShortCut = 16397 - OnClick = DesignerClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miMoveUp: TMenuItem - Caption = 'Move &Up' - ImageIndex = 3 - ShortCut = 16422 - OnClick = MoveUpClick - end - object miMoveDown: TMenuItem - Caption = 'Move &Down' - ImageIndex = 4 - ShortCut = 16424 - OnClick = MoveDownClick - end - end - object ilItems: TImageList - Left = 32 - Top = 248 - Bitmap = { - 494C010105000A00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000808000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080000080800000808000008080000080800000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000808000008080000080800000808000008080000080800000808000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F00000000007F7F - 7F007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F00000000000000000000000000000000000000000000000000000000000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00000000000000000000BFBFBF00BFBFBF00BFBFBF0000000000000000000000 - 000000000000000000007F7F7F0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF00BFBFBF00000000007F7F7F00BFBF - BF0000000000000000007F7F7F0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00BFBFBF007F7F7F0000000000BFBFBF007F7F7F007F7F - 7F007F7F7F007F7F7F007F7F7F0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00BFBFBF0000000000FFFFFF00FFFFFF0000000000BFBFBF000000 - 00000000000000000000000000007F7F7F00000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF000000 - 0000BFBFBF0000000000BFBFBF00BFBFBF00BFBFBF00FFFFFF007F7F7F000000 - 0000BFBFBF00BFBFBF00000000007F7F7F00000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF00BFBF - BF00FFFFFF00000000007F7F7F0000000000BFBFBF00FFFFFF007F7F7F00BFBF - BF00BFBFBF00BFBFBF00000000007F7F7F00000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000000000000000 - 0000FFFFFF00000000007F7F7F007F7F7F00BFBFBF0000000000BFBFBF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000808000008080000080800000808000008080000080800000808000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00FFFFFF00000000000000000000000000BFBFBF00BFBFBF000000 - 0000000000007F7F7F000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080000080800000808000008080000080800000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00FFFFFF00FFFFFF00BFBFBF00BFBFBF007F7F7F007F7F - 7F007F7F7F00000000007F7F7F0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF000000000000000000BFBFBF00BFBF - BF00000000007F7F7F000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000808000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00007F7F7F0000000000BFBFBF00BFBFBF00BFBFBF00000000007F7F7F000000 - 00007F7F7F00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F0000000000000000000000000000000000000000007F7F7F00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFF000000000000FFFF000000000000 - FFFF000000000000FFFF000000000000FEFF000000000000FC7F000000000000 - F83F000000000000F01F000000000000E00F000000000000C007000000000000 - F83F000000000000F83F000000000000F83F000000000000F83F000000000000 - FFFF000000000000FFFF000000000000FC7FFFFFFFFFFFFFFC27FFFFFFFFFFFF - EC23C007FFF9FFFFC401C007E7FFFFFF8001C007C3F3F83FC001C007C3E7F83F - E000C007E1C7F83F0000C007F08FF83F0000C007F81FC0070003C007FC3FE00F - E003C007F81FF01FC001C007F09FF83F8003C00FC1C7FC7FC407C01F83E3FEFF - EC3FC03F8FF1FFFFFC7FFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPSfmLnkAdd.dcu b/internal/x.46/Lib/D11/dxPSfmLnkAdd.dcu deleted file mode 100644 index 8cf26bec..00000000 Binary files a/internal/x.46/Lib/D11/dxPSfmLnkAdd.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSfmLnkAdd.dfm b/internal/x.46/Lib/D11/dxPSfmLnkAdd.dfm deleted file mode 100644 index 44912ee3..00000000 --- a/internal/x.46/Lib/D11/dxPSfmLnkAdd.dfm +++ /dev/null @@ -1,496 +0,0 @@ -object dxfmAddComponent: TdxfmAddComponent - Left = 675 - Top = 331 - BorderStyle = bsDialog - ClientHeight = 457 - ClientWidth = 392 - Color = clBtnFace - Constraints.MinHeight = 400 - Constraints.MinWidth = 400 - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000000000000000000000FFFFFFFFF0000000F - FFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000F - FFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000FFFFFF0000000000F - FFFFF0F00000000FFFFFF000000000000000000000000000000000000000FFFF - 0000FFFF0000C0070000C0070000C0070000C0070000C0070000C0070000C007 - 0000C0070000C0070000C0070000C00F0000C01F0000C03F0000FFFF0000} - OldCreateOrder = True - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - OnCreate = FormCreate - OnDestroy = FormDestroy - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlHost: TPanel - Left = 6 - Top = 5 - Width = 380 - Height = 417 - Anchors = [akLeft, akTop, akRight, akBottom] - BevelOuter = bvNone - TabOrder = 4 - object pgctrlItems: TPageControl - Left = 0 - Top = 104 - Width = 380 - Height = 313 - ActivePage = tbsItems - Align = alClient - TabOrder = 4 - TabStop = False - object tbsItems: TTabSheet - Caption = '&Available Components' - object pnlBottomHost: TPanel - Left = 0 - Top = 211 - Width = 372 - Height = 74 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object bvlOnlyUnLinked: TBevel - Left = 0 - Top = 50 - Width = 372 - Height = 24 - Align = alTop - Shape = bsSpacer - end - object bvlHideCustomContainers: TBevel - Left = 0 - Top = 0 - Width = 372 - Height = 26 - Align = alTop - Shape = bsSpacer - end - object bvlOnlyInCurrentModule: TBevel - Left = 0 - Top = 26 - Width = 372 - Height = 24 - Align = alTop - Shape = bsSpacer - end - object chbxOnlyUnLinked: TCheckBox - Left = 7 - Top = 53 - Width = 253 - Height = 17 - Caption = 'Only Components &without Existing ReportLinks' - TabOrder = 2 - OnClick = chbxClick - end - object chbxOnlyInCurrentModule: TCheckBox - Left = 7 - Top = 29 - Width = 258 - Height = 17 - Caption = 'Only Components in the Active &Form' - TabOrder = 1 - OnClick = chbxClick - end - object chbxHideCustomContainers: TCheckBox - Left = 7 - Top = 5 - Width = 253 - Height = 17 - Caption = 'Hide Custom Containers' - TabOrder = 0 - OnClick = chbxClick - end - end - object lvItems: TListView - Left = 0 - Top = 0 - Width = 372 - Height = 211 - Align = alClient - Columns = <> - HideSelection = False - MultiSelect = True - ReadOnly = True - RowSelect = True - PopupMenu = pmItems - TabOrder = 0 - ViewStyle = vsReport - OnChange = lvItemsChange - OnColumnClick = lvItemsColumnClick - OnCompare = lvItemsCompare - OnDblClick = lvItemsDblClick - end - object pnlNoItems: TPanel - Left = 48 - Top = 72 - Width = 266 - Height = 22 - BevelOuter = bvNone - Caption = 'There are no Items in this View' - Color = clWindow - Font.Charset = DEFAULT_CHARSET - Font.Color = clBtnShadow - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - TabOrder = 2 - end - end - end - object pnlNameHost: TPanel - Left = 0 - Top = 0 - Width = 380 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblName: TLabel - Left = 6 - Top = 8 - Width = 31 - Height = 13 - Caption = '&Name:' - FocusControl = edName - end - object edName: TEdit - Left = 55 - Top = 5 - Width = 230 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - end - object pnlCreatorHost: TPanel - Left = 0 - Top = 60 - Width = 380 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object lblCreator: TLabel - Left = 6 - Top = 10 - Width = 41 - Height = 13 - Caption = 'Creato&r:' - FocusControl = edCreator - end - object edCreator: TEdit - Left = 55 - Top = 6 - Width = 230 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - object btnDescription: TButton - Left = 294 - Top = 6 - Width = 83 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Description...' - TabOrder = 1 - OnClick = btnDescriptionClick - end - end - object pnlSeparatorHost: TPanel - Left = 0 - Top = 90 - Width = 380 - Height = 14 - Align = alTop - BevelOuter = bvNone - TabOrder = 3 - object bvlSeparator: TBevel - Left = 0 - Top = 0 - Width = 380 - Height = 4 - Align = alTop - Shape = bsBottomLine - end - end - object pnlCaptionHost: TPanel - Left = 0 - Top = 30 - Width = 380 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblCaption: TLabel - Left = 6 - Top = 9 - Width = 41 - Height = 13 - Caption = '&Caption:' - FocusControl = edCaption - end - object edCaption: TEdit - Left = 55 - Top = 5 - Width = 230 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - end - end - object btnOK: TButton - Left = 68 - Top = 429 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 0 - end - object btnCancel: TButton - Left = 149 - Top = 429 - Width = 75 - Height = 23 - Cancel = True - Caption = 'OK' - ModalResult = 2 - TabOrder = 1 - end - object btnHelp: TButton - Left = 311 - Top = 429 - Width = 75 - Height = 23 - Caption = 'OK' - TabOrder = 3 - end - object btnDesign: TButton - Left = 230 - Top = 429 - Width = 75 - Height = 23 - Caption = 'OK' - TabOrder = 2 - OnClick = btnDesignClick - end - object ilItems: TImageList - AllocBy = 3 - Left = 2 - Top = 427 - Bitmap = { - 494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000001000000001002000000000000010 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F00000000007F7F - 7F007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F00000000000000000000000000000000000000000000000000000000000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00000000000000000000BFBFBF00BFBFBF00BFBFBF0000000000000000000000 - 000000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF00BFBFBF00000000007F7F7F00BFBF - BF0000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00BFBFBF007F7F7F0000000000BFBFBF007F7F7F007F7F - 7F007F7F7F007F7F7F007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00BFBFBF0000000000FFFFFF00FFFFFF0000000000BFBFBF000000 - 00000000000000000000000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF000000 - 0000BFBFBF0000000000BFBFBF00BFBFBF00BFBFBF00FFFFFF007F7F7F000000 - 0000BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF00BFBF - BF00FFFFFF00000000007F7F7F0000000000BFBFBF00FFFFFF007F7F7F00BFBF - BF00BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000000000000000 - 0000FFFFFF00000000007F7F7F007F7F7F00BFBFBF0000000000BFBFBF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00FFFFFF00000000000000000000000000BFBFBF00BFBFBF000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00FFFFFF00FFFFFF00BFBFBF00BFBFBF007F7F7F007F7F - 7F007F7F7F00000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF000000000000000000BFBFBF00BFBF - BF00000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00007F7F7F0000000000BFBFBF00BFBFBF00BFBFBF00000000007F7F7F000000 - 00007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F0000000000000000000000000000000000000000007F7F7F00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000100000000100010000000000800000000000000000000000 - 000000000000000000000000FFFFFF00FC7F000000000000FC27000000000000 - EC23000000000000C4010000000000008001000000000000C001000000000000 - E000000000000000000000000000000000000000000000000003000000000000 - E003000000000000C0010000000000008003000000000000C407000000000000 - EC3F000000000000FC7F00000000000000000000000000000000000000000000 - 000000000000} - end - object pmItems: TPopupMenu - Images = ilItems - OnPopup = pmItemsPopup - Left = 30 - Top = 427 - object miAdd: TMenuItem - Caption = '&Add' - Default = True - OnClick = lvItemsDblClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miDesign: TMenuItem - Caption = 'Add and D&esign Report...' - ImageIndex = 0 - OnClick = btnDesignClick - end - end - object ilColumns: TImageList - AllocBy = 2 - Height = 8 - Width = 8 - Left = 58 - Top = 427 - Bitmap = { - 494C010102000400040008000800FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000200000000800000001002000000000000004 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000000000000000000000000000000000008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800000000000000000000000000000000000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000808080000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000020000000080000000100010000000000200000000000000000000000 - 000000000000000000000000FFFFFF00FFFF0000FFFF000080F70000C1E30000 - E3C10000F7800000FFFF0000FFFF000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPSfmLnkAdde.dcu b/internal/x.46/Lib/D11/dxPSfmLnkAdde.dcu deleted file mode 100644 index d69596e3..00000000 Binary files a/internal/x.46/Lib/D11/dxPSfmLnkAdde.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSfmLnkAdde.dfm b/internal/x.46/Lib/D11/dxPSfmLnkAdde.dfm deleted file mode 100644 index 62410c8d..00000000 --- a/internal/x.46/Lib/D11/dxPSfmLnkAdde.dfm +++ /dev/null @@ -1,428 +0,0 @@ -object dxfmAddReportLinkClass: TdxfmAddReportLinkClass - Left = 472 - Top = 300 - BorderStyle = bsDialog - Caption = 'Add Report' - ClientHeight = 463 - ClientWidth = 430 - Color = clBtnFace - Constraints.MinHeight = 350 - Constraints.MinWidth = 438 - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000000000000000000000FFFFFFFFF0000000F - FFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000F - FFFFFFFF0000000FFFFFFFFF0000000FFFFFFFFF0000000FFFFFF0000000000F - FFFFF0F00000000FFFFFF000000000000000000000000000000000000000FFFF - 0000FFFF0000C0070000C0070000C0070000C0070000C0070000C0070000C007 - 0000C0070000C0070000C0070000C00F0000C01F0000C03F0000FFFF0000} - OldCreateOrder = True - Position = poScreenCenter - OnCreate = FormCreate - OnDestroy = FormDestroy - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 107 - Top = 433 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 0 - end - object btnCancel: TButton - Left = 188 - Top = 433 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - object btnHelp: TButton - Left = 350 - Top = 433 - Width = 75 - Height = 23 - Caption = '&Help' - TabOrder = 3 - OnClick = btnHelpClick - end - object btnDesign: TButton - Left = 269 - Top = 433 - Width = 75 - Height = 23 - Caption = 'D&esign...' - TabOrder = 2 - OnClick = btnDesignClick - end - object pnlHost: TPanel - Left = 5 - Top = 3 - Width = 420 - Height = 422 - Anchors = [akLeft, akTop, akRight, akBottom] - BevelOuter = bvNone - TabOrder = 4 - object pnlNameHost: TPanel - Left = 0 - Top = 0 - Width = 420 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblName: TLabel - Left = 6 - Top = 7 - Width = 31 - Height = 13 - Caption = '&Name:' - FocusControl = edName - end - object edName: TEdit - Left = 55 - Top = 4 - Width = 271 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - end - object pnlCaptionHost: TPanel - Left = 0 - Top = 30 - Width = 420 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblCaption: TLabel - Left = 6 - Top = 9 - Width = 41 - Height = 13 - Caption = '&Caption:' - FocusControl = edCaption - end - object edCaption: TEdit - Left = 55 - Top = 5 - Width = 271 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - end - object pnlSeparatorHost: TPanel - Left = 0 - Top = 90 - Width = 420 - Height = 14 - Align = alTop - BevelOuter = bvNone - TabOrder = 3 - object bvlSeparator: TBevel - Left = 0 - Top = 0 - Width = 420 - Height = 4 - Align = alTop - Shape = bsBottomLine - end - end - object pgctrlItems: TPageControl - Left = 0 - Top = 104 - Width = 420 - Height = 318 - ActivePage = tbsItems - Align = alClient - TabOrder = 4 - TabStop = False - object tbsItems: TTabSheet - Caption = ' &Active Report Links ' - object lvItems: TListView - Left = 0 - Top = 0 - Width = 412 - Height = 290 - Align = alClient - Columns = < - item - Caption = 'Supported Component Class(es)' - Width = 200 - end - item - Caption = 'ReportLink Class(es)' - Width = 200 - end> - HideSelection = False - ReadOnly = True - RowSelect = True - PopupMenu = pmLinks - SortType = stText - TabOrder = 0 - ViewStyle = vsReport - OnChange = lvItemsChange - OnColumnClick = lvItemsColumnClick - OnCompare = lvItemsCompare - OnCustomDrawItem = lvItemsCustomDrawItem - OnDblClick = lvItemsDblClick - end - end - end - object pnlCreatorHost: TPanel - Left = 0 - Top = 60 - Width = 420 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object lblCreator: TLabel - Left = 6 - Top = 9 - Width = 41 - Height = 13 - Caption = 'Creato&r:' - FocusControl = edCreator - end - object edCreator: TEdit - Left = 55 - Top = 5 - Width = 271 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - end - object btnDescription: TButton - Left = 334 - Top = 4 - Width = 83 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Description...' - TabOrder = 1 - OnClick = btnDescriptionClick - end - end - end - object ilLinks: TImageList - AllocBy = 3 - Left = 7 - Top = 429 - Bitmap = { - 494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000001000000001002000000000000010 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F00000000007F7F - 7F007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F00000000000000000000000000000000000000000000000000000000000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00000000000000000000BFBFBF00BFBFBF00BFBFBF0000000000000000000000 - 000000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF00BFBFBF00000000007F7F7F00BFBF - BF0000000000000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00BFBFBF007F7F7F0000000000BFBFBF007F7F7F007F7F - 7F007F7F7F007F7F7F007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00BFBFBF0000000000FFFFFF00FFFFFF0000000000BFBFBF000000 - 00000000000000000000000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF000000 - 0000BFBFBF0000000000BFBFBF00BFBFBF00BFBFBF00FFFFFF007F7F7F000000 - 0000BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000BFBFBF00BFBF - BF00FFFFFF00000000007F7F7F0000000000BFBFBF00FFFFFF007F7F7F00BFBF - BF00BFBFBF00BFBFBF00000000007F7F7F000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000007F7F7F0000000000000000000000 - 0000FFFFFF00000000007F7F7F007F7F7F00BFBFBF0000000000BFBFBF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BFBFBF00FFFFFF00000000000000000000000000BFBFBF00BFBFBF000000 - 0000000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F00BFBF - BF007F7F7F00BFBFBF00FFFFFF00FFFFFF00BFBFBF00BFBFBF007F7F7F007F7F - 7F007F7F7F00000000007F7F7F00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F0000000000BFBF - BF007F7F7F000000000000000000BFBFBF000000000000000000BFBFBF00BFBF - BF00000000007F7F7F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007F7F7F000000 - 00007F7F7F0000000000BFBFBF00BFBFBF00BFBFBF00000000007F7F7F000000 - 00007F7F7F000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F0000000000000000000000000000000000000000007F7F7F00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007F7F7F007F7F7F007F7F7F0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000100000000100010000000000800000000000000000000000 - 000000000000000000000000FFFFFF00FC7F000000000000FC27000000000000 - EC23000000000000C4010000000000008001000000000000C001000000000000 - E000000000000000000000000000000000000000000000000003000000000000 - E003000000000000C0010000000000008003000000000000C407000000000000 - EC3F000000000000FC7F00000000000000000000000000000000000000000000 - 000000000000} - end - object pmLinks: TPopupMenu - OnPopup = pmLinksPopup - Left = 35 - Top = 429 - object miSelect: TMenuItem - Caption = '&Add Report' - Default = True - OnClick = lvItemsDblClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miDesign: TMenuItem - Caption = 'Add and D&esign Report...' - OnClick = btnDesignClick - end - end - object ilColumns: TImageList - AllocBy = 2 - Height = 8 - Width = 8 - Left = 63 - Top = 429 - Bitmap = { - 494C010102000400040008000800FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000200000000800000001002000000000000004 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000000000000000000000000000000000008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800000000000000000000000000000000000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000808080000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000020000000080000000100010000000000200000000000000000000000 - 000000000000000000000000FFFFFF00FFFF0000FFFF000080F70000C1E30000 - E3C10000F7800000FFFF0000FFFF000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPSfmLnkDsg.dcu b/internal/x.46/Lib/D11/dxPSfmLnkDsg.dcu deleted file mode 100644 index 5b35e609..00000000 Binary files a/internal/x.46/Lib/D11/dxPSfmLnkDsg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSfmLnkDsg.dfm b/internal/x.46/Lib/D11/dxPSfmLnkDsg.dfm deleted file mode 100644 index fa01efab..00000000 --- a/internal/x.46/Lib/D11/dxPSfmLnkDsg.dfm +++ /dev/null @@ -1,934 +0,0 @@ -object dxfmReportLinkDesignWindow: TdxfmReportLinkDesignWindow - Left = 699 - Top = 105 - BorderStyle = bsDialog - Caption = 'Report Links' - ClientHeight = 343 - ClientWidth = 367 - Color = clBtnFace - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000FFFFFFFFFF000000F00F00000F000000FFF - FFFFFFF000000F00F00000F000000FFFFFFFFFF000000FFFFFFF0FF000000F00 - FFF080F000000F080F08080000440FF080808088804400000808088888440000 - 008088888844000000088888804400000000000000440000000000000000FFFF - 0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F - 0000000400000000000000000000F8000000FC000000FE040000FFFF0000} - KeyPreview = True - OldCreateOrder = True - OnClose = FormClose - OnKeyDown = FormKeyDown - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlButtons: TPanel - Left = 240 - Top = 0 - Width = 127 - Height = 343 - Align = alRight - BevelOuter = bvNone - TabOrder = 0 - object btnAdd: TButton - Left = 5 - Top = 4 - Width = 98 - Height = 22 - Caption = '&Add...' - TabOrder = 0 - OnClick = AddClick - end - object btnDelete: TButton - Tag = 4 - Left = 5 - Top = 31 - Width = 119 - Height = 22 - Caption = '&Delete' - TabOrder = 2 - OnClick = EditClick - end - object btnShowDesigner: TButton - Left = 5 - Top = 147 - Width = 119 - Height = 22 - Caption = 'Show D&esigner...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - OnClick = LinkDesignClick - end - object btnSelectAll: TButton - Tag = 6 - Left = 5 - Top = 58 - Width = 119 - Height = 22 - Caption = 'Se&lect All' - TabOrder = 3 - OnClick = EditClick - end - object btnRestoreOriginal: TButton - Left = 5 - Top = 233 - Width = 119 - Height = 22 - Caption = 'Rest&ore Or&iginal' - TabOrder = 9 - OnClick = RestoreOriginalClick - end - object btnChangeComponent: TButton - Tag = 3 - Left = 5 - Top = 174 - Width = 119 - Height = 22 - Caption = 'C&hange Component...' - TabOrder = 7 - OnClick = LinkChangeComponentClick - end - object btnPrintPreview: TButton - Tag = 2 - Left = 5 - Top = 291 - Width = 119 - Height = 22 - Caption = 'Pre&view...' - TabOrder = 11 - OnClick = PrintPreviewClick - end - object btnPrint: TButton - Tag = 3 - Left = 5 - Top = 318 - Width = 119 - Height = 22 - Caption = 'Print...' - TabOrder = 12 - OnClick = PrintClick - end - object btnPageSetup: TButton - Tag = 1 - Left = 5 - Top = 264 - Width = 119 - Height = 22 - Caption = 'Pa&ge Setup...' - TabOrder = 10 - OnClick = PageSetupClick - end - object btnMoveUp: TButton - Left = 5 - Top = 89 - Width = 119 - Height = 22 - Caption = 'Move &Up' - TabOrder = 4 - OnClick = MoveUpClick - end - object btnMoveDown: TButton - Tag = 1 - Left = 5 - Top = 116 - Width = 119 - Height = 22 - Caption = 'Move Dow&n' - TabOrder = 5 - OnClick = MoveDownClick - end - object btnRestoreDefaults: TButton - Left = 5 - Top = 206 - Width = 119 - Height = 22 - Caption = 'Rest&ore Defaults' - TabOrder = 8 - OnClick = RestoreDefaultsClick - end - object btnDropDownMenu: TButton - Left = 103 - Top = 4 - Width = 21 - Height = 22 - Caption = '6' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -19 - Font.Name = 'Marlett' - Font.Style = [] - ParentFont = False - TabOrder = 1 - OnClick = btnDropDownMenuClick - end - end - object lbxLinks: TListBox - Left = 0 - Top = 0 - Width = 240 - Height = 343 - Style = lbOwnerDrawVariable - Align = alClient - Ctl3D = True - DragMode = dmAutomatic - ItemHeight = 16 - MultiSelect = True - ParentCtl3D = False - PopupMenu = pmLinks - TabOrder = 1 - OnClick = lbxLinksClick - OnDblClick = lbxLinksDblClick - OnDragDrop = lbxLinksDragDrop - OnDragOver = lbxLinksDragOver - OnDrawItem = lbxLinksDrawItem - OnEndDrag = lbxLinksEndDrag - OnKeyPress = lbxLinksKeyPress - OnMeasureItem = lbxLinksMeasureItem - OnStartDrag = lbxLinksStartDrag - end - object pmLinks: TPopupMenu - Images = ilLinks - OnPopup = pmLinksPopup - Left = 7 - Top = 6 - object miAdd: TMenuItem - Caption = '&Add...' - ImageIndex = 0 - ShortCut = 45 - OnClick = AddClick - end - object miAddComposition: TMenuItem - Caption = 'Add Composition...' - ImageIndex = 1 - OnClick = AddCompositionClick - end - object miLine7: TMenuItem - Caption = '-' - end - object miAddExisting: TMenuItem - Caption = 'Add Existing' - ShortCut = 32813 - OnClick = AddExistingClick - end - object miAddStandard: TMenuItem - Caption = 'Add Standard Link...' - ShortCut = 16429 - OnClick = AddStandardClick - end - object miLine5: TMenuItem - Caption = '-' - end - object miEdit: TMenuItem - Caption = '&Edit' - object miCut: TMenuItem - Tag = 2 - Caption = 'Cu&t' - ImageIndex = 3 - ShortCut = 16472 - OnClick = EditClick - end - object miCopy: TMenuItem - Tag = 1 - Caption = '&Copy' - ImageIndex = 2 - ShortCut = 16451 - OnClick = EditClick - end - object miPaste: TMenuItem - Tag = 3 - Caption = '&Paste' - ImageIndex = 4 - ShortCut = 16470 - OnClick = EditClick - end - object miDelete: TMenuItem - Tag = 4 - Caption = '&Delete' - ImageIndex = 5 - ShortCut = 46 - OnClick = EditClick - end - object N3: TMenuItem - Caption = '-' - end - object miSelectAll: TMenuItem - Tag = 6 - Caption = 'Se&lect All' - ShortCut = 16449 - OnClick = EditClick - end - end - object N2: TMenuItem - Caption = '-' - end - object miMoveUp: TMenuItem - Caption = 'Move &Up' - ImageIndex = 10 - ShortCut = 16422 - OnClick = MoveUpClick - end - object miMoveDown: TMenuItem - Caption = 'Move Dow&n' - ImageIndex = 11 - ShortCut = 16424 - OnClick = MoveDownClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miShowDesigner: TMenuItem - Caption = 'Show Designer...' - Default = True - ImageIndex = 6 - ShortCut = 16397 - OnClick = LinkDesignClick - end - object miSetAsCurrent: TMenuItem - Caption = '&Make Current' - ShortCut = 16416 - OnClick = SetAsCurrentClick - end - object miChangeComponent: TMenuItem - Caption = 'C&hange Component...' - OnClick = LinkChangeComponentClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miRestoreDefaults: TMenuItem - Caption = 'Rest&ore Defaults' - ShortCut = 16463 - OnClick = RestoreDefaultsClick - end - object miRestoreOriginal: TMenuItem - Caption = 'Rest&ore Or&iginal' - ShortCut = 16457 - OnClick = RestoreOriginalClick - end - object miLine3: TMenuItem - Caption = '-' - end - object miPageSetup: TMenuItem - Tag = 1 - Caption = 'Pa&ge Setup...' - ImageIndex = 7 - OnClick = PageSetupClick - end - object miPrintPreview: TMenuItem - Tag = 2 - Caption = 'Print Pre&view...' - ImageIndex = 8 - OnClick = PrintPreviewClick - end - object miPrint: TMenuItem - Tag = 3 - Caption = '&Print...' - ImageIndex = 9 - ShortCut = 16464 - OnClick = PrintClick - end - object N1: TMenuItem - Caption = '-' - end - object miBackground: TMenuItem - Caption = 'Bac&kground' - object miBackgroundEffects: TMenuItem - Tag = 4 - Caption = 'E&ffects...' - ImageIndex = 12 - OnClick = BackgroundClick - end - object miBackgroundClear: TMenuItem - Tag = 5 - Caption = 'Clear' - OnClick = ClearBackgroundClick - end - end - object miLine: TMenuItem - Caption = '-' - end - object miShowButtons: TMenuItem - Caption = 'Show &Button Bar' - Checked = True - OnClick = ShowButtonsClick - end - end - object ilLinks: TImageList - Left = 63 - Top = 6 - Bitmap = { - 494C01010D000E00040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000004000000001002000000000000040 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF000000000000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484000000 - 00008484840000000000FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400848484008484840000000000FFFFFF00FFFFFF0000FFFF0084848400FFFF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600848484008484840000000000FFFFFF00FFFFFF00840000008484 - 8400FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00C6C6C600C6C6 - C600C6C6C600C6C6C60084848400848484000000000000FFFF00840000008400 - 0000FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000C6C6C600FFFFFF00FFFFFF00C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084000000840000008400 - 0000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600FFFFFF00FFFF - FF00C6C6C60000000000C6C6C600C6C6C6008484840084000000840000008400 - 0000FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000C6C6C600FFFF - FF00000000008400000000000000C6C6C6008400000084000000840000008484 - 8400FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600FFFFFF0084000000C6C6C60084848400840000008400000084848400FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000840000000000 - 0000C6C6C60084000000848484000000000084848400FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084000000C6C6 - C60000000000840000000000000084848400FFFFFF0000FFFF00FFFFFF008484 - 8400C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084000000C6C6 - C600C6C6C600840000008484840000FFFF00FFFFFF00FFFFFF00FFFFFF008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008400 - 0000840000008484840084848400848484008484840084848400848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C60000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000084848400C6C6C600C6C6C6008484 - 84000000000084848400000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C60000FFFF0000FFFF0000FFFF00C6C6C600C6C6 - C600000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000084848400C6C6C600C6C6C600FFFF00008484 - 84008484840000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400C6C6C600C6C6 - C60000000000C6C6C60000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000C6C6C600C6C6C600C6C6C600C6C6C6008484 - 8400C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000C6C6C600C6C6C600000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000C6C6C600FFFF0000C6C6C600C6C6C6008484 - 8400C6C6C60000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C60000000000C6C6C600000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF000000000084848400FFFF0000FFFF0000C6C6C6008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C60000000000C6C6C60000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000000084848400C6C6C600C6C6C6008484 - 840000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000C6C6C60000000000C6C6C600848484000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFF00008484 - 0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C6C6C600000000000000 - 0000000000000000000000000000000000000000000084848400000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - 0000848400000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00848484008484 - 0000FFFF0000FFFF0000FFFF0000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007B7B7B007B7B7B007B7B7B0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007B7B7B00000000007B7B - 7B007B7B7B000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000007B7B - 7B00000000000000000000000000000000000000000000000000000000000000 - 0000000000007B7B7B0000000000000000000000000000000000000000000000 - 0000000000008400000084000000840000008400000084000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF008400000084000000840000008400 - 00008400000084000000FFFFFF00840000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000007B7B7B000000 - 00000000000000000000BDBDBD00BDBDBD00BDBDBD0000000000000000000000 - 000000000000000000007B7B7B00000000008400000084000000840000008400 - 0000840000008400000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00840000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000007B7B7B0000000000BDBD - BD007B7B7B000000000000000000BDBDBD00BDBDBD00000000007B7B7B00BDBD - BD0000000000000000007B7B7B00000000008400000084000000840000008400 - 000084000000840000008484840084000000FFFFFF0084000000840000008400 - 0000840000008400000084000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00840000008400000084000000FFFF - FF00840000008400000084000000840000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000000000007B7B7B00BDBD - BD007B7B7B00BDBDBD00BDBDBD007B7B7B0000000000BDBDBD007B7B7B007B7B - 7B007B7B7B007B7B7B007B7B7B00000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0084000000FFFFFF0084000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000BDBDBD00BDBDBD0000000000FFFFFF00FFFFFF0000000000BDBDBD000000 - 00000000000000000000000000007B7B7B008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000007B7B7B0000000000BDBDBD000000 - 0000BDBDBD0000000000BDBDBD00BDBDBD00BDBDBD00FFFFFF007B7B7B000000 - 0000BDBDBD00BDBDBD00000000007B7B7B008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000848400848484000084 - 8400848484000084840084000000840000008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000007B7B7B0000000000BDBDBD00BDBD - BD00FFFFFF00000000007B7B7B0000000000BDBDBD00FFFFFF007B7B7B00BDBD - BD00BDBDBD00BDBDBD00000000007B7B7B008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000084848400008484008484 - 8400008484008484840000848400848484000084840084848400008484008484 - 8400008484000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000007B7B7B0000000000000000000000 - 0000FFFFFF00000000007B7B7B007B7B7B00BDBDBD0000000000BDBDBD000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000848400848484000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000BDBDBD00FFFFFF00000000000000000000000000BDBDBD00BDBDBD000000 - 0000000000007B7B7B0000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000084848400848484000000 - 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600000000008484 - 8400008484000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 00000000000000000000000000000000000000000000000000007B7B7B00BDBD - BD007B7B7B00BDBDBD00FFFFFF00FFFFFF00BDBDBD00BDBDBD007B7B7B007B7B - 7B007B7B7B00000000007B7B7B00000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000848400848484000084 - 84000000000000FFFF00000000000000000000FFFF0000000000848484000084 - 8400848484000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000007B7B7B0000000000BDBD - BD007B7B7B000000000000000000BDBDBD000000000000000000BDBDBD00BDBD - BD00000000007B7B7B0000000000000000008400000084000000848484008484 - 84008484840084848400840000000000000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000000FFFF0000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF00000000000000000000000000000000007B7B7B000000 - 00007B7B7B0000000000BDBDBD00BDBDBD00BDBDBD00000000007B7B7B000000 - 00007B7B7B000000000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000007B7B - 7B0000000000000000000000000000000000000000007B7B7B00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000007B7B7B007B7B7B007B7B7B0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000000000000084000000840000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00C0C0C000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FF00 - 0000FF000000C0C0C000FFFFFF00FFFFFF00FFFFFF0000FFFF000000000000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000C0C0C000FF00 - 0000FF000000C0C0C000C0C0C000C0C0C000FFFFFF00FFFFFF0000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000840000008400000084000000000000008400000000000000000000008400 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF000000000000000000000000000000000000000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000C0C0C000FFFFFF00FFFFFF000000000000FF - FF000000000000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000084000000840000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FF000000FF000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF000000000000000000000000000000000000000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FFFFFF00FFFFFF00FFFFFF0000000000FFFF - FF0000000000FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C0C0 - C000FF000000FF000000C0C0C000C0C0C000C0C0C000FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FF00 - 0000FF000000C0C0C000FFFFFF0000000000000000000000000000000000FFFF - FF000000000000FFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000FFFFFF008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000C0C0C000FFFFFF00FFFFFF0000FF - FF00000000000000000000000000000000000000000000000000FFFFFF00FF00 - 0000FF000000FFFFFF00FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFF - FF0000000000FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000FFFFFF008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 000000000000FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FF000000FF000000C0C0C000FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000FFFFFF0000000000FFFFFF000000 - 0000FFFFFF00FFFFFF00000000000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000084000000840000008400000084000000840000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FF000000FF000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000400000000100010000000000000200000000000000000000 - 000000000000000000000000FFFFFF00FFFF000000000000C001000000000000 - C001000000000000C001000000000000C001000000000000C001000000000000 - 8001000000000000000100000000000000010000000000000001000000000000 - 8001000000000000C001000000000000C001000000000000C003000000000000 - C007000000000000C00F000000000000FFFFFFFFFFFFFFFF000CC007FFFFFFFF - 00088003FFFFFFFF00010001FFFFFFFF00030001F83FFEFF00030001F83FFC7F - 00030000F83FF83F00030000F83FF01F00038000C007E00F0007C000E00FC007 - 000FE000F01FF83F000F8000F83FF83F000F8007FC7FF83F001F8000FEFFF83F - 003FF000FFFFFFFF007FF800FFFFFFFFFFFFFFFFFC7FFFFFFC00FFFFFC27FFFF - 8000FFF9EC23F83F0000E7FFC40100010000C3F3800100010000C3E7C0010001 - 0001E1C7E00000010003F08F000000010003F81F000000010003FC3F00030001 - 0003F81FE00300010003F09FC00100010003C1C780030101800783E3C4078383 - F87F8FF1EC3FFFFFFFFFFFFFFC7FFFFFFFFFFFFFFFFFFFFFFFFF801FFFFFF3FF - C007801FFC01ED9FC0078007FC01ED6FC0078007FC01ED6FC00780010001F16F - C00780010001FD1FC00780010001FC7FC00780010001FEFFC00780010003FC7F - C00780010007FD7FC0078001000FF93FC00FE00100FFFBBFC01FE00301FFFBBF - C03FF80703FFFBBFFFFFF80FFFFFFFFF} - end - object pmAdd: TPopupMenu - Images = ilLinks - OnPopup = pmLinksPopup - Left = 35 - Top = 6 - object miAdd1: TMenuItem - Caption = '&Add...' - Default = True - ImageIndex = 0 - ShortCut = 45 - OnClick = AddClick - end - object miAddComposition1: TMenuItem - Caption = 'Add Composition...' - Hint = 'miAddComposition' - ImageIndex = 1 - OnClick = AddCompositionClick - end - object miLine6: TMenuItem - Caption = '-' - end - object miAddExisting1: TMenuItem - Caption = 'Add Existing' - ShortCut = 32813 - OnClick = AddExistingClick - end - object miAddStandard1: TMenuItem - Caption = 'Add Standard...' - ShortCut = 16429 - OnClick = AddStandardClick - end - end -end diff --git a/internal/x.46/Lib/D11/dxPSfmReportProperties.dcu b/internal/x.46/Lib/D11/dxPSfmReportProperties.dcu deleted file mode 100644 index b69405a1..00000000 Binary files a/internal/x.46/Lib/D11/dxPSfmReportProperties.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSfmReportProperties.dfm b/internal/x.46/Lib/D11/dxPSfmReportProperties.dfm deleted file mode 100644 index ee009a9e..00000000 --- a/internal/x.46/Lib/D11/dxPSfmReportProperties.dfm +++ /dev/null @@ -1,216 +0,0 @@ -object dxfmPSReportProperties: TdxfmPSReportProperties - Left = 357 - Top = 319 - ActiveControl = edName - BorderIcons = [biSystemMenu, biMinimize, biMaximize, biHelp] - BorderStyle = bsDialog - Caption = 'Properties' - ClientHeight = 477 - ClientWidth = 359 - Color = clBtnFace - Constraints.MinHeight = 502 - Constraints.MinWidth = 367 - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000FFFFFFFFFF000000F00F00000F000000FFF - FFFFFFF000000F00F00000F000000FFFFFFFFFF000000FFFFFFF0FF000000F00 - FFF080F000000F080F08080000440FF080808088804400000808088888440000 - 008088888844000000088888804400000000000000440000000000000000FFFF - 0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F - 0000000400000000000000000000F8000000FC000000FE040000FFFF0000} - OldCreateOrder = False - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pcSummary: TPageControl - Left = 5 - Top = 6 - Width = 349 - Height = 434 - ActivePage = tshSummary - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 0 - object tshSummary: TTabSheet - Caption = 'Summary' - object Image1: TImage - Left = 10 - Top = 8 - Width = 32 - Height = 32 - Picture.Data = { - 07544269746D617076020000424D760200000000000076000000280000002000 - 0000200000000100040000000000000200000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDD777777777777777777777777777DDDD00000000000000000000000000 - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF - 07DDDD0F88888888888888888888888F07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F - 07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F07DDDD0F88888888888888888888888F - 07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F - 07DDDD0F88888888888888888888888F07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F - 07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F07DDDD0F88888888888888888888888F - 07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F07DDDD0F8FFF8FFF8FFF8FFFF8FFFF8F - 07DDDD0F88888888888888888888888F07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0F0000FF7777777777FFFFFFFF - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0F0000FF7777777777FFFFFFFF - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0F0000FF7777777777FFFFFFFF - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF - 07DDDD0F77777777777777777777777F07DDDD0F7777777FFFFFFFFFFFFFFFFF - 07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF07DDDD0FFFFFFFFFFFFFFFFFFFFFFFFF - 07DDDD000000000000000000000000000DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel1: TBevel - Left = 8 - Top = 46 - Width = 320 - Height = 6 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object lblCreator: TLabel - Left = 10 - Top = 80 - Width = 41 - Height = 13 - Caption = 'Creator:' - FocusControl = edCreator - end - object lblCreationDate: TLabel - Left = 10 - Top = 105 - Width = 71 - Height = 13 - Caption = 'Creation Date:' - FocusControl = edCreationDate - end - object Bevel2: TBevel - Left = 8 - Top = 142 - Width = 320 - Height = 6 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object edName: TEdit - Left = 66 - Top = 16 - Width = 262 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - Text = 'edName' - end - object edCreator: TEdit - Left = 112 - Top = 80 - Width = 215 - Height = 14 - TabStop = False - Anchors = [akLeft, akTop, akRight] - AutoSize = False - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ReadOnly = True - TabOrder = 1 - Text = 'edCreator' - end - object edCreationDate: TEdit - Left = 112 - Top = 105 - Width = 215 - Height = 14 - TabStop = False - Anchors = [akLeft, akTop, akRight] - AutoSize = False - BorderStyle = bsNone - Ctl3D = False - ParentCtl3D = False - ReadOnly = True - TabOrder = 2 - Text = 'edCreationDate' - end - object pcDescription: TPageControl - Left = 10 - Top = 158 - Width = 319 - Height = 237 - ActivePage = tshPreview - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 3 - object tshDescription: TTabSheet - Caption = '&Description' - object memDescription: TMemo - Left = 0 - Top = 0 - Width = 311 - Height = 209 - Align = alClient - ScrollBars = ssBoth - TabOrder = 0 - end - end - object tshPreview: TTabSheet - Caption = '&Preview' - ImageIndex = 1 - object bvlPreviewHost: TBevel - Left = 0 - Top = 0 - Width = 311 - Height = 172 - Align = alTop - Anchors = [akLeft, akTop, akRight, akBottom] - end - object btnPreview: TButton - Left = 206 - Top = 180 - Width = 100 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'Pre&view...' - TabOrder = 0 - OnClick = PreviewClick - end - end - end - end - end - object btnOK: TButton - Left = 116 - Top = 447 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 197 - Top = 447 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 279 - Top = 447 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Help' - TabOrder = 3 - end -end diff --git a/internal/x.46/Lib/D11/dxPSfmStlAdd.dcu b/internal/x.46/Lib/D11/dxPSfmStlAdd.dcu deleted file mode 100644 index 7d5356b0..00000000 Binary files a/internal/x.46/Lib/D11/dxPSfmStlAdd.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSfmStlAdd.dfm b/internal/x.46/Lib/D11/dxPSfmStlAdd.dfm deleted file mode 100644 index 93c3b06d..00000000 --- a/internal/x.46/Lib/D11/dxPSfmStlAdd.dfm +++ /dev/null @@ -1,67 +0,0 @@ -object dxfmSelectStyleClass: TdxfmSelectStyleClass - Left = 427 - Top = 284 - BorderStyle = bsDialog - Caption = 'Select PrintStyle Type' - ClientHeight = 91 - ClientWidth = 279 - Color = clBtnFace - OldCreateOrder = True - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object GroupBox1: TGroupBox - Left = 2 - Top = -2 - Width = 275 - Height = 58 - TabOrder = 0 - object Label1: TLabel - Left = 7 - Top = 24 - Width = 28 - Height = 13 - Caption = '&Type:' - FocusControl = cbxStyleTypes - OnClick = Label1Click - end - object cbxStyleTypes: TComboBox - Left = 44 - Top = 20 - Width = 220 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 0 - OnChange = cbxStyleTypesChange - end - end - object btnOK: TButton - Left = 31 - Top = 63 - Width = 79 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 115 - Top = 63 - Width = 79 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 198 - Top = 63 - Width = 79 - Height = 23 - Caption = '&Help' - TabOrder = 3 - end -end diff --git a/internal/x.46/Lib/D11/dxPSfmStlDsg.dcu b/internal/x.46/Lib/D11/dxPSfmStlDsg.dcu deleted file mode 100644 index aa7bb4c8..00000000 Binary files a/internal/x.46/Lib/D11/dxPSfmStlDsg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSfmStlDsg.dfm b/internal/x.46/Lib/D11/dxPSfmStlDsg.dfm deleted file mode 100644 index 553529bb..00000000 --- a/internal/x.46/Lib/D11/dxPSfmStlDsg.dfm +++ /dev/null @@ -1,792 +0,0 @@ -object dxfmPrintStylesDesignWindow: TdxfmPrintStylesDesignWindow - Left = 395 - Top = 187 - BorderStyle = bsDialog - Caption = 'Print Styles' - ClientHeight = 199 - ClientWidth = 358 - Color = clBtnFace - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 00000000000000000000000000000FFFFFFFFFF000000F00F00000F000000FFF - FFFFFFF000000F00F00000F000000FFFFFFFFFF000000FFFFFFF0FF000000F00 - FFF080F000000F080F08080000440FF080808088804400000808088888440000 - 008088888844000000088888804400000000000000440000000000000000FFFF - 0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F - 0000000400000000000000000000F8000000FC000000FE040000FFFF0000} - KeyPreview = True - OldCreateOrder = True - OnClose = FormClose - OnKeyDown = FormKeyDown - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlButtons: TPanel - Left = 249 - Top = 0 - Width = 109 - Height = 199 - Align = alRight - BevelOuter = bvNone - TabOrder = 0 - object btnAdd: TButton - Left = 6 - Top = 4 - Width = 100 - Height = 22 - Caption = '&Add...' - TabOrder = 0 - OnClick = AddClick - end - object btnDelete: TButton - Tag = 4 - Left = 6 - Top = 31 - Width = 100 - Height = 22 - Caption = '&Delete' - TabOrder = 1 - OnClick = EditClick - end - object btnSelectAll: TButton - Tag = 6 - Left = 6 - Top = 58 - Width = 100 - Height = 22 - Caption = 'Se&lect All' - TabOrder = 2 - OnClick = EditClick - end - object btnPageSetup: TButton - Tag = 1 - Left = 6 - Top = 147 - Width = 100 - Height = 22 - Caption = 'Pa&ge Setup...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 5 - OnClick = PageSetupClick - end - object btnMoveUp: TButton - Left = 6 - Top = 89 - Width = 100 - Height = 22 - Caption = 'Move &Up' - TabOrder = 3 - OnClick = MoveUpClick - end - object btnMoveDown: TButton - Tag = 1 - Left = 6 - Top = 116 - Width = 100 - Height = 22 - Caption = 'Move Dow&n' - TabOrder = 4 - OnClick = MoveDownClick - end - object btnRestoreDefaults: TButton - Left = 6 - Top = 174 - Width = 100 - Height = 22 - Caption = 'Rest&ore Defaults' - TabOrder = 6 - OnClick = RestoreDefaultsClick - end - end - object lbxStyles: TListBox - Left = 0 - Top = 0 - Width = 249 - Height = 199 - Style = lbOwnerDrawFixed - Align = alClient - Ctl3D = True - DragMode = dmAutomatic - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ItemHeight = 34 - MultiSelect = True - ParentCtl3D = False - ParentFont = False - PopupMenu = pmStyles - TabOrder = 1 - OnClick = lbxStylesClick - OnDblClick = PageSetupClick - OnDragDrop = lbxStylesDragDrop - OnDragOver = lbxStylesDragOver - OnDrawItem = lbxStylesDrawItem - OnEndDrag = lbxStylesEndDrag - OnKeyPress = lbxStylesKeyPress - OnStartDrag = lbxStylesStartDrag - end - object pmStyles: TPopupMenu - OnPopup = pmStylesPopup - Left = 13 - Top = 9 - object miAdd: TMenuItem - Caption = '&Add...' - ShortCut = 45 - OnClick = AddClick - end - object miAddStandard: TMenuItem - Caption = 'Add' - ShortCut = 32813 - OnClick = AddStandardClick - end - object miLine5: TMenuItem - Caption = '-' - end - object miEdit: TMenuItem - Caption = '&Edit' - object miCut: TMenuItem - Tag = 2 - Caption = 'Cu&t' - ShortCut = 16472 - OnClick = EditClick - end - object miCopy: TMenuItem - Tag = 1 - Caption = '&Copy' - ShortCut = 16451 - OnClick = EditClick - end - object miPaste: TMenuItem - Tag = 3 - Caption = '&Paste' - ShortCut = 16470 - OnClick = EditClick - end - object miDelete: TMenuItem - Tag = 4 - Caption = '&Delete' - ShortCut = 46 - OnClick = EditClick - end - object N2: TMenuItem - Caption = '-' - end - object miSelectAll: TMenuItem - Tag = 6 - Caption = 'Se&lect All' - ShortCut = 16449 - OnClick = EditClick - end - end - object N1: TMenuItem - Caption = '-' - end - object miMoveUp: TMenuItem - Caption = 'Move &Up' - ShortCut = 16422 - OnClick = MoveUpClick - end - object miMoveDown: TMenuItem - Caption = 'Move Dow&n' - ShortCut = 16424 - OnClick = MoveDownClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miPageSetup: TMenuItem - Tag = 1 - Caption = 'Pa&ge Setup...' - Default = True - ShortCut = 16397 - OnClick = PageSetupClick - end - object miSetAsCurrent: TMenuItem - Caption = '&Make Current' - ShortCut = 16416 - OnClick = miSetAsCurrentClick - end - object miLine: TMenuItem - Caption = '-' - end - object miRestoreDefaults: TMenuItem - Caption = 'Rest&ore Defaults' - ShortCut = 16463 - OnClick = RestoreDefaultsClick - end - object miLine2: TMenuItem - Caption = '-' - end - object miBackground: TMenuItem - Caption = 'Bac&kground' - object miBackgroundEffects: TMenuItem - Tag = 4 - Caption = 'E&ffects...' - OnClick = BackgroundClick - end - object miBackgroundClear: TMenuItem - Tag = 5 - Caption = 'Clear' - OnClick = ClearBackgroundClick - end - end - object N3: TMenuItem - Caption = '-' - end - object miShowButtons: TMenuItem - Caption = 'Show &Button Bar' - Checked = True - OnClick = miShowButtonsClick - end - end - object ilMenu: TImageList - Left = 41 - Top = 9 - Bitmap = { - 494C01010A000F00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000004000000001002000000000000040 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084848400FFFF - FF000000000000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484000000 - 00008484840000000000FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400848484008484840000000000FFFFFF00FFFFFF0000FFFF0084848400FFFF - FF00FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000C6C6C600C6C6 - C600C6C6C600848484008484840000000000FFFFFF00FFFFFF00840000008484 - 8400FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00C6C6C600C6C6 - C600C6C6C600C6C6C60084848400848484000000000000FFFF00840000008400 - 0000FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 000000000000000000000000000000000000C6C6C600FFFFFF00FFFFFF00C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084000000840000008400 - 0000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600FFFFFF00FFFF - FF00C6C6C60000000000C6C6C600C6C6C6008484840084000000840000008400 - 0000FFFFFF0000FFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000C6C6C600FFFF - FF00000000008400000000000000C6C6C6008400000084000000840000008484 - 8400FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000C6C6 - C600FFFFFF0084000000C6C6C60084848400840000008400000084848400FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000840000000000 - 0000C6C6C60084000000848484000000000084848400FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084000000C6C6 - C60000000000840000000000000084848400FFFFFF0000FFFF00FFFFFF008484 - 8400C6C6C6000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000084000000C6C6 - C600C6C6C600840000008484840000FFFF00FFFFFF00FFFFFF00FFFFFF008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000848484008400 - 0000840000008484840084848400848484008484840084848400848484008484 - 8400000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000008400000084000000840000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000840000008400 - 0000840000008400000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000840000008400 - 000084000000840000008484840084000000FFFFFF0084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000848400008484000084840000848400008484000084840000848400000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000008484000084840000848400008484000084840000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084840000848400008484000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000008400000084000000848484008484 - 84008484840084848400840000000000000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000848400000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000840000008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 000084000000840000008400000084000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000000000000084000000840000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0084000000000000000000000000000000FFFF - FF000000000000FF000000000000FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF008400000084000000840000008400 - 00008400000084000000FFFFFF0084000000000000000000000000000000FFFF - FF000000000000FF000000000000FFFFFF000000000000000000FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000008400 - 0000000000000000000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0084000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000840000008400000084000000000000008400000000000000000000008400 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00840000008400000084000000FFFF - FF0084000000840000008400000084000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000084000000840000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0084000000FFFFFF008400000000000000000000000000000000000000FFFF - FF00FF000000FF0000008400000000000000000000000000000000000000FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000000000000000000084000000000000008400000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00840000008400000000000000000000000000000000000000000000000000 - 0000FF000000FF00000084000000000000000000000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000FFFFFF008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 8400848484000084840084000000840000008400000084000000840000008400 - 0000840000000000000000000000000000000000000084000000840000008400 - 0000FF000000FF00000084000000840000008400000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000FFFFFF008400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400008484008484 - 8400008484008484840000848400848484000084840084848400008484008484 - 84000084840000000000000000000000000000000000FF000000FF000000FF00 - 0000FF000000FF000000FF000000FF000000FF00000000000000000000000000 - 0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 84008484840000000000000000000000000000000000FF000000FF000000FF00 - 0000FF000000FF000000840000008400000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000084000000840000008400000084000000840000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484000000 - 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600000000008484 - 840000848400000000000000000000000000000000000000000000000000FFFF - FF00FF000000FF0000008400000000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000848400848484000084 - 84000000000000FFFF00000000000000000000FFFF0000000000848484000084 - 840084848400000000000000000000000000000000000000000000000000FFFF - FF00FF000000FF00000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000FFFF0000FFFF000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000400000000100010000000000000200000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFF00000000FFFFC00100000000 - FFFFC00100000000FFFFC00100000000FEFFC00100000000FC7FC00100000000 - F83F800100000000F01F000100000000E00F000100000000C007000100000000 - F83F800100000000F83FC00100000000F83FC00100000000F83FC00300000000 - FFFFC00700000000FFFFC00F00000000FFFFF80FFFFFFFFFFFFFF007FFFFFFFF - FFF9F007F83FFFFFE7FFF0070001FFFFC3F3F0070001F83FC3E7F0070001F83F - E1C7F0070001F83FF08FF0070001F83FF81FF0070001C007FC3FF0070001E00F - F81FF0070001F01FF09FE0030001F83FC1C7E0030101FC7F83E3F0078383FEFF - 8FF1FE3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC03FFFFFF3FFFC00 - C09FFC01ED9F8000CAAFFC01ED6F0000CA97FC01ED6F0000C0030001F16F0000 - C1C30001FD1F0001C1E30001FC7F0003D1F30001FEFF000380330003FC7F0003 - 80330007FD7F00038003000FF93F0003C10300FFFBBF0003C00301FFFBBF8007 - C00303FFFBBFF87FC003FFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPSfmTtl.dcu b/internal/x.46/Lib/D11/dxPSfmTtl.dcu deleted file mode 100644 index b21d6a6c..00000000 Binary files a/internal/x.46/Lib/D11/dxPSfmTtl.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPSfmTtl.dfm b/internal/x.46/Lib/D11/dxPSfmTtl.dfm deleted file mode 100644 index 54dee039..00000000 --- a/internal/x.46/Lib/D11/dxPSfmTtl.dfm +++ /dev/null @@ -1,687 +0,0 @@ -object dxfmReportTitleProperties: TdxfmReportTitleProperties - Left = 442 - Top = 242 - ActiveControl = chbxTransparent - BorderIcons = [biSystemMenu, biMinimize, biMaximize, biHelp] - BorderStyle = bsDialog - Caption = 'Report Title' - ClientHeight = 443 - ClientWidth = 392 - Color = clBtnFace - Constraints.MinHeight = 470 - Constraints.MinWidth = 400 - KeyPreview = True - OldCreateOrder = True - Position = poScreenCenter - OnClose = FormClose - OnKeyDown = FormKeyDown - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object lblMode: TLabel - Left = 8 - Top = 11 - Width = 30 - Height = 13 - Caption = '&Mode:' - FocusControl = cbxMode - end - object btnOK: TButton - Left = 151 - Top = 413 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object btnCancel: TButton - Left = 231 - Top = 413 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 3 - end - object btnHelp: TButton - Left = 311 - Top = 413 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Help' - TabOrder = 4 - end - object pctlMain: TPageControl - Left = 6 - Top = 39 - Width = 380 - Height = 366 - ActivePage = tshProperties - Anchors = [akLeft, akTop, akRight, akBottom] - TabOrder = 1 - object tshText: TTabSheet - Caption = '&Text' - object memText: TMemo - Left = 0 - Top = 0 - Width = 372 - Height = 338 - Align = alClient - Lines.Strings = ( - '') - TabOrder = 0 - OnChange = TitleChanged - end - end - object tshProperties: TTabSheet - Caption = '&Properties' - OnResize = tshPropertiesResize - object bvlFont: TBevel - Left = 41 - Top = 84 - Width = 324 - Height = 4 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object lblAlignment: TLabel - Left = 7 - Top = 173 - Width = 47 - Height = 13 - Caption = 'Alignment' - end - object lblTextAlignY: TLabel - Left = 196 - Top = 199 - Width = 47 - Height = 13 - Caption = '&Vertically:' - FocusControl = cbxTextAlignY - end - object bvlTransparent: TBevel - Left = 100 - Top = 15 - Width = 265 - Height = 5 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object bvlAlignment: TBevel - Left = 74 - Top = 177 - Width = 290 - Height = 5 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object lblColor: TLabel - Left = 65 - Top = 41 - Width = 29 - Height = 13 - Alignment = taRightJustify - Caption = '&Color:' - end - object bvlColorHolder: TBevel - Left = 104 - Top = 37 - Width = 261 - Height = 21 - Anchors = [akLeft, akTop, akRight] - end - object lblTextAlignX: TLabel - Left = 8 - Top = 199 - Width = 60 - Height = 13 - Caption = 'Hori&zontally:' - FocusControl = cbxTextAlignX - end - object imgFont: TImage - Left = 9 - Top = 79 - Width = 16 - Height = 16 - AutoSize = True - Picture.Data = { - 07544269746D6170F6000000424DF60000000000000076000000280000001000 - 0000100000000100040000000000800000000000000000000000100000001000 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD000000DDDDDDDDDDDD00D - DDDDDDDDDDDDD00DDDDDDDD77777700DDDDDDDDDD77DD00DDDDDDDDDD70DD00D - D0DDDDDDD70DD00DD0DDDDDDD700D00D00DDDD7DD700000000DDDD7DD77DD7DD - DDDDDD77D77D77DDDDDDDD77777777DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD - DDDD} - Transparent = True - end - object Bevel2: TBevel - Left = 10 - Top = 294 - Width = 354 - Height = 5 - Anchors = [akLeft, akRight, akBottom] - Shape = bsBottomLine - end - object lblTransparent: TLabel - Left = 25 - Top = 11 - Width = 62 - Height = 13 - Caption = '&Transparent ' - FocusControl = chbxTransparent - OnClick = lblTransparentClick - end - object cbxTextAlignX: TComboBox - Left = 92 - Top = 194 - Width = 95 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 4 - OnChange = TitleChanged - OnDrawItem = cbxTextAlignYDrawItem - Items.Strings = ( - 'Left' - 'Center' - 'Right') - end - object cbxTextAlignY: TComboBox - Tag = 1 - Left = 270 - Top = 194 - Width = 95 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 5 - OnChange = TitleChanged - OnDrawItem = cbxTextAlignYDrawItem - Items.Strings = ( - 'Top' - 'Center' - 'Bottom') - end - object chbxAdjustOnScale: TCheckBox - Left = 104 - Top = 137 - Width = 261 - Height = 17 - Anchors = [akLeft, akTop, akRight] - Caption = '&Adjust on Scale' - TabOrder = 3 - OnClick = TitleChanged - end - object edFont: TEdit - Left = 104 - Top = 107 - Width = 261 - Height = 21 - TabStop = False - Anchors = [akLeft, akTop, akRight] - Color = clBtnFace - ReadOnly = True - TabOrder = 2 - end - object btnFont: TButton - Left = 8 - Top = 105 - Width = 88 - Height = 25 - Caption = 'Fo&nt...' - TabOrder = 1 - OnClick = btnFontClick - end - object btnRestoreDefaults: TButton - Left = 189 - Top = 307 - Width = 176 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Restore Defaults' - TabOrder = 6 - OnClick = btnRestoreDefaultsClick - end - object chbxTransparent: TCheckBox - Left = 7 - Top = 10 - Width = 15 - Height = 17 - Caption = '&Transparent' - TabOrder = 0 - OnClick = TitleChanged - end - end - end - object cbxMode: TComboBox - Left = 48 - Top = 8 - Width = 338 - Height = 21 - Style = csDropDownList - Anchors = [akLeft, akTop, akRight] - ItemHeight = 13 - TabOrder = 0 - OnChange = TitleChanged - Items.Strings = ( - 'None' - 'On First Page, ' - 'On Every Top Page') - end - object ilAlignments: TImageList - AllocBy = 6 - Left = 10 - Top = 411 - Bitmap = { - 494C010106000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FF7FFFFF00000000FF7FFFFF00000000 - FF7FE00300000000FC1FFFFF00000000FE3FFF7F00000000FF7FFE3F00000000 - FFFFFC1F00000000E003FF7F00000000FFFFFF7F00000000FF7FFF7F00000000 - FE3FFF7F00000000FC1FFFFF00000000FF7FFFFF00000000FF7FFFFF00000000 - FF7FFFFF00000000FFFFFFFF00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFF003FC00FF003FFFFFFFFFFFFFFFFFFFF000300030003FF7F - FFFFFFFFFFFFFF7F003FC00FF003FF7FFFFFFFFFFFFFFF7F000300030003FC1F - FFFFFFFFFFFFFE3F003FC00FF003FF7FFFFFFFFFFFFFFFFF000300030003E003 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPcPrVw.dcu b/internal/x.46/Lib/D11/dxPcPrVw.dcu deleted file mode 100644 index a62e6568..00000000 Binary files a/internal/x.46/Lib/D11/dxPcPrVw.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPgsDlg.dcu b/internal/x.46/Lib/D11/dxPgsDlg.dcu deleted file mode 100644 index b3e208b4..00000000 Binary files a/internal/x.46/Lib/D11/dxPgsDlg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPgsDlg.dfm b/internal/x.46/Lib/D11/dxPgsDlg.dfm deleted file mode 100644 index 71c59374..00000000 --- a/internal/x.46/Lib/D11/dxPgsDlg.dfm +++ /dev/null @@ -1,3662 +0,0 @@ -object dxfmPageSetupDialog: TdxfmPageSetupDialog - Left = 448 - Top = 228 - BorderStyle = bsDialog - Caption = 'Page Setup' - ClientHeight = 435 - ClientWidth = 526 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = True - Position = poScreenCenter - OnClose = FormClose - OnCloseQuery = FormCloseQuery - OnKeyDown = FormKeyDown - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlStyleName: TPanel - Left = 0 - Top = 0 - Width = 526 - Height = 31 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblStyleName: TLabel - Left = 4 - Top = 9 - Width = 61 - Height = 13 - Caption = 'Style &Name: ' - FocusControl = edStyleName - end - object edStyleName: TEdit - Left = 66 - Top = 6 - Width = 259 - Height = 21 - MaxLength = 31 - TabOrder = 0 - OnChange = edStyleNameChange - OnExit = edStyleNameExit - end - object btnOptions: TButton - Left = 331 - Top = 5 - Width = 88 - Height = 24 - Caption = '&Options ...' - TabOrder = 1 - end - end - object pnlButtons: TPanel - Left = 0 - Top = 399 - Width = 526 - Height = 36 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object btnPrintPreview: TButton - Left = 117 - Top = 7 - Width = 106 - Height = 23 - Caption = 'Print Preview...' - TabOrder = 1 - OnClick = btnPrintPreviewClick - end - object btnPrint: TButton - Left = 5 - Top = 7 - Width = 106 - Height = 23 - Caption = 'Print...' - TabOrder = 0 - OnClick = btnPrintClick - end - object btnOK: TButton - Left = 273 - Top = 7 - Width = 79 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object btnCancel: TButton - Left = 358 - Top = 7 - Width = 79 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 3 - end - object btnHelp: TButton - Left = 443 - Top = 7 - Width = 79 - Height = 23 - Caption = '&Help' - TabOrder = 4 - end - end - object Panel4: TPanel - Left = 0 - Top = 31 - Width = 526 - Height = 368 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object pgctrlMain: TPageControl - Left = 5 - Top = 3 - Width = 517 - Height = 365 - ActivePage = tshMargins - MultiLine = True - TabOrder = 0 - OnChange = pgctrlMainChange - OnChanging = pgctrlMainChanging - object tshPage: TTabSheet - Caption = '&Page' - object Panel5: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 337 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object gbxPaper: TGroupBox - Left = 5 - Top = 5 - Width = 231 - Height = 326 - Caption = ' Paper ' - TabOrder = 0 - object lblPaperWidth: TLabel - Left = 18 - Top = 208 - Width = 32 - Height = 13 - Caption = '&Width:' - OnClick = lblMarginTopClick - end - object lblPaperHeight: TLabel - Left = 18 - Top = 234 - Width = 35 - Height = 13 - Caption = 'H&eight:' - OnClick = lblMarginTopClick - end - object bvlPaperDimensions: TBevel - Left = 64 - Top = 191 - Width = 157 - Height = 4 - Shape = bsBottomLine - end - object bvlPaperSource: TBevel - Left = 79 - Top = 278 - Width = 142 - Height = 4 - Shape = bsBottomLine - end - object bvlPaperType: TBevel - Left = 36 - Top = 20 - Width = 185 - Height = 4 - Shape = bsBottomLine - end - object bvlPaperWidthHolder: TBevel - Left = 81 - Top = 204 - Width = 100 - Height = 22 - Visible = False - end - object bvlPaperHeightHolder: TBevel - Left = 81 - Top = 230 - Width = 100 - Height = 22 - Visible = False - end - object lblPaperSource: TLabel - Left = 6 - Top = 272 - Width = 63 - Height = 13 - Caption = 'Paper so&urce' - FocusControl = cbxPaperSource - OnClick = lblPaperSourceClick - end - object lblPaperType: TLabel - Left = 6 - Top = 15 - Width = 24 - Height = 13 - Caption = 'T&ype' - FocusControl = lbxPaperType - end - object lblPaperDimensions: TLabel - Left = 6 - Top = 186 - Width = 53 - Height = 13 - Caption = 'Dimensions' - end - object lbxPaperType: TListBox - Left = 12 - Top = 31 - Width = 208 - Height = 148 - Style = lbOwnerDrawFixed - IntegralHeight = True - ItemHeight = 18 - TabOrder = 0 - OnClick = lbxPaperTypeClick - OnDrawItem = lbxPaperTypeDrawItem - end - object cbxPaperSource: TComboBox - Left = 12 - Top = 289 - Width = 208 - Height = 24 - Style = csOwnerDrawFixed - ItemHeight = 18 - TabOrder = 1 - OnChange = cbxPaperSourceChange - OnDrawItem = cbxPaperSourceDrawItem - end - end - object Panel1: TPanel - Left = 239 - Top = 0 - Width = 270 - Height = 337 - Align = alRight - BevelOuter = bvNone - ParentColor = True - TabOrder = 1 - object Label1: TLabel - Left = 265 - Top = 5 - Width = 5 - Height = 326 - Align = alRight - AutoSize = False - Transparent = True - end - object Label2: TLabel - Left = 0 - Top = 5 - Width = 5 - Height = 326 - Align = alLeft - AutoSize = False - Transparent = True - end - object Label3: TLabel - Left = 0 - Top = 0 - Width = 270 - Height = 5 - Align = alTop - AutoSize = False - Transparent = True - end - object Label4: TLabel - Left = 0 - Top = 331 - Width = 270 - Height = 6 - Align = alBottom - AutoSize = False - Transparent = True - end - object Panel6: TPanel - Left = 5 - Top = 5 - Width = 260 - Height = 326 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object gbxOrientation: TGroupBox - Left = 0 - Top = 0 - Width = 260 - Height = 187 - Align = alTop - Caption = ' Orientation ' - TabOrder = 0 - object bvlOrientationHolder: TBevel - Left = 8 - Top = 20 - Width = 145 - Height = 159 - Visible = False - end - object rBtnLandscape: TRadioButton - Tag = 1 - Left = 162 - Top = 109 - Width = 93 - Height = 17 - Caption = '&Landscape' - TabOrder = 1 - OnClick = OrientationClick - OnDblClick = OrientationDblClick - end - object rBtnPortrait: TRadioButton - Left = 162 - Top = 62 - Width = 93 - Height = 17 - Caption = 'P&ortrait' - Checked = True - TabOrder = 0 - TabStop = True - OnClick = OrientationClick - OnDblClick = OrientationDblClick - end - end - object gbxPrintOrder: TGroupBox - Left = 0 - Top = 187 - Width = 260 - Height = 80 - Align = alTop - Caption = ' Print Order ' - TabOrder = 1 - object pbxPageOrder: TPaintBox - Left = 10 - Top = 20 - Width = 74 - Height = 49 - OnDblClick = pbxPageOrderDblClick - OnPaint = pbxPageOrderPaint - end - object rbtnOverThenDown: TRadioButton - Left = 105 - Top = 47 - Width = 150 - Height = 17 - Caption = 'O&ver, then down' - TabOrder = 0 - OnClick = PageOrderClick - end - object rbtnDownThenOver: TRadioButton - Tag = 1 - Left = 105 - Top = 24 - Width = 150 - Height = 17 - Caption = '&Down, then over' - Checked = True - TabOrder = 1 - TabStop = True - OnClick = PageOrderClick - end - end - object gbxShading: TGroupBox - Left = 0 - Top = 267 - Width = 260 - Height = 59 - Align = alClient - Caption = ' Shading ' - TabOrder = 2 - object chbxShading: TCheckBox - Left = 11 - Top = 25 - Width = 206 - Height = 17 - Caption = 'Print using &gray shading' - TabOrder = 0 - OnClick = chbxShadingClick - end - end - end - end - end - end - object tshMargins: TTabSheet - Caption = '&Margins' - object pnlInMargins: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 337 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object Bevel12: TBevel - Left = 297 - Top = 7 - Width = 201 - Height = 5 - Shape = bsBottomLine - end - object bvlPreviewHolder: TBevel - Left = 252 - Top = 18 - Width = 246 - Height = 310 - Visible = False - end - object lblPreview: TLabel - Left = 252 - Top = 3 - Width = 38 - Height = 13 - Caption = 'Preview' - end - object Panel14: TPanel - Left = 0 - Top = 0 - Width = 237 - Height = 337 - Align = alLeft - BevelOuter = bvNone - ParentColor = True - TabOrder = 0 - object Label5: TLabel - Left = 0 - Top = 0 - Width = 237 - Height = 5 - Align = alTop - AutoSize = False - Transparent = True - end - object Label6: TLabel - Left = 0 - Top = 332 - Width = 237 - Height = 5 - Align = alBottom - AutoSize = False - Transparent = True - end - object Label7: TLabel - Left = 0 - Top = 5 - Width = 5 - Height = 327 - Align = alLeft - AutoSize = False - Transparent = True - end - object Label8: TLabel - Left = 232 - Top = 5 - Width = 5 - Height = 327 - Align = alRight - AutoSize = False - Transparent = True - end - object Panel8: TPanel - Left = 5 - Top = 5 - Width = 227 - Height = 327 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object bvlMarginsWarningHolder: TBevel - Left = 4 - Top = 281 - Width = 222 - Height = 33 - Visible = False - end - object gbxMargins: TGroupBox - Left = 0 - Top = 0 - Width = 227 - Height = 223 - Align = alTop - TabOrder = 0 - object pnlMargins: TPanel - Left = 2 - Top = 15 - Width = 223 - Height = 106 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object lblMarginTop: TLabel - Left = 13 - Top = 8 - Width = 22 - Height = 13 - Caption = '&Top:' - OnClick = lblMarginTopClick - end - object lblMarginBottom: TLabel - Left = 13 - Top = 34 - Width = 41 - Height = 13 - Caption = '&Bottom: ' - OnClick = lblMarginTopClick - end - object lblMarginLeft: TLabel - Left = 13 - Top = 60 - Width = 26 - Height = 13 - Caption = 'Le&ft: ' - OnClick = lblMarginTopClick - end - object lblMarginRight: TLabel - Left = 13 - Top = 86 - Width = 32 - Height = 13 - Caption = 'Ri&ght: ' - OnClick = lblMarginTopClick - end - object bvlMarginTopHolder: TBevel - Left = 97 - Top = 3 - Width = 117 - Height = 22 - Visible = False - end - object bvlMarginBottomHolder: TBevel - Left = 97 - Top = 29 - Width = 117 - Height = 22 - Visible = False - end - object bvlMarginLeftHolder: TBevel - Left = 97 - Top = 55 - Width = 117 - Height = 22 - Visible = False - end - object bvlMarginRightHolder: TBevel - Left = 97 - Top = 81 - Width = 117 - Height = 22 - Visible = False - end - end - object pnlHFMargins: TPanel - Left = 2 - Top = 121 - Width = 223 - Height = 58 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object lblMarginHeader: TLabel - Left = 13 - Top = 11 - Width = 42 - Height = 13 - Caption = 'H&eader: ' - OnClick = lblMarginTopClick - end - object lblMarginFooter: TLabel - Left = 13 - Top = 38 - Width = 36 - Height = 13 - Caption = 'Foote&r:' - OnClick = lblMarginTopClick - end - object bvlMarginHeaderHolder: TBevel - Left = 97 - Top = 6 - Width = 117 - Height = 22 - Visible = False - end - object bvlMarginFooterHolder: TBevel - Left = 97 - Top = 33 - Width = 117 - Height = 22 - Visible = False - end - end - object Panel3: TPanel - Left = 2 - Top = 179 - Width = 223 - Height = 39 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object btnFix: TButton - Left = 6 - Top = 13 - Width = 79 - Height = 23 - Caption = 'Fi&x' - TabOrder = 0 - OnClick = btnFixClick - end - object btnRestoreOriginalMargins: TButton - Left = 88 - Top = 13 - Width = 127 - Height = 23 - Caption = 'Restore &Original' - TabOrder = 1 - OnClick = btnRestoreOriginalMarginsClick - end - end - end - object pnlCenterOnPage: TPanel - Left = 0 - Top = 223 - Width = 227 - Height = 54 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object bvlCenterOnPage: TBevel - Left = 99 - Top = 16 - Width = 128 - Height = 4 - Shape = bsBottomLine - end - object lblCenterOnPage: TLabel - Left = 1 - Top = 13 - Width = 78 - Height = 13 - Caption = 'Center on page ' - end - object chbxCenterHorz: TCheckBox - Left = 9 - Top = 33 - Width = 112 - Height = 17 - Caption = 'Hori&zontaly' - Color = clBtnFace - ParentColor = False - TabOrder = 0 - OnClick = CenterOnPageClick - end - object chbxCenterVert: TCheckBox - Tag = 1 - Left = 131 - Top = 33 - Width = 92 - Height = 17 - Caption = '&Verticaly' - TabOrder = 1 - OnClick = CenterOnPageClick - end - end - end - end - end - end - object tshHeaderFooter: TTabSheet - Caption = '&Header\Footer' - object Panel7: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 337 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object pnlBottom: TPanel - Left = 0 - Top = 236 - Width = 509 - Height = 67 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object pnlHFOpt: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 67 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object Label18: TLabel - Left = 0 - Top = 65 - Width = 509 - Height = 2 - Align = alBottom - AutoSize = False - Transparent = True - end - object Label17: TLabel - Left = 0 - Top = 2 - Width = 4 - Height = 63 - Align = alLeft - AutoSize = False - Transparent = True - end - object Label19: TLabel - Left = 505 - Top = 2 - Width = 4 - Height = 63 - Align = alRight - AutoSize = False - Transparent = True - end - object Label20: TLabel - Left = 0 - Top = 0 - Width = 509 - Height = 2 - Align = alTop - AutoSize = False - Transparent = True - end - object Panel9: TPanel - Left = 4 - Top = 2 - Width = 501 - Height = 63 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object pnlVertAlignment: TPanel - Left = 0 - Top = 0 - Width = 125 - Height = 63 - Align = alLeft - BevelOuter = bvNone - TabOrder = 0 - object gbxVertAlignment: TGroupBox - Left = 0 - Top = 0 - Width = 120 - Height = 63 - Caption = ' Vertical Alignment ' - TabOrder = 0 - object tbTAVert: TToolBar - Left = 22 - Top = 23 - Width = 79 - Height = 30 - Align = alNone - ButtonHeight = 24 - ButtonWidth = 25 - EdgeBorders = [ebLeft, ebTop, ebRight, ebBottom] - EdgeInner = esLowered - Images = ilPaperTypes - TabOrder = 0 - Wrapable = False - object ToolButton12: TToolButton - Left = 0 - Top = 2 - Caption = 'ToolButton9' - Down = True - Grouped = True - ImageIndex = 0 - Style = tbsCheck - OnClick = VertTextAlignClick - end - object ToolButton13: TToolButton - Tag = 1 - Left = 25 - Top = 2 - Caption = 'ToolButton10' - Grouped = True - ImageIndex = 1 - Style = tbsCheck - OnClick = VertTextAlignClick - end - object ToolButton14: TToolButton - Tag = 2 - Left = 50 - Top = 2 - Caption = 'ToolButton11' - Grouped = True - ImageIndex = 2 - Style = tbsCheck - OnClick = VertTextAlignClick - end - end - end - end - object gbxFunctions: TGroupBox - Left = 125 - Top = 0 - Width = 376 - Height = 63 - Align = alClient - Caption = ' Predefined Functions ' - TabOrder = 1 - object pnlToolBar: TPanel - Left = 2 - Top = 15 - Width = 372 - Height = 46 - Align = alClient - BevelOuter = bvNone - Caption = 'Panel1' - TabOrder = 0 - object tbPredefined: TToolBar - Left = 19 - Top = 8 - Width = 335 - Height = 30 - Align = alNone - ButtonHeight = 24 - ButtonWidth = 25 - EdgeBorders = [ebLeft, ebTop, ebRight, ebBottom] - EdgeInner = esLowered - ParentShowHint = False - ShowHint = True - TabOrder = 0 - Wrapable = False - end - end - end - end - end - end - object pnlHeader: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 118 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object pnlHeaderMemos: TPanel - Left = 0 - Top = 46 - Width = 509 - Height = 72 - Align = alClient - BevelOuter = bvNone - ParentColor = True - TabOrder = 2 - object Label9: TLabel - Left = 0 - Top = 4 - Width = 4 - Height = 64 - Align = alLeft - AutoSize = False - Transparent = True - end - object Label10: TLabel - Left = 505 - Top = 4 - Width = 4 - Height = 64 - Align = alRight - AutoSize = False - Transparent = True - end - object Label11: TLabel - Left = 0 - Top = 0 - Width = 509 - Height = 4 - Align = alTop - AutoSize = False - Transparent = True - end - object Label12: TLabel - Left = 0 - Top = 68 - Width = 509 - Height = 4 - Align = alBottom - AutoSize = False - Transparent = True - end - object pnlHeaderMemosHost: TPanel - Left = 4 - Top = 4 - Width = 501 - Height = 64 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object memHeaderLeft: TMemo - Left = 0 - Top = 0 - Width = 167 - Height = 64 - Align = alClient - ScrollBars = ssVertical - TabOrder = 0 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - object memHeaderCenter: TMemo - Tag = 1 - Left = 167 - Top = 0 - Width = 167 - Height = 64 - Align = alRight - Alignment = taCenter - ScrollBars = ssVertical - TabOrder = 1 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - object memHeaderRight: TMemo - Tag = 2 - Left = 334 - Top = 0 - Width = 167 - Height = 64 - Align = alRight - Alignment = taRightJustify - ScrollBars = ssVertical - TabOrder = 2 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - end - end - object pnlHeaderFont: TPanel - Left = 0 - Top = 16 - Width = 509 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object btnHeaderFont: TButton - Left = 4 - Top = 3 - Width = 75 - Height = 26 - Caption = '&Font...' - TabOrder = 0 - OnClick = btnHFFontClick - end - object edHeaderFontInfo: TEdit - Left = 84 - Top = 6 - Width = 244 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnHeaderBackground: TBitBtn - Left = 333 - Top = 3 - Width = 172 - Height = 26 - Caption = '&Background' - TabOrder = 2 - OnClick = BackgroundClick - Layout = blGlyphRight - end - end - object pnlHeaderTitle: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 16 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object bvlHeader: TBevel - Left = 47 - Top = 6 - Width = 454 - Height = 5 - Shape = bsBottomLine - end - object lblHeader: TLabel - Left = 6 - Top = 2 - Width = 35 - Height = 13 - Caption = 'Header' - end - end - end - object pnlFooter: TPanel - Left = 0 - Top = 118 - Width = 509 - Height = 118 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object pnlFooterTitle: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 16 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object bvlFooter: TBevel - Left = 48 - Top = 8 - Width = 456 - Height = 4 - Shape = bsBottomLine - end - object lblFooter: TLabel - Left = 6 - Top = 3 - Width = 32 - Height = 13 - Caption = 'Footer' - end - end - object pnlFooterFont: TPanel - Left = 0 - Top = 16 - Width = 509 - Height = 30 - Align = alTop - BevelOuter = bvNone - TabOrder = 1 - object btnFooterFont: TButton - Tag = 1 - Left = 4 - Top = 3 - Width = 75 - Height = 26 - Caption = 'Fo&nt...' - TabOrder = 0 - OnClick = btnHFFontClick - end - object edFooterFontInfo: TEdit - Left = 83 - Top = 6 - Width = 244 - Height = 21 - TabStop = False - Color = clBtnFace - ReadOnly = True - TabOrder = 1 - end - object btnFooterBackGround: TBitBtn - Tag = 1 - Left = 332 - Top = 3 - Width = 172 - Height = 26 - Caption = 'Back&ground' - TabOrder = 2 - OnClick = BackgroundClick - Layout = blGlyphRight - end - end - object pnlFooterMemos: TPanel - Left = 0 - Top = 46 - Width = 509 - Height = 72 - Align = alClient - BevelOuter = bvNone - ParentColor = True - TabOrder = 2 - object Label14: TLabel - Left = 0 - Top = 0 - Width = 509 - Height = 4 - Align = alTop - AutoSize = False - Transparent = True - end - object Label15: TLabel - Left = 0 - Top = 68 - Width = 509 - Height = 4 - Align = alBottom - AutoSize = False - Transparent = True - end - object Label13: TLabel - Left = 0 - Top = 4 - Width = 4 - Height = 64 - Align = alLeft - AutoSize = False - Transparent = True - end - object Label16: TLabel - Left = 505 - Top = 4 - Width = 4 - Height = 64 - Align = alRight - AutoSize = False - Transparent = True - end - object pnlFooterMemosHost: TPanel - Left = 4 - Top = 4 - Width = 501 - Height = 64 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object memFooterLeft: TMemo - Tag = 3 - Left = 0 - Top = 0 - Width = 167 - Height = 64 - Align = alClient - ScrollBars = ssVertical - TabOrder = 0 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - object memFooterCenter: TMemo - Tag = 4 - Left = 167 - Top = 0 - Width = 167 - Height = 64 - Align = alRight - Alignment = taCenter - ScrollBars = ssVertical - TabOrder = 1 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - object memFooterRight: TMemo - Tag = 5 - Left = 334 - Top = 0 - Width = 167 - Height = 64 - Align = alRight - Alignment = taRightJustify - ScrollBars = ssVertical - TabOrder = 2 - OnChange = MemoChange - OnEnter = MemoEnter - OnExit = MemoExit - end - end - end - end - object pnlReverse: TPanel - Left = 0 - Top = 303 - Width = 509 - Height = 28 - Align = alTop - BevelOuter = bvNone - TabOrder = 3 - object chbxReverseOnEvenPages: TCheckBox - Left = 7 - Top = 8 - Width = 264 - Height = 17 - Caption = '&Reverse on even pages' - TabOrder = 0 - OnClick = chbxReverseOnEvenPagesClick - end - end - end - end - object tshScaling: TTabSheet - Caption = '&Scaling' - object Panel2: TPanel - Left = 0 - Top = 0 - Width = 509 - Height = 337 - Align = alClient - BevelOuter = bvNone - TabOrder = 0 - object bvlAdjustToHolder: TBevel - Left = 35 - Top = 32 - Width = 75 - Height = 22 - Visible = False - end - object bvlFitToPageHolder: TBevel - Left = 35 - Top = 84 - Width = 75 - Height = 22 - Visible = False - end - object lblPagesWideBy: TLabel - Left = 119 - Top = 91 - Width = 77 - Height = 13 - Caption = 'page(s) &wide by' - end - object lblPercentOfNormalSize: TLabel - Left = 118 - Top = 39 - Width = 67 - Height = 13 - Caption = '% normal size' - end - object bvlFitToPageTallHolder: TBevel - Left = 261 - Top = 84 - Width = 75 - Height = 22 - Visible = False - end - object lblTall: TLabel - Left = 343 - Top = 91 - Width = 14 - Height = 13 - Caption = '&tall' - end - object rbtnAdjustTo: TRadioButton - Left = 12 - Top = 9 - Width = 150 - Height = 17 - Caption = '&Adjust To:' - Checked = True - TabOrder = 0 - TabStop = True - OnClick = ScalingClick - end - object rbtnFitTo: TRadioButton - Tag = 1 - Left = 12 - Top = 62 - Width = 150 - Height = 17 - Caption = '&Fit To:' - TabOrder = 1 - OnClick = ScalingClick - end - end - end - end - end - object ilPrintOrders: TImageList - BkColor = clWhite - AllocBy = 2 - Height = 49 - Masked = False - Width = 74 - Left = 210 - Top = 65534 - Bitmap = { - 494C01010200040004004A003100FFFFFF00FE00FFFFFFFFFFFFFFFF424D3600 - 000000000000360000002800000028010000310000000100200000000000A0E2 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080000000 - 0000000000008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000000000000000000080800000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000000000000000000000000000000000008080 - 00008080000080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF0000000000000000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000000000000000000000FFFFFF0080808000FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 000000000000808000008080000080800000FFFFFF00FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000080800000808000008080 - 0000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080800000808000008080000080800000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008080000080800000808000008080 - 000080800000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 000080800000808000008080000080800000808000008080000080800000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 000000000000808000008080000080800000808000008080000080808000FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000808000008080000080800000808000008080 - 000080800000808000008080000080800000808000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF008080800080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 000000000000808000008080000080800000808000008080000080800000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000008080000080800000808000008080000080800000808000008080 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 000080800000808000008080000080800000808000008080000080800000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 0000000000008080000080800000808000008080000080800000808000008080 - 000080800000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00000000000000000080800000808000008080 - 0000808000008080000000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000FFFFFF0080808000FFFFFF00000000000000 - 0000000000000000000080800000808000008080000080800000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00808000008080 - 0000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF0000000000FFFFFF00808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00808080008080 - 0000808000008080000080800000FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 000080800000808000008080000080800000FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080000000 - 0000000000008080000080800000808000008080000080808000808080008080 - 8000808000008080000080800000808000008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080000000000000000000808000008080 - 0000808000008080000080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808000008080000080800000808000008080000080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080800000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080000080800000808000008080000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080000080800000808000008080000080800000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00000000000000000080800000808000008080000080800000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0080800000808000008080000080800000808000008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF0000000000000000000000000080800000808000008080000080800000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000808000008080000080800000808000008080 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF000000 - 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00000000000000 - 00000000000000000000FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080000080800000808000008080 - 0000FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080000080800000808000008080 - 000080800000FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080000000 - 0000000000008080000080800000808000008080000080808000808080008080 - 8000808080008080800080808000808080008080800080800000808000008080 - 000080800000FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080000000000000000000808000008080 - 0000808000008080000080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080800000808000008080 - 00008080000080800000FFFFFF00FFFFFF008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00808000008080 - 0000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 0000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 000080800000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080800000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF008080000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080000080800000808000008080000080800000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080000000 - 0000000000008080000080800000808000008080000080808000808080008080 - 8000808080008080800080808000808080008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080800000808000008080000080800000808080008080 - 8000808080008080800080808000808080000000000000000000808000008080 - 0000808000008080000080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF0080800000808000008080000080800000808000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF008080800080800000808000008080000080800000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00808000008080000080800000808000008080 - 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF008080000080800000808000008080 - 000000000000FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080000080800000808000008080 - 0000808000000000000000000000FFFFFF0080808000FFFFFF00000000000000 - 00000000000000000000FFFFFF0080808000FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0080800000808000008080 - 000080800000FFFFFF0080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080800080800000808000008080 - 00008080000080800000FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00808000008080 - 0000808000008080000080808000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00808000008080 - 0000808000008080000080800000FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000008080 - 0000808000008080000080800000FFFFFF000000000000000000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF008080 - 00008080000080800000808000008080000080808000FFFFFF00000000000000 - 00000000000000000000FFFFFF0080808000FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00808000008080000080800000808000000000000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF008080000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080000080800000808000008080000000000000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080000080800000808000008080000080800000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080800000808000008080000080800000808000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF0000000000000000000000000000000000FFFF - FF0080808000FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF000000 - 0000000000000000000080800000808000008080000080800000808000000000 - 00000000000000000000FFFFFF0080808000FFFFFF0000000000000000000000 - 000000000000FFFFFF0080808000FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000808000008080000080800000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000808000008080000080800000808000008080 - 0000FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF0080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF008080000080800000808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008080000080800000808000008080 - 000080800000FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080000000 - 0000000000008080000080800000808000008080000080808000808080008080 - 8000808080008080800080808000808080008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080800000808000008080 - 0000808000008080000080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000000000000000000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00808000008080 - 00008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF000000 - 00000000000080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000008080 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF00FFFFFF0080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 000080800000808000008080000080800000FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFF - FF00FFFFFF0080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF0000000000000000000000000000000000FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 00008080000080800000FFFFFF0000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF0000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF00FFFFFF0080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000080800000808000008080 - 0000808000008080000080800000808000008080000000000000000000000000 - 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 - 0000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080800000808000008080000080800000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080800000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF0080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF0080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000} - end - object ilPaperTypes: TImageList - AllocBy = 8 - Left = 126 - Top = 65534 - Bitmap = { - 494C010103000800080010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFF7FFFFF0000FFFFFF7FFFFF0000 - FFFFFF7FE0030000FFFFFC1FFFFF0000FFFFFE3FFFBF0000FF7FFF7FFF1F0000 - FF7FFFFFFE0F0000FF7FE003FFBF0000FF7FFFFFFFBF0000FC1FFF7FFFBF0000 - FE3FFE3FFFBF0000FF7FFC1FFFFF0000FFFFFF7FFFFF0000E003FF7FFFFF0000 - FFFFFF7FFFFF0000FFFFFFFFFFFF000000000000000000000000000000000000 - 000000000000} - end - object ilBins: TImageList - Left = 154 - Top = 65534 - Bitmap = { - 494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000001000000001002000000000000010 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000000000FF - FF00000000000000000000000000FFFFFF008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000FFFF00000000000000 - 0000FFFFFF008080800000000000808080000000000000000000808080008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 800080808000808080008080800000000000000000000000000080808000FFFF - FF00808080008080800000000000FFFFFF008080800080808000000000000000 - 0000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF00000000000000000000FFFF00FFFFFF0000FF - FF00FFFFFF0000FFFF00808080000000000080808000FFFFFF00808080008080 - 8000FFFFFF008080800000000000FFFFFF008080800080808000808080008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF0000FFFF00808080008080800080808000808080000000000000000000FFFF - FF0000FFFF00FFFFFF008080800000000000808080008080800080808000FFFF - FF00808080008080800000000000FFFFFF008080800080808000808080008080 - 8000808080008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF0000FF - FF00FFFFFF0080808000FFFFFF00FFFFFF008080800080808000808080000000 - 0000FFFFFF0000FFFF00808080000000000080808000FFFFFF00808080008080 - 800080808000FFFFFF00FFFFFF00FFFFFF008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF0000FFFF00808080008080800000FF00000000FF0000000000808080000000 - 000000FFFF00FFFFFF008080800000000000808080008080800080808000FFFF - FF00FFFFFF008080800080808000FFFFFF00FFFFFF00FFFFFF00808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080008080800000FF - FF00FFFFFF0000FFFF00FFFFFF008080800080808000808080000000000000FF - FF00FFFFFF0000FFFF0080808000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF000000FF000000FF00FFFFFF00FFFFFF00FFFF - FF00808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0080808000FFFFFF00FFFFFF000000 - 000000FFFF00FFFFFF008080800000000000000000000000000080808000FFFF - FF00FFFFFF0000FF000000FF0000FFFFFF00FFFFFF00FFFFFF00808080008080 - 800000000000FFFFFF0080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF0000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00808080008080800000FF - FF00FFFFFF0000FFFF0080808000000000000000000000000000808080008080 - 8000FFFFFF00FFFFFF00FFFFFF00FFFFFF008080800080808000FFFFFF00FFFF - FF0000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0080808000000000000000000000000000000000000000 - 00008080800080808000FFFFFF0080808000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000FFFF00FFFF - FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000000000000080808000808080008080800080808000808080008080 - 8000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000008080800000FF - FF00FFFFFF0000FFFF00FFFFFF0000FFFF008080800000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000080808000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000FFFFFF00FFFF - FF00FFFFFF008080800080808000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000100000000100010000000000800000000000000000000000 - 000000000000000000000000FFFFFF00FFFFFE3F00000000E000E00F00000000 - C000800300000000800000010000000080000001000000008000000100000000 - 8000000000000000800000000000000080008000000000008000800000000000 - 8000C001000000008000F003000000008001FC0100000000C07FFF0000000000 - E0FFFF8100000000FFFFFFC70000000000000000000000000000000000000000 - 000000000000} - end - object ilPapers: TImageList - Left = 182 - Top = 65534 - Bitmap = { - 494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000001000000001002000000000000010 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00808080008080800080808000808080008080800080808000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000080800000808000FFFFFF00FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000FFFF0000808000008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000808000FFFFFF000080800000FF - FF00FFFFFF00FFFFFF00FFFFFF000080800000808000FFFFFF00FFFFFF0000FF - FF00FFFFFF0000808000FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF0080808000808080008080800080808000808080008080800080808000FFFF - FF00FFFFFF00FFFFFF0000000000000000000080800000FFFF00FFFFFF000080 - 8000FFFFFF0000FFFF0000808000FFFFFF00FFFFFF0000808000FFFFFF00FFFF - FF000080800000FFFF00FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000808000FFFFFF00FFFFFF0000FF - FF000000000000808000FFFFFF0000FFFF00FFFFFF00FFFFFF00008080000000 - 0000FFFFFF00FFFFFF00FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF0080808000808080008080800080808000808080008080800080808000FFFF - FF00FFFFFF00FFFFFF0000000000000000000080800000FFFF00FFFFFF00FFFF - FF000080800000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF000080 - 8000FFFFFF0000FFFF00FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00000000000000000000808000FFFFFF00FFFFFF000080 - 8000FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF0000808000FFFFFF00FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF0080808000808080008080800080808000808080008080800080808000FFFF - FF00FFFFFF00FFFFFF0000000000000000000080800000FFFF0000808000FFFF - FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFF - FF00FFFFFF0000808000FFFFFF00008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000080800000808000FFFFFF0000FF - FF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF0000FF - FF00FFFFFF00FFFFFF0000808000008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 - 0000000000000000000000000000000000000080800000808000008080000080 - 8000008080000080800000808000008080000080800000808000008080000080 - 8000008080000080800000808000008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080800000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000080808000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000100000000100010000000000800000000000000000000000 - 000000000000000000000000FFFFFF00C001FFFF00000000C001FFFF00000000 - C001FFFF00000000C001000000000000C001000000000000C001000000000000 - C001000000000000C001081000000000C001000000000000C001000000000000 - C001000000000000C001000000000000C001000000000000C003FFFF00000000 - C007FFFF00000000C00FFFFF0000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxPrevw.dcu b/internal/x.46/Lib/D11/dxPrevw.dcu deleted file mode 100644 index bd4664dc..00000000 Binary files a/internal/x.46/Lib/D11/dxPrevw.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPrnDev.dcu b/internal/x.46/Lib/D11/dxPrnDev.dcu deleted file mode 100644 index 0a5785af..00000000 Binary files a/internal/x.46/Lib/D11/dxPrnDev.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPrnDlg.dcu b/internal/x.46/Lib/D11/dxPrnDlg.dcu deleted file mode 100644 index fc3358a2..00000000 Binary files a/internal/x.46/Lib/D11/dxPrnDlg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxPrnDlg.dfm b/internal/x.46/Lib/D11/dxPrnDlg.dfm deleted file mode 100644 index c359784e..00000000 --- a/internal/x.46/Lib/D11/dxPrnDlg.dfm +++ /dev/null @@ -1,858 +0,0 @@ -object dxfmPrintDialog: TdxfmPrintDialog - Left = 384 - Top = 200 - BorderStyle = bsDialog - Caption = 'Print' - ClientHeight = 458 - ClientWidth = 484 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Panel1: TPanel - Left = 0 - Top = 427 - Width = 484 - Height = 31 - Align = alBottom - BevelOuter = bvNone - TabOrder = 3 - object btnPreview: TBitBtn - Left = 113 - Top = 2 - Width = 105 - Height = 23 - Caption = 'Print Pre&view' - TabOrder = 1 - OnClick = btnPreviewClick - end - object btnOK: TButton - Left = 234 - Top = 2 - Width = 79 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object btnCancel: TButton - Left = 318 - Top = 2 - Width = 79 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 3 - end - object btnHelp: TButton - Left = 402 - Top = 2 - Width = 79 - Height = 23 - Caption = '&Help' - TabOrder = 4 - end - object btnPageSetup: TBitBtn - Left = 3 - Top = 2 - Width = 105 - Height = 23 - Caption = 'Page Set&up...' - TabOrder = 0 - OnClick = btnPageSetupClick - Layout = blGlyphRight - end - end - object pnlPrintStyles: TPanel - Left = 0 - Top = 317 - Width = 484 - Height = 105 - Align = alTop - BevelOuter = bvNone - BorderWidth = 3 - TabOrder = 2 - object gbxPrintStyles: TGroupBox - Left = 3 - Top = 3 - Width = 478 - Height = 99 - Align = alClient - Caption = ' Print Styles ' - TabOrder = 0 - object lbxPrintStyles: TListBox - Left = 7 - Top = 15 - Width = 322 - Height = 78 - Style = lbOwnerDrawFixed - ItemHeight = 34 - PopupMenu = pmPrintStyles - TabOrder = 0 - OnClick = lbxPrintStylesClick - OnDblClick = PageSetup2Click - OnDrawItem = lbxPrintStylesDrawItem - end - object btnPageSetup2: TButton - Left = 335 - Top = 15 - Width = 136 - Height = 23 - Caption = 'Page Set&up...' - Default = True - TabOrder = 1 - OnClick = PageSetup2Click - end - object btnDefineStyles: TButton - Left = 335 - Top = 42 - Width = 136 - Height = 23 - Caption = 'Define S&tyles...' - TabOrder = 2 - OnClick = DefineStylesClick - end - end - end - object pnlMiddle: TPanel - Left = 0 - Top = 164 - Width = 484 - Height = 153 - Align = alTop - BevelOuter = bvNone - BorderWidth = 3 - TabOrder = 1 - object gbxPageRange: TGroupBox - Left = 3 - Top = 3 - Width = 244 - Height = 147 - Align = alLeft - Caption = ' Page ra&nge ' - TabOrder = 0 - object lblDescription: TLabel - Left = 6 - Top = 98 - Width = 232 - Height = 41 - AutoSize = False - Caption = - 'Enter page number and/or page ranges'#13#10'separated by commes. For e' + - 'xample : 1,3,5-12' - Transparent = True - WordWrap = True - end - object bvlPRWarningHolder: TBevel - Left = 80 - Top = 12 - Width = 157 - Height = 30 - Visible = False - end - object rbtnAllPages: TRadioButton - Left = 9 - Top = 23 - Width = 58 - Height = 17 - Caption = '&All' - Checked = True - TabOrder = 0 - TabStop = True - OnClick = rbtnPagesClick - end - object rbtnCurrentPage: TRadioButton - Tag = 1 - Left = 9 - Top = 48 - Width = 104 - Height = 17 - Caption = 'Curr&ent page' - TabOrder = 1 - OnClick = rbtnPagesClick - end - object rbtnPageRanges: TRadioButton - Tag = 2 - Left = 9 - Top = 72 - Width = 67 - Height = 17 - Caption = 'Pa&ges: ' - TabOrder = 2 - OnClick = rbtnPagesClick - end - object edPageRanges: TEdit - Left = 80 - Top = 70 - Width = 157 - Height = 21 - AutoSelect = False - TabOrder = 3 - OnChange = edPageRangesChange - OnExit = edPageRangesExit - OnKeyPress = edPageRangesKeyPress - end - object rbtnSelection: TRadioButton - Tag = 3 - Left = 116 - Top = 48 - Width = 113 - Height = 17 - Caption = '&Selection' - TabOrder = 4 - OnClick = rbtnPagesClick - end - end - object gbxCopies: TGroupBox - Left = 251 - Top = 3 - Width = 230 - Height = 147 - Align = alRight - Caption = ' C&opies ' - TabOrder = 1 - object lblNumberOfCopies: TLabel - Left = 11 - Top = 48 - Width = 90 - Height = 13 - Caption = 'Number of &copies :' - OnClick = lblNumberOfCopiesClick - end - object bvlCopiesHolder: TBevel - Left = 122 - Top = 43 - Width = 101 - Height = 22 - Visible = False - end - object lblNumberOfPages: TLabel - Left = 11 - Top = 21 - Width = 89 - Height = 13 - Caption = 'Number of pa&ges :' - FocusControl = cbxNumberOfPages - OnClick = lblNumberOfPagesClick - end - object pbxCollate: TPaintBox - Left = 62 - Top = 96 - Width = 118 - Height = 44 - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -9 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - OnDblClick = pbxCollateDblClick - OnPaint = pbxCollatePaint - end - object chbxCollate: TCheckBox - Left = 9 - Top = 74 - Width = 171 - Height = 17 - Caption = 'Co&llate copies' - TabOrder = 1 - OnClick = chbxCollateClick - end - object cbxNumberOfPages: TComboBox - Left = 122 - Top = 17 - Width = 101 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 0 - OnChange = cbxNumberOfPagesChange - Items.Strings = ( - 'All' - 'Even' - 'Odd') - end - end - end - object pnlTop: TPanel - Left = 0 - Top = 0 - Width = 484 - Height = 164 - Align = alTop - BevelOuter = bvNone - BorderWidth = 3 - TabOrder = 0 - object gbxPrinter: TGroupBox - Left = 3 - Top = 3 - Width = 478 - Height = 158 - Align = alClient - Caption = ' &Printer ' - TabOrder = 0 - object lblName: TLabel - Left = 8 - Top = 20 - Width = 31 - Height = 13 - Caption = '&Name:' - FocusControl = cbxPrinters - OnClick = lblNameClick - end - object lblStatus: TLabel - Left = 8 - Top = 48 - Width = 35 - Height = 13 - Caption = 'Status:' - end - object lblType: TLabel - Left = 8 - Top = 67 - Width = 28 - Height = 13 - Caption = 'Type:' - end - object lblWhere: TLabel - Left = 8 - Top = 86 - Width = 36 - Height = 13 - Caption = 'Where:' - end - object lblComment: TLabel - Left = 8 - Top = 105 - Width = 49 - Height = 13 - Caption = 'Comment:' - end - object lStatus: TLabel - Left = 90 - Top = 49 - Width = 31 - Height = 13 - Caption = 'Status' - end - object lType: TLabel - Left = 90 - Top = 68 - Width = 24 - Height = 13 - Caption = 'Type' - end - object lWhere: TLabel - Left = 90 - Top = 87 - Width = 32 - Height = 13 - Caption = 'Where' - end - object lComment: TLabel - Left = 90 - Top = 106 - Width = 45 - Height = 13 - Caption = 'Comment' - end - object cbxPrinters: TComboBox - Left = 90 - Top = 15 - Width = 280 - Height = 26 - Style = csOwnerDrawFixed - ItemHeight = 20 - TabOrder = 0 - OnChange = cbxPrintersChange - OnDrawItem = cbxPrintersDrawItem - end - object btnPrinterProperties: TButton - Left = 376 - Top = 15 - Width = 95 - Height = 26 - Caption = 'P&roperties...' - TabOrder = 1 - OnClick = btnPrinterPropertiesClick - end - object btnNetwork: TButton - Left = 376 - Top = 45 - Width = 95 - Height = 26 - Caption = 'Net&work...' - TabOrder = 2 - OnClick = btnNetworkClick - end - object pnlPrintToFile: TPanel - Left = 2 - Top = 120 - Width = 474 - Height = 36 - Align = alBottom - BevelOuter = bvNone - TabOrder = 3 - object chbxPrintToFile: TCheckBox - Left = 8 - Top = 10 - Width = 136 - Height = 15 - Caption = 'Print to &file' - TabOrder = 0 - OnClick = chbxPrintToFileClick - end - object cbxFileName: TComboBox - Left = 150 - Top = 7 - Width = 216 - Height = 21 - ItemHeight = 13 - TabOrder = 1 - Text = 'cbxFileName' - OnExit = cbxFileNameExit - end - object btnBrowse: TButton - Left = 374 - Top = 6 - Width = 95 - Height = 23 - Caption = '&Browse...' - TabOrder = 2 - OnClick = btnBrowseClick - end - end - end - end - object ilPrinters: TImageList - AllocBy = 7 - Left = 85 - Top = 357 - Bitmap = { - 494C010107000C000C0010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008400 - 0000840000008400000084000000840000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000840000008400 - 0000840000008484840084000000FFFFFF008400000084000000840000008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008400000084000000840000008400000084000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000840000000000000000000000000000000000000000000000848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000840000008400 - 0000840000008400000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 000084000000000000000000000000000000000000008484840000FFFF0000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF0000FFFF008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000840000008400 - 000084000000840000008484840084000000FFFFFF0084000000840000008400 - 0000840000008400000084000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 000084000000000000000000000000000000000000008484840000FFFF0000FF - FF0000FFFF0000FFFF00C6C6C600000000000084840000FFFF0000FFFF0000FF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 000084000000000000000000000000000000000000008484840000FFFF0000FF - FF0000FFFF0000FFFF000084840000000000C6C6C60000FFFF0000FFFF0000FF - FF0000FFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 00008400000084000000840000008400000000000000000000008484840000FF - FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000008400000084000000848484008484 - 8400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 000084000000FFFFFF00840000008400000000000000000000008484840000FF - FF0000FFFF0000FFFF0000FFFF000000000000FFFF0000FFFF0000FFFF0000FF - FF00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000008400000084000000848484008484 - 840084848400840000008484840084000000FFFFFF00FFFFFF00FFFFFF008400 - 000084000000FFFFFF0084000000840000000000000000000000000000008484 - 840000FFFF0000FFFF0000FFFF000000000000FFFF0000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000084000000840000008400 - 0000840000008484840084848400848484008400000084000000840000008400 - 0000FFFFFF00FFFFFF0084000000840000000000000000000000000000008484 - 840000FFFF0000FFFF0000848400000000000084840000FFFF0000FFFF000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000008400 - 0000840000008484840084848400848484008484840084000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000840000000000000000000000000000000000 - 00008484840000FFFF0000848400000000000084840000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000008400 - 0000840000008484840084848400848484008484840084000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000840000000000000000000000000000000000 - 00008484840000FFFF0000848400000000000084840000FFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 84008484840084848400840000000000000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000008400 - 0000840000008484840084848400848484008484840084000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000840000000000000000000000000000000000 - 0000000000008484840000FFFF000000000000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000000000000000000008400 - 000084000000848484008484840084848400840000000000000084000000FFFF - FF00FFFFFF00FFFFFF0084000000840000000000000000000000000000000000 - 0000000000008484840000FFFF0000FFFF0000FFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000840000008400000084000000840000000000000000000000000000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 000000000000000000008484840000FFFF000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000C6C6C600848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000084840000FFFF00C6C6C600008484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000C0C0C000808080008080800000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000080800000FFFF00C0C0C000008080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008484 - 8400C6C6C600C6C6C60084848400000000000000000084848400848484000000 - 000000000000000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6 - C600C6C6C60084848400000000000000000000000000C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C6000000000000000000000000008080 - 8000C0C0C000C0C0C00080808000000000000000000080808000808080000000 - 000000000000000000000000000000000000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C00080808000000000000000000000000000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000C0C0C0000000000084848400C6C6C6008484 - 84008484840084848400C6C6C600848484008484840000000000000000008484 - 8400848484000000000000000000000000000000000000000000000000000000 - 0000000000008484840084848400848484008484840000000000000000000000 - 0000000000000000000000000000000000000000000080808000C0C0C0008080 - 80008080800080808000C0C0C000808080008080800000000000000000008080 - 8000808080000000000000000000000000000000000000000000000000000000 - 0000000000008080800080808000808080008080800000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484008484 - 8400C6C6C600C6C6C600C6C6C600848484008484840084848400848484000000 - 0000000000008484840000000000000000000000000000000000000000000000 - 0000C6C6C600C6C6C600C6C6C600848484008484840084848400848484000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000C0C0C000C0C0C000C0C0C000808080008080800080808000808080000000 - 0000000000008080800000000000000000000000000000000000000000000000 - 0000C0C0C000C0C0C000C0C0C000808080008080800080808000808080000000 - 0000000000000000000000000000000000008484840084848400C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400848484008484 - 840084848400000000000000000000000000000000008484840084848400C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400848484008484 - 8400848484000000000000000000000000008080800080808000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000808080008080800080808000808080008080 - 800080808000000000000000000000000000000000008080800080808000C0C0 - C000C0C0C000C0C0C000C0C0C000808080008080800080808000808080008080 - 800080808000000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400848484008484 - 840084848400848484008484840000000000C6C6C600C6C6C600C6C6C600C6C6 - C600C6C6C600C6C6C600C6C6C600848484008484840084848400848484008484 - 840084848400848484008484840000000000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000808080008080800080808000808080008080 - 800080808000808080008080800000000000C0C0C000C0C0C000C0C0C000C0C0 - C000C0C0C000C0C0C000C0C0C000808080008080800080808000808080008080 - 800080808000808080008080800000000000C6C6C600FFFFFF00C6C6C600C6C6 - C600FFFFFF00FFFFFF00C6C6C600C6C6C600C6C6C60084848400848484008484 - 840084848400848484008484840000000000C6C6C600FFFFFF00C6C6C600C6C6 - C600FFFFFF00FFFFFF00C6C6C600C6C6C600C6C6C60084848400848484008484 - 840084848400848484008484840000000000C0C0C000FFFFFF00C0C0C000C0C0 - C000FFFFFF00FFFFFF00C0C0C000C0C0C000C0C0C00080808000808080008080 - 800080808000808080008080800000000000C0C0C000FFFFFF00C0C0C000C0C0 - C000FFFFFF00FFFFFF00C0C0C000C0C0C000C0C0C00080808000808080008080 - 800080808000808080008080800000000000C6C6C600FFFFFF00FFFFFF00FFFF - FF00C6C6C600C6C6C6000000FF0084848400C6C6C600C6C6C600C6C6C6008484 - 840084848400848484008484840000000000C6C6C600FFFFFF00FFFFFF00FFFF - FF00C6C6C600C6C6C6000000FF0084848400C6C6C600C6C6C600C6C6C6008484 - 840084848400848484008484840000000000C0C0C000FFFFFF00FFFFFF00FFFF - FF00C0C0C000C0C0C0000000FF0080808000C0C0C000C0C0C000C0C0C0008080 - 800080808000808080008080800000000000C0C0C000FFFFFF00FFFFFF00FFFF - FF00C0C0C000C0C0C0000000FF0080808000C0C0C000C0C0C000C0C0C0008080 - 800080808000808080008080800000000000C6C6C600FFFFFF00C6C6C600C6C6 - C60000FF00008484840084848400C6C6C600C6C6C60084848400848484000000 - 0000C6C6C600848484008484840000000000C6C6C600FFFFFF00C6C6C600C6C6 - C60000FF00008484840084848400C6C6C600C6C6C60084848400848484000000 - 0000C6C6C600848484008484840000000000C0C0C000FFFFFF00C0C0C000C0C0 - C00000FF00008080800080808000C0C0C000C0C0C00080808000808080000000 - 0000C0C0C000808080008080800000000000C0C0C000FFFFFF00C0C0C000C0C0 - C00000FF00008080800080808000C0C0C000C0C0C00080808000808080000000 - 0000C0C0C0008080800080808000000000000000000084848400C6C6C600C6C6 - C60084848400C6C6C600C6C6C60084848400C6C6C600C6C6C600C6C6C6000000 - 0000C6C6C6000000000000000000000000000000000084848400C6C6C600C6C6 - C60084848400C6C6C600C6C6C6008484840084848400C6C6C600C6C6C6000000 - 0000C6C6C6008484840084848400000000000000000080808000C0C0C000C0C0 - C00080808000C0C0C000C0C0C00080808000C0C0C000C0C0C000C0C0C0000000 - 0000C0C0C0000000000000000000000000000000000080808000C0C0C000C0C0 - C00080808000C0C0C000C0C0C0008080800080808000C0C0C000C0C0C0000000 - 0000C0C0C000808080008080800000000000000000000000000000000000C6C6 - C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600FFFFFF00FFFFFF008484 - 840000000000000000000000000000000000000000000000000000000000C6C6 - C600C6C6C600C6C6C60084848400C6C6C600C6C6C600FFFFFF00FFFFFF008484 - 8400848484000000000000000000000000008080800000000000000000000000 - 000080808000C0C0C000C0C0C000C0C0C000C0C0C000FFFFFF00FFFFFF008080 - 8000000000000000000000000000000000008080800000000000000000000000 - 000080808000C0C0C00080808000C0C0C000C0C0C000FFFFFF00FFFFFF008080 - 8000808080000000000000000000000000000000000000000000000000000000 - 00000000000084848400C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00848484000000000000000000000000000000000000000000000000000000 - 0000000000008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00848484000000000000000000000000000000000000000000FFFFFF000000 - 00000000000080808000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00808080000000000000000000000000000000000000000000FFFFFF000000 - 0000000000008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00808080000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008484840000000000000000000000000000000000000000000000 - 0000000000000000000000000000C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084848400000000000000000000000000C0C0C00000000000FFFF - FF0000000000FFFFFF0000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0080808000000000000000000000000000C0C0C00000000000FFFF - FF0000000000FFFFFF0000000000C0C0C000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008080800000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000C6C6C600FFFFFF00FFFFFF00FFFF - FF00C6C6C600C6C6C60000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000C6C6C600FFFFFF00FFFFFF00FFFF - FF00C6C6C600C6C6C60000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000C0C0C000FFFFFF00FFFFFF00FFFF - FF00C0C0C000C0C0C00000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000C0C0C000FFFFFF00FFFFFF00FFFF - FF00C0C0C000C0C0C00000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6 - C600000000000000000000000000000000008080800000000000000000000000 - 00008080800000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C000000000000000000000000000000000008080800000000000000000000000 - 00008080800000000000000000000000000000000000C0C0C000C0C0C000C0C0 - C00000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFE0FFFFFF0000FFFF0007E0030000 - F83F0007C0010000000100078001000000010007800300000001000780030000 - 00010000C007000000010000C007000000010000E00F000000018000E00F0000 - 0001E000F01F00000001E000F01F00000101E000F83F00008383E040F83F0000 - FFFFF0E1FC7F0000FFFFFFFFFE7F0000FC7FF87FFC7FF87FF01F0000F01F0000 - C0070000C00700008001F01F8001F01F8001C0078001C0070001000100010001 - 0000000000000000000000000000000000000000000000000000000000000000 - 8001800180018001E007E00700070007F803F80300030003FE00FE0002000200 - FF03FF0303030303FF8FFF8F078F078F00000000000000000000000000000000 - 000000000000} - end - object pmPrintStyles: TPopupMenu - OnPopup = pmPrintStylesPopup - Left = 27 - Top = 357 - object miPageSetup: TMenuItem - Caption = 'Page Set&up...' - Default = True - ShortCut = 16397 - OnClick = PageSetup2Click - end - object miLine1: TMenuItem - Caption = '-' - end - object miDefineStyles: TMenuItem - Caption = 'Define Styles...' - OnClick = DefineStylesClick - end - end -end diff --git a/internal/x.46/Lib/D11/dxPrnPg.dcu b/internal/x.46/Lib/D11/dxPrnPg.dcu deleted file mode 100644 index d440e89d..00000000 Binary files a/internal/x.46/Lib/D11/dxPrnPg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxSkinInfo.dcu b/internal/x.46/Lib/D11/dxSkinInfo.dcu deleted file mode 100644 index 693e5baa..00000000 Binary files a/internal/x.46/Lib/D11/dxSkinInfo.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxSkinsCore.dcu b/internal/x.46/Lib/D11/dxSkinsCore.dcu deleted file mode 100644 index 4e935ec6..00000000 Binary files a/internal/x.46/Lib/D11/dxSkinsCore.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxSkinsStrs.dcu b/internal/x.46/Lib/D11/dxSkinsStrs.dcu deleted file mode 100644 index a86916b8..00000000 Binary files a/internal/x.46/Lib/D11/dxSkinsStrs.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxSplash.res b/internal/x.46/Lib/D11/dxSplash.res deleted file mode 100644 index dd6d193b..00000000 Binary files a/internal/x.46/Lib/D11/dxSplash.res and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxThemeConsts.dcu b/internal/x.46/Lib/D11/dxThemeConsts.dcu deleted file mode 100644 index b415d9dc..00000000 Binary files a/internal/x.46/Lib/D11/dxThemeConsts.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxThemeD11.dcp b/internal/x.46/Lib/D11/dxThemeD11.dcp deleted file mode 100644 index b189763c..00000000 Binary files a/internal/x.46/Lib/D11/dxThemeD11.dcp and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxThemeManager.dcu b/internal/x.46/Lib/D11/dxThemeManager.dcu deleted file mode 100644 index 24b2b428..00000000 Binary files a/internal/x.46/Lib/D11/dxThemeManager.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxUxTheme.dcu b/internal/x.46/Lib/D11/dxUxTheme.dcu deleted file mode 100644 index 9b41dc9f..00000000 Binary files a/internal/x.46/Lib/D11/dxUxTheme.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxWrap.dcu b/internal/x.46/Lib/D11/dxWrap.dcu deleted file mode 100644 index 6a80c08f..00000000 Binary files a/internal/x.46/Lib/D11/dxWrap.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxfmChFn.dcu b/internal/x.46/Lib/D11/dxfmChFn.dcu deleted file mode 100644 index dcd8ca99..00000000 Binary files a/internal/x.46/Lib/D11/dxfmChFn.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxfmChFn.dfm b/internal/x.46/Lib/D11/dxfmChFn.dfm deleted file mode 100644 index 50d8c552..00000000 --- a/internal/x.46/Lib/D11/dxfmChFn.dfm +++ /dev/null @@ -1,69 +0,0 @@ -object fmdxChangeFileName: TfmdxChangeFileName - Left = 368 - Top = 184 - ActiveControl = edFileName - BorderStyle = bsDialog - Caption = 'Choose New File Name' - ClientHeight = 104 - ClientWidth = 350 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - OnCloseQuery = FormCloseQuery - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 109 - Top = 75 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 190 - Top = 75 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 271 - Top = 75 - Width = 75 - Height = 23 - Caption = '&Help' - TabOrder = 3 - end - object GroupBox1: TGroupBox - Left = 4 - Top = 2 - Width = 342 - Height = 65 - TabOrder = 0 - object lblEnterNewFileName: TLabel - Left = 9 - Top = 17 - Width = 103 - Height = 13 - Caption = '&Enter New File Name:' - FocusControl = edFileName - end - object edFileName: TEdit - Left = 9 - Top = 33 - Width = 324 - Height = 21 - MaxLength = 260 - TabOrder = 0 - OnChange = edFileNameChange - end - end -end diff --git a/internal/x.46/Lib/D11/dxfmClr.dcu b/internal/x.46/Lib/D11/dxfmClr.dcu deleted file mode 100644 index c47c7be0..00000000 Binary files a/internal/x.46/Lib/D11/dxfmClr.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxfmClr.dfm b/internal/x.46/Lib/D11/dxfmClr.dfm deleted file mode 100644 index 4ae384fc..00000000 --- a/internal/x.46/Lib/D11/dxfmClr.dfm +++ /dev/null @@ -1,569 +0,0 @@ -object dxfmColorPalette: TdxfmColorPalette - Left = 410 - Top = 280 - BorderStyle = bsDialog - ClientHeight = 182 - ClientWidth = 148 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = True - ShowHint = True - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object pnlTop: TPanel - Left = 0 - Top = 0 - Width = 148 - Height = 121 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - object SpeedButton1: TSpeedButton - Left = 2 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton2: TSpeedButton - Left = 20 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton3: TSpeedButton - Left = 38 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton4: TSpeedButton - Left = 56 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton5: TSpeedButton - Left = 74 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton6: TSpeedButton - Left = 92 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton7: TSpeedButton - Left = 110 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton8: TSpeedButton - Left = 128 - Top = 28 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton9: TSpeedButton - Left = 2 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton10: TSpeedButton - Left = 20 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton11: TSpeedButton - Left = 38 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton12: TSpeedButton - Left = 56 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton13: TSpeedButton - Left = 74 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton14: TSpeedButton - Left = 92 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton15: TSpeedButton - Left = 110 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton16: TSpeedButton - Left = 128 - Top = 46 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton17: TSpeedButton - Left = 2 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton18: TSpeedButton - Left = 20 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton19: TSpeedButton - Left = 38 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton20: TSpeedButton - Left = 56 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton21: TSpeedButton - Left = 74 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton22: TSpeedButton - Left = 92 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton23: TSpeedButton - Left = 110 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton24: TSpeedButton - Left = 128 - Top = 64 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton25: TSpeedButton - Left = 2 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton26: TSpeedButton - Left = 20 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton27: TSpeedButton - Left = 38 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton28: TSpeedButton - Left = 56 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton29: TSpeedButton - Left = 74 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton30: TSpeedButton - Left = 92 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton31: TSpeedButton - Left = 110 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton32: TSpeedButton - Left = 128 - Top = 82 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton33: TSpeedButton - Left = 2 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton34: TSpeedButton - Left = 20 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton35: TSpeedButton - Left = 38 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton36: TSpeedButton - Left = 56 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton37: TSpeedButton - Left = 74 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton38: TSpeedButton - Left = 92 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton39: TSpeedButton - Left = 110 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object SpeedButton40: TSpeedButton - Left = 128 - Top = 100 - Width = 18 - Height = 18 - GroupIndex = 1 - Flat = True - ParentShowHint = False - ShowHint = True - OnClick = ButtonClick - end - object bvlNoFillHolder: TBevel - Left = 2 - Top = 3 - Width = 144 - Height = 22 - Visible = False - end - end - object pnlBottom: TPanel - Left = 0 - Top = 126 - Width = 148 - Height = 56 - Align = alClient - BevelOuter = bvNone - TabOrder = 1 - object sBtnMoreColors: TSpeedButton - Left = 2 - Top = 4 - Width = 144 - Height = 26 - Caption = '&More Colors ...' - Flat = True - Glyph.Data = { - F6000000424DF600000000000000760000002800000010000000100000000100 - 0400000000008000000000000000000000001000000010000000000000000000 - 8000008000000080800080000000800080008080000080808000C0C0C0000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00551199BBAAEE - CC44551199BBAAEECC44551199BBAAEECC44551199BBAAEECC44551199BBAAEE - CC44551199BBAAEECC44551199BBAAEECC44551199BBAAEECC44551199BBAAEE - CC44551199BBAAEECC44551199BBAAEECC44551199BBAAEECC44551199BBAAEE - CC44551199BBAAEECC44551199BBAAEECC44551199BBAAEECC44} - Margin = 3 - Spacing = 10 - OnClick = sBtnMoreColorsClick - end - object sBtnFillEffects: TSpeedButton - Left = 2 - Top = 30 - Width = 144 - Height = 26 - Caption = '&Fill Effects ...' - Flat = True - Glyph.Data = { - 36050000424D3605000000000000360400002800000010000000100000000100 - 0800000000000001000000000000000000000001000000010000000000000000 - 80000080000000808000800000008000800080800000C0C0C000C0DCC000F0CA - A600D3F0FF00B1E2FF008ED3FF006BC6FF0048B8FF0024AAFF0000AAFF000092 - DC000079B900006196000049730000325000D3E3FF00B1C7FF008EABFF006B8F - FF004873FF002457FF000055FF000049DC00003CB90000309600002473000019 - 5000D3D3FF00B1B1FF008E8EFF006B6BFF004848FF002424FF000000FE000000 - DC000000B900000096000000730000005000E3D3FF00C7B1FF00AB8EFF008F6B - FF007348FF005724FF005500FF004900DC003C00B90030009600240073001900 - 5000F0D3FF00E2B1FF00D38EFF00C66BFF00B848FF00AA24FF00AA00FF009200 - DC007900B900610096004900730032005000FFD3FF00FFB1FF00FF8EFF00FF6B - FF00FF48FF00FF24FF00FE00FE00DC00DC00B900B90096009600730073005000 - 5000FFD3F000FFB1E200FF8ED300FF6BC600FF48B800FF24AA00FF00AA00DC00 - 9200B9007900960061007300490050003200FFD3E300FFB1C700FF8EAB00FF6B - 8F00FF487300FF245700FF005500DC004900B9003C0096003000730024005000 - 1900FFD3D300FFB1B100FF8E8E00FF6B6B00FF484800FF242400FE000000DC00 - 0000B9000000960000007300000050000000FFE3D300FFC7B100FFAB8E00FF8F - 6B00FF734800FF572400FF550000DC490000B93C000096300000732400005019 - 0000FFF0D300FFE2B100FFD38E00FFC66B00FFB84800FFAA2400FFAA0000DC92 - 0000B9790000966100007349000050320000FFFFD300FFFFB100FFFF8E00FFFF - 6B00FFFF4800FFFF2400FEFE0000DCDC0000B9B9000096960000737300005050 - 0000F0FFD300E2FFB100D3FF8E00C6FF6B00B8FF4800AAFF2400AAFF000092DC - 000079B90000619600004973000032500000E3FFD300C7FFB100ABFF8E008FFF - 6B0073FF480057FF240055FF000049DC00003CB9000030960000247300001950 - 0000D3FFD300B1FFB1008EFF8E006BFF6B0048FF480024FF240000FE000000DC - 000000B90000009600000073000000500000D3FFE300B1FFC7008EFFAB006BFF - 8F0048FF730024FF570000FF550000DC490000B93C0000963000007324000050 - 1900D3FFF000B1FFE2008EFFD3006BFFC60048FFB80024FFAA0000FFAA0000DC - 920000B97900009661000073490000503200D3FFFF00B1FFFF008EFFFF006BFF - FF0048FFFF0024FFFF0000FEFE0000DCDC0000B9B90000969600007373000050 - 5000F2F2F200E6E6E600DADADA00CECECE00C2C2C200B6B6B600AAAAAA009E9E - 9E009292920086868600797979006E6E6E006161610056565600494949003E3E - 3E0032323200262626001A1A1A000E0E0E00F0FBFF00A3A0A000808080000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00686868686868 - 686868686868686868686873737373737373737373737373736868737E7E7E7E - 7E7E7E7E7E7E7E7E736868737E7C7C7C7C7C7C7C7C7C7C7E736868737E7C8787 - 8787878787877C7E736868737E7C87858585858585877C7E736868737E7C8785 - 8484848485877C7E736868737E7C87858483838485877C7E736868737E7C8785 - 8483838485877C7E736868737E7C87858484848485877C7E736868737E7C8785 - 8585858585877C7E736868737E7C87878787878787877C7E736868737E7C7C7C - 7C7C7C7C7C7C7C7E736868737E7E7E7E7E7E7E7E7E7E7E7E7368687373737373 - 7373737373737373736868686868686868686868686868686868} - Margin = 4 - Spacing = 10 - OnClick = sBtnFillEffectsClick - end - end - object pnlMiddle: TPanel - Left = 0 - Top = 121 - Width = 148 - Height = 5 - Align = alTop - BevelOuter = bvNone - TabOrder = 2 - object Bevel1: TBevel - Left = 25 - Top = -2 - Width = 97 - Height = 6 - Shape = bsBottomLine - end - end -end diff --git a/internal/x.46/Lib/D11/dxfmDTFmt.dcu b/internal/x.46/Lib/D11/dxfmDTFmt.dcu deleted file mode 100644 index eab60f39..00000000 Binary files a/internal/x.46/Lib/D11/dxfmDTFmt.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxfmDTFmt.dfm b/internal/x.46/Lib/D11/dxfmDTFmt.dfm deleted file mode 100644 index b078c756..00000000 --- a/internal/x.46/Lib/D11/dxfmDTFmt.dfm +++ /dev/null @@ -1,106 +0,0 @@ -object dxfmDateTimeFormats: TdxfmDateTimeFormats - Left = 350 - Top = 153 - ActiveControl = lbxDateFormats - BorderStyle = bsDialog - Caption = 'Change Date and Time Formats' - ClientHeight = 342 - ClientWidth = 282 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 41 - Top = 313 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 122 - Top = 313 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 203 - Top = 313 - Width = 75 - Height = 23 - Caption = '&Help' - TabOrder = 3 - end - object GroupBox1: TGroupBox - Left = 4 - Top = 4 - Width = 274 - Height = 301 - TabOrder = 0 - object lblAvailableDateFormats: TLabel - Left = 10 - Top = 13 - Width = 115 - Height = 13 - Caption = 'Available &Date Formats:' - FocusControl = lbxDateFormats - OnClick = lblAvailableDateFormatsClick - end - object lblAvailableTimeFormats: TLabel - Left = 10 - Top = 187 - Width = 114 - Height = 13 - Caption = 'Available Time &Formats:' - FocusControl = lbxTimeFormats - OnClick = lblAvailableDateFormatsClick - end - object lbxDateFormats: TListBox - Left = 8 - Top = 28 - Width = 257 - Height = 150 - ItemHeight = 13 - TabOrder = 0 - OnClick = lbxDateFormatsClick - OnDblClick = lbxDTFormatsDblClick - end - object lbxTimeFormats: TListBox - Left = 8 - Top = 203 - Width = 257 - Height = 59 - ItemHeight = 13 - TabOrder = 1 - OnClick = TimeFormatsChanged - OnDblClick = lbxDTFormatsDblClick - end - object chbxAutoUpdate: TCheckBox - Left = 8 - Top = 274 - Width = 160 - Height = 17 - Caption = '&Update Automatically ' - TabOrder = 2 - OnClick = chbxAutoUpdateClick - end - object btnDefault: TButton - Left = 175 - Top = 270 - Width = 90 - Height = 23 - Caption = '&Default ...' - TabOrder = 3 - OnClick = btnDefaultClick - end - end -end diff --git a/internal/x.46/Lib/D11/dxfmDfnStl.dcu b/internal/x.46/Lib/D11/dxfmDfnStl.dcu deleted file mode 100644 index 0b598c04..00000000 Binary files a/internal/x.46/Lib/D11/dxfmDfnStl.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxfmDfnStl.dfm b/internal/x.46/Lib/D11/dxfmDfnStl.dfm deleted file mode 100644 index ceb4453e..00000000 --- a/internal/x.46/Lib/D11/dxfmDfnStl.dfm +++ /dev/null @@ -1,409 +0,0 @@ -object dxfmDefinePrintStyles: TdxfmDefinePrintStyles - Left = 414 - Top = 232 - ActiveControl = lbxPrintStyles - BorderStyle = bsDialog - Caption = 'Define Print Styles' - ClientHeight = 193 - ClientWidth = 282 - Color = clBtnFace - Constraints.MinHeight = 220 - Constraints.MinWidth = 290 - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000004 - 4444000000004444474F444440004477774FFFF440004477774FFFF440004477 - 774FFFF440004477774FFFF440004477774FFFF444444477774FFFF44F444477 - 7474FFF44F44044447774444FF440004477774FFFF440004477774FFFF440004 - 477774FFFF4400044777404FFF4400004444000444400000000000000000E0FF - 0000000700000007000000070000000700000007000000000000000000000000 - 000080000000E0000000E0000000E0000000E0400000F0E10000FFFF0000} - KeyPreview = True - OldCreateOrder = True - Position = poScreenCenter - OnResize = FormResize - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object lblPrintStyles: TLabel - Left = 3 - Top = 5 - Width = 58 - Height = 13 - Caption = 'Print &Styles:' - FocusControl = lbxPrintStyles - end - object btnEdit: TButton - Left = 196 - Top = 24 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Edit...' - TabOrder = 0 - OnClick = EditClick - end - object btnCopy: TButton - Left = 196 - Top = 53 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Copy...' - TabOrder = 1 - OnClick = CopyClick - end - object btnReset: TButton - Left = 196 - Top = 82 - Width = 80 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Reset...' - TabOrder = 2 - OnClick = ResetClick - end - object btnClose: TButton - Left = 196 - Top = 133 - Width = 80 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Close' - Default = True - ModalResult = 1 - TabOrder = 3 - end - object btnHelp: TButton - Left = 196 - Top = 162 - Width = 80 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = '&Help' - ModalResult = 1 - TabOrder = 4 - end - object lbxPrintStyles: TListBox - Left = 0 - Top = 24 - Width = 189 - Height = 169 - Anchors = [akLeft, akTop, akRight, akBottom] - ItemHeight = 34 - PopupMenu = pmPrintStyles - Style = lbOwnerDrawFixed - TabOrder = 5 - OnClick = lbxPrintStylesClick - OnDblClick = EditClick - OnDrawItem = lbxPrintStylesDrawItem - end - object pmPrintStyles: TPopupMenu - OnPopup = pmPrintStylesPopup - Left = 26 - Top = 120 - object miEdit: TMenuItem - Caption = '&Edit ...' - Default = True - ShortCut = 16397 - OnClick = EditClick - end - object miLine1: TMenuItem - Caption = '-' - end - object miCopy: TMenuItem - Caption = '&Copy ...' - ShortCut = 45 - OnClick = CopyClick - end - object miReset: TMenuItem - Caption = '&Reset ...' - OnClick = ResetClick - end - object miClear: TMenuItem - Caption = 'C&lear ...' - OnClick = ClearClick - end - end - object ilPrintStyles: TImageList - AllocBy = 2 - Left = 54 - Top = 120 - Bitmap = { - 494C010104000800040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008400000084000000840000008400000084000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000008400000084000000840000008400 - 0000840000008400000084000000840000008400000084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000FFFFFF000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000840000008400 - 000084000000840000008484840084000000FFFFFF0084000000840000008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF008400000084000000000000000000000000000000000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000000000000000 - 000000000000FFFFFF0084000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF00000000000000000000000000FFFF - FF0000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000FFFFFF008400 - 0000840000008400000084000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00000000000000 - 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000FFFFFF008400000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 - 0000840000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00000000000000000000000000000000008400000084000000848484008484 - 840084848400848484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00000000000000 - 0000FFFFFF000000000084000000840000008400000084000000840000008400 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000008400000084000000848484008484 - 84008484840084848400840000000000000084000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0084000000840000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000FFFFFF00000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000 - 0000000000000000000000000000000000000000000084000000840000008400 - 0000840000008400000000000000000000000000000084000000840000008400 - 00008400000084000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000000000000000000000000000000000000000 - 000000000000FFFFFF000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000FFFFFF00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - F83FFC01FFF9C0070001FC01E7FFC0070001FC01C3F3C00700010001C3E7C007 - 00010001E1C7C00700010001F08FC00700010001F81FC00700010003FC3FC007 - 00010007F81FC0070001000FF09FC007010100FFC1C7C00F838301FF83E3C01F - FFFF03FF8FF1C03FFFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxfmMnPg.dcu b/internal/x.46/Lib/D11/dxfmMnPg.dcu deleted file mode 100644 index af41d781..00000000 Binary files a/internal/x.46/Lib/D11/dxfmMnPg.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxfmPNFmt.dcu b/internal/x.46/Lib/D11/dxfmPNFmt.dcu deleted file mode 100644 index ccc4d587..00000000 Binary files a/internal/x.46/Lib/D11/dxfmPNFmt.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxfmPNFmt.dfm b/internal/x.46/Lib/D11/dxfmPNFmt.dfm deleted file mode 100644 index d39b3504..00000000 --- a/internal/x.46/Lib/D11/dxfmPNFmt.dfm +++ /dev/null @@ -1,140 +0,0 @@ -object dxfmPageNumberFormat: TdxfmPageNumberFormat - Left = 434 - Top = 210 - BorderStyle = bsDialog - Caption = 'Change Page Number Format' - ClientHeight = 209 - ClientWidth = 247 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object lblPageNumberFormat: TLabel - Left = 6 - Top = 15 - Width = 78 - Height = 13 - Caption = 'Number &Format:' - FocusControl = cbxPageNumberingFormat - OnClick = lblPageNumberFormatClick - end - object bvlStartAtHolder: TBevel - Left = 113 - Top = 93 - Width = 129 - Height = 22 - Visible = False - end - object bvlPageNumbering: TBevel - Left = 111 - Top = 49 - Width = 132 - Height = 5 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object Bevel2: TBevel - Left = 6 - Top = 119 - Width = 237 - Height = 5 - Anchors = [akLeft, akTop, akRight] - Shape = bsBottomLine - end - object lblPageNumbering: TLabel - Left = 7 - Top = 45 - Width = 78 - Height = 13 - Caption = 'Page Numbering' - end - object Bevel3: TBevel - Left = 6 - Top = 166 - Width = 237 - Height = 4 - Anchors = [akLeft, akRight, akBottom] - Shape = bsBottomLine - end - object btnOK: TButton - Left = 6 - Top = 180 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 0 - end - object btnCancel: TButton - Left = 87 - Top = 180 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 1 - end - object btnHelp: TButton - Left = 168 - Top = 180 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Help' - TabOrder = 2 - end - object cbxPageNumberingFormat: TComboBox - Left = 113 - Top = 12 - Width = 130 - Height = 21 - Style = csDropDownList - Anchors = [akLeft, akTop, akRight] - ItemHeight = 13 - TabOrder = 3 - OnChange = cbxPageNumberingFormatChange - Items.Strings = ( - '1, 2, 3, 3, 4, ...' - 'a, b, c, d, e, ...' - 'A, B, C, D, E, ...' - 'i, ii, iii, iv, v, ...' - 'I, II, III, IV, V, ...') - end - object btnDefault: TButton - Left = 154 - Top = 135 - Width = 89 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Default...' - TabOrder = 4 - OnClick = btnDefaultClick - end - object rbtnContinueFromPrevSection: TRadioButton - Left = 13 - Top = 69 - Width = 228 - Height = 17 - Anchors = [akLeft, akTop, akRight] - Caption = 'Continue from Previous Section' - Checked = True - TabOrder = 5 - TabStop = True - OnClick = rbtnContinueFromPrevSectionClick - end - object rbtnStartAt: TRadioButton - Left = 13 - Top = 96 - Width = 92 - Height = 17 - Caption = 'Start &at:' - TabOrder = 6 - OnClick = rbtnStartAtClick - end -end diff --git a/internal/x.46/Lib/D11/dxfmZoom.dcu b/internal/x.46/Lib/D11/dxfmZoom.dcu deleted file mode 100644 index d23997b9..00000000 Binary files a/internal/x.46/Lib/D11/dxfmZoom.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxfmZoom.dfm b/internal/x.46/Lib/D11/dxfmZoom.dfm deleted file mode 100644 index d7ae4981..00000000 --- a/internal/x.46/Lib/D11/dxfmZoom.dfm +++ /dev/null @@ -1,544 +0,0 @@ -object fmZoom: TfmZoom - Left = 422 - Top = 239 - BorderStyle = bsDialog - Caption = 'Zoom' - ClientHeight = 280 - ClientWidth = 428 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 186 - Top = 251 - Width = 75 - Height = 23 - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object btnCancel: TButton - Left = 267 - Top = 251 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 3 - end - object gbxPreview: TGroupBox - Left = 193 - Top = 4 - Width = 230 - Height = 238 - Caption = ' Preview ' - TabOrder = 1 - object bvlFontPreviewHolder: TBevel - Left = 8 - Top = 176 - Width = 214 - Height = 54 - Visible = False - end - object bvlPreviewHolder: TBevel - Left = 24 - Top = 23 - Width = 183 - Height = 123 - Visible = False - end - object Panel1: TPanel - Left = 2 - Top = 162 - Width = 226 - Height = 2 - BevelOuter = bvLowered - TabOrder = 0 - end - object stxtFontPreview: TStaticText - Left = 9 - Top = 157 - Width = 125 - Height = 17 - Caption = ' 12 pt Times New Roman ' - TabOrder = 1 - end - end - object btnHelp: TButton - Left = 348 - Top = 251 - Width = 75 - Height = 23 - Caption = '&Help' - TabOrder = 4 - end - object gbxZoomTo: TGroupBox - Left = 5 - Top = 4 - Width = 185 - Height = 238 - Caption = ' &Zoom To ' - TabOrder = 0 - object lblPercent: TLabel - Left = 9 - Top = 205 - Width = 44 - Height = 13 - Caption = 'P&ercent: ' - OnClick = lblPercentClick - end - object bvlPercentHolder: TBevel - Left = 80 - Top = 201 - Width = 87 - Height = 21 - Visible = False - end - object rbtn500: TRadioButton - Left = 8 - Top = 21 - Width = 55 - Height = 17 - Caption = '500 %' - TabOrder = 0 - OnClick = rbtnClick - end - object rbtn200: TRadioButton - Tag = 1 - Left = 8 - Top = 41 - Width = 55 - Height = 17 - Caption = '&200 %' - TabOrder = 1 - OnClick = rbtnClick - end - object rbtn150: TRadioButton - Tag = 2 - Left = 8 - Top = 61 - Width = 55 - Height = 17 - Caption = '150 %' - TabOrder = 2 - OnClick = rbtnClick - end - object rbtn100: TRadioButton - Tag = 3 - Left = 8 - Top = 81 - Width = 55 - Height = 17 - Caption = '&100 %' - TabOrder = 3 - OnClick = rbtnClick - end - object rbtn75: TRadioButton - Tag = 4 - Left = 8 - Top = 101 - Width = 55 - Height = 17 - Caption = '&75 %' - TabOrder = 4 - OnClick = rbtnClick - end - object rbtn50: TRadioButton - Tag = 5 - Left = 8 - Top = 121 - Width = 55 - Height = 17 - Caption = '&50 %' - TabOrder = 5 - OnClick = rbtnClick - end - object rbtn10: TRadioButton - Tag = 7 - Left = 8 - Top = 161 - Width = 55 - Height = 17 - Caption = '10 %' - TabOrder = 7 - OnClick = rbtnClick - end - object rbtn25: TRadioButton - Tag = 6 - Left = 8 - Top = 141 - Width = 55 - Height = 17 - Caption = '25 %' - TabOrder = 6 - OnClick = rbtnClick - end - object rbtnTwoPages: TRadioButton - Tag = 10 - Left = 76 - Top = 61 - Width = 105 - Height = 17 - Caption = '&Two Pages' - TabOrder = 10 - OnClick = rbtnClick - end - object rbtnWholePage: TRadioButton - Tag = 9 - Left = 76 - Top = 41 - Width = 105 - Height = 17 - Caption = 'W&hole Page' - TabOrder = 9 - OnClick = rbtnClick - end - object rbtnPageWidth: TRadioButton - Tag = 8 - Left = 76 - Top = 21 - Width = 105 - Height = 17 - Caption = 'Page &Width' - TabOrder = 8 - OnClick = rbtnClick - end - object rbtnFourPages: TRadioButton - Tag = 11 - Left = 76 - Top = 81 - Width = 105 - Height = 17 - Caption = '&Four Pages' - TabOrder = 11 - OnClick = rbtnClick - end - object rbtnManyPages: TRadioButton - Tag = 12 - Left = 76 - Top = 101 - Width = 105 - Height = 17 - Caption = '&Many Pages:' - TabOrder = 12 - OnClick = rbtnClick - end - object btnManyPages: TBitBtn - Left = 122 - Top = 126 - Width = 45 - Height = 44 - TabOrder = 13 - OnClick = btnManyPagesClick - Glyph.Data = { - 1E030000424D1E03000000000000760000002800000024000000220000000100 - 040000000000A802000000000000000000001000000010000000000000000000 - 8000008000000080800080000000800080008080000080808000C0C0C0000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00888888888888 - 8888888888888888888888880000888888888888888888888888888888880888 - 0000888888888888888888888888888888800088000088888888888888888888 - 8888888888000008000088000000000000000000000000008888888800008877 - 7777777777777777777777778888888800008888888808888888888880888888 - 8888888800008888888000000000000000088888888888880000888888077777 - 7777777777708888888888880000888880F8888888888AA88877088888888888 - 000080000000000000000000000000000888888800000F777777777777777777 - 777777777088888800000F888888888888888888888888887088888800000F87 - FFFFFFFFFFFFFFFFFFFFFFF87088888800000F870888888888888888888888F8 - 7088888800000F870770F0000F00F0000F0778F87088888800000F870770FFFF - FF00FFFFFF0778F87088888800000F870770FFFFFF00FFFFFF0778F870888888 - 00000F870770000000000000000778F87088888800000F870770000000000000 - 000778F87088888800000F870770FFFFFF00FFFFFF0778F87088888800000F87 - 0770F0000F00F0000F0778F87088888800000F870770FFFFFF00FFFFFF0778F8 - 7088888800000F870770F0000F00F0000F0778F87088888800000F870770FFFF - FF00FFFFFF0778F87088888800000F870770F0000F00F0000F0778F870888888 - 00000F870770FFFFFF00FFFFFF0778F87088888800000F870770FFFFFF00FFFF - FF0778F87088888800000F870770000000000000000778F87088888800000F87 - 0000000000000000000000F87088888800000F87777777777777777777777778 - 7088888800000F888888888888888888888888887088888800000FFFFFFFFFFF - FFFFFFFFFFFFFFFF878888880000800000000000000000000000000008888888 - 0000} - Layout = blGlyphBottom - Spacing = 0 - end - end - object ilStub: TImageList - Left = 6 - Top = 248 - Bitmap = { - 494C010101000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000002000000001002000000000000020 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000084848400848484008484 - 8400848484008484840084848400848484008484840084848400848484008484 - 8400848484008484840084848400848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF00000000000000000000000000FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000C6C6C600FFFFFF00C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00C6C6 - C600000000000000000000000000C6C6C600FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00848484008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 - 000000000000FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000848484000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000200000000100010000000000000100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000100000000000000000000000000000000000000000000 - 000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxpsfmEditDesc.dcu b/internal/x.46/Lib/D11/dxpsfmEditDesc.dcu deleted file mode 100644 index e012ecf8..00000000 Binary files a/internal/x.46/Lib/D11/dxpsfmEditDesc.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxpsfmEditDesc.dfm b/internal/x.46/Lib/D11/dxpsfmEditDesc.dfm deleted file mode 100644 index 0c462540..00000000 --- a/internal/x.46/Lib/D11/dxpsfmEditDesc.dfm +++ /dev/null @@ -1,59 +0,0 @@ -object dxfmEditDescription: TdxfmEditDescription - Left = 383 - Top = 205 - BorderStyle = bsDialog - Caption = 'Edit Description' - ClientHeight = 294 - ClientWidth = 333 - Color = clBtnFace - KeyPreview = True - OldCreateOrder = True - Position = poScreenCenter - OnKeyDown = FormKeyDown - OnResize = FormResize - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object btnOK: TButton - Left = 90 - Top = 265 - Width = 75 - Height = 23 - Caption = '&OK' - Default = True - ModalResult = 1 - TabOrder = 1 - end - object btnCancel: TButton - Left = 171 - Top = 265 - Width = 75 - Height = 23 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 - end - object btnHelp: TButton - Left = 252 - Top = 265 - Width = 75 - Height = 23 - Caption = '&Help' - TabOrder = 3 - end - object gbxMemoHost: TGroupBox - Left = 5 - Top = 6 - Width = 322 - Height = 249 - TabOrder = 0 - object memDescription: TMemo - Left = 8 - Top = 18 - Width = 305 - Height = 218 - TabOrder = 0 - end - end -end diff --git a/internal/x.46/Lib/D11/dxreged.dcu b/internal/x.46/Lib/D11/dxreged.dcu deleted file mode 100644 index cd5da383..00000000 Binary files a/internal/x.46/Lib/D11/dxreged.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxreged.dfm b/internal/x.46/Lib/D11/dxreged.dfm deleted file mode 100644 index 68e7219b..00000000 --- a/internal/x.46/Lib/D11/dxreged.dfm +++ /dev/null @@ -1,415 +0,0 @@ -object frmdxLibREgPathEditor: TfrmdxLibREgPathEditor - Left = 225 - Top = 106 - Width = 395 - Height = 365 - ActiveControl = TreeView - BorderIcons = [biSystemMenu, biMaximize] - Caption = 'Developer Express Registry path property editor' - Color = clBtnFace - Icon.Data = { - 0000010001001010100000000000280100001600000028000000100000002000 - 00000100040000000000C0000000000000000000000000000000000000000000 - 000000008000008000000080800080000000800080008080000080808000C0C0 - C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 - 0073701919190000073700000000000073700091910000073708000000000073 - 708077770000073700078888000073708077780880003708077780B080007000 - 78888888800008078800888070000078004000800000078078FF8F8F00000807 - 880000007000007888888807000007888888707000007000000007000000FC00 - 0000F8000000F0010000E0030000C00700008007000000030000000300000003 - 000000030000000300000007000000070000000F0000001F0000003F0000} - OldCreateOrder = True - Position = poScreenCenter - OnCreate = FormCreate - OnDestroy = FormDestroy - PixelsPerInch = 96 - TextHeight = 13 - AutoScroll = False - object Panel: TPanel - Left = 0 - Top = 289 - Width = 387 - Height = 49 - Align = alBottom - BevelOuter = bvNone - TabOrder = 0 - object lbRegistry: TLabel - Left = 4 - Top = 6 - Width = 5 - Height = 13 - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - end - object bOk: TButton - Left = 236 - Top = 25 - Width = 72 - Height = 22 - Caption = '&OK' - Default = True - ModalResult = 1 - TabOrder = 2 - end - object bCancel: TButton - Left = 312 - Top = 25 - Width = 72 - Height = 22 - Cancel = True - Caption = '&Cancel' - ModalResult = 2 - TabOrder = 3 - end - object bNew: TButton - Left = 3 - Top = 25 - Width = 72 - Height = 22 - Caption = '&New' - TabOrder = 0 - OnClick = bNewClick - end - object bDelete: TButton - Left = 80 - Top = 25 - Width = 72 - Height = 22 - Caption = '&Delete' - TabOrder = 1 - OnClick = bDeleteClick - end - end - object TreeView: TTreeView - Left = 0 - Top = 0 - Width = 387 - Height = 289 - Align = alClient - HideSelection = False - Images = ImageList - Indent = 21 - ReadOnly = True - TabOrder = 1 - OnChange = TreeViewChange - OnCollapsed = TreeViewCollapsed - OnExpanded = TreeViewExpanded - OnGetImageIndex = TreeViewGetImageIndex - OnGetSelectedIndex = TreeViewGetSelectedIndex - end - object ImageList: TImageList - Width = 18 - Left = 114 - Top = 50 - Bitmap = { - 494C010102000500040012001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000480000002000000001002000000000000024 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000808080008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 0000000000008080800080808000808080008080800080808000808080008080 - 8000808080008080800080808000808080008080800000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080000000000000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF0080808000000000000000000000000000000000000000 - 000000000000808080000000000000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF008080800000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000000000C0C0 - C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C00000FFFF00C0C0C00080808000000000000000000000000000000000000000 - 0000808080000000000000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C00000FFFF00C0C0C00000FFFF00C0C0C0000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080000000000000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF0080808000000000000000000000000000000000000000 - 00008080800000000000C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF00C0C0C000808080000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000000000C0C0 - C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C00000FFFF00C0C0C00080808000000000000000000000000000000000008080 - 800000000000C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C00000FFFF00C0C0C00000FFFF00000000008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080000000000000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF0080808000000000000000000000000000000000008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000008080800000000000C0C0C00080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000000000C0C0 - C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C00000FFFF00C0C0C00080808000000000000000000000000000000000008080 - 8000808080008080800080808000808080008080800080808000808080008080 - 80008080800080808000808080008080800000FFFF0080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080000000000000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF0080808000000000000000000000000000000000000000 - 00008080800000000000C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0C00080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000000000000000000000000000000000000000 - 0000808080000000000000FFFF00C0C0C00000FFFF00C0C0C00000FFFF00C0C0 - C000000000000000000000000000000000000000000080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000008080800000FFFF00C0C0 - C00000FFFF00C0C0C00000FFFF00C0C0C00000FFFF0080808000808080008080 - 8000808080008080800080808000000000000000000000000000000000000000 - 00008080800000000000C0C0C00000FFFF00C0C0C00000FFFF00C0C0C0000000 - 0000808080008080800080808000808080008080800080808000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000008080800000FF - FF00C0C0C00000FFFF00C0C0C00000FFFF008080800000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000008080800000000000000000000000000000000000000000008080 - 8000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008080 - 8000808080008080800080808000808080000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000080808000808080008080800080808000808080000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000048000000200000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FFFFFFFFF000000000000000FFFFFFFF - F000000000000000C000FC0010000000000000008000F8001000000000000000 - A000FA001000000000000000A000F4001000000000000000A000F40010000000 - 00000000A000E8001000000000000000A000EFFC1000000000000000A000E000 - 1000000000000000A000F4001000000000000000BFFCF40F9000000000000000 - 8001F4103000000000000000C07FFBEFF000000000000000E0FFFC1FF0000000 - 00000000FFFFFFFFF000000000000000} - end -end diff --git a/internal/x.46/Lib/D11/dxrgkeya.dcu b/internal/x.46/Lib/D11/dxrgkeya.dcu deleted file mode 100644 index aea00733..00000000 Binary files a/internal/x.46/Lib/D11/dxrgkeya.dcu and /dev/null differ diff --git a/internal/x.46/Lib/D11/dxrgkeya.dfm b/internal/x.46/Lib/D11/dxrgkeya.dfm deleted file mode 100644 index cef92805..00000000 --- a/internal/x.46/Lib/D11/dxrgkeya.dfm +++ /dev/null @@ -1,51 +0,0 @@ -object frmdxAddNewRegKey: TfrmdxAddNewRegKey - Left = 195 - Top = 106 - BorderIcons = [biSystemMenu] - BorderStyle = bsDialog - Caption = 'Add a new registry key' - ClientHeight = 84 - ClientWidth = 279 - Color = clBtnFace - OldCreateOrder = True - Position = poScreenCenter - PixelsPerInch = 120 - TextHeight = 16 - AutoScroll = False - object lblName: TLabel - Left = 2 - Top = 15 - Width = 37 - Height = 16 - Caption = 'Name' - end - object Edit: TEdit - Left = 66 - Top = 10 - Width = 210 - Height = 24 - TabOrder = 0 - OnChange = EditChange - end - object bOk: TButton - Left = 90 - Top = 49 - Width = 88 - Height = 27 - Caption = '&OK' - Default = True - Enabled = False - ModalResult = 1 - TabOrder = 1 - end - object bCancel: TButton - Left = 187 - Top = 49 - Width = 89 - Height = 27 - Cancel = True - Caption = '&Cancel' - ModalResult = 2 - TabOrder = 2 - end -end diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC10.bpk b/internal/x.46/XP Theme Manager/Packages/dxThemeC10.bpk deleted file mode 100644 index c285c741..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC10.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.10.00 -# --------------------------------------------------------------------------- -PROJECT = dxThemeC10.bpl -OBJFILES = dxThemeC10.obj dxUxTheme.obj dxThemeManager.obj \ - dxThemeConsts.obj dxOffice11.obj -RESFILES = dxThemeC10.res dxOffice11.res -MAINSOURCE = dxThemeC10.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi -SPARELIBS = rtl.lib vcl.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express XP Theme Manager by Developer Express Inc." -aa -Tpp -Gpr -x \ - -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC10.cpp b/internal/x.46/XP Theme Manager/Packages/dxThemeC10.cpp deleted file mode 100644 index 2534b864..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC10.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxThemeC10.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxUxTheme.pas"); -USEUNIT("dxThemeManager.pas"); -USEUNIT("dxThemeConsts.pas"); -USEUNIT("dxOffice11.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC10.res b/internal/x.46/XP Theme Manager/Packages/dxThemeC10.res deleted file mode 100644 index 17ae34fe..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeC10.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC11.bpk b/internal/x.46/XP Theme Manager/Packages/dxThemeC11.bpk deleted file mode 100644 index d18422b0..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC11.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.11.00 -# --------------------------------------------------------------------------- -PROJECT = dxThemeC11.bpl -OBJFILES = dxThemeC11.obj dxUxTheme.obj dxThemeManager.obj \ - dxThemeConsts.obj dxOffice11.obj -RESFILES = dxThemeC11.res dxOffice11.res -MAINSOURCE = dxThemeC11.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi -SPARELIBS = rtl.lib vcl.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express XP Theme Manager by Developer Express Inc." -aa -Tpp -Gpr -x \ - -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC11.cpp b/internal/x.46/XP Theme Manager/Packages/dxThemeC11.cpp deleted file mode 100644 index 3ab74e95..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxThemeC11.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxUxTheme.pas"); -USEUNIT("dxThemeManager.pas"); -USEUNIT("dxThemeConsts.pas"); -USEUNIT("dxOffice11.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC11.res b/internal/x.46/XP Theme Manager/Packages/dxThemeC11.res deleted file mode 100644 index a6c4a111..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeC11.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC12.bpk b/internal/x.46/XP Theme Manager/Packages/dxThemeC12.bpk deleted file mode 100644 index f2e98f8e..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC12.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.12.00 -# --------------------------------------------------------------------------- -PROJECT = dxThemeC12.bpl -OBJFILES = dxThemeC12.obj dxUxTheme.obj dxThemeManager.obj \ - dxThemeConsts.obj dxOffice11.obj -RESFILES = dxThemeC12.res dxOffice11.res -MAINSOURCE = dxThemeC12.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi -SPARELIBS = rtl.lib vcl.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express XP Theme Manager by Developer Express Inc." -aa -Tpp -Gpr -x \ - -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC12.cpp b/internal/x.46/XP Theme Manager/Packages/dxThemeC12.cpp deleted file mode 100644 index bd6a5d83..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC12.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxThemeC12.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxUxTheme.pas"); -USEUNIT("dxThemeManager.pas"); -USEUNIT("dxThemeConsts.pas"); -USEUNIT("dxOffice11.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC12.res b/internal/x.46/XP Theme Manager/Packages/dxThemeC12.res deleted file mode 100644 index 9f28500d..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeC12.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC14.bpk b/internal/x.46/XP Theme Manager/Packages/dxThemeC14.bpk deleted file mode 100644 index fe77272b..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC14.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.14.00 -# --------------------------------------------------------------------------- -PROJECT = dxThemeC14.bpl -OBJFILES = dxThemeC14.obj dxUxTheme.obj dxThemeManager.obj \ - dxThemeConsts.obj dxOffice11.obj -RESFILES = dxThemeC14.res dxOffice11.res -MAINSOURCE = dxThemeC14.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi -SPARELIBS = rtl.lib vcl.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express XP Theme Manager by Developer Express Inc." -aa -Tpp -Gpr -x \ - -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC14.cpp b/internal/x.46/XP Theme Manager/Packages/dxThemeC14.cpp deleted file mode 100644 index f95230e5..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC14.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxThemeC14.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxUxTheme.pas"); -USEUNIT("dxThemeManager.pas"); -USEUNIT("dxThemeConsts.pas"); -USEUNIT("dxOffice11.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC14.res b/internal/x.46/XP Theme Manager/Packages/dxThemeC14.res deleted file mode 100644 index 9b902fbc..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeC14.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC5.bpk b/internal/x.46/XP Theme Manager/Packages/dxThemeC5.bpk deleted file mode 100644 index 16014ff1..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC5.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = dxThemeC5.bpl -OBJFILES = dxThemeC5.obj dxUxTheme.obj dxThemeManager.obj \ - dxThemeConsts.obj dxOffice11.obj -RESFILES = dxThemeC5.res dxOffice11.res -MAINSOURCE = dxThemeC5.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = vcl50.bpi -SPARELIBS = vcl50.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express XP Theme Manager by Developer Express Inc." -aa -Tpp -Gpr -x \ - -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC5.cpp b/internal/x.46/XP Theme Manager/Packages/dxThemeC5.cpp deleted file mode 100644 index 92ac93b9..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC5.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxThemeC5.res"); -USEPACKAGE("vcl50.bpi"); -USEUNIT("dxUxTheme.pas"); -USEUNIT("dxThemeManager.pas"); -USEUNIT("dxThemeConsts.pas"); -USEUNIT("dxOffice11.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC5.res b/internal/x.46/XP Theme Manager/Packages/dxThemeC5.res deleted file mode 100644 index 1b3fb051..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeC5.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC6.bpk b/internal/x.46/XP Theme Manager/Packages/dxThemeC6.bpk deleted file mode 100644 index db797288..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC6.bpk +++ /dev/null @@ -1,195 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.06.00 -# --------------------------------------------------------------------------- -PROJECT = dxThemeC6.bpl -OBJFILES = dxThemeC6.obj dxUxTheme.obj dxThemeManager.obj \ - dxThemeConsts.obj dxOffice11.obj -RESFILES = dxThemeC6.res dxOffice11.res -MAINSOURCE = dxThemeC6.cpp -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = rtl.bpi vcl.bpi -SPARELIBS = rtl.lib vcl.lib -DEFFILE = -OTHERFILES = -# --------------------------------------------------------------------------- -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = -SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES -INCLUDEPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\include;$(BCB)\include\vcl -LIBPATH = "$(SEARCHPATH)";$(LIBDIR);$(BCB)\lib\obj;$(BCB)\lib -WARNINGS= -w-par -PATHCPP = .; -PATHASM = .; -PATHPAS = .;"$(SEARCHPATH)";$(LIBDIR) -PATHRC = .; -PATHOBJ = .;$(LIBPATH) -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- \ - -k- -vi -c -tWM -IDLCFLAGS = -I"$(SEARCHPATH)";$(LIBDIR) -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa -PFLAGS = -$Y- -$L- -$D- -$A8 -v -JPHNE -M -RFLAGS = -AFLAGS = /mx /w2 /zn -LFLAGS = -D"Express XP Theme Manager by Developer Express Inc." -aa -Tpp -Gpr -x \ - -Gn -Gl -Gi -# --------------------------------------------------------------------------- -ALLOBJ = c0pkg32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif - -!if $d(PATHOBJ) -.PATH.OBJ = $(PATHOBJ) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(OTHERFILES) $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< - - - -# --------------------------------------------------------------------------- - - - - diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC6.cpp b/internal/x.46/XP Theme Manager/Packages/dxThemeC6.cpp deleted file mode 100644 index dff430c3..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeC6.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -#pragma hdrstop -USERES("dxThemeC6.res"); -USEPACKAGE("vcl.bpi"); -USEPACKAGE("rtl.bpi"); -USEUNIT("dxUxTheme.pas"); -USEUNIT("dxThemeManager.pas"); -USEUNIT("dxThemeConsts.pas"); -USEUNIT("dxOffice11.pas"); -//--------------------------------------------------------------------------- -#pragma package(smart_init) -//--------------------------------------------------------------------------- - -// Package source. -//--------------------------------------------------------------------------- - -#pragma argsused -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeC6.res b/internal/x.46/XP Theme Manager/Packages/dxThemeC6.res deleted file mode 100644 index 28cdfe2f..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeC6.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD10.dpk b/internal/x.46/XP Theme Manager/Packages/dxThemeD10.dpk deleted file mode 100644 index 3f3da858..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeD10.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxThemeD10; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express XP Theme Manager by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxThemeConsts, - dxThemeManager, - dxOffice11, - dxUxTheme; - -end. diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD10.res b/internal/x.46/XP Theme Manager/Packages/dxThemeD10.res deleted file mode 100644 index e58259b7..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeD10.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD10NET.dpk b/internal/x.46/XP Theme Manager/Packages/dxThemeD10NET.dpk deleted file mode 100644 index f2e4b66f..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeD10NET.dpk +++ /dev/null @@ -1,97 +0,0 @@ -package dxThemeD10NET; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express XP Theme Manager by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - System.Drawing, - Borland.Vcl; - -contains - dxUxTheme, - dxOffice11, - dxThemeConsts, - dxThemeManager; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD10NET.res b/internal/x.46/XP Theme Manager/Packages/dxThemeD10NET.res deleted file mode 100644 index cc30cdb5..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeD10NET.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD11.dpk b/internal/x.46/XP Theme Manager/Packages/dxThemeD11.dpk deleted file mode 100644 index 6a2ef729..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeD11.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxThemeD11; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express XP Theme Manager by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxThemeConsts, - dxThemeManager, - dxOffice11, - dxUxTheme; - -end. diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD11.res b/internal/x.46/XP Theme Manager/Packages/dxThemeD11.res deleted file mode 100644 index 13dab5a5..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeD11.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD12.dpk b/internal/x.46/XP Theme Manager/Packages/dxThemeD12.dpk deleted file mode 100644 index 00631f39..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeD12.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxThemeD12; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express XP Theme Manager by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxThemeConsts, - dxThemeManager, - dxOffice11, - dxUxTheme; - -end. diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD12.res b/internal/x.46/XP Theme Manager/Packages/dxThemeD12.res deleted file mode 100644 index dd19a1e4..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeD12.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD14.dpk b/internal/x.46/XP Theme Manager/Packages/dxThemeD14.dpk deleted file mode 100644 index 31add008..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeD14.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxThemeD14; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express XP Theme Manager by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxThemeConsts, - dxThemeManager, - dxOffice11, - dxUxTheme; - -end. diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD14.res b/internal/x.46/XP Theme Manager/Packages/dxThemeD14.res deleted file mode 100644 index 40feaa5a..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeD14.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD5.dpk b/internal/x.46/XP Theme Manager/Packages/dxThemeD5.dpk deleted file mode 100644 index 659432c3..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeD5.dpk +++ /dev/null @@ -1,37 +0,0 @@ -package dxThemeD5; - -{$R *.res} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express XP Theme Manager by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - vcl50; - -contains - dxThemeConsts, - dxThemeManager, - dxOffice11, - dxUxTheme; - -end. diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD5.res b/internal/x.46/XP Theme Manager/Packages/dxThemeD5.res deleted file mode 100644 index 34b18bd5..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeD5.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD6.dpk b/internal/x.46/XP Theme Manager/Packages/dxThemeD6.dpk deleted file mode 100644 index 5eb95209..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeD6.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxThemeD6; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express XP Theme Manager by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxThemeConsts, - dxThemeManager, - dxOffice11, - dxUxTheme; - -end. diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD6.res b/internal/x.46/XP Theme Manager/Packages/dxThemeD6.res deleted file mode 100644 index 0498cd69..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeD6.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD7.dpk b/internal/x.46/XP Theme Manager/Packages/dxThemeD7.dpk deleted file mode 100644 index 8fb83311..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeD7.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxThemeD7; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express XP Theme Manager by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxThemeConsts, - dxThemeManager, - dxOffice11, - dxUxTheme; - -end. diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD7.res b/internal/x.46/XP Theme Manager/Packages/dxThemeD7.res deleted file mode 100644 index 25078e9c..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeD7.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD8.dpk b/internal/x.46/XP Theme Manager/Packages/dxThemeD8.dpk deleted file mode 100644 index f03b2376..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeD8.dpk +++ /dev/null @@ -1,97 +0,0 @@ -package dxThemeD8; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express XP Theme Manager by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - System.Drawing, - Borland.Vcl; - -contains - dxUxTheme, - dxOffice11, - dxThemeConsts, - dxThemeManager; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD8.res b/internal/x.46/XP Theme Manager/Packages/dxThemeD8.res deleted file mode 100644 index 0b676062..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeD8.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD9.dpk b/internal/x.46/XP Theme Manager/Packages/dxThemeD9.dpk deleted file mode 100644 index 5ba871f4..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeD9.dpk +++ /dev/null @@ -1,39 +0,0 @@ -package dxThemeD9; - -{$R *.RES} -{$ALIGN ON} -{$ASSERTIONS OFF} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS OFF} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO OFF} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST ON} -{$MINENUMSIZE 1} -{$IMAGEBASE $00400000} -{$DESCRIPTION 'Express XP Theme Manager by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - dxThemeConsts, - dxThemeManager, - dxOffice11, - dxUxTheme; - -end. diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD9.res b/internal/x.46/XP Theme Manager/Packages/dxThemeD9.res deleted file mode 100644 index a600e6f7..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeD9.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD9NET.dpk b/internal/x.46/XP Theme Manager/Packages/dxThemeD9NET.dpk deleted file mode 100644 index 4d5f046b..00000000 --- a/internal/x.46/XP Theme Manager/Packages/dxThemeD9NET.dpk +++ /dev/null @@ -1,97 +0,0 @@ -package dxThemeD9NET; - - -{$ALIGN 0} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DESCRIPTION 'Express XP Theme Manager by Developer Express Inc.'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - Borland.Delphi, - System.Drawing, - Borland.Vcl; - -contains - dxUxTheme, - dxOffice11, - dxThemeConsts, - dxThemeManager; - -[assembly: AssemblyDescription('')] -[assembly: AssemblyConfiguration('')] -[assembly: AssemblyCompany('')] -[assembly: AssemblyProduct('')] -[assembly: AssemblyCopyright('')] -[assembly: AssemblyTrademark('')] -[assembly: AssemblyCulture('')] - - -// The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. -// You can set this in the IDE via the Project Options. -// Manually setting the AssemblyTitle attribute below will override the IDE -// setting. -// [assembly: AssemblyTitle('')] - - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion('1.0.*')] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output -// directory is the project directory (the default). -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile('')] -[assembly: AssemblyKeyName('')] -end. diff --git a/internal/x.46/XP Theme Manager/Packages/dxThemeD9NET.res b/internal/x.46/XP Theme Manager/Packages/dxThemeD9NET.res deleted file mode 100644 index 0c12099b..00000000 Binary files a/internal/x.46/XP Theme Manager/Packages/dxThemeD9NET.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Sources/cxVer.inc b/internal/x.46/XP Theme Manager/Sources/cxVer.inc deleted file mode 100644 index 063e922a..00000000 --- a/internal/x.46/XP Theme Manager/Sources/cxVer.inc +++ /dev/null @@ -1,218 +0,0 @@ -{$B-} { Complete Boolean Evaluation } -{$R-} { Range-Checking } -{$T-} { Typed @ operator } -{$X+} { Extended syntax } -{$P+} { Open string params } -{$J+} { Writeable structured consts } -{$H+} { Use long strings by default } -{$Q-} { Overflow checking } - -{$DEFINE DXVER500} - -{$IFNDEF CLR} - {$IFNDEF DONTUSEJPEGIMAGE} - {$DEFINE USEJPEGIMAGE} - {$ENDIF} -{$ENDIF} - -{$DEFINE EXPRESSBARS5} - -{$DEFINE VCL} - -{$IFNDEF VER80} - {$IFNDEF VER90} - {$IFNDEF VER93} - {$DEFINE DELPHI3} { Borland Delphi 3.0 } - {$ENDIF} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER110} { Borland C++Builder 3.0 } - {$DEFINE CBUILDER3} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER120} { Borland Delphi 4.0 } - {$DEFINE DELPHI4} -{$ENDIF} - -{$IFDEF VER125} { Borland C++Builder 4.0 } - {$DEFINE CBUILDER3} - {$DEFINE DELPHI4} - {$DEFINE CBUILDER4} - {$ObjExportAll On} -{$ENDIF} - -{$IFDEF VER130} { Borland Delphi 5.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$IFDEF BCB} { Borland C++Builder 5.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER140} { Borland Delphi 6.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$IFDEF BCB} { Borland C++Builder 6.0 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER150} { Borland Delphi 7.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} -{$ENDIF} - -{$IFNDEF DELPHI6} - {$DEFINE MSWINDOWS} -{$ENDIF} -{$IFDEF LINUX} - {$UNDEF MSWINDOWS} -{$ENDIF} - -{$IFDEF LINUX} - {$DEFINE KYLIX1} { Borland Kylix 1 } - {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14} - {$DEFINE KYLIX2} { Borland Kylix 2 } - {$IFEND} - {$IF CompilerVersion >= 14.50} - {$DEFINE KYLIX3} { Borland Kylix 3 } - {$IFEND} - {$ENDIF} -{$ENDIF} - -{$IFDEF CLR} { Borland Delphi.Net } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} -{$ENDIF} - -{$IFDEF VER170} { Borland Delphi 9.0 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} -{$ENDIF} - -{$IFDEF VER180} { Borland Delphi 10 } - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$IFDEF BCB} { Borland C++Builder 10 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER185} { Borland Delphi 11 //CodeGear} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$IFDEF BCB} { Borland C++Builder 11 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER200} { Borland Delphi 12 //CodeGear/Tiburon} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$IFDEF BCB} { Borland C++Builder 12 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - -{$IFDEF VER210} { Borland Delphi 14 //CodeGear/Weaver} - {$DEFINE DELPHI4} - {$DEFINE DELPHI5} - {$DEFINE DELPHI6} - {$DEFINE DELPHI7} - {$DEFINE DELPHI8} - {$DEFINE DELPHI9} - {$DEFINE DELPHI10} - {$DEFINE DELPHI11} - {$DEFINE DELPHI12} - {$DEFINE DELPHI14} - {$IFDEF BCB} { Borland C++Builder 14 } - {$DEFINE CBUILDER3} - {$DEFINE CBUILDER4} - {$DEFINE CBUILDER5} - {$DEFINE CBUILDER6} - {$DEFINE CBUILDER10} - {$DEFINE CBUILDER11} - {$DEFINE CBUILDER12} - {$DEFINE CBUILDER14} - {$ObjExportAll On} - {$ENDIF} -{$ENDIF} - - -{$IFNDEF CLR} - {$IFNDEF BCB} - {$IFDEF DELPHI6} - {$DEFINE REGISTERSHELLCTRLS} - {$ENDIF} - {$ENDIF} - {$IFDEF DELPHI7} - {$WARN UNSAFE_CAST OFF} - {$WARN UNSAFE_CODE OFF} - {$WARN UNSAFE_TYPE OFF} - {$ENDIF} -{$ENDIF} - -{$IFDEF REGISTERSHELLCTRLS} - {$DEFINE REGISTERCXSHELLCTRLS} -{$ENDIF} - -{$IFDEF DELPHI6} - {$WARN SYMBOL_PLATFORM OFF} - {$WARN UNIT_PLATFORM OFF} -{$ENDIF} diff --git a/internal/x.46/XP Theme Manager/Sources/dxOffice11.pas b/internal/x.46/XP Theme Manager/Sources/dxOffice11.pas deleted file mode 100644 index e941367a..00000000 --- a/internal/x.46/XP Theme Manager/Sources/dxOffice11.pas +++ /dev/null @@ -1,1126 +0,0 @@ - -{*******************************************************************} -{ } -{ Developer Express Visual Component Library } -{ Office 11 routines } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSTHEME AND ALL ACCOMPANYING } -{ VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{*******************************************************************} - -unit dxOffice11; - -{$I cxVer.inc} - -interface - -uses - SysUtils, TypInfo, Windows, Messages, Graphics, Controls, Forms, Classes; - -type - TOffice11Scheme = (schUnknown, schNormalColor, schHomestead, schMetallic); - TOffice11SchemeColor = schNormalColor .. schMetallic; - -var - { Colors } - - // dock - dxOffice11DockColor1: COLORREF; - dxOffice11DockColor2: COLORREF; - // bar: background - dxOffice11ToolbarsColor1: COLORREF; - dxOffice11ToolbarsColor2: COLORREF; - // bar: marks - dxOffice11BarMarkColors1: array[1..3] of COLORREF; // Normal, Selected, Pressed - dxOffice11BarMarkColors2: array[1..3] of COLORREF; // Normal, Selected, Pressed - dxOffice11BarBorderColors: array[1..2] of COLORREF; // fixed colors - dxOffice11BarBorderMarkColors: array[1..2, 1..3] of COLORREF; - // bar: fingers, separators, mark arrows - dxOffice11BarFingerColor1: COLORREF; - dxOffice11BarFingerColor2: COLORREF; - dxOffice11BarSeparatorColor1: COLORREF; - dxOffice11BarSeparatorColor2: COLORREF; - dxOffice11BarMarkArrowColor1: COLORREF; - dxOffice11BarMarkArrowColor2: COLORREF; - // bar: floating toolbar - dxOffice11BarFloatingBorderColor1: COLORREF; - dxOffice11BarFloatingBorderColor2: COLORREF; - dxOffice11BarFloatingBorderColor3: COLORREF; - dxOffice11BarFloatingCaptionColor: COLORREF; - dxOffice11BarFloatingCaptionTextColor1: COLORREF; - dxOffice11BarFloatingCaptionTextColor2: COLORREF; - dxOffice11BarFloatingCaptionTextColor3: COLORREF; - // drop downs - dxOffice11MenuColor: COLORREF; - dxOffice11MenuDownedColor1: COLORREF; - dxOffice11MenuDownedColor2: COLORREF; - dxOffice11MenuIndentColor1: COLORREF; - dxOffice11MenuIndentColor2: COLORREF; - dxOffice11MenuNonRecentIndentColor1: COLORREF; - dxOffice11MenuNonRecentIndentColor2: COLORREF; - dxOffice11DropDownBorderColor1: COLORREF; - dxOffice11DropDownBorderColor2: COLORREF; - // selected, pressed, downed - dxOffice11ToolbarSelectedColor: COLORREF; - dxOffice11SelectedBorderColor: COLORREF; - dxOffice11SelectedColor1: COLORREF; - dxOffice11SelectedColor2: COLORREF; - dxOffice11SelectedDownColor1: COLORREF; - dxOffice11SelectedDownColor2: COLORREF; - dxOffice11OwnerControlDownedColor: COLORREF; - dxOffice11DownedColor: COLORREF; - dxOffice11DownedSelectedColor: COLORREF; - // detachable - dxOffice11DetachableColor: COLORREF; - dxOffice11DetachableSelectedColor: COLORREF; - // text - dxOffice11TextEnabledColor: COLORREF; - dxOffice11TextDisabledColor: COLORREF; - // static - dxOffice11StaticBorderColor: COLORREF; - // date - dxOffice11DateHeaderColor: COLORREF; - // inplace sub item - dxOffice11InPlaceSubItemColor: COLORREF; - dxOffice11InPlaceSubItemTextColor: COLORREF; - // LF painters - // control border color - dxOffice11ControlBorderColor: COLORREF; - dxOffice11GroupColor: COLORREF; - // Outlook colors - dxOffice11DayNavigatorSelectedColor: COLORREF; - dxOffice11OutlookBorderColor: COLORREF; - dxOffice11OutlookControlColor: COLORREF; - // Office11 group row style colors - dxOffice11GroupIndentColor: COLORREF; - dxOffice11GroupRowTextColor: COLORREF; - dxOffice11GroupRowSeparatorColor: COLORREF; - // NavPane colors - dxOffice11NavPaneBorder: COLORREF; - dxOffice11NavPaneGroupCaptionColor1: COLORREF; - dxOffice11NavPaneGroupCaptionColor2: COLORREF; - dxOffice11NavPaneGroupCaptionHotColor1: COLORREF; - dxOffice11NavPaneGroupCaptionHotColor2: COLORREF; - dxOffice11NavPaneGroupCaptionPressedColor1: COLORREF; - dxOffice11NavPaneGroupCaptionPressedColor2: COLORREF; - dxOffice11NavPaneGroupCaptionPressedHotColor1: COLORREF; - dxOffice11NavPaneGroupCaptionPressedHotColor2: COLORREF; - dxOffice11NavPaneHeaderColor1: COLORREF; - dxOffice11NavPaneHeaderColor2: COLORREF; - dxOffice11NavPaneHeaderFontColor: COLORREF; - dxOffice11NavPaneSplitterColor1: COLORREF; - dxOffice11NavPaneSplitterColor2: COLORREF; - // Expand button colors - dxOffice11ExpandButtonColor1: COLORREF; - dxOffice11ExpandButtonColor2: COLORREF; - - { Brushes } - - dxOffice11BarFingerBrush1: HBRUSH; - dxOffice11BarFingerBrush2: HBRUSH; - dxOffice11BarSeparatorBrush1: HBRUSH; - dxOffice11BarSeparatorBrush2: HBRUSH; - dxOffice11MenuBrush: HBRUSH; - dxOffice11SelectedBorderBrush: HBRUSH; - dxOffice11ToolbarSelectedBrush: HBRUSH; - dxOffice11OwnerControlDownedBrush: HBRUSH; - dxOffice11DownedBrush: HBRUSH; - dxOffice11DownedSelectedBrush: HBRUSH; - - dxOffice11DropDownBorderBrush1: HBRUSH; - dxOffice11DropDownBorderBrush2: HBRUSH; - dxOffice11DetachableBrush: HBRUSH; - dxOffice11DetachableSelectedBrush: HBRUSH; - - dxOffice11StaticBorderBrush: HBRUSH; - dxOffice11InPlaceSubItemBrush: HBRUSH; - - { Bitmaps } - - dxOffice11SubMenuExpandBitmap: TBitmap; - dxOffice11ExpandButtonBitmap1: TBitmap; - dxOffice11ExpandButtonBitmap2: TBitmap; - -function GetOffice11Scheme: TOffice11Scheme; - -function Dark(Col: TColor; Percentage: Byte): TColor; -function GetLightColor(ABtnFaceColorPart, AHighlightColorPart, AWindowColorPart: Integer): COLORREF; -function GetMiddleRGB(AColor1, AColor2: TColor; APercent: Integer): COLORREF; -function GetRealColor(AColor: COLORREF): COLORREF; -function Light(Col: TColor; Percentage: Byte): TColor; - -procedure CreateOffice11Colors; -procedure RefreshOffice11Colors; -procedure ReleaseOffice11Colors; - -function IsHighContrastBlack: Boolean; -function IsHighContrastWhite: Boolean; -function IsHighContrast2: Boolean; -function IsXPStandardScheme: Boolean; -procedure FillGradientRect(DC: HDC; const ARect: TRect; AColor1, AColor2: TColor; - AHorizontal: Boolean); -procedure FillTubeGradientRect(DC: HDC; const ARect: TRect; AColor1, AColor2: TColor; - AHorizontal: Boolean); -procedure FillRectByColor(DC: HDC; const R: TRect; AColor: TColor); -procedure FrameRectByColor(DC: HDC; const R: TRect; AColor: TColor); -function GetGradientColorRect(const ARect: TRect; X: Integer; AColor1, AColor2: TColor; - AHorizontal: Boolean): TColorRef; -procedure Office11FrameSelectedRect(DC: HDC; const R: TRect); -procedure Office11DrawFingerElements(DC: HDC; ARect: TRect; AHorizontal: Boolean; - ABrush1: HBRUSH = 0; ABrush2: HBRUSH = 0); -procedure Office11DrawItemArrow(DC: HDC; R: TRect; ADownArrow: Boolean; - Enabled, Selected, Flat: Boolean); -procedure Office11DrawLargeItemArrow(DC: HDC; R: TRect; ADownArrow: Boolean; - Size: Integer; Selected, Enabled, Flat: Boolean); -procedure Office11DrawSizeGrip(DC: HDC; ARect: TRect; - AColor1: TColor = clDefault; AColor2: TColor = clDefault); - -implementation - -{$R dxOffice11.res} - -uses - dxThemeManager, dxUxTheme, dxThemeConsts; - -type - TTriVertex = packed record - X: Integer; - Y: Integer; - Red: WORD; - Green: WORD; - Blue: WORD; - Alpha: WORD; - end; - -var - FCounter: Integer; - FOffice11Scheme: TOffice11Scheme; - FXPStandardScheme: Boolean; - GradientPercent: Integer; - - FMsimg32Library: HMODULE; - GradientFill: function (ADC: THandle; - const AVertex: TTriVertex; ANumVertex: Integer; - const AMesh: TGradientRect; ANumMesh: Integer; AMode: DWORD): Boolean; stdcall; - -function GetOffice11Scheme: TOffice11Scheme; -begin - Result := FOffice11Scheme; -end; - -function Dark(Col: TColor; Percentage: Byte): TColor; -var - R, G, B: Byte; -begin - Col := ColorToRGB(Col); - R := GetRValue(Col); G := GetGValue(Col); B := GetBValue(Col); - R := Trunc(R * Percentage / 100); - G := Trunc(G * Percentage / 100); - B := Trunc(B * Percentage / 100); - Result := RGB(R, G, B); -end; - -function GetLightColor(ABtnFaceColorPart, AHighlightColorPart, AWindowColorPart: Integer): COLORREF; -var - ABtnFaceColor, AHighlightColor, AWindowColor: COLORREF; - - function GetLightIndex(ABtnFaceValue, AHighlightValue, AWindowValue: Byte): Integer; - begin - Result := - MulDiv(ABtnFaceValue, ABtnFaceColorPart, 100) + - MulDiv(AHighlightValue, AHighlightColorPart, 100) + - MulDiv(AWindowValue, AWindowColorPart, 100); - if Result < 0 then Result := 0; - if Result > 255 then Result := 255; - end; - -begin - ABtnFaceColor := GetSysColor(COLOR_BTNFACE); - AHighlightColor := GetSysColor(COLOR_HIGHLIGHT); - AWindowColor := GetSysColor(COLOR_WINDOW); - if (ABtnFaceColor = 0) or (ABtnFaceColor = $FFFFFF) then - Result := AHighlightColor - else - Result := RGB( - GetLightIndex(GetRValue(ABtnFaceColor), GetRValue(AHighlightColor), GetRValue(AWindowColor)), - GetLightIndex(GetGValue(ABtnFaceColor), GetGValue(AHighlightColor), GetGValue(AWindowColor)), - GetLightIndex(GetBValue(ABtnFaceColor), GetBValue(AHighlightColor), GetBValue(AWindowColor))); -end; - -function GetMiddleRGB(AColor1, AColor2: TColor; APercent: Integer): COLORREF; - - function CalcValue(Value1, Value2: Byte): Byte; - var - I: Integer; - begin - I := MulDiv(Value1, APercent, 100) + MulDiv(Value2, 100 - APercent, 100); - if I > 255 then I := 255; - Result := I; - end; - -begin - AColor1 := ColorToRGB(AColor1); - AColor2 := ColorToRGB(AColor2); - Result := RGB( - CalcValue(GetRValue(AColor1), GetRValue(AColor2)), - CalcValue(GetGValue(AColor1), GetGValue(AColor2)), - CalcValue(GetBValue(AColor1), GetBValue(AColor2))); - Result := GetRealColor(Result); -end; - -function GetRealColor(AColor: COLORREF): COLORREF; -var - DC: HDC; -begin - DC := GetDC(0); - Result := GetNearestColor(DC, AColor); - ReleaseDC(0, DC); -end; - -function Light(Col: TColor; Percentage: Byte): TColor; -var - R, G, B: Byte; -begin - Col := ColorToRGB(Col); - R := GetRValue(Col); G := GetGValue(Col); B := GetBValue(Col); - R := Trunc(255 - Percentage / 100 * (255 - R)); - G := Trunc(255 - Percentage / 100 * (255 - G)); - B := Trunc(255 - Percentage / 100 * (255 - B)); - Result := RGB(R, G, B); -end; - -procedure PrepareSubMenuExpandBitmap(ABitmap: TBitmap); -var - I, J: Integer; - ATransparentColor, AColor1, AColor2, APixelColor: COLORREF; - AMinValue, AMaxValue, AValue: Byte; -begin - ATransparentColor := ABitmap.Canvas.Pixels[0, 0]; -// AColor := ColorToRGB(clWindow); - AColor1 := dxOffice11ToolbarsColor1; - AColor2 := dxOffice11ToolbarsColor2; - if AColor1 = AColor2 then - begin - if AColor1 = 0 then - AColor2 := $FFFFFF - else - AColor2 := 0; - end; - AMaxValue := 1; - AMinValue := 255; - for I := 0 to ABitmap.Width - 1 do - for J := 0 to ABitmap.Height - 1 do - begin - APixelColor := ABitmap.Canvas.Pixels[I, J]; - if (APixelColor <> ATransparentColor) and (APixelColor <> 0{mark}) then - begin - AValue := GetRValue(APixelColor); - if AValue > AMaxValue then - AMaxValue := AValue; - if AValue < AMinValue then - AMinValue := AValue; - end; - end; - for I := 0 to ABitmap.Width - 1 do - for J := 0 to ABitmap.Height - 1 do - begin - APixelColor := ABitmap.Canvas.Pixels[I, J]; - if (APixelColor <> ATransparentColor) and (APixelColor <> 0{mark}) then - begin -// APixelColor := GetMiddleRGB(APixelColor, AColor, 50); - AValue := GetRValue(APixelColor); - APixelColor := GetMiddleRGB(AColor1, AColor2, MulDiv(AValue - AMinValue, 100, AMaxValue - AMinValue)); - ABitmap.Canvas.Pixels[I, J] := APixelColor; - end; - end; -end; - -procedure CreateOffice11Brushes; -begin - dxOffice11BarFingerBrush1 := CreateSolidBrush(dxOffice11BarFingerColor1); - dxOffice11BarFingerBrush2 := CreateSolidBrush(dxOffice11BarFingerColor2); - dxOffice11BarSeparatorBrush1 := CreateSolidBrush(dxOffice11BarSeparatorColor1); - dxOffice11BarSeparatorBrush2 := CreateSolidBrush(dxOffice11BarSeparatorColor2); - dxOffice11DropDownBorderBrush1 := CreateSolidBrush(dxOffice11DropDownBorderColor1); - dxOffice11MenuBrush := CreateSolidBrush(dxOffice11MenuColor); - dxOffice11DropDownBorderBrush2 := dxOffice11MenuBrush; - dxOffice11SelectedBorderBrush := CreateSolidBrush(dxOffice11SelectedBorderColor); - dxOffice11OwnerControlDownedBrush := CreateSolidBrush(dxOffice11OwnerControlDownedColor); - dxOffice11DownedBrush := CreateSolidBrush(dxOffice11DownedColor); - dxOffice11DownedSelectedBrush := CreateSolidBrush(dxOffice11DownedSelectedColor); - dxOffice11DetachableBrush := CreateSolidBrush(dxOffice11DetachableColor); - dxOffice11ToolbarSelectedBrush := CreateSolidBrush(dxOffice11ToolbarSelectedColor); - dxOffice11DetachableSelectedBrush := dxOffice11ToolbarSelectedBrush; - dxOffice11StaticBorderBrush := dxOffice11DropDownBorderBrush1; - dxOffice11InPlaceSubItemBrush := CreateSolidBrush(dxOffice11InPlaceSubItemColor); - // TODO - dxOffice11SubMenuExpandBitmap := TBitmap.Create; - dxOffice11SubMenuExpandBitmap.Handle := LoadBitmap(HInstance, 'DXSUBMENUEXPAND'); - PrepareSubMenuExpandBitmap(dxOffice11SubMenuExpandBitmap); - dxOffice11ExpandButtonBitmap1 := TBitmap.Create; - dxOffice11ExpandButtonBitmap1.Handle := LoadBitmap(HInstance, 'DXEXPANDBUTTON_MINUS'); - dxOffice11ExpandButtonBitmap2 := TBitmap.Create; - dxOffice11ExpandButtonBitmap2.Handle := LoadBitmap(HInstance, 'DXEXPANDBUTTON_PLUS'); - dxOffice11ExpandButtonColor1 := RGB(158, 174, 191); - dxOffice11ExpandButtonColor2 := RGB(46, 70, 95); -end; - -procedure DestroyOffice11Brushes; -begin - dxOffice11SubMenuExpandBitmap.Free; - dxOffice11SubMenuExpandBitmap := nil; - dxOffice11ExpandButtonBitmap2.Free; - dxOffice11ExpandButtonBitmap2 := nil; - dxOffice11ExpandButtonBitmap1.Free; - dxOffice11ExpandButtonBitmap1 := nil; - if dxOffice11BarFingerBrush1 <> 0 then DeleteObject(dxOffice11BarFingerBrush1); - if dxOffice11BarFingerBrush2 <> 0 then DeleteObject(dxOffice11BarFingerBrush2); - if dxOffice11BarSeparatorBrush1 <> 0 then DeleteObject(dxOffice11BarSeparatorBrush1); - if dxOffice11BarSeparatorBrush2 <> 0 then DeleteObject(dxOffice11BarSeparatorBrush2); - if dxOffice11DropDownBorderBrush1 <> 0 then DeleteObject(dxOffice11DropDownBorderBrush1); - if dxOffice11MenuBrush <> 0 then DeleteObject(dxOffice11MenuBrush); - if dxOffice11SelectedBorderBrush <> 0 then DeleteObject(dxOffice11SelectedBorderBrush); - if dxOffice11OwnerControlDownedBrush <> 0 then DeleteObject(dxOffice11OwnerControlDownedBrush); - if dxOffice11DownedBrush <> 0 then DeleteObject(dxOffice11DownedBrush); - if dxOffice11DownedSelectedBrush <> 0 then DeleteObject(dxOffice11DownedSelectedBrush); - if dxOffice11DetachableBrush <> 0 then DeleteObject(dxOffice11DetachableBrush); - if dxOffice11ToolbarSelectedBrush <> 0 then DeleteObject(dxOffice11ToolbarSelectedBrush); - if dxOffice11InPlaceSubItemBrush <> 0 then DeleteObject(dxOffice11InPlaceSubItemBrush); -end; - -function dxGetOffice11Scheme: TOffice11Scheme; -const - SZ_MAX_CHARS = 1024; - SStandardThemeFileName = 'LUNA.MSSTYLES'; - SNormalColor = 'NORMALCOLOR'; - SHomestead = 'HOMESTEAD'; - SMetallic = 'METALLIC'; -var - PThemeFileName, PThemeColor, PThemeSize: PWideChar; - S: string; -begin - Result := schUnknown; - if AreVisualStylesAvailable([]) then - begin - PThemeFileName := AllocMem(2 * SZ_MAX_CHARS); - PThemeColor := AllocMem(2 * SZ_MAX_CHARS); - PThemeSize := AllocMem(2 * SZ_MAX_CHARS); - try - if FAILED(GetCurrentThemeName(PThemeFileName, SZ_MAX_CHARS, PThemeColor, - SZ_MAX_CHARS, PThemeSize, SZ_MAX_CHARS)) then - Exit; - S := UpperCase(ExtractFileName(PThemeFileName)); - // WindowsXP or above - if (S = SStandardThemeFileName) or (Win32MajorVersion > 5) then - begin - S := UpperCase(PThemeColor); - if S = SNormalColor then - Result := schNormalColor - else - if S = SHomestead then - Result := schHomestead - else - if S = SMetallic then - Result := schMetallic; - end; - finally - FreeMem(PThemeSize); - FreeMem(PThemeColor); - FreeMem(PThemeFileName); - end; - end; -end; - -function GetdxOffice11NavPaneGroupCaptionColor(AStartColor: Boolean): TColor; - - function TransformColorComponent(AValue: Byte): Byte; - begin - if AStartColor then - Result := AValue * 127 div 255 + 128 - else - Result := AValue + (4 - AValue * 4 div 255); - end; - -begin - Result := ColorToRGB(clBtnFace); - Result := RGB(TransformColorComponent(GetRValue(Result)), - TransformColorComponent(GetGValue(Result)), TransformColorComponent(GetBValue(Result))); - Result := GetRealColor(Result); -end; - -procedure InitOffice11Colors; -const - Office11Colors: array[TOffice11SchemeColor, 0..48] of COLORREF = ( - ($FEECDD, $E2A981, $F5BE9E, $F9DAC3, $913500, $F1A675, $76C1FF, $D3F8FF, $98DDFF, $5295FE, - $9C613B, $E0A47B, $764127, $FFFFFF, $CB8C6A, $FFF9F1, $C9662A, $F9DBC4, $962D00, $F6F6F6, - $C2EEFF, $800000, $CCF4FF, $91D0FF, $8ED3FF, $4E91FE, $FCE1CB, $6FC0FF, $3E80FE, $F0C7A9, - $000000, $8D8D8D, $FBDABE, $94E6FB, $FADAC4, $962D00, $B96837, $962D00, $FBE5D3, $E4AE88, - $DCFFFF, $5BC0F7, $94E6FB, $1595EE, $087FE8, $7CDAF7, $D68759, $933803, $FFFFFF), - ($DEF7F4, $91C6B7, $A7D9D9, $E4F0F2, $6B7760, $8CC2B0, $76C1FF, $D3F8FF, $98DDFF, $5295FE, - $588060, $8FC4B5, $335E51, $FFFFFF, $588060, $DEF7F4, $5E8674, $ADDEE1, $5E8D75, $EEF4F4, - $C2EEFF, $385D3F, $CCF4FF, $91D0FF, $8ED3FF, $4E91FE, $B6E3D8, $6FC0FF, $3E80FE, $9FD4C5, - $000000, $8D8D8D, $91BAAF, $94E6FB, $E4F1F2, $588060, $548973, $5E8D75, $DBF5F2, $97C9BC, - $DCFFFF, $5BC0F7, $94E6FB, $1595EE, $087FE8, $7CDAF7, $82C0AF, $447A63, $FFFFFF), - ($FAF4F3, $B59799, $E5D7D7, $F7F3F3, $927476, $C8B2B3, $76C1FF, $D3F8FF, $98DDFF, $5295FE, - $947C7C, $B09193, $755454, $FFFFFF, $8F6D6E, $FFFFFF, $99797A, $E4DADB, $947C7C, $FFFAFD, - $C2EEFF, $6F4B4B, $CCF4FF, $91D0FF, $8ED3FF, $4E91FE, $E7D3D6, $6FC0FF, $3E80FE, $D3C0C0, - $000000, $8D8D8D, $EBE5E5, $94E6FB, $F7F3F3, $947C7C, $916F70, $947C7C, $F8F1F0, $BA9EA0, - $DCFFFF, $5BC0F7, $94E6FB, $1595EE, $087FE8, $7CDAF7, $BFA7A8, $916F70, $FFFFFF) - ); - Office11GradientPercents: array[TOffice11SchemeColor] of Integer = (41, 125, 40); -var - I: Integer; -begin - FOffice11Scheme := dxGetOffice11Scheme; - FXPStandardScheme := AreVisualStylesAvailable([]) and (FOffice11Scheme <> schUnknown){luna}; - if FXPStandardScheme then - begin - // bk colors - dxOffice11ToolbarsColor1 := Office11Colors[FOffice11Scheme, 0]; - dxOffice11ToolbarsColor2 := Office11Colors[FOffice11Scheme, 1]; - dxOffice11DockColor1 := Office11Colors[FOffice11Scheme, 2]; - dxOffice11DockColor2 := Office11Colors[FOffice11Scheme, 3]; - // bar: mark - dxOffice11BarMarkColors2[1] := Office11Colors[FOffice11Scheme, 4]; - dxOffice11BarMarkColors1[1] := Office11Colors[FOffice11Scheme, 5]; - dxOffice11BarMarkColors2[2] := Office11Colors[FOffice11Scheme, 6]; - dxOffice11BarMarkColors1[2] := Office11Colors[FOffice11Scheme, 7]; - dxOffice11BarMarkColors2[3] := Office11Colors[FOffice11Scheme, 8]; - dxOffice11BarMarkColors1[3] := Office11Colors[FOffice11Scheme, 9]; - // bar: border - dxOffice11BarBorderColors[1] := Office11Colors[FOffice11Scheme, 10]; - dxOffice11BarBorderColors[2] := Office11Colors[FOffice11Scheme, 11]; - // bar: border and mark (Normal, Selected, Downed) - for I := 1 to 3 do - dxOffice11BarBorderMarkColors[1, I] := GetMiddleRGB(dxOffice11BarMarkColors1[I], dxOffice11ToolbarsColor1, 90); // #6 ??? - for I := 1 to 3 do - dxOffice11BarBorderMarkColors[2, I] := GetMiddleRGB(dxOffice11BarMarkColors2[I], dxOffice11BarBorderColors[2], 50); // #9 - // bar: finger - dxOffice11BarFingerColor1 := Office11Colors[FOffice11Scheme, 12]; - dxOffice11BarFingerColor2 := Office11Colors[FOffice11Scheme, 13]; - // bar: separator - dxOffice11BarSeparatorColor1 := Office11Colors[FOffice11Scheme, 14]; - dxOffice11BarSeparatorColor2 := Office11Colors[FOffice11Scheme, 15]; - // bar: mark arrow - dxOffice11BarMarkArrowColor1 := ColorToRGB(clBlack); - dxOffice11BarMarkArrowColor2 := ColorToRGB(clWhite); - // bar: floating - dxOffice11BarFloatingBorderColor1 := Office11Colors[FOffice11Scheme, 16]; - dxOffice11BarFloatingBorderColor2 := Office11Colors[FOffice11Scheme, 17]; - dxOffice11BarFloatingCaptionTextColor1 := ColorToRGB(clWhite); - dxOffice11BarFloatingCaptionTextColor2 := ColorToRGB(clBlack); - dxOffice11BarFloatingCaptionTextColor3 := ColorToRGB(clBlack); - // drop downs, menus - dxOffice11DropDownBorderColor1 := Office11Colors[FOffice11Scheme, 18]; - dxOffice11MenuColor := Office11Colors[FOffice11Scheme, 19]; - // selected - dxOffice11ToolbarSelectedColor := Office11Colors[FOffice11Scheme, 20]; - dxOffice11SelectedBorderColor := Office11Colors[FOffice11Scheme, 21]; - dxOffice11SelectedColor1 := Office11Colors[FOffice11Scheme, 22]; - dxOffice11SelectedColor2 := Office11Colors[FOffice11Scheme, 23]; - dxOffice11SelectedDownColor1 := Office11Colors[FOffice11Scheme, 24]; - dxOffice11SelectedDownColor2 := Office11Colors[FOffice11Scheme, 25]; - dxOffice11OwnerControlDownedColor := Office11Colors[FOffice11Scheme, 26]; - dxOffice11DownedColor := Office11Colors[FOffice11Scheme, 27]; - dxOffice11DownedSelectedColor := Office11Colors[FOffice11Scheme, 28]; - // detachable - dxOffice11DetachableColor := Office11Colors[FOffice11Scheme, 29]; - // text - dxOffice11TextEnabledColor := Office11Colors[FOffice11Scheme, 30]; - dxOffice11TextDisabledColor := Office11Colors[FOffice11Scheme, 31]; - // Gradient Tube Percent - GradientPercent := Office11GradientPercents[FOffice11Scheme]; - // LF - dxOffice11GroupColor := Office11Colors[FOffice11Scheme, 32]; - // Outlook day navigator - dxOffice11DayNavigatorSelectedColor := Office11Colors[FOffice11Scheme, 33]; - dxOffice11OutlookControlColor := Office11Colors[FOffice11Scheme, 34]; - dxOffice11OutlookBorderColor := Office11Colors[FOffice11Scheme, 35]; - // Office11 group row style colors - dxOffice11GroupIndentColor := $C9EEFD; - dxOffice11GroupRowSeparatorColor := dxOffice11BarBorderColors[2]; - dxOffice11GroupRowTextColor := Office11Colors[FOffice11Scheme, 36]; - // NavPane - dxOffice11NavPaneBorder := Office11Colors[FOffice11Scheme, 37]; - dxOffice11NavPaneGroupCaptionColor1 := Office11Colors[FOffice11Scheme, 38]; - dxOffice11NavPaneGroupCaptionColor2 := Office11Colors[FOffice11Scheme, 39]; - dxOffice11NavPaneGroupCaptionHotColor1 := Office11Colors[FOffice11Scheme, 40]; - dxOffice11NavPaneGroupCaptionHotColor2 := Office11Colors[FOffice11Scheme, 41]; - dxOffice11NavPaneGroupCaptionPressedColor1 := Office11Colors[FOffice11Scheme, 42]; - dxOffice11NavPaneGroupCaptionPressedColor2 := Office11Colors[FOffice11Scheme, 43]; - dxOffice11NavPaneGroupCaptionPressedHotColor1 := Office11Colors[FOffice11Scheme, 44]; - dxOffice11NavPaneGroupCaptionPressedHotColor2 := Office11Colors[FOffice11Scheme, 45]; - dxOffice11NavPaneHeaderColor1 := Office11Colors[FOffice11Scheme, 46]; - dxOffice11NavPaneHeaderColor2 := Office11Colors[FOffice11Scheme, 47]; - dxOffice11NavPaneHeaderFontColor := Office11Colors[FOffice11Scheme, 48]; - dxOffice11NavPaneSplitterColor1 := dxOffice11NavPaneHeaderColor1; - dxOffice11NavPaneSplitterColor2 := dxOffice11NavPaneHeaderColor2; - end - else - begin - // bk colors - dxOffice11DockColor1 := ColorToRGB(clBtnFace); - dxOffice11DockColor2 := GetMiddleRGB(clBtnFace, clWindow, 20); - dxOffice11ToolbarsColor1 := GetMiddleRGB(clBtnFace, clWindow, 22); - dxOffice11ToolbarsColor2 := GetMiddleRGB(clBtnFace, clWindow, 96); - // bar: mark - dxOffice11BarMarkColors2[1] := ColorToRGB(clBtnShadow); - dxOffice11BarMarkColors1[1] := GetMiddleRGB(dxOffice11BarMarkColors2[1], clWindow, 74); - // TODO - dxOffice11BarMarkColors1[2] := GetRealColor(GetLightColor(-15, 29, 100--15-29)); // Selected - // dxOffice11BarMarkColors1[2] := FlatToolbarsSelColor; - dxOffice11BarMarkColors2[2] := dxOffice11BarMarkColors1[2]; - dxOffice11BarMarkColors1[3] := GetRealColor(GetLightColor(42, 11, 100-42-11)); // Downed - dxOffice11BarMarkColors2[3] := dxOffice11BarMarkColors1[3]; - // bar: border - dxOffice11BarBorderColors[1] := GetMiddleRGB(clBtnFace, clWindow, 85); - dxOffice11BarBorderColors[2] := ColorToRGB(clBtnFace); - // bar: border and mark (Normal, Selected, Downed) - for I := 1 to 3 do - dxOffice11BarBorderMarkColors[1, I] := GetMiddleRGB(dxOffice11BarMarkColors2[I], clWindow, 50); // #6 - for I := 1 to 3 do - dxOffice11BarBorderMarkColors[2, I] := GetMiddleRGB(dxOffice11BarMarkColors2[I], dxOffice11BarBorderColors[2], 50); // #9 - // bar: finger - dxOffice11BarFingerColor1 := GetMiddleRGB(clBtnShadow, clWindow, 76); - dxOffice11BarFingerColor2 := ColorToRGB(clWindow); - // bar: separator - dxOffice11BarSeparatorColor1 := GetMiddleRGB(clBtnShadow, clWindow, 70); - dxOffice11BarSeparatorColor2 := ColorToRGB(clWhite); - // bar: mark arrow - dxOffice11BarMarkArrowColor1 := ColorToRGB(clBtnText); - dxOffice11BarMarkArrowColor2 := ColorToRGB(clWindow); - // bar: floating - dxOffice11BarFloatingBorderColor1 := ColorToRGB(clBtnShadow); - dxOffice11BarFloatingBorderColor2 := dxOffice11ToolbarsColor2; - dxOffice11BarFloatingCaptionTextColor1 := ColorToRGB(clBtnHighlight); - dxOffice11BarFloatingCaptionTextColor2 := ColorToRGB(clBtnText); - dxOffice11BarFloatingCaptionTextColor3 := ColorToRGB(clBtnText); - // drop down - dxOffice11DropDownBorderColor1 := ColorToRGB(clBtnShadow); // ? - dxOffice11MenuColor := ColorToRGB(clWindow); // ? - // selected - dxOffice11ToolbarSelectedColor := GetRealColor(GetLightColor(-2, 30, 72)); // ? - dxOffice11SelectedBorderColor := ColorToRGB(clHighlight); - dxOffice11SelectedColor1 := dxOffice11ToolbarSelectedColor; - dxOffice11SelectedColor2 := dxOffice11ToolbarSelectedColor; - dxOffice11OwnerControlDownedColor := dxOffice11ToolbarsColor2; - dxOffice11DownedColor := GetLightColor(41, 11, 48); // ? - dxOffice11DownedSelectedColor := GetRealColor(GetLightColor(14, 44, 40)); // ? - dxOffice11SelectedDownColor1 := dxOffice11DownedSelectedColor; - dxOffice11SelectedDownColor2 := dxOffice11DownedSelectedColor; - // detachable - dxOffice11DetachableColor := dxOffice11OwnerControlDownedColor; - // text - dxOffice11TextEnabledColor := ColorToRGB(clBtnText); - dxOffice11TextDisabledColor := ColorToRGB(clGrayText); - // Gradient Tube Percent - GradientPercent := 75; - // LF - dxOffice11GroupColor := ColorToRGB(clBtnFace); - // Outlook day navigator - dxOffice11DayNavigatorSelectedColor := dxOffice11DownedColor; - dxOffice11OutlookControlColor := dxOffice11DockColor1; - dxOffice11OutlookBorderColor := dxOffice11DropDownBorderColor1; - // Office11 group row style colors - dxOffice11GroupIndentColor := ColorToRGB(clBtnFace); - dxOffice11GroupRowTextColor := ColorToRGB(clBtnShadow); - dxOffice11GroupRowSeparatorColor := ColorToRGB(clBtnShadow); - // NavPane - dxOffice11NavPaneBorder := GetRealColor(ColorToRGB(clBtnShadow)); - dxOffice11NavPaneGroupCaptionColor1 := GetdxOffice11NavPaneGroupCaptionColor(True); - dxOffice11NavPaneGroupCaptionColor2 := GetdxOffice11NavPaneGroupCaptionColor(False); - dxOffice11NavPaneGroupCaptionHotColor1 := dxOffice11SelectedColor1; - dxOffice11NavPaneGroupCaptionHotColor2 := dxOffice11SelectedColor2; - dxOffice11NavPaneGroupCaptionPressedColor1 := dxOffice11DownedColor; - dxOffice11NavPaneGroupCaptionPressedColor2 := dxOffice11NavPaneGroupCaptionPressedColor1; - dxOffice11NavPaneGroupCaptionPressedHotColor1 := dxOffice11DownedSelectedColor; - dxOffice11NavPaneGroupCaptionPressedHotColor2 := dxOffice11NavPaneGroupCaptionPressedHotColor1; - dxOffice11NavPaneHeaderColor1 := dxOffice11NavPaneBorder; - dxOffice11NavPaneHeaderColor2 := dxOffice11NavPaneBorder; - dxOffice11NavPaneHeaderFontColor := ColorToRGB(clHighlightText); - dxOffice11NavPaneSplitterColor1 := GetRealColor(ColorToRGB(clBtnFace)); - dxOffice11NavPaneSplitterColor2 := dxOffice11NavPaneBorder; - end; - // bar: floating - dxOffice11BarFloatingBorderColor3 := dxOffice11ToolbarsColor1; - dxOffice11BarFloatingCaptionColor := dxOffice11BarFloatingBorderColor1; - // drop downs, menus - dxOffice11DropDownBorderColor2 := dxOffice11MenuColor; - dxOffice11MenuDownedColor1 := dxOffice11ToolbarsColor1; - dxOffice11MenuDownedColor2 := dxOffice11ToolbarsColor2; - dxOffice11MenuIndentColor1 := dxOffice11ToolbarsColor1; - dxOffice11MenuIndentColor2 := dxOffice11ToolbarsColor2; - dxOffice11MenuNonRecentIndentColor1 := GetMiddleRGB(dxOffice11MenuIndentColor1, clBlack, 92); - dxOffice11MenuNonRecentIndentColor2 := GetMiddleRGB(dxOffice11MenuIndentColor2, clBlack, 92); - // selected - dxOffice11DetachableSelectedColor := dxOffice11ToolbarSelectedColor; - // static - dxOffice11StaticBorderColor := dxOffice11DropDownBorderColor1; - // date - dxOffice11DateHeaderColor := dxOffice11DockColor1; - // inplace sub item - dxOffice11InPlaceSubItemColor := dxOffice11BarBorderMarkColors[2, 1]; - dxOffice11InPlaceSubItemTextColor := dxOffice11BarFloatingCaptionTextColor1; - // LF painters - dxOffice11ControlBorderColor := dxOffice11DropDownBorderColor1; -end; - -procedure CreateOffice11Colors; -begin - if FCounter = 0 then - begin - InitOffice11Colors; - CreateOffice11Brushes; - end; - Inc(FCounter); -end; - -procedure RefreshOffice11Colors; -begin - InitOffice11Colors; - if FCounter <> 0 then - begin - DestroyOffice11Brushes; - CreateOffice11Brushes; - end; -end; - -procedure ReleaseOffice11Colors; -begin - Dec(FCounter); - if FCounter = 0 then - DestroyOffice11Brushes; -end; - -function IsHighContrastBlack: Boolean; -begin - Result := GetSysColor(COLOR_BTNFACE) = 0; // Black -end; - -function IsHighContrastWhite: Boolean; -begin - Result := (GetSysColor(COLOR_BTNFACE) = $FFFFFF); // White -end; - -function IsHighContrast2: Boolean; -begin - Result := (GetSysColor(COLOR_BTNFACE) = 0) and (GetSysColor(COLOR_BTNTEXT) <> $FFFFFF); // #2 -end; - -function IsXPStandardScheme: Boolean; -begin - Result := FXPStandardScheme; -end; - -procedure FillGradientRect(DC: HDC; const ARect: TRect; AColor1, AColor2: TColor; - AHorizontal: Boolean); - - procedure SoftwareGradientFill(ARGBColor1, ARGBColor2: DWORD); - var - FromR, ToR, FromG, ToG, FromB, ToB: Byte; - SR: TRect; - W, I, N: Integer; - R, G, B: Byte; - begin - FromR := GetRValue(ARGBColor1); - FromG := GetGValue(ARGBColor1); - FromB := GetBValue(ARGBColor1); - ToR := GetRValue(ARGBColor2); - ToG := GetGValue(ARGBColor2); - ToB := GetBValue(ARGBColor2); - SR := ARect; - if AHorizontal then - W := SR.Right - SR.Left - else - W := SR.Bottom - SR.Top; - N := 256; - if W < N then - N := W; - for I := 0 to N - 1 do - begin - if AHorizontal then - SR.Right := ARect.Left + MulDiv(I + 1, W, N) - else - SR.Bottom := ARect.Top + MulDiv(I + 1, W, N); - R := FromR + MulDiv(I, ToR - FromR, N - 1); - G := FromG + MulDiv(I, ToG - FromG, N - 1); - B := FromB + MulDiv(I, ToB - FromB, N - 1); - if not IsRectEmpty(SR) then - FillRectByColor(DC, SR, RGB(R, G, B)); - if AHorizontal then - begin - SR.Left := SR.Right; - if SR.Left >= ARect.Right then - Break; - end - else - begin - SR.Top := SR.Bottom; - if SR.Top >= ARect.Bottom then - Break; - end; - end; - end; - - procedure SystemGradientFill(ARGBColor1, ARGBColor2: DWORD); - - procedure SetVertex(var AVertex: TTriVertex; const APoint: TPoint; ARGBColor: DWORD); - begin - AVertex.X := APoint.X; - AVertex.Y := APoint.Y; - AVertex.Red := MakeWord(0, GetRValue(ARGBColor)); - AVertex.Green := MakeWord(0, GetGValue(ARGBColor)); - AVertex.Blue := MakeWord(0, GetBValue(ARGBColor)); - AVertex.Alpha := 0; - end; - - const - AModesMap: array[Boolean] of DWORD = (GRADIENT_FILL_RECT_V, GRADIENT_FILL_RECT_H); - var - AVertices: array[0..1] of TTriVertex; - AGradientRect: TGradientRect; - begin - SetVertex(AVertices[0], ARect.TopLeft, ARGBColor1); - SetVertex(AVertices[1], ARect.BottomRight, ARGBColor2); - AGradientRect.UpperLeft := 0; - AGradientRect.LowerRight := 1; - GradientFill(DC, AVertices[0], 2, AGradientRect, 1, AModesMap[AHorizontal]); - end; - -var - ARGBColor1, ARGBColor2: DWORD; -begin - ARGBColor1 := ColorToRGB(AColor1); - ARGBColor2 := ColorToRGB(AColor2); - if ARGBColor1 = ARGBColor2 then - FillRectByColor(DC, ARect, AColor1) - else - if Assigned(GradientFill) then - SystemGradientFill(ARGBColor1, ARGBColor2) - else - SoftwareGradientFill(ARGBColor1, ARGBColor2); -end; - -procedure FillTubeGradientRect(DC: HDC; const ARect: TRect; AColor1, AColor2: TColor; - AHorizontal: Boolean); -var - FromR, FromG, FromB, ToR, ToG, ToB: Integer; - ToR1, ToG1, ToB1, ToR2, ToG2, ToB2: Integer; - SR: TRect; - W, I, N, M: Integer; - R, G, B: Byte; - ABrush: HBRUSH; -begin - AColor1 := ColorToRGB(AColor1); - AColor2 := ColorToRGB(AColor2); - if AColor1 = AColor2 then - begin - ABrush := CreateSolidBrush(AColor1); - FillRect(DC, ARect, ABrush); - DeleteObject(ABrush); - Exit; - end; - - FromR := GetRValue(AColor1); - FromG := GetGValue(AColor1); - FromB := GetBValue(AColor1); - ToR := GetRValue(AColor2); - ToG := GetGValue(AColor2); - ToB := GetBValue(AColor2); - SR := ARect; - if AHorizontal then - W := SR.Right - SR.Left - else - W := SR.Bottom - SR.Top; - M := W div 2; - ToR1 := FromR - MulDiv(FromR - ToR, GradientPercent, 200); - ToG1 := FromG - MulDiv(FromG - ToG, GradientPercent, 200); - ToB1 := FromB - MulDiv(FromB - ToB, GradientPercent, 200); - - ToR2 := FromR - MulDiv(FromR - ToR1, W, M); - ToG2 := FromG - MulDiv(FromG - ToG1, W, M); - ToB2 := FromB - MulDiv(FromB - ToB1, W, M); - -// N := 256; -// if W < N then -// N := W; - N := W; - - for I := 0 to N - 1 do - begin - if AHorizontal then - SR.Right := ARect.Left + MulDiv(I + 1, W, N) - else - SR.Bottom := ARect.Top + MulDiv(I + 1, W, N); - if I < M then - begin - R := FromR + MulDiv(I, ToR2 - FromR, N - 1); - G := FromG + MulDiv(I, ToG2 - FromG, N - 1); - B := FromB + MulDiv(I, ToB2 - FromB, N - 1); - end - else - if I = M then - begin - R := ToR1; - G := ToG1; - B := ToB1; - FromR := ToR + MulDiv(ToR1 - ToR, W, M); - FromG := ToG + MulDiv(ToG1 - ToG, W, M); - FromB := ToB + MulDiv(ToB1 - ToB, W, M); - end - else - begin - R := FromR + MulDiv(I, ToR - FromR, N - 1); - G := FromG + MulDiv(I, ToG - FromG, N - 1); - B := FromB + MulDiv(I, ToB - FromB, N - 1); - end; - - if not IsRectEmpty(SR) then - begin - ABrush := CreateSolidBrush(RGB(R, G, B)); - FillRect(DC, SR, ABrush); - DeleteObject(ABrush); - end; - if AHorizontal then - begin - SR.Left := SR.Right; - if SR.Left >= ARect.Right then - Break; - end - else - begin - SR.Top := SR.Bottom; - if SR.Top >= ARect.Bottom then - Break; - end; - end; -end; - -procedure FillRectByColor(DC: HDC; const R: TRect; AColor: TColor); -var - ABrush: HBRUSH; -begin - ABrush := CreateSolidBrush(ColorToRGB(AColor)); - FillRect(DC, R, ABrush); - DeleteObject(ABrush); -end; - -procedure FrameRectByColor(DC: HDC; const R: TRect; AColor: TColor); -var - ABrush: HBRUSH; -begin - ABrush := CreateSolidBrush(ColorToRGB(AColor)); - FrameRect(DC, R, ABrush); - DeleteObject(ABrush); -end; - -function GetGradientColorRect(const ARect: TRect; X: Integer; AColor1, AColor2: TColor; - AHorizontal: Boolean): TColorRef; -var - FromR, ToR, FromG, ToG, FromB, ToB: Byte; - ARectLeft, W, I, N: Integer; - R, G, B: Byte; -begin - AColor1 := ColorToRGB(AColor1); - AColor2 := ColorToRGB(AColor2); - FromR := GetRValue(AColor1); - FromG := GetGValue(AColor1); - FromB := GetBValue(AColor1); - ToR := GetRValue(AColor2); - ToG := GetGValue(AColor2); - ToB := GetBValue(AColor2); - if AHorizontal then - begin - ARectLeft := ARect.Left; - W := ARect.Right - ARect.Left; - end - else - begin - ARectLeft := ARect.Top; - W := ARect.Bottom - ARect.Top; - end; - N := 256; - if W < N then - N := W; - I := MulDiv(X - ARectLeft + 1, N, W) - 1; - if I < 0 then I := 0; - R := FromR + MulDiv(I, ToR - FromR, N - 1); - G := FromG + MulDiv(I, ToG - FromG, N - 1); - B := FromB + MulDiv(I, ToB - FromB, N - 1); - Result := RGB(R, G, B); -end; - -procedure Office11FrameSelectedRect(DC: HDC; const R: TRect); -begin - if IsHighContrastBlack or IsHighContrast2 then - FrameRectByColor(DC, R, clHighlightText) - else - FrameRect(DC, R, dxOffice11SelectedBorderBrush); -end; - -procedure Office11DrawFingerElements(DC: HDC; ARect: TRect; AHorizontal: Boolean; - ABrush1: HBRUSH = 0; ABrush2: HBRUSH = 0); -var - R1, R2: TRect; - W: Integer; -begin - with ARect do - R1 := Rect(Left, Top, Left + 4, Top + 4); - if AHorizontal then - begin - W := ARect.Bottom - ARect.Top; - W := W - (W div 4) * 4; - if W > 1 then W := W div 2; - OffsetRect(R1, 0, W); - end - else - begin - W := ARect.Right - ARect.Left; - W := W - (W div 4) * 4; - if W > 1 then W := W div 2; - OffsetRect(R1, W, 0); - end; - if ABrush1 = 0 then - ABrush1 := dxOffice11BarFingerBrush1; - if ABrush2 = 0 then - ABrush2 := dxOffice11BarFingerBrush2; - repeat - R2 := R1; - InflateRect(R2, -1, -1); - FillRect(DC, R2, ABrush2); - OffsetRect(R2, -1, -1); - FillRect(DC, R2, ABrush1); - if AHorizontal then - begin - OffsetRect(R1, 0, 4); - if R1.Bottom > ARect.Bottom then Break; - end - else - begin - OffsetRect(R1, 4, 0); - if R1.Right > ARect.Right then Break; - end; - until False; -end; - -procedure Office11DrawItemArrow(DC: HDC; R: TRect; ADownArrow: Boolean; - Enabled, Selected, Flat: Boolean); -var - Size: Integer; -begin - if not ADownArrow then - Size := R.Bottom - R.Top - 6 - else // atDown - Size := R.Right - R.Left - 8; - Size := (Size - 1) div 2 + Byte(Size mod 2 <> 0); - if Size < 3 then Size := 3; - Office11DrawLargeItemArrow(DC, R, ADownArrow, Size, Selected, Enabled, Flat); -end; - -procedure Office11DrawLargeItemArrow(DC: HDC; R: TRect; ADownArrow: Boolean; - Size: Integer; Selected, Enabled, Flat: Boolean); -var - Color: COLORREF; - X, Y: Integer; - P: array[1..3] of TPoint; - Pen: HPEN; - Brush: HBRUSH; - - procedure DrawEnabled; - begin - with R do - if not ADownArrow then - begin - X := (Left + Right - Size) div 2; - Y := (Top + Bottom - (2 * Size - 1)) div 2; - P[1] := Point(X, Y); - P[2] := Point(X, Y + 2 * Size - 2); - end - else // atDown - begin - X := (Left + Right - (2 * Size - 1)) div 2; - Y := (Top + Bottom - Size) div 2; - P[1] := Point(X, Y); - P[2] := Point(X + 2 * Size - 2, Y); - end; - P[3] := Point(X + Size - 1, Y + Size - 1); - - Pen := SelectObject(DC, CreatePen(PS_SOLID, 1, Color)); - Brush := SelectObject(DC, CreateSolidBrush(Color)); - Polygon(DC, P, 3); - DeleteObject(SelectObject(DC, Brush)); - DeleteObject(SelectObject(DC, Pen)); - end; - -begin - if Enabled then - begin - if Selected and IsHighContrastWhite then - Color := clWhite - else - Color := dxOffice11TextEnabledColor; - end - else - Color := dxOffice11TextDisabledColor; - DrawEnabled; -end; - -procedure Office11DrawSizeGrip(DC: HDC; ARect: TRect; - AColor1: TColor = clDefault; AColor2: TColor = clDefault); -var - ABrush1, ABrush2: HBRUSH; -begin - ABrush1 := 0; - ABrush2 := 0; - if AColor1 <> clDefault then - ABrush1 := CreateSolidBrush(ColorToRGB(AColor1)); - if AColor2 <> clDefault then - ABrush2 := CreateSolidBrush(ColorToRGB(AColor2)); - ARect := Rect(ARect.Right - 12, ARect.Bottom - 3, ARect.Right, ARect.Bottom); - Office11DrawFingerElements(DC, ARect, False, ABrush1, ABrush2); // 3 - Inc(ARect.Left, 4); - OffsetRect(ARect, 0, -4); - Office11DrawFingerElements(DC, ARect, False, ABrush1, ABrush2); // 2 - Inc(ARect.Left, 4); - OffsetRect(ARect, 0, -4); - Office11DrawFingerElements(DC, ARect, False, ABrush1, ABrush2); // 1 - if ABrush1 <> 0 then DeleteObject(ABrush1); - if ABrush2 <> 0 then DeleteObject(ABrush2); -end; - -initialization - FMsimg32Library := LoadLibrary(msimg32); - if FMsimg32Library <> 0 then - GradientFill := GetProcAddress(FMsimg32Library, 'GradientFill') - -finalization - if FMsimg32Library <> 0 then - FreeLibrary(FMsimg32Library); - -end. - diff --git a/internal/x.46/XP Theme Manager/Sources/dxOffice11.res b/internal/x.46/XP Theme Manager/Sources/dxOffice11.res deleted file mode 100644 index 680cef5f..00000000 Binary files a/internal/x.46/XP Theme Manager/Sources/dxOffice11.res and /dev/null differ diff --git a/internal/x.46/XP Theme Manager/Sources/dxThemeConsts.pas b/internal/x.46/XP Theme Manager/Sources/dxThemeConsts.pas deleted file mode 100644 index 90b45e3c..00000000 --- a/internal/x.46/XP Theme Manager/Sources/dxThemeConsts.pas +++ /dev/null @@ -1,1044 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressXPThemeManager } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSXPTHEMEMANAGER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxThemeConsts; - -{$I cxVer.inc} - -interface - -const - - THEMEMGR_VERSION = 1; // increment if order of props changes or - // any props are deleted (will prevent loading - // of controlsets that use older version -{$IFDEF CBUILDER11} - {$EXTERNALSYM WM_THEMECHANGED} -{$ENDIF} - WM_THEMECHANGED = $031A; - - TC_NONE = 0; - -// Parts and states - -// Class 'Window' -// Parts - WP_CAPTION = 1; - WP_SMALLCAPTION = 2; - WP_MINCAPTION = 3; - WP_SMALLMINCAPTION = 4; - WP_MAXCAPTION = 5; - WP_SMALLMAXCAPTION = 6; - WP_FRAMELEFT = 7; - WP_FRAMERIGHT = 8; - WP_FRAMEBOTTOM = 9; - WP_SMALLFRAMELEFT = 10; - WP_SMALLFRAMERIGHT = 11; - WP_SMALLFRAMEBOTTOM = 12; - WP_SYSBUTTON = 13; - WP_MDISYSBUTTON = 14; - WP_MINBUTTON = 15; - WP_MDIMINBUTTON = 16; - WP_MAXBUTTON = 17; - WP_CLOSEBUTTON = 18; - WP_SMALLCLOSEBUTTON = 19; - WP_MDICLOSEBUTTON = 20; - WP_RESTOREBUTTON = 21; - WP_MDIRESTOREBUTTON = 22; - WP_HELPBUTTON = 23; - WP_MDIHELPBUTTON = 24; - WP_HORZSCROLL = 25; - WP_HORZTHUMB = 26; - WP_VERTSCROLL = 27; - WP_VERTTHUMB = 28; - WP_DIALOG = 29; - WP_CAPTIONSIZINGTEMPLATE = 30; - WP_SMALLCAPTIONSIZINGTEMPLATE = 31; - WP_FRAMELEFTSIZINGTEMPLATE = 32; - WP_SMALLFRAMELEFTSIZINGTEMPLATE = 33; - WP_FRAMERIGHTSIZINGTEMPLATE = 34; - WP_SMALLFRAMERIGHTSIZINGTEMPLATE = 35; - WP_FRAMEBOTTOMSIZINGTEMPLATE = 36; - WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE = 37; -// States - FS_ACTIVE = 1; - FS_INACTIVE = 2; - CS_ACTIVE = 1; - CS_INACTIVE = 2; - CS_DISABLED = 3; - MXCS_ACTIVE = 1; - MXCS_INACTIVE = 2; - MXCS_DISABLED = 3; - MNCS_ACTIVE = 1; - MNCS_INACTIVE = 2; - MNCS_DISABLED = 3; - HSS_NORMAL = 1; - HSS_HOT = 2; - HSS_PUSHED = 3; - HSS_DISABLED = 4; - HTS_NORMAL = 1; - HTS_HOT = 2; - HTS_PUSHED = 3; - HTS_DISABLED = 4; - VSS_NORMAL = 1; - VSS_HOT = 2; - VSS_PUSHED = 3; - VSS_DISABLED = 4; - VTS_NORMAL = 1; - VTS_HOT = 2; - VTS_PUSHED = 3; - VTS_DISABLED = 4; - SBS_NORMAL = 1; - SBS_HOT = 2; - SBS_PUSHED = 3; - SBS_DISABLED = 4; - MINBS_NORMAL = 1; - MINBS_HOT = 2; - MINBS_PUSHED = 3; - MINBS_DISABLED = 4; - MAXBS_NORMAL = 1; - MAXBS_HOT = 2; - MAXBS_PUSHED = 3; - MAXBS_DISABLED = 4; - RBS_NORMAL = 1; - RBS_HOT = 2; - RBS_PUSHED = 3; - RBS_DISABLED = 4; - HBS_NORMAL = 1; - HBS_HOT = 2; - HBS_PUSHED = 3; - HBS_DISABLED = 4; - CBS_NORMAL = 1; - CBS_HOT = 2; - CBS_PUSHED = 3; - CBS_DISABLED = 4; - -// Class 'Button' -// Parts - BP_PUSHBUTTON = 1; - BP_RADIOBUTTON = 2; - BP_CHECKBOX = 3; - BP_GROUPBOX = 4; - BP_USERBUTTON = 5; -// States - PBS_NORMAL = 1; - PBS_HOT = 2; - PBS_PRESSED = 3; - PBS_DISABLED = 4; - PBS_DEFAULTED = 5; - RBS_UNCHECKEDNORMAL = 1; - RBS_UNCHECKEDHOT = 2; - RBS_UNCHECKEDPRESSED = 3; - RBS_UNCHECKEDDISABLED = 4; - RBS_CHECKEDNORMAL = 5; - RBS_CHECKEDHOT = 6; - RBS_CHECKEDPRESSED = 7; - RBS_CHECKEDDISABLED = 8; - CBS_UNCHECKEDNORMAL = 1; - CBS_UNCHECKEDHOT = 2; - CBS_UNCHECKEDPRESSED = 3; - CBS_UNCHECKEDDISABLED = 4; - CBS_CHECKEDNORMAL = 5; - CBS_CHECKEDHOT = 6; - CBS_CHECKEDPRESSED = 7; - CBS_CHECKEDDISABLED = 8; - CBS_MIXEDNORMAL = 9; - CBS_MIXEDHOT = 10; - CBS_MIXEDPRESSED = 11; - CBS_MIXEDDISABLED = 12; - GBS_NORMAL = 1; - GBS_DISABLED = 2; - -// Class 'Rebar' -// Parts - RP_GRIPPER = 1; - RP_GRIPPERVERT = 2; - RP_BAND = 3; - RP_CHEVRON = 4; - RP_CHEVRONVERT = 5; -// States - CHEVS_NORMAL = 1; - CHEVS_HOT = 2; - CHEVS_PRESSED = 3; - -// Class 'Toolbar' -// Parts - TP_BUTTON = 1; - TP_DROPDOWNBUTTON = 2; - TP_SPLITBUTTON = 3; - TP_SPLITBUTTONDROPDOWN = 4; - TP_SEPARATOR = 5; - TP_SEPARATORVERT = 6; -// States - TS_NORMAL = 1; - TS_HOT = 2; - TS_PRESSED = 3; - TS_DISABLED = 4; - TS_CHECKED = 5; - TS_HOTCHECKED = 6; -// Class 'Status' -// Parts - SP_PANE = 1; - SP_GRIPPERPANE = 2; - SP_GRIPPER = 3; - -// Class 'Menu' -// Parts - MP_MENUITEM = 1; - MP_MENUDROPDOWN = 2; - MP_MENUBARITEM = 3; - MP_MENUBARDROPDOWN = 4; - MP_CHEVRON = 5; - MP_SEPARATOR = 6; -// States - MS_NORMAL = 1; - MS_SELECTED = 2; - MS_DEMOTED = 3; - -// Class 'ListBox' -// Parts - LBCP_BORDER_HSCROLL = 1; - LBCP_BORDER_HVSCROLL = 2; - LBCP_BORDER_NOSCROLL = 3; - LBCP_BORDER_VSCROLL = 4; - LBCP_ITEM = 5; -// States - LBPSN_NORMAL = 1; - LBPSN_FOCUSED = 2; - LBPSN_HOT = 3; - LBPSN_DISABLED = 4; - -// Class 'ListView' -// Parts - LVP_LISTITEM = 1; - LVP_LISTGROUP = 2; - LVP_LISTDETAIL = 3; - LVP_LISTSORTEDDETAIL = 4; - LVP_EMPTYTEXT = 5; -// States - LIS_NORMAL = 1; - LIS_HOT = 2; - LIS_SELECTED = 3; - LIS_DISABLED = 4; - LIS_SELECTEDNOTFOCUS = 5; - -// Class 'Header' -// Parts - HP_HEADERITEM = 1; - HP_HEADERITEMLEFT = 2; - HP_HEADERITEMRIGHT = 3; - HP_HEADERSORTARROW = 4; -// States - HIS_NORMAL = 1; - HIS_HOT = 2; - HIS_PRESSED = 3; - HILS_NORMAL = 1; - HILS_HOT = 2; - HILS_PRESSED = 3; - HIRS_NORMAL = 1; - HIRS_HOT = 2; - HIRS_PRESSED = 3; - HSAS_SORTEDUP = 1; - HSAS_SORTEDDOWN = 2; - -// Class 'Progress' -// Parts - PP_BAR = 1; - PP_BARVERT = 2; - PP_CHUNK = 3; - PP_CHUNKVERT = 4; - -// Class 'Tab' -// Parts - TABP_TABITEM = 1; - TABP_TABITEMLEFTEDGE = 2; - TABP_TABITEMRIGHTEDGE = 3; - TABP_TABITEMBOTHEDGE = 4; - TABP_TOPTABITEM = 5; - TABP_TOPTABITEMLEFTEDGE = 6; - TABP_TOPTABITEMRIGHTEDGE = 7; - TABP_TOPTABITEMBOTHEDGE = 8; - TABP_PANE = 9; - TABP_BODY = 10; -// States - TIS_NORMAL = 1; - TIS_HOT = 2; - TIS_SELECTED = 3; - TIS_DISABLED = 4; - TIS_FOCUSED = 5; - TILES_NORMAL = 1; - TILES_HOT = 2; - TILES_SELECTED = 3; - TILES_DISABLED = 4; - TILES_FOCUSED = 5; - TIRES_NORMAL = 1; - TIRES_HOT = 2; - TIRES_SELECTED = 3; - TIRES_DISABLED = 4; - TIRES_FOCUSED = 5; - TIBES_NORMAL = 1; - TIBES_HOT = 2; - TIBES_SELECTED = 3; - TIBES_DISABLED = 4; - TIBES_FOCUSED = 5; - TTIS_NORMAL = 1; - TTIS_HOT = 2; - TTIS_SELECTED = 3; - TTIS_DISABLED = 4; - TTIS_FOCUSED = 5; - TTILES_NORMAL = 1; - TTILES_HOT = 2; - TTILES_SELECTED = 3; - TTILES_DISABLED = 4; - TTILES_FOCUSED = 5; - TTIRES_NORMAL = 1; - TTIRES_HOT = 2; - TTIRES_SELECTED = 3; - TTIRES_DISABLED = 4; - TTIRES_FOCUSED = 5; - TTIBES_NORMAL = 1; - TTIBES_HOT = 2; - TTIBES_SELECTED = 3; - TTIBES_DISABLED = 4; - TTIBES_FOCUSED = 5; - -// Class 'Trackbar' -// Parts - TKP_TRACK = 1; - TKP_TRACKVERT = 2; - TKP_THUMB = 3; - TKP_THUMBBOTTOM = 4; - TKP_THUMBTOP = 5; - TKP_THUMBVERT = 6; - TKP_THUMBLEFT = 7; - TKP_THUMBRIGHT = 8; - TKP_TICS = 9; - TKP_TICSVERT = 10; -// States - TKS_NORMAL = 1; - TRS_NORMAL = 1; - TRVS_NORMAL = 1; - TUS_NORMAL = 1; - TUS_HOT = 2; - TUS_PRESSED = 3; - TUS_FOCUSED = 4; - TUS_DISABLED = 5; - TUBS_NORMAL = 1; - TUBS_HOT = 2; - TUBS_PRESSED = 3; - TUBS_FOCUSED = 4; - TUBS_DISABLED = 5; - TUTS_NORMAL = 1; - TUTS_HOT = 2; - TUTS_PRESSED = 3; - TUTS_FOCUSED = 4; - TUTS_DISABLED = 5; - TUVS_NORMAL = 1; - TUVS_HOT = 2; - TUVS_PRESSED = 3; - TUVS_FOCUSED = 4; - TUVS_DISABLED = 5; - TUVLS_NORMAL = 1; - TUVLS_HOT = 2; - TUVLS_PRESSED = 3; - TUVLS_FOCUSED = 4; - TUVLS_DISABLED = 5; - TUVRS_NORMAL = 1; - TUVRS_HOT = 2; - TUVRS_PRESSED = 3; - TUVRS_FOCUSED = 4; - TUVRS_DISABLED = 5; - TSS_NORMAL = 1; - TSVS_NORMAL = 1; - -// Class 'Tooltips' -// Parts - TTP_STANDARD = 1; - TTP_STANDARDTITLE = 2; - TTP_BALLOON = 3; - TTP_BALLOONTITLE = 4; - TTP_CLOSE = 5; -// States - TTCS_NORMAL = 1; - TTCS_HOT = 2; - TTCS_PRESSED = 3; - TTSS_NORMAL = 1; - TTSS_LINK = 2; - TTBS_NORMAL = 1; - TTBS_LINK = 2; - -// Class 'TreeView' -// Parts - TVP_TREEITEM = 1; - TVP_GLYPH = 2; - TVP_BRANCH = 3; -// States - TREIS_NORMAL = 1; - TREIS_HOT = 2; - TREIS_SELECTED = 3; - TREIS_DISABLED = 4; - TREIS_SELECTEDNOTFOCUS = 5; - GLPS_CLOSED = 1; - GLPS_OPENED = 2; - -// Class 'Spin' -// Parts - SPNP_UP = 1; - SPNP_DOWN = 2; - SPNP_UPHORZ = 3; - SPNP_DOWNHORZ = 4; -// States - UPS_NORMAL = 1; - UPS_HOT = 2; - UPS_PRESSED = 3; - UPS_DISABLED = 4; - DNS_NORMAL = 1; - DNS_HOT = 2; - DNS_PRESSED = 3; - DNS_DISABLED = 4; - UPHZS_NORMAL = 1; - UPHZS_HOT = 2; - UPHZS_PRESSED = 3; - UPHZS_DISABLED = 4; - DNHZS_NORMAL = 1; - DNHZS_HOT = 2; - DNHZS_PRESSED = 3; - DNHZS_DISABLED = 4; - -// Class 'Page' -// Parts - PGRP_UP = 1; - PGRP_DOWN = 2; - PGRP_UPHORZ = 3; - PGRP_DOWNHORZ = 4; - -// Class 'Scrollbar' -// Parts - SBP_ARROWBTN = 1; - SBP_THUMBBTNHORZ = 2; - SBP_THUMBBTNVERT = 3; - SBP_LOWERTRACKHORZ = 4; - SBP_UPPERTRACKHORZ = 5; - SBP_LOWERTRACKVERT = 6; - SBP_UPPERTRACKVERT = 7; - SBP_GRIPPERHORZ = 8; - SBP_GRIPPERVERT = 9; - SBP_SIZEBOX = 10; -// States - ABS_UPNORMAL = 1; - ABS_UPHOT = 2; - ABS_UPPRESSED = 3; - ABS_UPDISABLED = 4; - ABS_DOWNNORMAL = 5; - ABS_DOWNHOT = 6; - ABS_DOWNPRESSED = 7; - ABS_DOWNDISABLED = 8; - ABS_LEFTNORMAL = 9; - ABS_LEFTHOT = 10; - ABS_LEFTPRESSED = 11; - ABS_LEFTDISABLED = 12; - ABS_RIGHTNORMAL = 13; - ABS_RIGHTHOT = 14; - ABS_RIGHTPRESSED = 15; - ABS_RIGHTDISABLED = 16; - SCRBS_NORMAL = 1; - SCRBS_HOT = 2; - SCRBS_PRESSED = 3; - SCRBS_DISABLED = 4; - SZB_RIGHTALIGN = 1; - SZB_LEFTALIGN = 2; - -// Class 'Edit' -// Parts - EP_EDITTEXT = 1; - EP_CARET = 2; - { For Windows >= Vista } - EP_BACKGROUND = 3; - EP_PASSWORD = 4; - EP_BACKGROUNDWITHBORDER = 5; - EP_EDITBORDER_NOSCROLL = 6; - EP_EDITBORDER_HSCROLL = 7; - EP_EDITBORDER_VSCROLL = 8; - EP_EDITBORDER_HVSCROLL = 9; -// States - ETS_NORMAL = 1; - ETS_HOT = 2; - ETS_SELECTED = 3; - ETS_DISABLED = 4; - ETS_FOCUSED = 5; - ETS_READONLY = 6; - ETS_ASSIST = 7; - -// Class 'ComboBox' -// Parts - CP_DROPDOWNBUTTON = 1; - { For Windows >= Vista } - CP_BACKGROUND = 2; - CP_TRANSPARENTBACKGROUND = 3; - CP_BORDER = 4; - CP_READONLY = 5; - CP_DROPDOWNBUTTONRIGHT = 6; - CP_DROPDOWNBUTTONLEFT = 7; - CP_CUEBANNER = 8; -// States - CBXS_NORMAL = 1; - CBXS_HOT = 2; - CBXS_PRESSED = 3; - CBXS_DISABLED = 4; - -// Class 'Taskbar Clock' -// Parts - CLP_TIME = 1; -// States - CLS_NORMAL = 1; - -// Class 'Tray Notify' -// Parts - TNP_BACKGROUND = 1; - TNP_ANIMBACKGROUND = 2; - -// Class 'TaskBar' -// Parts - TBP_BACKGROUNDBOTTOM = 1; - TBP_BACKGROUNDRIGHT = 2; - TBP_BACKGROUNDTOP = 3; - TBP_BACKGROUNDLEFT = 4; - TBP_SIZINGBARBOTTOM = 5; - TBP_SIZINGBARRIGHT = 6; - TBP_SIZINGBARTOP = 7; - TBP_SIZINGBARLEFT = 8; - -// Class 'TaskBand' -// Parts - TDP_GROUPCOUNT = 1; - TDP_FLASHBUTTON = 2; - TDP_FLASHBUTTONGROUPMENU = 3; - -// Class 'StartPanel' -// Parts - SPP_USERPANE = 1; - SPP_MOREPROGRAMS = 2; - SPP_MOREPROGRAMSARROW = 3; - SPP_PROGLIST = 4; - SPP_PROGLISTSEPARATOR = 5; - SPP_PLACESLIST = 6; - SPP_PLACESLISTSEPARATOR = 7; - SPP_LOGOFF = 8; - SPP_LOGOFFBUTTONS = 9; - SPP_USERPICTURE = 10; - SPP_PREVIEW = 11; -// States - SPS_NORMAL = 1; - SPS_HOT = 2; - SPS_PRESSED = 3; - SPLS_NORMAL = 1; - SPLS_HOT = 2; - SPLS_PRESSED = 3; - -// Class 'ExplorerBar' -// Parts - EBP_HEADERBACKGROUND = 1; - EBP_HEADERCLOSE = 2; - EBP_HEADERPIN = 3; - EBP_IEBARMENU = 4; - EBP_NORMALGROUPBACKGROUND = 5; - EBP_NORMALGROUPCOLLAPSE = 6; - EBP_NORMALGROUPEXPAND = 7; - EBP_NORMALGROUPHEAD = 8; - EBP_SPECIALGROUPBACKGROUND = 9; - EBP_SPECIALGROUPCOLLAPSE = 10; - EBP_SPECIALGROUPEXPAND = 11; - EBP_SPECIALGROUPHEAD = 12; -// States - EBHC_NORMAL = 1; - EBHC_HOT = 2; - EBHC_PRESSED = 3; - EBHP_NORMAL = 1; - EBHP_HOT = 2; - EBHP_PRESSED = 3; - EBHP_SELECTEDNORMAL = 4; - EBHP_SELECTEDHOT = 5; - EBHP_SELECTEDPRESSED = 6; - EBM_NORMAL = 1; - EBM_HOT = 2; - EBM_PRESSED = 3; - EBNGC_NORMAL = 1; - EBNGC_HOT = 2; - EBNGC_PRESSED = 3; - EBNGE_NORMAL = 1; - EBNGE_HOT = 2; - EBNGE_PRESSED = 3; - EBSGC_NORMAL = 1; - EBSGC_HOT = 2; - EBSGC_PRESSED = 3; - EBSGE_NORMAL = 1; - EBSGE_HOT = 2; - EBSGE_PRESSED = 3; - -// Class 'TaskBand' -// Parts - MDP_NEWAPPBUTTON = 1; - MDP_SEPERATOR = 2; -// States - MDS_NORMAL = 1; - MDS_HOT = 2; - MDS_PRESSED = 3; - MDS_DISABLED = 4; - MDS_CHECKED = 5; - MDS_HOTCHECKED = 6; - -// Consts (part of UxTheme API) - - BT_IMAGEFILE = 0; - BT_BORDERFILL = 1; - BT_NONE = 2; - - IL_VERTICAL = 0; - IL_HORIZONTAL = 1; - - BT_RECT = 0; - BT_ROUNDRECT = 1; - BT_ELLIPSE = 2; - - FT_SOLID = 0; - FT_VERTGRADIENT = 1; - FT_HORZGRADIENT = 2; - FT_RADIALGRADIENT = 3; - FT_TILEIMAGE = 4; - - ST_TRUESIZE = 0; - ST_STRETCH = 1; - ST_TILE = 2; - - HA_LEFT = 0; - HA_CENTER = 1; - HA_RIGHT = 2; - - CA_LEFT = 0; - CA_CENTER = 1; - CA_RIGHT = 2; - - VA_TOP = 0; - VA_CENTER = 1; - VA_BOTTOM = 2; - - OT_TOPLEFT = 0; - OT_TOPRIGHT = 1; - OT_TOPMIDDLE = 2; - OT_BOTTOMLEFT = 3; - OT_BOTTOMRIGHT = 4; - OT_BOTTOMMIDDLE = 5; - OT_MIDDLELEFT = 6; - OT_MIDDLERIGHT = 7; - OT_LEFTOFCAPTION = 8; - OT_RIGHTOFCAPTION = 9; - OT_LEFTOFLASTBUTTON = 10; - OT_RIGHTOFLASTBUTTON = 11; - OT_ABOVELASTBUTTON = 12; - OT_BELOWLASTBUTTON = 13; - - ICE_NONE = 0; - ICE_GLOW = 1; - ICE_SHADOW = 2; - ICE_PULSE = 3; - ICE_ALPHA = 4; - - TST_NONE = 0; - TST_SINGLE = 1; - TST_CONTINUOUS = 2; - - GT_NONE = 0; - GT_IMAGEGLYPH = 1; - GT_FONTGLYPH = 2; - - IST_NONE = 0; - IST_SIZE = 1; - IST_DPI = 2; - - TSST_NONE = 0; - TSST_SIZE = 1; - TSST_DPI = 2; - - GFST_NONE = 0; - GFST_SIZE = 1; - GFST_DPI = 2; - -// Properties used by UxTheme rendering and controls (part of UxTheme API) - -// primitive types - TMT_STRING = 201; - TMT_INT = 202; - TMT_BOOL = 203; - TMT_COLOR = 204; - TMT_MARGINS = 205; - TMT_FILENAME = 206; - TMT_SIZE = 207; - TMT_POSITION = 208; - TMT_RECT = 209; - TMT_FONT = 210; - TMT_INTLIST = 211; - -// special misc. properties - TMT_COLORSCHEMES = 401; - TMT_SIZES = 402; - TMT_CHARSET = 403; - -// [documentation] properties - TMT_DISPLAYNAME = 601; - TMT_TOOLTIP = 602; - TMT_COMPANY = 603; - TMT_AUTHOR = 604; - TMT_COPYRIGHT = 605; - TMT_URL = 606; - TMT_VERSION = 607; - TMT_DESCRIPTION = 608; - -// TODO -// {$IFNDEF BCB} - TMT_FIRST_RCSTRING_NAME = TMT_DISPLAYNAME; - TMT_LAST_RCSTRING_NAME = TMT_DESCRIPTION; -// {$ENDIF BCB} - -// theme metrics: fonts - TMT_CAPTIONFONT = 801; - TMT_SMALLCAPTIONFONT = 802; - TMT_MENUFONT = 803; - TMT_STATUSFONT = 804; - TMT_MSGBOXFONT = 805; - TMT_ICONTITLEFONT = 806; - -// TODO -// {$IFNDEF BCB} - TMT_FIRSTFONT = TMT_CAPTIONFONT; - TMT_LASTFONT = TMT_ICONTITLEFONT; -// {$ENDIF BCB} - -// theme metrics: bools - TMT_FLATMENUS = 1001; - -// TODO -// {$IFNDEF BCB} - TMT_FIRSTBOOL = TMT_FLATMENUS; - TMT_LASTBOOL = TMT_FLATMENUS; -// {$ENDIF BCB} - -// theme metrics: sizes - TMT_SIZINGBORDERWIDTH = 1201; - TMT_SCROLLBARWIDTH = 1202; - TMT_SCROLLBARHEIGHT = 1203; - TMT_CAPTIONBARWIDTH = 1204; - TMT_CAPTIONBARHEIGHT = 1205; - TMT_SMCAPTIONBARWIDTH = 1206; - TMT_SMCAPTIONBARHEIGHT = 1207; - TMT_MENUBARWIDTH = 1208; - TMT_MENUBARHEIGHT = 1209; - -// TODO -//{$IFNDEF BCB} - TMT_FIRSTSIZE = TMT_SIZINGBORDERWIDTH; - TMT_LASTSIZE = TMT_MENUBARHEIGHT; -//{$ENDIF BCB} - -// theme metrics: ints - TMT_MINCOLORDEPTH = 1301; - -// TODO -// {$IFNDEF BCB} - TMT_FIRSTINT = TMT_MINCOLORDEPTH; - TMT_LASTINT = TMT_MINCOLORDEPTH; -// {$ENDIF BCB} - -// theme metrics: strings - TMT_CSSNAME = 1401; - TMT_XMLNAME = 1402; - -// TODO -// {$IFNDEF BCB} - TMT_FIRSTSTRING = TMT_CSSNAME; - TMT_LASTSTRING = TMT_XMLNAME; -// {$ENDIF BCB} - -// theme metrics: colors - TMT_SCROLLBAR = 1601; - TMT_BACKGROUND = 1602; - TMT_ACTIVECAPTION = 1603; - TMT_INACTIVECAPTION = 1604; - TMT_MENU = 1605; - TMT_WINDOW = 1606; - TMT_WINDOWFRAME = 1607; - TMT_MENUTEXT = 1608; - TMT_WINDOWTEXT = 1609; - TMT_CAPTIONTEXT = 1610; - TMT_ACTIVEBORDER = 1611; - TMT_INACTIVEBORDER = 1612; - TMT_APPWORKSPACE = 1613; - TMT_HIGHLIGHT = 1614; - TMT_HIGHLIGHTTEXT = 1615; - TMT_BTNFACE = 1616; - TMT_BTNSHADOW = 1617; - TMT_GRAYTEXT = 1618; - TMT_BTNTEXT = 1619; - TMT_INACTIVECAPTIONTEXT = 1620; - TMT_BTNHIGHLIGHT = 1621; - TMT_DKSHADOW3D = 1622; - TMT_LIGHT3D = 1623; - TMT_INFOTEXT = 1624; - TMT_INFOBK = 1625; - TMT_BUTTONALTERNATEFACE = 1626; - TMT_HOTTRACKING = 1627; - TMT_GRADIENTACTIVECAPTION = 1628; - TMT_GRADIENTINACTIVECAPTION = 1629; - TMT_MENUHILIGHT = 1630; - TMT_MENUBAR = 1631; - -// TODO -// {$IFNDEF BCB} - TMT_FIRSTCOLOR = TMT_SCROLLBAR; - TMT_LASTCOLOR = TMT_MENUBAR; -// {$ENDIF BCB} - -// hue substitutions - TMT_FROMHUE1 = 1801; - TMT_FROMHUE2 = 1802; - TMT_FROMHUE3 = 1803; - TMT_FROMHUE4 = 1804; - TMT_FROMHUE5 = 1805; - TMT_TOHUE1 = 1806; - TMT_TOHUE2 = 1807; - TMT_TOHUE3 = 1808; - TMT_TOHUE4 = 1809; - TMT_TOHUE5 = 1810; - -// color substitutions - TMT_FROMCOLOR1 = 2001; - TMT_FROMCOLOR2 = 2002; - TMT_FROMCOLOR3 = 2003; - TMT_FROMCOLOR4 = 2004; - TMT_FROMCOLOR5 = 2005; - TMT_TOCOLOR1 = 2006; - TMT_TOCOLOR2 = 2007; - TMT_TOCOLOR3 = 2008; - TMT_TOCOLOR4 = 2009; - TMT_TOCOLOR5 = 2010; - -// rendering BOOL properties - TMT_TRANSPARENT = 2201; - TMT_AUTOSIZE = 2202; - TMT_BORDERONLY = 2203; - TMT_COMPOSITED = 2204; - TMT_BGFILL = 2205; - TMT_GLYPHTRANSPARENT = 2206; - TMT_GLYPHONLY = 2207; - TMT_ALWAYSSHOWSIZINGBAR = 2208; - TMT_MIRRORIMAGE = 2209; - TMT_UNIFORMSIZING = 2210; - TMT_INTEGRALSIZING = 2211; - TMT_SOURCEGROW = 2212; - TMT_SOURCESHRINK = 2213; - -// rendering INT properties - TMT_IMAGECOUNT = 2401; - TMT_ALPHALEVEL = 2402; - TMT_BORDERSIZE = 2403; - TMT_ROUNDCORNERWIDTH = 2404; - TMT_ROUNDCORNERHEIGHT = 2405; - TMT_GRADIENTRATIO1 = 2406; - TMT_GRADIENTRATIO2 = 2407; - TMT_GRADIENTRATIO3 = 2408; - TMT_GRADIENTRATIO4 = 2409; - TMT_GRADIENTRATIO5 = 2410; - TMT_PROGRESSCHUNKSIZE = 2411; - TMT_PROGRESSSPACESIZE = 2412; - TMT_SATURATION = 2413; - TMT_TEXTBORDERSIZE = 2414; - TMT_ALPHATHRESHOLD = 2415; - TMT_WIDTH = 2416; - TMT_HEIGHT = 2417; - TMT_GLYPHINDEX = 2418; - TMT_TRUESIZESTRETCHMARK = 2419; - TMT_MINDPI1 = 2420; - TMT_MINDPI2 = 2421; - TMT_MINDPI3 = 2422; - TMT_MINDPI4 = 2423; - TMT_MINDPI5 = 2424; - -// rendering FONT properties - TMT_GLYPHFONT = 2601; - -// rendering INTLIST properties -// start with 2801 (from smallest to largest) - -// rendering FILENAME properties - TMT_IMAGEFILE = 3001; - TMT_IMAGEFILE1 = 3002; - TMT_IMAGEFILE2 = 3003; - TMT_IMAGEFILE3 = 3004; - TMT_IMAGEFILE4 = 3005; - TMT_IMAGEFILE5 = 3006; - TMT_STOCKIMAGEFILE = 3007; - TMT_GLYPHIMAGEFILE = 3008; - -// rendering STRING properties - TMT_TEXT = 3201; - -// rendering POSITION (x and y values) properties - TMT_OFFSET = 3401; - TMT_TEXTSHADOWOFFSET = 3402; - TMT_MINSIZE = 3403; - TMT_MINSIZE1 = 3404; - TMT_MINSIZE2 = 3405; - TMT_MINSIZE3 = 3406; - TMT_MINSIZE4 = 3407; - TMT_MINSIZE5 = 3408; - TMT_NORMALSIZE = 3409; - -// rendering MARGIN properties - TMT_SIZINGMARGINS = 3601; - TMT_CONTENTMARGINS = 3602; - TMT_CAPTIONMARGINS = 3603; - -// rendering COLOR properties - TMT_BORDERCOLOR = 3801; - TMT_FILLCOLOR = 3802; - TMT_TEXTCOLOR = 3803; - TMT_EDGELIGHTCOLOR = 3804; - TMT_EDGEHIGHLIGHTCOLOR = 3805; - TMT_EDGESHADOWCOLOR = 3806; - TMT_EDGEDKSHADOWCOLOR = 3807; - TMT_EDGEFILLCOLOR = 3808; - TMT_TRANSPARENTCOLOR = 3809; - TMT_GRADIENTCOLOR1 = 3810; - TMT_GRADIENTCOLOR2 = 3811; - TMT_GRADIENTCOLOR3 = 3812; - TMT_GRADIENTCOLOR4 = 3813; - TMT_GRADIENTCOLOR5 = 3814; - TMT_SHADOWCOLOR = 3815; - TMT_GLOWCOLOR = 3816; - TMT_TEXTBORDERCOLOR = 3817; - TMT_TEXTSHADOWCOLOR = 3818; - TMT_GLYPHTEXTCOLOR = 3819; - TMT_GLYPHTRANSPARENTCOLOR = 3820; - TMT_FILLCOLORHINT = 3821; - TMT_BORDERCOLORHINT = 3822; - TMT_ACCENTCOLORHINT = 3823; - -// rendering enum properties (must be declared in TM_ENUM section above) - TMT_BGTYPE = 4001; - TMT_BORDERTYPE = 4002; - TMT_FILLTYPE = 4003; - TMT_SIZINGTYPE = 4004; - TMT_HALIGN = 4005; - TMT_CONTENTALIGNMENT = 4006; - TMT_VALIGN = 4007; - TMT_OFFSETTYPE = 4008; - TMT_ICONEFFECT = 4009; - TMT_TEXTSHADOWTYPE = 4010; - TMT_IMAGELAYOUT = 4011; - TMT_GLYPHTYPE = 4012; - TMT_IMAGESELECTTYPE = 4013; - TMT_GLYPHFONTSIZINGTYPE = 4014; - TMT_TRUESIZESCALINGTYPE = 4015; - -// custom properties (used only by controls/shell) - TMT_USERPICTURE = 5001; - TMT_DEFAULTPANESIZE = 5002; - TMT_BLENDCOLOR = 5003; - -// DrawThemeText() flags - DTT_GRAYED = $1; - -// HitTestThemeBackground(), HitTestThemeBackgroundRegion() flags - HTTB_BACKGROUNDSEG = $0; - -// Fixed border hit test option - HTTB_FIXEDBORDER = $2; - -// Caption hit test option - HTTB_CAPTION = $4; - -// Resizing border hit test flags - HTTB_RESIZINGBORDER_LEFT = $10; - HTTB_RESIZINGBORDER_TOP = $20; - HTTB_RESIZINGBORDER_RIGHT = $40; - HTTB_RESIZINGBORDER_BOTTOM = $80; - HTTB_RESIZINGBORDER = HTTB_RESIZINGBORDER_LEFT or HTTB_RESIZINGBORDER_TOP or - HTTB_RESIZINGBORDER_RIGHT or HTTB_RESIZINGBORDER_BOTTOM; - HTTB_SIZINGTEMPLATE = $100; - HTTB_SYSTEMSIZINGMARGINS = $200; - -(*// DrawThemeLine() flags - DTL_LEFT = $1; - DTL_TOP = $2; - DTL_RIGHT = $4; - DTL_BOTTOM = $8;*) - - ETDT_DISABLE = $1; - ETDT_ENABLE = $2; - ETDT_USETABTEXTURE = $4; - ETDT_ENABLETAB = ETDT_ENABLE or ETDT_USETABTEXTURE; - -// flags to control theming within an app - STAP_ALLOW_NONCLIENT = $1; - STAP_ALLOW_CONTROLS = $2; - STAP_ALLOW_WEBCONTENT = $4; - - SZ_THDOCPROP_DISPLAYNAME = 'DisplayName'; - SZ_THDOCPROP_CANONICALNAME = 'ThemeName'; - SZ_THDOCPROP_TOOLTIP = 'ToolTip'; - SZ_THDOCPROP_AUTHOR = 'author'; - - TS_MIN = 0; - TS_TRUE = 1; - TS_DRAW = 2; - -//vista extension - DTT_TEXTCOLOR = (1 shl 0); // crText has been specified - DTT_BORDERCOLOR = (1 shl 1); // crBorder has been specified - DTT_SHADOWCOLOR = (1 shl 2); // crShadow has been specified - DTT_SHADOWTYPE = (1 shl 3); // iTextShadowType has been specified - DTT_SHADOWOFFSET = (1 shl 4); // ptShadowOffset has been specified - DTT_BORDERSIZE = (1 shl 5); // iBorderSize has been specified - DTT_FONTPROP = (1 shl 6); // iFontPropId has been specified - DTT_COLORPROP = (1 shl 7); // iColorPropId has been specified - DTT_STATEID = (1 shl 8); // IStateId has been specified - DTT_CALCRECT = (1 shl 9); // Use pRect as and in/out parameter - DTT_APPLYOVERLAY = (1 shl 10); // fApplyOverlay has been specified - DTT_GLOWSIZE = (1 shl 11); // iGlowSize has been specified - DTT_CALLBACK = (1 shl 12); // pfnDrawTextCallback has been specified - DTT_COMPOSITED = (1 shl 13); // Draws text with antialiased alpha (needs a DIB section) - -implementation - -end. diff --git a/internal/x.46/XP Theme Manager/Sources/dxThemeManager.pas b/internal/x.46/XP Theme Manager/Sources/dxThemeManager.pas deleted file mode 100644 index 790210ff..00000000 --- a/internal/x.46/XP Theme Manager/Sources/dxThemeManager.pas +++ /dev/null @@ -1,380 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressXPThemeManager } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSXPTHEMEMANAGER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxThemeManager; - -{$I cxVer.inc} - -interface - -uses - Windows, Messages, SysUtils, Controls, Forms, dxUxTheme; - -type - TdxThemedObjectType = ( - totButton, - totClock, - totComboBox, - totEdit, - totExplorerBar, - totHeader, - totListBox, - totListView, - totMenu, - totPage, - totProgress, - totRebar, - totScrollBar, - totSpin, - totStartPanel, - totStatus, - totTab, - totTaskBand, - totTaskBar, - totToolBar, - totToolTip, - totTrackBar, - totTrayNotify, - totTreeview, - totWindow - ); - - TdxThemedObjectTypes = set of TdxThemedObjectType; - - { TdxThemeChangedNotificator } - - TdxThemeChangedEvent = procedure of object; - - TdxThemeChangedNotificator = class - private - FOnThemeChanged: TdxThemeChangedEvent; - public - constructor Create; - destructor Destroy; override; - property OnThemeChanged: TdxThemeChangedEvent read FOnThemeChanged write FOnThemeChanged; - end; - -function AreVisualStylesAvailable(ANeededThemedObjectType: TdxThemedObjectType): Boolean; overload; -function AreVisualStylesAvailable(ANeededThemedObjectTypes: TdxThemedObjectTypes = []): Boolean; overload; -procedure CloseAllThemes; -function CloseTheme(AThemedObjectType: TdxThemedObjectType): HRESULT; -function IsStandardTheme: Boolean; -function OpenTheme(AThemedObjectType: TdxThemedObjectType; - APClassNameList: PWideChar = nil): TdxTheme; - -implementation - -uses - Classes, dxThemeConsts; - -type - TdxThemeData = record - Theme: TdxTheme; - ClassNameList: WideString; - end; - - { TdxThemeChangedEventReceiver } - - TdxThemeChangedEventReceiver = class - private - FWindowHandle: HWND; - procedure WndProc(var Msg: TMessage); - procedure WMThemeChanged(var Message: TMessage); message WM_THEMECHANGED; - public - constructor Create; - destructor Destroy; override; - end; - -const - dxThemedObjectNameA: array[TdxThemedObjectType] of WideString = ( - 'Button', - 'Clock', - 'ComboBox', - 'Edit', - 'ExplorerBar', - 'Header', - 'ListBox', - 'ListView', - 'Menu', - 'Page', - 'Progress', - 'Rebar', - 'ScrollBar', - 'Spin', - 'StartPanel', - 'Status', - 'Tab', - 'TaskBand', - 'TaskBar', - 'ToolBar', - 'ToolTip', - 'TrackBar', - 'TrayNotify', - 'TreeView', - 'Window' - ); - -var - FIsGlobalThemeActive: Boolean = False; - FThemeDataA: array[TdxThemedObjectType] of TdxThemeData; - FThemeChangedEventReceiver: TdxThemeChangedEventReceiver = nil; - FThemeChangedNotificatorList: TList; - -function AreVisualStylesAvailable(ANeededThemedObjectType: TdxThemedObjectType): Boolean; -begin - Result := FIsGlobalThemeActive and IsThemeLibraryLoaded and - (OpenTheme(ANeededThemedObjectType) <> TC_NONE); -end; - -function AreVisualStylesAvailable(ANeededThemedObjectTypes: TdxThemedObjectTypes = []): Boolean; -var - AThemedObjectType: TdxThemedObjectType; -begin - Result := FIsGlobalThemeActive and IsThemeLibraryLoaded; - if Result and (ANeededThemedObjectTypes <> []) then - for AThemedObjectType := Low(TdxThemedObjectType) to High(TdxThemedObjectType) do - if (AThemedObjectType in ANeededThemedObjectTypes) and (OpenTheme(AThemedObjectType) = TC_NONE) then - begin - Result := False; - Break; - end; -end; - -function CloseTheme(AThemedObjectType: TdxThemedObjectType): HRESULT; -var - ATheme: TdxTheme; -begin - Result := S_FALSE; - if not AreVisualStylesAvailable then Exit; - Result := S_OK; - ATheme := FThemeDataA[AThemedObjectType].Theme; - if ATheme <> 0 then - begin - Result := CloseThemeData(ATheme); - FThemeDataA[AThemedObjectType].Theme := 0; // TODO ??? - FThemeDataA[AThemedObjectType].ClassNameList := ''; // TODO ??? - end; -end; - -procedure CloseAllThemes; -var - ATheme: TdxTheme; - AThemedObjectType: TdxThemedObjectType; -begin - for AThemedObjectType := Low(TdxThemedObjectType) to High(TdxThemedObjectType) do - begin - ATheme := FThemeDataA[AThemedObjectType].Theme; - if ATheme <> 0 then - begin - CloseThemeData(ATheme); - FThemeDataA[AThemedObjectType].Theme := 0; - end; - end; -end; - -function IsStandardTheme: Boolean; -const - SZ_MAX_CHARS = 1024; - StandardThemeFileNames: array[0..1] of string = ('LUNA.MSSTYLES', 'ROYALE.MSSTYLES'); -var - AThemeFileName: PWideChar; - I: Integer; - S: string; -begin - Result := False; - if AreVisualStylesAvailable then - begin - AThemeFileName := AllocMem(2 * SZ_MAX_CHARS); - try - if GetCurrentThemeName(AThemeFileName, SZ_MAX_CHARS, nil, 0, nil, 0) = S_OK then - begin - S := UpperCase(ExtractFileName(AThemeFileName)); - for I := 0 to High(StandardThemeFileNames) do - begin - Result := S = StandardThemeFileNames[I]; - if Result then - Break; - end; - end; - finally - FreeMem(AThemeFileName); - end; - end; -end; - -function OpenTheme(AThemedObjectType: TdxThemedObjectType; - APClassNameList: PWideChar = nil): TdxTheme; - - function InternalCompareString(const S1, S2: TCaption): Boolean; - begin - Result := AnsiUpperCase(S1) = AnsiUpperCase(S2); - end; - -begin - Result := 0; - if not AreVisualStylesAvailable then Exit; - with FThemeDataA[AThemedObjectType] do - begin - if Theme <> 0 then - if (APClassNameList = nil) or - InternalCompareString(ClassNameList, APClassNameList) then - begin - Result := Theme; - Exit; - end - else - CloseTheme(AThemedObjectType); - - if APClassNameList = nil then - if Length(ClassNameList) = 0 then - APClassNameList := PWideChar(dxThemedObjectNameA[AThemedObjectType]) - else - APClassNameList := PWideChar(ClassNameList); - Result := OpenThemeData(0, APClassNameList); - if Result <> 0 then - begin - Theme := Result; - ClassNameList := WideString(APClassNameList); - end - else - ClassNameList := ''; // TODO - end; -end; - -{ TdxThemeChangedNotificator } - -constructor TdxThemeChangedNotificator.Create; -begin - inherited Create; - if IsThemeLibraryLoaded and (FThemeChangedNotificatorList <> nil) then - FThemeChangedNotificatorList.Add(Self); -end; - -destructor TdxThemeChangedNotificator.Destroy; -begin - if IsThemeLibraryLoaded and (FThemeChangedNotificatorList <> nil) then - FThemeChangedNotificatorList.Remove(Self); - inherited Destroy; -end; - -{ TdxThemeChangedEventReceiver } - -constructor TdxThemeChangedEventReceiver.Create; -begin - inherited Create; -{$IFDEF DELPHI6} - FWindowHandle := Classes.AllocateHWnd(WndProc); -{$ELSE} - FWindowHandle := Forms.AllocateHWnd(WndProc); -{$ENDIF} -end; - -destructor TdxThemeChangedEventReceiver.Destroy; -begin - FIsGlobalThemeActive := False; -{$IFDEF DELPHI6} - Classes.DeallocateHWnd(FWindowHandle); -{$ELSE} - Forms.DeallocateHWnd(FWindowHandle); -{$ENDIF} - inherited Destroy; -end; - -procedure TdxThemeChangedEventReceiver.WndProc(var Msg: TMessage); -var - I: Integer; -begin - with Msg do - if Msg = WM_THEMECHANGED then - try - CloseAllThemes; - DefWindowProc(FWindowHandle, Msg, wParam, lParam); - FIsGlobalThemeActive := IsThemeActive; - Result := 0; - if FThemeChangedNotificatorList <> nil then - for I := 0 to FThemeChangedNotificatorList.Count - 1 do - with TdxThemeChangedNotificator(FThemeChangedNotificatorList[I]) do - if Assigned(FOnThemeChanged) then - FOnThemeChanged; - except - Application.HandleException(Self); - end - else - Result := DefWindowProc(FWindowHandle, Msg, wParam, lParam); -end; - -procedure TdxThemeChangedEventReceiver.WMThemeChanged(var Message: TMessage); -var - I: Integer; -begin - CloseAllThemes; - inherited; - FIsGlobalThemeActive := IsThemeActive; - Message.Result := 0; - if FThemeChangedNotificatorList <> nil then - for I := 0 to FThemeChangedNotificatorList.Count - 1 do - with TdxThemeChangedNotificator(FThemeChangedNotificatorList[I]) do - if Assigned(FOnThemeChanged) then - FOnThemeChanged; -end; - -{$IFNDEF DELPHI5} -procedure FreeAndNil(var Obj); -var - Temp: TObject; -begin - Temp := TObject(Obj); - Pointer(Obj) := nil; - Temp.Free; -end; -{$ENDIF} - -initialization - if IsThemeLibraryLoaded then - begin - FIsGlobalThemeActive := IsThemeActive; - FThemeChangedEventReceiver := TdxThemeChangedEventReceiver.Create; - FThemeChangedNotificatorList := TList.Create; - end; - -finalization - if IsThemeLibraryLoaded then - begin - FreeAndNil(FThemeChangedEventReceiver); - CloseAllThemes; - FreeAndNil(FThemeChangedNotificatorList); - end; - -end. diff --git a/internal/x.46/XP Theme Manager/Sources/dxUxTheme.pas b/internal/x.46/XP Theme Manager/Sources/dxUxTheme.pas deleted file mode 100644 index 2a5f3fc0..00000000 --- a/internal/x.46/XP Theme Manager/Sources/dxUxTheme.pas +++ /dev/null @@ -1,873 +0,0 @@ - -{********************************************************************} -{ } -{ Developer Express Visual Component Library } -{ ExpressXPThemeManager } -{ } -{ Copyright (c) 1998-2009 Developer Express Inc. } -{ ALL RIGHTS RESERVED } -{ } -{ The entire contents of this file is protected by U.S. and } -{ International Copyright Laws. Unauthorized reproduction, } -{ reverse-engineering, and distribution of all or any portion of } -{ the code contained in this file is strictly prohibited and may } -{ result in severe civil and criminal penalties and will be } -{ prosecuted to the maximum extent possible under the law. } -{ } -{ RESTRICTIONS } -{ } -{ THIS SOURCE CODE AND ALL RESULTING INTERMEDIATE FILES } -{ (DCU, OBJ, DLL, ETC.) ARE CONFIDENTIAL AND PROPRIETARY TRADE } -{ SECRETS OF DEVELOPER EXPRESS INC. THE REGISTERED DEVELOPER IS } -{ LICENSED TO DISTRIBUTE THE EXPRESSXPTHEMEMANAGER AND ALL } -{ ACCOMPANYING VCL CONTROLS AS PART OF AN EXECUTABLE PROGRAM ONLY. } -{ } -{ THE SOURCE CODE CONTAINED WITHIN THIS FILE AND ALL RELATED } -{ FILES OR ANY PORTION OF ITS CONTENTS SHALL AT NO TIME BE } -{ COPIED, TRANSFERRED, SOLD, DISTRIBUTED, OR OTHERWISE MADE } -{ AVAILABLE TO OTHER INDIVIDUALS WITHOUT EXPRESS WRITTEN CONSENT } -{ AND PERMISSION FROM DEVELOPER EXPRESS INC. } -{ } -{ CONSULT THE END USER LICENSE AGREEMENT FOR INFORMATION ON } -{ ADDITIONAL RESTRICTIONS. } -{ } -{********************************************************************} - -unit dxUxTheme; - -{$I cxVer.inc} - -interface - -uses -{$IFDEF DELPHI6} - Types, -{$ENDIF} - Windows, Classes, CommCtrl; - -const - dxMaxIntListCount = 10; - -{$IFDEF CBUILDER11} - {$EXTERNALSYM BPBF_COMPATIBLEBITMAP} -{$ENDIF} - BPBF_COMPATIBLEBITMAP = 0; // Compatible bitmap -{$IFDEF CBUILDER11} - {$EXTERNALSYM BPBF_DIB} -{$ENDIF} - BPBF_DIB = 1; // Device-independent bitmap -{$IFDEF CBUILDER11} - {$EXTERNALSYM BPBF_TOPDOWNDIB} -{$ENDIF} - BPBF_TOPDOWNDIB = 2; // Top-down device-independent bitmap -{$IFDEF CBUILDER11} - {$EXTERNALSYM BPBF_TOPDOWNMONODIB} -{$ENDIF} - BPBF_TOPDOWNMONODIB = 3; // Top-down monochrome device-independent bitmap -{$IFDEF CBUILDER11} - {$EXTERNALSYM BPBF_COMPOSITED} -{$ENDIF} - BPBF_COMPOSITED = BPBF_TOPDOWNDIB; - -type - TdxTheme = THandle; - - TdxThemeSize = Integer; - - TdxMargins = packed record - cxLeftWidth: Integer; - cxRightWidth: Integer; - cyTopHeight: Integer; - cyBottomHeight: Integer; - end; - - PdxMargins = ^TdxMargins; - - TdxIntList = packed record - iValueCount: Integer; - iValues: array[0..dxMaxIntListCount - 1] of Integer; - end; - PdxIntList = ^TdxIntList; - - TdxPropertyOrigin = (PO_STATE, PO_PART, PO_CLASS, PO_GLOBAL, PO_NOTFOUND); - -// vista extention - TdxPaintBuffer = THandle; - - TdxDTTOpts = packed record - dwSize: DWORD; - dwFlags: DWORD; - crText: COLORREF; - crBorder: COLORREF; - crShadow: COLORREF; - iTextShadowType: Integer; - ptShadowOffset: TPoint; - iBorderSize: Integer; - iFontPropId: Integer; - iColorPropId: Integer; - iStateId: Integer; - fApplyOverlay: BOOL; - iGlowSize: Integer; - pfnDrawTextCallback: DWORD; - lParam: LPARAM; - end; - PdxDTTOpts = ^TdxDTTOpts; - -function OpenThemeData(hWnd: HWND; pszClassList: PWideChar): TdxTheme; -function CloseThemeData(hTheme: TdxTheme): HRESULT; - -// functions for basic drawing support -function DrawThemeBackground(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pRect: PRect; pClipRect: PRect = nil): HRESULT; overload; -function DrawThemeBackground(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const pRect: TRect; pClipRect: PRect = nil): HRESULT; overload; -function DrawThemeBackground(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const pRect: TRect; const pClipRect: TRect): HRESULT; overload; - -function DrawThemeText(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pszText: PWideChar; iCharCount: Integer; dwTextFlags, dwTextFlags2: DWORD; - pRect: PRect): HRESULT; overload; -function DrawThemeText(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pszText: string; iCharCount: Integer; dwTextFlags, dwTextFlags2: DWORD; - const pRect: TRect): HRESULT; overload; - -function DrawThemeTextEx(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const pszText: WideString; iCharCount: Integer; dwTextFlags: DWORD; - const pRect: TRect; const pOptions: TdxDTTOpts): HRESULT; - -function GetThemeBackgroundContentRect(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const BoundingRect: TRect; out ContentRect: TRect): HRESULT; - -function GetThemeBackgroundExtent(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pContentRect: PRect; - out ExtentRect: TRect): HRESULT; - -function GetThemePartSize(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - prc: PRect; eSize: TdxThemeSize; psz: PSize): HRESULT; overload; -function GetThemePartSize(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const prc: TRect; eSize: TdxThemeSize; out psz: TSize): HRESULT; overload; -function GetThemePartSize(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - eSize: TdxThemeSize; out psz: TSize): HRESULT; overload; - -function GetThemeTextExtent(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pszTextL: PWideChar; iCharCount: Integer; dwTextFlags: DWORD; - pBoundingRect: PRect; out ExtentRect: TRect): HRESULT; -function GetThemeTextMetrics(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - out tm: TEXTMETRIC): HRESULT; -function GetThemeBackgroundRegion(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pRect: PRect; out Region: HRGN): HRESULT; -function HitTestThemeBackground(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - dwOptions: DWORD; pRect: PRect; - hRgn: HRGN; ptTest: TPoint; out wHitTestCode: WORD): HRESULT; - -function DrawThemeEdge(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pDestRect: PRect; uEdge, uFlags: UINT; pContentRect: PRect): HRESULT; overload; -function DrawThemeEdge(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const pDestRect: TRect; uEdge, uFlags: UINT; out pContentRect: TRect): HRESULT; overload; -function DrawThemeEdge(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const pDestRect: TRect; uEdge, uFlags: UINT): HRESULT; overload; - -function DrawThemeIcon(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pRect: PRect; himl: HIMAGELIST; iImageIndex: Integer): HRESULT; -function IsThemePartDefined(hTheme: TdxTheme; iPartId, iStateId: Integer): BOOL; -function IsThemeBackgroundPartiallyTransparent(hTheme: TdxTheme; - iPartId, iStateId: Integer): BOOL; -function DrawThemeParentBackground(hWnd: HWND; DC: HDC; const prc: TRect): HRESULT; - -// lower-level theme information services -function GetThemeColor(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Color: TColorRef): HRESULT; -function GetThemeMetric(hTheme: TdxTheme; DC: HDC; iPartId, iStateId, iPropId: Integer; - out iVal: Integer): HRESULT; -function GetThemeString(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - pszBuff: PWideChar; cchMaxBuffChars: Integer): HRESULT; -function GetThemeBool(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out fVal{???}: BOOL): HRESULT; // TODO -function GetThemeInt(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out iVal: Integer): HRESULT; -function GetThemeEnumValue(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out iVal: Integer): HRESULT; -function GetThemePosition(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Point: TPoint): HRESULT; -function GetThemeFont(hTheme: TdxTheme; DC: HDC; iPartId, iStateId, iPropId: Integer; - out Font: LOGFONTW): HRESULT; -function GetThemeRect(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Rect: TRect): HRESULT; -function GetThemeMargins(hTheme: TdxTheme; DC: HDC; iPartId, iStateId, iPropId: Integer; - prc: PRect; out Margins: TdxMargins): HRESULT; -function GetThemeIntList(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out IntList: TdxIntList): HRESULT; -function GetThemePropertyOrigin(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Origin: TdxPropertyOrigin): HRESULT; -function SetWindowTheme(hWnd: HWND; pszSubAppName, pszSubIdList: - PWideChar): HRESULT; -function GetThemeFilename(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - pszThemeFileName: PWideChar; cchMaxBuffChars: Integer): HRESULT; -function GetThemeSysColor(hTheme: TdxTheme; iColorId: Integer): COLORREF; -function GetThemeSysColorBrush(hTheme: TdxTheme; iColorId: Integer): HBRUSH; -function GetThemeSysBool(hTheme: TdxTheme; iBoolId: Integer): BOOL; -function GetThemeSysSize(hTheme: TdxTheme; iSizeId: Integer): Integer; -function GetThemeSysFont(hTheme: TdxTheme; iFontId: Integer; out lf: LOGFONTW): HRESULT; -function GetThemeSysString(hTheme: TdxTheme; iStringId: Integer; pszStringBuff: - PWideChar; cchMaxStringChars: Integer): HRESULT; -function GetThemeSysInt(hTheme: TdxTheme; iIntId: Integer; var iValue: Integer): HRESULT; // TODO var -> out ??? - -function IsThemeActive: BOOL; -function IsAppThemed: BOOL; -function GetWindowTheme(hWnd: HWND): TdxTheme; -function EnableThemeDialogTexture(hWnd: HWND; dwFlags: DWORD): HRESULT; -function IsThemeDialogTextureEnabled(hWnd: HWND): BOOL; -function GetThemeAppProperties: DWORD; -procedure SetThemeAppProperties(dwFlags: DWORD); -function GetCurrentThemeName(pszThemeFileName: PWideChar; - cchMaxNameChars: Integer; pszColorBuff: PWideChar; - cchMaxColorChars: Integer; pszSizeBuff: PWideChar; - cchMaxSizeChars: Integer): HRESULT; -function GetThemeDocumentationProperty( - pszThemeName, pszPropertyName, pszValueBuff: PWideChar; - cchMaxValChars: Integer): HRESULT; - -//vista extention -type - TdxBPPaintParams = packed record - cbSize: DWORD; - dwFlags: DWORD; // BPPF_ flags - prcExclude: PRect; - pBlendFunction: Pointer; - end; - PdxBPPaintParams = ^TdxBPPaintParams; - -function BufferedPaintInit: HRESULT; -function BufferedPaintUnInit: HRESULT; -function BeginBufferedPaint(hdcTarget: HDC; prcTarget: PRect; - dwFormat: DWORD; pPaintParams: PdxBPPaintParams; out dc: HDC): TdxPaintBuffer; -function EndBufferedPaint(hBufferedPaint: TdxPaintBuffer; fUpdateTarget: BOOL): HRESULT; -function BufferedPaintSetAlpha(hBufferedPaint: TdxPaintBuffer; prc: PRect; alpha: Byte): HRESULT; - -function IsThemeLibraryLoaded: Boolean; - -implementation - -uses - ComCtrls; - -const - ThemeLibraryName = 'UxTheme.dll'; - -type - TCloseThemeData = function(hTheme: TdxTheme): HRESULT; stdcall; - TDrawThemeBackground = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pRect: PRect; pClipRect: PRect = nil): HRESULT; stdcall; - TDrawThemeEdge = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pDestRect: PRect; uEdge, uFlags: UINT; pContentRect: PRect): HRESULT; stdcall; - TDrawThemeIcon = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pRect: PRect; himl: HIMAGELIST; iImageIndex: Integer): HRESULT; stdcall; - TDrawThemeParentBackground = function(hWnd: HWND; DC: HDC; const prc: TRect): HRESULT; stdcall; - TDrawThemeText = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pszText: PWideChar; iCharCount: Integer; dwTextFlags, dwTextFlags2: DWORD; - pRect: PRect): HRESULT; stdcall; - TDrawThemeTextEx = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const pszText: WideString; iCharCount: Integer; dwTextFlags: DWORD; - pRect: PRect; const pOptions: TdxDTTOpts): HRESULT; stdcall; - TEnableThemeDialogTexture = function(hWnd: HWND; dwFlags: DWORD): HRESULT; stdcall; - TGetCurrentThemeName = function(pszThemeFileName: PWideChar; cchMaxNameChars: Integer; - pszColorBuff: PWideChar; cchMaxColorChars: Integer; pszSizeBuff: PWideChar; - cchMaxSizeChars: Integer): HRESULT; stdcall; - TGetThemeAppProperties = function: DWORD; stdcall; - TGetThemeBackgroundContentRect = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const BoundingRect: TRect; out ContentRect: TRect): HRESULT; stdcall; - TGetThemeBackgroundRegion = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pRect: PRect; out Region: HRGN): HRESULT; stdcall; - TGetThemeBackgroundExtent = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pContentRect: PRect; out ExtentRect: TRect): HRESULT; stdcall; - TGetThemeBool = function(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out fVal: BOOL): HRESULT; stdcall; - TGetThemeColor = function(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Color: TColorRef): HRESULT; stdcall; - TGetThemeDocumentationProperty = function(pszThemeName, pszPropertyName, pszValueBuff: PWideChar; - cchMaxValChars: Integer): HRESULT; stdcall; - TGetThemeEnumValue = function(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out iVal: Integer): HRESULT; stdcall; - TGetThemeFilename = function(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - pszThemeFileName: PWideChar; cchMaxBuffChars: Integer): HRESULT; stdcall; - TGetThemeFont = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId, iPropId: Integer; - out pFont: LOGFONTW): HRESULT; stdcall; - TGetThemeInt = function(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out iVal: Integer): HRESULT; stdcall; - TGetThemeIntList = function(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out IntList: TdxIntList): HRESULT; stdcall; - TGetThemeMargins = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId, iPropId: Integer; - prc: PRect; out Margins: TdxMargins): HRESULT; stdcall; - TGetThemeMetric = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId, iPropId: Integer; - out iVal: Integer): HRESULT; stdcall; - TGetThemePartSize = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - prc: PRect; eSize: TdxThemeSize; psz: PSize): HRESULT; stdcall; - TGetThemePosition = function(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Point: TPoint): HRESULT; stdcall; - TGetThemePropertyOrigin = function(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Origin: TdxPropertyOrigin): HRESULT; stdcall; - TGetThemeRect = function(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Rect: TRect): HRESULT; stdcall; - TGetThemeString = function(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - pszBuff: PWideChar; cchMaxBuffChars: Integer): HRESULT; stdcall; - TGetThemeSysBool = function(hTheme: TdxTheme; iBoolId: Integer): BOOL; stdcall; - TGetThemeSysColor = function(hTheme: TdxTheme; iColorId: Integer): COLORREF; stdcall; - TGetThemeSysColorBrush = function(hTheme: TdxTheme; iColorId: Integer): HBRUSH; stdcall; - TGetThemeSysFont = function(hTheme: TdxTheme; iFontId: Integer; out lf: LOGFONTW): HRESULT; stdcall; - TGetThemeSysInt = function(hTheme: TdxTheme; iIntId: Integer; var iValue: Integer): HRESULT; stdcall; - TGetThemeSysSize = function(hTheme: TdxTheme; iSizeId: Integer): Integer; stdcall; - TGetThemeSysString = function(hTheme: TdxTheme; iStringId: Integer; pszStringBuff: PWideChar; - cchMaxStringChars: Integer): HRESULT; stdcall; - TGetThemeTextExtent = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pszTextL: PWideChar; iCharCount: Integer; dwTextFlags: DWORD; - pBoundingRect: PRect; out ExtentRect: TRect): HRESULT; stdcall; - TGetThemeTextMetrics = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - out tm: TEXTMETRIC): HRESULT; stdcall; - TGetWindowTheme = function(hWnd: HWND): TdxTheme;stdcall; - THitTestThemeBackground = function(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - dwOptions: DWORD; pRect : PRect; hRgn: HRGN; ptTest: TPoint; - out wHitTestCode: WORD): HRESULT; stdcall; - TIsAppThemed = function: BOOL; stdcall; - TIsThemeActive = function: BOOL; stdcall; - TIsThemePartDefined = function(hTheme: TdxTheme; iPartId, iStateId: Integer): BOOL; stdcall; - TIsThemeBackgroundPartiallyTransparent = function(hTheme: TdxTheme; - iPartId, iStateId: Integer): BOOL; stdcall; - TIsThemeDialogTextureEnabled = function(hWnd: HWND): BOOL; stdcall; - TOpenThemeData = function(hWnd: HWND; pszClassList: PWideChar): TdxTheme; stdcall; - TSetThemeAppProperties = procedure(dwFlags: DWORD); stdcall; - TSetWindowTheme = function(hWnd: HWND; pszSubAppName, pszSubIdList: PWideChar): HRESULT; stdcall; - //vista extention - TBufferedPaintInit = function: HRESULT; stdcall; - TBufferedPaintUnInit = function: HRESULT; stdcall; - TBeginBufferedPaint = function(hdcTarget: HDC; prcTarget: PRect; - dwFormat: DWORD; pPaintParams: PdxBPPaintParams; var dc: HDC): TdxPaintBuffer; stdcall; - TEndBufferedPaint = function(hBufferedPaint: TdxPaintBuffer; fUpdateTarget: BOOL): HRESULT; stdcall; - TBufferedPaintSetAlpha = function(hBufferedPaint: TdxPaintBuffer; prc: PRect; alpha: Byte): HRESULT; stdcall; - - TThemeLibraryMethodPointersKeeper = record - FCloseThemeData: TCloseThemeData; - FDrawThemeBackground: TDrawThemeBackground; - FDrawThemeEdge: TDrawThemeEdge; - FDrawThemeIcon: TDrawThemeIcon; - FDrawThemeParentBackground: TDrawThemeParentBackground; - FDrawThemeText: TDrawThemeText; - FDrawThemeTextEx: TDrawThemeTextEx; - FEnableThemeDialogTexture: TEnableThemeDialogTexture; - FGetCurrentThemeName: TGetCurrentThemeName; - FGetThemeAppProperties: TGetThemeAppProperties; - FGetThemeBackgroundContentRect: TGetThemeBackgroundContentRect; - FGetThemeBackgroundRegion: TGetThemeBackgroundRegion; - FGetThemeBackgroundExtent: TGetThemeBackgroundExtent; - FGetThemeBool: TGetThemeBool; - FGetThemeColor: TGetThemeColor; - FGetThemeDocumentationProperty: TGetThemeDocumentationProperty; - FGetThemeEnumValue: TGetThemeEnumValue; - FGetThemeFilename: TGetThemeFilename; - FGetThemeFont: TGetThemeFont; - FGetThemeInt: TGetThemeInt; - FGetThemeIntList: TGetThemeIntList; - FGetThemeMargins: TGetThemeMargins; - FGetThemeMetric: TGetThemeMetric; - FGetThemePartSize: TGetThemePartSize; - FGetThemePosition: TGetThemePosition; - FGetThemePropertyOrigin: TGetThemePropertyOrigin; - FGetThemeRect: TGetThemeRect; - FGetThemeString: TGetThemeString; - FGetThemeSysBool: TGetThemeSysBool; - FGetThemeSysColor: TGetThemeSysColor; - FGetThemeSysColorBrush: TGetThemeSysColorBrush; - FGetThemeSysFont: TGetThemeSysFont; - FGetThemeSysInt: TGetThemeSysInt; - FGetThemeSysSize: TGetThemeSysSize; - FGetThemeSysString: TGetThemeSysString; - FGetThemeTextExtent: TGetThemeTextExtent; - FGetThemeTextMetrics: TGetThemeTextMetrics; - FGetWindowTheme: TGetWindowTheme; - FHitTestThemeBackground: THitTestThemeBackground; - FIsAppThemed: TIsAppThemed; - FIsThemeActive: TIsThemeActive; - FIsThemePartDefined: TIsThemePartDefined; - FIsThemeBackgroundPartiallyTransparent: TIsThemeBackgroundPartiallyTransparent; - FIsThemeDialogTextureEnabled: TIsThemeDialogTextureEnabled; - FOpenThemeData: TOpenThemeData; - FSetThemeAppProperties: TSetThemeAppProperties; - FSetWindowTheme: TSetWindowTheme; - //vista extention - FBufferedPaintInit: TBufferedPaintInit; - FBufferedPaintUnInit: TBufferedPaintUnInit; - FBeginBufferedPaint: TBeginBufferedPaint; - FEndBufferedPaint: TEndBufferedPaint; - FBufferedPaintSetAlpha: TBufferedPaintSetAlpha; - end; - -var - FThemeLibrary: HMODULE = 0; - FThemeLibraryMethodPointersKeeper: TThemeLibraryMethodPointersKeeper; - -function OpenThemeData(hWnd: HWND; pszClassList: PWideChar): TdxTheme; -begin - Result := FThemeLibraryMethodPointersKeeper.FOpenThemeData(hWnd, pszClassList); -end; - -function CloseThemeData(hTheme: TdxTheme): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FCloseThemeData(hTheme); -end; - -function DrawThemeBackground(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pRect: PRect; pClipRect: PRect = nil -): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FDrawThemeBackground(hTheme, DC, - iPartId, iStateId, pRect, pClipRect); -end; -function DrawThemeBackground(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const pRect: TRect; pClipRect: PRect = nil): HRESULT; -begin - Result := DrawThemeBackground(hTheme, DC, iPartId, iStateId, @pRect, pClipRect); -end; - -function DrawThemeBackground(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const pRect: TRect; const pClipRect: TRect): HRESULT; -begin - Result := DrawThemeBackground(hTheme, DC, iPartId, iStateId, @pRect, @pClipRect); -end; - -function DrawThemeText(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pszText: PWideChar; - iCharCount: Integer; dwTextFlags, dwTextFlags2: DWORD; - pRect: PRect): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FDrawThemeText(hTheme, DC, iPartId, iStateId, - pszText, iCharCount, dwTextFlags, dwTextFlags2, pRect); -end; - -function DrawThemeText(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pszText: string; iCharCount: Integer; dwTextFlags, dwTextFlags2: DWORD; - const pRect: TRect): HRESULT; -begin - Result := DrawThemeText(hTheme, DC, iPartId, iStateId, - PWideChar(WideString(pszText)), iCharCount, dwTextFlags, dwTextFlags2, @pRect); -end; - -//vista extention -function DrawThemeTextEx(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const pszText: WideString; iCharCount: Integer; dwTextFlags: DWORD; - const pRect: TRect; const pOptions: TdxDTTOpts): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FDrawThemeTextEx(hTheme, DC, iPartId, iStateId, - PWideChar(pszText), iCharCount, dwTextFlags, @pRect, pOptions); -end; - -function GetThemeBackgroundContentRect(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const BoundingRect: TRect; out ContentRect: TRect): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeBackgroundContentRect(hTheme, - DC, iPartId, iStateId, BoundingRect, ContentRect); -end; - -function GetThemeBackgroundExtent(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pContentRect: PRect; - out ExtentRect: TRect): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeBackgroundExtent(hTheme, DC, - iPartId, iStateId, pContentRect, ExtentRect); -end; - -function GetThemePartSize(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - prc: PRect; eSize: TdxThemeSize; - psz: PSize): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemePartSize(hTheme, DC, iPartId, - iStateId, prc, eSize, psz); -end; - -function GetThemePartSize(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const prc: TRect; eSize: TdxThemeSize; out psz: TSize): HRESULT; -begin - Result := GetThemePartSize(hTheme, DC, iPartId, iStateId, @prc, eSize, @psz); -end; - -function GetThemePartSize(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - eSize: TdxThemeSize; out psz: TSize): HRESULT; -begin - Result := GetThemePartSize(hTheme, DC, iPartId, iStateId, nil, eSize, @psz); -end; - -function GetThemeTextExtent(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pszTextL: PWideChar; iCharCount: Integer; dwTextFlags: DWORD; - pBoundingRect: PRect; out ExtentRect: TRect): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeTextExtent(hTheme, DC, iPartId, - iStateId, pszTextL, iCharCount, dwTextFlags, pBoundingRect, ExtentRect); -end; - -function GetThemeTextMetrics(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - out tm: TEXTMETRIC): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeTextMetrics(hTheme, DC, iPartId, - iStateId, tm); -end; - -function GetThemeBackgroundRegion(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pRect: PRect; out Region: HRGN): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeBackgroundRegion(hTheme, - DC, iPartId, iStateId, pRect, Region); -end; - -function HitTestThemeBackground(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - dwOptions: DWORD; pRect: PRect; - hRgn: HRGN; ptTest: TPoint; out wHitTestCode: WORD): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FHitTestThemeBackground(hTheme, DC, - iPartId, iStateId, dwOptions, pRect, hRgn, ptTest, wHitTestCode); -end; - -function DrawThemeEdge(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pDestRect: PRect; - uEdge, uFlags: UINT; pContentRect: PRect): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FDrawThemeEdge(hTheme, DC, iPartId, iStateId, - pDestRect, uEdge, uFlags, pContentRect); -end; - -function DrawThemeEdge(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const pDestRect: TRect; uEdge, uFlags: UINT; out pContentRect: TRect): HRESULT; -begin - Result := DrawThemeEdge(hTheme, DC, iPartId, iStateId, @pDestRect, uEdge, uFlags, @pContentRect); -end; - -function DrawThemeEdge(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - const pDestRect: TRect; uEdge, uFlags: UINT): HRESULT; -var - R: TRect; -begin - Result := DrawThemeEdge(hTheme, DC, iPartId, iStateId, pDestRect, uEdge, uFlags, R); -end; - -function DrawThemeIcon(hTheme: TdxTheme; DC: HDC; iPartId, iStateId: Integer; - pRect: PRect; himl: HIMAGELIST; iImageIndex: Integer): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FDrawThemeIcon(hTheme, DC, iPartId, iStateId, - pRect, himl, iImageIndex); -end; - -function IsThemePartDefined(hTheme: TdxTheme; iPartId: Integer; iStateId: Integer): BOOL; -begin - Result := FThemeLibraryMethodPointersKeeper.FIsThemePartDefined(hTheme, iPartId, iStateId); -end; - -function IsThemeBackgroundPartiallyTransparent(hTheme: TdxTheme; - iPartId: Integer; iStateId: Integer): BOOL; -begin - Result := FThemeLibraryMethodPointersKeeper.FIsThemeBackgroundPartiallyTransparent(hTheme, - iPartId, iStateId); -end; - -function DrawThemeParentBackground(hWnd: HWND; DC: HDC; const prc: TRect): HRESULT; -var - AFontHandle: HFONT; -begin - AFontHandle := GetCurrentObject(DC, OBJ_FONT); - Result := FThemeLibraryMethodPointersKeeper.FDrawThemeParentBackground(hWnd, DC, prc); - SelectObject(DC, AFontHandle); -end; - -function GetThemeColor(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Color: TColorRef): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeColor(hTheme, iPartId, iStateId, iPropId, Color); -end; - -function GetThemeMetric(hTheme: TdxTheme; DC: HDC; iPartId, iStateId, iPropId: Integer; - out iVal: Integer): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeMetric(hTheme, DC, iPartId, - iStateId, iPropId, iVal); -end; - -function GetThemeString(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - pszBuff: PWideChar; cchMaxBuffChars: Integer): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeString(hTheme, iPartId, iStateId, - iPropId, pszBuff, cchMaxBuffChars); -end; - -function GetThemeBool(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out fVal: BOOL): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeBool(hTheme, iPartId, iStateId, - iPropId, fVal); -end; - -function GetThemeInt(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out iVal: Integer): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeInt(hTheme, iPartId, iStateId, - iPropId, iVal); -end; - -function GetThemeEnumValue(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out iVal: Integer): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeEnumValue(hTheme, iPartId, - iStateId, iPropId, iVal); -end; - -function GetThemePosition(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Point: TPoint): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemePosition(hTheme, iPartId, iStateId, - iPropId, Point); -end; - -function GetThemeFont(hTheme: TdxTheme; DC: HDC; iPartId, iStateId, iPropId: Integer; - out Font: LOGFONTW): HRESULT; -var - S: array [0 .. 1000] of Char; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeFont(hTheme, DC, iPartId, iStateId, - iPropId, Font); - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, nil, Result, LOCALE_USER_DEFAULT, S, 1001, nil); -end; - -function GetThemeRect(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Rect: TRect): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeRect(hTheme, iPartId, iStateId, - iPropId, Rect); -end; - -function GetThemeMargins(hTheme: TdxTheme; DC: HDC; iPartId, iStateId, iPropId: Integer; - prc: PRect; out Margins: TdxMargins): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeMargins(hTheme, DC, iPartId, - iStateId, iPropId, prc, Margins); -end; - -function GetThemeIntList(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out IntList: TdxIntList): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeIntList(hTheme, iPartId, iStateId, - iPropId, IntList); -end; - -function GetThemePropertyOrigin(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - out Origin: TdxPropertyOrigin): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemePropertyOrigin(hTheme, iPartId, - iStateId, iPropId, Origin); -end; - -function SetWindowTheme(hWnd: HWND; pszSubAppName, pszSubIdList: - PWideChar): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FSetWindowTheme(hWnd, pszSubAppName, pszSubIdList); -end; - -function GetThemeFilename(hTheme: TdxTheme; iPartId, iStateId, iPropId: Integer; - pszThemeFileName: PWideChar; cchMaxBuffChars: Integer): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeFilename(hTheme, iPartId, - iStateId, iPropId, pszThemeFileName, cchMaxBuffChars); -end; - -function GetThemeSysColor(hTheme: TdxTheme; iColorId: Integer): COLORREF; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeSysColor(hTheme, iColorId); -end; - -function GetThemeSysColorBrush(hTheme: TdxTheme; iColorId: Integer): HBRUSH; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeSysColorBrush(hTheme, iColorId); -end; - -function GetThemeSysBool(hTheme: TdxTheme; iBoolId: Integer): BOOL; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeSysBool(hTheme, iBoolId); -end; - -function GetThemeSysSize(hTheme: TdxTheme; iSizeId: Integer): Integer; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeSysSize(hTheme, iSizeId); -end; - -function GetThemeSysFont(hTheme: TdxTheme; iFontId: Integer; - out lf: LOGFONTW): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeSysFont(hTheme, iFontId, lf); -end; - -function GetThemeSysString(hTheme: TdxTheme; iStringId: Integer; pszStringBuff: - PWideChar; cchMaxStringChars: Integer): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeSysString(hTheme, iStringId, - pszStringBuff, cchMaxStringChars); -end; - -function GetThemeSysInt(hTheme: TdxTheme; iIntId: Integer; var iValue: Integer): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeSysInt(hTheme, iIntId, iValue); -end; - -function IsThemeActive: BOOL; -begin - if @FThemeLibraryMethodPointersKeeper.FIsThemeActive = nil then - Result := False - else - Result := FThemeLibraryMethodPointersKeeper.FIsThemeActive; -end; - -function IsAppThemed: BOOL; -begin - Result := FThemeLibraryMethodPointersKeeper.FIsAppThemed; -end; - -function GetWindowTheme(hWnd: HWND): TdxTheme; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetWindowTheme(hWnd); -end; - -function EnableThemeDialogTexture(hWnd: HWND; dwFlags: DWORD): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FEnableThemeDialogTexture(hWnd, dwFlags); -end; - -function IsThemeDialogTextureEnabled(hWnd: HWND): BOOL; -begin - Result := FThemeLibraryMethodPointersKeeper.FIsThemeDialogTextureEnabled(hWnd); -end; - -function GetThemeAppProperties: DWORD; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeAppProperties; -end; - -procedure SetThemeAppProperties(dwFlags: DWORD); -begin - FThemeLibraryMethodPointersKeeper.FSetThemeAppProperties(dwFlags); -end; - -function GetCurrentThemeName(pszThemeFileName: PWideChar; - cchMaxNameChars: Integer; pszColorBuff: PWideChar; - cchMaxColorChars: Integer; pszSizeBuff: PWideChar; - cchMaxSizeChars: Integer): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetCurrentThemeName(pszThemeFileName, - cchMaxNameChars, pszColorBuff, cchMaxColorChars, pszSizeBuff, cchMaxSizeChars); -end; - -function GetThemeDocumentationProperty( - pszThemeName, pszPropertyName, pszValueBuff: PWideChar; - cchMaxValChars: Integer): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FGetThemeDocumentationProperty(pszThemeName, - pszPropertyName, pszValueBuff, cchMaxValChars); -end; - -//vista extention - -function BufferedPaintInit: HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FBufferedPaintInit; -end; - -function BufferedPaintUnInit: HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FBufferedPaintUnInit; -end; - -function BeginBufferedPaint(hdcTarget: HDC; prcTarget: PRect; - dwFormat: DWORD; pPaintParams: PdxBPPaintParams; out dc: HDC): TdxPaintBuffer; -begin - Result := FThemeLibraryMethodPointersKeeper.FBeginBufferedPaint(hdcTarget, - prcTarget, dwFormat, pPaintParams, dc); -end; - -function EndBufferedPaint(hBufferedPaint: TdxPaintBuffer; fUpdateTarget: BOOL): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FEndBufferedPaint(hBufferedPaint, fUpdateTarget); -end; - -function BufferedPaintSetAlpha(hBufferedPaint: TdxPaintBuffer; prc: PRect; alpha: Byte): HRESULT; -begin - Result := FThemeLibraryMethodPointersKeeper.FBufferedPaintSetAlpha(hBufferedPaint, prc, alpha); -end; - -function IsThemeLibraryLoaded: Boolean; -begin - Result := FThemeLibrary <> 0; -end; - -procedure SetMethodPointers; -begin - with FThemeLibraryMethodPointersKeeper do - begin - @FCloseThemeData := GetProcAddress(FThemeLibrary, 'CloseThemeData'); - @FDrawThemeBackground := GetProcAddress(FThemeLibrary, 'DrawThemeBackground'); - @FDrawThemeEdge := GetProcAddress(FThemeLibrary, 'DrawThemeEdge'); - @FDrawThemeIcon := GetProcAddress(FThemeLibrary, 'DrawThemeIcon'); - @FDrawThemeParentBackground := GetProcAddress(FThemeLibrary, 'DrawThemeParentBackground'); - @FDrawThemeText := GetProcAddress(FThemeLibrary, 'DrawThemeText'); - @FDrawThemeTextEx := GetProcAddress(FThemeLibrary, 'DrawThemeTextEx'); - @FEnableThemeDialogTexture := GetProcAddress(FThemeLibrary, 'EnableThemeDialogTexture'); - @FGetCurrentThemeName := GetProcAddress(FThemeLibrary, 'GetCurrentThemeName'); - @FGetThemeAppProperties := GetProcAddress(FThemeLibrary, 'GetThemeAppProperties'); - @FGetThemeBackgroundContentRect := GetProcAddress(FThemeLibrary, 'GetThemeBackgroundContentRect'); - @FGetThemeBackgroundRegion := GetProcAddress(FThemeLibrary, 'GetThemeBackgroundRegion'); - @FGetThemeBackgroundExtent := GetProcAddress(FThemeLibrary, 'GetThemeBackgroundExtent'); - @FGetThemeBool := GetProcAddress(FThemeLibrary, 'GetThemeBool'); - @FGetThemeColor := GetProcAddress(FThemeLibrary, 'GetThemeColor'); - @FGetThemeDocumentationProperty := GetProcAddress(FThemeLibrary, 'GetThemeDocumentationProperty'); - @FGetThemeEnumValue := GetProcAddress(FThemeLibrary, 'GetThemeEnumValue'); - @FGetThemeFilename := GetProcAddress(FThemeLibrary, 'GetThemeFilename'); - @FGetThemeFont := GetProcAddress(FThemeLibrary, 'GetThemeFont'); - @FGetThemeInt := GetProcAddress(FThemeLibrary, 'GetThemeInt'); - @FGetThemeIntList := GetProcAddress(FThemeLibrary, 'GetThemeIntList'); - @FGetThemeMargins := GetProcAddress(FThemeLibrary, 'GetThemeMargins'); - @FGetThemeMetric := GetProcAddress(FThemeLibrary, 'GetThemeMetric'); - @FGetThemePartSize := GetProcAddress(FThemeLibrary, 'GetThemePartSize'); - @FGetThemePosition := GetProcAddress(FThemeLibrary, 'GetThemePosition'); - @FGetThemePropertyOrigin := GetProcAddress(FThemeLibrary, 'GetThemePropertyOrigin'); - @FGetThemeRect := GetProcAddress(FThemeLibrary, 'GetThemeRect'); - @FGetThemeString := GetProcAddress(FThemeLibrary, 'GetThemeString'); - @FGetThemeSysBool := GetProcAddress(FThemeLibrary, 'GetThemeSysBool'); - @FGetThemeSysColor := GetProcAddress(FThemeLibrary, 'GetThemeSysColor'); - @FGetThemeSysColorBrush := GetProcAddress(FThemeLibrary, 'GetThemeSysColorBrush'); - @FGetThemeSysFont := GetProcAddress(FThemeLibrary, 'GetThemeSysFont'); - @FGetThemeSysInt := GetProcAddress(FThemeLibrary, 'GetThemeSysInt'); - @FGetThemeSysSize := GetProcAddress(FThemeLibrary, 'GetThemeSysSize'); - @FGetThemeSysString := GetProcAddress(FThemeLibrary, 'GetThemeSysString'); - @FGetThemeTextExtent := GetProcAddress(FThemeLibrary, 'GetThemeTextExtent'); - @FGetThemeTextMetrics := GetProcAddress(FThemeLibrary, 'GetThemeTextMetrics'); - @FGetWindowTheme := GetProcAddress(FThemeLibrary, 'GetWindowTheme'); - @FHitTestThemeBackground := GetProcAddress(FThemeLibrary, 'HitTestThemeBackground'); - @FIsAppThemed := GetProcAddress(FThemeLibrary, 'IsAppThemed'); - @FIsThemeActive := GetProcAddress(FThemeLibrary, 'IsThemeActive'); - @FIsThemePartDefined := GetProcAddress(FThemeLibrary, 'IsThemePartDefined'); - @FIsThemeBackgroundPartiallyTransparent := GetProcAddress(FThemeLibrary, 'IsThemeBackgroundPartiallyTransparent'); - @FIsThemeDialogTextureEnabled := GetProcAddress(FThemeLibrary, 'IsThemeDialogTextureEnabled'); - @FOpenThemeData := GetProcAddress(FThemeLibrary, 'OpenThemeData'); - @FSetThemeAppProperties := GetProcAddress(FThemeLibrary, 'SetThemeAppProperties'); - @FSetWindowTheme := GetProcAddress(FThemeLibrary, 'SetWindowTheme'); - //vista extention - @FBufferedPaintInit := GetProcAddress(FThemeLibrary, 'BufferedPaintInit'); - @FBufferedPaintUnInit := GetProcAddress(FThemeLibrary, 'BufferedPaintUnInit'); - @FBeginBufferedPaint := GetProcAddress(FThemeLibrary, 'BeginBufferedPaint'); - @FEndBufferedPaint := GetProcAddress(FThemeLibrary, 'EndBufferedPaint'); - @FBufferedPaintSetAlpha := GetProcAddress(FThemeLibrary, 'BufferedPaintSetAlpha'); - end; -end; - -initialization - InitCommonControls; - FThemeLibrary := LoadLibrary(ThemeLibraryName); - if FThemeLibrary <> 0 then - SetMethodPointers; - -finalization - if FThemeLibrary <> 0 then - FreeLibrary(FThemeLibrary); - -end.